@sema-agent/core 5.57.0 → 5.59.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (192) hide show
  1. package/CHANGELOG.md +96 -0
  2. package/dist/agents/cascade.d.ts +1 -1
  3. package/dist/agents/cumulative-stats.d.ts +1 -1
  4. package/dist/agents/observer.d.ts +2 -2
  5. package/dist/agents/peer-admission.d.ts +1 -1
  6. package/dist/agents/retain-ledger.d.ts +2 -2
  7. package/dist/agents/roster-store.d.ts +8 -8
  8. package/dist/agents/send-message-tool.d.ts +2 -2
  9. package/dist/agents/subagent-steps.d.ts +1 -1
  10. package/dist/agents/subagent.d.ts +13 -13
  11. package/dist/agents/team.d.ts +5 -5
  12. package/dist/agents/tool-filter.d.ts +2 -2
  13. package/dist/agents/verify.d.ts +1 -1
  14. package/dist/bench/metrics.d.ts +35 -35
  15. package/dist/brain/degrading.d.ts +1 -1
  16. package/dist/brain/errors.d.ts +3 -3
  17. package/dist/brain/reasoning.d.ts +2 -2
  18. package/dist/brain/repetition.d.ts +1 -1
  19. package/dist/brain/route-adjudicator.d.ts +8 -1
  20. package/dist/brain/route-adjudicator.js +8 -1
  21. package/dist/brain/status-sink.d.ts +2 -2
  22. package/dist/brain/stream-shared.d.ts +1 -1
  23. package/dist/config/catalog.d.ts +5 -5
  24. package/dist/core/arg-summary.d.ts +4 -4
  25. package/dist/core/ask-class.d.ts +2 -2
  26. package/dist/core/ask-question.d.ts +1 -1
  27. package/dist/core/auto-compaction.d.ts +15 -15
  28. package/dist/core/auto-mode.d.ts +5 -5
  29. package/dist/core/background-agent-store.d.ts +20 -20
  30. package/dist/core/background-shell.d.ts +4 -4
  31. package/dist/core/checkpoint-store.d.ts +35 -27
  32. package/dist/core/context-edit.d.ts +1 -1
  33. package/dist/core/context-guard.d.ts +1 -1
  34. package/dist/core/exec-output-tail.d.ts +6 -6
  35. package/dist/core/file-snapshot-store.d.ts +8 -8
  36. package/dist/core/git-worktree-env.d.ts +3 -3
  37. package/dist/core/governance-codes.d.ts +37 -10
  38. package/dist/core/governance-codes.js +54 -1
  39. package/dist/core/hooks.d.ts +73 -33
  40. package/dist/core/hooks.js +87 -25
  41. package/dist/core/image-downsample.d.ts +1 -1
  42. package/dist/core/locked-config.d.ts +1 -1
  43. package/dist/core/lsp.d.ts +1 -1
  44. package/dist/core/mailbox-store.d.ts +1 -1
  45. package/dist/core/mcp.d.ts +3 -3
  46. package/dist/core/memory-engine/consolidation-driver.d.ts +211 -0
  47. package/dist/core/memory-engine/consolidation-driver.js +427 -0
  48. package/dist/core/memory-engine/consolidation.d.ts +119 -3
  49. package/dist/core/memory-engine/consolidation.js +22 -1
  50. package/dist/core/memory-engine/data-plane.d.ts +1 -1
  51. package/dist/core/memory-engine/distiller.d.ts +550 -0
  52. package/dist/core/memory-engine/distiller.js +598 -0
  53. package/dist/core/memory-engine/dual-root.d.ts +1 -1
  54. package/dist/core/memory-engine/engine.d.ts +143 -10
  55. package/dist/core/memory-engine/engine.js +149 -23
  56. package/dist/core/memory-engine/file-backend.d.ts +14 -2
  57. package/dist/core/memory-engine/file-backend.js +3 -0
  58. package/dist/core/memory-engine/index.d.ts +6 -3
  59. package/dist/core/memory-engine/index.js +4 -2
  60. package/dist/core/memory-engine/layout.js +20 -6
  61. package/dist/core/memory-engine/origin-clearance.d.ts +1 -1
  62. package/dist/core/memory-engine/scope-contract.d.ts +4 -4
  63. package/dist/core/memory-engine/sync-client.d.ts +16 -16
  64. package/dist/core/memory-engine/sync.d.ts +4 -4
  65. package/dist/core/memory-engine/types.d.ts +17 -0
  66. package/dist/core/memory-recall.d.ts +1 -1
  67. package/dist/core/memory.d.ts +2 -2
  68. package/dist/core/permission-rule-consent.d.ts +185 -36
  69. package/dist/core/permission-rule-consent.js +219 -44
  70. package/dist/core/permission-rule-model.d.ts +235 -31
  71. package/dist/core/permission-rule-model.js +105 -35
  72. package/dist/core/permission-rules.d.ts +9 -9
  73. package/dist/core/remote-env.d.ts +8 -8
  74. package/dist/core/roles.d.ts +3 -3
  75. package/dist/core/roles.js +1 -0
  76. package/dist/core/runner/assemble-result.d.ts +2 -2
  77. package/dist/core/runner/compaction-call-options.d.ts +3 -3
  78. package/dist/core/runner/memory-consolidation-driver.d.ts +49 -0
  79. package/dist/core/runner/memory-consolidation-driver.js +60 -0
  80. package/dist/core/runner/memory-consolidation.d.ts +1 -1
  81. package/dist/core/runner/prepare-config-doors.d.ts +3 -3
  82. package/dist/core/runner/prepare-task.d.ts +21 -21
  83. package/dist/core/runner/prepare-task.js +24 -17
  84. package/dist/core/runner/prepare-workspace-restore.d.ts +2 -2
  85. package/dist/core/runner/runtask.d.ts +11 -11
  86. package/dist/core/runner/runtask.js +4 -4
  87. package/dist/core/runner/session-rule-policy.d.ts +1 -1
  88. package/dist/core/runner/teardown-bounded.d.ts +1 -1
  89. package/dist/core/runner/tool-disclosure.d.ts +2 -2
  90. package/dist/core/runner/turn-attachments.d.ts +11 -11
  91. package/dist/core/scheduler.d.ts +5 -5
  92. package/dist/core/secret-env.d.ts +1 -1
  93. package/dist/core/sensitive-path-policy.d.ts +1 -1
  94. package/dist/core/session-policy-store.d.ts +2 -2
  95. package/dist/core/session-reconcile.d.ts +2 -2
  96. package/dist/core/session-store.d.ts +3 -3
  97. package/dist/core/session.d.ts +1 -1
  98. package/dist/core/shutdown-debug.d.ts +2 -2
  99. package/dist/core/side-query.d.ts +2 -2
  100. package/dist/core/spec-contract.d.ts +1 -1
  101. package/dist/core/store-contracts/contract-harness.d.ts +2 -2
  102. package/dist/core/store-contracts/contract-kit-version.d.ts +2 -2
  103. package/dist/core/store-contracts/mailbox-store-contract.d.ts +1 -1
  104. package/dist/core/store-contracts/mailbox-store-contract.js +1 -1
  105. package/dist/core/task-notification.d.ts +5 -5
  106. package/dist/core/task-registry-agent.d.ts +12 -12
  107. package/dist/core/task-registry-monitor.d.ts +1 -1
  108. package/dist/core/task-registry-shared.d.ts +41 -41
  109. package/dist/core/task-registry.d.ts +12 -12
  110. package/dist/core/tool-detach.d.ts +2 -2
  111. package/dist/core/tool-errors.d.ts +3 -3
  112. package/dist/core/tool-policy.d.ts +113 -28
  113. package/dist/core/tool-policy.js +80 -1
  114. package/dist/core/tool-result-budget.d.ts +1 -1
  115. package/dist/core/tool-result-store.d.ts +2 -2
  116. package/dist/core/tools.d.ts +1 -1
  117. package/dist/core/trace.d.ts +26 -23
  118. package/dist/core/types.d.ts +164 -86
  119. package/dist/core/types.js +4 -3
  120. package/dist/core/untrusted-egress.d.ts +1 -1
  121. package/dist/core/untrusted-text.d.ts +7 -7
  122. package/dist/core/wiring-manifest.d.ts +5 -5
  123. package/dist/core/workflow-journal-store.d.ts +14 -14
  124. package/dist/core/workflow-run-store-contract.d.ts +1 -1
  125. package/dist/core/workflow-run-store-contract.js +1 -1
  126. package/dist/core/workflow-run-store.d.ts +4 -4
  127. package/dist/engine/compaction/compaction.d.ts +3 -3
  128. package/dist/engine/compaction/utils.d.ts +2 -2
  129. package/dist/engine/execution-env/kill-tree.d.ts +1 -1
  130. package/dist/engine/execution-env/node-execution-env.d.ts +8 -8
  131. package/dist/engine/harness/agent-harness.d.ts +6 -6
  132. package/dist/engine/harness/messages.d.ts +1 -1
  133. package/dist/engine/harness/types.d.ts +10 -10
  134. package/dist/engine/llm/types.d.ts +14 -14
  135. package/dist/engine/loop/agent-loop.d.ts +3 -3
  136. package/dist/engine/loop/types.d.ts +4 -4
  137. package/dist/engine/lsp/node-lsp-manager.d.ts +2 -2
  138. package/dist/engine/session/import-validate.d.ts +1 -1
  139. package/dist/engine/session/log-digest.d.ts +1 -1
  140. package/dist/engine/session/memory-repo.d.ts +2 -2
  141. package/dist/engine/session/session.d.ts +4 -4
  142. package/dist/fixtures/index.d.ts +4 -4
  143. package/dist/index.d.ts +6 -5
  144. package/dist/index.js +5 -4
  145. package/dist/orchestration/goal.d.ts +1 -1
  146. package/dist/orchestration/run-spec.d.ts +1 -1
  147. package/dist/orchestration/run-workflow-tool.d.ts +12 -12
  148. package/dist/orchestration/workflow-governance.d.ts +4 -4
  149. package/dist/orchestration/workflow-observe.d.ts +1 -1
  150. package/dist/orchestration/workflow-script-runner.d.ts +1 -1
  151. package/dist/orchestration/workflow-script-store.d.ts +9 -9
  152. package/dist/orchestration/workflow-size-guideline.d.ts +1 -1
  153. package/dist/orchestration/workflow-types.d.ts +5 -5
  154. package/dist/orchestration/workflow.d.ts +10 -10
  155. package/dist/prompt-assembly/artifact-store.d.ts +1 -1
  156. package/dist/prompt-assembly/artifact.d.ts +1 -1
  157. package/dist/prompt-assembly/assemble.d.ts +1 -1
  158. package/dist/prompt-assembly/composer.d.ts +2 -2
  159. package/dist/prompt-assembly/epoch.d.ts +2 -2
  160. package/dist/prompt-assembly/event-registry.d.ts +1 -1
  161. package/dist/prompt-assembly/explain.d.ts +3 -3
  162. package/dist/prompt-assembly/tool-catalog.d.ts +1 -1
  163. package/dist/prompt-assembly/turn-snapshot.d.ts +4 -4
  164. package/dist/prompt-assembly/types.d.ts +12 -12
  165. package/dist/prompts/coordinator.d.ts +1 -1
  166. package/dist/prompts/default.d.ts +8 -8
  167. package/dist/prompts/simple-sections.d.ts +3 -3
  168. package/dist/prompts/supervisor.d.ts +2 -2
  169. package/dist/scenarios/full-body.d.ts +3 -3
  170. package/dist/scenarios/scenario-registry.d.ts +1 -1
  171. package/dist/stores/cc/sidecar-transcript.d.ts +3 -3
  172. package/dist/stores/file/fs-atomic.d.ts +2 -2
  173. package/dist/stores/file/index.d.ts +1 -1
  174. package/dist/stores/file/session-store.d.ts +2 -2
  175. package/dist/stores/file/workflow-journal-store.d.ts +4 -4
  176. package/dist/tools/fs/bash-readonly-classifier.d.ts +1 -1
  177. package/dist/tools/fs/encoding.d.ts +4 -4
  178. package/dist/tools/fs/fs-bash.d.ts +3 -3
  179. package/dist/tools/fs/fs-pdf.d.ts +1 -1
  180. package/dist/tools/fs/fs-shared.d.ts +6 -6
  181. package/dist/tools/fs/index.d.ts +2 -2
  182. package/dist/tools/fs/notebook.d.ts +1 -1
  183. package/dist/tools/fs/pdf.d.ts +1 -1
  184. package/dist/tools/fs/read-deny.d.ts +1 -1
  185. package/dist/tools/fs/safety.d.ts +9 -9
  186. package/dist/tools/fs/search.d.ts +2 -2
  187. package/dist/tools/monitor.d.ts +3 -3
  188. package/dist/tools/task-list.d.ts +2 -2
  189. package/dist/tools/web.d.ts +4 -4
  190. package/dist/tools/worktree.d.ts +5 -5
  191. package/package.json +1 -1
  192. package/test/export-surface.snapshot.json +1826 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,101 @@
