@sema-agent/core 5.56.0 → 5.58.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 (208) hide show
  1. package/CHANGELOG.md +122 -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 +13 -2
  9. package/dist/agents/send-message-tool.js +34 -12
  10. package/dist/agents/subagent-steps.d.ts +1 -1
  11. package/dist/agents/subagent.d.ts +13 -13
  12. package/dist/agents/team.d.ts +15 -6
  13. package/dist/agents/team.js +1 -0
  14. package/dist/agents/tool-filter.d.ts +2 -2
  15. package/dist/agents/verify.d.ts +1 -1
  16. package/dist/bench/metrics.d.ts +35 -35
  17. package/dist/brain/anthropic.js +15 -5
  18. package/dist/brain/circuit-breaker.js +2 -1
  19. package/dist/brain/degrading.d.ts +1 -1
  20. package/dist/brain/degrading.js +4 -1
  21. package/dist/brain/errors.d.ts +3 -3
  22. package/dist/brain/failover.js +16 -1
  23. package/dist/brain/open-responses.js +15 -5
  24. package/dist/brain/openai.js +16 -5
  25. package/dist/brain/reasoning.d.ts +2 -2
  26. package/dist/brain/repetition.d.ts +1 -1
  27. package/dist/brain/request-params.d.ts +30 -27
  28. package/dist/brain/request-params.js +1 -7
  29. package/dist/brain/route-adjudicator.d.ts +190 -0
  30. package/dist/brain/route-adjudicator.js +189 -0
  31. package/dist/brain/route-conformance.d.ts +55 -0
  32. package/dist/brain/route-conformance.js +136 -0
  33. package/dist/brain/routing.js +8 -3
  34. package/dist/brain/status-sink.d.ts +2 -2
  35. package/dist/brain/stream-shared.d.ts +1 -1
  36. package/dist/config/catalog.d.ts +5 -5
  37. package/dist/core/arg-summary.d.ts +4 -4
  38. package/dist/core/ask-class.d.ts +2 -2
  39. package/dist/core/ask-question.d.ts +1 -1
  40. package/dist/core/auto-compaction.d.ts +15 -15
  41. package/dist/core/auto-mode.d.ts +5 -5
  42. package/dist/core/background-agent-store.d.ts +20 -20
  43. package/dist/core/background-shell.d.ts +4 -4
  44. package/dist/core/checkpoint-store.d.ts +35 -27
  45. package/dist/core/context-edit.d.ts +1 -1
  46. package/dist/core/context-guard.d.ts +1 -1
  47. package/dist/core/exec-output-tail.d.ts +6 -6
  48. package/dist/core/file-snapshot-store.d.ts +8 -8
  49. package/dist/core/git-worktree-env.d.ts +3 -3
  50. package/dist/core/governance-codes.js +2 -0
  51. package/dist/core/hooks.d.ts +73 -33
  52. package/dist/core/hooks.js +87 -25
  53. package/dist/core/image-downsample.d.ts +1 -1
  54. package/dist/core/locked-config.d.ts +1 -1
  55. package/dist/core/lsp.d.ts +1 -1
  56. package/dist/core/mailbox-store.d.ts +1 -1
  57. package/dist/core/mcp.d.ts +3 -3
  58. package/dist/core/mcp.js +4 -4
  59. package/dist/core/memory-engine/consolidation-driver.d.ts +207 -0
  60. package/dist/core/memory-engine/consolidation-driver.js +378 -0
  61. package/dist/core/memory-engine/consolidation.d.ts +46 -2
  62. package/dist/core/memory-engine/consolidation.js +1 -0
  63. package/dist/core/memory-engine/data-plane.d.ts +1 -1
  64. package/dist/core/memory-engine/distiller.d.ts +550 -0
  65. package/dist/core/memory-engine/distiller.js +598 -0
  66. package/dist/core/memory-engine/dual-root.d.ts +1 -1
  67. package/dist/core/memory-engine/engine.d.ts +62 -8
  68. package/dist/core/memory-engine/engine.js +40 -4
  69. package/dist/core/memory-engine/file-backend.d.ts +1 -1
  70. package/dist/core/memory-engine/index.d.ts +4 -2
  71. package/dist/core/memory-engine/index.js +4 -2
  72. package/dist/core/memory-engine/origin-clearance.d.ts +1 -1
  73. package/dist/core/memory-engine/scope-contract.d.ts +4 -4
  74. package/dist/core/memory-engine/sync-client.d.ts +16 -16
  75. package/dist/core/memory-engine/sync.d.ts +4 -4
  76. package/dist/core/memory-recall.d.ts +1 -1
  77. package/dist/core/memory.d.ts +2 -2
  78. package/dist/core/permission-rule-consent.d.ts +230 -36
  79. package/dist/core/permission-rule-consent.js +258 -54
  80. package/dist/core/permission-rule-model.d.ts +295 -97
  81. package/dist/core/permission-rule-model.js +132 -41
  82. package/dist/core/permission-rules.d.ts +9 -9
  83. package/dist/core/remote-env.d.ts +8 -8
  84. package/dist/core/roles.d.ts +3 -3
  85. package/dist/core/roles.js +1 -0
  86. package/dist/core/runner/assemble-result.d.ts +2 -2
  87. package/dist/core/runner/compaction-call-options.d.ts +3 -3
  88. package/dist/core/runner/memory-consolidation-driver.d.ts +49 -0
  89. package/dist/core/runner/memory-consolidation-driver.js +60 -0
  90. package/dist/core/runner/memory-consolidation.d.ts +1 -1
  91. package/dist/core/runner/prepare-config-doors.d.ts +3 -3
  92. package/dist/core/runner/prepare-task.d.ts +21 -21
  93. package/dist/core/runner/prepare-task.js +54 -18
  94. package/dist/core/runner/prepare-workspace-restore.d.ts +2 -2
  95. package/dist/core/runner/runtask.d.ts +15 -12
  96. package/dist/core/runner/runtask.js +48 -0
  97. package/dist/core/runner/session-rule-policy.d.ts +1 -1
  98. package/dist/core/runner/teardown-bounded.d.ts +1 -1
  99. package/dist/core/runner/tool-disclosure.d.ts +2 -2
  100. package/dist/core/runner/turn-attachments.d.ts +11 -11
  101. package/dist/core/scheduler.d.ts +10 -5
  102. package/dist/core/secret-env.d.ts +1 -1
  103. package/dist/core/sensitive-path-policy.d.ts +1 -1
  104. package/dist/core/session-policy-store.d.ts +2 -2
  105. package/dist/core/session-reconcile.d.ts +2 -2
  106. package/dist/core/session-store.d.ts +3 -3
  107. package/dist/core/session.d.ts +1 -1
  108. package/dist/core/shutdown-debug.d.ts +2 -2
  109. package/dist/core/side-query.d.ts +14 -7
  110. package/dist/core/spec-contract.d.ts +1 -1
  111. package/dist/core/store-contracts/contract-harness.d.ts +2 -2
  112. package/dist/core/store-contracts/contract-kit-version.d.ts +2 -2
  113. package/dist/core/store-contracts/mailbox-store-contract.d.ts +1 -1
  114. package/dist/core/store-contracts/mailbox-store-contract.js +1 -1
  115. package/dist/core/task-notification.d.ts +5 -5
  116. package/dist/core/task-registry-agent.d.ts +12 -12
  117. package/dist/core/task-registry-monitor.d.ts +1 -1
  118. package/dist/core/task-registry-shared.d.ts +41 -41
  119. package/dist/core/task-registry.d.ts +12 -12
  120. package/dist/core/tool-detach.d.ts +2 -2
  121. package/dist/core/tool-errors.d.ts +3 -3
  122. package/dist/core/tool-policy.d.ts +55 -28
  123. package/dist/core/tool-result-budget.d.ts +1 -1
  124. package/dist/core/tool-result-store.d.ts +2 -2
  125. package/dist/core/tools.d.ts +1 -1
  126. package/dist/core/trace.d.ts +26 -23
  127. package/dist/core/types.d.ts +155 -70
  128. package/dist/core/untrusted-egress.d.ts +1 -1
  129. package/dist/core/untrusted-text.d.ts +7 -7
  130. package/dist/core/wiring-manifest.d.ts +5 -5
  131. package/dist/core/workflow-journal-store.d.ts +14 -14
  132. package/dist/core/workflow-run-store-contract.d.ts +1 -1
  133. package/dist/core/workflow-run-store-contract.js +1 -1
  134. package/dist/core/workflow-run-store.d.ts +4 -4
  135. package/dist/engine/compaction/compaction.d.ts +3 -3
  136. package/dist/engine/compaction/utils.d.ts +2 -2
  137. package/dist/engine/execution-env/kill-tree.d.ts +1 -1
  138. package/dist/engine/execution-env/node-execution-env.d.ts +8 -8
  139. package/dist/engine/harness/agent-harness.d.ts +6 -6
  140. package/dist/engine/harness/agent-harness.js +26 -1
  141. package/dist/engine/harness/messages.d.ts +1 -1
  142. package/dist/engine/harness/types.d.ts +15 -11
  143. package/dist/engine/llm/types.d.ts +79 -14
  144. package/dist/engine/loop/agent-loop.d.ts +3 -3
  145. package/dist/engine/loop/types.d.ts +4 -4
  146. package/dist/engine/lsp/node-lsp-manager.d.ts +2 -2
  147. package/dist/engine/session/import-validate.d.ts +1 -1
  148. package/dist/engine/session/log-digest.d.ts +1 -1
  149. package/dist/engine/session/memory-repo.d.ts +2 -2
  150. package/dist/engine/session/session.d.ts +4 -4
  151. package/dist/fixtures/index.d.ts +4 -4
  152. package/dist/index.d.ts +8 -4
  153. package/dist/index.js +5 -2
  154. package/dist/internal/llm.d.ts +1 -1
  155. package/dist/orchestration/goal.d.ts +1 -1
  156. package/dist/orchestration/run-spec.d.ts +1 -1
  157. package/dist/orchestration/run-workflow-tool.d.ts +12 -12
  158. package/dist/orchestration/workflow-governance.d.ts +4 -4
  159. package/dist/orchestration/workflow-observe.d.ts +1 -1
  160. package/dist/orchestration/workflow-script-runner.d.ts +1 -1
  161. package/dist/orchestration/workflow-script-store.d.ts +9 -9
  162. package/dist/orchestration/workflow-size-guideline.d.ts +1 -1
  163. package/dist/orchestration/workflow-types.d.ts +5 -5
  164. package/dist/orchestration/workflow.d.ts +10 -10
  165. package/dist/prompt-assembly/artifact-store.d.ts +1 -1
  166. package/dist/prompt-assembly/artifact.d.ts +1 -1
  167. package/dist/prompt-assembly/assemble.d.ts +1 -1
  168. package/dist/prompt-assembly/composer.d.ts +2 -2
  169. package/dist/prompt-assembly/epoch.d.ts +2 -2
  170. package/dist/prompt-assembly/event-registry.d.ts +1 -1
  171. package/dist/prompt-assembly/explain.d.ts +3 -3
  172. package/dist/prompt-assembly/tool-catalog.d.ts +1 -1
  173. package/dist/prompt-assembly/turn-snapshot.d.ts +4 -4
  174. package/dist/prompt-assembly/types.d.ts +12 -12
  175. package/dist/prompts/coordinator.d.ts +1 -1
  176. package/dist/prompts/default.d.ts +10 -10
  177. package/dist/prompts/default.js +2 -0
  178. package/dist/prompts/simple-sections.d.ts +3 -3
  179. package/dist/prompts/supervisor.d.ts +2 -2
  180. package/dist/scenarios/full-body.d.ts +3 -3
  181. package/dist/scenarios/scenario-registry.d.ts +6 -2
  182. package/dist/scenarios/scenario-registry.js +4 -2
  183. package/dist/stores/cc/sidecar-transcript.d.ts +3 -3
  184. package/dist/stores/file/fs-atomic.d.ts +2 -2
  185. package/dist/stores/file/index.d.ts +1 -1
  186. package/dist/stores/file/session-store.d.ts +2 -2
  187. package/dist/stores/file/workflow-journal-store.d.ts +4 -4
  188. package/dist/tools/fs/bash-readonly-classifier.d.ts +1 -1
  189. package/dist/tools/fs/encoding.d.ts +4 -4
  190. package/dist/tools/fs/fs-bash.d.ts +3 -3
  191. package/dist/tools/fs/fs-pdf.d.ts +1 -1
  192. package/dist/tools/fs/fs-shared.d.ts +6 -6
  193. package/dist/tools/fs/index.d.ts +2 -2
  194. package/dist/tools/fs/index.js +8 -1
  195. package/dist/tools/fs/notebook.d.ts +1 -1
  196. package/dist/tools/fs/pdf.d.ts +1 -1
  197. package/dist/tools/fs/read-deny.d.ts +1 -1
  198. package/dist/tools/fs/safety.d.ts +9 -9
  199. package/dist/tools/fs/search.d.ts +2 -2
  200. package/dist/tools/monitor.d.ts +3 -3
  201. package/dist/tools/scheduler-tools.js +28 -6
  202. package/dist/tools/task-list.d.ts +2 -2
  203. package/dist/tools/web.d.ts +19 -4
  204. package/dist/tools/web.js +8 -2
  205. package/dist/tools/worktree.d.ts +5 -5
  206. package/dist/tools/worktree.js +2 -2
  207. package/package.json +1 -1
  208. package/test/export-surface.snapshot.json +74 -3
