eve 0.6.0-beta.9 → 0.7.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 (587) hide show
  1. package/CHANGELOG.md +266 -0
  2. package/README.md +9 -6
  3. package/dist/docs/public/README.md +1 -1
  4. package/dist/docs/public/advanced/auth-and-route-protection.md +3 -1
  5. package/dist/docs/public/advanced/default-harness.md +2 -2
  6. package/dist/docs/public/advanced/dev-tui.md +9 -11
  7. package/dist/docs/public/advanced/instrumentation.md +1 -1
  8. package/dist/docs/public/advanced/meta.json +0 -1
  9. package/dist/docs/public/advanced/security-model.md +1 -1
  10. package/dist/docs/public/advanced/session-context.md +1 -1
  11. package/dist/docs/public/agent-config.md +1 -1
  12. package/dist/docs/public/channels/eve.mdx +1 -1
  13. package/dist/docs/public/channels/slack.mdx +14 -2
  14. package/dist/docs/public/connections.mdx +3 -1
  15. package/dist/docs/public/evals/assertions.mdx +108 -0
  16. package/dist/docs/public/evals/cases.mdx +143 -0
  17. package/dist/docs/public/evals/judge.mdx +94 -0
  18. package/dist/docs/public/evals/meta.json +4 -0
  19. package/dist/docs/public/evals/overview.mdx +118 -0
  20. package/dist/docs/public/evals/reporters.mdx +62 -0
  21. package/dist/docs/public/evals/running.mdx +63 -0
  22. package/dist/docs/public/evals/targets.mdx +54 -0
  23. package/dist/docs/public/frontend/nextjs.mdx +13 -4
  24. package/dist/docs/public/frontend/nuxt.mdx +4 -4
  25. package/dist/docs/public/frontend/sveltekit.mdx +2 -2
  26. package/dist/docs/public/getting-started.mdx +25 -13
  27. package/dist/docs/public/meta.json +1 -0
  28. package/dist/docs/public/reference/cli.md +34 -18
  29. package/dist/docs/public/reference/typescript-api.md +6 -2
  30. package/dist/docs/public/tools.mdx +0 -4
  31. package/dist/docs/public/tutorial/connect-a-warehouse.mdx +1 -1
  32. package/dist/docs/public/tutorial/first-agent.mdx +5 -2
  33. package/dist/src/chunks/{use-eve-agent-DCZbkLG7.js → use-eve-agent-DErQj5hs.js} +125 -37
  34. package/dist/src/chunks/{use-eve-agent-DoheC4_o.js → use-eve-agent-DoR8C4i6.js} +125 -37
  35. package/dist/src/cli/banner.d.ts +7 -0
  36. package/dist/src/cli/banner.js +1 -0
  37. package/dist/src/cli/commands/channel-add-conflicts.d.ts +1 -1
  38. package/dist/src/cli/commands/channels.d.ts +9 -6
  39. package/dist/src/cli/commands/channels.js +1 -1
  40. package/dist/src/cli/commands/deploy.d.ts +21 -0
  41. package/dist/src/cli/commands/deploy.js +1 -0
  42. package/dist/src/cli/commands/init-git.d.ts +15 -0
  43. package/dist/src/cli/commands/init-git.js +1 -0
  44. package/dist/src/cli/commands/init.d.ts +29 -0
  45. package/dist/src/cli/commands/init.js +1 -0
  46. package/dist/src/cli/commands/link.d.ts +21 -0
  47. package/dist/src/cli/commands/link.js +1 -0
  48. package/dist/src/cli/commands/preconditions.d.ts +7 -0
  49. package/dist/src/cli/commands/preconditions.js +1 -0
  50. package/dist/src/cli/commands/register-project-commands.d.ts +12 -0
  51. package/dist/src/cli/commands/register-project-commands.js +1 -0
  52. package/dist/src/cli/dev/tui/agent-header.d.ts +15 -9
  53. package/dist/src/cli/dev/tui/agent-header.js +1 -1
  54. package/dist/src/cli/dev/tui/blocks.d.ts +1 -1
  55. package/dist/src/cli/dev/tui/blocks.js +3 -2
  56. package/dist/src/cli/dev/tui/command-typeahead.d.ts +47 -0
  57. package/dist/src/cli/dev/tui/command-typeahead.js +1 -0
  58. package/dist/src/cli/dev/tui/dev-rebuild-status.d.ts +21 -0
  59. package/dist/src/cli/dev/tui/dev-rebuild-status.js +1 -0
  60. package/dist/src/cli/dev/tui/errors.d.ts +18 -0
  61. package/dist/src/cli/dev/tui/errors.js +1 -1
  62. package/dist/src/cli/dev/tui/prompt-command-handler.d.ts +14 -0
  63. package/dist/src/cli/dev/tui/prompt-command-handler.js +1 -0
  64. package/dist/src/cli/dev/tui/prompt-commands.d.ts +54 -0
  65. package/dist/src/cli/dev/tui/prompt-commands.js +2 -0
  66. package/dist/src/cli/dev/tui/runner.d.ts +62 -5
  67. package/dist/src/cli/dev/tui/runner.js +1 -1
  68. package/dist/src/cli/dev/tui/setup-commands.d.ts +48 -0
  69. package/dist/src/cli/dev/tui/setup-commands.js +2 -0
  70. package/dist/src/cli/dev/tui/setup-flow.d.ts +35 -0
  71. package/dist/src/cli/dev/tui/setup-issues.d.ts +40 -0
  72. package/dist/src/cli/dev/tui/setup-issues.js +1 -0
  73. package/dist/src/cli/dev/tui/setup-panel.d.ts +103 -0
  74. package/dist/src/cli/dev/tui/setup-panel.js +1 -0
  75. package/dist/src/cli/dev/tui/status-line.d.ts +25 -0
  76. package/dist/src/cli/dev/tui/status-line.js +1 -0
  77. package/dist/src/cli/dev/tui/stream-format.d.ts +16 -1
  78. package/dist/src/cli/dev/tui/stream-format.js +1 -1
  79. package/dist/src/cli/dev/tui/terminal-renderer.d.ts +32 -3
  80. package/dist/src/cli/dev/tui/terminal-renderer.js +5 -2
  81. package/dist/src/cli/dev/tui/test/index.d.ts +3 -1
  82. package/dist/src/cli/dev/tui/test/index.js +1 -1
  83. package/dist/src/cli/dev/tui/test/mock-terminal.d.ts +1 -0
  84. package/dist/src/cli/dev/tui/test/mock-terminal.js +1 -1
  85. package/dist/src/cli/dev/tui/theme.d.ts +10 -0
  86. package/dist/src/cli/dev/tui/theme.js +1 -1
  87. package/dist/src/cli/dev/tui/tui-prompter.d.ts +20 -0
  88. package/dist/src/cli/dev/tui/tui-prompter.js +1 -0
  89. package/dist/src/cli/dev/tui/tui.d.ts +6 -8
  90. package/dist/src/cli/dev/tui/tui.js +1 -1
  91. package/dist/src/cli/dev/tui/types.d.ts +4 -3
  92. package/dist/src/cli/dev/tui/vercel-status.d.ts +47 -0
  93. package/dist/src/cli/dev/tui/vercel-status.js +1 -0
  94. package/dist/src/cli/run.d.ts +9 -18
  95. package/dist/src/cli/run.js +2 -2
  96. package/dist/src/client/client.d.ts +8 -0
  97. package/dist/src/client/client.js +1 -1
  98. package/dist/src/client/file-parts.d.ts +18 -0
  99. package/dist/src/client/file-parts.js +1 -0
  100. package/dist/src/client/index.d.ts +3 -2
  101. package/dist/src/client/index.js +1 -1
  102. package/dist/src/client/message-response.js +1 -1
  103. package/dist/src/client/open-stream.d.ts +6 -0
  104. package/dist/src/client/open-stream.js +1 -1
  105. package/dist/src/client/session-utils.d.ts +5 -0
  106. package/dist/src/client/session-utils.js +1 -1
  107. package/dist/src/client/session.js +1 -1
  108. package/dist/src/client/types.d.ts +9 -2
  109. package/dist/src/compiled/.vendor-stamp.json +8 -8
  110. package/dist/src/compiled/@ai-sdk/anthropic/index.d.ts +56 -31
  111. package/dist/src/compiled/@ai-sdk/anthropic/index.js +2 -2
  112. package/dist/src/compiled/@ai-sdk/google/index.js +1 -1
  113. package/dist/src/compiled/@ai-sdk/mcp/index.js +1 -1
  114. package/dist/src/compiled/@ai-sdk/openai/index.d.ts +16 -9
  115. package/dist/src/compiled/@ai-sdk/openai/index.js +2 -2
  116. package/dist/src/compiled/@ai-sdk/otel/index.js +2 -2
  117. package/dist/src/compiled/@vercel/sandbox/index.js +1 -1
  118. package/dist/src/compiled/@workflow/core/index.js +2 -2
  119. package/dist/src/compiled/@workflow/core/runtime/helpers.d.ts +4 -2
  120. package/dist/src/compiled/@workflow/core/runtime/wait-until.d.ts +18 -0
  121. package/dist/src/compiled/@workflow/core/runtime.d.ts +3 -1
  122. package/dist/src/compiled/@workflow/core/runtime.js +28 -28
  123. package/dist/src/compiled/@workflow/core/serialization.d.ts +41 -0
  124. package/dist/src/compiled/@workflow/core/util.d.ts +0 -5
  125. package/dist/src/compiled/@workflow/core/version.d.ts +1 -1
  126. package/dist/src/compiled/@workflow/core/workflow.js +1 -1
  127. package/dist/src/compiled/@workflow/world/index.d.ts +2 -2
  128. package/dist/src/compiled/@workflow/world/queue.d.ts +28 -2
  129. package/dist/src/compiled/_chunks/workflow/{dist-gEXVSMPU.js → dist-CkMRLaRV.js} +1 -1
  130. package/dist/src/compiled/_chunks/workflow/functions-DuPjIvMH.js +1 -0
  131. package/dist/src/compiled/_chunks/workflow/resume-hook-CEAS3opc.js +12 -0
  132. package/dist/src/compiled/_chunks/workflow/sleep-Cup6vPoA.js +1 -0
  133. package/dist/src/compiled/_chunks/workflow/{symbols-BWCAoPHE.js → symbols-BUTtwS7j.js} +1 -1
  134. package/dist/src/compiled/just-bash/index.d.ts +4 -4
  135. package/dist/src/compiler/artifacts.js +1 -1
  136. package/dist/src/compiler/manifest.d.ts +8 -8
  137. package/dist/src/compiler/normalize-agent-config.js +1 -1
  138. package/dist/src/compiler/normalize-channel.d.ts +2 -1
  139. package/dist/src/compiler/normalize-channel.js +1 -1
  140. package/dist/src/compiler/normalize-connection.d.ts +2 -1
  141. package/dist/src/compiler/normalize-connection.js +1 -1
  142. package/dist/src/compiler/normalize-helpers.d.ts +5 -0
  143. package/dist/src/compiler/normalize-helpers.js +1 -1
  144. package/dist/src/compiler/normalize-instructions.d.ts +3 -2
  145. package/dist/src/compiler/normalize-instructions.js +1 -1
  146. package/dist/src/compiler/normalize-manifest.js +2 -2
  147. package/dist/src/compiler/normalize-sandbox.d.ts +2 -1
  148. package/dist/src/compiler/normalize-sandbox.js +1 -1
  149. package/dist/src/compiler/normalize-schedule.d.ts +2 -1
  150. package/dist/src/compiler/normalize-schedule.js +1 -1
  151. package/dist/src/compiler/normalize-skill.d.ts +2 -1
  152. package/dist/src/compiler/normalize-skill.js +1 -1
  153. package/dist/src/compiler/normalize-subagent.d.ts +4 -1
  154. package/dist/src/compiler/normalize-subagent.js +1 -1
  155. package/dist/src/compiler/normalize-tool.d.ts +2 -1
  156. package/dist/src/compiler/normalize-tool.js +1 -1
  157. package/dist/src/compiler/workspace-resources.js +1 -1
  158. package/dist/src/context/node.d.ts +1 -1
  159. package/dist/src/evals/assertions/collector.d.ts +43 -0
  160. package/dist/src/evals/assertions/collector.js +1 -0
  161. package/dist/src/evals/assertions/run.d.ts +72 -0
  162. package/dist/src/evals/assertions/run.js +2 -0
  163. package/dist/src/evals/autoevals-client.js +2 -0
  164. package/dist/src/evals/cli/eval-client.d.ts +22 -0
  165. package/dist/src/evals/cli/eval-client.js +1 -0
  166. package/dist/src/evals/cli/eval.d.ts +8 -5
  167. package/dist/src/evals/cli/eval.js +1 -1
  168. package/dist/src/evals/context.d.ts +19 -0
  169. package/dist/src/evals/context.js +1 -0
  170. package/dist/src/evals/define-eval-config.d.ts +16 -0
  171. package/dist/src/evals/define-eval-config.js +1 -0
  172. package/dist/src/evals/define-eval.d.ts +20 -0
  173. package/dist/src/evals/define-eval.js +1 -0
  174. package/dist/src/evals/expect/index.d.ts +25 -0
  175. package/dist/src/evals/expect/index.js +1 -0
  176. package/dist/src/evals/index.d.ts +6 -2
  177. package/dist/src/evals/index.js +1 -1
  178. package/dist/src/evals/judge.d.ts +20 -0
  179. package/dist/src/evals/judge.js +1 -0
  180. package/dist/src/evals/{checks/match.d.ts → match.d.ts} +17 -18
  181. package/dist/src/evals/match.js +1 -0
  182. package/dist/src/evals/reporters/index.d.ts +1 -0
  183. package/dist/src/evals/reporters/index.js +1 -1
  184. package/dist/src/evals/requirements.d.ts +3 -0
  185. package/dist/src/evals/requirements.js +1 -0
  186. package/dist/src/evals/runner/artifacts.d.ts +7 -6
  187. package/dist/src/evals/runner/artifacts.js +3 -3
  188. package/dist/src/evals/runner/discover.d.ts +31 -10
  189. package/dist/src/evals/runner/discover.js +1 -1
  190. package/dist/src/evals/runner/execute-eval.d.ts +25 -0
  191. package/dist/src/evals/runner/execute-eval.js +1 -0
  192. package/dist/src/evals/runner/execute-task.d.ts +31 -0
  193. package/dist/src/evals/runner/execute-task.js +1 -0
  194. package/dist/src/evals/runner/reporters/braintrust.d.ts +7 -5
  195. package/dist/src/evals/runner/reporters/braintrust.js +2 -2
  196. package/dist/src/evals/runner/reporters/console.d.ts +4 -4
  197. package/dist/src/evals/runner/reporters/console.js +1 -1
  198. package/dist/src/evals/runner/reporters/junit.d.ts +10 -0
  199. package/dist/src/evals/runner/reporters/junit.js +4 -0
  200. package/dist/src/evals/runner/reporters/types.d.ts +14 -8
  201. package/dist/src/evals/runner/run-evals.d.ts +38 -0
  202. package/dist/src/evals/runner/run-evals.js +1 -0
  203. package/dist/src/evals/runner/verdict.d.ts +10 -15
  204. package/dist/src/evals/runner/verdict.js +1 -1
  205. package/dist/src/evals/session.d.ts +52 -0
  206. package/dist/src/evals/session.js +1 -0
  207. package/dist/src/evals/target.d.ts +23 -0
  208. package/dist/src/evals/target.js +1 -0
  209. package/dist/src/evals/types.d.ts +294 -219
  210. package/dist/src/execution/compaction.d.ts +14 -0
  211. package/dist/src/execution/compaction.js +1 -0
  212. package/dist/src/execution/delegated-parent-notification.js +1 -1
  213. package/dist/src/execution/dispatch-runtime-actions-step.js +1 -1
  214. package/dist/src/execution/node-step.js +1 -1
  215. package/dist/src/execution/sandbox/bash-tool.d.ts +6 -6
  216. package/dist/src/execution/sandbox/bash-tool.js +1 -1
  217. package/dist/src/execution/sandbox/bindings/local.js +1 -1
  218. package/dist/src/execution/sandbox/glob-tool.js +3 -3
  219. package/dist/src/execution/sandbox/grep-tool.js +3 -3
  220. package/dist/src/execution/sandbox/read-file-tool.js +1 -1
  221. package/dist/src/execution/subagent-adapter.js +1 -1
  222. package/dist/src/execution/tool-auth.js +1 -1
  223. package/dist/src/execution/turn-workflow.js +1 -1
  224. package/dist/src/execution/workflow-runtime.d.ts +2 -2
  225. package/dist/src/execution/workflow-runtime.js +1 -1
  226. package/dist/src/execution/workflow-steps.js +1 -1
  227. package/dist/src/harness/action-result-helpers.js +1 -1
  228. package/dist/src/harness/authorization.d.ts +26 -0
  229. package/dist/src/harness/authorization.js +1 -1
  230. package/dist/src/harness/code-mode-lifecycle.js +1 -1
  231. package/dist/src/harness/emission.d.ts +12 -5
  232. package/dist/src/harness/emission.js +1 -1
  233. package/dist/src/harness/model-call-error.d.ts +35 -6
  234. package/dist/src/harness/model-call-error.js +1 -1
  235. package/dist/src/harness/step-hooks.d.ts +10 -4
  236. package/dist/src/harness/step-hooks.js +1 -1
  237. package/dist/src/harness/tool-loop.js +1 -1
  238. package/dist/src/harness/tools.d.ts +4 -6
  239. package/dist/src/harness/tools.js +1 -1
  240. package/dist/src/harness/turn-tag-state.d.ts +4 -0
  241. package/dist/src/harness/turn-tag-state.js +1 -1
  242. package/dist/src/harness/types.d.ts +4 -15
  243. package/dist/src/internal/application/cache-metadata.js +1 -1
  244. package/dist/src/internal/application/compiled-artifacts.js +1 -1
  245. package/dist/src/internal/application/package.js +1 -1
  246. package/dist/src/internal/application/paths.js +1 -1
  247. package/dist/src/internal/authored-definition/schema-backed.js +1 -1
  248. package/dist/src/internal/authored-module-loader.d.ts +4 -1
  249. package/dist/src/internal/authored-module-loader.js +2 -2
  250. package/dist/src/internal/authored-module-map-loader.js +1 -1
  251. package/dist/src/internal/nitro/dev-runtime-artifacts.js +1 -1
  252. package/dist/src/internal/nitro/host/build-application.js +1 -1
  253. package/dist/src/internal/nitro/host/build-vercel-agent-summary.js +1 -1
  254. package/dist/src/internal/nitro/host/configure-nitro-routes.js +3 -3
  255. package/dist/src/internal/nitro/host/create-application-nitro.js +1 -1
  256. package/dist/src/internal/nitro/host/dev-authored-source-watcher.js +1 -1
  257. package/dist/src/internal/nitro/host/dev-watcher-log.d.ts +37 -0
  258. package/dist/src/internal/nitro/host/dev-watcher-log.js +1 -0
  259. package/dist/src/internal/nitro/host/ports.d.ts +8 -0
  260. package/dist/src/internal/nitro/host/ports.js +1 -0
  261. package/dist/src/internal/nitro/host/prepare-application-host.js +1 -1
  262. package/dist/src/internal/nitro/host/server-external-packages.d.ts +1 -1
  263. package/dist/src/internal/nitro/host/server-external-packages.js +1 -1
  264. package/dist/src/internal/nitro/host/start-development-server.js +1 -1
  265. package/dist/src/internal/nitro/host/start-production-server.js +1 -1
  266. package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response-from-manifest.d.ts +5 -0
  267. package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response-from-manifest.js +1 -0
  268. package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response.d.ts +31 -2
  269. package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response.js +1 -1
  270. package/dist/src/internal/nitro/routes/agent-info/load-agent-info-data.d.ts +13 -0
  271. package/dist/src/internal/nitro/routes/agent-info/load-agent-info-data.js +1 -1
  272. package/dist/src/internal/nitro/routes/info.d.ts +2 -2
  273. package/dist/src/internal/nitro/routes/info.js +1 -1
  274. package/dist/src/internal/workflow/queue-namespace.d.ts +5 -0
  275. package/dist/src/internal/workflow/queue-namespace.js +1 -0
  276. package/dist/src/internal/workflow-bundle/builder-support.js +2 -2
  277. package/dist/src/internal/workflow-bundle/builder.js +3 -5
  278. package/dist/src/internal/workflow-bundle/vercel-workflow-output.js +1 -1
  279. package/dist/src/internal/workflow-bundle/workflow-builders.d.ts +1 -1
  280. package/dist/src/internal/workflow-bundle/workflow-builders.js +1 -1
  281. package/dist/src/node_modules/.pnpm/@clack_core@1.3.1/node_modules/@clack/core/dist/index.js +4 -4
  282. package/dist/src/protocol/message.d.ts +15 -0
  283. package/dist/src/protocol/message.js +2 -2
  284. package/dist/src/public/channels/slack/api.d.ts +8 -0
  285. package/dist/src/public/channels/slack/api.js +1 -1
  286. package/dist/src/public/channels/slack/connections.d.ts +26 -18
  287. package/dist/src/public/channels/slack/connections.js +1 -1
  288. package/dist/src/public/channels/slack/defaults.d.ts +5 -2
  289. package/dist/src/public/channels/slack/defaults.js +1 -1
  290. package/dist/src/public/channels/slack/index.d.ts +1 -1
  291. package/dist/src/public/channels/slack/slackChannel.d.ts +65 -5
  292. package/dist/src/public/channels/slack/slackChannel.js +1 -1
  293. package/dist/src/public/channels/teams/defaults.js +1 -1
  294. package/dist/src/public/connections/errors.d.ts +8 -0
  295. package/dist/src/public/definitions/tool.d.ts +0 -33
  296. package/dist/src/public/next/index.d.ts +7 -1
  297. package/dist/src/public/next/index.js +1 -1
  298. package/dist/src/public/next/server.d.ts +1 -0
  299. package/dist/src/public/next/server.js +1 -1
  300. package/dist/src/public/nuxt/dev-server.js +1 -1
  301. package/dist/src/public/sveltekit/dev-server.js +1 -1
  302. package/dist/src/public/sveltekit/index.d.ts +1 -1
  303. package/dist/src/public/tools/defaults.d.ts +2 -4
  304. package/dist/src/public/tools/defaults.js +1 -1
  305. package/dist/src/public/tools/define-bash-tool.d.ts +3 -3
  306. package/dist/src/public/tools/define-bash-tool.js +1 -1
  307. package/dist/src/public/tools/define-read-file-tool.d.ts +0 -6
  308. package/dist/src/public/tools/define-read-file-tool.js +1 -1
  309. package/dist/src/public/tools/index.d.ts +2 -2
  310. package/dist/src/public/tools/index.js +1 -1
  311. package/dist/src/public/tools/internal.js +1 -1
  312. package/dist/src/runtime/actions/types.d.ts +11 -11
  313. package/dist/src/runtime/agent/mock-model-adapter.js +1 -1
  314. package/dist/src/runtime/agent/mock-model-fixtures.js +3 -2
  315. package/dist/src/runtime/agent/mock-model-skill-selection.js +3 -4
  316. package/dist/src/runtime/connections/callback-route.js +1 -1
  317. package/dist/src/runtime/connections/mcp-client.js +1 -1
  318. package/dist/src/runtime/connections/scoped-authorization.d.ts +21 -5
  319. package/dist/src/runtime/connections/scoped-authorization.js +1 -1
  320. package/dist/src/runtime/connections/types.d.ts +33 -0
  321. package/dist/src/runtime/connections/validate-authorization.js +1 -1
  322. package/dist/src/runtime/framework-tools/bash.d.ts +3 -3
  323. package/dist/src/runtime/framework-tools/bash.js +1 -1
  324. package/dist/src/runtime/framework-tools/connection-search-dynamic.d.ts +1 -1
  325. package/dist/src/runtime/framework-tools/connection-search-dynamic.js +1 -1
  326. package/dist/src/runtime/framework-tools/file-state.d.ts +3 -3
  327. package/dist/src/runtime/framework-tools/index.js +1 -1
  328. package/dist/src/runtime/framework-tools/read-file.js +2 -2
  329. package/dist/src/runtime/framework-tools/todo.d.ts +7 -0
  330. package/dist/src/runtime/framework-tools/todo.js +2 -2
  331. package/dist/src/runtime/governance/auth/http-basic.js +1 -1
  332. package/dist/src/runtime/input/types.d.ts +1 -1
  333. package/dist/src/runtime/resolve-tool.d.ts +2 -2
  334. package/dist/src/runtime/resolve-tool.js +1 -1
  335. package/dist/src/runtime/sandbox/keys.js +1 -1
  336. package/dist/src/runtime/session-callback-route.js +1 -1
  337. package/dist/src/runtime/types.d.ts +1 -7
  338. package/dist/src/services/dev-client/client-options.d.ts +8 -0
  339. package/dist/src/services/dev-client/client-options.js +1 -0
  340. package/dist/src/services/dev-client/runtime-artifacts.d.ts +13 -0
  341. package/dist/src/services/dev-client/runtime-artifacts.js +1 -0
  342. package/dist/src/services/dev-client.d.ts +13 -46
  343. package/dist/src/services/dev-client.js +1 -1
  344. package/dist/src/setup/ask.d.ts +205 -0
  345. package/dist/src/setup/ask.js +1 -0
  346. package/dist/src/setup/boxes/add-channels.d.ts +100 -16
  347. package/dist/src/setup/boxes/add-channels.js +2 -1
  348. package/dist/src/setup/boxes/add-connections.d.ts +13 -23
  349. package/dist/src/setup/boxes/add-connections.js +1 -1
  350. package/dist/src/setup/boxes/apply-ai-gateway-credential.d.ts +2 -2
  351. package/dist/src/setup/boxes/apply-ai-gateway-credential.js +1 -1
  352. package/dist/src/setup/boxes/deploy-project.d.ts +46 -14
  353. package/dist/src/setup/boxes/deploy-project.js +1 -1
  354. package/dist/src/setup/boxes/detect-ai-gateway.d.ts +10 -3
  355. package/dist/src/setup/boxes/detect-ai-gateway.js +1 -1
  356. package/dist/src/setup/boxes/link-project.d.ts +3 -3
  357. package/dist/src/setup/boxes/link-project.js +1 -1
  358. package/dist/src/setup/boxes/one-shot-next-steps.d.ts +18 -0
  359. package/dist/src/setup/boxes/one-shot-next-steps.js +2 -0
  360. package/dist/src/setup/boxes/preflight.d.ts +14 -6
  361. package/dist/src/setup/boxes/preflight.js +1 -1
  362. package/dist/src/setup/boxes/resolve-provisioning.d.ts +36 -8
  363. package/dist/src/setup/boxes/resolve-provisioning.js +1 -1
  364. package/dist/src/setup/boxes/resolve-target.d.ts +25 -8
  365. package/dist/src/setup/boxes/resolve-target.js +1 -1
  366. package/dist/src/setup/boxes/scaffold.d.ts +12 -6
  367. package/dist/src/setup/boxes/scaffold.js +1 -1
  368. package/dist/src/setup/boxes/select-channels.d.ts +38 -9
  369. package/dist/src/setup/boxes/select-channels.js +1 -1
  370. package/dist/src/setup/boxes/select-chat.d.ts +15 -11
  371. package/dist/src/setup/boxes/select-chat.js +1 -1
  372. package/dist/src/setup/boxes/select-connections.d.ts +30 -0
  373. package/dist/src/setup/boxes/select-connections.js +1 -0
  374. package/dist/src/setup/boxes/select-model.d.ts +18 -14
  375. package/dist/src/setup/boxes/select-model.js +1 -1
  376. package/dist/src/setup/boxes/select-setup-mode.d.ts +32 -0
  377. package/dist/src/setup/boxes/select-setup-mode.js +1 -0
  378. package/dist/src/setup/channel-add-conflicts.d.ts +28 -0
  379. package/dist/src/setup/channel-add-conflicts.js +1 -0
  380. package/dist/src/setup/cli/channel-setup-prompter.d.ts +23 -0
  381. package/dist/src/setup/cli/channel-setup-prompter.js +1 -0
  382. package/dist/src/setup/cli/connection-add-prompter.d.ts +8 -0
  383. package/dist/src/setup/cli/connection-add-prompter.js +1 -0
  384. package/dist/src/setup/{scaffold/cli → cli}/index.d.ts +4 -3
  385. package/dist/src/setup/cli/index.js +1 -0
  386. package/dist/src/setup/{scaffold/cli → cli}/prompt-ui.d.ts +39 -15
  387. package/dist/src/setup/cli/prompt-ui.js +5 -0
  388. package/dist/src/setup/{scaffold/cli → cli}/rail-log.d.ts +2 -0
  389. package/dist/src/setup/{scaffold/cli → cli}/rail-log.js +2 -2
  390. package/dist/src/setup/{scaffold/cli → cli}/select-component.d.ts +18 -3
  391. package/dist/src/setup/cli/select-component.js +1 -0
  392. package/dist/src/setup/cli/select-option-codec.d.ts +12 -0
  393. package/dist/src/setup/cli/select-option-codec.js +1 -0
  394. package/dist/src/setup/{scaffold/cli → cli}/select-state.d.ts +13 -1
  395. package/dist/src/setup/cli/select-state.js +1 -0
  396. package/dist/src/setup/cli/whimsy.d.ts +16 -0
  397. package/dist/src/setup/cli/whimsy.js +1 -0
  398. package/dist/src/setup/{scaffold/steps/setup-connection.d.ts → connection-connector.d.ts} +3 -2
  399. package/dist/src/setup/connection-connector.js +1 -0
  400. package/dist/src/setup/flows/channels.d.ts +43 -0
  401. package/dist/src/setup/flows/channels.js +1 -0
  402. package/dist/src/setup/flows/deploy.d.ts +40 -0
  403. package/dist/src/setup/flows/deploy.js +1 -0
  404. package/dist/src/setup/flows/in-project.d.ts +16 -0
  405. package/dist/src/setup/flows/in-project.js +1 -0
  406. package/dist/src/setup/flows/link.d.ts +43 -0
  407. package/dist/src/setup/flows/link.js +1 -0
  408. package/dist/src/setup/flows/model.d.ts +112 -0
  409. package/dist/src/setup/flows/model.js +1 -0
  410. package/dist/src/setup/flows/vercel.d.ts +31 -0
  411. package/dist/src/setup/flows/vercel.js +2 -0
  412. package/dist/src/setup/gateway-models.js +1 -1
  413. package/dist/src/setup/headless.d.ts +1 -1
  414. package/dist/src/setup/index.d.ts +10 -4
  415. package/dist/src/setup/index.js +1 -1
  416. package/dist/src/setup/onboarding.d.ts +7 -4
  417. package/dist/src/setup/onboarding.js +1 -1
  418. package/dist/src/setup/package-manager.d.ts +27 -0
  419. package/dist/src/setup/package-manager.js +1 -0
  420. package/dist/src/setup/primitives/index.d.ts +3 -0
  421. package/dist/src/setup/primitives/index.js +1 -0
  422. package/dist/src/setup/primitives/pm/bun.d.ts +10 -0
  423. package/dist/src/setup/primitives/pm/bun.js +1 -0
  424. package/dist/src/setup/primitives/pm/index.d.ts +11 -0
  425. package/dist/src/setup/primitives/pm/index.js +1 -0
  426. package/dist/src/setup/primitives/pm/npm.d.ts +10 -0
  427. package/dist/src/setup/primitives/pm/npm.js +1 -0
  428. package/dist/src/setup/primitives/pm/pnpm.d.ts +27 -0
  429. package/dist/src/setup/primitives/pm/pnpm.js +8 -0
  430. package/dist/src/setup/primitives/pm/run.d.ts +23 -0
  431. package/dist/src/setup/primitives/pm/run.js +1 -0
  432. package/dist/src/setup/primitives/pm/shared.d.ts +8 -0
  433. package/dist/src/setup/primitives/pm/shared.js +1 -0
  434. package/dist/src/setup/primitives/pm/types.d.ts +37 -0
  435. package/dist/src/setup/primitives/pm/types.js +1 -0
  436. package/dist/src/setup/primitives/pm/yarn.d.ts +10 -0
  437. package/dist/src/setup/primitives/pm/yarn.js +1 -0
  438. package/dist/src/setup/primitives/run-pnpm.d.ts +1 -0
  439. package/dist/src/setup/primitives/run-pnpm.js +1 -0
  440. package/dist/src/setup/{scaffold/primitives → primitives}/run-vercel.d.ts +7 -0
  441. package/dist/src/setup/primitives/run-vercel.js +1 -0
  442. package/dist/src/setup/project-name.d.ts +4 -0
  443. package/dist/src/setup/project-name.js +1 -0
  444. package/dist/src/setup/project-resolution.d.ts +54 -0
  445. package/dist/src/setup/project-resolution.js +1 -0
  446. package/dist/src/setup/prompter.d.ts +52 -4
  447. package/dist/src/setup/prompter.js +1 -1
  448. package/dist/src/setup/quit-guard.d.ts +1 -1
  449. package/dist/src/setup/run-vercel-link.d.ts +1 -1
  450. package/dist/src/setup/run-vercel-link.js +1 -1
  451. package/dist/src/setup/runner.d.ts +5 -4
  452. package/dist/src/setup/runner.js +1 -1
  453. package/dist/src/setup/scaffold/channels-catalog.d.ts +3 -3
  454. package/dist/src/setup/scaffold/channels-catalog.js +1 -1
  455. package/dist/src/setup/scaffold/create/add-to-project.d.ts +26 -0
  456. package/dist/src/setup/scaffold/create/add-to-project.js +1 -0
  457. package/dist/src/setup/scaffold/create/project.d.ts +54 -0
  458. package/dist/src/setup/scaffold/create/project.js +80 -0
  459. package/dist/src/setup/scaffold/index.d.ts +4 -4
  460. package/dist/src/setup/scaffold/index.js +1 -1
  461. package/dist/src/setup/scaffold/{channels.d.ts → update/channels.d.ts} +11 -0
  462. package/dist/src/setup/scaffold/update/channels.js +7 -0
  463. package/dist/src/setup/scaffold/{connections.d.ts → update/connections.d.ts} +1 -1
  464. package/dist/src/setup/scaffold/update/connections.js +21 -0
  465. package/dist/src/setup/scaffold/version-tokens.d.ts +11 -0
  466. package/dist/src/setup/scaffold/version-tokens.js +1 -0
  467. package/dist/src/setup/{scaffold/steps/setup-slackbot.d.ts → slackbot.d.ts} +24 -20
  468. package/dist/src/setup/slackbot.js +1 -0
  469. package/dist/src/setup/state.d.ts +62 -15
  470. package/dist/src/setup/state.js +1 -1
  471. package/dist/src/setup/step.d.ts +9 -18
  472. package/dist/src/setup/vercel-project.d.ts +15 -8
  473. package/dist/src/setup/vercel-project.js +1 -1
  474. package/dist/src/shared/agent-definition.d.ts +5 -3
  475. package/dist/src/shared/default-agent-model.d.ts +5 -0
  476. package/dist/src/shared/default-agent-model.js +1 -0
  477. package/dist/src/source-change/apply-model-name.d.ts +25 -0
  478. package/dist/src/source-change/apply-model-name.js +2 -0
  479. package/dist/src/source-change/static-source-change.d.ts +36 -0
  480. package/dist/src/source-change/static-source-change.js +1 -0
  481. package/dist/src/svelte/index.js +1 -1
  482. package/dist/src/svelte/use-eve-agent.js +1 -1
  483. package/dist/src/vue/index.js +1 -1
  484. package/dist/src/vue/use-eve-agent.js +1 -1
  485. package/package.json +22 -42
  486. package/dist/docs/evals-v2-plan.md +0 -939
  487. package/dist/docs/public/advanced/evals.md +0 -158
  488. package/dist/src/cli/commands/setup.d.ts +0 -55
  489. package/dist/src/cli/commands/setup.js +0 -1
  490. package/dist/src/cli/dev/repl/input-requests.d.ts +0 -38
  491. package/dist/src/cli/dev/repl/input-requests.js +0 -1
  492. package/dist/src/cli/dev/repl/input.d.ts +0 -19
  493. package/dist/src/cli/dev/repl/input.js +0 -1
  494. package/dist/src/cli/dev/repl/repl.d.ts +0 -62
  495. package/dist/src/cli/dev/repl/repl.js +0 -2
  496. package/dist/src/cli/dev/repl/terminal.d.ts +0 -21
  497. package/dist/src/cli/dev/repl/terminal.js +0 -5
  498. package/dist/src/compiled/_chunks/workflow/resume-hook-0Zk0zSvq.js +0 -12
  499. package/dist/src/compiled/_chunks/workflow/sleep-DXZr2BgM.js +0 -1
  500. package/dist/src/evals/checks/checks.d.ts +0 -66
  501. package/dist/src/evals/checks/checks.js +0 -2
  502. package/dist/src/evals/checks/index.d.ts +0 -21
  503. package/dist/src/evals/checks/index.js +0 -1
  504. package/dist/src/evals/checks/match.js +0 -1
  505. package/dist/src/evals/define-eval-suite.d.ts +0 -18
  506. package/dist/src/evals/define-eval-suite.js +0 -1
  507. package/dist/src/evals/runner/execute-case.d.ts +0 -23
  508. package/dist/src/evals/runner/execute-case.js +0 -1
  509. package/dist/src/evals/runner/execute-suite.d.ts +0 -24
  510. package/dist/src/evals/runner/execute-suite.js +0 -1
  511. package/dist/src/evals/scorers/autoevals-client.js +0 -2
  512. package/dist/src/evals/scorers/autoevals.d.ts +0 -58
  513. package/dist/src/evals/scorers/autoevals.js +0 -1
  514. package/dist/src/evals/scorers/json.d.ts +0 -10
  515. package/dist/src/evals/scorers/json.js +0 -1
  516. package/dist/src/evals/scorers/model-marker.d.ts +0 -12
  517. package/dist/src/evals/scorers/model-marker.js +0 -1
  518. package/dist/src/evals/scorers/run.d.ts +0 -24
  519. package/dist/src/evals/scorers/run.js +0 -1
  520. package/dist/src/evals/scorers/sql.d.ts +0 -9
  521. package/dist/src/evals/scorers/sql.js +0 -1
  522. package/dist/src/evals/scorers/text.d.ts +0 -18
  523. package/dist/src/evals/scorers/text.js +0 -1
  524. package/dist/src/evals/scores/index.d.ts +0 -72
  525. package/dist/src/evals/scores/index.js +0 -1
  526. package/dist/src/execution/tool-compaction.d.ts +0 -9
  527. package/dist/src/execution/tool-compaction.js +0 -1
  528. package/dist/src/services/dev-client/stream.d.ts +0 -5
  529. package/dist/src/services/dev-client/stream.js +0 -1
  530. package/dist/src/services/dev-client/url.d.ts +0 -11
  531. package/dist/src/services/dev-client/url.js +0 -1
  532. package/dist/src/setup/channel-setup-prompter.d.ts +0 -8
  533. package/dist/src/setup/channel-setup-prompter.js +0 -1
  534. package/dist/src/setup/scaffold/channels.js +0 -7
  535. package/dist/src/setup/scaffold/cli/channel-add-prompter.d.ts +0 -12
  536. package/dist/src/setup/scaffold/cli/channel-add-prompter.js +0 -1
  537. package/dist/src/setup/scaffold/cli/channel-setup-prompter.d.ts +0 -56
  538. package/dist/src/setup/scaffold/cli/connection-add-prompter.d.ts +0 -44
  539. package/dist/src/setup/scaffold/cli/connection-add-prompter.js +0 -1
  540. package/dist/src/setup/scaffold/cli/index.js +0 -1
  541. package/dist/src/setup/scaffold/cli/prompt-ui.js +0 -5
  542. package/dist/src/setup/scaffold/cli/select-component.js +0 -1
  543. package/dist/src/setup/scaffold/cli/select-state.js +0 -1
  544. package/dist/src/setup/scaffold/connections.js +0 -21
  545. package/dist/src/setup/scaffold/pnpm-workspace.d.ts +0 -3
  546. package/dist/src/setup/scaffold/pnpm-workspace.js +0 -11
  547. package/dist/src/setup/scaffold/primitives/detect-deployment.d.ts +0 -13
  548. package/dist/src/setup/scaffold/primitives/detect-deployment.js +0 -1
  549. package/dist/src/setup/scaffold/primitives/index.d.ts +0 -3
  550. package/dist/src/setup/scaffold/primitives/index.js +0 -1
  551. package/dist/src/setup/scaffold/primitives/pnpm-invocation.d.ts +0 -12
  552. package/dist/src/setup/scaffold/primitives/pnpm-invocation.js +0 -1
  553. package/dist/src/setup/scaffold/primitives/run-pnpm.d.ts +0 -17
  554. package/dist/src/setup/scaffold/primitives/run-pnpm.js +0 -1
  555. package/dist/src/setup/scaffold/primitives/run-vercel.js +0 -1
  556. package/dist/src/setup/scaffold/project.d.ts +0 -21
  557. package/dist/src/setup/scaffold/project.js +0 -80
  558. package/dist/src/setup/scaffold/steps/deploy-to-vercel.d.ts +0 -17
  559. package/dist/src/setup/scaffold/steps/deploy-to-vercel.js +0 -1
  560. package/dist/src/setup/scaffold/steps/index.d.ts +0 -4
  561. package/dist/src/setup/scaffold/steps/index.js +0 -1
  562. package/dist/src/setup/scaffold/steps/project-resolution.d.ts +0 -19
  563. package/dist/src/setup/scaffold/steps/project-resolution.js +0 -1
  564. package/dist/src/setup/scaffold/steps/run-add-connection.d.ts +0 -40
  565. package/dist/src/setup/scaffold/steps/run-add-connection.js +0 -1
  566. package/dist/src/setup/scaffold/steps/run-add-to-agent.d.ts +0 -81
  567. package/dist/src/setup/scaffold/steps/run-add-to-agent.js +0 -2
  568. package/dist/src/setup/scaffold/steps/setup-connection.js +0 -1
  569. package/dist/src/setup/scaffold/steps/setup-slackbot.js +0 -1
  570. /package/dist/src/{setup/scaffold/cli/channel-setup-prompter.js → cli/dev/tui/setup-flow.js} +0 -0
  571. /package/dist/src/evals/{scorers/autoevals-client.d.ts → autoevals-client.d.ts} +0 -0
  572. /package/dist/src/setup/{scaffold/cli → cli}/command-output.d.ts +0 -0
  573. /package/dist/src/setup/{scaffold/cli → cli}/command-output.js +0 -0
  574. /package/dist/src/setup/{scaffold/human-action.d.ts → human-action.d.ts} +0 -0
  575. /package/dist/src/setup/{scaffold/human-action.js → human-action.js} +0 -0
  576. /package/dist/src/setup/{scaffold/primitives → primitives}/process-output.d.ts +0 -0
  577. /package/dist/src/setup/{scaffold/primitives → primitives}/process-output.js +0 -0
  578. /package/dist/src/setup/scaffold/{web-template.d.ts → create/web-template.d.ts} +0 -0
  579. /package/dist/src/setup/scaffold/{web-template.js → create/web-template.js} +0 -0
  580. /package/dist/src/setup/scaffold/{module-files.d.ts → update/module-files.d.ts} +0 -0
  581. /package/dist/src/setup/scaffold/{module-files.js → update/module-files.js} +0 -0
  582. /package/dist/src/setup/scaffold/{package-json.d.ts → update/package-json.d.ts} +0 -0
  583. /package/dist/src/setup/scaffold/{package-json.js → update/package-json.js} +0 -0
  584. /package/dist/src/setup/scaffold/{primitives → update}/update-connection-connector.d.ts +0 -0
  585. /package/dist/src/setup/scaffold/{primitives → update}/update-connection-connector.js +0 -0
  586. /package/dist/src/setup/scaffold/{primitives → update}/update-slack-channel.d.ts +0 -0
  587. /package/dist/src/setup/scaffold/{primitives → update}/update-slack-channel.js +0 -0
