@assemblyline-agents/runtime 1.0.0 → 3.0.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 (460) hide show
  1. package/LICENSE +1 -1
  2. package/dist/a2a-client.d.ts +22 -0
  3. package/dist/a2a-client.d.ts.map +1 -0
  4. package/dist/a2a-client.js +211 -0
  5. package/dist/a2a-client.js.map +1 -0
  6. package/dist/agent-capability-snapshot.d.ts +32 -0
  7. package/dist/agent-capability-snapshot.d.ts.map +1 -0
  8. package/dist/agent-capability-snapshot.js +77 -0
  9. package/dist/agent-capability-snapshot.js.map +1 -0
  10. package/dist/agent-event-handlers.d.ts +21 -0
  11. package/dist/agent-event-handlers.d.ts.map +1 -0
  12. package/dist/agent-event-handlers.js +64 -0
  13. package/dist/agent-event-handlers.js.map +1 -0
  14. package/dist/agent-hook-context.d.ts +8 -0
  15. package/dist/agent-hook-context.d.ts.map +1 -0
  16. package/dist/agent-hook-context.js +29 -0
  17. package/dist/agent-hook-context.js.map +1 -0
  18. package/dist/agent-hook-evaluation.d.ts +61 -0
  19. package/dist/agent-hook-evaluation.d.ts.map +1 -0
  20. package/dist/agent-hook-evaluation.js +197 -0
  21. package/dist/agent-hook-evaluation.js.map +1 -0
  22. package/dist/agent-hook-run-lifecycle.d.ts +44 -0
  23. package/dist/agent-hook-run-lifecycle.d.ts.map +1 -0
  24. package/dist/agent-hook-run-lifecycle.js +76 -0
  25. package/dist/agent-hook-run-lifecycle.js.map +1 -0
  26. package/dist/agent-state.d.ts +31 -0
  27. package/dist/agent-state.d.ts.map +1 -0
  28. package/dist/agent-state.js +80 -0
  29. package/dist/agent-state.js.map +1 -0
  30. package/dist/agent-surface.d.ts +32 -0
  31. package/dist/agent-surface.d.ts.map +1 -0
  32. package/dist/agent-surface.js +85 -0
  33. package/dist/agent-surface.js.map +1 -0
  34. package/dist/attachments.d.ts +5 -1
  35. package/dist/attachments.d.ts.map +1 -1
  36. package/dist/attachments.js +58 -32
  37. package/dist/attachments.js.map +1 -1
  38. package/dist/audience.d.ts +30 -0
  39. package/dist/audience.d.ts.map +1 -0
  40. package/dist/audience.js +68 -0
  41. package/dist/audience.js.map +1 -0
  42. package/dist/authored-hooks.d.ts +6 -0
  43. package/dist/authored-hooks.d.ts.map +1 -0
  44. package/dist/authored-hooks.js +17 -0
  45. package/dist/authored-hooks.js.map +1 -0
  46. package/dist/automation-event-match.d.ts +8 -0
  47. package/dist/automation-event-match.d.ts.map +1 -0
  48. package/dist/automation-event-match.js +25 -0
  49. package/dist/automation-event-match.js.map +1 -0
  50. package/dist/background-review-trigger.d.ts +9 -0
  51. package/dist/background-review-trigger.d.ts.map +1 -0
  52. package/dist/background-review-trigger.js +72 -0
  53. package/dist/background-review-trigger.js.map +1 -0
  54. package/dist/background-review-types.d.ts +60 -0
  55. package/dist/background-review-types.d.ts.map +1 -0
  56. package/dist/background-review-types.js +2 -0
  57. package/dist/background-review-types.js.map +1 -0
  58. package/dist/background-review-worker.d.ts +14 -0
  59. package/dist/background-review-worker.d.ts.map +1 -0
  60. package/dist/background-review-worker.js +61 -0
  61. package/dist/background-review-worker.js.map +1 -0
  62. package/dist/background-review.d.ts +5 -0
  63. package/dist/background-review.d.ts.map +1 -0
  64. package/dist/background-review.js +332 -0
  65. package/dist/background-review.js.map +1 -0
  66. package/dist/builtin-tool-executors.d.ts +50 -27
  67. package/dist/builtin-tool-executors.d.ts.map +1 -1
  68. package/dist/builtin-tool-executors.js +332 -124
  69. package/dist/builtin-tool-executors.js.map +1 -1
  70. package/dist/builtin-tools.d.ts +16 -9
  71. package/dist/builtin-tools.d.ts.map +1 -1
  72. package/dist/builtin-tools.js +308 -116
  73. package/dist/builtin-tools.js.map +1 -1
  74. package/dist/capability-catalog.d.ts +3 -2
  75. package/dist/capability-catalog.d.ts.map +1 -1
  76. package/dist/capability-catalog.js +12 -7
  77. package/dist/capability-catalog.js.map +1 -1
  78. package/dist/capability-inspection.d.ts +31 -0
  79. package/dist/capability-inspection.d.ts.map +1 -0
  80. package/dist/capability-inspection.js +58 -0
  81. package/dist/capability-inspection.js.map +1 -0
  82. package/dist/channel-http-util.d.ts.map +1 -1
  83. package/dist/channel-http-util.js +6 -5
  84. package/dist/channel-http-util.js.map +1 -1
  85. package/dist/channel-ingress.d.ts +16 -1
  86. package/dist/channel-ingress.d.ts.map +1 -1
  87. package/dist/channel-ingress.js +152 -14
  88. package/dist/channel-ingress.js.map +1 -1
  89. package/dist/channel.d.ts +73 -3
  90. package/dist/channel.d.ts.map +1 -1
  91. package/dist/checkpoints.d.ts +1 -1
  92. package/dist/checkpoints.d.ts.map +1 -1
  93. package/dist/checkpoints.js +6 -6
  94. package/dist/checkpoints.js.map +1 -1
  95. package/dist/child-process-env.d.ts +7 -0
  96. package/dist/child-process-env.d.ts.map +1 -0
  97. package/dist/child-process-env.js +41 -0
  98. package/dist/child-process-env.js.map +1 -0
  99. package/dist/computer-relay-protocol.d.ts.map +1 -1
  100. package/dist/computer-relay-protocol.js +4 -4
  101. package/dist/computer-relay-protocol.js.map +1 -1
  102. package/dist/concurrency.d.ts +1 -1
  103. package/dist/concurrency.js +1 -1
  104. package/dist/connection-auth-util.d.ts +1 -0
  105. package/dist/connection-auth-util.d.ts.map +1 -1
  106. package/dist/connection-auth-util.js +3 -1
  107. package/dist/connection-auth-util.js.map +1 -1
  108. package/dist/connection-clients.d.ts +11 -3
  109. package/dist/connection-clients.d.ts.map +1 -1
  110. package/dist/connection-clients.js +71 -8
  111. package/dist/connection-clients.js.map +1 -1
  112. package/dist/connection-event-store.d.ts +98 -0
  113. package/dist/connection-event-store.d.ts.map +1 -0
  114. package/dist/connection-event-store.js +162 -0
  115. package/dist/connection-event-store.js.map +1 -0
  116. package/dist/connection-events.d.ts +51 -0
  117. package/dist/connection-events.d.ts.map +1 -0
  118. package/dist/connection-events.js +343 -0
  119. package/dist/connection-events.js.map +1 -0
  120. package/dist/connection-stores.d.ts +6 -0
  121. package/dist/connection-stores.d.ts.map +1 -1
  122. package/dist/connection-stores.js +20 -1
  123. package/dist/connection-stores.js.map +1 -1
  124. package/dist/connection-util.d.ts +3 -2
  125. package/dist/connection-util.d.ts.map +1 -1
  126. package/dist/connection-util.js +18 -1
  127. package/dist/connection-util.js.map +1 -1
  128. package/dist/connections.d.ts +60 -5
  129. package/dist/connections.d.ts.map +1 -1
  130. package/dist/connections.js +390 -57
  131. package/dist/connections.js.map +1 -1
  132. package/dist/context-policy-util.d.ts.map +1 -1
  133. package/dist/context-policy-util.js +1 -3
  134. package/dist/context-policy-util.js.map +1 -1
  135. package/dist/conversation-context.d.ts +9 -4
  136. package/dist/conversation-context.d.ts.map +1 -1
  137. package/dist/conversation-context.js +65 -19
  138. package/dist/conversation-context.js.map +1 -1
  139. package/dist/conversation-transcript.d.ts +8 -5
  140. package/dist/conversation-transcript.d.ts.map +1 -1
  141. package/dist/conversation-transcript.js +24 -5
  142. package/dist/conversation-transcript.js.map +1 -1
  143. package/dist/conversation-turn-coalescing.d.ts +22 -0
  144. package/dist/conversation-turn-coalescing.d.ts.map +1 -0
  145. package/dist/conversation-turn-coalescing.js +121 -0
  146. package/dist/conversation-turn-coalescing.js.map +1 -0
  147. package/dist/conversation-turn-dispatch.d.ts +5 -2
  148. package/dist/conversation-turn-dispatch.d.ts.map +1 -1
  149. package/dist/conversation-turn-dispatch.js +59 -22
  150. package/dist/conversation-turn-dispatch.js.map +1 -1
  151. package/dist/default-outbound-route.d.ts +29 -0
  152. package/dist/default-outbound-route.d.ts.map +1 -0
  153. package/dist/default-outbound-route.js +105 -0
  154. package/dist/default-outbound-route.js.map +1 -0
  155. package/dist/delivery-artifacts.d.ts +2 -0
  156. package/dist/delivery-artifacts.d.ts.map +1 -0
  157. package/dist/delivery-artifacts.js +34 -0
  158. package/dist/delivery-artifacts.js.map +1 -0
  159. package/dist/delivery-files.d.ts +5 -0
  160. package/dist/delivery-files.d.ts.map +1 -0
  161. package/dist/delivery-files.js +33 -0
  162. package/dist/delivery-files.js.map +1 -0
  163. package/dist/delivery-queue.d.ts +21 -1
  164. package/dist/delivery-queue.d.ts.map +1 -1
  165. package/dist/delivery-queue.js +144 -1
  166. package/dist/delivery-queue.js.map +1 -1
  167. package/dist/delivery-send.d.ts +2 -2
  168. package/dist/delivery-send.d.ts.map +1 -1
  169. package/dist/delivery-send.js +256 -100
  170. package/dist/delivery-send.js.map +1 -1
  171. package/dist/durable-files.d.ts +37 -0
  172. package/dist/durable-files.d.ts.map +1 -0
  173. package/dist/durable-files.js +63 -0
  174. package/dist/durable-files.js.map +1 -0
  175. package/dist/harness-loop.d.ts +18 -9
  176. package/dist/harness-loop.d.ts.map +1 -1
  177. package/dist/harness-loop.js +245 -50
  178. package/dist/harness-loop.js.map +1 -1
  179. package/dist/heic-transcode-worker.d.ts +2 -0
  180. package/dist/heic-transcode-worker.d.ts.map +1 -0
  181. package/dist/heic-transcode-worker.js +59 -0
  182. package/dist/heic-transcode-worker.js.map +1 -0
  183. package/dist/heic-transcode.d.ts +18 -0
  184. package/dist/heic-transcode.d.ts.map +1 -0
  185. package/dist/heic-transcode.js +99 -0
  186. package/dist/heic-transcode.js.map +1 -0
  187. package/dist/human-input-routing.d.ts +22 -0
  188. package/dist/human-input-routing.d.ts.map +1 -0
  189. package/dist/human-input-routing.js +26 -0
  190. package/dist/human-input-routing.js.map +1 -0
  191. package/dist/in-memory-agent-state-store.d.ts +21 -0
  192. package/dist/in-memory-agent-state-store.d.ts.map +1 -0
  193. package/dist/in-memory-agent-state-store.js +97 -0
  194. package/dist/in-memory-agent-state-store.js.map +1 -0
  195. package/dist/in-memory-conversation-turn-store.d.ts +3 -1
  196. package/dist/in-memory-conversation-turn-store.d.ts.map +1 -1
  197. package/dist/in-memory-conversation-turn-store.js +41 -2
  198. package/dist/in-memory-conversation-turn-store.js.map +1 -1
  199. package/dist/in-memory-run-store.d.ts +8 -0
  200. package/dist/in-memory-run-store.d.ts.map +1 -1
  201. package/dist/in-memory-run-store.js +28 -5
  202. package/dist/in-memory-run-store.js.map +1 -1
  203. package/dist/in-memory-sandbox-session-store.d.ts +2 -1
  204. package/dist/in-memory-sandbox-session-store.d.ts.map +1 -1
  205. package/dist/in-memory-sandbox-session-store.js +65 -1
  206. package/dist/in-memory-sandbox-session-store.js.map +1 -1
  207. package/dist/in-memory-small-stores.d.ts +18 -1
  208. package/dist/in-memory-small-stores.d.ts.map +1 -1
  209. package/dist/in-memory-small-stores.js +107 -1
  210. package/dist/in-memory-small-stores.js.map +1 -1
  211. package/dist/in-memory-workspace-store.d.ts +40 -0
  212. package/dist/in-memory-workspace-store.d.ts.map +1 -0
  213. package/dist/in-memory-workspace-store.js +370 -0
  214. package/dist/in-memory-workspace-store.js.map +1 -0
  215. package/dist/index.d.ts +116 -45
  216. package/dist/index.d.ts.map +1 -1
  217. package/dist/index.js +637 -566
  218. package/dist/index.js.map +1 -1
  219. package/dist/json-util.d.ts +8 -0
  220. package/dist/json-util.d.ts.map +1 -1
  221. package/dist/json-util.js +8 -0
  222. package/dist/json-util.js.map +1 -1
  223. package/dist/learning-store.d.ts +111 -0
  224. package/dist/learning-store.d.ts.map +1 -0
  225. package/dist/learning-store.js +193 -0
  226. package/dist/learning-store.js.map +1 -0
  227. package/dist/local-sandbox.d.ts +3 -2
  228. package/dist/local-sandbox.d.ts.map +1 -1
  229. package/dist/local-sandbox.js +69 -25
  230. package/dist/local-sandbox.js.map +1 -1
  231. package/dist/mcp-client.d.ts.map +1 -1
  232. package/dist/mcp-client.js +3 -2
  233. package/dist/mcp-client.js.map +1 -1
  234. package/dist/media-processor.d.ts +42 -0
  235. package/dist/media-processor.d.ts.map +1 -0
  236. package/dist/media-processor.js +2 -0
  237. package/dist/media-processor.js.map +1 -0
  238. package/dist/model-media.d.ts +13 -1
  239. package/dist/model-media.d.ts.map +1 -1
  240. package/dist/model-media.js +81 -18
  241. package/dist/model-media.js.map +1 -1
  242. package/dist/model-visible-interrupts.d.ts +10 -0
  243. package/dist/model-visible-interrupts.d.ts.map +1 -0
  244. package/dist/model-visible-interrupts.js +41 -0
  245. package/dist/model-visible-interrupts.js.map +1 -0
  246. package/dist/operator-controls.d.ts.map +1 -1
  247. package/dist/operator-controls.js +16 -3
  248. package/dist/operator-controls.js.map +1 -1
  249. package/dist/outbound-http-policy.d.ts +7 -0
  250. package/dist/outbound-http-policy.d.ts.map +1 -0
  251. package/dist/outbound-http-policy.js +155 -0
  252. package/dist/outbound-http-policy.js.map +1 -0
  253. package/dist/principals.d.ts +18 -0
  254. package/dist/principals.d.ts.map +1 -0
  255. package/dist/principals.js +90 -0
  256. package/dist/principals.js.map +1 -0
  257. package/dist/public-api.d.ts +21 -0
  258. package/dist/public-api.d.ts.map +1 -0
  259. package/dist/public-api.js +19 -0
  260. package/dist/public-api.js.map +1 -0
  261. package/dist/replay-resume.d.ts +15 -3
  262. package/dist/replay-resume.d.ts.map +1 -1
  263. package/dist/replay-resume.js +256 -24
  264. package/dist/replay-resume.js.map +1 -1
  265. package/dist/resource-projection-util.d.ts +1 -1
  266. package/dist/resource-projection-util.d.ts.map +1 -1
  267. package/dist/resource-projection-util.js +21 -10
  268. package/dist/resource-projection-util.js.map +1 -1
  269. package/dist/resource-projection.d.ts +8 -1
  270. package/dist/resource-projection.d.ts.map +1 -1
  271. package/dist/resource-projection.js +230 -26
  272. package/dist/resource-projection.js.map +1 -1
  273. package/dist/run-heartbeat.d.ts +12 -2
  274. package/dist/run-heartbeat.d.ts.map +1 -1
  275. package/dist/run-heartbeat.js +31 -4
  276. package/dist/run-heartbeat.js.map +1 -1
  277. package/dist/run-outcome.d.ts +9 -5
  278. package/dist/run-outcome.d.ts.map +1 -1
  279. package/dist/run-outcome.js +16 -5
  280. package/dist/run-outcome.js.map +1 -1
  281. package/dist/run-recovery.d.ts +31 -2
  282. package/dist/run-recovery.d.ts.map +1 -1
  283. package/dist/run-recovery.js +211 -32
  284. package/dist/run-recovery.js.map +1 -1
  285. package/dist/run-replay.d.ts +35 -0
  286. package/dist/run-replay.d.ts.map +1 -0
  287. package/dist/run-replay.js +193 -0
  288. package/dist/run-replay.js.map +1 -0
  289. package/dist/run-result.d.ts +4 -0
  290. package/dist/run-result.d.ts.map +1 -0
  291. package/dist/run-result.js +18 -0
  292. package/dist/run-result.js.map +1 -0
  293. package/dist/run-timeline-query.d.ts +38 -0
  294. package/dist/run-timeline-query.d.ts.map +1 -0
  295. package/dist/run-timeline-query.js +99 -0
  296. package/dist/run-timeline-query.js.map +1 -0
  297. package/dist/runs-query.d.ts.map +1 -1
  298. package/dist/runs-query.js +12 -4
  299. package/dist/runs-query.js.map +1 -1
  300. package/dist/runtime-bundle.d.ts.map +1 -1
  301. package/dist/runtime-bundle.js +2 -0
  302. package/dist/runtime-bundle.js.map +1 -1
  303. package/dist/runtime-learning.d.ts +88 -0
  304. package/dist/runtime-learning.d.ts.map +1 -0
  305. package/dist/runtime-learning.js +260 -0
  306. package/dist/runtime-learning.js.map +1 -0
  307. package/dist/runtime-types.d.ts +79 -10
  308. package/dist/runtime-types.d.ts.map +1 -1
  309. package/dist/sandbox-fs.d.ts +9 -5
  310. package/dist/sandbox-fs.d.ts.map +1 -1
  311. package/dist/sandbox-fs.js +50 -33
  312. package/dist/sandbox-fs.js.map +1 -1
  313. package/dist/sandbox-handle.d.ts +25 -0
  314. package/dist/sandbox-handle.d.ts.map +1 -0
  315. package/dist/sandbox-handle.js +120 -0
  316. package/dist/sandbox-handle.js.map +1 -0
  317. package/dist/sandbox-session-identity.d.ts +14 -0
  318. package/dist/sandbox-session-identity.d.ts.map +1 -0
  319. package/dist/sandbox-session-identity.js +33 -0
  320. package/dist/sandbox-session-identity.js.map +1 -0
  321. package/dist/sandbox-session-key.d.ts.map +1 -1
  322. package/dist/sandbox-session-key.js +14 -10
  323. package/dist/sandbox-session-key.js.map +1 -1
  324. package/dist/sandbox-session-lifecycle.d.ts +12 -0
  325. package/dist/sandbox-session-lifecycle.d.ts.map +1 -0
  326. package/dist/sandbox-session-lifecycle.js +261 -0
  327. package/dist/sandbox-session-lifecycle.js.map +1 -0
  328. package/dist/sandbox-snapshot-policy.js +3 -3
  329. package/dist/sandbox-snapshot-policy.js.map +1 -1
  330. package/dist/sandbox-state-sync.d.ts +22 -0
  331. package/dist/sandbox-state-sync.d.ts.map +1 -0
  332. package/dist/sandbox-state-sync.js +147 -0
  333. package/dist/sandbox-state-sync.js.map +1 -0
  334. package/dist/sandbox-sync-worker.d.ts +11 -2
  335. package/dist/sandbox-sync-worker.d.ts.map +1 -1
  336. package/dist/sandbox-sync-worker.js +143 -31
  337. package/dist/sandbox-sync-worker.js.map +1 -1
  338. package/dist/schedule-execution.d.ts.map +1 -1
  339. package/dist/schedule-execution.js +187 -57
  340. package/dist/schedule-execution.js.map +1 -1
  341. package/dist/sdk-api-client.d.ts +17 -0
  342. package/dist/sdk-api-client.d.ts.map +1 -0
  343. package/dist/sdk-api-client.js +55 -0
  344. package/dist/sdk-api-client.js.map +1 -0
  345. package/dist/security.js +2 -2
  346. package/dist/security.js.map +1 -1
  347. package/dist/self-improvement.d.ts +34 -6
  348. package/dist/self-improvement.d.ts.map +1 -1
  349. package/dist/self-improvement.js +140 -34
  350. package/dist/self-improvement.js.map +1 -1
  351. package/dist/skill-bundles.d.ts +55 -0
  352. package/dist/skill-bundles.d.ts.map +1 -0
  353. package/dist/skill-bundles.js +134 -0
  354. package/dist/skill-bundles.js.map +1 -0
  355. package/dist/source-loader.d.ts +8 -0
  356. package/dist/source-loader.d.ts.map +1 -1
  357. package/dist/source-loader.js +41 -10
  358. package/dist/source-loader.js.map +1 -1
  359. package/dist/state-store-helpers.d.ts +2 -0
  360. package/dist/state-store-helpers.d.ts.map +1 -1
  361. package/dist/state-store-helpers.js +11 -1
  362. package/dist/state-store-helpers.js.map +1 -1
  363. package/dist/state-stores.d.ts +2 -0
  364. package/dist/state-stores.d.ts.map +1 -1
  365. package/dist/state-stores.js +40 -7
  366. package/dist/state-stores.js.map +1 -1
  367. package/dist/state.d.ts +344 -5
  368. package/dist/state.d.ts.map +1 -1
  369. package/dist/state.js +44 -2
  370. package/dist/state.js.map +1 -1
  371. package/dist/storage.d.ts +59 -2
  372. package/dist/storage.d.ts.map +1 -1
  373. package/dist/storage.js +183 -6
  374. package/dist/storage.js.map +1 -1
  375. package/dist/subagent-execution.d.ts +7 -6
  376. package/dist/subagent-execution.d.ts.map +1 -1
  377. package/dist/subagent-execution.js +58 -19
  378. package/dist/subagent-execution.js.map +1 -1
  379. package/dist/target-instructions.d.ts +14 -0
  380. package/dist/target-instructions.d.ts.map +1 -0
  381. package/dist/target-instructions.js +18 -0
  382. package/dist/target-instructions.js.map +1 -0
  383. package/dist/tool-apis.d.ts.map +1 -1
  384. package/dist/tool-apis.js +55 -10
  385. package/dist/tool-apis.js.map +1 -1
  386. package/dist/tool-execution.d.ts +26 -13
  387. package/dist/tool-execution.d.ts.map +1 -1
  388. package/dist/tool-execution.js +368 -239
  389. package/dist/tool-execution.js.map +1 -1
  390. package/dist/turn-media.d.ts +29 -0
  391. package/dist/turn-media.d.ts.map +1 -0
  392. package/dist/turn-media.js +233 -0
  393. package/dist/turn-media.js.map +1 -0
  394. package/dist/usage-reconciliation.d.ts +1 -1
  395. package/dist/usage-reconciliation.js +1 -1
  396. package/dist/workspace-id.d.ts +10 -0
  397. package/dist/workspace-id.d.ts.map +1 -0
  398. package/dist/workspace-id.js +55 -0
  399. package/dist/workspace-id.js.map +1 -0
  400. package/dist/workspace-manifest.d.ts +24 -0
  401. package/dist/workspace-manifest.d.ts.map +1 -0
  402. package/dist/workspace-manifest.js +111 -0
  403. package/dist/workspace-manifest.js.map +1 -0
  404. package/dist/workspace-operation-limiter.d.ts +16 -0
  405. package/dist/workspace-operation-limiter.d.ts.map +1 -0
  406. package/dist/workspace-operation-limiter.js +31 -0
  407. package/dist/workspace-operation-limiter.js.map +1 -0
  408. package/dist/workspace-operations.d.ts +145 -0
  409. package/dist/workspace-operations.d.ts.map +1 -0
  410. package/dist/workspace-operations.js +420 -0
  411. package/dist/workspace-operations.js.map +1 -0
  412. package/dist/workspace-runtime.d.ts +110 -0
  413. package/dist/workspace-runtime.d.ts.map +1 -0
  414. package/dist/workspace-runtime.js +240 -0
  415. package/dist/workspace-runtime.js.map +1 -0
  416. package/dist/workspace-search.d.ts +55 -0
  417. package/dist/workspace-search.d.ts.map +1 -0
  418. package/dist/workspace-search.js +262 -0
  419. package/dist/workspace-search.js.map +1 -0
  420. package/dist/workspace-service.d.ts +173 -0
  421. package/dist/workspace-service.d.ts.map +1 -0
  422. package/dist/workspace-service.js +619 -0
  423. package/dist/workspace-service.js.map +1 -0
  424. package/dist/workspace.d.ts +7 -0
  425. package/dist/workspace.d.ts.map +1 -0
  426. package/dist/workspace.js +7 -0
  427. package/dist/workspace.js.map +1 -0
  428. package/package.json +7 -4
  429. package/dist/agent-harness.d.ts +0 -108
  430. package/dist/agent-harness.d.ts.map +0 -1
  431. package/dist/agent-harness.js +0 -2
  432. package/dist/agent-harness.js.map +0 -1
  433. package/dist/attachments-legacy.d.ts +0 -17
  434. package/dist/attachments-legacy.d.ts.map +0 -1
  435. package/dist/attachments-legacy.js +0 -273
  436. package/dist/attachments-legacy.js.map +0 -1
  437. package/dist/code-mode.d.ts +0 -20
  438. package/dist/code-mode.d.ts.map +0 -1
  439. package/dist/code-mode.js +0 -658
  440. package/dist/code-mode.js.map +0 -1
  441. package/dist/hook-dispatch.d.ts +0 -19
  442. package/dist/hook-dispatch.d.ts.map +0 -1
  443. package/dist/hook-dispatch.js +0 -37
  444. package/dist/hook-dispatch.js.map +0 -1
  445. package/dist/pi-agent-harness.d.ts +0 -40
  446. package/dist/pi-agent-harness.d.ts.map +0 -1
  447. package/dist/pi-agent-harness.js +0 -222
  448. package/dist/pi-agent-harness.js.map +0 -1
  449. package/dist/pi-harness.d.ts +0 -42
  450. package/dist/pi-harness.d.ts.map +0 -1
  451. package/dist/pi-harness.js +0 -142
  452. package/dist/pi-harness.js.map +0 -1
  453. package/dist/run-resolver.d.ts +0 -35
  454. package/dist/run-resolver.d.ts.map +0 -1
  455. package/dist/run-resolver.js +0 -84
  456. package/dist/run-resolver.js.map +0 -1
  457. package/dist/usage-budget.d.ts +0 -29
  458. package/dist/usage-budget.d.ts.map +0 -1
  459. package/dist/usage-budget.js +0 -145
  460. package/dist/usage-budget.js.map +0 -1
