eve 0.85.0 → 0.87.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 (290) hide show
  1. package/CHANGELOG.md +34 -3073
  2. package/README.md +7 -4
  3. package/dist/src/acp/adapter.d.ts +2 -26
  4. package/dist/src/acp/adapter.js +1 -1
  5. package/dist/src/acp/server.d.ts +0 -3
  6. package/dist/src/ai/decision-adapter.d.ts +5 -3
  7. package/dist/src/ai/decision-adapter.js +1 -1
  8. package/dist/src/ai/decision-types.d.ts +4 -3
  9. package/dist/src/channel/adapter.d.ts +0 -14
  10. package/dist/src/channel/auth/definitions.d.ts +0 -4
  11. package/dist/src/channel/channel-address.d.ts +1 -1
  12. package/dist/src/channel/channel-address.js +1 -1
  13. package/dist/src/channel/channel-operations.d.ts +2 -2
  14. package/dist/src/channel/channel-operations.js +1 -1
  15. package/dist/src/channel/prompt-queue.d.ts +0 -2
  16. package/dist/src/channel/session-not-active-error.d.ts +10 -5
  17. package/dist/src/channel/session-not-active-error.js +1 -1
  18. package/dist/src/channel/session-stranded-error.d.ts +1 -1
  19. package/dist/src/channel/session.d.ts +3 -4
  20. package/dist/src/channel/session.js +1 -1
  21. package/dist/src/channel/types.d.ts +5 -14
  22. package/dist/src/chunks/{use-eve-agent-B2jCfcnG.js → use-eve-agent-BExXjBv6.js} +82 -72
  23. package/dist/src/chunks/{use-eve-agent-DCLFi26P.js → use-eve-agent-C0KHCyb9.js} +82 -72
  24. package/dist/src/cli/commands/agent-prompt/collect-intent.md +2 -1
  25. package/dist/src/cli/commands/agent-prompt/scaffold.md +1 -2
  26. package/dist/src/cli/dev/command-options.d.ts +4 -4
  27. package/dist/src/cli/dev/command.js +1 -1
  28. package/dist/src/cli/dev/tui/runner.d.ts +1 -1
  29. package/dist/src/cli/dev/tui/runner.js +2 -2
  30. package/dist/src/cli/dev/tui/test/fake-eve-server.js +1 -1
  31. package/dist/src/cli/dev/tui/tool-format.d.ts +2 -2
  32. package/dist/src/cli/dev/ui-options.d.ts +4 -4
  33. package/dist/src/cli/dev/ui-options.js +1 -1
  34. package/dist/src/cli/run.js +1 -1
  35. package/dist/src/client/agent-info-error.d.ts +4 -1
  36. package/dist/src/client/agent-info-error.js +1 -1
  37. package/dist/src/client/agent-session.d.ts +1 -4
  38. package/dist/src/client/agent-session.js +1 -1
  39. package/dist/src/client/agent-stream-follower.js +1 -1
  40. package/dist/src/client/client-error.d.ts +13 -4
  41. package/dist/src/client/client-error.js +1 -1
  42. package/dist/src/client/delivery.d.ts +2 -17
  43. package/dist/src/client/health-response-error.d.ts +4 -1
  44. package/dist/src/client/health-response-error.js +1 -1
  45. package/dist/src/client/index.d.ts +5 -3
  46. package/dist/src/client/index.js +1 -1
  47. package/dist/src/client/open-stream.d.ts +7 -12
  48. package/dist/src/client/open-stream.js +1 -1
  49. package/dist/src/client/session-controls.d.ts +2 -2
  50. package/dist/src/client/session-controls.js +1 -1
  51. package/dist/src/client/session-event-stream.d.ts +2 -2
  52. package/dist/src/client/session-event-stream.js +1 -1
  53. package/dist/src/client/session-store.d.ts +2 -6
  54. package/dist/src/client/session-store.js +1 -1
  55. package/dist/src/client/session.d.ts +4 -13
  56. package/dist/src/client/session.js +1 -1
  57. package/dist/src/client/sessions.d.ts +3 -6
  58. package/dist/src/client/types.d.ts +23 -32
  59. package/dist/src/compiled/.vendor-stamp.json +4 -4
  60. package/dist/src/compiled/@vercel/agent-runs/LICENSE +202 -0
  61. package/dist/src/compiled/@vercel/schedules/index.d.ts +45 -6
  62. package/dist/src/compiled/@vercel/schedules/index.js +2 -2
  63. package/dist/src/compiler/manifest.js +1 -1
  64. package/dist/src/compiler/normalize-agent-config.js +1 -1
  65. package/dist/src/compiler/normalize-connection.d.ts +1 -1
  66. package/dist/src/compiler/normalize-connection.js +1 -1
  67. package/dist/src/compiler/normalize-instructions.js +1 -1
  68. package/dist/src/compiler/normalize-skill.js +1 -1
  69. package/dist/src/compiler/resolve-workspace-subagent.js +1 -1
  70. package/dist/src/context/memory-tools.d.ts +9 -5
  71. package/dist/src/discover/sandbox.js +1 -1
  72. package/dist/src/dynamic/definition.d.ts +11 -5
  73. package/dist/src/dynamic/definition.js +1 -1
  74. package/dist/src/evals/mock-model.d.ts +1 -1
  75. package/dist/src/evals/session-manager.d.ts +0 -2
  76. package/dist/src/evals/session.d.ts +1 -11
  77. package/dist/src/evals/session.js +1 -1
  78. package/dist/src/eve-channel/index.js +1 -1
  79. package/dist/src/eve-channel/support.js +1 -1
  80. package/dist/src/execution/dynamic-workflow/tool.js +1 -1
  81. package/dist/src/execution/effective-agent-config.js +1 -1
  82. package/dist/src/execution/proxied-deliver-step.js +1 -1
  83. package/dist/src/execution/sandbox/bindings/just-bash-runtime.d.ts +1 -2
  84. package/dist/src/execution/sandbox/bindings/just-bash-runtime.js +1 -1
  85. package/dist/src/execution/sandbox/bindings/just-bash.js +1 -1
  86. package/dist/src/execution/session/active-turn.js +1 -1
  87. package/dist/src/execution/session/answer-caller.d.ts +9 -5
  88. package/dist/src/execution/session/answer-caller.js +1 -1
  89. package/dist/src/execution/session/principal.d.ts +8 -0
  90. package/dist/src/execution/session/principal.js +1 -1
  91. package/dist/src/execution/session/program.js +1 -1
  92. package/dist/src/execution/session/turn-step.js +1 -1
  93. package/dist/src/execution/session/turn.js +1 -1
  94. package/dist/src/execution/session-callback-request.js +1 -1
  95. package/dist/src/execution/tools/agent-router-workflow.js +1 -1
  96. package/dist/src/harness/attachment-staging.d.ts +2 -2
  97. package/dist/src/harness/attachment-staging.js +1 -1
  98. package/dist/src/instrumentation/ai-sdk-telemetry.d.ts +0 -2
  99. package/dist/src/instrumentation/providers.d.ts +1 -38
  100. package/dist/src/instrumentation/providers.js +1 -1
  101. package/dist/src/instrumentation/setup-context.d.ts +1 -7
  102. package/dist/src/internal/application/package.d.ts +1 -0
  103. package/dist/src/internal/application/package.js +1 -1
  104. package/dist/src/internal/application/stamped-package-version.js +1 -1
  105. package/dist/src/internal/authored-definition/core.js +1 -1
  106. package/dist/src/internal/authored-definition/schema-backed.js +1 -1
  107. package/dist/src/internal/classify-model-routing.d.ts +2 -3
  108. package/dist/src/internal/nitro/host/create-application-nitro.js +1 -1
  109. package/dist/src/internal/nitro/routes/schedule-collection-consumer.js +1 -1
  110. package/dist/src/internal/runtime-model.d.ts +9 -4
  111. package/dist/src/internal/runtime-model.js +1 -1
  112. package/dist/src/internal/workflow-bundle/authored-workflow-directives.js +1 -1
  113. package/dist/src/internal/workflow-bundle/builder-support.d.ts +1 -1
  114. package/dist/src/internal/workflow-bundle/builder-support.js +1 -1
  115. package/dist/src/internal/workflow-bundle/workflow-transformer.js +1 -1
  116. package/dist/src/models/auto.js +1 -1
  117. package/dist/src/protocol/delivery.d.ts +1 -0
  118. package/dist/src/protocol/reset-session.d.ts +0 -2
  119. package/dist/src/protocol/routes.d.ts +9 -2
  120. package/dist/src/protocol/routes.js +1 -1
  121. package/dist/src/public/channels/chat-sdk/chatSdkChannel.d.ts +1 -22
  122. package/dist/src/public/channels/discord/discordChannel.d.ts +3 -12
  123. package/dist/src/public/channels/discord/gateway/{index.d.ts → relay.d.ts} +2 -2
  124. package/dist/src/public/channels/discord/gateway/relay.js +1 -0
  125. package/dist/src/public/channels/discord/messages.d.ts +4 -4
  126. package/dist/src/public/channels/github/state.d.ts +0 -2
  127. package/dist/src/public/channels/index.d.ts +1 -2
  128. package/dist/src/public/channels/index.js +1 -1
  129. package/dist/src/public/channels/linear/index.d.ts +1 -1
  130. package/dist/src/public/channels/linear/index.js +1 -1
  131. package/dist/src/public/channels/linear/linearChannel.d.ts +0 -5
  132. package/dist/src/public/channels/linq/index.d.ts +1 -1
  133. package/dist/src/public/channels/linq/linqChannel.d.ts +7 -5
  134. package/dist/src/public/channels/photon/index.d.ts +1 -1
  135. package/dist/src/public/channels/photon/photonIMessageChannel.d.ts +15 -4
  136. package/dist/src/public/channels/slack/api.d.ts +1 -1
  137. package/dist/src/public/channels/slack/api.js +1 -1
  138. package/dist/src/public/channels/slack/blocks.d.ts +1 -1
  139. package/dist/src/public/channels/slack/blocks.js +2 -2
  140. package/dist/src/public/channels/slack/cards.d.ts +2 -297
  141. package/dist/src/public/channels/slack/cards.js +1 -1
  142. package/dist/src/public/channels/slack/index.d.ts +2 -2
  143. package/dist/src/public/channels/slack/index.js +1 -1
  144. package/dist/src/public/channels/slack/session-operations.d.ts +2 -2
  145. package/dist/src/public/channels/slack/session-operations.js +1 -1
  146. package/dist/src/public/channels/slack/slackChannel.d.ts +11 -72
  147. package/dist/src/public/channels/slack/slackChannel.js +1 -1
  148. package/dist/src/public/channels/teams/teamsChannel.d.ts +4 -3
  149. package/dist/src/public/channels/telegram/hitl.d.ts +2 -9
  150. package/dist/src/public/channels/telegram/index.d.ts +1 -1
  151. package/dist/src/public/channels/telegram/telegramChannel.d.ts +0 -2
  152. package/dist/src/public/channels/twilio/twilioChannel.d.ts +0 -2
  153. package/dist/src/public/channels/undelivered-reply.d.ts +0 -5
  154. package/dist/src/public/definitions/agent.d.ts +15 -7
  155. package/dist/src/public/definitions/agent.js +1 -1
  156. package/dist/src/public/definitions/channel.d.ts +7 -5
  157. package/dist/src/public/definitions/channel.js +1 -1
  158. package/dist/src/public/definitions/connections/protocol.d.ts +1 -7
  159. package/dist/src/public/definitions/connections/protocol.js +1 -1
  160. package/dist/src/public/experimental/channels/discord/gateway.d.ts +1 -0
  161. package/dist/src/public/experimental/channels/discord/gateway.js +1 -0
  162. package/dist/src/public/experimental/sandbox/just-bash.d.ts +1 -0
  163. package/dist/src/public/experimental/sandbox/just-bash.js +1 -0
  164. package/dist/src/public/experimental/workspace/index.d.ts +1 -0
  165. package/dist/src/public/experimental/workspace/index.js +1 -0
  166. package/dist/src/public/index.d.ts +2 -2
  167. package/dist/src/public/index.js +1 -1
  168. package/dist/src/public/instrumentation/otel.d.ts +1 -1
  169. package/dist/src/public/instrumentation/provider.d.ts +1 -1
  170. package/dist/src/public/instrumentation/provider.js +1 -1
  171. package/dist/src/public/memory/file/backend.d.ts +1 -1
  172. package/dist/src/public/memory/file/backends/in-memory.js +1 -1
  173. package/dist/src/public/memory/file/backends/vercel-blob.js +1 -1
  174. package/dist/src/public/memory/file/provider.js +1 -1
  175. package/dist/src/public/memory/index.d.ts +3 -11
  176. package/dist/src/public/models/anthropic/index.d.ts +1 -1
  177. package/dist/src/public/models/index.d.ts +1 -0
  178. package/dist/src/public/models/openai/index.d.ts +2 -2
  179. package/dist/src/public/next/index.d.ts +2 -2
  180. package/dist/src/public/sandbox/just-bash-sandbox.d.ts +27 -20
  181. package/dist/src/public/sandbox/just-bash.d.ts +0 -1
  182. package/dist/src/public/schedules/providers/vercel.d.ts +2 -0
  183. package/dist/src/public/schedules/providers/vercel.js +1 -1
  184. package/dist/src/public/sessions/index.d.ts +1 -0
  185. package/dist/src/public/sessions/index.js +1 -1
  186. package/dist/src/public/tools/index.d.ts +1 -1
  187. package/dist/src/public/tools/index.js +1 -1
  188. package/dist/src/public/workflow/api.d.ts +25 -0
  189. package/dist/src/public/workflow/api.js +1 -0
  190. package/dist/src/public/workflow/index.d.ts +76 -0
  191. package/dist/src/public/workflow/index.js +1 -0
  192. package/dist/src/public/workflow-modules.d.ts +2 -17
  193. package/dist/src/react/use-eve-agent.d.ts +3 -2
  194. package/dist/src/react/use-eve-agent.js +1 -1
  195. package/dist/src/reactions/kinds/model.js +1 -1
  196. package/dist/src/runtime/agent/resolve-model.js +1 -1
  197. package/dist/src/runtime/resolve-agent.js +1 -1
  198. package/dist/src/runtime/resolve-dynamic.js +1 -1
  199. package/dist/src/runtime/subagents/dynamic-agent-config.js +1 -1
  200. package/dist/src/runtime/subagents/workflow.js +1 -1
  201. package/dist/src/sandbox/providers/default.js +1 -1
  202. package/dist/src/self-modification/extension/subagents/agent/agent.d.ts +2 -2
  203. package/dist/src/self-modification/sandbox.js +1 -1
  204. package/dist/src/setup/integrations/discord/daemon.js +2 -2
  205. package/dist/src/setup/scaffold/create/project.js +2 -2
  206. package/dist/src/setup/scaffold/create/web-template.d.ts +2 -2
  207. package/dist/src/setup/scaffold/create/web-template.js +2 -2
  208. package/dist/src/setup/verified-remote-agent.d.ts +1 -3
  209. package/dist/src/shared/agent-definition.d.ts +18 -9
  210. package/dist/src/shared/eve-error.d.ts +22 -0
  211. package/dist/src/shared/eve-error.js +1 -0
  212. package/dist/src/shared/session.d.ts +2 -2
  213. package/dist/src/shared/token-usage.d.ts +7 -1
  214. package/dist/src/svelte/index.js +1 -1
  215. package/dist/src/svelte/use-eve-agent.d.ts +2 -1
  216. package/dist/src/svelte/use-eve-agent.js +1 -1
  217. package/dist/src/tools/definition.d.ts +7 -5
  218. package/dist/src/tools/definition.js +1 -1
  219. package/dist/src/tools/provided/ask-question-workflow.js +1 -1
  220. package/dist/src/tools/provided/sleep-workflow.js +1 -1
  221. package/dist/src/tracing/eve/batch-span-processor.d.ts +1 -1
  222. package/dist/src/tracing/eve/content-span-processor.d.ts +1 -19
  223. package/dist/src/tracing/eve/otel-configuration.d.ts +6 -0
  224. package/dist/src/tracing/eve/otel-declaration.d.ts +6 -19
  225. package/dist/src/tracing/eve/span-export-policy.d.ts +0 -2
  226. package/dist/src/tracing/local/instrumentation-runtime.d.ts +0 -3
  227. package/dist/src/tracing/local/traces.d.ts +0 -13
  228. package/dist/src/vue/index.js +1 -1
  229. package/dist/src/vue/use-eve-agent.d.ts +3 -2
  230. package/dist/src/vue/use-eve-agent.js +1 -1
  231. package/docs/agent-config.md +15 -11
  232. package/docs/channels/custom.mdx +26 -10
  233. package/docs/channels/discord.mdx +10 -10
  234. package/docs/channels/eve.mdx +15 -13
  235. package/docs/channels/linear.mdx +11 -0
  236. package/docs/channels/linq.mdx +5 -1
  237. package/docs/channels/photon.mdx +6 -1
  238. package/docs/channels/slack.mdx +73 -14
  239. package/docs/channels/telegram.mdx +6 -0
  240. package/docs/code-extension.mdx +25 -0
  241. package/docs/concepts/default-harness.md +2 -2
  242. package/docs/concepts/execution-model-and-durability.mdx +11 -11
  243. package/docs/concepts/project-structure.mdx +1 -1
  244. package/docs/concepts/security-model.md +6 -2
  245. package/docs/concepts/sessions-runs-and-streaming.md +23 -10
  246. package/docs/concepts/upgrade-to-v27-events.md +70 -1
  247. package/docs/connections/overview.mdx +4 -0
  248. package/docs/evals/reporters.mdx +21 -0
  249. package/docs/extensions.md +12 -0
  250. package/docs/getting-started.mdx +6 -0
  251. package/docs/guides/auth-and-route-protection.md +2 -1
  252. package/docs/guides/client/continuations.mdx +12 -10
  253. package/docs/guides/client/messages.mdx +24 -1
  254. package/docs/guides/client/overview.mdx +8 -6
  255. package/docs/guides/client/streaming.mdx +25 -7
  256. package/docs/guides/decide.md +3 -3
  257. package/docs/guides/deployment/self-hosting.md +1 -1
  258. package/docs/guides/deployment/vercel.mdx +1 -1
  259. package/docs/guides/dev-tui.md +2 -2
  260. package/docs/guides/frontend/meta.json +1 -0
  261. package/docs/guides/frontend/nextjs.mdx +329 -121
  262. package/docs/guides/frontend/overview.mdx +115 -335
  263. package/docs/guides/frontend/tanstack.mdx +1 -1
  264. package/docs/guides/frontend/use-eve-agent-svelte.mdx +18 -16
  265. package/docs/guides/frontend/use-eve-agent-vue.mdx +18 -16
  266. package/docs/guides/frontend/use-eve-agent.mdx +385 -0
  267. package/docs/guides/hooks.md +1 -1
  268. package/docs/guides/instrumentation/otel.mdx +3 -1
  269. package/docs/guides/prepare-for-1-0.md +255 -0
  270. package/docs/guides/remote-agents.md +26 -22
  271. package/docs/guides/self-modification.md +6 -0
  272. package/docs/instructions.mdx +1 -1
  273. package/docs/memory/custom-provider.md +1 -1
  274. package/docs/memory/file.md +11 -2
  275. package/docs/meta.json +1 -0
  276. package/docs/reference/agent-files.md +17 -17
  277. package/docs/reference/cli.md +15 -11
  278. package/docs/reference/typescript-api.md +46 -20
  279. package/docs/sandbox/custom-providers.mdx +2 -0
  280. package/docs/sandbox/default.mdx +6 -6
  281. package/docs/sandbox/index.mdx +6 -6
  282. package/docs/sandbox/just-bash.mdx +30 -21
  283. package/docs/subagents/index.mdx +4 -4
  284. package/docs/tools/human-in-the-loop.md +1 -1
  285. package/docs/tools/workflows.mdx +52 -8
  286. package/docs/tutorial/first-agent.mdx +1 -1
  287. package/package.json +46 -27
  288. package/dist/src/public/channels/discord/gateway/index.js +0 -1
  289. package/dist/src/self-modification/agent.d.ts +0 -12
  290. package/dist/src/self-modification/agent.js +0 -1
@@ -5,6 +5,8 @@ description: "The define* helpers, the runtime ctx, and where each one is import
5
5
 
6
6
  This is the public surface of the `eve` package: the `define*` helpers you author with, the `ctx` they receive at runtime, and the import path for each. The package's export map defines the full contract; source files that are not reachable through an exported package subpath are framework internals.
7
7
 
8
+ For changes to an existing application, follow [Prepare for 1.0](../guides/prepare-for-1-0).
9
+
8
10
  Identity comes from the filesystem, not a field you set. A tool at `agent/tools/get_weather.ts` is `get_weather`, and a connection at `agent/connections/linear.ts` is `linear`, so no definition carries a `name` or `id`.
9
11
 
10
12
  Most files look the same: import a helper, default-export the result.
@@ -33,18 +35,18 @@ export default defineTool({
33
35
  Install the framework packages for the integration you import. These are optional peers of eve;
34
36
  using another entry does not require them.
35
37
 
36
- | Entry | Required integration packages |
37
- | ------------------------------------------ | ----------------------------------------------------- |
38
- | `eve/react` | `react` 19 (and its React typings in TypeScript apps) |
39
- | `eve/vue` | `vue` 3.5 or later in v3 |
40
- | `eve/svelte` | `svelte` 5 |
41
- | `eve/next` | `next` 16 and `react` 19 |
42
- | `eve/sveltekit`, `eve/tanstack` | `vite` 8.3.1 or later in v8 |
43
- | `eve/nuxt` | `@nuxt/kit` 4 and `@nuxt/schema` 4 |
44
- | Chat SDK, Linq, and Photon channels | `chat` 4.42 or later in v4 |
45
- | `eve/channels/linq` | Also `@linqapp/sdk` 0.47.1 or later in v0.47 |
46
- | `eve/sandbox/just-bash` | `just-bash` 3.6 or later in v3 |
47
- | `@vercel/connect/eve` with eve connections | `@vercel/connect` 2.5.2 or later in v2 |
38
+ | Entry | Required integration packages |
39
+ | ------------------------------------------------------------- | ----------------------------------------------------- |
40
+ | `eve/react` | `react` 19 (and its React typings in TypeScript apps) |
41
+ | `eve/vue` | `vue` 3.5 or later in v3 |
42
+ | `eve/svelte` | `svelte` 5 |
43
+ | `eve/next` | `next` 16 and `react` 19 |
44
+ | `eve/sveltekit`, `eve/tanstack` | `vite` 8.3.1 or later in v8 |
45
+ | `eve/nuxt` | `@nuxt/kit` 4 and `@nuxt/schema` 4 |
46
+ | Chat SDK, Linq, and Photon channels | `chat` 4.42 or later in v4 |
47
+ | `eve/channels/linq` | Also `@linqapp/sdk` 0.47.1 or later in v0.47 |
48
+ | `eve/sandbox/just-bash`, `eve/experimental/sandbox/just-bash` | `just-bash` 3.6 or later in v3 |
49
+ | `@vercel/connect/eve` with eve connections | `@vercel/connect` 2.5.2 or later in v2 |
48
50
 
49
51
  Connections with `experimental.events` require a static Connect auth provider with its events bridge.
50
52
  SDK-backed handles use the SDK classes installed in your app, not copies bundled with eve.
@@ -137,7 +139,7 @@ Tool definitions accept `availableInSubagents: false` to restrict the tool to to
137
139
 
138
140
  | Import | Holds |
139
141
  | --------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
140
- | `eve` | `defineAgent`, `defineRemoteAgent`, `defineDynamic`, agent config types |
142
+ | `eve` | `defineAgent`, `defineRemoteAgent`, `defineDynamic`, agent config types, `TokenUsage` |
141
143
  | `eve/tools` | `defineTool`, `defineWorkflowTool`, `defineDynamic`, `disableTool`, tool types |
142
144
  | `eve/tools/{bash,read_file,write_file,web_fetch,glob,grep}` | Individual reusable tool definitions |
143
145
  | `eve/tools/approval` | Approval types and `auto`, `always`, `once`, `never` |
@@ -146,6 +148,8 @@ Tool definitions accept `availableInSubagents: false` to restrict the tool to to
146
148
  | `eve/tools/workflow` | Runtime-generated `workflow` tool factory |
147
149
  | `eve/tools/sleep` | Opt-in durable `sleep` tool |
148
150
  | `eve/tools/no_reply` | Opt-in `noReply` tool definition |
151
+ | [`eve/workflow`](../tools/workflows#workflow-imports) | Durable `createHook`, `createWebhook`, `sleep`, `FatalError`, `RetryableError`, `getWorkflowMetadata`, hook types |
152
+ | [`eve/workflow/api`](../tools/workflows#workflow-imports) | `start`, `getRun`, `resumeHook`, `WorkflowRun`, and `WorkflowRunStatus` for routes and steps |
149
153
  | `eve/connections` | `defineMcpClientConnection`, `defineOpenAPIConnection`, `defineDynamic` |
150
154
  | `eve/channels` | `defineChannel`, `disableRoute`, route verbs, `isChannel`, channel metadata types |
151
155
  | `eve/channels/eve` | `eveChannel` |
@@ -166,9 +170,9 @@ Tool definitions accept `availableInSubagents: false` to restrict the tool to to
166
170
  | [`eve/sandbox/vercel`](../sandbox/vercel) | `VercelSandbox` and Vercel environment, session, and mount types |
167
171
  | [`eve/sandbox/just-bash`](../sandbox/just-bash) | `JustBashSandbox` and just-bash environment types |
168
172
  | `eve/instrumentation` | `defineInstrumentation`, `disableInstrumentation`, `InstrumentationEvent<K>`, lifecycle provider types |
169
- | `eve/instrumentation/otel` | `otel`, `otelIntegration`, `localTraces`, `agentRuns`, OpenTelemetry policy types |
173
+ | `eve/instrumentation/otel` | `otel`, `otelIntegration`, `localTraces`, `agentRuns`, OpenTelemetry policy, span processor, and exporter types |
170
174
  | `eve/local-dev` | `getLocalDevCapability`, `LocalDevCapability` |
171
- | [`eve/models`](../guides/decide) | Automatic model selection with `auto` |
175
+ | [`eve/models`](../guides/decide) | Automatic model selection with `auto`, `EveLanguageModel` |
172
176
  | `eve/models/openai` | `openai`, `chatgpt` |
173
177
  | `eve/models/anthropic` | `anthropic` |
174
178
  | [`eve/ai`](../guides/decide#decide-inside-a-tool) | Standalone `decide` |
@@ -178,8 +182,8 @@ Tool definitions accept `availableInSubagents: false` to restrict the tool to to
178
182
  | `eve/evals/loaders` | `loadJson`, `loadYaml` |
179
183
  | `eve/react`, `eve/vue`, `eve/svelte` | `useEveAgent` |
180
184
  | `eve/next`, `eve/nuxt`, `eve/sveltekit`, `eve/tanstack` | framework bundler plugins |
181
- | [`eve/client`](../guides/client/overview) | `Client`, `ClientSession`, health and agent-info schemas, response errors |
182
- | [`eve/sessions`](../guides/client/messages#reusable-delivery-reads) | `Delivery`, `DeliveryResult`, read options, `SessionReader`, authenticated `Session`, and `SessionNotActiveError` |
185
+ | [`eve/client`](../guides/client/overview) | `Client`, `ClientSession`, health and agent-info schemas, `EveError` and the typed client errors |
186
+ | [`eve/sessions`](../guides/client/messages#reusable-delivery-reads) | `Delivery`, `DeliveryResult`, read options, `SessionReader`, `Session`, `EveError`, and `SessionNotActiveError` |
183
187
  | [`eve/events`](../concepts/sessions-runs-and-streaming#query-session-state) | Facts, opaque `SessionView`, immutable observations, and query/fold functions |
184
188
  | [`eve/server`](../concepts/sessions-runs-and-streaming#read-a-session-in-process) | `sessions`, for reading session streams in process |
185
189
 
@@ -188,13 +192,35 @@ have one home, `eve/sessions`; client factories and transport-specific types sta
188
192
  `SessionInfo` from `eve/context` is callback metadata, not a reader or an operable session.
189
193
  `ChannelContext` from `eve/channels` separates session information from continuation aliasing.
190
194
 
191
- `HistoryMessage` and the sandbox session, process, result, and method-option types are eve-owned. Their declarations do not change with your app's AI SDK peer version. Named judge, mock-model, approval, and disabled-marker types remain public for reusable helpers and declaration emission.
195
+ `HistoryMessage`, `EveLanguageModel`, `TokenUsage`, the sandbox session, process, result, and method-option types, the `SpanProcessor`, `SpanProcessorOrName`, and `SpanExporter` types from `eve/instrumentation/otel`, and the Linq and Photon credential and webhook-verifier types are eve-owned. Their declarations do not change with your app's AI SDK, OpenTelemetry, or channel-adapter versions. Named judge, mock-model, approval, and disabled-marker types remain public for reusable helpers and declaration emission.
196
+
197
+ ## Stability policy
198
+
199
+ The `exports` field in `packages/eve/package.json` lists every package entry point.
200
+ `eve/experimental/*` and `eve/internal/*` have no compatibility promise. The same
201
+ applies to `experimental` fields in stable definitions, such as
202
+ `defineAgent({ experimental })`, connection `experimental.events`, and
203
+ `JustBashSandbox.environment({ experimental })`.
204
+
205
+ Event union types name today's values. Adding fact types, outcomes, or interaction
206
+ kinds under the [stream evolution rules](../concepts/sessions-runs-and-streaming#what-a-later-release-can-add)
207
+ is not a breaking change. Keep a default branch when switching on those values.
208
+
209
+ Values eve passes into code you implement can also gain members in a minor
210
+ release, such as a sandbox provider's `onSessionEnd()` `reason`, the provider
211
+ context's `kind`, and `SandboxNetworkRule` variants. Handle unknown values, for
212
+ example with a default branch, instead of switching exhaustively.
213
+
214
+ `eve/channels/chat-sdk`, `eve/channels/linq`, and `eve/channels/photon` expose
215
+ types from the `chat` package (Chat SDK v4) as part of their contract. They track
216
+ `chat` v4, so a future breaking `chat` major may require a corresponding eve change.
192
217
 
193
- The `exports` field in `packages/eve/package.json` lists every package entry point. `eve/experimental/*` and `eve/internal/*` have no compatibility promise. The CLI setup wizard is not a public authoring API; Agent Builder's scaffold integration lives at `eve/internal/scaffold`.
218
+ The CLI setup wizard is not a public authoring API; Agent Builder's scaffold
219
+ integration lives at `eve/internal/scaffold`.
194
220
 
195
221
  ## Direct provider models
196
222
 
197
- `openai(model?)` from `eve/models/openai` and `anthropic(model?)` from `eve/models/anthropic` return eve-owned model instances using the vendored providers. They accept only an optional model ID. Defaults are `gpt-6-luna-fast` and `claude-sonnet-5`, respectively.
223
+ `openai(model?)` from `eve/models/openai` and `anthropic(model?)` from `eve/models/anthropic` return AI SDK language models that use eve's credentials, so you can also pass them to AI SDK functions such as `generateText`. They accept only an optional model ID. `EveLanguageModel`, exported from `eve` and `eve/models`, is the model instance type `agent.ts` accepts; every AI SDK language model satisfies it. Defaults are `gpt-6-luna-fast` and `claude-sonnet-5`, respectively.
198
224
 
199
225
  Use `/login` for local credentials, or set `OPENAI_API_KEY` or `ANTHROPIC_API_KEY`. Local secret-store discovery is disabled in deployments; provision server credentials explicitly. See [Set the model](../agent-config#set-the-model) for an example.
200
226
 
@@ -176,6 +176,8 @@ Validate the shape of your own state in `resume()`. When you change it incompati
176
176
 
177
177
  `sandbox.delete()` uses the same method with `reason: "deleted"` and the caller's `signal`, so a provider has one deletion path. A subagent that shares its parent's sandbox never calls it, because cleanup belongs to the parent. An `invokeTool` call without a key calls it when the call ends if the tool requested the sandbox.
178
178
 
179
+ The sets of `reason` and `ctx.kind` values, like other values eve passes into a provider, can grow in a minor release, so handle unknown values instead of switching exhaustively. See [Stability policy](/docs/reference/typescript-api#stability-policy).
180
+
179
181
  ## Bake files into templates
180
182
 
181
183
  Call `ctx.populate(connection)` on the build instance before you capture it. `populate()` writes the agent's workspace files to the connection's workspace root and its skill files to `$HOME/.agents/skills` in one `writeFiles()` batch, then runs the authored `prepare` callback with a session over the same connection. eve finds `$HOME` by running a command through `spawn()`. When the sandbox has no usable home directory, skills go to `skills/` under the workspace root.
@@ -57,12 +57,12 @@ export const environment = DefaultSandbox.environment({
57
57
  export default defineSandbox(() => environment.open());
58
58
  ```
59
59
 
60
- | Option | Used when | Accepts |
61
- | ---------- | --------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
62
- | `prepare` | Any provider | Setup captured in the prepared environment. Replaces a `prepare` set inside the provider options. |
63
- | `docker` | Docker is selected | The options of [`DockerSandbox.environment()`](/docs/sandbox/docker#environment-options), such as `image`, `env`, and `pullPolicy`. |
64
- | `vercel` | Vercel is selected | The options of [`VercelSandbox.environment()`](/docs/sandbox/vercel), such as `region`, `resources`, and credentials. |
65
- | `justBash` | just-bash is selected | `autoInstall` and `prepare`. Use [`JustBashSandbox.environment()`](/docs/sandbox/just-bash) for `customCommands` or `filesystem`. |
60
+ | Option | Used when | Accepts |
61
+ | ---------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
62
+ | `prepare` | Any provider | Setup captured in the prepared environment. Replaces a `prepare` set inside the provider options. |
63
+ | `docker` | Docker is selected | The options of [`DockerSandbox.environment()`](/docs/sandbox/docker#environment-options), such as `image`, `env`, and `pullPolicy`. |
64
+ | `vercel` | Vercel is selected | The options of [`VercelSandbox.environment()`](/docs/sandbox/vercel), such as `region`, `resources`, and credentials. |
65
+ | `justBash` | just-bash is selected | `autoInstall` and `prepare`. Use [`JustBashSandbox.environment()`](/docs/sandbox/just-bash#experimental-options) for experimental `customCommands` or `filesystem`. |
66
66
 
67
67
  Keep a shared `prepare` callback portable, because it runs on whichever provider eve selects. just-bash runs no native binaries, so commands such as `apt-get` fail there during `eve dev`.
68
68
 
@@ -43,7 +43,7 @@ For example, a Vercel environment returns a handle with `setNetworkPolicy()`. Th
43
43
 
44
44
  ## Define an environment
45
45
 
46
- A sandbox module exports an environment and returns a sandbox from `defineSandbox()`. Put it at `agent/sandbox.ts`, or at `agent/sandbox/sandbox.ts` when the agent also has [workspace seeds](#managed-workspace-and-skills) or a Docker `Dockerfile` in `agent/sandbox/`. When the `agent/sandbox/` folder exists, eve reads the definition only from `agent/sandbox/sandbox.ts`.
46
+ A sandbox module exports an environment and returns a sandbox from `defineSandbox()`. Put it at `agent/sandbox.ts`, or at `agent/sandbox/sandbox.ts` when the agent also has [workspace seeds](#managed-workspace-and-skills) or a Docker `Dockerfile` in `agent/sandbox/`. When the `agent/sandbox/` folder exists, put the definition at `agent/sandbox/sandbox.ts`. Keeping `agent/sandbox.ts` beside that folder is a build error, even when the folder only contains workspace seeds or a Dockerfile.
47
47
 
48
48
  ```ts title="agent/sandbox.ts"
49
49
  import { DefaultSandbox, defineSandbox } from "eve/sandbox";
@@ -69,7 +69,7 @@ export default defineSandbox(async ({ session }) => {
69
69
  });
70
70
  ```
71
71
 
72
- When a client prewarms a session, for example with `useEveAgent({ prewarm: true })`, eve runs the selector before the first message arrives. `session.auth` then describes the request that created the session, and the first message's `onMessage` hook can return a different identity. Do not derive per-user sandbox options or `defineState()` values from `session.auth` in an agent whose clients prewarm sessions: eve keeps both from the prewarming run. See [prewarming](/docs/guides/frontend/overview#returned-state) for when eve prewarms a session.
72
+ When a client prewarms a session, for example with `useEveAgent({ prewarm: true })`, eve runs the selector before the first message arrives. `session.auth` then describes the request that created the session, and the first message's `onMessage` hook can return a different identity. Do not derive per-user sandbox options or `defineState()` values from `session.auth` in an agent whose clients prewarm sessions: eve keeps both from the prewarming run. See [prewarming](/docs/guides/frontend/use-eve-agent#prewarming) for when eve prewarms a session.
73
73
 
74
74
  The environment export is required because `eve build` prepares immutable environment inputs before a session exists.
75
75
 
@@ -168,15 +168,15 @@ To run sandboxes on a backend eve does not ship, define a provider with `defineS
168
168
  | [Docker](/docs/sandbox/docker) | Local containers from the default image, an existing OCI image, or a Dockerfile. |
169
169
  | [just-bash](/docs/sandbox/just-bash) | A pure-JavaScript shell and virtual filesystem without native process isolation. |
170
170
 
171
- For SDK-specific just-bash commands or filesystem factories, use `JustBashSandbox.environment()`
172
- from `eve/sandbox/just-bash`. `DefaultSandbox` keeps only `autoInstall` and `prepare` for its
173
- just-bash fallback.
171
+ For SDK-specific just-bash commands or filesystem factories, use the experimental options of
172
+ `JustBashSandbox.environment()` from `eve/sandbox/just-bash`. `DefaultSandbox` keeps only
173
+ `autoInstall` and `prepare` for its just-bash fallback.
174
174
 
175
175
  ## Lifecycle
176
176
 
177
177
  Session-owned sandboxes persist across turns and deployments while their provider state remains available. `sandbox.stop()` stops compute without deleting persisted state; a later access resumes that state directly. `sandbox.delete()` deletes the sandbox and clears provider state, so the next `ctx.getSandbox()` reruns the selector, and the provider starts a fresh sandbox under the same session key from the current environment. If the native sandbox is gone when a session resumes, for example after a local daemon restart, a removed container, or a deleted just-bash session directory, eve does the same: the session continues in a fresh sandbox, without the lost sandbox's files. eve also starts a fresh sandbox when the recorded state belongs to another provider or state protocol than the current environment, for example after you change providers; the old sandbox is not deleted. When the durable session reaches a terminal outcome, eve calls the provider's `onSessionEnd()` hook to delete what remains under the session's key.
178
178
 
179
- Before that cleanup, session end ends the session's task runs, and each run resets the subagent sessions it opened. eve does not wait for those subagents to stop. A subagent step that is still running at that moment can open the sandbox again after cleanup, and eve does not remove a sandbox created that late.
179
+ Before that cleanup, session end ends the session's task runs, and each run ends the subagent sessions it opened. eve does not wait for those subagents to stop. A subagent step that is still running at that moment can open the sandbox again after cleanup, and eve does not remove a sandbox created that late.
180
180
 
181
181
  Changing sandbox source, preparation code, Dockerfile content, environment options, workspace resources, or skills produces a new environment generation. Existing durable sessions keep their sandbox, because its identity comes from the session key alone; new sessions use the current generation.
182
182
 
@@ -21,13 +21,18 @@ When an environment uses just-bash during `eve dev`, eve installs the package in
21
21
 
22
22
  For pnpm projects, automatic installation adds `@mongodb-js/zstd` and `node-liblzma` to `ignoredOptionalDependencies` in the owning `pnpm-workspace.yaml` when they have no explicit package policy. These optional native codecs are not needed for basic shell and filesystem operations. Commands that require those codecs may be unavailable without them. eve preserves existing package-specific build decisions and does not automatically approve build scripts.
23
23
 
24
- ## Custom commands
24
+ ## Experimental options
25
25
 
26
- `customCommands` registers your own functions as commands in each live just-bash shell, where they work in pipelines and redirections. Write a `JustBashCommand` from `eve/sandbox/just-bash`:
26
+ `experimental.customCommands` and `experimental.filesystem` follow just-bash's own command and filesystem contracts, so they are experimental and have no compatibility promise. Their types, such as `JustBashCommand` and `JustBashFilesystem`, come from `eve/experimental/sandbox/just-bash`. `autoInstall` and `prepare` are stable.
27
+
28
+ ### Custom commands
29
+
30
+ `experimental.customCommands` registers your own functions as commands in each live just-bash shell, where they work in pipelines and redirections:
27
31
 
28
32
  ```ts
29
33
  import { defineSandbox } from "eve/sandbox";
30
- import { JustBashSandbox, type JustBashCommand } from "eve/sandbox/just-bash";
34
+ import type { JustBashCommand } from "eve/experimental/sandbox/just-bash";
35
+ import { JustBashSandbox } from "eve/sandbox/just-bash";
31
36
 
32
37
  const today: JustBashCommand = {
33
38
  name: "today",
@@ -36,7 +41,9 @@ const today: JustBashCommand = {
36
41
  },
37
42
  };
38
43
 
39
- export const environment = JustBashSandbox.environment({ customCommands: [today] });
44
+ export const environment = JustBashSandbox.environment({
45
+ experimental: { customCommands: [today] },
46
+ });
40
47
  export default defineSandbox(() => environment.open());
41
48
  ```
42
49
 
@@ -44,30 +51,32 @@ A `JustBashCommand` receives `cwd`, `env`, `fs`, and `signal` in its context. Wh
44
51
 
45
52
  Custom commands run as application code in the app runtime process, outside the virtual filesystem. They are not available while eve prepares the template.
46
53
 
47
- ## Custom filesystem
54
+ ### Custom filesystem
48
55
 
49
- `filesystem` composes the filesystem of each live sandbox. eve calls it with `defaultFilesystem`, the session's durable filesystem that holds `/workspace`, and `justBash`, the loaded `just-bash` module. Return a `JustBashFilesystem` that keeps `defaultFilesystem` as its base, such as a just-bash `MountableFs`:
56
+ `experimental.filesystem` composes the filesystem of each live sandbox. eve calls it with `defaultFilesystem`, the session's durable filesystem that holds `/workspace`, and `justBash`, the loaded `just-bash` module. Return a `JustBashFilesystem` that keeps `defaultFilesystem` as its base, such as a just-bash `MountableFs`:
50
57
 
51
58
  ```ts
52
59
  import { defineSandbox } from "eve/sandbox";
53
60
  import { JustBashSandbox } from "eve/sandbox/just-bash";
54
61
 
55
62
  export const environment = JustBashSandbox.environment({
56
- async filesystem({ defaultFilesystem, justBash, resolveProjectPath }) {
57
- await defaultFilesystem.mkdir("/reference", { recursive: true });
58
- return new justBash.MountableFs({
59
- base: defaultFilesystem,
60
- mounts: [
61
- {
62
- filesystem: new justBash.OverlayFs({
63
- mountPoint: "/",
64
- readOnly: true,
65
- root: resolveProjectPath("reference"),
66
- }),
67
- mountPoint: "/reference",
68
- },
69
- ],
70
- });
63
+ experimental: {
64
+ async filesystem({ defaultFilesystem, justBash, resolveProjectPath }) {
65
+ await defaultFilesystem.mkdir("/reference", { recursive: true });
66
+ return new justBash.MountableFs({
67
+ base: defaultFilesystem,
68
+ mounts: [
69
+ {
70
+ filesystem: new justBash.OverlayFs({
71
+ mountPoint: "/",
72
+ readOnly: true,
73
+ root: resolveProjectPath("reference"),
74
+ }),
75
+ mountPoint: "/reference",
76
+ },
77
+ ],
78
+ });
79
+ },
71
80
  },
72
81
  });
73
82
  export default defineSandbox(() => environment.open());
@@ -86,10 +86,10 @@ Local `eve dev` makes the bundled `self-modification__agent` subagent available
86
86
 
87
87
  ### Vercel workspace peers
88
88
 
89
- In a Vercel agent workspace, expose one other workspace member as a remote subagent with `defineWorkspaceAgent`. Create an ordinary file under the caller's `agent/subagents/` directory. Its filename gives the model-visible tool name; `name` identifies the peer under `agents/`.
89
+ In a Vercel agent workspace, expose one other workspace member as a remote subagent with `defineWorkspaceAgent` from `eve/experimental/workspace`. The helper and its `WorkspaceAgentDefinition` and `WorkspaceAgentTransport` types are experimental and have no compatibility promise. The `agents/<name>/` workspace layout and `eve/vercel` integration remain stable. Create an ordinary file under the caller's `agent/subagents/` directory. Its filename gives the model-visible tool name; `name` identifies the peer under `agents/`.
90
90
 
91
91
  ```ts title="agents/foreman/agent/subagents/research.ts"
92
- import { defineWorkspaceAgent } from "eve";
92
+ import { defineWorkspaceAgent } from "eve/experimental/workspace";
93
93
 
94
94
  export default defineWorkspaceAgent({
95
95
  name: "research",
@@ -99,7 +99,7 @@ export default defineWorkspaceAgent({
99
99
  The helper uses the peer's root `defineAgent({ description })` value as the model-visible tool description. Pass `description` to override it for this caller. When `transport` is omitted, eve selects the built-in transport for the Vercel runtime environment. Local `vercel dev` routes workspace calls without deployment credentials; Vercel deployments route calls through the current deployment and authenticate with the caller's Vercel OIDC token. Named peers use their `/eve/<name>` mount. Outside those environments, provide an explicit transport with `url` and optional `auth` or `headers`:
100
100
 
101
101
  ```ts title="agents/foreman/agent/subagents/research.ts"
102
- import { defineWorkspaceAgent } from "eve";
102
+ import { defineWorkspaceAgent } from "eve/experimental/workspace";
103
103
  import { bearer } from "eve/agents/auth";
104
104
 
105
105
  export default defineWorkspaceAgent({
@@ -240,7 +240,7 @@ A call with the `taskId` of a child that is still working joins the child's curr
240
240
 
241
241
  eve adds a framework-injected `[Tasks]` note to the conversation that lists the working and idle tasks by `taskId` and tool, so the model can find a child to continue. See [Tasks](./tools/tasks) for how the model waits for, corrects, and cancels agent tasks.
242
242
 
243
- The parent holds each child for the life of the task's run, which lasts until the parent session ends or its task is cancelled. Then eve requests child shutdown, using authenticated reset requests for remote children. Cleanup is best effort: a child whose inbox or deployment is unavailable may remain running or parked. For [remote agents](./guides/remote-agents), upgrade both deployments before relying on continuation or reset behavior introduced by a newer eve version.
243
+ The parent holds each child for the life of the task's run, which lasts until the parent session ends or its task is cancelled. Then eve requests child shutdown, using authenticated end-session requests for remote children. Cleanup is best effort: a child whose inbox or deployment is unavailable may remain running or parked. For [remote agents](./guides/remote-agents), upgrade both deployments before relying on continuation or end-session behavior introduced by a newer eve version.
244
244
 
245
245
  ## When to split
246
246
 
@@ -100,7 +100,7 @@ approval: ({ session, toolInput }) => {
100
100
  },
101
101
  ```
102
102
 
103
- For compatibility with the previous predicate shape, policies may return booleans: `true` is treated as `"user-approval"` and `false` as `"not-applicable"`. Boolean promises are supported too.
103
+ A boolean is a supported shorthand, returned synchronously or as a promise: `true` means `"user-approval"` and `false` means `"not-applicable"`.
104
104
 
105
105
  Policies can also return `"approved"` or `"denied"` to decide automatically. Use `{ type: "denied", reason }` when the model should receive a reason for denying the call. A denied call never starts: it settles `call.settled` with `outcome: "rejected"`, `cause: { policy: "approval" }`, and a `TOOL_EXECUTION_DENIED` output, whether the policy denies it as the model calls it or when an approved call is checked again. A tool that runs and throws settles `failed`. An explicit `"approved"` result records `clearedBy: { policy: "approval" }` on `call.started`. A call cleared by a remembered `once()` approval records the same `{ policy: "approval" }`; a call approved by a person records `{ interactionId }`. Calls that need no approval omit `clearedBy`. The `Approval`, `ApprovalConfiguration`, `ApprovalContext`, `ApprovalPolicy`, and `ApprovalStatus` types are exported from `eve/tools/approval`.
106
106
 
@@ -81,9 +81,10 @@ or days later, the run resumes, deploys, and returns. The model sees one tool re
81
81
  - `"use step"` marks a top-level `async function` in the tool module, or any module it imports, as a
82
82
  step. Side effects, clocks, randomness, `process.env`, and Node.js APIs belong in steps; the body
83
83
  is replayed and must stay deterministic.
84
- - Import `createHook`, `createWebhook`, `sleep`, and `FatalError` from `workflow` in the body.
85
- `start`, `getRun`, and `resumeHook` from `workflow/api` belong in steps. Your app does not install
86
- the SDK; for types, new projects list `eve/workflow-modules` in the tsconfig `types`.
84
+ - Import `createHook`, `createWebhook`, `sleep`, `FatalError`, `RetryableError`, and `getWorkflowMetadata` from
85
+ `eve/workflow` in the body. Import `start`, `getRun`, and `resumeHook` from
86
+ `eve/workflow/api` in routes or steps, not in replayed bodies. Both entries use eve's bundled
87
+ SDK; no separate `workflow` dependency or ambient tsconfig `types` entry is needed.
87
88
  - In an `execute` or `task` body, `ctx` is a `WorkflowToolContext` with `session`, `callId`,
88
89
  `toolName`, `abortSignal`, `channel`, `agent`, `agents`, and `ask`. A `serve` body gets a
89
90
  `WorkflowServeContext` with `session`, `toolName`, `channel`,
@@ -114,6 +115,48 @@ eve includes only workflow and step modules reachable from the agent's runtime m
114
115
  Unrelated workflows in the host application stay outside the agent bundle. An unresolved
115
116
  workflow import fails the build with the missing import in the error.
116
117
 
118
+ ### Workflow imports
119
+
120
+ Use `eve/workflow` for durable primitives and `eve/workflow/api` for run and hook operations:
121
+
122
+ ```ts
123
+ import { createHook, sleep } from "eve/workflow";
124
+ import { resumeHook } from "eve/workflow/api";
125
+ ```
126
+
127
+ `eve/workflow` exports:
128
+
129
+ - `createHook<T>({ token?, metadata? })` returns a `WorkflowHook<T>`. Await it for the next payload
130
+ or iterate it with `for await`. Its `token` resumes it; `metadata` is JSON stored with the hook.
131
+ `await hook.getConflict()` registers the hook before you hand out its token and resolves the run
132
+ that already owns the token, or `null`. `dispose()`, or `using`, releases the token.
133
+ - `createWebhook({ respondWith? })` returns a `WorkflowWebhook` whose `url` resumes it with the
134
+ incoming `Request`. With `respondWith: "manual"`, each request is a `WorkflowWebhookRequest`
135
+ that you answer with `request.respondWith(response)`.
136
+ - `sleep(duration)` takes a duration such as `"1h"`, milliseconds, or a `Date` to wait until.
137
+ - `getWorkflowMetadata()` returns the current run's `workflowName`, `workflowRunId`,
138
+ `workflowStartedAt`, and `url`.
139
+ - Throw `FatalError` to fail without retrying, or `RetryableError` with an optional
140
+ `{ retryAfter }` to retry a step.
141
+
142
+ Import `WorkflowHook`, `WorkflowHookOptions`, `WorkflowWebhook`, `WorkflowWebhookOptions`,
143
+ `WorkflowWebhookRequest`, and `WorkflowMetadata` from `eve/workflow` when you need explicit types.
144
+
145
+ `eve/workflow/api` exports:
146
+
147
+ - `start(workflow, args)` starts a `"use workflow"` function; omit `args` when it takes none. eve
148
+ routes the run to the agent's own workflow queue and deployment, so `start` takes no options.
149
+ - `start` and `getRun(runId)` return a `WorkflowRun<T>` with `runId`, `status` (a promise of
150
+ `WorkflowRunStatus`), `returnValue`, and `cancel()`.
151
+ - `resumeHook(token, payload)` delivers a payload to the hook with that token. Pass a
152
+ deterministic `token` to `createHook` when a route must find the hook later.
153
+
154
+ Bare `workflow` and `workflow/*` imports in application modules fail the build with an error
155
+ naming these entries. Only the exports listed above are public; other SDK subpaths, helpers, and
156
+ options are not supported by these entries. Existing `"types": ["eve/workflow-modules"]` tsconfig entries and reference
157
+ directives still resolve through 1.x, but the compatibility entry declares no ambient modules.
158
+ You can remove those references when updating your imports.
159
+
117
160
  ### Add a runtime-generated workflow tool
118
161
 
119
162
  Create `agent/tools/workflow.ts` and export the provided `workflow` factory when the model should
@@ -189,8 +232,9 @@ an agent catalog. Calls use the same target resolution, availability, and author
189
232
 
190
233
  Replace `defineTool` with `defineWorkflowTool`, keep the executor's `"use workflow"` directive,
191
234
  and replace `agent(ctx, input)` and `ask(ctx, request)` with an agent session from
192
- [`ctx.agent(name)`](#delegate-work-ctxagent) and `ctx.ask(request)`. The `eve/workflow` entry point
193
- has been removed. Import `WorkflowToolContext`, `AgentSession`,
235
+ [`ctx.agent(name)`](#delegate-work-ctxagent) and `ctx.ask(request)`. The old `agent` and `ask`
236
+ helpers are not exported from `eve/workflow`; that entry exposes durable primitives instead.
237
+ Import `WorkflowToolContext`, `AgentSession`,
194
238
  `ToolQuestion`, `ToolAskOptions`, and `ToolAnswer` from `eve/tools` when you
195
239
  need explicit types.
196
240
 
@@ -844,7 +888,7 @@ This workflow reports progress, then suspends until its timer expires:
844
888
 
845
889
  ```ts title="agent/tools/remind_with_progress.ts"
846
890
  import { defineWorkflowTool } from "eve/tools";
847
- import { sleep } from "workflow";
891
+ import { sleep } from "eve/workflow";
848
892
  import { z } from "zod";
849
893
 
850
894
  export default defineWorkflowTool({
@@ -912,7 +956,7 @@ you have. After a cancel, eve discards the result. The provided `sleep` tool rac
912
956
  against the signal:
913
957
 
914
958
  ```ts
915
- import { sleep } from "workflow";
959
+ import { sleep } from "eve/workflow";
916
960
 
917
961
  async execute(input, ctx) {
918
962
  "use workflow";
@@ -960,7 +1004,7 @@ conversation, and a steering message doesn't withdraw the request. `sleep` is th
960
1004
 
961
1005
  ```ts title="agent/tools/render_video.ts"
962
1006
  import { defineWorkflowTool } from "eve/tools";
963
- import { createWebhook, FatalError } from "workflow";
1007
+ import { createWebhook, FatalError } from "eve/workflow";
964
1008
  import { z } from "zod";
965
1009
  import { submitRender } from "../lib/render";
966
1010
 
@@ -3,7 +3,7 @@ title: "Your First Agent"
3
3
  description: "Scaffold the analytics assistant, give it an analyst persona, run it, and ask a question."
4
4
  ---
5
5
 
6
- For a bespoke learning experience, start with the [eve template gallery](https://eve.dev/templates) or ask your coding agent to build your use case. For example:
6
+ For a bespoke learning experience, start with the [eve template gallery](https://vercel.com/templates/eve) or ask your coding agent to build your use case. For example:
7
7
 
8
8
  - “Build an eve Slack agent that answers questions from our team’s documentation.”
9
9
  - “Build an eve incident-response agent that investigates alerts using our observability tools.”
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eve",
3
- "version": "0.85.0",
3
+ "version": "0.87.0",
4
4
  "private": false,
5
5
  "description": "Filesystem-first framework for durable backend AI agents that run anywhere.",
6
6
  "keywords": [
@@ -37,10 +37,11 @@
37
37
  "files": [
38
38
  "bin",
39
39
  "dist",
40
+ "!dist/CHANGELOG.md",
40
41
  "docs",
41
- "CHANGELOG.md",
42
42
  "NOTICE",
43
- "README.md"
43
+ "README.md",
44
+ "CHANGELOG.md"
44
45
  ],
45
46
  "type": "module",
46
47
  "sideEffects": true,
@@ -203,6 +204,18 @@
203
204
  "import": "./dist/src/public/tools/workflow.js",
204
205
  "default": "./dist/src/public/tools/workflow.js"
205
206
  },
207
+ "./workflow": {
208
+ "eve-source": "./src/public/workflow/index.ts",
209
+ "types": "./dist/src/public/workflow/index.d.ts",
210
+ "import": "./dist/src/public/workflow/index.js",
211
+ "default": "./dist/src/public/workflow/index.js"
212
+ },
213
+ "./workflow/api": {
214
+ "eve-source": "./src/public/workflow/api.ts",
215
+ "types": "./dist/src/public/workflow/api.d.ts",
216
+ "import": "./dist/src/public/workflow/api.js",
217
+ "default": "./dist/src/public/workflow/api.js"
218
+ },
206
219
  "./workflow-modules": {
207
220
  "eve-source": "./dist/src/public/workflow-modules.d.ts",
208
221
  "types": "./dist/src/public/workflow-modules.d.ts"
@@ -389,6 +402,24 @@
389
402
  "import": "./dist/src/public/server/index.js",
390
403
  "default": "./dist/src/public/server/index.js"
391
404
  },
405
+ "./experimental/workspace": {
406
+ "eve-source": "./src/public/experimental/workspace/index.ts",
407
+ "types": "./dist/src/public/experimental/workspace/index.d.ts",
408
+ "import": "./dist/src/public/experimental/workspace/index.js",
409
+ "default": "./dist/src/public/experimental/workspace/index.js"
410
+ },
411
+ "./experimental/sandbox/just-bash": {
412
+ "eve-source": "./src/public/experimental/sandbox/just-bash.ts",
413
+ "types": "./dist/src/public/experimental/sandbox/just-bash.d.ts",
414
+ "import": "./dist/src/public/experimental/sandbox/just-bash.js",
415
+ "default": "./dist/src/public/experimental/sandbox/just-bash.js"
416
+ },
417
+ "./experimental/channels/discord/gateway": {
418
+ "eve-source": "./src/public/experimental/channels/discord/gateway.ts",
419
+ "types": "./dist/src/public/experimental/channels/discord/gateway.d.ts",
420
+ "import": "./dist/src/public/experimental/channels/discord/gateway.js",
421
+ "default": "./dist/src/public/experimental/channels/discord/gateway.js"
422
+ },
392
423
  "./experimental/schedules/testing": {
393
424
  "eve-source": "./src/public/experimental/schedules/testing.ts",
394
425
  "types": "./dist/src/public/experimental/schedules/testing.d.ts",
@@ -457,11 +488,6 @@
457
488
  "import": "./dist/src/public/channels/discord/index.js",
458
489
  "default": "./dist/src/public/channels/discord/index.js"
459
490
  },
460
- "./channels/discord/gateway": {
461
- "types": "./dist/src/public/channels/discord/gateway/index.d.ts",
462
- "import": "./dist/src/public/channels/discord/gateway/index.js",
463
- "default": "./dist/src/public/channels/discord/gateway/index.js"
464
- },
465
491
  "./channels/twilio": {
466
492
  "types": "./dist/src/public/channels/twilio/index.d.ts",
467
493
  "import": "./dist/src/public/channels/twilio/index.js",
@@ -483,12 +509,6 @@
483
509
  "default": "./dist/src/public/channels/linear/index.js"
484
510
  },
485
511
  "./package.json": "./package.json",
486
- "./internal/self-modification/agent": {
487
- "eve-source": "./dist/src/self-modification/agent.js",
488
- "types": "./dist/src/self-modification/agent.d.ts",
489
- "import": "./dist/src/self-modification/agent.js",
490
- "default": "./dist/src/self-modification/agent.js"
491
- },
492
512
  "./internal/self-modification/sandbox": {
493
513
  "eve-source": "./dist/src/self-modification/sandbox.js",
494
514
  "types": "./dist/src/self-modification/sandbox.d.ts",
@@ -611,7 +631,7 @@
611
631
  "@types/json-schema": "7.0.15",
612
632
  "@types/react": "19.2.15",
613
633
  "@types/react-test-renderer": "19.1.0",
614
- "@vercel/agent-runs": "0.0.1",
634
+ "@vercel/agent-runs": "0.0.3",
615
635
  "@vercel/blob": "2.8.0",
616
636
  "@vercel/connect": "2.5.2",
617
637
  "@vercel/detect-agent": "1.2.3",
@@ -619,7 +639,7 @@
619
639
  "@vercel/otel": "2.1.3",
620
640
  "@vercel/queue": "0.5.1",
621
641
  "@vercel/sandbox": "3.9.0",
622
- "@vercel/schedules": "0.0.0-alpha.11",
642
+ "@vercel/schedules": "0.0.0-alpha.19",
623
643
  "@vercel/sdk": "1.28.8",
624
644
  "@workflow/core": "5.2.3",
625
645
  "@workflow/errors": "5.0.5",
@@ -741,22 +761,21 @@
741
761
  },
742
762
  "scripts": {
743
763
  "clean": "node -e \"fs.rmSync('dist', { recursive: true, force: true })\"",
744
- "build": "pnpm run check:bin-runtime-dependencies && pnpm run build:js && node ./scripts/copy-docs.mjs && node ./scripts/stamp-version-tokens.mjs",
764
+ "build": "pnpm run check:bin-runtime-dependencies && node ./scripts/build-js.mjs && node ./scripts/copy-docs.mjs && node ./scripts/stamp-version-tokens.mjs && node ../../scripts/copy-package-license.mjs . && node ../../scripts/stage-package.mjs .",
745
765
  "build:compiled": "node ./scripts/vendor-compiled.mjs",
746
766
  "build:js": "node ./scripts/build-js.mjs",
747
- "build:types": "pnpm run build:compiled && tsc -p tsconfig.build.json",
767
+ "build:types": "tsc -p tsconfig.build.json",
748
768
  "check:bin-runtime-dependencies": "node ./scripts/check-bin-runtime-dependencies.mjs",
749
769
  "dev": "pnpm run build:compiled && node ./scripts/copy-runtime-assets.mjs && tsc -p tsconfig.dev.json --watch --preserveWatchOutput",
750
- "test": "pnpm run test:unit && pnpm run test:integration",
751
- "test:webchat": "pnpm run build:js && vitest run --config vitest.browser.config.ts",
752
- "test:framework-fixtures": "pnpm run build:compiled && vitest run --config vitest.framework-fixtures.config.ts",
753
- "test:integration": "pnpm run build:js && vitest run --config vitest.integration.config.ts",
754
- "test:scenario": "pnpm run build:compiled && vitest run --config vitest.scenario.config.ts",
755
- "test:unit": "pnpm run build:compiled && vitest run --config vitest.unit.config.ts",
756
- "test:watch": "pnpm run build:compiled && vitest --config vitest.unit.config.ts",
757
- "typecheck": "pnpm run check:web-template && pnpm run build:compiled && tsc -p tsconfig.json --noEmit",
770
+ "test:webchat": "vitest run --config vitest.browser.config.ts",
771
+ "test:framework-fixtures": "vitest run --config vitest.framework-fixtures.config.ts",
772
+ "test:integration": "vitest run --config vitest.integration.config.ts",
773
+ "test:scenario": "vitest run --config vitest.scenario.config.ts",
774
+ "test:unit": "vitest run --config vitest.unit.config.ts",
775
+ "test:watch": "vitest --config vitest.unit.config.ts",
776
+ "typecheck": "pnpm run check:web-template && tsc -p tsconfig.json --noEmit",
758
777
  "generate:web-template": "node src/setup/build.ts --write",
759
778
  "check:web-template": "node src/setup/build.ts --check",
760
- "test:tui": "pnpm run build:js && tsc -p tsconfig.tui.json --noEmit && node test/tui-client/run-all.mjs"
779
+ "test:tui": "tsc -p tsconfig.tui.json --noEmit && node test/tui-client/run-all.mjs"
761
780
  }
762
781
  }
@@ -1 +0,0 @@
1
- import{createLogger}from"#internal/logging.js";import{resolveDiscordBotToken}from"#public/channels/discord/api.js";import{DiscordGatewayFatalError,runGatewayConnection}from"#public/channels/discord/gateway/connection.js";import{vercelOidc}from"#public/agents/auth.js";import{createForwarder}from"#public/channels/discord/gateway/forwarder.js";const log=createLogger(`discord.gateway`);async function experimental_runDiscordGatewayRelay(e={}){let t=new URL(e.route??`/eve/v1/discord/gateway`,resolveBaseUrl(e.url)),n=e.signal===void 0?listenForShutdown():void 0,r=e.signal??n.signal,i=createForwarder({headers:outboundHeaders(e.auth),url:t});log.info(`Discord Gateway relay started`,{target:t.href});try{await runGatewayConnection({apiBaseUrl:e.api?.apiBaseUrl,fetch:e.api?.fetch,intents:4608|(e.messageContent===!0?32768:0),onDispatch:e=>{e.t===`MESSAGE_CREATE`&&i.enqueue(e)},resolveToken:()=>resolveDiscordBotToken(e.credentials?.botToken),signal:r})}finally{n?.dispose(),await i.drain(8e3)}}function resolveBaseUrl(e){if(e!==void 0)return new URL(e);let t=process.env.VERCEL_PROJECT_PRODUCTION_URL?.trim();if(t)return new URL(`https://${t}`);throw Error("experimental_runDiscordGatewayRelay needs the eve deployment's URL: pass `url`, such as http://localhost:2000 for eve dev, or run it where VERCEL_PROJECT_PRODUCTION_URL is set.")}function outboundHeaders(e){if(e!==void 0)return async()=>(await e()).headers;let t=vercelOidc(),n=!1;return async()=>{try{return(await t()).headers}catch(e){return n||(n=!0,log.warn(`No Vercel OIDC token; forwarding without credentials`,{error:e})),{}}}}function listenForShutdown(){let e=new AbortController,t=[`SIGTERM`,`SIGINT`],onSignal=t=>{log.info(`Discord Gateway relay shutting down`,{signal:t}),e.abort()};for(let e of t)process.once(e,onSignal);return{signal:e.signal,dispose:()=>{for(let e of t)process.off(e,onSignal)}}}export{DiscordGatewayFatalError,experimental_runDiscordGatewayRelay};
@@ -1,12 +0,0 @@
1
- import { type AgentReasoningDefinition, type AgentStaticModelDefinition } from "#public/index.js";
2
- /** Options retained for source compatibility with the retired scaffold. */
3
- export interface SelfModificationAgentOptions {
4
- readonly config?: unknown;
5
- readonly model?: AgentStaticModelDefinition;
6
- readonly reasoning?: AgentReasoningDefinition;
7
- }
8
- /** @deprecated Use the packaged `eve/self-modification` extension. */
9
- export declare function defineSelfModificationAgent(_options?: SelfModificationAgentOptions): import("#public/index.js").DynamicSentinel<null, import("#public/index.js").DynamicContext>;
10
- /** @deprecated Use the packaged `eve/self-modification` extension. */
11
- declare const _default: import("#public/index.js").DynamicSentinel<null, import("#public/index.js").DynamicContext>;
12
- export default _default;
@@ -1 +0,0 @@
1
- import{defineDynamic}from"#public/index.js";let warned=!1;function warnRetiredScaffold(){warned||process.env.EVE_DEV!==`1`||(warned=!0,console.warn("[self-modification/retired-scaffold] The scaffolded self-modification subagent is disabled. Migrate to the new self-modification extension by running `/add eve/self-modification`."))}function defineSelfModificationAgent(e={}){return defineDynamic(()=>(warnRetiredScaffold(),null))}var agent_default=defineSelfModificationAgent();export{agent_default as default,defineSelfModificationAgent};