eve 0.6.0-beta.9 → 0.7.2

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 (650) hide show
  1. package/CHANGELOG.md +281 -0
  2. package/README.md +9 -6
  3. package/dist/docs/public/README.md +17 -12
  4. package/dist/docs/public/agent-config.md +10 -10
  5. package/dist/docs/public/channels/custom.mdx +4 -4
  6. package/dist/docs/public/channels/discord.mdx +1 -1
  7. package/dist/docs/public/channels/eve.mdx +10 -10
  8. package/dist/docs/public/channels/github.mdx +1 -1
  9. package/dist/docs/public/channels/overview.mdx +21 -15
  10. package/dist/docs/public/channels/slack.mdx +16 -4
  11. package/dist/docs/public/channels/teams.mdx +1 -1
  12. package/dist/docs/public/channels/telegram.mdx +1 -1
  13. package/dist/docs/public/channels/twilio.mdx +1 -1
  14. package/dist/docs/public/{advanced → concepts}/context-control.md +3 -3
  15. package/dist/docs/public/{advanced → concepts}/default-harness.md +5 -5
  16. package/dist/docs/public/{advanced → concepts}/execution-model-and-durability.md +3 -1
  17. package/dist/docs/public/concepts/meta.json +10 -0
  18. package/dist/docs/public/{advanced → concepts}/security-model.md +3 -3
  19. package/dist/docs/public/{advanced → concepts}/sessions-runs-and-streaming.md +7 -7
  20. package/dist/docs/public/connections.mdx +6 -4
  21. package/dist/docs/public/evals/assertions.mdx +108 -0
  22. package/dist/docs/public/evals/cases.mdx +143 -0
  23. package/dist/docs/public/evals/judge.mdx +94 -0
  24. package/dist/docs/public/evals/meta.json +4 -0
  25. package/dist/docs/public/evals/overview.mdx +118 -0
  26. package/dist/docs/public/evals/reporters.mdx +62 -0
  27. package/dist/docs/public/evals/running.mdx +63 -0
  28. package/dist/docs/public/evals/targets.mdx +54 -0
  29. package/dist/docs/public/getting-started.mdx +38 -33
  30. package/dist/docs/public/{advanced → guides}/auth-and-route-protection.md +5 -3
  31. package/dist/docs/public/{client → guides/client}/continuations.mdx +2 -2
  32. package/dist/docs/public/{client → guides/client}/messages.mdx +1 -1
  33. package/dist/docs/public/{client → guides/client}/meta.json +1 -1
  34. package/dist/docs/public/{client → guides/client}/output-schema.mdx +2 -2
  35. package/dist/docs/public/{client → guides/client}/overview.mdx +5 -5
  36. package/dist/docs/public/{client → guides/client}/streaming.mdx +1 -1
  37. package/dist/docs/public/{advanced → guides}/deployment.md +9 -1
  38. package/dist/docs/public/guides/dev-tui.md +50 -0
  39. package/dist/docs/public/{advanced → guides}/dynamic-capabilities.md +1 -1
  40. package/dist/docs/public/{advanced → guides}/dynamic-workflows.md +1 -1
  41. package/dist/docs/public/{frontend → guides/frontend}/nextjs.mdx +16 -7
  42. package/dist/docs/public/{frontend → guides/frontend}/nuxt.mdx +7 -7
  43. package/dist/docs/public/{frontend → guides/frontend}/overview.mdx +6 -6
  44. package/dist/docs/public/{frontend → guides/frontend}/sveltekit.mdx +5 -5
  45. package/dist/docs/public/{frontend → guides/frontend}/use-eve-agent-svelte.mdx +2 -2
  46. package/dist/docs/public/{frontend → guides/frontend}/use-eve-agent-vue.mdx +2 -2
  47. package/dist/docs/public/{advanced → guides}/hooks.md +2 -2
  48. package/dist/docs/public/{advanced → guides}/instrumentation.md +3 -1
  49. package/dist/docs/public/{advanced → guides}/meta.json +8 -12
  50. package/dist/docs/public/{advanced → guides}/session-context.md +3 -3
  51. package/dist/docs/public/{advanced → guides}/state.md +1 -1
  52. package/dist/docs/public/instructions.mdx +2 -2
  53. package/dist/docs/public/introduction.md +5 -2
  54. package/dist/docs/public/meta.json +4 -3
  55. package/dist/docs/public/reference/cli.md +35 -19
  56. package/dist/docs/public/reference/meta.json +1 -1
  57. package/dist/docs/public/reference/project-layout.md +5 -1
  58. package/dist/docs/public/reference/typescript-api.md +27 -23
  59. package/dist/docs/public/sandbox.mdx +1 -1
  60. package/dist/docs/public/schedules.mdx +2 -2
  61. package/dist/docs/public/skills.mdx +3 -3
  62. package/dist/docs/public/subagents.mdx +3 -3
  63. package/dist/docs/public/tools.mdx +4 -8
  64. package/dist/docs/public/tutorial/connect-a-warehouse.mdx +3 -3
  65. package/dist/docs/public/tutorial/first-agent.mdx +6 -3
  66. package/dist/docs/public/tutorial/guard-the-spend.mdx +1 -1
  67. package/dist/docs/public/tutorial/how-it-runs.mdx +2 -2
  68. package/dist/docs/public/tutorial/meta.json +1 -1
  69. package/dist/docs/public/tutorial/query-sample-data.mdx +1 -1
  70. package/dist/docs/public/tutorial/remember-definitions.mdx +3 -3
  71. package/dist/docs/public/tutorial/run-analysis.mdx +1 -1
  72. package/dist/docs/public/tutorial/ship-it.mdx +4 -4
  73. package/dist/docs/public/tutorial/team-playbooks.mdx +3 -3
  74. package/dist/src/chunks/{use-eve-agent-DCZbkLG7.js → use-eve-agent-DErQj5hs.js} +125 -37
  75. package/dist/src/chunks/{use-eve-agent-DoheC4_o.js → use-eve-agent-DoR8C4i6.js} +125 -37
  76. package/dist/src/cli/banner.d.ts +7 -0
  77. package/dist/src/cli/banner.js +1 -0
  78. package/dist/src/cli/commands/channel-add-conflicts.d.ts +1 -1
  79. package/dist/src/cli/commands/channels.d.ts +9 -6
  80. package/dist/src/cli/commands/channels.js +1 -1
  81. package/dist/src/cli/commands/deploy.d.ts +21 -0
  82. package/dist/src/cli/commands/deploy.js +1 -0
  83. package/dist/src/cli/commands/init-git.d.ts +15 -0
  84. package/dist/src/cli/commands/init-git.js +1 -0
  85. package/dist/src/cli/commands/init.d.ts +29 -0
  86. package/dist/src/cli/commands/init.js +1 -0
  87. package/dist/src/cli/commands/link.d.ts +21 -0
  88. package/dist/src/cli/commands/link.js +1 -0
  89. package/dist/src/cli/commands/preconditions.d.ts +7 -0
  90. package/dist/src/cli/commands/preconditions.js +1 -0
  91. package/dist/src/cli/commands/register-project-commands.d.ts +12 -0
  92. package/dist/src/cli/commands/register-project-commands.js +1 -0
  93. package/dist/src/cli/dev/tui/agent-header.d.ts +15 -9
  94. package/dist/src/cli/dev/tui/agent-header.js +1 -1
  95. package/dist/src/cli/dev/tui/blocks.d.ts +1 -1
  96. package/dist/src/cli/dev/tui/blocks.js +3 -2
  97. package/dist/src/cli/dev/tui/command-typeahead.d.ts +47 -0
  98. package/dist/src/cli/dev/tui/command-typeahead.js +1 -0
  99. package/dist/src/cli/dev/tui/dev-rebuild-status.d.ts +21 -0
  100. package/dist/src/cli/dev/tui/dev-rebuild-status.js +1 -0
  101. package/dist/src/cli/dev/tui/errors.d.ts +18 -0
  102. package/dist/src/cli/dev/tui/errors.js +1 -1
  103. package/dist/src/cli/dev/tui/prompt-command-handler.d.ts +14 -0
  104. package/dist/src/cli/dev/tui/prompt-command-handler.js +1 -0
  105. package/dist/src/cli/dev/tui/prompt-commands.d.ts +54 -0
  106. package/dist/src/cli/dev/tui/prompt-commands.js +2 -0
  107. package/dist/src/cli/dev/tui/runner.d.ts +64 -7
  108. package/dist/src/cli/dev/tui/runner.js +1 -1
  109. package/dist/src/cli/dev/tui/setup-commands.d.ts +48 -0
  110. package/dist/src/cli/dev/tui/setup-commands.js +2 -0
  111. package/dist/src/cli/dev/tui/setup-flow.d.ts +35 -0
  112. package/dist/src/cli/dev/tui/setup-issues.d.ts +40 -0
  113. package/dist/src/cli/dev/tui/setup-issues.js +1 -0
  114. package/dist/src/cli/dev/tui/setup-panel.d.ts +103 -0
  115. package/dist/src/cli/dev/tui/setup-panel.js +1 -0
  116. package/dist/src/cli/dev/tui/status-line.d.ts +25 -0
  117. package/dist/src/cli/dev/tui/status-line.js +1 -0
  118. package/dist/src/cli/dev/tui/stream-format.d.ts +16 -1
  119. package/dist/src/cli/dev/tui/stream-format.js +1 -1
  120. package/dist/src/cli/dev/tui/terminal-renderer.d.ts +32 -3
  121. package/dist/src/cli/dev/tui/terminal-renderer.js +5 -2
  122. package/dist/src/cli/dev/tui/test/index.d.ts +3 -1
  123. package/dist/src/cli/dev/tui/test/index.js +1 -1
  124. package/dist/src/cli/dev/tui/test/mock-terminal.d.ts +1 -0
  125. package/dist/src/cli/dev/tui/test/mock-terminal.js +1 -1
  126. package/dist/src/cli/dev/tui/theme.d.ts +10 -0
  127. package/dist/src/cli/dev/tui/theme.js +1 -1
  128. package/dist/src/cli/dev/tui/tui-prompter.d.ts +20 -0
  129. package/dist/src/cli/dev/tui/tui-prompter.js +1 -0
  130. package/dist/src/cli/dev/tui/tui.d.ts +6 -8
  131. package/dist/src/cli/dev/tui/tui.js +1 -1
  132. package/dist/src/cli/dev/tui/types.d.ts +4 -3
  133. package/dist/src/cli/dev/tui/vercel-status.d.ts +47 -0
  134. package/dist/src/cli/dev/tui/vercel-status.js +1 -0
  135. package/dist/src/cli/run.d.ts +9 -18
  136. package/dist/src/cli/run.js +2 -2
  137. package/dist/src/client/client.d.ts +8 -0
  138. package/dist/src/client/client.js +1 -1
  139. package/dist/src/client/file-parts.d.ts +18 -0
  140. package/dist/src/client/file-parts.js +1 -0
  141. package/dist/src/client/index.d.ts +3 -2
  142. package/dist/src/client/index.js +1 -1
  143. package/dist/src/client/message-response.js +1 -1
  144. package/dist/src/client/open-stream.d.ts +6 -0
  145. package/dist/src/client/open-stream.js +1 -1
  146. package/dist/src/client/session-utils.d.ts +5 -0
  147. package/dist/src/client/session-utils.js +1 -1
  148. package/dist/src/client/session.js +1 -1
  149. package/dist/src/client/types.d.ts +9 -2
  150. package/dist/src/compiled/.vendor-stamp.json +8 -8
  151. package/dist/src/compiled/@ai-sdk/anthropic/index.d.ts +56 -31
  152. package/dist/src/compiled/@ai-sdk/anthropic/index.js +2 -2
  153. package/dist/src/compiled/@ai-sdk/google/index.js +1 -1
  154. package/dist/src/compiled/@ai-sdk/mcp/index.js +1 -1
  155. package/dist/src/compiled/@ai-sdk/openai/index.d.ts +16 -9
  156. package/dist/src/compiled/@ai-sdk/openai/index.js +2 -2
  157. package/dist/src/compiled/@ai-sdk/otel/index.js +2 -2
  158. package/dist/src/compiled/@vercel/sandbox/index.js +1 -1
  159. package/dist/src/compiled/@workflow/core/capabilities.d.ts +19 -1
  160. package/dist/src/compiled/@workflow/core/class-serialization.d.ts +32 -0
  161. package/dist/src/compiled/@workflow/core/create-hook.d.ts +37 -0
  162. package/dist/src/compiled/@workflow/core/global.d.ts +11 -1
  163. package/dist/src/compiled/@workflow/core/index.js +2 -2
  164. package/dist/src/compiled/@workflow/core/runtime/helpers.d.ts +4 -2
  165. package/dist/src/compiled/@workflow/core/runtime/start.d.ts +6 -0
  166. package/dist/src/compiled/@workflow/core/runtime/suspension-handler.d.ts +15 -2
  167. package/dist/src/compiled/@workflow/core/runtime/wait-continuation.d.ts +84 -0
  168. package/dist/src/compiled/@workflow/core/runtime/wait-until.d.ts +18 -0
  169. package/dist/src/compiled/@workflow/core/runtime.d.ts +3 -1
  170. package/dist/src/compiled/@workflow/core/runtime.js +28 -28
  171. package/dist/src/compiled/@workflow/core/serialization/types.d.ts +21 -0
  172. package/dist/src/compiled/@workflow/core/serialization.d.ts +113 -6
  173. package/dist/src/compiled/@workflow/core/symbols.d.ts +2 -0
  174. package/dist/src/compiled/@workflow/core/util.d.ts +0 -5
  175. package/dist/src/compiled/@workflow/core/version.d.ts +1 -1
  176. package/dist/src/compiled/@workflow/core/workflow/attribute-dispatcher.d.ts +6 -0
  177. package/dist/src/compiled/@workflow/core/workflow/set-attributes.d.ts +3 -4
  178. package/dist/src/compiled/@workflow/core/workflow.js +1 -1
  179. package/dist/src/compiled/@workflow/world/events.d.ts +48 -0
  180. package/dist/src/compiled/@workflow/world/index.d.ts +3 -3
  181. package/dist/src/compiled/@workflow/world/queue.d.ts +31 -2
  182. package/dist/src/compiled/@workflow/world/runs.d.ts +2 -0
  183. package/dist/src/compiled/@workflow/world/spec-version.d.ts +2 -1
  184. package/dist/src/compiled/_chunks/workflow/attribute-changes-DGVGRGfw.js +59 -0
  185. package/dist/src/compiled/_chunks/workflow/{dist-gEXVSMPU.js → dist-CkMRLaRV.js} +1 -1
  186. package/dist/src/compiled/_chunks/workflow/functions-DuPjIvMH.js +1 -0
  187. package/dist/src/compiled/_chunks/workflow/resume-hook-DMSadN9o.js +1 -0
  188. package/dist/src/compiled/_chunks/workflow/run-BRdn7zy_.js +1 -0
  189. package/dist/src/compiled/_chunks/workflow/sleep-CpXfoXLF.js +1 -0
  190. package/dist/src/compiled/just-bash/index.d.ts +4 -4
  191. package/dist/src/compiler/artifacts.js +1 -1
  192. package/dist/src/compiler/manifest.d.ts +8 -8
  193. package/dist/src/compiler/normalize-agent-config.js +1 -1
  194. package/dist/src/compiler/normalize-channel.d.ts +2 -1
  195. package/dist/src/compiler/normalize-channel.js +1 -1
  196. package/dist/src/compiler/normalize-connection.d.ts +2 -1
  197. package/dist/src/compiler/normalize-connection.js +1 -1
  198. package/dist/src/compiler/normalize-helpers.d.ts +5 -0
  199. package/dist/src/compiler/normalize-helpers.js +1 -1
  200. package/dist/src/compiler/normalize-instructions.d.ts +3 -2
  201. package/dist/src/compiler/normalize-instructions.js +1 -1
  202. package/dist/src/compiler/normalize-manifest.js +2 -2
  203. package/dist/src/compiler/normalize-sandbox.d.ts +2 -1
  204. package/dist/src/compiler/normalize-sandbox.js +1 -1
  205. package/dist/src/compiler/normalize-schedule.d.ts +2 -1
  206. package/dist/src/compiler/normalize-schedule.js +1 -1
  207. package/dist/src/compiler/normalize-skill.d.ts +2 -1
  208. package/dist/src/compiler/normalize-skill.js +1 -1
  209. package/dist/src/compiler/normalize-subagent.d.ts +4 -1
  210. package/dist/src/compiler/normalize-subagent.js +1 -1
  211. package/dist/src/compiler/normalize-tool.d.ts +2 -1
  212. package/dist/src/compiler/normalize-tool.js +1 -1
  213. package/dist/src/compiler/workspace-resources.js +1 -1
  214. package/dist/src/context/node.d.ts +1 -1
  215. package/dist/src/evals/assertions/collector.d.ts +43 -0
  216. package/dist/src/evals/assertions/collector.js +1 -0
  217. package/dist/src/evals/assertions/run.d.ts +72 -0
  218. package/dist/src/evals/assertions/run.js +2 -0
  219. package/dist/src/evals/autoevals-client.js +2 -0
  220. package/dist/src/evals/cli/eval-client.d.ts +22 -0
  221. package/dist/src/evals/cli/eval-client.js +1 -0
  222. package/dist/src/evals/cli/eval.d.ts +8 -5
  223. package/dist/src/evals/cli/eval.js +1 -1
  224. package/dist/src/evals/context.d.ts +19 -0
  225. package/dist/src/evals/context.js +1 -0
  226. package/dist/src/evals/define-eval-config.d.ts +16 -0
  227. package/dist/src/evals/define-eval-config.js +1 -0
  228. package/dist/src/evals/define-eval.d.ts +20 -0
  229. package/dist/src/evals/define-eval.js +1 -0
  230. package/dist/src/evals/expect/index.d.ts +25 -0
  231. package/dist/src/evals/expect/index.js +1 -0
  232. package/dist/src/evals/index.d.ts +6 -2
  233. package/dist/src/evals/index.js +1 -1
  234. package/dist/src/evals/judge.d.ts +20 -0
  235. package/dist/src/evals/judge.js +1 -0
  236. package/dist/src/evals/{checks/match.d.ts → match.d.ts} +17 -18
  237. package/dist/src/evals/match.js +1 -0
  238. package/dist/src/evals/reporters/index.d.ts +1 -0
  239. package/dist/src/evals/reporters/index.js +1 -1
  240. package/dist/src/evals/requirements.d.ts +3 -0
  241. package/dist/src/evals/requirements.js +1 -0
  242. package/dist/src/evals/runner/artifacts.d.ts +7 -6
  243. package/dist/src/evals/runner/artifacts.js +3 -3
  244. package/dist/src/evals/runner/discover.d.ts +31 -10
  245. package/dist/src/evals/runner/discover.js +1 -1
  246. package/dist/src/evals/runner/execute-eval.d.ts +25 -0
  247. package/dist/src/evals/runner/execute-eval.js +1 -0
  248. package/dist/src/evals/runner/execute-task.d.ts +31 -0
  249. package/dist/src/evals/runner/execute-task.js +1 -0
  250. package/dist/src/evals/runner/reporters/braintrust.d.ts +7 -5
  251. package/dist/src/evals/runner/reporters/braintrust.js +2 -2
  252. package/dist/src/evals/runner/reporters/console.d.ts +4 -4
  253. package/dist/src/evals/runner/reporters/console.js +1 -1
  254. package/dist/src/evals/runner/reporters/junit.d.ts +10 -0
  255. package/dist/src/evals/runner/reporters/junit.js +4 -0
  256. package/dist/src/evals/runner/reporters/types.d.ts +14 -8
  257. package/dist/src/evals/runner/run-evals.d.ts +38 -0
  258. package/dist/src/evals/runner/run-evals.js +1 -0
  259. package/dist/src/evals/runner/verdict.d.ts +10 -15
  260. package/dist/src/evals/runner/verdict.js +1 -1
  261. package/dist/src/evals/session.d.ts +52 -0
  262. package/dist/src/evals/session.js +1 -0
  263. package/dist/src/evals/target.d.ts +23 -0
  264. package/dist/src/evals/target.js +1 -0
  265. package/dist/src/evals/types.d.ts +294 -219
  266. package/dist/src/execution/compaction.d.ts +14 -0
  267. package/dist/src/execution/compaction.js +1 -0
  268. package/dist/src/execution/delegated-parent-notification.js +1 -1
  269. package/dist/src/execution/dispatch-runtime-actions-step.js +1 -1
  270. package/dist/src/execution/node-step.js +1 -1
  271. package/dist/src/execution/sandbox/bash-tool.d.ts +6 -6
  272. package/dist/src/execution/sandbox/bash-tool.js +1 -1
  273. package/dist/src/execution/sandbox/bindings/local.js +1 -1
  274. package/dist/src/execution/sandbox/bindings/vercel.d.ts +2 -6
  275. package/dist/src/execution/sandbox/bindings/vercel.js +1 -1
  276. package/dist/src/execution/sandbox/glob-tool.js +3 -3
  277. package/dist/src/execution/sandbox/grep-tool.js +3 -3
  278. package/dist/src/execution/sandbox/read-file-tool.js +1 -1
  279. package/dist/src/execution/subagent-adapter.js +1 -1
  280. package/dist/src/execution/tool-auth.js +1 -1
  281. package/dist/src/execution/turn-workflow.js +1 -1
  282. package/dist/src/execution/workflow-runtime.d.ts +2 -2
  283. package/dist/src/execution/workflow-runtime.js +1 -1
  284. package/dist/src/execution/workflow-steps.js +1 -1
  285. package/dist/src/harness/action-result-helpers.js +1 -1
  286. package/dist/src/harness/authorization.d.ts +26 -0
  287. package/dist/src/harness/authorization.js +1 -1
  288. package/dist/src/harness/code-mode-lifecycle.js +1 -1
  289. package/dist/src/harness/emission.d.ts +12 -5
  290. package/dist/src/harness/emission.js +1 -1
  291. package/dist/src/harness/model-call-error.d.ts +35 -6
  292. package/dist/src/harness/model-call-error.js +1 -1
  293. package/dist/src/harness/step-hooks.d.ts +10 -4
  294. package/dist/src/harness/step-hooks.js +1 -1
  295. package/dist/src/harness/tool-loop.js +1 -1
  296. package/dist/src/harness/tools.d.ts +4 -6
  297. package/dist/src/harness/tools.js +1 -1
  298. package/dist/src/harness/turn-tag-state.d.ts +4 -0
  299. package/dist/src/harness/turn-tag-state.js +1 -1
  300. package/dist/src/harness/types.d.ts +4 -15
  301. package/dist/src/internal/application/cache-metadata.js +1 -1
  302. package/dist/src/internal/application/compiled-artifacts.js +1 -1
  303. package/dist/src/internal/application/package.js +1 -1
  304. package/dist/src/internal/application/paths.js +1 -1
  305. package/dist/src/internal/authored-definition/schema-backed.js +1 -1
  306. package/dist/src/internal/authored-module-loader.d.ts +4 -1
  307. package/dist/src/internal/authored-module-loader.js +2 -2
  308. package/dist/src/internal/authored-module-map-loader.js +1 -1
  309. package/dist/src/internal/nitro/dev-runtime-artifacts.js +1 -1
  310. package/dist/src/internal/nitro/host/build-application.js +1 -1
  311. package/dist/src/internal/nitro/host/build-vercel-agent-summary.js +1 -1
  312. package/dist/src/internal/nitro/host/configure-nitro-routes.js +3 -3
  313. package/dist/src/internal/nitro/host/create-application-nitro.js +1 -1
  314. package/dist/src/internal/nitro/host/dev-authored-source-watcher.js +1 -1
  315. package/dist/src/internal/nitro/host/dev-watcher-log.d.ts +37 -0
  316. package/dist/src/internal/nitro/host/dev-watcher-log.js +1 -0
  317. package/dist/src/internal/nitro/host/ports.d.ts +8 -0
  318. package/dist/src/internal/nitro/host/ports.js +1 -0
  319. package/dist/src/internal/nitro/host/prepare-application-host.js +1 -1
  320. package/dist/src/internal/nitro/host/server-external-packages.d.ts +1 -1
  321. package/dist/src/internal/nitro/host/server-external-packages.js +1 -1
  322. package/dist/src/internal/nitro/host/start-development-server.js +1 -1
  323. package/dist/src/internal/nitro/host/start-production-server.js +1 -1
  324. package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response-from-manifest.d.ts +5 -0
  325. package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response-from-manifest.js +1 -0
  326. package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response.d.ts +31 -2
  327. package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response.js +1 -1
  328. package/dist/src/internal/nitro/routes/agent-info/load-agent-info-data.d.ts +13 -0
  329. package/dist/src/internal/nitro/routes/agent-info/load-agent-info-data.js +1 -1
  330. package/dist/src/internal/nitro/routes/info.d.ts +2 -2
  331. package/dist/src/internal/nitro/routes/info.js +1 -1
  332. package/dist/src/internal/workflow/queue-namespace.d.ts +5 -0
  333. package/dist/src/internal/workflow/queue-namespace.js +1 -0
  334. package/dist/src/internal/workflow-bundle/builder-support.js +2 -2
  335. package/dist/src/internal/workflow-bundle/builder.js +3 -5
  336. package/dist/src/internal/workflow-bundle/vercel-workflow-output.js +1 -1
  337. package/dist/src/internal/workflow-bundle/workflow-builders.d.ts +1 -1
  338. package/dist/src/internal/workflow-bundle/workflow-builders.js +1 -1
  339. package/dist/src/node_modules/.pnpm/@clack_core@1.3.1/node_modules/@clack/core/dist/index.js +4 -4
  340. package/dist/src/protocol/message.d.ts +15 -0
  341. package/dist/src/protocol/message.js +2 -2
  342. package/dist/src/public/channels/slack/api.d.ts +8 -0
  343. package/dist/src/public/channels/slack/api.js +1 -1
  344. package/dist/src/public/channels/slack/connections.d.ts +26 -18
  345. package/dist/src/public/channels/slack/connections.js +1 -1
  346. package/dist/src/public/channels/slack/defaults.d.ts +5 -2
  347. package/dist/src/public/channels/slack/defaults.js +1 -1
  348. package/dist/src/public/channels/slack/index.d.ts +1 -1
  349. package/dist/src/public/channels/slack/slackChannel.d.ts +65 -5
  350. package/dist/src/public/channels/slack/slackChannel.js +1 -1
  351. package/dist/src/public/channels/teams/defaults.js +1 -1
  352. package/dist/src/public/connections/errors.d.ts +8 -0
  353. package/dist/src/public/definitions/tool.d.ts +0 -33
  354. package/dist/src/public/next/index.d.ts +7 -1
  355. package/dist/src/public/next/index.js +1 -1
  356. package/dist/src/public/next/server.d.ts +1 -0
  357. package/dist/src/public/next/server.js +1 -1
  358. package/dist/src/public/nuxt/dev-server.js +1 -1
  359. package/dist/src/public/sveltekit/dev-server.js +1 -1
  360. package/dist/src/public/sveltekit/index.d.ts +1 -1
  361. package/dist/src/public/tools/defaults.d.ts +2 -4
  362. package/dist/src/public/tools/defaults.js +1 -1
  363. package/dist/src/public/tools/define-bash-tool.d.ts +3 -3
  364. package/dist/src/public/tools/define-bash-tool.js +1 -1
  365. package/dist/src/public/tools/define-read-file-tool.d.ts +0 -6
  366. package/dist/src/public/tools/define-read-file-tool.js +1 -1
  367. package/dist/src/public/tools/index.d.ts +2 -2
  368. package/dist/src/public/tools/index.js +1 -1
  369. package/dist/src/public/tools/internal.js +1 -1
  370. package/dist/src/runtime/actions/types.d.ts +11 -11
  371. package/dist/src/runtime/agent/mock-model-adapter.js +1 -1
  372. package/dist/src/runtime/agent/mock-model-fixtures.js +3 -2
  373. package/dist/src/runtime/agent/mock-model-skill-selection.js +3 -4
  374. package/dist/src/runtime/connections/callback-route.js +1 -1
  375. package/dist/src/runtime/connections/mcp-client.js +1 -1
  376. package/dist/src/runtime/connections/scoped-authorization.d.ts +21 -5
  377. package/dist/src/runtime/connections/scoped-authorization.js +1 -1
  378. package/dist/src/runtime/connections/types.d.ts +33 -0
  379. package/dist/src/runtime/connections/validate-authorization.js +1 -1
  380. package/dist/src/runtime/framework-tools/bash.d.ts +3 -3
  381. package/dist/src/runtime/framework-tools/bash.js +1 -1
  382. package/dist/src/runtime/framework-tools/connection-search-dynamic.d.ts +1 -1
  383. package/dist/src/runtime/framework-tools/connection-search-dynamic.js +1 -1
  384. package/dist/src/runtime/framework-tools/file-state.d.ts +3 -3
  385. package/dist/src/runtime/framework-tools/index.js +1 -1
  386. package/dist/src/runtime/framework-tools/read-file.js +2 -2
  387. package/dist/src/runtime/framework-tools/todo.d.ts +7 -0
  388. package/dist/src/runtime/framework-tools/todo.js +2 -2
  389. package/dist/src/runtime/governance/auth/http-basic.js +1 -1
  390. package/dist/src/runtime/input/types.d.ts +1 -1
  391. package/dist/src/runtime/resolve-tool.d.ts +2 -2
  392. package/dist/src/runtime/resolve-tool.js +1 -1
  393. package/dist/src/runtime/sandbox/keys.js +1 -1
  394. package/dist/src/runtime/session-callback-route.js +1 -1
  395. package/dist/src/runtime/types.d.ts +1 -7
  396. package/dist/src/services/dev-client/client-options.d.ts +8 -0
  397. package/dist/src/services/dev-client/client-options.js +1 -0
  398. package/dist/src/services/dev-client/runtime-artifacts.d.ts +13 -0
  399. package/dist/src/services/dev-client/runtime-artifacts.js +1 -0
  400. package/dist/src/services/dev-client.d.ts +13 -46
  401. package/dist/src/services/dev-client.js +1 -1
  402. package/dist/src/setup/ask.d.ts +205 -0
  403. package/dist/src/setup/ask.js +1 -0
  404. package/dist/src/setup/boxes/add-channels.d.ts +100 -16
  405. package/dist/src/setup/boxes/add-channels.js +2 -1
  406. package/dist/src/setup/boxes/add-connections.d.ts +13 -23
  407. package/dist/src/setup/boxes/add-connections.js +1 -1
  408. package/dist/src/setup/boxes/apply-ai-gateway-credential.d.ts +2 -2
  409. package/dist/src/setup/boxes/apply-ai-gateway-credential.js +1 -1
  410. package/dist/src/setup/boxes/deploy-project.d.ts +46 -14
  411. package/dist/src/setup/boxes/deploy-project.js +1 -1
  412. package/dist/src/setup/boxes/detect-ai-gateway.d.ts +10 -3
  413. package/dist/src/setup/boxes/detect-ai-gateway.js +1 -1
  414. package/dist/src/setup/boxes/link-project.d.ts +3 -3
  415. package/dist/src/setup/boxes/link-project.js +1 -1
  416. package/dist/src/setup/boxes/one-shot-next-steps.d.ts +18 -0
  417. package/dist/src/setup/boxes/one-shot-next-steps.js +2 -0
  418. package/dist/src/setup/boxes/preflight.d.ts +14 -6
  419. package/dist/src/setup/boxes/preflight.js +1 -1
  420. package/dist/src/setup/boxes/resolve-provisioning.d.ts +36 -8
  421. package/dist/src/setup/boxes/resolve-provisioning.js +1 -1
  422. package/dist/src/setup/boxes/resolve-target.d.ts +25 -8
  423. package/dist/src/setup/boxes/resolve-target.js +1 -1
  424. package/dist/src/setup/boxes/scaffold.d.ts +12 -6
  425. package/dist/src/setup/boxes/scaffold.js +1 -1
  426. package/dist/src/setup/boxes/select-channels.d.ts +38 -9
  427. package/dist/src/setup/boxes/select-channels.js +1 -1
  428. package/dist/src/setup/boxes/select-chat.d.ts +15 -11
  429. package/dist/src/setup/boxes/select-chat.js +1 -1
  430. package/dist/src/setup/boxes/select-connections.d.ts +30 -0
  431. package/dist/src/setup/boxes/select-connections.js +1 -0
  432. package/dist/src/setup/boxes/select-model.d.ts +18 -14
  433. package/dist/src/setup/boxes/select-model.js +1 -1
  434. package/dist/src/setup/boxes/select-setup-mode.d.ts +32 -0
  435. package/dist/src/setup/boxes/select-setup-mode.js +1 -0
  436. package/dist/src/setup/channel-add-conflicts.d.ts +28 -0
  437. package/dist/src/setup/channel-add-conflicts.js +1 -0
  438. package/dist/src/setup/cli/channel-setup-prompter.d.ts +23 -0
  439. package/dist/src/setup/cli/channel-setup-prompter.js +1 -0
  440. package/dist/src/setup/cli/connection-add-prompter.d.ts +8 -0
  441. package/dist/src/setup/cli/connection-add-prompter.js +1 -0
  442. package/dist/src/setup/{scaffold/cli → cli}/index.d.ts +4 -3
  443. package/dist/src/setup/cli/index.js +1 -0
  444. package/dist/src/setup/{scaffold/cli → cli}/prompt-ui.d.ts +39 -15
  445. package/dist/src/setup/cli/prompt-ui.js +5 -0
  446. package/dist/src/setup/{scaffold/cli → cli}/rail-log.d.ts +2 -0
  447. package/dist/src/setup/{scaffold/cli → cli}/rail-log.js +2 -2
  448. package/dist/src/setup/{scaffold/cli → cli}/select-component.d.ts +18 -3
  449. package/dist/src/setup/cli/select-component.js +1 -0
  450. package/dist/src/setup/cli/select-option-codec.d.ts +12 -0
  451. package/dist/src/setup/cli/select-option-codec.js +1 -0
  452. package/dist/src/setup/{scaffold/cli → cli}/select-state.d.ts +13 -1
  453. package/dist/src/setup/cli/select-state.js +1 -0
  454. package/dist/src/setup/cli/whimsy.d.ts +16 -0
  455. package/dist/src/setup/cli/whimsy.js +1 -0
  456. package/dist/src/setup/{scaffold/steps/setup-connection.d.ts → connection-connector.d.ts} +3 -2
  457. package/dist/src/setup/connection-connector.js +1 -0
  458. package/dist/src/setup/flows/channels.d.ts +43 -0
  459. package/dist/src/setup/flows/channels.js +1 -0
  460. package/dist/src/setup/flows/deploy.d.ts +40 -0
  461. package/dist/src/setup/flows/deploy.js +1 -0
  462. package/dist/src/setup/flows/in-project.d.ts +16 -0
  463. package/dist/src/setup/flows/in-project.js +1 -0
  464. package/dist/src/setup/flows/link.d.ts +43 -0
  465. package/dist/src/setup/flows/link.js +1 -0
  466. package/dist/src/setup/flows/model.d.ts +112 -0
  467. package/dist/src/setup/flows/model.js +1 -0
  468. package/dist/src/setup/flows/vercel.d.ts +31 -0
  469. package/dist/src/setup/flows/vercel.js +2 -0
  470. package/dist/src/setup/gateway-models.js +1 -1
  471. package/dist/src/setup/headless.d.ts +1 -1
  472. package/dist/src/setup/index.d.ts +10 -4
  473. package/dist/src/setup/index.js +1 -1
  474. package/dist/src/setup/onboarding.d.ts +7 -4
  475. package/dist/src/setup/onboarding.js +1 -1
  476. package/dist/src/setup/package-manager.d.ts +27 -0
  477. package/dist/src/setup/package-manager.js +1 -0
  478. package/dist/src/setup/primitives/index.d.ts +3 -0
  479. package/dist/src/setup/primitives/index.js +1 -0
  480. package/dist/src/setup/primitives/pm/bun.d.ts +10 -0
  481. package/dist/src/setup/primitives/pm/bun.js +1 -0
  482. package/dist/src/setup/primitives/pm/index.d.ts +11 -0
  483. package/dist/src/setup/primitives/pm/index.js +1 -0
  484. package/dist/src/setup/primitives/pm/npm.d.ts +10 -0
  485. package/dist/src/setup/primitives/pm/npm.js +1 -0
  486. package/dist/src/setup/primitives/pm/pnpm.d.ts +27 -0
  487. package/dist/src/setup/primitives/pm/pnpm.js +8 -0
  488. package/dist/src/setup/primitives/pm/run.d.ts +23 -0
  489. package/dist/src/setup/primitives/pm/run.js +1 -0
  490. package/dist/src/setup/primitives/pm/shared.d.ts +8 -0
  491. package/dist/src/setup/primitives/pm/shared.js +1 -0
  492. package/dist/src/setup/primitives/pm/types.d.ts +37 -0
  493. package/dist/src/setup/primitives/pm/types.js +1 -0
  494. package/dist/src/setup/primitives/pm/yarn.d.ts +10 -0
  495. package/dist/src/setup/primitives/pm/yarn.js +1 -0
  496. package/dist/src/setup/primitives/run-pnpm.d.ts +1 -0
  497. package/dist/src/setup/primitives/run-pnpm.js +1 -0
  498. package/dist/src/setup/{scaffold/primitives → primitives}/run-vercel.d.ts +7 -0
  499. package/dist/src/setup/primitives/run-vercel.js +1 -0
  500. package/dist/src/setup/project-name.d.ts +4 -0
  501. package/dist/src/setup/project-name.js +1 -0
  502. package/dist/src/setup/project-resolution.d.ts +54 -0
  503. package/dist/src/setup/project-resolution.js +1 -0
  504. package/dist/src/setup/prompter.d.ts +52 -4
  505. package/dist/src/setup/prompter.js +1 -1
  506. package/dist/src/setup/quit-guard.d.ts +1 -1
  507. package/dist/src/setup/run-vercel-link.d.ts +1 -1
  508. package/dist/src/setup/run-vercel-link.js +1 -1
  509. package/dist/src/setup/runner.d.ts +5 -4
  510. package/dist/src/setup/runner.js +1 -1
  511. package/dist/src/setup/scaffold/channels-catalog.d.ts +3 -3
  512. package/dist/src/setup/scaffold/channels-catalog.js +1 -1
  513. package/dist/src/setup/scaffold/create/add-to-project.d.ts +26 -0
  514. package/dist/src/setup/scaffold/create/add-to-project.js +1 -0
  515. package/dist/src/setup/scaffold/create/project.d.ts +54 -0
  516. package/dist/src/setup/scaffold/create/project.js +80 -0
  517. package/dist/src/setup/scaffold/index.d.ts +4 -4
  518. package/dist/src/setup/scaffold/index.js +1 -1
  519. package/dist/src/setup/scaffold/{channels.d.ts → update/channels.d.ts} +11 -0
  520. package/dist/src/setup/scaffold/update/channels.js +7 -0
  521. package/dist/src/setup/scaffold/{connections.d.ts → update/connections.d.ts} +1 -1
  522. package/dist/src/setup/scaffold/update/connections.js +21 -0
  523. package/dist/src/setup/scaffold/version-tokens.d.ts +11 -0
  524. package/dist/src/setup/scaffold/version-tokens.js +1 -0
  525. package/dist/src/setup/{scaffold/steps/setup-slackbot.d.ts → slackbot.d.ts} +24 -20
  526. package/dist/src/setup/slackbot.js +1 -0
  527. package/dist/src/setup/state.d.ts +62 -15
  528. package/dist/src/setup/state.js +1 -1
  529. package/dist/src/setup/step.d.ts +9 -18
  530. package/dist/src/setup/vercel-project.d.ts +15 -8
  531. package/dist/src/setup/vercel-project.js +1 -1
  532. package/dist/src/shared/agent-definition.d.ts +5 -3
  533. package/dist/src/shared/default-agent-model.d.ts +5 -0
  534. package/dist/src/shared/default-agent-model.js +1 -0
  535. package/dist/src/source-change/apply-model-name.d.ts +25 -0
  536. package/dist/src/source-change/apply-model-name.js +2 -0
  537. package/dist/src/source-change/static-source-change.d.ts +36 -0
  538. package/dist/src/source-change/static-source-change.js +1 -0
  539. package/dist/src/svelte/index.js +1 -1
  540. package/dist/src/svelte/use-eve-agent.js +1 -1
  541. package/dist/src/vue/index.js +1 -1
  542. package/dist/src/vue/use-eve-agent.js +1 -1
  543. package/package.json +22 -42
  544. package/dist/docs/evals-v2-plan.md +0 -939
  545. package/dist/docs/public/advanced/dev-tui.md +0 -52
  546. package/dist/docs/public/advanced/evals.md +0 -158
  547. package/dist/docs/public/reference/faqs.md +0 -48
  548. package/dist/src/cli/commands/setup.d.ts +0 -55
  549. package/dist/src/cli/commands/setup.js +0 -1
  550. package/dist/src/cli/dev/repl/input-requests.d.ts +0 -38
  551. package/dist/src/cli/dev/repl/input-requests.js +0 -1
  552. package/dist/src/cli/dev/repl/input.d.ts +0 -19
  553. package/dist/src/cli/dev/repl/input.js +0 -1
  554. package/dist/src/cli/dev/repl/repl.d.ts +0 -62
  555. package/dist/src/cli/dev/repl/repl.js +0 -2
  556. package/dist/src/cli/dev/repl/terminal.d.ts +0 -21
  557. package/dist/src/cli/dev/repl/terminal.js +0 -5
  558. package/dist/src/compiled/_chunks/workflow/resume-hook-0Zk0zSvq.js +0 -12
  559. package/dist/src/compiled/_chunks/workflow/sleep-DXZr2BgM.js +0 -1
  560. package/dist/src/compiled/_chunks/workflow/symbols-BWCAoPHE.js +0 -48
  561. package/dist/src/evals/checks/checks.d.ts +0 -66
  562. package/dist/src/evals/checks/checks.js +0 -2
  563. package/dist/src/evals/checks/index.d.ts +0 -21
  564. package/dist/src/evals/checks/index.js +0 -1
  565. package/dist/src/evals/checks/match.js +0 -1
  566. package/dist/src/evals/define-eval-suite.d.ts +0 -18
  567. package/dist/src/evals/define-eval-suite.js +0 -1
  568. package/dist/src/evals/runner/execute-case.d.ts +0 -23
  569. package/dist/src/evals/runner/execute-case.js +0 -1
  570. package/dist/src/evals/runner/execute-suite.d.ts +0 -24
  571. package/dist/src/evals/runner/execute-suite.js +0 -1
  572. package/dist/src/evals/scorers/autoevals-client.js +0 -2
  573. package/dist/src/evals/scorers/autoevals.d.ts +0 -58
  574. package/dist/src/evals/scorers/autoevals.js +0 -1
  575. package/dist/src/evals/scorers/json.d.ts +0 -10
  576. package/dist/src/evals/scorers/json.js +0 -1
  577. package/dist/src/evals/scorers/model-marker.d.ts +0 -12
  578. package/dist/src/evals/scorers/model-marker.js +0 -1
  579. package/dist/src/evals/scorers/run.d.ts +0 -24
  580. package/dist/src/evals/scorers/run.js +0 -1
  581. package/dist/src/evals/scorers/sql.d.ts +0 -9
  582. package/dist/src/evals/scorers/sql.js +0 -1
  583. package/dist/src/evals/scorers/text.d.ts +0 -18
  584. package/dist/src/evals/scorers/text.js +0 -1
  585. package/dist/src/evals/scores/index.d.ts +0 -72
  586. package/dist/src/evals/scores/index.js +0 -1
  587. package/dist/src/execution/tool-compaction.d.ts +0 -9
  588. package/dist/src/execution/tool-compaction.js +0 -1
  589. package/dist/src/services/dev-client/stream.d.ts +0 -5
  590. package/dist/src/services/dev-client/stream.js +0 -1
  591. package/dist/src/services/dev-client/url.d.ts +0 -11
  592. package/dist/src/services/dev-client/url.js +0 -1
  593. package/dist/src/setup/channel-setup-prompter.d.ts +0 -8
  594. package/dist/src/setup/channel-setup-prompter.js +0 -1
  595. package/dist/src/setup/scaffold/channels.js +0 -7
  596. package/dist/src/setup/scaffold/cli/channel-add-prompter.d.ts +0 -12
  597. package/dist/src/setup/scaffold/cli/channel-add-prompter.js +0 -1
  598. package/dist/src/setup/scaffold/cli/channel-setup-prompter.d.ts +0 -56
  599. package/dist/src/setup/scaffold/cli/connection-add-prompter.d.ts +0 -44
  600. package/dist/src/setup/scaffold/cli/connection-add-prompter.js +0 -1
  601. package/dist/src/setup/scaffold/cli/index.js +0 -1
  602. package/dist/src/setup/scaffold/cli/prompt-ui.js +0 -5
  603. package/dist/src/setup/scaffold/cli/select-component.js +0 -1
  604. package/dist/src/setup/scaffold/cli/select-state.js +0 -1
  605. package/dist/src/setup/scaffold/connections.js +0 -21
  606. package/dist/src/setup/scaffold/pnpm-workspace.d.ts +0 -3
  607. package/dist/src/setup/scaffold/pnpm-workspace.js +0 -11
  608. package/dist/src/setup/scaffold/primitives/detect-deployment.d.ts +0 -13
  609. package/dist/src/setup/scaffold/primitives/detect-deployment.js +0 -1
  610. package/dist/src/setup/scaffold/primitives/index.d.ts +0 -3
  611. package/dist/src/setup/scaffold/primitives/index.js +0 -1
  612. package/dist/src/setup/scaffold/primitives/pnpm-invocation.d.ts +0 -12
  613. package/dist/src/setup/scaffold/primitives/pnpm-invocation.js +0 -1
  614. package/dist/src/setup/scaffold/primitives/run-pnpm.d.ts +0 -17
  615. package/dist/src/setup/scaffold/primitives/run-pnpm.js +0 -1
  616. package/dist/src/setup/scaffold/primitives/run-vercel.js +0 -1
  617. package/dist/src/setup/scaffold/project.d.ts +0 -21
  618. package/dist/src/setup/scaffold/project.js +0 -80
  619. package/dist/src/setup/scaffold/steps/deploy-to-vercel.d.ts +0 -17
  620. package/dist/src/setup/scaffold/steps/deploy-to-vercel.js +0 -1
  621. package/dist/src/setup/scaffold/steps/index.d.ts +0 -4
  622. package/dist/src/setup/scaffold/steps/index.js +0 -1
  623. package/dist/src/setup/scaffold/steps/project-resolution.d.ts +0 -19
  624. package/dist/src/setup/scaffold/steps/project-resolution.js +0 -1
  625. package/dist/src/setup/scaffold/steps/run-add-connection.d.ts +0 -40
  626. package/dist/src/setup/scaffold/steps/run-add-connection.js +0 -1
  627. package/dist/src/setup/scaffold/steps/run-add-to-agent.d.ts +0 -81
  628. package/dist/src/setup/scaffold/steps/run-add-to-agent.js +0 -2
  629. package/dist/src/setup/scaffold/steps/setup-connection.js +0 -1
  630. package/dist/src/setup/scaffold/steps/setup-slackbot.js +0 -1
  631. /package/dist/docs/public/{frontend → guides/frontend}/meta.json +0 -0
  632. /package/dist/docs/public/{advanced → guides}/remote-agents.md +0 -0
  633. /package/dist/src/{setup/scaffold/cli/channel-setup-prompter.js → cli/dev/tui/setup-flow.js} +0 -0
  634. /package/dist/src/evals/{scorers/autoevals-client.d.ts → autoevals-client.d.ts} +0 -0
  635. /package/dist/src/setup/{scaffold/cli → cli}/command-output.d.ts +0 -0
  636. /package/dist/src/setup/{scaffold/cli → cli}/command-output.js +0 -0
  637. /package/dist/src/setup/{scaffold/human-action.d.ts → human-action.d.ts} +0 -0
  638. /package/dist/src/setup/{scaffold/human-action.js → human-action.js} +0 -0
  639. /package/dist/src/setup/{scaffold/primitives → primitives}/process-output.d.ts +0 -0
  640. /package/dist/src/setup/{scaffold/primitives → primitives}/process-output.js +0 -0
  641. /package/dist/src/setup/scaffold/{web-template.d.ts → create/web-template.d.ts} +0 -0
  642. /package/dist/src/setup/scaffold/{web-template.js → create/web-template.js} +0 -0
  643. /package/dist/src/setup/scaffold/{module-files.d.ts → update/module-files.d.ts} +0 -0
  644. /package/dist/src/setup/scaffold/{module-files.js → update/module-files.js} +0 -0
  645. /package/dist/src/setup/scaffold/{package-json.d.ts → update/package-json.d.ts} +0 -0
  646. /package/dist/src/setup/scaffold/{package-json.js → update/package-json.js} +0 -0
  647. /package/dist/src/setup/scaffold/{primitives → update}/update-connection-connector.d.ts +0 -0
  648. /package/dist/src/setup/scaffold/{primitives → update}/update-connection-connector.js +0 -0
  649. /package/dist/src/setup/scaffold/{primitives → update}/update-slack-channel.d.ts +0 -0
  650. /package/dist/src/setup/scaffold/{primitives → update}/update-slack-channel.js +0 -0
