@staix/agent-hub 0.38.0 → 0.40.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.
- package/CHANGELOG.md +84 -0
- package/README.md +28 -12
- package/docs/adding-an-ai-tool.md +7 -5
- package/docs/agent-notes/README.md +23 -0
- package/docs/agent-notes/adapters.md +9 -5
- package/docs/agent-notes/benchmarks.md +2 -0
- package/docs/agent-notes/budget.md +9 -0
- package/docs/agent-notes/bus.md +1 -0
- package/docs/agent-notes/daemon.md +21 -9
- package/docs/agent-notes/local-worker.md +4 -2
- package/docs/agent-notes/security-review.md +56 -0
- package/docs/agent-notes/tasks.md +22 -6
- package/docs/agent-notes/tests.md +10 -9
- package/docs/contracts/companion-cli-v1.json +4 -0
- package/docs/design/adapters.md +142 -0
- package/docs/design/agent-hub-architecture.md +46 -1
- package/docs/design/agent-hub.md +10 -0
- package/docs/design/bus.md +7 -0
- package/docs/design/cli-output.md +183 -0
- package/docs/design/execution-reference.md +6 -1
- package/docs/design/roadmap.md +191 -0
- package/docs/design/task-board.md +185 -5
- package/docs/dogfood.md +30 -9
- package/docs/events.md +7 -7
- package/docs/memory.md +5 -5
- package/docs/operations.md +315 -54
- package/docs/profiles.md +101 -8
- package/docs/quickstart.md +47 -6
- package/docs/research.md +6 -3
- package/docs/roles.md +52 -0
- package/docs/sdlc.md +190 -2
- package/docs/security.md +90 -15
- package/docs/text-projection.md +1 -0
- package/docs/verification/2026-11-13-claude-implementer-2.1.323.md +59 -0
- package/docs/verification/2026-11-13-codex-01672-reviewer-isolation.md +69 -0
- package/docs/verification/2026-11-14-0.39.0.md +51 -0
- package/docs/verification/2026-11-14-codex-0169-reviewer-isolation.md +70 -0
- package/docs/verification/2026-11-14-codex-0169-reviewer-tool-call.md +48 -0
- package/docs/verification/2026-11-14-pi-152-compat.md +45 -0
- package/docs/verification/2026-11-15-0.40.0.md +39 -0
- package/docs/verification/2026-11-16-pi-loopback-1447.md +39 -0
- package/docs/verification/pi-152-model-free.ts +57 -0
- package/docs/verification/pi-152-native.mjs +21 -0
- package/docs/verified.json +48 -25
- package/package.json +4 -4
- package/plugins/agent-hub/.claude-plugin/plugin.json +1 -1
- package/plugins/agent-hub/kimi-hook.js +2266 -530
- package/plugins/agent-hub/kimi-review-policy-worker.js +16 -11
- package/plugins/agent-hub/server.js +2423 -645
- package/src/adapters/acp-model-policy.ts +1 -1
- package/src/adapters/acp-session-model.ts +35 -0
- package/src/adapters/acp.ts +14 -0
- package/src/adapters/agy/definition.ts +2 -2
- package/src/adapters/agy/hooks.ts +7 -0
- package/src/adapters/claude-channel.ts +1 -1
- package/src/adapters/claude-implementer.ts +8 -0
- package/src/adapters/claude-print-child.ts +26 -2
- package/src/adapters/claude-print.ts +4 -0
- package/src/adapters/codex-appserver.ts +90 -16
- package/src/adapters/codex-review-isolation.ts +63 -17
- package/src/adapters/compat.ts +10 -10
- package/src/adapters/conformance/fakes/acp-server.ts +11 -2
- package/src/adapters/conformance/fakes/app-server.ts +5 -1
- package/src/adapters/conformance/fakes/pi-rpc.ts +1 -1
- package/src/adapters/definitions/builtin-metadata.ts +12 -12
- package/src/adapters/definitions/native-cli-jcode-mcp.ts +18 -3
- package/src/adapters/definitions/native-config-defaults.ts +1 -1
- package/src/adapters/definitions/native-config-policy.ts +1 -1
- package/src/adapters/definitions/native-quota.ts +122 -0
- package/src/adapters/definitions/native-recovery.ts +3 -0
- package/src/adapters/definitions/qwen.ts +2 -2
- package/src/adapters/kimi-review.ts +23 -0
- package/src/adapters/kimi-wire-usage.ts +39 -16
- package/src/adapters/local-worker.ts +9 -4
- package/src/adapters/pi-state-model.ts +12 -0
- package/src/adapters/pi.ts +76 -11
- package/src/adapters/print-result-model.ts +24 -0
- package/src/adapters/registry-types.ts +12 -2
- package/src/adapters/registry.ts +19 -2
- package/src/adapters/reviewer-print.ts +132 -16
- package/src/adapters/role-eligibility.ts +99 -0
- package/src/adapters/same-directory.ts +16 -0
- package/src/cli/agy-mcp.ts +18 -7
- package/src/cli/answer-args.ts +11 -3
- package/src/cli/console-question.ts +1 -1
- package/src/cli/console-state.ts +98 -11
- package/src/cli/console.ts +6 -2
- package/src/cli/error-format.ts +19 -0
- package/src/cli/free-text.ts +20 -0
- package/src/cli/handoff-args.ts +1 -1
- package/src/cli/help.ts +350 -30
- package/src/cli/identity-audit.ts +8 -7
- package/src/cli/identity.ts +27 -4
- package/src/cli/init-prompt.ts +31 -2
- package/src/cli/init-roles.ts +156 -0
- package/src/cli/init-settings.ts +24 -2
- package/src/cli/init.ts +232 -17
- package/src/cli/main.js +2 -2
- package/src/cli/main.ts +250 -69
- package/src/cli/model.ts +1 -1
- package/src/cli/output-standard.ts +56 -0
- package/src/cli/output.ts +199 -9
- package/src/cli/preview.ts +1 -1
- package/src/cli/recovery-launch.ts +114 -0
- package/src/cli/recovery-package.ts +14 -7
- package/src/cli/recovery-version-preflight.ts +104 -0
- package/src/cli/roadmap.ts +215 -0
- package/src/cli/role-doctor.ts +39 -0
- package/src/cli/sdlc-output.ts +66 -1
- package/src/cli/smoke-pty-bridge.ts +7 -24
- package/src/cli/study-output.ts +54 -0
- package/src/cli/study.ts +14 -1
- package/src/cli/task-output.ts +3 -1
- package/src/cli/terminal-recovery.ts +14 -0
- package/src/cli/upgrade-presentation-flags.ts +2 -2
- package/src/cli/upgrade-presentation.ts +4 -0
- package/src/cli/upgrade-restore-state.ts +12 -3
- package/src/cli/upgrade-runtime.ts +40 -2
- package/src/cli/upgrade.ts +8 -4
- package/src/hub/advisor-survey.ts +139 -0
- package/src/hub/audit-source.ts +66 -0
- package/src/hub/board.ts +677 -15
- package/src/hub/budget.ts +54 -4
- package/src/hub/bus.ts +9 -0
- package/src/hub/check-runner.ts +3 -4
- package/src/hub/ci-watch.ts +19 -4
- package/src/hub/conductor.ts +14 -8
- package/src/hub/config-apply.ts +2 -1
- package/src/hub/config-edit-host.ts +77 -5
- package/src/hub/considered-findings.ts +47 -0
- package/src/hub/control-client.ts +1 -1
- package/src/hub/daemon.ts +585 -98
- package/src/hub/deliverable-files.ts +17 -1
- package/src/hub/dogfood-profile.ts +3 -2
- package/src/hub/events.ts +25 -4
- package/src/hub/execution-reference.ts +1 -1
- package/src/hub/folder-trigger.ts +11 -4
- package/src/hub/github-import.ts +81 -0
- package/src/hub/hub-tools.ts +117 -20
- package/src/hub/install-policy.ts +23 -0
- package/src/hub/kimi-usage.ts +34 -2
- package/src/hub/lifecycle-schema.ts +3 -3
- package/src/hub/memory-profile.ts +9 -1
- package/src/hub/memory-sync-state.ts +1 -0
- package/src/hub/model-overrides.ts +2 -1
- package/src/hub/no-writes.ts +5 -0
- package/src/hub/operational-authority.ts +8 -1
- package/src/hub/operational-view.ts +6 -2
- package/src/hub/peers.ts +2 -0
- package/src/hub/pi-failure.ts +7 -0
- package/src/hub/plan-conformance.ts +20 -2
- package/src/hub/question-desk.ts +26 -7
- package/src/hub/questions.ts +33 -5
- package/src/hub/quota-account.ts +34 -0
- package/src/hub/recovery-policy.ts +18 -4
- package/src/hub/research-evidence.ts +51 -3
- package/src/hub/research.ts +77 -13
- package/src/hub/restart.ts +21 -0
- package/src/hub/review-budget.ts +88 -0
- package/src/hub/review-findings.ts +93 -12
- package/src/hub/reviewer-pool-config.ts +6 -2
- package/src/hub/reviewer-pool.ts +39 -6
- package/src/hub/roadmap-triage.ts +86 -0
- package/src/hub/roadmap-unplaced.ts +169 -0
- package/src/hub/roadmap-view.ts +83 -0
- package/src/hub/roadmap.ts +127 -0
- package/src/hub/routing.ts +7 -3
- package/src/hub/sdlc-merge.ts +6 -5
- package/src/hub/sdlc-queue.ts +17 -7
- package/src/hub/sdlc-release.ts +1 -1
- package/src/hub/sdlc.ts +47 -8
- package/src/hub/security-audit.ts +178 -0
- package/src/hub/security-pass.ts +115 -0
- package/src/hub/settings.ts +11 -5
- package/src/hub/source-read.ts +80 -2
- package/src/hub/sources.ts +57 -9
- package/src/hub/specs-task.ts +7 -0
- package/src/hub/startup-event-seeds.ts +5 -3
- package/src/hub/startup-timing.ts +1 -0
- package/src/hub/synthesis-readiness.ts +279 -0
- package/src/hub/task-sweep.ts +29 -2
- package/src/hub/task-worktree.ts +37 -0
- package/src/hub/tasks.ts +1464 -76
- package/src/hub/text-projection.ts +11 -1
- package/src/memory/capture.ts +2 -1
- package/src/pi/dependency-publish.ts +50 -0
- package/src/pi/extension.ts +1 -1
- package/src/pi/launch.ts +1 -1
- package/src/pi/task-dependencies.ts +249 -0
- package/src/ui/index.html +56 -13
- package/src/ui/office-model.ts +11 -3
- package/src/ui/office-space.ts +50 -30
- package/src/ui/plugin-questions.ts +5 -0
- package/src/ui/plugin.ts +27 -12
- package/templates/config.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,90 @@ 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.40.0
|
|
8
|
+
|
|
9
|
+
- Release N-1 for 0.40.x is published 0.39.0, with exact agent-mem 0.26.0 and control protocol 17 (descriptor floor 16). The N-1 fixture and matrix pin that package; the separate protocol-16 fixture stays at 0.25.0. The isolated fixture exercises old client and plugin against the new daemon and the new client and plugin against the old daemon. It does not establish live-agent, rollback or shared-home compatibility. The wire retains protocol 16 through 17; roadmap adds a conditional recovery feature and additive milestone tables. New roadmap CLI and MCP forms are not available from a 0.39.0 daemon. File and format-floor compatibility beyond these fixtures remains subject to the release verification report.
|
|
10
|
+
|
|
11
|
+
- Companion CLI contract v1 lists the existing optional per-peer context occupancy and freshness (hub task 974, Refs #1511). A scratch hub with a fixture status-line reading verifies the real status JSON; no context measurement or wire field was added.
|
|
12
|
+
|
|
13
|
+
- Execution lineage accepts `atex` as an opaque declared producer (hub task 972, Refs #1510). A build reference can carry its receipt id and PDF SHA-256; the hub does not execute atex, fetch the receipt or attest the build.
|
|
14
|
+
|
|
15
|
+
- `ahub help <command>` says what each flag is for (hub task 971, #1504 AC3). A Flags line was the flag, its value shape and the forms that take it (`--sync in handoff`); it is now one short description (`--sync sync handoff states from the targets`), at most 46 cells so it fits 80 columns. The words live in `FLAG_DESCRIPTIONS` in `src/cli/help.ts`, keyed by the flag or by `<command> <flag>` where a command uses a flag differently (`--all` means every project for `status`, decided candidates for `learn`, completed goals for `goal`). A flag with no entry falls back to the forms line. `test/help.test.ts` fails a flag of any command without a description, a line over the width, and a table entry that names no flag.
|
|
16
|
+
- CI spends fewer macOS minutes and waits less (hub task 970, Refs #1490). The org can run at most 5 macOS jobs at once, and this repository used 61% of the org's macOS minutes in Nov 1-14 while 367 of 437 superseded PR runs still ran to completion. A draft PR now starts no macOS shard and its required `check (macos-latest)` fails with `macOS deferred` (never a skip, so no run that skipped macOS can be reused as a full proof); `gh pr ready` starts the run that includes macOS (`pull_request` gains `ready_for_review`). A newer head cancels the older head's run in its PR group (`cancel-in-progress` is true for pull requests only: main pushes and dispatches keep `queue: max` and are never cancelled, which GitHub requires). `check (ubuntu-latest)` runs six shards (`AHUB_CHECK_SHARD=<n>/6`) and macOS stays at four; `scripts/test-timings.json` is unchanged because Bun balances by it at run time. The hub's CI watcher reads `isDraft` and treats a cancelled required check and a draft's deferred macOS check as pending, so the implementer gets no "CI failed" notice for either; a real failure of the same head is still told. This PR's own run showed a second path: after `gh pr ready` one head carries the check rows of two runs of the same workflow (the draft run's failed aggregates beside the ready run's), and every reader took the old rows as failures (`check (ubuntu-latest)`, `check (macos-latest)` and `seeded guards` all read `failed` while the ready run was green or still running). `latestCheckRuns` in `src/hub/sdlc.ts` keeps only the newest run's row of each check name in the watcher, the review admission, the merge evidence, the merge queue snapshot and `readSdlcPr`; it needs a start time and one workflow identity on every row of a name and exactly one newest, and otherwise keeps every row, so an unsure head stays not ready. The GraphQL check queries now also request `startedAt` and the workflow. `AGENTS.md` states the draft-first flow, and `docs/sdlc.md`, `docs/operations.md` and `docs/agent-notes/tests.md` carry the new concurrency and shard rules. Tests: the draft condition and message, the cancel expression per event, six shards and every file in exactly one, a cancelled or draft-deferred run never reused as a proof (pure and over the API), and the watcher's draft and cancelled reads.
|
|
17
|
+
- Roadmap R3: bottom-up placement (hub task 963, Refs #1481, roadmap R3 of #1478). `ahub roadmap unplaced` and `hub_roadmap_unplaced` list the open GitHub issues, open board tasks and `active` or `draft` specs that no live milestone places, each with its reason; linking an issue drops it and the tasks that inherit from it, a link into a `dropped` milestone does not place, private tasks are only a count, and a cut or early-stopped GitHub read says `partial: true` while an unreadable source is named under `unavailable`. The GitHub read is new and paged (up to 10 pages of 100 under one 20 s deadline, fixed-argv GETs, no write); the one-page Backlog intake is unchanged. `ahub roadmap triage` and `hub_roadmap_triage` (planner or conductor, refused during a PII turn) ask the hub's model for a milestone, or a new one, for up to 25 unplaced items; an answer is kept only when it names a shown item and milestone and quotes words that occur in both, and is stored as a pending model answer attributed to the hub. Nothing is linked until `ahub roadmap accept <id>` (`hub_roadmap_edit {op: accept}`), which applies exactly that one link through R1's compare-and-set writer; `reject` drops it. Milestones now carry `tree` (a parent's roll-up including its children) and `readyToClose` with its reasons, advice for the person that never sets a state. `ahub roadmap import-github [--repo] [--apply]` is the person's alone: a dry run unless `--apply`, one `proposed` milestone per open GitHub milestone with its issues linked, idempotent on a second run, never a GitHub write. Two additive tables (`milestone_suggestions`, `milestone_imports`) stay outside the roadmap integrity digest, so the recovery format and its floor do not move. The design is in `docs/design/roadmap.md` "Bottom-up placement (R3)".
|
|
18
|
+
- The exact `@staix/agent-mem` pin moves 0.26.1 → 0.26.3 (hub task 968). On a real v3 placement home `ahub memory sync` fails with "Placement sync is unavailable" under 0.26.0 and 0.26.1, and the `amem` CLI sharing that home refuses too, while 0.26.3 syncs the same home: 0.26.2 raises the first placement sync's captured source from 8 MiB to 64 MiB (the 20000-row and metadata ceilings are unchanged, and a refusal above it names the bound instead of suggesting an epoch transition), and 0.26.3 reuses one complete placement writer/source proof for at most 1 s between effect boundaries instead of re-measuring every writer install around every row, reuses decoded journal prefixes and the validated publication plan, and adds `amem sync --progress auto|human|json|off` and `--status`. Nothing in the 0.26.1 → 0.26.3 range changes a host API: `src/index.ts` and `./platform` are byte-identical between the two published tarballs, the two new files are internal placement modules, and the only config surface added is the machine-file-only `privateRemotes` key (additive, at most 16 exact non-GitHub URLs). No storage format, file name, record/ref or recovery format and no format floor moves, so hubs and `amem` CLIs sharing a home need no coordinated upgrade. The change itself is `package.json`, `bun.lock`, the pin facts in `docs/quickstart.md` and `docs/operations.md`, the pin prose in `docs/memory.md` and `docs/operations.md`, the four tests that assert the installed version, and the committed plugin bundles, rebuilt under 0.26.3.
|
|
19
|
+
- Pi 1.5.2 is a verified version (hub task 961, Refs #888 and #1447 T6). The new [receipt](docs/verification/2026-11-14-pi-152-compat.md) repeats every leg of the 1.5.0 one model-free, against `@earendil-works/pi-coding-agent@1.5.2` installed into a private npm prefix under a scratch HOME (npm integrity `sha512-mUWI04rq...`, the same `dist/cli.js` SHA-256 as 1.4.0 and 1.5.0): native identity, extension load and RPC session identity, SDK registration, managed tool callback with receipt replay, failed tool result, zero provider requests. The producer ran twice and passed (`pi-152-model-free.ts`, the 1.5.0 producer with only the version constants and file names changed). `COMPAT.pi.verified` is now `["1.4.0", "1.5.0", "1.5.2"]` and its receipt pointer names the new file; `1.5.1` and every other version still need `ahub agents trust pi <version>`, so a person who trusted 1.5.2 locally now sees it as verified. The receipt records one limit: the whole-home before/after hash of `~/.qwen` was not identical because live Qwen sessions wrote there, so the isolation claim rests on a tight `~/.pi` bracket that was identical. Account-backed inference, Linux and Intel macOS stay unverified, and #1447 stays open until its live-leg acceptance is recorded.
|
|
20
|
+
- `ahub help` and `ahub help <command>` follow the standard's Help section (hub task 966, Refs #1504, T1 and T2 of the #1484 follow-up). The overview has a blank line before its first section, and every native agent row says what the command does from the optional third element of its `cli.usage` entry in its adapter definition (`jcode` was "optional Jcode", `pi` was "start Pi"; the element rides `cli.usage`'s fixed-builtin restriction, so no new restricted field). `ahub help <command>` now prints `Usage` (every form), `Description`, `Flags` (one line per flag, with its value shape and, for `--json` and `--color`, what the standard defines; other flags say which forms take them, a flag after a `|` in a form such as `task handoff --list | --sync | --project ...` included), `Examples` (one or two complete commands for each command that takes arguments) and then `Details`, which is the previous long text unchanged, so no usage form, flag or description word is lost (the test checks every one). The flag test in `test/help.test.ts` now reads the rendered text of each command; it compared `HELP` with itself before and could not fail. Each example is checked against the dispatch table and the command's own usage. A flag line says only what the usage and the standard state: for 283 of the 371 flag rows across all commands the command's existing description never names the flag, so the line gives its value shape and the forms that take it, not a meaning this change would have had to invent.
|
|
21
|
+
- The pinned Bun moves from 1.4.2 to 1.4.4 (hub task 940, #1486): `.bun-version`, `engines.bun` (`>=1.4.4`) and the README, quickstart, operations and CONTRIBUTING floor facts. The #560 start gate in `src/cli/smoke-pty-bridge.ts` is removed: it existed only for oven-sh/bun#45300, fixed in 1.4.4 (the bare 12-way repro hung 2 of 96 on 1.4.3 and 0 of 96 on 1.4.4 on this Mac; the real bridge ran 0 hangs in 180 12-way spawns on 1.4.4). The gate's tests and the probe's gate observations go with it; the parent-death, hung-bridge, killed-caller and failed-spawn tests stay. The committed plugin bundle is rebuilt under 1.4.4, so every open PR's bundle is stale after this merges: rebuild it with `bun run build` before re-filing. The runtime floor in `src/cli/main.js` (the check that stops an older Bun with one line) and the remote check runner's `CHECK_IMAGE` (`oven/bun:1.4.4`, index digest `sha256:1d22548f...`, pulled on the runner host) move with the pin. Bun's backslash realpath ENOENT is fixed in 1.4.4; the hardlink realpath wrong name (#541) is not, so `guardPath` keeps judging the typed name. Bun 1.4.4 also changed `realpathSync` so that `<link>/..` is folded by text, not resolved on disk (`realpathSync.native` and `/bin/realpath` are right), which broke `realPath`'s backslash fallback; agent-mem 0.26.1 resolves `..` after a symlink on disk (agent-mem #404), so the exact `@staix/agent-mem` pin moves 0.26.0 -> 0.26.1 in the same change, with `bun.lock`, the pin prose in `docs/memory.md` and `docs/operations.md`, and the four tests that assert the installed version. `test/project.test.ts` is unchanged and passes. The `AGENTS.md` "Real paths" note names both behaviors.
|
|
22
|
+
- A bounded wait on an `in_progress` task suspends the idle-owner sweep (hub task 960, Refs #1454). The owner, the task's planner or the person records it with the new `hub_task_wait {id, until, reason}` (an RFC 3339 time with a zone, in the future and at most 14 days ahead, and a public one-line reason of at most 200 characters). While it is pending `nextSweep` returns nothing for `idle-owner` on that task; after `until` the ladder restarts from `until`, so the first notice comes `idle_min` later and step 3 still reassigns under `auto_reassign`. `review-pending`, `unaccepted-assignment` and `ready-unassigned` never read it. Done, decline, return and any reassignment end the wait (the next state-changing history entry does; `reviewer changed`, `idle sweep` and the other quiet entries do not). The reason goes through the same privacy screen as a completion note: an ordinary task refuses text the screen would withhold, a PII task keeps it withheld. The wait shows in `hub_task_show` and `ahub task show` (`waiting`, with whether it has passed) and the planner groom view lists a passed one as `wait-passed`. Every refusal names its cause and next step. With `task_sweep.enabled` off the tool is not published and `Tasks.wait` refuses, so tool lists and the sweep are unchanged. Wait-passed shows in `hub_planner_groom` only; the CLI board rows are unchanged.
|
|
23
|
+
- `ahub help` is an overview (hub task 959, Refs #1484 T4). It prints one row per command as ` <name> <one-line summary>` in two aligned columns under `▸ <group>` titles, within 80 columns (about 110 lines, it was about 1,040), and ends with where the long text lives. `ahub help <command>`, `ahub <command> --help` and `-h` print the long text unchanged: every usage form, flag and description of that command, so no command, subcommand or flag was removed. A command with two meanings keeps a row in each group (`backlog`, `check-path`); `pause|resume` and `version|--version` share a row. The summaries are in `SUMMARIES` in `src/cli/help.ts`; a command not named there (the native agents, whose text comes from their adapter definitions) takes the first clause of its description. `LANG=C` or `--ascii` prints `>` for `▸`. `help` still exits 0, and `ahub help <unknown>` still exits 2 with `unknown command`.
|
|
24
|
+
- `ahub status` opens with what needs action (hub task 958, Refs #1484 T3). The default view is a header, an `Attention` section, then `Hub`, `Peers` and `Tasks`. Each Attention row is a marker (`✗` a failure such as a held delivery or a stopped dispatch, `⚠` a warning; an agent CLI version appears there only when it is refused, while trusted and in-line versions are a count on the `Hub` row) with its finding and, where the fix is known, the exact next command on a `→` line (`ahub queue show <id>`, `ahub agents trust <id> <version>`, `ahub queue discard --peer <peer> --state failed`, `ahub restart --dry-run`, `ahub resume <peer>`). A healthy hub prints `✓ nothing needs attention`. Peer detail under `Peers` uses plain keys (`form`, `flow roles`), not `claude form`. The older full detail (model backends, specs, queue pressure, schedules, per-peer notes, control-write timing) is `ahub status --verbose` (`--full` still prints it too, with full ids). `--json` and the exit code (0) are unchanged. On a pipe without `COLUMNS` the view does not wrap; the `WAITING ON YOU #N` line keeps its words.
|
|
25
|
+
- `ahub doctor` and the shared error line follow CLI output standard v1 (hub task 957, Refs #1484 T2). Three behavior changes, each with its test updated:
|
|
26
|
+
- `ahub doctor` exits 1 when any row is a failure (it exited 0 with failed rows before). Warnings and unknowns do not change the exit code. This holds for `ahub doctor --json` too: the JSON document is unchanged, but a script reading it now sees exit 1. `ahub setup` prints the same report and keeps its own exit code.
|
|
27
|
+
- A usage error exits 2 (it exited 1): `usage: ...`, an unknown command, and the error forms that carry their usage on a line of their own. A refusal that changed nothing (for example `never-ask requires --yes`) and a runtime failure (an unreadable file, no hub running) still exit 1.
|
|
28
|
+
- `ahub task show <id>` for an id that does not exist prints `ahub: no task #N` and a next step on stderr and exits 1, with `--json` too; it printed to stdout and exited 0.
|
|
29
|
+
The doctor report reads as a standard v1 report: a `▸` section per area with a count, one marker row per check (`✓ ✗ ⚠ ?`, ASCII `ok x ! ?` in a non-UTF-8 locale) that keeps the state word, failures first and then warnings, unknowns and oks, a check name capped at 32 cells with a long path shortened in the middle, and a summary line last (`✗ 2 failed ⚠ 3 warnings ✓ 18 ok`). The error line is `ahub: <what failed>: <why>`; on a terminal it leads with `✗`, a piped line keeps the plain `ahub: ` form, and a known fix is printed as a second `→ <command>` line. Daemon refusal text is passed through unchanged.
|
|
30
|
+
|
|
31
|
+
- A `local.deny` or `pii.paths` entry that contains the system temp directory no longer fails the Codex reviewer sandbox proof as `sandbox_proof` (hub task 956, Refs #1493; diagnosis from hub task 934). The proof made its fixture under `os.tmpdir()` and denied every entry's subtree, so a deny such as `~/.jcode` (a jcode session's `TMPDIR` is `~/.jcode/scratch`) put the proof's own public canary under a denied tree. `prepare` now checks each expanded deny entry, the core deny globs and the host credential roots against `tmpdir()` first; when one covers it, the fixture root is made under `<hub home>/reviewer-proof`, and when that is covered too the reviewer is unavailable with the new cause `fixture_root_denied` (`ahub status` says to move `TMPDIR` or narrow the entry and never names the entry). The ordinary proof legs and markers are unchanged. A deny that covers the reviewer's cwd does not fail the proof (the canary is in the fixture root, not in cwd).
|
|
32
|
+
|
|
33
|
+
- The first check-runner probe no longer holds daemon startup (hub task 925, #1445 step 2). The post-merge `startup timings ms:` line on this hub named `task_checks` (9.9 s of a 12.5 s start): the remote runner's availability probe takes about 8 s (ssh, docker version, image inspect, a launched and torn-down probe container). It now runs beside the orphan sweep and the spec probe, startup waits for it at most 500 ms, and `ahub status` shows the runner as unavailable (`runner probe in progress`) until it settles. `check_run` joins the same single-flight probe, so a check started right after startup waits for the real answer, and the settled state equals the one a blocking start gave.
|
|
34
|
+
- CLI output standard v1 foundation (hub task 936, Refs #1484 T1). `docs/design/cli-output.md` holds the standard. The new `src/cli/output-standard.ts` (no imports, so it can move to a shared package) holds the nine semantic roles on the 16 ANSI colors (`ROLE_SGR`), the marker table with ASCII forms and the 2-cell marker column, and color resolution per stream; `src/cli/console-state.ts` re-exports them, maps the console's `Tone` onto the roles (`TONE_ROLE`) and gains a `Report` builder for the layout grammar. Color resolution: `--color`, then `NO_COLOR`, `FORCE_COLOR` / `CLICOLOR_FORCE`, `FORCE_COLOR=0` / `CLICOLOR=0`, then TTY and `TERM`. Behavior change: `FORCE_COLOR` and `CLICOLOR_FORCE` now turn color on for a pipe, and `FORCE_COLOR=0` / `CLICOLOR=0` turn it off for a terminal. `test/cli-output-conformance.test.ts` runs the five conformance checks and fails on a raw SGR literal in `src/cli/` and `src/hub/` outside the console and the identity palettes. No report changes yet (doctor, status, help and `fail()` follow in hub task 942, 944 and 946).
|
|
35
|
+
- Roadmap R1 adds board-backed milestones through `hub_roadmap_list`, `hub_roadmap_show`, `hub_roadmap_edit` and `ahub roadmap` (hub task 941, Refs #1479). Public reads compute task, cached issue, spec and train progress without GitHub or model calls. Explicit task placement overrides source-issue inheritance; private work is a count only. Planner/conductor edits use revision checks, done/dropped are person-only, and retained roadmap state is bound to controlled recovery. The tables are additive; no database format bump or UI is included.
|
|
36
|
+
|
|
37
|
+
- `ahub init --track-config` now handles outside `.agenthub/` ignore rules in one run by appending and verifying a project-local re-include block (hub task 965, #1496). Dry-run shows its lines; nested rules that still win refuse before writes. State and machine-local files stay ignored, machine-endpoint routing stays local, and `--no-track-config` removes init-owned re-inclusions. No user excludes/config or index is changed.
|
|
38
|
+
- Pi tool-step ceilings now grant bounded checkpoint-and-continue turns (`pi.max_continuations`, default 2, range 0..10), then move the task with `step_limit` and observed steps/continuations rather than an inference-failed label (hub task 943, Refs #1447 T1/T2). Failed turns log `ceiling`, `model_error` or observation-only `aborted`; private diagnostics keep only the class, public model text is screened and bounded. Only a safely settled structured ceiling consumes its delivery as a limit; uncertain tools and concurrent cancellations remain held. Tool-step defaults, sandbox, dependencies and native version policy are unchanged in this slice.
|
|
39
|
+
- Pi `max_steps` now defaults to 100 and this repository's tracked Pi setting and init template also use 100; an existing project with explicit `pi.max_steps: 30` keeps 30 until the person edits it (hub task 945, Refs #1447 T3). The local worker stays at 30 and continuation allowance is unchanged. Config/policy and real-extension fake checks cover the 101/100 rejection boundary; this edit does not apply settings or restart a live peer.
|
|
40
|
+
- Important task-move/cancel notices queued during ordinary digest condensation now participate in the next host turn, ahead of chat (hub task 947, Refs #1447 T4). The bus reselects queued originals without recording an abandoned attempt or receipt. Checkpoint waiters reject lost ownership before summary effects, including move-away/back; taskless checkpoints and same-owner metadata changes remain valid. Fake Pi tests cover the actual escalation prompt and former-owner refusals. Notices sent after adapter busy but before the provider prompt remain queued for the following host turn; that preflight window was not timed and closing it needs an explicit preparation/commit contract.
|
|
41
|
+
- Pi prepares accepted-worktree dependencies from reviewed Git-base install inputs in protected staging, using the shared Bun cache and fixed frozen install (hub task 949, Refs #1447 T5). Changed inputs, lifecycle/trust hooks, existing targets and unsupported layouts remain unprepared. Publication uses a verified directory identity and same-volume rename, never a copied dependency tree. Preparation failures keep acceptance and report a fixed reason in the result and next prompt; full checks remain with CI and the remote runner. The localhost listener leg moved to a follow-up; Pi's network profile and proxy environment are unchanged.
|
|
42
|
+
- Codex 0.169.0 is a verified reviewer version (hub task 931, Refs #888). It passed the model-free reviewer isolation procedure with 0.166.0 and 0.167.2 as controls (`docs/verification/2026-11-14-codex-0169-reviewer-isolation.md`): six of the seven re-read Codex source files changed and were re-read, every committed preparation leg passed, and the app-server schema comparison found no removed type, property or enum value. The separately authorized single model-backed review (`docs/verification/2026-11-14-codex-0169-reviewer-tool-call.md`) persisted one approved verdict with the required marker and the exact head, with no retry. `COMPAT["codex-review"].verified` is now 0.146.0, 0.163.0, 0.164.0, 0.166.0 and 0.169.0; 0.167.0 and 0.167.2 stay unverified, and every launch still runs each isolation proof. Merge this after the v0.39.0 tag.
|
|
43
|
+
|
|
44
|
+
- The configured conductor can run `ahub sdlc audit start|show` from its agent shell (hub task 933, #1403 A4, which stays open). `classifyPeerCommand` returned "console" for both forms, so the CLI refused a conductor before it connected, although the daemon and `docs/sdlc.md` already admit the one configured conductor. They are now conductor forms like `sdlc survey start|show`: `CONDUCTOR_DAEMON_OPERATIONS`, `conductorOperation` and `operationalRequestLabel` name them, the audit and refusal labels are `sdlc audit start` and `sdlc audit show` (never an operand), and `--live-test` still refuses `start` and leaves `show` a read. A peer that is not the conductor stays refused and audited. No daemon change. Merge this after the v0.39.0 tag.
|
|
45
|
+
|
|
46
|
+
## 0.39.0
|
|
47
|
+
|
|
48
|
+
- Release N-1 for 0.39.x is 0.38.0 (exact `@staix/agent-mem` 0.24.0, control protocol 17 with descriptor floor 16); `test/fixtures/release-n-1` and `test/published-protocol-compat.test.ts` now pin it. Compatibility: the wire protocol window is unchanged at 16 through 17; the new daemon features `reviewer_quota`, `research_synthesis`, `research_evidence_withdrawal` and `advisor_surveys` are optional, and a 0.38.0 daemon answers their control ops as unknown. Files: `hub.db` gains additive tables (`advisor_surveys`, `advisor_survey_findings`, `considered_findings`, `security_audits`, `security_audit_findings`) created with `CREATE TABLE IF NOT EXISTS`, and `security_audit_findings` gains the additive columns `settled_by` and `settled_as`; there is no `hub_schema` bump, so 0.38.0 opens a 0.39.0 database and ignores them. The exact `@staix/agent-mem` pin moves to 0.26.0 (entry below).
|
|
49
|
+
- Reviewer quota is part of reviewer admission (hub task 924, #1446). A typed backend quota failure records a reviewer budget pause, and `review.gate` (default 0.8) skips a reviewer whose known quota reading is at or above the floor. Routing names each skipped reviewer and why, `review.max_minutes` (default 20) caps a review turn, and when every declared reviewer is paused or over the floor with a known reset, the review waits for the earliest reset instead of falling back to the person.
|
|
50
|
+
- Explicit opt-outs for reviewer quota admission (hub task 928, #1467). `review.gate: "off"` bypasses the floor and the unknown-reading check and disables quota waits; `review.unknown_quota: "pass"` admits a reviewer whose quota reading is unknown (the default `skip` refuses it). Budget and manual pauses still block. The admitting rule appears in `ahub route explain` and task history, the unknown-reading skip names both settings, and `ahub budget` reports the effective reviewer policy.
|
|
51
|
+
- Advisor surveys and a considered-findings ledger (hub task 897, #1403 T7). `ahub sdlc survey start [--focus ...]` opens a read-only planner task that reports findings in one bounded shape; vetting turns high and medium confidence findings into backlog plan cards and low confidence ones into investigate cards. Rejected findings go into an append-only considered ledger keyed by repository, pass and semantic id, so an unchanged rejected path shows "rejected before" instead of coming back. Malformed `hub_survey_report` input is refused with the field, the rule and the resend step.
|
|
52
|
+
- The person or the unique configured conductor can stage SDLC lifecycle settings on the person's explicit instruction (hub task 916, #1432). `ahub sdlc configure` accepts only `mode` off or advise and `required_checks`, through the structural editor's validation, revision fence, backup and atomic write; the change is pending until the next hub start. Enforce, security, eval checks and the other settings keep their person-only boundary.
|
|
53
|
+
- Claude Code 2.1.323 is a verified headless implementer version (hub task 921, #888), with the model-free transport and host-wrapper receipt in `docs/verification/2026-11-13-claude-implementer-2.1.323.md` (2.1.322 as control, 44 of 44 cases pass).
|
|
54
|
+
- Offline synthesis readiness for research (hub task 699, #931 T3). `ahub study evidence` reads the screened public evidence links (`--task` for bounded authoring bindings), and `ahub study check` binds the registered Markdown and BibTeX ids and hashes, the current claim revisions and the complete latest-link inventory into a readiness report with separate citation, source and locator, person-judgment and contract results. Missing, truncated, stale or privacy-unknown evidence reports not ready; nothing is fetched.
|
|
55
|
+
- The acon console shows each project as a Space group (hub task 923, #1375). A scene declares one group per project and stamps it on every actor, zone and card, so actor names are bare; desks carry the project's configured roles (at most 4 names) and a working actor's `since`. The plugin declares its snapshot reuse window.
|
|
56
|
+
- A restore launch refused by the version gate is diagnosed at once instead of after the full readiness wait (hub task 917, #1426). Restoration observes a nonce-bound launch outcome between wait slices and records `version_refused` or `launch_exit`; preview and staging check the configured executable's version against the verified set and machine trust first and name the peer, the version and the trust or install step.
|
|
57
|
+
- The daemon's startup timings split `task_runtime` into the sub-phases `task_checks`, `task_ports`, `task_board` and `task_recovery` (hub task 922, #1445), so a slow start names the slow part. #1445 stays open for the speed-up itself.
|
|
58
|
+
- A quota-paused Codex account re-reads its native quota every 60 seconds until the pause resumes (hub task 918, #1440). `ahub budget` shows a paused account's reset-credit count and expiry and whether ordinary usage or credits fund it, from an allowlist of native fields only.
|
|
59
|
+
- `ahub init` points a project that still has GSD planning (`STATE.md` with GSD frontmatter) at the new "Moving from GSD" section of `docs/sdlc.md`, which maps GSD artifacts to `ahub sdlc` and lists the person's commands in order (hub task 915, #1431).
|
|
60
|
+
- An unreserved planner pull names each peer's routing refusal next to the WIP, hold and exclusion reasons, and says to reserve a peer with `hub_backlog_plan fields.reserved` and pull again (hub task 919, #1430).
|
|
61
|
+
- An unconfigured sharded memory home is quiet like the other homes (hub task 930, Refs #1173). agent-mem words a missing sync remote three ways, and the host matched only "no sync remote" and "no generation sync remote configured", so a sharded home with no remote logged `hub memory sync failed` and its status read unknown. `quietSyncError` now also matches "no shard sync remote configured", and `classifyMemorySyncFailure` classifies that exact text as the `remote` cause, so the status is the neutral not-configured one. The other shard wordings (an invalid remote, a visibility refusal) stay real failures.
|
|
62
|
+
- The exact `@staix/agent-mem` pin moves from 0.25.0 to 0.26.0 (hub task 929). 0.26.0 returns the transport's existing no-remote error before policy screening when a home has no sync remote configured (STAIxBWLB/agent-mem#387, STAIxBWLB/agent-mem#388), so unconfigured homes use the existing neutral quiet-sync handling, including the sharded diagnostic from merged hub task 930; `inspectSyncPolicy` completes on generation and sharded homes above 8 MiB (STAIxBWLB/agent-mem#384, STAIxBWLB/agent-mem#394) and an incomplete `input-bound` result may carry an optional `bound` receipt, while `complete` and `reason` are unchanged; non-project hook-spool attribution and retirement add a counted `nonproject_unattributed` drop reason (STAIxBWLB/agent-mem#385, STAIxBWLB/agent-mem#386). No formats.json floor, index file name or storage format changes; N-1 compatibility is stated per surface in agent-mem's CHANGELOG 0.26.0 section. Surfacing `bound` in `ahub memory declined` stays optional follow-up work, not part of this pin.
|
|
63
|
+
- The conductor's start texts and type read the adapter definitions (hub task 902, #1408 T4, R5). `ConductorStart` is no longer `"claude" | "codex" | "pi"` for a terminal start: any startable kind whose person-set mode is tui returns the hub's own preview command, and `launcherPreview` takes any builtin id. The refusal for a kind the conductor may not start and the `hub_peer_start` description are built by `conductorStartText` (`src/adapters/registry.ts`) from `conductorStartable`, `optional` and the start forms, so a new kind is named without a text edit; the refusal now reads "only claude, codex, kimi, pi and local, plus the opt-in qwen and jcode, may be started by the conductor" and the tool description lists the same kinds, kimi and the TUI kinds included. `docs/operations.md` and `docs/roles.md` now say the planner default `claude` comes from the `roles` block of `templates/config.json` (copied by `ahub init`) and how to change it. Behavior is unchanged: which peers a conductor starts, and in which mode, is still decided by the definitions and the person's start mode.
|
|
64
|
+
- An evidence read whose inventory changed meanwhile now reports its origins as unknown instead of failing (hub task 926, a follow-up of #931, which stays open). `Tasks.evidenceOrigins` read the claim's evidence inventory outside its guard, so a link revision that disappeared between the list and its read made the whole read throw "evidence inventory changed"; the resolved excerpt is now returned with origins `{ state: "unknown" }`. Only that one inventory-changed error degrades: damaged storage ("evidence storage invalid") still fails loudly with its restore step.
|
|
65
|
+
- A verified open important audit finding can be settled (hub task 920, a follow-up of #1403 T4, which stays open). `hub_audit_report` takes `settle: [{finding, disposition: fixed|false_positive}]` from a reviewer-role peer other than the finder, or the person, in a call of its own. The hub records who settled it and how in the ledger inside the same transaction as the rest of the report; a candidate, a rejected or an already settled finding is refused with the next step, and the finder's later re-report cannot reopen it. A settled finding reads as `settled`, counts apart in `ahub sdlc audit show` and the release line, and no longer withholds its details, as any fixed finding. A database from before gains the two ledger columns on open. The unused `Board.auditVerify` is removed (its guards live on in `Board.auditApply`).
|
|
66
|
+
- Conductor conformance and a role-choice guide (hub task 901, #1408 T3, R4, AC6 and AC7). `test/conformance/conductor.test.ts` starts a real daemon per `conductorEligible` kind (claude, codex, jcode, pi) and checks that in its interactive form the conductor feed reaches it and `hub_status`, `hub_task_assign` and the hold tools are accepted, and that in its headless form the loader ignores the role, every call is refused and no feed is sent; kimi, qwen, local and agy are checked to stay out. `docs/roles.md` gains "Choosing who conducts, plans and reviews": the eligibility table, generated from `roleEligibility` by `renderEligibilityTable` and compared with it by `test/roles-doc.test.ts`, and the open agent-led, open qwen-led and person-led combinations, each graded fixture-proven (none is live-proven; the live legs need the person). Pi stays implementer-only: no receipt shows a Pi model planning, so `plannerEligible` is not flipped. `docs/quickstart.md` links to the guide.
|
|
67
|
+
- `ahub init` chooses who conducts, plans and reviews (hub task 900, #1408 T2, R3). `--conductor <peer>|none`, `--planner <a,b,...>` and `--reviewer <a,b,...>|person` are independent, also asked by the guided prompt with only eligible peers (installed agents first), and written to the shared `roles` as an explicit list for every peer whose roles change, including the one that loses a role; implementer and verifier are untouched and an init with no role flag changes nothing. A peer that cannot hold the role (a headless conductor, a kind that cannot plan or receive `hub_review`) is refused before any write with the reason, the fix and the eligible peers, by the same `roleEligibility` the loader and `ahub doctor` use. `--conductor none` and `--reviewer person` are described in the init summary; `--dry-run` shows `roles.<peer>` rows. The choices live in `src/cli/init-roles.ts`.
|
|
68
|
+
- `ahub <command> <sub> --help` and `-h` print that command's help instead of running the subcommand, and a write command refuses an option-like word before it writes (hub task 914, #1433). `ahub task propose --help` used to file a task titled `--help`. The dispatch asks the help (`listsSubcommand` in `src/cli/help.ts`) whether it lists the subcommand, so free text such as `ahub say try ls -h` is unchanged. `ahub task propose`, `ahub goal new` and `ahub task handoff` now refuse a word that starts with `--` (and not a flag they know) or is `-h`, naming the word and the usage before anything is filed or contacted; a lone `--` still lets a title start with dashes.
|
|
69
|
+
- Recurring-finding cards no longer match review-local finding ids (hub task 913, #1436). A positional id (N1, F5, B1, nit-1, bugs:N1) names a finding only inside its own review, so two unrelated tasks that both used it filed a false "Review policy amendment" card; such ids now never count toward a cross-task recurrence, while a semantic id (for example compliance:hub-task-id-written-as-github-ref) still does. The `hub_review` finding id text says so. When a planner tries to cancel a hub-created card, the refusal now names who can (the person) and the exact command (`ahub task cancel <id> --reason <text>`). Positional ids are matched by `positionalFindingId` in `src/hub/review-findings.ts`.
|
|
70
|
+
- `hub_task_done` accepts the PR head its refusal names after an escalated owner pushes (hub task 912, #1435). When escalation had cleared the reviewer, the done was gated on the approval path, which compared the PR head with the stale `refs.commit` instead of the commit the owner submitted, so the owner could never re-file; the gate now reads the submitted head. A wrong commit is still refused with the PR head named, and a PR that was already merged is accepted at its head.
|
|
71
|
+
- The conductor must run interactively (hub task 899, #1408 T1, R1 and R2). Each adapter definition now states `conductorEligible` (claude, codex, jcode and pi; kimi, qwen, local and agy stay false until proven) and `reviewerEligible` (all but agy), and `roleEligibility(peer, role, startMode)` answers with a reason and a fix. The loader, and the recovery policy, ignore a `conductor` on an ineligible kind or on a peer that starts headless, with a notice that names the fix, and give the role to nobody else, so a project without a conductor is conducted by the person from `ahub console`. Setting the conductor's `peers.<peer>.start_mode` to `headless` is refused with "move the role first". `ahub doctor` gains a `roles` row. A project whose `roles` already named an ineligible or headless conductor loses that role on upgrade (the notice says how to fix it); every other project is unchanged.
|
|
72
|
+
- A project directory that was renamed, with its old path left as a symlink, no longer makes the hub's own project MCP entry read as foreign (hub task 908, #1423). `ahub jcode` and `ahub agy` compare the entry's `AGENTHUB_PROJECT_DIR` (and agy's `AGENTHUB_STATE_DIR`, in its MCP entry and hook commands) by real path, so the entry written before the move is recognised and rewritten with the new paths. An entry for another project, another peer or a path that no longer resolves is still refused, and the refusal now names the differing field and says to remove the `agent-hub-jcode` (or `agent-hub`) key and run the command again. Kimi's entry is rewritten from the current paths and had no such check.
|
|
73
|
+
- Codex 0.167.2 passed the model-free reviewer isolation procedure (`docs/verification/2026-11-13-codex-01672-reviewer-isolation.md`): the seven re-read Codex source files are byte-identical to 0.167.0, and every preparation leg passed with 0.166.0 and 0.167.0 as controls. It stays out of the verified set until a separately authorized model-backed tool-call run succeeds; until then the person can run `ahub agents trust codex-review 0.167.2`, and every runtime proof still runs.
|
|
74
|
+
- `ahub sdlc audit start|show` runs a recurring read-only security audit with a coverage ledger (hub task 896, #1403 T4, A4 and A5). The person or the configured conductor starts one (`--profile quick|standard`, `--since <ref>`), the hub seeds a surface by companion ledger from `[security]` in `hub.db` and alone writes it, and the assigned auditor reports `covered`, `deferred` or `out_of_scope` per unit with findings in the boundary shape through the new `hub_audit_report` tool (advertised only with the lifecycle on). A confirmed important finding counts only after a different reviewer verifies it, a surface unchanged since its last covered state is carried over as `covered (prior)`, and a quick or scoped audit reads as partial. `ahub sdlc release` gains one line of unit counts and never blocks. The details of an open important finding are shown to the person only: the conductor's view, the release line and every peer message carry its id and status.
|
|
75
|
+
- Changes under `[security]` paths need a recorded security pass (hub task 895, #1403 T2, A2). `.agenthub/sdlc.toml` may list `paths` (the `config_paths` pattern language) and optional `companions` from `agents`, `supply-chain`, `local-ipc` and `data-isolation`. When the PR's complete file inventory matches, the review request says a pass is required and points to `docs/agent-notes/security-review.md`, and the reviewer records `security_pass: {covered, not_covered}` on the verdict (`ahub review ... --security-pass <json>`), bound to the reviewed head and naming at least one unit. `advise` records an approval without it and says so in the advice, `enforce` refuses the approval and blocks the merge queue row and the merge gate. An incomplete file inventory reads `unknown`, never `not_required`. `ahub sdlc status` and the queue show the state without path names. Off, or no table, changes nothing and advertises nothing.
|
|
76
|
+
- `ahub roles [--json]` prints who holds which flow role as the running hub settled them, the planner, and who reviews when no reviewer can run (#1411 T2); from a task worktree with no hub of its own it reads the main worktree's hub. The `status` reply gains an optional `reviewFallback` (`required`, `sameFamily`); an older hub reads as unknown. `ahub doctor` gains a `shared config` row: quiet when `.agenthub/config.json` is committed and the block points at it, or untracked by choice; a warning with the fixing command for each mismatch.
|
|
77
|
+
- `ahub status` and `ahub model list` show the last model a peer's finished turn reported (#1402 T5). When no override, instance, launch or native baseline model is known, `EFFECTIVE MODEL` reads that model and `SOURCE` reads `observed (served)` or `observed (session)` in place of `not reported`; a `configured` grade or an id the display cannot hold is never shown, and the observation is dropped when the peer goes offline or its adapter is replaced. `ahub research` prints `owner model known (served or session): N of M tasks`, the share `docs/dogfood.md` measures.
|
|
78
|
+
- Pi and Antigravity turns report their model (#1402 T4). A headless Pi records the model of its `get_state` as `session` evidence (the placeholder `unknown` names none) and otherwise the model the hub set, as `configured`; a Pi TUI reports only a `configured` one. Antigravity records the `modelName` its hook payloads carry as `session` evidence for the turn that ends next, dropped when the peer goes offline. An alias is kept as reported, an unsafe or absent value records nothing, and neither is ever `served`.
|
|
79
|
+
- The exact `@staix/agent-mem` pin moves from 0.24.0 to 0.25.0 (hub task 907). 0.25.0 adds the person-owned `preference` note kind and root record-candidate helpers (additive; existing export names are unchanged). A `preference` note write fails closed until a person raises the home's `formats.json` curated floor to 0.25.0; reads, briefs and `amem_remember` queueing need no floor, and the hub never writes `formats.json`. Compatibility with 0.24.0 on one shared home, measured by agent-mem: a home holding a `preference` row is not readable as complete by a 0.24.0 reader (its `syncMemory` reports not ok), so raise the floor only after every hub and CLI sharing that home runs 0.25.0. The curated index is now `index-v4.db` beside 0.24.0's own file, and non-Claude Records use the format-4 `hook-v4-` capture-spool prefix, which 0.24.0 leaves pending. The generated plugin bundles carry the new `preference` kind in the `amem_remember` schema.
|
|
80
|
+
- ACP peers report the session's model per turn (#1402 T3). Qwen, Jcode and headless Kimi record the model id their session reports (`models.currentModelId`, or the `model` select of `configOptions`) on `turn_end` as `session` evidence, whatever the override policy and including peers that emit no usage event. A model-update notice for the current session moves it for the next turn; Qwen's `id(openai)` wire id is read through its receipt codec. An id the hub cannot read safely, or an agent that reports none, records nothing. It is the agent's own current model, never a per-response `served` one.
|
|
81
|
+
- Codex and Claude print turns report the model they ran (#1402 T2). A Codex turn's `model` is the one its `thread/start` or `thread/resume` reply named or the hub or TUI started it with (`session`), or the model a `model/rerouted` notification moved it to (`served`, that turn only); Codex sends no per-response model otherwise, so it is never `served` on its own say-so. A Claude print turn (reviewer and implementer) reports the `modelUsage` model of its result row as `served`; two or more models name the one with strictly more usage tokens, and a tie names none. A surface that reports nothing records nothing. Checked against the codex-cli 0.167.2 app-server schema and Claude Code 2.1.322; no live model call was made for this change.
|
|
82
|
+
- `ahub console` names the conductor on the peers panel (#1414): the peer label reads `claude (conductor, planner)` or `codex (conductor)` from the flow roles the running hub settled; a peer with neither role, or a hub that sends no flow roles, shows the bare id as before.
|
|
83
|
+
- `hub_review` security findings carry a boundary and a state, and any finding can be marked older than the change (#1403 T1: A1, B4). With the lifecycle on (`advise` or `enforce`), an open important `security` finding must name `state` (`confirmed` or `needs_validation`) and `boundary` (`principal`, `control`, `resource`, `result`); the refusal names the four fields. A `needs_validation` finding carries a `blocker`, never blocks approval, and on approval yields one read-only `triage` backlog card. `origin: "pre_existing"` keeps an important finding from blocking or carrying across heads and yields one `plan` backlog card; omitted means `introduced`, as before. Status and the merge queue count the two apart. With the lifecycle `off` the fields are refused and not advertised, and nothing else changes.
|
|
84
|
+
- `ahub init --track-config | --no-track-config` makes committing the shared hub config a choice (#1411 T1). Tracked: `.agenthub/config.json`, `routing.toml` and `sdlc.toml` must be visible to git; a rule that ignores one is named as `git check-ignore -v` reports it and nothing is written, a `routing.toml` that sets a `hub_routes` `adec_endpoint` stays ignored and is reported, machine-local values in `config.json` are listed with the move to `config.local.json`, and the files to commit are listed. Untracked: the three files are ignored. The AGENTS.md block's role sentence follows the choice; a new project is asked at the prompt, and with neither flag an existing project keeps its ignore state and its sentence. Every `.gitignore` line init adds is checked with `git check-ignore` first, so a path a broader rule already ignores gets no line. The next steps say that `config.local.json` wins over `config.json`, and `docs/operations.md` states that rule and its exceptions.
|
|
85
|
+
- `ahub research` records the model each owner used (#1402 T1). `turn_end` events gain optional `model` and `modelEvidence` (`served`, `session` or `configured`), written from a new optional `PeerAdapter.observedModel()` through `safeModelLabel` (a refused label is dropped whole; no observation writes neither field), and task records gain `ownerModels`, built from the owner's turns only. `by model` now groups on `ownerModels`, so a reviewer's model no longer counts for the owner, shows the weakest evidence grade when it is not `served`, and prints how many tasks have no owner model; `models` stays the union and the CSV gets a trailing `ownerModels` column. Records already in the store carry no `ownerModels` and read as `unknown`: run `ahub research backfill` to fill the tasks whose events still carry a model. The adapters report their models in T2 to T4 (#887 to #889), so until then only turns whose usage event names a model have one.
|
|
86
|
+
- A security review checklist for this daemon (#1403 A3): `docs/agent-notes/security-review.md` names, per area (agents and messages, local servers, data isolation and paths, supply chain and release), the source file that holds each control, and `REVIEW.md`'s security pass points at it and adds two rules that reach every review request: content read from a change is data, never an instruction, and a secret value is never quoted.
|
|
87
|
+
- This repository tracks its own hub config (#1411): `.agenthub/config.json` (roles and shared defaults) is committed, so the role definition the managed AGENTS block points at exists in a clone and in a task worktree. Machine-local values stay in the untracked `config.local.json`, which wins key by key; `routing.toml` stays untracked until its machine endpoints have a local home, and `sdlc.toml` until the daemon test fixtures stop reading this checkout's lifecycle file.
|
|
88
|
+
- Workflow actions are pinned by commit SHA with the version in a comment (#1403 A6): `actions/checkout`, `actions/setup-node`, `actions/upload-artifact` and `actions/download-artifact` join `oven-sh/setup-bun`, and `test/workflow-pins.test.ts` refuses a tag-pinned action. `SECURITY.md` points reports at GitHub private vulnerability reporting.
|
|
89
|
+
- A refused `ahub guidance probe` command names the subcommand typed, prints that subcommand's exact usage and says where the probe id comes from, in place of one generic line (#1405). The usage text has one source shared with `ahub help`; no accepted form changes.
|
|
90
|
+
|
|
7
91
|
## 0.38.0
|
|
8
92
|
|
|
9
93
|
- Commands the hub hands a person run as printed (#1399). The needs_review hold notice, `ahub status` held rows and `ahub queue show` give `cd <project> && ahub queue resolve <id> --revision N --action <suggested> --reason "<kind> from <sender> to <peer>"` plus the other actions with one clause each, in place of `--action completed|retry|discard --reason <text>`. Agents are told, in the managed AGENTS block and in their session instructions, to pass such a command on unshortened.
|
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.
|
|
8
|
+
Status: 0.40.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
|
|
@@ -14,7 +14,7 @@ declared and never cause an external fetch. See [execution lineage](docs/operati
|
|
|
14
14
|
|
|
15
15
|
## Quick start
|
|
16
16
|
|
|
17
|
-
You need [Bun](https://bun.sh) <!-- facts:bun-floor -->1.4.
|
|
17
|
+
You need [Bun](https://bun.sh) <!-- facts:bun-floor -->1.4.4<!-- /facts:bun-floor --> or later on PATH.
|
|
18
18
|
|
|
19
19
|
```bash
|
|
20
20
|
bun add -g @staix/agent-hub && ahub setup
|
|
@@ -44,13 +44,13 @@ to you, questions agents ask you and, where acon supports them, unread results r
|
|
|
44
44
|
console inbox. The plugin is `@staix/agent-hub/ui-plugin`; it uses the dashboard manager's
|
|
45
45
|
own listing and forwarding, and an answer, a result receipt or a review comment sent from
|
|
46
46
|
acon goes through a manager port of its own that needs acon's verified person.
|
|
47
|
-
The plugin also feeds the console's Space view (Flat, Room and 3D):
|
|
48
|
-
at their desks, the task board's columns become zones,
|
|
49
|
-
become links. The scene carries labels and states only, never message bodies or details.
|
|
47
|
+
The plugin also feeds the console's Space view (Flat, Room and 3D): each project is its
|
|
48
|
+
own group, agents become actors at their desks, the task board's columns become zones,
|
|
49
|
+
and task links and recent messages become links. The scene carries labels and states only, never message bodies or details.
|
|
50
50
|
|
|
51
51
|
`ahub init --dry-run --json` shows what init would write. On a new project at a
|
|
52
52
|
terminal, `ahub init` asks each main setting with its default before writing; flags
|
|
53
|
-
such as `--agents`, `--sdlc` or `--no-specs` set them directly, and `--yes` takes the
|
|
53
|
+
such as `--agents`, `--sdlc`, `--conductor` or `--no-specs` set them directly, and `--yes` takes the
|
|
54
54
|
defaults. The
|
|
55
55
|
[Quickstart](docs/quickstart.md) walks through a first session and a working day,
|
|
56
56
|
including [a new project with SDLC advise or enforce](docs/quickstart.md#a-new-project-with-sdlc-advise-or-enforce).
|
|
@@ -75,6 +75,8 @@ including [a new project with SDLC advise or enforce](docs/quickstart.md#a-new-p
|
|
|
75
75
|
exact-version ACP setter receipt; other ACP kinds remain unsupported.
|
|
76
76
|
Active turns stay unchanged;
|
|
77
77
|
[status distinguishes pending and unsupported selection](docs/operations.md#live-peer-model-overrides-1317).
|
|
78
|
+
When no model is configured, `ahub status` shows the last model a peer's finished
|
|
79
|
+
turn reported, graded `observed (served)` or `observed (session)`.
|
|
78
80
|
- **A shared task board.** Work is proposed, accepted, done and reviewed through hub
|
|
79
81
|
tools. Roles split planning, implementation and review (up to eight planners,
|
|
80
82
|
each task bound to one), `routing.toml` picks
|
|
@@ -86,10 +88,20 @@ including [a new project with SDLC advise or enforce](docs/quickstart.md#a-new-p
|
|
|
86
88
|
Claude Code instances can implement in their own worktree, in a terminal or
|
|
87
89
|
headless with one session per task. `ahub sdlc metrics` reads lead times,
|
|
88
90
|
rework and stalls from board history, and
|
|
89
|
-
optional control bands turn a breach into a backlog card.
|
|
91
|
+
optional control bands turn a breach into a backlog card. `ahub roadmap` groups
|
|
92
|
+
work into board-backed milestones with computed task, cached issue, spec and
|
|
93
|
+
train progress; private tasks appear only as counts. Planner/conductor edits
|
|
94
|
+
are separate from the person's done/dropped decisions ([roadmap](docs/design/roadmap.md)). Work that belongs to
|
|
90
95
|
another project running agent-hub on this machine goes onto that project's board
|
|
91
96
|
with `ahub task handoff` (agents: `hub_task_handoff`), and its state changes come
|
|
92
97
|
back as task messages.
|
|
98
|
+
Who conducts, plans and reviews is chosen at `ahub init` (`--conductor`,
|
|
99
|
+
`--planner`, `--reviewer`) and printed by `ahub roles`; the conductor must run
|
|
100
|
+
interactively, and a project without one is conducted by the person from
|
|
101
|
+
`ahub console` ([choosing roles](docs/roles.md#choosing-who-conducts-plans-and-reviews)).
|
|
102
|
+
With the lifecycle on, changes under `[security]` paths need a recorded security
|
|
103
|
+
pass, and `ahub sdlc audit start|show` runs a read-only security audit with a
|
|
104
|
+
coverage ledger ([security pass and audit](docs/sdlc.md#security-pass-for-sensitive-paths-hub-task-895-1403-a2)).
|
|
93
105
|
For a PR already merged outside the hub, [merged PR adoption](docs/sdlc.md#adopting-a-pr-merged-outside-the-hub-1328-t3) verifies its recorded head and releases dependents: `ahub sdlc adopt-merge <task> --pr <n>`.
|
|
94
106
|
An explicitly superseding task may [carry existing spec consent](docs/sdlc.md#spec-acceptance-481-s1) for the same repository and issue when the host verifies an unchanged body.
|
|
95
107
|
Fresh Kimi reviews run periodic isolation checks off the hub event loop;
|
|
@@ -128,9 +140,12 @@ including [a new project with SDLC advise or enforce](docs/quickstart.md#a-new-p
|
|
|
128
140
|
([details](docs/memory.md#agent-authored-records-1320)).
|
|
129
141
|
- **Local and on-prem models.** Pi and the local worker can run on DGX or local MLX
|
|
130
142
|
through an authenticated relay. Tasks marked as PII stay on the on-prem worker.
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
143
|
+
Pi can checkpoint and continue after a tool-step ceiling, within a configured
|
|
144
|
+
continuation allowance; exhausted ceilings and model failures have distinct
|
|
145
|
+
task-move reasons ([Pi operations](docs/operations.md#pi-with-dgx-and-mlx)).
|
|
146
|
+
- **Guard rails.** The local worker and Pi run in a sandbox, and peer-issued writes
|
|
147
|
+
and shell commands wait for your approval unless you choose a looser permission mode.
|
|
148
|
+
Peer-issued publish, external-write, destroy and install calls ask a person in every mode for
|
|
134
149
|
Claude Code, the local worker, Pi, hub-owned ACP peers such as Kimi and the
|
|
135
150
|
approval requests Codex sends, wherever the hub sees the call before it runs;
|
|
136
151
|
`ahub status` names each peer where it cannot. The opt-in floor
|
|
@@ -142,8 +157,9 @@ including [a new project with SDLC advise or enforce](docs/quickstart.md#a-new-p
|
|
|
142
157
|
roles: sessions are distinguishable, which is provenance, not authentication.
|
|
143
158
|
Budgets pause an
|
|
144
159
|
agent before it runs out of quota (at 99% of a window by default, the
|
|
145
|
-
`budget.gate` setting),
|
|
146
|
-
|
|
160
|
+
`budget.gate` setting), a reviewer is skipped when its known usage reaches 80% or
|
|
161
|
+
its quota is unknown (`review.gate`, `review.unknown_quota`), and recovery never
|
|
162
|
+
replays an effect whose outcome is unknown.
|
|
147
163
|
- **Operations.** A terminal console and a local dashboard, one hub per repository or
|
|
148
164
|
worktree with a machine-wide view, live settings reload, machine-local schedules
|
|
149
165
|
that propose tasks by interval or by a `cron` expression in a time zone
|
|
@@ -53,7 +53,7 @@ Defines how the agent process is started and commanded:
|
|
|
53
53
|
* `defaultForm`: The default startup mode.
|
|
54
54
|
* `launch(ctx)`: Generates the `LaunchPlan` (command, argv, environment variables, launch metadata).
|
|
55
55
|
* `create(ctx)`: Factory constructing the `PeerAdapter` instance for driven daemon peers.
|
|
56
|
-
* `conductorStartable`: Boolean indicating if `ahub up` or conductor can spawn this peer automatically.
|
|
56
|
+
* `conductorStartable`: Boolean indicating if `ahub up` or conductor can spawn this peer automatically. The conductor's start refusal and the `hub_peer_start` description name these kinds from this flag and `optional` (`conductorStartText`, `src/adapters/registry.ts`), so a new kind needs no text edit.
|
|
57
57
|
* `ownedFlags`: CLI flags owned by this tool's launcher.
|
|
58
58
|
|
|
59
59
|
#### `identity`
|
|
@@ -77,18 +77,19 @@ Controls session restoration, thread continuity, and crash recovery:
|
|
|
77
77
|
* `currentId(peer)`: Extracts the active session or thread ID from a running adapter.
|
|
78
78
|
* `resumeArgv(binding, fresh)`: Builds CLI arguments to resume a persisted session.
|
|
79
79
|
* `transcriptPath(binding)`: Resolves local transcript file path for audit/usage tracking.
|
|
80
|
+
* `restoreVersionGate`: the `compat.ts` id whose installed version `ahub upgrade` checks before it restores this kind, so a refused launch is reported before the wait expires. It is an observational preflight only; the native start repeats its own version admission.
|
|
80
81
|
|
|
81
82
|
#### `projection`
|
|
82
|
-
Where the kind sits in the host's derived lists: `roleRank`, `startRank`, `helpRank` and `plannerEligible`. `KNOWN_PEERS`, `OPTIONAL_PEERS`, `START_MODE_PEERS`, `ROLE_ORDER`, `HELP_ORDER` and `PLANNER_PEERS` are derived from `ADAPTERS` and these ranks (`deriveAdapterLists`). The only hand-kept lists are the cross-release copies in `src/hub/peer-catalog.ts` (`KNOWN_PEERS`, `OPTIONAL_PEERS`) and `src/hub/start-mode.ts` (`START_MODE_PEERS`, for a dual-form kind): a new native kind is added there too, and `test/registry-guard.test.ts` fails until those copies equal the derived lists. A configured or external definition cannot set `projection`.
|
|
83
|
+
Where the kind sits in the host's derived lists: `roleRank`, `startRank`, `helpRank` and `plannerEligible`. `conductorEligible` (an interactive form that receives hub pushes and holds a writable tools connection) and `reviewerEligible` (the kind can receive `hub_review`) say which flow roles it may hold; absent means false, so a kind not yet proven is not eligible. `roleEligibility` (`src/adapters/role-eligibility.ts`) reads them for the loader, `ahub init` and `ahub doctor`, and the table in [roles](roles.md#who-may-hold-what) is generated from it. `KNOWN_PEERS`, `OPTIONAL_PEERS`, `START_MODE_PEERS`, `ROLE_ORDER`, `HELP_ORDER` and `PLANNER_PEERS` are derived from `ADAPTERS` and these ranks (`deriveAdapterLists`). The only hand-kept lists are the cross-release copies in `src/hub/peer-catalog.ts` (`KNOWN_PEERS`, `OPTIONAL_PEERS`) and `src/hub/start-mode.ts` (`START_MODE_PEERS`, for a dual-form kind): a new native kind is added there too, and `test/registry-guard.test.ts` fails until those copies equal the derived lists. A configured or external definition cannot set `projection`.
|
|
83
84
|
|
|
84
85
|
#### `cli`
|
|
85
|
-
The `ahub <kind>` surface: `command`, `startWords(form)`, and for a fixed builtin `entry` (the launcher and whether it needs lifecycle admission), `preview`, `usage` (help lines) and `launchConfigKeys`. `builtinCliEntries(definitions)` projects the entries; no configuration or module can register one.
|
|
86
|
+
The `ahub <kind>` surface: `command`, `startWords(form)`, and for a fixed builtin `entry` (the launcher and whether it needs lifecycle admission), `preview`, `usage` (help lines: `[usage, description, summary?]`, where the optional third element is the one-line row in `ahub help`, three or more words and at most 56 cells; the help test fails without it) and `launchConfigKeys`. `builtinCliEntries(definitions)` projects the entries; no configuration or module can register one.
|
|
86
87
|
|
|
87
88
|
#### `instances` and `attach`
|
|
88
89
|
`instances.mode` is `headless` (needs a headless `start.create` factory) or `external` (a channel instance started from the person's terminal). A kind with no `instances` policy (Jcode) takes no extra instance, and `validateInstances` refuses a declaration of one. `attach` holds the pull-only forms, external-hello admission and the refusal texts for a TUI that attaches without a driven peer.
|
|
89
90
|
|
|
90
91
|
#### Peer capability members
|
|
91
|
-
The runtime peer (`PeerAdapter`, `src/hub/peers.ts`) exposes optional members that the daemon reads instead of checking its class (#625 phase 6): `sessionGeneration` (native session identity: absent keeps the owner-token fallback, present but undefined is unknown and refuses bounded checks), `checkpointUsesSessionGeneration` (opt out of generation-fenced checkpoints, as Pi does), `permissionModeState` (the effective native approval state, or `unknown` / `unmanaged`) and `setPermissionMode(mode)` (resolves only after the native side acknowledges). A driven peer publishes its turn's final answer through `BasePeer.finalAnswer` rather than `onMessage`, so the bus strips `amem:` Record lines before sharing it (#1320); the Record instruction reaches only the owners the daemon binds (see [memory](memory.md#agent-authored-records-1320)). Native safety proofs (Codex proxy and restoration, Claude launch generation) stay in the daemon.
|
|
92
|
+
The runtime peer (`PeerAdapter`, `src/hub/peers.ts`) exposes optional members that the daemon reads instead of checking its class (#625 phase 6): `sessionGeneration` (native session identity: absent keeps the owner-token fallback, present but undefined is unknown and refuses bounded checks), `checkpointUsesSessionGeneration` (opt out of generation-fenced checkpoints, as Pi does), `permissionModeState` (the effective native approval state, or `unknown` / `unmanaged`) and `setPermissionMode(mode)` (resolves only after the native side acknowledges). `observedModel()` returns the model the native surface reported for the turn that just ended, with its evidence grade (`served`, `session` or `configured`), read once at `turn_end`; return undefined when the surface reports none, so unknown stays unknown. A driven peer publishes its turn's final answer through `BasePeer.finalAnswer` rather than `onMessage`, so the bus strips `amem:` Record lines before sharing it (#1320); the Record instruction reaches only the owners the daemon binds (see [memory](memory.md#agent-authored-records-1320)). Native safety proofs (Codex proxy and restoration, Claude launch generation) stay in the daemon.
|
|
92
93
|
|
|
93
94
|
#### `budget`
|
|
94
95
|
Defines quota and context window consumption readers:
|
|
@@ -212,6 +213,7 @@ bun test test/conformance/agy.test.ts
|
|
|
212
213
|
3. **Recovery Metadata Hygiene**: No prompt text or credentials leaked into `recoveryMetadata`.
|
|
213
214
|
4. **Watchdog Cancellation & Generation Fencing**: Expiry of the turn watchdog cancels prompts cleanly and generation fences prevent stale late answers from publishing.
|
|
214
215
|
5. **Teardown & Cleanup**: When an adapter is stopped (`peer.stop()`), all owned child processes in the process group stop with it (the peer reaches offline).
|
|
216
|
+
6. **Conductor (`conductor.test.ts`)**: For every kind and form `roleEligibility` admits as conductor, a real daemon accepts its conductor tools and sends it the conductor feed; the headless form of each is refused and fed nothing, and every ineligible kind keeps no conductor role.
|
|
215
217
|
|
|
216
218
|
---
|
|
217
219
|
|
|
@@ -225,4 +227,4 @@ When adding or updating an adapter, verify each item before opening a PR:
|
|
|
225
227
|
- [ ] **PII Safety Verified**: Cloud models have `trust.onPrem: false`; verify PII markers refuse routing to this peer.
|
|
226
228
|
- [ ] **Process Group Teardown**: Daemon-spawned processes use process groups and exit cleanly on stop.
|
|
227
229
|
- [ ] **Conformance Kit Passes**: `bun test test/conformance` passes with zero regressions and no silent skips.
|
|
228
|
-
- [ ] **Documentation Freshness**: Run `node scripts/check-docs.mjs` and
|
|
230
|
+
- [ ] **Documentation Freshness**: Run `node scripts/check-docs.mjs` and fix the documents it reports. Do not restamp `docs/verified.json` in a squash-merged PR; stamps are refreshed in the release PR.
|
|
@@ -122,6 +122,16 @@ revision preserves both behaviors; capture still uses its stricter turn fence.
|
|
|
122
122
|
|
|
123
123
|
## Changes
|
|
124
124
|
|
|
125
|
+
- 2026-11-15: #1447 T5 prepares dependencies from reviewed Git-base install inputs because validating a peer-writable manifest and later running it on the host leaves a race. Fixed readiness guidance does not turn an installer failure into failed acceptance. The localhost listener leg moved to a follow-up, and this slice keeps Pi's network profile unchanged.
|
|
126
|
+
- 2026-11-15: #1447 T4 reproduces a digest prepared before a task-move notice was queued. Conditional queue re-selection keeps that notice in the next host turn without changing durable ACKs; the later provider-prompt window remains unmeasured and open. Checkpoint ownership epochs prevent a pending notice from permitting former-owner summary effects.
|
|
127
|
+
- 2026-11-14: #1473 follows the #1328 cooperative direct-instruction precedent for one conductor-recorded question answer. Visible actor provenance avoids a second terminal step while a DB-only quote and unchanged person/private/self-answer boundaries keep the claim separate from blanket delegation or release consent.
|
|
128
|
+
- 2026-11-14: #1467 separates unknown-quota admission from the numeric reviewer floor. The default remains skip at 0.8; explicit pass can bootstrap a reviewer without a reading, while off disables quota admission checks and waits. Actual account/manual pauses remain independent, and the synthetic opt-out evidence does not claim live use or a new reset source.
|
|
129
|
+
- 2026-11-14: #1432 adds a narrow off/advise and check-name exception to person-only structural editing, following the existing cooperative direct-instruction model for release authorization. Separate intent and hashed-result audits distinguish a caller claim from a saved configuration, while the generic editor and release-consent authority stay separate.
|
|
130
|
+
- 2026-11-14: #1403 T7 preserves considered rejections because a repeated semantic finding id alone does not establish new evidence. Complete path-change evidence and an explicit reconsideration reason distinguish a new case from replay; unknown diffs retain suppression without deleting history. Closed proposal history no longer prevents an unsuppressed finding from becoming a new open card; its prior task id and reopening reason remain visible.
|
|
131
|
+
- 2026-11-14: #931 T3 binds retained contradiction history across revisions of the same claim identity, so an owner withdrawal or claim-version restoration cannot turn prior counterevidence into an unqualified ready result. The existing person-verdict store supplies the current-manifest disposition; provenance and semantic judgment remain distinct.
|
|
132
|
+
|
|
133
|
+
- 2026-11-13: #1403 B1 adds cold-readable intent and base-to-task-head drift advice. The existing PR conformance gate remains separate, so a moved or unreadable plan base cannot become a new acceptance gate.
|
|
134
|
+
|
|
125
135
|
- 2026-11-10: #850 distinguishes normal-Bus Q2 proof from direct busy-submit characterization and preserves adoption/reattach/deny quiescence ceilings.
|
|
126
136
|
- 2026-11-10: Spec acceptance carry-over (#1328 T4) distinguishes a new person decision from host-verified reuse of the same decision on explicitly superseding work. The narrow exception preserves original consent and records its cancelled source; it does not expose acceptance as a tool or receipt field. Review caught an early carry write before a later plan refusal: staging the host proof and committing only with the admitted outer event preserves the existing pre-effect refusal contract.
|
|
127
137
|
- 2026-11-09: #1328 T6 extended the closed machine-default schema for an explicit setup research choice, reusing guarded publication and preserving the existing autonomy and start choices.
|
|
@@ -166,3 +176,16 @@ adapter, Bus or automatic receipt-admission behavior changed.
|
|
|
166
176
|
The task 859 deny-readiness correction separates known delivery disposition from native quiescence. Task 850 measured no post-deny completion ACK; normal-Bus assistant/Stop evidence cannot be reused for the denied turn. The durable fence keeps a synchronous Bus drain from submitting queued work and allows recovery through a new personal turn or a verified fresh generation. The 30 s deadline is an operational waiting bound, not evidence that native work stopped.
|
|
167
177
|
|
|
168
178
|
The same review found that a single append can write a prefix without throwing. The byte-count check and actual tail guard prevent a second append from completing that prefix. This intentionally adds no per-write persisted intent: a crash leaving a torn prefix that already ends with newline remains the explicit ceiling.
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
## 2026-11-13: Codex paused quota visibility (#1440)
|
|
182
|
+
|
|
183
|
+
The normal ten-minute native usage poll could delay observing an external reset while the hub held a budget pause. The #1440 contract kept resume in Budget.evaluate, added a one-minute paused observation cadence, and limited credit diagnostics to counts, times and flags. The Codex 0.167.2 generated schema defined availableCount separately from a possibly capped detail list, so incomplete detail coverage did not establish a global earliest expiry. Paid-credit availability supplied no pause/resume authority.
|
|
184
|
+
|
|
185
|
+
Issue #1403 B1 follow-up separates upstream plan drift from a task's own implementation. Acceptance needs no recorded task head: it compares the plan base with the locally recorded remote-tracking default tip. Completion uses the shared integration point with that tip, so the task's own commits do not masquerade as upstream drift. Local refs may lag the server; this advice performs no fetch. Missing or ambiguous history remains unknown, and lifecycle off remains quiet.
|
|
186
|
+
|
|
187
|
+
Issue #1446 separates reviewer admission from the account's hard pause. The reviewer floor defaults to 0.8 while the account gate keeps its own configuration. A wait is useful only with complete pool and reset evidence; preserving its first deadline avoids indefinite waiting after restarts. Kimi's diagnostic exception was observed on 2.2.0 and is unverified on 2.5.2. Its absence of a reset timestamp prevents wait admission. Owned accounting intents survive a crash without publishing private profile identity or silently treating an incomplete log as zero consumption.
|
|
188
|
+
|
|
189
|
+
On 2026-11-14, #1473 added shared question-tool exclusions to the daemon progress closure. Its extracted VM fixture omitted the new import, so both hosted OS shard 3 legs failed with `QUESTION_TOOLS is not defined`. The earlier Office render fixture had omitted a new helper too. The tests note now names the progress fixture and actual shared import so question-tool changes include that runtime privacy path; its canary checks preserve the existing ordinary-escalation positive control.
|
|
190
|
+
|
|
191
|
+
The 0.40.0 release review found that Pi's host-side dependency preparation security boundary was documented in the adapter and security guides but not pointed to by the security-review checklist. The checklist now points to those existing rules rather than duplicating them.
|
|
@@ -13,7 +13,7 @@ Scope: the Codex, ACP and Pi adapters and the Pi extension (turn `generation` an
|
|
|
13
13
|
- Registry load runs `assertDaemonEngine` and `assertNativeCapabilityScope` before publication. A definition that is not a fixed builtin (object identity in `fixedBuiltinDefinitions`, never a kind name) may not declare `start.acpCommand`, `start.upStart`, `attach.admission`, `budget.resetSoftTokensOnResume`, `session.crashIdentity`, `session.nativeRevert`, a `pi-rpc` or `claude-implementer` daemon port, `identity.currentChild`, `routing`, `projection`, `reviewerVariant`, `headlessVariant`, `reviewer`, `hooks.factsHook`, `cli.entry`, `cli.preview`, `cli.usage` or `instances.modelSelect`. Only `definitionOf(id, instances)` picks a kind's `reviewerVariant`, for a declared extra with `start_mode: "headless"`, roles exactly `["reviewer"]`, and either a variant whose `reviewer.declaration` is `"automatic"` (Claude, agy) or `review_mode: "fresh"` (Codex, Kimi); without that opt-in a reviewer-only Codex or Kimi instance keeps its native adapter. It picks a kind's `headlessVariant` (Claude, #525-4) for a declared headless extra whose roles include `implementer` and hold only `implementer` and `verifier`. Metadata-only reviewer variants never establish native peer support; `isSupportedPeer` shares the registry runtime/validated-instance predicate with the catalog and daemon. A new field that depends on fixed-builtin assumptions or host-global native state joins that list (`test/adapter-capability-scope.test.ts`). `trust.onPrem` admits PII work (rule: `tasks.md`).
|
|
14
14
|
- Native branch ratchet (#625): `test/daemon-native-branches.test.ts` counts every call of a native class predicate (an `is*Peer` imported from an adapter module other than `registry.ts`) per enclosing function in `src/hub/daemon.ts` and `src/hub/claude-launch-proof.ts`, and the counts must equal `test/daemon-native-branches.json` (`predicate`, `function`, `count`, `reason`). A PR that adds, moves or removes such a call edits its row by hand with a concrete reason; never regenerate the table from a test. Bind a predicate alias with `const` only and never call one through a computed namespace key: the scan refuses both.
|
|
15
15
|
- Native proof state (`frontendProxy`, builtin `statusNotice`, `revertTurn` with `session.nativeRevert`, the Claude launch proof and terminal execution root) is read in the daemon only after `isFixedBuiltinDefinition(definitionOf(peer))`: a same-name foreign definition gets none of it. A product of a definition that is not a fixed builtin may not have a `frontendProxy`, `statusNotice` or `revertTurn` member at all, even undefined (`assertNativeProofPorts`, run by `createFromDefinition` and the conformance kit). Use `frontendProxyState` for the daemon proxy reads: absence keeps the generic path, present undefined refuses with `frontend proxy state unknown`. Keep approval policies and restoration debt inside CodexPeer. The remaining Codex `actionEnforcement`/`actionGated` predicate is intentional until a separately specified action-policy port; never add it to `FrontendProxyPort`.
|
|
16
|
-
- Adding a native peer: declare its `AdapterDefinition` under `src/adapters/definitions/` (or its own directory, as agy) and list it in `ADAPTERS` (`src/adapters/registry.ts`). `KNOWN_PEERS`, `OPTIONAL_PEERS`, `SUPPORTED_PEERS`, `START_MODE_PEERS` (a kind with both a TUI and a headless form), `ROLE_ORDER`, `HELP_ORDER` and `PLANNER_PEERS` are derived from it by `deriveAdapterLists`: set `optional`, `projection` (`roleRank`, `startRank`, `helpRank`, `plannerEligible`; a configured or external definition cannot) and, for an `ahub <kind>` launcher, `cli.entry`, `cli.usage`, `cli.preview` and `cli.startWords`, never a list edit (`builtinCliEntries(definitions)` projects the entries). The literal cross-release copies `KNOWN_PEERS` and `OPTIONAL_PEERS` in `src/hub/peer-catalog.ts` and `START_MODE_PEERS` in `src/hub/start-mode.ts` stay hand-kept for older coordinators: `test/registry-guard.test.ts` fails when one differs from the derived list. Adding a peer is the one change that updates their probe counts and `VENDORS` in `test/helpers/registry-inventory.ts` (`REGISTRY_COMPATIBILITY_PROBES`), the probe literal in `test/adapter-registry-a2.test.ts`, the `ADAPTERS` order in `test/adapter-registry.test.ts` and the literal in `test/adapter-catalog-a2.test.ts`; say so in the PR as an expected test change. `isSupportedPeer` answers from `ADAPTERS`, and for a declared instance from its kind's runtime definition unless the instance resolves to an unavailable reviewer variant; `isKnownPeer` and `defaultPeerRoles` answer from `definitionOf`; `STARTABLE_PEERS` reuses `SUPPORTED_PEERS`. It also adds the kind's `kinds` entry and its rows to `templates/presets/confirmation-matrix.json` (#999 T0): `test/confirmation-matrix.test.ts` fails without a tool-approval and a classed-action row per environment, and when the entry's forms, pull-only forms, conductor start or hub-mode fact differ from the definition. Add the same kind to `kinds` in `templates/presets/autonomous.json`, with a permission per form (`null` where the hub mode is `unmanaged`, or for `tui` under `unmanaged-in-tui`) and a start per environment: `test/autonomy.test.ts` fails when the preset and matrix kinds differ or a mode is unsupported.
|
|
16
|
+
- Adding a native peer: declare its `AdapterDefinition` under `src/adapters/definitions/` (or its own directory, as agy) and list it in `ADAPTERS` (`src/adapters/registry.ts`). `KNOWN_PEERS`, `OPTIONAL_PEERS`, `SUPPORTED_PEERS`, `START_MODE_PEERS` (a kind with both a TUI and a headless form), `ROLE_ORDER`, `HELP_ORDER` and `PLANNER_PEERS` are derived from it by `deriveAdapterLists`: set `optional`, `projection` (`roleRank`, `startRank`, `helpRank`, `plannerEligible`, `conductorEligible`, `reviewerEligible`; absent eligibility is false; a configured or external definition cannot) and, for an `ahub <kind>` launcher, `cli.entry`, `cli.usage`, `cli.preview` and `cli.startWords`, never a list edit (`builtinCliEntries(definitions)` projects the entries). The literal cross-release copies `KNOWN_PEERS` and `OPTIONAL_PEERS` in `src/hub/peer-catalog.ts` and `START_MODE_PEERS` in `src/hub/start-mode.ts` stay hand-kept for older coordinators: `test/registry-guard.test.ts` fails when one differs from the derived list. Adding a peer is the one change that updates their probe counts and `VENDORS` in `test/helpers/registry-inventory.ts` (`REGISTRY_COMPATIBILITY_PROBES`), the probe literal in `test/adapter-registry-a2.test.ts`, the `ADAPTERS` order in `test/adapter-registry.test.ts` and the literal in `test/adapter-catalog-a2.test.ts`; say so in the PR as an expected test change. `isSupportedPeer` answers from `ADAPTERS`, and for a declared instance from its kind's runtime definition unless the instance resolves to an unavailable reviewer variant; `isKnownPeer` and `defaultPeerRoles` answer from `definitionOf`; `STARTABLE_PEERS` reuses `SUPPORTED_PEERS`. Role eligibility (#1408) is read only through `roleEligibility` / `applyRoleCeiling` (`src/adapters/role-eligibility.ts`): a new kind changes the generated table in `docs/roles.md` (`renderEligibilityTable`; `test/roles-doc.test.ts` fails until the doc matches) and, when `conductorEligible`, the pinned conductor set in `test/conformance/conductor.test.ts`, and the conductor-start wording comes from `conductorStartText()` (`src/adapters/registry.ts`), never a text edit. It also adds the kind's `kinds` entry and its rows to `templates/presets/confirmation-matrix.json` (#999 T0): `test/confirmation-matrix.test.ts` fails without a tool-approval and a classed-action row per environment, and when the entry's forms, pull-only forms, conductor start or hub-mode fact differ from the definition. Add the same kind to `kinds` in `templates/presets/autonomous.json`, with a permission per form (`null` where the hub mode is `unmanaged`, or for `tui` under `unmanaged-in-tui`) and a start per environment: `test/autonomy.test.ts` fails when the preset and matrix kinds differ or a mode is unsupported.
|
|
17
17
|
- When an adapter lands, add its project config directories to `AGENT_CONFIG_SEGMENTS` (`src/hub/permission-mode.ts`); scoped automatic writes must ask there, while explicit approval and `never-ask` keep their existing behavior.
|
|
18
18
|
- Load external modules only at daemon startup from trusted untracked local declarations: verify the self-contained bundle and content pin before importing captured bytes. Keep CLI/reload paths metadata-only, modules restart-bound and never settings-editable, builtin capabilities restricted, and external-kind instances admitted only under the accepted #754 headless opt-in, live captured catalog, separate worktree and host-managed current-owner proof; preserve the live-module controlled-recovery refusal. Export conformance registrations and fake assets without starting them on import.
|
|
19
19
|
- Bind scanned external runtime SDK imports to this daemon's own `/adapter` entry; never resolve them against project packages. Refuse `/conformance`, `bun:ffi`, `bun:test` and CommonJS loading at runtime. Isolate module refusals from hub startup and retain unknown module roster rows as inert when metadata is unavailable.
|
|
@@ -56,6 +56,7 @@ Scope: the Codex, ACP and Pi adapters and the Pi extension (turn `generation` an
|
|
|
56
56
|
- Peer DOING (#878): an adapter reports a native session title or its plan's in-progress item only through `onDoing` (set by `Bus.add`), with `reset` when it binds a new session or thread; never put that text in a log line, event, message, status notice or memory capture. Codex reads only `thread/name/updated` and `turn/plan/updated` of the bound thread, ACP only a `plan` update inside the current turn; never guess a value for a peer without such a source.
|
|
57
57
|
- Session titles (#1055, spec `docs/design/adapters.md` "Session title slots"): only a fixed builtin may declare `title` or `titlePersistence` (`assertNativeCapabilityScope`), and only a `title: "hub"` definition (Pi, local) is offered `hub_set_title` (`sessionTitleTools`); keep it off Claude, Codex, Kimi and ACP tool lists and native auto-approval names. Write a title only through `setSessionTitle` (unnamed-only for an agent, `current()` rechecked right before the effect) and report it only through `onDoing("title", ...)`; never pass a title call to `observeTool` or capture, and never store a derived unnamed label.
|
|
58
58
|
- Final answers (#1320): a driven adapter publishes a model's final turn answer through `BasePeer.finalAnswer` (the bus's `onFinalAnswer`), never `onMessage`, and passes `complete` only for a normal completion. `onMessage` skips Record capture and lets `amem:` Record lines reach peers unstripped. Decorate a turn's fixed prompt with `turnRecordPrompt`, never native client configuration.
|
|
59
|
+
- Observed turn model (#1402, spec `docs/design/adapters.md` "Observed turn model"): report a turn's model only through `PeerAdapter.observedModel()`, cleared on read and read once at `turn_end`. `served` only when the native surface names what it served (Claude print `result` `modelUsage`, Codex `model/rerouted`), `session` for the agent's own current model (ACP session model at prompt send, headless Pi `get_state`, Codex thread model, agy hook `modelName`), `configured` for a model the hub set and the agent acknowledged. Pass ids through `safeModelLabel`; never invent, expand an alias or truncate, and a refused, `unknown` or absent value records nothing. A failed model read never fails the delivery.
|
|
59
60
|
- Codex 0.154.0 `agentMessage` items carry `text` and `phase` (not `content[]`); only the last non-`commentary` message of a turn is shared.
|
|
60
61
|
- Hide `hub_delivery_retry` from delivery-only ACP/local tool lists and omit its retry hint. Treat `AGENTHUB_DELIVERY_ONLY` only as an exposure hint; the daemon must refuse by the actual attached adapter, and native children must not inherit the marker. A Claude push that cannot reach its model reports `failed_safe`; if the daemon refuses that optional receipt state, try `needs_review` and retain uncertainty when neither receipt is confirmed. Keep `hub_delivery_resolve` on every list, delivery-only included: settling one's own `needs_review` row is not a retry (#1112).
|
|
61
62
|
- ACP `onActivity` is a closed, transient person-only projection. Never publish it through the bus, log/event writers, UI, tools or memory. Emit only for an active turn; latch private envelopes and associated PII work, including unreadable privacy state, and discard pending chunks on turn teardown. Native terminal references do not authorize filesystem/terminal RPC reads.
|
|
@@ -67,7 +68,7 @@ Scope: the Codex, ACP and Pi adapters and the Pi extension (turn `generation` an
|
|
|
67
68
|
- To stop a process tree, freeze it (SIGSTOP) before reading what it contains, then SIGKILL, and call it done only when the table shows none of it (with no table at all, the stop can only ask the group itself, which cannot see groups below it). A process a read after the freeze shows for the first time is frozen and read again before anything is killed.
|
|
68
69
|
- Work that must survive `ahub kill` (amem capture session end) is awaited in `stop()`; fire-and-forget dies with the process.
|
|
69
70
|
- Native owner teardown must handle a lost shutdown acknowledgement using verified process identity. Pending launches must be revocable, and active tools/streaming output must count as watchdog activity. A reloaded `watchdog_ms` reaches a peer only through `configureWatchdog` (`src/hub/peers.ts`, #439) and applies from its next busy turn, never to the running one.
|
|
70
|
-
- `stop(reason?)` (`src/hub/peers.ts`): a reason marks a person's requested stop (`peer_stop`, rule: `daemon.md`). Fence before the first await (the adapter's stopping flag, or `offline`) so `deliver()` and buffered native callbacks do nothing more, hold the in-flight delivery as `needs_review` with that reason, and end `offline`. For ACP without a journal, return ordinary in-flight envelopes once through `onFailed` before a requested stop invalidates the turn; never return the watchdog-cancelled original prompt. A requested stop never completes, escalates or
|
|
71
|
+
- `stop(reason?)` (`src/hub/peers.ts`): a reason marks a person's requested stop (`peer_stop`, rule: `daemon.md`). Fence before the first await (the adapter's stopping flag, or `offline`) so `deliver()` and buffered native callbacks do nothing more, hold the in-flight delivery as `needs_review` with that reason, and end `offline`. For ACP without a journal, return ordinary in-flight envelopes once through `onFailed` before a requested stop invalidates the turn; never return the watchdog-cancelled original prompt. A requested stop never completes, escalates or invokes failure handoff for the turn it cut (`AcpPeer` bumps `turn`; `PiPeer.fail` skips the failure message and `onTurnFailure` while `requestedStopReason` is set). `PiPeer.stop()` waits for aborted tools only up to `stopGraceMs`: a tool past it never blocks the teardown, and the stop throws `PiToolSettlementFailure` once the owner is down.
|
|
71
72
|
- A terminal the hub opens for a person (`src/hub/terminal-open.ts`, #269) gets `personEnv`, which strips every agent marker; never `peerChildEnv`, which sets one.
|
|
72
73
|
- Spawn a native peer with `peerChildEnv(peer, source)` so its own `AGENTHUB_PEER_ID` replaces inherited agent markers. Sandbox tool environments carry their executing peer too. Preserve the native shell environment policy; Codex's `CODEX_THREAD_ID` supplies the fallback after filtering. Before changing marker detection or launcher environments, read `docs/verification/2026-10-09-agent-shell-t0.md` for pinned source and live-probe limits.
|
|
73
74
|
- `peerChildEnv` drops every `ORCA_*` variable by default (#1094). Only a native that runs in the person's own pane passes `{ preserveOrca: true }`: `src/cli/launch.ts` and the Qwen CLI entry. A version probe, the process table or another helper the hub spawns uses `withoutOrcaEnv(childEnv(...))`, never `{ ...process.env }`.
|
|
@@ -82,7 +83,9 @@ Scope: the Codex, ACP and Pi adapters and the Pi extension (turn `generation` an
|
|
|
82
83
|
- Keep Pi owner identity on the shared `processSignature`/`processLiveness` contract exported by the exact-pinned 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.
|
|
83
84
|
- 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).
|
|
84
85
|
- 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).
|
|
85
|
-
- Emit Pi's ceiling event at the pre-effect rejection boundary (`src/pi/ceiling.ts`), before `agent_end`. Accept only a valid current-session/current-generation signal during a running turn; retain the first signal and attach it to that turn's failure. Never classify a ceiling from free text.
|
|
86
|
+
- Emit Pi's ceiling event at the pre-effect rejection boundary (`src/pi/ceiling.ts`), before `agent_end`. Accept only a valid current-session/current-generation signal during a running turn; retain the first signal and attach it to that turn's failure. Never classify a ceiling from free text. At `agent_settled`, mark a ceiling delivery completed with `ceiling steps <count>/<limit>` and pass `settledCeiling: true` only when that turn failed without cancellation, withdrawal or an execution/approval budget stop, and no managed tool was pending when the ceiling arrived or remains pending. Latch tool uncertainty at the ceiling even if tools settle later. Keep every other failed delivery held; never replay it. Observe explicit stop/recovery, roster or personal withdrawal and cancelled settlement once per logical turn through `onTurnAborted`, without failure handoff; internal model-failure teardown suppresses that observation. Call `onTurnSuccess` only for an actual nonerror, noncancelled settlement, never a ceiling.
|
|
87
|
+
- Known limit (#1447 T4): host `turn_start` is adapter busy, before Pi model selection/readback. Workflow items after that boundary stay queued for the following host turn; do not fold them into an unsent provider prompt. Closing this gap needs an explicit preparation/commit or deferred-fold contract preserving durable ACKs and private input fences. Former-owner done/checkpoint refusals still apply in that window. Its duration was not measured.
|
|
88
|
+
- Pi dependencies (#1447 T5): register preparation only from the Pi factory. Use the trusted worktree record's reviewed Git base and protected global hub state outside every peer root; never execute mutable task install inputs. Keep the fixed frozen-install command, scrubbed environment, deadline, lifecycle/config refusals and CWD-pinned rename publication. Preparation failures stay advisory; accept/self-claim replies recheck ownership, acceptance/session and privacy after waiting and carry fixed readiness guidance. Never copy dependency trees or skip install scripts to make preparation succeed.
|
|
86
89
|
- Pi TUI hub prompts (#379; an idle snapshot ACK arriving before a personal start inserted a hub prompt into the person's turn): attribute a start, end or settle to a hub turn only by the command's `promptId`, which lasts until the logical `agent_settled`; treat any other start while a hub prompt is pending or running as personal activity that detaches Pi. Settle `failed_safe` only on a `prompt_not_started` refusal bound to the verified owner, session, command id and generation; everything else stays `needs_review`. Refuse roster return without `fencedPrompt`.
|
|
87
90
|
- `validatePiSession` (`src/pi/session.ts`) throws `PiSessionUnresumable` only on positive evidence (ENOENT, a file outside the managed session directory, an unparsable or mismatched header) and `PiSessionBookmarkMismatch` only when a valid header names another session id; every other read failure is rethrown unchanged, because the daemon retires a Pi continuity bookmark only on those two classes (#463). `PiPeer` rethrows a mismatch with the neutral header-id message and never claims a bookmark exists (`test/pi-session-validation.test.ts`).
|
|
88
91
|
- Pi terminal ownership reads only the existing monitor's current pid/signature/session/file/token observation, expiring after 1 s; unknown verification withdraws proof. Keep fresh shared process-signature checks at tool/effect admission and teardown, and never revive terminal proof across detach, offline, stop or a changed owner/session (#576).
|
|
@@ -116,6 +119,7 @@ Scope: the Codex, ACP and Pi adapters and the Pi extension (turn `generation` an
|
|
|
116
119
|
- Extra Jcode instances (#685, #368): one `JcodePeer` per declared id (at most 8), each with its own `jcode_home`, socket and state. The person authenticates inside Jcode; the hub passes `-p`, `--model` and `--provider-profile` exactly as declared, handles no model credential or URL, and only checks that the home is a directory the person owns (`jcodeHomeRefusal`: no read or write under it). Never put `AGENTHUB_PEER_ID` in the shared `.jcode/mcp.json` entry (`jcodeMcpEntry`): every owned launch supplies it through `peerChildEnv(<id>)` or the TUI launch env, together with its `AGENTHUB_LAUNCH_ID`. The MCP server with no `AGENTHUB_PEER_ID` in tools mode refuses every tool and never defaults to a peer id. The daemon admits a `tools` hello for a peer whose definition is `owned-acp` only when it carries the launch id of that peer's current owned launch (`JcodePeer.ownsLaunch`, from `jcodeLaunches`); never trust the env alone. `jcode --as <id>` never opens a TUI. Declare the semantic `instances.nativeHome` on a definition, never compare the kind name (`registry-guard`); it is a fixed-builtin capability that `assertNativeCapabilityScope` refuses elsewhere. `checkJcodeInstanceHomes` (`src/hub/instances.ts`, run once at daemon startup) refuses a home equal to or nested in the base Jcode's or another instance's; compare homes only through its `canonicalHome` (`realPath`, case-folded on a volume that folds case, inode), never `resolve()` text. The preview of `--as <id>` passes the instance to `previewJcode` so it shows the daemon's real flags.
|
|
117
120
|
- Jcode defers MCP tools (#912, `JCODE_DEFERRED_TOOLS_INSTRUCTION` in `src/hub/envelope.ts`): a Jcode peer lists only its built-in tools until the model searches for an MCP tool, so without a hint it reports the hub tools missing and answers in its final message. The guidance is written in exactly one place, that constant, and `JcodePeer` sends it through `jcodePreamble` (`src/adapters/jcode.ts`) ahead of the role contract, once with a session's first prompt, for the base peer and every extra instance. Never copy it into `STANDING_INSTRUCTION`, `templates/AGENTS.block.md` or a profile template (the Jcode bullet there is the same text in every template, and `test/jcode-deferred-tools.test.ts` pins both), and never change Jcode's own deferral or cache settings from the hub. The tools it names must exist, and the server name must be `JCODE_MCP_NAME`.
|
|
118
121
|
- Antigravity P1 (`src/adapters/agy/`): keep it optional, cloud, off roster by default, implementer/verifier only and pull-only. Until per-mode native prompt behavior is verified, reject hub permission/unattended mappings, headless starts and resume selectors; do not infer a quota source. The launcher refuses extra instances, any `agy --version` not admitted by `assessVersion("agy", ...)` (`COMPAT.agy` in `src/adapters/compat.ts` is the verified-set/warning-line source of truth; exact person trust is separate, #691), and a hub without the `native_hook_launch` feature.
|
|
122
|
+
- A project MCP entry the hub wrote is its own after the project directory moved (#1423): the directory fields are compared by real path (`sameDirectory`, `src/adapters/same-directory.ts`), not by text: `AGENTHUB_PROJECT_DIR` in the Jcode entry (`foreignField`), and `AGENTHUB_PROJECT_DIR` and `AGENTHUB_STATE_DIR` in agy's MCP entry and hook commands; a refusal names the differing field and the remedy. `jcodeMcpReady` still requires the exact current entry, so the launcher rewrites a moved one. Never loosen the rest of the shape (command, args, mode, peer id): only the directory fields follow a symlink. Kimi's entry is rewritten from the current paths and has no ownership check.
|
|
119
123
|
- Only the person's `ahub agy` launcher manages `.agents/plugins/agent-hub/{plugin.json,mcp_config.json,hooks.json}`. Refuse linked/foreign entries before any write; cleanup only the matching launch. Never write project-level `.agents/hooks.json` or personal Gemini settings. The plugin MCP server is named `agent-hub_agent-hub` by the pinned native client.
|
|
120
124
|
- Managed native facts use the definition's typed `NativeFactsPort` and the daemon's ephemeral `native_hook_launch` authority. Bind every observation to the daemon, launch, native session, project and current socket generation, and bind `WsPeer`'s live `nativeSession` (`bindNativeSession`) from `case "native_facts"` while keeping new `WsPeer` instances free of `nativeSession` until observed. Normal `Stop` (`NO_TOOL_CALL`) requires `fullyIdle` and a fresh validated completion row (a missing readback keeps the peer busy); terminal non-normal `Stop` reasons (`USER_CANCELED`, `ERROR`, `MAX_INVOCATIONS`, `MAX_FORCED_INVOCATIONS`, `MAX_TOKEN_BUDGET_EXCEEDED`, `TERMINAL_STEP_TYPE`, `TERMINAL_CUSTOM_HOOK`) with `fullyIdle` acknowledge any pending transcript facts/usage, clear the active turn, end any waiting cohort turn, record a closed-reason `native_turn_end` event (`reason` without `id`), settle any open #1054 run by its closed reason (pull-only `agy` opens none), and return the peer to `idle` (#1280). Native fact acknowledgement accepts only `SYSTEM_SDK` rows (`EPHEMERAL_MESSAGE` in 1.4.x, `SYSTEM_MESSAGE` in 1.5.x) in the exact session transcript path, extracts completed `PLANNER_RESPONSE` token counters (`input_tokens` excludes `cache_read_tokens`: cache reads exceeded input on 2947 of 3021 real 1.5.x rows, so `totalTokens` is their sum, not a double count) into `source: "agy_transcript"` usage events (deduped by hashed `(session, step_index)` across restarts), and advances the per-launch transcript cursor only after a scan that reached the previous cursor (or the 4 MiB lookback ceiling). `decodeAgyHook` normalizes `Read` (`view_file` `AbsolutePath`, `read_file` `Path`, with `StartLine`/`EndLine`/`ByteOffset` carried as `offset`/`limit` so partial reads never count as a whole-file view), `Write` (`write_to_file` `TargetFile`/`CodeContent`, `write_file` `Path`/`Content` when not `Append`), and `Edit` (`replace_all` only when `AllowMultiple` is true: a missing flag reads as a single replacement because no native receipt shows the default) (`replace_file_content` `TargetFile`/`TargetContent`/`ReplacementContent`, `edit_file` `Path`/`Target`/`Replacement`). The daemon records Pre/PostToolUse through `Facts.preTool`/`postTool` and offers nothing on them (#555, #1280). `INSTRUCTION_FILES` (`src/hub/permission-mode.ts`) includes `gemini.md` alongside `agents.md`, `claude.md` and `qwen.md`. Pull-only `agy` has no push, so on `SessionStart`/`PreInvocation` the daemon appends a count-only line (`[agent-hub: N message(s) waiting (M important); call hub_inbox]`, never a body or sender) to the injected message when `bus.queued(peer) > 0`, with or without a fact offer (#1280 P2). `agy acp` was probed model-free (`docs/verification/2026-11-08-agy-acp-t0.md`); its `AcpPeer` wiring waits for one authorized model-backed receipt.
|
|
121
125
|
- `terminalOwner(launchId)` (`src/hub/peers.ts`, #482) answers only for the adapter's current native TUI owner bound to that launch (Codex: the claimed link with that `launchId`, both sockets open; the launcher sends the id as the upgrade's bearer token through `--remote-auth-token-env`, because `codex --remote` refuses any path or query (#586); Pi: a started, verified TUI owner on its requested session); a start acknowledgement is never ownership. A Codex link that is not the claimed one or has a closed socket never adopts a thread.
|
|
@@ -132,8 +136,8 @@ Scope: the Codex, ACP and Pi adapters and the Pi extension (turn `generation` an
|
|
|
132
136
|
- Owned input observers (#1056): `beforeInput`/`inputReleased` (`OwnedInputObserver` in `src/adapters/claude-print-child.ts`) carry review-observer provenance only. `observerSessionId` (Claude implementer, reviewer print, local) is never `nativeSession` and never grants budget, resume, permission or task authority. `beforeInput` runs with the final target session before any prompt reaches the child or model, and a throw releases no prompt; `onInputReleased` fires only after stdin flushed for the current generation, and an observer throw never changes settlement. A fresh reviewer calls `inputFinished` only after its group is confirmed gone, its task MCP is closed and launch cleanup succeeded.
|
|
133
137
|
- Retained standby (#1174, `WsPeer` in `src/adapters/channel-peer.ts`): an opt-in (`retainStandby`) hello while another session holds the peer is kept as one of at most `MAX_STANDBY_SESSIONS` (8) standbys; `standbySessions` ids and PIDs are display only, never native-session provenance or authority. Ownership changes only through `takeover` (the person's `peer_takeover`, or the oldest standby when the owner leaves), guarded by the host's `channelTakeoverAdmission` and `claim.isCurrent()` across the async preface; the old socket closes 4405 (opt-in) or 4403 "detached by the person" and its native process is not stopped. A standby socket runs no peer operation until `ownsSocket` confirms it. A hello without the opt-in keeps newest-hello replacement.
|
|
134
138
|
- A reviewer backend is a fixed builtin `ReviewerBackend` in a definition's `reviewer`, never config. Its `prepare` must return a complete isolation receipt (matching backend id, binary, version, profile, evidence and `readOnly` true, plus `strictMcp` and `ephemeral` true, or for a `nativePolicy` backend `enforcement: "native-policy"`, `freshSession` and `hubToolsOnly` true) before every child. A `taskMcp` backend refuses without the host's `taskMcp` port and gets only that task's MCP config, never the hub-wide one. `admit(env)` and the complete synchronous `launch.current()` are rechecked right before spawn; keep that complete fence in `reviewToken()` at every verdict/task-MCP authority boundary. A `watchCurrent` launch supplies `startPolicyWatch()` with a review-owned full-policy probe; run its serialized asynchronous checks on absolute 100 ms due times, coalescing missed ticks without overlap or an extra post-check delay. Pass only expected paths/fingerprints to its worker, never task text or inherited environment. Fence the exact child/review sequence on failure as `review policy changed`, and terminate/join the worker before private cleanup even when native stop fails; retain an unconfirmed owner for explicit stop retry; a missing or failed proof refuses, never a weaker launch or a continuing native session. The daemon puts the reviewer on the bus only after `start()` proved isolation; a failed start or a `start_failed` report marks it in `reviewerUnavailable`, which routing reads as `failing`. An unavailable reviewer variant has no reviewer backend or launch code; `startPeerBody` refuses it before preflight, independently of any native TUI launcher.
|
|
135
|
-
- Report reviewer failures (`onUnavailable`: `start_failed`, `quota`, `no_verdict`) only after the child's group is confirmed gone and only while its generation is current: a person's stop owns its hold and never reroutes. Complete a normal no-verdict delivery only after the host confirms a current re-offer; an uncertain or failed fallback stays `needs_review`, with its `REVIEWER_FALLBACK_UNCONFIRMED` reason excluded from automatic moved-review settlement; ordinary superseded holds keep their existing rule. Log one bounded no-verdict line from exit code and allowlisted hub-tool metadata only, with full refusal privacy/secret screening before sanitization and truncation; retain the first full host refusal across native echoes, and withhold differing later host refusals rather than replacing or accumulating them; stale/private context is withheld. Record only allowlisted tool names and refusal text; never retain argument objects, task/diff fields or model-message events as trace data. `quota` comes only from the backend's structured `failure(event)`, never from
|
|
136
|
-
- Codex reviewer isolation (`src/adapters/codex-review-isolation.ts`): accept only a `codex-cli` version that compat `codex-review` admits (verified or the person's trust, #691), and still run every proof below after trust; pass `-c notify=[]` (legacy notify off) on every launch; prove model-free that Apps, plugins and hooks are disabled (`features list`), ambient MCP servers are replaced by disabled stubs, and the hub server alone is enabled with exactly `hub_review` and `hub_task_show`; approve exactly those two MCP tools per tool, never with a server-wide approval default; before marking a reviewer backend/version verified, record a successful model-backed hub tool call as well as the model-free inventory (inventory alone is not verdict-delivery proof); run the native sandbox fixture probe before every launch; hash the binary once and fence binary and config files by metadata. Credential denies come only from the bounded `HOST_CREDENTIAL_PATHS` and `HOST_CREDENTIAL_ENV` lists, denied at the lexical and canonical path; refuse glob syntax or a root inside the checkout. A root that is dangling or unreadable refuses too; the reason names only its path class (`~/.docker`, `$DOCKER_CONFIG`), never a path or contents. Never pass the control token in a reviewer child's argv, env or MCP config: keep the hub state dir in its `privatePaths`. A refused `prepare` carries a `causeClass` from the closed `REVIEWER_CAUSE_CLASSES` (`version`, `binary`, `mcp_inventory`, `plugins_hooks_apps`, `sandbox_proof`, `credential_root`, `timeout`, `unknown`; `reviewer-print.ts`, #722): `prepare` tracks the proof leg it is on, and `timeout` means a metadata command ran out of its 2 s or the 12 s budget, never an abort. The host builds the reason only through `reviewerUnavailableReason(cause, detail)`: a fixed sentence per class, plus a credential-root path class (`~/.docker: a dangling link`) as the only detail. The one exception is a failed `start()` whose error is a version refusal (`VERSION_REFUSAL`) or comes from a `nativePolicy` backend: the daemon shows that sanitized message, capped at 1000 characters (#691). `ReviewerPrintPeer` classes a missing or invalid receipt as `unknown`, a `launch.current()` change before spawn as `binary`, and any other start error as `unknown`. Keep admission refusals separate from start failures: skip only a stale-bound request with one task-id log and no reroute; reroute a still-current request whose policy changed as `no_verdict`, without marking the reviewer unavailable. The daemon writes that reason to the `reviewerUnavailable` map (read by routing and shown as the `reviewer` line of `ahub status`), and a `hub.log` line names the class. Never add native CLI text, a path, a version output or a token to the class, the reason or the log.
|
|
139
|
+
- Report reviewer failures (`onUnavailable`: `start_failed`, `quota`, `no_verdict`, the last also for a `review.max_minutes` wall-clock cap with reason `review time cap`) only after the child's group is confirmed gone and only while its generation is current: a person's stop owns its hold and never reroutes. Complete a normal no-verdict delivery only after the host confirms a current re-offer; an uncertain or failed fallback stays `needs_review`, with its `REVIEWER_FALLBACK_UNCONFIRMED` reason excluded from automatic moved-review settlement; ordinary superseded holds keep their existing rule. Log one bounded no-verdict line from exit code and allowlisted hub-tool metadata only, with full refusal privacy/secret screening before sanitization and truncation; retain the first full host refusal across native echoes, and withhold differing later host refusals rather than replacing or accumulating them; stale/private context is withheld. Record only allowlisted tool names and refusal text; never retain argument objects, task/diff fields or model-message events as trace data. `quota` comes only from the backend's structured `failure(event)` (the pinned native frames in `src/adapters/definitions/native-quota.ts`, revalidated by `nativeReviewerQuota`) or Kimi's `failureOnExit` (a nonzero exit with the complete owned stderr read after group settlement, `kimiReviewerQuotaOnExit`), never from assistant, tool or model text (quota rules: `budget.md`). An NDJSON frame over 256 KiB or more than 4 MiB of output aborts the review as `needs_review`.
|
|
140
|
+
- Codex reviewer isolation (`src/adapters/codex-review-isolation.ts`): accept only a `codex-cli` version that compat `codex-review` admits (verified or the person's trust, #691), and still run every proof below after trust; pass `-c notify=[]` (legacy notify off) on every launch; prove model-free that Apps, plugins and hooks are disabled (`features list`), ambient MCP servers are replaced by disabled stubs, and the hub server alone is enabled with exactly `hub_review` and `hub_task_show`; approve exactly those two MCP tools per tool, never with a server-wide approval default; before marking a reviewer backend/version verified, record a successful model-backed hub tool call as well as the model-free inventory (inventory alone is not verdict-delivery proof); run the native sandbox fixture probe before every launch; hash the binary once and fence binary and config files by metadata. Credential denies come only from the bounded `HOST_CREDENTIAL_PATHS` and `HOST_CREDENTIAL_ENV` lists, denied at the lexical and canonical path; refuse glob syntax or a root inside the checkout. A root that is dangling or unreadable refuses too; the reason names only its path class (`~/.docker`, `$DOCKER_CONFIG`), never a path or contents. Never pass the control token in a reviewer child's argv, env or MCP config: keep the hub state dir in its `privatePaths`. A refused `prepare` carries a `causeClass` from the closed `REVIEWER_CAUSE_CLASSES` (`version`, `binary`, `mcp_inventory`, `plugins_hooks_apps`, `sandbox_proof`, `credential_root`, `fixture_root_denied`, `timeout`, `unknown`; `reviewer-print.ts`, #722): `prepare` tracks the proof leg it is on, `fixture_root_denied` (#1493) means a deny entry covers the system temp directory and the hub's own `reviewer-proof` directory, so the proof has no place for its public canary (the fixture root moves to the hub directory when only the temp directory is covered; the reason names no entry), and `timeout` means a metadata command ran out of its 2 s or the 12 s budget, never an abort. The host builds the reason only through `reviewerUnavailableReason(cause, detail)`: a fixed sentence per class, plus a credential-root path class (`~/.docker: a dangling link`) as the only detail. The one exception is a failed `start()` whose error is a version refusal (`VERSION_REFUSAL`) or comes from a `nativePolicy` backend: the daemon shows that sanitized message, capped at 1000 characters (#691). `ReviewerPrintPeer` classes a missing or invalid receipt as `unknown`, a `launch.current()` change before spawn as `binary`, and any other start error as `unknown`. Keep admission refusals separate from start failures: skip only a stale-bound request with one task-id log and no reroute; reroute a still-current request whose policy changed as `no_verdict`, without marking the reviewer unavailable. The daemon writes that reason to the `reviewerUnavailable` map (read by routing and shown as the `reviewer` line of `ahub status`), and a `hub.log` line names the class. Never add native CLI text, a path, a version output or a token to the class, the reason or the log.
|
|
137
141
|
|
|
138
142
|
## Headless Claude implementer (#525-4)
|
|
139
143
|
|
|
@@ -7,6 +7,8 @@ Scope: the CooperBench runners, their fixtures, teardown and recovery. Read befo
|
|
|
7
7
|
- The benchmark run's restoration state: `restoration.json` says `restored: false` from before the runner locks anything until it writes its outcome, and the recovery trusts `restored: true` only when `restoration-ledger.json` agrees (`unrestored` in `scripts/benchmarks/teardown.ts`). A run directory that is not restored is never reused: its locked modes would become the originals. A ledger from before 0.12.5 (no runner identity) owes its locks but, when `restoration.json` says `restored: true` or names a runner, keeps its trust entry as it was then (`owed`; with no `restoration.json`, its runner did not finish and the entry is owed too): the reuse check and the recovery read both through these two functions, never on their own (#120).
|
|
8
8
|
- A latched active-window terminal failure carries the #175 bounded diagnosis: the terminal class comes only from the pinned Qwen build's exact loop-protection message contract (anything else stays `unknown`), the active-window tool trace is count-only and phase/generation-fenced like the latch (setup probes and teardown never count), tool categories come from the protocol kinds and the #138 canonical binding (`canonicalMcpToolName` in `src/adapters/acp.ts`), and the native guard's threshold, predicate and no-op signals are declared unavailable, never derived from event totals. The diagnosis explains the latched failure and never changes it: no retry, no continuation, no guard relaxation.
|
|
9
9
|
- Classify Pi's ceiling only from the adapter's validated producer signal bound to the latched peer/active generation. Keep shared budgets and Qwen's guard distinct; diagnostics never change the frozen end cause.
|
|
10
|
+
- Pi's managed step ceiling changed from 30 to 100 (#1502, `src/pi/extension.ts`, `src/pi/launch.ts`), so a collection using that default has a changed study condition. Declare it before collecting. Host continuation (#1500) requires a settled ceiling with no active or pending tools and an accepting live owner, and is bounded by `pi.max_continuations` for the same accepted task and owner. Aborted turns do not continue; a successful turn resets the continuation count. Do not count an unsettled ceiling or an abort as a continuation.
|
|
11
|
+
- A collection that exercises Pi task worktrees with install inputs must account for dependency preparation (#1509, `src/pi/task-dependencies.ts`, `src/pi/dependency-publish.ts`): install inputs come from the reviewed base, the task worktree is rechecked before publication, and preparation failure is advisory rather than task-acceptance evidence.
|
|
10
12
|
- Read terminal coverage only through bounded `terminal_coverage` metadata reads, rebinding the audit, ledger and manifest to the seal index. Require complete sealed state, all audit checks, plan/cell/count reconciliation and zero recorded live owners. Report recorded verification separately from fresh audit; missing or inconsistent evidence is unavailable.
|
|
11
13
|
- Publish Pi benchmark descriptors from `benchPiToolProblem`; keep production schemas unchanged and omit solo peer messaging. Attest every bootstrap tool publication against declared native/schema/source pins before scored generation. Fail/defer missing, mixed, malformed, truncated or changed publications; retain only bounded names/counts/hashes. Declare a new study condition before any changed collection; never rewrite historical artifacts or select retries by score. The driver's Qwen profile and Pi tool sandbox are `profile()` from `src/local/sandbox.ts`: a change to that profile (#270's refusal of the `.git` name is one) is such a changed condition. So is a change to when its Qwen `AcpPeer` cancels a turn: it passes no `toolCeilingMs`, so a silent open tool call runs to the default ACP tool ceiling (#542), not `watchdogMs`.
|
|
12
14
|
- The benchmark runner's Claude trust entry: a write still `pending` in the runner's own process never landed, so it is `not_written` on every path (contained or not, its temp file removed or left), and neither the runner nor the recovery touches an entry then. Only a dead runner's `pending` leaves that question to the recovery, which takes back only an entry exactly as the runner would have written it, and none while the runner's temp file is still there (the rename never happened). `changed_concurrently` is the user's entry and is never taken back. The runner's settlement is `settleTrust` in `scripts/benchmarks/teardown.ts`, tested as a table: change it there, never inline.
|
|
@@ -2,16 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
Scope: quota and native context readings, checkpoints, pause, handoff and resume, and the status line tee. Read before editing `src/hub/budget.ts`, `src/hub/window-kind.ts`, `src/hub/budget-notes.ts`, `src/hub/context-window.ts`, `src/cli/statusline-tee.ts`, `src/adapters/definitions/native-quota.ts`, `src/adapters/definitions/native-context.ts`, `src/hub/bus.ts`, `src/hub/delivery-journal.ts`, `src/hub/restart.ts` (pause persistence), the per-account fanout in `src/hub/instance-budget.ts`, the usage roll-up in `src/hub/usage-rollup.ts` or Kimi's count (`src/adapters/kimi-wire-usage.ts`, `src/hub/kimi-usage.ts`, `src/hub/token-window.ts`).
|
|
4
4
|
|
|
5
|
+
- Reviewer quota admission opt-outs (#1467): keep defaults `review.gate = 0.8` and `review.unknown_quota = "skip"`. `unknown_quota = "pass"` admits unknown observations only, retaining the known floor and never treating admitted unknown as quota-wait evidence. Gate `"off"` bypasses floor/unknown checks and all quota waits, while actual Budget/manual pauses and every other routing guard remain binding. Report the active rule through the shared policy description; do not turn an opt-out into a reading, account transport, cleanup release or resume path. Require `reviewer_quota` on recovery for explicitly configured unknown policy, including skip, or gate off.
|
|
6
|
+
- Reviewer quota (#1446): accept only the pinned native outer Claude/Codex refusal frames in `native-quota.ts`, or the narrowly documented Kimi nonzero owned-child complete-stderr exception. Never match assistant/tool/model text. Keep reset unknown unless a typed native timestamp supplies it; credits do not affect admission. Record the hard pause through canonical-account `Budget.report` immediately when an admitted frame is observed (Kimi stderr only after confirmed settlement), independently of task fallback. Defer handoff until that owned attempt settles; only the existing Budget reset/resume policy releases the pause.
|
|
7
|
+
- Reviewer-only quota observation reuses attached account siblings (#1440). Do not add a reviewer transport or infer early reset from prose. Without an attached source, recheck only at a proven reset timestamp and Budget's existing expiry grace, within the original `task_sweep.review_min` deadline (kept across restarts); do not claim early-reset observation. Kimi's observed 2.2.0 stderr exception has no reset and is unverified on 2.5.2, so it never authorizes quota waiting.
|
|
8
|
+
- Kimi reviewer accounting journals a host-only opaque attempt before spawn and requires its ACK, then reads owned native usage after group settlement and before profile cleanup (`readKimiReviewerUsage`, the single session of the fresh profile through `ownedKimiSession`); its rows join the one Kimi account count through `KimiUsage.observeReviewer` (deduped by row id), never `addTokens`. Journal terminal complete/unknown only after that read. Drop cached soft-token headroom on unresolved accounting; unmatched starts, incomplete replay or unknown terminal stay unknown across restart, with no expiry inferred from start/cap. Retain an incomplete private profile or unacknowledged terminal through the existing cleanup hold. Never log its home, native session, prompt or stderr.
|
|
5
9
|
- Budget: checkpoint first, pause second (a paused peer receives nothing). A handoff that fails is left unmarked so the next tick or hub run retries it; never record it as done.
|
|
6
10
|
- A handoff needs somebody to hand over to: `canHandOff` is false right after a restart, when no peer is attached yet, and the handoff waits for a later tick instead of stripping tasks of their owner.
|
|
7
11
|
- A reading has its own timestamp. Numbers that arrive through a file (`claude-usage.json`) carry the file's `at`; a window whose `resetsAt` has passed says nothing any more.
|
|
8
12
|
- On resume the notice is published before the peer is released, so it leads the first delivery.
|
|
9
13
|
- The coordinator only lifts its own pauses: `manualPaused` in the daemon keeps a `ahub pause` in place, and `ahub resume` refuses while a budget record is open.
|
|
14
|
+
- Codex quota reads (#1440): use the canonical account's open Budget pause to select the fixed 60 s poll, return to usagePollMs on resume, and unsubscribe/cancel polling plus pending-read timers on detach/stop. Keep resume in Budget's existing evaluate/expiry paths, never in adapters or Tasks. Keep only reset-credit count/proven-complete earliest expiry and ordinaryUsageAllowed/hasCredits/unlimited flags with measurement time; never retain balance, account id, credit ids or descriptions. A capped/missing detail list leaves expiry unknown. Credit flags never lift or prevent a pause.
|
|
15
|
+
|
|
10
16
|
- `Bus.pause` and `Bus.resume` are transient and write no bus snapshot (#1204): the bus's `paused` set is not in `BusSnapshot`. Each owner persists and re-applies its own pause (`budget_pauses` for a budget record, `setManualPaused` for `ahub pause`, `conductorHolds` for a conductor hold); never restore a pause from the bus snapshot or add a `persist()` back for one.
|
|
11
17
|
- The status line tee must never fail or slow the render: no throw, original command run with the same stdin, 5 s cap.
|
|
12
18
|
|
|
13
19
|
- Keep native context occupancy (`src/hub/context-window.ts`, readers in `src/adapters/definitions/native-context.ts`) separate from quota accounting; never use Codex's accumulated `total` as occupancy or estimate Pi counters. Host code reads quota and context only through `readNativeQuota` (`budget.ts`) and `readNativeContext` on the resolved definition's declared `budget.reader` / `budget.context`; no declared reader is unknown, never an empty reading (rule: `adapters.md`).
|
|
14
20
|
- Context checkpoint completion requires its request id and the current attached peer/native session. Invalidate its transport generation synchronously at a new peer claim, before asynchronous recall or attachment. Never pause, reassign or replace a session on context pressure; `ContextWindows.admission` (#802) only copies the reading for new-offer routing and never changes the crossing latch. Refuse private-turn, PII-pattern and all associated open PII-task summaries (owner or reviewer, including in_review, with the current routing policy; use `isClosedTaskState` to exclude approved and cancelled work) before local persistence or cloud memory; never broadcast checkpoint text.
|
|
21
|
+
- A quota or context checkpoint also snapshots each owned task's creation and ownership-change epoch (#1506). Before accepting a summary, require that task binding and the original peer/session to remain current. If ownership moved or the task was cancelled, refuse the stale answer with a body-free cause retained only until that request's original deadline; a new request replaces the refusal. A changed peer/session reveals no prior task ids.
|
|
15
22
|
- Invalid/stale context readings expose unknown and do not rearm a crossing. Latch a crossing only after its event is accepted; reconsider paused/recovery-held crossings after release with fresh current-session readings. Tee context fields contain finite numeric values or null only, bound to daemon instance, launcher and native session. Context and session go to the per-peer file `claudeStateFile(base, peer)` (the builtin keeps the unsuffixed name); `claude-usage.json` stays one shared file per account.
|
|
16
23
|
|
|
17
24
|
- A provider hard refusal ends a reading override and supersedes a soft evaluation still awaiting its checkpoint; never let the obsolete checkpoint overwrite that pause. An ACP provider quota refusal reports a hard budget reading and confirms the live pause before the adapter requeues work, so the pause fences retries and the existing relay handles assignments. Use the observed window length for an unknown reset; repeated quota refusals while paused do not consume poison-envelope retries, except for an `invocation` request: it gets at most one automatic retry, only when `canRetryInvocation` says so, paused or not (rule: `bus.md`).
|
|
@@ -33,3 +40,5 @@ Scope: quota and native context readings, checkpoints, pause, handoff and resume
|
|
|
33
40
|
- Usage roll-up (#683 U2): `src/hub/usage-rollup.ts` is the only reader of `events.jsonl` for `ahub usage`, the console Usage panel and the dashboard Usage view (rules: `daemon.md`). A pass reads from the stored offset, keeps whole lines only and commits its rows with the new offset in one transaction; its 20 ms slice (`poll(maxMs)`, #719) stops only between whole records and commits the offset of the last one folded; a line longer than the cap is read whole and one past `MAX_LINE_BYTES` is skipped, so the fold always advances. Never store a title, reason or summary there; `limit_events` drops `reason`. issue/pr/release are joined from the board at query time through `TaskLinks`, never stored. A counter with no record behind it is `unknown`, not 0. Claude's total is derived as the sum of its four counters (`claudeReportedTokens`); a source whose input contains the cached part gets none. Every `usage` reply, errors included, answers the rid, and the op is for the console and a configured planner only, never during that planner's private turn. A rebuild from byte 0 must equal the incremental result (`test/usage-rollup.test.ts`). Never present unknown as 0 in a sum: an overall figure with an unknown peer is `partial` and names the peers (`total().unknownPeers`). Never drop rows silently: `limits()` reports `truncated`, `omitted` and the bound. An event-open pause the hub no longer holds is `endedUnknown` (`ahub reset` keeps the log), so `limits(peer, { live })` needs the daemon's held pauses. A poll's fold transaction is IMMEDIATE and rechecks the stored offset, so two roll-ups on one `hub.db` never fold a range twice.
|
|
34
41
|
- Daily usage (#683 U4): `UsageRollup.daily(days, now)` returns the last `days` UTC calendar days (at most 366) ending today, clipped to the first day with a record. A day inside the window with no record is a row with `empty: true`, never zeros. Per peer and day, take the native total when reported, else the counted tokens (`count`), else `unknown`; a day's total is `partial` when some peers are unknown and `unknown` when all are, never a sum that treats them as 0.
|
|
35
42
|
- Kimi's consumption (#285 phase 2, delayed drain #1281, sliced drain #1283): `src/adapters/kimi-wire-usage.ts` is the only reader of Kimi's wire log and `src/hub/kimi-usage.ts` the only owner of the Kimi count; `daemon.ts` supplies ports (events, budget, clock, session id, unreferenced scheduler) and binds the session at a turn start (no read), calls `collectKimiUsage` at a turn end, a `usage_update` and an offline transition, and schedules at most three coalesced follow-ups (250 ms, 1,000 ms, 2,000 ms). With a scheduler, one invocation reads and commits one slice, then yields with a 0 ms continuation while the same cue's backlog remains (at most 16 slices per burst). Discovery is fresh on every slice; do not cache the agent set. Without a scheduler, the original synchronous 16-pass behavior remains for compatibility. Stop, offline and session replacement cancel delayed work; offline preserves the final synchronous `collect -> drop`, with rows durable only later as the documented ceiling. A native row time selects a unique interval among the most recent 32 captured turns; no unique match gives `unattributed`. Late rows never rewrite an earlier `turn_end` or increment a later turn. A successful reader slice commits offsets only after its rows are recorded; restart seeding counts only rows recorded after the last `budget_resume` of a soft-token peer (`kimiSeedRows`). Tests never reach the person's `~/.kimi-code`: `test/hub-home.ts` sets `KIMI_CODE_HOME` to a temp dir. Never feed `budget.report(kimi, tokens)` from an ACP total or an estimate, and never change `kimiCountedTokens` without the AC5 test: cache reads are recorded, not counted. An unreadable log, an unknown row shape or an untested `protocol_version` is unknown (reading dropped via `Budget.forget(peer, "tokens", "count")`, so only the count's own reading goes; one notice), never a partial count. A usage row's text never leaves the reader: four integers, a model label and the row time. A resume clears the window (`kimiUsage.reset()`).
|
|
43
|
+
|
|
44
|
+
- Controlled recovery with retained reviewer accounting/wait history or explicitly configured reviewer quota keys requires `reviewer_quota`. Bind accounting replay completeness and safe ordered journal commitment through the existing snapshot integrity; missing/changed journal refuses restoration before optimistic counts can be published. Empty legacy state keeps older-target compatibility.
|