@staix/agent-hub 0.48.3 → 0.49.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/README.md +1 -1
- package/docs/agent-notes/daemon.md +2 -2
- package/docs/agent-notes/tasks.md +1 -1
- package/docs/design/adapters.md +4 -7
- package/docs/design/agent-hub-architecture.md +1 -1
- package/docs/design/agent-hub.md +1 -1
- package/docs/design/bus.md +2 -2
- package/docs/design/cli-output-inventory.md +39 -38
- package/docs/design/cli-output.md +7 -3
- package/docs/design/guidance-experiments.md +3 -1
- package/docs/design/guidance-probes.md +33 -31
- package/docs/design/model-routes.md +11 -14
- package/docs/design/roadmap.md +10 -9
- package/docs/design/supervision.md +6 -6
- package/docs/design/task-board.md +2 -2
- package/docs/dogfood.md +1 -1
- package/docs/operations.md +12 -7
- package/docs/quickstart.md +19 -1
- package/docs/roadmap.json +519 -1
- package/docs/roadmap.md +94 -0
- package/docs/security.md +3 -1
- package/docs/verification/2026-11-26-compat-pi-1.6.1.md +28 -0
- package/docs/verification/2026-11-27-0.48.4.md +37 -0
- package/docs/verification/2026-11-28-0.49.0.md +53 -0
- package/docs/verified.json +19 -19
- package/package.json +1 -1
- package/plugins/agent-hub/.claude-plugin/plugin.json +1 -1
- package/plugins/agent-hub/kimi-hook.js +29 -4
- package/plugins/agent-hub/server.js +34 -5
- package/src/adapters/channel-peer.ts +5 -2
- package/src/adapters/claude-channel.ts +1 -0
- package/src/adapters/compat.ts +4 -4
- package/src/adapters/definitions/native-cli-entry-claude.ts +22 -1
- package/src/cli/agents-output.ts +13 -0
- package/src/cli/agents.ts +16 -7
- package/src/cli/answer-output.ts +67 -0
- package/src/cli/broker.ts +9 -2
- package/src/cli/launch.ts +1 -1
- package/src/cli/main.ts +96 -127
- package/src/cli/recovery-package.ts +78 -26
- package/src/cli/reset-output.ts +50 -0
- package/src/cli/sdlc-output.ts +57 -0
- package/src/cli/settings-output.ts +80 -0
- package/src/hub/check-runner.ts +7 -3
- package/src/hub/claude-launch-proof.ts +12 -2
- package/src/hub/claude-state.ts +3 -0
- package/src/hub/control-client.ts +2 -0
- package/src/hub/daemon.ts +102 -40
- package/src/hub/memory-profile.ts +12 -1
- package/src/hub/roadmap-export.ts +12 -9
- package/src/hub/roadmap-issue-states.ts +35 -0
- package/src/hub/runtime-capture-prune.ts +21 -6
- package/src/hub/runtime-package-assets.ts +6 -0
- package/src/hub/supervision-proposals.ts +3 -3
- package/src/hub/supervision-rules.ts +2 -2
- package/src/hub/task-sweep.ts +1 -1
- package/src/hub/tasks.ts +37 -20
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,26 @@ 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.49.0
|
|
8
|
+
|
|
9
|
+
- Release N-1 for 0.49.x is published 0.48.4, which declares agent-mem `>=0.39.0 <1.0.0`; its fixture lock pins the 0.39.0 that the 0.48.4 release resolved, with control protocol 17 (descriptor floor 16). Wire and protocol, file and format floors, CLI and MCP tools stay compatible both ways; no capability or format ceiling is raised. The N-1 fixture and matrix pin that package; the separate protocol-16 fixture stays at 0.25.0.
|
|
10
|
+
- Recovery packages verify and preserve agent-mem's exact first-party MCP stdio and agent-hosts pins (Refs #1737, STAIxBWLB/agent-mem#587, STAIxBWLB/agent-mem#648).
|
|
11
|
+
- Runtime capture pruning recognizes agent-mem captures with the reviewed MCP stdio and agent-hosts assets (Refs #1737).
|
|
12
|
+
- Roadmap check and export share a bounded live GitHub issue lookup, so exports report current issue states and mark unresolved refs unknown (Refs #1754).
|
|
13
|
+
- A passed isolated check now enables supervision to detect changed deliverables. Isolated check results preserve an active task wait (Refs #1753).
|
|
14
|
+
- Daemon startup runs the orphan check sweep and GitHub spec availability probe in the background. Isolated check requests wait for orphan recovery before reading receipts or starting a run (Refs #1445).
|
|
15
|
+
- SDLC audit start, release train, plan review, acceptance, and read-back receipts use the shared CLI report layout (Refs #1724).
|
|
16
|
+
- Managed Claude channels attest their native session for conductor guidance probes (Refs #1751, #1226).
|
|
17
|
+
- Settings output uses the shared report layout (Refs #1724).
|
|
18
|
+
- Agent version, trust, and broker output use shared reports (Refs #1724).
|
|
19
|
+
- Reset, undo and kill output use the shared report layout (Refs #1724).
|
|
20
|
+
- Ask, answer and results output use the shared report layout (Refs #1724).
|
|
21
|
+
- Pi 1.6.1 is a verified version (Refs #888, #1248). Its [receipt](docs/verification/2026-11-26-compat-pi-1.6.1.md) passes all nine model-free legs against the exact npm artifact; other Pi versions, including 1.6.2, still need `ahub agents trust pi <version>`.
|
|
22
|
+
|
|
23
|
+
## 0.48.4
|
|
24
|
+
|
|
25
|
+
- A memory status read no longer re-resolves the whole memory profile through agent-mem (#1747). On a sharded home that resolution re-validates every shard placement; in a daemon profile it was about 6% of the main thread. Status now runs the full check only when the binding's fence stamp has moved since the last passing check. The entry fence for memory work still checks in full on every call.
|
|
26
|
+
|
|
7
27
|
## 0.48.3
|
|
8
28
|
|
|
9
29
|
- The five-minute roadmap sweep no longer blocks the daemon for about 2.5 s after its issue reads (#1741). The notice pass checked each finding's task against freshly built milestone views, one build (about 140 ms on a 1156-task board) per finding. It now rebuilds them only when the board changed.
|
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@ Code, Codex, Kimi Code, Pi and a hub-owned local worker (plus Qwen Code, Jcode a
|
|
|
5
5
|
Antigravity if you want them) share a message bus, a task board and a memory, each
|
|
6
6
|
connected through its own native interface.
|
|
7
7
|
|
|
8
|
-
Status: 0.
|
|
8
|
+
Status: 0.49.0, control protocol 17 (accepts 16). Bun + TypeScript, one loopback daemon per
|
|
9
9
|
project. Site: [agent-hub.staix.net](https://agent-hub.staix.net).
|
|
10
10
|
|
|
11
11
|
Inspect bounded task and attempt metadata with `ahub lineage show`; admit external
|
|
@@ -122,8 +122,8 @@ Scope: the operator console, control WS and its protocol, state files, the dashb
|
|
|
122
122
|
- `native_hook_launch` (#543) is console-only and needs a definition with `hooks.factsHook`; one launch per peer. Refuse `begin` during recovery or shutdown, off roster or while the peer is attached. `end` needs the matching `launchId` and is the only request besides `status` and `kill` a stopping hub admits; closing the launcher's socket ends its launch. Both settle an open run `interrupted` once. Accept `native_facts` only from the tools role for the current `instanceId` and `launchId`, the latched native session and socket generation, and workspace paths whose `realPath` is the project. When a launch records `nativeHome`, its transcript index must be exactly `<nativeHome>/session_index.jsonl`. Close a `ws-pull` peer's hello without `channel: false` with 4403.
|
|
123
123
|
- `native_tui_launch` (#464) is console-only and resolves only a running owned `JcodePeer` under its own kind id (`tuiLaunch`). Refuse it while stopping, during recovery, off roster, during that peer's roster change or requested stop, or when `jcodeMcpReady` fails against the daemon's `SERVER_JS`; a `binding` must name the current `launchId` and `sessionId`. Failures answer fixed errors with details withheld (a `JcodeOptionMismatch` names only the flag in `option`, #559) plus one closed cause `code` (a `JcodeTuiRefusalCode`, or `hub_busy`, `not_running`, `mcp_stale`, `bad_request`), logged as one `hub.log` line (#1093), and the launch tuple (socket, env) goes only into that console reply, never into `status`, `status.json` or a log. A launcher sends it only when the hub's `features` list `native_tui_launch`.
|
|
124
124
|
|
|
125
|
-
- When preserving a recovery source, copy only the hub's declared first-party `@staix/agent-mem` and exact `@staix/cli-output` packages through `preserveRuntimeDependencies` in `src/cli/recovery-package.ts`; include their identities and runtime bytes in `packageDigest` without changing digests of older packages that lack the output dependency. Never copy the whole node_modules tree or link a preserved source to a mutable installation. Verify preserved sources with `ownDependencies: true` so a missing or symlinked dependency cannot resolve an ancestor installation. Verify staged releases with `dependencyRoot` bound to their retained install directory; never resolve beyond it. Keep no-dependency release digests compatible. agent-mem may declare
|
|
126
|
-
- Release checker and committed release policy (#1120, #1381): `scripts/check-docs.mjs` is the one file outside `RUNTIME_ASSETS` that a capture carries (`RELEASE_CHECKER` in `src/cli/recovery-package.ts`, copied only when the source has it and refused when it is not a regular file), and `captureLayout` in `src/hub/runtime-capture-prune.ts` accepts an optional `scripts/` holding exactly that file, so captures made before #1120 still prune. It is deliberately not in `packageDigest`: widening the digest makes every already-staged release refuse as "cached release changed". `readDocEvidenceDetailed` returns `{ unavailable }` for a missing or failing checker and `ReleaseAuthorizations` turns that into its own refusal; only evidence that was read and is not fresh may say "stale documentation". Keep its spawn arguments unchanged (seed `release-committed-doc-metadata`). For the complete policy, receipt and `releasePolicyNotices` contract, read `tasks.md`'s Release authorization rule when changing that boundary. The production `ReleaseAuthorizations` host port in `daemon.ts` reads policy from the candidate commit; keep that injected port fail-closed.
|
|
125
|
+
- When preserving a recovery source, copy only the hub's declared first-party `@staix/agent-mem` and exact `@staix/cli-output` packages and the reviewed dependencies declared by agent-mem through `preserveRuntimeDependencies` in `src/cli/recovery-package.ts`; include their identities and runtime bytes in `packageDigest` without changing digests of older packages that lack the output dependency. Never copy the whole node_modules tree or link a preserved source to a mutable installation. Verify preserved sources with `ownDependencies: true` so a missing or symlinked dependency cannot resolve an ancestor installation. Verify staged releases with `dependencyRoot` bound to their retained install directory; never resolve beyond it. Keep no-dependency release digests compatible. agent-mem may declare `@staix/cli-output` at the hub's exact pin and exact pins for `@staix/mcp-stdio` and `@staix/agent-hosts`. Bind each to a real sibling package with the matching name and version, no dependencies or nested `node_modules`, and the reviewed asset list (#1664, #1737).
|
|
126
|
+
- Release checker and committed release policy (#1120, #1381): `scripts/check-docs.mjs` is the one file outside `RUNTIME_ASSETS` that a capture carries (`RELEASE_CHECKER` in `src/cli/recovery-package.ts`, copied only when the source has it and refused when it is not a regular file), and `captureLayout` in `src/hub/runtime-capture-prune.ts` accepts an optional `scripts/` holding exactly that file, so captures made before #1120 still prune. It also accepts the reviewed agent-mem siblings from `MEMORY_RUNTIME_LAYOUTS` (`src/hub/runtime-package-assets.ts`), the one asset table recovery and prune share; add a sibling there, never in either consumer (#1737). It is deliberately not in `packageDigest`: widening the digest makes every already-staged release refuse as "cached release changed". `readDocEvidenceDetailed` returns `{ unavailable }` for a missing or failing checker and `ReleaseAuthorizations` turns that into its own refusal; only evidence that was read and is not fresh may say "stale documentation". Keep its spawn arguments unchanged (seed `release-committed-doc-metadata`). For the complete policy, receipt and `releasePolicyNotices` contract, read `tasks.md`'s Release authorization rule when changing that boundary. The production `ReleaseAuthorizations` host port in `daemon.ts` reads policy from the candidate commit; keep that injected port fail-closed.
|
|
127
127
|
|
|
128
128
|
- Render staleness only through the call-scoped privacy preflight and bounded metadata probe (`memory-staleness.ts`); on a tree not modified during the call, private/denied/observed-symlink/unknown paths never produce a marker. Retain the explicit same-user concurrent-swap ceiling in docs/memory.md and the probe-loop ponytail. Keep hints out of stored rows and route native brief decoration after selection so one batch shares its probe budget.
|
|
129
129
|
|
|
@@ -49,7 +49,7 @@ Scope: the task flow, assignment, the state machine and the hub's MCP tools. Rea
|
|
|
49
49
|
- 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`.
|
|
50
50
|
- Supervision reasons use structured enums, never history notes, check output or approval titles. Round signatures survive restart; later summaries count only newly joined tasks.
|
|
51
51
|
- Supervision on a timer or per task change (#1738): `checkRound` skips the board read while its key (conductor, scope, `board.statusRevision()`, stored round) matches the last check that sent nothing, and it never keeps a key after a refused send. Per-task notices read through the `task(id)` port. Never add a `board.list()` to a supervision path that runs every second or on every task write.
|
|
52
|
-
- Roadmap check and task views (#1741): `roadmapCheck` takes one spec check per call and passes it to every `milestoneList` it runs; never let `current()` or a per-issue step start another, since an uncached working-tree check is about a second of synchronous git. `current()` rebuilds the views only when its board key (`statusRevision`, milestones, links, releases, the caller's planner role) moved; add any new input of `roadmapSnapshot` to that key (`roadmapBoardKey`), and reuse views under an unchanged key rather than calling `milestoneList` per item, as `roadmapNotify`'s per-finding recheck does; building them scans every board task's text. `riskViewFor` returns before `riskCards` when the task has no risk receipt for the head; a task list calls it once per row.
|
|
52
|
+
- Roadmap check and task views (#1741): `roadmapCheck` takes one spec check per call and passes it to every `milestoneList` it runs; never let `current()` or a per-issue step start another, since an uncached working-tree check is about a second of synchronous git. `current()` rebuilds the views only when its board key (`statusRevision`, milestones, links, releases, the caller's planner role) moved; add any new input of `roadmapSnapshot` to that key (`roadmapBoardKey`), and reuse views under an unchanged key rather than calling `milestoneList` per item, as `roadmapNotify`'s per-finding recheck does; building them scans every board task's text. `riskViewFor` returns before `riskCards` when the task has no risk receipt for the head; a task list calls it once per row. Live issue states for `roadmap check` and `roadmap export` come only from `roadmapIssueStates` (`src/hub/roadmap-issue-states.ts`, bounded refs, concurrency and deadline); never add a second GitHub lookup beside it (#1754).
|
|
53
53
|
- 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.
|
|
54
54
|
- 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.
|
|
55
55
|
|
package/docs/design/adapters.md
CHANGED
|
@@ -230,9 +230,7 @@ The [guidance probe contract](guidance-probes.md#t2-confined-adapter-contract)
|
|
|
230
230
|
owns the complete-request binding, role input matrix, fixed model, resource
|
|
231
231
|
reservations, path guards and verified deny-only sandbox. Its v1 tool capability
|
|
232
232
|
is read/write/edit only. No arbitrary subprocess, hub, memory, package or network
|
|
233
|
-
tool is available. The adapter
|
|
234
|
-
fake-model checks and the model-free macOS boundary canary are separate from a
|
|
235
|
-
real model/worker trial, which has not been authorized.
|
|
233
|
+
tool is available. The daemon wires the adapter only for the exact content ID selected for the live worker pilot at startup. Fake-model checks and the model-free macOS boundary canary exercise their own boundaries. The pilot admission and receipt rules are in [Guidance probes](guidance-probes.md#conductor-selected-live-worker-pilot).
|
|
236
234
|
|
|
237
235
|
## Model, account, and memory boundaries
|
|
238
236
|
|
|
@@ -286,7 +284,7 @@ the callback to the current owner and clears it on lifecycle transitions. The
|
|
|
286
284
|
daemon suppresses private and PII activity and exposes the remaining row only
|
|
287
285
|
on explicit live console status. Events, snapshots and prompts never carry it.
|
|
288
286
|
|
|
289
|
-
An adapter may implement `PeerAdapter.observedModel()`: the model its native surface reported for the turn that just ended, as `{ model, evidence }`. The daemon reads it once, when it writes the peer's `turn_end`, and passes it through `turnModelFields`: the event carries `model` (the id exactly as reported, through `safeModelLabel`) and `modelEvidence` (`served`, `session` or `configured`, strongest first) or neither. A label `safeModelLabel` refuses is dropped whole, never truncated, and an alias (`opus`, `default`) is never expanded. An adapter that reports nothing, or throws, records nothing: unknown stays unknown. Codex and Claude print
|
|
287
|
+
An adapter may implement `PeerAdapter.observedModel()`: the model its native surface reported for the turn that just ended, as `{ model, evidence }`. The daemon reads it once, when it writes the peer's `turn_end`, and passes it through `turnModelFields`: the event carries `model` (the id exactly as reported, through `safeModelLabel`) and `modelEvidence` (`served`, `session` or `configured`, strongest first) or neither. A label `safeModelLabel` refuses is dropped whole, never truncated, and an alias (`opus`, `default`) is never expanded. An adapter that reports nothing, or throws, records nothing: unknown stays unknown. Codex and Claude print (#1402 T2), ACP peers (#1402 T3), Pi and Antigravity (#1402 T4) all report model evidence. Codex: the model in the `thread/start` or `thread/resume` reply, or the model the hub or the TUI started a turn with once Codex accepted it, is `session`; a `model/rerouted` notification names the model it moved the running turn to, `served` for that turn only. Neither reply nor `turn/start` carries a per-response model, so Codex is never `served` unless it said so (schema of codex-cli 0.167.2). Claude print (reviewer and implementer): the `modelUsage` keys of the `result` row are `served`; several keys name the one with strictly more usage tokens, and a tie or a breakdown with no counts names none (`src/adapters/print-result-model.ts`). Claude channel and TUI sessions are unchanged (their transcript usage already carries `servedModel`). research builds `ownerModels` from the owner's turns only (`docs/research.md`).
|
|
290
288
|
|
|
291
289
|
ACP peers (Qwen, Jcode, headless Kimi; #1402 T3) report the session's current model as `session` evidence, whatever the override policy (`src/adapters/acp-session-model.ts`). The id is read from `models.currentModelId` or the `model` select's `currentValue` of the `session/new` or `session/load` result, and moved by `current_model_update`, `config_option_update` and Qwen's `session/model-update` notices for the current session only. It is the value when the turn's prompt was sent, read once at the turn end, so a change that arrives mid-turn belongs to the next one. Qwen's `id(openai)` wire id goes through its receipt codec; an id `safeModelLabel` refuses, the placeholder `unknown` or an absent field names no model. This is the agent's own current model, not a per-response one, so it is never `served`.
|
|
292
290
|
|
|
@@ -310,8 +308,7 @@ Two changes before a turn leave the last desired value. Status distinguishes the
|
|
|
310
308
|
effective selection, its source, a pending next-turn value and unsupported live
|
|
311
309
|
selection; a desired row alone is never evidence that a native model accepted it.
|
|
312
310
|
The precedence is override, instance model, launch model, then native default,
|
|
313
|
-
where the surface already supports that source.
|
|
314
|
-
unknown rather than becoming an invented model id.
|
|
311
|
+
where the surface already supports that source. When none of these sources has a model, status may show the last finished turn's `observed (served)` or `observed (session)` evidence. With no such observation, the model stays unknown.
|
|
315
312
|
|
|
316
313
|
Claude headless implementers select `--model` per spawned turn; codex-review
|
|
317
314
|
selects `-m` per isolated review spawn. Supported Codex app-server `turn/start`
|
|
@@ -560,7 +557,7 @@ The local worker binds review observer exclusion to its actual input envelopes b
|
|
|
560
557
|
|
|
561
558
|
## Owned Record boundaries (#1320, #1549)
|
|
562
559
|
|
|
563
|
-
Only a host-owned getter supplies the imported agent-mem instruction at an admitted headless turn boundary or a verified Pi TUI hub-delivered turn boundary, after owned input and busy state exist and before the native prompt/model request. Pi TUI binding requires a current verified process and session, and keeps the same turn, owner, privacy and policy fences as headless. Multi-call local turns keep one fixed prompt. Native-client prompts, steer, Claude hooks and isolated reviewers keep their separate surfaces. A getter failure omits optional Record guidance and does not change ordinary routing. The production getter reads the public `recordsEnabled(activeHome, executionCwd)` accessor from the
|
|
560
|
+
Only a host-owned getter supplies the imported agent-mem instruction at an admitted headless turn boundary or a verified Pi TUI hub-delivered turn boundary, after owned input and busy state exist and before the native prompt/model request. Pi TUI binding requires a current verified process and session, and keeps the same turn, owner, privacy and policy fences as headless. Multi-call local turns keep one fixed prompt. Native-client prompts, steer, Claude hooks and isolated reviewers keep their separate surfaces. A getter failure omits optional Record guidance and does not change ordinary routing. The production getter reads the public `recordsEnabled(activeHome, executionCwd)` accessor from the supported amem version range declared in `package.json`; either machine or repository false disables the optional Record path. Its boolean revision is not a privacy-policy fingerprint: current package and hub screens are rechecked separately before effects.
|
|
564
561
|
|
|
565
562
|
Model final output uses a host-only final-answer callback distinct from explicit send tools and diagnostic messages. Only normal completion can append Record rows; partial output is stripped for sharing without certifying a settled record. Capture binds immutable owner, turn, session/generation, execution cwd, profile and policy identity. Replacement, exclusion or unsafe steering revokes the frame before any later append. This grants no task, permission, native consumption or model acceptance authority.
|
|
566
563
|
|
|
@@ -194,7 +194,7 @@ without automatic restarts. Tier 3 configuration, recovery and native isolation
|
|
|
194
194
|
boundaries stay in place; the [adapter contract](adapters.md#person-owned-live-model-selection-1317)
|
|
195
195
|
defines supported turn paths and evidence limits.
|
|
196
196
|
|
|
197
|
-
The hub's portable memory storage, sync, indexing, and project helpers come from the
|
|
197
|
+
The hub's portable memory storage, sync, indexing, and project helpers come from the first-party `@staix/agent-mem` package in the supported range declared in `package.json`. `src/memory/` and `Tasks` provide hub-specific capture, recall, privacy screening, task briefs, and shared notes. Runtime memory is in-process: there is no claude-mem worker HTTP client or model summarizer. claude-mem is an off-by-default, import-only source. This removes a second capture path while keeping caller authority and task privacy in the hub ([#752](https://github.com/STAIxBWLB/agent-hub/issues/752), [agent-mem#13](https://github.com/STAIxBWLB/agent-mem/issues/13)).
|
|
198
198
|
|
|
199
199
|
Long-term hub writes and core promotion callbacks use the configured standalone sync policy plus hub narrowing. Profile readiness is independent of the current daemon's last automatic sync result. Public status exposes safe cause/count/action metadata; person-only declined inspection exposes IDs and rule categories, with explicit incomplete state when the portable core cannot supply a bounded physical view. Portable row placement and physical sync inspection remain agent-mem responsibilities.
|
|
200
200
|
|
package/docs/design/agent-hub.md
CHANGED
|
@@ -65,4 +65,4 @@ and the CLI, preserving unknown evidence and count-only private membership
|
|
|
65
65
|
|
|
66
66
|
Product evidence separates source/fixture coverage from installed-hub and native use. The [dogfood scorecard](../dogfood.md) records which features actually run here and the metric that demonstrates them; unverified use stays unverified ([#687](https://github.com/STAIxBWLB/agent-hub/issues/687)).
|
|
67
67
|
|
|
68
|
-
The design-spec pilot
|
|
68
|
+
The design-spec pilot began with this goal, the architecture and the bus, task-board and adapters modules. The current inventory under `docs/design/` also covers CLI output, execution references, guidance experiments and probes, model routes, the roadmap and supervision. Its four-week report targets at least 70% of PRs touching pilot paths also updating the owning spec, zero schema errors on main and zero stale documents after release review/restamping. Notice noise and contradictions are recorded before recommending broader coverage or require mode. These are pilot targets, not results established by this draft ([#1064](https://github.com/STAIxBWLB/agent-hub/issues/1064)).
|
package/docs/design/bus.md
CHANGED
|
@@ -29,7 +29,7 @@ An envelope binds a sender, kind, priority, trace and hop count to a body and op
|
|
|
29
29
|
|
|
30
30
|
Replies keep the highest hop from the delivery they answer, including when the peer received a condensed digest. The hop cap therefore cannot be reset through a summary or relay ([#546](https://github.com/STAIxBWLB/agent-hub/issues/546)). Message bodies are framed as untrusted peer or hub text, not a new authority source; private envelopes remain private in logs and public views ([#193](https://github.com/STAIxBWLB/agent-hub/issues/193), [#198](https://github.com/STAIxBWLB/agent-hub/issues/198)).
|
|
31
31
|
|
|
32
|
-
The bus applies limits to a sender, sender-recipient pair, important messages, and repeated content before queueing. An important message consumes scarce attention because it can steer a busy turn; refusals cost no rate token
|
|
32
|
+
The bus applies limits to a sender, sender-recipient pair, important messages, and repeated content before queueing. An important message consumes scarce attention because it can steer a busy turn; refusals cost no rate token. Rate-limit refusals give a retry boundary. The repeat-content refusal reports when the same message was sent without giving a retry time ([#38](https://github.com/STAIxBWLB/agent-hub/issues/38)).
|
|
33
33
|
|
|
34
34
|
## Queues and delivery outcomes
|
|
35
35
|
|
|
@@ -329,6 +329,6 @@ privacy and invocation authorization checks still decide whether a send is allow
|
|
|
329
329
|
|
|
330
330
|
The final-answer boundary strips agent-authored `amem:` lines before invocation answer handling, ordinary publication, journaled/shared bodies, digest rendering or console envelope taps. Explicit send tools keep their existing path. Original priority and audience/hop/receipt rules are retained. Stripping runs even when optional capture is disabled or fails. Final dispatch traverses the current `onMessage` observer chain exactly once. A peer/body/options-scoped host marker identifies the final-only raw capture path, is consumed before nested messages and is restored or cleared on exit; no final marker is accepted from a wire envelope. Stale replaced owners cannot route or capture a final answer.
|
|
331
331
|
|
|
332
|
-
The standing delivery instruction tells a peer to end with exactly `[FYI]` when nothing needs its answer and to start progress notes with `[FYI]` (#1550 AC4). A marker-only final has an empty body after parsing, so it sends nothing.
|
|
332
|
+
The standing delivery instruction tells a peer to end with exactly `[FYI]` when nothing needs its answer and to start progress notes with `[FYI]` (#1550 AC4). A marker-only final has an empty body after parsing, so it sends nothing. For a hub-native peer, an `important` final keeps that priority only when it answers a delivered important request addressed to that peer. Otherwise the bus caps it at `status`.
|
|
333
333
|
|
|
334
334
|
The raw-final capture observer is host-only and limited to a complete, currently owned public turn. Private inputs or outputs, review/observer holds, remote inputs/audiences, invocation answers and unknown parents cannot reach it. Count-only observers cannot change routing. The memory owner applies current policy before storage or selection; captured Record rows remain uncurated reference data. A bounded, ephemeral saved-ID/raw-anchor registry can prove display substitution for generated notes, with no persistence or inference from titles or prose. Restart and eviction preserve unproved old content.
|
|
@@ -156,11 +156,11 @@ A delegated call needs its own renderer or a fixture before the human-view width
|
|
|
156
156
|
| intake | fail (3), showToolText (2), renderIntakeChange (1), renderIntake (1) |
|
|
157
157
|
| deliverables | fail (2), console.log (5) |
|
|
158
158
|
| board | fail (8), console.log (3), showToolText (1), renderHandoffs (1), printOutput (2), renderBoardColumns (1), renderBoard (1) |
|
|
159
|
-
| sdlc | printOutput (2), fail (51), console.log (
|
|
159
|
+
| sdlc | printOutput (2), showToolText (3), fail (51), console.log (12), process.stdout.write (2), renderSdlcCosts (1), renderSdlcMetrics (1), renderSdlcMerge (1) |
|
|
160
160
|
| task | showToolText (3), fail (15), console.log (7), renderHandoffs (1), renderHandoffReceipt (1) |
|
|
161
161
|
| review | fail (5), console.log (2) |
|
|
162
162
|
| remember | console.log (1) |
|
|
163
|
-
| ask | fail (2),
|
|
163
|
+
| ask | fail (2), printOutput (1), renderAskAnswer (1) |
|
|
164
164
|
| route | fail (1), console.log (1) |
|
|
165
165
|
| pause | Delegated / no direct output call |
|
|
166
166
|
| resume | Delegated / no direct output call |
|
|
@@ -170,10 +170,10 @@ A delegated call needs its own renderer or a fixture before the human-view width
|
|
|
170
170
|
| permission | fail (3), console.log (3) |
|
|
171
171
|
| roster | fail (5), console.log (3), printOutput (4), renderRoster (1) |
|
|
172
172
|
| autonomy | console.log (4), fail (1) |
|
|
173
|
-
| settings | fail (18), console.log (
|
|
173
|
+
| settings | printOutput (1), fail (18), process.stdout.write (1), console.log (2) |
|
|
174
174
|
| permit | fail (1) |
|
|
175
|
-
| answer | fail (3), console.log (
|
|
176
|
-
| results | fail (4), console.log (
|
|
175
|
+
| answer | fail (3), console.log (2), printOutput (2), renderQuestions (1), renderAnswerReceipt (1) |
|
|
176
|
+
| results | fail (4), console.log (3), printOutput (3), renderAnswerReceipt (2), renderResults (1) |
|
|
177
177
|
| pet | fail (4), console.log (2), renderPet (1), process.stdout.write (1) |
|
|
178
178
|
| roles | fail (1), console.log (1), printOutput (1), renderRoles (1) |
|
|
179
179
|
| status | console.log (3), printOutput (1), renderStatus (1), renderStatusDefault (1), renderPet (1) |
|
|
@@ -192,10 +192,10 @@ A delegated call needs its own renderer or a fixture before the human-view width
|
|
|
192
192
|
| facts | fail (1), console.log (1) |
|
|
193
193
|
| check-path | fail (1), console.log (2) |
|
|
194
194
|
| turns | console.log (1), printOutput (1), renderTurns (1) |
|
|
195
|
-
| undo | fail (12),
|
|
196
|
-
| kill |
|
|
195
|
+
| undo | fail (12), printOutput (5), renderUndoPlan (1), renderLifecycleReceipt (4) |
|
|
196
|
+
| kill | printOutput (2), renderLifecycleReceipt (2), fail (1) |
|
|
197
197
|
| down | Delegated / no direct output call |
|
|
198
|
-
| reset | fail (7),
|
|
198
|
+
| reset | fail (7), printOutput (3), renderLifecycleReceipt (2), renderResetPlan (1) |
|
|
199
199
|
| role | fail (7), console.log (3) |
|
|
200
200
|
| agents | Delegated / no direct output call |
|
|
201
201
|
| doctor | fail (2), console.log (3), formatMemoryStaleAnchors (1), printOutput (2), renderOrphanCleanup (1), renderDoctor (1) |
|
|
@@ -207,36 +207,20 @@ Interpolated and daemon-supplied strings require runtime fixtures. They are coun
|
|
|
207
207
|
|
|
208
208
|
| Command | Text source | Stream | Literal width |
|
|
209
209
|
| --- | --- | --- | ---: |
|
|
210
|
-
| recovery | src/cli/main.ts:
|
|
211
|
-
| recovery | src/cli/main.ts:
|
|
212
|
-
| projects | src/cli/main.ts:
|
|
213
|
-
| ui | src/cli/main.ts:
|
|
214
|
-
| ui | src/cli/main.ts:
|
|
215
|
-
| models | src/cli/main.ts:
|
|
216
|
-
| say | src/cli/main.ts:
|
|
217
|
-
| roadmap | src/cli/main.ts:
|
|
218
|
-
| deliverables | src/cli/main.ts:
|
|
219
|
-
|
|
|
220
|
-
|
|
|
221
|
-
|
|
|
222
|
-
|
|
|
223
|
-
|
|
|
224
|
-
| autonomy | src/cli/main.ts:2682 | stdout | 75 |
|
|
225
|
-
| settings | src/cli/main.ts:2775 | stdout | 39 |
|
|
226
|
-
| settings | src/cli/main.ts:2788 | stdout | 33 |
|
|
227
|
-
| settings | src/cli/main.ts:2819 | stdout | 33 |
|
|
228
|
-
| answer | src/cli/main.ts:2864 | stdout | 17 |
|
|
229
|
-
| bench | src/cli/main.ts:3005 | stdout | 107 |
|
|
230
|
-
| usage | src/cli/main.ts:3189 | stderr | 121 |
|
|
231
|
-
| undo | src/cli/main.ts:3325 | stdout | 103 |
|
|
232
|
-
| undo | src/cli/main.ts:3330 | stdout | 53 |
|
|
233
|
-
| kill | src/cli/main.ts:3347 | stdout | 18 |
|
|
234
|
-
| kill | src/cli/main.ts:3351 | stdout | 11 |
|
|
235
|
-
| reset | src/cli/main.ts:3365 | stdout | 36 |
|
|
236
|
-
| reset | src/cli/main.ts:3389 | stdout | 56 |
|
|
237
|
-
| reset | src/cli/main.ts:3395 | stdout | 39 |
|
|
238
|
-
| reset | src/cli/main.ts:3398 | stdout | 11 |
|
|
239
|
-
| reset | src/cli/main.ts:3433 | stdout | 96 |
|
|
210
|
+
| recovery | src/cli/main.ts:1048 | stdout | 29 |
|
|
211
|
+
| recovery | src/cli/main.ts:1081 | stdout | 60 |
|
|
212
|
+
| projects | src/cli/main.ts:1175 | stdout | 45 |
|
|
213
|
+
| ui | src/cli/main.ts:1191 | stdout | 57 |
|
|
214
|
+
| ui | src/cli/main.ts:1211 | stdout | 76 |
|
|
215
|
+
| models | src/cli/main.ts:1599 | stdout | 11 |
|
|
216
|
+
| say | src/cli/main.ts:1623 | stdout | 46 |
|
|
217
|
+
| roadmap | src/cli/main.ts:1827 | stdout | 46 |
|
|
218
|
+
| deliverables | src/cli/main.ts:2064 | stdout | 70 |
|
|
219
|
+
| roster | src/cli/main.ts:2615 | stdout | 19 |
|
|
220
|
+
| roster | src/cli/main.ts:2622 | stdout | 19 |
|
|
221
|
+
| autonomy | src/cli/main.ts:2673 | stdout | 75 |
|
|
222
|
+
| bench | src/cli/main.ts:2980 | stdout | 107 |
|
|
223
|
+
| usage | src/cli/main.ts:3164 | stderr | 121 |
|
|
240
224
|
|
|
241
225
|
## Renderer candidates
|
|
242
226
|
|
|
@@ -246,6 +230,11 @@ The separate report-by-task fixture measures 79 cells.
|
|
|
246
230
|
|
|
247
231
|
| File and renderer | Text source | Report | Direct layout references | Fixture width or scope |
|
|
248
232
|
| --- | --- | --- | --- | --- |
|
|
233
|
+
| src/cli/agents-output.ts:renderAgents | CLI | Direct | Report, grid | Unmeasured |
|
|
234
|
+
| src/cli/answer-output.ts:renderAskAnswer | CLI | Direct | Report | Unmeasured |
|
|
235
|
+
| src/cli/answer-output.ts:renderQuestions | CLI | Direct | Report | Unmeasured |
|
|
236
|
+
| src/cli/answer-output.ts:renderAnswerReceipt | CLI | Direct | Report | Unmeasured |
|
|
237
|
+
| src/cli/answer-output.ts:renderResults | CLI | Direct | Report | Unmeasured |
|
|
249
238
|
| src/cli/autonomy.ts:renderAutonomyStatus | CLI | - | Inline / indirect | 77 |
|
|
250
239
|
| src/cli/capabilities-output.ts:renderCapabilities | CLI | Direct | Report, grid | 77 |
|
|
251
240
|
| src/cli/console-state.ts:renderConsole | CLI | - | paint | Full-screen console |
|
|
@@ -283,6 +272,9 @@ The separate report-by-task fixture measures 79 cells.
|
|
|
283
272
|
| src/cli/output.ts:renderLimits | CLI | - | Inline / indirect | 38 |
|
|
284
273
|
| src/cli/output.ts:renderTotal | CLI | - | table | 78 |
|
|
285
274
|
| src/cli/pet.ts:renderPet | CLI | - | Inline / indirect | 21 |
|
|
275
|
+
| src/cli/reset-output.ts:renderResetPlan | CLI | Direct | Report | Unmeasured |
|
|
276
|
+
| src/cli/reset-output.ts:renderUndoPlan | CLI | Direct | Report | Unmeasured |
|
|
277
|
+
| src/cli/reset-output.ts:renderLifecycleReceipt | CLI | Direct | Report | Unmeasured |
|
|
286
278
|
| src/cli/roadmap.ts:renderRoadmap | CLI | - | wrap | 23 |
|
|
287
279
|
| src/cli/room-output.ts:renderRooms | CLI | Direct | Report | Unmeasured |
|
|
288
280
|
| src/cli/room-output.ts:renderRoomInbox | CLI | Direct | Report, moment | Unmeasured |
|
|
@@ -301,7 +293,16 @@ The separate report-by-task fixture measures 79 cells.
|
|
|
301
293
|
| src/cli/sdlc-output.ts:renderSdlcCosts | CLI | Direct | LayoutReport, grid | 39 |
|
|
302
294
|
| src/cli/sdlc-output.ts:renderAuthorization | CLI | Direct | LayoutReport, moment | 46 |
|
|
303
295
|
| src/cli/sdlc-output.ts:renderSdlcMerge | CLI | Direct | LayoutReport | 36 |
|
|
296
|
+
| src/cli/sdlc-output.ts:renderSdlcReceipt | CLI | Direct | LayoutReport | Unmeasured |
|
|
297
|
+
| src/cli/sdlc-output.ts:renderSdlcReadback | CLI | Direct | LayoutReport, Report | Unmeasured |
|
|
298
|
+
| src/cli/sdlc-output.ts:renderSdlcTrain | CLI | Direct | LayoutReport, moment | Unmeasured |
|
|
304
299
|
| src/cli/settings-edit.ts:renderEditPreview | CLI | - | Inline / indirect | 29 |
|
|
300
|
+
| src/cli/settings-output.ts:renderSettingsRows | CLI | Direct | Report | Unmeasured |
|
|
301
|
+
| src/cli/settings-output.ts:renderSdlcSetting | CLI | Direct | Report | Unmeasured |
|
|
302
|
+
| src/cli/settings-output.ts:renderSettingsConfirmation | CLI | Direct | Report | Unmeasured |
|
|
303
|
+
| src/cli/settings-output.ts:renderSettingsPreview | CLI | Direct | Report, heading | Unmeasured |
|
|
304
|
+
| src/cli/settings-output.ts:renderSettingsReceipt | CLI | Direct | Report | Unmeasured |
|
|
305
|
+
| src/cli/settings-output.ts:renderSettingsRejected | CLI | Direct | Report | Unmeasured |
|
|
305
306
|
| src/cli/source-output.ts:renderSourceAdd | CLI | Direct | Report | 51 |
|
|
306
307
|
| src/cli/source-output.ts:renderSourceList | CLI | Direct | Report, grid, moment | 62 |
|
|
307
308
|
| src/cli/study-output.ts:renderStudyList | CLI | Direct | Report, grid | 114 |
|
|
@@ -115,6 +115,9 @@ Glyphs are semantic; each pairs with one role. Code uses named constants, never
|
|
|
115
115
|
- **Header fit** (#1654 AC3): the header line does not wrap, and one `Report.titled(tool, name, context?, inline?)` decides where the context goes. A context that fits stays on the header line (two spaces after the name, or one space with `inline`, as in `ahub Merge queue owner/repo`). One that does not moves to a wrapped note under a short header, and a name too wide for any header keeps its first word there and repeats in full on the wrapped line. Without a wrap width nothing moves. `fitHeader`, `titled` and the lifecycle header no longer exist as copies.
|
|
116
116
|
- **Task, backlog, release, configuration and survey views** (#1654 AC3): `task show`, `task cancel`, the backlog results, `backlog groom`, `release list|show|new|plan|...`, `sdlc configure` and `sdlc survey show` build a `Report` (header, one `▸` section per group, `kv` rows, `warn` bullets, tables from the one `grid`). `sdlc-output.ts` and `task-output.ts` no longer define their own wrap, pair, bullet or heading helpers; `grid` in `sdlc-output.ts` is the one table helper every Report-based view calls.
|
|
117
117
|
- **The last eight output files** (#1654 AC3 close-out): `source add|list`, `schedule list|run|pause|resume`, the `study` views (list, show, receipts, experiments, evidence, readiness), `task handoff` and `board --handoffs`, `learn`, `intake`, `capabilities` and `worktrees` (list, tidy, tidy --confirm) build a `Report` with a header (`titled`), one `▸` section per group, `kv` rows, `warn` bullets and `grid` tables, and take a trailing `ascii`. An empty list stays one bare line, as `ahub board` prints it. `sdlc-output.ts` no longer exports `heading`, `pair` or `blank`; `pair` and `blank` survive only as the private narrow-table block layout of `grid`. A long command to copy is a wrapped note, not a `next` line, so no view passes the width at 24 cells.
|
|
118
|
+
- **Agent and broker views** (#1724): `agents` lists native versions, compatibility policy and the note or refusal reason in a counted Report table. Trust changes show the trust record path and the inverse command. `broker room drop` prints a result receipt. `broker serve` keeps its startup URL on one plain, unwrapped Report line.
|
|
119
|
+
- **Lifecycle views** (#1724): `reset` and `undo` use Report for their plan and result. Paths, safety notices and the sanitized undo diff retain their original line boundaries. `kill` prints a single-line receipt.
|
|
120
|
+
- **Ask, answer and results** (#1724): Report groups ask evidence, question sets and answer receipts. Suggested answer commands stay on one copyable line. Results retain the one-row terminal format and unread prefix.
|
|
118
121
|
- **Section**: one blank line, then `▸ <Name>` (ASCII `> <Name>`) in `section`, optionally followed by a count in `hint`: `▸ Peers (4 of 10 online)`. No blank line after it.
|
|
119
122
|
- **Key/value row**: two-space indent, `Key:` padded to the widest key in that section, two spaces, value. A key wider than 28 cells wraps its value to the next line at a four-space indent. An empty value is `(unset)` in `hint`. Keys are words, never repeated entity names: under a peer heading write `form`, not `claude form`.
|
|
120
123
|
- **Bullet row**: two-space indent, the 2-cell marker, one space, text: ` ⚠ codex-review 0.169.0 refused`. Nested detail uses four spaces; a next step is ` → ahub agents trust codex-review 0.169.0`.
|
|
@@ -131,6 +134,7 @@ Glyphs are semantic; each pairs with one role. Code uses named constants, never
|
|
|
131
134
|
In ahub, `warn()` in `main.ts` is `warnLine()` from `src/cli/warn-line.ts`, which prints `warningLines`, the one formatter (re-exported by `src/cli/error-format.ts`). A raw `console.log` or `console.error` in `src/cli` that bypasses Report, `printOutput`, `errorLines` or the warning printers is allowed only while `scripts/cli-raw-output.baseline.json` lists it with its reason; that list can only shrink, and `test/cli-output-conformance.test.ts` fails on a new call and on a stale entry.
|
|
132
135
|
- Success confirmation (stdout): `✓ <what was done>`; omit it when the output already shows the result.
|
|
133
136
|
- Usage error: the message, then `Usage: <tool> <command> <args>` and `Run '<tool> help <command>' for details.`, exit `2`.
|
|
137
|
+
Adoption gap: for its `usage:` diagnostic, ahub prints one `ahub: usage: ...` line and exits `2`.
|
|
134
138
|
- Plain English sentences, no emoji, no exclamation marks. Relative times in human output (`47d ago`, `in 5d15h`).
|
|
135
139
|
|
|
136
140
|
## Help
|
|
@@ -163,11 +167,11 @@ Glyphs are semantic; each pairs with one role. Code uses named constants, never
|
|
|
163
167
|
|
|
164
168
|
## Implementation in ahub
|
|
165
169
|
|
|
166
|
-
`src/cli/output-standard.ts`
|
|
170
|
+
`src/cli/output-standard.ts` re-exports the portable executable form from `@staix/cli-output`: `Role` and `ROLE_SGR` (the nine roles), `TONE_SGR` (the console tones that are not an identity palette entry), `MARKERS`, `markerCell`, `SECTION_MARKER`, `cellWidth`, `resolveColor` with `streamEnv` (the precedence table, per stream) and `asciiMarkers` (`--ascii` and the non-UTF-8 locale fallback). `src/cli/console-state.ts` keeps `Tone` and `PALETTE` (mapped onto the roles through `TONE_ROLE`; a tone with no entry names an identity color, never a status), re-exports the style names, lets a `Span` carry a `role` (it wins over its `tone`) and holds the `Report` builder for the layout grammar. `test/cli-output-conformance.test.ts` runs the five conformance checks and fails on a raw SGR literal in `src/cli/` and `src/hub/` outside `src/cli/output-standard.ts`, `src/cli/console.ts` (the full-screen console) and the identity palettes (`src/ui/peer-palette.ts`, `src/adapters/definitions/native-display.ts`).
|
|
167
171
|
|
|
168
172
|
## Adoption
|
|
169
173
|
|
|
170
|
-
|
|
174
|
+
The canonical v1 text lives in `@staix/cli-output`. This repository records its adoption in `docs/design/cli-output.md`, a design spec with `type: module`. Changes to the standard require a version bump. Each other repository gets its own issue that links here and lists its gaps; it is done when the five conformance checks pass. dot's style is the reference for the look, and dot gets its own conformance issue like every other CLI.
|
|
171
175
|
|
|
172
176
|
## Command and renderer inventory
|
|
173
177
|
|
|
@@ -205,7 +209,7 @@ the dated snapshot as help and renderers change.
|
|
|
205
209
|
|
|
206
210
|
## Acceptance criteria (this repository)
|
|
207
211
|
|
|
208
|
-
- AC1:
|
|
212
|
+
- AC1: `@staix/cli-output` holds this standard. This spec records the hub's adoption. `src/cli/console-state.ts` exposes the nine roles and the marker table; `Tone` stays as the TUI's vocabulary through a mapping onto roles. A test fails on raw SGR literals in `src/cli/` and `src/hub/` human-output code outside the compatibility re-export `src/cli/output-standard.ts`, with an allowlist for the identity palettes (`src/ui/peer-palette.ts`, `src/adapters/definitions/native-display.ts`) and the full-screen console (`src/cli/console.ts`).
|
|
209
213
|
- AC2: `ahub status` default view: header, then an `Attention` section listing every item that needs action as marker + text + `→` next step, then sections for the hub, peers and tasks, with plain keys in peer detail. The current full detail stays available behind `--verbose`. `--json` unchanged; exit code unchanged (`0`).
|
|
210
214
|
- AC3: `ahub doctor`: marker + check + finding rows, failures then warnings then unknowns then oks within each section, capped CHECK width, a summary line. Behavior change, named in the CHANGELOG: `doctor` exits `1` when any row is `fail` (it exits `0` today). `ahub setup` keeps its own exit behavior (it calls the doctor function, not the process exit). `--json` unchanged.
|
|
211
215
|
- AC4: `ahub help` overview uses one-line summaries; the long text moves to `ahub help <command>`. Every command, subcommand and flag still appears, and the help-vs-`main.ts` check keeps passing.
|
|
@@ -24,6 +24,8 @@ paths:
|
|
|
24
24
|
- test/guidance-control.test.ts
|
|
25
25
|
- test/guidance-console.test.ts
|
|
26
26
|
- test/guidance-pagination.test.ts
|
|
27
|
+
- src/hub/hub-tools.ts
|
|
28
|
+
- src/hub/daemon.ts
|
|
27
29
|
---
|
|
28
30
|
|
|
29
31
|
# Immutable guidance variants
|
|
@@ -423,7 +425,7 @@ for automatic retry.
|
|
|
423
425
|
|
|
424
426
|
The producer console has its own Guidance panel and dedicated pinned-project
|
|
425
427
|
manager port, separate from the dashboard action whitelist and candidate inbox.
|
|
426
|
-
|
|
428
|
+
The experiment manager port permits list/show. The separate `guidanceProbe` manager port forwards a read-only `guidance_probe_receipts` request for an exact probe ID and validates the returned export, which includes its status. No console mutation,
|
|
427
429
|
confirmation, person-metadata adaptation or snapshot token is introduced;
|
|
428
430
|
existing question/person/receipt helpers remain unchanged. A future console
|
|
429
431
|
withdrawal requires its own contract. Fixed CLI instructions do not execute
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
id: guidance-probes
|
|
3
3
|
type: module
|
|
4
|
-
title:
|
|
4
|
+
title: Guidance Probe Admission and Live Worker Pilot
|
|
5
5
|
status: draft
|
|
6
6
|
parent: agent-hub-architecture
|
|
7
7
|
depends-on: [guidance-experiments, task-board]
|
|
@@ -44,15 +44,23 @@ paths:
|
|
|
44
44
|
- test/guidance-probe-cli.test.ts
|
|
45
45
|
- test/guidance-probe-gate.test.ts
|
|
46
46
|
- test/helpers/guidance-probe-tasks.ts
|
|
47
|
+
- src/local/probe-errors.ts
|
|
48
|
+
- test/fixtures/guidance-probe-live-1226.json
|
|
49
|
+
- test/guidance-probe-cleanup.test.ts
|
|
50
|
+
- test/guidance-probe-receipts-store.test.ts
|
|
51
|
+
- test/guidance-probe-receipts.test.ts
|
|
52
|
+
- test/guidance-probe-retention-ownership.test.ts
|
|
53
|
+
- test/guidance-probe-usage.test.ts
|
|
54
|
+
- test/guidance-probes-daemon.test.ts
|
|
47
55
|
---
|
|
48
56
|
|
|
49
|
-
#
|
|
57
|
+
# Guidance probe admission and live worker pilot
|
|
50
58
|
|
|
51
|
-
|
|
59
|
+
The #1226 contract covers the private manifest and ledger, host admission, confined worker adapter, and sealed receipts. Registration stores an inert declaration. The daemon selects the [live worker pilot](#conductor-selected-live-worker-pilot) only for the exact content ID in `AGENTHUB_LIVE_GUIDANCE_PROBE_ID` at startup. A live start requires the current configured conductor's authenticated native session and all ordinary admission checks. Without that selection, production refuses execution before reserving a lane or session.
|
|
52
60
|
|
|
53
|
-
|
|
61
|
+
Fixture ports remain constructor-only. Their receipts establish fixture behavior. Live receipts require the host-selected adapter and recorded live mode. Model-free checks exercise wiring and confinement boundaries within their stated limits.
|
|
54
62
|
|
|
55
|
-
|
|
63
|
+
The host stamps `guidance_probe` purpose. Probe runs do not activate or edit guidance, complete tasks, record reviews, route ordinary work, or feed memory, capture, progress or learning. The pilot uses the existing LocalPeer tool loop under the probe-specific admission and resource fences.
|
|
56
64
|
|
|
57
65
|
## Manifest and units
|
|
58
66
|
|
|
@@ -198,17 +206,17 @@ Unknown, missing or mismatched fixed inputs, model identity, runtime/toolset/con
|
|
|
198
206
|
|
|
199
207
|
## Authority and currentness
|
|
200
208
|
|
|
201
|
-
All writes and effects enter through Tasks. CLI and daemon only parse, authenticate and delegate; they never open a writable ledger. The declaration cannot name an actor, session or authority override.
|
|
209
|
+
All writes and effects enter through Tasks. CLI and daemon only parse, authenticate and delegate; they never open a writable ledger. The declaration cannot name an actor, session or authority override. Register/start/show/receipts/cancel access is limited to the person or the one currently configured authorized conductor, using the existing operational-authority admission path. A console delegation, ordinary peer or live-test session cannot borrow USER authority.
|
|
202
210
|
|
|
203
211
|
Tasks' private bridge reuses its current request/private/review/recovery fences, requires the unique configured conductor to remain rostered and inside an admitted operational context, and uses the current public Task/repository scope before source reads. New snapshot text passes existing pure nameable/secret checks. G1 is rendered first, then the exact sanitized rendered guidance actually handed off passes raw nameable/secret checks plus first-party lexical path-candidate/private-policy checks; its private raw role-file provenance is not screened as worker input. Unlike an opaque address field, actual prose such as "merge/release" is not private solely because it contains a slash under an unrelated deny rule. A candidate matching private lexical policy or its literal prefix refuses. This is a lexical screen, not alias discovery or confinement proof. Raw candidate SHA remains separate metadata. No new model, file/address resolver or generation path is added. Historical metadata show does not return raw snapshots. Narrowing cancellation does not rescreen stored prose or require a still-applicable G1, while retaining its specified current caller/Task-epoch/privacy fences.
|
|
204
212
|
|
|
205
|
-
Tasks captures and revalidates project identity, actual actor/roster/conductor currentness, peer identity, session generation/native session, current task epoch/flow and privacy/review-only context across every await and immediately before each write or
|
|
213
|
+
Tasks captures and revalidates project identity, actual actor/roster/conductor currentness, peer identity, session generation/native session, current task epoch/flow and privacy/review-only context across every await and immediately before each write or effect. A private turn or private/PII task refuses before content leaves its existing private boundary. Unknown or missing current proof refuses with a next step.
|
|
206
214
|
|
|
207
|
-
Private session generation is an exact bounded identifier string or nonnegative safe integer, matching the existing Peer contract without coercion/hash/default zero. The daemon mints a per-connection UUID for each authenticated console or tools connection, never a control token or daemon-wide person epoch. For console requests, that UUID is both `sessionGeneration` and `requestConnectionId`. A conductor captures its actual Peer generation/native session and the original live socket fence, plus the separate connection UUID comparator. Tasks captures a host-only `guidanceProbes.session(by)` context with generation/nativeSession/requestConnectionId/current callback at admission; that callback closes over the original request/socket authority, rather than consulting a later request's ambient context. A new connection for either caller cannot replay a prior connection's start CAS, even when the conductor's native session is unchanged. The IDs are durably stored only as private replay comparators; they never restore or attest live authority.
|
|
215
|
+
Private session generation is an exact bounded identifier string or nonnegative safe integer, matching the existing Peer contract without coercion/hash/default zero. The daemon mints a per-connection UUID for each authenticated console or tools connection, never a control token or daemon-wide person epoch. For console requests, that UUID is both `sessionGeneration` and `requestConnectionId`. A conductor captures its actual Peer generation/native session and the original live socket fence, plus the separate connection UUID comparator. For Claude channels, the private managed launch record binds a launcher-selected UUID to the launch. Attachment requires a matching launch and Claude MCP session marker. Conductor tools requests must independently report that same UUID. The hub clears the binding when the socket changes and rechecks the launch proof before effects. Tasks captures a host-only `guidanceProbes.session(by)` context with generation/nativeSession/requestConnectionId/current callback at admission; that callback closes over the original request/socket authority, rather than consulting a later request's ambient context. A new connection for either caller cannot replay a prior connection's start CAS, even when the conductor's native session is unchanged. The IDs are durably stored only as private replay comparators; they never restore or attest live authority.
|
|
208
216
|
|
|
209
|
-
The host-only `TasksDeps.guidanceProbes` dependency contains Store, optional fakePorts
|
|
217
|
+
The host-only `TasksDeps.guidanceProbes` dependency contains the Store, optional `fakePorts`, an optional live content ID and adapter (`ports` and `prepareWorkerFrame`), optional host worker- and editor-frame preparers, a session context reader and an optional timer.set/clear seam. Wire input selects an already registered content ID. The host supplies the runner, session and timer. `guidanceProbesPending()` counts owned in-process admissions/launch/stop/drain work, not persisted held lanes; zero does not prove unknown durable work quiescent. `stopGuidanceProbes()` aborts and requests stop only for captured owned reservation/generation, then awaits actual launch and stop settlements. Its named operational 5,000 ms bound rejects with cause/next step on a noncooperative fixture, retains unsettled handles and durable hold, and never claims zero/drained, refunds/releases or closes Store/Board beneath callbacks. A later explicit drain can finish once those actual promises settle. Daemon awaits it before its finally-bearing cleanup/stopped-notification path; a rejected drain is retryable explicitly while new admissions remain fenced.
|
|
210
218
|
|
|
211
|
-
|
|
219
|
+
Active owned work has one watchdog: named operational interval 250 ms, scheduled with `setTimeout(min(interval, remainingMs))`. It rechecks the captured currentness/clock; nonpositive remaining time aborts/stops without rescheduling, and cancel/finish clears the handle. Small chunks avoid the JavaScript long-timeout overflow without a new manifest duration cap. Timer handles are wrapped with an explicit absence sentinel so valid zero/null handles clear correctly. A stale callback checks active-map identity before any Store write/effect. Tests inject the host-only scheduler/clock, never a global clock, and explicitly release/drain noncooperative fixture promises in cleanup.
|
|
212
220
|
|
|
213
221
|
New registration and session start require an already accepted task in `in_progress` or `changes_requested`. There is no implicit assignment/acceptance, no generic MOVES change, and no bypass of existing Task, role, SDLC or operational guards. Historical show is separate from fresh applicability.
|
|
214
222
|
|
|
@@ -490,7 +498,7 @@ interface ProbeFakeStopObservation {
|
|
|
490
498
|
interface ProbePublicReceipt extends ProbeReceipt {
|
|
491
499
|
experimentId: string | "withheld";
|
|
492
500
|
taskId: number;
|
|
493
|
-
evidence: "declaration" | "fixture" | "unknown";
|
|
501
|
+
evidence: "declaration" | "fixture" | "live" | "unknown";
|
|
494
502
|
}
|
|
495
503
|
interface ProbePublicStatus extends ProbePublicReceipt {
|
|
496
504
|
counters: ProbeCounters;
|
|
@@ -503,6 +511,7 @@ type GuidanceProbeCommand =
|
|
|
503
511
|
| { op: "register"; file: string; json: boolean }
|
|
504
512
|
| { op: "start"; id: ProbeSha256; revision: ProbeInteger; variantId?: ProbeSha256; json: boolean }
|
|
505
513
|
| { op: "show"; id: ProbeSha256; json: boolean }
|
|
514
|
+
| { op: "receipts"; id: ProbeSha256; json: boolean }
|
|
506
515
|
| { op: "cancel"; id: ProbeSha256; revision: ProbeInteger; json: boolean };
|
|
507
516
|
|
|
508
517
|
interface ProbeFakeEffectRequest {
|
|
@@ -535,6 +544,7 @@ interface GuidanceProbeFakePorts {
|
|
|
535
544
|
Tasks.guidanceProbeRegister(by: PeerId, value: unknown): Promise<ProbePublicReceipt>;
|
|
536
545
|
Tasks.guidanceProbeStart(by: PeerId, id: string, revision: number, variantId?: string): Promise<ProbePublicReceipt>;
|
|
537
546
|
Tasks.guidanceProbeShow(by: PeerId, id: string): Promise<ProbePublicStatus>;
|
|
547
|
+
Tasks.guidanceProbeReceipts(by: PeerId, id: string): Promise<ProbeReceiptExport>;
|
|
538
548
|
Tasks.guidanceProbeCancel(by: PeerId, id: string, revision: number): Promise<ProbePublicReceipt>;
|
|
539
549
|
```
|
|
540
550
|
|
|
@@ -571,7 +581,7 @@ Every role observation must report the exact full served model and a generic `in
|
|
|
571
581
|
|
|
572
582
|
A visible observation-hash mismatch unconditionally latches conflict/unknown before bookkeeping. Provider hashes are never passed through as ledger correlation identities, even if they happen to equal the host correlation hash; ledger identities are always host-computed.
|
|
573
583
|
|
|
574
|
-
The
|
|
584
|
+
The control operations are `guidance_probe_register`, `guidance_probe_start`, `guidance_probe_show`, `guidance_probe_receipts` and `guidance_probe_cancel`, each always replying to rid, including errors. CLI forms are `ahub guidance probe register --file <json>`, `start --id <hash> --revision <n> [--variant <variant-id>]`, `show --id <hash>`, `receipts --id <hash>` and `cancel --id <hash> --revision <n>`, with optional JSON output. `<n>` is the probe CAS revision, not the frozen Task flow revision. There are no MCP probe tools, console mutations or new daemon authority flags. Unknown operation responses give upgrade/restart guidance. An uncertain write response directs an explicit keyed show, never an automatic replay.
|
|
575
585
|
|
|
576
586
|
The additive conditional recovery feature declares private probe state only when present. Control-client/restart snapshots carry its integrity binding through all existing recovery verification sites; absent legacy state is unchanged. Reads never invoke models, resolve opaque addresses or launch effects.
|
|
577
587
|
|
|
@@ -619,11 +629,9 @@ restoring an unbound probe ledger could lose its shared budget or uncertain lane
|
|
|
619
629
|
|
|
620
630
|
## T2 confined adapter contract
|
|
621
631
|
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
live-admission slices are separately ready. T2 tests use fake model ports and
|
|
626
|
-
model-free OS-boundary canaries only.
|
|
632
|
+
T2 defines the confined adapter boundary. T2 tests use fake model ports and
|
|
633
|
+
model-free OS-boundary canaries. Production activation follows the separate
|
|
634
|
+
[conductor-selected live pilot](#conductor-selected-live-worker-pilot).
|
|
627
635
|
|
|
628
636
|
### Same loop, separate host lifecycle
|
|
629
637
|
|
|
@@ -813,11 +821,8 @@ change authority/privacy and prove the next effect is refused.
|
|
|
813
821
|
|
|
814
822
|
## T3 receipts, reconcile and cleanup contract
|
|
815
823
|
|
|
816
|
-
|
|
817
|
-
(
|
|
818
|
-
model or worker trial. The constructor-only host adapter stays unwired. T3 adds evidence
|
|
819
|
-
and cleanup around sessions the existing lifecycle already runs; it changes no admission,
|
|
820
|
-
budget, fence or authority rule.
|
|
824
|
+
T3 defines the evidence and cleanup rules for sessions the probe lifecycle runs.
|
|
825
|
+
The [live pilot](#conductor-selected-live-worker-pilot) governs production admission.
|
|
821
826
|
|
|
822
827
|
### What a receipt is
|
|
823
828
|
|
|
@@ -837,7 +842,8 @@ exact experiment and slot ids, the reservation generation and revision, and:
|
|
|
837
842
|
They are `null` when the host could not read them (a crash reconcile never saw them),
|
|
838
843
|
which is unverified coverage. A fingerprint that differs from the declared one is
|
|
839
844
|
recorded as it is and makes the pair incomparable (`input_drift`).
|
|
840
|
-
- `
|
|
845
|
+
- `mode: "live"` on a live receipt. Fixture and older receipts omit `mode`.
|
|
846
|
+
- `startedAt`, `endedAt` and `elapsedMs` from the Store's trusted clock, and `expiresAt` at `endedAt + PROBE_RETENTION_MS` (14 days).
|
|
841
847
|
- `state`: one of `succeeded`, `failed`, `cancelled`, `timed_out`, `unavailable`,
|
|
842
848
|
`unknown`. `succeeded` requires every condition under "Sealing" below.
|
|
843
849
|
- `usage`: per-session model calls and tool calls with their known counts, and the
|
|
@@ -975,9 +981,8 @@ baseline's, or a fingerprint differs), `usage_unknown`, `incomplete_coverage`,
|
|
|
975
981
|
|
|
976
982
|
- A pair is incomparable if either side has a reason. One reason is enough; reasons are
|
|
977
983
|
listed, not ranked.
|
|
978
|
-
- The public `comparable` flag
|
|
979
|
-
|
|
980
|
-
case the current expression calls incomparable stays incomparable.
|
|
984
|
+
- The public `comparable` flag requires both the prior eligibility expression and
|
|
985
|
+
this sealed-receipt verdict. A store read failure yields `false`.
|
|
981
986
|
- The outcome denominator is every preregistered attempt slot that was reserved:
|
|
982
987
|
`succeeded`, `failed`, `cancelled`, `timed_out`, `unavailable` and `unknown` all count.
|
|
983
988
|
Slots never started stay `planned` or `not_needed` and are reported separately as such;
|
|
@@ -1100,10 +1105,7 @@ counts as `unknown`.
|
|
|
1100
1105
|
|
|
1101
1106
|
## T4 producer status and receipt export
|
|
1102
1107
|
|
|
1103
|
-
T4 (#1226)
|
|
1104
|
-
It does not enable a runner, claim native confinement, call a model or launch a worker, and the constructor-only adapter stays unwired (a test reads the daemon,
|
|
1105
|
-
the CLI, the plugin, the manager and every other adapter and fails if one names it). **AC7's authorized real local-worker trial is not part of this change and
|
|
1106
|
-
stays open**: nothing here shows actual isolation or effective guidance delivery to a model, and nothing may be read as showing either.
|
|
1108
|
+
T4 (#1226) exposes T3 receipts to producers and tests the fixture lifecycle end to end. This read surface never starts work. The daemon wiring and authority for AC7 are defined in the [live pilot](#conductor-selected-live-worker-pilot).
|
|
1107
1109
|
|
|
1108
1110
|
### What a producer or a receipt consumer reads
|
|
1109
1111
|
|
|
@@ -1121,7 +1123,7 @@ it launches, reserves, writes and prunes nothing, and a read-only Store serves i
|
|
|
1121
1123
|
`withheld` flag and the retention state of its output (`none`, `retained` or `pruned`).
|
|
1122
1124
|
|
|
1123
1125
|
Unknown stays unknown: a usage gap is `usage_unknown` and prints as `unknown`, never zero; an unobserved served model is `unobserved`; a slot with no receipt says
|
|
1124
|
-
so.
|
|
1126
|
+
so. Renderings distinguish fixture evidence from a sealed live receipt. Neither grade establishes sampling control, provider behaviour or model quality.
|
|
1125
1127
|
|
|
1126
1128
|
### Bounds, privacy and tamper
|
|
1127
1129
|
|