eve 0.28.0 → 0.29.1

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 (226) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/src/channel/types.d.ts +6 -0
  3. package/dist/src/chunks/{use-eve-agent-hdPX68_i.js → use-eve-agent-CyDt3Lny.js} +2 -0
  4. package/dist/src/chunks/{use-eve-agent-CZkX_ZTT.js → use-eve-agent-DaH3cf8K.js} +2 -0
  5. package/dist/src/cli/commands/agent-prompt/collect-intent.md +1 -1
  6. package/dist/src/cli/commands/channels.d.ts +0 -17
  7. package/dist/src/cli/commands/channels.js +1 -1
  8. package/dist/src/cli/commands/deploy.js +1 -1
  9. package/dist/src/cli/commands/extension-init.js +1 -1
  10. package/dist/src/cli/commands/init.js +1 -1
  11. package/dist/src/cli/commands/integration-connect.d.ts +29 -0
  12. package/dist/src/cli/commands/integration-connect.js +1 -0
  13. package/dist/src/cli/commands/integration-setup.d.ts +2 -3
  14. package/dist/src/cli/commands/integration-setup.js +1 -1
  15. package/dist/src/cli/commands/register-integration-commands.js +1 -1
  16. package/dist/src/cli/commands/registry-setup-command.d.ts +13 -3
  17. package/dist/src/cli/commands/registry-setup-command.js +2 -1
  18. package/dist/src/cli/commands/registry.d.ts +35 -1
  19. package/dist/src/cli/commands/registry.js +1 -1
  20. package/dist/src/cli/commands/trace.js +1 -1
  21. package/dist/src/cli/dev/tui/agent-header.js +1 -1
  22. package/dist/src/cli/dev/tui/prompt-command-handler.js +1 -1
  23. package/dist/src/cli/dev/tui/prompt-commands.d.ts +1 -1
  24. package/dist/src/cli/dev/tui/prompt-commands.js +1 -1
  25. package/dist/src/cli/dev/tui/remote-auth-command.js +1 -1
  26. package/dist/src/cli/dev/tui/runner.d.ts +8 -7
  27. package/dist/src/cli/dev/tui/runner.js +1 -1
  28. package/dist/src/cli/dev/tui/setup-commands.d.ts +8 -13
  29. package/dist/src/cli/dev/tui/setup-commands.js +3 -2
  30. package/dist/src/cli/dev/tui/setup-flow.d.ts +14 -5
  31. package/dist/src/cli/dev/tui/setup-panel.d.ts +5 -1
  32. package/dist/src/cli/dev/tui/setup-panel.js +2 -2
  33. package/dist/src/cli/dev/tui/status-line.d.ts +1 -1
  34. package/dist/src/cli/dev/tui/status-line.js +1 -1
  35. package/dist/src/cli/dev/tui/terminal-renderer.d.ts +2 -5
  36. package/dist/src/cli/dev/tui/terminal-renderer.js +12 -12
  37. package/dist/src/cli/dev/tui/test/fake-setup-flow-renderer.js +1 -1
  38. package/dist/src/cli/dev/tui/tui-prompter.js +1 -1
  39. package/dist/src/cli/dev/tui/tui.d.ts +2 -0
  40. package/dist/src/cli/dev/tui/tui.js +1 -1
  41. package/dist/src/cli/dev/tui/vercel-status.d.ts +1 -6
  42. package/dist/src/cli/dev/tui/vercel-status.js +1 -1
  43. package/dist/src/cli/option-parsers.d.ts +11 -0
  44. package/dist/src/cli/option-parsers.js +1 -0
  45. package/dist/src/cli/run.d.ts +1 -12
  46. package/dist/src/cli/run.js +3 -3
  47. package/dist/src/cli/shutdown.d.ts +2 -0
  48. package/dist/src/cli/shutdown.js +1 -1
  49. package/dist/src/compiled/.vendor-stamp.json +5 -5
  50. package/dist/src/compiled/@opentelemetry/api/index.d.ts +19 -1
  51. package/dist/src/compiled/@workflow/core/index.js +1 -1
  52. package/dist/src/compiled/@workflow/core/private.d.ts +21 -5
  53. package/dist/src/compiled/@workflow/core/private.js +1 -1
  54. package/dist/src/compiled/@workflow/core/runtime/world.d.ts +10 -5
  55. package/dist/src/compiled/@workflow/core/runtime.js +3 -3
  56. package/dist/src/compiled/@workflow/core/telemetry/semantic-conventions.d.ts +2 -2
  57. package/dist/src/compiled/@workflow/core/version.d.ts +1 -1
  58. package/dist/src/compiled/@workflow/core/workflow.js +1 -1
  59. package/dist/src/compiled/@workflow/world-local/index.js +3 -3
  60. package/dist/src/compiled/@workflow/world-vercel/index.js +13 -13
  61. package/dist/src/compiled/_chunks/workflow/{attribute-changes-DeZc2RZz.js → attribute-changes-1LmTKuTT.js} +1 -1
  62. package/dist/src/compiled/_chunks/workflow/{private-Cre8uYkA.js → private-BcwCGTV5.js} +1 -1
  63. package/dist/src/compiled/_chunks/workflow/{resume-hook-ip1hbn1b.js → resume-hook-D1_5NCZ6.js} +1 -1
  64. package/dist/src/compiled/_chunks/workflow/{run-CWytxfIp.js → run-C240Ctf4.js} +1 -1
  65. package/dist/src/compiled/_chunks/workflow/sleep-De802yfX.js +1 -0
  66. package/dist/src/compiled/_chunks/workflow/{wait-until-De9yESQN.js → wait-until-z48sPUjU.js} +2 -2
  67. package/dist/src/compiled/shadcn-registry/index.d.ts +1 -0
  68. package/dist/src/evals/assertions/collector.d.ts +2 -10
  69. package/dist/src/evals/assertions/collector.js +1 -1
  70. package/dist/src/evals/cli/eval.d.ts +6 -2
  71. package/dist/src/evals/cli/eval.js +2 -2
  72. package/dist/src/evals/cli/filter.d.ts +14 -0
  73. package/dist/src/evals/cli/filter.js +1 -0
  74. package/dist/src/evals/context.js +1 -1
  75. package/dist/src/evals/diagnostics.d.ts +8 -0
  76. package/dist/src/evals/diagnostics.js +1 -0
  77. package/dist/src/evals/expect/index.d.ts +1 -1
  78. package/dist/src/evals/expect/index.js +1 -1
  79. package/dist/src/evals/index.d.ts +1 -1
  80. package/dist/src/evals/judge.js +2 -1
  81. package/dist/src/evals/runner/artifacts.js +1 -1
  82. package/dist/src/evals/runner/reporters/assertion-diagnostics.d.ts +3 -0
  83. package/dist/src/evals/runner/reporters/assertion-diagnostics.js +3 -0
  84. package/dist/src/evals/runner/reporters/braintrust.js +1 -1
  85. package/dist/src/evals/runner/reporters/console.js +1 -1
  86. package/dist/src/evals/runner/reporters/junit.js +2 -2
  87. package/dist/src/evals/types.d.ts +21 -5
  88. package/dist/src/execution/cancel-descendant-turns-step.js +1 -1
  89. package/dist/src/execution/turn-cancellation-control.js +1 -1
  90. package/dist/src/execution/turn-workflow.js +1 -1
  91. package/dist/src/execution/workflow-runtime.js +1 -1
  92. package/dist/src/execution/workflow-steps.d.ts +7 -0
  93. package/dist/src/execution/workflow-steps.js +1 -1
  94. package/dist/src/harness/turn-sleep.d.ts +12 -0
  95. package/dist/src/harness/turn-sleep.js +1 -0
  96. package/dist/src/internal/application/compiled-artifacts.js +7 -7
  97. package/dist/src/internal/application/package.js +1 -1
  98. package/dist/src/internal/nitro/host/dev-authored-source-watcher.d.ts +4 -0
  99. package/dist/src/internal/nitro/host/dev-authored-source-watcher.js +1 -1
  100. package/dist/src/internal/nitro/host/start-development-server.js +2 -2
  101. package/dist/src/internal/nitro/routes/channel-dispatch.js +1 -1
  102. package/dist/src/internal/nitro/routes/channel-request-instrumentation.d.ts +36 -0
  103. package/dist/src/internal/nitro/routes/channel-request-instrumentation.js +1 -0
  104. package/dist/src/internal/workflow/development-world-protocol.js +1 -1
  105. package/dist/src/internal/workflow/world-target.d.ts +7 -0
  106. package/dist/src/internal/workflow/world-target.js +1 -0
  107. package/dist/src/protocol/routes.d.ts +4 -0
  108. package/dist/src/protocol/routes.js +1 -1
  109. package/dist/src/public/instrumentation/index.d.ts +7 -0
  110. package/dist/src/public/tools/sleep/index.d.ts +18 -0
  111. package/dist/src/public/tools/sleep/index.js +1 -0
  112. package/dist/src/runtime/framework-tools/sleep.d.ts +15 -0
  113. package/dist/src/runtime/framework-tools/sleep.js +1 -0
  114. package/dist/src/services/dev-client/runtime-artifacts.d.ts +7 -0
  115. package/dist/src/services/dev-client/runtime-artifacts.js +1 -1
  116. package/dist/src/setup/boxes/apply-ai-gateway-credential.js +1 -1
  117. package/dist/src/setup/boxes/deploy-project.d.ts +3 -3
  118. package/dist/src/setup/flows/deploy.js +1 -1
  119. package/dist/src/setup/flows/ensure-vercel-project.d.ts +17 -0
  120. package/dist/src/setup/flows/ensure-vercel-project.js +1 -0
  121. package/dist/src/setup/flows/in-project.d.ts +1 -1
  122. package/dist/src/setup/flows/link.js +1 -1
  123. package/dist/src/setup/flows/model.js +1 -1
  124. package/dist/src/setup/flows/provider.js +1 -1
  125. package/dist/src/setup/flows/registry.d.ts +20 -0
  126. package/dist/src/setup/flows/registry.js +1 -0
  127. package/dist/src/setup/index.d.ts +0 -1
  128. package/dist/src/setup/index.js +1 -1
  129. package/dist/src/setup/{channel-setup-environment.d.ts → integrations/channels/environment.d.ts} +2 -2
  130. package/dist/src/setup/integrations/channels/environment.js +1 -0
  131. package/dist/src/setup/{channel-setup-integrations.d.ts → integrations/channels/index.d.ts} +3 -3
  132. package/dist/src/setup/integrations/channels/index.js +1 -0
  133. package/dist/src/setup/{channel-setup-runner.d.ts → integrations/channels/runner.d.ts} +1 -1
  134. package/dist/src/setup/integrations/channels/runner.js +1 -0
  135. package/dist/src/setup/{boxes/add-channels.d.ts → integrations/channels/setup.d.ts} +32 -22
  136. package/dist/src/setup/integrations/channels/setup.js +2 -0
  137. package/dist/src/setup/{channel-setup-slack.d.ts → integrations/channels/slack.d.ts} +1 -1
  138. package/dist/src/setup/integrations/channels/slack.js +1 -0
  139. package/dist/src/setup/{channel-setup-integration.d.ts → integrations/channels/types.d.ts} +23 -7
  140. package/dist/src/setup/{channel-setup-ui.d.ts → integrations/channels/ui.d.ts} +2 -2
  141. package/dist/src/setup/integrations/channels/ui.js +2 -0
  142. package/dist/src/setup/{channel-setup-web.d.ts → integrations/channels/web.d.ts} +1 -1
  143. package/dist/src/setup/integrations/channels/web.js +1 -0
  144. package/dist/src/setup/primitives/run-vercel.d.ts +1 -0
  145. package/dist/src/setup/primitives/run-vercel.js +1 -1
  146. package/dist/src/setup/prompter.d.ts +16 -3
  147. package/dist/src/setup/prompter.js +1 -1
  148. package/dist/src/setup/registry-setup-client.d.ts +18 -0
  149. package/dist/src/setup/registry-setup-client.js +2 -0
  150. package/dist/src/setup/registry-setup-protocol.d.ts +93 -0
  151. package/dist/src/setup/registry-setup-protocol.js +1 -0
  152. package/dist/src/setup/scaffold/channels-catalog.d.ts +1 -1
  153. package/dist/src/setup/scaffold/create/extension.js +2 -2
  154. package/dist/src/setup/scaffold/create/project.js +2 -2
  155. package/dist/src/setup/scaffold/create-in-place.d.ts +1 -0
  156. package/dist/src/setup/scaffold/create-in-place.js +1 -0
  157. package/dist/src/setup/scaffold/index.js +1 -1
  158. package/dist/src/setup/scaffold/update/connections.js +3 -3
  159. package/dist/src/setup/scaffold/update/update-connection-connector.js +1 -1
  160. package/dist/src/setup/vercel-project-framework.d.ts +1 -1
  161. package/dist/src/setup/vercel-project-framework.js +1 -1
  162. package/dist/src/setup/vercel-project.d.ts +17 -2
  163. package/dist/src/setup/vercel-project.js +0 -0
  164. package/dist/src/svelte/index.js +1 -1
  165. package/dist/src/svelte/use-eve-agent.js +1 -1
  166. package/dist/src/vue/index.js +1 -1
  167. package/dist/src/vue/use-eve-agent.js +1 -1
  168. package/docs/channels/overview.mdx +1 -1
  169. package/docs/channels/slack.mdx +2 -2
  170. package/docs/concepts/default-harness.md +12 -0
  171. package/docs/evals/assertions.mdx +8 -1
  172. package/docs/evals/judge.mdx +11 -1
  173. package/docs/evals/reporters.mdx +1 -1
  174. package/docs/evals/running.mdx +3 -0
  175. package/docs/guides/dev-tui.md +9 -14
  176. package/docs/guides/instrumentation.md +12 -1
  177. package/docs/reference/cli.md +25 -38
  178. package/docs/reference/typescript-api.md +2 -1
  179. package/docs/tutorial/ship-it.mdx +2 -2
  180. package/package.json +12 -6
  181. package/dist/src/compiled/@workflow/core/runtime/world-target.d.ts +0 -11
  182. package/dist/src/compiled/_chunks/workflow/sleep-BjrUxUcs.js +0 -1
  183. package/dist/src/node_modules/.pnpm/@workflow_utils@5.0.0-beta.7/node_modules/@workflow/utils/dist/index.js +0 -1
  184. package/dist/src/node_modules/.pnpm/@workflow_utils@5.0.0-beta.7/node_modules/@workflow/utils/dist/parse-name.js +0 -1
  185. package/dist/src/node_modules/.pnpm/@workflow_utils@5.0.0-beta.7/node_modules/@workflow/utils/dist/promise.js +0 -1
  186. package/dist/src/node_modules/.pnpm/@workflow_utils@5.0.0-beta.7/node_modules/@workflow/utils/dist/time.js +0 -1
  187. package/dist/src/node_modules/.pnpm/@workflow_utils@5.0.0-beta.7/node_modules/@workflow/utils/dist/workflow-routes.js +0 -1
  188. package/dist/src/node_modules/.pnpm/@workflow_utils@5.0.0-beta.7/node_modules/@workflow/utils/dist/world-target.js +0 -1
  189. package/dist/src/node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js +0 -1
  190. package/dist/src/setup/boxes/add-channels.js +0 -2
  191. package/dist/src/setup/boxes/add-connections.d.ts +0 -26
  192. package/dist/src/setup/boxes/add-connections.js +0 -1
  193. package/dist/src/setup/boxes/install-channel-registry-items.d.ts +0 -8
  194. package/dist/src/setup/boxes/install-channel-registry-items.js +0 -1
  195. package/dist/src/setup/boxes/one-shot-next-steps.d.ts +0 -18
  196. package/dist/src/setup/boxes/one-shot-next-steps.js +0 -2
  197. package/dist/src/setup/boxes/preflight.d.ts +0 -37
  198. package/dist/src/setup/boxes/preflight.js +0 -1
  199. package/dist/src/setup/boxes/resolve-target.d.ts +0 -58
  200. package/dist/src/setup/boxes/resolve-target.js +0 -1
  201. package/dist/src/setup/boxes/scaffold.d.ts +0 -40
  202. package/dist/src/setup/boxes/scaffold.js +0 -1
  203. package/dist/src/setup/boxes/select-channels.d.ts +0 -49
  204. package/dist/src/setup/boxes/select-channels.js +0 -1
  205. package/dist/src/setup/boxes/select-chat.d.ts +0 -38
  206. package/dist/src/setup/boxes/select-chat.js +0 -1
  207. package/dist/src/setup/boxes/select-connections.d.ts +0 -30
  208. package/dist/src/setup/boxes/select-connections.js +0 -1
  209. package/dist/src/setup/boxes/select-setup-mode.d.ts +0 -32
  210. package/dist/src/setup/boxes/select-setup-mode.js +0 -1
  211. package/dist/src/setup/channel-setup-deployment.d.ts +0 -11
  212. package/dist/src/setup/channel-setup-deployment.js +0 -1
  213. package/dist/src/setup/channel-setup-environment.js +0 -1
  214. package/dist/src/setup/channel-setup-integration.js +0 -1
  215. package/dist/src/setup/channel-setup-integrations.js +0 -1
  216. package/dist/src/setup/channel-setup-runner.js +0 -1
  217. package/dist/src/setup/channel-setup-slack.js +0 -1
  218. package/dist/src/setup/channel-setup-ui.js +0 -2
  219. package/dist/src/setup/channel-setup-web.js +0 -1
  220. package/dist/src/setup/flows/channels.d.ts +0 -57
  221. package/dist/src/setup/flows/channels.js +0 -1
  222. package/dist/src/setup/flows/connections.d.ts +0 -37
  223. package/dist/src/setup/flows/connections.js +0 -3
  224. package/dist/src/setup/onboarding.d.ts +0 -60
  225. package/dist/src/setup/onboarding.js +0 -1
  226. /package/dist/src/{node_modules/.pnpm/@workflow_utils@5.0.0-beta.7/node_modules/@workflow/utils/dist/pluralize.js → setup/integrations/channels/types.js} +0 -0
