@staix/agent-hub 0.53.0 → 0.54.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/README.md +4 -3
  3. package/docs/agent-notes/README.md +1 -1
  4. package/docs/agent-notes/adapters.md +4 -3
  5. package/docs/agent-notes/budget.md +2 -2
  6. package/docs/agent-notes/bus.md +1 -0
  7. package/docs/agent-notes/daemon.md +1 -1
  8. package/docs/agent-notes/models.md +1 -1
  9. package/docs/agent-notes/tests.md +4 -4
  10. package/docs/contracts/companion-cli-v3.json +348 -0
  11. package/docs/design/adapters.md +1 -1
  12. package/docs/design/agent-hub-architecture.md +8 -5
  13. package/docs/design/bus.md +1 -1
  14. package/docs/design/cli-output-inventory.md +2 -2
  15. package/docs/design/model-routes.md +20 -5
  16. package/docs/dogfood.md +7 -3
  17. package/docs/events.md +1 -1
  18. package/docs/memory.md +2 -2
  19. package/docs/operations.md +122 -45
  20. package/docs/quickstart.md +8 -2
  21. package/docs/security.md +11 -7
  22. package/docs/specs/2026-09-19-agent-hub-design.md +5 -3
  23. package/docs/specs/2026-09-19-multi-project-design.md +1 -1
  24. package/docs/specs/2026-12-04-arev-adoption-design.md +3 -3
  25. package/docs/specs/mcp-endpoint.md +1 -1
  26. package/docs/specs/relay-contract.md +38 -0
  27. package/docs/verification/2026-12-06-0.54.0.md +76 -0
  28. package/docs/verification/2026-12-06-codex-0174-reviewer-isolation.md +43 -0
  29. package/docs/verification/2026-12-06-codex-0174-reviewer-tool-call.md +34 -0
  30. package/docs/verification/2026-12-06-compat-codex-capabilities-0.174.0.md +25 -0
  31. package/docs/verification/2026-12-06-compat-pi-1.8.0.md +23 -0
  32. package/docs/verified.json +27 -28
  33. package/package.json +5 -4
  34. package/plugins/agent-hub/.claude-plugin/plugin.json +1 -1
  35. package/plugins/agent-hub/.mcp.json +1 -1
  36. package/plugins/agent-hub/compat.json +5 -3
  37. package/plugins/agent-hub/kimi-hook.js +5 -4
  38. package/plugins/agent-hub/relay-launcher.js +24 -0
  39. package/plugins/agent-hub/server.js +5112 -4737
  40. package/src/adapters/acp.ts +5 -4
  41. package/src/adapters/compat.ts +22 -12
  42. package/src/adapters/definitions/native-cli-preview-pi.ts +2 -1
  43. package/src/adapters/definitions/native-config-defaults.ts +1 -1
  44. package/src/adapters/definitions/native-factories.ts +4 -1
  45. package/src/adapters/local-worker.ts +3 -3
  46. package/src/adapters/pi.ts +26 -7
  47. package/src/adapters/relay-launcher.ts +27 -0
  48. package/src/cli/agents.ts +20 -8
  49. package/src/cli/commands/agents.ts +18 -1
  50. package/src/cli/commands/doctor.ts +18 -4
  51. package/src/cli/commands/launch-line.ts +13 -5
  52. package/src/cli/help.ts +4 -2
  53. package/src/cli/launch-line-plan.ts +82 -0
  54. package/src/cli/pi-steps-warning.ts +14 -0
  55. package/src/hub/accounts.ts +8 -4
  56. package/src/hub/adec-triage.ts +105 -0
  57. package/src/hub/bus.ts +39 -6
  58. package/src/hub/config-apply.ts +1 -1
  59. package/src/hub/config.ts +2 -2
  60. package/src/hub/control/dashboard-messages.ts +221 -0
  61. package/src/hub/control/delivery-messages.ts +356 -0
  62. package/src/hub/control/dispatch.ts +114 -0
  63. package/src/hub/control/operations-messages.ts +269 -0
  64. package/src/hub/control/peer-messages.ts +126 -0
  65. package/src/hub/control/scope.ts +79 -2
  66. package/src/hub/daemon.ts +111 -918
  67. package/src/hub/delivery-hints.ts +2 -0
  68. package/src/hub/delivery-journal.ts +17 -6
  69. package/src/hub/events.ts +2 -1
  70. package/src/hub/host.ts +41 -9
  71. package/src/hub/lifecycle.ts +3 -2
  72. package/src/hub/peers.ts +2 -0
  73. package/src/hub/pi-exit-policy.ts +27 -0
  74. package/src/hub/protocol-window.ts +1 -1
  75. package/src/hub/routing.ts +9 -0
  76. package/src/hub/supervision.ts +33 -6
  77. package/src/hub/tasks-types.ts +4 -1
  78. package/src/hub/tasks.ts +35 -1
  79. package/src/models/route/config.ts +4 -4
  80. package/src/models/route/decision.ts +18 -10
  81. package/src/models/route/runtime.ts +8 -5
  82. package/src/npm-artifact.ts +76 -0
  83. package/src/omniroute/client.ts +6 -0
  84. package/src/pi/extension.ts +5 -2
  85. package/src/pi/install.ts +77 -0
  86. package/src/pi/pin.ts +49 -0
  87. package/templates/adec/README.md +10 -6
  88. package/templates/config.json +1 -1
package/CHANGELOG.md CHANGED
@@ -4,6 +4,24 @@ Issue and pull request numbers in the entries for 0.7.7 and earlier refer to the
4
4
 
5
5
  ## Unreleased
6
6
 
