@sema-agent/core 7.48.0 → 7.49.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 (418) hide show
  1. package/CHANGELOG.md +418 -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 +17 -24
  52. package/dist/core/arg-summary.js +169 -68
  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 +32 -7
  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 +4 -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 +27 -34
  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/turn-attachments.d.ts +1 -1
  243. package/dist/core/runner/write-protection-station.d.ts +21 -9
  244. package/dist/core/runner/write-protection-station.js +20 -17
  245. package/dist/core/runner-deps.d.ts +12 -22
  246. package/dist/core/secret-env.d.ts +16 -5
  247. package/dist/core/secret-env.js +23 -63
  248. package/dist/core/sensitive-path-policy.d.ts +19 -18
  249. package/dist/core/sensitive-path-policy.js +73 -49
  250. package/dist/core/session-reconcile.d.ts +3 -0
  251. package/dist/core/session-reconcile.js +5 -4
  252. package/dist/core/session-store.d.ts +5 -0
  253. package/dist/core/session-store.js +12 -0
  254. package/dist/core/session.d.ts +13 -0
  255. package/dist/core/shared-memory/normalize.d.ts +17 -4
  256. package/dist/core/shared-memory/normalize.js +7 -7
  257. package/dist/core/shell-lexer.js +5 -4
  258. package/dist/core/skill-grant.js +1 -1
  259. package/dist/core/store-contracts/checkpoint-store-contract.js +13 -0
  260. package/dist/core/store-contracts/mailbox-store-contract.d.ts +7 -14
  261. package/dist/core/store-contracts/session-store-incarnation-contract.d.ts +27 -0
  262. package/dist/core/store-contracts/session-store-incarnation-contract.js +92 -0
  263. package/dist/core/stub-env.d.ts +2 -0
  264. package/dist/core/stub-env.js +1 -0
  265. package/dist/core/synthetic-read-verdict.js +2 -2
  266. package/dist/core/task-event.d.ts +59 -5
  267. package/dist/core/task-result.d.ts +1 -1
  268. package/dist/core/task-spec.d.ts +42 -9
  269. package/dist/core/terminal-cause.d.ts +94 -11
  270. package/dist/core/tighten-task-spec.d.ts +5 -4
  271. package/dist/core/tighten-task-spec.js +20 -25
  272. package/dist/core/tool-catalog-entries.d.ts +5 -7
  273. package/dist/core/tool-catalog-entries.js +14 -15
  274. package/dist/core/tool-face.d.ts +47 -0
  275. package/dist/core/tool-face.js +5 -0
  276. package/dist/core/tool-model-gate.d.ts +5 -5
  277. package/dist/core/tool-name-aliases.d.ts +26 -2
  278. package/dist/core/tool-name-aliases.js +13 -0
  279. package/dist/core/tool-name-list.d.ts +30 -0
  280. package/dist/core/tool-name-list.js +55 -0
  281. package/dist/core/tool-name-readings.d.ts +1 -9
  282. package/dist/core/tool-name-readings.js +1 -3
  283. package/dist/core/tool-policy.d.ts +195 -85
  284. package/dist/core/tool-policy.js +165 -380
  285. package/dist/core/tool-registry.d.ts +44 -1
  286. package/dist/core/tool-registry.js +26 -0
  287. package/dist/core/tool-roster.d.ts +19 -1
  288. package/dist/core/tool-roster.js +21 -2
  289. package/dist/core/tool-spec-members.d.ts +45 -0
  290. package/dist/core/tool-spec-members.js +169 -0
  291. package/dist/core/tool-spec.d.ts +46 -8
  292. package/dist/core/tools.d.ts +6 -2
  293. package/dist/core/tools.js +8 -4
  294. package/dist/core/untrusted-egress.js +29 -26
  295. package/dist/core/untrusted-text.d.ts +13 -10
  296. package/dist/core/untrusted-text.js +6 -44
  297. package/dist/core/workflow-journal-store.d.ts +4 -1
  298. package/dist/core/write-protect.d.ts +65 -29
  299. package/dist/core/write-protect.js +235 -177
  300. package/dist/engine/compaction/compaction.d.ts +2 -2
  301. package/dist/engine/execution-env/node-execution-env.d.ts +5 -23
  302. package/dist/engine/execution-env/node-execution-env.js +16 -38
  303. package/dist/engine/execution-env/symlink-chain.d.ts +23 -0
  304. package/dist/engine/execution-env/symlink-chain.js +32 -0
  305. package/dist/engine/harness/types.d.ts +7 -0
  306. package/dist/engine/llm/tool-turns.d.ts +3 -0
  307. package/dist/engine/llm/tool-turns.js +1 -0
  308. package/dist/engine/llm/types.d.ts +59 -23
  309. package/dist/engine/loop/agent-loop.js +16 -2
  310. package/dist/engine/session/memory-repo.js +11 -3
  311. package/dist/engine/session/repo-utils.d.ts +8 -0
  312. package/dist/engine/session/repo-utils.js +13 -0
  313. package/dist/index.d.ts +20 -23
  314. package/dist/index.js +17 -20
  315. package/dist/internal/harness.d.ts +1 -1
  316. package/dist/internal/harness.js +1 -1
  317. package/dist/internal/llm.d.ts +2 -2
  318. package/dist/internal/llm.js +1 -1
  319. package/dist/orchestration/governance-baseline-validity.js +1 -1
  320. package/dist/orchestration/run-spec.js +3 -3
  321. package/dist/orchestration/run-workflow-tool.d.ts +16 -35
  322. package/dist/orchestration/run-workflow-tool.js +38 -78
  323. package/dist/orchestration/workflow-governance.d.ts +21 -25
  324. package/dist/orchestration/workflow-governance.js +38 -78
  325. package/dist/orchestration/workflow-primitives.d.ts +7 -22
  326. package/dist/orchestration/workflow-primitives.js +5 -12
  327. package/dist/orchestration/workflow-types.d.ts +1 -1
  328. package/dist/orchestration/workflow.d.ts +61 -11
  329. package/dist/orchestration/workflow.js +189 -117
  330. package/dist/scenarios/full-body.d.ts +1 -1
  331. package/dist/shell/lex.d.ts +0 -21
  332. package/dist/shell/lex.js +250 -68
  333. package/dist/shell/shell-words.d.ts +35 -0
  334. package/dist/shell/shell-words.js +65 -0
  335. package/dist/stores/file/checkpoint-store.d.ts +5 -5
  336. package/dist/stores/file/checkpoint-store.js +5 -2
  337. package/dist/stores/file/index.d.ts +0 -8
  338. package/dist/stores/file/index.js +0 -12
  339. package/dist/stores/file/session-store.d.ts +3 -0
  340. package/dist/stores/file/session-store.js +44 -19
  341. package/dist/tools/artifact/artifact-tool.js +2 -0
  342. package/dist/tools/fs/bash-program-position.d.ts +10 -3
  343. package/dist/tools/fs/bash-program-position.js +21 -9
  344. package/dist/tools/fs/bash-readonly-classifier.d.ts +1 -1
  345. package/dist/tools/fs/bash-readonly-classifier.js +8 -7
  346. package/dist/tools/fs/containment-face.d.ts +4 -0
  347. package/dist/tools/fs/containment-face.js +3 -0
  348. package/dist/tools/fs/fs-shared.d.ts +10 -0
  349. package/dist/tools/fs/fs-shared.js +18 -0
  350. package/dist/tools/fs/fs-write.js +4 -2
  351. package/dist/tools/fs/index.d.ts +1 -1
  352. package/dist/tools/fs/program-read-model.d.ts +39 -18
  353. package/dist/tools/fs/program-read-model.js +29 -19
  354. package/dist/tools/fs/program-read-model.rows.d.ts +0 -14
  355. package/dist/tools/fs/program-read-model.rows.js +5 -5
  356. package/dist/tools/fs/read-deny-home.d.ts +33 -47
  357. package/dist/tools/fs/read-deny-home.js +35 -49
  358. package/dist/tools/fs/read-deny.d.ts +23 -22
  359. package/dist/tools/fs/read-deny.js +114 -89
  360. package/dist/tools/fs/removal-targets.d.ts +56 -23
  361. package/dist/tools/fs/removal-targets.js +65 -87
  362. package/dist/tools/fs/safety.d.ts +29 -22
  363. package/dist/tools/fs/safety.js +17 -11
  364. package/dist/tools/fs/search.js +10 -8
  365. package/dist/tools/fs/shell-read-argv.js +1 -1
  366. package/dist/tools/fs/shell-read-bindings.d.ts +169 -37
  367. package/dist/tools/fs/shell-read-bindings.js +324 -86
  368. package/dist/tools/fs/shell-read-builtins.d.ts +35 -0
  369. package/dist/tools/fs/shell-read-builtins.js +43 -0
  370. package/dist/tools/fs/shell-read-check.d.ts +15 -1
  371. package/dist/tools/fs/shell-read-check.js +51 -42
  372. package/dist/tools/fs/shell-read-establish.js +6 -6
  373. package/dist/tools/fs/shell-read-functions.d.ts +22 -0
  374. package/dist/tools/fs/shell-read-functions.js +29 -0
  375. package/dist/tools/fs/shell-read-judge.d.ts +48 -18
  376. package/dist/tools/fs/shell-read-judge.js +33 -4
  377. package/dist/tools/fs/shell-read-plan.d.ts +12 -6
  378. package/dist/tools/fs/shell-read-plan.js +118 -113
  379. package/dist/tools/fs/shell-read-start.d.ts +29 -6
  380. package/dist/tools/fs/shell-read-start.js +16 -9
  381. package/dist/tools/fs/shell-read-word.js +4 -0
  382. package/dist/tools/fs/shell-read-workdir.d.ts +156 -0
  383. package/dist/tools/fs/shell-read-workdir.js +281 -0
  384. package/dist/tools/fs/shell-read-write-targets.d.ts +5 -2
  385. package/dist/tools/fs/shell-read-write-targets.js +14 -5
  386. package/dist/tools/fs/shell-reentry-text.d.ts +4 -6
  387. package/dist/tools/fs/shell-reentry-text.js +3 -11
  388. package/dist/tools/task-list.d.ts +1 -2
  389. package/dist/tools/web.js +1 -1
  390. package/package.json +4 -1
  391. package/test/export-surface.snapshot.json +107 -143
  392. package/wire-changes/core@7.49.0.json +4765 -0
  393. package/dist/agents/teacher.d.ts +0 -159
  394. package/dist/agents/teacher.js +0 -577
  395. package/dist/agents/team.d.ts +0 -226
  396. package/dist/agents/team.js +0 -257
  397. package/dist/core/strategy-store.d.ts +0 -238
  398. package/dist/core/strategy-store.js +0 -253
  399. package/dist/orchestration/builtin-workflows.d.ts +0 -133
  400. package/dist/orchestration/builtin-workflows.js +0 -159
  401. package/dist/scenarios/env.d.ts +0 -40
  402. package/dist/scenarios/env.js +0 -39
  403. package/dist/scenarios/scenario-registry.d.ts +0 -110
  404. package/dist/scenarios/scenario-registry.js +0 -140
  405. package/dist/scenarios/teacher-quickstart.d.ts +0 -40
  406. package/dist/scenarios/teacher-quickstart.js +0 -12
  407. package/dist/stores/cc/lockfile.d.ts +0 -10
  408. package/dist/stores/cc/lockfile.js +0 -98
  409. package/dist/stores/cc/mailbox-store.d.ts +0 -20
  410. package/dist/stores/cc/mailbox-store.js +0 -255
  411. package/dist/stores/cc/roster-adapter.d.ts +0 -12
  412. package/dist/stores/cc/roster-adapter.js +0 -117
  413. package/dist/stores/cc/sidecar-transcript.d.ts +0 -97
  414. package/dist/stores/cc/sidecar-transcript.js +0 -264
  415. package/dist/stores/cc/task-list-store.d.ts +0 -2
  416. package/dist/stores/cc/task-list-store.js +0 -125
  417. package/dist/stores/file/strategy-store.d.ts +0 -97
  418. package/dist/stores/file/strategy-store.js +0 -341
