@staix/agent-hub 0.48.4 → 0.49.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +1 -1
  3. package/docs/agent-notes/daemon.md +2 -2
  4. package/docs/agent-notes/tasks.md +1 -1
  5. package/docs/design/adapters.md +4 -7
  6. package/docs/design/agent-hub-architecture.md +1 -1
  7. package/docs/design/agent-hub.md +1 -1
  8. package/docs/design/bus.md +2 -2
  9. package/docs/design/cli-output-inventory.md +39 -38
  10. package/docs/design/cli-output.md +7 -3
  11. package/docs/design/guidance-experiments.md +3 -1
  12. package/docs/design/guidance-probes.md +33 -31
  13. package/docs/design/model-routes.md +11 -14
  14. package/docs/design/roadmap.md +10 -9
  15. package/docs/design/supervision.md +6 -6
  16. package/docs/design/task-board.md +2 -2
  17. package/docs/dogfood.md +1 -1
  18. package/docs/operations.md +12 -7
  19. package/docs/quickstart.md +13 -1
  20. package/docs/roadmap.json +519 -1
  21. package/docs/roadmap.md +94 -0
  22. package/docs/security.md +3 -1
  23. package/docs/verification/2026-11-26-compat-pi-1.6.1.md +28 -0
  24. package/docs/verification/2026-11-28-0.49.0.md +53 -0
  25. package/docs/verified.json +19 -19
  26. package/package.json +1 -1
  27. package/plugins/agent-hub/.claude-plugin/plugin.json +1 -1
  28. package/plugins/agent-hub/kimi-hook.js +29 -4
  29. package/plugins/agent-hub/server.js +34 -5
  30. package/src/adapters/channel-peer.ts +5 -2
  31. package/src/adapters/claude-channel.ts +1 -0
  32. package/src/adapters/compat.ts +4 -4
  33. package/src/adapters/definitions/native-cli-entry-claude.ts +22 -1
  34. package/src/cli/agents-output.ts +13 -0
  35. package/src/cli/agents.ts +16 -7
  36. package/src/cli/answer-output.ts +67 -0
  37. package/src/cli/broker.ts +9 -2
  38. package/src/cli/launch.ts +1 -1
  39. package/src/cli/main.ts +96 -127
  40. package/src/cli/recovery-package.ts +78 -26
  41. package/src/cli/reset-output.ts +50 -0
  42. package/src/cli/sdlc-output.ts +57 -0
  43. package/src/cli/settings-output.ts +80 -0
  44. package/src/hub/check-runner.ts +7 -3
  45. package/src/hub/claude-launch-proof.ts +12 -2
  46. package/src/hub/claude-state.ts +3 -0
  47. package/src/hub/control-client.ts +2 -0
  48. package/src/hub/daemon.ts +102 -40
  49. package/src/hub/roadmap-export.ts +12 -9
  50. package/src/hub/roadmap-issue-states.ts +35 -0
  51. package/src/hub/runtime-capture-prune.ts +21 -6
  52. package/src/hub/runtime-package-assets.ts +6 -0
  53. package/src/hub/supervision-proposals.ts +3 -3
  54. package/src/hub/supervision-rules.ts +2 -2
  55. package/src/hub/task-sweep.ts +1 -1
  56. package/src/hub/tasks.ts +37 -20
@@ -68,9 +68,9 @@ behavior, configuration grammar or generic decision-evidence v1 payload.
68
68
 
69
69
  | Question | Owner | R1 status |
70
70
  | --- | --- | --- |
71
- | Which eligible model and reasoning effort should serve a stage or plan/execute request? | adec's configured policy, candidate constraints, pins and decider | Existing optional consumer for `decision`; S2 asks the stage question only inside the ambiguity band (below); plan/execute choice stays future |
72
- | Which model/effort should serve an optional judge choice? | adec where separately configured, with an in-house fallback | R2 question design and wiring; no R1 judge request |
73
- | Whether to escalate, request an advisor review, or issue redo feedback | Hub route policy | Preserve the caller boundary; implementation replacement belongs to R2 |
71
+ | Which eligible model and reasoning effort should serve a stage or plan/execute request? | adec's configured policy, candidate constraints, pins and decider | Optional `decision` consumer. Stage choice runs inside the ambiguity band. R2 can ask the phase-model question for plan/execute |
72
+ | Which model/effort should serve an optional judge choice? | adec where separately configured, with an in-house fallback | R2 supplies the optional judge request |
73
+ | Whether to escalate, request an advisor review, or issue redo feedback | Hub route policy | The owned R2 host policy preserves the caller boundary |
74
74
  | Whether a task is PII and which peer receives it | PII screen and pure `assign()` | Outside model-choice routing; no adec delegation |
75
75
  | Which deterministic tier remains when no applicable service choice is applied? | Hub fallback | R1 pure, model-free implementation |
76
76
  | Whether a turn may execute, use a tool, cross a privacy boundary or spend budget | Current host admission | A route score or service proposal grants no authority |
@@ -82,7 +82,7 @@ effort and forwarded conversation. This is separate from `stay_switch`, whose
82
82
  existing off/shadow/enforce behavior remains supported. R1 adds no service-call
83
83
  path, classifier option, gateway effort application, service launch or credential
84
84
  reader. #554 S2 adds the opt-in stage classifier option and its ambiguity band
85
- below; judge/plan-execute choice questions require later reviewed wiring (R2).
85
+ below. R2 supplies the separate optional judge and plan/execute choice requests.
86
86
 
87
87
  ## Route contracts and compatibility
88
88
 
@@ -98,11 +98,10 @@ source-port counterparts.
98
98
  proposal through the existing #813 consumer. A failed request, abstention,
99
99
  `no_candidate`, invalid pair or unavailable service leaves that fallback.
100
100
  - `plan_execute` retains its documented capable planning and efficient execution
101
- boundary after the first mutation. Its replacement and optional adec question
102
- belong to R2.
101
+ boundary after the first mutation. The R2 host implementation can ask adec for a phase-model choice.
103
102
  - `advisor` retains bounded APPROVE/REDO review of eligible no-tool answers;