1
1
  # Changelog
2
2
 
3
+ ## 5.59.0 — 2026-08-24
4
+
5
+ ### BREAKING (narrow, named)
6
+ - **`ConsolidationDriverEngine` requires `readConsolidationPlanFoldEvidence`** (the member-level
7
+ conservation wall's read face). `MemoryEngine` satisfies it as before; a custom driver-engine stub
8
+ must add the member (compile error otherwise). Default-off feature shipped one version ago —
9
+ blast radius is stub authors only.
10
+
11
+ ### Changed — consolidation safety narrowings (design/376 slice ③; default-off face, all fail-closed)
12
+ - **Member-level conservation wall**: a run whose planned members were deleted/excluded/folded by
13
+ another writer mid-run now settles `driver_failed` naming the missing ids, where a numeric offset
14
+ previously produced a false `converged`. Attribution uses the exact plan-frozen cycle-id grammar
15
+ (prefix-shadow ids cannot re-satisfy a member). Count witnesses remain the fast pass.
16
+ - **C-2 scan-refusal reach**: scan findings refuse per PRODUCT (disclosed; whole-plan refusal past
17
+ `min(floor(0.25×submitted), 8)` — knobs `scanRefusalRatioCap`/`scanRefusalMaxPerPlan`, bad values
18
+ refuse loudly); an empty or frozen-empty plan refuses instead of settling a vacuous completed;
19
+ refused input ids are excluded from the completion fingerprint and ride the plan file under a
20
+ bidirectional v2⇔member version gate (a pre-field worker parks loudly on a v2 plan instead of
21
+ settling wrong). WIDENING, named: refused products' edges no longer trip the supersession fuse.
22
+ - **C-3 instruction-form hard gate is unconditional**: a clean visible set refuses instruction-form
23
+ products by default (previously committed), naming the host escape hatch
24
+ `consolidation.allowInstructionProducts: true` (screened exactly-true; opens the clean arm only —
25
+ a marked set refuses with no opening knob).
26
+ - Registry reads are journal-aware (a committed journal wins; an unreadable journal throws
27
+ fail-closed instead of serving a clean-looking stale registry).
28
+
29
+ ### Added
30
+ - **`NOTICE_AUDIENCE` registry (closed)**: `ENGINE_NOTICE_CODES` is the 27-code catalog,
31
+ `NOTICE_AUDIENCE` answers for every member (8 user / 19 operator) in compile-time lockstep both
32
+ directions; `task.user_steer_undrained`/`task.user_followup_undrained` now carry `sessionId`
33
+ filled from the real run; catalog/code/audience types root-exported for downstream table diffing.
34
+ - **`AskRequest.hasBidiControls`** presence bit (additive): minted at the ask throat over
35
+ execution-snapshot args + tool preview for the directional-control class (U+061C/200E/200F/
36
+ 202A-202E/2066-2069); presence-only (never `false`; absence covers budget exhaustion), zero
37
+ rewriting; the scan charges every character — values, object keys, Map keys, inherited names —
38
+ through ONE bounded reader (node budget + 1M code-unit allowance). Plus
39
+ **`renderUntrustedCommandText`** root export: the lossy DISPLAY baseline for raw command bytes
40
+ (strips Cf, folds controls to spaces, code-point cap with ellipsis; identity stays on raw).
41
+ - **Read faces**: `readConsolidationGateState` (present|absent|corrupt-with-detail; legacy face
42
+ byte-unchanged), `readConsolidationPlanFoldEvidence` (ok/absent/corrupt; applied-only edges),
43
+ `MemoryEngine.listMemoryScopes()`/File-backend `listScopes()` with the `supported` discriminator
44
+ (a backend that cannot enumerate answers `supported:false` with a reason, never `[]`).
45
+ - **Export tiers v1**: the export-surface snapshot carries a machine-readable `tiers` column
46
+ (stable/advanced/internal; self-declared heuristic) with a three-leg gate (every live export
47
+ tiered, no stale rows, live derivation ≡ frozen column).
48
+ - `OriginClearanceRow`/`OriginClearanceEvent` root type exports (server design/316 car-B compile
49
+ prerequisite). Export surface 1749 → 1758, all additive.
50
+
51
+ ## 5.58.0 — 2026-08-24
52
+
53
+ ### BREAKING (design/375 case A — per-segment batch consent; ships as one window, no compatibility arms)
54
+ - **`AskRequest.ruleSuggestions` → `ruleOffers`**: a closed discriminated union
55
+ (`single{rule,match,command}` | `batch{rules(1..5), uncoveredSegments}`); at most 2 offers, the
56
+ whole-string exact single always at index 0, the batch always last; choosing a batch is ONE yes to
57
+ all its members. `PendingAction.tool_approval` carries the same seat. An unknown offer kind
58
+ degrades to a single opaque row preserving the original wire index (fail toward asking).
59
+ - **`RuleApprovalRecord` schema:2**: `schema`+`offers` required; `selectedCandidate` → `selectedOffer`.
60
+ Pre-v2 rows refuse loudly (`record_schema_stale`, envelope read, ownership concealment keeps
61
+ precedence) — pending approvals from before the upgrade are re-asked, never migrated. Supplying the
62
+ retired `selectedCandidate` key (or `selectedOffer: null`) refuses `config.invalid_argument`.
63
+ - **`redeemRuleBatch`** returns a per-member discriminated table `{members, rev}` keyed by
64
+ `candidateIndex` (success rows carry `alreadyRedeemed`+`dot`, refused rows carry `reason`;
65
+ exactly one row per selected-offer member, projection map fixed); the three-array `ImportResult`
66
+ shape is deleted. `RuleApprovalRecordStore.get` may return `StaleRuleApprovalRecord` (envelope).
67
+ - **Engine conjunction arm** (§5.1): a compound command whose EVERY segment is admitted by some
68
+ eligible persisted rule is allowed — the segment deny/ask fence stays strictly ahead, whole-string
69
+ exact and the compound-prefix form keep their precedence, and a single-command prefix still never
70
+ admits a compound. `PersistedRuleHit` becomes `{ rules }` (covering set; evidence dots = union).
71
+ Eligibility is two-layered and single-sourced (`eligiblePersisted`/`eligibleContext`;
72
+ tombstoned/foreign-scope rules can never join a conjunction).
73
+ - The suggester mints offers (`suggestRulesForCommand` returns `RuleOffer[]`; only uncovered
74
+ segments enter a batch; the compound-prefix candidate is no longer offered — existing
75
+ compound-prefix rules keep matching forever); the card-edit face accepts one edited rule judged by
76
+ the single-rule coverage predicate.
77
+
78
+ ### Added
79
+ - **LLM-driven memory consolidation, slices 1+2 (design/376; default OFF, additive)**: the fold-plan
80
+ distiller becomes a product module (frozen prompt contract byte-equal to the benchmark's, canonical
81
+ hash pinned; structural repairs counted, repair-budget abort); `runMemoryConsolidationDriver` host
82
+ verb with a first-class run row (claim/attempt single-writer, stale-rev replay guard, write-failure
83
+ groups end the run `driver_failed`, `memory.consolidation_incomplete` notice, FORCED announcement
84
+ once per run); `consolidate` model role resolving consolidate → summarize → loud refusal (never the
85
+ default model). The bench rig now consumes the product module (scripted-arm projection digest
86
+ unchanged across the port). Auto-trigger wiring is a later slice; nothing runs without an explicit
87
+ driver seat.
88
+ - **Dependency-direction gate**: the engine's bottom-of-graph position is frozen mechanically (no
89
+ sibling `@sema-agent/*` in manifest or src imports).
90
+
91
+ ### Fixed
92
+ - **Internal-wording sweep over the shipped surface** (S10 class): board-coordinate and campaign-name
93
+ vocabulary cleared to zero across shipped `.d.ts` JSDoc and runtime strings (744 comment lines
94
+ rewritten 1:1, two runtime string leaks fixed); the wording gate's lexicon now also catches
95
+ 3-digit coordinate forms.
96
+ - Bench provenance axis (P1) landed with two harness fixes (seed origin carriage, read/write
97
+ provenance mode mismatch) — measurement only, no engine behavior change.
98
+
3
99
  ## 5.57.0 — 2026-08-23