@@ -1,6 +1,6 @@
1
1
  import { isEveProject } from "#setup/scaffold/index.js";
2
+ import { type Asker } from "../ask.js";
2
3
  import { pathExists } from "../path-exists.js";
3
- import type { Prompter } from "../prompter.js";
4
4
  import { type ResolvedProjectPath, type SetupState } from "../state.js";
5
5
  import type { SetupBox } from "../step.js";
6
6
  /** Injected for tests; defaults to the real filesystem probes. */
@@ -9,17 +9,33 @@ export interface ResolveTargetDeps {
9
9
  isEveProject: typeof isEveProject;
10
10
  }
11
11
  export interface ResolveTargetOptions {
12
- /** Used only by `gatherInteractive`; headless runs ignore it. */
13
- prompter: Prompter;
14
- /** Skip the name prompt and use this value. */
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
+ */
15
25
  presetName?: string;
16
26
  /** Parent directory the project folder is created inside. Defaults to cwd. */
17
27
  targetDirectory?: string;
18
28
  /** Force scaffolding into the target directory instead of a `./<name>` child. */
19
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;
20
36
  deps?: ResolveTargetDeps;
21
37
  }
22
- /** The name + directory decision both gather faces produce. */
38
+ /** The name + directory decision gather produces. */
23
39
  export interface ResolveTargetInput {
24
40
  agentName: string;
25
41
  inPlace: boolean;
@@ -33,9 +49,10 @@ export interface ResolveTargetPayload {
33
49
  /**
34
50
  * THE TARGET BOX (Q1 + Q2): resolve the agent name (the shared identity for
35
51
  * the directory and the Vercel project) and decide whether to scaffold in
36
- * place or into a new `./<name>` child. The current-vs-new prompt only fires
52
+ * place or into a new `./<name>` child. The current-vs-new question only fires
37
53
  * when the target directory already looks like a project; otherwise creating a
38
- * new directory is the announced default. A headless gather resumes an
39
- * existing Eve project directory instead of refusing it, so re-runs converge.
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.
40
57
  */
41
58
  export declare function resolveTarget(options: ResolveTargetOptions): SetupBox<SetupState, ResolveTargetInput, ResolveTargetPayload>;
@@ -1 +1 @@
1
- import{CURRENT_DIRECTORY_PROJECT_NAME}from"../state.js";import{HeadlessPromptError}from"../headless.js";import{pathExists}from"../path-exists.js";import{basename,join,resolve}from"node:path";import{isEveProject}from"#setup/scaffold/index.js";const PROJECT_NAME_REGEX=/^(?!.*---)[a-z0-9-_.]+$/,DEFAULT_PROJECT_NAME=`my-agent`,NAME_PROMPT_MESSAGE=`What's your agent's name?`;function isValidProjectName(e){return PROJECT_NAME_REGEX.test(e)&&e.length>0&&e.length<=100}function validateProjectName(e){let t=e.trim();if(t.length===0)return`Project name cannot be empty.`;if(t===`..`)return`Project name cannot be '..'.`;if(!isValidProjectName(t))return`Project name can only contain up to 100 lowercase letters, digits, and the characters '.', '_', '-'.`}function validatePresetName(e){let t=e.trim(),n=validateProjectName(t);if(n)throw Error(n);return t}async function promptAgentName(e,t){return t===void 0?(await e.text({message:NAME_PROMPT_MESSAGE,placeholder:DEFAULT_PROJECT_NAME,defaultValue:DEFAULT_PROJECT_NAME,validate:e=>validateProjectName(e.trim()||DEFAULT_PROJECT_NAME)})).trim()||DEFAULT_PROJECT_NAME:validatePresetName(t)}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(i){let a=i.deps??{pathExists,isEveProject},parent=()=>resolve(i.targetDirectory??process.cwd()),inPlaceBasename=()=>basename(parent());async function assertNewDirectoryAvailable(t,n){if(t===CURRENT_DIRECTORY_PROJECT_NAME)return;let r=resolve(parent(),t);if(await a.pathExists(r)&&!(n&&await a.isEveProject(r)))throw Error(`Directory "${t}" already exists. Choose a different name.`)}async function looksLikeProject(e){let[t,n]=await Promise.all([a.pathExists(join(e,`package.json`)),a.pathExists(join(e,`.vercel`))]);return t||n}async function promptFreeDirectoryName(t,n){let r=n;for(;;){if(r===CURRENT_DIRECTORY_PROJECT_NAME||!await a.pathExists(resolve(parent(),r)))return r;t.note(`Directory "${r}" already exists. Choose a different name.`),r=await promptAgentName(t)}}function inPlaceInput(){return{agentName:i.presetName===void 0?deriveInPlaceProjectName(i.targetDirectory):validatePresetName(i.presetName),inPlace:!0}}return{id:`resolve-target`,async gatherInteractive(){if(i.inPlace)return i.presetName===void 0&&validateProjectName(inPlaceBasename())!==void 0?{kind:`done`,input:{agentName:await promptAgentName(i.prompter),inPlace:!0}}:{kind:`done`,input:inPlaceInput()};let e=i.prompter,t=await promptAgentName(e,i.presetName);return i.presetName===void 0&&await looksLikeProject(parent())&&await e.select({message:`This directory already looks like a project. Where should the agent live?`,options:[{value:`current`,label:`Scaffold into this directory`},{value:`new`,label:`Create a new directory ./${t}`}],initialValue:`new`})===`current`?{kind:`done`,input:{agentName:t,inPlace:!0}}:i.presetName===void 0?{kind:`done`,input:{agentName:await promptFreeDirectoryName(e,t),inPlace:!1}}:(await assertNewDirectoryAvailable(t,!1),{kind:`done`,input:{agentName:t,inPlace:!1}})},async gatherHeadless(){if(i.inPlace)return inPlaceInput();if(i.presetName===void 0)throw new HeadlessPromptError(NAME_PROMPT_MESSAGE);let e=validatePresetName(i.presetName);return await assertNewDirectoryAvailable(e,!0),{agentName:e,inPlace:!1}},async perform({input:t}){let n=t.inPlace?CURRENT_DIRECTORY_PROJECT_NAME:t.agentName;return{agentName:t.agentName,projectPath:{kind:`resolved`,inPlace:t.inPlace,path:resolve(parent(),n)}}},apply(e,t){return{...e,agentName:t.agentName,projectPath:t.projectPath}}}}export{resolveTarget};
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};
@@ -15,20 +15,26 @@ export interface ScaffoldOptions {
15
15
  targetDirectory?: string;
16
16
  /** Allow the in-place scaffold to replace Eve scaffold files that already exist. */
17
17
  overwriteExisting?: boolean;
18
+ /**
19
+ * Headless mode: a headless re-run over an existing Eve project skips
20
+ * scaffolding (idempotent re-entry); an interactive run always scaffolds and
21
+ * lets `scaffoldBaseProject` own the in-place conflict rules. The box prompts
22
+ * for nothing, so this dispatch comes from the composition site.
23
+ */
24
+ headless?: boolean;
18
25
  deps?: ScaffoldDeps;
19
26
  }
20
27
  /**
21
- * Which gather face produced the input. A headless re-run over an existing Eve
22
- * project skips scaffolding (idempotent re-entry); an interactive run always
23
- * scaffolds and lets `scaffoldBaseProject` own the in-place conflict rules.
28
+ * Whether the run is headless. A headless re-run over an existing Eve project
29
+ * skips scaffolding (idempotent re-entry); an interactive run always scaffolds.
24
30
  */
25
31
  export interface ScaffoldInput {
26
32
  headless: boolean;
27
33
  }
28
34
  /**
29
35
  * THE SCAFFOLD BOX: writes the base agent template into the path resolved by
30
- * the target box. It prompts for nothing; the gather faces only record which
31
- * mode ran, because a headless re-run on an already-scaffolded Eve project
32
- * skips the write and continues setup instead of failing.
36
+ * the target box. It prompts for nothing; the gather only records which mode
37
+ * ran, because a headless re-run on an already-scaffolded Eve project skips the
38
+ * write and continues setup instead of failing.
33
39
  */
34
40
  export declare function scaffold(options: ScaffoldOptions): SetupBox<SetupState, ScaffoldInput, string>;
@@ -1 +1 @@
1
- import{CURRENT_DIRECTORY_PROJECT_NAME,requireProjectPath}from"../state.js";import{isEveProject,scaffoldBaseProject}from"#setup/scaffold/index.js";function scaffold(i){let a=i.deps??{scaffoldBaseProject,isEveProject};return{id:`scaffold`,async gatherInteractive(){return{kind:`done`,input:{headless:!1}}},async gatherHeadless(){return{headless:!0}},async perform({state:n,input:r}){let{prompter:o}=i,s=n.projectPath.inPlace?CURRENT_DIRECTORY_PROJECT_NAME:n.agentName,c=requireProjectPath(n);if(r.headless&&!i.overwriteExisting&&await a.isEveProject(c))return o.log.message(`Existing Eve project detected; continuing setup...`),c;o.log.message(`Scaffolding project files...`);let l=await a.scaffoldBaseProject({projectName:s,model:n.modelId,byokProvider:n.modelWiring===`self`,targetDirectory:i.targetDirectory,overwriteExisting:i.overwriteExisting,onOverwriteFile:e=>o.log.warning(`Overwrote ${e}`),evePackageVersion:i.evePackageVersion});return o.log.success(`Scaffolded project at ${l}`),l},apply(e,t){return{...e,projectPath:{kind:`resolved`,inPlace:e.projectPath.inPlace,path:t}}}}}export{scaffold};
1
+ import{CURRENT_DIRECTORY_PROJECT_NAME,requireProjectPath}from"../state.js";import{isEveProject,scaffoldBaseProject}from"#setup/scaffold/index.js";function scaffold(i){let a=i.deps??{scaffoldBaseProject,isEveProject};return{id:`scaffold`,async gather(){return{headless:i.headless??!1}},async perform({state:n,input:r}){let{prompter:o}=i,s=n.projectPath.inPlace?CURRENT_DIRECTORY_PROJECT_NAME:n.agentName,c=requireProjectPath(n);if(r.headless&&!i.overwriteExisting&&await a.isEveProject(c))return o.log.message(`Existing Eve project detected; continuing setup...`),c;o.log.message(`Scaffolding project files...`);let l=await a.scaffoldBaseProject({projectName:s,model:n.modelId,byokProvider:n.modelWiring===`self`,targetDirectory:i.targetDirectory,overwriteExisting:i.overwriteExisting,onOverwriteFile:e=>o.log.warning(`Overwrote ${e}`),evePackageVersion:i.evePackageVersion});return o.log.success(`Scaffolded project at ${l}`),l},apply(e,t){return{...e,projectPath:{kind:`resolved`,inPlace:e.projectPath.inPlace,path:t}}}}}export{scaffold};
@@ -1,21 +1,50 @@
1
1
  import { type ChannelKind } from "#setup/scaffold/index.js";
2
- import type { Prompter } from "../prompter.js";
2
+ import type { DisabledChannelReasons } from "#setup/cli/index.js";
3
+ import type { Asker } from "../ask.js";
3
4
  import { type SetupState } from "../state.js";
4
5
  import type { SetupBox } from "../step.js";
6
+ /** The channel question, shared with the dev TUI's /channels action list. */
7
+ export declare const CHANNELS_PROMPT_MESSAGE = "Where will you chat with your agent?";
5
8
  export interface SelectChannelsOptions {
6
- /** Used only by `gatherInteractive`; headless runs ignore it. */
7
- prompter: Prompter;
8
- /** Skip the picker and use these channels (headless or flag-driven runs). */
9
+ /** Resolves the channels question; the composed stack decides how. */
10
+ asker: Asker;
11
+ /**
12
+ * Resolve to these channels without asking. Stays a factory option (not a
13
+ * `withAnswers` rung) so it keeps short-circuiting the picker exactly as the
14
+ * dual-face box did, while still passing the Slack/Vercel gate and
15
+ * `validateSelection` like a picked selection.
16
+ */
9
17
  presetChannels?: ChannelKind[];
18
+ /**
19
+ * Picker shape, chosen explicitly because the variants differ in whether a
20
+ * selection is required, whether the REPL row is shown, and how Slack is
21
+ * gated. The "channels-add" picker allows an empty submission and keeps Slack
22
+ * selectable from an unlinked directory because its add-channels box can run
23
+ * an interactive `vercel link` on demand.
24
+ */
25
+ variant: "onboarding" | "in-project" | "channels-add";
26
+ /**
27
+ * Reasons for channel kinds that cannot be added to this project (existing
28
+ * registrations); matching rows render disabled with the reason.
29
+ */
30
+ disabledChannelReasons?: DisabledChannelReasons;
31
+ /**
32
+ * Rejects a selection before any later box runs effects. Runs on both the
33
+ * asked and the preset path, so a flag-driven selection is validated exactly
34
+ * like a picked one. A throw aborts the run.
35
+ */
36
+ validateSelection?(channels: readonly ChannelKind[]): Promise<void> | void;
10
37
  }
11
38
  /**
12
39
  * THE CHANNELS BOX: interview-phase channel picker. Choosing channels is human
13
40
  * input, so it runs before any filesystem work; the channels box scaffolds the
14
- * chosen channels afterward from `state.channelSelection`. Slack is gated when
15
- * the run is not deploying to Vercel, since it needs a linked project.
41
+ * chosen channels afterward from `state.channelSelection`. During onboarding
42
+ * the deployment decision has not been made yet, so Slack is never gated here:
43
+ * picking it is what makes the later provisioning box resolve to Vercel. Only
44
+ * the in-project variant gates Slack, on the detected on-disk link.
16
45
  *
17
- * The picker is required and always carries a locked, pre-selected CLI REPL row,
18
- * so an empty selection is impossible: every agent can at least be chatted with
19
- * locally in the terminal. Web and Slack stack on top of it.
46
+ * The onboarding picker is required and always carries a locked, pre-selected
47
+ * Terminal UI row, so an empty selection is impossible: every agent can at least be
48
+ * chatted with locally in the terminal. Web and Slack stack on top of it.
20
49
  */
21
50
  export declare function selectChannels(options: SelectChannelsOptions): SetupBox<SetupState, ChannelKind[], ChannelKind[]>;
@@ -1 +1 @@
1
- import{hasVercelProject}from"../state.js";import{HeadlessPromptError}from"../headless.js";import{SCAFFOLDABLE_CHANNELS}from"#setup/scaffold/index.js";const CHANNELS_PROMPT_MESSAGE=`Select channels`;function selectChannels(r){function assertSlackHasVercel(e,t){if(e&&t.includes(`slack`))throw Error(`Slack requires a Vercel project. Re-run and choose to deploy to Vercel to add Slack.`)}return{id:`select-channels`,async gatherInteractive({state:t}){let i=!hasVercelProject(t);if(r.presetChannels!==void 0)return assertSlackHasVercel(i,r.presetChannels),{kind:`done`,input:r.presetChannels};let a=SCAFFOLDABLE_CHANNELS.map(e=>i&&e.kind===`slack`?{value:e.kind,label:e.label,disabled:!0,disabledReason:`needs a Vercel project`}:{value:e.kind,label:e.label,hint:e.hint}),o={value:`tui`,label:`CLI REPL`,locked:!0,lockedReason:`always available`},s=await r.prompter.select({multiple:!0,message:CHANNELS_PROMPT_MESSAGE,options:[...a,o],required:!0});return assertSlackHasVercel(i,s),{kind:`done`,input:s.filter(e=>e!==`tui`)}},async gatherHeadless({state:n}){if(r.presetChannels===void 0)throw new HeadlessPromptError(CHANNELS_PROMPT_MESSAGE);return assertSlackHasVercel(!hasVercelProject(n),r.presetChannels),r.presetChannels},async perform({input:e}){return e},apply(e,t){return{...e,channelSelection:t}}}}export{selectChannels};
1
+ import{hasVercelProject}from"../state.js";import{SCAFFOLDABLE_CHANNELS}from"#setup/scaffold/index.js";const CHANNELS_PROMPT_MESSAGE=`Where will you chat with your agent?`;function selectChannels(n){let r=n.variant===`channels-add`,i=n.variant===`in-project`;function assertSlackHasVercel(e,t){if(e&&t.includes(`slack`))throw Error("Slack requires a Vercel project. Link this directory (`vercel link`) and re-run to add Slack.")}function slackLacksVercel(t){return i&&!hasVercelProject(t)}return{id:`select-channels`,async gather({state:e}){let i=slackLacksVercel(e);if(n.presetChannels!==void 0)return assertSlackHasVercel(i,n.presetChannels),await n.validateSelection?.(n.presetChannels),n.presetChannels;let a=SCAFFOLDABLE_CHANNELS.map(e=>{let t=n.disabledChannelReasons?.[e.kind];return t===void 0?i&&e.kind===`slack`?{id:e.kind,value:e.kind,label:e.label,disabled:!0,disabledReason:`needs a Vercel project`}:{id:e.kind,value:e.kind,label:e.label,hint:e.hint}:{id:e.kind,value:e.kind,label:e.label,hint:e.hint,disabled:!0,disabledReason:t}}),o={id:`tui`,value:`tui`,label:`Terminal UI`,locked:!0,lockedReason:`always available`},s=await n.asker.askMany({key:`channels`,message:CHANNELS_PROMPT_MESSAGE,options:r?a:[...a,o],required:!0,requireSelection:!r});assertSlackHasVercel(i,s);let c=s.filter(e=>e!==`tui`);return await n.validateSelection?.(c),c},async perform({input:e}){return e},apply(e,t){return{...e,channelSelection:t}}}}export{CHANNELS_PROMPT_MESSAGE,selectChannels};
@@ -1,4 +1,4 @@
1
- import type { Prompter, SelectOption } from "../prompter.js";
1
+ import { type Asker, type SelectOption } from "../ask.js";
2
2
  import type { ChannelKind, ChatPreference, SetupState } from "../state.js";
3
3
  import type { SetupBox } from "../step.js";
4
4
  /** The scaffolded facts the chat option list is derived from. */
@@ -11,24 +11,28 @@ export interface ChatPreferenceContext {
11
11
  /**
12
12
  * Builds the chat-preference option list. Channel-backed options come
13
13
  * first (in the order Web -> Slack) when available, then the framework
14
- * built-ins (CLI REPL, API), then the explicit skip option last. Exported
14
+ * built-ins (Terminal UI, API), then the explicit skip option last. Exported
15
15
  * for the unit test.
16
16
  */
17
17
  export declare function buildChatPreferenceOptions(args: ChatPreferenceContext): SelectOption<ChatPreference>[];
18
18
  export interface SelectChatOptions {
19
- /** Used only by `gatherInteractive`; headless runs ignore it. */
20
- prompter: Prompter;
19
+ /** Resolves the chat question; the composed stack decides how. */
20
+ asker: Asker;
21
21
  /**
22
- * Skip the prompt and use this value. The headless default ("skip") lives at
23
- * the composition site, not here, so a missing headless preset fails fast.
22
+ * Resolve to this value without asking. The headless default ("skip") lives
23
+ * at the composition site, not here, so a missing headless preset fails
24
+ * fast. Stays a factory option (not a `withAnswers` rung) because a preset
25
+ * must keep bypassing the option list, which hides choices the current
26
+ * state did not scaffold, exactly as the dual-face box did.
24
27
  */
25
28
  presetPreference?: ChatPreference;
26
29
  }
27
30
  /**
28
- * THE CHAT BOX: final prompt of the create flow. Asks where the user wants to
29
- * chat with their agent. Options are dynamic on what was scaffolded earlier.
30
- * Web Chat appears only if `web` is in the scaffolded channels, Slack appears
31
- * only if `slack` was scaffolded AND the bot was attached during the
32
- * "Select channels" step. REPL, API, and Skip are always present.
31
+ * THE CHAT BOX: final prompt of the create flow. Asks one required "chat"
32
+ * select through the box's asker: where the user wants to chat with their
33
+ * agent. Options are dynamic on what was scaffolded earlier. Web Chat appears
34
+ * only if `web` is in the scaffolded channels, Slack appears only if `slack`
35
+ * was scaffolded AND the bot was attached during the channel setup step.
36
+ * REPL, API, and Skip are always present.
33
37
  */
34
38
  export declare function selectChat(options: SelectChatOptions): SetupBox<SetupState, ChatPreference, ChatPreference>;
@@ -1 +1 @@
1
- import{HeadlessPromptError}from"../headless.js";const CHAT_PROMPT_MESSAGE=`Start a chat with your agent now`;function buildChatPreferenceOptions(e){let t=[];return e.availableChannels.includes(`web`)&&t.push({value:`web`,label:`Web chat`,hint:`next.js`}),e.availableChannels.includes(`slack`)&&e.slackbotAttached&&t.push({value:`slack`,label:`Slack`,hint:`open workspace`}),t.push({value:`repl`,label:`CLI REPL`}),t.push({value:`api`,label:`API`}),t.push({value:`skip`,label:`Skip and chat later`}),t}function pickInitialPreference(e){if(e.availableChannels.includes(`web`))return`web`;if(e.availableChannels.includes(`slack`)&&e.slackbotAttached)return`slack`}function selectChat(n){return{id:`select-chat`,async gatherInteractive({state:e}){if(n.presetPreference!==void 0)return{kind:`done`,input:n.presetPreference};let r={availableChannels:[...e.channels],slackbotAttached:e.slackbotAttached};return{kind:`done`,input:await n.prompter.select({message:CHAT_PROMPT_MESSAGE,options:buildChatPreferenceOptions(r),initialValue:pickInitialPreference(r)})}},async gatherHeadless(){if(n.presetPreference!==void 0)return n.presetPreference;throw new HeadlessPromptError(CHAT_PROMPT_MESSAGE)},async perform({input:e}){return e},apply(e,t){return{...e,chat:t}}}}export{buildChatPreferenceOptions,selectChat};
1
+ import{select}from"../ask.js";function buildChatPreferenceOptions(e){let option=(e,t,n)=>({id:e,label:t,value:e,hint:n}),t=[];return e.availableChannels.includes(`web`)&&t.push(option(`web`,`Web chat`,`next.js`)),e.availableChannels.includes(`slack`)&&e.slackbotAttached&&t.push(option(`slack`,`Slack`,`open workspace`)),t.push(option(`repl`,`Terminal UI`)),t.push(option(`api`,`API`)),t.push(option(`skip`,`Skip and chat later`)),t}function pickInitialPreference(e){if(e.availableChannels.includes(`web`))return`web`;if(e.availableChannels.includes(`slack`)&&e.slackbotAttached)return`slack`}function selectChat(t){return{id:`select-chat`,async gather({state:n}){if(t.presetPreference!==void 0)return t.presetPreference;let r={availableChannels:[...n.channels],slackbotAttached:n.slackbotAttached};return t.asker.ask(select({key:`chat`,message:`Start a chat with your agent now`,options:buildChatPreferenceOptions(r),recommended:pickInitialPreference(r),required:!0}))},async perform({input:e}){return e},apply(e,t){return{...e,chat:t}}}}export{buildChatPreferenceOptions,selectChat};
@@ -0,0 +1,30 @@
1
+ import type { ConnectionSelectOption } from "#setup/cli/index.js";
2
+ import { type Asker } from "../ask.js";
3
+ import type { ConnectionPlan, SetupState } from "../state.js";
4
+ import type { SetupBox } from "../step.js";
5
+ export declare const CONNECT_REQUIRES_VERCEL = "Authenticates through Vercel Connect, which needs a Vercel project. Re-run and choose to deploy to Vercel.";
6
+ export interface SelectConnectionsOptions {
7
+ /** Resolves the picker and custom sub-questions; the composed stack decides how. */
8
+ asker: Asker;
9
+ /**
10
+ * Headless mode: skips the picker entirely unless `presetConnections` were
11
+ * requested. Fixed at composition time (the same place the asker base is
12
+ * chosen), since `gather` cannot read the mode off the asker.
13
+ */
14
+ headless?: boolean;
15
+ /** Skip the picker and plan exactly these catalog slugs. */
16
+ presetConnections?: string[];
17
+ }
18
+ /** Exported for tests: the picker rows derived from the curated catalog. */
19
+ export declare function buildCatalogOptions(disabledReasons: Readonly<Record<string, string>>): ConnectionSelectOption[];
20
+ /**
21
+ * THE CONNECTION SELECTION BOX: part of the interview phase, before any
22
+ * filesystem write. Offers the connection catalog (plus a custom MCP / OpenAPI
23
+ * escape hatch through preset slugs) and resolves every prompt into
24
+ * fully-specified {@link ConnectionPlan}s recorded on the state; the
25
+ * add-connections box executes them after the scaffold and link. The full
26
+ * catalog is selectable: the deployment decision comes later in the interview,
27
+ * and the provisioning box resolves to Vercel when a Connect-backed selection
28
+ * needs a project.
29
+ */
30
+ export declare function selectConnections(options: SelectConnectionsOptions): SetupBox<SetupState, ConnectionPlan[], ConnectionPlan[]>;
@@ -0,0 +1 @@
1
+ import{select,text}from"../ask.js";import{CONNECTION_CATALOG,CUSTOM_CONNECTION_SLUG,SUPPORTED_PROTOCOLS,catalogSlugs,effectiveProtocols,getCatalogEntry,isValidConnectionSlug}from"#setup/scaffold/index.js";import{connectorServiceForEntry}from"#setup/scaffold/connections/catalog.js";const CONNECT_REQUIRES_VERCEL=`Authenticates through Vercel Connect, which needs a Vercel project. Re-run and choose to deploy to Vercel.`,PROTOCOL_LABELS={mcp:`MCP`,openapi:`OpenAPI`};function buildCatalogOptions(e){return CONNECTION_CATALOG.map(t=>{let n=e[t.slug];return n===void 0?{value:t.slug,label:t.label,hint:t.hint}:{value:t.slug,label:t.label,hint:t.hint,disabled:!0,disabledReason:n}})}function unknownSlugError(e){return Error(`Unknown connection "${e}". Known: ${catalogSlugs().join(`, `)}, or pass a custom name with a definition.`)}function assertSupportedProtocols(e,t){if(e.length===0)throw Error(`No supported protocol for "${t}". Supported: ${SUPPORTED_PROTOCOLS.join(`, `)}.`)}async function resolveProtocolInteractive(t,n,r){let i=effectiveProtocols(n);return assertSupportedProtocols(i,r),i.length===1?i[0]:t.ask(select({key:`protocol:${r}`,message:`Protocol for ${r}`,options:i.map(e=>({id:e,value:e,label:PROTOCOL_LABELS[e]}))}))}function resolveProtocolHeadless(e,t){let n=effectiveProtocols(e);if(assertSupportedProtocols(n,t),n.length>1)throw Error(`Connection "${t}" supports multiple protocols (${n.join(`, `)}). Pass --protocol to choose one.`);return n[0]}function deriveProvision(e,t){if(e.auth?.kind!==`connect`)return{kind:`none`};let n=connectorServiceForEntry({mcp:e.mcp,auth:e.auth});return n===void 0?{kind:`connect-manual`}:t?{kind:`command-hint`,service:n}:{kind:`connect`,service:n}}async function promptCustomSlug(e){return e.ask(text({key:`connection-name`,message:`Connection name`,placeholder:`mycorp`,validate:e=>{let t=e.trim();return t.length===0?`A name is required.`:isValidConnectionSlug(t)?null:`Start with a lowercase letter; use only lowercase letters, digits, and hyphens (max 64 characters).`}}))}async function planCustomInteractive(e,n){let r=await resolveProtocolInteractive(e,void 0,n),i=await e.ask(text({key:`description:${n}`,message:`Description for ${n}`,placeholder:`What this connection exposes`}));if(r===`mcp`){let a={slug:n,description:i,protocols:[`mcp`],mcp:{url:(await e.ask(text({key:`mcp-url:${n}`,message:`MCP server URL for ${n}`,placeholder:`https://mcp.example.com/sse`,validate:e=>e.trim().length===0?`A URL is required.`:null}))).trim()},auth:{kind:`connect`,connector:n}};return{slug:n,protocol:r,entry:a,provision:deriveProvision(a,!1)}}let a=await e.ask(text({key:`openapi-spec:${n}`,message:`OpenAPI spec URL for ${n}`,placeholder:`https://api.example.com/openapi.json`,validate:e=>e.trim().length===0?`A spec URL is required.`:null})),o=await e.ask(text({key:`openapi-base-url:${n}`,message:`Base URL for ${n} (optional)`,placeholder:`https://api.example.com`})),s={slug:n,description:i,protocols:[`openapi`],openapi:o.trim().length>0?{spec:a.trim(),baseUrl:o.trim()}:{spec:a.trim()},auth:{kind:`connect`,connector:n}};return{slug:n,protocol:r,entry:s,provision:deriveProvision(s,!1)}}async function planSelectionInteractive(e,t){if(t===CUSTOM_CONNECTION_SLUG)return planCustomInteractive(e,(await promptCustomSlug(e)).trim());let n=getCatalogEntry(t);if(n!==void 0)return{slug:t,protocol:await resolveProtocolInteractive(e,n.protocols,t),entry:n,provision:deriveProvision(n,!1)};if(!isValidConnectionSlug(t))throw unknownSlugError(t);return planCustomInteractive(e,t)}function planPresetHeadless(e){if(e===CUSTOM_CONNECTION_SLUG)throw Error(`Custom connection requires interactive input or a preset definition.`);let t=getCatalogEntry(e);if(t!==void 0)return{slug:e,protocol:resolveProtocolHeadless(t.protocols,e),entry:t,provision:deriveProvision(t,!0)};throw isValidConnectionSlug(e)?Error(`Custom connection "${e}" requires interactive input or a preset definition.`):unknownSlugError(e)}function selectConnections(e){return{id:`select-connections`,async gather(){let t=e.headless??!1,n=e.presetConnections??[];if(t)return n.map(e=>planPresetHeadless(e));let r;if(n.length>0)r=[...n];else{let t=buildCatalogOptions({}).map(e=>({id:String(e.value),value:String(e.value),label:e.label,hint:e.hint,disabled:e.disabled,disabledReason:e.disabledReason}));r=await e.asker.askMany({key:`connection`,message:`What should your agent connect to?`,options:t})}let i=[];for(let t of r)i.push(await planSelectionInteractive(e.asker,t));return i},async perform({input:e}){return e},apply(e,t){return{...e,connectionSelection:t}}}}export{CONNECT_REQUIRES_VERCEL,buildCatalogOptions,selectConnections};
@@ -1,12 +1,6 @@
1
- import type { Prompter } from "../prompter.js";
1
+ import { type Asker } from "../ask.js";
2
2
  import type { SetupState } from "../state.js";
3
3
  import type { SetupBox } from "../step.js";
4
- /**
5
- * Model baked into the scaffold when the model prompt is skipped (the
6
- * "wire your own provider" path). The `byok` template wires the Anthropic
7
- * provider, so this is an Anthropic model.
8
- */
9
- export declare const DEFAULT_MODEL_ID = "anthropic/claude-opus-4.8";
10
4
  /** One model entry from the AI Gateway catalog response. */
11
5
  export interface GatewayCatalogModel {
12
6
  id: string;
@@ -15,14 +9,21 @@ export interface GatewayCatalogModel {
15
9
  owned_by: string;
16
10
  tags?: readonly string[];
17
11
  }
12
+ /** Fetches the raw AI Gateway catalog. The default for {@link SelectModelDeps}. */
13
+ export declare function fetchGatewayCatalog(): Promise<GatewayCatalogModel[]>;
18
14
  /** Injected for tests; defaults to the real AI Gateway catalog fetch. */
19
15
  export interface SelectModelDeps {
20
16
  fetchModels: () => Promise<GatewayCatalogModel[]>;
21
17
  }
22
18
  export interface SelectModelOptions {
23
- /** Used only by `gatherInteractive`; headless runs ignore it. */
24
- prompter: Prompter;
25
- /** Skip the prompt and return this value if provided. */
19
+ /** Resolves the model question; the composed stack decides how. */
20
+ asker: Asker;
21
+ /**
22
+ * Resolve to this value without fetching the catalog or asking. Stays a
23
+ * factory option (not a `withAnswers` rung) because a preset must keep
24
+ * short-circuiting the catalog fetch and must keep accepting ids the
25
+ * filtered catalog does not list, exactly as the dual-face box did.
26
+ */
26
27
  presetModel?: string;
27
28
  /**
28
29
  * Pre-select this model in the picker so enter confirms it. Falls back to the
@@ -33,9 +34,12 @@ export interface SelectModelOptions {
33
34
  }
34
35
  /**
35
36
  * THE MODEL BOX: pick the default model baked into `agent/agent.ts`. The
36
- * interactive face fetches the AI Gateway catalog and offers a searchable
37
- * picker; the headless face requires a preset. Wiring your own provider
38
- * (`modelWiring === "self"`) skips the model prompt entirely: the byok scaffold
39
- * pins a default model the user can edit afterward.
37
+ * gather fetches the AI Gateway catalog and asks one required "model" select
38
+ * through the box's asker, so an interactive stack offers a searchable picker
39
+ * while a headless stack refuses structurally when no preset answered it.
40
+ * The model is the first thing the interview decides about the agent itself;
41
+ * how the credential is wired (gateway vs your own provider key) is the
42
+ * provisioning box's later decision, and the byok scaffold derives its
43
+ * provider block from whatever model was picked here.
40
44
  */
41
45
  export declare function selectModel(options: SelectModelOptions): SetupBox<SetupState, string, string>;
@@ -1 +1 @@
1
- import{HeadlessPromptError}from"../headless.js";const POPULAR_PROVIDERS=[`anthropic`,`openai`,`google`],MODEL_PROMPT_MESSAGE=`Which model should your agent use?`,DEFAULT_MODEL_ID=`anthropic/claude-opus-4.8`,FALLBACK_MODELS=[{value:DEFAULT_MODEL_ID,label:`Claude Opus 4.8`,hint:`Anthropic`},{value:`anthropic/claude-sonnet-4.6`,label:`Claude Sonnet 4.6`,hint:`Anthropic`},{value:`openai/gpt-4.1-mini`,label:`GPT-4.1 mini`,hint:`OpenAI`},{value:`openai/gpt-5-mini`,label:`GPT-5 mini`,hint:`OpenAI`},{value:`google/gemini-2.5-flash`,label:`Gemini 2.5 Flash`,hint:`Google`}];function providerLabel(e){return e.length===0?``:e.charAt(0).toUpperCase()+e.slice(1)}function providerPriority(e){let n=POPULAR_PROVIDERS.indexOf(e);return n===-1?POPULAR_PROVIDERS.length:n}async function fetchGatewayCatalog(){let e=new AbortController,t=setTimeout(()=>e.abort(),5e3);try{return(await(await fetch(`https://ai-gateway.vercel.sh/v1/models`,{signal:e.signal})).json()).data}finally{clearTimeout(t)}}async function buildModelOptions(e){try{let t=(await e()).filter(e=>e.type===`language`&&(e.tags??[]).includes(`web-search`)).map(e=>{let t=e.id.split(`/`)[0]??``;return{value:e.id,label:e.name,hint:providerLabel(t),provider:t}}).sort((e,t)=>{let n=providerPriority(e.provider)-providerPriority(t.provider);if(n!==0)return n;let r=e.provider.localeCompare(t.provider);return r===0?e.label.localeCompare(t.label):r});return t.length===0?FALLBACK_MODELS:t.map(({value:e,label:t,hint:n})=>({value:e,label:t,hint:n}))}catch{return FALLBACK_MODELS}}function selectModel(t){let i=t.deps??{fetchModels:fetchGatewayCatalog};function presetFor(e){if(e.modelWiring===`self`)return DEFAULT_MODEL_ID;if(t.presetModel!==void 0&&t.presetModel.length>0)return t.presetModel}return{id:`select-model`,async gatherInteractive({state:e}){let r=presetFor(e);if(r!==void 0)return{kind:`done`,input:r};let a=await buildModelOptions(i.fetchModels),o=t.defaultModel!==void 0&&a.some(e=>e.value===t.defaultModel)?t.defaultModel:a[0]?.value;return{kind:`done`,input:await t.prompter.select({message:MODEL_PROMPT_MESSAGE,search:!0,placeholder:`type to filter (e.g. 'claude', 'gpt', 'gemini')`,options:a,initialValue:o})}},async gatherHeadless({state:t}){let r=presetFor(t);if(r!==void 0)return r;throw new HeadlessPromptError(MODEL_PROMPT_MESSAGE)},async perform({input:e}){return e},apply(e,t){return{...e,modelId:t}}}}export{DEFAULT_MODEL_ID,selectModel};
1
+ import{select}from"../ask.js";import{DEFAULT_AGENT_MODEL_ID}from"#shared/default-agent-model.js";const POPULAR_PROVIDERS=[`anthropic`,`openai`,`google`];function modelOption(e,t,n){return{id:e,label:t,value:e,hint:n,featured:!0}}const FEATURED_MODEL_IDS=[DEFAULT_AGENT_MODEL_ID,`anthropic/claude-opus-4.8`,`openai/gpt-5.5`,`google/gemini-3.5`],FALLBACK_MODELS=[modelOption(DEFAULT_AGENT_MODEL_ID,`Claude Sonnet 4.6`,`Anthropic`),modelOption(`anthropic/claude-opus-4.8`,`Claude Opus 4.8`,`Anthropic`),modelOption(`openai/gpt-5.5`,`GPT-5.5`,`OpenAI`),modelOption(`google/gemini-3.5`,`Gemini 3.5`,`Google`)];function providerLabel(e){return e.length===0?``:e.charAt(0).toUpperCase()+e.slice(1)}function providerPriority(e){let t=POPULAR_PROVIDERS.indexOf(e);return t===-1?POPULAR_PROVIDERS.length:t}async function fetchGatewayCatalog(){let e=new AbortController,t=setTimeout(()=>e.abort(),5e3);try{return(await(await fetch(`https://ai-gateway.vercel.sh/v1/models`,{signal:e.signal})).json()).data}finally{clearTimeout(t)}}function featuredPriority(e){let t=FEATURED_MODEL_IDS.indexOf(e);return t===-1?FEATURED_MODEL_IDS.length:t}async function buildModelOptions(e){try{let t=(await e()).filter(e=>e.type===`language`&&(e.tags??[]).includes(`web-search`)).map(e=>{let t=e.id.split(`/`)[0]??``;return{value:e.id,label:e.name,hint:providerLabel(t),provider:t}}).sort((e,t)=>{let n=featuredPriority(e.value)-featuredPriority(t.value);if(n!==0)return n;let r=providerPriority(e.provider)-providerPriority(t.provider);if(r!==0)return r;let i=e.provider.localeCompare(t.provider);return i===0?e.label.localeCompare(t.label):i});return t.length===0?FALLBACK_MODELS:t.map(({value:e,label:t,hint:n})=>({id:e,label:t,value:e,hint:n,featured:FEATURED_MODEL_IDS.includes(e)||void 0}))}catch{return FALLBACK_MODELS}}function selectModel(n){let r=n.deps??{fetchModels:fetchGatewayCatalog};return{id:`select-model`,async gather(){let i=n.presetModel;if(i!==void 0&&i.length>0)return i;let a=await buildModelOptions(r.fetchModels),o=n.defaultModel!==void 0&&a.some(e=>e.value===n.defaultModel)?n.defaultModel:a.some(e=>e.value===DEFAULT_AGENT_MODEL_ID)?DEFAULT_AGENT_MODEL_ID:a[0]?.value;return n.asker.ask(select({key:`model`,message:`Which model should your agent use?`,options:a,recommended:o,required:!0,search:!0,placeholder:`type to filter (e.g. 'claude', 'gpt', 'gemini')`}))},async perform({input:e}){return e},apply(e,t){return{...e,modelId:t}}}}export{fetchGatewayCatalog,selectModel};
@@ -0,0 +1,32 @@
1
+ import { type Asker } from "../ask.js";
2
+ import type { SetupMode, SetupState } from "../state.js";
3
+ import type { SetupBox } from "../step.js";
4
+ export interface SelectSetupModeOptions {
5
+ /** Resolves the mode question; the composed stack decides how. */
6
+ asker: Asker;
7
+ /**
8
+ * Skip the mode question and use this value. Stays a factory option (not a
9
+ * `withAnswers` rung) so it short-circuits before any ask, which is what
10
+ * lets a headless `--one-shot` run resolve without a terminal.
11
+ */
12
+ presetMode?: SetupMode;
13
+ /**
14
+ * Model baked into a one-shot scaffold instead of {@link DEFAULT_AGENT_MODEL_ID}.
15
+ * Threaded from the same `--model` preset the model box consumes, so the
16
+ * flag keeps working when the model box is skipped.
17
+ */
18
+ presetModel?: string;
19
+ }
20
+ /** The mode plus the model a one-shot run pins, since the model box is skipped. */
21
+ export interface SelectSetupModePayload {
22
+ mode: SetupMode;
23
+ modelId?: string;
24
+ }
25
+ /**
26
+ * THE SETUP-MODE BOX: decide whether the run is the complete onboarding flow
27
+ * or a one-shot scaffold. One-shot pins the default model here because every
28
+ * later interview box (including the model picker) is gated off. The question
29
+ * is skippable, so a headless stack without a preset resolves to "complete"
30
+ * and current headless behavior is unchanged.
31
+ */
32
+ export declare function selectSetupMode(options: SelectSetupModeOptions): SetupBox<SetupState, SetupMode, SelectSetupModePayload>;
@@ -0,0 +1 @@
1
+ import{SkippedSignal,select}from"../ask.js";import{DEFAULT_AGENT_MODEL_ID}from"#shared/default-agent-model.js";function selectSetupMode(n){return{id:`select-setup-mode`,async gather(){if(n.presetMode!==void 0)return n.presetMode;try{return await n.asker.ask(select({key:`setup-mode`,message:`How much should we set up now?`,options:[{id:`complete`,label:`Complete setup`,value:`complete`,hint:`model, channels, connections, deploy`},{id:`one-shot`,label:`One-shot`,value:`one-shot`,hint:`just write the project files`}],recommended:`complete`}))}catch(t){if(t instanceof SkippedSignal)return`complete`;throw t}},async perform({input:e}){return e===`one-shot`?{mode:e,modelId:n.presetModel??DEFAULT_AGENT_MODEL_ID}:{mode:e}},apply(e,t){return{...e,setupMode:t.mode,modelId:t.modelId??e.modelId}}}}export{selectSetupMode};
@@ -0,0 +1,28 @@
1
+ import { type ChannelKind } from "#setup/scaffold/index.js";
2
+ import type { DisabledChannelReasons } from "#setup/cli/index.js";
3
+ /**
4
+ * Existing authored registrations that affect the scaffolded channel picker
5
+ * or would conflict with a generated channel module.
6
+ */
7
+ export interface ExistingChannelRegistrations {
8
+ readonly disabledChannelReasons: DisabledChannelReasons;
9
+ readonly webRouteOwners: readonly string[];
10
+ readonly slackOwners: readonly string[];
11
+ /**
12
+ * Whether the Next.js Web Chat app is already in place (the project depends
13
+ * on `next`). Owning the session route alone (`webRouteOwners`) does not
14
+ * imply the app: every scaffolded agent has `agent/channels/eve.ts` for the
15
+ * dev REPL, while the app only arrives via `--web` or the web scaffold.
16
+ */
17
+ readonly webAppPresent: boolean;
18
+ }
19
+ /**
20
+ * Inspects compiled authored channels so custom filenames still disable the
21
+ * scaffold option for the channel behavior they register.
22
+ */
23
+ export declare function inspectExistingChannelRegistrations(projectRoot: string): Promise<ExistingChannelRegistrations>;
24
+ /**
25
+ * Rejects scaffolding when another authored module already owns behavior
26
+ * emitted by the generated channel module.
27
+ */
28
+ export declare function assertCanAddSelectedChannels(selectedChannels: readonly ChannelKind[], registrations: ExistingChannelRegistrations): void;
@@ -0,0 +1 @@
1
+ import{EVE_CREATE_SESSION_ROUTE_PATH}from"#protocol/routes.js";import{join}from"node:path";import{compileChannelDefinition}from"#compiler/normalize-channel.js";import{discoverAgent}from"#discover/discover-agent.js";import{isNextJsProject}from"#setup/scaffold/index.js";const SCAFFOLDED_WEB_CHANNEL_LOGICAL_PATH=`channels/eve.ts`;async function inspectExistingChannelRegistrations(a){let o=join(a,`agent`),[{manifest:s},c]=await Promise.all([discoverAgent({agentRoot:o,appRoot:a}),isNextJsProject(a)]),l=new Set,u=new Set;for(let t of s.channels){let r=await compileChannelDefinition(o,t),i=Array.isArray(r)?r:[r];for(let n of i)n.kind===`channel`&&(n.method===`POST`&&n.urlPath===EVE_CREATE_SESSION_ROUTE_PATH&&l.add(t.logicalPath),n.adapterKind===`slack`&&u.add(t.logicalPath))}let d={};return[...l].some(e=>e!==SCAFFOLDED_WEB_CHANNEL_LOGICAL_PATH)&&(d.web=`POST ${EVE_CREATE_SESSION_ROUTE_PATH} already registered`),u.size>0&&(d.slack=`Slack channel already registered`),{disabledChannelReasons:d,webRouteOwners:[...l],slackOwners:[...u],webAppPresent:c}}function assertCanAddSelectedChannels(t,n){if(t.includes(`web`)){let t=n.webRouteOwners.find(e=>e!==SCAFFOLDED_WEB_CHANNEL_LOGICAL_PATH);if(t!==void 0)throw Error(`Cannot scaffold Web Chat because agent/${t} already defines POST ${EVE_CREATE_SESSION_ROUTE_PATH}. Web Chat scaffolds the same Eve session routes.`)}if(t.includes(`slack`)){let e=n.slackOwners.find(e=>e!==`channels/slack.ts`);if(e!==void 0)throw Error(`Cannot scaffold Slack because agent/${e} already defines a Slack channel. Slack scaffolding would register the channel again.`)}}export{assertCanAddSelectedChannels,inspectExistingChannelRegistrations};
@@ -0,0 +1,23 @@
1
+ import type { ChannelKind } from "../scaffold/update/channels.js";
2
+ /** Reasons that make scaffoldable channel kinds unavailable in a picker. */
3
+ export type DisabledChannelReasons = Readonly<Partial<Record<ChannelKind, string>>>;
4
+ /** Status and subprocess output operations used by shared setup flows. */
5
+ export interface ChannelSetupLog {
6
+ message(text: string): void;
7
+ info(text: string): void;
8
+ success(text: string): void;
9
+ warning(text: string): void;
10
+ error(text: string): void;
11
+ /** Updates the transient detail beneath the current status while a child command runs. */
12
+ commandOutput(text: string): void;
13
+ /**
14
+ * Starts an ephemeral progress indicator for an async wait, returning a
15
+ * handle whose `stop()` clears it without leaving a transcript line.
16
+ * Mirrors `Prompter["log"]["spinner"]`; optional so plain and headless logs
17
+ * (which have no live status surface) can omit it and callers fall back to
18
+ * a persisted message.
19
+ */
20
+ spinner?(message: string): {
21
+ stop(): void;
22
+ };
23
+ }
@@ -0,0 +1 @@
1
+ export{};
@@ -0,0 +1,8 @@
1
+ /** A selectable connection shown in the onboarding picker. */
2
+ export interface ConnectionSelectOption {
3
+ value: string;
4
+ label: string;
5
+ hint?: string;
6
+ disabled?: boolean;
7
+ disabledReason?: string;
8
+ }
@@ -0,0 +1 @@
1
+ export{};
@@ -1,7 +1,8 @@
1
- export { ChannelAddCancelledError, createChannelAddPrompter, type ChannelAddPrompter, } from "./channel-add-prompter.js";
2
- export { ConnectionAddCancelledError, createConnectionAddPrompter, type ConnectionAddPrompter, type ConnectionSelectOption, type ConnectionSetupSelectOption, type ConnectionTextPrompt, } from "./connection-add-prompter.js";
3
- export { type ChannelPrompt, type ChannelSelectOption, type ChannelSetupLog, type ChannelSetupPrompter, type ChannelSetupPromptValue, type ChannelSetupSelectOption, type DisabledChannelReasons, type DisabledChannelSelectOption, type EnabledChannelSelectOption, } from "./channel-setup-prompter.js";
1
+ export { type ConnectionSelectOption } from "./connection-add-prompter.js";
2
+ export { type ChannelSetupLog, type DisabledChannelReasons } from "./channel-setup-prompter.js";
4
3
  export { createPromptCommandOutput, type PromptCommandLog } from "./command-output.js";
5
4
  export { runSelectComponent, SelectComponent, type SelectGuard } from "./select-component.js";
5
+ export { createSelectOptionCodec, type SelectOptionCodec } from "./select-option-codec.js";
6
6
  export { CORNER, RAIL, bulletFor, cornerFor, formatPromptCancellation, formatPromptHeader, formatPromptOpener, formatPromptOutro, formatPromptSubmission, formatRailLine, railFor, renderMultiselectPrompt, renderOptionRow, renderSearchableSelect, renderSelectPrompt, type PromptColors, type PromptOption, type PromptState, type PromptValue, } from "./prompt-ui.js";
7
7
  export { createRailLog, type RailLog, type RailLogOptions, type RailSpinner } from "./rail-log.js";
8
+ export { whimsyFor, WHIMSY_POOLS, type WhimsyTask } from "./whimsy.js";
@@ -0,0 +1 @@
1
+ import{createPromptCommandOutput}from"./command-output.js";import{CORNER,RAIL,bulletFor,cornerFor,formatPromptCancellation,formatPromptHeader,formatPromptOpener,formatPromptOutro,formatPromptSubmission,formatRailLine,railFor,renderMultiselectPrompt,renderOptionRow,renderSearchableSelect,renderSelectPrompt}from"./prompt-ui.js";import{createSelectOptionCodec}from"./select-option-codec.js";import{SelectComponent,runSelectComponent}from"./select-component.js";import{createRailLog}from"./rail-log.js";import{WHIMSY_POOLS,whimsyFor}from"./whimsy.js";export{CORNER,RAIL,SelectComponent,WHIMSY_POOLS,bulletFor,cornerFor,createPromptCommandOutput,createRailLog,createSelectOptionCodec,formatPromptCancellation,formatPromptHeader,formatPromptOpener,formatPromptOutro,formatPromptSubmission,formatRailLine,railFor,renderMultiselectPrompt,renderOptionRow,renderSearchableSelect,renderSelectPrompt,runSelectComponent,whimsyFor};
@@ -38,6 +38,13 @@ export interface PromptOption<T extends PromptValue> {
38
38
  locked?: boolean;
39
39
  /** Parenthetical shown after a locked row's label, e.g. "always available". */
40
40
  lockedReason?: string;
41
+ /**
42
+ * A leading run of featured options forms a searchable picker's default
43
+ * viewport: with no filter typed, only they are in view, and scrolling or
44
+ * filtering reaches the rest of the list. Featured options must be sorted
45
+ * to the front. Meaningless without `search`.
46
+ */
47
+ featured?: boolean;
41
48
  }
42
49
  /** Vertical rail glyph used by the onboarding-style terminal UI. */
43
50
  export declare const RAIL = "\u2502";
@@ -86,6 +93,8 @@ export declare function renderMultiselectPrompt<T extends PromptValue>(input: {
86
93
  options: readonly PromptOption<T>[];
87
94
  selectedValues: readonly T[];
88
95
  state: PromptState;
96
+ /** Submit-row label, e.g. "Skip" while an optional checklist is empty. */
97
+ submitLabel?: string;
89
98
  }): string;
90
99
  /** Renders the shared single-select interaction used by channel setup. */
91
100
  export declare function renderSelectPrompt<T extends PromptValue>(input: {
@@ -99,19 +108,20 @@ export declare function renderSelectPrompt<T extends PromptValue>(input: {
99
108
  state: PromptState;
100
109
  }): string;
101
110
  /**
102
- * Renders one option row as a single glyph column followed by the label. The
103
- * glyph is a check (`✓`) on a chosen row, a cursor arrow (`›`) on a multi-select
104
- * cursor row that is not yet chosen, otherwise blank. A chosen row keeps its
105
- * check even under the cursor (the bright label marks the cursor), so the check
106
- * always wins over the arrow. Single-select never sets `withCursorArrow` and so
107
- * shows checks only. One glyph column keeps every picker's labels flush.
111
+ * Renders one option row. A single-select row (`checkbox: false`) is a cursor
112
+ * arrow column followed by the label: a subtle `›` marks the highlighted row
113
+ * and every other row leads with a blank. A multi-select row
114
+ * (`checkbox: true`) adds a checkbox column after the arrow: `◼` (green) when
115
+ * chosen, `◻` (dim) when not, so the marked state and the cursor read
116
+ * independently `› label` is the cursor on an unchosen row.
108
117
  *
109
- * A disabled row drops its glyph and strikes through its dimmed label so the
118
+ * A disabled row drops its glyphs and strikes through its dimmed label so the
110
119
  * unavailability reads at a glance, then trails `disabledReason` in parentheses.
111
120
  * A locked row is the inverse: mandatory rather than unavailable, so it keeps a
112
- * dimmed check and a dimmed, un-struck label, then trails `lockedReason`. Both
113
- * reasons stay visible at all times, unlike `hint`, which only shows under the
114
- * cursor, because the cursor skips disabled and locked rows alike.
121
+ * dimmed checked box (or check, in a single-select) and a dimmed, un-struck
122
+ * label, then trails `lockedReason`. Both reasons stay visible at all times,
123
+ * unlike `hint`, which only shows under the cursor, because the cursor skips
124
+ * disabled and locked rows alike.
115
125
  */
116
126
  export declare function renderOptionRow(input: {
117
127
  colors: PromptColors;
@@ -119,19 +129,31 @@ export declare function renderOptionRow(input: {
119
129
  hint?: string;
120
130
  isCursor: boolean;
121
131
  isChecked: boolean;
122
- withCursorArrow: boolean;
132
+ /** Multi-select style: arrow column plus checkbox column. */
133
+ checkbox: boolean;
123
134
  disabled?: boolean;
124
135
  disabledReason?: string;
125
136
  locked?: boolean;
126
137
  lockedReason?: string;
127
138
  }): string;
139
+ /**
140
+ * Renders the virtual Submit row that closes every multi-select list. It has
141
+ * no checkbox — its bold label sits in the checkbox column, trails a green
142
+ * check, and brightens under the cursor; enter confirms the checklist only
143
+ * from here. The label reads "Skip" while an optional checklist has nothing
144
+ * picked (the caller computes that), so an empty confirm is honest about what
145
+ * it does. Callers put a blank rail line above it to set it apart from the
146
+ * options.
147
+ */
148
+ export declare function renderSubmitRow(isCursor: boolean, colors: PromptColors, label?: string): string;
128
149
  /**
129
150
  * Renders the type-ahead select interaction: a filter line, a scrolling window
130
151
  * of options, and a mode-aware help line. Single-select marks the highlighted
131
- * row with a check and submits it on enter; multi-select adds the cursor arrow
132
- * and toggles rows with space. `options` is the already-filtered visible list
133
- * (with `cursor` indexing it); `submitDisplay` is the precomputed answer shown
134
- * once a choice is made.
152
+ * row with the cursor arrow and submits it on enter; multi-select adds the
153
+ * checkbox column, toggles rows with space or enter, and confirms from the
154
+ * pinned Submit row (cursor index `options.length`). `options` is the
155
+ * already-filtered visible list (with `cursor` indexing it); `submitDisplay`
156
+ * is the precomputed answer shown once a choice is made.
135
157
  */
136
158
  export declare function renderSearchableSelect<T extends PromptValue>(input: {
137
159
  colors: PromptColors;
@@ -148,4 +170,6 @@ export declare function renderSearchableSelect<T extends PromptValue>(input: {
148
170
  footerNote?: string;
149
171
  error?: string;
150
172
  viewSize?: number;
173
+ /** Submit-row label, e.g. "Skip" while an optional checklist is empty. */
174
+ submitLabel?: string;
151
175
  }): string;