@@ -0,0 +1,10 @@
1
+ import { applyNoProjectConfiguration } from "./shared.js";
2
+ export declare const npmPackageManager: {
3
+ kind: "npm";
4
+ scaffoldFiles: {};
5
+ applyProjectConfiguration: typeof applyNoProjectConfiguration;
6
+ devArguments: () => string[];
7
+ installArguments: (options: import("./types.js").PackageManagerInstallOptions) => string[];
8
+ prepareArguments: (_projectRoot: string, args: readonly string[]) => readonly string[];
9
+ resolveInvocation: (args: readonly string[]) => import("./types.js").PackageManagerInvocation;
10
+ };
@@ -0,0 +1 @@
1
+ import{applyNoProjectConfiguration,resolveStandardInvocation}from"./shared.js";const npmPackageManager={kind:`npm`,scaffoldFiles:{},applyProjectConfiguration:applyNoProjectConfiguration,devArguments:()=>[`exec`,`--`,`eve`,`dev`],installArguments:e=>[`install`,...e.bypassMinimumReleaseAge===!0?[`--min-release-age=0`]:[]],prepareArguments:(e,t)=>t,resolveInvocation:e=>resolveStandardInvocation(`npm`,e)};export{npmPackageManager};
@@ -0,0 +1,27 @@
1
+ export declare const PNPM_WORKSPACE_PATH = "pnpm-workspace.yaml";
2
+ export declare const PNPM_WORKSPACE_CONTENT: string;
3
+ export declare const pnpmPackageManager: {
4
+ kind: "pnpm";
5
+ scaffoldFiles: {
6
+ "pnpm-workspace.yaml": string;
7
+ };
8
+ applyProjectConfiguration(projectRoot: string): Promise<{
9
+ filesSkipped: never[];
10
+ filesWritten: string[];
11
+ } | {
12
+ filesSkipped: string[];
13
+ filesWritten: never[];
14
+ }>;
15
+ devArguments: () => string[];
16
+ installArguments: (options: import("./types.js").PackageManagerInstallOptions) => string[];
17
+ prepareArguments: (projectRoot: string, args: readonly string[]) => string[];
18
+ resolveInvocation(args: readonly string[]): {
19
+ args: readonly string[];
20
+ command: string;
21
+ shell: boolean;
22
+ } | {
23
+ shell?: undefined;
24
+ args: readonly string[];
25
+ command: string;
26
+ };
27
+ };
@@ -0,0 +1,8 @@
1
+ import{pathExists}from"../../path-exists.js";import{extname,join}from"node:path";import{existsSync}from"node:fs";import{readFile,writeFile}from"node:fs/promises";const PNPM_WORKSPACE_PATH=`pnpm-workspace.yaml`,PNPM_WORKSPACE_CONTENT=[`minimumReleaseAgeExclude:`,` - eve`,`allowBuilds:`,` sharp: false`,`# Some Eve releases import oxc-parser without declaring it; remove once`,`# every supported Eve range declares it itself.`,`packageExtensions:`,` eve:`,` dependencies:`,` oxc-parser: ^0.134.0`,``].join(`
2
+ `),EVE_RELEASE_AGE_EXCLUSION=` - eve`,SHARP_BUILD_POLICY=` sharp: false`;function findYamlBlockEnd(e,t){let n=t+1;for(;n<e.length;){let t=e[n]??``;if(t.length>0&&!t.startsWith(` `)&&!t.startsWith(` `))break;n+=1}return n}function withSharpBuildPolicy(e){let t=e.endsWith(`
3
+ `)?e:`${e}\n`,n=t.split(`
4
+ `),r=n.findIndex(e=>e===`allowBuilds:`);if(r<0)return`${t.trim().length===0?``:`${t}\n`}allowBuilds:\n${SHARP_BUILD_POLICY}\n`;let i=findYamlBlockEnd(n,r);if(n.slice(r+1,i).some(e=>/^\s+sharp:/.test(e)))return e;let a=i;for(;a>r+1&&n[a-1]===``;)--a;return n.splice(a,0,SHARP_BUILD_POLICY),n.join(`
5
+ `)}function withExperimentalEveReleaseAgeExclusion(e){let t=e.endsWith(`
6
+ `)?e:`${e}\n`,n=t.split(`
7
+ `),r=n.findIndex(e=>e===`minimumReleaseAgeExclude:`);if(r<0)return`${t.trim().length===0?``:`${t}\n`}minimumReleaseAgeExclude:\n${EVE_RELEASE_AGE_EXCLUSION}\n`;let i=findYamlBlockEnd(n,r);if(n.slice(r+1,i).some(e=>e.trim()===`- eve`))return e;let a=i;for(;a>r+1&&n[a-1]===``;)--a;return n.splice(a,0,EVE_RELEASE_AGE_EXCLUSION),n.join(`
8
+ `)}async function ensurePnpmWorkspacePolicy(t){if(!await pathExists(t))return await writeFile(t,PNPM_WORKSPACE_CONTENT,`utf8`),`written`;let n=await readFile(t,`utf8`),r=withExperimentalEveReleaseAgeExclusion(withSharpBuildPolicy(n));return r===n?`skipped`:(await writeFile(t,r,`utf8`),`written`)}const pnpmPackageManager={kind:`pnpm`,scaffoldFiles:{[PNPM_WORKSPACE_PATH]:PNPM_WORKSPACE_CONTENT},async applyProjectConfiguration(e){let t=join(e,PNPM_WORKSPACE_PATH);return await ensurePnpmWorkspacePolicy(t)===`written`?{filesSkipped:[],filesWritten:[t]}:{filesSkipped:[t],filesWritten:[]}},devArguments:()=>[`exec`,`eve`,`dev`],installArguments:e=>[`install`,`--no-frozen-lockfile`,...e.bypassMinimumReleaseAge===!0?[`--config.minimum-release-age=0`]:[]],prepareArguments:(e,t)=>[`--dir`,e,...existsSync(join(e,`pnpm-workspace.yaml`))?[]:[`--ignore-workspace`],...t],resolveInvocation(e){let i=process.env.PNPM_HOME;if(i!==void 0){let t=join(i,process.platform===`win32`?`pnpm.CMD`:`pnpm`);if(existsSync(t))return{args:e,command:t,shell:process.platform===`win32`}}let a=process.env.npm_execpath;if(a!==void 0&&a.toLowerCase().includes(`pnpm`)){let n=extname(a).toLowerCase();return n===`.cjs`||n===`.js`?{args:[a,...e],command:process.execPath}:{args:e,command:a,shell:process.platform===`win32`}}return{args:e,command:`pnpm`}}};export{PNPM_WORKSPACE_CONTENT,PNPM_WORKSPACE_PATH,pnpmPackageManager};
@@ -0,0 +1,23 @@
1
+ import type { PackageManagerKind } from "../../package-manager.js";
2
+ import { type ProcessOutputHandler } from "../process-output.js";
3
+ /** Output routing options for setup-owned package manager commands. */
4
+ export interface RunPackageManagerOptions {
5
+ /** Streams command output to a parent-owned renderer instead of writing outside it. */
6
+ onOutput?: ProcessOutputHandler;
7
+ }
8
+ /** @deprecated Use {@link RunPackageManagerOptions}. */
9
+ export type RunPnpmOptions = RunPackageManagerOptions;
10
+ /** Runs the selected package manager in `projectRoot`. */
11
+ export declare function spawnPackageManager(kind: PackageManagerKind, projectRoot: string, args: readonly string[], options?: RunPackageManagerOptions): Promise<boolean>;
12
+ export interface RunInstallOptions extends RunPackageManagerOptions {
13
+ /** Disables the manager's minimum-release-age cooldown for this run when supported. */
14
+ bypassMinimumReleaseAge?: boolean;
15
+ }
16
+ /** Installs project dependencies using the selected package-manager strategy. */
17
+ export declare function runPackageManagerInstall(kind: PackageManagerKind, projectRoot: string, options?: RunInstallOptions): Promise<boolean>;
18
+ /** The argv that runs the locally installed Eve binary's `dev` command. */
19
+ export declare function eveDevArguments(kind: PackageManagerKind): readonly string[];
20
+ /** Compatibility wrapper for callers that still explicitly require pnpm. */
21
+ export declare function spawnPnpm(projectRoot: string, args: readonly string[], options?: RunPackageManagerOptions): Promise<boolean>;
22
+ /** Compatibility wrapper for callers that still explicitly require pnpm. */
23
+ export declare function runPnpmInstall(projectRoot: string, options?: RunPackageManagerOptions): Promise<boolean>;
@@ -0,0 +1 @@
1
+ import{createProcessOutputBuffer}from"../process-output.js";import{getPackageManagerStrategy}from"./index.js";import{spawn}from"node:child_process";function spawnPackageManager(r,i,a,o={}){return new Promise(s=>{let c=getPackageManagerStrategy(r),l=c.prepareArguments(i,a),u=c.resolveInvocation(l),d=o.onOutput&&createProcessOutputBuffer(o.onOutput),f=spawn(u.command,[...u.args],{cwd:i,stdio:o.onOutput?[`inherit`,`pipe`,`pipe`]:`inherit`,shell:u.shell});f.stdout?.on(`data`,e=>d?.write(`stdout`,e)),f.stderr?.on(`data`,e=>d?.write(`stderr`,e));let p=!1;function settle(e){p||(p=!0,d?.flush(),s(e))}function reportFailure(e){o.onOutput?o.onOutput({stream:`stderr`,text:e}):process.stderr.write(`\n${e}\n`)}f.on(`error`,e=>{e.code===`ENOENT`?reportFailure(`${r} not found. Install it before running this step.`):reportFailure(`${r} ${a.join(` `)} failed: ${e.message}`),settle(!1)}),f.on(`close`,e=>settle(e===0))})}function runPackageManagerInstall(e,n,r={}){return spawnPackageManager(e,n,getPackageManagerStrategy(e).installArguments(r),{onOutput:r.onOutput})}function eveDevArguments(e){return getPackageManagerStrategy(e).devArguments()}function spawnPnpm(e,t,n={}){return spawnPackageManager(`pnpm`,e,t,n)}function runPnpmInstall(e,t={}){return runPackageManagerInstall(`pnpm`,e,t)}export{eveDevArguments,runPackageManagerInstall,runPnpmInstall,spawnPackageManager,spawnPnpm};
@@ -0,0 +1,8 @@
1
+ import type { PackageManagerInvocation } from "./types.js";
2
+ export type StandardExecutablePackageManager = "bun" | "npm" | "yarn";
3
+ /** Resolves a manager executable, preserving test and package-runner interposition. */
4
+ export declare function resolveStandardInvocation(kind: StandardExecutablePackageManager, args: readonly string[]): PackageManagerInvocation;
5
+ export declare function applyNoProjectConfiguration(): Promise<{
6
+ filesSkipped: [];
7
+ filesWritten: [];
8
+ }>;
@@ -0,0 +1 @@
1
+ import{extname}from"node:path";function resolveStandardInvocation(e,t){let n=process.env.npm_execpath,r=n?.toLowerCase(),i=r!==void 0&&(e===`npm`?r.includes(`npm`)&&!r.includes(`pnpm`):r.includes(e));if(n!==void 0&&i){let e=extname(n).toLowerCase();return e===`.cjs`||e===`.js`?{args:[n,...t],command:process.execPath}:{args:t,command:n,shell:process.platform===`win32`}}return{args:t,command:e,shell:process.platform===`win32`}}async function applyNoProjectConfiguration(){return{filesSkipped:[],filesWritten:[]}}export{applyNoProjectConfiguration,resolveStandardInvocation};
@@ -0,0 +1,37 @@
1
+ import type { PackageManagerKind } from "../../package-manager.js";
2
+ /** Executable and arguments used to invoke a package manager. */
3
+ export interface PackageManagerInvocation {
4
+ readonly args: readonly string[];
5
+ readonly command: string;
6
+ readonly shell?: boolean;
7
+ }
8
+ /** Files changed while applying package-manager-owned project configuration. */
9
+ export interface PackageManagerConfigurationResult {
10
+ readonly filesSkipped: readonly string[];
11
+ readonly filesWritten: readonly string[];
12
+ }
13
+ export interface PackageManagerInstallOptions {
14
+ readonly bypassMinimumReleaseAge?: boolean;
15
+ }
16
+ /**
17
+ * Package-manager-specific command and generated-project behavior.
18
+ *
19
+ * Process lifecycle and output handling remain shared; each strategy owns the
20
+ * arguments, executable resolution, and project files understood by its manager.
21
+ */
22
+ export interface PackageManagerStrategy {
23
+ /** Package manager represented by this strategy. */
24
+ readonly kind: PackageManagerKind;
25
+ /** Manager-owned files included when creating a fresh project. */
26
+ readonly scaffoldFiles: Readonly<Record<string, string>>;
27
+ /** Adds or reconciles manager-owned configuration in an existing project. */
28
+ applyProjectConfiguration(projectRoot: string): Promise<PackageManagerConfigurationResult>;
29
+ /** Arguments that run the project-local Eve development command. */
30
+ devArguments(): readonly string[];
31
+ /** Arguments that install project dependencies. */
32
+ installArguments(options: PackageManagerInstallOptions): readonly string[];
33
+ /** Adds any project-scoping arguments required before command execution. */
34
+ prepareArguments(projectRoot: string, args: readonly string[]): readonly string[];
35
+ /** Resolves the executable exposed by the current host environment. */
36
+ resolveInvocation(args: readonly string[]): PackageManagerInvocation;
37
+ }
@@ -0,0 +1 @@
1
+ export{};
@@ -0,0 +1,10 @@
1
+ import { applyNoProjectConfiguration } from "./shared.js";
2
+ export declare const yarnPackageManager: {
3
+ kind: "yarn";
4
+ scaffoldFiles: {};
5
+ applyProjectConfiguration: typeof applyNoProjectConfiguration;
6
+ devArguments: () => string[];
7
+ installArguments: () => string[];
8
+ prepareArguments: (_projectRoot: string, args: readonly string[]) => readonly string[];
9
+ resolveInvocation: (args: readonly string[]) => import("./types.js").PackageManagerInvocation;
10
+ };
@@ -0,0 +1 @@
1
+ import{applyNoProjectConfiguration,resolveStandardInvocation}from"./shared.js";const yarnPackageManager={kind:`yarn`,scaffoldFiles:{},applyProjectConfiguration:applyNoProjectConfiguration,devArguments:()=>[`eve`,`dev`],installArguments:()=>[`install`],prepareArguments:(e,t)=>t,resolveInvocation:e=>resolveStandardInvocation(`yarn`,e)};export{yarnPackageManager};
@@ -0,0 +1 @@
1
+ export { eveDevArguments, runPackageManagerInstall, runPnpmInstall, spawnPackageManager, spawnPnpm, type RunInstallOptions, type RunPackageManagerOptions as RunPnpmOptions, } from "./pm/run.js";
@@ -0,0 +1 @@
1
+ import{eveDevArguments,runPackageManagerInstall,runPnpmInstall,spawnPackageManager,spawnPnpm}from"./pm/run.js";export{eveDevArguments,runPackageManagerInstall,runPnpmInstall,spawnPackageManager,spawnPnpm};
@@ -7,6 +7,13 @@ export interface RunVercelOptions {
7
7
  nonInteractive?: boolean;
8
8
  /** Streams command output to a parent-owned renderer instead of writing outside it. */
9
9
  onOutput?: ProcessOutputHandler;
10
+ /**
11
+ * Hard deadline for the whole command. When it elapses the run settles as a
12
+ * failure and the child is killed (SIGTERM, then SIGKILL after a short
13
+ * grace). Unbounded when omitted — only safe for commands that cannot wait
14
+ * on external action, e.g. a Connect create parked on a browser OAuth.
15
+ */
16
+ timeoutMs?: number;
10
17
  }
