eve 0.11.1 → 0.11.3

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 (314) hide show
  1. package/CHANGELOG.md +17 -2
  2. package/README.md +11 -11
  3. package/bin/eve.d.ts +1 -1
  4. package/bin/eve.js +6 -6
  5. package/dist/src/channel/routes.d.ts +4 -4
  6. package/dist/src/channel/types.d.ts +2 -2
  7. package/dist/src/channel/websocket-upgrade-server.d.ts +3 -3
  8. package/dist/src/chunks/{use-eve-agent-CdETo3qQ.js → use-eve-agent-D9ZhQhyV.js} +2 -2
  9. package/dist/src/chunks/{use-eve-agent-ClyM-_UT.js → use-eve-agent-DFI0POM9.js} +2 -2
  10. package/dist/src/cli/banner.d.ts +1 -1
  11. package/dist/src/cli/banner.js +1 -1
  12. package/dist/src/cli/commands/channel-add-conflicts.js +1 -1
  13. package/dist/src/cli/commands/channels.js +1 -1
  14. package/dist/src/cli/commands/deploy.js +1 -1
  15. package/dist/src/cli/commands/info.js +1 -1
  16. package/dist/src/cli/commands/init-agent-instructions.md +1 -1
  17. package/dist/src/cli/commands/init-git.js +1 -1
  18. package/dist/src/cli/commands/init.d.ts +1 -1
  19. package/dist/src/cli/commands/link.js +1 -1
  20. package/dist/src/cli/commands/preconditions.d.ts +2 -2
  21. package/dist/src/cli/commands/preconditions.js +1 -1
  22. package/dist/src/cli/dev/environment.d.ts +1 -1
  23. package/dist/src/cli/dev/tui/runner.js +1 -1
  24. package/dist/src/cli/dev/tui/setup-issues.d.ts +2 -0
  25. package/dist/src/cli/dev/tui/setup-issues.js +1 -1
  26. package/dist/src/cli/dev/tui/terminal-renderer.js +2 -2
  27. package/dist/src/cli/dev/tui/theme.d.ts +1 -1
  28. package/dist/src/cli/dev/tui/tui.d.ts +1 -1
  29. package/dist/src/cli/dev/url.d.ts +1 -1
  30. package/dist/src/cli/run.d.ts +1 -1
  31. package/dist/src/cli/run.js +2 -2
  32. package/dist/src/cli/ui/output.d.ts +1 -1
  33. package/dist/src/client/client-error.d.ts +1 -1
  34. package/dist/src/client/client.d.ts +3 -3
  35. package/dist/src/client/eve-agent-store.d.ts +1 -1
  36. package/dist/src/client/eve-agent-store.js +1 -1
  37. package/dist/src/client/message-reducer-types.d.ts +3 -3
  38. package/dist/src/client/message-reducer.d.ts +3 -3
  39. package/dist/src/client/output-schema.d.ts +1 -1
  40. package/dist/src/client/reducer.d.ts +5 -5
  41. package/dist/src/client/session.d.ts +1 -1
  42. package/dist/src/client/types.d.ts +1 -1
  43. package/dist/src/client/url.d.ts +2 -2
  44. package/dist/src/compiled/.vendor-stamp.json +1 -1
  45. package/dist/src/compiled/@vercel/detect-agent/index.d.ts +1 -1
  46. package/dist/src/compiler/channel-instrumentation-types.js +1 -1
  47. package/dist/src/compiler/model-catalog.d.ts +1 -1
  48. package/dist/src/compiler/module-map.js +1 -1
  49. package/dist/src/compiler/normalize-agent-config.js +1 -1
  50. package/dist/src/compiler/normalize-channel.js +1 -1
  51. package/dist/src/compiler/normalize-connection.js +1 -1
  52. package/dist/src/compiler/normalize-instructions.js +1 -1
  53. package/dist/src/compiler/normalize-sandbox.js +1 -1
  54. package/dist/src/compiler/normalize-schedule.js +1 -1
  55. package/dist/src/compiler/normalize-skill.js +1 -1
  56. package/dist/src/compiler/normalize-subagent.js +1 -1
  57. package/dist/src/compiler/normalize-tool.js +1 -1
  58. package/dist/src/compiler/workspace-resources.js +1 -1
  59. package/dist/src/context/build-callback-context.js +1 -1
  60. package/dist/src/context/container.d.ts +4 -4
  61. package/dist/src/context/container.js +1 -1
  62. package/dist/src/discover/diagnostics.d.ts +1 -1
  63. package/dist/src/discover/project.d.ts +2 -2
  64. package/dist/src/discover/project.js +1 -1
  65. package/dist/src/evals/cli/eval-client.d.ts +1 -1
  66. package/dist/src/evals/define-eval.d.ts +1 -1
  67. package/dist/src/evals/runner/execute-eval.d.ts +1 -1
  68. package/dist/src/evals/runner/execute-task.d.ts +1 -1
  69. package/dist/src/evals/types.d.ts +6 -6
  70. package/dist/src/execution/durable-session-migrations/chain.js +1 -1
  71. package/dist/src/execution/sandbox/bash-tool.js +1 -1
  72. package/dist/src/execution/sandbox/bindings/docker-options.d.ts +1 -1
  73. package/dist/src/execution/sandbox/bindings/just-bash-runtime.js +1 -1
  74. package/dist/src/execution/sandbox/bindings/microsandbox-runtime.js +1 -1
  75. package/dist/src/execution/sandbox/bindings/vercel.js +1 -1
  76. package/dist/src/execution/sandbox/development-prewarm.js +1 -1
  77. package/dist/src/execution/sandbox/ensure.js +1 -1
  78. package/dist/src/execution/sandbox/prewarm.js +1 -1
  79. package/dist/src/execution/session-callback-step.d.ts +1 -1
  80. package/dist/src/harness/attachment-staging.js +1 -1
  81. package/dist/src/harness/code-mode-lifecycle.d.ts +1 -1
  82. package/dist/src/harness/code-mode.js +1 -1
  83. package/dist/src/harness/emission.d.ts +1 -1
  84. package/dist/src/harness/runtime-actions.d.ts +1 -1
  85. package/dist/src/harness/tool-loop.js +1 -1
  86. package/dist/src/harness/tools.d.ts +12 -0
  87. package/dist/src/harness/tools.js +1 -1
  88. package/dist/src/internal/application/cache-metadata.d.ts +2 -2
  89. package/dist/src/internal/application/compiled-artifacts.js +2 -2
  90. package/dist/src/internal/application/package.d.ts +7 -7
  91. package/dist/src/internal/application/package.js +1 -1
  92. package/dist/src/internal/authored-module-bundle.js +1 -1
  93. package/dist/src/internal/helpers/markdown.js +1 -1
  94. package/dist/src/internal/instrumentation.d.ts +1 -1
  95. package/dist/src/internal/nitro/host/build-application.d.ts +1 -1
  96. package/dist/src/internal/nitro/host/channel-routes.d.ts +3 -3
  97. package/dist/src/internal/nitro/host/configure-nitro-routes.d.ts +1 -1
  98. package/dist/src/internal/nitro/host/configure-nitro-routes.js +1 -1
  99. package/dist/src/internal/nitro/host/create-application-nitro.d.ts +1 -1
  100. package/dist/src/internal/nitro/host/cron-handler-route.d.ts +3 -3
  101. package/dist/src/internal/nitro/host/nitro-bundler-config.d.ts +1 -1
  102. package/dist/src/internal/nitro/host/optional-engine-dependency-plugin.d.ts +2 -2
  103. package/dist/src/internal/nitro/host/schedule-task-routes.d.ts +2 -2
  104. package/dist/src/internal/nitro/host/start-development-server.d.ts +1 -1
  105. package/dist/src/internal/nitro/host/start-development-server.js +1 -1
  106. package/dist/src/internal/nitro/host/start-production-server.d.ts +1 -1
  107. package/dist/src/internal/nitro/host/start-production-server.js +2 -2
  108. package/dist/src/internal/nitro/routes/agent-info/load-agent-info-data.js +1 -1
  109. package/dist/src/internal/nitro/routes/health.d.ts +1 -1
  110. package/dist/src/internal/nitro/routes/info.d.ts +1 -1
  111. package/dist/src/internal/nitro/routes/runtime-artifacts.js +1 -1
  112. package/dist/src/internal/nitro/routes/schedule-task.d.ts +1 -1
  113. package/dist/src/internal/package-name.d.ts +1 -1
  114. package/dist/src/internal/vercel-agent-summary.d.ts +6 -6
  115. package/dist/src/internal/workflow/builtins.d.ts +3 -3
  116. package/dist/src/internal/workflow-bundle/nitro-step-entry.js +1 -1
  117. package/dist/src/internal/workflow-bundle/vercel-workflow-output.d.ts +7 -7
  118. package/dist/src/internal/workflow-bundle/workflow-core-shim.d.ts +4 -4
  119. package/dist/src/internal/workflow-bundle/workflow-core-shim.js +1 -1
  120. package/dist/src/packages/eve-catalog/src/index.js +1 -1
  121. package/dist/src/protocol/message.d.ts +2 -2
  122. package/dist/src/protocol/routes.d.ts +3 -3
  123. package/dist/src/public/agents/auth.d.ts +1 -1
  124. package/dist/src/public/channels/auth.d.ts +1 -1
  125. package/dist/src/public/channels/discord/api.d.ts +2 -2
  126. package/dist/src/public/channels/discord/discordChannel.d.ts +2 -2
  127. package/dist/src/public/channels/discord/hitl.d.ts +4 -4
  128. package/dist/src/public/channels/discord/verify.d.ts +1 -1
  129. package/dist/src/public/channels/eve.d.ts +5 -5
  130. package/dist/src/public/channels/github/api.d.ts +1 -1
  131. package/dist/src/public/channels/github/defaults.d.ts +1 -1
  132. package/dist/src/public/channels/github/inbound.d.ts +1 -1
  133. package/dist/src/public/channels/index.d.ts +2 -2
  134. package/dist/src/public/channels/linear/auth.d.ts +1 -1
  135. package/dist/src/public/channels/linear/hitl.d.ts +4 -4
  136. package/dist/src/public/channels/linear/inbound.d.ts +1 -1
  137. package/dist/src/public/channels/linear/verify.d.ts +1 -1
  138. package/dist/src/public/channels/slack/constants.d.ts +1 -1
  139. package/dist/src/public/channels/teams/api.d.ts +4 -4
  140. package/dist/src/public/channels/teams/hitl.d.ts +4 -4
  141. package/dist/src/public/channels/teams/limits.d.ts +3 -3
  142. package/dist/src/public/channels/teams/verify.d.ts +2 -2
  143. package/dist/src/public/channels/telegram/api.d.ts +1 -1
  144. package/dist/src/public/channels/telegram/hitl.d.ts +3 -3
  145. package/dist/src/public/channels/telegram/verify.d.ts +1 -1
  146. package/dist/src/public/channels/twilio/api.d.ts +1 -1
  147. package/dist/src/public/context/index.d.ts +1 -1
  148. package/dist/src/public/definitions/defineChannel.d.ts +2 -2
  149. package/dist/src/public/definitions/hook.d.ts +1 -1
  150. package/dist/src/public/definitions/remote-agent.d.ts +5 -5
  151. package/dist/src/public/definitions/sandbox.d.ts +1 -1
  152. package/dist/src/public/definitions/source.d.ts +2 -2
  153. package/dist/src/public/definitions/state.d.ts +2 -2
  154. package/dist/src/public/definitions/state.js +1 -1
  155. package/dist/src/public/instrumentation/index.d.ts +3 -3
  156. package/dist/src/public/next/index.d.ts +12 -12
  157. package/dist/src/public/next/index.js +1 -1
  158. package/dist/src/public/next/server.js +1 -1
  159. package/dist/src/public/next/vercel-output-config.js +1 -1
  160. package/dist/src/public/nuxt/dev-server.d.ts +2 -2
  161. package/dist/src/public/nuxt/dev-server.js +1 -1
  162. package/dist/src/public/nuxt/module.d.ts +10 -10
  163. package/dist/src/public/nuxt/routing.d.ts +6 -6
  164. package/dist/src/public/nuxt/routing.js +1 -1
  165. package/dist/src/public/nuxt/vercel-json.d.ts +2 -2
  166. package/dist/src/public/sandbox/backends/just-bash.d.ts +1 -1
  167. package/dist/src/public/sandbox/backends/microsandbox.d.ts +1 -1
  168. package/dist/src/public/sandbox/backends/vercel.d.ts +1 -1
  169. package/dist/src/public/sandbox/docker-sandbox.d.ts +1 -1
  170. package/dist/src/public/sandbox/just-bash-sandbox.d.ts +1 -1
  171. package/dist/src/public/sandbox/microsandbox-sandbox.d.ts +3 -3
  172. package/dist/src/public/sandbox/vercel-sandbox.d.ts +2 -2
  173. package/dist/src/public/sveltekit/dev-server.d.ts +2 -2
  174. package/dist/src/public/sveltekit/dev-server.js +1 -1
  175. package/dist/src/public/sveltekit/index.d.ts +11 -11
  176. package/dist/src/public/sveltekit/routing.d.ts +5 -5
  177. package/dist/src/public/sveltekit/routing.js +1 -1
  178. package/dist/src/public/sveltekit/vercel-json.d.ts +2 -2
  179. package/dist/src/public/tool-result-narrowing.js +1 -1
  180. package/dist/src/public/types/json.d.ts +1 -1
  181. package/dist/src/react/use-eve-agent.d.ts +8 -8
  182. package/dist/src/runtime/agent/bootstrap-model.js +1 -1
  183. package/dist/src/runtime/agent/bootstrap.d.ts +1 -1
  184. package/dist/src/runtime/agent/bootstrap.js +1 -1
  185. package/dist/src/runtime/agent/mock-model-adapter.js +1 -1
  186. package/dist/src/runtime/agent/resolve-model.js +1 -1
  187. package/dist/src/runtime/attributes/emit.d.ts +2 -2
  188. package/dist/src/runtime/connections/callback-route.d.ts +1 -1
  189. package/dist/src/runtime/connections/principal.js +1 -1
  190. package/dist/src/runtime/connections/scoped-authorization.d.ts +1 -1
  191. package/dist/src/runtime/connections/types.d.ts +4 -4
  192. package/dist/src/runtime/framework-tools/final-output.d.ts +1 -1
  193. package/dist/src/runtime/governance/auth/http-basic.d.ts +1 -1
  194. package/dist/src/runtime/governance/auth/token-claims.d.ts +1 -1
  195. package/dist/src/runtime/governance/auth/types.d.ts +1 -1
  196. package/dist/src/runtime/loaders/artifact-paths.d.ts +1 -1
  197. package/dist/src/runtime/loaders/compile-metadata.js +1 -1
  198. package/dist/src/runtime/loaders/manifest.js +1 -1
  199. package/dist/src/runtime/loaders/module-map.js +1 -1
  200. package/dist/src/runtime/prompt/compose.js +1 -1
  201. package/dist/src/runtime/resolve-channel.js +1 -1
  202. package/dist/src/runtime/schedules/register.js +1 -1
  203. package/dist/src/runtime/sessions/auth.d.ts +1 -1
  204. package/dist/src/runtime/sessions/runtime-session.d.ts +1 -1
  205. package/dist/src/runtime/types.d.ts +1 -1
  206. package/dist/src/runtime/workspace/types.d.ts +1 -1
  207. package/dist/src/services/dev-client/request-headers.d.ts +2 -2
  208. package/dist/src/services/dev-client/vercel-auth-error.d.ts +1 -1
  209. package/dist/src/services/inspect-application.d.ts +1 -1
  210. package/dist/src/setup/boxes/add-channels.d.ts +1 -1
  211. package/dist/src/setup/boxes/add-channels.js +1 -1
  212. package/dist/src/setup/boxes/deploy-project.js +1 -1
  213. package/dist/src/setup/boxes/resolve-target.d.ts +2 -2
  214. package/dist/src/setup/boxes/scaffold.d.ts +4 -4
  215. package/dist/src/setup/boxes/scaffold.js +1 -1
  216. package/dist/src/setup/channel-add-conflicts.js +1 -1
  217. package/dist/src/setup/cli/rail-log.d.ts +1 -1
  218. package/dist/src/setup/flows/model.d.ts +3 -5
  219. package/dist/src/setup/flows/model.js +1 -1
  220. package/dist/src/setup/node-engine.d.ts +5 -5
  221. package/dist/src/setup/node-engine.js +1 -1
  222. package/dist/src/setup/onboarding.d.ts +2 -2
  223. package/dist/src/setup/primitives/open-url.d.ts +1 -1
  224. package/dist/src/setup/primitives/pm/pnpm.js +1 -1
  225. package/dist/src/setup/primitives/pm/run.d.ts +1 -1
  226. package/dist/src/setup/primitives/pm/types.d.ts +1 -1
  227. package/dist/src/setup/scaffold/connections/catalog.d.ts +1 -1
  228. package/dist/src/setup/scaffold/create/add-to-project.d.ts +2 -2
  229. package/dist/src/setup/scaffold/create/add-to-project.js +1 -1
  230. package/dist/src/setup/scaffold/create/project.d.ts +5 -5
  231. package/dist/src/setup/scaffold/create/project.js +3 -3
  232. package/dist/src/setup/scaffold/create/web-template.d.ts +2 -2
  233. package/dist/src/setup/scaffold/create/web-template.js +2 -2
  234. package/dist/src/setup/scaffold/update/package-json.d.ts +1 -1
  235. package/dist/src/setup/slack-connect-lifecycle.d.ts +2 -2
  236. package/dist/src/setup/slack-connect-lifecycle.js +1 -1
  237. package/dist/src/setup/slackbot.d.ts +1 -1
  238. package/dist/src/setup/slackbot.js +1 -1
  239. package/dist/src/setup/validate-gateway-key.d.ts +1 -1
  240. package/dist/src/setup/vercel-project.js +1 -1
  241. package/dist/src/shared/agent-definition.d.ts +15 -15
  242. package/dist/src/shared/code-mode.d.ts +3 -3
  243. package/dist/src/shared/json-schema.d.ts +1 -1
  244. package/dist/src/shared/model-endpoint-status.d.ts +2 -2
  245. package/dist/src/shared/sandbox-backend.d.ts +4 -4
  246. package/dist/src/shared/sandbox-definition.d.ts +3 -3
  247. package/dist/src/shared/sandbox-network-policy.d.ts +1 -1
  248. package/dist/src/shared/sandbox-session.d.ts +2 -2
  249. package/dist/src/shared/skill-package.d.ts +1 -1
  250. package/dist/src/shared/skill-package.js +1 -1
  251. package/dist/src/shared/tool-definition.d.ts +1 -1
  252. package/dist/src/svelte/index.js +1 -1
  253. package/dist/src/svelte/use-eve-agent.d.ts +7 -7
  254. package/dist/src/svelte/use-eve-agent.js +1 -1
  255. package/dist/src/vue/index.js +1 -1
  256. package/dist/src/vue/use-eve-agent.d.ts +7 -7
  257. package/dist/src/vue/use-eve-agent.js +1 -1
  258. package/docs/README.md +11 -11
  259. package/docs/agent-config.md +2 -2
  260. package/docs/channels/custom.mdx +5 -5
  261. package/docs/channels/discord.mdx +3 -3
  262. package/docs/channels/eve.mdx +7 -7
  263. package/docs/channels/linear.mdx +6 -6
  264. package/docs/channels/overview.mdx +11 -11
  265. package/docs/channels/slack.mdx +4 -4
  266. package/docs/channels/teams.mdx +2 -2
  267. package/docs/channels/telegram.mdx +3 -3
  268. package/docs/channels/twilio.mdx +1 -1
  269. package/docs/concepts/context-control.md +5 -5
  270. package/docs/concepts/default-harness.md +16 -16
  271. package/docs/concepts/execution-model-and-durability.md +9 -9
  272. package/docs/concepts/security-model.md +9 -9
  273. package/docs/concepts/sessions-runs-and-streaming.md +30 -30
  274. package/docs/connections.mdx +11 -11
  275. package/docs/evals/judge.mdx +2 -2
  276. package/docs/evals/overview.mdx +2 -2
  277. package/docs/evals/reporters.mdx +2 -2
  278. package/docs/getting-started.mdx +12 -10
  279. package/docs/guides/auth-and-route-protection.md +6 -6
  280. package/docs/guides/client/continuations.mdx +3 -3
  281. package/docs/guides/client/output-schema.mdx +1 -1
  282. package/docs/guides/client/overview.mdx +5 -5
  283. package/docs/guides/client/streaming.mdx +1 -1
  284. package/docs/guides/deployment.md +7 -7
  285. package/docs/guides/dev-tui.md +2 -2
  286. package/docs/guides/frontend/nextjs.mdx +13 -13
  287. package/docs/guides/frontend/nuxt.mdx +7 -7
  288. package/docs/guides/frontend/overview.mdx +13 -13
  289. package/docs/guides/frontend/sveltekit.mdx +7 -7
  290. package/docs/guides/frontend/use-eve-agent-svelte.mdx +6 -6
  291. package/docs/guides/frontend/use-eve-agent-vue.mdx +6 -6
  292. package/docs/guides/hooks.md +2 -2
  293. package/docs/guides/instrumentation.md +12 -12
  294. package/docs/guides/remote-agents.md +4 -4
  295. package/docs/guides/session-context.md +4 -4
  296. package/docs/guides/state.md +1 -1
  297. package/docs/instructions.mdx +4 -4
  298. package/docs/introduction.mdx +14 -12
  299. package/docs/reference/cli.md +5 -5
  300. package/docs/reference/project-layout.md +4 -4
  301. package/docs/responsible-use.md +3 -3
  302. package/docs/sandbox.mdx +8 -8
  303. package/docs/schedules.mdx +1 -1
  304. package/docs/skills.mdx +4 -4
  305. package/docs/subagents.mdx +3 -3
  306. package/docs/tools/human-in-the-loop.md +83 -0
  307. package/docs/tools/meta.json +4 -0
  308. package/docs/{tools.mdx → tools/overview.mdx} +14 -37
  309. package/docs/tutorial/connect-a-warehouse.mdx +3 -3
  310. package/docs/tutorial/first-agent.mdx +2 -2
  311. package/docs/tutorial/how-it-runs.mdx +2 -2
  312. package/docs/tutorial/query-sample-data.mdx +1 -1
  313. package/docs/tutorial/ship-it.mdx +4 -4
  314. package/package.json +1 -1
