eve 0.31.3 → 0.33.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 (351) hide show
  1. package/CHANGELOG.md +36 -1
  2. package/README.md +8 -4
  3. package/dist/src/channel/channel-address.d.ts +4 -1
  4. package/dist/src/channel/channel-address.js +1 -1
  5. package/dist/src/channel/channel-operations.d.ts +3 -1
  6. package/dist/src/channel/compiled-channel.d.ts +2 -1
  7. package/dist/src/channel/cross-channel-receive.d.ts +5 -2
  8. package/dist/src/channel/cross-channel-receive.js +1 -1
  9. package/dist/src/channel/session.d.ts +6 -2
  10. package/dist/src/channel/session.js +1 -1
  11. package/dist/src/channel/types.d.ts +6 -0
  12. package/dist/src/channel/types.js +1 -1
  13. package/dist/src/chunks/{use-eve-agent-CF5D6jSV.js → use-eve-agent-3oBnxzhV.js} +57 -22
  14. package/dist/src/chunks/{use-eve-agent-DbYZLG0h.js → use-eve-agent-B-Hky2f4.js} +57 -22
  15. package/dist/src/cli/commands/agent-prompt/collect-intent.md +3 -0
  16. package/dist/src/cli/commands/agent-prompt/scaffold.md +4 -2
  17. package/dist/src/cli/commands/info.js +1 -1
  18. package/dist/src/cli/commands/init-repl.d.ts +1 -1
  19. package/dist/src/cli/commands/init-repl.js +1 -1
  20. package/dist/src/cli/commands/init.d.ts +7 -0
  21. package/dist/src/cli/commands/init.js +1 -1
  22. package/dist/src/cli/commands/integration-connect.d.ts +4 -3
  23. package/dist/src/cli/commands/integration-connect.js +1 -1
  24. package/dist/src/cli/commands/integration-setup.d.ts +4 -0
  25. package/dist/src/cli/commands/integration-setup.js +1 -1
  26. package/dist/src/cli/commands/register-integration-commands.js +1 -1
  27. package/dist/src/cli/commands/register-registry-commands.js +1 -1
  28. package/dist/src/cli/commands/registry-declared-setups.d.ts +23 -0
  29. package/dist/src/cli/commands/registry-declared-setups.js +1 -0
  30. package/dist/src/cli/commands/registry-metadata.d.ts +69 -0
  31. package/dist/src/cli/commands/registry-metadata.js +1 -1
  32. package/dist/src/cli/commands/registry-package.d.ts +3 -3
  33. package/dist/src/cli/commands/registry-package.js +1 -1
  34. package/dist/src/cli/commands/registry-presentation.d.ts +20 -0
  35. package/dist/src/cli/commands/registry-presentation.js +7 -0
  36. package/dist/src/cli/commands/registry-search-presentation.d.ts +16 -0
  37. package/dist/src/cli/commands/registry-search-presentation.js +6 -0
  38. package/dist/src/cli/commands/registry-setup-command.d.ts +5 -2
  39. package/dist/src/cli/commands/registry-setup-command.js +1 -2
  40. package/dist/src/cli/commands/registry.d.ts +16 -7
  41. package/dist/src/cli/commands/registry.js +1 -6
  42. package/dist/src/cli/commands/set.d.ts +20 -0
  43. package/dist/src/cli/commands/set.js +1 -0
  44. package/dist/src/cli/commands/setup-answers.d.ts +2 -0
  45. package/dist/src/cli/commands/setup-answers.js +1 -0
  46. package/dist/src/cli/commands/setup-headless.d.ts +79 -0
  47. package/dist/src/cli/commands/setup-headless.js +1 -0
  48. package/dist/src/cli/dev/tui/runner.js +1 -1
  49. package/dist/src/cli/dev/tui/setup-commands.js +3 -3
  50. package/dist/src/cli/dev/tui/setup-flow.d.ts +8 -1
  51. package/dist/src/cli/dev/tui/setup-issues.js +1 -1
  52. package/dist/src/cli/dev/tui/terminal-renderer.js +12 -12
  53. package/dist/src/cli/dev/tui/traces/trace-conversation.d.ts +1 -1
  54. package/dist/src/cli/dev/tui/tui-prompter.js +1 -1
  55. package/dist/src/cli/option-parsers.d.ts +3 -0
  56. package/dist/src/cli/option-parsers.js +1 -1
  57. package/dist/src/cli/run.js +1 -1
  58. package/dist/src/client/agent-info-schema.d.ts +28 -5
  59. package/dist/src/client/agent-info-schema.js +1 -1
  60. package/dist/src/client/session.js +1 -1
  61. package/dist/src/client/types.d.ts +3 -0
  62. package/dist/src/client/url.d.ts +5 -0
  63. package/dist/src/client/url.js +1 -1
  64. package/dist/src/compiled/.vendor-stamp.json +8 -8
  65. package/dist/src/compiled/@ai-sdk/anthropic/index.d.ts +33 -13
  66. package/dist/src/compiled/@ai-sdk/anthropic/index.js +4 -2
  67. package/dist/src/compiled/@ai-sdk/google/index.d.ts +50 -3
  68. package/dist/src/compiled/@ai-sdk/google/index.js +7 -7
  69. package/dist/src/compiled/@ai-sdk/mcp/index.d.ts +33 -3
  70. package/dist/src/compiled/@ai-sdk/mcp/index.js +1 -1
  71. package/dist/src/compiled/@ai-sdk/openai/index.d.ts +140 -9
  72. package/dist/src/compiled/@ai-sdk/openai/index.js +9 -6
  73. package/dist/src/compiled/@ai-sdk/otel/index.js +1 -1
  74. package/dist/src/compiled/@ai-sdk/provider/index.d.ts +300 -6
  75. package/dist/src/compiled/@ai-sdk/provider-utils/index.d.ts +70 -20
  76. package/dist/src/compiled/@opentelemetry/api/index.d.ts +2 -1
  77. package/dist/src/compiled/@photon-ai/chat-adapter-imessage/index.js +1 -1
  78. package/dist/src/compiled/@vercel/otel/index.d.ts +6 -0
  79. package/dist/src/compiled/@vercel/sandbox/index.js +1 -1
  80. package/dist/src/compiled/_chunks/node/undici-CUIybhQ2.js +95 -0
  81. package/dist/src/compiled/_chunks/workflow/dist-eUxFublw.js +77 -0
  82. package/dist/src/compiled/shadcn-registry/index.js +309 -215
  83. package/dist/src/compiler/extension-compatibility.d.ts +25 -15
  84. package/dist/src/compiler/extension-compatibility.js +1 -1
  85. package/dist/src/compiler/manifest.d.ts +119 -19
  86. package/dist/src/compiler/manifest.js +1 -1
  87. package/dist/src/compiler/model-catalog.d.ts +2 -30
  88. package/dist/src/compiler/model-catalog.js +1 -1
  89. package/dist/src/compiler/module-map.d.ts +2 -2
  90. package/dist/src/compiler/module-map.js +2 -2
  91. package/dist/src/compiler/normalize-agent-config.js +1 -1
  92. package/dist/src/compiler/normalize-instructions.js +1 -1
  93. package/dist/src/compiler/normalize-manifest.js +2 -2
  94. package/dist/src/compiler/normalize-skill.js +1 -1
  95. package/dist/src/compiler/normalize-subagent.d.ts +5 -1
  96. package/dist/src/compiler/normalize-subagent.js +1 -1
  97. package/dist/src/compiler/remote-agent-node.d.ts +4 -1
  98. package/dist/src/compiler/workspace-resources.js +1 -1
  99. package/dist/src/context/build-callback-context.js +1 -1
  100. package/dist/src/context/dynamic-model-lifecycle.d.ts +7 -2
  101. package/dist/src/context/dynamic-model-lifecycle.js +1 -1
  102. package/dist/src/context/dynamic-subagent-lifecycle.js +1 -1
  103. package/dist/src/context/hook-lifecycle.js +1 -1
  104. package/dist/src/context/keys.d.ts +8 -0
  105. package/dist/src/context/keys.js +1 -1
  106. package/dist/src/evals/session.js +1 -1
  107. package/dist/src/execution/authorization-callback-match.d.ts +14 -0
  108. package/dist/src/execution/authorization-callback-match.js +1 -0
  109. package/dist/src/execution/dispatch-runtime-actions-step.js +1 -1
  110. package/dist/src/execution/effective-agent-config.js +1 -1
  111. package/dist/src/execution/next-driver-action.d.ts +1 -0
  112. package/dist/src/execution/node-step.js +1 -1
  113. package/dist/src/execution/parked-delivery-wait.d.ts +16 -1
  114. package/dist/src/execution/parked-delivery-wait.js +1 -1
  115. package/dist/src/execution/sandbox/abort-bound-session.d.ts +1 -1
  116. package/dist/src/execution/sandbox/bindings/docker.js +1 -1
  117. package/dist/src/execution/sandbox/bindings/just-bash-runtime.js +1 -1
  118. package/dist/src/execution/sandbox/bindings/microsandbox-lifecycle.js +1 -1
  119. package/dist/src/execution/sandbox/bindings/microsandbox-runtime.d.ts +1 -0
  120. package/dist/src/execution/sandbox/bindings/microsandbox-runtime.js +1 -1
  121. package/dist/src/execution/sandbox/bindings/vercel.js +1 -1
  122. package/dist/src/execution/sandbox/ensure.js +1 -1
  123. package/dist/src/execution/session-command-inbox.d.ts +26 -1
  124. package/dist/src/execution/session-command-inbox.js +1 -1
  125. package/dist/src/execution/session-command-wire.js +1 -1
  126. package/dist/src/execution/session.d.ts +2 -0
  127. package/dist/src/execution/session.js +2 -2
  128. package/dist/src/execution/settle-cancelled-turn-step.js +1 -1
  129. package/dist/src/execution/turn-control-receiver.d.ts +2 -0
  130. package/dist/src/execution/turn-control-receiver.js +1 -1
  131. package/dist/src/execution/turn-execution-cursor.d.ts +1 -0
  132. package/dist/src/execution/turn-workflow.js +1 -1
  133. package/dist/src/execution/workflow-entry.js +1 -1
  134. package/dist/src/execution/workflow-steps.d.ts +3 -4
  135. package/dist/src/execution/workflow-steps.js +1 -1
  136. package/dist/src/harness/authorization.d.ts +24 -11
  137. package/dist/src/harness/authorization.js +1 -1
  138. package/dist/src/harness/emission.d.ts +1 -1
  139. package/dist/src/harness/emission.js +1 -1
  140. package/dist/src/harness/input-extraction.js +1 -1
  141. package/dist/src/harness/input-requests.js +1 -1
  142. package/dist/src/harness/provider-tools.d.ts +1 -1
  143. package/dist/src/harness/provider-tools.js +1 -1
  144. package/dist/src/harness/step-hooks.d.ts +1 -1
  145. package/dist/src/harness/step-hooks.js +1 -1
  146. package/dist/src/harness/tool-loop.d.ts +1 -1
  147. package/dist/src/harness/tool-loop.js +2 -2
  148. package/dist/src/harness/types.d.ts +11 -5
  149. package/dist/src/harness/types.js +1 -1
  150. package/dist/src/internal/application/package.js +1 -1
  151. package/dist/src/internal/authored-definition/core.js +1 -1
  152. package/dist/src/internal/authored-definition/schema-backed.js +1 -1
  153. package/dist/src/internal/authored-module-loader.js +1 -1
  154. package/dist/src/internal/authored-module-map-loader.js +1 -1
  155. package/dist/src/internal/model-catalog.d.ts +46 -0
  156. package/dist/src/internal/model-catalog.js +1 -0
  157. package/dist/src/internal/nitro/host/build-vercel-agent-summary.js +1 -1
  158. package/dist/src/internal/nitro/host/create-application-nitro.js +1 -1
  159. package/dist/src/internal/nitro/host/dev-host-fingerprint.js +1 -1
  160. package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response-from-manifest.js +1 -1
  161. package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response.d.ts +20 -10
  162. package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response.js +1 -1
  163. package/dist/src/internal/nitro/routes/channel-dispatch.js +1 -1
  164. package/dist/src/internal/nitro/routes/info.js +1 -1
  165. package/dist/src/internal/vercel-agent-summary.d.ts +12 -3
  166. package/dist/src/internal/vercel-agent-summary.js +1 -1
  167. package/dist/src/packages/eve-catalog/src/index.js +1 -1
  168. package/dist/src/protocol/message.d.ts +2 -2
  169. package/dist/src/protocol/message.js +1 -1
  170. package/dist/src/protocol/routes.d.ts +8 -6
  171. package/dist/src/protocol/routes.js +1 -1
  172. package/dist/src/public/channels/chat-sdk/chatSdkChannel.d.ts +5 -5
  173. package/dist/src/public/channels/chat-sdk/chatSdkChannel.js +2 -2
  174. package/dist/src/public/channels/discord/discordChannel.d.ts +3 -1
  175. package/dist/src/public/channels/discord/discordChannel.js +1 -1
  176. package/dist/src/public/channels/eve.d.ts +3 -1
  177. package/dist/src/public/channels/eve.js +1 -1
  178. package/dist/src/public/channels/github/githubChannel.d.ts +3 -1
  179. package/dist/src/public/channels/github/githubChannel.js +1 -1
  180. package/dist/src/public/channels/index.d.ts +1 -1
  181. package/dist/src/public/channels/linear/linearChannel.d.ts +3 -1
  182. package/dist/src/public/channels/linear/linearChannel.js +1 -1
  183. package/dist/src/public/channels/photon/photonIMessageChannel.d.ts +3 -1
  184. package/dist/src/public/channels/photon/photonIMessageChannel.js +1 -1
  185. package/dist/src/public/channels/slack/attachments.js +1 -1
  186. package/dist/src/public/channels/slack/defaults.js +1 -1
  187. package/dist/src/public/channels/slack/hitl.d.ts +14 -1
  188. package/dist/src/public/channels/slack/hitl.js +2 -2
  189. package/dist/src/public/channels/slack/slackChannel.d.ts +3 -1
  190. package/dist/src/public/channels/slack/slackChannel.js +1 -1
  191. package/dist/src/public/channels/teams/teamsChannel.d.ts +3 -1
  192. package/dist/src/public/channels/teams/teamsChannel.js +1 -1
  193. package/dist/src/public/channels/telegram/telegramChannel.d.ts +3 -1
  194. package/dist/src/public/channels/telegram/telegramChannel.js +1 -1
  195. package/dist/src/public/channels/twilio/twilioChannel.d.ts +3 -1
  196. package/dist/src/public/channels/twilio/twilioChannel.js +1 -1
  197. package/dist/src/public/definitions/agent.d.ts +5 -7
  198. package/dist/src/public/definitions/agent.js +1 -1
  199. package/dist/src/public/definitions/callback-context.d.ts +2 -2
  200. package/dist/src/public/definitions/channel.d.ts +3 -1
  201. package/dist/src/public/definitions/channel.js +1 -1
  202. package/dist/src/public/definitions/sandbox.d.ts +1 -1
  203. package/dist/src/public/definitions/tool.d.ts +10 -14
  204. package/dist/src/public/definitions/tool.js +1 -1
  205. package/dist/src/public/index.d.ts +1 -1
  206. package/dist/src/public/sandbox/index.d.ts +1 -1
  207. package/dist/src/public/tools/web-search.d.ts +2 -2
  208. package/dist/src/runtime/agent/bootstrap.d.ts +19 -6
  209. package/dist/src/runtime/agent/bootstrap.js +1 -1
  210. package/dist/src/runtime/agent/model-catalog.d.ts +10 -0
  211. package/dist/src/runtime/agent/model-catalog.js +1 -0
  212. package/dist/src/runtime/agent/resolve-model.d.ts +8 -4
  213. package/dist/src/runtime/agent/resolve-model.js +1 -1
  214. package/dist/src/runtime/connections/callback-route.d.ts +4 -5
  215. package/dist/src/runtime/connections/callback-route.js +1 -1
  216. package/dist/src/runtime/connections/scoped-authorization.js +1 -1
  217. package/dist/src/runtime/framework-channels/index.js +1 -1
  218. package/dist/src/runtime/framework-tools/connection-search-dynamic.js +2 -2
  219. package/dist/src/runtime/framework-tools/todo.js +1 -1
  220. package/dist/src/runtime/input/types.d.ts +1 -4
  221. package/dist/src/runtime/resolve-agent-graph.js +1 -1
  222. package/dist/src/runtime/resolve-agent.d.ts +2 -2
  223. package/dist/src/runtime/resolve-agent.js +1 -1
  224. package/dist/src/runtime/resolve-channel.js +1 -1
  225. package/dist/src/runtime/resolve-dynamic-subagent.d.ts +2 -5
  226. package/dist/src/runtime/subagents/dynamic-agent-config.d.ts +8 -7
  227. package/dist/src/runtime/subagents/dynamic-agent-config.js +1 -1
  228. package/dist/src/runtime/types.d.ts +11 -4
  229. package/dist/src/sandbox/state.d.ts +1 -0
  230. package/dist/src/setup/ask-editable.d.ts +22 -0
  231. package/dist/src/setup/ask-editable.js +1 -0
  232. package/dist/src/setup/ask-signals.d.ts +23 -0
  233. package/dist/src/setup/ask-signals.js +1 -0
  234. package/dist/src/setup/ask.d.ts +24 -25
  235. package/dist/src/setup/ask.js +1 -1
  236. package/dist/src/setup/boxes/deploy-project.js +1 -1
  237. package/dist/src/setup/boxes/resolve-provisioning.js +1 -1
  238. package/dist/src/setup/connection-connector.js +3 -2
  239. package/dist/src/setup/flows/deploy.d.ts +5 -3
  240. package/dist/src/setup/flows/deploy.js +1 -1
  241. package/dist/src/setup/flows/ensure-vercel-project.d.ts +5 -1
  242. package/dist/src/setup/flows/ensure-vercel-project.js +1 -1
  243. package/dist/src/setup/flows/model-source-change.d.ts +1 -0
  244. package/dist/src/setup/flows/model-source-change.js +1 -1
  245. package/dist/src/setup/flows/registry-session.d.ts +33 -0
  246. package/dist/src/setup/flows/registry-session.js +1 -0
  247. package/dist/src/setup/flows/registry.d.ts +16 -0
  248. package/dist/src/setup/flows/registry.js +1 -1
  249. package/dist/src/setup/index.js +1 -1
  250. package/dist/src/setup/integrations/discord/setup.d.ts +19 -7
  251. package/dist/src/setup/integrations/discord/setup.js +4 -3
  252. package/dist/src/setup/integrations/github/setup.d.ts +36 -7
  253. package/dist/src/setup/integrations/github/setup.js +2 -2
  254. package/dist/src/setup/integrations/linear/setup.d.ts +21 -9
  255. package/dist/src/setup/integrations/linear/setup.js +2 -2
  256. package/dist/src/setup/integrations/photon/management.d.ts +8 -1
  257. package/dist/src/setup/integrations/photon/management.js +1 -1
  258. package/dist/src/setup/integrations/photon/setup-flow.d.ts +28 -24
  259. package/dist/src/setup/integrations/photon/setup-flow.js +3 -3
  260. package/dist/src/setup/integrations/photon/setup.d.ts +1 -3
  261. package/dist/src/setup/integrations/photon/setup.js +1 -1
  262. package/dist/src/setup/integrations/registry.d.ts +1 -1
  263. package/dist/src/setup/integrations/registry.js +1 -1
  264. package/dist/src/setup/integrations/runner.d.ts +14 -11
  265. package/dist/src/setup/integrations/runner.js +1 -1
  266. package/dist/src/setup/integrations/shared/prerequisite.d.ts +17 -0
  267. package/dist/src/setup/integrations/shared/prerequisite.js +1 -0
  268. package/dist/src/setup/integrations/shared/ui.d.ts +22 -15
  269. package/dist/src/setup/integrations/shared/ui.js +2 -2
  270. package/dist/src/setup/integrations/shared/vercel-project.d.ts +11 -0
  271. package/dist/src/setup/integrations/shared/vercel-project.js +1 -0
  272. package/dist/src/setup/integrations/slack/setup.d.ts +25 -10
  273. package/dist/src/setup/integrations/slack/setup.js +1 -1
  274. package/dist/src/setup/integrations/types.d.ts +43 -13
  275. package/dist/src/setup/integrations/types.js +1 -1
  276. package/dist/src/setup/integrations/web/setup.d.ts +22 -3
  277. package/dist/src/setup/integrations/web/setup.js +1 -1
  278. package/dist/src/setup/prompter.d.ts +8 -0
  279. package/dist/src/setup/question-options.d.ts +15 -0
  280. package/dist/src/setup/question-options.js +1 -0
  281. package/dist/src/setup/registry-setup-client.d.ts +3 -4
  282. package/dist/src/setup/registry-setup-client.js +2 -2
  283. package/dist/src/setup/registry-setup-completion.d.ts +3 -0
  284. package/dist/src/setup/registry-setup-completion.js +1 -0
  285. package/dist/src/setup/registry-setup-protocol.d.ts +22 -3
  286. package/dist/src/setup/registry-setup-protocol.js +1 -1
  287. package/dist/src/setup/scaffold/create/add-to-project.d.ts +2 -0
  288. package/dist/src/setup/scaffold/create/add-to-project.js +1 -1
  289. package/dist/src/setup/scaffold/create/project.d.ts +3 -1
  290. package/dist/src/setup/scaffold/create/project.js +57 -5
  291. package/dist/src/setup/scaffold/update/channels.js +1 -1
  292. package/dist/src/setup/setup-question-wire.d.ts +48 -0
  293. package/dist/src/setup/setup-question-wire.js +1 -0
  294. package/dist/src/setup/slackbot.d.ts +5 -1
  295. package/dist/src/setup/slackbot.js +1 -1
  296. package/dist/src/setup/state.d.ts +2 -2
  297. package/dist/src/shared/agent-definition.d.ts +23 -23
  298. package/dist/src/shared/agent-definition.js +1 -1
  299. package/dist/src/shared/channel-definition.d.ts +3 -1
  300. package/dist/src/shared/dynamic-tool-definition.d.ts +4 -10
  301. package/dist/src/shared/dynamic-tool-definition.js +1 -1
  302. package/dist/src/shared/sandbox-backend.d.ts +6 -0
  303. package/dist/src/shared/sandbox-session.d.ts +15 -0
  304. package/dist/src/shared/tool-definition.d.ts +2 -2
  305. package/dist/src/shared/tool-schema.d.ts +5 -4
  306. package/dist/src/shared/tool-schema.js +1 -1
  307. package/dist/src/svelte/index.js +1 -1
  308. package/dist/src/svelte/use-eve-agent.js +1 -1
  309. package/dist/src/tracing/agent-otel-provider.d.ts +5 -38
  310. package/dist/src/tracing/agent-otel-provider.js +2 -2
  311. package/dist/src/tracing/agent-span-id-generator.d.ts +15 -0
  312. package/dist/src/tracing/agent-span-id-generator.js +1 -0
  313. package/dist/src/tracing/agent-trace-context-store.d.ts +1 -1
  314. package/dist/src/tracing/agent-trace-context-store.js +1 -1
  315. package/dist/src/tracing/agent-trace-state.d.ts +41 -0
  316. package/dist/src/tracing/agent-trace-state.js +1 -0
  317. package/dist/src/tracing/local-instrumentation-runtime.js +1 -1
  318. package/dist/src/vue/index.js +1 -1
  319. package/dist/src/vue/use-eve-agent.js +1 -1
  320. package/docs/agent-config.md +30 -19
  321. package/docs/channels/chat-sdk.mdx +6 -6
  322. package/docs/channels/custom.mdx +20 -0
  323. package/docs/channels/discord.mdx +1 -0
  324. package/docs/channels/eve.mdx +2 -0
  325. package/docs/channels/github.mdx +1 -1
  326. package/docs/channels/linear.mdx +1 -1
  327. package/docs/channels/overview.mdx +21 -2
  328. package/docs/channels/photon.mdx +5 -2
  329. package/docs/channels/slack.mdx +158 -50
  330. package/docs/concepts/default-harness.md +3 -3
  331. package/docs/concepts/execution-model-and-durability.mdx +5 -8
  332. package/docs/concepts/sessions-runs-and-streaming.md +3 -3
  333. package/docs/connections/mcp.mdx +6 -0
  334. package/docs/guides/dev-tui.md +58 -142
  335. package/docs/guides/dynamic-capabilities.md +24 -20
  336. package/docs/guides/dynamic-workflows.md +2 -0
  337. package/docs/guides/frontend/overview.mdx +4 -2
  338. package/docs/guides/hooks.md +25 -3
  339. package/docs/guides/session-context.md +18 -0
  340. package/docs/install-integrations.mdx +2 -0
  341. package/docs/installation.mdx +7 -1
  342. package/docs/reference/cli.md +37 -10
  343. package/docs/reference/typescript-api.md +1 -1
  344. package/docs/sandbox.mdx +25 -5
  345. package/docs/skills.mdx +12 -1
  346. package/docs/subagents.mdx +1 -1
  347. package/docs/tools/human-in-the-loop.md +1 -1
  348. package/docs/tutorial/ship-it.mdx +1 -1
  349. package/package.json +10 -10
  350. package/dist/src/compiled/_chunks/node/undici-DWL_MYmT.js +0 -95
  351. package/dist/src/compiled/_chunks/workflow/dist-CZxNEvEs.js +0 -79
@@ -17,6 +17,10 @@ export default defineAgent({
17
17
  });
18
18
  ```
19
19
 
20
+ For a static AI Gateway model ID, you can make the same source change from the
21
+ project root with `eve set --model anthropic/claude-opus-4.8` or from the local
22
+ dev TUI with `/model anthropic/claude-opus-4.8`.
23
+
20
24
  The root `agent.ts` can be omitted when no runtime config is needed. In that case, eve defaults
21
25
  to `anthropic/claude-sonnet-5`. When `agent.ts` is present, `model` is required.
22
26
 
@@ -45,21 +49,23 @@ Model use is subject to the terms, data-processing commitments, retention behavi
45
49
 
46
50
  ### Choose the model dynamically
47
51
 
48
- `model` also accepts `defineDynamic({ fallback, events })`. `fallback` is the
49
- compiled static model: it anchors build-time metadata (routing, credentials,
50
- context window) and serves whenever no dynamic selection is set.
52
+ `model` also accepts `defineDynamic({ events })`. Each matching handler must
53
+ return the concrete model for its scope; a dynamic model has no compiled
54
+ default.
51
55
 
52
56
  ```ts title="agent/agent.ts"
53
57
  import { defineAgent, defineDynamic } from "eve";
54
58
 
55
59
  export default defineAgent({
56
60
  model: defineDynamic({
57
- fallback: "anthropic/claude-sonnet-5",
58
61
  events: {
59
- "session.started": (_event, ctx) =>
60
- ctx.session.auth.initiator?.attributes.plan === "enterprise"
61
- ? "anthropic/claude-opus-4.8"
62
- : null,
62
+ "session.started": (_event, ctx) => {
63
+ if (ctx.session.auth.initiator?.attributes.plan === "enterprise") {
64
+ return "anthropic/claude-opus-4.8";
65
+ }
66
+
67
+ return "anthropic/claude-sonnet-5";
68
+ },
63
69
  },
64
70
  }),
65
71
  });
@@ -68,24 +74,28 @@ export default defineAgent({
68
74
  Handlers receive the shared [dynamic resolver
69
75
  context](./guides/dynamic-capabilities) (`ctx.session`, `ctx.channel`,
70
76
  `ctx.messages`) and return a gateway model id, an AI SDK `LanguageModel`, a
71
- selection object, or `null` to leave the scope unset.
77
+ selection object. Returning `null` or `undefined` fails the turn.
72
78
 
73
79
  - **Scopes.** `session.started` (once per session), `turn.started` (once per
74
80
  turn), `step.started` (every model step). Precedence: step > turn >
75
- session > `fallback`. Prefer `session.started`: prompt caches are per
76
- model, so every switch re-ingests the conversation at uncached prices.
77
- - **Failures degrade, never fail the turn.** A resolver that throws or
78
- returns an invalid selection logs an error and leaves its scope unset.
79
- Build-time validation covers only `fallback`; a selected model without
80
- credentials fails at request time.
81
+ session. Prefer `session.started`: prompt caches are per model, so every
82
+ switch re-ingests the conversation at uncached prices. If no active
83
+ selection exists before model-dependent work begins, the turn fails.
84
+ - **Failures stop the turn.** A resolver that throws, returns no model, or
85
+ returns an invalid selection fails before the provider call. A selected
86
+ model without valid credentials fails at request time.
81
87
  - **Serialization.** Session/turn selections must be model id strings; return
82
88
  live `LanguageModel` objects only from `step.started`.
83
89
  - **Selection object.** `{ model, modelContextWindowTokens?, modelOptions? }`.
84
- Set `modelContextWindowTokens` when the selected model's window differs
85
- from the fallback's — it is never inherited. Omitted `modelOptions` reuses
86
- the agent-level `modelOptions`.
90
+ When `modelContextWindowTokens` is omitted, eve resolves it from the AI
91
+ Gateway catalog and caches successful metadata in durable session state for
92
+ 24 hours. Set it explicitly for an unlisted or custom model. Dynamic agents
93
+ cannot set sibling `modelContextWindowTokens` or `modelOptions` fields;
94
+ return per-model values from the handler.
87
95
 
88
- Runtime identity reports a dynamic agent's model as `dynamic:<fallback id>`.
96
+ The `session.started` runtime identity does not include a model id for a
97
+ dynamic agent. Each public `step.started` event reports the concrete `modelId`
98
+ selected for that model call.
89
99
 
90
100
  ## Reasoning effort
91
101
 
@@ -103,6 +113,7 @@ Supported values are `"provider-default"`, `"none"`, `"minimal"`, `"low"`,
103
113
  `"medium"`, `"high"`, and `"xhigh"`. The selected model and provider determine
104
114
  which levels are available and how they map to provider-native settings. Use
105
115
  `modelOptions.providerOptions` when you need provider-specific reasoning controls.
116
+ Run `eve set --reasoning high` to update this field from the command line.
106
117
 
107
118
  ## Compaction
108
119
 
@@ -5,7 +5,7 @@ description: "Bridge any Vercel Chat SDK adapter — Slack, Discord, Telegram, W
5
5
 
6
6
  The Chat SDK channel connects your agent to any [Vercel Chat SDK](https://chat-sdk.dev) adapter. You pick an adapter (`@chat-adapter/slack`, `@resend/chat-sdk-adapter`, and so on), register handlers for the messages you care about, and call `send` to hand each turn to eve. Use it to reach a surface eve does not ship a first-class channel for, or when you want to manage credentials and state with the Chat SDK's own primitives rather than [Vercel Connect](../guides/auth-and-route-protection). See [Channels](./overview) for the contract this builds on.
7
7
 
8
- You supply an adapter and a state store: the adapter owns provider auth, webhook verification, and delivery, while eve owns session dispatch, streaming, typing, and human-in-the-loop. First-class channels such as [Slack](./slack) manage credentials through Vercel Connect instead — reach for whichever fits the surface you are targeting.
8
+ You supply an adapter and a state store: the adapter owns provider auth, webhook verification, and delivery, while eve owns session dispatch, streaming, typing, and human-in-the-loop. First-class channels such as [Slack](./slack) use their own channel APIs and can manage credentials through Vercel Connect or environment variables you configure directly.
9
9
 
10
10
  ## Install
11
11
 
@@ -99,22 +99,22 @@ bot.onNewMention(async (thread, message) => {
99
99
 
100
100
  `options` accepts `{ thread, auth?, title?, mode?, callback?, adapterName?, turnPolicy? }`. `title` sets the eve session's display title without changing the model message; `auth` attaches an authenticated principal to the turn.
101
101
 
102
- ### Experimental steering
102
+ ### Steering
103
103
 
104
- By default, a message sent while an eve turn is active waits for the next turn. Pass `turnPolicy: "experimental-steer"` to cancel the active turn before sending the new message:
104
+ Messages default to `turnPolicy: "steer"`: a message sent while an eve turn is active is durably buffered, then cancels that turn and starts as its replacement. Set `turnPolicy: "queue"` when the active turn should finish first:
105
105
 
106
106
  ```ts
107
107
  bot.onSubscribedMessage(async (thread, message) => {
108
108
  await send(message.text, {
109
109
  thread,
110
- turnPolicy: "experimental-steer",
110
+ turnPolicy: "queue",
111
111
  });
112
112
  });
113
113
  ```
114
114
 
115
- This is cancellation-backed steering: the interrupted turn emits `turn.cancelled`, and the replacement message starts a new turn with a new turn ID. Partial output and completed side effects from the interrupted turn are not rolled back. If no turn is active, the message is sent normally. Use the default `turnPolicy: "queue"` when every turn should finish in order.
115
+ Cancellation-backed steering emits `turn.cancelled`, and the replacement message starts a new turn with a new turn ID. Partial output and completed side effects from the interrupted turn are not rolled back. If no turn is active, the message is sent normally. You can set the policy once on `chatSdkChannel({ turnPolicy })` or override it per `send(...)`.
116
116
 
117
- This policy controls overlapping eve turns. Chat SDK's separate `concurrency` option controls overlapping webhook handlers; use `concurrency: "concurrent"` when each inbound message should reach the experimental steering path immediately.
117
+ This policy controls overlapping eve turns. Chat SDK's separate `concurrency` option controls overlapping webhook handlers; use `concurrency: "concurrent"` when each inbound message should reach the steering path immediately.
118
118
 
119
119
  ### Delivery
120
120
 
@@ -109,6 +109,26 @@ await session.reset({ reason: "Retire this session" });
109
109
  await session.getEventStream({ startIndex: 12 });
110
110
  ```
111
111
 
112
+ Message sends use the channel's `turnPolicy`, which defaults to `"steer"`. An accepted message arriving during an active turn is durably buffered before eve cancels that turn and starts the message as a replacement turn. Configure `turnPolicy: "queue"` on `defineChannel(...)` when active turns should finish in order, or override one send:
113
+
114
+ ```ts
115
+ export default defineChannel({
116
+ turnPolicy: "queue",
117
+ routes: [
118
+ POST("/messages", async (request, { from }) => {
119
+ const body = await request.json();
120
+ await from(body.threadId).send(body.message, {
121
+ auth: null,
122
+ turnPolicy: "steer",
123
+ });
124
+ return new Response(null, { status: 202 });
125
+ }),
126
+ ],
127
+ });
128
+ ```
129
+
130
+ The same override is available on fixed `Session.send(...)` and cross-channel `to(...).send(...)`. `respond(...)` never steers: it delivers only addressed input responses. Use `cancel()` when you need to stop work without a replacement message.
131
+
112
132
  Attaching does no lookup. The first operation reports whether the ID is active.
113
133
  Call `resolveSession(address)` only when you explicitly need to snapshot an
114
134
  address's current owner as a fixed handle.
@@ -16,6 +16,7 @@ pnpm eve add channel/discord
16
16
 
17
17
  The setup guides you through creating a Discord application and bot, then:
18
18
 
19
+ - signs you in to Vercel and creates or links a project when needed;
19
20
  - validates the bot token;
20
21
  - creates a Vercel Connect client and attaches `/eve/v1/discord` as its trigger destination;
21
22
  - registers an application command with a required `message` option;
@@ -56,6 +56,8 @@ curl -X POST https://<deployment>/eve/v1/session/wrun_A \
56
56
  -d '{"inputResponses":[{"requestId":"req_A","optionId":"approve"}]}'
57
57
  ```
58
58
 
59
+ Follow-up messages use `turnPolicy: "steer"` by default. If a turn is active, eve buffers the message before cooperatively cancelling that turn, then starts the follow-up as a replacement turn with a new turn ID. Set `turnPolicy: "queue"` on `eveChannel(...)` when follow-ups should wait for active turns to finish. `inputResponses` never steer.
60
+
59
61
  Sending a message to an unknown or terminal session ID returns `409` with
60
62
  `{"code":"session_not_active","error":"The session is no longer active.","ok":false}`.
61
63
  TypeScript clients expose the stable code as `ClientError.code`. The route never
@@ -14,7 +14,7 @@ Run the registry setup from the agent directory:
14
14
  eve add channel/github
15
15
  ```
16
16
 
17
- The flow checks that the Vercel CLI is authenticated, creates or links a Vercel project when needed, provisions an app-scoped GitHub Connect client, and replaces its default trigger with `/eve/v1/github`. It then installs `@vercel/connect` and writes `agent/channels/github.ts` with the connector UID.
17
+ The flow signs you in to Vercel when needed, creates or links a Vercel project, provisions an app-scoped GitHub Connect client, and registers `/eve/v1/github` as a trigger destination. It then installs `@vercel/connect` and writes `agent/channels/github.ts` with the connector UID.
18
18
 
19
19
  Vercel Connect creates the GitHub App, receives and verifies its webhooks, and forwards them to the deployed agent. After deploying, open the GitHub App in the Connect dashboard and install it in the organization or account where you want to use it. Add the generated invocation token (for example, `@my-agent`) to a new issue, pull request, or review comment to start a conversation. GitHub may not autocomplete the token or render it as a linked mention.
20
20
 
@@ -16,7 +16,7 @@ eve add linear
16
16
 
17
17
  Select **Linear Channel** in the component checklist. **Linear MCP** is also selected by default if you want the agent to search and update Linear through MCP. Run `eve add channel/linear-agent` instead to install only the channel directly.
18
18
 
19
- The flow checks that the Vercel CLI is authenticated, creates or links a Vercel project when needed, reuses a compatible existing connector when available or provisions an app-scoped Linear Connect client, and replaces its default trigger with `/eve/v1/linear`. It then installs `@vercel/connect` and writes `agent/channels/linear.ts` with the connector UID.
19
+ The flow signs you in to Vercel when needed, creates or links a Vercel project, reuses a compatible existing connector when available or provisions an app-scoped Linear Connect client, and registers `/eve/v1/linear` as a trigger destination. It then installs `@vercel/connect` and writes `agent/channels/linear.ts` with the connector UID.
20
20
 
21
21
  Vercel Connect creates the Linear app with the `app:assignable` and `app:mentionable` scopes required for Agent Sessions, receives and verifies `AgentSessionEvent` webhooks, and forwards them to the deployed agent. After deploying, open the Linear app in the Connect dashboard and install it in the workspace where you want to delegate work. Then delegate an issue or mention the agent in a Linear Agent Session.
22
22
 
@@ -13,6 +13,25 @@ eve ships a base HTTP channel plus first-class platform channels, and you can au
13
13
 
14
14
  After a channel normalizes input, eve runs the same agent runtime regardless of where the message came from. Tools and instructions do not need channel-specific logic.
15
15
 
16
+ ## Overlapping messages
17
+
18
+ Channels default to `turnPolicy: "steer"`. When an accepted message arrives while a turn is active, eve first durably buffers the message, then cooperatively cancels the active turn and starts a replacement turn. The cancelled turn emits `turn.cancelled` followed by `session.waiting`; the replacement starts with a new turn ID. Output already streamed and completed side effects are not rolled back.
19
+
20
+ Set `turnPolicy: "queue"` on any built-in or custom channel when each turn must finish before the next message starts:
21
+
22
+ ```ts
23
+ export default defineChannel({
24
+ turnPolicy: "queue",
25
+ routes: [
26
+ // ...
27
+ ],
28
+ });
29
+ ```
30
+
31
+ `from(address).send(...)`, fixed `Session.send(...)`, cross-channel sends, and Chat SDK bridge sends also accept a per-send `turnPolicy` override. Pure `inputResponses` deliveries answer their pending request without steering. Explicit `cancel()` remains the stop-without-replacement operation.
32
+
33
+ Channel admission still runs first. Ignored mentions, rejected signatures, duplicates, and any other dropped platform events never affect the active turn.
34
+
16
35
  Each channel has its own provider terms, data flow, auth model, and user-consent expectations. Before sending non-public, sensitive, regulated, or production data through a channel, confirm that the channel provider and your configured scopes, signature checks, route auth, and delivery behavior are appropriate for your use case.
17
36
 
18
37
  ## Where channels live
@@ -40,9 +59,9 @@ When eve doesn't ship a channel for your surface, build one with `defineChannel`
40
59
 
41
60
  ## Relationship to the Chat SDK
42
61
 
43
- eve uses the Chat SDK's **card-builder components** (Cards, Buttons, Actions, etc.) for composing rich Slack messages. When you build a card with the [Slack channel](./slack), the underlying primitives come from the Chat SDK and get converted to Slack Block Kit at post time.
62
+ eve uses the [Chat SDK's card-builder components](https://chat-sdk.dev/docs/api/cards) (Cards, Buttons, Actions, etc.) for composing rich Slack messages. When you build a card with the [Slack channel](./slack), the underlying primitives come from the Chat SDK and get converted to Slack Block Kit at post time.
44
63
 
45
- eve does **not** use the Chat SDK's runtime. The `Chat`, `Adapter`, and `Thread` primitives are never imported or reachable through eve's public API. eve implements its own channel layer (webhook handling, signature verification, event parsing, and thread management). Building Slack messages works like Chat SDK cards, but wiring a channel means authoring against eve's `defineChannel(...)` API, not a Chat SDK adapter.
64
+ eve's first-class channels use eve-owned runtimes for webhook handling, verification, event parsing, and thread management. The optional [Chat SDK channel](./chat-sdk) is the exception: it accepts a Chat SDK adapter and exposes its `Chat` and `Thread` primitives. Use `slackChannel` for eve's first-class Slack integration, `defineChannel(...)` for an eve-native custom channel, or `chatSdkChannel` when you intentionally want a Chat SDK adapter and runtime.
46
65
 
47
66
  ## Which channel?
48
67
 
@@ -7,8 +7,9 @@ Use `photonIMessageChannel` to receive and reply to iMessages through a Photon p
7
7
 
8
8
  Run `eve add channel/photon-imessage` to create or use a Photon project and register
9
9
  your phone number. It then asks whether to configure Vercel Connect or portable
10
- credentials. With Vercel Connect, eve creates the connector and configures
11
- Photon’s webhook through Connect. The channel resolves credentials lazily when
10
+ credentials. With Vercel Connect, eve signs you in and creates or links a Vercel
11
+ project when needed, then creates the connector and configures Photon’s webhook
12
+ through Connect. The channel resolves credentials lazily when
12
13
  the adapter first initializes:
13
14
 
14
15
  ```ts title="agent/channels/photon.ts"
@@ -26,6 +27,8 @@ read, and continues the same eve session for every message in an iMessage
26
27
  conversation. A new accepted message cooperatively cancels an active turn and
27
28
  steers its replacement turn.
28
29
 
30
+ Set `turnPolicy: "queue"` when every response should finish before Photon starts the next message.
31
+
29
32
  Customize inbound dispatch with `onMessage`. Return `null` to ignore a message:
30
33
 
31
34
  ```ts
@@ -1,31 +1,26 @@
1
1
  ---
2
2
  title: "Slack"
3
- description: "Reach your agent from Slack app mentions and DMs, with thread anchoring, buttons, and Vercel Connect credentials."
3
+ description: "Reach your agent from Slack app mentions and DMs with Vercel Connect-managed credentials, threaded replies, and interactive buttons."
4
4
  type: integration
5
5
  ---
6
6
 
7
- The Slack channel puts your agent inside a workspace. It answers `@mentions` and DMs, replies in threads, shows typing indicators, and turns human-in-the-loop (HITL) prompts into buttons. Use it when the conversation should happen where your team already works. Credentials run through [Vercel Connect](../guides/auth-and-route-protection), which handles both the outbound bot token and inbound webhook verification, so there's no `SLACK_BOT_TOKEN` or `SLACK_SIGNING_SECRET` for you to manage. See [Channels](./overview) for the contract this builds on.
7
+ The Slack channel puts your agent inside a workspace. It answers `@mentions` and DMs, replies in threads, shows typing indicators, and turns human-in-the-loop (HITL) prompts into buttons. [Vercel Connect](https://vercel.com/kb/guide/vercel-connect) is the recommended setup: it manages the Slack bot token, verifies inbound requests, supports token rotation and multiple workspace installations, and forwards events to your agent without copying Slack secrets into your project environment. If you cannot use Vercel Connect, you can provide the bot token and signing secret through environment variables. See [Channels](./overview) for the contract this builds on.
8
8
 
9
- ## Set up Connect
9
+ ## Add the channel
10
10
 
11
- Create a Slack Connect client and copy its UID (e.g. `slack/my-agent`), then attach this project as the trigger destination at eve's Slack route:
11
+ Run the guided setup from your agent project:
12
12
 
13
13
  ```bash
14
- npm install -g vercel@latest
15
- vercel connect create slack --triggers
16
- vercel connect detach <uid> --yes
17
- vercel connect attach <uid> --triggers --trigger-path /eve/v1/slack --yes
14
+ eve add channel/slack
18
15
  ```
19
16
 
20
- The `create` step provisions a destination at the default Connect path. `detach` then `attach --trigger-path /eve/v1/slack` re-points the trigger at the eve Slack route, since eve does not serve the default Connect path. `--triggers` turns on Slack Event Subscriptions; without it, Slack never delivers `app_mention` or `message.im`. You can also create the client from the [Connect dashboard](https://vercel.com/d?to=/%5Bteam%5D/~/connect&title=Go+to+Connect).
17
+ The command recommends Vercel Connect, then scaffolds `agent/channels/slack.ts` and installs any required dependency. Choose the environment-variable option only when you need to manage the Slack bot token and signing secret yourself.
21
18
 
22
- ## Add the channel
19
+ ### Recommended: use Vercel Connect
23
20
 
24
- Scaffold the channel and its dependency with `eve add channel/slack`, or set it up by hand:
21
+ Vercel Connect setup requires the Vercel CLI. The guided flow signs you in when needed, creates or links a Vercel project, creates or reuses a Slack connector, waits for you to install it in a workspace, and registers `/eve/v1/slack` as a trigger destination before writing the channel file.
25
22
 
26
- ```bash
27
- npm install @vercel/connect
28
- ```
23
+ The generated channel resolves credentials at runtime:
29
24
 
30
25
  ```ts title="agent/channels/slack.ts"
31
26
  import { connectSlackCredentials } from "@vercel/connect/eve";
@@ -38,17 +33,93 @@ export default slackChannel({
38
33
 
39
34
  `connectSlackCredentials` returns `{ botToken, webhookVerifier }`, keeping token rotation, multi-workspace tenancy, and request verification inside Connect rather than your code.
40
35
 
41
- If eve cannot find an authenticated Vercel session, `eve add channel/slack` asks whether to set up Vercel Connect or use portable environment credentials. The portable option adds the required names to `.env.example`. Before deploying, appropriate values must be supplied to your runtime environment.
36
+ ### Manage Slack credentials yourself
37
+
38
+ Use this fallback when the agent does not run on Vercel or Vercel Connect is unavailable. In the setup command, **Use portable credentials** is the environment-variable option; eve adds `SLACK_BOT_TOKEN` and `SLACK_SIGNING_SECRET` to `.env.example`.
39
+
40
+ This option does not create or install the Slack app. Configure it in [Slack app settings](https://api.slack.com/apps):
41
+
42
+ 1. Add the `app_mentions:read` and `chat:write` bot scopes. Add `im:history` for DMs, `files:read` for inbound attachments, and `files:write` when the agent uploads files.
43
+ 2. Install or reinstall the app, copy its Bot User OAuth Token to `SLACK_BOT_TOKEN`, and copy the signing secret from **Basic Information** to `SLACK_SIGNING_SECRET`.
44
+ 3. Set both values in `.env.local` for local development or in the target runtime's environment, then start or deploy the agent at a public URL.
45
+ 4. Under **Event Subscriptions**, set the Request URL to `https://your-agent.example/eve/v1/slack`. Subscribe to `app_mention`, plus `message.im` for DMs.
46
+ 5. Under **Interactivity & Shortcuts**, use the same Request URL when the agent uses buttons or HITL prompts.
47
+
48
+ Add the matching message events and history scopes if you also want unmentioned thread replies, as described in [Continue conversations without repeated mentions](#continue-conversations-without-repeated-mentions).
49
+
50
+ ## Deploy
51
+
52
+ Deploy the production agent after the trigger destination and channel file are ready:
53
+
54
+ ```bash
55
+ eve deploy
56
+ ```
57
+
58
+ `eve deploy` deploys the linked Vercel project to production. The guided flow registers the trigger destination against the production branch, which is the Vercel CLI default. Manage trigger destinations separately in the Connect dashboard when you need a different branch or environment.
42
59
 
43
- ### Deploy
60
+ ## Test a preview branch with Vercel Connect
44
61
 
45
- Deploy once the trigger destination and channel file are ready:
62
+ Use a separate connector when you want preview Slack traffic isolated from production, then register the preview branch as a trigger destination:
46
63
 
47
64
  ```bash
48
- VERCEL_USE_EXPERIMENTAL_FRAMEWORKS=1 vercel deploy --prod
65
+ npm install -g vercel@latest
66
+ vercel connect create slack --name your-agent-preview --triggers
67
+ vercel connect attach slack/your-agent-preview \
68
+ --environment preview \
69
+ --triggers \
70
+ --trigger-branch your-preview-branch \
71
+ --trigger-path /eve/v1/slack \
72
+ --yes
49
73
  ```
50
74
 
51
- `VERCEL_USE_EXPERIMENTAL_FRAMEWORKS=1` lets the Vercel CLI recognize eve as a framework during the build. eve's own setup commands set the same flag.
75
+ Run these commands from the linked project directory. `--environment preview` makes the connector credentials available to Preview deployments. `--trigger-branch` selects the branch that receives forwarded Slack webhooks.
76
+
77
+ Select the matching connector at runtime instead of leaving the generated production UID hard-coded:
78
+
79
+ ```ts title="agent/channels/slack.ts"
80
+ import { connectSlackCredentials } from "@vercel/connect/eve";
81
+ import { slackChannel } from "eve/channels/slack";
82
+
83
+ const connectorUid =
84
+ process.env.VERCEL_ENV === "preview" ? "slack/your-agent-preview" : "slack/my-agent";
85
+
86
+ export default slackChannel({
87
+ credentials: connectSlackCredentials(connectorUid),
88
+ });
89
+ ```
90
+
91
+ Creating a connector with triggers also registers a default production destination. Remove that destination from the Connect dashboard before treating the preview connector as isolated. The guided production setup does not restrict credential environments, so also set the production connector's project access to **Production** and the preview connector's access to **Preview** in the dashboard. `vercel connect detach` removes project token access, not trigger destinations. Vercel Connect supports up to three trigger destinations per connector; see the [Vercel Connect guide](https://vercel.com/kb/guide/vercel-connect) for current limits and environment guidance.
92
+
93
+ Slack must be able to reach the preview route without an interactive authentication challenge. For a Connect trigger, exempt the branch domain with a [Deployment Protection Exception](https://vercel.com/docs/deployment-protection/methods-to-bypass-deployment-protection/deployment-protection-exceptions) when that feature is available, or use an unprotected preview domain. For a Slack app that uses environment-variable credentials, append `?x-vercel-protection-bypass=your-generated-secret` to its event and interaction request URLs. Enabling [Protection Bypass for Automation](https://vercel.com/docs/deployment-protection/methods-to-bypass-deployment-protection/protection-bypass-automation) does not bypass a request unless the sender presents that secret.
94
+
95
+ ## Set up Vercel Connect manually
96
+
97
+ To set up the connector outside the guided flow, create it, then register eve's Slack route with the linked project:
98
+
99
+ ```bash
100
+ npm install -g vercel@latest
101
+ vercel connect create slack --name your-agent --triggers
102
+ vercel connect attach slack/your-agent \
103
+ --environment production \
104
+ --triggers \
105
+ --trigger-path /eve/v1/slack \
106
+ --yes
107
+ ```
108
+
109
+ `--triggers` enables Slack Event Subscriptions. The attach command registers eve's route in addition to the default destination created with the connector. Remove the default destination separately in the [Connect dashboard](https://vercel.com/d?to=/%5Bteam%5D/~/connect&title=Go+to+Connect). For an existing connector, skip `create` and attach the intended route directly.
110
+
111
+ ## Troubleshoot Slack delivery
112
+
113
+ Check the delivery path in order so you can identify where a Slack event stops:
114
+
115
+ | Symptom | Check | Next action |
116
+ | --------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
117
+ | `eve add channel/slack` stops before scaffolding the channel | Read the setup error for the failed Vercel login, project link, workspace install, connector lookup, or trigger registration step. | Resolve that step, then rerun `eve add channel/slack`. |
118
+ | Setup says it could not remove an existing trigger destination | Check the connector's destinations in the Connect dashboard. `vercel connect detach` removes project token access, not trigger destinations. | Edit or remove the stale destination in the dashboard, then register `/eve/v1/slack` with `vercel connect attach`. |
119
+ | Mentions never reach the deployment | Confirm that the connector trigger destination uses the intended project and branch, enables triggers, and points to `/eve/v1/slack`. | Edit or remove stale destinations in the Connect dashboard, then register the intended destination with `vercel connect attach`. |
120
+ | Mentions work but DMs or thread replies do not | Check the Slack app's Event Subscriptions and OAuth scopes. DMs require `message.im` and `im:history`; channel replies require the matching message event and history scope. | Add the missing events or scopes, then reinstall the Slack app if Slack requires it. |
121
+ | A preview request receives an authentication page or protection error | Check whether the branch domain is exempt or the direct Slack request URL includes `x-vercel-protection-bypass`. Slack cannot complete an interactive Vercel Authentication challenge. | Add a Deployment Protection Exception for the branch domain, or add the automation bypass query parameter to a Slack app that uses environment-variable credentials. |
122
+ | The webhook reaches the deployment but the agent does not reply | Open the project's Vercel runtime logs, then inspect the session in **Agent Runs** when your team has access. | Use the first missing or failed stage to narrow the issue to channel dispatch, the agent run, or outbound Slack delivery. |
52
123
 
53
124
  ## How the channel handles inbound events
54
125
 
@@ -71,6 +142,43 @@ Only the first available handler runs. A message hook returning `null` drops the
71
142
 
72
143
  `onInteraction(action, ctx)` separately handles `block_actions` callbacks not consumed by HITL. eve attaches the triggering Slack user id to the same model message as its text, preserving speaker attribution without profile lookups.
73
144
 
145
+ #### Restrict who can invoke the agent
146
+
147
+ A valid Slack signature proves that Slack sent the event. It does not decide which channel or person your agent should trust. Fail closed in the inbound handler before returning auth, especially when the app is installed in a shared Slack Connect channel:
148
+
149
+ ```ts title="agent/channels/slack.ts"
150
+ import { connectSlackCredentials } from "@vercel/connect/eve";
151
+ import { defaultSlackAuth, slackChannel, type SlackMessage } from "eve/channels/slack";
152
+
153
+ const allowedChannels = new Set(["C01234567"]);
154
+ const allowedUsers = new Set(["U01234567"]);
155
+
156
+ function isAllowedUser(message: SlackMessage) {
157
+ const userId = message.author?.userId;
158
+ return Boolean(userId && allowedUsers.has(userId));
159
+ }
160
+
161
+ export default slackChannel({
162
+ credentials: connectSlackCredentials("slack/my-agent"),
163
+ onAppMention(ctx, message) {
164
+ if (!isAllowedUser(message) || !allowedChannels.has(message.channelId)) {
165
+ return null;
166
+ }
167
+ return { auth: defaultSlackAuth(message, ctx) };
168
+ },
169
+ onDirectMessage(ctx, message) {
170
+ if (!isAllowedUser(message)) return null;
171
+ return { auth: defaultSlackAuth(message, ctx) };
172
+ },
173
+ });
174
+ ```
175
+
176
+ Override every enabled inbound handler; leaving `onDirectMessage` out would retain eve's default DM behavior. Slack Connect can deliver events from external users, so authorize the explicit user and current channel IDs your policy expects. If access depends on organization membership, resolve it from Slack's shared-channel and user data instead of inferring it from the request signature.
177
+
178
+ Keep authorization checks inside sensitive tools too. The inbound allowlist controls who can start a turn; tool-level checks control what that authenticated Slack principal may read or change.
179
+
180
+ The allowlist above gates message-started turns. Built-in HITL buttons are handled before `onInteraction`, and the person who clicks supplies the Slack auth for the resumed session. Anyone who can interact with the Slack message can answer it. Put sensitive prompts in channels limited to the intended approvers, and re-check `ctx.session.auth.current` inside a sensitive tool before performing its side effect.
181
+
74
182
  #### Continue conversations without repeated mentions
75
183
 
76
184
  Use `onMessage` to handle explicit mentions and continue replies in threads with an active eve session:
@@ -106,24 +214,40 @@ async onMessage(ctx, message) {
106
214
 
107
215
  Like `threadContext`, this helper calls `conversations.replies` and requires the matching Slack history scope. It observes at most the first 50 messages of the thread, and a failed fetch is logged and swallowed, so the returned list may be empty or stale — treat an unexpected empty list as "don't route" rather than "no participants".
108
216
 
109
- #### Cancel an active turn
217
+ #### Load prior thread messages
110
218
 
111
- Message hooks (`onMessage`, `onAppMention`, and `onDirectMessage`) receive thread-bound session operations directly on `ctx`. Call `ctx.cancel({ turnId? })` before returning `{ auth }` to stop the current turn and queue the new Slack message as replacement input, producing a debounce-like experience:
219
+ You get the triggering mention by default, but not the earlier replies in the thread. Enable `threadContext` to fetch and inject them with every message attributed by stable Slack user id. Use `since: "last-agent-reply"` so repeated mentions inject only what is new:
220
+
221
+ ```ts
222
+ import { slackChannel } from "eve/channels/slack";
223
+ import { connectSlackCredentials } from "@vercel/connect/eve";
112
224
 
113
- ```ts title="agent/channels/slack.ts"
114
225
  export default slackChannel({
115
226
  credentials: connectSlackCredentials("slack/my-agent"),
116
- async onMessage(ctx, message) {
117
- const shouldHandle = ctx.isBotMentioned() || (await ctx.isSubscribed());
118
- if (!shouldHandle || message.author?.isBot) return null;
227
+ threadContext: { since: "last-agent-reply" },
228
+ });
229
+ ```
119
230
 
120
- await ctx.cancel();
121
- return { auth: null };
122
- },
231
+ `since` sets the boundary for what each mention injects and accepts three values:
232
+
233
+ - `"thread-root"` (the default): every prior message in the thread, on every mention. `threadContext: {}` behaves the same.
234
+ - `"last-agent-reply"`: only messages after this installed agent's last reply, keeping repeated mentions incremental. Replies from other Slack bots do not move the boundary.
235
+ - A predicate `(message: SlackThreadMessage) => boolean`: only messages after the last one it matches, such as "since the last message that mentioned a particular user".
236
+
237
+ `threadContext` requires the matching Slack history scope. Thread helpers reuse messages already loaded within the same inbound handler, and overlapping refreshes share one `conversations.replies` request. Omit it when the agent should see only direct mentions. `loadThreadContextMessages` remains available when you need custom filtering or non-model processing of the raw thread messages.
238
+
239
+ #### Control overlapping turns
240
+
241
+ Accepted Slack messages use cancellation-backed steering by default: eve buffers the new message, cancels the active turn, and starts a replacement turn. Admission happens first, so ignored mentions and messages rejected by your hooks never cancel work. Set `turnPolicy: "queue"` when every active turn should finish:
242
+
243
+ ```ts title="agent/channels/slack.ts"
244
+ export default slackChannel({
245
+ credentials: connectSlackCredentials("slack/my-agent"),
246
+ turnPolicy: "queue",
123
247
  });
124
248
  ```
125
249
 
126
- `"accepted"` means the live thread session durably queued the cancellation request. A parked session consumes it as a no-op; `"no_active_turn"` means the thread has no active session owner. Both are successful outcomes, so the hook can still return `{ auth }` to deliver the replacement message. Cancellation never sends input itself. A custom `onInteraction` handler receives the same flat operations, which is useful for a Stop button that should cancel without replacement input.
250
+ Message hooks (`onMessage`, `onAppMention`, and `onDirectMessage`) also receive thread-bound session operations directly on `ctx`. `ctx.cancel({ turnId? })` remains useful for a Stop button: it cancels without sending replacement input. `"accepted"` means the live thread session durably queued that request; a parked session consumes it as a no-op, and `"no_active_turn"` means the thread has no active session owner.
127
251
 
128
252
  Message and interaction hooks expose every current-owner operation directly on `ctx`:
129
253
 
@@ -211,26 +335,6 @@ const session = await ctx.resolveSession({ target });
211
335
 
212
336
  `onEvent` covers JSON `event_callback` deliveries only. URL verification, slash commands, and interactive payloads do not reach it. Add every desired event and required OAuth scope to the Slack app's Event Subscriptions configuration; eve can only handle events Slack sends.
213
337
 
214
- You get the triggering mention by default, but not the earlier replies in the thread. Enable `threadContext` to fetch and inject them with every message attributed by stable Slack user id. Use `since: "last-agent-reply"` so repeated mentions inject only what is new:
215
-
216
- ```ts
217
- import { slackChannel } from "eve/channels/slack";
218
- import { connectSlackCredentials } from "@vercel/connect/eve";
219
-
220
- export default slackChannel({
221
- credentials: connectSlackCredentials("slack/my-agent"),
222
- threadContext: { since: "last-agent-reply" },
223
- });
224
- ```
225
-
226
- `since` sets the boundary for what each mention injects and accepts three values:
227
-
228
- - `"thread-root"` (the default): every prior message in the thread, on every mention. `threadContext: {}` behaves the same.
229
- - `"last-agent-reply"`: only messages after this installed agent's last reply, keeping repeated mentions incremental. Replies from other Slack bots do not move the boundary.
230
- - A predicate `(message: SlackThreadMessage) => boolean`: only messages after the last one it matches, such as "since the last message that mentioned a particular user".
231
-
232
- `threadContext` requires the matching Slack history scope. Thread helpers reuse messages already loaded within the same inbound handler, and overlapping refreshes share one `conversations.replies` request. Omit it when the agent should see only direct mentions. `loadThreadContextMessages` remains available when you need custom filtering or non-model processing of the raw thread messages.
233
-
234
338
  ### Slack API calls outside a handler
235
339
 
236
340
  Inside webhook-side handlers (`onAppMention`, `onEvent`, `onInteraction`, `events`),
@@ -240,7 +344,7 @@ messages, for example, has no inbound Slack request. For that, call the
240
344
  same primitive the handle uses directly:
241
345
 
242
346
  ```ts
243
- import { callSlackApi, resolveSlackBotToken } from "eve/channels/slack";
347
+ import { callSlackApi } from "eve/channels/slack";
244
348
  import { connectSlackCredentials } from "@vercel/connect/eve";
245
349
 
246
350
  const { botToken } = connectSlackCredentials("slack/my-agent");
@@ -309,6 +413,10 @@ Start a session without an inbound message through `ctx.to(slack, target).send(m
309
413
 
310
414
  Inbound files behind authenticated Slack URLs are staged with `fetchFile`. See [File uploads](./custom#file-uploads) for the `fetchFile` contract.
311
415
 
416
+ Private file downloads require the Slack bot token's `files:read` scope. Add the scope and reinstall the Slack app before sending attachments.
417
+
418
+ Staged files live in the session sandbox under `/workspace/attachments`. Session history keeps a reference to that path, not a second copy of the Slack file. If the backend can no longer reattach the original sandbox, eve cannot restore the attachment bytes from history; later turns receive a missing-file result. Store files outside the sandbox when the agent must retain them independently of sandbox availability.
419
+
312
420
  ## What to read next
313
421
 
314
422
  - [Channels overview](./overview): the channel contract and every built-in channel
@@ -60,7 +60,7 @@ Notes:
60
60
  - **`agent`** is available only in the root session. Its child uses the root's instructions, tools, connections, and sandbox, but starts with fresh conversation history and fresh [state](../guides/state). The child receives neither `agent` nor `Workflow`; declared subagents do not receive the built-in `agent` either. See [Subagents](../subagents).
61
61
  - **`load_skill`** only pulls instructions into context. It adds no new execution surface, because behavior still comes from the tools the agent already has.
62
62
  - **`connection_search`** surfaces a connection's tools by their qualified name (e.g. `linear__list_issues`), which the model can then call directly. It's registered only when the agent has connections.
63
- - **`web_search`** has no local executor; the provider runs it. AI Gateway models use Parallel by default. To use Exa instead, export `webSearch({ provider: "exa" })` from `agent/tools/web_search.ts`. Direct provider models continue to use their native search implementation. To supply your own implementation, override it with `defineTool()`.
63
+ - **`web_search`** has no local executor; the provider runs it. AI Gateway models use Exa by default. To use Parallel instead, export `webSearch({ provider: "parallel" })` from `agent/tools/web_search.ts`. Direct provider models continue to use their native search implementation. To supply your own implementation, override it with `defineTool()`.
64
64
 
65
65
  Review these built-in tools before production use. Disable, wrap, restrict, or require approval for any tool that can access the filesystem, network, shell, or sensitive data.
66
66
 
@@ -88,10 +88,10 @@ Provider-managed web search has a dedicated configuration helper instead of an e
88
88
  ```ts title="agent/tools/web_search.ts"
89
89
  import { webSearch } from "eve/tools";
90
90
 
91
- export default webSearch({ provider: "exa" });
91
+ export default webSearch({ provider: "parallel" });
92
92
  ```
93
93
 
94
- Set `provider` to `"parallel"` or `"exa"`. Without this file, AI Gateway models use Parallel.
94
+ Set `provider` to `"exa"` or `"parallel"`. Without this file, AI Gateway models use Exa.
95
95
 
96
96
  ## Disable a default
97
97
 
@@ -66,7 +66,7 @@ You don't write workflow code directly. Workflow primitives (`start()`, `resumeH
66
66
 
67
67
  Some work has to wait, including a human approving a [tool](../tools), an interactive OAuth sign-in for a [connection](../connections), or a long-running [subagent](../subagents). At those points the turn parks durably. The workflow suspends and holds no compute until the input it's waiting on arrives (a click, a callback, a child completing), even if that's much later. When it does, the conversation picks up exactly where it left off.
68
68
 
69
- ## Message delivery and queueing
69
+ ## Message delivery and steering
70
70
 
71
71
  eve does not maintain a durable FIFO queue of user messages for a session. An
72
72
  ID-addressed HTTP delivery and a channel-address delivery both target the
@@ -79,14 +79,11 @@ channel alias. Rekeying replaces only that channel alias. An HTTP-created
79
79
  session has the stable ID alias and no channel continuation token. Competing
80
80
  channel input is not forwarded to the owner.
81
81
 
82
- When a session is waiting, a delivery through its ID or current channel address
83
- wakes the session and starts the next turn. When a turn is already active, the
84
- inbox may accept additional deliveries, but the runtime only drains them at
85
- specific workflow boundaries. If more than one delivery is ready when the driver
86
- checks, eve may fold them into the next turn; that drain is best-effort and
87
- depends on workflow and transport timing.
82
+ When a session is waiting, a delivery through its ID or current channel address wakes it and starts the next turn. Message sends default to `turnPolicy: "steer"`: while a turn is active, the session driver durably buffers the replacement before requesting cooperative cancellation. The interrupted turn emits `turn.cancelled` followed by `session.waiting`, then the replacement starts with a new turn ID. Partial output and completed side effects are not rolled back.
88
83
 
89
- So don't rely on concurrent sends to the same session behaving like a typical ordered chat queue. For deterministic behavior, send one user turn at a time and wait for `session.waiting` before sending the next message to the same session. If your channel can receive bursts while the agent is working, keep your own per-session queue in the channel or app layer, then deliver the next message after the session parks again. Separate sessions still run independently.
84
+ `turnPolicy: "queue"` preserves the message until the active turn settles. If several deliveries are ready when the driver checks, eve may fold adjacent messages into the next turn while preserving their arrival order. Pure `inputResponses` deliveries do not steer; they remain available to the pending request they address.
85
+
86
+ Every built-in and custom channel accepts a default `turnPolicy`, and imperative message sends can override it. The policy is part of the same durable delivery command as the message, so concurrent senders cannot separate replacement ownership from cancellation intent. Separate sessions still run independently.
90
87
 
91
88
  ## Subagents
92
89