eve 0.17.2 → 0.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/src/compiled/.vendor-stamp.json +1 -1
  3. package/dist/src/compiled/@vercel/sandbox/api-client/api-client.d.ts +19 -16
  4. package/dist/src/compiled/@vercel/sandbox/api-client/index.d.ts +1 -1
  5. package/dist/src/compiled/@vercel/sandbox/api-client/validators.d.ts +37 -23
  6. package/dist/src/compiled/@vercel/sandbox/command.d.ts +2 -8
  7. package/dist/src/compiled/@vercel/sandbox/index.js +5 -5
  8. package/dist/src/compiled/@vercel/sandbox/sandbox.d.ts +43 -16
  9. package/dist/src/compiled/@vercel/sandbox/snapshot.d.ts +5 -5
  10. package/dist/src/compiled/_chunks/node/{auth-DF_ft5ea.js → auth-CWHn3Yve.js} +1 -1
  11. package/dist/src/compiled/_chunks/node/{version-TugPKZua.js → version-DD-FX9rK.js} +1 -1
  12. package/dist/src/execution/sandbox/bindings/vercel-create-sdk.js +1 -1
  13. package/dist/src/execution/sandbox/bindings/vercel.js +1 -1
  14. package/dist/src/internal/application/package.js +1 -1
  15. package/dist/src/internal/nitro/dev-runtime-source-snapshot-copy.js +1 -1
  16. package/dist/src/public/channels/auth.d.ts +2 -2
  17. package/dist/src/public/sandbox/vercel-sandbox.d.ts +4 -1
  18. package/dist/src/runtime/governance/auth/oidc.js +1 -1
  19. package/dist/src/setup/boxes/link-project.d.ts +7 -3
  20. package/dist/src/setup/boxes/link-project.js +1 -1
  21. package/dist/src/setup/onboarding.js +1 -1
  22. package/dist/src/setup/scaffold/create/project.js +1 -1
  23. package/dist/src/setup/vercel-project-framework.d.ts +10 -0
  24. package/dist/src/setup/vercel-project-framework.js +1 -0
  25. package/dist/src/setup/vercel-project.d.ts +8 -3
  26. package/dist/src/setup/vercel-project.js +0 -0
  27. package/docs/sandbox.mdx +1 -1
  28. package/package.json +3 -31