104
103
  `escalation` retains efficient start and same-category confirmation before a
105
- capable latch. Their triggers, parsing, prompts and judge backoff belong to R2.
104
+ capable latch. The R2 host implementation owns their triggers, parsing, prompts and judge backoff.
106
105
  - Explicit model overrides and class fixed-model selections bypass routes as
107
106
  before. A missing/retired route keeps the configured fixed-model fallback and
108
107
  existing diagnostics. Loading configuration never rewrites operator files.
@@ -138,7 +137,7 @@ new stage fields to it.
138
137
  ### Stage evidence, newly authored
139
138
 
140
139
  A separate pure builder produces `StageEvidence` for deterministic fallback and
141
- future stage-specific adec questions. This packet contains only closed numeric,
140
+ optional stage-specific adec questions. This packet contains only closed numeric,
142
141
  boolean and categorical data. It contains no source fragments, transcript,
143
142
  command, tool argument, path, tool name, diagnostic text or service error prose.
144
143
  It is not sent through the generic decision route by this delivery.
@@ -216,7 +215,7 @@ A diagnostic fingerprint may be used transiently to detect repetition; neither
216
215
  its source text nor an unbounded fingerprint list is emitted. A later public
217
216
  projection uses the closed packet above. A sensitive projection contains only
218
217
  `schemaVersion`, `kind` and the four dimensions, with no turn category, counts,
219
- scores or incomplete-history information; R1 creates no transport for either.
218
+ scores or incomplete-history information. The configured host route owns the separate service request.
220
219
 
221
220
  Reviewed classification contract:
222
221
 
@@ -508,9 +507,7 @@ A later discovered owned absolute pin must be preserved explicitly.
508
507
 
509
508
  ## Host route policies and model-choice observation (R2)
510
509
 
511
- This section defines the R2 integration contract for review before shared wiring.
512
- The self-contained helpers and focused receipts are separate from acceptance of
513
- that integration. It adds no permission to consult the protected route bodies,
510
+ This section describes the shipped R2 host integration. Focused receipts cover the owned helpers and their host wiring. It adds no permission to consult the protected route bodies,
514
511
  source-port vectors or `src/hub/ports.ts`. R1's four stage units are owned inputs;
515
512
  R3 retires the derived implementations, provenance checker and corresponding
516
513
  license/notice, and preserves reserved port offset 3 under a neutral name.
@@ -548,7 +545,7 @@ The hub neither reads nor writes that home or a provider key.
548
545
 
549
546
  ### Numeric question evidence
550
547
 
551
- The proposed ordinary R2 packet is closed and contains no transcript or arguments:
548
+ The ordinary R2 packet is closed and contains no transcript or arguments:
552
549
 
