eve 0.62.0 → 0.64.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 (593) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/dist/src/ai/evaluate.js +1 -1
  3. package/dist/src/channel/channel-address.d.ts +4 -1
  4. package/dist/src/channel/channel-address.js +1 -1
  5. package/dist/src/channel/channel-operations.d.ts +4 -1
  6. package/dist/src/channel/cross-channel-receive.d.ts +4 -1
  7. package/dist/src/channel/cross-channel-receive.js +1 -1
  8. package/dist/src/channel/session.d.ts +3 -1
  9. package/dist/src/channel/session.js +1 -1
  10. package/dist/src/channel/types.d.ts +7 -0
  11. package/dist/src/chunks/{use-eve-agent-C5-yqRuq.js → use-eve-agent-BdKlQF32.js} +8 -8
  12. package/dist/src/chunks/{use-eve-agent-CVWk5KKy.js → use-eve-agent-IIuxkn6y.js} +8 -8
  13. package/dist/src/cli/commands/build.js +1 -1
  14. package/dist/src/cli/commands/init-agent-workspace.d.ts +2 -0
  15. package/dist/src/cli/commands/init.js +1 -1
  16. package/dist/src/cli/dev/tui/line-editor.d.ts +11 -1
  17. package/dist/src/cli/dev/tui/line-editor.js +3 -3
  18. package/dist/src/cli/dev/tui/model-picker.d.ts +50 -0
  19. package/dist/src/cli/dev/tui/model-picker.js +1 -0
  20. package/dist/src/cli/dev/tui/prompt-commands.js +1 -1
  21. package/dist/src/cli/dev/tui/runner.js +2 -2
  22. package/dist/src/cli/dev/tui/setup-commands.d.ts +1 -1
  23. package/dist/src/cli/dev/tui/setup-commands.js +1 -1
  24. package/dist/src/cli/dev/tui/setup-flow.d.ts +2 -2
  25. package/dist/src/cli/dev/tui/setup-panel.d.ts +1 -26
  26. package/dist/src/cli/dev/tui/setup-panel.js +3 -3
  27. package/dist/src/cli/dev/tui/setup-selection-input.js +1 -1
  28. package/dist/src/cli/dev/tui/stream-format.d.ts +6 -7
  29. package/dist/src/cli/dev/tui/stream-format.js +2 -2
  30. package/dist/src/cli/dev/tui/subagent-pump.js +1 -1
  31. package/dist/src/cli/dev/tui/terminal-renderer.js +12 -12
  32. package/dist/src/cli/dev/tui/test/fake-setup-flow-renderer.js +1 -1
  33. package/dist/src/cli/dev/tui/test/mock-terminal.js +1 -1
  34. package/dist/src/cli/dev/tui/theme.d.ts +0 -8
  35. package/dist/src/cli/dev/tui/theme.js +1 -1
  36. package/dist/src/cli/run.js +1 -1
  37. package/dist/src/client/agent-info-schema.d.ts +8 -14
  38. package/dist/src/client/agent-info-schema.js +1 -1
  39. package/dist/src/client/eve-agent-store.js +1 -1
  40. package/dist/src/client/session.js +1 -1
  41. package/dist/src/client/types.d.ts +4 -2
  42. package/dist/src/compiled/.vendor-stamp.json +11 -11
  43. package/dist/src/compiled/@chat-adapter/slack/_chat-adapter-shared.d.ts +1 -0
  44. package/dist/src/compiled/@chat-adapter/slack/api.d.ts +3 -2
  45. package/dist/src/compiled/@chat-adapter/slack/api.js +1 -1
  46. package/dist/src/compiled/@chat-adapter/slack/blocks.js +1 -1
  47. package/dist/src/compiled/@chat-adapter/slack/format.js +1 -1
  48. package/dist/src/compiled/@chat-adapter/slack/index.d.ts +410 -63
  49. package/dist/src/compiled/@chat-adapter/slack/index.js +47 -25
  50. package/dist/src/compiled/@chat-adapter/twilio/api.d.ts +5 -1
  51. package/dist/src/compiled/@chat-adapter/twilio/api.js +1 -1
  52. package/dist/src/compiled/@chat-adapter/twilio/index.d.ts +37 -3
  53. package/dist/src/compiled/@chat-adapter/twilio/index.js +5 -1
  54. package/dist/src/compiled/@chat-adapter/twilio/webhook.d.ts +2 -2
  55. package/dist/src/compiled/@chat-adapter/twilio/webhook.js +1 -1
  56. package/dist/src/compiled/@linqapp/chat-sdk-adapter/index.js +6 -6
  57. package/dist/src/compiled/@photon-ai/chat-adapter-imessage/index.js +50 -50
  58. package/dist/src/compiled/@vercel/sandbox/index.js +4 -4
  59. package/dist/src/compiled/@workflow/core/attribute-changes.d.ts +2 -1
  60. package/dist/src/compiled/@workflow/core/events-consumer.d.ts +6 -3
  61. package/dist/src/compiled/@workflow/core/index.js +2 -2
  62. package/dist/src/compiled/@workflow/core/private.d.ts +37 -5
  63. package/dist/src/compiled/@workflow/core/private.js +1 -1
  64. package/dist/src/compiled/@workflow/core/runtime/deployment-guard.d.ts +2 -1
  65. package/dist/src/compiled/@workflow/core/runtime/helpers.js +1 -1
  66. package/dist/src/compiled/@workflow/core/runtime/invocations.d.ts +35 -0
  67. package/dist/src/compiled/@workflow/core/runtime/lifecycle-hooks.d.ts +90 -0
  68. package/dist/src/compiled/@workflow/core/runtime/quickjs-runtime.d.ts +2 -1
  69. package/dist/src/compiled/@workflow/core/runtime/resume-hook.d.ts +8 -6
  70. package/dist/src/compiled/@workflow/core/runtime/step-single-flight.d.ts +1 -1
  71. package/dist/src/compiled/@workflow/core/runtime.js +4 -4
  72. package/dist/src/compiled/@workflow/core/serialization.d.ts +5 -1
  73. package/dist/src/compiled/@workflow/core/serialization.js +1 -1
  74. package/dist/src/compiled/@workflow/core/version.d.ts +1 -1
  75. package/dist/src/compiled/@workflow/core/workflow/set-attributes.d.ts +4 -0
  76. package/dist/src/compiled/@workflow/core/workflow.js +1 -1
  77. package/dist/src/compiled/@workflow/world/analytics.d.ts +1 -1
  78. package/dist/src/compiled/@workflow/world/attributes-validation.d.ts +5 -0
  79. package/dist/src/compiled/@workflow/world/events.d.ts +2 -2
  80. package/dist/src/compiled/@workflow/world/index.d.ts +2 -1
  81. package/dist/src/compiled/@workflow/world/interfaces.d.ts +12 -1
  82. package/dist/src/compiled/@workflow/world/invocation.d.ts +19 -0
  83. package/dist/src/compiled/@workflow/world/queue.d.ts +24 -3
  84. package/dist/src/compiled/@workflow/world-local/index.js +3 -3
  85. package/dist/src/compiled/@workflow/world-vercel/index.js +16 -16
  86. package/dist/src/compiled/_chunks/node/chunk-6QHBXN7B-gl4n6nmi.js +12 -0
  87. package/dist/src/compiled/_chunks/node/chunk-7WDLOIRP-B_IWkVtZ.js +1 -0
  88. package/dist/src/compiled/_chunks/node/chunk-KBOOTKHF-DJqFk2r1.js +1 -0
  89. package/dist/src/compiled/_chunks/node/chunk-TREVQR3E-CLsTAn-O.js +1 -0
  90. package/dist/src/compiled/_chunks/node/dist-DYDVZ-FS.js +98 -0
  91. package/dist/src/compiled/_chunks/node/dist-iEFkK9qw.js +6 -0
  92. package/dist/src/compiled/_chunks/workflow/attribute-changes-DFx4eluc.js +6 -0
  93. package/dist/src/compiled/_chunks/workflow/{dist-D38gP7YF.js → dist-DjECvUyK.js} +1 -1
  94. package/dist/src/compiled/_chunks/workflow/{frames-QcJfYHmh.js → frames-D_Q-7A1N.js} +2 -2
  95. package/dist/src/compiled/_chunks/workflow/{helpers-6kObVbfS.js → helpers-Bw52uyzw.js} +1 -1
  96. package/dist/src/compiled/_chunks/workflow/{logger-NN5YHpYy.js → logger-DFNCa8Nl.js} +1 -1
  97. package/dist/src/compiled/_chunks/workflow/resume-hook-BhA_nDEV.js +1 -0
  98. package/dist/src/compiled/_chunks/workflow/{run-DJevv8zz.js → run-BT6SQv5f.js} +1 -1
  99. package/dist/src/compiled/_chunks/workflow/{serialization-C5KgPESk.js → serialization-Cl0SYU0I.js} +3 -3
  100. package/dist/src/compiled/_chunks/workflow/sleep-DB4AH9-A.js +1 -0
  101. package/dist/src/compiled/_chunks/workflow/{wait-until-BMY_tOr-.js → wait-until-Dzhr6tzf.js} +1 -1
  102. package/dist/src/compiled/_chunks/workflow/{ws-transport-DSDcKH08.js → ws-transport-BpTMh40s.js} +1 -1
  103. package/dist/src/compiled/chat/index.d.ts +1 -725
  104. package/dist/src/compiled/chat/index.js +1 -1
  105. package/dist/src/compiler/artifacts.d.ts +1 -0
  106. package/dist/src/compiler/artifacts.js +1 -1
  107. package/dist/src/compiler/extension-compatibility.d.ts +42 -15
  108. package/dist/src/compiler/extension-compatibility.js +1 -1
  109. package/dist/src/compiler/manifest.d.ts +14 -18
  110. package/dist/src/compiler/manifest.js +1 -1
  111. package/dist/src/compiler/normalize-agent-config.js +1 -1
  112. package/dist/src/compiler/normalize-helpers.js +1 -1
  113. package/dist/src/compiler/normalize-sandbox.d.ts +2 -7
  114. package/dist/src/compiler/normalize-sandbox.js +1 -1
  115. package/dist/src/compiler/normalize-tool.js +1 -1
  116. package/dist/src/compiler/workspace-resources.js +1 -1
  117. package/dist/src/context/build-callback-context.d.ts +2 -0
  118. package/dist/src/context/build-callback-context.js +1 -1
  119. package/dist/src/context/build-dynamic-tools.js +1 -1
  120. package/dist/src/context/container.d.ts +1 -1
  121. package/dist/src/context/container.js +1 -1
  122. package/dist/src/context/dynamic-tool-lifecycle.js +1 -1
  123. package/dist/src/context/key-names.d.ts +1 -0
  124. package/dist/src/context/key-names.js +1 -1
  125. package/dist/src/context/keys.d.ts +7 -2
  126. package/dist/src/context/keys.js +1 -1
  127. package/dist/src/context/providers/sandbox.js +1 -1
  128. package/dist/src/context/providers/session.d.ts +19 -2
  129. package/dist/src/context/session-context.d.ts +1 -1
  130. package/dist/src/discover/sandbox.js +1 -1
  131. package/dist/src/evals/cli/eval.js +1 -1
  132. package/dist/src/evals/context.d.ts +1 -0
  133. package/dist/src/evals/context.js +1 -1
  134. package/dist/src/evals/define-eval-config.d.ts +7 -7
  135. package/dist/src/evals/define-eval-config.js +1 -1
  136. package/dist/src/evals/define-eval.d.ts +5 -2
  137. package/dist/src/evals/index.d.ts +1 -1
  138. package/dist/src/evals/runner/derive-run-facts.js +1 -1
  139. package/dist/src/evals/runner/execute-eval.d.ts +2 -0
  140. package/dist/src/evals/runner/execute-eval.js +1 -1
  141. package/dist/src/evals/runner/execute-task.d.ts +2 -0
  142. package/dist/src/evals/runner/execute-task.js +1 -1
  143. package/dist/src/evals/runner/run-evals.d.ts +2 -0
  144. package/dist/src/evals/runner/run-evals.js +1 -1
  145. package/dist/src/evals/target.js +1 -1
  146. package/dist/src/evals/types.d.ts +26 -9
  147. package/dist/src/eve-channel/create-request.d.ts +2 -1
  148. package/dist/src/eve-channel/delivery-policy-request.d.ts +4 -0
  149. package/dist/src/eve-channel/delivery-policy-request.js +1 -0
  150. package/dist/src/eve-channel/index.js +1 -1
  151. package/dist/src/eve-channel/request.d.ts +2 -1
  152. package/dist/src/eve-channel/request.js +1 -1
  153. package/dist/src/execution/cancel-descendant-turns-step.js +1 -1
  154. package/dist/src/execution/cancel-indexed-session-tasks-step.d.ts +2 -1
  155. package/dist/src/execution/cancel-indexed-session-tasks-step.js +1 -1
  156. package/dist/src/execution/coordination-dispatch-shared.d.ts +3 -7
  157. package/dist/src/execution/coordination-dispatch-shared.js +1 -1
  158. package/dist/src/execution/coordination-dispatch-step.js +1 -1
  159. package/dist/src/execution/dynamic-workflow/tool.js +1 -1
  160. package/dist/src/execution/legacy-session/interrupt-step.js +1 -1
  161. package/dist/src/execution/node-step.js +1 -1
  162. package/dist/src/execution/proxied-deliver-step.js +1 -1
  163. package/dist/src/execution/route-child-delivery.js +3 -1
  164. package/dist/src/execution/runtime-context.js +1 -1
  165. package/dist/src/execution/sandbox/active-handles.d.ts +7 -8
  166. package/dist/src/execution/sandbox/active-handles.js +1 -1
  167. package/dist/src/execution/sandbox/bash.js +1 -1
  168. package/dist/src/execution/sandbox/bindings/docker-cli.d.ts +1 -1
  169. package/dist/src/execution/sandbox/bindings/docker-cli.js +1 -1
  170. package/dist/src/execution/sandbox/bindings/docker-container.d.ts +2 -2
  171. package/dist/src/execution/sandbox/bindings/docker-container.js +1 -1
  172. package/dist/src/execution/sandbox/bindings/docker-network.d.ts +1 -1
  173. package/dist/src/execution/sandbox/bindings/docker-network.js +1 -1
  174. package/dist/src/execution/sandbox/bindings/docker-options.d.ts +4 -5
  175. package/dist/src/execution/sandbox/bindings/docker-options.js +1 -1
  176. package/dist/src/execution/sandbox/bindings/docker-session.d.ts +0 -1
  177. package/dist/src/execution/sandbox/bindings/docker-session.js +2 -2
  178. package/dist/src/execution/sandbox/bindings/docker.d.ts +16 -18
  179. package/dist/src/execution/sandbox/bindings/docker.js +1 -1
  180. package/dist/src/execution/sandbox/bindings/immutable-resources.d.ts +21 -0
  181. package/dist/src/execution/sandbox/bindings/immutable-resources.js +2 -0
  182. package/dist/src/execution/sandbox/bindings/just-bash-runtime.d.ts +9 -5
  183. package/dist/src/execution/sandbox/bindings/just-bash-runtime.js +1 -1
  184. package/dist/src/execution/sandbox/bindings/just-bash.d.ts +13 -26
  185. package/dist/src/execution/sandbox/bindings/just-bash.js +1 -1
  186. package/dist/src/execution/sandbox/bindings/{local-backend-utils.d.ts → local-provider-utils.d.ts} +7 -5
  187. package/dist/src/execution/sandbox/bindings/local-provider-utils.js +1 -0
  188. package/dist/src/execution/sandbox/bindings/local.d.ts +3 -3
  189. package/dist/src/execution/sandbox/bindings/local.js +1 -1
  190. package/dist/src/execution/sandbox/bindings/microsandbox-create.js +1 -1
  191. package/dist/src/execution/sandbox/bindings/microsandbox-lifecycle.d.ts +30 -8
  192. package/dist/src/execution/sandbox/bindings/microsandbox-lifecycle.js +1 -1
  193. package/dist/src/execution/sandbox/bindings/microsandbox-metadata.d.ts +9 -1
  194. package/dist/src/execution/sandbox/bindings/microsandbox-metadata.js +1 -1
  195. package/dist/src/execution/sandbox/bindings/microsandbox-network.js +1 -1
  196. package/dist/src/execution/sandbox/bindings/microsandbox-options.d.ts +10 -4
  197. package/dist/src/execution/sandbox/bindings/microsandbox-options.js +1 -1
  198. package/dist/src/execution/sandbox/bindings/microsandbox-platform.js +1 -1
  199. package/dist/src/execution/sandbox/bindings/microsandbox-runtime.d.ts +7 -5
  200. package/dist/src/execution/sandbox/bindings/microsandbox-runtime.js +1 -1
  201. package/dist/src/execution/sandbox/bindings/microsandbox-templates.js +1 -1
  202. package/dist/src/execution/sandbox/bindings/microsandbox.d.ts +11 -21
  203. package/dist/src/execution/sandbox/bindings/microsandbox.js +1 -1
  204. package/dist/src/execution/sandbox/bindings/vercel-base-runtime.js +2 -2
  205. package/dist/src/execution/sandbox/bindings/vercel-credentials.js +1 -1
  206. package/dist/src/execution/sandbox/bindings/vercel-errors.js +1 -1
  207. package/dist/src/execution/sandbox/bindings/vercel-lifecycle.d.ts +2 -2
  208. package/dist/src/execution/sandbox/bindings/vercel-lifecycle.js +1 -1
  209. package/dist/src/execution/sandbox/bindings/vercel-lookup.js +1 -1
  210. package/dist/src/execution/sandbox/bindings/vercel-options.d.ts +1 -2
  211. package/dist/src/execution/sandbox/bindings/vercel-options.js +1 -1
  212. package/dist/src/execution/sandbox/bindings/vercel.d.ts +20 -12
  213. package/dist/src/execution/sandbox/bindings/vercel.js +2 -2
  214. package/dist/src/execution/sandbox/development-cleanup.js +1 -1
  215. package/dist/src/execution/sandbox/development-prewarm.d.ts +5 -0
  216. package/dist/src/execution/sandbox/development-prewarm.js +1 -1
  217. package/dist/src/execution/sandbox/development-run.d.ts +2 -3
  218. package/dist/src/execution/sandbox/dockerfile.d.ts +25 -0
  219. package/dist/src/execution/sandbox/dockerfile.js +1 -0
  220. package/dist/src/execution/sandbox/ensure.d.ts +0 -17
  221. package/dist/src/execution/sandbox/ensure.js +1 -1
  222. package/dist/src/execution/sandbox/logging-session.js +1 -1
  223. package/dist/src/execution/sandbox/prewarm.d.ts +23 -27
  224. package/dist/src/execution/sandbox/prewarm.js +1 -2
  225. package/dist/src/execution/sandbox/provider-files.d.ts +2 -0
  226. package/dist/src/execution/sandbox/provider-files.js +1 -0
  227. package/dist/src/execution/sandbox/provider-host-development.d.ts +2 -0
  228. package/dist/src/execution/sandbox/provider-host-development.js +1 -0
  229. package/dist/src/execution/sandbox/provider-host.d.ts +2 -0
  230. package/dist/src/execution/sandbox/provider-host.js +1 -0
  231. package/dist/src/execution/sandbox/provider-identity.d.ts +1 -0
  232. package/dist/src/execution/sandbox/provider-identity.js +1 -0
  233. package/dist/src/execution/sandbox/ripgrep-probe.d.ts +0 -7
  234. package/dist/src/execution/sandbox/ripgrep-probe.js +1 -1
  235. package/dist/src/execution/sandbox/session.d.ts +8 -8
  236. package/dist/src/execution/sandbox/session.js +1 -1
  237. package/dist/src/execution/session/admission.js +1 -1
  238. package/dist/src/execution/session/handoff-steps.js +1 -1
  239. package/dist/src/execution/session/handoff.d.ts +2 -1
  240. package/dist/src/execution/session/handoff.js +1 -1
  241. package/dist/src/execution/session/input-queue.d.ts +4 -1
  242. package/dist/src/execution/session/input-queue.js +1 -1
  243. package/dist/src/execution/session/next-input.js +1 -1
  244. package/dist/src/execution/session/program.js +1 -1
  245. package/dist/src/execution/session/turn-step.js +1 -1
  246. package/dist/src/execution/session/turn.js +1 -1
  247. package/dist/src/execution/session-inbox/protocol.js +1 -1
  248. package/dist/src/execution/session-workflow-tool-run.js +1 -1
  249. package/dist/src/execution/settle-cancelled-turn-step.js +1 -1
  250. package/dist/src/execution/stable-workflow-names.d.ts +0 -1
  251. package/dist/src/execution/stable-workflow-names.js +1 -1
  252. package/dist/src/execution/tasks/child/notify.d.ts +44 -0
  253. package/dist/src/execution/tasks/child/notify.js +1 -0
  254. package/dist/src/execution/tasks/parent/control-shared.d.ts +2 -5
  255. package/dist/src/execution/tasks/parent/control-shared.js +1 -1
  256. package/dist/src/execution/tasks/parent/delegate.d.ts +8 -36
  257. package/dist/src/execution/tasks/parent/delegate.js +1 -1
  258. package/dist/src/execution/tasks/parent/dispatch.d.ts +3 -5
  259. package/dist/src/execution/tasks/parent/dispatch.js +1 -1
  260. package/dist/src/execution/tasks/parent/hitl-proxy-steps.d.ts +4 -1
  261. package/dist/src/execution/tasks/parent/hitl-proxy-steps.js +1 -1
  262. package/dist/src/execution/tasks/parent/run-parent.d.ts +5 -19
  263. package/dist/src/execution/tasks/parent/run-parent.js +1 -1
  264. package/dist/src/execution/tasks/parent/task-cancel.d.ts +6 -5
  265. package/dist/src/execution/tasks/parent/task-cancel.js +1 -1
  266. package/dist/src/execution/tasks/parent/tool-execution.js +1 -1
  267. package/dist/src/execution/tool-auth.d.ts +3 -9
  268. package/dist/src/execution/tool-auth.js +1 -1
  269. package/dist/src/execution/tools/agent-router-workflow.js +1 -1
  270. package/dist/src/execution/tools/sleep-workflow.js +1 -1
  271. package/dist/src/execution/tools/subagent/accept-event-step.js +1 -1
  272. package/dist/src/execution/tools/subagent/emit-event-step.d.ts +11 -0
  273. package/dist/src/execution/tools/subagent/emit-event-step.js +1 -0
  274. package/dist/src/execution/tools/subagent/invoke-agent.d.ts +5 -7
  275. package/dist/src/execution/tools/subagent/invoke-agent.js +1 -1
  276. package/dist/src/execution/tools/subagent/invoke-preparation.js +1 -1
  277. package/dist/src/execution/tools/subagent/invoke-step.d.ts +3 -2
  278. package/dist/src/execution/tools/subagent/invoke-step.js +1 -1
  279. package/dist/src/execution/tools/subagent/start.d.ts +1 -0
  280. package/dist/src/execution/tools/subagent/task-agent-requests.d.ts +0 -1
  281. package/dist/src/execution/tools/subagent/task-agent-requests.js +1 -1
  282. package/dist/src/execution/tools/subagent/task-cancel.d.ts +1 -1
  283. package/dist/src/execution/tools/subagent/task-cancel.js +1 -1
  284. package/dist/src/execution/tools/workflow/background.d.ts +1 -1
  285. package/dist/src/execution/tools/workflow/background.js +1 -1
  286. package/dist/src/execution/tools/workflow/body.d.ts +0 -2
  287. package/dist/src/execution/tools/workflow/body.js +1 -1
  288. package/dist/src/execution/tools/workflow/cancel.d.ts +4 -3
  289. package/dist/src/execution/tools/workflow/cancel.js +1 -1
  290. package/dist/src/execution/tools/workflow/cancellation-policy.d.ts +2 -0
  291. package/dist/src/execution/tools/workflow/cancellation-policy.js +1 -0
  292. package/dist/src/execution/tools/workflow/messages.d.ts +0 -1
  293. package/dist/src/execution/tools/workflow/owner-channels.d.ts +6 -6
  294. package/dist/src/execution/tools/workflow/owner-inbox.d.ts +5 -9
  295. package/dist/src/execution/tools/workflow/owner-inbox.js +1 -1
  296. package/dist/src/execution/tools/workflow/owner.d.ts +6 -2
  297. package/dist/src/execution/tools/workflow/owner.js +1 -1
  298. package/dist/src/execution/tools/workflow/start.js +1 -1
  299. package/dist/src/execution/tools/workflow/types.d.ts +11 -19
  300. package/dist/src/execution/tools/workflow/types.js +1 -1
  301. package/dist/src/execution/tools/workflow/workflow-owner-background.d.ts +13 -0
  302. package/dist/src/execution/tools/workflow/workflow-owner-background.js +1 -0
  303. package/dist/src/execution/tools/workflow/workflow-owner-blocking.d.ts +12 -0
  304. package/dist/src/execution/tools/workflow/workflow-owner-blocking.js +1 -0
  305. package/dist/src/execution/tools/workflow/workflow.d.ts +3 -3
  306. package/dist/src/execution/tools/workflow/workflow.js +1 -1
  307. package/dist/src/execution/workflow-runtime.d.ts +0 -4
  308. package/dist/src/execution/workflow-runtime.js +1 -1
  309. package/dist/src/framework/sources/modules/sandbox.d.ts +2 -1
  310. package/dist/src/framework/sources/modules/sandbox.js +1 -1
  311. package/dist/src/harness/approval-delivery-coordinator.js +1 -1
  312. package/dist/src/harness/background-tools.d.ts +3 -5
  313. package/dist/src/harness/coordination.js +1 -1
  314. package/dist/src/harness/emission.js +1 -1
  315. package/dist/src/harness/execute-tool.d.ts +2 -29
  316. package/dist/src/harness/hitl/approval-input-requests.d.ts +1 -1
  317. package/dist/src/harness/hitl/approval-input-requests.js +1 -1
  318. package/dist/src/harness/input-requests.d.ts +6 -0
  319. package/dist/src/harness/input-requests.js +1 -1
  320. package/dist/src/harness/messages.d.ts +2 -1
  321. package/dist/src/harness/messages.js +1 -1
  322. package/dist/src/harness/pending-input-batches.d.ts +1 -0
  323. package/dist/src/harness/pending-input-batches.js +1 -1
  324. package/dist/src/harness/tool-loop.js +2 -2
  325. package/dist/src/harness/tool-model-output.js +1 -1
  326. package/dist/src/harness/tools.js +1 -1
  327. package/dist/src/harness/workflow-tool-runs.d.ts +53 -18
  328. package/dist/src/harness/workflow-tool-runs.js +1 -1
  329. package/dist/src/instrumentation/ai-sdk-warnings.d.ts +6 -0
  330. package/dist/src/instrumentation/ai-sdk-warnings.js +1 -0
  331. package/dist/src/instrumentation/runtime.d.ts +1 -0
  332. package/dist/src/instrumentation/runtime.js +1 -1
  333. package/dist/src/internal/application/compiled-artifacts.d.ts +2 -0
  334. package/dist/src/internal/application/compiled-artifacts.js +2 -2
  335. package/dist/src/internal/application/package.js +1 -1
  336. package/dist/src/internal/nitro/dev-runtime-artifacts.js +1 -1
  337. package/dist/src/internal/nitro/host/artifacts-config.d.ts +6 -1
  338. package/dist/src/internal/nitro/host/artifacts-config.js +1 -1
  339. package/dist/src/internal/nitro/host/build-application.js +1 -1
  340. package/dist/src/internal/nitro/host/compiled-sandbox-provider-prune-plugin.d.ts +16 -0
  341. package/dist/src/internal/nitro/host/compiled-sandbox-provider-prune-plugin.js +5 -0
  342. package/dist/src/internal/nitro/host/configure-nitro-routes.js +2 -2
  343. package/dist/src/internal/nitro/host/create-application-nitro.d.ts +3 -3
  344. package/dist/src/internal/nitro/host/create-application-nitro.js +1 -1
  345. package/dist/src/internal/nitro/host/dev-authored-rebuild-coordinator.js +1 -1
  346. package/dist/src/internal/nitro/host/dev-host-fingerprint.js +1 -1
  347. package/dist/src/internal/nitro/host/prepare-application-host.d.ts +1 -0
  348. package/dist/src/internal/nitro/host/prepare-application-host.js +1 -1
  349. package/dist/src/internal/nitro/host/sandbox-shutdown-plugin.js +1 -1
  350. package/dist/src/internal/nitro/host/start-development-server.js +2 -2
  351. package/dist/src/internal/nitro/host/start-production-server.js +2 -2
  352. package/dist/src/internal/nitro/host/types.d.ts +1 -1
  353. package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response.js +1 -1
  354. package/dist/src/internal/nitro/routes/runtime-artifacts.d.ts +1 -0
  355. package/dist/src/internal/nitro/routes/runtime-artifacts.js +1 -1
  356. package/dist/src/internal/runtime-registry.d.ts +2 -2
  357. package/dist/src/internal/vercel/build-agent-workspace.d.ts +3 -1
  358. package/dist/src/internal/vercel/build-agent-workspace.js +1 -1
  359. package/dist/src/protocol/message.d.ts +4 -4
  360. package/dist/src/public/channels/chat-sdk/chatSdkChannel.d.ts +4 -5
  361. package/dist/src/public/channels/chat-sdk/chatSdkChannel.js +2 -2
  362. package/dist/src/public/channels/github/checkout.js +1 -1
  363. package/dist/src/public/channels/index.d.ts +1 -1
  364. package/dist/src/public/channels/slack/slackChannel.d.ts +3 -1
  365. package/dist/src/public/channels/slack/slackChannel.js +1 -1
  366. package/dist/src/public/definitions/channel.d.ts +1 -1
  367. package/dist/src/public/definitions/sandbox.d.ts +5 -43
  368. package/dist/src/public/definitions/sandbox.js +1 -1
  369. package/dist/src/public/local-dev.d.ts +4 -5
  370. package/dist/src/public/sandbox/docker-sandbox.d.ts +16 -40
  371. package/dist/src/public/sandbox/docker.d.ts +2 -2
  372. package/dist/src/public/sandbox/docker.js +1 -1
  373. package/dist/src/public/sandbox/index.d.ts +4 -9
  374. package/dist/src/public/sandbox/index.js +1 -1
  375. package/dist/src/public/sandbox/just-bash-sandbox.d.ts +11 -6
  376. package/dist/src/public/sandbox/just-bash.d.ts +2 -2
  377. package/dist/src/public/sandbox/just-bash.js +1 -1
  378. package/dist/src/public/sandbox/microsandbox-sandbox.d.ts +11 -17
  379. package/dist/src/public/sandbox/microsandbox.d.ts +2 -2
  380. package/dist/src/public/sandbox/microsandbox.js +1 -1
  381. package/dist/src/public/sandbox/provider.d.ts +1 -0
  382. package/dist/src/public/sandbox/provider.js +1 -0
  383. package/dist/src/public/sandbox/vercel-sandbox.d.ts +10 -41
  384. package/dist/src/public/sandbox/vercel.d.ts +2 -2
  385. package/dist/src/public/sandbox/vercel.js +1 -1
  386. package/dist/src/public/tools/index.d.ts +2 -2
  387. package/dist/src/runtime/agent/resolve-model.js +1 -1
  388. package/dist/src/runtime/cache-key.js +1 -1
  389. package/dist/src/runtime/compiled-artifacts-source.d.ts +6 -1
  390. package/dist/src/runtime/compiled-artifacts-source.js +1 -1
  391. package/dist/src/runtime/connections/scoped-authorization.js +1 -1
  392. package/dist/src/runtime/loaders/artifact-paths.d.ts +1 -0
  393. package/dist/src/runtime/loaders/artifact-paths.js +1 -1
  394. package/dist/src/runtime/loaders/bundled-artifacts.d.ts +3 -0
  395. package/dist/src/runtime/loaders/bundled-artifacts.js +1 -1
  396. package/dist/src/runtime/loaders/compile-metadata.js +1 -1
  397. package/dist/src/runtime/loaders/manifest.js +1 -1
  398. package/dist/src/runtime/loaders/module-map.js +1 -1
  399. package/dist/src/runtime/local-dev-capability.d.ts +14 -12
  400. package/dist/src/runtime/local-dev-capability.js +1 -1
  401. package/dist/src/runtime/resolve-agent-graph.js +1 -1
  402. package/dist/src/runtime/resolve-sandbox.d.ts +1 -10
  403. package/dist/src/runtime/resolve-sandbox.js +1 -1
  404. package/dist/src/runtime/sandbox/prepared-artifacts.d.ts +13 -0
  405. package/dist/src/runtime/sandbox/prepared-artifacts.js +1 -0
  406. package/dist/src/runtime/sandbox/registry.d.ts +2 -9
  407. package/dist/src/runtime/sandbox/registry.js +1 -1
  408. package/dist/src/runtime/sessions/runtime-session.js +1 -1
  409. package/dist/src/runtime/sessions/turn.d.ts +10 -8
  410. package/dist/src/runtime/subagents/registry.js +1 -1
  411. package/dist/src/runtime/subagents/workflow.js +1 -1
  412. package/dist/src/runtime/tools/registry.js +1 -1
  413. package/dist/src/runtime/types.d.ts +13 -26
  414. package/dist/src/runtime/workspace/types.d.ts +1 -1
  415. package/dist/src/sandbox/providers/default.d.ts +27 -0
  416. package/dist/src/sandbox/providers/default.js +1 -0
  417. package/dist/src/sandbox/providers/docker.d.ts +11 -0
  418. package/dist/src/sandbox/providers/docker.js +1 -0
  419. package/dist/src/sandbox/providers/just-bash.d.ts +4 -0
  420. package/dist/src/sandbox/providers/just-bash.js +1 -0
  421. package/dist/src/sandbox/providers/microsandbox.d.ts +12 -0
  422. package/dist/src/sandbox/providers/microsandbox.js +1 -0
  423. package/dist/src/sandbox/providers/vercel.d.ts +12 -0
  424. package/dist/src/sandbox/providers/vercel.js +1 -0
  425. package/dist/src/sandbox/providers.d.ts +5 -0
  426. package/dist/src/sandbox/providers.js +1 -0
  427. package/dist/src/sandbox/state.d.ts +6 -25
  428. package/dist/src/self-modification/extension/subagents/agent/agent.d.ts +1 -1
  429. package/dist/src/self-modification/extension/subagents/agent/agent.js +1 -1
  430. package/dist/src/self-modification/extension/subagents/agent/sandbox.d.ts +2 -25
  431. package/dist/src/self-modification/extension/subagents/agent/sandbox.js +1 -1
  432. package/dist/src/self-modification/extension/subagents/agent/tools/publish.js +1 -1
  433. package/dist/src/self-modification/extension/subagents/agent/tools/registry_add.js +1 -1
  434. package/dist/src/self-modification/filesystem.d.ts +3 -1
  435. package/dist/src/self-modification/filesystem.js +1 -1
  436. package/dist/src/self-modification/git-workspace.d.ts +1 -1
  437. package/dist/src/self-modification/git.d.ts +1 -1
  438. package/dist/src/self-modification/sandbox.d.ts +14 -9
  439. package/dist/src/self-modification/sandbox.js +1 -1
  440. package/dist/src/setup/boxes/select-model.js +1 -1
  441. package/dist/src/setup/cli/select-state.d.ts +4 -2
  442. package/dist/src/setup/cli/select-state.js +1 -1
  443. package/dist/src/setup/flows/model-login.js +1 -1
  444. package/dist/src/setup/flows/model.d.ts +5 -5
  445. package/dist/src/setup/primitives/pm/pnpm.js +3 -2
  446. package/dist/src/setup/scaffold/create/project.js +1 -1
  447. package/dist/src/shared/action-types.d.ts +0 -4
  448. package/dist/src/shared/action-types.js +1 -1
  449. package/dist/src/shared/default-agent-model.d.ts +1 -1
  450. package/dist/src/shared/default-agent-model.js +1 -1
  451. package/dist/src/shared/sandbox-environment.d.ts +45 -0
  452. package/dist/src/shared/sandbox-environment.js +1 -0
  453. package/dist/src/shared/sandbox-network-policy.d.ts +8 -3
  454. package/dist/src/shared/sandbox-network-policy.js +1 -1
  455. package/dist/src/shared/sandbox-prepared-artifacts.d.ts +16 -0
  456. package/dist/src/shared/sandbox-prepared-artifacts.js +1 -0
  457. package/dist/src/shared/sandbox-provider.d.ts +110 -0
  458. package/dist/src/shared/sandbox-provider.js +1 -0
  459. package/dist/src/shared/sandbox-session.d.ts +18 -41
  460. package/dist/src/shared/sandbox-template-error.d.ts +9 -0
  461. package/dist/src/shared/sandbox-template-error.js +1 -0
  462. package/dist/src/subagents/tool.d.ts +1 -1
  463. package/dist/src/subagents/tool.js +1 -1
  464. package/dist/src/svelte/index.js +1 -1
  465. package/dist/src/svelte/use-eve-agent.js +1 -1
  466. package/dist/src/tasks/delivery-context.d.ts +6 -4
  467. package/dist/src/tasks/delivery-context.js +2 -2
  468. package/dist/src/tasks/delivery-policy.d.ts +2 -0
  469. package/dist/src/tasks/delivery-policy.js +1 -1
  470. package/dist/src/tasks/notification.d.ts +4 -0
  471. package/dist/src/tasks/notification.js +1 -0
  472. package/dist/src/tasks/session-task-cohorts.d.ts +1 -12
  473. package/dist/src/tasks/session-task-cohorts.js +1 -1
  474. package/dist/src/tasks/transitions.d.ts +5 -2
  475. package/dist/src/tasks/transitions.js +1 -1
  476. package/dist/src/tasks/types.d.ts +2 -52
  477. package/dist/src/tasks/types.js +1 -1
  478. package/dist/src/tools/definition.d.ts +1 -25
  479. package/dist/src/tools/definition.js +1 -1
  480. package/dist/src/tools/dynamic.d.ts +1 -3
  481. package/dist/src/tools/framework/agent-contract.js +1 -1
  482. package/dist/src/tools/framework/agent.d.ts +16 -22
  483. package/dist/src/tools/framework/agent.js +1 -1
  484. package/dist/src/tools/workflow-definition.d.ts +16 -5
  485. package/dist/src/tracing/agent-invocation-coordinator.js +1 -1
  486. package/dist/src/tracing/agent-trace-context-store.js +1 -1
  487. package/dist/src/vue/index.js +1 -1
  488. package/dist/src/vue/use-eve-agent.js +1 -1
  489. package/docs/README.md +40 -45
  490. package/docs/agent-config.md +2 -2
  491. package/docs/channels/eve.mdx +1 -1
  492. package/docs/channels/overview.mdx +48 -0
  493. package/docs/concepts/execution-model-and-durability.mdx +5 -6
  494. package/docs/concepts/sessions-runs-and-streaming.md +5 -5
  495. package/docs/dynamic-configuration/meta.json +5 -0
  496. package/docs/evals/assertions.mdx +5 -1
  497. package/docs/evals/overview.mdx +43 -0
  498. package/docs/getting-started.mdx +1 -1
  499. package/docs/guides/client/overview.mdx +1 -1
  500. package/docs/guides/deployment/overview.md +1 -1
  501. package/docs/guides/deployment/self-hosting.md +5 -5
  502. package/docs/guides/deployment/vercel.mdx +10 -12
  503. package/docs/guides/dev-tui.md +22 -10
  504. package/docs/guides/frontend/overview.mdx +1 -1
  505. package/docs/guides/hooks.md +4 -0
  506. package/docs/memory/meta.json +1 -1
  507. package/docs/memory/overview.mdx +4 -0
  508. package/docs/meta.json +13 -16
  509. package/docs/patterns/meta.json +2 -2
  510. package/docs/protocols/acp.md +1 -1
  511. package/docs/protocols/ucp.mdx +1 -1
  512. package/docs/reference/cli.md +10 -9
  513. package/docs/reference/meta.json +4 -1
  514. package/docs/reference/typescript-api.md +1 -24
  515. package/docs/sandbox/default.mdx +17 -0
  516. package/docs/sandbox/docker.mdx +29 -0
  517. package/docs/sandbox/index.mdx +216 -0
  518. package/docs/sandbox/just-bash.mdx +18 -0
  519. package/docs/sandbox/meta.json +5 -0
  520. package/docs/sandbox/microsandbox.mdx +31 -0
  521. package/docs/sandbox/vercel.mdx +106 -0
  522. package/docs/schedules.mdx +35 -1
  523. package/docs/subagents/index.mdx +27 -6
  524. package/docs/subagents/meta.json +1 -1
  525. package/docs/tools/overview.mdx +37 -37
  526. package/docs/tools/workflows.mdx +31 -24
  527. package/docs/tutorial/run-analysis.mdx +6 -5
  528. package/package.json +20 -11
  529. package/dist/src/cli/dev/tui/model-editor.d.ts +0 -103
  530. package/dist/src/cli/dev/tui/model-editor.js +0 -1
  531. package/dist/src/compiled/_chunks/node/chunk-5OX2R7AJ-CxVV-owP.js +0 -1
  532. package/dist/src/compiled/_chunks/node/chunk-AYN7QRWH-B__hKQV7.js +0 -1
  533. package/dist/src/compiled/_chunks/node/chunk-QZV7YRVM-Dzw4WEBv.js +0 -1
  534. package/dist/src/compiled/_chunks/node/dist-CweJdVFE.js +0 -6
  535. package/dist/src/compiled/_chunks/node/dist-Da54NuK8.js +0 -96
  536. package/dist/src/compiled/_chunks/workflow/attribute-changes-A6HfMNG3.js +0 -6
  537. package/dist/src/compiled/_chunks/workflow/resume-hook-CAqlhwic.js +0 -1
  538. package/dist/src/compiled/_chunks/workflow/sleep-CbUwdv6O.js +0 -1
  539. package/dist/src/compiled/chat/_mdast.d.ts +0 -24
  540. package/dist/src/compiled/chat/_workflow-serde.d.ts +0 -3
  541. package/dist/src/compiled/chat/jsx-runtime-_JEEAotp.d.ts +0 -907
  542. package/dist/src/execution/sandbox/bindings/local-backend-utils.js +0 -1
  543. package/dist/src/execution/sandbox/lazy-backend.d.ts +0 -15
  544. package/dist/src/execution/sandbox/lazy-backend.js +0 -1
  545. package/dist/src/execution/sandbox/template-prewarm-lock.d.ts +0 -8
  546. package/dist/src/execution/sandbox/template-prewarm-lock.js +0 -1
  547. package/dist/src/execution/tasks/child/steps.d.ts +0 -81
  548. package/dist/src/execution/tasks/child/steps.js +0 -1
  549. package/dist/src/execution/tasks/child/workflow.d.ts +0 -28
  550. package/dist/src/execution/tasks/child/workflow.js +0 -1
  551. package/dist/src/execution/tools/subagent/emit-called-step.d.ts +0 -9
  552. package/dist/src/execution/tools/subagent/emit-called-step.js +0 -1
  553. package/dist/src/execution/tools/workflow/run-control.d.ts +0 -14
  554. package/dist/src/execution/tools/workflow/run-control.js +0 -1
  555. package/dist/src/internal/authored-definition/sandbox.d.ts +0 -17
  556. package/dist/src/internal/authored-definition/sandbox.js +0 -1
  557. package/dist/src/internal/nitro/host/compiled-sandbox-backend-prune-plugin.d.ts +0 -16
  558. package/dist/src/internal/nitro/host/compiled-sandbox-backend-prune-plugin.js +0 -2
  559. package/dist/src/public/definitions/sandbox-backend.d.ts +0 -17
  560. package/dist/src/public/definitions/sandbox-backend.js +0 -1
  561. package/dist/src/public/sandbox/backends/default.d.ts +0 -1
  562. package/dist/src/public/sandbox/backends/default.js +0 -1
  563. package/dist/src/public/sandbox/backends/docker.d.ts +0 -1
  564. package/dist/src/public/sandbox/backends/docker.js +0 -1
  565. package/dist/src/public/sandbox/backends/just-bash.d.ts +0 -1
  566. package/dist/src/public/sandbox/backends/just-bash.js +0 -1
  567. package/dist/src/public/sandbox/backends/microsandbox.d.ts +0 -1
  568. package/dist/src/public/sandbox/backends/microsandbox.js +0 -1
  569. package/dist/src/public/sandbox/backends/vercel.d.ts +0 -1
  570. package/dist/src/public/sandbox/backends/vercel.js +0 -1
  571. package/dist/src/runtime/sandbox/keys.d.ts +0 -42
  572. package/dist/src/runtime/sandbox/keys.js +0 -1
  573. package/dist/src/runtime/sandbox/template-plan.d.ts +0 -24
  574. package/dist/src/runtime/sandbox/template-plan.js +0 -1
  575. package/dist/src/sandbox/backends/default.d.ts +0 -42
  576. package/dist/src/sandbox/backends/default.js +0 -1
  577. package/dist/src/sandbox/backends/docker.d.ts +0 -14
  578. package/dist/src/sandbox/backends/docker.js +0 -1
  579. package/dist/src/sandbox/backends/just-bash.d.ts +0 -17
  580. package/dist/src/sandbox/backends/just-bash.js +0 -1
  581. package/dist/src/sandbox/backends/microsandbox.d.ts +0 -17
  582. package/dist/src/sandbox/backends/microsandbox.js +0 -1
  583. package/dist/src/sandbox/backends/vercel.d.ts +0 -30
  584. package/dist/src/sandbox/backends/vercel.js +0 -1
  585. package/dist/src/shared/sandbox-backend.d.ts +0 -176
  586. package/dist/src/shared/sandbox-backend.js +0 -1
  587. package/dist/src/shared/sandbox-definition.d.ts +0 -112
  588. package/dist/src/shared/sandbox-definition.js +0 -1
  589. package/dist/src/tasks/session-index.d.ts +0 -65
  590. package/dist/src/tasks/session-index.js +0 -1
  591. package/dist/src/tools/task.d.ts +0 -55
  592. package/dist/src/tools/task.js +0 -1
  593. package/docs/sandbox.mdx +0 -342