@@ -0,0 +1,10 @@
1
+ import { createPromptCommandOutput } from "#setup/cli/index.js";
2
+ import type { Prompter } from "./prompter.js";
3
+ import { type VercelProjectOperationOptions } from "./vercel-project-api.js";
4
+ export interface CreatedProjectFrameworkOptions extends VercelProjectOperationOptions {
5
+ /** Detects whether project sources already use the eve integration for a host framework. */
6
+ detectFrameworkIntegrationImport?: (projectRoot: string, importSpecifier: string) => Promise<boolean>;
7
+ /** Never prompt; ambiguous host framework detections fall back to the eve preset. */
8
+ headless?: boolean;
9
+ }
10
+ export declare function ensureCreatedProjectFramework(prompter: Prompter, projectRoot: string, team: string, projectId: string, onOutput: ReturnType<typeof createPromptCommandOutput>, options: CreatedProjectFrameworkOptions): Promise<void>;
@@ -0,0 +1 @@
1
+ import{object,string}from"../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/schemas.js";import"../node_modules/.pnpm/zod@4.4.3/node_modules/zod/index.js";import{isForbiddenApiFailure,normalizeVercelApiResult}from"./vercel-api-failure.js";import{VERCEL_PROJECT_REQUEST_TIMEOUT_MS,parseVercelJson,requireVercelTeamAccess}from"./vercel-project-api.js";import{extname,join}from"node:path";import*as fs from"node:fs/promises";import{captureVercel}from"#setup/primitives/index.js";import"#setup/cli/index.js";const VercelProjectFrameworkSchema=object({framework:string().min(1).nullish()}),EVE_FRAMEWORK_INTEGRATIONS={nextjs:{label:`Next.js`,importSpecifier:`eve/next`},nuxt:{label:`Nuxt`,importSpecifier:`eve/nuxt`},nuxtjs:{label:`Nuxt`,importSpecifier:`eve/nuxt`},sveltekit:{label:`SvelteKit`,importSpecifier:`eve/sveltekit`}},FRAMEWORK_INTEGRATION_SOURCE_EXTENSIONS=new Set([`.cjs`,`.cts`,`.js`,`.json`,`.jsx`,`.mjs`,`.mts`,`.svelte`,`.ts`,`.tsx`,`.vue`]),FRAMEWORK_INTEGRATION_IGNORED_DIRECTORIES=new Set([`.eve`,`.git`,`.next`,`.nuxt`,`.output`,`.svelte-kit`,`.turbo`,`.vercel`,`build`,`coverage`,`dist`,`node_modules`]);function parseProjectFramework(e,t){let n=VercelProjectFrameworkSchema.safeParse(parseVercelJson(e,t));if(!n.success)throw Error(`Could not read Vercel project framework from ${t}.`);return n.data.framework??void 0}async function fetchProjectFramework(e,t,a,s){let c=normalizeVercelApiResult(await captureVercel([`api`,`/v9/projects/${a}`,`--scope`,t,`--raw`],{cwd:e,signal:s.signal,timeoutMs:VERCEL_PROJECT_REQUEST_TIMEOUT_MS}));if(c.ok)return parseProjectFramework(c.stdout,`project ${a}`);throw isForbiddenApiFailure(c.failure)&&requireVercelTeamAccess(c.failure),Error(`Could not inspect Vercel project "${a}". ${c.failure.message}`)}async function setProjectFramework(e,t,a,s,c,l){let u=normalizeVercelApiResult(await captureVercel([`api`,`/v9/projects/${a}`,`--scope`,t,`--method`,`PATCH`,`--raw-field`,`framework=${s}`,`--raw`],{cwd:e,onOutput:c,signal:l.signal,timeoutMs:VERCEL_PROJECT_REQUEST_TIMEOUT_MS}));if(!u.ok)throw isForbiddenApiFailure(u.failure)&&requireVercelTeamAccess(u.failure),Error(`Could not set Vercel project "${a}" framework to ${s}. ${u.failure.message}`)}async function confirmDetectedFramework(e,t,n){return await e.select({message:`Vercel detected ${n.label}. Is this project using ${n.importSpecifier}?`,options:[{value:!0,label:`Yes, keep ${t}`,hint:`Use this for a host app that integrates eve through ${n.importSpecifier}.`},{value:!1,label:`No, switch to eve`,hint:`Use this for a standalone eve agent.`}]})?`keep`:`switch-to-eve`}function sourceMentionsPackageSpecifier(e,t){return e.includes(`"${t}"`)||e.includes(`'${t}'`)||e.includes(`\`${t}\``)}async function directoryContainsPackageSpecifier(e,t){let n;try{n=await fs.readdir(e,{encoding:`utf8`,withFileTypes:!0})}catch{return!1}for(let r of n){let n=join(e,r.name);if(r.isDirectory()){if(FRAMEWORK_INTEGRATION_IGNORED_DIRECTORIES.has(r.name))continue;if(await directoryContainsPackageSpecifier(n,t))return!0;continue}if(!(!r.isFile()||!FRAMEWORK_INTEGRATION_SOURCE_EXTENSIONS.has(extname(r.name))))try{if(sourceMentionsPackageSpecifier(await fs.readFile(n,`utf8`),t))return!0}catch{continue}}return!1}async function detectFrameworkIntegrationImport(e,t){return directoryContainsPackageSpecifier(e,t)}async function resolveDetectedFrameworkAction(e,t,n,r){let i=EVE_FRAMEWORK_INTEGRATIONS[n];return i===void 0?`switch-to-eve`:await(r.detectFrameworkIntegrationImport??detectFrameworkIntegrationImport)(t,i.importSpecifier)?`keep`:r.headless?`switch-to-eve`:confirmDetectedFramework(e,n,i)}async function ensureCreatedProjectFramework(e,t,n,r,i,a){let o=await fetchProjectFramework(t,n,r,a);o!==`eve`&&(o===void 0?`switch-to-eve`:await resolveDetectedFrameworkAction(e,t,o,a))===`switch-to-eve`&&await setProjectFramework(t,n,r,`eve`,i,a)}export{ensureCreatedProjectFramework};
@@ -4,6 +4,7 @@ import { type ProjectResolution } from "./project-resolution.js";
4
4
  import type { Prompter } from "./prompter.js";
5
5
  import type { ResolvedVercelProjectSpec, VercelProjectIdentity } from "./state.js";
6
6
  import { type VercelProjectOperationOptions } from "./vercel-project-api.js";
