eve 0.27.13 → 0.29.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 (347) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/dist/src/channel/adapter.d.ts +5 -5
  3. package/dist/src/channel/session.d.ts +2 -2
  4. package/dist/src/channel/types.d.ts +16 -6
  5. package/dist/src/chunks/{use-eve-agent-CWYe-vqE.js → use-eve-agent-CyDt3Lny.js} +92 -1
  6. package/dist/src/chunks/{use-eve-agent-CsSQOKnp.js → use-eve-agent-DaH3cf8K.js} +92 -1
  7. package/dist/src/cli/commands/agent-prompt/collect-intent.md +1 -1
  8. package/dist/src/cli/commands/channels.d.ts +0 -17
  9. package/dist/src/cli/commands/channels.js +1 -1
  10. package/dist/src/cli/commands/deploy.js +1 -1
  11. package/dist/src/cli/commands/extension-init.js +1 -1
  12. package/dist/src/cli/commands/init.js +1 -1
  13. package/dist/src/cli/commands/integration-connect.d.ts +29 -0
  14. package/dist/src/cli/commands/integration-connect.js +1 -0
  15. package/dist/src/cli/commands/integration-setup.d.ts +2 -3
  16. package/dist/src/cli/commands/integration-setup.js +1 -1
  17. package/dist/src/cli/commands/register-integration-commands.js +1 -1
  18. package/dist/src/cli/commands/registry-setup-command.d.ts +13 -3
  19. package/dist/src/cli/commands/registry-setup-command.js +2 -1
  20. package/dist/src/cli/commands/registry.d.ts +35 -1
  21. package/dist/src/cli/commands/registry.js +1 -1
  22. package/dist/src/cli/commands/trace.js +1 -1
  23. package/dist/src/cli/dev/tui/agent-header.js +1 -1
  24. package/dist/src/cli/dev/tui/prompt-command-handler.js +1 -1
  25. package/dist/src/cli/dev/tui/prompt-commands.d.ts +1 -1
  26. package/dist/src/cli/dev/tui/prompt-commands.js +1 -1
  27. package/dist/src/cli/dev/tui/remote-auth-command.js +1 -1
  28. package/dist/src/cli/dev/tui/runner.d.ts +8 -7
  29. package/dist/src/cli/dev/tui/runner.js +1 -1
  30. package/dist/src/cli/dev/tui/setup-commands.d.ts +8 -13
  31. package/dist/src/cli/dev/tui/setup-commands.js +3 -2
  32. package/dist/src/cli/dev/tui/setup-flow.d.ts +14 -5
  33. package/dist/src/cli/dev/tui/setup-panel.d.ts +5 -1
  34. package/dist/src/cli/dev/tui/setup-panel.js +2 -2
  35. package/dist/src/cli/dev/tui/status-line.d.ts +1 -1
  36. package/dist/src/cli/dev/tui/status-line.js +1 -1
  37. package/dist/src/cli/dev/tui/subagent-pump.d.ts +8 -2
  38. package/dist/src/cli/dev/tui/subagent-pump.js +1 -1
  39. package/dist/src/cli/dev/tui/terminal-renderer.d.ts +2 -5
  40. package/dist/src/cli/dev/tui/terminal-renderer.js +12 -12
  41. package/dist/src/cli/dev/tui/test/fake-setup-flow-renderer.js +1 -1
  42. package/dist/src/cli/dev/tui/tui-prompter.js +1 -1
  43. package/dist/src/cli/dev/tui/tui.d.ts +2 -0
  44. package/dist/src/cli/dev/tui/tui.js +1 -1
  45. package/dist/src/cli/dev/tui/vercel-status.d.ts +1 -6
  46. package/dist/src/cli/dev/tui/vercel-status.js +1 -1
  47. package/dist/src/cli/invoke/result.d.ts +15 -0
  48. package/dist/src/cli/invoke/result.js +1 -1
  49. package/dist/src/cli/option-parsers.d.ts +11 -0
  50. package/dist/src/cli/option-parsers.js +1 -0
  51. package/dist/src/cli/run.d.ts +1 -12
  52. package/dist/src/cli/run.js +3 -3
  53. package/dist/src/cli/shutdown.d.ts +2 -0
  54. package/dist/src/cli/shutdown.js +1 -1
  55. package/dist/src/client/eve-agent-store.d.ts +7 -4
  56. package/dist/src/client/eve-agent-store.js +1 -1
  57. package/dist/src/client/index.d.ts +3 -3
  58. package/dist/src/client/index.js +1 -1
  59. package/dist/src/client/message-action-parts.js +1 -1
  60. package/dist/src/client/message-reducer-types.d.ts +5 -3
  61. package/dist/src/client/message-response.d.ts +4 -4
  62. package/dist/src/client/ndjson.d.ts +3 -3
  63. package/dist/src/client/open-stream.d.ts +2 -2
  64. package/dist/src/client/output-schema.d.ts +2 -2
  65. package/dist/src/client/reducer.d.ts +2 -2
  66. package/dist/src/client/session-utils.d.ts +5 -5
  67. package/dist/src/client/session.d.ts +2 -2
  68. package/dist/src/client/types.d.ts +2 -2
  69. package/dist/src/compiled/.vendor-stamp.json +5 -5
  70. package/dist/src/compiled/@workflow/core/index.js +1 -1
  71. package/dist/src/compiled/@workflow/core/private.d.ts +21 -5
  72. package/dist/src/compiled/@workflow/core/private.js +1 -1
  73. package/dist/src/compiled/@workflow/core/runtime/world.d.ts +10 -5
  74. package/dist/src/compiled/@workflow/core/runtime.js +3 -3
  75. package/dist/src/compiled/@workflow/core/telemetry/semantic-conventions.d.ts +2 -2
  76. package/dist/src/compiled/@workflow/core/version.d.ts +1 -1
  77. package/dist/src/compiled/@workflow/core/workflow.js +1 -1
  78. package/dist/src/compiled/@workflow/world-local/index.js +3 -3
  79. package/dist/src/compiled/@workflow/world-vercel/index.js +13 -13
  80. package/dist/src/compiled/_chunks/workflow/{attribute-changes-DeZc2RZz.js → attribute-changes-1LmTKuTT.js} +1 -1
  81. package/dist/src/compiled/_chunks/workflow/{private-Cre8uYkA.js → private-BcwCGTV5.js} +1 -1
  82. package/dist/src/compiled/_chunks/workflow/{resume-hook-ip1hbn1b.js → resume-hook-D1_5NCZ6.js} +1 -1
  83. package/dist/src/compiled/_chunks/workflow/{run-CWytxfIp.js → run-C240Ctf4.js} +1 -1
  84. package/dist/src/compiled/_chunks/workflow/sleep-De802yfX.js +1 -0
  85. package/dist/src/compiled/_chunks/workflow/{wait-until-De9yESQN.js → wait-until-z48sPUjU.js} +2 -2
  86. package/dist/src/compiled/shadcn-registry/index.d.ts +1 -0
  87. package/dist/src/compiler/compile-from-memory.d.ts +1 -0
  88. package/dist/src/compiler/extension-compatibility.d.ts +8 -8
  89. package/dist/src/compiler/extension-compatibility.js +1 -1
  90. package/dist/src/compiler/manifest.d.ts +2 -2
  91. package/dist/src/compiler/manifest.js +1 -1
  92. package/dist/src/compiler/normalize-agent-config.js +1 -1
  93. package/dist/src/context/dynamic-instruction-lifecycle.d.ts +2 -2
  94. package/dist/src/context/dynamic-model-lifecycle.d.ts +2 -2
  95. package/dist/src/context/dynamic-skill-lifecycle.d.ts +2 -2
  96. package/dist/src/context/dynamic-tool-lifecycle.d.ts +2 -2
  97. package/dist/src/context/hook-lifecycle.d.ts +2 -2
  98. package/dist/src/evals/assertions/collector.d.ts +2 -10
  99. package/dist/src/evals/assertions/collector.js +1 -1
  100. package/dist/src/evals/assertions/run.d.ts +3 -3
  101. package/dist/src/evals/cli/eval.d.ts +6 -2
  102. package/dist/src/evals/cli/eval.js +2 -2
  103. package/dist/src/evals/cli/filter.d.ts +14 -0
  104. package/dist/src/evals/cli/filter.js +1 -0
  105. package/dist/src/evals/context.js +1 -1
  106. package/dist/src/evals/diagnostics.d.ts +8 -0
  107. package/dist/src/evals/diagnostics.js +1 -0
  108. package/dist/src/evals/expect/index.d.ts +1 -1
  109. package/dist/src/evals/expect/index.js +1 -1
  110. package/dist/src/evals/index.d.ts +1 -1
  111. package/dist/src/evals/judge.js +2 -1
  112. package/dist/src/evals/match.d.ts +4 -4
  113. package/dist/src/evals/runner/artifacts.js +1 -1
  114. package/dist/src/evals/runner/derive-run-facts.d.ts +2 -2
  115. package/dist/src/evals/runner/reporters/assertion-diagnostics.d.ts +3 -0
  116. package/dist/src/evals/runner/reporters/assertion-diagnostics.js +3 -0
  117. package/dist/src/evals/runner/reporters/braintrust.js +1 -1
  118. package/dist/src/evals/runner/reporters/console.js +1 -1
  119. package/dist/src/evals/runner/reporters/junit.js +2 -2
  120. package/dist/src/evals/session.d.ts +3 -3
  121. package/dist/src/evals/types.d.ts +33 -17
  122. package/dist/src/execution/cancel-descendant-turns-step.js +1 -1
  123. package/dist/src/execution/dispatch-runtime-actions-step.js +1 -1
  124. package/dist/src/execution/route-child-delivery.d.ts +4 -3
  125. package/dist/src/execution/route-child-delivery.js +1 -1
  126. package/dist/src/execution/session-delivery-hook.d.ts +1 -0
  127. package/dist/src/execution/session-delivery-hook.js +1 -1
  128. package/dist/src/execution/session-timeout-control.d.ts +9 -0
  129. package/dist/src/execution/session-timeout-control.js +1 -0
  130. package/dist/src/execution/session-timeout-steps.d.ts +13 -0
  131. package/dist/src/execution/session-timeout-steps.js +1 -0
  132. package/dist/src/execution/session-timeout-workflow.d.ts +6 -0
  133. package/dist/src/execution/session-timeout-workflow.js +1 -0
  134. package/dist/src/execution/session-timeout.d.ts +2 -0
  135. package/dist/src/execution/session-timeout.js +1 -0
  136. package/dist/src/execution/settle-cancelled-turn-step.js +1 -1
  137. package/dist/src/execution/subagent-event-proxy-step.js +1 -1
  138. package/dist/src/execution/subagent-hitl-proxy.d.ts +5 -1
  139. package/dist/src/execution/subagent-hitl-proxy.js +1 -1
  140. package/dist/src/execution/terminal-session-completion-step.d.ts +5 -0
  141. package/dist/src/execution/terminal-session-completion-step.js +1 -0
  142. package/dist/src/execution/terminal-session-failure-step.js +1 -1
  143. package/dist/src/execution/turn-cancellation-control.js +1 -1
  144. package/dist/src/execution/turn-workflow.js +1 -1
  145. package/dist/src/execution/workflow-entry.d.ts +1 -0
  146. package/dist/src/execution/workflow-entry.js +1 -1
  147. package/dist/src/execution/workflow-runtime.d.ts +4 -0
  148. package/dist/src/execution/workflow-runtime.js +1 -1
  149. package/dist/src/execution/workflow-steps.d.ts +12 -2
  150. package/dist/src/execution/workflow-steps.js +1 -1
  151. package/dist/src/harness/agent-otel-provider.js +1 -1
  152. package/dist/src/harness/ai-sdk-hook-bridge.js +1 -1
  153. package/dist/src/harness/input-extraction.js +1 -1
  154. package/dist/src/harness/input-request-class.d.ts +23 -0
  155. package/dist/src/harness/input-request-class.js +1 -0
  156. package/dist/src/harness/input-requests.d.ts +20 -9
  157. package/dist/src/harness/input-requests.js +1 -1
  158. package/dist/src/harness/instrumentation-lifecycle.d.ts +12 -1
  159. package/dist/src/harness/proxy-input-requests.d.ts +10 -4
  160. package/dist/src/harness/proxy-input-requests.js +1 -1
  161. package/dist/src/harness/session-limit-continuation.d.ts +0 -11
  162. package/dist/src/harness/session-limit-continuation.js +1 -1
  163. package/dist/src/harness/session-limit-enforcement.d.ts +3 -2
  164. package/dist/src/harness/session-limit-enforcement.js +1 -1
  165. package/dist/src/harness/session-token-limits.d.ts +41 -0
  166. package/dist/src/harness/session-token-limits.js +1 -0
  167. package/dist/src/harness/stale-input-responses.js +1 -1
  168. package/dist/src/harness/subagent-token-budget.d.ts +6 -4
  169. package/dist/src/harness/subagent-token-budget.js +1 -1
  170. package/dist/src/harness/tool-loop.js +1 -1
  171. package/dist/src/harness/turn-sleep.d.ts +12 -0
  172. package/dist/src/harness/turn-sleep.js +1 -0
  173. package/dist/src/harness/turn-tag-state.d.ts +26 -17
  174. package/dist/src/harness/turn-tag-state.js +1 -1
  175. package/dist/src/harness/types.d.ts +4 -4
  176. package/dist/src/harness/workflow-lifecycle.d.ts +2 -2
  177. package/dist/src/internal/application/compiled-artifacts.js +7 -7
  178. package/dist/src/internal/application/package.js +1 -1
  179. package/dist/src/internal/authored-definition/core.js +1 -1
  180. package/dist/src/internal/nitro/host/dev-authored-source-watcher.d.ts +4 -0
  181. package/dist/src/internal/nitro/host/dev-authored-source-watcher.js +1 -1
  182. package/dist/src/internal/nitro/host/start-development-server.js +2 -2
  183. package/dist/src/internal/workflow/development-world-protocol.js +1 -1
  184. package/dist/src/internal/workflow/world-target.d.ts +7 -0
  185. package/dist/src/internal/workflow/world-target.js +1 -0
  186. package/dist/src/internal/workflow-bundle/workflow-core-shim.d.ts +1 -1
  187. package/dist/src/internal/workflow-bundle/workflow-core-shim.js +1 -1
  188. package/dist/src/protocol/event-dedupe.d.ts +25 -0
  189. package/dist/src/protocol/event-dedupe.js +1 -0
  190. package/dist/src/protocol/event-id.d.ts +16 -0
  191. package/dist/src/protocol/event-id.js +1 -0
  192. package/dist/src/protocol/message.d.ts +39 -23
  193. package/dist/src/protocol/message.js +2 -2
  194. package/dist/src/protocol/routes.d.ts +4 -0
  195. package/dist/src/protocol/routes.js +1 -1
  196. package/dist/src/public/channels/discord/discordChannel.d.ts +3 -3
  197. package/dist/src/public/channels/github/githubChannel.d.ts +3 -3
  198. package/dist/src/public/channels/linear/linearChannel.d.ts +3 -3
  199. package/dist/src/public/channels/slack/hitl.js +1 -1
  200. package/dist/src/public/channels/slack/slackChannel.d.ts +3 -3
  201. package/dist/src/public/channels/teams/hitl.js +1 -1
  202. package/dist/src/public/channels/teams/teamsChannel.d.ts +3 -3
  203. package/dist/src/public/channels/telegram/telegramChannel.d.ts +3 -3
  204. package/dist/src/public/channels/twilio/twilioChannel.d.ts +3 -3
  205. package/dist/src/public/definitions/channel.d.ts +4 -4
  206. package/dist/src/public/definitions/hook.d.ts +2 -2
  207. package/dist/src/public/tools/sleep/index.d.ts +18 -0
  208. package/dist/src/public/tools/sleep/index.js +1 -0
  209. package/dist/src/react/use-eve-agent.d.ts +3 -2
  210. package/dist/src/runtime/framework-tools/ask-question.js +1 -1
  211. package/dist/src/runtime/framework-tools/sleep.d.ts +15 -0
  212. package/dist/src/runtime/framework-tools/sleep.js +1 -0
  213. package/dist/src/runtime/hooks/registry.d.ts +2 -2
  214. package/dist/src/runtime/input/types.d.ts +19 -4
  215. package/dist/src/runtime/input/types.js +1 -1
  216. package/dist/src/runtime/resolve-agent.js +1 -1
  217. package/dist/src/runtime/types.d.ts +2 -2
  218. package/dist/src/services/dev-client/runtime-artifacts.d.ts +7 -0
  219. package/dist/src/services/dev-client/runtime-artifacts.js +1 -1
  220. package/dist/src/setup/boxes/apply-ai-gateway-credential.js +1 -1
  221. package/dist/src/setup/boxes/deploy-project.d.ts +3 -3
  222. package/dist/src/setup/flows/deploy.js +1 -1
  223. package/dist/src/setup/flows/ensure-vercel-project.d.ts +17 -0
  224. package/dist/src/setup/flows/ensure-vercel-project.js +1 -0
  225. package/dist/src/setup/flows/in-project.d.ts +1 -1
  226. package/dist/src/setup/flows/link.js +1 -1
  227. package/dist/src/setup/flows/model.js +1 -1
  228. package/dist/src/setup/flows/provider.js +1 -1
  229. package/dist/src/setup/flows/registry.d.ts +20 -0
  230. package/dist/src/setup/flows/registry.js +1 -0
  231. package/dist/src/setup/index.d.ts +0 -1
  232. package/dist/src/setup/index.js +1 -1
  233. package/dist/src/setup/{channel-setup-environment.d.ts → integrations/channels/environment.d.ts} +2 -2
  234. package/dist/src/setup/integrations/channels/environment.js +1 -0
  235. package/dist/src/setup/{channel-setup-integrations.d.ts → integrations/channels/index.d.ts} +3 -3
  236. package/dist/src/setup/integrations/channels/index.js +1 -0
  237. package/dist/src/setup/{channel-setup-runner.d.ts → integrations/channels/runner.d.ts} +1 -1
  238. package/dist/src/setup/integrations/channels/runner.js +1 -0
  239. package/dist/src/setup/{boxes/add-channels.d.ts → integrations/channels/setup.d.ts} +32 -22
  240. package/dist/src/setup/integrations/channels/setup.js +2 -0
  241. package/dist/src/setup/{channel-setup-slack.d.ts → integrations/channels/slack.d.ts} +1 -1
  242. package/dist/src/setup/integrations/channels/slack.js +1 -0
  243. package/dist/src/setup/{channel-setup-integration.d.ts → integrations/channels/types.d.ts} +23 -7
  244. package/dist/src/setup/{channel-setup-ui.d.ts → integrations/channels/ui.d.ts} +2 -2
  245. package/dist/src/setup/integrations/channels/ui.js +2 -0
  246. package/dist/src/setup/{channel-setup-web.d.ts → integrations/channels/web.d.ts} +1 -1
  247. package/dist/src/setup/integrations/channels/web.js +1 -0
  248. package/dist/src/setup/primitives/run-vercel.d.ts +1 -0
  249. package/dist/src/setup/primitives/run-vercel.js +1 -1
  250. package/dist/src/setup/prompter.d.ts +16 -3
  251. package/dist/src/setup/prompter.js +1 -1
  252. package/dist/src/setup/registry-setup-client.d.ts +18 -0
  253. package/dist/src/setup/registry-setup-client.js +2 -0
  254. package/dist/src/setup/registry-setup-protocol.d.ts +93 -0
  255. package/dist/src/setup/registry-setup-protocol.js +1 -0
  256. package/dist/src/setup/scaffold/channels-catalog.d.ts +1 -1
  257. package/dist/src/setup/scaffold/create/extension.js +2 -2
  258. package/dist/src/setup/scaffold/create/project.js +2 -2
  259. package/dist/src/setup/scaffold/create/web-template.d.ts +1 -1
  260. package/dist/src/setup/scaffold/create/web-template.js +2 -2
  261. package/dist/src/setup/scaffold/create-in-place.d.ts +1 -0
  262. package/dist/src/setup/scaffold/create-in-place.js +1 -0
  263. package/dist/src/setup/scaffold/index.js +1 -1
  264. package/dist/src/setup/scaffold/update/connections.js +3 -3
  265. package/dist/src/setup/scaffold/update/update-connection-connector.js +1 -1
  266. package/dist/src/setup/vercel-project-framework.d.ts +1 -1
  267. package/dist/src/setup/vercel-project-framework.js +1 -1
  268. package/dist/src/setup/vercel-project.d.ts +17 -2
  269. package/dist/src/setup/vercel-project.js +0 -0
  270. package/dist/src/shared/agent-definition.d.ts +12 -0
  271. package/dist/src/shared/dynamic-tool-definition.d.ts +2 -2
  272. package/dist/src/shared/ulid.d.ts +39 -0
  273. package/dist/src/shared/ulid.js +1 -0
  274. package/dist/src/svelte/index.js +1 -1
  275. package/dist/src/svelte/use-eve-agent.d.ts +4 -4
  276. package/dist/src/svelte/use-eve-agent.js +1 -1
  277. package/dist/src/vue/index.js +1 -1
  278. package/dist/src/vue/use-eve-agent.d.ts +4 -4
  279. package/dist/src/vue/use-eve-agent.js +1 -1
  280. package/docs/agent-config.md +28 -16
  281. package/docs/channels/overview.mdx +1 -1
  282. package/docs/channels/slack.mdx +2 -2
  283. package/docs/concepts/default-harness.md +12 -0
  284. package/docs/concepts/execution-model-and-durability.mdx +1 -1
  285. package/docs/concepts/sessions-runs-and-streaming.md +61 -0
  286. package/docs/evals/assertions.mdx +8 -1
  287. package/docs/evals/judge.mdx +11 -1
  288. package/docs/evals/reporters.mdx +1 -1
  289. package/docs/evals/running.mdx +3 -0
  290. package/docs/guides/client/streaming.mdx +9 -3
  291. package/docs/guides/dev-tui.md +9 -14
  292. package/docs/guides/frontend/overview.mdx +4 -2
  293. package/docs/guides/frontend/use-eve-agent-svelte.mdx +1 -1
  294. package/docs/guides/frontend/use-eve-agent-vue.mdx +10 -10
  295. package/docs/guides/hooks.md +40 -2
  296. package/docs/guides/instrumentation.md +5 -1
  297. package/docs/reference/cli.md +25 -38
  298. package/docs/reference/typescript-api.md +2 -1
  299. package/docs/tools/human-in-the-loop.md +5 -0
  300. package/docs/tutorial/ship-it.mdx +2 -2
  301. package/package.json +11 -6
  302. package/dist/src/compiled/@workflow/core/runtime/world-target.d.ts +0 -11
  303. package/dist/src/compiled/_chunks/workflow/sleep-BjrUxUcs.js +0 -1
  304. package/dist/src/node_modules/.pnpm/@workflow_utils@5.0.0-beta.7/node_modules/@workflow/utils/dist/index.js +0 -1
  305. package/dist/src/node_modules/.pnpm/@workflow_utils@5.0.0-beta.7/node_modules/@workflow/utils/dist/parse-name.js +0 -1
  306. package/dist/src/node_modules/.pnpm/@workflow_utils@5.0.0-beta.7/node_modules/@workflow/utils/dist/promise.js +0 -1
  307. package/dist/src/node_modules/.pnpm/@workflow_utils@5.0.0-beta.7/node_modules/@workflow/utils/dist/time.js +0 -1
  308. package/dist/src/node_modules/.pnpm/@workflow_utils@5.0.0-beta.7/node_modules/@workflow/utils/dist/workflow-routes.js +0 -1
  309. package/dist/src/node_modules/.pnpm/@workflow_utils@5.0.0-beta.7/node_modules/@workflow/utils/dist/world-target.js +0 -1
  310. package/dist/src/node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js +0 -1
  311. package/dist/src/setup/boxes/add-channels.js +0 -2
  312. package/dist/src/setup/boxes/add-connections.d.ts +0 -26
  313. package/dist/src/setup/boxes/add-connections.js +0 -1
  314. package/dist/src/setup/boxes/install-channel-registry-items.d.ts +0 -8
  315. package/dist/src/setup/boxes/install-channel-registry-items.js +0 -1
  316. package/dist/src/setup/boxes/one-shot-next-steps.d.ts +0 -18
  317. package/dist/src/setup/boxes/one-shot-next-steps.js +0 -2
  318. package/dist/src/setup/boxes/preflight.d.ts +0 -37
  319. package/dist/src/setup/boxes/preflight.js +0 -1
  320. package/dist/src/setup/boxes/resolve-target.d.ts +0 -58
  321. package/dist/src/setup/boxes/resolve-target.js +0 -1
  322. package/dist/src/setup/boxes/scaffold.d.ts +0 -40
  323. package/dist/src/setup/boxes/scaffold.js +0 -1
  324. package/dist/src/setup/boxes/select-channels.d.ts +0 -49
  325. package/dist/src/setup/boxes/select-channels.js +0 -1
  326. package/dist/src/setup/boxes/select-chat.d.ts +0 -38
  327. package/dist/src/setup/boxes/select-chat.js +0 -1
  328. package/dist/src/setup/boxes/select-connections.d.ts +0 -30
  329. package/dist/src/setup/boxes/select-connections.js +0 -1
  330. package/dist/src/setup/boxes/select-setup-mode.d.ts +0 -32
  331. package/dist/src/setup/boxes/select-setup-mode.js +0 -1
  332. package/dist/src/setup/channel-setup-deployment.d.ts +0 -11
  333. package/dist/src/setup/channel-setup-deployment.js +0 -1
  334. package/dist/src/setup/channel-setup-environment.js +0 -1
  335. package/dist/src/setup/channel-setup-integration.js +0 -1
  336. package/dist/src/setup/channel-setup-integrations.js +0 -1
  337. package/dist/src/setup/channel-setup-runner.js +0 -1
  338. package/dist/src/setup/channel-setup-slack.js +0 -1
  339. package/dist/src/setup/channel-setup-ui.js +0 -2
  340. package/dist/src/setup/channel-setup-web.js +0 -1
  341. package/dist/src/setup/flows/channels.d.ts +0 -57
  342. package/dist/src/setup/flows/channels.js +0 -1
  343. package/dist/src/setup/flows/connections.d.ts +0 -37
  344. package/dist/src/setup/flows/connections.js +0 -3
  345. package/dist/src/setup/onboarding.d.ts +0 -60
  346. package/dist/src/setup/onboarding.js +0 -1
  347. /package/dist/src/{node_modules/.pnpm/@workflow_utils@5.0.0-beta.7/node_modules/@workflow/utils/dist/pluralize.js → setup/integrations/channels/types.js} +0 -0