@@ -1,4 +1,9 @@
1
- import { approvalNever, normalizeSandboxPath as normalizeCoreSandboxPath } from "@assemblyline-agents/core";
1
+ import { createHash } from "node:crypto";
2
+ import { approvalNever, approvalRequired, normalizeSandboxPath as normalizeCoreSandboxPath } from "@assemblyline-agents/core";
3
+ import { DEFAULT_DELIVERY_FILE_MAX_BYTES, deliveryFileContentType } from "./delivery-queue.js";
4
+ import { internalDeliveryArtifactReason } from "./delivery-artifacts.js";
5
+ import { boundedPositiveIntEnv } from "./env-config.js";
6
+ import { workspaceContentBlobKey } from "./workspace-service.js";
2
7
  export const READ_TOOL_NAME = "read";
3
8
  export const WRITE_TOOL_NAME = "write";
4
9
  export const EDIT_TOOL_NAME = "edit";
@@ -6,12 +11,19 @@ export const DELETE_TOOL_NAME = "delete";
6
11
  export const LIST_TOOL_NAME = "list";
7
12
  export const GREP_TOOL_NAME = "grep";
8
13
  export const BASH_TOOL_NAME = "bash";
9
- export const ASK_QUESTION_TOOL_NAME = "ask_question";
10
- export const SPAWN_SUBAGENT_TOOL_NAME = "spawn_subagent";
14
+ export const DELIVER_ARTIFACT_TOOL_NAME = "deliver_artifact";
11
15
  export const LOAD_SKILL_TOOL_NAME = "load_skill";