11
18
  /**
12
19
  * Runs a Vercel CLI command with the Connect feature flag enabled.
@@ -0,0 +1 @@
1
+ import{createProcessOutputBuffer}from"./process-output.js";import{dirname,join,resolve}from"node:path";import{spawn}from"node:child_process";import{accessSync,constants,existsSync,statSync}from"node:fs";const CONNECT_FEATURE_FLAG_ENV={FF_CONNECT_ENABLED:`1`},VERCEL_NOT_FOUND_MESSAGE=`Vercel CLI not found. Install with: npm i -g vercel@latest`;function buildSpawnEnv(e){return{...process.env,...CONNECT_FEATURE_FLAG_ENV,...e}}function existingDir(e){let n=resolve(e);for(;!existsSync(n);){let e=dirname(n);if(e===n)break;n=e}return n}function armDeadline(e,t,n){if(t===void 0)return()=>{};let r=setTimeout(()=>{n(),e.kill(`SIGTERM`);let t=setTimeout(()=>e.kill(`SIGKILL`),5e3);t.unref(),e.once(`close`,()=>clearTimeout(t))},t);return r.unref(),()=>clearTimeout(r)}function timeoutMessage(e,t){return`vercel ${e.join(` `)} timed out after ${Math.round(t/1e3)}s and was aborted.`}function ancestorDirectories(e){let n=[],i=resolve(e);for(;;){n.push(i);let e=dirname(i);if(e===i)return n;i=e}}function findExecutable(e){try{if(accessSync(e,constants.F_OK|constants.X_OK),statSync(e).isFile())return e}catch{return}}function findLocalVercel(e){for(let t of ancestorDirectories(e)){let e=findExecutable(join(t,`node_modules`,`.bin`,`vercel`));if(e!==void 0)return e}}function resolveVercelInvocation(e){let t=findLocalVercel(e);return t===void 0?{command:`vercel`,commandArgs:[]}:{command:t,commandArgs:[]}}function stdioForRun(e){return e.onOutput?[e.nonInteractive?`ignore`:`inherit`,`pipe`,`pipe`]:e.nonInteractive?[`ignore`,`pipe`,`pipe`]:`inherit`}async function runVercel(t,n){return new Promise(r=>{let a=existingDir(n.cwd),o=resolveVercelInvocation(a),s=n.onOutput&&createProcessOutputBuffer(n.onOutput),c=spawn(o.command,[...o.commandArgs,...t],{cwd:a,stdio:stdioForRun(n),env:buildSpawnEnv(n.extraEnv??{})});c.stdout?.on(`data`,e=>s?.write(`stdout`,e)),c.stderr?.on(`data`,e=>s?.write(`stderr`,e));let l=!1;function settle(e){l||(l=!0,s?.flush(),r(e))}function reportFailure(e){n.onOutput?n.onOutput({stream:`stderr`,text:e}):process.stderr.write(`\n${e}\n`)}let u=armDeadline(c,n.timeoutMs,()=>{reportFailure(timeoutMessage(t,n.timeoutMs??0)),settle(!1)});c.on(`error`,e=>{u(),e.code===`ENOENT`?reportFailure(VERCEL_NOT_FOUND_MESSAGE):reportFailure(`vercel ${t.join(` `)} failed: ${e.message}`),settle(!1)}),c.on(`close`,e=>{u(),!l&&e!==0&&e!==null&&(s?.flush(),reportFailure(`vercel ${t.join(` `)} exited with code ${e}.`)),settle(e===0)})})}async function runVercelCaptureStdout(t,n){return new Promise(r=>{let a=existingDir(n.cwd),o=resolveVercelInvocation(a),s=n.onOutput&&createProcessOutputBuffer(n.onOutput),c=spawn(o.command,[...o.commandArgs,...t],{cwd:a,stdio:[n.nonInteractive?`ignore`:`inherit`,`pipe`,n.onOutput?`pipe`:`inherit`],env:buildSpawnEnv(n.extraEnv??{})}),l=[];c.stdout?.on(`data`,e=>l.push(e.toString(`utf8`))),c.stderr?.on(`data`,e=>s?.write(`stderr`,e));let u=!1;function settle(e){u||(u=!0,s?.flush(),r({ok:e,stdout:l.join(``)}))}function reportFailure(e){n.onOutput?n.onOutput({stream:`stderr`,text:e}):process.stderr.write(`\n${e}\n`)}let d=armDeadline(c,n.timeoutMs,()=>{reportFailure(timeoutMessage(t,n.timeoutMs??0)),settle(!1)});c.on(`error`,e=>{d(),reportFailure(e.code===`ENOENT`?VERCEL_NOT_FOUND_MESSAGE:`vercel ${t.join(` `)} failed: ${e.message}`),settle(!1)}),c.on(`close`,e=>{d(),!u&&e!==0&&e!==null&&reportFailure(`vercel ${t.join(` `)} exited with code ${e}.`),settle(e===0)})})}async function captureVercel(t,n){return new Promise(r=>{let a=existingDir(n.cwd),o=resolveVercelInvocation(a),s=n.onOutput&&createProcessOutputBuffer(n.onOutput),c=spawn(o.command,[...o.commandArgs,...t],{cwd:a,stdio:[`ignore`,`pipe`,`pipe`],env:buildSpawnEnv(n.extraEnv??{})}),l=[],u=[];c.stdout?.on(`data`,e=>l.push(e.toString(`utf8`))),c.stderr?.on(`data`,e=>{u.push(e.toString(`utf8`)),s?.write(`stderr`,e)});let d=!1;function fail(e){d||(d=!0,s?.flush(),n.onOutput?.({stream:`stderr`,text:e.message}),r({ok:!1,failure:e}))}function succeed(){d||(d=!0,s?.flush(),r({ok:!0,stdout:l.join(``)}))}let f=armDeadline(c,n.timeoutMs,()=>{fail({code:null,stdout:l.join(``),stderr:u.join(``),message:timeoutMessage(t,n.timeoutMs??0)})});c.on(`error`,e=>{f(),fail({errno:e.code,stdout:l.join(``),stderr:u.join(``),message:e.code===`ENOENT`?VERCEL_NOT_FOUND_MESSAGE:`vercel ${t.join(` `)} failed: ${e.message}`})}),c.on(`close`,e=>{if(f(),e!==0&&e!==null){fail({code:e,stdout:l.join(``),stderr:u.join(``),message:`vercel ${t.join(` `)} exited with code ${e}.`});return}succeed()})})}export{captureVercel,runVercel,runVercelCaptureStdout};
@@ -0,0 +1,4 @@
1
+ /** Returns an error message when a project name is not a safe single path segment. */
2
+ export declare function validateProjectName(value: string): string | undefined;
3
+ /** Parses and normalizes a project name at an external input boundary. */
4
+ export declare function parseProjectName(value: string): string;
@@ -0,0 +1 @@
1
+ const PROJECT_NAME_REGEX=/^(?!.*---)[a-z0-9-_.]+$/;function validateProjectName(t){let n=t.trim();if(n.length===0)return`Project name cannot be empty.`;if(n===`.`||n===`..`)return`Project name cannot be '${n}'.`;if(!PROJECT_NAME_REGEX.test(n)||n.length>100)return`Project name can only contain up to 100 lowercase letters, digits, and the characters '.', '_', '-'.`}function parseProjectName(e){let t=e.trim(),n=validateProjectName(t);if(n!==void 0)throw Error(n);return t}export{parseProjectName,validateProjectName};
@@ -0,0 +1,54 @@
1
+ /** Link and production-deployment status for a Vercel project directory. */
2
+ export type DeploymentState = "unlinked" | "linked" | "deployed";
3
+ /** Vercel project data resolved from local link metadata and the API. */
4
+ export interface DeploymentInfo {
5
+ state: DeploymentState;
6
+ projectId?: string;
7
+ orgId?: string;
8
+ productionUrl?: string;
9
+ }
10
+ /**
11
+ * Reads local Vercel link metadata and checks whether the linked project has a production alias.
12
+ */
13
+ export declare function detectDeployment(projectPath: string): Promise<DeploymentInfo>;
14
+ /** Human-readable identity of a linked Vercel project, for the dashboard status bar. */
15
+ export interface ProjectIdentity {
16
+ projectName: string;
17
+ /** The team's display name; absent for a personal-account project. */
18
+ teamName?: string;
19
+ }
20
+ /**
21
+ * Resolves a linked project's human-readable name and team for the dashboard
22
+ * status bar, from local `.vercel/project.json` plus the Vercel API. A
23
+ * personal-account project (a non-`team_` org) carries no team, so `teamName`
24
+ * is absent; the project name falls back to its id if the API call fails.
25
+ *
26
+ * Returns `undefined` when the directory is not linked. Network-bound: callers
27
+ * render a loading affordance and cache the result.
28
+ *
29
+ * @param projectPath Absolute path of the linked project directory.
30
+ */
31
+ export declare function detectProjectIdentity(projectPath: string): Promise<ProjectIdentity | undefined>;
32
+ export type ProjectResolution = {
33
+ kind: "unresolved";
34
+ } | {
35
+ kind: "linked";
36
+ projectId: string;
37
+ } | {
38
+ kind: "deployed";
39
+ projectId: string;
40
+ productionUrl: string;
41
+ };
42
+ export declare function projectResolutionFromDeployment(deployment: DeploymentInfo): ProjectResolution;
43
+ /**
44
+ * Side-effect-free fact gathering after a link: reads `.vercel/project.json`
45
+ * to resolve the project. The on-disk link is the single source of truth.
46
+ */
47
+ export declare function detectProjectResolution(projectRoot: string): Promise<ProjectResolution>;
48
+ export declare function mergeProjectResolution(current: ProjectResolution, next: ProjectResolution): ProjectResolution;
49
+ export declare function projectResolutionFromDeployResult(project: ProjectResolution, deploy: {
50
+ deployed: boolean;
51
+ productionUrl?: string;
52
+ }): ProjectResolution;
53
+ export declare function isProjectResolved(project: ProjectResolution): boolean;
54
+ export declare function projectProductionUrlFromResolution(project: ProjectResolution): string | undefined;
@@ -0,0 +1 @@
1
+ import{captureVercel}from"./primitives/run-vercel.js";import{join}from"node:path";import{readFile}from"node:fs/promises";function pickShortestAlias(e){if(!Array.isArray(e))return;let t;for(let n of e)typeof n!=`string`||n.length===0||(t===void 0||n.length<t.length)&&(t=n);return t}async function fetchProductionAlias(t,n,r){let i=await captureVercel([`api`,`/v9/projects/${t}?teamId=${n}`,`--scope`,n],{cwd:r});if(i.ok)try{let e=pickShortestAlias(JSON.parse(i.stdout).targets?.production?.alias);return e?`https://${e}`:void 0}catch{return}}async function detectDeployment(e){let r;try{r=await readFile(join(e,`.vercel`,`project.json`),`utf8`)}catch{return{state:`unlinked`}}let i;try{i=JSON.parse(r)}catch{return{state:`unlinked`}}let a=typeof i.projectId==`string`?i.projectId:void 0,o=typeof i.orgId==`string`?i.orgId:void 0;if(!a||!o)return{state:`unlinked`};let s=await fetchProductionAlias(a,o,e);return{state:s?`deployed`:`linked`,projectId:a,orgId:o,productionUrl:s}}async function fetchVercelName(t,n,r){let i=await captureVercel([`api`,t,`--scope`,n],{cwd:r});if(i.ok)try{let e=JSON.parse(i.stdout);return typeof e.name==`string`&&e.name.length>0?e.name:typeof e.slug==`string`&&e.slug.length>0?e.slug:void 0}catch{return}}async function detectProjectIdentity(e){let r;try{r=await readFile(join(e,`.vercel`,`project.json`),`utf8`)}catch{return}let i;try{i=JSON.parse(r)}catch{return}let a=typeof i.projectId==`string`?i.projectId:void 0,o=typeof i.orgId==`string`?i.orgId:void 0;if(!a||!o)return;let[s,c]=await Promise.all([fetchVercelName(`/v9/projects/${a}?teamId=${o}`,o,e).then(e=>e??a),o.startsWith(`team_`)?fetchVercelName(`/v2/teams/${o}`,o,e):Promise.resolve(void 0)]);return{projectName:s,teamName:c}}function projectResolutionFromDeployment(e){return e.state===`unlinked`||e.projectId===void 0?{kind:`unresolved`}:e.state===`deployed`&&e.productionUrl!==void 0?{kind:`deployed`,projectId:e.projectId,productionUrl:e.productionUrl}:{kind:`linked`,projectId:e.projectId}}async function detectProjectResolution(e){return projectResolutionFromDeployment(await detectDeployment(e))}function mergeProjectResolution(e,t){return t.kind===`unresolved`||e.kind===`deployed`&&e.projectId===t.projectId?e:t}function projectResolutionFromDeployResult(e,t){return e.kind===`unresolved`||!t.deployed||t.productionUrl===void 0?e:{kind:`deployed`,projectId:e.projectId,productionUrl:t.productionUrl}}function isProjectResolved(e){return e.kind!==`unresolved`}function projectProductionUrlFromResolution(e){return e.kind===`deployed`?e.productionUrl:void 0}export{detectDeployment,detectProjectIdentity,detectProjectResolution,isProjectResolved,mergeProjectResolution,projectProductionUrlFromResolution,projectResolutionFromDeployResult,projectResolutionFromDeployment};
@@ -1,4 +1,4 @@
1
- import { type RailSpinner } from "#setup/scaffold/cli/index.js";
1
+ import { type RailSpinner } from "#setup/cli/index.js";
2
2
  /**
3
3
  * Clack constrains option values to readonly primitives. Our scaffold flow
4
4
  * only ever uses string-valued options (`ChannelKind`, `SetupMode`,
@@ -25,6 +25,22 @@ export interface SelectOption<T extends PrompterValue> {
25
25
  locked?: boolean;
26
26
  /** Parenthetical shown after a locked option's label, e.g. "always available". */
