@sema-agent/core 7.48.0 → 7.49.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (421) hide show
  1. package/CHANGELOG.md +457 -0
  2. package/README.md +2 -2
  3. package/dist/agents/cascade.d.ts +2 -5
  4. package/dist/agents/child-failure.d.ts +20 -0
  5. package/dist/agents/child-failure.js +28 -0
  6. package/dist/agents/cross-session-ref.d.ts +11 -3
  7. package/dist/agents/cross-session-ref.js +6 -0
  8. package/dist/agents/cumulative-stats.d.ts +12 -15
  9. package/dist/agents/cumulative-stats.js +1 -1
  10. package/dist/agents/extra-tool-names.js +1 -1
  11. package/dist/agents/inherited-tool-pool.d.ts +17 -13
  12. package/dist/agents/inherited-tool-pool.js +4 -3
  13. package/dist/agents/peer-session-drain.d.ts +3 -2
  14. package/dist/agents/peer-session-drain.js +5 -4
  15. package/dist/agents/send-message-tool.js +2 -9
  16. package/dist/agents/subagent.d.ts +10 -29
  17. package/dist/agents/subagent.js +65 -53
  18. package/dist/agents/suspend-guard.d.ts +1 -1
  19. package/dist/agents/tool-filter.d.ts +76 -65
  20. package/dist/agents/tool-filter.js +122 -92
  21. package/dist/agents/verify.d.ts +4 -7
  22. package/dist/agents/verify.js +6 -7
  23. package/dist/bench/metrics.d.ts +1 -2
  24. package/dist/brain/anthropic.js +133 -79
  25. package/dist/brain/errors.d.ts +53 -6
  26. package/dist/brain/errors.js +22 -2
  27. package/dist/brain/input-too-long.d.ts +40 -19
  28. package/dist/brain/input-too-long.js +3 -16
  29. package/dist/brain/open-responses.js +19 -10
  30. package/dist/brain/openai.js +123 -32
  31. package/dist/brain/provider-dialect.d.ts +214 -0
  32. package/dist/brain/provider-dialect.js +186 -0
  33. package/dist/brain/request-params.d.ts +27 -8
  34. package/dist/brain/request-params.js +7 -12
  35. package/dist/brain/request-route.d.ts +84 -0
  36. package/dist/brain/request-route.js +41 -0
  37. package/dist/brain/retry.d.ts +8 -0
  38. package/dist/brain/retry.js +10 -4
  39. package/dist/brain/route-adjudicator.d.ts +7 -0
  40. package/dist/brain/route-adjudicator.js +5 -1
  41. package/dist/brain/status-sink.d.ts +20 -0
  42. package/dist/brain/status-sink.js +11 -0
  43. package/dist/brain/stream-engine.d.ts +52 -1
  44. package/dist/brain/stream-engine.js +81 -24
  45. package/dist/brain/stream-shared.d.ts +57 -11
  46. package/dist/brain/stream-shared.js +28 -2
  47. package/dist/core/a2a.d.ts +1 -0
  48. package/dist/core/agent-config-dir.js +3 -2
  49. package/dist/core/allow-entry.d.ts +21 -12
  50. package/dist/core/allow-entry.js +38 -31
  51. package/dist/core/arg-summary.d.ts +21 -28
  52. package/dist/core/arg-summary.js +235 -88
  53. package/dist/core/ask-origin.d.ts +42 -24
  54. package/dist/core/ask-origin.js +18 -13
  55. package/dist/core/auto-mode-prompt-assets.d.ts +2 -2
  56. package/dist/core/auto-mode-prompt-assets.js +1 -1
  57. package/dist/core/auto-mode-prompt.d.ts +11 -1
  58. package/dist/core/auto-mode-prompt.js +13 -10
  59. package/dist/core/auto-mode-rebuild.d.ts +7 -0
  60. package/dist/core/auto-mode-rebuild.js +4 -1
  61. package/dist/core/canonical-json.d.ts +3 -0
  62. package/dist/core/canonical-json.js +2 -1
  63. package/dist/core/checkpoint-requirements.d.ts +892 -0
  64. package/dist/core/checkpoint-requirements.js +333 -0
  65. package/dist/core/checkpoint-store.d.ts +94 -65
  66. package/dist/core/checkpoint-store.js +14 -26
  67. package/dist/core/child-clamp-seats.d.ts +228 -69
  68. package/dist/core/child-clamp-seats.js +211 -17
  69. package/dist/core/classifier-unavailable-arm.d.ts +5 -1
  70. package/dist/core/classifier-unavailable-arm.js +3 -3
  71. package/dist/core/compliance.d.ts +3 -0
  72. package/dist/core/compliance.js +9 -4
  73. package/dist/core/credential-vocabulary.d.ts +140 -0
  74. package/dist/core/credential-vocabulary.js +131 -0
  75. package/dist/core/decision-receipt.js +1 -1
  76. package/dist/core/effective-path-target.d.ts +73 -16
  77. package/dist/core/effective-path-target.js +63 -33
  78. package/dist/core/engine-notice.d.ts +43 -11
  79. package/dist/core/file-history-store.js +2 -2
  80. package/dist/core/fs-write-gate-policy.d.ts +4 -0
  81. package/dist/core/fs-write-gate-policy.js +22 -5
  82. package/dist/core/gate-bounded-await.d.ts +28 -13
  83. package/dist/core/gate-bounded-await.js +41 -4
  84. package/dist/core/gate-fold.d.ts +1 -1
  85. package/dist/core/gate-fold.js +24 -25
  86. package/dist/core/gate-lanes.js +16 -15
  87. package/dist/core/gate-outcome.d.ts +20 -5
  88. package/dist/core/gate-outcome.js +5 -0
  89. package/dist/core/governance-codes.d.ts +11 -4
  90. package/dist/core/governance-codes.js +14 -3
  91. package/dist/core/hooks.d.ts +21 -0
  92. package/dist/core/locked-config.d.ts +8 -0
  93. package/dist/core/locked-config.js +14 -2
  94. package/dist/core/lsp.js +3 -5
  95. package/dist/core/mailbox-store.d.ts +3 -4
  96. package/dist/core/mcp-connection-pool.d.ts +75 -0
  97. package/dist/core/mcp-connection-pool.js +128 -0
  98. package/dist/core/mcp-failure.d.ts +2 -1
  99. package/dist/core/mcp-failure.js +13 -2
  100. package/dist/core/mcp.d.ts +4 -0
  101. package/dist/core/mcp.js +70 -43
  102. package/dist/core/memory-engine/content-origin.js +2 -14
  103. package/dist/core/memory-engine/engine.d.ts +32 -22
  104. package/dist/core/memory-engine/engine.js +103 -55
  105. package/dist/core/memory-engine/file-backend.d.ts +13 -30
  106. package/dist/core/memory-engine/file-backend.js +37 -252
  107. package/dist/core/memory-engine/index.d.ts +1 -1
  108. package/dist/core/memory-engine/index.js +1 -1
  109. package/dist/core/memory-engine/layout.d.ts +139 -9
  110. package/dist/core/memory-engine/layout.js +350 -7
  111. package/dist/core/memory-engine/scope-contract.d.ts +10 -0
  112. package/dist/core/memory-engine/scope-contract.js +8 -0
  113. package/dist/core/memory-engine/session-incarnation.d.ts +14 -4
  114. package/dist/core/memory-engine/session-incarnation.js +5 -2
  115. package/dist/core/memory-engine/types.d.ts +10 -1
  116. package/dist/core/memory.js +5 -17
  117. package/dist/core/model-seat.d.ts +4 -4
  118. package/dist/core/model-seat.js +1 -1
  119. package/dist/core/mounted-mcp.d.ts +57 -0
  120. package/dist/core/mounted-mcp.js +19 -0
  121. package/dist/core/namespaced-rule-name.d.ts +29 -0
  122. package/dist/core/namespaced-rule-name.js +52 -0
  123. package/dist/core/park-selfcheck.d.ts +1 -1
  124. package/dist/core/park-selfcheck.js +16 -6
  125. package/dist/core/path-guard-rows.d.ts +99 -0
  126. package/dist/core/path-guard-rows.js +45 -0
  127. package/dist/core/path-identity.d.ts +22 -16
  128. package/dist/core/path-identity.js +10 -10
  129. package/dist/core/path-rule-binding.d.ts +2 -1
  130. package/dist/core/path-rule-binding.js +3 -1
  131. package/dist/core/pause-registry.d.ts +16 -2
  132. package/dist/core/pause-registry.js +6 -0
  133. package/dist/core/permission-rule-consent.js +0 -7
  134. package/dist/core/permission-rule-model.d.ts +68 -24
  135. package/dist/core/permission-rule-model.js +105 -24
  136. package/dist/core/permission-rule-store.js +2 -2
  137. package/dist/core/permission-rules.d.ts +3 -30
  138. package/dist/core/permission-rules.js +4 -54
  139. package/dist/core/read-root-candidate.d.ts +1 -3
  140. package/dist/core/read-root-candidate.js +4 -15
  141. package/dist/core/real-approval.d.ts +4 -3
  142. package/dist/core/retired-keys.d.ts +13 -0
  143. package/dist/core/retired-keys.js +14 -0
  144. package/dist/core/roles.d.ts +2 -3
  145. package/dist/core/roles.js +15 -6
  146. package/dist/core/runner/assemble-result.d.ts +0 -7
  147. package/dist/core/runner/assemble-result.js +19 -31
  148. package/dist/core/runner/caller-roster.d.ts +78 -0
  149. package/dist/core/runner/caller-roster.js +219 -0
  150. package/dist/core/runner/checkpoint-scope.d.ts +16 -16
  151. package/dist/core/runner/checkpoint-scope.js +2 -2
  152. package/dist/core/runner/child-tree.js +2 -2
  153. package/dist/core/runner/contracts.d.ts +68 -35
  154. package/dist/core/runner/decide-continuation.d.ts +51 -3
  155. package/dist/core/runner/decide-continuation.js +76 -21
  156. package/dist/core/runner/denial-limit-arms.d.ts +17 -5
  157. package/dist/core/runner/denial-limit-arms.js +11 -9
  158. package/dist/core/runner/extra-body-dropped-seat.d.ts +8 -0
  159. package/dist/core/runner/extra-body-dropped-seat.js +22 -0
  160. package/dist/core/runner/finish-reason-seat.d.ts +9 -0
  161. package/dist/core/runner/finish-reason-seat.js +40 -0
  162. package/dist/core/runner/gate-exit.d.ts +44 -32
  163. package/dist/core/runner/gate-exit.js +112 -25
  164. package/dist/core/runner/inherited-ask-grants.js +6 -4
  165. package/dist/core/runner/mcp-redial.d.ts +3 -3
  166. package/dist/core/runner/mcp-redial.js +3 -4
  167. package/dist/core/runner/permission-rule-lanes.d.ts +1 -2
  168. package/dist/core/runner/permission-rule-lanes.js +5 -4
  169. package/dist/core/runner/prepare-artifact.d.ts +4 -0
  170. package/dist/core/runner/prepare-artifact.js +2 -1
  171. package/dist/core/runner/prepare-ask-lane.d.ts +2 -0
  172. package/dist/core/runner/prepare-ask-lane.js +12 -6
  173. package/dist/core/runner/prepare-boundary-parks.d.ts +5 -8
  174. package/dist/core/runner/prepare-boundary-parks.js +4 -7
  175. package/dist/core/runner/prepare-caps-and-workflow.d.ts +11 -15
  176. package/dist/core/runner/prepare-caps-and-workflow.js +19 -27
  177. package/dist/core/runner/prepare-config-doors.d.ts +9 -9
  178. package/dist/core/runner/prepare-config-doors.js +10 -5
  179. package/dist/core/runner/prepare-defer-classify.d.ts +2 -2
  180. package/dist/core/runner/prepare-defer-classify.js +5 -3
  181. package/dist/core/runner/prepare-delegation-surface.d.ts +1 -1
  182. package/dist/core/runner/prepare-delegation-surface.js +3 -3
  183. package/dist/core/runner/prepare-gate-stations.d.ts +4 -4
  184. package/dist/core/runner/prepare-gate-stations.js +9 -7
  185. package/dist/core/runner/prepare-hands-readface.d.ts +7 -7
  186. package/dist/core/runner/prepare-hands-readface.js +7 -7
  187. package/dist/core/runner/prepare-inherited-gate.d.ts +7 -6
  188. package/dist/core/runner/prepare-inherited-gate.js +14 -15
  189. package/dist/core/runner/prepare-listings.d.ts +7 -24
  190. package/dist/core/runner/prepare-listings.js +4 -5
  191. package/dist/core/runner/prepare-memory-engine-session.d.ts +2 -0
  192. package/dist/core/runner/prepare-memory-engine-session.js +4 -3
  193. package/dist/core/runner/prepare-memory.d.ts +6 -0
  194. package/dist/core/runner/prepare-memory.js +13 -13
  195. package/dist/core/runner/prepare-offload-wrappers.d.ts +5 -0
  196. package/dist/core/runner/prepare-offload-wrappers.js +3 -3
  197. package/dist/core/runner/prepare-park-ask.d.ts +7 -8
  198. package/dist/core/runner/prepare-park-ask.js +17 -10
  199. package/dist/core/runner/prepare-policy-chain.js +24 -44
  200. package/dist/core/runner/prepare-project-context.d.ts +1 -1
  201. package/dist/core/runner/prepare-project-context.js +3 -4
  202. package/dist/core/runner/prepare-protocol-tools.d.ts +9 -3
  203. package/dist/core/runner/prepare-protocol-tools.js +3 -4
  204. package/dist/core/runner/prepare-run-refs.d.ts +3 -0
  205. package/dist/core/runner/prepare-run-refs.js +2 -1
  206. package/dist/core/runner/prepare-safety-scan.d.ts +4 -8
  207. package/dist/core/runner/prepare-safety-scan.js +1 -2
  208. package/dist/core/runner/prepare-suspend-saga.d.ts +7 -1
  209. package/dist/core/runner/prepare-suspend-saga.js +28 -12
  210. package/dist/core/runner/prepare-task.d.ts +1 -1
  211. package/dist/core/runner/prepare-task.js +67 -56
  212. package/dist/core/runner/prepare-wiring-manifest.d.ts +11 -10
  213. package/dist/core/runner/prepare-wiring-manifest.js +5 -8
  214. package/dist/core/runner/resume-apply.js +7 -14
  215. package/dist/core/runner/resume-checkpoint-screen.js +11 -4
  216. package/dist/core/runner/resume-internals-and-config.js +2 -2
  217. package/dist/core/runner/resume-policy-outcome.js +5 -32
  218. package/dist/core/runner/resume-review-outcome.js +4 -1
  219. package/dist/core/runner/retired-runner-deps.d.ts +6 -0
  220. package/dist/core/runner/retired-runner-deps.js +10 -1
  221. package/dist/core/runner/run-brain-sinks.d.ts +4 -0
  222. package/dist/core/runner/run-brain-sinks.js +5 -2
  223. package/dist/core/runner/run-harness-handlers.js +29 -36
  224. package/dist/core/runner/run-leg.d.ts +0 -2
  225. package/dist/core/runner/run-leg.js +32 -33
  226. package/dist/core/runner/run-terminal-adoption.js +4 -3
  227. package/dist/core/runner/runtask.js +8 -8
  228. package/dist/core/runner/session-rule-policy.js +5 -5
  229. package/dist/core/runner/stream-settle-backstop.js +7 -4
  230. package/dist/core/runner/sub-agent-deny-lists.d.ts +51 -12
  231. package/dist/core/runner/sub-agent-deny-lists.js +111 -80
  232. package/dist/core/runner/terminal-account.d.ts +48 -0
  233. package/dist/core/runner/terminal-account.js +186 -0
  234. package/dist/core/runner/tool-end-body.d.ts +54 -17
  235. package/dist/core/runner/tool-end-body.js +27 -2
  236. package/dist/core/runner/tool-face-overlay.d.ts +3 -1
  237. package/dist/core/runner/tool-face-overlay.js +6 -4
  238. package/dist/core/runner/tool-occurrence.d.ts +106 -0
  239. package/dist/core/runner/tool-occurrence.js +123 -0
  240. package/dist/core/runner/tool-progress-lane.d.ts +16 -8
  241. package/dist/core/runner/tool-progress-lane.js +25 -34
  242. package/dist/core/runner/tool-turn-repair-seat.d.ts +28 -4
  243. package/dist/core/runner/tool-turn-repair-seat.js +36 -13
  244. package/dist/core/runner/turn-attachments.d.ts +1 -1
  245. package/dist/core/runner/write-protection-station.d.ts +21 -9
  246. package/dist/core/runner/write-protection-station.js +20 -17
  247. package/dist/core/runner-deps.d.ts +12 -22
  248. package/dist/core/secret-env.d.ts +16 -5
  249. package/dist/core/secret-env.js +23 -63
  250. package/dist/core/sensitive-path-policy.d.ts +19 -18
  251. package/dist/core/sensitive-path-policy.js +73 -49
  252. package/dist/core/session-reconcile.d.ts +3 -0
  253. package/dist/core/session-reconcile.js +5 -4
  254. package/dist/core/session-store.d.ts +5 -0
  255. package/dist/core/session-store.js +12 -0
  256. package/dist/core/session.d.ts +13 -0
  257. package/dist/core/shared-memory/normalize.d.ts +17 -4
  258. package/dist/core/shared-memory/normalize.js +7 -7
  259. package/dist/core/shell-lexer.js +5 -4
  260. package/dist/core/shell-wrapper-projection.js +1 -1
  261. package/dist/core/skill-grant.js +1 -1
  262. package/dist/core/store-contracts/checkpoint-store-contract.js +13 -0
  263. package/dist/core/store-contracts/mailbox-store-contract.d.ts +7 -14
  264. package/dist/core/store-contracts/session-store-incarnation-contract.d.ts +27 -0
  265. package/dist/core/store-contracts/session-store-incarnation-contract.js +92 -0
  266. package/dist/core/stub-env.d.ts +2 -0
  267. package/dist/core/stub-env.js +1 -0
  268. package/dist/core/synthetic-read-verdict.js +2 -2
  269. package/dist/core/task-event.d.ts +59 -5
  270. package/dist/core/task-result.d.ts +1 -1
  271. package/dist/core/task-spec.d.ts +42 -9
  272. package/dist/core/terminal-cause.d.ts +94 -11
  273. package/dist/core/tighten-task-spec.d.ts +5 -4
  274. package/dist/core/tighten-task-spec.js +20 -25
  275. package/dist/core/tool-catalog-entries.d.ts +5 -7
  276. package/dist/core/tool-catalog-entries.js +14 -15
  277. package/dist/core/tool-face.d.ts +47 -0
  278. package/dist/core/tool-face.js +5 -0
  279. package/dist/core/tool-model-gate.d.ts +5 -5
  280. package/dist/core/tool-name-aliases.d.ts +26 -2
  281. package/dist/core/tool-name-aliases.js +13 -0
  282. package/dist/core/tool-name-list.d.ts +30 -0
  283. package/dist/core/tool-name-list.js +55 -0
  284. package/dist/core/tool-name-readings.d.ts +1 -9
  285. package/dist/core/tool-name-readings.js +1 -3
  286. package/dist/core/tool-policy.d.ts +195 -85
  287. package/dist/core/tool-policy.js +165 -380
  288. package/dist/core/tool-registry.d.ts +44 -1
  289. package/dist/core/tool-registry.js +26 -0
  290. package/dist/core/tool-roster.d.ts +19 -1
  291. package/dist/core/tool-roster.js +21 -2
  292. package/dist/core/tool-spec-members.d.ts +45 -0
  293. package/dist/core/tool-spec-members.js +169 -0
  294. package/dist/core/tool-spec.d.ts +46 -8
  295. package/dist/core/tools.d.ts +6 -2
  296. package/dist/core/tools.js +8 -4
  297. package/dist/core/untrusted-egress.js +29 -26
  298. package/dist/core/untrusted-text.d.ts +13 -10
  299. package/dist/core/untrusted-text.js +6 -44
  300. package/dist/core/workflow-journal-store.d.ts +4 -1
  301. package/dist/core/write-protect.d.ts +65 -29
  302. package/dist/core/write-protect.js +235 -177
  303. package/dist/engine/compaction/compaction.d.ts +2 -2
  304. package/dist/engine/execution-env/node-execution-env.d.ts +5 -23
  305. package/dist/engine/execution-env/node-execution-env.js +16 -38
  306. package/dist/engine/execution-env/symlink-chain.d.ts +23 -0
  307. package/dist/engine/execution-env/symlink-chain.js +32 -0
  308. package/dist/engine/harness/types.d.ts +7 -0
  309. package/dist/engine/llm/tool-turns.d.ts +3 -0
  310. package/dist/engine/llm/tool-turns.js +1 -0
  311. package/dist/engine/llm/types.d.ts +59 -23
  312. package/dist/engine/loop/agent-loop.js +16 -2
  313. package/dist/engine/session/memory-repo.js +11 -3
  314. package/dist/engine/session/repo-utils.d.ts +8 -0
  315. package/dist/engine/session/repo-utils.js +13 -0
  316. package/dist/index.d.ts +20 -23
  317. package/dist/index.js +17 -20
  318. package/dist/internal/harness.d.ts +1 -1
  319. package/dist/internal/harness.js +1 -1
  320. package/dist/internal/llm.d.ts +2 -2
  321. package/dist/internal/llm.js +1 -1
  322. package/dist/orchestration/governance-baseline-validity.js +1 -1
  323. package/dist/orchestration/run-spec.js +3 -3
  324. package/dist/orchestration/run-workflow-tool.d.ts +16 -35
  325. package/dist/orchestration/run-workflow-tool.js +38 -78
  326. package/dist/orchestration/workflow-governance.d.ts +21 -25
  327. package/dist/orchestration/workflow-governance.js +38 -78
  328. package/dist/orchestration/workflow-primitives.d.ts +7 -22
  329. package/dist/orchestration/workflow-primitives.js +5 -12
  330. package/dist/orchestration/workflow-types.d.ts +1 -1
  331. package/dist/orchestration/workflow.d.ts +61 -11
  332. package/dist/orchestration/workflow.js +189 -117
  333. package/dist/scenarios/full-body.d.ts +1 -1
  334. package/dist/shell/lex.d.ts +0 -21
  335. package/dist/shell/lex.js +250 -68
  336. package/dist/shell/shell-words.d.ts +35 -0
  337. package/dist/shell/shell-words.js +65 -0
  338. package/dist/stores/file/checkpoint-store.d.ts +5 -5
  339. package/dist/stores/file/checkpoint-store.js +5 -2
  340. package/dist/stores/file/index.d.ts +0 -8
  341. package/dist/stores/file/index.js +0 -12
  342. package/dist/stores/file/session-store.d.ts +3 -0
  343. package/dist/stores/file/session-store.js +44 -19
  344. package/dist/tools/artifact/artifact-tool.js +2 -0
  345. package/dist/tools/fs/bash-program-position.d.ts +12 -4
  346. package/dist/tools/fs/bash-program-position.js +32 -9
  347. package/dist/tools/fs/bash-readonly-classifier.d.ts +1 -1
  348. package/dist/tools/fs/bash-readonly-classifier.js +8 -7
  349. package/dist/tools/fs/containment-face.d.ts +4 -0
  350. package/dist/tools/fs/containment-face.js +3 -0
  351. package/dist/tools/fs/fs-shared.d.ts +10 -0
  352. package/dist/tools/fs/fs-shared.js +18 -0
  353. package/dist/tools/fs/fs-write.js +4 -2
  354. package/dist/tools/fs/index.d.ts +1 -1
  355. package/dist/tools/fs/program-read-model.d.ts +46 -20
  356. package/dist/tools/fs/program-read-model.js +50 -20
  357. package/dist/tools/fs/program-read-model.rows.d.ts +0 -14
  358. package/dist/tools/fs/program-read-model.rows.js +16 -15
  359. package/dist/tools/fs/read-deny-home.d.ts +33 -47
  360. package/dist/tools/fs/read-deny-home.js +35 -49
  361. package/dist/tools/fs/read-deny.d.ts +23 -22
  362. package/dist/tools/fs/read-deny.js +114 -89
  363. package/dist/tools/fs/removal-targets.d.ts +56 -23
  364. package/dist/tools/fs/removal-targets.js +65 -87
  365. package/dist/tools/fs/safety.d.ts +29 -22
  366. package/dist/tools/fs/safety.js +17 -11
  367. package/dist/tools/fs/search.js +10 -8
  368. package/dist/tools/fs/shell-read-argv.js +1 -1
  369. package/dist/tools/fs/shell-read-bindings.d.ts +169 -37
  370. package/dist/tools/fs/shell-read-bindings.js +324 -86
  371. package/dist/tools/fs/shell-read-builtins.d.ts +35 -0
  372. package/dist/tools/fs/shell-read-builtins.js +43 -0
  373. package/dist/tools/fs/shell-read-check.d.ts +15 -1
  374. package/dist/tools/fs/shell-read-check.js +67 -43
  375. package/dist/tools/fs/shell-read-establish.js +6 -6
  376. package/dist/tools/fs/shell-read-functions.d.ts +22 -0
  377. package/dist/tools/fs/shell-read-functions.js +29 -0
  378. package/dist/tools/fs/shell-read-judge.d.ts +51 -18
  379. package/dist/tools/fs/shell-read-judge.js +40 -4
  380. package/dist/tools/fs/shell-read-plan.d.ts +12 -6
  381. package/dist/tools/fs/shell-read-plan.js +118 -113
  382. package/dist/tools/fs/shell-read-start.d.ts +29 -6
  383. package/dist/tools/fs/shell-read-start.js +16 -9
  384. package/dist/tools/fs/shell-read-word.js +4 -0
  385. package/dist/tools/fs/shell-read-workdir.d.ts +156 -0
  386. package/dist/tools/fs/shell-read-workdir.js +281 -0
  387. package/dist/tools/fs/shell-read-write-targets.d.ts +5 -2
  388. package/dist/tools/fs/shell-read-write-targets.js +14 -5
  389. package/dist/tools/fs/shell-reentry-text.d.ts +4 -6
  390. package/dist/tools/fs/shell-reentry-text.js +3 -11
  391. package/dist/tools/task-list.d.ts +1 -2
  392. package/dist/tools/web.js +1 -1
  393. package/package.json +4 -1
  394. package/test/export-surface.snapshot.json +107 -143
  395. package/wire-changes/core@7.49.0.json +4765 -0
  396. package/dist/agents/teacher.d.ts +0 -159
  397. package/dist/agents/teacher.js +0 -577
  398. package/dist/agents/team.d.ts +0 -226
  399. package/dist/agents/team.js +0 -257
  400. package/dist/core/strategy-store.d.ts +0 -238
  401. package/dist/core/strategy-store.js +0 -253
  402. package/dist/orchestration/builtin-workflows.d.ts +0 -133
  403. package/dist/orchestration/builtin-workflows.js +0 -159
  404. package/dist/scenarios/env.d.ts +0 -40
  405. package/dist/scenarios/env.js +0 -39
  406. package/dist/scenarios/scenario-registry.d.ts +0 -110
  407. package/dist/scenarios/scenario-registry.js +0 -140
  408. package/dist/scenarios/teacher-quickstart.d.ts +0 -40
  409. package/dist/scenarios/teacher-quickstart.js +0 -12
  410. package/dist/stores/cc/lockfile.d.ts +0 -10
  411. package/dist/stores/cc/lockfile.js +0 -98
  412. package/dist/stores/cc/mailbox-store.d.ts +0 -20
  413. package/dist/stores/cc/mailbox-store.js +0 -255
  414. package/dist/stores/cc/roster-adapter.d.ts +0 -12
  415. package/dist/stores/cc/roster-adapter.js +0 -117
  416. package/dist/stores/cc/sidecar-transcript.d.ts +0 -97
  417. package/dist/stores/cc/sidecar-transcript.js +0 -264
  418. package/dist/stores/cc/task-list-store.d.ts +0 -2
  419. package/dist/stores/cc/task-list-store.js +0 -125
  420. package/dist/stores/file/strategy-store.d.ts +0 -97
  421. package/dist/stores/file/strategy-store.js +0 -341