7
+ import { type CreatedProjectFrameworkOptions } from "./vercel-project-framework.js";
7
8
  export interface PickProjectOptions extends VercelProjectOperationOptions {
8
9
  /** Whether an empty project list may fall back to entering a name to create. */
9
10
  allowCreateWhenEmpty?: boolean;
@@ -12,6 +13,8 @@ export interface PickTeamOptions extends VercelProjectOperationOptions {
12
13
  /** Builds the team selector heading from the current team's display name. */
13
14
  selectMessage?: (currentTeam: string) => string;
14
15
  }
16
+ export interface LinkProjectOperationOptions extends CreatedProjectFrameworkOptions {
17
+ }
15
18
  export declare function unresolvedProject(): ProjectResolution;
16
19
  /** Resolves the linked project id from a resolution, if any. */
17
20
  export declare function projectIdFromResolution(project: ProjectResolution): string | undefined;
@@ -86,7 +89,9 @@ export declare function pickNewProjectName(prompter: Prompter, projectRoot: stri
86
89
  /**
87
90
  * Ensures the concrete project exists (creating it for a `new` plan) and links
88
91
  * this directory to it. Acts on a fully-resolved spec — never prompts for a
89
- * team or project. Returns the linked project, or undefined if `vercel link`
90
- * did not complete.
92
+ * team or project. A newly created project keeps a detected host framework
93
+ * when the matching eve integration import is present; otherwise missing,
94
+ * unsupported, or rejected framework detections are switched back to eve.
95
+ * Returns the linked project, or undefined if `vercel link` did not complete.
91
96
  */
92
- export declare function linkProject(prompter: Prompter, projectRoot: string, spec: ResolvedVercelProjectSpec, onOutput: ReturnType<typeof createPromptCommandOutput>, options?: VercelProjectOperationOptions): Promise<VercelProjectIdentity | undefined>;
97
+ export declare function linkProject(prompter: Prompter, projectRoot: string, spec: ResolvedVercelProjectSpec, onOutput: ReturnType<typeof createPromptCommandOutput>, options?: LinkProjectOperationOptions): Promise<VercelProjectIdentity | undefined>;
Binary file
package/docs/sandbox.mdx CHANGED
@@ -96,7 +96,7 @@ import { defineSandbox } from "eve/sandbox";
96
96
  import { vercel } from "eve/sandbox/vercel";
97
97
 
98
98
  export default defineSandbox({
99
- backend: vercel({ runtime: "node24", resources: { vcpus: 2 } }),
99
+ backend: vercel({ resources: { vcpus: 2 } }),
100
100
  revalidationKey: () => "repo-bootstrap-v1",
101
101
  async bootstrap({ use }) {
102
102
  const sandbox = await use();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eve",
3
- "version": "0.17.2",
3
+ "version": "0.18.0",
4
4
  "private": false,
5
5
  "description": "Filesystem-first framework for durable backend AI agents that run anywhere.",
6
6
  "keywords": [
@@ -285,7 +285,7 @@
285
285
  "@types/react-test-renderer": "19.1.0",
286
286
  "@vercel/detect-agent": "1.2.3",
287
287
  "@vercel/oidc": "3.5.0",
288
- "@vercel/sandbox": "2.2.1",
288
+ "@vercel/sandbox": "2.3.0",
289
289
  "@vercel/sdk": "1.28.1",
290
290
  "@workflow/core": "5.0.0-beta.26",
291
291
  "@workflow/errors": "5.0.0-beta.8",
@@ -321,25 +321,15 @@
321
321
  },
322
322
  "peerDependencies": {
323
323
  "@opentelemetry/api": "^1.0.0",
324
- "@sveltejs/kit": "^2.0.0",
325
324
  "ai": "^7.0.0",
326
325
  "braintrust": "^3.0.0",
327
326
  "just-bash": "^3.0.0",
328
- "microsandbox": "^0.5.0",
329
- "next": "^16.0.0",
330
- "nuxt": "^4.0.0",
331
- "react": "^19.0.0",
332
- "svelte": "^5.0.0",
333
- "vite": "^8.0.0",
334
- "vue": "^3.5.0"
327
+ "microsandbox": "^0.5.0"
335
328
  },
336
329
  "peerDependenciesMeta": {
337
330
  "@opentelemetry/api": {
338
331
  "optional": true
339
332
  },
340
- "@sveltejs/kit": {
341
- "optional": true
342
- },
343
333
  "braintrust": {
344
334
  "optional": true
345
335
  },
@@ -348,24 +338,6 @@
348
338
  },
349
339
  "microsandbox": {
350
340
  "optional": true
351
- },
352
- "next": {
353
- "optional": true
354
- },
355
- "nuxt": {
356
- "optional": true
357
- },
358
- "react": {
359
- "optional": true
360
- },
361
- "svelte": {
362
- "optional": true
363
- },
364
- "vite": {
365
- "optional": true
366
- },
367
- "vue": {
368
- "optional": true
369
341
  }
370
342
  },
371
343
  "engines": {