@@ -10,6 +10,7 @@ eve eval # run all discovered evals locally
10
10
  eve eval weather smoke # run selected evals (an id, or a directory prefix)
11
11
  eve eval --url https://<app> # target a remote app instead of a local host
12
12
  eve eval --tag fast # only evals carrying a tag
13
+ eve eval --exclude-tag slow # skip evals carrying a tag
13
14
  eve eval --strict # soft below-threshold assertions also fail the exit code
14
15
  eve eval --timeout 60000 # per-eval timeout in milliseconds
15
16
  eve eval --max-concurrency 4 # cap concurrent eval executions (default 8)
@@ -22,6 +23,8 @@ eve eval --skip-report # skip config and eval-defined reporters (e.g. Br
22
23
 
23
24
  Positional ids match exactly or by directory prefix: `eve eval weather` runs `evals/weather.eval.ts`, every eval under `evals/weather/`, and every entry of an array-exported `weather.eval.ts`.
24
25
 
26
+ Tag filters compose: `--tag` keeps evals carrying at least one listed tag, then `--exclude-tag` drops any eval carrying an excluded tag. A `--tag` filter that matches nothing is a configuration error (exit `2`), but a run where `--exclude-tag` removes every match succeeds with nothing executed — exclusion expresses "this suite does not apply here."
27
+
25
28
  ## Exit codes
26
29
 
27
30
  | Code | Means |
@@ -13,10 +13,10 @@ On startup the TUI prints a brand line with your agent's name, plus a rotating t
13
13
 
14
14
  ```text
15
15
  eve weather-agent
16
- Use /channels to add more ways to reach your agent.
16
+ Use /add to install integrations from the registry.
17
17
  ```
18
18
 