553
550
  ```ts
554
551
  type HostChoicePurpose = "plan_execute_model" |
@@ -907,7 +904,7 @@ optional native `turn`, for host callers; this adds no runtime or event field.
907
904
  ## Privacy, authority and events
908
905
 
909
906
  Off mode builds no service payload and sends no request. Local fallback features
910
- may still be computed. Before any future stage service payload is built or sent,
907
+ may still be computed. Before any stage service payload is built or sent,
911
908
  the host must apply the current privacy/observer admission. Review-observer
912
909
  exclusion and remote turns skip the service. PII/private evidence requires
913
910
  positive `onCampus()` and remains dimensions only even on campus. The decider's
@@ -14,6 +14,7 @@ paths:
14
14
  - src/hub/roadmap-check.ts
15
15
  - src/hub/roadmap-sync.ts
16
16
  - src/hub/roadmap-export.ts
17
+ - src/hub/roadmap-issue-states.ts
17
18
  - src/hub/github-import.ts
18
19
  - src/hub/specs-task.ts
19
20
  - src/hub/board.ts
@@ -142,14 +143,14 @@ No roadmap writer emits task text to logs, events, notices or memory.
142
143
 
143
144
  ## Tools and CLI
144
145
 
145
- The three tools are `hub_roadmap_list`, `hub_roadmap_show {id}` and
146
+ The seven tools are `hub_roadmap_list`, `hub_roadmap_show {id}`, `hub_roadmap_check`,
147
+ `hub_roadmap_unplaced`, `hub_roadmap_triage`, `hub_roadmap_decompose` and
146
148
  `hub_roadmap_edit {op, ...}`. The edit operations are new, edit, link, unlink,
147
- order and state; fields and operands are closed per operation. A schema grants
149
+ order, state, accept and reject. Fields and operands are closed per operation. A schema grants
148
150
  no authority: Tasks and the daemon enforce current caller and read-only limits.
149
151
  Every control rid gets a response, including unknown roadmap operations.
150
152
 
151
- `ahub roadmap` defaults to list. `list` and `show <id>` support `--json`; default
152
- output is for a person. Mutations are:
153
+ `ahub roadmap` defaults to list. `list`, `show <id>`, `check`, `sync`, `export`, `unplaced`, `triage`, `decompose` and `import-github` support `--json`. Default output is for a person. Mutations are:
153
154
 
154
155
  - `new --title <text> --outcome <text>` with optional horizon/order/target/parent.
155
156
  - `edit <id> --revision <n>` with those optional fields; target/parent `none`
@@ -259,7 +260,7 @@ no write verb, method flag or body. The first page failing is an error; a later
259
260
  under the page limit is `partial: true` with what was read. Pull requests are left out and every row's URL must equal its
260
261
  canonical identity. `readGitHubImport` (the one-page Backlog intake) is unchanged.
261
262
 
262
- **Triage.** `ahub roadmap triage [--repo] [--list]` and `hub_roadmap_triage {repo?, list?}` (configured planner or unique
263
+ **Triage.** `ahub roadmap triage [--repo] [--list] [--json]` and `hub_roadmap_triage {repo?, list?}` (configured planner or unique
263
264
  conductor, never during a PII or private turn) ask the hub's model, in one call for at most 25 unplaced items, where each belongs.
264
265
  The model sees only text that passed `publicMetadataText`, and everything it reads is labelled data. `parseTriage`
265
266
  (`src/hub/roadmap-triage.ts`) keeps an answer only when it names an item and a milestone it was shown (or a bounded new
@@ -306,9 +307,9 @@ The current full issue inventory has a ceiling of 1000 rows including pull reque
306
307
 
307
308
  A local milestone has at most one remote number per repository. R3's `milestone_imports` marks are the durable binding, including for an imported milestone. A creation includes `<!-- ahub-roadmap:<project>:<local milestone id> -->` in its description; the response must confirm the number, repository URL, title, state and marker before binding. After a lost response, exactly one marked milestone is offered as a local binding in a new confirmed preview. Duplicate markers or a title match without the marker are refused for inspection. A new milestone's first preview creates only the milestone; a later preview binds its server-assigned number and plans issue membership. Moving an issue directly to another known milestone never follows the move with a stale unassignment.
308
309
 
309
- `ahub roadmap export` renders deterministic JSON and Markdown from screened milestone views. `--write` writes only `docs/roadmap.md` and `docs/roadmap.json` in the caller's Git worktree after proving it shares the selected repository, enforcing its current deny, read-only and PII path policy and refusing symlinks or hardlinks. A partially completed two-file write is reported. `--issue <n> --apply --confirm <fingerprint>` updates that issue body only after a matching preview, under the same person/conductor policy. The fingerprint binds repository, issue and rendered body.
310
+ `ahub roadmap check` and `ahub roadmap export` share one live issue-state resolver over screened roadmap references. It reads at most 100 unique refs with at most four requests in flight, a 20-second shared deadline and a 10-second limit per call. Unreadable, unattempted and late results stay `unknown`. The export uses only those live states and derives its issue totals from them. Plan-review evidence remains available to its existing readers. `ahub roadmap export` renders deterministic JSON and Markdown from the screened snapshot and these live states. `--write` writes only `docs/roadmap.md` and `docs/roadmap.json` in the caller's Git worktree after proving it shares the selected repository, enforcing its current deny, read-only and PII path policy and refusing symlinks or hardlinks. A partially completed two-file write is reported. `--issue <n> --apply --confirm <fingerprint>` updates that issue body only after a matching preview, under the same person/conductor policy. The fingerprint binds repository, issue and rendered body.
310
311
 
311
- Task state and merge changes schedule affected public milestones for an ids-only supervision notice. The existing five-minute merge-readback sweep rechecks unresolved findings, including the close-lag boundary. The hub's own pass reuses one working-tree spec check for up to 60 s across its milestone reads (#1738), so spec freshness in a finding can be up to a minute old. Reads by the person and peers check again, once per read: a roadmap check keeps the one spec check it started with across all of its issue reads. A durable marker suppresses a finding already delivered; an unavailable feed or evidence is retried on a later change or sweep. Private tasks are never named. `scripts/check-roadmap.mjs` is a standalone Node validator: it checks the generated JSON's schema, linked spec IDs and tracked spec paths, and checks known issue states when a GitHub token is available. `scripts/check.sh` and the hosted docs step run it. Only `docs/roadmap.md` is exempt from the documentation stamp because this validation covers the generated page; the standalone release docs checker retains its Node-only contract.
312
+ Task state and merge changes schedule affected public milestones for an ids-only supervision notice. The existing five-minute merge-readback sweep rechecks unresolved findings, including the close-lag boundary. The hub's own pass reuses one working-tree spec check for up to 60 s across its milestone reads (#1738), so spec freshness in a finding can be up to a minute old. Reads by the person and peers check again, once per read: a roadmap check keeps the one spec check it started with across all of its issue reads. A durable marker suppresses a finding already delivered; an unavailable feed or evidence is retried on a later change or sweep. Private tasks are never named. `scripts/check-roadmap.mjs` is a standalone Node validator: it checks the generated JSON's schema, linked spec IDs and tracked spec paths, and checks known issue states when a GitHub token is available. `scripts/check.sh` and the hosted docs step run it. The Node-only release docs checker exempts three records from its stamp manifest: `docs/roadmap.md`, `docs/smoke.md` and `docs/gsd-collaboration-analysis.md`. The roadmap validator covers the generated roadmap page.
312
313
 
313
314
  ## Dashboard and console surfaces (R5)
314
315
 
@@ -344,6 +345,6 @@ the `roadmap` feature. Opening it reads `hub_roadmap_list` (5 s) and adds `hub_r
344
345
  held one is older than five minutes. A row is id, horizon, state, approved/total, the withheld count and title, sorted by lane and then
345
346
  by the milestone's own order; Enter opens the milestone through `hub_roadmap_show` into the labelled detail.
346
347
 
347
- **`ahub ui --all`.** `projectConsole` gains an opt-in `roadmap: true` summary per project (`total`, `byHorizon`, `byState`, `drift`),
348
+ **`ahub ui --all`.** `projectConsole` gains an opt-in `roadmap: true` summary per project (`total`, `byHorizon`, `byState`, `drift`, `partial`),
348
349
  read at most once a minute per project with each read bounded. It is opt-in because the acon provider shares `projectConsole` with
349
- fixture hubs, and only the manager passes it. A read that fails shows "roadmap unavailable" rather than a zero.
350
+ fixture hubs, and only the manager passes it. A failed read marks the summary `partial: true`; the UI shows "roadmap unavailable".
@@ -46,7 +46,7 @@ The acceptance that governs a revision is the last one before it. An acceptance
46
46
 
47
47
  Each rule has an id, a version, one reason code and one suggested existing action. The version is part of an observation: bump it when the trigger, the refs or the meaning of a reason changes, so a stored observation states the contract it was made under.
48
48
 
49
- **`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
+ **`repeated_failure` (version 1, reason `repeated_failure`, action `escalate`).** Two consecutive classified failures of the same class inside the current revision. A different classified failure begins its own streak, and unclassified events leave the streak alone. 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. The history events `check passed`, `integrated` and `approved` reset the streak. The isolated `check run passed` event is evidence for the separate deliverable-invalidation rule. 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.
50
50
 
51
51
  **`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.
52
52
 