@@ -17,7 +17,7 @@ export type StopSource = "user" | "parent" | "system" | (string & {});
17
17
  /** design/153 §7.1: `"parked"` (background agents only today) = durably suspended on a pending
18
18
  * approval checkpoint — neither live nor terminal. Every `=== "running"` liveness check treats it
19
19
  * as not-running (correct: no process exists); it exits poll waits, refuses settles, and is
20
- * reap-exempt. Downstream switches over this union gain an arm (announced, [1556]/L1.5). */
20
+ * reap-exempt. Downstream switches over this union gain an arm (announced). */
21
21
  export type SemaTaskStatus = "pending" | "running" | "parked" | "completed" | "failed" | "killed" | "cancelled";
22
22
  export type TaskRetrievalStatus = "success" | "not_ready" | "timeout";
23
23
  export interface UnifiedTaskOutput {
@@ -38,7 +38,7 @@ export interface UnifiedTaskOutput {
38
38
  * frames. Distinct from {@link errorCode}, which carries a FAILED child's own result taxonomy —
39
39
  * this key classifies THIS poll/stop answer itself. Additive. */
40
40
  code?: string;
41
- /** RB-386② ([2090]) — machine-readable failure code on a FAILED background_agent row's poll
41
+ /** RB-386② — machine-readable failure code on a FAILED background_agent row's poll
42
42
  * details (the child's TaskResult.errorCode taxonomy — brain codes / `limit.*` / `budget.*` …).
43
43
  * Additive; absent on non-failed rows, on rows whose failure carried no code, and on other lanes. */
44
44
  errorCode?: string;
@@ -49,14 +49,14 @@ export interface UnifiedTaskOutput {
49
49
  stoppedBy?: StopSource;
50
50
  /** server[1526] ask — the durable row's committed stop-cycle number (1.371 settle mint), served on
51
51
  * durable-fallback polls so a tail consumer can key revive cycles without the notify lane.
52
- * [1532]§三1: ALSO served by the in-process live poll/stop arms (the handle's current cycle
52
+ * ALSO served by the in-process live poll/stop arms (the handle's current cycle
53
53
  * projection — spawn = 1, each 1.332/tier-3 revival opens the next), same key, same meaning,
54
54
  * so tail meta is complete whichever arm answers. */
55
55
  seq?: number;
56
56
  /** fidelity-sweep A1: the served result is the child's PARTIAL work — it landed after a kill had
57
57
  * already won the terminal race and was backfilled (produced before/while the task was stopped). */
58
58
  partial_result?: boolean;
59
- /** P1-3(黑板 [1870] P1-3, cli/server 商定项 — 黑板 [1920]/[1921]/[1924]/[1925]):a cross-channel
59
+ /** A cross-channel
60
60
  * correlation key for ONE completion event. The same task's completion fans out across several
61
61
  * independent channels today (a live `TaskNotificationPayload` frame, a durable inbox entry, and
62
62
  * this poll projection) — a consumer today has to reconstruct "are these the same completion?" from
@@ -70,7 +70,7 @@ export interface UnifiedTaskOutput {
70
70
  details?: unknown;
71
71
  }
72
72
  /**
73
- * E1 (黑板 [1937]) — the shared internal poll/stop result shape every helper below returns
73
+ * The shared internal poll/stop result shape every helper below returns
74
74
  * (`noTask`/`noTaskForStop`/`formatWorkflowRun`/`serveDurableAgentRow`/`pollTask`/`stopTask` and every
75
75
  * per-task-kind poll/stop arm). `UnifiedTaskOutput` (the `details` face) has no isError channel of its
76
76
  * own — it is a REQUIRED-field wire shape consumed by callers beyond these two tools too, so isError is
@@ -100,7 +100,7 @@ export interface SemaTaskHandle {
100
100
  * point ({@link mintCompletionId}); absent until the task reaches a terminal status. */
101
101
  completionId?: string;
102
102
  }
103
- /** P1-3(黑板 [1920]/[1921]/[1924]/[1925]) — mint a cross-channel completion correlation id ONCE per
103
+ /** Mint a cross-channel completion correlation id ONCE per
104
104
  * handle/record, fill-once (first writer wins): every settle/direct-terminal-flip site calls this
105
105
  * instead of writing `completionId` directly, so no matter how many terminal-transition sites a lane
106
106
  * has (settle / TaskStop circumvention / backfill), the value is minted exactly once and every later caller
@@ -146,7 +146,7 @@ export interface BackgroundBashTaskHandle extends SemaTaskHandle {
146
146
  * `mirrorFailed` records that at least one append to the advertised output FILE failed — the terminal
147
147
  * frame then discloses the file as incomplete instead of letting the launch receipt's "full output is
148
148
  * appended there" promise stand over a silently partial file. */
149
- /** RB-238 ([1937] M1): `droppedBytes`/`dropUnknown` account ENV-SIDE tail-buffer eviction disclosed by
149
+ /** RB-238: `droppedBytes`/`dropUnknown` account ENV-SIDE tail-buffer eviction disclosed by
150
150
  * the poll (`bytesDroppedBeforeCursor`/`truncated`) — a loss upstream of (and distinct from) the
151
151
  * registry's own `rolledChars` memory bound. Bytes counted here never reached the spool at all. */
152
152
  spool?: {
@@ -180,9 +180,9 @@ export interface WorkflowTaskHandle extends SemaTaskHandle {
180
180
  runId: string;
181
181
  handle: WorkflowHandle<unknown>;
182
182
  store?: WorkflowRunStore;
183
- /** γ 批 B-1 (live leg) — see {@link RegisterWorkflowInput.originatingSessionId}. */
183
+ /** B-1 (live leg) — see {@link RegisterWorkflowInput.originatingSessionId}. */
184
184
  originatingSessionId?: string;
185
- /** RB-215(黑板 [1870] C6,已修): design/129 session-lifetime discipline, extended to workflow — the
185
+ /** RB-215: design/129 session-lifetime discipline, extended to workflow — the
186
186
  * ONE background kind that never had it (`background_bash`/`monitor`/`background_agent` all do).
187
187
  * Unlike those three (task-scoped BY DEFAULT, `sessionScoped` an explicit opt-in via
188
188
  * `TaskSpec.backgroundScope`), a workflow is unconditionally session-anchored — `originatingSessionId`
@@ -219,12 +219,12 @@ export interface DurableAgentLane {
219
219
  /** True once the initial `put` landed (an outage before that retries put on the next write). */
220
220
  written: boolean;
221
221
  poisoned: boolean;
222
- /** codex r3 F2 — true while the LATEST flush exhausted its retries (cleared by the next success).
222
+ /** true while the LATEST flush exhausted its retries (cleared by the next success).
223
223
  * The lifecycle-flip probe requires it false: a row whose bind/settle never persisted must not
224
224
  * have its transcript preserved-but-unreachable (the local record accumulates patches, so the
225
225
  * next successful write self-heals the missing fields). */
226
226
  flushFailed: boolean;
227
- /** codex 增量 R-4 — consecutive heartbeat re-drives of a settled flush-failed lane (reset on any
227
+ /** 增量 R-4 — consecutive heartbeat re-drives of a settled flush-failed lane (reset on any
228
228
  * flush success); past the ceiling the lane is abandoned loudly instead of retrying forever. */
229
229
  redrives?: number;
230
230
  }
@@ -235,7 +235,7 @@ export interface BackgroundAgentTaskHandle extends SemaTaskHandle {
235
235
  /** RB-236 — lineage axes, declared (registration always spread them into the handle; readers used
236
236
  * to cast). `rootSessionId` feeds {@link canAccess}'s root-session arm; the other two stay
237
237
  * read-only lineage metadata on the live face (no parentSessionId access arm — see the arm's
238
- * comment for why). [1344]② clamps `parentTaskId` register-side. */
238
+ * comment for why). The register side clamps `parentTaskId`. */
239
239
  parentTaskId?: string;
240
240
  parentSessionId?: string;
241
241
  rootSessionId?: string;
@@ -251,16 +251,16 @@ export interface BackgroundAgentTaskHandle extends SemaTaskHandle {
251
251
  notify?: (notification: import("./task-notification.js").TaskNotificationPayload, opts?: {
252
252
  priority?: import("./task-notification.js").SystemInjectionPriority;
253
253
  }) => "queued" | "parked" | "dropped_duplicate" | Promise<"queued" | "parked" | "dropped_duplicate">;
254
- /** design/147 S2a (codex R3 F5) — messages that arrived in the STARTUP window (row already
254
+ /** design/147 S2a — messages that arrived in the STARTUP window (row already
255
255
  * running, lane not yet bound). Bounded; flushed in order by attachAgentNotify. Discarded at
256
256
  * terminal settle: a run that failed during prepare never had a lane to park through, and the
257
257
  * sender's completion notification (failed) prompts the resend. */
258
- /** S2b codex F1 — park redeemability (see RegisterBackgroundAgentInput.retainedContinuation). */
258
+ /** S2b — park redeemability (see RegisterBackgroundAgentInput.retainedContinuation). */
259
259
  retainedContinuation?: boolean;
260
260
  /** S2b RB-27② — revive-cycle stamp (see reviveBackgroundAgent): attach/settle from a resume leg
261
261
  * carry it so a stale cycle's late calls no-op instead of clobbering the newer cycle. */
262
262
  reviveCycle?: number;
263
- /** [1532]§三1 — the CURRENT stop-cycle number in settle-generation terms (spawn run = 1; each
263
+ /** The CURRENT stop-cycle number in settle-generation terms (spawn run = 1; each
264
264
  * revival — 1.332 retained or tier-3 seeded — opens the next). Served by the LIVE poll/stop
265
265
  * projection under the SAME `seq` key as the durable-fallback arm, so a tail consumer keys
266
266
  * revive cycles identically whichever arm answered. Re-aligned to the settle's authoritative
@@ -275,7 +275,7 @@ export interface BackgroundAgentTaskHandle extends SemaTaskHandle {
275
275
  * Absent (cross-process row, no live park context) ⇒ TaskStop refuses honestly: the durable
276
276
  * approval inbox (server /decide) owns that arbitration. */
277
277
  resolveParkedStop?: () => Promise<boolean>;
278
- /** S2b codex R5-F2 — resolvers of DIRECT (post-attach) deliveries currently awaiting the
278
+ /** S2b — resolvers of DIRECT (post-attach) deliveries currently awaiting the
279
279
  * injector; terminal settle/stop sweep these as not_running so a never-settling adapter can
280
280
  * never pin the sender's tool call. */
281
281
  inFlightDirect?: Set<(r: {
@@ -340,7 +340,7 @@ export interface BackgroundAgentTaskHandle extends SemaTaskHandle {
340
340
  * this one is awaited). */
341
341
  spillFailed?: true;
342
342
  error?: string;
343
- /** RB-386② ([2090]) — the machine-readable failure code beside `error`, threaded from the settle
343
+ /** RB-386② — the machine-readable failure code beside `error`, threaded from the settle
344
344
  * mint point (subagent.ts computes it ONCE from the child's TaskResult.errorCode taxonomy /
345
345
  * extractErrorCode — single source with the sync report's classification). Served on the failed
346
346
  * row's poll `details` and the failed terminal notification. Absent when no code was known. */
@@ -350,7 +350,7 @@ export interface BackgroundAgentTaskHandle extends SemaTaskHandle {
350
350
  * overloaded/timeout/network ⇒ true, logic ⇒ false). Stored rather than re-derived so the core
351
351
  * poll lane never has to import the agents-domain classifier (no new domain cycle). */
352
352
  errorRetryable?: boolean;
353
- /** RB-405 G3 ([2135]/[2136]) — the coarse classification KIND beside `errorRetryable`
353
+ /** RB-405 — the coarse classification KIND beside `errorRetryable`
354
354
  * (classifySubagentError's error_kind ∈ rate_limit/overloaded/timeout/network/logic), threaded
355
355
  * from the same settle mint point and stored for the same no-domain-cycle reason as its sibling.
356
356
  * Rendered on the FAILED row's poll TEXT face as the `(error_kind: …, retryable: …)` clause —
@@ -400,7 +400,7 @@ export interface MonitorTaskHandle extends SemaTaskHandle {
400
400
  type: "monitor";
401
401
  env: ExecutionEnv & BackgroundShellCapability;
402
402
  shellId: BackgroundShellId;
403
- /** RB-238/RB-239/RB-240 ([1937] M1-M3) spool honesty fields: `droppedBytes`/`dropUnknown` = env-side
403
+ /** RB-238/RB-239/RB-240 spool honesty fields: `droppedBytes`/`dropUnknown` = env-side
404
404
  * tail-buffer eviction (see the bash handle's twin); `dropNotified` = the once-latch for the event-stream
405
405
  * disclosure (terminal frames disclose unconditionally); `drainFailed` = the stop-time final drain poll
406
406
  * failed, so the spool may be missing the last window; `timedOut`/`timeoutSec` = the env's own
@@ -452,7 +452,7 @@ export interface MonitorTaskHandle extends SemaTaskHandle {
452
452
  deadlineAt?: number;
453
453
  timeoutMs?: number;
454
454
  watcher?: unknown;
455
- /** RB-239 ([1937] M2): a watcher tick is suspended on its pollBackground await RIGHT NOW. The stop-time
455
+ /** RB-239: a watcher tick is suspended on its pollBackground await RIGHT NOW. The stop-time
456
456
  * final drain must skip its own poll then (that in-flight tick already consumed the env cursor — and a
457
457
  * never-resolving adapter must not pin TaskStop). Set/cleared in lockstep with the tick's re-entrancy
458
458
  * guard. */
@@ -535,7 +535,7 @@ export interface RegisterWorkflowInput extends TaskAccess {
535
535
  description?: string;
536
536
  toolUseId?: string;
537
537
  now?: number;
538
- /** γ 批 B-1 (live leg): the ORIGINATING session id — anchors the in-process handle to its session
538
+ /** B-1 (live leg): the ORIGINATING session id — anchors the in-process handle to its session
539
539
  * so a later turn of the SAME session (fresh per-turn owner) reaches it through `canAccess`'s
540
540
  * workflow session arm, mirroring the durable predicate. A workflow is a SESSION-level asset
541
541
  * (its completion notification routes to the session) — deliberately unlike a background agent's
@@ -573,7 +573,7 @@ export declare const MONITOR_STORM_KILL_AFTER_MS = 30000;
573
573
  * a monitored process emitting megabytes without a single newline grew it without limit (the spool's
574
574
  * own roll never covered it). Keep the TAIL (the newest bytes are the ones a watch is about). */
575
575
  export declare const MONITOR_LINE_BUF_CAP = 1048576;
576
- /** RB-239 ([1937] M2): the monitor event-result clip, shared by the watcher's batch/terminal emits and
576
+ /** RB-239: the monitor event-result clip, shared by the watcher's batch/terminal emits and
577
577
  * the stop-time drain emit (one clip, one truncation wording). */
578
578
  export declare function clipMonitorEvent(s: string): string;
579
579
  /** RB-334 (CC `DCo` leg): per-line clip applied to the `lines[]` a batch carries. Spool untouched. */
@@ -626,7 +626,7 @@ export declare function rollSpoolText(spool: {
626
626
  * `content.length`; `ToolResultSlice.totalChars`) and the spool's `rolledChars` axis — one unit
627
627
  * end-to-end; a `Buffer.byteLength` ledger here would sit crosswise to the store's own cap. */
628
628
  export declare const MONITOR_SPILL_CAP_CHARS: number;
629
- /** RB-238 ([1937] M1): fold one poll's env-side-loss disclosure into the spool's account. The env's
629
+ /** RB-238: fold one poll's env-side-loss disclosure into the spool's account. The env's
630
630
  * tail buffer evicts its HEAD under pressure (node-execution-env 8MB bound) — those bytes are gone
631
631
  * before any watcher ever saw them, which is a different loss than the registry-side `rolledChars`
632
632
  * middle-drop. `bytesDroppedBeforeCursor` only counts bytes dropped before an unconsumed cursor, so
@@ -645,7 +645,7 @@ export declare function accountDroppedBytes(spool: {
645
645
  truncated?: boolean;
646
646
  bytesDroppedBeforeCursor?: number;
647
647
  }): void;
648
- /** RB-238 ([1937] M1) — the POLL-FACE wording for env-side loss (the terminal/event-frame wording is
648
+ /** RB-238 — the POLL-FACE wording for env-side loss (the terminal/event-frame wording is
649
649
  * {@link droppedGapNote}'s; the two faces differ by design and always have). One function so the two
650
650
  * quantified/unquantified branches cannot drift between the three legs that render it: the monitor
651
651
  * re-readable spool, the bash re-readable spool, and the bash blocked wait. Trailing newline included
@@ -686,7 +686,7 @@ export interface SpoolBodyOptions {
686
686
  /** A full banner line (own trailing newline) rendered after the drop note, or "". */
687
687
  drainNote: string;
688
688
  }
689
- /** RB-238/RB-239/RB-240 ([1937] M1-M3) — the ONE renderer for a re-readable spool's TaskOutput body,
689
+ /** RB-238/RB-239/RB-240 — the ONE renderer for a re-readable spool's TaskOutput body,
690
690
  * shared by the monitor lane (pollMonitorLane) and the bash spool lane (pollBackgroundBash).
691
691
  *
692
692
  * Both faces were hand-copied twins carrying three real disclosure bugs' worth of wording (env-side
@@ -712,25 +712,25 @@ export declare function firstDropNote(spool: {
712
712
  dropUnknown?: true;
713
713
  dropNotified?: true;
714
714
  }): string;
715
- /** RB-244 ([1937] T1): ONE wording for "you stopped nothing" across every already-terminal stop face —
715
+ /** RB-244: ONE wording for "you stopped nothing" across every already-terminal stop face —
716
716
  * the in-process bash/monitor/agent arms and the durable-row fallback previously split: the durable
717
717
  * arm answered honestly while the in-process arms claimed `Terminated <id>.` over work that finished
718
718
  * (or was killed) on its own. CC 220 refuses the call outright (`Task X is not running (status: …)`,
719
719
  * 220:468231-468236); sema keeps the idempotent no-op posture (stopWorkflow / durable-arm precedent,
720
720
  * no isError) but the receipt must tell the truth. */
721
721
  export declare function alreadyTerminalStopNote(id: string, status: string): string;
722
- /** design/115 review B1 → β 批 A-2: register-side fail-fast, now on BOTH axes — `canAccess` is
722
+ /** design/115 review B1 → A-2: register-side fail-fast, now on BOTH axes — `canAccess` is
723
723
  * default-deny, so a handle missing either axis would be unreachable by every caller (a dead row
724
724
  * is worse than a loud registration error). The production chain always sets both (hostTaskId +
725
725
  * principal-or-"default"); a direct registry caller declares its access domain explicitly
726
726
  * (`scope: "default"` is the single-tenant spelling — explicit, never implied). */
727
727
  export declare function assertOwnership(input: TaskAccess, site: string): void;
728
- /** γ 批 B-1 (2026-07-22, [1510] 同窗) — POSITIVE-MATCH form, one polarity with `canAccess`/
729
- * `canAccessAgentRecord` (β 批 A-2): scope must match, then the caller must HIT an arm — owner
728
+ /** POSITIVE-MATCH form, one polarity with `canAccess`/
729
+ * `canAccessAgentRecord` (A-2): scope must match, then the caller must HIT an arm — owner
730
730
  * (the spawning task) or SESSION (the run's `originatingSessionId`). The session arm is the B-1
731
731
  * HIGH fix: the completion notification routes back to the originating SESSION, but per-turn
732
732
  * taskIds die with their turn — before this arm, a later turn of the same session could not poll
733
- * or stop its own workflow (default-deny functional breakage, [1502] R4 sibling). The old form's
733
+ * or stop its own workflow (default-deny functional breakage). The old form's
734
734
  * `access.owner === undefined ⇒ pass` scope-only residue is gone with the same β polarity ruling
735
735
  * (design/136 §2.3 S-1 定谳 posture, now positive-match on every arm). Exported: the run-workflow
736
736
  * tool's resume-ownership recheck and a deployment's serving layer apply the SAME predicate. */
@@ -751,14 +751,14 @@ export interface RegistryCore {
751
751
  notifyTerminalOnce(handle: BackgroundBashTaskHandle | MonitorTaskHandle, send: () => void): void;
752
752
  pokeBgQuiescence(owner: string | undefined): void;
753
753
  }
754
- /** codex S1a F2 — writer-lease renewal period for armed durable rows (see ensureDurableHeartbeat).
754
+ /** writer-lease renewal period for armed durable rows (see ensureDurableHeartbeat).
755
755
  * Exported so deployments size `staleRunningMaxAgeMs` against it (recommend ≥10× this). */
756
756
  export declare const DURABLE_AGENT_HEARTBEAT_MS = 60000;
757
- /** design/151 S1a (codex F3): the durable fallback consults the store ONLY for handle-shaped ids —
757
+ /** design/151 S1a: the durable fallback consults the store ONLY for handle-shaped ids —
758
758
  * a NAME (the fuzzy stop leg) or a foreign-domain id must not take a store round-trip, and a store
759
759
  * outage must never block the local name-resolution ladder. Mint form: `a` + 16 hex; the revive
760
760
  * leg re-registers the same form.
761
- * EXPORTED ([1518] server ask): a serving layer's fallback needs the SAME shape gate before its
761
+ * EXPORTED: a serving layer's fallback needs the SAME shape gate before its
762
762
  * durable arm (a bare exact-key miss lets padded/legacy/name-shaped ids leak into live branches —
763
763
  * the server 1.250 HIGH) — one shared regex kills the drift, roster-normalize precedent. */
764
764
  export declare const DURABLE_AGENT_HANDLE_RE: RegExp;
@@ -769,7 +769,7 @@ export declare const BG_AGENT_REAP_STOP_ERROR = "stopped (parent task ended or T
769
769
  /** CC206-B 欠账 — TaskStop name addressing, CC `XN` verbatim (206:574955-574962): NFKC-normalize, strip
770
770
  * control/format chars (whitespace-class ones survive), trim, lowercase, whitespace runs → hyphens. Both
771
771
  * the query and the candidate label go through this, so "Fix Tests" addresses "fix tests".
772
- * [c209-D] codex R4: EXPORTED — SendMessage's "main" reserved lane must use the SAME canonicalization
772
+ * [c209-D]: EXPORTED — SendMessage's "main" reserved lane must use the SAME canonicalization
773
773
  * as this resolver, or an NFKC-equivalent spelling (fullwidth "main") skips the reserved lane and
774
774
  * reaches the description layers. One normalizer, every name face. */
775
775
  export declare function normalizeAgentName(s: string): string;
@@ -781,7 +781,7 @@ export declare function editDistance(a: string, b: string): number;
781
781
  /** CC `htr` shape (206:519814-519827): candidates within Levenshtein ≤2 (length-diff ≤2 pre-filter),
782
782
  * best-first; the single best is the "Did you mean" suggestion (`htr(e, keys, 1)[0]`, 206:575196). */
783
783
  export declare function closestName(query: string, candidates: Iterable<string>): string | undefined;
784
- /** β 批 A-2 (clay 裁定 2026-07-22, 一步到位): DEFAULT-DENY on BOTH axes — the old predicate skipped
784
+ /** Ruled 2026-07-22: DEFAULT-DENY on BOTH axes — the old predicate skipped
785
785
  * a missing axis (owner-less handle = readable by everyone in scope; scope-less handle = readable
786
786
  * across scopes), splitting polarity with `canAccessAgentRecord` and re-opening the session-axis
787
787
  * class cli/server just swept. Registration now REQUIRES both axes ({@link assertOwnership}), so a
@@ -846,12 +846,12 @@ export interface RegisterBackgroundAgentInput extends TaskAccess {
846
846
  parkedCheckpointToken?: string;
847
847
  /** design/153 §7.2d — the TaskStop arbitration closure for the parked-born handle (expire CAS). */
848
848
  resolveParkedStop?: () => Promise<boolean>;
849
- /** design/147 S2a (codex R5 F7) — declare that the spawner WILL attach a mid-run delivery
849
+ /** design/147 S2a — declare that the spawner WILL attach a mid-run delivery
850
850
  * channel (attachAgentNotify) once the child's lane binds. Only declared-"attaching" rows buffer
851
851
  * startup-window messages; an undeclared row refuses `no_channel` IMMEDIATELY — a spawner that
852
852
  * never attaches must not collect acknowledged-then-discarded messages (silent loss). */
853
853
  deliveryChannel?: "attaching";
854
- /** S2b RB-27① codex F1 — the spawner DECLARES whether a parked message is redeemable: true when
854
+ /** S2b RB-27① — the spawner DECLARES whether a parked message is redeemable: true when
855
855
  * the child's session outlives the run (retain ledger or session-scoped registration), so a
856
856
  * continuation can drain the park. A non-retained row must NOT hand out parked acknowledgements
857
857
  * (the session is released right after settle — the park would be irrecoverable): its
@@ -862,15 +862,15 @@ export interface RegisterBackgroundAgentInput extends TaskAccess {
862
862
  * reserved "main") before registration; the registry stores it verbatim. Duplicate names are legal
863
863
  * (latest-wins at resolution; older rows stay task_id-addressable). */
864
864
  name?: string;
865
- /** [1358]/[1336]A — the RESOLVED subagent type ("general-purpose"/"fork"/a roster name), persisted
865
+ /** the RESOLVED subagent type ("general-purpose"/"fork"/a roster name), persisted
866
866
  * so a REVIVE cycle's observer frames can reproduce the row's TYPE column (never the description). */
867
867
  agentType?: string;
868
- /** [1371]② — the spawn frame's parent linkage, persisted so a REVIVE cycle's spawn frame nests the
868
+ /** the spawn frame's parent linkage, persisted so a REVIVE cycle's spawn frame nests the
869
869
  * revived row exactly like the first spawn did. The caller passes the SAME values it emitted on the
870
- * original frame (parentTaskId already [1344]②-clamped there; parentSessionId always-on). */
870
+ * original frame (parentTaskId already-clamped there; parentSessionId always-on). */
871
871
  parentTaskId?: string;
872
872
  parentSessionId?: string;
873
- /** δ 批 [1498]⑦ — the ROOT host session of the delegation tree (fixed point down the trusted
873
+ /** the ROOT host session of the delegation tree (fixed point down the trusted
874
874
  * internals chain; equals parentSessionId at depth 1). Persisted on the handle, the durable row
875
875
  * and the roster so recovery faces enumerate the whole tree under the root without alias walks. */
876
876
  rootSessionId?: string;
@@ -47,7 +47,7 @@ export interface TaskPollOptions {
47
47
  filter?: string;
48
48
  /** design/116 W3 (CC TaskOutput `block`): wait until the task reaches a terminal state (or `timeoutMs`)
49
49
  * instead of returning the instantaneous snapshot — saves the model blind re-poll turns. The TOOL layer
50
- * defaults this to TRUE (CC 187 `block: default(!0)`, clay 2026-07-02); registry callers pass it explicitly. */
50
+ * defaults this to TRUE (CC 187 `block: default(!0)`, 裁定 2026-07-02); registry callers pass it explicitly. */
51
51
  block?: boolean;
52
52
  /** Max wait for `block` (ms). Default 30s, capped at 600s (CC 187). */
53
53
  timeoutMs?: number;
@@ -74,7 +74,7 @@ export interface TaskToolOptions extends TaskAccess {
74
74
  workflowStore?: WorkflowRunStore;
75
75
  /** design/151 S1a: durable agent ledger — threads into pollTask/stopTask fallback reads. */
76
76
  agentStore?: BackgroundAgentStore;
77
- /** [1076]③d — the task's soft wall-clock deadline (absolute ms epoch), same source as the Bash
77
+ /** the task's soft wall-clock deadline (absolute ms epoch), same source as the Bash
78
78
  * foreground clamp (design/130 P2b). When present, a BLOCKING TaskOutput wait is clamped so it
79
79
  * cannot eat the write-out window: the model gets an honest, visible clamp note instead of a
80
80
  * silent 10-minute blind wait into the finalize wall (TB rs**: 9.1min poll = the exact tax).
@@ -105,7 +105,7 @@ export interface TaskToolOptions extends TaskAccess {
105
105
  * RB-49 B-3 (2026-07-25): the row-metadata projection `getAccessibleTask` returns. Was spelled out as a
106
106
  * hand-written literal in THREE places (this signature, the internal cast below, and the SendMessage
107
107
  * consumer in agents/subagent.ts) with an identical field list — adding a row field meant editing three
108
- * spots with zero compiler enforcement (the server [1622] / core [1640] projection-antipattern family).
108
+ * spots with zero compiler enforcement (the projection-antipattern family).
109
109
  * One exported name, three consumers, drift becomes a type error.
110
110
  */
111
111
  export interface AccessibleTaskRow {
@@ -128,7 +128,7 @@ export interface AccessibleTaskRow {
128
128
  }
129
129
  export declare class TaskRegistry {
130
130
  private handles;
131
- /** codex 终审 1.255 F1: observers of the design/129 session terminal anchor — `reapSessionBackground`
131
+ /** observers of the design/129 session terminal anchor — `reapSessionBackground`
132
132
  * fires each hook (swallow-guarded) AFTER reaping, so session-anchored side state (the session-scoped
133
133
  * subagent retain ledger) releases on the SAME deployment call. Registered idempotently per consumer. */
134
134
  private sessionReapHooks;
@@ -339,12 +339,12 @@ export declare class TaskRegistry {
339
339
  * registry instance). A fallback read of a `running` row written by a DIFFERENT instance must
340
340
  * never claim liveness — it serves the honest "outcome unknown here" instead. */
341
341
  readonly writerId: string;
342
- /** codex S1a F2 — the writer-liveness LEASE: while any armed durable row is running, one lazy
342
+ /** the writer-liveness LEASE: while any armed durable row is running, one lazy
343
343
  * unref'd interval bumps their `updatedAt` (an empty patch), so row age measures SILENCE, not
344
344
  * run length. A `staleRunningMaxAgeMs` reap policy must therefore be ≫ this period (the store
345
345
  * contract recommends ≥10min) — and even a premature flip self-heals: the real settle's
346
346
  * read-back adopts the bumped rev and re-CASes the truth over the reaper's guess. */
347
- /** codex 增量 R-1 — handles a reap sweep is CURRENTLY adjudicating (between its live-handle check
347
+ /** 增量 R-1 — handles a reap sweep is CURRENTLY adjudicating (between its live-handle check
348
348
  * and the delete/release outcome). A revive admitted inside that await window would race the
349
349
  * conditional delete with its own durable transition still unflushed (old rev ⇒ the delete wins,
350
350
  * the session is released under an ADMITTED resume, and the revive's queued write poisons on
@@ -386,7 +386,7 @@ export declare class TaskRegistry {
386
386
  * GC), so the exemption never outlives the task's addressability. Exact string compare: both sides are
387
387
  * `canonicalPath` outputs for the same env, so a symlinked temp dir cannot cause a miss or a false hit. */
388
388
  isBackgroundOutputFile(canonicalPath: string, access: TaskAccess, env: unknown): boolean;
389
- /** [c209-D] codex R1: display-cap-free EXACT id lookup with the same access guard as a poll — identity
389
+ /** [c209-D]: display-cap-free EXACT id lookup with the same access guard as a poll — identity
390
390
  * resolution must NEVER ride the display-capped `list()` (with >LIMIT visible rows the cap can evict
391
391
  * the addressed id, and a name-layer fallback then MISROUTES the message to a同名 row instead of an
392
392
  * honest not-found). Unknown and out-of-scope ids read identically (info-hiding, undefined both). */
@@ -399,7 +399,7 @@ export declare class TaskRegistry {
399
399
  * watcher/stop lanes mark and read it too); workflow cancellation is out of scope. */
400
400
  markStopSource(id: string, source: StopSource): void;
401
401
  /**
402
- * [1712] / RB-164 — attribute an ENV-LEVEL blanket sweep before it runs.
402
+ * RB-164 — attribute an ENV-LEVEL blanket sweep before it runs.
403
403
  *
404
404
  * The incident: a user's `run_in_background` Bash died mid-run reporting `stopped-by:"system"` with a
405
405
  * zero-byte output file, and diagnosing it took a cross-repo investigation with a timeline argument.
@@ -476,7 +476,7 @@ export declare class TaskRegistry {
476
476
  * the last watcher-poll interval (~1s) but whose exit the watcher hasn't observed yet still reads
477
477
  * "running" here and is settled `killed` — the receipt is at worst one status coarser, never silent.
478
478
  *
479
- * codex 1.257.3 review (HIGH): the settle EXECUTES the kill itself (await `killBackground`, Result-typed)
479
+ * (HIGH): the settle EXECUTES the kill itself (await `killBackground`, Result-typed)
480
480
  * before minting the receipt — previously the receipt claimed "killed" while the actual kill was left to
481
481
  * the later `disposeBackgroundShells`, whose failure was swallowed (process alive + registry cleared =
482
482
  * the receipt lied). A failed kill now mints an HONEST receipt naming the failure (the env dispose is
@@ -531,7 +531,7 @@ export declare class TaskRegistry {
531
531
  * drain start — an in-flight turn may still be TaskOutput-following a bg process. Returns total rows
532
532
  * reaped. */
533
533
  reapAllSessionBackground(): number;
534
- /** codex 终审 1.255 F1 — subscribe to `reapSessionBackground` (the design/129 session terminal anchor).
534
+ /** subscribe to `reapSessionBackground` (the design/129 session terminal anchor).
535
535
  * Returns an unsubscribe. Hooks are best-effort observers; a throwing hook is swallowed. */
536
536
  onSessionReap(hook: (sessionId: string, scope?: string) => void): () => void;
537
537
  /** design/144 §1.2 — the child gate's liveness read: how many BACKGROUND tasks (bg bash / monitor /
@@ -599,11 +599,11 @@ export declare class TaskRegistry {
599
599
  registerWorkflow(input: RegisterWorkflowInput): string;
600
600
  pollTask(id: string, access: TaskAccess, opts?: TaskPollOptions): Promise<UnifiedTaskResult>;
601
601
  stopTask(id: string, access: TaskAccess, opts?: TaskStopOptions): Promise<UnifiedTaskResult>;
602
- /** S2b codex R8 — bounded delivery-confirmation wait (see deliverToRunningAgent). Test-tunable. */
602
+ /** S2b — bounded delivery-confirmation wait (see deliverToRunningAgent). Test-tunable. */
603
603
  deliverConfirmTimeoutMs: number;
604
604
  private lastGcAt;
605
605
  /**
606
- * 预清(飞轮 /tasks + footer pill 的数据源正道): list the caller's OWN tasks as a bounded DISPLAY
606
+ * The data source behind a shell's task list and footer pill: list the caller's OWN tasks as a bounded DISPLAY
607
607
  * projection — never the internal handles (no shellId/env/abort). Same owner/scope guard as poll/stop;
608
608
  * a caller only ever sees its own tasks. Sorted newest-first, capped at `limit` (default 50).
609
609
  * CC parity note: CC's /tasks is a UI/SDK surface, NOT an LLM tool — expose this via SDK/service,
@@ -1,5 +1,5 @@
1
1
  /**
2
- * design/116 detach(飞轮 [C] gap ②)— per-tool-call detach 信号毂。
2
+ * design/116 detach([C] gap ②)— per-tool-call detach 信号毂。
3
3
  *
4
4
  * The missing middle of mid-flight ctrl+b: `TaskStream.detach(toolCallId)` fires the controller here; a
5
5
  * detach-capable tool (Bash) picks the signal up BY toolCallId from its mount closure and threads it into
@@ -12,7 +12,7 @@
12
12
  */
13
13
  export declare class ToolDetachHub {
14
14
  private readonly controllers;
15
- /** service [371]③: the detach verb is caller-exposed — an unknown/never-started toolCallId would otherwise
15
+ /** the detach verb is caller-exposed — an unknown/never-started toolCallId would otherwise
16
16
  * strand its controller until run end (gc only fires on the real tool-completion path), a per-run memory
17
17
  * growth vector. Bound the map: on overflow, evict the OLDEST entry (Map preserves insertion order); a
18
18
  * live tool re-materializes its controller on the next signalFor() and an aborted one stays aborted via
@@ -77,7 +77,7 @@ export declare function formatToolError(error: unknown): string;
77
77
  * in-presence condition) for that one code, or the errorCode's own doc for every other
78
78
  * member (`env.lifetime_expired`'s doc says "retrying needs a NEW environment, not a
79
79
  * smaller budget" — there is no `retryAfterMs` for it, by design: an expiring
80
- * environment has no return time to give). Codex falsification review (rounds 2 and 4)
80
+ * environment has no return time to give). falsification review (rounds 2 and 4)
81
81
  * twice suggested a distinct governance/platform class or leaving these `unknown`
82
82
  * instead — rejected both times: (a) explicit calling-convention direction; (b)
83
83
  * `WorkerErrorClass` is a small CLOSED public exported union — adding a member is an
@@ -86,14 +86,14 @@ export declare function formatToolError(error: unknown): string;
86
86
  * terminal codes, not foreign ones); (c) pre-existing precedent (`config.compliance_required`,
87
87
  * NOT part of this diff) already folds a transient/retryable governance code into `config`.
88
88
  * `memory.admission_required`/`_denied`/`env.lifetime_expired` are EXACT codes, not broad
89
- * `memory.`/`env.` prefixes — codex falsification review (A-005.3 follow-up) caught an
89
+ * `memory.`/`env.` prefixes — falsification review (A-005.3 follow-up) caught an
90
90
  * earlier draft folding EVERY `memory.*`/`env.*` code here, which misclassified the
91
91
  * memory-engine's non-governance incident codes (`memory.secret_detected` et al.,
92
92
  * explicitly listed as NON-governance in `NON_GOVERNANCE_MEMORY_CODES` — a content-safety
93
93
  * tool-call refusal, not a task-spec rejection) as configuration failures. `usage.*` STAYS
94
94
  * a broad prefix: governance-codes.ts's own `governanceRetryClass` already treats every
95
95
  * `usage.*` code (registered or not) as governance by prefix — a deliberate legacy-family
96
- * rule this folder mirrors rather than re-deciding (codex round 2 questioned whether that
96
+ * rule this folder mirrors rather than re-deciding (questioned whether that
97
97
  * mirroring is appropriate across the two taxonomies; kept as-is per the calling
98
98
  * convention's explicit direction — see the function's SCOPE note for the boundary this
99
99
  * folder does and does not draw).