eve 0.31.3 → 0.32.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 (205) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/src/chunks/{use-eve-agent-CF5D6jSV.js → use-eve-agent-CX87G1vU.js} +30 -5
  3. package/dist/src/chunks/{use-eve-agent-DbYZLG0h.js → use-eve-agent-DwyRde1N.js} +30 -5
  4. package/dist/src/cli/commands/integration-connect.d.ts +1 -0
  5. package/dist/src/cli/commands/integration-connect.js +1 -1
  6. package/dist/src/cli/commands/integration-setup.d.ts +4 -0
  7. package/dist/src/cli/commands/integration-setup.js +1 -1
  8. package/dist/src/cli/commands/register-integration-commands.js +1 -1
  9. package/dist/src/cli/commands/register-registry-commands.js +1 -1
  10. package/dist/src/cli/commands/registry-declared-setups.d.ts +23 -0
  11. package/dist/src/cli/commands/registry-declared-setups.js +1 -0
  12. package/dist/src/cli/commands/registry-metadata.d.ts +69 -0
  13. package/dist/src/cli/commands/registry-metadata.js +1 -1
  14. package/dist/src/cli/commands/registry-package.d.ts +3 -3
  15. package/dist/src/cli/commands/registry-package.js +1 -1
  16. package/dist/src/cli/commands/registry-presentation.d.ts +20 -0
  17. package/dist/src/cli/commands/registry-presentation.js +7 -0
  18. package/dist/src/cli/commands/registry-search-presentation.d.ts +16 -0
  19. package/dist/src/cli/commands/registry-search-presentation.js +6 -0
  20. package/dist/src/cli/commands/registry-setup-command.d.ts +5 -2
  21. package/dist/src/cli/commands/registry-setup-command.js +1 -2
  22. package/dist/src/cli/commands/registry.d.ts +16 -7
  23. package/dist/src/cli/commands/registry.js +1 -6
  24. package/dist/src/cli/commands/setup-answers.d.ts +2 -0
  25. package/dist/src/cli/commands/setup-answers.js +1 -0
  26. package/dist/src/cli/commands/setup-headless.d.ts +79 -0
  27. package/dist/src/cli/commands/setup-headless.js +1 -0
  28. package/dist/src/cli/dev/tui/runner.js +1 -1
  29. package/dist/src/cli/dev/tui/setup-commands.js +3 -3
  30. package/dist/src/cli/dev/tui/setup-flow.d.ts +8 -1
  31. package/dist/src/cli/dev/tui/terminal-renderer.js +12 -12
  32. package/dist/src/cli/dev/tui/traces/trace-conversation.d.ts +1 -1
  33. package/dist/src/cli/dev/tui/tui-prompter.js +1 -1
  34. package/dist/src/client/url.d.ts +5 -0
  35. package/dist/src/client/url.js +1 -1
  36. package/dist/src/compiled/.vendor-stamp.json +8 -8
  37. package/dist/src/compiled/@ai-sdk/anthropic/index.d.ts +33 -13
  38. package/dist/src/compiled/@ai-sdk/anthropic/index.js +4 -2
  39. package/dist/src/compiled/@ai-sdk/google/index.d.ts +50 -3
  40. package/dist/src/compiled/@ai-sdk/google/index.js +7 -7
  41. package/dist/src/compiled/@ai-sdk/mcp/index.d.ts +33 -3
  42. package/dist/src/compiled/@ai-sdk/mcp/index.js +1 -1
  43. package/dist/src/compiled/@ai-sdk/openai/index.d.ts +140 -9
  44. package/dist/src/compiled/@ai-sdk/openai/index.js +9 -6
  45. package/dist/src/compiled/@ai-sdk/otel/index.js +1 -1
  46. package/dist/src/compiled/@ai-sdk/provider/index.d.ts +300 -6
  47. package/dist/src/compiled/@ai-sdk/provider-utils/index.d.ts +70 -20
  48. package/dist/src/compiled/@opentelemetry/api/index.d.ts +2 -1
  49. package/dist/src/compiled/@photon-ai/chat-adapter-imessage/index.js +1 -1
  50. package/dist/src/compiled/@vercel/otel/index.d.ts +6 -0
  51. package/dist/src/compiled/@vercel/sandbox/index.js +1 -1
  52. package/dist/src/compiled/_chunks/node/undici-CUIybhQ2.js +95 -0
  53. package/dist/src/compiled/_chunks/workflow/dist-eUxFublw.js +77 -0
  54. package/dist/src/compiled/shadcn-registry/index.js +309 -215
  55. package/dist/src/compiler/extension-compatibility.d.ts +10 -10
  56. package/dist/src/compiler/extension-compatibility.js +1 -1
  57. package/dist/src/context/build-callback-context.js +1 -1
  58. package/dist/src/execution/authorization-callback-match.d.ts +14 -0
  59. package/dist/src/execution/authorization-callback-match.js +1 -0
  60. package/dist/src/execution/next-driver-action.d.ts +1 -0
  61. package/dist/src/execution/parked-delivery-wait.d.ts +16 -1
  62. package/dist/src/execution/parked-delivery-wait.js +1 -1
  63. package/dist/src/execution/sandbox/abort-bound-session.d.ts +1 -1
  64. package/dist/src/execution/sandbox/bindings/docker.js +1 -1
  65. package/dist/src/execution/sandbox/bindings/just-bash-runtime.js +1 -1
  66. package/dist/src/execution/sandbox/bindings/microsandbox-lifecycle.js +1 -1
  67. package/dist/src/execution/sandbox/bindings/microsandbox-runtime.d.ts +1 -0
  68. package/dist/src/execution/sandbox/bindings/microsandbox-runtime.js +1 -1
  69. package/dist/src/execution/sandbox/bindings/vercel.js +1 -1
  70. package/dist/src/execution/sandbox/ensure.js +1 -1
  71. package/dist/src/execution/session-command-inbox.d.ts +26 -1
  72. package/dist/src/execution/session-command-inbox.js +1 -1
  73. package/dist/src/execution/turn-execution-cursor.d.ts +1 -0
  74. package/dist/src/execution/turn-workflow.js +1 -1
  75. package/dist/src/execution/workflow-entry.js +1 -1
  76. package/dist/src/execution/workflow-steps.d.ts +3 -4
  77. package/dist/src/execution/workflow-steps.js +1 -1
  78. package/dist/src/harness/authorization.d.ts +24 -11
  79. package/dist/src/harness/authorization.js +1 -1
  80. package/dist/src/harness/input-extraction.js +1 -1
  81. package/dist/src/harness/input-requests.js +1 -1
  82. package/dist/src/harness/provider-tools.d.ts +1 -1
  83. package/dist/src/harness/provider-tools.js +1 -1
  84. package/dist/src/harness/tool-loop.js +2 -2
  85. package/dist/src/internal/application/package.js +1 -1
  86. package/dist/src/packages/eve-catalog/src/index.js +1 -1
  87. package/dist/src/protocol/routes.d.ts +8 -6
  88. package/dist/src/protocol/routes.js +1 -1
  89. package/dist/src/public/channels/slack/attachments.js +1 -1
  90. package/dist/src/public/channels/slack/defaults.js +1 -1
  91. package/dist/src/public/channels/slack/hitl.d.ts +14 -1
  92. package/dist/src/public/channels/slack/hitl.js +2 -2
  93. package/dist/src/public/definitions/callback-context.d.ts +2 -2
  94. package/dist/src/public/definitions/sandbox.d.ts +1 -1
  95. package/dist/src/public/definitions/tool.d.ts +9 -9
  96. package/dist/src/public/sandbox/index.d.ts +1 -1
  97. package/dist/src/public/tools/web-search.d.ts +2 -2
  98. package/dist/src/runtime/connections/callback-route.d.ts +4 -5
  99. package/dist/src/runtime/connections/callback-route.js +1 -1
  100. package/dist/src/runtime/connections/scoped-authorization.js +1 -1
  101. package/dist/src/runtime/framework-tools/connection-search-dynamic.js +2 -2
  102. package/dist/src/runtime/framework-tools/todo.js +1 -1
  103. package/dist/src/runtime/input/types.d.ts +1 -4
  104. package/dist/src/sandbox/state.d.ts +1 -0
  105. package/dist/src/setup/ask-editable.d.ts +22 -0
  106. package/dist/src/setup/ask-editable.js +1 -0
  107. package/dist/src/setup/ask-signals.d.ts +23 -0
  108. package/dist/src/setup/ask-signals.js +1 -0
  109. package/dist/src/setup/ask.d.ts +24 -25
  110. package/dist/src/setup/ask.js +1 -1
  111. package/dist/src/setup/boxes/deploy-project.js +1 -1
  112. package/dist/src/setup/boxes/resolve-provisioning.js +1 -1
  113. package/dist/src/setup/connection-connector.js +3 -2
  114. package/dist/src/setup/flows/registry-session.d.ts +33 -0
  115. package/dist/src/setup/flows/registry-session.js +1 -0
  116. package/dist/src/setup/flows/registry.d.ts +16 -0
  117. package/dist/src/setup/flows/registry.js +1 -1
  118. package/dist/src/setup/index.js +1 -1
  119. package/dist/src/setup/integrations/discord/setup.d.ts +19 -7
  120. package/dist/src/setup/integrations/discord/setup.js +4 -3
  121. package/dist/src/setup/integrations/github/setup.d.ts +36 -7
  122. package/dist/src/setup/integrations/github/setup.js +2 -2
  123. package/dist/src/setup/integrations/linear/setup.d.ts +21 -9
  124. package/dist/src/setup/integrations/linear/setup.js +2 -2
  125. package/dist/src/setup/integrations/photon/management.d.ts +8 -1
  126. package/dist/src/setup/integrations/photon/management.js +1 -1
  127. package/dist/src/setup/integrations/photon/setup-flow.d.ts +28 -24
  128. package/dist/src/setup/integrations/photon/setup-flow.js +3 -3
  129. package/dist/src/setup/integrations/photon/setup.d.ts +1 -3
  130. package/dist/src/setup/integrations/photon/setup.js +1 -1
  131. package/dist/src/setup/integrations/registry.d.ts +1 -1
  132. package/dist/src/setup/integrations/registry.js +1 -1
  133. package/dist/src/setup/integrations/runner.d.ts +14 -11
  134. package/dist/src/setup/integrations/runner.js +1 -1
  135. package/dist/src/setup/integrations/shared/prerequisite.d.ts +17 -0
  136. package/dist/src/setup/integrations/shared/prerequisite.js +1 -0
  137. package/dist/src/setup/integrations/shared/ui.d.ts +22 -15
  138. package/dist/src/setup/integrations/shared/ui.js +2 -2
  139. package/dist/src/setup/integrations/shared/vercel-project.d.ts +11 -0
  140. package/dist/src/setup/integrations/shared/vercel-project.js +1 -0
  141. package/dist/src/setup/integrations/slack/setup.d.ts +25 -10
  142. package/dist/src/setup/integrations/slack/setup.js +1 -1
  143. package/dist/src/setup/integrations/types.d.ts +43 -13
  144. package/dist/src/setup/integrations/types.js +1 -1
  145. package/dist/src/setup/integrations/web/setup.d.ts +22 -3
  146. package/dist/src/setup/integrations/web/setup.js +1 -1
  147. package/dist/src/setup/prompter.d.ts +8 -0
  148. package/dist/src/setup/question-options.d.ts +15 -0
  149. package/dist/src/setup/question-options.js +1 -0
  150. package/dist/src/setup/registry-setup-client.d.ts +3 -4
  151. package/dist/src/setup/registry-setup-client.js +2 -2
  152. package/dist/src/setup/registry-setup-completion.d.ts +3 -0
  153. package/dist/src/setup/registry-setup-completion.js +1 -0
  154. package/dist/src/setup/registry-setup-protocol.d.ts +22 -3
  155. package/dist/src/setup/registry-setup-protocol.js +1 -1
  156. package/dist/src/setup/scaffold/create/add-to-project.js +1 -1
  157. package/dist/src/setup/scaffold/create/project.js +55 -3
  158. package/dist/src/setup/scaffold/update/channels.js +1 -1
  159. package/dist/src/setup/setup-question-wire.d.ts +48 -0
  160. package/dist/src/setup/setup-question-wire.js +1 -0
  161. package/dist/src/setup/slackbot.d.ts +5 -1
  162. package/dist/src/setup/slackbot.js +1 -1
  163. package/dist/src/setup/state.d.ts +2 -2
  164. package/dist/src/shared/sandbox-backend.d.ts +6 -0
  165. package/dist/src/shared/sandbox-session.d.ts +15 -0
  166. package/dist/src/shared/tool-definition.d.ts +2 -2
  167. package/dist/src/shared/tool-schema.d.ts +5 -4
  168. package/dist/src/shared/tool-schema.js +1 -1
  169. package/dist/src/svelte/index.js +1 -1
  170. package/dist/src/svelte/use-eve-agent.js +1 -1
  171. package/dist/src/tracing/agent-otel-provider.d.ts +5 -38
  172. package/dist/src/tracing/agent-otel-provider.js +2 -2
  173. package/dist/src/tracing/agent-span-id-generator.d.ts +15 -0
  174. package/dist/src/tracing/agent-span-id-generator.js +1 -0
  175. package/dist/src/tracing/agent-trace-context-store.d.ts +1 -1
  176. package/dist/src/tracing/agent-trace-context-store.js +1 -1
  177. package/dist/src/tracing/agent-trace-state.d.ts +41 -0
  178. package/dist/src/tracing/agent-trace-state.js +1 -0
  179. package/dist/src/tracing/local-instrumentation-runtime.js +1 -1
  180. package/dist/src/vue/index.js +1 -1
  181. package/dist/src/vue/use-eve-agent.js +1 -1
  182. package/docs/channels/chat-sdk.mdx +1 -1
  183. package/docs/channels/github.mdx +1 -1
  184. package/docs/channels/linear.mdx +1 -1
  185. package/docs/channels/overview.mdx +2 -2
  186. package/docs/channels/slack.mdx +154 -40
  187. package/docs/concepts/default-harness.md +3 -3
  188. package/docs/concepts/sessions-runs-and-streaming.md +1 -1
  189. package/docs/connections/mcp.mdx +6 -0
  190. package/docs/guides/dev-tui.md +58 -142
  191. package/docs/guides/dynamic-workflows.md +2 -0
  192. package/docs/guides/frontend/overview.mdx +4 -2
  193. package/docs/guides/hooks.md +25 -3
  194. package/docs/guides/session-context.md +18 -0
  195. package/docs/install-integrations.mdx +2 -0
  196. package/docs/reference/cli.md +5 -3
  197. package/docs/reference/typescript-api.md +1 -1
  198. package/docs/sandbox.mdx +25 -5
  199. package/docs/skills.mdx +12 -1
  200. package/docs/subagents.mdx +1 -1
  201. package/docs/tools/human-in-the-loop.md +1 -1
  202. package/docs/tutorial/ship-it.mdx +1 -1
  203. package/package.json +10 -10
  204. package/dist/src/compiled/_chunks/node/undici-DWL_MYmT.js +0 -95
  205. package/dist/src/compiled/_chunks/workflow/dist-CZxNEvEs.js +0 -79
