feat(triage): the owner-only route store and mosaic triage route show|set
<dataRoot>/triage/route.json holds Triage's model route and daily cap as names only: a catalogue model key, a harness name and a daily-quota cap leaf, with no env value and no key. The directory is 0700 and the file 0600, owned by the running user; a link, a hard link, a non-file, a wrong mode or owner, an unknown field or an unknown time zone refuses. A write is compare-and-set on revision under an exclusive lock, atomic (temp file, fsync, rename, directory fsync), and appends one receipt line. The reset is 00:00 in a zone the owner gives, with no default. The file location, field names and reset rule each live in one place. mosaic triage route show|set are human verbs and refuse an agent run before any read. Nothing is wired into the Triage host: the Console keeps route: null. Held for Jason's ruling on the design's four questions (#1873, lane triage-route-store).
This commit is contained in:
1 parent
2d44750b96
commit
4c8527fcd3
7 files changed
+906
-1
No files matched your search
@@ -56,6 +56,7 @@ import { ORG_CONFIG, runConfigCommand } from "../../organization/src/config-comm
|
||||
import { devCommand, DEV_USAGE, fixtureLaunchEnv, fixtureLauncherOptions } from "./dev-fixture.mjs";
|
||||
import { runCommand, RUN_USAGE } from "./run-evidence.mjs";
|
||||
import { tasksWriteCommand, TASKS_WRITE_OPS, TASKS_WRITE_USAGE } from "./tasks-write.mjs";
|
||||
import { triageCommand, TRIAGE_USAGE } from "./triage.mjs";
|
||||
|
||||
export const USAGE = `usage:
|
||||
${ACCOUNTS_USAGE}
|
||||
@@ -103,6 +104,7 @@ export const USAGE = `usage:
|
||||
mosaic console start [--dev-local-owner [--dev-insecure-bind ADDR --dev-allow-host NAME[,NAME...]]] [--detach] [--port auto|N]
|
||||
mosaic console stop|status
|
||||
mosaic console restart
|
||||
${TRIAGE_USAGE}
|
||||
${DEV_USAGE}
|
||||
${RUN_USAGE}`;
|
||||
|
||||
@@ -818,6 +820,8 @@ export async function main(argv, io = { env: process.env, stdin: process.stdin,
|
||||
if (verb === "launches") return launches(rest, io, deps);
|
||||
if (verb === "bus") return bus(rest, io, deps);
|
||||
if (verb === "console") return consoleCommand(rest, io, deps);
|
||||
// triage-route-store (#1873): the owner's Triage route file, read and written as the person.
|
||||
if (verb === "triage") return triageCommand(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`);
|
||||
|
||||
Reference in new issue
Block a user