@@ -69,7 +69,7 @@ A rule that cannot decide says so with a **gap**: rule id, version, task, revisi
69
69
  | `MAX_RECORDS` | 64 | records one rule reads from one revision; a longer revision is a prefix and reports `truncated` |
70
70
  | `REPEAT_FLOOR` | 2 | equal classified failures before the repetition rule fires: the first is an incident, the second a pattern |
71
71
  | `MAX_REFS` | 8 | record refs one observation may carry |
72
- | `MAX_OBSERVATIONS` | 100 | observations and gaps one shadow supervisor retains |
72
+ | `MAX_OBSERVATIONS` | 100 | each independent retention cap for observations, gaps and evaluated revisions in one shadow supervisor |
73
73
  | `MAX_PER_REVISION` | 3 | observations one supervisor retains per rule, task and revision |
74
74
 
75
75
  The retention bounds count what they refuse instead of storing it, so a bound never reads as "nothing to report". A refused observation or gap increments `suppressed` and is not kept; a gap that still cannot be retained on a later evaluation is refused and counted again rather than silently dropped.
@@ -100,9 +100,9 @@ Modes come from `supervision.mode`, machine-local and `off` by default:
100
100
 
101
101
  Observation attaches to the board events the daemon already handles, after the history entry is written, plus one reconcile pass at startup. Nothing polls and nothing is scheduled. A private or unknown task is never observed, and a `backlog` or closed task is not supervised. One board event re-reads the task and each of its declared overlap partners: a pair's reading binds to its lower task id, so a change on the higher-id side is only seen by re-reading the lower one.
102
102
 
103
- **Identity and invalidation.** A proposal keeps the reading's dedupe key `(rule, task, revision, trigger)`, unique in the store, so a replayed event or a second read adds nothing and is not counted as advice. A key outlives its proposal: a reading already disposed of (accepted, dismissed or expired) is not proposed again, because the pattern it named has not changed. The queue expires what the current reading no longer produces (new input cleared the pattern, the task moved to another revision, closed, left the board, or the owner's native session was replaced), and a clipped reading, a revision longer than one rule reads, proposes nothing of its own and invalidates nothing, because a prefix proves neither.
103
+ **Identity and invalidation.** A proposal keeps the reading's dedupe key `(rule, task, revision, trigger)`, unique in the store, so a replayed event or a second read adds nothing and is not counted as advice. A disposed row (accepted, dismissed or expired) suppresses a repeat of its reading while the row is retained. Pruning the terminal row also removes its key. The queue expires what the current reading no longer produces (new input cleared the pattern, the task moved to another revision, closed or left the board). An owner native-generation mismatch expires the proposal lazily in `decide()`. A clipped reading (a revision longer than one rule reads) proposes nothing of its own and invalidates nothing, because a prefix proves neither.
104
104
 
105
- **The decision path.** A pending proposal is decided by an explicit verb, `accept` or `dismiss`, from the hub tools (`hub_supervision_list`, `hub_supervision_accept`, `hub_supervision_dismiss`) or from the advisory inbox row. Every fence runs before any effect, in this order: the id's own grammar, an existing pending row, a present role on the task (its owner, its reviewer, the configured planner, the conductor, or the person; no new supervisor role exists), the action's own authority, a non-private task, a non-clipped reading, the task still on the board, open and on the same revision, the same native generation it was read under, the reading still holding when re-evaluated, and no `needs_review` delivery holding the owner. The role and the action's authority are read a second time after the facts are awaited and immediately before the row is disposed, because the board can move while that read is in flight. A refusal about the reading expires the proposal; a refusal about the caller, the action's authority or the hold leaves it pending for whoever can take it up. The disposition is a compare-and-set on `state = 'pending'`, so of two deciders racing on one proposal exactly one wins and a decided proposal can never be run twice.
105
+ **The decision path.** A pending proposal is decided by an explicit verb, `accept` or `dismiss`, from the hub tools (`hub_supervision_list`, `hub_supervision_accept`, `hub_supervision_dismiss`) or from the advisory inbox row. Every fence runs before any effect, in this order: the id's own grammar, an existing pending row, a present role on the task (its owner, its reviewer, the configured planner, the conductor, or the person; no new supervisor role exists), the action's own authority, a non-private task, a non-clipped reading, the task still on the board, open and on the same revision, the same native generation it was read under, sufficient edit evidence for an edit rule to be evaluated, the reading still holding when re-evaluated, and no `needs_review` delivery holding the owner. The role and the action's authority are read a second time after the facts are awaited and immediately before the row is disposed, because the board can move while that read is in flight. A stale reading expires the proposal. Unavailable edit evidence and refusals about the caller, action authority or hold leave it pending for whoever can take it up. The disposition is a compare-and-set on `state = 'pending'`, so of two deciders racing on one proposal exactly one wins and a decided proposal can never be run twice.
106
106
 
107
107
  A role on the task is not the authority to run what the proposal names. Accepting an `escalate` proposal is the conductor's move, or the person's; an acceptance by the task's owner, reviewer or a planner is refused and the row stays pending rather than being spent on a refusal the action itself would issue. `recheck` and `request_integration` hand the owner a notice, which any present decider may do.
108
108
 
@@ -110,7 +110,7 @@ A role on the task is not the authority to run what the proposal names. Acceptin
110
110
 
111
111
  **An uncertain outcome is never retried.** An action that throws without a synchronous pre-effect refusal leaves the receipt `unknown`. A read settles such a receipt only from the board's own record of that action at or after the **intent** time (`disposedAt`), and only inside the task revision the proposal was read under, so a later escalation of another attempt cannot settle it. The intent time is the boundary and the receipt time is not: the receipt is stamped after a failure threw and again after a restart, so it is always later than the action it reports on. A restart settles an outcome the hub never observed as `unknown` rather than replaying it.
112
112
 
113
- **Restart (AC6).** Dedupe keys, dispositions and unknown receipts all live in the table, so a restart keeps them. The one reconcile pass at startup expires pending proposals whose task moved, closed or left the board, and marks an acceptance whose action never reported as `unknown`. Nothing is replayed and nothing is retried.
113
+ **Restart (AC6).** Dedupe keys, dispositions and unknown receipts all live in the table, so a restart keeps them. The one reconcile pass at startup expires pending proposals whose task became private, moved, closed or left the board, and marks an acceptance whose action never reported as `unknown`. Nothing is replayed and nothing is retried.
114
114
 
