salvage 2026-11-06: uncommitted work from scratch/darkwing-scratch/r141/wt3 (disk cleanup #824)

This commit is contained in:
mos committed 2026-11-06 10:04:01 -06:00
1 parent 18aee8fa17
commit 255167f8ca
26 files changed
+862 -52

No files matched your search

+18
View File
@@ -40,6 +40,8 @@ export const USAGE = `usage:
mosaic trail <task|decision> [--business <id>] [--json] [--tester]
mosaic talk <role> <text> [--wait <seconds> | --follow] [--business <id>] [--tester]
mosaic follow [--business <id>] [--tester]
mosaic name <instance> <name> [--business <id>]
mosaic names [--business <id>] [--json]
mosaic stop <run>
mosaic launches off|on [--business <id>]
mosaic launches list [--json]
@@ -269,6 +271,21 @@ async function human(verb, rest, io, deps) {
return print(await call("agents"), formatAgents);
}
// Row 141 (#1635, REQ-MSG-2): `mosaic name` sets the name `talk` and message.send accept for an
// instance; `mosaic names` lists the current ones. Both are the human's.
async function names(verb, rest, io, deps) {
const parsed = parse(rest, { flags: verb === "names" ? ["--json"] : [], values: ["--business"] });
if (parsed.positional.length !== (verb === "name" ? 2 : 0)) throw usage(verb === "name" ? "name takes an instance and a name" : "names takes no arguments");
const call = callFor(parsed, io, deps);
if (verb === "name") {
const [instance, name] = parsed.positional;
await call("name.set", { instance, name });
return io.stdout.write(`named ${instance} ${name}\n`);
}
const rows = await call("names");
io.stdout.write(parsed.flags.has("--json") ? `${JSON.stringify(rows, null, 2)}\n` : rows.map((r) => `${r.instance} ${r.name}\n`).join(""));
}
const TALK_WAIT_S = 900;
const TESTER_PREFIX = "[mos test]";
const TALK_POLL_MS = 2000;
@@ -487,6 +504,7 @@ export async function main(argv, io = { env: process.env, stdin: process.stdin,
if (verb === "plugins") return pluginsCommand(rest, io, (p) => callFor(p, io, deps));
if (verb === "talk") return talk(rest, io, deps);
if (verb === "follow") return talk(rest, io, deps, true);
if (verb === "name" || verb === "names") return names(verb, rest, io, deps);
if (verb === "stop") return stop(rest, io, deps);
if (verb === "launches") return launches(rest, io, deps);
if (verb === "bus") return bus(rest, io, deps);