feat(cli): hire, autonomy and task-board verbs for WebUI parity (#1873) #1946

Merged
jason.woltje merged 3 commits from cli-parity into refactor 2026-11-12 02:52:32 +00:00
Owner

Dev readiness P1-3 (#1873): every WebUI owner action in the readiness audit gets a CLI command (org ruling 6).

  • mosaic org role-templates|hire|fire|change ORG and mosaic org autonomy ORG [set|review] send the page's own request to the running Console's org route, over the transport org reload uses. The Console runs its owner, --send, origin, body and live-session checks, and the bus runs the hire rights, proposal and autonomy checks. The CLI adds no authority and has no path past the decision.
  • hire and change read the templates first and send the chosen template's name and sha256, as the form does. autonomy set needs --revision (the 64-hex value mosaic org autonomy ORG prints), sends every setting the panel sends with only the named ones changed, and a stale revision is refused revision-conflict.
  • mosaic tasks create|edit|archive are the task board's three writes. Arguments pass the board's own parseTaskWrite and go to the bus as the person over the human transport, as mosaic tasks and decide do. Edit and archive need --expect; a stale digest is refused task-conflict.
  • Every new verb, reads included, refuses inside an agent run, after the usage checks (exit 4) and before any config is read. Exit codes: 3 for a Console refusal with its code, 1 for outcome unknown, 2 for an unknown template or a task refusal.
  • Help, docs/TOOLS.md, the cli README and the webui README list the verbs. No new refusal codes.

Tests: new cli-parity (4), agent-guard extended (7 new guarded entries, usage first). Each red on BASE 6d0e9f89b. Devstack acceptance compared the CLI with the page's own requests for every verb, including refusals; both sides matched. Lane gate 5073/0 (cli, webui, bus suites and the pinned files). Rebased on #1945 with conflicts in TOOLS.md, org.mjs and agent-guard.test.mjs resolved by union. Lead check: 119 files on 666f4d686 (touched tests, every reader of org.mjs, cli.mjs, org-console, the usage and help text, TOOLS.md and both READMEs, every refusal, path, json-redaction and last-values file), 1386/0, 1 skip (federation acceptance runs only under its script).

Review: build (Opus) approve, 8 P3; six fixed with tests, two recorded below. Security (daybreak-blue) approve, 0 findings: no verb skips a check the WebUI path has.

Deferred: hiring a name that exists maps organization-instance-exists to outcome-unknown (503) on the page and the CLI alike; org autonomy confirm|reverse verbs; no Console trail line for CLI task writes; task parity is tested against the parser, not the route.

Dev readiness P1-3 (#1873): every WebUI owner action in the readiness audit gets a CLI command (org ruling 6). - `mosaic org role-templates|hire|fire|change ORG` and `mosaic org autonomy ORG [set|review]` send the page's own request to the running Console's org route, over the transport `org reload` uses. The Console runs its owner, `--send`, origin, body and live-session checks, and the bus runs the hire rights, proposal and autonomy checks. The CLI adds no authority and has no path past the decision. - `hire` and `change` read the templates first and send the chosen template's name and sha256, as the form does. `autonomy set` needs `--revision` (the 64-hex value `mosaic org autonomy ORG` prints), sends every setting the panel sends with only the named ones changed, and a stale revision is refused `revision-conflict`. - `mosaic tasks create|edit|archive` are the task board's three writes. Arguments pass the board's own `parseTaskWrite` and go to the bus as the person over the human transport, as `mosaic tasks` and `decide` do. Edit and archive need `--expect`; a stale digest is refused `task-conflict`. - Every new verb, reads included, refuses inside an agent run, after the usage checks (exit 4) and before any config is read. Exit codes: 3 for a Console refusal with its code, 1 for outcome unknown, 2 for an unknown template or a task refusal. - Help, docs/TOOLS.md, the cli README and the webui README list the verbs. No new refusal codes. Tests: new cli-parity (4), agent-guard extended (7 new guarded entries, usage first). Each red on BASE 6d0e9f89b. Devstack acceptance compared the CLI with the page's own requests for every verb, including refusals; both sides matched. Lane gate 5073/0 (cli, webui, bus suites and the pinned files). Rebased on #1945 with conflicts in TOOLS.md, org.mjs and agent-guard.test.mjs resolved by union. Lead check: 119 files on 666f4d686 (touched tests, every reader of org.mjs, cli.mjs, org-console, the usage and help text, TOOLS.md and both READMEs, every refusal, path, json-redaction and last-values file), 1386/0, 1 skip (federation acceptance runs only under its script). Review: build (Opus) approve, 8 P3; six fixed with tests, two recorded below. Security (daybreak-blue) approve, 0 findings: no verb skips a check the WebUI path has. Deferred: hiring a name that exists maps `organization-instance-exists` to outcome-unknown (503) on the page and the CLI alike; `org autonomy confirm|reverse` verbs; no Console trail line for CLI task writes; task parity is tested against the parser, not the route.
jason.woltje added 3 commits 2026-11-12 02:52:27 +00:00
mosaic org role-templates|hire|change|fire and mosaic org autonomy
[set|review] send the hire form's and the autonomy panel's own requests
to the running Console's org route, so the Console runs the same owner,
send, origin, body and revision checks and the same bus verbs. They
refuse inside an agent run after their usage checks.

mosaic tasks create|edit|archive pass the board's parseTaskWrite and go
to the bus as the person (tasks.create|edit|archive).

Docs: cli README, docs/TOOLS.md, webui README Console actions table.
The panel's revision is the bus's sha256 of the organization, so a
whole-number --revision could never match a real Console. The fake in
cli-parity now answers hex revisions, and a whole number is a usage error.
- autonomy set: an empty --authority-resolver clears the resolver as the
  panel does; --reverse-window-hours takes 1 to 168, as the page and bus do.
- The default instance gets a one-line refusal (exit 3) naming the named
  instance and --dev-local-owner, not a stack trace.
- tasks create|edit|archive: a value starting with -- is a usage error;
  --business is checked before the agent guard, and the guard also reads
  process.env.
- Drop the unused consoleRefusal export.
- Docs: --business is required, resolver clearing, window range, and the
  named-instance requirement.
jason.woltje merged commit 666f4d6864 into refactor 2026-11-12 02:52:32 +00:00
Sign in to join this conversation.