eve 0.37.0 → 0.38.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 (410) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/dist/src/channel/routes.d.ts +13 -3
  3. package/dist/src/channel/routes.js +1 -1
  4. package/dist/src/channel/session-callback.js +1 -1
  5. package/dist/src/channel/session.d.ts +2 -1
  6. package/dist/src/channel/session.js +1 -1
  7. package/dist/src/channel/types.d.ts +41 -0
  8. package/dist/src/chunks/{use-eve-agent-COmP-H8R.js → use-eve-agent-BbSsu99c.js} +79 -32
  9. package/dist/src/chunks/{use-eve-agent-CnppTEFk.js → use-eve-agent-Dt8Y5QtW.js} +78 -31
  10. package/dist/src/cli/acp/command.d.ts +2 -1
  11. package/dist/src/cli/acp/command.js +2 -2
  12. package/dist/src/cli/application-command.d.ts +8 -0
  13. package/dist/src/cli/application-command.js +1 -0
  14. package/dist/src/cli/application-root.d.ts +8 -0
  15. package/dist/src/cli/application-root.js +1 -0
  16. package/dist/src/cli/commands/build.d.ts +2 -1
  17. package/dist/src/cli/commands/build.js +1 -1
  18. package/dist/src/cli/commands/init-git.js +1 -1
  19. package/dist/src/cli/commands/init-recovery.d.ts +3 -0
  20. package/dist/src/cli/commands/init-recovery.js +3 -0
  21. package/dist/src/cli/commands/init-repl.js +1 -1
  22. package/dist/src/cli/commands/init-target.d.ts +21 -0
  23. package/dist/src/cli/commands/init-target.js +1 -0
  24. package/dist/src/cli/commands/init.js +1 -1
  25. package/dist/src/cli/commands/register-integration-commands.d.ts +2 -1
  26. package/dist/src/cli/commands/register-integration-commands.js +1 -1
  27. package/dist/src/cli/commands/register-project-commands.d.ts +2 -1
  28. package/dist/src/cli/commands/register-project-commands.js +1 -1
  29. package/dist/src/cli/commands/register-registry-commands.d.ts +2 -1
  30. package/dist/src/cli/commands/register-registry-commands.js +4 -1
  31. package/dist/src/cli/commands/registry-recovery.d.ts +14 -0
  32. package/dist/src/cli/commands/registry-recovery.js +1 -0
  33. package/dist/src/cli/commands/registry.d.ts +2 -5
  34. package/dist/src/cli/commands/registry.js +1 -1
  35. package/dist/src/cli/dev/diagnostic-dump.js +1 -1
  36. package/dist/src/cli/dev/environment.js +1 -1
  37. package/dist/src/cli/dev/tui/runner.d.ts +8 -0
  38. package/dist/src/cli/dev/tui/runner.js +1 -1
  39. package/dist/src/cli/dev/tui/subagent-pump.d.ts +27 -22
  40. package/dist/src/cli/dev/tui/subagent-pump.js +1 -1
  41. package/dist/src/cli/dev/tui/terminal-renderer.d.ts +16 -0
  42. package/dist/src/cli/dev/tui/terminal-renderer.js +12 -12
  43. package/dist/src/cli/dev/tui/tool-presentation.js +1 -1
  44. package/dist/src/cli/invoke/command.d.ts +3 -2
  45. package/dist/src/cli/invoke/command.js +1 -1
  46. package/dist/src/cli/run.d.ts +3 -2
  47. package/dist/src/cli/run.js +3 -3
  48. package/dist/src/client/eve-agent-store.d.ts +15 -3
  49. package/dist/src/client/eve-agent-store.js +2 -2
  50. package/dist/src/client/message-response.d.ts +10 -2
  51. package/dist/src/client/message-response.js +1 -1
  52. package/dist/src/client/open-stream.d.ts +2 -0
  53. package/dist/src/client/open-stream.js +1 -1
  54. package/dist/src/client/session.js +1 -1
  55. package/dist/src/compiled/.vendor-stamp.json +5 -1
  56. package/dist/src/compiled/@ai-sdk/otel/index.js +3 -3
  57. package/dist/src/compiled/@chat-adapter/slack/index.js +25 -25
  58. package/dist/src/compiled/@modelcontextprotocol/server/LICENSE +216 -0
  59. package/dist/src/compiled/@modelcontextprotocol/server/index.d.ts +98 -0
  60. package/dist/src/compiled/@modelcontextprotocol/server/index.js +80 -0
  61. package/dist/src/compiled/@opentelemetry/api/index.js +1 -1
  62. package/dist/src/compiled/@opentelemetry/otlp-transformer/index.js +1 -1
  63. package/dist/src/compiled/@photon-ai/chat-adapter-imessage/index.js +61 -61
  64. package/dist/src/compiled/@vercel/oidc/index.js +14 -14
  65. package/dist/src/compiled/@vercel/otel/index.js +1 -1
  66. package/dist/src/compiled/@vercel/sandbox/index.js +1 -1
  67. package/dist/src/compiled/@workflow/core/index.js +1 -1
  68. package/dist/src/compiled/@workflow/core/private.js +1 -1
  69. package/dist/src/compiled/@workflow/core/runtime.js +2 -2
  70. package/dist/src/compiled/@workflow/core/workflow.js +1 -1
  71. package/dist/src/compiled/@workflow/errors/index.js +1 -1
  72. package/dist/src/compiled/@workflow/world-local/index.js +5 -5
  73. package/dist/src/compiled/@workflow/world-vercel/index.js +13 -13
  74. package/dist/src/compiled/_chunks/workflow/{attribute-changes-BoH7JsWp.js → attribute-changes-DZtQkszH.js} +1 -1
  75. package/dist/src/compiled/_chunks/workflow/chunk-5MU5Z6L3-B_3nkJFi.js +1 -0
  76. package/dist/src/compiled/_chunks/workflow/{chunk-NWCAEW5Y-Oxw40oRR.js → chunk-NWCAEW5Y-BgbcH0OK.js} +1 -1
  77. package/dist/src/compiled/_chunks/workflow/{dist-DlFv0aHY.js → dist-CPlyFOVo.js} +1 -1
  78. package/dist/src/compiled/_chunks/workflow/{dist-tJoQXAF6.js → dist-DpYyXbJv.js} +1 -1
  79. package/dist/src/compiled/_chunks/workflow/{dist-CRTn4Sg8.js → dist-xQXN70ED.js} +1 -1
  80. package/dist/src/compiled/_chunks/workflow/esm-seIr7a6j.js +1 -0
  81. package/dist/src/compiled/_chunks/workflow/{frames-CTpeJYEQ.js → frames-BBs-9k1d.js} +2 -2
  82. package/dist/src/compiled/_chunks/workflow/{functions-CeeNvKsq.js → functions-DAYiHNti.js} +1 -1
  83. package/dist/src/compiled/_chunks/workflow/{getMachineId-bsd-WEBNKY2R-CEYkx6Nv.js → getMachineId-bsd-WEBNKY2R-BTaxrQ52.js} +1 -1
  84. package/dist/src/compiled/_chunks/workflow/{getMachineId-darwin-LT47KAXP-DPwWlhif.js → getMachineId-darwin-LT47KAXP-DhYmwE_R.js} +1 -1
  85. package/dist/src/compiled/_chunks/workflow/{getMachineId-linux-LTVQO6VW-DAFXHwZp.js → getMachineId-linux-LTVQO6VW-Dru_L5ru.js} +1 -1
  86. package/dist/src/compiled/_chunks/workflow/{getMachineId-unsupported-UKWBA27G-BZKOI8mG.js → getMachineId-unsupported-UKWBA27G-DGfoqVW1.js} +1 -1
  87. package/dist/src/compiled/_chunks/workflow/{getMachineId-win-NLJKOPY6-r7_CJB5o.js → getMachineId-win-NLJKOPY6-CLM98q4X.js} +1 -1
  88. package/dist/src/compiled/_chunks/workflow/{private-tvMBynnC.js → private-UQtz8ZcW.js} +1 -1
  89. package/dist/src/compiled/_chunks/workflow/{resume-hook-BPQHjeY5.js → resume-hook-CYtSorp6.js} +1 -1
  90. package/dist/src/compiled/_chunks/workflow/{rolldown-runtime-DaDcL9Zw.js → rolldown-runtime-8V8biNmG.js} +1 -1
  91. package/dist/src/compiled/_chunks/workflow/{run-DQ5dOyjm.js → run-Cjo0A3NO.js} +1 -1
  92. package/dist/src/compiled/_chunks/workflow/{signal-exit-C8vsI6zj.js → signal-exit-o3IPQwwv.js} +1 -1
  93. package/dist/src/compiled/_chunks/workflow/sleep-C1P0OWBm.js +1 -0
  94. package/dist/src/compiled/_chunks/workflow/{token-DHD-q-fS.js → token-DGzfw-Vb.js} +1 -1
  95. package/dist/src/compiled/_chunks/workflow/{token-DtCUEpJs.js → token-DNbxVpeq.js} +1 -1
  96. package/dist/src/compiled/_chunks/workflow/token-util-BneBe0g5.js +27 -0
  97. package/dist/src/compiled/_chunks/workflow/{token-util-Ldar52H7.js → token-util-DjMgNdXS.js} +1 -1
  98. package/dist/src/compiled/_chunks/workflow/{undici-CUIybhQ2.js → undici-BBG5cZTy.js} +1 -1
  99. package/dist/src/compiled/_chunks/workflow/{wait-until-DK2lnH6U.js → wait-until-CT1ve8qB.js} +3 -3
  100. package/dist/src/compiled/_chunks/workflow/{wrapper-CMGju7QA.js → wrapper-CQNxP9mU.js} +3 -3
  101. package/dist/src/compiled/_chunks/workflow/{ws-transport-Csi6Cydc.js → ws-transport-beXxD0s_.js} +1 -1
  102. package/dist/src/compiled/env-runner/node-worker.js +1 -1
  103. package/dist/src/compiled/jose/index.js +1 -1
  104. package/dist/src/compiled/shadcn-registry/index.js +403 -403
  105. package/dist/src/compiler/artifacts.js +1 -1
  106. package/dist/src/compiler/compile-agent.js +2 -2
  107. package/dist/src/compiler/extension-compatibility.d.ts +20 -10
  108. package/dist/src/compiler/extension-compatibility.js +1 -1
  109. package/dist/src/compiler/manifest.js +1 -1
  110. package/dist/src/compiler/normalize-agent-config.js +1 -1
  111. package/dist/src/compiler/normalize-extension.d.ts +8 -5
  112. package/dist/src/compiler/normalize-extension.js +1 -1
  113. package/dist/src/compiler/normalize-manifest.js +1 -1
  114. package/dist/src/compiler/normalize-subagent.d.ts +1 -1
  115. package/dist/src/compiler/normalize-subagent.js +1 -1
  116. package/dist/src/context/serialized-dynamic-model-selection.d.ts +2 -0
  117. package/dist/src/context/serialized-dynamic-model-selection.js +1 -0
  118. package/dist/src/discover/discover-agent.js +1 -1
  119. package/dist/src/discover/extensions.d.ts +0 -6
  120. package/dist/src/discover/extensions.js +1 -1
  121. package/dist/src/evals/cli/eval.d.ts +1 -1
  122. package/dist/src/evals/cli/eval.js +1 -1
  123. package/dist/src/execution/agent-handle-dispatch.d.ts +15 -1
  124. package/dist/src/execution/agent-handle-dispatch.js +1 -1
  125. package/dist/src/execution/cancel-descendant-turns-step.js +1 -1
  126. package/dist/src/execution/delegated-parent-notification.d.ts +17 -0
  127. package/dist/src/execution/delegated-parent-notification.js +1 -1
  128. package/dist/src/execution/deliver-payloads.js +1 -1
  129. package/dist/src/execution/dispatch-runtime-actions-shared.d.ts +155 -0
  130. package/dist/src/execution/dispatch-runtime-actions-shared.js +1 -0
  131. package/dist/src/execution/dispatch-runtime-actions-step.d.ts +18 -14
  132. package/dist/src/execution/dispatch-runtime-actions-step.js +1 -1
  133. package/dist/src/execution/dispatch-workflow-runtime-actions-step.d.ts +7 -2
  134. package/dist/src/execution/dispatch-workflow-runtime-actions-step.js +1 -1
  135. package/dist/src/execution/effective-output-schema.d.ts +21 -0
  136. package/dist/src/execution/effective-output-schema.js +1 -0
  137. package/dist/src/execution/eve-workflow-attributes.d.ts +2 -0
  138. package/dist/src/execution/node-step.js +1 -1
  139. package/dist/src/execution/parked-delivery-wait.d.ts +8 -12
  140. package/dist/src/execution/parked-delivery-wait.js +1 -1
  141. package/dist/src/execution/{route-proxied-deliver-step.d.ts → proxied-deliver-step.d.ts} +7 -4
  142. package/dist/src/execution/proxied-deliver-step.js +1 -0
  143. package/dist/src/execution/remote-agent-dispatch.d.ts +32 -0
  144. package/dist/src/execution/remote-agent-dispatch.js +1 -1
  145. package/dist/src/execution/remote-agent-route-url.d.ts +2 -0
  146. package/dist/src/execution/remote-agent-route-url.js +1 -0
  147. package/dist/src/execution/route-child-delivery.d.ts +2 -1
  148. package/dist/src/execution/route-child-delivery.js +1 -1
  149. package/dist/src/execution/sandbox/bindings/docker-templates.js +1 -1
  150. package/dist/src/execution/sandbox/bindings/just-bash.js +1 -1
  151. package/dist/src/execution/sandbox/bindings/microsandbox-templates.js +1 -1
  152. package/dist/src/execution/sandbox/prewarm.js +1 -1
  153. package/dist/src/execution/session-callback-step.d.ts +11 -0
  154. package/dist/src/execution/session-callback-step.js +1 -1
  155. package/dist/src/execution/session-command-wire.js +1 -1
  156. package/dist/src/execution/session-state-cursor.d.ts +25 -0
  157. package/dist/src/execution/session-state-cursor.js +1 -0
  158. package/dist/src/execution/settle-cancelled-turn-step.d.ts +2 -0
  159. package/dist/src/execution/settle-cancelled-turn-step.js +1 -1
  160. package/dist/src/execution/subagent-event-proxy-step.d.ts +15 -0
  161. package/dist/src/execution/subagent-event-proxy-step.js +1 -1
  162. package/dist/src/execution/subagent-hitl-proxy.d.ts +14 -7
  163. package/dist/src/execution/subagent-hitl-proxy.js +1 -1
  164. package/dist/src/execution/subagent-start-local.d.ts +29 -0
  165. package/dist/src/execution/subagent-start-local.js +1 -0
  166. package/dist/src/execution/subagent-start-remote.d.ts +23 -0
  167. package/dist/src/execution/subagent-start-remote.js +1 -0
  168. package/dist/src/execution/task-event-callback.d.ts +13 -0
  169. package/dist/src/execution/task-event-callback.js +1 -0
  170. package/dist/src/execution/task-input-capability.d.ts +4 -0
  171. package/dist/src/execution/task-input-capability.js +1 -0
  172. package/dist/src/execution/tasks/child/steps.d.ts +46 -0
  173. package/dist/src/execution/tasks/child/steps.js +1 -0
  174. package/dist/src/execution/tasks/child/workflow.d.ts +31 -0
  175. package/dist/src/execution/tasks/child/workflow.js +1 -0
  176. package/dist/src/execution/tasks/parent/agent-identity.d.ts +13 -0
  177. package/dist/src/execution/tasks/parent/agent-identity.js +1 -0
  178. package/dist/src/execution/tasks/parent/agent-views.d.ts +6 -0
  179. package/dist/src/execution/tasks/parent/agent-views.js +1 -0
  180. package/dist/src/execution/tasks/parent/continuation-dispatch.d.ts +37 -0
  181. package/dist/src/execution/tasks/parent/continuation-dispatch.js +1 -0
  182. package/dist/src/execution/tasks/parent/control-shared.d.ts +36 -0
  183. package/dist/src/execution/tasks/parent/control-shared.js +1 -0
  184. package/dist/src/execution/tasks/parent/delegate.d.ts +70 -0
  185. package/dist/src/execution/tasks/parent/delegate.js +1 -0
  186. package/dist/src/execution/tasks/parent/dispatch-task-step.d.ts +19 -0
  187. package/dist/src/execution/tasks/parent/dispatch-task-step.js +1 -0
  188. package/dist/src/execution/tasks/parent/dispatch.d.ts +33 -0
  189. package/dist/src/execution/tasks/parent/dispatch.js +1 -0
  190. package/dist/src/execution/tasks/parent/hitl-proxy-steps.d.ts +29 -0
  191. package/dist/src/execution/tasks/parent/hitl-proxy-steps.js +1 -0
  192. package/dist/src/execution/tasks/parent/run-parent.d.ts +72 -0
  193. package/dist/src/execution/tasks/parent/run-parent.js +1 -0
  194. package/dist/src/execution/tasks/parent/send.d.ts +25 -0
  195. package/dist/src/execution/tasks/parent/send.js +1 -0
  196. package/dist/src/execution/tasks/workflow-target.d.ts +2 -0
  197. package/dist/src/execution/tasks/workflow-target.js +1 -0
  198. package/dist/src/execution/terminate-child-sessions-step.d.ts +1 -0
  199. package/dist/src/execution/terminate-child-sessions-step.js +1 -1
  200. package/dist/src/execution/turn-control-receiver.d.ts +10 -0
  201. package/dist/src/execution/turn-control-receiver.js +1 -1
  202. package/dist/src/execution/turn-dispatch.d.ts +2 -0
  203. package/dist/src/execution/turn-dispatch.js +1 -1
  204. package/dist/src/execution/turn-execution-cursor.d.ts +2 -8
  205. package/dist/src/execution/turn-execution-cursor.js +1 -1
  206. package/dist/src/execution/turn-workflow.js +1 -1
  207. package/dist/src/execution/workflow-callback-url.d.ts +5 -0
  208. package/dist/src/execution/workflow-callback-url.js +1 -1
  209. package/dist/src/execution/workflow-entry.js +1 -1
  210. package/dist/src/execution/workflow-runtime.d.ts +9 -0
  211. package/dist/src/execution/workflow-runtime.js +1 -1
  212. package/dist/src/execution/workflow-steps.d.ts +7 -21
  213. package/dist/src/execution/workflow-steps.js +1 -1
  214. package/dist/src/harness/advertised-tools.js +1 -1
  215. package/dist/src/harness/authorization.js +1 -1
  216. package/dist/src/harness/execute-tool.d.ts +7 -0
  217. package/dist/src/harness/handles/prompt.d.ts +12 -0
  218. package/dist/src/harness/handles/prompt.js +2 -1
  219. package/dist/src/harness/handles/query.js +1 -1
  220. package/dist/src/harness/handles/store.d.ts +9 -2
  221. package/dist/src/harness/handles/store.js +1 -1
  222. package/dist/src/harness/handles/transitions.d.ts +10 -1
  223. package/dist/src/harness/handles/transitions.js +1 -1
  224. package/dist/src/harness/instrumentation/providers.js +1 -1
  225. package/dist/src/harness/instrumentation/runtime-context.d.ts +2 -0
  226. package/dist/src/harness/instrumentation/runtime-context.js +1 -1
  227. package/dist/src/harness/instrumentation/runtime.d.ts +3 -1
  228. package/dist/src/harness/proxy-input-requests.d.ts +21 -4
  229. package/dist/src/harness/proxy-input-requests.js +1 -1
  230. package/dist/src/harness/runtime-actions.d.ts +2 -0
  231. package/dist/src/harness/runtime-actions.js +1 -1
  232. package/dist/src/harness/session-limit-enforcement.js +1 -1
  233. package/dist/src/harness/tool-loop.js +2 -2
  234. package/dist/src/harness/workflow-runtime-action-state.js +1 -1
  235. package/dist/src/internal/application/cache-metadata.js +1 -1
  236. package/dist/src/internal/application/compiled-artifacts.js +2 -2
  237. package/dist/src/internal/application/optional-package-install.js +1 -1
  238. package/dist/src/internal/application/output-publication-lock.js +1 -1
  239. package/dist/src/internal/application/package.js +1 -1
  240. package/dist/src/internal/application/paths.js +1 -1
  241. package/dist/src/internal/application/tsconfig-dependencies.js +1 -1
  242. package/dist/src/internal/authored-definition/core.js +1 -1
  243. package/dist/src/internal/authored-module-evaluation-error.js +4 -4
  244. package/dist/src/internal/authored-module-loader.js +3 -3
  245. package/dist/src/internal/authored-package-boundary.js +1 -1
  246. package/dist/src/internal/authored-relative-extension-resolver.js +1 -1
  247. package/dist/src/internal/bundler/extension-scope-plugin.js +1 -1
  248. package/dist/src/internal/bundler/nitro-rolldown.js +1 -1
  249. package/dist/src/internal/instrumentation-layout.js +1 -1
  250. package/dist/src/internal/invocation/agent-invocation.d.ts +54 -0
  251. package/dist/src/internal/invocation/agent-invocation.js +1 -0
  252. package/dist/src/internal/invocation/attributes.d.ts +2 -0
  253. package/dist/src/internal/invocation/attributes.js +1 -0
  254. package/dist/src/internal/invocation/metadata.d.ts +9 -0
  255. package/dist/src/internal/invocation/metadata.js +1 -0
  256. package/dist/src/internal/invocation/workflow-execution.d.ts +32 -0
  257. package/dist/src/internal/invocation/workflow-execution.js +1 -0
  258. package/dist/src/internal/materialized-authored-modules.js +1 -1
  259. package/dist/src/internal/mcp/http-security.d.ts +12 -0
  260. package/dist/src/internal/mcp/http-security.js +1 -0
  261. package/dist/src/internal/mcp/protected-resource.d.ts +9 -0
  262. package/dist/src/internal/mcp/protected-resource.js +1 -0
  263. package/dist/src/internal/mcp/streamable-http-server.d.ts +51 -0
  264. package/dist/src/internal/mcp/streamable-http-server.js +1 -0
  265. package/dist/src/internal/nitro/dev-runtime-artifacts-retention.js +1 -1
  266. package/dist/src/internal/nitro/dev-runtime-artifacts.js +1 -1
  267. package/dist/src/internal/nitro/dev-runtime-source-snapshot-copy.js +1 -1
  268. package/dist/src/internal/nitro/dev-runtime-source-snapshot-local-roots.js +1 -1
  269. package/dist/src/internal/nitro/dev-runtime-source-snapshot.js +1 -1
  270. package/dist/src/internal/nitro/host/application-route-registry.d.ts +88 -0
  271. package/dist/src/internal/nitro/host/application-route-registry.js +1 -0
  272. package/dist/src/internal/nitro/host/build-application.js +1 -1
  273. package/dist/src/internal/nitro/host/build-extension.js +1 -1
  274. package/dist/src/internal/nitro/host/build-vercel-agent-summary.js +1 -1
  275. package/dist/src/internal/nitro/host/channel-routes.d.ts +4 -11
  276. package/dist/src/internal/nitro/host/channel-routes.js +3 -3
  277. package/dist/src/internal/nitro/host/configure-nitro-routes.js +3 -3
  278. package/dist/src/internal/nitro/host/create-application-nitro.js +1 -1
  279. package/dist/src/internal/nitro/host/dev-authored-source-watcher.js +1 -1
  280. package/dist/src/internal/nitro/host/dev-runner.js +1 -1
  281. package/dist/src/internal/nitro/host/dev-workspace-extensions.js +1 -1
  282. package/dist/src/internal/nitro/host/extension-capability-requirements.js +1 -1
  283. package/dist/src/internal/nitro/host/local-tracing-runtime-plugin.js +1 -1
  284. package/dist/src/internal/nitro/host/nitro-bundler-config.js +1 -1
  285. package/dist/src/internal/nitro/host/start-development-server.js +2 -2
  286. package/dist/src/internal/nitro/host/start-production-server.js +2 -2
  287. package/dist/src/internal/nitro/host/vercel-build-output-config.js +1 -1
  288. package/dist/src/internal/nitro/routes/channel-dispatch.js +1 -1
  289. package/dist/src/internal/nitro/routes/channel-route-context.d.ts +14 -0
  290. package/dist/src/internal/nitro/routes/channel-route-context.js +1 -1
  291. package/dist/src/internal/nitro/routes/runtime-stack.d.ts +2 -0
  292. package/dist/src/internal/nitro/routes/runtime-stack.js +1 -1
  293. package/dist/src/internal/process/pnpm.js +1 -1
  294. package/dist/src/internal/vercel-agent-summary.d.ts +1 -1
  295. package/dist/src/internal/workflow/development-world-client.js +1 -1
  296. package/dist/src/internal/workflow/development-world-server.js +1 -1
  297. package/dist/src/internal/workflow-bundle/builder-support.d.ts +12 -8
  298. package/dist/src/internal/workflow-bundle/builder-support.js +8 -7
  299. package/dist/src/internal/workflow-bundle/builder.d.ts +1 -1
  300. package/dist/src/internal/workflow-bundle/builder.js +2 -3
  301. package/dist/src/internal/workflow-bundle/workflow-builders.js +1 -1
  302. package/dist/src/protocol/message.d.ts +28 -0
  303. package/dist/src/protocol/message.js +2 -2
  304. package/dist/src/protocol/routes.d.ts +14 -0
  305. package/dist/src/protocol/routes.js +1 -1
  306. package/dist/src/public/channels/auth.d.ts +36 -0
  307. package/dist/src/public/channels/auth.js +1 -1
  308. package/dist/src/public/channels/discord/discordChannel.d.ts +2 -0
  309. package/dist/src/public/channels/discord/discordChannel.js +1 -1
  310. package/dist/src/public/channels/eve.d.ts +2 -0
  311. package/dist/src/public/channels/eve.js +1 -1
  312. package/dist/src/public/channels/github/dispatch.js +1 -1
  313. package/dist/src/public/channels/github/githubChannel.d.ts +2 -0
  314. package/dist/src/public/channels/linear/linearChannel.d.ts +2 -0
  315. package/dist/src/public/channels/linear/linearChannel.js +1 -1
  316. package/dist/src/public/channels/mcp.d.ts +19 -0
  317. package/dist/src/public/channels/mcp.js +1 -0
  318. package/dist/src/public/channels/photon/photonIMessageChannel.d.ts +2 -0
  319. package/dist/src/public/channels/photon/photonIMessageChannel.js +1 -1
  320. package/dist/src/public/channels/slack/slackChannel.d.ts +3 -1
  321. package/dist/src/public/channels/slack/slackChannel.js +1 -1
  322. package/dist/src/public/channels/teams/teamsChannel.d.ts +2 -0
  323. package/dist/src/public/channels/teams/teamsChannel.js +1 -1
  324. package/dist/src/public/channels/telegram/telegramChannel.d.ts +2 -0
  325. package/dist/src/public/channels/telegram/telegramChannel.js +1 -1
  326. package/dist/src/public/channels/twilio/twilioChannel.d.ts +2 -0
  327. package/dist/src/public/channels/twilio/twilioChannel.js +1 -1
  328. package/dist/src/public/definitions/channel.d.ts +2 -2
  329. package/dist/src/public/definitions/channel.js +1 -1
  330. package/dist/src/public/instrumentation/index.d.ts +9 -3
  331. package/dist/src/public/next/server.js +1 -1
  332. package/dist/src/public/nuxt/dev-server.js +1 -1
  333. package/dist/src/public/sveltekit/dev-server.js +1 -1
  334. package/dist/src/react/use-eve-agent.d.ts +4 -4
  335. package/dist/src/react/use-eve-agent.js +1 -1
  336. package/dist/src/runtime/actions/types.d.ts +9 -0
  337. package/dist/src/runtime/actions/types.js +1 -1
  338. package/dist/src/runtime/agent/bootstrap.js +1 -1
  339. package/dist/src/runtime/connections/authorization-complete-page.js +70 -28
  340. package/dist/src/runtime/framework-channels/index.js +1 -1
  341. package/dist/src/runtime/framework-tools/index.js +1 -1
  342. package/dist/src/runtime/framework-tools/tasks.d.ts +95 -0
  343. package/dist/src/runtime/framework-tools/tasks.js +1 -0
  344. package/dist/src/runtime/prompt/compose.d.ts +1 -0
  345. package/dist/src/runtime/prompt/compose.js +1 -1
  346. package/dist/src/runtime/resolve-agent-graph.js +1 -1
  347. package/dist/src/runtime/resolve-agent.js +1 -1
  348. package/dist/src/runtime/session-callback-route.js +1 -1
  349. package/dist/src/runtime/task-input-response-route.d.ts +5 -0
  350. package/dist/src/runtime/task-input-response-route.js +1 -0
  351. package/dist/src/services/inspect-application.js +1 -1
  352. package/dist/src/setup/primitives/pm/pnpm.js +2 -2
  353. package/dist/src/setup/primitives/run-vercel.js +1 -1
  354. package/dist/src/setup/scaffold/create/add-to-project.js +1 -1
  355. package/dist/src/setup/scaffold/create/extension.js +1 -1
  356. package/dist/src/setup/scaffold/create/project.js +1 -1
  357. package/dist/src/setup/scaffold/create/web-template.d.ts +1 -1
  358. package/dist/src/setup/scaffold/create/web-template.js +8 -86
  359. package/dist/src/setup/scaffold/version-tokens.js +1 -1
  360. package/dist/src/setup/scaffold/workspace-root.js +1 -1
  361. package/dist/src/shared/agent-definition.d.ts +7 -0
  362. package/dist/src/svelte/index.js +1 -1
  363. package/dist/src/svelte/use-eve-agent.d.ts +3 -3
  364. package/dist/src/svelte/use-eve-agent.js +1 -1
  365. package/dist/src/tasks/json.d.ts +88 -0
  366. package/dist/src/tasks/json.js +1 -0
  367. package/dist/src/tasks/session-index.d.ts +48 -0
  368. package/dist/src/tasks/session-index.js +1 -0
  369. package/dist/src/tasks/task-id.d.ts +34 -0
  370. package/dist/src/tasks/task-id.js +1 -0
  371. package/dist/src/tasks/transitions.d.ts +23 -0
  372. package/dist/src/tasks/transitions.js +1 -0
  373. package/dist/src/tasks/types.d.ts +295 -0
  374. package/dist/src/tasks/types.js +1 -0
  375. package/dist/src/tasks/wire.d.ts +26 -0
  376. package/dist/src/tasks/wire.js +1 -0
  377. package/dist/src/tracing/install-instrumentation-runtime.d.ts +2 -1
  378. package/dist/src/tracing/install-instrumentation-runtime.js +1 -1
  379. package/dist/src/tracing/otel-declaration.d.ts +32 -3
  380. package/dist/src/tracing/otel-declaration.js +1 -1
  381. package/dist/src/tracing/otel-registration.js +1 -1
  382. package/dist/src/vue/index.js +1 -1
  383. package/dist/src/vue/use-eve-agent.d.ts +3 -3
  384. package/dist/src/vue/use-eve-agent.js +1 -1
  385. package/docs/channels/custom.mdx +1 -1
  386. package/docs/channels/discord.mdx +1 -1
  387. package/docs/channels/eve.mdx +15 -2
  388. package/docs/channels/github.mdx +1 -1
  389. package/docs/channels/linear.mdx +1 -1
  390. package/docs/channels/overview.mdx +1 -1
  391. package/docs/channels/photon.mdx +1 -1
  392. package/docs/channels/slack.mdx +1 -1
  393. package/docs/channels/teams.mdx +1 -1
  394. package/docs/channels/telegram.mdx +1 -1
  395. package/docs/channels/twilio.mdx +1 -1
  396. package/docs/extensions.md +10 -6
  397. package/docs/guides/client/streaming.mdx +7 -6
  398. package/docs/guides/frontend/overview.mdx +10 -8
  399. package/docs/guides/frontend/use-eve-agent-svelte.mdx +10 -10
  400. package/docs/guides/frontend/use-eve-agent-vue.mdx +10 -10
  401. package/docs/install-integrations.mdx +4 -0
  402. package/docs/reference/cli.md +1 -1
  403. package/docs/schedules.mdx +2 -2
  404. package/docs/tools/human-in-the-loop.md +3 -1
  405. package/package.json +7 -1
  406. package/dist/src/compiled/_chunks/workflow/chunk-5MU5Z6L3-CaJgXkVg.js +0 -1
  407. package/dist/src/compiled/_chunks/workflow/sleep-CzdoBiqy.js +0 -1
  408. package/dist/src/compiled/_chunks/workflow/src-Cj3P1ChQ.js +0 -1
  409. package/dist/src/compiled/_chunks/workflow/token-util-DNwIAn_u.js +0 -27
  410. package/dist/src/execution/route-proxied-deliver-step.js +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,37 @@
