@sema-agent/core 7.15.0 → 7.17.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 (287) hide show
  1. package/CHANGELOG.md +202 -0
  2. package/dist/agents/builtin-agents.d.ts +3 -3
  3. package/dist/agents/cross-session-envelope.d.ts +0 -1
  4. package/dist/agents/cross-session-envelope.js +0 -1
  5. package/dist/agents/peer-notices.d.ts +0 -9
  6. package/dist/agents/peer-notices.js +0 -63
  7. package/dist/agents/subagent.js +7 -15
  8. package/dist/brain/request-params.d.ts +2 -2
  9. package/dist/config/defaults.d.ts +0 -7
  10. package/dist/config/defaults.js +0 -2
  11. package/dist/core/artifact-host.d.ts +218 -0
  12. package/dist/core/artifact-host.js +92 -0
  13. package/dist/core/ask-origin.d.ts +29 -3
  14. package/dist/core/ask-origin.js +17 -9
  15. package/dist/core/ask-question.d.ts +25 -0
  16. package/dist/core/ask-question.js +4 -0
  17. package/dist/core/ask-unresolvable-notice.d.ts +30 -21
  18. package/dist/core/ask-unresolvable-notice.js +16 -8
  19. package/dist/core/auto-compaction.d.ts +10 -10
  20. package/dist/core/auto-mode-arming.d.ts +2 -2
  21. package/dist/core/background-agent-store.d.ts +5 -5
  22. package/dist/core/background-shell.d.ts +1 -1
  23. package/dist/core/checkpoint-execution-record.d.ts +0 -3
  24. package/dist/core/checkpoint-execution-record.js +0 -4
  25. package/dist/core/checkpoint-store.d.ts +71 -99
  26. package/dist/core/checkpoint-store.js +9 -16
  27. package/dist/core/context-edit.d.ts +36 -104
  28. package/dist/core/context-edit.js +37 -60
  29. package/dist/core/effective-path-target.d.ts +68 -8
  30. package/dist/core/effective-path-target.js +42 -30
  31. package/dist/core/engine-notice.d.ts +46 -32
  32. package/dist/core/env-budget.d.ts +31 -0
  33. package/dist/core/env-budget.js +39 -0
  34. package/dist/core/exec-output-tail.d.ts +5 -5
  35. package/dist/core/file-history-store.js +3 -6
  36. package/dist/core/fs-write-gate-policy.d.ts +1 -1
  37. package/dist/core/fs-write-gate-policy.js +3 -3
  38. package/dist/core/gate-lanes.js +9 -15
  39. package/dist/core/governance-codes.d.ts +1 -1
  40. package/dist/core/governance-codes.js +4 -0
  41. package/dist/core/hands-band.d.ts +1 -1
  42. package/dist/core/hooks.d.ts +18 -17
  43. package/dist/core/lsp-session.d.ts +1 -1
  44. package/dist/core/lsp.d.ts +1 -1
  45. package/dist/core/lsp.js +5 -4
  46. package/dist/core/mcp.d.ts +5 -5
  47. package/dist/core/mcp.js +4 -48
  48. package/dist/core/memory-engine/delegation-settlement.d.ts +37 -12
  49. package/dist/core/memory-engine/delegation-settlement.js +128 -39
  50. package/dist/core/memory-engine/engine.d.ts +9 -8
  51. package/dist/core/memory-engine/engine.js +115 -120
  52. package/dist/core/memory-engine/file-backend.d.ts +17 -5
  53. package/dist/core/memory-engine/file-backend.js +78 -34
  54. package/dist/core/memory-engine/index.d.ts +2 -2
  55. package/dist/core/memory-engine/index.js +2 -2
  56. package/dist/core/memory-engine/layout.d.ts +152 -54
  57. package/dist/core/memory-engine/layout.js +441 -104
  58. package/dist/core/memory-engine/types.d.ts +8 -3
  59. package/dist/core/memory-engine/types.js +5 -0
  60. package/dist/core/memory-recall.d.ts +0 -8
  61. package/dist/core/memory.d.ts +1 -1
  62. package/dist/core/oracle-isolation.js +2 -2
  63. package/dist/core/parent-spec-seat.d.ts +66 -0
  64. package/dist/core/parent-spec-seat.js +47 -0
  65. package/dist/core/permission-rule-model.d.ts +11 -6
  66. package/dist/core/permission-rule-model.js +53 -37
  67. package/dist/core/permission-rules.js +8 -3
  68. package/dist/core/protocol-naming.d.ts +2 -2
  69. package/dist/core/remote-env.d.ts +1 -1
  70. package/dist/core/retired-keys.d.ts +19 -0
  71. package/dist/core/retired-keys.js +15 -0
  72. package/dist/core/runner/abort-race.d.ts +3 -3
  73. package/dist/core/runner/active-skill-scope.d.ts +2 -2
  74. package/dist/core/runner/active-skill-scope.js +3 -3
  75. package/dist/core/runner/assemble-result.d.ts +42 -40
  76. package/dist/core/runner/assemble-result.js +5 -4
  77. package/dist/core/runner/checkpoint-scope.d.ts +4 -4
  78. package/dist/core/runner/clock-and-limits.d.ts +3 -3
  79. package/dist/core/runner/compaction-call-options.d.ts +35 -99
  80. package/dist/core/runner/compaction-knobs.d.ts +4 -4
  81. package/dist/core/runner/compaction-seams.d.ts +5 -5
  82. package/dist/core/runner/contracts.d.ts +232 -233
  83. package/dist/core/runner/decide-continuation.d.ts +6 -6
  84. package/dist/core/runner/denial-limit-arms.d.ts +8 -8
  85. package/dist/core/runner/derived-route-fallback.d.ts +2 -2
  86. package/dist/core/runner/gate-exit.d.ts +6 -6
  87. package/dist/core/runner/gate-exit.js +15 -1
  88. package/dist/core/runner/git-status-frame.d.ts +7 -7
  89. package/dist/core/runner/halt-attribution.d.ts +35 -0
  90. package/dist/core/runner/halt-attribution.js +16 -0
  91. package/dist/core/runner/inherited-ask-grants.d.ts +6 -6
  92. package/dist/core/runner/memory-capture-optout.d.ts +1 -1
  93. package/dist/core/runner/memory-consolidation-driver.d.ts +4 -4
  94. package/dist/core/runner/memory-consolidation.d.ts +6 -8
  95. package/dist/core/runner/memory-consolidation.js +0 -1
  96. package/dist/core/runner/park-commit.d.ts +6 -6
  97. package/dist/core/runner/permission-rule-lanes.d.ts +19 -19
  98. package/dist/core/runner/prepare-acquire-reconcile.d.ts +4 -4
  99. package/dist/core/runner/prepare-artifact.d.ts +53 -0
  100. package/dist/core/runner/prepare-artifact.js +77 -0
  101. package/dist/core/runner/prepare-ask-lane.d.ts +3 -3
  102. package/dist/core/runner/prepare-boundary-parks.d.ts +3 -3
  103. package/dist/core/runner/prepare-caps-and-workflow.d.ts +9 -7
  104. package/dist/core/runner/prepare-caps-and-workflow.js +2 -3
  105. package/dist/core/runner/prepare-config-doors.d.ts +24 -24
  106. package/dist/core/runner/prepare-config-doors.js +5 -2
  107. package/dist/core/runner/prepare-context-lane.d.ts +8 -8
  108. package/dist/core/runner/prepare-context-lane.js +2 -13
  109. package/dist/core/runner/prepare-defer-classify.d.ts +2 -2
  110. package/dist/core/runner/prepare-delegation-surface.d.ts +1 -1
  111. package/dist/core/runner/prepare-file-history.d.ts +3 -3
  112. package/dist/core/runner/prepare-file-history.js +3 -52
  113. package/dist/core/runner/prepare-gate-stations.d.ts +5 -5
  114. package/dist/core/runner/prepare-hands-readface.d.ts +35 -38
  115. package/dist/core/runner/prepare-hands-readface.js +3 -2
  116. package/dist/core/runner/prepare-inherited-gate.d.ts +9 -6
  117. package/dist/core/runner/prepare-inherited-gate.js +7 -8
  118. package/dist/core/runner/prepare-listings.d.ts +3 -3
  119. package/dist/core/runner/prepare-lsp.d.ts +3 -3
  120. package/dist/core/runner/prepare-memory-engine-session.d.ts +5 -5
  121. package/dist/core/runner/prepare-memory.d.ts +4 -6
  122. package/dist/core/runner/prepare-memory.js +10 -9
  123. package/dist/core/runner/prepare-offload-wrappers.d.ts +2 -2
  124. package/dist/core/runner/prepare-park-ask.d.ts +6 -6
  125. package/dist/core/runner/prepare-policy-chain.d.ts +7 -7
  126. package/dist/core/runner/prepare-policy-chain.js +15 -30
  127. package/dist/core/runner/prepare-prompt-assembly.js +1 -1
  128. package/dist/core/runner/prepare-prompt-inputs.d.ts +5 -5
  129. package/dist/core/runner/prepare-protocol-tools.d.ts +1 -1
  130. package/dist/core/runner/prepare-question-face.d.ts +4 -4
  131. package/dist/core/runner/prepare-run-refs.d.ts +11 -11
  132. package/dist/core/runner/prepare-safety-scan.d.ts +2 -2
  133. package/dist/core/runner/prepare-suspend-saga.d.ts +4 -4
  134. package/dist/core/runner/prepare-suspend-saga.js +0 -2
  135. package/dist/core/runner/prepare-task.d.ts +12 -12
  136. package/dist/core/runner/prepare-task.js +10 -9
  137. package/dist/core/runner/prepare-tool-disclosure-mount.d.ts +2 -3
  138. package/dist/core/runner/prepare-wiring-manifest.d.ts +4 -4
  139. package/dist/core/runner/prepare-wiring-manifest.js +9 -7
  140. package/dist/core/runner/prepare-workspace-restore.d.ts +1 -1
  141. package/dist/core/runner/remote-env-retry.d.ts +3 -3
  142. package/dist/core/runner/resume-admission.d.ts +1 -1
  143. package/dist/core/runner/resume-admission.js +2 -1
  144. package/dist/core/runner/resume-claim.d.ts +1 -1
  145. package/dist/core/runner/resume-internals-and-config.d.ts +1 -1
  146. package/dist/core/runner/resume-internals-and-config.js +4 -0
  147. package/dist/core/runner/resume-policy-outcome.d.ts +1 -1
  148. package/dist/core/runner/resume-preflight.d.ts +1 -1
  149. package/dist/core/runner/resume-review-outcome.d.ts +1 -1
  150. package/dist/core/runner/retired-runner-deps.d.ts +3 -0
  151. package/dist/core/runner/retired-runner-deps.js +7 -0
  152. package/dist/core/runner/run-brain-sinks.d.ts +1 -1
  153. package/dist/core/runner/run-clock-and-content.d.ts +4 -4
  154. package/dist/core/runner/run-compaction-machinery.d.ts +3 -3
  155. package/dist/core/runner/run-git-lane.d.ts +1 -1
  156. package/dist/core/runner/run-harness-handlers.d.ts +2 -2
  157. package/dist/core/runner/run-harness-handlers.js +2 -3
  158. package/dist/core/runner/run-identity-wiring.d.ts +4 -4
  159. package/dist/core/runner/run-leg.d.ts +3 -3
  160. package/dist/core/runner/run-notification-lane.d.ts +2 -2
  161. package/dist/core/runner/run-reasoning-seat.d.ts +2 -2
  162. package/dist/core/runner/run-settle-and-teardown.d.ts +5 -5
  163. package/dist/core/runner/run-settle-and-teardown.js +3 -1
  164. package/dist/core/runner/run-telemetry-and-budget-seats.d.ts +2 -2
  165. package/dist/core/runner/run-terminal-adoption.d.ts +5 -5
  166. package/dist/core/runner/runtask.d.ts +14 -14
  167. package/dist/core/runner/session-file-state-replay.d.ts +3 -3
  168. package/dist/core/runner/session-file-state-replay.js +3 -3
  169. package/dist/core/runner/session-rule-policy.d.ts +2 -2
  170. package/dist/core/runner/session-rule-policy.js +3 -4
  171. package/dist/core/runner/steer-admission.d.ts +2 -2
  172. package/dist/core/runner/stream-halt-verbs.d.ts +1 -1
  173. package/dist/core/runner/stream-halt-verbs.js +1 -1
  174. package/dist/core/runner/stream-reap.d.ts +1 -1
  175. package/dist/core/runner/stream-steer-verb.js +1 -4
  176. package/dist/core/runner/synthetic-tools.d.ts +8 -8
  177. package/dist/core/runner/teardown-bounded.d.ts +2 -2
  178. package/dist/core/runner/tool-defer-gate.d.ts +1 -1
  179. package/dist/core/runner/tool-disclosure.d.ts +33 -33
  180. package/dist/core/runner/tool-end-body.d.ts +3 -3
  181. package/dist/core/runner/tool-face-overlay.d.ts +2 -2
  182. package/dist/core/runner/tool-output-projection.d.ts +2 -2
  183. package/dist/core/runner/turn-attachments.d.ts +53 -53
  184. package/dist/core/runner/usage-accounting.d.ts +4 -4
  185. package/dist/core/runner/workspace-path.d.ts +1 -1
  186. package/dist/core/runner/workspace-path.js +3 -0
  187. package/dist/core/runner-deps.d.ts +30 -49
  188. package/dist/core/safe-notify.d.ts +1 -1
  189. package/dist/core/sensitive-path-policy.d.ts +1 -1
  190. package/dist/core/sensitive-path-policy.js +4 -4
  191. package/dist/core/session.d.ts +2 -2
  192. package/dist/core/skill-tool-specifier.d.ts +1 -1
  193. package/dist/core/skills-directory.d.ts +1 -1
  194. package/dist/core/store-contracts/checkpoint-store-contract.js +1 -1
  195. package/dist/core/strategy-store.d.ts +8 -11
  196. package/dist/core/task-event.d.ts +20 -17
  197. package/dist/core/task-limits.d.ts +1 -1
  198. package/dist/core/task-notification.d.ts +5 -5
  199. package/dist/core/task-registry-agent.d.ts +5 -5
  200. package/dist/core/task-registry-monitor.d.ts +2 -2
  201. package/dist/core/task-registry-shared.d.ts +27 -27
  202. package/dist/core/task-registry-shared.js +3 -13
  203. package/dist/core/task-registry.d.ts +8 -8
  204. package/dist/core/task-result.d.ts +37 -37
  205. package/dist/core/task-spec.d.ts +5 -5
  206. package/dist/core/task-stream.d.ts +16 -11
  207. package/dist/core/tool-catalog-entries.d.ts +1 -0
  208. package/dist/core/tool-catalog-entries.js +5 -0
  209. package/dist/core/tool-conformance.d.ts +0 -2
  210. package/dist/core/tool-conformance.js +1 -3
  211. package/dist/core/tool-errors.d.ts +5 -0
  212. package/dist/core/tool-errors.js +1 -0
  213. package/dist/core/tool-policy.d.ts +51 -22
  214. package/dist/core/tool-policy.js +28 -5
  215. package/dist/core/tool-result-budget.d.ts +1 -1
  216. package/dist/core/tool-result-store.d.ts +11 -11
  217. package/dist/core/tool-spec.d.ts +34 -38
  218. package/dist/core/tools.d.ts +2 -2
  219. package/dist/core/trace.d.ts +12 -15
  220. package/dist/core/untrusted-text.d.ts +1 -1
  221. package/dist/core/wiring-manifest.d.ts +4 -3
  222. package/dist/core/workflow-journal-store.d.ts +11 -11
  223. package/dist/engine/execution-env/node-execution-env.d.ts +3 -2
  224. package/dist/engine/execution-env/node-execution-env.js +4 -2
  225. package/dist/engine/harness/agent-harness.d.ts +47 -4
  226. package/dist/engine/harness/agent-harness.js +52 -9
  227. package/dist/engine/llm/types.d.ts +1 -1
  228. package/dist/engine/loop/agent-loop.js +15 -8
  229. package/dist/engine/loop/types.d.ts +5 -0
  230. package/dist/index.d.ts +21 -16
  231. package/dist/index.js +17 -12
  232. package/dist/internal/harness.d.ts +1 -0
  233. package/dist/orchestration/run-spec.d.ts +3 -0
  234. package/dist/orchestration/run-spec.js +3 -3
  235. package/dist/orchestration/run-workflow-tool.d.ts +12 -6
  236. package/dist/orchestration/run-workflow-tool.js +23 -5
  237. package/dist/orchestration/workflow-primitives.d.ts +4 -2
  238. package/dist/orchestration/workflow-primitives.js +1 -4
  239. package/dist/orchestration/workflow-types.d.ts +34 -4
  240. package/dist/orchestration/workflow-types.js +2 -0
  241. package/dist/orchestration/workflow.d.ts +39 -7
  242. package/dist/orchestration/workflow.js +234 -113
  243. package/dist/prompt-assembly/assemble.d.ts +2 -2
  244. package/dist/prompt-assembly/assemble.js +9 -9
  245. package/dist/prompt-assembly/composer.d.ts +6 -7
  246. package/dist/prompt-assembly/composer.js +10 -10
  247. package/dist/prompt-assembly/epoch.js +1 -1
  248. package/dist/prompt-assembly/event-registry.d.ts +0 -21
  249. package/dist/prompt-assembly/packs/sema-default.js +30 -30
  250. package/dist/prompt-assembly/types.d.ts +14 -14
  251. package/dist/prompts/coordinator.d.ts +0 -13
  252. package/dist/prompts/coordinator.js +0 -3
  253. package/dist/stores/file/checkpoint-store.js +1 -5
  254. package/dist/stores/file/file-history-store.js +2 -2
  255. package/dist/stores/file/permission-rule-store.d.ts +4 -35
  256. package/dist/stores/file/permission-rule-store.js +4 -148
  257. package/dist/tools/artifact/artifact-text.d.ts +62 -0
  258. package/dist/tools/artifact/artifact-text.js +68 -0
  259. package/dist/tools/artifact/artifact-tool.d.ts +52 -0
  260. package/dist/tools/artifact/artifact-tool.js +351 -0
  261. package/dist/tools/artifact/local-stub.d.ts +26 -0
  262. package/dist/tools/artifact/local-stub.js +296 -0
  263. package/dist/tools/fs/bash-readonly-classifier.d.ts +114 -48
  264. package/dist/tools/fs/bash-readonly-classifier.js +171 -60
  265. package/dist/tools/fs/encoding.d.ts +31 -40
  266. package/dist/tools/fs/fs-bash.d.ts +49 -45
  267. package/dist/tools/fs/fs-bash.js +19 -27
  268. package/dist/tools/fs/fs-pdf.d.ts +8 -8
  269. package/dist/tools/fs/fs-search-tools.d.ts +4 -4
  270. package/dist/tools/fs/fs-search-tools.js +5 -2
  271. package/dist/tools/fs/fs-shared.d.ts +146 -158
  272. package/dist/tools/fs/fs-shared.js +3 -11
  273. package/dist/tools/fs/fs-write.d.ts +8 -8
  274. package/dist/tools/fs/gh-rate-limit.d.ts +13 -14
  275. package/dist/tools/fs/index.d.ts +78 -78
  276. package/dist/tools/fs/index.js +4 -1
  277. package/dist/tools/fs/notebook.d.ts +24 -25
  278. package/dist/tools/fs/pdf.d.ts +3 -3
  279. package/dist/tools/fs/read-deny.d.ts +22 -22
  280. package/dist/tools/fs/read-face.d.ts +21 -24
  281. package/dist/tools/fs/repo-map.d.ts +8 -8
  282. package/dist/tools/fs/safety.d.ts +233 -130
  283. package/dist/tools/fs/safety.js +131 -31
  284. package/dist/tools/fs/search.d.ts +63 -71
  285. package/dist/tools/fs/search.js +8 -6
  286. package/package.json +6 -2
  287. package/test/export-surface.snapshot.json +119 -39