7
+ ## 0.54.0
8
+
9
+ - Release N-1 for 0.54.x is published 0.53.0, which declares agent-mem `>=0.47.0 <1.0.0`; its fixture lock pins the 0.47.0 that the 0.53.0 release resolved (with agent-review 0.17.1, cli-output 0.1.5 and mcp-stdio 1.2.1), with control protocol 17 (descriptor floor 16). Wire and protocol, `hub.db` format, memory store formats (agent-mem 0.48.0 to 0.50.0 raise no format floor) and MCP tools are unchanged and compatible both ways. Settings have a ceiling: a project that sets `bus.hold_notice_ms` in `.agenthub/` or `decision_mode = "enforce"` on a hub route is refused by a 0.53.0 hub, and a 0.53.0 hub ignores `[inference] triage_adec` in `routing.toml`. The `ahub launch-line` options and `ahub agents install pi` are not in the 0.53.0 CLI. The N-1 fixture and matrix pin that package; the separate protocol-16 fixture stays at 0.25.0.
10
+ - `ahub launch-line <kind> --json` takes `[--exec <absolute-path|self>] [-- <launch arguments>]`: it keeps the launch's options or refuses with a fixed reason, prints a runnable executable on request, refuses a daemon older than 0.53.0 with nothing on stdout, and never prints a blank command. Companion CLI contract v3 records it (Refs #1963).
11
+ - A Pi owner that is killed by a signal or ends itself with `ctx.shutdown()` now logs a distinct exit cause (signal, stderr tail, last native event, the provider a `model_select` named) and, when it is a managed headless owner under `pi.auto_start`, restarts once from its verified recorded session even if a turn or tool was active; the same cause within ten minutes does not restart again, and the 60-second restart limit still applies. The Pi step ceiling counts from a logical turn's start to `agent_settled`, so a native retry no longer resets it, and `ahub doctor` warns when a project file sets `pi.max_steps` below the default, naming the file and key. The pre-offer route probe moved to spec #1973 (Refs #1967).
12
+ - Codex 0.174.0 skill listing is verified through `codex-capabilities` on macOS arm64 (Refs #888).
13
+ - The compat publisher no longer stops on a merged or closed bot PR whose head was changed by hand: it reports it once and skips it, and an open bot PR with a foreign head is reported (number, id, version) and skipped for its own id and version while every other action still runs. The daily watch report adds a publisher health line with the last bot compat PR and any blocking PR (Refs #1966).
14
+ - Pi 1.8.0 is verified for model-free extension loading, RPC session identity and managed tool receipts on macOS arm64 (Refs #888).
15
+ - A person can pin a verified Pi release with `ahub agents install pi`. Projects without an explicit `pi.cmd` use the hub-owned install (Refs #1965).
16
+ - A local `needs_review` row left by the ACP adapter's own unrequested session stop (a host-set, journaled mark; reason text never decides it) now holds only itself: later queued work is delivered, the next delivery carries one bounded body-free held hint, and the conductor notice names the `ahub queue resolve` command the conductor may run and repeats once after the new `bus.hold_notice_ms` (default 30 minutes). Every other local `needs_review` row, including invocation rows, an accepted-settle timeout, an aborted turn and an unconfirmed reviewer fallback, still holds the peer (Refs #1946).
17
+ - A person can enable `decision_mode = "enforce"` on an adec decision route to apply its model and reasoning effort. Unusable decisions keep the current pair (Refs #554, #1936).
18
+ - Declared accounts: once a kind has a declared account, an unaccounted peer of that kind budgets as `<kind>:default` instead of the bare kind, so a declared base session and an unaccounted peer (for example `instances.claude-2`) no longer collide and `ahub status --json` works again; pauses stored under the bare id move there at start (Refs #1941).
19
+ - The Claude plugin uses the native agent-suite MCP relay when it advertises relay contract v1, and falls back to its bundled Bun relay otherwise (Refs #1942).
20
+ - In shared-host mode, an uncaught control callback error on WebSocket or MCP stops only its project. Other projects keep serving (Refs #1779).
21
+ - Dependencies: `@staix/cli-output` is pinned exactly to 0.1.6, the `@staix/agent-mem` floor is raised to 0.50.0 and `@staix/agent-review` to exactly 0.17.3, which pin the same cli-output, so recovery accepts them (STAIxBWLB/cli-output#48). No TypeScript behavior change (cli-output 0.1.6 fixes Rust-crate Indic and Lam-Alef widths).
22
+ - A `type = "decision"` route, plan_execute and advisor/escalation choice now send the pair the heuristic picked as `constraints.current` on every adec request, so shadow rows carry what adec is compared with (Refs #1936).
23
+ - `[inference] triage_adec` in `routing.toml` (default `off`) asks a loopback adec the `ahub.triage.v1` question beside the hub's own triage, with `current`, a `ko` tag and `pii`, and posts the settled class as the outcome label on approval; `enforce`, set only by a person, lets a non-abstaining answer name the class and falls open otherwise (#1936, refs #554).
24
+
7
25
  ## 0.53.0
8
26
 
9
27
  - Release N-1 for 0.53.x is published 0.52.0, which declares agent-mem `>=0.47.0 <1.0.0`; its fixture lock pins the 0.47.0 that the 0.52.0 release resolved (with cli-output 0.1.5 and mcp-stdio 1.2.1), with control protocol 17 (descriptor floor 16). Wire and protocol, `hub.db` format, settings and MCP tools are unchanged and compatible both ways: this release adds no setting a 0.52.0 hub refuses. The 0.53.0 plugin relays MCP over the project socket only when the daemon advertises it is serving one, so with a 0.52.0 daemon it keeps the stdio bridge; `ahub upgrade --recreate` is not in the 0.52.0 CLI. No capability or format ceiling is raised. The N-1 fixture and matrix pin that package; the separate protocol-16 fixture stays at 0.25.0.
package/README.md CHANGED
@@ -5,7 +5,7 @@ Code, Codex, Kimi Code, Pi and a hub-owned local worker (plus Qwen Code, Jcode a
5
5
  Antigravity if you want them) share a message bus, a task board and a memory, each
6
6
  connected through its own native interface.
7
7
 
8
- Status: 0.53.0, control protocol 17 (accepts 16). Bun + TypeScript, one loopback daemon per
8
+ Status: 0.54.0, control protocol 17 (accepts 16). Bun + TypeScript, one loopback daemon per
9
9
  project. Site: [agent-hub.staix.net](https://agent-hub.staix.net).
10
10
 
11
11
  Inspect bounded task and attempt metadata with `ahub lineage show`; admit external
@@ -66,8 +66,9 @@ including [a new project with SDLC advise or enforce](docs/quickstart.md#a-new-p
66
66
  - **Peers, not a pipeline.** Any agent can message the others. Messages are batched
67
67
  into digests, priorities decide what interrupts a turn, and delivery survives
68
68
  restarts.
69
- - **Optional decision routing.** Hub-owned routes can consult a loopback adec
70
- policy in shadow mode while keeping the existing model choice unchanged.
69
+ - **Optional decision routing.** Hub-owned decision routes can consult a loopback
70
+ adec policy. Shadow records the proposal while keeping the current model and
71
+ effort. A person can enable enforce to apply a validated model and effort.
71
72
  Stage routes use bounded numeric evidence and a deterministic fallback;
72
73
  whole-wire sizing conservatively counts UTF-8 JSON bytes, including Unicode.
73
74
  See the [stage contract](docs/design/model-routes.md) and
@@ -70,7 +70,7 @@ Background moved out of the area notes for 0.15.0:
70
70
 
71
71
  Background moved out of the area notes for 0.16.0:
72
72
 
73
- - Closing-refs negation list (#760, tests.md): agent-mem PR #36 said "Does not close #15", GitHub read `close #15` as a closing keyword, and the design issue closed with T3 open. The list errs toward flagging: a false positive costs a rewrite of the PR text, a false negative closes a design issue, and a body that really means a qualified close is the author's to reword. A keyword typed into a comment or the merge dialog is out of the check's reach. At 0.16.0 `closing-refs` is not a required status check (branch rules require `check (ubuntu-latest)`, `check (macos-latest)` and `seeded guards`).
73
+ - Closing-refs negation list (#760, tests.md; the check runs from `@staix/repo-tools` since #1938 and the list lives there): agent-mem PR #36 said "Does not close #15", GitHub read `close #15` as a closing keyword, and the design issue closed with T3 open. The list errs toward flagging: a false positive costs a rewrite of the PR text, a false negative closes a design issue, and a body that really means a qualified close is the author's to reword. A keyword typed into a comment or the merge dialog is out of the check's reach. At 0.16.0 `closing-refs` is not a required status check (branch rules require `check (ubuntu-latest)`, `check (macos-latest)` and `seeded guards`).
74
74
 
75
75
  Background behind the 0.18.0 rules:
76
76
 
@@ -79,8 +79,8 @@ Scope: the Codex, ACP and Pi adapters and the Pi extension (turn `generation` an
79
79
  ## Pi
80
80
 
81
81
  - Tag a Pi hub-tool refusal only at a proven pre-effect guard with `PreEffectToolRefusal`; return its exact error and settle its receipt. Never classify a generic/post-effect/storage failure or a legacy pending receipt from error text or current board state. After durable `markStale`, cancellation or output consumption, retain ordinary failure classification; a later binding/privacy rejection cannot prove that no effect occurred. Recheck task revision, owner/session generation and privacy across awaited bounded spec/check operations; never turn those tools into arbitrary host execution.
82
- - Version gate (#843): `PiPeer.startImpl` first awaits the preflight the production factory `createPi` passes as a separate constructor argument (keep it out of `PiOptions`: transport option identity), which runs `piVersionAsync` on the exact configured `pi.cmd` plus `--version` (owned group, 64 KiB, 10 s) against compat `pi`. Only a `PiVersionRefusal` reaches the caller as is (sanitized, 1000 characters); never wrap another start error in it. A fake Pi in a daemon fixture answers `--version` with a verified version.
83
- - Report each Pi owner exit once, with code/signal (unknown for an unobserved TUI exit), turn/tool activity and only the last tool name. Auto-restart only a current, started, unexpectedly idle headless owner on its verified persisted session, once per 60 s; preserve shutdown/requested-stop/recovery/startup/active-tool fences and never fall back fresh.
82
+ - Version gate (#843): `PiPeer.startImpl` first awaits the preflight the production factory `createPi` passes as a separate constructor argument (keep it out of `PiOptions`: transport option identity), which runs `piVersionAsync` on the command `piCommand(options.cmd)` resolves (an explicit `pi.cmd`, else the verified hub-owned pin from `src/pi/pin.ts`, else `pi` on PATH) plus `--version` (owned group, 64 KiB, 10 s) against compat `pi`, and returns that command so the launch uses the very command it checked. Only a `PiVersionRefusal` reaches the caller as is (sanitized, 1000 characters); never wrap another start error in it. A fake Pi in a daemon fixture answers `--version` with a verified version.
83
+ - Report each Pi owner exit once, with code/signal (unknown for an unobserved TUI exit), turn/tool activity, only the last tool name, and the bounded reason, last native event, `model_select` provider and stderr tail (`piExitReason`, `src/hub/pi-exit-policy.ts`). The hub writes no task text into the record, but the stderr tail is Pi's own output, whitespace-folded and cut to 300 characters, never filtered. Auto-restart only a current, started headless owner on its verified persisted session, once per 60 s; a restartable cause (`signal:*`, `session_shutdown`, `model_select:*`) may restart through a turn/tool-active exit, at most once per peer and cause per 10 minutes (`PiRestartLedger`), while a plain exit code keeps the inspect-first fence. Preserve shutdown/requested-stop/recovery/startup fences and never fall back fresh.
84
84
  - Keep Pi owner identity on the shared `processSignature`/`processLiveness` contract exported by the first-party package's Node-safe `@staix/agent-mem/platform` entry, re-exported unchanged by `src/pi/process-signature.ts` for the startup claim, extension claim, TUI owner monitor, `recoveryReady` and verified teardown. Memory's `sync.lock` uses the same implementation. Preserve the Node-safe process-entry regression in `test/memory-parity.test.ts`, the existing Pi process behavior tests, the LC_ALL=C/TZ=UTC `ps` read and strict pid + start + command identity; never accept PID-only or a fuzzy command match.
85
85
  - Return the shared `toolResultFailed` verdict as `/tool`'s `failed`; map only `failed === true` to Pi's `isError`. Preserve text and the older bridge's absent-flag behavior. The one exception is a person's `!command` whose process exit was observed: its `failed` is `exitCode !== 0` and the reply carries `exitCode`, from `onProcessExit` through `packPiShellResult`, never parsed from the output (#253).
86
86
  - Pi's bridge executes `/tool` only for the verified owner (`verifiedOwner()`: the claimed pid with its `processSignature`; a headless owner is pinned from the spawned process once `get_state` proved its session) with the current `sessionId` and turn `generation`, and admits `/budget` only for that owner and generation, checked again after the awaited admission. Refuse anything else before execution. `tool_abort` aborts that pending call, or fences its id when it arrives before the call (64 ids a turn, then every further call of that turn). A person's `!command` (`purpose: "idle_user_bash"`) is taken only in TUI mode from an idle owner on its one-use reservation, and it alone skips `piPermit`: never widen that to a model's bash call (#253).
@@ -112,7 +112,8 @@ Scope: the Codex, ACP and Pi adapters and the Pi extension (turn `generation` an
112
112
  - Kimi TUI completion facts are admitted only on compat `kimi-tui` (2.5.2) through `native_hook_launch`, a launch-scoped plugin under the native home, and `KIMI_TUI_FACTS_HOOK`. The launcher uses async spawn so its control socket stays live, previews plugin writes, and cleans only that launch's files. A different launch's plugin is replaced only after a new begin succeeds and its recorded owner pid+signature is proven gone; an active or unknown owner is never replaced, including another project's launch sharing the native home. Replacement and cleanup share one fail-closed lock per native home; a stale lock is never removed automatically. Begin or setup failure prints the cause and next step and launches the plain TUI without completion receipts. Quiet background/final-turn re-reads back off from 250 ms to 1 s and the Stop deadline also arms them. `turn.prompt` proves origin, `turn.ended` proves the outcome; `prompt.completed`/`aborted` are optional consistency rows, and notification turns may omit prompt ids. Never treat Stop, a final message chunk, a heartbeat or an empty observed task list as proof. Background inventory is read from every agent's task files and stays unknown on any malformed or unreadable row. Final-turn and inventory re-reads must not emit prompt, response, error, task command or title text. Native-person results are private. StopFailure is failed only after final-state readback, Interrupt is quiet, and launcher end/socket loss creates at most one interrupted result.
113
113
  - Empty-inbox polling advice (#681, `InboxPolling` in `src/hub/inbox-polling.ts`) is advisory: never refuse or delay an inbox read for it. The daemon computes it only for a pull-only peer after the pull completed, so a throw drops the advice, never the pulled envelopes; it counts only empty reads with no open, non-backlog task as owner or reviewer, and an assignment resets it. The plugin shows `[polling detected]` only for a well-formed `pollingAdvice` (count >= 3, minutes 0 to 10).
114
114
  - TUI launchers (Kimi, Jcode, agy) write the plugin bundle the hub reports in `status` into their MCP entry, and the CLI's own copy only when the hub reports none (#502). Only the Jcode start path checks the entry against the daemon's own `SERVER_JS` (`jcodeMcpReady`); Kimi TUI admission does not compare it.
115
- - Native CLI versions (#691): every version gate asks `assessVersion` in `src/adapters/compat.ts`; no other file holds a version constant. Add a version to `verified` only with a receipt in `docs/verification/`, and point the entry's `receipt` at the receipt a later version should repeat (the daily `scripts/agent-compat-watch.ts` names it, #849); a `line` is for contract gates only (an isolation gate never assumes a newer version compatible); the person's `ahub agents trust` admits one exact version on this machine and never skips a runtime proof; `ahub agents` with anything but `--json` stays `console` in `classifyPeerCommand` and refused in `liveTestRefusal` (`src/cli/identity.ts`). A version refusal starts with `VERSION_REFUSAL` and names only versions and the trust command; keep it that way so the daemon may show it.
115
+ - Native CLI versions (#691): every version gate asks `assessVersion` in `src/adapters/compat.ts`; no other file holds a version constant. Add a version to `verified` only with a receipt in `docs/verification/`, and point the entry's `receipt` at the receipt a later version should repeat (the daily `scripts/agent-compat-watch.ts` names it, #849); a `line` is for contract gates only (an isolation gate never assumes a newer version compatible); the person's `ahub agents trust` admits one exact version on this machine and never skips a runtime proof; `ahub agents` with anything but `--json` stays `console` in `classifyPeerCommand` and refused in `liveTestRefusal` (`src/cli/identity.ts`). A version refusal starts with `VERSION_REFUSAL` and names only versions and the trust command; keep it that way so the daemon may show it. The hub-owned Pi pin reads `COMPAT.pi.verified` and holds no constant of its own: `readPiPin` (`src/pi/pin.ts`) accepts `<hub home>/agents/pi/current.json` only for a verified version with a valid integrity string in user-owned, non-writable directories, and `ahub agents install pi` (person only, `src/pi/install.ts`) defaults to the newest verified version, so a Pi version added to `verified` needs a receipt that covers the packaged install.
116
+ - On a `COMPAT.verified` change, update the version lists in `docs/operations.md` and any spec sentence that names those versions in the same PR.
116
117
  - Jcode (#529): accept the native version only through `jcodeVersionSupported` (compat `jcode` line, 0.98.0 up to 1.1.0), in the daemon preflight (`jcodeVersionAsync`: off the event loop, owning its process group, output capped at 64 KiB), the doctor probe (`jcodeVersion`) and ACP `expectedAgent`; never pin the minor, and lower `line.below` when a release breaks the contract. Every owned jcode process (probe, serve, ACP and TUI) gets `JCODE_OWNED_ENV`, and the private socket name ends in `.sock`.
117
118
  - Jcode TUI (#464): use only the current owned launch's top-level `--socket`/`--resume` tuple after native saved-session proof. Prove the save only through `savedSession` (no-follow, single-link regular file, size-bounded, unchanged across the read, its `id` and `messages` matching) and refuse a requested model, provider profile or session that differs from the running launch with `JcodeOptionMismatch`, which names the flag, never its value (#559); both the launcher and `--print-command` report it through `refuseNamedOption` (#574). Hand the tuple only to a person's launcher through `native_tui_launch` (admission: `daemon.md`); a refused tuple throws `JcodeTuiRefusal` with one closed `JcodeTuiRefusalCode` per check, never a path, socket, session or launch id. The launcher turns a returned code into words only through `jcodeTuiCauseMessage` (#1093). The headless-after-recovery hint is `JcodePeer.statusNotice` (fixed `JCODE_HEADLESS_AFTER_RECOVERY`), shown only after a crash report or a resumed session and gone once a ready TUI launch was served (`tuiServed`); previews (`--dry-run`, or `--print-command` from anyone but a person) start nothing and never resolve it. Never synthesize a save or prompt to induce one. Ctrl-C during the save wait and frontend close retain ACP; preserve session/load identity refusal and headless owned recovery metadata, and never record the TUI as a managed terminal (`recordTerminalLaunch`): Jcode has no terminal recovery adapter (#564).
118
119
  - Jcode steer (#572): reach a busy owned jcode only through `nativeSteer` on its private server socket, never by cancelling its turn: `ping` must list `soft_interrupt_ids`, `subscribe` uses `target_session_id` (the ACP session id) and `continue_on_disconnect`, `state` must report `is_processing` (a soft interrupt sent while idle starts a turn by itself), then `soft_interrupt {content, urgent: false, client_id}`. `canSend` rechecks the captured turn, busy state, owned server process, socket identity and session immediately before the write. Every refusal before the send is `failed_safe` with nothing sent; a sent message that is not acknowledged, or whose turn cannot be confirmed, is `needs_review`, never `failed_safe` or `completed`. Read `currentTurn()` before sending and adopt only through `AcpPeer.adoptIntoTurn(turn, ...)`, which refuses a different or ended turn; adopted senders join the turn answer's audience (`replyParent` and `replyAudience` over the turn envelopes, so the hop cap holds), and each steer receipt is `accepted` at once and settles with the turn (`completed` on a normal end, `needs_review` on a cancel, failure, stop or watchdog). Headless Kimi and Qwen have no steer: status reports their waiting important messages only through `importantWaitingStatus` (`src/hub/daemon.ts`) past `budget.stale_min`. A turn that ends and restarts between jcode's `state` reply and the write still receives the message, held `needs_review` and adopted into nobody: keep that ceiling until upstream offers an atomic per-turn steer, and never add a cancel-to-deliver path.
@@ -29,8 +29,8 @@ Scope: quota and native context readings, checkpoints, pause, handoff and resume
29
29
  - `Budget.report` resolves the reporter and its account through `hooks.definitionOf` (the daemon's startup-bound project catalog; builtin-only when absent) and skips `user`, `hub` and a registered kind, configured and external module kinds included, with no `budget` block or with `budget.quotaExempt` (only local); an unregistered id keeps quota accounting. `budget.instrumented` (execution budget) never exempts quota.
30
30
 
31
31
  - Key quota readings, pause records, overrides, checkpoints and handoffs by the canonical account (`hooks.account`, idempotent); telemetry keeps the reporter id and native context occupancy stays per instance. `instanceBudgetHooks` fans pause, resume, checkpoint and handoff out to every member, and `canHandOff` excludes the paused account's siblings. Startup normalization merges old alias pause rows without dropping a row or marking an unfinished handoff done. A manual pause stays per member. Reviewer and headless implementer variants keep their base kind's `budget.account`.
32
- - Declared accounts (#1810, `src/hub/accounts.ts`): resolve a peer's budget key only through the daemon's `accountOf` (`accountKeyFor`): the bare kind for the default label and `<kind>:<label>` for a declared one, so a project without `accounts` keeps its keys. A home path stays in `config.local.json` and the `accounts.ts` return values; events, logs, status and CLI output carry labels only (`labelForHome`). With `budget.cross_account_handoff = false`, same-kind peers on other labels are siblings (`handoffSiblings`, and `canHandOff` compares the base kind), and a move across accounts writes one `budget_handoff` event with peer ids and labels only (`handoffEvents`).
33
- - Release-cut quota admission (`releaseQuotaSnapshot` in `src/hub/daemon.ts`, #481 S11): an account has a quota source only when one of its members' definitions has `budget.reader`, or `budget.resetSoftTokensOnResume` with `kimi_tokens_5h > 0`. Without a source a registered account is reported `no quota source` and never defers; with one, an unknown, stale or below-gate reading defers. Manual and budget-record pauses defer for every attached peer.
32
+ - Declared accounts (#1810, `src/hub/accounts.ts`): resolve a peer's budget key only through the daemon's `accountOf` (`accountKeyFor`): `<kind>:<label>` for a named account, `<kind>:default` for the default account of a kind with declared accounts (#1941), and the bare kind otherwise. A home path stays in `config.local.json` and the `accounts.ts` return values; events, logs, status and CLI output carry labels only (`labelForHome`). With `budget.cross_account_handoff = false`, same-kind peers on other labels are siblings (`handoffSiblings`, and `canHandOff` compares the base kind), and a move across accounts writes one `budget_handoff` event with peer ids and labels only (`handoffEvents`).
33
+ - Release-cut quota admission (`releaseQuotaSnapshot` in `src/hub/daemon.ts`, #481 S11): resolve pauses and headroom with the exact `accountOf(id)` key. Find source capability by base kind, including offline base definitions. A kind has a source when one of its definitions has `budget.reader`, or `budget.resetSoftTokensOnResume` with `kimi_tokens_5h > 0`. Without a source a registered account is reported `no quota source` and never defers; with one, an unknown, stale or below-gate reading defers. Manual and budget-record pauses defer for every attached peer.
34
34
 
35
35
  - Window kinds (#285 AC6, AC8): classify a window only through `windowKind` (`src/hub/window-kind.ts`: `native`, `count`, `manual`); a reporter that knows its kind passes it (`ahub budget set` is `manual`, the Kimi count `count`). Readings are kept per window id and kind, never overwriting each other. The gate and `headroom` act only on `gating()`: a fresh `manual` reading replaces the others for its window, and the hub `count` never gates while a fresh `native` or `manual` reading exists. A hard refusal drops the `manual` reading of each window it reports. `status()` lists the gating reading first and marks the information-only fresh ones `superseded`; never gate or route from `status()` windows.
36
36
  - No-quota notes (#285 AC6, AC7): a peer whose definition sets `budget.noQuotaReason` (Pi, local) gets a hub 5 h token count (`hubTokenWindows`, replayed at start through `TokenWindow.seed`) as information only, never a window, a meter or a gate. Build the notes in `ahub budget`, the console and the dashboard only through `budgetNotes` (`src/hub/budget-notes.ts`) from the definition and the counters, and Kimi's source state only from `KimiUsage.status()`: a rule and a count, never a path, a session id or log text.
@@ -50,6 +50,7 @@ Scope: delivery, digests and condensation, reply addressing, priority and limits
50
50
  - `resolveDelivery` (#713): a `queued` delivery was never handed to the peer, and a `failed` one was refused before it ran (#1103), so a busy peer blocks discarding neither; `dispatching` stays refused as `active delivery`, and so does `accepted` except for its own explicit channel's completed/discard (#1172, below); unrelated resolutions keep the busy fence. Only the recipient may explicitly complete/discard its own `needs_review` row, or for a peer with `acceptedSettlement: "explicit"` its own `accepted` row, through `resolveOwnDelivery` with an observed revision and reason (#1079), recording the peer actor through the existing journal audit. Another peer, remote-room disposition and active dispatching/accepted row refuse; this never replays the originals. Every other operator resolution stays fenced while busy. `resolveOwnDelivery` refuses with its own `PreEffectToolRefusal`, which names the cause and the next step, never through `resolutionRefusal`. A row that carries an invocation stays person-only (#1112). The daemon names the refusal from a closed list (`resolutionRefusal`), never from free error text. `queue discard --peer` goes through `resolveDelivery` row by row, reading each row's current revision just before its discard, never the revision listed at the start. Without `--state` it takes the peer's `queued` rows and its unsettled `failed` rows (wire `states`, sent only to a hub whose `features` list `queue_discard_states`; `needs_review` still needs an explicit `--state`). A row a resolution already settled (`settledIds()`) is history: `queue list` hides it unless `all`, and resolving it again is refused as `already resolved by <action>`, never `stale revision` (#1098, #1103).
51
51
  - Accepted channel deliveries (#1172): an `accepted` receipt means the channel transport took the notification, never that the session handled it. `expireAcceptedDeliveries`, run from the daemon's 5 s invocation sweep with the host-only `DaemonOptions.acceptedSettlementNow` clock, moves an explicit channel's `accepted` row older than `bus.accepted_settle_ms` (`acceptedSettleMs`, default 10 min) to `needs_review` with `ACCEPTED_SETTLE_TIMEOUT_REASON` under a revision fence. It holds the peer, routes an invocation through `onInvocationUncertain` and never replays. A repeated `accepted` receipt never renews the deadline. `settleSupersededDeliveries` and supervision skip timeout rows; an important, task or review timeout gets one ids-only conductor status notice unless `conductor.feed` is `off`. The explicit channel's `inbox` reply, a refused one included, carries `held` metadata for its own accepted and `needs_review` rows (`heldDeliveryHints(peer, true)`), or `{ unavailable: true }`, never an empty claim.
52
52
  - Review provenance (#1056): `reviewResponse` runs on every publish (`publishResult` and the daemon's channel `send`). It strips a caller's `refs.reviewPackage`/`refs.reviewResponse` and stamps a host-derived `reviewResponse` only on a chat or status that answers a review-scoped parent (`lastDelivery`, `lastPulled`, the bounded `reviewParents`, or `reviewObserverScope`, whose failure counts as scoped); never trust a peer's marker or match content. `beforeReviewInputHandoff` runs before every native handoff (steer, drain, pull); a throw leaves the work queued as `ReviewInputHandoffError` and is never a storage error. `publishReviewEnvelope` republishes a saved package only when `reviewEnvelopeStatus` is `absent`, refuses `failed`, `discarded` and `unknown`, and never replays a published one. Terminal pruning keeps hub review-package rows (`refs.reviewPackage` `review-*`). The bus constructor restores from `transportSnapshot()`; only recovery uses the strict `snapshot()`, which refuses malformed review provenance.
53
+ - Local `needs_review` rows (#1946): only a row carrying the journaled `holdsSelf` mark holds only itself. `AcpPeer.stop()` with no requested reason is the one writer (`DeliveryReceipt.holdsSelf`, column `deliveries.holds_self`); the control receipt path builds its own receipt and never copies the mark, and no reason text decides anything (a channel receipt, an ACP prompt error or a failed turn can write any text). Every other local `needs_review` row (requested stop, accepted-settle timeout, turn aborted, adapter failure, `REVIEWER_FALLBACK_UNCONFIRMED` #804, any invocation) holds the peer wide exactly as before, and a room row never did. The constructor scan, `restore()`, `queueSummary`, `refreshRecoveryHold` and the receipt path all decide it in the one `holdsPeerWide` in `bus.ts`. Add a new exception there, never at a call site. The next delivery carries the body-free held hint through `prefaceHeld`, replacing a pending one; `SupervisionFeed.needsReview` with options says the conductor may run `ahub queue resolve` and repeats once after `bus.hold_notice_ms`, while a call without options keeps the old person notice. Never replay or settle the row for this.
53
54
  - Room delivery rows (#1204): a remote (`remoteId`) `needs_review` row holds its peer only when it carries an invocation; an ordinary room chat uncertainty never blocks later queued work. Settle, requeue, hold or resume a remote row only through the room adapter's host ports (`settleRemoteReceipt`, `requeueRemoteNotSent`, `holdRemoteMissingIntent`, `holdInvalidatedRemoteOutcome`, `holdRemoteEpochRotated`, `resumeRemotePending`). Each is bound to the current adapter, room and member, revision-fenced and refused after a person disposition. `deliveryReceipt` never calls `completeDelivered` or `deliveryFailed` for a remote peer, and an uncertain invocation stays person-only. At journal open, `recoverInterrupted` keeps an active single-envelope, non-invocation remote row active only while the bus snapshot still holds its room, member and an unexpired queue deadline; every other `dispatching`/`accepted` row becomes `needs_review`.
54
55
  - Closed publication (#1222): once the `Bus` is closed, `publish` returns `{ targets: [] }` before touching the journal or observers, so a late room or presence publication after shutdown writes nothing; a live storage error still propagates. Keep the closed check first when you touch the publish path.
55
56
 
@@ -30,7 +30,7 @@
30
30
 
31
31
  - Console attention navigation selects a delivery only by an exact visible row id. A missing id or row prints read-only guidance; never select by peer or fall back to the first Queue row.
32
32
 
33
- Scope: the operator console, control WS and its protocol, state files, the dashboard listener and settings, the Claude channel's reconnect, `ahub setup`, git snapshots, upgrade and recovery. Read before editing `src/adapters/definitions/native-recovery*.ts`, `src/adapters/definitions/native-policy-aux.ts`, `src/adapters/definitions/native-config-*.ts`, `src/adapters/definitions/native-cli-*.ts`, `src/cli/console.ts`, `src/cli/console-state.ts`, `src/cli/report-layout.ts`, `src/cli/console-versions.ts`, `src/cli/attention.ts`, `src/ui/needs.ts`, `src/hub/daemon.ts`, `src/hub/control/scope.ts`, `src/hub/control/sdlc-messages.ts`, `src/hub/control/native-messages.ts`, `src/hub/control/recovery-messages.ts`, `src/hub/control/recovery-operation.ts`, `src/hub/control/ui-actions.ts`, `src/hub/control/hub-tools.ts`, `src/hub/control/board-messages.ts`, `src/hub/control/hub-tool-helpers.ts`, `src/hub/control/task-ops.ts`, `src/hub/control/task-ops-more.ts`, `src/hub/config.ts`, `src/hub/ui.ts`, `src/hub/settings.ts`, `src/hub/control-client.ts`, `src/adapters/claude-channel.ts`, `src/hub/restart.ts`, `src/hub/recovery-store.ts`, `src/hub/snapshots.ts`, `src/hub/manager.ts`, `src/hub/lifecycle.ts`, the runtime selection and retention modules (`src/hub/project-runtime-state.ts`, `src/hub/project-runtime.ts`, `src/hub/runtime-capture-prune.ts`, `src/hub/runtime-prune-health.ts`, `src/hub/registry.ts`), `src/hub/crash.ts`, `src/hub/start-mode.ts`, `src/hub/terminal-open.ts`, `src/hub/recovery-error.ts`, `src/hub/db-timeout.ts`, `src/hub/db-schema.ts`, `src/hub/protocol-window.ts`, `src/hub/config-reload.ts`, `src/hub/config-apply.ts`, `src/hub/config-tier.ts`, `src/hub/config-edit.ts`, `src/hub/config-edit-host.ts`, `src/hub/claude-launch-proof.ts`, the session and provenance modules (`src/hub/session-identity.ts`, `src/hub/provenance.ts`, `src/hub/channel-project.ts`), `src/hub/recovery-continuity.ts`, `src/hub/recovery-kept-roster.ts`, `src/hub/upgrade-session-contract.ts`, `src/hub/channel-project-base.ts`, `src/cli/recovery-presentation-options.ts`, `src/cli/setup.ts`, the default agent set (`src/hub/start-agents.ts`, `src/cli/start-agents-run.ts`), `src/cli/upgrade*.ts`, `src/cli/runtime-version-warning.ts`, `src/cli/terminal-recovery.ts`, `src/cli/recovery-package.ts`, `src/cli/facts-hook.ts`, `src/hub/usage.ts`, `src/hub/memory-profile.ts`, the memory code modules (`src/hub/memory-symbols.ts`, `src/hub/memory-code-overlay.ts`, `src/hub/memory-code-head.ts`, `src/hub/memory-stale-anchors.ts`, `src/cli/memory.ts`), the task brief host (`src/memory/brief.ts`, `src/hub/memory-plan-guard.ts`), `src/hub/native-hook-launch.ts`, `src/cli/output.ts`, `src/cli/warn-line.ts`, `src/ui/index.html`, the dashboard view models (`src/ui/roadmap-model.ts`, `src/ui/overview-model.ts`), the acon plugin (`src/ui/plugin.ts`, `src/ui/office-space.ts`, `src/cli/acon-register.ts`), `ahub study` (`src/cli/study.ts`, `src/cli/study-output.ts`), `src/hub/task-code-group.ts` (dashboard Code group), the agent drift sweep (`src/hub/agent-drift.ts`, `src/cli/agents.ts`) or the instance modules (`src/hub/instances.ts`, `src/hub/instance-config.ts`, `src/hub/instance-execution.ts`), the shared host (`src/hub/host.ts`), the MCP endpoint and its bridge core (`src/hub/mcp-endpoint.ts`, `src/hub/mcp-bridge-core.ts`), the Orca pane watch (`src/hub/orca-state.ts`), the light CLI path (`src/cli/light-dispatch.ts`), or before adding a native peer.
33
+ Scope: the operator console, control WS and its protocol, state files, the dashboard listener and settings, the Claude channel's reconnect, `ahub setup`, git snapshots, upgrade and recovery. Read before editing `src/adapters/definitions/native-recovery*.ts`, `src/adapters/definitions/native-policy-aux.ts`, `src/adapters/definitions/native-config-*.ts`, `src/adapters/definitions/native-cli-*.ts`, `src/cli/console.ts`, `src/cli/console-state.ts`, `src/cli/report-layout.ts`, `src/cli/console-versions.ts`, `src/cli/attention.ts`, `src/ui/needs.ts`, `src/hub/daemon.ts`, `src/hub/control/scope.ts`, `src/hub/control/sdlc-messages.ts`, `src/hub/control/native-messages.ts`, `src/hub/control/recovery-messages.ts`, `src/hub/control/recovery-operation.ts`, `src/hub/control/dispatch.ts`, `src/hub/control/dashboard-messages.ts`, `src/hub/control/delivery-messages.ts`, `src/hub/control/operations-messages.ts`, `src/hub/control/peer-messages.ts`, `src/hub/control/ui-actions.ts`, `src/hub/control/hub-tools.ts`, `src/hub/control/board-messages.ts`, `src/hub/control/hub-tool-helpers.ts`, `src/hub/control/task-ops.ts`, `src/hub/control/task-ops-more.ts`, `src/hub/config.ts`, `src/hub/ui.ts`, `src/hub/settings.ts`, `src/hub/control-client.ts`, `src/adapters/claude-channel.ts`, `src/hub/restart.ts`, `src/hub/recovery-store.ts`, `src/hub/snapshots.ts`, `src/hub/manager.ts`, `src/hub/lifecycle.ts`, the runtime selection and retention modules (`src/hub/project-runtime-state.ts`, `src/hub/project-runtime.ts`, `src/hub/runtime-capture-prune.ts`, `src/hub/runtime-prune-health.ts`, `src/hub/registry.ts`), `src/hub/crash.ts`, `src/hub/start-mode.ts`, `src/hub/terminal-open.ts`, `src/hub/recovery-error.ts`, `src/hub/db-timeout.ts`, `src/hub/db-schema.ts`, `src/hub/protocol-window.ts`, `src/hub/config-reload.ts`, `src/hub/config-apply.ts`, `src/hub/config-tier.ts`, `src/hub/config-edit.ts`, `src/hub/config-edit-host.ts`, `src/hub/claude-launch-proof.ts`, the session and provenance modules (`src/hub/session-identity.ts`, `src/hub/provenance.ts`, `src/hub/channel-project.ts`), `src/hub/recovery-continuity.ts`, `src/hub/recovery-kept-roster.ts`, `src/hub/upgrade-session-contract.ts`, `src/hub/channel-project-base.ts`, `src/cli/recovery-presentation-options.ts`, `src/cli/setup.ts`, the default agent set (`src/hub/start-agents.ts`, `src/cli/start-agents-run.ts`), `src/cli/upgrade*.ts`, `src/cli/runtime-version-warning.ts`, `src/cli/terminal-recovery.ts`, `src/cli/recovery-package.ts`, `src/cli/facts-hook.ts`, `src/hub/usage.ts`, `src/hub/memory-profile.ts`, the memory code modules (`src/hub/memory-symbols.ts`, `src/hub/memory-code-overlay.ts`, `src/hub/memory-code-head.ts`, `src/hub/memory-stale-anchors.ts`, `src/cli/memory.ts`), the task brief host (`src/memory/brief.ts`, `src/hub/memory-plan-guard.ts`), `src/hub/native-hook-launch.ts`, `src/cli/output.ts`, `src/cli/warn-line.ts`, `src/ui/index.html`, the dashboard view models (`src/ui/roadmap-model.ts`, `src/ui/overview-model.ts`), the acon plugin (`src/ui/plugin.ts`, `src/ui/office-space.ts`, `src/cli/acon-register.ts`), `ahub study` (`src/cli/study.ts`, `src/cli/study-output.ts`), `src/hub/task-code-group.ts` (dashboard Code group), the agent drift sweep (`src/hub/agent-drift.ts`, `src/cli/agents.ts`) or the instance modules (`src/hub/instances.ts`, `src/hub/instance-config.ts`, `src/hub/instance-execution.ts`), the shared host (`src/hub/host.ts`), the MCP endpoint and its bridge core (`src/hub/mcp-endpoint.ts`, `src/hub/mcp-bridge-core.ts`), the Orca pane watch (`src/hub/orca-state.ts`), the light CLI path (`src/cli/light-dispatch.ts`), or before adding a native peer.
34
34
  - Control scope (#1830 S2a): the `hub_*` tool dispatch (`taskOpBody`) lives in `src/hub/control/` and reads the daemon only through `DaemonScope` (`scope.ts`), the one getter-backed object `daemonScope` in `startDaemon`; never copy a field or add module-level state there. A name the moved code must assign gets a setter on that object in the same change, and the `readonly` on its field is dropped. `taskOpBody` in `daemon.ts` stays a same-signature wrapper, so callers and tests are unchanged.
35
35
 
36
36
  - The plugin bundle is installed apart from the daemon. Breaking a control WS message contract bumps `PROTOCOL` in `control-client.ts`; a new request answered as unknown or an optional field preserves it, as does additive optional public task metadata in `ui_snapshot` that older clients ignore (such as `deps` in #246). When `PROTOCOL` advances, the release PR adds a row to `BRIDGE_PROTOCOL_RELEASES` (`src/hub/protocol-window.ts`), leaves the prior row frozen and runs `bun scripts/bridge-protocol-table.ts --write`.
@@ -15,6 +15,6 @@ Scope: the model relay and its journal, the hub's own inference and its slots, O
15
15
  - Relay cooldown policy and journal size (`model_relay.*`, read through `modelOperationalReaders`, #984) are passed only when a relay is constructed, and `inference.backoff_min` only when `Inference` is constructed. Both are restart-bound: a reload never rewrites a running relay's cooldowns or journal, or an existing backoff deadline.
16
16
  - MLX owner and generation identity read `ps lstart` with LC_ALL=C/TZ=UTC pinned (#177): unpinned, a record written under one environment reads as a foreign process under another, and the fail-closed paths would refuse the hub's own server.
17
17
 
18
- - Optional adec `decision` routes (#554) default off and support shadow only; reject enforce at load with the #554 follow-up and do not keep an application or gateway effort path. Shadow must preserve the recorded stage model, effort and conversation. Send only bounded host-screened evidence after positive campus admission for sensitive turns; sensitive evidence is dimensions only, and remote/review-observer-excluded turns skip the service. Re-read current board/turn privacy and observer facts across awaits and before service HTTP effects and route metadata emission; changed or unavailable authority refuses the stale turn, never a model fallback around that refusal. Keep one opaque user-turn id through the tool loop; let adec recheck its pins and hard rules, rather than caching valid picks in the hub. Validate returned pairs against the route list, retain the heuristic on client failures/no_candidate, and keep evidence, arguments, secrets and service error prose out of route events. Never route PII screening, pure peer assignment or escalation authority through this service. A stage route asks it only through `ambiguousStage` (`classifier = "decision"`, `ambiguous_band` default `0.05`, `abs(score - confidence_threshold) <= band`): membership decides only whether the question is asked, the answer is recorded and changes no tier, the two tiers with effort `none` are the only options, and `ambiguous_band = 0` asks nothing.
18
+ - Optional adec `decision` routes (#554) default off. Allow enforce only on a person-configured decision route in routing.toml. Apply only a validated non-abstaining alias/effort pair and use the offered current pair on failure. Recheck the turn and authority before gateway execution. Shadow must preserve the recorded stage model, effort and conversation. Send only bounded host-screened evidence after positive campus admission for sensitive turns; sensitive evidence is dimensions only, and remote/review-observer-excluded turns skip the service. Re-read current board/turn privacy and observer facts across awaits and before service HTTP effects and route metadata emission; changed or unavailable authority refuses the stale turn, never a model fallback around that refusal. Keep one opaque user-turn id through the tool loop; let adec recheck its pins and hard rules, rather than caching valid picks in the hub. Validate returned pairs against the route list, retain the heuristic on client failures/no_candidate, and keep evidence, arguments, secrets and service error prose out of route events. Never route PII screening, pure peer assignment or escalation authority through this service. A stage route asks it only through `ambiguousStage` (`classifier = "decision"`, `ambiguous_band` default `0.05`, `abs(score - confidence_threshold) <= band`): membership decides only whether the question is asked, the answer is recorded and changes no tier, the two tiers with effort `none` are the only options, and `ambiguous_band = 0` asks nothing.
19
19
  - R2 host model/effort choices for `plan_execute`, `advisor` and `escalation` remain default-off and shadow-only. They are suggestions only: keep the plan phase, advisor/escalation trigger and verdict, privacy/currentness fences, and actual fallback execution in the hub; do not add effort application, authority transfer, or phase/purpose event fields. Judge-choice route metadata uses only the checked `decisionTarget: "judge"` marker and remains outside executor label/progress/usage accounting. The ADEc templates are placeholders with `onPrem: false` until a person verifies the serving location; no live or gain claim follows from fixtures.
20
20
  - The offline triage evaluation (`scripts/decision-eval.ts`, #554 AC5) is a person-run leg, never CI. It serializes `hub.db` from a read-only connection into one consistent image and reads that copy (never separate `hub.db`/`-wal`/`-shm` copies, which a checkpointing writer can leave on different WAL generations), keeps only planner-classified non-PII rows (no `triaged` or `class defaulted` history, no `pii`/`pii_path` signal, public text), and compares `Inference.triage` against a loopback adec `/v1/route` or `/v1/systemone`, each adec turn id carrying a fresh per-run id so no earlier pin is reused. It is evidence for D5 only: wiring a decider into `Tasks.triage`, `assign()` or the PII screen is a separate decision, and a change here never touches them.
@@ -1,6 +1,6 @@
1
1
  # Tests
2
2
 
3
- Scope: tests, fakes and the test gate. Read before adding or changing a test or fake under `test/` or `src/adapters/conformance/`, or editing `scripts/check.sh`, `scripts/hang-watch.sh`, `scripts/progress-tee.sh`, `scripts/seeded-check.ts`, `scripts/seeds.json`, `scripts/lib/ts-ast.ts`, `scripts/changed-tests.mjs`, `scripts/check-closing-refs.mjs`, `.github/workflows/closing-refs.yml`, `scripts/release-prepare.ts`, `scripts/release-tag.ts` or `scripts/lib/release-plan.ts`.
3
+ Scope: tests, fakes and the test gate. Read before adding or changing a test or fake under `test/` or `src/adapters/conformance/`, or editing `scripts/check.sh`, `scripts/hang-watch.sh`, `scripts/progress-tee.sh`, `scripts/seeded-check.ts`, `scripts/seeds.json`, `scripts/lib/ts-ast.ts`, `scripts/changed-tests.mjs`, `.github/workflows/closing-refs.yml`, `scripts/release-prepare.ts`, `scripts/release-tag.ts` or `scripts/lib/release-plan.ts`.
4
4
 
5
5
  - A fake's gated action that never sees its gate skips the action; never fall through to a late, unsynchronized action. Owned-group tests inject `AcpOwnedGroupPorts`; a test never signals a process group it did not spawn.
6
6
  - When a production closure gains a dependency, find its VM fixtures by the closure and its callers as well as the new dependency name. Bind every transitive host port and actual imported policy helper, including asynchronous read paths, and run each affected extracted closure. When changing question-tool observer exclusions in `src/hub/daemon.ts`, bind the actual `QUESTION_TOOLS` import in `test/review-privacy-wiring.test.ts` and run that test alongside the question tests. Keep native identity checks on real unstarted instances; never replace a policy predicate with an always-true stub or weaken existing assertions to accommodate a moved dependency.
@@ -34,8 +34,8 @@ Scope: tests, fakes and the test gate. Read before adding or changing a test or
34
34
  - A request that a test expects a stop or shutdown to cut gets its rejection handler where the request is created, never after the awaited teardown: a late `catch` races the reset and the run fails on an unhandled rejection.
35
35
  - Run `bun scripts/seeded-check.ts` before reporting the seeded-guard gate complete. After changing seeded guard logic, run its affected seeds even when search-anchor counts are unchanged. Put asynchronous calls inside `resolves`/`rejects` expectations so a mutated refusal fails a named assertion. Keep the `scripts/seeds.json` cases sequential; require the same named test green before its seeded assertion fails. Seed rot, survivors, setup/compiler failures, timeout/watchdog termination and process leaks fail the gate. A change that moves or rewrites a line a `scripts/seeds.json` case searches for updates that case's search and replacement in the same PR (seed rot fails the gate), keeping its mutant effect and named test. `scripts/check.sh`, `--changed` included, never runs the seeds, so rot shows only in CI's `seeded guards` job (the `profile-cli-dry-flags` anchor needed a search-text update in both #1100 and #1110, 2026-11-02). Before pushing a change to a file `scripts/seeds.json` names, confirm every anchor still matches once: `bun -e 'const f=require("fs");for(const x of JSON.parse(f.readFileSync("scripts/seeds.json","utf8")).seeds){const n=f.readFileSync(x.file,"utf8").split(x.search).length-1;if(n!==1)console.log("seed rot:",x.id,n)}'` prints nothing when every anchor is intact. Never run the full seed runner from a unit test or mutate the source checkout; inspect preserved failed fixtures before removing them. CI runs it as four sequential Linux shards (`--shard i/4`) beside the ordinary check, separately from `scripts/check.sh`; the required `seeded guards` job passes only when every shard passed, or when the decision job reused a verified identical-tree full gate (`admission == 'reuse'`). Keep that job name: branch protection and `scripts/ci-gates.mjs` read it (#457). On seed rot the checker names the anchor's symbol at a base commit and where it is now (`seedRotContext`): `--base <commit>` sets that base (CI passes the PR base from a `fetch-depth: 0` checkout; keep both), and without it the base is `merge-base origin/main HEAD`. The context is evidence only: it never relaxes the one exact match, and an unavailable base says so instead of guessing.
36
36
  - `scripts/lib/ts-ast.ts` is the one TypeScript AST helper for scripts and source-scanning tests (`parseSource`, `callSites`, `symbolSpans`, `enclosingSymbol`, `findSymbol`; inline HTML scripts keep their offsets). It gives lexical locations only, never resolved call edges, and stays dev tooling: never import it from `src/`.
37
- - The native branch ratchet (`test/daemon-native-branches.json`) is reviewed data, never regenerated by a test (rule: `adapters.md`). `test/daemon-native-proof-gates.test.ts` runs daemon code cut out of `src/hub/daemon.ts` by its text, from ` function frontendProxyState(` to ` const manualPaused =` and from ` async function changePermission(` to ` async function permissionChange(`, and the ` const isSupportedPeer =` and ` const readOnlyPeer =` bindings: renaming, reordering or reindenting them updates the test in the same PR. `test/peer-frontend-proxy.test.ts` reads `confirmPermissionDefault` from `src/hub/control/recovery-messages.ts` and binds its daemon ports through scope. Test Claude launch permission proof through `createClaudeLaunchProof` in `src/hub/claude-launch-proof.ts`; never restore the removed daemon wrapper just to slice it in a fixture.
38
- - The #1057 worktree tests cut source by its text: `test/worktree-shelf.test.ts` reads `src/hub/daemon.ts` from `case "worktrees":` to `// #604 (agent-hub#1030)`; `test/worktree-panel.test.ts` reads it from `async function worktreeShelf(` and `function worktreesView(` to `async function uiMemorySnapshot(`, `src/ui/index.html` from `function renderWorktrees(shelf)` to `function renderBench(bench)` (plus the helper lines it names) and `src/hub/sdlc.ts` from `export async function readSdlcPr(` to `export async function readSdlcPrHead(`. Moving, renaming or reordering those lines updates the test in the same PR. The removal-module lists pinned there and in `test/worktree-tidy.test.ts` (`src/hub/code-facts.ts`, `src/hub/task-worktree.ts`, `src/cli/worktree-tidy.ts`) are never extended to let a new removal pass (rule: `daemon.md`).
37
+ - The native branch ratchet (`test/daemon-native-branches.json`) is reviewed data, never regenerated by a test (rule: `adapters.md`). `test/daemon-native-proof-gates.test.ts` runs daemon code cut out of `src/hub/daemon.ts` by its text, from ` function frontendProxyState(` to ` const manualPaused =` and from ` async function changePermission(` to ` async function permissionChange(`, and the ` const isSupportedPeer =` and ` const readOnlyPeer =` bindings: renaming, reordering or reindenting them updates the test in the same PR. `test/peer-frontend-proxy.test.ts` reads `confirmPermissionDefault` from `src/hub/control/recovery-messages.ts` and binds its daemon ports through scope. Bind the extracted `budgetRenewMessage` scope in `test/daemon-native-proof-gates.test.ts`. Test Claude launch permission proof through `createClaudeLaunchProof` in `src/hub/claude-launch-proof.ts`; never restore the removed daemon wrapper just to slice it in a fixture.
38
+ - The #1057 worktree tests cut source by its text: `test/worktree-shelf.test.ts` reads `worktreesRefreshPrsMessage` in `src/hub/control/operations-messages.ts`; `test/worktree-panel.test.ts` reads it from `async function worktreeShelf(` and `function worktreesView(` to `async function uiMemorySnapshot(`, `src/ui/index.html` from `function renderWorktrees(shelf)` to `function renderBench(bench)` (plus the helper lines it names) and `src/hub/sdlc.ts` from `export async function readSdlcPr(` to `export async function readSdlcPrHead(`. Moving, renaming or reordering those lines updates the test in the same PR. The removal-module lists pinned there and in `test/worktree-tidy.test.ts` (`src/hub/code-facts.ts`, `src/hub/task-worktree.ts`, `src/cli/worktree-tidy.ts`) are never extended to let a new removal pass (rule: `daemon.md`).
39
39
 
40
40
  - `scripts/check.sh` pins the test environment (#610): `GIT_CONFIG_GLOBAL=/dev/null`, `NO_COLOR` unset, `TERM=xterm-256color`, temp root under the OS per-user temp dir, agent markers cleared. A test that needs a person's git config or color settings sets them itself. `--changed` selects tests with `scripts/changed-tests.mjs`: changed tests (nested suites included) plus every test that names a changed file directly; docs need none; any other changed file no test names, and any gate, package or shared-fixture change, runs everything.
41
41
  - `scripts/check.sh` holds the repo's heavy-job slot (`<git common dir>/ahub-heavy.lock`, #398) for the whole run, so a test never runs the real gate; `test/check-lock.test.ts` runs a copy in a scratch repo.
@@ -43,7 +43,7 @@ Scope: tests, fakes and the test gate. Read before adding or changing a test or
43
43
  - The whole-suite watchdog is `scripts/hang-watch.sh PID SECONDS [PROGRESS_FILE QUIET_SECONDS]` (#115, #516). `scripts/check.sh` sends bun's stderr (where it prints results) through a fifo to `scripts/progress-tee.sh FILE`, which forwards every line unchanged and appends one byte to FILE per `(pass)`, `(fail)`, `(skip)` or `(todo)` line and per test file header (under mawk only with `-W interactive`: mawk reads a pipe in blocks, so without it nothing counts until the input ends, #883); the watchdog stops the suite when FILE has not grown for `AHUB_CHECK_QUIET_S` (default 300, set in `.github/workflows/check.yml`, above the 120 s of the longest explicit test timeout). That is the hang detector, so a slow suite that keeps passing tests is never cut, and a test that logs without finishing is not progress. `AHUB_CHECK_HANG_S` (default in `scripts/check.sh`, 2700 s since #1564: healthy full runs exceeded the earlier 2250 s backstop while still reporting passing tests; hosted values for both OSes in `.github/workflows/check.yml`; #378, #593) is only the backstop for a run that keeps printing results while hung: raise it, with the job's `timeout-minutes` (room above it for setup), only when a healthy run nears it, never for a hung test, and keep the per-test 20 s timeout. The two-argument form (no file) is the old total-time bound, still used by the CI timing job and `scripts/seeded-check.ts`. A fifo and a filter of its own, never a pipe (`$!` must stay bun's pid) and never a process substitution (it cannot be waited on with a bound); `scripts/progress-tee.sh` is in the `--changed` FULL list. `test/hang-watch.test.ts` covers the watchdog, the filter and the fifo wiring.
44
44
  - A seed's named test must run on Linux, where the seeded job runs: a darwin-only test reports no result there and fails the job (#382). Cover a macOS-only protection with its regression test instead.
45
45
 
46
- - The `closing-refs` workflow (`.github/workflows/closing-refs.yml`, #760) runs `scripts/check-closing-refs.mjs` (PR number from argv or `PR_NUMBER`) on `opened`, `edited`, `reopened` and `synchronize`: it reads `gh pr view --json closingIssuesReferences,body,title,commits` and fails when GitHub would close an issue the title and body only mention with `Refs`, a negation or a qualifier (`Refs #15. Does not close #15.` and `Refs #15. Partially fixes #15.` fail, `Refs #15.` and `Fixes #15` pass), or when a commit message has a closing keyword, negated or not, for an issue the title and body do not mean (a squash merge carries it). An issue linked only in the sidebar passes. A keyword is meant only when nothing earlier in its sentence (ending at `.`, `!`, `?`, `;` or a line break, never a comma) matches `NEGATION`; widen that list, never narrow it to let a qualified close pass (background: README). `mentioned`, `keywordReferences`, `intentionalCloses`, `closingMisuse` and `commitMisuse` are pure and covered by `test/closing-refs.test.ts` with the real `gh` shape (`repository.name`, `repository.owner.login`); its command test puts a fake `gh` first on `PATH`, never the real one. Run it by hand with `GITHUB_REPOSITORY=<owner/repo> node scripts/check-closing-refs.mjs <number>`.
46
+ - The `closing-refs` workflow (`.github/workflows/closing-refs.yml`, #760, #1938) calls the shared `STAIxBWLB/repo-tools` workflow pinned by full commit SHA (tag `v0.1.3`) with `contents: read` and `pull-requests: read`. The rule, its negation list and its tests live in `@staix/repo-tools` (`src/check-closing-refs/`, `bin/check-closing-refs` in the package): it fails a PR when GitHub would close an issue the title and body only mention with `Refs`, a negation or a qualifier, or when a commit message has a closing keyword for an issue the title and body do not mean. Widen the negation list there, never narrow it to let a qualified close pass. A gap goes to `STAIxBWLB/repo-tools`, not to a local copy; the pin moves only to a published, reviewed tag. `scripts/check-docs.mjs` stays shipped (the release reader runs it); `test/check-docs-fixtures.test.ts` runs the package's `check-docs` cases (`@staix/repo-tools/fixtures/check-docs/`, read from `node_modules`, no vendored copy) against it so the two cannot drift.
47
47
 
48
48
  - A test of `runCheck` (`src/hub/checks.ts`, #558) injects a `CheckSpawn` (argv and options in, `{ pid, exited, signalCode, stdout, stderr }` out) and never patches `node:child_process`: the runner reads a child's exit and pipes as values through `Bun.spawn`, because node's event layer can report a quick child's exit inside `spawn()` before a listener exists under load on macOS (oven-sh/bun#45483). Keep the `ended` fixtures for the already-ended case, and do not raise the 5 s limit or the 1 s kill grace to fix a flake.
49
49
 
@@ -0,0 +1,348 @@
1
+ {
2
+ "contract": "companion-cli",
3
+ "version": 3,
4
+ "since": "0.54.0",
5
+ "about": "Extends companion CLI v2 with launch-line launch options, an executable choice and a daemon-version refusal. Every v2 path is unchanged.",
6
+ "types": {
7
+ "semver": "string matching MAJOR.MINOR.PATCH with an optional -pre or +build suffix",
8
+ "string": "non-empty string",
9
+ "absolute-path": "string starting with /",
10
+ "count": "non-negative safe integer",
11
+ "nullable-fraction": "null or a finite number from 0 to 1 inclusive",
12
+ "count-map": "object whose keys are in values and whose values are counts",
13
+ "enum": "string in values",
14
+ "true": "the boolean true",
15
+ "false": "the boolean false",
16
+ "prefixed": "string equal to one of values or starting with one of prefixes",
17
+ "object": "plain object"
18
+ },
19
+ "commands": [
20
+ {
21
+ "argv": [
22
+ "status",
23
+ "--json"
24
+ ],
25
+ "reads": "status"
26
+ },
27
+ {
28
+ "argv": [
29
+ "--project",
30
+ "<id|root>",
31
+ "status",
32
+ "--json"
33
+ ],
34
+ "reads": "status"
35
+ },
36
+ {
37
+ "argv": [
38
+ "projects",
39
+ "--json"
40
+ ],
41
+ "reads": "projects"
42
+ },
43
+ {
44
+ "argv": [
45
+ "ui"
46
+ ]
47
+ },
48
+ {
49
+ "argv": [
50
+ "--project",
51
+ "<id|root>",
52
+ "ui"
53
+ ]
54
+ },
55
+ {
56
+ "argv": [
57
+ "console"
58
+ ]
59
+ },
60
+ {
61
+ "argv": [
62
+ "--project",
63
+ "<id|root>",
64
+ "console"
65
+ ]
66
+ },
67
+ {
68
+ "bin": "acon",
69
+ "argv": [
70
+ "ui"
71
+ ]
72
+ },
73
+ {
74
+ "argv": [
75
+ "launch-line",
76
+ "<kind>",
77
+ "--json",
78
+ "[--exec",
79
+ "<absolute-path|self>]",
80
+ "[--",
81
+ "<launch",
82
+ "arguments>]"
83
+ ],
84
+ "reads": "launchLine"
85
+ }
86
+ ],
87
+ "noHub": {
88
+ "exitCode": 1,
89
+ "stderrPrefix": "ahub: no hub running for "
90
+ },
91
+ "status": {
92
+ "version": {
93
+ "type": "semver",
94
+ "presence": "always"
95
+ },
96
+ "projectId": {
97
+ "type": "string",
98
+ "presence": "always"
99
+ },
100
+ "cwd": {
101
+ "type": "absolute-path",
102
+ "presence": "always"
103
+ },
104
+ "tasks": {
105
+ "type": "count-map",
106
+ "presence": "always",
107
+ "values": [
108
+ "backlog",
109
+ "proposed",
110
+ "in_progress",
111
+ "in_review",
112
+ "approved",
113
+ "changes_requested",
114
+ "cancelled"
115
+ ]
116
+ },
117
+ "peers": {
118
+ "type": "object",
119
+ "presence": "always"
120
+ },
121
+ "peers.<id>.state": {
122
+ "type": "enum",
123
+ "presence": "always",
124
+ "values": [
125
+ "idle",
126
+ "busy",
127
+ "paused",
128
+ "offline"
129
+ ]
130
+ },
131
+ "peers.<id>.queued": {
132
+ "type": "count",
133
+ "presence": "always"
134
+ },
135
+ "peers.<id>.accountLabel": {
136
+ "type": "string",
137
+ "presence": "person-console status when a named account is bound to the peer; absent otherwise"
138
+ },
139
+ "peers.<id>.orcaPaneKey": {
140
+ "type": "string",
141
+ "presence": "person-console status for an online peer with a live, project- and instance-bound Orca launch record; absent otherwise"
142
+ },
143
+ "peers.<id>.context": {
144
+ "type": "object",
145
+ "presence": "when a context reading is available; absent otherwise"
146
+ },
147
+ "peers.<id>.context.used": {
148
+ "type": "nullable-fraction",
149
+ "presence": "with peers.<id>.context"
150
+ },
151
+ "peers.<id>.context.freshness": {
152
+ "type": "enum",
153
+ "presence": "with peers.<id>.context",
154
+ "values": [
155
+ "fresh",
156
+ "stale",
157
+ "unknown"
158
+ ]
159
+ },
160
+ "peers.<id>.attached": {
161
+ "type": "false",
162
+ "presence": "when the peer has no adapter attached; absent otherwise"
163
+ },
164
+ "peers.<id>.needsReview": {
165
+ "type": "count",
166
+ "presence": "when nonzero; absent when zero"
167
+ },
168
+ "peers.<id>.pullOnly": {
169
+ "type": "true",
170
+ "presence": "when the peer reads messages only through hub_inbox; absent otherwise"
171
+ },
172
+ "peers.<id>.paused": {
173
+ "type": "prefixed",
174
+ "presence": "when paused; absent otherwise",
175
+ "values": [
176
+ "manual"
177
+ ],
178
+ "prefixes": [
179
+ "budget: "
180
+ ]
181
+ },
182
+ "peers.<id>.detached": {
183
+ "type": "object",
184
+ "presence": "when a server the hub did not start serves that peer's socket; absent otherwise"
185
+ },
186
+ "peers.<id>.detached.cause": {
187
+ "type": "string",
188
+ "presence": "with peers.<id>.detached"
189
+ },
190
+ "peers.<id>.detached.command": {
191
+ "type": "string",
192
+ "presence": "with peers.<id>.detached; the exact command that puts the peer back under the hub"
193
+ },
194
+ "needs": {
195
+ "type": "object",
196
+ "presence": "always"
197
+ },
198
+ "needs.act": {
199
+ "type": "count",
200
+ "presence": "always"
201
+ },
202
+ "needs.watch": {
203
+ "type": "count",
204
+ "presence": "always"
205
+ },
206
+ "needs.state": {
207
+ "type": "string",
208
+ "presence": "always"
209
+ },
210
+ "needs.first": {
211
+ "type": "object",
212
+ "presence": "when any item needs the person; absent otherwise"
213
+ },
214
+ "needs.first.kind": {
215
+ "type": "string",
216
+ "presence": "with needs.first; \"approval\" is a pending permission request"
217
+ },
218
+ "needs.first.level": {
219
+ "type": "enum",
220
+ "presence": "with needs.first",
221
+ "values": [
222
+ "act",
223
+ "watch"
224
+ ]
225
+ },
226
+ "needs.first.until": {
227
+ "type": "count",
228
+ "presence": "when the item expires (milliseconds since the epoch)"
229
+ },
230
+ "needs.first.peer": {
231
+ "type": "string",
232
+ "presence": "when the item belongs to a peer"
233
+ }
234
+ },
235
+ "launchLine": {
236
+ "kinds": [
237
+ "claude",
238
+ "codex"
239
+ ],
240
+ "startsProcess": false,
241
+ "response": {
242
+ "command": {
243
+ "type": "string",
244
+ "presence": "always; never empty or blank; the shell command to run in the terminal"
245
+ },
246
+ "env": {
247
+ "type": "object",
248
+ "presence": "always; overlay these bindings on the terminal environment"
249
+ },
250
+ "env.AGENTHUB_PROJECT_DIR": {
251
+ "type": "absolute-path",
252
+ "presence": "always"
253
+ },
254
+ "env.AGENTHUB_STATE_DIR": {
255
+ "type": "absolute-path",
256
+ "presence": "always"
257
+ }
258
+ },
259
+ "input": {
260
+ "--exec": {
261
+ "presence": "optional",
262
+ "values": "an absolute path to a runnable file, or the word self",
263
+ "effect": "the printed command starts with that path; self prints this ahub's runtime and entry file, which run without ahub on PATH; without it the command starts with ahub"
264
+ },
265
+ "--": {
266
+ "presence": "optional",
267
+ "effect": "every argument after it is the launch's own options (model, effort, resume and the like); each is kept, in order, after the kind, shell-quoted when it needs it"
268
+ }
269
+ },
270
+ "minDaemon": "0.53.0",
271
+ "refusals": {
272
+ "exit": 1,
273
+ "stdout": "empty for every refusal",
274
+ "reasons": [
275
+ "launch options cannot be kept: an argument contains a control character",
276
+ "launch options cannot be kept: <flag> is owned by ahub; remove it from the launch (--as, --project, --live-test, --print-command, --dry-run, and the flags the claude or codex launcher owns, such as --dangerously-skip-permissions or --remote)",
277
+ "--exec must be an absolute path or self",
278
+ "--exec <path> is not a file",
279
+ "--exec <path> is not runnable",
280
+ "running hub is older than <minDaemon> or does not report its version; run ahub upgrade, then retry"
281
+ ]
282
+ }
283
+ },
284
+ "projects": {
285
+ "[]": {
286
+ "type": "object",
287
+ "presence": "one per registered project"
288
+ },
289
+ "[].id": {
290
+ "type": "string",
291
+ "presence": "always"
292
+ },
293
+ "[].root": {
294
+ "type": "absolute-path",
295
+ "presence": "always"
296
+ },
297
+ "[].state": {
298
+ "type": "string",
299
+ "presence": "always; readers recognise running and stopped, any other value reads as unknown"
300
+ }
301
+ },
302
+ "shellQuote": [
303
+ {
304
+ "in": "it's $(x)",
305
+ "out": "'it'\\''s $(x)'"
306
+ },
307
+ {
308
+ "in": "",
309
+ "out": "''"
310
+ },
311
+ {
312
+ "in": "a b",
313
+ "out": "'a b'"
314
+ },
315
+ {
316
+ "in": "'",
317
+ "out": "''\\'''"
318
+ },
319
+ {
320
+ "in": "''",
321
+ "out": "''\\'''\\'''"
322
+ },
323
+ {
324
+ "in": "$(x)",
325
+ "out": "'$(x)'"
326
+ },
327
+ {
328
+ "in": "`x`",
329
+ "out": "'`x`'"
330
+ },
331
+ {
332
+ "in": "a\nb",
333
+ "out": "'a\nb'"
334
+ },
335
+ {
336
+ "in": "é",
337
+ "out": "'é'"
338
+ },
339
+ {
340
+ "in": "\\",
341
+ "out": "'\\'"
342
+ },
343
+ {
344
+ "in": "a;b&c|d",
345
+ "out": "'a;b&c|d'"
346
+ }
347
+ ]
348
+ }
@@ -252,7 +252,7 @@ tool is available. The daemon wires the adapter only for the exact content ID se
252
252
 
253
253
  ## Model, account, and memory boundaries
254
254
 
255
- Subscription-based native CLIs keep their own account authentication; those credentials are not pooled through the hub. Hub-owned inference, including internal summaries and local-worker model calls, uses the in-process model route and OmniRoute provider boundary. Prompt text may inform configured routing, but it cannot grant credential access or replace host routing policy. The optional local-worker adec consumer (#554) releases only bounded host-screened evidence, after campus/privacy and observer admission; native account, TUI, reviewer and task-assignment authority are unchanged. Shadow preserves the gateway model/effort and conversation; enforcement is refused at configuration load and no pair is applied. An explicit live model override bypasses the decision service. Current board/turn privacy and observer authority fence the optional request across waits and its proposal before telemetry; an authority change refuses the stale turn, and the refusal is not converted into a fixed-model fallback. There is no new gateway or native turn/spawn effort path. This separates native subscription identity from hub service credentials ([#553](https://github.com/STAIxBWLB/agent-hub/issues/553)).
255
+ Subscription-based native CLIs keep their own account authentication; those credentials are not pooled through the hub. Hub-owned inference, including internal summaries and local-worker model calls, uses the in-process model route and OmniRoute provider boundary. Prompt text may inform configured routing, but it cannot grant credential access or replace host routing policy. The optional local-worker adec consumer (#554) releases only bounded host-screened evidence, after campus/privacy and observer admission; native account, TUI, reviewer and task-assignment authority are unchanged. The decision route defaults off. Shadow preserves the gateway model, effort and conversation. A person can enable enforce on a decision route in `.agenthub/routing.toml`. The hub sends a validated, non-abstaining alias and its `reasoning_effort` through the existing gateway. Abstention, timeout, failure or a pair outside the candidates uses `constraints.current`. An explicit live model override bypasses the decision service. Current board and turn privacy and observer authority fence the optional request across waits, the proposal before telemetry, and enforced execution before transport. The hub refuses a stale turn if authority changes. Native turn and spawn effort handling is unchanged. This separates native subscription identity from hub service credentials ([#553](https://github.com/STAIxBWLB/agent-hub/issues/553)).
256
256
 
257
257
  R2 uses that same separation for `plan_execute` phase and `advisor`/`escalation`
258
258
  judge model/effort suggestions. The hub retains phase transitions, judge