@@ -34,6 +34,11 @@ import type { ContainmentFace } from "../tools/fs/containment-face.js";
34
34
  *
35
35
  * - `content_question` — the reserved question tool: a content-ROUTING signal, not a permission
36
36
  * question; it leaves the gate through the content channel, never through a permission decider.
37
+ * - `plan_review` — a durable PLAN pause: the model's own request (the first-party plan tool) stopped the run for a human
38
+ * verdict on a PLAN. Same family as `content_question` — a content-routing ask, never a permission question, so no
39
+ * permission decider, classifier or mode answers it and it never reaches an approver as an `AskRequest`. The word is stamped
40
+ * by the plan pause's decide lane alone (derived from the row's kind, nothing persisted), so the decided row's record names
41
+ * the ask it settled like every other settlement does.
37
42
  * - `ancestor_marked` — the call is MARKED by an ancestor (an inherited approver-unavailable float, or
38
43
  * a durable mandate floated down because this task can park it): it must reach the park with no
39
44
  * synchronous decision-maker in between. The word names WHO raised it (an ancestor's mark), like every
@@ -70,7 +75,7 @@ import type { ContainmentFace } from "../tools/fs/containment-face.js";
70
75
  * observer or an approval card can say WHICH engine layer raised the question, which one word
71
76
  * could not.
72
77
  */
73
- export declare const ASK_ORIGINS: readonly ["content_question", "ancestor_marked", "org_unavailable", "org_rule", "rule_store_unavailable", "hook", "ask_rule", "denial_limit_fallback", "shell_gate_tighten", "safety_tighten", "policy"];
78
+ export declare const ASK_ORIGINS: readonly ["content_question", "plan_review", "ancestor_marked", "org_unavailable", "org_rule", "rule_store_unavailable", "hook", "ask_rule", "denial_limit_fallback", "shell_gate_tighten", "safety_tighten", "policy"];
74
79
  export type AskOrigin = (typeof ASK_ORIGINS)[number];
75
80
  /** Whether a value is a member of the closed origin set. Exported because the word crosses process
76
81
  * boundaries: a host validating one it received must not hand-roll the set. */
@@ -263,6 +268,7 @@ export declare function ownedClearanceFacts(d: Extract<PermissionResult, {
263
268
  */
264
269
  export declare const ORIGIN_IMPLIES_REAL_APPROVAL: {
265
270
  readonly content_question: false;
271
+ readonly plan_review: false;
266
272
  readonly ancestor_marked: false;
267
273
  readonly org_unavailable: "at_derivation";
268
274
  readonly org_rule: "at_derivation";
@@ -288,10 +294,10 @@ export type RealApprovalTableCoversEveryOrigin = AssertAllKeysHandled<Exclude<As
288
294
  * - `probe_unanswered` — the probe was consulted and did not answer: the boundary is UNKNOWN.
289
295
  * - `write_protection` — the table covers this write's target. A write onto load-executed configuration
290
296
  * re-authorizes the agent, so the question is a property of the TARGET, not of anyone's hesitation.
291
- * - `write_protection_unresolved` — the judge could not RESOLVE the target: `probe_unanswered`'s
292
- * doctrine one layer over.
297
+ * - `target_unresolved` — the reading of a written target could not say where it leads on disk:
298
+ * `probe_unanswered`'s doctrine one layer over.
293
299
  */
294
- export declare const PERSISTED_RULE_MANDATES: readonly ["operator_always", "tool_marks", "probe_mandate", "probe_unanswered", "write_protection", "write_protection_unresolved"];
300
+ export declare const PERSISTED_RULE_MANDATES: readonly ["operator_always", "tool_marks", "probe_mandate", "probe_unanswered", "write_protection", "target_unresolved"];
295
301
  export type PersistedRuleMandate = (typeof PERSISTED_RULE_MANDATES)[number];
296
302
  /** Membership test for {@link PersistedRuleMandate} — the screen a row reader applies to a stored word. */
297
303
  export declare function isPersistedRuleMandate(v: unknown): v is PersistedRuleMandate;
@@ -303,7 +309,7 @@ declare const MANDATE_DISCLOSURE: {
303
309
  readonly operator_always: "this deployment mandates per-call confirmation for shell commands (shellGate: always)";
304
310
  readonly tool_marks: "this tool carries egress/irreversibility/interaction marks (a mandated confirmation a rule cannot clear)";
305
311
  readonly write_protection: "this write's target is on the deployment's write-protection table (the agent's own configuration is guarded one look per write) — it is cleared by confirming this call, never by a standing allow rule";
306
- readonly write_protection_unresolved: "the write-protection judge could not resolve this write's target, so whether it lands on the protected table is unknown — it is cleared by confirming this call: no standing rule and no automatic decider answers for it, though a wired approver seat can";
312
+ readonly target_unresolved: "where this write leads on disk could not be determined (a link on the way could not be examined, or the environment could not resolve the target), so whether it lands on a guarded path is unknown — it is cleared by confirming this call: no standing rule and no automatic decider answers for it, though a wired approver seat can";
307
313
  };
308
314
  /** The fence over the disclosure table: `never` while every word has a row. */
309
315
  export type DisclosureTableCoversEveryMandate = AssertAllKeysHandled<Exclude<PersistedRuleMandate, keyof typeof MANDATE_DISCLOSURE>>;
@@ -330,10 +336,11 @@ export declare function mandateDisclosureOf(mandate: PersistedRuleMandate | unde
330
336
  * above is deliberately the ONLY thing that carves a mandate out of it;
331
337
  * · a tool's OWN `"always"`/`"maybe"` irreversibility tier without the doctrine (`"tool_marks"`).
332
338
  *
333
- * The two per-call write-protection seats sit BELOW the probe words and ABOVE the seat marks, on the
334
- * ladder's rule: a word no lane may answer outranks the rest, and a fact about THIS call outranks a
335
- * property of the tool. Judged HERE, not in {@link irreversibilityMandateOf} which {@link safetyAxisOf}
336
- * shares: such a write is not an irreversible action, and its park stays budgetable.
339
+ * The unresolved written target sits ABOVE the probe words (the read station mints both on one call, and this one names
340
+ * why its finding stands); the matched write-protection row sits BELOW them and ABOVE the seat marks, on the ladder's rule:
341
+ * a word no lane may answer outranks the rest, and a fact about THIS call outranks a property of the tool. Judged HERE, not
342
+ * in {@link irreversibilityMandateOf} which {@link safetyAxisOf} shares: such a write is not an irreversible action, and
343
+ * its park stays budgetable.
337
344
  *
338
345
  * Two consumers, one derivation: the gate's silencing arm (a matching rule is disclosed as shadowed
339
346
  * instead of clearing the ask) and the runner's suggestion factory (a mandated ask offers no
@@ -361,9 +368,10 @@ export interface MandateMarks {
361
368
  * for a shell command's written targets). A GATE fact like the org words: it rides the pass, not the decision, so no
362
369
  * layer outside the engine declares it. */
363
370
  writeProtected?: boolean;
364
- /** The same record for the judge's other non-clear verdict — consulted, could not RESOLVE the target.
365
- * The pair is the write face's twin of `probeMandated` / `probeUnanswered`, mutually exclusive. */
366
- writeProtectionUnresolved?: boolean;
371
+ /** The gate's record that the READING of a written target could not say where it leads on disk (`GatePass.targetUnresolved`:
372
+ * a target a shell command's program writes, placed, whose destination the read station could not resolve) — a fact of
373
+ * the reading, never a judge's verdict. The write face's twin of `probeUnanswered`. */
374
+ targetUnresolved?: boolean;
367
375
  /** The pass's own record that the probe was consulted and did not answer (`GatePass.probeUnanswered`):
368
376
  * the boundary is unknown, which no standing yes may stand in for. The runner's suggestion factory does
369
377
  * not see the pass and never passes it — a card may offer a rule the lane then discloses as shadowed
@@ -452,9 +460,13 @@ export type ToolMarkSource = "deployment" | "mcp_annotation" | "a2a_default";
452
460
  * `dangerous_delete` is a removal whose target is a protected location (`dangerousRemovalOf`: the filesystem root, a
453
461
  * top-level directory, a home directory, or a workspace directory — the task root, the working directory, an additional
454
462
  * working directory — or an ancestor of one): the reference implementation's dangerous-removal breaker, which no mode,
455
- * allow rule or classifier answers. `unverifiable_delete` is its sibling for a target the command text cannot resolve.
463
+ * allow rule or classifier answers. `unverifiable_delete` is its sibling for a target the command text cannot resolve;
464
+ * `unverifiable_shell_text` is a shell handed text the command does not spell (a program's output, a substitution, a
465
+ * file's content, an argv a stream fills in): the engine cannot read what that shell will execute. Its row is
466
+ * `unverifiable_delete`'s save the classifier column — such a shell was `dangerous_delete` before it had a word of its own,
467
+ * and the classifier did not answer that.
456
468
  */
457
- export declare const ASK_CLASSES: readonly ["content_question", "hook", "ancestor", "dangerous_delete", "unverifiable_delete", "transcript_write", "org_rule", "governance_unavailable", "rule_unreadable", "ask_rule", "denial_limit_fallback", "classifier_no_ruling", "requires_user_interaction", "operator_forced", "shell_floor", "write_protection_unresolved", "probe", "write_protection", "tool_marks_mcp", "tool_marks_a2a", "policy_rra", "artifact_shared_read", "mode", "unstated", "ordinary"];
469
+ export declare const ASK_CLASSES: readonly ["content_question", "hook", "ancestor", "dangerous_delete", "unverifiable_delete", "unverifiable_shell_text", "transcript_write", "org_rule", "governance_unavailable", "rule_unreadable", "ask_rule", "denial_limit_fallback", "classifier_no_ruling", "requires_user_interaction", "operator_forced", "shell_floor", "target_unresolved", "probe", "write_protection", "tool_marks_mcp", "tool_marks_a2a", "policy_rra", "artifact_shared_read", "mode", "unstated", "ordinary"];
458
470
  export type AskClass = (typeof ASK_CLASSES)[number];
459
471
  /** Membership test for {@link AskClass} — the word crosses the wire on `tool_end.gate.disposition`. */
460
472
  export declare function isAskClass(v: unknown): v is AskClass;
@@ -488,7 +500,7 @@ export interface ModeArbitrationRow {
488
500
  * tool's effect lands at a remote peer, outside any containment the leg declares). `hookAskFloor` marks the classes the reference's rule / safety check answers
489
501
  * `ask` for — an ask rule, a question the tool needs a person for, a dangerous removal, a protected or unresolvable write
490
502
  * target, the session transcript, another's shared artifact.
491
- * A row is a class's reading on every face but the ones {@link RELEASED_ON_SHELL_FACE} names: `write_protection_unresolved`'s
503
+ * A row is a class's reading on every face but the ones {@link RELEASED_ON_SHELL_FACE} names: `target_unresolved`'s
492
504
  * `bypassImmune` is the file face's (and every other face's) reading, and the shell face reads it released — folded where the
493
505
  * ask's row is ({@link foldArbitrationRow}), listed per face by {@link releasableAskClassesFor}.
494
506
  */
@@ -528,6 +540,13 @@ export declare const MODE_ARBITRATION: {
528
540
  readonly ruleMayClear: false;
529
541
  readonly hookAskFloor: true;
530
542
  };
543
+ readonly unverifiable_shell_text: {
544
+ readonly bypassImmune: true;
545
+ readonly classifierEligible: false;
546
+ readonly sandboxAdmission: false;
547
+ readonly ruleMayClear: false;
548
+ readonly hookAskFloor: true;
549
+ };
531
550
  readonly transcript_write: {
532
551
  readonly bypassImmune: false;
533
552
  readonly classifierEligible: true;
@@ -598,7 +617,7 @@ export declare const MODE_ARBITRATION: {
598
617
  readonly ruleMayClear: false;
599
618
  readonly hookAskFloor: false;
600
619
  };
601
- readonly write_protection_unresolved: {
620
+ readonly target_unresolved: {
602
621
  readonly bypassImmune: true;
603
622
  readonly classifierEligible: false;
604
623
  readonly sandboxAdmission: true;
@@ -695,13 +714,13 @@ export declare function releasableAskClassesFor(face: AskFace): readonly AskClas
695
714
  /**
696
715
  * The closed set of `reason` words a mode release carries (`GateDisposition.released.reason`, the `released` arm of
697
716
  * {@link Arbitration}): each is a releasable class the release record names on its own — `rule_unreadable`, a release
698
- * over a person's rule the call could not be read against; `write_protection_unresolved`, a release (the shell face only,
699
- * {@link RELEASED_ON_SHELL_FACE}) over a write target the judge could not resolve. A release carries the first member (array order) its class
717
+ * over a person's rule the call could not be read against; `target_unresolved`, a release (the shell face only,
718
+ * {@link RELEASED_ON_SHELL_FACE}) over a write target whose reading could not say where it leads. A release carries the first member (array order) its class
700
719
  * set holds, and none when it holds no member. {@link arbitrateByMode} and {@link isModeReleaseReason} read one copy
701
720
  * of this list taken at load (a caller that writes into the exported array changes neither), so a new reason is one
702
721
  * word here.
703
722
  */
704
- export declare const MODE_RELEASE_REASONS: readonly ["rule_unreadable", "write_protection_unresolved"];
723
+ export declare const MODE_RELEASE_REASONS: readonly ["rule_unreadable", "target_unresolved"];
705
724
  export type ModeReleaseReason = (typeof MODE_RELEASE_REASONS)[number];
706
725
  /** Membership test for {@link ModeReleaseReason} — the word crosses the wire on `tool_end.gate.disposition.released.reason`. */
707
726
  export declare function isModeReleaseReason(v: unknown): v is ModeReleaseReason;
@@ -834,11 +853,10 @@ export type Arbitration = {
834
853
  * The ONE mode read point. `dontAsk` refuses every ask — one value for every class — but a hook's that no member of the
835
854
  * set floors (`hookAskFloor`: a hook's ask beside a rule's or a safety check's ask is refused, as the reference's full
836
855
  * pipeline refuses it; a hook's ask alone is the reference's forced decision, which never reaches that conversion);
837
- * `bypassPermissions` refuses a write whose protection could not be judged where that class stays immune (the file
838
- * face: a person cannot be asked, and releasing would be looser than the allow the write-protection tighten refuses there —
839
- * the folded row says it, {@link foldArbitrationRow}), keeps every immune class and releases the rest: the shell face
840
- * releases that class ({@link RELEASED_ON_SHELL_FACE}), and there the tighten turns an allow into the same question rather
841
- * than a refusal (`writeProtectionTightenDecision` reads the face), so on neither face is the release looser than an allow;
856
+ * `bypassPermissions` refuses a write whose target's reading could not say where it leads where that class stays immune
857
+ * (every face but the shell's: a person cannot be asked — the folded row says it, {@link foldArbitrationRow}), keeps every
858
+ * immune class and releases the rest: the shell face releases that class ({@link RELEASED_ON_SHELL_FACE}), the reference
859
+ * implementation's answer for a command whose written target could not be resolved;
842
860
  * `acceptEdits` answers an ORDINARY ask itself on a call the caller vouches is one of the mode's file commands
843
861
  * (`call.fileCommand`, `accepted`); `plan`, `default` and `auto` hand every ask on (plan's own questions were raised by
844
862
  * its write gate; the reference implementation refuses nothing at this point under plan — auto's classifier reads the
@@ -1,5 +1,5 @@
1
1
  import { isShellFaceToolName } from "./tool-registry.js";
2
- export const ASK_ORIGINS = Object.freeze(["content_question", "ancestor_marked", "org_unavailable", "org_rule", "rule_store_unavailable", "hook", "ask_rule", "denial_limit_fallback", "shell_gate_tighten", "safety_tighten", "policy"]);
2
+ export const ASK_ORIGINS = Object.freeze(["content_question", "plan_review", "ancestor_marked", "org_unavailable", "org_rule", "rule_store_unavailable", "hook", "ask_rule", "denial_limit_fallback", "shell_gate_tighten", "safety_tighten", "policy"]);
3
3
  const ASK_ORIGIN_SET = new Set(ASK_ORIGINS);
4
4
  export function isAskOrigin(v) {
5
5
  return ASK_ORIGIN_SET.has(v);
@@ -93,6 +93,7 @@ function originLadder(decision, facts) {
93
93
  }
94
94
  export const ORIGIN_IMPLIES_REAL_APPROVAL = {
95
95
  content_question: false,
96
+ plan_review: false,
96
97
  ancestor_marked: false,
97
98
  org_unavailable: "at_derivation",
98
99
  org_rule: "at_derivation",
@@ -104,7 +105,7 @@ export const ORIGIN_IMPLIES_REAL_APPROVAL = {
104
105
  safety_tighten: false,
105
106
  policy: false,
106
107
  };
107
- export const PERSISTED_RULE_MANDATES = Object.freeze(["operator_always", "tool_marks", "probe_mandate", "probe_unanswered", "write_protection", "write_protection_unresolved"]);
108
+ export const PERSISTED_RULE_MANDATES = Object.freeze(["operator_always", "tool_marks", "probe_mandate", "probe_unanswered", "write_protection", "target_unresolved"]);
108
109
  const PERSISTED_RULE_MANDATE_SET = new Set(PERSISTED_RULE_MANDATES);
109
110
  export function isPersistedRuleMandate(v) {
110
111
  return PERSISTED_RULE_MANDATE_SET.has(v);
@@ -115,17 +116,17 @@ const MANDATE_DISCLOSURE = {
115
116
  operator_always: "this deployment mandates per-call confirmation for shell commands (shellGate: always)",
116
117
  tool_marks: "this tool carries egress/irreversibility/interaction marks (a mandated confirmation a rule cannot clear)",
117
118
  write_protection: "this write's target is on the deployment's write-protection table (the agent's own configuration is guarded one look per write) — it is cleared by confirming this call, never by a standing allow rule",
118
- write_protection_unresolved: "the write-protection judge could not resolve this write's target, so whether it lands on the protected table is unknown — it is cleared by confirming this call: no standing rule and no automatic decider answers for it, though a wired approver seat can",
119
+ target_unresolved: "where this write leads on disk could not be determined (a link on the way could not be examined, or the environment could not resolve the target), so whether it lands on a guarded path is unknown — it is cleared by confirming this call: no standing rule and no automatic decider answers for it, though a wired approver seat can",
119
120
  };
120
121
  export function mandateDisclosureOf(mandate) {
121
122
  return mandate === undefined ? "an explicit ask rule matched this call (a person's or the deployment's ask-me-each-time outranks a standing allow rule)" : MANDATE_DISCLOSURE[mandate];
122
123
  }
123
124
  export function persistedRuleMandateOf(marks) {
125
+ if (marks.targetUnresolved === true)
126
+ return "target_unresolved";
124
127
  const word = irreversibilityMandateOf(marks);
125
128
  if (word === "probe_mandate" || word === "probe_unanswered")
126
129
  return word;
127
- if (marks.writeProtectionUnresolved === true)
128
- return "write_protection_unresolved";
129
130
  if (marks.writeProtected === true)
130
131
  return "write_protection";
131
132
  return marks.egress === true || marks.requiresUserInteraction === true ? "tool_marks" : word;
@@ -173,6 +174,7 @@ export const ASK_CLASSES = Object.freeze([
173
174
  "ancestor",
174
175
  "dangerous_delete",
175
176
  "unverifiable_delete",
177
+ "unverifiable_shell_text",
176
178
  "transcript_write",
177
179
  "org_rule",
178
180
  "governance_unavailable",
@@ -183,7 +185,7 @@ export const ASK_CLASSES = Object.freeze([
183
185
  "requires_user_interaction",
184
186
  "operator_forced",
185
187
  "shell_floor",
186
- "write_protection_unresolved",
188
+ "target_unresolved",
187
189
  "probe",
188
190
  "write_protection",
189
191
  "tool_marks_mcp",
@@ -204,6 +206,7 @@ export const MODE_ARBITRATION = {
204
206
  ancestor: { bypassImmune: true, classifierEligible: false, sandboxAdmission: false, ruleMayClear: false, hookAskFloor: false },
205
207
  dangerous_delete: { bypassImmune: true, classifierEligible: false, sandboxAdmission: false, ruleMayClear: false, hookAskFloor: true },
206
208
  unverifiable_delete: { bypassImmune: true, classifierEligible: true, sandboxAdmission: false, ruleMayClear: false, hookAskFloor: true },
209
+ unverifiable_shell_text: { bypassImmune: true, classifierEligible: false, sandboxAdmission: false, ruleMayClear: false, hookAskFloor: true },
207
210
  transcript_write: { bypassImmune: false, classifierEligible: true, sandboxAdmission: false, ruleMayClear: false, hookAskFloor: true },
208
211
  org_rule: { bypassImmune: true, classifierEligible: false, sandboxAdmission: false, ruleMayClear: false, hookAskFloor: false },
209
212
  governance_unavailable: { bypassImmune: true, classifierEligible: false, sandboxAdmission: false, ruleMayClear: false, hookAskFloor: false },
@@ -214,7 +217,7 @@ export const MODE_ARBITRATION = {
214
217
  requires_user_interaction: { bypassImmune: true, classifierEligible: false, sandboxAdmission: false, ruleMayClear: false, hookAskFloor: true },
215
218
  operator_forced: { bypassImmune: true, classifierEligible: true, sandboxAdmission: true, ruleMayClear: false, hookAskFloor: false },
216
219
  shell_floor: { bypassImmune: true, classifierEligible: true, sandboxAdmission: true, ruleMayClear: false, hookAskFloor: false },
217
- write_protection_unresolved: { bypassImmune: true, classifierEligible: false, sandboxAdmission: true, ruleMayClear: false, hookAskFloor: true },
220
+ target_unresolved: { bypassImmune: true, classifierEligible: false, sandboxAdmission: true, ruleMayClear: false, hookAskFloor: true },
218
221
  probe: { bypassImmune: false, classifierEligible: true, sandboxAdmission: false, ruleMayClear: false, hookAskFloor: false },
219
222
  write_protection: { bypassImmune: false, classifierEligible: true, sandboxAdmission: true, ruleMayClear: false, hookAskFloor: true },
220
223
  tool_marks_mcp: { bypassImmune: false, classifierEligible: true, sandboxAdmission: true, ruleMayClear: false, hookAskFloor: false },
@@ -229,12 +232,12 @@ export const ASK_FACES = Object.freeze(["shell", "other"]);
229
232
  export function askFaceOf(toolName) {
230
233
  return isShellFaceToolName(toolName) ? "shell" : "other";
231
234
  }
232
- const RELEASED_ON_SHELL_FACE = new Set(["write_protection_unresolved"]);
235
+ const RELEASED_ON_SHELL_FACE = new Set(["target_unresolved"]);
233
236
  function bypassImmuneOn(c, face) {
234
237
  return MODE_ARBITRATION[c].bypassImmune && !(face === "shell" && RELEASED_ON_SHELL_FACE.has(c));
235
238
  }
236
239
  const CLASSIFIER_WITHHELD_ON_ROOTS = new Set(["probe"]);
237
- export const RRA_EXPLAINERS = new Set(["dangerous_delete", "unverifiable_delete", "transcript_write", "org_rule", "governance_unavailable", "rule_unreadable", "denial_limit_fallback", "classifier_no_ruling", "ancestor", "artifact_shared_read", "requires_user_interaction"]);
240
+ export const RRA_EXPLAINERS = new Set(["dangerous_delete", "unverifiable_delete", "unverifiable_shell_text", "transcript_write", "org_rule", "governance_unavailable", "rule_unreadable", "denial_limit_fallback", "classifier_no_ruling", "ancestor", "artifact_shared_read", "requires_user_interaction"]);
238
241
  const RELEASABLE_BY_FACE = Object.freeze({
239
242
  shell: Object.freeze(ASK_CLASSES.filter((c) => !bypassImmuneOn(c, "shell"))),
240
243
  other: Object.freeze(ASK_CLASSES.filter((c) => !bypassImmuneOn(c, "other"))),
@@ -244,7 +247,7 @@ export function releasableAskClassesFor(face) {
244
247
  throw new TypeError(`releasableAskClassesFor: "${String(face)}" is not an ask face (${ASK_FACES.join(", ")})`);
245
248
  return RELEASABLE_BY_FACE[face];
246
249
  }
247
- export const MODE_RELEASE_REASONS = Object.freeze(["rule_unreadable", "write_protection_unresolved"]);
250
+ export const MODE_RELEASE_REASONS = Object.freeze(["rule_unreadable", "target_unresolved"]);
248
251
  const MODE_RELEASE_REASON_SET = new Set(MODE_RELEASE_REASONS);
249
252
  export function isModeReleaseReason(v) {
250
253
  return MODE_RELEASE_REASON_SET.has(v);
@@ -267,6 +270,8 @@ export function decisionAskClassesOf(d) {
267
270
  out.add("dangerous_delete");
268
271
  if (d.guard === "unverifiable_delete")
269
272
  out.add("unverifiable_delete");
273
+ if (d.guard === "unverifiable_shell_text")
274
+ out.add("unverifiable_shell_text");
270
275
  if (d.guard === "transcript_write")
271
276
  out.add("transcript_write");
272
277
  if (d.guard === "artifact_shared_read")
@@ -340,8 +345,8 @@ export function classifyAsk(d, facts) {
340
345
  }
341
346
  if (marks.probeUnanswered === true)
342
347
  classes.add("probe");
343
- if (marks.writeProtectionUnresolved === true)
344
- classes.add("write_protection_unresolved");
348
+ if (marks.targetUnresolved === true)
349
+ classes.add("target_unresolved");
345
350
  if (marks.writeProtected === true)
346
351
  classes.add("write_protection");
347
352
  if (facts.tightened === "unstated")
@@ -396,7 +401,7 @@ export function arbitrateByMode(mode, c, disclosure, call) {
396
401
  case "dontAsk":
397
402
  return has("hook") && !c.row.hookAskFloor ? { kind: "ask" } : { kind: "denied_by_mode", mode, askClass: c.askClass, classes };
398
403
  case "bypassPermissions":
399
- if (has("write_protection_unresolved") && c.row.bypassImmune)
404
+ if (has("target_unresolved") && c.row.bypassImmune)
400
405
  return { kind: "denied_by_mode", mode, askClass: c.askClass, classes };
401
406
  if (c.row.bypassImmune)
402
407
  return { kind: "ask" };
@@ -1,5 +1,5 @@
1
- /** The auto-mode classifier SYSTEM prompt shell (CC 2.1.207 `auto_mode_system_prompt`, plus the
2
- * design/278 G6 passed-through-approval exception in consent-bar principle 7 — see the header note).
1
+ /** The auto-mode classifier SYSTEM prompt shell (CC 2.1.207 `auto_mode_system_prompt`, with consent-bar
2
+ * principle 7 at its CC 2.1.291 text — see the header note).
3
3
  * Contains two assembly placeholders consumed by `buildAutoModePrompt`: `<permissions_template>`
4
4
  * (replaced by the permissions document) and `<cross_session_messages_rule>` (replaced with "" —
5
5
  * the 206/207 default). */