eve 0.90.0 → 0.91.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 (185) hide show
  1. package/CHANGELOG.md +34 -23
  2. package/dist/src/channel/auth/http-basic.js +1 -1
  3. package/dist/src/channel/channel-operations.d.ts +1 -1
  4. package/dist/src/channel/types.d.ts +2 -0
  5. package/dist/src/cli/dev/tui/prompt-commands.d.ts +1 -1
  6. package/dist/src/client/session.d.ts +1 -1
  7. package/dist/src/compiled/.vendor-stamp.json +1 -1
  8. package/dist/src/execution/dynamic-workflow/tool.js +1 -1
  9. package/dist/src/execution/proxied-deliver-step.js +1 -1
  10. package/dist/src/execution/sandbox/bash.js +2 -2
  11. package/dist/src/execution/session/active-turn.js +1 -1
  12. package/dist/src/execution/session/admission.d.ts +6 -0
  13. package/dist/src/execution/session/admission.js +1 -1
  14. package/dist/src/execution/session/delivery-facts.js +1 -1
  15. package/dist/src/execution/session/next-input.d.ts +2 -2
  16. package/dist/src/execution/session/next-input.js +1 -1
  17. package/dist/src/execution/session/program.js +1 -1
  18. package/dist/src/execution/session-inbox/inbox.d.ts +2 -2
  19. package/dist/src/execution/session-inbox/inbox.js +1 -1
  20. package/dist/src/execution/session-inbox/protocol.js +1 -1
  21. package/dist/src/execution/tools/agent-router-workflow.js +1 -1
  22. package/dist/src/harness/compaction/engine.js +2 -2
  23. package/dist/src/harness/current-messages.js +1 -1
  24. package/dist/src/harness/emission.d.ts +3 -0
  25. package/dist/src/harness/emission.js +1 -1
  26. package/dist/src/harness/facts.d.ts +5 -2
  27. package/dist/src/harness/facts.js +1 -1
  28. package/dist/src/harness/model-call/call.d.ts +7 -1
  29. package/dist/src/harness/model-call/call.js +3 -1
  30. package/dist/src/harness/provider-tool-history.d.ts +8 -0
  31. package/dist/src/harness/provider-tool-history.js +1 -1
  32. package/dist/src/harness/session-machine/transitions.d.ts +3 -2
  33. package/dist/src/harness/step/after-model.js +1 -1
  34. package/dist/src/harness/step/context.js +1 -1
  35. package/dist/src/harness/step/intake.js +1 -1
  36. package/dist/src/harness/step/prompt.js +1 -1
  37. package/dist/src/harness/tool-history-repair.d.ts +2 -0
  38. package/dist/src/harness/tool-history-repair.js +1 -1
  39. package/dist/src/harness/tool-loop.js +1 -1
  40. package/dist/src/internal/application/stamped-package-version.js +1 -1
  41. package/dist/src/protocol/session-events/families/delivery.d.ts +5 -3
  42. package/dist/src/protocol/session-events/families/delivery.js +1 -1
  43. package/dist/src/protocol/session-projection/fold.js +1 -1
  44. package/dist/src/public/channels/discord/hitl.js +1 -1
  45. package/dist/src/public/channels/slack/hitl.d.ts +2 -1
  46. package/dist/src/public/channels/slack/hitl.js +3 -3
  47. package/dist/src/public/channels/slack/interaction-cards.js +1 -1
  48. package/dist/src/public/channels/slack/request-card-render.js +1 -1
  49. package/dist/src/public/channels/teams/hitl.js +1 -1
  50. package/dist/src/public/channels/teams/verify.js +1 -1
  51. package/dist/src/public/definitions/hook.d.ts +90 -7
  52. package/dist/src/public/definitions/hook.js +1 -1
  53. package/dist/src/public/hooks/index.d.ts +3 -2
  54. package/dist/src/reactions/continuation.d.ts +19 -0
  55. package/dist/src/reactions/continuation.js +1 -0
  56. package/dist/src/reactions/intents.d.ts +10 -4
  57. package/dist/src/reactions/intents.js +1 -1
  58. package/dist/src/reactions/kinds/hook.js +1 -1
  59. package/dist/src/reactions/runner.js +1 -1
  60. package/dist/src/reactions/state.d.ts +15 -2
  61. package/dist/src/reactions/state.js +1 -1
  62. package/dist/src/runtime/resolve-connection.js +1 -1
  63. package/dist/src/runtime/subagents/workflow.js +1 -1
  64. package/dist/src/setup/primitives/open-url.js +1 -1
  65. package/dist/src/setup/scaffold/create/project.js +1 -1
  66. package/dist/src/shared/value-delta.d.ts +5 -4
  67. package/dist/src/shared/value-delta.js +1 -1
  68. package/dist/src/tools/provided/ask-question-workflow.js +1 -1
  69. package/dist/src/tools/provided/sleep-workflow.js +1 -1
  70. package/dist/src/tools/provided/web-fetch.js +1 -1
  71. package/docs/agent-config.md +199 -222
  72. package/docs/channels/chat-sdk.mdx +60 -64
  73. package/docs/channels/custom.mdx +264 -281
  74. package/docs/channels/discord.mdx +176 -123
  75. package/docs/channels/eve.mdx +136 -206
  76. package/docs/channels/github.mdx +24 -22
  77. package/docs/channels/linear.mdx +30 -30
  78. package/docs/channels/linq.mdx +25 -13
  79. package/docs/channels/mcp.mdx +154 -116
  80. package/docs/channels/overview.mdx +31 -32
  81. package/docs/channels/photon.mdx +32 -56
  82. package/docs/channels/slack.mdx +538 -375
  83. package/docs/channels/teams.mdx +40 -26
  84. package/docs/channels/telegram.mdx +13 -13
  85. package/docs/channels/twilio.mdx +11 -11
  86. package/docs/code-extension.mdx +40 -42
  87. package/docs/concepts/built-in-tools.md +89 -57
  88. package/docs/concepts/context-control.md +20 -20
  89. package/docs/concepts/default-harness.md +20 -36
  90. package/docs/concepts/execution-model-and-durability.mdx +96 -160
  91. package/docs/concepts/project-structure.mdx +21 -14
  92. package/docs/concepts/security-model.md +27 -27
  93. package/docs/concepts/sessions-runs-and-streaming.md +184 -198
  94. package/docs/concepts/state.md +7 -15
  95. package/docs/connections/mcp.mdx +109 -93
  96. package/docs/connections/openapi.mdx +57 -59
  97. package/docs/connections/overview.mdx +175 -170
  98. package/docs/evals/assertions.mdx +36 -29
  99. package/docs/evals/cases.mdx +38 -42
  100. package/docs/evals/judge.mdx +21 -29
  101. package/docs/evals/overview.mdx +42 -38
  102. package/docs/evals/reporters.mdx +54 -27
  103. package/docs/evals/running.mdx +15 -8
  104. package/docs/evals/targets.mdx +16 -19
  105. package/docs/evals/tool-stubs.mdx +111 -97
  106. package/docs/experimental/dynamic-schedules.mdx +118 -63
  107. package/docs/extensions.md +58 -65
  108. package/docs/getting-started.mdx +4 -6
  109. package/docs/guides/auth-and-route-protection.md +87 -70
  110. package/docs/guides/client/continuations.mdx +23 -26
  111. package/docs/guides/client/messages.mdx +47 -66
  112. package/docs/guides/client/output-schema.mdx +8 -8
  113. package/docs/guides/client/overview.mdx +45 -43
  114. package/docs/guides/client/streaming.mdx +62 -71
  115. package/docs/guides/decide.md +24 -79
  116. package/docs/guides/deployment/meta.json +1 -1
  117. package/docs/guides/deployment/overview.md +27 -18
  118. package/docs/guides/deployment/self-hosted-operations.md +99 -0
  119. package/docs/guides/deployment/self-hosting.md +63 -80
  120. package/docs/guides/deployment/vercel.mdx +31 -27
  121. package/docs/guides/deployment/workflow-worlds.md +100 -0
  122. package/docs/guides/dev-tui.md +48 -41
  123. package/docs/guides/dynamic-capabilities.md +49 -50
  124. package/docs/guides/frontend/nextjs.mdx +2 -2
  125. package/docs/guides/frontend/nuxt.mdx +11 -11
  126. package/docs/guides/frontend/overview.mdx +1 -1
  127. package/docs/guides/frontend/sveltekit.mdx +11 -11
  128. package/docs/guides/frontend/tanstack.mdx +16 -16
  129. package/docs/guides/frontend/use-eve-agent-svelte.mdx +21 -21
  130. package/docs/guides/frontend/use-eve-agent-vue.mdx +22 -22
  131. package/docs/guides/frontend/use-eve-agent.mdx +25 -25
  132. package/docs/guides/hooks.md +152 -106
  133. package/docs/guides/instrumentation/agent-runs.mdx +26 -30
  134. package/docs/guides/instrumentation/instrumentation.mdx +49 -76
  135. package/docs/guides/instrumentation/meta.json +1 -1
  136. package/docs/guides/instrumentation/otel.mdx +113 -179
  137. package/docs/guides/remote-agents.md +125 -187
  138. package/docs/guides/self-modification.md +18 -18
  139. package/docs/guides/session-context.md +16 -16
  140. package/docs/install-integrations.mdx +26 -24
  141. package/docs/instructions.mdx +37 -42
  142. package/docs/memory/custom-provider.md +35 -41
  143. package/docs/memory/file.md +93 -76
  144. package/docs/memory/overview.mdx +145 -156
  145. package/docs/patterns/durable-cross-channel-notifications.md +15 -19
  146. package/docs/patterns/dynamic-scheduling.md +19 -23
  147. package/docs/patterns/multi-tenant-approvals.md +17 -22
  148. package/docs/patterns/multi-tenant-auth.md +43 -42
  149. package/docs/patterns/multi-tenant-memory.md +39 -36
  150. package/docs/patterns/voice-notes.md +3 -3
  151. package/docs/protocols/acp.md +13 -13
  152. package/docs/protocols/ucp.mdx +7 -7
  153. package/docs/reference/agent-files.md +6 -6
  154. package/docs/reference/cli.md +99 -98
  155. package/docs/reference/telemetry.md +1 -1
  156. package/docs/reference/typescript-api.md +52 -53
  157. package/docs/responsible-use.md +2 -2
  158. package/docs/sandbox/custom-providers.mdx +60 -56
  159. package/docs/sandbox/default.mdx +23 -24
  160. package/docs/sandbox/docker.mdx +16 -10
  161. package/docs/sandbox/index.mdx +93 -61
  162. package/docs/sandbox/just-bash.mdx +17 -11
  163. package/docs/sandbox/troubleshooting.mdx +29 -23
  164. package/docs/sandbox/vercel.mdx +45 -52
  165. package/docs/schedules.mdx +65 -54
  166. package/docs/skills.mdx +74 -49
  167. package/docs/subagents/index.mdx +97 -136
  168. package/docs/tools/human-in-the-loop.md +160 -90
  169. package/docs/tools/meta.json +1 -1
  170. package/docs/tools/overview.mdx +229 -237
  171. package/docs/tools/tasks.md +118 -117
  172. package/docs/tools/workflows.mdx +447 -543
  173. package/docs/tutorial/connect-a-warehouse.mdx +11 -13
  174. package/docs/tutorial/first-agent.mdx +14 -16
  175. package/docs/tutorial/guard-the-spend.mdx +6 -8
  176. package/docs/tutorial/how-it-runs.mdx +8 -8
  177. package/docs/tutorial/query-sample-data.mdx +8 -8
  178. package/docs/tutorial/remember-definitions.mdx +4 -4
  179. package/docs/tutorial/run-analysis.mdx +20 -22
  180. package/docs/tutorial/ship-it.mdx +19 -19
  181. package/docs/tutorial/team-playbooks.mdx +9 -9
  182. package/docs/use-cases.mdx +13 -11
  183. package/package.json +1 -1
  184. package/docs/guides/instrumentation/migration.md +0 -96
  185. package/docs/tools/tasks-upgrade.md +0 -218
