@staix/agent-hub 0.35.0 → 0.36.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 +26 -0
- package/README.md +21 -4
- package/docs/agent-notes/README.md +60 -0
- package/docs/agent-notes/adapters.md +5 -2
- package/docs/agent-notes/bus.md +1 -0
- package/docs/agent-notes/daemon.md +5 -4
- package/docs/agent-notes/models.md +4 -3
- package/docs/agent-notes/tasks.md +8 -1
- package/docs/agent-notes/tests.md +1 -0
- package/docs/design/adapters.md +72 -0
- package/docs/design/agent-hub-architecture.md +1 -1
- package/docs/design/bus.md +8 -0
- package/docs/design/execution-reference.md +171 -11
- package/docs/design/guidance-experiments.md +438 -0
- package/docs/design/model-routes.md +628 -0
- package/docs/design/supervision.md +121 -0
- package/docs/design/task-board.md +111 -0
- package/docs/dogfood.md +15 -4
- package/docs/operations.md +291 -22
- package/docs/profiles.md +2 -2
- package/docs/quickstart.md +106 -1
- package/docs/research.md +4 -2
- package/docs/sdlc.md +108 -4
- package/docs/security.md +67 -5
- package/docs/specs/2026-09-19-agent-hub-design.md +5 -4
- package/docs/verification/2026-10-25-qwen-dual-output-t0.md +22 -0
- package/docs/verification/2026-11-09-qwen-0270-acp.md +181 -0
- package/docs/verification/2026-11-09-qwen-0270-model-setter-1317.md +46 -0
- package/docs/verification/2026-11-10-0.36.0.md +59 -0
- package/docs/verification/2026-11-10-claude-implementer-2.1.322.md +59 -0
- package/docs/verification/2026-11-10-qwen-0270-dual-output.md +367 -0
- package/docs/verification/2026-11-10-qwen-0271-dual-output.md +101 -0
- package/docs/verification/claude-shell-wrapper-native.py +1 -1
- package/docs/verified.json +27 -27
- package/package.json +1 -1
- package/plugins/agent-hub/.claude-plugin/plugin.json +1 -1
- package/plugins/agent-hub/kimi-hook.js +1201 -368
- package/plugins/agent-hub/server.js +1682 -431
- package/src/adapters/claude-channel.ts +7 -4
- package/src/adapters/compat.ts +10 -10
- package/src/adapters/local-worker.ts +1 -1
- package/src/adapters/qwen-dual.ts +324 -44
- package/src/cli/guidance.ts +67 -0
- package/src/cli/help.ts +10 -3
- package/src/cli/identity.ts +10 -3
- package/src/cli/init-prompt.ts +15 -2
- package/src/cli/init-required-checks.ts +122 -0
- package/src/cli/init-settings.ts +10 -4
- package/src/cli/init.ts +39 -3
- package/src/cli/lineage.ts +78 -0
- package/src/cli/main.ts +111 -10
- package/src/cli/setup-research.ts +10 -0
- package/src/hub/autonomy-defaults.ts +20 -9
- package/src/hub/board.ts +346 -4
- package/src/hub/build-entry.ts +11 -0
- package/src/hub/bus.ts +12 -0
- package/src/hub/ci-watch.ts +4 -4
- package/src/hub/config-apply.ts +2 -1
- package/src/hub/config-trust.ts +1 -0
- package/src/hub/control-client.ts +1 -1
- package/src/hub/daemon.ts +342 -20
- package/src/hub/delivery-hints.ts +4 -2
- package/src/hub/delivery-journal.ts +50 -2
- package/src/hub/delivery-public.ts +51 -0
- package/src/hub/dogfood-profile.ts +8 -4
- package/src/hub/execution-lineage-owner.ts +272 -0
- package/src/hub/execution-lineage.ts +52 -8
- package/src/hub/execution-links.ts +85 -0
- package/src/hub/guidance-variants.ts +398 -0
- package/src/hub/handoff.ts +1 -0
- package/src/hub/hub-tools.ts +43 -2
- package/src/hub/manager.ts +44 -2
- package/src/hub/memory-policy.ts +2 -2
- package/src/hub/peers.ts +1 -1
- package/src/hub/planning.ts +1 -1
- package/src/hub/progress.ts +24 -7
- package/src/hub/restart.ts +13 -0
- package/src/hub/roles.ts +26 -0
- package/src/hub/routing.ts +4 -1
- package/src/hub/sdlc-merge.ts +39 -1
- package/src/hub/sdlc-release.ts +1 -1
- package/src/hub/sdlc.ts +62 -11
- package/src/hub/settings.ts +2 -0
- package/src/hub/supervision-proposals.ts +405 -0
- package/src/hub/supervision-rules.ts +388 -0
- package/src/hub/supervision.ts +2 -0
- package/src/hub/task-approval.ts +2 -2
- package/src/hub/task-repository.ts +5 -0
- package/src/hub/tasks.ts +603 -50
- package/src/memory/capture.ts +2 -2
- package/src/models/relay.ts +9 -2
- package/src/models/route/config.ts +27 -0
- package/src/models/route/decision.ts +87 -15
- package/src/models/route/relay-selector.ts +8 -7
- package/src/models/route/runtime.ts +22 -16
- package/src/models/route/stage-diagnostics.ts +22 -0
- package/src/models/route/stage-evidence.ts +55 -0
- package/src/models/route/stage-fallback.ts +58 -0
- package/src/models/route/stage-input.ts +155 -0
- package/src/models/route/stage.ts +5 -147
- package/src/ui/guidance-panel.ts +156 -0
- package/src/ui/guidance-view.ts +43 -0
- package/src/ui/lineage-view.ts +34 -0
- package/src/ui/plugin.ts +71 -7
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,32 @@ 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.36.0
|
|
8
|
+
|
|
9
|
+
- Claude Code 2.1.322 is a receipt-verified headless implementer version (#888, task 868): the model-free permission-transport and host shell-wrapper producers pass on it with 2.1.319 as the control (`docs/verification/2026-11-10-claude-implementer-2.1.322.md`).
|
|
10
|
+
- Qwen Code 0.27.1 is a receipt-verified dual-output TUI version (#888, task 869): required normal-Bus Q2 and Q3/Q5/Q6/Q7 pass on it with 0.27.0 as the control (`docs/verification/2026-11-10-qwen-0271-dual-output.md`). The headless `qwen` ACP entry is unchanged and still refuses 0.27.1.
|
|
11
|
+
|
|
12
|
+
- The new-project SDLC guide connects init choices, shared-file commits, managed sessions, actor-owned lifecycle steps and recovery (#1328). Compatibility: repositories other than `STAIxBWLB/agent-hub` in `advise` or `enforce` with no configured required checks report `required checks unknown` for review readiness and CI watches instead of assuming the native `seeded guards` floor; configure that repository's own checks and restart after editing `sdlc.toml`.
|
|
13
|
+
- Keep Qwen dual-output queued input fenced after a deny until a new personal turn completes or a verified fresh native generation starts. A 30 s wait expires offline without changing the known denied delivery disposition (#888).
|
|
14
|
+
|
|
15
|
+
- Stage routing uses newly authored bounded numeric evidence, deterministic fallback and session switching (#1352 R1). Whole-wire input sizing rounds compact JSON UTF-8 bytes upward, intentionally increasing the Unicode estimate conservatively; unavailable or overflowing sizes refuse context admission. Optional adec routing remains off/shadow only, and generic decision evidence v1 is unchanged.
|
|
16
|
+
|
|
17
|
+
- Bounded execution lineage reads and deduplicated declared external references are available through Tasks, CLI and MCP (#1220 T2). Admission rechecks current task role, revision, project and privacy; reads retain historical review bindings and explicit observation gaps without scanning the board or contacting producers.
|
|
18
|
+
|
|
19
|
+
- Supervision rules and proposals (#1221 T1 and T2, PRs #1362, #1368, #1374). Three versioned deterministic rules (`repeated_failure`, `deliverable_invalidated_check`, `declared_overlap_without_integration`) read only facts already in the public project view and record observations with zero effects in shadow mode. A reading can become a bounded proposal (100 pending, 3 per task revision) that a present role decides with `hub_supervision_list`, `hub_supervision_accept` or `hub_supervision_dismiss`; accepting runs one existing action under that action's own authority and writes nothing to the board itself. `supervision.mode` stays `off` by default and is person-only. A pair whose side is closed has no coverage entry, gap or observation.
|
|
20
|
+
- Task-local guidance variants (#1225, PRs #1363, #1367, #1376): an immutable `GuidanceVariantV1` contract whose candidate changes are limited to the Scope, Deliverables and Evidence prose, Tasks-owned persistence with idempotent create and one-way withdrawal, and `ahub guidance` create/list/show/withdraw, the matching `hub_guidance_*` MCP tools and a read-only console panel. Every reader and receipt screens original field text; no variant is activated or handed to task execution.
|
|
21
|
+
- The acon console reads the same bounded execution lineage page as `ahub lineage show` (#1220 T3, PR #1358), with a dogfood recipe and a bounded-read measurement on a large synthetic board.
|
|
22
|
+
- adec stage routing asks the decider only inside an ambiguity band around the confidence threshold (`|score - threshold| <= band`, default 0.05) and stays shadow only (#554 S2, PR #1373). `scripts/decision-eval.ts` replays planner-classified non-PII board tasks against a decider and the current triage, by hand and from a copy of `hub.db` (#554 S3, PR #1346).
|
|
23
|
+
- `ahub sdlc adopt-merge <task> --pr <n>` records a PR merged outside the guarded merge, for the person or the configured conductor, after one bounded GitHub snapshot proves the merged head, green configured checks and clean review coverage (#1328 T3, PR #1348).
|
|
24
|
+
- Init discovers repository required checks (at most three capped reads, `--required-checks` overrides) and refuses `enforce` with no known checks before any write (#1328 T1, PR #1344). `ahub init --research|--no-research` writes `research.enabled` and prints the person's next steps; `ahub setup --research` saves a machine default (#1328 T6, PRs #1347, #1357). Upgrade every hub and CLI on the machine before saving that default: an older reader refuses the unknown `research` key in `defaults.json` and distrusts the whole file.
|
|
25
|
+
- Exact-head review blockers name each missing, pending, failed, duplicate or unknown required check (#1328 T2, PR #1354). A task that supersedes cancelled work on the same issue keeps the person's spec consent when the issue body is unchanged (#1328 T4, PR #1361). `hub_inbox` shows the caller's own held deliveries without settling them (#1328 T5, PR #1359).
|
|
26
|
+
- Optional Claude Code companion (#1338, PRs #1343, #1349, #1365, #1369): a frozen mod host contract, a fixture-only read-only status pane with `/hub`, `/hub refresh` and `/hub console`, an attention band and compact rows for four agent-hub tools, and manual session-only packaging. Native receipts on each surface are person-run and not claimed here.
|
|
27
|
+
- Qwen Code 0.27.0 is receipt-verified for basic headless ACP (#888, PR #1355) and for the dual-output TUI (#888, PR #1364).
|
|
28
|
+
- Fixes: a daemon start with a persisted deferred hub notice no longer fails readiness before Tasks exists (#1350, PR #1353); Jcode receipt observers publish their environment record atomically (PR #1372).
|
|
29
|
+
- Tests and docs without a behavior change: Orca 1.4.254 terminal focus recheck (#1198, PR #1342), synchronized ACP model observations (PR #1345), the handoff catch-up flake (#1260, PR #1356) and the Orca status port canaries (PR #1360).
|
|
30
|
+
|
|
31
|
+
Release N-1 for 0.36.x is 0.35.0 (exact `@staix/agent-mem` 0.23.1, control protocol 17 with descriptor floor 16); `test/fixtures/release-n-1` and `test/published-protocol-compat.test.ts` now pin it. Compatibility: the wire protocol window is unchanged at 16 through 17. Files: `hub.db` gains additive tables (`supervision_proposals`, `guidance_experiments`, `guidance_variants`, `execution_reference_links`) created with `CREATE TABLE IF NOT EXISTS` and no `hub_schema` bump, so 0.35.0 opens a 0.36.0 database and ignores them; the machine `defaults.json` `research` key is the one format ceiling, refused by 0.35.0 readers. CLI: new `ahub guidance`, `ahub lineage`, `ahub sdlc adopt-merge` and init flags; existing commands are unchanged. MCP: new `hub_guidance_*`, `hub_lineage_*` and `hub_supervision_*` tools; existing tool schemas keep their fields.
|
|
32
|
+
|
|
7
33
|
## 0.35.0
|
|
8
34
|
|
|
9
35
|
- Managed headless peers can author compact amem Record capture rows from final answers (#1320), following the package records policy and existing privacy fences. Record lines are removed from shared replies; bounded memory preference uses proven generated-note IDs and anchors without deleting unrelated notes or promoting capture into curated evidence.
|
package/README.md
CHANGED
|
@@ -5,9 +5,13 @@ 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.36.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
|
+
Inspect bounded task and attempt metadata with `ahub lineage show`; admit external
|
|
12
|
+
references through the current task role with `ahub lineage link`. References remain
|
|
13
|
+
declared and never cause an external fetch. See [execution lineage](docs/operations.md#execution-lineage-1220-t2).
|
|
14
|
+
|
|
11
15
|
## Quick start
|
|
12
16
|
|
|
13
17
|
You need [Bun](https://bun.sh) <!-- facts:bun-floor -->1.4.2<!-- /facts:bun-floor --> or later on PATH.
|
|
@@ -48,7 +52,8 @@ become links. The scene carries labels and states only, never message bodies or
|
|
|
48
52
|
terminal, `ahub init` asks each main setting with its default before writing; flags
|
|
49
53
|
such as `--agents`, `--sdlc` or `--no-specs` set them directly, and `--yes` takes the
|
|
50
54
|
defaults. The
|
|
51
|
-
[Quickstart](docs/quickstart.md) walks through a first session and a working day
|
|
55
|
+
[Quickstart](docs/quickstart.md) walks through a first session and a working day,
|
|
56
|
+
including [a new project with SDLC advise or enforce](docs/quickstart.md#a-new-project-with-sdlc-advise-or-enforce).
|
|
52
57
|
|
|
53
58
|
## What you get
|
|
54
59
|
|
|
@@ -61,7 +66,10 @@ defaults. The
|
|
|
61
66
|
restarts.
|
|
62
67
|
- **Optional decision routing.** Hub-owned routes can consult a loopback adec
|
|
63
68
|
policy in shadow mode while keeping the existing model choice unchanged.
|
|
64
|
-
|
|
69
|
+
Stage routes use bounded numeric evidence and a deterministic fallback;
|
|
70
|
+
whole-wire sizing conservatively counts UTF-8 JSON bytes, including Unicode.
|
|
71
|
+
See the [stage contract](docs/design/model-routes.md) and
|
|
72
|
+
[configuration and privacy limits](docs/operations.md#optional-adec-decision-route-554).
|
|
65
73
|
- **Live model selection.** A person can set a supported peer's next-turn model
|
|
66
74
|
with `ahub model set`, without restart or reload. Headless Kimi 2.5.2 has an
|
|
67
75
|
exact-version ACP setter receipt; other ACP kinds remain unsupported.
|
|
@@ -82,6 +90,8 @@ defaults. The
|
|
|
82
90
|
another project running agent-hub on this machine goes onto that project's board
|
|
83
91
|
with `ahub task handoff` (agents: `hub_task_handoff`), and its state changes come
|
|
84
92
|
back as task messages.
|
|
93
|
+
For a PR already merged outside the hub, [merged PR adoption](docs/sdlc.md#adopting-a-pr-merged-outside-the-hub-1328-t3) verifies its recorded head and releases dependents: `ahub sdlc adopt-merge <task> --pr <n>`.
|
|
94
|
+
An explicitly superseding task may [carry existing spec consent](docs/sdlc.md#spec-acceptance-481-s1) for the same repository and issue when the host verifies an unchanged body.
|
|
85
95
|
Fresh Kimi reviews run periodic isolation checks off the hub event loop;
|
|
86
96
|
verdict and task-tool authority still require the complete synchronous fence
|
|
87
97
|
([measurements and limits](docs/verification/2026-11-07-kimi-review-watch-1284.md)).
|
|
@@ -99,6 +109,11 @@ defaults. The
|
|
|
99
109
|
agents read them with `hub_specs`. Only a person stamps a spec as reviewed
|
|
100
110
|
(`ahub specs stamp`). Fixture-tested only so far: this repository's own specs in
|
|
101
111
|
`docs/design/` are unstamped drafts ([dogfood](docs/dogfood.md#operations)).
|
|
112
|
+
The [guidance variant contract](docs/design/guidance-experiments.md) defines
|
|
113
|
+
immutable advisory role proposals and private task-local lifecycle storage.
|
|
114
|
+
`ahub guidance create|list|show|withdraw` and the MCP tools share task authority
|
|
115
|
+
and public projections; the producer console's Guidance panel is read-only.
|
|
116
|
+
Section diffs remain advisory, without activation, permissions or probes.
|
|
102
117
|
- **Shared memory.** Decisions, contracts, fails and findings are kept through the
|
|
103
118
|
first-party [`@staix/agent-mem`](https://github.com/STAIxBWLB/agent-mem) library,
|
|
104
119
|
in process with no claude-mem worker (short- and long-term tiers, a typed graph,
|
|
@@ -155,6 +170,8 @@ Agent CLIs update themselves. `ahub agents` shows which installed versions the h
|
|
|
155
170
|
accepts, `ahub agents trust <id> <version>` accepts an untested one on this
|
|
156
171
|
machine, and the hub tells the planner when an installed version is not verified.
|
|
157
172
|
|
|
173
|
+
Qwen Code dual-output 0.27.0 and 0.27.1 are qualified by source and account-free macOS arm64 checks ([0.27.0](docs/verification/2026-11-10-qwen-0270-dual-output.md), [0.27.1](docs/verification/2026-11-10-qwen-0271-dual-output.md)) (supported from 0.36.0 once a hub is upgraded); real-model turns and live TUI use here remain unverified. A hub deny keeps later input fenced until a new personal turn completes or a verified fresh generation starts; see [Qwen TUI operations](docs/operations.md#qwens-own-tui-driven-through-dual-output-286-part-3).
|
|
174
|
+
|
|
158
175
|
Before you migrate a memory home with `amem`, read
|
|
159
176
|
[memory profiles and rollout](docs/memory.md#selected-memory-profile). Every hub that
|
|
160
177
|
uses the home must run a version that understands the new layout.
|
|
@@ -172,7 +189,7 @@ show an unverified writer's cause and the person-run next step.
|
|
|
172
189
|
[#258](https://github.com/STAIxBWLB/agent-hub/issues/258)).
|
|
173
190
|
|
|
174
191
|
Live checks that still need a real account or a person are listed in the
|
|
175
|
-
[release verification report](docs/verification/2026-11-
|
|
192
|
+
[release verification report](docs/verification/2026-11-10-0.36.0.md) and the
|
|
176
193
|
[smoke checklist](docs/smoke.md).
|
|
177
194
|
|
|
178
195
|
## Documentation
|
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Human explanation. Agent instructions: the area notes in this directory.
|
|
4
4
|
|
|
5
|
+
On 2026-11-10, #1352 R1 separated newly authored stage evidence, fallback and
|
|
6
|
+
whole-wire sizing from the remaining legacy route modules. The models note
|
|
7
|
+
points at the stage contract and its single switch planner; generic decision
|
|
8
|
+
evidence v1, the remaining route decisions and notice cleanup have separate
|
|
9
|
+
ownership boundaries.
|
|
10
|
+
|
|
5
11
|
In the #1055 review, the new title-binding lookup preceded invocation,
|
|
6
12
|
pending-delivery and supervision bookkeeping in `Bus.onDelivered`. The bus's
|
|
7
13
|
outer observer catch protected settlement but could not finish bookkeeping
|
|
@@ -91,8 +97,62 @@ Review of PR #1052 found that full-index trust sweeps and hashing every retained
|
|
|
91
97
|
|
|
92
98
|
The ledger review of PR #1052 found that applying the startup admission wait to worker completion could strand the ledger in running state after contention or a crash. Signed process ownership, an atomic dead-owner replacement, a normal worker wait and read-only doctor paths keep deferred maintenance recoverable and visible.
|
|
93
99
|
|
|
100
|
+
On 2026-11-09, #1220 T1 classified malformed root/limit input as source corruption.
|
|
101
|
+
T2 initially repeated that cause error for an explicit attempt address whose id
|
|
102
|
+
was not an owner-supported attempt id. The query-validation rule in tasks.md
|
|
103
|
+
separates caller mistakes from source failures; the execution-lineage and owner
|
|
104
|
+
fixtures cover both cases, including source-lookup traps and neutral agent replies.
|
|
105
|
+
|
|
94
106
|
On 2026-11-09, the #1320 Record read projection used the global configuration
|
|
95
107
|
revision. A roster-only reload then discarded a held public recall response, so
|
|
96
108
|
the existing #315 preface test lost its preface even though the independent
|
|
97
109
|
off-roster attach guard remained correct. The memory/privacy-specific read
|
|
98
110
|
revision preserves both behaviors; capture still uses its stricter turn fence.
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
## Changes
|
|
114
|
+
|
|
115
|
+
- 2026-11-10: #850 distinguishes normal-Bus Q2 proof from direct busy-submit characterization and preserves adoption/reattach/deny quiescence ceilings.
|
|
116
|
+
- 2026-11-10: Spec acceptance carry-over (#1328 T4) distinguishes a new person decision from host-verified reuse of the same decision on explicitly superseding work. The narrow exception preserves original consent and records its cancelled source; it does not expose acceptance as a tool or receipt field. Review caught an early carry write before a later plan refusal: staging the host proof and committing only with the admitted outer event preserves the existing pre-effect refusal contract.
|
|
117
|
+
- 2026-11-09: #1328 T6 extended the closed machine-default schema for an explicit setup research choice, reusing guarded publication and preserving the existing autonomy and start choices.
|
|
118
|
+
|
|
119
|
+
## 2026-11-10: Qwen dual-output Q2
|
|
120
|
+
|
|
121
|
+
The v2 native workload appended a second submit directly while the first provider
|
|
122
|
+
response was held. Its private 0.26.1 matched control and later candidates emitted
|
|
123
|
+
one user event and one final assistant/stop containing both markers. The extra
|
|
124
|
+
provider POSTs were not classified by response format or role counts, so their
|
|
125
|
+
underlying cause is unknown. That workload did not reproduce the original
|
|
126
|
+
0.26.1 receipt's native-queued-turn claim; the original used a real gateway and a
|
|
127
|
+
global installation that changed during the day.
|
|
128
|
+
|
|
129
|
+
Ruling fa75c5f2-fc78-42a1-85dc-cf206e6a7825 makes required Q2 follow the actual normal
|
|
130
|
+
Bus and QwenDualPeer path. The second envelope waits in the Bus during the held
|
|
131
|
+
first response. Distinct native user/provider/final assistant/stop boundaries
|
|
132
|
+
remain necessary. Direct native busy-submit behavior is separate characterization.
|
|
133
|
+
The manual producer does not make the receipt harness eligible for automation.
|
|
134
|
+
|
|
135
|
+
Adoption can report idle with an unknown pre-existing turn; reattachment can
|
|
136
|
+
report idle before proving native quiescence; deny marks the hub turn ended before
|
|
137
|
+
native consumption is acknowledged. Those existing ceilings prevent an absolute
|
|
138
|
+
claim that no input can ever reach a native active turn. The premature deny/idle
|
|
139
|
+
follow-up is outside this compatibility change; the production adapter is unchanged.
|
|
140
|
+
|
|
141
|
+
The final account-free normal-Bus Q2 runs passed on the private 0.26.1 control
|
|
142
|
+
and 0.27.0 candidate, with two user/final-stop/provider turns after evidence was
|
|
143
|
+
frozen at owned stop. Two earlier normal-path controls failed the strict provider
|
|
144
|
+
check despite observing two real turns. Shipped-source analysis showed `--bare`
|
|
145
|
+
bypassed the private UI follow-up setting; the corrected fixture loads owned full
|
|
146
|
+
settings. The earlier extra requests remain unattributed because their latest
|
|
147
|
+
user bodies were not retained. The [dated receipt](../verification/2026-11-10-qwen-0270-dual-output.md)
|
|
148
|
+
separates these attempts and the 0.26.1 config-only observation from the later
|
|
149
|
+
passing required Q3/Q5/Q6/Q7 pair. The remaining producer preserved a PTY/catalog
|
|
150
|
+
control failure and a host FIFO-helper setup failure before the final matched
|
|
151
|
+
pair passed with owned cleanup/final closure. The independent direct-busy pair
|
|
152
|
+
on both versions observed one user/assistant/Stop with both markers in one
|
|
153
|
+
assistant, while required normal-Bus Q2 retained two distinct turns. No production
|
|
154
|
+
adapter, Bus or automatic receipt-admission behavior changed.
|
|
155
|
+
|
|
156
|
+
The task 859 deny-readiness correction separates known delivery disposition from native quiescence. Task 850 measured no post-deny completion ACK; normal-Bus assistant/Stop evidence cannot be reused for the denied turn. The durable fence keeps a synchronous Bus drain from submitting queued work and allows recovery through a new personal turn or a verified fresh generation. The 30 s deadline is an operational waiting bound, not evidence that native work stopped.
|
|
157
|
+
|
|
158
|
+
The same review found that a single append can write a prefix without throwing. The byte-count check and actual tail guard prevent a second append from completing that prefix. This intentionally adds no per-write persisted intent: a crash leaving a torn prefix that already ends with newline remains the explicit ceiling.
|
|
@@ -89,13 +89,16 @@ Scope: the Codex, ACP and Pi adapters and the Pi extension (turn `generation` an
|
|
|
89
89
|
|
|
90
90
|
## Qwen's dual-output TUI (#286 Part 3)
|
|
91
91
|
|
|
92
|
+
- Before qualifying another dual-output version, read the required Q2 normal-path contract in `docs/specs/2026-09-19-agent-hub-design.md` (Qwen dual-output TUI amendment) and use `scripts/compat-receipts/proofs/qwen-dual-bus-q2.ts`. Keep direct-native-busy-submit characterization separate; do not change automation admission from this manual proof. Do not infer native quiescence from adoption, event-file reattachment or hub deny settlement; preserve their separate ceilings when reporting qualification. Background for changing this rule: `README.md` in this directory.
|
|
93
|
+
|
|
92
94
|
- `src/adapters/qwen-dual.ts` drives Qwen's own TUI through `--input-file` and `--json-file`; it is started only by `ahub qwen --mode tui`, through the definition's `start.createTui` and the `qwen-dual` daemon port, both fixed-builtin capabilities (`assertNativeCapabilityScope`). Qwen's `start.forms` stays `["headless"]`: never add `tui` to it (that would make Qwen a start-mode peer the hub opens by itself, and would change `START_MODE_PEERS`, a cross-release probe). The launcher needs a terminal and the base `qwen` id; the daemon refuses a TUI start for a declared instance, off roster or while a headless Qwen runs.
|
|
93
95
|
- Judge a Qwen TUI by `holdsTerminal()` (its bound owner verified alive, or a session seen with no owner bound), never by peer state: a detached TUI reads offline while Qwen keeps running. A headless start over a held terminal is refused and a TUI start answers `already`.
|
|
94
|
-
- Gate the TUI on `COMPAT["qwen-dual"]` (verified 0.26.1, no `line`), both before the start (`qwenDualVersionAsync`) and from the TUI's own `session_start` (version, `protocol_version` 2, the events read). Never widen the headless `qwen` entry for it, or the other way round: their receipts are separate.
|
|
96
|
+
- Gate the TUI on `COMPAT["qwen-dual"]` (verified 0.26.1, 0.27.0 and 0.27.1, no `line`), both before the start (`qwenDualVersionAsync`) and from the TUI's own `session_start` (version, `protocol_version` 2, the events read). Never widen the headless `qwen` entry for it, or the other way round: their receipts are separate.
|
|
95
97
|
- `deliver()` sets `busy` synchronously and appends one `submit`; a prompt that is not the hub's own (matched by its text) is the person typing: the peer stays busy, nothing is shared, no approval is asked of the console. A submit that starts with `/`, `!`, `@` or `?` gets an `[agent-hub]` first line: Qwen reads a submit as typed input (slash command, shell line, file include). A turn ends at an `assistant` whose `stop_reason` is not `tool_use` followed by `message_stop` (or a `result`); a `tool_use` message never ends it.
|
|
96
98
|
- A Qwen background-task notice is not the person typing (#517): when a background shell finishes Qwen writes a `user` event of its own, which can land in the middle of a running hub turn, and several finished shells fold into one event. `isQwenTaskNotification` accepts exactly one or more whole `<task-notification>` envelopes (task id, kind, status header, blank line between envelopes) and nothing else; `onUser` judges the raw event, not `promptText` (which joins every text block and drops the rest): the content must be exactly one text block that is wholly the envelope, so a split or mixed-block event is a person's prompt. Such an event changes nothing: a running hub turn keeps its owner and is not failed, and an idle peer stays idle (never mark it busy for a notice nobody may answer). Read nothing inside an envelope beyond its header, and never loosen the shape: a prompt that only contains or resembles one is still a person's prompt and still settles a hub turn as uncertain. The old reading held 7 of 7 recorded `needs_review` queues; when a new Qwen event type shows up inside a turn, check the live `events.jsonl` against `onUser` before widening anything.
|
|
97
|
-
-
|
|
99
|
+
- After appending a Qwen deny, retain a durable input fence and settle only the delivery as known `completed`; never report idle from the deny, a denied-turn assistant/Stop, a control response, file readability or elapsed time. Check the fence write before appending the deny. Release it only after a newly observed same-session personal USER and that personal turn's normal final assistant/message_stop under the same verified owner, or a verified fresh native generation. Expire the named 30 s wait to offline with an actionable notice, retain queued input and the fence, and keep observing those recovery proofs after expiry. Persist the fence across detach, stop and adoption; an adopted fence needs a new personal USER, never buffered history. The watchdog never cancels: keep stalled turns busy; never type into the terminal, signal a turn or invent an input/ACK schema.
|
|
98
100
|
- Only an exact hub tool name is auto-approved (`autoApprove`, the daemon's `HUB_TOOL_TITLES`), and an always-ask class call never is. A `control_response` for a request the hub has not answered means the person answered in the TUI: abort the hub's pending request so a late console answer finds nothing. A request other than a hub tool that names the hub state dir (`qwenDualNamesStateDir` against `guardDir`) is refused before anyone is asked: the input file is a prompt channel (`docs/security.md`).
|
|
101
|
+
- Write each Qwen input record as one full UTF8 Buffer and require its full byte count, never retry a remainder. A short/throwing write settles uncertainty as `needs_review` and offline; a non-newline tail before append or attachment also blocks input. Only a verified fresh generation may reopen that file, never personal completion. Preserve the documented torn-prefix-ending-newline ceiling; add durable write intents only if that failure is observed.
|
|
99
102
|
- The event file is read from the saved offset in `state.json`. Qwen opens an existing event file at byte 0 without truncating it (measured on 0.26.1), so a fresh or resumed launch starts from empty files (the old event file is kept as `events.prev.jsonl`) and a hub restart adopts a still-running Qwen from the saved offset instead. The owner is bound from the host's process table (the root of the tree of processes whose argv names this adapter's input file; two separate roots is no owner), never from anything the launcher sends. An unreadable event file is `detached` (offline, the `qwen-detached` status notice), never idle, and reattaches when it reads again; a stall shows `qwen-stalled`. An event line over 1 MiB is dropped through its newline and the saved offset moves past it.
|
|
100
103
|
- Recovery never restores this terminal as a headless worker (`QWEN_RECOVERY_SESSION.recoveryRefusal`), and `stopPeer` refuses a Qwen TUI: the hub never signals a person's Qwen.
|
|
101
104
|
|
package/docs/agent-notes/bus.md
CHANGED
|
@@ -21,6 +21,7 @@ Scope: delivery, digests and condensation, reply addressing, priority and limits
|
|
|
21
21
|
- A reply is addressed, never broadcast. An adapter that answers a delivery passes `to: replyAudience(envs)`; anything else with an `inReplyTo` inherits that envelope's sender. Leaving `to` out or empty fans the message out to every peer. The control `send` takes a nonempty string `to` as that one peer and refuses any other non-array shape or bad item before publishing (#963); never turn a malformed `to` into a broadcast.
|
|
22
22
|
- `digest` is not a peer: addressing a reply at the envelopes the peer was handed sends it nowhere once a delivery was condensed. The bus resolves `digest` back through `lastDelivery.originals`; anything else that reads a reply's `to` has to do the same.
|
|
23
23
|
- A pull-only peer (a Claude session without channel pushes, Kimi in its own TUI, or agy) is never drained by a push; `Bus.pull` hands it its queue oldest first up to `bus.pull_budget_bytes` (#489 H3; unset is `PULL_BUDGET_BYTES`, 64 KiB of `frame` text, #713; `takeBudget`), the first item always going so one huge envelope cannot stall it, and a poison one still alone. A push peer, and an attached channel session that is not pull-only, keep `take`'s `bus.digest_max` (at most `DIGEST_MAX`): never raise that for a pull. The daemon's `inbox` reply carries `waiting` and the plugin says `N more waiting: call hub_inbox again before you start work`. An attached channel session may also pull its own queue through `hub_inbox` while busy (#493); journal completion rules still apply. Drain and pull retain recovery, pause and lifecycle `deliveryHeld` fences; an explicit `hub_inbox` pull may pass only a `needs_review` uncertainty hold (#1079), returning newly queued work and bounded held-row metadata while leaving held originals and automatic delivery held. Orphaned dispatching/accepted deliveries, storage failure and unknown hold evidence still refuse. Both paths use `remember()` (so `reply_to` resolves), and a drain rechecks `deliverable()` after condensing because such a session can take the peer meanwhile. A pull is journaled `completed` in the same transaction as the bus snapshot, never `accepted`; a failed one puts back only that peer's queue and preface and never reloads the snapshot.
|
|
24
|
+
- The held-body view in `hub_inbox` (`Bus.heldInbox`, `inboxHeldRead` in `daemon.ts`, #1359) is inspection only: it never settles, retries, resolves, changes an attempt or records a task-offer read, and it reads only the authenticated caller's own `needs_review` rows (plus `accepted` for an explicit-settlement channel). Bound rows (`HELD_DELIVERY_PAGE`) and raw bytes (`bus.pull_budget_bytes`) in SQL before hydrating originals, render bodies only through `publicDeliveryBodies` (`src/hub/delivery-public.ts`), and treat an overflowing, unreadable or unknown window as observer-excluded (`hasHeldReviewScope`). A failure in it never discards the committed normal pull. Read `docs/design/bus.md` before changing it.
|
|
24
25
|
- Record exact task-offer reads only through `DeliveryJournal.completeDelivered` on an active-fenced adapter completion, correlated reply or actual pull, atomically with completion. Capture original offers before terminal pruning and record their ids, never condensed ids; accepted receipts, generic transitions, operator/hub dispositions and restored completed rows are not read evidence.
|
|
25
26
|
- The `onImportantQueued` nudge for a pull-only peer (#398) is advisory: it never dequeues, steers, journals or settles, and a throw from it never stops an enqueue.
|
|
26
27
|
- Merge recall and restored prefaces through `mergePrefaces`/`uniqueMemoryLines`; preserve distinct context and new notes, deduplicate memory identities, and keep colliding short prefixes distinct. Use `recallDisplayText`/`recallMemoryLines` before display caps: suppress only matching automatic approval outcomes, retain nonempty rejection details, preserve id headers and complete-word excerpts, and keep token trimming at line boundaries. Keep these changes display-only.
|
|
@@ -32,7 +32,7 @@ Scope: the operator console, control WS and its protocol, state files, the dashb
|
|
|
32
32
|
- Console Queue `D` (#713) only prefills `queue discard --peer <selected row's peer> --reason `; Enter refuses a missing peer or reason and arms a `y` confirm that names the count, then runs the person's `ahub queue discard ... --yes`. Without `--state` the confirm counts the peer's queued and unsettled failed rows; the console sends that form only when the hub's `features` list `queue_discard_states`, otherwise it sends `--state queued` (#1103). Beyond `list`, the `queue` op is the console's or an admitted conductor's (`admitOperational`, `show`/`resolve`/`discard` only); `discard` without `confirmed` only counts, and a confirmed one needs a reason, is refused during recovery or shutdown and discards row by row through `resolveDelivery` (rule: `bus.md`).
|
|
33
33
|
- Console Usage panel (#683 U3): tab `7`, text from `src/cli/console-usage.ts` (pure strings, no terminal or state import), rendered in `console-state.ts`, fetched in `console.ts` `refresh()` only while panel 7 is open. It reads the `usage` op and nothing else: no event-log read, no board field beyond the task id selected in Tasks. A refusal shows `usage unavailable`, never empty usage; an unknown counter is `unknown`, never 0; a private task is `#id [pii]` from the op's `taskPii`, never a title. The `usage` op folds with `catchUp(250)` and answers `behind: true` when it is not done: never answer from one pass of a big log. Keep Left/Right from 7 wrapping like Settings so the `1`..`5` cycle (#309) stays pinned, and keep PAUSE and 7D out of the width drop list.
|
|
34
34
|
- Dashboard snapshot `view` (#683 U4): the daemon's `ui_snapshot` and the manager's forward pass a request's `view` only through `dashboardView` (`DASHBOARD_VIEWS` in `src/hub/ui.ts`); keep that list equal to the page's `DASHBOARD_VIEWS` in `src/ui/index.html`. Any other value is dropped, never forwarded.
|
|
35
|
-
- acon plugin (#935): `src/ui/plugin.ts` never bypasses `uiAction`'s whitelist or `DASHBOARD_VIEWS`. It reaches project hubs only through `projectConsole` (`src/hub/manager.ts`), the same listing and forwarding `ahub ui --all` uses; widen neither for the plugin. Its inbox verbs map to the hub's own `permit` with an option the request offers. A question's `answer` and a result's receipts (`result_seen`, `results_read_all`, `results_unread_last`, #1054 T6) are the exceptions, and none goes through `projectConsole(...).act` or the `FORWARDED` list from the plugin (the receipts use the `receipt` port beside `answer`, with `receiptEvidence` in `src/ui/plugin-results.ts` checking the same console person meta; the page of `ahub ui` reaches the same three writes as dashboard actions, refused for a live-test session by both `ui.ts` and the daemon). The answer's route is (#1053 T5): `action()` checks the console's person `meta` first, then calls the dedicated `projectConsole(...).answer` port, which sends `answer { surface: "acon", person }` as a console-role control message. `answer` is advertised in `capabilities.actions` (`QUESTION_ACTIONS`) so acon lets the page send it, and is never in `FORWARDED`; widening the dashboard whitelist for it would let a dashboard page answer without person evidence. Acon types are type-only imports from the exact-pinned `@staix/agent-console/contract` entry, never hand-copied. Its panel is built from `renderDashboard()` by exact rewrites that throw when a target line moves: when you edit a rewritten line in `src/ui/index.html` (post, the cookie helper, `$`, the theme `apply`, the view key listener, the title update or the landmark tags), update `panelAssets()` in the same PR. `lifecycle.ts` is loaded lazily there, because it reaches the daemon and CLI files acon's import scan reads. `ahub setup` registers it only through `registerAconPlugin` (`src/cli/acon-register.ts`): `console/plugins/ahub.json` under the hub home names the module and its sha256 (directories 0700, written to a temp file and renamed); the package export `./ui-plugin` is pinned by `scripts/check-package.mjs`. The Space panel (#1012, `src/ui/office-space.ts`) maps only the #264-allowlisted `officeModel` scene, pinned by the #264 marker fixture in `test/acon-plugin.test.ts`; never feed it an envelope body, task detail, path or symbol. A Space snapshot answers within acon's 5 s: the listing gets half of `SPACE_BUDGET_MS` and falls back to the last listing (a late one still replaces it), projects are read concurrently and a late one is left out of that poll, the cached office model is keyed by the daemon's `instanceId` (a restarted daemon restarts its ui sequence at zero), and `pollMs` stays under acon's 3000 ms link gap. The inbox snapshot (#727, #1196) answers within 1 s at p95: the project listing is the one in-flight listing Space also joins (`runningWithin`, half of `inboxProjectBudgetMs`, falling back to the last listing), the running projects' `agents` snapshots are asked at once, each within `inboxProjectBudgetMs` (a project that is late keeps its last rows and their `at`) and joined while pending in the same action generation and instance (`projectFlights`), so a slow project is asked once, not once per poll; concurrent polls join one computation, a result under `inboxFreshMs` is served as it is, one under `inboxStaleMs` is served while one refresh runs (nothing runs while nobody polls), and `action()` bumps a generation before and after it so a computation that started earlier never becomes the cache. The reply holds at most `INBOX_MAX_ITEMS` (50) items, decisions first, with `more`; the `seen` bookkeeping runs before the cut, so a cut item keeps its `at`. Never put a per-request hub call back into `inbox()` outside that single flight.
|
|
35
|
+
- acon plugin (#935): `src/ui/plugin.ts` never bypasses `uiAction`'s whitelist or `DASHBOARD_VIEWS`. It reaches project hubs only through `projectConsole` (`src/hub/manager.ts`), the same listing and forwarding `ahub ui --all` uses; widen neither for the plugin. Its inbox verbs map to the hub's own `permit` with an option the request offers, and an advisory supervision row's two verbs to the hub's own forwarded `supervision` action (#1368). The `guidance` panel (#1376) is the one panel outside `DASHBOARD_VIEWS`: read-only `list`/`show` through `projectConsole(...).guidance`, never an action. A question's `answer` and a result's receipts (`result_seen`, `results_read_all`, `results_unread_last`, #1054 T6) are the exceptions, and none goes through `projectConsole(...).act` or the `FORWARDED` list from the plugin (the receipts use the `receipt` port beside `answer`, with `receiptEvidence` in `src/ui/plugin-results.ts` checking the same console person meta; the page of `ahub ui` reaches the same three writes as dashboard actions, refused for a live-test session by both `ui.ts` and the daemon). The answer's route is (#1053 T5): `action()` checks the console's person `meta` first, then calls the dedicated `projectConsole(...).answer` port, which sends `answer { surface: "acon", person }` as a console-role control message. `answer` is advertised in `capabilities.actions` (`QUESTION_ACTIONS`) so acon lets the page send it, and is never in `FORWARDED`; widening the dashboard whitelist for it would let a dashboard page answer without person evidence. Acon types are type-only imports from the exact-pinned `@staix/agent-console/contract` entry, never hand-copied. Its panel is built from `renderDashboard()` by exact rewrites that throw when a target line moves: when you edit a rewritten line in `src/ui/index.html` (post, the cookie helper, `$`, the theme `apply`, the view key listener, the title update or the landmark tags), update `panelAssets()` in the same PR. `lifecycle.ts` is loaded lazily there, because it reaches the daemon and CLI files acon's import scan reads. `ahub setup` registers it only through `registerAconPlugin` (`src/cli/acon-register.ts`): `console/plugins/ahub.json` under the hub home names the module and its sha256 (directories 0700, written to a temp file and renamed); the package export `./ui-plugin` is pinned by `scripts/check-package.mjs`. The Space panel (#1012, `src/ui/office-space.ts`) maps only the #264-allowlisted `officeModel` scene, pinned by the #264 marker fixture in `test/acon-plugin.test.ts`; never feed it an envelope body, task detail, path or symbol. A Space snapshot answers within acon's 5 s: the listing gets half of `SPACE_BUDGET_MS` and falls back to the last listing (a late one still replaces it), projects are read concurrently and a late one is left out of that poll, the cached office model is keyed by the daemon's `instanceId` (a restarted daemon restarts its ui sequence at zero), and `pollMs` stays under acon's 3000 ms link gap. The inbox snapshot (#727, #1196) answers within 1 s at p95: the project listing is the one in-flight listing Space also joins (`runningWithin`, half of `inboxProjectBudgetMs`, falling back to the last listing), the running projects' `agents` snapshots are asked at once, each within `inboxProjectBudgetMs` (a project that is late keeps its last rows and their `at`) and joined while pending in the same action generation and instance (`projectFlights`), so a slow project is asked once, not once per poll; concurrent polls join one computation, a result under `inboxFreshMs` is served as it is, one under `inboxStaleMs` is served while one refresh runs (nothing runs while nobody polls), and `action()` bumps a generation before and after it so a computation that started earlier never becomes the cache. The reply holds at most `INBOX_MAX_ITEMS` (50) items, decisions first, with `more`; the `seen` bookkeeping runs before the cut, so a cut item keeps its `at`. Never put a per-request hub call back into `inbox()` outside that single flight.
|
|
36
36
|
- Dashboard Usage view (#683 U4): `uiSnapshot` builds `usage` only when the request's view is `agents`, never on a hidden view's poll. It folds with `catchUp(100)` and sets `behind: true` when that is not done, so a partial figure is never shown as the whole. A failed read answers `{ unavailable: true }`, never `undefined`, which the page reads as a hidden view and keeps the old figures. The snapshot carries task ids, a `pii` flag and numbers only, never a title; the page shows a private task as `#id [pii]`. Daily figures come only from `UsageRollup.daily` (rule: `budget.md`).
|
|
37
37
|
- Dashboard Code group (#684 2c): `codeGroup` (`src/hub/task-code-group.ts`) is the only dashboard classifier of changed symbols against `plan.symbols`, called in `uiSnapshot` with the public `codeSymbols`, `tasks.publicMetadataText` and `tasks.isPii`; the page (`codeGroupSection`) draws it and never matches names. A private task gets no `codeGroup`. A stored receipt (one with `repositoryKey`), a missing or an unknown one is `state: "unknown"`. A malformed or screened-out plan name is counted in `planWithheld` and marks the group incomplete, never dropped. Lists stop at `CODE_GROUP_MAX` (40) with the rest in `more`, and `counts` are totals. The memory view reads a `node` of up to 512 characters only when it starts with `symbol:` (200 otherwise).
|
|
38
38
|
- Worktree shelf (#1057, `worktreeShelf` and `worktreesView` in `src/hub/daemon.ts`; spec `docs/design/task-board.md`): never add a worktree or branch removal to the daemon (its only one stays the empty hub-made task worktree in `src/hub/task-worktree.ts`); shelf removal exists only in the person's `ahub worktrees tidy --confirm` (`src/cli/worktree-tidy.ts`), which `daemon.ts`, `worktree-shelf.ts`, `board.ts`, `ui.ts` and `plugin.ts` never import. GitHub is read only by `worktrees_refresh_prs` (`refreshPrStates`); a snapshot, `ahub worktrees` and the inbox alert never reach it, and `worktreesView` answers from its 30 s cache without awaiting git. The `worktrees` read is open to a tools caller outside a private turn; override set/clear and the refresh are console-only and refused for a live-test dashboard session. After the awaited git reads, ask the recovery/stopping fence again, then read and write the board with nothing awaited between. The board keeps only the person's Park/Pin (`worktree_override`), never a derived settled state, and accepts one only for a path the shelf just listed, never the main checkout or an instance worktree.
|
|
@@ -49,7 +49,7 @@ Scope: the operator console, control WS and its protocol, state files, the dashb
|
|
|
49
49
|
- `pet` is console-local presentation (#483): validate it only through `validatePetConfig`, which both `loadConfig` and the reload schema call, and keep it applied live with no authority (`authorizeConfigLeaf`). The floating window is retired (#1012): strip a legacy `pet.window` only through `stripLegacyPetWindow` (in `loadConfig`, `parseConfigSources` and `validatePetConfig`, keeping the raw value for the trust layer). It is reported once in `retired`, refused as a config leaf and never published, and `ahub pet --window|--palette` only print `PET_WINDOW_RETIRED_NOTICE`.
|
|
50
50
|
- Start modes (#269): every start the hub makes itself goes through `hubStart` (`src/hub/daemon.ts`): the dashboard's `start_peer`, the console-role `peer_start`, the conductor's `start` hook and `pi.auto_start`. It takes the mode from `startMode(peer)` and nothing else; never add a caller-chosen mode, flag or command to it, and never fall back to headless when a terminal cannot be opened (refuse with the manual command). The words a terminal runs are assembled there from `process.execPath`, the CLI entry, the project root and `startWords(peer)`. The only continuity exception is a validated Pi bookmark on `pi.auto_start`: append its recorded session file (or its session id when no file was recorded), backend and model; never pass both session selectors or accept caller-written replacements. Recovery and `startPeer` callers that pass a recorded mode keep it. A launcher with no `--mode` takes the daemon's accepted start mode from `status.json` `startModes` (`readControl`) before the file's value. A TUI start of an `owned-acp` peer (Jcode) from the console's `peer_start` opens its terminal even while the ACP owner is online: that terminal is a frontend on the owner. The conductor and the dashboard answer `already` for an attached one (#559). The real terminal providers are wired only in `src/hub/lifecycle.ts` (`DaemonOptions.terminal`): a daemon built without them, as in every test, opens nothing; a test injects a recording provider and never the real one.
|
|
51
51
|
- A headless start that `hubStart` made for a peer with `capabilities.watch` (Kimi, Qwen) also opens `ahub watch <peer>` through `openWatchPane` (#286 AC10): the same provider, fixed words from `process.execPath`, `CLI_ENTRY`, the project root and the peer id, one per peer per `PEER_START_RETRY_MS`. It runs only after the start succeeded and never fails it: no provider or a failed open reports `watch.command` in the result and a notice, with the provider's own text in the log only. Never open a pane for an `already` result or a declared instance.
|
|
52
|
-
- Default agent set (#608): `start.agents` is read only by the CLI at a person's `ahub up` and by the dashboard manager's start (`afterStart` in `src/hub/manager.ts`), through the console `peer_start` and so through `hubStart` (`src/cli/start-agents-run.ts`). The daemon never reads it: do not add a start from it to daemon startup, restart, recovery, `reloadConfig` or upgrade, and keep the `AGENTHUB_RECOVERY_OPERATION`, `--live-test` and console-caller guards on the `up` body together (each overlaps another, and removing one is caught only because the test removes them all). It is in `ALL_MACHINE_LOCAL` with an empty list kept as a value (`EMPTY_IS_VALUE` in `config-trust.ts`): an empty list means start none, never the default. `src/hub/start-agents.ts` and `config-apply.ts` stay free of file-system imports because the schema reaches the Claude channel bundle. `defaults.json`
|
|
52
|
+
- Default agent set (#608): `start.agents` is read only by the CLI at a person's `ahub up` and by the dashboard manager's start (`afterStart` in `src/hub/manager.ts`), through the console `peer_start` and so through `hubStart` (`src/cli/start-agents-run.ts`). The daemon never reads it: do not add a start from it to daemon startup, restart, recovery, `reloadConfig` or upgrade, and keep the `AGENTHUB_RECOVERY_OPERATION`, `--live-test` and console-caller guards on the `up` body together (each overlaps another, and removing one is caught only because the test removes them all). It is in `ALL_MACHINE_LOCAL` with an empty list kept as a value (`EMPTY_IS_VALUE` in `config-trust.ts`): an empty list means start none, never the default. `src/hub/start-agents.ts` and `config-apply.ts` stay free of file-system imports because the schema reaches the Claude channel bundle. `defaults.json` permits only `schema`, `autonomy`, `start.agents` and optional boolean `research.enabled`; `writeAutonomyDefaults`, `writeMachineStartAgents` and `writeMachineResearch` preserve the other choices through the same owner-only guarded CAS. Only an explicit person `ahub setup --research|--no-research` writes the research default; ordinary setup and init never write it, and any other key still makes the whole file untrusted.
|
|
53
53
|
- `ahub setup` reads Claude Code's state from `--json` listings and takes one step at a time, re-reading after each; never match paths or names by substring. It installs and judges only the `user`-scope agent-hub plugin row; a `project` or `local` row is reported as preserved and never removed, and a marketplace removal that would remove one is blocked, not run (#1073).
|
|
54
54
|
- A copy of the git index keeps the original's mtime (`snapshot()`): git's racy-entry check compares entries with the index file's time in whole seconds, and a fresh copy makes a same-size edit look clean.
|
|
55
55
|
- State files that clients read (`status.json`, `control-token`) are written after the port is bound, and `status.json` via temp file + rename.
|
|
@@ -64,9 +64,10 @@ Scope: the operator console, control WS and its protocol, state files, the dashb
|
|
|
64
64
|
- Adding a native peer requires testing the command emitted by the actual recovery driver, not only its inspection or launch helpers. Never let a generic non-Codex branch treat a new peer as Claude.
|
|
65
65
|
- Cross-version recovery must use the authenticated source protocol for prepare/commit/abort and the target protocol after startup. Prove the transition against a real prior release before claiming compatibility.
|
|
66
66
|
- Preserve `task_cancel` target-feature preflight before source holds, capture or commit. Reuse stored target features only after verifying the same retained root and digest; legacy receipts still capable of commit must obtain feature proof. Do not apply pre-commit compatibility checks to sources already past commit. Every prepare, including the lease renewal before a terminal close and after a resume, sends the operation's stored `targetFeatures` (#478).
|
|
67
|
-
- A recovery target-feature floor (`task_cancel`, `invocation` while the invocation ledger has an open (`queued` or `delivered`) row, `peer_instances`, `role_stages` while a declared Claude-kind instance holds `implementer`, `task_planners` while a list/instance planner is configured or `Board.hasPlannerState()` finds a task/release binding or plan-review authorship marker, `release_trains` while a configured train is active or frozen, `reviewer_pool` while a fresh reviewer or `review.pool` is configured, `configured_acp` while the project declares `adapters`, `external_adapter_modules` while external module definitions are loaded, `external_adapter_instances` with `external_adapter_modules` and `peer_instances` while an external module-kind instance is declared, `conductor_recovery` while `Board.hasConductorManualState()` finds open conductor manual-assignment intent, `project_autonomy` while the daemon holds retained autonomy consent or a raw `config.json` or `config.local.json` has a top-level `_autonomy` key (an unreadable file refuses as unknown), `calendar_schedules` while a raw `schedules` entry has a `cron` or `tz` key (#1017: an older target refuses the key at load), `research_records` while `Board.hasResearchState()` or a raw `config.json` or `config.local.json` `research` object names `runners` (unreadable refuses as unknown), `research_dispatch`, `research_dropped_offers`, `research_experiments`, `research_comparisons` and `research_evidence` while `Board.hasResearchDispatchState()`, `hasResearchDroppedOffers()`, `hasResearchExperimentState()`, `hasResearchComparisonState()` and `hasResearchEvidenceState()` find rows (each research digest joins `integrity()` only when its rows exist), `research_runners` under the runner registration rule below, `review_comments` while `Board.hasReviewCommentsState()` finds stored comments or packages (its `reviewComments` digest joins `integrity()` only then), `review_observer_input_state` while the journal (`hasReviewInputState`) or a live or recovery-snapshot peer holds review input (unreadable refuses as unknown), `accepted_delivery_settlement` while `Bus.hasAcceptedTimeoutHolds()` finds a timeout hold (unreadable refuses as unknown), `action_policy_floor` while the raw `config.json` or `config.local.json` names `action_policy.floor`, true or false, even where the key is ignored or normalized away: an older target parses the raw key and rejects it before any trust rule, so check raw file presence, never the effective config (#582, seen twice)) lives in `incompatibleRecoveryTarget`, which every existing check site calls, and its name in `DAEMON_FEATURES`; never check a floor at one site only.
|
|
67
|
+
- A recovery target-feature floor (`task_cancel`, `invocation` while the invocation ledger has an open (`queued` or `delivered`) row, `peer_instances`, `role_stages` while a declared Claude-kind instance holds `implementer`, `task_planners` while a list/instance planner is configured or `Board.hasPlannerState()` finds a task/release binding or plan-review authorship marker, `release_trains` while a configured train is active or frozen, `reviewer_pool` while a fresh reviewer or `review.pool` is configured, `configured_acp` while the project declares `adapters`, `external_adapter_modules` while external module definitions are loaded, `external_adapter_instances` with `external_adapter_modules` and `peer_instances` while an external module-kind instance is declared, `conductor_recovery` while `Board.hasConductorManualState()` finds open conductor manual-assignment intent, `project_autonomy` while the daemon holds retained autonomy consent or a raw `config.json` or `config.local.json` has a top-level `_autonomy` key (an unreadable file refuses as unknown), `calendar_schedules` while a raw `schedules` entry has a `cron` or `tz` key (#1017: an older target refuses the key at load), `research_records` while `Board.hasResearchState()` or a raw `config.json` or `config.local.json` `research` object names `runners` (unreadable refuses as unknown), `research_dispatch`, `research_dropped_offers`, `research_experiments`, `research_comparisons` and `research_evidence` while `Board.hasResearchDispatchState()`, `hasResearchDroppedOffers()`, `hasResearchExperimentState()`, `hasResearchComparisonState()` and `hasResearchEvidenceState()` find rows (each research digest joins `integrity()` only when its rows exist), `research_runners` under the runner registration rule below, `review_comments` while `Board.hasReviewCommentsState()` finds stored comments or packages (its `reviewComments` digest joins `integrity()` only then), `review_observer_input_state` while the journal (`hasReviewInputState`) or a live or recovery-snapshot peer holds review input (unreadable refuses as unknown), `accepted_delivery_settlement` while `Bus.hasAcceptedTimeoutHolds()` finds a timeout hold (unreadable refuses as unknown), `action_policy_floor` while the raw `config.json` or `config.local.json` names `action_policy.floor`, true or false, even where the key is ignored or normalized away: an older target parses the raw key and rejects it before any trust rule, so check raw file presence, never the effective config (#582, seen twice), `model_overrides` while runtime model overrides are stored, `visuals` while visual records or a raw `visuals` config key exist, `guidance_variants` while `Board.hasGuidanceVariants()` finds rows (#1367) and `execution_lineage` while `Board.hasExecutionReferences()` finds declared references (#1341); for these three a read that throws refuses as unknown) lives in `incompatibleRecoveryTarget`, which every existing check site calls, and its name in `DAEMON_FEATURES`; never check a floor at one site only.
|
|
68
68
|
- Project autonomy (`autonomyCommand` in `src/hub/daemon.ts`, `writeAutonomyPreset` in `src/hub/settings.ts`): the `autonomy` control message is console-only; its operations come only from `planAutonomy` and `autonomyRemovalKeys`, never from the request; `off` removes the fixed key list and clears consent whatever `_autonomy` says. `_autonomy` is inert metadata, never approval provenance. Retained consent is created only by `createAutonomyConsent(...).confirm` inside the daemon (console `on`, or startup under a trusted `readAutonomyDefaults` opt-in with an exact plan match), never by a CLI or offline writer; a config `never-ask` takes effect only for a peer in `autonomyConfirmed`.
|
|
69
69
|
- Defer hub notices only for an authenticated recovery `prepare` or `commit` whose target features include `recovery_deferred_hub`, or for a restored daemon. Otherwise `setRecoveryHold(true)` moves the deferred notices into queues before commit records expected integrity, and a bare `fenceRecovery` defers nothing. Abort and lease expiry release the bus hold before clearing the operation; if that release fails, keep the operation and let expiry retry on its 1 s timer (#478).
|
|
70
|
+
- A restored daemon releases deferred hub notices before `tasks` is initialized (#1353), and the bus's `silence` hook (`src/hub/daemon.ts`) runs for them: keep its Tasks-independent exclusions (user, hub and digest senders, `fyi`, non-chat kinds, the user recipient) ahead of `turnFree()` and any `tasks` call (`test/deferred-hub-startup.test.ts`).
|
|
70
71
|
- Resume a prepared `commitSent` source that is unavailable or database-busy inside the existing bounded shutdown poll; never re-send commit, re-prepare or close terminals again on that path. Require confirmed `stopped` before target startup, refuse a replacement instance, and retain the prepared receipt on timeout.
|
|
71
72
|
- Keep restoration receipts explicitly tagged as pending, waiting with origin/binding, done with binding, or failed. Project waiting origins as `waiting:pending` and `waiting:failed`; preserve the chosen binding and origin across interruption instead of inferring completion from an object.
|
|
72
73
|
- A zero-turn Claude session has no transcript, so it can never be resumed: every identity gate that compares session ids (restore, coordinator verify, daemon readiness) must tolerate a fresh session while the transcript is absent and stay strict the moment one exists. An instance's transcript counts as missing only on positive ENOENT/ENOTDIR of its own reported path (`transcriptPersisted`, `pathEvidence`); with no reported path or another lstat error, treat it as persisted. The commit snapshot records `sessionPersisted` for the restored daemon, and snapshots too old to have it are re-derived from disk. Never treat "session id changed" as proof of a lost conversation without checking the transcript first. A post-restore detachment repair (#463) is bound to its last accepted session even when its transcript is absent; never use the zero-turn exception to replace that recorded conversation.
|
|
@@ -139,7 +140,7 @@ Scope: the operator console, control WS and its protocol, state files, the dashb
|
|
|
139
140
|
|
|
140
141
|
- 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`.
|
|
141
142
|
|
|
142
|
-
- 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). 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).
|
|
143
|
+
- 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).
|
|
143
144
|
- 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.
|
|
144
145
|
- Memory sync (#438): stop an in-flight `syncMemory` only through `syncStop` (`src/hub/daemon.ts`), and await `syncRun` before the memory store closes, as `stopOnce` does. agent-mem runs the sync's git in its own process group, so a process that ends without `daemon.stop()` leaves that git and its transport child holding the memory repository. A signal the hub exits on goes through lifecycle stop (`STOP_SIGNALS` in `src/hub/lifecycle.ts`: SIGINT, SIGTERM, SIGHUP, SIGQUIT), never the default action; SIGQUIT in particular must not reach its default core dump (Bun honours it: agent-mem #435 measured a 5.9 GB core file and a delayed exit). The forced exit after the shutdown deadline stays `process.exit`. Except for a latched typed writer-attestation refusal, a sync result is logged as a failure only when `quietSyncError` is false: a missing remote in either agent-mem wording (`no sync remote`, `no generation sync remote configured`) and a stop are not failures (#401); a new agent-mem wording for them extends that one predicate. Every pass gets the host screen and policy version (`currentMemorySyncPolicy`, `memorySyncPolicyVersion`, #1173); a version change during the pass records `binding`, never success. Record outcomes only through `reduceMemorySync` and publish them only as `memorySyncView` (`sync` in memory status: closed cause, counts, next step). The log line names the closed cause (`classifyMemorySyncFailure`), never the raw error text. Every pass also passes `placementAttestation` from `hostPlacementAttestation` (agent-mem `createPlacementAttestation`, #1173): build it per pass, never cache or synthesize writer facts, and record a `PlacementWriterContextError` as the closed cause `writer` with its category and cause class (`writerRefusalOf`), never as the generic cause `unknown` or a skip. A latched typed refusal wins over generic quiet, thrown or successful transport outcomes; project unrecognized SDK categories as category `unknown`, never a known category. `DaemonOptions.memorySyncTrigger` is a host-only fixture seam.
|
|
145
146
|
- Room shutdown (#1204 T3): `RoomCommands.stop()` fences new room work synchronously and returns a promise. Await it in `stopOnce` before closing shared storage: it waits for pending room work and each link's bounded offline-presence attempt before closing RoomStore. Preserve an attempted FIFO head and consume shutdown storage controls without admitting new presence or application work.
|
|
@@ -7,12 +7,13 @@ Scope: the model relay and its journal, the hub's own inference and its slots, O
|
|
|
7
7
|
- The PII screen (`screenPii`, #198) is the exception: it fails closed. Every failure (timeout, no or off-campus model, an answer outside `clear` / `pii <category>`, text over `SCREEN_MAX_BYTES` UTF-8 bytes, since a token is at least a byte) is `unknown`, which `Tasks` handles as PII. It never goes through the inference backoff, asks the gateway only after `onCampus()` and with `onCampusOnly`, takes the on-device generation slot under its own deadline (`acquire(abort.signal, 0)` first, one look and `MlxBusyError` when all are taken: a taken slot sends it to the campus gateway, and only off campus does it wait; on campus a failing or still-loading device hands over to the gateway after 60% of the deadline), sends temperature 0 and `reasoning_effort: "none"` on both paths so a reasoning model cannot spend its 32 tokens thinking, and never puts the text in a log line, an error or an event.
|
|
8
8
|
- An `Inference.complete` call that carries PII text (`ahub ask` over PII evidence or a PII question, a private intake `split`) passes `onCampusOnly`: the model is pinned from `fixedModel()` before any gateway await and the transport refuses the Access endpoint. Its `allowed` predicate is read before the call, after the gateway probe and after the answer; `false` or a throw returns `undefined`. The intake split's JSON is never trusted by `Inference`; its caller validates it (`parseIntakeSplit`).
|
|
9
9
|
- Secrets stay inside `OmniRoute`: never put the key or Access values in a log line, an error message, a return value or routing configuration.
|
|
10
|
-
- Keep model selection in process; retain
|
|
10
|
+
- Keep model selection in process; retain remaining Apache-2.0 notices in `src/models/route/` and the upstream provenance check until the separate remnant review. Read `docs/design/model-routes.md` before changing stage evidence, fallback, input sizing or switch contracts. Keep stage-only evidence separate from generic decision evidence v1. Treat legacy routing tables as retired and never rewrite operator files during load.
|
|
11
11
|
- Shared inference slots must recover after a hub process dies, without evicting a live owner. Cancellation has to reach slot acquisition from the relay caller, not just exist in the helper signature.
|
|
12
|
-
- Stay/switch (#197): `hub/auto` and local stage routes apply `stay_switch` only through `
|
|
12
|
+
- Stay/switch (#197): `hub/auto` and local stage routes apply `stay_switch` only through `planStageSwitch` (`src/models/route/stage-fallback.ts`), never at a call site; `shadow` must not change a routing decision (the recorded-decision golden test in `test/route-relay.test.ts`). No route summarizes, trims or rewrites the forwarded conversation: a tier that cannot fit is filtered out. A PII route's planner never sees the conversation size (no prefill bound) and its event omits `prefillTokens`.
|
|
13
13
|
- A change to the model-routing keys of `templates/routing.toml` (`hub_routes`, `local`, `fixed_model`, `stay_switch`, the `[pi]` windows) carries a model-routing receipt (#637 part 2): `bun scripts/benchmarks/model-routing-gate.ts --receipt`, plus `--live` by hand when an alias or a judge moves. The corpus drives the real `HubRouteRuntime`; see "Model-routing promotion rule" in `docs/agent-notes/benchmarks.md`.
|
|
14
14
|
- Load and cooldowns (#199) only reorder a `hub/auto` request's candidates (the route's own backend, then its fallback, as on main), in one ordering step in the relay's fetch handler; a fixed alias is never reordered. Never remove a candidate. A candidate goes first only while it is neither cooling nor `failing` (any failure, an error status or a failed stream included, for `model_relay.cooldown_s` (default 30 s) or until a success; separate from the cooldown streak). Load and pin moves are opt-in (`efficientWaitMs` absent: none) until #199 AC5 measures them. Their attempt is bounded only up to its response headers (`MOVE_FIRST_BYTE_MS`, after `omni.base()`); a cut there marks `failing` without counting toward a cooldown, and a stream that fails after the headers cannot fall back, so do not claim a move never fails a request MLX would have served. None happens while the request runs under an execution budget (`underBudget`, a read that admits nothing; a throw counts as a budget). The selector only names `prefer`; it never picks a moved backend itself. They never consider PII because the relay serves only Pi, which refuses PII work before any model call (`selectModel` in `daemon.ts`); a relay caller that can carry PII must not get a reorder toward DGX without a positive `onCampus()`. Count a cooldown failure only for a transport or startup failure outside a cooldown that was neither cancelled, refused admission, a busy MLX slot (`MlxBusyError`: load, never failure), nor a deadline the relay cut itself (`journalEntry.cut`: `"budget"` for the execution budget's, `"move"` for a moved attempt's first byte, which only marks `failing`); any HTTP answer, whatever its status, ends the streak and the cooldown (`answered`).
|
|
15
15
|
- Relay cooldown policy and journal size (`model_relay.*`, read through `modelOperationalReaders`, #984) are passed only when a relay is constructed, and `inference.backoff_min` only when `Inference` is constructed. Both are restart-bound: a reload never rewrites a running relay's cooldowns or journal, or an existing backoff deadline.
|
|
16
16
|
- MLX owner and generation identity read `ps lstart` with LC_ALL=C/TZ=UTC pinned (#177): unpinned, a record written under one environment reads as a foreign process under another, and the fail-closed paths would refuse the hub's own server.
|
|
17
17
|
|
|
18
|
-
- Optional adec `decision` routes (#554) default off and support shadow only; reject enforce at load with the #554 follow-up and do not keep an application or gateway effort path. Shadow must preserve the recorded stage model, effort and conversation. Send only bounded host-screened evidence after positive campus admission for sensitive turns; sensitive evidence is dimensions only, and remote/review-observer-excluded turns skip the service. Re-read current board/turn privacy and observer facts across awaits and before service HTTP effects and route metadata emission; changed or unavailable authority refuses the stale turn, never a model fallback around that refusal. Keep one opaque user-turn id through the tool loop; let adec recheck its pins and hard rules, rather than caching valid picks in the hub. Validate returned pairs against the route list, retain the heuristic on client failures/no_candidate, and keep evidence, arguments, secrets and service error prose out of route events. Never route PII screening, pure peer assignment or escalation authority through this service.
|
|
18
|
+
- Optional adec `decision` routes (#554) default off and support shadow only; reject enforce at load with the #554 follow-up and do not keep an application or gateway effort path. Shadow must preserve the recorded stage model, effort and conversation. Send only bounded host-screened evidence after positive campus admission for sensitive turns; sensitive evidence is dimensions only, and remote/review-observer-excluded turns skip the service. Re-read current board/turn privacy and observer facts across awaits and before service HTTP effects and route metadata emission; changed or unavailable authority refuses the stale turn, never a model fallback around that refusal. Keep one opaque user-turn id through the tool loop; let adec recheck its pins and hard rules, rather than caching valid picks in the hub. Validate returned pairs against the route list, retain the heuristic on client failures/no_candidate, and keep evidence, arguments, secrets and service error prose out of route events. Never route PII screening, pure peer assignment or escalation authority through this service. A stage route asks it only through `ambiguousStage` (`classifier = "decision"`, `ambiguous_band` default `0.05`, `abs(score - confidence_threshold) <= band`): membership decides only whether the question is asked, the answer is recorded and changes no tier, the two tiers with effort `none` are the only options, and `ambiguous_band = 0` asks nothing.
|
|
19
|
+
- The offline triage evaluation (`scripts/decision-eval.ts`, #554 AC5) is a person-run leg, never CI. It serializes `hub.db` from a read-only connection into one consistent image and reads that copy (never separate `hub.db`/`-wal`/`-shm` copies, which a checkpointing writer can leave on different WAL generations), keeps only planner-classified non-PII rows (no `triaged` or `class defaulted` history, no `pii`/`pii_path` signal, public text), and compares `Inference.triage` against a loopback adec `/v1/route` or `/v1/systemone`, each adec turn id carrying a fresh per-run id so no earlier pin is reused. It is evidence for D5 only: wiring a decider into `Tasks.triage`, `assign()` or the PII screen is a separate decision, and a change here never touches them.
|
|
@@ -4,6 +4,8 @@ Scope: the task flow, assignment, the state machine and the hub's MCP tools. Rea
|
|
|
4
4
|
|
|
5
5
|
- Scope every task-place comparison through `TaskRepositories` (`src/hub/task-repository.ts`, #476): explicit `refs.repo`, else a common outside-absolute-ref repository or parent, else this project. Preserve relative display spelling within that key and gate overlap, contradiction, replay and held evidence by equal keys. Warm/cache repository identity at task mutation and startup; never repeat Git reads for unchanged overlap inputs. Set `refs.repo` for work in another repository; repo-only accept metadata never grants execution or file access.
|
|
6
6
|
- Tool callers are models: MCP `inputSchema` is not enforced on the way in. Normalize at the boundary (`cleanRefs`) before anything reaches the board, and never throw after a board write: a publish or notify that follows a `review()` or `done()` board write goes through the one `releaseNotice` guard, which turns a failed publish into a console notice, drops a failed notify and never retries (#231, #243). An assignment's delivery once its board write is saved (#276, #297): the move is fact, the failed publish is not retried in place (the journal's own recovery covers a storage error, and a retry may duplicate a publish that actually left), and a person looks for a queued or needs_review delivery with `ahub queue list --peer <owner>` (then `ahub queue show <id>`, or the accepted entry in `ahub task show <id>` if the journal is down) before re-sending with `ahub task assign <id> <owner>`. The distinction is made once, in `assignOwner`: a failure after the write prints the one console notice from `undeliveredNotice` right there, once, and throws `AssignmentUndeliveredError` carrying the saved task; callers (`review()`'s repeated rejection, `escalate` and its callers, the ready offer, both relays, the idle sweep, rescreen) decide control flow by the type and print nothing more, and `propose`, `assignTo` and `decline` additionally let the error reach the caller in its turn, which is a person or peer that can act. Two exceptions get no notice, by construction: a row superseded meanwhile, meaning a later history entry that moves or settles the task (another assignment, an unassign, the owner's accept, done, approval, close), while entries that do neither (the hub's quiet bookkeeping: answers, reviewer changes, idle sweeps, check results) leave the assignment undelivered and the notice stands, so the original error goes to the caller as before only on supersession; and a claim's own accepted write and "claimed by" line stay outside the delivery rule (a claim is its own hand-over; its overlap and routing announcements to earlier owners are deliveries and share the wrapper, so a failure there does read as one). A failure before the write stays a plain `Error` (#254), a failed write leaves the ready offer unconsumed (#231), and the notices before the write (waits, no-owner, the reserved-owner line) go through `releaseNotice` too, so those pre-write notices cannot fail their caller.
|
|
7
|
+
- For execution-lineage reads (`src/hub/execution-lineage*.ts`), validate caller limits and producer-kind id grammar before source-owner lookups and the source-corruption catch. Return caller errors as invalid/unsupported, reserve corrupt for source failures, and keep unauthorized responses neutral.
|
|
8
|
+
- Derive attempt/output lineage support from current host policy before raw event paging. With PII paths, deny entries, routing PII patterns or unknown policy, return unavailable independently of stored row contents or counts; retain independently public task/head/deliverable slices. Recover event projections only through a privacy-aware page source, never a derived privacy index, backfill or unbounded scan.
|
|
7
9
|
- Post-await assignment publication is fenced by current role authority: supersession returns the current task without a saved-delivery notice; reviewer-only changes refresh current metadata and do not suppress a valid owner delivery. A replacement notice goes only to a role that actually received the request, not to an unread-only queue.
|
|
8
10
|
- Console or conductor task row assignment/unassignment carries the exact role, task id and `flowRevision` (history length), checks it before effects and passes it to `Board.update`; a changed revision requires reload. Authorized person or conductor owner removal clears owner/reservation and suppresses automatic offers until a later authorized explicit assignment/reservation; retain the host-only `conductorManual` history marker, never infer historical authority from current roles, and require `conductor_recovery` on a recovery target while marked tasks remain open; refuse owner removal under review or after approval, and preserve the required PII person reviewer.
|
|
9
11
|
- Role withdrawal matches the task id, role kind and owner-request header. Owner acceptance evidence must be that peer's accepted entry after the latest ownership event, never another owner's state or an earlier assignment span. Withdraw unread requests without inventing delivery evidence. Find them with `bus.pendingEnvelopes(peer)`, which includes recovery-deferred notices, never the snapshot's queues (#478). Preserve the original former-owner stop notice after a superseding escalation, while suppressing stale success/decision tails.
|
|
@@ -23,6 +25,9 @@ Scope: the task flow, assignment, the state machine and the hub's MCP tools. Rea
|
|
|
23
25
|
- 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: the only trigger is the write that freed the slot.
|
|
24
26
|
- 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.
|
|
25
27
|
- 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`); 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.
|
|
28
|
+
- 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.
|
|
29
|
+
- 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.
|
|
30
|
+
- 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. Contract: `docs/design/task-board.md` "Merged PR adoption".
|
|
26
31
|
|
|
27
32
|
- 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.
|
|
28
33
|
- Completed-change notices (#713, one per recipient per done, accepted work only, superseding by `completedFor`): rule in `bus.md`.
|
|
@@ -37,6 +42,8 @@ Scope: the task flow, assignment, the state machine and the hub's MCP tools. Rea
|
|
|
37
42
|
- `review()` reads `escalateAfter()` (`tasks.escalate_after`, 1-10, default `ESCALATE_AFTER` = 3) at each `changes_requested` verdict, so a reload applies from the next verdict; never capture it at construction or compare against a literal (#488).
|
|
38
43
|
- A guard in `tasks.ts` or `conductor.ts` passes `preEffect` (throws `PreEffectToolRefusal`, `src/hub/tool-refusal.ts`) only before the operation's first board or hold write; a throw after a write, a readback failure or a wrapped error stays a plain `Error` (#254). The Pi side of the rule is in `adapters.md`.
|
|
39
44
|
- Supervision reasons use structured enums, never history notes, check output or approval titles. Round signatures survive restart; later summaries count only newly joined tasks.
|
|
45
|
+
- Supervision rules and proposals (#1362, #1368, #1374: `src/hub/supervision-rules.ts`, `src/hub/supervision-proposals.ts`): the reading stage has no effect path, `supervision-proposals.ts` reaches the board and bus only through ports, and a proposal runs its existing action only on an explicit `accept` by a present role with that action's own authority (`escalate`: conductor or person), never automatically and never retried; `Tasks.supervisionNotice` refuses a private task. Read `docs/design/supervision.md` before changing these paths.
|
|
46
|
+
- Guidance variants (#1363, #1367, #1376: `src/hub/guidance-variants.ts`, `Tasks.guidanceVariant*`): lifecycle writes go only through `Tasks.guidanceVariantCreate` and `guidanceVariantWithdraw`; the `guidance_experiments` and `guidance_variants` tables are private local state, never copied into `Task`, refs, history, public views, bus notices or memory, and the guidance tools stay out of capture (`GUIDANCE_TOOL_NAMES`). Read `docs/design/guidance-experiments.md` before changing these paths.
|
|
40
47
|
|
|
41
48
|
- Pass off-roster ids as data into `assign()` so its trace and every owner/reviewer choice share the membership filter. Refuse a manual off-roster assignment before a board write, including a reservation. Use `reassignForRoster` through the existing assignment delivery path on removal, including in-review ownership while keeping its review state; keep the old owner or reviewer when no eligible replacement exists and emit the guarded public-title notice. Preserve budget-relay behavior when sharing that implementation.
|
|
42
49
|
|
|
@@ -63,7 +70,7 @@ Scope: the task flow, assignment, the state machine and the hub's MCP tools. Rea
|
|
|
63
70
|
- 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`.
|
|
64
71
|
|
|
65
72
|
- 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.
|
|
66
|
-
-
|
|
73
|
+
- Manual spec acceptance (#481 S1) is written only by `Tasks.acceptSpec` for the person; never accept it from a tool or a receipt. Only `Tasks.readSpecAcceptance` may stage host proof of existing person consent from an older cancelled task whose whole local `supersededBy` reference names the destination, for the same canonical repository/issue and unchanged host-read `lastEditedAt`; require bounded complete source metadata, current public source/destination/context and authority, preserve the original acceptance time, and copy no plan/review/artifact evidence (#1328 T4). Spec gates are read-only; `Tasks.commitSpecCarry` publishes consent and HUB provenance atomically with an admitted outer write through `Board.updateWithSpecAcceptance`, using the opaque proof and host Symbol capability. Refused admission publishes neither consent nor provenance. The daemon uses `Tasks.acceptReviewed` to bind spec and plan readbacks to one task snapshot before `Tasks.accept`; retain its synchronous missing-spec and plan-admission refusals. Apply WIP and plan admission before `done` implicitly accepts proposed work and before cohort writes. Never read or store an issue body: identity and edit times only.
|
|
67
74
|
- Test integrity (#481 S4, `src/hub/test-integrity.ts`): in enforce only the person relinks an established `sdlc.repo` or `issue`. A supplied `redFirst` that fails `publicMetadataText` on a public task is refused pre-effect, and `publicView` drops one that fails it later. Integrity is read only for a non-PII task with current PR evidence; otherwise it is unknown with a blocker, never a pass. Enforce adds `test integrity:` blockers to review admission and the merge queue. All gh reads of one lifecycle gate or status share one 20 s deadline; never give each read its own.
|
|
68
75
|
|
|
69
76
|
- Preserve planner-reviewed cost keys when an accept replaces only file-list intent; explicit enforce scope drift needs a new planner receipt. New enforce plan-review receipts require typed review/CI scopes; keep legacy missing scope unspecified until its planning revision invalidates it. Run premature-review admission before done/cohort writes, recheck state and actor authority after every await, and keep admission separate from the review brief. In advise, discard readback evidence after quiet-only history appends and continue with unknown readiness, without another external read; re-derive a changed reviewer from the current task before sending review, refuse other drift and keep enforce strict. Recheck final completion fences after delayed admission, and tell the owner through the private-aware task notice to call done again when delayed completion is refused only if the task remains in_progress with the owner that started the check. Scope is cost metadata, never a permission or reviewer bypass.
|
|
@@ -21,6 +21,7 @@ Scope: tests, fakes and the test gate. Read before adding or changing a test or
|
|
|
21
21
|
- `ahub upgrade` without `--to` asks the registry (`npm view`) and hands a target newer than the CLI to `bun x` (#272): a test that reaches either puts a fake `npm` first on `PATH` and a recording stand-in for `process.execPath`, as `test/upgrade-cli.test.ts` does. The interactive screens are tested through a scripted `ScreenIO`; a CLI test that needs them marks `process.stdin` and `process.stdout` as terminals in a wrapper script.
|
|
22
22
|
- Cross-process fixtures wait for the consuming client to process its handshake (the channel connected diagnostic), not merely the daemon's attached/idle state. Deadline-routing fixtures hold and release responses at the fallback decision; do not place a fixed sleep between deadline fractions and assume scheduler headroom (#287). Receipt-order fixtures use the normal watchdog for ordinary I/O, trigger expiry after observed native acceptance, and await a consumed transport barrier before asserting on late results.
|
|
23
23
|
- Companion tests (`integrations/orca/`, `integrations/herdr/`) hold awaited navigation and CLI replies, change the selected id, host, kind, root or request generation, then release the reply. Assert that stale navigation creates no terminal and that stale panel success, error, timer and finally callbacks change no current link, status or controls. Run the real panel code against fake host and DOM ports.
|
|
24
|
+
- A Claude Code companion test (#1349, #1365) loads the host-only `.tsx` hooks (`integrations/claude-code/hooks/*.tsx`) with a dynamic `import()` of a `new URL(..., import.meta.url).href`, never a static import, so the project typecheck (no `jsx` in `tsconfig.json`) never compiles them (`test/claude-code-companion-model-input.test.ts`).
|
|
24
25
|
- A bounded polling wait must assert its condition after the last attempt, or document why giving up is intentional. Bound it by time (a deadline with short sleeps), never by a count of event-loop turns (`setImmediate`), which a loaded runner spends before a socket frame or child output arrives (#1163, `untilSeen` in `test/control-client.test.ts`). Append-only event histories wait for a correlated closing event, not removal of the opening event. Before changing a slow wait, identify the unreached state and repair its cause (#296).
|
|
25
26
|
- A test of turn or notice behavior that is not about the snapshot budget yields an I/O turn (`await new Promise(r => setImmediate(r))`) between captures: captures in one synchronous burst share the 250 ms budget and may correctly record unknown evidence. A daemon test whose assertion needs a turn's snapshot or end evidence passes `snapshotClock: () => 0` (`DaemonOptions.snapshotClock`, #661) so a slow runner cannot spend that budget; never lengthen the budget instead (#550). A wait on concurrent-edit evidence correlates the expected turn ids and paths (#617).
|
|
26
27
|
- Holding the snapshot budget clock (`snapshotClock`, #661) holds the deadline and, since #554, the git child's wall-clock timeout (the 10 s ceiling instead of the remaining budget). The rule lives in the pure `childTimeoutMs` (`src/hub/snapshots.ts`: production keeps min(10000, remaining), only a budget carrying `now` gets the ceiling). Reproduce a slow git with a deliberately slow `git` first on PATH (`slowGit` in `test/snapshots.test.ts`), never with host-wide load, and never run a high-parallel loop while another gate shares the dgx02 host.
|
package/docs/design/adapters.md
CHANGED
|
@@ -49,6 +49,76 @@ Optional ports have explicit meaning: absent keeps the generic path, while prese
|
|
|
49
49
|
|
|
50
50
|
Adapters translate different interaction surfaces without changing the peer's task identity. Claude's plugin channel connects through MCP and the hub control service; Codex is proxied through app-server; ACP peers share an ACP transport; Pi uses its extension bridge. Kimi defaults to a pull-only TUI, with headless ACP as a separate selected form under the same peer id. The TUI does not inherit headless push, session, or recovery behavior. Keeping forms distinct lets the hub preserve the native user interaction model while enforcing one role and delivery policy ([#316](https://github.com/STAIxBWLB/agent-hub/issues/316), [#625](https://github.com/STAIxBWLB/agent-hub/issues/625)).
|
|
51
51
|
|
|
52
|
+
## Qwen deny input fence (#888)
|
|
53
|
+
|
|
54
|
+
A successfully appended `allowed: false` has a known delivery disposition, but
|
|
55
|
+
no native completion ACK. The delivery remains `completed` without an answer;
|
|
56
|
+
the adapter stays non-ready with a host-persisted `denyPending: true` latch in
|
|
57
|
+
its existing state file. Persistence must succeed before the append. No BasePeer
|
|
58
|
+
settlement policy or other adapter's readiness behavior changes.
|
|
59
|
+
|
|
60
|
+
The denied turn's assistant/Stop, orphan Stop, result, approval response and
|
|
61
|
+
elapsed silence cannot release the latch. Release requires either a newly
|
|
62
|
+
observed same-session personal USER followed by that personal turn's normal
|
|
63
|
+
`end_turn` assistant and `message_stop`, with uninterrupted generation and verified
|
|
64
|
+
owner identity, or a verified fresh launch generation with native session/version
|
|
65
|
+
and a new verified owner. The event-file byte watermark uses raw newline offsets
|
|
66
|
+
to exclude pre-deny frames. A recovery USER must begin wholly at or after the
|
|
67
|
+
deny/adoption EOF boundary; finishing an older partial line never qualifies.
|
|
68
|
+
Malformed, invalid UTF8, oversized or unsupported
|
|
69
|
+
evidence invalidates unfinished proof; control/tool frames cannot preserve a
|
|
70
|
+
candidate final assistant for a later orphan Stop. A failed persisted clear
|
|
71
|
+
restores the latch and goes offline before advisory callbacks, with a storage
|
|
72
|
+
and permissions cause that remains until a successful clear, even if a logger
|
|
73
|
+
or notice throws.
|
|
74
|
+
For a fenced fresh launch, a host process-table baseline must positively show
|
|
75
|
+
no existing process naming the exact input path before any rotation, truncation
|
|
76
|
+
or launch preparation. An unknown table or unverified existing root leaves
|
|
77
|
+
those files unchanged and produces no launcher; a missing saved owner is never
|
|
78
|
+
evidence of absence. Ordinary trusted-owner adoption retains its prior behavior.
|
|
79
|
+
The fenced path also requires a positively verified empty event file before
|
|
80
|
+
input truncation or launch preparation. Failed event rotation or empty-file
|
|
81
|
+
verification leaves input unchanged and produces no launcher; old session_start
|
|
82
|
+
bytes cannot bind a later owner as fresh generation proof.
|
|
83
|
+
Detach, changed file/session/owner and adoption invalidate an unfinished personal
|
|
84
|
+
proof; restored buffered frames cannot supply a new personal USER. Same-generation
|
|
85
|
+
readability and replayed session_start never supply fresh launch proof.
|
|
86
|
+
Every fenced reattachment moves the watermark to restored EOF, including when
|
|
87
|
+
the inode is unchanged. A buffered partial USER completed after reattachment is
|
|
88
|
+
also excluded. Use a plain, tool-free clearing prompt and wait for its final
|
|
89
|
+
Stop: tool/control activity can invalidate the pending final-assistant candidate;
|
|
90
|
+
recovery through a tool-assisted turn is not promised.
|
|
91
|
+
Fenced personal and fresh-generation recovery only mark a RAM completion
|
|
92
|
+
candidate; neither the parser nor the owner monitor reopens input. Release waits
|
|
93
|
+
until the whole observed read frontier has been processed, no partial/discarded frame
|
|
94
|
+
remains, fresh FD EOF equals the consumed offset, the named file still matches
|
|
95
|
+
that FD, and owner/session/generation remain current. A later USER/tool/control
|
|
96
|
+
or lost frame invalidates or replaces the candidate before release. This proves
|
|
97
|
+
only the observed frontier: a future personal input after the final observation
|
|
98
|
+
would require an explicit serialized native idle ACK for an atomic guarantee,
|
|
99
|
+
which this protocol does not provide.
|
|
100
|
+
Fresh candidates bind the actual new launch generation, verified empty source,
|
|
101
|
+
first accepted session header and new owner. A replayed header cannot reset
|
|
102
|
+
activity or manufacture fresh idle proof after a later USER/tool/control frame.
|
|
103
|
+
|
|
104
|
+
`QWEN_DENY_QUIESCENCE_MS` is a 30 s operational wait. Expiry reports offline,
|
|
105
|
+
keeps the latch and queued messages unsubmitted, and directs the person to their
|
|
106
|
+
terminal or `ahub qwen --mode tui`. Passive recovery remains possible after expiry.
|
|
107
|
+
General adoption of an unknown running turn outside this latch retains its prior
|
|
108
|
+
ceiling. These source/fake controls do not qualify a new native completion signal.
|
|
109
|
+
|
|
110
|
+
Every append writes one complete UTF8 Buffer once and checks its byte count.
|
|
111
|
+
A short count or writer exception retains the delivery as `needs_review` and
|
|
112
|
+
goes offline without retrying a remainder. Errors after the writer call,
|
|
113
|
+
including close failure after a full byte count, retain the same uncertainty.
|
|
114
|
+
A non-newline input tail, checked
|
|
115
|
+
before append and attachment/readback, likewise fences input. Personal completion
|
|
116
|
+
cannot reopen this file: a verified fresh generation must start with fresh input.
|
|
117
|
+
The live ambiguous-write latch is RAM-only; after a crash the actual tail is the
|
|
118
|
+
guard. A torn prefix that happens to end with newline remains undetected. The
|
|
119
|
+
upgrade path if that failure is observed is a durable per-write intent record,
|
|
120
|
+
not a synthetic native ACK or an automatic remainder write.
|
|
121
|
+
|
|
52
122
|
## Channel attachment evidence (#1171)
|
|
53
123
|
|
|
54
124
|
The Claude plugin's inherited launcher marker is insufficient to enable push. In the inspected Claude Code 2.1.318 client path, MCP initialization advertises no usable channel opt-in; the plugin's server capability is not client evidence. The fallback checks the direct parent's bounded process row for the existing launcher's exact leading development-channel flag and supported target. Unknown, malformed, truncated or changed-parent evidence, print/background forms and repeated flags keep the plugin tools-only, with messages waiting for `hub_inbox`. The check does not walk ancestors or treat the marker as an authorization token.
|
|
@@ -95,6 +165,8 @@ non-console reader. The field is additive and optional; no control protocol vers
|
|
|
95
165
|
|
|
96
166
|
Only an attached push channel opts into explicit disposition of its own accepted delivery. An `accepted` receipt acknowledges that the notification was accepted by the channel transport; it is not a native handling or task-completion signal. The host reads `bus.accepted_settle_ms` from accepted configuration on its existing maintenance sweep, defaulting to ten minutes. A row that remains unconfirmed becomes `needs_review` with no replay. `hub_inbox` returns bounded id/revision metadata for the channel's accepted and held rows, including when an accepted push prevents the pull itself. The plugin renders that metadata and avoids both an empty-inbox claim and polling advice while there is an actionable row. Important, task and review timeouts produce one durable status-kind, status-priority conductor message containing ids only when the existing `conductor.feed` policy is on; `feed: off` remains an opt-out. Pull-only sessions do not gain the explicit accepted-disposition port.
|
|
97
167
|
|
|
168
|
+
The channel's `hub_inbox` also renders the authenticated caller's bounded public held-body view (#1328 AC6), labelled read-only and uncertain. It occupies a separate MCP text content block, preserving the first block for queued/local messages, notices and existing held hints. It does not confirm, retry or resolve the earlier attempt. Malformed or unavailable additive held data produces a fixed warning while preserving normal pulled text, local failed-push messages and queue counts. A foreign peer argument grants no access; other-peer inspection remains with the person or configured conductor through queue diagnostics. Current privacy and owned task/session fences are checked by the daemon before exposure.
|
|
169
|
+
|
|
98
170
|
## Permissions, execution, and process ownership
|
|
99
171
|
|
|
100
172
|
Permission modes control whether native actions prompt; they do not widen a sandbox or path grant. The local worker's file tools use path guards, and its command tools run through the host's OS sandbox. Vendor-native tools use their vendor/runtime permission and isolation boundaries; the hub does not claim to confine every ACP or TUI tool. This distinction prevents an approval-mode setting from being mistaken for filesystem or network confinement ([#242](https://github.com/STAIxBWLB/agent-hub/issues/242), [#39](https://github.com/STAIxBWLB/agent-hub/issues/39), [#270](https://github.com/STAIxBWLB/agent-hub/issues/270)).
|
|
@@ -184,4 +184,4 @@ The architecture does not claim that a fixture proves a real provider account, n
|
|
|
184
184
|
|
|
185
185
|
The task-board module owns anchored findings and person-authored comment lifecycles. Transport carries one explicit review package only after `Tasks` admits the selected draft set; drafting and editing do not start peer turns. acon supplies the shared review kit and a server-verified person identity, while the standalone dashboard reads counts and bounded placements only. Neither surface writes the Board directly.
|
|
186
186
|
|
|
187
|
-
The host-only review package reference is an observer exclusion, not PII authority. Durable open comment/finding scope protects memory notes naming that task after restart or intervening input. Capture, progress and session-title exclusion follows the current review input, not unrelated board history. ID-only current-input holds survive daemon restart. An intact, readable, complete store with no matching held record admits a new session as clean. Unreadable or corrupt storage and unconfirmed coverage for the current identity remain excluded. A validated release receipt confirms that identity without declaring other legacy identities clean. For an identified pull-only session, a positive held row remains sticky across restart until confirmed native identity changes. Its own incomplete marker excludes until verified ordinary replacement or a confirmed new session clears that marker; legacy coverage alone does not create a sticky hold. Missing native identity permits handout under an in-RAM unknown-held scope. A never-identified peer can release it with verified ordinary replacement in that daemon run; earlier positive or incomplete SID rows instead keep unidentified observer state held until a real SID is confirmed. First confirmation persists any current RAM quote under that SID before clearing the peer marker, without discarding other SID rows. It does not invent a native identity or weaken write-failure refusal. Legacy coverage completes from settled journal evidence, after which NULL clean receipts can be pruned; corrupt state remains excluded and is named in status with a repair next step. The hold grants no authority; the task-bound recipient summary and check output remain distinct from observer projections. Explicit publication recovery uses the saved immutable envelope and retained journal evidence, never automatic effect replay. Its intended recipient may read a public package, but memory capture, operational views, delivery logging and incoming-message labels exclude its body. Local-worker capture latches exclusion before any tool in a batch that submits an anchored verdict, including a refused verdict, and applies it to subsequent capture, final summaries and retained history. A delayed response cannot become capturable when another turn starts. Recovery advertises the conditional `review_comments` feature when retained comment/package records require it. It also requires `review_observer_input_state` when held or unknown session-input provenance could otherwise be lost. See [the task-board contract](task-board.md#anchored-review-packages-1056) for bounds, immutable snapshot placement and lifecycle authority.
|
|
187
|
+
The host-only review package reference is an observer exclusion, not PII authority. Durable open comment/finding scope protects memory notes naming that task after restart or intervening input. Capture, progress and session-title exclusion follows the current review input, not unrelated board history. The read-only own held inbox view (#1328 AC6) creates no durable handout receipt. Its narrow conservative ceiling also excludes retained readable observer-excluded held inputs (trusted review packages and host-stamped peer chat/status responses) across restart until explicit disposition, even if unread; an overflowing or unreadable recipient row/byte window stays unknown and excluded because a previously viewed review can move outside the window. Ordinary queued/deferred review rows do not acquire this ceiling, and verified ordinary replacement retains its existing turn rules. ID-only current-input holds survive daemon restart. An intact, readable, complete store with no matching held record admits a new session as clean. Unreadable or corrupt storage and unconfirmed coverage for the current identity remain excluded. A validated release receipt confirms that identity without declaring other legacy identities clean. For an identified pull-only session, a positive held row remains sticky across restart until confirmed native identity changes. Its own incomplete marker excludes until verified ordinary replacement or a confirmed new session clears that marker; legacy coverage alone does not create a sticky hold. Missing native identity permits handout under an in-RAM unknown-held scope. A never-identified peer can release it with verified ordinary replacement in that daemon run; earlier positive or incomplete SID rows instead keep unidentified observer state held until a real SID is confirmed. First confirmation persists any current RAM quote under that SID before clearing the peer marker, without discarding other SID rows. It does not invent a native identity or weaken write-failure refusal. Legacy coverage completes from settled journal evidence, after which NULL clean receipts can be pruned; corrupt state remains excluded and is named in status with a repair next step. The hold grants no authority; the task-bound recipient summary and check output remain distinct from observer projections. Explicit publication recovery uses the saved immutable envelope and retained journal evidence, never automatic effect replay. Its intended recipient may read a public package, but memory capture, operational views, delivery logging and incoming-message labels exclude its body. Local-worker capture latches exclusion before any tool in a batch that submits an anchored verdict, including a refused verdict, and applies it to subsequent capture, final summaries and retained history. A delayed response cannot become capturable when another turn starts. Recovery advertises the conditional `review_comments` feature when retained comment/package records require it. It also requires `review_observer_input_state` when held or unknown session-input provenance could otherwise be lost. See [the task-board contract](task-board.md#anchored-review-packages-1056) for bounds, immutable snapshot placement and lifecycle authority.
|