@@ -0,0 +1,892 @@
1
+ import type { AssertAllKeysHandled } from "./ask-origin.js";
2
+ import { type StoreFidelity, type Checkpoint, type CheckpointFeature, type CheckpointGate, type PendingAction } from "./checkpoint-store.js";
3
+ /**
4
+ * The closed set of reader-requirement words this engine knows. The first seven are the feature table's keys
5
+ * (the features that raised the row format before it froze); then the row digest's scheme; then the members a feature
6
+ * had carried beside the one its word now names, and the members added after the table, each a capability a reader
7
+ * must have. Downstream reads them for display only (`CheckpointError.detail.requires`).
8
+ */
9
+ export declare const REQUIREMENT_WORDS: readonly ["resource", "binding", "token", "orgAdmission", "f012", "realApproval", "face", "requirements_digest", "org_admission_inherited", "org_write_grant", "org_governed", "delegation_provenance", "skill_grants", "skill_card_binding", "hands_coordinates", "hands_home", "path_rule_anchors", "path_rule_installations", "permission_mode", "plan_mode_restore", "persisted_rule_mandate", "deployment_authored", "call_names", "write_face", "denial_limit_fallback", "leg_scope", "tool_ceiling", "tool_lists_judged"];
10
+ export type RequirementWord = (typeof REQUIREMENT_WORDS)[number];
11
+ /** Runtime twin of {@link RequirementWord}. */
12
+ export declare function isRequirementWord(word: unknown): word is RequirementWord;
13
+ /** Every feature that raised the format is a word (the baseline is the floor, `requirements` the frame). */
14
+ export type FeatureWordsAreRequirementWords = AssertAllKeysHandled<Exclude<Exclude<CheckpointFeature, "baseline" | "requirements">, RequirementWord>>;
15
+ /** What one persisted member owes the reader. The row digest covers every member a decision reads — a word member
16
+ * (a capability the reader must have) or a `digest` member (one every admitted reader already reads); a `mutable`
17
+ * member is rewritten after the mint by the store's own transitions, so the static digest cannot hold it; an
18
+ * `ignorable` member is shown and never decided. */
19
+ export type RequirementClass = {
20
+ readonly word: RequirementWord;
21
+ } | {
22
+ readonly digest: "decision-read";
23
+ } | {
24
+ readonly mutable: string;
25
+ } | {
26
+ readonly ignorable: string;
27
+ } | {
28
+ readonly members: RequirementTable;
29
+ } | {
30
+ readonly variants: {
31
+ readonly [kind: string]: RequirementTable;
32
+ };
33
+ };
34
+ export type RequirementTable = {
35
+ readonly [key: string]: RequirementClass;
36
+ };
37
+ /** A table over EVERY key of record `T` — a member left out is a compile error at the table. */
38
+ export type RequirementTableFor<T> = {
39
+ readonly [K in keyof T]-?: RequirementClass;
40
+ };
41
+ /** One table per variant of the discriminated union `U` — a new kind, or a new member of any variant, is a compile
42
+ * error. Each variant's `kind` entry classifies the kind itself. */
43
+ export type RequirementVariantsFor<U extends {
44
+ kind: string;
45
+ }> = {
46
+ readonly [K in U["kind"]]: RequirementTableFor<Extract<U, {
47
+ kind: K;
48
+ }>>;
49
+ };
50
+ /** The words a table's entries carry, read off its literal type (nested records and variants walked). */
51
+ type WordsIn<C> = C extends {
52
+ readonly word: infer W;
53
+ } ? W : C extends {
54
+ readonly members: infer M;
55
+ } ? WordsOfTable<M> : C extends {
56
+ readonly variants: infer V;
57
+ } ? WordsOfTable<V[keyof V]> : never;
58
+ type WordsOfTable<T> = T extends unknown ? {
59
+ [K in keyof T]: WordsIn<T[K]>;
60
+ }[keyof T] : never;
61
+ export declare const INHERITED_GATE_REQUIREMENTS: {
62
+ readonly ancestorRules: {
63
+ readonly digest: "decision-read";
64
+ };
65
+ readonly shellGate: {
66
+ readonly digest: "decision-read";
67
+ };
68
+ readonly permissionMode: {
69
+ readonly word: "permission_mode";
70
+ };
71
+ readonly prePlanMode: {
72
+ readonly word: "plan_mode_restore";
73
+ };
74
+ readonly admittedOrgScopes: {
75
+ readonly word: "org_admission_inherited";
76
+ };
77
+ readonly ownAdmittedOrgScopes: {
78
+ readonly word: "orgAdmission";
79
+ };
80
+ readonly ownAdmittedOrgWriteScope: {
81
+ readonly word: "org_write_grant";
82
+ };
83
+ readonly orgAdmissionGoverned: {
84
+ readonly word: "org_governed";
85
+ };
86
+ readonly pathRuleAnchors: {
87
+ readonly word: "path_rule_anchors";
88
+ };
89
+ readonly pathRuleInstallations: {
90
+ readonly word: "path_rule_installations";
91
+ };
92
+ readonly requiresParentConstraint: {
93
+ readonly digest: "decision-read";
94
+ };
95
+ readonly parentConstraintCount: {
96
+ readonly digest: "decision-read";
97
+ };
98
+ readonly constraintChain: {
99
+ readonly word: "f012";
100
+ };
101
+ readonly constraintDigest: {
102
+ readonly word: "f012";
103
+ };
104
+ };
105
+ export declare const CHECKPOINT_STATE_REQUIREMENTS: {
106
+ readonly activeTools: {
107
+ readonly digest: "decision-read";
108
+ };
109
+ readonly outputRef: {
110
+ readonly digest: "decision-read";
111
+ };
112
+ readonly nestedStats: {
113
+ readonly digest: "decision-read";
114
+ };
115
+ readonly readFileState: {
116
+ readonly digest: "decision-read";
117
+ };
118
+ readonly readFace: {
119
+ readonly word: "face";
120
+ };
121
+ readonly writeFace: {
122
+ readonly word: "write_face";
123
+ };
124
+ readonly skillGrants: {
125
+ readonly word: "skill_grants";
126
+ };
127
+ readonly reminderMark: {
128
+ readonly digest: "decision-read";
129
+ };
130
+ readonly repairBundle: {
131
+ readonly digest: "decision-read";
132
+ };
133
+ readonly workspaceHandle: {
134
+ readonly digest: "decision-read";
135
+ };
136
+ readonly pendingSteerQueue: {
137
+ readonly mutable: "store state-machine member; integrity = CAS contract + kit, see #1580";
138
+ };
139
+ readonly runningBackgroundTasks: {
140
+ readonly digest: "decision-read";
141
+ };
142
+ readonly handsCwd: {
143
+ readonly digest: "decision-read";
144
+ };
145
+ readonly handsRoot: {
146
+ readonly word: "hands_coordinates";
147
+ };
148
+ readonly handsHome: {
149
+ readonly word: "hands_home";
150
+ };
151
+ readonly activeWorktree: {
152
+ readonly digest: "decision-read";
153
+ };
154
+ readonly inheritedGate: {
155
+ readonly members: {
156
+ readonly ancestorRules: {
157
+ readonly digest: "decision-read";
158
+ };
159
+ readonly shellGate: {
160
+ readonly digest: "decision-read";
161
+ };
162
+ readonly permissionMode: {
163
+ readonly word: "permission_mode";
164
+ };
165
+ readonly prePlanMode: {
166
+ readonly word: "plan_mode_restore";
167
+ };
168
+ readonly admittedOrgScopes: {
169
+ readonly word: "org_admission_inherited";
170
+ };
171
+ readonly ownAdmittedOrgScopes: {
172
+ readonly word: "orgAdmission";
173
+ };
174
+ readonly ownAdmittedOrgWriteScope: {
175
+ readonly word: "org_write_grant";
176
+ };
177
+ readonly orgAdmissionGoverned: {
178
+ readonly word: "org_governed";
179
+ };
180
+ readonly pathRuleAnchors: {
181
+ readonly word: "path_rule_anchors";
182
+ };
183
+ readonly pathRuleInstallations: {
184
+ readonly word: "path_rule_installations";
185
+ };
186
+ readonly requiresParentConstraint: {
187
+ readonly digest: "decision-read";
188
+ };
189
+ readonly parentConstraintCount: {
190
+ readonly digest: "decision-read";
191
+ };
192
+ readonly constraintChain: {
193
+ readonly word: "f012";
194
+ };
195
+ readonly constraintDigest: {
196
+ readonly word: "f012";
197
+ };
198
+ };
199
+ };
200
+ readonly announcedListings: {
201
+ readonly ignorable: "shown, never decided (card, listing, transcript or reported count): every read of the name renders, carries transcript or counts";
202
+ };
203
+ readonly gitAnnouncement: {
204
+ readonly ignorable: "shown, never decided (card, listing, transcript or reported count): every read of the name renders, carries transcript or counts";
205
+ };
206
+ readonly delegationProvenance: {
207
+ readonly word: "delegation_provenance";
208
+ };
209
+ readonly isDelegatedChild: {
210
+ readonly digest: "decision-read";
211
+ };
212
+ readonly placementRootSessionId: {
213
+ readonly digest: "decision-read";
214
+ };
215
+ readonly externalContentTarget: {
216
+ readonly digest: "decision-read";
217
+ };
218
+ readonly legScope: {
219
+ readonly word: "leg_scope";
220
+ };
221
+ readonly toolCeiling: {
222
+ readonly word: "tool_ceiling";
223
+ };
224
+ readonly toolListsJudged: {
225
+ readonly word: "tool_lists_judged";
226
+ };
227
+ };
228
+ export declare const PENDING_ACTION_REQUIREMENTS: {
229
+ readonly tool_approval: {
230
+ readonly kind: {
231
+ readonly word: "binding";
232
+ };
233
+ readonly toolCallId: {
234
+ readonly digest: "decision-read";
235
+ };
236
+ readonly toolName: {
237
+ readonly digest: "decision-read";
238
+ };
239
+ readonly args: {
240
+ readonly digest: "decision-read";
241
+ };
242
+ readonly preview: {
243
+ readonly ignorable: "shown, never decided (card, listing, transcript or reported count): every read of the name renders, carries transcript or counts";
244
+ };
245
+ readonly previewWithheld: {
246
+ readonly ignorable: "shown, never decided (card, listing, transcript or reported count): every read of the name renders, carries transcript or counts";
247
+ };
248
+ readonly ruleOffers: {
249
+ readonly ignorable: "shown, never decided (card, listing, transcript or reported count): every read of the name renders, carries transcript or counts";
250
+ };
251
+ readonly ruleOffersAbsence: {
252
+ readonly ignorable: "shown, never decided (card, listing, transcript or reported count): every read of the name renders, carries transcript or counts";
253
+ };
254
+ readonly execCwd: {
255
+ readonly digest: "decision-read";
256
+ };
257
+ readonly requiresRealApproval: {
258
+ readonly digest: "decision-read";
259
+ };
260
+ readonly mandated: {
261
+ readonly word: "persisted_rule_mandate";
262
+ };
263
+ readonly authoredBy: {
264
+ readonly word: "deployment_authored";
265
+ };
266
+ readonly mandate: {
267
+ readonly digest: "decision-read";
268
+ };
269
+ readonly denialLimitFallback: {
270
+ readonly word: "denial_limit_fallback";
271
+ };
272
+ readonly classifierNoRuling: {
273
+ readonly digest: "decision-read";
274
+ };
275
+ readonly origin: {
276
+ readonly digest: "decision-read";
277
+ };
278
+ readonly askClass: {
279
+ readonly digest: "decision-read";
280
+ };
281
+ readonly classes: {
282
+ readonly digest: "decision-read";
283
+ };
284
+ readonly boundInputHash: {
285
+ readonly digest: "decision-read";
286
+ };
287
+ readonly boundGrantDigest: {
288
+ readonly word: "skill_card_binding";
289
+ };
290
+ readonly boundGrants: {
291
+ readonly ignorable: "shown, never decided (card, listing, transcript or reported count): every read of the name renders, carries transcript or counts";
292
+ };
293
+ readonly capabilityId: {
294
+ readonly digest: "decision-read";
295
+ };
296
+ readonly contractId: {
297
+ readonly digest: "decision-read";
298
+ };
299
+ readonly shapeDigest: {
300
+ readonly digest: "decision-read";
301
+ };
302
+ readonly implementationRevision: {
303
+ readonly digest: "decision-read";
304
+ };
305
+ readonly rosterDigest: {
306
+ readonly ignorable: "shown, never decided (card, listing, transcript or reported count): every read of the name renders, carries transcript or counts";
307
+ };
308
+ readonly family: {
309
+ readonly digest: "decision-read";
310
+ };
311
+ readonly pathTarget: {
312
+ readonly digest: "decision-read";
313
+ };
314
+ readonly names: {
315
+ readonly word: "call_names";
316
+ };
317
+ readonly hasBidiControls: {
318
+ readonly ignorable: "shown, never decided (card, listing, transcript or reported count): every read of the name renders, carries transcript or counts";
319
+ };
320
+ readonly batchToolCallIds: {
321
+ readonly digest: "decision-read";
322
+ };
323
+ readonly completedCallIds: {
324
+ readonly ignorable: "shown, never decided (card, listing, transcript or reported count): every read of the name renders, carries transcript or counts";
325
+ };
326
+ };
327
+ readonly resource_limit: {
328
+ readonly kind: {
329
+ readonly digest: "decision-read";
330
+ };
331
+ readonly reason: {
332
+ readonly digest: "decision-read";
333
+ };
334
+ };
335
+ readonly review: {
336
+ readonly kind: {
337
+ readonly digest: "decision-read";
338
+ };
339
+ };
340
+ readonly plan_review: {
341
+ readonly kind: {
342
+ readonly word: "binding";
343
+ };
344
+ };
345
+ readonly task_done: {
346
+ readonly kind: {
347
+ readonly digest: "decision-read";
348
+ };
349
+ };
350
+ };
351
+ export type PendingRequirementsCoverEveryKind = AssertAllKeysHandled<Exclude<PendingAction["kind"], keyof typeof PENDING_ACTION_REQUIREMENTS>>;
352
+ export declare const CHECKPOINT_GATE_REQUIREMENTS: {
353
+ readonly human: {
354
+ readonly kind: {
355
+ readonly digest: "decision-read";
356
+ };
357
+ readonly reason: {
358
+ readonly digest: "decision-read";
359
+ };
360
+ readonly toolName: {
361
+ readonly digest: "decision-read";
362
+ };
363
+ readonly approvalCard: {
364
+ readonly digest: "decision-read";
365
+ };
366
+ readonly riskDescriptor: {
367
+ readonly ignorable: "shown, never decided (card, listing, transcript or reported count): every read of the name renders, carries transcript or counts";
368
+ };
369
+ };
370
+ readonly irreversible_ask: {
371
+ readonly kind: {
372
+ readonly digest: "decision-read";
373
+ };
374
+ readonly reason: {
375
+ readonly digest: "decision-read";
376
+ };
377
+ readonly toolName: {
378
+ readonly digest: "decision-read";
379
+ };
380
+ readonly approvalCard: {
381
+ readonly digest: "decision-read";
382
+ };
383
+ readonly safetyAxis: {
384
+ readonly ignorable: "shown, never decided (card, listing, transcript or reported count): every read of the name renders, carries transcript or counts";
385
+ };
386
+ readonly realApproval: {
387
+ readonly word: "realApproval";
388
+ };
389
+ readonly riskDescriptor: {
390
+ readonly ignorable: "shown, never decided (card, listing, transcript or reported count): every read of the name renders, carries transcript or counts";
391
+ };
392
+ };
393
+ readonly resource_limit: {
394
+ readonly kind: {
395
+ readonly word: "resource";
396
+ };
397
+ readonly reason: {
398
+ readonly digest: "decision-read";
399
+ };
400
+ readonly resumeAfterMs: {
401
+ readonly digest: "decision-read";
402
+ };
403
+ };
404
+ readonly needs_review: {
405
+ readonly kind: {
406
+ readonly digest: "decision-read";
407
+ };
408
+ readonly reason: {
409
+ readonly digest: "decision-read";
410
+ };
411
+ };
412
+ readonly plan_review: {
413
+ readonly kind: {
414
+ readonly digest: "decision-read";
415
+ };
416
+ readonly reason: {
417
+ readonly digest: "decision-read";
418
+ };
419
+ };
420
+ readonly task_done: {
421
+ readonly kind: {
422
+ readonly digest: "decision-read";
423
+ };
424
+ };
425
+ };
426
+ export type GateRequirementsCoverEveryKind = AssertAllKeysHandled<Exclude<CheckpointGate["kind"], keyof typeof CHECKPOINT_GATE_REQUIREMENTS>>;
427
+ /** The row itself: its frame, its two records and its pause pair. */
428
+ export declare const CHECKPOINT_REQUIREMENTS: {
429
+ readonly token: {
430
+ readonly digest: "decision-read";
431
+ };
432
+ readonly checkpointId: {
433
+ readonly ignorable: "shown, never decided (card, listing, transcript or reported count): every read of the name renders, carries transcript or counts";
434
+ };
435
+ readonly version: {
436
+ readonly ignorable: "the format stamp itself";
437
+ };
438
+ readonly requires: {
439
+ readonly ignorable: "the format stamp itself";
440
+ };
441
+ readonly requirementsDigest: {
442
+ readonly word: "requirements_digest";
443
+ };
444
+ readonly scope: {
445
+ readonly digest: "decision-read";
446
+ };
447
+ readonly sessionId: {
448
+ readonly digest: "decision-read";
449
+ };
450
+ readonly leafId: {
451
+ readonly digest: "decision-read";
452
+ };
453
+ readonly state: {
454
+ readonly members: {
455
+ readonly activeTools: {
456
+ readonly digest: "decision-read";
457
+ };
458
+ readonly outputRef: {
459
+ readonly digest: "decision-read";
460
+ };
461
+ readonly nestedStats: {
462
+ readonly digest: "decision-read";
463
+ };
464
+ readonly readFileState: {
465
+ readonly digest: "decision-read";
466
+ };
467
+ readonly readFace: {
468
+ readonly word: "face";
469
+ };
470
+ readonly writeFace: {
471
+ readonly word: "write_face";
472
+ };
473
+ readonly skillGrants: {
474
+ readonly word: "skill_grants";
475
+ };
476
+ readonly reminderMark: {
477
+ readonly digest: "decision-read";
478
+ };
479
+ readonly repairBundle: {
480
+ readonly digest: "decision-read";
481
+ };
482
+ readonly workspaceHandle: {
483
+ readonly digest: "decision-read";
484
+ };
485
+ readonly pendingSteerQueue: {
486
+ readonly mutable: "store state-machine member; integrity = CAS contract + kit, see #1580";
487
+ };
488
+ readonly runningBackgroundTasks: {
489
+ readonly digest: "decision-read";
490
+ };
491
+ readonly handsCwd: {
492
+ readonly digest: "decision-read";
493
+ };
494
+ readonly handsRoot: {
495
+ readonly word: "hands_coordinates";
496
+ };
497
+ readonly handsHome: {
498
+ readonly word: "hands_home";
499
+ };
500
+ readonly activeWorktree: {
501
+ readonly digest: "decision-read";
502
+ };
503
+ readonly inheritedGate: {
504
+ readonly members: {
505
+ readonly ancestorRules: {
506
+ readonly digest: "decision-read";
507
+ };
508
+ readonly shellGate: {
509
+ readonly digest: "decision-read";
510
+ };
511
+ readonly permissionMode: {
512
+ readonly word: "permission_mode";
513
+ };
514
+ readonly prePlanMode: {
515
+ readonly word: "plan_mode_restore";
516
+ };
517
+ readonly admittedOrgScopes: {
518
+ readonly word: "org_admission_inherited";
519
+ };
520
+ readonly ownAdmittedOrgScopes: {
521
+ readonly word: "orgAdmission";
522
+ };
523
+ readonly ownAdmittedOrgWriteScope: {
524
+ readonly word: "org_write_grant";
525
+ };
526
+ readonly orgAdmissionGoverned: {
527
+ readonly word: "org_governed";
528
+ };
529
+ readonly pathRuleAnchors: {
530
+ readonly word: "path_rule_anchors";
531
+ };
532
+ readonly pathRuleInstallations: {
533
+ readonly word: "path_rule_installations";
534
+ };
535
+ readonly requiresParentConstraint: {
536
+ readonly digest: "decision-read";
537
+ };
538
+ readonly parentConstraintCount: {
539
+ readonly digest: "decision-read";
540
+ };
541
+ readonly constraintChain: {
542
+ readonly word: "f012";
543
+ };
544
+ readonly constraintDigest: {
545
+ readonly word: "f012";
546
+ };
547
+ };
548
+ };
549
+ readonly announcedListings: {
550
+ readonly ignorable: "shown, never decided (card, listing, transcript or reported count): every read of the name renders, carries transcript or counts";
551
+ };
552
+ readonly gitAnnouncement: {
553
+ readonly ignorable: "shown, never decided (card, listing, transcript or reported count): every read of the name renders, carries transcript or counts";
554
+ };
555
+ readonly delegationProvenance: {
556
+ readonly word: "delegation_provenance";
557
+ };
558
+ readonly isDelegatedChild: {
559
+ readonly digest: "decision-read";
560
+ };
561
+ readonly placementRootSessionId: {
562
+ readonly digest: "decision-read";
563
+ };
564
+ readonly externalContentTarget: {
565
+ readonly digest: "decision-read";
566
+ };
567
+ readonly legScope: {
568
+ readonly word: "leg_scope";
569
+ };
570
+ readonly toolCeiling: {
571
+ readonly word: "tool_ceiling";
572
+ };
573
+ readonly toolListsJudged: {
574
+ readonly word: "tool_lists_judged";
575
+ };
576
+ };
577
+ };
578
+ readonly resourceLedger: {
579
+ readonly members: {
580
+ readonly totalBudgetMicroUsd: {
581
+ readonly digest: "decision-read";
582
+ };
583
+ readonly totalTokens: {
584
+ readonly word: "token";
585
+ };
586
+ readonly spentMicroUsd: {
587
+ readonly digest: "decision-read";
588
+ };
589
+ readonly spentTokens: {
590
+ readonly digest: "decision-read";
591
+ };
592
+ readonly spentTurns: {
593
+ readonly ignorable: "shown, never decided (card, listing, transcript or reported count): every read of the name renders, carries transcript or counts";
594
+ };
595
+ readonly spentWalltimeMs: {
596
+ readonly ignorable: "shown, never decided (card, listing, transcript or reported count): every read of the name renders, carries transcript or counts";
597
+ };
598
+ readonly sliceCount: {
599
+ readonly digest: "decision-read";
600
+ };
601
+ };
602
+ };
603
+ readonly deadline: {
604
+ readonly digest: "decision-read";
605
+ };
606
+ readonly status: {
607
+ readonly mutable: "store state-machine member; integrity = CAS contract + kit, see #1580";
608
+ };
609
+ readonly createdAt: {
610
+ readonly digest: "decision-read";
611
+ };
612
+ readonly suspendCount: {
613
+ readonly digest: "decision-read";
614
+ };
615
+ readonly suspendedAt: {
616
+ readonly ignorable: "shown, never decided (card, listing, transcript or reported count): every read of the name renders, carries transcript or counts";
617
+ };
618
+ readonly humanReview: {
619
+ readonly digest: "decision-read";
620
+ };
621
+ readonly resolvedOutcome: {
622
+ readonly mutable: "store state-machine member; integrity = CAS contract + kit, see #1580";
623
+ };
624
+ readonly reopenReason: {
625
+ readonly mutable: "store state-machine member; integrity = CAS contract + kit, see #1580";
626
+ };
627
+ readonly rev: {
628
+ readonly mutable: "store state-machine member; integrity = CAS contract + kit, see #1580";
629
+ };
630
+ readonly sourceTaskId: {
631
+ readonly digest: "decision-read";
632
+ };
633
+ readonly principal: {
634
+ readonly digest: "decision-read";
635
+ };
636
+ readonly durableApproval: {
637
+ readonly digest: "decision-read";
638
+ };
639
+ readonly executionOutcome: {
640
+ readonly mutable: "store state-machine member; integrity = CAS contract + kit, see #1580";
641
+ };
642
+ readonly executionAtMs: {
643
+ readonly mutable: "the store's time stamp on the execution record: it changes after the mint and decides nothing";
644
+ };
645
+ readonly gate: {
646
+ readonly variants: {
647
+ readonly human: {
648
+ readonly kind: {
649
+ readonly digest: "decision-read";
650
+ };
651
+ readonly reason: {
652
+ readonly digest: "decision-read";
653
+ };
654
+ readonly toolName: {
655
+ readonly digest: "decision-read";
656
+ };
657
+ readonly approvalCard: {
658
+ readonly digest: "decision-read";
659
+ };
660
+ readonly riskDescriptor: {
661
+ readonly ignorable: "shown, never decided (card, listing, transcript or reported count): every read of the name renders, carries transcript or counts";
662
+ };
663
+ };
664
+ readonly irreversible_ask: {
665
+ readonly kind: {
666
+ readonly digest: "decision-read";
667
+ };
668
+ readonly reason: {
669
+ readonly digest: "decision-read";
670
+ };
671
+ readonly toolName: {
672
+ readonly digest: "decision-read";
673
+ };
674
+ readonly approvalCard: {
675
+ readonly digest: "decision-read";
676
+ };
677
+ readonly safetyAxis: {
678
+ readonly ignorable: "shown, never decided (card, listing, transcript or reported count): every read of the name renders, carries transcript or counts";
679
+ };
680
+ readonly realApproval: {
681
+ readonly word: "realApproval";
682
+ };
683
+ readonly riskDescriptor: {
684
+ readonly ignorable: "shown, never decided (card, listing, transcript or reported count): every read of the name renders, carries transcript or counts";
685
+ };
686
+ };
687
+ readonly resource_limit: {
688
+ readonly kind: {
689
+ readonly word: "resource";
690
+ };
691
+ readonly reason: {
692
+ readonly digest: "decision-read";
693
+ };
694
+ readonly resumeAfterMs: {
695
+ readonly digest: "decision-read";
696
+ };
697
+ };
698
+ readonly needs_review: {
699
+ readonly kind: {
700
+ readonly digest: "decision-read";
701
+ };
702
+ readonly reason: {
703
+ readonly digest: "decision-read";
704
+ };
705
+ };
706
+ readonly plan_review: {
707
+ readonly kind: {
708
+ readonly digest: "decision-read";
709
+ };
710
+ readonly reason: {
711
+ readonly digest: "decision-read";
712
+ };
713
+ };
714
+ readonly task_done: {
715
+ readonly kind: {
716
+ readonly digest: "decision-read";
717
+ };
718
+ };
719
+ };
720
+ };
721
+ readonly pendingAction: {
722
+ readonly variants: {
723
+ readonly tool_approval: {
724
+ readonly kind: {
725
+ readonly word: "binding";
726
+ };
727
+ readonly toolCallId: {
728
+ readonly digest: "decision-read";
729
+ };
730
+ readonly toolName: {
731
+ readonly digest: "decision-read";
732
+ };
733
+ readonly args: {
734
+ readonly digest: "decision-read";
735
+ };
736
+ readonly preview: {
737
+ readonly ignorable: "shown, never decided (card, listing, transcript or reported count): every read of the name renders, carries transcript or counts";
738
+ };
739
+ readonly previewWithheld: {
740
+ readonly ignorable: "shown, never decided (card, listing, transcript or reported count): every read of the name renders, carries transcript or counts";
741
+ };
742
+ readonly ruleOffers: {
743
+ readonly ignorable: "shown, never decided (card, listing, transcript or reported count): every read of the name renders, carries transcript or counts";
744
+ };
745
+ readonly ruleOffersAbsence: {
746
+ readonly ignorable: "shown, never decided (card, listing, transcript or reported count): every read of the name renders, carries transcript or counts";
747
+ };
748
+ readonly execCwd: {
749
+ readonly digest: "decision-read";
750
+ };
751
+ readonly requiresRealApproval: {
752
+ readonly digest: "decision-read";
753
+ };
754
+ readonly mandated: {
755
+ readonly word: "persisted_rule_mandate";
756
+ };
757
+ readonly authoredBy: {
758
+ readonly word: "deployment_authored";
759
+ };
760
+ readonly mandate: {
761
+ readonly digest: "decision-read";
762
+ };
763
+ readonly denialLimitFallback: {
764
+ readonly word: "denial_limit_fallback";
765
+ };
766
+ readonly classifierNoRuling: {
767
+ readonly digest: "decision-read";
768
+ };
769
+ readonly origin: {
770
+ readonly digest: "decision-read";
771
+ };
772
+ readonly askClass: {
773
+ readonly digest: "decision-read";
774
+ };
775
+ readonly classes: {
776
+ readonly digest: "decision-read";
777
+ };
778
+ readonly boundInputHash: {
779
+ readonly digest: "decision-read";
780
+ };
781
+ readonly boundGrantDigest: {
782
+ readonly word: "skill_card_binding";
783
+ };
784
+ readonly boundGrants: {
785
+ readonly ignorable: "shown, never decided (card, listing, transcript or reported count): every read of the name renders, carries transcript or counts";
786
+ };
787
+ readonly capabilityId: {
788
+ readonly digest: "decision-read";
789
+ };
790
+ readonly contractId: {
791
+ readonly digest: "decision-read";
792
+ };
793
+ readonly shapeDigest: {
794
+ readonly digest: "decision-read";
795
+ };
796
+ readonly implementationRevision: {
797
+ readonly digest: "decision-read";
798
+ };
799
+ readonly rosterDigest: {
800
+ readonly ignorable: "shown, never decided (card, listing, transcript or reported count): every read of the name renders, carries transcript or counts";
801
+ };
802
+ readonly family: {
803
+ readonly digest: "decision-read";
804
+ };
805
+ readonly pathTarget: {
806
+ readonly digest: "decision-read";
807
+ };
808
+ readonly names: {
809
+ readonly word: "call_names";
810
+ };
811
+ readonly hasBidiControls: {
812
+ readonly ignorable: "shown, never decided (card, listing, transcript or reported count): every read of the name renders, carries transcript or counts";
813
+ };
814
+ readonly batchToolCallIds: {
815
+ readonly digest: "decision-read";
816
+ };
817
+ readonly completedCallIds: {
818
+ readonly ignorable: "shown, never decided (card, listing, transcript or reported count): every read of the name renders, carries transcript or counts";
819
+ };
820
+ };
821
+ readonly resource_limit: {
822
+ readonly kind: {
823
+ readonly digest: "decision-read";
824
+ };
825
+ readonly reason: {
826
+ readonly digest: "decision-read";
827
+ };
828
+ };
829
+ readonly review: {
830
+ readonly kind: {
831
+ readonly digest: "decision-read";
832
+ };
833
+ };
834
+ readonly plan_review: {
835
+ readonly kind: {
836
+ readonly word: "binding";
837
+ };
838
+ };
839
+ readonly task_done: {
840
+ readonly kind: {
841
+ readonly digest: "decision-read";
842
+ };
843
+ };
844
+ };
845
+ };
846
+ };
847
+ /** ONE word list: the closed set is exactly the words the tables carry — every table word is a member (each entry is
848
+ * typed against the set) and every member is carried by some entry (this fence), both at compile time. */
849
+ export type RequirementWordsAreTheTablesWords = AssertAllKeysHandled<Exclude<RequirementWord, WordsOfTable<typeof CHECKPOINT_REQUIREMENTS>>>;
850
+ /** The words a row's content carries — a word for every word member present on it — sorted, without repeats.
851
+ * The ONE derivation: the mint writes it, the resume screen recomputes it. Total (a non-record reads as none). */
852
+ export declare function checkpointRequirementsFor(cp: Checkpoint): RequirementWord[];
853
+ /** A member a decision reads whose value the digest cannot encode: where it sits, and what it holds. */
854
+ export interface UnencodableMember {
855
+ readonly path: string;
856
+ readonly kind: "cycle" | "depth" | "function" | "symbol" | "unreadable" | "codec";
857
+ }
858
+ /** Where a value holds something the row digest cannot encode, or `undefined` — the park mint asks this of the
859
+ * arguments before any side effect, so such a call is refused before anything is paused. */
860
+ export declare function unencodableIn(value: unknown, path: string): UnencodableMember | undefined;
861
+ /** The row digest: sha256 (hex) over the binding serializer's canonical form ({@link canonicalize}: type-tagged,
862
+ * sorted keys) of every member a decision reads but the digest itself, keyed by path, each read through
863
+ * {@link digestProjection}. Never a constant: a value it cannot encode throws {@link RowNotEncodable}. */
864
+ export declare function requirementsDigestOf(cp: Checkpoint): string;
865
+ /** The one stamp: the row AS THE STORE AT `fidelity` HANDS IT BACK (the commit stamps with its store's declared
866
+ * fidelity, and writes exactly the row returned here), with the frozen version, the row digest of that reading and
867
+ * the words derived from it (the digest's word among them) — so a reader digests exactly what it read. A row that
868
+ * store's codec or the digest cannot encode is returned WITHOUT a digest, so it fails its own judge — which the
869
+ * commit asks before the write. */
870
+ export declare function stampCheckpointRequirements(row: Checkpoint, fidelity: StoreFidelity): Checkpoint;
871
+ /** The row as the store at `fidelity` hands it back, judged — the commit's question before the write. */
872
+ export declare function judgeAsStored(cp: Checkpoint, fidelity: StoreFidelity): CheckpointRequirementsVerdict;
873
+ /** The resume screen's reading of a row's requirement list. */
874
+ export type CheckpointRequirementsVerdict = {
875
+ readonly kind: "ok";
876
+ } | {
877
+ readonly kind: "lacking";
878
+ readonly words: readonly string[];
879
+ } | {
880
+ readonly kind: "damaged";
881
+ readonly why: string;
882
+ };
883
+ /**
884
+ * Judge a row's requirement list and digest against this engine and against the row's content, before the claim.
885
+ * - below v10: neither the list nor the digest may be present (no release of those versions wrote one);
886
+ * - v10: the list must be an array of strings; a word this engine lacks ⇒ `lacking` (a newer row); the digest's word
887
+ * must be declared (every v10 mint writes it); the words this engine knows must EQUAL the recomputed words; the
888
+ * digest must EQUAL the recomputed digest — a lost member, a lost element, a changed value is damage.
889
+ * Rows above v10 never reach it (the version ceiling refuses them first). Reads `requires` and the digest once each.
890
+ */
891
+ export declare function judgeCheckpointRequirements(cp: Checkpoint): CheckpointRequirementsVerdict;
892
+ export {};