@@ -3,9 +3,9 @@ title: "Chat SDK"
3
3
  description: "Bridge any Vercel Chat SDK adapter — Slack, Discord, Telegram, WhatsApp, email, and more — to your agent through one channel, using your own credentials and state store."
4
4
  ---
5
5
 
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.
6
+ The Chat SDK channel connects your agent to any [Vercel Chat SDK](https://chat-sdk.dev) adapter, such as `@chat-adapter/slack` or `@resend/chat-sdk-adapter`. It lives in a file under `agent/channels/`, such as `agent/channels/resend.ts`. You register handlers for the messages you care about, and call `send` to hand each one to eve. Use it for a surface without a built-in eve channel, or to manage credentials and state with Chat SDK instead of [Vercel Connect](../guides/auth-and-route-protection).
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) use their own channel APIs and can manage credentials through Vercel Connect or environment variables you configure directly.
8
+ The adapter handles provider auth, webhook verification, and posting messages, and you supply its state store. eve handles sessions, streaming, typing indicators, and human-in-the-loop prompts. Built-in channels such as [Slack](./slack) have their own APIs and take credentials from Vercel Connect or environment variables.
9
9
 
10
10
  ## Install
11
11
 
@@ -15,11 +15,11 @@ Add eve, the Chat SDK core (`chat`), an adapter, and a state adapter. The exampl
15
15
  npm install eve@latest chat @resend/chat-sdk-adapter @chat-adapter/state-memory