1
1
  # eve
2
2
 
3
+ ## 0.38.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 48c1105: Replace `stop()` on frontend agent bindings with `cancel()`. Cancellation now targets the exact durable turn through `MessageResponse.cancel()` while the binding stays attached through settlement.
8
+
9
+ ### Patch Changes
10
+
11
+ - 8904392: Extensions can now contribute channels. Mounted channel IDs receive the extension namespace while their authored route paths remain unchanged.
12
+ - 4c3c475: Built-in inbound hooks can now return `title` to set the workflow run title without changing the message sent to the model.
13
+ - a7d34e5: Make Nitro-backed builds more reliable by preserving per-import conditional exports, keeping authored and vendored OpenTelemetry tracers on one registered provider, and running development worker close hooks during an explicit shutdown handshake. Workflow artifacts are now emitted directly instead of repaired through post-build string rewrites.
14
+ - bdd5a9b: Suggest close registry matches when `eve add` cannot find the requested item.
15
+ - ccc604c: Show `eve add` help and registry search guidance when no item is provided.
16
+ - abcd06d: Resolve project-scoped CLI commands from the nearest enclosing eve application when run from a nested directory.
17
+ - 775c061: Extensions can contribute schedules. Mounted schedule IDs use the extension namespace while cron expressions and handler behavior remain unchanged.
18
+
19
+ ## 0.37.1
20
+
21
+ ### Patch Changes
22
+
23
+ - 8bf1e5b: Render background subagent activity in one persistent dev TUI section across parent turns. Idle task wakes render while the prompt remains active, remote child streams use the authenticated parent proxy, and child boundaries finalize sections without later-turn cancellation closing unrelated background work.
24
+ - 046981e: Add experimental background tasks for local and remote subagents. With `experimental.tasks` enabled, subagent calls return durable task receipts; parents can inspect, continue, or cancel work while lifecycle notifications and human-input requests arrive asynchronously. Remote child streams are exposed through an authenticated parent-origin proxy so clients never receive remote credentials.
25
+ - d8cef1a: Scope create-once operations to the effective forwarded principal so two forwarded users behind the same trusted forwarder cannot adopt each other's session.
26
+ - 5d12328: Preserve a session-scoped dynamic model selection when the first turn is cancelled so later turns can reuse it without requiring a `turn.started` resolver.
27
+ - 10a09a1: Make failed `eve init` runs recoverable: new targets are cleaned up, preexisting empty targets are restored, and existing projects receive clear dependency-install recovery guidance.
28
+ - 8bf1e5b: The dev TUI now presents and routes approval or question prompts raised by background tasks while the parent session is idle, instead of leaving the task blocked.
29
+ - 046981e: Preserve remote task HITL response routes for loopback HTTP children and Vercel deployments configured with Protection Bypass for Automation. HTTPS remains required for every non-loopback remote child.
30
+ - 63726db: Polish the connection authorization completion page with a Vercel-styled success state.
31
+ - d8cef1a: Add authenticated create-once session requests through `operationId`. Concurrent or retried creates adopt the active session that first claimed the operation without dispatching duplicate input.
32
+ - 5ba9749: Add a secure MCP channel that reuses eve route auth and lets clients start, inspect, update, authorize, and cancel principal-bound durable agent invocations over MCP 2026-07-28 with a stateless 2025 compatibility path.
33
+ - 60e87ef: Keep active client turns connected while they are paused for authorization so responses resume automatically after the callback completes.
34
+
3
35
  ## 0.37.0