@@ -2,16 +2,16 @@ import type { Plugin } from "vite";
2
2
  import { EVE_SVELTEKIT_SERVICE_PREFIX } from "./routing.js";
3
3
  export { EVE_SVELTEKIT_SERVICE_PREFIX };
4
4
  /**
5
- * Options for the Eve SvelteKit Vite plugin.
5
+ * Options for the eve SvelteKit Vite plugin.
6
6
  */
7
7
  export interface EveSvelteKitPluginOptions {
8
8
  /**
9
- * Path to the Eve application root, relative to the SvelteKit project root
9
+ * Path to the eve application root, relative to the SvelteKit project root
10
10
  * unless absolute. Defaults to the SvelteKit project root.
11
11
  */
12
12
  readonly eveRoot?: string;
13
13
  /**
14
- * Build command for the generated Eve Vercel service.
14
+ * Build command for the generated eve Vercel service.
15
15
  * Defaults to `"eve build"`.
16
16
  */
17
17
  readonly eveBuildCommand?: string;
@@ -19,26 +19,26 @@ export interface EveSvelteKitPluginOptions {
19
19
  * Set to `false` to skip creating or updating `vercel.json`.
20
20
  *
21
21
  * By default the plugin ensures `vercel.json` contains `experimentalServices`
22
- * for the SvelteKit app and Eve app.
22
+ * for the SvelteKit app and eve app.
23
23
  */
24
24
  readonly configureVercelJson?: boolean;
25
25
  /**
26
- * Private Vercel service prefix for the Eve deployment. Must match the
27
- * Eve service's `routePrefix` in `vercel.json`. Defaults to
26
+ * Private Vercel service prefix for the eve deployment. Must match the
27
+ * eve service's `routePrefix` in `vercel.json`. Defaults to
28
28
  * {@link EVE_SVELTEKIT_SERVICE_PREFIX} (`"/_eve_internal/eve"`).
29
29
  */
30
30
  readonly servicePrefix?: string;
31
31
  }
32
32
  /**
33
- * Vite plugin for running an Eve agent alongside a SvelteKit app.
33
+ * Vite plugin for running an eve agent alongside a SvelteKit app.
34
34
  *
35
- * In development and local preview, `eveSvelteKit` proxies Eve protocol
36
- * endpoints to a local Eve server. It resolves the server in order: the
37
- * `EVE_BASE_URL` env var if set, then a healthy shared Eve dev server already
35
+ * In development and local preview, `eveSvelteKit` proxies eve protocol
36
+ * endpoints to a local eve server. It resolves the server in order: the
37
+ * `EVE_BASE_URL` env var if set, then a healthy shared eve dev server already
38
38
  * running for the app, then a freshly spawned `eve dev --no-ui --port 0`.
39
39
  *
40
40
  * During builds, unless `configureVercelJson` is `false`, it ensures
41
- * `vercel.json` deploys the SvelteKit app and Eve agent as sibling Vercel
41
+ * `vercel.json` deploys the SvelteKit app and eve agent as sibling Vercel
42
42
  * services.
43
43
  */
44
44
  export declare function eveSvelteKit(options?: EveSvelteKitPluginOptions): Plugin;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Private route namespace for hosting Eve as a separate experimental Vercel
2
+ * Private route namespace for hosting eve as a separate experimental Vercel
3
3
  * service behind the SvelteKit app.
4
4
  */
5
5
  export declare const EVE_SVELTEKIT_SERVICE_PREFIX = "/_eve_internal/eve";
@@ -18,15 +18,15 @@ export declare function joinRoutePrefix(prefix: string, path: string): string;
18
18
  */
19
19
  export declare function normalizeOrigin(origin: string): string;
20
20
  /**
21
- * A Vercel rewrite that forwards Eve transport requests (`/eve/v1/**`) to the
22
- * private Eve service prefix (`/_eve_internal/eve/eve/v1/**`).
21
+ * A Vercel rewrite that forwards eve transport requests (`/eve/v1/**`) to the
22
+ * private eve service prefix (`/_eve_internal/eve/eve/v1/**`).
23
23
  */
24
24
  export interface EveVercelRewrite {
25
25
  readonly destination: string;
26
26
  readonly source: string;
27
27
  }
28
28
  /**
29
- * Build the Vercel rewrite that forwards browser Eve transport requests to the
30
- * sibling Eve service.
29
+ * Build the Vercel rewrite that forwards browser eve transport requests to the
30
+ * sibling eve service.
31
31
  */
32
32
  export declare function createEveVercelRewrite(servicePrefix: string): EveVercelRewrite;
@@ -1 +1 @@
1
- import{EVE_ROUTE_PREFIX}from"#protocol/routes.js";const EVE_SVELTEKIT_SERVICE_PREFIX=`/_eve_internal/eve`;function normalizeRoutePrefix(e){let t=(e.startsWith(`/`)?e:`/${e}`).replace(/\/+$/,``);if(t.length===0)throw Error(`Eve SvelteKit service prefix cannot resolve to the root route.`);return t}function joinRoutePrefix(e,t){return`${e.replace(/\/+$/,``)}/${t.replace(/^\/+/,``)}`}function normalizeOrigin(e){return new URL(e.trim()).origin}function createEveVercelRewrite(t){return{destination:`${joinRoutePrefix(t,EVE_ROUTE_PREFIX)}/:path*`,source:`${EVE_ROUTE_PREFIX}/:path*`}}export{EVE_SVELTEKIT_SERVICE_PREFIX,createEveVercelRewrite,joinRoutePrefix,normalizeOrigin,normalizeRoutePrefix};
1
+ import{EVE_ROUTE_PREFIX}from"#protocol/routes.js";const EVE_SVELTEKIT_SERVICE_PREFIX=`/_eve_internal/eve`;function normalizeRoutePrefix(e){let t=(e.startsWith(`/`)?e:`/${e}`).replace(/\/+$/,``);if(t.length===0)throw Error(`eve SvelteKit service prefix cannot resolve to the root route.`);return t}function joinRoutePrefix(e,t){return`${e.replace(/\/+$/,``)}/${t.replace(/^\/+/,``)}`}function normalizeOrigin(e){return new URL(e.trim()).origin}function createEveVercelRewrite(t){return{destination:`${joinRoutePrefix(t,EVE_ROUTE_PREFIX)}/:path*`,source:`${EVE_ROUTE_PREFIX}/:path*`}}export{EVE_SVELTEKIT_SERVICE_PREFIX,createEveVercelRewrite,joinRoutePrefix,normalizeOrigin,normalizeRoutePrefix};
@@ -2,10 +2,10 @@ export interface EnsureVercelJsonResult {
2
2
  readonly servicePrefix: string;
3
3
  }
4
4
  /**
5
- * Ensure `vercel.json` declares the SvelteKit web service and the Eve agent
5
+ * Ensure `vercel.json` declares the SvelteKit web service and the eve agent
6
6
  * service so a Vercel deployment ships both from one project.
7
7
  *
8
- * Existing services are preserved untouched; an already-configured Eve
8
+ * Existing services are preserved untouched; an already-configured eve
9
9
  * service's `routePrefix` wins over {@link input.servicePrefix}. The file is
10
10
  * only rewritten when the resulting config differs from what is on disk.
11
11
  */
@@ -1 +1 @@
1
- const DEFINITION_KEY=Symbol.for(`eve.definition-source-key`),REGISTRY_SYMBOL=Symbol.for(`eve.definition-source-registry`),registryContainer=globalThis;registryContainer[REGISTRY_SYMBOL]===void 0&&(registryContainer[REGISTRY_SYMBOL]=new Map);const definitionSourceRegistry=registryContainer[REGISTRY_SYMBOL];function stampDefinitionKey(t,n){Object.defineProperty(t,DEFINITION_KEY,{configurable:!0,value:n})}function readDefinitionKey(t){if(DEFINITION_KEY in t)return t[DEFINITION_KEY]}function registerDefinitionSource(e,t){let n=definitionSourceRegistry.get(e);if(n!==void 0&&!sameDefinitionSourceEntry(n,t)){n.kind!==`ambiguous`&&console.warn([`Eve could not assign a unique toolResultFrom identity for ${JSON.stringify(e)}.`,`Conflicting definitions: ${formatDefinitionSourceForWarning(n)} and ${formatDefinitionSourceForWarning(t)}.`,`Multiple authored definitions share that fallback identity, so toolResultFrom will not match through it.`,`Use the original definition object loaded by Eve so source-derived identity can be used instead.`].join(` `)),definitionSourceRegistry.set(e,{kind:`ambiguous`});return}definitionSourceRegistry.set(e,t)}function sameDefinitionSourceEntry(e,t){return e.kind===t.kind?e.name===t.name:!1}function formatDefinitionSourceForWarning(e){return e.logicalPath===void 0?`${e.kind} "${e.name}"`:`${e.kind} "${e.name}" from "${e.logicalPath}"`}const toolResultFrom=toolResultFromImpl;function toolResultFromImpl(e,t){if(e.kind!==`tool-result`||e.isError===!0)return;let n=readDefinitionKey(t);if(n===void 0)return;let r=definitionSourceRegistry.get(n);if(r===void 0||r.kind===`ambiguous`)return;if(r.kind===`tool`)return e.toolName===r.name?{callId:e.callId,output:e.output,toolName:e.toolName}:void 0;let i=r.name+`__`;if(e.toolName.startsWith(i))return{callId:e.callId,connectionToolName:e.toolName.slice(i.length),output:e.output,toolName:e.toolName}}export{registerDefinitionSource,stampDefinitionKey,toolResultFrom};
1
+ const DEFINITION_KEY=Symbol.for(`eve.definition-source-key`),REGISTRY_SYMBOL=Symbol.for(`eve.definition-source-registry`),registryContainer=globalThis;registryContainer[REGISTRY_SYMBOL]===void 0&&(registryContainer[REGISTRY_SYMBOL]=new Map);const definitionSourceRegistry=registryContainer[REGISTRY_SYMBOL];function stampDefinitionKey(t,n){Object.defineProperty(t,DEFINITION_KEY,{configurable:!0,value:n})}function readDefinitionKey(t){if(DEFINITION_KEY in t)return t[DEFINITION_KEY]}function registerDefinitionSource(e,t){let n=definitionSourceRegistry.get(e);if(n!==void 0&&!sameDefinitionSourceEntry(n,t)){n.kind!==`ambiguous`&&console.warn([`eve could not assign a unique toolResultFrom identity for ${JSON.stringify(e)}.`,`Conflicting definitions: ${formatDefinitionSourceForWarning(n)} and ${formatDefinitionSourceForWarning(t)}.`,`Multiple authored definitions share that fallback identity, so toolResultFrom will not match through it.`,`Use the original definition object loaded by eve so source-derived identity can be used instead.`].join(` `)),definitionSourceRegistry.set(e,{kind:`ambiguous`});return}definitionSourceRegistry.set(e,t)}function sameDefinitionSourceEntry(e,t){return e.kind===t.kind?e.name===t.name:!1}function formatDefinitionSourceForWarning(e){return e.logicalPath===void 0?`${e.kind} "${e.name}"`:`${e.kind} "${e.name}" from "${e.logicalPath}"`}const toolResultFrom=toolResultFromImpl;function toolResultFromImpl(e,t){if(e.kind!==`tool-result`||e.isError===!0)return;let n=readDefinitionKey(t);if(n===void 0)return;let r=definitionSourceRegistry.get(n);if(r===void 0||r.kind===`ambiguous`)return;if(r.kind===`tool`)return e.toolName===r.name?{callId:e.callId,output:e.output,toolName:e.toolName}:void 0;let i=r.name+`__`;if(e.toolName.startsWith(i))return{callId:e.callId,connectionToolName:e.toolName.slice(i.length),output:e.output,toolName:e.toolName}}export{registerDefinitionSource,stampDefinitionKey,toolResultFrom};
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Shared JSON primitive used by public Eve APIs that need to declare
2
+ * Shared JSON primitive used by public eve APIs that need to declare
3
3
  * author-supplied values as JSON-serializable.
4
4
  *
5
5
  * The canonical use site is {@link AuthorizationDefinition}, whose
@@ -6,7 +6,7 @@ import type { HandleMessageStreamEvent } from "#protocol/message.js";
6
6
  import type { ClientAuth, HeadersValue, SendTurnPayload, SessionState } from "#client/types.js";
7
7
  export type { PrepareSend };
8
8
  /**
9
- * Lifecycle status of an Eve agent session.
9
+ * Lifecycle status of an eve agent session.
10
10
  *
11
11
  * - `"ready"`: idle, accepting a new turn.
12
12
  * - `"submitted"`: a turn was sent, no stream events received yet.
@@ -15,7 +15,7 @@ export type { PrepareSend };
15
15
  */
16
16
  export type UseEveAgentStatus = EveAgentStoreStatus;
17
17
  /**
18
- * Snapshot of an Eve agent session: `data` (the reducer projection), `events`
18
+ * Snapshot of an eve agent session: `data` (the reducer projection), `events`
19
19
  * (the authoritative server stream), `session` (resumable cursor), `status`,
20
20
  * and `error`.
21
21
  */
@@ -32,7 +32,7 @@ export interface UseEveAgentHelpers<TData> extends UseEveAgentSnapshot<TData> {
32
32
  readonly stop: () => void;
33
33
  }
34
34
  /**
35
- * Configuration for creating or binding a React Eve agent session.
35
+ * Configuration for creating or binding a React eve agent session.
36
36
  *
37
37
  * Session configuration is read when the hook creates its internal store;
38
38
  * remount the component to point at a different host, reducer, or session.
@@ -45,11 +45,11 @@ export interface UseEveAgentOptions<TData> extends EveAgentStoreCallbacks<TData>
45
45
  readonly auth?: ClientAuth;
46
46
  readonly headers?: HeadersValue;
47
47
  /**
48
- * Base URL for Eve client requests.
48
+ * Base URL for eve client requests.
49
49
  *
50
- * Defaults to same-origin Eve routes such as `/eve/v1/...`. Pass a same-origin
50
+ * Defaults to same-origin eve routes such as `/eve/v1/...`. Pass a same-origin
51
51
  * prefix such as `/api` for an app-owned proxy, or an absolute origin to talk
52
- * to an Eve server directly.
52
+ * to an eve server directly.
53
53
  *
54
54
  * @default ""
55
55
  */
@@ -58,11 +58,11 @@ export interface UseEveAgentOptions<TData> extends EveAgentStoreCallbacks<TData>
58
58
  readonly initialSession?: SessionState;
59
59
  readonly maxReconnectAttempts?: number;
60
60
  /**
61
- * Project submitted user messages before Eve confirms them with a
61
+ * Project submitted user messages before eve confirms them with a
62
62
  * `message.received` stream event.
63
63
  *
64
64
  * Optimistic events are reducer-facing projection events only. They are not
65
- * exposed through `events`, which remains the authoritative Eve stream.
65
+ * exposed through `events`, which remains the authoritative eve stream.
66
66
  *
67
67
  * @default true
68
68
  */
@@ -1 +1 @@
1
- import{MockLanguageModelV3}from"ai/test";import{BOOTSTRAP_RUNTIME_MODEL_ID}from"#runtime/agent/bootstrap.js";import{createBootstrapGenerateResult,createBootstrapStreamResult,estimateTokenCount,getLastUserPromptText,getPromptText}from"#runtime/agent/bootstrap-model-utils.js";const bootstrapRuntimeModels=new Map;function resolveBootstrapRuntimeModel(n){if(n.id!==BOOTSTRAP_RUNTIME_MODEL_ID)return null;let i=bootstrapRuntimeModels.get(n.id);if(i!==void 0)return i;let a=new MockLanguageModelV3({doGenerate:async e=>createBootstrapModelResult(e.prompt,n.id),doStream:async e=>createBootstrapStreamResult(createBootstrapModelResult(e.prompt,n.id)),modelId:n.id,provider:`eve-bootstrap`});return bootstrapRuntimeModels.set(n.id,a),a}function createBootstrapModelResult(e,t){let r=`Bootstrap reply: ${getLastUserPromptText(e)??`Hello from Eve`}`;return createBootstrapGenerateResult({inputTokens:estimateTokenCount(getPromptText(e)),modelId:t,outputTokens:estimateTokenCount(r),text:r})}export{resolveBootstrapRuntimeModel};
1
+ import{MockLanguageModelV3}from"ai/test";import{BOOTSTRAP_RUNTIME_MODEL_ID}from"#runtime/agent/bootstrap.js";import{createBootstrapGenerateResult,createBootstrapStreamResult,estimateTokenCount,getLastUserPromptText,getPromptText}from"#runtime/agent/bootstrap-model-utils.js";const bootstrapRuntimeModels=new Map;function resolveBootstrapRuntimeModel(n){if(n.id!==BOOTSTRAP_RUNTIME_MODEL_ID)return null;let i=bootstrapRuntimeModels.get(n.id);if(i!==void 0)return i;let a=new MockLanguageModelV3({doGenerate:async e=>createBootstrapModelResult(e.prompt,n.id),doStream:async e=>createBootstrapStreamResult(createBootstrapModelResult(e.prompt,n.id)),modelId:n.id,provider:`eve-bootstrap`});return bootstrapRuntimeModels.set(n.id,a),a}function createBootstrapModelResult(e,t){let r=`Bootstrap reply: ${getLastUserPromptText(e)??`Hello from eve`}`;return createBootstrapGenerateResult({inputTokens:estimateTokenCount(getPromptText(e)),modelId:t,outputTokens:estimateTokenCount(r),text:r})}export{resolveBootstrapRuntimeModel};
@@ -32,7 +32,7 @@ export interface RuntimeTurnAgent {
32
32
  /**
33
33
  * Static system prompt for the bootstrap runtime path.
34
34
  */
35
- export declare const BOOTSTRAP_RUNTIME_SYSTEM_PROMPT = "You are the Eve bootstrap agent. Be concise, stay grounded in the current conversation, and do not assume tools are available unless the runtime provides them.";
35
+ export declare const BOOTSTRAP_RUNTIME_SYSTEM_PROMPT = "You are the eve bootstrap agent. Be concise, stay grounded in the current conversation, and do not assume tools are available unless the runtime provides them.";
36
36
  /**
37
37
  * Creates the runtime-owned turn-preparation shape from a resolved authored
38
38
  * agent and the authored tool descriptors prepared for the harness.
@@ -1 +1 @@
1
- import{composeRuntimeBasePrompt}from"#runtime/prompt/compose.js";const BOOTSTRAP_RUNTIME_MODEL_ID=`eve-bootstrap-model`,BOOTSTRAP_RUNTIME_SYSTEM_PROMPT=`You are the Eve bootstrap agent. Be concise, stay grounded in the current conversation, and do not assume tools are available unless the runtime provides them.`;function createResolvedRuntimeTurnAgent(e){let t=e.agent;return{id:t.config.name,instructions:composeRuntimeBasePrompt({connections:t.connections,instructions:t.instructions,skills:t.skills,toolsAvailable:e.tools.length>0,workspaceSpec:t.workspaceSpec}),compactionModel:t.config.compaction?.model,model:t.config.model,nodeId:e.nodeId,outputSchema:t.config.outputSchema,tools:[...e.tools],workspaceSpec:t.workspaceSpec}}export{BOOTSTRAP_RUNTIME_MODEL_ID,BOOTSTRAP_RUNTIME_SYSTEM_PROMPT,createResolvedRuntimeTurnAgent};
1
+ import{composeRuntimeBasePrompt}from"#runtime/prompt/compose.js";const BOOTSTRAP_RUNTIME_MODEL_ID=`eve-bootstrap-model`,BOOTSTRAP_RUNTIME_SYSTEM_PROMPT=`You are the eve bootstrap agent. Be concise, stay grounded in the current conversation, and do not assume tools are available unless the runtime provides them.`;function createResolvedRuntimeTurnAgent(e){let t=e.agent;return{id:t.config.name,instructions:composeRuntimeBasePrompt({connections:t.connections,instructions:t.instructions,skills:t.skills,toolsAvailable:e.tools.length>0,workspaceSpec:t.workspaceSpec}),compactionModel:t.config.compaction?.model,model:t.config.model,nodeId:e.nodeId,outputSchema:t.config.outputSchema,tools:[...e.tools],workspaceSpec:t.workspaceSpec}}export{BOOTSTRAP_RUNTIME_MODEL_ID,BOOTSTRAP_RUNTIME_SYSTEM_PROMPT,createResolvedRuntimeTurnAgent};
@@ -1,4 +1,4 @@
1
- import{z}from"#compiled/zod/index.js";import{CODE_MODE_TOOL_NAME}from"#shared/code-mode.js";import{LOAD_SKILL_TOOL_NAME}from"#runtime/skills/fragment-context.js";import{FINAL_OUTPUT_TOOL_NAME}from"#runtime/framework-tools/final-output.js";import{MockLanguageModelV3}from"ai/test";import{BOOTSTRAP_RUNTIME_MODEL_ID,BOOTSTRAP_RUNTIME_SYSTEM_PROMPT}from"#runtime/agent/bootstrap.js";import{createBootstrapGenerateResult,createBootstrapStreamResult,estimateTokenCount,getLastUserPromptText,getPromptContentText,getPromptText}from"#runtime/agent/bootstrap-model-utils.js";import{createMockAuthoredToolInput,formatToolOutput,resolveMockFixtureToken,resolveWeatherCity}from"#runtime/agent/mock-model-fixtures.js";import{findRelevantSkill,getActivatedSkillIds,getAvailableSkills}from"#runtime/agent/mock-model-skill-selection.js";import{createJsonSchemaSample}from"#runtime/agent/mock-structured-output.js";const authoredRuntimeModelMocks=new Map,bootstrapWeatherPayloadSchema=z.object({city:z.string(),condition:z.string(),summary:z.string(),temperatureF:z.number().finite()}).strict();function shouldMockAuthoredRuntimeModels(){return process.env.NODE_ENV===`test`}function createMockAuthoredRuntimeModel(e){let t=authoredRuntimeModelMocks.get(e.id);if(t!==void 0)return t;let n=new MockLanguageModelV3({modelId:e.id,provider:`eve-runtime-mock`,doGenerate:async t=>createMockModelResult(t,e.id),doStream:async t=>createBootstrapStreamResult(createMockModelResult(t,e.id))});return authoredRuntimeModelMocks.set(e.id,n),n}function createMockModelResult(e,t){let n=getLastAuthoredToolResult(e.prompt);if(n!==null){let r=createFollowUpToolCallResult({modelId:t,options:e,result:n});if(r!==null)return r}else{let n=createSkillLoadResult(e.prompt,t)??createAuthoredToolCallResult(e,t);if(n!==null)return n}let r=createFinalOutputResult(e,t);if(r!==null)return r;let i=n===null?createAssistantMessage(e.prompt):formatToolResultReply(n,e.prompt);return createBootstrapGenerateResult({inputTokens:estimateTokenCount(getPromptText(e.prompt)),modelId:t,outputTokens:estimateTokenCount(i),text:i})}function createFinalOutputResult(e,t){let n=getAvailableTools(e).find(e=>e.name===FINAL_OUTPUT_TOOL_NAME);if(n===void 0)return null;let i=createJsonSchemaSample(n.inputSchema);return createToolCallGenerateResult({input:i,inputTokens:estimateTokenCount(getPromptText(e.prompt)),modelId:t,outputTokens:estimateTokenCount(JSON.stringify(i)),toolCallId:createToolCallId(FINAL_OUTPUT_TOOL_NAME),toolName:FINAL_OUTPUT_TOOL_NAME})}function resolveMockAuthoredRuntimeModel(e){return!shouldMockAuthoredRuntimeModels()||e.id===BOOTSTRAP_RUNTIME_MODEL_ID?null:createMockAuthoredRuntimeModel(e)}function createSkillLoadResult(e,t){let r=getLastUserPromptText(e);if(r===null||getActivatedSkillIds(e).length>0)return null;let i=findRelevantSkill(getAvailableSkills(e),r);return i===null?null:createToolCallGenerateResult({input:{skill:i.name},inputTokens:estimateTokenCount(getPromptText(e)),modelId:t,outputTokens:estimateTokenCount(i.name),toolCallId:`call_load_skill`,toolName:LOAD_SKILL_TOOL_NAME})}function createAuthoredToolCallResult(e,n){let r=getLastUserPromptText(e.prompt);if(r===null)return null;let i=findRelevantTool(getAvailableTools(e),r);if(i===null)return null;let a=resolveWeatherCity(r),o=createMockAuthoredToolInput(i,r,a);if(i.name===CODE_MODE_TOOL_NAME){let t=findRelevantCodeModeHostTool(i.description,r);if(t===null)return null;let o=`return await tools${formatCodeModeToolAccess(t)}({ city: ${JSON.stringify(a)} });`;return createToolCallGenerateResult({input:{js:o},inputTokens:estimateTokenCount(getPromptText(e.prompt)),modelId:n,outputTokens:estimateTokenCount(o),toolCallId:createToolCallId(i.name),toolName:i.name})}return createToolCallGenerateResult({input:o,inputTokens:estimateTokenCount(getPromptText(e.prompt)),modelId:n,outputTokens:estimateTokenCount(Object.values(o).join(` `)),toolCallId:createToolCallId(i.name),toolName:i.name})}function createFollowUpToolCallResult(e){let t=findNextExplicitToolAfterResult({previousToolName:e.result.toolName,prompt:e.options.prompt,tools:getAvailableTools(e.options)});if(t===null)return null;let n=createFollowUpToolInput(e.result.output);return n===null?null:createToolCallGenerateResult({input:n,inputTokens:estimateTokenCount(getPromptText(e.options.prompt)),modelId:e.modelId,outputTokens:estimateTokenCount(Object.values(n).join(` `)),toolCallId:createToolCallId(t.name),toolName:t.name})}function createAssistantMessage(e){let t=getLastUserPromptText(e)??`Hello from Eve`,n=getSystemPromptLabels(e),r=resolveSystemProbe(e),i=resolveMockFixtureToken(e);return i===null?n.length>0?r===null?`Bootstrap reply [${n.join(`, `)}]: ${t}`:`Bootstrap reply [${n.join(`, `)}; probe=${r}]: ${t}`:r===null?`Bootstrap reply: ${t}`:`Bootstrap reply [probe=${r}]: ${t}`:i}function formatToolResultReply(e,t){if(e.isError)return`Local weather tool failed: ${formatToolOutput(e.output)}`;if(isWeatherPayload(e.output))return`Used local weather tool for ${e.output.city}: ${e.output.condition}, ${e.output.temperatureF}F. ${e.output.summary}`;let n=getLastUserPromptText(t)??`Hello from Eve`;return`Used ${e.toolName} for "${n}": ${formatToolOutput(e.output)}`}function createToolCallGenerateResult(e){return{content:[{input:JSON.stringify(e.input),toolCallId:e.toolCallId,toolName:e.toolName,type:`tool-call`}],finishReason:{raw:void 0,unified:`tool-calls`},response:{id:`bootstrap-response`,modelId:e.modelId,timestamp:new Date(`2026-03-16T00:00:00.000Z`)},usage:{inputTokens:{cacheRead:0,cacheWrite:0,noCache:e.inputTokens,total:e.inputTokens},outputTokens:{reasoning:0,text:e.outputTokens,total:e.outputTokens}},warnings:[]}}function getAvailableTools(e){return(e.tools??[]).flatMap(e=>e.type===`function`?[{description:e.description,inputSchema:`inputSchema`in e?e.inputSchema:void 0,name:e.name,outputSchema:`outputSchema`in e?e.outputSchema:void 0}]:[])}function getLastAuthoredToolResult(e){for(let t of[...e].reverse()){if(t.role===`user`)return null;if(!(t.role!==`tool`&&t.role!==`assistant`)){for(let e of[...t.content].reverse())if(!(typeof e==`string`||e.type!==`tool-result`)&&e.toolName!==LOAD_SKILL_TOOL_NAME)return{isError:e.output.type===`error-json`||e.output.type===`error-text`||e.output.type===`execution-denied`,output:e.output.type===`execution-denied`?{reason:e.output.reason??null,type:e.output.type}:e.output.value,toolCallId:e.toolCallId,toolName:e.toolName}}}return null}function findNextExplicitToolAfterResult(e){let t=getLastUserPromptText(e.prompt);if(t===null)return null;let n=normalizeText(t),r=n.indexOf(normalizeText(e.previousToolName));return r<0?null:e.tools.filter(t=>t.name!==e.previousToolName).flatMap(e=>{let t=n.indexOf(normalizeText(e.name),r+1);return t<0?[]:[{index:t,tool:e}]}).sort((e,t)=>e.index-t.index)[0]?.tool??null}function createFollowUpToolInput(e){return isRecord(e)&&typeof e.stepKey==`string`?{stepKey:e.stepKey}:null}function getSystemPromptLabels(e){let t=e.filter(e=>e.role===`system`);if(t.length===0)return[];let n=t.flatMap(e=>{let t=getPromptContentText(e.content);if(t.startsWith(`Available skills
1
+ import{z}from"#compiled/zod/index.js";import{CODE_MODE_TOOL_NAME}from"#shared/code-mode.js";import{LOAD_SKILL_TOOL_NAME}from"#runtime/skills/fragment-context.js";import{FINAL_OUTPUT_TOOL_NAME}from"#runtime/framework-tools/final-output.js";import{MockLanguageModelV3}from"ai/test";import{BOOTSTRAP_RUNTIME_MODEL_ID,BOOTSTRAP_RUNTIME_SYSTEM_PROMPT}from"#runtime/agent/bootstrap.js";import{createBootstrapGenerateResult,createBootstrapStreamResult,estimateTokenCount,getLastUserPromptText,getPromptContentText,getPromptText}from"#runtime/agent/bootstrap-model-utils.js";import{createMockAuthoredToolInput,formatToolOutput,resolveMockFixtureToken,resolveWeatherCity}from"#runtime/agent/mock-model-fixtures.js";import{findRelevantSkill,getActivatedSkillIds,getAvailableSkills}from"#runtime/agent/mock-model-skill-selection.js";import{createJsonSchemaSample}from"#runtime/agent/mock-structured-output.js";const authoredRuntimeModelMocks=new Map,bootstrapWeatherPayloadSchema=z.object({city:z.string(),condition:z.string(),summary:z.string(),temperatureF:z.number().finite()}).strict();function shouldMockAuthoredRuntimeModels(){return process.env.NODE_ENV===`test`}function createMockAuthoredRuntimeModel(e){let t=authoredRuntimeModelMocks.get(e.id);if(t!==void 0)return t;let n=new MockLanguageModelV3({modelId:e.id,provider:`eve-runtime-mock`,doGenerate:async t=>createMockModelResult(t,e.id),doStream:async t=>createBootstrapStreamResult(createMockModelResult(t,e.id))});return authoredRuntimeModelMocks.set(e.id,n),n}function createMockModelResult(e,t){let n=getLastAuthoredToolResult(e.prompt);if(n!==null){let r=createFollowUpToolCallResult({modelId:t,options:e,result:n});if(r!==null)return r}else{let n=createSkillLoadResult(e.prompt,t)??createAuthoredToolCallResult(e,t);if(n!==null)return n}let r=createFinalOutputResult(e,t);if(r!==null)return r;let i=n===null?createAssistantMessage(e.prompt):formatToolResultReply(n,e.prompt);return createBootstrapGenerateResult({inputTokens:estimateTokenCount(getPromptText(e.prompt)),modelId:t,outputTokens:estimateTokenCount(i),text:i})}function createFinalOutputResult(e,t){let n=getAvailableTools(e).find(e=>e.name===FINAL_OUTPUT_TOOL_NAME);if(n===void 0)return null;let i=createJsonSchemaSample(n.inputSchema);return createToolCallGenerateResult({input:i,inputTokens:estimateTokenCount(getPromptText(e.prompt)),modelId:t,outputTokens:estimateTokenCount(JSON.stringify(i)),toolCallId:createToolCallId(FINAL_OUTPUT_TOOL_NAME),toolName:FINAL_OUTPUT_TOOL_NAME})}function resolveMockAuthoredRuntimeModel(e){return!shouldMockAuthoredRuntimeModels()||e.id===BOOTSTRAP_RUNTIME_MODEL_ID?null:createMockAuthoredRuntimeModel(e)}function createSkillLoadResult(e,t){let r=getLastUserPromptText(e);if(r===null||getActivatedSkillIds(e).length>0)return null;let i=findRelevantSkill(getAvailableSkills(e),r);return i===null?null:createToolCallGenerateResult({input:{skill:i.name},inputTokens:estimateTokenCount(getPromptText(e)),modelId:t,outputTokens:estimateTokenCount(i.name),toolCallId:`call_load_skill`,toolName:LOAD_SKILL_TOOL_NAME})}function createAuthoredToolCallResult(e,n){let r=getLastUserPromptText(e.prompt);if(r===null)return null;let i=findRelevantTool(getAvailableTools(e),r);if(i===null)return null;let a=resolveWeatherCity(r),o=createMockAuthoredToolInput(i,r,a);if(i.name===CODE_MODE_TOOL_NAME){let t=findRelevantCodeModeHostTool(i.description,r);if(t===null)return null;let o=`return await tools${formatCodeModeToolAccess(t)}({ city: ${JSON.stringify(a)} });`;return createToolCallGenerateResult({input:{js:o},inputTokens:estimateTokenCount(getPromptText(e.prompt)),modelId:n,outputTokens:estimateTokenCount(o),toolCallId:createToolCallId(i.name),toolName:i.name})}return createToolCallGenerateResult({input:o,inputTokens:estimateTokenCount(getPromptText(e.prompt)),modelId:n,outputTokens:estimateTokenCount(Object.values(o).join(` `)),toolCallId:createToolCallId(i.name),toolName:i.name})}function createFollowUpToolCallResult(e){let t=findNextExplicitToolAfterResult({previousToolName:e.result.toolName,prompt:e.options.prompt,tools:getAvailableTools(e.options)});if(t===null)return null;let n=createFollowUpToolInput(e.result.output);return n===null?null:createToolCallGenerateResult({input:n,inputTokens:estimateTokenCount(getPromptText(e.options.prompt)),modelId:e.modelId,outputTokens:estimateTokenCount(Object.values(n).join(` `)),toolCallId:createToolCallId(t.name),toolName:t.name})}function createAssistantMessage(e){let t=getLastUserPromptText(e)??`Hello from eve`,n=getSystemPromptLabels(e),r=resolveSystemProbe(e),i=resolveMockFixtureToken(e);return i===null?n.length>0?r===null?`Bootstrap reply [${n.join(`, `)}]: ${t}`:`Bootstrap reply [${n.join(`, `)}; probe=${r}]: ${t}`:r===null?`Bootstrap reply: ${t}`:`Bootstrap reply [probe=${r}]: ${t}`:i}function formatToolResultReply(e,t){if(e.isError)return`Local weather tool failed: ${formatToolOutput(e.output)}`;if(isWeatherPayload(e.output))return`Used local weather tool for ${e.output.city}: ${e.output.condition}, ${e.output.temperatureF}F. ${e.output.summary}`;let n=getLastUserPromptText(t)??`Hello from eve`;return`Used ${e.toolName} for "${n}": ${formatToolOutput(e.output)}`}function createToolCallGenerateResult(e){return{content:[{input:JSON.stringify(e.input),toolCallId:e.toolCallId,toolName:e.toolName,type:`tool-call`}],finishReason:{raw:void 0,unified:`tool-calls`},response:{id:`bootstrap-response`,modelId:e.modelId,timestamp:new Date(`2026-03-16T00:00:00.000Z`)},usage:{inputTokens:{cacheRead:0,cacheWrite:0,noCache:e.inputTokens,total:e.inputTokens},outputTokens:{reasoning:0,text:e.outputTokens,total:e.outputTokens}},warnings:[]}}function getAvailableTools(e){return(e.tools??[]).flatMap(e=>e.type===`function`?[{description:e.description,inputSchema:`inputSchema`in e?e.inputSchema:void 0,name:e.name,outputSchema:`outputSchema`in e?e.outputSchema:void 0}]:[])}function getLastAuthoredToolResult(e){for(let t of[...e].reverse()){if(t.role===`user`)return null;if(!(t.role!==`tool`&&t.role!==`assistant`)){for(let e of[...t.content].reverse())if(!(typeof e==`string`||e.type!==`tool-result`)&&e.toolName!==LOAD_SKILL_TOOL_NAME)return{isError:e.output.type===`error-json`||e.output.type===`error-text`||e.output.type===`execution-denied`,output:e.output.type===`execution-denied`?{reason:e.output.reason??null,type:e.output.type}:e.output.value,toolCallId:e.toolCallId,toolName:e.toolName}}}return null}function findNextExplicitToolAfterResult(e){let t=getLastUserPromptText(e.prompt);if(t===null)return null;let n=normalizeText(t),r=n.indexOf(normalizeText(e.previousToolName));return r<0?null:e.tools.filter(t=>t.name!==e.previousToolName).flatMap(e=>{let t=n.indexOf(normalizeText(e.name),r+1);return t<0?[]:[{index:t,tool:e}]}).sort((e,t)=>e.index-t.index)[0]?.tool??null}function createFollowUpToolInput(e){return isRecord(e)&&typeof e.stepKey==`string`?{stepKey:e.stepKey}:null}function getSystemPromptLabels(e){let t=e.filter(e=>e.role===`system`);if(t.length===0)return[];let n=t.flatMap(e=>{let t=getPromptContentText(e.content);if(t.startsWith(`Available skills
2
2
  `))return[];let n=t.split(`
3
3
  `).map(e=>e.trim()).filter(e=>e.length>0),r=[];for(let e of n){if(e===BOOTSTRAP_RUNTIME_SYSTEM_PROMPT||e===`Available skills`)continue;let t=/^System \((.+)\)$/.exec(e);if(t?.[1]){r.push(t[1]);continue}let n=/^Skill \((.+)\)$/.exec(e);n?.[1]&&r.push(n[1])}if(r.length>0)return r;let i=n.find(e=>e!==BOOTSTRAP_RUNTIME_SYSTEM_PROMPT&&e!==`Available skills`);return i===void 0?[]:[i]});return[...new Set(n)]}function findRelevantTool(e,t){let r=normalizeText(t),i=e.find(e=>e.name!==`agent`&&e.name!==LOAD_SKILL_TOOL_NAME&&r.includes(normalizeText(e.name)));return i===void 0?/\b(forecast|temperature|weather|wind|rain|snow)\b/u.test(r)?e.find(e=>/\b(forecast|temperature|weather|wind|rain|snow)\b/u.test(normalizeText(`${e.name} ${e.description??``}`)))??null:null:i}function findRelevantCodeModeHostTool(e,t){return e===void 0?null:findRelevantTool(parseCodeModeHostTools(e),t)?.name??null}function parseCodeModeHostTools(e){let t=[],n;for(let r of e.split(`
4
4
  `)){let e=/^\s*\/\*\*\s*(.*?)\s*\*\/\s*$/u.exec(r);if(e?.[1]!==void 0){n=e[1];continue}let i=/^\s*(?:([$A-Z_a-z][$\w]*)|(["'])(.*?)\2)\s*:\s*\(input:/u.exec(r),a=i?.[1]??i?.[3];a!==void 0&&(t.push({description:n,name:a}),n=void 0)}return t}function formatCodeModeToolAccess(e){return/^[$A-Z_a-z][$\w]*$/u.test(e)?`.${e}`:`[${JSON.stringify(e)}]`}function normalizeText(e){return e.toLowerCase().replace(/[^a-z0-9]+/gu,` `).trim()}function createToolCallId(e){return`call_${e.toLowerCase().replace(/[^a-z0-9]+/gu,`_`).replace(/^_+|_+$/gu,``)||`tool`}`}function resolveSystemProbe(e){let t=e.filter(e=>e.role===`system`).map(e=>getPromptContentText(e.content)).join(`
@@ -1 +1 @@
1
- import{expectObjectRecord,getAuthoredModuleExport,materializeAuthoredModuleExport}from"#internal/authored-module.js";import{ROOT_COMPILED_AGENT_NODE_ID}from"#compiler/manifest.js";import{normalizeAgentDefinition}from"#internal/authored-definition/core.js";import{loadCompiledModuleMap}from"#runtime/loaders/module-map.js";import{resolveBootstrapRuntimeModel}from"#runtime/agent/bootstrap-model.js";import{resolveMockAuthoredRuntimeModel,shouldMockAuthoredRuntimeModels}from"#runtime/agent/mock-model-adapter.js";async function resolveRuntimeModelReference(e,t={}){let n=resolveBootstrapRuntimeModel(e);if(n!==null)return n;let r=resolveMockAuthoredRuntimeModel(e);return r===null?isSourceBackedRuntimeModelReference(e)?await loadSourceBackedRuntimeModelReference(e,t):e.id:r}async function loadSourceBackedRuntimeModelReference(i,a){if(a.compiledArtifactsSource===void 0)throw Error(`Expected an explicit compiled artifact source to resolve the authored runtime model "${i.id}".`);let o=(await loadCompiledModuleMap({compiledArtifactsSource:a.compiledArtifactsSource})).nodes[ROOT_COMPILED_AGENT_NODE_ID]?.modules[i.source.sourceId],s=normalizeAgentDefinition(await materializeAuthoredModuleExport(getAuthoredModuleExport(expectObjectRecord(o,`Missing compiled agent config module for runtime model "${i.id}" at "${i.source.logicalPath}".`),i.source)),`Expected the authored agent config export "${i.source.exportName??`default`}" from "${i.source.logicalPath}" to match the public Eve shape.`).model;if(s===void 0)throw Error(`Expected the authored agent config export "${i.source.exportName??`default`}" from "${i.source.logicalPath}" to provide a runtime model.`);return s}function isSourceBackedRuntimeModelReference(e){return e.source!==void 0}export{resolveRuntimeModelReference,shouldMockAuthoredRuntimeModels};
1
+ import{expectObjectRecord,getAuthoredModuleExport,materializeAuthoredModuleExport}from"#internal/authored-module.js";import{ROOT_COMPILED_AGENT_NODE_ID}from"#compiler/manifest.js";import{normalizeAgentDefinition}from"#internal/authored-definition/core.js";import{loadCompiledModuleMap}from"#runtime/loaders/module-map.js";import{resolveBootstrapRuntimeModel}from"#runtime/agent/bootstrap-model.js";import{resolveMockAuthoredRuntimeModel,shouldMockAuthoredRuntimeModels}from"#runtime/agent/mock-model-adapter.js";async function resolveRuntimeModelReference(e,t={}){let n=resolveBootstrapRuntimeModel(e);if(n!==null)return n;let r=resolveMockAuthoredRuntimeModel(e);return r===null?isSourceBackedRuntimeModelReference(e)?await loadSourceBackedRuntimeModelReference(e,t):e.id:r}async function loadSourceBackedRuntimeModelReference(i,a){if(a.compiledArtifactsSource===void 0)throw Error(`Expected an explicit compiled artifact source to resolve the authored runtime model "${i.id}".`);let o=(await loadCompiledModuleMap({compiledArtifactsSource:a.compiledArtifactsSource})).nodes[ROOT_COMPILED_AGENT_NODE_ID]?.modules[i.source.sourceId],s=normalizeAgentDefinition(await materializeAuthoredModuleExport(getAuthoredModuleExport(expectObjectRecord(o,`Missing compiled agent config module for runtime model "${i.id}" at "${i.source.logicalPath}".`),i.source)),`Expected the authored agent config export "${i.source.exportName??`default`}" from "${i.source.logicalPath}" to match the public eve shape.`).model;if(s===void 0)throw Error(`Expected the authored agent config export "${i.source.exportName??`default`}" from "${i.source.logicalPath}" to provide a runtime model.`);return s}function isSourceBackedRuntimeModelReference(e){return e.source!==void 0}export{resolveRuntimeModelReference,shouldMockAuthoredRuntimeModels};
@@ -43,7 +43,7 @@ export type EveAttributeValue = string | number | undefined;
43
43
  */
44
44
  export declare function truncateForTag(value: string, maxBytes?: number): string;
45
45
  /**
46
- * Writes a batch of Eve-owned attributes to the active workflow run.
46
+ * Writes a batch of eve-owned attributes to the active workflow run.
47
47
  *
48
48
  * Reserved-namespace contract:
49
49
  * - All keys must use the `$eve.` prefix (the workflow runtime would
@@ -65,7 +65,7 @@ export declare function truncateForTag(value: string, maxBytes?: number): string
65
65
  * Failure policy: tag writes are observability metadata, not load-bearing
66
66
  * state. A failure inside the runtime (transient network, schema bug,
67
67
  * missing world adapter) is logged once per process and then swallowed
68
- * so the Eve session it tagged is unaffected.
68
+ * so the eve session it tagged is unaffected.
69
69
  *
70
70
  * Must be called from inside a `"use workflow"` or `"use step"` body —
71
71
  * the runtime throws a `FatalError` outside those contexts.
@@ -16,7 +16,7 @@
16
16
  *
17
17
  * Owning this route in the framework - instead of routing the IdP at the
18
18
  * workflow runtime's raw `/.well-known/workflow/v1/webhook/:token` -
19
- * keeps the public surface namespaced under Eve and lets the framework
19
+ * keeps the public surface namespaced under eve and lets the framework
20
20
  * decide delivery policy (auth, throttling, logging) for connection
21
21
  * callbacks without leaking generic workflow primitives to the public
22
22
  * internet.
@@ -1 +1 @@
1
- import{AuthKey}from"#context/keys.js";import{contextStorage}from"#context/container.js";import{ConnectionAuthorizationFailedError}from"#public/connections/errors.js";function principalKey(e){return e.type===`app`?`app`:`user:${e.issuer}:${e.id}`}function resolveConnectionPrincipal(t,n,r=contextStorage.getStore()){if(n.principalType===`app`)return{type:`app`};let i=r?.get(AuthKey);if(i==null||i.principalType!==`user`)throw new ConnectionAuthorizationFailedError(t,{message:r===void 0?`Connection "${t}" declares principalType "user" but was invoked outside an Eve context, so no user principal can be resolved.`:`Connection "${t}" declares principalType "user" but the active session has no authenticated user principal.`,reason:`principal_required`,retryable:!1});return{attributes:i.attributes,id:i.principalId,issuer:i.issuer??i.authenticator,type:`user`}}export{principalKey,resolveConnectionPrincipal};
1
+ import{AuthKey}from"#context/keys.js";import{contextStorage}from"#context/container.js";import{ConnectionAuthorizationFailedError}from"#public/connections/errors.js";function principalKey(e){return e.type===`app`?`app`:`user:${e.issuer}:${e.id}`}function resolveConnectionPrincipal(t,n,r=contextStorage.getStore()){if(n.principalType===`app`)return{type:`app`};let i=r?.get(AuthKey);if(i==null||i.principalType!==`user`)throw new ConnectionAuthorizationFailedError(t,{message:r===void 0?`Connection "${t}" declares principalType "user" but was invoked outside an eve context, so no user principal can be resolved.`:`Connection "${t}" declares principalType "user" but the active session has no authenticated user principal.`,reason:`principal_required`,retryable:!1});return{attributes:i.attributes,id:i.principalId,issuer:i.issuer??i.authenticator,type:`user`}}export{principalKey,resolveConnectionPrincipal};
@@ -45,7 +45,7 @@ export declare function resolveScopedToken(input: ScopedAuthorization): Promise<
45
45
  * Called when an already-resolved bearer is rejected (a downstream
46
46
  * `401`, or an explicit `requireAuth()` after a failed call) so the
47
47
  * re-authorization attempt does not re-read the stale token. Drops two
48
- * layers: Eve's per-step cache, and — via the strategy's optional
48
+ * layers: eve's per-step cache, and — via the strategy's optional
49
49
  * {@link AuthorizationDefinition.evict} hook — any cache the strategy
50
50
  * itself owns (e.g. the `@vercel/connect` in-process token cache). The
51
51
  * single shared eviction path here means both authored tools and MCP
@@ -177,7 +177,7 @@ interface AuthorizationDefinitionBase {
177
177
  * Optional metadata marker attached by `connect()` from
178
178
  * `@vercel/connect/eve` so downstream tooling can detect Vercel
179
179
  * Connect-backed connections at compile time without inspecting
180
- * `getToken`'s closure state. Examples: a future Eve compiler step
180
+ * `getToken`'s closure state. Examples: a future eve compiler step
181
181
  * that surfaces connector identifiers in build output, or the Vercel
182
182
  * dashboard rendering deep links to a connector's settings page.
183
183
  *
@@ -205,13 +205,13 @@ interface AuthorizationDefinitionBase {
205
205
  readonly displayName?: string;
206
206
  /**
207
207
  * Optional best-effort invalidation of any token cache the strategy
208
- * owns *below* Eve's per-step cache, for the given `principal`.
208
+ * owns *below* eve's per-step cache, for the given `principal`.
209
209
  *
210
- * Eve always drops its own per-step entry when a resolved bearer is
210
+ * eve always drops its own per-step entry when a resolved bearer is
211
211
  * rejected (a downstream `401` mapped to `ctx.requireAuth()`, or the
212
212
  * MCP server rejecting the token). But a strategy frequently sits on a
213
213
  * second, longer-lived cache — most notably the `@vercel/connect`
214
- * in-process token cache — that Eve cannot see. Without this hook the
214
+ * in-process token cache — that eve cannot see. Without this hook the
215
215
  * re-authorization re-reads the same revoked-but-unexpired credential
216
216
  * from that lower layer and the tool keeps failing.
217
217
  *
@@ -9,6 +9,6 @@ export declare const FINAL_OUTPUT_TOOL_NAME = "final_output";
9
9
  *
10
10
  * The tool has no `execute`: calling it is the terminal signal the harness
11
11
  * intercepts to surface the structured result. Its input is provider-constrained
12
- * to the schema during generation, exactly like every other Eve tool input.
12
+ * to the schema during generation, exactly like every other eve tool input.
13
13
  */
14
14
  export declare function buildFinalOutputTool(schema: JsonObject): Tool;
@@ -1,6 +1,6 @@
1
1
  import type { ResolvedHttpBasicAuthStrategy, RouteStrategyAuthenticationResult } from "#runtime/governance/auth/types.js";
2
2
  /**
3
- * Verifies one HTTP Basic credential against a resolved Eve strategy.
3
+ * Verifies one HTTP Basic credential against a resolved eve strategy.
4
4
  */
5
5
  export declare function authenticateHttpBasicStrategy(input: {
6
6
  readonly authorization: string;
@@ -6,7 +6,7 @@ import type { AuthenticatedCallerPrincipal, ResolvedTokenClaimMatchers } from "#
6
6
  */
7
7
  export declare function areTokenClaimMatchersSatisfied(payload: JWTPayload, matchers: ResolvedTokenClaimMatchers): boolean;
8
8
  /**
9
- * Creates a normalized JWT-backed Eve principal from a verified payload.
9
+ * Creates a normalized JWT-backed eve principal from a verified payload.
10
10
  */
11
11
  export declare function createJwtAuthenticatedCallerPrincipal(input: {
12
12
  readonly authenticator: AuthenticatedCallerPrincipal["authenticator"];
@@ -4,7 +4,7 @@ import type { RuntimeSessionAuthAttributes, RuntimeSessionAuthContext, RuntimeSe
4
4
  */
5
5
  export type RouteAuthAttributes = RuntimeSessionAuthAttributes;
6
6
  /**
7
- * One authenticated caller normalized into Eve-owned runtime metadata.
7
+ * One authenticated caller normalized into eve-owned runtime metadata.
8
8
  */
9
9
  export interface AuthenticatedCallerPrincipal {
10
10
  readonly attributes: RouteAuthAttributes;
@@ -12,7 +12,7 @@ export interface RuntimeCompilerArtifactPaths {
12
12
  readonly moduleMapPath: string;
13
13
  }
14
14
  /**
15
- * Resolves the stable Eve artifact paths for one application root without
15
+ * Resolves the stable eve artifact paths for one application root without
16
16
  * depending on Node path helpers.
17
17
  */
18
18
  export declare function resolveRuntimeCompilerArtifactPaths(appRoot: string): RuntimeCompilerArtifactPaths;
@@ -1 +1 @@
1
- import{z}from"#compiled/zod/index.js";import{COMPILE_METADATA_KIND,COMPILE_METADATA_VERSION}from"#compiler/artifacts.js";import{readBundledCompiledArtifacts}from"#runtime/loaders/bundled-artifacts.js";import{resolveRuntimeCompilerArtifactPaths}from"#runtime/loaders/artifact-paths.js";import{formatValidationError}from"#runtime/validation.js";const compileArtifactDigestSchema=z.object({path:z.string(),sha256:z.string()}).strict(),compileMetadataSchema=z.object({compile:z.object({moduleMap:compileArtifactDigestSchema}).strict(),discovery:z.object({diagnostics:compileArtifactDigestSchema,manifest:compileArtifactDigestSchema,sourceGraphHash:z.string(),summary:z.object({errors:z.number().finite(),warnings:z.number().finite()}).strict()}).strict(),generator:z.object({name:z.string(),version:z.string()}).strict(),kind:z.literal(COMPILE_METADATA_KIND),status:z.union([z.literal(`failed`),z.literal(`ready`)]),version:z.literal(COMPILE_METADATA_VERSION)}).strict();var LoadCompileMetadataError=class extends Error{metadataPath;constructor(e,t){super(e),this.name=`LoadCompileMetadataError`,t!==void 0&&(this.metadataPath=t)}};async function loadCompileMetadata(e){let t=e.compiledArtifactsSource.kind===`disk`?resolveRuntimeCompilerArtifactPaths(e.compiledArtifactsSource.appRoot).compileMetadataPath:void 0;if(t!==void 0){let{readFile:e}=await import(`node:fs/promises`),n;try{n=JSON.parse(await e(t,`utf8`))}catch(e){throw new LoadCompileMetadataError(formatLoadErrorMessage(e),t)}return parseCompileMetadata(n,t)}let n=readBundledCompiledArtifacts()?.metadata;return n===void 0?null:parseCompileMetadata(n,`bundled compile metadata`)}function parseCompileMetadata(e,t){let n=compileMetadataSchema.safeParse(e);if(!n.success)throw new LoadCompileMetadataError(`Expected "${t}" to contain valid Eve compile metadata. ${formatValidationError(n.error)}`,t);return n.data}function formatLoadErrorMessage(e){return e instanceof Error?e.message:`Unknown compile metadata load failure.`}export{loadCompileMetadata};
1
+ import{z}from"#compiled/zod/index.js";import{COMPILE_METADATA_KIND,COMPILE_METADATA_VERSION}from"#compiler/artifacts.js";import{readBundledCompiledArtifacts}from"#runtime/loaders/bundled-artifacts.js";import{resolveRuntimeCompilerArtifactPaths}from"#runtime/loaders/artifact-paths.js";import{formatValidationError}from"#runtime/validation.js";const compileArtifactDigestSchema=z.object({path:z.string(),sha256:z.string()}).strict(),compileMetadataSchema=z.object({compile:z.object({moduleMap:compileArtifactDigestSchema}).strict(),discovery:z.object({diagnostics:compileArtifactDigestSchema,manifest:compileArtifactDigestSchema,sourceGraphHash:z.string(),summary:z.object({errors:z.number().finite(),warnings:z.number().finite()}).strict()}).strict(),generator:z.object({name:z.string(),version:z.string()}).strict(),kind:z.literal(COMPILE_METADATA_KIND),status:z.union([z.literal(`failed`),z.literal(`ready`)]),version:z.literal(COMPILE_METADATA_VERSION)}).strict();var LoadCompileMetadataError=class extends Error{metadataPath;constructor(e,t){super(e),this.name=`LoadCompileMetadataError`,t!==void 0&&(this.metadataPath=t)}};async function loadCompileMetadata(e){let t=e.compiledArtifactsSource.kind===`disk`?resolveRuntimeCompilerArtifactPaths(e.compiledArtifactsSource.appRoot).compileMetadataPath:void 0;if(t!==void 0){let{readFile:e}=await import(`node:fs/promises`),n;try{n=JSON.parse(await e(t,`utf8`))}catch(e){throw new LoadCompileMetadataError(formatLoadErrorMessage(e),t)}return parseCompileMetadata(n,t)}let n=readBundledCompiledArtifacts()?.metadata;return n===void 0?null:parseCompileMetadata(n,`bundled compile metadata`)}function parseCompileMetadata(e,t){let n=compileMetadataSchema.safeParse(e);if(!n.success)throw new LoadCompileMetadataError(`Expected "${t}" to contain valid eve compile metadata. ${formatValidationError(n.error)}`,t);return n.data}function formatLoadErrorMessage(e){return e instanceof Error?e.message:`Unknown compile metadata load failure.`}export{loadCompileMetadata};
@@ -1 +1 @@
1
- import{compiledAgentManifestSchema}from"#compiler/manifest.js";import{readBundledCompiledArtifacts}from"#runtime/loaders/bundled-artifacts.js";import{resolveRuntimeCompilerArtifactPaths}from"#runtime/loaders/artifact-paths.js";import{formatValidationError}from"#runtime/validation.js";const BUNDLED_MANIFEST_SOURCE=`bundled compiled manifest`;var LoadCompiledManifestError=class extends Error{manifestPath;constructor(e,t){super(e),this.name=`LoadCompiledManifestError`,t!==void 0&&(this.manifestPath=t)}};async function loadCompiledManifest(e){let r=e.compiledArtifactsSource.kind===`disk`?resolveRuntimeCompilerArtifactPaths(e.compiledArtifactsSource.appRoot).compiledManifestPath:void 0;if(r!==void 0){let{readFile:e}=await import(`node:fs/promises`),t;try{t=JSON.parse(await e(r,`utf8`))}catch(e){throw new LoadCompiledManifestError(formatLoadErrorMessage(e),r)}return parseCompiledManifest(t,r)}let a=readBundledCompiledArtifacts();if(a!==null)return parseCompiledManifest(a.manifest,BUNDLED_MANIFEST_SOURCE);throw new LoadCompiledManifestError(`Compiled manifest is unavailable without an app root or bundled compiled artifacts.`,BUNDLED_MANIFEST_SOURCE)}function parseCompiledManifest(t,n){let i=compiledAgentManifestSchema.safeParse(t);if(!i.success)throw new LoadCompiledManifestError(`Expected "${n}" to contain a valid compiled Eve agent manifest. ${formatValidationError(i.error)}`,n);return i.data}function formatLoadErrorMessage(e){return e instanceof Error?e.message:`Unknown manifest load failure.`}export{LoadCompiledManifestError,loadCompiledManifest};
1
+ import{compiledAgentManifestSchema}from"#compiler/manifest.js";import{readBundledCompiledArtifacts}from"#runtime/loaders/bundled-artifacts.js";import{resolveRuntimeCompilerArtifactPaths}from"#runtime/loaders/artifact-paths.js";import{formatValidationError}from"#runtime/validation.js";const BUNDLED_MANIFEST_SOURCE=`bundled compiled manifest`;var LoadCompiledManifestError=class extends Error{manifestPath;constructor(e,t){super(e),this.name=`LoadCompiledManifestError`,t!==void 0&&(this.manifestPath=t)}};async function loadCompiledManifest(e){let r=e.compiledArtifactsSource.kind===`disk`?resolveRuntimeCompilerArtifactPaths(e.compiledArtifactsSource.appRoot).compiledManifestPath:void 0;if(r!==void 0){let{readFile:e}=await import(`node:fs/promises`),t;try{t=JSON.parse(await e(r,`utf8`))}catch(e){throw new LoadCompiledManifestError(formatLoadErrorMessage(e),r)}return parseCompiledManifest(t,r)}let a=readBundledCompiledArtifacts();if(a!==null)return parseCompiledManifest(a.manifest,BUNDLED_MANIFEST_SOURCE);throw new LoadCompiledManifestError(`Compiled manifest is unavailable without an app root or bundled compiled artifacts.`,BUNDLED_MANIFEST_SOURCE)}function parseCompiledManifest(t,n){let i=compiledAgentManifestSchema.safeParse(t);if(!i.success)throw new LoadCompiledManifestError(`Expected "${n}" to contain a valid compiled eve agent manifest. ${formatValidationError(i.error)}`,n);return i.data}function formatLoadErrorMessage(e){return e instanceof Error?e.message:`Unknown manifest load failure.`}export{LoadCompiledManifestError,loadCompiledManifest};
@@ -1 +1 @@
1
- import{compiledModuleMapSchema}from"#compiler/module-map.js";import{readBundledCompiledArtifacts}from"#runtime/loaders/bundled-artifacts.js";import{resolveRuntimeCompilerArtifactPaths}from"#runtime/loaders/artifact-paths.js";import{formatValidationError}from"#runtime/validation.js";const BUNDLED_MODULE_MAP_SOURCE=`bundled compiled module map`;var LoadCompiledModuleMapError=class extends Error{moduleMapPath;constructor(e,t){super(e),this.name=`LoadCompiledModuleMapError`,t!==void 0&&(this.moduleMapPath=t)}};async function loadCompiledModuleMap(e){let r=e.compiledArtifactsSource.kind===`disk`?resolveRuntimeCompilerArtifactPaths(e.compiledArtifactsSource.appRoot).moduleMapPath:void 0;if(r!==void 0){let e=createFileImportSpecifier(r);try{let t=await import(e);return parseCompiledModuleMap(t.moduleMap??t.default,r)}catch(e){throw new LoadCompiledModuleMapError(formatLoadErrorMessage(e),r)}}let a=readBundledCompiledArtifacts();if(a!==null)return parseCompiledModuleMap(a.moduleMap,BUNDLED_MODULE_MAP_SOURCE);throw new LoadCompiledModuleMapError(`Compiled module map is unavailable without an app root or bundled compiled artifacts.`,BUNDLED_MODULE_MAP_SOURCE)}function parseCompiledModuleMap(t,n){let i=compiledModuleMapSchema.safeParse(t);if(!i.success)throw new LoadCompiledModuleMapError(`Expected "${n}" to export a valid compiled Eve module map. ${formatValidationError(i.error)}`,n);return i.data}function formatLoadErrorMessage(e){return e instanceof Error?e.message:`Unknown module-map load failure.`}function createFileImportSpecifier(e){let t=e.replaceAll(`\\`,`/`);return/^[A-Za-z]:\//.test(t)?`file:///${encodeURI(t)}`:t.startsWith(`/`)?`file://${encodeURI(t)}`:t}export{LoadCompiledModuleMapError,loadCompiledModuleMap};
1
+ import{compiledModuleMapSchema}from"#compiler/module-map.js";import{readBundledCompiledArtifacts}from"#runtime/loaders/bundled-artifacts.js";import{resolveRuntimeCompilerArtifactPaths}from"#runtime/loaders/artifact-paths.js";import{formatValidationError}from"#runtime/validation.js";const BUNDLED_MODULE_MAP_SOURCE=`bundled compiled module map`;var LoadCompiledModuleMapError=class extends Error{moduleMapPath;constructor(e,t){super(e),this.name=`LoadCompiledModuleMapError`,t!==void 0&&(this.moduleMapPath=t)}};async function loadCompiledModuleMap(e){let r=e.compiledArtifactsSource.kind===`disk`?resolveRuntimeCompilerArtifactPaths(e.compiledArtifactsSource.appRoot).moduleMapPath:void 0;if(r!==void 0){let e=createFileImportSpecifier(r);try{let t=await import(e);return parseCompiledModuleMap(t.moduleMap??t.default,r)}catch(e){throw new LoadCompiledModuleMapError(formatLoadErrorMessage(e),r)}}let a=readBundledCompiledArtifacts();if(a!==null)return parseCompiledModuleMap(a.moduleMap,BUNDLED_MODULE_MAP_SOURCE);throw new LoadCompiledModuleMapError(`Compiled module map is unavailable without an app root or bundled compiled artifacts.`,BUNDLED_MODULE_MAP_SOURCE)}function parseCompiledModuleMap(t,n){let i=compiledModuleMapSchema.safeParse(t);if(!i.success)throw new LoadCompiledModuleMapError(`Expected "${n}" to export a valid compiled eve module map. ${formatValidationError(i.error)}`,n);return i.data}function formatLoadErrorMessage(e){return e instanceof Error?e.message:`Unknown module-map load failure.`}function createFileImportSpecifier(e){let t=e.replaceAll(`\\`,`/`);return/^[A-Za-z]:\//.test(t)?`file:///${encodeURI(t)}`:t.startsWith(`/`)?`file://${encodeURI(t)}`:t}export{LoadCompiledModuleMapError,loadCompiledModuleMap};
@@ -1,2 +1,2 @@
1
1
  import{formatAvailableSkillsSection}from"#execution/skills/instructions.js";import{createWorkspacePromptSection}from"#runtime/workspace/spec.js";import{formatConnectionsSection}from"#runtime/prompt/connections.js";function composeRuntimeBasePrompt(e){return[...createInstructionsPromptBlocks(e.instructions),...createWorkspacePromptBlocks(e.workspaceSpec),...e.toolsAvailable?[`Tool execution
2
- A single tool or subagent call runs as one serial action. If you call multiple independent tools or subagents in one response, Eve treats that batch as parallel work. Only batch work that is independent and does not rely on another call in the same response.`]:[],...createConnectionsPromptBlocks(e.connections),...createSkillsPromptBlocks(e.skills)]}function createInstructionsPromptBlocks(e){if(e===void 0)return[];let t=e.markdown.trim();return t.length===0?[]:[`Instructions (${e.name})\n${t}`]}function createWorkspacePromptBlocks(e){if(e===void 0)return[];let n=createWorkspacePromptSection(e);return n===void 0?[]:[n]}function createConnectionsPromptBlocks(e){return!e||e.length===0?[]:[formatConnectionsSection(e)]}function createSkillsPromptBlocks(t){if(!t||t.length===0)return[];let n=formatAvailableSkillsSection(t);return n===null?[]:[n]}export{composeRuntimeBasePrompt};
2
+ A single tool or subagent call runs as one serial action. If you call multiple independent tools or subagents in one response, eve treats that batch as parallel work. Only batch work that is independent and does not rely on another call in the same response.`]:[],...createConnectionsPromptBlocks(e.connections),...createSkillsPromptBlocks(e.skills)]}function createInstructionsPromptBlocks(e){if(e===void 0)return[];let t=e.markdown.trim();return t.length===0?[]:[`Instructions (${e.name})\n${t}`]}function createWorkspacePromptBlocks(e){if(e===void 0)return[];let n=createWorkspacePromptSection(e);return n===void 0?[]:[n]}function createConnectionsPromptBlocks(e){return!e||e.length===0?[]:[formatConnectionsSection(e)]}function createSkillsPromptBlocks(t){if(!t||t.length===0)return[];let n=formatAvailableSkillsSection(t);return n===null?[]:[n]}export{composeRuntimeBasePrompt};
@@ -1 +1 @@
1
- import{setChannelInstrumentationKind}from"#channel/compiled-channel.js";import{toErrorMessage}from"#shared/errors.js";import{normalizeChannelDefinition}from"#internal/authored-definition/channel.js";import{ResolveAgentError,createResolvedModuleSourceRef,loadResolvedModuleExport}from"#runtime/resolve-helpers.js";import{HTTP_ADAPTER_KIND}from"#channel/http.js";import{isHttpRouteDefinition,isWebSocketRouteDefinition}from"#channel/routes.js";async function resolveChannelDefinition(r,i,a){try{let t=normalizeChannelDefinition(await loadResolvedModuleExport({definition:r,kindLabel:`channel`,moduleMap:i,nodeId:a}),`Expected the channel export "${r.exportName??`default`}" from "${r.logicalPath}" to match the public Eve shape.`),n=createResolvedModuleSourceRef({exportName:r.exportName,logicalPath:r.logicalPath,sourceId:r.sourceId}),o=t.routes.find(e=>e.method.toUpperCase()===r.method.toUpperCase()&&e.path===r.urlPath),s=`channel:${r.name}`;setChannelInstrumentationKind(t,s);let c=t.adapter;c&&c.kind!==HTTP_ADAPTER_KIND&&(c.kind=s);let l=resolveHttpRoute(r,o),u=resolveWebSocketRoute(r,o);return{name:r.name,method:r.method,urlPath:r.urlPath,fetch:async(e,t)=>l?l.handler(e,t):Response.json({error:`No matching route handler.`,ok:!1},{status:404}),handler:l?.handler,websocket:u?.handler,receive:t.receive,definition:t,adapter:c,...n}}catch(e){throw e instanceof ResolveAgentError?e:new ResolveAgentError(`Failed to attach the channel definition from "${r.logicalPath}": ${toErrorMessage(e)}`,{logicalPath:r.logicalPath,sourceId:r.sourceId})}}function resolveHttpRoute(e,t){if(!(t===void 0||e.method===`WEBSOCKET`||!isHttpRouteDefinition(t)))return t}function resolveWebSocketRoute(e,t){if(!(t===void 0||e.method!==`WEBSOCKET`||!isWebSocketRouteDefinition(t)))return t}export{resolveChannelDefinition};
1
+ import{setChannelInstrumentationKind}from"#channel/compiled-channel.js";import{toErrorMessage}from"#shared/errors.js";import{normalizeChannelDefinition}from"#internal/authored-definition/channel.js";import{ResolveAgentError,createResolvedModuleSourceRef,loadResolvedModuleExport}from"#runtime/resolve-helpers.js";import{HTTP_ADAPTER_KIND}from"#channel/http.js";import{isHttpRouteDefinition,isWebSocketRouteDefinition}from"#channel/routes.js";async function resolveChannelDefinition(r,i,a){try{let t=normalizeChannelDefinition(await loadResolvedModuleExport({definition:r,kindLabel:`channel`,moduleMap:i,nodeId:a}),`Expected the channel export "${r.exportName??`default`}" from "${r.logicalPath}" to match the public eve shape.`),n=createResolvedModuleSourceRef({exportName:r.exportName,logicalPath:r.logicalPath,sourceId:r.sourceId}),o=t.routes.find(e=>e.method.toUpperCase()===r.method.toUpperCase()&&e.path===r.urlPath),s=`channel:${r.name}`;setChannelInstrumentationKind(t,s);let c=t.adapter;c&&c.kind!==HTTP_ADAPTER_KIND&&(c.kind=s);let l=resolveHttpRoute(r,o),u=resolveWebSocketRoute(r,o);return{name:r.name,method:r.method,urlPath:r.urlPath,fetch:async(e,t)=>l?l.handler(e,t):Response.json({error:`No matching route handler.`,ok:!1},{status:404}),handler:l?.handler,websocket:u?.handler,receive:t.receive,definition:t,adapter:c,...n}}catch(e){throw e instanceof ResolveAgentError?e:new ResolveAgentError(`Failed to attach the channel definition from "${r.logicalPath}": ${toErrorMessage(e)}`,{logicalPath:r.logicalPath,sourceId:r.sourceId})}}function resolveHttpRoute(e,t){if(!(t===void 0||e.method===`WEBSOCKET`||!isHttpRouteDefinition(t)))return t}function resolveWebSocketRoute(e,t){if(!(t===void 0||e.method!==`WEBSOCKET`||!isWebSocketRouteDefinition(t)))return t}export{resolveChannelDefinition};
@@ -1 +1 @@
1
- const EVE_SCHEDULE_TASK_NAME_PREFIX=`eve.schedule.`;var ScheduleRegistrationError=class extends Error{scheduleId;sourceId;taskName;constructor(e,t={}){super(e),this.name=`ScheduleRegistrationError`,t.scheduleId!==void 0&&(this.scheduleId=t.scheduleId),t.sourceId!==void 0&&(this.sourceId=t.sourceId),t.taskName!==void 0&&(this.taskName=t.taskName)}};function createScheduleRegistrations(e){let t=e.map(e=>({cron:e.cron,description:`Run Eve schedule "${e.name}" from "${e.logicalPath}".`,logicalPath:e.logicalPath,scheduleId:e.name,sourceId:e.sourceId,taskName:createScheduleTaskName(e.sourceId)})).sort((e,t)=>e.sourceId.localeCompare(t.sourceId));return assertUniqueScheduleIds(t),t}function assertUniqueScheduleIds(e){let t=new Map;for(let n of e){let e=t.get(n.scheduleId);if(e===void 0){t.set(n.scheduleId,n);continue}throw new ScheduleRegistrationError(`Duplicate authored schedule id "${n.scheduleId}" found in "${e.logicalPath}" and "${n.logicalPath}".`,{scheduleId:n.scheduleId,sourceId:n.sourceId,taskName:n.taskName})}}function createScheduleTaskName(t){return`${EVE_SCHEDULE_TASK_NAME_PREFIX}${Buffer.from(t,`utf8`).toString(`base64url`)}`}export{EVE_SCHEDULE_TASK_NAME_PREFIX,ScheduleRegistrationError,createScheduleRegistrations};
1
+ const EVE_SCHEDULE_TASK_NAME_PREFIX=`eve.schedule.`;var ScheduleRegistrationError=class extends Error{scheduleId;sourceId;taskName;constructor(e,t={}){super(e),this.name=`ScheduleRegistrationError`,t.scheduleId!==void 0&&(this.scheduleId=t.scheduleId),t.sourceId!==void 0&&(this.sourceId=t.sourceId),t.taskName!==void 0&&(this.taskName=t.taskName)}};function createScheduleRegistrations(e){let t=e.map(e=>({cron:e.cron,description:`Run eve schedule "${e.name}" from "${e.logicalPath}".`,logicalPath:e.logicalPath,scheduleId:e.name,sourceId:e.sourceId,taskName:createScheduleTaskName(e.sourceId)})).sort((e,t)=>e.sourceId.localeCompare(t.sourceId));return assertUniqueScheduleIds(t),t}function assertUniqueScheduleIds(e){let t=new Map;for(let n of e){let e=t.get(n.scheduleId);if(e===void 0){t.set(n.scheduleId,n);continue}throw new ScheduleRegistrationError(`Duplicate authored schedule id "${n.scheduleId}" found in "${e.logicalPath}" and "${n.logicalPath}".`,{scheduleId:n.scheduleId,sourceId:n.sourceId,taskName:n.taskName})}}function createScheduleTaskName(t){return`${EVE_SCHEDULE_TASK_NAME_PREFIX}${Buffer.from(t,`utf8`).toString(`base64url`)}`}export{EVE_SCHEDULE_TASK_NAME_PREFIX,ScheduleRegistrationError,createScheduleRegistrations};
@@ -1,6 +1,6 @@
1
1
  import { z } from "#compiled/zod/index.js";
2
2
  /**
3
- * Runtime-owned authenticator kinds projected into Eve session auth metadata.
3
+ * Runtime-owned authenticator kinds projected into eve session auth metadata.
4
4
  */
5
5
  export type RuntimeSessionAuthenticator = "http-basic" | "jwt-hmac" | "jwt-ecdsa" | "oidc";
6
6
  /**
@@ -1,7 +1,7 @@
1
1
  import type { BundledCompiledArtifacts } from "#runtime/loaders/bundled-artifacts.js";
2
2
  import type { CompiledRuntimeAgentBundle } from "#runtime/sessions/compiled-agent-cache.js";
3
3
  /**
4
- * Process-scoped container for mutable runtime state owned by one Eve
4
+ * Process-scoped container for mutable runtime state owned by one eve
5
5
  * deployment.
6
6
  *
7
7
  * Holds installed compiled artifacts and compiled-agent bundle caches.
@@ -117,7 +117,7 @@ export type ResolvedSandboxDefinition = ResolvedModuleSourceRef & {
117
117
  };
118
118
  /**
119
119
  * Runtime-owned authored tool definition resolved from a compiled module map.
120
- * A tool without `execute` is surfaced to the client and never executed by Eve.
120
+ * A tool without `execute` is surfaced to the client and never executed by eve.
121
121
  */
122
122
  export type ResolvedToolDefinition = Readonly<Optional<InternalToolDefinitionWithExecuteFn<unknown, unknown>, "execute">> & ResolvedModuleSourceRef & {
123
123
  /**
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Stable root directory for every workspace Eve exposes to agents and
2
+ * Stable root directory for every workspace eve exposes to agents and
3
3
  * sandbox backends.
4
4
  *
5
5
  * This is both the model-facing logical path and the live `bash` cwd
@@ -37,12 +37,12 @@ export declare const VERCEL_TRUSTED_OIDC_IDP_TOKEN_HEADER = "x-vercel-trusted-oi
37
37
  */
38
38
  export declare const VERCEL_OIDC_TOKEN_HEADER = "x-vercel-oidc-token";
39
39
  /**
40
- * Header values accepted by Eve's development client helpers.
40
+ * Header values accepted by eve's development client helpers.
41
41
  */
42
42
  export type DevelopmentRequestHeaders = Headers | ReadonlyArray<readonly [string, string]> | Record<string, string>;
43
43
  /**
44
44
  * Creates request headers for one service-issued development request and
45
- * opportunistically refreshes a linked local Vercel OIDC token for Eve-owned
45
+ * opportunistically refreshes a linked local Vercel OIDC token for eve-owned
46
46
  * routes when no explicit authorization header is present.
47
47
  */
48
48
  export declare function createDevelopmentRequestHeadersAsync(input: {
@@ -3,7 +3,7 @@
3
3
  * "Authentication Required" challenge that fronts protected previews and
4
4
  * production deployments.
5
5
  *
6
- * When the Eve development client (`eve dev --url …`) targets a deployment
6
+ * When the eve development client (`eve dev --url …`) targets a deployment
7
7
  * that has Deployment Protection enabled and no valid bypass header is
8
8
  * attached, Vercel returns an HTML SSO challenge instead of routing the
9
9
  * request to the function. The raw HTML body is unhelpful in a CLI
@@ -18,6 +18,6 @@ export interface ApplicationInspection {
18
18
  }
19
19
  /**
20
20
  * Resolves application details, compile artifacts, and the active message
21
- * contract for one Eve application root.
21
+ * contract for one eve application root.
22
22
  */
23
23
  export declare function inspectApplication(appRoot: string): Promise<ApplicationInspection>;
@@ -35,7 +35,7 @@ export interface AddChannelsOptions {
35
35
  */
36
36
  headless?: boolean;
37
37
  /**
38
- * Eve package metadata for the scaffolded web `package.json`. When omitted,
38
+ * eve package metadata for the scaffolded web `package.json`. When omitted,
39
39
  * every package value comes from the build-stamped defaults.
40
40
  */
41
41
  evePackage?: EvePackageContract;
@@ -1,2 +1,2 @@
1
- import{SkippedSignal,confirm}from"../ask.js";import{detectDeployment,isProjectResolved,mergeProjectResolution,projectResolutionFromDeployment}from"../project-resolution.js";import{provisionSlackbot,reconcileSlackUid}from"../slackbot.js";import{hasVercelProject,requireProjectPath}from"../state.js";import{WizardCancelledError}from"../step.js";import{deriveSlackConnectorSlug,ensureChannel}from"#setup/scaffold/index.js";import{formatNodeEngineOverrideWarning}from"#setup/node-engine.js";import{detectPackageManager}from"#setup/package-manager.js";import{HumanActionRequiredError}from"#setup/human-action.js";import{createPromptCommandOutput,withPhase}from"#setup/cli/index.js";import{runPackageManagerInstall}from"#setup/primitives/pm/run.js";import{runVercel}from"#setup/primitives/run-vercel.js";const SLACKBOT_NOT_ATTACHED_ERROR=`Slackbot provisioning did not attach this project. Slack channel was not added.`;function slackbotFailureCopy(e){switch(e.state){case`not-installed`:return{reason:`Slackbot is not connected to a Slack workspace. Slack channel was not added.`,followUp:"Continuing without Slack — the install timed out and was cleaned up; re-run `eve channels add slack` to try again."};case`cleanup-failed`:return{reason:`The abandoned Slack connector could not be removed. Slack channel was not added.`,followUp:`Continuing without Slack — resolve the cleanup warning above before trying again.`};case`connector-lookup-failed`:return{reason:`Existing Slack connectors could not be inspected. Slack channel was not added.`,followUp:"Continuing without Slack — restore Vercel CLI access, then re-run `eve channels add slack`."};case`installation-check-failed`:return{reason:`Slack workspace installation could not be verified. Slack channel was not added.`,followUp:"Continuing without Slack — verify Vercel Connect is reachable, then re-run `eve channels add slack`."};case`existing-not-installed`:return{reason:`The existing Slack connector is not connected to a Slack workspace. Slack channel was not added.`,followUp:`Continuing without Slack — resolve the existing connector warning above before trying again.`};case`detach-failed`:return{reason:`Slackbot provisioning could not replace the existing trigger destination. Slack channel was not added.`,followUp:"Continuing without Slack — run the `vercel connect detach` and `vercel connect attach` commands above."};case`attach-failed`:return{reason:SLACKBOT_NOT_ATTACHED_ERROR,followUp:"Continuing without Slack — finish event delivery with the `vercel connect attach` command above."};case`create-failed`:return{reason:`Slackbot creation failed.`,followUp:"Continuing without Slack — add it later with `eve channels add slack`."}}}function warnOverwrittenFiles(e,t){for(let n of t??[])e.warning(`Overwrote ${n}`)}function warnCompetingNextConfigFiles(e,t){for(let n of t??[])e.warning(`Found competing Next.js config at ${n}; merge any needed settings into next.config.ts and remove it before starting the preview, or Next.js may ignore the generated Eve rewrite.`)}function addChannels(l){let u=l.deps??{ensureChannel,deriveSlackConnectorSlug,provisionSlackbot,reconcileSlackUid,detectPackageManager,runPackageManagerInstall,runVercel,detectDeployment};async function scaffoldSlackChannel(e,t,n,r,i,a){let o=!1;if(!t.slackScaffolded){let t=await u.ensureChannel({projectRoot:n,kind:`slack`,slackConnectorUid:a,slackConnectorSlug:r,force:l.force});warnOverwrittenFiles(e,t.filesOverwritten),t.action===`created`||t.action===`overwritten`?e.success(`Scaffolded channel: slack`):e.info(`Channel "slack" already exists. Skipping file creation.`),o=t.action!==`skipped`,i.slackScaffolded=!0}return i.channelsAdded.push(`slack`),o}async function linkProjectForSlackbot(e,t,n,o,s){if(o)throw new HumanActionRequiredError({kind:`vercel-link`,command:`vercel link`,reason:`Slackbot creation needs this directory linked to a Vercel project.`});if(e.message(`Linking this directory to a Vercel project...`),!await u.runVercel([`link`],{cwd:t,signal:s}))throw s?.throwIfAborted(),Error(`Vercel project linking failed. Slackbot creation did not start.`);let c=mergeProjectResolution(n,projectResolutionFromDeployment(await u.detectDeployment(t,{signal:s})));if(!isProjectResolved(c))throw Error(`Vercel project linking failed. Slackbot creation did not start.`);return c}async function addWebChannelToPayload(e,t,n,r,i,a){if(!t.channelSelection.includes(`web`))return;if(t.webScaffolded){i.channelsAdded.push(`web`);return}e.message(`Scaffolding Web Chat channel files...`);let o={projectRoot:n,kind:`web`,packageManager:r,force:l.force,configureVercelServices:l.configureVercelServices??hasVercelProject(t)};l.evePackage!==void 0&&(o.webPackageVersions={evePackage:l.evePackage});let s=await u.ensureChannel(o);if(a?.throwIfAborted(),warnOverwrittenFiles(e,s.filesOverwritten),s.kind===`web`&&s.action!==`skipped`&&s.nodeEngineOverride!==void 0&&e.warning(formatNodeEngineOverrideWarning(s.nodeEngineOverride)),warnCompetingNextConfigFiles(e,`competingNextConfigFiles`in s?s.competingNextConfigFiles:void 0),s.action===`created`||s.action===`overwritten`){e.success(`Scaffolded channel: web`),i.webScaffolded=!0,i.channelsAdded.push(`web`);return}e.info(`Next.js project detected. Skipping Web Chat scaffolding.`)}function assertSlackProjectReady(e){if(l.ensureLinkedProject===void 0){if(!hasVercelProject(e))throw Error(`Slack requires a Vercel project. Re-run and choose to deploy to Vercel to add Slack.`);if(!isProjectResolved(e.project))throw Error(`Expected a linked Vercel project for Slack, but none was resolved.`)}}async function provisionSlackbotWithControls(e,t,n,r){if(r===void 0&&l.prompter.awaitChoice===void 0)return u.provisionSlackbot(e,t,n);let i={};return r!==void 0&&(i.signal=r),l.prompter.awaitChoice!==void 0&&(i.awaitChoice=l.prompter.awaitChoice),u.provisionSlackbot(e,t,n,void 0,i)}async function scaffoldAttachedSlackChannel(e,t,n,r,i,a){if(!await scaffoldSlackChannel(e,t,n,r,i,a.connectorUid)&&!await u.reconcileSlackUid(e,n,a,`slack/${r}`))throw Error(`Slack connector UID update is required before deployment.`)}async function addSlackChannelToPayload(e,t,n,i,a,o){if(!t.channelSelection.includes(`slack`))return;assertSlackProjectReady(t);let s=await u.deriveSlackConnectorSlug(i,t.agentName);if(t.slackbotCreated){if(!t.slackbotAttached)throw Error(SLACKBOT_NOT_ATTACHED_ERROR);if(!t.deploymentPending)return;let n=t.slackConnectorUid;if(n===void 0)throw Error(`Slack connector UID was not resolved. Slack deployment did not start.`);await scaffoldAttachedSlackChannel(e,t,i,s,a,{state:`attached`,connectorUid:n});return}if(n.createSlackbot!==!0){e.info(`Slack channel was not added because Slackbot setup was skipped.`);return}isProjectResolved(a.project)||(a.project=await linkProjectForSlackbot(e,i,a.project,n.headless,o));let c=await provisionSlackbotWithControls(e,i,s,o);if(o?.throwIfAborted(),c.state===`cancelled`)throw new WizardCancelledError;if(c.state!==`attached`){let t=slackbotFailureCopy(c);if(l.slackbotFailure!==`warn-and-continue`)throw Error(t.reason);e.warning(`${t.reason} ${t.followUp}`);return}a.slackbot={connectorUid:c.connectorUid,chatUrl:c.chatUrl,workspaceName:c.workspaceName},await scaffoldAttachedSlackChannel(e,t,i,s,a,c)}async function installChannelDependencies(e,t,n,r,i){if(r.channelsAdded.length!==0){if(await withPhase(e,`Installing channel dependencies (${n} install)...`,()=>u.runPackageManagerInstall(n,t,{onOutput:createPromptCommandOutput(e),signal:i}))){r.dependenciesInstalled=!0;return}e.warning(`Dependency installation failed. The new channels stay unloadable until \`${n} install\` or a deploy succeeds.`)}}async function performAddChannels(e,t,n){n?.throwIfAborted();let r=l.prompter.log,i=requireProjectPath(e),a={channelsAdded:[],webScaffolded:e.webScaffolded,slackScaffolded:e.slackScaffolded,dependenciesInstalled:!1,project:e.project},o=await u.detectPackageManager(i);return await addWebChannelToPayload(r,e,i,o.kind,a,n),await addSlackChannelToPayload(r,e,t,i,a,n),await installChannelDependencies(r,i,o.kind,a,n),a}return{id:`add-channels`,async gather({state:n}){let r=l.headless??!1;if(r&&n.channelSelection.includes(`slack`))throw Error("Slack setup is interactive. Run `eve channels add slack` from an interactive terminal.");if(!n.channelSelection.includes(`slack`)||l.presetCreateSlackbot!==void 0||n.slackbotCreated)return{headless:r,createSlackbot:l.presetCreateSlackbot};try{return{headless:r,createSlackbot:await l.asker.ask(confirm({key:`create-slackbot`,message:`Do you want to create your slackbot?`}))}}catch(t){if(t instanceof SkippedSignal)return{headless:r,createSlackbot:!1};throw t}},async perform({state:e,input:t,signal:n}){try{return await performAddChannels(e,t,n)}catch(e){if(!(e instanceof WizardCancelledError)){let t=e instanceof Error?e.message:String(e),n=t.split(`
1
+ import{SkippedSignal,confirm}from"../ask.js";import{detectDeployment,isProjectResolved,mergeProjectResolution,projectResolutionFromDeployment}from"../project-resolution.js";import{provisionSlackbot,reconcileSlackUid}from"../slackbot.js";import{hasVercelProject,requireProjectPath}from"../state.js";import{WizardCancelledError}from"../step.js";import{deriveSlackConnectorSlug,ensureChannel}from"#setup/scaffold/index.js";import{formatNodeEngineOverrideWarning}from"#setup/node-engine.js";import{detectPackageManager}from"#setup/package-manager.js";import{HumanActionRequiredError}from"#setup/human-action.js";import{createPromptCommandOutput,withPhase}from"#setup/cli/index.js";import{runPackageManagerInstall}from"#setup/primitives/pm/run.js";import{runVercel}from"#setup/primitives/run-vercel.js";const SLACKBOT_NOT_ATTACHED_ERROR=`Slackbot provisioning did not attach this project. Slack channel was not added.`;function slackbotFailureCopy(e){switch(e.state){case`not-installed`:return{reason:`Slackbot is not connected to a Slack workspace. Slack channel was not added.`,followUp:"Continuing without Slack — the install timed out and was cleaned up; re-run `eve channels add slack` to try again."};case`cleanup-failed`:return{reason:`The abandoned Slack connector could not be removed. Slack channel was not added.`,followUp:`Continuing without Slack — resolve the cleanup warning above before trying again.`};case`connector-lookup-failed`:return{reason:`Existing Slack connectors could not be inspected. Slack channel was not added.`,followUp:"Continuing without Slack — restore Vercel CLI access, then re-run `eve channels add slack`."};case`installation-check-failed`:return{reason:`Slack workspace installation could not be verified. Slack channel was not added.`,followUp:"Continuing without Slack — verify Vercel Connect is reachable, then re-run `eve channels add slack`."};case`existing-not-installed`:return{reason:`The existing Slack connector is not connected to a Slack workspace. Slack channel was not added.`,followUp:`Continuing without Slack — resolve the existing connector warning above before trying again.`};case`detach-failed`:return{reason:`Slackbot provisioning could not replace the existing trigger destination. Slack channel was not added.`,followUp:"Continuing without Slack — run the `vercel connect detach` and `vercel connect attach` commands above."};case`attach-failed`:return{reason:SLACKBOT_NOT_ATTACHED_ERROR,followUp:"Continuing without Slack — finish event delivery with the `vercel connect attach` command above."};case`create-failed`:return{reason:`Slackbot creation failed.`,followUp:"Continuing without Slack — add it later with `eve channels add slack`."}}}function warnOverwrittenFiles(e,t){for(let n of t??[])e.warning(`Overwrote ${n}`)}function warnCompetingNextConfigFiles(e,t){for(let n of t??[])e.warning(`Found competing Next.js config at ${n}; merge any needed settings into next.config.ts and remove it before starting the preview, or Next.js may ignore the generated eve rewrite.`)}function addChannels(l){let u=l.deps??{ensureChannel,deriveSlackConnectorSlug,provisionSlackbot,reconcileSlackUid,detectPackageManager,runPackageManagerInstall,runVercel,detectDeployment};async function scaffoldSlackChannel(e,t,n,r,i,a){let o=!1;if(!t.slackScaffolded){let t=await u.ensureChannel({projectRoot:n,kind:`slack`,slackConnectorUid:a,slackConnectorSlug:r,force:l.force});warnOverwrittenFiles(e,t.filesOverwritten),t.action===`created`||t.action===`overwritten`?e.success(`Scaffolded channel: slack`):e.info(`Channel "slack" already exists. Skipping file creation.`),o=t.action!==`skipped`,i.slackScaffolded=!0}return i.channelsAdded.push(`slack`),o}async function linkProjectForSlackbot(e,t,n,o,s){if(o)throw new HumanActionRequiredError({kind:`vercel-link`,command:`vercel link`,reason:`Slackbot creation needs this directory linked to a Vercel project.`});if(e.message(`Linking this directory to a Vercel project...`),!await u.runVercel([`link`],{cwd:t,signal:s}))throw s?.throwIfAborted(),Error(`Vercel project linking failed. Slackbot creation did not start.`);let c=mergeProjectResolution(n,projectResolutionFromDeployment(await u.detectDeployment(t,{signal:s})));if(!isProjectResolved(c))throw Error(`Vercel project linking failed. Slackbot creation did not start.`);return c}async function addWebChannelToPayload(e,t,n,r,i,a){if(!t.channelSelection.includes(`web`))return;if(t.webScaffolded){i.channelsAdded.push(`web`);return}e.message(`Scaffolding Web Chat channel files...`);let o={projectRoot:n,kind:`web`,packageManager:r,force:l.force,configureVercelServices:l.configureVercelServices??hasVercelProject(t)};l.evePackage!==void 0&&(o.webPackageVersions={evePackage:l.evePackage});let s=await u.ensureChannel(o);if(a?.throwIfAborted(),warnOverwrittenFiles(e,s.filesOverwritten),s.kind===`web`&&s.action!==`skipped`&&s.nodeEngineOverride!==void 0&&e.warning(formatNodeEngineOverrideWarning(s.nodeEngineOverride)),warnCompetingNextConfigFiles(e,`competingNextConfigFiles`in s?s.competingNextConfigFiles:void 0),s.action===`created`||s.action===`overwritten`){e.success(`Scaffolded channel: web`),i.webScaffolded=!0,i.channelsAdded.push(`web`);return}e.info(`Next.js project detected. Skipping Web Chat scaffolding.`)}function assertSlackProjectReady(e){if(l.ensureLinkedProject===void 0){if(!hasVercelProject(e))throw Error(`Slack requires a Vercel project. Re-run and choose to deploy to Vercel to add Slack.`);if(!isProjectResolved(e.project))throw Error(`Expected a linked Vercel project for Slack, but none was resolved.`)}}async function provisionSlackbotWithControls(e,t,n,r){if(r===void 0&&l.prompter.awaitChoice===void 0)return u.provisionSlackbot(e,t,n);let i={};return r!==void 0&&(i.signal=r),l.prompter.awaitChoice!==void 0&&(i.awaitChoice=l.prompter.awaitChoice),u.provisionSlackbot(e,t,n,void 0,i)}async function scaffoldAttachedSlackChannel(e,t,n,r,i,a){if(!await scaffoldSlackChannel(e,t,n,r,i,a.connectorUid)&&!await u.reconcileSlackUid(e,n,a,`slack/${r}`))throw Error(`Slack connector UID update is required before deployment.`)}async function addSlackChannelToPayload(e,t,n,i,a,o){if(!t.channelSelection.includes(`slack`))return;assertSlackProjectReady(t);let s=await u.deriveSlackConnectorSlug(i,t.agentName);if(t.slackbotCreated){if(!t.slackbotAttached)throw Error(SLACKBOT_NOT_ATTACHED_ERROR);if(!t.deploymentPending)return;let n=t.slackConnectorUid;if(n===void 0)throw Error(`Slack connector UID was not resolved. Slack deployment did not start.`);await scaffoldAttachedSlackChannel(e,t,i,s,a,{state:`attached`,connectorUid:n});return}if(n.createSlackbot!==!0){e.info(`Slack channel was not added because Slackbot setup was skipped.`);return}isProjectResolved(a.project)||(a.project=await linkProjectForSlackbot(e,i,a.project,n.headless,o));let c=await provisionSlackbotWithControls(e,i,s,o);if(o?.throwIfAborted(),c.state===`cancelled`)throw new WizardCancelledError;if(c.state!==`attached`){let t=slackbotFailureCopy(c);if(l.slackbotFailure!==`warn-and-continue`)throw Error(t.reason);e.warning(`${t.reason} ${t.followUp}`);return}a.slackbot={connectorUid:c.connectorUid,chatUrl:c.chatUrl,workspaceName:c.workspaceName},await scaffoldAttachedSlackChannel(e,t,i,s,a,c)}async function installChannelDependencies(e,t,n,r,i){if(r.channelsAdded.length!==0){if(await withPhase(e,`Installing channel dependencies (${n} install)...`,()=>u.runPackageManagerInstall(n,t,{onOutput:createPromptCommandOutput(e),signal:i}))){r.dependenciesInstalled=!0;return}e.warning(`Dependency installation failed. The new channels stay unloadable until \`${n} install\` or a deploy succeeds.`)}}async function performAddChannels(e,t,n){n?.throwIfAborted();let r=l.prompter.log,i=requireProjectPath(e),a={channelsAdded:[],webScaffolded:e.webScaffolded,slackScaffolded:e.slackScaffolded,dependenciesInstalled:!1,project:e.project},o=await u.detectPackageManager(i);return await addWebChannelToPayload(r,e,i,o.kind,a,n),await addSlackChannelToPayload(r,e,t,i,a,n),await installChannelDependencies(r,i,o.kind,a,n),a}return{id:`add-channels`,async gather({state:n}){let r=l.headless??!1;if(r&&n.channelSelection.includes(`slack`))throw Error("Slack setup is interactive. Run `eve channels add slack` from an interactive terminal.");if(!n.channelSelection.includes(`slack`)||l.presetCreateSlackbot!==void 0||n.slackbotCreated)return{headless:r,createSlackbot:l.presetCreateSlackbot};try{return{headless:r,createSlackbot:await l.asker.ask(confirm({key:`create-slackbot`,message:`Do you want to create your slackbot?`}))}}catch(t){if(t instanceof SkippedSignal)return{headless:r,createSlackbot:!1};throw t}},async perform({state:e,input:t,signal:n}){try{return await performAddChannels(e,t,n)}catch(e){if(!(e instanceof WizardCancelledError)){let t=e instanceof Error?e.message:String(e),n=t.split(`
2
2
  `)[0]?.trim()??t;l.prompter.log.error(n)}throw e}},apply(e,t){let n=[...e.channels];for(let e of t.channelsAdded)n.includes(e)||n.push(e);let r={...e,channels:n,webScaffolded:t.webScaffolded,slackScaffolded:t.slackScaffolded,deploymentPending:e.deploymentPending||t.channelsAdded.length>0,deploymentDependenciesInstalled:t.channelsAdded.length>0?t.dependenciesInstalled:e.deploymentDependenciesInstalled,project:mergeProjectResolution(e.project,t.project)};return t.slackbot===void 0?r:{...r,slackbotCreated:!0,slackbotAttached:!0,slackConnectorUid:t.slackbot.connectorUid,slackChatUrl:t.slackbot.chatUrl,slackWorkspaceName:t.slackbot.workspaceName}}}}export{addChannels};
@@ -1 +1 @@
1
- import{detectDeployment,isProjectResolved,mergeProjectResolution,projectResolutionFromDeployResult,projectResolutionFromDeployment}from"../project-resolution.js";import{hasVercelProject,requireProjectPath}from"../state.js";import{detectPackageManager}from"#setup/package-manager.js";import{HumanActionRequiredError}from"#setup/human-action.js";import{createPromptCommandOutput,withPhase}from"#setup/cli/index.js";import{runPackageManagerInstall}from"#setup/primitives/pm/run.js";import{runVercel}from"#setup/primitives/run-vercel.js";const VERCEL_DEPLOY_ENV={VERCEL_USE_EXPERIMENTAL_FRAMEWORKS:`1`};function deployProject(o){let s=o.deps??{runVercel,detectPackageManager,runPackageManagerInstall,detectDeployment};return{id:`deploy-project`,shouldRun(e){return o.skip||!e.deploymentPending?!1:hasVercelProject(e)||o.ensureLinkedProject===`interactive-vercel-link`},async gather(){return{headless:o.headless??!1}},async perform({state:e,input:n,signal:r}){let i=requireProjectPath(e),{log:a}=o.prompter,c=createPromptCommandOutput(a),l=e.project;if(!isProjectResolved(l)){if(n.headless)throw new HumanActionRequiredError({kind:`vercel-link`,command:`vercel link`,reason:`Deployment needs this directory linked to a Vercel project.`});if(a.message(`Linking this directory to a Vercel project before deployment...`),!await s.runVercel([`link`],{cwd:i,signal:r}))throw r?.throwIfAborted(),Error(`Vercel project linking failed. Deployment did not start.`);if(l=mergeProjectResolution(l,projectResolutionFromDeployment(await s.detectDeployment(i,{signal:r}))),!isProjectResolved(l))throw Error(`Vercel project linking failed. Deployment did not start.`)}if(!e.deploymentDependenciesInstalled){let e=await s.detectPackageManager(i);if(!await withPhase(a,`Installing project dependencies before deployment (${e.kind} install)...`,()=>s.runPackageManagerInstall(e.kind,i,{onOutput:c,signal:r})))throw r?.throwIfAborted(),Error(`Dependency installation failed. Deployment did not start.`)}let u=n.headless?[`deploy`,`--prod`,`--yes`,`--non-interactive`]:[`deploy`,`--prod`,`--yes`],d=await withPhase(a,`Deploying the agent to Vercel production...`,()=>s.runVercel(u,{cwd:i,extraEnv:VERCEL_DEPLOY_ENV,nonInteractive:n.headless,onOutput:c,signal:r}));if(r?.throwIfAborted(),!d)throw a.error("`vercel deploy --prod` failed. The deploy output above shows the cause; fix it, then run `vercel deploy --prod` to retry."),Error(`Deployment failed after channel setup.`);let f=await withPhase(a,`Pulling Vercel environment variables into .env.local...`,()=>s.runVercel([`env`,`pull`,`--yes`],{cwd:i,nonInteractive:n.headless,onOutput:c,signal:r}));r?.throwIfAborted(),f||a.warning(`Deployment succeeded, but pulling Vercel environment variables did not complete.`);let p=await s.detectDeployment(i,{signal:r}),m=p.state===`deployed`?p.productionUrl:void 0;return m===void 0?a.warning(`Deployment succeeded, but Eve could not verify its production URL.`):a.info(`Production URL: ${m}`),{project:projectResolutionFromDeployResult(l,{deployed:!0,productionUrl:m}),deploymentPending:!1,deploymentDependenciesInstalled:!0}},apply(e,t){return{...e,project:t.project,deploymentPending:t.deploymentPending,deploymentDependenciesInstalled:t.deploymentDependenciesInstalled}}}}export{deployProject};
1
+ import{detectDeployment,isProjectResolved,mergeProjectResolution,projectResolutionFromDeployResult,projectResolutionFromDeployment}from"../project-resolution.js";import{hasVercelProject,requireProjectPath}from"../state.js";import{detectPackageManager}from"#setup/package-manager.js";import{HumanActionRequiredError}from"#setup/human-action.js";import{createPromptCommandOutput,withPhase}from"#setup/cli/index.js";import{runPackageManagerInstall}from"#setup/primitives/pm/run.js";import{runVercel}from"#setup/primitives/run-vercel.js";const VERCEL_DEPLOY_ENV={VERCEL_USE_EXPERIMENTAL_FRAMEWORKS:`1`};function deployProject(o){let s=o.deps??{runVercel,detectPackageManager,runPackageManagerInstall,detectDeployment};return{id:`deploy-project`,shouldRun(e){return o.skip||!e.deploymentPending?!1:hasVercelProject(e)||o.ensureLinkedProject===`interactive-vercel-link`},async gather(){return{headless:o.headless??!1}},async perform({state:e,input:n,signal:r}){let i=requireProjectPath(e),{log:a}=o.prompter,c=createPromptCommandOutput(a),l=e.project;if(!isProjectResolved(l)){if(n.headless)throw new HumanActionRequiredError({kind:`vercel-link`,command:`vercel link`,reason:`Deployment needs this directory linked to a Vercel project.`});if(a.message(`Linking this directory to a Vercel project before deployment...`),!await s.runVercel([`link`],{cwd:i,signal:r}))throw r?.throwIfAborted(),Error(`Vercel project linking failed. Deployment did not start.`);if(l=mergeProjectResolution(l,projectResolutionFromDeployment(await s.detectDeployment(i,{signal:r}))),!isProjectResolved(l))throw Error(`Vercel project linking failed. Deployment did not start.`)}if(!e.deploymentDependenciesInstalled){let e=await s.detectPackageManager(i);if(!await withPhase(a,`Installing project dependencies before deployment (${e.kind} install)...`,()=>s.runPackageManagerInstall(e.kind,i,{onOutput:c,signal:r})))throw r?.throwIfAborted(),Error(`Dependency installation failed. Deployment did not start.`)}let u=n.headless?[`deploy`,`--prod`,`--yes`,`--non-interactive`]:[`deploy`,`--prod`,`--yes`],d=await withPhase(a,`Deploying the agent to Vercel production...`,()=>s.runVercel(u,{cwd:i,extraEnv:VERCEL_DEPLOY_ENV,nonInteractive:n.headless,onOutput:c,signal:r}));if(r?.throwIfAborted(),!d)throw a.error("`vercel deploy --prod` failed. The deploy output above shows the cause; fix it, then run `vercel deploy --prod` to retry."),Error(`Deployment failed after channel setup.`);let f=await withPhase(a,`Pulling Vercel environment variables into .env.local...`,()=>s.runVercel([`env`,`pull`,`--yes`],{cwd:i,nonInteractive:n.headless,onOutput:c,signal:r}));r?.throwIfAborted(),f||a.warning(`Deployment succeeded, but pulling Vercel environment variables did not complete.`);let p=await s.detectDeployment(i,{signal:r}),m=p.state===`deployed`?p.productionUrl:void 0;return m===void 0?a.warning(`Deployment succeeded, but eve could not verify its production URL.`):a.info(`Production URL: ${m}`),{project:projectResolutionFromDeployResult(l,{deployed:!0,productionUrl:m}),deploymentPending:!1,deploymentDependenciesInstalled:!0}},apply(e,t){return{...e,project:t.project,deploymentPending:t.deploymentPending,deploymentDependenciesInstalled:t.deploymentDependenciesInstalled}}}}export{deployProject};