16
16
  ```
17
17
 
18
- Swap in whichever adapter matches your surface — `@chat-adapter/slack`, `@chat-adapter/discord`, `@chat-adapter/telegram`, and so on. Any Chat SDK adapter works.
18
+ Any Chat SDK adapter works, such as `@chat-adapter/slack`, `@chat-adapter/discord`, or `@chat-adapter/telegram`.
19
19
 
20
20
  ## Add the channel
21
21
 
22
- `chatSdkChannel` returns `{ bot, channel, send }`. Register Chat SDK handlers on `bot`, call `send` from those handlers to start or resume an eve session, and export `channel` as the module default:
22
+ `chatSdkChannel` returns `{ bot, channel, send }`. Register Chat SDK handlers on `bot`, and call `send` from those handlers to start or resume an eve session. Export `channel` as the module default:
23
23
 
24
24
  ```ts title="agent/channels/resend.ts"
25
25
  import { createMemoryState } from "@chat-adapter/state-memory";
@@ -29,13 +29,16 @@ import { chatSdkChannel } from "eve/channels/chat-sdk";
29
29
 
30
30
  export const { bot, channel, send } = chatSdkChannel({
31
31
  userName: "Resend Bot",
32
+ // One webhook per adapter, at /eve/v1/<name>.
32
33
  adapters: {
33
34
  resend: createResendAdapter({
34
35
  fromAddress: "hello@example.com",
35
36
  fromName: "Resend Bot",
36
37
  }),
37
38
  },
39
+ // In-memory state is for local development only.
38
40
  state: createMemoryState(),
41
+ // Email can't edit a sent message, so post each reply once.
39
42
  streaming: false,
40
43
  });
