#!/usr/bin/env node // mosaic inbox | decide | tasks | agents | trail | talk | stop | launches, // 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; with // --pm it also launches the business's PM (src/launcher.mjs). 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"; import { createLauncher } from "./launcher.mjs"; import { quitLine, runApp } from "./app.mjs"; import { readSessions, stopSession } from "../../seat/src/session.mjs"; import { SeatError } from "../../seat/src/seat.mjs"; export const USAGE = `usage: mosaic inbox [--business ] [--json] mosaic decide