@@ -28,7 +28,7 @@ import type { AutoModeDecider, AutoModeDenialTracker } from "../auto-mode.js";
28
28
  import type { CacheBreakDetector, ToolFingerprintInput } from "../cache-break-detector.js";
29
29
  import type { ActorAssertion, Checkpoint, CheckpointState, CheckpointStore, CheckpointToken, PendingSteerEntry, PlatformLimitReason, ReopenReason, ResourceLedger, ResourceLimitReason, ResumeOutcome, SerializedCheckpointState } from "../checkpoint-store.js";
30
30
  import type { ExecutionOutcomeRecordWord } from "../checkpoint-execution-record.js";
31
- import type { ClearedProjectionLedger, ContextEditMachine, OccurrenceIndex } from "../context-edit.js";
31
+ import type { ClearedProjectionLedger, MicroCompactMachine, OccurrenceIndex } from "../context-edit.js";
32
32
  import type { HookInvocationIdentity, Hooks, OrgGateVerdict, PermissionDeniedPayload, PostToolBatchCall, PostToolBatchResult, ToolGateInput } from "../hooks.js";
33
33
  import type { MaterializedMcp } from "../mcp.js";
34
34
  import type { MemoryEngine } from "../memory-engine/engine.js";
@@ -62,7 +62,7 @@ export interface ToolFaceSnapshot {
62
62
  exclude: readonly string[] | undefined;
63
63
  defer: readonly string[] | undefined;
64
64
  alwaysLoad: readonly string[] | undefined;
65
- /** design/277 — the model-gate restore selector ({@link TaskSpec.restoreGatedTools}), fourth
65
+ /** The model-gate restore selector ({@link TaskSpec.restoreGatedTools}), fourth
66
66
  * seat of the same frozen task-start snapshot: the gate decision and the delegation carrier
67
67
  * read THIS, never the live spec. */
68
68
  restoreGated: readonly string[] | true | undefined;
@@ -94,8 +94,7 @@ export type ReversibilityProbes = Map<string, NonNullable<TaskSpec["tools"]>[num
94
94
  * each exactly once, none of them able to stop another — a bounded settle, the same posture the
95
95
  * teardown leg already uses. NEVER call unwind on the success path.
96
96
  *
97
- * The detach guard for an owned execution env and the worktree-isolation check stay with the DRIVER
98
- * (design/238 D-8 case ①): a phase pushes, it does not destroy, because the driver's reference is
97
+ * The detach guard for an owned execution env and the worktree-isolation check stay with the DRIVER: a phase pushes, it does not destroy, because the driver's reference is
99
98
  * the authoritative one and a phase-local rebind could never reach it.
100
99
  */
101
100
  export interface RollbackStack {
@@ -107,7 +106,7 @@ export interface RollbackStack {
107
106
  unwindAll(): Promise<void>;
108
107
  }
109
108
  /**
110
- * design/164 件五 — the run's view of deployment usage governance, built once at prepare when
109
+ * The run's view of deployment usage governance, built once at prepare when
111
110
  * `RunnerDeps.usageWindows` + `usageWindowStore` are both wired (absent otherwise, so every consumer is
112
111
  * an explicit `!== undefined` test and an ungoverned deployment executes not one extra line).
113
112
  *
@@ -131,14 +130,14 @@ export interface UsageGovernance {
131
130
  * a boundary loses nothing.
132
131
  *
133
132
  * `cumulativeCostMicroUsd` is the MONEY half (integer micro-USD, `stats.costMicroUsd`). Pass `undefined`
134
- * when the run's spend has no cost figure at all (RB-368's unpriced state) — a deployment governing a
133
+ * when the run's spend has no cost figure at all — a deployment governing a
135
134
  * `maxCostUsd` window then REFUSES here rather than charging the fabricated 0 that would let the ceiling
136
135
  * silently stop applying. A token-only deployment ignores the argument entirely.
137
136
  */
138
137
  commit(cumulativeTokens: number, cumulativeCostMicroUsd: number | undefined, now: number): Promise<void>;
139
138
  }
140
139
  /**
141
- * design/381 — the run's turn-start file-history BOUNDARY seat. `begin(entryId)` starts the capture
140
+ * The run's turn-start file-history BOUNDARY seat. `begin(entryId)` starts the capture
142
141
  * for the turn's own initial entry (first-wins: exactly one boundary per turn incarnation, DV-4);
143
142
  * `settle()` awaits the in-flight capture's settle and is the caller's LEASE CLOSE (awaited before
144
143
  * the first tool executes) as well as the finish-tail durability await. The capture is bounded by a
@@ -171,7 +170,7 @@ export interface Prepared {
171
170
  session: StoredSession;
172
171
  sessionId: string;
173
172
  /**
174
- * #499 — THIS INVOCATION's own identity, minted once at the top of {@link prepareTask} and never
173
+ * THIS INVOCATION's own identity, minted once at the top of {@link prepareTask} and never
175
174
  * rewritten. The third id of the trio, and the only one the engine owns outright:
176
175
  * - `spec.taskId` — the HOST's task identity (absent whenever the host names nothing);
177
176
  * - `sessionId` — the CONVERSATION's identity (shared by every run that continues it);
@@ -190,12 +189,12 @@ export interface Prepared {
190
189
  * prepare emits run-scoped disclosures of its own and each must have a terminal that names it.
191
190
  */
192
191
  runId: string;
193
- /** design/319 (A ticket) — the session's reminder provenance mark this run mints under (adopted
192
+ /** The session's reminder provenance mark this run mints under (adopted
194
193
  * through the prepare adoption ladder: checkpoint seed → trusted fork channel → session entry →
195
194
  * fresh mint). Every engine-authored `<system-reminder>` open tag in the run carries it, and the
196
195
  * system prompt's Harness declaration names it. Always present on a completed prepare. */
197
196
  reminderMark: string;
198
- /** design/319 (B ticket) — the leg's reminder-disclosure trigger counters (mutated by the
197
+ /** The leg's reminder-disclosure trigger counters (mutated by the
199
198
  * disclosure outlets at tool-execute time; read once at result assembly into
200
199
  * `stats.mechanisms.reminderDisclosures` when any key is non-zero). Always present. */
201
200
  reminderDisclosureCounts: import("../reminder-disclosure.js").ReminderDisclosureCounts;
@@ -223,13 +222,13 @@ export interface Prepared {
223
222
  conflictRef: {
224
223
  hit: boolean;
225
224
  };
226
- /** design/134 复审: tool-call ids the gate blocked (policy/hook/plan-mode deny) or suspended —
225
+ /** Tool-call ids the gate blocked (policy/hook/plan-mode deny) or suspended —
227
226
  * populated only while a consumer is wired (per-tool post hooks or postToolBatch). The runner's
228
227
  * batch collector DELETES on match (its tool_execution_end is the only end-event a blocked call
229
228
  * emits; the tool_result-side delete in prepare-task never fires for immediate results). */
230
229
  blockedToolCalls: Set<string>;
231
230
  /**
232
- * WHAT ended the approval a gated call was waiting on and — design/252 G-7 — WHOSE settlement it
231
+ * WHAT ended the approval a gated call was waiting on and WHOSE settlement it
233
232
  * was, keyed by tool-call id: written ONLY by the tool gate, at the one exit where an ask resolved,
234
233
  * and read once when that call's `tool_end` frame is minted (the reader deletes on read; a call the
235
234
  * gate never settled has no entry, and an entry never names neither fact).
@@ -262,7 +261,7 @@ export interface Prepared {
262
261
  };
263
262
  /** Summed usage of nested sub-runs (sub-agents) spawned by this task's tools. */
264
263
  nestedStats: NestedUsageAccum;
265
- /** RB-430-a: prepare-time rewind disclosures (conversation-only branch / no snapshot backend / no file
264
+ /** Prepare-time rewind disclosures (conversation-only branch / no snapshot backend / no file
266
265
  * env), echoed verbatim onto `TaskResult.rewindNotes`. Present only when there is something to say. */
267
266
  rewindNotes?: NonNullable<TaskResult["rewindNotes"]>;
268
267
  /** The run's edited-file ledger read face — what its OWN hands landed, as `TaskResult.editedFiles`
@@ -270,34 +269,34 @@ export interface Prepared {
270
269
  * than a snapshot, so the throw-path backstop terminal reports the same ledger the ordinary
271
270
  * assembly would. Always present on Prepared; independent of whether a fileHistoryStore is wired. */
272
271
  editedFilesSnapshot: () => TaskResult["editedFiles"];
273
- /** design/381 — the run's turn-start boundary seat (present iff a fileHistoryStore is wired and
272
+ /** The run's turn-start boundary seat (present iff a fileHistoryStore is wired and
274
273
  * the run mounts a real fs env). runtask calls begin() at the first committed user entry and
275
274
  * awaits settle() at the lease close + the finish tail. */
276
275
  fileHistoryBoundary?: FileHistoryBoundarySeat;
277
- /** #240 (design/199 v1.1) + #242 — the run's RESOLVED read face for the result observation seat
276
+ /** The run's RESOLVED read face for the result observation seat
278
277
  * (`TaskResult.effectiveReadFace`): `carrierReadFace()`'s value at prepare completion — the hands
279
278
  * block's single resolution, or the hands-less legs' resolver run (live spec-time facts, with the
280
279
  * checkpoint seed folded stricter-wins where one exists). Every leg that completes prepare has a
281
280
  * read posture now — this is what its delegation subtree is clamped by even where no faces mount. */
282
281
  effectiveReadFace?: ReadFace;
283
- /** #240 — the normalized deny ADDITIONS in force (deployment ∪ task ∪ checkpoint seed; built-ins
282
+ /** The normalized deny ADDITIONS in force (deployment ∪ task ∪ checkpoint seed; built-ins
284
283
  * excluded), echoed on `TaskResult.effectiveReadDenyPatterns`. Present iff non-empty; a defensive
285
284
  * copy (the wide-scope working array stays the engine's own). */
286
285
  effectiveReadDenyPatterns?: readonly import("../../tools/fs/read-deny.js").NormalizedReadDenyEntry[];
287
- /** design/178 v2 §2.3 (件①) — the memory-visibility observation prepareMemory minted (echoed on
286
+ /** The memory-visibility observation prepareMemory minted (echoed on
288
287
  * `TaskResult.effectiveMemoryScopes`). Always present on a completed prepare (the memory-less
289
288
  * states are their own values); the seat is optional only so a Prepared shape without the phase
290
289
  * cannot fabricate one. */
291
290
  effectiveMemoryScopes?: import("../types.js").EffectiveMemoryScopes;
292
- /** design/99 §E13 — the per-task logical cwd ref when a real shell is mounted (else undefined). The Runner
291
+ /** The per-task logical cwd ref when a real shell is mounted (else undefined). The Runner
293
292
  * reads `cwdRef.current` after each tool to detect a `cd` move and emit `workspace_changed`. */
294
293
  cwdRef?: CwdRef;
295
- /** design/155: the ACTIVE EnterWorktree session ref (mounted with the worktree tools; undefined without
294
+ /** The ACTIVE EnterWorktree session ref (mounted with the worktree tools; undefined without
296
295
  * real write hands). runtask's settle write reads `current` for the workspace-state entry. */
297
296
  worktreeSessionRef?: {
298
297
  current?: ActiveWorktreeSession;
299
298
  };
300
- /** design/155: the settle-write base — the canonical root + what the cwd/worktree were RESTORED to at
299
+ /** The settle-write base — the canonical root + what the cwd/worktree were RESTORED to at
301
300
  * prepare. runtask diffs the live refs against this at settle and appends a `workspace_state` entry
302
301
  * when the state changed (skipped on a durable suspend — the checkpoint lane owns that state). */
303
302
  workspaceStateSettle?: {
@@ -306,16 +305,16 @@ export interface Prepared {
306
305
  restoredWorktreeDir?: string;
307
306
  baselineUnknown?: boolean;
308
307
  };
309
- /** #483 codex r2+r3 — the settle-time session-seat SEAL (see prepare-hands-readface): re-anchors
308
+ /** The settle-time session-seat SEAL (see prepare-hands-readface): re-anchors
310
309
  * the per-session read-state seat to the entry id THIS run last committed (its own
311
310
  * message_committed tail — provenance, never a shared-leaf re-read). The driver calls it once at
312
311
  * the run's settle, every terminal (suspend included), under the session lock; undefined argument
313
312
  * (no commits) is a no-op. Synchronous, never throws. Absent ⇔ hands-less / no seat channel. */
314
313
  sealReadStateSeat?: (ownCommittedTailEntryId: string | undefined) => void;
315
- /** design/99 §E6 — the DENY-NARROWING layers (session rules + skill scope, deny-only). Re-checked on RESUME
314
+ /** The DENY-NARROWING layers (session rules + skill scope, deny-only). Re-checked on RESUME
316
315
  * before an approved pending tool executes, so a rule tightened during the suspend still applies. */
317
316
  denyNarrowingPolicy?: ToolPolicy;
318
- /** #632 — the person's own persisted-rule lane (deny/ask rows), re-adjudicated on RESUME at the same
317
+ /** The person's own persisted-rule lane (deny/ask rows), re-adjudicated on RESUME at the same
319
318
  * station as the deny-narrowing layers: a deny row added while the call was parked vetoes the execution
320
319
  * (`deniedBy: "persisted_rule"`); an ask row or an unreadable store fails closed the same way (the approval
321
320
  * answered a question the person has since asked to be asked again — re-issue and re-approve). Absent when
@@ -323,10 +322,10 @@ export interface Prepared {
323
322
  persistedRuleLane?: {
324
323
  adjudicate: (req: ToolCallRequest) => Promise<import("../hooks.js").PersistedRuleAnswer>;
325
324
  };
326
- /** RB-63: the deployment's own caller policy, re-checked on a durable resume ONLY when the approver
325
+ /** The deployment's own caller policy, re-checked on a durable resume ONLY when the approver
327
326
  * rewrote the pending call's args (see the composition site for why the edit case is special). */
328
327
  basePolicyForResumeEdit?: ToolPolicy;
329
- /** design/182 §7 — the ORG adjudication face, re-resolved on a durable RESUME before an approved
328
+ /** The ORG adjudication face, re-resolved on a durable RESUME before an approved
330
329
  * pending call executes. The resume path bypasses the harness gate by design (a human already
331
330
  * adjudicated the checkpointed call), which is exactly where org policy skew is most likely: the
332
331
  * suspend may have outlived the snapshot revision that was current when it was minted. Present only
@@ -337,7 +336,7 @@ export interface Prepared {
337
336
  /** Removes the `spec.signal` abort listener on task end (else a long-lived signal leaks listeners). */
338
337
  releaseSignal: () => void;
339
338
  /**
340
- * design/174 — end-of-leg sweep for questions this leg's gate routed to a person. Called once by the
339
+ * End-of-leg sweep for questions this leg's gate routed to a person. Called once by the
341
340
  * run loop at task end, on every exit path. A binding that is still present means a person ANSWERED and
342
341
  * the call never executed to collect it (aborted, batch torn down, loop threw): that answer is disclosed
343
342
  * through the deployment's error sink rather than dropped, because "a human answered and it vanished" is
@@ -348,11 +347,11 @@ export interface Prepared {
348
347
  deliveryId: string;
349
348
  toolCallId: string;
350
349
  }>;
351
- /** Per-task prefix-cache-break detector (design/31). The fingerprint is mutated when deferred tools
352
- * materialize (design/36) — see `cacheFingerprint`. */
350
+ /** Per-task prefix-cache-break detector. The fingerprint is mutated when deferred tools
351
+ * materialize — see `cacheFingerprint`. */
353
352
  cacheBreakDetector?: CacheBreakDetector;
354
353
  /** The fingerprinted prefix. `systemPrompt` is stable; `tools` is REFRESHED in place when a deferred
355
- * tool is materialized (placeholder→full schema), so the design/31 detector sees the real tool set. */
354
+ * tool is materialized (placeholder→full schema), so the cache-break detector sees the real tool set. */
356
355
  cacheFingerprint?: {
357
356
  systemPrompt: string;
358
357
  tools: ToolFingerprintInput[];
@@ -366,14 +365,14 @@ export interface Prepared {
366
365
  * prompt" a runtime fact instead of archaeology.
367
366
  */
368
367
  /**
369
- * design/173 §8.1 — this leg's EFFECTIVE wiring manifest (built once in prepare from resolved
368
+ * This leg's EFFECTIVE wiring manifest (built once in prepare from resolved
370
369
  * facts through the same derivation as the static half). runtask emits it as the
371
370
  * `wiring_manifest` TaskEvent after the prepare consume point and before the leg's first
372
371
  * model/tool interaction. Host/operator plane — never enters model context.
373
372
  */
374
373
  wiringManifest: WiringManifest;
375
374
  /**
376
- * #281 件A — this leg's frozen identity envelope, minted ONCE in prepare beside the wiring
375
+ * This leg's frozen identity envelope, minted ONCE in prepare beside the wiring
377
376
  * manifest (same leg derivation, one mint — {@link mintHookInvocationIdentity}). Every hook
378
377
  * station runtask drives (stop/stopFailure/userPromptSubmit/postToolBatch, the compaction
379
378
  * wrapper) and the 件B delegation-lifecycle observer read THIS object; prepare's own stations
@@ -416,17 +415,17 @@ export interface Prepared {
416
415
  /** S2 (additive): the mounted tools plane — contract identity, durable-replay aliases,
417
416
  * presentation-invariant shape digest and full wire digest per tool (initial mount face). */
418
417
  tools?: ToolManifestRow[];
419
- /** design/148 S3 (additive, §10.2): the nine-element cache identity — digests only, no prompt
418
+ /** The nine-element cache identity — digests only, no prompt
420
419
  * text; backfilled once the final wire tool list exists. Live post-refresh truth rides
421
420
  * `prepared.turnSnapshot`. */
422
421
  snapshot?: {
423
422
  cacheIdentity: string;
424
423
  elements: import("../../prompt-assembly/turn-snapshot.js").CacheIdentityElements;
425
424
  };
426
- /** design/148 S3 (additive, §10.1): the run's lowering record (version/wire form/known
425
+ /** The run's lowering record (version/wire form/known
427
426
  * intentional divergences — run-static v1, one brain serves every call). */
428
427
  lowering?: import("../../prompt-assembly/turn-snapshot.js").LoweringRecord;
429
- /** design/168 (additive): the RESOLVED deferred-tool disclosure strategy for this leg and which
428
+ /** The RESOLVED deferred-tool disclosure strategy for this leg and which
430
429
  * seat chose it. Absent when nothing is deferred (there is no disclosure to describe). */
431
430
  toolDisclosure?: ToolDisclosureManifest;
432
431
  };
@@ -434,10 +433,10 @@ export interface Prepared {
434
433
  * threaded to every compaction-boundary epoch selection so boundary re-pins hash the same
435
434
  * artifact identity as the prepare-time pin. Empty on declaration-free runs. */
436
435
  epochDeclaredSections: import("../../prompt-assembly/epoch.js").EpochDeclaredSections;
437
- /** design/148 S3 — the LIVE nine-element identity face (refreshed by deferred materialization and
438
- * the RB-31 adoption swap); the manifest holds the prepare-time initial copy. */
436
+ /** The LIVE nine-element identity face (refreshed by deferred materialization and
437
+ * the deferred-materialization adoption swap); the manifest holds the prepare-time initial copy. */
439
438
  turnSnapshot?: import("../../prompt-assembly/turn-snapshot.js").TurnPromptSnapshot;
440
- /** RB-31 (design/148 S2) — the compaction-boundary center-adoption seam (undefined = no source
439
+ /** The compaction-boundary center-adoption seam (undefined = no source
441
440
  * wired or session not center-pinned). Returns the maybeCompact `centerAdoption` fragment or
442
441
  * undefined; `apply` runs post-CAS only (auto-compaction owns the ordering). Both
443
442
  * `epochDeclaredSections` and `promptOverheadTokens` on THIS object are mutated by a successful
@@ -450,38 +449,38 @@ export interface Prepared {
450
449
  overheadTokensAfter: number;
451
450
  apply: (committedArtifactDigest?: string) => void;
452
451
  } | undefined;
453
- /** Deferred-tool disclosure (design/36): the monotonic set of activated deferred-tool names. Empty
452
+ /** Deferred-tool disclosure: the monotonic set of activated deferred-tool names. Empty
454
453
  * (and no `tool_search` injected) when nothing is deferred. Mutated by BOTH disclosure lanes across
455
- * the run — the injected `tool_search` and the RB-403 direct-call placeholder lane (default ON) —
454
+ * the run — the injected `tool_search` and the direct-call placeholder lane (default ON) —
456
455
  * under ONE shared activation critical section, plus resume seeding at prepare. A leg on which the
457
456
  * model never calls `tool_search` is therefore NOT quiescent. */
458
457
  activeTools: Set<string>;
459
- /** RB-313 — the DECLARED deferred set (design/36 `classifyDeferred`, ghost names already pruned).
458
+ /** The DECLARED deferred set (populated by `classifyDeferred`, ghost names already pruned).
460
459
  * Present iff the task has deferred tools at all; `deferredToolNames − activeTools` is the
461
460
  * "undiscovered" census the tool_search_usage_reminder lane enumerates. Frozen at prepare time: a
462
461
  * name never leaves the deferred set, it only moves into `activeTools`. */
463
462
  deferredToolNames?: ReadonlySet<string>;
464
- /** design/168 — the RESOLVED materialization strategy this run runs under (`true` = "static":
463
+ /** The RESOLVED materialization strategy this run runs under (`true` = "static":
465
464
  * activation never swaps the placeholder; the real schema's only in-context carrier is the
466
465
  * ToolSearch result text). Consumed by the tools_delta boundary renderer, whose "full schemas are
467
466
  * loaded" wording is a statement about the tools block and is only true under swap. `false` when
468
467
  * nothing is deferred (the knob is inert then). */
469
468
  toolMaterializeStatic: boolean;
470
- /** RB-403 — is the direct-call lane mounted on this run's placeholders (`TaskSpec.deferSelfResolve`
469
+ /** Is the direct-call lane mounted on this run's placeholders (`TaskSpec.deferSelfResolve`
471
470
  * not disabled; default ON)? The SAME fact `createToolSearchTool` receives as `directCallEnabled`,
472
471
  * surfaced here so every model-facing face that describes what happens to a call on a
473
472
  * still-deferred tool reads ONE value — under the direct lane a schema-valid call executes rather
474
473
  * than failing, so an absolute failure claim is only true for the opt-out posture. `false` when
475
474
  * nothing is deferred (no placeholders, so the fact is inert). */
476
475
  deferDirectCall: boolean;
477
- /** design/168 — is THIS deferred name on the static face? False under `"swap"`, and false under
476
+ /** Is THIS deferred name on the static face? False under `"swap"`, and false under
478
477
  * `"static"` for a tool whose declaration the result-text carrier cannot hold (the per-tool
479
478
  * exemption: it materializes into the tools block instead). Read at call time — the roster is
480
479
  * mutated in place by MCP refresh, so renderability is a live fact. Absent when nothing is
481
480
  * deferred; a caller with no accessor has no deferred family to describe. */
482
481
  staticFaceFor?: (name: string) => boolean;
483
482
  /**
484
- * design/138 S1 — the MemoryEngine session. Present when `deps.memoryBackend` + `spec.memory.enabled`
483
+ * The MemoryEngine session. Present when `deps.memoryBackend` + `spec.memory.enabled`
485
484
  * hold AND the engine mount succeeded: a materialize failure without a `config.memory_*` code is
486
485
  * fail-open (reported via `deps.onError`, the task runs memory-less), leaving this absent even though
487
486
  * both flags hold.
@@ -496,7 +495,7 @@ export interface Prepared {
496
495
  * runtask call site passes nothing); the checkpoint-mint call site passes "checkpoint".
497
496
  */
498
497
  memoryEngineSession?: {
499
- /** The WRITE-plane pair (design/142 S2b: dual roots collapse to one session face; these are the
498
+ /** The WRITE-plane pair (dual roots collapse to one session face; these are the
500
499
  * plane that owns the write gate — the read-only plane is internal to `inject`/`harvest`). */
501
500
  engine: MemoryEngine;
502
501
  handle: MemorySessionHandle;
@@ -504,15 +503,15 @@ export interface Prepared {
504
503
  inject: () => import("../memory-engine/engine.js").MemoryInjection;
505
504
  harvest: (phase?: "checkpoint" | "terminal") => Promise<HarvestReport | undefined>;
506
505
  /**
507
- * design/383 §2.1 — the session's capture opt-out face (the `TaskStream.optOutMemoryCapture`
506
+ * The session's capture opt-out face (the `TaskStream.optOutMemoryCapture`
508
507
  * verb's target; host-API only — no tool face reads it, §2.6). `flip` re-adjudicates the
509
508
  * entitlement at call time (fresh caps resolve), mints the one-way record, runs the §2.3
510
509
  * boundary sweep, and delivers the effectiveness notice; its typed refusals are the
511
510
  * `memory.capture_optout_*` family. `optedOut` is the live state read (declared / standing /
512
511
  * flipped) — a GENUINE-record read: a store fault answers false here and TRUE on
513
- * `indeterminate` instead (rescan post-6.0.0-RC — the fault must reach the delegation floor
512
+ * `indeterminate` instead: the fault must reach the delegation floor
514
513
  * as its own third state, never as either boolean; an irreversible record is never minted off
515
- * an unreadable state, and an outage must not spawn un-floored children). Present whenever
514
+ * an unreadable state, and an outage must not spawn un-floored children. Present whenever
516
515
  * the memory session mounted.
517
516
  */
518
517
  captureOptOut?: {
@@ -524,7 +523,7 @@ export interface Prepared {
524
523
  }>;
525
524
  };
526
525
  /**
527
- * design/178 §3 — the session's ONE-WAY pollution face. `markPolluted` fires when an
526
+ * The session's ONE-WAY pollution face. `markPolluted` fires when an
528
527
  * external-content-class tool is invoked (the prepare-time tool wrap below is the caller);
529
528
  * durable + in-process, no unmark exists at any layer. `polluted` is what the harvest legs read
530
529
  * (they consult it at harvest time themselves — this accessor serves observers/tests).
@@ -535,20 +534,20 @@ export interface Prepared {
535
534
  reason: string;
536
535
  cause?: import("../memory-engine/types.js").MemoryOriginCause;
537
536
  } | undefined;
538
- /** design/336 §2.2 — `cause` is the structured mechanical fact the mark records (and the
537
+ /** `cause` is the structured mechanical fact the mark records (and the
539
538
  * origin marker minted off it carries): `"observed"` for a witnessed external event,
540
539
  * `"static"` for the capability over-approximation, `"derived"` for recall-taint. Absent
541
540
  * folds to `"observed"` at mint time (the honest floor). */
542
541
  markPolluted: (reason: string, cause?: import("../memory-engine/types.js").MemoryOriginCause) => void;
543
542
  };
544
- /** design/178 §3 — the task's content-safety config (normalized memory spec): the allowlist for
543
+ /** The task's content-safety config (normalized memory spec): the allowlist for
545
544
  * UNDECLARED tools and the strict execution-class upgrade. Consumed by the tool wrap only. */
546
545
  contentSafety: {
547
546
  trustedTools: ReadonlySet<string>;
548
547
  execIsExternalContent: boolean;
549
548
  };
550
549
  /**
551
- * design/336 §3.3 — the delegation-settlement handle: the control-plane coordinates a
550
+ * The delegation-settlement handle: the control-plane coordinates a
552
551
  * settlement writer needs, as PURE DATA. Consumers (the subagent background leg's write-ahead
553
552
  * + terminal observation, the tool wrap's sync unattestable row) can outlive this prepared
554
553
  * leg, so they rebuild their write handle from these fields alone — never from the live
@@ -562,7 +561,7 @@ export interface Prepared {
562
561
  provenance: "carry";
563
562
  };
564
563
  /**
565
- * design/336 §5.5 (file-face half) — the Read-tool recall-taint judgment, present only under
564
+ * The Read-tool recall-taint judgment, present only under
566
565
  * `memoryProvenance: "carry"`. True ⇔ the delivered ABSOLUTE path sits inside a mounted memory
567
566
  * plane and its head bytes carry a committed external-origin marker; the tool wrap then marks
568
567
  * the session derived (same seat and cause as the memory_get propagation). Never throws;
@@ -572,7 +571,7 @@ export interface Prepared {
572
571
  judgeDeliveredPath: (absPath: string) => boolean;
573
572
  };
574
573
  };
575
- /** A per-task env minted by `RunnerDeps.executionEnvFactory` (design/48 remote seam) that THIS task owns
574
+ /** A per-task env minted by `RunnerDeps.executionEnvFactory` (the remote seam) that THIS task owns
576
575
  * and the Runner must tear down on task end. Undefined when the env came from a (caller-owned) static
577
576
  * `deps.executionEnv` or the stub — those outlive the task and must NOT be destroyed here. */
578
577
  ownedEnv?: ExecutionEnv;
@@ -592,7 +591,7 @@ export interface Prepared {
592
591
  suspendProgressRef: {
593
592
  executedApproved: boolean;
594
593
  };
595
- /** RB-439-a: the remote-workspace lifecycle failures this run hit, appended in call order and echoed
594
+ /** The remote-workspace lifecycle failures this run hit, appended in call order and echoed
596
595
  * verbatim on `TaskResult.remoteEnvFailures`. A shared array (not a per-call return) because a suspend
597
596
  * refusal is reported through the deployment's `onError` side channel and the run then continues or
598
597
  * stops by its own rules — without this collector the caller's result kept no trace that a durable
@@ -600,13 +599,13 @@ export interface Prepared {
600
599
  * failed. Resume-leg failures do NOT land here (that leg throws out of prepare before a `Prepared`
601
600
  * exists) — they ride the thrown error's `remoteEnvFailure` carrier instead. */
602
601
  remoteEnvFailures: NonNullable<TaskResult["remoteEnvFailures"]>;
603
- /** design/72 §2.2 (B): set when a suspend was REFUSED because the task already suspended `maxSuspends`
602
+ /** Set when a suspend was REFUSED because the task already suspended `maxSuspends`
604
603
  * times (a resume/restart loop) — the run is aborted and assembles as `failed`/`suspend.loop` instead
605
604
  * of minting yet another checkpoint. */
606
605
  suspendLoopRef: {
607
606
  hit: boolean;
608
607
  };
609
- /** design/74 Slice 3c: opt-in resource-slice suspend. Present (≠ undefined) ONLY when the task opted in
608
+ /** Opt-in resource-slice suspend. Present (≠ undefined) ONLY when the task opted in
610
609
  * (`spec.resourceSuspend`) AND it is eligible to suspend durably (a checkpoint store, durable tool
611
610
  * results, and a remote — or static caller-owned, never per-task-stub — env). The run loop calls it at a
612
611
  * CLEAN turn boundary when a resource limit (turns/budget/walltime) was hit: it mints a `resource_limit`
@@ -619,7 +618,7 @@ export interface Prepared {
619
618
  turns: number;
620
619
  walltimeMs: number;
621
620
  }) => Promise<boolean>;
622
- /** design/164 件四/件五: the PLATFORM-cause suspend — the same commit saga as {@link suspendForResource},
621
+ /** The PLATFORM-cause suspend — the same commit saga as {@link suspendForResource},
623
622
  * exposed on the INFRASTRUCTURE alone (checkpoint store + durable tool results + remote/no owned env),
624
623
  * WITHOUT the `spec.resourceSuspend` opt-in. The run loop calls it at a clean turn boundary when the
625
624
  * execution environment is about to be reclaimed (`env_lifetime`) or a deployment usage window is
@@ -635,15 +634,15 @@ export interface Prepared {
635
634
  }, hint?: {
636
635
  resumeAfterMs: number;
637
636
  }) => Promise<boolean>;
638
- /** design/164 件四 — epoch ms at which this run must stop and checkpoint because the EXECUTION
637
+ /** Epoch ms at which this run must stop and checkpoint because the EXECUTION
639
638
  * ENVIRONMENT's declared lifetime is about to expire (`ExecutionEnv.lifetimeMs` minus
640
639
  * {@link ENV_LIFETIME_SUSPEND_MARGIN_MS}). Undefined ⇒ the env declared no lifetime (every local env,
641
640
  * and any adapter on an unbounded host) or declared one the engine could not anchor — in both cases the
642
- * boundary check is dead code, exactly as it was before design/164. Epoch, not monotonic: the anchor
641
+ * boundary check is dead code. Epoch, not monotonic: the anchor
643
642
  * comes from the PLATFORM (an env can be older than this process), which is a wall-clock fact and the
644
643
  * one domain both sides can name. */
645
644
  envLifetimeSuspendAt?: number;
646
- /** design/164 件五 — deployment usage governance for this run, or undefined when the deployment wired
645
+ /** Deployment usage governance for this run, or undefined when the deployment wired
647
646
  * none (or wired windows without a ledger, which is reported and not enforced). */
648
647
  usageGovernance?: UsageGovernance;
649
648
  /** 1.296 件2b — epoch ms at which the loop ISSUED the current provider call (stamped by the
@@ -652,7 +651,7 @@ export interface Prepared {
652
651
  callIssuedAtRef: {
653
652
  current?: number;
654
653
  };
655
- /** #677 — was the run's WORK cut by a stop? Two observation points, one record, read by the answer-settled
654
+ /** Was the run's WORK cut by a stop? Two observation points, one record, read by the answer-settled
656
655
  * verdict (`answerSettled`) beside the harness's own undrained-input account:
657
656
  * - `continuation` — the loop decided to CONTINUE past its last assistant turn and the abort caught it
658
657
  * before that continuation dispatched. Written by the loop-trace sink from the loop's own steps: a
@@ -670,14 +669,14 @@ export interface Prepared {
670
669
  continuation: boolean;
671
670
  abortedBeforeTurnEnd: boolean;
672
671
  };
673
- /** RB-458 — records the FIRST brain call this run's outer guardrail gave up on (see
672
+ /** Records the FIRST brain call this run's outer guardrail gave up on (see
674
673
  * {@link import("../../brain/timeout.js").withBrainCallGuardrail}). Always present; `timedOut`
675
674
  * stays absent unless the guardrail fired. The run loop reads it AFTER the loop settles and gives
676
675
  * the task the typed terminal — the harness turns a loop throw into an error assistant message, so
677
676
  * without this the cause would reach the caller only as the generic `provider.error`. */
678
677
  brainCallGuardrailRef: BrainCallGuardrailRef;
679
678
  /**
680
- * #548 — the tool gate's own TYPED STOP: set (once) when the classifier denial limit was reached with
679
+ * The tool gate's own TYPED STOP: set (once) when the classifier denial limit was reached with
681
680
  * no approver to fall back to (headless), together with the run abort. The run loop adopts it as the
682
681
  * terminal `threw` (`TaskResult.errorCode` = the error's `code`, `errorMessage` = its sentence) the
683
682
  * same way it adopts the brain-call guardrail's — a loop that ended because THIS lane aborted it must
@@ -689,7 +688,7 @@ export interface Prepared {
689
688
  code: string;
690
689
  };
691
690
  };
692
- /** design/80 D-B — set by a tool calling `ctx.requestReview()` (the first-party `present_plan` tool, CC
691
+ /** Set by a tool calling `ctx.requestReview()` (the first-party `present_plan` tool, CC
693
692
  * ExitPlanMode parity): the run loop honors it at the next CLEAN turn boundary by minting a `plan_review`
694
693
  * checkpoint. `{ pending }` is set (with an optional reason) the moment a tool requests review; the boundary
695
694
  * reads + clears it. First request in a batch wins (idempotent). */
@@ -698,17 +697,17 @@ export interface Prepared {
698
697
  reason?: string;
699
698
  };
700
699
  };
701
- /** design/80 D-B: present (≠ undefined) ONLY when a `checkpointStore` is wired (the deployment can pause). The
700
+ /** Present (≠ undefined) ONLY when a `checkpointStore` is wired (the deployment can pause). The
702
701
  * run loop calls it at a CLEAN turn boundary when `reviewRequestRef.pending` is set: it mints a `plan_review`
703
702
  * checkpoint (`status:"needs_review"` by its registry row) + pauses the workspace + aborts the loop, reusing
704
703
  * the SAME commit saga as the human/resource suspends. Returns true iff it committed a resumable checkpoint;
705
704
  * false ⇒ the request could not be honored (caller drops it and continues). */
706
705
  suspendForReview?: (reason?: string) => Promise<boolean>;
707
- /** design/74 Slice 4: the prior cross-slice {@link ResourceLedger} (from the resumed checkpoint), so the run
706
+ /** The prior cross-slice {@link ResourceLedger} (from the resumed checkpoint), so the run
708
707
  * loop can size this slice's effective budget = `min(maxCostUsd, remaining)`. Undefined on the first slice
709
708
  * (or a non-resource task). */
710
709
  resourceLedger?: ResourceLedger;
711
- /** design/80 D-E-core (A3): a mutable holder the run loop populates (right after `stats` exists) so the
710
+ /** A mutable holder the run loop populates (right after `stats` exists) so the
712
711
  * human/irreversible_ask suspend can debit THIS leg's live cumulative spend onto the durable approval
713
712
  * ledger it attaches (the resource-slice path passes `sliceSpend` explicitly; this event-driven gate has
714
713
  * no such arg, so it reads the live spend here). Read at suspend time; absent ⇒ this leg's spend is not
@@ -721,10 +720,10 @@ export interface Prepared {
721
720
  walltimeMs: number;
722
721
  };
723
722
  };
724
- /** design/91: the per-task human-review accumulator (synchronous `resolveAsk` waits this leg + the carried
723
+ /** The per-task human-review accumulator (synchronous `resolveAsk` waits this leg + the carried
725
724
  * prior-leg burden seeded from the resumed checkpoint). The run loop ADDS the durable-resume latency
726
725
  * (`now() − cp.suspendedAt`) on a resume, then surfaces it as `stats.humanReview` at assembly (omitted when
727
- * empty). **Budget-EXCLUDED** — never folded into cost/the budget gate (design/91 §1). */
726
+ * empty). **Budget-EXCLUDED** — never folded into cost/the budget gate. */
728
727
  humanReviewRef: {
729
728
  count: number;
730
729
  totalWaitMs: number;
@@ -736,17 +735,17 @@ export interface Prepared {
736
735
  toolArg?: string;
737
736
  }>;
738
737
  };
739
- /** design/91: the injectable wall-clock the run loop uses for the durable-resume human-review latency
738
+ /** The injectable wall-clock the run loop uses for the durable-resume human-review latency
740
739
  * (`humanLatencyMs = now() − cp.suspendedAt`), so it reads the SAME clock as the suspend-side `suspendedAt`. */
741
740
  now: () => number;
742
- /** design/45 resume: the FULL resolved tool list (real tools, never deferred placeholders) so the
741
+ /** The FULL resolved tool list (real tools, never deferred placeholders) so the
743
742
  * resume engine can execute a previously-suspended pending tool call directly (it bypasses the gate —
744
743
  * the human already adjudicated it). Same wrapping (offload + ctx) the harness runs with.
745
744
  *
746
745
  * ONE array, mutated in place; identity is the contract (every closure that resolves a name at run time
747
- * reads this exact array). Since design/388 the array is PRIVATE to the `RosterBuilder` (tool-roster.ts) —
746
+ * reads this exact array). The array is PRIVATE to the `RosterBuilder` (tool-roster.ts) —
748
747
  * every station below writes through its verbs (`mount` / `mountAll` / `unmountWhere` / `replaceAt` /
749
- * `replaceDomain`) and this field is the builder's read face. WRITER TABLE (design/238 R-3) — the only
748
+ * `replaceDomain`) and this field is the builder's read face. WRITER TABLE — the only
750
749
  * stations that write it, in prepare order:
751
750
  * · caps-and-workflow — MINTS it (`spec.tools` through the ctx wrap + the large-result wrapper), then pushes
752
751
  * ReportBlocked (enableBlockedReport ≠ false), ReportFindings (no caller tool of that name/alias),
@@ -771,28 +770,28 @@ export interface Prepared {
771
770
  * tool-disclosure and listings only READ it (`harnessTools` is a derived list; placeholders never enter here). */
772
771
  tools: readonly AgentTool[];
773
772
  /**
774
- * design/388 §2.5 — this leg's minted TOOL ROSTER (the same object `wiringManifest.tools` carries):
773
+ * This leg's minted TOOL ROSTER (the same object `wiringManifest.tools` carries):
775
774
  * one row per mounted instance in wire order. Minted ONCE at the prompt-assembly station (the same
776
775
  * pass that projects the prompt manifest's tool rows, so the two agree by construction); the park
777
776
  * station reads the gated call's identity off it, the exemption probe hands it to the host.
778
777
  */
779
778
  toolRoster: import("../tool-roster.js").ToolRoster;
780
779
  /**
781
- * design/388 §2.5 — the run-time delta seat: every roster change after prepare (the RefreshMcpTools
780
+ * The run-time delta seat: every roster change after prepare (the RefreshMcpTools
782
781
  * seam) re-mints the roster here and publishes a `ToolRosterDelta`. The run loop subscribes at the
783
782
  * point it emits `wiring_manifest` and forwards each delta as a `tool_roster_delta` event; until it
784
783
  * does, deltas are buffered in order.
785
784
  */
786
785
  toolRosterDeltas: import("../tool-roster.js").ToolRosterDeltaSeat;
787
786
  /**
788
- * design/388 L4 — the leg's `tool_end.structured` projector: the engine card set ∪ the caller rows' declared
787
+ * The leg's `tool_end.structured` projector: the engine card set ∪ the caller rows' declared
789
788
  * `renderHints.resultCards`; an undeclared `details.type` is dropped and announced ONCE per leg
790
789
  * (`config.tool_card_undeclared`). The ONE card port: every tool_end body projection (the live loop, the resumed
791
790
  * batch, the reconcile-recovered orphan) takes it as a parameter; no module-level card set exists to fall back to.
792
791
  */
793
792
  structuredProjector: (result: unknown) => unknown;
794
- /** Name→effect map for every tool this task can call (design/44 §3). Used by the abort-path orphan
795
- * reconcile (design/64 §9) to make interrupted tool_results effect-aware (read/idempotent = safe to
793
+ /** Name→effect map for every tool this task can call. Used by the abort-path orphan
794
+ * reconcile to make interrupted tool_results effect-aware (read/idempotent = safe to
796
795
  * repeat; write/unknown = outcome unknown). Unknown names default to `write` (conservative). */
797
796
  toolEffects: Map<string, ToolEffect>;
798
797
  /** scan-1/A5 — the orphans the WAKE/CRASH reconcile closed while preparing this run (empty on a fresh or
@@ -803,9 +802,9 @@ export interface Prepared {
803
802
  wakeRecovered: RecoveredOrphan[];
804
803
  /** Fixed per-request prompt overhead (system prompt + tool schemas, ≈chars/4 tokens). Fed to
805
804
  * `maybeCompact.overheadTokens` so the compaction trigger stays accurate in the anchor-less
806
- * regime (custom Brains that don't report usage — design/64 §26.7). */
805
+ * regime (custom Brains that don't report usage). */
807
806
  promptOverheadTokens: number;
808
- /** design/169-A — accessor for the MAIN lane's latest real brain request (systemPrompt/messages/
807
+ /** Accessor for the MAIN lane's latest real brain request (systemPrompt/messages/
809
808
  * tools snapshot, recorded at the harness's provider seam just before each main-loop call). Fed
810
809
  * to `maybeCompact.forkContext` on all three compaction lanes so the summary request can FORK the
811
810
  * already-paid main prefix (CC form). `undefined` until the run's first main-loop call. Summary
@@ -816,7 +815,7 @@ export interface Prepared {
816
815
  * via the SAME env the hands ran against (so remote/k8s/E2B tasks read the container's tree, not
817
816
  * the control plane's). Present only when the hands are enabled — without an env there is no
818
817
  * workspace to re-read. null = unreadable (deleted/binary/transport error); callers skip it.
819
- * design/199 件B: `{ withheld }` = the target matches the sensitive-path read deny list — the
818
+ * `{ withheld }` = the target matches the sensitive-path read deny list — the
820
819
  * attachment is deliberately withheld and the consumer must SAY so (an annotation, never a silent
821
820
  * skip: a silently missing attachment reads as "file gone", which is a different fact). */
822
821
  readTaskFile?: (path: string) => Promise<string | null | {
@@ -828,10 +827,10 @@ export interface Prepared {
828
827
  * first (from the hands' readFileState `lastReadAt` stamps). The compaction working-file
829
828
  * attachment prefers this over the modified set — CC restores what the model RECENTLY READ,
830
829
  * including untouched reference files. Present only with hands (same gate as readTaskFile).
831
- * RB-197: seeded entries are excluded — their content lives in the system-prompt lane, which
830
+ * Seeded entries are excluded — their content lives in the system-prompt lane, which
832
831
  * compaction never touches, so re-attaching them into the summary would be a duplicate. */
833
832
  recentlyReadFiles?: () => string[];
834
- /** RB-197②(独立复审 + 命中,已修) — canonicalizes a raw (often relative, model-typed) path the
833
+ /** Canonicalizes a raw (often relative, model-typed) path the
835
834
  * SAME way the hands toolkit does (`resolveKey` against the same containment root `readTaskFile`
836
835
  * uses), so `maybeCompact`'s kept-tail/instruction-source exclusions compare paths in the SAME
837
836
  * coordinate `recentlyReadFiles()` already uses — without this a plain string match silently never
@@ -839,23 +838,23 @@ export interface Prepared {
839
838
  * readTaskFile); absent there is no containment root to resolve against, and every path source is
840
839
  * already in the same raw coordinate anyway. */
841
840
  normalizeAttachmentPath?: (raw: string) => Promise<string>;
842
- /** RB-197②(交叉复审命中,已修) — recognizes the hands Read tool's own dedup-stub markers
841
+ /** Recognizes the hands Read tool's own dedup-stub markers
843
842
  * ({@link isReadDedupStubResult}), so `maybeCompact`'s kept-tail scan can tell a SUBSTANTIVE Read
844
843
  * result from a stub hit whose original full transmission may already be summarized away. Present
845
844
  * only with hands (same gate as readTaskFile). */
846
845
  isDedupStubResult?: (resultText: string) => boolean;
847
- /** RB-197 (form-one; CC 220 clears readFileState at its compaction landing site, @388663): wired to
848
- * `MaybeCompactOptions.onApplied` by every compaction lane. Drops the non-seeded read-state entries
846
+ /** Wired to `MaybeCompactOptions.onApplied` by every compaction lane (CC 220 clears readFileState at its
847
+ * compaction landing site, @388663). Drops the non-seeded read-state entries
849
848
  * (the summary just replaced the Read results the dedup stubs point at) and re-registers the files
850
849
  * that were re-attached WHOLE. Present only with hands (same gate as readTaskFile).
851
- * RB-197②(命中,已修): `preserveReadState` carries the kept-tail-visible files that were
850
+ * `preserveReadState` carries the kept-tail-visible files that were
852
851
  * deliberately skipped for re-attachment — their existing entry must survive the clear too (same
853
852
  * reasoning as a seeded entry: the model's view of the file did not change). */
854
853
  onCompactionApplied?: (attachedComplete: ReadonlyArray<{
855
854
  path: string;
856
855
  content: string;
857
856
  }>, preserveReadState?: ReadonlyArray<string>) => void;
858
- /** design/121: the live diagnostics lane (present only when the gate passed — manager w/ registry +
857
+ /** The live diagnostics lane (present only when the gate passed — manager w/ registry +
859
858
  * write hands + not opted out). `registry` is drained by runtask at turn boundaries; `nudge` is
860
859
  * called (fire-and-forget) after each successful edit/write so the language server re-analyzes. */
861
860
  lspDiagnostics?: {
@@ -866,7 +865,7 @@ export interface Prepared {
866
865
  * `drain` and calls `releaseRun` with it at the run's terminal. */
867
866
  runIdent: string;
868
867
  };
869
- /** design/133 件④: the live plan-mode flag (`enter_plan_mode` flips it, run-local one-way). Exposed
868
+ /** The live plan-mode flag (`enter_plan_mode` flips it, run-local one-way). Exposed
870
869
  * so the run loop's plan-mode attachment producer reads the SAME flag the write-deny enforces —
871
870
  * never a second source of truth. Always present (`active:false` when plan mode is unused). */
872
871
  planModeRef: {
@@ -885,7 +884,7 @@ export interface Prepared {
885
884
  * as a whole-snapshot append on this leg (it would replace the branch's record with a partial
886
885
  * one); the leg's announcements then simply repeat next run. */
887
886
  announcedSnapshotRecovered: boolean;
888
- /** A1 (design/66 anchor revision) — the date-flip detector seam: `legDate` = the date frozen
887
+ /** The date-flip detector seam: `legDate` = the date frozen
889
888
  * into this leg's system prefix; `today()` = the boundary-time LOCAL date (user-zone-bound closure).
890
889
  * The run loop feeds both to the `date_change` attachment producer; the prefix itself never
891
890
  * re-renders mid-leg (cache preservation, CC parity). Present only when the prompt carries a date. */
@@ -902,7 +901,7 @@ export interface Prepared {
902
901
  path: string;
903
902
  contentHash: string | null;
904
903
  }>;
905
- /** #500 — the RAW instruction-file text this leg's `loadProjectMemory` returned
904
+ /** The RAW instruction-file text this leg's `loadProjectMemory` returned
906
905
  * (`ProjectMemoryLoad.content`), for the compaction lanes' `contextInstructionFiles` seat.
907
906
  *
908
907
  * Which bytes, exactly: the string prepare-task hands `composeMemoryBlock(projectMem, "project")`
@@ -930,7 +929,7 @@ export interface Prepared {
930
929
  legGuideline: WorkflowSizeGuideline;
931
930
  current: () => WorkflowSizeGuideline;
932
931
  };
933
- /** design/133 F5 (§R3 决议): boundary-time external-change scan over the ≤`maxFiles` most-recently-READ
932
+ /** Boundary-time external-change scan over the ≤`maxFiles` most-recently-READ
934
933
  * files. Stats each via `env.fileInfo` and reports paths whose `mtimeMs` moved past the recorded
935
934
  * `lastReadAt` + 2s epsilon (CC getChangedFiles shape: readFileState needs NO new field; the agent's
936
935
  * own write-backs refresh `lastReadAt`, so self-edits are immune). ENOENT evicts the readFileState
@@ -944,14 +943,14 @@ export interface Prepared {
944
943
  }>;
945
944
  evicted: string[];
946
945
  }>;
947
- /** G1 通告层 — deferred tools MATERIALIZED (design/36 rematerialize) but not yet announced at a
946
+ /** G1 通告层 — deferred tools MATERIALIZED (rematerialized) but not yet announced at a
948
947
  * turn boundary. Appended by the rematerialize diff (newly-activated names only — the announced set
949
948
  * is seeded with prepare-time actives INCLUDING resume-reseeded ones, so a resume never replays);
950
949
  * DRAINED by the run loop only when the `tools_delta` attachment actually survived the byte cap.
951
- * Present when the task has deferred tools at all — OR (RB-309) when a declared MCP server failed
950
+ * Present when the task has deferred tools at all — OR when a declared MCP server failed
952
951
  * to connect, so the failure is announceable even on a task whose every MCP tool went missing with it.
953
952
  *
954
- * RB-309 — the same frame's MCP arms, filled by the SAME rematerialize seam / materialize-time
953
+ * The same frame's MCP arms, filled by the SAME rematerialize seam / materialize-time
955
954
  * projection and drained by the same intact-survival predicate:
956
955
  * - `pendingRemoved`: previously-ANNOUNCED tool names that left the live roster (a RefreshMcpTools
957
956
  * re-splice whose server withdrew them). CC `removedNames`.
@@ -1008,7 +1007,7 @@ export interface Prepared {
1008
1007
  * announce-once-ledger.ts): seeded at prepare from the branch's record, advanced by the run loop
1009
1008
  * on intact delivery of the tools_delta `failedServers` arm / the mcp_dropped_tools frame. */
1010
1009
  announcedListingsRef: AnnouncedListingSnapshotInput;
1011
- /** env-tail migration (#254 shape) — the git-status frame lane's run-local state: this leg's
1010
+ /** env-tail migration — the git-status frame lane's run-local state: this leg's
1012
1011
  * resolved frame (probe outcome rendered + hashed at prepare), the announced `(kind, hash)`
1013
1012
  * mirror the checkpoint serializer reads, the trim-protection slot the request-build context
1014
1013
  * handler matches on, and the re-assert closure the compaction landing + boundary retry call.
@@ -1023,20 +1022,20 @@ export interface Prepared {
1023
1022
  description?: string;
1024
1023
  status: string;
1025
1024
  }>;
1026
- /** design/122 D1 — the parent-run subagent-retain ledger (present ONLY when `spec.retainSubagentSessions`
1025
+ /** The parent-run subagent-retain ledger (present ONLY when `spec.retainSubagentSessions`
1027
1026
  * is enabled). The Runner disposes it (abort in-flight resumes + unpin + release every retained child
1028
1027
  * session) in the task's terminal `finally` — same UNCONDITIONAL posture as the background-agent reap:
1029
1028
  * retain is NOT durable (a suspend leg's in-memory ledger cannot survive a re-prepare), so releasing on
1030
1029
  * every exit path is hygiene, never a loss. */
1031
1030
  subagentRetain?: SubagentRetainLedger;
1032
- /** design/84 Seam C: run-scoped consecutive-`summaryProvider`-reuse counter, OWNED by the Runner and
1031
+ /** Run-scoped consecutive-`summaryProvider`-reuse counter, OWNED by the Runner and
1033
1032
  * SHARED across both compaction call sites (within-task turn boundary + `finish()`), so the
1034
1033
  * `maxConsecutiveProviderReuse` drift guard is enforced over the whole task — incremented when a
1035
1034
  * compaction reused the provider's summary, reset to 0 on a real (LLM) summary. */
1036
1035
  compactionReuseRef: {
1037
1036
  consecutive: number;
1038
1037
  };
1039
- /** design/123 D4 — trim→compaction pressure propagation (16k live sawtooth root cause): set by the
1038
+ /** Trim→compaction pressure propagation (16k live sawtooth root cause): set by the
1040
1039
  * context hook when `trimToBudget` actually DROPPED messages from a request view (request-only trim
1041
1040
  * + usage-anchor mismatch deflates the next boundary's estimate → the trigger and floor are both
1042
1041
  * deceived → full-size request spikes alternate with trimmed troughs). The next turn boundary's
@@ -1047,25 +1046,23 @@ export interface Prepared {
1047
1046
  trimPressureRef: {
1048
1047
  droppedMessages: boolean;
1049
1048
  };
1050
- /** design/374 slices 1b/2/3 — the microCompact machine state this run: the selected clearing
1049
+ /** The microCompact machine state this run: the selected clearing
1051
1050
  * machine, the cleared-projection ledger (request-view application, durable decisions — see
1052
1051
  * `context-edit.ts`'s ledger note; per-run in-memory, so durable resume / `resumeAt` rebuilds
1053
1052
  * start EMPTY by construction), the last request's projection seat (what the provider actually
1054
1053
  * saw — the MC-R rejection arm computes its candidates and savings on THIS view, never on the
1055
- * raw session rebuild), the MC-R knob, and the slice-3 arm-B seat. The explicit opt-out
1056
- * (`machine: "legacy"` + MC-R off) ⇒ the ledger never gains an entry and every replay is a
1057
- * same-reference no-op (opt-out bytes unchanged). */
1054
+ * raw session rebuild), the MC-R knob, and the slice-3 arm-B seat. */
1058
1055
  microCompact: PreparedMicroCompact;
1059
1056
  }
1060
1057
  /** See {@link Prepared.microCompact}. */
1061
1058
  export interface PreparedMicroCompact {
1062
- /** The frontier-machine selection — `"off"` = no proactive frontier clearing (the unified
1063
- * machine instead gets its one blocking-point shot, slice-3 arm A). */
1064
- machine: "off" | ContextEditMachine;
1065
- /** MC-R (design/374 §3.2): one-shot clear-and-retry on a provider input-too-long rejection.
1059
+ /** The frontier-machine selection — `"off"` = no proactive frontier clearing (the machine
1060
+ * instead gets its one blocking-point shot, slice-3 arm A). */
1061
+ machine: MicroCompactMachine;
1062
+ /** MC-R: one-shot clear-and-retry on a provider input-too-long rejection.
1066
1063
  * Default true since the slice-3 flip. */
1067
1064
  clearOnRejection: boolean;
1068
- /** design/374 slice 3 (arm B) — the in-turn forced-compaction seat: runtask wires a closure
1065
+ /** The in-turn forced-compaction seat: runtask wires a closure
1069
1066
  * that runs the SAME forced-compaction pass the prompt-too-long recovery uses (gates included)
1070
1067
  * and answers whether a compaction landed in the session. The context hook calls it when the
1071
1068
  * pre-send estimate breaks the guard budget and then returns `adoptSessionRebuild` so the
@@ -1093,7 +1090,7 @@ export interface PreparedMicroCompact {
1093
1090
  offloadPersist?: (toolCallId: string, fullText: string) => string;
1094
1091
  }
1095
1092
  /**
1096
- * design/45 resume inputs threaded into {@link prepareTask} to continue a suspended task. The Runner
1093
+ * Resume inputs threaded into {@link prepareTask} to continue a suspended task. The Runner
1097
1094
  * builds it from the persisted {@link Checkpoint}: rewind the branch to the suspension leaf, skip the
1098
1095
  * suspended batch during wake-reconcile, and re-seed the §4.bis per-task correctness state so the
1099
1096
  * resumed run is in the **same state space** it suspended in.
@@ -1106,17 +1103,17 @@ export interface PrepareResume {
1106
1103
  * crash-interrupted; closing them with `[INTERRUPTED]` would DESTROY the suspended batch, §15.2 #7). */
1107
1104
  suspendedBatch: ReadonlySet<string>;
1108
1105
  /** The §4.bis correctness-state snapshot to re-seed (activeTools / outputRef / nestedStats /
1109
- * consolidationNotes / readFileState). */
1106
+ * readFileState). */
1110
1107
  seed: CheckpointState;
1111
- /** design/72 §2.2 (B): how many times this task already suspended (the resumed checkpoint's
1108
+ /** How many times this task already suspended (the resumed checkpoint's
1112
1109
  * `suspendCount`). The next suspend mints `priorSuspendCount + 1`; past `maxSuspends` it fails
1113
1110
  * (`suspend.loop`) instead of re-suspending. Absent/0 ⇒ no prior suspends. */
1114
1111
  priorSuspendCount?: number;
1115
- /** design/74 Slice 4: the cross-slice {@link ResourceLedger} carried by the resumed `resource_limit`
1112
+ /** The cross-slice {@link ResourceLedger} carried by the resumed `resource_limit`
1116
1113
  * checkpoint (cumulative spend + the frozen human totals). The next slice's effective budget is
1117
1114
  * `min(maxCostUsd, totalBudget − spent)`, and its own suspend debits onto this. Absent ⇒ the first slice. */
1118
1115
  priorLedger?: ResourceLedger;
1119
- /** design/91: the accumulated human-review burden carried by the resumed checkpoint
1116
+ /** The accumulated human-review burden carried by the resumed checkpoint
1120
1117
  * ({@link import("../checkpoint-store.js").Checkpoint.humanReview}) — the gates resolved up to and including
1121
1118
  * the suspend BEFORE this one. Seeds the per-task accumulator so the resumed leg ADDS this suspend's own
1122
1119
  * latency (`now() − cp.suspendedAt`) on top, reporting the WHOLE chain's burden. Absent ⇒ no prior human time. */
@@ -1131,15 +1128,15 @@ export interface PrepareResume {
1131
1128
  toolArg?: string;
1132
1129
  }>;
1133
1130
  };
1134
- /** design/49 v1.5: when the suspend ran with a remote workspace, the {@link CheckpointState.workspaceHandle}
1131
+ /** When the suspend ran with a remote workspace, the {@link CheckpointState.workspaceHandle}
1135
1132
  * to restore — prepare rebuilds the per-task env via `deps.executionEnvFactory` then `resumeVM(snapshotId)`
1136
1133
  * + `postResumeInit()` (instead of running on a fresh, empty env). Threaded HERE (not via `ResumeTaskConfig`)
1137
1134
  * so the factory stays a deployment-level `RunnerDeps` capability and never pollutes `TaskSpec` — preserving
1138
1135
  * the "untrusted caller can't inject an env" red line ({@link import("../remote-env.js").ExecutionEnvFactory}'s
1139
- * own contract states it: "Lives on `RunnerDeps` (deployment-level) — NOT on `TaskSpec`"; code-ready council round-2). */
1136
+ * own contract states it: "Lives on `RunnerDeps` (deployment-level) — NOT on `TaskSpec`"). */
1140
1137
  workspaceHandle?: import("../remote-env.js").WorkspaceHandle;
1141
1138
  /**
1142
- * design/174 — the call id of the CONTENT ask whose answer an operator's approval was spent on, when
1139
+ * The call id of the CONTENT ask whose answer an operator's approval was spent on, when
1143
1140
  * that is what this leg redeems. Scoped as an id, not a leg-wide flag: an `unavailable` outcome on
1144
1141
  * THAT call must become a coded failure (the approval bought a question nobody answered), while a NEW
1145
1142
  * question raised later on the same leg had no approval spent on it and keeps the ordinary
@@ -1215,7 +1212,7 @@ export interface InheritedGate {
1215
1212
  */
1216
1213
  admittedOrgScopes?: readonly string[];
1217
1214
  /**
1218
- * The MONOTONIC org-governance provenance bit (falsification-style round 5): `true` when any leg of this
1215
+ * The MONOTONIC org-governance provenance bit: `true` when any leg of this
1219
1216
  * tree ran with an org-admission surface configured (resolver / deployment scope list) or
1220
1217
  * inherited the bit. It never clears once set (a governed tree stays governed), and it counts as
1221
1218
  * governance evidence at the admission door EVEN when every admitted set en route is empty — a
@@ -1263,7 +1260,7 @@ export interface InheritedGate {
1263
1260
  * permission ask does under `durableMandate`. */
1264
1261
  contentMandate?: boolean;
1265
1262
  /**
1266
- * F-012 (#106) — the ancestor's FROZEN auto-mode classifier: the same decider instance the
1263
+ * F-012 — the ancestor's FROZEN auto-mode classifier: the same decider instance the
1267
1264
  * ancestor's own gate consults for a surviving ask (`ToolGateInput.autoMode`). Without it the
1268
1265
  * ancestor's ask DECISION CHAIN did not travel — the wrappers resolved an inherited ask straight
1269
1266
  * at the frozen approver, so an ask the ancestor's classifier would have BLOCKED executed in the
@@ -1276,14 +1273,14 @@ export interface InheritedGate {
1276
1273
  autoMode?: {
1277
1274
  decider: AutoModeDecider;
1278
1275
  /**
1279
- * #548 — the ancestor's per-run DENIAL-LIMIT tracker, frozen beside its decider (same owner). The
1276
+ * The ancestor's per-run DENIAL-LIMIT tracker, frozen beside its decider (same owner). The
1280
1277
  * wrapper arms count the frozen classifier's blocks on it and, at a bound, resolve the fallback
1281
1278
  * ask at the frozen approver instead of denying (`requiresRealApproval` set, sandbox admission
1282
1279
  * excluded). Live-only, like the decider: a cross-process redemption starts a fresh count.
1283
1280
  */
1284
1281
  denialTracking?: AutoModeDenialTracker;
1285
1282
  /**
1286
- * #503 — the SERIALIZABLE criteria half of this classifier (assembly inputs + knobs + the
1283
+ * The SERIALIZABLE criteria half of this classifier (assembly inputs + knobs + the
1287
1284
  * deployment's settings epoch), present when the arming deployment opted in
1288
1285
  * (`RunnerDeps.autoMode.persistArming`). A durable park records it on the chain entry so a
1289
1286
  * CROSS-PROCESS redemption can rebuild an equivalent decider over its own model leg instead of
@@ -1338,7 +1335,7 @@ export interface InheritedGate {
1338
1335
  }>;
1339
1336
  }
1340
1337
  /** The runtime feature flags the stable prompt's harness-context block gates its sections on
1341
- * (design/64 §6.3: claim only what the task has). Spread into the assembly's StablePromptContext
1338
+ * (claim only what the task has). Spread into the assembly's StablePromptContext
1342
1339
  * by the prompt-assembly phase, which re-derives the two orchestration flags against the post-exclusion roster. */
1343
1340
  export interface PromptFeatureFlags {
1344
1341
  policyEnabled: boolean;
@@ -1357,9 +1354,9 @@ export interface PromptFeatureFlags {
1357
1354
  isSubagent: boolean;
1358
1355
  }
1359
1356
  /**
1360
- * design/78 Slice-1 (MAJOR-3 wiring): a TRUSTED, run-scoped internal channel into {@link prepareTask}, set
1357
+ * A TRUSTED, run-scoped internal channel into {@link prepareTask}, set
1361
1358
  * ONLY by a trusted CORE caller (`runRepairLoop` via the Runner's internal `runTaskStream` arg) — NEVER from
1362
- * a {@link TaskSpec} field (the untrusted-caller surface, design/44 §7 Q4). It is the live-state counterpart
1359
+ * a {@link TaskSpec} field (the untrusted-caller surface). It is the live-state counterpart
1363
1360
  * of {@link PrepareResume.seed}: where `resume.seed` re-seeds correctness state RESTORED from a checkpoint,
1364
1361
  * this carries the LIVE per-task state the Runner cannot otherwise see (it lives in the caller's closure).
1365
1362
  *
@@ -1368,7 +1365,7 @@ export interface PromptFeatureFlags {
1368
1365
  * the bundle (failureTrace/diagnostics/attemptCount/oracleTier) sits in the loop's closure and was being lost
1369
1366
  * — the minted checkpoint serialized `repairBundle: undefined`. Threading it here lets
1370
1367
  * {@link prepareTask}'s `serializeCheckpointState` source the LIVE bundle so a resume re-seeds `attemptCount`
1371
- * MONOTONICALLY (design/76 §2.2#1 r4 MAJOR-A). Mirrors how `nestedStats`/`resume.seed` thread trusted
1368
+ * MONOTONICALLY. Mirrors how `nestedStats`/`resume.seed` thread trusted
1372
1369
  * run-scoped internals through the Runner without touching `TaskSpec`.
1373
1370
  *
1374
1371
  * @contract prepare.deps-read-stable — the `RunnerDeps`, `RunInternals` and `ExecutionEnv` handles a host
@@ -1385,7 +1382,7 @@ export interface RunInternals {
1385
1382
  * checkpoint minted MID-attempt so a resume re-seeds it; undefined for any non-repair run. */
1386
1383
  repairBundle?: RepairBundle;
1387
1384
  /**
1388
- * design/173 §8.2 — the ENGINE deliberately stripped the spawn turn's per-request `onQuestion`
1385
+ * The ENGINE deliberately stripped the spawn turn's per-request `onQuestion`
1389
1386
  * face from this leg's spec (a long-lived background/retained/revived child must not hold a
1390
1387
  * callback torn down with the turn that spawned it). Minted ONLY by the subagent lanes'
1391
1388
  * `stripSpawnTurnQuestionFace` helper, PAIR-PRODUCED with the strip itself — never inferred from
@@ -1394,11 +1391,14 @@ export interface RunInternals {
1394
1391
  * `"interactive"` tree's engine-stripped legs are exempt). TRUST POSTURE (ruled 2026-08-05):
1395
1392
  * RunInternals is a public trusted-caller parameter, so this flag is an honesty channel, not a
1396
1393
  * security gate — a caller forging it is a deployment lying to itself; resource-face safety
1397
- * stays with its own fail-closed mechanisms.
1394
+ * stays with its own fail-closed mechanisms. INHERITS DOWN THE TREE: a stripped leg's descendants are faceless by
1395
+ * the same engine act (the trusted ctx carries it as `ToolExecuteContext.questionFaceStripped`, the Workflow mount as
1396
+ * `parentQuestionFaceStripped`), so the posture-door exemption travels with the facelessness it explains; a leg
1397
+ * that strips on its own mints the same flag.
1398
1398
  */
1399
1399
  questionFaceStripped?: true;
1400
1400
  /**
1401
- * design/173 §8.3 (review fold r2-F1) — the SPAWNING run's resolved interaction posture, carried
1401
+ * The SPAWNING run's resolved interaction posture, carried
1402
1402
  * into engine-built children over the trusted internals channel (never copied onto the child
1403
1403
  * SPEC — the §8.3 rule). The child's door resolves `spec ?? THIS ?? deps`, so a root's per-run
1404
1404
  * posture override governs its whole engine-built tree instead of every child falling back to
@@ -1407,7 +1407,7 @@ export interface RunInternals {
1407
1407
  */
1408
1408
  parentInteractionPosture?: "interactive" | "headless";
1409
1409
  /**
1410
- * design/153 §7.2c (件3c, r6 H-1) — the trusted post-consume hook for the PARKED-RESUME drive:
1410
+ * The trusted post-consume hook for the PARKED-RESUME drive:
1411
1411
  * called by `resumeStream` after its resolve CAS WON (the token is consumed — the master
1412
1412
  * arbitration is decided) and BEFORE the resumed leg starts. The parked-resume caller uses it to
1413
1413
  * flip the reserved row `parked→running` (guarded CAS) + adopt the live handle/lane — the ONLY
@@ -1430,12 +1430,12 @@ export interface RunInternals {
1430
1430
  */
1431
1431
  inheritedGate?: InheritedGate;
1432
1432
  /**
1433
- * design/180 half A — the delegation RUNTIME-PROVENANCE channel. Minted by the spawning delegation
1433
+ * The delegation RUNTIME-PROVENANCE channel. Minted by the spawning delegation
1434
1434
  * tool when the parent chain is armed (the parent mounts a memory session, or is itself recording
1435
1435
  * for ITS parent): `ref` is the child's monotonic aggregate — the child's recorder writes into it
1436
1436
  * as the run progresses (live faces read the current bits; the terminal attestation reduces from
1437
1437
  * it); `contentSafety` is the chain's FROZEN classification snapshot — the child may narrow it
1438
- * with its own config, never widen (design/180 A-2). Trusted internals chain only, same posture as
1438
+ * with its own config, never widen. Trusted internals chain only, same posture as
1439
1439
  * {@link inheritedGate}. Absent ⇒ the child records nothing (its deliveries then read `unknown`,
1440
1440
  * and every judgment falls back to the static floor — fail-closed by construction; whether the
1441
1441
  * floor's verdict MARKS the judging session follows that run's deployment evidence standard,
@@ -1448,7 +1448,7 @@ export interface RunInternals {
1448
1448
  contentSafety: import("../memory-engine/delegation-provenance.js").DelegationContentSafety;
1449
1449
  };
1450
1450
  /**
1451
- * #22 (ruled 2026-08-05) — the SESSION-scoped org-admission freeze for a SAME-SESSION continuation
1451
+ * The SESSION-scoped org-admission freeze for a SAME-SESSION continuation
1452
1452
  * that is NOT a checkpoint resume: a retained background child revived through the in-process resume
1453
1453
  * leg. The checkpoint plane already freezes the session's own verdict
1454
1454
  * ({@link InheritedGate.ownAdmittedOrgScopes}); this leg has no checkpoint, so without a carrier it
@@ -1468,7 +1468,7 @@ export interface RunInternals {
1468
1468
  current: import("../memory-admission.js").OwnOrgAdmissionVerdict | undefined;
1469
1469
  };
1470
1470
  /**
1471
- * design/176 — this run's LATE-BOUND peer-identity carrier (a REF, same family and reason as
1471
+ * This run's LATE-BOUND peer-identity carrier (a REF, same family and reason as
1472
1472
  * {@link ownOrgAdmissionRef}: revival replays a spread copy of spawn-time internals, and the axes
1473
1473
  * a run wears are born at different points — a* handle at registration, session/task at prepare's
1474
1474
  * session acquisition). Created at internals assembly (delegation lanes; runtask normalizes one
@@ -1478,7 +1478,7 @@ export interface RunInternals {
1478
1478
  */
1479
1479
  peerSelfRef?: import("../../agents/peer-admission.js").PeerSelfRef;
1480
1480
  /**
1481
- * design/176 — this run's INBOUND peer-chain ref: overwritten at the harness consumption boundary
1481
+ * This run's INBOUND peer-chain ref: overwritten at the harness consumption boundary
1482
1482
  * with the chain of the peer message the model just consumed (enqueue-time writes would leak a
1483
1483
  * not-yet-seen message's chain into outbound sends); seeded by the L3/L4 wake legs; empty
1484
1484
  * otherwise. Not checkpointed in v1 (recorded honest boundary: a cross-process resume forwards
@@ -1486,7 +1486,7 @@ export interface RunInternals {
1486
1486
  */
1487
1487
  peerInboundChainRef?: import("../../agents/peer-admission.js").PeerInboundChainRef;
1488
1488
  /**
1489
- * design/176 — the PARENT run's peer-identity ref, PAIR-MINTED with {@link parentNotify} at every
1489
+ * The PARENT run's peer-identity ref, PAIR-MINTED with {@link parentNotify} at every
1490
1490
  * trust point that binds the uplink callback (spawn assembly, the resume face's replacement): the
1491
1491
  * callback is opaque and the parent AXES deliberately keep the original spawner on the revive arm
1492
1492
  * while the callback points at the WAKER — so the uplink's admission identity can only travel
@@ -1494,7 +1494,7 @@ export interface RunInternals {
1494
1494
  */
1495
1495
  parentPeerRef?: import("../../agents/peer-admission.js").PeerSelfRef;
1496
1496
  /**
1497
- * 🔴 design/97 §H.1 / design/98 §0.1 (BLOCKER3) — the workflow **nesting depth** for this run, a TRUSTED
1497
+ * 🔴 The workflow **nesting depth** for this run, a TRUSTED
1498
1498
  * cross-process channel (worker/script can NEVER set it — it is not a {@link TaskSpec} field nor a
1499
1499
  * `run_workflow` tool param). When a deployment initiates a workflow on behalf of a parent run that is
1500
1500
  * itself inside a workflow (e.g. service's `/v1/workflows`), it threads `workflowDepth = parentDepth + 1`
@@ -1505,7 +1505,7 @@ export interface RunInternals {
1505
1505
  */
1506
1506
  workflowDepth?: number;
1507
1507
  /**
1508
- * #642 — the host's DECISIONS for parked workflow-agent rows (`wa*` rows with `status:"parked"`), a TRUSTED
1508
+ * The host's DECISIONS for parked workflow-agent rows (`wa*` rows with `status:"parked"`), a TRUSTED
1509
1509
  * run channel like `workflowDepth` (never a `TaskSpec` field, never a tool argument — a model cannot decide
1510
1510
  * an approval). A host that decided a workflow child's parked checkpoint launches the run that re-invokes
1511
1511
  * `Workflow({resumeFromRunId})` with the decision here; the Workflow tool applies the entries naming the
@@ -1521,7 +1521,7 @@ export interface RunInternals {
1521
1521
  inheritedGate?: InheritedGate;
1522
1522
  }>;
1523
1523
  /**
1524
- * design/110 — set ONLY by the Agent tool's fork route (`Agent(subagent_type:"fork")`, a core caller) on the
1524
+ * Set ONLY by the Agent tool's fork route (`Agent(subagent_type:"fork")`, a core caller) on the
1525
1525
  * child it spawns: this run IS a forked child. `prepareTask` threads it to tool ctx as `insideFork` so the
1526
1526
  * child's own Agent tool refuses a nested fork (nesting guard — mirrors CC's "fork is not available inside a
1527
1527
  * forked worker"; a fork can still delegate via `Agent`, just not fork again). TRUSTED internal (NOT a
@@ -1529,7 +1529,7 @@ export interface RunInternals {
1529
1529
  */
1530
1530
  insideFork?: boolean;
1531
1531
  /**
1532
- * design/319 (A ticket) — the PARENT's reminder provenance mark, set ONLY by the Agent tool's
1532
+ * The PARENT's reminder provenance mark, set ONLY by the Agent tool's
1533
1533
  * fork route on the child it spawns ("one declaration, one mark": a fork runs under the parent's
1534
1534
  * byte-identical system-prompt declaration, so its own engine mints must carry the PARENT's mark;
1535
1535
  * a spawn/clone context mints its own). Verified through the mint home's verify port at adoption
@@ -1540,7 +1540,7 @@ export interface RunInternals {
1540
1540
  */
1541
1541
  reminderMark?: string;
1542
1542
  /**
1543
- * RB-204 P1 — set UNCONDITIONALLY by every core spawn path (`createSubagentTool`'s
1543
+ * Set UNCONDITIONALLY by every core spawn path (`createSubagentTool`'s
1544
1544
  * `childInternals` — shared by all four spawn legs sync/steer/background/fork, its persisted
1545
1545
  * `internalsSnapshot` for revive, and the workflow orchestrator's `spawnAttribution`), regardless
1546
1546
  * of whether a NAMEABLE `parentTaskId`/`parentToolCallId` exists. A directly-started workflow (no
@@ -1563,7 +1563,7 @@ export interface RunInternals {
1563
1563
  */
1564
1564
  sessionPlacement?: import("../session.js").SessionPlacement;
1565
1565
  /**
1566
- * G1+G2 合车复审修② (1.259.0) — the DEFAULT role-base persona for a DELEGATED child, threaded by
1566
+ * The DEFAULT role-base persona for a DELEGATED child, threaded by
1567
1567
  * `createSubagentTool`'s execute (a core caller) when neither an agent-definition `systemPrompt` nor the
1568
1568
  * delegation tool's `opts.systemPrompt` names one. It sits at the BOTTOM of the role-base chain —
1569
1569
  * `spec.systemPrompt ?? resolvedRole.systemPrompt ?? internals.defaultSystemPrompt` — so a deployment's
@@ -1575,7 +1575,7 @@ export interface RunInternals {
1575
1575
  */
1576
1576
  defaultSystemPrompt?: string;
1577
1577
  /**
1578
- * design/96 §C (S2) — GOAL MODE flag, a TRUSTED internal channel set ONLY by `runGoal` (a core caller),
1578
+ * GOAL MODE flag, a TRUSTED internal channel set ONLY by `runGoal` (a core caller),
1579
1579
  * NEVER a {@link TaskSpec} field. It drives `featureFlags.goalEnabled` → injects `GOAL_COMPLETION_GUIDANCE`.
1580
1580
  * Why internal (not a public `TaskSpec.goalMode`): the guidance promises "declaring done STOPS iteration and
1581
1581
  * surfaces" — a promise only `runGoal`'s loop makes real. A public field would let a caller inject that
@@ -1584,7 +1584,7 @@ export interface RunInternals {
1584
1584
  */
1585
1585
  goalMode?: boolean;
1586
1586
  /**
1587
- * 🔴 design/77 §3 / §7 (ON-前必关) — skill→subagent manifest-scope PROPAGATION. The parent task's
1587
+ * 🔴 Skill→subagent manifest-scope PROPAGATION (must close before ON). The parent task's
1588
1588
  * ACTIVE skill-manifest frames, snapshotted at the moment a subagent was spawned WHILE a manifest scope
1589
1589
  * was live on the parent. The child's {@link prepareTask} seeds its own {@link ActiveSkillScope} from
1590
1590
  * these so the child inherits the parent skill's deny-narrowing — fail-closed and MONOTONIC: a child of
@@ -1592,7 +1592,7 @@ export interface RunInternals {
1592
1592
  * never re-grant a tool/path the parent removed).
1593
1593
  *
1594
1594
  * This is a TRUSTED, run-scoped channel filled ONLY by `createSubagentTool`'s `execute` (a core caller),
1595
- * NEVER a {@link TaskSpec} field (TaskSpec is the untrusted-caller surface — design/44 §7 Q4). It mirrors
1595
+ * NEVER a {@link TaskSpec} field (TaskSpec is the untrusted-caller surface). It mirrors
1596
1596
  * how `repairBundle`/`resume.seed` thread live per-task state the Runner cannot see from `spec`.
1597
1597
  *
1598
1598
  * Fail-closed: when the parent HAD an active manifest at spawn but the precise frames cannot be
@@ -1602,7 +1602,7 @@ export interface RunInternals {
1602
1602
  */
1603
1603
  inheritedManifestScope?: readonly ActiveSkillFrame[];
1604
1604
  /**
1605
- * design/99 §E2 — when this task runs as a SUB-AGENT spawned under a parent task's
1605
+ * When this task runs as a SUB-AGENT spawned under a parent task's
1606
1606
  * tool call, the spawning tool's `ToolExecuteContext.toolCallId`. The Runner stamps it onto this task's
1607
1607
  * stream content events as {@link TaskEvent.parentToolCallId} so a consumer can attribute the child's live
1608
1608
  * content to the delegation subtree WITHOUT core merging the child stream into the parent (lightweight
@@ -1612,18 +1612,18 @@ export interface RunInternals {
1612
1612
  */
1613
1613
  parentToolCallId?: string;
1614
1614
  /**
1615
- * design/99 MF-10 / BC-2 (Service AI [§I 1.5.1]) — a SUBAGENT's human display NAME, threaded at spawn so the
1615
+ * A SUBAGENT's human display NAME, threaded at spawn so the
1616
1616
  * child's `task_progress` ticks carry a readable label (a Fleet child row otherwise shows the raw `taskId`).
1617
1617
  * Filled by `createSubagentTool`'s `execute` = the explicit `taskName`, else the selected agent-type
1618
1618
  * (`AgentDefinition.name`). TRUSTED run-scoped channel (NOT a {@link TaskSpec} field), mirroring
1619
1619
  * `parentToolCallId`. Absent for a top-level run / a bare delegation with neither label — the child's
1620
1620
  * `task_progress` then carries NO `name` (it keeps its taskId; it deliberately does NOT fall back to the raw
1621
- * objective, which could leak a delegated secret — dual-review Q2). Untrusted (`taskName` is model-chosen) →
1621
+ * objective, which could leak a delegated secret). Untrusted (`taskName` is model-chosen) →
1622
1622
  * the consumer sanitizes via `inlineUntrusted` at emit.
1623
1623
  */
1624
1624
  agentName?: string;
1625
1625
  /**
1626
- * design/147 S3 (label-vs-identity): the EXPLICIT `Agent({name})` spawn identity — set
1626
+ * The EXPLICIT `Agent({name})` spawn identity — set
1627
1627
  * ONLY when the spawn carried a `name` parameter, unlike {@link agentName} (a DISPLAY label:
1628
1628
  * description or agent-type, present on nearly every spawn). Teammate semantics (hierarchy clamp,
1629
1629
  * teammate addendum, uplink attribution) key on THIS field; keying on the display label made
@@ -1631,17 +1631,17 @@ export interface RunInternals {
1631
1631
  */
1632
1632
  explicitAgentName?: string;
1633
1633
  /**
1634
- * design/99 (nested-subagent live tree) — the SPAWNING run's taskId, threaded at spawn (from the parent's
1634
+ * The SPAWNING run's taskId, threaded at spawn (from the parent's
1635
1635
  * `ToolExecuteContext.taskId`) so this child's `task_progress` ticks carry `parentTaskId`. Lets a UI build the
1636
1636
  * live nested-agent tree directly (child.parentTaskId === parent.taskId) at any depth. TRUSTED run-scoped
1637
1637
  * channel (NOT a {@link TaskSpec} field), mirroring `parentToolCallId`. Absent for a top-level run.
1638
1638
  */
1639
1639
  parentTaskId?: string;
1640
- /** design/147 S2a — the spawning run's sessionId (paired with parentTaskId; see
1640
+ /** The spawning run's sessionId (paired with parentTaskId; see
1641
1641
  * ToolExecuteContext.parentSessionId). */
1642
1642
  parentSessionId?: string;
1643
1643
  /**
1644
- * design/383 §2.5 — the memory-capture opt-out FLOOR: TRUE ⇔ the spawning session was under an
1644
+ * The memory-capture opt-out FLOOR: TRUE ⇔ the spawning session was under an
1645
1645
  * opt-out when this child spawned. The child then runs opted-out itself (its prepare mints its
1646
1646
  * own one-way record, reason naming the floor) — NOT re-adjudicated against the child's
1647
1647
  * entitlement (the floor is the parent's already-granted opt-out tightening the tree; a
@@ -1653,7 +1653,7 @@ export interface RunInternals {
1653
1653
  */
1654
1654
  memoryCaptureFloor?: true;
1655
1655
  /**
1656
- * design/383 §2.5 (rescan post-6.0.0-RC) — the floor's THIRD state: the spawning session's
1656
+ * The floor's THIRD state: the spawning session's
1657
1657
  * capture state was INDETERMINATE at spawn (its record store faulted at the getter read).
1658
1658
  * Neither boolean is honest there — no floor runs a possibly-recorded lineage captured, a coined
1659
1659
  * floor mints an IRREVERSIBLE record off an unreadable state — so the lane carries the fault
@@ -1663,11 +1663,11 @@ export interface RunInternals {
1663
1663
  * exclusive with it at the spawn site (the floor wins when the state IS known).
1664
1664
  */
1665
1665
  memoryCaptureFloorIndeterminate?: true;
1666
- /** design/383 §2.5 — the spawning session's write-plane control dir (the coordinate its capture
1666
+ /** The spawning session's write-plane control dir (the coordinate its capture
1667
1667
  * opt-out record is keyed under), so a child on a DIFFERENT memory plane can still run the
1668
1668
  * record-query leg against the parent's own carrier. Trusted chain, rides internalsSnapshot. */
1669
1669
  memoryCaptureQueryDir?: string;
1670
- /** design/383 §2.5 (codex round 3) — the ancestor chain's capture coordinates (root first, one
1670
+ /** The ancestor chain's capture coordinates (root first, one
1671
1671
  * row per generation, appended by each spawner's ctx seat). The child's harvest closures walk
1672
1672
  * every row, so a mid-run flip ANYWHERE up the tree suppresses every in-flight descendant.
1673
1673
  * Trusted chain; rides internalsSnapshot. */
@@ -1690,7 +1690,7 @@ export interface RunInternals {
1690
1690
  */
1691
1691
  delegationTaskType?: import("../types.js").DelegationTaskType;
1692
1692
  /**
1693
- * #258 — the registry row's stop-cycle generation this run executes as (fresh spawn = 1, a
1693
+ * The registry row's stop-cycle generation this run executes as (fresh spawn = 1, a
1694
1694
  * revival's bumped counter), threaded by the BACKGROUND delegation lanes from the registry's own
1695
1695
  * `cycleSeq` so every `task_progress` tick the run mints carries it as `seq` (same axis as
1696
1696
  * `TaskNotificationPayload.seq` / `BackgroundChildEvent.seq`). Absent for runs with no `a*` row
@@ -1705,7 +1705,7 @@ export interface RunInternals {
1705
1705
  * "everything under this host session" needs the root anchor, not an alias walk. */
1706
1706
  rootSessionId?: string;
1707
1707
  /**
1708
- * design/380 O1② — the run tree's PLACEMENT root: the fixed point a target-bound env factory keys
1708
+ * The run tree's PLACEMENT root: the fixed point a target-bound env factory keys
1709
1709
  * its placement lookup on ({@link import("../remote-env.js").ExecutionEnvFactoryContext.placementRootSessionId}).
1710
1710
  * A SEPARATE axis from {@link rootSessionId} deliberately: that field means "member of this host
1711
1711
  * session's DELEGATION tree" and is consumed by the registry access/recovery faces — cascade rungs
@@ -1718,15 +1718,14 @@ export interface RunInternals {
1718
1718
  * workflow deps → shared internals base), so every descendant of a placed leg keeps the fixed
1719
1719
  * point; prepare's mint reads it first (`placementRoot ?? rootSessionId ?? sessionId`). Absent
1720
1720
  * everywhere else — the delegation lanes' `rootSessionId` fixed point then becomes the placement
1721
- * root through the middle segment, unchanged. DURABLE since design/380 O1③ (the former C12
1722
- * residual, fulfilled): the suspend mint stamps the resolved fixed point as
1721
+ * root through the middle segment, unchanged. DURABLE: the suspend mint stamps the resolved fixed point as
1723
1722
  * `CheckpointState.placementRootSessionId`, and a bare durable resume restores it into this
1724
1723
  * member (live internals win when re-supplied; a CONTRADICTING re-supply refuses pre-CAS,
1725
1724
  * `resume.placement_mismatch`). TRUSTED run-scoped channel (never a {@link TaskSpec} field).
1726
1725
  */
1727
1726
  placementRoot?: string;
1728
1727
  /**
1729
- * RB-429 — the REGISTRY SCOPE this run's own background row lives in: the domain its registry-facing
1728
+ * The REGISTRY SCOPE this run's own background row lives in: the domain its registry-facing
1730
1729
  * tools (TaskOutput / TaskStop / SendMessage / AgentTranscript / Monitor, and the announce listing)
1731
1730
  * must mount in to see it. Filled by the delegation tool at spawn, which is the party that CHOSE the
1732
1731
  * domain when it registered the row — `ctx.principal` when the spawning run has one, else the
@@ -1737,17 +1736,17 @@ export interface RunInternals {
1737
1736
  * with no principal at all, and `principal ?? "default"` sends every one of its registry-facing tools
1738
1737
  * to a domain the row is not in — scope is fail-closed on both access predicates, so such a child
1739
1738
  * cannot see its own row, its siblings, or the children it spawns. Carrying the domain as its own
1740
- * trusted axis keeps `principal` the design/62 IDENTITY it is: the identity also keys the durable
1739
+ * trusted axis keeps `principal` the IDENTITY it is: the identity also keys the durable
1741
1740
  * approval / checkpoint namespace (`checkpointScopeOf`), the runtime-capability lookup and the MCP
1742
1741
  * principal header, and a mount's registry scope has no business moving any of those (an unattended
1743
- * safety park must not migrate into the caller's opt-in approval bucket — design/153 §7.4).
1742
+ * safety park must not migrate into the caller's opt-in approval bucket).
1744
1743
  *
1745
1744
  * TRUSTED channel (never a {@link TaskSpec} field, never a model argument), like the parentage axes
1746
1745
  * above. When a deployment sets both, they agree by construction: with a principal present the
1747
1746
  * delegation tool resolves this axis TO that principal.
1748
1747
  */
1749
1748
  registryScope?: string;
1750
- /** design/148 S1 — the spawning run's ADOPTED center artifact, threaded down the
1749
+ /** The spawning run's ADOPTED center artifact, threaded down the
1751
1750
  * trusted internals chain so every child in the tree composes the SAME closure (a child must
1752
1751
  * never spontaneously adopt the live candidate while its parent runs an older pin — that is the
1753
1752
  * exact mixed-version state the epoch exists to prevent). Resolved by-digest through the
@@ -1758,38 +1757,38 @@ export interface RunInternals {
1758
1757
  /** R2 双形轴 — parent's resolved prompt profile, inherited unless the child spec overrides. */
1759
1758
  promptProfile?: "simple" | "classic";
1760
1759
  /**
1761
- * design/99 (nested-subagent live tree) — an OPT-IN, DISPLAY-ONLY event sink a deployment sets on the TOP run to
1760
+ * An OPT-IN, DISPLAY-ONLY event sink a deployment sets on the TOP run to
1762
1761
  * receive a subagent's live `task_progress` ticks (which otherwise stay in the child's ISOLATED stream). Threaded
1763
1762
  * recursively down the delegation tree (via `ctx.forwardEvent`), so every nested subagent's ticks bubble to the
1764
1763
  * SAME sink. The Runner's ctx wrapper forwards `task_progress` always; when the run's spec sets
1765
- * `forwardSubagentEvents: true` it ALSO forwards the child's content events (`text_delta` / `text_end` (#447) /
1764
+ * `forwardSubagentEvents: true` it ALSO forwards the child's content events (`text_delta` / `text_end` /
1766
1765
  * `reasoning_delta` / `tool_start` / `tool_end` — the subagent viewing pane, carrying the same UNTRUSTED-RAW/consumer-must-redact
1767
1766
  * contract as the main stream's tool events). Either way the child stream is NEVER merged into the parent's
1768
1767
  * MODEL context (this is purely a render channel). Absent unless the deployment opted in.
1769
1768
  */
1770
1769
  onForwardEvent?: (event: TaskEvent) => void;
1771
1770
  /**
1772
- * #253 — the run's OWN top-level `status` TaskEvent stream (brain liveness: rate-limit/retry/
1771
+ * The run's OWN top-level `status` TaskEvent stream (brain liveness: rate-limit/retry/
1773
1772
  * reconnect/circuit-open), offered to the internals holder beside the queue. The queue alone was
1774
1773
  * enough for a direct `runTask` caller (the TaskStream carries these frames), but a COMPOSITION
1775
1774
  * entry (verify/cascade) drains its inner legs' queues itself — without this seat, an inner leg's
1776
1775
  * retry disclosure died inside the gate and the wire showed a silent stall. Fed the SAME frame
1777
- * object the queue receives, at the same moment; contained by the run's safe notifier (#248 form:
1778
- * a throwing sink is swallowed, first failure per site disclosed, never faults the leg). Subagent
1776
+ * object the queue receives, at the same moment; contained by the run's safe notifier (a throwing
1777
+ * sink is swallowed, first failure per site disclosed, never faults the leg). Subagent
1779
1778
  * frames still ride {@link onForwardEvent} — this seat is ONLY the run's own status type.
1780
1779
  */
1781
1780
  onStatusEvent?: (event: Extract<TaskEvent, {
1782
1781
  type: "status";
1783
1782
  }>) => void;
1784
1783
  /**
1785
- * design/115 P2 core slice — trusted run-local system-injection sink. `Runner.runLocked` wires this to the
1784
+ * Trusted run-local system-injection sink. `Runner.runLocked` wires this to the
1786
1785
  * live TaskStream queue plus the current harness follow-up lane; it is not a public TaskSpec field.
1787
1786
  */
1788
- /** design/116 detach: the run-local per-tool-call detach hub. runtask creates it and exposes
1787
+ /** The run-local per-tool-call detach hub. runtask creates it and exposes
1789
1788
  * `TaskStream.detach(toolCallId)`; the hands Bash tool threads `signalFor(toolCallId)` into env.exec. */
1790
1789
  detachHub?: import("../tool-detach.js").ToolDetachHub;
1791
1790
  /**
1792
- * #483 rung-1 — the Runner's per-session read-file-state seats (CC parity: readFileState is
1791
+ * The Runner's per-session read-file-state seats (CC parity: readFileState is
1793
1792
  * session-scoped). Always set by the Runner's own prepare call (overriding any caller value, like
1794
1793
  * the peer refs beside it); absent on a standalone prepareTask, where the transcript-replay rung
1795
1794
  * covers alone. A CACHE, never an authority — see {@link SessionReadFileStates}. Trusted internals
@@ -1797,7 +1796,7 @@ export interface RunInternals {
1797
1796
  */
1798
1797
  sessionReadStates?: SessionReadFileStates;
1799
1798
  onTaskNotification?: (notification: TaskNotificationPayload,
1800
- /** Injection tier (design/373 — the ladder is LIVE): "next" = the running turn's next boundary
1799
+ /** Injection tier (the ladder is LIVE): "next" = the running turn's next boundary
1801
1800
  * (arrival order, consecutive frames batch); "later" = the run's would-otherwise-stop seat
1802
1801
  * (never folded into work in progress); "now" = class-head + earliest natural boundary on this
1803
1802
  * lane (interrupt authority belongs to the steer face, never to notifications). Internal
@@ -1807,7 +1806,7 @@ export interface RunInternals {
1807
1806
  priority?: import("../task-notification.js").SystemInjectionPriority;
1808
1807
  }) => void;
1809
1808
  /**
1810
- * design/147 S1a — the PARENT run's notification injector (its runtask-wrapped
1809
+ * The PARENT run's notification injector (its runtask-wrapped
1811
1810
  * `injectTaskNotification`), threaded into a CHILD's internals at spawn time so the child's
1812
1811
  * SendMessage("main") uplink lands in the parent's queue at a turn boundary (the CC
1813
1812
  * "delivered automatically" parent half). DELIBERATELY a separate field from
@@ -1819,14 +1818,14 @@ export interface RunInternals {
1819
1818
  priority?: import("../task-notification.js").SystemInjectionPriority;
1820
1819
  }) => void;
1821
1820
  /**
1822
- * design/147 S3a — the PARENT run's subagent-retain ledger, threaded to a CHILD so its
1821
+ * The PARENT run's subagent-retain ledger, threaded to a CHILD so its
1823
1822
  * SendMessage can continue a RETAINED SIBLING (the sibling's retain entry lives on the parent's
1824
1823
  * ledger — without this, sibling resolution succeeds but delivery always reads not-retained).
1825
1824
  * TRUSTED chain; read-only use (the sibling leg resumes through the same fenced resume face).
1826
1825
  */
1827
1826
  parentRetainLedger?: import("../../agents/retain-ledger.js").SubagentRetainLedger;
1828
1827
  /**
1829
- * design/147 S2a — hands THIS run's notification injector back to the SPAWNER once the lane is
1828
+ * Hands THIS run's notification injector back to the SPAWNER once the lane is
1830
1829
  * live (runtask calls it with its wrapped `injectTaskNotification`). The spawner stores it on the
1831
1830
  * child's registry handle so a parent/sibling SendMessage can deliver TO the RUNNING child at its
1832
1831
  * next turn boundary (CC's in-memory `pendingMessages` pedestal, anchors/2.1.212
@@ -1839,9 +1838,9 @@ export interface RunInternals {
1839
1838
  priority?: import("../task-notification.js").SystemInjectionPriority;
1840
1839
  }) => Promise<"queued" | "parked" | "dropped_duplicate">) => void;
1841
1840
  /**
1842
- * design/97 CORE-6 — per-task ISOLATION hint, a TRUSTED run-scoped channel filled ONLY by a core caller
1841
+ * Per-task ISOLATION hint, a TRUSTED run-scoped channel filled ONLY by a core caller
1843
1842
  * (the workflow's `ctx.agent` when the SCRIPT passed `{ isolation: "worktree" }` as an OPTION) — NEVER a
1844
- * {@link TaskSpec} field (the untrusted-caller surface, design/44 §7 Q4). Forwarded to
1843
+ * {@link TaskSpec} field (the untrusted-caller surface). Forwarded to
1845
1844
  * {@link ExecutionEnvFactory} via {@link ExecutionEnvFactoryContext.isolation} so the trusted control-plane
1846
1845
  * factory mints a git-worktree-rooted env for this agent; and it makes root resolution use the worktree
1847
1846
  * env's own cwd (the worktree dir), bypassing `deps.rootPath`. Isolate-ONLY: the runtime never merges
@@ -1894,26 +1893,26 @@ export interface RunInternals {
1894
1893
  * into the running child (fenced-marker semantics matching the workflow agent handle). Threaded to
1895
1894
  * the tool ctx as {@link ToolExecuteContext.onSubagentSpawn} and recursively down the delegation
1896
1895
  * tree. Absent ⇒ children run non-steerable (prior behavior, zero overhead).
1897
- * SCOPE (fable impl-review F3, recorded): only SYNC delegations emit a handle — a
1896
+ * SCOPE: only SYNC delegations emit a handle — a
1898
1897
  * `run_in_background` child does not (poll/stop it via TaskOutput/TaskStop); wiring the background
1899
1898
  * lane is a recorded follow-up, not an oversight a deployment should discover at runtime.
1900
1899
  */
1901
1900
  onSubagentSpawn?: (handle: import("../../agents/subagent.js").SubagentSteerHandle) => void;
1902
1901
  /**
1903
- * design/97 CORE-8 (③) — a TRUSTED run-scoped tool-ACTIVITY sink, filled ONLY by a core caller (the workflow's
1902
+ * A TRUSTED run-scoped tool-ACTIVITY sink, filled ONLY by a core caller (the workflow's
1904
1903
  * `ctx.agent`, to render a per-agent "last N tool calls" drill-down). Called synchronously at each tool start +
1905
1904
  * end with structural data (name/phase/ids) — NEVER args/output (those carry untrusted/host data). NEVER a
1906
1905
  * {@link TaskSpec} field. Absent ⇒ no activity capture (default).
1907
1906
  *
1908
1907
  * Reaches activity on FRESH and RESUMED runs alike — the durable-resume entry (`resumeStream`) threads
1909
1908
  * `internals` too (see its parent-constraint re-supply snapshot), so a resumed leg's SUBSEQUENT tool calls
1910
- * hit this sink. One real boundary remains (#249): the resume's already-approved pending call itself is
1909
+ * hit this sink. One real boundary remains: the resume's already-approved pending call itself is
1911
1910
  * executed by `applyResumeDecision`'s own callback, outside the frame-minting harness, so THAT one call
1912
1911
  * emits no activity.
1913
1912
  */
1914
1913
  onActivity?: (activity: ToolActivity) => void;
1915
1914
  /**
1916
- * RB-393① — a TRUSTED run-scoped WORKSPACE-observation sink, filled ONLY by a core caller
1915
+ * A TRUSTED run-scoped WORKSPACE-observation sink, filled ONLY by a core caller
1917
1916
  * (the workflow's `ctx.agent` / `ctx.agentStream`, to record an isolated agent's worktree directory on the
1918
1917
  * persisted run record). NEVER a {@link TaskSpec} field — same posture as {@link onActivity}.
1919
1918
  *
@@ -1934,7 +1933,7 @@ export interface RunInternals {
1934
1933
  onWorkspaceResolved?: (workspace: ResolvedWorkspace) => void;
1935
1934
  }
1936
1935
  /**
1937
- * RB-393① — the payload of {@link RunInternals.onWorkspaceResolved}: the working root this task actually
1936
+ * The payload of {@link RunInternals.onWorkspaceResolved}: the working root this task actually
1938
1937
  * runs on, plus whether that root is the task's OWN isolated workspace.
1939
1938
  *
1940
1939
  * `isolated: true` means "`cwd` is this agent's own git worktree": it is reported only when
@@ -1948,14 +1947,14 @@ export interface ResolvedWorkspace {
1948
1947
  cwd: string;
1949
1948
  /** True only for an accepted `isolation: "worktree"` request (⇒ `cwd` is this agent's own worktree). */
1950
1949
  isolated: boolean;
1951
- /** True when the task's execution env is REMOTE (#197 BGW-7): `cwd` then names a path INSIDE the remote
1950
+ /** True when the task's execution env is REMOTE: `cwd` then names a path INSIDE the remote
1952
1951
  * target (a per-task sandbox on the shape-(d) exemption leg, e.g. `/workspace`), which does not exist —
1953
1952
  * or names an unrelated directory — on the host. `isolated && !remote` is the only combination under
1954
1953
  * which `cwd` is a host path a consumer may diff / merge / remove. */
1955
1954
  remote: boolean;
1956
1955
  }
1957
1956
  /**
1958
- * #457 ② — the resolver's answer, with the WITHHELD cause beside the value.
1957
+ * The resolver's answer, with the WITHHELD cause beside the value.
1959
1958
  *
1960
1959
  * The old signature returned a bare `unknown`, which collapsed three different worlds into one
1961
1960
  * `undefined`: "this tool declares no preview at all", "the projection threw / could not be
@@ -2037,23 +2036,23 @@ export interface SuspendSaga {
2037
2036
  * "the park lane's closures exist" is one fact; `suspendAsk` stays optional INSIDE it because the park predicate (a store,
2038
2037
  * and something to park for) is a narrower condition than the gate machinery's activation. */
2039
2038
  export interface ParkAsk {
2040
- /** design/174 — the gate's content-ask routing closure (total by construction; answers `unavailable` with no live face). */
2039
+ /** The gate's content-ask routing closure (total by construction; answers `unavailable` with no live face). */
2041
2040
  resolveContentAsk: NonNullable<ToolGateInput["resolveContentAsk"]>;
2042
- /** design/45 — the durable park closure (twelve positional seats then the structural carry), or undefined when the park
2041
+ /** The durable park closure (twelve positional seats then the structural carry), or undefined when the park
2043
2042
  * lane is not armed (the gate then keeps the synchronous onAsk path). */
2044
2043
  suspendAsk: ToolGateInput["suspendAsk"];
2045
2044
  }
2046
2045
  /**
2047
- * design/157 B15 二期 — `runLocked`'s per-run mutable state, EXPLICIT. These fields started as loose
2046
+ * `runLocked`'s per-run mutable state, EXPLICIT. These fields started as loose
2048
2047
  * `let`/`const` bindings in the R2 declaration hub; the extraction kept every assignment at its
2049
2048
  * original site and order (binding-form-only rewrite — the event-snapshot pin held the run
2050
2049
  * byte-identical), and later work has since added fields directly here (see the per-field notes).
2051
2050
  * Grouped by lifecycle semantics per the B15 pre-recon partition. Function members start as inert
2052
2051
  * placeholders and are assigned at their ORIGINAL declaration sites (the original code could not
2053
2052
  * call them earlier either — TDZ proved it). Not on the npm face; this extraction is what enabled
2054
- * createTurnBoundary / createHarnessHandlers (三期; both are run lanes of their own since design/393 S2).
2053
+ * createTurnBoundary / createHarnessHandlers (both are run lanes of their own).
2055
2054
  *
2056
- * WRITERS, by group (design/393 S5 — the driver mints the zero value, initial-run-state.ts, and hands it to every
2055
+ * WRITERS, by group (the driver mints the zero value, initial-run-state.ts, and hands it to every
2057
2056
  * lane as a borrowed-mutable seat): `telemetry` / `degrade` / `limits` / `budget` initial values and function
2058
2057
  * members — the telemetry-and-budget-seats lane; `counters` / `attach` initial values — the attachment-seats lane
2059
2058
  * (the clock lane zeroes `counters.walltimeSyncBackstopFired`; the tool-mount facts only read); the per-turn writes — the harness-handlers lane
@@ -2064,20 +2063,20 @@ export interface RunState {
2064
2063
  telemetry: {
2065
2064
  cacheFamily: ReturnType<typeof cacheFamilyOf>;
2066
2065
  pricing: ModelPricing;
2067
- /** RB-368 ([2076]): whether the CURRENT serving model has a configured price table (a
2068
- * `RunnerDeps.pricing` entry or a `Model.cost` declaration). When neither exists,
2069
- * `modelCostToPricing(undefined)` yields an all-zero table and every computed cost is a
2070
- * fabricated 0 — indistinguishable from "declared free". This flag keeps the two apart so
2071
- * the DISCLOSURE faces (trace frames, public stats) can go absent instead of lying; the
2072
- * internal budget coordinate (`stats.costMicroUsd`) stays numeric either way. */
2066
+ /** Whether the CURRENT serving model has a configured price table (a
2067
+ * `RunnerDeps.pricing` entry or a `Model.cost` declaration). When neither exists,
2068
+ * `modelCostToPricing(undefined)` yields an all-zero table and every computed cost is a
2069
+ * fabricated 0 — indistinguishable from "declared free". This flag keeps the two apart so
2070
+ * the DISCLOSURE faces (trace frames, public stats) can go absent instead of lying; the
2071
+ * internal budget coordinate (`stats.costMicroUsd`) stays numeric either way. */
2073
2072
  pricingConfigured: boolean;
2074
- /** RB-368: sticky — some spend was ACCOUNTED while `pricingConfigured` was false (a mid-task
2073
+ /** Sticky — some spend was ACCOUNTED while `pricingConfigured` was false (a mid-task
2075
2074
  * model switch can flip pricedness, so per-call state isn't enough for the task total). Once
2076
2075
  * true, the task-level cost total is an undercount and its faces are omitted. */
2077
2076
  unpricedSpend: boolean;
2078
2077
  tracer: TaskSpec["tracer"];
2079
2078
  taskId: string;
2080
- /** #499 — the run's engine-minted identity, so the task.start/task.end pair carries it from ONE
2079
+ /** The run's engine-minted identity, so the task.start/task.end pair carries it from ONE
2081
2080
  * seat (the same place taskId is published). Empty only before the run body assigns it. */
2082
2081
  runId: string;
2083
2082
  taskStart: number;
@@ -2094,11 +2093,11 @@ export interface RunState {
2094
2093
  limits: {
2095
2094
  turnsExceeded: boolean;
2096
2095
  budgetHit: "exceeded" | "precall" | undefined;
2097
- /** design/164 — WHICH budget axis tripped, set at the same instant as {@link budgetHit} so the
2096
+ /** WHICH budget axis tripped, set at the same instant as {@link budgetHit} so the
2098
2097
  * terminal can name it (`limits.max_tokens_exceeded` vs `limits.max_cost_exceeded`). Tokens
2099
2098
  * outrank cost when both are over at the same boundary (the documented attribution order). */
2100
2099
  budgetAxis: BudgetAxis | undefined;
2101
- /** design/164 件四/件五 — the TYPED terminal an EXTERNAL cause (a dying execution environment, an
2100
+ /** The TYPED terminal an EXTERNAL cause (a dying execution environment, an
2102
2101
  * exhausted governance window) recorded when it could not suspend the run durably. Set together with
2103
2102
  * the abort it triggers, and adopted as the run's `threw` once the loop settles, so the caller gets
2104
2103
  * `env.lifetime_expired` / `usage.window_exhausted` instead of the anonymous error an abort produces.
@@ -2114,7 +2113,7 @@ export interface RunState {
2114
2113
  budget: {
2115
2114
  remainingMicroUsd: number | undefined;
2116
2115
  maxCostMicroUsd: number | undefined;
2117
- /** design/164 — tokens still available on the cross-slice allocation (`resourceSuspend.totalTokens`
2116
+ /** Tokens still available on the cross-slice allocation (`resourceSuspend.totalTokens`
2118
2117
  * minus everything earlier slices spent), or `undefined` when no total is set. */
2119
2118
  remainingTokens: number | undefined;
2120
2119
  /** This slice's EFFECTIVE token ceiling = `min(limits.maxTokens, remainingTokens)`. The exact mirror
@@ -2142,11 +2141,11 @@ export interface RunState {
2142
2141
  turnUsageMissing: boolean;
2143
2142
  turnStopReason: string | undefined;
2144
2143
  lastTurnHadToolCalls: boolean;
2145
- /** B15 三期使能:design/134 §3.1b postToolBatch 的本回合聚集批(每回合边界消费并重置 — 回合语义,故归 turn)。 */
2144
+ /** B15 三期使能:postToolBatch 的本回合聚集批(每回合边界消费并重置 — 回合语义,故归 turn)。 */
2146
2145
  toolBatch: PostToolBatchCall[];
2147
2146
  };
2148
2147
  counters: {
2149
- /** design/164 — how many LIMIT-APPROACH frames have been injected this run (0..2). Also the
2148
+ /** How many LIMIT-APPROACH frames have been injected this run (0..2). Also the
2150
2149
  * one-shot latch itself: each frame fires when the count is still below its index. */
2151
2150
  approachNoticesSent: number;
2152
2151
  /** B15 三期使能:R9 引用的 R3/压缩区 latch(walltime 收尾 latch — preemptIgnoredReported 同族)。 */
@@ -2184,7 +2183,7 @@ export interface RunState {
2184
2183
  instrState: {
2185
2184
  lastAnnouncedHash: Map<string, string | null>;
2186
2185
  } | undefined;
2187
- /** #20 lane — the Workflow tool card's advisory size guideline as last ANNOUNCED to the model,
2186
+ /** The Workflow tool card's advisory size guideline as last ANNOUNCED to the model,
2188
2187
  * plus the live boundary-time read (Prepared.workflowSizeGuideline). Same deliberate posture as
2189
2188
  * `dateState`/`instrState`: NOT an AttachmentState member, one field, zero reducers. */
2190
2189
  sizeGuidelineState: {
@@ -2195,7 +2194,7 @@ export interface RunState {
2195
2194
  attachmentsInjected: number;
2196
2195
  };
2197
2196
  }
2198
- /** design/171 §6.3 parity, LIVE leg — one accepted live steer's REPLAY identity, the twin of the parked
2197
+ /** One accepted live steer's REPLAY identity, the twin of the parked
2199
2198
  * queue's `samePendingSteerPayload`. `payload` is the exact string handed to the harness, so the text,
2200
2199
  * the speaker envelope and the trust framing all fold into it; `trusted` is kept SEPARATELY from those
2201
2200
  * framed bytes so a text that spells its own `<system-reminder>` wrapper can never read as the trusted
@@ -2203,7 +2202,7 @@ export interface RunState {
2203
2202
  export interface AcceptedSteerInput {
2204
2203
  payload: string;
2205
2204
  trusted: boolean;
2206
- /** design/373 (R2-F3) — the NORMALIZED priority the call delivered under (absent input ⇒ "next"),
2205
+ /** The NORMALIZED priority the call delivered under (absent input ⇒ "next"),
2207
2206
  * the replay identity's sixth axis: same id + same text at a DIFFERENT tier is not a replay —
2208
2207
  * a `next` input re-sent as `now` answering "idempotent success" without the interrupt would be
2209
2208
  * a disposition lie, so it refuses `duplicate_input_id` like any other identity mismatch. */
@@ -2211,18 +2210,18 @@ export interface AcceptedSteerInput {
2211
2210
  actor?: ActorAssertion;
2212
2211
  }
2213
2212
  /**
2214
- * Config re-supplied to {@link Runner.resume} (design/45). A suspended task's tools / model / policy /
2213
+ * Config re-supplied to {@link Runner.resume}. A suspended task's tools / model / policy /
2215
2214
  * hooks cannot be reconstructed from a checkpoint token (the session stores neither tool implementations
2216
2215
  * nor the hand band), so the caller's trusted control plane re-supplies the same {@link TaskSpec} it ran
2217
2216
  * with — minus the conversation bits: `sessionId` comes from the checkpoint and `objective` is replaced by
2218
2217
  * an internally-generated continuation, so both are omitted.
2219
2218
  */
2220
2219
  export type ResumeTaskConfig = Omit<TaskSpec, "objective" | "sessionId">;
2221
- /** design/45 resume plan threaded from {@link Runner.resume} into the shared run loop. */
2220
+ /** Resume plan threaded from {@link Runner.resume} into the shared run loop. */
2222
2221
  export interface ResumeRun {
2223
2222
  cp: Checkpoint;
2224
2223
  /**
2225
- * RB-152 (2026-07-25, 按面收口): did the APPROVED ACTION actually begin executing?
2224
+ * Did the APPROVED ACTION actually begin executing?
2226
2225
  *
2227
2226
  * The reopen compensation used to key on an error-code whitelist (`resume.env_failed` /
2228
2227
  * `resume.session_not_found` / `resume.tool_unavailable`). That is a proxy for the thing that actually
@@ -2230,7 +2229,7 @@ export interface ResumeRun {
2230
2229
  * know about it: a caller's abort landing anywhere between the CAS and `tool.execute` — across
2231
2230
  * `SessionStore.acquire` (pluggable, cross-network on a durable backend), the MCP reconnect, the env
2232
2231
  * rebuild, `resumeVM`, tool materialization — produced a `failed` result with NO errorCode, no reopen,
2233
- * and a human approval consumed for work that never happened. Two rounds of fixes (RB-77, RB-109) each
2232
+ * and a human approval consumed for work that never happened. Two rounds of fixes each
2234
2233
  * moved that window rather than closing it, because both extended the whitelist.
2235
2234
  *
2236
2235
  * This binds the compensation to the FACT instead: set the instant before `tool.execute` for the gated
@@ -2239,33 +2238,33 @@ export interface ResumeRun {
2239
2238
  */
2240
2239
  pendingActionStarted?: boolean;
2241
2240
  /** Validated against `cp.gate.kind` at the resume entry: human/irreversible_ask→`policy_ask`,
2242
- * resource_limit→`resource_limit` (design/74), needs_review→`dry_run_review` (design/76 §2.5),
2243
- * plan_review→`plan_review` (design/80 D-B). The gate-match guard in `resumeStream` enforces the
2244
- * correlation. design/144 §3: `wake` is the NON-GATE arm — only a checkpoint awaiting NO gate
2241
+ * resource_limit→`resource_limit`, needs_review→`dry_run_review`,
2242
+ * plan_review→`plan_review`. The gate-match guard in `resumeStream` enforces the
2243
+ * correlation. `wake` is the NON-GATE arm — only a checkpoint awaiting NO gate
2245
2244
  * decision passes the resume entry with it (gate purity, `wake.gate_pending`); the run loop skips
2246
2245
  * `applyResumeDecision` for it (no pending action to resolve) and re-enters via the continuation +
2247
2246
  * pendingSteer tail alone. */
2248
2247
  outcome: Extract<ResumeOutcome, {
2249
2248
  gate: "policy_ask" | "resource_limit" | "dry_run_review" | "plan_review" | "wake";
2250
2249
  }>;
2251
- /** design/144 §3 (X5) — the wake's own operator message, validated (`validatePendingSteer`) at the
2250
+ /** The wake's own operator message, validated (`validatePendingSteer`) at the
2252
2251
  * resume entry and carried SEPARATELY from the checkpoint's parked `pendingSteer`: a message-bearing
2253
2252
  * wake of a checkpoint that ALSO holds a parked steer must deliver BOTH (park order: parked first,
2254
2253
  * wake message second), each under its own trusted framing — the old merge-into-the-slot shape
2255
2254
  * silently DISPLACED the parked (undelivered) supervisor steer. Wake outcomes only. */
2256
2255
  wakeMessage?: Omit<PendingSteerEntry, "seq">;
2257
- /** design/373 §4.3 (D2) — the userPromptSubmit screen's `additionalContext` for {@link wakeMessage},
2256
+ /** The userPromptSubmit screen's `additionalContext` for {@link wakeMessage},
2258
2257
  * captured at the resume ENTRY (the message is screened once, pre-CAS, on the resuming process's
2259
2258
  * hook) and delivered by the drain as the engine's own reminder AHEAD of the wake frame — carrying
2260
2259
  * it forward is what keeps the hook single-run (re-screening at the drain would be the double-run
2261
2260
  * §4.3-3 reserves for the cross-process parked leg). Present only when a wake message passed a
2262
2261
  * screen that supplied context. */
2263
2262
  wakeMessageHookContext?: string;
2264
- /** Compensation hook (design/45/49): called iff the resumed run fails with `resume.env_failed` (post-CAS
2263
+ /** Compensation hook: called iff the resumed run fails with `resume.env_failed` (post-CAS
2265
2264
  * workspace `resumeVM` failed) OR `resume.tool_unavailable` (P-7: the approved tool vanished) — in both
2266
2265
  * the CAS already consumed the checkpoint but the pending action never ran. `resumeStream` supplies a
2267
2266
  * closure that reopens the checkpoint (`resolved → pending`) so a retry re-resumes the SAME suspended work
2268
- * instead of losing it to a forced "re-initiate". design/80 D-1 (reopen-by-reason): the `reason` is
2267
+ * instead of losing it to a forced "re-initiate" (reopen-by-reason): the `reason` is
2269
2268
  * recorded on the reopened row so the next re-resume validates per reason — an `env_failed` reopen must
2270
2269
  * replay the persisted winner (a system retry of the approved action), while a `tool_unavailable` reopen
2271
2270
  * lets a human re-decide with the tool present (a fresh decision is allowed — preserves P-7). */
@@ -2279,16 +2278,16 @@ export interface ResumeRun {
2279
2278
  * allowed). The word it answers is read through `EXECUTION_RECORD_LEAVES_ROW_UNRECORDED`; a
2280
2279
  * conflict throw propagates (an engine defect, not a store condition). */
2281
2280
  recordExecutionOutcome: (gate: import("../gate-outcome.js").GateOutcome) => Promise<ExecutionOutcomeRecordWord>;
2282
- /** RB-471/FR-C1 — set in the run body right after `applyResumeDecision` completes: the negative-
2281
+ /** Set in the run body right after `applyResumeDecision` completes: the negative-
2283
2282
  * decision twin of `pendingActionStarted`. A reject/deny consumes its gate BY BEING DELIVERED, and
2284
2283
  * this bit is the delivery fact — every throw-arm cause (prepare failure, `session_not_found`, a
2285
2284
  * pre-delivery abort) and the walltime-exhausted settle fire BEFORE it is set, so an undelivered
2286
2285
  * negative decision still reopens as `env_failed` (the retry replays the persisted decision; it
2287
- * never re-asks — design/80 D-1), closing the RB-152/RB-70 loss class the first RB-471 cut reopened. */
2286
+ * never re-asks), closing the loss class the first cut reopened. */
2288
2287
  decisionDelivered?: boolean;
2289
2288
  }
2290
2289
  /**
2291
- * What {@link TaskStream.destroy} needs to reap a SUSPENDED task (design/51 §4). Captured (stashed) onto
2290
+ * What {@link TaskStream.destroy} needs to reap a SUSPENDED task. Captured (stashed) onto
2292
2291
  * the stream handle the moment a run assembles `status:"suspended"` — `finish()` deliberately left the
2293
2292
  * paused env + committed checkpoint alive for resume, so without this stash they'd be unreachable (the
2294
2293
  * `Prepared`, and its `ownedEnv`, are GC'd once the run promise settles). `env` is `undefined` for a
@@ -2305,7 +2304,7 @@ export interface SuspendReap {
2305
2304
  }
2306
2305
  /** B15 三期终件 — R9(回合边界全域:压缩/attachments 注入/提醒节律/预算判决)工厂。
2307
2306
  * 正文自 runLocked 逐字搬迁(this 面经 runnerHooks 闭包打包,B13 #coreView 同款);模块级符号
2308
- * 同文件直见不经 deps;可变运行态全在 rs(B15 二期+使能车),deps 全部为 const 稳定引用。 */
2307
+ * 同文件直见不经 deps;可变运行态全在 rs(B15 二期),deps 全部为 const 稳定引用。 */
2309
2308
  export interface TurnBoundaryDeps {
2310
2309
  spec: TaskSpec;
2311
2310
  queue: PushQueue<TaskEvent>;
@@ -2353,10 +2352,10 @@ export interface TurnBoundaryDeps {
2353
2352
  };
2354
2353
  /** The Runner's deployment deps, read LIVE ({@link RunnerDepsSeat}): the compaction seams (compaction-seams.ts) the
2355
2354
  * boundary's compaction pass reaches down for read the summary provider, the hooks slot and the error sink through it
2356
- * on every pass — the three Runner methods that used to sit on `runnerHooks` as delegates (design/393 S7). */
2355
+ * on every pass — the three Runner methods that used to sit on `runnerHooks` as delegates. */
2357
2356
  runner: RunnerDepsSeat;
2358
2357
  }
2359
- /** design/157 B15 尾件 — R5(harness 事件处理器族)的依赖包。全部为 runLocked 内声明顺序早于
2358
+ /** R5(harness 事件处理器族)的依赖包。全部为 runLocked 内声明顺序早于
2360
2359
  * 工厂调用点的 const 稳定引用 + 三个 runLocked 形参;this 面(deps.onError)经 runnerHooks 打包
2361
2360
  * (B13 #coreView / R9 TurnBoundaryDeps 同款)。*/
2362
2361
  export interface HarnessHandlersDeps {
@@ -2440,7 +2439,7 @@ export interface RunnerSelfSeat {
2440
2439
  resumeStream(token: CheckpointToken, outcome: ResumeOutcome, taskConfig: ResumeTaskConfig, internals?: RunInternals): Promise<TaskStream>;
2441
2440
  }
2442
2441
  /**
2443
- * design/393 S7 (#675) — the orchestrator's entry (`prepareTask`, prepare-task.ts) as ONE contract: the notification lane's
2442
+ * The orchestrator's entry (`prepareTask`, prepare-task.ts) as ONE contract: the notification lane's
2444
2443
  * `prepareTask` seat names it, and the orchestrator pins its own declaration against it (`PrepareTaskIsTheContract`), so a
2445
2444
  * signature change reds at the declaration — not at the driver's hand-in, and not as a seat spelled a second time. It lives
2446
2445
  * on the floor because a lane may not name the orchestrator (docs/LAYERING.json: layer 4 sits above the lanes). Positional,
@@ -2450,10 +2449,10 @@ export type PrepareTaskFn = (spec: TaskSpec, deps: RunnerDeps, sessions: Session
2450
2449
  runId?: string;
2451
2450
  }) => Promise<Prepared>;
2452
2451
  /**
2453
- * design/393 S7 (#670) — the Result of an INSTALLING phase: a lane whose every product is installed on a seat it borrowed
2452
+ * The Result of an INSTALLING phase: a lane whose every product is installed on a seat it borrowed
2454
2453
  * (the harness's stop gate and recovery chain, the run state's counter groups, the stream's result setter, the claimed
2455
2454
  * row's registries) hands nothing back, and says so by extending this marker. The marker is machine-read by gate:phase-api
2456
- * (design/238 R-1's third clause): a Result with no members MUST extend it, a Result with members MAY NOT, and no Result
2455
+ * a Result with no members MUST extend it, a Result with members MAY NOT, and no Result
2457
2456
  * inherits anything else — so an empty Result is a stated fact about the phase, never an interface someone forgot to
2458
2457
  * fill, and a phase that starts handing a product back must drop the declaration in the same edit. Six lanes carry it:
2459
2458
  * the attachment seats, the stop gate, the recovery lanes, the settle and teardown (run-), the preflight and the claim
@@ -2461,7 +2460,7 @@ export type PrepareTaskFn = (spec: TaskSpec, deps: RunnerDeps, sessions: Session
2461
2460
  */
2462
2461
  export interface InstallingPhaseResult {
2463
2462
  }
2464
- /** The live-task handle `runLocked` publishes once the harness exists (design/47): the harness + abort
2463
+ /** The live-task handle `runLocked` publishes once the harness exists: the harness + abort
2465
2464
  * controller, the loop-liveness latch (`ended` flips when the single `harness.prompt` settles; `userInterrupted`
2466
2465
  * / `userHalted` are the interrupt and halt verbs' attribution seats), the run's reminder mark, its session and
2467
2466
  * engine-minted run id, and the hook bound + identity envelope the steer entrance screen runs under. */
@@ -2475,12 +2474,12 @@ export interface LiveHandle {
2475
2474
  };
2476
2475
  reminderMark: string;
2477
2476
  sessionId: string;
2478
- /** #499 — the run body's engine-minted run id, so the stream-layer verbs can name the run their disclosures are about. */
2477
+ /** The run body's engine-minted run id, so the stream-layer verbs can name the run their disclosures are about. */
2479
2478
  runId: string;
2480
2479
  hookTimeoutMs: number;
2481
2480
  hookIdentity: HookInvocationIdentity;
2482
2481
  }
2483
- /** The run body's backstop CARRIER (F-05/W8/件①/#327/#499/#281 r2-D2): the effective ids and the post-prepare
2482
+ /** The run body's backstop CARRIER: the effective ids and the post-prepare
2484
2483
  * observations the run body publishes as they are minted, so the stream layer's failure backstop names the
2485
2484
  * same run, session and observations the frames the run body already emitted did. */
2486
2485
  export interface TaskIdRef {
@@ -2492,7 +2491,7 @@ export interface TaskIdRef {
2492
2491
  delegationTerminalOwed?: HookInvocationIdentity;
2493
2492
  editedFiles?: () => TaskResult["editedFiles"];
2494
2493
  }
2495
- /** design/99 MF-18 — the manual `/compact` request seat: the `requested` flag, the parked waiters (each with its
2494
+ /** The manual `/compact` request seat: the `requested` flag, the parked waiters (each with its
2496
2495
  * caller's cancel signal and per-call instructions), the run body's mooted-frame channel and the registration
2497
2496
  * gate the run-end backstop closes before its final drain. */
2498
2497
  export interface ManualCompactRef {
@@ -2506,7 +2505,7 @@ export interface ManualCompactRef {
2506
2505
  closed?: boolean;
2507
2506
  }
2508
2507
  /**
2509
- * design/393 S6 — the end-of-task compaction pass's outcome (`Runner.finish`'s return): what the terminal-adoption lane
2508
+ * The end-of-task compaction pass's outcome (`Runner.finish`'s return): what the terminal-adoption lane
2510
2509
  * hands the settle lane, which reads it for the `compacted` frame, the phase-timings frame and the detector reset. Named
2511
2510
  * once here so the two lanes and the method spell one type.
2512
2511
  */
@@ -2529,7 +2528,7 @@ export type EndOfTaskCompaction = {
2529
2528
  clampReason?: "budget" | "tolerance";
2530
2529
  } | undefined;
2531
2530
  /**
2532
- * design/393 S6 — the notification lane's BINDINGS: the run-notification-lane's own four `let`s as ONE seat (getters
2531
+ * The notification lane's BINDINGS: the run-notification-lane's own four `let`s as ONE seat (getters
2533
2532
  * and setters over the lane's variables, never a copy). The identity-wiring lane binds `harness` / `sessionId` /
2534
2533
  * `ident` the moment `prepared` exists (the lane's closures read them by variable — the routing listener, the park
2535
2534
  * destination, the injection entry); the leg lane flips `live` in its finally, from which point every notification
@@ -2545,13 +2544,13 @@ export interface NotificationLaneBindings {
2545
2544
  };
2546
2545
  live: boolean;
2547
2546
  }
2548
- /** design/144 §2 — the `notify()` bridge: `runLocked` binds `inject` the moment the task-notification lane exists. */
2547
+ /** The `notify()` bridge: `runLocked` binds `inject` the moment the task-notification lane exists. */
2549
2548
  export interface NotifyRef {
2550
2549
  inject?: (n: TaskNotificationPayload, opts?: {
2551
2550
  priority?: SystemInjectionPriority;
2552
2551
  }) => void;
2553
2552
  }
2554
- /** design/383 §2.1 — the capture opt-out flip verb's binding; bound only when the run mounted a memory session. */
2553
+ /** The capture opt-out flip verb's binding; bound only when the run mounted a memory session. */
2555
2554
  export interface CaptureOptOutRef {
2556
2555
  flip?: (reason?: string) => Promise<{
2557
2556
  outcome: "created" | "existed";
@@ -2568,6 +2567,6 @@ export interface TaskStreamLiveSeat {
2568
2567
  resultValue: TaskResult | undefined;
2569
2568
  /** The live-task handle once `runLocked` published it; `undefined` before, and forever when prepare threw. */
2570
2569
  readonly handle: LiveHandle | undefined;
2571
- /** design/51 — what `destroy()` reaps when the run SUSPENDED; unset for every other terminal state. */
2570
+ /** What `destroy()` reaps when the run SUSPENDED; unset for every other terminal state. */
2572
2571
  readonly reapHandle: SuspendReap | undefined;
2573
2572
  }