@staix/agent-hub 0.52.0 → 0.54.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +37 -0
- package/README.md +4 -3
- package/docs/addons/open-code-review.md +3 -6
- package/docs/agent-notes/README.md +1 -1
- package/docs/agent-notes/adapters.md +5 -4
- package/docs/agent-notes/budget.md +2 -2
- package/docs/agent-notes/bus.md +1 -0
- package/docs/agent-notes/daemon.md +6 -5
- package/docs/agent-notes/models.md +1 -1
- package/docs/agent-notes/tasks.md +3 -3
- package/docs/agent-notes/tests.md +4 -4
- package/docs/contracts/companion-cli-v2.json +90 -0
- package/docs/contracts/companion-cli-v3.json +348 -0
- package/docs/design/adapters.md +1 -1
- package/docs/design/agent-hub-architecture.md +8 -5
- package/docs/design/bus.md +1 -1
- package/docs/design/cli-output-inventory.md +4 -2
- package/docs/design/execution-reference.md +1 -1
- package/docs/design/guidance-experiments.md +1 -0
- package/docs/design/guidance-probes.md +1 -0
- package/docs/design/model-routes.md +20 -5
- package/docs/design/roadmap.md +6 -4
- package/docs/design/task-board.md +21 -2
- package/docs/dogfood.md +13 -6
- package/docs/events.md +1 -1
- package/docs/memory.md +2 -2
- package/docs/operations.md +158 -50
- package/docs/quickstart.md +14 -2
- package/docs/security.md +17 -9
- package/docs/specs/2026-09-19-agent-hub-design.md +5 -3
- package/docs/specs/2026-09-19-multi-project-design.md +1 -1
- package/docs/specs/2026-09-20-upgrade-recovery-design.md +24 -0
- package/docs/specs/2026-12-04-arev-adoption-design.md +84 -0
- package/docs/specs/mcp-endpoint.md +15 -4
- package/docs/specs/relay-contract.md +38 -0
- package/docs/verification/2026-12-04-host-shared-receipts.md +43 -0
- package/docs/verification/2026-12-05-0.53.0.md +101 -0
- package/docs/verification/2026-12-05-agy-1.5.24.md +55 -0
- package/docs/verification/2026-12-05-claude-implementer-2.1.337.md +43 -0
- package/docs/verification/2026-12-06-0.54.0.md +76 -0
- package/docs/verification/2026-12-06-codex-0174-reviewer-isolation.md +43 -0
- package/docs/verification/2026-12-06-codex-0174-reviewer-tool-call.md +34 -0
- package/docs/verification/2026-12-06-compat-codex-capabilities-0.174.0.md +25 -0
- package/docs/verification/2026-12-06-compat-pi-1.8.0.md +23 -0
- package/docs/verified.json +38 -29
- package/package.json +9 -3
- package/plugins/agent-hub/.claude-plugin/plugin.json +1 -1
- package/plugins/agent-hub/.mcp.json +1 -1
- package/plugins/agent-hub/compat.json +9 -5
- package/plugins/agent-hub/kimi-hook.js +892 -874
- package/plugins/agent-hub/relay-launcher.js +24 -0
- package/plugins/agent-hub/server.js +27271 -25146
- package/src/adapters/acp-session-model.ts +1 -1
- package/src/adapters/acp.ts +5 -4
- package/src/adapters/agy/definition.ts +1 -1
- package/src/adapters/agy/hooks.ts +1 -1
- package/src/adapters/channel-peer.ts +3 -1
- package/src/adapters/claude-channel-evidence.ts +26 -1
- package/src/adapters/claude-channel.ts +27 -30
- package/src/adapters/claude-connection-policy.ts +62 -0
- package/src/adapters/claude-relay.ts +255 -0
- package/src/adapters/codex-review-isolation.ts +1 -2
- package/src/adapters/compat.ts +28 -18
- package/src/adapters/definitions/native-cli-preview-pi.ts +2 -1
- package/src/adapters/definitions/native-config-defaults.ts +1 -1
- package/src/adapters/definitions/native-context.ts +1 -2
- package/src/adapters/definitions/native-factories.ts +4 -1
- package/src/adapters/definitions/native-quota.ts +1 -1
- package/src/adapters/definitions/native-recovery.ts +3 -1
- package/src/adapters/external-modules.ts +2 -2
- package/src/adapters/kimi-review.ts +1 -1
- package/src/adapters/kimi-tui-facts.ts +1 -1
- package/src/adapters/local-worker.ts +3 -3
- package/src/adapters/native-capabilities.ts +1 -1
- package/src/adapters/pi.ts +26 -7
- package/src/adapters/registry-types.ts +2 -0
- package/src/adapters/relay-launcher.ts +27 -0
- package/src/adapters/reviewer-mcp.ts +1 -1
- package/src/cli/agents.ts +20 -8
- package/src/cli/agy-mcp.ts +1 -1
- package/src/cli/claude-profile-hook.ts +1 -1
- package/src/cli/command-table.ts +1 -0
- package/src/cli/commands/agents.ts +18 -1
- package/src/cli/commands/doctor.ts +18 -4
- package/src/cli/commands/launch-line.ts +32 -0
- package/src/cli/commands/status.ts +14 -3
- package/src/cli/help.ts +7 -4
- package/src/cli/identity.ts +1 -1
- package/src/cli/init-roles.ts +1 -1
- package/src/cli/init-settings.ts +1 -1
- package/src/cli/launch-line-plan.ts +82 -0
- package/src/cli/launch-line-project.ts +13 -0
- package/src/cli/main.ts +10 -9
- package/src/cli/pi-steps-warning.ts +14 -0
- package/src/cli/recovery-package.ts +60 -6
- package/src/cli/reset.ts +1 -1
- package/src/cli/shell-quote.ts +1 -3
- package/src/cli/upgrade-interactive.ts +7 -2
- package/src/cli/upgrade-keep-plan.ts +47 -0
- package/src/cli/upgrade-restore-state.ts +1 -1
- package/src/cli/upgrade-runtime.ts +119 -18
- package/src/cli/upgrade.ts +17 -2
- package/src/hub/accounts.ts +8 -4
- package/src/hub/action-class.ts +1 -3
- package/src/hub/adec-triage.ts +105 -0
- package/src/hub/autonomy.ts +1 -1
- package/src/hub/board.ts +3 -27
- package/src/hub/bus.ts +39 -6
- package/src/hub/capabilities.ts +1 -1
- package/src/hub/channel-project-base.ts +46 -0
- package/src/hub/channel-project.ts +21 -46
- package/src/hub/config-apply.ts +1 -1
- package/src/hub/config-edit.ts +1 -1
- package/src/hub/config-tier.ts +1 -1
- package/src/hub/config.ts +2 -2
- package/src/hub/confirmation-matrix.ts +1 -1
- package/src/hub/control/board-messages.ts +415 -0
- package/src/hub/control/dashboard-messages.ts +221 -0
- package/src/hub/control/delivery-messages.ts +356 -0
- package/src/hub/control/dispatch.ts +114 -0
- package/src/hub/control/hub-tool-helpers.ts +243 -0
- package/src/hub/control/hub-tools.ts +147 -0
- package/src/hub/control/native-messages.ts +665 -0
- package/src/hub/control/operations-messages.ts +269 -0
- package/src/hub/control/peer-messages.ts +126 -0
- package/src/hub/control/recovery-messages.ts +391 -0
- package/src/hub/control/recovery-operation.ts +480 -0
- package/src/hub/control/scope.ts +460 -0
- package/src/hub/control/sdlc-messages.ts +373 -0
- package/src/hub/control/task-ops-more.ts +245 -0
- package/src/hub/control/task-ops.ts +553 -0
- package/src/hub/control/ui-actions.ts +241 -0
- package/src/hub/control-write-trace.ts +1 -4
- package/src/hub/daemon.ts +485 -4324
- package/src/hub/delivery-hints.ts +2 -0
- package/src/hub/delivery-journal.ts +17 -6
- package/src/hub/events.ts +2 -1
- package/src/hub/execution-reference.ts +1 -1
- package/src/hub/host.ts +41 -9
- package/src/hub/hub-tools.ts +3 -4
- package/src/hub/invocations.ts +1 -1
- package/src/hub/lifecycle.ts +4 -3
- package/src/hub/mcp-endpoint-serve.ts +4 -3
- package/src/hub/mcp-endpoint.ts +15 -6
- package/src/hub/memory-profile-check.ts +1 -1
- package/src/hub/no-writes.ts +1 -1
- package/src/hub/peers.ts +2 -0
- package/src/hub/pi-exit-policy.ts +27 -0
- package/src/hub/progress.ts +1 -1
- package/src/hub/project-runtime-state.ts +17 -4
- package/src/hub/project-runtime.ts +3 -1
- package/src/hub/protocol-window.ts +1 -1
- package/src/hub/recovery-continuity.ts +3 -3
- package/src/hub/recovery-kept-roster.ts +50 -0
- package/src/hub/review-anchor.ts +13 -181
- package/src/hub/review-brief.ts +78 -28
- package/src/hub/review-findings.ts +15 -193
- package/src/hub/review-ledger.ts +162 -0
- package/src/hub/review-material.ts +3 -3
- package/src/hub/reviewer-pool.ts +4 -2
- package/src/hub/roadmap-issue-states.ts +65 -14
- package/src/hub/roadmap-sync.ts +39 -14
- package/src/hub/routing.ts +9 -0
- package/src/hub/runtime-capture-prune.ts +8 -2
- package/src/hub/runtime-package-assets.ts +3 -0
- package/src/hub/sdlc-release-policy.ts +1 -2
- package/src/hub/settings.ts +1 -1
- package/src/hub/spec-ack-tool.ts +4 -0
- package/src/hub/spec-report-history.ts +36 -0
- package/src/hub/specs.ts +1 -4
- package/src/hub/supervision.ts +33 -6
- package/src/hub/tasks-audit.ts +390 -0
- package/src/hub/tasks-backlog.ts +522 -0
- package/src/hub/tasks-handoff.ts +208 -0
- package/src/hub/tasks-release.ts +257 -0
- package/src/hub/tasks-roadmap.ts +17 -3
- package/src/hub/tasks-specs.ts +672 -0
- package/src/hub/tasks-types.ts +334 -0
- package/src/hub/tasks.ts +286 -1961
- package/src/hub/upgrade-session-contract.ts +11 -0
- package/src/local/probe-sandbox.ts +1 -2
- package/src/local/probe-workspace.ts +1 -1
- package/src/models/route/config.ts +4 -4
- package/src/models/route/decision.ts +18 -10
- package/src/models/route/observation-signals.ts +1 -2
- package/src/models/route/runtime.ts +8 -5
- package/src/npm-artifact.ts +76 -0
- package/src/omniroute/client.ts +6 -0
- package/src/pi/extension.ts +5 -2
- package/src/pi/install.ts +77 -0
- package/src/pi/pin.ts +49 -0
- package/src/primitives.ts +14 -0
- package/src/version.ts +2 -0
- package/templates/adec/README.md +10 -6
- package/templates/config.json +1 -1
- package/templates/specs.block.md +1 -0
|
@@ -2165,7 +2165,8 @@ A machine-local boolean `action_policy.floor` (default false, registered, applie
|
|
|
2165
2165
|
outside the hub. The issue's Codex `thread/resume` needs the TUI, so the report
|
|
2166
2166
|
names the thread instead.
|
|
2167
2167
|
- Loss notices use the bus preface, not an envelope: a peer's `needs_review`
|
|
2168
|
-
rows block its later deliveries
|
|
2168
|
+
rows block its later deliveries (except a row the ACP adapter's own unrequested stop
|
|
2169
|
+
marked `holdsSelf`, which holds only itself, #1946), so a notice queued behind them would arrive
|
|
2169
2170
|
only after they are resolved anyway; the preface leads that next delivery. Only
|
|
2170
2171
|
rows still in `needs_review` when the peer attaches are listed.
|
|
2171
2172
|
- `recovery.auto_resume_after_crash` is off by default, also with a project
|
|
@@ -2229,7 +2230,7 @@ A machine-local boolean `action_policy.floor` (default false, registered, applie
|
|
|
2229
2230
|
- Delivery retries exhausted for an owned open task trigger escalation through `Tasks`, with a redacted reason and a console notice. Delivery health skips peers after three consecutive exhausted deliveries until a completed delivery clears the streak.
|
|
2230
2231
|
- `needs_review` holds uncertain work that still matters. The hub settles a row `completed` only when every original is a hub presence item or a hub task/review notice provably moot for its recipient: an approved or cancelled task (except its cancellation stop notice), a review no longer in review for that reviewer, or a notice whose authoritative `refs.taskRecipient` audience (`owner` or `reviewer`) is no longer current. Hub producers tag current-owner notices, reviewer reminders and planner coordination separately; former-owner stop notices and former-owner/former-reviewer withdrawal notices use untagged kind `task` and stay held until task approval or cancellation, because their purpose is to tell the former role to stop. An owner task offer (kind `task`, `refs.taskRecipient: "owner"`, positive safe-integer `refs.taskOffer`) also becomes moot once that recipient still owns its task in `in_progress`, `in_review` or `changes_requested` and its own `accepted` entry follows the latest ownership event. A person's assignment or acceptance does not count for the peer; a replacement-owner offer under review stays live until that peer accepts. The pure check inspects at most 4096 recent history entries, with absent or out-of-bound proof retaining the hold; approval/cancellation keep their existing rules. The ids-only reason is `superseded: task #N accepted`. This applies on hold entry, restored startup, recovery release and board changes, using the same hub-actor resolution path; it never records an offer read or changes the task. A plain owner reminder without the offer marker, an unaccepted offer and any mixed peer/user row stay held. Task-kind reviewer reminders remain live while the recipient is that in-review reviewer. Planner notices and untagged legacy task-kind notices stay held until approval or cancellation: without an audience marker, sender/kind/task id cannot prove that an owner assignment moved. This conservative legacy ceiling preserves still-live coordination and guidance. Unknown tasks, live recipient notices and mixed peer/user rows remain held. Rows whose recorded reason starts with `requested stop:` are never completed automatically, even when their tasks become approved. `supersededDeliveryReason` alone authorizes completion; a separate pure `deliveryTaskContext` retains ids-only approved/moved task context for mixed rows without authorizing settlement. Status, console notices and console/peer/tool route explanations list every hold once, including sender, kind and age; public explanations screen appended hold lines through the current privacy policy and keep task context ids-only. Classify on entry, after restore, after the daemon releases its recovery hold and on board changes; use the existing resolve path with a recorded hub actor, preserving pauses and Tasks state. Hub completion restores presence originals through the same preface merge and transaction rollback path as retry, preserving shared notes for the next queued delivery; person completion remains consumed (#434).
|
|
2231
2232
|
- A Claude session without channel support returns `failed_safe` before the push reaches the model, preserving originals for pull. If an older daemon rejects that receipt, the plugin falls back once to its prior generation-bound `needs_review` receipt instead of leaving the row dispatching. A thrown `server.notification` remains `needs_review`: the MCP SDK delegates to a transport whose stdout write can already have emitted bytes before an exception is observed, so the exception alone cannot prove no frame left. Existing proven pre-acceptance guards in Codex, ACP, Pi and the local worker remain unchanged. Console-only command refusals name only the inherited identity marker keys actually present (never their values), explain `!` commands, and direct the person to a separate terminal or `ahub console` (#434).
|
|
2232
|
-
- `hub_delivery_retry { delivery_id }` lets an authenticated recipient retry only its own current `needs_review` row. This option is offered only to transports with an independent tool turn (Claude channel/pull, Codex and Pi). The delivery-only local worker and headless ACP peers cannot start a tool turn through their own hold, so they do not advertise this tool and the daemon refuses a manual call before mutation. Their held hints ask the person to resolve the row; ordinary messages never bypass the hold. Kimi TUI remains pull-only and keeps the recipient option. An ephemeral delivery-only MCP marker controls exposure and hint copy only; the current adapter class is the authority. There is no action or reason input: `completed` and `discard` remain person-only. Any explicit retry in that recipient's lineage, including a person's retry, consumes this allowance; a redelivery held again stays for the person. The existing resolution transaction records `peer:<id>` and a fixed reason, keeps original envelopes unchanged and requeues them through the existing put-back path. A busy recipient may consent to this queue-only operation, but delivery waits for idle and all pause/recovery and active-delivery fences remain. The rendered clone reserves the existing journal body cap for the warning, clipping only the clone at a Unicode character boundary with an explicit cut marker when needed; originals remain unchanged. Jcode project MCP entries carry the same delivery-only exposure marker as other headless ACP peers, preserving their own configuration and peer identity rules. Final rendered output, after condensation and on pull or steer, starts with the fixed sanitized header `Hub redelivery warning: An earlier attempt of this delivery is uncertain; check for its effects before acting.` Explicit retry history is scoped by recipient and original envelope ids. A separate monotone consumed-proof projection records one proof id and warning provenance per original, leaving resolution audit rows unchanged. Explicit resolution and coalesced handoff inherit that proof atomically for every grouped non-context original; a rejected checkpoint consumes no fresh allowance. Hub presence originals carry mutable recall/shared context whose id survives merging, so their ids never participate in retry proof lookup, inheritance, warnings or unknown marking. A preface shared with earlier work cannot consume an unrelated new message's retry allowance; actual task/chat originals retain their consumed lineage. Safe-failure requeue, withdrawal of an earlier original, terminal-state changes, pruning, restart or older-writer audit replacement cannot renew the allowance. Older attempt-bearing rows backfill this projection on return. Recovery snapshots without history and unmappable pruned pre-feature retry records mark only their affected recipient/original ids unknown: those lineages require a person, while unrelated new messages keep their allowance. Tool results expose held metadata only (total count, ids, senders, kinds and age), at most 32 rows/4 KiB with explicit truncation; no body or task text enters the hint. These hints work independently of channel mode and do not wait behind the held queue (#434).
|
|
2233
|
+
- `hub_delivery_retry { delivery_id }` lets an authenticated recipient retry only its own current `needs_review` row. This option is offered only to transports with an independent tool turn (Claude channel/pull, Codex and Pi). The delivery-only local worker and headless ACP peers cannot start a tool turn through their own hold, so they do not advertise this tool and the daemon refuses a manual call before mutation. Their held hints ask the person to resolve the row; ordinary messages never bypass the hold, except for a row marked `holdsSelf` by the ACP adapter's own unrequested stop (a host-set, journaled mark; reason text never decides it, #1946), which holds only itself: later queued work is delivered, the row stays listed in status for an explicit resolution, and the next delivery carries one bounded, body-free held hint. Every other `needs_review` row of a local peer keeps the peer-wide hold. Kimi TUI remains pull-only and keeps the recipient option. An ephemeral delivery-only MCP marker controls exposure and hint copy only; the current adapter class is the authority. There is no action or reason input: `completed` and `discard` remain person-only. Any explicit retry in that recipient's lineage, including a person's retry, consumes this allowance; a redelivery held again stays for the person. The existing resolution transaction records `peer:<id>` and a fixed reason, keeps original envelopes unchanged and requeues them through the existing put-back path. A busy recipient may consent to this queue-only operation, but delivery waits for idle and all pause/recovery and active-delivery fences remain. The rendered clone reserves the existing journal body cap for the warning, clipping only the clone at a Unicode character boundary with an explicit cut marker when needed; originals remain unchanged. Jcode project MCP entries carry the same delivery-only exposure marker as other headless ACP peers, preserving their own configuration and peer identity rules. Final rendered output, after condensation and on pull or steer, starts with the fixed sanitized header `Hub redelivery warning: An earlier attempt of this delivery is uncertain; check for its effects before acting.` Explicit retry history is scoped by recipient and original envelope ids. A separate monotone consumed-proof projection records one proof id and warning provenance per original, leaving resolution audit rows unchanged. Explicit resolution and coalesced handoff inherit that proof atomically for every grouped non-context original; a rejected checkpoint consumes no fresh allowance. Hub presence originals carry mutable recall/shared context whose id survives merging, so their ids never participate in retry proof lookup, inheritance, warnings or unknown marking. A preface shared with earlier work cannot consume an unrelated new message's retry allowance; actual task/chat originals retain their consumed lineage. Safe-failure requeue, withdrawal of an earlier original, terminal-state changes, pruning, restart or older-writer audit replacement cannot renew the allowance. Older attempt-bearing rows backfill this projection on return. Recovery snapshots without history and unmappable pruned pre-feature retry records mark only their affected recipient/original ids unknown: those lineages require a person, while unrelated new messages keep their allowance. Tool results expose held metadata only (total count, ids, senders, kinds and age), at most 32 rows/4 KiB with explicit truncation; no body or task text enters the hint. These hints work independently of channel mode and do not wait behind the held queue (#434).
|
|
2233
2234
|
- Local attach and idle model/route replacement require a reachable authenticated gateway, served models and successful minimal availability calls. Busy workers refuse replacement; validation failure leaves the current worker intact. Controlled recovery can reconstruct a manually paused local worker without gateway availability, but manual resume validates its restored choice before lifting the pause. Doctor checks the fixed model against the inventory.
|
|
2234
2235
|
- Reviewer routing appends attached peers holding `roles.reviewer` after the review class's candidates. Without a reviewer, task results and console notices explain direct approval and the skipped candidates.
|
|
2235
2236
|
- Conflict detection includes `in_review` work. Completed overlapping snapshots that share files compute one concurrent-edit change set across the completed overlapping turns and publish at most one conditional notice per affected task, containing both turn ids and attributing the changes to neither peer. Per-task-pair events remain research evidence, while notice persistence grows linearly in the affected tasks (#576). A bounded, per-worktree HEAD reflog cursor classifies moves appended during the turn. Incoming checkout, merge, pull and proven fast-forward reset paths are excluded from attributed changes and undo paths; normal peer commit, amend and cherry-pick paths remain attributed, as do sequencer pick/reword/edit/squash/fixup/continue/finish paths under native command prefixes. The start checkout of rebase or pull --rebase classifies incoming paths from `merge-base(old, upstream)..upstream` instead of `old..upstream`, so replayed own commits do not overlap and true upstream paths are excluded (#612); any remaining path overlap or ambiguity stays unknown, never attributed as upstream work. Fast-forward reset stays incoming even if its descendant target contains commits made by the peer in another worktree during the turn, safely excluding external commits from local turn attribution and undo (#612). Paths still dirty between end HEAD and the end workspace snapshot are never excluded (including autostash and checkout -m). Independent working-tree edits remain attributed. Missing, rotated, truncated, unrecognized or ambiguous move evidence is unknown, never an exclusion; paths shared by own and incoming moves are ambiguous. A HEAD change during snapshot capture makes that capture unknown. Status probes the checkout branch once per synchronous burst, then screens the cached raw branch through the current privacy policy for every rendering; the cache ends before the next control turn. Pi terminal reconciliation reads an owner observation maintained by the existing 500 ms monitor and expiring after 1 s; fresh signature checks remain mandatory at tool/effect admission and teardown. Private tasks and sensitive file names remain redacted.
|
|
@@ -3305,6 +3306,7 @@ acts on the stopped state directory.
|
|
|
3305
3306
|
- A trusted guard uses `PreEffectToolRefusal` only when that operation has performed no task or board effect; PII screening and its telemetry record may precede the refusal. Pi receives the same `error: <message>` refusal as the control client, and its session/call receipt is `done`. Initial task ownership/dependency/state checks and conductor entry peer/mode/assignment/escalation validation opt into the type; shared helpers default to ordinary errors, and conductor checks after an awaited release validation stay ordinary. Generic errors, board readback failures after a write, and receipt settlement write failures remain uncertain/pending and are never repeated. A legacy pending row has no pre-effect proof in its stored fingerprint/state/result, so startup preserves it; neither present board state nor a matching error message establishes historical refusal.
|
|
3306
3307
|
- Each Pi owner reports one exit with cause, exit code or signal, whether startup completed, whether a turn/tool was active, whether teardown was expected, and the last validated tool name only. TUI shutdown/owner-loss and verified stop teardown lack observed OS status and record unknown. A successfully stopped claimed TUI owner reports once; a never-owned launch reports no invented exit. Replacement teardown says the owner stopped for a new Pi owner even if replacement startup is refused. Internal teardown notices direct inspection and `ahub pi`, without claiming a person requested them. Replacement, failed-start and active-turn guidance takes precedence over the automatic-start-disabled notice. Console notices name the next action or automatic-start state; headless code 0 is still an exit and settles active deliveries as uncertain.
|
|
3307
3308
|
- With `pi.auto_start`, an unexpected idle headless exit attempts its verified persisted session once in a 60 s window. The daemon owns the attempt/window across adapter replacements, blocks throughout an in-flight attempt, and rearms the 60 s window when that attempt settles. It checks current-owner identity, completed startup, turn/tool inactivity, start serialization, shutdown and recovery before and after awaited receipt drain/session capture. Missing or invalid persisted state leaves Pi offline with `ahub pi` guidance, with no fresh-session fallback. A second exit inside the window stays offline. Requested stops, stale owners, startup failures, active turns/tools and native terminal exits never trigger this automatic path; crash recovery's existing #66 behavior remains separate.
|
|
3309
|
+
- Exception for a killed or self-shut-down owner (#1967 T1): an unexpected exit whose cause is a signal, `ctx.shutdown()` after a `model_select` of another provider, or a `session_shutdown` with no exit code may restart under `pi.auto_start` even while a turn or tool was active, because no clean exit code says the process finished and the session file is the only record. The in-flight delivery is already `needs_review` (the owner's `fail()` settles it before the exit is reported) and is never replayed by the restart, so the person decides about its partial effects; only the owner is brought back, resuming the recorded session once. Each peer and cause restarts once per 10 minutes, keyed by both so a different cause never erases an earlier one's window; a repeat inside it stays offline with `ahub pi` guidance. A plain exit code with an active turn or tool keeps the idle-only rule above. The exit log line records the cause label (`signal:<name>`, `model_select:<provider>`, `session_shutdown`, `code:<n>`), the last native event and a bounded stderr tail, never task text. For a restartable cause the recovery gate considers a running recovery phase, not the peer's own held `needs_review` row, which the restart does not clear.
|
|
3308
3310
|
## Amendment: benchmarks (issue #251)
|
|
3309
3311
|
|
|
3310
3312
|
- `ahub bench` runs a person's suite file (tasks with a starting commit, an optional setup and a verify command)
|
|
@@ -6544,7 +6546,7 @@ C1 lists capabilities and nothing else: no `hub_invoke`, no `invoke` capability,
|
|
|
6544
6546
|
|
|
6545
6547
|
- **Where.** `src/hub/capabilities.ts` holds the pure rules (digest, sanitizer, flat schema, publish validation, share listing). The two native parsers and their version pins are vendor-specific, so they live in `src/adapters/native-capabilities.ts`, where the #451 registry guard allows vendor literals. `AcpPeer` and `CodexPeer` implement a new optional `PeerAdapter.capabilityManifest()`; the daemon reads it per call, never a cached or probed copy. The per-definition `capabilities.manifest` field of D1 is not used: the port on the adapter is.
|
|
6546
6548
|
- **No class is declared natively.** `Capability.sideEffect` is optional and absent for every native listing, so the digest carries `null` for it. `effectiveClass` is the higher of the declared and the person's class, a side that names none contributes nothing, and only when neither names one is the class `destructive` (O6). A value that is not one of the four reads as `destructive`. The `exec` class is removed from the manifest type.
|
|
6547
|
-
- **Pins.**
|
|
6549
|
+
- **Pins.** The C0 baseline was Kimi 2.3.2 (`Kimi Code CLI`), Qwen 0.26.1 (`qwen-code`) and Codex 0.166.0. `COMPAT` holds the current exact listing versions. The Codex set includes C0 and [0.174.0](../verification/2026-12-06-compat-codex-capabilities-0.174.0.md). An unverified version lists nothing unless the person explicitly trusts it for capability listing.
|
|
6548
6550
|
- **ACP lists belong to a session.** The `available_commands_update` of the current session is kept whatever the turn state. One that arrives before `session/new` is answered waits and counts only when it names the session that was bound; one for another session is dropped. A restart clears the list. An offline peer lists nothing.
|
|
6549
6551
|
- **Codex.** `skills/list { cwds: [project], forceReload: false }` goes through the attached app-server connection with a hub id, so the TUI never sees the answer. Enabled skills only; the short description is used when there is one. An unattached, offline or unanswered peer rejects, which the daemon shows as no list.
|
|
6550
6552
|
- **Config.** `invocation` is a machine-local block validated by the closed schema (`invocation.share` only in C1; `timeout_s` arrives with C2) and applies live. `hub_capabilities` reads the share from the running config on every call.
|
|
@@ -118,4 +118,4 @@ Same-machine cross-project routing is no longer out of scope: work that belongs
|
|
|
118
118
|
|
|
119
119
|
- **Project context (#1779 T2).** `startDaemon` takes an explicit `DaemonProjectContext` (`root`, `stateDir`, `env` for children; default built once from `cwd`, `stateDir` and the process environment). Child environments (tool servers, the instructed hook, the ACP and Codex adapters) come from it, and `scripts/check-process-identity.ts` fails on a new `process.cwd()` or `AGENTHUB_STATE_DIR` / `AGENTHUB_PROJECT_DIR` read in `src/hub` outside a reasoned allow-list (CLI-side resolution before a daemon exists). Still one project per process; signals, forced exit and loggers stay process-wide (T3).
|
|
120
120
|
|
|
121
|
-
- **Host (#1779 T3a).** `ahub host --runtime <root>` owns several `startDaemon` instances of one runtime, keyed by project id (`src/hub/host.ts`), each started with `hostedProjectContext` (the host's environment with that project's own state and project directories). Off by default: `startProject` hands a project to the host of its runtime only when its config sets `host.shared: true` and it starts neither under a recovery operation nor as a live test; otherwise it spawns a daemon as before, byte for byte. The host listens on an owner-only socket under the hub home, named by a hash of the runtime root (`ping`, `add`); a project that asks while no host answers starts one (`ahub host --runtime <root> --add-current`), and a second host for the same runtime joins the first instead of replacing its socket. Signals and the 15 s forced exit belong to the host: a signal stops every project in the order added, then the host. An uncaught error or rejection is attributed through an `AsyncLocalStorage` entered when the project was added, so it reaches timers and promises the project started: it stops that project only; an error with no project is logged and stops the host. Measured under Bun 1.4.4 (`test/host-shared.test.ts`, a real host process): an error thrown from a timer the project started is attributed and stops that project only; an error thrown from a `node:net` socket handler and an unhandled rejection lose the context, count as unattributed and stop the host.
|
|
121
|
+
- **Host (#1779 T3a).** `ahub host --runtime <root>` owns several `startDaemon` instances of one runtime, keyed by project id (`src/hub/host.ts`), each started with `hostedProjectContext` (the host's environment with that project's own state and project directories). Off by default: `startProject` hands a project to the host of its runtime only when its config sets `host.shared: true` and it starts neither under a recovery operation nor as a live test; otherwise it spawns a daemon as before, byte for byte. The host listens on an owner-only socket under the hub home, named by a hash of the runtime root (`ping`, `add`); a project that asks while no host answers starts one (`ahub host --runtime <root> --add-current`), and a second host for the same runtime joins the first instead of replacing its socket. Signals and the 15 s forced exit belong to the host: a signal stops every project in the order added, then the host. An uncaught error or rejection is attributed through an `AsyncLocalStorage` entered when the project was added, so it reaches timers and promises the project started: it stops that project only; an error with no project is logged and stops the host. Measured under Bun 1.4.4 (`test/host-shared.test.ts`, a real host process): an error thrown from a timer the project started is attributed and stops that project only; an error thrown from a `node:net` socket handler and an unhandled rejection lose the context, count as unattributed and stop the host. T5a measured throws at A's Bun server callback boundary. A fetch throw returned HTTP 500 and left both projects running without invoking the host hook. A control WebSocket callback throw originally reached the hook without project attribution and stopped the host. Hosted control message and close callbacks enter the project's context and catch a synchronous throw at the callback boundary, both for the WebSocket listener and for MCP endpoint sessions. The host logs the failure and stops that project while the other projects keep serving. See the [T5a receipt](../verification/2026-12-04-host-shared-receipts.md). One host per runtime root is an atomic claim in `registry.db` (`host_claims`, pid and process signature): only the claim holder removes a stale socket file and listens, a loser joins the answering host or fails closed naming the holder, and a project the host is asked to add is admitted only as the registry holds it. `project stop` is the project's own `kill`: its daemon removes its listener, timers and children, releases its registry claim and leaves the others serving. Clients see no change: per-project control port, `status.json`, `control-token` and state directory stay; `status.json` and the status reply gain `hostId`, and `pid` is the host's. The host exits when its last project stops. Retargeting (#1779 T4): a project's host is the runtime root in its `runtime.json`. Stop it, record another runtime with `recordProjectRuntime` and start it again, and it runs in that runtime's host while every other project stays in its own, untouched; the old host exits with its last project and removes its socket (`test/host-retarget.test.ts`). Under a recovery or upgrade operation a project starts isolated and joins its runtime's host on its next ordinary start. T5a measured control replies of 14.62 ms and 88.30 ms during A's awaited and chunked five-second startup probes. A five-project host used 97,928,152 bytes of physical footprint after settling, compared with 217,926,416 bytes for three isolated daemons. These are fixture measurements. Shared mode stays off by default. The default decision and live dogfood run remain separate.
|
|
@@ -892,3 +892,27 @@ publishes the accepted range. It reports the floor limit only when at least
|
|
|
892
892
|
one setting exceeds its default and the requested range reaches below the
|
|
893
893
|
implementation floor. Retain the scalar field at the accepted
|
|
894
894
|
minimum so published clients can still read the descriptor.
|
|
895
|
+
|
|
896
|
+
|
|
897
|
+
## Keep-first Claude upgrades
|
|
898
|
+
|
|
899
|
+
The package manifest declares one session contract number each for Claude and
|
|
900
|
+
Codex. The project runtime record copies that data from the verified package.
|
|
901
|
+
An unknown contract follows the legacy plan. The upgrade can compare the
|
|
902
|
+
target's published contract and staged manifest before committing the source.
|
|
903
|
+
|
|
904
|
+
An attached Claude session is eligible for `keep` when the reported live
|
|
905
|
+
session ID is available, its contract matches the target, and its bridge
|
|
906
|
+
fits the target window or it uses the project relay. A live session ID comes
|
|
907
|
+
only from the attached connection. A missing ID follows the legacy plan with
|
|
908
|
+
`session id unknown`. `--recreate` uses the legacy plan and sends an empty
|
|
909
|
+
kept roster.
|
|
910
|
+
|
|
911
|
+
Prepare validates the kept roster against the current live connections and
|
|
912
|
+
binds it to the operation. Only the busy-state wait for those peers is
|
|
913
|
+
excluded. Commit revalidates every connection's reported session ID.
|
|
914
|
+
Abort, release and preparation expiry clear the roster. A kept session
|
|
915
|
+
reconnects to the replacement without a terminal command and must report
|
|
916
|
+
the original ID.
|
|
917
|
+
|
|
918
|
+
Gap handling (#1807 T4): During a hub replacement the Claude bridge (`claude-channel.ts`) and relay (`claude-relay.ts`) hold each new `tools/call` for at most `GAP_HOLD_MS` (30 s, `src/adapters/claude-connection-policy.ts`, no env var or file) and release held calls in arrival order when the next connection is ready; the hold also ends on standby, detach and terminal. An expired call returns `claudeGapText`, which names the upgrade and the next step. A call already written to the closed connection is never resent. A push queued for a kept session before the hub stops stays in the delivery journal and is delivered once, with one accepted receipt, after the replacement hub starts on the same state dir and the session reattaches (`test/upgrade-keep-delivery.test.ts`).
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# AREV review core and ledger adoption
|
|
2
|
+
|
|
3
|
+
Source [agent-hub issue #1874](https://github.com/STAIxBWLB/agent-hub/issues/1874).
|
|
4
|
+
|
|
5
|
+
Plan of record: entelecheia/ai-workspace#78, phase **V4 hub adoption** ("agent-hub imports the core; hub-local copies removed").
|
|
6
|
+
|
|
7
|
+
## Problem
|
|
8
|
+
|
|
9
|
+
- The hub and arev now hold two copies of the review core. arev ported `src/hub/review-findings.ts` and `src/hub/review-anchor.ts` (at 697cd2a1e) and the envelope sanitizer, and it builds its own packet beside `src/hub/review-brief.ts` (#520). The copies can drift.
|
|
10
|
+
- A `hub_review` verdict is not an arev record, so `arev gate` cannot answer for a hub task head. Workspaces that gate merges on `arev gate` make reviewers run arev in addition to `hub_review`, and the two answers can differ for the same head.
|
|
11
|
+
- `docs/addons/open-code-review.md` still describes OCR as a merge gate. The workspace that used it retired OCR for arev on 2026-12-03.
|
|
12
|
+
|
|
13
|
+
## Existing assets
|
|
14
|
+
|
|
15
|
+
- Hub: `review-brief.ts`, `review-findings.ts`, `review-anchor.ts`, `reviewer-pool.ts`, `risk-tier.ts`, `security-pass.ts`, `plan-conformance.ts`, `review-scope.ts`, `execution-reference.ts` (`EXECUTION_PRODUCERS`: ahub, ares, amem, vmem, atex).
|
|
16
|
+
- AREV: findings, anchors, framing, packets, reviewer ordering, ledger and gate. The CLI also supports `export --to hub` and `import --from brief`.
|
|
17
|
+
- Shared anchor fixture `test/fixtures/review/cases.json` (agent-review), also read by agent-console.
|
|
18
|
+
- Precedent: the hub imports `@staix/agent-mem` core while keeping authority and policy (plan decision 9).
|
|
19
|
+
|
|
20
|
+
## Design
|
|
21
|
+
|
|
22
|
+
- **Import, do not copy.** Depend on `@staix/agent-review` through a versioned core export (findings schema and validation, anchors, framing, packet building, ledger append and read, gate decision). The hub keeps authority: `hub_review`, head binding to tasks, reviewer peers, routing, budgets and privacy.
|
|
23
|
+
- **Findings and anchors.** Re-export anchors and findings through `src/hub/review-anchor.ts` and `src/hub/review-findings.ts` from AREV 0.17.1. Deleting the files requires a person decision allowing test import edits.
|
|
24
|
+
- **Brief.** `review_brief` builds its file list, exclusions and rule groups from the arev packet core for the same head and merge base. Hub-only sections (symbols, spec report, risk tier, structure budget, plan conformance, security pass) stay in the hub and are appended as hub sections.
|
|
25
|
+
- **One answer per head.** Each `hub_review` bound to a task head records through the arev core's record function (the same validation as `arev record`, never a raw `appendEvent`, never a child process) into the ledger the hub already owns (`$AGENTHUB_HOME/review/<project-id>/`): reviewer = the reviewing peer and its model family, implementer = the task owner, verdict and findings as filed. A later disposition of a hub finding appends an arev resolution event, never a rewrite. Then `arev gate --head <task head>` and the hub verdict agree.
|
|
26
|
+
- **`unmet` items.** A `hub_review` whose `unmet` items have no structured finding records each item as a blocking finding with a semantic id `compliance:unmet-<item slug>` (never positional). `arev gate` ignores the verdict word and fails only on open blocking findings and its other conditions, so a verdict-only record would pass a head the hub rejected. Each item is settled with `arev resolve`.
|
|
27
|
+
- **Reviewer selection.** Import arev's pure `chooseHost` ordering (implementer skipped, chosen only when it is the last one left). The hub supplies the candidates: peers online, within budget and allowed by the family rule. Tasks without a PR pass the task id where the PR number goes. The chosen peer and its model family go into the record. The hub keeps routing and budget authority.
|
|
28
|
+
- **Privacy.** A `[pii]` task or a private turn never produces a packet, record or copy outside the hub. Its head has no arev record, so `arev gate` does not pass it; the hub states that in the task view.
|
|
29
|
+
- **Lineage.** Add `arev` to `EXECUTION_PRODUCERS` so a task can point at a review record (`ExecutionReferenceV1`).
|
|
30
|
+
- **OCR note.** Mark `docs/addons/open-code-review.md` retired. Keep `open-code-review` in the closed `ADDONS` list so stored `tooling` events still parse.
|
|
31
|
+
- **Reviewer role text.** Unchanged: reviewers keep calling `hub_review`; the hub writes the arev record.
|
|
32
|
+
|
|
33
|
+
## Upstream dependencies
|
|
34
|
+
|
|
35
|
+
- Agent-review 0.17.0 ships the versioned core export and shared fixture.
|
|
36
|
+
- Agent-review 0.13.0 shipped the gate against a PR's target branch (agent-review#126) and the cross-process ledger lock (agent-review#127).
|
|
37
|
+
|
|
38
|
+
## Acceptance criteria
|
|
39
|
+
|
|
40
|
+
- [x] The hub's existing review tests pass unchanged with the existing import paths backed by the AREV core. The two shared-fixture readers use the published fixture path.
|
|
41
|
+
- [x] One review fixture set (findings, anchors, brief file lists) runs green in both repositories.
|
|
42
|
+
- [x] For an approved and a changes_requested `hub_review` on a fixture repository, `arev gate --head <head>` gives the matching answer, and a later finding resolution changes it as `arev gate` defines.
|
|
43
|
+
- [x] A `[pii]` task review writes nothing under the arev ledger, packet or copy paths (test asserts the directory is unchanged).
|
|
44
|
+
- [x] A `hub_review` with `unmet` items and no findings makes `arev gate` fail until each `compliance:unmet-*` finding is resolved.
|
|
45
|
+
- [x] Reviewer choice for a fixture pool matches `chooseHost` for the same candidates, and the record names the chosen peer and family.
|
|
46
|
+
- [x] `arev` is an accepted execution producer and round-trips through `parseExecutionReference`.
|
|
47
|
+
- [x] `docs/addons/open-code-review.md` says retired; stored `tooling` events with `open-code-review` still parse.
|
|
48
|
+
- [x] Tests use a temporary `AGENTHUB_HOME` and touch no network.
|
|
49
|
+
|
|
50
|
+
## Out of scope
|
|
51
|
+
|
|
52
|
+
- arev posting GitHub statuses for hub tasks (`arev gate --post` stays a person or merge-step action).
|
|
53
|
+
- Moving the board, peers, routing or reviewer-pool policy into arev.
|
|
54
|
+
- The acon review panel (V5).
|
|
55
|
+
|
|
56
|
+
## Decisions
|
|
57
|
+
|
|
58
|
+
- 2026-12-03: The hub records through the imported arev core record function, not `appendEvent` and not an `arev record` child process. Basis: owner approved the recommendation; a child process needs a report file and packet on disk and has the same lock gap (agent-review#127).
|
|
59
|
+
- 2026-12-03: Reviewer ordering comes from arev `chooseHost`; the candidate list stays hub policy. Basis: owner approved the recommendation; keeps one rotation rule without moving routing out of the hub.
|
|
60
|
+
- 2026-12-03: `unmet` items without findings become blocking `compliance:unmet-<slug>` findings. Basis: owner approved the recommendation; `arev gate` does not read the verdict (`src/gate.ts` pass conditions in agent-review 0.12.0).
|
|
61
|
+
|
|
62
|
+
- 2026-12-04: Keep the hub's `findingsForHead` behavior for a finding already settled on the queried head. STAIxBWLB/agent-review#150 restored parity in 0.17.1 and enables the findings re-export.
|
|
63
|
+
- 2026-12-04: Use AREV's stricter anchor path policy. It checks trimmed paths against the deny list, so leading spacing cannot make a denied path name acceptable.
|
|
64
|
+
|
|
65
|
+
## Upstream contract
|
|
66
|
+
|
|
67
|
+
The owner approved V4 on 2026-12-04. Agent-review 0.17.1 publishes
|
|
68
|
+
`@staix/agent-review/core` with `CORE_CONTRACT = "1.0.0"` and
|
|
69
|
+
`@staix/agent-review/fixtures/review-cases.json`. The hub pins agent-review exactly (0.17.1 at approval, 0.17.3 now, STAIxBWLB/cli-output#48 lockstep) and
|
|
70
|
+
assert the contract at startup or in a test. Agent-review 1.0.0 waits for
|
|
71
|
+
this adoption to verify the contract.
|
|
72
|
+
|
|
73
|
+
Agent-review 0.17.3 pins `@staix/mcp-stdio` 1.3.0 and `@staix/cli-output` 0.1.6. The hub's locked
|
|
74
|
+
agent-mem 0.50.0 uses mcp-stdio 1.2.1 and the same cli-output 0.1.6, so the dependency tree contains both mcp-stdio versions and one cli-output.
|
|
75
|
+
|
|
76
|
+
## Delivery order
|
|
77
|
+
|
|
78
|
+
1. Hub task 1313 promotes this specification.
|
|
79
|
+
2. Hub task 1314 pins the core, checks the contract, adopts findings, anchors and the shared fixture, and updates the runtime dependency convention in `AGENTS.md`. Recovery captures the AREV core source and manifest with its reviewed siblings, and pruning recognizes that captured layout.
|
|
80
|
+
3. Hub task 1348 adopts packet data in review briefs (done in PR #1934; it replaced hub task 1315).
|
|
81
|
+
4. Hub task 1346 adopts `chooseHost` for declared-kind rotation, adds the `arev` execution producer and retires the OCR note. Hub instance admission and reviewer continuity remain local policy. Step 4 can run alongside step 3 after step 2.
|
|
82
|
+
5. Hub task 1349 integrates recording and resolution with the AREV ledger and tests gate parity (done; it replaced hub tasks 1317, 1318 and 1347: `src/hub/review-ledger.ts`, `test/review-ledger.test.ts`).
|
|
83
|
+
|
|
84
|
+
Each implementation starts after its prerequisites have landed on the target branch. Each PR requires an AREV review and gate at its full head. Implementation PRs that change `review-findings.ts` or `review-brief.ts` also update `docs/design/task-board.md`.
|
|
@@ -14,6 +14,10 @@ paths:
|
|
|
14
14
|
- test/mcp-endpoint-session.test.ts
|
|
15
15
|
- test/mcp-endpoint.test.ts
|
|
16
16
|
- test/mcp-endpoint-daemon.test.ts
|
|
17
|
+
- test/mcp-endpoint-parent.test.ts
|
|
18
|
+
- src/adapters/claude-relay.ts
|
|
19
|
+
- src/adapters/claude-connection-policy.ts
|
|
20
|
+
- test/claude-relay.test.ts
|
|
17
21
|
---
|
|
18
22
|
|
|
19
23
|
# Per-project MCP endpoint socket (#1780 T1)
|
|
@@ -44,14 +48,14 @@ With `startDaemon({ mcpServe: true })` (off by default; no production caller set
|
|
|
44
48
|
|
|
45
49
|
- **Admission by reuse:** the daemon opens a `ControlClient` over a Sock-shaped link (`ControlClient.inProcess`, `openMcpSession` in `src/hub/daemon.ts`) and sends the hello a bridge would send through the control WebSocket's own `message` handler (`controlWebsocket`). Peer admission, launch proof, session identity, account label and attachment are the control code. The control WebSocket protocol is unchanged.
|
|
46
50
|
- **Hello, additive optional fields:** `session` (label, at most 64 characters), `claudeSessionId` (a Claude session uuid), `launchId` (1 to 128 characters), `projectRoot` (1 to 4096), `permissionTool` and `deliveryOnly` (booleans, tools mode only for the first). Each is validated as on the control path, under the same token and size limits; unknown fields are refused. Roles, profile and catalog roles are derived by the daemon from its own configuration, never from the hello.
|
|
47
|
-
- **Mode mapping:** `tools` (or a hello with `session`) is a control `tools` client
|
|
51
|
+
- **Mode mapping:** `tools` (or a hello with `session`) is a control `tools` client. A `channel` hello without `session` is a control `peer` client. The daemon grants channel mode after the parent-evidence check (T3), and otherwise serves pull-only with `hub_inbox`. It never asks to stand by.
|
|
48
52
|
- **JSON-RPC 2.0, newline-delimited:** `initialize` and `tools/list` come from `src/hub/mcp-bridge-core.ts` (`tools/list` reads the lifecycle through the session's own control client); `tools/call` goes through `hubToolCall` (`src/hub/mcp-tool-call.ts`), so a refusal carries the bridge's text. `ping` answers `{}`, `notifications/cancelled` aborts the named call, any other method is -32601, a handler error keeps its code or becomes -32603. Calls run concurrently; the endpoint does not await a line.
|
|
49
53
|
- **Refusal:** when the control path refuses the hello (project or instance mismatch, off roster, reserved id), the session gets one JSON-RPC error line (`id: null`, code -32000, the hub's reason) and the connection ends. A malformed hello still closes with no reply.
|
|
50
|
-
- **AC7:** `home` maps to `claude:<label>` as for a bridge session (#1810) because the control hello does the mapping; an undeclared, missing or invalid home
|
|
54
|
+
- **AC7:** `home` maps to `claude:<label>` as for a bridge session (#1810) because the control hello does the mapping; an undeclared, missing or invalid home budgets as the kind's default account: `claude:default` once the kind has a declared account (#1941), the bare key otherwise (a project without `accounts`, or a kind without a declared account). The home path is passed only into that mapping and appears in no log, event, status reply or output.
|
|
51
55
|
|
|
52
56
|
## Channel pushes and the buffer (T2b)
|
|
53
57
|
|
|
54
|
-
- **
|
|
58
|
+
- **Parent evidence (T3, AC3):** after the hello's uid check, the hub reads the relay and its reported parent in one bounded asynchronous `ps` observation. The relay's observed parent must match the reported PID. The parent's command must pass the same classifier used by the bridge. Missing, mismatched or unproven evidence keeps the connection pull-only with the existing inbox and receipts. A tools-mode or session-join hello skips the check. The socket permission and token ceiling above still applies. The observed commands stay in memory for the check and never enter a log.
|
|
55
59
|
- **Push:** a `deliver` for a channel session becomes one `notifications/claude/channel` line on that session's connection and no other (each peer is attached to one link). `channelPush` (`src/hub/mcp-channel-push.ts`) is the bridge's own notification builder, shared by both. The receipt is `accepted` once the line was handed to the connection.
|
|
56
60
|
- **Failure:** a delivery with an id whose connection is gone is receipted `needs_review`; one without an id is framed into the peer's buffer, kept up to 200 entries per peer id in the daemon (`PushBuffers`), so a reconnect of the same peer finds it; a session-join (a hello with `session`) holds none of the peer's roles and gets a buffer of its own, never the peer's and `hub_inbox` drains it. A delivery that was never pushed stays queued in the bus and reaches the session that reconnects.
|
|
57
61
|
- **Pull-only session:** a push it cannot show is receipted `failed_safe` (then `needs_review` for an older hub) and its originals return to the queue, as in the bridge.
|
|
@@ -60,4 +64,11 @@ With `startDaemon({ mcpServe: true })` (off by default; no production caller set
|
|
|
60
64
|
|
|
61
65
|
- **Footer:** `withPendingHint` (#221, #493, #1172) moved from the bridge into `src/hub/mcp-tool-call.ts`; the bridge and the endpoint both call it. A `tools/call` result carries the fresh `delivery_holds` counts and the held hint, and an inbox result keeps its own count and never repeats it.
|
|
62
66
|
- **Re-announcement (#490), within one daemon's life:** the daemon keeps, per peer id (`ListedTools`, daemon memory), the tool definitions the host was last given. A new session of the same peer that finds a different list (or cannot read the lifecycle after two retries) writes `notifications/tools/list_changed`; an identical list writes nothing, and a peer whose host never listed gets nothing. A session-join keeps its own record. This does not cover a daemon replacement: the record is lost with the daemon, so the host that kept a stale list across an upgrade (the bridge's #490 case, where `listedTools` lives in the surviving bridge process) is not told.
|
|
63
|
-
|
|
67
|
+
## Bundled relay (T4)
|
|
68
|
+
|
|
69
|
+
The bundled plugin entry resolves the same project and inherited session as the bridge. Its eager import graph includes only the Hub modules for project resolution. Explicit non-default managed instances may load the existing resolver on demand. The legacy bridge handles startup unless status advertises MCP serving and the same project answers the relay's hello and ping within the startup bound. The probe takes place before the relay consumes stdin.
|
|
70
|
+
|
|
71
|
+
- **Hello:** the relay supplies its existing peer and account hints, the pinned project identity and the instance id from the current status, and its pid and parent. The daemon applies its own parent check before granting pushes. A relay that lacks the inherited channel marker asks for pull-only attachment. Nonempty session labels and the empty origin label both follow control admission.
|
|
72
|
+
- **Reconnect:** the relay verifies that status still describes the pinned project, then connects to the current instance with the bridge's backoff. It sends an internal ping to establish readiness and hides that response from the host. The host's initialize is forwarded once. In-flight requests are returned as uncertain on disconnect and are never replayed. After daemon replacement a previously initialized host gets one tool-list change notification.
|
|
73
|
+
- **Standby and terminal closes:** the relay opts into the control path's retained standby and handles close codes with the bridge's text. The endpoint carries a terminal close as a JSON-RPC error with the closed control code, and the relay returns the matching message. An invalid token still closes silently.
|
|
74
|
+
- **Scope:** T4 ships the Bun relay and retains bridge fallback in the same bundle. The process-memory saving needs the native relay (agent-suite#5).
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# MCP relay contract
|
|
2
|
+
|
|
3
|
+
**Contract version:** 1
|
|
4
|
+
|
|
5
|
+
The relay bridges host stdio and the project Unix socket using UTF-8, newline-delimited JSON. This contract describes the bundled Bun relay. The endpoint applies its own admission and MCP rules as described in [Per-project MCP endpoint](mcp-endpoint.md).
|
|
6
|
+
|
|
7
|
+
## Launcher negotiation
|
|
8
|
+
|
|
9
|
+
The Claude plugin looks up `asuite` on its inherited PATH. It checks that executable with `mcp-shim ahub --contract`, a 500 ms limit, and stdio isolated from the MCP host. The command advertises version 1 by exiting successfully with only `1` on stdout. On a match, the launcher replaces itself with the same executable and arguments `mcp-shim ahub`, preserving stdio and the process identity. A missing executable, failed probe, version mismatch or exec error selects the bundled `server.js` with the usual Bun invocation. No shell interprets the probe output.
|
|
10
|
+
|
|
11
|
+
## Startup and hello
|
|
12
|
+
|
|
13
|
+
- Pin the resolved project before reading stdio. Read `status.json` in its state directory. A served endpoint requires `mcpServing: true` and an absolute `mcpSocket` ending in `run/<projectId>/mcp.sock`. The socket and its parent must belong to the current uid and have modes 0600 and 0700 respectively. Read the trimmed token from `control-token` in that state directory.
|
|
14
|
+
- Send a hello with `v: 1`, `relay: true`, `mode` (`channel` or `tools`), `peer`, `pid`, `ppid`, `cwd`, `home`, `token`, `projectId`, `instanceId`, `projectRoot`, `channelRequested`, `standby` and `reconnect`. The project ID and root stay pinned. The instance ID comes from the current descriptor. `home` is the absolute Claude configuration directory or the user's `.claude` directory. `channelRequested` reflects the inherited channel marker. `standby` and `reconnect` start false.
|
|
15
|
+
- Include `session` when a session label was resolved, including an empty origin label. Include `claudeSessionId` for a UUID-shaped native session ID and `launchId` for a nonempty launch ID of at most 128 characters. Send `permissionTool: true` only when requested in tools mode and `deliveryOnly: true` only when requested.
|
|
16
|
+
- Follow the hello immediately with an internal JSON-RPC `ping` using an `ahub-relay-` prefixed UUID. A matching successful response with a result establishes readiness and stays internal. If startup cannot resolve or reach a served endpoint, the probe is refused, or readiness takes over three seconds, start the legacy bridge with stdin untouched.
|
|
17
|
+
|
|
18
|
+
## Reconnect and refusal
|
|
19
|
+
|
|
20
|
+
- Once serving, keep ownership of stdio. Re-read the descriptor and token on reconnect, and refuse a descriptor for a different project ID or root. Retry after 1 second, doubling to a 30-second cap. Reset after a served connection. Code 4426 uses a five-minute retry, and code 4000 sets standby on subsequent hellos.
|
|
21
|
+
- Forward host `initialize` as received. A successful reply marks the host initialized and makes subsequent hellos say `reconnect: true`. Reconnect sends hello and internal ping, with no synthesized `initialize`. After readiness on a different instance ID, emit one `notifications/tools/list_changed` for an initialized host. A reconnect to the same instance emits no relay-generated notification.
|
|
22
|
+
- Never replay an outstanding request on a lost socket. Reply with JSON-RPC error -32000 using the terminal reason when available, or report that the outcome may be unknown. A new tool call arriving during an ordinary reconnect can wait up to 30 seconds for readiness. Send held calls in arrival order. Standby, terminal closes and wire mismatches do not hold new calls.
|
|
23
|
+
- An endpoint line with `id: null` and error code -32000 is a refusal. Consume it and close the connection. With no terminal code, it follows the startup fallback or post-start retry policy. After startup, codes 4401, 4403, 4404, 4405, 4409 and 4430 stop reconnecting and use the shared [connection-policy text](../../src/adapters/claude-connection-policy.ts). Unsent tool calls receive that text as tool content, with `isError: true` for a person detach. Unsent non-tool requests receive JSON-RPC error -32000. A silent close has no refusal text.
|
|
24
|
+
|
|
25
|
+
## Replay fixtures
|
|
26
|
+
|
|
27
|
+
Each line starts with its direction and a space. `host>` writes to relay stdin, `endpoint<` checks a relay-to-endpoint line, `endpoint>` writes a socket response, and `host<` checks relay stdout. `stderr<` checks the relay diagnostic stream. `control drop` closes the active socket, and `control replace` changes the advertised instance before closing it. The absent-endpoint fixture starts without a served socket and checks the legacy bridge's response.
|
|
28
|
+
|
|
29
|
+
Replay substitutes `{{PID}}`, `{{PPID}}`, `{{PROJECT}}`, `{{HOME}}`, `{{TOKEN}}` and `{{READY_ID}}` with fixture process and socket values. The readiness ID is captured once and reused through reconnect. All wire lines are checked byte for byte after substitution, excluding their framing newline. Only the terminal-close fixture asserts stderr, since the legacy bridge has its own startup diagnostics.
|
|
30
|
+
|
|
31
|
+
| Fixture | SHA-256 |
|
|
32
|
+
| --- | --- |
|
|
33
|
+
| [absent-endpoint.txt](../../test/fixtures/relay/absent-endpoint.txt) | `21cb62b606c2f36c25363c5d0032f9696e327c0a8798e308dbe755721bcc0f21` |
|
|
34
|
+
| [daemon-replacement.txt](../../test/fixtures/relay/daemon-replacement.txt) | `ec85347223fc95eb018e8f2febb7aabf8ea938774fd7e7a794d6f3570811e4ef` |
|
|
35
|
+
| [normal.txt](../../test/fixtures/relay/normal.txt) | `1f7968827e6bda4a228947adaaa21b6c2d0edae6472601701e132a90b2ff45a7` |
|
|
36
|
+
| [reconnect.txt](../../test/fixtures/relay/reconnect.txt) | `eb51cc287e1401e82d111db3993090c7ec4ee1b917340874eff06bdbaf8edb7e` |
|
|
37
|
+
| [refusal.txt](../../test/fixtures/relay/refusal.txt) | `87be356212bd7577e898749e3d78f94afd3834a14151ea740cd56252a5002a43` |
|
|
38
|
+
| [terminal-close.txt](../../test/fixtures/relay/terminal-close.txt) | `838d5ffda65478bc6d51ffb02610300b3378bbaa1af34f736ce6d3b90c4fc5e6` |
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Shared host fairness, handler attribution and footprint
|
|
2
|
+
|
|
3
|
+
Task 1332, [#1779](https://github.com/STAIxBWLB/agent-hub/issues/1779) T5a. Measured on 2026-12-05 KST at main base `5b85fa92f96a5b7a834369bec6c3dbd1099bab07` with agent-hub 0.52.0, Bun 1.4.4, macOS 27.2.1 (26B131), Darwin 27.2.0, arm64. Each child used an isolated home and clean environment. No native agent or model was started. Shared mode remains opt-in.
|
|
4
|
+
|
|
5
|
+
## Startup fairness (AC7)
|
|
6
|
+
|
|
7
|
+
A real child process ran `Host` and two actual daemons. B had an authenticated console connection before A started. A's existing startup `shellDefaultBranchProbe` seam supplied the five-second interval without doing a network lookup. The second case did synchronous work in 40 ms slices with an event-loop yield between slices. B's elapsed time is one authenticated `status` round trip, measured between markers recorded by A.
|
|
8
|
+
|
|
9
|
+
| A startup probe | Phase duration | Request after phase start | Response before phase end | B round trip | Limit |
|
|
10
|
+
| --- | ---: | ---: | ---: | ---: | ---: |
|
|
11
|
+
| Awaited delay | 5,001 ms | 2 ms | 4,985 ms | 14.619333 ms | 250 ms |
|
|
12
|
+
| Chunked synchronous work | 5,000 ms | 8 ms | 4,904 ms | 88.302375 ms | 250 ms |
|
|
13
|
+
|
|
14
|
+
Both recorded round trips passed. Continuous synchronous work would have no yield point and was outside this fixture. These samples cover the named startup seam with one timing sample per case.
|
|
15
|
+
|
|
16
|
+
Reproduce with `env -u AGENTHUB_HOME bun test --timeout 20000 test/host-fairness.test.ts`. That test prints its own fresh measurements.
|
|
17
|
+
|
|
18
|
+
## Callback attribution (AC4 carry-over)
|
|
19
|
+
|
|
20
|
+
The fixture wrapped A's actual loopback Bun server callbacks. The WebSocket path authenticated normally with A's console token before the fixture threw at the callback boundary. The synthetic exception bypassed the production handler's request-level catch so the test could observe Bun and the installed host hook.
|
|
21
|
+
|
|
22
|
+
| Callback | Observed result |
|
|
23
|
+
| --- | --- |
|
|
24
|
+
| Bun fetch | HTTP 500. No host error-hook entry. A and B kept serving. |
|
|
25
|
+
| Control WebSocket message | Host hook logged an uncaught exception outside any project and stopped A and B. |
|
|
26
|
+
|
|
27
|
+
The existing AC4 tests separately cover project timers, `node:net` handlers and unhandled rejections. This receipt does not change the exception policy.
|
|
28
|
+
|
|
29
|
+
## Idle footprint (AC8)
|
|
30
|
+
|
|
31
|
+
One process ran five idle fixture projects through `Host`, then three separate processes ran one idle daemon each with the same daemon configuration. Each group settled for 5,000 ms after all its processes signalled readiness. The metric is the physical footprint reported by `/usr/bin/footprint --noCategories --format bytes --pid <pid>`. These are the raw bytes from one run.
|
|
32
|
+
|
|
33
|
+
| Group | Process | Physical footprint | Peak reported by footprint |
|
|
34
|
+
| --- | ---: | ---: | ---: |
|
|
35
|
+
| Shared host, five projects | 7394 | 97,928,152 B | 113,214,376 B |
|
|
36
|
+
| Isolated daemon | 7873 | 72,713,128 B | 111,444,880 B |
|
|
37
|
+
| Isolated daemon | 7875 | 73,253,824 B | 114,934,720 B |
|
|
38
|
+
| Isolated daemon | 7877 | 71,959,464 B | 118,129,576 B |
|
|
39
|
+
| Three isolated daemons combined | | 217,926,416 B | |
|
|
40
|
+
|
|
41
|
+
The five-project host used 119,998,264 fewer bytes than the three isolated daemons combined. This compares fixture processes after settling and leaves live repository dogfooding and the default switch to the owner.
|
|
42
|
+
|
|
43
|
+
Reproduce with `dot admit -- bun scripts/benchmarks/host-shared-footprint.ts`. The runner prints raw per-process output and uses RSS in KiB on Linux.
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# 0.53.0 release verification
|
|
2
|
+
|
|
3
|
+
This record covers release preparation and source review. It claims no installation, no running-hub upgrade to 0.53.0 and no live TUI launch.
|
|
4
|
+
|
|
5
|
+
## Candidate
|
|
6
|
+
|
|
7
|
+
Version 0.53.0, prepared from main 863dd82b4 and brought up to main 47a9c00ee before review (34 commits since v0.52.0, 10 of them `feat`; bump rule: minor). The release commits carry the version, the CHANGELOG section, the bundle and the documentation stamps.
|
|
8
|
+
|
|
9
|
+
## Reviews
|
|
10
|
+
|
|
11
|
+
Pull requests named by the commits since v0.52.0: #1940, #1939, #1937, #1935, #1934, #1933, #1931, #1930, #1929, #1927, #1926, #1925, #1924, #1923, #1921, #1922, #1920, #1919, #1918, #1917, #1916, #1914, #1913, #1912, #1911, #1910, #1909, #1908, #1907, #1906, #1901, #1900, #1902, #1898.
|
|
12
|
+
|
|
13
|
+
Each of the 34 merged after `check (ubuntu-latest)`, `check (macos-latest)` and `seeded guards` passed in full CI at its merged head; every run below finished before its merge, and none reused an earlier tree's gate. All 34 merged after a Claude hub review approved the task, and `arev gate --head <merged head> --pr <n>` passes for each: an approved AREV review is recorded at the exact merged head, so no merge is bound to an approval at an earlier head. On a draft-first PR, the draft run's deliberate `check (macos-latest)` failure ("macOS deferred") is still visible beside the full run.
|
|
14
|
+
|
|
15
|
+
| PR | Work | Hub task, owner | Merged head | Full CI run (attempts) |
|
|
16
|
+
| --- | --- | --- | --- | --- |
|
|
17
|
+
| #1898 | CLI spawn-with-timeout runner onto test/helpers (#1830 S5k) | 1304, jcode | eabbfe7e9 | 47134869473 (1) |
|
|
18
|
+
| #1900 | verify Claude relay parent evidence (Refs #1780) | 1272, codex | 7da27b1da | 47143229031 (2) |
|
|
19
|
+
| #1901 | research contract builders and roadmap daemon rig onto test/helpers (#1830 S5l) | 1305, jcode | 39ba0341e | 47142396951 (2) |
|
|
20
|
+
| #1902 | extract release planning from Tasks (Refs #1830) | 1292, codex | 0496ae625 | 47141077937 (1) |
|
|
21
|
+
| #1906 | extract spec gates from Tasks (Refs #1830) | 1293, codex | 0a92233f2 | 47150609775 (1) |
|
|
22
|
+
| #1907 | relay MCP sessions over the project endpoint (Refs #1780) | 1273, codex | 0075ad4a1 | 47177281360 (1) |
|
|
23
|
+
| #1908 | scoped mirror snapshot and batched GraphQL issue-state reads (Refs #1850) | 1255, jcode | 5d34f68ee | 47194193955 (2) |
|
|
24
|
+
| #1909 | top-level types and TasksDeps into tasks-types.ts (#1830 S4e-1) | 1308, codex | 84ef03b6a | 47234020749 (1) |
|
|
25
|
+
| #1910 | promote the AREV adoption spec (Refs #1874) | 1313, codex | e8dc58397 | 47234122574 (2) |
|
|
26
|
+
| #1911 | extract the backlog planning domain (#1830 S4e-2) | 1309, codex | e22708dfd | 47249131668 (1) |
|
|
27
|
+
| #1912 | handoff methods into tasks-handoff.ts (#1830 S4e-3) | 1310, jcode | de86b9ad5 | 47281457705 (1) |
|
|
28
|
+
| #1913 | adopt the AREV anchor and findings core (Refs #1874) | 1314, codex | 6c3a18a6d | 47283156716 (1) |
|
|
29
|
+
| #1914 | audit and evidence methods into tasks-audit.ts (#1830 S4e-4) | 1311, jcode | 3f1d86e30 | 47309936973 (1) |
|
|
30
|
+
| #1916 | keep compatible attached Claude sessions (Refs #1807) | 1320, codex | a5a261036 | 47312252612 (1) |
|
|
31
|
+
| #1917 | cover AREV package refusals (Refs #1874) | 1323, codex | 46ece3470 | 47312380915 (1) |
|
|
32
|
+
| #1918 | cover the extracted task domains in the specs (Refs #1830) | 1322, codex | b9feb50e8 | 47315877692 (2) |
|
|
33
|
+
| #1919 | hold tool calls across a hub replacement (Refs #1807) | 1326, jcode | 27a777ebc | 47333127658 (1) |
|
|
34
|
+
| #1920 | a retargeted project moves to the host of its new runtime (Refs #1779) | 1327, jcode | 6f74aa6e3 | 47354716075 (1) |
|
|
35
|
+
| #1921 | primitives leaf with the object type guard (#1830 S1a) | 1324, jcode | 794c1dfc0 | 47366992236 (2) |
|
|
36
|
+
| #1922 | measure shared runtime fairness and footprint (Refs #1779) | 1332, codex | 554e87331 | 47380421667 (1) |
|
|
37
|
+
| #1923 | publish the Codex launch capture atomically | 1335, codex | 53fb7dc0d | 47428076333 (1) |
|
|
38
|
+
| #1924 | share equivalent runtime primitives (#1830 S1b) | 1333, codex | b4123e6fc | 47428083851 (2) |
|
|
39
|
+
| #1925 | getter-backed daemon scope and the hub_* dispatch into src/hub/control (#1830 S2a) | 1337, jcode | 3106a98a7 | 47446369886 (1) |
|
|
40
|
+
| #1926 | explain acknowledgements for unchanged specs (Refs #1830) | 1338, codex | 203fbeeb9 | 47449624146 (1) |
|
|
41
|
+
| #1927 | verify Claude Code 2.1.337 for claude-implementer (Refs #888) | 1339, jcode | 1daa999db | 47453376649 (1) |
|
|
42
|
+
| #1929 | verify agy 1.5.24 with the repository producers (Refs #843) | 1341, jcode | 0791d58ca | 47456143631 (1) |
|
|
43
|
+
| #1930 | extract dashboard action dispatch (#1830 S2b) | 1342, codex | 6a26873e5 | 47457879020 (2) |
|
|
44
|
+
| #1931 | board-workflow control messages into src/hub/control (#1830 S2c) | 1344, jcode | bca976e01 | 47469268786 (1) |
|
|
45
|
+
| #1933 | acknowledge unchanged specs after filing, hub_spec_ack (Refs #1928) | 1343, codex | b5b485b24 | 47471509313 (1) |
|
|
46
|
+
| #1934 | build the review brief from the AREV packet (#1874 step 3) | 1348, jcode | 7a642fb7c | 47479774008 (1) |
|
|
47
|
+
| #1935 | use AREV host rotation (#1874 step 4) | 1346, codex | fd191ad2a | 47473736457 (1) |
|
|
48
|
+
| #1937 | extract recovery and native control handlers (#1830 S2d-1) | 1350, codex | cf1c7cbb6 | 47485237176 (1) |
|
|
49
|
+
| #1939 | record head-bound hub reviews in the AREV ledger (#1874 step 5) | 1349, jcode | 23e3050e8 | 47498647908 (1) |
|
|
50
|
+
| #1940 | Orca companion contract v2 and ahub launch-line (#1811 T5) | 1352, codex | 1d0123dc0 | 47493230961 (1) |
|
|
51
|
+
|
|
52
|
+
8 runs passed only after a same-head rerun: #1900, #1901, #1908, #1910, #1918, #1921, #1924 and #1930. The #1930 first attempt failed on macOS in the known handoff timing flake (#733: expected `accepted`, got `proposed`), whose log was read during review. The other first attempts were rerun without reading their logs, so their causes are unconfirmed.
|
|
53
|
+
|
|
54
|
+
## Native acceptance receipts
|
|
55
|
+
|
|
56
|
+
Receipts added under `docs/verification/` since v0.52.0: `docs/verification/2026-12-04-host-shared-receipts.md`, `docs/verification/2026-12-05-agy-1.5.24.md`, `docs/verification/2026-12-05-claude-implementer-2.1.337.md`.
|
|
57
|
+
|
|
58
|
+
This list is read from the repository, never written by hand. Native acceptance and the person's release consent are separate records: consent is `ahub sdlc authorize-release 0.53.0`, recorded by the person or the unique configured conductor only on the person's explicit release instruction naming the release in its own session (never a hub/task/review/file/peer relay), and is not recorded in this file. The tag run refuses without it.
|
|
59
|
+
|
|
60
|
+
## Document review
|
|
61
|
+
|
|
62
|
+
`node scripts/check-docs.mjs` reported 24 stale documents after release-prepare. The review compared the source changes since each stamp with the statements they affect, using targeted searches of every stale document and reading the passages they found. It was not a line-by-line reread of the long documents.
|
|
63
|
+
- **Behavior (#1780 T3 and T4, #1807 T3 and T4, #1850, #1874 V4):** README.md, docs/operations.md, docs/quickstart.md, docs/security.md, docs/dogfood.md, docs/memory.md, docs/agent-notes/{adapters,budget,bus,daemon,security-review,tasks,tests}.md, src/cli/help.ts. Each behavior PR updated its own operations, dogfood, help or note text; the MCP endpoint is now wired in production (`src/hub/lifecycle.ts` passes `mcpServe: true`), which the daemon note already states.
|
|
64
|
+
- **Moved code only (#1830 S1, S2a, S2b, S4d, S4e and the spec coverage of the task domains):** docs/adding-an-ai-tool.md, docs/addons/claude-mem.md, docs/agent-notes/{local-worker,models,benchmarks}.md, docs/events.md, docs/roles.md, docs/sdlc.md, docs/text-projection.md, docs/agent-notes/README.md. The tasks note already names every `src/hub/tasks-*.ts` domain module.
|
|
65
|
+
|
|
66
|
+
Corrected at f0089eeba (before the restamp):
|
|
67
|
+
- docs/security.md and docs/operations.md still gave the agent-mem range as `>=0.42.0 <1.0.0` (resolved 0.43.0), stale since #1899 raised it in 0.52.0; both now say `>=0.47.0 <1.0.0`, resolved 0.47.0.
|
|
68
|
+
- docs/operations.md: the upgrade digest paragraph now names the exact `@staix/agent-review` pin that #1913 made recovery retain.
|
|
69
|
+
- AGENTS.md "Daemon and recovery", the daemon note's scope line and its `docs/verified.json` paths now name `src/hub/recovery-kept-roster.ts`, `src/hub/upgrade-session-contract.ts` (#1916) and `src/hub/channel-project-base.ts` (#1907). The other new files sit under an area already named (`src/adapters/`, `src/hub/tasks-*.ts`, `src/hub/control/`); `src/primitives.ts` is the import-graph leaf and belongs to no area.
|
|
70
|
+
- The quickstart's "Upgrading to 0.53.0" note and the CHANGELOG N-1 statement and dependency line were written. The N-1 statement's claims were checked against the diff since v0.52.0: `src/hub/db-schema.ts`, `board.ts`, `hub-tools.ts` and `control-client.ts` are unchanged (protocol 17, floor 16), `src/hub/config.ts` and `instance-config.ts` are unchanged, and 0.52.0's published dependencies are agent-mem `>=0.47.0 <1.0.0` and cli-output 0.1.5.
|
|
71
|
+
|
|
72
|
+
All 24 documents were restamped at f0089eeba with `restamp --reviewed`. No spec's `verified-against` was edited.
|
|
73
|
+
|
|
74
|
+
After main was merged in (47a9c00ee, seven more PRs), `check-docs` reported 15 stale documents, and then docs/sdlc.md. Each PR had updated the documents its behavior touched. The second pass added:
|
|
75
|
+
- the new task-board files (src/hub/review-ledger.ts, spec-ack-tool.ts, spec-report-history.ts) to AGENTS.md "Task board", the tasks note's scope and their docs/verified.json paths, and `src/hub/control/` to the daemon note's verified paths;
|
|
76
|
+
- the quickstart "Upgrading to 0.53.0" sentences on AREV ledger recording, `hub_spec_ack` and companion contract v2;
|
|
77
|
+
- a docs/security.md section on review records in the AREV ledger (what is written outside the repository, and that private work writes nothing);
|
|
78
|
+
- the adoption spec's acceptance checklist, ticked as #1874 closed.
|
|
79
|
+
The 15 were restamped at 7607ee581 and docs/sdlc.md at 45d64622a (neither #1933 nor #1939 makes a statement there false).
|
|
80
|
+
|
|
81
|
+
## Checks
|
|
82
|
+
|
|
83
|
+
Run locally on the release branch (Bun 1.4.4) at 69e32251b, after main was merged in and the documents restamped. This report is the only later change:
|
|
84
|
+
- `node scripts/check-docs.mjs --require-fresh`: `docs: OK (0 stale documents)`.
|
|
85
|
+
- `bun x tsc --noEmit`: exit 0. `bun scripts/build.mjs --check`: exit 0; `plugins/agent-hub/server.js` is 1,198,035 bytes.
|
|
86
|
+
- `inventory-hardcoded-values`, `unused-exports`, `check-import-graph`, `cli-output-inventory` and `refusal-inventory`, each with `--check`: exit 0. `bun scripts/readme-facts.ts --check`: `facts: OK`. `node scripts/check-roadmap.mjs --warn-drift`: `roadmap: OK (7 milestones)`.
|
|
87
|
+
- `node scripts/check-package.mjs` with npm 11.20.0 (the CI pin): `package: OK (1278 files, @staix/agent-hub@0.53.0)`.
|
|
88
|
+
- 165 tests pass and 0 fail in `published-protocol-compat`, `broker-server`, `upgrade-runtime-contract`, `bridge-protocol-table`, `bridge-protocol-window`, `release-prepare`, `release-tag`, `check-docs`, `check-docs-parity`, `readme-facts`, `help`, `companion-contract` and `review-ledger`. The N-1 fixture runs from its frozen lock (0.52.0, agent-mem 0.47.0) and the protocol-16 fixture from its own (0.25.0).
|
|
89
|
+
- Structure budget trend (#1829): the baseline holds 43 entries and 84 shared names, as at v0.52.0. The lines summed over the 800-line budget fell from 49,058 to 44,504. daemon.ts is 11,490 lines (13,366 at the first prep, 14,559 when S2 began).
|
|
90
|
+
- Test clones (#1830 S5 receipt): `ripwire test --clones` reports `dup_pct=15.1` (6,784 of 44,906 function lines), 0.1 point over the recorded 15.0% floor. The growth traces to two new tests and one rig: test/review-brief-packet.test.ts copies the review-brief fixture, git and scratch helpers; test/review-ledger.test.ts copies git, scratch and inReview; test/companion-contract.test.ts redeclares the cli rig. Backlog card hub task 1360 moves them onto test/helpers after the tag. This is a receipt, not a gate.
|
|
91
|
+
- The release PR's exact-head CI run is recorded on the release PR.
|
|
92
|
+
|
|
93
|
+
## Known gaps, not blocking
|
|
94
|
+
|
|
95
|
+
- **Not run live:** no running hub was upgraded to 0.53.0, and no real Claude, Codex or Jcode session was kept or restarted on it. Keeping attached Claude sessions (#1807) and the plugin's socket relay (#1780) are covered by tests and their receipts; the person's upgrade is the live leg, and #1807 AC10 waits for it.
|
|
96
|
+
- **Opt-in features not dogfooded here:** `host.shared`, declared accounts and `transport: "pull"` kinds stay off in this repository.
|
|
97
|
+
- **Codex 0.173.0 remains unverified for `codex-review`, and Jcode 1.3.0 stays unverified** (unchanged since 0.52.0).
|
|
98
|
+
- **Rerun causes:** 7 of the 8 rerun CI runs were rerun without reading the failed logs; see Reviews.
|
|
99
|
+
- **`grow = "refuse"` (#1829) is not switched:** it stays the owner's switch.
|
|
100
|
+
- **Open after the release:** the declared-account collision (#1941, a 0.52.0 defect in opt-in declared accounts) waits for the person's account-policy decision. Hub task 1352's four unchanged covering specs get their acknowledgement with `hub_spec_ack` once the hub runs 0.53.0. The double packet build per verdict (#1874 step 5) is an advisory with a ponytail comment.
|
|
101
|
+
- **No remote full suite:** exact-head CI on both OSes is the full gate for this release PR.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Antigravity 1.5.24 account-free compatibility receipt
|
|
2
|
+
|
|
3
|
+
Date: 2026-12-05. Hub task 1341, Refs #843. Repeats the [1.5.21 procedure](2026-12-02-agy-1.5.21.md) with the producers kept in the repository under [`agy/`](agy/README.md).
|
|
4
|
+
|
|
5
|
+
**Decision: add exact 1.5.24 to verified.** All five legs passed on one scratch copy of the installed executable: CLI surface, synthetic plugin MCP and hooks, the permission leg for the three newer functions, normal close through the tmux helper, and the actual-launcher nonce through `ahub agy`. The accepted 1.4.x line is unchanged, and other 1.5.x versions stay refused without person trust. This is compatibility evidence, not an account, model or headless ACP qualification.
|
|
6
|
+
|
|
7
|
+
## Exact executable and isolation
|
|
8
|
+
|
|
9
|
+
- Host macOS arm64, Bun 1.4.4, tmux 3.8. Native `--version`: 1.5.24. SHA-256 of the executable `2a55687111c4328a8bcc21357c89f830f4af594a7e69925024f2b0fe7538c0f9`, 235,497,168 bytes. The legs ran from a scratch copy made with `cp -p` that kept this hash before and after each leg. The installed `~/.local/bin/agy` was hashed before and after the series (SHA-256, size, mtime, inode and a directory entry count of 51 both times) and never run. It did not change.
|
|
10
|
+
- Source base `ac6bcc26930cb56b6c29dbdb40761f8c60f4a50d` (main after hub task 1337), with the producers unchanged from the repository. All producer hashes equal the 1.5.21 receipt's table and `originals.json`.
|
|
11
|
+
- The controller `agy/run-probe.py` ran under `env -i` with scratch HOME, XDG directories, TMPDIR and AGENTHUB_HOME, `AGY_CLI_DISABLE_AUTO_UPDATE=1` and `--results-dir` outside the repository, with `--version 1.5.24` and the copy's SHA-256. Each leg ran through `dot admit`, one native job at a time, in the order launcher, cli, hooks, permission, helper. The launcher ran first, before 1.5.24 was in `COMPAT.agy.verified`, and reported `stockGateStillRefuses: true`. Every agy invocation ran under Seatbelt with real-home reads and writes denied and native egress only to the fixture provider.
|
|
12
|
+
- After each leg the controller compared five named real Gemini config entries and the scratch binary with their state before. All matched, owned process groups were gone and the private roots were removed.
|
|
13
|
+
|
|
14
|
+
## Results per leg
|
|
15
|
+
|
|
16
|
+
| Leg | Result |
|
|
17
|
+
| --- | --- |
|
|
18
|
+
| CLI surface | Passed. `--version` 1.5.24; all ten required flags present; `--acp` and `--new` exit 2; the thirteen subcommands present; `mcp list` in the empty project reports no servers. |
|
|
19
|
+
| Synthetic plugin MCP and hooks | Passed, 4 provider requests with 18 declarations each and no unexpected declaration name. Two exact `call_mcp_tool` calls, one `read_file` pre and post, 16 hook rows, native init with 60 tools. |
|
|
20
|
+
| Permission leg for the three functions | Passed. See below. |
|
|
21
|
+
| Normal close (tmux helper) | Passed: ready, normal exit, closed marker, no agy started, cleanup confirmed. |
|
|
22
|
+
| Actual-launcher nonce through `ahub agy` | Passed: managed files bound, fixture exact trust only in a fresh scratch hub home, one `call_mcp_tool` for `hub_inbox`, nonce read back in a later provider request, canonical `agy` only, normal close with the resume line, managed files removed, bystander files unchanged, slot released, zero external or unrelated loopback fetches. 5 provider requests, declarations 0, 15, 15, 18, 18 (hub tools from turn 3, as on 1.5.21). |
|
|
23
|
+
|
|
24
|
+
## The 18 declarations and their permission evidence
|
|
25
|
+
|
|
26
|
+
1.5.24 declares the same 18 functions as 1.5.21, so the exact list in the hooks leg needed no change. The permission leg uses the model-free fixture provider and asks agy to call each of `run_workflow`, `swarm` and `update_steps` once, under a PreToolUse hook that records the call and returns no decision.
|
|
27
|
+
|
|
28
|
+
| Function | PreToolUse hook saw it | PostToolUse row | Native refusal observed | Outcome |
|
|
29
|
+
| --- | --- | --- | --- | --- |
|
|
30
|
+
| `run_workflow` | yes, once | none | yes | Refused by agy after the hook saw it |
|
|
31
|
+
| `swarm` | yes, once | none | yes | Refused by agy after the hook saw it |
|
|
32
|
+
| `update_steps` | yes, once | none | yes | Refused by agy after the hook saw it |
|
|
33
|
+
|
|
34
|
+
There was no file change, no extra agy process and four bounded provider requests. Every call was gated before any effect.
|
|
35
|
+
|
|
36
|
+
## Harness notes
|
|
37
|
+
|
|
38
|
+
- The first launcher run failed at `native_policy` with `setup_unconfirmed` and no provider request. The cause was a missing `node_modules` in the fresh worktree (the launcher reads the installed agent-mem package), not agy. After `bun install --frozen-lockfile` the launcher ran unchanged and passed. The other four legs do not read it and had passed before.
|
|
39
|
+
- The 1.5.24 help text goes to stderr (3,554 bytes) with an empty stdout, and the required-flag check still found all ten flags.
|
|
40
|
+
|
|
41
|
+
## Producer and result hashes
|
|
42
|
+
|
|
43
|
+
Producers are the files in the 1.5.21 receipt, unchanged: `agy/run-probe.py` `7a90a749faf08879d5fef9cdcc240031ac2a0d7385f630dfc2b223e9c936fe7b`, `agy/native-hooks.ts` `bf657c737c0ebf1db2d872b29dddb9952356fd24c486c3f3b2ce4b4b1c8b684c`, `agy/permission-new-functions.ts` `41f36dd68e4338050102b3f45d95a529ef08d73d028738043637940c961dfeed`, `agy/launcher-nonce.ts` `715fd17c1d998cba6237c1667c0ef06b7cfcd7c06854c7d8c6dfa023fd517333`, and `agy/originals.json` as committed.
|
|
44
|
+
|
|
45
|
+
| Local result | SHA-256 |
|
|
46
|
+
| --- | --- |
|
|
47
|
+
| CLI surface | `034c2a24e5d2ebbb5e3acc23e61675968d4d346c64a16d9e8525dc8ca4906998` |
|
|
48
|
+
| Hooks | `c32834afab15c8208e09ff480094f12bb33618712ffa2a546acfe2cad8bc7de4` |
|
|
49
|
+
| Permission leg | `f6b4dcf63a7eb25bca202ed2e57085ff04e1905967faa348dc9753cc7d83de6d` |
|
|
50
|
+
|
|
51
|
+
The launcher's bundle hash was `3450fd45d92c8f87a127b84ae1308c651cc6975edb11bfcdb8b9db1a2d661868`.
|
|
52
|
+
|
|
53
|
+
## Evidence boundaries
|
|
54
|
+
|
|
55
|
+
This covers the account-free CLI, plugin MCP, hooks, permission refusal for the three functions, normal close and launcher nonce on macOS arm64. Real accounts, real model behavior, headless ACP, the native permission mapping for any allowed tool, a user approving a prompt, and Linux builds remain unverified. The launcher leg also asserts that the stock gate still refuses the candidate, so it only runs before the version is in `verified`.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Claude Code 2.1.337 headless implementer receipt
|
|
2
|
+
|
|
3
|
+
Date 2026-12-05 UTC. Refs #888, hub task 1339. This repeats the [2.1.334 procedure](2026-12-02-claude-implementer-2.1.334.md) on macOS arm64 with Bun 1.4.4, with 2.1.334 as the control and 2.1.337 as the candidate. Source base `11ffbced9aa0e9af5c5c49d0bec097457a4a67e4`.
|
|
4
|
+
|
|
5
|
+
Both binaries passed all 44 cases, 22 per binary. The case results were identical after excluding the version, binary hash, paths and elapsed time. This qualifies exact `2.1.337` for `claude-implementer`.
|
|
6
|
+
|
|
7
|
+
## Binary and producer identity
|
|
8
|
+
|
|
9
|
+
The 2.1.334 control came from the npm `@anthropic-ai/claude-code-darwin-arm64` package. Its package SHA-512 matched the npm integrity value, and its binary SHA-256 matched the 2.1.334 receipt. The 2.1.337 candidate was a scratch copy (`cp -p`) of the installed binary, checked by exact version. The real installed `claude` was never run or overwritten. Both binaries kept their SHA-256 across the runs. The three producers kept the SHA-256 recorded in the 2.1.334 receipt.
|
|
10
|
+
|
|
11
|
+
| File | SHA-256 |
|
|
12
|
+
| --- | --- |
|
|
13
|
+
| `Claude Code 2.1.334 control` | `99400f510692e6ff7ce1a5b816c2e88ad5ac8f67e4aac6dfca57d3ac6f6a127d` |
|
|
14
|
+
| `Claude Code 2.1.337 candidate` | `75b51a9f6ec341865954479a8ea2096e4831222816712b51bb32ace1ee45657f` |
|
|
15
|
+
| `claude-permission-transport-native.py` | `c8e82c66a8cf2faf4f4930da21ca81e36166381fd932219cb60e3cec541af10b` |
|
|
16
|
+
| `claude-shell-wrapper-native.py` | `ad891f5b9663e14e3f44febd787500a8ced815125c489adadddcdeb279f64826` |
|
|
17
|
+
| `claude-shell-wrapper-host.ts` | `616e6711e392f0eee7e3fa1c7bdc47a537dfa86bcc8ffb30e549ca94e5a71cef` |
|
|
18
|
+
|
|
19
|
+
## Model-free runs
|
|
20
|
+
|
|
21
|
+
Each leg ran serially through resource admission, one native job at a time. The producer ran with an empty inherited environment, scratch `HOME`, `AGENTHUB_HOME` and Claude config, and a fixed PATH. The native children had fresh fixture homes and configs, strict MCP settings, and a deterministic loopback provider with a synthetic API key. The scratch hub home stayed empty. Each leg ran per binary with `--claude` and `--expected-version`. The Bash legs used `--tool Bash --server-name agent-hub --permission-tool hub_permission_request --require-tool-use-id`, and the wrapper leg used `--bun` with the resolved Bun 1.4.4. One admission deferral (exit 75) hit the 2.1.337 rewrite leg before it started. That leg was rerun unchanged and passed.
|
|
22
|
+
|
|
23
|
+
| Leg | 2.1.334 | 2.1.337 |
|
|
24
|
+
| --- | --- | --- |
|
|
25
|
+
| Write permission transport | 9/9 | 9/9 |
|
|
26
|
+
| Bash transport with `mcp__agent-hub__hub_permission_request` and required tool-use ID | 9/9 | 9/9 |
|
|
27
|
+
| Bash transport with `--rewrite-bash` | 2/2 | 2/2 |
|
|
28
|
+
| Host shell wrapper | 2/2 | 2/2 |
|
|
29
|
+
|
|
30
|
+
The wrapper context case and the normalized case matched across both binaries. Every leg reported `certified: true` with no account and no inference.
|
|
31
|
+
|
|
32
|
+
## Receipt artifact hashes
|
|
33
|
+
|
|
34
|
+
| Local JSON receipt | 2.1.334 | 2.1.337 |
|
|
35
|
+
| --- | --- | --- |
|
|
36
|
+
| write | `526e721dda7d7bbaff640d976a2a84b6ed5a0963c44481ae621a1c409fd67070` | `4e8ae345fde782f7e31a894e402d6f78545da781d3f58d70e7df37edcd32b106` |
|
|
37
|
+
| bash | `a6554252f731247770b213d85743f5af10af3540e3fbe97a6f64ca7b931a8298` | `08bc1d960e6db4efb9030edaeab530cf4268ec1a520bc0934c081e40c081ee7a` |
|
|
38
|
+
| rewrite | `677a63b0c7bed10bf076afd91a8a4e748554882001a15b1ac8028d8380778bdb` | `b6f76a1e3077ef4b23aa43d792c1e893b0d15eaf9753101bd7948062adbf1eda` |
|
|
39
|
+
| wrapper | `912890c14492da32c390dbf83837efbbaea124596769303baa1e6f39e7a4b058` | `16f06d09c61f598c0bd51597b8ef2003247f9df9b77a725137b1c13a6445ee4e` |
|
|
40
|
+
|
|
41
|
+
## Evidence boundaries
|
|
42
|
+
|
|
43
|
+
The run covers the native transport and host-wrapper contract on macOS arm64. Account authentication, real provider inference, person approval interaction, session resume, production-daemon task binding and native sandbox confinement remain unverified. Monitor, mod-initiated calls and opt-in Code Mode were outside the fixture scope. The existing launch-time binary fence still applies.
|