115
115
  **Bounds.** A proposal is a closed shape of codes and ids: rule, version, task, revision, trigger, refs, records read and whether it was clipped, the existing action, the reason code, the native generation, and later the disposition and its receipt. It carries no prose, no note, no title and no file body, and nothing about a private task reaches it.
116
116
 
@@ -118,7 +118,7 @@ A role on the task is not the authority to run what the proposal names. Acceptin
118
118
  | --- | --- | --- |
119
119
  | `MAX_PROPOSALS` | 100 | pending proposals the queue holds; a further reading is refused, never counted as advice, and counted in the `refused` total `hub_supervision_list` reports |
120
120
  | `MAX_PROPOSALS_PER_REVISION` | 3 | proposals one task revision gets, decisions included |
121
- | `MAX_PROPOSAL_ROWS` | 400 | terminal rows kept for dedupe and history; past it the oldest terminal row goes and a pending row is never pruned |
121
+ | `MAX_PROPOSAL_ROWS` | 400 | terminal rows kept for dedupe and history; past it the oldest terminal row and its dedupe key go. Pending rows are retained |
122
122
  | `MAX_PROPOSAL_READ` | 50 | proposals one read returns, pending first |
123
123
 
124
124
  ## Edit governance arms
@@ -449,11 +449,11 @@ The board stores facts about worktrees and never a verdict. `worktree_override`
449
449
 
450
450
  The PR state has two sources and no others. The board's own evidence says `merged` only through the guarded merge's record (`sdlc.merge`); a cancelled task or a task with no record says nothing about its PR and reads `unknown`. The person's explicit refresh (`worktrees_refresh_prs`, `src/hub/worktree-prs.ts`) reads the PR through `readSdlcPr`, bounded and one at a time, and keeps `open`, `merged` or `closed` with GitHub's own change time in the daemon's memory. `worktree-shelf.ts` holds no GitHub access, so a panel read, `ahub worktrees` and the inbox alert make no GitHub call.
451
451
 
452
- A worktree whose activity could not be read is live and never settled. The shelf reads git asynchronously under a total budget and answers `complete: false` when it is cut; the daemon's event loop is never held. The daemon deletes no worktree and no local branch: its git port allows three read argv shapes, and removal exists only in the person's own `ahub worktrees tidy --confirm`, which is console class and issues `git worktree remove` and `git branch -d`, never `--force` or `-D`. Operations: `docs/operations.md`, "The worktree shelf (#1057)".
452
+ A worktree whose activity could not be read is live and never settled. The shelf reads git asynchronously under a total budget and answers `complete: false` when it is cut; the daemon's event loop is never held. The daemon deletes no worktree and no local branch: its git port allows three read argv shapes, and removal exists only in the person's own `ahub worktrees tidy --confirm <fingerprint>`, which is console class and issues `git worktree remove` and `git branch -d`, never `--force` or `-D`. Operations: `docs/operations.md`, "The worktree shelf (#1057)".
453
453
 
454
454
  ## Anchored review packages (#1056)
455
455
 
456
- `ReviewFinding.anchor` uses the exact-pinned `@staix/agent-console` 0.1.3 DOM-free `./contract` entry through type-only imports. The generated declaration bridge is removed. `test/acon-review-contract.test.ts` checks the unchanged shared fixtures against both the published acon conformance functions and the hub validator; the project retains its Bun-only TypeScript libraries. Contract conformance and hub writes are separate: hub writes allow 1-4 selectors, 512 UTF-8 bytes for an exact quote, 64 each for prefix and suffix, 256 for a hunk header, 2048 for a comment body and 64 comments per task. The hub additionally caps paths at 4096 bytes, projection name/version and structural scheme at 128 each, structural ref at 512 and verified author identity at 512. These bounds keep each stored thread within its fixed read bound. Quote selector text remains exact in storage; `sanitize()` applies when it is rendered beside hub headers. The hub limits count UTF-8 bytes, independently of acon's character limits: 171 Hangul syllables exceed the 512-byte exact-quote cap. Refusals identify the field, bound and next step. Unknown fields and selectors refuse before effects. A finding path, when present, must equal its anchor path. Findings without anchors retain the existing head buckets and Important carry-over rule.
456
+ `ReviewFinding.anchor` uses the exact-pinned `@staix/agent-console` 0.2.0 DOM-free `./contract` entry through type-only imports. The generated declaration bridge is removed. `test/acon-review-contract.test.ts` checks the unchanged shared fixtures against both the published acon conformance functions and the hub validator; the project retains its Bun-only TypeScript libraries. Contract conformance and hub writes are separate: hub writes allow 1-4 selectors, 512 UTF-8 bytes for an exact quote, 64 each for prefix and suffix, 256 for a hunk header, 2048 for a comment body and 64 comments per task. The hub additionally caps paths at 4096 bytes, projection name/version and structural scheme at 128 each, structural ref at 512 and verified author identity at 512. These bounds keep each stored thread within its fixed read bound. Quote selector text remains exact in storage; `sanitize()` applies when it is rendered beside hub headers. The hub limits count UTF-8 bytes, independently of acon's character limits: 171 Hangul syllables exceed the 512-byte exact-quote cap. Refusals identify the field, bound and next step. Unknown fields and selectors refuse before effects. A finding path, when present, must equal its anchor path. Findings without anchors retain the existing head buckets and Important carry-over rule.
457
457
 
