@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
@@ -1,5 +1,15 @@
1
+ export const ASK_UNRESOLVABLE_CAUSES = ["approver_unavailable", "no_approver_wired", "mandate_unreconstructible"];
2
+ const ASK_UNRESOLVABLE_CAUSE_SET = new Set(ASK_UNRESOLVABLE_CAUSES);
3
+ export function isAskUnresolvableCause(v) {
4
+ return ASK_UNRESOLVABLE_CAUSE_SET.has(v);
5
+ }
6
+ const CAUSE_CLAUSE = {
7
+ approver_unavailable: "the approver reported that nobody is reachable for this ask",
8
+ no_approver_wired: "no approver (or question face) is wired for this run — the headless posture",
9
+ mandate_unreconstructible: "an inherited durable-approval mandate binds this ask and this leg has no park facility to honor it",
10
+ };
1
11
  export function askUnresolvableNotice(facts) {
2
- const { sessionId, toolName, toolCallId, settlementKind, parkLaneExisted } = facts;
12
+ const { sessionId, toolName, toolCallId, cause, parkLaneExisted } = facts;
3
13
  if (typeof sessionId !== "string" || sessionId.length === 0) {
4
14
  throw new TypeError("delegation.ask_unresolvable: sessionId is required — a user-audience notice with no session routes nowhere");
5
15
  }
@@ -9,17 +19,15 @@ export function askUnresolvableNotice(facts) {
9
19
  if (typeof toolCallId !== "string" || toolCallId.length === 0) {
10
20
  throw new TypeError("delegation.ask_unresolvable: toolCallId is required");
11
21
  }
12
- if (settlementKind !== "approver_unavailable") {
13
- throw new TypeError(`delegation.ask_unresolvable: settlementKind ${JSON.stringify(settlementKind)} is not the unavailable settlement`);
22
+ if (!isAskUnresolvableCause(cause)) {
23
+ throw new TypeError(`delegation.ask_unresolvable: cause ${JSON.stringify(cause)} is not one of ${ASK_UNRESOLVABLE_CAUSES.join("/")}`);
14
24
  }
15
- const park = parkLaneExisted
16
- ? "the durable approval park did not take it"
17
- : "no durable approval park is armed for this run";
25
+ const park = parkLaneExisted ? "the durable approval park did not take it" : "no durable approval park is armed for this run";
18
26
  return {
19
27
  code: "delegation.ask_unresolvable",
20
- message: `approval for "${toolName}" could not be resolved: the approver reported that nobody is reachable for this ask and ${park} — ` +
28
+ message: `approval for "${toolName}" could not be resolved: ${CAUSE_CLAUSE[cause]} and ${park} — ` +
21
29
  `the call was denied fail-closed and did not run. To let such approvals wait for a person, run with a checkpoint store and a ` +
22
30
  `durable approval opt-in (or a live approver reachable for delegated children).`,
23
- detail: { sessionId, toolName, toolCallId, settlementKind, parkLaneExisted: parkLaneExisted === true },
31
+ detail: { sessionId, toolName, toolCallId, cause, parkLaneExisted: parkLaneExisted === true },
24
32
  };
25
33
  }
@@ -99,7 +99,7 @@ export interface CompactionForkContext {
99
99
  modelId?: string;
100
100
  }
101
101
  export interface MaybeCompactOptions {
102
- /** RB-473 — disclosure channel for CONTAINED host-callback failures in this scope (the RB-463
102
+ /** Disclosure channel for CONTAINED host-callback failures in this scope (the RB-463
103
103
  * isolation primitive's bounded first-failure per site). Absent ⇒ failures are counted only. */
104
104
  onNotifyError?: (failure: import("./safe-notify.js").SafeNotifyFailure) => void;
105
105
  /** The session to compact. Typed on the INTERFACE face (typecheck 车 2026-07-24): every member this
@@ -109,7 +109,7 @@ export interface MaybeCompactOptions {
109
109
  * the compaction-boundary epoch restatement/advance must hash the SAME artifact identity as the
110
110
  * prepare-time pin, or every compaction under a declaration-carrying run would flap the pin. */
111
111
  epochDeclaredSections?: import("../prompt-assembly/epoch.js").EpochDeclaredSections;
112
- /** RB-31 (design/148 S2) — a compaction-boundary CENTER CANDIDATE ADOPTION, pre-assembled by the
112
+ /** A compaction-boundary CENTER CANDIDATE ADOPTION, pre-assembled by the
113
113
  * caller (prepare's seam): the descriptor advances with the candidate's declarations + provenance
114
114
  * in the SAME CAS append as the new baseline, and `apply()` (the live prefix/fingerprint swap)
115
115
  * runs ONLY after that append succeeded — a failed/blocked compaction must swap nothing. */
@@ -160,7 +160,7 @@ export interface MaybeCompactOptions {
160
160
  * including the preCompact hook's additions, gets the same treatment). */
161
161
  customInstructions?: string;
162
162
  /**
163
- * #500 — the user's / project's own INSTRUCTION-FILE content (the CLAUDE.md family this
163
+ * The user's / project's own INSTRUCTION-FILE content (the CLAUDE.md family this
164
164
  * deployment loads into an ordinary session), for the INDEPENDENT summary form.
165
165
  *
166
166
  * Why it needs a seat at all: the summarization prompt carries CC's closing invitation to follow
@@ -300,7 +300,7 @@ export interface MaybeCompactOptions {
300
300
  */
301
301
  instructionSourcePaths?: ReadonlyArray<string>;
302
302
  /**
303
- * RB-197②(独立复审 + 命中,已修): `recentlyReadFiles` yields CANONICAL keys (resolveKey
303
+ * `recentlyReadFiles` yields CANONICAL keys (resolveKey
304
304
  * output — the same coordinate `ReadFileState` is keyed in), but `instructionSourcePaths` and the
305
305
  * kept-tail scan inside `maybeCompact` (which reads raw tool-call arguments via
306
306
  * `extractFileOpsFromMessage`) do NOT share that coordinate — a model-typed relative path and its
@@ -315,7 +315,7 @@ export interface MaybeCompactOptions {
315
315
  */
316
316
  normalizePath?: (raw: string) => Promise<string>;
317
317
  /**
318
- * RB-197②(交叉复审命中,已修) — a kept-tail Read tool-CALL's mere presence does not prove the
318
+ * A kept-tail Read tool-CALL's mere presence does not prove the
319
319
  * file's real content is visible there: its toolRESULT may be a dedup stub ("unchanged since you
320
320
  * last read it…") whose ORIGINAL full transmission sits in the summarized prefix THIS compaction is
321
321
  * about to cut away — preserving read-state for such a path would leave both the kept tail and the
@@ -328,14 +328,14 @@ export interface MaybeCompactOptions {
328
328
  isDedupStubResult?: (resultText: string) => boolean;
329
329
  };
330
330
  /**
331
- * RB-197: fires ONCE per LANDED compaction (after `appendCompaction` committed the new baseline), with the
331
+ * Fires ONCE per LANDED compaction (after `appendCompaction` committed the new baseline), with the
332
332
  * files that were attached WHOLE (untruncated) into the summary. The Runner wires this to the read-state
333
333
  * invalidation (`applyCompactionToReadFileState`): the summary just replaced the history the read-dedup
334
334
  * stubs point at, so stale entries must drop and the re-attached content re-registers. Kept OUTSIDE
335
335
  * `workingFileAttachments` deliberately — the invalidation is owed even when attachments are disabled
336
336
  * (an empty array then). Best-effort: a throwing callback must not fail the landed compaction.
337
337
  *
338
- * RB-197②(命中,已修;独立复审第二轮又命中一条同族缺口,已修) `preserveReadState`:
338
+ * `preserveReadState`:
339
339
  * canonical-coordinate paths (same shape as `normalizePath`'s output) whose read-state entry must
340
340
  * survive the compaction's clear even though they are NOT in `attachedComplete` — every file
341
341
  * `maybeCompact` deliberately skipped re-attaching, for EITHER exclusion reason (kept-tail-visible,
@@ -474,7 +474,7 @@ export interface MaybeCompactOptions {
474
474
  keptChars: number;
475
475
  }) => void;
476
476
  /**
477
- * RB-402 — the design/36 ToolSearch activation set LIVE at this pass (the
477
+ * The design/36 ToolSearch activation set LIVE at this pass (the
478
478
  * runner threads `[...prepared.activeTools]` on all three lanes: boundary, PTL recovery, finish).
479
479
  * Persisted into the landed compaction entry's details (`CompactionDetails.activeTools`) so the
480
480
  * NEXT task boundary's re-derivation — whose transcript source (ToolSearch toolCall parts) this
@@ -510,7 +510,7 @@ export declare function maybeCompact(opts: MaybeCompactOptions): Promise<{
510
510
  * (`enabled:false`) — the request can never be honored this run. Lets the caller resolve a manual
511
511
  * /compact with the honest `"disabled"` outcome (and trace frame) instead of a structural noop. */
512
512
  disabled?: boolean;
513
- /** RB-398-b: set (with `compacted:false`) when the pass PASSED the trigger gate
513
+ /** Set (with `compacted:false`) when the pass PASSED the trigger gate
514
514
  * (natural or forced) but found nothing to summarize — no valid cut point / empty history. Was
515
515
  * previously indistinguishable from the quiet under-threshold return, so a forced pass with
516
516
  * nothing to do looked identical to one that never wanted to run; the caller's outcome event
@@ -597,7 +597,7 @@ export declare function maybeCompact(opts: MaybeCompactOptions): Promise<{
597
597
  modelId?: string;
598
598
  };
599
599
  /**
600
- * RB-126 (2026-07-25): the trigger inputs THIS pass used, reported on
600
+ * The trigger inputs THIS pass used, reported on
601
601
  * EVERY return path — including the ordinary "nothing to do" one. A consumer rendering "how full is the
602
602
  * context" was otherwise forced to re-derive the numerator itself, and a re-derivation that drifts from
603
603
  * the engine's own is the projection-antipattern this repo keeps paying for: the displayed percentage
@@ -29,7 +29,7 @@ export interface AutoModeArmingRecipe {
29
29
  /** Classify round-trip cap, ms. */
30
30
  timeoutMs?: number;
31
31
  /**
32
- * #556 — the classifier DENIAL-LIMIT bounds (`RunnerDeps.autoMode.denialLimit`, CC 2.1.250 `FO`/`AKe`):
32
+ * The classifier DENIAL-LIMIT bounds (`RunnerDeps.autoMode.denialLimit`, CC 2.1.250 `FO`/`AKe`):
33
33
  * how many blocks the ancestor's classifier was allowed before a person had to look, and the window the
34
34
  * fallback ask ran under. A KNOB triple, not prompt body — every member is orderable, so the fold takes
35
35
  * the strictest of the two sides rather than refusing on a difference.
@@ -87,7 +87,7 @@ export interface AutoModeArmingFace {
87
87
  crossSessionMessagesRule?: boolean;
88
88
  }
89
89
  /**
90
- * #556 — the ONE tighten rule for the denial-limit bounds, shared by {@link foldAutoModeArming} and by
90
+ * The ONE tighten rule for the denial-limit bounds, shared by {@link foldAutoModeArming} and by
91
91
  * the runner's rebuilt-tracker mint (a second computation of "the strictest of these two" is how the
92
92
  * recipe's account and the tracker's actual bounds would come to disagree). Both sides' EFFECTIVE values
93
93
  * are materialized first (an omitted bound is the default the tracker applies, never "unbounded" — the
@@ -104,18 +104,18 @@ export interface BackgroundAgentRecord {
104
104
  parkClaimId?: string;
105
105
  summary?: string;
106
106
  finalOutput?: string;
107
- /** RB-205-B: the FULL result (workflow.ts NH-1 shape via {@link BackgroundAgentTaskHandle.resultFull}),
107
+ /** The FULL result (workflow.ts NH-1 shape via {@link BackgroundAgentTaskHandle.resultFull}),
108
108
  * set only when it differs from `finalOutput` — the restart/durable-fallback poll path needs the same
109
109
  * pairing the live handle carries, or a process restart loses the very recoverability this field exists
110
110
  * to preserve. */
111
111
  finalOutputFull?: string;
112
112
  /** The child's failure text (registry `handle.error` mirror; the reap-stop sentinel never lands here).
113
- * RB-237: the stale-running reap flip ALSO writes its attribution here (`??`-guarded) —
113
+ * The stale-running reap flip ALSO writes its attribution here (`??`-guarded) —
114
114
  * `error` is the field the durable serving face renders (`serveDurableAgentRow`), while `summary`
115
115
  * has no reader on that face, so an attribution written only to `summary` was invisible: a host
116
116
  * crash read as a bare `failed` + "(no result text)". */
117
117
  error?: string;
118
- /** RB-405 (durable archival mirror) — the classification triplet the in-memory handle carries under
118
+ /** The classification triplet the in-memory handle carries under
119
119
  * the SAME names (`errorCode`/`errorRetryable`/`errorKind`; see RB-386②/RB-405 G3 on
120
120
  * {@link import("./task-registry-shared.js").BackgroundAgentTaskHandle}), written to this row at the
121
121
  * same terminal write that lands `error` — so a cross-restart fallback read
@@ -146,7 +146,7 @@ export interface BackgroundAgentRecord {
146
146
  rev: number;
147
147
  }
148
148
  /**
149
- * RB-423 — the terminal payload a REVIVAL must erase from the row it is re-launching, as ONE list.
149
+ * The terminal payload a REVIVAL must erase from the row it is re-launching, as ONE list.
150
150
  *
151
151
  * A revived handle starts a fresh cycle on an existing row: status flips back to `running`, but every
152
152
  * field describing how the PREVIOUS cycle ended is still sitting there. Left standing, each one
@@ -249,7 +249,7 @@ export declare function canAccessAgentRecord(record: Pick<BackgroundAgentRecord,
249
249
  * terminal-looking row whose rev the flush has not yet bumped. In-process sweeps are gated on the
250
250
  * live handle; cross-process revival (S3) must claim-CAS FIRST (see {@link BackgroundAgentRecord.writerId}).
251
251
  */
252
- /** RB-237: the stale-running reap flip's attribution, written to BOTH `summary` (legacy
252
+ /** The stale-running reap flip's attribution, written to BOTH `summary` (legacy
253
253
  * slot, kept for any out-of-repo reader) and `error` (the field {@link canAccessAgentRecord}-gated
254
254
  * durable serving actually renders). One exported constant so the two store implementations (in-memory
255
255
  * here, file twin) can never drift apart (RB-74/RB-111 family). Wording carries CC 2.1.220's three
@@ -133,7 +133,7 @@ export interface BackgroundShellCapability {
133
133
  */
134
134
  export declare function hasBackgroundShell(env: ExecutionEnv): env is ExecutionEnv & BackgroundShellCapability;
135
135
  /**
136
- * RB-164 — the ONE way core runs an env-level background sweep.
136
+ * The ONE way core runs an env-level background sweep.
137
137
  *
138
138
  * ## Why a single entry point
139
139
  * `disposeBackgroundShells` lives in the execution-env layer and cannot reach the task registry, so the
@@ -24,9 +24,6 @@ import type { GateOutcome } from "./gate-outcome.js";
24
24
  */
25
25
  export declare const EXECUTION_OUTCOME_RECORD_WORDS: readonly ["recorded", "already_recorded", "not_resolved", "absent"];
26
26
  export type ExecutionOutcomeRecordWord = (typeof EXECUTION_OUTCOME_RECORD_WORDS)[number];
27
- /** Membership test for {@link ExecutionOutcomeRecordWord} — a deployment store answers across a process
28
- * boundary, so the consumer validating its word must not hand-roll the set. */
29
- export declare function isExecutionOutcomeRecordWord(v: unknown): v is ExecutionOutcomeRecordWord;
30
27
  /**
31
28
  * The one disposition table over {@link ExecutionOutcomeRecordWord}: does this answer mean the row now
32
29
  * carries NO execution record — i.e. the leg's disposition of the decided action is not on file? The
@@ -1,9 +1,5 @@
1
1
  import {} from "./ask-origin.js";
2
2
  export const EXECUTION_OUTCOME_RECORD_WORDS = ["recorded", "already_recorded", "not_resolved", "absent"];
3
- const EXECUTION_OUTCOME_RECORD_WORD_SET = new Set(EXECUTION_OUTCOME_RECORD_WORDS);
4
- export function isExecutionOutcomeRecordWord(v) {
5
- return EXECUTION_OUTCOME_RECORD_WORD_SET.has(v);
6
- }
7
3
  export const EXECUTION_RECORD_LEAVES_ROW_UNRECORDED = {
8
4
  recorded: false,
9
5
  already_recorded: false,