@@ -44,7 +44,7 @@ export default defineSchedule({
44
44
  });
45
45
  ```
46
46
 
47
- You can write the same thing as a plain `.md` file: its frontmatter takes `cron` and nothing else, and the body is the prompt.
47
+ You can write the same thing as a plain `.md` file: its frontmatter takes `cron`, and the body is the prompt.
48
48
 
49
49
  `agent/schedules/cleanup.md`:
50
50
 
@@ -88,6 +88,40 @@ The `auth` option controls which principal the session runs as. A handler may in
88
88
 
89
89
  A handler-form session runs on the same durable runtime engine as any other session, so it can park (durably suspend), for instance when the channel handoff is waiting for a Slack reply. Only markdown task mode is barred from waiting.
90
90
 
91
+ ## Background task results
92
+
93
+ New sessions started by schedules default to `"cohort"`: background
94
+ outcomes wait for overlapping tasks to settle before waking the parent. To report
95
+ independently useful results as they arrive, pass `taskDeliveryPolicy: "auto"` to
96
+ `send(...)` inside a schedule handler:
97
+
98
+ ```ts title="agent/schedules/digest.ts"
99
+ import { defineSchedule } from "eve/schedules";
100
+ import slack from "../channels/slack";
101
+
102
+ export default defineSchedule({
103
+ cron: "0 9 * * *",
104
+ run({ to, waitUntil, appAuth }) {
105
+ waitUntil(
106
+ to(slack, { channelId: "C0123ABC" }).send("Prepare the daily reports.", {
107
+ auth: appAuth,
108
+ taskDeliveryPolicy: "auto",
109
+ }),
110
+ );
111
+ },
112
+ });
113
+ ```
114
+
115
+ The option belongs to `send(...)`. Markdown schedules use the `"cohort"` default;
116
+ use a handler when you need to override it. Sending to an existing session preserves
117
+ its policy unless the send supplies an explicit value.
118
+
119
+ Under `"auto"`, a model call may finish silently while related work is pending.
120
+ Available results remain in the next reporting context so the parent can combine
121
+ previously withheld outputs later. A scheduled task-mode session stays alive while
122
+ it owns pending background tasks. See
123
+ [Background task results](./channels/overview#background-task-results).
124
+
91
125
  ## Session continuity
92
126
 
93
127
  Markdown schedules start a new session on every fire. Handler schedules do too, unless they send to an existing conversation, such as a Slack thread. Store data that must survive across fires outside session state.
@@ -3,17 +3,36 @@ title: "Subagents"
3
3
  description: "Delegate work to root-agent copies or declared specialists with their own tools and sandbox."
4
4
  ---
5
5
 
6
- eve supports two ways to delegate work: the root-only built-in `agent` tool, which starts or continues a copy of the root agent, and declared subagents, which are specialists with their own directories. Use a subagent to run independent work in parallel, narrow the available tools, or give a task to a specialist.
6
+ Use a subagent to run independent work in parallel, narrow the available tools, or give a task to a specialist.
7
+
8
+ - Use the root-only [built-in `agent` tool](#the-built-in-agent-tool) to start or continue a copy of the root agent that shares its sandbox.
9
+ - Use a [declared local subagent](#declared-subagents) for a specialist with its own directory and authored capabilities, rather than inheriting the root's.
10
+ - Use a [remote agent](./guides/remote-agents) to delegate to a separately deployed eve agent, with its own configuration and authentication.
7
11
 
8
12
  ## Completion batching
9
13
 
10
14
  Overlapping background work owned by a session forms a cohort. Tasks launched in
11
15
  later user turns join the open cohort while earlier work is still pending or its
12
- successful results await delivery. eve holds successful completion notifications
16
+ terminal results await delivery. With `taskDeliveryPolicy: "cohort"`, eve holds
17
+ completion, failure, and cancellation notifications
13
18
  until every task in that cohort has completed, failed, or been cancelled, then
14
- delivers the successful results together in one parent turn. Partial completions
19
+ delivers all outcomes together in one parent turn. Partial settlements
15
20
  do not invoke the parent model. Work started after the cohort settles forms a new
16
- cohort. No configuration or debounce timer is required.
21
+ cohort.
22
+
23
+ New channel sessions default to `"auto"`; schedules default to `"cohort"`.
24
+ Pass `taskDeliveryPolicy` to `send(...)` to select or update the session policy. See
25
+ [Background task results](/docs/channels/overview#background-task-results).
26
+
27
+ With `"auto"`, a terminal outcome can start a parent turn while other tasks are
28
+ still running. The parent reports independently useful results and stays silent
29
+ when a useful answer depends on unfinished tasks. Ready results may share a turn.
30
+ The reporting context includes the whole cohort and every available output,
31
+ including previously withheld results, for a later combined report.
32
+
33
+ The setting applies to background tools and built-in, declared, and remote
34
+ subagents owned by the session. Internal subagent sessions use `"cohort"` for
35
+ background work they start.
17
36
 
18
37
  User messages, input requests, authorization events, failures, and cancellation
19
38
  are handled without waiting for the cohort. Child lifecycle events are processed
@@ -197,7 +216,7 @@ A declared subagent inherits nothing from the root's authored slots. Discovery t
197
216
  | Tools | Inherited except root-only | Own `tools/` |
198
217
  | Connections | Inherited | Own `connections/` |
199
218
  | Skills | Inherited | Own `skills/` |
200
- | Sandbox | Shared with parent | Own `sandbox/`, else framework default |
219
+ | Sandbox | Reuses the parent sandbox | Own `sandbox/`, else framework default |
201
220
  | Hooks | Inherited | Own `hooks/` |
202
221
  | Extensions | Inherited contributions | Own `extensions/` |
203
222
  | State | Fresh | Fresh |
@@ -206,7 +225,7 @@ A declared subagent inherits nothing from the root's authored slots. Discovery t
206
225
 
207
226
  For a declared subagent this means authoring or mounting anything the child needs. When two subagents need the same procedure, package the skill in a [workspace extension](./extensions#use-an-extension-in-a-workspace) and mount that extension in each subagent. Share typed helpers through `lib/`. The sandbox does not inherit from the parent; eve selects the default sandbox source unless the subagent authors `subagents/<id>/sandbox.ts` or seeds files via `subagents/<id>/sandbox/workspace/`.
208
227
 
209
- The root built-in `agent` tool is the exception. Its children share the root's sandbox and tools because they are copies of the same agent working on the same files.
228
+ The root built-in `agent` tool is the exception. Its children reuse the root's sandbox and tools because they are copies of the same agent working on the same files.
210
229
 
211
230
  `defineState` is never shared, for either kind. Each child starts with fresh durable state.
212
231
 
@@ -234,6 +253,8 @@ Do not rely on subagent delegation by itself as an approval boundary. Put sensit
234
253
 
235
254
  Each delegated subagent spins up its own child session and stream. The parent stream carries the control-plane events `subagent.called` and `subagent.completed`, plus interactive `input.requested`, `authorization.required`, and `authorization.completed` events proxied from descendants so the root channel can prompt the user. To follow the child's other progress, read `subagent.called.data.childSessionId` and subscribe at `GET /eve/v1/session/:childSessionId/stream`.
236
255
 
256
+ Both blocking and background invocations emit `subagent.called` after dispatch and `subagent.completed` after the parent records successful completion. Completion carries the actual output and identifies the same invocation by `callId`; the child session can remain available for reuse. A background working receipt is returned as an `action.result` tool output and does not emit completion. Background completion events do not wait for the cohort report. Failure and cancellation are not successful completion; task notifications retain those outcomes.
257
+
237
258
  Channels with activity reporting attribute the backing agent's tool activity to its background task. Local and remote subagents share the task's progress item rather than adding a separate agent item. Continuing or steering a child with `agentId` attaches its new activity to the new task; the previous task keeps its completed or cancelled status. This applies to the built-in `agent` and declared subagent tools, not to child invocations inside custom workflow tools. Activity reporting is best-effort and does not change task execution or result delivery.
238
259
 
239
260
  A background task that was already admitted survives cancellation of the turn that started it; background work that has not yet been admitted is rejected with the cancelled step. Use `task_cancel` to stop an admitted task. Cancellation delivers the task's final notification to an active parent even if the task must be stopped forcibly. Parent-session finalization cancels remaining live tasks.
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "title": "Subagents",
3
3
  "defaultOpen": false,
4
- "pages": ["index"]
4
+ "pages": ["index", "../guides/remote-agents"]
5
5
  }
@@ -121,33 +121,25 @@ receive only the projected text.
121
121
 
122
122
  ### Background execution
123
123
 
124
- Background execution controls how a tool delivers its result to the parent agent. Durable
125
- suspension controls whether the executor can pause at a workflow wait and release compute.
126
- These are independent choices: `execution: "background"` selects the task lifecycle;
127
- `defineWorkflowTool` with a leading `"use workflow"` directive enables durable suspension.
128
-
129
- | Definition | Durable waits inside `execute` | Result delivered to the model |
130
- | ------------------------------------------------ | --------------------------------------------------------------- | ---------------------------------------------------------------------- |
131
- | `defineTool` | No; the executor runs inside the initiating step. | Executor output after it finishes. |
132
- | `defineTool` + `execution: "background"` | No; the initiating step still waits for the executor to finish. | Task receipt, followed by task notifications. |
133
- | `defineWorkflowTool` | Yes; the tool call waits while the workflow can suspend. | Workflow output after it finishes. |
134
- | `defineWorkflowTool` + `execution: "background"` | Yes; the workflow body can outlive the initiating step. | Task receipt before the body finishes, followed by task notifications. |
135
-
136
- A background tool receives a third `task` argument. Its tool result is the receipt
137
- `{ status: "working", taskId }`; its eventual output belongs to the task. Use a background
138
- workflow tool when the conversation should continue while the body waits for a person,
139
- webhook, or timer. Setting `execution: "background"` on an ordinary tool does not move its
140
- executor into a separate workflow or make an ordinary Promise a durable wait.
124
+ Background execution controls how a workflow tool delivers its result to the parent agent.
125
+ Set `execution: "background"` on `defineWorkflowTool`; ordinary `defineTool` calls always finish
126
+ inside the initiating step.
127
+
128
+ | Definition | Durable waits inside `execute` | Result delivered to the model |
129
+ | ------------------------------------------------ | -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
130
+ | `defineTool` | No; the executor runs inside the initiating step. | Executor output after it finishes. |
131
+ | `defineWorkflowTool` | Yes; the tool call waits while the workflow can suspend. | Workflow output after it finishes. |
132
+ | `defineWorkflowTool` + `execution: "background"` | Yes; the workflow body can outlive the initiating step. | Task receipt before the body finishes; one combined report after all tasks in its cohort are terminal. |
133
+
134
+ A background workflow tool's result is the receipt `{ status: "working", taskId }`; its eventual
135
+ output belongs to the task. Use this mode when the conversation should continue while the body
136
+ waits for a person, webhook, or timer.
141
137
 
142
138
  For background tools, `outputSchema` and `toModelOutput` describe the fixed receipt. The body's
143
139
  return value is available through the completed task's output.
144
140
 
145
- `task.delegated()` has been removed. Move external work into a `defineWorkflowTool` executor and
146
- return its result when it finishes. Rebuild extensions using the removed API after migrating.
147
-
148
- `yield task.postMessage(message)` is the only yield that requests a parent-agent turn. Calling
149
- `task.postMessage` only constructs the message descriptor; you must yield it to send it.
150
- In a workflow body, keep values needed after a wait in local variables; workflow replay
141
+ The `TaskExec` argument and `task.postMessage` have been removed. Return the terminal result;
142
+ background yields are consumed without publishing progress or retaining a task-progress stream. In a workflow body, keep values needed after a wait in local variables; workflow replay
151
143
  reconstructs them across durable waits.
152
144
  Use [`ctx.ask`](/docs/tools/workflows#ask-a-human-ctxask) when the body needs an answer from the human.
153
145
  Background tools are a normal execution mode and need no root-agent flag. Built-in, declared local,
@@ -157,11 +149,20 @@ After the initiating turn accepts background tasks, eve supplies runtime-authore
157
149
  cohort and instructs the model to acknowledge that the work started without waiting for results.
158
150
  [Schedule](/docs/schedules)-initiated turns are the exception: no user prompted them, so their
159
151
  launches keep conditional delivery and send no acknowledgement.
160
- Later task-triggered parent turns receive fresh state for the same cohort. Once every related
161
- task is terminal, the state includes their outputs so the model can combine the useful results.
162
- eve does not instruct the model to stay silent while sibling tasks are pending; a new user
163
- question can receive an answer while background work continues. [Completion batching](/docs/subagents#completion-batching)
164
- combines successful results already queued for the parent.
152
+ Channel sessions default to `taskDeliveryPolicy: "auto"`: ready results can invoke
153
+ the parent while other tasks continue. The parent reports independently useful
154
+ results and can stay silent until related work settles. Each reporting context
155
+ includes the whole cohort and available outputs, including previously withheld
156
+ results. Ready results may share a turn.
157
+ Schedules default to `"cohort"`: terminal outcomes wait for overlapping tasks
158
+ to settle, then arrive together. Pass `taskDeliveryPolicy` to `send(...)` to select
159
+ or update the session policy. See
160
+ [Background task results](/docs/channels/overview#background-task-results) and
161
+ [Schedules](/docs/schedules#background-task-results).
162
+ User questions, input requests, and explicit task messages do not wait for the
163
+ cohort under either policy. Failure and cancellation update lifecycle state
164
+ immediately; their automatic reports follow the selected policy.
165
+ See [Completion batching](/docs/subagents#completion-batching).
165
166
 
166
167
  ### Yield and return
167
168
 
@@ -169,19 +170,18 @@ combines successful results already queued for the parent.
169
170
  It does not by itself create a durable wait for a person, timer, or external event. The value's
170
171
  meaning depends on the tool's execution mode:
171
172
 
172
- | Executor | Ordinary `yield value` | Final output |
173
- | ------------------------------------------------ | --------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
174
- | `defineTool`, default execution | Earlier values are `action.partial` snapshots; the final yield becomes the tool result. | Last yielded value; a generator `return` value is ignored. |
175
- | `defineWorkflowTool`, default execution | Every yield is an `action.partial` snapshot. | Explicit return value; falls back to the last yield if the return is `null` or `undefined`, then to `null`. |
176
- | Either definition with `execution: "background"` | Stream-only task progress; does not request a parent-agent turn. | Explicit return value becomes the task output; no return completes with `null`. The last yield is not a fallback. |
173
+ | Executor | Ordinary `yield value` | Final output |
174
+ | --------------------------------------------------- | --------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
175
+ | `defineTool`, default execution | Earlier values are `action.partial` snapshots; the final yield becomes the tool result. | Last yielded value; a generator `return` value is ignored. |
176
+ | `defineWorkflowTool`, default execution | Every yield is an `action.partial` snapshot. | Explicit return value; falls back to the last yield if the return is `null` or `undefined`, then to `null`. |
177
+ | `defineWorkflowTool` with `execution: "background"` | Consumed without publishing progress or requesting a parent-agent turn. | Explicit return value becomes the task output; no return completes with `null`. The last yield is not a fallback. |
177
178
 
178
- For either kind of background tool, `yield task.postMessage(message)` sends a message to the
179
- parent agent while the task remains open. Return completes the task; throw fails it. These
180
- notifications are separate from the original tool call's receipt.
179
+ For a background workflow tool, return completes the task and throw fails it. The automatic
180
+ cohort report is separate from the original tool call's receipt.
181
181
 
182
182
  Progress snapshots do not enter model history as intermediate tool results. For a default
183
183
  executor, the final output selected by the rules above becomes the tool result. For a background
184
- executor, task messages and completion notifications provide input to later parent-agent turns.
184
+ executor, the terminal cohort report provides input to a later parent-agent turn.
185
185
 
186
186
  ### Workflows as tools
187
187
 
@@ -178,8 +178,7 @@ agent should receive a tool result:
178
178
 
179
179
  Use default execution when the model needs the answer to continue. Use background execution when
180
180
  the conversation should continue while the task is pending. Background tools need no root-agent
181
- flag. Ordinary `defineTool` also accepts `execution: "background"`, but its executor still runs
182
- inside the initiating step and cannot suspend at workflow waits. See the
181
+ flag. `defineTool` does not accept background execution. See the
183
182
  [tool execution comparison](/docs/tools#background-execution).
184
183
 
185
184
  ### How suspension works
@@ -429,23 +428,23 @@ This pattern controls specialist selection, not whether the parent model delegat
429
428
 
430
429
  ## Report progress: `yield`
431
430
 
432
- A workflow body may be an async generator. Ordinary yields report progress in both execution
433
- modes. After processing a yield, eve advances the generator; use an awaited workflow operation
431
+ A workflow body may be an async generator. In default execution, yields report progress.
432
+ Background execution consumes yielded values without publishing them or retaining a task-progress
433
+ stream. After processing a yield, eve advances the generator; use an awaited workflow operation
434
434
  when the body needs to suspend.
435
435
 
436
- | Operation | Default execution | `execution: "background"` |
437
- | --------------------------------- | ----------------------------------------------------------------- | ---------------------------------------------------------------------- |
438
- | `yield value` | Emits an `action.partial` snapshot for the pending tool call. | Emits stream-only task progress; does not request a parent-agent turn. |
439
- | `yield task.postMessage(message)` | Unavailable; there is no `task` argument. | Sends a message requesting a parent-agent turn; the task stays open. |
440
- | `return value` | Settles the tool call with its output. | Completes the task and delivers its output in a later notification. |
441
- | No return value | Uses the last yield as output, or `null` if there were no yields. | Completes with `null`; yielded progress is not the task output. |
436
+ | Operation | Default execution | `execution: "background"` |
437
+ | --------------- | ----------------------------------------------------------------- | --------------------------------------------------------------------------------- |
438
+ | `yield value` | Emits an `action.partial` snapshot for the pending tool call. | Consumes the value without publishing progress or requesting a parent-agent turn. |
439
+ | `return value` | Settles the tool call with its output. | Completes the task and contributes to its cohort's terminal report. |
440
+ | No return value | Uses the last yield as output, or `null` if there were no yields. | Completes with `null`; yielded progress is not the task output. |
442
441
 
443
442
  For default execution, an explicit `return null` also falls back to the last yield. Prefer an
444
443
  explicit object return when progress snapshots and the final result have different shapes.
445
444
  Progress snapshots are last-write-wins by tool call id and do not enter model history as
446
445
  intermediate tool results. A snapshot used as the final output does enter history as the tool result.
447
446
 
448
- This background workflow reports progress, sends the parent one message, and then suspends:
447
+ This background workflow consumes an intermediate yield, then suspends until its timer expires:
449
448
 
450
449
  ```ts title="agent/tools/remind_with_progress.ts"
