eve 0.34.0 → 0.36.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 (280) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/README.md +3 -3
  3. package/dist/src/chunks/{use-eve-agent-BNdcle_M.js → use-eve-agent-COmP-H8R.js} +6 -3
  4. package/dist/src/chunks/{use-eve-agent-FJkEMXYk.js → use-eve-agent-CnppTEFk.js} +6 -3
  5. package/dist/src/cli/commands/info.js +1 -1
  6. package/dist/src/cli/commands/trace-detail.d.ts +3 -2
  7. package/dist/src/cli/commands/trace-detail.js +1 -1
  8. package/dist/src/cli/dev/tui/traces/trace-conversation.d.ts +4 -6
  9. package/dist/src/cli/dev/tui/traces/trace-conversation.js +1 -2
  10. package/dist/src/client/agent-info-schema.d.ts +12 -4
  11. package/dist/src/client/agent-info-schema.js +1 -1
  12. package/dist/src/client/index.d.ts +1 -1
  13. package/dist/src/compiled/.vendor-stamp.json +3 -3
  14. package/dist/src/compiled/@chat-adapter/slack/index.js +1 -1
  15. package/dist/src/compiled/@workflow/core/index.js +1 -1
  16. package/dist/src/compiled/@workflow/core/runtime.js +3 -3
  17. package/dist/src/compiled/@workflow/core/workflow.js +1 -1
  18. package/dist/src/compiled/@workflow/world/env-config.d.ts +1 -0
  19. package/dist/src/compiled/@workflow/world/events.d.ts +92 -35
  20. package/dist/src/compiled/@workflow/world/index.d.ts +3 -2
  21. package/dist/src/compiled/@workflow/world/interfaces.d.ts +25 -23
  22. package/dist/src/compiled/@workflow/world/queue.d.ts +4 -0
  23. package/dist/src/compiled/@workflow/world/runs.d.ts +4 -0
  24. package/dist/src/compiled/@workflow/world/slot-identity.d.ts +53 -0
  25. package/dist/src/compiled/@workflow/world/spec-version.d.ts +36 -1
  26. package/dist/src/compiled/@workflow/world/steps.d.ts +4 -0
  27. package/dist/src/compiled/@workflow/world/ulid.d.ts +6 -0
  28. package/dist/src/compiled/@workflow/world-local/index.js +4 -4
  29. package/dist/src/compiled/@workflow/world-vercel/index.js +13 -17
  30. package/dist/src/compiled/_chunks/workflow/{attribute-changes-6OqdYdi4.js → attribute-changes-BoH7JsWp.js} +3 -3
  31. package/dist/src/compiled/_chunks/workflow/dist-DlFv0aHY.js +40 -0
  32. package/dist/src/compiled/_chunks/workflow/env-config-DxamfI7T.js +1 -0
  33. package/dist/src/compiled/_chunks/workflow/frames-CTpeJYEQ.js +3 -0
  34. package/dist/src/compiled/_chunks/workflow/{functions-CXb61C6h.js → functions-CeeNvKsq.js} +1 -1
  35. package/dist/src/compiled/_chunks/workflow/resume-hook-BPQHjeY5.js +1 -0
  36. package/dist/src/compiled/_chunks/workflow/run-DQ5dOyjm.js +1 -0
  37. package/dist/src/compiled/_chunks/workflow/run-id-BdE0MZz9.js +1 -0
  38. package/dist/src/compiled/_chunks/workflow/sleep-CzdoBiqy.js +1 -0
  39. package/dist/src/compiled/_chunks/workflow/spec-version-DBUVfF_R.js +1 -0
  40. package/dist/src/compiled/_chunks/workflow/undici-CUIybhQ2.js +95 -0
  41. package/dist/src/compiled/_chunks/workflow/wait-until-DK2lnH6U.js +15 -0
  42. package/dist/src/compiled/_chunks/workflow/{wrapper-CDq65xJV.js → wrapper-CMGju7QA.js} +1 -1
  43. package/dist/src/compiled/_chunks/workflow/ws-transport-Csi6Cydc.js +1 -0
  44. package/dist/src/compiler/extension-compatibility.d.ts +10 -10
  45. package/dist/src/compiler/extension-compatibility.js +1 -1
  46. package/dist/src/compiler/manifest.d.ts +8 -8
  47. package/dist/src/compiler/manifest.js +1 -1
  48. package/dist/src/compiler/normalize-extension.d.ts +3 -3
  49. package/dist/src/compiler/normalize-extension.js +1 -1
  50. package/dist/src/compiler/normalize-instructions.d.ts +1 -1
  51. package/dist/src/compiler/normalize-instructions.js +1 -1
  52. package/dist/src/compiler/normalize-manifest.js +1 -3
  53. package/dist/src/context/dynamic-instruction-lifecycle.d.ts +5 -1
  54. package/dist/src/context/dynamic-instruction-lifecycle.js +1 -1
  55. package/dist/src/context/keys.d.ts +6 -2
  56. package/dist/src/context/keys.js +1 -1
  57. package/dist/src/discover/manifest.d.ts +1 -1
  58. package/dist/src/discover/manifest.js +1 -1
  59. package/dist/src/evals/context.js +1 -1
  60. package/dist/src/evals/index.d.ts +2 -2
  61. package/dist/src/evals/reporters/index.d.ts +1 -1
  62. package/dist/src/evals/runner/artifacts.js +1 -1
  63. package/dist/src/evals/runner/execute-eval.d.ts +5 -0
  64. package/dist/src/evals/runner/execute-eval.js +1 -1
  65. package/dist/src/evals/runner/execute-task.d.ts +3 -0
  66. package/dist/src/evals/runner/execute-task.js +1 -1
  67. package/dist/src/evals/runner/reporters/braintrust.js +1 -1
  68. package/dist/src/evals/runner/reporters/types.d.ts +28 -2
  69. package/dist/src/evals/runner/run-evals.js +1 -1
  70. package/dist/src/evals/session.d.ts +12 -2
  71. package/dist/src/evals/session.js +1 -1
  72. package/dist/src/evals/target.js +1 -1
  73. package/dist/src/evals/types.d.ts +12 -1
  74. package/dist/src/execution/node-step.js +1 -1
  75. package/dist/src/execution/session.js +1 -1
  76. package/dist/src/execution/settle-cancelled-turn-step.js +1 -1
  77. package/dist/src/execution/workflow-steps.js +1 -1
  78. package/dist/src/execution/workflow-trace-context.d.ts +11 -0
  79. package/dist/src/execution/workflow-trace-context.js +1 -0
  80. package/dist/src/harness/ai-sdk-hook-bridge.d.ts +1 -1
  81. package/dist/src/harness/ai-sdk-hook-bridge.js +1 -1
  82. package/dist/src/harness/approval-delivery-coordinator.js +1 -1
  83. package/dist/src/harness/channel-delivery-instrumentation.d.ts +1 -1
  84. package/dist/src/harness/channel-delivery-instrumentation.js +1 -1
  85. package/dist/src/harness/emission.d.ts +2 -2
  86. package/dist/src/harness/emission.js +1 -1
  87. package/dist/src/harness/instrumentation/config.js +1 -0
  88. package/dist/src/harness/{instrumentation-content.d.ts → instrumentation/content.d.ts} +1 -1
  89. package/dist/src/harness/{instrumentation-dispatch.d.ts → instrumentation/dispatch.d.ts} +1 -1
  90. package/dist/src/harness/{instrumentation-dispatch.js → instrumentation/dispatch.js} +1 -1
  91. package/dist/src/harness/{instrumentation-lifecycle.d.ts → instrumentation/lifecycle.d.ts} +3 -6
  92. package/dist/src/harness/{instrumentation-lifecycle.js → instrumentation/lifecycle.js} +1 -1
  93. package/dist/src/harness/{instrumentation-native-events.d.ts → instrumentation/native-events.d.ts} +1 -1
  94. package/dist/src/harness/{instrumentation-native-events.js → instrumentation/native-events.js} +1 -1
  95. package/dist/src/harness/{instrumentation-providers.d.ts → instrumentation/providers.d.ts} +1 -1
  96. package/dist/src/harness/{instrumentation-providers.js → instrumentation/providers.js} +1 -1
  97. package/dist/src/harness/{instrumentation-runtime.d.ts → instrumentation/runtime.d.ts} +4 -2
  98. package/dist/src/harness/{instrumentation-state.d.ts → instrumentation/state.d.ts} +1 -1
  99. package/dist/src/harness/parent-lineage.d.ts +1 -1
  100. package/dist/src/harness/prepare-trace-context.d.ts +16 -0
  101. package/dist/src/harness/prepare-trace-context.js +1 -0
  102. package/dist/src/harness/tool-loop.js +2 -2
  103. package/dist/src/harness/types.d.ts +1 -1
  104. package/dist/src/internal/application/compiled-artifacts.js +2 -2
  105. package/dist/src/internal/application/package.js +1 -1
  106. package/dist/src/internal/authored-definition/core.d.ts +3 -3
  107. package/dist/src/internal/authored-definition/core.js +1 -1
  108. package/dist/src/internal/authored-package-boundary.js +1 -1
  109. package/dist/src/internal/helpers/markdown.js +1 -1
  110. package/dist/src/internal/instrumentation.d.ts +1 -1
  111. package/dist/src/internal/nitro/host/build-vercel-agent-summary.js +1 -1
  112. package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response-from-manifest.js +1 -1
  113. package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response.d.ts +4 -3
  114. package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response.js +1 -1
  115. package/dist/src/internal/nitro/routes/channel-request-instrumentation.js +1 -1
  116. package/dist/src/internal/vercel/project-link.d.ts +1 -1
  117. package/dist/src/internal/vercel/project-link.js +1 -1
  118. package/dist/src/internal/vercel-agent-summary.d.ts +10 -9
  119. package/dist/src/internal/vercel-agent-summary.js +1 -1
  120. package/dist/src/internal/workflow/development-world-client.js +1 -1
  121. package/dist/src/protocol/message.d.ts +15 -1
  122. package/dist/src/protocol/message.js +1 -1
  123. package/dist/src/public/channels/github/auth.d.ts +30 -0
  124. package/dist/src/public/channels/github/auth.js +2 -2
  125. package/dist/src/public/channels/github/defaults.d.ts +4 -4
  126. package/dist/src/public/channels/github/defaults.js +1 -1
  127. package/dist/src/public/channels/github/dispatch.d.ts +3 -2
  128. package/dist/src/public/channels/github/dispatch.js +1 -1
  129. package/dist/src/public/channels/github/githubChannel.d.ts +7 -2
  130. package/dist/src/public/channels/github/githubChannel.js +1 -1
  131. package/dist/src/public/channels/github/index.d.ts +1 -1
  132. package/dist/src/public/definitions/instructions.d.ts +14 -4
  133. package/dist/src/public/definitions/instructions.js +1 -1
  134. package/dist/src/public/definitions/tool.d.ts +5 -8
  135. package/dist/src/public/instructions/index.d.ts +1 -2
  136. package/dist/src/public/instructions/index.js +1 -1
  137. package/dist/src/public/instrumentation/index.d.ts +4 -3
  138. package/dist/src/public/instrumentation/otel.d.ts +5 -4
  139. package/dist/src/public/instrumentation/provider.d.ts +2 -2
  140. package/dist/src/public/nuxt/module.js +1 -1
  141. package/dist/src/public/sveltekit/index.d.ts +6 -20
  142. package/dist/src/public/sveltekit/index.js +1 -1
  143. package/dist/src/public/sveltekit/routing.d.ts +0 -24
  144. package/dist/src/public/sveltekit/routing.js +1 -1
  145. package/dist/src/runtime/agent/bootstrap.d.ts +2 -0
  146. package/dist/src/runtime/agent/bootstrap.js +1 -1
  147. package/dist/src/runtime/prompt/compose.d.ts +1 -1
  148. package/dist/src/runtime/prompt/compose.js +3 -1
  149. package/dist/src/runtime/resolve-agent.js +1 -1
  150. package/dist/src/runtime/types.d.ts +4 -3
  151. package/dist/src/setup/boxes/select-model.d.ts +6 -6
  152. package/dist/src/setup/boxes/select-model.js +1 -1
  153. package/dist/src/setup/project-resolution.d.ts +3 -3
  154. package/dist/src/setup/scaffold/create/project.js +1 -1
  155. package/dist/src/setup/slack-connect-lifecycle.d.ts +0 -9
  156. package/dist/src/setup/slack-connect-lifecycle.js +1 -1
  157. package/dist/src/setup/slackbot.d.ts +2 -1
  158. package/dist/src/setup/slackbot.js +1 -1
  159. package/dist/src/shared/default-agent-model.d.ts +1 -1
  160. package/dist/src/shared/default-agent-model.js +1 -1
  161. package/dist/src/shared/dynamic-tool-definition.d.ts +3 -4
  162. package/dist/src/shared/instructions-definition.d.ts +15 -11
  163. package/dist/src/{public/nuxt → shared}/vercel-services.d.ts +18 -19
  164. package/dist/src/shared/vercel-services.js +1 -0
  165. package/dist/src/svelte/index.js +1 -1
  166. package/dist/src/svelte/use-eve-agent.js +1 -1
  167. package/dist/src/tracing/agent-action-instrumentation.d.ts +1 -1
  168. package/dist/src/tracing/agent-action-instrumentation.js +1 -1
  169. package/dist/src/tracing/agent-approval-instrumentation.d.ts +1 -1
  170. package/dist/src/tracing/agent-channel-delivery-instrumentation.d.ts +1 -1
  171. package/dist/src/tracing/agent-channel-delivery-instrumentation.js +1 -1
  172. package/dist/src/tracing/agent-otel-provider.d.ts +4 -2
  173. package/dist/src/tracing/agent-otel-provider.js +2 -2
  174. package/dist/src/tracing/agent-otel-session-context.d.ts +17 -0
  175. package/dist/src/tracing/agent-otel-session-context.js +1 -0
  176. package/dist/src/tracing/agent-otel-usage.d.ts +1 -1
  177. package/dist/src/tracing/agent-tool-instrumentation.d.ts +1 -1
  178. package/dist/src/tracing/agent-tool-instrumentation.js +1 -1
  179. package/dist/src/tracing/agent-trace-state.d.ts +1 -1
  180. package/dist/src/tracing/install-instrumentation-runtime.d.ts +2 -2
  181. package/dist/src/tracing/install-instrumentation-runtime.js +1 -1
  182. package/dist/src/tracing/local-instrumentation-runtime.d.ts +1 -1
  183. package/dist/src/tracing/local-instrumentation-runtime.js +1 -1
  184. package/dist/src/tracing/local-traces.d.ts +3 -3
  185. package/dist/src/tracing/local-traces.js +1 -1
  186. package/dist/src/tracing/otel-declaration.d.ts +2 -2
  187. package/dist/src/tracing/otel-declaration.js +1 -1
  188. package/dist/src/vue/index.js +1 -1
  189. package/dist/src/vue/use-eve-agent.js +1 -1
  190. package/docs/README.md +18 -20
  191. package/docs/agent-config.md +9 -6
  192. package/docs/channels/custom.mdx +1 -1
  193. package/docs/channels/eve.mdx +10 -56
  194. package/docs/channels/github.mdx +1 -1
  195. package/docs/channels/meta.json +1 -0
  196. package/docs/concepts/context-control.md +32 -56
  197. package/docs/concepts/default-harness.md +2 -2
  198. package/docs/concepts/execution-model-and-durability.mdx +4 -4
  199. package/docs/concepts/meta.json +3 -1
  200. package/docs/concepts/sessions-runs-and-streaming.md +23 -11
  201. package/docs/{guides → concepts}/state.md +3 -3
  202. package/docs/connections/mcp.mdx +6 -89
  203. package/docs/connections/meta.json +1 -0
  204. package/docs/connections/openapi.mdx +5 -69
  205. package/docs/connections/overview.mdx +29 -3
  206. package/docs/evals/meta.json +1 -0
  207. package/docs/evals/reporters.mdx +14 -4
  208. package/docs/extensions.md +1 -1
  209. package/docs/getting-started.mdx +175 -13
  210. package/docs/guides/auth-and-route-protection.md +3 -18
  211. package/docs/guides/client/messages.mdx +3 -1
  212. package/docs/guides/client/meta.json +2 -1
  213. package/docs/guides/client/output-schema.mdx +2 -2
  214. package/docs/guides/client/overview.mdx +1 -1
  215. package/docs/guides/deployment/meta.json +1 -0
  216. package/docs/guides/deployment/overview.md +1 -1
  217. package/docs/guides/deployment/self-hosting.md +3 -3
  218. package/docs/guides/deployment/vercel.mdx +1 -1
  219. package/docs/guides/dev-tui.md +3 -13
  220. package/docs/guides/dynamic-capabilities.md +64 -4
  221. package/docs/guides/frontend/meta.json +2 -1
  222. package/docs/guides/frontend/nextjs.mdx +1 -10
  223. package/docs/guides/frontend/nuxt.mdx +1 -10
  224. package/docs/guides/frontend/overview.mdx +12 -3
  225. package/docs/guides/frontend/sveltekit.mdx +23 -11
  226. package/docs/guides/frontend/use-eve-agent-svelte.mdx +39 -126
  227. package/docs/guides/frontend/use-eve-agent-vue.mdx +40 -139
  228. package/docs/guides/instrumentation.md +15 -15
  229. package/docs/guides/meta.json +1 -5
  230. package/docs/guides/remote-agents.md +9 -9
  231. package/docs/guides/session-context.md +34 -103
  232. package/docs/install-integrations.mdx +1 -1
  233. package/docs/instructions.mdx +45 -12
  234. package/docs/meta.json +24 -13
  235. package/docs/patterns/dynamic-scheduling.md +1 -1
  236. package/docs/patterns/meta.json +1 -0
  237. package/docs/patterns/multi-tenant-approvals.md +1 -1
  238. package/docs/patterns/multi-tenant-auth.md +1 -1
  239. package/docs/patterns/multi-tenant-memory.md +4 -3
  240. package/docs/{guides → protocols}/acp.md +1 -1
  241. package/docs/protocols/meta.json +5 -0
  242. package/docs/reference/cli.md +39 -39
  243. package/docs/reference/meta.json +1 -1
  244. package/docs/reference/typescript-api.md +4 -2
  245. package/docs/sandbox.mdx +8 -0
  246. package/docs/{subagents.mdx → subagents/index.mdx} +2 -2
  247. package/docs/subagents/meta.json +5 -0
  248. package/docs/{guides/dynamic-workflows.md → subagents/workflow-tool.md} +6 -6
  249. package/docs/tools/human-in-the-loop.md +1 -1
  250. package/docs/tools/meta.json +1 -0
  251. package/docs/tools/overview.mdx +1 -1
  252. package/docs/tutorial/connect-a-warehouse.mdx +1 -1
  253. package/docs/tutorial/meta.json +1 -0
  254. package/docs/tutorial/remember-definitions.mdx +2 -2
  255. package/docs/tutorial/ship-it.mdx +2 -2
  256. package/package.json +4 -4
  257. package/dist/src/compiled/_chunks/workflow/dist-C8PhDW9B.js +0 -1
  258. package/dist/src/compiled/_chunks/workflow/functions-xMPAeWFr.js +0 -1
  259. package/dist/src/compiled/_chunks/workflow/node-Smb57EnG.js +0 -40
  260. package/dist/src/compiled/_chunks/workflow/resume-hook-BrduAuFX.js +0 -1
  261. package/dist/src/compiled/_chunks/workflow/run-CX7_sJnW.js +0 -1
  262. package/dist/src/compiled/_chunks/workflow/sleep-tsb2HjWK.js +0 -1
  263. package/dist/src/compiled/_chunks/workflow/undici-BNc_0O4m.js +0 -95
  264. package/dist/src/compiled/_chunks/workflow/wait-until-BYKVqrwc.js +0 -15
  265. package/dist/src/harness/instrumentation-config.js +0 -1
  266. package/dist/src/public/nuxt/vercel-services.js +0 -1
  267. package/dist/src/public/sveltekit/vercel-json.d.ts +0 -17
  268. package/dist/src/public/sveltekit/vercel-json.js +0 -1
  269. package/docs/installation.mdx +0 -66
  270. package/docs/project-structure.mdx +0 -53
  271. package/docs/reference/project-layout.md +0 -123
  272. /package/dist/src/harness/{instrumentation-config.d.ts → instrumentation/config.d.ts} +0 -0
  273. /package/dist/src/harness/{instrumentation-content.js → instrumentation/content.js} +0 -0
  274. /package/dist/src/harness/{instrumentation-runtime-context.d.ts → instrumentation/runtime-context.d.ts} +0 -0
  275. /package/dist/src/harness/{instrumentation-runtime-context.js → instrumentation/runtime-context.js} +0 -0
  276. /package/dist/src/harness/{instrumentation-runtime.js → instrumentation/runtime.js} +0 -0
  277. /package/dist/src/harness/{instrumentation-setup-context.d.ts → instrumentation/setup-context.d.ts} +0 -0
  278. /package/dist/src/harness/{instrumentation-setup-context.js → instrumentation/setup-context.js} +0 -0
  279. /package/dist/src/harness/{instrumentation-state.js → instrumentation/state.js} +0 -0
  280. /package/docs/{guides → protocols}/ucp.mdx +0 -0