4
36
 
5
37
  ### Minor Changes
@@ -149,9 +149,9 @@ export interface WebSocketRouteDefinition<TState = undefined> {
149
149
  }
150
150
  /**
151
151
  * A single channel route: either an {@link HttpRouteDefinition} or a
152
- * {@link WebSocketRouteDefinition}. Produced by the {@link GET}, {@link POST},
153
- * {@link PUT}, {@link PATCH}, {@link DELETE}, and {@link WS} helpers and listed
154
- * in a channel's `routes` array.
152
+ * {@link WebSocketRouteDefinition}. Produced by the {@link GET}, {@link HEAD},
153
+ * {@link POST}, {@link PUT}, {@link PATCH}, {@link DELETE}, {@link OPTIONS},
154
+ * and {@link WS} helpers and listed in a channel's `routes` array.
155
155
  */
156
156
  export type RouteDefinition<TState = undefined> = HttpRouteDefinition<TState> | WebSocketRouteDefinition<TState>;
157
157
  /**
@@ -159,6 +159,11 @@ export type RouteDefinition<TState = undefined> = HttpRouteDefinition<TState> |
159
159
  * receives the `Request` and {@link RouteHandlerArgs}.
160
160
  */
161
161
  export declare function GET<TState = undefined>(path: string, handler: RouteHandler<TState>): HttpRouteDefinition<TState>;