19
- If agent discovery reported problems, an error and warning count renders between the two lines. Instructions, tools, skills, and subagents are one `eve info` away, and `/help` lists every command. The TUI also runs a startup check. A fresh `eve init` starts local `eve dev` with `/model` prefilled. That input starts onboarding: the flow installs the Vercel CLI if needed, asks you to log in if needed, then opens `/model` before the first prompt. Other `eve dev` sessions show missing setup as an attention line, with each command's outcome hanging under it on a `⎿` connector.
19
+ If agent discovery reported problems, an error and warning count renders between the two lines. Instructions, tools, skills, and subagents are one `eve info` away, and `/help` lists every command. The TUI also runs a startup check. A fresh `eve init` starts local `eve dev` with `/model` prefilled. That input starts onboarding: the flow installs the Vercel CLI if needed, asks you to log in if needed, opens `/model`, then offers categorized next steps for channels, connections, capabilities, and observability through the registry before the first prompt. Other `eve dev` sessions show missing setup as an attention line, with each command's outcome hanging under it on a `⎿` connector.
20
20
 
21
21
  ## Reading the transcript
22
22
 
@@ -24,19 +24,18 @@ The conversation streams straight into your terminal's normal scrollback, so you
24
24
 
25
25
  Each turn renders without boxes. A colored gutter glyph marks who is speaking, tool calls collapse to a one-line summary (`✓ get_weather city="SF" → 73°F`), and a subagent's work is indented beneath its `◆` header. When input is ready, the prompt stays bare until you type. A green circle-dot pulses while the agent is waiting to answer and disappears when reasoning or answer content begins.
26
26
 
27
- A persistent line beneath the prompt or status shows the model — with its authored reasoning level and a `↯` marker when the Gateway priority tier is on (`xai/grok-4.5@xhigh ↯`) — the linked Vercel project, and a yellow `/deploy pending` marker once a channel added this session still needs `/deploy`. The Vercel segment stays hidden until the directory is linked. Local sessions lead with a gray `:port` badge. Remote sessions lead with a padded `↗ project (environment)` badge, or the host when Vercel cannot resolve the deployment. The badge is gray while checking or unavailable, yellow while authentication is required or failed, and blue when connected. Status segments separate with plain whitespace. Remote status lines omit AI Gateway endpoint state.
27
+ A persistent line beneath the prompt or status shows the model — with its authored reasoning level and a `↯` marker when the Gateway priority tier is on (`xai/grok-4.5@xhigh ↯`) — and the linked Vercel project. The Vercel segment stays hidden until the directory is linked. Local sessions lead with a gray `:port` badge. Remote sessions lead with a padded `↗ project (environment)` badge, or the host when Vercel cannot resolve the deployment. The badge is gray while checking or unavailable, yellow while authentication is required or failed, and blue when connected. Status segments separate with plain whitespace. Remote status lines omit AI Gateway endpoint state.
28
28
 
29
29
  Errors render compactly with docs links highlighted. A code bug escaping your agent's own code shows its stack trace dim beneath the error headline. Dev-server rebuilds condense into one status row that updates in place (`tui/setup-panel.ts changed · rebuilding…`, then `· rebuilt`); only the latest rebuild shows, and paths shrink to their last two components.
30
30
 
31
31
  ## Slash commands
32
32
 
33
- Each command echoes as an invocation line, asks through a bordered panel that takes the input area's place (one question at a time, separate from the chat transcript), and finishes with a one-line `⎿` result. Loading states stay on the ephemeral status line instead of piling into the transcript; model, channel, connection, and the Vercel CLI commands (`/vc:install`, `/vc:login`) use the same green square pulse as the build phase, while `/deploy` keeps a spinner. A connection setup waiting for browser action changes that pulse and the word "browser" to yellow. Setup menus render the selected option with a filled arrow and an inverse label padded by one space on each side. Text prompts use a blinking block cursor over the character at the caret. The selected label is blue normally and yellow for warning rows.
33
+ Each command echoes as an invocation line, asks through a bordered panel that takes the input area's place (one question at a time, separate from the chat transcript), and finishes with a one-line `⎿` result. Loading states stay on the ephemeral status line instead of piling into the transcript; model, registry, and the Vercel CLI commands (`/vc:install`, `/vc:login`) use the same green square pulse as the build phase, while `/deploy` keeps a spinner. A setup waiting for browser action changes that pulse and the word "browser" to yellow. Setup menus render the selected option with a filled arrow and an inverse label padded by one space on each side. Text prompts use a blinking block cursor over the character at the caret. The selected label is blue normally and yellow for warning rows.
34
34
 
35
35
  | Command | Does |
36
36
  | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
