@staix/agent-hub 0.42.0 → 0.44.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 +42 -0
- package/README.md +2 -1
- package/docs/adding-an-ai-tool.md +2 -0
- package/docs/agent-notes/daemon.md +3 -3
- package/docs/agent-notes/local-worker.md +1 -0
- package/docs/agent-notes/tasks.md +3 -2
- package/docs/agent-notes/tests.md +2 -2
- package/docs/design/adapters.md +3 -0
- package/docs/design/agent-hub-architecture.md +2 -0
- package/docs/design/bus.md +2 -0
- package/docs/design/supervision.md +13 -1
- package/docs/design/task-board.md +13 -1
- package/docs/dogfood.md +13 -3
- package/docs/events.md +4 -2
- package/docs/memory.md +5 -3
- package/docs/operations.md +97 -17
- package/docs/quickstart.md +18 -2
- package/docs/research.md +2 -0
- package/docs/sdlc.md +6 -3
- package/docs/security.md +2 -2
- package/docs/verification/2026-11-11-supervision-pilot-1221.md +864 -0
- package/docs/verification/2026-11-18-0.43.0.md +56 -0
- package/docs/verification/2026-11-19-0.44.0.md +60 -0
- package/docs/verified.json +25 -25
- package/package.json +2 -2
- package/plugins/agent-hub/.claude-plugin/plugin.json +1 -1
- package/plugins/agent-hub/kimi-hook.js +486 -218
- package/plugins/agent-hub/server.js +505 -234
- package/src/adapters/claude-implementer.ts +11 -1
- package/src/adapters/claude-print-child.ts +4 -1
- package/src/adapters/conformance/fakes/acp-server.ts +2 -1
- package/src/adapters/conformance/fakes/app-server.ts +1 -1
- package/src/adapters/local-worker.ts +7 -3
- package/src/adapters/reviewer-print.ts +3 -1
- package/src/cli/help.ts +3 -3
- package/src/cli/identity.ts +2 -0
- package/src/cli/main.ts +57 -5
- package/src/cli/output.ts +2 -2
- package/src/cli/sdlc-output.ts +7 -1
- package/src/cli/upgrade-output.ts +43 -2
- package/src/cli/upgrade-stopped.ts +162 -0
- package/src/cli/upgrade-wait.ts +37 -0
- package/src/cli/upgrade.ts +9 -3
- package/src/hub/board.ts +17 -2
- package/src/hub/bus.ts +4 -0
- package/src/hub/claude-shell-wrapper.ts +2 -1
- package/src/hub/config-apply.ts +1 -0
- package/src/hub/control-write-trace.ts +39 -2
- package/src/hub/daemon.ts +141 -37
- package/src/hub/envelope.ts +1 -0
- package/src/hub/facts.ts +30 -0
- package/src/hub/handoff.ts +14 -0
- package/src/hub/hub-tools.ts +1 -1
- package/src/hub/questions.ts +7 -0
- package/src/hub/quota-events.ts +40 -0
- package/src/hub/recovery-store.ts +57 -0
- package/src/hub/report.ts +1 -1
- package/src/hub/research-quality.ts +5 -1
- package/src/hub/research-record.ts +5 -3
- package/src/hub/restart.ts +49 -2
- package/src/hub/runtime-capture-prune.ts +123 -4
- package/src/hub/runtime-prune-health.ts +10 -2
- package/src/hub/sdlc-merge.ts +7 -3
- package/src/hub/sdlc-metrics.ts +17 -8
- package/src/hub/sdlc.ts +18 -6
- package/src/hub/settings.ts +2 -0
- package/src/hub/snapshots.ts +43 -0
- package/src/hub/supervision-rules.ts +2 -2
- package/src/hub/task-shell-command.ts +124 -0
- package/src/hub/task-sweep.ts +6 -2
- package/src/hub/tasks.ts +131 -22
- package/src/hub/turn-attribution.ts +46 -0
- package/src/hub/worktree-shelf.ts +2 -1
- package/src/local/sandbox.ts +2 -1
- package/src/local/shell-environment.ts +6 -0
- package/src/memory/brief.ts +10 -1
- package/templates/AGENTS.block.md +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,48 @@ Issue and pull request numbers in the entries for 0.7.7 and earlier refer to the
|
|
|
4
4
|
|
|
5
5
|
## Unreleased
|
|
6
6
|
|
|
7
|
+
## 0.44.0
|
|
8
|
+
|
|
9
|
+
- Release N-1 for 0.44.x is published 0.43.0, with exact agent-mem 0.29.0 and control protocol 17 (descriptor floor 16). The N-1 fixture and matrix pin that package; the separate protocol-16 fixture stays at 0.25.0. The isolated compatibility fixture covers old clients and plugins against the new daemon and new clients and plugins against the old daemon; it does not prove live-agent, rollback, or shared-home compatibility. The protocol window and CLI forms are unchanged; the backlog pull MCP description now explicitly names planner-only authority. This release pins agent-mem 0.30.0 and does not automatically raise the memory home or sync format floor; compatibility after a person raises a floor requires separate verification.
|
|
10
|
+
|
|
11
|
+
- Document the supervision shadow pilot results, coverage limits, and unknown total cost (Refs #1221, hub task 866).
|
|
12
|
+
|
|
13
|
+
- Default sandboxed Bun and npm caches to each command's writable temporary directory, while retaining caller overrides (Refs #1549, hub task 1017).
|
|
14
|
+
- Exact-pin the first-party agent-mem dependency to 0.30.0 (hub task 1029).
|
|
15
|
+
- Yield while screening task intent briefs and recheck host state in bounded batches to keep assignment responsive (Refs #1545, hub task 1014).
|
|
16
|
+
- Pull ready reserved backlog work when planning or a peer attachment makes it eligible, and name planner authority in backlog guidance (Refs #1547, hub task 1013).
|
|
17
|
+
- Raise the default total backstop AHUB_CHECK_HANG_S of scripts/check.sh from 2250 s to 2700 s; AHUB_CHECK_QUIET_S stays 300 and is still what catches a hang (Refs #1564, hub task 1022).
|
|
18
|
+
- Record observed merge costs, carried-spec timing and per-source security scan availability (Refs #1555).
|
|
19
|
+
- Record quota rows on meaningful changes and a 15-minute heartbeat while preserving measured silence gaps (Refs #1555).
|
|
20
|
+
- Control-write telemetry now attributes synchronous slices after an await and microtask-bound spans that settle before the loop probe, while genuine async waits stay waits (Refs #1545, hub task 1015).
|
|
21
|
+
- Shrink restart.json (store bus.seen once, cut completed delivery bodies to 256 characters) and keep only the 5 newest restart.released and restart.abandoned copies (Refs #1546, hub task 1010). An older hub importing the new restart.json into a fresh journal sees an empty nested seen, so its dedupe history starts empty.
|
|
22
|
+
- Add in-memory read receipts and an observation-only in-place shell write classifier (Refs #1556, hub task 1005).
|
|
23
|
+
- After five consecutive exhausted snapshot bursts, routine boundaries skip capture for ten minutes and record unknown evidence; the next boundary retries (hub task 996, Refs #1550).
|
|
24
|
+
- A failed agent CLI task command no longer records a second "refused" audit unless the daemon says authority refused it (Refs #1547, hub task 1012).
|
|
25
|
+
- Record isolated check outcomes as text-free task evidence for matching-head metrics and supervision (Refs #1555).
|
|
26
|
+
- A start under recovery coordination no longer schedules a runtime prune that is bound to defer, the recovery runner schedules one after it releases its lock, a recovery-only deferral starts no one-hour cooldown, and doctor no longer fails runtime pruning for it (Refs #1546, hub task 1011).
|
|
27
|
+
|
|
28
|
+
## 0.43.0
|
|
29
|
+
|
|
30
|
+
- Release N-1 for 0.43.x is published 0.42.0, with exact agent-mem 0.28.0 and control protocol 17 (descriptor floor 16). The N-1 fixture and matrix pin that package; the separate protocol-16 fixture stays at 0.25.0. The isolated fixture exercises old client and plugin against the new daemon and the new client and plugin against the old daemon. It does not establish live-agent, rollback or shared-home compatibility. The wire and the MCP tool set are unchanged from 0.42.0. The CLI adds `ahub upgrade --all-stopped`, lets `ahub upgrade --to <v>` retarget a stopped project, and makes `memory.sync_interval_min` settable with `ahub settings set`; a 0.42.0 CLI does not offer these. Task history gains an optional `requestHead` on `done` entries, which 0.42.0 ignores. This release pins agent-mem 0.29.0 while 0.42.0 pins 0.28.0; agent-mem 0.29.0 raises no sync/home format floor and builds its derived index as a separate version-5 file while 0.28.0 keeps its version-4 file, so both can share a memory home; file compatibility beyond these fixtures remains subject to the release verification report.
|
|
31
|
+
- The hub exact-pins `@staix/agent-mem` 0.29.0 (from 0.28.0). A placement sync now yields the event loop between source collection, policy evaluation, journal appends and history work (agent-mem#462), so a hub memory sync no longer holds the daemon for minutes; the package's own 583 MB fixture still saw a 2.58 s maximum gap, and that remaining bound stays open there. Under an active sync placement one sync covers every realm in the activated inventory, as sequential publications of at most two realms. Each memory profile rebuilds its derived index once on first open (index version 5; 0.28.x keeps its own version-4 file), so the first memory call after the upgrade can take longer on a large home. Sync wire, remote refs, journal and work-log formats are unchanged and no format floor is raised. Package, lockfile integrity, the pin sentences in the docs and the plugin bundles move together.
|
|
32
|
+
|
|
33
|
+
- Cross-project handoff catch-up treats a target whose control descriptor is missing, or whose process is proven gone, as stopped: it no longer connects to it and logs the stopped state once per state change instead of a timed-out probe on every pass (hub task 995, Refs #1550). A target that starts is still caught up at once; unknown liveness is not treated as stopped.
|
|
34
|
+
|
|
35
|
+
- The idle-owner sweep pauses while the task's current owner has an open `hub_ask` question set on that task, and restarts from the latest settlement once all such sets are answered (hub task 994, Refs #1550).
|
|
36
|
+
|
|
37
|
+
- Record the requested review commit independently of cost plans and recover it from older bound spec reports for SDLC metrics (Refs #1555).
|
|
38
|
+
|
|
39
|
+
- The delivery instruction tells peers to end with exactly `[FYI]` when nothing needs their answer, and to start progress notes with `[FYI]` (hub task 997, Refs #1550). Marker-only finals send no message.
|
|
40
|
+
|
|
41
|
+
- Runtime pruning is no longer deferred for good once a machine has more than 128 recovery receipts (hub task 990, #1541). Each maintenance pass now keeps every open receipt, the newest 32 finished ones and up to 64 more finished ones naming a runtime a project or the live manager still selects, and removes older finished receipts with their `.runner.db` under the exclusive runner claim (no check-then-unlink; none while a recovery hold exists). The 128 bound stays as a safety ceiling, and its refusal names the open operation and `ahub recovery status|resume|abort`; `ahub doctor` and `docs/operations.md` state the same rule. Capture retention is unchanged.
|
|
42
|
+
|
|
43
|
+
- `memory.sync_interval_min` can be set by the person with `ahub settings set` and takes effect without a hub restart (hub task 992, Refs #1543). Turning it off lets an in-flight pass finish.
|
|
44
|
+
|
|
45
|
+
- `ahub upgrade` retargets the runtime of a stopped project without starting its hub, one project or all of them (hub task 991, #1540). `ahub upgrade --to <v>` in a stopped project, or `ahub upgrade --all-stopped --to <v>`, rewrites `runtime.json` through the verified startup write after staging the package once; it starts no daemon, touches no terminal or peer and records no recovery operation. Unknown, unavailable, uninitialized, missing, snapshot-held, recovery-held or Git-tracked projects are refused with a next step, and a hub that starts before the write is refused. Under `--yes` the plan no longer ends with "Nothing was changed", and `ahub upgrade --yes` on a running hub waits through a pipe until its recovery operation ends and exits nonzero unless it completed.
|
|
46
|
+
|
|
47
|
+
- Per-turn Claude print children and local/Pi sandbox tools receive optional host-derived task and trigger hints through the `AGENTHUB_` environment. Research attempt IDs are set only when the host has a matching `ra-<12 hex>` identity; no dispatch-to-attempt link is inferred. Reserved hints override inherited configuration, private task IDs are withheld from cloud children, and the hints grant no authority. Refs #1516.
|
|
48
|
+
|
|
7
49
|
## 0.42.0
|
|
8
50
|
|
|
9
51
|
- Release N-1 for 0.42.x is published 0.41.0, with exact agent-mem 0.27.1 and control protocol 17 (descriptor floor 16). The N-1 fixture and matrix pin that package; the separate protocol-16 fixture stays at 0.25.0. The isolated fixture exercises old client and plugin against the new daemon and the new client and plugin against the old daemon. It does not establish live-agent, rollback or shared-home compatibility. The wire is unchanged from 0.41.0. This release pins agent-mem 0.28.0 while 0.41.0 pins 0.27.1; agent-mem 0.28.0 raises no sync/home format floor, so both can share a memory home until a person raises it, and file compatibility beyond these fixtures remains subject to the release verification report.
|
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@ Code, Codex, Kimi Code, Pi and a hub-owned local worker (plus Qwen Code, Jcode a
|
|
|
5
5
|
Antigravity if you want them) share a message bus, a task board and a memory, each
|
|
6
6
|
connected through its own native interface.
|
|
7
7
|
|
|
8
|
-
Status: 0.
|
|
8
|
+
Status: 0.44.0, control protocol 17 (accepts 16). Bun + TypeScript, one loopback daemon per
|
|
9
9
|
project. Site: [agent-hub.staix.net](https://agent-hub.staix.net).
|
|
10
10
|
|
|
11
11
|
Inspect bounded task and attempt metadata with `ahub lineage show`; admit external
|
|
@@ -226,6 +226,7 @@ Live checks that still need a real account or a person are listed in the
|
|
|
226
226
|
|
|
227
227
|
Coding agents that work on this repository follow [`AGENTS.md`](AGENTS.md) and
|
|
228
228
|
[`docs/agent-notes/`](docs/agent-notes/).
|
|
229
|
+
The managed agent guidance explains the marker-only no-reply path for a delivery that needs no answer (#1550).
|
|
229
230
|
|
|
230
231
|
## Origin
|
|
231
232
|
|
|
@@ -56,6 +56,8 @@ Defines how the agent process is started and commanded:
|
|
|
56
56
|
* `conductorStartable`: Boolean indicating if `ahub up` or conductor can spawn this peer automatically. The conductor's start refusal and the `hub_peer_start` description name these kinds from this flag and `optional` (`conductorStartText`, `src/adapters/registry.ts`), so a new kind needs no text edit.
|
|
57
57
|
* `ownedFlags`: CLI flags owned by this tool's launcher.
|
|
58
58
|
|
|
59
|
+
For a host-owned per-turn child, the hub reserves `AGENTHUB_TASK_ID`, `AGENTHUB_ATTEMPT_ID` and `AGENTHUB_TRIGGER` after any configured environment is merged. These are optional attribution hints, not authority; a definition must not supply or rely on them for authorization. `AGENTHUB_PEER_ID` remains the single peer marker. Long-lived sessions do not receive per-turn values.
|
|
60
|
+
|
|
59
61
|
#### `identity`
|
|
60
62
|
Defines how the hub MCP server identity reaches the tool:
|
|
61
63
|
* `"acp-session"`: Sent in `session/new` `mcpServers` parameter.
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
- Keep `export const LIVE_TEST_SUPPORTED = true;` in `src/cli/identity.ts`: delegated recovery staging reads this declaration before any source effect.
|
|
14
14
|
- A delegated non-recovery command runs only after `recordDelegatedCliAudit` committed `delegated` against a hub whose `features` list `cli_audit_delegated`, that instance's console `cli_audit_ack` confirmed retention, and `ControlClient.pinInstance` pinned the invocation to it; a refused feature, failed ack or changed consumer executes nothing (#410). Upgrade, restart and recovery record delegation only in the operation receipt (`delegatedAudits` through `createOperation` or `recordRecoveryDelegation`). The daemon counts an audit retained only after `event()` returned true.
|
|
15
15
|
- For conductor recovery (#900), keep source-issued private continuity separate from public actor/audit metadata; recheck the same initiator and every affected project at effect boundaries. Compare candidate config and routing with the running accepted policy. Verify and use the same captured startup inputs before any adapter import; never publish a later raw-file reread. Keep captured TUI restoration and unknown source/target evidence person-only. Derive target feature floors from verified target bytes, never a request or receipt claim (`docs/operations.md`, "Conductor-bound restart and recovery continuation").
|
|
16
|
-
- Conductor operational refusals (#812, #839): throw `OperationalAuthorityError` (`src/hub/operational-authority.ts`) for an authority refusal, never a plain `Error`. Only it sets `authorityRefused: true` and its scope on the reply, which the control `reply` wrapper audits once as a refused `agent_cli` event; any other failure of a labelled request keeps its own error with `authorityRefused: false` and is never audited as refused, and the CLI's `fail` audits only when `authorityRefused` is not `false`. An unreachable or dead hub is "authorization unavailable", never a missing conductor role. `publicOperationalView` is cached on the board status revision, config revision, routing and the private-path policy: a new input to that projection joins the cache key.
|
|
16
|
+
- Conductor operational refusals (#812, #839): throw `OperationalAuthorityError` (`src/hub/operational-authority.ts`) for an authority refusal, never a plain `Error`. Only it sets `authorityRefused: true` and its scope on the reply, which the control `reply` wrapper audits once as a refused `agent_cli` event; any other failure of a labelled request keeps its own error with `authorityRefused: false` and is never audited as refused, and the CLI's `fail` audits only when `authorityRefused` is not `false`. For a command that is not a conductor operation, `taskOp` audits `refused` only when the reply says `authorityRefused: true`; a domain error keeps the one up-front `run` record (#1547). An unreachable or dead hub is "authorization unavailable", never a missing conductor role. `publicOperationalView` is cached on the board status revision, config revision, routing and the private-path policy: a new input to that projection joins the cache key.
|
|
17
17
|
|
|
18
18
|
- Peer DOING (#878): `observeDoing` is the only writer and `doingRows` the only reader (`src/hub/daemon.ts`, helpers in `src/hub/peer-doing.ts`). Decide privacy at observation (`contextPii`, held review input (`reviewObserverHeld`) or a last delivery holding an `isReviewObserverExcluded` envelope, or a refusing or throwing `tasks.publicMetadataText` latches a stub) and again at display (an open PII task owned or reviewed, a private turn, or the same review-input screens); reuse those screens, never add one. `status()` adds it only with `includeDoing` (the `status` reply and the dashboard snapshot), so `writeStatus` never writes it to `status.json`; the conductor's `hub_status` gets the same rows, each non-stub value framed by `publicConductorStatus` as untrusted (`sanitize`d text, `untrusted: true`, and `from` with `doingNote`, or `note: INCOMING_LABEL_NOTE` for a `label` row); never give an agent DOING text without that frame. A `label` row (`unnamedSessionLabel`: an unnamed `title: "hub"` session's first acknowledged incoming delivery, #1055) reaches only the console, the dashboard and the conductor (`includeIncomingLabels`); every other status reader gets `unnamed`. The console `title` op and `hub_set_title` both go through `setSessionTitle` (writer rule: `adapters.md`), and `session-title-inputs.json` keeps only session, delivery and envelope ids (`sessionTitleBindings`, `titlePersistence: "native"` peers only), never a name, body or label. Claude's title comes from the transcript path the facts hook reported and `claudeTranscript` validated, read through `readAiTitle` (1 MiB per read, lines over 64 KiB skipped); its current item only from PreToolUse input, never the transcript; every cached TaskUpdate subject, current or not, is screened when it is learned (`contextPii` or `tasks.publicMetadataText` refusing or throwing, via `ClaudeTodoSource`), keeps that verdict and passes it to `observeDoing` as `learnedPrivate`. A doing failure never changes a facts reply.
|
|
19
19
|
- Observed turn models (#1402): `turn_end` carries `model` and `modelEvidence` only from `PeerAdapter.observedModel()` (rule in `adapters.md`), and the operational view admits them only through `safeModelLabel` and `MODEL_EVIDENCE` (`src/hub/operational-view.ts`). `noteObservedModel` keeps a peer's last `served` or `session` model that `isNativeModelToken` accepts, bound to the adapter that reported it and dropped when the peer goes offline; status and `ahub model list` show it as `observed (served|session)` only when no override, instance, launch or native baseline model is known, never a `configured` grade.
|
|
@@ -132,7 +132,7 @@ Scope: the operator console, control WS and its protocol, state files, the dashb
|
|
|
132
132
|
- The memory client (#752) is the in-process amem `MemoryClient` built once in `startDaemon` from the alias-resolved `memoryProject`, the bound store and candidates, `screenMemory` and the capture binding; its `check` rechecks that binding and the project before each call. `DaemonOptions.memoryClient` is a host-only seam, never read from configuration or a tool; `memory.worker_url` is ignored legacy configuration, never a destination. Local capture takes `memoryProject`, never the project chain. Shutdown aborts `syncStop`, awaits `syncRun`, then closes `memory`, the candidates and the store, in that order.
|
|
133
133
|
- Symbol anchors (#769, #770): resolve `memorySymbols` only in the `prepareReviewBrief` pass that fills `reviewSymbols`, under the same key and eviction, through `resolveMemorySymbolNodes` (a positive, unambiguous `exists` at the brief's head, at most `MEMORY_SYMBOL_LIMIT` candidates within `MEMORY_SYMBOL_START_BUDGET_MS`); a filled key is reused by the completion pass, a PII task is never resolved, and one that turns PII or changes owner meanwhile resolves unknown. `memorySymbolNodes` answers only for a non-PII task whose `codeSymbols.head` is its `refs.commit`. Raw and normalized symbol forms are query compatibility only (`taskMemoryQueryNodes`, `planGuardNodes`): never rewrite a stored note or id. `ahub doctor --stale-anchors` (`memoryStaleAnchorsCommand`, `src/cli/memory.ts`) is read-only: it never creates a missing profile, machine or shard, never edits, deletes or promotes a note, and reports unavailable, private or ambiguous evidence as unknown, never stale.
|
|
134
134
|
- Read-time code neighbours (#771): derive them only through `memoryCode` and publish only through `currentMemoryCode` (`src/hub/daemon.ts`), which rechecks the memory binding, the overlay head against its `readMemoryCodeHead` proof and every node's canonical id, and screens each attached note again; never store derived `calls` edges or neighbours in amem. Neighbour queries run through `codeFacts.neighbours` with `priority: "optional"`, so review and completion queries win. Only `symbol:` starts query: the dashboard only through `uiMemorySnapshot` for the `memory` view with `codeNeighbours: true` and a node of at most 512 bytes (`ui_snapshot` answers a failure with `memory view unavailable`), and `hub_memory_graph` only after `memory_read`, rechecking the caller's connection generation, private turn and PII context after the await. Console task detail reads `taskMemoryResult(task, true)`, which never starts a query; its `relatedMemory` is a count or `unknown`. A PII task or turn never queries. Keep the cache ceilings (32 entries, 30 s known, 5 s unknown, 5 s between derive starts), and keep direct path/title/symbol notes in `taskMemoryResult` independent of code availability: an optional code failure never drops them.
|
|
135
|
-
- Task briefs (#779): with a memory store, `Briefs.forTask` (`src/memory/brief.ts`) takes relevance, ordering and line text from agent-mem's `buildIntentBrief` through `taskIntentBrief` (`src/hub/daemon.ts`); the hub keeps only policy and binding. Screen rows through `screenMemory` and `publicMetadataText` with the local deny paths, and recheck
|
|
135
|
+
- Task briefs (#779): with a memory store, `Briefs.forTask` (`src/memory/brief.ts`) takes relevance, ordering and line text from agent-mem's `buildIntentBrief` through `taskIntentBrief` (`src/hub/daemon.ts`); the hub keeps only policy and binding. Screen rows through `screenMemory` and `publicMetadataText` with the local deny paths, and recheck stopping, config revision and private turn at every library check; revalidate the memory binding, task revision, owner, task PII and peer PII context before and after source reads, after each bounded scan yield and before publication. Other async host operations retain their fresh checks after awaits. An `unknown` result or a changed context gives no brief, never a partial one. Host plan-guard fails (`priority`) keep the front of the brief even when the library's cap left them out, and the per-peer dedupe and `brief_items` cap apply to whole library rows. Derived code neighbours only add `symbol:` selectors and a failed derive never removes direct intent memory. `src/hub/memory-plan-guard.ts` only adapts the library's `planGuardNodes` and `matchingPlanFails` to the task shape: never add matching logic there.
|
|
136
136
|
|
|
137
137
|
- Bind adapter and instance declarations once at startup through the daemon-local `adapterCatalog` (`createProjectAdapterCatalog(loadedConfig.adapters, externalDefinitions)`, the definitions `loadExternalAdapterDefinitions` imported at startup; a reload passes the same `externalDefinitions` to `loadConfig` and imports nothing), its `definitionOf` closure and the `configuredIds`/`extraIds` catalogs; never publish them to the global registry or take them from a request. `adapters` and `instances` are restart-class, and `adapters` is `NEVER_EDITABLE` and in `ALL_MACHINE_LOCAL`. Settings rows come only from `projectSettings(declarations, adapterCatalog)`; a `locked` row (a read-only instance's permission) is refused by `checkSettingValue` and `settingRefusal` for every authority, and the console and dashboard never arm an edit or undo for it.
|
|
138
138
|
- Configured ACP starts (`startPeerBody`): before effects refuse native launch overrides (model, route, backend, unattended, provider profile, session file, fresh) and an invalid session selector; answer `already` only for the same requested native session and never pass `qwen_cmd`; after a failed start keep the owner with `pendingOwnedProcess` on the bus, let `peer_stop` admit that offline owner and refuse starts until it is confirmed gone, reporting only a withheld-detail reason. In `taskOp`, refuse a read-only instance's op outside `READ_ONLY_HUB_TOOLS` before effects. Publish `configuredAdapters`, `startablePeers` and `readOnlyPeers` in status as bounded ids only. Keep controlled recovery refused (`session.recoveryRefusal`); crash resume passes only a bounded, control-free recorded `sessionId`, never a recorded model.
|
|
@@ -149,7 +149,7 @@ Scope: the operator console, control WS and its protocol, state files, the dashb
|
|
|
149
149
|
|
|
150
150
|
- Classify HEAD moves with bounded, append-fenced per-worktree reflog evidence. Exclude only incoming checkout/merge/pull/proven-fast-forward reset paths; preserve commit/amend/cherry-pick and sequencer replay changes. Take a rebase/pull --rebase start checkout's incoming paths from the single `merge-base --all` of old and upstream to upstream (no base or several is unknown), so replayed own commits stay attributed; a proven fast-forward reset stays incoming even when its target holds the peer's commit from another worktree (#612). Batch `diff-tree --stdin` only for single-parent pick and commit rows; diff squash, fixup, reword and edit rows one by one. Never exclude paths still dirty against end HEAD (autostash/checkout -m included). Unreadable or ambiguous movement/capture evidence is unknown, never an exclusion. Compute a concurrent change set once and publish no more than one conditional notice per affected task. Keep per-task-pair research events. Cache only raw checkout-branch probes within one synchronous burst, and reapply current privacy screening on every status rendering (#576).
|
|
151
151
|
|
|
152
|
-
- Share one monotonic 250 ms snapshot Git budget until the next event-loop I/O turn. Repository/HEAD probes, capture and end diffs consume the same remaining deadline; exhaustion or unreadable diff evidence records unknown trees and no attribution/undo, with one diagnostic per burst. Never substitute a stale baseline or apply a late result (#576). `DaemonOptions.snapshotClock` is host-only (tests hold it, rule: `tests.md`): never read it from configuration or a tool, production leaves it unset (`performance.now`), and the share stays 250 ms with `snapshotBurstMs` still clamped to it. Every deadline comparison goes through `budgetNow(budget)`, never `performance.now()` against `budget.deadline`.
|
|
152
|
+
- Share one monotonic 250 ms snapshot Git budget until the next event-loop I/O turn. Repository/HEAD probes, capture and end diffs consume the same remaining deadline; exhaustion or unreadable diff evidence records unknown trees and no attribution/undo, with one diagnostic per burst for a non-routine capture; a routine turn boundary logs only when its exhaustion starts a cooldown. Never substitute a stale baseline or apply a late result (#576). `DaemonOptions.snapshotClock` is host-only (tests hold it, rule: `tests.md`): never read it from configuration or a tool, production leaves it unset (`performance.now`), and the share stays 250 ms with `snapshotBurstMs` still clamped to it. Every deadline comparison goes through `budgetNow(budget)`, never `performance.now()` against `budget.deadline`. `SnapshotCooldown` (`src/hub/snapshots.ts`, #1550) counts one exhaustion per execution root per burst and, after `SNAPSHOT_COOLDOWN_FAILURES` in a row, skips routine boundary captures for `SNAPSHOT_COOLDOWN_MS` with unknown evidence; keep it in memory only and never let a skipped boundary reuse an earlier tree.
|
|
153
153
|
|
|
154
154
|
- Channel tool-result hints (#493, #221): `withPendingHint` (`src/adapters/claude-channel.ts`) appends fresh `delivery_holds` counts, and drops the "call hub_inbox" advice whenever the same reply carries a held-delivery hint, because `bus.pull` refuses under that hold and the advice would send the session into a refused read. A `hub_inbox` result that already says how many messages remain unread adds only the important count, never a second queued count. A `hub_inbox` result that renders its own held or accepted metadata (`HELD_HINT_INCLUDED`) gets no second held hint and no polling advice, and unavailable metadata adds the inspect step instead of "Nothing is waiting" (#1172). Held bodies (`renderHeldInbox`, #1359) go in their own second content block, the first block keeping queued and local messages, and a render failure is a fixed warning that keeps the normal pull. Do not add a Claude client-version gate on steer without a probe of the older client and an optional hello field that carries the version (background: README).
|
|
155
155
|
- For optional Record read projections, bind `recordReadVersion` to memory/profile, privacy, execution cwd and effective Record policy, not the global config revision. Preserve already-admitted public recall across unrelated roster reloads; keep capture-generation and delivery-membership fences independent.
|
|
@@ -4,6 +4,7 @@ Scope: the hub-native local worker, its tools, path guard, denylist and seatbelt
|
|
|
4
4
|
|
|
5
5
|
- Before editing a probe-only lifecycle, capability or sandbox branch, read `docs/design/guidance-probes.md` (T2 confined adapter contract).
|
|
6
6
|
- Nothing the local worker executes may run outside `sandboxedExec`; a new tool that spawns a process goes through it, and a tool that touches a path goes through `guardPath`.
|
|
7
|
+
- Use `sandboxCommandEnvironment` for the per-command `TMPDIR` and package-manager cache defaults in both `sandboxedExec` and the sandboxed host shell wrapper; explicit cache values win, and the owned temp directory is removed after the command.
|
|
7
8
|
- The headless Claude host wrapper (#845, `HostShellWrapper` in `src/hub/claude-shell-wrapper.ts`) runs its read-only and check/test/build grants under this same `profile()` plus a deny-only refinement (`src/hub/task-shell-sandbox.ts`, and the hub state dir): it repeats `sandboxedExec`'s own-temp allow suffix and its `readOnlyData` broad-write guard, so change both places together, and keep the refinement deny-only. The wrapper and the read-only shell proof take their fixed environment from `hostShellEnvironment` (`src/local/shell-environment.ts`), which must equal the baseline `sandboxedExec` builds inline (`test/claude-shell-wrapper.test.ts` compares them); never inherit a native agent's environment there.
|
|
8
9
|
- A timeout or abort in `sandboxedExec` marks the result `(killed: <signal>, timeout?)` from its own `killRequested` flag, never only from the exit signal: a shell may report its killed child as a normal exit 137.
|
|
9
10
|
- The sandbox denies home reads by default (toolchain dirs, the project and its real git dir excepted) and all network, loopback included: claude-mem and the Codex app-server listen on loopback without auth. Tests that bind a local port therefore fail when the worker runs them, also with `local.bash_network: true` (the egress proxy keeps loopback closed, and the proxy variables send a test's plain-HTTP `fetch` to the proxy, which refuses it); that is the intended trade-off, and `"direct"` is the switch until a later release removes it.
|
|
@@ -23,13 +23,14 @@ Scope: the task flow, assignment, the state machine and the hub's MCP tools. Rea
|
|
|
23
23
|
- The planner "board changed" notice (#758, only with the lifecycle on) is built from what was added to a card's history since the last scan (`Tasks.groomNotices`, `groomScan`), never from the status revision alone: skip the peer whose own entry it was (`entry.by`), tell only the card's planners (`taskPlanner`, #525-2), send a planning revision or dependency change (a `planning` entry, or `deps` that differ from the last scan whatever wrote them: a propose with `after`, a split) and a card's creation (a peer's propose, a split child, a generated card) at task weight, since new work and its dependencies are what a plan review consolidates, and replace an unsettled copy (`sendGroomNotice` withdraws it by the `The board changed` prefix) so a planner meets the latest revision once, and send state moves, reviews and assignments at `fyi` weight (recorded, no turn), at most once per planner per current `tasks.groom_fyi_window_min` (default `GROOM_FYI_WINDOW_MS`, 10 minutes); read the host config at each notice flush, never capture it at construction. The hub's own bookkeeping entries (`by` is `hub` with no `planning`: lifecycle links, idle sweeps, holds, plan observations) tell nobody and spend no window; a deps change with no new entry has no known author, so no planner is skipped for it. Scan every configured planner, not only the attached ones, so a change made while one was offline is kept for it. The first notice a planner gets after a hub start is task weight. Keep the scan out of the status revision and never read history that is not new.
|
|
24
24
|
- Planner work-ready notices (#785 P1a, `writePlannerNotices`): a write that can free a reserved owner's WIP or release backlog (done, approval, decline, cancel, backlog return or pull, untouched return, pull undo) takes `capacityBefore` (the `wip()` of the task's owner and reservation) before its board write and calls `writePlannerNotices` after it. Each rostered planner of the task (`taskPlanner`) gets one ids-only `task` envelope starting `Planner work ready:`: `capacity_released: <peer> WIP <n>; reserved ready #<id>|none` for a peer whose WIP dropped, and, when the write approved the task, `backlog_ready: #<id>` for each backlog dependent with nothing left to wait for. Merge the lines of that planner's unsettled copies, read back from `bus.pendingEnvelopes` (they survive a restart; never keep them in memory), withdraw them, then publish, so at most one stays queued per planner; all of it runs inside `releaseNotice`. The notice only wakes the planner: never pull, reserve or assign from it, and never put a title or note in it.
|
|
25
25
|
- Person-run cards (#1176, `needsPerson` / column `needs_person`): the mark is the person's alone (`planBacklog` refuses an agent that sets or clears it or plans a marked card), and every way an agent could be offered the card checks it: `topReservedReady` (auto pull and the planner notice), the one pull gate in `pullPlanned`, `offerReady`, `releaseReady` (not a stall), `assign()` (pure, before any routing, so `route explain` agrees), `nextSweep`, and the two `plannerWip` queries; and the other doors: `splitBacklog` (agent refused in `Tasks` before and after the screen and in the board transaction; the person's children inherit the mark), `accept` and `acceptReviewed`, `assignTo` for the owner role, `relevant` (drops a queued offer), and `planBacklog` (refuses a mark on an owned card). A new way to offer a card to an agent must check `needsPerson` too; `test/person-run-cards.test.ts` has a mutation-checked test per gate.
|
|
26
|
-
- Opt-in auto pull (#785 P1c, `tasks.auto_pull`, `Tasks.queueAutoPulls`, `autoPull`, `topReservedReady`): `writePlannerNotices` collects the peers whose WIP this write lowered and, only when `TasksDeps.autoPull()` is true (read at each release, so a reload applies to the next one), queues one `autoPull(peer)` per peer on a promise chain, so two releases never pick the same card and each job re-reads the board. It takes the top backlog card explicitly reserved for that peer (`topReservedReady(peer, undefined, true)`, the rule the notice's `reserved ready #id` line also uses; never an unreserved card, never PII, which `topReservedReady` skips for a pull), finds the card's own planner of record (`taskPlanner(card)[0]`, which must be rostered) and calls `pullPlanned(HUB, input, { onBehalfOf: planner })`. `onBehalfOf` is accepted only with `by === HUB`; the planner's authority is what `planningAuthority` checks, the actor in history and the planning telemetry stays `hub`, and the planner binding records the planner it acted for. Every other check is `pullPlanned`'s own, unchanged, and a refusal is one console notice with the public title (never detail). A held or recovering hub, a storage error or the setting off pulls nothing, and that is checked twice: at entry and again by `pullPlanned`'s `opts.guard` (`autoPullAdmitted`) wherever authority is rechecked, which includes right before the assignment or board write after the awaited PII screen and `planReviewGap`, so turning the setting off or starting recovery or shutdown mid-admission writes nothing and reports nothing. `autoPullsPending()` counts queued and running pulls and `recoveryReady` waits for it (also named in the recovery view's blockers), as it does for `checksPending`. The key is in `ALL_MACHINE_LOCAL` (`config-trust.ts`) so a committed config is ignored for it, and it is not in `CONDUCTOR_SETTING_KEYS`: an agent never turns it on. Never add a timer or sweep that pulls
|
|
26
|
+
- Opt-in auto pull (#785 P1c, `tasks.auto_pull`, `Tasks.queueAutoPulls`, `autoPull`, `topReservedReady`): `writePlannerNotices` collects the peers whose WIP this write lowered and, only when `TasksDeps.autoPull()` is true (read at each release, so a reload applies to the next one), queues one `autoPull(peer)` per peer on a promise chain, so two releases never pick the same card and each job re-reads the board. It takes the top backlog card explicitly reserved for that peer (`topReservedReady(peer, undefined, true)`, the rule the notice's `reserved ready #id` line also uses; never an unreserved card, never PII, which `topReservedReady` skips for a pull), finds the card's own planner of record (`taskPlanner(card)[0]`, which must be rostered) and calls `pullPlanned(HUB, input, { onBehalfOf: planner })`. `onBehalfOf` is accepted only with `by === HUB`; the planner's authority is what `planningAuthority` checks, the actor in history and the planning telemetry stays `hub`, and the planner binding records the planner it acted for. Every other check is `pullPlanned`'s own, unchanged, and a refusal is one console notice with the public title (never detail). A held or recovering hub, a storage error or the setting off pulls nothing, and that is checked twice: at entry and again by `pullPlanned`'s `opts.guard` (`autoPullAdmitted`) wherever authority is rechecked, which includes right before the assignment or board write after the awaited PII screen and `planReviewGap`, so turning the setting off or starting recovery or shutdown mid-admission writes nothing and reports nothing. `autoPullsPending()` counts queued and running pulls and `recoveryReady` waits for it (also named in the recovery view's blockers), as it does for `checksPending`. The key is in `ALL_MACHINE_LOCAL` (`config-trust.ts`) so a committed config is ignored for it, and it is not in `CONDUCTOR_SETTING_KEYS`: an agent never turns it on. Never add a timer or sweep that pulls. Also queue the reserved peer after backlog planning changes eligibility, after a dependency approval readies its backlog card, and when an idle peer is registered or first becomes idle after registration; use the same serialized admission and recheck once per attachment.
|
|
27
27
|
- Bounded waits (#1454, `Tasks.wait`, `taskWait`, `hub_task_wait`): a wait is one quiet `wait recorded` history entry with `wait: {until, owner}` and the public reason as its note, never a column or a second write. `taskWait` (`src/hub/task-sweep.ts`) parses whether the latest wait remains in force from history alone (latest wait entry names the current owner, nothing state-changing after it); callers use that result for idle-sweep timing and to surface an expired wait as `wait-passed` in planner grooming. A new event that must not end a wait joins `WAIT_KEEPING_EVENTS` beside its `QUIET_EVENTS` line. `nextSweep` reads it for `idle-owner` only; never let it touch `review-pending`, `unaccepted-assignment` or `ready-unassigned`. The tool is published only while `task_sweep.enabled` (`profileTaskTools(..., wait)`, status field `taskWait`), and `Tasks.wait` refuses with the same condition, so sweep off changes no tool list. Refusals are `PreEffectToolRefusal` naming cause and next step; the reason is screened and refused, not cut, on an ordinary task.
|
|
28
28
|
- Planned start (#1092): `plannedStartPending` (`src/hub/task-sweep.ts`) is the only test that a card's `plannedStart` is still ahead. Every automatic path skips such a card: dependent readiness, `backlog_ready` notices, the reserved-ready pick, auto pull and its `guard`, a hub-actor (`by === HUB`) offer, pull or assign of an ownerless backlog or proposed card, and the idle sweep. The planner digest shows it as `scheduled`. A new automatic path asks it too.
|
|
29
29
|
- Per-head CI watcher (#785 P1b, `src/hub/ci-watch.ts`, `Tasks.watchCi`, `ciCompleted`, `reofferHeldReview`): when a `done` leaves a review whose admission was not ready at the task's exact full-commit head (or a review is held as premature in `sendReview`), `CiWatchers` starts at most one watcher per task and head, with chained unref'd `setTimeout`s and no interval. Each poll is one `gh pr view` through the `sdlc.gh` port (`pollCi`); `latestCheckRuns` drops older rows only when a same-name check has the same workflow identity and a unique latest start time, otherwise duplicate evidence remains. A cancelled check and a draft PR's deliberately deferred `check (macos-latest)` failure are pending, not failed, and so is an older macOS aggregate failure while a newer same-workflow `check (macos-latest) shard N/M` is queued or in progress with a later start (`awaitingDeferredReplacement`, #1490); missing ordering or workflow evidence stays a failure; other required failures remain failures. It ends on a passed result for the required checks, on `CI_WATCH_DEADLINE_MS`, on `stopCiWatchers` (daemon `stopOnce`), or silently when `ciWatchCurrent` fails (the task left `in_review`, its head or PR changed, the lifecycle is off, it turned private). `complete`, `review` (both verdict writes) and `cancel` cancel it. Each (head, outcome) is told once (`settled`), and only `passed` settles a head for good (#540): after `failed` or `incomplete` the watcher keeps reading for a rerun of that head (the first pending read after each newly told result is a new run attempt and renews the deadline once; later pending or unreadable reads and an unchanged failed result never renew it, so the watcher always ends; a deadline after a told result ends silently), and a later `hub_task_done` at that head starts one again. A newer head replaces the watcher. The result is one ids-only `ci_completed:` task envelope at `status` weight to the owner and the reviewer (`fyi` is never delivered to a peer, so it would not reach them), a console notice for `user`, and for a deadline a console notice only. A passed or incomplete result re-offers a review held as premature once (`heldReviews`, keyed by task, head, reviewer and review revision) after a fresh `reviewRequestAdmission` says ready; a failed one re-offers nothing. No task text goes in the notice, no PII task is watched, and nothing is restored after a hub restart (the next `hub_task_done` starts one). Never add a second periodic gh read outside this watcher.
|
|
30
30
|
- Required checks (#1344): resolve the names only through `requiredChecksFor` / `requiredCheckNames` (`src/hub/sdlc-merge.ts`, `src/hub/sdlc.ts`); the built-in `check (...)` and `seeded guards` set applies only to this repository, and an empty set elsewhere is a `required checks unknown` blocker, never a pass.
|
|
31
31
|
- Build-entry guidance (#1354, `buildEntryDiagnostic` in `src/hub/build-entry.ts`) is pure display data: routing and `route explain` may show it but never read GitHub or change eligibility because of it.
|
|
32
32
|
- Merge adoption (#1348, `ahub sdlc adopt-merge`, `Tasks.adoptMerge`): only the person or the one configured conductor adopts an already merged PR; it writes `approved` with the `merged outside the hub` event and creates no reviewer verdict, review metric, reviewed-head receipt, guarded-merge result or GitHub mutation, and a private task or turn refuses before any GitHub read. Its bounded GraphQL check read uses `latestCheckRuns`: discard an older same-name row only when workflow identity and a unique latest start time prove which run is newest; preserve duplicate evidence when ordering is uncertain. Contract: `docs/design/task-board.md` "Merged PR adoption".
|
|
33
|
+
- External merge readback (#1555, `Tasks.captureExternalMerge`, `settleMergeReadbacks`): host-only and read-only on GitHub, for an approved non-PII task whose repository merge mode is `off`. It writes `sdlc.mergeReadback` with the `merge observed` event and never `sdlc.merge`, a verdict or a GitHub mutation. Save `cost` only from a complete history read, and recheck the task, receipt and policy identity after every await before the write.
|
|
33
34
|
|
|
34
35
|
- Handoff idempotency (#1203 T1): the target writes a handed-off task only through `Board.proposeHandoff` (the proposal and `task_handoff_origin` row, key and request digest in one `atomic` transaction); `handoffIn` asks `replay()` before the duplicate check and again after the PII screen's await, so a retry of a key whose first attempt is still screening files nothing twice. Never `propose` then `setHandoffOrigin` for a handoff, and never compare a key to anything but this origin project's own rows.
|
|
35
36
|
- Completed-change notices (#713, one per recipient per done, accepted work only, superseding by `completedFor`): rule in `bus.md`.
|
|
@@ -69,7 +70,7 @@ Scope: the task flow, assignment, the state machine and the hub's MCP tools. Rea
|
|
|
69
70
|
- The kinds a conductor may start are named only through `conductorStartText()` (`src/adapters/registry.ts`, from `start.conductorStartable` and `optional`): the `hub_peer_start` description and the `conductorStart` refusal read it, and a TUI start previews any such kind (#1408 R5). Never write a fixed peer list there.
|
|
70
71
|
- `hub_set_title` (`SESSION_TITLE_TOOL`, #1055) is in `TASK_TOOL_NAMES` but never in `TASK_TOOLS`; its publication rule is in `adapters.md`, and its `taskOpBody` case accepts only `title`.
|
|
71
72
|
- Plan sources (#1144): `propose`, `acceptReviewed`, `accept` and `splitBacklog` (every part's cleaned plan, planner split and the hub's intake split alike, #1161) call `validatePlanSources` on the plan they will keep (the new one, else the stored one) before any board write or notice; an id the source registry (`TasksDeps.intake.sourceKnown`) does not know is a `PreEffectToolRefusal` naming `ahub source list`. A new path that admits a plan calls it too.
|
|
72
|
-
- SDLC metrics and bands (#481 S7): `sdlc-metrics.ts` is pure (history in, numbers out, no clock, no I/O); every metric a task cannot derive is `null`/`unknown`, never 0, and a private task is only counted as withheld. Stale-head re-reviews need both heads on a round (`reviewCost.head`
|
|
73
|
+
- SDLC metrics and bands (#481 S7): `sdlc-metrics.ts` is pure (history in, numbers out, no clock, no I/O); every metric a task cannot derive is `null`/`unknown`, never 0, and a private task is only counted as withheld. Stale-head re-reviews need both heads on a round (`requestHead` on the done, falling back to `reviewCost.head` or the bound spec-report head on older entries, #1555; `reviewFindings.head` on the verdict): never derive them from event order. `Tasks.sdlcMetrics` is the one read (planner or person, refused during a private turn) and `Tasks.proposeFromBands` the one writer. It is held like every host writer (`sweepHeld`, `bus.isRecoveryHeld`, `bus.storageError`), keys a breach by its episode (`BandResult.episode`, derived from history so a restart finds the same key), writes nothing while the metric has an open band card, and records a log notice in `band_notices` so it is announced once. Card text is fixed words, numbers and task ids, screened through `signalsFor` and `candidateTextAllowed` like the recurring-finding card; never put task titles, notes or PR text in it, and never open a GitHub issue. Drift honours `min_delta` like every tier. `[bands]` is validated by `bandsConfig` with field-level paths; do not add a tier or a metric without a test that fires it. Merge-time figures (#442) come from `MergeRecord.cost`, written once by `guardedMerge` after it observes the merge (`mergeCostFrom`, `cleanMergeCost` in `cost-governance.ts`): re-validate a stored record with `cleanMergeCost` before use, never let that read touch the merge result, and keep a missing or partial read `null`, never 0. `hotfix_rate` and `security_open_alerts` are external series (`EXTERNAL_METRICS`, `Tasks.externalSeries`) whose points are releases and scans, so a card names its `subject`; a legacy release with no train history is left out of the series, never a 0. The security scan (`security-baseline.ts`, `Tasks.runSecurityScan`) reads GitHub's own open-alert counts, runs no scanner, schedules nothing without `[security_scan]`, is held like every host writer, re-judges its schedule after the awaited read and records counts only; a source it cannot read is an unknown total, never zero.
|
|
73
74
|
- Admit a declared extra (a person-started `ahub claude --as` instance and a headless Claude implementer included, #742, #747) as owner of any class whose owner role is implementer (`ownerRoleOfClass`) only with the current implementer role and `ownerIsolation[id] === true`, the daemon's proof that the live adapter generation started in `executionRoots[id]` outside the canonical cwd. Never derive it from the declaration's `worktree`, its roles or a reload. Only the status path passes a display `ownerIsolation` projection (`stalled(projection)`); every admission and effect caller uses fresh `TasksDeps.ownerIsolation`.
|
|
74
75
|
|
|
75
76
|
- Lifecycle identity (#694): the hub links `sdlc.repo`/`issue` only through `Tasks.linkIssue` (the one issue `planIssueIdentity` resolves) at propose and accept (`linkOnWrite`, #723: a local parse, never a read, never a refusal, advise and enforce only), plan review, done and the groom backfill (`backfillIssueLinks`: first in `groomingDigest`, 32 links and 1 s per call, before the slow metadata reads), and stages a done's PR through `Tasks.identityLink`/`withLink` (the link carries the repository and the commit or branch it was read for, and is dropped when the done's effective repository or head changed during the read; the issue is re-resolved at apply time; `reviewRequestAdmission` compares the board copy through the same `stage` projection) (`openPrFor`: the one open PR whose head is the done's full commit, or with no commit its branch; a full 100-row page or a malformed row is unknown). Persist a done's link only in the admitted done update or `done (checking)`, never before a gate that can still throw `PreEffectToolRefusal` (#254); reapply it after every re-read in `complete()`. Write a first link with `linkedReceipt`, never `sdlcReceipt` (its relink rule would drop red-first and local-gate records); never relink an existing or foreign identity, never parse agent text for a PR, skip PII tasks before any read, and run the groom backfill after its authority checks with its own bound.
|
|
@@ -39,7 +39,7 @@ Scope: tests, fakes and the test gate. Read before adding or changing a test or
|
|
|
39
39
|
|
|
40
40
|
- `scripts/check.sh` pins the test environment (#610): `GIT_CONFIG_GLOBAL=/dev/null`, `NO_COLOR` unset, `TERM=xterm-256color`, temp root under the OS per-user temp dir, agent markers cleared. A test that needs a person's git config or color settings sets them itself. `--changed` selects tests with `scripts/changed-tests.mjs`: changed tests (nested suites included) plus every test that names a changed file directly; docs need none; any other changed file no test names, and any gate, package or shared-fixture change, runs everything.
|
|
41
41
|
- `scripts/check.sh` holds the repo's heavy-job slot (`<git common dir>/ahub-heavy.lock`, #398) for the whole run, so a test never runs the real gate; `test/check-lock.test.ts` runs a copy in a scratch repo.
|
|
42
|
-
- The whole-suite watchdog is `scripts/hang-watch.sh PID SECONDS [PROGRESS_FILE QUIET_SECONDS]` (#115, #516). `scripts/check.sh` sends bun's stderr (where it prints results) through a fifo to `scripts/progress-tee.sh FILE`, which forwards every line unchanged and appends one byte to FILE per `(pass)`, `(fail)`, `(skip)` or `(todo)` line and per test file header (under mawk only with `-W interactive`: mawk reads a pipe in blocks, so without it nothing counts until the input ends, #883); the watchdog stops the suite when FILE has not grown for `AHUB_CHECK_QUIET_S` (default 300, set in `.github/workflows/check.yml`, above the 120 s of the longest explicit test timeout). That is the hang detector, so a slow suite that keeps passing tests is never cut, and a test that logs without finishing is not progress. `AHUB_CHECK_HANG_S` (default in `scripts/check.sh`,
|
|
42
|
+
- The whole-suite watchdog is `scripts/hang-watch.sh PID SECONDS [PROGRESS_FILE QUIET_SECONDS]` (#115, #516). `scripts/check.sh` sends bun's stderr (where it prints results) through a fifo to `scripts/progress-tee.sh FILE`, which forwards every line unchanged and appends one byte to FILE per `(pass)`, `(fail)`, `(skip)` or `(todo)` line and per test file header (under mawk only with `-W interactive`: mawk reads a pipe in blocks, so without it nothing counts until the input ends, #883); the watchdog stops the suite when FILE has not grown for `AHUB_CHECK_QUIET_S` (default 300, set in `.github/workflows/check.yml`, above the 120 s of the longest explicit test timeout). That is the hang detector, so a slow suite that keeps passing tests is never cut, and a test that logs without finishing is not progress. `AHUB_CHECK_HANG_S` (default in `scripts/check.sh`, 2700 s since #1564: healthy full runs exceeded the earlier 2250 s backstop while still reporting passing tests; hosted values for both OSes in `.github/workflows/check.yml`; #378, #593) is only the backstop for a run that keeps printing results while hung: raise it, with the job's `timeout-minutes` (room above it for setup), only when a healthy run nears it, never for a hung test, and keep the per-test 20 s timeout. The two-argument form (no file) is the old total-time bound, still used by the CI timing job and `scripts/seeded-check.ts`. A fifo and a filter of its own, never a pipe (`$!` must stay bun's pid) and never a process substitution (it cannot be waited on with a bound); `scripts/progress-tee.sh` is in the `--changed` FULL list. `test/hang-watch.test.ts` covers the watchdog, the filter and the fifo wiring.
|
|
43
43
|
- A seed's named test must run on Linux, where the seeded job runs: a darwin-only test reports no result there and fails the job (#382). Cover a macOS-only protection with its regression test instead.
|
|
44
44
|
|
|
45
45
|
- The `closing-refs` workflow (`.github/workflows/closing-refs.yml`, #760) runs `scripts/check-closing-refs.mjs` (PR number from argv or `PR_NUMBER`) on `opened`, `edited`, `reopened` and `synchronize`: it reads `gh pr view --json closingIssuesReferences,body,title,commits` and fails when GitHub would close an issue the title and body only mention with `Refs`, a negation or a qualifier (`Refs #15. Does not close #15.` and `Refs #15. Partially fixes #15.` fail, `Refs #15.` and `Fixes #15` pass), or when a commit message has a closing keyword, negated or not, for an issue the title and body do not mean (a squash merge carries it). An issue linked only in the sidebar passes. A keyword is meant only when nothing earlier in its sentence (ending at `.`, `!`, `?`, `;` or a line break, never a comma) matches `NEGATION`; widen that list, never narrow it to let a qualified close pass (background: README). `mentioned`, `keywordReferences`, `intentionalCloses`, `closingMisuse` and `commitMisuse` are pure and covered by `test/closing-refs.test.ts` with the real `gh` shape (`repository.name`, `repository.owner.login`); its command test puts a fake `gh` first on `PATH`, never the real one. Run it by hand with `GITHUB_REPOSITORY=<owner/repo> node scripts/check-closing-refs.mjs <number>`.
|
|
@@ -64,4 +64,4 @@ Scope: tests, fakes and the test gate. Read before adding or changing a test or
|
|
|
64
64
|
- A test of `scripts/release-prepare.ts` or `scripts/release-tag.ts` runs the script with its root in a scratch repository whose only remote is a local bare directory: set `AHUB_RELEASE_ROOT` to it, or copy the script into it as `test/release-tag-daemon.test.ts` does. Without that the script takes its root from its own location and fetches and runs `ls-remote` against this checkout's real origin. Consent comes from a fake port, a stand-in `AHUB_CLI` or a scratch daemon, never the person's hub.
|
|
65
65
|
- Production `MemoryClient` (`src/memory/client.ts`) is the in-process amem store and never opens `memory.worker_url` (#752). A test that needs the legacy worker shape injects `FakeMemoryClient` (`test/fakes/mem-worker.ts`) as `DaemonOptions.memoryClient` or in place of the client; never add an HTTP path to the production client for a test. An amem-backed test sets its own temp `AMEM_HOME` and reads only its own fixture memory directory.
|
|
66
66
|
- CLI print guards (#814, `test/cli-json-guard.test.ts`): two scans over every file in `src/cli`. One finds `console.log(JSON.stringify(...))` and passes only behind a `--json` branch (`selectsJson`) or a named `DATA_FORMAT` entry (`NOT_YET_CONVERTED` is empty since #899; keep it empty). The other finds a print of a hub tool's text (`console.log(await taskOp(<op>))`, or a variable bound from one) and passes only behind `--json`, for a named `SENTENCE_OPS` op (checked against the daemon's case), or named debt (`TEXT_DEBT`, `CONDUCTOR_DEBT`, `REFUSAL_FALLBACK`). A list entry with no matching site fails, so the lists only shrink. Add a command's `--json` branch or renderer; never add a list entry to make a new print pass. Per-command output tests (`test/task-output.test.ts`, `test/sdlc-output.test.ts`) run the real CLI against a fake control server and assert default not JSON, `--json` byte equality, 80 and 200 columns and `--color=never`.
|
|
67
|
-
- Hard-coded values inventory (#719, #1180, `scripts/inventory-hardcoded-values.ts --check`, a once-only step of `scripts/check.sh`): a constant or inline literal you add to `src/` or `scripts/` is an inventory entry, and the gate fails until it is classified in `scripts/inventory-hardcoded-values.classifications.json` (`operational`, `safety floor`, `contract` or `test seam`, by the reasons of `docs/verification/2026-10-30-operational-settings-closure.md`). Never add a key to `scripts/inventory-hardcoded-values.baseline.json`: it is the list of keys that were unclassified when the check began and it only shrinks. Classify a baseline key by adding it to the classifications file and deleting it from the baseline in the same commit; the check refuses either half alone. For `src/hub` bounds and truncations, apply the committed conventions and rulings in `docs/verification/2026-11-05-hardcoded-values-classification-rules.md` (#739/#741). Before each batch, run a fresh blind sample of 80 already-decided entries and proceed only at 85% agreement or more. Outside that settled slice, a baseline key needs a calibrated mechanical rule that the committed file agrees with on at least 94% of its decided keys; leave an undecided shape in the baseline pending a ruling, never guess its label. Do not classify keys in bulk from reading the code: a blind pass agreed with the committed file on 58% of a sample, because the file counts hub-internal caps, injected `opts.x ?? N` defaults and script deadlines as operational (`docs/verification/2026-11-05-hardcoded-values-ratchet.md`). A line moved inside a file changes no key; a changed value or name does.
|
|
67
|
+
- Hard-coded values inventory (#719, #1180, `scripts/inventory-hardcoded-values.ts --check`, a once-only step of `scripts/check.sh`): a constant or inline literal you add to `src/` or `scripts/` is an inventory entry, and the gate fails until it is classified in `scripts/inventory-hardcoded-values.classifications.json` (`operational`, `safety floor`, `contract` or `test seam`, by the reasons of `docs/verification/2026-10-30-operational-settings-closure.md`). Never add a key to `scripts/inventory-hardcoded-values.baseline.json`: it is the list of keys that were unclassified when the check began and it only shrinks. Classify a baseline key by adding it to the classifications file and deleting it from the baseline in the same commit; the check refuses either half alone. For `src/hub` bounds and truncations, apply the committed conventions and rulings in `docs/verification/2026-11-05-hardcoded-values-classification-rules.md` (#739/#741). Before each batch, run a fresh blind sample of 80 already-decided entries and proceed only at 85% agreement or more. Outside that settled slice, a baseline key needs a calibrated mechanical rule that the committed file agrees with on at least 94% of its decided keys; leave an undecided shape in the baseline pending a ruling, never guess its label. Do not classify keys in bulk from reading the code: a blind pass agreed with the committed file on 58% of a sample, because the file counts hub-internal caps, injected `opts.x ?? N` defaults and script deadlines as operational (`docs/verification/2026-11-05-hardcoded-values-ratchet.md`). A line moved inside a file changes no key; a changed value or name does. After adding keys to the classifications file, keep it sorted by key in codepoint order (a key appended at the end breaks `test/inventory-hardcoded-values.test.ts`, which `--check` does not catch) and run that test. Seen on hub task 992 (PR #1544) and hub task 991 (PR #1548), 2026-11-17.
|
package/docs/design/adapters.md
CHANGED
|
@@ -11,6 +11,7 @@ paths:
|
|
|
11
11
|
- src/hub/permission-mode.ts
|
|
12
12
|
- src/hub/tool-refusal.ts
|
|
13
13
|
- src/hub/child-process.ts
|
|
14
|
+
- src/hub/turn-attribution.ts
|
|
14
15
|
- src/hub/lifecycle.ts
|
|
15
16
|
- src/hub/start-mode.ts
|
|
16
17
|
- src/hub/terminal-open.ts
|
|
@@ -185,6 +186,8 @@ Permission modes control whether native actions prompt; they do not widen a sand
|
|
|
185
186
|
|
|
186
187
|
When the hub starts a child, the host constructs its environment, binds its launch and generation, and owns its process-group lifecycle. Stop and recovery require current evidence for the process actually started; a PID, adapter label, successful start call, or stale session record is not enough. This keeps teardown from signaling a person's unrelated process and prevents a late native callback from acquiring a replaced session's authority ([#115](https://github.com/STAIxBWLB/agent-hub/issues/115), [#625](https://github.com/STAIxBWLB/agent-hub/issues/625)).
|
|
187
188
|
|
|
189
|
+
Per-turn print children and local/Pi sandbox tools may receive the host's task ID and trigger as environment hints (#1516). A research attempt ID is set only when the host knows the `ra-<12 hex>` identity for that turn; dispatch currently has no persisted attempt link. Missing, invalid, ambiguous or private cloud task context leaves the corresponding value unset. The host removes inherited or configured values before setting its own. These hints confer no identity or authority, and long-lived session environments do not gain per-turn values.
|
|
190
|
+
|
|
188
191
|
Fresh Kimi reviews keep the complete synchronous isolation fence before spawn and
|
|
189
192
|
at verdict/task-MCP authority boundaries. Periodic full checks use one review-owned
|
|
190
193
|
worker with expected paths and fingerprints, no serialized task text or inherited
|
|
@@ -37,6 +37,8 @@ The [design ledger](../specs/2026-09-19-agent-hub-design.md) records history; cu
|
|
|
37
37
|
|
|
38
38
|
`src/hub/daemon.ts` is the project runtime's composition root. It owns the local control service, peer registry, `Bus`, `Tasks`, configuration, policy admission, and recovery coordination. A project has one local daemon and task board; its peers communicate through that daemon. The boundary keeps transport code from becoming a second source of role or recovery authority ([#625](https://github.com/STAIxBWLB/agent-hub/issues/625), [#900](https://github.com/STAIxBWLB/agent-hub/issues/900)).
|
|
39
39
|
|
|
40
|
+
After five consecutive exhausted routine snapshot bursts, the resolved execution worktree skips capture for ten minutes; skipped snapshot, diff, HEAD-move and submodule evidence remains unknown. A stored empty path list paired with a missing tree never establishes that no edits occurred. The next boundary retries and success clears the in-memory streak (#1550 AC3).
|
|
41
|
+
|
|
40
42
|
`PeerAdapter` in [peers.ts](../../src/hub/peers.ts) is the shared native-runtime interface. Fixed adapters translate host lifecycle, messages, permissions, and delivery receipts into it; daemon-owned policy decides what those facts permit. Claude's plugin channel uses MCP over stdio and the authenticated control connection, Codex uses the app-server proxy, and Kimi supports a pull-only TUI by default or explicitly selected headless ACP mode. Keeping protocol translation outside task policy prevents vendor-specific branches there ([#625](https://github.com/STAIxBWLB/agent-hub/issues/625), [#316](https://github.com/STAIxBWLB/agent-hub/issues/316)).
|
|
41
43
|
|
|
42
44
|
External adapter modules are opt-in, pinned at startup, and limited to the accepted headless ACP contract; a module does not gain a generic native lifecycle or sandbox authority. That limit exists because imported code executes in the daemon's trust domain, so source pinning and an explicit capability ceiling are necessary ([#754](https://github.com/STAIxBWLB/agent-hub/issues/754)).
|
package/docs/design/bus.md
CHANGED
|
@@ -329,4 +329,6 @@ privacy and invocation authorization checks still decide whether a send is allow
|
|
|
329
329
|
|
|
330
330
|
The final-answer boundary strips agent-authored `amem:` lines before invocation answer handling, ordinary publication, journaled/shared bodies, digest rendering or console envelope taps. Explicit send tools keep their existing path. Original priority and audience/hop/receipt rules are retained. Stripping runs even when optional capture is disabled or fails. Final dispatch traverses the current `onMessage` observer chain exactly once. A peer/body/options-scoped host marker identifies the final-only raw capture path, is consumed before nested messages and is restored or cleared on exit; no final marker is accepted from a wire envelope. Stale replaced owners cannot route or capture a final answer.
|
|
331
331
|
|
|
332
|
+
The standing delivery instruction tells a peer to end with exactly `[FYI]` when nothing needs its answer and to start progress notes with `[FYI]` (#1550 AC4). A marker-only final has an empty body after parsing, so it sends nothing. The bus does not classify or demote other final answers.
|
|
333
|
+
|
|
332
334
|
The raw-final capture observer is host-only and limited to a complete, currently owned public turn. Private inputs or outputs, review/observer holds, remote inputs/audiences, invocation answers and unknown parents cannot reach it. Count-only observers cannot change routing. The memory owner applies current policy before storage or selection; captured Record rows remain uncurated reference data. A bounded, ephemeral saved-ID/raw-anchor registry can prove display substitution for generated notes, with no persistence or inference from titles or prose. Restart and eviction preserve unproved old content.
|
|
@@ -47,7 +47,7 @@ Each rule has an id, a version, one reason code and one suggested existing actio
|
|
|
47
47
|
|
|
48
48
|
**`repeated_failure` (version 1, reason `repeated_failure`, action `escalate`).** Two equal classified failures inside the current revision, with no clearing evidence between them. A failure is classified into a closed vocabulary: `check:<checkKey>`, `review:changes_requested`, `integration:unresolved`, `done:no-writes`. A code-scope rejection that names no finding (`evidenceOnly`) is not a defect of the work and is not classified. Clearing evidence is a recorded check pass, a landed integration or an approval; each resets the streak. One observation is made per class, so a revision failing two different checks reports both and only the per-revision bound can refuse one. Trigger: `failures:<class>`; refs: the two failure records.
|
|
49
49
|
|
|
50
|
-
**`deliverable_invalidated_check` (version
|
|
50
|
+
**`deliverable_invalidated_check` (version 2, reason `stale_check`, action `recheck`).** The revision recorded a completion check pass or an isolated `check run passed` and delivered at least one record, and the hub's own measurement now reads one of those delivered ids as changed or missing. Trigger: `check:<ids>`; refs: the check record and the stale deliverable ids. A delivered id is the only thing that can be stale: a file the hub measured but that this revision never delivered is not evidence about it. If the hub did not measure the files, the rule cannot decide and reports the gap `no-deliverable-measurement` instead of a clean reading.
|
|
51
51
|
|
|
52
52
|
**`declared_overlap_without_integration` (version 1, reason `unintegrated_overlap`, action `request_integration`).** A declared pair whose both sides have accepted their current revision, with no integration request, landed integration or recorded integration failure after either acceptance, and with neither side closed. Persistence is record-based, never elapsed time. Trigger: `overlap:<low>:<high>`, bound to the pair's lower task id so naming the pair in either direction is the same observation; refs: the other task and both acceptance records.
|
|
53
53
|
|
|
@@ -119,3 +119,15 @@ A role on the task is not the authority to run what the proposal names. Acceptin
|
|
|
119
119
|
## Deliberately outside this contract
|
|
120
120
|
|
|
121
121
|
Automatic pause, retry, cancel, reroute, approval or rollback, any automatic acceptance, any import of an external supervision runtime, and any resident worker or recurring timer. The queue proposes an existing action and runs it only when a present role says so. agent-research#63 builds on the reading and bounds above, not on an acceptance path here.
|
|
122
|
+
|
|
123
|
+
## Observed limits (pilot)
|
|
124
|
+
|
|
125
|
+
The first pilot (2026-11-11 to 2026-11-18 KST, `shadow`, one task, receipt `docs/verification/2026-11-11-supervision-pilot-1221.md`) measured limits that belong to the reading and not to one deployment:
|
|
126
|
+
|
|
127
|
+
- The read page applies before the role filter. On a queue past 50 rows a caller's own rows can be missing from an unfiltered read, and narrowing by task is what recovers them, so a role-scoped total is a lower bound and not a queue count.
|
|
128
|
+
- The refusal counter belongs to a daemon lifetime and names no task, rule or bound. The pilot read 97 refusals in 7 h 24 m on a daemon started that morning and could attribute none of them; a total cannot be summed across restarts either, so a wave-wide figure is unknown rather than the sum of its lifetimes.
|
|
129
|
+
- The overlap rule is asked only while both sides' latest episode is an accepted one. Silence under a partner that is approved, filed, reassigned or closed is unknown coverage, never a clean non-trigger, and the pilot's last four days produced no row for that reason rather than because nothing overlapped.
|
|
130
|
+
- A pair leaves supervision before its integration can be recorded. Nine of the pilot's 18 rows closed within five seconds of a partner's review request (0.56 to 4.9 s), one at this task's idle-sweep reassignment, one when the revision moved, and the rest on the queue's own schedule, and no row named the merge that followed; an integration that lands with the merge is outside this reading.
|
|
131
|
+
- A declared overlap is usually file-level. Every pilot row named a pair that edited something other than the anchor row: one partner inserted 70 to 133 rows above it, another rewrote an existing row 13 to 40 rows away, one changed a different new file in the same directory, and one never touched `docs/dogfood.md` at all. A notice to request integration was therefore true of the plan and not of the work, and a later pilot should expect that rate rather than treat it as a defect.
|
|
132
|
+
- A reassignment closes and re-arms rows. An idle sweep closed three rows in one second and the re-accept wrote three more 338 ms later, so a row's lifetime can track task ownership rather than the condition it names.
|
|
133
|
+
- A rule version bump splits a pilot. `deliverable_invalidated_check` moved to version 2 on 2026-11-19 and every stored row names the version it was made under, so readings taken across a bump are not one measurement.
|
|
@@ -103,6 +103,10 @@ no-write detection. Ordinary shared tools and the local worker can publish where
|
|
|
103
103
|
their role permits; isolated fresh-reviewer MCP keeps its exact two-tool contract.
|
|
104
104
|
|
|
105
105
|
|
|
106
|
+
Isolated check outcomes are distinct text-free task history events; matching-head metrics and deliverable supervision may read them without changing completion-check readers (#1555 AC3).
|
|
107
|
+
|
|
108
|
+
A commit-bound done records the requested review head independent of its cost plan. Historical metrics and research records fall back to the recorded cost head or bound spec-report head on done entries; missing evidence stays unknown (#1555 AC1).
|
|
109
|
+
|
|
106
110
|
`Tasks` mediates task proposals, planning, owner/reviewer changes, acceptance, completion and review. `Board` persists the rows, history and typed evidence in SQLite; transport, CLI and UI layers do not independently apply task transitions. The issue remains the change spec and GitHub remains authority for PR/check/tag facts. Separating these authorities prevents a chat claim or adapter callback from bypassing task policy ([#481](https://github.com/STAIxBWLB/agent-hub/issues/481)).
|
|
107
111
|
|
|
108
112
|
A command is authorized against the current actor, role, task state and revision. An asynchronous operation can lose authority while preparing evidence, so write boundaries recheck current scope. Console actions bind the selected task ID and its observed flow revision, rather than an unstable list position. The reason is to keep an approved action attached to the row and state the person actually saw ([#424](https://github.com/STAIxBWLB/agent-hub/issues/424), [#525](https://github.com/STAIxBWLB/agent-hub/issues/525)).
|
|
@@ -111,12 +115,18 @@ Owner, reviewer and planner are distinct responsibilities. A reservation or offe
|
|
|
111
115
|
|
|
112
116
|
## Selection and admission
|
|
113
117
|
|
|
118
|
+
Cross-project handoff catch-up treats a missing control descriptor or a descriptor whose process identity is proven gone as stopped (#1550 AC2). It does not connect to that target, and reports the stopped state once until the target changes state or the observing daemon restarts. Unknown liveness is not proof of a stop. Descriptor changes still trigger catch-up when a target starts; live handoff delivery keeps its own path.
|
|
119
|
+
|
|
114
120
|
`routing.ts` selects candidates as a pure function over declared policy and current facts. `Tasks` applies admission and writes through the same selection rules used by route explanation. Roster, roles, privacy, availability, capability evidence and WIP remain explicit inputs, which prevents explanations and actual offers from becoming separate policies ([#525](https://github.com/STAIxBWLB/agent-hub/issues/525), [#418](https://github.com/STAIxBWLB/agent-hub/issues/418)).
|
|
115
121
|
|
|
116
122
|
Automatic offer and backlog paths respect `plannedStart`; a future card becomes eligible at its boundary through existing sweep/release passes. Explicit person/planner authority is separate. This avoids offering scheduled work early without taking away deliberate manual control ([#1076](https://github.com/STAIxBWLB/agent-hub/issues/1076)).
|
|
117
123
|
|
|
124
|
+
When opt-in auto-pull is enabled, a reservation or eligibility change, dependency approval, or the reserved peer's first idle attachment can queue the same guarded planner pull as a freed WIP slot. The hub rechecks current policy, capacity, eligibility and planner authority before writing; the planner or person remains responsible for manual backlog pulls (Refs #1547).
|
|
125
|
+
|
|
118
126
|
A bounded wait (#1454) is the owner's way to say an `in_progress` task is legitimately idle until a dated event. It is a `wait recorded` history entry carrying `wait: {until, owner}` and the public reason as its note, written through `Tasks.wait` only (owner, the task's planner or the person; `until` in the future and at most 14 days ahead; the reason screened like any note). It is quiet (`QUIET_EVENTS`), so it moves nothing. `taskWait` (`src/hub/task-sweep.ts`) is the only reader: the wait is in force while the latest `wait recorded` entry names the current owner and no later entry is state-changing, so done, decline, return, reassignment and cancel end it with no extra write. `nextSweep` skips `idle-owner` while `now < until` and measures the ladder from `max(last activity, until)` afterwards; the other three kinds never read it. A wait past its `until` is listed by the planner groom view (`wait-passed`).
|
|
119
127
|
|
|
128
|
+
An open question set asked by the current owner on that task also suspends only `idle-owner` (#1550 AC1). Once all such sets have settled, its ladder starts again from their latest settlement, ignoring earlier idle steps. The sweep reads only the task, asker and timing, not question text. After the question desk prunes the settled row at seven days, the ladder falls back to its own retained history; an idle threshold above seven days is unsupported.
|
|
129
|
+
|
|
120
130
|
Urgent acceptance can reclaim only enough unaccepted, unstarted, non-pinned and non-urgent offers to fit the limit. It does so after other admission checks and immediately before the accept write; if insufficient, it reclaims none. Accepted work is never displaced merely to satisfy a new urgent request, because an offer and an active commitment have different costs ([#1080](https://github.com/STAIxBWLB/agent-hub/issues/1080)).
|
|
121
131
|
|
|
122
132
|
Untouched returns may atomically update `reserved` while moving eligible proposed or accepted work back to Backlog. `Tasks` retains the existing authority, execution-evidence, pin, release and reservation gates, including post-screen rechecks. An explicit reservation patch advances planning revision and records its prior value in the same state/history write, before capacity publication can trigger auto-pull. Clearing it therefore parks the card; omitting fields preserves its planning. Assignment and auto-pull selection remain the existing rules, with no time-based suppression ([#1154](https://github.com/STAIxBWLB/agent-hub/issues/1154)).
|
|
@@ -168,7 +178,9 @@ state transition table is unchanged.
|
|
|
168
178
|
|
|
169
179
|
The state becomes `approved` through Tasks, with the actual actor and the
|
|
170
180
|
`merged outside the hub` history event. Ordinary dependent release runs after
|
|
171
|
-
the saved approval.
|
|
181
|
+
the saved approval. The host stores external merged-PR evidence as `mergeReadback`, separate from `merge` records produced by a guarded merge. A readback has no command exit, cleanup or owner-notice fields; unreadable cost stays absent. Artifact relinks discard both kinds of host evidence. A host-owned five-minute settlement pass reads at most three eligible public approved tasks sequentially, at most once per task every ten minutes and only for 24 hours after approval. Closed PRs stop the schedule; open or unreadable PRs retry within that window. The in-memory schedule is lost on restart.
|
|
182
|
+
|
|
183
|
+
Adoption creates no reviewer verdict, review metric,
|
|
172
184
|
reviewed-head receipt, guarded-merge result, GitHub mutation or branch cleanup.
|
|
173
185
|
A prior withdrawn reviewer approval remains historical and cannot become a
|
|
174
186
|
current reviewer binding through adoption. Historical completion time is the first approval or adoption
|
package/docs/dogfood.md
CHANGED
|
@@ -10,13 +10,19 @@ agent-hub is developed with agent-hub. This page lists every feature, whether it
|
|
|
10
10
|
|
|
11
11
|
| Feature | State here | Measured by |
|
|
12
12
|
| --- | --- | --- |
|
|
13
|
+
| Sandboxed package-manager caches (#1549 T3 partial) | source and isolated macOS fixture coverage; active after release and restart | offline Bun and npm installs use per-command writable caches and leave a temporary home untouched; caller overrides and host-wrapper parity are tested; sandboxed reader-lease identity remains open |
|
|
14
|
+
| External merge cost and scan diagnostics (#1555 AC2) | source and fixture coverage; available here after release and restart | compare observed merged PR cost coverage and per-source unknown scan counts in `ahub sdlc metrics` and `ahub sdlc status` |
|
|
15
|
+
| Quota event sampling (#1555 AC4) | source and fixture coverage; active here after release and restart | compare recorded quota row rate and research-quality gap duration across the upgrade |
|
|
16
|
+
| Routine snapshot cooldown (#1550 AC3) | source and fixture coverage; active here after release and restart | count cooldown-start diagnostics and turn-end events with unknown file evidence; compare boundary latency and verify a retry after ten minutes |
|
|
17
|
+
| Marker-only no-reply guidance (#1550 AC4) | source and fake-agent coverage; available here after release and upgrade | compare status reply hops and queues after upgrade; fake ACP and Codex tests pin marker-only completion |
|
|
13
18
|
| Roadmap milestones (#1479 R1) | source and isolated fixture coverage; not enabled in the installed hub until release/restart | computed public approved/total and cached issue/spec/train counts; unknown evidence stays unknown; private membership is count-only; real control/CLI, CAS, inheritance, privacy and conditional recovery tests |
|
|
14
19
|
| Roadmap bottom-up placement (#1481 R3) | source and fake-`gh`/fake-model coverage; not enabled in the installed hub until release/restart; `import-github` is dry-run by default and is never run with `--apply` against this repository's GitHub in a test | `ahub roadmap unplaced` row counts with `partial`/`unavailable` shown; the share of triage suggestions accepted rather than rejected or dropped as unsupported; a second `import-github --apply` that changes nothing; private tasks only ever counted |
|
|
15
20
|
| Distinguishable sessions and sender provenance (#1036, `session_identity`) | on after release and upgrade: a connection that names a peer id but is not that peer's current session is a distinct `<peer>~<origin>` session that can send and read, holds none of the peer's roles and replaces nobody; the channel plugin binds to its own project; every envelope and attach event records the connection. Nothing is refused to a connection that worked before. The recovery label `session_identity` applies once an unsettled delivery holds a session's message | `grep '"session":true' .agenthub/state/events.jsonl` lists every message a foreign session sent, with its minted id and no path or text; a recipient's header shows `from "claude~<id>"` for it; test/identity-provenance.test.ts (AC1, AC3, AC4, recovery label) and test/identity-channel-project.test.ts (AC2, real plugin against a new and an old hub) hold it. Not authentication: a same-user process can always act as the user |
|
|
16
21
|
| Claude channel attach evidence (#1171) | source and fixture coverage after merge and plugin/daemon upgrade; native Claude push proof remains unverified until a live `ahub claude` session | `ahub status` shows `channel` or `tools-only` with its evidence label; a marker-inheriting non-channel parent remains pull-only and its delivery is read by `hub_inbox` (`test/claude-channel-evidence.test.ts`, `test/daemon.test.ts`); inspect native TUI attaches separately, since fixtures use a synthetic parent row |
|
|
17
22
|
| Accepted channel delivery settlement (#1172) | source and fixture coverage after merge and plugin/daemon upgrade; native channel handling and long-running-session behavior remain unverified | `bus.accepted_settle_ms` defaults to 10 minutes; explicit channel `hub_inbox` metadata shows accepted/held ids and revisions even when a pull is blocked; a timeout becomes `needs_review` without replay; an important/task/review timeout yields one ids-only status notice when the configured conductor feed is on, with `feed: off` remaining an opt-out; daemon and MCP fixtures cover timeout and opt-out; live accepted-to-completed/timeout behavior remains unverified |
|
|
18
|
-
| Cross-project task handoff with state follow-back (#604, `task_handoff`) | on after release and upgrade: `ahub task handoff` and `hub_task_handoff` register work for another registered project that runs agent-hub on this machine as an ownerless proposal on its board; the requesting peer is told each state change as a `kind: task` message. Nothing is queued, and the origin has no authority there | `ahub board --handoffs` lists what this project handed over with the last state each target reported; `ahub board` and `ahub task show` in the target name the origin project and peer; a handoff for a spec issue that already has an open task there is refused with the task ids unless `duplicate_ok` gives a reason, and the receiving conductor can cancel an unaccepted handoff (#1175; the share of refused handoffs and the cancels the person no longer has to run show whether duplicates still reach the board); a handoff the target did not confirm (a timeout, #1203 T1) is reported as `outcome_unknown` with a key and a retry with `--key` files it once, and a follow-back names the target's task (`refs.handoff`) so a local task of the same number cannot drop it (count `outcome_unknown` refusals, and any target task filed twice for one origin: there should be none; from T2 (#733) the origin also asks every 5 minutes and when a target restarts, so a missed notify arrives within a period: compare how long a handoff row stays behind its target (its `updated` against the target's state), and count `changes requested` and `reopened` messages, which used to be silent; from T3 (#734) `ahub task handoff --list` shows each handoff's age and whether its target is reachable, unreachable (with the cause) or moved, `--sync` asks the targets now, a wire-version refusal is `older_target` and an instance mismatch is `mismatch` instead of "not running", and
|
|
23
|
+
| Cross-project task handoff with state follow-back (#604, `task_handoff`) | on after release and upgrade: `ahub task handoff` and `hub_task_handoff` register work for another registered project that runs agent-hub on this machine as an ownerless proposal on its board; the requesting peer is told each state change as a `kind: task` message. Nothing is queued, and the origin has no authority there | `ahub board --handoffs` lists what this project handed over with the last state each target reported; `ahub board` and `ahub task show` in the target name the origin project and peer; a handoff for a spec issue that already has an open task there is refused with the task ids unless `duplicate_ok` gives a reason, and the receiving conductor can cancel an unaccepted handoff (#1175; the share of refused handoffs and the cancels the person no longer has to run show whether duplicates still reach the board); a handoff the target did not confirm (a timeout, #1203 T1) is reported as `outcome_unknown` with a key and a retry with `--key` files it once, and a follow-back names the target's task (`refs.handoff`) so a local task of the same number cannot drop it (count `outcome_unknown` refusals, and any target task filed twice for one origin: there should be none; from T2 (#733) the origin also asks every 5 minutes and when a target restarts, so a missed notify arrives within a period: compare how long a handoff row stays behind its target (its `updated` against the target's state), and count `changes requested` and `reopened` messages, which used to be silent; from T3 (#734) `ahub task handoff --list` shows each handoff's age and whether its target is reachable, unreachable (with the cause) or moved, `--sync` asks the targets now, a wire-version refusal is `older_target` and an instance mismatch is `mismatch` instead of "not running", and failed notifications or other catch-up failures log one line per target and cause per 15 minutes; a proven-stopped target logs once per state change (#1550 AC2): count the `handoff catch-up of ... failed` and `... skipped` lines in `hub.log` by cause, how often `--list` shows a target unreachable or moved for more than a day, and whether `--sync` is ever needed after a restart (it should not be: the catch-up reads the state within a period); T1 and T2 and T3 of #1203 are now all built; test/handoff-daemon.test.ts runs two real daemons (AC1 to AC5, #1175, the recovery label and #1203 T1 AC1 and AC4, T2 AC2, AC3 and AC5, T3 AC6 and AC7), test/handoff-core.test.ts and test/handoff-board.test.ts hold the pure core and the tables |
|
|
19
24
|
| Staged project upgrades (#1039) | off: available for the person to upgrade projects independently; this development hub is not upgraded by a fixture | test/published-protocol-compat.test.ts uses both the published 0.25.0 protocol-floor and release N-1 (pinned in `PUBLISHED_FIXTURES`) clients/plugins and reverse daemons; test/staged-upgrade.test.ts checks independent holds and scoped effects; test/staged-runtime-daemon.test.ts checks a real release-root daemon after mutable install removal; test/board-schema-guard.test.ts checks named pre-effect refusal and WAL metadata; `test/project-runtime.test.ts` and `test/project-runtime-lifecycle.test.ts` cover updated resolver retention/refusal and real lifecycle/dashboard routing with synthetic captured daemons; `test/runtime-capture-prune.test.ts` covers references, bounded retention and publication races; `test/upgrade-stopped-project.test.ts` verifies no preservation for stopped projects. These fixtures do not prove published pre-0.26 CLI behavior |
|
|
25
|
+
| Stopped-project runtime retarget (#1540): `ahub upgrade [--all-stopped] --to <v>` | source and fixture coverage, active after release; this development hub is not upgraded by it, and a real `ahub up` of a retargeted project is not run here | `test/upgrade-stopped-retarget.test.ts`: dry-run rows (retarget, current, running, refused), the verified `runtime.json` rewrite with no daemon, terminal, peer or recovery operation, the start-between-plan-and-write refusals, one staging for the batch and a nonzero exit on a failed retarget; `--yes` waits through a pipe for the recovery operation (AC10) |
|
|
20
26
|
| Approval head binding and re-review (#1047, #1121) | source/fixture coverage; the #1121 stale-head protections and actionable refusals await release and upgrade; live re-file verification not run | `test/review-head-binding.test.ts` covers both-head refusals, moved-PR commitless re-files and omitted-head stale approvals; `test/task-review-refile.test.ts` covers owner re-submit, reviewer withdrawal, legacy verdict heads, merged/cancelled refusals and held-screen races; `test/sdlc-queue.test.ts` and `test/sdlc-merge.test.ts` reject stale approval at queue and dispatch. `ahub task show <id> --json` exposes `approval.head`, `latestHead`, `mismatch` and `current`; verdict history retains `reviewedHead` |
|
|
21
27
|
| Default agent set started by `ahub up` (#608, `start.agents`) | off here: this repository's agents are started by their own terminals; it is a machine-local setting and a committed config cannot turn it on. On for a person who runs `ahub setup` and `ahub up` on a project that lists agents. | each `ahub up` prints one line per agent (started, already attached, or the refusal with the manual command); the `peer_start` replies in `hub.log` and the terminal provider's recorded starts show whether a listed agent attached, and `ahub status` shows its state after |
|
|
22
28
|
| `ahub down` (counterpart of `ahub up`) | on: an alias of `ahub kill` for stopping this project's hub | the person stops the hub with `ahub down` and `ahub status` then reports it stopped; test/identity.test.ts keeps it person-only (`console`) and labelled `down`, and test/help.test.ts holds its help entry |
|
|
@@ -68,6 +74,7 @@ agent-hub is developed with agent-hub. This page lists every feature, whether it
|
|
|
68
74
|
| Named CI and build-entry diagnostics (#1328 T2) | Source and fixture coverage; installed runtime adoption here is unverified | `test/required-check-blockers.test.ts` and `test/task-entry-blockers.test.ts`: named status checks, ordered actor/command guidance, pure routing parity, real eligibility and private projection |
|
|
69
75
|
| Repository required checks at init (#1328 T1) | This repository retains its native CI floor; discovery and empty enforce refusal run in isolated fixtures, never against the working configuration | `test/init-required-checks.test.ts`, init prompt/settings suites and settings read tests measure discovered names, bounded reads, zero-write refusal and running/file values |
|
|
70
76
|
| Planner pull routing diagnostics (#1430) | source and isolated fixtures; no live planner pull performed for validation | unreserved refusals retain each owner routing reason alongside WIP/hold detail, omit task text, and name hub_backlog_plan fields.reserved then pull again; backlog assignment gives the same next step |
|
|
77
|
+
| Ready reserved backlog auto-pull (#1547) | source and fixture coverage; active here after release when `tasks.auto_pull` is enabled | backlog planning, dependency approval and peer attachment pull a ready reservation only with available WIP; board history records the planner and auto-pull reason |
|
|
71
78
|
| GSD migration guidance (#1431) | isolated init fixtures; this repository has no live GSD migration | advise/enforce init adds one pointer only for GSD frontmatter; no-marker output is byte-identical and .planning artifacts retain their bytes and modification times; docs command forms match help |
|
|
72
79
|
| Instructed conductor SDLC configuration (#1432) | off until a direct person instruction in the current conductor's own session; no live migration performed | `ahub sdlc configure` intent/result events record the actor and changed paths; measure saved off/advise/check-list edits, refusal reasons and pending restarts. Scoped host/control/CLI fixtures cover loader, audit, privacy, role/session and enforce boundaries; init and generic settings remain person-only |
|
|
73
80
|
| Project autonomy preset (#999 T1) | off on this repository until released and explicitly enabled by the person; project scope only | focused person-only, retained-consent, metadata-independent off and authenticated/fallback preset undo tests; the preset writes `action_policy.floor` (#999 T3) and off removes it; status leads with a peer table separating current modes from desired defaults, groups identical floor verdicts and unknowns once with peer lists (#1137), and reads each floor class from the host verdict (`floorEnforcement`), naming the unverified guard where the hub does not see the call first; the Orca zero-prompt native task remains T4 |
|
|
@@ -75,6 +82,7 @@ agent-hub is developed with agent-hub. This page lists every feature, whether it
|
|
|
75
82
|
| Model-free compat receipt harness (#1248 T1) | disposable-runner command after merge; local personal Mac refused, automation off pending T2, native candidate qualification unverified | fake-only pass/fail/model-not-run and leg/total deadlines, SRI-before-effects and archive refusal tests; JSON/Markdown artifacts, scoped owned stop and lifetime cleanup reported unproven; detached-helper and output-parent-swap regressions; promoted Kimi/Qwen native producers have fake protocol coverage; reconstructed Jcode has an actual 0.99.1 Linux control with four native legs passing and telemetry/context binding failing, without a qualification or trust change |
|
|
76
83
|
| Automated compatibility receipts (#1248 T2) | after merge: daily watch and hosted isolated harness; manual dry mode is the default; no personal Mac candidate install or model/account leg | structured candidate/verified IDs, per-leg artifacts, validated read-only bundle preparation, zero-write dry plans, exact-row bot PRs and explicit check dispatch; failed/not-run rows stay visible and stale verified rows clear; no auto-merge |
|
|
77
84
|
| Compat producer gaps (#1248 hub task 978) | the daily hosted run on macOS arm64, no account, key or model | pi has a committed producer: its nine legs pass on the published 1.5.2 (npm install, real CLI and SDK), with tests for each leg's failure; kimi-review's three native legs now pass on the verified 2.5.1 and on 2.6.2 (they failed on both: the CLI's startup update check hit the network and the empty-network assertion rightly refused it); a manifest test fails an `autoAdmit` id with no producer branch. The metric is the first `compat/<id>-<version>` PR opened by the workflow; kimi-review and qwen stay not-run on a human source-review leg by design |
|
|
85
|
+
| Live memory sync interval (#1543) | available after release and upgrade; person controls the interval | compare `ahub status` sync availability and the time of subsequent passes after changing the setting, with no restart |
|
|
78
86
|
| Read-time memory code neighbours (#684 phase 4) | off until released; dashboard toggle is opt-in | derived call edges with current SHA; attached fail/decision brief coverage; explicit unknown/truncated results; unchanged authoritative memory log bytes |
|
|
79
87
|
| Canonical memory symbol anchors (#684 phase 3) | off until released; optional `doctor --stale-anchors` report only | actual-symbol completion anchors versus plan guesses; symbol-related earlier notes at memory hop two; stale/unknown/truncated report counts; zero note mutations during inspection |
|
|
80
88
|
| Symbol preparation and historical recall (#684 phase 3 follow-ups) | off until release | exists calls per no-reviewer completion; raw-signature fail recall; indexed-definition/unknown labels; unchanged note/candidate bytes and neutral cleanup failures |
|
|
@@ -122,7 +130,7 @@ agent-hub is developed with agent-hub. This page lists every feature, whether it
|
|
|
122
130
|
| Planner board-changed notice (#758) | on here, with the lifecycle in `advise`: `claude` is the planner, so a card another peer proposes or re-plans reaches it once at task weight, and its own writes, state moves, reviews and assignments cost it no turn | per planner and week: `task`-kind hub envelopes whose body starts `The board changed` (target: one per planning change, none after the planner's own write), the same envelopes at `fyi` priority (recorded, no turn: at most one per 10 minutes), and the count still queued at once (target: at most one). Read from `ahub logs` and the event log; the 12 copies in 44 minutes seen on 2026-10-24 are the baseline |
|
|
123
131
|
| Planner capacity and dependency notices (#785 P1a) | source/fixture coverage; active after release and hub upgrade | write-triggered `capacity_released` and `backlog_ready` lines in `Planner work ready:` task envelopes; at most one queued envelope per effective planner, peer/WIP/card ids only; no automatic pull |
|
|
124
132
|
| Release preparation and guarded tag (#787 P3b) | scratch-repo fixtures with a local bare remote; the real history was dry-run in a disposable clone; release branches are prepared with it, and since #1273 it also renders the generated README facts blocks | `scripts/release-prepare.ts` run on a `release/<version>` branch and a release PR that carries the version, CHANGELOG, report and stamps; `scripts/release-tag.ts` refusing without the person's consent and pushing one tag after it; native version-named receipts retained while dated release reports are excluded (#1004 fixture) |
|
|
125
|
-
| Opt-in auto pull (#785 P1c) | source/fixture coverage and a real daemon test; off by default, active only where a person sets `tasks.auto_pull` in `config.local.json` | `backlog pulled` history entries with `by: hub` and an `auto_pull:` note; at most one per
|
|
133
|
+
| Opt-in auto pull (#785 P1c) | source/fixture coverage and a real daemon test; off by default, active only where a person sets `tasks.auto_pull` in `config.local.json` | `backlog pulled` history entries with `by: hub` and an `auto_pull:` note; at most one per trigger and peer; no pull with the setting off, for unreserved, PII, pinned, frozen or dependency-blocked cards |
|
|
126
134
|
| Opt-in assignment queue backpressure (#800) | off by default; this change enables no live repository policy | `ahub route explain` and status queue-count/age/unknown reasons beside WIP; bounded summary reads, held-offer release, post-await offline/not-attached origin retention with plan-policy handoff, and role-scoped override regressions; no delivery disposition or routing-template change |
|
|
127
135
|
| Per-head CI watcher and `ci_completed` (#785 P1b, #1490 AC5) | source/fixture coverage with a fake gh; active after release and hub upgrade | one `ci_completed:` task notice per head to owner and reviewer, a premature review re-offered once green; watchers started per `hub_task_done` head and gone at the result, deadline, newer head, verdict or shutdown; cancelled checks and the intentionally deferred macOS check on a draft PR stay pending, as does its older failure when a newer same-workflow macOS shard is queued or running; same-name rows collapse to a newest run only when workflow and start time make the ordering unique, otherwise duplicate evidence stays; `test/ci-watch.test.ts` covers the ready-run window and genuine failure; no gh read outside a watcher |
|
|
128
136
|
| Plan conformance (#481 S2, #1403 T6) | advise | PRs with files outside the plan or under exclusions; accept base-to-local remote-tracking default tip (no task head needed); done base-to-unique merge-base of recorded task head/default tip, excluding own commits. Real temp Git graphs cover upstream/own/integrated/unrelated/shallow/ambiguous/missing refs and changed/none/unknown advice; default tip rechecked, no fetch or checkout-HEAD substitution, no live drift receipt yet |
|
|
@@ -140,13 +148,14 @@ agent-hub is developed with agent-hub. This page lists every feature, whether it
|
|
|
140
148
|
| Kimi periodic review isolation (#1284) | source and isolated fixture coverage; running-hub/native-account behavior is unchanged until release and restart | max-input benchmark records historical inline blocking and worker control-response ordering separately from synchronous authority cost; fake-clock absolute cadence/no-overlap, complete filesystem tamper checks, source and plugin-only workers, and native/worker cleanup retry tests; no new native compatibility or model-quality claim |
|
|
141
149
|
| Completion checks per class | off: the implementer already runs `scripts/check.sh`; a hub-run copy would double the heavy-slot use | time to verdict when on |
|
|
142
150
|
| Supervision rules and proposals (#1221 T1, T2) | off here: `supervision.mode` is machine-local and defaults to off, so this project's board is not evaluated; with `shadow` a reading only fills a bounded queue, and with `advisory` a pending proposal appears in the console inbox where an explicit accept runs one existing action | the rule fixtures (19, including the exported snapshot shape, the evaluated coverage and its bound, about 0.2 s on one Mac, Bun 1.4.4) plus the queue and decision fixtures: `bun test test/supervision-rules.test.ts test/supervision-proposals.test.ts test/acon-supervision-inbox-1221.test.ts`, which cover the per-rule triggers and gaps, the zero-effect counts, dedupe by rule/task/revision/trigger, the 100/3/400/50 bounds with the refused total, every decision fence including the action's own authority before and after the facts read, the separate intent and receipt, the unknown outcome reconciled from the board's own record at the intent time and inside the proposal's revision, restart, and the advisory inbox row with its two verbs |
|
|
151
|
+
| Supervision pilot (#1221 T3, AC5) | shadow only, on one task for one week: 18 proposals, all one rule, all file-level or directory-level overlaps, every one expired and none classified; no advisory step and no action run; running cost unmeasured | `hub_supervision_list` on the piloted task, with the receipt's reading ledger and per-lifetime refusal counter: `docs/verification/2026-11-11-supervision-pilot-1221.md` |
|
|
143
152
|
|
|
144
153
|
## Memory and knowledge
|
|
145
154
|
|
|
146
155
|
| Feature | State here | Measured by |
|
|
147
156
|
| --- | --- | --- |
|
|
148
157
|
| amem runtime integration (agent-mem#13 P4) | on after release; no claude-mem worker dependency; 0.27.1 search grouping and agent-shell attribution are fixture-tested, live rollout unverified | no-worker tripwire requests (must be 0), screened capture rows, profile refusals, all-author short-term recall, bounded-view truncation notices and curated-only ask citations; `test/memory-grouping.test.ts` checks grouped and ungrouped CLI search and the unchanged daemon tool; `test/memory-agent-shell.test.ts` reads agent-attributed writes and checks person-only refusals |
|
|
149
|
-
| Shared memory through amem, briefs, recall preface | on; library intent briefs and plan guard (#436) take effect after release and hub upgrade; legacy index/timeline reads and worker notices retire in intent mode | notes saved per week, brief hits, fails that prevented a retry; the session preface's bytes and memory lines per session and how many were reordered by observed use (`preface` events, `events.preface` in `quality.json`, #1330; the cited share is the existing per-task `memory` block's `cited` over `rendered`, which covers briefs and prefaces together, not a preface-only per-session share); same-input hub/library brief equality, host privacy refusals and front-of-brief plan fails despite the library byte cap or standalone screen |
|
|
158
|
+
| Shared memory through amem, briefs, recall preface | on; library intent briefs and plan guard (#436) take effect after release and hub upgrade; legacy index/timeline reads and worker notices retire in intent mode | notes saved per week, brief hits, fails that prevented a retry; the session preface's bytes and memory lines per session and how many were reordered by observed use (`preface` events, `events.preface` in `quality.json`, #1330; the cited share is the existing per-task `memory` block's `cited` over `rendered`, which covers briefs and prefaces together, not a preface-only per-session share); same-input hub/library brief equality, host privacy refusals and front-of-brief plan fails despite the library byte cap or standalone screen; synthetic scan-limit loop delay and bounded host-state checks (#1545) |
|
|
150
159
|
| `ahub ask` | on | answers with cited ids |
|
|
151
160
|
| Source registry, `ahub source add\|list` (#508 AC1, AC2, AC5 CLI) | on after release; local (no daemon needed for the person); `add` is the person's or the configured conductor's (#933, admitted and audited by the hub); `hub_source_read` adds bounded, screened snapshots and private stubs; plan sources are registry-validated on proposal/acceptance, and the dashboard Plan sheet lists allowlisted source metadata (#1144) | `ahub source list` rows (id, size, private, origins); `sources/` under the hub state dir; a refusal in the CLI audit for an agent shell; unknown-plan-source refusals and metadata-only dashboard snapshot tests (#1144) |
|
|
152
161
|
| Intake drafts, `ahub intake` (#511 AC1 CLI, AC2 to AC4) | on after release; person-only except `approve`, which the configured conductor may run too (#933); a draft is held until `ahub intake approve`, so nothing changes for work that does not use it; the dashboard Plan sheet stages the same held drafts and refuses delegated live-test intake (#1144) | drafts opened, approved and discarded in `ahub backlog list` and the board history (`draft approved`, `intake unsplit` with its reason); the share of drafts the planner or hub model split without a reason on file |
|
|
@@ -181,6 +190,7 @@ agent-hub is developed with agent-hub. This page lists every feature, whether it
|
|
|
181
190
|
| Pi/local read-only shell class (#816 T1) | source/fixture coverage; person setting and live Pi receipt (AC4) remain unverified | automatic read-only class versus approval requests, parser/allowlist/proof revalidation tests, unchanged Seatbelt/path-guard byte checks |
|
|
182
191
|
| Pi bounded continuations, defaults, failure classes, task-move delivery and focused-check preparation (#1447 T1/T2/T3/T4/T5) | source/fake coverage only until release and upgrade; the person-run implement-task leg stays unverified | fake Pi ceiling continuations delivered, exhausted `step_limit` moves versus `inference_failed`, class-only private diagnostics, and `needs_review` for unsettled/concurrently cancelled tools; Pi default/repository max_steps 100, local 30, and fake-extension rejection at attempt 101/100; late important notices ahead of chat in the actual escalation prompt, durable/volatile receipt preservation and former-owner done/checkpoint refusals; host-busy/provider-prompt window remains open and unmeasured; reviewed-base/cache preparation, fixed failure guidance and offline fixture TypeScript; macOS network-disabled TypeScript fixture passed; localhost listeners moved to a follow-up, and the account-backed Pi leg remains unverified |
|
|
183
192
|
| Pi and the local worker on DGX | off: DGX unreachable recently; Pi is off the roster | turns served on-prem, relay errors |
|
|
193
|
+
| Per-turn child attribution (#1516) | source and fake-child coverage; active after release and restart; native Pi and local sandbox legs require macOS | `test/turn-attribution.test.ts`, implementer and reviewer child fixtures, local sandbox context and Pi tool sandbox tests check IDs, triggers, private cloud withholding and inherited-value stripping; no model or account required |
|
|
184
194
|
| Pi native version gate (#843 AC2) | source/fixture and isolated model-free 1.4.0 receipt; active after release and hub upgrade, Pi stays off this repository's roster | `ahub agents` pi verdict, one version probe on each real launch, rejected versions naming the exact trust command; account-backed inference remains unverified |
|
|
185
195
|
| Local agent CLI drift notice (#843 AC3) | source/fixture and injected-probe daemon test; active on this repository after release and hub upgrade | one planner notice per (id, version), the `agent CLI drift` line in `ahub status`, no repeat after a hub restart |
|
|
186
196
|
| PII routing | on | PII tasks and where they ran |
|
package/docs/events.md
CHANGED
|
@@ -33,7 +33,7 @@ marked `private: true`, and PII tasks `pii: true`.
|
|
|
33
33
|
| `native_turn_end` | `peer`, `id` (an opaque hash that names the completed turn): the end of a Claude turn, recorded once the hub finds the turn its Stop hook reported completed in the native transcript (Codex's is its `turn_end`), or the correlated final `turn.ended` of a Kimi TUI turn (#1282), or an agy terminal `Stop` of an active, fully idle turn, which carries no `id` and a closed `reason` (`user_canceled`, `error`, `max_invocations`, `max_forced_invocations`, `max_token_budget_exceeded`, `terminal_step_type`, `terminal_custom_hook`; #1280); quiescence evidence for an integration, never a hook payload, prompt or error |
|
|
34
34
|
| `supervision_turn` | `peer`, `turn` (the hub turn a supervision notice was delivered into, or `supervision-<uuid>` when none was open), `tokens` (when the adapter reported any for it), `ms` (from that turn's start, or from the delivery when none was open, to its native end): a completed native turn that received supervision, which `ahub report` counts; a failed delivery or turn, a peer that went offline or a changed native session records none |
|
|
35
35
|
| `conduct` | `peer` (the conductor, or `user` when the console releases a conductor hold), `action`, `task` (when the action names or creates one), `target` (the peer an assignment, start, hold or release names): one action of the conductor that ran, the structured twin of the console's `conductor` notice. `action` is a tool name without its `hub_` prefix: a conductor tool (`status`, `task_show`, `task_assign`, `task_escalate`, `peer_start`, `peer_hold`, `peer_release`), or one of the conductor peer's own task tools, which are not conductor tools (`task_propose`, `task_accept`, `task_decline`, `task_done`, `review`, `checkpoint`, `remember`). The role-free reads and redirects (a task's owner or reviewer with `hub_task_show`, its proposer with `hub_task_assign`) record none, and neither does `hub_task_list` |
|
|
36
|
-
| `agent_cli` | `peer` (`unknown` when the agent markers were invalid), `command` (the command and, where it has one, its subcommand, from a closed list; `unknown` otherwise; never an argument), `refused` (the CLI refused it before connecting: a human-only command, or an invalid identity; a
|
|
36
|
+
| `agent_cli` | `peer` (`unknown` when the agent markers were invalid), `command` (the command and, where it has one, its subcommand, from a closed list; `unknown` otherwise; never an argument), `refused` (the CLI refused it before connecting: a human-only command, or an invalid identity; the daemon also writes this event for a conductor operation it admits or refuses on authority; for any other task command the CLI adds a second record with `refused: true` beside the up-front one only when the daemon's reply carries `authorityRefused: true`, which the daemon sets only for conductor operations, so any other failed task command, an unknown task or a role refusal by the hub included, adds none, #1547), optional `delegated: true` or `instructed: true` for the corresponding audited authority path: an `ahub` command run from an agent session. The hub reads these from the `cli-audit/` outbox, so `at` is when it read the record. From #1278 it also carries `task` and `attribution` (the `turn_end` rule) when the record is drained within 15 s of the command; an older record is `unattributed`, never matched to the task open at drain time |
|
|
37
37
|
| `hook_stats` | `peer`, `n` (facts hook calls in the turn, its Stop included), `startupMs` and `maxStartupMs` (the hook processes' start-up and connect time, summed and the largest), `hubMs` (the hub's own time for them): at Claude's Stop (issue #108) |
|
|
38
38
|
| `cohort` | `id`, `event` (`formed`, `joined`, `lifted`), `silent`, `tasks`, `owners`: owners of overlapping tasks formed a cohort, it changed membership, or it stopped being silent (issue #107). Recorded in every regime; only a turn-free project's cohorts can be silent |
|
|
39
39
|
| `split` | `task`, `where` (`routing`: routing chose the first owner of a task overlapping another owner's task not started yet, not an escalation, relay or reassignment, the record calibration reads; `cohort`: an overlap formed or changed a cohort), `verdict` (`split`, `single`, `unknown`), `single` (the peer that would finish both units alone soonest), `splitS`, `singleS`, `reason` (for `unknown`), `trace` (the inputs and steps: peer names, their profiles of versions and coordination, and numbers only): a shadow split prediction; it never changes the assignment (issue #109) |
|
|
@@ -55,7 +55,7 @@ marked `private: true`, and PII tasks `pii: true`.
|
|
|
55
55
|
| `pii_screen` | `task` (absent for a budget hand-off or a note not about a task), `item` (`task`, `summary`, `review note`, `handoff`, `note`), `label` (`pii`, `clear`), `source` (`regex`: a pattern matched and no call was made; `screen`; `unknown`: no verdict, handled as PII), `category` (`name`, `student_id`, `phone`, `address`, `grade`, `health`, `other`), `miss` (why there was no verdict: `too long`, `off campus`, `timeout`, `unreadable`, `failed`), `ms` (absent for `regex`): one PII screen verdict while `signals.pii_screen = "local"` (issue #198); never the text |
|
|
56
56
|
| `checkpoint` | `peer`, `reason` (`quota`, `context`), `fields` (the names, from `done`, `in_progress`, `next`, `verified_by`, `traps`, of the structured fields the saved checkpoint carried; an empty list for a summary-only one): one per `hub_checkpoint` the hub accepted (#1331). Never the checkpoint text. |
|
|
57
57
|
| `context_pressure` | `peer`, `source` (`claude_statusline`, `codex_token_usage`, `acp_usage_update`), `measuredAt` (epoch ms of the reading), `used` (the fraction of the context window in use, 0 to 1), `window` (its size in tokens, or null): a fresh reading of a peer's native context reached `context.gate`. Recorded once per crossing, until a reading below the gate or a new native session rearms it, and not while the peer is paused or offline or the hub is in recovery or stopping |
|
|
58
|
-
| `quota` | `peer`, `windows` (`id`, `used`, `resetsAt`), `hard`, `measuredAt` (when the reading was taken
|
|
58
|
+
| `quota` | `peer`, `windows` (`id`, `used`, `resetsAt`), `hard`, `measuredAt` (when the reading was taken; older rows omit it when the reading was current) |
|
|
59
59
|
| `budget_pause` | `peer` (the account), `reason` (the coordinator's own text: window id, percent and source), `window` (`5h`, `week`, `tokens` or `unknown`), `resetsAt` (epoch ms), `by` (`hub`). Written where the pause record is written (#683). |
|
|
60
60
|
| `budget_resume` | the same fields; `reason` says why it ended and `by` is `hub` (the window reset, or usage fell back under the gate) or `person` (an `ahub budget resume` override). A pause replaced by a new one after its window reset gets a `budget_resume` first (reason `replaced by a new pause after its window reset`). `ahub reset` clears pauses without writing one, because it keeps `events.jsonl` untouched. |
|
|
61
61
|
| `quota_reset` | `peer`, `window`, `cause` (`resets_at_moved`: the window's `resetsAt` moved forward by more than 15 minutes, since a provider's `resetsAt` wobbles by seconds inside one window; `used_dropped`: `used` fell by 0.5 or more inside one window id), `resetsAt`, `previousResetsAt`, `used`, `previousUsed`, optional `measuredAt`. Derived from two readings, one entry per peer, window and `resetsAt`, also across a restart. |
|
|
@@ -203,3 +203,5 @@ per-model-step tool observations, and Claude contributes tool inputs from turn-f
|
|
|
203
203
|
a native turn id. Missing peers or intervals therefore mean unobserved, not zero activity. Escalation uses only known
|
|
204
204
|
native turn ids; observations without one still contribute progress dimensions but cannot establish separate attempts
|
|
205
205
|
or the eight-turn spinning threshold.
|
|
206
|
+
|
|
207
|
+
Quota rows record the first reading, material changes and a 15-minute heartbeat; pending last readings are flushed before a long silence or clean shutdown. `ahub report` counts recorded quota rows and hard rows, not provider polls. JSON retains `quota.readings` and `quota.hard`.
|