#!/usr/bin/env node // mosaic inbox | decide | tasks | agents | trail, and mosaic bus start|stop|status. // See packages/cli/README.md. Exit codes are in src/errors.mjs. // // The human commands read and resolve through the broker's human transport // (src/transport.mjs), never the SQLite file. `bus start` is the trusted // host (src/host.mjs) the systemd unit mosaic-bus@ runs. import { lstatSync, readFileSync } from "node:fs"; import { join } from "node:path"; import { createInterface } from "node:readline/promises"; import { fileURLToPath } from "node:url"; import { BINDING_NAME } from "../../discord/src/binding.mjs"; import { CliError } from "./errors.mjs"; import { bootConfig, loadSystem, socketPath } from "./config.mjs"; import { humanTransport, refuseInsideAgent } from "./transport.mjs"; import { formatAgents, formatDecision, formatInbox, formatTasks, formatTrail, shortId } from "./format.mjs"; import { hostStatus, readHostState, startHost, stopHost } from "./host.mjs"; export const USAGE = `usage: mosaic inbox [--business ] [--json] mosaic decide