@@ -1,31 +1,26 @@
1
1
  ---
2
2
  title: "Slack"
3
- description: "Reach your agent from Slack app mentions and DMs, with thread anchoring, buttons, and Vercel Connect credentials."
3
+ description: "Reach your agent from Slack app mentions and DMs with Vercel Connect-managed credentials, threaded replies, and interactive buttons."
4
4
  type: integration
5
5
  ---
6
6
 
7
- The Slack channel puts your agent inside a workspace. It answers `@mentions` and DMs, replies in threads, shows typing indicators, and turns human-in-the-loop (HITL) prompts into buttons. Use it when the conversation should happen where your team already works. Credentials run through [Vercel Connect](../guides/auth-and-route-protection), which handles both the outbound bot token and inbound webhook verification, so there's no `SLACK_BOT_TOKEN` or `SLACK_SIGNING_SECRET` for you to manage. See [Channels](./overview) for the contract this builds on.
7
+ The Slack channel puts your agent inside a workspace. It answers `@mentions` and DMs, replies in threads, shows typing indicators, and turns human-in-the-loop (HITL) prompts into buttons. [Vercel Connect](https://vercel.com/kb/guide/vercel-connect) is the recommended setup: it manages the Slack bot token, verifies inbound requests, supports token rotation and multiple workspace installations, and forwards events to your agent without copying Slack secrets into your project environment. If you cannot use Vercel Connect, you can provide the bot token and signing secret through environment variables. See [Channels](./overview) for the contract this builds on.
8
8
 
9
- ## Set up Connect
9
+ ## Add the channel
10
10
 
11
- Create a Slack Connect client and copy its UID (e.g. `slack/my-agent`), then attach this project as the trigger destination at eve's Slack route:
11
+ Run the guided setup from your agent project:
12
12
 
13
13
  ```bash
14
- npm install -g vercel@latest
15
- vercel connect create slack --triggers
16
- vercel connect detach <uid> --yes
17
- vercel connect attach <uid> --triggers --trigger-path /eve/v1/slack --yes
14
+ eve add channel/slack
18
15
  ```
19
16
 
20
- The `create` step provisions a destination at the default Connect path. `detach` then `attach --trigger-path /eve/v1/slack` re-points the trigger at the eve Slack route, since eve does not serve the default Connect path. `--triggers` turns on Slack Event Subscriptions; without it, Slack never delivers `app_mention` or `message.im`. You can also create the client from the [Connect dashboard](https://vercel.com/d?to=/%5Bteam%5D/~/connect&title=Go+to+Connect).
17
+ The command recommends Vercel Connect, then scaffolds `agent/channels/slack.ts` and installs any required dependency. Choose the environment-variable option only when you need to manage the Slack bot token and signing secret yourself.
21
18
 
22
- ## Add the channel
19
+ ### Recommended: use Vercel Connect
23
20
 
24
- Scaffold the channel and its dependency with `eve add channel/slack`, or set it up by hand:
21
+ Vercel Connect setup requires an authenticated Vercel CLI and a linked Vercel project. The guided flow creates or reuses a Slack connector, waits for you to install it in a workspace, and registers `/eve/v1/slack` as a trigger destination before writing the channel file.
25
22
 
26
- ```bash
27
- npm install @vercel/connect
28
- ```
23
+ The generated channel resolves credentials at runtime:
29
24
 
30
25
  ```ts title="agent/channels/slack.ts"
31
26
  import { connectSlackCredentials } from "@vercel/connect/eve";
@@ -38,17 +33,93 @@ export default slackChannel({
38
33
 
39
34
  `connectSlackCredentials` returns `{ botToken, webhookVerifier }`, keeping token rotation, multi-workspace tenancy, and request verification inside Connect rather than your code.
40
35
 
41
- If eve cannot find an authenticated Vercel session, `eve add channel/slack` asks whether to set up Vercel Connect or use portable environment credentials. The portable option adds the required names to `.env.example`. Before deploying, appropriate values must be supplied to your runtime environment.
36
+ ### Manage Slack credentials yourself
37
+
38
+ Use this fallback when the agent does not run on Vercel or Vercel Connect is unavailable. In the setup command, **Use portable credentials** is the environment-variable option; eve adds `SLACK_BOT_TOKEN` and `SLACK_SIGNING_SECRET` to `.env.example`.
39
+
40
+ This option does not create or install the Slack app. Configure it in [Slack app settings](https://api.slack.com/apps):
41
+
42
+ 1. Add the `app_mentions:read` and `chat:write` bot scopes. Add `im:history` for DMs, `files:read` for inbound attachments, and `files:write` when the agent uploads files.
43
+ 2. Install or reinstall the app, copy its Bot User OAuth Token to `SLACK_BOT_TOKEN`, and copy the signing secret from **Basic Information** to `SLACK_SIGNING_SECRET`.
44
+ 3. Set both values in `.env.local` for local development or in the target runtime's environment, then start or deploy the agent at a public URL.
45
+ 4. Under **Event Subscriptions**, set the Request URL to `https://your-agent.example/eve/v1/slack`. Subscribe to `app_mention`, plus `message.im` for DMs.
46
+ 5. Under **Interactivity & Shortcuts**, use the same Request URL when the agent uses buttons or HITL prompts.
47
+
48
+ Add the matching message events and history scopes if you also want unmentioned thread replies, as described in [Continue conversations without repeated mentions](#continue-conversations-without-repeated-mentions).
49
+
50
+ ## Deploy
51
+
52
+ Deploy the production agent after the trigger destination and channel file are ready:
53
+
54
+ ```bash
55
+ eve deploy
56
+ ```
57
+
58
+ `eve deploy` deploys the linked Vercel project to production. The guided flow registers the trigger destination against the production branch, which is the Vercel CLI default. Manage trigger destinations separately in the Connect dashboard when you need a different branch or environment.
59
+
60
+ ## Test a preview branch with Vercel Connect
61
+
62
+ Use a separate connector when you want preview Slack traffic isolated from production, then register the preview branch as a trigger destination:
63
+
64
+ ```bash
65
+ npm install -g vercel@latest
66
+ vercel connect create slack --name your-agent-preview --triggers
67
+ vercel connect attach slack/your-agent-preview \
68
+ --environment preview \
69
+ --triggers \
70
+ --trigger-branch your-preview-branch \
71
+ --trigger-path /eve/v1/slack \
72
+ --yes
73
+ ```
74
+
75
+ Run these commands from the linked project directory. `--environment preview` makes the connector credentials available to Preview deployments. `--trigger-branch` selects the branch that receives forwarded Slack webhooks.
76
+
77
+ Select the matching connector at runtime instead of leaving the generated production UID hard-coded:
78
+
79
+ ```ts title="agent/channels/slack.ts"
80
+ import { connectSlackCredentials } from "@vercel/connect/eve";
81
+ import { slackChannel } from "eve/channels/slack";
82
+
83
+ const connectorUid =
84
+ process.env.VERCEL_ENV === "preview" ? "slack/your-agent-preview" : "slack/my-agent";
85
+
86
+ export default slackChannel({
87
+ credentials: connectSlackCredentials(connectorUid),
88
+ });
89
+ ```
42
90
 
43
- ### Deploy
91
+ Creating a connector with triggers also registers a default production destination. Remove that destination from the Connect dashboard before treating the preview connector as isolated. The guided production setup does not restrict credential environments, so also set the production connector's project access to **Production** and the preview connector's access to **Preview** in the dashboard. `vercel connect detach` removes project token access, not trigger destinations. Vercel Connect supports up to three trigger destinations per connector; see the [Vercel Connect guide](https://vercel.com/kb/guide/vercel-connect) for current limits and environment guidance.
44
92
 
45
- Deploy once the trigger destination and channel file are ready:
93
+ Slack must be able to reach the preview route without an interactive authentication challenge. For a Connect trigger, exempt the branch domain with a [Deployment Protection Exception](https://vercel.com/docs/deployment-protection/methods-to-bypass-deployment-protection/deployment-protection-exceptions) when that feature is available, or use an unprotected preview domain. For a Slack app that uses environment-variable credentials, append `?x-vercel-protection-bypass=your-generated-secret` to its event and interaction request URLs. Enabling [Protection Bypass for Automation](https://vercel.com/docs/deployment-protection/methods-to-bypass-deployment-protection/protection-bypass-automation) does not bypass a request unless the sender presents that secret.
94
+
95
+ ## Set up Vercel Connect manually
96
+
97
+ To set up the connector outside the guided flow, create it, then register eve's Slack route with the linked project:
46
98
 
47
99
  ```bash
48
- VERCEL_USE_EXPERIMENTAL_FRAMEWORKS=1 vercel deploy --prod
100
+ npm install -g vercel@latest
101
+ vercel connect create slack --name your-agent --triggers
102
+ vercel connect attach slack/your-agent \
103
+ --environment production \
104
+ --triggers \
105
+ --trigger-path /eve/v1/slack \
106
+ --yes
49
107
  ```
50
108
 
51
- `VERCEL_USE_EXPERIMENTAL_FRAMEWORKS=1` lets the Vercel CLI recognize eve as a framework during the build. eve's own setup commands set the same flag.
109
+ `--triggers` enables Slack Event Subscriptions. The attach command registers eve's route in addition to the default destination created with the connector. Remove the default destination separately in the [Connect dashboard](https://vercel.com/d?to=/%5Bteam%5D/~/connect&title=Go+to+Connect). For an existing connector, skip `create` and attach the intended route directly.
110
+
111
+ ## Troubleshoot Slack delivery
112
+
113
+ Check the delivery path in order so you can identify where a Slack event stops:
114
+
115
+ | Symptom | Check | Next action |
116
+ | --------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
117
+ | `eve add channel/slack` stops before scaffolding the channel | Read the setup error for the failed Vercel login, project link, workspace install, connector lookup, or trigger registration step. | Resolve that step, then rerun `eve add channel/slack`. |
118
+ | Setup says it could not remove an existing trigger destination | Check the connector's destinations in the Connect dashboard. `vercel connect detach` removes project token access, not trigger destinations. | Edit or remove the stale destination in the dashboard, then register `/eve/v1/slack` with `vercel connect attach`. |
119
+ | Mentions never reach the deployment | Confirm that the connector trigger destination uses the intended project and branch, enables triggers, and points to `/eve/v1/slack`. | Edit or remove stale destinations in the Connect dashboard, then register the intended destination with `vercel connect attach`. |
120
+ | Mentions work but DMs or thread replies do not | Check the Slack app's Event Subscriptions and OAuth scopes. DMs require `message.im` and `im:history`; channel replies require the matching message event and history scope. | Add the missing events or scopes, then reinstall the Slack app if Slack requires it. |
121
+ | A preview request receives an authentication page or protection error | Check whether the branch domain is exempt or the direct Slack request URL includes `x-vercel-protection-bypass`. Slack cannot complete an interactive Vercel Authentication challenge. | Add a Deployment Protection Exception for the branch domain, or add the automation bypass query parameter to a Slack app that uses environment-variable credentials. |
122
+ | The webhook reaches the deployment but the agent does not reply | Open the project's Vercel runtime logs, then inspect the session in **Agent Runs** when your team has access. | Use the first missing or failed stage to narrow the issue to channel dispatch, the agent run, or outbound Slack delivery. |
52
123
 
53
124
  ## How the channel handles inbound events
54
125
 
@@ -71,6 +142,43 @@ Only the first available handler runs. A message hook returning `null` drops the
71
142
 
72
143
  `onInteraction(action, ctx)` separately handles `block_actions` callbacks not consumed by HITL. eve attaches the triggering Slack user id to the same model message as its text, preserving speaker attribution without profile lookups.
73
144
 
145
+ #### Restrict who can invoke the agent
146
+
147
+ A valid Slack signature proves that Slack sent the event. It does not decide which channel or person your agent should trust. Fail closed in the inbound handler before returning auth, especially when the app is installed in a shared Slack Connect channel:
148
+
149
+ ```ts title="agent/channels/slack.ts"
150
+ import { connectSlackCredentials } from "@vercel/connect/eve";
151
+ import { defaultSlackAuth, slackChannel, type SlackMessage } from "eve/channels/slack";
152
+
153
+ const allowedChannels = new Set(["C01234567"]);
154
+ const allowedUsers = new Set(["U01234567"]);
155
+
156
+ function isAllowedUser(message: SlackMessage) {
157
+ const userId = message.author?.userId;
158
+ return Boolean(userId && allowedUsers.has(userId));
159
+ }
160
+
161
+ export default slackChannel({
162
+ credentials: connectSlackCredentials("slack/my-agent"),
163
+ onAppMention(ctx, message) {
164
+ if (!isAllowedUser(message) || !allowedChannels.has(message.channelId)) {
165
+ return null;
166
+ }
167
+ return { auth: defaultSlackAuth(message, ctx) };
168
+ },
169
+ onDirectMessage(ctx, message) {
170
+ if (!isAllowedUser(message)) return null;
171
+ return { auth: defaultSlackAuth(message, ctx) };
172
+ },
173
+ });
174
+ ```
175
+
176
+ Override every enabled inbound handler; leaving `onDirectMessage` out would retain eve's default DM behavior. Slack Connect can deliver events from external users, so authorize the explicit user and current channel IDs your policy expects. If access depends on organization membership, resolve it from Slack's shared-channel and user data instead of inferring it from the request signature.
177
+
178
+ Keep authorization checks inside sensitive tools too. The inbound allowlist controls who can start a turn; tool-level checks control what that authenticated Slack principal may read or change.
179
+
180
+ The allowlist above gates message-started turns. Built-in HITL buttons are handled before `onInteraction`, and the person who clicks supplies the Slack auth for the resumed session. Anyone who can interact with the Slack message can answer it. Put sensitive prompts in channels limited to the intended approvers, and re-check `ctx.session.auth.current` inside a sensitive tool before performing its side effect.
181
+
74
182
  #### Continue conversations without repeated mentions
75
183
 
76
184
  Use `onMessage` to handle explicit mentions and continue replies in threads with an active eve session:
@@ -106,6 +214,28 @@ async onMessage(ctx, message) {
106
214
 
107
215
  Like `threadContext`, this helper calls `conversations.replies` and requires the matching Slack history scope. It observes at most the first 50 messages of the thread, and a failed fetch is logged and swallowed, so the returned list may be empty or stale — treat an unexpected empty list as "don't route" rather than "no participants".
108
216
 
217
+ #### Load prior thread messages
218
+
219
+ You get the triggering mention by default, but not the earlier replies in the thread. Enable `threadContext` to fetch and inject them with every message attributed by stable Slack user id. Use `since: "last-agent-reply"` so repeated mentions inject only what is new:
220
+
221
+ ```ts
222
+ import { slackChannel } from "eve/channels/slack";
223
+ import { connectSlackCredentials } from "@vercel/connect/eve";
224
+
225
+ export default slackChannel({
226
+ credentials: connectSlackCredentials("slack/my-agent"),
227
+ threadContext: { since: "last-agent-reply" },
228
+ });
229
+ ```
230
+
231
+ `since` sets the boundary for what each mention injects and accepts three values:
232
+
233
+ - `"thread-root"` (the default): every prior message in the thread, on every mention. `threadContext: {}` behaves the same.
234
+ - `"last-agent-reply"`: only messages after this installed agent's last reply, keeping repeated mentions incremental. Replies from other Slack bots do not move the boundary.
235
+ - A predicate `(message: SlackThreadMessage) => boolean`: only messages after the last one it matches, such as "since the last message that mentioned a particular user".
236
+
237
+ `threadContext` requires the matching Slack history scope. Thread helpers reuse messages already loaded within the same inbound handler, and overlapping refreshes share one `conversations.replies` request. Omit it when the agent should see only direct mentions. `loadThreadContextMessages` remains available when you need custom filtering or non-model processing of the raw thread messages.
238
+
109
239
  #### Cancel an active turn
110
240
 
111
241
  Message hooks (`onMessage`, `onAppMention`, and `onDirectMessage`) receive thread-bound session operations directly on `ctx`. Call `ctx.cancel({ turnId? })` before returning `{ auth }` to stop the current turn and queue the new Slack message as replacement input, producing a debounce-like experience:
@@ -211,26 +341,6 @@ const session = await ctx.resolveSession({ target });
211
341
 
212
342
  `onEvent` covers JSON `event_callback` deliveries only. URL verification, slash commands, and interactive payloads do not reach it. Add every desired event and required OAuth scope to the Slack app's Event Subscriptions configuration; eve can only handle events Slack sends.
213
343
 
214
- You get the triggering mention by default, but not the earlier replies in the thread. Enable `threadContext` to fetch and inject them with every message attributed by stable Slack user id. Use `since: "last-agent-reply"` so repeated mentions inject only what is new:
215
-
216
- ```ts
217
- import { slackChannel } from "eve/channels/slack";
218
- import { connectSlackCredentials } from "@vercel/connect/eve";
219
-
220
- export default slackChannel({
221
- credentials: connectSlackCredentials("slack/my-agent"),
222
- threadContext: { since: "last-agent-reply" },
223
- });
224
- ```
225
-
226
- `since` sets the boundary for what each mention injects and accepts three values:
227
-
228
- - `"thread-root"` (the default): every prior message in the thread, on every mention. `threadContext: {}` behaves the same.
229
- - `"last-agent-reply"`: only messages after this installed agent's last reply, keeping repeated mentions incremental. Replies from other Slack bots do not move the boundary.
230
- - A predicate `(message: SlackThreadMessage) => boolean`: only messages after the last one it matches, such as "since the last message that mentioned a particular user".
231
-
232
- `threadContext` requires the matching Slack history scope. Thread helpers reuse messages already loaded within the same inbound handler, and overlapping refreshes share one `conversations.replies` request. Omit it when the agent should see only direct mentions. `loadThreadContextMessages` remains available when you need custom filtering or non-model processing of the raw thread messages.
233
-
234
344
  ### Slack API calls outside a handler
235
345
 
236
346
  Inside webhook-side handlers (`onAppMention`, `onEvent`, `onInteraction`, `events`),
@@ -240,7 +350,7 @@ messages, for example, has no inbound Slack request. For that, call the
240
350
  same primitive the handle uses directly:
241
351
 
242
352
  ```ts
243
- import { callSlackApi, resolveSlackBotToken } from "eve/channels/slack";
353
+ import { callSlackApi } from "eve/channels/slack";
244
354
  import { connectSlackCredentials } from "@vercel/connect/eve";
245
355
 
246
356
  const { botToken } = connectSlackCredentials("slack/my-agent");
@@ -309,6 +419,10 @@ Start a session without an inbound message through `ctx.to(slack, target).send(m
309
419
 
310
420
  Inbound files behind authenticated Slack URLs are staged with `fetchFile`. See [File uploads](./custom#file-uploads) for the `fetchFile` contract.
311
421
 
422
+ Private file downloads require the Slack bot token's `files:read` scope. Add the scope and reinstall the Slack app before sending attachments.
423
+
424
+ Staged files live in the session sandbox under `/workspace/attachments`. Session history keeps a reference to that path, not a second copy of the Slack file. If the backend can no longer reattach the original sandbox, eve cannot restore the attachment bytes from history; later turns receive a missing-file result. Store files outside the sandbox when the agent must retain them independently of sandbox availability.
425
+
312
426
  ## What to read next
313
427
 
314
428
  - [Channels overview](./overview): the channel contract and every built-in channel
@@ -60,7 +60,7 @@ Notes:
60
60
  - **`agent`** is available only in the root session. Its child uses the root's instructions, tools, connections, and sandbox, but starts with fresh conversation history and fresh [state](../guides/state). The child receives neither `agent` nor `Workflow`; declared subagents do not receive the built-in `agent` either. See [Subagents](../subagents).
61
61
  - **`load_skill`** only pulls instructions into context. It adds no new execution surface, because behavior still comes from the tools the agent already has.
62
62
  - **`connection_search`** surfaces a connection's tools by their qualified name (e.g. `linear__list_issues`), which the model can then call directly. It's registered only when the agent has connections.
63
- - **`web_search`** has no local executor; the provider runs it. AI Gateway models use Parallel by default. To use Exa instead, export `webSearch({ provider: "exa" })` from `agent/tools/web_search.ts`. Direct provider models continue to use their native search implementation. To supply your own implementation, override it with `defineTool()`.
63
+ - **`web_search`** has no local executor; the provider runs it. AI Gateway models use Exa by default. To use Parallel instead, export `webSearch({ provider: "parallel" })` from `agent/tools/web_search.ts`. Direct provider models continue to use their native search implementation. To supply your own implementation, override it with `defineTool()`.
64
64
 
65
65
  Review these built-in tools before production use. Disable, wrap, restrict, or require approval for any tool that can access the filesystem, network, shell, or sensitive data.
66
66
 
@@ -88,10 +88,10 @@ Provider-managed web search has a dedicated configuration helper instead of an e
88
88
  ```ts title="agent/tools/web_search.ts"
89
89
  import { webSearch } from "eve/tools";
90
90
 
91
- export default webSearch({ provider: "exa" });
91
+ export default webSearch({ provider: "parallel" });
92
92
  ```
93
93
 
94
- Set `provider` to `"parallel"` or `"exa"`. Without this file, AI Gateway models use Parallel.
94
+ Set `provider` to `"exa"` or `"parallel"`. Without this file, AI Gateway models use Exa.
95
95
 
96
96
  ## Disable a default
97
97
 
@@ -150,7 +150,7 @@ curl -X POST http://127.0.0.1:2000/eve/v1/session/<sessionId> \
150
150
 
151
151
  The follow-up reuses the same durable session: same history, same state.
152
152
 
153
- If the session is waiting on a human-in-the-loop approval, a matching text reply such as `approve` or `deny` answers the approval. Other follow-up text is held until the approval is answered, so an unrelated message does not implicitly deny the pending tool call.
153
+ If the session is waiting on a human-in-the-loop approval, a matching text reply such as `approve` or `cancel` answers the approval. Other follow-up text is held until the approval is answered, so an unrelated message does not implicitly deny the pending tool call.
154
154
 
155
155
  If the session is waiting on `ask_question`, a follow-up message clears that pending request before the model continues. An exact option match or permitted freeform response answers the question; any other message marks the question unanswered and starts the follow-up turn.
156
156
 
@@ -214,6 +214,12 @@ Return `"user-approval"` (or `true`) to pause for a person and `"not-applicable"
214
214
 
215
215
  [Human-in-the-loop](/docs/human-in-the-loop#approvals) covers the full set of statuses, how `approvedTools` and `session.auth` factor in, and how a gated call pauses and resumes durably.
216
216
 
217
+ ## Control result size
218
+
219
+ eve sends an MCP tool's returned content to the model as the tool result. MCP connections do not expose a per-result transform equivalent to an authored tool's [`toModelOutput`](/docs/tools#shape-what-the-model-sees-with-tomodeloutput).
220
+
221
+ When a remote tool returns more data than the model needs, narrow the result at the MCP server. Prefer a purpose-built search or summary tool, or return a stable handle that another call can use to fetch a smaller slice. If you do not control the server and an equivalent upstream API is available, replace only that operation with an authored tool that stores the full payload outside model context and projects the needed fields through `toModelOutput`. Block the original MCP operation through [`tools.block`](#tool-filters) so the model does not see duplicate tools.
222
+
217
223
  ## Troubleshooting
218
224
 
219
225
  | Symptom | Check |
@@ -1,182 +1,98 @@
1
1
  ---
2
2
  title: "Dev TUI"
3
- description: "Drive an eve agent locally in an interactive terminal UI. Chat, stream, approve tools, answer questions, tune the display, and point it at a deployment."
3
+ description: "Use eve locally or connect to a deployed agent from an interactive terminal UI."
4
4
  ---
5
5
 
6
- `eve dev` boots the local runtime and drops you into an interactive terminal UI. You chat with the agent, watch it stream, approve its tool calls, and answer the questions it asks back.
6
+ `eve dev` starts a local development server and opens an interactive terminal UI. Use it to talk to your agent, approve tool calls, answer its questions, and configure local development.
7
7
 
8
8
  ```bash
9
9
  eve dev
10
10
  ```
11
11
 
12
- On startup the TUI prints a brand line with your agent's name, plus a rotating tip (local sessions only).
12
+ The transcript remains in your terminal scrollback after you exit. Run `/help` in the UI to see the commands available in the current session.
13
13
 
14
- ```text
15
- eve weather-agent
16
- Use /add to install integrations from the registry.
17
- ```
18
-
19
- If agent discovery reported problems, an error and warning count renders between the two lines. Instructions, tools, skills, and subagents are one `eve info` away, and `/help` lists every command. The TUI also runs a startup check. A fresh `eve init` starts local `eve dev` with `/model` prefilled. That input starts onboarding: the flow installs the Vercel CLI if needed, asks you to log in if needed, opens `/model`, then offers categorized next steps for channels, connections, capabilities, and observability through the registry before the first prompt. Other `eve dev` sessions show missing setup as an attention line, with each command's outcome hanging under it on a `⎿` connector.
20
-
21
- ## Reading the transcript
22
-
23
- The conversation streams straight into your terminal's normal scrollback, so you keep native scrolling, copy and paste, and a transcript that persists after you exit. The scrollback holds your prompts, the agent's replies, reasoning, tool calls, nested subagents, connection-authorization prompts, and any captured `stdout`, `stderr`, or sandbox lifecycle lines.
24
-
25
- Each turn renders without boxes. A colored gutter glyph marks who is speaking, tool calls collapse to a one-line summary (`✓ get_weather city="SF" → 73°F`), and a subagent's work is indented beneath its `◆` header. When input is ready, the prompt stays bare until you type. A green circle-dot pulses while the agent is waiting to answer and disappears when reasoning or answer content begins.
26
-
27
- A persistent line beneath the prompt or status shows the model — with its authored reasoning level and a `↯` marker when the Gateway priority tier is on (`xai/grok-4.5@xhigh ↯`) — and the linked Vercel project. The Vercel segment stays hidden until the directory is linked. Local sessions lead with a gray `:port` badge. Remote sessions lead with a padded `↗ project (environment)` badge, or the host when Vercel cannot resolve the deployment. The badge is gray while checking or unavailable, yellow while authentication is required or failed, and blue when connected. Status segments separate with plain whitespace. Remote status lines omit AI Gateway endpoint state.
28
-
29
- Errors render compactly with docs links highlighted. A code bug escaping your agent's own code shows its stack trace dim beneath the error headline. Dev-server rebuilds condense into one status row that updates in place (`tui/setup-panel.ts changed · rebuilding…`, then `· rebuilt`); only the latest rebuild shows, and paths shrink to their last two components.
30
-
31
- ## Slash commands
32
-
33
- Each command echoes as an invocation line, asks through a bordered panel that takes the input area's place (one question at a time, separate from the chat transcript), and finishes with a one-line `⎿` result. Loading states stay on the ephemeral status line instead of piling into the transcript; model, registry, and the Vercel CLI commands (`/vc:install`, `/vc:login`) use the same green square pulse as the build phase, while `/deploy` keeps a spinner. A setup waiting for browser action changes that pulse and the word "browser" to yellow. Setup menus render the selected option with a filled arrow and an inverse label padded by one space on each side. Text prompts use a blinking block cursor over the character at the caret. The selected label is blue normally and yellow for warning rows.
34
-
35
- | Command | Does |
36
- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
37
- | `/model` | Opens a configure menu that loops until Done (or Esc). See [Configure the model and provider](#configure-the-model-and-provider). |
38
- | `/add` | Adds an integration from the registry or an item address entered directly. |
39
- | `/deploy` | Ships the agent to Vercel production, linking the directory first when it is unlinked. |
40
- | `/vc:install` | Installs the Vercel CLI. Available locally and on a remote session. |
41
- | `/vc:login` | Logs in to Vercel locally. On a remote session, resolves the deployment's project, refreshes its OIDC token, and confirms any required Trusted Sources rule. |
42
- | `/loglevel` | Switches which logs the transcript shows. See [Control what logs show](#control-what-logs-show). |
43
- | `/traces` | Opens the full-screen local trace viewer. See [Inspect traces](#inspect-traces). |
44
- | `/reset` | Starts a fresh session. |
45
- | `/cancel` | Cooperatively cancels the running turn while preserving the session and settled context. |
46
- | `/clear` | Clears model-message history while preserving the current session and its durable resources. `/new` is an alias. |
47
- | `/compact` | Queues context compaction for the current session without sending a message. |
48
- | `/exit` | Quits the TUI. |
49
- | `/help` | Lists the commands available for the current local or remote session. |
50
-
51
- `/model`, `/add`, `/deploy`, and `/traces` manage the local agent or its linked project. They are available only when `eve dev` runs the server locally, not when connected to a remote server with `--url`.
52
-
53
- ### Configure the model and provider
54
-
55
- Bare `/model` opens the configure menu; its Change model row summarizes the draft (`xai/grok-4.5@high ↯`). When no provider is configured, it opens the provider picker directly and Esc returns to the configure menu. "Change model" opens a value menu — **Model**, **Reasoning effort** (a `●─◉─○` track beside the drafted level), **Service tier** (`fast ↯` or `normal`), and **Done**. Reasoning and tier adjust in place: `←`/`→` (Tab acts as `→`) move the highlighted row's value as a ring — past the top wraps to the bottom and vice versa — sliding the reasoning track over the model's supported effort levels or flipping the tier. An unset reasoning draft shows an empty track; the first `→` enters the ring at the lowest level, `←` at the highest. Picking a model snaps a drafted level the new model cannot serve to its closest supported one, clearing it when the model has no adjustable reasoning. Enter on the Model row opens the searchable Vercel AI Gateway catalog as `▏`-railed model ids, pre-selected on the model the runtime is serving; Esc backs out without changing it. A model with no adjustable reasoning says so on a disabled row, and a model the catalog prices no priority tier for shows no tier row at all. The menu's Done hands the draft to the configure menu, whose own Done commits everything through one atomic edit of your agent's authored source, reporting success only after eve confirms the new id. A completed model or provider change closes the menu and returns its result to the transcript; Done without changes or Esc closes it without one, and Esc notes any discarded draft. `/model <provider/model-id>` applies one directly, skipping the menu.
56
-
57
- The provider row opens one menu: AI Gateway via a project, AI Gateway via `AI_GATEWAY_API_KEY`, or **Other providers**. The currently-active provider renders checked with its status beneath it ("Linked to **my-project** in team **my-team**", or "`AI_GATEWAY_API_KEY` set in `.env.local`"), and the cursor opens on it with a `↵ change` badge. The key option becomes a masked input on an `⎿` rail when highlighted, with a `↵ validate` badge after it. Enter validates it without replacing the menu — a `▪ validating` badge while it checks, a red `⨯ API key is not valid` badge on rejection; retrying or editing clears that result. With a non-empty key, the first Esc or Ctrl-C clears the input and the second dismisses the menu. An accepted key is saved to `.env.local` and reported as one `AI_GATEWAY_API_KEY set.` line. The project option asks for a Vercel team, opens that team's recent projects with the project named after your agent suggested first (searching the team for it when it is not among the recents), and lets you search all projects for older matches. Vercel links the selected project, eve verifies its project ID, then pulls its environment into `.env.local`. The **Other providers** option shows direct-provider wiring instructions and leaves the existing setup untouched. The dev server reloads env files and refreshes the status bar automatically, with no restart needed.
58
-
59
- The provider row demands attention (a bold yellow "Configure model access" with a yellow "Not configured" hint that dims when unselected and uses the terminal foreground when selected) until a link or gateway credential is detected, then names the connection afterward (for example "AI Gateway (Linked to my-project in my-team)"). Setup menus mark the cursor row with a padded, filled-arrow inverse label that inherits the row's accent: blue normally and yellow for warning rows. In stacked menus, the selected row's description appears directly beneath that option. The completed command's outcome stays in the transcript after the panel closes. When a turn fails because AI Gateway authentication is missing or stale, the error points you at `/model` directly.
60
-
61
- ### Add registry integrations
62
-
63
- `/add` groups integrations by their role: **Channels** for where people talk to your agent, **MCP connections** for external services and data, **Extensions** for reusable capabilities, and **Observability** for tracing and evaluation. Pick a category to open its searchable catalog from the official eve registry and the registry namespaces configured in `package.json`, or browse every integration. Each result shows its source beside its name, such as `Vercel` or a configured registry namespace. Select a result to review its source, packages, environment variables, and target files before adding it, or enter an official item path, configured namespace address, or HTTP(S) URL directly in the search bar. After an add attempt finishes, the panel closes instead of returning to the catalog.
14
+ ## Commands
64
15
 
65
- MCP connection registry items install their definition and then configure Vercel Connect through the same `/add` flow. If the directory is unlinked, setup first offers to create or link a project. Run `eve add connection/<name>` for the equivalent CLI flow.
16
+ | Command | Description |
17
+ | ------------- | ----------------------------------------------------------------------------------------------------- |
18
+ | `/model` | Configure the model and its provider. Pass a model ID to set it directly: `/model provider/model-id`. |
19
+ | `/add` | Browse and install channels, MCP connections, extensions, and observability integrations. |
20
+ | `/deploy` | Deploy the agent to Vercel production. Links the directory first if needed. |
21
+ | `/vc:install` | Install the Vercel CLI. |
22
+ | `/vc:login` | Log in to Vercel or restore access to a remote deployment. |
23
+ | `/loglevel` | Choose which server and agent logs appear in the transcript. |
24
+ | `/traces` | Open the local trace viewer. Pass a trace ID prefix to open a specific trace. |
25
+ | `/reset` | Start a fresh session. |
26
+ | `/cancel` | Cancel the current turn without discarding settled context. |
27
+ | `/clear` | Clear the session's model-message history. `/new` is an alias. |
28
+ | `/compact` | Compact the current session's context. |
29
+ | `/exit` | Quit the UI. |
30
+ | `/help` | List available commands. |
66
31
 
67
- ## Keyboard shortcuts
32
+ `/model`, `/add`, `/deploy`, and `/traces` are available when `eve dev` runs locally. They are unavailable when the UI connects to a server with `--url`.
68
33
 
69
- Chat and freeform `ask_question` inputs behave like a shell line editor.
34
+ ## Work with the agent
70
35
 
71
- | Key | Action |
72
- | ---------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
73
- | `Enter` | Submit the message or question response. While a turn is running, queue the message for the next turn. |
74
- | `Esc` | While a turn runs: pop the oldest queued message and steer with it; with nothing queued, cancel the turn. |
75
- | `Shift+Enter` | Insert a newline without sending (needs a terminal that reports modified keys). |
76
- | `Ctrl+C` | While a turn runs, behave like Esc. At the idle chat prompt, clear input and arm exit; press again to quit. |
77
- | `↑` / `↓` | Move between input lines; at a chat-buffer edge, navigate messages you have sent this session. |
78
- | `←` / `→`, `Home` / `End`, `Ctrl+A` / `Ctrl+E` | Move the caret; Home/End stay within the current line. |
79
- | `Ctrl+U` / `Ctrl+K` / `Ctrl+W` | Delete to the start of the line, to its end, or through the previous word. |
80
- | `Ctrl+L` | Cycle the log display mode (`none → all → stderr → sandbox → none`) and briefly show the mode in the status line. |
81
- | `Ctrl+R` | Redraw the screen. |
36
+ Type a message and press `Enter` to send it. When the agent asks a question or requests tool approval, respond in the prompt shown by the UI. Connection authorization can open a browser; keep local `eve dev` running until the browser returns to it.
82
37
 
83
- In terminals that support bracketed paste, pasting multi-line text into chat or a freeform question inserts it intact and renders one row per line rather than submitting at the first line. `Shift+Enter` adds a line by hand. The input grows down to the available terminal height, then scrolls to keep the caret visible; `Enter` submits the whole response.
38
+ While a turn is running, `Enter` queues a follow-up message. Press `Esc` or `Ctrl+C` to cancel the turn; when messages are queued, this uses the oldest queued message as the next turn instead. At an idle prompt, press `Ctrl+C` twice to exit.
84
39
 
85
- ### Queue and steer while the agent works
40
+ | Key | Action |
41
+ | ------------- | ----------------------------------------------------------------------------------- |
42
+ | `Enter` | Send the current message or answer. |
43
+ | `Shift+Enter` | Insert a newline. Requires a terminal that reports modified keys. |
44
+ | `Esc` | Cancel a running turn, or steer with the oldest queued message. |
45
+ | `Ctrl+C` | Cancel or steer during a turn; clear input, then exit on a second press, when idle. |
46
+ | `↑` / `↓` | Move through input lines or sent-message history. |
47
+ | `Ctrl+L` | Cycle log display modes. |
48
+ | `Ctrl+R` | Redraw the screen. |
86
49
 
87
- Sending a message while a turn is still running does not interrupt it — the message joins a queue of up to five, pinned in a panel directly above the input with one line per message. When the turn ends, the queued messages coalesce into the next turn's message. Submit `/cancel` during a turn to cancel it immediately without queueing the command as model input; `/cancel` also works from the idle prompt when a prior stream disconnected while its server turn may still be running.
50
+ ## Logs and traces
88
51
 
89
- `Esc` and `Ctrl+C` steer instead of waiting: either key pops the oldest queued message, cancels the running turn cooperatively, and submits the popped message as the replacement turn. In the transcript, a steered message carries an accent `↑` on its own line above its gutter bar; a queued message that waited for the boundary carries it below. Any remaining messages stay queued behind it. With nothing queued, either key cancels the turn immediately. A cancelled turn ends cleanly on the server and the session keeps its context; the conversation picks up at the next prompt.
52
+ By default, the UI shows `stderr` logs. Use `/loglevel <all|stderr|sandbox|none>` to change the display; bare `/loglevel` reports the current setting. `Ctrl+L` cycles the same modes.
90
53
 
91
- If a turn fails terminally (the server session dies or the connection drops), the TUI starts a fresh session and notes it inline so you can keep going. Server-side context resets with the old session. Messages still queued when a turn is interrupted or fails are restored into the next prompt's input instead of being sent blind.
54
+ Every `eve dev` process writes diagnostic logs to `.eve/logs/`, regardless of the display mode. Read them with [`eve logs`](../reference/cli#eve-logs).
92
55
 
93
- ## Answer the agent inline
56
+ Use `/traces` to inspect traces recorded during local development. See [Instrumentation](instrumentation#local-traces) for trace capture and retention settings.
94
57
 
95
- When the agent needs something from you, the TUI asks inline.
58
+ ## Display options
96
59
 
97
- - Tool approvals are a `y` or `n`.
98
- - Option questions let you pick with `↑` / `↓` and `Enter`, or you can compose a multi-line freeform answer.
99
- - If a tool needs an authorized [connection](../connections), the URL shows up right in the transcript, and the turn picks back up once you finish the flow. The same local `eve dev` server owns the callback route, so keep that command running until the browser returns. `eve dev --url` connects to an already-running server and does not start a local callback host.
100
-
101
- ## Control what logs show
102
-
103
- By default, `eve dev` shows `stderr` and keeps stdout and sandbox lines buffered but hidden. Captured server `stdout` and `stderr` render as dim, indented log runs behind a `│` rule (consecutive lines from the same source share one label), while sandbox lifecycle lines use their own label.
104
-
105
- - `/loglevel <all|stderr|sandbox|none>` switches what the transcript shows, retroactively. Bare `/loglevel` reports the current mode.
106
- - `--logs <all|stderr|sandbox|none>` sets the starting mode at launch (default `stderr`).
107
- - `Ctrl+L` at the idle prompt cycles `none → all → stderr → sandbox → none`.
108
-
109
- Every captured line, tool failure, workflow error, and eve framework log record also lands in a private per-process diagnostic log under `.eve/logs/`, regardless of the display mode. The file is JSON Lines: each line is one JSON record with `at` and `source` fields (framework log records add `level`, `namespace`, `message`, and `fields`), so it parses with any JSONL tool — `jq -c 'select(.source=="tool")'` — even when a payload spans many stack-trace lines. Long stderr output collapses in the transcript to a one-line summary pointing at the file (the raw text stays available in the `all` mode). Read the logs with `eve logs` — see the [CLI reference](../reference/cli#eve-logs).
110
-
111
- Each log has a same-named `.dump` sibling — one JSON document with environment diagnostics (eve, Node.js, and Vercel CLI versions, the Vercel CLI path, and the size of the local session store) plus running session stats: prompts, token usage, tool calls by name, and subagent dispatches. `eve logs --dump` prints the dump and the log together as one parseable report to attach when filing an issue.
112
-
113
- ## Inspect traces
114
-
115
- `/traces` opens a full-screen viewer over the local trace spool (`.eve/traces/v1`) that `eve dev` writes while you chat — see [Local traces](instrumentation#local-traces). It reads the spool files directly and refreshes about once a second, so spans from the current session stream in live. The viewer takes over the terminal's alternate screen; closing it restores the transcript exactly where you left it.
116
-
117
- The viewer opens on your current session's trace (or the most recent one). It re-tells the trace as a chat-like flow of cards: the system prompt sits at the top as a collapsed card, then user and assistant messages (assistant cards carry model, duration, token, and gateway cost metadata), and tool calls show their inputs and results inline. Work a subagent performed appears in the same flow, ordered by when it happened — between the parent's dispatch step and its resumed reply — with a dim `subagent` badge (`subagent:<name>` when the dispatch named one) on every card of the delegated turn; the delegated prompt renders as a `task` card rather than a `user` message. Error spans paint their whole card red. The header names the agent, session, span count, and duration, plus a `● live` badge while spans are still landing. `/traces <trace>` opens a specific trace by id prefix.
118
-
119
- | Key | Action |
120
- | --------- | ------------------------------------------------------------------------ |
121
- | `↑` / `↓` | Move the card selection (scroll the attributes panel when it has focus). |
122
- | `←` / `→` | Expand / collapse the selected card (only cards with hidden content). |
123
- | `Enter` | Open the attributes panel for the selected card; close it when open. |
124
- | `Tab` | Move focus between the conversation and the attributes panel. |
125
- | `[` / `]` | Cycle to the next / previous trace. |
126
- | `Esc` | Close the panel (or unfocus it), otherwise close the viewer. |
127
- | `q` | Close the viewer. |
128
-
129
- `←`/`→` or a mouse click expands a card to its full contents (the system prompt, long payloads) and collapses it back; cards that already fit have nothing to expand. The scroll wheel scrolls the conversation (or the attributes panel when the pointer is over it). Dragging with the mouse selects text — the selection highlights as you drag, and releasing copies it to your clipboard with a `Copied to clipboard` toast in the top-right corner; `Esc` cancels an in-flight selection. The attributes panel opens on the right and stays metadata-only — status, timing, ids, and the span's non-payload OTLP attributes — since the cards already carry the payloads. Model spans capture the system prompt, the prompt messages (rendered as a chat transcript), and the response (text, tool calls, finish reason); tool-call spans capture the call arguments and result, pretty-printed — each capped at 32 KB, with provider transport metadata stripped. When a conversation's messages exceed the cap, the oldest messages are dropped and the transcript notes how many were omitted. Set `EVE_TRACES_CONTENT=off` to stop capturing payload content. With no spans yet, the viewer shows an empty state and keeps watching; if tracing is disabled (`EVE_TRACES=off`) it says so instead.
130
-
131
- ## Display flags
132
-
133
- Density flags control how much of each section renders. They accept `full`, `collapsed`, `auto-collapsed`, or `hidden`.
60
+ Use `eve dev` flags to control how much detail the UI renders:
134
61
 
135
62
  ```bash
136
- eve dev --tools full --assistant-response-stats tokens --context-size 200000
63
+ eve dev --tools full --reasoning collapsed --logs all
137
64
  ```
138
65
 
139
- | Flag | Values | Effect |
140
- | ----------------------------------- | -------------------------------------------------- | ------------------------------------------------------- |
141
- | `--tools <mode>` | `full` / `collapsed` / `auto-collapsed` / `hidden` | How tool calls render (default `auto-collapsed`). |
142
- | `--reasoning <mode>` | `full` / `collapsed` / `auto-collapsed` / `hidden` | How reasoning renders (default `full`). |
143
- | `--subagents <mode>` | `full` / `collapsed` / `auto-collapsed` / `hidden` | How subagent sections render. |
144
- | `--connection-auth <mode>` | `full` / `collapsed` / `auto-collapsed` / `hidden` | How connection authorization renders. |
145
- | `--assistant-response-stats <mode>` | `tokens` / `tokensPerSecond` | Which statistic the assistant header shows. |
146
- | `--context-size <tokens>` | a token count | Model context window size, shown as a usage percentage. |
147
- | `--logs <mode>` | `all` / `stderr` / `sandbox` / `none` | Which server and agent logs to show (default `stderr`). |
66
+ | Flag | Values | Description |
67
+ | ---------------------------- | ----------------------------------------------- | -------------------------------------------------- |
68
+ | `--tools` | `full`, `collapsed`, `auto-collapsed`, `hidden` | Tool-call display. |
69
+ | `--reasoning` | `full`, `collapsed`, `auto-collapsed`, `hidden` | Reasoning display. |
70
+ | `--subagents` | `full`, `collapsed`, `auto-collapsed`, `hidden` | Subagent display. |
71
+ | `--connection-auth` | `full`, `collapsed`, `auto-collapsed`, `hidden` | Connection-authorization display. |
72
+ | `--assistant-response-stats` | `tokens`, `tokensPerSecond` | Assistant response statistic. |
73
+ | `--context-size` | Token count | Model context-window size for the usage indicator. |
74
+ | `--logs` | `all`, `stderr`, `sandbox`, `none` | Initial log display mode. |
148
75
 
149
- Connection flags: `--host` and `--port` bind the local server, and `--no-ui` runs headless (also the automatic fallback when stdout is not a TTY). See the [CLI](../reference/cli) for the full flag list.
76
+ Use `--host` and `--port` to bind the local server, or `--no-ui` to run without the terminal UI. See the [CLI reference](../reference/cli#eve-dev) for all options.
150
77
 
151
- ## Remote: `eve dev <url>`
78
+ ## Connect to a deployment
152
79
 
153
- Pass a URL and the TUI talks to a running deployment instead of starting a local server, which is handy for a Vercel preview or your production app.
80
+ Pass a URL to use the terminal UI with an existing eve server instead of starting one locally:
154
81
 
155
82
  ```bash
156
- eve dev https://<your-app>
83
+ eve dev https://your-app.vercel.app
157
84
  ```
158
85
 
159
- The bare URL is shorthand for `--url`; it cannot be combined with `--host`, `--port`, or `--no-ui`. For HTTP Basic auth, put credentials in the URL; eve sends them as a Basic `Authorization` header and strips them from the server URL before connecting:
86
+ The URL form is shorthand for `--url`. To send credentials or custom request headers, use a URL with HTTP Basic credentials or repeat `-H, --header`:
160
87
 
161
88
  ```bash
162
- eve dev https://user:pass@<your-app>
89
+ eve dev https://user:pass@your-app.example.com
90
+ eve dev https://your-app.example.com -H 'Authorization: Bearer your_token_here'
163
91
  ```
164
92
 
165
- For bearer tokens or custom schemes, repeat `-H, --header` to attach request headers.
166
-
167
- Query parameters in the target URL are preserved on every request, including
168
- session POSTs and event streams. This also supports deployment-protection URLs
169
- that carry their bypass credential in the query string.
170
-
171
- At startup the TUI asks Vercel to resolve the remote origin under the active scope. A resolved response is the authority for a project-scoped OIDC token—refreshing an expired development token when refresh credentials exist—or an automation-bypass secret. An unresolved host is probed anonymously. The TUI then requests `/eve/v1/info`, with a ten-second timeout. A successful response marks the remote ready. An eve OIDC challenge, Vercel Deployment Protection challenge, or `TRUSTED_SOURCES_ENVIRONMENT_MISMATCH` opens `/vc:login` automatically; ordinary network failures and server errors remain remote-availability errors and do not start an authentication flow. Esc or Ctrl-C cancels the authentication flow.
172
-
173
- In a remote session, `/vc:login` first resolves the deployment's Vercel project from its URL. If the active Vercel scope cannot resolve it, the flow asks for another team and reruns the lookup in that team's scope. If the CLI is logged out, the same panel runs the browser login first. The flow asks before adding any required Trusted Sources rule and requests a project-scoped token through `@vercel/oidc`. It does not relink the directory or modify `.env.local`. Finally, it retries `/eve/v1/info` to prove the credential works. A failure reports any login or Trusted Sources update that completed before it stopped.
174
-
175
- The project-scoped token represents the resolved project's Development environment. Vercel already allows a project's Development environment to call its own Preview deployments by default. For a Production or custom-environment target, `/vc:login` shows the exact Development-to-target rule before changing that project's Trusted Sources. Eve preserves existing entries. When it creates an explicit rule, it also carries Vercel's default self-access rows forward because saved rules replace those defaults. See Vercel's [Trusted Sources guide](https://vercel.com/docs/deployment-protection/methods-to-bypass-deployment-protection/trusted-sources), [error reference](https://vercel.com/docs/errors/trusted_sources_environment_mismatch), and [OIDC token anatomy](https://vercel.com/docs/oidc/reference#oidc-token-anatomy).
176
-
177
- `VERCEL_AUTOMATION_BYPASS_SECRET` remains available for a Protection Bypass for Automation token. See [Deploy to Vercel](./deployment/vercel#verify-the-deployment) for the smoke-test flow.
93
+ For a Vercel deployment that needs authentication, run `/vc:login` and follow the prompt. Remote sessions do not modify the local project's Vercel link or `.env.local`.
178
94
 
179
95
  ## What to read next
180
96
 
181
- - [Observability](./instrumentation): OpenTelemetry, run tags, and common failures.
182
- - [CLI](../reference/cli): every command and flag.
97
+ - [Instrumentation](./instrumentation): traces, OpenTelemetry, and diagnostics.
98
+ - [CLI](../reference/cli): commands and flags.
@@ -7,6 +7,8 @@ The experimental `Workflow` tool lets the model write JavaScript that coordinate
7
7
 
8
8
  A single turn can already call several subagents, and parallel tool calls dispatch concurrently. What a workflow adds is _programmatic_ coordination. The program decides how many subagents to run based on an earlier result, which output feeds which call, and how to combine everything. That is logic the model cannot express as a few one-off calls.
9
9
 
10
+ `Workflow` is a model-facing tool, not an API for authored tools, hooks, or application code. Authored code cannot submit a Workflow program or use `Workflow` to start an arbitrary user-authored Vercel Workflow. Use the [client SDK](./client/overview) when application code needs to start or continue an eve session; use ordinary application APIs for other deterministic orchestration.
11
+
10
12
  ## Enable the Workflow tool
11
13
 
12
14
  Export the experimental Workflow definition from `agent/tools/workflow.ts`. The helper name carries the "experimental" warning, but the tool the model actually sees is named `Workflow`.