458
458
  All person comment writes go through `Tasks`. The console can put or delete a draft without a peer envelope. An explicit send binds the selected immutable anchors and bodies to one package, changes their lifecycle to sent, appends one count-only task history entry and attempts one review envelope. A failed or uncertain notification never retries automatically. Its receipt distinguishes queued from unconfirmed delivery; neither means the owner read it. The saved package retains its immutable body, envelope identity, original visibility binding and versioned publication-evidence contract. Its serialized record must fit 32768 UTF-8 bytes before any sent write. A previously unpublished package is admitted only while every selected comment remains sent and its originally visible text remains public under current policy; a missing binding, dismissal or privacy change refuses without rewriting or publishing the old body. An explicit confirmed Send with `packageId` recovers only that saved package. Durable queue or delivery evidence makes this idempotent, including after restart; failed or discarded deliveries refuse with their actual state and `ahub queue` inspection guidance rather than reporting queued or replaying the effect. Unknown evidence and legacy packages refuse with inspection guidance. Person-package terminal receipts are retained alongside the package rather than pruned with ordinary delivery history. Quote-bearing reviewer requests use a distinct `reviewer-request-` marker and their terminal rows follow ordinary pruning. This retains a full receipt per package; package archival with an IDs-only tombstone is the upgrade path. Deleting a sent comment dismisses it without rewriting its anchor. Only a final successful owner completion may claim resolved comment IDs; a queued or failed check leaves them sent. That claim is not person verification or a review verdict.
459
459
 