12
16
  export const TOOL_SEARCH_TOOL_NAME = "tool_search";
13
- export const TOOL_DESCRIBE_TOOL_NAME = "tool_describe";
14
- export const TOOL_CALL_TOOL_NAME = "tool_call";
17
+ export const PAIR_TOOL_NAME = "pair";
18
+ export const HISTORY_SEARCH_TOOL_NAME = "history_search";
19
+ export const FILES_SEARCH_TOOL_NAME = "files_search";
20
+ export const FILES_MOUNT_TOOL_NAME = "files_mount";
21
+ export const WORKSPACE_SEARCH_TOOL_NAME = "workspace_search";
22
+ export const WORKSPACE_STATUS_TOOL_NAME = "workspace_status";
23
+ export const WORKSPACE_CHECKPOINT_CREATE_TOOL_NAME = "workspace_checkpoint_create";
24
+ export const WORKSPACE_CHECKPOINT_LIST_TOOL_NAME = "workspace_checkpoint_list";
25
+ export const WORKSPACE_CHECKPOINT_RESTORE_TOOL_NAME = "workspace_checkpoint_restore";
26
+ export const WORKSPACE_FORK_TOOL_NAME = "workspace_fork";
15
27
  export const CORE_HARNESS_TOOL_NAMES = [
16
28
  READ_TOOL_NAME,
17
29
  WRITE_TOOL_NAME,
@@ -20,12 +32,19 @@ export const CORE_HARNESS_TOOL_NAMES = [
20
32
  LIST_TOOL_NAME,
21
33
  GREP_TOOL_NAME,
22
34
  BASH_TOOL_NAME,
23
- ASK_QUESTION_TOOL_NAME,
24
- SPAWN_SUBAGENT_TOOL_NAME,
35
+ DELIVER_ARTIFACT_TOOL_NAME,
25
36
  LOAD_SKILL_TOOL_NAME,
26
37
  TOOL_SEARCH_TOOL_NAME,
27
- TOOL_DESCRIBE_TOOL_NAME,
28
- TOOL_CALL_TOOL_NAME
38
+ PAIR_TOOL_NAME,
39
+ HISTORY_SEARCH_TOOL_NAME,
40
+ FILES_SEARCH_TOOL_NAME,
41
+ FILES_MOUNT_TOOL_NAME,
42
+ WORKSPACE_SEARCH_TOOL_NAME,
43
+ WORKSPACE_STATUS_TOOL_NAME,
44
+ WORKSPACE_CHECKPOINT_CREATE_TOOL_NAME,
45
+ WORKSPACE_CHECKPOINT_LIST_TOOL_NAME,
46
+ WORKSPACE_CHECKPOINT_RESTORE_TOOL_NAME,
47
+ WORKSPACE_FORK_TOOL_NAME
29
48
  ];
30
49
  const CORE_HARNESS_TOOL_NAME_SET = new Set(CORE_HARNESS_TOOL_NAMES);
31
50
  const BUILTIN_SOURCE = {
@@ -38,7 +57,7 @@ const PATH_SCHEMA = {
38
57
  };
39
58
  const READ_COMPILED_TOOL = {
40
59
  name: READ_TOOL_NAME,
41
- description: "Read a file from the sandbox filesystem. Lazily hydrates logical OpenEve paths before reading.",
60
+ description: "Read a file from the sandbox filesystem. Lazily hydrates logical Assembly Line paths before reading.",
42
61
  inputSchema: {
43
62
  type: "object",
44
63
  additionalProperties: false,
@@ -82,7 +101,7 @@ const WRITE_COMPILED_TOOL = {
82
101
  };
83
102
  const EDIT_COMPILED_TOOL = {
84
103
  name: EDIT_TOOL_NAME,
85
- description: "Edit a sandbox file by replacing exact text. Hydrates the path first when it is a logical OpenEve resource.",
104
+ description: "Edit a sandbox file by replacing exact text. Hydrates the path first when it is a logical Assembly Line resource.",
86
105
  inputSchema: {
87
106
  type: "object",
88
107
  additionalProperties: false,
@@ -127,7 +146,7 @@ const DELETE_COMPILED_TOOL = {
127
146
  };
128
147
  const LIST_COMPILED_TOOL = {
129
148
  name: LIST_TOOL_NAME,
130
- description: "List files under a sandbox path. Lazily hydrates bounded logical OpenEve roots before listing.",
149
+ description: "List files under a sandbox path. Lazily hydrates bounded logical Assembly Line roots before listing.",
131
150
  inputSchema: {
132
151
  type: "object",
133
152
  additionalProperties: false,
@@ -191,49 +210,26 @@ const BASH_COMPILED_TOOL = {
191
210
  hasToModelOutput: true,
192
211
  source: BUILTIN_SOURCE
193
212
  };
194
- const ASK_QUESTION_COMPILED_TOOL = {
195
- name: ASK_QUESTION_TOOL_NAME,
196
- description: "Ask the user a concise clarifying question and pause the run until the answer is available.",
213
+ const DELIVER_ARTIFACT_COMPILED_TOOL = {
214
+ name: DELIVER_ARTIFACT_TOOL_NAME,
215
+ description: "Required for file delivery: select one completed /workspace file for exact attachment to the user. Call once for each file the final answer should attach; a link in the final answer does not attach a file.",
197
216
  inputSchema: {
198
217
  type: "object",
199
218
  additionalProperties: false,
200
219
  properties: {
201
- question: { type: "string" },
202
- choices: { type: "array", items: { type: "string" } },
203
- allowFreeform: { type: "boolean" },
204
- metadata: { type: "object", additionalProperties: true }
220
+ path: {
221
+ type: "string",
222
+ description: "Exact non-reserved /workspace file path to deliver, such as /workspace/Investment_Memo.xlsx."
223
+ }
205
224
  },
206
- required: ["question"]
207
- },
208
- needsApproval: approvalNever(),
209
- defaultEnabled: true,
210
- visibility: "always",
211
- execution: "direct",
212
- tags: ["human", "question"],
213
- aliases: ["clarify"],
214
- hasToModelOutput: true,
215
- source: BUILTIN_SOURCE
216
- };
217
- const SPAWN_SUBAGENT_COMPILED_TOOL = {
218
- name: SPAWN_SUBAGENT_TOOL_NAME,
219
- description: "Spawn a configured subagent by name for delegated work.",
220
- inputSchema: {
221
- type: "object",
222
- additionalProperties: true,
223
- properties: {
224
- name: { type: "string", description: "Subagent name." },
225
- task: { type: "string" },
226
- expectedOutput: { type: "string" },
227
- constraints: { type: "array", items: { type: "string" } }
228
- },
229
- required: ["name", "task"]
225
+ required: ["path"]
230
226
  },
231
227
  needsApproval: approvalNever(),
232
228
  defaultEnabled: true,
233
229
  visibility: "always",
234
230
  execution: "direct",
235
- tags: ["subagent", "delegate"],
236
- aliases: ["delegate", "agent"],
231
+ tags: ["artifact", "delivery", "workspace", "file"],
232
+ aliases: ["send_file", "attach_file"],
237
233
  hasToModelOutput: true,
238
234
  source: BUILTIN_SOURCE
239
235
  };
@@ -259,7 +255,7 @@ const LOAD_SKILL_COMPILED_TOOL = {
259
255
  };
260
256
  const TOOL_SEARCH_COMPILED_TOOL = {
261
257
  name: TOOL_SEARCH_TOOL_NAME,
262
- description: "Search deferred non-core tools by name, description, tags, aliases, or connection. Returns compact metadata only.",
258
+ description: "Find and activate deferred framework, authored, and connection tools. Matching tools become directly callable.",
263
259
  inputSchema: {
264
260
  type: "object",
265
261
  additionalProperties: false,
@@ -280,45 +276,209 @@ const TOOL_SEARCH_COMPILED_TOOL = {
280
276
  hasToModelOutput: true,
281
277
  source: BUILTIN_SOURCE
282
278
  };
283
- const TOOL_DESCRIBE_COMPILED_TOOL = {
284
- name: TOOL_DESCRIBE_TOOL_NAME,
285
- description: "Return the full schema for one deferred tool previously found with tool_search.",
279
+ // The universal connection-pairing entry point. Deliberately a default-enabled
280
+ // core tool rather than a discovered connection tool: a pasted binding packet
281
+ // is often the FIRST interaction with a connection, so its landing spot must
282
+ // not depend on the discovery chain (tool_search → connection metadata) that
283
+ // breaks precisely when a connection is misconfigured. It remains visible even
284
+ // when no connection is configured so the model can explain that state.
285
+ const PAIR_COMPILED_TOOL = {
286
+ name: PAIR_TOOL_NAME,
287
+ description: "Pair a connection by redeeming a one-time pairing packet or claim code. When the user pastes binding or pairing instructions for a connection, call this with the FULL pasted text as `secret`; the host exchanges the code and stores the credential durably. Only call this for a supplied packet; the tool's presence does not mean an existing grant is missing. Omit `connection` when only one connection supports pairing.",
286
288
  inputSchema: {
287
289
  type: "object",
288
290
  additionalProperties: false,
289
291
  properties: {
290
- name: { type: "string" }
292
+ connection: {
293
+ type: "string",
294
+ description: "Connection name to pair. Optional when exactly one live connection supports pairing."
295
+ },
296
+ secret: {
297
+ type: "string",
298
+ description: "The full pasted pairing packet, binding instructions, or one-time claim code."
299
+ }
291
300
  },
292
- required: ["name"]
301
+ required: ["secret"]
293
302
  },
294
303
  needsApproval: approvalNever(),
295
304
  defaultEnabled: true,
296
305
  visibility: "always",
297
306
  execution: "direct",
298
- tags: ["tools", "deferred", "describe"],
299
- aliases: ["schema"],
307
+ tags: ["connections", "pairing", "credentials"],
308
+ aliases: ["bind", "pair_connection"],
300
309
  hasToModelOutput: true,
301
310
  source: BUILTIN_SOURCE
302
311
  };
303
- const TOOL_CALL_COMPILED_TOOL = {
304
- name: TOOL_CALL_TOOL_NAME,
305
- description: "Call a deferred non-core tool by name with JSON arguments. The underlying tool is logged and policy-checked directly.",
312
+ const HISTORY_SEARCH_COMPILED_TOOL = {
313
+ name: HISTORY_SEARCH_TOOL_NAME,
314
+ description: "Search attributed conversation and channel history without loading the full history into the prompt. Access scope is enforced by the runtime.",
306
315
  inputSchema: {
307
316
  type: "object",
308
317
  additionalProperties: false,
309
318
  properties: {
310
- name: { type: "string" },
311
- arguments: { type: "object", additionalProperties: true },
312
- input: { type: "object", additionalProperties: true }
319
+ query: { type: "string", description: "Words or concepts to find." },
320
+ scope: {
321
+ type: "string",
322
+ enum: ["current_conversation", "current_channel", "my_conversations"],
323
+ description: "History boundary. Defaults to the current conversation."
324
+ },
325
+ limit: { type: "number", description: "Maximum results. Defaults to 8 and is capped at 50." }
313
326
  },
314
- required: ["name"]
327
+ required: ["query"]
328
+ },
329
+ needsApproval: approvalNever(),
330
+ defaultEnabled: false,
331
+ visibility: "deferred",
332
+ execution: "direct",
333
+ tags: ["history", "search", "conversations", "channels"],
334
+ aliases: ["conversation_search", "search_history"],
335
+ hasToModelOutput: true,
336
+ source: BUILTIN_SOURCE
337
+ };
338
+ const FILES_SEARCH_COMPILED_TOOL = {
339
+ name: FILES_SEARCH_TOOL_NAME,
340
+ description: "Find files previously shared or created in the current durable workspace. Omit query to list the most recent files.",
341
+ inputSchema: {
342
+ type: "object",
343
+ additionalProperties: false,
344
+ properties: {
345
+ query: { type: "string", description: "Optional filename, path, or file id fragment." },
346
+ limit: { type: "number", description: "Maximum results. Defaults to 50 and is capped at 200." }
347
+ }
348
+ },
349
+ needsApproval: approvalNever(),
350
+ defaultEnabled: true,
351
+ visibility: "always",
352
+ execution: "direct",
353
+ tags: ["files", "search", "workspace", "durability"],
354
+ aliases: ["files_list", "attachments_search"],
355
+ hasToModelOutput: true,
356
+ source: BUILTIN_SOURCE
357
+ };
358
+ const FILES_MOUNT_COMPILED_TOOL = {
359
+ name: FILES_MOUNT_TOOL_NAME,
360
+ description: "Mount one durable workspace file into the current sandbox at the returned read-only /files/library path.",
361
+ inputSchema: {
362
+ type: "object",
363
+ additionalProperties: false,
364
+ properties: {
365
+ fileId: { type: "string", description: "Exact file id returned by files_search." }
366
+ },
367
+ required: ["fileId"]
315
368
  },
316
369
  needsApproval: approvalNever(),
317
370
  defaultEnabled: true,
318
371
  visibility: "always",
372
+ execution: "sandbox",
373
+ tags: ["files", "sandbox", "workspace", "durability"],
374
+ aliases: ["mount_file", "attachment_mount"],
375
+ hasToModelOutput: true,
376
+ source: BUILTIN_SOURCE
377
+ };
378
+ const WORKSPACE_STATUS_COMPILED_TOOL = {
379
+ name: WORKSPACE_STATUS_TOOL_NAME,
380
+ description: "Show the current durable workspace head, size, version count, and named checkpoints.",
381
+ inputSchema: { type: "object", additionalProperties: false, properties: {} },
382
+ needsApproval: approvalNever(),
383
+ defaultEnabled: false,
384
+ visibility: "deferred",
319
385
  execution: "direct",
320
- tags: ["tools", "deferred", "call"],
321
- aliases: ["invoke"],
386
+ tags: ["workspace", "versions", "status"],
387
+ aliases: ["workspace_info"],
388
+ hasToModelOutput: true,
389
+ source: BUILTIN_SOURCE
390
+ };
391
+ const WORKSPACE_SEARCH_COMPILED_TOOL = {
392
+ name: WORKSPACE_SEARCH_TOOL_NAME,
393
+ description: "Search a committed durable workspace without hydrating it. Results identify the exact version and ranking source.",
394
+ inputSchema: {
395
+ type: "object",
396
+ additionalProperties: false,
397
+ properties: {
398
+ query: { type: "string", description: "Words or concepts to find." },
399
+ versionId: { type: "string", description: "Optional committed version. Defaults to the current head." },
400
+ limit: { type: "number", description: "Maximum results. Defaults to 8 and is capped at 100." }
401
+ },
402
+ required: ["query"]
403
+ },
404
+ needsApproval: approvalNever(),
405
+ defaultEnabled: false,
406
+ visibility: "deferred",
407
+ execution: "direct",
408
+ tags: ["workspace", "search", "versions"],
409
+ aliases: ["search_workspace"],
410
+ hasToModelOutput: true,
411
+ source: BUILTIN_SOURCE
412
+ };
413
+ const WORKSPACE_CHECKPOINT_CREATE_COMPILED_TOOL = {
414
+ name: WORKSPACE_CHECKPOINT_CREATE_TOOL_NAME,
415
+ description: "Name the current committed workspace version without copying its files.",
416
+ inputSchema: {
417
+ type: "object",
418
+ additionalProperties: false,
419
+ properties: {
420
+ name: { type: "string", description: "Workspace-local checkpoint name." },
421
+ replace: { type: "boolean", description: "Replace an existing name. Defaults to false." }
422
+ },
423
+ required: ["name"]
424
+ },
425
+ needsApproval: approvalNever(),
426
+ defaultEnabled: false,
427
+ visibility: "deferred",
428
+ execution: "direct",
429
+ tags: ["workspace", "checkpoint", "versions"],
430
+ aliases: ["workspace_savepoint"],
431
+ hasToModelOutput: true,
432
+ source: BUILTIN_SOURCE
433
+ };
434
+ const WORKSPACE_CHECKPOINT_LIST_COMPILED_TOOL = {
435
+ name: WORKSPACE_CHECKPOINT_LIST_TOOL_NAME,
436
+ description: "List named checkpoints for the current durable workspace.",
437
+ inputSchema: { type: "object", additionalProperties: false, properties: {} },
438
+ needsApproval: approvalNever(),
439
+ defaultEnabled: false,
440
+ visibility: "deferred",
441
+ execution: "direct",
442
+ tags: ["workspace", "checkpoint", "list"],
443
+ aliases: ["workspace_savepoints"],
444
+ hasToModelOutput: true,
445
+ source: BUILTIN_SOURCE
446
+ };
447
+ const WORKSPACE_CHECKPOINT_RESTORE_COMPILED_TOOL = {
448
+ name: WORKSPACE_CHECKPOINT_RESTORE_TOOL_NAME,
449
+ description: "Restore a named checkpoint as a new workspace head while preserving all later versions.",
450
+ inputSchema: {
451
+ type: "object",
452
+ additionalProperties: false,
453
+ properties: { name: { type: "string", description: "Checkpoint name to restore." } },
454
+ required: ["name"]
455
+ },
456
+ needsApproval: approvalRequired("Restoring replaces the current workspace tree with a prior committed version."),
457
+ defaultEnabled: false,
458
+ visibility: "deferred",
459
+ execution: "direct",
460
+ tags: ["workspace", "checkpoint", "restore"],
461
+ aliases: ["workspace_rollback"],
462
+ hasToModelOutput: true,
463
+ source: BUILTIN_SOURCE
464
+ };
465
+ const WORKSPACE_FORK_COMPILED_TOOL = {
466
+ name: WORKSPACE_FORK_TOOL_NAME,
467
+ description: "Create an independent copy-on-write workspace from the current head or a named checkpoint.",
468
+ inputSchema: {
469
+ type: "object",
470
+ additionalProperties: false,
471
+ properties: {
472
+ name: { type: "string", description: "Optional display name for the new workspace." },
473
+ checkpoint: { type: "string", description: "Optional checkpoint to fork instead of the current head." }
474
+ }
475
+ },
476
+ needsApproval: approvalNever(),
477
+ defaultEnabled: false,
478
+ visibility: "deferred",
479
+ execution: "direct",
480
+ tags: ["workspace", "fork", "branch"],
481
+ aliases: ["workspace_branch"],
322
482
  hasToModelOutput: true,
323
483
  source: BUILTIN_SOURCE
324
484
  };
@@ -330,17 +490,24 @@ const BUILT_IN_COMPILED_TOOLS = [
330
490
  LIST_COMPILED_TOOL,
331
491
  GREP_COMPILED_TOOL,
332
492
  BASH_COMPILED_TOOL,
333
- ASK_QUESTION_COMPILED_TOOL,
334
- SPAWN_SUBAGENT_COMPILED_TOOL,
493
+ DELIVER_ARTIFACT_COMPILED_TOOL,
335
494
  LOAD_SKILL_COMPILED_TOOL,
336
495
  TOOL_SEARCH_COMPILED_TOOL,
337
- TOOL_DESCRIBE_COMPILED_TOOL,
338
- TOOL_CALL_COMPILED_TOOL
496
+ PAIR_COMPILED_TOOL,
497
+ HISTORY_SEARCH_COMPILED_TOOL,
498
+ FILES_SEARCH_COMPILED_TOOL,
499
+ FILES_MOUNT_COMPILED_TOOL,
500
+ WORKSPACE_SEARCH_COMPILED_TOOL,
501
+ WORKSPACE_STATUS_COMPILED_TOOL,
502
+ WORKSPACE_CHECKPOINT_CREATE_COMPILED_TOOL,
503
+ WORKSPACE_CHECKPOINT_LIST_COMPILED_TOOL,
504
+ WORKSPACE_CHECKPOINT_RESTORE_COMPILED_TOOL,
505
+ WORKSPACE_FORK_COMPILED_TOOL
339
506
  ];
340
- export function runtimeToolsForManifest(manifest) {
341
- const builtInNamed = new Map(manifest.tools.filter((tool) => CORE_HARNESS_TOOL_NAME_SET.has(tool.name)).map((tool) => [tool.name, tool]));
507
+ export function runtimeToolsForSurface(authoredTools) {
508
+ const builtInNamed = new Map(authoredTools.filter((tool) => CORE_HARNESS_TOOL_NAME_SET.has(tool.name)).map((tool) => [tool.name, tool]));
342
509
  return [
343
- ...manifest.tools.filter((tool) => !CORE_HARNESS_TOOL_NAME_SET.has(tool.name) && !tool.disabled),
510
+ ...authoredTools.filter((tool) => !CORE_HARNESS_TOOL_NAME_SET.has(tool.name) && !tool.disabled),
344
511
  ...BUILT_IN_COMPILED_TOOLS.flatMap((builtin) => {
345
512
  const authored = builtInNamed.get(builtin.name);
346
513
  if (!authored)
@@ -368,18 +535,32 @@ export function builtInToolDefinition(name) {
368
535
  return grepToolDefinition;
369
536
  if (name === BASH_TOOL_NAME)
370
537
  return bashToolDefinition;
371
- if (name === ASK_QUESTION_TOOL_NAME)
372
- return askQuestionToolDefinition;
373
- if (name === SPAWN_SUBAGENT_TOOL_NAME)
374
- return spawnSubagentToolDefinition;
538
+ if (name === DELIVER_ARTIFACT_TOOL_NAME)
539
+ return deliverArtifactToolDefinition;
375
540
  if (name === LOAD_SKILL_TOOL_NAME)
376
541
  return runtimeHandledToolDefinition(LOAD_SKILL_COMPILED_TOOL);
377
542
  if (name === TOOL_SEARCH_TOOL_NAME)
378
543
  return runtimeHandledToolDefinition(TOOL_SEARCH_COMPILED_TOOL);
379
- if (name === TOOL_DESCRIBE_TOOL_NAME)
380
- return runtimeHandledToolDefinition(TOOL_DESCRIBE_COMPILED_TOOL);
381
- if (name === TOOL_CALL_TOOL_NAME)
382
- return runtimeHandledToolDefinition(TOOL_CALL_COMPILED_TOOL);
544
+ if (name === PAIR_TOOL_NAME)
545
+ return runtimeHandledToolDefinition(PAIR_COMPILED_TOOL);
546
+ if (name === HISTORY_SEARCH_TOOL_NAME)
547
+ return runtimeHandledToolDefinition(HISTORY_SEARCH_COMPILED_TOOL);
548
+ if (name === FILES_SEARCH_TOOL_NAME)
549
+ return runtimeHandledToolDefinition(FILES_SEARCH_COMPILED_TOOL);
550
+ if (name === FILES_MOUNT_TOOL_NAME)
551
+ return runtimeHandledToolDefinition(FILES_MOUNT_COMPILED_TOOL);
552
+ if (name === WORKSPACE_SEARCH_TOOL_NAME)
553
+ return runtimeHandledToolDefinition(WORKSPACE_SEARCH_COMPILED_TOOL);
554
+ if (name === WORKSPACE_STATUS_TOOL_NAME)
555
+ return runtimeHandledToolDefinition(WORKSPACE_STATUS_COMPILED_TOOL);
556
+ if (name === WORKSPACE_CHECKPOINT_CREATE_TOOL_NAME)
557
+ return runtimeHandledToolDefinition(WORKSPACE_CHECKPOINT_CREATE_COMPILED_TOOL);
558
+ if (name === WORKSPACE_CHECKPOINT_LIST_TOOL_NAME)
559
+ return runtimeHandledToolDefinition(WORKSPACE_CHECKPOINT_LIST_COMPILED_TOOL);
560
+ if (name === WORKSPACE_CHECKPOINT_RESTORE_TOOL_NAME)
561
+ return runtimeHandledToolDefinition(WORKSPACE_CHECKPOINT_RESTORE_COMPILED_TOOL);
562
+ if (name === WORKSPACE_FORK_TOOL_NAME)
563
+ return runtimeHandledToolDefinition(WORKSPACE_FORK_COMPILED_TOOL);
383
564
  return undefined;
384
565
  }
385
566
  export function isBuiltInToolName(name) {
@@ -513,40 +694,53 @@ const bashToolDefinition = {
513
694
  return sandbox.shell(command, options);
514
695
  }
515
696
  };
516
- const askQuestionToolDefinition = {
517
- ...toolDefinitionBase(ASK_QUESTION_COMPILED_TOOL),
697
+ const deliverArtifactToolDefinition = {
698
+ ...toolDefinitionBase(DELIVER_ARTIFACT_COMPILED_TOOL),
518
699
  async execute(input, ctx) {
519
700
  const raw = recordInput(input);
520
- const question = typeof raw.question === "string" ? raw.question.trim() : "";
521
- if (!question)
522
- throw new Error("ask_question requires a non-empty question.");
523
- const options = {};
524
- if (Array.isArray(raw.choices))
525
- options.choices = raw.choices.map(String).filter(Boolean);
526
- if (typeof raw.allowFreeform === "boolean")
527
- options.allowFreeform = raw.allowFreeform;
528
- if (raw.metadata && typeof raw.metadata === "object" && !Array.isArray(raw.metadata)) {
529
- options.metadata = raw.metadata;
701
+ const path = requiredPath(raw.path);
702
+ if (!path.startsWith("/workspace/") || path === "/workspace/") {
703
+ throw new Error("deliver_artifact requires an exact file path below /workspace.");
530
704
  }
531
- return ctx.askQuestion(question, options);
532
- }
533
- };
534
- const spawnSubagentToolDefinition = {
535
- ...toolDefinitionBase(SPAWN_SUBAGENT_COMPILED_TOOL),
536
- async execute(input, ctx) {
537
- if (!ctx.spawnSubagent)
538
- throw new Error("Subagent spawning is not available in this runtime.");
539
- const raw = recordInput(input);
540
- const name = typeof raw.name === "string" ? raw.name.trim() : "";
541
- const task = typeof raw.task === "string" ? raw.task.trim() : "";
542
- if (!name || !task)
543
- throw new Error("spawn_subagent requires name and task.");
544
- return ctx.spawnSubagent({
545
- name,
546
- task,
547
- ...(typeof raw.expectedOutput === "string" ? { expectedOutput: raw.expectedOutput } : {}),
548
- ...(Array.isArray(raw.constraints) ? { constraints: raw.constraints.map(String) } : {})
705
+ const relativePath = path.slice("/workspace/".length);
706
+ const topLevel = relativePath.split("/", 1)[0] ?? "";
707
+ if (["memory", "skills", "history", "files", ".agents", ".assembly-line"].includes(topLevel)) {
708
+ throw new Error(`deliver_artifact cannot deliver reserved workspace path ${path}.`);
709
+ }
710
+ if (internalDeliveryArtifactReason(relativePath)) {
711
+ throw new Error(`deliver_artifact cannot deliver internal or cache path ${path}.`);
712
+ }
713
+ await ctx.hydrateSandboxPath?.(path);
714
+ const sandbox = await ctx.getSandbox();
715
+ if (!sandbox.readFileBytes) {
716
+ throw new Error("deliver_artifact requires a sandbox adapter with byte-preserving exact file reads.");
717
+ }
718
+ const contents = await sandbox.readFileBytes(path);
719
+ const bytes = Buffer.from(contents);
720
+ const sizeBytes = bytes.byteLength;
721
+ const maxBytes = boundedPositiveIntEnv(ctx.channel?.env.ASSEMBLY_LINE_DELIVERY_FILE_MAX_BYTES, DEFAULT_DELIVERY_FILE_MAX_BYTES, 1, 1024 * 1024 * 1024);
722
+ if (sizeBytes > maxBytes) {
723
+ throw new Error(`Selected delivery artifact ${path} is ${sizeBytes} bytes, exceeding the configured limit of ${maxBytes}.`);
724
+ }
725
+ if (!ctx.blob)
726
+ throw new Error("deliver_artifact requires blob storage.");
727
+ const contentType = deliveryFileContentType(relativePath);
728
+ const sha256 = createHash("sha256").update(bytes).digest("hex");
729
+ const blob = await ctx.blob.put(workspaceContentBlobKey(sha256), bytes, { contentType, visibility: "private" });
730
+ await ctx.emit("artifact.delivery_selected", {
731
+ path,
732
+ relativePath,
733
+ sizeBytes: blob.size,
734
+ contentType,
735
+ sha256: blob.sha256,
736
+ blobKey: blob.key
549
737
  });
738
+ return {
739
+ path,
740
+ sizeBytes,
741
+ downloadUrl: `sandbox:${path}`,
742
+ selectedForDelivery: true
743
+ };
550
744
  }
551
745
  };
552
746
  function toolDefinitionBase(tool) {
@@ -554,7 +748,6 @@ function toolDefinitionBase(tool) {
554
748
  description: tool.description,
555
749
  inputSchema: tool.inputSchema,
556
750
  needsApproval: false,
557
- defaultEnabled: tool.defaultEnabled,
558
751
  capability: {
559
752
  visibility: tool.visibility,
560
753
  execution: tool.execution,
@@ -573,7 +766,7 @@ function runtimeHandledToolDefinition(tool) {
573
766
  return {
574
767
  ...toolDefinitionBase(tool),
575
768
  async execute() {
576
- throw new Error(`${tool.name} is handled by the OpenEve runtime dispatcher.`);
769
+ throw new Error(`${tool.name} is handled by the Assembly Line runtime dispatcher.`);
577
770
  }
578
771
  };
579
772
  }
@@ -605,8 +798,8 @@ function boundedNumber(value, fallback, min, max) {
605
798
  async function listSandboxEntries(sandbox, path, limit) {
606
799
  if (!sandbox.listFiles)
607
800
  throw new Error("This sandbox adapter does not support file listing.");
608
- const entries = await sandbox.listFiles(path);
609
- return entries.slice(0, limit).map((entry) => {
801
+ const entries = await sandbox.listFiles(path, { limit, includeContents: false });
802
+ return entries.map((entry) => {
610
803
  const out = { path: entry.path };
611
804
  if (entry.size !== undefined)
612
805
  out.size = entry.size;
@@ -616,7 +809,7 @@ async function listSandboxEntries(sandbox, path, limit) {
616
809
  async function grepSandbox(sandbox, path, pattern, literal, limit) {
617
810
  if (!sandbox.listFiles)
618
811
  throw new Error("This sandbox adapter does not support grep without file listing.");
619
- const entries = await sandbox.listFiles(path);
812
+ const entries = await sandbox.listFiles(path, { includeContents: true });
620
813
  const matches = [];
621
814
  const regexp = literal ? undefined : new RegExp(pattern, "u");
622
815
  for (const entry of entries) {
@@ -673,8 +866,8 @@ export function builtInToolContext(tool) {
673
866
  *
674
867
  * export default defineTool({ ...builtInToolDefaults.write, execute: guarded });
675
868
  *
676
- * The deferred bridge tools (load_skill, tool_search, tool_describe, tool_call)
677
- * are runtime-handled and have no wrappable executor, so they are not listed.
869
+ * The discovery tools (load_skill and tool_search) are runtime-handled and have
870
+ * no wrappable executor, so they are not listed.
678
871
  */
679
872
  export const builtInToolDefaults = Object.freeze({
680
873
  read: readToolDefinition,
@@ -684,7 +877,6 @@ export const builtInToolDefaults = Object.freeze({
684
877
  list: listToolDefinition,
685
878
  grep: grepToolDefinition,
686
879
  bash: bashToolDefinition,
687
- ask_question: askQuestionToolDefinition,
688
- spawn_subagent: spawnSubagentToolDefinition
880
+ deliver_artifact: deliverArtifactToolDefinition
689
881
  });
690
882
  //# sourceMappingURL=builtin-tools.js.map