Skip to content

armgit / eve

Public Imported from GitHub
0

The Open Framework for Building Agents

fix(eve): run web chat as separate service without linking (#3914)

OwenKephartdabb8bdeb946
diff --git a/.changeset/relax-web-chat-vercel-setup.md b/.changeset/relax-web-chat-vercel-setup.md
new file mode 100644
index 000000000..b66dc369f
--- /dev/null
+++ b/.changeset/relax-web-chat-vercel-setup.md
@@ -0,0 +1,5 @@
+---
+"eve": patch
+---
+
+Web Chat's Vercel services setup no longer requires linking a Vercel project. Use `pnpm dev:all` to run the service graph locally; it uses linked project settings when available.
diff --git a/apps/templates/eve-chat-template/README.md b/apps/templates/eve-chat-template/README.md
index 533c87105..24fe71866 100644
--- a/apps/templates/eve-chat-template/README.md
+++ b/apps/templates/eve-chat-template/README.md
@@ -43,10 +43,10 @@ Run the web app locally without additional services:
pnpm dev
```
-To run the web app and eve as the Vercel service graph, use:
+To run the web app and eve as the Vercel service graph without linking a Vercel project, use:
```bash
-pnpm dev:services
+pnpm dev:all
```
To require the same password locally, put this in `.env.local`:
@@ -130,7 +130,7 @@ Start the web app development server:
pnpm dev
```
-Use `pnpm dev:services` to run the full Vercel service graph locally.
+Use `pnpm dev:all` to run the full Vercel service graph locally without linking a Vercel project.
## What Is Included
diff --git a/apps/templates/eve-chat-template/docs/setup-and-deploy.md b/apps/templates/eve-chat-template/docs/setup-and-deploy.md
index 5739464eb..bcc081543 100644
--- a/apps/templates/eve-chat-template/docs/setup-and-deploy.md
+++ b/apps/templates/eve-chat-template/docs/setup-and-deploy.md
@@ -248,7 +248,7 @@ PORT=3001 pnpm dev
To run the web app and eve as Vercel peer services, use:
```bash
-pnpm dev:services
+pnpm dev:all
```
Open the matching local URL and make sure the Vercel App contains the same callback URL.
diff --git a/apps/templates/eve-chat-template/package.json b/apps/templates/eve-chat-template/package.json
index fea2da398..6c5f0910f 100644
--- a/apps/templates/eve-chat-template/package.json
+++ b/apps/templates/eve-chat-template/package.json
@@ -17,7 +17,7 @@
"db:studio": "drizzle-kit studio --config apps/web/drizzle.config.ts",
"dev": "next dev apps/web",
"dev:eve": "eve dev",
- "dev:services": "vercel dev",
+ "dev:all": "vercel dev --local",
"dev:web": "next dev apps/web",
"start:eve": "eve start",
"typecheck": "next typegen apps/web && tsgo --noEmit -p apps/web/tsconfig.json"
diff --git a/apps/templates/eve-llm-council-template/README.md b/apps/templates/eve-llm-council-template/README.md
index 9a91a8543..fb96337a9 100644
--- a/apps/templates/eve-llm-council-template/README.md
+++ b/apps/templates/eve-llm-council-template/README.md
@@ -34,17 +34,16 @@ The main pieces are:
```bash
pnpm install
-pnpm exec eve link
pnpm dev
```
Run the complete Vercel service graph with:
```bash
-pnpm dev:services
+pnpm dev:all
```
-`eve link` connects the app to a Vercel project and pulls the AI Gateway credentials needed by the models. Open the local URL printed by Next.js.
+`pnpm dev:all` starts without a linked Vercel project. To use the AI Gateway models, link a project with `pnpm exec eve link`; that also pulls the required credentials. Open the local URL printed by Next.js.
## Checks
diff --git a/apps/templates/eve-llm-council-template/package.json b/apps/templates/eve-llm-council-template/package.json
index f04dbca69..7d99bf447 100644
--- a/apps/templates/eve-llm-council-template/package.json
+++ b/apps/templates/eve-llm-council-template/package.json
@@ -12,7 +12,7 @@
"build:web": "next build --turbopack apps/web",
"dev": "next dev apps/web",
"dev:eve": "eve dev",
- "dev:services": "vercel dev",
+ "dev:all": "vercel dev --local",
"dev:web": "next dev apps/web",
"typecheck": "tsc -p apps/web/tsconfig.json"
},
diff --git a/apps/templates/personal-agent-template/AGENTS.md b/apps/templates/personal-agent-template/AGENTS.md
index eef18fe1b..07e6e8533 100644
--- a/apps/templates/personal-agent-template/AGENTS.md
+++ b/apps/templates/personal-agent-template/AGENTS.md
@@ -4,15 +4,15 @@ Durable personal AI assistant built with Eve and Nuxt.
## Quick Reference
-| Command | Description |
-| ------------------- | ------------------------------------ |
-| `pnpm install` | Install dependencies |
-| `pnpm dev` | Start the Nuxt web app |
-| `pnpm dev:services` | Start the local Vercel service graph |
-| `pnpm build` | Production build |
-| `pnpm typecheck` | TypeScript check |
-| `pnpm db:generate` | Generate Drizzle migrations |
-| `pnpm db:migrate` | Apply migrations |
+| Command | Description |
+| ------------------ | ------------------------------------ |
+| `pnpm install` | Install dependencies |
+| `pnpm dev` | Start the Nuxt web app |
+| `pnpm dev:all` | Start the local Vercel service graph |
+| `pnpm build` | Production build |
+| `pnpm typecheck` | TypeScript check |
+| `pnpm db:generate` | Generate Drizzle migrations |
+| `pnpm db:migrate` | Apply migrations |
## Structure
diff --git a/apps/templates/personal-agent-template/README.md b/apps/templates/personal-agent-template/README.md
index ad9c87451..ec0a04a8d 100644
--- a/apps/templates/personal-agent-template/README.md
+++ b/apps/templates/personal-agent-template/README.md
@@ -137,7 +137,7 @@ V can also propose facts via **`save_memory`** — approve or skip in chat. Edit
```bash
pnpm dev # Nuxt web app
-pnpm dev:services # Vercel dev runs the peer Nuxt and eve services
+pnpm dev:all # Vercel dev runs the peer Nuxt and eve services
pnpm typecheck # TypeScript check
pnpm build # Production build
pnpm db:generate # Generate Drizzle migrations
diff --git a/apps/templates/personal-agent-template/package.json b/apps/templates/personal-agent-template/package.json
index ad21b4ba0..67837015f 100644
--- a/apps/templates/personal-agent-template/package.json
+++ b/apps/templates/personal-agent-template/package.json
@@ -21,7 +21,7 @@
"build:web": "nuxt build --cwd apps/web",
"dev": "nuxt dev --cwd apps/web",
"dev:eve": "eve dev",
- "dev:services": "vercel dev",
+ "dev:all": "vercel dev --local",
"dev:web": "nuxt dev --cwd apps/web",
"start": "nuxt preview --cwd apps/web",
"typecheck": "nuxt typecheck --cwd apps/web",
diff --git a/docs/concepts/project-structure.mdx b/docs/concepts/project-structure.mdx
index f415e676d..c39bb71bd 100644
--- a/docs/concepts/project-structure.mdx
+++ b/docs/concepts/project-structure.mdx
@@ -79,7 +79,7 @@ Choose how the frontend and agents run together independently of how many agents
`apps/web/` is an organizational convention, not an eve filesystem slot. Deployment configuration owns peer services; eve discovers only the agents. Both Vercel integrations deploy the services together, not as independent releases.
-Run `eve add channel/web` from a standalone agent or select a workspace agent with `--agent <name>`. The installer creates a Next.js frontend under `apps/web/`. Choose **Vercel** to configure separate Vercel services and run them with `pnpm dev:services`, or **Other** to let Next.js host the agents and run the application with `pnpm dev:web`. Use `pnpm dev` or `pnpm dev:eve` when you only want one agent and the eve terminal UI.
+Run `eve add channel/web` from a standalone agent or select a workspace agent with `--agent <name>`. The installer creates a Next.js frontend under `apps/web/`. Choose **Vercel** to configure separate Vercel services and run them with `pnpm dev:all`; you don't need to link a Vercel project to run them locally. Choose **Other** to let Next.js host the agents and run the application with `pnpm dev:web`. Use `pnpm dev` or `pnpm dev:eve` when you only want one agent and the eve terminal UI.
## Add a second root agent
diff --git a/docs/guides/deployment/vercel.mdx b/docs/guides/deployment/vercel.mdx
index fa36f6be4..fb2c8260e 100644
--- a/docs/guides/deployment/vercel.mdx
+++ b/docs/guides/deployment/vercel.mdx
@@ -82,7 +82,7 @@ Vercel evaluates `vercel.ts` before resolving the service graph. `withEve` adds
The Web Chat installer can generate this composition for a standalone agent or a selected workspace agent. Configure authentication for every exposed agent. To self-host the same source layout, replace Vercel composition with your own [process and proxy configuration](./self-hosting#run-workspace-members).
-Run Vercel CLI 59.16.0 or newer with `vercel dev` to start the complete service graph locally. A generated Vercel Web Chat project exposes this as `pnpm dev:services`; the first run links the directory when needed and linked projects load their development environment and settings. Use `pnpm dev` or `pnpm dev:eve` when you want one agent and the eve terminal UI, or `pnpm dev:web` when you want the frontend without its agent services. Named agents use the same `/eve/<name>/v1/*` routes in development, and default `defineWorkspaceAgent` transports can call peers without deployment credentials.
+Run Vercel CLI 59.16.0 or newer with `vercel dev --local` to start the complete service graph locally without linking a Vercel project. A generated Vercel Web Chat project exposes this as `pnpm dev:all`. When the directory is linked, Vercel also loads its development environment and settings. Use `pnpm dev` or `pnpm dev:eve` when you want one agent and the eve terminal UI, or `pnpm dev:web` when you want the frontend without its agent services. Named agents use the same `/eve/<name>/v1/*` routes in development, and default `defineWorkspaceAgent` transports can call peers without deployment credentials.
Generated transport routes are inserted before a filesystem handler or, when no filesystem handler exists, before authored routes. `withEve` throws instead of overwriting an authored service key or exact transport route that belongs to a generated agent. Remove the authored route, and remove or rename the authored service; `withEve` adds both automatically. Names in the array form of `services` must also be unique. Other service names, routes, bindings, and Cron Jobs remain authored in `vercel.ts`.
diff --git a/docs/install-integrations.mdx b/docs/install-integrations.mdx
index 446c0058c..cb84116ad 100644
--- a/docs/install-integrations.mdx
+++ b/docs/install-integrations.mdx
@@ -19,7 +19,7 @@ eve add memory/file
If an item is not found, `eve add` searches the available catalogs and prints close matches without installing anything.
-Web Chat installs a shared Next.js application at `apps/web` for either a standalone agent or a selected member of an agent workspace. Choose **Vercel services** (recommended) to deploy Web Chat and agents as separate services, or **Next.js** to serve Web Chat and route agent requests through one Next.js app. Existing authored Next.js or Vercel configuration is preserved, and eve stops with manual composition guidance instead of overwriting it. See [Project Structure](./concepts/project-structure) for browser-app placement and [Next.js](./guides/frontend/nextjs) for Next.js-owned integration.
+Web Chat installs a shared Next.js application at `apps/web` for either a standalone agent or a selected member of an agent workspace. Choose **Vercel services** (recommended) to deploy Web Chat and agents as separate services, or **Next.js** to serve Web Chat and route agent requests through one Next.js app. Vercel services run locally without a linked Vercel project; link one when you are ready to deploy. Existing authored Next.js or Vercel configuration is preserved, and eve stops with manual composition guidance instead of overwriting it. See [Project Structure](./concepts/project-structure) for browser-app placement and [Next.js](./guides/frontend/nextjs) for Next.js-owned integration.
If you do not know an item name yet, run `eve add` without an argument. Its help output shows how to search the registry with `eve registry search <query>`.
diff --git a/packages/eve/src/setup/integrations/web/setup.test.ts b/packages/eve/src/setup/integrations/web/setup.test.ts
index 316afc5fe..4aa8cf0b6 100644
--- a/packages/eve/src/setup/integrations/web/setup.test.ts
+++ b/packages/eve/src/setup/integrations/web/setup.test.ts
@@ -19,7 +19,6 @@ function deps(): WebSetupDeps {
environmentRoot: appRoot,
kind: "standalone",
})),
- syncHostFrameworkPreset: vi.fn(async () => {}),
writeTextFile: vi.fn(async () => {}),
};
}
@@ -61,7 +60,7 @@ describe("Web setup", () => {
);
});
- it("requires a linked project when Vercel is selected", async () => {
+ it("does not require a Vercel project when Vercel services are selected", async () => {
const effects = deps();
const resolveVercelProject = vi.fn(async () => ({ orgId: "team", projectId: "project" }));
const ctx = createSetupContexts({
@@ -76,7 +75,7 @@ describe("Web setup", () => {
hosting: "vercel",
packageManager: "pnpm",
});
- expect(resolveVercelProject).toHaveBeenCalledWith("Web Chat");
+ expect(resolveVercelProject).not.toHaveBeenCalled();
});
it("does not require a Vercel project for other hosts", async () => {
@@ -168,15 +167,9 @@ describe("Web setup", () => {
);
expect(effects.writeTextFile).toHaveBeenCalledWith(
"/project/package.json",
- expect.stringContaining('"dev:services": "vercel dev"'),
+ expect.stringContaining('"dev:all": "vercel dev --local"'),
{ force: true },
);
- expect(effects.syncHostFrameworkPreset).toHaveBeenCalledWith(
- ctx.apply.presenter,
- "/project",
- expect.any(Function),
- { signal: undefined },
- );
});
it("preserves an authored default development script", async () => {
@@ -199,7 +192,7 @@ describe("Web setup", () => {
);
expect(effects.writeTextFile).toHaveBeenCalledWith(
"/project/package.json",
- expect.stringContaining('"dev:services": "vercel dev"'),
+ expect.stringContaining('"dev:all": "vercel dev --local"'),
{ force: true },
);
});
@@ -217,7 +210,7 @@ describe("Web setup", () => {
await expect(
applyWebSetup({ hosting: "vercel", packageManager: "npm" }, ctx.apply, effects),
).resolves.toEqual({
- facts: [{ label: "", value: "Start locally with `npm run dev:services`." }],
+ facts: [{ label: "", value: "Start locally with `npm run dev:all`." }],
});
expect(effects.writeTextFile).toHaveBeenCalledWith(
"/project/agent/channels/eve.ts",
diff --git a/packages/eve/src/setup/integrations/web/setup.ts b/packages/eve/src/setup/integrations/web/setup.ts
index df7246980..d7bf4b9d3 100644
--- a/packages/eve/src/setup/integrations/web/setup.ts
+++ b/packages/eve/src/setup/integrations/web/setup.ts
@@ -5,8 +5,6 @@ import { resolveEveProjectContext } from "#internal/project-context.js";
import { select } from "#setup/ask.js";
import { detectPackageManager, type PackageManagerKind } from "#setup/package-manager.js";
import { pathExists, writeTextFile } from "#setup/scaffold/files.js";
-import { createPromptCommandOutput } from "#setup/cli/index.js";
-import { syncHostFrameworkPreset } from "#setup/vercel-project-framework.js";
import { WEB_CHANNEL_TEMPLATES } from "#setup/scaffold/create/web-template.js";
import {
defineSetupIntegration,
@@ -46,7 +44,6 @@ export interface WebSetupDeps {
pathExists: typeof pathExists;
readTextFile(path: string): Promise<string>;
resolveEveProjectContext: typeof resolveEveProjectContext;
- syncHostFrameworkPreset: typeof syncHostFrameworkPreset;
writeTextFile: typeof writeTextFile;
}
@@ -55,7 +52,6 @@ const defaultDeps: WebSetupDeps = {
pathExists,
readTextFile: (path) => readFile(path, "utf8"),
resolveEveProjectContext,
- syncHostFrameworkPreset,
writeTextFile,
};
@@ -94,9 +90,6 @@ export async function prepareWebSetup(
required: true,
}),
);
- if (hosting === "vercel") {
- await context.resolveVercelProject("Web Chat");
- }
return {
hosting,
packageManager: (await deps.detectPackageManager(project.environmentRoot)).kind,
@@ -125,7 +118,7 @@ async function configurePeerServiceScripts(root: string, deps: WebSetupDeps): Pr
const scripts = { ...document.scripts };
scripts.dev ??= "eve dev";
scripts["dev:eve"] ??= "eve dev";
- scripts["dev:services"] ??= "vercel dev";
+ scripts["dev:all"] ??= "vercel dev --local";
await deps.writeTextFile(path, `${JSON.stringify({ ...document, scripts }, null, 2)}\n`, {
force: true,
});
@@ -194,13 +187,7 @@ export default withEve(nextConfig);
await deps.writeTextFile(nextConfigPath, PEER_SERVICE_NEXT_CONFIG, { force: true });
await deps.writeTextFile(vercelTsPath, PEER_SERVICE_VERCEL_CONFIG, { force: true });
await configurePeerServiceScripts(project.environmentRoot, deps);
- await deps.syncHostFrameworkPreset(
- context.presenter,
- project.environmentRoot,
- createPromptCommandOutput(context.presenter.log),
- { signal: context.signal },
- );
- startScript = "dev:services";
+ startScript = "dev:all";
} else {
await deps.writeTextFile(nextConfigPath, NEXT_HOSTED_CONFIG, { force: true });
startScript = "dev:web";