@sema-agent/core 7.59.0 → 7.60.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 (360) hide show
  1. package/CHANGELOG.md +564 -0
  2. package/dist/agents/agent-definition.d.ts +7 -0
  3. package/dist/agents/agent-definition.js +12 -0
  4. package/dist/agents/agent-transcript-tool.d.ts +2 -1
  5. package/dist/agents/agent-transcript-tool.js +3 -1
  6. package/dist/agents/child-model-seat.js +6 -3
  7. package/dist/agents/cumulative-stats.js +0 -1
  8. package/dist/agents/inherited-tool-pool.d.ts +26 -1
  9. package/dist/agents/inherited-tool-pool.js +22 -0
  10. package/dist/agents/retain-ledger.d.ts +11 -1
  11. package/dist/agents/retain-ledger.js +13 -2
  12. package/dist/agents/roster-store.d.ts +1 -1
  13. package/dist/agents/roster-store.js +3 -1
  14. package/dist/agents/send-message-tool.d.ts +8 -19
  15. package/dist/agents/send-message-tool.js +11 -38
  16. package/dist/agents/subagent.d.ts +51 -17
  17. package/dist/agents/subagent.js +117 -78
  18. package/dist/agents/tool-filter.d.ts +1 -3
  19. package/dist/agents/tool-filter.js +4 -12
  20. package/dist/bench/metrics.d.ts +3 -5
  21. package/dist/bench/metrics.js +0 -1
  22. package/dist/brain/degrading.js +3 -1
  23. package/dist/brain/route-adjudicator.js +3 -1
  24. package/dist/brain/status-sink.d.ts +7 -1
  25. package/dist/brain/status-sink.js +6 -0
  26. package/dist/brain/timeout.d.ts +3 -1
  27. package/dist/brain/timeout.js +18 -5
  28. package/dist/core/a2a.d.ts +15 -5
  29. package/dist/core/a2a.js +34 -19
  30. package/dist/core/agent-definition.d.ts +20 -0
  31. package/dist/core/allow-entry.d.ts +2 -0
  32. package/dist/core/allow-entry.js +3 -1
  33. package/dist/core/artifact-host.d.ts +0 -2
  34. package/dist/core/artifact-host.js +0 -1
  35. package/dist/core/auto-mode-defaults.d.ts +8 -0
  36. package/dist/core/auto-mode-defaults.js +1 -0
  37. package/dist/core/auto-mode-rebuild.d.ts +2 -1
  38. package/dist/core/auto-mode.d.ts +39 -4
  39. package/dist/core/auto-mode.js +63 -12
  40. package/dist/core/background-agent-store.d.ts +10 -1
  41. package/dist/core/background-agent-store.js +3 -2
  42. package/dist/core/background-shell.d.ts +12 -1
  43. package/dist/core/background-shell.js +12 -0
  44. package/dist/core/checkpoint-store.d.ts +8 -13
  45. package/dist/core/checkpoint-store.js +4 -3
  46. package/dist/core/compliance.d.ts +1 -1
  47. package/dist/core/credential-echo.d.ts +52 -0
  48. package/dist/core/credential-echo.js +65 -0
  49. package/dist/core/credential-vocabulary.d.ts +13 -3
  50. package/dist/core/credential-vocabulary.js +12 -4
  51. package/dist/core/cross-boundary-taint.d.ts +4 -5
  52. package/dist/core/engine-notice.d.ts +58 -15
  53. package/dist/core/frame-settlement.d.ts +5 -0
  54. package/dist/core/frame-settlement.js +4 -0
  55. package/dist/core/gate-fold.js +7 -5
  56. package/dist/core/gate-lanes.js +39 -8
  57. package/dist/core/governance-codes.d.ts +9 -1
  58. package/dist/core/governance-codes.js +12 -0
  59. package/dist/core/hands-band-screen.js +0 -1
  60. package/dist/core/hands-band.d.ts +0 -3
  61. package/dist/core/hooks.d.ts +39 -56
  62. package/dist/core/hooks.js +123 -77
  63. package/dist/core/image-admission.d.ts +104 -51
  64. package/dist/core/image-admission.js +170 -46
  65. package/dist/core/image-downsample.d.ts +36 -69
  66. package/dist/core/image-downsample.js +111 -73
  67. package/dist/core/integer-option.d.ts +21 -0
  68. package/dist/core/integer-option.js +13 -0
  69. package/dist/core/locked-config.d.ts +54 -3
  70. package/dist/core/locked-config.js +81 -50
  71. package/dist/core/mcp-call-meta.d.ts +2 -2
  72. package/dist/core/mcp-call-meta.js +9 -10
  73. package/dist/core/mcp-failure.d.ts +9 -3
  74. package/dist/core/mcp-failure.js +10 -0
  75. package/dist/core/mcp-host-seat.d.ts +92 -0
  76. package/dist/core/mcp-host-seat.js +131 -0
  77. package/dist/core/mcp-probe.d.ts +7 -2
  78. package/dist/core/mcp-probe.js +7 -2
  79. package/dist/core/mcp-server-spec.d.ts +38 -9
  80. package/dist/core/mcp-server-spec.js +55 -21
  81. package/dist/core/mcp.d.ts +17 -6
  82. package/dist/core/mcp.js +67 -55
  83. package/dist/core/memory-admission.d.ts +23 -6
  84. package/dist/core/memory-admission.js +19 -9
  85. package/dist/core/memory-engine/content-origin.d.ts +13 -0
  86. package/dist/core/memory-engine/content-origin.js +21 -3
  87. package/dist/core/memory-engine/index.d.ts +2 -1
  88. package/dist/core/memory-engine/index.js +2 -1
  89. package/dist/core/memory-engine/scope-contract.d.ts +13 -3
  90. package/dist/core/memory-engine/scope-contract.js +2 -2
  91. package/dist/core/memory-engine/sync-client.d.ts +45 -11
  92. package/dist/core/memory-engine/sync-client.js +82 -11
  93. package/dist/core/memory-engine/sync-report.d.ts +103 -0
  94. package/dist/core/memory-engine/sync-report.js +119 -0
  95. package/dist/core/memory-engine/sync.d.ts +4 -2
  96. package/dist/core/mode-policy.d.ts +9 -1
  97. package/dist/core/mode-policy.js +11 -1
  98. package/dist/core/model-receipt.d.ts +39 -0
  99. package/dist/core/model-receipt.js +139 -0
  100. package/dist/core/mods/agent-stations.d.ts +65 -0
  101. package/dist/core/mods/agent-stations.js +105 -0
  102. package/dist/core/mods/kernel/dispatch.d.ts +5 -1
  103. package/dist/core/mods/kernel/dispatch.js +4 -4
  104. package/dist/core/mods/kernel/events.d.ts +10 -4
  105. package/dist/core/mods/kernel/events.js +10 -6
  106. package/dist/core/mods/kernel/receive.d.ts +5 -0
  107. package/dist/core/mods/kernel/receive.js +10 -0
  108. package/dist/core/mods/lifecycle-stations.d.ts +41 -0
  109. package/dist/core/mods/lifecycle-stations.js +35 -0
  110. package/dist/core/mods/stations.d.ts +51 -59
  111. package/dist/core/mods/stations.js +32 -42
  112. package/dist/core/mods/tool-call.d.ts +10 -4
  113. package/dist/core/mods/tool-call.js +28 -12
  114. package/dist/core/mounted-mcp.d.ts +5 -0
  115. package/dist/core/mounted-mcp.js +2 -2
  116. package/dist/core/namespaced-rule-name.d.ts +7 -1
  117. package/dist/core/namespaced-rule-name.js +13 -2
  118. package/dist/core/oracle-isolation.js +1 -1
  119. package/dist/core/own-property-receipt.d.ts +3 -0
  120. package/dist/core/own-property-receipt.js +3 -0
  121. package/dist/core/park-selfcheck.js +8 -8
  122. package/dist/core/peer-seat.d.ts +63 -8
  123. package/dist/core/peer-seat.js +179 -34
  124. package/dist/core/permission-rule-consent.d.ts +0 -21
  125. package/dist/core/permission-rule-consent.js +1 -2
  126. package/dist/core/permission-rule-model.d.ts +4 -2
  127. package/dist/core/permission-rule-model.js +7 -6
  128. package/dist/core/protocol-http-auth.d.ts +14 -2
  129. package/dist/core/protocol-http-auth.js +16 -7
  130. package/dist/core/read-face-seats.d.ts +7 -5
  131. package/dist/core/read-face-seats.js +4 -1
  132. package/dist/core/redaction-marks.d.ts +4 -3
  133. package/dist/core/redaction-marks.js +2 -2
  134. package/dist/core/remote-env.d.ts +146 -98
  135. package/dist/core/remote-env.js +113 -14
  136. package/dist/core/retention.js +37 -12
  137. package/dist/core/retired-keys.d.ts +6 -1
  138. package/dist/core/retired-keys.js +4 -1
  139. package/dist/core/rewrite-rejudge.d.ts +12 -5
  140. package/dist/core/rewrite-rejudge.js +9 -5
  141. package/dist/core/roles.d.ts +37 -3
  142. package/dist/core/roles.js +126 -78
  143. package/dist/core/rule-owner.d.ts +3 -0
  144. package/dist/core/runner/assemble-result.d.ts +0 -5
  145. package/dist/core/runner/assemble-result.js +0 -1
  146. package/dist/core/runner/call-hook-stations.d.ts +17 -10
  147. package/dist/core/runner/call-hook-stations.js +21 -10
  148. package/dist/core/runner/child-tree.d.ts +7 -8
  149. package/dist/core/runner/child-tree.js +6 -6
  150. package/dist/core/runner/classifier-ladder.d.ts +10 -2
  151. package/dist/core/runner/classifier-ladder.js +39 -8
  152. package/dist/core/runner/construction-doors.js +5 -0
  153. package/dist/core/runner/contracts.d.ts +62 -41
  154. package/dist/core/runner/cross-boundary-lane.d.ts +3 -5
  155. package/dist/core/runner/cross-boundary-lane.js +11 -2
  156. package/dist/core/runner/env-capability-census.d.ts +15 -20
  157. package/dist/core/runner/env-capability-census.js +25 -34
  158. package/dist/core/runner/file-history-request.d.ts +2 -2
  159. package/dist/core/runner/file-history-request.js +0 -8
  160. package/dist/core/runner/gate-exit.d.ts +75 -7
  161. package/dist/core/runner/gate-exit.js +20 -1
  162. package/dist/core/runner/git-status-frame.d.ts +5 -2
  163. package/dist/core/runner/git-status-frame.js +3 -4
  164. package/dist/core/runner/image.d.ts +7 -2
  165. package/dist/core/runner/image.js +14 -8
  166. package/dist/core/runner/inline-image.d.ts +10 -8
  167. package/dist/core/runner/inline-image.js +11 -9
  168. package/dist/core/runner/memory-consolidation-driver.js +4 -4
  169. package/dist/core/runner/permission-rule-lanes.js +1 -1
  170. package/dist/core/runner/prepare-boundary-parks.d.ts +2 -2
  171. package/dist/core/runner/prepare-boundary-parks.js +3 -3
  172. package/dist/core/runner/prepare-caps-and-workflow.d.ts +4 -0
  173. package/dist/core/runner/prepare-caps-and-workflow.js +4 -3
  174. package/dist/core/runner/prepare-config-doors.d.ts +6 -1
  175. package/dist/core/runner/prepare-config-doors.js +14 -9
  176. package/dist/core/runner/prepare-delegation-surface.d.ts +5 -3
  177. package/dist/core/runner/prepare-delegation-surface.js +4 -4
  178. package/dist/core/runner/prepare-file-history.d.ts +10 -12
  179. package/dist/core/runner/prepare-file-history.js +3 -12
  180. package/dist/core/runner/prepare-gate-stations.d.ts +4 -3
  181. package/dist/core/runner/prepare-gate-stations.js +4 -3
  182. package/dist/core/runner/prepare-hands-readface.d.ts +3 -1
  183. package/dist/core/runner/prepare-hands-readface.js +15 -7
  184. package/dist/core/runner/prepare-inherited-gate.d.ts +5 -4
  185. package/dist/core/runner/prepare-inherited-gate.js +9 -5
  186. package/dist/core/runner/prepare-memory-engine-session.js +1 -1
  187. package/dist/core/runner/prepare-memory.d.ts +2 -2
  188. package/dist/core/runner/prepare-memory.js +2 -2
  189. package/dist/core/runner/prepare-park-ask.d.ts +3 -5
  190. package/dist/core/runner/prepare-park-ask.js +3 -8
  191. package/dist/core/runner/prepare-policy-chain.d.ts +5 -4
  192. package/dist/core/runner/prepare-policy-chain.js +120 -108
  193. package/dist/core/runner/prepare-project-context.js +8 -5
  194. package/dist/core/runner/prepare-prompt-inputs.d.ts +4 -1
  195. package/dist/core/runner/prepare-prompt-inputs.js +3 -2
  196. package/dist/core/runner/prepare-protocol-tools.d.ts +5 -3
  197. package/dist/core/runner/prepare-protocol-tools.js +9 -2
  198. package/dist/core/runner/prepare-suspend-saga.d.ts +0 -2
  199. package/dist/core/runner/prepare-suspend-saga.js +5 -7
  200. package/dist/core/runner/prepare-task.js +41 -27
  201. package/dist/core/runner/prepare-turn-wiring.d.ts +2 -0
  202. package/dist/core/runner/prepare-turn-wiring.js +7 -2
  203. package/dist/core/runner/prepare-wiring-manifest.d.ts +4 -3
  204. package/dist/core/runner/prepare-wiring-manifest.js +32 -18
  205. package/dist/core/runner/prepare-workspace-restore.js +3 -3
  206. package/dist/core/runner/resume-checkpoint-screen.js +4 -4
  207. package/dist/core/runner/retired-runner-deps.js +4 -1
  208. package/dist/core/runner/run-attachment-seats.js +3 -3
  209. package/dist/core/runner/run-brain-sinks.js +1 -0
  210. package/dist/core/runner/run-git-lane.d.ts +3 -1
  211. package/dist/core/runner/run-git-lane.js +1 -1
  212. package/dist/core/runner/run-harness-handlers.d.ts +3 -1
  213. package/dist/core/runner/run-harness-handlers.js +3 -1
  214. package/dist/core/runner/run-identity-wiring.js +1 -1
  215. package/dist/core/runner/run-leg.js +26 -28
  216. package/dist/core/runner/run-notification-lane.d.ts +3 -1
  217. package/dist/core/runner/run-notification-lane.js +16 -10
  218. package/dist/core/runner/run-settle-and-teardown.js +5 -1
  219. package/dist/core/runner/run-stop-and-final-verify.d.ts +4 -0
  220. package/dist/core/runner/run-stop-and-final-verify.js +12 -4
  221. package/dist/core/runner/run-turn-boundary.js +12 -7
  222. package/dist/core/runner/runtask.d.ts +7 -4
  223. package/dist/core/runner/runtask.js +19 -11
  224. package/dist/core/runner/skills-seat.js +2 -2
  225. package/dist/core/runner/sub-agent-deny-lists.js +10 -7
  226. package/dist/core/runner/synthetic-tools.js +2 -2
  227. package/dist/core/runner/tool-disclosure.js +0 -2
  228. package/dist/core/runner/tool-face-overlay.d.ts +1 -1
  229. package/dist/core/runner/tool-face-overlay.js +26 -19
  230. package/dist/core/runner/tool-result-media-seat.d.ts +9 -1
  231. package/dist/core/runner/tool-result-media-seat.js +17 -1
  232. package/dist/core/runner/turn-attachments.d.ts +3 -5
  233. package/dist/core/runner/turn-attachments.js +3 -16
  234. package/dist/core/runner-deps.d.ts +31 -18
  235. package/dist/core/secret-env.d.ts +3 -2
  236. package/dist/core/session-policy-store.d.ts +9 -2
  237. package/dist/core/session-policy-store.js +16 -1
  238. package/dist/core/session-store.d.ts +3 -2
  239. package/dist/core/session-store.js +50 -11
  240. package/dist/core/skill-grant.d.ts +9 -0
  241. package/dist/core/skill-grant.js +18 -0
  242. package/dist/core/store-contracts/tool-result-store-contract.d.ts +1 -1
  243. package/dist/core/store-contracts/tool-result-store-contract.js +37 -0
  244. package/dist/core/stub-env.d.ts +5 -5
  245. package/dist/core/stub-env.js +11 -1
  246. package/dist/core/swappable-deps.d.ts +17 -43
  247. package/dist/core/swappable-deps.js +15 -5
  248. package/dist/core/synthetic-read-verdict.d.ts +1 -1
  249. package/dist/core/task-event.d.ts +18 -2
  250. package/dist/core/task-notification.d.ts +88 -5
  251. package/dist/core/task-notification.js +130 -7
  252. package/dist/core/task-registry-agent.d.ts +18 -12
  253. package/dist/core/task-registry-agent.js +18 -6
  254. package/dist/core/task-registry-monitor.d.ts +7 -0
  255. package/dist/core/task-registry-monitor.js +28 -1
  256. package/dist/core/task-registry-shared.d.ts +38 -3
  257. package/dist/core/task-registry-shared.js +21 -7
  258. package/dist/core/task-registry-workflow.js +1 -1
  259. package/dist/core/task-registry.d.ts +50 -35
  260. package/dist/core/task-registry.js +64 -23
  261. package/dist/core/task-result.d.ts +3 -12
  262. package/dist/core/task-spec.d.ts +3 -6
  263. package/dist/core/task-stream.d.ts +1 -1
  264. package/dist/core/tool-catalog-entries.js +1 -1
  265. package/dist/core/tool-face-reader.d.ts +7 -6
  266. package/dist/core/tool-face-reader.js +4 -3
  267. package/dist/core/tool-name-aliases.d.ts +19 -0
  268. package/dist/core/tool-name-aliases.js +54 -2
  269. package/dist/core/tool-policy.d.ts +5 -4
  270. package/dist/core/tool-policy.js +1 -1
  271. package/dist/core/tool-registry.d.ts +5 -5
  272. package/dist/core/tool-registry.js +2 -2
  273. package/dist/core/tool-result-store.d.ts +88 -5
  274. package/dist/core/tool-result-store.js +51 -12
  275. package/dist/core/tool-spec.d.ts +20 -4
  276. package/dist/core/trace.d.ts +0 -1
  277. package/dist/core/types.d.ts +3 -3
  278. package/dist/core/types.js +1 -1
  279. package/dist/core/untrusted-text.js +1 -1
  280. package/dist/core/user-attachment.d.ts +10 -5
  281. package/dist/core/user-attachment.js +14 -6
  282. package/dist/engine/execution-env/node-execution-env.d.ts +7 -2
  283. package/dist/engine/execution-env/node-execution-env.js +12 -1
  284. package/dist/engine/harness/agent-harness.d.ts +1 -1
  285. package/dist/engine/harness/agent-harness.js +8 -4
  286. package/dist/engine/harness/types.d.ts +112 -29
  287. package/dist/engine/loop/agent-loop.d.ts +12 -12
  288. package/dist/engine/loop/agent-loop.js +153 -21
  289. package/dist/engine/loop/types.d.ts +9 -2
  290. package/dist/engine/lsp/node-lsp-manager.d.ts +3 -3
  291. package/dist/engine/lsp/node-lsp-manager.js +32 -13
  292. package/dist/index.d.ts +22 -14
  293. package/dist/index.js +15 -10
  294. package/dist/internal/harness-types.d.ts +1 -1
  295. package/dist/orchestration/run-workflow-tool.d.ts +9 -3
  296. package/dist/orchestration/run-workflow-tool.js +59 -29
  297. package/dist/orchestration/workflow-governance.d.ts +1 -1
  298. package/dist/orchestration/workflow-governance.js +2 -1
  299. package/dist/orchestration/workflow.d.ts +4 -0
  300. package/dist/orchestration/workflow.js +25 -4
  301. package/dist/prompts/default.d.ts +1 -10
  302. package/dist/prompts/default.js +0 -2
  303. package/dist/stores/file/background-agent-store.d.ts +1 -1
  304. package/dist/stores/file/background-agent-store.js +3 -1
  305. package/dist/stores/file/checkpoint-store.d.ts +127 -2
  306. package/dist/stores/file/checkpoint-store.js +19 -14
  307. package/dist/stores/file/file-history-store.d.ts +1 -1
  308. package/dist/stores/file/file-history-store.js +3 -1
  309. package/dist/stores/file/index.d.ts +4 -3
  310. package/dist/stores/file/index.js +17 -8
  311. package/dist/stores/file/mailbox-store.d.ts +1 -1
  312. package/dist/stores/file/mailbox-store.js +3 -1
  313. package/dist/stores/file/memory-store.d.ts +1 -1
  314. package/dist/stores/file/memory-store.js +3 -1
  315. package/dist/stores/file/session-policy-store.d.ts +1 -1
  316. package/dist/stores/file/session-policy-store.js +3 -1
  317. package/dist/stores/file/session-store.d.ts +1 -1
  318. package/dist/stores/file/session-store.js +3 -1
  319. package/dist/stores/file/shared-ledger.d.ts +26 -0
  320. package/dist/stores/file/shared-ledger.js +38 -9
  321. package/dist/stores/file/tool-result-store.d.ts +20 -2
  322. package/dist/stores/file/tool-result-store.js +74 -6
  323. package/dist/stores/file/usage-window-store.d.ts +1 -1
  324. package/dist/stores/file/usage-window-store.js +3 -1
  325. package/dist/stores/file/workflow-journal-store.d.ts +1 -11
  326. package/dist/stores/file/workflow-journal-store.js +3 -2
  327. package/dist/tools/fs/containment-face.d.ts +5 -0
  328. package/dist/tools/fs/encoding.d.ts +13 -4
  329. package/dist/tools/fs/encoding.js +17 -2
  330. package/dist/tools/fs/fs-bash-background-text.d.ts +7 -0
  331. package/dist/tools/fs/fs-bash-background-text.js +1 -0
  332. package/dist/tools/fs/fs-bash.d.ts +8 -4
  333. package/dist/tools/fs/fs-bash.js +26 -35
  334. package/dist/tools/fs/fs-pdf.d.ts +2 -2
  335. package/dist/tools/fs/fs-pdf.js +26 -21
  336. package/dist/tools/fs/fs-read.d.ts +5 -4
  337. package/dist/tools/fs/fs-read.js +35 -18
  338. package/dist/tools/fs/fs-search-tools.js +4 -1
  339. package/dist/tools/fs/fs-shared.d.ts +11 -13
  340. package/dist/tools/fs/fs-shared.js +11 -7
  341. package/dist/tools/fs/fs-write.js +5 -5
  342. package/dist/tools/fs/index.d.ts +14 -8
  343. package/dist/tools/fs/index.js +8 -4
  344. package/dist/tools/fs/read-floor.d.ts +44 -1
  345. package/dist/tools/fs/read-floor.js +35 -0
  346. package/dist/tools/fs/removal-targets.d.ts +9 -4
  347. package/dist/tools/fs/removal-targets.js +17 -9
  348. package/dist/tools/fs/search.d.ts +3 -3
  349. package/dist/tools/fs/search.js +4 -4
  350. package/dist/tools/monitor.d.ts +5 -4
  351. package/dist/tools/monitor.js +15 -8
  352. package/dist/tools/scheduler-tools.js +42 -4
  353. package/dist/tools/web.d.ts +0 -10
  354. package/dist/tools/web.js +1 -4
  355. package/package.json +4 -2
  356. package/test/export-surface.snapshot.json +75 -21
  357. package/wire-changes/core-stores-sql@7.60.0.json +30 -0
  358. package/wire-changes/core@7.60.0.json +3274 -0
  359. package/wire-changes/mods-kernel@7.60.0.json +62 -0
  360. package/wire-changes/primitives@7.60.0.json +30 -0