162
+ /**
163
+ * Declares an HTTP `HEAD` route at `path`. See {@link GET} for the handler
164
+ * contract.
165
+ */
166
+ export declare function HEAD<TState = undefined>(path: string, handler: RouteHandler<TState>): HttpRouteDefinition<TState>;
162
167
  /**
163
168
  * Declares an HTTP `POST` route at `path`. See {@link GET} for the handler
164
169
  * contract.
@@ -179,6 +184,11 @@ export declare function PATCH<TState = undefined>(path: string, handler: RouteHa
179
184
  * contract.
180
185
  */
181
186
  export declare function DELETE<TState = undefined>(path: string, handler: RouteHandler<TState>): HttpRouteDefinition<TState>;
187
+ /**
188
+ * Declares an HTTP `OPTIONS` route at `path`. See {@link GET} for the handler
189
+ * contract.
190
+ */
191
+ export declare function OPTIONS<TState = undefined>(path: string, handler: RouteHandler<TState>): HttpRouteDefinition<TState>;
182
192
  /**
183
193
  * Declares a WebSocket channel route.
184
194
  *
@@ -1 +1 @@
1
- function GET(e,t){return{transport:`http`,method:`GET`,path:e,handler:t}}function POST(e,t){return{transport:`http`,method:`POST`,path:e,handler:t}}function PUT(e,t){return{transport:`http`,method:`PUT`,path:e,handler:t}}function PATCH(e,t){return{transport:`http`,method:`PATCH`,path:e,handler:t}}function DELETE(e,t){return{transport:`http`,method:`DELETE`,path:e,handler:t}}function WS(e,t){return{transport:`websocket`,method:`WEBSOCKET`,path:e,handler:t}}function isHttpRouteDefinition(e){return e.transport!==`websocket`}function isWebSocketRouteDefinition(e){return e.transport===`websocket`}export{DELETE,GET,PATCH,POST,PUT,WS,isHttpRouteDefinition,isWebSocketRouteDefinition};
1
+ function GET(e,t){return{transport:`http`,method:`GET`,path:e,handler:t}}function HEAD(e,t){return{transport:`http`,method:`HEAD`,path:e,handler:t}}function POST(e,t){return{transport:`http`,method:`POST`,path:e,handler:t}}function PUT(e,t){return{transport:`http`,method:`PUT`,path:e,handler:t}}function PATCH(e,t){return{transport:`http`,method:`PATCH`,path:e,handler:t}}function DELETE(e,t){return{transport:`http`,method:`DELETE`,path:e,handler:t}}function OPTIONS(e,t){return{transport:`http`,method:`OPTIONS`,path:e,handler:t}}function WS(e,t){return{transport:`websocket`,method:`WEBSOCKET`,path:e,handler:t}}function isHttpRouteDefinition(e){return e.transport!==`websocket`}function isWebSocketRouteDefinition(e){return e.transport===`websocket`}export{DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,WS,isHttpRouteDefinition,isWebSocketRouteDefinition};
@@ -1 +1 @@
1
- import{z}from"#compiled/zod/index.js";import{createEveCallbackRoutePath}from"#protocol/routes.js";import{isReservedIpAddress}from"#shared/network-address.js";const sessionCallbackSchema=z.object({callId:z.string().min(1),subagentName:z.string().min(1),token:z.string().min(1),url:z.string().min(1)}).strict().superRefine((e,t)=>{let r;try{r=new URL(e.url)}catch{t.addIssue({code:`custom`,message:`Callback url must be absolute.`,path:[`url`]});return}readCallbackUrlToken(r)!==e.token&&t.addIssue({code:`custom`,message:`Callback url token must match callback token.`,path:[`url`]}),isReservedIpAddress(r.hostname)&&t.addIssue({code:`custom`,message:`Callback url host must not be a private or reserved address.`,path:[`url`]})});function parseSessionCallback(e){let t=sessionCallbackSchema.safeParse(e);return t.success?{callback:t.data,ok:!0}:{cause:t.error,message:formatSessionCallbackParseError(t.error),ok:!1}}function readCallbackUrlToken(e){let n=createEveCallbackRoutePath(``),r=e.pathname.lastIndexOf(n);if(r===-1)return null;let i=e.pathname.slice(r+n.length);if(i.length===0||i.includes(`/`))return null;try{return decodeURIComponent(i)}catch{return null}}function formatSessionCallbackParseError(e){return`Invalid callback metadata: ${e.issues.map(e=>`${e.path.length===0?`callback`:`callback.${e.path.join(`.`)}`}: ${e.message}`).join(`; `)}`}export{parseSessionCallback};
1
+ import{z}from"#compiled/zod/index.js";import{createEveCallbackRoutePath}from"#protocol/routes.js";import{isReservedIpAddress}from"#shared/network-address.js";const sessionCallbackSchema=z.object({callId:z.string().min(1),subagentName:z.string().min(1),taskId:z.string().min(1).optional(),token:z.string().min(1),url:z.string().min(1)}).strict().superRefine((e,t)=>{let r;try{r=new URL(e.url)}catch{t.addIssue({code:`custom`,message:`Callback url must be absolute.`,path:[`url`]});return}readCallbackUrlToken(r)!==e.token&&t.addIssue({code:`custom`,message:`Callback url token must match callback token.`,path:[`url`]}),isReservedIpAddress(r.hostname)&&t.addIssue({code:`custom`,message:`Callback url host must not be a private or reserved address.`,path:[`url`]})});function parseSessionCallback(e){let t=sessionCallbackSchema.safeParse(e);return t.success?{callback:t.data,ok:!0}:{cause:t.error,message:formatSessionCallbackParseError(t.error),ok:!1}}function readCallbackUrlToken(e){let n=createEveCallbackRoutePath(``),r=e.pathname.lastIndexOf(n);if(r===-1)return null;let i=e.pathname.slice(r+n.length);if(i.length===0||i.includes(`/`))return null;try{return decodeURIComponent(i)}catch{return null}}function formatSessionCallbackParseError(e){return`Invalid callback metadata: ${e.issues.map(e=>`${e.path.length===0?`callback`:`callback.${e.path.join(`.`)}`}: ${e.message}`).join(`; `)}`}export{parseSessionCallback};
@@ -13,8 +13,9 @@ export interface Session {
13
13
  send(message: string | UserContent, options: SessionSendOptions): Promise<SessionSendCommandResult>;
14
14
  /** Answers pending input requests on this exact session ID. */