37
37
  | `/model` | Opens a configure menu that loops until Done (or Esc). See [Configure the model and provider](#configure-the-model-and-provider). |
38
- | `/channels` | Shows the agent's channel list and adds the one you pick. See [Add a channel](#add-a-channel). |
39
- | `/connect` | Shows the Vercel Connect MCP catalog and configures the server you pick. See [Add a connection](#add-a-connection). |
38
+ | `/add` | Searches registry integrations or adds an item address entered directly. |
40
39
  | `/deploy` | Ships the agent to Vercel production, linking the directory first when it is unlinked. |
41
40
  | `/vc:install` | Installs the Vercel CLI. Available locally and on a remote session. |
42
41
  | `/vc:login` | Logs in to Vercel locally. On a remote session, resolves the deployment's project, refreshes its OIDC token, and confirms any required Trusted Sources rule. |
@@ -45,7 +44,7 @@ Each command echoes as an invocation line, asks through a bordered panel that ta
45
44
  | `/exit` | Quits the TUI. |
46
45
  | `/help` | Lists the commands available for the current local or remote session. |
47
46
 
48
- `/model`, `/channels`, `/connect`, and `/deploy` manage the local agent or its linked project. They are available only when `eve dev` runs the server locally, not when connected to a remote server with `--url`.
47
+ `/model`, `/add`, and `/deploy` manage the local agent or its linked project. They are available only when `eve dev` runs the server locally, not when connected to a remote server with `--url`.
49
48
 
50
49
  ### Configure the model and provider
51
50
 
@@ -55,15 +54,11 @@ The provider row opens one menu: AI Gateway via a project, AI Gateway via `AI_GA
55
54
 
56
55
  The provider row demands attention (a bold yellow "Configure model access" with a yellow "Not configured" hint that dims when unselected and uses the terminal foreground when selected) until a link or gateway credential is detected, then names the connection afterward (for example "AI Gateway (Linked to my-project in my-team)"). Setup menus mark the cursor row with a padded, filled-arrow inverse label that inherits the row's accent: blue normally and yellow for warning rows. In stacked menus, the selected row's description appears directly beneath that option. The completed command's outcome stays in the transcript after the panel closes. When a turn fails because AI Gateway authentication is missing or stale, the error points you at `/model` directly.
57
56
 
58
- ### Add a channel
57
+ ### Browse registry integrations
59
58
 
60
- `/channels` shows the agent's channel list. Already-registered channels render as checked, focusable rows with an "Already installed" hint. Picking one adds it (including the Slack Connect provisioning), then installs the dependencies the scaffold added so the dev server can load the new channels right away. After each addition the list repaints with the channel checked, until Done (or Esc) leaves the flow.
59
+ `/add` first organizes integrations by what they add: a way to chat, tools and data, capabilities, or observability. Pick a category to open its searchable catalog from the official eve registry and the registry namespaces configured in `package.json`, or browse everything. Each integration shows its source beside its name, such as `Vercel` or a configured registry namespace. Select a result to review its source, packages, environment variables, and target files before adding it, or type an official item path, configured namespace address, or HTTP(S) URL directly into the search bar. After an add attempt finishes, the panel closes instead of returning to the catalog.
61
60
 
62
- ### Add a connection
63
-
64
- `/connect` shows a searchable list of MCP servers available through Vercel Connect. Already-authored connections remain checked. Logged-out users are directed to `/vc:login`. When the directory is not linked, selecting a server opens the same team and project flow used by `/model`, including creating a project or linking an existing one.
65
-
66
- For a selected server, eve first tries to attach the provider's canonical connector. If that fails, choose an existing connector from a searchable list or create one with a specific name. The fallback stays scoped to the team selected by the linked project. A connector created by the current attempt is removed if attachment or connection-file patching fails. Successful setup writes `agent/connections/<name>.ts`, records the attached connector UID, installs the new dependency so the dev server can load it, then returns to the main prompt.
61
+ Connection registry items install their definition and then configure Vercel Connect through the same `/add` flow. If the directory is unlinked, setup first offers to create or link a project. Run `eve add connection/<name>` for the equivalent CLI flow.
67
62
 
68
63
  ## Keyboard shortcuts
69
64
 
@@ -13,7 +13,7 @@ When no authored `instrumentation.ts` exists, `eve dev` records agent, AI SDK, a
13
13
 
14
14
  The directory is an immutable OTLP/JSON spool and remains available after `eve dev` exits, subject to the [retention policy](#local-trace-retention) below. Inspection tools may build a query index from these segments, but the index is derived and can be rebuilt without changing the captured trace data.
15
15
 
16
- Use `eve trace ls` to list captured traces and `eve trace <trace>` to inspect a session's span tree.
16
+ Use `eve traces ls` to list captured traces and `eve traces <trace>` to inspect a session's span tree.
17
17
 
18
18
  When a model call is served by Vercel AI Gateway, its `agent.step` span also carries the cost the gateway reported: `gen_ai.usage.cost` (raw inference, USD), `gen_ai.usage.gateway_cost` (with the gateway surcharge), `gen_ai.usage.input_cost` / `gen_ai.usage.output_cost` (the split), and `gen_ai.generation.id` for reconciliation with the gateway dashboard. These attributes only exist for gateway-served calls — other providers emit nothing. Cost per turn is the sum across the turn's step spans.
19
19
 
@@ -155,6 +155,17 @@ ai.eve.turn {eve.session.id}
155
155
 
156
156
  eve creates the `ai.eve.turn` parent span per turn and passes enriched telemetry to the AI SDK so model calls and tool executions are traced automatically. Session, turn, step, and channel context is injected as the framework half of the runtime context (`eve.version`, `eve.session.id`, `eve.environment`, `eve.turn.id`, `eve.turn.sequence`, `eve.step.index`, `eve.channel.kind`) and rides onto the spans alongside any values your `events["step.started"]` callback returns under `runtimeContext`.
157
157
 
158
+ Set `traceChannelRequests: true` on `defineInstrumentation` to also wrap each inbound channel HTTP request in a single OpenTelemetry `SERVER` span named for the registered route, which parents the turn tree above (and any `hook.resume` and outgoing HTTP spans):
159
+
160
+ ```text
161
+ POST /eve/v1/session/:sessionId
162
+ └── hook.resume
163
+ ├── GET hooks/by-token
164
+ └── POST hook_received
165
+ ```
166
+
167
+ The span stays low-cardinality (route template in `http.route`, method in `http.request.method`, never the concrete URL) and records no session ids, tokens, headers, bodies, or query parameters. It adopts an incoming `traceparent` as its parent when present, so eve requests correlate with upstream traces. It defaults to `false`; enable it only when you want these request spans.
168
+
158
169
  ## Workflow run tags
159
170
 
160
171
  Separately from OpenTelemetry, eve tags every workflow run with reserved `$eve.*` attributes. These live on the Vercel Workflow run, queryable in the Workflow dashboard, not on OTel spans, and you do not configure them: they are framework-owned and emitted automatically on every session, turn, and subagent run, whether or not an `instrumentation.ts` file is present. Authored code cannot set or override the `$eve.` namespace.
@@ -17,12 +17,11 @@ The `eve` binary (`bin: eve`) runs from your app root, and every command first l
17
17
  | `eve dev <url>` | Connect the UI to an existing server URL (e.g. a remote deployment) instead of booting a local server |
18
18
  | `eve logs [logid]` | Print an `eve dev` diagnostic log (the most recent when `logid` is omitted) |
19
19
  | `eve logs ls` | List `eve dev` diagnostic logs, most recent first |
20
- | `eve trace ls` | List locally captured agent traces, most recent first |
21
- | `eve trace [trace]` | Show a local span tree (the most recent when omitted) |
20
+ | `eve traces ls` | List locally captured agent traces, most recent first |
21
+ | `eve traces [trace]` | Show a local span tree (the most recent when omitted) |
22
22
  | `eve link` | Link the directory to a Vercel project and pull AI Gateway credentials |
23
23
  | `eve deploy` | Deploy the agent to Vercel production (links first if needed) |
24
24
  | `eve eval` | Run evals against the local app or a remote target |
25
- | `eve channels add [kind]` | Scaffold a channel interactively, or by kind (`slack` \| `web`) |
26
25
  | `eve channels list` | List user-authored channels |
27
26
  | `eve extension init [target]` | Create a new extension package |
28
27
  | `eve extension build` | Build the current package as an extension |
@@ -47,9 +46,9 @@ Creates a new agent app or adds an agent to an existing app. Always installs dep
47
46
 
48
47
  After scaffolding, a human terminal usually continues into `eve dev` (or a coding-agent REPL if one is on `PATH` and you pick it). Coding-agent launches print the next steps instead of opening the TUI, so the session does not get stuck. Fresh projects use the parent workspace's package manager when there is one; otherwise they use the manager that launched `eve init`.
49
48
 
50
- | Flag | Type | Default | Description |
51
- | ---------------------- | ---- | ------- | ----------------------------------------------------------------------------------------------------- |
52
- | `--channel-web-nextjs` | flag | off | Add the Web Chat app (Next.js). Not for existing projects — run `eve channels add web` there instead. |
49
+ | Flag | Type | Default | Description |
50
+ | ---------------------- | ---- | ------- | ---------------------------------------------------------------------------------------------------- |
51
+ | `--channel-web-nextjs` | flag | off | Add the Web Chat app (Next.js). Not for existing projects — run `eve add channel/web` there instead. |
53
52
 
54
53
  ## `eve extension`
55
54
 
@@ -184,7 +183,7 @@ Pass a bare URL and the UI connects to that server instead of booting a local on
184
183
  | `--context-size <tokens>` | number | none | Model context window size, shown as a usage percentage |
185
184
  | `--logs <mode>` | enum | `stderr` | Server/agent logs to show: `all` \| `stderr` \| `sandbox` \| `none` |
186
185
 
187
- A fresh `eve init` passes `--input /model`. That bare local input starts onboarding: the TUI installs the Vercel CLI if needed, asks you to log in if needed, then opens `/model`. Other input stays editable in the prompt.
186
+ A fresh `eve init` passes `--input /model`. That bare local input starts onboarding: the TUI installs the Vercel CLI if needed, asks you to log in if needed, opens `/model`, then offers categorized registry next steps before the first prompt. Other input stays editable in the prompt.
188
187
 
189
188
  For a URL target protected by HTTP Basic auth, put the credentials in the URL. eve sends them as a Basic `Authorization` header and strips them from the server URL before connecting:
190
189
 
@@ -244,16 +243,16 @@ A log id is the file name without `.log` (for example `dev-2026-07-15T12-00-00.0
244
243
 
245
244
  Each log has a same-named `.dump` sibling holding environment diagnostics and session stats as one JSON document. `eve logs --dump` (with or without a log id) prepends that document to the JSONL log body; the combined output is a valid JSON value stream (`eve logs --dump | jq -c .`), one self-contained report to attach to an issue. When a log has no dump, the flag is silently a no-op.
246
245
 
247
- ## `eve trace`
246
+ ## `eve traces`
248
247
 
249
248
  ```bash
250
- eve trace ls # list traces, most recent first
251
- eve trace ls --json # emit machine-readable trace summaries
252
- eve trace # show the most recent span tree
253
- eve trace <trace> # show one span tree
249
+ eve traces ls # list traces, most recent first
250
+ eve traces ls --json # emit machine-readable trace summaries
251
+ eve traces # show the most recent span tree
252
+ eve traces <trace> # show one span tree
254
253
  ```
255
254
 
256
- `eve trace ls` reads the immutable OTLP/JSON segments captured under `.eve/traces/v1`; `eve dev` does not need to be running. `eve trace` accepts a full trace id, an `agent.session.id`, or an unambiguous prefix of either. Malformed or incomplete segments are skipped without hiding valid spans from the same trace.
255
+ `eve traces ls` reads the immutable OTLP/JSON segments captured under `.eve/traces/v1`; `eve dev` does not need to be running. `eve traces` accepts a full trace id, an `agent.session.id`, or an unambiguous prefix of either. Malformed or incomplete segments are skipped without hiding valid spans from the same trace.
257
256
 
258
257
  ## `eve link`
259
258
 
@@ -279,34 +278,22 @@ eve eval [evalId...] [--url <url>] [options]
279
278
 
280
279
  Runs all discovered evals when no eval ids are given; ids match exactly or by directory prefix (`eve eval weather` runs everything under `evals/weather/`). Exits `0` when every eval passed its checks, `1` when any eval failed (a failed check, an execution error, or a `--strict` threshold miss), `2` on configuration errors.
281
280
 
282
- | Flag | Type | Default | Description |
283
- | ----------------------- | ------ | ------- | ---------------------------------------------- |
284
- | `--url <url>` | string | none | Remote agent URL (skip local host startup) |
285
- | `--tag <tag...>` | string | none | Run only evals carrying a tag |
286
- | `--strict` | flag | off | Below-threshold scores also fail the exit code |
287
- | `--list` | flag | off | Print discovered evals without running them |
288
- | `--timeout <ms>` | number | none | Per-eval timeout in milliseconds |
289
- | `--max-concurrency <n>` | number | 8 | Max concurrent eval executions |
290
- | `--json` | flag | off | Output results as JSON |
291
- | `--junit <path>` | string | none | Write JUnit XML results to a file |
292
- | `--skip-report` | flag | off | Skip eval-defined reporters (e.g. Braintrust) |
293
- | `--verbose` | flag | off | Stream per-eval `t.log` lines to stdout |
281
+ | Flag | Type | Default | Description |
282
+ | ------------------------ | ------ | ------- | ------------------------------------------------------------- |
283
+ | `--url <url>` | string | none | Remote agent URL (skip local host startup) |
284
+ | `--tag <tag...>` | string | none | Run only evals carrying a tag |
285
+ | `--exclude-tag <tag...>` | string | none | Skip evals carrying a tag |
286
+ | `--strict` | flag | off | Below-threshold scores also fail the exit code |
287
+ | `--list` | flag | off | Print evals selected by the tag filters, without running them |
288
+ | `--timeout <ms>` | number | none | Per-eval timeout in milliseconds |
289
+ | `--max-concurrency <n>` | number | 8 | Max concurrent eval executions |
290
+ | `--json` | flag | off | Output results as JSON |
291
+ | `--junit <path>` | string | none | Write JUnit XML results to a file |
292
+ | `--skip-report` | flag | off | Skip eval-defined reporters (e.g. Braintrust) |
293
+ | `--verbose` | flag | off | Stream per-eval `t.log` lines to stdout |
294
294
 
295
295
  See [Evals](../evals/overview) for authoring evals.
296
296
 
297
- ## `eve channels add`
298
-
299
- ```bash
300
- eve channels add [kind] [-f] [-y]
301
- ```
302
-
303
- Scaffolds a channel into `agent/channels/`. With no `kind` it prompts interactively; pass a `kind` (`slack` \| `web`) to scaffold one directly. When the Vercel CLI has an authenticated session, eve scaffolds the Vercel-integrated variant and asks whether to deploy after setup. Without one, Slack setup asks whether to set up Vercel Connect or use portable credentials. The portable variant reads `SLACK_BOT_TOKEN` and `SLACK_SIGNING_SECRET` and adds both names to `.env.example`.
304
-
305
- | Flag | Type | Default | Description |
306
- | ------------- | ---- | ------- | --------------------------------------------------------- |
307
- | `-f, --force` | flag | off | Overwrite existing channel files |
308
- | `-y, --yes` | flag | off | Assume yes for confirmations; requires an explicit `kind` |
309
-
310
297
  ## `eve channels list`
311
298
 
312
299
  ```bash
@@ -52,7 +52,7 @@ export default defineTool({
52
52
  | `mockModel` | `eve/evals` | Deterministic fixture agent models | [Evals](../evals/overview) |
53
53
  | `useEveAgent` | `eve/react`, `eve/vue`, `eve/svelte` | frontend | [Frontend](../guides/frontend/overview) |
54
54
 
55
- A few non-`define*` helpers round out the set: `disableTool` and `experimental_workflow` from `eve/tools` (see [Default harness](../concepts/default-harness)), the route verbs `GET`/`POST`/`PUT`/`PATCH`/`DELETE`/`WS` from `eve/channels`, the approval policies `always`/`once`/`never` from `eve/tools/approval`, and the channel auth helpers `localDev`/`vercelOidc`/`placeholderAuth` from `eve/channels/auth`. To wrap a built-in tool, import its default value from `eve/tools/defaults` (`bash`, `readFile`, `writeFile`, `glob`, `grep`, `webFetch`, `webSearch`, `todo`, `loadSkill`). `AgentReasoningDefinition` is exported from `eve` for the top-level `defineAgent({ reasoning })` setting. `AgentLimitsDefinition` is exported for `defineAgent({ limits })`. `AgentWorkflowDefinition` and `AgentWorkflowWorldDefinition` are exported from `eve` for the `defineAgent({ experimental: { workflow } })` config shape. `ExperimentalWorkflowToolInput` is exported from `eve/tools` for the `experimental_workflow(...)` config shape.
55
+ A few non-`define*` helpers round out the set: `disableTool` and `experimental_workflow` from `eve/tools` (see [Default harness](../concepts/default-harness)), `sleep` from `eve/tools/sleep`, the route verbs `GET`/`POST`/`PUT`/`PATCH`/`DELETE`/`WS` from `eve/channels`, the approval policies `always`/`once`/`never` from `eve/tools/approval`, and the channel auth helpers `localDev`/`vercelOidc`/`placeholderAuth` from `eve/channels/auth`. To wrap a built-in tool, import its default value from `eve/tools/defaults` (`bash`, `readFile`, `writeFile`, `glob`, `grep`, `webFetch`, `webSearch`, `todo`, `loadSkill`). `AgentReasoningDefinition` is exported from `eve` for the top-level `defineAgent({ reasoning })` setting. `AgentLimitsDefinition` is exported for `defineAgent({ limits })`. `AgentWorkflowDefinition` and `AgentWorkflowWorldDefinition` are exported from `eve` for the `defineAgent({ experimental: { workflow } })` config shape. `ExperimentalWorkflowToolInput` is exported from `eve/tools` for the `experimental_workflow(...)` config shape.
56
56
 
57
57
  ## Runtime context (`ctx`)
58
58
 
@@ -74,6 +74,7 @@ A few non-`define*` helpers round out the set: `disableTool` and `experimental_w
74
74
  | `eve/tools` | `defineTool`, `defineDynamic`, `disableTool`, `experimental_workflow` |
75
75
  | `eve/tools/defaults` | the built-in tools as plain values |
76
76
  | `eve/tools/approval` | `always`, `once`, `never` |
77
+ | `eve/tools/sleep` | opt-in durable `sleep` tool |
77
78
  | `eve/connections` | `defineMcpClientConnection`, `defineOpenAPIConnection` |
78
79
  | `eve/channels` | `defineChannel`, route verbs |
79
80
  | `eve/channels/eve` | `eveChannel` |
@@ -7,10 +7,10 @@ The analytics assistant runs fine in the TUI. Now ship it for real, as a web das
7
7
 
8
8
  ## Add the Web Chat app
9
9
 
10
- Step 1 scaffolded the agent without a web frontend. Add one now with `eve channels add`, run from the `analytics-assistant/` directory:
10
+ Step 1 scaffolded the agent without a web frontend. Add one now with `eve add channel/web`, run from the `analytics-assistant/` directory:
11
11
 
12
12
  ```bash
13
- npx eve channels add web
13
+ npx eve add channel/web
14
14
  ```
15
15
 
16
16
  This adds a Next.js app (`next.config.ts`, `app/page.tsx`, `app/_components/`) wired to the existing eve channel, plus the chat UI components and their dependencies. Run `npm install` afterward to install the added packages. The generated `next.config.ts` wraps your config with `withEve`, which wires the eve routes automatically:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eve",
3
- "version": "0.28.0",
3
+ "version": "0.29.1",
4
4
  "private": false,
5
5
  "description": "Filesystem-first framework for durable backend AI agents that run anywhere.",
6
6
  "keywords": [
@@ -101,6 +101,11 @@
101
101
  "import": "./dist/src/public/tools/approval/index.js",
102
102
  "default": "./dist/src/public/tools/approval/index.js"
103
103
  },
104
+ "./tools/sleep": {
105
+ "types": "./dist/src/public/tools/sleep/index.d.ts",
106
+ "import": "./dist/src/public/tools/sleep/index.js",
107
+ "default": "./dist/src/public/tools/sleep/index.js"
108
+ },
104
109
  "./tools": {
105
110
  "types": "./dist/src/public/tools/index.d.ts",
106
111
  "import": "./dist/src/public/tools/index.js",
@@ -295,6 +300,7 @@
295
300
  "@chat-adapter/twilio": "4.34.0",
296
301
  "@clack/core": "1.3.1",
297
302
  "@nuxt/kit": "^4.0.0",
303
+ "@opentelemetry/context-async-hooks": "2.6.1",
298
304
  "@opentelemetry/otlp-transformer": "0.214.0",
299
305
  "@opentelemetry/sdk-trace-base": "2.6.1",
300
306
  "@standard-schema/spec": "1.1.0",
@@ -307,13 +313,13 @@
307
313
  "@vercel/otel": "2.1.3",
308
314
  "@vercel/sandbox": "2.8.0",
309
315
  "@vercel/sdk": "1.28.8",
310
- "@workflow/core": "5.0.0-beta.37",
311
- "@workflow/errors": "5.0.0-beta.13",
316
+ "@workflow/core": "5.0.0-beta.38",
317
+ "@workflow/errors": "5.0.0-beta.14",
312
318
  "@workflow/serde": "5.0.0-beta.2",
313
- "@workflow/utils": "5.0.0-beta.7",
319
+ "@workflow/utils": "5.0.0-beta.8",
314
320
  "@workflow/world": "5.0.0-beta.23",
315
- "@workflow/world-local": "5.0.0-beta.31",
316
- "@workflow/world-vercel": "5.0.0-beta.33",
321
+ "@workflow/world-local": "5.0.0-beta.32",
322
+ "@workflow/world-vercel": "5.0.0-beta.34",
317
323
  "ai": "^7.0.38",
318
324
  "autoevals": "0.0.132",
319
325
  "chat": "4.34.0",
@@ -1,11 +0,0 @@
1
- import type { World } from '#compiled/@workflow/world/index.js';
2
- /**
3
- * Unaliased target stub.
4
- *
5
- * Framework integrations alias this module to the configured world package at
6
- * build time, including the default local world. Reaching this file means that
7
- * static injection did not happen, so fail loudly instead of importing a
8
- * fallback world that bundlers could retain alongside the configured one.
9
- */
10
- export declare function createWorld(): World | Promise<World>;
11
- //# sourceMappingURL=world-target.d.ts.map
@@ -1 +0,0 @@
1
- import{In as e}from"./wait-until-De9yESQN.js";import{i as t}from"./attribute-changes-DeZc2RZz.js";async function n(r){let i=globalThis[e];return i||t(`sleep()`,`https://workflow-sdk.dev/docs/api-reference/workflow/sleep`,n),i(r)}export{n as t};
@@ -1 +0,0 @@
1
- import"./parse-name.js";import"./pluralize.js";import"./promise.js";import"./time.js";import"./workflow-routes.js";import{getWorldImport}from"./world-target.js";export{getWorldImport};
@@ -1 +0,0 @@
1
- function parseName(e,t){if(typeof t!=`string`)return null;let[n,r,...i]=t.split(`//`);if(n!==e||!r||i.length===0)return null;let a=i.join(`//`),o=a.split(`/`).at(-1)??``,s=``;return s=r.startsWith(`./`)?r.split(`/`).at(-1)??``:(r.split(`@`).slice(0,-1).join(`@`)||r.split(`@`)[0])?.split(`/`).at(-1)??``,[`default`,`__default`].includes(o)&&s&&(o=s),{shortName:o,moduleSpecifier:r,functionName:a}}function parseWorkflowName(e){return parseName(`workflow`,e)}function parseStepName(e){return parseName(`step`,e)}export{parseStepName,parseWorkflowName};
@@ -1 +0,0 @@
1
- import"../../../../../../../_virtual/_rolldown/runtime.js";import{require_ms}from"../../../../../ms@2.1.3/node_modules/ms/index.js";require_ms();export{};
@@ -1 +0,0 @@
1
- const WORKFLOW_ROUTE_BASE=`/.well-known/workflow/v1`;export{WORKFLOW_ROUTE_BASE};
@@ -1 +0,0 @@
1
- function normalizeWorkflowTargetWorldImport(e){if(e)return e===`local`?`@workflow/world-local`:e===`vercel`?`@workflow/world-vercel`:e}function isVercelDeploymentEnv(e=process.env){return e.VERCEL_DEPLOYMENT_ID?!0:e.VERCEL===`1`&&e.VERCEL_ENV!==`development`&&e.NODE_ENV!==`development`}function resolveWorkflowTargetWorld(e=process.env){return e.WORKFLOW_TARGET_WORLD||(isVercelDeploymentEnv(e)?`vercel`:`local`)}function getWorldImport(e=process.env){return normalizeWorkflowTargetWorldImport(resolveWorkflowTargetWorld(e))}function isVercelWorldTarget(e){return e===`vercel`||e===`@workflow/world-vercel`}export{getWorldImport,isVercelDeploymentEnv,isVercelWorldTarget,normalizeWorkflowTargetWorldImport,resolveWorkflowTargetWorld};
@@ -1 +0,0 @@
1
- import{__commonJSMin}from"../../../../../_virtual/_rolldown/runtime.js";var require_ms=__commonJSMin(((e,t)=>{var n=1e3,r=n*60,i=r*60,a=i*24,o=a*7,s=a*365.25;t.exports=function(e,t){t||={};var n=typeof e;if(n===`string`&&e.length>0)return parse(e);if(n===`number`&&isFinite(e))return t.long?fmtLong(e):fmtShort(e);throw Error(`val is not a non-empty string or a valid number. val=`+JSON.stringify(e))};function parse(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var c=parseFloat(t[1]);switch((t[2]||`ms`).toLowerCase()){case`years`:case`year`:case`yrs`:case`yr`:case`y`:return c*s;case`weeks`:case`week`:case`w`:return c*o;case`days`:case`day`:case`d`:return c*a;case`hours`:case`hour`:case`hrs`:case`hr`:case`h`:return c*i;case`minutes`:case`minute`:case`mins`:case`min`:case`m`:return c*r;case`seconds`:case`second`:case`secs`:case`sec`:case`s`:return c*n;case`milliseconds`:case`millisecond`:case`msecs`:case`msec`:case`ms`:return c;default:return}}}}function fmtShort(e){var t=Math.abs(e);return t>=a?Math.round(e/a)+`d`:t>=i?Math.round(e/i)+`h`:t>=r?Math.round(e/r)+`m`:t>=n?Math.round(e/n)+`s`:e+`ms`}function fmtLong(e){var t=Math.abs(e);return t>=a?plural(e,t,a,`day`):t>=i?plural(e,t,i,`hour`):t>=r?plural(e,t,r,`minute`):t>=n?plural(e,t,n,`second`):e+` ms`}function plural(e,t,n,r){var i=t>=n*1.5;return Math.round(e/n)+` `+r+(i?`s`:``)}}));export default require_ms();export{require_ms};
@@ -1,2 +0,0 @@
1
- import{detectDeployment,isProjectResolved,mergeProjectResolution,projectResolutionFromDeployment}from"../project-resolution.js";import{provisionSlackbot,reconcileSlackUid}from"../slackbot.js";import{hasVercelProject,requireProjectPath}from"../state.js";import{WizardCancelledError}from"../step.js";import{deriveSlackConnectorSlug,ensureChannel}from"#setup/scaffold/index.js";import{formatNodeEngineOverrideWarning}from"#setup/node-engine.js";import{detectPackageManager}from"#setup/package-manager.js";import{runVercel}from"#setup/primitives/run-vercel.js";import{HumanActionRequiredError}from"#setup/human-action.js";import{createPromptCommandOutput,withPhase}from"#setup/cli/index.js";import{runPackageManagerInstall}from"#setup/primitives/pm/run.js";const SLACKBOT_NOT_ATTACHED_ERROR=`Slackbot provisioning did not attach this project. Slack channel was not added.`;function slackbotFailureCopy(e){switch(e.state){case`not-installed`:return{reason:`Slackbot is not connected to a Slack workspace. Slack channel was not added.`,followUp:"Continuing without Slack — the install timed out and was cleaned up; re-run `eve channels add slack` to try again."};case`cleanup-failed`:return{reason:`The abandoned Slack connector could not be removed. Slack channel was not added.`,followUp:`Continuing without Slack — resolve the cleanup warning above before trying again.`};case`connector-lookup-failed`:return{reason:`Existing Slack connectors could not be inspected. Slack channel was not added.`,followUp:"Continuing without Slack — restore Vercel CLI access, then re-run `eve channels add slack`."};case`installation-check-failed`:return{reason:`Slack workspace installation could not be verified. Slack channel was not added.`,followUp:"Continuing without Slack — verify Vercel Connect is reachable, then re-run `eve channels add slack`."};case`existing-not-installed`:return{reason:`The existing Slack connector is not connected to a Slack workspace. Slack channel was not added.`,followUp:`Continuing without Slack — resolve the existing connector warning above before trying again.`};case`detach-failed`:return{reason:`Slackbot provisioning could not replace the existing trigger destination. Slack channel was not added.`,followUp:"Continuing without Slack — run the `vercel connect detach` and `vercel connect attach` commands above."};case`attach-failed`:return{reason:SLACKBOT_NOT_ATTACHED_ERROR,followUp:"Continuing without Slack — finish event delivery with the `vercel connect attach` command above."};case`create-failed`:return{reason:`Slackbot creation failed.`,followUp:"Continuing without Slack — add it later with `eve channels add slack`."}}}function warnOverwrittenFiles(e,t){for(let n of t??[])e.warning(`Overwrote ${n}`)}function warnCompetingNextConfigFiles(e,t){for(let n of t??[])e.warning(`Found competing Next.js config at ${n}; merge any needed settings into next.config.ts and remove it before starting the preview, or Next.js may ignore the generated eve rewrite.`)}function addChannels(u){let d=u.deps??{ensureChannel,deriveSlackConnectorSlug,provisionSlackbot,reconcileSlackUid,detectPackageManager,runPackageManagerInstall,runVercel,detectDeployment};async function scaffoldSlackChannel(e,t,n,r,i,a){let o=!1;if(!t.slackScaffolded){let t=await d.ensureChannel({projectRoot:n,kind:`slack`,slackConnectorUid:a,slackConnectorSlug:r,force:u.force,skipDependencyMutation:u.skipDependencyMutation});i.dependenciesChanged||=t.packageJsonUpdated.length>0,warnOverwrittenFiles(e,t.filesOverwritten),t.action===`created`||t.action===`overwritten`?e.success(`Scaffolded channel: slack`):e.info(`Channel "slack" already exists. Skipping file creation.`),o=t.action!==`skipped`,i.slackScaffolded=!0}return i.channelsAdded.push(`slack`),o}async function linkProjectForSlackbot(e,i,a,o,s){if(o)throw new HumanActionRequiredError({kind:`vercel-link`,command:`vercel link`,reason:`Slackbot creation needs this directory linked to a Vercel project.`});if(e.message(`Linking this directory to a Vercel project...`),!await d.runVercel([`link`],{cwd:i,signal:s}))throw s?.throwIfAborted(),Error(`Vercel project linking failed. Slackbot creation did not start.`);let c=mergeProjectResolution(a,projectResolutionFromDeployment(await d.detectDeployment(i,{signal:s})));if(!isProjectResolved(c))throw Error(`Vercel project linking failed. Slackbot creation did not start.`);return c}async function addWebChannelToPayload(e,t,n,r,i,a){if(!t.channelSelection.includes(`web`))return;if(t.webScaffolded){i.channelsAdded.push(`web`);return}e.message(`Scaffolding Web Chat channel files...`);let s={projectRoot:n,kind:`web`,packageManager:r,force:u.force,configureVercelServices:u.configureVercelServices??hasVercelProject(t),skipDependencyMutation:u.skipDependencyMutation};u.evePackage!==void 0&&(s.webPackageVersions={evePackage:u.evePackage});let c=await d.ensureChannel(s);if(i.dependenciesChanged||=c.packageJsonUpdated.length>0,a?.throwIfAborted(),warnOverwrittenFiles(e,c.filesOverwritten),c.kind===`web`&&c.action!==`skipped`&&c.nodeEngineOverride!==void 0&&e.warning(formatNodeEngineOverrideWarning(c.nodeEngineOverride)),warnCompetingNextConfigFiles(e,`competingNextConfigFiles`in c?c.competingNextConfigFiles:void 0),c.action===`created`||c.action===`overwritten`){e.success(`Scaffolded channel: web`),i.webScaffolded=!0,i.channelsAdded.push(`web`);return}e.info(`Next.js project detected. Skipping Web Chat scaffolding.`)}function assertSlackProjectReady(e){if(u.ensureLinkedProject===void 0){if(!hasVercelProject(e))throw Error(`Slack requires a Vercel project. Re-run and choose to deploy to Vercel to add Slack.`);if(!isProjectResolved(e.project))throw Error(`Expected a linked Vercel project for Slack, but none was resolved.`)}}async function provisionSlackbotWithControls(e,t,n,r){let i={selectConnector:async(e,t)=>{if(u.presetCreateSlackbot===!0)return t??e[0];let n={message:`Which Slack app would you like to use?`,options:[...e.map(e=>{let n={value:e.uid,label:`Use ${e.uid}`};return e.uid===t?.uid&&(n.hint=`Matches this agent`),n}),{value:`create`,label:`Create a new Slack app`}],initialValue:t?.uid},r=await u.prompter.select(n);return r===`create`?`create`:e.find(e=>e.uid===r)}};return r!==void 0&&(i.signal=r),u.prompter.awaitChoice!==void 0&&(i.awaitChoice=u.prompter.awaitChoice),d.provisionSlackbot(e,t,n,void 0,i)}async function scaffoldAttachedSlackChannel(e,t,n,r,i,a){if(!await scaffoldSlackChannel(e,t,n,r,i,a.connectorUid)&&!await d.reconcileSlackUid(e,n,a,`slack/${r}`))throw Error(`Slack connector UID update is required before deployment.`)}async function addSlackChannelToPayload(e,n,r,i,a,o){if(!n.channelSelection.includes(`slack`))return;let s=await d.deriveSlackConnectorSlug(i,n.agentName);if(u.slackCredentials===`environment`){if(!n.slackScaffolded){let t=await d.ensureChannel({projectRoot:i,kind:`slack`,slackConnectorSlug:s,slackCredentials:`environment`,force:u.force,skipDependencyMutation:u.skipDependencyMutation});a.dependenciesChanged||=t.packageJsonUpdated.length>0,warnOverwrittenFiles(e,t.filesOverwritten),t.action===`created`||t.action===`overwritten`?e.success(`Scaffolded channel: slack`):e.info(`Channel "slack" already exists. Skipping file creation.`),a.slackScaffolded=!0}a.channelsAdded.push(`slack`);return}if(assertSlackProjectReady(n),n.slackbotCreated){if(!n.slackbotAttached)throw Error(SLACKBOT_NOT_ATTACHED_ERROR);if(!n.deploymentPending)return;let t=n.slackConnectorUid;if(t===void 0)throw Error(`Slack connector UID was not resolved. Slack deployment did not start.`);await scaffoldAttachedSlackChannel(e,n,i,s,a,{state:`attached`,connectorUid:t});return}isProjectResolved(a.project)||(a.project=await linkProjectForSlackbot(e,i,a.project,r.headless,o));let l=await provisionSlackbotWithControls(e,i,s,o);if(o?.throwIfAborted(),l.state===`cancelled`)throw new WizardCancelledError;if(l.state!==`attached`){let t=slackbotFailureCopy(l);if(u.slackbotFailure!==`warn-and-continue`)throw Error(t.reason);e.warning(`${t.reason} ${t.followUp}`);return}a.slackbot={connectorUid:l.connectorUid,chatUrl:l.chatUrl,workspaceName:l.workspaceName},await scaffoldAttachedSlackChannel(e,n,i,s,a,l)}async function installChannelDependencies(e,t,n,r,i){if(!(u.skipDependencyMutation||!r.dependenciesChanged)){if(await withPhase(e,`Installing channel dependencies (${n} install)...`,()=>d.runPackageManagerInstall(n,t,{onOutput:createPromptCommandOutput(e),signal:i}))){r.dependenciesInstalled=!0;return}e.warning(`Dependency installation failed. The new channels stay unloadable until \`${n} install\` or a deploy succeeds.`)}}async function performAddChannels(e,t,n){n?.throwIfAborted();let r=u.prompter.log,i=requireProjectPath(e),a={channelsAdded:[],webScaffolded:e.webScaffolded,slackScaffolded:e.slackScaffolded,dependenciesChanged:!1,dependenciesInstalled:!1,project:e.project},o=await d.detectPackageManager(i);return await addWebChannelToPayload(r,e,i,o.kind,a,n),await addSlackChannelToPayload(r,e,t,i,a,n),await installChannelDependencies(r,i,o.kind,a,n),a}return{id:`add-channels`,async gather({state:e}){let t=u.headless??!1;if(t&&e.channelSelection.includes(`slack`)&&u.slackCredentials!==`environment`)throw Error("Slack setup is interactive. Run `eve channels add slack` from an interactive terminal.");return{headless:t,createSlackbot:u.presetCreateSlackbot}},async perform({state:e,input:t,signal:n}){try{return await performAddChannels(e,t,n)}catch(e){if(!(e instanceof WizardCancelledError)){let t=e instanceof Error?e.message:String(e),n=t.split(`
2
- `)[0]?.trim()??t;u.prompter.log.error(n)}throw e}},apply(e,t){let r=[...e.channels];for(let e of t.channelsAdded)r.includes(e)||r.push(e);let i={...e,channels:r,webScaffolded:t.webScaffolded,slackScaffolded:t.slackScaffolded,deploymentPending:e.deploymentPending||t.channelsAdded.length>0,deploymentDependenciesInstalled:t.dependenciesChanged?t.dependenciesInstalled:e.deploymentDependenciesInstalled,project:mergeProjectResolution(e.project,t.project)};return t.slackbot===void 0?i:{...i,slackbotCreated:!0,slackbotAttached:!0,slackConnectorUid:t.slackbot.connectorUid,slackChatUrl:t.slackbot.chatUrl,slackWorkspaceName:t.slackbot.workspaceName}}}}export{addChannels};
@@ -1,26 +0,0 @@
1
- import { ensureConnection, listAuthoredConnections } from "#setup/scaffold/index.js";
2
- import { cleanupCreatedConnectionConnector, setupConnectionConnector } from "../connection-connector.js";
3
- import { readProjectLink, type ProjectResolution } from "../project-resolution.js";
4
- import type { Prompter } from "../prompter.js";
5
- import { type SetupState } from "../state.js";
6
- import type { SetupBox } from "../step.js";
7
- /** Injected for tests; defaults to the real scaffold and Connect effects. */
8
- export interface AddConnectionsDeps {
9
- ensureConnection: typeof ensureConnection;
10
- listAuthoredConnections: typeof listAuthoredConnections;
11
- readProjectLink: typeof readProjectLink;
12
- setupConnectionConnector: typeof setupConnectionConnector;
13
- cleanupCreatedConnectionConnector: typeof cleanupCreatedConnectionConnector;
14
- }
15
- export interface AddConnectionsOptions {
16
- /** Carries connector selection prompts and provisioning output. */
17
- prompter: Prompter;
18
- signal?: AbortSignal;
19
- deps?: AddConnectionsDeps;
20
- }
21
- /**
22
- * THE CONNECTIONS BOX: executes the {@link ConnectionPlan}s the
23
- * select-connections box recorded during the interview. It scaffolds each file
24
- * and resolves the concrete Connect connector against the linked project.
25
- */
26
- export declare function addConnections(options: AddConnectionsOptions): SetupBox<SetupState, null, ProjectResolution>;
@@ -1 +0,0 @@
1
- import{isProjectResolved,mergeProjectResolution,readProjectLink}from"../project-resolution.js";import{hasVercelProject,requireProjectPath}from"../state.js";import{cleanupCreatedConnectionConnector,setupConnectionConnector}from"../connection-connector.js";import{canonicalConnectorNameForEntry}from"../scaffold/connections/catalog.js";import{projectIdFromResolution}from"../vercel-project.js";import{CONNECT_REQUIRES_VERCEL}from"./select-connections.js";import{ensureConnection,listAuthoredConnections}from"#setup/scaffold/index.js";function logFollowUp(e,t){if(t.action===`skipped`){e.warning(`Skipped ${t.slug} (already exists; pass --force to overwrite).`);return}e.success(`Added agent/connections/${t.slug}.ts`),t.envKeysAdded.length>0?e.info(`Set ${t.envKeysAdded.join(`, `)} in .env.local`):t.envKeysRequired.length>0&&e.info(`Set ${t.envKeysRequired.join(`, `)} in your environment`)}function withConnectorUid(e,t){if(e.auth?.kind!==`connect`)throw Error(`Connection ${e.slug} is not configured for Vercel Connect.`);return{...e,auth:{...e.auth,connector:t}}}function addConnections(e){let s=e.deps??{ensureConnection,listAuthoredConnections,readProjectLink,setupConnectionConnector,cleanupCreatedConnectionConnector};return{id:`add-connections`,shouldRun(e){return e.connectionSelection.length>0},async gather(){return null},async perform({state:t}){let n=e.prompter.log,a=requireProjectPath(t),o=!hasVercelProject(t),c=t.project,l=new Set(await s.listAuthoredConnections(a));for(let r of t.connectionSelection){if(l.has(r.slug)){logFollowUp(n,await s.ensureConnection({projectRoot:a,slug:r.slug,protocol:r.protocol,entry:r.entry}));continue}let t=r.entry,i;switch(r.provision.kind){case`connect`:{let l=canonicalConnectorNameForEntry(r.entry);if(l===void 0)throw Error(`Connection ${r.slug} has no canonical connector name.`);let u=await s.setupConnectionConnector({log:n,prompter:e.prompter,projectRoot:a,slug:r.slug,service:r.provision.service,canonicalConnectorName:l,project:await resolveConnectionProject({noVercel:o,project:c,projectRoot:a,readProjectLink:s.readProjectLink}),signal:e.signal});t=withConnectorUid(t,u.connectorUid),u.kind===`created`&&(i=u.connectorId);break}case`command-hint`:n.info(`Run \`vercel connect create ${r.provision.service} --name ${r.slug}\`, then set the connector UID in agent/connections/${r.slug}.ts.`);break;case`connect-manual`:n.warning(`Could not determine a Connect service for ${r.slug}. Create the connector manually and set its UID in agent/connections/${r.slug}.ts.`);break;case`none`:break}let u;try{u=await s.ensureConnection({projectRoot:a,slug:r.slug,protocol:r.protocol,entry:t})}catch(e){if(i!==void 0)try{await s.cleanupCreatedConnectionConnector({log:n,projectRoot:a,connectorId:i})}catch(t){throw AggregateError([e,t],`${e instanceof Error?e.message:String(e)} ${t instanceof Error?t.message:String(t)}`)}throw e}u.action===`skipped`&&i!==void 0&&await s.cleanupCreatedConnectionConnector({log:n,projectRoot:a,connectorId:i}),logFollowUp(n,u),u.action!==`skipped`&&l.add(u.slug)}return c},apply(e,n){return{...e,project:mergeProjectResolution(e.project,n)}}}}async function resolveConnectionProject(t){if(t.noVercel)throw Error(CONNECT_REQUIRES_VERCEL);if(!isProjectResolved(t.project))throw Error(`Expected a linked Vercel project for Connect, but none was resolved.`);let n=await t.readProjectLink(t.projectRoot);if(n===void 0||n.projectId!==projectIdFromResolution(t.project))throw Error("A linked Vercel project is required. Run `eve link`, then retry /connect.");return n}export{addConnections};
@@ -1,8 +0,0 @@
1
- import type { AddCommandOptions } from "#cli/commands/registry.js";
2
- import type { SetupState } from "../state.js";
3
- import type { SetupBox } from "../step.js";
4
- export interface InstallChannelRegistryItemsOptions {
5
- installItem?: (appRoot: string, item: string, options?: AddCommandOptions) => Promise<void>;
6
- }
7
- /** Installs registry-owned channel dependencies before integration setup runs. */
8
- export declare function installChannelRegistryItems(options?: InstallChannelRegistryItemsOptions): SetupBox<SetupState, undefined, undefined>;
@@ -1 +0,0 @@
1
- function installChannelRegistryItems(e={}){let t=e.installItem??(async(e,t,n)=>{let{installOfficialRegistryItem:r}=await import(`#cli/commands/registry.js`);await r(e,t,n)});return{id:`install-channel-registry-items`,shouldRun:e=>e.channelSelection.length>0,gather:async()=>void 0,async perform({state:e}){if(e.projectPath.kind!==`resolved`)throw Error(`Expected a resolved project path before installing channel dependencies.`);for(let n of e.channelSelection)await t(e.projectPath.path,`channel/${n}`)},apply:e=>e}}export{installChannelRegistryItems};
@@ -1,18 +0,0 @@
1
- import { detectPackageManager } from "../package-manager.js";
2
- import type { Prompter } from "../prompter.js";
3
- import { type SetupState } from "../state.js";
4
- import type { SetupBox } from "../step.js";
5
- export interface OneShotNextStepsOptions {
6
- /** Reports the next-steps note. The box never prompts. */
7
- prompter: Prompter;
8
- /** Test seam for the package manager that owns generated commands. */
9
- detectPackageManager?: typeof detectPackageManager;
10
- }
11
- /**
12
- * THE ONE-SHOT EPILOGUE BOX: a one-shot run skips every post-scaffold box, so
13
- * it ends here with exactly the commands that take the scaffold to a running
14
- * agent. No project or team was resolved, so `vercel link` is the credential
15
- * step: a logged-in CLI plus the link lets the runtime mint an AI Gateway
16
- * token, and pasting a key into `.env.local` is the manual alternative.
17
- */
18
- export declare function oneShotNextSteps(options: OneShotNextStepsOptions): SetupBox<SetupState, null, null>;
@@ -1,2 +0,0 @@
1
- import{__toESM}from"../../_virtual/_rolldown/runtime.js";import{require_picocolors}from"../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js";import{requireProjectPath}from"../state.js";import{detectPackageManager}from"../package-manager.js";import{relative}from"node:path";var import_picocolors=__toESM(require_picocolors(),1);function cdTarget(e){let t=relative(process.cwd(),e);return t.length===0||t.startsWith(`..`)?e:t}function step(e,t){return` ${import_picocolors.default.bold(e)}${t===void 0?``:` ${import_picocolors.default.dim(`# ${t}`)}`}`}function oneShotNextSteps(e){return{id:`one-shot-next-steps`,shouldRun(e){return e.setupMode===`one-shot`},async gather(){return null},async perform({state:t}){let n=requireProjectPath(t),r=await(e.detectPackageManager??detectPackageManager)(n),i=[`Your agent is scaffolded but not deployed or connected yet.`,...t.projectPath.inPlace?[]:[step(`cd ${cdTarget(n)}`)],step(`${r.kind} install`),step(`vercel link`,`or set AI_GATEWAY_API_KEY in .env.local manually`),step(`eve dev`)];return e.prompter.note(i.join(`
2
- `),`Next steps`,{tone:`success`}),null},apply(e){return e}}}export{oneShotNextSteps};
@@ -1,37 +0,0 @@
1
- import { fetchGatewayModelIds } from "../gateway-models.js";
2
- import type { SetupState } from "../state.js";
3
- import type { SetupBox } from "../step.js";
4
- /**
5
- * What the gather decided to validate. `model: null` means nothing to
6
- * validate: interactive runs pick from the gateway-backed catalog already.
7
- */
8
- export interface PreflightInput {
9
- /** Model id to validate against the AI Gateway catalog, or null to skip. */
10
- model: string | null;
11
- }
12
- /** Injected for tests; defaults to the real AI Gateway catalog read. */
13
- export interface PreflightDeps {
14
- fetchGatewayModelIds: typeof fetchGatewayModelIds;
15
- }
16
- export interface PreflightOptions {
17
- /** Directory to run `vercel` from: the project's parent (it does not exist yet). */
18
- cwd: string;
19
- /**
20
- * Headless mode: only a headless `--model` needs catalog validation, so the
21
- * gather derives a model to check from state. Interactive runs pick from the
22
- * gateway-backed catalog and validate nothing. The box prompts for nothing,
23
- * so this dispatch comes from the composition site, not from a question.
24
- */
25
- headless?: boolean;
26
- deps?: PreflightDeps;
27
- }
28
- /**
29
- * THE PREFLIGHT BOX: fails fast on an unknown `--model` BEFORE any filesystem
30
- * scaffolding, so a bad flag never leaves a half-provisioned project on disk.
31
- * Only a headless `--model` needs the gateway round-trip, so the interactive
32
- * gather yields a no-op input. The scaffold bakes a gateway-format model id
33
- * on every wiring (the `byok` block routes through the Gateway too), so the
34
- * check applies regardless of how credentials are wired. Team validation
35
- * lives in the resolve-provisioning box.
36
- */
37
- export declare function preflight(options: PreflightOptions): SetupBox<SetupState, PreflightInput, null>;
@@ -1 +0,0 @@
1
- import{fetchGatewayModelIds}from"../gateway-models.js";function preflight(t){let n=t.deps??{fetchGatewayModelIds};return{id:`preflight`,async gather({state:e}){return t.headless?{model:e.modelId.length>0?e.modelId:null}:{model:null}},async perform({input:e}){return e.model!==null&&await validateModel(n,e.model,t.cwd),null},apply(e){return e}}}async function validateModel(e,t,n){let r=await e.fetchGatewayModelIds(n);if(!(r===null||r.has(t)))throw Error(`Model "${t}" is not in the AI Gateway catalog. Pass a model id from https://ai-gateway.vercel.sh/v1/models (e.g. anthropic/claude-sonnet-5).`)}export{preflight};
@@ -1,58 +0,0 @@
1
- import { isEveProject } from "#setup/scaffold/index.js";
2
- import { type Asker } from "../ask.js";
3
- import { pathExists } from "../path-exists.js";
4
- import { type ResolvedProjectPath, type SetupState } from "../state.js";
5
- import type { SetupBox } from "../step.js";
6
- /** Injected for tests; defaults to the real filesystem probes. */
7
- export interface ResolveTargetDeps {
8
- pathExists: typeof pathExists;
9
- isEveProject: typeof isEveProject;
10
- }
11
- export interface ResolveTargetOptions {
12
- /** Resolves the name and directory questions; the composed stack decides how. */
13
- asker: Asker;
14
- /**
15
- * Interactive-only notice surface for the duplicate-directory re-ask loop.
16
- * Narrower than the prompter it forwards to; goes away when notices get a
17
- * channel of their own.
18
- */
19
- notify(message: string): void;
20
- /**
21
- * Skip the name question and use this value. Stays a factory option (not a
22
- * `withAnswers` rung) so it keeps short-circuiting before any ask while
23
- * still being validated, exactly as the dual-face box did.
24
- */
25
- presetName?: string;
26
- /** Parent directory the project folder is created inside. Defaults to cwd. */
27
- targetDirectory?: string;
28
- /** Force scaffolding into the target directory instead of a `./<name>` child. */
29
- inPlace?: boolean;
30
- /**
31
- * Treat an existing `./<name>` that is already an eve project as resumable
32
- * instead of refusing it. Composed on for headless runs so re-runs converge;
33
- * interactive runs keep refusing so a human notices the collision.
34
- */
35
- resumeExisting?: boolean;
36
- deps?: ResolveTargetDeps;
37
- }
38
- /** The name + directory decision gather produces. */
39
- export interface ResolveTargetInput {
40
- agentName: string;
41
- inPlace: boolean;
42
- }
43
- export interface ResolveTargetPayload {
44
- agentName: string;
45
- projectPath: Extract<ResolvedProjectPath, {
46
- kind: "resolved";
47
- }>;
48
- }
49
- /**
50
- * THE TARGET BOX (Q1 + Q2): resolve the agent name (the shared identity for
51
- * the directory and the Vercel project) and decide whether to scaffold in
52
- * place or into a new `./<name>` child. The current-vs-new question only fires
53
- * when the target directory already looks like a project; otherwise creating a
54
- * new directory is the announced default. A headless re-run resumes an
55
- * existing eve project directory instead of refusing it (composed via
56
- * `resumeExisting`), so re-runs converge.
57
- */
58
- export declare function resolveTarget(options: ResolveTargetOptions): SetupBox<SetupState, ResolveTargetInput, ResolveTargetPayload>;
@@ -1 +0,0 @@
1
- import{SkippedSignal,select,text}from"../ask.js";import{CURRENT_DIRECTORY_PROJECT_NAME}from"../state.js";import{pathExists}from"../path-exists.js";import{parseProjectName,validateProjectName}from"../project-name.js";import{basename,join,resolve}from"node:path";import{isEveProject}from"#setup/scaffold/index.js";const DEFAULT_PROJECT_NAME=`my-agent`;function validatePresetName(e){return parseProjectName(e)}async function askAgentName(e,t){return(await e.ask(text({key:`name`,message:`What's your agent's name?`,placeholder:DEFAULT_PROJECT_NAME,recommended:DEFAULT_PROJECT_NAME,validate:e=>validateProjectName(e.trim()||DEFAULT_PROJECT_NAME)??null,required:t}))).trim()||DEFAULT_PROJECT_NAME}function deriveInPlaceProjectName(e){let t=resolve(e??process.cwd()),n=basename(t);if(validateProjectName(n)!==void 0)throw Error(`Cannot infer a valid project name from "${t}". Pass --target-dir with a valid basename, or scaffold into a renamed directory.`);return n}function resolveTarget(n){let i=n.deps??{pathExists,isEveProject},parent=()=>resolve(n.targetDirectory??process.cwd()),inPlaceBasename=()=>basename(parent());async function assertNewDirectoryAvailable(e){if(e===CURRENT_DIRECTORY_PROJECT_NAME)return;let t=resolve(parent(),e);if(await i.pathExists(t)&&!(n.resumeExisting===!0&&await i.isEveProject(t)))throw Error(`Directory "${e}" already exists. Choose a different name.`)}async function looksLikeProject(e){let[t,n]=await Promise.all([i.pathExists(join(e,`package.json`)),i.pathExists(join(e,`.vercel`))]);return t||n}async function askFreeDirectoryName(e){let t=e;for(;;){if(t===CURRENT_DIRECTORY_PROJECT_NAME||!await i.pathExists(resolve(parent(),t)))return t;n.notify(`Directory "${t}" already exists. Choose a different name.`),t=await askAgentName(n.asker,!0)}}function inPlaceInput(){return{agentName:n.presetName===void 0?deriveInPlaceProjectName(n.targetDirectory):validatePresetName(n.presetName),inPlace:!0}}return{id:`resolve-target`,async gather(){if(n.inPlace){if(n.presetName===void 0&&validateProjectName(inPlaceBasename())!==void 0)try{return{agentName:await askAgentName(n.asker,!1),inPlace:!0}}catch(t){if(!(t instanceof SkippedSignal))throw t}return inPlaceInput()}if(n.presetName!==void 0){let e=validatePresetName(n.presetName);return await assertNewDirectoryAvailable(e),{agentName:e,inPlace:!1}}let r=await askAgentName(n.asker,!0);return await looksLikeProject(parent())&&await n.asker.ask(select({key:`target-directory`,message:`This directory already looks like a project. Where should the agent live?`,options:[{id:`current`,label:`Scaffold into this directory`,value:`current`},{id:`new`,label:`Create a new directory ./${r}`,value:`new`}],recommended:`new`,required:!0}))===`current`?{agentName:r,inPlace:!0}:{agentName:await askFreeDirectoryName(r),inPlace:!1}},async perform({input:e}){let t=e.inPlace?CURRENT_DIRECTORY_PROJECT_NAME:e.agentName;return{agentName:e.agentName,projectPath:{kind:`resolved`,inPlace:e.inPlace,path:resolve(parent(),t)}}},apply(e,t){return{...e,agentName:t.agentName,projectPath:t.projectPath}}}}export{resolveTarget};