27
27
  lockedReason?: string;
28
+ /**
29
+ * A leading run of featured options forms a searchable picker's default
30
+ * viewport: with no filter typed, only they are in view, and scrolling or
31
+ * filtering reaches the rest of the list. Featured options must be sorted
32
+ * to the front. Meaningless without `search`.
33
+ */
34
+ featured?: boolean;
35
+ }
36
+ /**
37
+ * An outcome line from an earlier lap of a looping menu, shown with the
38
+ * repainted question: the TUI panel renders it beneath the options, the CLI
39
+ * prints it to scrollback before the prompt.
40
+ */
41
+ export interface SelectNotice {
42
+ tone: "success" | "info" | "warning";
43
+ text: string;
28
44
  }
29
45
  /** Options common to every {@link Prompter.select} call. */
30
46
  export interface SelectCommonOptions<T extends PrompterValue> {
@@ -43,6 +59,15 @@ export interface SelectCommonOptions<T extends PrompterValue> {
43
59
  * so it is inherently satisfied.
44
60
  */
45
61
  required?: boolean;
62
+ /**
63
+ * "stacked" renders each option's hint on its own line below the label with
64
+ * a blank line between options — for small action menus whose hints carry
65
+ * current values. A TUI-panel affordance: the CLI prompter keeps its inline
66
+ * hint rendering.
67
+ */
68
+ layout?: "stacked";
69
+ /** Outcome lines from earlier laps of a looping menu. */
70
+ notices?: readonly SelectNotice[];
46
71
  }
47
72
  /** Single-select form: navigate, then enter picks the highlighted option. */
48
73
  export interface SingleSelectOptions<T extends PrompterValue> extends SelectCommonOptions<T> {
@@ -50,12 +75,19 @@ export interface SingleSelectOptions<T extends PrompterValue> extends SelectComm
50
75
  /** Pre-position the cursor on the option whose value matches. */
51
76
  initialValue?: T;
52
77
  }
53
- /** Multi-select form: space toggles rows, enter confirms the marked set. */
78
+ /** Multi-select form: space or enter toggles rows; enter on the trailing Submit row confirms the marked set. */
54
79
  export interface MultiSelectOptions<T extends PrompterValue> extends SelectCommonOptions<T> {
55
80
  multiple: true;
56
81
  /** Pre-mark these values as selected. */
57
82
  initialValues?: T[];
58
83
  }
84
+ /** Color intent for {@link Prompter.note}: red warning (default) or green success. */
85
+ export type NoteTone = "warning" | "success";
86
+ /** Input for {@link Prompter.acknowledge}: a heading plus optional body lines. */
87
+ export interface AcknowledgeOptions {
88
+ message: string;
89
+ lines?: readonly string[];
90
+ }
59
91
  export interface Prompter {
60
92
  text(opts: {
61
93
  message: string;
@@ -69,13 +101,29 @@ export interface Prompter {
69
101
  }): Promise<string>;
70
102
  /**
71
103
  * Unified picker. Defaults to single-select (enter picks the highlighted row);
72
- * pass `multiple: true` for a checklist (space toggles, enter confirms). Add
104
+ * pass `multiple: true` for a checklist (space or enter toggles, enter on
105
+ * the trailing Submit row confirms). Add
73
106
  * `search: true` for a type-ahead filter. `required` gates an empty
74
107
  * multi-select submission.
75
108
  */
76
109
  select<T extends PrompterValue>(opts: SingleSelectOptions<T>): Promise<T>;
77
110
  select<T extends PrompterValue>(opts: MultiSelectOptions<T>): Promise<T[]>;
78
- note(message: string, title?: string): void;
111
+ /**
112
+ * Static instructions the user dismisses before the flow moves on. The TUI
113
+ * renders them in the question slot of the flow panel (the text takes the
114
+ * place of option rows) until enter; the CLI prints them to scrollback and
115
+ * resolves immediately, since printed text persists there. Optional so
116
+ * lightweight test fakes can omit it — flows fall back to {@link note}.
117
+ */
118
+ acknowledge?(opts: AcknowledgeOptions): Promise<void>;
119
+ /**
120
+ * Rail-attached notice, no bullet — reads as a follow-up to the previous
121
+ * step. Red by default (warnings, collisions); pass `tone: "success"` for a
122
+ * green closing note like the one-shot next steps.
123
+ */
124
+ note(message: string, title?: string, options?: {
125
+ tone?: NoteTone;
126
+ }): void;
79
127
  /** Prints the Vercel ▲ logo + title + subtitle banner. */
80
128
  intro(title: string, subtitle?: string): void;
81
129
  /** Prints a final green ● end-cap with the message. */
@@ -1 +1 @@
1
- import{__toESM}from"../_virtual/_rolldown/runtime.js";import{WizardCancelledError}from"./step.js";import{h,ht,q}from"../node_modules/.pnpm/@clack_core@1.3.1/node_modules/@clack/core/dist/index.js";import{require_picocolors}from"../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js";import{initialQuitGuardState,quitHintNote,reduceQuitGuard}from"./quit-guard.js";import{cornerFor,createRailLog,formatPromptCancellation,formatPromptHeader,formatPromptOpener,formatPromptOutro,formatPromptSubmission,formatRailLine,railFor,runSelectComponent}from"#setup/scaffold/cli/index.js";var import_picocolors=__toESM(require_picocolors(),1);function guardCancel(e){if(q(e))throw process.stdout.write(formatPromptCancellation(`Setup cancelled.`,import_picocolors.default)),new WizardCancelledError;return e}let escapeCancelDisabled=!1;function disableEscapeCancel(){escapeCancelDisabled||=(h.aliases.delete(`escape`),!0)}function attachQuitGuard(e){let t=initialQuitGuardState;return e.on(`key`,(n,r)=>{let{state:i,action:a}=reduceQuitGuard(t,r?.name===`escape`?{type:`escape`}:{type:`other-key`});t=i,a===`quit`&&(e.state=`cancel`)}),{note:()=>quitHintNote(t,import_picocolors.default)}}function toPromptState(e){return e}function railForState(e){return railFor(toPromptState(e),import_picocolors.default)}function cornerForState(e){return cornerFor(toPromptState(e),import_picocolors.default)}function header(e,t,n){return formatPromptHeader(toPromptState(e),t,{colors:import_picocolors.default,leadingRail:n===0?`white`:`green`})}const REDACTED_DISPLAY=`••••••••`;function textPrompt(e,t){let n,i=new ht({validate:t.validate?e=>t.validate?.(e??``):void 0,placeholder:t.placeholder,defaultValue:t.defaultValue,render(){let r=header(this.state,t.message,e),i=t.placeholder?import_picocolors.default.inverse(t.placeholder[0])+import_picocolors.default.dim(t.placeholder.slice(1)):import_picocolors.default.inverse(import_picocolors.default.hidden(`_`)),a=this.value?`•`.repeat(this.value.length):i,o=t.mask?a:this.value?this.userInputWithCursor:i;switch(this.state){case`error`:return`${r.trim()}\n${railForState(this.state)} ${o}\n${cornerForState(this.state)} ${import_picocolors.default.red(this.error)}\n`;case`submit`:{let n=t.mask?this.value?REDACTED_DISPLAY:t.placeholder||``:this.value||t.placeholder||``;return formatPromptSubmission(this.state,t.message,n,{colors:import_picocolors.default,leadingRail:e===0?`white`:`green`})}case`cancel`:return`${r}${railForState(this.state)} ${import_picocolors.default.strikethrough(import_picocolors.default.dim(t.mask&&this.value?REDACTED_DISPLAY:this.value??``))}${this.value?.trim()?`\n${railForState(this.state)}`:``}`;default:return`${r}${railForState(this.state)} ${o}\n${cornerForState(this.state)}${cornerNote(n?.note())}\n`}}});return n=attachQuitGuard(i),i.prompt()}function cornerNote(e){return e?` ${e}`:``}function createPrompter(){disableEscapeCancel();let e=0,t=createRailLog({colors:import_picocolors.default,output:process.stdout});return{async text(n){t.settle();let r=guardCancel(await textPrompt(e,n));return e+=1,r??``},async password(n){t.settle();let r=guardCancel(await textPrompt(e,{message:n.message,mask:!0,validate:n.validate}));return e+=1,r??``},async select(n){t.settle();let r=guardCancel(await runSelectComponent({message:n.message,options:n.options,multiple:n.multiple===!0,search:n.search??!1,required:n.required??!1,placeholder:n.placeholder,defaultValue:n.multiple===!0?void 0:n.initialValue,initialValues:n.multiple===!0?n.initialValues:void 0,leadingRail:e===0?`white`:`green`,attachGuard:e=>attachQuitGuard(e)}));return e+=1,r},note(e,n){t.settle(),n&&process.stdout.write(formatRailLine(import_picocolors.default.red(import_picocolors.default.bold(n)),import_picocolors.default,process.stdout)),process.stdout.write(formatRailLine(import_picocolors.default.red(e),import_picocolors.default,process.stdout))},intro(e,n=`Eve by Vercel: like Next.js, but for agents.`){t.settle(),process.stdout.write(formatPromptOpener(e,n,import_picocolors.default))},outro(e){t.settle(),process.stdout.write(formatPromptOutro(e,import_picocolors.default))},log:t}}export{createPrompter};
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{h,ht,q}from"../node_modules/.pnpm/@clack_core@1.3.1/node_modules/@clack/core/dist/index.js";import{WizardCancelledError}from"./step.js";import{initialQuitGuardState,quitHintNote,reduceQuitGuard}from"./quit-guard.js";import{cornerFor,createRailLog,formatPromptCancellation,formatPromptHeader,formatPromptOpener,formatPromptOutro,formatPromptSubmission,formatRailLine,railFor,runSelectComponent}from"#setup/cli/index.js";var import_picocolors=__toESM(require_picocolors(),1);function guardCancel(e){if(q(e))throw process.stdout.write(formatPromptCancellation(`Setup cancelled.`,import_picocolors.default)),new WizardCancelledError;return e}let escapeCancelDisabled=!1;function disableEscapeCancel(){escapeCancelDisabled||=(h.aliases.delete(`escape`),!0)}function attachQuitGuard(e){let t=initialQuitGuardState;return e.on(`key`,(n,r)=>{let{state:i,action:a}=reduceQuitGuard(t,r?.name===`escape`?{type:`escape`}:{type:`other-key`});t=i,a===`quit`&&(e.state=`cancel`)}),{note:()=>quitHintNote(t,import_picocolors.default)}}function toPromptState(e){return e}function railForState(e){return railFor(toPromptState(e),import_picocolors.default)}function cornerForState(e){return cornerFor(toPromptState(e),import_picocolors.default)}function header(e,t,n){return formatPromptHeader(toPromptState(e),t,{colors:import_picocolors.default,leadingRail:n===0?`white`:`green`})}const REDACTED_DISPLAY=`••••••••`;function textPrompt(e,t){let n,i=new ht({validate:t.validate?e=>t.validate?.(e??``):void 0,placeholder:t.placeholder,defaultValue:t.defaultValue,render(){let r=header(this.state,t.message,e),i=t.placeholder?import_picocolors.default.inverse(t.placeholder[0])+import_picocolors.default.dim(t.placeholder.slice(1)):import_picocolors.default.inverse(import_picocolors.default.hidden(`_`)),a=this.value?`•`.repeat(this.value.length):i,o=t.mask?a:this.value?this.userInputWithCursor:i;switch(this.state){case`error`:return`${r.trim()}\n${railForState(this.state)} ${o}\n${cornerForState(this.state)} ${import_picocolors.default.red(this.error)}\n`;case`submit`:{let n=t.mask?this.value?REDACTED_DISPLAY:t.placeholder||``:this.value||t.placeholder||``;return formatPromptSubmission(this.state,t.message,n,{colors:import_picocolors.default,leadingRail:e===0?`white`:`green`})}case`cancel`:return`${r}${railForState(this.state)} ${import_picocolors.default.strikethrough(import_picocolors.default.dim(t.mask&&this.value?REDACTED_DISPLAY:this.value??``))}${this.value?.trim()?`\n${railForState(this.state)}`:``}`;default:return`${r}${railForState(this.state)} ${o}\n${cornerForState(this.state)}${cornerNote(n?.note())}\n`}}});return n=attachQuitGuard(i),i.prompt()}function cornerNote(e){return e?` ${e}`:``}function createPrompter(){disableEscapeCancel();let e=0,t=createRailLog({colors:import_picocolors.default,output:process.stdout});return{async text(n){t.settle();let r=guardCancel(await textPrompt(e,n));return e+=1,r??``},async password(n){t.settle();let r=guardCancel(await textPrompt(e,{message:n.message,mask:!0,validate:n.validate}));return e+=1,r??``},async select(n){t.settle();for(let e of n.notices??[])e.tone===`success`?t.success(e.text):e.tone===`warning`?t.warning(e.text):t.message(e.text);let r=guardCancel(await runSelectComponent({message:n.message,options:n.options,multiple:n.multiple===!0,search:n.search??!1,required:n.required??!1,placeholder:n.placeholder,defaultValue:n.multiple===!0?void 0:n.initialValue,initialValues:n.multiple===!0?n.initialValues:void 0,leadingRail:e===0?`white`:`green`,attachGuard:e=>attachQuitGuard(e)}));return e+=1,r},async acknowledge(e){t.settle(),process.stdout.write(formatRailLine(import_picocolors.default.bold(e.message),import_picocolors.default,process.stdout));for(let t of e.lines??[])process.stdout.write(formatRailLine(import_picocolors.default.dim(t),import_picocolors.default,process.stdout))},note(e,n,r){t.settle();let i=r?.tone===`success`?import_picocolors.default.green:import_picocolors.default.red;n&&process.stdout.write(formatRailLine(i(import_picocolors.default.bold(n)),import_picocolors.default,process.stdout)),process.stdout.write(formatRailLine(i(e),import_picocolors.default,process.stdout))},intro(e,n=`Production-grade agent framework.`){t.settle(),process.stdout.write(formatPromptOpener(e,n,import_picocolors.default))},outro(e){t.settle(),process.stdout.write(formatPromptOutro(e,import_picocolors.default))},log:t}}export{createPrompter};
@@ -1,4 +1,4 @@
1
- import type { PromptColors } from "#setup/scaffold/cli/index.js";
1
+ import type { PromptColors } from "#setup/cli/index.js";
2
2
  /**
3
3
  * Two-stage Escape-to-quit state for an interactive prompt.
4
4
  *
@@ -1,4 +1,4 @@
1
- import { type RunVercelOptions } from "#setup/scaffold/primitives/index.js";
1
+ import { type RunVercelOptions } from "#setup/primitives/index.js";
2
2
  type VercelOutputHandler = NonNullable<RunVercelOptions["onOutput"]>;
3
3
  /**
4
4
  * Runs `vercel env pull --yes` inside a linked project so `.env.local`
@@ -1 +1 @@
1
- import{runVercel}from"#setup/scaffold/primitives/index.js";async function runVercelEnvPull(e,t){return runVercel([`env`,`pull`,`--yes`],{cwd:e,onOutput:t})}export{runVercelEnvPull};
1
+ import{runVercel}from"#setup/primitives/index.js";async function runVercelEnvPull(e,t){return runVercel([`env`,`pull`,`--yes`],{cwd:e,onOutput:t})}export{runVercelEnvPull};
@@ -36,14 +36,15 @@ export interface RunnerOptions<State> {
36
36
  /**
37
37
  * Linear interactive runner: walk the boxes in order, prompting for each. A box
38
38
  * whose `perform` throws a {@link RetryableSetupError} is re-gathered with the
39
- * prior input as the default; a cancel (returned as an outcome, or thrown by a
40
- * prompter) ends the whole run. There is no back navigation: side effects are
41
- * not undone by restoring in-memory state.
39
+ * prior input as the default; a cancel (a {@link WizardCancelledError} thrown
40
+ * by a prompter) ends the whole run. There is no back navigation: side effects
41
+ * are not undone by restoring in-memory state.
42
42
  */
43
43
  export declare function runInteractive<State>(boxes: readonly AnySetupBox<State>[], initialState: State, sink: OutputSink, options?: RunnerOptions<State>): Promise<RunResult<State>>;
44
44
  /**
45
45
  * Non-interactive runner: derive each box's input from its options and apply
46
46
  * it. No retry loop and no prompts; a box that cannot proceed without a human
47
- * is expected to throw from `gatherHeadless`/`perform`.
47
+ * is expected to throw from its gather (a unified box's headless-based asker
48
+ * refuses required questions with `InteractionRequired`) or from `perform`.
48
49
  */
49
50
  export declare function runHeadless<State>(boxes: readonly AnySetupBox<State>[], initialState: State, sink: OutputSink, options?: RunnerOptions<State>): Promise<State>;
@@ -1 +1 @@
1
- import{WizardCancelledError}from"./step.js";import{ChannelAddCancelledError}from"#setup/scaffold/cli/index.js";function isCancellation(n){return n instanceof WizardCancelledError||n instanceof ChannelAddCancelledError}var RetryableSetupError=class extends Error{constructor(e,t){super(e,t),this.name=`RetryableSetupError`}};function isRetryable(e){return e instanceof RetryableSetupError}async function runInteractive(e,t,n,r){let i=t,view=()=>r?.snapshot?r.snapshot(i):i,a={};try{for(let t of e)if(t.shouldRun?.(view())!==!1)for(;;){let e=await t.gatherInteractive({state:view(),initial:a[t.id]});if(e.kind===`cancelled`)return{kind:`cancelled`};a[t.id]=e.input;try{let r=await t.perform({state:view(),input:e.input,sink:n});i=t.apply(i,r);break}catch(e){if(!isRetryable(e))throw e;n.write(e instanceof Error?e.message:String(e))}}}catch(e){if(isCancellation(e))return{kind:`cancelled`};throw e}return{kind:`done`,state:i}}async function runHeadless(e,t,n,r){let i=t,view=()=>r?.snapshot?r.snapshot(i):i;for(let t of e){if(t.shouldRun?.(view())===!1)continue;let e=await t.gatherHeadless({state:view()}),r=await t.perform({state:view(),input:e,sink:n});i=t.apply(i,r)}return i}export{RetryableSetupError,runHeadless,runInteractive};
1
+ import{WizardCancelledError}from"./step.js";function isCancellation(t){return t instanceof WizardCancelledError}var RetryableSetupError=class extends Error{constructor(e,t){super(e,t),this.name=`RetryableSetupError`}};function isRetryable(e){return e instanceof RetryableSetupError}async function runInteractive(e,t,n,r){let i=t,view=()=>r?.snapshot?r.snapshot(i):i,a={};try{for(let t of e)if(t.shouldRun?.(view())!==!1)for(;;){let e=await t.gather({state:view(),initial:a[t.id]});a[t.id]=e;try{let r=await t.perform({state:view(),input:e,sink:n});i=t.apply(i,r);break}catch(e){if(!isRetryable(e))throw e;n.write(e instanceof Error?e.message:String(e))}}}catch(e){if(isCancellation(e))return{kind:`cancelled`};throw e}return{kind:`done`,state:i}}async function runHeadless(e,t,n,r){let i=t,view=()=>r?.snapshot?r.snapshot(i):i;for(let t of e){if(t.shouldRun?.(view())===!1)continue;let e=await t.gather({state:view()}),r=await t.perform({state:view(),input:e,sink:n});i=t.apply(i,r)}return i}export{RetryableSetupError,runHeadless,runInteractive};
@@ -1,6 +1,6 @@
1
1
  /**
2
- * Build-time catalog of the channels the onboarding CLI can scaffold. It drives
3
- * the `Select channels` picker shown during create and `eve channels add`.
2
+ * Build-time catalog of channels used by programmatic setup and
3
+ * `eve channels add`.
4
4
  *
5
5
  * Channel *identity* (slug, name, and whether it is scaffoldable) is owned by
6
6
  * `@vercel/eve-catalog`, the cross-surface source of truth shared with the docs
@@ -9,7 +9,7 @@
9
9
  * as `web`), the picker copy, and the picker order — and validates that the
10
10
  * overlay and the catalog cannot drift apart.
11
11
  */
12
- import type { ChannelKind } from "./channels.js";
12
+ import type { ChannelKind } from "./update/channels.js";
13
13
  /** A catalog channel the CLI can scaffold, paired with its picker presentation. */
14
14
  export interface ScaffoldableChannel {
15
15
  /** Catalog slug. */
@@ -1 +1 @@
1
- import{channelEntries}from"../../packages/eve-catalog/src/index.js";const CHANNEL_SCAFFOLDS=[{slug:`eve`,kind:`web`,label:`Web Chat`},{slug:`slack`,kind:`slack`,label:`Slack`,hint:`creates slackbot and deploys to Vercel`}];function buildScaffoldableChannels(){let n=new Set(channelEntries().filter(e=>e.surfaces.scaffoldable).map(e=>e.slug)),r=[];for(let e of CHANNEL_SCAFFOLDS){if(!n.delete(e.slug))throw Error(`Channel overlay "${e.slug}" is not a scaffoldable channel in @vercel/eve-catalog.`);let t={slug:e.slug,kind:e.kind,label:e.label};e.hint!==void 0&&(t.hint=e.hint),r.push(t)}if(n.size>0){let e=[...n].sort().join(`, `);throw Error(`Scaffoldable catalog channels missing a scaffolder overlay: ${e}.`)}return r}const SCAFFOLDABLE_CHANNELS=buildScaffoldableChannels();export{SCAFFOLDABLE_CHANNELS};
1
+ import{channelEntries}from"../../packages/eve-catalog/src/index.js";const CHANNEL_SCAFFOLDS=[{slug:`eve`,kind:`web`,label:`Web Chat`,hint:`Next.js app`},{slug:`slack`,kind:`slack`,label:`Slack`,hint:`creates slackbot and deploys to Vercel`}];function buildScaffoldableChannels(){let n=new Set(channelEntries().filter(e=>e.surfaces.scaffoldable).map(e=>e.slug)),r=[];for(let e of CHANNEL_SCAFFOLDS){if(!n.delete(e.slug))throw Error(`Channel overlay "${e.slug}" is not a scaffoldable channel in @vercel/eve-catalog.`);let t={slug:e.slug,kind:e.kind,label:e.label};e.hint!==void 0&&(t.hint=e.hint),r.push(t)}if(n.size>0){let e=[...n].sort().join(`, `);throw Error(`Scaffoldable catalog channels missing a scaffolder overlay: ${e}.`)}return r}const SCAFFOLDABLE_CHANNELS=buildScaffoldableChannels();export{SCAFFOLDABLE_CHANNELS};
@@ -0,0 +1,26 @@
1
+ import type { PackageManagerKind } from "../../package-manager.js";
2
+ export interface AddAgentToProjectOptions {
3
+ projectRoot: string;
4
+ model: string;
5
+ /**
6
+ * The host project's package manager, which owns any manager-specific
7
+ * generated project configuration. Defaults to pnpm.
8
+ */
9
+ packageManager?: PackageManagerKind;
10
+ evePackageVersion?: string;
11
+ aiPackageVersion?: string;
12
+ zodPackageVersion?: string;
13
+ }
14
+ export interface AddAgentToProjectResult {
15
+ filesWritten: string[];
16
+ /** Dependencies added to package.json; ones the project already declares anywhere are left untouched. */
17
+ dependenciesAdded: string[];
18
+ }
19
+ /**
20
+ * Adds an Eve agent to an existing package: writes the `agent/` files, adds
21
+ * the runtime dependencies the project does not already declare, and applies
22
+ * the selected package manager's project configuration. The host project owns
23
+ * everything else (tsconfig, scripts, ignore files), so this mode never
24
+ * touches it. All conflicts are gathered and reported before anything is written.
25
+ */
26
+ export declare function addAgentToProject(options: AddAgentToProjectOptions): Promise<AddAgentToProjectResult>;
@@ -0,0 +1 @@
1
+ import{getPackageManagerStrategy}from"../../primitives/pm/index.js";import{pathExists,writeTextFile}from"../files.js";import{patchPackageJson}from"../update/package-json.js";import{resolveVersionToken}from"../version-tokens.js";import{agentTemplateFiles,formatEveDependencySpecifier}from"./project.js";import{join}from"node:path";import{readFile}from"node:fs/promises";const DEPENDENCY_FIELDS=[`dependencies`,`devDependencies`,`optionalDependencies`,`peerDependencies`];function isJsonObject(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function hasDeclaredDependency(e,t){if(!isJsonObject(e))return!1;for(let n of DEPENDENCY_FIELDS){let r=e[n];if(isJsonObject(r)&&typeof r[t]==`string`)return!0}return!1}async function addAgentToProject(i){let a=join(i.projectRoot,`package.json`);if(!await pathExists(a))throw Error(`Cannot add an Eve agent to "${i.projectRoot}" because it has no package.json. Run \`eve init <name>\` to create a new project instead.`);let o=agentTemplateFiles(i.model),s=[];for(let e of Object.keys(o))await pathExists(join(i.projectRoot,e))&&s.push(e);if(s.length===0&&await pathExists(join(i.projectRoot,`agent`))&&s.push(`agent/`),s.length>0)throw Error(`Cannot add an Eve agent to "${i.projectRoot}" because it already has: ${s.join(`, `)}. Move them aside first.`);let c=resolveVersionToken(`evePackageVersion`,i.evePackageVersion??`0.7.0`),l=resolveVersionToken(`aiPackageVersion`,i.aiPackageVersion??`7.0.0-canary.171`),u=resolveVersionToken(`zodPackageVersion`,i.zodPackageVersion??`4.4.3`),d=[];for(let[e,t]of Object.entries(o)){let r=join(i.projectRoot,e);await writeTextFile(r,t),d.push(r)}let f=JSON.parse(await readFile(a,`utf8`)),p={ai:l,eve:formatEveDependencySpecifier(c),zod:u},m={};for(let[e,t]of Object.entries(p))hasDeclaredDependency(f,e)||(m[e]=t);return Object.keys(m).length>0&&await patchPackageJson(a,{dependencies:m}),await getPackageManagerStrategy(i.packageManager??`pnpm`).applyProjectConfiguration(i.projectRoot),{filesWritten:d,dependenciesAdded:Object.keys(m).sort()}}export{addAgentToProject};
@@ -0,0 +1,54 @@
1
+ import type { PackageManagerKind } from "../../package-manager.js";
2
+ export declare const CURRENT_DIRECTORY_PROJECT_NAME = ".";
3
+ export declare const DEFAULT_EVE_PACKAGE_VERSION = "__EVE_PACKAGE_VERSION__";
4
+ export declare const DEFAULT_AI_PACKAGE_VERSION = "__AI_SDK_VERSION__";
5
+ export declare const DEFAULT_ZOD_PACKAGE_VERSION = "__ZOD_VERSION__";
6
+ /**
7
+ * Provider slug a gateway model id routes through: the segment before the
8
+ * first "/" (e.g. `anthropic/claude-sonnet-4.6` → `anthropic`). The slug is
9
+ * injected into generated source, so characters outside the catalog's slug
10
+ * alphabet are dropped; an id without a usable prefix falls back to
11
+ * `anthropic`.
12
+ */
13
+ export declare function modelProviderSlug(modelId: string): string;
14
+ /**
15
+ * Env var the byok scaffold reads the provider API key from, derived from the
16
+ * model's provider slug (e.g. `anthropic/...` → `ANTHROPIC_API_KEY`). The name
17
+ * is the scaffold's convention: the key is passed to the gateway `byok` block
18
+ * explicitly, so users can rename it freely. Non-alphanumerics fold to `_`
19
+ * and a leading digit is prefixed, keeping `process.env.<name>` valid source.
20
+ */
21
+ export declare function byokProviderEnvVar(modelId: string): string;
22
+ /**
23
+ * The files that define the agent itself, rendered for `model`. This is the
24
+ * subset `eve init` writes when adding an agent to an existing project, where
25
+ * everything outside `agent/` belongs to the host app.
26
+ */
27
+ export declare function agentTemplateFiles(model: string): Record<string, string>;
28
+ export declare function formatEveDependencySpecifier(versionOrSpecifier: string): string;
29
+ export interface ScaffoldBaseProjectOptions {
30
+ projectName: string;
31
+ model: string;
32
+ /**
33
+ * The manager that owns command execution and manager-specific generated
34
+ * project files for this scaffold.
35
+ * Defaults to pnpm.
36
+ */
37
+ packageManager?: PackageManagerKind;
38
+ targetDirectory?: string;
39
+ overwriteExisting?: boolean;
40
+ onOverwriteFile?: (filePath: string) => void | Promise<void>;
41
+ evePackageVersion?: string;
42
+ aiPackageVersion?: string;
43
+ zodPackageVersion?: string;
44
+ tsgoPackageVersion?: string;
45
+ typesNodePackageVersion?: string;
46
+ /**
47
+ * Scaffold an inline provider `byok` block in `agent.ts` that reads the
48
+ * provider key from `process.env` instead of relying on the managed Vercel
49
+ * AI Gateway. Adds `@types/node` to the project so `process` is typed.
50
+ */
51
+ byokProvider?: boolean;
52
+ }
53
+ export declare function scaffoldBaseProject(options: ScaffoldBaseProjectOptions): Promise<string>;
54
+ export declare function isEveProject(projectRoot: string): Promise<boolean>;