package/docs/dogfood.md CHANGED
@@ -321,7 +321,7 @@ agent-hub is developed with agent-hub. This page lists every feature, whether it
321
321
  | Companion CLI contract v1 (#1387 T0) | on: `docs/contracts/companion-cli-v1.json` lists what the Orca, Herdr and Claude Code companions may read from `ahub status --json` and `ahub projects --json`, the no-hub exit and the `shellQuote` vectors | `test/companion-contract.test.ts` runs the real commands against a scratch hub and fails when a listed path, type or closed set drifts; its guard fails when ahub's `src/`, `scripts/`, `plugins/` or `package.json` names a companion repository |
322
322
  | Companion per-peer context (#1511) | contract and scratch fixture coverage; native companion display unverified | real `ahub status --json` against a scratch hub with a fixture Claude status-line sample exposes `used` and `freshness`; `test/companion-contract.test.ts` checks absent, nullable and closed-set cases |
323
323
  | CLI output standard v1 (#1484 T1, `docs/design/cli-output.md`) | on after release: every `ahub` command that colors output reads `resolveColor` per stream, so `FORCE_COLOR` / `CLICOLOR_FORCE` color a pipe and `FORCE_COLOR=0` / `CLICOLOR=0` uncolor a terminal (a behavior change). `ahub doctor` and the error line adopt them in #1484 T2 (hub task 957): doctor exits 1 on a failed row, a usage error exits 2, `ahub task show <missing id>` exits 1 on stderr; `ahub status` (hub task 958, T3) opens with an Attention list: each item a marker, the finding and its exact next command, with the old full view behind `--verbose`; `ahub help` (hub task 959, T4) is an overview of one row per command, with the long text in `ahub help <command>`; hub task 966 (#1504) adds a blank line before the first section, a summary per native agent from its definition, and `ahub help <command>` as Usage, Description, Flags, Examples and Details. Help, status and doctor accept `--ascii` to use ASCII markers. The #1654 help slice lists each command once and adds examples to bare commands | `test/cli-output-conformance.test.ts` (the five conformance checks, the six color rules and the raw-SGR guard) runs in `bun test`; `test/help.test.ts` checks the ASCII overview and `test/status-default-view.test.ts` checks aligned ASCII status markers; `test/cli-output-conformance.test.ts` pins `--ascii` selection, locale fallback and aligned ASCII marker output. In real use, `ahub doctor; echo $?` ends in a summary line and exits 1 while a row is `✗`, `ahub nosuchcmd; echo $?` prints 2, `ahub help | wc -l` is about 110 (it was about 1,040) and `ahub help status` prints Usage, Description, Flags, Examples and then the full long text, `ahub status` starts with `▸ Attention` and either `✓ nothing needs attention` or `⚠`/`✗` rows each followed by a `→` command, `FORCE_COLOR=1 ahub help \| cat` shows color, `NO_COLOR=1 ahub help` and `ahub help \| cat` show none |
324
- | CLI views and warnings on the shared Report (#1654 T3, T4, AC3, AC4; hub tasks 1115, 1116, 1135, 1137, 1141; #1724 batch 1) | on after release: `ahub projects`, `queue`, `turns` and the orphan views open with the standard header and a counted section; `status --verbose`, `status --full`, `report`, the `sdlc` views (`status`, `explain`, `queue`, `audit show`, `release`, `metrics`, `costs`, `authorize-release`, `merge`, `configure`, `survey show`), `task show`/`cancel`, backlog, `release`, `source`, `schedule`, `study`, `task handoff`, `learn`, `intake`, `capabilities`, `worktrees` and `room` print on the same layout and take `--ascii`; warnings print as `ahub: warning: <what>: <why>` with an optional `→` next step | `test/output.test.ts` pins the list tables at 80 and 120 columns; `test/cli-output-conformance.test.ts` checks the grammar over the real output of every converted view (header first, a section mark per group, no line over 24, 40 or 80 cells, `--ascii` keeps the line count) and the warning shape, and fails on a raw console call outside the sanctioned paths that is not in the shrink-only `scripts/cli-raw-output.baseline.json`; `test/sdlc-output.test.ts` pins the sdlc views |
324
+ | CLI views and warnings on the shared Report (#1654 T3, T4, AC3, AC4; hub tasks 1115, 1116, 1135, 1137, 1141; #1724 batches 1 to 6) | on after release: `ahub projects`, `queue`, `turns` and the orphan views open with the standard header and a counted section; `status --verbose`, `status --full`, `report`, the `sdlc` views (`status`, `explain`, `queue`, `audit show`, `release`, `metrics`, `costs`, `authorize-release`, `merge`, `configure`, `survey show`), `task show`/`cancel`, backlog, `release`, `source`, `schedule`, `study`, `task handoff`, `learn`, `intake`, `capabilities`, `worktrees`, `room`, the sdlc receipts (`audit start`, release train, plan review, acceptance, read-back), `settings`, `agents`, `broker`, `reset`, `undo`, `kill`, `ask`, `answer` and `results` print on the same layout and take `--ascii`; warnings print as `ahub: warning: <what>: <why>` with an optional `→` next step | `test/output.test.ts` pins the list tables at 80 and 120 columns; `test/cli-output-conformance.test.ts` checks the grammar over the real output of every converted view (header first, a section mark per group, no line over 24, 40 or 80 cells, `--ascii` keeps the line count) and the warning shape, and fails on a raw console call outside the sanctioned paths that is not in the shrink-only `scripts/cli-raw-output.baseline.json`; `test/sdlc-output.test.ts` pins the sdlc views |
325
325
 
326
326
  ## Decisions
327
327
 
@@ -823,8 +823,8 @@ setting (`ahub settings set peers.pi.start_mode headless`), asks for the
823
823
  background peer instead. The project uses its existing OmniRoute connection for DGX;
824
824
  `pi.dgx_coding` and `pi.dgx_fast` select the gateway's configured model IDs.
825
825
  Every Pi start (headless, TUI, console or auto start) first runs the configured
826
- `pi.cmd` with `--version` (#847). Pi 1.4.0, 1.5.0 and 1.5.2 are verified
827
- ([1.4.0 model-free receipt](verification/2026-10-26-pi-140-compat.md), [1.5.0](verification/2026-11-03-pi-150-compat.md), [1.5.2](verification/2026-11-14-pi-152-compat.md)); another
826
+ `pi.cmd` with `--version` (#847). Pi 1.4.0, 1.5.0, 1.5.2, 1.6.0 and 1.6.1 are verified
827
+ ([1.4.0 model-free receipt](verification/2026-10-26-pi-140-compat.md), [1.5.0](verification/2026-11-03-pi-150-compat.md), [1.5.2](verification/2026-11-14-pi-152-compat.md), [1.6.0](verification/2026-11-25-pi-160-compat.md), [1.6.1](verification/2026-11-26-compat-pi-1.6.1.md)); another
828
828
  version, or one that cannot be read, is refused before Pi starts, unless the
829
829
  person trusts that exact version with `ahub agents trust pi <version>`.
830
830
 
@@ -1273,7 +1273,7 @@ operation cannot confirm startup.
1273
1273
  Each completed daemon startup writes one `startup timings ms:` line to `hub.log`,
1274
1274
  with fixed phase names and durations; the span before `task_runtime` carries
1275
1275
  the sub-phases `task_checks`, `task_ports`, `task_board` and `task_recovery`
1276
- (#1445), and its board reads cover open tasks only. The work after readiness is split into one boundary per step (`post_ready_handoff`, `_queue`, `_watch`, `_reconcile`, `_goals`, `_leases`, `_crash`, `_pi`, `_drift`, #1591), so a slow start names the step that held control replies. `post_ready_reconcile` pages the memory store for task keys that still need settlement and rechecks current approval and privacy on the board. If discovery is unavailable, startup uses the approved-task point checks. `task_checks` no longer waits for the first check-runner probe (about 8 s over ssh to a remote runner): startup waits for it at most 500 ms, `ahub status` reports the runner as unavailable with `runner probe in progress` until it settles, and `check_run` joins the same single probe. The three event-seed consumers share one
1276
+ (#1445), and its board reads cover open tasks only. The work after readiness is split into one boundary per step (`post_ready_handoff`, `_queue`, `_watch`, `_reconcile`, `_goals`, `_leases`, `_crash`, `_pi`, `_drift`, #1591), so a slow start names the step that held control replies. `post_ready_reconcile` pages the memory store for task keys that still need settlement and rechecks current approval and privacy on the board. If discovery is unavailable, startup uses the approved-task point checks. `task_checks` no longer waits for the first check-runner probe (about 8 s over ssh to a remote runner): startup waits for it at most 500 ms, `ahub status` reports the runner as unavailable with `runner probe in progress` until it settles, and `check_run` joins the same single probe. The orphan check sweep and the first GitHub spec availability probe also run in the background (#1445): `ahub status` and spec-dependent routing wait until they settle, a later spec refresh on peer start holds neither, and isolated check requests wait for orphan recovery before reading receipts or starting a run. The three event-seed consumers share one
1277
1277
  lossless streaming pass; abandoned snapshot bodies are not read for startup.
1278
1278
  The [startup receipt](verification/2026-11-07-daemon-startup-1232.md) separates
1279
1279
  seed I/O from bounded usage-rollup I/O and records the isolated measurements.
@@ -4280,7 +4280,10 @@ capabilities still require their own labels. A disjoint window refuses with 4426
4280
4280
  The compatibility-floor `protocol` field remains readable by old clients.
4281
4281
 
4282
4282
  Release N-1 is counted in minor versions, separately from this protocol window
4283
- (#1164, family contract entelecheia/ai-workspace#70). For 0.47.x, N-1 is 0.46.1,
4283
+ (#1164, family contract entelecheia/ai-workspace#70). For 0.49.x, N-1 is 0.48.4,
4284
+ the latest published patch of 0.48.x (declared `@staix/agent-mem` `>=0.39.0 <1.0.0`,
4285
+ 0.39.0 in its fixture lock, control protocol 17 with descriptor floor 16). Every
4286
+ patch on 0.49.x keeps that release baseline. For 0.47.x, N-1 is 0.46.1,
4284
4287
  the latest published patch of 0.46.x (declared `@staix/agent-mem` `>=0.33.0 <1.0.0`,
4285
4288
  0.38.0 in its fixture lock, control protocol 17 with descriptor floor 16). Every
4286
4289
  patch on 0.47.x keeps that release baseline. For 0.39.x, N-1 is 0.38.0,
@@ -4494,7 +4497,7 @@ release. The global CLI is promoted last.
4494
4497
 
4495
4498
  A lost commit or start reply is reconciled against the actual daemon identity,
4496
4499
  package digest, terminal binding, and phase receipt. An uncertain terminal
4497
- creation is never repeated blindly. Recovery retains the first-party memory package with the preserved runtime, includes its identity and bytes in the digest, and refuses missing, symlinked or changed retained dependencies instead of resolving a mutable ancestor/global installation. It does not copy the full dependency tree.
4500
+ creation is never repeated blindly. Recovery retains the first-party memory package and its reviewed runtime dependencies, and includes their identities and reviewed assets in the digest. Agent-mem can declare the hub's exact `@staix/cli-output` pin and exact `X.Y.Z` pins for `@staix/mcp-stdio` and `@staix/agent-hosts`. Each declared dependency must be a real sibling beside agent-mem, with the matching name and version and no dependencies or nested `node_modules`. Recovery refuses missing, symlinked or changed retained dependencies instead of resolving a mutable ancestor or global installation. It does not copy the full dependency tree.
4498
4501
 
4499
4502
  After creating a managed terminal, the coordinator saves its exact handle, incarnation and worktree before waiting up to 600 seconds (10 minutes) for authenticated attachment to the expected target hub and conversation. A pending or failed creation receipt also waits when the current target has a verified live launcher; its saved binding retains the pending/failed origin across interruption. An idle terminal alone is not attachment proof: after idle, the coordinator re-reads the launch record and Orca's identity every second within the same bound, until the terminal maps to the expected session or contradicts it (#599). Without a current launch record, a confirmed-ended row for another terminal and an attached session still reporting no id keep the chosen terminal waiting within the same bound; a late matching record continues that wait. Live replacement and unreadable records still block. Only non-offline session ids count, and older-instance launchers are checked before declaring a launch gone. Timeout retains the binding and diagnostic receipt; resume waits on that same binding rather than opening a duplicate.
4500
4503
 
@@ -6233,7 +6236,9 @@ Explicit task links take precedence over issue inheritance across all milestones
6233
6236
  Otherwise GitHub-import `Task.external` or the canonical plan issue identity
6234
6237
  places a task in its issue's milestone, labelled inherited from #N. Issue states
6235
6238
  come from matching persisted plan-review metadata and include their cache time;
6236
- no GitHub lookup runs. Specs use the current complete spec graph; missing,
6239
+ no GitHub lookup runs. `ahub roadmap check` and `ahub roadmap export` instead
6240
+ share one bounded live issue-state lookup (at most 100 refs, a 20-second deadline);
6241
+ unreadable or late refs stay unknown (#1754). Specs use the current complete spec graph; missing,
6237
6242
  nonancestor or incomplete proof stays unknown. Trains keep their delivery rules.
6238
6243
  Parent milestones are one-level organization, without automatic child membership.
6239
6244
 
@@ -6934,7 +6939,7 @@ The selected project's configured conductor may run the commands below through i
6934
6939
  ### Run the preregistered guidance pilot
6935
6940
 
6936
6941
  1. Upgrade the project hub to a release with `guidance_probe_live`. Bind a local copy of the [committed preregistration](../test/fixtures/guidance-probe-live-1226.json) to the current public task revision, project namespace and catalog role. Use `localProbeFingerprints({ maxSteps: 8, maxOutputTokens: 512, tokenUpperBound: 8000 })` from the installed hub source, on the machine and Bun version that will run it. Copy the runtime, toolset and model config hashes into the manifest and bind the returned system policy snapshot by its UTF-8 byte count and SHA-256. Set `task.flowRevision` to the current task history length. Set `role.baselineSha256` to the catalog role hash and `guidance.baselineSha256` to the SHA-256 of `taskRoleText(role)`. The project namespace is `ahub-` followed by the SHA-256 of `memoryProjectKey(projectRoot)`. Keep the committed task text, baseline context, empty tree, data policy, slots, model and limits. Choose and record the current immutable G1 variant ID before the baseline. It supplies the candidate guidance.
6937
- 2. From the conductor session, set `probe_file` to that bound JSON and register it.
6942
+ 2. For a Claude conductor, start a new session with `ahub claude` in the project. From the conductor session, set `probe_file` to that bound JSON and register it.
6938
6943
 
6939
6944
  ```sh
6940
6945
  ahub guidance probe register --file "$probe_file" --json
@@ -18,7 +18,7 @@ Or use the matching GitHub release:
18
18
 
19
19
  <!-- facts:install-tag -->
20
20
  ```bash
21
- bun add -g github:STAIxBWLB/agent-hub#v0.48.4
21
+ bun add -g github:STAIxBWLB/agent-hub#v0.49.0
22
22
  ahub setup
23
23
  ```
24
24
  <!-- /facts:install-tag -->
@@ -54,6 +54,18 @@ A project whose hub is stopped is upgraded without starting it: `ahub upgrade
54
54
  --all-stopped --to <version>` does that for every stopped project at once
55
55
  (`--dry-run` lists each one first).
56
56
 
57
+ ## Upgrading to 0.49.0
58
+
59
+ Restart the hub after upgrading; nothing needs configuring. What changes:
60
+
61
+ - Recovery and runtime pruning accept an agent-mem release that pins `@staix/mcp-stdio` and `@staix/agent-hosts` exactly, so such an agent-mem release no longer blocks `ahub upgrade` or a restart.
62
+ - Startup no longer waits for the orphan check sweep or the GitHub spec probe; `ahub status` answers once both settle.
63
+ - `ahub roadmap check` and `ahub roadmap export` read live issue states, so an export no longer reports a closed issue as open.
64
+ - Pi 1.6.1 is verified; a local `ahub agents trust pi 1.6.1` is no longer needed.
65
+ - `settings`, `agents`, `broker`, `reset`, `undo`, `kill`, `ask`, `answer`, `results` and the sdlc receipts print on the shared report layout. A script that parses their human output should use `--json` where the command offers it.
66
+
67
+ `ahub upgrade` does not update the global CLI or the shared Claude plugin: run `bun add -g @staix/agent-hub@0.49.0` and then `ahub setup` yourself, and `ahub doctor` warns while either is older than a running daemon.
68
+
57
69
  ## Upgrading to 0.48.4
58
70
 
59
71
  Nothing to do beyond the upgrade. A memory status read no longer re-resolves the whole memory profile through agent-mem unless a profile metadata file changed (#1747). Memory work itself still runs the full check on every call. 0.48.4 raises no store, sync or agent-mem floor.