41
44
 
@@ -51,67 +54,56 @@ bot.onSubscribedMessage(async (thread: Thread, message: Message) => {
51
54
  export default channel;
52
55
  ```
53
56
 
54
- `adapters` is a map of adapter name to adapter instance; each entry mounts its own webhook (see below). `state` takes any Chat SDK state adapter: `createMemoryState()` is fine for local development, but use a durable adapter (Redis, Upstash, etc.) in production so thread subscriptions and inbound deduplication survive restarts. `send` accepts a plain string or an array of message parts, and must be called from inside a Chat SDK handler — it dispatches the turn on the webhook that is currently running.
57
+ - `state` takes any Chat SDK state adapter. In production, use a persistent adapter such as Redis or Upstash, so thread subscriptions and duplicate checks survive restarts.
58
+ - `send` accepts a string or an array of message parts. Call it inside a Chat SDK handler, because it starts the turn on the running webhook.
59
+ - Pass `idempotencyKey: message.id` to `send` so a retried message reaches the agent once within the session's [recent-key window](./custom#retried-deliveries). Chat SDK can mark a message as seen before eve accepts it, so a shared state adapter alone doesn't guarantee the agent gets it.
55
60
 
56
- Pass `idempotencyKey: message.id` to `send` to prevent duplicate agent input
57
- within the session's [recent-key window](./custom#retried-deliveries). Chat SDK's
58
- separate duplicate check can mark a message as seen before eve accepts it, so
59
- a shared state adapter alone does not guarantee delivery.
60
-
61
- Deploy once the channel file is in place:
61
+ Deploy to Vercel production, linking the project if needed:
62
62
 
63
63
  ```bash
64
64
  eve deploy
65
65
  ```
66
66
 
67
- `eve deploy` links the project if needed and deploys to Vercel production.
68
-
69
67
  ## Configure the webhook route
70
68
 
71
- Each adapter registers `GET` and `POST` handlers at `/eve/v1/{adapterName}`, so the `resend` adapter above is served at `/eve/v1/resend`. Point your provider's webhook (the Resend inbound address, the Slack Event Subscriptions URL, etc.) at that path. The adapter handles the incoming method. For example, X sends its webhook-verification challenge with `GET` and delivers events with `POST`.
69
+ Each adapter serves `GET` and `POST` at `/eve/v1/{adapterName}`, so the `resend` adapter above is at `/eve/v1/resend`. Point your provider's webhook, such as the Resend inbound address or the Slack Event Subscriptions URL, at that path. The adapter handles each method. For example, X sends its verification challenge with `GET` and events with `POST`.
72
70
 
73
- Override the base path for every adapter with `route`, or pin an individual adapter's path with `routes`:
71
+ Set `route` to change the base path for every adapter, or `routes` to pin one adapter's path:
74
72
 
75
73
  ```ts
76
74
  export const { bot, channel, send } = chatSdkChannel({
77
75
  userName: "Resend Bot",
78
76
  adapters: { resend: createResendAdapter({ fromAddress: "hello@example.com" }) },
79
77
  state: createMemoryState(),
80
- route: "/webhooks", // resend now mounts at /webhooks/resend
78
+ route: "/webhooks", // resend mounts at /webhooks/resend
81
79
  routes: { resend: "/webhooks/inbound-email" }, // …or pin it exactly
82
80
  });
83
81
  ```
84
82
 
85
- Use `routes` when a provider requires a fixed URL or when you are migrating an existing endpoint without changing the provider's settings.
86
-
87
- ## Audience
88
-
89
- Workspace-visible threads are `public`. DMs and private or external threads
90
- are `private`; threads without a known visibility are `unknown`. The audience
91
- controls observability content capture, not access to the thread. See
92
- [Audience](./overview#audience) for the shared channel model.
83
+ Use `routes` when a provider requires a fixed URL, or to keep an existing endpoint without changing the provider's settings.
93
84
 
94
85
  ## How the channel handles messages
95
86
 
96
87
  ### Dispatch
97
88
 
98
- You choose which Chat SDK events start a turn by registering handlers on `bot` and calling `send`:
89
+ A turn starts when a handler you register on `bot` calls `send`:
99
90
 
100
- - `bot.onNewMention(thread, message)` fires on a fresh `@mention` (or, for surfaces like email, a new inbound thread). Call `thread.subscribe()` when you want later replies in the same thread to keep reaching the agent.
101
- - `bot.onSubscribedMessage(thread, message)` fires on subsequent messages in a subscribed thread.
102
- - `bot.onAction`, `bot.onReaction`, and `bot.onSlashCommand` are available for adapters that emit them.
91
+ - `bot.onNewMention(thread, message)` fires on a new `@mention`, or a new inbound thread on surfaces like email. Call `thread.subscribe()` so later replies in the thread keep reaching the agent.
92
+ - `bot.onSubscribedMessage(thread, message)` fires on later messages in a subscribed thread.
93
+ - `bot.onAction`, `bot.onReaction`, and `bot.onSlashCommand` fire for adapters that emit them.
103
94
 
104
- `send(message, options)` starts or resumes the eve session. The `thread` you pass determines the continuation token and the persisted channel state, so replies land back on the originating thread:
95
+ `send(message, options)` starts or resumes the eve session. The `thread` you pass picks the session, so replies land on that thread:
105
96
 
106
97
  ```ts
107
98
  bot.onNewMention(async (thread, message) => {
99
+ // `title` sets the session's display title without changing the model message.
108
100
  await send(message.text, { thread, title: "Support request" });
109
101
  });
110
102
  ```
111
103
 
112
- `options` accepts `thread` and `adapterName`, plus the channel send options `auth`, `context`, `outputSchema`, `title`, `callback`, `turnPolicy`, and `idempotencyKey`. `title` sets the eve session's display title without changing the model message; `auth` attaches an authenticated principal to the turn. `auth` defaults to `null`.
104
+ `options` accepts `thread` and `adapterName`, plus the channel send options `auth`, `context`, `outputSchema`, `title`, `callback`, `turnPolicy`, and `idempotencyKey`. `auth` names who the turn runs as. Omit it for `null`, an anonymous turn.
113
105
 
114
- To answer pending input requests from a handler you render yourself, call `respond(answers, { thread, auth?, context? })`. Like a channel's `respond()`, it never creates a session. This example answers a custom button whose `value` carries the interaction id:
106
+ To answer open approvals and questions from controls you render yourself, call `respond(answers, { thread, auth?, context? })`. It never creates a session. This example answers a custom button whose `value` carries the request's `interactionId`:
115
107
 
116
108
  ```ts
117
109
  export const { bot, channel, send, respond } = chatSdkChannel({/* ... */});
@@ -124,9 +116,9 @@ bot.onAction("approve_deploy", async (event) => {
124
116
 
125
117
  ### Steering
126
118
 
127
- Messages default to `turnPolicy: "steer"`. Before assistant answer output or local tool execution begins, steering interrupts pending model generation and applies the correction in the same turn. Executing tools finish and checkpoint their results first. After answer output starts, steering waits for the next committed workflow boundary. Reasoning and search progress do not count as answer output; interrupted provider-managed search may run again.
119
+ By default, a message that arrives while the agent is answering joins the running turn (`turnPolicy: "steer"`). The turn keeps its ID and completed tool work. [Message delivery and steering](../concepts/execution-model-and-durability#message-delivery-and-steering) says when it applies. With no active turn, the message starts one.
128
120
 
129
- Set `turnPolicy: "queue"` when the active turn should finish first:
121
+ Set `turnPolicy: "queue"` to let the active turn finish first:
130
122
 
131
123
  ```ts
132
124
  bot.onSubscribedMessage(async (thread, message) => {
@@ -137,34 +129,21 @@ bot.onSubscribedMessage(async (thread, message) => {
137
129
  });
138
130
  ```
139
131
 
140
- Steering preserves the turn ID and completed tool work. If no turn is active, the message starts a turn normally. You can set the policy once on `chatSdkChannel({ turnPolicy })` or override it per `send(...)`.
141
-
142
- 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.
132
+ Set the policy on `chatSdkChannel({ turnPolicy })` or per `send(...)`. `turnPolicy` governs overlapping eve turns, and Chat SDK's `concurrency` option governs overlapping webhook handlers. Use `concurrency: "concurrent"` so each new message reaches the running turn at once.
143
133
 
144
134
  ### Delivery
145
135
 
146
- The default handlers post the agent's reply back to the thread — no `events` override required. Completed assistant messages are posted as markdown (`{ markdown: … }`) so adapters render rich text and email HTML rather than a raw string.
136
+ The default handlers post the agent's reply to the thread as markdown (`{ markdown: … }`), so adapters render rich text and email HTML.
147
137
 
148
- Streaming is on by default: the channel posts an initial message and edits it as text arrives (`content.delta`), throttled by `streamingEditIntervalMs` (default `1000`). On completion it edits the message once more to show the full text, skipping that edit when the message already shows it.
138
+ By default the channel streams. It posts a message and edits it as text arrives (`content.delta`), at most once per `streamingEditIntervalMs`. A last edit adds the full text if needed, and the channel never posts the streamed reply again. If the final edit fails, the channel logs the error and posts a short notice with the error id. On the next message, it tells the model that the user hasn't seen its reply.
149
139
 
150
- The streamed message is the reply, so the channel never posts the reply a second time. When the final reply edit fails, it logs the error, posts a short notice with the error id, and tells the model on the next message that the user hasn't seen its reply.
140
+ Set `streaming: false` for surfaces that send one message per turn or can't edit messages, such as email and WhatsApp. The reply then posts once, when the turn completes.
151
141
 
152
- Set `streaming: false` for surfaces that deliver one message per turn or can't edit sent messages — email and WhatsApp, for example — so the reply posts once on completion instead of editing:
153
-
154
- ```ts
155
- chatSdkChannel({
156
- userName: "Resend Bot",
157
- adapters: { resend: createResendAdapter({ fromAddress: "hello@example.com" }) },
158
- state: createMemoryState(),
159
- streaming: false,
160
- });
161
- ```
162
-
163
- Typing indicators post automatically where the adapter supports them: `Working…` on `turn.started`, and on `call.requested`, each call's [label](/docs/tools#label-tool-activity) or a readable form of its name. They leave out the model's own `eve__task_wait` and `eve__task_cancel` calls.
142
+ Where the adapter supports typing indicators, the channel shows `Working…` when a turn starts. On each tool call, it shows the call's [label](/docs/tools#label-tool-activity) or readable name, except for `eve__task_wait` and `eve__task_cancel`.
164
143
 
165
144
  ### Optional capabilities degrade gracefully
166
145
 
167
- Adapters do not all implement every operation. When an adapter's `startTyping` throws a `NotImplementedError` (or an error with code `NOT_IMPLEMENTED`), typing indicators are skipped. An unsupported `editMessage` disables streaming edits for the rest of the session, so later replies post once on completion. If a reply already has a streamed message, eve still attempts the final edit and reports a failure as described above; it never posts the reply again beside that message. The same predicate is exported as `isNotImplemented` if you want it in custom `events`:
146
+ When an adapter's `startTyping` throws a `NotImplementedError`, or an error with code `NOT_IMPLEMENTED`, the channel skips typing indicators. An unsupported `editMessage` turns off streaming edits for the rest of the session, so later replies post once at the end. A reply that already has a streamed message still gets the final edit attempt, and a failure is reported as above. Use the same check in custom `events` with `isNotImplemented`:
168
147
 
169
148
  ```ts
170
149
  import { isNotImplemented } from "eve/channels/chat-sdk";
@@ -190,7 +169,12 @@ chatSdkChannel({
190
169
 
191
170
  ### Human-in-the-loop (HITL)
192
171
 
193
- HITL prompts render as a Chat SDK `Card` with buttons. Button clicks resume the parked session automatically — the channel wires `bot.onAction` to `respond` for you. Adapters that can't render cards, such as Photon iMessage, get fallback text with the options numbered. A reply forwarded through `send` with an option's number or label answers the pending request, so `1` or `approve` runs an approval-gated tool and `2` or `cancel` stops it. If the question allows a custom answer, or has no options, the message asks for a typed reply and any other text is taken as that answer. Change the action-id prefix with `inputActionPrefix` (default `eve_input:`) if your app already uses it, and provide `resolveInputAuth` to carry user or tenant auth across the resume:
172
+ Approvals and questions render as a Chat SDK `Card` with buttons, and the channel wires `bot.onAction` to `respond`, so clicks resume the session. Adapters that can't render cards, such as Photon iMessage, get text with numbered options:
173
+
174
+ - A reply sent through `send` with an option's number or label answers the request. For example, `1` or `approve` runs an approval-gated tool, and `2` or `cancel` stops it.
175
+ - If the question allows a custom answer or has no options, any other text is the answer.
176
+
177
+ Set `inputActionPrefix` if your app already uses the default `eve_input:` prefix. Set `resolveInputAuth` to keep user or tenant auth when a click resumes the session:
194
178
 
195
179
  ```ts
196
180
  chatSdkChannel({
@@ -208,13 +192,13 @@ chatSdkChannel({
208
192
 
209
193
  ### Sign-ins
210
194
 
211
- When a tool needs a connection the person hasn't authorized, eve shows a sign-in prompt with the connection's link, code, or instructions. In a direct message it posts the prompt in the thread and edits it once the sign-in completes.
195
+ When a tool needs a connection the person hasn't authorized, eve shows a sign-in prompt with the connection's link, code, or instructions. In a direct message, eve posts the prompt in the thread and edits it once the sign-in completes.
212
196
 
213
- Outside a direct message, the prompt is a credential, so eve sends it only to the person signing in. It uses the adapter's native ephemeral message where there is one and otherwise opens a direct message with them. The thread gets a status without the link, which eve edits once the sign-in completes.
197
+ Elsewhere, the prompt is a credential, so eve sends it only to the person signing in. It uses an ephemeral message where the adapter supports one, and otherwise a direct message. The thread gets a status without the link, which eve edits once the sign-in completes.
214
198
 
215
- To find that person, eve matches the turn's `auth` principal to the author of the message you passed to `send`. Private delivery therefore needs both:
199
+ eve finds that person by matching the turn's `auth` user to the author of the message you passed to `send`. Private sign-ins need both of these:
216
200
 
217
- - per-person `auth` on each `send`, so a principal names one person; and
201
+ - per-person `auth` on each `send`, so each `auth` names one person; and
218
202
  - the handler's `Thread` object as `thread`, rather than a thread id string, so eve sees who wrote the message.
219
203
 
220
204
  ```ts
@@ -231,11 +215,11 @@ bot.onSubscribedMessage(async (thread, message) => {
231
215
  });
232
216
  ```
233
217
 
234
- Without both, including with the default `auth: null`, the thread only gets a notice to continue in a direct message, and the prompt isn't shown anywhere. The same happens when several people send as one principal (such as tenant auth), or when the adapter has neither ephemerals nor `openDM`.
218
+ Without both, including with the default `auth: null`, the thread gets only a notice to continue in a direct message, and the prompt isn't shown anywhere. The same happens when several people share one `auth`, such as tenant auth, or when the adapter has neither ephemerals nor `openDM`.
235
219
 
236
220
  ### Proactive sessions
237
221
 
238
- Start a session without an inbound webhook through `to(channel, target).send(message, { auth })` from a schedule `run` handler, or `ctx.to(channel, target).send(message, { auth })` from another channel. The target is a serialized Chat SDK thread, or `{ threadId, adapterName }` when you only have a provider-native thread id:
222
+ To start a session without an incoming webhook, call `to(channel, target).send(message, { auth })` from a schedule `run` handler, or `ctx.to(channel, target).send(message, { auth })` from another channel. The target is a serialized Chat SDK thread, or `{ threadId, adapterName }` when you have only a provider-native thread id:
239
223
 
240
224
  ```ts
241
225
  await to(channel, { adapterName: "resend", threadId: "resend:user@example.com" }).send(
@@ -246,7 +230,7 @@ await to(channel, { adapterName: "resend", threadId: "resend:user@example.com" }
246
230
 
247
231
  ### Attachments
248
232
 
249
- `send` takes plain text or an array of message parts. To forward a Chat SDK message's attachments, convert it with `messageContentOf`. It returns `message.text` when there are no attachments, and message parts (the text plus one part per attachment) when there are:
233
+ To forward a Chat SDK message's attachments, convert it with `messageContentOf`. It returns `message.text` when there are no attachments. Otherwise it returns message parts: the text, plus one part per attachment:
250
234
 
251
235
  ```ts
252
236
  import { messageContentOf } from "eve/channels/chat-sdk";
@@ -256,11 +240,22 @@ bot.onNewMention(async (thread, message) => {
256
240
  });
257
241
  ```
258
242
 
259
- When the adapter can download an attachment (it sets `fetchData`, as the Slack, Google Chat, WhatsApp, and Twilio adapters do), eve downloads it with the adapter's credentials when the turn runs, not in the webhook, and passes the bytes. Platform file URLs usually need those credentials, so the model provider couldn't open them. eve rebuilds the download with the adapter's `rehydrateAttachment`; an adapter without one can't download after the webhook returns, so its files reach the agent as a short note. A failed download, or a file over 25 MB, also becomes a note. An attachment with only a URL is downloaded by eve when the URL is public `https:`; otherwise it becomes a note. An attachment with neither a download nor a URL also becomes a note, so the agent still knows a file was sent.
243
+ When the adapter sets `fetchData`, as the Slack, Google Chat, WhatsApp, and Twilio adapters do, eve downloads the attachment when the turn runs. It uses the adapter's credentials and `rehydrateAttachment`, and passes the file bytes, because the model provider can't open platform URLs that need credentials. An attachment with only a URL is downloaded when the URL is public `https:`.
244
+
245
+ Every other attachment reaches the agent as a short note, so the agent still knows a file was sent. This covers:
246
+
247
+ - an attachment from an adapter without `rehydrateAttachment`;
248
+ - a non-public URL or a failed download;
249
+ - a file over 25 MB; and
250
+ - an attachment with neither a download nor a URL.
260
251
 
261
252
  Audio attachments, such as voice notes, reach the model as a file label, not as sound. To answer them, give the agent a transcription tool; see [Voice notes](../patterns/voice-notes).
262
253
 
263
- See [File uploads](./custom#file-uploads) for how eve stages remote file URLs before the model call.
254
+ See [File uploads](./custom#file-uploads) for how eve prepares remote file URLs before the model call.
255
+
256
+ ## Audience
257
+
258
+ Workspace-visible threads are `public`, DMs and private or external threads are `private`, and threads of unknown visibility are `unknown`. The audience controls which message content observability records, not who can access the thread. See [Audience](./overview#audience).
264
259
 
265
260
  ## Configuration reference
266
261
 
@@ -270,7 +265,7 @@ See [File uploads](./custom#file-uploads) for how eve stages remote file URLs be
270
265
  | `state` | — | Chat SDK state adapter for subscriptions, locks, and dedupe. |
271
266
  | `userName` | — | Display name for the bot (a standard Chat SDK `ChatConfig` field). |
272
267
  | `route` | `/eve/v1` | Base path for generated adapter webhooks (`{route}/{adapter}`). |
273
- | `routes` | — | Per-adapter path overrides for fixed or migrated webhook URLs. |
268
+ | `routes` | — | Per-adapter path overrides for fixed or existing webhook URLs. |
274
269
  | `streaming` | `true` | Post-then-edit streaming. Set `false` for one-message-per-turn surfaces. |
275
270
  | `streamingEditIntervalMs` | `1000` | Minimum interval between streaming edits. |
276
271
  | `events` | built-in | Per-event handlers. A supplied handler replaces that built-in default. |
@@ -282,6 +277,7 @@ Any other Chat SDK `ChatConfig` field (for example `concurrency`) is accepted an
282
277
 
283
278
  ## What to read next
284
279
 
285
- - [Channels overview](./overview): the channel contract and every built-in channel
280
+ - [Channels overview](./overview): what every channel shares, and every built-in channel
281
+ - [Slack](./slack), [Discord](./discord), and [Telegram](./telegram): built-in channels with platform-specific APIs
286
282
  - [Custom channels](./custom): build a channel for any surface with `defineChannel`
287
283
  - [Auth & route protection](../guides/auth-and-route-protection): authenticating inbound traffic