eve 0.47.6 → 0.48.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 (400) hide show
  1. package/CHANGELOG.md +54 -0
  2. package/dist/src/channel/adapter.js +1 -1
  3. package/dist/src/channel/delivery-metadata.d.ts +1 -0
  4. package/dist/src/channel/delivery-metadata.js +1 -1
  5. package/dist/src/channel/session.js +1 -1
  6. package/dist/src/channel/types.d.ts +10 -8
  7. package/dist/src/chunks/{use-eve-agent-DkUB0Ok4.js → use-eve-agent-BZnOzAVd.js} +25 -6
  8. package/dist/src/chunks/{use-eve-agent-DjYwFJF7.js → use-eve-agent-Bgp6INfi.js} +25 -6
  9. package/dist/src/cli/commands/init.js +1 -1
  10. package/dist/src/cli/commands/integration-connect.d.ts +2 -1
  11. package/dist/src/cli/commands/integration-connect.js +1 -1
  12. package/dist/src/cli/commands/register-integration-commands.d.ts +3 -1
  13. package/dist/src/cli/commands/register-integration-commands.js +1 -1
  14. package/dist/src/cli/commands/registry-declared-setups.js +1 -1
  15. package/dist/src/cli/commands/registry-install-transaction.d.ts +23 -0
  16. package/dist/src/cli/commands/registry-install-transaction.js +1 -0
  17. package/dist/src/cli/commands/registry-package.js +1 -1
  18. package/dist/src/cli/commands/registry.js +1 -1
  19. package/dist/src/cli/commands/setup-headless.d.ts +6 -0
  20. package/dist/src/cli/commands/setup-headless.js +1 -1
  21. package/dist/src/cli/dev/command-options.d.ts +2 -0
  22. package/dist/src/cli/dev/run-interactive-ui.js +1 -1
  23. package/dist/src/cli/dev/tui/blocks.js +1 -1
  24. package/dist/src/cli/dev/tui/line-editor.d.ts +4 -0
  25. package/dist/src/cli/dev/tui/line-editor.js +3 -3
  26. package/dist/src/cli/dev/tui/prompt-command-handler.js +1 -1
  27. package/dist/src/cli/dev/tui/registry-result-message.d.ts +17 -0
  28. package/dist/src/cli/dev/tui/registry-result-message.js +3 -0
  29. package/dist/src/cli/dev/tui/runner.d.ts +13 -4
  30. package/dist/src/cli/dev/tui/runner.js +1 -1
  31. package/dist/src/cli/dev/tui/setup-commands.d.ts +9 -3
  32. package/dist/src/cli/dev/tui/setup-commands.js +2 -3
  33. package/dist/src/cli/dev/tui/setup-flow.d.ts +15 -5
  34. package/dist/src/cli/dev/tui/setup-panel.d.ts +6 -1
  35. package/dist/src/cli/dev/tui/setup-panel.js +4 -4
  36. package/dist/src/cli/dev/tui/setup-selection-input.d.ts +1 -0
  37. package/dist/src/cli/dev/tui/setup-selection-input.js +1 -1
  38. package/dist/src/cli/dev/tui/stream-format.d.ts +8 -0
  39. package/dist/src/cli/dev/tui/stream-format.js +2 -2
  40. package/dist/src/cli/dev/tui/subagent-pump.d.ts +3 -0
  41. package/dist/src/cli/dev/tui/subagent-pump.js +1 -1
  42. package/dist/src/cli/dev/tui/terminal-renderer.js +12 -12
  43. package/dist/src/cli/dev/tui/tui-prompter.js +1 -1
  44. package/dist/src/cli/dev/tui/tui.d.ts +3 -4
  45. package/dist/src/cli/dev/tui/tui.js +1 -1
  46. package/dist/src/cli/run.js +2 -2
  47. package/dist/src/client/agent-info-schema.d.ts +1 -1
  48. package/dist/src/client/agent-info-schema.js +1 -1
  49. package/dist/src/client/open-stream.d.ts +1 -0
  50. package/dist/src/client/open-stream.js +1 -1
  51. package/dist/src/client/session.js +1 -1
  52. package/dist/src/compiled/.vendor-stamp.json +2 -1
  53. package/dist/src/compiled/@opentelemetry/api/index.d.ts +6 -0
  54. package/dist/src/compiled/@workflow/builders/LICENSE.md +201 -0
  55. package/dist/src/compiled/@workflow/builders/index.d.ts +62 -0
  56. package/dist/src/compiled/@workflow/builders/index.js +1 -0
  57. package/dist/src/compiler/extension-compatibility.d.ts +2 -2
  58. package/dist/src/compiler/extension-compatibility.js +1 -1
  59. package/dist/src/compiler/manifest.d.ts +7 -17
  60. package/dist/src/compiler/manifest.js +1 -1
  61. package/dist/src/compiler/normalize-manifest.js +1 -1
  62. package/dist/src/compiler/normalize-tool.d.ts +0 -1
  63. package/dist/src/compiler/normalize-tool.js +1 -1
  64. package/dist/src/context/build-dynamic-tools.d.ts +2 -2
  65. package/dist/src/context/build-dynamic-tools.js +1 -1
  66. package/dist/src/context/container.d.ts +7 -0
  67. package/dist/src/context/container.js +1 -1
  68. package/dist/src/context/dynamic-tool-lifecycle.d.ts +16 -9
  69. package/dist/src/context/dynamic-tool-lifecycle.js +1 -1
  70. package/dist/src/context/dynamic-tool-metadata.d.ts +44 -0
  71. package/dist/src/context/dynamic-tool-metadata.js +1 -0
  72. package/dist/src/context/keys.d.ts +14 -22
  73. package/dist/src/context/keys.js +1 -1
  74. package/dist/src/eve-channel/index.js +1 -1
  75. package/dist/src/eve-channel/request.d.ts +0 -1
  76. package/dist/src/eve-channel/request.js +2 -2
  77. package/dist/src/eve-channel/types.d.ts +7 -7
  78. package/dist/src/execution/accepted-delivery-deployment.d.ts +7 -0
  79. package/dist/src/execution/accepted-delivery-deployment.js +1 -0
  80. package/dist/src/execution/cancel-descendant-turns-step.d.ts +4 -1
  81. package/dist/src/execution/cancel-descendant-turns-step.js +1 -1
  82. package/dist/src/execution/create-session-step.js +1 -1
  83. package/dist/src/execution/delegation-tool.d.ts +1 -2
  84. package/dist/src/execution/delegation-tool.js +1 -1
  85. package/dist/src/execution/dispatch-runtime-actions-shared.d.ts +14 -4
  86. package/dist/src/execution/dispatch-runtime-actions-shared.js +1 -1
  87. package/dist/src/execution/dispatch-runtime-actions-step.js +1 -1
  88. package/dist/src/execution/dispatch-turn-step.js +1 -1
  89. package/dist/src/execution/dispatch-workflow-runtime-actions-step.js +1 -1
  90. package/dist/src/execution/durable-session-migrations/turn-workflow-v1-to-v2.d.ts +2 -0
  91. package/dist/src/execution/durable-session-migrations/turn-workflow-v1-to-v2.js +1 -0
  92. package/dist/src/execution/durable-session-migrations/turn-workflow.d.ts +25 -3
  93. package/dist/src/execution/durable-session-migrations/turn-workflow.js +1 -1
  94. package/dist/src/execution/eve-workflow-attributes.js +1 -1
  95. package/dist/src/execution/finalize-terminal-session.d.ts +17 -0
  96. package/dist/src/execution/finalize-terminal-session.js +1 -0
  97. package/dist/src/execution/inline-turn.d.ts +29 -0
  98. package/dist/src/execution/inline-turn.js +1 -0
  99. package/dist/src/execution/next-driver-action.d.ts +4 -0
  100. package/dist/src/execution/node-step.js +1 -1
  101. package/dist/src/execution/parked-delivery-wait.js +1 -1
  102. package/dist/src/execution/pending-turn-state.d.ts +1 -0
  103. package/dist/src/execution/pending-turn-state.js +1 -1
  104. package/dist/src/execution/prepared-agent-action.d.ts +7 -0
  105. package/dist/src/execution/prepared-agent-action.js +1 -0
  106. package/dist/src/execution/proxied-deliver-step.js +1 -1
  107. package/dist/src/execution/remote-agent-dispatch.d.ts +2 -0
  108. package/dist/src/execution/remote-agent-dispatch.js +1 -1
  109. package/dist/src/execution/session-command-token.d.ts +2 -0
  110. package/dist/src/execution/session-command-token.js +1 -1
  111. package/dist/src/execution/settle-cancelled-turn-step.js +1 -1
  112. package/dist/src/execution/stable-workflow-names.d.ts +12 -0
  113. package/dist/src/execution/stable-workflow-names.js +1 -0
  114. package/dist/src/execution/subagent-event-proxy-step.d.ts +3 -0
  115. package/dist/src/execution/subagent-event-proxy-step.js +1 -1
  116. package/dist/src/execution/subagent-hitl-proxy.d.ts +2 -1
  117. package/dist/src/execution/subagent-hitl-proxy.js +1 -1
  118. package/dist/src/execution/subagent-start-local.d.ts +3 -0
  119. package/dist/src/execution/subagent-start-local.js +1 -1
  120. package/dist/src/execution/subagent-start-remote.d.ts +2 -0
  121. package/dist/src/execution/subagent-start-remote.js +1 -1
  122. package/dist/src/execution/subagent-tool.d.ts +1 -0
  123. package/dist/src/execution/subagent-tool.js +1 -1
  124. package/dist/src/execution/tasks/child/steps.d.ts +2 -0
  125. package/dist/src/execution/tasks/child/steps.js +1 -1
  126. package/dist/src/execution/tasks/child/update.d.ts +3 -2
  127. package/dist/src/execution/tasks/child/workflow.js +1 -1
  128. package/dist/src/execution/tasks/parent/control-shared.d.ts +5 -4
  129. package/dist/src/execution/tasks/parent/dispatch-task-step.js +1 -1
  130. package/dist/src/execution/tasks/parent/dispatch.d.ts +4 -3
  131. package/dist/src/execution/tasks/parent/dispatch.js +1 -1
  132. package/dist/src/execution/tasks/parent/hitl-proxy-steps.js +1 -1
  133. package/dist/src/execution/tasks/parent/tool-execution.js +1 -1
  134. package/dist/src/execution/terminal-session-completion-step.js +1 -1
  135. package/dist/src/execution/terminal-session-event.d.ts +13 -0
  136. package/dist/src/execution/terminal-session-event.js +1 -0
  137. package/dist/src/execution/terminal-session-failure-step.d.ts +1 -0
  138. package/dist/src/execution/terminal-session-failure-step.js +1 -1
  139. package/dist/src/execution/tool-run/answer.d.ts +3 -0
  140. package/dist/src/execution/tool-run/answer.js +1 -0
  141. package/dist/src/execution/tool-run/background.d.ts +14 -0
  142. package/dist/src/execution/tool-run/background.js +1 -0
  143. package/dist/src/execution/tool-run/cancel.d.ts +7 -0
  144. package/dist/src/execution/tool-run/cancel.js +1 -0
  145. package/dist/src/execution/tool-run/dispatch.d.ts +24 -0
  146. package/dist/src/execution/tool-run/dispatch.js +1 -0
  147. package/dist/src/execution/tool-run/emit-run-report-step.d.ts +7 -0
  148. package/dist/src/execution/tool-run/emit-run-report-step.js +1 -0
  149. package/dist/src/execution/tool-run/messages.d.ts +70 -0
  150. package/dist/src/execution/tool-run/messages.js +1 -0
  151. package/dist/src/execution/tool-run/owner-channels.d.ts +29 -0
  152. package/dist/src/execution/tool-run/owner-channels.js +1 -0
  153. package/dist/src/execution/tool-run/owner-inbox.d.ts +11 -0
  154. package/dist/src/execution/tool-run/owner-inbox.js +1 -0
  155. package/dist/src/execution/tool-run/owner.d.ts +13 -0
  156. package/dist/src/execution/tool-run/owner.js +1 -0
  157. package/dist/src/execution/tool-run/resume-hook-step.d.ts +4 -0
  158. package/dist/src/execution/tool-run/resume-hook-step.js +1 -0
  159. package/dist/src/execution/tool-run/run-control.d.ts +18 -0
  160. package/dist/src/execution/tool-run/run-control.js +1 -0
  161. package/dist/src/execution/tool-run/start.d.ts +11 -0
  162. package/dist/src/execution/tool-run/start.js +1 -0
  163. package/dist/src/execution/tool-run/types.d.ts +21 -0
  164. package/dist/src/execution/tool-run/types.js +1 -0
  165. package/dist/src/execution/tool-run/workflow.d.ts +9 -0
  166. package/dist/src/execution/tool-run/workflow.js +1 -0
  167. package/dist/src/execution/tools/subagent/local.d.ts +3 -4
  168. package/dist/src/execution/tools/subagent/local.js +1 -1
  169. package/dist/src/execution/tools/subagent/remote.d.ts +4 -1
  170. package/dist/src/execution/tools/subagent/remote.js +1 -1
  171. package/dist/src/execution/turn-cancellation-control.d.ts +2 -0
  172. package/dist/src/execution/turn-cancellation-control.js +1 -1
  173. package/dist/src/execution/turn-control-receiver.js +1 -1
  174. package/dist/src/execution/turn-dispatch.d.ts +4 -2
  175. package/dist/src/execution/turn-dispatch.js +1 -1
  176. package/dist/src/execution/turn-execution-cursor.js +1 -1
  177. package/dist/src/execution/turn-workflow.js +1 -1
  178. package/dist/src/execution/wire/session-inbox-contract.d.ts +2 -2
  179. package/dist/src/execution/wire/session-inbox-contract.js +1 -1
  180. package/dist/src/execution/wire/session-inbox-encoder.d.ts +6 -2
  181. package/dist/src/execution/wire/session-inbox-encoder.js +1 -1
  182. package/dist/src/execution/wire/session-inbox-resume.js +1 -1
  183. package/dist/src/execution/wire/session-inbox-wire.js +1 -1
  184. package/dist/src/execution/wire/session-inbox-wire.v1.js +1 -1
  185. package/dist/src/execution/wire/session-inbox-wire.v2-migration.d.ts +0 -2
  186. package/dist/src/execution/wire/session-inbox-wire.v2-migration.js +1 -1
  187. package/dist/src/execution/wire/session-inbox-wire.v2.migration.d.ts +3 -0
  188. package/dist/src/execution/wire/session-inbox-wire.v2.migration.js +1 -0
  189. package/dist/src/execution/wire/session-inbox-wire.v3.d.ts +480 -0
  190. package/dist/src/execution/wire/session-inbox-wire.v3.js +1 -0
  191. package/dist/src/execution/wire/session-inbox-wire.v3.migration.d.ts +3 -0
  192. package/dist/src/execution/wire/session-inbox-wire.v3.migration.js +1 -0
  193. package/dist/src/execution/workflow-entry-finalization.d.ts +22 -0
  194. package/dist/src/execution/workflow-entry-finalization.js +1 -0
  195. package/dist/src/execution/workflow-entry.d.ts +1 -1
  196. package/dist/src/execution/workflow-entry.js +1 -1
  197. package/dist/src/execution/workflow-registry.d.ts +5 -0
  198. package/dist/src/execution/workflow-registry.js +1 -0
  199. package/dist/src/execution/workflow-runtime.d.ts +9 -11
  200. package/dist/src/execution/workflow-runtime.js +1 -1
  201. package/dist/src/execution/workflow-steps.js +1 -1
  202. package/dist/src/execution/workflow-webhook-route.d.ts +4 -0
  203. package/dist/src/execution/workflow-webhook-route.js +1 -0
  204. package/dist/src/framework/sources/registry.js +1 -1
  205. package/dist/src/harness/advertised-tools.d.ts +3 -0
  206. package/dist/src/harness/advertised-tools.js +1 -1
  207. package/dist/src/harness/approval-delivery-coordinator.d.ts +6 -0
  208. package/dist/src/harness/approval-delivery-coordinator.js +1 -1
  209. package/dist/src/harness/attachment-staging.js +1 -1
  210. package/dist/src/harness/background-tools.d.ts +2 -0
  211. package/dist/src/harness/emission.js +1 -1
  212. package/dist/src/harness/execute-tool.d.ts +2 -28
  213. package/dist/src/harness/hitl/pending-input-resolution.js +1 -1
  214. package/dist/src/harness/input-extraction.d.ts +3 -0
  215. package/dist/src/harness/input-extraction.js +1 -1
  216. package/dist/src/harness/input-requests.js +1 -1
  217. package/dist/src/harness/messages.js +1 -1
  218. package/dist/src/harness/proxy-input-requests.d.ts +10 -0
  219. package/dist/src/harness/proxy-input-requests.js +1 -1
  220. package/dist/src/harness/runtime-actions.d.ts +11 -3
  221. package/dist/src/harness/runtime-actions.js +1 -1
  222. package/dist/src/harness/session-limit-enforcement.js +1 -1
  223. package/dist/src/harness/stale-input-responses.d.ts +2 -1
  224. package/dist/src/harness/stale-input-responses.js +1 -1
  225. package/dist/src/harness/subagent-depth.d.ts +3 -4
  226. package/dist/src/harness/subagent-depth.js +1 -1
  227. package/dist/src/harness/tool-loop.js +2 -2
  228. package/dist/src/harness/tool-runs.d.ts +21 -0
  229. package/dist/src/harness/tool-runs.js +1 -0
  230. package/dist/src/harness/tools.d.ts +0 -2
  231. package/dist/src/harness/tools.js +1 -1
  232. package/dist/src/harness/types.d.ts +6 -7
  233. package/dist/src/harness/workflow-runtime-action-state.d.ts +3 -3
  234. package/dist/src/harness/workflow-runtime-action-state.js +1 -1
  235. package/dist/src/harness/workflow-sandbox.js +1 -1
  236. package/dist/src/harness/workflow-subagent-limit.d.ts +4 -4
  237. package/dist/src/instrumentation/ai-sdk-telemetry.d.ts +1 -0
  238. package/dist/src/instrumentation/ai-sdk-telemetry.js +1 -1
  239. package/dist/src/instrumentation/content-policy.d.ts +3 -1
  240. package/dist/src/instrumentation/content-policy.js +1 -1
  241. package/dist/src/instrumentation/runtime.d.ts +5 -2
  242. package/dist/src/instrumentation/runtime.js +1 -1
  243. package/dist/src/internal/application/build-output-environment.d.ts +2 -0
  244. package/dist/src/internal/application/build-output-environment.js +1 -0
  245. package/dist/src/internal/application/package.js +1 -1
  246. package/dist/src/internal/application/paths.d.ts +1 -2
  247. package/dist/src/internal/application/paths.js +1 -1
  248. package/dist/src/internal/attachments/errors.d.ts +3 -0
  249. package/dist/src/internal/authored-definition/schema-backed.d.ts +6 -2
  250. package/dist/src/internal/authored-definition/schema-backed.js +1 -1
  251. package/dist/src/internal/authored-module-loader.d.ts +7 -1
  252. package/dist/src/internal/authored-module-loader.js +3 -3
  253. package/dist/src/internal/authored-package-boundary.js +1 -1
  254. package/dist/src/internal/authored-runtime-modules.d.ts +2 -0
  255. package/dist/src/internal/authored-runtime-modules.js +1 -1
  256. package/dist/src/internal/client-context.d.ts +2 -0
  257. package/dist/src/internal/client-context.js +1 -0
  258. package/dist/src/internal/nitro/dev-client-address.d.ts +2 -0
  259. package/dist/src/internal/nitro/dev-client-address.js +1 -1
  260. package/dist/src/internal/nitro/development-generation.d.ts +2 -0
  261. package/dist/src/internal/nitro/development-generation.js +1 -1
  262. package/dist/src/internal/nitro/host/create-application-nitro.js +1 -1
  263. package/dist/src/internal/nitro/host/dev-authored-source-watcher.d.ts +2 -2
  264. package/dist/src/internal/nitro/host/dev-authored-source-watcher.js +1 -1
  265. package/dist/src/internal/nitro/host/dev-host-fingerprint.js +1 -1
  266. package/dist/src/internal/nitro/host/start-development-server.js +2 -2
  267. package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response.js +1 -1
  268. package/dist/src/internal/nitro/routes/channel-dispatch.js +1 -1
  269. package/dist/src/internal/workflow-bundle/authored-workflow-directives.d.ts +17 -0
  270. package/dist/src/internal/workflow-bundle/authored-workflow-directives.js +1 -0
  271. package/dist/src/internal/workflow-bundle/authored-workflow-modules.d.ts +19 -0
  272. package/dist/src/internal/workflow-bundle/authored-workflow-modules.js +1 -0
  273. package/dist/src/internal/workflow-bundle/builder-support.d.ts +17 -2
  274. package/dist/src/internal/workflow-bundle/builder-support.js +4 -3
  275. package/dist/src/internal/workflow-bundle/builder.d.ts +2 -2
  276. package/dist/src/internal/workflow-bundle/builder.js +2 -2
  277. package/dist/src/internal/workflow-bundle/dynamic-capability-transform-plugin.d.ts +2 -0
  278. package/dist/src/internal/workflow-bundle/dynamic-capability-transform-plugin.js +1 -1
  279. package/dist/src/internal/workflow-bundle/dynamic-tool-ast-references.d.ts +3 -0
  280. package/dist/src/internal/workflow-bundle/dynamic-tool-transform.d.ts +1 -1
  281. package/dist/src/internal/workflow-bundle/dynamic-tool-transform.js +1 -1
  282. package/dist/src/internal/workflow-bundle/workflow-builders.d.ts +6 -2
  283. package/dist/src/internal/workflow-bundle/workflow-builders.js +1 -1
  284. package/dist/src/internal/workflow-bundle/workflow-core-shim.d.ts +3 -0
  285. package/dist/src/internal/workflow-bundle/workflow-core-shim.js +1 -1
  286. package/dist/src/internal/workflow-bundle/workflow-directive-ast.d.ts +7 -0
  287. package/dist/src/internal/workflow-bundle/workflow-directive-ast.js +1 -0
  288. package/dist/src/internal/workflow-bundle/workflow-transformer.d.ts +15 -1
  289. package/dist/src/internal/workflow-bundle/workflow-transformer.js +4 -4
  290. package/dist/src/packages/eve-catalog/src/index.js +1 -1
  291. package/dist/src/protocol/baggage.d.ts +6 -0
  292. package/dist/src/protocol/baggage.js +1 -0
  293. package/dist/src/protocol/routes.d.ts +2 -2
  294. package/dist/src/public/channels/slack/attachments.js +1 -1
  295. package/dist/src/public/channels/teams/attachments.d.ts +2 -2
  296. package/dist/src/public/channels/teams/attachments.js +1 -1
  297. package/dist/src/public/channels/teams/teamsChannel.js +1 -1
  298. package/dist/src/public/channels/telegram/attachments.js +1 -1
  299. package/dist/src/public/definitions/remote-agent.d.ts +6 -3
  300. package/dist/src/public/local-dev.d.ts +9 -0
  301. package/dist/src/public/local-dev.js +1 -0
  302. package/dist/src/public/next/vercel-output-config.js +1 -1
  303. package/dist/src/public/workflow/index.d.ts +3 -0
  304. package/dist/src/public/workflow/index.js +1 -0
  305. package/dist/src/public/workflow-modules.d.js +1 -0
  306. package/dist/src/public/workflow-modules.d.ts +11 -0
  307. package/dist/src/runtime/actions/keys.d.ts +3 -0
  308. package/dist/src/runtime/actions/keys.js +1 -1
  309. package/dist/src/runtime/agent/bootstrap.js +1 -1
  310. package/dist/src/runtime/loaders/bundled-artifacts.js +1 -1
  311. package/dist/src/runtime/local-dev-capability.d.ts +55 -0
  312. package/dist/src/runtime/local-dev-capability.js +1 -0
  313. package/dist/src/runtime/resolve-agent-graph.js +1 -1
  314. package/dist/src/runtime/resolve-agent.js +1 -1
  315. package/dist/src/runtime/resolve-tool.js +1 -1
  316. package/dist/src/runtime/sessions/runtime-session.d.ts +1 -0
  317. package/dist/src/runtime/sessions/runtime-session.js +1 -1
  318. package/dist/src/runtime/sessions/turn.d.ts +3 -0
  319. package/dist/src/runtime/subagents/registry.js +1 -1
  320. package/dist/src/runtime/tools/registry.d.ts +1 -0
  321. package/dist/src/runtime/tools/registry.js +1 -1
  322. package/dist/src/runtime/types.d.ts +2 -2
  323. package/dist/src/services/dev-client/client-options.d.ts +1 -0
  324. package/dist/src/services/dev-client/client-options.js +1 -1
  325. package/dist/src/services/dev-client/runtime-artifacts.d.ts +2 -0
  326. package/dist/src/services/dev-client/runtime-artifacts.js +1 -1
  327. package/dist/src/setup/connection-connector.d.ts +4 -2
  328. package/dist/src/setup/connection-connector.js +2 -2
  329. package/dist/src/setup/flows/login.js +1 -1
  330. package/dist/src/setup/flows/model.js +1 -1
  331. package/dist/src/setup/flows/provider.d.ts +5 -0
  332. package/dist/src/setup/flows/provider.js +4 -4
  333. package/dist/src/setup/flows/registry-session.d.ts +24 -7
  334. package/dist/src/setup/flows/registry-session.js +1 -1
  335. package/dist/src/setup/flows/registry.d.ts +35 -29
  336. package/dist/src/setup/flows/registry.js +2 -1
  337. package/dist/src/setup/integrations/web/setup.d.ts +0 -2
  338. package/dist/src/setup/integrations/web/setup.js +1 -1
  339. package/dist/src/setup/prompter.d.ts +24 -4
  340. package/dist/src/setup/prompter.js +1 -1
  341. package/dist/src/setup/scaffold/create/project.js +2 -2
  342. package/dist/src/setup/vercel-project.js +0 -0
  343. package/dist/src/shared/dispatch-action.d.ts +30 -0
  344. package/dist/src/shared/dispatch-action.js +1 -0
  345. package/dist/src/shared/forwarded-trace-policy.d.ts +28 -0
  346. package/dist/src/shared/forwarded-trace-policy.js +1 -0
  347. package/dist/src/shared/instrumentation-decision.d.ts +3 -0
  348. package/dist/src/shared/instrumentation-decision.js +1 -1
  349. package/dist/src/shared/workflow-sandbox.d.ts +1 -1
  350. package/dist/src/svelte/index.js +1 -1
  351. package/dist/src/svelte/use-eve-agent.js +1 -1
  352. package/dist/src/tasks/json.js +1 -1
  353. package/dist/src/tools/behavior.d.ts +61 -0
  354. package/dist/src/tools/behavior.js +1 -0
  355. package/dist/src/tools/definition.d.ts +39 -3
  356. package/dist/src/tools/durable-callbacks.d.ts +1 -0
  357. package/dist/src/tools/framework/agent.d.ts +2 -11
  358. package/dist/src/tools/framework/agent.js +1 -1
  359. package/dist/src/tools/framework/ask-question.d.ts +2 -14
  360. package/dist/src/tools/framework/ask-question.js +1 -1
  361. package/dist/src/tools/framework/task-cancel.d.ts +2 -7
  362. package/dist/src/tools/framework/task-cancel.js +1 -1
  363. package/dist/src/tools/framework/task-contract.d.ts +0 -2
  364. package/dist/src/tools/framework/task-contract.js +1 -1
  365. package/dist/src/tools/framework/task-update.d.ts +2 -7
  366. package/dist/src/tools/framework/task-update.js +1 -1
  367. package/dist/src/tools/native-definition.d.ts +6 -0
  368. package/dist/src/tools/native-definition.js +1 -0
  369. package/dist/src/tools/provided/load-skill.js +1 -1
  370. package/dist/src/tracing/agent-approval-instrumentation.js +1 -1
  371. package/dist/src/tracing/agent-channel-delivery-instrumentation.js +1 -1
  372. package/dist/src/tracing/agent-otel-provider.js +2 -2
  373. package/dist/src/tracing/agent-otel-session-context.js +1 -1
  374. package/dist/src/tracing/agent-tool-instrumentation.js +1 -1
  375. package/dist/src/tracing/agent-trace-context-store.d.ts +1 -1
  376. package/dist/src/tracing/agent-trace-context-store.js +1 -1
  377. package/dist/src/tracing/install-instrumentation-runtime.js +1 -1
  378. package/dist/src/tracing/otel-declaration.d.ts +5 -3
  379. package/dist/src/tracing/otel-registration.d.ts +3 -1
  380. package/dist/src/tracing/otel-registration.js +1 -1
  381. package/dist/src/vue/index.js +1 -1
  382. package/dist/src/vue/use-eve-agent.js +1 -1
  383. package/docs/channels/custom.mdx +2 -0
  384. package/docs/channels/eve.mdx +5 -1
  385. package/docs/channels/teams.mdx +6 -1
  386. package/docs/concepts/sessions-runs-and-streaming.md +4 -2
  387. package/docs/guides/auth-and-route-protection.md +5 -1
  388. package/docs/guides/client/messages.mdx +6 -0
  389. package/docs/guides/dev-tui.md +30 -18
  390. package/docs/guides/remote-agents.md +25 -0
  391. package/docs/reference/cli.md +2 -2
  392. package/docs/reference/typescript-api.md +24 -0
  393. package/docs/tools/meta.json +1 -1
  394. package/docs/tools/overview.mdx +7 -0
  395. package/docs/tools/workflows.mdx +288 -0
  396. package/package.json +17 -1
  397. package/dist/src/execution/tools/tasks.d.ts +0 -18
  398. package/dist/src/execution/tools/tasks.js +0 -1
  399. package/dist/src/internal/authored-directive-prologue.d.ts +0 -4
  400. package/dist/src/internal/authored-directive-prologue.js +0 -1