@@ -84,8 +84,8 @@ export interface PrepareBoundaryParksInput {
84
84
  resourceSuspendEligible: boolean;
85
85
  /** borrowed-readonly — the wiring-manifest phase's durable-infra predicate: exposes `suspendForPlatformLimit`. */
86
86
  durableSuspendInfraReady: boolean;
87
- /** borrowed-readonly — the restore-incomplete adapter's missing members, or undefined (the review lane refuses loudly). */
88
- incompleteSuspendAdapter: readonly ("resumeVM" | "postResumeInit")[] | undefined;
87
+ /** borrowed-readonly — why the per-task remote env is in neither suspend target, or undefined (the review lane refuses loudly). */
88
+ suspendTargetGap: string | undefined;
89
89
  }
90
90
  export interface PrepareBoundaryParksResult {
91
91
  /** owned — the task-axis resource lane (`Prepared.suspendForResource`), or undefined (no opt-in / no infra / inactive). */
@@ -4,7 +4,7 @@ import { defaultTaskRegistry } from "../task-registry.js";
4
4
  import { DEFAULT_RESOURCE_TTL_MS, publishCommittedSuspend, sanitizedTtlMs, USAGE_WINDOW_REAP_MARGIN_MS } from "./park-commit.js";
5
5
  import { remoteEnvFailureNote } from "./remote-env-retry.js";
6
6
  export function prepareBoundaryParks(input) {
7
- const { saga, spec, checkpointStore, checkpointScope, abortController, harness, session, sessions, sessionId, deps, priorLedger, maxSlices, maxSuspends, resourceTotal, priorSuspendCount, suspendChainBase, humanReviewRef, liveSpendRef, now, pausedRef, remoteEnvFailures, resourceSuspendEligible, durableSuspendInfraReady, incompleteSuspendAdapter } = input;
7
+ const { saga, spec, checkpointStore, checkpointScope, abortController, harness, session, sessions, sessionId, deps, priorLedger, maxSlices, maxSuspends, resourceTotal, priorSuspendCount, suspendChainBase, humanReviewRef, liveSpendRef, now, pausedRef, remoteEnvFailures, resourceSuspendEligible, durableSuspendInfraReady, suspendTargetGap } = input;
8
8
  if (saga === undefined)
9
9
  return { suspendForResource: undefined, suspendForPlatformLimit: undefined, suspendForReview: undefined };
10
10
  const { inFlightSpendMicroUsd, serializeCheckpointState, commitSuspendSaga, suspendLoopCapHit, suspendableEnv, parkOnlyRemoteEnv, parkOnlyHandle } = saga;
@@ -83,9 +83,9 @@ export function prepareBoundaryParks(input) {
83
83
  return false;
84
84
  if (abortController.signal.aborted)
85
85
  return false;
86
- if (incompleteSuspendAdapter !== undefined) {
86
+ if (suspendTargetGap !== undefined) {
87
87
  try {
88
- deps.onError?.(new Error(`plan_review park skipped: the per-task execution env declares capabilities.suspendable but its adapter does not implement ${incompleteSuspendAdapter.join(" or ")}, so its workspace could not be restored on resume (the plan-review request was dropped; the run continues without pausing)`), { phase: "config", sessionId });
88
+ deps.onError?.(new Error(`plan_review park skipped: the per-task execution env ${suspendTargetGap}, so its workspace could not be restored on resume (the plan-review request was dropped; the run continues without pausing)`), { phase: "config", sessionId });
89
89
  }
90
90
  catch {
91
91
  }
@@ -105,6 +105,8 @@ export interface PrepareCapsAndWorkflowInput {
105
105
  offload?: boolean;
106
106
  offloadThresholdChars?: number;
107
107
  }) => AgentTool;
108
+ /** borrowed-readonly — where a workflow run's full record is stored when its completion carries less (the driver's one mint). */
109
+ taskArtifacts: import("../tool-result-store.js").TaskArtifactSeat | undefined;
108
110
  /** borrowed-readonly — the plan-review primitive the ExitPlanMode tool calls. */
109
111
  requestReview: (opts?: import("../present-plan-tool.js").ReviewRequest) => void;
110
112
  /** borrowed-readonly — the declared session plan file as ExitPlanMode's FILE arm reads it (absent ⇒ the parameter arm). */ planFileSource?: PlanFileSource;
@@ -144,6 +146,8 @@ export interface PrepareCapsAndWorkflowInput {
144
146
  artifact: PromptArtifact;
145
147
  sourceRevision?: string;
146
148
  } | undefined;
149
+ /** borrowed-readonly — LATE-BOUND: the leg's agent stations; the Workflow mount's getter reads them at ITS call time. */
150
+ agentStations: () => import("../mods/agent-stations.js").AgentStations | undefined;
147
151
  }
148
152
  export interface PrepareCapsAndWorkflowResult {
149
153
  /** owned — THE run's roster BUILDER (the mount array is private to it; `Prepared.tools` is its read face,
@@ -117,7 +117,7 @@ function autoModeArmReasonOf(intent, facePresent, caps, capsFaulted) {
117
117
  return { armed: true, reason: "armed" };
118
118
  }
119
119
  export async function prepareCapsAndWorkflow(input) {
120
- const { spec, deps, parentSpecSeat, checkpointSeat, internals, session, sessionId, runId, hostTaskId, taskScope, taskRootFinal, model, thinking, lockedPreflight, toolEffects, toolFaceSnapshot, promptLean, resolvedInteractionPosture, harnessRef, askSeat, runClampSource, forwardEvent, inheritedGateForChildren, enrichSpecToolCtx, maybeOffload, requestReview, enterPlanMode, permissionMode, readDenyEntries, peerLaneActive, peerSendMessageBuiltIn, runnerSelf, delegated, sideCallBookRef } = input;
120
+ const { spec, deps, parentSpecSeat, checkpointSeat, internals, session, sessionId, runId, hostTaskId, taskScope, taskRootFinal, model, thinking, lockedPreflight, toolEffects, toolFaceSnapshot, promptLean, resolvedInteractionPosture, harnessRef, askSeat, runClampSource, forwardEvent, inheritedGateForChildren, enrichSpecToolCtx, maybeOffload, taskArtifacts, requestReview, enterPlanMode, permissionMode, readDenyEntries, peerLaneActive, peerSendMessageBuiltIn, runnerSelf, delegated, sideCallBookRef } = input;
121
121
  const roster = new RosterBuilder(toolEffects);
122
122
  for (const t of spec.tools ?? []) {
123
123
  const mounted = mountCallerTool(t);
@@ -238,7 +238,7 @@ export async function prepareCapsAndWorkflow(input) {
238
238
  const classifierRungs = classifierLadderRungs(am.classifierFallback, classifierModel, model);
239
239
  const denialTracking = createAutoModeDenialTracker(am.denialLimit);
240
240
  const decider = createAutoModeDecider({
241
- ...(am.timeoutMs !== undefined ? { timeoutMs: am.timeoutMs } : {}),
241
+ ...(am.timeoutMs !== undefined ? { timeoutMs: am.timeoutMs } : {}), ...(am.rateLimitBreakAfter !== undefined ? { rateLimitBreakAfter: am.rateLimitBreakAfter } : {}),
242
242
  candidates: classifierRungs.map((m) => m.id),
243
243
  onClassified: classifierRoundObserver({ tracer: deps.tracer, onNotice: deps.onNotice, taskId: hostTaskId, seatModelId: classifierModel.id, ...(sessionId !== undefined ? { sessionId } : {}), ...(runId !== undefined ? { runId } : {}) }),
244
244
  assemble: async (input) => {
@@ -333,7 +333,7 @@ export async function prepareCapsAndWorkflow(input) {
333
333
  originatingSessionId: sessionId,
334
334
  rootSessionId: internals?.rootSessionId ?? sessionId, ...(internals?.placementRoot !== undefined ? { placementRoot: internals.placementRoot } : {}), crossBoundaryTree: input.crossBoundaryTree,
335
335
  taskRegistry: defaultTaskRegistry,
336
- taskNotification: internals?.onTaskNotification,
336
+ taskNotification: internals?.onTaskNotification, ...(taskArtifacts !== undefined ? { taskArtifacts } : {}),
337
337
  taskOwner: hostTaskId,
338
338
  limits: deps.workflowLimits,
339
339
  sourceTaskId: hostTaskId,
@@ -364,6 +364,7 @@ export async function prepareCapsAndWorkflow(input) {
364
364
  return assembleParentCaptureState(co?.optedOut() ?? false, co?.indeterminate() ?? false, ctl, [...(internals?.memoryCaptureAncestors ?? []), { sessionId, ...(ctl !== undefined ? { controlDir: ctl } : {}) }]);
365
365
  },
366
366
  autoModeReview: () => (autoModeDeciderRef.current !== undefined ? { decider: autoModeDeciderRef.current } : undefined),
367
+ agentStations: input.agentStations,
367
368
  workflowDepth: internals?.workflowDepth,
368
369
  parentCwd: taskRootFinal,
369
370
  parentThinking: () => childThinkingSeat(undefined, deploymentSubagentThinking(runnerSelf.agentCatalog?.roles), harnessRef.current?.getThinkingLevel() ?? thinking).thinking,
@@ -26,7 +26,7 @@ import { type CrossBoundaryPosture } from "../cross-boundary-taint.js";
26
26
  import { type HostFloor } from "../host-floor.js";
27
27
  import { type CheckpointState } from "../checkpoint-store.js";
28
28
  import { runOriginOfLeg, type RunOrigin } from "../run-origin.js";
29
- import { type ConfigDoorEntry, type LockedPreflight } from "../locked-config.js";
29
+ import { type ConfigDoorEntry, type LockedPreflight, type ReceivedPeerDeclarations } from "../locked-config.js";
30
30
  import { type ResolvedRole } from "../roles.js";
31
31
  import { type ResolvedSkillListingBudget } from "../skill-listing-budget.js";
32
32
  import type { SessionStore } from "../session.js";
@@ -133,6 +133,8 @@ export interface PrepareConfigDoorsResult {
133
133
  * `spec.agents` was set, in which case it is a shallow copy whose `tools` is the
134
134
  * withAgents-rebuilt roster. Every later phase (the safety scan above all — T21) must read THIS, never the original input. */
135
135
  spec: RosterSpec;
136
+ /** The deps the leg reads from here on: the caller's, with the deployment role map's one receipt in place of the live map. */
137
+ deps: RunnerDeps;
136
138
  /** owned — the frozen task-start copies of the caller's tool-face control arrays; the driver compiles the leg's selector
137
139
  * from them, and the selector (with the disclosure lists) is the ONLY thing later face reads consult. Frozen-immutable. */
138
140
  toolFaceLists: ToolFaceLists;
@@ -243,6 +245,8 @@ type ConfigValueDoorsResult = Pick<PrepareConfigDoorsResult, "toolFaceLists" | "
243
245
  };
244
246
  skills: TaskSpec["skills"];
245
247
  projectMemory: TaskSpec["projectMemory"];
248
+ deploymentRoles: RunnerDeps["roles"];
249
+ taskRoles: TaskSpec["roles"];
246
250
  };
247
251
  /**
248
252
  * The phase's VALUE doors as ONE function with two callers — each judges a declared value against its own vocabulary, reading only the
@@ -259,6 +263,7 @@ export declare function configValueDoors(input: {
259
263
  sessions: SessionStore;
260
264
  holder?: string | undefined;
261
265
  resumedRow?: Parameters<typeof runOriginOfLeg>[1];
266
+ receivedPeers?: ReceivedPeerDeclarations;
262
267
  }, enter?: ConfigDoorEntry): ConfigValueDoorsResult;
263
268
  /**
264
269
  * The doors a RESUMED leg's prepare refuses at, run as one screen BEFORE the claim — prepare's own functions, so a refusal carries
@@ -29,7 +29,7 @@ import { effectiveTraitsOf, readModelPromptTraits, resolveHost, resolvePromptLea
29
29
  import { assertNoRetiredKeys, RETIRED_MODEL_KEYS } from "../retired-keys.js";
30
30
  import { resolvePromptBinding } from "../../prompt-assembly/overlay.js";
31
31
  import { assertPeerPresenceValue } from "../../agents/peer-directory.js";
32
- import { snapshotDefinitionLists } from "../../agents/tool-filter.js";
32
+ import { snapshotDefinitionLists } from "../../agents/agent-definition.js";
33
33
  import { mcpUnavailableOn, TOTAL_TOKENS_REMINDER_MODES } from "./turn-attachments.js";
34
34
  import { refuseRetiredMember, rosterFaceOf } from "./caller-roster.js";
35
35
  import { assertToolBoundaryLegs } from "../tool-roster.js";
@@ -183,7 +183,8 @@ export function assertResumeConfigRecord(config) {
183
183
  }
184
184
  }
185
185
  export function configValueDoors(input, enter = ENTER_AS_IS) {
186
- const { spec, deps, resumeLeg, sessions, holder } = input;
186
+ const { spec, resumeLeg, sessions, holder } = input;
187
+ let deps = input.deps;
187
188
  enter("deps", () => assertNoRetiredRunnerDeps(deps));
188
189
  enter("taskConfig", () => assertPrincipalValue(spec.principal));
189
190
  const runOrigin = enter("taskConfig", () => runOriginOfLeg(spec.runOrigin, input.resumedRow));
@@ -225,8 +226,10 @@ export function configValueDoors(input, enter = ENTER_AS_IS) {
225
226
  : undefined,
226
227
  };
227
228
  const promptHost = enter("taskConfig", () => resolveHost(spec));
228
- enter("deps", () => screenRoleMap(deps.roles, "RunnerDeps.roles"));
229
- enter("taskConfig", () => screenRoleMap(spec.roles, "TaskSpec.roles"));
229
+ const deploymentRoles = enter("deps", () => screenRoleMap(deps.roles, "RunnerDeps.roles"));
230
+ if (deploymentRoles !== undefined)
231
+ deps = { ...deps, roles: deploymentRoles };
232
+ const taskRoles = enter("taskConfig", () => screenRoleMap(spec.roles, "TaskSpec.roles"));
230
233
  const promptBinding = enter("taskConfig", () => resolvePromptBinding(spec));
231
234
  const promptLean = enter("taskConfig", () => resolvePromptLean(spec));
232
235
  if (spec.resumeAt !== undefined)
@@ -297,7 +300,7 @@ export function configValueDoors(input, enter = ENTER_AS_IS) {
297
300
  e.code = "config.empty_objective";
298
301
  throw e;
299
302
  }
300
- const lockedPreflight = preflightLockedConfig(spec, deps, enter);
303
+ const lockedPreflight = preflightLockedConfig(spec, deps, enter, input.receivedPeers);
301
304
  const declaredSkills = spec.skills;
302
305
  const skills = declaredSkills === undefined ? undefined : enter("taskConfig", () => readSkillsSeat(declaredSkills));
303
306
  enter("deps", () => screenHandsBandOptions(deps.hands));
@@ -342,7 +345,7 @@ export function configValueDoors(input, enter = ENTER_AS_IS) {
342
345
  }));
343
346
  if (taskStore !== undefined)
344
347
  enter("taskConfig", () => assertRetentionWords({ ...retention, stores: [{ name: "checkpointStore", store: taskStore }] }));
345
- return { toolFaceLists, promptHost, promptBinding, promptLean, lockedPreflight, skillListingSeats, skills, projectMemory, microCompactKnob, memoryDelegationEvidence, memoryProvenance, memoryCapturePolicy, usageWindows, brainCallGuardrailMs, crossBoundaryPosture, advisorTool, hostFloor, runOrigin };
348
+ return { toolFaceLists, promptHost, promptBinding, promptLean, lockedPreflight, skillListingSeats, skills, projectMemory, microCompactKnob, memoryDelegationEvidence, memoryProvenance, memoryCapturePolicy, usageWindows, brainCallGuardrailMs, crossBoundaryPosture, advisorTool, hostFloor, runOrigin, deploymentRoles, taskRoles };
346
349
  }
347
350
  export function refuseResumeDoors(config, recorded, deps, sessions, holder) {
348
351
  asResumeConfigRefusal("taskConfig", () => {
@@ -359,13 +362,14 @@ export function refuseResumeDoors(config, recorded, deps, sessions, holder) {
359
362
  return { ...config, ...(config.mcp !== undefined ? { mcp: lockedPreflight.mcp ?? [] } : {}), ...(config.a2a !== undefined ? { a2a: lockedPreflight.a2a ?? [] } : {}), skills };
360
363
  }
361
364
  export function prepareConfigDoors(input) {
362
- const { deps, sessions, resume, internals } = input;
365
+ const { sessions, resume, internals } = input;
363
366
  assertToolBoundaryLegs(input.spec.tools);
364
367
  assertToolCardDeclarations(input.spec.tools);
365
368
  let spec = input.spec;
366
- const { toolFaceLists, promptHost, promptBinding, promptLean, lockedPreflight, skillListingSeats, skills, projectMemory, microCompactKnob, memoryDelegationEvidence, memoryProvenance, memoryCapturePolicy, usageWindows, brainCallGuardrailMs, crossBoundaryPosture, advisorTool, hostFloor, runOrigin } = configValueDoors({ spec, deps, resumeLeg: resume !== undefined, sessions, holder: internals?.holder, ...(resume !== undefined ? { resumedRow: { recorded: screenRecordedRunOrigin(resume.seed.runOrigin), ...(resume.opening !== undefined ? { opening: resume.opening } : {}) } } : {}) });
369
+ const { toolFaceLists, promptHost, promptBinding, promptLean, lockedPreflight, skillListingSeats, skills, projectMemory, microCompactKnob, memoryDelegationEvidence, memoryProvenance, memoryCapturePolicy, usageWindows, brainCallGuardrailMs, crossBoundaryPosture, advisorTool, hostFloor, runOrigin, deploymentRoles, taskRoles } = configValueDoors({ spec, deps: input.deps, resumeLeg: resume !== undefined, sessions, holder: internals?.holder, ...(internals?.receivedPeers !== undefined ? { receivedPeers: internals.receivedPeers } : {}), ...(resume !== undefined ? { resumedRow: { recorded: screenRecordedRunOrigin(resume.seed.runOrigin), ...(resume.opening !== undefined ? { opening: resume.opening } : {}) } } : {}) });
367
370
  const doorRead = (value) => ({ value, enumerable: value !== undefined, writable: false, configurable: false });
368
- spec = Object.create(Object.getPrototypeOf(spec), { ...Object.getOwnPropertyDescriptors(spec), skills: doorRead(skills), projectMemory: doorRead(projectMemory), runOrigin: doorRead(runOrigin) });
371
+ const deps = deploymentRoles !== undefined ? { ...input.deps, roles: deploymentRoles } : input.deps;
372
+ spec = Object.create(Object.getPrototypeOf(spec), { ...Object.getOwnPropertyDescriptors(spec), skills: doorRead(skills), projectMemory: doorRead(projectMemory), runOrigin: doorRead(runOrigin), ...(taskRoles !== undefined ? { roles: doorRead(taskRoles) } : {}) });
369
373
  const resolvedInteractionPosture = spec.interactionPosture ?? internals?.parentInteractionPosture ?? deps.interactionPosture;
370
374
  const askSeat = resolveAskSeat(spec, deps);
371
375
  {
@@ -492,6 +496,7 @@ export function prepareConfigDoors(input) {
492
496
  const compModel = resolveCompactionModel(spec, deps, "TaskSpec.compactionModel");
493
497
  return {
494
498
  spec,
499
+ deps,
495
500
  toolFaceLists,
496
501
  promptLean,
497
502
  promptTraits,
@@ -29,9 +29,9 @@ import type { PrepareResume, RunInternals, RunnerSelfSeat, ToolFaceSnapshot } fr
29
29
  import { RosterBuilder } from "../tool-roster.js";
30
30
  export interface PrepareDelegationSurfaceInput {
31
31
  /** borrowed-readonly — the REBOUND spec. Read: `tools` (the shadow checks and the revival spawner's delegation-tool
32
- * lookup), `oneShot` (the read/kill faces' completion promises), `retainBackgroundProcesses` (the Monitor receipt),
33
- * `handsReadOnly` is NOT read here (the hands mount decided the surface). Never mutated. */
34
- spec: Pick<TaskSpec, "tools" | "oneShot" | "retainBackgroundProcesses" | "excludeAllTools">;
32
+ * lookup), `retainBackgroundProcesses` (the Monitor receipt), `handsReadOnly` is NOT read here (the hands mount
33
+ * decided the surface). Never mutated. */
34
+ spec: Pick<TaskSpec, "tools" | "retainBackgroundProcesses" | "excludeAllTools">;
35
35
  /** borrowed-readonly — the deployment seats the mounts read: `workflowRunStore` / `backgroundAgentStore` / `mailboxStore` (the
36
36
  * read/kill faces and the tier-3 revival seams), `rosterStore`, `peerLane`, `peerDirectory`, `peerChannel`, `onNotice`,
37
37
  * `onBackgroundChildEvent`, `tracer`. */
@@ -99,6 +99,8 @@ export interface PrepareDelegationSurfaceInput {
99
99
  /** borrowed-readonly — the run's offload store, or undefined when offload is disabled (then no reader mounts and the
100
100
  * read/kill faces spill nowhere). */
101
101
  offloadStore: ToolResultStore | undefined;
102
+ /** borrowed-readonly — where a cut completion's full result is stored (the driver's one mint over `offloadStore`). */
103
+ taskArtifacts: import("../tool-result-store.js").TaskArtifactSeat | undefined;
102
104
  /** borrowed-readonly — the retain ledger the SendMessage mount continues children through (absent ⇒ honest not-retained). */
103
105
  subagentRetain: SubagentRetainLedger | undefined;
104
106
  /** borrowed-readonly — the caller-tool ctx enrichment: the revival spawner re-enters the delegation tool through it, and
@@ -13,7 +13,7 @@ import { deliverEngineNotice } from "../types.js";
13
13
  import { RosterBuilder } from "../tool-roster.js";
14
14
  import { sendMessageContinuationSeats } from "./send-message-continuation.js";
15
15
  export function prepareDelegationSurface(input) {
16
- const { spec, deps, internals, resume, sessionId, hostTaskId, taskScope, taskRootFinal, taskRootCanonical, executionEnv, runnerSelf, backgroundTaskToolsActive, workflowToolsActive, peerLaneActive, peerSendMessageBuiltIn, peerLaneRefs, sessionBox, roster, axisExplicitNegatives, envHandToolNames, toolFaceSnapshot, firstPartyOffload, offloadStore, subagentRetain, enrichSpecToolCtx, checkpointSeat, handsCwdRef, wsSnapshot, rebaseWsPath, rebaseRestoredPath, workspaceStateSettle, worktreeSeat } = input;
16
+ const { spec, deps, internals, resume, sessionId, hostTaskId, taskScope, taskRootFinal, taskRootCanonical, executionEnv, runnerSelf, backgroundTaskToolsActive, workflowToolsActive, peerLaneActive, peerSendMessageBuiltIn, peerLaneRefs, sessionBox, roster, axisExplicitNegatives, envHandToolNames, toolFaceSnapshot, firstPartyOffload, offloadStore, taskArtifacts, subagentRetain, enrichSpecToolCtx, checkpointSeat, handsCwdRef, wsSnapshot, rebaseWsPath, rebaseRestoredPath, workspaceStateSettle, worktreeSeat } = input;
17
17
  let worktreeSessionRef;
18
18
  const delegationSurfaceActive = backgroundTaskToolsActive || workflowToolsActive;
19
19
  const leaves = valveLeaves(spec, toolFaceSnapshot.selector);
@@ -21,7 +21,7 @@ export function prepareDelegationSurface(input) {
21
21
  if (delegationSurfaceActive || internals?.parentNotify !== undefined || peerLaneActive) {
22
22
  if (delegationSurfaceActive) {
23
23
  roster.mountAll([
24
- firstPartyOffload(createTaskOutputTool({ registry: defaultTaskRegistry, owner: hostTaskId, scope: taskScope, sessionId, workflowStore: deps.workflowRunStore, agentStore: deps.backgroundAgentStore, notificationWired: internals?.onTaskNotification !== undefined, oneShot: spec.oneShot, toolResultStore: offloadStore, ...(checkpointSeat !== undefined ? { checkpointSeat } : {}) })),
24
+ firstPartyOffload(createTaskOutputTool({ registry: defaultTaskRegistry, owner: hostTaskId, scope: taskScope, sessionId, workflowStore: deps.workflowRunStore, agentStore: deps.backgroundAgentStore, notificationWired: internals?.onTaskNotification !== undefined, toolResultStore: offloadStore, ...(checkpointSeat !== undefined ? { checkpointSeat } : {}) })),
25
25
  firstPartyOffload(createTaskStopTool({ registry: defaultTaskRegistry, owner: hostTaskId, scope: taskScope, sessionId, workflowStore: deps.workflowRunStore, agentStore: deps.backgroundAgentStore })),
26
26
  ], { source: "builtin", mountedBy: "delegation" });
27
27
  }
@@ -36,7 +36,7 @@ export function prepareDelegationSurface(input) {
36
36
  owner: hostTaskId,
37
37
  scope: taskScope,
38
38
  ...(sessionId !== undefined ? { sessionId } : {}),
39
- ...(internals?.onTaskNotification !== undefined ? { notify: internals.onTaskNotification } : {}), ...(spec.oneShot !== undefined ? { oneShot: spec.oneShot } : {}), retrievalToolMounted: delegationSurfaceActive,
39
+ ...(internals?.onTaskNotification !== undefined ? { notify: internals.onTaskNotification } : {}), ...(taskArtifacts !== undefined ? { taskArtifacts } : {}),
40
40
  ...(internals?.onSubagentSpawn !== undefined ? { sink: internals.onSubagentSpawn } : {}),
41
41
  ...(internals?.parentNotify !== undefined
42
42
  ? { uplink: internals.parentNotify, ...(internals.parentPeerRef !== undefined ? { uplinkRecipient: internals.parentPeerRef } : {}) }
@@ -126,6 +126,6 @@ export function prepareDelegationSurface(input) {
126
126
  roster.mountAll(createWorktreeTools(executionEnv, { repoRoot: taskRootFinal, cwdRef: handsCwdRef, session: worktreeSessionRef }).map((t) => (envHandToolNames.add(t.name), firstPartyOffload(t))), { source: "builtin", mountedBy: "hands" });
127
127
  }
128
128
  if (offloadStore)
129
- roster.mount(createReadToolResultTool(offloadStore), { source: "builtin", mountedBy: "optional" });
129
+ roster.mount(createReadToolResultTool(offloadStore, (ref, tree) => defaultTaskRegistry.artifactBoundaryLegs(ref, { owner: hostTaskId, scope: taskScope, sessionId }, tree)), { source: "builtin", mountedBy: "optional" });
130
130
  return { delegationSurfaceActive, worktreeSessionRef };
131
131
  }
@@ -1,7 +1,6 @@
1
1
  /**
2
2
  * PrepareTask's file-history phase, verbatim from the driver: the DV-14 first-touch
3
- * policy door, the `RunnerDeps.fileHistoryStore` / `fileHistoryCapture` and `TaskSpec.fileHistory` bad-value doors, the retired `rewindFiles` two-sense
4
- * split, the restoreFiles / resumeAt / rewindFilesTo combination gates, the run's history coordinates
3
+ * policy door, the `RunnerDeps.fileHistoryStore` / `fileHistoryCapture` and `TaskSpec.fileHistory` bad-value doors, the restoreFiles / resumeAt / rewindFilesTo combination gates, the run's history coordinates
5
4
  * (canonical root, recording scope, filesystem identity), the fork carry, the child-scope refusal, the
6
5
  * rewind RESTORE itself (anchor translation in "before" mode, the per-file ledger, partial-restore
7
6
  * policy), the `trackFileEdit` hook the hands band calls before every mutation lane, and the turn-start
@@ -32,8 +31,7 @@ export interface PrepareFileHistoryInput {
32
31
  /** borrowed-readonly — the deployment seats this phase reads: the first-touch failure policy, the history
33
32
  * store and its capture switch (all validated HERE, once), the incident sink, and the retired-epoch diagnostic probe. */
34
33
  deps: Pick<RunnerDeps, "onError">;
35
- /** borrowed-readonly — the REBOUND spec's rewind request fields and off-switch word (the retired `rewindFiles`
36
- * spelling is read off the same object as an unknown key) and the caller's cancel signal for the restore. */
34
+ /** borrowed-readonly — the REBOUND spec's rewind request fields and off-switch word and the caller's cancel signal for the restore. */
37
35
  spec: Pick<TaskSpec, "resumeAt" | "restoreFiles" | "acceptPartialRestore" | "signal">;
38
36
  /** borrowed-readonly — the request door's resolution ({@link resolveFileHistoryRequest}), judged before the session was
39
37
  * acquired: every refusal the request and the deployment's seats decide on their own has already thrown. */
@@ -125,14 +123,14 @@ export declare function resolveFileHistoryScope(lineage: RunInternals["fileHisto
125
123
  /**
126
124
  * WHICH filesystem an env is a view of — the second coordinate of tree identity for the file-history
127
125
  * lineage, read from what the env's MINTER states rather than inferred from a path:
128
- * · a remote workspace names itself through its {@link WorkspaceHandle} (provider + sandbox, and the
129
- * device lane's id when stamped) — two runs on one sandbox share a tree, two sandboxes never do;
130
- * · an env that DECLARES its paths host-local (`hostLocalPaths: true`), or is the host adapter itself
131
- * (a {@link NodeExecutionEnv}, which the seam names as the host-local default), is the
132
- * control-plane host's filesystem — every such env is one tree;
133
- * · anything else — an env declaring `hostLocalPaths: false`, or an undeclared custom adapter — is
134
- * attested to nothing, so it is its OWN tree: a per-instance token, which still matches when the
135
- * child literally holds the parent's env object and never matches a fresh per-task mint.
126
+ * · an env that DECLARES its paths host-local (`pathsAreHostLocal` — `NodeExecutionEnv`, a host lane) is the
127
+ * control-plane host's filesystem — every such env is one tree, whatever interface it drives it through;
128
+ * · otherwise a remote workspace names itself through its {@link WorkspaceHandle} (provider + sandbox, and
129
+ * the device lane's id when stamped) — two runs on one sandbox share a tree, two sandboxes never do;
130
+ * · anything else — an env declaring `hostLocalPaths: false` with no handle, or one whose declaration is
131
+ * missing or malformed (read as not host-local) — is attested to nothing, so it is its OWN tree: a
132
+ * per-instance token, which still matches when the child literally holds the parent's env object and
133
+ * never matches a fresh per-task mint.
136
134
  * A remote handle that cannot be read (an env not yet connected) falls to the per-instance arm for
137
135
  * the same reason: unattested is not shared.
138
136
  */
@@ -1,5 +1,4 @@
1
- import { NodeExecutionEnv } from "../../engine/execution-env/node-execution-env.js";
2
- import { isRemoteExecutionEnv } from "../remote-env.js";
1
+ import { isRemoteExecutionEnv, pathsAreHostLocal } from "../remote-env.js";
3
2
  import { FILE_HISTORY_ERROR_CODES, FileHistoryStoreError } from "../file-history-store.js";
4
3
  import { readMember, thrownText } from "../thrown-value.js";
5
4
  import { isGovernanceRetryClass } from "../governance-codes.js";
@@ -8,13 +7,6 @@ export async function prepareFileHistory(input) {
8
7
  const { deps, spec, request, internals, executionEnv, taskRootFinal, handsEnabled, sessionId, session, abortController } = input;
9
8
  const rewindNotes = [];
10
9
  const { onTrackFailure, captureOff, declaredOff, fileHistoryStore, captureStore, rewindTarget, rewindBefore } = request;
11
- if (spec.rewindFiles === true) {
12
- try {
13
- deps.onError?.(new Error(`TaskSpec.rewindFiles (capture sense) is retired and was ignored: per-edited-file first-touch tracking is on whenever RunnerDeps.fileHistoryStore is wired and neither RunnerDeps.fileHistoryCapture nor TaskSpec.fileHistory turns it off, so a per-turn capture request has nothing left to ask for. Drop the field; the restore sense moved to TaskSpec.restoreFiles.`), { phase: "config", sessionId });
14
- }
15
- catch {
16
- }
17
- }
18
10
  if (spec.resumeAt !== undefined && spec.restoreFiles !== true) {
19
11
  rewindNotes.push({
20
12
  code: "conversation_only",
@@ -226,6 +218,8 @@ export function resolveFileHistoryScope(lineage, historyRoot, historyFs, session
226
218
  const envFilesystemTokens = new WeakMap();
227
219
  let envFilesystemSeq = 0;
228
220
  export function fileHistoryFilesystemIdentity(env) {
221
+ if (pathsAreHostLocal(env))
222
+ return "host";
229
223
  if (isRemoteExecutionEnv(env)) {
230
224
  try {
231
225
  const h = env.workspaceHandle();
@@ -234,9 +228,6 @@ export function fileHistoryFilesystemIdentity(env) {
234
228
  catch {
235
229
  }
236
230
  }
237
- else if (env.hostLocalPaths === true || (env.hostLocalPaths === undefined && env instanceof NodeExecutionEnv)) {
238
- return "host";
239
- }
240
231
  let token = envFilesystemTokens.get(env);
241
232
  if (token === undefined) {
242
233
  token = `instance:${++envFilesystemSeq}`;
@@ -30,7 +30,7 @@ import type { Arbitration, ToolMarkSource } from "../ask-origin.js";
30
30
  import { type PermissionModeController } from "../mode-policy.js";
31
31
  import type { AutoModeDecider, AutoModeDenialTracker } from "../auto-mode.js";
32
32
  import { type ComplianceCapability } from "../compliance.js";
33
- import type { InheritedToolCheck, LegModBus } from "../mods/stations.js";
33
+ import type { InheritedInstallation, LegModBus } from "../mods/stations.js";
34
34
  import { type HookEnvCapabilities, type HookInvocationIdentity } from "../hooks.js";
35
35
  import type { ToolPolicy } from "../tool-policy.js";
36
36
  import { type GateOutcome } from "../gate-outcome.js";
@@ -96,8 +96,9 @@ export interface PrepareGateStationsInput {
96
96
  /** borrowed-readonly — the leg's mods bus: `classic.PreToolUse` presence arms the gate; the screenings and the post-call
97
97
  * events are raised on it. */
98
98
  modBus: LegModBus;
99
- /** borrowed-readonly — the inherited installations the gate raises `tool.check` on after `modBus` (the inherited-gate phase's). */
100
- inheritedToolChecks: readonly InheritedToolCheck[];
99
+ /** borrowed-readonly — the inherited installations the gate judges its calls on after `modBus` (`classic.PreToolUse` at phase 1,
100
+ * `tool.check` at the verdict read; the policy-chain phase's). */
101
+ inheritedInstallations: readonly InheritedInstallation[];
101
102
  /** borrowed-readonly — the egress vocabulary: arming, and the per-call `egress` flag handed to the gate. */
102
103
  egressTools: ReadonlySet<string>;
103
104
  /** borrowed-readonly — the irreversible vocabulary: arming only. */
@@ -48,7 +48,7 @@ export function maybeHumanRejectionHalt(input) {
48
48
  };
49
49
  }
50
50
  export function prepareGateStations(input) {
51
- const { askLane, parkAsk, tools, toolRosterDeltas, deps, toolCallGateArmedRef, effectivePolicy, egressTools, irreversibleTools, spec, complianceDenies, harness, blockedToolCalls, inheritedAskGrants, inheritedUnavailableAsks, foldAskClasses, ancestorSandboxAdmissions, preToolContexts, toolOccurrences, batchHaltRef, blockedTracked, hookIdentity, reminderMark, hostTaskId, sessionId, handsCwdRef, stampCallTarget, hookEnvFace, writeProtectionCheck, shellReadCheck, crossBoundaryCheck, readFace, irreversibilityTier, reversibilityProbes, abortController, shellGatedTools, autoModeDecider, autoModeDenialTracking, askRoute, permissionMode, toolMarkSources, a2aIsolatePeers, ancestorArbitrations, runId, stopForDenialLimit, permissionRuleLane, permissionRuleOrgLane, questionToolMounted, sandboxAdmissionArmed, sandboxBoundaryCapable, emitSandboxAdmitted, delegation, frameSettlement, seatInputsFor, modBus, inheritedToolChecks } = input;
51
+ const { askLane, parkAsk, tools, toolRosterDeltas, deps, toolCallGateArmedRef, effectivePolicy, egressTools, irreversibleTools, spec, complianceDenies, harness, blockedToolCalls, inheritedAskGrants, inheritedUnavailableAsks, foldAskClasses, ancestorSandboxAdmissions, preToolContexts, toolOccurrences, batchHaltRef, blockedTracked, hookIdentity, reminderMark, hostTaskId, sessionId, handsCwdRef, stampCallTarget, hookEnvFace, writeProtectionCheck, shellReadCheck, crossBoundaryCheck, readFace, irreversibilityTier, reversibilityProbes, abortController, shellGatedTools, autoModeDecider, autoModeDenialTracking, askRoute, permissionMode, toolMarkSources, a2aIsolatePeers, ancestorArbitrations, runId, stopForDenialLimit, permissionRuleLane, permissionRuleOrgLane, questionToolMounted, sandboxAdmissionArmed, sandboxBoundaryCapable, emitSandboxAdmitted, delegation, frameSettlement, seatInputsFor, modBus, inheritedInstallations } = input;
52
52
  const releasesAnnounced = new Map();
53
53
  const onModeReleased = (info) => {
54
54
  const table = info.readUnestablished === true ? input.readDenyInForce(info.toolCallId) : undefined;
@@ -78,6 +78,7 @@ export function prepareGateStations(input) {
78
78
  toolCallGateArmedRef.armed =
79
79
  effectivePolicy !== undefined ||
80
80
  modBus.hasHandlers("classic.PreToolUse") ||
81
+ inheritedInstallations.length > 0 ||
81
82
  egressTools.size > 0 ||
82
83
  irreversibleTools.size > 0 ||
83
84
  spec.enablePlanMode === true ||
@@ -117,7 +118,7 @@ export function prepareGateStations(input) {
117
118
  identity: hookIdentity,
118
119
  reminderMark,
119
120
  modBus,
120
- ...(inheritedToolChecks.length > 0 ? { inheritedToolChecks } : {}),
121
+ ...(inheritedInstallations.length > 0 ? { inheritedInstallations } : {}),
121
122
  observedPermissionMode: () => permissionMode.observed,
122
123
  ...(handsCwdRef !== undefined ? { trackedCwd: () => handsCwdRef.current } : {}),
123
124
  ...(stampCallTarget !== undefined ? { stampCallTarget } : {}),
@@ -251,7 +252,7 @@ export function prepareGateStations(input) {
251
252
  });
252
253
  }
253
254
  }
254
- const toolResultStation = createToolResultStation({ modBus, blockedToolCalls, toolRosterDeltas, preToolContexts, abortController, spec, handsCwdRef, hookEnvFace, hookIdentity, permissionMode, reminderMark, frameSettlement });
255
+ const toolResultStation = createToolResultStation({ modBus, blockedToolCalls, toolRosterDeltas, preToolContexts, inheritedScreens: inheritedInstallations.length > 0, abortController, spec, handsCwdRef, hookEnvFace, hookIdentity, permissionMode, reminderMark, frameSettlement });
255
256
  if (toolResultStation !== undefined)
256
257
  harness.on("tool_result", toolResultStation);
257
258
  const approvedCallScreen = createApprovedCallScreen({ modBus, permissionMode, abortController, handsCwdRef, hookEnvFace, hookIdentity, preToolContexts });
@@ -56,6 +56,8 @@ export interface PrepareHandsReadFaceInput {
56
56
  /** borrowed-readonly — the acquired session's id, for error/notice tags and the band's session
57
57
  * registration. */
58
58
  sessionId: string;
59
+ /** borrowed-readonly — this run's id, carried on the byte-floor notice (once per run). */
60
+ runId: string;
59
61
  /** borrowed-readonly — the host task id: trace frames + the band's task-registry owner. */
60
62
  hostTaskId: string;
61
63
  /** borrowed-readonly — the registry scope (`internals?.registryScope ?? spec.principal ??
@@ -98,7 +100,7 @@ export interface PrepareHandsReadFaceInput {
98
100
  * object (R-4: `deps.onError?.()` keeps its receiver; a new deps read must widen this Pick).
99
101
  * `readDenyBuiltinTiers`/`readDenyBuiltinExclude` are SNAPSHOTTED before the first await that
100
102
  * precedes the toolkit compile (the caller retains these arrays by reference). */
101
- deps: Pick<RunnerDeps, "onError" | "onNotice" | "tracer" | "readDenyPatterns" | "readDenyBuiltinTiers" | "readDenyBuiltinExclude" | "agentConfigDir" | "readFace" | "writeFace" | "permissionRuleStore" | "hands">;
103
+ deps: Pick<RunnerDeps, "onError" | "onNotice" | "tracer" | "readDenyPatterns" | "readDenyBuiltinTiers" | "readDenyBuiltinExclude" | "readDenyFloorRequired" | "agentConfigDir" | "readFace" | "writeFace" | "permissionRuleStore" | "hands" | "imageProcessor">;
102
104
  /** borrowed-readonly — the trusted spawn-side seats the band forwards: the finished-command
103
105
  * notification lane, the mid-flight detach hub, and the Runner's per-session
104
106
  * read-state seats and their restore channel (absent on a standalone prepare ⇒ the transcript-replay rung
@@ -1,5 +1,5 @@
1
1
  import { emitTrace } from "../trace.js";
2
- import { StubExecutionEnv } from "../stub-env.js";
2
+ import { performsIo } from "../remote-env.js";
3
3
  import { hasBackgroundShell } from "../background-shell.js";
4
4
  import { defaultTaskRegistry } from "../task-registry.js";
5
5
  import { bashReversibilityProbe, activeReadDenyBuiltinTiers, readDenyBuiltinConfigOf, compileReadDeny, createHandsToolkit, deploymentFaceClampNotice, pdfModelCapabilitiesOf, inheritSessionReadFileState, backgroundOutputReadExemption, resolveContainmentFace, seedReadFileStateFromContext, seedReadFileStateFromTranscript, } from "../../tools/fs/index.js";
@@ -9,7 +9,7 @@ import { carryReadFace } from "../../tools/fs/read-deny-home.js";
9
9
  import { EMPTY_READ_ROOTS, afterCallTables, denySeatsOf, onPinnedRead, pathTablesCompile, readRootsOver } from "./person-path-rows.js";
10
10
  import { createShellOverflowSpoolFence } from "../../tools/fs/fs-shared.js";
11
11
  import { createShellReadStation } from "../../tools/fs/shell-read-check.js";
12
- import { readFloorSeat } from "../../tools/fs/read-floor.js";
12
+ import { judgeReadFloorKept, readFloorSeat } from "../../tools/fs/read-floor.js";
13
13
  import { createFileReadStation } from "../../tools/fs/file-read-check.js";
14
14
  import { isShellFaceToolName, predictMountedToolNames, readTargetToolNames } from "../tool-registry.js";
15
15
  import { normalizeFileText } from "../../tools/fs/encoding.js";
@@ -20,7 +20,7 @@ import { sessionSeatAnchorHolds } from "./session-read-file-states.js";
20
20
  import { rebaseWorkspacePath } from "./workspace-path.js";
21
21
  import { RosterBuilder } from "../tool-roster.js";
22
22
  import { unionAddOnly } from "../child-clamp-seats.js";
23
- import { assertStringArraySeat } from "../read-face-seats.js";
23
+ import { assertStringArraySeat, screenReadDenySeat } from "../read-face-seats.js";
24
24
  import { modePolicyOf } from "../mode-policy.js";
25
25
  import { valveLeaves } from "../../agents/tool-filter.js";
26
26
  const faceClampAnnouncedSinks = { read: new WeakSet(), write: new WeakSet() };
@@ -191,7 +191,7 @@ export async function prepareHandsMount(input) {
191
191
  seedReadFileStateFromContext(readFileState, rk.key, f.content);
192
192
  }
193
193
  };
194
- const handsIncludeShell = !(executionEnv instanceof StubExecutionEnv);
194
+ const handsIncludeShell = performsIo(executionEnv) === true;
195
195
  const handsReadOnly = spec.handsReadOnly === true;
196
196
  backgroundTaskToolsActive = handsIncludeShell && !handsReadOnly && hasBackgroundShell(executionEnv);
197
197
  const shellFaceHere = [...predictMountedToolNames(new Set(backgroundTaskToolsActive ? ["hands", "backgroundTasks"] : ["hands"]))].filter(isShellFaceToolName);
@@ -214,7 +214,15 @@ export async function prepareHandsMount(input) {
214
214
  const readDenyBuiltinCfg = readDenyBuiltinConfigOf({ tiers: deps.readDenyBuiltinTiers, exclude: deps.readDenyBuiltinExclude });
215
215
  const canonicalize = async (dirs) => { const out = []; for (const d of dirs)
216
216
  await canonicalizeExtraDirs([d], "persistedReadRule", out).catch((err) => deps.onError?.(new Error(`persistedReadRule entry skipped (its lookup threw): ${d}: ${thrownText(err)}`), { phase: "config", sessionId })); return out; };
217
- const tables = (pathTables = await input.personRows.attachTables(pathTablesCompile({ env: executionEnv, additions: readDenyAdditions, builtin: readDenyBuiltinCfg, legRows: input.denyRuleRows, leads: input.headLeads, configRoot: deps.agentConfigDir, canonicalize })));
217
+ const floorRequired = screenReadDenySeat("readDenyFloorRequired", deps.readDenyFloorRequired) === true;
218
+ const floorSaid = { done: false };
219
+ const compileRunTables = pathTablesCompile({ env: executionEnv, additions: readDenyAdditions, builtin: readDenyBuiltinCfg, legRows: input.denyRuleRows, leads: input.headLeads, configRoot: deps.agentConfigDir, canonicalize });
220
+ const judgedRunTables = async (person) => {
221
+ const compiled = await compileRunTables(person);
222
+ judgeReadFloorKept({ env: executionEnv, table: compiled.readDeny, floor: readFloorSeat(compiled.readDeny)?.(undefined), required: floorRequired, onNotice: deps.onNotice, attribution: { sessionId, runId: input.runId }, said: floorSaid });
223
+ return compiled;
224
+ };
225
+ const tables = (pathTables = await input.personRows.attachTables(judgedRunTables));
218
226
  readDenyMatcher = tables.readDeny;
219
227
  readRoots = readRootsOver({ own: () => [...additionalRootsCanonical, ...additionalReadRootsCanonical], tables, ready: input.personRows.tablesReady, store: () => artifactStoreRef.current,
220
228
  onHeld: (entry, store) => emitTrace(deps.tracer, () => ({ kind: "config.additional_directory_skipped", version: 1, taskId: hostTaskId, entry, field: "persistedReadRule", reason: `admits_artifact_store: the local artifact store ${store} lies inside it or it inside the store — the Artifact tool's ledger and stored files stay outside every root the file tools reach`, ts: Date.now() })) });
@@ -368,7 +376,7 @@ export async function prepareHandsMount(input) {
368
376
  pdfModelCapabilities: pdfModelCapabilitiesOf(model),
369
377
  ...(deps.hands?.bashReadonlyAllow !== undefined ? { bashReadonlyAllow: deps.hands.bashReadonlyAllow } : {}),
370
378
  ...(deps.hands?.commitCoAuthor !== undefined ? { commitCoAuthor: deps.hands.commitCoAuthor } : {}),
371
- ...(deps.hands?.readImageDownsampler !== undefined ? { readImageDownsampler: deps.hands.readImageDownsampler } : {}),
379
+ ...(deps.imageProcessor !== undefined ? { imageProcessor: deps.imageProcessor } : {}),
372
380
  ...(deps.hands?.autoBackgroundOnTimeout !== undefined ? { autoBackgroundOnTimeout: deps.hands.autoBackgroundOnTimeout } : {}),
373
381
  beforeWrite: async (w) => {
374
382
  const deploymentGate = deps.hands?.beforeWrite;
@@ -392,7 +400,7 @@ export async function prepareHandsMount(input) {
392
400
  }
393
401
  roster.mountAll(band.map((t) => (envHandToolNames.add(t.name), firstPartyOffload(afterCallTables(input.personRows, t)))), { source: "builtin", mountedBy: "hands" });
394
402
  const shellFloor = effectiveShellGate;
395
- if (!(executionEnv instanceof StubExecutionEnv) && spec.handsReadOnly !== true) {
403
+ if (handsIncludeShell && spec.handsReadOnly !== true) {
396
404
  const installShellSeat = (name) => {
397
405
  const tierBefore = irreversibilityTier.get(name);
398
406
  const seatOwned = !egressTools.has(name) && tierBefore !== "always" && tierBefore !== "maybe";
@@ -37,7 +37,6 @@ import type { AutoModeArmingRecipe } from "../auto-mode-arming.js";
37
37
  import type { AutoModeDecider, AutoModeDenialTracker } from "../auto-mode.js";
38
38
  import { type OnQuestion } from "../ask-question.js";
39
39
  import { type ParentSpecSeat } from "../parent-spec-seat.js";
40
- import { type HookEnvCapabilities } from "../hooks.js";
41
40
  import { type LegModBus, type ModChainLink } from "../mods/stations.js";
42
41
  import { type ChildClampSource } from "../child-clamp-seats.js";
43
42
  import type { LockedPreflight } from "../locked-config.js";
@@ -134,6 +133,8 @@ export interface PrepareInheritedGateInput {
134
133
  forwardEvent: ((e: TaskEvent) => void) | undefined;
135
134
  /** borrowed-readonly — the retain ledger (ctx seat; absent ⇒ no key). */
136
135
  subagentRetain: SubagentRetainLedger | undefined;
136
+ /** borrowed-readonly — where a background task's cut result is stored (ctx seat `taskArtifacts`; absent ⇒ no key). */
137
+ taskArtifacts: import("../tool-result-store.js").TaskArtifactSeat | undefined;
137
138
  /** borrowed-readonly — the worktree-isolation helper (ctx seat; absent ⇒ no key). */
138
139
  worktreeIsolation: SubagentWorktreeIsolation | undefined;
139
140
  /** borrowed-readonly — the three run-ref primitives the ctx exposes (plan mode only under `enablePlanMode`). */
@@ -161,12 +162,10 @@ export interface PrepareInheritedGateInput {
161
162
  * `inheritedGateForChildren` (the two mandate tests), at spawn time. */
162
163
  runtimeCaps: () => RuntimeCaps | undefined;
163
164
  /** borrowed-readonly — what the leg hands its descendants of its mods bus (`LegMods.handedDown`: without the skills' own
164
- * registrations): the chain assembly mints this leg's screening entry over its `classic.PreToolUse` chain. */
165
+ * registrations): the chain assembly hands it down as this leg's screening installation. */
165
166
  modBus: LegModBus;
166
167
  /** borrowed-readonly — this leg's chain identity as its admission recorded it (`chainOfBus`) — the installation identity's chain term. */
167
168
  ownModChain: readonly ModChainLink[];
168
- /** borrowed-readonly — LATE-BOUND: the hook-env capability face the screening-face entry's policy resolves paths in. */
169
- hookEnvFace: () => HookEnvCapabilities | undefined;
170
169
  /** borrowed-readonly — LATE-BOUND: the armed classifier (undefined = not armed), read where the chain freezes it onto both
171
170
  * entries and where the ctx exposes the spawn-review seat. */
172
171
  autoModeDecider: () => AutoModeDecider | undefined;
@@ -176,6 +175,8 @@ export interface PrepareInheritedGateInput {
176
175
  autoModeArming: () => AutoModeArmingRecipe | undefined;
177
176
  /** borrowed-readonly — LATE-BOUND: the fork-governance verdict (ctx `forkAccess`, present only when denied). */
178
177
  agentForkDenial: () => ReturnType<typeof forkGovernanceDenial>;
178
+ /** borrowed-readonly — LATE-BOUND: the leg's agent stations (ctx `agentStations`; bound once the leg's identity is known). */
179
+ agentStations: () => import("../mods/agent-stations.js").AgentStations | undefined;
179
180
  /** borrowed-readonly — LATE-BOUND: the observers grant (ctx `observersAllowed`, present only when explicitly granted). */
180
181
  observersActive: () => boolean;
181
182
  /** borrowed-readonly — LATE-BOUND: the hands mount's resolved read face (undefined until/unless hands mount). */