451
450
  import { defineWorkflowTool } from "eve/tools";
@@ -453,25 +452,22 @@ import { sleep } from "workflow";
453
452
  import { z } from "zod";
454
453
 
455
454
  export default defineWorkflowTool({
456
- description: "Schedule a reminder and report progress before waiting.",
455
+ description: "Schedule a reminder.",
457
456
  inputSchema: z.object({ note: z.string(), delay: z.string() }),
458
457
  execution: "background",
459
- async *execute({ note, delay }, ctx, task) {
458
+ async *execute({ note, delay }) {
460
459
  "use workflow";
461
- yield { status: "preparing reminder" }; // Stream-only progress.
462
- yield task.postMessage(`Reminder scheduled for ${delay}.`); // Parent-agent message.
460
+ yield { status: "preparing reminder" }; // Consumed without publishing progress in background mode.
463
461
  await sleep(delay); // Durable suspension while the timer is pending.
464
462
  return { reminder: note }; // Task completion notification.
465
463
  },
466
464
  });
467
465
  ```
468
466
 
469
- Calling `task.postMessage` constructs a descriptor; yielding it sends the message. It does not
470
- wait for a reply. Use [`ctx.ask`](#ask-a-human-ctxask) when the workflow needs a human answer.
471
- Removing `execution: "background"` requires removing the `task` argument and message yield; the
472
- ordinary progress yield and `await sleep(delay)` still work, but the model waits for the final
473
- reminder as the tool result. See [yield and return](/docs/tools#yield-and-return) for the different
474
- final-output rules of ordinary `defineTool` generators.
467
+ Use [`ctx.ask`](#ask-a-human-ctxask) when the workflow needs a human answer. Removing
468
+ `execution: "background"` makes the yield visible as progress and keeps the durable sleep; the model
469
+ waits for the final reminder as the tool result. See [yield and return](/docs/tools#yield-and-return) for the
470
+ final-output rules.
475
471
 
476
472
  ## Cancel and clean up: `ctx.abortSignal`
477
473
 
@@ -497,6 +493,11 @@ as cancelled whether or not it did. A body parked on a hook or a `sleep` does no
497
493
  it is abandoned when the grace period ends. Steps that received the signal are how you clean up
498
494
  first.
499
495
 
496
+ The caller waits up to 35 seconds for a cooperatively cancelled run to settle before forcing it
497
+ to stop. This includes time for the run to publish its outcome after body cleanup. A background
498
+ task records its cancelled status before cleanup finishes, so that status alone does not mean
499
+ its work has stopped.
500
+
500
501
  ## Workflow tool examples
501
502
 
502
503
  ### Approve with a deadline and an escalation
@@ -607,8 +608,10 @@ it.
607
608
  ## Semantics
608
609
 
609
610
  One call, one result. A waiting tool's call resolves once, with the return value, the error, or a
610
- cancellation. A background tool's call resolves once, with the receipt; everything after arrives as
611
- separate session input.
611
+ cancellation. A background tool's call resolves once, with the receipt. Its terminal outcome arrives
612
+ in one automatic report after every task in its cohort is terminal. A cohort includes overlapping
613
+ background work in the same session, including tasks launched in later user turns while earlier
614
+ work remains open.
612
615
 
613
616
  While a waiting tool runs, the turn is parked. A `queue` message waits for it. A `steer` message
614
617
  cancels the turn, which cancels the run, which withdraws its requests. Input responses never steer.
@@ -616,8 +619,12 @@ cancels the turn, which cancels the run, which withdraws its requests. Input res
616
619
  Background runs belong to the session. They survive turn completion and cancellation, appear in the
617
620
  session's task index, can be cancelled with `task_cancel`, and are cancelled when the session ends.
618
621
 
622
+ The parent session records each background task's outcome when it processes the child's notification.
623
+ The first terminal outcome it records is final: a late child result cannot replace a recorded
624
+ cancellation. Task completion does not require the wrapper workflow to have exited.
625
+
619
626
  Errors follow the SDK. A thrown error in a step retries per the step's policy; `FatalError` does
620
- not. An error that escapes the body fails the run.
627
+ not. An error that escapes the body fails the tool invocation.
621
628
 
622
629
  Starting a waiting workflow tool can also be retried. If dispatch is interrupted after starting a
623
630
  run, its retry starts another run, and both may execute. The parent tracks the run returned by the
@@ -34,11 +34,10 @@ Python needs a sandbox that runs real binaries. For local development, start a D
34
34
  The default eve images for Docker, microsandbox, and Vercel Sandbox include Python, but not matplotlib. Add this definition alongside `workspace/` to install matplotlib in a virtual environment. It uses the same environment for installation and chart execution, without changing the system Python:
35
35
 
36
36
  ```ts title="agent/sandbox/sandbox.ts"
37
- import { defineSandbox } from "eve/sandbox";
37
+ import { DefaultSandbox, defineSandbox } from "eve/sandbox";
38
38
 
39
- export default defineSandbox({
40
- async bootstrap({ use }) {
41
- const sandbox = await use();
39
+ export const environment = DefaultSandbox.environment({
40
+ prepare: async (sandbox) => {
42
41
  const commands = [
43
42
  "sudo apt-get update && sudo apt-get install -y python3 python3-venv",
44
43
  "python3 -m venv /workspace/.venv",
@@ -55,9 +54,11 @@ export default defineSandbox({
55
54
  }
56
55
  },
57
56
  });
57
+
58
+ export default defineSandbox(() => environment.open());
58
59
  ```
59
60
 
60
- Bootstrap runs when eve builds the sandbox template, and sessions inherit the installed environment. The first build needs network access to Ubuntu package repositories and PyPI. Keep the default network policy while following this example; a custom `deny-all` or allow-list policy must permit these downloads during bootstrap. The same definition uses Vercel Sandbox after deployment to Vercel.
61
+ Preparation runs when eve builds the sandbox template, and sessions inherit the installed environment. The first build needs network access to Ubuntu package repositories and PyPI. Keep the default network policy while following this example; a custom `deny-all` or allow-list policy must permit these downloads during preparation. The same definition uses Vercel Sandbox after deployment to Vercel.
61
62
 
62
63
  Restart `npm run dev` after adding the definition. Before asking for a chart, send this message in the TUI:
63
64
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eve",
3
- "version": "0.62.0",
3
+ "version": "0.64.0",
4
4
  "private": false,
5
5
  "description": "Filesystem-first framework for durable backend AI agents that run anywhere.",
6
6
  "keywords": [
@@ -256,6 +256,11 @@
256
256
  "import": "./dist/src/public/sandbox/index.js",
257
257
  "default": "./dist/src/public/sandbox/index.js"
258
258
  },
259
+ "./sandbox/provider": {
260
+ "types": "./dist/src/public/sandbox/provider.d.ts",
261
+ "import": "./dist/src/public/sandbox/provider.js",
262
+ "default": "./dist/src/public/sandbox/provider.js"
263
+ },
259
264
  "./sandbox/docker": {
260
265
  "types": "./dist/src/public/sandbox/docker.d.ts",
261
266
  "import": "./dist/src/public/sandbox/docker.js",
@@ -471,9 +476,9 @@
471
476
  "@ai-sdk/otel": "^1.0.93",
472
477
  "@ai-sdk/provider": "^4.0.10",
473
478
  "@ai-sdk/provider-utils": "^5.0.36",
474
- "@chat-adapter/slack": "4.34.0",
475
- "@chat-adapter/state-memory": "4.34.0",
476
- "@chat-adapter/twilio": "4.34.0",
479
+ "@chat-adapter/slack": "4.41.0",
480
+ "@chat-adapter/state-memory": "4.41.0",
481
+ "@chat-adapter/twilio": "4.41.0",
477
482
  "@clack/core": "1.3.1",
478
483
  "@eve/catalog": "0.0.1",
479
484
  "@linqapp/chat-sdk-adapter": "^0.5.1",
@@ -496,16 +501,16 @@
496
501
  "@vercel/otel": "2.1.3",
497
502
  "@vercel/sandbox": "3.3.0",
498
503
  "@vercel/sdk": "1.28.8",
499
- "@workflow/builders": "5.0.0-beta.53",
500
- "@workflow/core": "5.0.0-beta.53",
501
- "@workflow/errors": "5.0.0-beta.21",
504
+ "@workflow/builders": "5.0.0-beta.55",
505
+ "@workflow/core": "5.0.0-beta.55",
506
+ "@workflow/errors": "5.0.0-beta.22",
502
507
  "@workflow/serde": "5.0.0-beta.2",
503
508
  "@workflow/utils": "5.0.0-beta.10",
504
- "@workflow/world": "5.0.0-beta.36",
505
- "@workflow/world-local": "5.0.0-beta.45",
506
- "@workflow/world-vercel": "5.0.0-beta.48",
509
+ "@workflow/world": "5.0.0-beta.37",
510
+ "@workflow/world-local": "5.0.0-beta.46",
511
+ "@workflow/world-vercel": "5.0.0-beta.50",
507
512
  "ai": "^7.0.105",
508
- "chat": "4.34.0",
513
+ "chat": "4.41.0",
509
514
  "chokidar": "5.0.0",
510
515
  "commander": "14.0.3",
511
516
  "dd-trace": "6.13.0",
@@ -539,6 +544,7 @@
539
544
  "@opentelemetry/api": "^1.0.0",
540
545
  "ai": "^7.0.105",
541
546
  "braintrust": "^3.0.0",
547
+ "chat": "^4.41.0",
542
548
  "dd-trace": "^6.13.0",
543
549
  "just-bash": "^3.1.0",
544
550
  "microsandbox": "^0.5.0"
@@ -550,6 +556,9 @@
550
556
  "braintrust": {
551
557
  "optional": true
552
558
  },
559
+ "chat": {
560
+ "optional": true
561
+ },
553
562
  "dd-trace": {
554
563
  "optional": true
555
564
  },
@@ -1,103 +0,0 @@
1
- import { type ReasoningLevel } from "#setup/boxes/model-capabilities.js";
2
- import type { GatewayModelCapabilities } from "#setup/boxes/model-capabilities.js";
3
- import { type SelectState } from "#setup/cli/select-state.js";
4
- import type { ModelSettingsRequest, ModelSettingsResult } from "#setup/flows/model.js";
5
- import type { SelectOption } from "#setup/prompter.js";
6
- /** The Change-model menu's rows, in visual order. */
7
- export type ModelEditorRowId = "model" | "reasoning" | "tier" | "done";
8
- /**
9
- * The screen stack, depth two: the value menu, or the model list it opens.
10
- * Reasoning and tier adjust inline on their menu rows — only the catalog pick
11
- * warrants its own screen. The list carries scratch select state seeded when
12
- * opened; Esc drops it, so "returns unchanged" is structural.
13
- */
14
- export type ModelEditorScreen = {
15
- kind: "menu";
16
- cursor: ModelEditorRowId;
17
- } | {
18
- kind: "model";
19
- select: SelectState;
20
- };
21
- /** The in-progress values; a completed selection is applied immediately. */
22
- export interface ModelEditorDraft {
23
- modelId: string | null;
24
- reasoning: "default" | ReasoningLevel;
25
- tier: "standard" | "priority";
26
- }
27
- /** One Change-model interaction, advanced by {@link transitionModelEditor}. */
28
- export interface ModelEditorState {
29
- screen: ModelEditorScreen;
30
- draft: ModelEditorDraft;
31
- /** Catalog capabilities for `draft.modelId`; recomputed on every pick. */
32
- capabilities: GatewayModelCapabilities | undefined;
33
- }
34
- /** Semantic input after terminal-key decoding. */
35
- export type ModelEditorEvent = {
36
- type: "move";
37
- direction: "up" | "down";
38
- } | {
39
- type: "adjust";
40
- direction: "left" | "right";
41
- } | {
42
- type: "char";
43
- char: string;
44
- } | {
45
- type: "backspace";
46
- } | {
47
- type: "cancel";
48
- } | {
49
- type: "submit";
50
- };
51
- export type ModelEditorTransition = {
52
- kind: "ignore";
53
- state: ModelEditorState;
54
- } | {
55
- kind: "render";
56
- state: ModelEditorState;
57
- } | {
58
- kind: "cancel";
59
- } | {
60
- kind: "settle";
61
- result: ModelSettingsResult;
62
- };
63
- /**
64
- * How a value row presents: an adjustable control, a dim explanatory line the
65
- * cursor skips, or nothing at all — a control that cannot apply to the
66
- * drafted model (no priority tier) is noise, while an authored-but-unowned
67
- * state (custom tier, external provider) still explains itself.
68
- */
69
- export type ModelEditorSectionView = {
70
- kind: "interactive";
71
- } | {
72
- kind: "static";
73
- text: string;
74
- } | {
75
- kind: "hidden";
76
- };
77
- /**
78
- * The reasoning row stays interactive while a level is drafted even when the
79
- * catalog disowns reasoning, so the authored value at least stays visible.
80
- */
81
- export declare function reasoningSectionView(request: ModelSettingsRequest, draft: ModelEditorDraft, capabilities: GatewayModelCapabilities | undefined): ModelEditorSectionView;
82
- /** The tier row's presentation; static or hidden for every state it cannot own. */
83
- export declare function tierSectionView(request: ModelSettingsRequest, capabilities: GatewayModelCapabilities | undefined): ModelEditorSectionView;
84
- /**
85
- * The track's notch positions: the levels the catalog supports (every level
86
- * when capabilities are unknown). The provider default is not a notch — an
87
- * unset draft renders an empty track and the first right-adjust enters the
88
- * scale at the lowest level. A drafted level the catalog does not list is
89
- * inserted in canonical level order, so the track never hides the value it
90
- * is about to replace.
91
- */
92
- export declare function reasoningPositions(capabilities: GatewayModelCapabilities | undefined, drafted: "default" | ReasoningLevel): readonly ReasoningLevel[];
93
- /**
94
- * The value menu's rows, derived fresh from the draft on every transition and
95
- * paint: interactive sections are pickable rows, static sections are disabled
96
- * rows carrying their explanation, and a hidden tier is omitted entirely.
97
- * Value hints are the painter's job — it styles them with theme glyphs.
98
- */
99
- export declare function modelEditorMenuRows(request: ModelSettingsRequest, draft: ModelEditorDraft, capabilities: GatewayModelCapabilities | undefined): SelectOption<ModelEditorRowId>[];
100
- /** Creates the screen's state; the cursor opens on the first pickable row. */
101
- export declare function initialModelEditorState(request: ModelSettingsRequest): ModelEditorState;
102
- /** Applies one keypress worth of semantics; terminal resources stay in the renderer. */
103
- export declare function transitionModelEditor(state: ModelEditorState, event: ModelEditorEvent, request: ModelSettingsRequest): ModelEditorTransition;
@@ -1 +0,0 @@
1
- import{ALL_REASONING_LEVELS}from"#setup/boxes/model-capabilities.js";import{filterOptions,initialSelectState,reduceSelect,selectValueAtCursor}from"#setup/cli/select-state.js";const NOT_EDITABLE_TEXT=`No editable agent.ts config object is available`;function reasoningSectionView(e,t,n){return e.settingsEditable?n?.reasoning===!1&&t.reasoning==="default"?{kind:`static`,text:`Not supported by the selected model`}:{kind:`interactive`}:{kind:`static`,text:NOT_EDITABLE_TEXT}}function tierSectionView(e,t){return e.settingsEditable?e.externalRouting?{kind:`static`,text:`Disabled for a direct external provider`}:e.serviceTier.kind===`custom`?{kind:`static`,text:`Custom (${e.serviceTier.value}) — authored in agent.ts`}:t!==void 0&&!t.fastMode?{kind:`hidden`}:{kind:`interactive`}:{kind:`static`,text:NOT_EDITABLE_TEXT}}function reasoningPositions(e,t){let n=[...e===void 0?ALL_REASONING_LEVELS:e.reasoningLevels];if(t!=="default"&&!n.includes(t)){let e=ALL_REASONING_LEVELS.indexOf(t),r=n.findIndex(t=>ALL_REASONING_LEVELS.indexOf(t)>e);r===-1?n.push(t):n.splice(r,0,t)}return n}function snapReasoningToCapabilities(e,t){if(e==="default"||t===void 0)return e;let n=t.reasoningLevels;if(!t.reasoning||n.length===0)return`default`;if(n.includes(e))return e;let r=ALL_REASONING_LEVELS.indexOf(e),i=n[0];for(let e of n)Math.abs(ALL_REASONING_LEVELS.indexOf(e)-r)<Math.abs(ALL_REASONING_LEVELS.indexOf(i)-r)&&(i=e);return i}function modelEditorMenuRows(e,t,n){let r=[];e.model.kind===`pick`?r.push({value:`model`,label:`Model`}):r.push({value:`model`,label:`Model`,disabled:!0,description:e.model.reason});let i=reasoningSectionView(e,t,n);i.kind===`static`?r.push({value:`reasoning`,label:`Reasoning effort`,disabled:!0,description:i.text}):r.push({value:`reasoning`,label:`Reasoning effort`});let a=tierSectionView(e,n);return a.kind===`interactive`?r.push({value:`tier`,label:`Service tier`}):a.kind===`static`&&r.push({value:`tier`,label:`Service tier`,disabled:!0,description:a.text}),r}function initialModelEditorState(e){let t={modelId:e.model.current,reasoning:e.reasoning??`default`,tier:e.serviceTier.kind===`priority`?`priority`:`standard`},n=e.capabilitiesFor(t.modelId);return{screen:{kind:`menu`,cursor:modelEditorMenuRows(e,t,n).find(e=>e.disabled!==!0)?.value??`done`},draft:t,capabilities:n}}function expandedModelSelect(e,t){let n={options:e.model.kind===`pick`?e.model.options:[]};return t!==null&&(n.defaultValue=t),initialSelectState(n)}function ignore(e){return{kind:`ignore`,state:e}}function toMenu(e,t){return{kind:`render`,state:{...e,screen:{kind:`menu`,cursor:t}}}}function settleResult(e,t){let n={};if(e.model.kind===`pick`&&t.modelId!==null&&t.modelId!==e.model.current&&(n.model=t.modelId),!e.settingsEditable)return n;t.reasoning!==(e.reasoning??`default`)&&(n.reasoning=t.reasoning);let r=!e.externalRouting&&e.serviceTier.kind!==`custom`,i=e.serviceTier.kind===`priority`?`priority`:`standard`;return r&&t.tier!==i&&(n.serviceTier=t.tier),n}function adjustMenuValue(e,t,n,r){let i=r===`left`?-1:1;if(n===`reasoning`){if(reasoningSectionView(t,e.draft,e.capabilities).kind!==`interactive`)return ignore(e);let n=reasoningPositions(e.capabilities,e.draft.reasoning);if(n.length===0)return ignore(e);let r=e.draft.reasoning==="default"?-1:n.indexOf(e.draft.reasoning),a=r===-1?n[i===1?0:n.length-1]:n[(r+i+n.length)%n.length];return a===e.draft.reasoning?ignore(e):{kind:`render`,state:{...e,draft:{...e.draft,reasoning:a}}}}if(n===`tier`){if(tierSectionView(t,e.capabilities).kind!==`interactive`)return ignore(e);let n=e.draft.tier===`priority`?`standard`:`priority`;return{kind:`render`,state:{...e,draft:{...e.draft,tier:n}}}}return ignore(e)}function transitionMenu(e,t,n,r){let i=modelEditorMenuRows(n,e.draft,e.capabilities);switch(t.type){case`cancel`:return{kind:`cancel`};case`move`:{let n=Math.max(0,i.findIndex(e=>e.value===r)),a=i[reduceSelect({filter:``,cursor:n,selected:new Set},{type:t.direction},{options:i}).cursor]?.value;return a===void 0||a===r?ignore(e):toMenu(e,a)}case`adjust`:return adjustMenuValue(e,n,r,t.direction);case`submit`:{let t=i.find(e=>e.value===r);return t===void 0||t.disabled===!0?ignore(e):r===`model`?{kind:`render`,state:{...e,screen:{kind:`model`,select:expandedModelSelect(n,e.draft.modelId)}}}:{kind:`settle`,result:settleResult(n,e.draft)}}case`char`:case`backspace`:return ignore(e)}}function transitionModelScreen(e,t,n,r){let i=n.model.kind===`pick`?n.model.options:[],renderSelect=t=>t===r?ignore(e):{kind:`render`,state:{...e,screen:{kind:`model`,select:t}}};switch(t.type){case`cancel`:return r.filter.length>0?renderSelect(reduceSelect(r,{type:`clear`},{options:i})):toMenu(e,`model`);case`move`:return renderSelect(reduceSelect(r,{type:t.direction},{options:i}));case`char`:return renderSelect(reduceSelect(r,{type:`char`,char:t.char},{options:i}));case`backspace`:return renderSelect(reduceSelect(r,{type:`backspace`},{options:i}));case`submit`:{let t=filterOptions(i,r.filter),a=selectValueAtCursor(t,r.cursor);if(a===void 0)return ignore(e);let o=n.capabilitiesFor(a);return{kind:`settle`,result:settleResult(n,{...e.draft,modelId:a,reasoning:snapReasoningToCapabilities(e.draft.reasoning,o),tier:o!==void 0&&!o.fastMode?`standard`:e.draft.tier})}}case`adjust`:return ignore(e)}}function transitionModelEditor(e,t,n){switch(e.screen.kind){case`menu`:return transitionMenu(e,t,n,e.screen.cursor);case`model`:return transitionModelScreen(e,t,n,e.screen.select)}}export{initialModelEditorState,modelEditorMenuRows,reasoningPositions,reasoningSectionView,tierSectionView,transitionModelEditor};
@@ -1 +0,0 @@
1
- var e=class extends Error{body;status;constructor(e,t){super(e),this.name=`TwilioApiError`,this.body=t.body,this.status=t.status}},t=`https://api.twilio.com`;async function n(t,n){let r=t??process.env[n];if(!r)throw new e(`${n} is required`,{body:null,status:0});return typeof r==`function`?await r():r}async function r(r,i={}){let a=typeof r==`string`?{...i,path:r}:r,o=await n(a.credentials?.accountSid,`TWILIO_ACCOUNT_SID`),s=await n(a.credentials?.authToken,`TWILIO_AUTH_TOKEN`),c=new URL(a.path,a.apiUrl??a.apiBaseUrl??t);for(let[e,t]of d(a.search)??[])c.searchParams.append(e,t);let l=d(a.body),u=await(a.fetch??fetch)(c,{body:l,headers:{authorization:f(o,s),...l?{"content-type":`application/x-www-form-urlencoded;charset=UTF-8`}:{}},method:a.method??`POST`}),p=await m(u);if(!u.ok)throw new e(`Twilio API returned HTTP ${u.status}`,{body:p,status:u.status});return{body:p,ok:u.ok,status:u.status}}async function i(e){let t=await n(e.credentials?.accountSid,`TWILIO_ACCOUNT_SID`),i=p(e.mediaUrl);if(!e.body&&i.length===0)throw TypeError(`body or mediaUrl is required`);if(!(e.from||e.messagingServiceSid))throw TypeError(`from or messagingServiceSid is required`);let a=u({Body:e.body,From:e.from,MediaUrl:i,MessagingServiceSid:e.messagingServiceSid,StatusCallback:e.statusCallbackUrl,To:e.to});return(await r(`/2010-04-01/Accounts/${encodeURIComponent(t)}/Messages.json`,{...e,body:a})).body}async function a(e){let t=await n(e.credentials?.accountSid,`TWILIO_ACCOUNT_SID`);return(await r(`/2010-04-01/Accounts/${encodeURIComponent(t)}/Messages/${encodeURIComponent(e.messageSid)}.json`,{...e,method:`GET`})).body}async function o(e){let t=await n(e.credentials?.accountSid,`TWILIO_ACCOUNT_SID`);await r(`/2010-04-01/Accounts/${encodeURIComponent(t)}/Messages/${encodeURIComponent(e.messageSid)}.json`,{...e,method:`DELETE`})}async function s(e){let t=await n(e.credentials?.accountSid,`TWILIO_ACCOUNT_SID`);if(!(e.twiml||e.url||e.status))throw TypeError(`twiml, url, or status is required`);if(e.twiml&&e.url)throw TypeError(`twiml and url are mutually exclusive`);let i=u({Method:e.method,Status:e.status,Twiml:e.twiml,Url:e.url});return(await r(`/2010-04-01/Accounts/${encodeURIComponent(t)}/Calls/${encodeURIComponent(e.callSid)}.json`,{...e,body:i})).body}async function c(t){let r=await n(t.credentials?.accountSid,`TWILIO_ACCOUNT_SID`),i=await n(t.credentials?.authToken,`TWILIO_AUTH_TOKEN`),a=await(t.fetch??fetch)(t.url,{headers:{authorization:f(r,i)},method:`GET`});if(!a.ok)throw new e(`Twilio API returned HTTP ${a.status}`,{body:await m(a),status:a.status});return a.arrayBuffer()}async function l(e={}){let t=await n(e.credentials?.accountSid,`TWILIO_ACCOUNT_SID`),i=u({From:e.from,PageSize:e.pageSize,To:e.to});return((await r(`/2010-04-01/Accounts/${encodeURIComponent(t)}/Messages.json`,{...e,method:`GET`,search:i})).body.messages??[]).slice(0,e.limit)}function u(e){let t=new URLSearchParams;for(let[n,r]of Object.entries(e))if(r!=null){if(Array.isArray(r)){for(let e of r)t.append(n,e);continue}t.set(n,String(r))}return t}function d(e){if(e!==void 0)return e instanceof URLSearchParams?e:u(e)}function f(e,t){return`Basic ${btoa(`${e}:${t}`)}`}function p(e){return e===void 0?[]:typeof e==`string`?[e]:[...e]}async function m(e){let t=await e.text();if(!t)return null;try{return JSON.parse(t)}catch{return t}}export{c as a,n as c,u as i,i as l,r as n,a as o,o as r,l as s,e as t,s as u};
@@ -1 +0,0 @@
1
- var e=/[<>|]/,t=/[\^|>]/,n=/^[A-Z0-9_]+$/,r=/(?<![<\w])@([A-Z][A-Z0-9_]+)/g,i=3e3;function a(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`)}function o(e){return e.replace(/&lt;/g,`<`).replace(/&gt;/g,`>`).replace(/&amp;/g,`&`)}function s(e,t={}){return v(e),{...t.emoji===void 0?{}:{emoji:t.emoji},text:e,type:`plain_text`}}function c(e,t={}){return v(e),{text:e,type:`mrkdwn`,...t.verbatim===void 0?{}:{verbatim:t.verbatim}}}function l(e){return y(e,`userId`),`<@${e}>`}function u(e){return y(e,`channelId`),`<#${e}>`}function d(e){return y(e,`userGroupId`),`<!subteam^${e}>`}function f(e){return`<!${e}>`}function p(e,t){return b(e,`url`),t?`<${e}|${a(t)}>`:`<${e}>`}function m(e,t,n,r={}){x(t,`token`);let i=e instanceof Date?Math.floor(e.getTime()/1e3):e;if(!Number.isInteger(i))throw TypeError(`timestamp must be an integer unix timestamp or Date`);return`<!date^${i}^${t}${r.link?`^${S(r.link)}`:``}|${a(n)}>`}function h(e){let t=e;return t=t.replace(/<@([A-Z0-9_]+)\|([^<>]+)>/g,`@$2`),t=t.replace(/<@([A-Z0-9_]+)>/g,`@$1`),t=t.replace(/<#[A-Z0-9_]+\|([^<>]+)>/g,`#$1`),t=t.replace(/<#([A-Z0-9_]+)>/g,`#$1`),t=t.replace(/<(https?:\/\/[^|<>]+)\|([^<>]+)>/g,`[$2]($1)`),t=t.replace(/<(https?:\/\/[^<>]+)>/g,`$1`),t=t.replace(/(?<![_*\\])\*([^*\n]+)\*(?![_*])/g,`**$1**`),t=t.replace(/(?<!~)~([^~\n]+)~(?!~)/g,`~~$1~~`),o(t)}function g(e){return e.replace(/\*\*(.+?)\*\*/g,`*$1*`)}function _(e){return e.replace(r,`<@$1>`)}function v(e){if(e.length<1||e.length>i)throw TypeError(`text must be between 1 and ${i} characters`)}function y(e,t){if(!n.test(e))throw TypeError(`${t} must be a Slack ID`)}function b(t,n){if(e.test(t))throw TypeError(`${n} cannot contain Slack control characters`)}function x(e,n){if(t.test(e))throw TypeError(`${n} cannot contain Slack date control characters`)}function S(e){return x(e,`link`),e}export{m as a,l as c,g as d,h as f,u as i,d as l,s as n,p as o,o as p,a as r,f as s,c as t,_ as u};
@@ -1 +0,0 @@
1
- import{c as e}from"./chunk-5OX2R7AJ-CxVV-owP.js";function t(e){let t=r(e,`MessageStatus`)??r(e,`SmsStatus`),i=r(e,`Body`),a=r(e,`From`),o=r(e,`To`),s=r(e,`MessageSid`)??r(e,`SmsMessageSid`);return t&&!i?{accountSid:r(e,`AccountSid`),from:a,kind:`status`,messageSid:s,messageStatus:t,raw:e,to:o}:a&&o&&(i!==void 0||Number(r(e,`NumMedia`)??0)>0)?{accountSid:r(e,`AccountSid`),body:i??``,from:a,kind:`text`,media:n(e),messageSid:s,raw:e,to:o}:{kind:`unsupported`,raw:e}}function n(e){let t=Number(r(e,`NumMedia`)??0),n=[];for(let i=0;i<t;i++){let t=r(e,`MediaUrl${i}`);t&&n.push({contentType:r(e,`MediaContentType${i}`),url:t})}return n}function r(e,t){let n=e.get(t);return n===null||n.length===0?void 0:n}var i=class extends Error{constructor(e){super(e),this.name=`TwilioWebhookError`}},a=class extends i{constructor(e){super(e),this.name=`TwilioWebhookParseError`}},o=class extends i{constructor(e){super(e),this.name=`TwilioWebhookVerificationError`}};async function s(t,n={}){let r=await t.text();if(n.webhookVerifier){let e=await n.webhookVerifier(t,r);if(!e)throw new o(`Twilio webhook verifier rejected the request`);return{body:typeof e==`string`?e:r,params:d(t,typeof e==`string`?e:r)}}let i=t.headers.get(`x-twilio-signature`);if(!i)throw new o(`Twilio signature header is required`);let a=await e(n.authToken,`TWILIO_AUTH_TOKEN`),s=await u(t,n.webhookUrl),l=d(t,r);if(!p(await c({authToken:a,params:t.method.toUpperCase()===`GET`?null:l,url:s}),i))throw new o(`Twilio signature is invalid`);return{body:r,params:l}}async function c(e){let t=await crypto.subtle.importKey(`raw`,new TextEncoder().encode(e.authToken),{hash:`SHA-1`,name:`HMAC`},!1,[`sign`]);return f(await crypto.subtle.sign(`HMAC`,t,new TextEncoder().encode(l(e.url,e.params))))}function l(e,t){if(!t)return e;let n=e,r=new Map;for(let[e,n]of t){let t=r.get(e)??new Set;t.add(n),r.set(e,t)}for(let e of[...r.keys()].sort())for(let t of[...r.get(e)??[]].sort())n+=`${e}${t}`;return n}async function u(e,t){return typeof t==`function`?t(e):t??e.url}function d(e,t){return e.method.toUpperCase()===`GET`?new URL(e.url).searchParams:new URLSearchParams(t)}function f(e){let t=``,n=new Uint8Array(e);for(let e of n)t+=String.fromCharCode(e);return btoa(t)}function p(e,t){let n=Math.abs(e.length-t.length),r=Math.max(e.length,t.length);for(let i=0;i<r;i++){let r=e.charCodeAt(i)||0,a=t.charCodeAt(i)||0;n+=Number(r!==a)}return n===0}async function m(e,n={}){return t((await s(e,n)).params)}export{m as a,l as c,t as i,s as l,a as n,u as o,o as r,c as s,i as t};