From 56de6fbfba90479486e4074791bda56e50f4edeb Mon Sep 17 00:00:00 2001 From: Jason Woltje Date: Sat, 7 Nov 2026 11:30:44 -0600 Subject: [PATCH] Route mosaic dev and run evidence, and pass the fixture to a dev-owner bus --- packages/cli/src/cli.mjs | 10 ++++++++-- scripts/mosaic | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/cli/src/cli.mjs b/packages/cli/src/cli.mjs index 20eb7d2ab..7ba529205 100644 --- a/packages/cli/src/cli.mjs +++ b/packages/cli/src/cli.mjs @@ -41,6 +41,8 @@ import { SeatError } from "../../seat/src/seat.mjs"; import { usageCommand, USAGE_USAGE } from "./usage.mjs"; import { orgCommand, ORG_USAGE } from "./org.mjs"; +import { devCommand, DEV_USAGE, fixtureLauncherOptions } from "./dev-fixture.mjs"; +import { runCommand, RUN_USAGE } from "./run-evidence.mjs"; export const USAGE = `usage: ${ORG_USAGE} @@ -76,7 +78,9 @@ export const USAGE = `usage: mosaic launches list [--json] mosaic bus start [--pm | --no-launch] [--dev-local-owner] mosaic bus stop - mosaic bus status [--json]`; + mosaic bus status [--json] + ${DEV_USAGE} + ${RUN_USAGE}`; // packages/seat/src/cli.mjs USAGE, which that module does not export (it runs // its main on import). tests/app.test.mjs fails if the two drift. @@ -572,7 +576,7 @@ async function bus(rest, io, deps) { const binding = readNotifyConfig(system.dataRoot, businessId); const host = await startHost({ boot, business: businessId, notifier: binding ? { binding } : null }); try { - const launcher = createLauncher({ host, system, env: io.env, tracker: Boolean(boot.trackers?.[businessId]), launches, ...(deps.launcher ?? {}) }); + const launcher = createLauncher({ host, system, env: io.env, tracker: Boolean(boot.trackers?.[businessId]), launches, ...(instance ? fixtureLauncherOptions({ system, env: io.env, instance }) : {}), ...(deps.launcher ?? {}) }); await launcher.listen(); if (instance) io.stdout.write(`DEV LOCAL OWNER MODE: console owner local-dev accepted (named instance ${instance})\n`); if (instance && parsed.flags.has("--pm")) io.stdout.write('DEV LOCAL OWNER MODE: launched agents run as this OS user and can reach the loopback Console as owner; use this instance for UI testing only\n'); @@ -686,6 +690,8 @@ export async function main(argv, io = { env: process.env, stdin: process.stdin, if (["halt", "resume", "processing"].includes(verb)) return processingCommand(verb, rest, io, deps); if (verb === "launches") return launches(rest, io, deps); if (verb === "bus") return bus(rest, io, deps); + if (verb === "dev") return devCommand(rest, io, { system: deps.system }); + if (verb === "run") return runCommand(rest, io, { system: deps.system, callFor: (p) => channelCallFor(p, io, deps) }); if (verb === "-h" || verb === "--help") return io.stdout.write(`${USAGE}\n`); throw usage(); } diff --git a/scripts/mosaic b/scripts/mosaic index ee9c5f4c2..90c707869 100755 --- a/scripts/mosaic +++ b/scripts/mosaic @@ -41,6 +41,6 @@ if [ "${1:-}" = library ] && [ "${2:-}" = survey ]; then exec node "$REPO/packages/library/src/survey.mjs" "$@" fi case "${1:-}" in - org|proxy|halt|resume|processing|usage|project|limits|inbox|decide|tasks|agents|trail|talk|stop|launches|bus|plugins|credentials|hosts|grants|name|names|follow|threads|thread|access) exec node "$REPO/packages/cli/src/cli.mjs" "$@" ;; + org|proxy|halt|resume|processing|usage|project|limits|inbox|decide|tasks|agents|trail|talk|stop|launches|bus|plugins|credentials|hosts|grants|name|names|follow|threads|thread|access|dev|run) exec node "$REPO/packages/cli/src/cli.mjs" "$@" ;; esac exec node "$REPO/packages/seat/src/cli.mjs" "$@"