@@ -14,6 +14,12 @@ Two handles do two jobs, and mixing them up is the most common mistake. One hand
14
14
 
15
15
  A session has one active continuation at a time: each follow-up uses the current `continuationToken`, and a stale one is rejected.
16
16
 
17
+ Sessions last 30 days by default; configure `limits.sessionTimeoutMs` in
18
+ `agent.ts`, or set it to `false` to disable the deadline. At expiration, eve
19
+ lets an active turn settle, emits `session.completed`, and releases the
20
+ continuation so the next qualifying channel message starts fresh. Stored
21
+ session data is not deleted. See [Agent config](../agent-config#runtime-limits).
22
+
17
23
  React, Vue, and Svelte apps reach for [`useEveAgent()`](../guides/frontend/overview) instead of calling these routes by hand. Next.js and Nuxt apps can proxy them to the eve runtime from the same origin.
18
24
 
19
25
  ## Start a session
@@ -73,6 +79,59 @@ A delegated subagent publishes progress on its own child-session stream. The par
73
79
 
74
80
  `step.failed` and `turn.failed` carry `{ code, message, details? }` for the failed fragment or turn, and `session.failed` is the terminal session-level variant. `turn.cancelled` is not a failure: the cancelled turn ends without any failure event, `session.waiting` follows, and the session accepts the next message normally — whatever the turn streamed before cancellation stays on the stream, while durable history keeps only what had already settled. When a turn requested an output schema, the finalized payload lands on `result.completed` as `data.result` before the turn boundary. `authorization.required` carries the sign-in challenge (`data.authorization` may include `url`, `userCode`, `expiresAt`, `instructions`), and `authorization.completed` carries `data.outcome` (`"authorized" | "declined" | "failed" | "timed-out"`).
75
81
 
82
+ ## The event envelope
83
+
84
+ Alongside `type` and `data`, every event carries a `meta` envelope:
85
+
86
+ ```json
87
+ {
88
+ "type": "message.completed",
89
+ "data": {
90
+ "message": "Sunny and 72°F.",
91
+ "finishReason": "stop",
92
+ "sequence": 0,
93
+ "stepIndex": 0,
94
+ "turnId": "turn_0"
95
+ },
96
+ "meta": { "id": "evt_01KYJBZA88B4M9XN3RTC5FDGHJ", "at": "2026-07-27T18:04:11.912Z" }
97
+ }
98
+ ```
99
+
100
+ - **`meta.id`** uniquely identifies the event. It is an `evt_`-prefixed [ULID](https://github.com/ulid/spec): a millisecond timestamp followed by random bits, so ids are broadly time-ordered.
101
+ - **`meta.at`** is the ISO-8601 time the event was emitted.
102
+
103
+ `meta.id` is stable. eve mints it once, when the event is written to the durable stream, and stores it with the event. Reconnecting from a cursor, rewinding to `startIndex=0`, or replaying a finished session all return the same id for the same event.
104
+
105
+ `meta.at` has always been there; `meta.id` arrived in stream version 20. Events written by an earlier version are stored with the envelope but no id inside it, so rewinding into the part of a session that ran before you upgraded yields events whose `meta.id` is absent, even though the type says it is always a string. eve passes those events through rather than dropping them, and they cannot be deduplicated. The exposure ends when the sessions that predate your upgrade do.
106
+
107
+ That makes it the key for ingesting a stream into a database without duplicating rows when you re-read it:
108
+
109
+ ```sql
110
+ insert into agent_events (id, session_id, type, data, emitted_at)
111
+ values ($1, $2, $3, $4, $5)
112
+ on conflict (id) do nothing;
113
+ ```
114
+
115
+ Because ids lead with a timestamp, a `primary key (id)` stays roughly append-ordered and keeps inserts clustered.
116
+
117
+ **What the id covers.** Reconnecting is not the only way the same event reaches you twice. Keying on `meta.id` is what makes ingestion correct in all of these:
118
+
119
+ - Reconnecting mid-turn and overlapping events you already handled.
120
+ - Rewinding with `startIndex=0`, or reading back from the tail with a negative `startIndex`.
121
+ - Restoring a saved event log that overlaps the prefix the live stream replays.
122
+
123
+ **What it does not cover: a retried step re-emits under new ids.** eve runs each durable step up to four times. If a step is interrupted partway — a crash, a timeout, a model error it retries through — whatever it already wrote stays on the stream, and the new attempt emits its own events with their own ids. Both attempts carry the same `turnId`, `stepIndex`, and `sequence`, because the retry restores that state from the step's input, but they are distinct events and no field records which attempt finished.
124
+
125
+ Replaying a _completed_ step is a different thing and emits nothing at all: eve serves the recorded result from its journal without re-running the body. Crash recovery, redeploys, and resuming a parked turn therefore add nothing to the stream. Only an interrupted step re-runs.
126
+
127
+ Three more things to know:
128
+
129
+ - **Ids are time-ordered, not a total order.** The turn steps of one session can run in different processes, each generating ids from its own clock and its own random bits. Two events emitted in the same millisecond by different steps may sort either way, and clock skew between machines can invert neighbours. Record your own ingestion sequence, or read the stream in order and store the index, when you need an exact ordering to page against — do not use `where id > $cursor` as a lossless cursor. The stream itself is authoritative: `startIndex` is an absolute event count.
130
+ - **Ids identify events, not intent.** Two events with identical payloads — the `step.failed` → `turn.failed` → `session.failed` cascade, or two identical text deltas in one step — are distinct events with distinct ids. Deduplicate on `meta.id` only; matching on content would drop real data.
131
+ - **A subagent's event is re-emitted, not shared.** When a parent forwards a child's event onto its own stream, the parent's copy is a separate event with its own id. Correlate the two streams through `subagent.called.data.childSessionId`.
132
+
133
+ Authored [hooks](../guides/hooks) receive the same envelope, but observe each event as it is emitted rather than as it is read — so a hook sees a retry as new events, and `meta.id` is a key for a stored row rather than a retry guard. Two things a hook does not have to defend against: a turn that parks for human input resumes without re-emitting anything it already sent, and a retried turn dispatch cannot double-stream a turn, because only one turn run can claim a session's turn inbox.
134
+
76
135
  ## Send a follow-up message
77
136
 
78
137
  Once the session is waiting (you'll see `session.waiting`), POST your follow-up to the session endpoint with `event.data.continuationToken`:
@@ -112,6 +171,8 @@ Custom channel routes request the same cancellation without knowing the session
112
171
 
113
172
  The stream is durable. Every event is recorded before a step completes, so consumers can reconnect from their cursor when an HTTP connection ends. A nonnegative `startIndex` is an absolute event count: use it to pick up where you dropped off or pass `0` to rewind to the start.
114
173
 
174
+ If a reconnect overlaps events you already handled, [`meta.id`](#the-event-envelope) identifies the duplicates: it is unchanged across reconnects and rewinds, so a consumer keyed on it can replay safely.
175
+
115
176
  ```bash
116
177
  curl "http://127.0.0.1:2000/eve/v1/session/<sessionId>/stream?startIndex=<count>"
117
178
  ```
@@ -73,6 +73,12 @@ t.check(
73
73
  | `similarity(expected)` | normalized Levenshtein similarity, 1 = identical | soft |
74
74
  | `satisfies(fn, label)` | custom boolean predicate | gate |
75
75
 
76
+ For example, a failed labeled equality check prints:
77
+
78
+ ```text
79
+ ✗ equals [status] (0% < 100%): expected {"status":"active"}; received {"status":"disabled"}
80
+ ```
81
+
76
82
  Pick the cheapest builder that captures what "correct" means. When exact match is too strict but a judge model is overkill, `similarity` is the middle ground. For nuanced grading, reach for the [judge](./judge).
77
83
 
78
84
  ## The matcher mini-language
@@ -154,12 +160,13 @@ Every assertion returns a chainable handle. Severity rides on the assertion, so
154
160
  - `.gate(threshold?)` is hard. A miss marks the eval `failed` and `eve eval` exits non-zero.
155
161
  - `.soft(threshold?)` is tracked data. A below-threshold miss marks the eval `scored`, fatal only under `--strict`. With no threshold, it is tracked-only and never fails.
156
162
  - `.atLeast(threshold)` is soft with a bar (equivalent to `.soft(threshold)`).
163
+ - `.label(name)` adds a stable name when an eval records several assertions from the same family.
157
164
 
158
165
  The defaults are chosen so you rarely set severity. Run-level methods and `includes`/`equals`/`matches` are gates; `similarity` and every `t.judge.*` assertion are soft. Annotate only when you deviate:
159
166
 
160
167
  ```ts
161
168
  t.calledTool("get_weather").soft(); // record the tool call as a metric, don't gate
162
- t.check(t.reply, similarity("Sunny")).atLeast(0.8); // gate the fuzzy match under --strict
169
+ t.check(t.reply, similarity("Sunny")).label("forecast wording").atLeast(0.8);
163
170
  t.check(t.reply, includes("error")).soft(); // track without failing the build
164
171
  ```
165
172
 
@@ -28,6 +28,16 @@ The judges live under `t.judge.autoevals`. The namespace names the [Braintrust a
28
28
  | `t.judge.autoevals.closedQA(criteria)` | Whether the reply satisfies a free-form yes/no criterion (no expected answer to match) |
29
29
  | `t.judge.autoevals.sql(expected)` | Semantic equivalence of two SQL statements |
30
30
 
31
+ A failed `closedQA` assertion prints the input and judge explanation:
32
+
33
+ ```text
34
+ ✗ judge.autoevals.closedQA [citation] (0% < 80%): prompt: "Name the source."
35
+ criteria: "cites a source"
36
+ response: "It is widely believed."
37
+ rationale: "The response does not cite a source."
38
+ choice: "N"
39
+ ```
40
+
31
41
  The reference or criteria is the positional argument. An options object follows:
32
42
 
33
43
  - `on` is the value to grade, defaulting to `t.reply`. Pass an intermediate draft or parsed value to grade it instead.
@@ -48,7 +58,7 @@ Judge assertions are soft, so the threshold rides on the assertion handle. There
48
58
 
49
59
  ```ts
50
60
  t.judge.autoevals.closedQA("cites a source"); // tracked, never fails
51
- t.judge.autoevals.closedQA("cites a source").atLeast(0.6); // soft, fails under --strict below 0.6
61
+ t.judge.autoevals.closedQA("cites a source").label("citation").atLeast(0.6);
52
62
  t.judge.autoevals.factuality(reference).gate(0.8); // hard gate at 0.8
53
63
  ```
54
64
 
@@ -38,7 +38,7 @@ export default defineEval({
38
38
  });
39
39
  ```
40
40
 
41
- The reporter config takes an optional `projectName` and `experimentName`, plus a base experiment (by name or id) to diff against. Gate assertions log as binary scores under a `gate:` prefix so experiments diff gate regressions the same way they diff soft-score regressions. Eval `metadata` rides along to reporters.
41
+ The reporter config takes an optional `projectName` and `experimentName`, plus a base experiment (by name or id) to diff against. Gate assertions log as binary scores under a `gate:` prefix so experiments diff gate regressions the same way they diff soft-score regressions. Repeated names use `#2`, `#3`, and later suffixes; use `.label(name)` to give them meaningful names. Failed assertion details are stored in the Braintrust metadata under `eveFailedAssertions`.
42
42
 
43
43
  A reporter instance observes the evals that reference it. Share one instance across several evals (the config, a `shared.ts` export, or every entry of a dataset array) and their results land in a single experiment. Listing the same config reporter on an eval too does not double-report it.
44
44
 
@@ -10,6 +10,7 @@ eve eval # run all discovered evals locally
10
10
  eve eval weather smoke # run selected evals (an id, or a directory prefix)
11
11
  eve eval --url https://<app> # target a remote app instead of a local host
12
12
  eve eval --tag fast # only evals carrying a tag
13
+ eve eval --exclude-tag slow # skip evals carrying a tag
13
14
  eve eval --strict # soft below-threshold assertions also fail the exit code
14
15
  eve eval --timeout 60000 # per-eval timeout in milliseconds
15
16
  eve eval --max-concurrency 4 # cap concurrent eval executions (default 8)
@@ -22,6 +23,8 @@ eve eval --skip-report # skip config and eval-defined reporters (e.g. Br
22
23
 
23
24
  Positional ids match exactly or by directory prefix: `eve eval weather` runs `evals/weather.eval.ts`, every eval under `evals/weather/`, and every entry of an array-exported `weather.eval.ts`.
24
25
 
26
+ Tag filters compose: `--tag` keeps evals carrying at least one listed tag, then `--exclude-tag` drops any eval carrying an excluded tag. A `--tag` filter that matches nothing is a configuration error (exit `2`), but a run where `--exclude-tag` removes every match succeeds with nothing executed — exclusion expresses "this suite does not apply here."
27
+
25
28
  ## Exit codes
26
29
 
27
30
  | Code | Means |
@@ -60,13 +60,17 @@ for await (const event of response) {
60
60
 
61
61
  ## Handle event types
62
62
 
63
- Import event types from `eve/client` when you want exhaustiveness or helpers:
63
+ Import event types from `eve/client` when you want exhaustiveness or helpers. Events read from a stream are `MessageStreamEvent`: the same union, with the `meta` envelope guaranteed present.
64
+
65
+ `HandleMessageStreamEvent` remains available as a deprecated alias, so existing type imports continue to compile.
64
66
 
65
67
  ```ts
66
- import type { HandleMessageStreamEvent } from "eve/client";
68
+ import type { MessageStreamEvent } from "eve/client";
67
69
  import { isCurrentTurnBoundaryEvent } from "eve/client";
68
70
 
69
- function handleEvent(event: HandleMessageStreamEvent) {
71
+ function handleEvent(event: MessageStreamEvent) {
72
+ console.log(event.meta.id, event.meta.at);
73
+
70
74
  if (isCurrentTurnBoundaryEvent(event)) {
71
75
  console.log("turn settled:", event.type);
72
76
  }
@@ -105,6 +109,8 @@ If you support refresh while an authorization prompt is pending, keep the sessio
105
109
 
106
110
  HTTP connections can end before a run does. The client reconnects from the number of events already consumed, so long turns continue without replaying events. It stops at a turn boundary, when aborted, or when the stream can no longer make progress.
107
111
 
112
+ If your consumer persists events, key on `event.meta.id`. It is stable across reconnects and rewinds, so an overlapping replay is safe to ingest twice. See [the event envelope](../../concepts/sessions-runs-and-streaming#the-event-envelope).
113
+
108
114
  Set `streamReconnectPolicy: { reconnect: false }` when a relay or proxy owns the cursor and reconnection policy. This makes a single stream GET attempt and returns when that connection ends; it does not stop the server-side turn:
109
115
 
110
116
  ```ts
@@ -13,10 +13,10 @@ On startup the TUI prints a brand line with your agent's name, plus a rotating t
13
13
 
14
14
  ```text
15
15
  eve weather-agent
16
- Use /channels to add more ways to reach your agent.
16
+ Use /add to install integrations from the registry.
17
17
  ```
18
18
 
19
- If agent discovery reported problems, an error and warning count renders between the two lines. Instructions, tools, skills, and subagents are one `eve info` away, and `/help` lists every command. The TUI also runs a startup check. A fresh `eve init` starts local `eve dev` with `/model` prefilled. That input starts onboarding: the flow installs the Vercel CLI if needed, asks you to log in if needed, then opens `/model` before the first prompt. Other `eve dev` sessions show missing setup as an attention line, with each command's outcome hanging under it on a `⎿` connector.
19
+ If agent discovery reported problems, an error and warning count renders between the two lines. Instructions, tools, skills, and subagents are one `eve info` away, and `/help` lists every command. The TUI also runs a startup check. A fresh `eve init` starts local `eve dev` with `/model` prefilled. That input starts onboarding: the flow installs the Vercel CLI if needed, asks you to log in if needed, opens `/model`, then offers categorized next steps for channels, connections, capabilities, and observability through the registry before the first prompt. Other `eve dev` sessions show missing setup as an attention line, with each command's outcome hanging under it on a `⎿` connector.
20
20
 
21
21
  ## Reading the transcript
22
22
 
@@ -24,19 +24,18 @@ The conversation streams straight into your terminal's normal scrollback, so you
24
24
 
25
25
  Each turn renders without boxes. A colored gutter glyph marks who is speaking, tool calls collapse to a one-line summary (`✓ get_weather city="SF" → 73°F`), and a subagent's work is indented beneath its `◆` header. When input is ready, the prompt stays bare until you type. A green circle-dot pulses while the agent is waiting to answer and disappears when reasoning or answer content begins.
26
26
 
27
- A persistent line beneath the prompt or status shows the model — with its authored reasoning level and a `↯` marker when the Gateway priority tier is on (`xai/grok-4.5@xhigh ↯`) — the linked Vercel project, and a yellow `/deploy pending` marker once a channel added this session still needs `/deploy`. The Vercel segment stays hidden until the directory is linked. Local sessions lead with a gray `:port` badge. Remote sessions lead with a padded `↗ project (environment)` badge, or the host when Vercel cannot resolve the deployment. The badge is gray while checking or unavailable, yellow while authentication is required or failed, and blue when connected. Status segments separate with plain whitespace. Remote status lines omit AI Gateway endpoint state.
27
+ A persistent line beneath the prompt or status shows the model — with its authored reasoning level and a `↯` marker when the Gateway priority tier is on (`xai/grok-4.5@xhigh ↯`) — and the linked Vercel project. The Vercel segment stays hidden until the directory is linked. Local sessions lead with a gray `:port` badge. Remote sessions lead with a padded `↗ project (environment)` badge, or the host when Vercel cannot resolve the deployment. The badge is gray while checking or unavailable, yellow while authentication is required or failed, and blue when connected. Status segments separate with plain whitespace. Remote status lines omit AI Gateway endpoint state.
28
28
 
29
29
  Errors render compactly with docs links highlighted. A code bug escaping your agent's own code shows its stack trace dim beneath the error headline. Dev-server rebuilds condense into one status row that updates in place (`tui/setup-panel.ts changed · rebuilding…`, then `· rebuilt`); only the latest rebuild shows, and paths shrink to their last two components.
30
30
 
31
31
  ## Slash commands
32
32
 
33
- Each command echoes as an invocation line, asks through a bordered panel that takes the input area's place (one question at a time, separate from the chat transcript), and finishes with a one-line `⎿` result. Loading states stay on the ephemeral status line instead of piling into the transcript; model, channel, connection, and the Vercel CLI commands (`/vc:install`, `/vc:login`) use the same green square pulse as the build phase, while `/deploy` keeps a spinner. A connection setup waiting for browser action changes that pulse and the word "browser" to yellow. Setup menus render the selected option with a filled arrow and an inverse label padded by one space on each side. Text prompts use a blinking block cursor over the character at the caret. The selected label is blue normally and yellow for warning rows.
33
+ Each command echoes as an invocation line, asks through a bordered panel that takes the input area's place (one question at a time, separate from the chat transcript), and finishes with a one-line `⎿` result. Loading states stay on the ephemeral status line instead of piling into the transcript; model, registry, and the Vercel CLI commands (`/vc:install`, `/vc:login`) use the same green square pulse as the build phase, while `/deploy` keeps a spinner. A setup waiting for browser action changes that pulse and the word "browser" to yellow. Setup menus render the selected option with a filled arrow and an inverse label padded by one space on each side. Text prompts use a blinking block cursor over the character at the caret. The selected label is blue normally and yellow for warning rows.
34
34
 
35
35
  | Command | Does |
36
36
  | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
37
37
  | `/model` | Opens a configure menu that loops until Done (or Esc). See [Configure the model and provider](#configure-the-model-and-provider). |
38
- | `/channels` | Shows the agent's channel list and adds the one you pick. See [Add a channel](#add-a-channel). |
39
- | `/connect` | Shows the Vercel Connect MCP catalog and configures the server you pick. See [Add a connection](#add-a-connection). |
38
+ | `/add` | Searches registry integrations or adds an item address entered directly. |
40
39
  | `/deploy` | Ships the agent to Vercel production, linking the directory first when it is unlinked. |
41
40
  | `/vc:install` | Installs the Vercel CLI. Available locally and on a remote session. |
42
41
  | `/vc:login` | Logs in to Vercel locally. On a remote session, resolves the deployment's project, refreshes its OIDC token, and confirms any required Trusted Sources rule. |
@@ -45,7 +44,7 @@ Each command echoes as an invocation line, asks through a bordered panel that ta
45
44
  | `/exit` | Quits the TUI. |
46
45
  | `/help` | Lists the commands available for the current local or remote session. |
47
46
 
48
- `/model`, `/channels`, `/connect`, and `/deploy` manage the local agent or its linked project. They are available only when `eve dev` runs the server locally, not when connected to a remote server with `--url`.
47
+ `/model`, `/add`, and `/deploy` manage the local agent or its linked project. They are available only when `eve dev` runs the server locally, not when connected to a remote server with `--url`.
49
48
 
50
49
  ### Configure the model and provider
51
50
 
@@ -55,15 +54,11 @@ The provider row opens one menu: AI Gateway via a project, AI Gateway via `AI_GA
55
54
 
56
55
  The provider row demands attention (a bold yellow "Configure model access" with a yellow "Not configured" hint that dims when unselected and uses the terminal foreground when selected) until a link or gateway credential is detected, then names the connection afterward (for example "AI Gateway (Linked to my-project in my-team)"). Setup menus mark the cursor row with a padded, filled-arrow inverse label that inherits the row's accent: blue normally and yellow for warning rows. In stacked menus, the selected row's description appears directly beneath that option. The completed command's outcome stays in the transcript after the panel closes. When a turn fails because AI Gateway authentication is missing or stale, the error points you at `/model` directly.
57
56
 
58
- ### Add a channel
57
+ ### Browse registry integrations
59
58
 
60
- `/channels` shows the agent's channel list. Already-registered channels render as checked, focusable rows with an "Already installed" hint. Picking one adds it (including the Slack Connect provisioning), then installs the dependencies the scaffold added so the dev server can load the new channels right away. After each addition the list repaints with the channel checked, until Done (or Esc) leaves the flow.
59
+ `/add` first organizes integrations by what they add: a way to chat, tools and data, capabilities, or observability. Pick a category to open its searchable catalog from the official eve registry and the registry namespaces configured in `package.json`, or browse everything. Each integration shows its source beside its name, such as `Vercel` or a configured registry namespace. Select a result to review its source, packages, environment variables, and target files before adding it, or type an official item path, configured namespace address, or HTTP(S) URL directly into the search bar. After an add attempt finishes, the panel closes instead of returning to the catalog.
61
60
 
62
- ### Add a connection
63
-
64
- `/connect` shows a searchable list of MCP servers available through Vercel Connect. Already-authored connections remain checked. Logged-out users are directed to `/vc:login`. When the directory is not linked, selecting a server opens the same team and project flow used by `/model`, including creating a project or linking an existing one.
65
-
66
- For a selected server, eve first tries to attach the provider's canonical connector. If that fails, choose an existing connector from a searchable list or create one with a specific name. The fallback stays scoped to the team selected by the linked project. A connector created by the current attempt is removed if attachment or connection-file patching fails. Successful setup writes `agent/connections/<name>.ts`, records the attached connector UID, installs the new dependency so the dev server can load it, then returns to the main prompt.
61
+ Connection registry items install their definition and then configure Vercel Connect through the same `/add` flow. If the directory is unlinked, setup first offers to create or link a project. Run `eve add connection/<name>` for the equivalent CLI flow.
67
62
 
68
63
  ## Keyboard shortcuts
69
64
 
@@ -226,10 +226,10 @@ const agent = useEveAgent({ reducer: toolCounter });
226
226
  The browser conversation lives durably on the server. Persist both the rendered event log and the `session` cursor to pick it back up after a reload:
227
227
 
228
228
  ```tsx
229
- import type { HandleMessageStreamEvent, SessionState } from "eve/client";
229
+ import type { SessionState, MessageStreamEvent } from "eve/client";
230
230
 
231
231
  type SavedEveChat = {
232
- events?: readonly HandleMessageStreamEvent[];
232
+ events?: readonly MessageStreamEvent[];
233
233
  session?: SessionState;
234
234
  };
235
235
 
@@ -255,6 +255,8 @@ const agent = useEveAgent({
255
255
 
256
256
  Store the full `session` object (`sessionId`, `continuationToken`, `streamIndex`), not a single field. The session cursor lets eve continue the durable conversation; the event log lets your UI render historical messages without replaying the whole stream. A database-backed chat app should usually persist stream events as they arrive with `onEvent` and then save a final snapshot in `onFinish`.
257
257
 
258
+ `initialEvents` must be an ordered prefix of the same session's stream, but its endpoint does not have to line up exactly with where the stream resumes. Every event carries a stable [`meta.id`](/docs/concepts/sessions-runs-and-streaming#the-event-envelope), and the store drops any event whose id it has already applied — so a saved log that overlaps the replayed prefix renders once, and `onEvent` only fires for events your UI has not seen.
259
+
258
260
  For multiple chat threads, keep one saved event log and session cursor per thread. `agent`, `host`, `reducer`, `session`, `initialEvents`, `initialSession`, `auth`, `headers`, and `optimistic` are read when the hook creates its store, so remount the chat component when switching threads, for example with `key={chat.id}`.
259
261
 
260
262
  If the user can refresh or navigate immediately after pressing send, create your app-level chat row and store the pending user message before calling `send()`. After the request starts, persist the session state as soon as it contains a `sessionId`, then reconnect an interrupted in-flight turn with `session.stream({ startIndex: savedEvents.length })` from the lower-level client.
@@ -28,7 +28,7 @@ Import from `eve/svelte` and read the reactive getters directly. No `$` prefix:
28
28
  | `data` | `TData` | Projected state. With the default reducer, `EveMessageData` (`messages`). |
29
29
  | `status` | `UseEveAgentStatus` | `"ready"`, `"submitted"`, `"streaming"`, or `"error"`. |
30
30
  | `error` | `Error \| undefined` | Last transport-level error. |
31
- | `events` | `readonly HandleMessageStreamEvent[]` | Raw server events for this session. |
31
+ | `events` | `readonly MessageStreamEvent[]` | Raw server events for this session. |
32
32
  | `session` | `SessionState` | Snapshot of session state. |
33
33
  | `send` | `(input: SendTurnPayload) => Promise<void>` | Send text or a full turn (multi-part, attachments, HITL responses). |
34
34
  | `stop` | `() => void` | Abort the client's in-flight stream. |
@@ -25,16 +25,16 @@ const { data } = useEveAgent();
25
25
 
26
26
  ## What it returns
27
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 HandleMessageStreamEvent[]>` | Raw server events for this session. |
34
- | `session` | `ComputedRef<SessionState>` | Snapshot of session state. |
35
- | `send` | `(input: SendTurnPayload) => Promise<void>` | Send text or a full turn (multi-part, attachments, HITL responses). |
36
- | `stop` | `() => void` | Abort the client's in-flight stream. |
37
- | `reset` | `() => void` | Clear state and start a new session. |
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<SessionState>` | Snapshot of session state. |
35
+ | `send` | `(input: SendTurnPayload) => Promise<void>` | Send text or a full turn (multi-part, attachments, HITL responses). |
36
+ | `stop` | `() => void` | Abort the client's in-flight stream. |
37
+ | `reset` | `() => void` | Clear state and start a new session. |
38
38
 
39
39
  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>`.
40
40
 
@@ -80,15 +80,53 @@ import { search } from "@acme/crm/tools";
80
80
  const crmSearch = toolResultFrom(event.data.result, search); // typed; matches crm__search
81
81
  ```
82
82
 
83
+ ### Persist events to your own database
84
+
85
+ Every event carries a `meta` envelope with `meta.id`, a unique, sortable identifier for that event. It makes a natural primary key for an events table:
86
+
87
+ ```ts title="agent/hooks/persist.ts"
88
+ import { defineHook } from "eve/hooks";
89
+
90
+ export default defineHook({
91
+ events: {
92
+ async "*"(event, ctx) {
93
+ await db.query(
94
+ `insert into agent_events (id, session_id, type, data, emitted_at)
95
+ values ($1, $2, $3, $4, $5)
96
+ on conflict (id) do nothing`,
97
+ [
98
+ event.meta.id,
99
+ ctx.session.id,
100
+ event.type,
101
+ "data" in event ? event.data : null,
102
+ event.meta.at,
103
+ ],
104
+ );
105
+ },
106
+ },
107
+ });
108
+ ```
109
+
110
+ `meta.id` is stable for the life of the persisted event, so a consumer that re-reads the stream can ingest the same event twice safely. It is not a retry guard for the hook itself: if a step is interrupted and re-runs, the turn re-emits its events as _new_ events with new ids, and your hook runs again for each one.
111
+
112
+ What to key on instead depends on what you are protecting:
113
+
114
+ - **A side effect that must happen once per turn or step** — a charge, an email, a ticket — keys well on the coordinates in `event.data` (`turnId`, `stepIndex`, `sequence`). A retry restores those from the step's input, so the second attempt computes the same key and your gate holds.
115
+ - **Stored content should not key on those coordinates.** The retry re-invokes the model, so one coordinate can carry different text on each attempt. `on conflict (turn_id, step_index, sequence) do nothing` would keep the abandoned attempt and drop the one that finished. Key on `meta.id`, and accept that an interrupted turn leaves both attempts in the table.
116
+
117
+ Behind that split is an asymmetry worth knowing: durable history keeps only the attempt that completed, while the event stream keeps every attempt, and no field marks which is which. Hooks are at-least-once, and no key collapses a retry.
118
+
119
+ See [the event envelope](../concepts/sessions-runs-and-streaming#the-event-envelope) for the full contract.
120
+
83
121
  ## Execution order
84
122
 
85
123
  When a stream event fires, three things happen in order:
86
124
 
87
- 1. Emit. The channel adapter handler runs, then the event is written to the durable stream.
125
+ 1. Emit. The channel adapter handler runs, the event is stamped with its `meta` envelope, then it is written to the durable stream.
88
126
  2. Hooks. Stream-event hooks fire (typed handlers first, then the `*` wildcard). Return values are ignored.
89
127
  3. Dynamic tool resolvers. Resolvers subscribed to the event type run and update the tool set.
90
128
 
91
- Hooks always run after the event is durably recorded, so if a hook throws, the stream stays consistent.
129
+ Hooks always run after the event is durably recorded, so if a hook throws, the stream stays consistent. The persisted event and every hook observe the same `meta.id`.
92
130
 
93
131
  ## What happens when a hook throws
94
132
 
@@ -13,7 +13,11 @@ When no authored `instrumentation.ts` exists, `eve dev` records agent, AI SDK, a
13
13
 
14
14
  The directory is an immutable OTLP/JSON spool and remains available after `eve dev` exits, subject to the [retention policy](#local-trace-retention) below. Inspection tools may build a query index from these segments, but the index is derived and can be rebuilt without changing the captured trace data.
15
15
 
16
- Use `eve trace ls` to list captured traces and `eve trace <trace>` to inspect a session's span tree.
16
+ Use `eve traces ls` to list captured traces and `eve traces <trace>` to inspect a session's span tree.
17
+
18
+ When a model call is served by Vercel AI Gateway, its `agent.step` span also carries the cost the gateway reported: `gen_ai.usage.cost` (raw inference, USD), `gen_ai.usage.gateway_cost` (with the gateway surcharge), `gen_ai.usage.input_cost` / `gen_ai.usage.output_cost` (the split), and `gen_ai.generation.id` for reconciliation with the gateway dashboard. These attributes only exist for gateway-served calls — other providers emit nothing. Cost per turn is the sum across the turn's step spans.
19
+
20
+ Model and step spans also split token usage when the provider reports details: `gen_ai.usage.cache_read.input_tokens` and `gen_ai.usage.cache_creation.input_tokens` (named for the [OTel GenAI semantic conventions](https://github.com/open-telemetry/semantic-conventions-genai)) alongside the `agent.usage.input_tokens` / `agent.usage.output_tokens` totals — cached tokens price differently, so the split makes cost attribution exact. Providers without detailed usage emit only the totals.
17
21
 
18
22
  The local writer is an internal development default, not a second provider layered over authored instrumentation. When `instrumentation.ts` exists, its setup retains control and the zero-config writer is not installed.
19
23
 
@@ -17,12 +17,11 @@ The `eve` binary (`bin: eve`) runs from your app root, and every command first l
17
17
  | `eve dev <url>` | Connect the UI to an existing server URL (e.g. a remote deployment) instead of booting a local server |
18
18
  | `eve logs [logid]` | Print an `eve dev` diagnostic log (the most recent when `logid` is omitted) |
19
19
  | `eve logs ls` | List `eve dev` diagnostic logs, most recent first |
20
- | `eve trace ls` | List locally captured agent traces, most recent first |
21
- | `eve trace [trace]` | Show a local span tree (the most recent when omitted) |
20
+ | `eve traces ls` | List locally captured agent traces, most recent first |
21
+ | `eve traces [trace]` | Show a local span tree (the most recent when omitted) |
22
22
  | `eve link` | Link the directory to a Vercel project and pull AI Gateway credentials |
23
23
  | `eve deploy` | Deploy the agent to Vercel production (links first if needed) |
24
24
  | `eve eval` | Run evals against the local app or a remote target |
25
- | `eve channels add [kind]` | Scaffold a channel interactively, or by kind (`slack` \| `web`) |
26
25
  | `eve channels list` | List user-authored channels |
27
26
  | `eve extension init [target]` | Create a new extension package |
28
27
  | `eve extension build` | Build the current package as an extension |
@@ -47,9 +46,9 @@ Creates a new agent app or adds an agent to an existing app. Always installs dep
47
46
 
48
47
  After scaffolding, a human terminal usually continues into `eve dev` (or a coding-agent REPL if one is on `PATH` and you pick it). Coding-agent launches print the next steps instead of opening the TUI, so the session does not get stuck. Fresh projects use the parent workspace's package manager when there is one; otherwise they use the manager that launched `eve init`.
49
48
 
50
- | Flag | Type | Default | Description |
51
- | ---------------------- | ---- | ------- | ----------------------------------------------------------------------------------------------------- |
52
- | `--channel-web-nextjs` | flag | off | Add the Web Chat app (Next.js). Not for existing projects — run `eve channels add web` there instead. |
49
+ | Flag | Type | Default | Description |
50
+ | ---------------------- | ---- | ------- | ---------------------------------------------------------------------------------------------------- |
51
+ | `--channel-web-nextjs` | flag | off | Add the Web Chat app (Next.js). Not for existing projects — run `eve add channel/web` there instead. |
53
52
 
54
53
  ## `eve extension`
55
54
 
@@ -184,7 +183,7 @@ Pass a bare URL and the UI connects to that server instead of booting a local on
184
183
  | `--context-size <tokens>` | number | none | Model context window size, shown as a usage percentage |
185
184
  | `--logs <mode>` | enum | `stderr` | Server/agent logs to show: `all` \| `stderr` \| `sandbox` \| `none` |
186
185
 
187
- A fresh `eve init` passes `--input /model`. That bare local input starts onboarding: the TUI installs the Vercel CLI if needed, asks you to log in if needed, then opens `/model`. Other input stays editable in the prompt.
186
+ A fresh `eve init` passes `--input /model`. That bare local input starts onboarding: the TUI installs the Vercel CLI if needed, asks you to log in if needed, opens `/model`, then offers categorized registry next steps before the first prompt. Other input stays editable in the prompt.
188
187
 
189
188
  For a URL target protected by HTTP Basic auth, put the credentials in the URL. eve sends them as a Basic `Authorization` header and strips them from the server URL before connecting:
190
189
 
@@ -244,16 +243,16 @@ A log id is the file name without `.log` (for example `dev-2026-07-15T12-00-00.0
244
243
 
245
244
  Each log has a same-named `.dump` sibling holding environment diagnostics and session stats as one JSON document. `eve logs --dump` (with or without a log id) prepends that document to the JSONL log body; the combined output is a valid JSON value stream (`eve logs --dump | jq -c .`), one self-contained report to attach to an issue. When a log has no dump, the flag is silently a no-op.
246
245
 
247
- ## `eve trace`
246
+ ## `eve traces`
248
247
 
249
248
  ```bash
250
- eve trace ls # list traces, most recent first
251
- eve trace ls --json # emit machine-readable trace summaries
252
- eve trace # show the most recent span tree
253
- eve trace <trace> # show one span tree
249
+ eve traces ls # list traces, most recent first
250
+ eve traces ls --json # emit machine-readable trace summaries
251
+ eve traces # show the most recent span tree
252
+ eve traces <trace> # show one span tree
254
253
  ```
255
254
 
256
- `eve trace ls` reads the immutable OTLP/JSON segments captured under `.eve/traces/v1`; `eve dev` does not need to be running. `eve trace` accepts a full trace id, an `agent.session.id`, or an unambiguous prefix of either. Malformed or incomplete segments are skipped without hiding valid spans from the same trace.
255
+ `eve traces ls` reads the immutable OTLP/JSON segments captured under `.eve/traces/v1`; `eve dev` does not need to be running. `eve traces` accepts a full trace id, an `agent.session.id`, or an unambiguous prefix of either. Malformed or incomplete segments are skipped without hiding valid spans from the same trace.
257
256
 
258
257
  ## `eve link`
259
258
 
@@ -279,34 +278,22 @@ eve eval [evalId...] [--url <url>] [options]
279
278
 
280
279
  Runs all discovered evals when no eval ids are given; ids match exactly or by directory prefix (`eve eval weather` runs everything under `evals/weather/`). Exits `0` when every eval passed its checks, `1` when any eval failed (a failed check, an execution error, or a `--strict` threshold miss), `2` on configuration errors.
281
280
 
282
- | Flag | Type | Default | Description |
283
- | ----------------------- | ------ | ------- | ---------------------------------------------- |
284
- | `--url <url>` | string | none | Remote agent URL (skip local host startup) |
285
- | `--tag <tag...>` | string | none | Run only evals carrying a tag |
286
- | `--strict` | flag | off | Below-threshold scores also fail the exit code |
287
- | `--list` | flag | off | Print discovered evals without running them |
288
- | `--timeout <ms>` | number | none | Per-eval timeout in milliseconds |
289
- | `--max-concurrency <n>` | number | 8 | Max concurrent eval executions |
290
- | `--json` | flag | off | Output results as JSON |
291
- | `--junit <path>` | string | none | Write JUnit XML results to a file |
292
- | `--skip-report` | flag | off | Skip eval-defined reporters (e.g. Braintrust) |
293
- | `--verbose` | flag | off | Stream per-eval `t.log` lines to stdout |
281
+ | Flag | Type | Default | Description |
282
+ | ------------------------ | ------ | ------- | ------------------------------------------------------------- |
283
+ | `--url <url>` | string | none | Remote agent URL (skip local host startup) |
284
+ | `--tag <tag...>` | string | none | Run only evals carrying a tag |
285
+ | `--exclude-tag <tag...>` | string | none | Skip evals carrying a tag |
286
+ | `--strict` | flag | off | Below-threshold scores also fail the exit code |
287
+ | `--list` | flag | off | Print evals selected by the tag filters, without running them |
288
+ | `--timeout <ms>` | number | none | Per-eval timeout in milliseconds |
289
+ | `--max-concurrency <n>` | number | 8 | Max concurrent eval executions |
290
+ | `--json` | flag | off | Output results as JSON |
291
+ | `--junit <path>` | string | none | Write JUnit XML results to a file |
292
+ | `--skip-report` | flag | off | Skip eval-defined reporters (e.g. Braintrust) |
293
+ | `--verbose` | flag | off | Stream per-eval `t.log` lines to stdout |
294
294
 
295
295
  See [Evals](../evals/overview) for authoring evals.
296
296
 
297
- ## `eve channels add`
298
-
299
- ```bash
300
- eve channels add [kind] [-f] [-y]
301
- ```
302
-
303
- Scaffolds a channel into `agent/channels/`. With no `kind` it prompts interactively; pass a `kind` (`slack` \| `web`) to scaffold one directly. When the Vercel CLI has an authenticated session, eve scaffolds the Vercel-integrated variant and asks whether to deploy after setup. Without one, Slack setup asks whether to set up Vercel Connect or use portable credentials. The portable variant reads `SLACK_BOT_TOKEN` and `SLACK_SIGNING_SECRET` and adds both names to `.env.example`.
304
-
305
- | Flag | Type | Default | Description |
306
- | ------------- | ---- | ------- | --------------------------------------------------------- |
307
- | `-f, --force` | flag | off | Overwrite existing channel files |
308
- | `-y, --yes` | flag | off | Assume yes for confirmations; requires an explicit `kind` |
309
-
310
297
  ## `eve channels list`
311
298
 
312
299
  ```bash
@@ -52,7 +52,7 @@ export default defineTool({
52
52
  | `mockModel` | `eve/evals` | Deterministic fixture agent models | [Evals](../evals/overview) |
53
53
  | `useEveAgent` | `eve/react`, `eve/vue`, `eve/svelte` | frontend | [Frontend](../guides/frontend/overview) |
54
54
 
55
- A few non-`define*` helpers round out the set: `disableTool` and `experimental_workflow` from `eve/tools` (see [Default harness](../concepts/default-harness)), the route verbs `GET`/`POST`/`PUT`/`PATCH`/`DELETE`/`WS` from `eve/channels`, the approval policies `always`/`once`/`never` from `eve/tools/approval`, and the channel auth helpers `localDev`/`vercelOidc`/`placeholderAuth` from `eve/channels/auth`. To wrap a built-in tool, import its default value from `eve/tools/defaults` (`bash`, `readFile`, `writeFile`, `glob`, `grep`, `webFetch`, `webSearch`, `todo`, `loadSkill`). `AgentReasoningDefinition` is exported from `eve` for the top-level `defineAgent({ reasoning })` setting. `AgentLimitsDefinition` is exported for `defineAgent({ limits })`. `AgentWorkflowDefinition` and `AgentWorkflowWorldDefinition` are exported from `eve` for the `defineAgent({ experimental: { workflow } })` config shape. `ExperimentalWorkflowToolInput` is exported from `eve/tools` for the `experimental_workflow(...)` config shape.
55
+ A few non-`define*` helpers round out the set: `disableTool` and `experimental_workflow` from `eve/tools` (see [Default harness](../concepts/default-harness)), `sleep` from `eve/tools/sleep`, the route verbs `GET`/`POST`/`PUT`/`PATCH`/`DELETE`/`WS` from `eve/channels`, the approval policies `always`/`once`/`never` from `eve/tools/approval`, and the channel auth helpers `localDev`/`vercelOidc`/`placeholderAuth` from `eve/channels/auth`. To wrap a built-in tool, import its default value from `eve/tools/defaults` (`bash`, `readFile`, `writeFile`, `glob`, `grep`, `webFetch`, `webSearch`, `todo`, `loadSkill`). `AgentReasoningDefinition` is exported from `eve` for the top-level `defineAgent({ reasoning })` setting. `AgentLimitsDefinition` is exported for `defineAgent({ limits })`. `AgentWorkflowDefinition` and `AgentWorkflowWorldDefinition` are exported from `eve` for the `defineAgent({ experimental: { workflow } })` config shape. `ExperimentalWorkflowToolInput` is exported from `eve/tools` for the `experimental_workflow(...)` config shape.
56
56
 
57
57
  ## Runtime context (`ctx`)
58
58
 
@@ -74,6 +74,7 @@ A few non-`define*` helpers round out the set: `disableTool` and `experimental_w
74
74
  | `eve/tools` | `defineTool`, `defineDynamic`, `disableTool`, `experimental_workflow` |
75
75
  | `eve/tools/defaults` | the built-in tools as plain values |
76
76
  | `eve/tools/approval` | `always`, `once`, `never` |
77
+ | `eve/tools/sleep` | opt-in durable `sleep` tool |
77
78
  | `eve/connections` | `defineMcpClientConnection`, `defineOpenAPIConnection` |
78
79
  | `eve/channels` | `defineChannel`, route verbs |
79
80
  | `eve/channels/eve` | `eveChannel` |
@@ -102,6 +102,11 @@ Approvals and questions share one protocol:
102
102
  3. The turn parks at `session.waiting`, durably, for as long as it takes.
103
103
  4. The client answers with `inputResponses` (structured, keyed by `requestId`) or a normal follow-up `message`. A follow-up whose text matches an option ID, option label, or numeric option index resolves automatically, including approval options such as `approve` and `deny`.
104
104
 
105
+ Each request includes a `kind` discriminator: `tool-approval`, `question`, or
106
+ `session-limit`. Clients should use `kind` to choose behavior and presentation;
107
+ `toolName` and `requestId` identify the action and request but do not encode its
108
+ semantics.
109
+
105
110
  The run picks back up exactly where it parked. Because the pause is durable, nothing is held in memory while it waits — the process can restart and the parked turn survives.
106
111
 
107
112
  For approval requests, unrelated follow-up text does not deny the tool call. eve keeps the approval pending and holds that text until the approval is answered, then replays it as the next message in the session.
@@ -7,10 +7,10 @@ The analytics assistant runs fine in the TUI. Now ship it for real, as a web das
7
7
 
8
8
  ## Add the Web Chat app
9
9
 
10
- Step 1 scaffolded the agent without a web frontend. Add one now with `eve channels add`, run from the `analytics-assistant/` directory:
10
+ Step 1 scaffolded the agent without a web frontend. Add one now with `eve add channel/web`, run from the `analytics-assistant/` directory:
11
11
 
12
12
  ```bash
13
- npx eve channels add web
13
+ npx eve add channel/web
14
14
  ```
15
15
 
16
16
  This adds a Next.js app (`next.config.ts`, `app/page.tsx`, `app/_components/`) wired to the existing eve channel, plus the chat UI components and their dependencies. Run `npm install` afterward to install the added packages. The generated `next.config.ts` wraps your config with `withEve`, which wires the eve routes automatically: