eve 0.86.0 → 0.87.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (261) hide show
  1. package/CHANGELOG.md +67 -0
  2. package/README.md +1 -1
  3. package/dist/src/acp/adapter.d.ts +2 -26
  4. package/dist/src/acp/adapter.js +1 -1
  5. package/dist/src/acp/server.d.ts +0 -3
  6. package/dist/src/ai/decision-adapter.d.ts +5 -3
  7. package/dist/src/ai/decision-adapter.js +1 -1
  8. package/dist/src/ai/decision-types.d.ts +4 -3
  9. package/dist/src/channel/adapter.d.ts +0 -14
  10. package/dist/src/channel/auth/definitions.d.ts +0 -4
  11. package/dist/src/channel/channel-address.d.ts +1 -1
  12. package/dist/src/channel/channel-address.js +1 -1
  13. package/dist/src/channel/channel-operations.d.ts +2 -2
  14. package/dist/src/channel/channel-operations.js +1 -1
  15. package/dist/src/channel/prompt-queue.d.ts +0 -2
  16. package/dist/src/channel/session-not-active-error.d.ts +10 -5
  17. package/dist/src/channel/session-not-active-error.js +1 -1
  18. package/dist/src/channel/session-stranded-error.d.ts +1 -1
  19. package/dist/src/channel/session.d.ts +3 -4
  20. package/dist/src/channel/session.js +1 -1
  21. package/dist/src/channel/types.d.ts +5 -14
  22. package/dist/src/chunks/{use-eve-agent-B2jCfcnG.js → use-eve-agent-BExXjBv6.js} +82 -72
  23. package/dist/src/chunks/{use-eve-agent-DCLFi26P.js → use-eve-agent-C0KHCyb9.js} +82 -72
  24. package/dist/src/cli/dev/command-options.d.ts +4 -4
  25. package/dist/src/cli/dev/command.js +1 -1
  26. package/dist/src/cli/dev/tui/runner.js +1 -1
  27. package/dist/src/cli/dev/tui/test/fake-eve-server.js +1 -1
  28. package/dist/src/cli/dev/tui/tool-format.d.ts +2 -2
  29. package/dist/src/cli/dev/ui-options.d.ts +4 -4
  30. package/dist/src/cli/dev/ui-options.js +1 -1
  31. package/dist/src/client/agent-info-error.d.ts +4 -1
  32. package/dist/src/client/agent-info-error.js +1 -1
  33. package/dist/src/client/agent-session.d.ts +1 -4
  34. package/dist/src/client/agent-session.js +1 -1
  35. package/dist/src/client/agent-stream-follower.js +1 -1
  36. package/dist/src/client/client-error.d.ts +13 -4
  37. package/dist/src/client/client-error.js +1 -1
  38. package/dist/src/client/delivery.d.ts +2 -17
  39. package/dist/src/client/health-response-error.d.ts +4 -1
  40. package/dist/src/client/health-response-error.js +1 -1
  41. package/dist/src/client/index.d.ts +5 -3
  42. package/dist/src/client/index.js +1 -1
  43. package/dist/src/client/open-stream.d.ts +7 -12
  44. package/dist/src/client/open-stream.js +1 -1
  45. package/dist/src/client/session-controls.d.ts +2 -2
  46. package/dist/src/client/session-controls.js +1 -1
  47. package/dist/src/client/session-event-stream.d.ts +2 -2
  48. package/dist/src/client/session-event-stream.js +1 -1
  49. package/dist/src/client/session-store.d.ts +2 -6
  50. package/dist/src/client/session-store.js +1 -1
  51. package/dist/src/client/session.d.ts +4 -13
  52. package/dist/src/client/session.js +1 -1
  53. package/dist/src/client/sessions.d.ts +3 -6
  54. package/dist/src/client/types.d.ts +23 -32
  55. package/dist/src/compiled/.vendor-stamp.json +3 -3
  56. package/dist/src/compiled/@vercel/agent-runs/LICENSE +202 -0
  57. package/dist/src/compiler/manifest.js +1 -1
  58. package/dist/src/compiler/normalize-agent-config.js +1 -1
  59. package/dist/src/compiler/normalize-connection.d.ts +1 -1
  60. package/dist/src/compiler/normalize-connection.js +1 -1
  61. package/dist/src/compiler/normalize-instructions.js +1 -1
  62. package/dist/src/compiler/normalize-skill.js +1 -1
  63. package/dist/src/compiler/resolve-workspace-subagent.js +1 -1
  64. package/dist/src/context/memory-tools.d.ts +9 -5
  65. package/dist/src/discover/sandbox.js +1 -1
  66. package/dist/src/dynamic/definition.d.ts +11 -5
  67. package/dist/src/dynamic/definition.js +1 -1
  68. package/dist/src/evals/mock-model.d.ts +1 -1
  69. package/dist/src/evals/session-manager.d.ts +0 -2
  70. package/dist/src/evals/session.d.ts +1 -11
  71. package/dist/src/evals/session.js +1 -1
  72. package/dist/src/eve-channel/index.js +1 -1
  73. package/dist/src/eve-channel/support.js +1 -1
  74. package/dist/src/execution/dynamic-workflow/tool.js +1 -1
  75. package/dist/src/execution/effective-agent-config.js +1 -1
  76. package/dist/src/execution/sandbox/bindings/just-bash-runtime.d.ts +1 -2
  77. package/dist/src/execution/sandbox/bindings/just-bash-runtime.js +1 -1
  78. package/dist/src/execution/sandbox/bindings/just-bash.js +1 -1
  79. package/dist/src/execution/tools/agent-router-workflow.js +1 -1
  80. package/dist/src/instrumentation/ai-sdk-telemetry.d.ts +0 -2
  81. package/dist/src/instrumentation/providers.d.ts +1 -38
  82. package/dist/src/instrumentation/providers.js +1 -1
  83. package/dist/src/instrumentation/setup-context.d.ts +1 -7
  84. package/dist/src/internal/application/package.d.ts +1 -0
  85. package/dist/src/internal/application/package.js +1 -1
  86. package/dist/src/internal/application/stamped-package-version.js +1 -1
  87. package/dist/src/internal/authored-definition/core.js +1 -1
  88. package/dist/src/internal/authored-definition/schema-backed.js +1 -1
  89. package/dist/src/internal/classify-model-routing.d.ts +2 -3
  90. package/dist/src/internal/nitro/host/create-application-nitro.js +1 -1
  91. package/dist/src/internal/runtime-model.d.ts +9 -4
  92. package/dist/src/internal/runtime-model.js +1 -1
  93. package/dist/src/internal/workflow-bundle/authored-workflow-directives.js +1 -1
  94. package/dist/src/internal/workflow-bundle/builder-support.d.ts +1 -1
  95. package/dist/src/internal/workflow-bundle/builder-support.js +1 -1
  96. package/dist/src/internal/workflow-bundle/workflow-transformer.js +1 -1
  97. package/dist/src/models/auto.js +1 -1
  98. package/dist/src/protocol/delivery.d.ts +1 -0
  99. package/dist/src/protocol/reset-session.d.ts +0 -2
  100. package/dist/src/protocol/routes.d.ts +9 -2
  101. package/dist/src/protocol/routes.js +1 -1
  102. package/dist/src/public/channels/chat-sdk/chatSdkChannel.d.ts +1 -22
  103. package/dist/src/public/channels/discord/discordChannel.d.ts +3 -12
  104. package/dist/src/public/channels/discord/gateway/{index.d.ts → relay.d.ts} +2 -2
  105. package/dist/src/public/channels/discord/gateway/relay.js +1 -0
  106. package/dist/src/public/channels/discord/messages.d.ts +4 -4
  107. package/dist/src/public/channels/github/state.d.ts +0 -2
  108. package/dist/src/public/channels/index.d.ts +1 -2
  109. package/dist/src/public/channels/index.js +1 -1
  110. package/dist/src/public/channels/linear/index.d.ts +1 -1
  111. package/dist/src/public/channels/linear/index.js +1 -1
  112. package/dist/src/public/channels/linear/linearChannel.d.ts +0 -5
  113. package/dist/src/public/channels/linq/index.d.ts +1 -1
  114. package/dist/src/public/channels/linq/linqChannel.d.ts +7 -5
  115. package/dist/src/public/channels/photon/index.d.ts +1 -1
  116. package/dist/src/public/channels/photon/photonIMessageChannel.d.ts +15 -4
  117. package/dist/src/public/channels/slack/api.d.ts +1 -1
  118. package/dist/src/public/channels/slack/api.js +1 -1
  119. package/dist/src/public/channels/slack/blocks.d.ts +1 -1
  120. package/dist/src/public/channels/slack/blocks.js +2 -2
  121. package/dist/src/public/channels/slack/cards.d.ts +2 -297
  122. package/dist/src/public/channels/slack/cards.js +1 -1
  123. package/dist/src/public/channels/slack/index.d.ts +2 -2
  124. package/dist/src/public/channels/slack/index.js +1 -1
  125. package/dist/src/public/channels/slack/session-operations.d.ts +2 -2
  126. package/dist/src/public/channels/slack/session-operations.js +1 -1
  127. package/dist/src/public/channels/slack/slackChannel.d.ts +11 -72
  128. package/dist/src/public/channels/slack/slackChannel.js +1 -1
  129. package/dist/src/public/channels/teams/teamsChannel.d.ts +4 -3
  130. package/dist/src/public/channels/telegram/hitl.d.ts +2 -9
  131. package/dist/src/public/channels/telegram/index.d.ts +1 -1
  132. package/dist/src/public/channels/telegram/telegramChannel.d.ts +0 -2
  133. package/dist/src/public/channels/twilio/twilioChannel.d.ts +0 -2
  134. package/dist/src/public/channels/undelivered-reply.d.ts +0 -5
  135. package/dist/src/public/definitions/agent.d.ts +15 -7
  136. package/dist/src/public/definitions/agent.js +1 -1
  137. package/dist/src/public/definitions/channel.d.ts +7 -5
  138. package/dist/src/public/definitions/channel.js +1 -1
  139. package/dist/src/public/definitions/connections/protocol.d.ts +1 -7
  140. package/dist/src/public/definitions/connections/protocol.js +1 -1
  141. package/dist/src/public/experimental/channels/discord/gateway.d.ts +1 -0
  142. package/dist/src/public/experimental/channels/discord/gateway.js +1 -0
  143. package/dist/src/public/experimental/sandbox/just-bash.d.ts +1 -0
  144. package/dist/src/public/experimental/sandbox/just-bash.js +1 -0
  145. package/dist/src/public/experimental/workspace/index.d.ts +1 -0
  146. package/dist/src/public/experimental/workspace/index.js +1 -0
  147. package/dist/src/public/index.d.ts +2 -2
  148. package/dist/src/public/index.js +1 -1
  149. package/dist/src/public/instrumentation/otel.d.ts +1 -1
  150. package/dist/src/public/instrumentation/provider.d.ts +1 -1
  151. package/dist/src/public/instrumentation/provider.js +1 -1
  152. package/dist/src/public/memory/file/backend.d.ts +1 -1
  153. package/dist/src/public/memory/file/backends/in-memory.js +1 -1
  154. package/dist/src/public/memory/file/backends/vercel-blob.js +1 -1
  155. package/dist/src/public/memory/file/provider.js +1 -1
  156. package/dist/src/public/memory/index.d.ts +3 -11
  157. package/dist/src/public/models/anthropic/index.d.ts +1 -1
  158. package/dist/src/public/models/index.d.ts +1 -0
  159. package/dist/src/public/models/openai/index.d.ts +2 -2
  160. package/dist/src/public/next/index.d.ts +2 -2
  161. package/dist/src/public/sandbox/just-bash-sandbox.d.ts +27 -20
  162. package/dist/src/public/sandbox/just-bash.d.ts +0 -1
  163. package/dist/src/public/sessions/index.d.ts +1 -0
  164. package/dist/src/public/sessions/index.js +1 -1
  165. package/dist/src/public/tools/index.d.ts +1 -1
  166. package/dist/src/public/tools/index.js +1 -1
  167. package/dist/src/public/workflow/api.d.ts +25 -0
  168. package/dist/src/public/workflow/api.js +1 -0
  169. package/dist/src/public/workflow/index.d.ts +76 -0
  170. package/dist/src/public/workflow/index.js +1 -0
  171. package/dist/src/public/workflow-modules.d.ts +2 -17
  172. package/dist/src/react/use-eve-agent.d.ts +3 -2
  173. package/dist/src/react/use-eve-agent.js +1 -1
  174. package/dist/src/reactions/kinds/model.js +1 -1
  175. package/dist/src/runtime/agent/resolve-model.js +1 -1
  176. package/dist/src/runtime/resolve-agent.js +1 -1
  177. package/dist/src/runtime/resolve-dynamic.js +1 -1
  178. package/dist/src/runtime/subagents/dynamic-agent-config.js +1 -1
  179. package/dist/src/runtime/subagents/workflow.js +1 -1
  180. package/dist/src/sandbox/providers/default.js +1 -1
  181. package/dist/src/self-modification/extension/subagents/agent/agent.d.ts +2 -2
  182. package/dist/src/self-modification/sandbox.js +1 -1
  183. package/dist/src/setup/integrations/discord/daemon.js +2 -2
  184. package/dist/src/setup/scaffold/create/project.js +2 -2
  185. package/dist/src/setup/scaffold/create/web-template.d.ts +2 -2
  186. package/dist/src/setup/scaffold/create/web-template.js +2 -2
  187. package/dist/src/setup/verified-remote-agent.d.ts +1 -3
  188. package/dist/src/shared/agent-definition.d.ts +18 -9
  189. package/dist/src/shared/eve-error.d.ts +22 -0
  190. package/dist/src/shared/eve-error.js +1 -0
  191. package/dist/src/shared/session.d.ts +2 -2
  192. package/dist/src/shared/token-usage.d.ts +7 -1
  193. package/dist/src/svelte/index.js +1 -1
  194. package/dist/src/svelte/use-eve-agent.d.ts +2 -1
  195. package/dist/src/svelte/use-eve-agent.js +1 -1
  196. package/dist/src/tools/definition.d.ts +7 -5
  197. package/dist/src/tools/definition.js +1 -1
  198. package/dist/src/tools/provided/ask-question-workflow.js +1 -1
  199. package/dist/src/tools/provided/sleep-workflow.js +1 -1
  200. package/dist/src/tracing/eve/batch-span-processor.d.ts +1 -1
  201. package/dist/src/tracing/eve/content-span-processor.d.ts +1 -19
  202. package/dist/src/tracing/eve/otel-configuration.d.ts +6 -0
  203. package/dist/src/tracing/eve/otel-declaration.d.ts +6 -19
  204. package/dist/src/tracing/eve/span-export-policy.d.ts +0 -2
  205. package/dist/src/tracing/local/instrumentation-runtime.d.ts +0 -3
  206. package/dist/src/tracing/local/traces.d.ts +0 -13
  207. package/dist/src/vue/index.js +1 -1
  208. package/dist/src/vue/use-eve-agent.d.ts +3 -2
  209. package/dist/src/vue/use-eve-agent.js +1 -1
  210. package/docs/agent-config.md +15 -11
  211. package/docs/channels/custom.mdx +26 -10
  212. package/docs/channels/discord.mdx +10 -10
  213. package/docs/channels/eve.mdx +14 -8
  214. package/docs/channels/linear.mdx +11 -0
  215. package/docs/channels/linq.mdx +5 -1
  216. package/docs/channels/photon.mdx +6 -1
  217. package/docs/channels/slack.mdx +73 -14
  218. package/docs/channels/telegram.mdx +6 -0
  219. package/docs/code-extension.mdx +25 -0
  220. package/docs/concepts/default-harness.md +2 -2
  221. package/docs/concepts/execution-model-and-durability.mdx +11 -11
  222. package/docs/concepts/security-model.md +2 -2
  223. package/docs/concepts/sessions-runs-and-streaming.md +23 -10
  224. package/docs/concepts/upgrade-to-v27-events.md +2 -1
  225. package/docs/connections/overview.mdx +4 -0
  226. package/docs/evals/reporters.mdx +21 -0
  227. package/docs/extensions.md +12 -0
  228. package/docs/getting-started.mdx +5 -1
  229. package/docs/guides/auth-and-route-protection.md +1 -1
  230. package/docs/guides/client/continuations.mdx +12 -10
  231. package/docs/guides/client/messages.mdx +24 -1
  232. package/docs/guides/client/overview.mdx +8 -6
  233. package/docs/guides/client/streaming.mdx +24 -6
  234. package/docs/guides/decide.md +3 -3
  235. package/docs/guides/deployment/vercel.mdx +1 -1
  236. package/docs/guides/dev-tui.md +2 -2
  237. package/docs/guides/frontend/overview.mdx +1 -1
  238. package/docs/guides/frontend/use-eve-agent-svelte.mdx +13 -11
  239. package/docs/guides/frontend/use-eve-agent-vue.mdx +13 -11
  240. package/docs/guides/frontend/use-eve-agent.mdx +4 -4
  241. package/docs/guides/instrumentation/otel.mdx +3 -1
  242. package/docs/guides/prepare-for-1-0.md +255 -0
  243. package/docs/guides/remote-agents.md +22 -20
  244. package/docs/instructions.mdx +1 -1
  245. package/docs/memory/custom-provider.md +1 -1
  246. package/docs/memory/file.md +11 -2
  247. package/docs/meta.json +1 -0
  248. package/docs/reference/agent-files.md +17 -17
  249. package/docs/reference/cli.md +14 -9
  250. package/docs/reference/typescript-api.md +46 -20
  251. package/docs/sandbox/custom-providers.mdx +2 -0
  252. package/docs/sandbox/default.mdx +6 -6
  253. package/docs/sandbox/index.mdx +5 -5
  254. package/docs/sandbox/just-bash.mdx +30 -21
  255. package/docs/subagents/index.mdx +4 -4
  256. package/docs/tools/human-in-the-loop.md +1 -1
  257. package/docs/tools/workflows.mdx +52 -8
  258. package/docs/tutorial/first-agent.mdx +1 -1
  259. package/package.json +36 -9
  260. package/dist/CHANGELOG.md +0 -38
  261. package/dist/src/public/channels/discord/gateway/index.js +0 -1
@@ -12,7 +12,7 @@ import type { TokenResult } from "#shared/connection-types.js";
12
12
  import type { ToolAuthOptions, ToolAuthProvider } from "#tools/auth.js";
13
13
  import type { InteractionRequest } from "#protocol/session-events/families/interaction.js";
14
14
  import type { ToolModelOutput } from "#tools/model-output.js";
15
- type ApprovalContextInput<TInput> = unknown extends TInput ? Record<string, unknown> : TInput;
15
+ type ApprovalContextInput<TInput> = 0 extends 1 & TInput ? TInput : unknown extends TInput ? Record<string, unknown> : TInput;
16
16
  export type { ToolAuthDefinition, ToolAuthOptions, ToolAuthProvider } from "#tools/auth.js";
17
17
  export type { ToolModelOutput, ToolModelOutputPart } from "#tools/model-output.js";
18
18
  export type ToolExecuteOptions = Omit<ToolExecutionOptions<unknown>, "context"> & {
@@ -330,17 +330,19 @@ export declare function stampToolDefinition<T extends {
330
330
  readonly toModelOutput?: (...args: never[]) => unknown;
331
331
  }>(definition: T, definer: "defineTool" | "defineWorkflowTool"): T;
332
332
  /**
333
- * Marker discriminator written into every {@link DisabledToolSentinel}.
333
+ * Cross-instance brand on a {@link DisabledToolSentinel}. `Symbol.for` lets the compiler's module
334
+ * copy and the author's import share the key; keeping it unexported makes the sentinel opaque, so
335
+ * only {@link disableTool} produces one.
334
336
  */
335
- declare const DISABLED_TOOL_SENTINEL_KIND = "eve:disabled-tool";
337
+ declare const DISABLED_TOOL: unique symbol;
336
338
  /**
337
- * Marker value returned from {@link disableTool}. Export this as the default
339
+ * Opaque value returned from {@link disableTool}. Export this as the default
338
340
  * export of a file in `agent/tools/` to remove the model tool whose name
339
341
  * matches the file's slug, including framework defaults and derived subagent
340
342
  * tools.
341
343
  */
342
344
  export interface DisabledToolSentinel {
343
- readonly kind: typeof DISABLED_TOOL_SENTINEL_KIND;
345
+ readonly [DISABLED_TOOL]: true;
344
346
  }
345
347
  /**
346
348
  * Returns a sentinel that disables the model tool whose name matches the
@@ -1 +1 @@
1
- import{TOOL_BRAND}from"#tools/dynamic.js";import{stampDefinitionKey}from"#internal/authored-definition/source-identity.js";function defineTool(e){return stampToolDefinition(e,`defineTool`)}function stampToolDefinition(e,t){if(e.auth!==void 0)throw Error(`${t}: The "auth" field is no longer supported. Pass auth providers inline to ctx.getToken(provider) or ctx.requireAuth(provider).`);if(`approvalKey`in e)throw Error(`${t}: approvalKey is no longer supported. Use an approval policy for input-dependent decisions.`);return Object.assign(e,{[TOOL_BRAND]:!0}),stampDefinitionKey(e,`tool:${e.description}`),e}const DISABLED_TOOL_SENTINEL_KIND=`eve:disabled-tool`;function disableTool(){return{kind:DISABLED_TOOL_SENTINEL_KIND}}function isDisabledToolSentinel(e){return typeof e==`object`&&!!e&&e.kind===DISABLED_TOOL_SENTINEL_KIND}export{defineTool,disableTool,isDisabledToolSentinel,stampToolDefinition};
1
+ import{TOOL_BRAND}from"#tools/dynamic.js";import{stampDefinitionKey}from"#internal/authored-definition/source-identity.js";function defineTool(e){return stampToolDefinition(e,`defineTool`)}function stampToolDefinition(e,t){if(e.auth!==void 0)throw Error(`${t}: The "auth" field is no longer supported. Pass auth providers inline to ctx.getToken(provider) or ctx.requireAuth(provider).`);if(`approvalKey`in e)throw Error(`${t}: approvalKey is no longer supported. Use an approval policy for input-dependent decisions.`);return Object.assign(e,{[TOOL_BRAND]:!0}),stampDefinitionKey(e,`tool:${e.description}`),e}const DISABLED_TOOL=Symbol.for(`eve.disabled-tool`);function disableTool(){return{[DISABLED_TOOL]:!0}}function isDisabledToolSentinel(e){return typeof e==`object`&&!!e&&Reflect.get(e,DISABLED_TOOL)===!0}export{defineTool,disableTool,isDisabledToolSentinel,stampToolDefinition};
@@ -1 +1 @@
1
- async function executeAskQuestionTool(e,t){"use workflow";return toAskQuestionOutput(await t.ask(toAskQuestionRequest(e)))}function toAskQuestionRequest(e){let t=e.options?.map(e=>({description:e.description,id:e.label,label:e.label}));return{allowFreeform:!0,display:t===void 0?`text`:`select`,prompt:e.question,...t!==void 0&&{options:t}}}function toAskQuestionOutput(e){switch(e.status){case`answered`:return{answer:e.optionId??e.text??``,status:`answered`};case`cancelled`:return{interrupted:!0};case`unavailable`:return{status:`unavailable`}}}executeAskQuestionTool.workflowId=`workflow//eve@0.86.0//executeAskQuestionTool`;export{executeAskQuestionTool,toAskQuestionOutput,toAskQuestionRequest};
1
+ async function executeAskQuestionTool(e,t){"use workflow";return toAskQuestionOutput(await t.ask(toAskQuestionRequest(e)))}function toAskQuestionRequest(e){let t=e.options?.map(e=>({description:e.description,id:e.label,label:e.label}));return{allowFreeform:!0,display:t===void 0?`text`:`select`,prompt:e.question,...t!==void 0&&{options:t}}}function toAskQuestionOutput(e){switch(e.status){case`answered`:return{answer:e.optionId??e.text??``,status:`answered`};case`cancelled`:return{interrupted:!0};case`unavailable`:return{status:`unavailable`}}}executeAskQuestionTool.workflowId=`workflow//eve@0.87.0//executeAskQuestionTool`;export{executeAskQuestionTool,toAskQuestionOutput,toAskQuestionRequest};
@@ -1 +1 @@
1
- import{sleep}from"#compiled/@workflow/core/index.js";async function executeSleepTool(e,t){"use workflow";if(t.abortSignal.aborted)return{interrupted:!0};let n=new Promise(e=>t.abortSignal.addEventListener(`abort`,()=>e(`interrupted`),{once:!0})),r=sleep(Math.ceil(e.seconds*1e3)).then(()=>`elapsed`);return await Promise.race([r,n])===`elapsed`?{waitedSeconds:e.seconds}:{interrupted:!0}}executeSleepTool.workflowId=`workflow//eve@0.86.0//executeSleepTool`;export{executeSleepTool};
1
+ import{sleep}from"#compiled/@workflow/core/index.js";async function executeSleepTool(e,t){"use workflow";if(t.abortSignal.aborted)return{interrupted:!0};let n=new Promise(e=>t.abortSignal.addEventListener(`abort`,()=>e(`interrupted`),{once:!0})),r=sleep(Math.ceil(e.seconds*1e3)).then(()=>`elapsed`);return await Promise.race([r,n])===`elapsed`?{waitedSeconds:e.seconds}:{interrupted:!0}}executeSleepTool.workflowId=`workflow//eve@0.87.0//executeSleepTool`;export{executeSleepTool};
@@ -1,5 +1,5 @@
1
1
  import type { SpanExporter, SpanProcessor } from "./otel-configuration.js";
2
- /** @internal — exposed for tests; authors get the defaults. */
2
+ /** Exposed for tests; authors get the defaults. */
3
3
  interface BatchSpanProcessorOptions {
4
4
  readonly diagnostic?: (message: string, details: {
5
5
  error?: unknown;
@@ -1,19 +1 @@
1
- import type { SpanProcessor } from "#compiled/@vercel/otel/index.js";
2
- import { type SpanExportPolicy } from "#tracing/eve/span-export-policy.js";
3
- /**
4
- * Puts one destination's content policy in front of it.
5
- *
6
- * Accepted traces carry content before they reach destination policies. This
7
- * cannot strip an attribute in place: the span object is shared with every
8
- * processor in the pipeline, and editing it would strip the attribute
9
- * everywhere. So it gives the destination a facade whose attributes omit what
10
- * its policy redacted.
11
- *
12
- * One facade follows the original from start through end. This preserves the
13
- * object identity stateful processors key on without ever exposing the original
14
- * span or its attribute map. Methods stay bound to the original, so private SDK
15
- * state remains reachable without eve knowing that SDK's concrete span shape.
16
- *
17
- * @internal
18
- */
19
- export declare function contentFilteringProcessor(downstream: SpanProcessor, exportPolicy?: SpanExportPolicy | readonly SpanExportPolicy[]): SpanProcessor;
1
+ export {};
@@ -1,9 +1,15 @@
1
+ /**
2
+ * A `SpanProcessor`. Structural for the same reason the exporter is: the
3
+ * instance comes from whichever `@opentelemetry/*` build the app installed, and
4
+ * the host only ever hands it spans.
5
+ */
1
6
  export interface SpanProcessor {
2
7
  forceFlush(): Promise<void>;
3
8
  onEnd(span: unknown): void;
4
9
  onStart(span: unknown, parentContext: unknown): void;
5
10
  shutdown(): Promise<void>;
6
11
  }
12
+ /** A {@link SpanProcessor}, or `"auto"` for the processor `@vercel/otel` resolves for you. */
7
13
  export type SpanProcessorOrName = SpanProcessor | "auto";
8
14
  export interface IdGenerator {
9
15
  generateSpanId(): string;
@@ -138,14 +138,9 @@ export declare function otel(options?: OtelOptions): OtelDeclaration;
138
138
  * this destination, and nothing beneath the policy sees what it removes.
139
139
  */
140
140
  export declare function otelIntegration(options?: OtelIntegrationOptions): OtelIntegration;
141
- /** @internal Local and Agent Runs destination declaration. */
142
- export declare function managedOtelIntegration(options?: OtelIntegrationOptions): OtelIntegration;
143
- /** Vercel Agent Runs through the hosted request-context transport. @internal */
144
- export declare function agentRunsIntegration(options?: ManagedTraceOptions): OtelIntegration;
145
141
  export declare function isOtelDeclaration(value: unknown): value is OtelDeclaration;
146
142
  export declare function isOtelIntegration(value: unknown): value is OtelIntegration;
147
- /** The one pipeline a process can register. @internal */
148
- /** What the harness reads at turn time, as opposed to at registration. @internal */
143
+ /** What the harness reads at turn time, as opposed to at registration. */
149
144
  export interface OtelHarnessSettings {
150
145
  readonly functionId?: string;
151
146
  readonly traceChannelRequests: boolean;
@@ -155,9 +150,12 @@ export interface OtelHarnessSettings {
155
150
  /** Whether AI SDK spans include model and tool outputs. */
156
151
  readonly recordOutputs: boolean;
157
152
  }
158
- /** @internal */
153
+ /**
154
+ * A tracing destination's `runtimeContext` for one model attempt; `undefined` adds nothing.
155
+ * Later destinations win on key collisions.
156
+ */
159
157
  export type RuntimeContextResolver = (input: InstrumentationModelStartedInput) => JsonObject | undefined;
160
- /** @internal */
158
+ /** The one pipeline a process can register. */
161
159
  export interface CollectedOtel {
162
160
  /**
163
161
  * Whether anything declared OpenTelemetry. False means eve should leave the
@@ -168,14 +166,3 @@ export interface CollectedOtel {
168
166
  readonly runtimeContextResolvers: readonly RuntimeContextResolver[];
169
167
  readonly settings: OtelHarnessSettings;
170
168
  }
171
- /**
172
- * Folds the declared values into the one pipeline a process can register.
173
- *
174
- * Destinations concatenate in declaration order. The singletons cannot: two
175
- * `otel()` values is a boot error rather than a silent win for whichever eve
176
- * happened to visit first. With one declaration per file that collision needs
177
- * two files both exporting `otel()`, which is the only way to reach it.
178
- *
179
- * @internal
180
- */
181
- export declare function collectOtelPipeline(values: readonly unknown[]): CollectedOtel;
@@ -30,5 +30,3 @@ export interface SpanExportPolicy {
30
30
  readonly value: unknown;
31
31
  }) => SpanAttributeDecision;
32
32
  }
33
- /** @internal */
34
- export declare function normalizeSpanExportPolicies(policy: SpanExportPolicy | readonly SpanExportPolicy[] | undefined): readonly SpanExportPolicy[];
@@ -1,7 +1,4 @@
1
1
  import { type InstrumentationRuntime } from "#instrumentation/runtime.js";
2
- import { type TraceCapturePolicy } from "#tracing/eve/otel-declaration.js";
3
- /** Zero-config local tracing admits every session in the development worker. @internal */
4
- export declare const localTracePolicy: TraceCapturePolicy;
5
2
  /** Installs the zero-config local OTel runtime once in an `eve dev` worker. */
6
3
  export declare function installLocalInstrumentationRuntime(input: {
7
4
  readonly appRoot: string;
@@ -1,5 +1,4 @@
1
1
  import type { SpanProcessor } from "#compiled/@vercel/otel/index.js";
2
- import { type SpanExportPolicy } from "#tracing/eve/span-export-policy.js";
3
2
  /**
4
3
  * The local spool, as a span processor.
5
4
  *
@@ -13,16 +12,6 @@ export interface LocalTracesProcessor extends SpanProcessor {
13
12
  */
14
13
  releaseConversation(conversationId: string): Promise<boolean>;
15
14
  }
16
- /**
17
- * Reports whether a processor tracks which conversation owns which trace, so
18
- * eve can tell it when that conversation is done.
19
- *
20
- * Anything standing between eve and the spool has to answer for the spool, so
21
- * this is the check a wrapper uses to decide whether it must forward the call.
22
- *
23
- * @internal
24
- */
25
- export declare function hasConversationRelease(processor: SpanProcessor): processor is LocalTracesProcessor;
26
15
  /**
27
16
  * Writes the OTLP/JSON spool under `.eve/traces/v1`.
28
17
  *
@@ -36,5 +25,3 @@ export declare function hasConversationRelease(processor: SpanProcessor): proces
36
25
  export declare function createLocalTracesProcessor(input?: {
37
26
  readonly appRoot?: string;
38
27
  }): LocalTracesProcessor;
39
- /** Applies the local content environment override before authored policies. @internal */
40
- export declare function resolveLocalTracesExportPolicy(exportPolicy?: SpanExportPolicy | readonly SpanExportPolicy[]): SpanExportPolicy | readonly SpanExportPolicy[] | undefined;
@@ -1,3 +1,3 @@
1
- import { n as signInEnding, t as useEveAgent } from "../chunks/use-eve-agent-B2jCfcnG.js";
1
+ import { n as signInEnding, t as useEveAgent } from "../chunks/use-eve-agent-BExXjBv6.js";
2
2
 
3
3
  export { signInEnding, useEveAgent };
@@ -53,7 +53,8 @@ export interface UseEveAgentReturn {
53
53
  readonly prewarm: () => Promise<void>;
54
54
  /** Clear all state and start a new session. */
55
55
  readonly newSession: () => void;
56
- readonly reset: () => Promise<Delivery>;
56
+ /** Retires the server-side session; call newSession() to prepare a fresh conversation. */
57
+ readonly end: () => Promise<Delivery>;
57
58
  readonly clear: () => Promise<Delivery>;
58
59
  readonly compact: () => Promise<Delivery>;
59
60
  /** Submits a message and resolves on acceptance, not execution. */
@@ -137,7 +138,7 @@ export interface UseEveAgentOptions extends SessionStoreCallbacks {
137
138
  *
138
139
  * Returns reactive refs for the conversation (`messages`, `agents`, `view`) and for `error`,
139
140
  * `events`, `session`, and `status`, plus `prewarm`, `send`, `respond`, `resume`, `cancel`,
140
- * `newSession`, and `reset`. Configuration is read once on store creation;
141
+ * `newSession`, and `end`. Configuration is read once on store creation;
141
142
  * remount to change it. On scope dispose, the in-flight request is detached and
142
143
  * the store unsubscribed.
143
144
  */
@@ -1,3 +1,3 @@
1
- import { t as useEveAgent } from "../chunks/use-eve-agent-B2jCfcnG.js";
1
+ import { t as useEveAgent } from "../chunks/use-eve-agent-BExXjBv6.js";
2
2
 
3
3
  export { useEveAgent };
@@ -24,9 +24,11 @@ dev TUI with `/model anthropic/claude-opus-5.5`.
24
24
  The root `agent.ts` can be omitted when no runtime config is needed. eve then selects its default `agent.ts` source at the same slot, configured with `openai/gpt-6-luna-fast` and `reasoning: "high"`; authoring the file replaces that source.
25
25
  When `agent.ts` is present, `model` is required.
26
26
 
27
- A config that selects a static Gateway model is compile-only. A config that contains a dynamic model or a direct-provider `LanguageModel` remains a runtime entry because eve must resolve that authored value while the agent runs. See [Authored module lifecycle](./reference/typescript-api#authored-module-lifecycle).
27
+ An `agent.ts` that configures a local agent, root or subagent, must export the value `defineAgent` returns, and a dynamic subagent resolver that selects a local agent must return one. The compiler rejects a plain object export with `Export defineAgent({...}) from "<path>".`
28
28
 
29
- `model` accepts a gateway model id string, which routes through the [Vercel AI Gateway](https://vercel.com/docs/ai-gateway). To call a provider directly and configure the model in code, pass a provider-authored `LanguageModel`.
29
+ A config that selects a static Gateway model is compile-only. A config that contains a dynamic model or a direct-provider model instance remains a runtime entry because eve must resolve that authored value while the agent runs. See [Authored module lifecycle](./reference/typescript-api#authored-module-lifecycle).
30
+
31
+ `model` accepts a gateway model id string, which routes through the [Vercel AI Gateway](https://vercel.com/docs/ai-gateway). To call a provider directly and configure the model in code, pass a model instance. eve types it as `EveLanguageModel` (exported from `eve` and `eve/models`), which every AI SDK language model satisfies.
30
32
 
31
33
  Use eve's helpers for direct OpenAI or Anthropic access without installing another provider package:
32
34
 
@@ -43,9 +45,9 @@ export default defineAgent({
43
45
 
44
46
  For a local ChatGPT subscription, use `chatgpt()` from `eve/models/openai` and sign in with `/login`. It defaults to `gpt-6-luna-fast` and cannot run in a deployment.
45
47
 
46
- `/login` can switch a static Gateway string to an eve helper and manage its import. `/model` changes the selected model and settings immediately. Custom provider SDK calls and dynamic expressions retain their authored behavior and require manual source edits. You can still install an AI SDK provider package and pass its `LanguageModel` when you need provider-specific configuration.
48
+ `/login` can switch a static Gateway string to an eve helper and manage its import. `/model` changes the selected model and settings immediately. Custom provider SDK calls and dynamic expressions retain their authored behavior and require manual source edits. You can still install an AI SDK provider package and pass its language model when you need provider-specific configuration.
47
49
 
48
- Model use is subject to the terms, data-processing commitments, retention behavior, and available controls of the selected provider and routing path. Review the [AI Gateway model catalog](https://vercel.com/ai-gateway/models) for gateway-routed models, and review the provider's terms when you configure a direct `LanguageModel`.
50
+ Model use is subject to the terms, data-processing commitments, retention behavior, and available controls of the selected provider and routing path. Review the [AI Gateway model catalog](https://vercel.com/ai-gateway/models) for gateway-routed models, and review the provider's terms when you configure a direct model instance.
49
51
 
50
52
  For every OpenAI or Anthropic model call, eve fills the provider's end-user
51
53
  safety identifier from the active turn's
@@ -166,7 +168,7 @@ export default defineAgent({
166
168
  });
167
169
  ```
168
170
 
169
- The function returns a Gateway model ID, an AI SDK `LanguageModel`, or a selection object. See
171
+ The function returns a Gateway model ID, a model instance such as an AI SDK language model, or a selection object. See
170
172
  [Dynamic capabilities](./guides/dynamic-capabilities) for the context and memo rules.
171
173
 
172
174
  - **When it changes.** eve evaluates before each ordinary model call. A memo keyed by
@@ -235,13 +237,13 @@ Gateway models; use `providerOptions.gateway.caching` instead.
235
237
 
236
238
  ## Compaction
237
239
 
238
- Compaction summarizes older turns as you approach the context window. It's on by default, so you only tune when it kicks in. eve adds the estimated fixed checkpoint-prompt envelope to the trigger count, so compaction starts sooner than the conversation-only estimate. Lower `thresholdPercent` to compact sooner:
240
+ Compaction summarizes older turns as you approach the context window. It's on by default, so you only tune when it kicks in. eve adds the estimated fixed checkpoint-prompt envelope to the trigger count, so compaction starts sooner than the conversation-only estimate. Lower `compaction.threshold` (a fraction from 0 to 1) to compact sooner:
239
241
 
240
242
  ```ts title="agent/agent.ts"
241
243
  export default defineAgent({
242
244
  model: "anthropic/claude-opus-5.5",
243
245
  compaction: {
244
- thresholdPercent: 0.75, // default 0.9
246
+ threshold: 0.75, // default 0.9
245
247
  },
246
248
  });
247
249
  ```
@@ -282,8 +284,9 @@ disable the timeout. Session expiration follows
282
284
  [run-data retention](#run-data-retention); a zero-retention session loses its
283
285
  stored payloads when it ends.
284
286
 
285
- `sessionUsage` gets two usage records with `inputTokens`, `outputTokens`,
286
- `cacheReadTokens`, `cacheWriteTokens`, and `costUsd`: `total` is everything
287
+ `sessionUsage` gets two `TokenUsage` records (exported from `eve`) with
288
+ `inputTokens`, `outputTokens`, `cacheReadTokens`, `cacheWriteTokens`, and
289
+ `costUsd`: `total` is everything
287
290
  the session has spent, and `window` is what it spent since the last approved
288
291
  continuation. `inputTokens` includes cache reads and writes. Subtract
289
292
  `cacheReadTokens` to count only new input; cache reads are the history a
@@ -325,8 +328,8 @@ export default defineAgent({
325
328
  });
326
329
  ```
327
330
 
328
- Set `sessionUsage: () => false` to leave sessions uncapped; `sessionUsage:
329
- false` is not accepted. eve calls `sessionUsage` before each model call once
331
+ Set `sessionUsage: false` to leave sessions uncapped. A callback that always
332
+ returns `false` has the same effect. eve calls a configured callback before each model call once
330
333
  the window has usage. The model call that crosses a limit is allowed to finish
331
334
  because exact usage arrives after the call completes. Before the next model
332
335
  call, eve pauses the turn (`turn.paused`) and sends a deterministic
@@ -466,6 +469,7 @@ when the session starts; destination export filters and lifecycle-provider
466
469
  policies do not change it.
467
470
 
468
471
  Set `experimental.workflow.retention` explicitly to override this behavior.
472
+ This override is experimental and has no compatibility promise.
469
473
  Use `0` to request deletion regardless of the tracing policy, or `"default"` to
470
474
  keep run data for the World's default period regardless of the tracing policy:
471
475
 
@@ -27,7 +27,7 @@ export default defineChannel({
27
27
  const source = from(params.threadId);
28
28
 
29
29
  if (body.message === "/new") {
30
- return Response.json(await source.reset({ reason: "User requested /new" }));
30
+ return Response.json(await source.end({ reason: "User requested /new" }));
31
31
  }
32
32
 
33
33
  const delivery = await source.send(body.message, { auth: null });
@@ -82,7 +82,7 @@ A route's `path` is its app URL; the channel filename does not prefix it. The ro
82
82
 
83
83
  Each route receives these operation surfaces:
84
84
 
85
- - `from(address)` binds `send`, `respond`, `cancel`, `compact`, `clear`, and `reset` to a channel-local continuation address.
85
+ - `from(address)` binds `send`, `respond`, `cancel`, `compact`, `clear`, and `end` to a channel-local continuation address.
86
86
  - `resolveSession(address)` snapshots the session currently owning a channel-local continuation address.
87
87
  - `attachSession(sessionId)` creates an I/O-free handle pinned to one durable session ID.
88
88
  - `to(channel, target).send(message, options)` hands work to another authored channel.
@@ -128,7 +128,7 @@ await source.respond(answers, { auth });
128
128
  await source.cancel({ turnId });
129
129
  await source.compact();
130
130
  await source.clear();
131
- await source.reset({ reason: "Start over" });
131
+ await source.end({ reason: "Start over" });
132
132
 
133
133
  const currentSession = await resolveSession(threadId);
134
134
  ```
@@ -157,7 +157,7 @@ await session.respond(answers, { auth });
157
157
  await session.cancel({ turnId });
158
158
  await session.compact();
159
159
  await session.clear();
160
- await session.reset({ reason: "Retire this session" });
160
+ await session.end({ reason: "Retire this session" });
161
161
  for await (const event of session.stream({ startIndex: 12 })) render(event);
162
162
  ```
163
163
 
@@ -169,7 +169,7 @@ For a stranded session, `Session.send()`, `Session.respond()`, and a following
169
169
  read through `Session.stream()` throw `SessionStrandedError` from `eve/channels` and deliver nothing.
170
170
  `stream({ follow: false })` still reads the recorded history up to the current tail without
171
171
  changing the session. `error.owner.eveVersion` names the eve release that built the session when it recorded one. Call
172
- `reset()` to end the stranded session, then start a new one:
172
+ `end()` to retire the stranded session, then start a new one:
173
173
 
174
174
  ```ts
175
175
  import { SessionStrandedError } from "eve/channels";
@@ -178,7 +178,7 @@ try {
178
178
  await attachSession(sessionId).send(text, { auth });
179
179
  } catch (error) {
180
180
  if (!SessionStrandedError.is(error)) throw error;
181
- await attachSession(sessionId).reset({ reason: "Session was stranded by an upgrade" });
181
+ await attachSession(sessionId).end({ reason: "Session was stranded by an upgrade" });
182
182
  }
183
183
  ```
184
184
 
@@ -325,12 +325,12 @@ Keep each route's `method` and `path` unless you mean to move the endpoint.
325
325
  `kind: "compaction"`.
326
326
  - `clear` removes model-message history in place. It preserves the system prompt,
327
327
  skills, tools, durable state, limits, address ownership, and session sandbox.
328
- - `reset` terminally retires the current session. A later address `send()` creates
328
+ - `end` terminally retires the current session. A later address `send()` creates
329
329
  a fresh session; a fixed `Session` handle remains pinned to the retired ID.
330
330
 
331
331
  Control operations never create a session. Unknown or inactive targets throw
332
332
  `SessionNotActiveError`; an accepted no-op cancellation settles with `outcome: "ignored"`. Authenticate and deduplicate command webhooks before
333
- calling `reset`, because a delayed duplicate can retire a newer address owner.
333
+ calling `end`, because a delayed duplicate can retire a newer address owner.
334
334
 
335
335
  ## CORS
336
336
 
@@ -536,11 +536,27 @@ slackContinuationToken({ channelId: "C0123ABC", threadTs: "1800000000.001234" })
536
536
  twilioContinuationToken({ from: "+15551234567", to: "+15557654321" }); // "+15551234567:+15557654321"
537
537
  ```
538
538
 
539
+ Built-in channels export token builders from their own `eve/channels/<platform>` entry:
540
+
541
+ | Builder | Address fields |
542
+ | ----------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
543
+ | `slackContinuationToken` | `channelId`, `threadTs` |
544
+ | `slackCodeChannelContinuationToken` | `channelId` (positional argument) |
545
+ | `twilioContinuationToken` | `from`, optional `to` |
546
+ | `githubContinuationToken` | `repositoryId`, `conversationKind`, and the matching `issueNumber`, `pullRequestNumber`, or `reviewThreadRootCommentId` |
547
+ | `discordContinuationToken` | `channelId`, optional `conversationId` |
548
+ | `teamsContinuationToken` | `conversationId`, optional `tenantId` and `replyToActivityId` |
549
+ | `telegramContinuationToken` | `chatId`, optional `messageThreadId` and `conversationId` |
550
+ | `linearContinuationToken` | `agentSessionId` |
551
+
552
+ Pass the resulting channel-local token to that channel's `from(...)` helper.
553
+ Tokens are routing addresses, not credentials or substitutes for authorization.
554
+
539
555
  Custom channels write their own function that joins the identity fields. The framework derives nothing for you; the channel owns its token format.
540
556
 
541
557
  When another identity should address a session, add it with `channel.continuation?.alias(rawToken)`. The runtime preserves the current channel namespace and exposes the new token as `channel.continuation.token` for later handlers.
542
558
 
543
- Aliasing adds an address to the current session. Earlier addresses continue to resolve to the same session and accept the same payloads. `reset` terminally retires the current session and makes all its addresses available to later `send()` calls. `cancel` stops only the active turn and leaves the session, history, and continuation-token ownership intact.
559
+ Aliasing adds an address to the current session. Earlier addresses continue to resolve to the same session and accept the same payloads. `end` terminally retires the current session and makes all its addresses available to later `send()` calls. `cancel` stops only the active turn and leaves the session, history, and continuation-token ownership intact.
544
560
 
545
561
  The `context(state, channel)` config option builds the per-step context read as `ctx.channel`
546
562
  in event handlers. Its second argument is `ChannelContext` from `eve/channels`: live
@@ -575,7 +591,7 @@ defineChannel<{ ref: string | null }>({
575
591
  });
576
592
  ```
577
593
 
578
- At the next workflow boundary, the runtime adds the new address to the session's merged inbox. If another active session already owns the new token, the aliasing session fails instead of taking it over. Every address claimed by the session remains active until the session ends or resets. Sessions with continuation addresses remain on their current deployment until Workflow supports atomic ownership transfer.
594
+ At the next workflow boundary, the runtime adds the new address to the session's merged inbox. If another active session already owns the new token, the aliasing session fails instead of taking it over. Every address claimed by the session remains active until the session ends. Sessions with continuation addresses remain on their current deployment until Workflow supports atomic ownership transfer.
579
595
 
580
596
  Tokens must be nonempty. A session supports up to 256 addresses, including its stable inbox; repeating an existing alias does not consume another address.
581
597
 
@@ -60,7 +60,7 @@ Then configure the public `https://…/eve/v1/discord` route as the application'
60
60
 
61
61
  ## Reply to DMs and mentions (experimental)
62
62
 
63
- Discord sends ordinary messages, such as DMs, mentions, and thread replies, only over its [Gateway WebSocket](https://discord.com/developers/docs/events/gateway), not as HTTP Interactions. Gateway support is experimental, and its API may change. To receive them, run `experimental_runDiscordGatewayRelay` from `eve/channels/discord/gateway` in a process that stays connected, and enable the matching route on the channel. The relay forwards each `MESSAGE_CREATE` dispatch to the agent unchanged, and the channel replies through the same handlers it uses for commands, including HITL buttons and error messages.
63
+ Discord sends ordinary messages, such as DMs, mentions, and thread replies, only over its [Gateway WebSocket](https://discord.com/developers/docs/events/gateway), not as HTTP Interactions. Gateway support is experimental, and its API may change. To receive them, run `runDiscordGatewayRelay` from `eve/experimental/channels/discord/gateway` in a process that stays connected, and enable the matching route on the channel. The relay forwards each `MESSAGE_CREATE` dispatch to the agent unchanged, and the channel replies through the same handlers it uses for commands, including HITL buttons and error messages.
64
64
 
65
65
  ```text
66
66
  Discord Gateway ── WebSocket ──▶ relay (Vercel Daemon) ── POST /eve/v1/discord/gateway ──▶ agent ── REST ──▶ Discord
@@ -88,9 +88,9 @@ A Vercel Daemon keeps the relay connected. Vercel Daemons are in beta. When you
88
88
 
89
89
  ```ts title="daemon/main.ts"
90
90
  import { connectDiscordCredentials } from "@vercel/connect/eve";
91
- import { experimental_runDiscordGatewayRelay } from "eve/channels/discord/gateway";
91
+ import { runDiscordGatewayRelay } from "eve/experimental/channels/discord/gateway";
92
92
 
93
- await experimental_runDiscordGatewayRelay({
93
+ await runDiscordGatewayRelay({
94
94
  credentials: connectDiscordCredentials("discord/my-agent"),
95
95
  messageContent: false,
96
96
  url: process.env.EVE_URL,
@@ -145,7 +145,7 @@ https://discord.com/oauth2/authorize?client_id=<APPLICATION_ID>&scope=bot+applic
145
145
 
146
146
  ### Run the relay outside Vercel
147
147
 
148
- `experimental_runDiscordGatewayRelay` runs on any host that keeps a Node.js 24 process up, such as a VM, a container platform, or a home server, while the agent stays on Vercel. Run exactly one relay per bot. Three things change off Vercel:
148
+ `runDiscordGatewayRelay` runs on any host that keeps a Node.js 24 process up, such as a VM, a container platform, or a home server, while the agent stays on Vercel. Run exactly one relay per bot. Three things change off Vercel:
149
149
 
150
150
  - **Credentials.** Vercel Connect authenticates callers with your project's Vercel OIDC token, which other hosts don't have, so give the relay the bot token directly. The agent can keep using Connect.
151
151
  - **URL.** The relay can't read `VERCEL_PROJECT_PRODUCTION_URL`, so pass the agent's URL as `url`.
@@ -173,9 +173,9 @@ On the relay, set `DISCORD_BOT_TOKEN` to the token from **Bot** → **Reset Toke
173
173
 
174
174
  ```ts title="relay/main.ts"
175
175
  import { httpBasic } from "eve/agents/auth";
176
- import { experimental_runDiscordGatewayRelay } from "eve/channels/discord/gateway";
176
+ import { runDiscordGatewayRelay } from "eve/experimental/channels/discord/gateway";
177
177
 
178
- await experimental_runDiscordGatewayRelay({
178
+ await runDiscordGatewayRelay({
179
179
  // Reads DISCORD_BOT_TOKEN when `credentials` is omitted.
180
180
  url: process.env.EVE_URL,
181
181
  auth: httpBasic({ username: "discord-relay", password: process.env.DISCORD_RELAY_SECRET! }),
@@ -207,7 +207,7 @@ A mention in a text channel starts a thread, as the Slack channel does, so each
207
207
 
208
208
  Mention the bot's user, not the role with the same name that Discord creates for it. Discord's autocomplete offers both, and a role mention doesn't address the bot.
209
209
 
210
- Discord sends the text of messages that neither mention the bot nor arrive as a DM only to bots with the privileged **Message Content** intent. Without it, thread follow-ups that skip the mention, and replies whose author turned off the reply ping, arrive empty and are ignored. `eve add channel/discord` turns the intent on and sets `messageContent: true` when Discord allows it, which it does for bots in fewer than 100 servers. Otherwise, enable **Message Content Intent** under **Bot** in the Discord Developer Portal, then pass `messageContent: true` to `experimental_runDiscordGatewayRelay`. Discord refuses the relay's connection if you request the intent before enabling it, and the relay stops with an error naming the close code.
210
+ Discord sends the text of messages that neither mention the bot nor arrive as a DM only to bots with the privileged **Message Content** intent. Without it, thread follow-ups that skip the mention, and replies whose author turned off the reply ping, arrive empty and are ignored. `eve add channel/discord` turns the intent on and sets `messageContent: true` when Discord allows it, which it does for bots in fewer than 100 servers. Otherwise, enable **Message Content Intent** under **Bot** in the Discord Developer Portal, then pass `messageContent: true` to `runDiscordGatewayRelay`. Discord refuses the relay's connection if you request the intent before enabling it, and the relay stops with an error naming the close code.
211
211
 
212
212
  To choose which messages run the agent, under what `auth`, or which session they join, set `gateway.onMessage(ctx, message)`. It runs for every message from a person and returns `{ auth }` to dispatch or `null` to ignore. `message.addressed` reports whether the default would answer, and `message.referencedMessageId` names the message it replies to. `defaultDiscordMessageAuth(message)` gives the author the same principal `defaultDiscordAuth` gives them for commands and button presses, so requester-only approvals work across both:
213
213
 
@@ -278,7 +278,7 @@ export default discordChannel({
278
278
 
279
279
  ### Forward messages from your own relay
280
280
 
281
- The route accepts any relay that holds a Gateway connection, such as an existing discord.js bot, so you don't have to run `experimental_runDiscordGatewayRelay`. Forward each Gateway dispatch payload unchanged, as the JSON body of a `POST` to `/eve/v1/discord/gateway`:
281
+ The route accepts any relay that holds a Gateway connection, such as an existing discord.js bot, so you don't have to run `runDiscordGatewayRelay`. Forward each Gateway dispatch payload unchanged, as the JSON body of a `POST` to `/eve/v1/discord/gateway`:
282
282
 
283
283
  ```json
284
284
  {
@@ -301,7 +301,7 @@ The route handles `MESSAGE_CREATE` and acknowledges other dispatch types without
301
301
  | `429` | Rate limited before the route ran. | Retry with backoff. |
302
302
  | `5xx` | Unknown. The route answers `500` before dispatch when `onMessage` throws, but a platform `502` or `504` can come after a turn started. | Not retry, unless your relay deduplicates. |
303
303
 
304
- eve does not deduplicate messages. If the relay retries after eve already started a turn, for example because the response was lost, the agent answers twice. `experimental_runDiscordGatewayRelay` retries only a `429`, or a connection that failed before the request reached eve.
304
+ eve does not deduplicate messages. If the relay retries after eve already started a turn, for example because the response was lost, the agent answers twice. `runDiscordGatewayRelay` retries only a `429`, or a connection that failed before the request reached eve.
305
305
 
306
306
  ### Run the relay locally
307
307
 
@@ -317,7 +317,7 @@ Scale the production daemon to zero while you do this. Every connection receives
317
317
 
318
318
  - Run one relay per bot. Each connection receives every message. Bots large enough to need Discord's sharding are out of scope.
319
319
  - Messages sent while no relay is connected are not delivered. On a deploy, Vercel sends `SIGTERM` to the old daemon and starts the new one at the same time. The old relay disconnects right away, so messages sent while the new daemon boots and connects, usually a few seconds, are lost. A crash or restart leaves the same gap. The relay does not resume the previous Gateway session in a new process, so Discord does not replay these messages.
320
- - `experimental_runDiscordGatewayRelay` drops a message, rather than retrying it, when eve answers with a `5xx`, takes longer than 30 seconds to accept it, or the connection fails after the request is sent. eve may have started the turn already, and a retry could answer twice. The relay logs each dropped message.
320
+ - `runDiscordGatewayRelay` drops a message, rather than retrying it, when eve answers with a `5xx`, takes longer than 30 seconds to accept it, or the connection fails after the request is sent. eve may have started the turn already, and a retry could answer twice. The relay logs each dropped message.
321
321
 
322
322
  ## How the channel handles messages
323
323
 
@@ -91,7 +91,7 @@ The default eve channel inspects the agent, creates sessions, accepts callbacks
91
91
  - `POST /eve/v1/session/:sessionId/cancel` (cancel the in-flight turn)
92
92
  - `POST /eve/v1/session/:sessionId/clear` (clear the session's model history)
93
93
  - `POST /eve/v1/session/:sessionId/compact` (compact the session's context)
94
- - `POST /eve/v1/session/:sessionId/reset` (retire the session)
94
+ - `POST /eve/v1/session/:sessionId/end` (retire the session)
95
95
  - `GET /eve/v1/session/:sessionId/stream` (stream events as NDJSON)
96
96
 
97
97
  The session routes use only durable session IDs. Create a session explicitly, then put its returned ID in every follow-up, control, and stream path.
@@ -126,7 +126,7 @@ repeating the request with the same key returns the same `deliveryId`, and the i
126
126
  again. Unlike a channel's [retried deliveries](./custom#retried-deliveries), whose duplicates get a
127
127
  new receipt settled `ignored`, the repeat's receipt is the original's. The session remembers its
128
128
  last 1,024 keys, so use a new key for new input. The compact and clear routes
129
- accept no body fields; omit the body or send `{}`. Cancel accepts `turnId`; reset accepts `reason`.
129
+ accept no body fields; omit the body or send `{}`. Cancel accepts `turnId`; end accepts `reason`.
130
130
 
131
131
  Open payload objects such as `clientContext` keep their existing contracts. Delegated requests
132
132
  with a `callback` accept, and ignore, the retired `activityObserver` field so older senders keep
@@ -238,7 +238,7 @@ export default eveChannel({
238
238
 
239
239
  Stream a session as newline-delimited JSON from `GET /eve/v1/session/:sessionId/stream`. The [session protocol](../concepts/sessions-runs-and-streaming#stream-a-session) defines the event set, envelopes, cursors, and reconnection behavior.
240
240
 
241
- Following a stranded session's stream returns `409 session_stranded`, just like a send. The TypeScript client reports `ClientSessionStrandedError` without retrying. Pass `follow=false` to read the recorded history instead: the response ends at the durable tail, carries the `x-eve-stream-tail-index` header, and never inspects or changes the session, so it works before a reset. A reset attempts to append its control delivery's `delivery.admitted` (`source: { control: "reset" }`) and `delivery.settled`, then `session.ended` with `outcome: "failed"`, error code `session_stranded`, and cause `{ deliveryId }` naming that delivery, then close the stream. Existing readers finish when the stream ends.
241
+ Following a stranded session's stream returns `409 session_stranded`, just like a send. The TypeScript client reports `ClientSessionStrandedError` without retrying. Pass `follow=false` to read the recorded history instead: the response ends at the durable tail, carries the `x-eve-stream-tail-index` header, and never inspects or changes the session, so it works before ending the session. End attempts to append its control delivery's `delivery.admitted` (`source: { control: "reset" }`) and `delivery.settled`, then `session.ended` with `outcome: "failed"`, error code `session_stranded`, and cause `{ deliveryId }` naming that delivery, then close the stream. Existing readers finish when the stream ends.
242
242
 
243
243
  A session started by an eve version before v27 stores v26 events. Its stream route serves them as the v27 lines they record, so v27 clients render that history: messages, reasoning, tool calls and results, approvals, questions, sign-ins, subagents, clears, and compactions. Streamed text previews aren't translated, so a v26 session that is still running shows each part once it completes.
244
244
 
@@ -254,15 +254,17 @@ See [Cancel the in-flight turn](../concepts/sessions-runs-and-streaming#cancel-t
254
254
 
255
255
  ### Clear context
256
256
 
257
- Post to `/eve/v1/session/:sessionId/clear` to remove model-message history while preserving the session ID, system prompt, tools, skills, durable state, limits, and sandbox. A stranded session cannot run the clear, so the route returns `409 session_stranded` and changes nothing; post to the `reset` route to end it instead. See [Compact, clear, and reset](../concepts/sessions-runs-and-streaming#compact-clear-and-reset).
257
+ Post to `/eve/v1/session/:sessionId/clear` to remove model-message history while preserving the session ID, system prompt, tools, skills, durable state, limits, and sandbox. A stranded session cannot run the clear, so the route returns `409 session_stranded` and changes nothing; post to the `end` route instead. See [Compact, clear, and end](../concepts/sessions-runs-and-streaming#compact-clear-and-end).
258
258
 
259
259
  ### Compact context
260
260
 
261
- Post to `/eve/v1/session/:sessionId/compact` to summarize context without sending a user message. The operation waits for an active turn to settle and reports its result on the stream. See [Compact, clear, and reset](../concepts/sessions-runs-and-streaming#compact-clear-and-reset).
261
+ Post to `/eve/v1/session/:sessionId/compact` to summarize context without sending a user message. The operation waits for an active turn to settle and reports its result on the stream. See [Compact, clear, and end](../concepts/sessions-runs-and-streaming#compact-clear-and-end).
262
262
 
263
- ### Reset a session
263
+ <a id="reset-a-session" />
264
264
 
265
- Post to `/eve/v1/session/:sessionId/reset` to terminally retire that session. Reset never replaces the ID automatically; create a new session explicitly for a fresh conversation. Reset also works on a stranded session: eve cancels the stranded workflow run directly instead of delivering the command to it. See [Compact, clear, and reset](../concepts/sessions-runs-and-streaming#compact-clear-and-reset).
265
+ ### End a session
266
+
267
+ Post to `/eve/v1/session/:sessionId/end` to terminally retire that session. End never replaces the ID automatically; create a new session explicitly for a fresh conversation. End also works on a stranded session: eve cancels the stranded workflow run directly instead of delivering the command to it. See [Compact, clear, and end](../concepts/sessions-runs-and-streaming#compact-clear-and-end).
266
268
 
267
269
  ## Replace or disable the defaults
268
270
 
@@ -340,6 +342,10 @@ export default eveChannel({
340
342
  });
341
343
  ```
342
344
 
345
+ Audience also selects the default [run-data retention](../agent-config#run-data-retention).
346
+ Outside development, private and unknown-audience sessions request deletion when
347
+ they end. The Workflow World must support deletion to enforce it.
348
+
343
349
  `audience` controls observability content capture; it does not change who may
344
350
  call the endpoint. `auth` still controls access. For a classification that
345
351
  depends on channel state or application-specific verified data, use a [custom
@@ -444,7 +450,7 @@ export default defineChannel({
444
450
 
445
451
  The client then resumes that session by id, for example with `useEveAgent({ initialSession: { sessionId, streamIndex: 0 }, resume: true })`. `created` is `false` when a session already owned the address, or another `create()` or `send()` claimed it first. That session comes back unchanged and your `history` was not added, so check `created` before treating the session as seeded. Use a new address for each new conversation or branch.
446
452
 
447
- When the session at the address is [stranded](../guides/deployment/self-hosting#recover-a-stranded-session), `create()` throws `SessionStrandedError` instead of replacing it, because that session may hold the conversation you meant to import. Call `reset()` on the address, then `create()` again.
453
+ When the session at the address is [stranded](../guides/deployment/self-hosting#recover-a-stranded-session), `create()` throws `SessionStrandedError` instead of replacing it, because that session may hold the conversation you meant to import. Call `end()` on the address, then `create()` again.
448
454
 
449
455
  `create()` returns once the new session claims its address, so a `send()` right after it reaches that session. It throws if no session claims the address within 15 seconds.
450
456
 
@@ -101,6 +101,17 @@ Files uploaded to Linear and referenced in an Agent Session prompt, whether as m
101
101
 
102
102
  Event handlers receive `channel.linear`, which exposes `createActivity`, `listActivities`, and `updateSession` for custom Agent Activity delivery and Agent Session metadata.
103
103
 
104
+ ### Low-level API helpers
105
+
106
+ Import `callLinearGraphQL` and `createLinearAgentActivity` from
107
+ `eve/channels/linear` when a custom integration needs a direct API call.
108
+ `callLinearGraphQL<T>({ query, queryName, variables?, credentials?, api? })`
109
+ returns the response's `data` as `T` and throws `LinearApiError` for HTTP or
110
+ GraphQL errors. `createLinearAgentActivity({ activity, credentials?, api? })`
111
+ posts an activity to a Linear Agent Session and returns `{ id, success }`.
112
+ Both accept `credentials.accessToken` and optional API overrides; prefer the
113
+ channel context's API handle when it already has the configured credentials.
114
+
104
115
  ## Custom hooks
105
116
 
106
117
  Return `{ auth }` to dispatch, or `null` to acknowledge without waking the agent. Return `title` alongside `auth` to set the title when the dispatch starts a run.
@@ -37,10 +37,14 @@ export default linqChannel({
37
37
  });
38
38
  ```
39
39
 
40
- Set `route` to override the webhook path or `webhookVerifier` to use a different trusted-forwarder verifier. A verifier rejects a webhook by throwing or returning a falsy value such as `null` or `false`.
40
+ Set `route` to override the webhook path or `webhookVerifier` (typed `LinqWebhookVerifier` from `eve/channels/linq`) to use a different trusted-forwarder verifier. A verifier receives the request and its raw body bytes, and rejects a webhook by throwing or returning a falsy value such as `null` or `false`.
41
41
 
42
42
  ## Tapbacks
43
43
 
44
+ `IMESSAGE_TAPBACKS` from `eve/channels/linq` lists the built-in tapback names.
45
+ Use it to populate a picker or validate a named reaction. Tapback APIs can also
46
+ accept a single emoji; the list does not enumerate those.
47
+
44
48
  eve ignores tapbacks people send unless you pass `onTapback`. It receives the tapback and returns the same result as `onMessage`, or `null` to ignore it:
45
49
 
46
50
  ```ts title="agent/channels/linq.ts"