15
15
  respond(inputResponses: readonly InputResponse[], options: SessionRespondOptions): Promise<SessionSendCommandResult>;
16
- /** Requests cancellation of this exact session's active turn. */
16
+ /** Requests cancellation of this exact session's active turn or one owned task. */
17
17
  cancel(options?: {
18
+ taskId?: string;
18
19
  turnId?: string;
19
20
  }): Promise<CancelTurnResult>;
20
21
  /** Queues compaction on this exact session ID. */
@@ -1 +1 @@
1
- import{createChannelDeliveryMetadata}from"#channel/delivery-metadata.js";import{serializeUrlFilePartsInMessage}from"#channel/send-input.js";import{DEFAULT_TURN_POLICY}from"#channel/types.js";import{AuthKey,ContinuationTokenKey,InitiatorAuthKey,SessionIdKey}from"#context/keys.js";import{toChannelLocalContinuationToken}from"#shared/continuation-token.js";function createSession(e,r,i={}){return{id:e,async send(a,o){let s=createDelivery(i),c=sessionCallbackToTurnCaller(o.callback),l={message:serializeUrlFilePartsInMessage(a)};o.context!==void 0&&(l.context=o.context),o.outputSchema!==void 0&&(l.outputSchema=o.outputSchema);let u={auth:o.auth,delivery:s,kind:`send`,payload:l,requestId:i.requestId,turnPolicy:o.turnPolicy??i.turnPolicy??DEFAULT_TURN_POLICY};return await r.dispatchSession({command:c===void 0?u:{...u,caller:c},sessionId:e})},async respond(t,n){if(t.length===0)throw Error(`respond() requires at least one input response.`);let a=sessionCallbackToTurnCaller(n.callback),o=createDelivery(i),s={inputResponses:t};n.context!==void 0&&(s.context=n.context),n.outputSchema!==void 0&&(s.outputSchema=n.outputSchema);let c={auth:n.auth,delivery:o,kind:`send`,payload:s,requestId:i.requestId};return await r.dispatchSession({command:a===void 0?c:{...c,caller:a},sessionId:e})},async cancel(t){return await r.dispatchSession({command:{kind:`cancel`,turnId:t?.turnId},sessionId:e})},async compact(){return await r.dispatchSession({command:{kind:`compact`},sessionId:e})},async clear(){return await r.dispatchSession({command:{kind:`clear`},sessionId:e})},async reset(t){return await r.dispatchSession({command:{kind:`reset`,reason:t?.reason},sessionId:e})},async getEventStream(t){return r.getEventStream(e,t)},async getStreamTailIndex(){return r.getStreamTailIndex(e)}}}function createAttachSessionFn(e,t={}){return n=>createSession(n,e,t)}function createDelivery(t){return t.channelKind!==void 0&&t.channelName!==void 0?createChannelDeliveryMetadata(t):void 0}function buildSessionHandle(e){return{get id(){return e.get(SessionIdKey)??``},get auth(){return{current:e.get(AuthKey)??null,initiator:e.get(InitiatorAuthKey)??null}},get continuation(){let t=e.get(ContinuationTokenKey);if(!(t===void 0||t.length===0))return{token:toChannelLocalContinuationToken(t),rekey(n){let r=namespaceContinuationToken(t,n);t!==r&&e.set(ContinuationTokenKey,r)}}}}}function namespaceContinuationToken(e,t){let n=e.indexOf(`:`);if(n<=0)throw Error(`Cannot set session continuation token without an existing namespaced continuation token. Start the session with a placeholder continuationToken.`);return`${e.slice(0,n+1)}${t}`}function sessionCallbackToTurnCaller(e){return e===void 0?void 0:{callId:e.callId,replyTo:{kind:`callback`,url:e.url},subagentName:e.subagentName}}export{buildSessionHandle,createAttachSessionFn,createSession,sessionCallbackToTurnCaller};
1
+ import{createChannelDeliveryMetadata}from"#channel/delivery-metadata.js";import{serializeUrlFilePartsInMessage}from"#channel/send-input.js";import{DEFAULT_TURN_POLICY}from"#channel/types.js";import{AuthKey,ContinuationTokenKey,InitiatorAuthKey,SessionIdKey}from"#context/keys.js";import{toChannelLocalContinuationToken}from"#shared/continuation-token.js";function createSession(e,r,i={}){return{id:e,async send(a,o){let s=createDelivery(i),c=sessionCallbackToTurnCaller(o.callback),l={message:serializeUrlFilePartsInMessage(a)};o.context!==void 0&&(l.context=o.context),o.outputSchema!==void 0&&(l.outputSchema=o.outputSchema);let u={auth:o.auth,delivery:s,kind:`send`,payload:l,requestId:i.requestId,turnPolicy:o.turnPolicy??i.turnPolicy??DEFAULT_TURN_POLICY};return await r.dispatchSession({command:c===void 0?u:{...u,caller:c},sessionId:e})},async respond(t,n){if(t.length===0)throw Error(`respond() requires at least one input response.`);let a=sessionCallbackToTurnCaller(n.callback),o=createDelivery(i),s={inputResponses:t};n.context!==void 0&&(s.context=n.context),n.outputSchema!==void 0&&(s.outputSchema=n.outputSchema);let c={auth:n.auth,delivery:o,kind:`send`,payload:s,requestId:i.requestId};return await r.dispatchSession({command:a===void 0?c:{...c,caller:a},sessionId:e})},async cancel(t){return await r.dispatchSession({command:{kind:`cancel`,taskId:t?.taskId,turnId:t?.turnId},sessionId:e})},async compact(){return await r.dispatchSession({command:{kind:`compact`},sessionId:e})},async clear(){return await r.dispatchSession({command:{kind:`clear`},sessionId:e})},async reset(t){return await r.dispatchSession({command:{kind:`reset`,reason:t?.reason},sessionId:e})},async getEventStream(t){return r.getEventStream(e,t)},async getStreamTailIndex(){return r.getStreamTailIndex(e)}}}function createAttachSessionFn(e,t={}){return n=>createSession(n,e,t)}function createDelivery(t){return t.channelKind!==void 0&&t.channelName!==void 0?createChannelDeliveryMetadata(t):void 0}function buildSessionHandle(e){return{get id(){return e.get(SessionIdKey)??``},get auth(){return{current:e.get(AuthKey)??null,initiator:e.get(InitiatorAuthKey)??null}},get continuation(){let t=e.get(ContinuationTokenKey);if(!(t===void 0||t.length===0))return{token:toChannelLocalContinuationToken(t),rekey(n){let r=namespaceContinuationToken(t,n);t!==r&&e.set(ContinuationTokenKey,r)}}}}}function namespaceContinuationToken(e,t){let n=e.indexOf(`:`);if(n<=0)throw Error(`Cannot set session continuation token without an existing namespaced continuation token. Start the session with a placeholder continuationToken.`);return`${e.slice(0,n+1)}${t}`}function sessionCallbackToTurnCaller(e){return e===void 0?void 0:{callId:e.callId,replyTo:{kind:`callback`,token:e.token,url:e.url},subagentName:e.subagentName,taskId:e.taskId}}export{buildSessionHandle,createAttachSessionFn,createSession,sessionCallbackToTurnCaller};
@@ -7,6 +7,7 @@ import type { InputRequest, InputResponse } from "#runtime/input/types.js";
7
7
  import type { ChannelAdapter } from "#channel/adapter.js";
8
8
  import type { AgentLimitsDefinition } from "#shared/agent-definition.js";
9
9
  import type { JsonObject } from "#shared/json.js";
10
+ import type { TaskView } from "#tasks/types.js";
10
11
  export type { ContextAccessor } from "#context/key.js";
11
12
  export type { ChannelInstrumentationProjection } from "#channel/instrumentation.js";
12
13
  import type { ChannelInstrumentationProjection } from "#channel/instrumentation.js";
@@ -14,6 +15,8 @@ export type RunSessionLimits = Pick<AgentLimitsDefinition, "maxInputTokensPerSes
14
15
  /** Identifies the session turn to cancel. */
15
16
  export interface CancelTurnInput {
16
17
  readonly sessionId: string;
18
+ /** Framework task whose queued child deliveries should be discarded. */
19
+ readonly taskId?: string;
17
20
  /** Limits the request to the turn the caller observed. */
18
21
  readonly turnId?: string;
19
22
  }
@@ -110,11 +113,14 @@ export type EventEmitFn = (event: UnstampedMessageStreamEvent) => Promise<void>;
110
113
  export interface TurnCaller {
111
114
  readonly callId: string;
112
115
  readonly subagentName: string;
116
+ /** Present when this turn is the executor for a durable background task. */
117
+ readonly taskId?: string;
113
118
  readonly replyTo: {
114
119
  readonly kind: "hook";
115
120
  readonly token: string;
116
121
  } | {
117
122
  readonly kind: "callback";
123
+ readonly token: string;
118
124
  readonly url: string;
119
125
  };
120
126
  }
@@ -135,6 +141,21 @@ export interface DeliverPayload {
135
141
  readonly message?: string | UserContent;
136
142
  readonly context?: readonly string[];
137
143
  readonly outputSchema?: JsonObject;
144
+ /** Framework-only task envelopes consumed before adapter/model delivery. */
145
+ readonly task?: {
146
+ /** Task HITL input-request batches for the parent's pre-model router. */
147
+ readonly inputRequests?: readonly {
148
+ readonly hookPayload: SubagentInputRequestHookPayload;
149
+ readonly taskId: string;
150
+ }[];
151
+ /** Task authorization events projected through the parent channel. */
152
+ readonly authorizationEvents?: readonly {
153
+ readonly hookPayload: SubagentAuthorizationEventHookPayload;
154
+ readonly taskId: string;
155
+ }[];
156
+ /** Terminal views cached before task-run retention expires. */
157
+ readonly views?: readonly TaskView[];
158
+ };
138
159
  readonly [key: string]: unknown;
139
160
  }
140
161
  /** Controls how a channel message interacts with an active turn. */
@@ -149,9 +170,16 @@ export type SessionCommand = {
149
170
  readonly payload: DeliverPayload;
150
171
  readonly delivery?: ChannelDeliveryMetadata;
151
172
  readonly requestId?: string;
173
+ /**
174
+ * Replay-stable identity for one task-owned child delivery; lets the
175
+ * parent inbox dedupe retried durable-step deliveries. See
176
+ * {@link DeliverHookPayload.taskDeliveryId}.
177
+ */
178
+ readonly taskDeliveryId?: string;
152
179
  readonly turnPolicy?: TurnPolicy;
153
180
  } | {
154
181
  readonly kind: "cancel";
182
+ readonly taskId?: string;
155
183
  readonly turnId?: string;
156
184
  } | {
157
185
  readonly kind: "compact";
@@ -205,6 +233,13 @@ export interface DeliverHookPayload {
205
233
  readonly deliveryMetadata?: readonly ChannelDeliveryMetadataEntry[];
206
234
  /** Inbound channel request id used only for workflow attributes. */
207
235
  readonly requestId?: string;
236
+ /**
237
+ * Replay-stable identity for one task-owned child delivery. Task-run steps
238
+ * derive it from deterministic inputs (task id, event kind, sequence) so the
239
+ * parent inbox can drop the duplicate when a durable step retries after
240
+ * `resumeHook` already succeeded.
241
+ */
242
+ readonly taskDeliveryId?: string;
208
243
  readonly kind: "deliver";
209
244
  readonly payloads: readonly DeliverPayload[];
210
245
  readonly turnPolicy?: TurnPolicy;
@@ -292,6 +327,7 @@ export type HookPayload = ClearSessionHookPayload | CompactSessionHookPayload |
292
327
  export interface SessionCallback {
293
328
  readonly callId: string;
294
329
  readonly subagentName: string;
330
+ readonly taskId?: string;
295
331
  readonly token: string;
296
332
  readonly url: string;
297
333
  }
@@ -402,6 +438,11 @@ export interface RunInput {
402
438
  * parent depth + 1.
403
439
  */
404
440
  readonly subagentDepth?: number;
441
+ /** Framework-owned metadata for a protocol-neutral external invocation. */
442
+ readonly externalInvocation?: {
443
+ readonly continuationToken: string;
444
+ readonly ownerKey: string;
445
+ };
405
446
  }
406
447
  export interface DeliverInput {
407
448
  /**
@@ -13,6 +13,7 @@ const EVE_SESSION_COMPACT_ROUTE_PATTERN = `${EVE_SESSION_ROUTE_PATH}/:sessionId/
13
13
  const EVE_SESSION_CLEAR_ROUTE_PATTERN = `${EVE_SESSION_ROUTE_PATH}/:sessionId/clear`;
14
14
  const EVE_SESSION_RESET_ROUTE_PATTERN = `${EVE_SESSION_ROUTE_PATH}/:sessionId/reset`;
15
15
  const EVE_SESSION_STREAM_ROUTE_PATTERN = `${EVE_SESSION_ROUTE_PATH}/:sessionId/stream`;
16
+ const EVE_SUBAGENT_STREAM_ROUTE_PATTERN = `${EVE_SESSION_ROUTE_PATH}/:parentSessionId/subagents/:callId/:childSessionId/stream`;
16
17
  const EVE_DEV_DISPATCH_SCHEDULE_ROUTE_PATTERN = `${EVE_ROUTE_PREFIX}/dev/schedules/:scheduleId`;
17
18
  const EVE_DEV_RUNTIME_ARTIFACTS_ROUTE_PATH = `${EVE_ROUTE_PREFIX}/dev/runtime-artifacts`;
18
19
  const EVE_DEV_RUNTIME_ARTIFACTS_REBUILD_ROUTE_PATH = `${EVE_DEV_RUNTIME_ARTIFACTS_ROUTE_PATH}/rebuild`;
@@ -21,6 +22,7 @@ const EVE_DEV_RUNTIME_ARTIFACTS_RESUME_ROUTE_PATH = `${EVE_DEV_RUNTIME_ARTIFACTS
21
22
  const EVE_CONNECTION_CALLBACK_ROUTE_PATTERN = `${EVE_ROUTE_PREFIX}/connections/:name/callback/:attemptId/:token`;
22
23
  const EVE_LEGACY_CONNECTION_CALLBACK_ROUTE_PATTERN = `${EVE_ROUTE_PREFIX}/connections/:name/callback/:token`;
23
24
  const EVE_CALLBACK_ROUTE_PATTERN = `${EVE_ROUTE_PREFIX}/callback/:token`;
25
+ const EVE_TASK_INPUT_ROUTE_PATTERN = `${EVE_ROUTE_PREFIX}/task-input/:token`;
24
26
  function createEveSessionRoutePath(sessionId) {
25
27
  return `${EVE_SESSION_ROUTE_PATH}/${encodeURIComponent(sessionId)}`;
26
28
  }
@@ -450,12 +452,27 @@ function isFinalMessageCompleted(event) {
450
452
  //#region src/client/message-response.ts
451
453
  var MessageResponse = class {
452
454
  sessionId;
455
+ #cancelTurn;
456
+ #cancellation;
453
457
  #consumed = false;
454
458
  #createStream;
459
+ #settled = false;
460
+ #turnId = Promise.withResolvers();
455
461
  constructor(input) {
462
+ this.#cancelTurn = input.cancelTurn;
456
463
  this.sessionId = input.sessionId;
457
464
  this.#createStream = input.createStream;
458
465
  }
466
+ cancel() {
467
+ if (this.#settled) return Promise.resolve({ status: "no_active_turn" });
468
+ if (this.#cancellation !== void 0) return this.#cancellation;
469
+ const cancellation = this.#turnId.promise.then((turnId) => turnId === void 0 ? { status: "no_active_turn" } : this.#cancelTurn(turnId));
470
+ this.#cancellation = cancellation;
471
+ cancellation.catch(() => {
472
+ if (!this.#settled && this.#cancellation === cancellation) this.#cancellation = void 0;
473
+ });
474
+ return cancellation;
475
+ }
459
476
  async result() {
460
477
  const events = [];
461
478
  for await (const event of this) events.push(event);
@@ -472,7 +489,21 @@ var MessageResponse = class {
472
489
  [Symbol.asyncIterator]() {
473
490
  if (this.#consumed) throw new Error("MessageResponse has already been consumed.");
474
491
  this.#consumed = true;
475
- return this.#createStream();
492
+ return this.#observeStream();
493
+ }
494
+ async *#observeStream() {
495
+ try {
496
+ for await (const event of this.#createStream()) {
497
+ if (event.type === "turn.started") this.#turnId.resolve(event.data.turnId);
498
+ else if (isCurrentTurnBoundaryEvent(event)) {
499
+ this.#settled = true;
500
+ this.#turnId.resolve(void 0);
501
+ }
502
+ yield event;
503
+ }
504
+ } finally {
505
+ this.#turnId.resolve(void 0);
506
+ }
476
507
  }
477
508
  };
478
509
 
@@ -651,7 +682,7 @@ async function* followStreamIterable(input) {
651
682
  if (!isStreamDisconnectError(error)) throw error;
652
683
  }
653
684
  if (input.signal?.aborted || input.startIndex < 0 || idleRetryPolicy.maxAttempts === 0) return;
654
- if (!deliveredEvent && !initialConnection && (idleReconnects += 1) >= idleRetryPolicy.maxAttempts) return;
685
+ if (input.keepAlive !== true && !deliveredEvent && !initialConnection && (idleReconnects += 1) >= idleRetryPolicy.maxAttempts) return;
655
686
  initialConnection = false;
656
687
  await sleep(reconnectDelayMs, input.signal);
657
688
  if (input.signal?.aborted) return;
@@ -1025,6 +1056,7 @@ var ClientSession = class ClientSession {
1025
1056
  #messageResponse(response, input, initialStreamIndex) {
1026
1057
  response.body?.cancel().catch(() => {});
1027
1058
  return new MessageResponse({
1059
+ cancelTurn: async (turnId) => await this.cancel({ turnId }),
1028
1060
  createStream: () => this.#createEventStream(initialStreamIndex, input),
1029
1061
  sessionId: this.#state.sessionId
1030
1062
  });
@@ -1034,6 +1066,7 @@ var ClientSession = class ClientSession {
1034
1066
  try {
1035
1067
  for await (const event of this.#readStream({
1036
1068
  headers: input.headers,
1069
+ keepAlive: shouldKeepActiveTurnAlive(input.streamReconnectPolicy),
1037
1070
  signal: input.signal,
1038
1071
  startIndex: initialStreamIndex,
1039
1072
  streamReconnectPolicy: input.streamReconnectPolicy
@@ -1073,6 +1106,7 @@ var ClientSession = class ClientSession {
1073
1106
  return followStreamIterable({
1074
1107
  follow: input.follow,
1075
1108
  host: this.#context.host,
1109
+ keepAlive: input.keepAlive,
1076
1110
  resolveHeaders: () => this.#context.resolveHeaders(input.headers),
1077
1111
  redirect: this.#context.redirect,
1078
1112
  sessionId: this.#state.sessionId,
@@ -1082,6 +1116,10 @@ var ClientSession = class ClientSession {
1082
1116
  });
1083
1117
  }
1084
1118
  };
1119
+ function shouldKeepActiveTurnAlive(policy) {
1120
+ if (policy && "reconnect" in policy) return false;
1121
+ return policy?.streamIdleReconnectPolicy?.maxAttempts === void 0;
1122
+ }
1085
1123
  async function postTurn(context, path, input, requireMessage) {
1086
1124
  const body = createMessageBody(input, requireMessage);
1087
1125
  if (body === null) throw new Error(requireMessage ? "Creating a session requires a non-empty message." : "A session turn requires a non-empty message or inputResponses.");
@@ -1266,6 +1304,7 @@ function createEventDeduper() {
1266
1304
 
1267
1305
  //#endregion
1268
1306
  //#region src/client/eve-agent-store.ts
1307
+ const detachStore = Symbol("detachEveAgentStore");
1269
1308
  var EveAgentStore = class {
1270
1309
  #client;
1271
1310
  #externalSession;
@@ -1273,12 +1312,11 @@ var EveAgentStore = class {
1273
1312
  #reducer;
1274
1313
  #subscribers = /* @__PURE__ */ new Set();
1275
1314
  #seenEvents = createEventDeduper();
1276
- #abortController;
1315
+ #activeTurn;
1277
1316
  #callbacks = {};
1278
1317
  #data;
1279
1318
  #error;
1280
1319
  #events;
1281
- #operationId = 0;
1282
1320
  #pendingMessageSubmission;
1283
1321
  #projectionEvents;
1284
1322
  #session;
@@ -1315,27 +1353,33 @@ var EveAgentStore = class {
1315
1353
  }
1316
1354
  async send(input) {
1317
1355
  if (this.#status === "streaming" || this.#status === "submitted") throw new Error("eve session is already processing a turn.");
1318
- const operationId = this.#startOperation();
1319
- const abortController = new AbortController();
1320
- this.#abortController = abortController;
1356
+ const response = Promise.withResolvers();
1357
+ const turn = {
1358
+ abortController: new AbortController(),
1359
+ response: response.promise,
1360
+ resolveResponse: response.resolve
1361
+ };
1362
+ this.#activeTurn = turn;
1321
1363
  this.#error = void 0;
1322
1364
  this.#status = "submitted";
1323
1365
  this.#publish();
1324
1366
  try {
1325
1367
  const preparedInput = await this.#callbacks.prepareSend?.(input) ?? input;
1326
1368
  assertExclusiveTurnInput(preparedInput);
1327
- if (!this.#isCurrentOperation(operationId)) return;
1369
+ if (!this.#isActiveTurn(turn)) return;
1328
1370
  this.#projectOptimisticMessage(preparedInput);
1329
1371
  this.#projectInputResponses(preparedInput);
1330
1372
  this.#publish();
1331
1373
  const turnInput = {
1332
1374
  ...preparedInput,
1333
- signal: createAbortSignal(preparedInput.signal, abortController.signal)
1375
+ signal: createAbortSignal(preparedInput.signal, turn.abortController.signal)
1334
1376
  };
1335
1377
  const response = await this.#dispatchTurn(turnInput);
1378
+ if (!this.#isActiveTurn(turn)) return;
1379
+ turn.resolveResponse(response);
1336
1380
  let sawEvent = false;
1337
1381
  for await (const event of response) {
1338
- if (!this.#isCurrentOperation(operationId)) return;
1382
+ if (!this.#isActiveTurn(turn)) return;
1339
1383
  if (!sawEvent) {
1340
1384
  sawEvent = true;
1341
1385
  this.#status = "streaming";
@@ -1347,10 +1391,10 @@ var EveAgentStore = class {
1347
1391
  this.#applyTerminalStreamFailure(event);
1348
1392
  this.#publish();
1349
1393
  }
1350
- if (!this.#isCurrentOperation(operationId)) return;
1394
+ if (!this.#isActiveTurn(turn)) return;
1351
1395
  this.#status = this.#error === void 0 ? "ready" : "error";
1352
1396
  } catch (error) {
1353
- if (!this.#isCurrentOperation(operationId)) return;
1397
+ if (!this.#isActiveTurn(turn)) return;
1354
1398
  if (isAbortError(error)) {
1355
1399
  this.#status = "ready";
1356
1400
  this.#failPendingMessageSubmission(toError(error));
@@ -1361,21 +1405,28 @@ var EveAgentStore = class {
1361
1405
  this.#callbacks.onError?.(this.#error);
1362
1406
  }
1363
1407
  } finally {
1364
- if (this.#isCurrentOperation(operationId)) {
1365
- this.#abortController = void 0;
1408
+ if (this.#isActiveTurn(turn)) {
1409
+ turn.resolveResponse(void 0);
1410
+ this.#activeTurn = void 0;
1366
1411
  this.#callbacks.onSessionChange?.(this.#session?.state);
1367
1412
  this.#publish();
1368
1413
  this.#callbacks.onFinish?.(this.#snapshot);
1369
1414
  }
1370
1415
  }
1371
1416
  }
1372
- stop() {
1373
- this.#abortController?.abort();
1417
+ cancel() {
1418
+ const turn = this.#activeTurn;
1419
+ if (turn === void 0) return Promise.resolve({ status: "no_active_turn" });
1420
+ return turn.response.then((response) => response === void 0 ? { status: "no_active_turn" } : response.cancel());
1421
+ }
1422
+ [detachStore]() {
1423
+ this.#activeTurn?.abortController.abort();
1374
1424
  }
1375
1425
  reset() {
1376
- this.#invalidateOperation();
1377
- this.stop();
1378
- this.#abortController = void 0;
1426
+ const turn = this.#activeTurn;
1427
+ this.#activeTurn = void 0;
1428
+ turn?.resolveResponse(void 0);
1429
+ turn?.abortController.abort();
1379
1430
  if (!this.#externalSession) this.#session = void 0;
1380
1431
  this.#events = [];
1381
1432
  this.#seenEvents = createEventDeduper();
@@ -1408,15 +1459,8 @@ var EveAgentStore = class {
1408
1459
  const { inputResponses, ...options } = input;
1409
1460
  return await this.#session.respond(inputResponses, options);
1410
1461
  }
1411
- #startOperation() {
1412
- this.#operationId += 1;
1413
- return this.#operationId;
1414
- }
1415
- #invalidateOperation() {
1416
- this.#operationId += 1;
1417
- }
1418
- #isCurrentOperation(operationId) {
1419
- return this.#operationId === operationId;
1462
+ #isActiveTurn(turn) {
1463
+ return this.#activeTurn === turn;
1420
1464
  }
1421
1465
  #projectOptimisticMessage(input) {
1422
1466
  if (!this.#optimistic || input.message === void 0) return;
@@ -1514,6 +1558,9 @@ var EveAgentStore = class {
1514
1558
  for (const subscriber of this.#subscribers) subscriber();
1515
1559
  }
1516
1560
  };
1561
+ function detachEveAgentStore(store) {
1562
+ store[detachStore]();
1563
+ }
1517
1564
  function assertExclusiveTurnInput(input) {
1518
1565
  if (input.message !== void 0 === (input.inputResponses !== void 0)) throw new Error("A turn requires exactly one of message or inputResponses.");
1519
1566
  }
@@ -2121,7 +2168,7 @@ var SvelteEveAgent = class {
2121
2168
  });
2122
2169
  return () => {
2123
2170
  unsubscribe();
2124
- store.stop();
2171
+ detachEveAgentStore(store);
2125
2172
  };
2126
2173
  });
2127
2174
  }
@@ -2145,6 +2192,9 @@ var SvelteEveAgent = class {
2145
2192
  this.#subscribe();
2146
2193
  return this.#snapshot.status;
2147
2194
  }
2195
+ cancel = () => {
2196
+ return this.#store.cancel();
2197
+ };
2148
2198
  reset = () => {
2149
2199
  this.#store.reset();
2150
2200
  };
@@ -2160,9 +2210,6 @@ var SvelteEveAgent = class {
2160
2210
  message
2161
2211
  });
2162
2212
  };
2163
- stop = () => {
2164
- this.#store.stop();
2165
- };
2166
2213
  };
2167
2214
  function useEveAgent(options = {}) {
2168
2215
  const reducer = options.reducer ?? defaultMessageReducer();