@@ -69,21 +69,12 @@ With the plugin in `vite.config.ts`, components call [`useEveAgent`](./use-eve-a
69
69
  </form>
70
70
  ```
71
71
 
72
- The default eve channel is fail-closed. With no `agent/channels/eve.ts` authored, eve registers `eveChannel({ auth: [vercelOidc(), localDev(), placeholderAuth()] })`: `vercelOidc()` gets the first chance to resolve a Vercel caller, `localDev()` authenticates while the process is an `eve dev` or `vercel dev` server, and everything else gets a `401`. To set your own auth policy, add `agent/channels/eve.ts`:
73
-
74
- ```ts title="agent/channels/eve.ts"
75
- import { eveChannel } from "eve/channels/eve";
76
- import { localDev, vercelOidc } from "eve/channels/auth";
77
-
78
- export default eveChannel({ auth: [vercelOidc(), localDev()] });
79
- ```
80
-
81
- For a public demo, use `none()` (also from `eve/channels/auth`) to skip authentication. See [Channels](../../channels/overview) and [Auth & route protection](../auth-and-route-protection).
72
+ The browser still needs a production authentication policy. See [Authenticate browser requests](./overview#authenticate-browser-requests) for the default fail-closed behavior and channel configuration.
82
73
 
83
74
  ## Dev vs deploy topology
84
75
 
85
76
  - **Local dev.** `npm run dev` boots the eve dev server next to SvelteKit and proxies the eve routes to it, so the browser only ever hits the SvelteKit origin. `npm run build && npm run preview` behaves the same way: the preview server gets its own eve route proxy and either reuses the shared eve server or starts one.
86
- - **Vercel.** The SvelteKit app and the eve runtime deploy as a single project. The web app is public; the eve runtime sits behind it on the same origin. Use `eveBuildCommand` for a project-specific agent build:
77
+ - **Vercel.** The SvelteKit app and the eve runtime deploy as a single project. On Vercel builds the plugin adds Build Output [`services`](https://vercel.com/docs/services) for eve and a `routes` entry that sends `/eve/v1/**` to that service before filesystem routing; the SvelteKit app remains the default app. No `vercel.json` is required. By default the generated service runs the installed eve binary from the SvelteKit app's dependencies, so the agent directory does not need its own `package.json`. When the agent needs its own build step, set `eveBuildCommand`:
87
78
 
88
79
  ```ts
89
80
  export default defineConfig({
@@ -104,6 +95,27 @@ For a public demo, use `none()` (also from `eve/channels/auth`) to skip authenti
104
95
  });
105
96
  ```
106
97
 
98
+ ## Managing vercel.json yourself
99
+
100
+ When `vercel.json` declares [`services`](https://vercel.com/docs/services), the plugin generates nothing and your configuration owns routing. It must include the eve service (`framework: "eve"`) and a rewrite that exposes the eve transport, or the build fails:
101
+
102
+ ```json title="vercel.json"
103
+ {
104
+ "services": {
105
+ "web": { "root": ".", "framework": "sveltekit" },
106
+ "eve": { "root": "agent", "framework": "eve", "buildCommand": "eve build" }
107
+ },
108
+ "rewrites": [{ "source": "/eve/v1/(.*)", "destination": { "service": "eve" } }]
109
+ }
110
+ ```
111
+
112
+ ### Migrating from experimentalServices
113
+
114
+ Earlier versions of the plugin wrote the legacy `experimentalServices` field into `vercel.json`. Vercel no longer routes that model, so the plugin now ignores the field and warns when it sees one. Migrate either way:
115
+
116
+ - **Generated (default).** Delete `vercel.json` (or just its `experimentalServices` block) and set the project's Framework Preset back to SvelteKit. The plugin generates the eve service and its routing on every Vercel build.
117
+ - **Hand-maintained.** Replace `experimentalServices` with the stable `services` and `rewrites` shown above, and keep the Services Framework Preset.
118
+
107
119
  ## What to read next
108
120
 
109
121
  - [`useEveAgent` (Svelte)](./use-eve-agent-svelte): the binding API
@@ -1,43 +1,15 @@
1
1
  ---
2
2
  title: "useEveAgent (Svelte)"
3
- description: "Svelte 5 binding that drives an eve agent session from the browser."
3
+ description: "Use the eve Svelte binding and its Svelte-specific reactive interface."
4
4
  ---
5
5
 
6
- `useEveAgent()` from `eve/svelte` is the browser side of an eve session in a Svelte 5 app. Call it once for a long-lived session you can send turns to, with every stream event projected into rune-friendly reactive data. On SvelteKit, the [Vite plugin](./sveltekit) wires up the routes. The [frontend overview](./overview) covers the model shared across frameworks.
6
+ `useEveAgent()` from `eve/svelte` exposes the shared eve frontend client through Svelte 5 reactive getters and methods. Read the [frontend overview](./overview) for session behavior, messages, human input, authorization, callbacks, reducers, and persistence. This page covers the Svelte-specific interface.
7
7
 
8
- ## Basic usage
9
-
10
- Import from `eve/svelte` and read the reactive getters directly. No `$` prefix:
11
-
12
- ```svelte
13
- <script lang="ts">
14
- import { useEveAgent } from "eve/svelte";
15
-
16
- const agent = useEveAgent();
17
- </script>
18
-
19
- {#each agent.data.messages as message}
20
- <p>{message.role}: {JSON.stringify(message.parts)}</p>
21
- {/each}
22
- ```
23
-
24
- ## What it returns
8
+ On SvelteKit, register the [`eveSvelteKit` Vite plugin](./sveltekit) to mount the agent routes on the application origin.
25
9
 
26
- | Property | Type | Description |
27
- | --------- | --------------------------------------------- | ------------------------------------------------------------------------- |
28
- | `data` | `TData` | Projected state. With the default reducer, `EveMessageData` (`messages`). |
29
- | `status` | `UseEveAgentStatus` | `"ready"`, `"submitted"`, `"streaming"`, or `"error"`. |
30
- | `error` | `Error \| undefined` | Last transport-level error. |
31
- | `events` | `readonly MessageStreamEvent[]` | Raw server events for this session. |
32
- | `session` | `ClientSessionState \| undefined` | Fixed session ID and stream cursor. |
33
- | `send` | `(message, options?) => Promise<void>` | Send text or a multi-part message. |
34
- | `respond` | `(inputResponses, options?) => Promise<void>` | Answer pending HITL input requests. |
35
- | `stop` | `() => void` | Abort the client's in-flight stream. |
36
- | `reset` | `() => void` | Clear state and start a new session. |
37
-
38
- These state fields are reactive getters, so read them straight from templates, `$derived`, or `$effect`. They are not stores, so don't prefix them with `$`.
10
+ ## Basic usage
39
11
 
40
- ## Send a message
12
+ Call the binding once for a conversation and read its reactive getters directly. The returned object is not a Svelte store, so its fields do not use the `$` prefix:
41
13
 
42
14
  ```svelte
43
15
  <script lang="ts">
@@ -45,39 +17,51 @@ These state fields are reactive getters, so read them straight from templates, `
45
17
 
46
18
  const agent = useEveAgent();
47
19
  let message = $state("");
20
+ let isBusy = $derived(agent.status === "submitted" || agent.status === "streaming");
48
21
 
49
22
  async function handleSubmit() {
50
23
  const text = message.trim();
51
- if (!text) return;
24
+ if (!text || isBusy) return;
52
25
  message = "";
53
26
  await agent.send(text);
54
27
  }
55
28
  </script>
56
29
 
30
+ {#each agent.data.messages as item}
31
+ <p>{item.role}: {JSON.stringify(item.parts)}</p>
32
+ {/each}
33
+
57
34
  <form onsubmit={(event) => {
58
35
  event.preventDefault();
59
36
  void handleSubmit();
60
37
  }}>
61
- <input bind:value={message} placeholder="Type a message..." />
62
- <button type="submit">Send</button>
38
+ <input bind:value={message} disabled={isBusy} />
39
+ <button type="submit" disabled={isBusy}>Send</button>
63
40
  </form>
64
41
  ```
65
42
 
66
- When a turn is more than plain text, reach for `send()`. Attachments follow the AI SDK `UserContent` format. Send file data as a base64 `data:` URL so it survives the JSON transport:
43
+ ## What it returns
67
44
 
68
- ```ts
69
- const bytes = new Uint8Array(await file.arrayBuffer());
70
- const base64 = btoa(String.fromCodePoint(...bytes));
45
+ The state fields are reactive getters; the commands are ordinary methods:
71
46
 
72
- await agent.send([
73
- { type: "text", text: "Describe this image." },
74
- { type: "file", data: `data:${file.type};base64,${base64}`, mediaType: file.type },
75
- ]);
76
- ```
47
+ | Property | Svelte shape |
48
+ | ---------------------------------- | --------------------------------- |
49
+ | `data` | `TData` |
50
+ | `status` | `UseEveAgentStatus` |
51
+ | `error` | `Error \| undefined` |
52
+ | `events` | `readonly MessageStreamEvent[]` |
53
+ | `session` | `ClientSessionState \| undefined` |
54
+ | `send`, `respond`, `stop`, `reset` | Methods |
55
+
56
+ Read the getters directly in templates, `$derived`, or `$effect`. The [shared returned-state reference](./overview#returned-state) describes what each value and command does.
57
+
58
+ ## Send a message
59
+
60
+ Call `agent.send(text)` for text or pass content parts for attachments. The API and transport behavior match the [shared sending guide](./overview#sending-and-streaming); only reactive access differs in Svelte.
77
61
 
78
62
  ## Human-in-the-loop prompts
79
63
 
80
- A tool opts into approval with `approval` ([Tools](../../tools)). When one fires, the pending request rides along on a `dynamic-tool` part at `part.toolMetadata?.eve?.inputRequest`. Scan every message because an unrelated turn can add newer messages while the approval stays open, then answer through the same session with `agent.respond(inputResponses)`:
64
+ Pending requests appear in `agent.data.messages`. Use the Svelte exports when narrowing message parts, then answer through `agent.respond()`:
81
65
 
82
66
  ```svelte
83
67
  <script lang="ts">
@@ -118,101 +102,30 @@ A tool opts into approval with `approval` ([Tools](../../tools)). When one fires
118
102
  {/each}
119
103
  ```
120
104
 
121
- For a question with `allowFreeform`, bind a text input and send `{ requestId, text }`. The [React hook reference](./overview) covers the shared behavior.
105
+ See [Human-in-the-loop prompts](./overview#human-in-the-loop-prompts) for request semantics and rendering guidance.
122
106
 
123
107
  ## Stop, reset, and resume
124
108
 
125
- `stop()` aborts the in-flight stream; the server-side turn keeps running and remains attachable — to stop the turn itself, POST the session's [cancel route](../../channels/eve#routes). `reset()` wipes state and starts a fresh session. To resume across reloads, hand `initialSession` the state you saved earlier and use `onSessionChange` to persist the cursor as it advances:
126
-
127
- ```ts
128
- const agent = useEveAgent({
129
- initialSession: savedSessionState,
130
- initialEvents: savedEvents,
131
- onSessionChange: (session) => {
132
- localStorage.setItem("eve-session", JSON.stringify(session));
133
- },
134
- });
135
- ```
109
+ Call `agent.stop()` to detach the browser stream without cancelling server-side work, and `agent.reset()` to clear local state and start a new session. Pass `initialSession` and `initialEvents` to restore a saved conversation. See [Resumable sessions](./overview#resumable-sessions) for the persistence contract and [Sending and streaming](./overview#sending-and-streaming) for cancellation behavior.
136
110
 
137
111
  ## Custom host and credentials
138
112
 
139
- Point `host` at an eve server on a different origin, and pass credentials through `auth` or `headers`. When you supply a function, it re-resolves before every request:
140
-
141
- ```ts
142
- const agent = useEveAgent({
143
- host: "https://agent.example.com",
144
- headers: async () => ({
145
- authorization: `Bearer ${await getAccessToken()}`,
146
- }),
147
- });
148
- ```
113
+ Pass `host`, `auth`, or `headers` to the binding using the same options as the other frontend bindings. See [Custom hosts and headers](./overview#custom-hosts-and-headers).
149
114
 
150
115
  ## Attach page context per turn
151
116
 
152
- `clientContext` adds ephemeral context for the next model call and nothing more. Strings (or an array of strings) become user-role context messages; an object is JSON-serialized into one. It rides along with a message or HITL response, never dispatches a turn on its own, and never lands in durable session history. Pass it to `send()`:
153
-
154
- ```ts
155
- await agent.send("What should I do on this screen?", {
156
- clientContext: { route: "/billing", plan: "pro", seatsUsed: 4 },
157
- });
158
- ```
159
-
160
- To attach the same context to every turn without threading it through each call site, pass `prepareSend`. It runs right before each send and returns the (possibly augmented) turn:
161
-
162
- ```ts
163
- const agent = useEveAgent({
164
- prepareSend: (input) => ({
165
- ...input,
166
- clientContext: { route: location.pathname },
167
- }),
168
- });
169
- ```
117
+ Pass `clientContext` to `send()` or `respond()`, or use `prepareSend` to add context before every turn. See [Attach page context per turn](./overview#attach-page-context-per-turn).
170
118
 
171
119
  ## Lifecycle callbacks
172
120
 
173
- The binding takes a few per-turn callbacks:
174
-
175
- - `onEvent(event)`: fires for each eve stream event as it arrives.
176
- - `onError(error)`: fires with the last `Error` when a turn fails.
177
- - `onFinish(snapshot)`: fires with the final snapshot once a turn settles.
178
- - `onSessionChange(session)`: fires when the session cursor advances. Persist it to resume across reloads.
179
-
180
- ```ts
181
- const agent = useEveAgent({
182
- onEvent: (event) => console.debug(event.type),
183
- onError: (error) => console.error(error.message),
184
- onFinish: (snapshot) => console.log(snapshot.status),
185
- });
186
- ```
187
-
188
- The `optimistic` option (default `true`) projects submitted user messages into `data` before eve confirms them with a `message.received` event. These are reducer-facing projection events only; `events` stays the authoritative eve stream.
121
+ Pass `onEvent`, `onError`, `onFinish`, or `onSessionChange` when the application needs lifecycle notifications. See [Lifecycle callbacks](./overview#lifecycle-callbacks) for callback timing and optimistic projection behavior.
189
122
 
190
123
  ## Custom reducer
191
124
 
192
- The default reducer projects events into `{ messages }` (`EveMessageData`). To shape `data` differently, pass a `reducer` implementing `EveAgentReducer<TData>`:
193
-
194
- ```ts
195
- import { useEveAgent } from "eve/svelte";
196
- import type { EveAgentReducer } from "eve/svelte";
197
-
198
- interface ToolLog {
199
- readonly toolCalls: number;
200
- }
201
-
202
- const toolCounter: EveAgentReducer<ToolLog> = {
203
- initial: () => ({ toolCalls: 0 }),
204
- reduce: (data, event) =>
205
- event.type === "actions.requested" ? { toolCalls: data.toolCalls + 1 } : data,
206
- };
207
-
208
- const agent = useEveAgent({ reducer: toolCounter });
209
- // agent.data is ToolLog
210
- ```
211
-
212
- `reduce(data, event)` receives both authoritative eve stream events and client projection events (`client.message.submitted`, `client.message.failed`, `client.input.responded`). Handle the client events too if you want optimistic and HITL state in your projection. Otherwise, return `data` unchanged for them.
125
+ Import `EveAgentReducer` from `eve/svelte` when projecting events into application-specific state. The resulting `agent.data` uses the reducer's `TData` type. See [Custom reducer](./overview#custom-reducer) for the reducer contract and client projection events.
213
126
 
214
127
  ## What to read next
215
128
 
216
- - [SvelteKit](./sveltekit): Vite plugin setup
217
- - [Frontend overview](./overview): the shared integration model
218
- - [Sessions, runs & streaming](../../concepts/sessions-runs-and-streaming)
129
+ - [SvelteKit](./sveltekit): register the Vite plugin and mount the eve runtime.
130
+ - [Frontend overview](./overview): use the shared frontend API.
131
+ - [Sessions, runs, and streaming](../../concepts/sessions-runs-and-streaming): understand the underlying session protocol.
@@ -1,94 +1,66 @@
1
1
  ---
2
2
  title: "useEveAgent (Vue)"
3
- description: "Vue composable that drives an eve agent session from the browser."
3
+ description: "Use the eve Vue composable and its Vue-specific reactive interface."
4
4
  ---
5
5
 
6
- `useEveAgent()` from `eve/vue` is how a Vue app talks to an eve session. It opens a long-lived session, sends turns, and folds every stream event into reactive data you can bind in a template. Nuxt auto-imports it through the [module](./nuxt), and the [frontend overview](./overview) covers the shared model.
6
+ `useEveAgent()` from `eve/vue` exposes the shared eve frontend client as Vue computed refs and methods. Read the [frontend overview](./overview) for session behavior, messages, human input, authorization, callbacks, reducers, and persistence. This page covers the Vue-specific interface.
7
7
 
8
- ## Basic usage
9
-
10
- Import the composable from `eve/vue`. Its state is exposed as `ComputedRef`s, so you read it unwrapped in templates:
11
-
12
- ```vue
13
- <script setup lang="ts">
14
- import { useEveAgent } from "eve/vue";
15
-
16
- const { data } = useEveAgent();
17
- </script>
18
-
19
- <template>
20
- <div v-for="message in data.messages" :key="message.id">
21
- <p>{{ message.role }}: {{ message.parts }}</p>
22
- </div>
23
- </template>
24
- ```
8
+ Nuxt users normally receive the composable as an auto-import after registering the [`eve/nuxt` module](./nuxt).
25
9
 
26
- ## What it returns
27
-
28
- | Property | Type | Description |
29
- | --------- | ---------------------------------------------- | ------------------------------------------------------------------------- |
30
- | `data` | `ComputedRef<TData>` | Projected state. With the default reducer, `EveMessageData` (`messages`). |
31
- | `status` | `ComputedRef<UseEveAgentStatus>` | `"ready"`, `"submitted"`, `"streaming"`, or `"error"`. |
32
- | `error` | `ComputedRef<Error \| undefined>` | Last transport-level error. |
33
- | `events` | `ComputedRef<readonly MessageStreamEvent[]>` | Raw server events for this session. |
34
- | `session` | `ComputedRef<ClientSessionState \| undefined>` | Fixed session ID and stream cursor. |
35
- | `send` | `(message, options?) => Promise<void>` | Send text or a multi-part message. |
36
- | `respond` | `(inputResponses, options?) => Promise<void>` | Answer pending HITL input requests. |
37
- | `stop` | `() => void` | Abort the client's in-flight stream. |
38
- | `reset` | `() => void` | Clear state and start a new session. |
10
+ ## Basic usage
39
11
 
40
- The first five are `ComputedRef`s; the rest are methods. Destructure whatever you need, since refs keep their reactivity through destructuring. Read them with `.value` in `<script>`, and unwrapped in `<template>`.
41
-
42
- ## Send a message
12
+ Import the composable from `eve/vue`. Its state is exposed as `ComputedRef`s, so templates unwrap it automatically:
43
13
 
44
14
  ```vue
45
15
  <script setup lang="ts">
46
- import { ref } from "vue";
47
16
  import { useEveAgent } from "eve/vue";
17
+ import { computed, ref } from "vue";
48
18
 
49
- const { send } = useEveAgent();
19
+ const { data, status, send } = useEveAgent();
50
20
  const message = ref("");
21
+ const isBusy = computed(() => status.value === "submitted" || status.value === "streaming");
51
22
 
52
23
  async function handleSubmit() {
53
24
  const text = message.value.trim();
54
- if (!text) return;
25
+ if (!text || isBusy.value) return;
55
26
  message.value = "";
56
27
  await send(text);
57
28
  }
58
29
  </script>
59
30
 
60
31
  <template>
32
+ <div v-for="item in data.messages" :key="item.id">
33
+ <p>{{ item.role }}: {{ item.parts }}</p>
34
+ </div>
61
35
  <form @submit.prevent="handleSubmit">
62
- <input v-model="message" placeholder="Type a message..." />
63
- <button type="submit">Send</button>
36
+ <input v-model="message" :disabled="isBusy" />
37
+ <button type="submit" :disabled="isBusy">Send</button>
64
38
  </form>
65
39
  </template>
66
40
  ```
67
41
 
68
- For anything beyond plain text, reach for `send()`. Attachments follow the AI SDK `UserContent` format. Send file data as a base64 `data:` URL so it survives the JSON transport:
42
+ ## What it returns
69
43
 
70
- ```vue
71
- <script setup lang="ts">
72
- import { useEveAgent } from "eve/vue";
44
+ The state fields are computed refs; the commands are ordinary methods:
73
45
 
74
- const { send } = useEveAgent();
75
-
76
- async function onFileChange(event: Event) {
77
- const file = (event.target as HTMLInputElement).files?.[0];
78
- if (!file) return;
79
- const bytes = new Uint8Array(await file.arrayBuffer());
80
- const base64 = btoa(String.fromCodePoint(...bytes));
81
- await send([
82
- { type: "text", text: "Describe this image." },
83
- { type: "file", data: `data:${file.type};base64,${base64}`, mediaType: file.type },
84
- ]);
85
- }
86
- </script>
87
- ```
46
+ | Property | Vue shape |
47
+ | ---------------------------------- | ---------------------------------------------- |
48
+ | `data` | `ComputedRef<TData>` |
49
+ | `status` | `ComputedRef<UseEveAgentStatus>` |
50
+ | `error` | `ComputedRef<Error \| undefined>` |
51
+ | `events` | `ComputedRef<readonly MessageStreamEvent[]>` |
52
+ | `session` | `ComputedRef<ClientSessionState \| undefined>` |
53
+ | `send`, `respond`, `stop`, `reset` | Methods |
54
+
55
+ Destructuring preserves reactivity because each state value remains a ref. Read refs with `.value` in `<script>` and without `.value` in a template. The [shared returned-state reference](./overview#returned-state) describes what each value and command does.
56
+
57
+ ## Send a message
58
+
59
+ Call `send(text)` for text or pass content parts for attachments. The API and transport behavior match the [shared sending guide](./overview#sending-and-streaming); only reactive access differs in Vue.
88
60
 
89
61
  ## Human-in-the-loop prompts
90
62
 
91
- A tool opts into approval with `approval` ([Tools](../../tools)). When it triggers, the pending request shows up on a `dynamic-tool` part at `part.toolMetadata?.eve?.inputRequest`. Scan every message because an unrelated turn can add newer messages while the approval stays open, then answer through the same session with `respond(inputResponses)`:
63
+ Pending requests appear in `data.value.messages`. Use the Vue exports when narrowing message parts, then answer through `respond()`:
92
64
 
93
65
  ```vue
94
66
  <script setup lang="ts">
@@ -132,101 +104,30 @@ const pendingRequests = computed(() =>
132
104
  </template>
133
105
  ```
134
106
 
135
- For a question with `allowFreeform`, bind a text input and send `{ requestId, text }`. The [React hook reference](./overview) covers the shared behavior.
107
+ See [Human-in-the-loop prompts](./overview#human-in-the-loop-prompts) for request semantics and rendering guidance.
136
108
 
137
109
  ## Stop, reset, and resume
138
110
 
139
- `stop()` aborts the in-flight stream; the server-side turn keeps running and remains attachable — to stop the turn itself, POST the session's [cancel route](../../channels/eve#routes). `reset()` wipes state and starts a fresh session. To survive a reload, pass `initialSession` to restore a saved session and `onSessionChange` to persist the cursor as it moves:
140
-
141
- ```ts
142
- const agent = useEveAgent({
143
- initialSession: savedSessionState,
144
- initialEvents: savedEvents,
145
- onSessionChange: (session) => {
146
- localStorage.setItem("eve-session", JSON.stringify(session));
147
- },
148
- });
149
- ```
111
+ Call `stop()` to detach the browser stream without cancelling server-side work, and `reset()` to clear local state and start a new session. Pass `initialSession` and `initialEvents` to restore a saved conversation. See [Resumable sessions](./overview#resumable-sessions) for the persistence contract and [Sending and streaming](./overview#sending-and-streaming) for cancellation behavior.
150
112
 
151
113
  ## Custom host and credentials
152
114
 
153
- When your eve server lives somewhere other than the same origin, point at it with `host` and attach credentials through `auth` or `headers`. Pass a function and it re-resolves before each request:
154
-
155
- ```ts
156
- const agent = useEveAgent({
157
- host: "https://agent.example.com",
158
- headers: async () => ({
159
- authorization: `Bearer ${await getAccessToken()}`,
160
- }),
161
- });
162
- ```
115
+ Pass `host`, `auth`, or `headers` to the composable using the same options as the other frontend bindings. See [Custom hosts and headers](./overview#custom-hosts-and-headers).
163
116
 
164
117
  ## Attach page context per turn
165
118
 
166
- `clientContext` adds ephemeral context for the next model call and nothing more. Strings (or an array of strings) become user-role context messages; an object is JSON-serialized into one. It rides along with a message or HITL response, never dispatches a turn on its own, and never lands in durable session history. Pass it in the second argument to `send()` or `respond()`:
167
-
168
- ```ts
169
- await send("What should I do on this screen?", {
170
- clientContext: { route: "/billing", plan: "pro", seatsUsed: 4 },
171
- });
172
- ```
173
-
174
- To attach the same context to every turn without threading it through each call site, pass `prepareSend`. It runs right before each send and returns the (possibly augmented) turn:
175
-
176
- ```ts
177
- const agent = useEveAgent({
178
- prepareSend: (input) => ({
179
- ...input,
180
- clientContext: { route: location.pathname },
181
- }),
182
- });
183
- ```
119
+ Pass `clientContext` to `send()` or `respond()`, or use `prepareSend` to add context before every turn. See [Attach page context per turn](./overview#attach-page-context-per-turn).
184
120
 
185
121
  ## Lifecycle callbacks
186
122
 
187
- The composable takes a few per-turn callbacks:
188
-
189
- - `onEvent(event)`: fires for each eve stream event as it arrives.
190
- - `onError(error)`: fires with the last `Error` when a turn fails.
191
- - `onFinish(snapshot)`: fires with the final snapshot once a turn settles.
192
- - `onSessionChange(session)`: fires when the session cursor advances. Persist it to resume across reloads.
193
-
194
- ```ts
195
- const agent = useEveAgent({
196
- onEvent: (event) => console.debug(event.type),
197
- onError: (error) => console.error(error.message),
198
- onFinish: (snapshot) => console.log(snapshot.status),
199
- });
200
- ```
201
-
202
- The `optimistic` option (default `true`) projects submitted user messages into `data` before eve confirms them with a `message.received` event. These are reducer-facing projection events only; `events` stays the authoritative eve stream.
123
+ Pass `onEvent`, `onError`, `onFinish`, or `onSessionChange` when the application needs lifecycle notifications. See [Lifecycle callbacks](./overview#lifecycle-callbacks) for callback timing and optimistic projection behavior.
203
124
 
204
125
  ## Custom reducer
205
126
 
206
- The default reducer projects events into `{ messages }` (`EveMessageData`). To shape `data` differently, pass a `reducer` implementing `EveAgentReducer<TData>`:
207
-
208
- ```ts
209
- import { useEveAgent } from "eve/vue";
210
- import type { EveAgentReducer } from "eve/vue";
211
-
212
- interface ToolLog {
213
- readonly toolCalls: number;
214
- }
215
-
216
- const toolCounter: EveAgentReducer<ToolLog> = {
217
- initial: () => ({ toolCalls: 0 }),
218
- reduce: (data, event) =>
219
- event.type === "actions.requested" ? { toolCalls: data.toolCalls + 1 } : data,
220
- };
221
-
222
- const agent = useEveAgent({ reducer: toolCounter });
223
- // agent.data.value is ToolLog
224
- ```
225
-
226
- `reduce(data, event)` receives both authoritative eve stream events and client projection events (`client.message.submitted`, `client.message.failed`, `client.input.responded`). Handle the client events too if you want optimistic and HITL state in your projection. Otherwise, return `data` unchanged for them.
127
+ Import `EveAgentReducer` from `eve/vue` when projecting events into application-specific state. The resulting `data` remains a `ComputedRef<TData>`. See [Custom reducer](./overview#custom-reducer) for the reducer contract and client projection events.
227
128
 
228
129
  ## What to read next
229
130
 
230
- - [Nuxt](./nuxt): module setup
231
- - [Frontend overview](./overview): the shared integration model
232
- - [Sessions, runs & streaming](../../concepts/sessions-runs-and-streaming)
131
+ - [Nuxt](./nuxt): register the module and mount the eve runtime.
132
+ - [Frontend overview](./overview): use the shared frontend API.
133
+ - [Sessions, runs, and streaming](../../concepts/sessions-runs-and-streaming): understand the underlying session protocol.
@@ -1,5 +1,5 @@
1
1
  ---
2
- title: "instrumentation.ts"
2
+ title: "Observability"
3
3
  description: "Trace an agent with OpenTelemetry in instrumentation.ts, read the workflow run tags eve emits, and debug discovery with eve info and the common-failures table."
4
4
  ---
5
5
 
@@ -48,11 +48,11 @@ Any OTel-compatible backend works (Braintrust, PostHog, Raindrop, Arize, Honeyco
48
48
 
49
49
  Three more fields control what the AI SDK records inside those spans (see the AI SDK's [telemetry reference](https://ai-sdk.dev/docs/ai-sdk-core/telemetry)):
50
50
 
51
- - `recordInputs` records full message history on each step span (defaults to `true`). Set it to `false` if inputs contain sensitive content or you want to reduce span payload size.
52
- - `recordOutputs` records model outputs on spans (defaults to `true`). Set it to `false` to disable output recording.
51
+ - `recordInputs` records full message history on each step span. It defaults to `false`; set it to `true` to include input content.
52
+ - `recordOutputs` records model outputs on spans. It defaults to `false`; set it to `true` to include output content.
53
53
  - `functionId` overrides the function name on spans (defaults to the agent name).
54
54
 
55
- For sensitive, regulated, or production data, set `recordInputs` and `recordOutputs` to `false` unless you have reviewed the exporter and its data-retention path.
55
+ eve records metadata without model or tool inputs and outputs by default. Enable either content category only after reviewing the exporter and its data-retention path.
56
56
 
57
57
  You are responsible for ensuring any observability or eval provider is approved for the data exported to it.
58
58
 
@@ -173,20 +173,20 @@ Tag writes are best-effort: a failure is logged once per process and then swallo
173
173
 
174
174
  These tags power the **Agent Runs** tab in the Vercel dashboard. When you deploy on Vercel, the platform auto-detects `eve` as the framework and surfaces an Agent Runs view under your project's **Observability** tab, where you can browse sessions and drill into each conversation's trace, with no `instrumentation.ts` required. The tab is currently gated per team. See [Deploy to Vercel](./deployment/vercel#inspect-agent-runs) for enablement. Agent Runs is separate from the OpenTelemetry export above. Use OTel when you want spans in Braintrust, PostHog, Datadog, or another third-party backend.
175
175
 
176
- Note: By default, telemetry records full message history and model outputs You may need to disclose these data flows in your privacy materials if utilized.
177
-
178
176
  ## Local traces
179
177
 
180
178
  Without an `instrumentation.ts`, `eve dev` records spans to disk — one trace per session, with turns, model steps, and tool calls. Read them two ways:
181
179
 
182
- - [`/traces`](dev-tui#inspect-traces) in the dev TUI: a live viewer that replays the trace as a conversation.
180
+ - [`/traces`](dev-tui#logs-and-traces) in the dev TUI: a live trace viewer that replays captured content as a conversation.
183
181
  - [`eve traces`](../reference/cli#eve-traces): a span tree in the terminal, `eve traces ls` to list. Works after `eve dev` exits.
184
182
 
183
+ Local traces omit model and tool inputs and outputs by default. Set `EVE_TRACES_CONTENT=on` in `.env.local` to capture that content.
184
+
185
185
  Writing `instrumentation.ts` replaces this: your `setup` takes over and nothing is recorded locally. For span attributes, retention, and the `EVE_TRACES*` variables, see [`eve traces`](../reference/cli#eve-traces).
186
186
 
187
187
  ## Debugging
188
188
 
189
- `eve info` is the fastest way to see what eve actually picked up: the active tools, skills, subagents, schedules, routes, and discovery diagnostics. eve also writes inspectable artifacts under `.eve/`, kept even when discovery hits errors:
189
+ `eve info` is the fastest way to see what eve actually picked up: ordered static instructions with their roles, plus the active tools, skills, subagents, schedules, routes, and discovery diagnostics. Dynamic instruction results exist only at runtime and are not part of this static inspection. eve also writes inspectable artifacts under `.eve/`, kept even when discovery hits errors:
190
190
 
191
191
  | Artifact | Tells you |
192
192
  | ------------------------------- | ------------------------------------------- |
@@ -199,13 +199,13 @@ When `eve build` fails on discovery errors, the CLI prints the full diagnostics
199
199
 
200
200
  ### Common failures
201
201
 
202
- | Symptom | Likely cause and fix |
203
- | --------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
204
- | Tool not discovered (the model never sees it) | Run `eve info`. Confirm the file is in the right slot (`agent/tools/<name>.ts`) and default-exports `defineTool(...)`, and check `.eve/diagnostics.json` for shape errors. `schedules/` are root-only. |
205
- | Model won't call a tool it should | Tighten the tool `description` and `inputSchema`; put procedural guidance in a [skill](../skills), not the description. Confirm it's in the active set with `eve info`. |
206
- | Stuck on `session.waiting` | The turn is parked for input. Answer the pending approval or question, or POST a follow-up to `/eve/v1/session/:sessionId`. |
207
- | 401 on production routes | Expected: auth fails closed. Replace `placeholderAuth()` with your route policy. Use `vercelOidc()` only for Vercel-issued tokens; otherwise configure `httpBasic()`, JWT/OIDC helpers, or a custom `AuthFn`. See [Auth and route protection](./auth-and-route-protection). |
208
- | Build fails with discovery errors | Read the printed diagnostics and `.eve/diagnostics.json`; confirm the root-vs-subagent boundary is valid and secrets come from env vars. |
202
+ | Symptom | Likely cause and fix |
203
+ | --------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
204
+ | Tool not discovered (the model never sees it) | Run `eve info`. Confirm the file is in the right slot (`agent/tools/<name>.ts`) and default-exports `defineTool(...)`, and check `.eve/diagnostics.json` for shape errors. `schedules/` are root-only. |
205
+ | Model won't call a tool it should | Tighten the tool `description` and `inputSchema`; put procedural guidance in a [skill](../skills), not the description. Confirm it's in the active set with `eve info`. |
206
+ | Stuck on `session.waiting` | The turn is parked for input. Answer the pending approval or question, or POST a follow-up to `/eve/v1/session/:sessionId`. |
207
+ | 401 on production routes | Expected: auth fails closed. Replace `placeholderAuth()` with your route policy. Use `vercelOidc()` only for Vercel-issued tokens; otherwise configure `httpBasic()`, JWT/OIDC helpers, or a custom `AuthFn`. See [Authentication](./auth-and-route-protection). |
208
+ | Build fails with discovery errors | Read the printed diagnostics and `.eve/diagnostics.json`; confirm the root-vs-subagent boundary is valid and secrets come from env vars. |
209
209
 
210
210
  ## What to read next
211
211
 
@@ -6,14 +6,10 @@
6
6
  "instrumentation",
7
7
  "hooks",
8
8
  "session-context",
9
- "state",
10
9
  "dynamic-capabilities",
11
- "dynamic-workflows",
12
10
  "remote-agents",
13
11
  "dev-tui",
14
- "acp",
15
12
  "frontend",
16
- "client",
17
- "ucp"
13
+ "client"
18
14
  ]
19
15
  }