4
100
 
5
101
  ### Added
@@ -105,7 +105,7 @@ export interface CascadeAttempt {
105
105
  index: number;
106
106
  model: ModelRef;
107
107
  passed: boolean;
108
- /** This rung's OWN+nested spend. ABSENT when the rung ran unpriced (RB-368 knownness, codex batch-4
108
+ /** This rung's OWN+nested spend. ABSENT when the rung ran unpriced (RB-368 knownness batch-4
109
109
  * F4) — a fabricated 0 here both misreported the attempt and let escalation ride under a finite
110
110
  * ceiling the engine could not actually enforce. */
111
111
  costMicroUsd?: number;
@@ -58,7 +58,7 @@ export interface CumulativeStatsAccumulator {
58
58
  /**
59
59
  * TRUE when ANY contributing leg published no `costMicroUsd`, i.e. it ran on a model with neither a
60
60
  * `RunnerDeps.pricing` entry nor a `Model.cost` declaration (`stats.costMicroUsd` is contractually
61
- * ABSENT there — types.ts / RB-368 [2076]).
61
+ * ABSENT there — types.ts / RB-368).
62
62
  *
63
63
  * Accumulating such a leg as `?? 0` publishes a total that is not one: the operation's real cost is
64
64
  * unknown, and reporting the priced legs' partial sum makes "no price table" indistinguishable from
@@ -257,12 +257,12 @@ export declare class ObserverPairing {
257
257
  retire(state: Exclude<ObserverPairingState, "armed">): void;
258
258
  }
259
259
  export declare function markObserverTaskId(taskId: string): void;
260
- /** codex OBS-2 F3 — lifecycle revocation: the wiring unmarks at observed-run settle (after the final
260
+ /** lifecycle revocation: the wiring unmarks at observed-run settle (after the final
261
261
  * drain + session release), so the set tracks LIVE observers only instead of growing per delegation
262
262
  * forever (and a long-dead observer id no longer trips the SendMessage target refusal). */
263
263
  export declare function unmarkObserverTaskId(taskId: string): void;
264
264
  export declare function isObserverTaskId(taskId: string): boolean;
265
- /** Diagnostic face (codex OBS-2b F-08): how many observer identities are currently LIVE — a test's
265
+ /** Diagnostic face: how many observer identities are currently LIVE — a test's
266
266
  * lifecycle assertion ("armed here, revoked after settle") without exposing the ids themselves. */
267
267
  export declare function observerTaskIdCount(): number;
268
268
  /** CC @18371202 — SendMessage refusal when the SENDER is an observer run. */
@@ -127,7 +127,7 @@ export interface PeerAdmissionOptions {
127
127
  export declare function createPeerAdmission(options?: PeerAdmissionOptions): PeerAdmission;
128
128
  export declare function peerAdmissionFor(scope: string | undefined, recipientKey: string, config: PeerAdmissionConfig, options?: PeerAdmissionOptions): PeerAdmission;
129
129
  /**
130
- * The delivery legs' ONE admission entry (codex 176-r2): registry seat-commit follows the SAME
130
+ * The delivery legs' ONE admission entry: registry seat-commit follows the SAME
131
131
  * refusal-is-side-effect-free rule as the sender table inside `admit` — the instance is looked up
132
132
  * WITHOUT an LRU touch (a detached fresh one serves a first-contact recipient), judged, and only an
133
133
  * ADMITTED message commits the seat (insert + touch + bounded eviction). A refusal to a
@@ -96,7 +96,7 @@ export interface RetainLedgerHooks {
96
96
  * `prepareTask` when the spec opts in, threaded to delegation tools as the TRUSTED `ctx.subagentRetain`,
97
97
  * and disposed by the Runner in the task's terminal `finally` (D4: abort in-flight resumes + unpin +
98
98
  * release every retained session — retain is NOT durable; resume is reachable only while the parent run
99
- * lives, codex-B3). Leaks are double-bounded by `max` + `ttlMs` (codex-B2).
99
+ * lives). Leaks are double-bounded by `max` + `ttlMs`.
100
100
  */
101
101
  export declare class SubagentRetainLedger {
102
102
  readonly ttlMs: number;
@@ -159,7 +159,7 @@ export declare class SubagentRetainLedger {
159
159
  get size(): number;
160
160
  get(parentToolCallId: string): SubagentRetainEntry | undefined;
161
161
  wasEvicted(parentToolCallId: string): boolean;
162
- /** codex impl-review MAJOR-1 — LAZY TTL sweep: evict every settled idle entry whose retain TTL
162
+ /** LAZY TTL sweep: evict every settled idle entry whose retain TTL
163
163
  * elapsed (unpin + release + tombstone), so an expired session is freed at the NEXT ledger touch
164
164
  * (every spawn-registration and resume entry call this) rather than only when its own resume is tried.
165
165
  * fidelity R4-1: no longer the only reaper — `markSettled` also arms a per-entry ACTIVE timer, so
@@ -8,7 +8,7 @@ export interface RosterEntry {
8
8
  sessionId?: string;
9
9
  /** The spawn's parent tool-call id (retain-ledger key), when known. */
10
10
  toolUseId?: string;
11
- /** δ 批 [1498]⑦ — the ROOT host session of the delegation tree at spawn (recovery-face grouping
11
+ /** the ROOT host session of the delegation tree at spawn (recovery-face grouping
12
12
  * key; equals the spawner's session at depth 1). Stored verbatim; no predicate arm consumes it
13
13
  * yet (enumeration/recovery is the reader). */
14
14
  rootSessionId?: string;
@@ -19,11 +19,11 @@ export interface RosterEntry {
19
19
  * inherited default. Closed set, single member today; absent = bound normally (or no word). */
20
20
  modelFallback?: "inherit_no_tier_binding";
21
21
  /** Spawn owner (task/session id) — consumers re-apply access checks against these two axes.
22
- * β 批 A-2: REQUIRED (default-deny predicate; an axis-less row would be unreachable). */
22
+ * A-2: REQUIRED (default-deny predicate; an axis-less row would be unreachable). */
23
23
  owner: string;
24
- /** Spawn principal scope. β 批 A-2: REQUIRED (`"default"` is the single-tenant spelling). */
24
+ /** Spawn principal scope. A-2: REQUIRED (`"default"` is the single-tenant spelling). */
25
25
  scope: string;
26
- /** codex R3 — mirrors the live registry's explicit session-scoping flag: session-ID owner matching
26
+ /** mirrors the live registry's explicit session-scoping flag: session-ID owner matching
27
27
  * is permitted ONLY when the spawn was session-scoped (TaskRegistry.canAccess parity — without
28
28
  * the flag, a task-scoped agent that fell out of the live registry would become visible through
29
29
  * the durable fallback to same-session callers the registry itself rejects). */
@@ -33,7 +33,7 @@ export interface RosterEntry {
33
33
  }
34
34
  /**
35
35
  * The caller's access axes for a roster read — the SAME predicate the live task registry applies
36
- * (`canAccess`): scope mismatch = invisible; then owner match, or session match. codex F3 (S1
36
+ * (`canAccess`): scope mismatch = invisible; then owner match, or session match. (S1
37
37
  * review): resolution MUST filter the candidate pool by access BEFORE the latest-wins reduce —
38
38
  * reduce-then-check lets one tenant's newer same-name entry shadow (and thereby suppress) another
39
39
  * tenant's older authorized binding. Implementations (incl. pg/tidb) apply this in the query.
@@ -43,7 +43,7 @@ export interface RosterAccess {
43
43
  scope?: string;
44
44
  sessionId?: string;
45
45
  }
46
- /** β 批 A-2 (clay 裁定 2026-07-22): DEFAULT-DENY both axes (TaskRegistry.canAccess byte-parity —
46
+ /** Ruled 2026-07-22: DEFAULT-DENY both axes (TaskRegistry.canAccess byte-parity —
47
47
  * the polarity split was the defect). Entries are written with both axes (spawn chain guarantees
48
48
  * it; {@link RosterEntry} requires them), so a missing axis is a broken row, answered with a miss. */
49
49
  export declare function entryAccessible(e: RosterEntry, access: RosterAccess): boolean;
@@ -77,7 +77,7 @@ export interface RosterStore {
77
77
  /** Record (or supersede — latest-wins per normalized name is applied at READ time) a binding. */
78
78
  record(entry: RosterEntry): void | Promise<void>;
79
79
  /** Resolve a name for a CALLER: filter by {@link RosterAccess} FIRST, then latest `createdAt`
80
- * wins within the authorized pool (codex F3 filter-before-reduce). Undefined = miss. */
80
+ * wins within the authorized pool (filter-before-reduce). Undefined = miss. */
81
81
  resolve(name: string, access: RosterAccess): RosterEntry | undefined | Promise<RosterEntry | undefined>;
82
82
  /** All live entries (diagnostics / deployment listing; order unspecified). */
83
83
  list(): RosterEntry[] | Promise<RosterEntry[]>;
@@ -148,7 +148,7 @@ export declare class FileRosterStore implements RosterStore {
148
148
  * miss on resolve/list — advisory layer), but it is no longer SILENT: an IO failure or corrupt
149
149
  * document was indistinguishable from an honestly empty roster. Never fires on plain ENOENT. */
150
150
  private discloseCorrupt;
151
- /** codex F4 — two read grades: MISSING file (ENOENT) is an honest empty roster, but a corrupt or
151
+ /** two read grades: MISSING file (ENOENT) is an honest empty roster, but a corrupt or
152
152
  * transiently unreadable file must THROW on the mutation path — treating it as empty would let
153
153
  * the next `record` atomically REPLACE the existing file with just one row (silent data loss).
154
154
  * Read paths (resolve/list) degrade the throw to a miss via `lenient`. */
@@ -59,7 +59,7 @@ export interface SendMessageToolOptions {
59
59
  senderName?: string;
60
60
  /** design/147 S1c — the deployment's durable roster, consulted after the live registry misses. */
61
61
  roster?: import("./roster-store.js").RosterStore;
62
- /** design/147 S3a (codex F2) — the PARENT run's retain ledger (RunInternals.parentRetainLedger):
62
+ /** design/147 S3a — the PARENT run's retain ledger (RunInternals.parentRetainLedger):
63
63
  * the sibling leg's retain entries live there. Consulted AFTER the own-run and session ledgers. */
64
64
  siblingRetain?: SubagentRetainLedger;
65
65
  /** RB-390 — the SPAWNING run's taskId when THIS run is a delegated child (RunInternals.parentTaskId,
@@ -78,7 +78,7 @@ export interface SendMessageToolOptions {
78
78
  * session-scoped sibling registers with owner = the parent's sessionId, which the parent's
79
79
  * taskId alone cannot satisfy when the two differ (same rationale as ToolExecuteContext.parentSessionId). */
80
80
  parentSessionId?: string;
81
- /** [1358] the process-level background-child observer (RunnerDeps.onBackgroundChildEvent) — the
81
+ /** the process-level background-child observer (RunnerDeps.onBackgroundChildEvent) — the
82
82
  * mount fills this so a SendMessage resume re-emits the spawn→tick→terminal family (fleet row
83
83
  * revival). Rides the OPTS closure like notify; RB-409's {@link enrichCtx} feeds the ctx twin. */
84
84
  onBackgroundChildEvent?: (event: import("../core/types.js").BackgroundChildEvent) => void;
@@ -84,7 +84,7 @@ export declare class SubagentStepRecorder {
84
84
  editedFiles(): SubagentEditedFile[] | undefined;
85
85
  /** The child's most recent tool intent as one human line ("Bash npm test", "Edit src/x.ts"); undefined if none. */
86
86
  currentAction(): string | undefined;
87
- /** [1828] (server cross-repo): {@link currentAction} pre-formatted into a fleet-view Progress-section
87
+ /** {@link currentAction} pre-formatted into a fleet-view Progress-section
88
88
  * shape — the SAME `{tool, target}` pair `currentAction` already concatenates into one line, exposed
89
89
  * separately so a consumer can look the tool up in its own registry instead of parsing prose.
90
90
  * Undefined if none observed (mirrors {@link currentAction}'s own undefined case exactly). */
@@ -335,8 +335,8 @@ export interface SubagentSteerHandle {
335
335
  /**
336
336
  * design/122 D1 — the retained child session id; present ONLY when the parent run enabled
337
337
  * {@link import("../core/types.js").TaskSpec.retainSubagentSessions} AND this child was actually
338
- * retained. ⚠️ Control-plane only (codex-B6): this is a continuation CAPABILITY — never expose it to
339
- * clients; target children by the opaque `parentToolCallId` instead (codex-m3).
338
+ * retained. ⚠️ Control-plane only: this is a continuation CAPABILITY — never expose it to
339
+ * clients; target children by the opaque `parentToolCallId` instead.
340
340
  */
341
341
  childSessionId?: string;
342
342
  /**
@@ -385,7 +385,7 @@ export declare function createSubagentResume(deps: {
385
385
  * apply to EVERY stop cycle, spawn and resume alike). Absent ⇒ honest ungated degradation (no
386
386
  * registry to count against — the pre-C1 immediate send). */
387
387
  registry?: import("../core/task-registry.js").TaskRegistry;
388
- /** design/147 S1a (codex F1) — the RESUMING caller's live injection entry: overrides the retained
388
+ /** design/147 S1a — the RESUMING caller's live injection entry: overrides the retained
389
389
  * snapshot's spawn-turn `parentNotify` (that lane is torn down with its turn — uplinks through it
390
390
  * would PARK instead of reaching the currently active parent turn, behind a success receipt). */
391
391
  currentParentNotify?: (n: TaskNotificationPayload, opts?: {
@@ -442,7 +442,7 @@ export declare function createSubagentResume(deps: {
442
442
  taskId?: string;
443
443
  /** S2b RB-27② — the resuming caller's resolved registry access (pairs with taskId). */
444
444
  taskAccess?: import("../core/task-registry.js").TaskAccess;
445
- /** [1358] the process-level background-child observer (ctx.onBackgroundChildEvent, Runner-filled).
445
+ /** the process-level background-child observer (ctx.onBackgroundChildEvent, Runner-filled).
446
446
  * When present TOGETHER with a revived registry row (taskId + successful revive), the resume cycle
447
447
  * re-emits the SAME spawn→tick→terminal event family as a first spawn — a fleet view's row revives
448
448
  * on the spawn frame (server treats spawn-after-tombstone as row revival). The spawn frame is
@@ -450,11 +450,11 @@ export declare function createSubagentResume(deps: {
450
450
  * tick — the observer's tombstone-period tick rejection depends on that order). No revived row ⇒
451
451
  * no frames (the steer-handle resume path has no a*-domain row to project). */
452
452
  bgSink?: (event: import("../core/types.js").BackgroundChildEvent) => void;
453
- /** [1358] row lifetime class echoed onto the revive frames (mirrors the registry row). */
453
+ /** row lifetime class echoed onto the revive frames (mirrors the registry row). */
454
454
  sessionScoped?: boolean;
455
- /** [1358] the row's display description, echoed onto the revive spawn frame (resume-marked). */
455
+ /** the row's display description, echoed onto the revive spawn frame (resume-marked). */
456
456
  rowDescription?: string;
457
- /** [1358]/codex 1351 F3 — the row's original observer metadata, reproduced on the revive frames so
457
+ /** the row's original observer metadata, reproduced on the revive frames so
458
458
  * a consumer rebuilding a tombstoned row gets its TYPE/name/ancestry back (never a blank row). */
459
459
  rowName?: string;
460
460
  rowAgentType?: string;
@@ -516,10 +516,10 @@ export interface SubagentToolOptions {
516
516
  */
517
517
  background?: {
518
518
  registry: import("../core/task-registry.js").TaskRegistry;
519
- /** β 批 A-2 (BREAKING 1.365.0): REQUIRED — the registry is default-deny on both axes, so a
519
+ /** A-2 (BREAKING 1.365.0): REQUIRED — the registry is default-deny on both axes, so a
520
520
  * background registration without a declared owner would be unreachable by every caller. */
521
521
  owner: string;
522
- /** β 批 A-2 (BREAKING 1.365.0): REQUIRED — `"default"` is the single-tenant spelling (explicit,
522
+ /** A-2 (BREAKING 1.365.0): REQUIRED — `"default"` is the single-tenant spelling (explicit,
523
523
  * matching the engine chain's `principal ?? "default"`), never implied by omission. */
524
524
  scope: string;
525
525
  /**
@@ -559,7 +559,7 @@ export interface SubagentToolOptions {
559
559
  * vetoes the park: the child settles failed exactly as pre-153, and the already-minted
560
560
  * checkpoint is expired (no orphans). Never called for sync children or non-suspending runs.
561
561
  *
562
- * ⚠️ Implementation obligation (blackboard [1593]/[1594], field-proven): "migrates it here"
562
+ * ⚠️ Implementation obligation (field-proven): "migrates it here"
563
563
  * means ACTIVELY PROMOTE — a check-only implementation that merely LOOKS UP the host durable
564
564
  * store rejects every child whose session lives in a split/transient tier (a subRunner's
565
565
  * private TTL store), and the veto fires on EVERY park: the checkpoint expires within
@@ -658,7 +658,7 @@ export interface SubagentToolOptions {
658
658
  * agent is selected) govern them verbatim: an explicit allowlist must NAME an injected tool for the
659
659
  * child to see it; `"*"`/absent allowlist = all. Nested delegation threads the SAME factory down
660
660
  * (`createSubagentToolNode(opts, depth+1)` carries it), so a grandchild spawn re-evaluates it — per-spawn,
661
- * at every level; each child gets its own instances bound to its own spawn moment ([797]: the
661
+ * at every level; each child gets its own instances bound to its own spawn moment (the
662
662
  * server-side factory is execute-time late-bound, so per-spawn evaluation is the confirmed shape).
663
663
  * A THROWING/rejecting factory degrades THAT spawn to zero injected tools (the child still runs)
664
664
  * with a FIXED generic `note:` disclosure on the report/async card (same lane as the model-override
@@ -793,7 +793,7 @@ export declare function asyncLaunchedReceipt(p: {
793
793
  taskId: string;
794
794
  /** The lane's own "what is running" opener — the Agent lane and the fork lane say different things. */
795
795
  workingLine: string;
796
- /** Whether a real notification sink is wired (codex R4: the receipt speaks the RUNTIME sink truth). */
796
+ /** Whether a real notification sink is wired (the receipt speaks the RUNTIME sink truth). */
797
797
  notify: boolean;
798
798
  /**
799
799
  * RB-220 — mirrors {@link import("../core/types.js").ToolExecuteContext.oneShot}: this run has no
@@ -821,7 +821,7 @@ export declare function createSubagentTool(opts: SubagentToolOptions): ToolSpec;
821
821
  * "All tools except …"; neither ⇒ "All tools". sema delta: `allowTools: ["*"]` is the documented
822
822
  * allow-everything sentinel (AgentDefinition.allowTools) — treated as NO allowlist, not a literal list.
823
823
  *
824
- * [901] deliberate: this renders the AUTHORED list raw — upstream's listing does too (gHm reads the
824
+ * deliberate: this renders the AUTHORED list raw — upstream's listing does too (gHm reads the
825
825
  * definition; the unknown-item split happens later, at spawn, in its resolveAgentTools). It is the
826
826
  * DECLARED boundary, NOT the effective child roster: an unknown entry may appear here while the
827
827
  * spawn-time filter (resolveToolSubset — the authority) drops it, and an alias-form divergence can
@@ -45,7 +45,7 @@ export type TeamEvent = {
45
45
  role: string;
46
46
  text: string;
47
47
  }
48
- /** [571]③ budget axes: the cumulative team budget was exhausted after this member's turn settled —
48
+ /** budget axes: the cumulative team budget was exhausted after this member's turn settled —
49
49
  * remaining rounds/members are skipped and the discussion goes straight to synthesis. */
50
50
  | {
51
51
  type: "budget_stop";
@@ -113,7 +113,7 @@ export interface TeamDiscussionOptions {
113
113
  /**
114
114
  * `maxWalltimeMs`/`maxTurns` are PER-RUN caps forwarded to every member/summary/synthesizer run.
115
115
  *
116
- * `maxTokens`/`maxCostUsd` ([571]③, CollabTemplate.budget mid-flight enforcement) are CUMULATIVE
116
+ * `maxTokens`/`maxCostUsd` (CollabTemplate.budget mid-flight enforcement) are CUMULATIVE
117
117
  * team budgets over member + summary + synthesizer spend (nested/delegated spend included, same
118
118
  * coordinate as the `stats` totals). Enforcement is checked after each member turn settles and is
119
119
  * booked — the crossing member is never killed in flight — and once a budget is exhausted
@@ -176,7 +176,7 @@ export interface TeamResult {
176
176
  * conclusion — so callers can tell a junk conclusion from a legitimate one. */
177
177
  conclusionValid: boolean;
178
178
  transcript: TeamTurn[];
179
- /** `costMicroUsd` ([571]③): cumulative team LLM spend in integer micro-USD (member + summary +
179
+ /** `costMicroUsd`: cumulative team LLM spend in integer micro-USD (member + summary +
180
180
  * synthesizer, nested included) — the same engine coordinate as `TaskResult.stats.costMicroUsd`.
181
181
  * Always set (0 when no run reported cost); optional only for type-level back-compat. */
182
182
  stats: {
@@ -185,7 +185,7 @@ export interface TeamResult {
185
185
  costMicroUsd?: number;
186
186
  };
187
187
  /**
188
- * [571]③ budget-stop attribution: set when a cumulative budget axis was exhausted and the
188
+ * budget-stop attribution: set when a cumulative budget axis was exhausted and the
189
189
  * discussion stopped dispatching further members/rounds early. `round`/`role`/`memberIndex`
190
190
  * identify the LAST member turn that ran (the one whose settled totals crossed the budget);
191
191
  * everything scheduled after it was skipped and the transcript went straight to synthesis.
@@ -202,7 +202,7 @@ export interface TeamResult {
202
202
  failures: number;
203
203
  /** How many times the shared transcript was summarized to stay under maxTranscriptTokens. */
204
204
  transcriptCompactions: number;
205
- /** design/80 D-B (codex review): set when a member durably PAUSED (suspended/needs_review) on a HITL gate —
205
+ /** design/80 D-B: set when a member durably PAUSED (suspended/needs_review) on a HITL gate —
206
206
  * the discussion STOPS (no synthesis on a half-done team) and surfaces the resume capability so the caller
207
207
  * can resume the paused member via the token, then re-run. `conclusionValid` is false in this case. */
208
208
  durablePause?: boolean;
@@ -13,10 +13,10 @@ import type { ToolSpec } from "../core/types.js";
13
13
  * newly-added sensitive tool to every agent. Names not present in the pool are ignored (no error) — an
14
14
  * allow/deny list is a filter over what's available, not an assertion that those tools exist.
15
15
  *
16
- * [901] anchor ruling (dual-leg verified, adversarially reviewed): this spawn-time item-level filter IS
16
+ * anchor ruling (dual-leg verified, adversarially reviewed): this spawn-time item-level filter IS
17
17
  * the upstream shape for allow entries — CC's resolveAgentTools partitions unknown names into an
18
18
  * `invalidTools` bucket nobody consumes at runtime (88 readable source), and a live 2.1.207 probe shows
19
- * the agent stays listed/delegable with the unknown item silently dropped, zero warnings. The [876]
19
+ * the agent stays listed/delegable with the unknown item silently dropped, zero warnings. The
20
20
  * "rejected at startup" posture this replaced had no verbatim anchor and did not survive verification.
21
21
  * The asymmetric prepare-time fail-loud for `TaskSpec.agents` DENY entries is a deliberate sema
22
22
  * extension (no upstream deny-list exists): an allow-typo silently narrows (safe direction), a
@@ -25,7 +25,7 @@ import type { ModelRef, TaskResult, TaskSpec, ToolSpec } from "../core/types.js"
25
25
  * orthogonal to and composable with the Stop hook (wire the verdict into a stop() hook to make it a
26
26
  * hard completion gate).
27
27
  *
28
- * DEPLOYMENT POSTURE (clay 裁定 2026-07-14): opt-in library primitive ONLY — never a scenario default,
28
+ * DEPLOYMENT POSTURE (ruled 2026-07-14): opt-in library primitive ONLY — never a scenario default,
29
29
  * never deployed implicitly. It is a **thin composition** over existing core seams — a verifier subtask
30
30
  * (own model role), a read-only tool set (via tool `effect`), {@link TaskSpec.outputSchema} for the
31
31
  * verdict, and the teacher-style fix loop — so it adds no Runner-core surface. Off by default; opt in