@@ -0,0 +1,288 @@
1
+ ---
2
+ title: "Durable Tools"
3
+ description: "Write a tool as a workflow so it can wait for a person, a webhook, or a timer for as long as it takes, with nothing running in between."
4
+ url: /tools/workflows
5
+ ---
6
+
7
+ A tool's `execute` may be a workflow. eve starts one durable run per tool call and, by default,
8
+ waits for it: the run's return value is the tool result, however long it takes. While the run waits
9
+ on a person, a webhook, or a sleep, the turn is parked and nothing is running. Mark the same tool
10
+ `execution: "background"` and the model gets a receipt instead; eve wakes the agent with the return
11
+ value when the run ends.
12
+
13
+ Inside the tool, everything is the [Workflow SDK](https://workflow-sdk.dev): `"use workflow"`,
14
+ `"use step"`, `createHook`, `createWebhook`, `sleep`, retries, replay. eve adds `ask` from
15
+ `eve/workflow` — a question the human on the session's channel answers — and treats each `yield` as
16
+ a durable progress report.
17
+
18
+ ## Write one
19
+
20
+ ```ts title="agent/tools/deploy.ts"
21
+ import { defineTool } from "eve/tools";
22
+ import { ask } from "eve/workflow";
23
+ import { z } from "zod";
24
+
25
+ export default defineTool({
26
+ description: "Deploy a service to production. Pauses for a human to approve the plan.",
27
+ inputSchema: z.object({ service: z.string() }),
28
+ async execute({ service }, ctx) {
29
+ "use workflow";
30
+
31
+ const plan = await planDeploy(service);
32
+ const answer = await ask(ctx, {
33
+ prompt: `Deploy ${service}?\n\n${plan.summary}`,
34
+ display: "confirmation",
35
+ options: [
36
+ { id: "approve", label: "Deploy", style: "primary" },
37
+ { id: "cancel", label: "Cancel" },
38
+ ],
39
+ });
40
+
41
+ if (answer.optionId !== "approve") {
42
+ return { deployed: false, reason: "rejected" };
43
+ }
44
+ return { deployed: true, url: await applyDeploy(plan) };
45
+ },
46
+ });
47
+
48
+ async function planDeploy(service: string) {
49
+ "use step";
50
+ return computePlan(service);
51
+ }
52
+
53
+ async function applyDeploy(plan: DeployPlan) {
54
+ "use step";
55
+ return runDeploy(plan);
56
+ }
57
+ ```
58
+
59
+ The model calls `deploy`. The turn parks while the human reads the plan. When they answer, minutes
60
+ or days later, the run resumes, deploys, and returns. The model sees one tool result.
61
+
62
+ ### Rules
63
+
64
+ - `"use workflow"` goes on its own line as the first statement of `execute`, or of a top-level
65
+ `async function` you reference as `execute: deploy`.
66
+ - `"use step"` marks a top-level `async function` in the tool module, or any module it imports, as a
67
+ step. Side effects, clocks, randomness, `process.env`, and Node.js APIs belong in steps; the body
68
+ is replayed and must stay deterministic.
69
+ - Import `createHook`, `createWebhook`, `sleep`, and `FatalError` from `workflow` in the body.
70
+ `start`, `getRun`, and `resumeHook` from `workflow/api` belong in steps. Your app does not install
71
+ the SDK; for types, new projects list `eve/workflow-modules` in the tsconfig `types`.
72
+ - In the body, `ctx` has `session`, `callId`, `toolName`, and `abortSignal`. `getSandbox`,
73
+ `getSkill`, `getToken`, and `requireAuth` throw there; read credentials in a step instead.
74
+ - The tool's input must be a JSON object. Workflow bodies are for static tools under `agent/tools/`,
75
+ not tools returned from `defineDynamic` resolvers.
76
+
77
+ ## Wait or run in the background
78
+
79
+ | | default | `execution: "background"` |
80
+ | ------------------------ | ----------------------------------- | ------------------------------------------- |
81
+ | tool result | the run's return value | `{ status: "working", taskId }` |
82
+ | turn while the run lives | parked | continues |
83
+ | when the run ends | result lands in the tool call | agent is woken with the result or the error |
84
+ | progress (`yield`) | `action.partial` on the turn | wakes the agent with a note |
85
+ | cancel | cancelling the turn cancels the run | `task_cancel`, or the session ending |
86
+
87
+ Wait when the model needs the answer to continue. Go background when the wait may outlive the
88
+ conversation or the user should keep talking in the meantime. Background tools require
89
+ `experimental.tasks` on the root agent, like every background tool.
90
+
91
+ ## Ask a human: `ask`
92
+
93
+ ```ts
94
+ import { ask } from "eve/workflow";
95
+
96
+ const answer = await ask(ctx, {
97
+ prompt: string,
98
+ display?: "confirmation" | "select" | "text",
99
+ options?: { id: string; label: string; description?: string; style?: "primary" | "danger" | "default" }[],
100
+ allowFreeform?: boolean,
101
+ }); // { optionId?: string; text?: string }
102
+ ```
103
+
104
+ `ask` publishes an `input.requested` event on the session — rendered the way channels render
105
+ `ask_question` and tool approvals — and returns the hook the answer resumes, the way `createHook`
106
+ returns one. Awaiting it suspends the run until a response arrives. Because it is a hook, it composes
107
+ with the SDK's own constructs; race it against a deadline:
108
+
109
+ ```ts
110
+ const pending = ask(ctx, { prompt: `Deploy ${service}?`, options: APPROVE_OR_CANCEL });
111
+ const answer = await Promise.race([pending, sleep("4h")]);
112
+ if (answer === undefined) return { deployed: false, reason: "timed out" };
113
+ ```
114
+
115
+ - The request belongs to the run, not the turn. It stays answerable until it is answered or the run
116
+ ends. In a background tool that means long after the turn that started it.
117
+ - A request is answered once. Ask again for the next answer.
118
+ - Ending the run, by returning, throwing, or cancellation, withdraws its pending requests.
119
+ - Several requests may be outstanding at once.
120
+ - A response never steers. A new human message while a request is pending follows the session's
121
+ normal `turnPolicy`.
122
+
123
+ Compare the [`approval`](/docs/human-in-the-loop) policy, which gates the call before `execute` runs
124
+ and can only show the model's input. Both compose: `approval` before the run, `ask` inside it.
125
+
126
+ ## Report progress: `yield`
127
+
128
+ A workflow body may be an async generator. Each `yield` is a durable progress snapshot; the return
129
+ value is the result, or the last `yield` when the body returns nothing.
130
+
131
+ ```ts
132
+ async *execute({ service }, ctx) {
133
+ "use workflow";
134
+ yield { status: "planning" };
135
+ const plan = await planDeploy(service);
136
+ yield { status: "deploying" };
137
+ return { deployed: true, url: await applyDeploy(plan) };
138
+ }
139
+ ```
140
+
141
+ For a waiting tool each `yield` streams as an `action.partial` event, last-write-wins by tool call
142
+ id, and never enters model history — the same contract as an in-process generator tool. For a
143
+ background tool each `yield` wakes the owning agent with a note. Returning ends the run with the
144
+ result; throwing ends it with the failure.
145
+
146
+ ## Cancel and clean up: `ctx.abortSignal`
147
+
148
+ `ctx.abortSignal` aborts when the run is cancelled: a steered turn for a waiting tool, `task_cancel`
149
+ or the session ending for a background one. It is durable — it survives replay, and a step that
150
+ receives it observes the abort. Pass it into the steps that should stop, and clean up in
151
+ `try/finally`:
152
+
153
+ ```ts
154
+ async execute({ projectId }, ctx) {
155
+ "use workflow";
156
+ const jobId = await submitRender(projectId);
157
+ try {
158
+ return await waitForRender(jobId, ctx.abortSignal);
159
+ } finally {
160
+ if (ctx.abortSignal.aborted) await abortRender(jobId);
161
+ }
162
+ }
163
+ ```
164
+
165
+ After the signal fires, the run waits up to 30 seconds for the body to finish unwinding, then ends
166
+ as cancelled whether or not it did. A body parked on a hook or a `sleep` does not observe the signal;
167
+ it is abandoned when the grace period ends. Steps that received the signal are how you clean up
168
+ first.
169
+
170
+ ## Flows
171
+
172
+ ### Approve with a deadline and an escalation
173
+
174
+ ```ts
175
+ async execute({ service }, ctx) {
176
+ "use workflow";
177
+
178
+ const plan = await planDeploy(service);
179
+ const pending = ask(ctx, { prompt: `Deploy ${service}?`, display: "confirmation", options: APPROVE_OR_CANCEL });
180
+
181
+ let answer = await Promise.race([pending, sleep("4h")]);
182
+ if (answer === undefined) {
183
+ await pageOnCall(service);
184
+ answer = await Promise.race([pending, sleep("20h")]);
185
+ }
186
+
187
+ if (answer === undefined) return { deployed: false, reason: "timed out" };
188
+ if (answer.optionId !== "approve") return { deployed: false, reason: "rejected" };
189
+ return { deployed: true, url: await applyDeploy(plan) };
190
+ }
191
+ ```
192
+
193
+ One request stays on the channel the whole time. `sleep` is the deadline, `pageOnCall` is a step,
194
+ and returning withdraws the request.
195
+
196
+ ### Wait for an external system to call back
197
+
198
+ ```ts
199
+ import { createWebhook, FatalError } from "workflow";
200
+
201
+ export default defineTool({
202
+ description: "Render a video. Returns the URL once the render farm finishes.",
203
+ inputSchema: z.object({ projectId: z.string() }),
204
+ async execute({ projectId }) {
205
+ "use workflow";
206
+
207
+ const done = createWebhook();
208
+ const jobId = await submitRender(projectId, done.url);
209
+ const callback = await done;
210
+ const { status, url } = await callback.json();
211
+
212
+ if (status !== "ok") throw new FatalError(`Render ${jobId} failed: ${status}`);
213
+ return { url };
214
+ },
215
+ });
216
+ ```
217
+
218
+ `createWebhook` mints a URL under `/.well-known/workflow/v1/webhook/` that eve serves. The external
219
+ system posts to it when it is done. Nothing runs in between.
220
+
221
+ ### Ask now, act when answered
222
+
223
+ ```ts
224
+ import { ask } from "eve/workflow";
225
+
226
+ export default defineTool({
227
+ description: "Request approval to refund an order, then issue the refund once approved.",
228
+ inputSchema: z.object({ orderId: z.string(), amount: z.number() }),
229
+ execution: "background",
230
+ async execute({ orderId, amount }, ctx) {
231
+ "use workflow";
232
+
233
+ const decision = await ask(ctx, {
234
+ prompt: `Refund $${amount} on order ${orderId}?`,
235
+ display: "confirmation",
236
+ options: [
237
+ { id: "approve", label: "Refund", style: "primary" },
238
+ { id: "deny", label: "Deny" },
239
+ ],
240
+ });
241
+
242
+ if (decision.optionId !== "approve") return { refunded: false };
243
+ return { refunded: true, receipt: await issueRefund(orderId, amount) };
244
+ },
245
+ });
246
+ ```
247
+
248
+ The model reports that approval is pending and the conversation continues. The approval card stays
249
+ on the channel. When it is answered, the refund runs and the agent is woken with the outcome.
250
+
251
+ ### Remind me later
252
+
253
+ ```ts
254
+ import { sleep } from "workflow";
255
+
256
+ export default defineTool({
257
+ description: "Remind the user about something after a delay.",
258
+ inputSchema: z.object({ note: z.string(), delay: z.string() }),
259
+ execution: "background",
260
+ async execute({ note, delay }) {
261
+ "use workflow";
262
+ await sleep(delay);
263
+ return { reminder: note };
264
+ },
265
+ });
266
+ ```
267
+
268
+ The session parks between the receipt and the wake. The agent receives the return value and relays
269
+ it.
270
+
271
+ ## Semantics
272
+
273
+ One call, one result. A waiting tool's call resolves once, with the return value, the error, or a
274
+ cancellation. A background tool's call resolves once, with the receipt; everything after arrives as
275
+ separate session input.
276
+
277
+ While a waiting tool runs, the turn is parked. A `queue` message waits for it. A `steer` message
278
+ cancels the turn, which cancels the run, which withdraws its requests. Input responses never steer.
279
+
280
+ Background runs belong to the session. They survive turn completion and cancellation, appear in the
281
+ session's task index, can be cancelled with `task_cancel`, and are cancelled when the session ends.
282
+
283
+ Errors follow the SDK. A thrown error in a step retries per the step's policy; `FatalError` does
284
+ not. An error that escapes the body fails the run.
285
+
286
+ Identity follows the tool. The workflow id derives from the tool's path, so renaming or moving the
287
+ file creates a new workflow. Runs in flight finish on the deployment that started them; a run that
288
+ resumes on a deployment without its tool fails with an error naming the missing workflow.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eve",
3
- "version": "0.47.6",
3
+ "version": "0.48.0",
4
4
  "private": false,
5
5
  "description": "Filesystem-first framework for durable backend AI agents that run anywhere.",
6
6
  "keywords": [
@@ -181,6 +181,16 @@
181
181
  "import": "./dist/src/public/tools/workflow.js",
182
182
  "default": "./dist/src/public/tools/workflow.js"
183
183
  },
184
+ "./workflow": {
185
+ "eve-source": "./src/public/workflow/index.ts",
186
+ "types": "./dist/src/public/workflow/index.d.ts",
187
+ "import": "./dist/src/public/workflow/index.js",
188
+ "default": "./dist/src/public/workflow/index.js"
189
+ },
190
+ "./workflow-modules": {
191
+ "eve-source": "./src/public/workflow-modules.d.ts",
192
+ "types": "./dist/src/public/workflow-modules.d.ts"
193
+ },
184
194
  "./models/openai": {
185
195
  "types": "./dist/src/public/models/openai/index.d.ts",
186
196
  "import": "./dist/src/public/models/openai/index.js",
@@ -266,6 +276,11 @@
266
276
  "import": "./dist/src/internal/programmatic-source-loader.js",
267
277
  "default": "./dist/src/internal/programmatic-source-loader.js"
268
278
  },
279
+ "./local-dev": {
280
+ "types": "./dist/src/public/local-dev.d.ts",
281
+ "import": "./dist/src/public/local-dev.js",
282
+ "default": "./dist/src/public/local-dev.js"
283
+ },
269
284
  "./extension": {
270
285
  "types": "./dist/src/public/extension/index.d.ts",
271
286
  "import": "./dist/src/public/extension/index.js",
@@ -412,6 +427,7 @@
412
427
  "@vercel/sandbox-delete": "npm:@vercel/sandbox@3.2.0",
413
428
  "@vercel/sandbox-drives": "npm:@vercel/sandbox@2.10.0-beta.0",
414
429
  "@vercel/sdk": "1.28.8",
430
+ "@workflow/builders": "5.0.0-beta.44",
415
431
  "@workflow/core": "5.0.0-beta.43",
416
432
  "@workflow/errors": "5.0.0-beta.17",
417
433
  "@workflow/serde": "5.0.0-beta.2",
@@ -1,18 +0,0 @@
1
- import type { HarnessToolDefinition } from "#harness/execute-tool.js";
2
- /**
3
- * Builds the harness definitions injected when the root agent enables
4
- * `experimental.tasks`. Follows the implicit `agent` tool pattern:
5
- * inline definitions, no registry entry, session-shape hiding in
6
- * advertised-tools, and re-validation at dispatch.
7
- */
8
- export declare function createTaskToolHarnessDefinitions(): readonly HarnessToolDefinition[];
9
- /**
10
- * Whether one node's sessions receive the task tools.
11
- *
12
- * Mirrors `isImplicitAgentToolAvailable`: the compile step already
13
- * rejects `experimental.tasks` on subagents, authored tools with the
14
- * same name shadow the framework tool, and `disableTool(name)` removes
15
- * individual tools. Root-node self-delegated children share this node's
16
- * config, so advertised-tools uses caller/session shape to expose only
17
- * `task_update` to delegated task children.
18
- */
@@ -1 +0,0 @@
1
- import{TASK_CANCEL_INPUT_SCHEMA,TASK_CANCEL_TOOL_NAME,TASK_UPDATE_INPUT_SCHEMA,TASK_UPDATE_TOOL_NAME,TASK_VIEWS_OUTPUT_SCHEMA}from"#tools/framework/task-contract.js";function createTaskToolHarnessDefinitions(){return[{description:`Request cooperative cancellation of one or more background tasks. Cancellation is final: a task that finishes after you cancel it stays cancelled. Cancelling an already-finished task changes nothing.`,inputSchema:TASK_CANCEL_INPUT_SCHEMA,name:TASK_CANCEL_TOOL_NAME,outputSchema:TASK_VIEWS_OUTPUT_SCHEMA,runtimeAction:{kind:`task-control`}},{description:`Briefly tell the parent agent what this background task is currently doing. Report activity, not preliminary findings or results.`,inputSchema:TASK_UPDATE_INPUT_SCHEMA,name:TASK_UPDATE_TOOL_NAME,runtimeAction:{kind:`task-control`}}]}export{createTaskToolHarnessDefinitions};
@@ -1,4 +0,0 @@
1
- export declare function assertNoWorkflowDirectivePrologue(input: {
2
- readonly filePath: string;
3
- readonly source: string;
4
- }): Promise<void>;
@@ -1 +0,0 @@
1
- import{parseWithNitroRolldownAst}from"#internal/bundler/nitro-rolldown.js";const UNSUPPORTED_WORKFLOW_DIRECTIVES=new Set([`use step`,`use workflow`]);async function assertNoWorkflowDirectivePrologue(t){let n=await parseWithNitroRolldownAst(t.filePath,t.source);if(!Array.isArray(n.body))throw Error(`Failed to parse authored module "${t.filePath}".`);for(let e of n.body){if(typeof e.directive!=`string`)break;if(UNSUPPORTED_WORKFLOW_DIRECTIVES.has(e.directive))throw Error(`Authored module "${t.filePath}" contains an actual "${e.directive}" directive. Workflow directives are reserved for eve-generated workflow entrypoints.`)}}export{assertNoWorkflowDirectivePrologue};