pulseed 0.6.3 → 0.6.5

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 (615) hide show
  1. package/dist/adapters/datasources/artifact-metric-datasource.d.ts +11 -1
  2. package/dist/adapters/datasources/artifact-metric-datasource.d.ts.map +1 -1
  3. package/dist/adapters/datasources/artifact-metric-datasource.js +256 -9
  4. package/dist/adapters/datasources/artifact-metric-datasource.js.map +1 -1
  5. package/dist/base/config/global-config.d.ts +7 -4
  6. package/dist/base/config/global-config.d.ts.map +1 -1
  7. package/dist/base/config/global-config.js +3 -1
  8. package/dist/base/config/global-config.js.map +1 -1
  9. package/dist/base/protocol/exact-protocol.d.ts +47 -0
  10. package/dist/base/protocol/exact-protocol.d.ts.map +1 -0
  11. package/dist/base/protocol/exact-protocol.js +175 -0
  12. package/dist/base/protocol/exact-protocol.js.map +1 -0
  13. package/dist/base/types/core.d.ts +1 -1
  14. package/dist/base/types/core.d.ts.map +1 -1
  15. package/dist/base/types/core.js +1 -0
  16. package/dist/base/types/core.js.map +1 -1
  17. package/dist/base/utils/paths.d.ts +5 -0
  18. package/dist/base/utils/paths.d.ts.map +1 -1
  19. package/dist/base/utils/paths.js +7 -0
  20. package/dist/base/utils/paths.js.map +1 -1
  21. package/dist/base/utils/workspace-path.d.ts +6 -0
  22. package/dist/base/utils/workspace-path.d.ts.map +1 -0
  23. package/dist/base/utils/workspace-path.js +24 -0
  24. package/dist/base/utils/workspace-path.js.map +1 -0
  25. package/dist/base/utils/workspace-root.d.ts +6 -0
  26. package/dist/base/utils/workspace-root.d.ts.map +1 -0
  27. package/dist/base/utils/workspace-root.js +87 -0
  28. package/dist/base/utils/workspace-root.js.map +1 -0
  29. package/dist/index.d.ts +4 -0
  30. package/dist/index.d.ts.map +1 -1
  31. package/dist/index.js +2 -0
  32. package/dist/index.js.map +1 -1
  33. package/dist/interface/chat/chat-event-state.d.ts +2 -0
  34. package/dist/interface/chat/chat-event-state.d.ts.map +1 -1
  35. package/dist/interface/chat/chat-event-state.js +22 -41
  36. package/dist/interface/chat/chat-event-state.js.map +1 -1
  37. package/dist/interface/chat/chat-events.d.ts +15 -1
  38. package/dist/interface/chat/chat-events.d.ts.map +1 -1
  39. package/dist/interface/chat/chat-history.d.ts +3816 -192
  40. package/dist/interface/chat/chat-history.d.ts.map +1 -1
  41. package/dist/interface/chat/chat-history.js +529 -5
  42. package/dist/interface/chat/chat-history.js.map +1 -1
  43. package/dist/interface/chat/chat-runner-commands.d.ts +2 -0
  44. package/dist/interface/chat/chat-runner-commands.d.ts.map +1 -1
  45. package/dist/interface/chat/chat-runner-commands.js +83 -22
  46. package/dist/interface/chat/chat-runner-commands.js.map +1 -1
  47. package/dist/interface/chat/chat-runner-contracts.d.ts +5 -1
  48. package/dist/interface/chat/chat-runner-contracts.d.ts.map +1 -1
  49. package/dist/interface/chat/chat-runner-event-bridge.d.ts +13 -1
  50. package/dist/interface/chat/chat-runner-event-bridge.d.ts.map +1 -1
  51. package/dist/interface/chat/chat-runner-event-bridge.js +51 -3
  52. package/dist/interface/chat/chat-runner-event-bridge.js.map +1 -1
  53. package/dist/interface/chat/chat-runner-routes.d.ts +5 -17
  54. package/dist/interface/chat/chat-runner-routes.d.ts.map +1 -1
  55. package/dist/interface/chat/chat-runner-routes.js +80 -51
  56. package/dist/interface/chat/chat-runner-routes.js.map +1 -1
  57. package/dist/interface/chat/chat-runner-runtime.d.ts.map +1 -1
  58. package/dist/interface/chat/chat-runner-runtime.js +4 -0
  59. package/dist/interface/chat/chat-runner-runtime.js.map +1 -1
  60. package/dist/interface/chat/chat-runner.d.ts +7 -1
  61. package/dist/interface/chat/chat-runner.d.ts.map +1 -1
  62. package/dist/interface/chat/chat-runner.js +135 -49
  63. package/dist/interface/chat/chat-runner.js.map +1 -1
  64. package/dist/interface/chat/chat-session-store.d.ts +3 -0
  65. package/dist/interface/chat/chat-session-store.d.ts.map +1 -1
  66. package/dist/interface/chat/chat-session-store.js +12 -0
  67. package/dist/interface/chat/chat-session-store.js.map +1 -1
  68. package/dist/interface/chat/cross-platform-session.d.ts +15 -0
  69. package/dist/interface/chat/cross-platform-session.d.ts.map +1 -1
  70. package/dist/interface/chat/cross-platform-session.js +260 -42
  71. package/dist/interface/chat/cross-platform-session.js.map +1 -1
  72. package/dist/interface/chat/failure-recovery.d.ts.map +1 -1
  73. package/dist/interface/chat/failure-recovery.js +15 -1
  74. package/dist/interface/chat/failure-recovery.js.map +1 -1
  75. package/dist/interface/chat/freeform-route-classifier.d.ts +4 -4
  76. package/dist/interface/chat/ingress-router.d.ts +3 -0
  77. package/dist/interface/chat/ingress-router.d.ts.map +1 -1
  78. package/dist/interface/chat/ingress-router.js +3 -0
  79. package/dist/interface/chat/ingress-router.js.map +1 -1
  80. package/dist/interface/chat/model-request-builder.d.ts +37 -0
  81. package/dist/interface/chat/model-request-builder.d.ts.map +1 -0
  82. package/dist/interface/chat/model-request-builder.js +76 -0
  83. package/dist/interface/chat/model-request-builder.js.map +1 -0
  84. package/dist/interface/chat/turn-context.d.ts +200 -0
  85. package/dist/interface/chat/turn-context.d.ts.map +1 -0
  86. package/dist/interface/chat/turn-context.js +249 -0
  87. package/dist/interface/chat/turn-context.js.map +1 -0
  88. package/dist/interface/chat/turn-protocol.d.ts +35 -0
  89. package/dist/interface/chat/turn-protocol.d.ts.map +1 -0
  90. package/dist/interface/chat/turn-protocol.js +27 -0
  91. package/dist/interface/chat/turn-protocol.js.map +1 -0
  92. package/dist/interface/chat/user-input.d.ts +55 -0
  93. package/dist/interface/chat/user-input.d.ts.map +1 -0
  94. package/dist/interface/chat/user-input.js +52 -0
  95. package/dist/interface/chat/user-input.js.map +1 -0
  96. package/dist/interface/cli/cli-command-registry.d.ts +1 -1
  97. package/dist/interface/cli/cli-command-registry.d.ts.map +1 -1
  98. package/dist/interface/cli/cli-command-registry.js +12 -16
  99. package/dist/interface/cli/cli-command-registry.js.map +1 -1
  100. package/dist/interface/cli/cli-runner.js +0 -0
  101. package/dist/interface/cli/commands/daemon-shared.d.ts +12 -1
  102. package/dist/interface/cli/commands/daemon-shared.d.ts.map +1 -1
  103. package/dist/interface/cli/commands/daemon-shared.js +26 -4
  104. package/dist/interface/cli/commands/daemon-shared.js.map +1 -1
  105. package/dist/interface/cli/commands/daemon.d.ts.map +1 -1
  106. package/dist/interface/cli/commands/daemon.js +66 -8
  107. package/dist/interface/cli/commands/daemon.js.map +1 -1
  108. package/dist/interface/cli/commands/doctor.d.ts +1 -1
  109. package/dist/interface/cli/commands/doctor.d.ts.map +1 -1
  110. package/dist/interface/cli/commands/doctor.js +61 -29
  111. package/dist/interface/cli/commands/doctor.js.map +1 -1
  112. package/dist/interface/cli/commands/goal-dispatch.d.ts.map +1 -1
  113. package/dist/interface/cli/commands/goal-dispatch.js +10 -6
  114. package/dist/interface/cli/commands/goal-dispatch.js.map +1 -1
  115. package/dist/interface/cli/commands/goal-utils.d.ts.map +1 -1
  116. package/dist/interface/cli/commands/goal-utils.js +3 -5
  117. package/dist/interface/cli/commands/goal-utils.js.map +1 -1
  118. package/dist/interface/cli/commands/run.d.ts.map +1 -1
  119. package/dist/interface/cli/commands/run.js +50 -0
  120. package/dist/interface/cli/commands/run.js.map +1 -1
  121. package/dist/interface/cli/setup.d.ts +1 -1
  122. package/dist/interface/cli/setup.d.ts.map +1 -1
  123. package/dist/interface/cli/setup.js +4 -3
  124. package/dist/interface/cli/setup.js.map +1 -1
  125. package/dist/interface/cli/utils/loop-runner.d.ts +1 -0
  126. package/dist/interface/cli/utils/loop-runner.d.ts.map +1 -1
  127. package/dist/interface/cli/utils/loop-runner.js +12 -3
  128. package/dist/interface/cli/utils/loop-runner.js.map +1 -1
  129. package/dist/interface/tui/app.d.ts +6 -1
  130. package/dist/interface/tui/app.d.ts.map +1 -1
  131. package/dist/interface/tui/app.js +29 -12
  132. package/dist/interface/tui/app.js.map +1 -1
  133. package/dist/interface/tui/bash-mode.d.ts.map +1 -1
  134. package/dist/interface/tui/bash-mode.js +2 -9
  135. package/dist/interface/tui/bash-mode.js.map +1 -1
  136. package/dist/interface/tui/chat/viewport.d.ts.map +1 -1
  137. package/dist/interface/tui/chat/viewport.js +57 -11
  138. package/dist/interface/tui/chat/viewport.js.map +1 -1
  139. package/dist/interface/tui/entry-deps.d.ts +6 -1
  140. package/dist/interface/tui/entry-deps.d.ts.map +1 -1
  141. package/dist/interface/tui/entry-deps.js +3 -0
  142. package/dist/interface/tui/entry-deps.js.map +1 -1
  143. package/dist/interface/tui/entry.d.ts.map +1 -1
  144. package/dist/interface/tui/entry.js +6 -2
  145. package/dist/interface/tui/entry.js.map +1 -1
  146. package/dist/interface/tui/input-action.d.ts.map +1 -1
  147. package/dist/interface/tui/input-action.js +3 -2
  148. package/dist/interface/tui/input-action.js.map +1 -1
  149. package/dist/interface/tui/intent-recognizer.d.ts.map +1 -1
  150. package/dist/interface/tui/intent-recognizer.js +21 -33
  151. package/dist/interface/tui/intent-recognizer.js.map +1 -1
  152. package/dist/orchestrator/execution/adapter-layer.d.ts +10 -1
  153. package/dist/orchestrator/execution/adapter-layer.d.ts.map +1 -1
  154. package/dist/orchestrator/execution/adapter-layer.js.map +1 -1
  155. package/dist/orchestrator/execution/agent-loop/agent-loop-command-classifier.d.ts +12 -1
  156. package/dist/orchestrator/execution/agent-loop/agent-loop-command-classifier.d.ts.map +1 -1
  157. package/dist/orchestrator/execution/agent-loop/agent-loop-command-classifier.js +16 -31
  158. package/dist/orchestrator/execution/agent-loop/agent-loop-command-classifier.js.map +1 -1
  159. package/dist/orchestrator/execution/agent-loop/agent-loop-compaction-record.d.ts +75 -0
  160. package/dist/orchestrator/execution/agent-loop/agent-loop-compaction-record.d.ts.map +1 -0
  161. package/dist/orchestrator/execution/agent-loop/agent-loop-compaction-record.js +10 -0
  162. package/dist/orchestrator/execution/agent-loop/agent-loop-compaction-record.js.map +1 -0
  163. package/dist/orchestrator/execution/agent-loop/agent-loop-compactor.d.ts +3 -2
  164. package/dist/orchestrator/execution/agent-loop/agent-loop-compactor.d.ts.map +1 -1
  165. package/dist/orchestrator/execution/agent-loop/agent-loop-compactor.js +185 -22
  166. package/dist/orchestrator/execution/agent-loop/agent-loop-compactor.js.map +1 -1
  167. package/dist/orchestrator/execution/agent-loop/agent-loop-context-assembler.d.ts.map +1 -1
  168. package/dist/orchestrator/execution/agent-loop/agent-loop-context-assembler.js +18 -1
  169. package/dist/orchestrator/execution/agent-loop/agent-loop-context-assembler.js.map +1 -1
  170. package/dist/orchestrator/execution/agent-loop/agent-loop-default-profile.d.ts.map +1 -1
  171. package/dist/orchestrator/execution/agent-loop/agent-loop-default-profile.js +7 -1
  172. package/dist/orchestrator/execution/agent-loop/agent-loop-default-profile.js.map +1 -1
  173. package/dist/orchestrator/execution/agent-loop/agent-loop-events.d.ts +8 -1
  174. package/dist/orchestrator/execution/agent-loop/agent-loop-events.d.ts.map +1 -1
  175. package/dist/orchestrator/execution/agent-loop/agent-loop-events.js.map +1 -1
  176. package/dist/orchestrator/execution/agent-loop/agent-loop-history.d.ts +3 -1
  177. package/dist/orchestrator/execution/agent-loop/agent-loop-history.d.ts.map +1 -1
  178. package/dist/orchestrator/execution/agent-loop/agent-loop-history.js +12 -3
  179. package/dist/orchestrator/execution/agent-loop/agent-loop-history.js.map +1 -1
  180. package/dist/orchestrator/execution/agent-loop/agent-loop-model-client.d.ts.map +1 -1
  181. package/dist/orchestrator/execution/agent-loop/agent-loop-model-client.js +7 -1
  182. package/dist/orchestrator/execution/agent-loop/agent-loop-model-client.js.map +1 -1
  183. package/dist/orchestrator/execution/agent-loop/agent-loop-model.d.ts +37 -0
  184. package/dist/orchestrator/execution/agent-loop/agent-loop-model.d.ts.map +1 -1
  185. package/dist/orchestrator/execution/agent-loop/agent-loop-model.js +21 -0
  186. package/dist/orchestrator/execution/agent-loop/agent-loop-model.js.map +1 -1
  187. package/dist/orchestrator/execution/agent-loop/agent-loop-prompts.d.ts.map +1 -1
  188. package/dist/orchestrator/execution/agent-loop/agent-loop-prompts.js +1 -0
  189. package/dist/orchestrator/execution/agent-loop/agent-loop-prompts.js.map +1 -1
  190. package/dist/orchestrator/execution/agent-loop/agent-loop-result.d.ts +19 -11
  191. package/dist/orchestrator/execution/agent-loop/agent-loop-result.d.ts.map +1 -1
  192. package/dist/orchestrator/execution/agent-loop/agent-loop-session-state.d.ts +4 -0
  193. package/dist/orchestrator/execution/agent-loop/agent-loop-session-state.d.ts.map +1 -1
  194. package/dist/orchestrator/execution/agent-loop/agent-loop-session-state.js +135 -0
  195. package/dist/orchestrator/execution/agent-loop/agent-loop-session-state.js.map +1 -1
  196. package/dist/orchestrator/execution/agent-loop/agent-loop-tool-runtime.d.ts +3 -2
  197. package/dist/orchestrator/execution/agent-loop/agent-loop-tool-runtime.d.ts.map +1 -1
  198. package/dist/orchestrator/execution/agent-loop/agent-loop-tool-runtime.js +68 -61
  199. package/dist/orchestrator/execution/agent-loop/agent-loop-tool-runtime.js.map +1 -1
  200. package/dist/orchestrator/execution/agent-loop/agent-loop-turn-context.d.ts +3 -1
  201. package/dist/orchestrator/execution/agent-loop/agent-loop-turn-context.d.ts.map +1 -1
  202. package/dist/orchestrator/execution/agent-loop/agent-loop-turn-context.js.map +1 -1
  203. package/dist/orchestrator/execution/agent-loop/agent-timeline.d.ts +12 -1
  204. package/dist/orchestrator/execution/agent-loop/agent-timeline.d.ts.map +1 -1
  205. package/dist/orchestrator/execution/agent-loop/agent-timeline.js +19 -56
  206. package/dist/orchestrator/execution/agent-loop/agent-timeline.js.map +1 -1
  207. package/dist/orchestrator/execution/agent-loop/anthropic-messages-agent-loop-model-client.d.ts.map +1 -1
  208. package/dist/orchestrator/execution/agent-loop/anthropic-messages-agent-loop-model-client.js +8 -2
  209. package/dist/orchestrator/execution/agent-loop/anthropic-messages-agent-loop-model-client.js.map +1 -1
  210. package/dist/orchestrator/execution/agent-loop/bounded-agent-loop-runner.d.ts +14 -0
  211. package/dist/orchestrator/execution/agent-loop/bounded-agent-loop-runner.d.ts.map +1 -1
  212. package/dist/orchestrator/execution/agent-loop/bounded-agent-loop-runner.js +440 -81
  213. package/dist/orchestrator/execution/agent-loop/bounded-agent-loop-runner.js.map +1 -1
  214. package/dist/orchestrator/execution/agent-loop/chat-agent-loop-runner.d.ts +1 -1
  215. package/dist/orchestrator/execution/agent-loop/chat-agent-loop-runner.d.ts.map +1 -1
  216. package/dist/orchestrator/execution/agent-loop/chat-agent-loop-runner.js +80 -12
  217. package/dist/orchestrator/execution/agent-loop/chat-agent-loop-runner.js.map +1 -1
  218. package/dist/orchestrator/execution/agent-loop/chat-display-output.d.ts +1 -0
  219. package/dist/orchestrator/execution/agent-loop/chat-display-output.d.ts.map +1 -1
  220. package/dist/orchestrator/execution/agent-loop/chat-display-output.js +3 -1
  221. package/dist/orchestrator/execution/agent-loop/chat-display-output.js.map +1 -1
  222. package/dist/orchestrator/execution/agent-loop/index.d.ts +3 -0
  223. package/dist/orchestrator/execution/agent-loop/index.d.ts.map +1 -1
  224. package/dist/orchestrator/execution/agent-loop/index.js +3 -0
  225. package/dist/orchestrator/execution/agent-loop/index.js.map +1 -1
  226. package/dist/orchestrator/execution/agent-loop/openai-responses-agent-loop-model-client.d.ts +1 -0
  227. package/dist/orchestrator/execution/agent-loop/openai-responses-agent-loop-model-client.d.ts.map +1 -1
  228. package/dist/orchestrator/execution/agent-loop/openai-responses-agent-loop-model-client.js +51 -9
  229. package/dist/orchestrator/execution/agent-loop/openai-responses-agent-loop-model-client.js.map +1 -1
  230. package/dist/orchestrator/execution/agent-loop/response-item-tool-router.d.ts +20 -0
  231. package/dist/orchestrator/execution/agent-loop/response-item-tool-router.d.ts.map +1 -0
  232. package/dist/orchestrator/execution/agent-loop/response-item-tool-router.js +181 -0
  233. package/dist/orchestrator/execution/agent-loop/response-item-tool-router.js.map +1 -0
  234. package/dist/orchestrator/execution/agent-loop/response-item.d.ts +805 -0
  235. package/dist/orchestrator/execution/agent-loop/response-item.d.ts.map +1 -0
  236. package/dist/orchestrator/execution/agent-loop/response-item.js +104 -0
  237. package/dist/orchestrator/execution/agent-loop/response-item.js.map +1 -0
  238. package/dist/orchestrator/execution/agent-loop/task-agent-loop-context.d.ts +7 -2
  239. package/dist/orchestrator/execution/agent-loop/task-agent-loop-context.d.ts.map +1 -1
  240. package/dist/orchestrator/execution/agent-loop/task-agent-loop-context.js +33 -1
  241. package/dist/orchestrator/execution/agent-loop/task-agent-loop-context.js.map +1 -1
  242. package/dist/orchestrator/execution/agent-loop/task-agent-loop-result.d.ts +32 -17
  243. package/dist/orchestrator/execution/agent-loop/task-agent-loop-result.d.ts.map +1 -1
  244. package/dist/orchestrator/execution/agent-loop/task-agent-loop-result.js +174 -16
  245. package/dist/orchestrator/execution/agent-loop/task-agent-loop-result.js.map +1 -1
  246. package/dist/orchestrator/execution/agent-loop/task-agent-loop-runner.d.ts +2 -0
  247. package/dist/orchestrator/execution/agent-loop/task-agent-loop-runner.d.ts.map +1 -1
  248. package/dist/orchestrator/execution/agent-loop/task-agent-loop-runner.js +10 -4
  249. package/dist/orchestrator/execution/agent-loop/task-agent-loop-runner.js.map +1 -1
  250. package/dist/orchestrator/execution/agent-loop/task-agent-loop-verification.d.ts +0 -1
  251. package/dist/orchestrator/execution/agent-loop/task-agent-loop-verification.d.ts.map +1 -1
  252. package/dist/orchestrator/execution/agent-loop/task-agent-loop-verification.js +7 -87
  253. package/dist/orchestrator/execution/agent-loop/task-agent-loop-verification.js.map +1 -1
  254. package/dist/orchestrator/execution/agent-loop/task-agent-loop-worktree.d.ts.map +1 -1
  255. package/dist/orchestrator/execution/agent-loop/task-agent-loop-worktree.js +25 -0
  256. package/dist/orchestrator/execution/agent-loop/task-agent-loop-worktree.js.map +1 -1
  257. package/dist/orchestrator/execution/context/issue-context-fetcher.d.ts +5 -1
  258. package/dist/orchestrator/execution/context/issue-context-fetcher.d.ts.map +1 -1
  259. package/dist/orchestrator/execution/context/issue-context-fetcher.js +7 -4
  260. package/dist/orchestrator/execution/context/issue-context-fetcher.js.map +1 -1
  261. package/dist/orchestrator/execution/task/task-artifact-contract.d.ts +18 -0
  262. package/dist/orchestrator/execution/task/task-artifact-contract.d.ts.map +1 -0
  263. package/dist/orchestrator/execution/task/task-artifact-contract.js +199 -0
  264. package/dist/orchestrator/execution/task/task-artifact-contract.js.map +1 -0
  265. package/dist/orchestrator/execution/task/task-diff-capture.d.ts +15 -1
  266. package/dist/orchestrator/execution/task/task-diff-capture.d.ts.map +1 -1
  267. package/dist/orchestrator/execution/task/task-diff-capture.js +271 -18
  268. package/dist/orchestrator/execution/task/task-diff-capture.js.map +1 -1
  269. package/dist/orchestrator/execution/task/task-execution-helpers.d.ts +1 -0
  270. package/dist/orchestrator/execution/task/task-execution-helpers.d.ts.map +1 -1
  271. package/dist/orchestrator/execution/task/task-execution-helpers.js +76 -17
  272. package/dist/orchestrator/execution/task/task-execution-helpers.js.map +1 -1
  273. package/dist/orchestrator/execution/task/task-execution-types.d.ts +2 -0
  274. package/dist/orchestrator/execution/task/task-execution-types.d.ts.map +1 -1
  275. package/dist/orchestrator/execution/task/task-execution-types.js.map +1 -1
  276. package/dist/orchestrator/execution/task/task-executor.d.ts +16 -1
  277. package/dist/orchestrator/execution/task/task-executor.d.ts.map +1 -1
  278. package/dist/orchestrator/execution/task/task-executor.js +56 -50
  279. package/dist/orchestrator/execution/task/task-executor.js.map +1 -1
  280. package/dist/orchestrator/execution/task/task-generation.d.ts +62 -2
  281. package/dist/orchestrator/execution/task/task-generation.d.ts.map +1 -1
  282. package/dist/orchestrator/execution/task/task-generation.js +30 -13
  283. package/dist/orchestrator/execution/task/task-generation.js.map +1 -1
  284. package/dist/orchestrator/execution/task/task-lifecycle-runner.d.ts +2 -2
  285. package/dist/orchestrator/execution/task/task-lifecycle-runner.d.ts.map +1 -1
  286. package/dist/orchestrator/execution/task/task-lifecycle-runner.js +32 -4
  287. package/dist/orchestrator/execution/task/task-lifecycle-runner.js.map +1 -1
  288. package/dist/orchestrator/execution/task/task-lifecycle.d.ts +3 -3
  289. package/dist/orchestrator/execution/task/task-lifecycle.d.ts.map +1 -1
  290. package/dist/orchestrator/execution/task/task-lifecycle.js +109 -10
  291. package/dist/orchestrator/execution/task/task-lifecycle.js.map +1 -1
  292. package/dist/orchestrator/execution/task/task-outcome-ledger.d.ts +9 -0
  293. package/dist/orchestrator/execution/task/task-outcome-ledger.d.ts.map +1 -1
  294. package/dist/orchestrator/execution/task/task-outcome-ledger.js +64 -3
  295. package/dist/orchestrator/execution/task/task-outcome-ledger.js.map +1 -1
  296. package/dist/orchestrator/execution/task/task-prompt-builder.d.ts +3 -1
  297. package/dist/orchestrator/execution/task/task-prompt-builder.d.ts.map +1 -1
  298. package/dist/orchestrator/execution/task/task-prompt-builder.js +28 -13
  299. package/dist/orchestrator/execution/task/task-prompt-builder.js.map +1 -1
  300. package/dist/orchestrator/execution/task/task-verifier-rules.d.ts +3 -2
  301. package/dist/orchestrator/execution/task/task-verifier-rules.d.ts.map +1 -1
  302. package/dist/orchestrator/execution/task/task-verifier-rules.js +377 -90
  303. package/dist/orchestrator/execution/task/task-verifier-rules.js.map +1 -1
  304. package/dist/orchestrator/execution/task/task-verifier-types.d.ts +13 -0
  305. package/dist/orchestrator/execution/task/task-verifier-types.d.ts.map +1 -1
  306. package/dist/orchestrator/execution/task/task-verifier-types.js.map +1 -1
  307. package/dist/orchestrator/execution/task/task-verifier.d.ts +5 -4
  308. package/dist/orchestrator/execution/task/task-verifier.d.ts.map +1 -1
  309. package/dist/orchestrator/execution/task/task-verifier.js +396 -25
  310. package/dist/orchestrator/execution/task/task-verifier.js.map +1 -1
  311. package/dist/orchestrator/execution/task/task-workspace.d.ts +5 -0
  312. package/dist/orchestrator/execution/task/task-workspace.d.ts.map +1 -1
  313. package/dist/orchestrator/execution/task/task-workspace.js +20 -10
  314. package/dist/orchestrator/execution/task/task-workspace.js.map +1 -1
  315. package/dist/orchestrator/execution/types/task-group.d.ts +85 -5
  316. package/dist/orchestrator/execution/types/task-group.d.ts.map +1 -1
  317. package/dist/orchestrator/execution/types/task.d.ts +155 -3
  318. package/dist/orchestrator/execution/types/task.d.ts.map +1 -1
  319. package/dist/orchestrator/execution/types/task.js +18 -0
  320. package/dist/orchestrator/execution/types/task.js.map +1 -1
  321. package/dist/orchestrator/loop/durable-loop/contracts.d.ts +2 -0
  322. package/dist/orchestrator/loop/durable-loop/contracts.d.ts.map +1 -1
  323. package/dist/orchestrator/loop/durable-loop/contracts.js.map +1 -1
  324. package/dist/orchestrator/loop/durable-loop/phase-specs.d.ts +12 -12
  325. package/dist/orchestrator/loop/durable-loop/preparation.d.ts.map +1 -1
  326. package/dist/orchestrator/loop/durable-loop/preparation.js +7 -1
  327. package/dist/orchestrator/loop/durable-loop/preparation.js.map +1 -1
  328. package/dist/orchestrator/loop/loop-report-helper.d.ts.map +1 -1
  329. package/dist/orchestrator/loop/loop-report-helper.js +2 -0
  330. package/dist/orchestrator/loop/loop-report-helper.js.map +1 -1
  331. package/dist/platform/corrections/memory-correction-ledger.d.ts +30 -30
  332. package/dist/platform/corrections/memory-governance.d.ts +2 -2
  333. package/dist/platform/corrections/memory-quarantine.d.ts +2 -2
  334. package/dist/platform/dream/playbook-memory.d.ts +4 -4
  335. package/dist/platform/knowledge/types/agent-memory.d.ts +46 -46
  336. package/dist/platform/observation/context-provider/collector.d.ts.map +1 -1
  337. package/dist/platform/observation/context-provider/collector.js +89 -24
  338. package/dist/platform/observation/context-provider/collector.js.map +1 -1
  339. package/dist/platform/observation/data-source-adapter.d.ts +2 -0
  340. package/dist/platform/observation/data-source-adapter.d.ts.map +1 -1
  341. package/dist/platform/observation/data-source-adapter.js.map +1 -1
  342. package/dist/platform/observation/observation-apply.d.ts.map +1 -1
  343. package/dist/platform/observation/observation-apply.js +8 -2
  344. package/dist/platform/observation/observation-apply.js.map +1 -1
  345. package/dist/platform/observation/observation-engine.d.ts.map +1 -1
  346. package/dist/platform/observation/observation-engine.js +118 -70
  347. package/dist/platform/observation/observation-engine.js.map +1 -1
  348. package/dist/platform/observation/observation-helpers.d.ts +2 -0
  349. package/dist/platform/observation/observation-helpers.d.ts.map +1 -1
  350. package/dist/platform/observation/observation-helpers.js.map +1 -1
  351. package/dist/platform/observation/types/data-source.d.ts +48 -0
  352. package/dist/platform/observation/types/data-source.d.ts.map +1 -1
  353. package/dist/platform/observation/types/data-source.js +4 -0
  354. package/dist/platform/observation/types/data-source.js.map +1 -1
  355. package/dist/platform/observation/workspace-context.d.ts.map +1 -1
  356. package/dist/platform/observation/workspace-context.js +13 -18
  357. package/dist/platform/observation/workspace-context.js.map +1 -1
  358. package/dist/platform/soil/contracts.d.ts +58 -58
  359. package/dist/prompt/purposes/verification.d.ts +2 -2
  360. package/dist/reporting/report-formatters.d.ts.map +1 -1
  361. package/dist/reporting/report-formatters.js +26 -1
  362. package/dist/reporting/report-formatters.js.map +1 -1
  363. package/dist/reporting/reporting-engine.d.ts.map +1 -1
  364. package/dist/reporting/reporting-engine.js +1 -0
  365. package/dist/reporting/reporting-engine.js.map +1 -1
  366. package/dist/reporting/reporting-types.d.ts +7 -0
  367. package/dist/reporting/reporting-types.d.ts.map +1 -1
  368. package/dist/reporting/types/report.d.ts +12 -0
  369. package/dist/reporting/types/report.d.ts.map +1 -1
  370. package/dist/reporting/types/report.js +1 -0
  371. package/dist/reporting/types/report.js.map +1 -1
  372. package/dist/runtime/approval-broker.d.ts +12 -0
  373. package/dist/runtime/approval-broker.d.ts.map +1 -1
  374. package/dist/runtime/approval-broker.js +27 -7
  375. package/dist/runtime/approval-broker.js.map +1 -1
  376. package/dist/runtime/control/daemon-runtime-control-executor.d.ts.map +1 -1
  377. package/dist/runtime/control/daemon-runtime-control-executor.js +9 -4
  378. package/dist/runtime/control/daemon-runtime-control-executor.js.map +1 -1
  379. package/dist/runtime/control/runtime-control-intent.d.ts.map +1 -1
  380. package/dist/runtime/control/runtime-control-intent.js +3 -2
  381. package/dist/runtime/control/runtime-control-intent.js.map +1 -1
  382. package/dist/runtime/control/runtime-control-service.d.ts +27 -1
  383. package/dist/runtime/control/runtime-control-service.d.ts.map +1 -1
  384. package/dist/runtime/control/runtime-control-service.js +181 -2
  385. package/dist/runtime/control/runtime-control-service.js.map +1 -1
  386. package/dist/runtime/control/runtime-target-resolver.js +2 -0
  387. package/dist/runtime/control/runtime-target-resolver.js.map +1 -1
  388. package/dist/runtime/daemon/browser-backpressure-policy.d.ts +22 -0
  389. package/dist/runtime/daemon/browser-backpressure-policy.d.ts.map +1 -0
  390. package/dist/runtime/daemon/browser-backpressure-policy.js +95 -0
  391. package/dist/runtime/daemon/browser-backpressure-policy.js.map +1 -0
  392. package/dist/runtime/daemon/client.d.ts +1 -0
  393. package/dist/runtime/daemon/client.d.ts.map +1 -1
  394. package/dist/runtime/daemon/client.js.map +1 -1
  395. package/dist/runtime/daemon/runner-goal-cycle.d.ts.map +1 -1
  396. package/dist/runtime/daemon/runner-goal-cycle.js +1 -2
  397. package/dist/runtime/daemon/runner-goal-cycle.js.map +1 -1
  398. package/dist/runtime/daemon/runner-recovery.d.ts +17 -3
  399. package/dist/runtime/daemon/runner-recovery.d.ts.map +1 -1
  400. package/dist/runtime/daemon/runner-recovery.js +50 -12
  401. package/dist/runtime/daemon/runner-recovery.js.map +1 -1
  402. package/dist/runtime/daemon/runner-startup.d.ts.map +1 -1
  403. package/dist/runtime/daemon/runner-startup.js +18 -1
  404. package/dist/runtime/daemon/runner-startup.js.map +1 -1
  405. package/dist/runtime/daemon/runner.d.ts.map +1 -1
  406. package/dist/runtime/daemon/runner.js +13 -3
  407. package/dist/runtime/daemon/runner.js.map +1 -1
  408. package/dist/runtime/daemon/runtime-ownership.d.ts +7 -1
  409. package/dist/runtime/daemon/runtime-ownership.d.ts.map +1 -1
  410. package/dist/runtime/daemon/runtime-ownership.js +171 -25
  411. package/dist/runtime/daemon/runtime-ownership.js.map +1 -1
  412. package/dist/runtime/daemon/wait-deadline-resolver.d.ts.map +1 -1
  413. package/dist/runtime/daemon/wait-deadline-resolver.js +2 -0
  414. package/dist/runtime/daemon/wait-deadline-resolver.js.map +1 -1
  415. package/dist/runtime/event/server-snapshot-reader.d.ts +3 -1
  416. package/dist/runtime/event/server-snapshot-reader.d.ts.map +1 -1
  417. package/dist/runtime/event/server-snapshot-reader.js +68 -2
  418. package/dist/runtime/event/server-snapshot-reader.js.map +1 -1
  419. package/dist/runtime/event/server-types.d.ts +2 -0
  420. package/dist/runtime/event/server-types.d.ts.map +1 -1
  421. package/dist/runtime/evidence-answer.d.ts.map +1 -1
  422. package/dist/runtime/evidence-answer.js +34 -7
  423. package/dist/runtime/evidence-answer.js.map +1 -1
  424. package/dist/runtime/gateway/channel-adapter.d.ts +3 -0
  425. package/dist/runtime/gateway/channel-adapter.d.ts.map +1 -1
  426. package/dist/runtime/gateway/channel-display-policy.d.ts +42 -0
  427. package/dist/runtime/gateway/channel-display-policy.d.ts.map +1 -0
  428. package/dist/runtime/gateway/channel-display-policy.js +85 -0
  429. package/dist/runtime/gateway/channel-display-policy.js.map +1 -0
  430. package/dist/runtime/gateway/chat-event-rendering.d.ts +2 -1
  431. package/dist/runtime/gateway/chat-event-rendering.d.ts.map +1 -1
  432. package/dist/runtime/gateway/chat-event-rendering.js +2 -0
  433. package/dist/runtime/gateway/chat-event-rendering.js.map +1 -1
  434. package/dist/runtime/gateway/chat-session-dispatch.d.ts.map +1 -1
  435. package/dist/runtime/gateway/chat-session-dispatch.js +4 -9
  436. package/dist/runtime/gateway/chat-session-dispatch.js.map +1 -1
  437. package/dist/runtime/gateway/chat-session-port.d.ts +2 -0
  438. package/dist/runtime/gateway/chat-session-port.d.ts.map +1 -1
  439. package/dist/runtime/gateway/chat-session-port.js.map +1 -1
  440. package/dist/runtime/gateway/discord-gateway-adapter.d.ts +4 -0
  441. package/dist/runtime/gateway/discord-gateway-adapter.d.ts.map +1 -1
  442. package/dist/runtime/gateway/discord-gateway-adapter.js +100 -31
  443. package/dist/runtime/gateway/discord-gateway-adapter.js.map +1 -1
  444. package/dist/runtime/gateway/index.d.ts +4 -0
  445. package/dist/runtime/gateway/index.d.ts.map +1 -1
  446. package/dist/runtime/gateway/index.js +2 -0
  447. package/dist/runtime/gateway/index.js.map +1 -1
  448. package/dist/runtime/gateway/non-tui-display-projector.d.ts +40 -0
  449. package/dist/runtime/gateway/non-tui-display-projector.d.ts.map +1 -0
  450. package/dist/runtime/gateway/non-tui-display-projector.js +166 -0
  451. package/dist/runtime/gateway/non-tui-display-projector.js.map +1 -0
  452. package/dist/runtime/gateway/signal-gateway-adapter.d.ts +1 -0
  453. package/dist/runtime/gateway/signal-gateway-adapter.d.ts.map +1 -1
  454. package/dist/runtime/gateway/signal-gateway-adapter.js +47 -4
  455. package/dist/runtime/gateway/signal-gateway-adapter.js.map +1 -1
  456. package/dist/runtime/gateway/slack-channel-adapter.d.ts +1 -0
  457. package/dist/runtime/gateway/slack-channel-adapter.d.ts.map +1 -1
  458. package/dist/runtime/gateway/slack-channel-adapter.js +93 -18
  459. package/dist/runtime/gateway/slack-channel-adapter.js.map +1 -1
  460. package/dist/runtime/gateway/telegram-gateway-adapter.d.ts +2 -0
  461. package/dist/runtime/gateway/telegram-gateway-adapter.d.ts.map +1 -1
  462. package/dist/runtime/gateway/telegram-gateway-adapter.js +61 -113
  463. package/dist/runtime/gateway/telegram-gateway-adapter.js.map +1 -1
  464. package/dist/runtime/gateway/whatsapp-gateway-adapter.d.ts +1 -0
  465. package/dist/runtime/gateway/whatsapp-gateway-adapter.d.ts.map +1 -1
  466. package/dist/runtime/gateway/whatsapp-gateway-adapter.js +49 -4
  467. package/dist/runtime/gateway/whatsapp-gateway-adapter.js.map +1 -1
  468. package/dist/runtime/interactive-automation/browser-session-resolver.d.ts +26 -0
  469. package/dist/runtime/interactive-automation/browser-session-resolver.d.ts.map +1 -0
  470. package/dist/runtime/interactive-automation/browser-session-resolver.js +75 -0
  471. package/dist/runtime/interactive-automation/browser-session-resolver.js.map +1 -0
  472. package/dist/runtime/interactive-automation/index.d.ts +2 -0
  473. package/dist/runtime/interactive-automation/index.d.ts.map +1 -1
  474. package/dist/runtime/interactive-automation/index.js +2 -0
  475. package/dist/runtime/interactive-automation/index.js.map +1 -1
  476. package/dist/runtime/interactive-automation/runtime-auth-handoff-store.d.ts +35 -0
  477. package/dist/runtime/interactive-automation/runtime-auth-handoff-store.d.ts.map +1 -0
  478. package/dist/runtime/interactive-automation/runtime-auth-handoff-store.js +125 -0
  479. package/dist/runtime/interactive-automation/runtime-auth-handoff-store.js.map +1 -0
  480. package/dist/runtime/permission-dialogue.d.ts +113 -0
  481. package/dist/runtime/permission-dialogue.d.ts.map +1 -0
  482. package/dist/runtime/permission-dialogue.js +82 -0
  483. package/dist/runtime/permission-dialogue.js.map +1 -0
  484. package/dist/runtime/run-spec/derive.d.ts +14 -14
  485. package/dist/runtime/run-spec/handoff.d.ts.map +1 -1
  486. package/dist/runtime/run-spec/handoff.js +33 -0
  487. package/dist/runtime/run-spec/handoff.js.map +1 -1
  488. package/dist/runtime/run-spec/types.d.ts +16 -16
  489. package/dist/runtime/session-registry/types.d.ts +12 -12
  490. package/dist/runtime/store/artifact-retention.d.ts +2 -0
  491. package/dist/runtime/store/artifact-retention.d.ts.map +1 -1
  492. package/dist/runtime/store/artifact-retention.js +24 -21
  493. package/dist/runtime/store/artifact-retention.js.map +1 -1
  494. package/dist/runtime/store/budget-store.d.ts +8 -8
  495. package/dist/runtime/store/evidence-ledger.d.ts.map +1 -1
  496. package/dist/runtime/store/evidence-ledger.js +39 -1
  497. package/dist/runtime/store/evidence-ledger.js.map +1 -1
  498. package/dist/runtime/store/evidence-types.d.ts +204 -204
  499. package/dist/runtime/store/experiment-queue-store.d.ts +20 -20
  500. package/dist/runtime/store/index.d.ts +2 -2
  501. package/dist/runtime/store/index.d.ts.map +1 -1
  502. package/dist/runtime/store/index.js +1 -1
  503. package/dist/runtime/store/index.js.map +1 -1
  504. package/dist/runtime/store/operator-handoff-store.d.ts +3 -3
  505. package/dist/runtime/store/reproducibility-manifest.d.ts +20 -20
  506. package/dist/runtime/store/runtime-operation-schemas.d.ts +95 -62
  507. package/dist/runtime/store/runtime-operation-schemas.d.ts.map +1 -1
  508. package/dist/runtime/store/runtime-operation-schemas.js +9 -0
  509. package/dist/runtime/store/runtime-operation-schemas.js.map +1 -1
  510. package/dist/runtime/store/runtime-paths.d.ts +2 -0
  511. package/dist/runtime/store/runtime-paths.d.ts.map +1 -1
  512. package/dist/runtime/store/runtime-paths.js +6 -0
  513. package/dist/runtime/store/runtime-paths.js.map +1 -1
  514. package/dist/runtime/store/runtime-schemas.d.ts +2256 -46
  515. package/dist/runtime/store/runtime-schemas.d.ts.map +1 -1
  516. package/dist/runtime/store/runtime-schemas.js +85 -0
  517. package/dist/runtime/store/runtime-schemas.js.map +1 -1
  518. package/dist/runtime/types/companion.d.ts +52 -52
  519. package/dist/runtime/types/daemon.d.ts +31 -31
  520. package/dist/tools/automation/InteractiveAutomationTools.d.ts +22 -2
  521. package/dist/tools/automation/InteractiveAutomationTools.d.ts.map +1 -1
  522. package/dist/tools/automation/InteractiveAutomationTools.js +75 -10
  523. package/dist/tools/automation/InteractiveAutomationTools.js.map +1 -1
  524. package/dist/tools/builtin/factory.d.ts +2 -1
  525. package/dist/tools/builtin/factory.d.ts.map +1 -1
  526. package/dist/tools/builtin/factory.js +6 -2
  527. package/dist/tools/builtin/factory.js.map +1 -1
  528. package/dist/tools/execution/MemorySaveTool/MemorySaveTool.d.ts +20 -20
  529. package/dist/tools/execution/RunAdapterTool/RunAdapterTool.d.ts +6 -0
  530. package/dist/tools/execution/RunAdapterTool/RunAdapterTool.d.ts.map +1 -1
  531. package/dist/tools/execution/RunAdapterTool/RunAdapterTool.js +2 -0
  532. package/dist/tools/execution/RunAdapterTool/RunAdapterTool.js.map +1 -1
  533. package/dist/tools/execution-orchestrator.d.ts +29 -0
  534. package/dist/tools/execution-orchestrator.d.ts.map +1 -0
  535. package/dist/tools/execution-orchestrator.js +153 -0
  536. package/dist/tools/execution-orchestrator.js.map +1 -0
  537. package/dist/tools/executor.d.ts +6 -0
  538. package/dist/tools/executor.d.ts.map +1 -1
  539. package/dist/tools/executor.js +48 -11
  540. package/dist/tools/executor.js.map +1 -1
  541. package/dist/tools/fs/ApplyPatchTool/ApplyPatchTool.d.ts.map +1 -1
  542. package/dist/tools/fs/ApplyPatchTool/ApplyPatchTool.js +130 -17
  543. package/dist/tools/fs/ApplyPatchTool/ApplyPatchTool.js.map +1 -1
  544. package/dist/tools/kaggle/KaggleExperimentTools.js +4 -3
  545. package/dist/tools/kaggle/KaggleExperimentTools.js.map +1 -1
  546. package/dist/tools/kaggle/KaggleSubmissionTools.js +6 -5
  547. package/dist/tools/kaggle/KaggleSubmissionTools.js.map +1 -1
  548. package/dist/tools/kaggle/KaggleWorkspacePrepareTool.js +6 -5
  549. package/dist/tools/kaggle/KaggleWorkspacePrepareTool.js.map +1 -1
  550. package/dist/tools/kaggle/paths.d.ts.map +1 -1
  551. package/dist/tools/kaggle/paths.js +12 -8
  552. package/dist/tools/kaggle/paths.js.map +1 -1
  553. package/dist/tools/mutation/TaskStopTool/TaskStopTool.d.ts.map +1 -1
  554. package/dist/tools/mutation/TaskStopTool/TaskStopTool.js +8 -0
  555. package/dist/tools/mutation/TaskStopTool/TaskStopTool.js.map +1 -1
  556. package/dist/tools/mutation/TaskUpdateTool/TaskUpdateTool.d.ts +8 -8
  557. package/dist/tools/mutation/TaskUpdateTool/TaskUpdateTool.d.ts.map +1 -1
  558. package/dist/tools/mutation/TaskUpdateTool/TaskUpdateTool.js +49 -7
  559. package/dist/tools/mutation/TaskUpdateTool/TaskUpdateTool.js.map +1 -1
  560. package/dist/tools/network/GitHubCliTool/GitHubCliTool.d.ts +4 -4
  561. package/dist/tools/network/McpStdioTool/McpStdioTool.d.ts +4 -4
  562. package/dist/tools/permission.d.ts +0 -1
  563. package/dist/tools/permission.d.ts.map +1 -1
  564. package/dist/tools/permission.js +9 -33
  565. package/dist/tools/permission.js.map +1 -1
  566. package/dist/tools/query/CodeReadContextTool/CodeReadContextTool.d.ts +4 -4
  567. package/dist/tools/query/CodeSearchRepairTool/CodeSearchRepairTool.d.ts +8 -8
  568. package/dist/tools/query/CodeSearchTool/CodeSearchTool.d.ts +4 -4
  569. package/dist/tools/query/MemoryRecallTool/MemoryRecallTool.d.ts +4 -4
  570. package/dist/tools/query/runtime-session-tools.d.ts +73 -5
  571. package/dist/tools/query/runtime-session-tools.d.ts.map +1 -1
  572. package/dist/tools/query/runtime-session-tools.js +114 -0
  573. package/dist/tools/query/runtime-session-tools.js.map +1 -1
  574. package/dist/tools/runtime/LongRunningRuntimeTools.d.ts +72 -54
  575. package/dist/tools/runtime/LongRunningRuntimeTools.d.ts.map +1 -1
  576. package/dist/tools/runtime/LongRunningRuntimeTools.js +4 -1
  577. package/dist/tools/runtime/LongRunningRuntimeTools.js.map +1 -1
  578. package/dist/tools/runtime/RunSpecHandoffTools.d.ts.map +1 -1
  579. package/dist/tools/runtime/RunSpecHandoffTools.js +162 -2
  580. package/dist/tools/runtime/RunSpecHandoffTools.js.map +1 -1
  581. package/dist/tools/runtime/SetupRuntimeControlTools.d.ts.map +1 -1
  582. package/dist/tools/runtime/SetupRuntimeControlTools.js +169 -17
  583. package/dist/tools/runtime/SetupRuntimeControlTools.js.map +1 -1
  584. package/dist/tools/system/EnvTool/EnvTool.d.ts +4 -4
  585. package/dist/tools/system/GitDiffTool/GitDiffTool.d.ts +4 -4
  586. package/dist/tools/system/GitLogTool/GitLogTool.d.ts +4 -4
  587. package/dist/tools/system/ShellCommandTool/ShellCommandTool.d.ts.map +1 -1
  588. package/dist/tools/system/ShellCommandTool/ShellCommandTool.js +8 -2
  589. package/dist/tools/system/ShellCommandTool/ShellCommandTool.js.map +1 -1
  590. package/dist/tools/system/ShellTool/ShellTool.d.ts.map +1 -1
  591. package/dist/tools/system/ShellTool/ShellTool.js +29 -11
  592. package/dist/tools/system/ShellTool/ShellTool.js.map +1 -1
  593. package/dist/tools/system/ShellTool/command-policy.d.ts +12 -8
  594. package/dist/tools/system/ShellTool/command-policy.d.ts.map +1 -1
  595. package/dist/tools/system/ShellTool/command-policy.js +412 -98
  596. package/dist/tools/system/ShellTool/command-policy.js.map +1 -1
  597. package/dist/tools/system/ShellTool/prompt.d.ts +1 -1
  598. package/dist/tools/system/ShellTool/prompt.d.ts.map +1 -1
  599. package/dist/tools/system/ShellTool/prompt.js +1 -1
  600. package/dist/tools/system/ShellTool/prompt.js.map +1 -1
  601. package/dist/tools/system/TestRunnerTool/TestRunnerTool.d.ts +1 -1
  602. package/dist/tools/system/TestRunnerTool/TestRunnerTool.d.ts.map +1 -1
  603. package/dist/tools/system/TestRunnerTool/TestRunnerTool.js +152 -8
  604. package/dist/tools/system/TestRunnerTool/TestRunnerTool.js.map +1 -1
  605. package/dist/tools/system/UpdatePlanTool/UpdatePlanTool.js +1 -1
  606. package/dist/tools/system/UpdatePlanTool/UpdatePlanTool.js.map +1 -1
  607. package/dist/tools/types.d.ts +36 -12
  608. package/dist/tools/types.d.ts.map +1 -1
  609. package/dist/tools/types.js +26 -3
  610. package/dist/tools/types.js.map +1 -1
  611. package/dist/tools/workspace-scope.d.ts +11 -0
  612. package/dist/tools/workspace-scope.d.ts.map +1 -0
  613. package/dist/tools/workspace-scope.js +77 -0
  614. package/dist/tools/workspace-scope.js.map +1 -0
  615. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"factory.js","sourceRoot":"","sources":["../../../src/tools/builtin/factory.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,gBAAgB,EAChB,sBAAsB,EACtB,mBAAmB,EACnB,mBAAmB,EACnB,6BAA6B,EAC7B,eAAe,GAChB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,MAAM,4B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CAAC,IAAI,6BAA6B,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IACtF,IAAI,6BAA6B,EAAE,CAAC;QAClC,KAAK,CAAC,IAAI,CACR,IAAI,mBAAmB,CAAC,6BAA6B,EAAE,2BAA2B,EAAE;YAClF,mBAAmB;SACpB,CAAC,EACF,IAAI,sBAAsB,CAAC,6BAA6B,EAAE,2BAA2B,EAAE;YACrF,mBAAmB;YACnB,gBAAgB;YAChB,cAAc,EAAE,qBAAqB;YACrC,YAAY,EAAE,mBAAmB;SAClC,CAAC,EACF,IAAI,gBAAgB,CAAC,6BAA6B,EAAE,2BAA2B,CAAC,EAChF,IAAI,sBAAsB,CAAC,6BAA6B,EAAE,2BAA2B,CAAC,EACtF,IAAI,mBAAmB,CAAC,6BAA6B,EAAE,2BAA2B,CAAC,EACnF,IAAI,mBAAmB,CAAC,6BAA6B,EAAE,2BAA2B,CAAC,EACnF,IAAI,6BAA6B,CAAC,6BAA6B,EAAE,2BAA2B,CAAC,EAC7F,IAAI,eAAe,CAAC,6BAA6B,EAAE,2BAA2B,CAAC,CAChF,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,IAAI,CACR,IAAI,mBAAmB,EAAE,EACzB,IAAI,oBAAoB,EAAE,EAC1B,IAAI,YAAY,EAAE,EAClB,IAAI,cAAc,EAAE,EACpB,IAAI,YAAY,EAAE,CACnB,CAAC;IAEF,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -18,7 +18,7 @@ export declare const MemorySaveInputSchema: z.ZodObject<{
18
18
  }, "strict", z.ZodTypeAny, {
19
19
  source_type: "unknown" | "external" | "web" | "tool" | "user" | "runtime" | "imported";
20
20
  raw_refs: string[];
21
- verification_status: "unknown" | "unverified" | "verified" | "contradicted" | "suspicious";
21
+ verification_status: "unknown" | "verified" | "unverified" | "contradicted" | "suspicious";
22
22
  risk_signals: ("hallucinated" | "low_provenance" | "contradiction" | "prompt_injection_like" | "unverified_external")[];
23
23
  reliability?: number | undefined;
24
24
  source_ref?: string | undefined;
@@ -27,7 +27,7 @@ export declare const MemorySaveInputSchema: z.ZodObject<{
27
27
  source_type?: "unknown" | "external" | "web" | "tool" | "user" | "runtime" | "imported" | undefined;
28
28
  source_ref?: string | undefined;
29
29
  raw_refs?: string[] | undefined;
30
- verification_status?: "unknown" | "unverified" | "verified" | "contradicted" | "suspicious" | undefined;
30
+ verification_status?: "unknown" | "verified" | "unverified" | "contradicted" | "suspicious" | undefined;
31
31
  risk_signals?: ("hallucinated" | "low_provenance" | "contradiction" | "prompt_injection_like" | "unverified_external")[] | undefined;
32
32
  }>>;
33
33
  governance: z.ZodOptional<z.ZodObject<{
@@ -70,7 +70,7 @@ export declare const MemorySaveInputSchema: z.ZodObject<{
70
70
  export_visibility: z.ZodDefault<z.ZodEnum<["listed", "redacted", "hidden"]>>;
71
71
  owner_ref: z.ZodDefault<z.ZodString>;
72
72
  }, "strict", z.ZodTypeAny, {
73
- sensitivity: "local" | "public" | "private" | "secret";
73
+ sensitivity: "secret" | "local" | "public" | "private";
74
74
  consent: {
75
75
  scope_id: string;
76
76
  allowed_contexts: string[];
@@ -87,7 +87,7 @@ export declare const MemorySaveInputSchema: z.ZodObject<{
87
87
  export_visibility: "listed" | "redacted" | "hidden";
88
88
  owner_ref: string;
89
89
  }, {
90
- sensitivity?: "local" | "public" | "private" | "secret" | undefined;
90
+ sensitivity?: "secret" | "local" | "public" | "private" | undefined;
91
91
  consent?: {
92
92
  scope_id?: string | undefined;
93
93
  allowed_contexts?: string[] | undefined;
@@ -113,14 +113,14 @@ export declare const MemorySaveInputSchema: z.ZodObject<{
113
113
  provenance?: {
114
114
  source_type: "unknown" | "external" | "web" | "tool" | "user" | "runtime" | "imported";
115
115
  raw_refs: string[];
116
- verification_status: "unknown" | "unverified" | "verified" | "contradicted" | "suspicious";
116
+ verification_status: "unknown" | "verified" | "unverified" | "contradicted" | "suspicious";
117
117
  risk_signals: ("hallucinated" | "low_provenance" | "contradiction" | "prompt_injection_like" | "unverified_external")[];
118
118
  reliability?: number | undefined;
119
119
  source_ref?: string | undefined;
120
120
  } | undefined;
121
- verification_status?: "unknown" | "unverified" | "verified" | "contradicted" | "suspicious" | undefined;
121
+ verification_status?: "unknown" | "verified" | "unverified" | "contradicted" | "suspicious" | undefined;
122
122
  governance?: {
123
- sensitivity: "local" | "public" | "private" | "secret";
123
+ sensitivity: "secret" | "local" | "public" | "private";
124
124
  consent: {
125
125
  scope_id: string;
126
126
  allowed_contexts: string[];
@@ -147,13 +147,13 @@ export declare const MemorySaveInputSchema: z.ZodObject<{
147
147
  source_type?: "unknown" | "external" | "web" | "tool" | "user" | "runtime" | "imported" | undefined;
148
148
  source_ref?: string | undefined;
149
149
  raw_refs?: string[] | undefined;
150
- verification_status?: "unknown" | "unverified" | "verified" | "contradicted" | "suspicious" | undefined;
150
+ verification_status?: "unknown" | "verified" | "unverified" | "contradicted" | "suspicious" | undefined;
151
151
  risk_signals?: ("hallucinated" | "low_provenance" | "contradiction" | "prompt_injection_like" | "unverified_external")[] | undefined;
152
152
  } | undefined;
153
- verification_status?: "unknown" | "unverified" | "verified" | "contradicted" | "suspicious" | undefined;
153
+ verification_status?: "unknown" | "verified" | "unverified" | "contradicted" | "suspicious" | undefined;
154
154
  memory_type?: "observation" | "preference" | "fact" | "procedure" | undefined;
155
155
  governance?: {
156
- sensitivity?: "local" | "public" | "private" | "secret" | undefined;
156
+ sensitivity?: "secret" | "local" | "public" | "private" | undefined;
157
157
  consent?: {
158
158
  scope_id?: string | undefined;
159
159
  allowed_contexts?: string[] | undefined;
@@ -192,7 +192,7 @@ export declare class MemorySaveTool implements ITool<MemorySaveInput, unknown> {
192
192
  }, "strict", z.ZodTypeAny, {
193
193
  source_type: "unknown" | "external" | "web" | "tool" | "user" | "runtime" | "imported";
194
194
  raw_refs: string[];
195
- verification_status: "unknown" | "unverified" | "verified" | "contradicted" | "suspicious";
195
+ verification_status: "unknown" | "verified" | "unverified" | "contradicted" | "suspicious";
196
196
  risk_signals: ("hallucinated" | "low_provenance" | "contradiction" | "prompt_injection_like" | "unverified_external")[];
197
197
  reliability?: number | undefined;
198
198
  source_ref?: string | undefined;
@@ -201,7 +201,7 @@ export declare class MemorySaveTool implements ITool<MemorySaveInput, unknown> {
201
201
  source_type?: "unknown" | "external" | "web" | "tool" | "user" | "runtime" | "imported" | undefined;
202
202
  source_ref?: string | undefined;
203
203
  raw_refs?: string[] | undefined;
204
- verification_status?: "unknown" | "unverified" | "verified" | "contradicted" | "suspicious" | undefined;
204
+ verification_status?: "unknown" | "verified" | "unverified" | "contradicted" | "suspicious" | undefined;
205
205
  risk_signals?: ("hallucinated" | "low_provenance" | "contradiction" | "prompt_injection_like" | "unverified_external")[] | undefined;
206
206
  }>>;
207
207
  governance: z.ZodOptional<z.ZodObject<{
@@ -244,7 +244,7 @@ export declare class MemorySaveTool implements ITool<MemorySaveInput, unknown> {
244
244
  export_visibility: z.ZodDefault<z.ZodEnum<["listed", "redacted", "hidden"]>>;
245
245
  owner_ref: z.ZodDefault<z.ZodString>;
246
246
  }, "strict", z.ZodTypeAny, {
247
- sensitivity: "local" | "public" | "private" | "secret";
247
+ sensitivity: "secret" | "local" | "public" | "private";
248
248
  consent: {
249
249
  scope_id: string;
250
250
  allowed_contexts: string[];
@@ -261,7 +261,7 @@ export declare class MemorySaveTool implements ITool<MemorySaveInput, unknown> {
261
261
  export_visibility: "listed" | "redacted" | "hidden";
262
262
  owner_ref: string;
263
263
  }, {
264
- sensitivity?: "local" | "public" | "private" | "secret" | undefined;
264
+ sensitivity?: "secret" | "local" | "public" | "private" | undefined;
265
265
  consent?: {
266
266
  scope_id?: string | undefined;
267
267
  allowed_contexts?: string[] | undefined;
@@ -287,14 +287,14 @@ export declare class MemorySaveTool implements ITool<MemorySaveInput, unknown> {
287
287
  provenance?: {
288
288
  source_type: "unknown" | "external" | "web" | "tool" | "user" | "runtime" | "imported";
289
289
  raw_refs: string[];
290
- verification_status: "unknown" | "unverified" | "verified" | "contradicted" | "suspicious";
290
+ verification_status: "unknown" | "verified" | "unverified" | "contradicted" | "suspicious";
291
291
  risk_signals: ("hallucinated" | "low_provenance" | "contradiction" | "prompt_injection_like" | "unverified_external")[];
292
292
  reliability?: number | undefined;
293
293
  source_ref?: string | undefined;
294
294
  } | undefined;
295
- verification_status?: "unknown" | "unverified" | "verified" | "contradicted" | "suspicious" | undefined;
295
+ verification_status?: "unknown" | "verified" | "unverified" | "contradicted" | "suspicious" | undefined;
296
296
  governance?: {
297
- sensitivity: "local" | "public" | "private" | "secret";
297
+ sensitivity: "secret" | "local" | "public" | "private";
298
298
  consent: {
299
299
  scope_id: string;
300
300
  allowed_contexts: string[];
@@ -321,13 +321,13 @@ export declare class MemorySaveTool implements ITool<MemorySaveInput, unknown> {
321
321
  source_type?: "unknown" | "external" | "web" | "tool" | "user" | "runtime" | "imported" | undefined;
322
322
  source_ref?: string | undefined;
323
323
  raw_refs?: string[] | undefined;
324
- verification_status?: "unknown" | "unverified" | "verified" | "contradicted" | "suspicious" | undefined;
324
+ verification_status?: "unknown" | "verified" | "unverified" | "contradicted" | "suspicious" | undefined;
325
325
  risk_signals?: ("hallucinated" | "low_provenance" | "contradiction" | "prompt_injection_like" | "unverified_external")[] | undefined;
326
326
  } | undefined;
327
- verification_status?: "unknown" | "unverified" | "verified" | "contradicted" | "suspicious" | undefined;
327
+ verification_status?: "unknown" | "verified" | "unverified" | "contradicted" | "suspicious" | undefined;
328
328
  memory_type?: "observation" | "preference" | "fact" | "procedure" | undefined;
329
329
  governance?: {
330
- sensitivity?: "local" | "public" | "private" | "secret" | undefined;
330
+ sensitivity?: "secret" | "local" | "public" | "private" | undefined;
331
331
  consent?: {
332
332
  scope_id?: string | undefined;
333
333
  allowed_contexts?: string[] | undefined;
@@ -5,14 +5,17 @@ export declare const RunAdapterInputSchema: z.ZodObject<{
5
5
  adapter_id: z.ZodString;
6
6
  task_description: z.ZodString;
7
7
  goal_id: z.ZodOptional<z.ZodString>;
8
+ cwd: z.ZodOptional<z.ZodString>;
8
9
  }, "strip", z.ZodTypeAny, {
9
10
  task_description: string;
10
11
  adapter_id: string;
11
12
  goal_id?: string | undefined;
13
+ cwd?: string | undefined;
12
14
  }, {
13
15
  task_description: string;
14
16
  adapter_id: string;
15
17
  goal_id?: string | undefined;
18
+ cwd?: string | undefined;
16
19
  }>;
17
20
  export type RunAdapterInput = z.infer<typeof RunAdapterInputSchema>;
18
21
  export declare class RunAdapterTool implements ITool<RunAdapterInput, unknown> {
@@ -22,14 +25,17 @@ export declare class RunAdapterTool implements ITool<RunAdapterInput, unknown> {
22
25
  adapter_id: z.ZodString;
23
26
  task_description: z.ZodString;
24
27
  goal_id: z.ZodOptional<z.ZodString>;
28
+ cwd: z.ZodOptional<z.ZodString>;
25
29
  }, "strip", z.ZodTypeAny, {
26
30
  task_description: string;
27
31
  adapter_id: string;
28
32
  goal_id?: string | undefined;
33
+ cwd?: string | undefined;
29
34
  }, {
30
35
  task_description: string;
31
36
  adapter_id: string;
32
37
  goal_id?: string | undefined;
38
+ cwd?: string | undefined;
33
39
  }>;
34
40
  constructor(adapterRegistry: AdapterRegistry);
35
41
  description(_context?: ToolDescriptionContext): string;
@@ -1 +1 @@
1
- {"version":3,"file":"RunAdapterTool.d.ts","sourceRoot":"","sources":["../../../../src/tools/execution/RunAdapterTool/RunAdapterTool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,qBAAqB,EAAE,YAAY,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AACtI,OAAO,KAAK,EAAE,eAAe,EAAa,MAAM,kDAAkD,CAAC;AAInG,eAAO,MAAM,qBAAqB;;;;;;;;;;;;EAIhC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,qBAAa,cAAe,YAAW,KAAK,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AAG,MAAM;IAIhD,IAAI,CAAC,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE,eAAe,GAAG,OAAO,CAAC,UAAU,CAAC;IAkD5E,gBAAgB,CAAC,MAAM,EAAE,eAAe,EAAE,QAAQ,EAAE,eAAe,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAI1G,iBAAiB,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO;CAGpD"}
@@ -5,6 +5,7 @@ export const RunAdapterInputSchema = z.object({
5
5
  adapter_id: z.string().min(1, "adapter_id is required"),
6
6
  task_description: z.string().min(1, "task_description is required"),
7
7
  goal_id: z.string().optional(),
8
+ cwd: z.string().optional(),
8
9
  });
9
10
  export class RunAdapterTool {
10
11
  adapterRegistry;
@@ -46,6 +47,7 @@ export class RunAdapterTool {
46
47
  prompt: input.task_description,
47
48
  timeout_ms: 60_000,
48
49
  adapter_type: input.adapter_id,
50
+ ...(input.cwd !== undefined ? { cwd: input.cwd } : {}),
49
51
  };
50
52
  const result = await adapter.execute(task);
51
53
  if (result.success) {
@@ -1 +1 @@
1
- {"version":3,"file":"RunAdapterTool.js","sourceRoot":"","sources":["../../../../src/tools/execution/RunAdapterTool/RunAdapterTool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAyB,SAAS,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAE1F,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,wBAAwB,CAAC;IACvD,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,8BAA8B,CAAC;IACnE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAA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ExecutionDecisionStatus = "allowed" | "denied" | "needs_permission" | "needs_sandbox" | "needs_escalation" | "fail_closed";
3
+ export interface HostToolExecutionDecision {
4
+ status: HostToolExecutionDecisionStatus;
5
+ reason: string;
6
+ executionReason?: NonNullable<ToolResult["execution"]>["reason"];
7
+ requiredSandboxMode?: "workspace_write" | "danger_full_access";
8
+ requiredApprovalPolicy?: "on_request";
9
+ }
10
+ export interface HostToolExecutionRequest {
11
+ tool: ITool;
12
+ input: unknown;
13
+ context: ToolCallContext;
14
+ }
15
+ export declare function decideHostToolExecution(request: HostToolExecutionRequest): HostToolExecutionDecision;
16
+ export declare function permissionResultFromHostDecision(decision: HostToolExecutionDecision): {
17
+ status: "allowed";
18
+ } | {
19
+ status: "denied";
20
+ reason: string;
21
+ executionReason?: NonNullable<ToolResult["execution"]>["reason"];
22
+ policyDecision: HostToolExecutionDecision;
23
+ } | {
24
+ status: "needs_approval";
25
+ reason: string;
26
+ executionReason?: NonNullable<ToolResult["execution"]>["reason"];
27
+ policyDecision: HostToolExecutionDecision;
28
+ };
29
+ //# sourceMappingURL=execution-orchestrator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"execution-orchestrator.d.ts","sourceRoot":"","sources":["../../src/tools/execution-orchestrator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAIrE,MAAM,MAAM,+BAA+B,GACvC,SAAS,GACT,QAAQ,GACR,kBAAkB,GAClB,eAAe,GACf,kBAAkB,GAClB,aAAa,CAAC;AAElB,MAAM,WAAW,yBAAyB;IACxC,MAAM,EAAE,+BAA+B,CAAC;IACxC,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,WAAW,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;IACjE,mBAAmB,CAAC,EAAE,iBAAiB,GAAG,oBAAoB,CAAC;IAC/D,sBAAsB,CAAC,EAAE,YAAY,CAAC;CACvC;AAED,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,KAAK,CAAC;IACZ,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,eAAe,CAAC;CAC1B;AAED,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,wBAAwB,GAChC,yBAAyB,CAkE3B;AAsFD,wBAAgB,gCAAgC,CAAC,QAAQ,EAAE,yBAAyB,GAAG;IACrF,MAAM,EAAE,SAAS,CAAC;CACnB,GAAG;IACF,MAAM,EAAE,QAAQ,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,WAAW,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;IACjE,cAAc,EAAE,yBAAyB,CAAC;CAC3C,GAAG;IACF,MAAM,EAAE,gBAAgB,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,WAAW,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;IACjE,cAAc,EAAE,yBAAyB,CAAC;CAC3C,CAgBA"}
@@ -0,0 +1,153 @@
1
+ import { assessShellCommand } from "./system/ShellTool/command-policy.js";
2
+ import { resolveWorkspaceCwd } from "./workspace-scope.js";
3
+ export function decideHostToolExecution(request) {
4
+ const staleStateDecision = decideStateFreshness(request.context);
5
+ if (staleStateDecision)
6
+ return staleStateDecision;
7
+ const policy = request.context.executionPolicy;
8
+ if (!policy) {
9
+ return { status: "allowed", reason: "No host execution policy is attached to this call." };
10
+ }
11
+ const cwdDecision = decideWorkspaceCwd(request);
12
+ if (cwdDecision)
13
+ return cwdDecision;
14
+ const shellDecision = decideShellExecution(request);
15
+ if (shellDecision)
16
+ return shellDecision;
17
+ const needsNetwork = request.tool.metadata.permissionLevel === "write_remote"
18
+ || request.tool.metadata.requiresNetwork === true
19
+ || request.tool.metadata.tags.includes("network");
20
+ if (needsNetwork && !policy.networkAccess) {
21
+ return {
22
+ status: "needs_sandbox",
23
+ reason: "Network access is disabled for this session.",
24
+ executionReason: "sandbox_required",
25
+ requiredSandboxMode: "danger_full_access",
26
+ };
27
+ }
28
+ if (policy.sandboxMode === "read_only" && !request.tool.metadata.isReadOnly) {
29
+ return {
30
+ status: "needs_sandbox",
31
+ reason: "Read-only sandbox blocks mutating tools.",
32
+ executionReason: "sandbox_required",
33
+ requiredSandboxMode: "workspace_write",
34
+ };
35
+ }
36
+ if (policy.approvalPolicy === "untrusted"
37
+ && (request.tool.metadata.isDestructive
38
+ || request.tool.metadata.permissionLevel === "execute"
39
+ || request.tool.metadata.permissionLevel === "write_remote")) {
40
+ return {
41
+ status: "needs_escalation",
42
+ reason: `Host policy requires escalation for ${request.tool.metadata.permissionLevel} tools.`,
43
+ executionReason: "escalation_required",
44
+ requiredApprovalPolicy: "on_request",
45
+ };
46
+ }
47
+ if (request.tool.metadata.permissionLevel === "write_local"
48
+ || request.tool.metadata.permissionLevel === "execute"
49
+ || request.tool.metadata.permissionLevel === "write_remote") {
50
+ if (policy.approvalPolicy !== "never") {
51
+ return {
52
+ status: "needs_permission",
53
+ reason: `Host policy requires permission for ${request.tool.metadata.permissionLevel} tools.`,
54
+ executionReason: "approval_denied",
55
+ requiredApprovalPolicy: "on_request",
56
+ };
57
+ }
58
+ }
59
+ return { status: "allowed", reason: "Host policy allows this typed tool request." };
60
+ }
61
+ function decideStateFreshness(context) {
62
+ const state = context.hostToolState;
63
+ if (!state?.observedEpoch)
64
+ return null;
65
+ if (state.observedEpoch === state.currentEpoch)
66
+ return null;
67
+ return {
68
+ status: "fail_closed",
69
+ reason: `Tool request observed state epoch ${state.observedEpoch}, but host state is now ${state.currentEpoch}.`,
70
+ executionReason: "stale_state",
71
+ };
72
+ }
73
+ function decideWorkspaceCwd(request) {
74
+ if (typeof request.input !== "object" || request.input === null)
75
+ return null;
76
+ const cwd = request.input.cwd;
77
+ if (cwd !== undefined && typeof cwd !== "string") {
78
+ return {
79
+ status: "fail_closed",
80
+ reason: "Tool cwd must be a string when provided.",
81
+ executionReason: "policy_blocked",
82
+ };
83
+ }
84
+ const validation = resolveWorkspaceCwd(cwd, request.context);
85
+ if (validation.valid)
86
+ return null;
87
+ return {
88
+ status: "fail_closed",
89
+ reason: validation.error ?? `Tool cwd escapes workspace root: ${validation.resolved}`,
90
+ executionReason: "policy_blocked",
91
+ };
92
+ }
93
+ function decideShellExecution(request) {
94
+ if (request.tool.metadata.name !== "shell"
95
+ && request.tool.metadata.name !== "shell_command") {
96
+ return null;
97
+ }
98
+ if (typeof request.input !== "object" || request.input === null) {
99
+ return null;
100
+ }
101
+ const command = request.input.command;
102
+ if (typeof command !== "string")
103
+ return null;
104
+ const cwdValidation = resolveWorkspaceCwd(request.input.cwd, request.context);
105
+ const assessment = assessShellCommand(command, request.context.executionPolicy, request.context.trusted === true, cwdValidation.resolved);
106
+ if (assessment.status === "allowed") {
107
+ return { status: "allowed", reason: "Shell command is allowed by host policy." };
108
+ }
109
+ if (assessment.status === "needs_approval") {
110
+ return {
111
+ status: "needs_permission",
112
+ reason: assessment.reason ?? "Shell command requires permission.",
113
+ executionReason: "approval_denied",
114
+ requiredApprovalPolicy: "on_request",
115
+ };
116
+ }
117
+ if ((assessment.capabilities.localWrite && request.context.executionPolicy?.sandboxMode === "read_only")
118
+ || (assessment.capabilities.network && request.context.executionPolicy?.networkAccess === false)) {
119
+ const reason = assessment.capabilities.network
120
+ ? "Network access is disabled for this session."
121
+ : "Read-only sandbox blocks mutating shell commands.";
122
+ return {
123
+ status: "needs_sandbox",
124
+ reason,
125
+ executionReason: "sandbox_required",
126
+ requiredSandboxMode: assessment.capabilities.network ? "danger_full_access" : "workspace_write",
127
+ };
128
+ }
129
+ return {
130
+ status: "denied",
131
+ reason: assessment.reason ?? "Shell command denied by host policy.",
132
+ executionReason: "policy_blocked",
133
+ };
134
+ }
135
+ export function permissionResultFromHostDecision(decision) {
136
+ if (decision.status === "allowed")
137
+ return { status: "allowed" };
138
+ if (decision.status === "needs_permission") {
139
+ return {
140
+ status: "needs_approval",
141
+ reason: decision.reason,
142
+ ...(decision.executionReason ? { executionReason: decision.executionReason } : {}),
143
+ policyDecision: decision,
144
+ };
145
+ }
146
+ return {
147
+ status: "denied",
148
+ reason: decision.reason,
149
+ ...(decision.executionReason ? { executionReason: decision.executionReason } : {}),
150
+ policyDecision: decision,
151
+ };
152
+ }
153
+ //# sourceMappingURL=execution-orchestrator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"execution-orchestrator.js","sourceRoot":"","sources":["../../src/tools/execution-orchestrator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAwB3D,MAAM,UAAU,uBAAuB,CACrC,OAAiC;IAEjC,MAAM,kBAAkB,GAAG,oBAAoB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IACjE,IAAI,kBAAkB;QAAE,OAAO,kBAAkB,CAAC;IAElD,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,eAAe,CAAC;IAC/C,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,oDAAoD,EAAE,CAAC;IAC7F,CAAC;IAED,MAAM,WAAW,GAAG,kBAAkB,CAAC,OAAO,CAAC,CAAC;IAChD,IAAI,WAAW;QAAE,OAAO,WAAW,CAAC;IAEpC,MAAM,aAAa,GAAG,oBAAoB,CAAC,OAAO,CAAC,CAAC;IACpD,IAAI,aAAa;QAAE,OAAO,aAAa,CAAC;IAExC,MAAM,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,eAAe,KAAK,cAAc;WACxE,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,eAAe,KAAK,IAAI;WAC9C,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CA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C,CAAC,CAAC,EAAE,CAAC;QAClF,cAAc,EAAE,QAAQ;KACzB,CAAC;AACJ,CAAC"}
@@ -21,6 +21,7 @@ export declare class ToolExecutor {
21
21
  toolName: string;
22
22
  input: unknown;
23
23
  }>, context: ToolCallContext): Promise<ToolResult[]>;
24
+ private checkHostPolicyPreflight;
24
25
  private sanitizeInput;
25
26
  private withTimeout;
26
27
  /**
@@ -30,6 +31,11 @@ export declare class ToolExecutor {
30
31
  */
31
32
  private callWithRetry;
32
33
  private failResult;
34
+ private executionForFailure;
35
+ }
36
+ export declare class ToolExecutionTimeoutError extends Error {
37
+ readonly timeoutMs: number;
38
+ constructor(timeoutMs: number);
33
39
  }
34
40
  export interface ToolExecutorDeps {
35
41
  registry: ToolRegistry;
@@ -1 +1 @@
1
- {"version":3,"file":"executor.d.ts","sourceRoot":"","sources":["../../src/tools/executor.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAEV,UAAU,EACV,eAAe,EAChB,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAE9D;;;;;;;;GAQG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAe;IACxC,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAwB;IAC1D,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAwB;gBAExC,IAAI,EAAE,gBAAgB;IAM5B,OAAO,CACX,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,OAAO,EACjB,OAAO,EAAE,eAAe,GACvB,OAAO,CAAC,UAAU,CAAC;IAqJhB,YAAY,CAChB,KAAK,EAAE,KAAK,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,OAAO,CAAA;KAAE,CAAC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OAAO,CAAC,mBAAmB;CAU5B;AAED,qBAAa,yBAA0B,SAAQ,KAAK;IACtC,QAAQ,CAAC,SAAS,EAAE,MAAM;gBAAjB,SAAS,EAAE,MAAM;CAIvC;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,YAAY,CAAC;IACvB,iBAAiB,EAAE,qBAAqB,CAAC;IACzC,WAAW,EAAE,qBAAqB,CAAC;CACpC"}
@@ -3,6 +3,8 @@ import { mkdirSync, writeFileSync } from "fs";
3
3
  import { join } from "path";
4
4
  import { randomUUID } from "crypto";
5
5
  import { getPulseedDirPath } from "../base/utils/paths.js";
6
+ import { decideHostToolExecution, permissionResultFromHostDecision, } from "./execution-orchestrator.js";
7
+ import { assessShellCommand } from "./system/ShellTool/command-policy.js";
6
8
  /**
7
9
  * 5-gate execution pipeline for tool invocations.
8
10
  *
@@ -40,10 +42,13 @@ export class ToolExecutor {
40
42
  return this.failResult(`Input validation failed: ${errors}`, Date.now() - startTime);
41
43
  }
42
44
  const input = parseResult.data;
45
+ const hostPreflightResult = this.checkHostPolicyPreflight(tool, input, context, startTime);
46
+ if (hostPreflightResult)
47
+ return hostPreflightResult;
43
48
  // --- Gate 2: Semantic Validation (tool-specific) ---
44
49
  const semanticResult = await tool.checkPermissions(input, context);
45
50
  if (semanticResult.status === "denied") {
46
- return this.failResult(`Permission denied: ${semanticResult.reason}`, Date.now() - startTime, { status: "not_executed", reason: "permission_denied", message: semanticResult.reason });
51
+ return this.failResult(`Permission denied: ${semanticResult.reason}`, Date.now() - startTime, { status: "not_executed", reason: semanticResult.executionReason ?? "permission_denied", message: semanticResult.reason });
47
52
  }
48
53
  if (semanticResult.status === "needs_approval" && tool.metadata.tags.includes("automation")) {
49
54
  const approvalRequest = {
@@ -64,7 +69,7 @@ export class ToolExecutor {
64
69
  // --- Gate 3: Permission Manager (3-layer) ---
65
70
  const permResult = await this.permissionManager.check(tool, input, context);
66
71
  if (permResult.status === "denied") {
67
- return this.failResult(`Permission denied by policy: ${permResult.reason}`, Date.now() - startTime, { status: "not_executed", reason: "policy_blocked", message: permResult.reason });
72
+ return this.failResult(`Permission denied by policy: ${permResult.reason}`, Date.now() - startTime, { status: "not_executed", reason: permResult.executionReason ?? "policy_blocked", message: permResult.reason });
68
73
  }
69
74
  if (permResult.status === "needs_approval") {
70
75
  const approvalRequest = {
@@ -83,7 +88,7 @@ export class ToolExecutor {
83
88
  }
84
89
  }
85
90
  // --- Gate 4: Input Sanitization ---
86
- const sanitizeError = this.sanitizeInput(tool, input);
91
+ const sanitizeError = this.sanitizeInput(tool, input, context);
87
92
  if (sanitizeError) {
88
93
  return this.failResult(`Input sanitization failed: ${sanitizeError}`, Date.now() - startTime, { status: "not_executed", reason: "policy_blocked", message: sanitizeError });
89
94
  }
@@ -157,17 +162,29 @@ export class ToolExecutor {
157
162
  return results;
158
163
  }
159
164
  // --- Private Helpers ---
160
- sanitizeInput(tool, input) {
165
+ checkHostPolicyPreflight(tool, input, context, startTime) {
166
+ const decision = decideHostToolExecution({ tool, input, context });
167
+ if (decision.status === "allowed" || decision.status === "needs_permission") {
168
+ return null;
169
+ }
170
+ const policyResult = permissionResultFromHostDecision(decision);
171
+ if (policyResult.status !== "denied") {
172
+ return null;
173
+ }
174
+ return this.failResult(`Permission denied by host policy: ${policyResult.reason}`, Date.now() - startTime, {
175
+ status: "not_executed",
176
+ reason: policyResult.executionReason ?? "policy_blocked",
177
+ message: policyResult.reason,
178
+ });
179
+ }
180
+ sanitizeInput(tool, input, context) {
161
181
  if (tool.metadata.name === "shell" && typeof input === "object" && input !== null) {
162
182
  const obj = input;
163
183
  const cmd = obj["command"];
164
184
  if (typeof cmd === "string") {
165
- const dangerous = ["; rm ", "; curl ", "| bash", "eval ", "$(", "\`", "&&", "||", "> /", ">> ", "\n"];
166
- for (const pattern of dangerous) {
167
- if (cmd.includes(pattern)) {
168
- return `Potentially dangerous shell command detected: "${pattern}"`;
169
- }
170
- }
185
+ const assessment = assessShellCommand(cmd, context.executionPolicy, context.trusted === true, context.cwd);
186
+ if (assessment.status === "denied")
187
+ return assessment.reason ?? "Shell command denied by policy";
171
188
  }
172
189
  }
173
190
  return null;
@@ -175,7 +192,7 @@ export class ToolExecutor {
175
192
  async withTimeout(fn, timeoutMs) {
176
193
  return Promise.race([
177
194
  fn(),
178
- new Promise((_, reject) => setTimeout(() => reject(new Error(`Tool call timed out after ${timeoutMs}ms`)), timeoutMs)),
195
+ new Promise((_, reject) => setTimeout(() => reject(new ToolExecutionTimeoutError(timeoutMs)), timeoutMs)),
179
196
  ]);
180
197
  }
181
198
  /**
@@ -204,12 +221,14 @@ export class ToolExecutor {
204
221
  catch (err) {
205
222
  if (!isSafe || !isTransient(err) || attempt >= BACKOFFS.length) {
206
223
  const errMsg = err instanceof Error ? err.message : String(err);
224
+ const execution = this.executionForFailure(err, context);
207
225
  context.logger?.warn("tool.call.failure", { tool: toolName, callId: context.callId, error: errMsg });
208
226
  return {
209
227
  success: false,
210
228
  data: null,
211
229
  summary: `Tool ${toolName} failed: ${errMsg}`,
212
230
  error: errMsg,
231
+ ...(execution ? { execution } : {}),
213
232
  durationMs: 0,
214
233
  };
215
234
  }
@@ -236,5 +255,23 @@ export class ToolExecutor {
236
255
  durationMs,
237
256
  };
238
257
  }
258
+ executionForFailure(error, context) {
259
+ const message = error instanceof Error ? error.message : String(error);
260
+ if (context.abortSignal?.aborted) {
261
+ return { status: "executed", reason: "interrupted", message };
262
+ }
263
+ if (error instanceof ToolExecutionTimeoutError) {
264
+ return { status: "executed", reason: "timed_out", message };
265
+ }
266
+ return undefined;
267
+ }
268
+ }
269
+ export class ToolExecutionTimeoutError extends Error {
270
+ timeoutMs;
271
+ constructor(timeoutMs) {
272
+ super(`Tool call timed out after ${timeoutMs}ms`);
273
+ this.timeoutMs = timeoutMs;
274
+ this.name = "ToolExecutionTimeoutError";
275
+ }
239
276
  }
240
277
  //# sourceMappingURL=executor.js.map