@staix/agent-hub 0.48.4 → 0.49.1
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 +5 -7
- package/docs/design/agent-hub-architecture.md +2 -1
- package/docs/design/agent-hub.md +2 -1
- package/docs/design/bus.md +3 -2
- package/docs/design/cli-output-inventory.md +39 -38
- package/docs/design/cli-output.md +9 -4
- package/docs/design/execution-reference.md +1 -0
- package/docs/design/guidance-experiments.md +4 -1
- package/docs/design/guidance-probes.md +34 -31
- package/docs/design/model-routes.md +12 -14
- package/docs/design/roadmap.md +11 -9
- package/docs/design/supervision.md +7 -6
- package/docs/design/task-board.md +3 -2
- package/docs/dogfood.md +1 -1
- package/docs/memory.md +3 -3
- package/docs/operations.md +14 -9
- package/docs/quickstart.md +20 -2
- package/docs/roadmap.json +519 -1
- package/docs/roadmap.md +94 -0
- package/docs/security.md +4 -2
- package/docs/verification/2026-11-26-compat-pi-1.6.1.md +28 -0
- package/docs/verification/2026-11-28-0.49.0.md +53 -0
- package/docs/verification/2026-11-29-0.49.1.md +50 -0
- package/docs/verified.json +19 -19
- package/package.json +3 -3
- package/plugins/agent-hub/.claude-plugin/plugin.json +1 -1
- package/plugins/agent-hub/kimi-hook.js +324 -98
- package/plugins/agent-hub/server.js +334 -104
- 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/console-state.ts +12 -39
- 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/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
|
@@ -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,24 @@ 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
|
|
55
|
+
verified-against: 8592cad91d0d18272112ee57559d8e94d9fff1d5
|
|
47
56
|
---
|
|
48
57
|
|
|
49
|
-
#
|
|
58
|
+
# Guidance probe admission and live worker pilot
|
|
50
59
|
|
|
51
|
-
|
|
60
|
+
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
61
|
|
|
53
|
-
|
|
62
|
+
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
63
|
|
|
55
|
-
|
|
64
|
+
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
65
|
|
|
57
66
|
## Manifest and units
|
|
58
67
|
|
|
@@ -198,17 +207,17 @@ Unknown, missing or mismatched fixed inputs, model identity, runtime/toolset/con
|
|
|
198
207
|
|
|
199
208
|
## Authority and currentness
|
|
200
209
|
|
|
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.
|
|
210
|
+
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
211
|
|
|
203
212
|
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
213
|
|
|
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
|
|
214
|
+
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
215
|
|
|
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.
|
|
216
|
+
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
217
|
|
|
209
|
-
The host-only `TasksDeps.guidanceProbes` dependency contains Store, optional fakePorts
|
|
218
|
+
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
219
|
|
|
211
|
-
|
|
220
|
+
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
221
|
|
|
213
222
|
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
223
|
|
|
@@ -490,7 +499,7 @@ interface ProbeFakeStopObservation {
|
|
|
490
499
|
interface ProbePublicReceipt extends ProbeReceipt {
|
|
491
500
|
experimentId: string | "withheld";
|
|
492
501
|
taskId: number;
|
|
493
|
-
evidence: "declaration" | "fixture" | "unknown";
|
|
502
|
+
evidence: "declaration" | "fixture" | "live" | "unknown";
|
|
494
503
|
}
|
|
495
504
|
interface ProbePublicStatus extends ProbePublicReceipt {
|
|
496
505
|
counters: ProbeCounters;
|
|
@@ -503,6 +512,7 @@ type GuidanceProbeCommand =
|
|
|
503
512
|
| { op: "register"; file: string; json: boolean }
|
|
504
513
|
| { op: "start"; id: ProbeSha256; revision: ProbeInteger; variantId?: ProbeSha256; json: boolean }
|
|
505
514
|
| { op: "show"; id: ProbeSha256; json: boolean }
|
|
515
|
+
| { op: "receipts"; id: ProbeSha256; json: boolean }
|
|
506
516
|
| { op: "cancel"; id: ProbeSha256; revision: ProbeInteger; json: boolean };
|
|
507
517
|
|
|
508
518
|
interface ProbeFakeEffectRequest {
|
|
@@ -535,6 +545,7 @@ interface GuidanceProbeFakePorts {
|
|
|
535
545
|
Tasks.guidanceProbeRegister(by: PeerId, value: unknown): Promise<ProbePublicReceipt>;
|
|
536
546
|
Tasks.guidanceProbeStart(by: PeerId, id: string, revision: number, variantId?: string): Promise<ProbePublicReceipt>;
|
|
537
547
|
Tasks.guidanceProbeShow(by: PeerId, id: string): Promise<ProbePublicStatus>;
|
|
548
|
+
Tasks.guidanceProbeReceipts(by: PeerId, id: string): Promise<ProbeReceiptExport>;
|
|
538
549
|
Tasks.guidanceProbeCancel(by: PeerId, id: string, revision: number): Promise<ProbePublicReceipt>;
|
|
539
550
|
```
|
|
540
551
|
|
|
@@ -571,7 +582,7 @@ Every role observation must report the exact full served model and a generic `in
|
|
|
571
582
|
|
|
572
583
|
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
584
|
|
|
574
|
-
The
|
|
585
|
+
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
586
|
|
|
576
587
|
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
588
|
|
|
@@ -619,11 +630,9 @@ restoring an unbound probe ledger could lose its shared budget or uncertain lane
|
|
|
619
630
|
|
|
620
631
|
## T2 confined adapter contract
|
|
621
632
|
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
live-admission slices are separately ready. T2 tests use fake model ports and
|
|
626
|
-
model-free OS-boundary canaries only.
|
|
633
|
+
T2 defines the confined adapter boundary. T2 tests use fake model ports and
|
|
634
|
+
model-free OS-boundary canaries. Production activation follows the separate
|
|
635
|
+
[conductor-selected live pilot](#conductor-selected-live-worker-pilot).
|
|
627
636
|
|
|
628
637
|
### Same loop, separate host lifecycle
|
|
629
638
|
|
|
@@ -813,11 +822,8 @@ change authority/privacy and prove the next effect is refused.
|
|
|
813
822
|
|
|
814
823
|
## T3 receipts, reconcile and cleanup contract
|
|
815
824
|
|
|
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.
|
|
825
|
+
T3 defines the evidence and cleanup rules for sessions the probe lifecycle runs.
|
|
826
|
+
The [live pilot](#conductor-selected-live-worker-pilot) governs production admission.
|
|
821
827
|
|
|
822
828
|
### What a receipt is
|
|
823
829
|
|
|
@@ -837,7 +843,8 @@ exact experiment and slot ids, the reservation generation and revision, and:
|
|
|
837
843
|
They are `null` when the host could not read them (a crash reconcile never saw them),
|
|
838
844
|
which is unverified coverage. A fingerprint that differs from the declared one is
|
|
839
845
|
recorded as it is and makes the pair incomparable (`input_drift`).
|
|
840
|
-
- `
|
|
846
|
+
- `mode: "live"` on a live receipt. Fixture and older receipts omit `mode`.
|
|
847
|
+
- `startedAt`, `endedAt` and `elapsedMs` from the Store's trusted clock, and `expiresAt` at `endedAt + PROBE_RETENTION_MS` (14 days).
|
|
841
848
|
- `state`: one of `succeeded`, `failed`, `cancelled`, `timed_out`, `unavailable`,
|
|
842
849
|
`unknown`. `succeeded` requires every condition under "Sealing" below.
|
|
843
850
|
- `usage`: per-session model calls and tool calls with their known counts, and the
|
|
@@ -975,9 +982,8 @@ baseline's, or a fingerprint differs), `usage_unknown`, `incomplete_coverage`,
|
|
|
975
982
|
|
|
976
983
|
- A pair is incomparable if either side has a reason. One reason is enough; reasons are
|
|
977
984
|
listed, not ranked.
|
|
978
|
-
- The public `comparable` flag
|
|
979
|
-
|
|
980
|
-
case the current expression calls incomparable stays incomparable.
|
|
985
|
+
- The public `comparable` flag requires both the prior eligibility expression and
|
|
986
|
+
this sealed-receipt verdict. A store read failure yields `false`.
|
|
981
987
|
- The outcome denominator is every preregistered attempt slot that was reserved:
|
|
982
988
|
`succeeded`, `failed`, `cancelled`, `timed_out`, `unavailable` and `unknown` all count.
|
|
983
989
|
Slots never started stay `planned` or `not_needed` and are reported separately as such;
|
|
@@ -1100,10 +1106,7 @@ counts as `unknown`.
|
|
|
1100
1106
|
|
|
1101
1107
|
## T4 producer status and receipt export
|
|
1102
1108
|
|
|
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.
|
|
1109
|
+
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
1110
|
|
|
1108
1111
|
### What a producer or a receipt consumer reads
|
|
1109
1112
|
|
|
@@ -1121,7 +1124,7 @@ it launches, reserves, writes and prunes nothing, and a read-only Store serves i
|
|
|
1121
1124
|
`withheld` flag and the retention state of its output (`none`, `retained` or `pruned`).
|
|
1122
1125
|
|
|
1123
1126
|
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.
|
|
1127
|
+
so. Renderings distinguish fixture evidence from a sealed live receipt. Neither grade establishes sampling control, provider behaviour or model quality.
|
|
1125
1128
|
|
|
1126
1129
|
### Bounds, privacy and tamper
|
|
1127
1130
|
|
|
@@ -31,6 +31,7 @@ paths:
|
|
|
31
31
|
- test/model-route-public-api-scalars.test.ts
|
|
32
32
|
- test/fixtures/model-route-public-api-scalars-v1.json
|
|
33
33
|
- test/route-stage-classifier.test.ts
|
|
34
|
+
verified-against: 8592cad91d0d18272112ee57559d8e94d9fff1d5
|
|
34
35
|
---
|
|
35
36
|
|
|
36
37
|
# Hub Model Routes
|
|
@@ -68,9 +69,9 @@ behavior, configuration grammar or generic decision-evidence v1 payload.
|
|
|
68
69
|
|
|
69
70
|
| Question | Owner | R1 status |
|
|
70
71
|
| --- | --- | --- |
|
|
71
|
-
| Which eligible model and reasoning effort should serve a stage or plan/execute request? | adec's configured policy, candidate constraints, pins and decider |
|
|
72
|
-
| Which model/effort should serve an optional judge choice? | adec where separately configured, with an in-house fallback | R2
|
|
73
|
-
| Whether to escalate, request an advisor review, or issue redo feedback | Hub route policy |
|
|
72
|
+
| Which eligible model and reasoning effort should serve a stage or plan/execute request? | adec's configured policy, candidate constraints, pins and decider | Optional `decision` consumer. Stage choice runs inside the ambiguity band. R2 can ask the phase-model question for plan/execute |
|
|
73
|
+
| Which model/effort should serve an optional judge choice? | adec where separately configured, with an in-house fallback | R2 supplies the optional judge request |
|
|
74
|
+
| Whether to escalate, request an advisor review, or issue redo feedback | Hub route policy | The owned R2 host policy preserves the caller boundary |
|
|
74
75
|
| Whether a task is PII and which peer receives it | PII screen and pure `assign()` | Outside model-choice routing; no adec delegation |
|
|
75
76
|
| Which deterministic tier remains when no applicable service choice is applied? | Hub fallback | R1 pure, model-free implementation |
|
|
76
77
|
| Whether a turn may execute, use a tool, cross a privacy boundary or spend budget | Current host admission | A route score or service proposal grants no authority |
|
|
@@ -82,7 +83,7 @@ effort and forwarded conversation. This is separate from `stay_switch`, whose
|
|
|
82
83
|
existing off/shadow/enforce behavior remains supported. R1 adds no service-call
|
|
83
84
|
path, classifier option, gateway effort application, service launch or credential
|
|
84
85
|
reader. #554 S2 adds the opt-in stage classifier option and its ambiguity band
|
|
85
|
-
below
|
|
86
|
+
below. R2 supplies the separate optional judge and plan/execute choice requests.
|
|
86
87
|
|
|
87
88
|
## Route contracts and compatibility
|
|
88
89
|
|
|
@@ -98,11 +99,10 @@ source-port counterparts.
|
|
|
98
99
|
proposal through the existing #813 consumer. A failed request, abstention,
|
|
99
100
|
`no_candidate`, invalid pair or unavailable service leaves that fallback.
|
|
100
101
|
- `plan_execute` retains its documented capable planning and efficient execution
|
|
101
|
-
boundary after the first mutation.
|
|
102
|
-
belong to R2.
|
|
102
|
+
boundary after the first mutation. The R2 host implementation can ask adec for a phase-model choice.
|
|
103
103
|
- `advisor` retains bounded APPROVE/REDO review of eligible no-tool answers;
|
|
104
104
|
`escalation` retains efficient start and same-category confirmation before a
|
|
105
|
-
capable latch.
|
|
105
|
+
capable latch. The R2 host implementation owns their triggers, parsing, prompts and judge backoff.
|
|
106
106
|
- Explicit model overrides and class fixed-model selections bypass routes as
|
|
107
107
|
before. A missing/retired route keeps the configured fixed-model fallback and
|
|
108
108
|
existing diagnostics. Loading configuration never rewrites operator files.
|
|
@@ -138,7 +138,7 @@ new stage fields to it.
|
|
|
138
138
|
### Stage evidence, newly authored
|
|
139
139
|
|
|
140
140
|
A separate pure builder produces `StageEvidence` for deterministic fallback and
|
|
141
|
-
|
|
141
|
+
optional stage-specific adec questions. This packet contains only closed numeric,
|
|
142
142
|
boolean and categorical data. It contains no source fragments, transcript,
|
|
143
143
|
command, tool argument, path, tool name, diagnostic text or service error prose.
|
|
144
144
|
It is not sent through the generic decision route by this delivery.
|
|
@@ -216,7 +216,7 @@ A diagnostic fingerprint may be used transiently to detect repetition; neither
|
|
|
216
216
|
its source text nor an unbounded fingerprint list is emitted. A later public
|
|
217
217
|
projection uses the closed packet above. A sensitive projection contains only
|
|
218
218
|
`schemaVersion`, `kind` and the four dimensions, with no turn category, counts,
|
|
219
|
-
scores or incomplete-history information
|
|
219
|
+
scores or incomplete-history information. The configured host route owns the separate service request.
|
|
220
220
|
|
|
221
221
|
Reviewed classification contract:
|
|
222
222
|
|
|
@@ -508,9 +508,7 @@ A later discovered owned absolute pin must be preserved explicitly.
|
|
|
508
508
|
|
|
509
509
|
## Host route policies and model-choice observation (R2)
|
|
510
510
|
|
|
511
|
-
This section
|
|
512
|
-
The self-contained helpers and focused receipts are separate from acceptance of
|
|
513
|
-
that integration. It adds no permission to consult the protected route bodies,
|
|
511
|
+
This section describes the shipped R2 host integration. Focused receipts cover the owned helpers and their host wiring. It adds no permission to consult the protected route bodies,
|
|
514
512
|
source-port vectors or `src/hub/ports.ts`. R1's four stage units are owned inputs;
|
|
515
513
|
R3 retires the derived implementations, provenance checker and corresponding
|
|
516
514
|
license/notice, and preserves reserved port offset 3 under a neutral name.
|
|
@@ -548,7 +546,7 @@ The hub neither reads nor writes that home or a provider key.
|
|
|
548
546
|
|
|
549
547
|
### Numeric question evidence
|
|
550
548
|
|
|
551
|
-
The
|
|
549
|
+
The ordinary R2 packet is closed and contains no transcript or arguments:
|
|
552
550
|
|
|
553
551
|
```ts
|
|
554
552
|
type HostChoicePurpose = "plan_execute_model" |
|
|
@@ -907,7 +905,7 @@ optional native `turn`, for host callers; this adds no runtime or event field.
|
|
|
907
905
|
## Privacy, authority and events
|
|
908
906
|
|
|
909
907
|
Off mode builds no service payload and sends no request. Local fallback features
|
|
910
|
-
may still be computed. Before any
|
|
908
|
+
may still be computed. Before any stage service payload is built or sent,
|
|
911
909
|
the host must apply the current privacy/observer admission. Review-observer
|
|
912
910
|
exclusion and remote turns skip the service. PII/private evidence requires
|
|
913
911
|
positive `onCampus()` and remains dimensions only even on campus. The decider's
|
package/docs/design/roadmap.md
CHANGED
|
@@ -14,6 +14,7 @@ paths:
|
|
|
14
14
|
- src/hub/roadmap-check.ts
|
|
15
15
|
- src/hub/roadmap-sync.ts
|
|
16
16
|
- src/hub/roadmap-export.ts
|
|
17
|
+
- src/hub/roadmap-issue-states.ts
|
|
17
18
|
- src/hub/github-import.ts
|
|
18
19
|
- src/hub/specs-task.ts
|
|
19
20
|
- src/hub/board.ts
|
|
@@ -52,6 +53,7 @@ paths:
|
|
|
52
53
|
- test/console-roadmap.test.ts
|
|
53
54
|
- test/check-roadmap.test.ts
|
|
54
55
|
- scripts/check-roadmap.mjs
|
|
56
|
+
verified-against: 8592cad91d0d18272112ee57559d8e94d9fff1d5
|
|
55
57
|
---
|
|
56
58
|
|
|
57
59
|
# Roadmap milestones
|
|
@@ -142,14 +144,14 @@ No roadmap writer emits task text to logs, events, notices or memory.
|
|
|
142
144
|
|
|
143
145
|
## Tools and CLI
|
|
144
146
|
|
|
145
|
-
The
|
|
147
|
+
The seven tools are `hub_roadmap_list`, `hub_roadmap_show {id}`, `hub_roadmap_check`,
|
|
148
|
+
`hub_roadmap_unplaced`, `hub_roadmap_triage`, `hub_roadmap_decompose` and
|
|
146
149
|
`hub_roadmap_edit {op, ...}`. The edit operations are new, edit, link, unlink,
|
|
147
|
-
order and
|
|
150
|
+
order, state, accept and reject. Fields and operands are closed per operation. A schema grants
|
|
148
151
|
no authority: Tasks and the daemon enforce current caller and read-only limits.
|
|
149
152
|
Every control rid gets a response, including unknown roadmap operations.
|
|
150
153
|
|
|
151
|
-
`ahub roadmap` defaults to list. `list
|
|
152
|
-
output is for a person. Mutations are:
|
|
154
|
+
`ahub roadmap` defaults to list. `list`, `show <id>`, `check`, `sync`, `export`, `unplaced`, `triage`, `decompose` and `import-github` support `--json`. Default output is for a person. Mutations are:
|
|
153
155
|
|
|
154
156
|
- `new --title <text> --outcome <text>` with optional horizon/order/target/parent.
|
|
155
157
|
- `edit <id> --revision <n>` with those optional fields; target/parent `none`
|
|
@@ -259,7 +261,7 @@ no write verb, method flag or body. The first page failing is an error; a later
|
|
|
259
261
|
under the page limit is `partial: true` with what was read. Pull requests are left out and every row's URL must equal its
|
|
260
262
|
canonical identity. `readGitHubImport` (the one-page Backlog intake) is unchanged.
|
|
261
263
|
|
|
262
|
-
**Triage.** `ahub roadmap triage [--repo] [--list]` and `hub_roadmap_triage {repo?, list?}` (configured planner or unique
|
|
264
|
+
**Triage.** `ahub roadmap triage [--repo] [--list] [--json]` and `hub_roadmap_triage {repo?, list?}` (configured planner or unique
|
|
263
265
|
conductor, never during a PII or private turn) ask the hub's model, in one call for at most 25 unplaced items, where each belongs.
|
|
264
266
|
The model sees only text that passed `publicMetadataText`, and everything it reads is labelled data. `parseTriage`
|
|
265
267
|
(`src/hub/roadmap-triage.ts`) keeps an answer only when it names an item and a milestone it was shown (or a bounded new
|
|
@@ -306,9 +308,9 @@ The current full issue inventory has a ceiling of 1000 rows including pull reque
|
|
|
306
308
|
|
|
307
309
|
A local milestone has at most one remote number per repository. R3's `milestone_imports` marks are the durable binding, including for an imported milestone. A creation includes `<!-- ahub-roadmap:<project>:<local milestone id> -->` in its description; the response must confirm the number, repository URL, title, state and marker before binding. After a lost response, exactly one marked milestone is offered as a local binding in a new confirmed preview. Duplicate markers or a title match without the marker are refused for inspection. A new milestone's first preview creates only the milestone; a later preview binds its server-assigned number and plans issue membership. Moving an issue directly to another known milestone never follows the move with a stale unassignment.
|
|
308
310
|
|
|
309
|
-
`ahub roadmap export` renders deterministic JSON and Markdown from screened
|
|
311
|
+
`ahub roadmap check` and `ahub roadmap export` share one live issue-state resolver over screened roadmap references. It reads at most 100 unique refs with at most four requests in flight, a 20-second shared deadline and a 10-second limit per call. Unreadable, unattempted and late results stay `unknown`. The export uses only those live states and derives its issue totals from them. Plan-review evidence remains available to its existing readers. `ahub roadmap export` renders deterministic JSON and Markdown from the screened snapshot and these live states. `--write` writes only `docs/roadmap.md` and `docs/roadmap.json` in the caller's Git worktree after proving it shares the selected repository, enforcing its current deny, read-only and PII path policy and refusing symlinks or hardlinks. A partially completed two-file write is reported. `--issue <n> --apply --confirm <fingerprint>` updates that issue body only after a matching preview, under the same person/conductor policy. The fingerprint binds repository, issue and rendered body.
|
|
310
312
|
|
|
311
|
-
Task state and merge changes schedule affected public milestones for an ids-only supervision notice. The existing five-minute merge-readback sweep rechecks unresolved findings, including the close-lag boundary. The hub's own pass reuses one working-tree spec check for up to 60 s across its milestone reads (#1738), so spec freshness in a finding can be up to a minute old. Reads by the person and peers check again, once per read: a roadmap check keeps the one spec check it started with across all of its issue reads. A durable marker suppresses a finding already delivered; an unavailable feed or evidence is retried on a later change or sweep. Private tasks are never named. `scripts/check-roadmap.mjs` is a standalone Node validator: it checks the generated JSON's schema, linked spec IDs and tracked spec paths, and checks known issue states when a GitHub token is available. `scripts/check.sh` and the hosted docs step run it.
|
|
313
|
+
Task state and merge changes schedule affected public milestones for an ids-only supervision notice. The existing five-minute merge-readback sweep rechecks unresolved findings, including the close-lag boundary. The hub's own pass reuses one working-tree spec check for up to 60 s across its milestone reads (#1738), so spec freshness in a finding can be up to a minute old. Reads by the person and peers check again, once per read: a roadmap check keeps the one spec check it started with across all of its issue reads. A durable marker suppresses a finding already delivered; an unavailable feed or evidence is retried on a later change or sweep. Private tasks are never named. `scripts/check-roadmap.mjs` is a standalone Node validator: it checks the generated JSON's schema, linked spec IDs and tracked spec paths, and checks known issue states when a GitHub token is available. `scripts/check.sh` and the hosted docs step run it. The Node-only release docs checker exempts three records from its stamp manifest: `docs/roadmap.md`, `docs/smoke.md` and `docs/gsd-collaboration-analysis.md`. The roadmap validator covers the generated roadmap page.
|
|
312
314
|
|
|
313
315
|
## Dashboard and console surfaces (R5)
|
|
314
316
|
|
|
@@ -344,6 +346,6 @@ the `roadmap` feature. Opening it reads `hub_roadmap_list` (5 s) and adds `hub_r
|
|
|
344
346
|
held one is older than five minutes. A row is id, horizon, state, approved/total, the withheld count and title, sorted by lane and then
|
|
345
347
|
by the milestone's own order; Enter opens the milestone through `hub_roadmap_show` into the labelled detail.
|
|
346
348
|
|
|
347
|
-
**`ahub ui --all`.** `projectConsole` gains an opt-in `roadmap: true` summary per project (`total`, `byHorizon`, `byState`, `drift`),
|
|
349
|
+
**`ahub ui --all`.** `projectConsole` gains an opt-in `roadmap: true` summary per project (`total`, `byHorizon`, `byState`, `drift`, `partial`),
|
|
348
350
|
read at most once a minute per project with each read bounded. It is opt-in because the acon provider shares `projectConsole` with
|
|
349
|
-
fixture hubs, and only the manager passes it. A read
|
|
351
|
+
fixture hubs, and only the manager passes it. A failed read marks the summary `partial: true`; the UI shows "roadmap unavailable".
|
|
@@ -15,6 +15,7 @@ paths:
|
|
|
15
15
|
- test/supervision-rules.test.ts
|
|
16
16
|
- test/supervision-proposals.test.ts
|
|
17
17
|
- test/acon-supervision-inbox-1221.test.ts
|
|
18
|
+
verified-against: 8592cad91d0d18272112ee57559d8e94d9fff1d5
|
|
18
19
|
---
|
|
19
20
|
|
|
20
21
|
# Supervision Rules, Proposals and the Decision Path
|
|
@@ -46,7 +47,7 @@ The acceptance that governs a revision is the last one before it. An acceptance
|
|
|
46
47
|
|
|
47
48
|
Each rule has an id, a version, one reason code and one suggested existing action. The version is part of an observation: bump it when the trigger, the refs or the meaning of a reason changes, so a stored observation states the contract it was made under.
|
|
48
49
|
|
|
49
|
-
**`repeated_failure` (version 1, reason `repeated_failure`, action `escalate`).** Two
|
|
50
|
+
**`repeated_failure` (version 1, reason `repeated_failure`, action `escalate`).** Two consecutive classified failures of the same class inside the current revision. A different classified failure begins its own streak, and unclassified events leave the streak alone. A failure is classified into a closed vocabulary: `check:<checkKey>`, `review:changes_requested`, `integration:unresolved`, `done:no-writes`. A code-scope rejection that names no finding (`evidenceOnly`) is not a defect of the work and is not classified. The history events `check passed`, `integrated` and `approved` reset the streak. The isolated `check run passed` event is evidence for the separate deliverable-invalidation rule. One observation is made per class, so a revision failing two different checks reports both and only the per-revision bound can refuse one. Trigger: `failures:<class>`; refs: the two failure records.
|
|
50
51
|
|
|
51
52
|
**`deliverable_invalidated_check` (version 2, reason `stale_check`, action `recheck`).** The revision recorded a completion check pass or an isolated `check run passed` and delivered at least one record, and the hub's own measurement now reads one of those delivered ids as changed or missing. Trigger: `check:<ids>`; refs: the check record and the stale deliverable ids. A delivered id is the only thing that can be stale: a file the hub measured but that this revision never delivered is not evidence about it. If the hub did not measure the files, the rule cannot decide and reports the gap `no-deliverable-measurement` instead of a clean reading.
|
|
52
53
|
|
|
@@ -69,7 +70,7 @@ A rule that cannot decide says so with a **gap**: rule id, version, task, revisi
|
|
|
69
70
|
| `MAX_RECORDS` | 64 | records one rule reads from one revision; a longer revision is a prefix and reports `truncated` |
|
|
70
71
|
| `REPEAT_FLOOR` | 2 | equal classified failures before the repetition rule fires: the first is an incident, the second a pattern |
|
|
71
72
|
| `MAX_REFS` | 8 | record refs one observation may carry |
|
|
72
|
-
| `MAX_OBSERVATIONS` | 100 | observations and
|
|
73
|
+
| `MAX_OBSERVATIONS` | 100 | each independent retention cap for observations, gaps and evaluated revisions in one shadow supervisor |
|
|
73
74
|
| `MAX_PER_REVISION` | 3 | observations one supervisor retains per rule, task and revision |
|
|
74
75
|
|
|
75
76
|
The retention bounds count what they refuse instead of storing it, so a bound never reads as "nothing to report". A refused observation or gap increments `suppressed` and is not kept; a gap that still cannot be retained on a later evaluation is refused and counted again rather than silently dropped.
|
|
@@ -100,9 +101,9 @@ Modes come from `supervision.mode`, machine-local and `off` by default:
|
|
|
100
101
|
|
|
101
102
|
Observation attaches to the board events the daemon already handles, after the history entry is written, plus one reconcile pass at startup. Nothing polls and nothing is scheduled. A private or unknown task is never observed, and a `backlog` or closed task is not supervised. One board event re-reads the task and each of its declared overlap partners: a pair's reading binds to its lower task id, so a change on the higher-id side is only seen by re-reading the lower one.
|
|
102
103
|
|
|
103
|
-
**Identity and invalidation.** A proposal keeps the reading's dedupe key `(rule, task, revision, trigger)`, unique in the store, so a replayed event or a second read adds nothing and is not counted as advice. A
|
|
104
|
+
**Identity and invalidation.** A proposal keeps the reading's dedupe key `(rule, task, revision, trigger)`, unique in the store, so a replayed event or a second read adds nothing and is not counted as advice. A disposed row (accepted, dismissed or expired) suppresses a repeat of its reading while the row is retained. Pruning the terminal row also removes its key. The queue expires what the current reading no longer produces (new input cleared the pattern, the task moved to another revision, closed or left the board). An owner native-generation mismatch expires the proposal lazily in `decide()`. A clipped reading (a revision longer than one rule reads) proposes nothing of its own and invalidates nothing, because a prefix proves neither.
|
|
104
105
|
|
|
105
|
-
**The decision path.** A pending proposal is decided by an explicit verb, `accept` or `dismiss`, from the hub tools (`hub_supervision_list`, `hub_supervision_accept`, `hub_supervision_dismiss`) or from the advisory inbox row. Every fence runs before any effect, in this order: the id's own grammar, an existing pending row, a present role on the task (its owner, its reviewer, the configured planner, the conductor, or the person; no new supervisor role exists), the action's own authority, a non-private task, a non-clipped reading, the task still on the board, open and on the same revision, the same native generation it was read under, the reading still holding when re-evaluated, and no `needs_review` delivery holding the owner. The role and the action's authority are read a second time after the facts are awaited and immediately before the row is disposed, because the board can move while that read is in flight. A
|
|
106
|
+
**The decision path.** A pending proposal is decided by an explicit verb, `accept` or `dismiss`, from the hub tools (`hub_supervision_list`, `hub_supervision_accept`, `hub_supervision_dismiss`) or from the advisory inbox row. Every fence runs before any effect, in this order: the id's own grammar, an existing pending row, a present role on the task (its owner, its reviewer, the configured planner, the conductor, or the person; no new supervisor role exists), the action's own authority, a non-private task, a non-clipped reading, the task still on the board, open and on the same revision, the same native generation it was read under, sufficient edit evidence for an edit rule to be evaluated, the reading still holding when re-evaluated, and no `needs_review` delivery holding the owner. The role and the action's authority are read a second time after the facts are awaited and immediately before the row is disposed, because the board can move while that read is in flight. A stale reading expires the proposal. Unavailable edit evidence and refusals about the caller, action authority or hold leave it pending for whoever can take it up. The disposition is a compare-and-set on `state = 'pending'`, so of two deciders racing on one proposal exactly one wins and a decided proposal can never be run twice.
|
|
106
107
|
|
|
107
108
|
A role on the task is not the authority to run what the proposal names. Accepting an `escalate` proposal is the conductor's move, or the person's; an acceptance by the task's owner, reviewer or a planner is refused and the row stays pending rather than being spent on a refusal the action itself would issue. `recheck` and `request_integration` hand the owner a notice, which any present decider may do.
|
|
108
109
|
|
|
@@ -110,7 +111,7 @@ A role on the task is not the authority to run what the proposal names. Acceptin
|
|
|
110
111
|
|
|
111
112
|
**An uncertain outcome is never retried.** An action that throws without a synchronous pre-effect refusal leaves the receipt `unknown`. A read settles such a receipt only from the board's own record of that action at or after the **intent** time (`disposedAt`), and only inside the task revision the proposal was read under, so a later escalation of another attempt cannot settle it. The intent time is the boundary and the receipt time is not: the receipt is stamped after a failure threw and again after a restart, so it is always later than the action it reports on. A restart settles an outcome the hub never observed as `unknown` rather than replaying it.
|
|
112
113
|
|
|
113
|
-
**Restart (AC6).** Dedupe keys, dispositions and unknown receipts all live in the table, so a restart keeps them. The one reconcile pass at startup expires pending proposals whose task moved, closed or left the board, and marks an acceptance whose action never reported as `unknown`. Nothing is replayed and nothing is retried.
|
|
114
|
+
**Restart (AC6).** Dedupe keys, dispositions and unknown receipts all live in the table, so a restart keeps them. The one reconcile pass at startup expires pending proposals whose task became private, moved, closed or left the board, and marks an acceptance whose action never reported as `unknown`. Nothing is replayed and nothing is retried.
|
|
114
115
|
|
|
115
116
|
**Bounds.** A proposal is a closed shape of codes and ids: rule, version, task, revision, trigger, refs, records read and whether it was clipped, the existing action, the reason code, the native generation, and later the disposition and its receipt. It carries no prose, no note, no title and no file body, and nothing about a private task reaches it.
|
|
116
117
|
|
|
@@ -118,7 +119,7 @@ A role on the task is not the authority to run what the proposal names. Acceptin
|
|
|
118
119
|
| --- | --- | --- |
|
|
119
120
|
| `MAX_PROPOSALS` | 100 | pending proposals the queue holds; a further reading is refused, never counted as advice, and counted in the `refused` total `hub_supervision_list` reports |
|
|
120
121
|
| `MAX_PROPOSALS_PER_REVISION` | 3 | proposals one task revision gets, decisions included |
|
|
121
|
-
| `MAX_PROPOSAL_ROWS` | 400 | terminal rows kept for dedupe and history; past it the oldest terminal row
|
|
122
|
+
| `MAX_PROPOSAL_ROWS` | 400 | terminal rows kept for dedupe and history; past it the oldest terminal row and its dedupe key go. Pending rows are retained |
|
|
122
123
|
| `MAX_PROPOSAL_READ` | 50 | proposals one read returns, pending first |
|
|
123
124
|
|
|
124
125
|
## Edit governance arms
|
|
@@ -58,6 +58,7 @@ paths:
|
|
|
58
58
|
- src/hub/task-list-page.ts
|
|
59
59
|
- src/hub/worktree-shelf.ts
|
|
60
60
|
- src/hub/worktree-prs.ts
|
|
61
|
+
verified-against: 8592cad91d0d18272112ee57559d8e94d9fff1d5
|
|
61
62
|
---
|
|
62
63
|
|
|
63
64
|
# Task Board
|
|
@@ -449,11 +450,11 @@ The board stores facts about worktrees and never a verdict. `worktree_override`
|
|
|
449
450
|
|
|
450
451
|
The PR state has two sources and no others. The board's own evidence says `merged` only through the guarded merge's record (`sdlc.merge`); a cancelled task or a task with no record says nothing about its PR and reads `unknown`. The person's explicit refresh (`worktrees_refresh_prs`, `src/hub/worktree-prs.ts`) reads the PR through `readSdlcPr`, bounded and one at a time, and keeps `open`, `merged` or `closed` with GitHub's own change time in the daemon's memory. `worktree-shelf.ts` holds no GitHub access, so a panel read, `ahub worktrees` and the inbox alert make no GitHub call.
|
|
451
452
|
|
|
452
|
-
A worktree whose activity could not be read is live and never settled. The shelf reads git asynchronously under a total budget and answers `complete: false` when it is cut; the daemon's event loop is never held. The daemon deletes no worktree and no local branch: its git port allows three read argv shapes, and removal exists only in the person's own `ahub worktrees tidy --confirm
|
|
453
|
+
A worktree whose activity could not be read is live and never settled. The shelf reads git asynchronously under a total budget and answers `complete: false` when it is cut; the daemon's event loop is never held. The daemon deletes no worktree and no local branch: its git port allows three read argv shapes, and removal exists only in the person's own `ahub worktrees tidy --confirm <fingerprint>`, which is console class and issues `git worktree remove` and `git branch -d`, never `--force` or `-D`. Operations: `docs/operations.md`, "The worktree shelf (#1057)".
|
|
453
454
|
|
|
454
455
|
## Anchored review packages (#1056)
|
|
455
456
|
|
|
456
|
-
`ReviewFinding.anchor` uses the exact-pinned `@staix/agent-console` 0.
|
|
457
|
+
`ReviewFinding.anchor` uses the exact-pinned `@staix/agent-console` 0.2.0 DOM-free `./contract` entry through type-only imports. The generated declaration bridge is removed. `test/acon-review-contract.test.ts` checks the unchanged shared fixtures against both the published acon conformance functions and the hub validator; the project retains its Bun-only TypeScript libraries. Contract conformance and hub writes are separate: hub writes allow 1-4 selectors, 512 UTF-8 bytes for an exact quote, 64 each for prefix and suffix, 256 for a hunk header, 2048 for a comment body and 64 comments per task. The hub additionally caps paths at 4096 bytes, projection name/version and structural scheme at 128 each, structural ref at 512 and verified author identity at 512. These bounds keep each stored thread within its fixed read bound. Quote selector text remains exact in storage; `sanitize()` applies when it is rendered beside hub headers. The hub limits count UTF-8 bytes, independently of acon's character limits: 171 Hangul syllables exceed the 512-byte exact-quote cap. Refusals identify the field, bound and next step. Unknown fields and selectors refuse before effects. A finding path, when present, must equal its anchor path. Findings without anchors retain the existing head buckets and Important carry-over rule.
|
|
457
458
|
|
|
458
459
|
All person comment writes go through `Tasks`. The console can put or delete a draft without a peer envelope. An explicit send binds the selected immutable anchors and bodies to one package, changes their lifecycle to sent, appends one count-only task history entry and attempts one review envelope. A failed or uncertain notification never retries automatically. Its receipt distinguishes queued from unconfirmed delivery; neither means the owner read it. The saved package retains its immutable body, envelope identity, original visibility binding and versioned publication-evidence contract. Its serialized record must fit 32768 UTF-8 bytes before any sent write. A previously unpublished package is admitted only while every selected comment remains sent and its originally visible text remains public under current policy; a missing binding, dismissal or privacy change refuses without rewriting or publishing the old body. An explicit confirmed Send with `packageId` recovers only that saved package. Durable queue or delivery evidence makes this idempotent, including after restart; failed or discarded deliveries refuse with their actual state and `ahub queue` inspection guidance rather than reporting queued or replaying the effect. Unknown evidence and legacy packages refuse with inspection guidance. Person-package terminal receipts are retained alongside the package rather than pruned with ordinary delivery history. Quote-bearing reviewer requests use a distinct `reviewer-request-` marker and their terminal rows follow ordinary pruning. This retains a full receipt per package; package archival with an IDs-only tombstone is the upgrade path. Deleting a sent comment dismisses it without rewriting its anchor. Only a final successful owner completion may claim resolved comment IDs; a queued or failed check leaves them sent. That claim is not person verification or a review verdict.
|
|
459
460
|
|
package/docs/dogfood.md
CHANGED
|
@@ -321,7 +321,7 @@ agent-hub is developed with agent-hub. This page lists every feature, whether it
|
|
|
321
321
|
| Companion CLI contract v1 (#1387 T0) | on: `docs/contracts/companion-cli-v1.json` lists what the Orca, Herdr and Claude Code companions may read from `ahub status --json` and `ahub projects --json`, the no-hub exit and the `shellQuote` vectors | `test/companion-contract.test.ts` runs the real commands against a scratch hub and fails when a listed path, type or closed set drifts; its guard fails when ahub's `src/`, `scripts/`, `plugins/` or `package.json` names a companion repository |
|
|
322
322
|
| Companion per-peer context (#1511) | contract and scratch fixture coverage; native companion display unverified | real `ahub status --json` against a scratch hub with a fixture Claude status-line sample exposes `used` and `freshness`; `test/companion-contract.test.ts` checks absent, nullable and closed-set cases |
|
|
323
323
|
| CLI output standard v1 (#1484 T1, `docs/design/cli-output.md`) | on after release: every `ahub` command that colors output reads `resolveColor` per stream, so `FORCE_COLOR` / `CLICOLOR_FORCE` color a pipe and `FORCE_COLOR=0` / `CLICOLOR=0` uncolor a terminal (a behavior change). `ahub doctor` and the error line adopt them in #1484 T2 (hub task 957): doctor exits 1 on a failed row, a usage error exits 2, `ahub task show <missing id>` exits 1 on stderr; `ahub status` (hub task 958, T3) opens with an Attention list: each item a marker, the finding and its exact next command, with the old full view behind `--verbose`; `ahub help` (hub task 959, T4) is an overview of one row per command, with the long text in `ahub help <command>`; hub task 966 (#1504) adds a blank line before the first section, a summary per native agent from its definition, and `ahub help <command>` as Usage, Description, Flags, Examples and Details. Help, status and doctor accept `--ascii` to use ASCII markers. The #1654 help slice lists each command once and adds examples to bare commands | `test/cli-output-conformance.test.ts` (the five conformance checks, the six color rules and the raw-SGR guard) runs in `bun test`; `test/help.test.ts` checks the ASCII overview and `test/status-default-view.test.ts` checks aligned ASCII status markers; `test/cli-output-conformance.test.ts` pins `--ascii` selection, locale fallback and aligned ASCII marker output. In real use, `ahub doctor; echo $?` ends in a summary line and exits 1 while a row is `✗`, `ahub nosuchcmd; echo $?` prints 2, `ahub help | wc -l` is about 110 (it was about 1,040) and `ahub help status` prints Usage, Description, Flags, Examples and then the full long text, `ahub status` starts with `▸ Attention` and either `✓ nothing needs attention` or `⚠`/`✗` rows each followed by a `→` command, `FORCE_COLOR=1 ahub help \| cat` shows color, `NO_COLOR=1 ahub help` and `ahub help \| cat` show none |
|
|
324
|
-
| CLI views and warnings on the shared Report (#1654 T3, T4, AC3, AC4; hub tasks 1115, 1116, 1135, 1137, 1141; #1724
|
|
324
|
+
| CLI views and warnings on the shared Report (#1654 T3, T4, AC3, AC4; hub tasks 1115, 1116, 1135, 1137, 1141; #1724 batches 1 to 6) | on after release: `ahub projects`, `queue`, `turns` and the orphan views open with the standard header and a counted section; `status --verbose`, `status --full`, `report`, the `sdlc` views (`status`, `explain`, `queue`, `audit show`, `release`, `metrics`, `costs`, `authorize-release`, `merge`, `configure`, `survey show`), `task show`/`cancel`, backlog, `release`, `source`, `schedule`, `study`, `task handoff`, `learn`, `intake`, `capabilities`, `worktrees`, `room`, the sdlc receipts (`audit start`, release train, plan review, acceptance, read-back), `settings`, `agents`, `broker`, `reset`, `undo`, `kill`, `ask`, `answer` and `results` print on the same layout and take `--ascii`; warnings print as `ahub: warning: <what>: <why>` with an optional `→` next step | `test/output.test.ts` pins the list tables at 80 and 120 columns; `test/cli-output-conformance.test.ts` checks the grammar over the real output of every converted view (header first, a section mark per group, no line over 24, 40 or 80 cells, `--ascii` keeps the line count) and the warning shape, and fails on a raw console call outside the sanctioned paths that is not in the shrink-only `scripts/cli-raw-output.baseline.json`; `test/sdlc-output.test.ts` pins the sdlc views |
|
|
325
325
|
|
|
326
326
|
## Decisions
|
|
327
327
|
|
package/docs/memory.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Agent-hub consumes the first-party [`@staix/agent-mem`](https://github.com/STAIxBWLB/agent-mem) library through the declared range `>=X.Y.Z <M.0.0` in [package.json](../package.json) (X.Y.Z at or above 0.33.0, M the next major; the lockfile resolves a release inside it). A plain release inside the range is accepted without a hub release when the package's `HOST_API_MIN` and `HOST_API_VERSION` are positive integers, `MIN <= VERSION`, and their range intersects the host API range this hub supports (`[1, 1]`); a package without them, or with an incompatible host API, is refused with the cause and the next step. A new major is a reviewed raise. Format-floor note: a new minor may raise the on-disk format floor, and a store written by it is not readable by an older hub or amem, so roll the hub back only together with the store, and read agent-mem's release notes for the new floor before upgrading. The package owns portable storage, tiers, graph, goals, sync, import and raw commands. Agent-hub owns caller authority, current project privacy policy, task lifecycle integration and presentation. Claude-mem is an optional, explicit import source only; runtime recall and capture make no worker HTTP requests.
|
|
4
4
|
|
|
5
|
-
The declared range is `>=0.
|
|
5
|
+
The declared range is `>=0.42.0 <1.0.0`. The floor follows the shared `@staix/cli-output` pin: agent-mem 0.42.0 is the first release that pins cli-output 0.1.4 exactly, as the hub does, and recovery requires the two pins to match (#1768). The range also keeps agent-mem's outstanding-task index (`MemoryStore.unsettledTaskKeys`, agent-mem#610, since 0.39.0; see [Task lifecycle and host policy](#task-lifecycle-and-host-policy)). A hub that loads 0.41.0 or older refuses memory at load with the range check above. Since 0.39.0, each populated profile has a v6 derived index beside the v5 one, so a 0.38.0 reader (such as a 0.46.1 hub) can share the home; 0.42.0 adds a separate search cache, so older versions keep their own index. `HOST_API_VERSION` stays 1, and no store or sync format floor is raised.
|
|
6
6
|
|
|
7
7
|
## Portable core and data directory
|
|
8
8
|
|
|
@@ -322,11 +322,11 @@ An unchanged failure emits one safe log line per episode. A complete bounded pol
|
|
|
322
322
|
|
|
323
323
|
`ahub memory declined [--json]` is a read-only inspection that an agent shell may also run (#1522). It reports physical outbound row IDs and safe policy categories, never title, body, path nodes or literal private patterns. Reads defer promotions and recheck the profile binding. Forgotten originals still matter: `forget` changes materialized visibility but leaves the source row in append-only history. Do not use it as a promise to clear a sync refusal.
|
|
324
324
|
|
|
325
|
-
The declared agent-mem floor (0.
|
|
325
|
+
The declared agent-mem floor (0.42.0) supplies bounded `inspectSyncPolicy` inspection for shared-v1 and generation profiles. A complete result lists the declined IDs and safe rule categories for the inspected physical outbound history, including originals hidden by a later forget. An incomplete `input-bound` result may now carry an optional `bound` receipt (`kind`, `limit`, `observed`, `nextStep`); `complete` and `reason` keep their shapes. An unavailable, stale or bounded-out inspection remains explicitly incomplete; it never proves that no declined rows exist. The hub uses the public SDK rather than private helpers, snapshots of full history or its own portable log reader.
|
|
326
326
|
|
|
327
327
|
The package also owns per-row local placement. The hub adopts only the projection of a successful trusted SDK placement result: `ok` with its verified withheld/exported counts. Since agent-mem 0.23.0 the daemon passes `placementAttestation` on every `syncMemory` pass, built by the package's own `createPlacementAttestation` for the memory home (`hostPlacementAttestation`, `src/hub/memory-sync-attestation.ts`). A legacy or shared-v1 store ignores it. The hub supplies no writer facts of its own, never fabricates the proof and builds a new one per pass, so no measurement outlives it. A refusal (`PlacementWriterContextError`) is its own closed cause `writer` in status, the dashboard and the log: the category (`running CLI`, `host package`, `setup receipt`, `declared writer`, `active locator`, `home floor`, `writer renewal`, or `unknown` for an unrecognized SDK category), the cause class (`missing`, `changed`, `unavailable`) and the next step (repair the amem install and its host pin, then a person runs `amem migrate --sync-placement --dry-run`). The package's message, paths and versions never enter status or logs. It logs once per episode like every other cause. Count projection does not delete or rewrite notes, change policy or promote a declined row; transport failures remain failures.
|
|
328
328
|
|
|
329
|
-
Legacy stores without active per-row placement still refuse a sync containing declined rows. The native amem CLI has person-only activation from 0.22.0 ([activation documentation](https://github.com/STAIxBWLB/agent-mem/blob/v0.24.0/README.md#initial-sync-placement-activation)). A person using a CLI upgraded with the hub's declared floor (0.
|
|
329
|
+
Legacy stores without active per-row placement still refuse a sync containing declined rows. The native amem CLI has person-only activation from 0.22.0 ([activation documentation](https://github.com/STAIxBWLB/agent-mem/blob/v0.24.0/README.md#initial-sync-placement-activation)). A person using a CLI upgraded with the hub's declared floor (0.42.0; a 0.22.1 install sharing the home drops Record entries, see [Agent-authored records](#agent-authored-records-1320)) can preview it with every local writer installation declared, including the CLI and hub library installs:
|
|
330
330
|
|
|
331
331
|
```sh
|
|
332
332
|
amem migrate --sync-placement --dry-run --writer-root '<cli-install-root>' --writer-root '<host-amem-install-root>' --json
|