Skip to content

armgit / eve

Public Imported from GitHub
0

The Open Framework for Building Agents

feat(eve): add eve/tanstack Vite plugin for TanStack Start (#4394)

roboeve[bot]89bd6256f2d3
diff --git a/.changeset/tanstack-start-integration.md b/.changeset/tanstack-start-integration.md
new file mode 100644
index 000000000..b9087a133
--- /dev/null
+++ b/.changeset/tanstack-start-integration.md
@@ -0,0 +1,5 @@
+---
+"eve": patch
+---
+
+Add `eve/tanstack`, a Vite plugin that runs an eve agent inside a TanStack Start app: Nitro proxies `/eve/v1/**` to a local eve server in development, and Vercel builds deploy eve as a sibling service. Set `devServerTimeoutMs` to wait longer for a slow eve dev server to start. `eve build` and `eve dev` now always use Nitro's Rolldown builder, so an agent that shares its root with a TanStack Start app no longer fails to start.
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 5dddc122d..515ff5ae3 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -160,7 +160,7 @@ jobs:
run: pnpm test:scenario
test-framework-fixtures:
- name: test-framework-fixtures (next, nuxt, sveltekit)
+ name: test-framework-fixtures (next, nuxt, sveltekit, tanstack)
runs-on: ubuntu-latest
steps:
diff --git a/.oxfmtrc.json b/.oxfmtrc.json
index b639f1d1e..ec8e2f61c 100644
--- a/.oxfmtrc.json
+++ b/.oxfmtrc.json
@@ -4,6 +4,7 @@
"packages/eve/CHANGELOG.md",
"packages/eve/src/internal/testing/channel-conformance/MATRIX.md",
"apps/docs/registry.json",
+ "apps/frameworks/tanstack/src/routeTree.gen.ts",
"packages/eve/src/setup/scaffold/create/web-template.ts",
"e2e/fixtures/agent-mcp/agent/skills/kennel-handbook/references/latin1.md"
]
diff --git a/.oxlintrc.json b/.oxlintrc.json
index 4d1e2f90e..c41aa7c4b 100644
--- a/.oxlintrc.json
+++ b/.oxlintrc.json
@@ -1,4 +1,4 @@
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
- "ignorePatterns": [".agents/**", "**/next-env.d.ts"]
+ "ignorePatterns": [".agents/**", "**/next-env.d.ts", "**/routeTree.gen.ts"]
}
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 7a89f0f2f..67de8723f 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -46,7 +46,7 @@ The repo is a pnpm workspace orchestrated with [Turborepo](https://turborepo.com
- [`packages/eve`](./packages/eve) — the framework and `eve` CLI
- [`packages/eve-catalog`](./packages/eve-catalog) — internal (unpublished) integration catalog
- [`apps/fixtures`](./apps/fixtures) — shared agent fixtures used by e2e tests, TUI smoke tests, local dev, and bundle analysis
-- [`apps/frameworks`](./apps/frameworks) — framework integration apps for Next.js, Nuxt, and SvelteKit
+- [`apps/frameworks`](./apps/frameworks) — framework integration apps for Next.js, Nuxt, SvelteKit, and TanStack Start
- [`apps/templates`](./apps/templates) — source apps for generated templates
- [`docs`](./docs) — the published documentation content
- [`e2e/`](./e2e) — fixture-owned `eve eval` end-to-end tests
diff --git a/apps/docs/lib/geistdocs/llms-index.ts b/apps/docs/lib/geistdocs/llms-index.ts
index 857ad55a9..9d2ac1736 100644
--- a/apps/docs/lib/geistdocs/llms-index.ts
+++ b/apps/docs/lib/geistdocs/llms-index.ts
@@ -56,6 +56,7 @@ Documentation links below point directly to Markdown. Remove the \`.md\` suffix
- [Next.js](${EVE_ORIGIN}/docs/guides/frontend/nextjs.md): Mount eve routes and use the React client in Next.js.
- [Nuxt](${EVE_ORIGIN}/docs/guides/frontend/nuxt.md): Mount eve routes and use the Vue client in Nuxt.
- [SvelteKit](${EVE_ORIGIN}/docs/guides/frontend/sveltekit.md): Mount eve routes and use the Svelte client in SvelteKit.
+- [TanStack Start](${EVE_ORIGIN}/docs/guides/frontend/tanstack.md): Mount eve routes and use the React client in TanStack Start.
- [Client SDK](${EVE_ORIGIN}/docs/guides/client/overview.md): Call an eve app from scripts, services, tests, or custom UIs.
## Operate
diff --git a/apps/docs/lib/integrations/data.ts b/apps/docs/lib/integrations/data.ts
index c3690ce98..7a2c68483 100644
--- a/apps/docs/lib/integrations/data.ts
+++ b/apps/docs/lib/integrations/data.ts
@@ -406,6 +406,7 @@ export default linearChannel({
"next.js",
"svelte",
"sveltekit",
+ "tanstack",
"nuxt",
"vue",
"react",
@@ -416,7 +417,7 @@ export default linearChannel({
eve add channel/web
\`\`\`
-To wire it up by hand instead — including into a Svelte or Nuxt app you already have — install the framework:
+To wire it up by hand instead — including into a Svelte, Nuxt, or TanStack Start app you already have — install the framework:
\`\`\`bash
npm install eve@latest
@@ -430,14 +431,15 @@ import { eveChannel } from "eve/channels/eve";
export default eveChannel();
\`\`\`
-Point your frontend at the session routes eve serves (\`/eve/v1/session\`) and stream responses with the eve web client. Next.js, Nuxt, and Svelte each have an integration that mounts those routes on your app's own origin, so there's no CORS to configure and no URL env var to keep in sync:
+Point your frontend at the session routes eve serves (\`/eve/v1/session\`) and stream responses with the eve web client. Next.js, Nuxt, Svelte, and TanStack Start each have an integration that mounts those routes on your app's own origin, so there's no CORS to configure and no URL env var to keep in sync:
- **Next.js.** Wrap \`next.config.ts\` with \`withEve()\` from \`eve/next\`, then call \`useEveAgent()\` from \`eve/react\`. See the [Next.js guide](/docs/guides/frontend/nextjs).
- **Nuxt.** Add \`"eve/nuxt"\` to \`modules\` in \`nuxt.config.ts\`; the \`useEveAgent()\` composable from \`eve/vue\` is auto-imported. See the [Nuxt guide](/docs/guides/frontend/nuxt).
- **Svelte.** Add the \`eveSvelteKit()\` Vite plugin before \`sveltekit()\` in \`vite.config.ts\`, then call \`useEveAgent()\` from \`eve/svelte\`. See the [SvelteKit guide](/docs/guides/frontend/sveltekit).
+- **TanStack Start.** Add the \`eveTanStack()\` Vite plugin to \`vite.config.ts\` next to \`nitro()\`, then call \`useEveAgent()\` from \`eve/react\`. See the [TanStack Start guide](/docs/guides/frontend/tanstack).
On any other stack, wire it up by hand: run the agent as its own service and proxy \`/eve/v1/**\` to it, or pass its origin as \`host\` to \`useEveAgent()\` and enable \`cors\` on the channel. Server-side code and custom UIs can call the routes through \`Client\` from \`eve/client\`.`,
- configure: `The eve channel is the lowest-friction way to talk to your agent, with no third-party provisioning required. Layer in auth and route protection as needed, and enable \`cors\` only when a browser reaches the channel from another origin. See the [eve channel docs](/docs/channels/eve), the [Frontend guide](/docs/guides/frontend/overview), and the per-framework guides for [Next.js](/docs/guides/frontend/nextjs), [Nuxt](/docs/guides/frontend/nuxt), and [SvelteKit](/docs/guides/frontend/sveltekit).`,
+ configure: `The eve channel is the lowest-friction way to talk to your agent, with no third-party provisioning required. Layer in auth and route protection as needed, and enable \`cors\` only when a browser reaches the channel from another origin. See the [eve channel docs](/docs/channels/eve), the [Frontend guide](/docs/guides/frontend/overview), and the per-framework guides for [Next.js](/docs/guides/frontend/nextjs), [Nuxt](/docs/guides/frontend/nuxt), [SvelteKit](/docs/guides/frontend/sveltekit), and [TanStack Start](/docs/guides/frontend/tanstack).`,
},
"chat-sdk-gchat": {
logo: "googlechat",
diff --git a/apps/frameworks/README.md b/apps/frameworks/README.md
index afc8e07c0..33ff6efdb 100644
--- a/apps/frameworks/README.md
+++ b/apps/frameworks/README.md
@@ -6,5 +6,6 @@ These apps verify eve's frontend framework integrations and act as runnable exam
- `framework-next-multi-agent` covers `withEve()` workspace discovery and named `useEveAgent({ agent })` calls.
- `framework-nuxt` covers the `eve/nuxt` module.
- `framework-sveltekit` covers the `eve/sveltekit` Vite plugin.
+- `framework-tanstack` covers the `eve/tanstack` Vite plugin.
Keep these apps small and focused on framework wiring. Smoke-test-only behavior belongs in `apps/fixtures`.
diff --git a/apps/frameworks/tanstack/.gitignore b/apps/frameworks/tanstack/.gitignore
new file mode 100644
index 000000000..e410e7fbb
--- /dev/null
+++ b/apps/frameworks/tanstack/.gitignore
@@ -0,0 +1,6 @@
+.eve
+.nitro
+.output
+.tanstack
+.vercel
+node_modules
diff --git a/apps/frameworks/tanstack/README.md b/apps/frameworks/tanstack/README.md
new file mode 100644
index 000000000..823825b9c
--- /dev/null
+++ b/apps/frameworks/tanstack/README.md
@@ -0,0 +1,29 @@
+# TanStack Start with eve demo
+
+A TanStack Start app with an embedded eve agent, integrated through the
+`eveTanStack()` Vite plugin:
+
+```ts
+import { eveTanStack } from "eve/tanstack";
+import { nitro } from "nitro/vite";
+
+export default defineConfig({
+ plugins: [eveTanStack(), tanstackStart(), viteReact(), nitro()],
+});
+```
+
+The agent lives in `agent/` (instructions, tools, channels). The UI in
+`src/components/` is a small agent console built on eve's React hook, with
+streaming, reasoning, and tool-call rendering.
+
+## Run locally
+
+```sh
+pnpm --filter framework-tanstack dev
+```
+
+## Deploy
+
+On Vercel builds the plugin generates the eve service and its routing in the
+Build Output config, so no `vercel.json` is required. See
+[the TanStack Start frontend docs](../../../docs/guides/frontend/tanstack.mdx) for details.
diff --git a/apps/frameworks/tanstack/agent/agent.ts b/apps/frameworks/tanstack/agent/agent.ts
new file mode 100644
index 000000000..e38d33961
--- /dev/null
+++ b/apps/frameworks/tanstack/agent/agent.ts
@@ -0,0 +1,13 @@
+import { defineAgent } from "eve";
+
+export default defineAgent({
+ model: "anthropic/claude-opus-4.7",
+ modelOptions: {
+ providerOptions: {
+ anthropic: {
+ thinking: { type: "adaptive", display: "summarized" },
+ effort: "high",
+ },
+ },
+ },
+});
diff --git a/apps/frameworks/tanstack/agent/channels/eve.ts b/apps/frameworks/tanstack/agent/channels/eve.ts
new file mode 100644
index 000000000..3aa3ad290
--- /dev/null
+++ b/apps/frameworks/tanstack/agent/channels/eve.ts
@@ -0,0 +1,10 @@
+import { localDev, none } from "eve/channels/auth";
+import { eveChannel } from "eve/channels/eve";
+
+// This example accepts anonymous traffic so the deployed demo is clickable in
+// production. The deployment itself is gated by Vercel deployment protection.
+// Swap `none()` for a real provider (Auth.js, Clerk, `vercelOidc()`, ...) before
+// exposing the agent publicly.
+export default eveChannel({
+ auth: [localDev(), none()],
+});
diff --git a/apps/frameworks/tanstack/agent/instructions.md b/apps/frameworks/tanstack/agent/instructions.md
new file mode 100644
index 000000000..39833df54
--- /dev/null
+++ b/apps/frameworks/tanstack/agent/instructions.md
@@ -0,0 +1,4 @@
+You are a helpful weather assistant embedded in a TanStack Start app.
+
+Use the available weather tool when the user asks about weather. Keep answers
+concise and mention the tool result plainly.
diff --git a/apps/frameworks/tanstack/agent/tools/get_weather.ts b/apps/frameworks/tanstack/agent/tools/get_weather.ts
new file mode 100644
index 000000000..ef51ad41d
--- /dev/null
+++ b/apps/frameworks/tanstack/agent/tools/get_weather.ts
@@ -0,0 +1,25 @@
+import { defineTool } from "eve/tools";
+import { never } from "eve/tools/approval";
+import { z } from "zod";
+
+const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms));
+
+export default defineTool({
+ approval: never(),
+ description: "Get the current weather for a city.",
+ inputSchema: z.object({
+ city: z.string(),
+ }),
+ async execute(input) {
+ const city = input.city;
+
+ await sleep(300);
+
+ return {
+ city,
+ temperatureF: 72,
+ condition: "Sunny",
+ summary: `Sunny in ${city} with a light breeze.`,
+ };
+ },
+});
diff --git a/apps/frameworks/tanstack/package.json b/apps/frameworks/tanstack/package.json
new file mode 100644
index 000000000..569d517e0
--- /dev/null
+++ b/apps/frameworks/tanstack/package.json
@@ -0,0 +1,27 @@
+{
+ "name": "framework-tanstack",
+ "private": true,
+ "type": "module",
+ "scripts": {
+ "build": "vite build",
+ "dev": "vite dev",
+ "preview": "vite preview",
+ "typecheck": "tsc --noEmit"
+ },
+ "dependencies": {
+ "@tanstack/react-router": "^1.170.41",
+ "@tanstack/react-start": "^1.168.60",
+ "eve": "workspace:*",
+ "nitro": "3.0.260903-beta",
+ "react": "catalog:",
+ "react-dom": "catalog:",
+ "zod": "catalog:"
+ },
+ "devDependencies": {
+ "@types/node": "catalog:",
+ "@types/react": "catalog:",
+ "@types/react-dom": "catalog:",
+ "@vitejs/plugin-react": "^6.1.1",
+ "vite": "^8.3.1"
+ }
+}
diff --git a/apps/frameworks/tanstack/src/components/EveAgentConsole.tsx b/apps/frameworks/tanstack/src/components/EveAgentConsole.tsx
new file mode 100644
index 000000000..b42d200c1
--- /dev/null
+++ b/apps/frameworks/tanstack/src/components/EveAgentConsole.tsx
@@ -0,0 +1,135 @@
+import { useEveAgent, type EveDynamicToolPart, type EveMessagePart } from "eve/react";
+import { useState } from "react";
+
+function ToolBlock({
+ canRespond,
+ onRespond,
+ part,
+}: Readonly<{
+ canRespond: boolean;
+ onRespond: (requestId: string, optionId: string) => void;
+ part: EveDynamicToolPart;
+}>) {
+ const inputRequest = part.toolMetadata?.eve?.inputRequest;
+ const awaitingResponse =
+ inputRequest !== undefined && part.toolMetadata?.eve?.inputResponse === undefined;
+
+ return (
+ <div className="tool">
+ <strong>{part.toolMetadata?.eve?.name ?? part.toolName}</strong> <em>{part.state}</em>
+ <pre>{JSON.stringify(part.input, null, 2)}</pre>
+ {part.output !== undefined ? <pre>{JSON.stringify(part.output, null, 2)}</pre> : null}
+ {part.errorText ? <p className="error">{part.errorText}</p> : null}
+ {awaitingResponse ? (
+ <div>
+ <p>{inputRequest.prompt}</p>
+ {(inputRequest.options ?? []).map((option) => (
+ <button
+ disabled={!canRespond}
+ key={option.id}
+ onClick={() => onRespond(inputRequest.requestId, option.id)}
+ type="button"
+ >
+ {option.label}
+ </button>
+ ))}
+ </div>
+ ) : null}
+ </div>
+ );
+}
+
+function PartView({
+ canRespond,
+ onRespond,
+ part,
+}: Readonly<{
+ canRespond: boolean;
+ onRespond: (requestId: string, optionId: string) => void;
+ part: EveMessagePart;
+}>) {
+ switch (part.type) {
+ case "text":
+ return <div>{part.text}</div>;
+ case "reasoning":
+ return <div className="reasoning">{part.text}</div>;
+ case "dynamic-tool":
+ return <ToolBlock canRespond={canRespond} onRespond={onRespond} part={part} />;
+ default:
+ return null;
+ }
+}
+
+export function EveAgentConsole() {
+ const agent = useEveAgent();
+ const [draft, setDraft] = useState("");
+ const isBusy = agent.status === "submitted" || agent.status === "streaming";
+ const isInputDisabled = isBusy || agent.status === "resuming";
+
+ function submit() {
+ const text = draft.trim();
+ if (text.length === 0 || isInputDisabled) return;
+ setDraft("");
+ void agent.send(text);
+ }
+
+ return (
+ <main>
+ <header>
+ <span>eve / agent</span>
+ <span>{agent.status}</span>
+ </header>
+
+ {agent.error ? <p className="error">{agent.error.message}</p> : null}
+
+ {agent.data.messages.length === 0 ? (
+ <p>Ask for the weather in Vienna, or tell the agent to explain the tools it called.</p>
+ ) : (
+ <div className="messages">
+ {agent.data.messages.map((message) => (
+ <div className="message" data-role={message.role} key={message.id}>
+ {message.parts.map((part, index) => (
+ <PartView
+ canRespond={!isInputDisabled}
+ key={part.type === "dynamic-tool" ? part.toolCallId : `${part.type}:${index}`}
+ onRespond={(requestId, optionId) => void agent.respond([{ optionId, requestId }])}
+ part={part}
+ />
+ ))}
+ </div>
+ ))}
+ </div>
+ )}
+
+ <form
+ onSubmit={(event) => {
+ event.preventDefault();
+ submit();
+ }}
+ >
+ <textarea
+ disabled={isInputDisabled}
+ onChange={(event) => setDraft(event.currentTarget.value)}
+ onKeyDown={(event) => {
+ if (event.key === "Enter" && !event.shiftKey) {
+ event.preventDefault();
+ submit();
+ }
+ }}
+ placeholder="Send a message..."
+ rows={2}
+ value={draft}
+ />
+ {isBusy ? (
+ <button onClick={() => void agent.cancel()} type="button">
+ Stop
+ </button>
+ ) : (
+ <button disabled={isInputDisabled || draft.trim().length === 0} type="submit">
+ Send
+ </button>
+ )}
+ </form>
+ </main>
+ );
+}
diff --git a/apps/frameworks/tanstack/src/routeTree.gen.ts b/apps/frameworks/tanstack/src/routeTree.gen.ts
new file mode 100644
index 000000000..dceedffdc
--- /dev/null
+++ b/apps/frameworks/tanstack/src/routeTree.gen.ts
@@ -0,0 +1,68 @@
+/* eslint-disable */
+
+// @ts-nocheck
+
+// noinspection JSUnusedGlobalSymbols
+
+// This file was automatically generated by TanStack Router.
+// You should NOT make any changes in this file as it will be overwritten.
+// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
+
+import { Route as rootRouteImport } from './routes/__root'
+import { Route as IndexRouteImport } from './routes/index'
+
+const IndexRoute = IndexRouteImport.update({
+ id: '/',
+ path: '/',
+ getParentRoute: () => rootRouteImport,
+} as any)
+
+export interface FileRoutesByFullPath {
+ '/': typeof IndexRoute
+}
+export interface FileRoutesByTo {
+ '/': typeof IndexRoute
+}
+export interface FileRoutesById {
+ __root__: typeof rootRouteImport
+ '/': typeof IndexRoute
+}
+export interface FileRouteTypes {
+ fileRoutesByFullPath: FileRoutesByFullPath
+ fullPaths: '/'
+ fileRoutesByTo: FileRoutesByTo
+ to: '/'
+ id: '__root__' | '/'
+ fileRoutesById: FileRoutesById
+}
+export interface RootRouteChildren {
+ IndexRoute: typeof IndexRoute
+}
+
+declare module '@tanstack/react-router' {
+ interface FileRoutesByPath {
+ '/': {
+ id: '/'
+ path: '/'
+ fullPath: '/'
+ preLoaderRoute: typeof IndexRouteImport
+ parentRoute: typeof rootRouteImport
+ }
+ }
+}
+
+const rootRouteChildren: RootRouteChildren = {
+ IndexRoute: IndexRoute,
+}
+export const routeTree = rootRouteImport
+ ._addFileChildren(rootRouteChildren)
+ ._addFileTypes<FileRouteTypes>()
+
+import type { getRouter } from './router.tsx'
+import type { createStart } from '@tanstack/react-start'
+declare module '@tanstack/react-start' {
+ interface Register {
+ ssr: true
+ router: Awaited<ReturnType<typeof getRouter>>
+ }
+}
diff --git a/apps/frameworks/tanstack/src/router.tsx b/apps/frameworks/tanstack/src/router.tsx
new file mode 100644
index 000000000..cdc2a6474
--- /dev/null
+++ b/apps/frameworks/tanstack/src/router.tsx
@@ -0,0 +1,13 @@
+import { createRouter } from "@tanstack/react-router";
+
+import { routeTree } from "./routeTree.gen";
+
+export function getRouter() {
+ return createRouter({ routeTree, scrollRestoration: true });
+}
+
+declare module "@tanstack/react-router" {
+ interface Register {
+ router: ReturnType<typeof getRouter>;
+ }
+}
diff --git a/apps/frameworks/tanstack/src/routes/__root.tsx b/apps/frameworks/tanstack/src/routes/__root.tsx
new file mode 100644
index 000000000..49bbff2a7
--- /dev/null
+++ b/apps/frameworks/tanstack/src/routes/__root.tsx
@@ -0,0 +1,39 @@
+/// <reference types="vite/client" />
+import { createRootRoute, HeadContent, Outlet, Scripts } from "@tanstack/react-router";
+import type { ReactNode } from "react";
+
+import appCss from "../styles.css?url";
+
+export const Route = createRootRoute({
+ head: () => ({
+ links: [{ href: appCss, rel: "stylesheet" }],
+ meta: [
+ { charSet: "utf-8" },
+ { content: "width=device-width, initial-scale=1", name: "viewport" },
+ { title: "eve Agent" },
+ ],
+ }),
+ component: RootComponent,
+});
+
+function RootComponent() {
+ return (
+ <RootDocument>
+ <Outlet />
+ </RootDocument>
+ );
+}
+
+function RootDocument({ children }: Readonly<{ children: ReactNode }>) {
+ return (
+ <html lang="en">
+ <head>
+ <HeadContent />
+ </head>
+ <body>
+ {children}
+ <Scripts />
+ </body>
+ </html>
+ );
+}
diff --git a/apps/frameworks/tanstack/src/routes/index.tsx b/apps/frameworks/tanstack/src/routes/index.tsx
new file mode 100644
index 000000000..902738919
--- /dev/null
+++ b/apps/frameworks/tanstack/src/routes/index.tsx
@@ -0,0 +1,7 @@
+import { createFileRoute } from "@tanstack/react-router";
+
+import { EveAgentConsole } from "../components/EveAgentConsole";
+
+export const Route = createFileRoute("/")({
+ component: EveAgentConsole,
+});
diff --git a/apps/frameworks/tanstack/src/styles.css b/apps/frameworks/tanstack/src/styles.css
new file mode 100644
index 000000000..7de92e616
--- /dev/null
+++ b/apps/frameworks/tanstack/src/styles.css
@@ -0,0 +1,73 @@
+:root {
+ color-scheme: light dark;
+ font-family: ui-sans-serif, system-ui, sans-serif;
+}
+
+body {
+ margin: 0;
+}
+
+main {
+ display: flex;
+ flex-direction: column;
+ gap: 1rem;
+ margin: 0 auto;
+ max-width: 48rem;
+ min-height: 100dvh;
+ padding: 1rem;
+ box-sizing: border-box;
+}
+
+header {
+ align-items: center;
+ display: flex;
+ font-family: ui-monospace, monospace;
+ font-size: 0.8125rem;
+ justify-content: space-between;
+}
+
+.messages {
+ display: flex;
+ flex: 1;
+ flex-direction: column;
+ gap: 1rem;
+}
+
+.message {
+ white-space: pre-wrap;
+}
+
+.message[data-role="user"] {
+ align-self: flex-end;
+ background: color-mix(in srgb, currentColor 8%, transparent);
+ border-radius: 0.5rem;
+ padding: 0.5rem 0.75rem;
+}
+
+.tool,
+.reasoning {
+ border: 1px solid color-mix(in srgb, currentColor 20%, transparent);
+ border-radius: 0.375rem;
+ font-size: 0.8125rem;
+ padding: 0.5rem 0.75rem;
+}
+
+.tool pre {
+ margin: 0.5rem 0 0;
+ overflow-x: auto;
+}
+
+.error {
+ color: crimson;
+}
+
+form {
+ display: flex;
+ gap: 0.5rem;
+}
+
+form textarea {
+ flex: 1;
+ font: inherit;
+ resize: none;
+}
diff --git a/apps/frameworks/tanstack/tsconfig.json b/apps/frameworks/tanstack/tsconfig.json
new file mode 100644
index 000000000..adb06cee3
--- /dev/null
+++ b/apps/frameworks/tanstack/tsconfig.json
@@ -0,0 +1,15 @@
+{
+ "include": ["**/*.ts", "**/*.tsx"],
+ "exclude": ["node_modules", ".output", ".vercel"],
+ "compilerOptions": {
+ "jsx": "react-jsx",
+ "lib": ["DOM", "DOM.Iterable", "ES2024"],
+ "module": "ESNext",
+ "moduleResolution": "Bundler",
+ "noEmit": true,
+ "skipLibCheck": true,
+ "strict": true,
+ "target": "ES2024",
+ "types": ["node", "vite/client"]
+ }
+}
diff --git a/apps/frameworks/tanstack/turbo.json b/apps/frameworks/tanstack/turbo.json
new file mode 100644
index 000000000..94e897e8a
--- /dev/null
+++ b/apps/frameworks/tanstack/turbo.json
@@ -0,0 +1,8 @@
+{
+ "extends": ["//"],
+ "tasks": {
+ "typecheck": {
+ "dependsOn": ["$TURBO_EXTENDS$", "eve#build"]
+ }
+ }
+}
diff --git a/apps/frameworks/tanstack/vite.config.ts b/apps/frameworks/tanstack/vite.config.ts
new file mode 100644
index 000000000..22f009335
--- /dev/null
+++ b/apps/frameworks/tanstack/vite.config.ts
@@ -0,0 +1,9 @@
+import { tanstackStart } from "@tanstack/react-start/plugin/vite";
+import viteReact from "@vitejs/plugin-react";
+import { eveTanStack } from "eve/tanstack";
+import { nitro } from "nitro/vite";
+import { defineConfig } from "vite";
+
+export default defineConfig({
+ plugins: [eveTanStack(), tanstackStart(), viteReact(), nitro()],
+});
diff --git a/docs/guides/deployment/overview.md b/docs/guides/deployment/overview.md
index 282df2a7c..6ad7606bc 100644
--- a/docs/guides/deployment/overview.md
+++ b/docs/guides/deployment/overview.md
@@ -14,7 +14,7 @@ Choose where the eve runtime will run:
| [Vercel](./vercel) | `.vercel/output` | Vercel Workflow | Vercel Sandbox | You want Vercel to operate the runtime services |
| [Self-hosting](./self-hosting) | `.output/` Node server | Local or custom Workflow world | Docker, microsandbox, or custom | You operate your own Node or container infrastructure |
-eve is frontend agnostic and can be deployed within Next.js, Nuxt, or SvelteKit applications. See [Frontend integrations](../frontend/overview) for more details.
+eve is frontend agnostic and can be deployed within Next.js, Nuxt, SvelteKit, or TanStack Start applications. See [Frontend integrations](../frontend/overview) for more details.
## Prepare for production
@@ -58,4 +58,4 @@ Follow the guide for your deployment platform or application topology:
- [Deploy to Vercel](./vercel): use Vercel Build Output, Workflow, Sandbox, Cron, and observability
- [Self-host eve](./self-hosting): run the Nitro Node server with infrastructure you manage
-- [Frontend integrations](../frontend/overview): mount eve alongside Next.js, Nuxt, or SvelteKit
+- [Frontend integrations](../frontend/overview): mount eve alongside Next.js, Nuxt, SvelteKit, or TanStack Start
diff --git a/docs/guides/frontend/meta.json b/docs/guides/frontend/meta.json
index b212c7d8f..b5681661c 100644
--- a/docs/guides/frontend/meta.json
+++ b/docs/guides/frontend/meta.json
@@ -1,5 +1,13 @@
{
"title": "Frontend Frameworks",
"defaultOpen": false,
- "pages": ["overview", "nextjs", "nuxt", "sveltekit", "use-eve-agent-vue", "use-eve-agent-svelte"]
+ "pages": [
+ "overview",
+ "nextjs",
+ "nuxt",
+ "sveltekit",
+ "tanstack",
+ "use-eve-agent-vue",
+ "use-eve-agent-svelte"
+ ]
}
diff --git a/docs/guides/frontend/overview.mdx b/docs/guides/frontend/overview.mdx
index b5e29107e..79fa59102 100644
--- a/docs/guides/frontend/overview.mdx
+++ b/docs/guides/frontend/overview.mdx
@@ -9,10 +9,10 @@ Use this guide when you already have a browser application and need to connect i
A browser UI is a client of the agent's HTTP routes (the [eve channel](../../channels/overview)). Two layers wire it up:
-- **Routing** makes the agent reachable from the browser. A framework integration can mount eve on your app's origin: [Next.js](./nextjs) (`withEve`), [Nuxt](./nuxt) (the `eve/nuxt` module), or [SvelteKit](./sveltekit) (the `eveSvelteKit` Vite plugin). If the frontend and agents are peer services, use your deployment platform or reverse proxy instead. The hook works with either setup; pass `host` for a different origin or a named path mount.
+- **Routing** makes the agent reachable from the browser. A framework integration can mount eve on your app's origin: [Next.js](./nextjs) (`withEve`), [Nuxt](./nuxt) (the `eve/nuxt` module), [SvelteKit](./sveltekit) (the `eveSvelteKit` Vite plugin), or [TanStack Start](./tanstack) (the `eveTanStack` Vite plugin). If the frontend and agents are peer services, use your deployment platform or reverse proxy instead. The hook works with either setup; pass `host` for a different origin or a named path mount.
- **The hook** (`useEveAgent`) holds the session state, streaming, errors, and composer status. It defaults to same-origin eve routes such as `/eve/v1/session`.
-The framework pages walk through the wiring step by step: [Next.js](./nextjs), [Nuxt](./nuxt), and [SvelteKit](./sveltekit). See [Project Structure](../../concepts/project-structure#configure-a-web-deployment) to choose between a framework integration and peer services.
+The framework pages walk through the wiring step by step: [Next.js](./nextjs), [Nuxt](./nuxt), [SvelteKit](./sveltekit), and [TanStack Start](./tanstack). See [Project Structure](../../concepts/project-structure#configure-a-web-deployment) to choose between a framework integration and peer services.
For scripts, server-to-server calls, evals, tests, or custom clients that do not need framework UI state, use the [Client SDK](../client/overview) directly.
@@ -437,12 +437,13 @@ const support = useEveAgent({ agent: "support" });
## Per-framework integration
-| Framework | Integration | Hook |
-| --------- | ------------------------------------ | ------------------------------------------------ |
-| Next.js | [`withEve`](./nextjs) | [`useEveAgent` (React)](#basic-chat-react) |
-| Nuxt | [`eve/nuxt` module](./nuxt) | [`useEveAgent` (Vue)](./use-eve-agent-vue) |
-| SvelteKit | [`eveSvelteKit` plugin](./sveltekit) | [`useEveAgent` (Svelte)](./use-eve-agent-svelte) |
-| Any React | same-origin or `host` | [`useEveAgent` (React)](#basic-chat-react) |
+| Framework | Integration | Hook |
+| -------------- | ------------------------------------ | ------------------------------------------------ |
+| Next.js | [`withEve`](./nextjs) | [`useEveAgent` (React)](#basic-chat-react) |
+| Nuxt | [`eve/nuxt` module](./nuxt) | [`useEveAgent` (Vue)](./use-eve-agent-vue) |
+| SvelteKit | [`eveSvelteKit` plugin](./sveltekit) | [`useEveAgent` (Svelte)](./use-eve-agent-svelte) |
+| TanStack Start | [`eveTanStack` plugin](./tanstack) | [`useEveAgent` (React)](#basic-chat-react) |
+| Any React | same-origin or `host` | [`useEveAgent` (React)](#basic-chat-react) |
## What to read next
diff --git a/docs/guides/frontend/tanstack.mdx b/docs/guides/frontend/tanstack.mdx
new file mode 100644
index 000000000..e62e7ad07
--- /dev/null
+++ b/docs/guides/frontend/tanstack.mdx
@@ -0,0 +1,172 @@
+---
+title: "TanStack Start"
+description: "Run an eve agent and a TanStack Start app as one project with the eveTanStack Vite plugin."
+---
+
+`eve/tanstack` runs a TanStack Start frontend and an eve agent as one project instead of two services. The `eveTanStack()` Vite plugin puts both on one dev server and one Vercel deploy, and [`useEveAgent`](./overview) from `eve/react` finds the mounted routes on its own. There's no CORS to configure and no URL env vars to keep in sync.
+
+## Prerequisites
+
+- The `eve` package installed in your project (`npm install eve@latest`).
+- An existing eve agent directory. If you don't have one, start from [Getting started](../../getting-started).
+- A TanStack Start app using React, with the [Nitro Vite plugin](https://tanstack.com/start/latest/docs/framework/react/guide/hosting#nitro) (`nitro` installed and `nitro()` registered). TanStack Start deploys to Vercel through Nitro, and the plugin attaches eve to it.
+
+## Register the Vite plugin
+
+Add `eveTanStack()` to `vite.config.ts` next to `nitro()`:
+
+```ts title="vite.config.ts"
+import { tanstackStart } from "@tanstack/react-start/plugin/vite";
+import viteReact from "@vitejs/plugin-react";
+import { eveTanStack } from "eve/tanstack";
+import { nitro } from "nitro/vite";
+import { defineConfig } from "vite";
+
+export default defineConfig({
+ plugins: [eveTanStack(), tanstackStart(), viteReact(), nitro()],
+});
+```
+
+The plugin looks for an `agent/` folder in the TanStack Start project root. Pass `eveRoot` when the agent lives elsewhere:
+
+```ts
+export default defineConfig({
+ plugins: [
+ eveTanStack({
+ eveRoot: "../my-agent",
+ }),
+ tanstackStart(),
+ viteReact(),
+ nitro(),
+ ],
+});
+```
+
+Without `nitro()` registered, Vite fails at startup with an error naming the missing plugin instead of serving a project whose eve routes would return 404.
+
+### `eveTanStack` options
+
+All fields are optional.
+
+| Option | Type | Default | Purpose |
+| -------------------- | -------- | --------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
+| `eveRoot` | `string` | TanStack Start project root | eve project root, relative to the TanStack Start project root unless absolute. |
+| `eveBuildCommand` | `string` | generated | Build command for the generated eve Vercel service. |
+| `devServerTimeoutMs` | `number` | `180000` | Maximum time to wait for the eve development server to start, including when another TanStack Start process is starting it. |
+
+For slow cold starts, increase the development timeout:
+
+```ts
+export default defineConfig({
+ plugins: [
+ eveTanStack({
+ devServerTimeoutMs: 300_000,
+ }),
+ tanstackStart(),
+ viteReact(),
+ nitro(),
+ ],
+});
+```
+
+## Call the hook
+
+With the plugin in `vite.config.ts`, components call [`useEveAgent`](./overview) from `eve/react` and don't pass a host:
+
+```tsx title="src/routes/index.tsx"
+import { createFileRoute } from "@tanstack/react-router";
+import { useEveAgent } from "eve/react";
+import { useState } from "react";
+
+export const Route = createFileRoute("/")({
+ component: Chat,
+});
+
+function Chat() {
+ const agent = useEveAgent();
+ const [draft, setDraft] = useState("");
+ const isBusy = agent.status === "submitted" || agent.status === "streaming";
+ const isInputDisabled = isBusy || agent.status === "resuming";
+
+ return (
+ <form
+ onSubmit={(event) => {
+ event.preventDefault();
+ const text = draft.trim();
+ if (text.length === 0 || isInputDisabled) return;
+ setDraft("");
+ void agent.send(text);
+ }}
+ >
+ {agent.data.messages.map((message) => (
+ <article key={message.id}>
+ <header>{message.role}</header>
+ {message.parts.map((part, index) =>
+ part.type === "text" ? <p key={part.id ?? index}>{part.text}</p> : null,
+ )}
+ </article>
+ ))}
+ <input
+ disabled={isInputDisabled}
+ onChange={(event) => setDraft(event.currentTarget.value)}
+ value={draft}
+ />
+ <button disabled={isInputDisabled} type="submit">
+ Send
+ </button>
+ </form>
+ );
+}
+```
+
+The browser still needs a production authentication policy. See [Authenticate browser requests](./overview#authenticate-browser-requests) for the default fail-closed behavior and channel configuration.
+
+eve ships hook bindings for React, Vue, and Svelte. A TanStack Start app that uses Solid can still mount the agent with this plugin and call it through the [Client SDK](../client/overview).
+
+## Dev vs deploy topology
+
+- **Local dev.** `npm run dev` boots the eve dev server next to TanStack Start and Nitro proxies `/eve/v1/**` to it, so the browser only ever hits the TanStack Start origin. The plugin uses the server named by `EVE_BASE_URL` when that variable is set, then a healthy shared eve dev server already running for the app, and otherwise starts one. A server the plugin starts stops when the Vite dev server closes (Vite 8.3 or later; earlier versions stop it when the process exits). Any tool that loads `vite.config.ts` in serve mode starts or reuses this server, including test runners such as Vitest. Keep `eveTanStack()` out of a separate test config if you don't want that.
+- **Vercel.** The TanStack Start app and the eve runtime deploy as a single project. On Vercel builds the plugin adds Build Output [`services`](https://vercel.com/docs/services) for eve and a `routes` entry that sends `/eve/v1/**` to that service before filesystem routing and before any routes you declare in `nitro({ vercel: { config } })`; the TanStack Start app remains the default app. No `vercel.json` is required. By default the generated service runs the installed eve binary from the TanStack Start app's dependencies, so the agent directory does not need its own `package.json`. When the agent needs its own build step, set `eveBuildCommand`:
+
+ ```ts
+ export default defineConfig({
+ plugins: [
+ eveTanStack({
+ eveBuildCommand: "npm run build:eve",
+ }),
+ tanstackStart(),
+ viteReact(),
+ nitro(),
+ ],
+ });
+ ```
+
+- **Other hosts.** `vite preview` and a self-hosted `node .output/server/index.mjs` don't mount the eve routes. Run the eve service on its own origin and pass `host` directly to `useEveAgent`:
+
+ ```ts
+ const agent = useEveAgent({
+ host: "https://agent.example.com",
+ });
+ ```
+
+ `eve build` and `vite build` (with Nitro's default Node.js preset) both write `.output/`. When the agent lives in the TanStack Start project root, build and serve eve from a separate directory (set `eveRoot` to it) so the two outputs do not overwrite each other. See [Self-host eve](../deployment/self-hosting) for running the eve service.
+
+## Managing vercel.json yourself
+
+When `vercel.json` declares [`services`](https://vercel.com/docs/services), the plugin generates nothing and your configuration owns routing. It must include the eve service (`framework: "eve"`) and a rewrite that exposes the eve transport, or the build fails:
+
+```json title="vercel.json"
+{
+ "services": {
+ "web": { "root": ".", "framework": "tanstack-start" },
+ "eve": { "root": "agent", "framework": "eve", "buildCommand": "eve build" }
+ },
+ "rewrites": [{ "source": "/eve/v1/(.*)", "destination": { "service": "eve" } }]
+}
+```
+
+## What to read next
+
+- [Frontend overview](./overview): the `useEveAgent` API
+- [Auth & route protection](../auth-and-route-protection)
+- [Deployment](../deployment/overview)
diff --git a/docs/reference/typescript-api.md b/docs/reference/typescript-api.md
index 159dcaba2..399234697 100644
--- a/docs/reference/typescript-api.md
+++ b/docs/reference/typescript-api.md
@@ -152,7 +152,7 @@ Tool definitions accept `availableInSubagents: false` to restrict the tool to to
| `eve/evals/reporters` | `Braintrust`, `JUnit`, `EvalReporter` |
| `eve/evals/loaders` | `loadJson`, `loadYaml` |
| `eve/react`, `eve/vue`, `eve/svelte` | `useEveAgent` |
-| `eve/next`, `eve/nuxt`, `eve/sveltekit` | framework bundler plugins |
+| `eve/next`, `eve/nuxt`, `eve/sveltekit`, `eve/tanstack` | framework bundler plugins |
| [`eve/client`](../guides/client/overview) | `Client`, `ClientSession`, health and agent-info schemas, response errors |
| [`eve/server`](../concepts/sessions-runs-and-streaming#read-a-session-in-process) | `sessions`, for reading session streams in process |
diff --git a/packages/eve/package.json b/packages/eve/package.json
index 27cc1fac1..90a73116b 100644
--- a/packages/eve/package.json
+++ b/packages/eve/package.json
@@ -102,6 +102,11 @@
"import": "./dist/src/public/sveltekit/index.js",
"default": "./dist/src/public/sveltekit/index.js"
},
+ "./tanstack": {
+ "types": "./dist/src/public/tanstack/index.d.ts",
+ "import": "./dist/src/public/tanstack/index.js",
+ "default": "./dist/src/public/tanstack/index.js"
+ },
"./tools/approval": {
"types": "./dist/src/public/tools/approval/index.d.ts",
"import": "./dist/src/public/tools/approval/index.js",
diff --git a/packages/eve/src/internal/nitro/host/create-application-nitro.scenario.test.ts b/packages/eve/src/internal/nitro/host/create-application-nitro.scenario.test.ts
index 0297bd704..9263ce4fc 100644
--- a/packages/eve/src/internal/nitro/host/create-application-nitro.scenario.test.ts
+++ b/packages/eve/src/internal/nitro/host/create-application-nitro.scenario.test.ts
@@ -445,6 +445,22 @@ describe("application Nitro creation", () => {
});
});
+ it("pins Nitro's rolldown builder so a host app's Vite config is never built as eve", async () => {
+ const { createDevelopmentApplicationNitro, createProductionApplicationNitro } =
+ await import("#internal/nitro/host/create-application-nitro.js");
+ const preparedHost = await createPreparedHost();
+
+ createNitroMock.mockResolvedValueOnce(createNitroStub().nitro);
+ await createDevelopmentApplicationNitro(preparedHost);
+ createNitroMock.mockResolvedValueOnce(createNitroStub().nitro);
+ await createProductionApplicationNitro(preparedHost, createProductionOptions(preparedHost));
+
+ expect(createNitroMock.mock.calls.map(([config]) => config.builder)).toEqual([
+ "rolldown",
+ "rolldown",
+ ]);
+ });
+
it("keeps Nitro dev watch off authored app sources", async () => {
const nitroStub = createNitroStub();
createNitroMock.mockResolvedValueOnce(nitroStub.nitro);
diff --git a/packages/eve/src/internal/nitro/host/create-application-nitro.ts b/packages/eve/src/internal/nitro/host/create-application-nitro.ts
index 33be65846..4e5a187e4 100644
--- a/packages/eve/src/internal/nitro/host/create-application-nitro.ts
+++ b/packages/eve/src/internal/nitro/host/create-application-nitro.ts
@@ -73,6 +73,11 @@ const INSTRUMENTATION_ALIAS_PATHS = {
const WORKFLOW_TRANSFORM_PATCHED = Symbol("eve.workflow-transform-patched");
const WORKFLOW_CACHE_PATH_FRAGMENT = "/.eve/workflow-cache/";
+// Nitro picks the Vite builder when the app root has a `vite.config` that calls
+// `nitro(`, which is the case when a TanStack Start host shares its root with
+// the agent. eve bundles its own runtime and never builds through the host's Vite.
+const EVE_NITRO_BUILDER = "rolldown";
+
const LOCAL_SANDBOX_BACKEND_NAMES = new Set([
"docker",
...Object.keys(OPTIONAL_ENGINE_PACKAGES_BY_BACKEND_NAME),
@@ -740,6 +745,7 @@ export async function createDevelopmentApplicationNitro(
const nitro = await createNitro(
{
_cli: { command: "dev" },
+ builder: EVE_NITRO_BUILDER,
buildDir: nitroBuildDir,
dev: true,
features: { websocket: true },
@@ -826,6 +832,7 @@ export async function createProductionApplicationNitro(
});
const nitro = await createNitro({
_cli: { command: "build" },
+ builder: EVE_NITRO_BUILDER,
buildDir: options.buildDir,
dev: false,
features: {
diff --git a/packages/eve/src/internal/testing/scenario-apps/tanstack-eve-service.ts b/packages/eve/src/internal/testing/scenario-apps/tanstack-eve-service.ts
new file mode 100644
index 000000000..e25d1ce97
--- /dev/null
+++ b/packages/eve/src/internal/testing/scenario-apps/tanstack-eve-service.ts
@@ -0,0 +1,105 @@
+import { createRequire } from "node:module";
+
+import type { ScenarioAppDescriptor } from "#internal/testing/scenario-app.js";
+
+// Not resolved from the installed workspace like the Next.js descriptor's
+// dependencies: TanStack Start is not an eve dependency, so no copy is
+// installed to resolve a version from. `nitro` is the copy eve ships.
+const require = createRequire(import.meta.url);
+const TANSTACK_ROUTER_VERSION = "^1.170.0";
+const TANSTACK_START_VERSION = "^1.168.0";
+const NITRO_VERSION = (require("nitro/package.json") as { version: string }).version;
+const VITE_REACT_VERSION = "^6.1.0";
+const VITE_VERSION = "^8.1.5";
+const REACT_VERSION = "^19.0.0";
+
+interface TanStackEveServiceDescriptorOptions {
+ readonly installDependencies?: boolean;
+}
+
+/**
+ * A TanStack Start host with a generated eve Vercel service. The agent lives
+ * in the host root, next to the `vite.config.ts` that registers `nitro()`
+ * with a user catch-all route that must not shadow eve's route.
+ */
+export function createTanStackEveServiceDescriptor(
+ options: TanStackEveServiceDescriptorOptions = {},
+): ScenarioAppDescriptor {
+ return {
+ dependencies: {
+ "@tanstack/react-router": TANSTACK_ROUTER_VERSION,
+ "@tanstack/react-start": TANSTACK_START_VERSION,
+ "@vitejs/plugin-react": VITE_REACT_VERSION,
+ nitro: NITRO_VERSION,
+ react: REACT_VERSION,
+ "react-dom": REACT_VERSION,
+ vite: VITE_VERSION,
+ },
+ files: {
+ "agent/agent.mjs": `import { defineAgent } from "eve";
+
+export default defineAgent({ model: "openai/gpt-5.4" });
+`,
+ "agent/instructions.md": "You are a test agent.\n",
+ "pnpm-workspace.yaml": "minimumReleaseAge: 0\n",
+ "src/router.tsx": `import { createRouter } from "@tanstack/react-router";
+
+import { routeTree } from "./routeTree.gen";
+
+export function getRouter() {
+ return createRouter({ routeTree });
+}
+`,
+ "src/routes/__root.tsx": `import { createRootRoute, HeadContent, Outlet, Scripts } from "@tanstack/react-router";
+
+export const Route = createRootRoute({
+ component: () => (
+ <html lang="en">
+ <head>
+ <HeadContent />
+ </head>
+ <body>
+ <Outlet />
+ <Scripts />
+ </body>
+ </html>
+ ),
+});
+`,
+ "src/routes/index.tsx": `import { createFileRoute } from "@tanstack/react-router";
+
+export const Route = createFileRoute("/")({
+ component: () => <main>eve TanStack Start deployment</main>,
+});
+`,
+ "tsconfig.json": `{
+ "compilerOptions": {
+ "jsx": "react-jsx",
+ "module": "ESNext",
+ "moduleResolution": "Bundler",
+ "skipLibCheck": true,
+ "strict": true,
+ "target": "ES2024"
+ }
+}
+`,
+ "vite.config.ts": `import { tanstackStart } from "@tanstack/react-start/plugin/vite";
+import viteReact from "@vitejs/plugin-react";
+import { eveTanStack } from "eve/tanstack";
+import { nitro } from "nitro/vite";
+import { defineConfig } from "vite";
+
+export default defineConfig({
+ plugins: [
+ eveTanStack(),
+ tanstackStart(),
+ viteReact(),
+ nitro({ vercel: { config: { routes: [{ src: "/(.*)", dest: "/" }] } } }),
+ ],
+});
+`,
+ },
+ installDependencies: options.installDependencies,
+ name: "tanstack-eve-service",
+ };
+}
diff --git a/packages/eve/src/public/tanstack/index.test.ts b/packages/eve/src/public/tanstack/index.test.ts
new file mode 100644
index 000000000..66215ebea
--- /dev/null
+++ b/packages/eve/src/public/tanstack/index.test.ts
@@ -0,0 +1,224 @@
+import { ChildProcess } from "node:child_process";
+
+import { afterEach, describe, expect, it, vi } from "vitest";
+import type { ConfigEnv, Plugin, UserConfig } from "vite";
+
+import { EVE_ROUTE_PREFIX } from "#protocol/routes.js";
+import { resolveSharedEveDevServer } from "#shared/framework-eve-server.js";
+import {
+ ensureEveVercelServicesConfig,
+ mergeEveVercelConfig,
+ type VercelBuildConfig,
+} from "#shared/vercel-services.js";
+
+import { eveTanStack } from "./index.js";
+
+vi.mock("#shared/framework-eve-server.js", async (importOriginal) => ({
+ ...(await importOriginal<typeof import("#shared/framework-eve-server.js")>()),
+ resolveSharedEveDevServer: vi.fn(async () => ({ origin: "http://127.0.0.1:49152" })),
+}));
+
+vi.mock("#shared/vercel-services.js", () => ({
+ ensureEveVercelServicesConfig: vi.fn(async () => ({ mode: "root" })),
+ mergeEveVercelConfig: vi.fn(() => ({ routes: [], services: {}, version: 3 })),
+}));
+
+const resolveSharedEveDevServerMock = vi.mocked(resolveSharedEveDevServer);
+const ensureEveVercelServicesConfigMock = vi.mocked(ensureEveVercelServicesConfig);
+const mergeEveVercelConfigMock = vi.mocked(mergeEveVercelConfig);
+
+type ConfigHook = (config: UserConfig, env: ConfigEnv) => Promise<unknown>;
+type NitroOptions = { vercel?: { config?: VercelBuildConfig; [key: string]: unknown } };
+type EveTanStackPlugin = Plugin & {
+ nitro: { setup(nitro: { options: NitroOptions }): Promise<void> };
+};
+
+const serveEnv: ConfigEnv = { command: "serve", mode: "development" };
+const buildEnv: ConfigEnv = { command: "build", mode: "production" };
+
+function getConfigHook(plugin: Plugin): ConfigHook {
+ if (typeof plugin.config !== "function") {
+ throw new Error("expected plugin config hook");
+ }
+ return plugin.config as ConfigHook;
+}
+
+function callConfigResolved(plugin: Plugin): void {
+ (plugin.configResolved as () => void)();
+}
+
+function callCloseServer(plugin: Plugin, reason: "close" | "restart"): void {
+ (plugin.closeServer as (context: { reason: string }) => void)({ reason });
+}
+
+afterEach(() => {
+ vi.clearAllMocks();
+ vi.unstubAllEnvs();
+});
+
+describe("eveTanStack", () => {
+ it("proxies eve routes through Nitro to a shared eve dev server", async () => {
+ const result = await getConfigHook(eveTanStack())({}, serveEnv);
+
+ expect(resolveSharedEveDevServerMock).toHaveBeenCalledWith({
+ appRoot: process.cwd(),
+ host: { label: "TanStack Start", slug: "tanstack" },
+ });
+ expect(result).toEqual({
+ nitro: {
+ routeRules: {
+ [`${EVE_ROUTE_PREFIX}/**`]: { proxy: `http://127.0.0.1:49152${EVE_ROUTE_PREFIX}/**` },
+ },
+ },
+ });
+ });
+
+ it("prefers EVE_BASE_URL over spawning a shared server", async () => {
+ vi.stubEnv("EVE_BASE_URL", "https://agent.example.com/root");
+
+ const result = await getConfigHook(eveTanStack())({}, serveEnv);
+
+ expect(resolveSharedEveDevServerMock).not.toHaveBeenCalled();
+ expect(result).toEqual({
+ nitro: {
+ routeRules: {
+ [`${EVE_ROUTE_PREFIX}/**`]: {
+ proxy: `https://agent.example.com${EVE_ROUTE_PREFIX}/**`,
+ },
+ },
+ },
+ });
+ });
+
+ it("names EVE_BASE_URL when it is not an absolute URL", async () => {
+ vi.stubEnv("EVE_BASE_URL", "localhost:2000");
+
+ await expect(getConfigHook(eveTanStack())({}, serveEnv)).rejects.toThrow(
+ /EVE_BASE_URL must be an absolute http\(s\) URL/,
+ );
+ expect(resolveSharedEveDevServerMock).not.toHaveBeenCalled();
+ });
+
+ it("resolves eveRoot against the Vite root", async () => {
+ await getConfigHook(eveTanStack({ eveRoot: "agent" }))({ root: "/projects/web" }, serveEnv);
+
+ expect(resolveSharedEveDevServerMock).toHaveBeenCalledWith(
+ expect.objectContaining({ appRoot: "/projects/web/agent" }),
+ );
+ });
+
+ it("passes devServerTimeoutMs to the shared eve dev server", async () => {
+ await getConfigHook(eveTanStack({ devServerTimeoutMs: 5000 }))({}, serveEnv);
+
+ expect(resolveSharedEveDevServerMock).toHaveBeenCalledWith(
+ expect.objectContaining({ timeoutMs: 5000 }),
+ );
+ });
+
+ it("rejects a non-positive devServerTimeoutMs", () => {
+ expect(() => eveTanStack({ devServerTimeoutMs: 0 })).toThrow(
+ /TanStack Start development server timeout must be a positive number/,
+ );
+ });
+
+ it("stops a dev server it spawned when Vite closes, but not when Vite restarts", async () => {
+ const child = new ChildProcess();
+ const kill = vi.spyOn(child, "kill").mockReturnValue(true);
+ resolveSharedEveDevServerMock.mockResolvedValueOnce({
+ origin: "http://127.0.0.1:49152",
+ process: child,
+ });
+ const plugin = eveTanStack();
+ await getConfigHook(plugin)({ root: "/projects/spawned" }, serveEnv);
+
+ callCloseServer(plugin, "restart");
+ expect(kill).not.toHaveBeenCalled();
+
+ // Vite re-runs vite.config.ts on restart; the new plugin instance reuses
+ // the registered server and owns its shutdown.
+ const restarted = eveTanStack();
+ await getConfigHook(restarted)({ root: "/projects/spawned" }, serveEnv);
+ callCloseServer(restarted, "close");
+ expect(kill).toHaveBeenCalledOnce();
+ });
+
+ it("does not start eve for local production preview", async () => {
+ const plugin = eveTanStack();
+ const result = await getConfigHook(plugin)(
+ {},
+ { command: "serve", isPreview: true, mode: "production" },
+ );
+
+ expect(resolveSharedEveDevServerMock).not.toHaveBeenCalled();
+ expect(result).toEqual({});
+ expect(() => callConfigResolved(plugin)).not.toThrow();
+ });
+
+ it("adds no Nitro config for builds", async () => {
+ vi.stubEnv("VERCEL", "1");
+
+ const result = await getConfigHook(eveTanStack())({}, buildEnv);
+
+ expect(result).toEqual({});
+ });
+
+ it("leaves Nitro's Vercel config alone outside Vercel builds", async () => {
+ const plugin = eveTanStack() as EveTanStackPlugin;
+ await getConfigHook(plugin)({}, buildEnv);
+ const options: NitroOptions = {};
+
+ await plugin.nitro.setup({ options });
+
+ expect(ensureEveVercelServicesConfigMock).not.toHaveBeenCalled();
+ expect(options).toEqual({});
+ });
+
+ it("merges the generated eve service into the user's resolved Nitro Vercel config", async () => {
+ vi.stubEnv("VERCEL", "1");
+ const generated = { mode: "generated", services: {} } as const;
+ ensureEveVercelServicesConfigMock.mockResolvedValueOnce(generated);
+ const plugin = eveTanStack({
+ eveBuildCommand: "pnpm build:eve",
+ eveRoot: "agent",
+ }) as EveTanStackPlugin;
+ await getConfigHook(plugin)({ root: "/projects/web" }, buildEnv);
+ const userConfig: VercelBuildConfig = { routes: [{ src: "/(.*)", dest: "/" }] };
+ const options: NitroOptions = { vercel: { config: userConfig, functions: {} } };
+
+ await plugin.nitro.setup({ options });
+
+ expect(ensureEveVercelServicesConfigMock).toHaveBeenCalledWith({
+ appRoot: "/projects/web/agent",
+ eveBuildCommand: "pnpm build:eve",
+ frameworkName: "TanStack Start",
+ hostRoot: "/projects/web",
+ });
+ expect(mergeEveVercelConfigMock).toHaveBeenCalledWith(userConfig, generated);
+ expect(options.vercel).toEqual({
+ config: { routes: [], services: {}, version: 3 },
+ functions: {},
+ });
+ });
+
+ it("leaves routing to the user's services config when vercel.json declares services", async () => {
+ vi.stubEnv("VERCEL", "1");
+ const plugin = eveTanStack() as EveTanStackPlugin;
+ await getConfigHook(plugin)({}, buildEnv);
+ const options: NitroOptions = {};
+
+ await plugin.nitro.setup({ options });
+
+ expect(mergeEveVercelConfigMock).not.toHaveBeenCalled();
+ expect(options).toEqual({});
+ });
+
+ it("fails fast when the Nitro Vite plugin did not install its module", async () => {
+ const plugin = eveTanStack() as EveTanStackPlugin;
+ await getConfigHook(plugin)({}, buildEnv);
+
+ expect(() => callConfigResolved(plugin)).toThrow(/nitro\(\) from "nitro\/vite"/);
+
+ await plugin.nitro.setup({ options: {} });
+ expect(() => callConfigResolved(plugin)).not.toThrow();
+ });
+});
diff --git a/packages/eve/src/public/tanstack/index.ts b/packages/eve/src/public/tanstack/index.ts
new file mode 100644
index 000000000..264c84c11
--- /dev/null
+++ b/packages/eve/src/public/tanstack/index.ts
@@ -0,0 +1,210 @@
+import type { ChildProcess } from "node:child_process";
+import { isAbsolute, resolve } from "node:path";
+
+import type { Plugin, UserConfig } from "vite";
+
+import { EVE_ROUTE_PREFIX } from "#protocol/routes.js";
+import {
+ resolveDevServerTimeout,
+ resolveSharedEveDevServer,
+ type EveFrameworkHost,
+} from "#shared/framework-eve-server.js";
+import {
+ ensureEveVercelServicesConfig,
+ mergeEveVercelConfig,
+ type VercelBuildConfig,
+} from "#shared/vercel-services.js";
+
+const EVE_BASE_URL_ENV = "EVE_BASE_URL";
+const EVE_TANSTACK_HOST: EveFrameworkHost = { label: "TanStack Start", slug: "tanstack" };
+
+/**
+ * Dev servers this process spawned, keyed by eve app root. Module scope
+ * survives Vite config restarts, which re-run `vite.config.ts` and reuse the
+ * running server through the shared registry.
+ */
+const spawnedDevServers = new Map<string, ChildProcess>();
+
+/**
+ * Options for the eve TanStack Start Vite plugin.
+ */
+export interface EveTanStackPluginOptions {
+ /**
+ * Maximum time in milliseconds to wait for the eve development server to
+ * start, including waiting for another TanStack Start process to start it.
+ * Defaults to 180000 (three minutes).
+ */
+ readonly devServerTimeoutMs?: number;
+ /**
+ * Path to the eve application root, relative to the TanStack Start project
+ * root unless absolute. Defaults to the TanStack Start project root.
+ */
+ readonly eveRoot?: string;
+ /**
+ * Command that builds the eve app inside the generated Vercel eve service.
+ * Defaults to running the installed eve binary from the TanStack Start
+ * app's dependencies (`node <path-to>/eve/bin/eve.js build`).
+ */
+ readonly eveBuildCommand?: string;
+}
+
+/**
+ * The slice of Nitro's `nitro` Vite config key this plugin writes. It is typed
+ * locally so eve does not depend on Nitro's Vite type augmentation.
+ */
+type NitroUserConfig = UserConfig & {
+ readonly nitro?: {
+ readonly routeRules?: Record<string, { readonly proxy: string }>;
+ };
+};
+
+/**
+ * The slice of a Nitro module, and of the Nitro instance its `setup` receives,
+ * that this plugin uses. Nitro's Vite plugin installs the `nitro` property of
+ * any Vite plugin as a Nitro module.
+ */
+interface EveNitroModule {
+ readonly name: string;
+ setup(nitro: {
+ readonly options: { vercel?: { config?: VercelBuildConfig; [key: string]: unknown } };
+ }): Promise<void>;
+}
+
+function resolveApplicationRoot(hostRoot: string, appPath: string | undefined): string {
+ if (appPath === undefined || appPath.length === 0) {
+ return hostRoot;
+ }
+ return isAbsolute(appPath) ? appPath : resolve(hostRoot, appPath);
+}
+
+function parseEveBaseUrl(value: string): string {
+ const url = URL.parse(value);
+ if (url === null || (url.protocol !== "http:" && url.protocol !== "https:")) {
+ throw new Error(
+ `${EVE_BASE_URL_ENV} must be an absolute http(s) URL such as http://127.0.0.1:2000, received "${value}".`,
+ );
+ }
+ return url.origin;
+}
+
+async function resolveEveDevOrigin(
+ appRoot: string,
+ timeoutMs: number | undefined,
+): Promise<string> {
+ const configuredEveBaseUrl = process.env[EVE_BASE_URL_ENV]?.trim();
+ if (configuredEveBaseUrl && configuredEveBaseUrl.length > 0) {
+ return parseEveBaseUrl(configuredEveBaseUrl);
+ }
+
+ const handle = await resolveSharedEveDevServer({ appRoot, host: EVE_TANSTACK_HOST, timeoutMs });
+ if (handle.process !== undefined) {
+ spawnedDevServers.set(appRoot, handle.process);
+ }
+ return handle.origin;
+}
+
+function stopSpawnedDevServer(appRoot: string): void {
+ const child = spawnedDevServers.get(appRoot);
+ spawnedDevServers.delete(appRoot);
+ if (child !== undefined && !child.killed) {
+ child.kill();
+ }
+}
+
+/**
+ * Vite plugin for running an eve agent alongside a TanStack Start app.
+ *
+ * TanStack Start reaches Vercel through Nitro, so the app must register
+ * `nitro()` from `nitro/vite`; `eveTanStack` configures Nitro to route eve.
+ *
+ * In development, Nitro proxies eve protocol endpoints to a local eve server.
+ * It resolves the server in order: the `EVE_BASE_URL` env var if set, then a
+ * healthy shared eve dev server already running for the app, then a freshly
+ * spawned `eve dev --no-ui --port 0`. A server spawned by the plugin stops
+ * when the Vite dev server closes.
+ *
+ * On Vercel builds, `eveTanStack` adds the eve runtime as a sibling Vercel
+ * service and routes its transport requests before TanStack Start's own
+ * routing, including routes declared in `nitro({ vercel: { config } })`.
+ */
+export function eveTanStack(options: EveTanStackPluginOptions = {}): Plugin {
+ const devServerTimeoutMs = resolveDevServerTimeout(options.devServerTimeoutMs, EVE_TANSTACK_HOST);
+ let hostRoot = process.cwd();
+ let appRoot = resolveApplicationRoot(hostRoot, options.eveRoot);
+ let isPreview = false;
+ let isVercelBuild = false;
+ let nitroModuleInstalled = false;
+
+ const plugin: Plugin & { readonly nitro: EveNitroModule } = {
+ name: "eve:tanstack",
+ enforce: "pre",
+ nitro: {
+ name: "eve",
+ // Merging here rather than through the `nitro` Vite config key lets eve
+ // see the user's own `nitro({ vercel })` config: that key has the
+ // lowest priority, so user routes would otherwise land ahead of eve's.
+ async setup(nitro) {
+ nitroModuleInstalled = true;
+ if (!isVercelBuild) {
+ return;
+ }
+
+ const configured = await ensureEveVercelServicesConfig({
+ appRoot,
+ eveBuildCommand: options.eveBuildCommand,
+ frameworkName: "TanStack Start",
+ hostRoot,
+ });
+ if (configured.mode !== "generated") {
+ return;
+ }
+
+ nitro.options.vercel = {
+ ...nitro.options.vercel,
+ config: mergeEveVercelConfig(nitro.options.vercel?.config, configured),
+ };
+ },
+ },
+ async config(config, env): Promise<NitroUserConfig> {
+ isPreview = env.isPreview === true;
+ if (isPreview) {
+ return {};
+ }
+
+ hostRoot = resolve(process.cwd(), config.root ?? ".");
+ appRoot = resolveApplicationRoot(hostRoot, options.eveRoot);
+ isVercelBuild = env.command === "build" && Boolean(process.env.VERCEL);
+
+ if (env.command !== "serve") {
+ return {};
+ }
+
+ const origin = await resolveEveDevOrigin(appRoot, devServerTimeoutMs);
+ // Vite's own `server.proxy` never runs: Nitro answers dev requests
+ // before Vite's proxy middleware. The rule stays on the config key
+ // because Nitro has normalized route rules by the time modules run.
+ return {
+ nitro: {
+ routeRules: {
+ [`${EVE_ROUTE_PREFIX}/**`]: { proxy: `${origin}${EVE_ROUTE_PREFIX}/**` },
+ },
+ },
+ };
+ },
+ configResolved() {
+ // Nitro installs the `nitro` module above while resolving config.
+ // Without Nitro the eve routes would silently 404.
+ if (!isPreview && !nitroModuleInstalled) {
+ throw new Error(
+ 'eveTanStack() needs the Nitro Vite plugin. Install "nitro" and add nitro() from "nitro/vite" to the plugins in vite.config.ts.',
+ );
+ }
+ },
+ closeServer({ reason }) {
+ if (reason === "close") {
+ stopSpawnedDevServer(appRoot);
+ }
+ },
+ };
+ return plugin;
+}
diff --git a/packages/eve/src/setup/scaffold/index.integration.test.ts b/packages/eve/src/setup/scaffold/index.integration.test.ts
index 2fc1df8a4..cec965e59 100644
--- a/packages/eve/src/setup/scaffold/index.integration.test.ts
+++ b/packages/eve/src/setup/scaffold/index.integration.test.ts
@@ -915,6 +915,8 @@ describe("hasVercelHostFramework", () => {
["Nuxt edge", { "nuxt-edge": "3.0.0-rc.13" }],
["Nuxt nightly", { "nuxt-nightly": "3.0.0-27575307.749db41" }],
["SvelteKit", { "@sveltejs/kit": "2.60.0" }],
+ ["TanStack Start (React)", { "@tanstack/react-start": "1.168.60" }],
+ ["TanStack Start (Solid)", { "@tanstack/solid-start": "1.168.60" }],
])("recognizes %s as the root Vercel framework", async (_label, dependencies) => {
const projectRoot = await createTempDir();
await writeFile(
@@ -997,6 +999,8 @@ describe("resolveVercelHostFrameworkPreset", () => {
["Nuxt 3", { nuxt3: "3.19.7" }, "nuxtjs"],
["Nuxt edge", { "nuxt-edge": "3.0.0-rc.13" }, "nuxtjs"],
["SvelteKit", { "@sveltejs/kit": "2.60.0" }, "sveltekit"],
+ ["TanStack Start (React)", { "@tanstack/react-start": "1.168.60" }, "tanstack-start"],
+ ["TanStack Start (Solid)", { "@tanstack/solid-start": "1.168.60" }, "tanstack-start"],
])("maps %s to its Vercel Framework Preset slug", async (_label, dependencies, preset) => {
const projectRoot = await createTempDir();
await writeFile(
diff --git a/packages/eve/src/setup/scaffold/update/channels.ts b/packages/eve/src/setup/scaffold/update/channels.ts
index 11b2a04e3..2948745cc 100644
--- a/packages/eve/src/setup/scaffold/update/channels.ts
+++ b/packages/eve/src/setup/scaffold/update/channels.ts
@@ -168,6 +168,8 @@ async function hasPackageDependency(
*/
const VERCEL_HOST_FRAMEWORK_PRESETS: Readonly<Record<string, string>> = {
"@sveltejs/kit": "sveltekit",
+ "@tanstack/react-start": "tanstack-start",
+ "@tanstack/solid-start": "tanstack-start",
[NEXT_PACKAGE_NAME]: "nextjs",
nuxt: "nuxtjs",
nuxt3: "nuxtjs",
diff --git a/packages/eve/src/setup/vercel-project-framework.ts b/packages/eve/src/setup/vercel-project-framework.ts
index 82a1ce442..b3c3df1f4 100644
--- a/packages/eve/src/setup/vercel-project-framework.ts
+++ b/packages/eve/src/setup/vercel-project-framework.ts
@@ -32,6 +32,7 @@ const EVE_FRAMEWORK_INTEGRATIONS: Readonly<Record<string, EveFrameworkIntegratio
nuxt: { label: "Nuxt", importSpecifier: "eve/nuxt" },
nuxtjs: { label: "Nuxt", importSpecifier: "eve/nuxt" },
sveltekit: { label: "SvelteKit", importSpecifier: "eve/sveltekit" },
+ "tanstack-start": { label: "TanStack Start", importSpecifier: "eve/tanstack" },
};
const FRAMEWORK_INTEGRATION_SOURCE_EXTENSIONS = new Set([
@@ -55,6 +56,7 @@ const FRAMEWORK_INTEGRATION_IGNORED_DIRECTORIES = new Set([
".nuxt",
".output",
".svelte-kit",
+ ".tanstack",
".turbo",
".vercel",
"build",
diff --git a/packages/eve/src/setup/vercel-project.test.ts b/packages/eve/src/setup/vercel-project.test.ts
index 5970c1d64..a592a41f4 100644
--- a/packages/eve/src/setup/vercel-project.test.ts
+++ b/packages/eve/src/setup/vercel-project.test.ts
@@ -802,6 +802,7 @@ describe("linkProject", () => {
it.each([
{ framework: "nuxtjs", importSpecifier: "eve/nuxt" },
{ framework: "sveltekit", importSpecifier: "eve/sveltekit" },
+ { framework: "tanstack-start", importSpecifier: "eve/tanstack" },
])("keeps a detected $framework project when $importSpecifier is present", async (testCase) => {
mockedCaptureVercel
.mockResolvedValueOnce(
diff --git a/packages/eve/test/framework-fixtures/framework-fixtures.test.ts b/packages/eve/test/framework-fixtures/framework-fixtures.test.ts
index 709799790..192caea89 100644
--- a/packages/eve/test/framework-fixtures/framework-fixtures.test.ts
+++ b/packages/eve/test/framework-fixtures/framework-fixtures.test.ts
@@ -10,7 +10,7 @@ const REPO_ROOT = fileURLToPath(new URL("../../../..", import.meta.url));
// the example apps under `apps/frameworks` still build against the workspace
// eve dist. A non-zero exit from the fixture's own build is the failure signal.
describe("framework fixtures", () => {
- it.each(["framework-next", "framework-nuxt", "framework-sveltekit"])(
+ it.each(["framework-next", "framework-nuxt", "framework-sveltekit", "framework-tanstack"])(
"builds the %s fixture against the workspace eve dist",
async (fixture) => {
await runPnpmCommand({
diff --git a/packages/eve/test/scenarios/framework-tanstack-build.scenario.test.ts b/packages/eve/test/scenarios/framework-tanstack-build.scenario.test.ts
new file mode 100644
index 000000000..2fb795531
--- /dev/null
+++ b/packages/eve/test/scenarios/framework-tanstack-build.scenario.test.ts
@@ -0,0 +1,121 @@
+import { readdir, readFile } from "node:fs/promises";
+import { join } from "node:path";
+
+import { describe, expect, it } from "vitest";
+
+import { createTanStackEveServiceDescriptor } from "../../src/internal/testing/scenario-apps/tanstack-eve-service.js";
+import { useScenarioApp } from "../../src/internal/testing/scenario-app.js";
+import { runPnpmCommand } from "../../src/internal/testing/run-pnpm-command.js";
+
+const scenarioApp = useScenarioApp();
+
+const TANSTACK_EVE_SERVICE_DESCRIPTOR = createTanStackEveServiceDescriptor({
+ installDependencies: true,
+});
+
+async function readVercelOutputConfig(outputRoot: string): Promise<{
+ readonly routes: readonly unknown[];
+ readonly services: Record<string, unknown>;
+}> {
+ const config: unknown = JSON.parse(await readFile(join(outputRoot, "config.json"), "utf8"));
+
+ if (
+ typeof config !== "object" ||
+ config === null ||
+ !("routes" in config) ||
+ !Array.isArray(config.routes)
+ ) {
+ throw new Error("Expected Vercel Build Output config.json to contain a routes array.");
+ }
+
+ const services =
+ "services" in config && typeof config.services === "object" && config.services !== null
+ ? (config.services as Record<string, unknown>)
+ : {};
+
+ return { routes: config.routes, services };
+}
+
+describe("framework-tanstack build", () => {
+ it("emits the eve service and route into the Vercel Build Output", async () => {
+ const app = await scenarioApp(TANSTACK_EVE_SERVICE_DESCRIPTOR);
+
+ // `VERCEL` triggers the eve plugin's service generation. `NITRO_PRESET`
+ // pins Nitro's Vercel preset so the assertion does not depend on provider
+ // detection, which prefers the CI provider over `VERCEL`.
+ await runPnpmCommand({
+ args: ["exec", "vite", "build"],
+ cwd: app.appRoot,
+ env: {
+ ...process.env,
+ NITRO_PRESET: "vercel",
+ VERCEL: "1",
+ VERCEL_ENV: "production",
+ },
+ });
+
+ const { routes, services } = await readVercelOutputConfig(
+ join(app.appRoot, ".vercel", "output"),
+ );
+ const eveRouteIndex = routes.findIndex(
+ (route) =>
+ typeof route === "object" &&
+ route !== null &&
+ "src" in route &&
+ route.src === "^/eve/v1/(.*)$" &&
+ "destination" in route,
+ );
+ const userCatchAllIndex = routes.findIndex(
+ (route) =>
+ typeof route === "object" && route !== null && "src" in route && route.src === "/(.*)",
+ );
+ const filesystemIndex = routes.findIndex(
+ (route) =>
+ typeof route === "object" &&
+ route !== null &&
+ "handle" in route &&
+ route.handle === "filesystem",
+ );
+
+ expect(routes[eveRouteIndex]).toEqual(
+ expect.objectContaining({
+ destination: { service: "eve", type: "service" },
+ src: "^/eve/v1/(.*)$",
+ }),
+ );
+ expect(userCatchAllIndex).not.toBe(-1);
+ expect(eveRouteIndex).toBeLessThan(userCatchAllIndex);
+ expect(filesystemIndex).not.toBe(-1);
+ expect(eveRouteIndex).toBeLessThan(filesystemIndex);
+ expect(services.eve).toEqual(
+ expect.objectContaining({
+ framework: "eve",
+ root: ".eve/vercel-services/eve",
+ }),
+ );
+ }, 300_000);
+
+ it("builds the eve app from the TanStack Start project root", async () => {
+ const app = await scenarioApp(TANSTACK_EVE_SERVICE_DESCRIPTOR);
+
+ // The generated Vercel service runs `eve build` in the host root. Nitro
+ // must not mistake that root for a Vite app because of its vite.config.
+ await runPnpmCommand({
+ args: ["exec", "eve", "build", "--skip-sandbox-prewarm"],
+ cwd: app.appRoot,
+ });
+
+ const serverRoot = join(app.appRoot, ".output", "server");
+ await expect(readFile(join(serverRoot, "index.mjs"), "utf8")).resolves.toEqual(
+ expect.any(String),
+ );
+
+ // Building through the host's Vite config would bundle TanStack Start's
+ // SSR output into eve's server.
+ const serverEntries = await readdir(serverRoot);
+ expect(serverEntries).not.toContain("_ssr");
+ expect(serverEntries.filter((entry) => entry.startsWith("_tanstack-start-manifest"))).toEqual(
+ [],
+ );
+ }, 300_000);
+});
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 1709a5574..e42af4866 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -322,7 +322,7 @@ importers:
version: 2.0.1(e9f01ee4848ee8142aacdb51dfc5a6a4)
'@vercel/geistdocs':
specifier: 2.9.3
- version: 2.9.3(79560e942e5066c3fa0e250d382bc1cd)
+ version: 2.9.3(c35d753953df3361bf3d3347cd462dd6)
'@vercel/speed-insights':
specifier: 2.0.0
version: 2.0.0(e9f01ee4848ee8142aacdb51dfc5a6a4)
@@ -343,13 +343,13 @@ importers:
version: 5.2.1
fumadocs-core:
specifier: 16.2.2
fumadocs-mdx:
specifier: 14.0.4
fumadocs-ui:
specifier: 16.2.2
lil-gui:
specifier: 0.21.0
version: 0.21.0
@@ -747,6 +747,46 @@ importers:
specifier: 'catalog:'
version: 24.13.3
+ apps/frameworks/tanstack:
+ dependencies:
+ '@tanstack/react-router':
+ specifier: ^1.170.41
+ '@tanstack/react-start':
+ specifier: ^1.168.60
+ eve:
+ specifier: workspace:*
+ version: link:../../../packages/eve
+ nitro:
+ specifier: 3.0.260903-beta
+ version: 3.0.260903-beta
+ react:
+ specifier: 'catalog:'
+ version: 19.2.6
+ react-dom:
+ specifier: 'catalog:'
+ version: 19.2.6([email protected])
+ zod:
+ specifier: 'catalog:'
+ version: 4.5.4
+ devDependencies:
+ '@types/node':
+ specifier: 'catalog:'
+ version: 24.13.3
+ '@types/react':
+ specifier: 'catalog:'
+ version: 19.2.15
+ '@types/react-dom':
+ specifier: 'catalog:'
+ version: 19.2.3(@types/[email protected])
+ '@vitejs/plugin-react':
+ specifier: ^6.1.1
+ vite:
+ specifier: ^8.3.1
+
apps/package-artifacts:
dependencies:
'@vercel/blob':
@@ -4128,6 +4168,22 @@ packages:
peerDependencies:
eve: '>=0.25'
+ '@oozcitak/[email protected]':
+ resolution: {integrity: sha512-GjpKhkSYC3Mj4+lfwEyI1dqnsKTgwGy48ytZEhm4A/xnH/8z9M3ZVXKr/YGQi3uCLs1AEBS+x5T2JPiueEDW8w==}
+ engines: {node: '>=20.0'}
+
+ '@oozcitak/[email protected]':
+ resolution: {integrity: sha512-2g+E7hoE2dgCz/APPOEK5s3rMhJvNxSMBrP+U+j1OWsIbtSpWxxlUjq1lU8RIsFJNYv7NMlnVsCuHcUzJW+8vA==}
+ engines: {node: '>=20.0'}
+
+ '@oozcitak/[email protected]':
+ resolution: {integrity: sha512-ZKfET8Ak1wsLAiLWNfFkZc/BraDccuTJKR6svTYc7sVjbR+Iu0vtXdiDMY4o6jaFl5TW2TlS7jbLl4VovtAJWQ==}
+ engines: {node: '>=20.0'}
+
+ '@oozcitak/[email protected]':
+ resolution: {integrity: sha512-hAX0pT/73190NLqBPPWSdBVGtbY6VOhWYK3qqHqtXQ1gK7kS2yz4+ivsN07hpJ6I3aeMtKP6J6npsEKOAzuTLA==}
+ engines: {node: '>=20.0'}
+
'@opentelemetry/[email protected]':
resolution: {integrity: sha512-40lSJeqYO8Uz2Yj7u94/SJWE/wONa7rmMKjI1ZcIjgf3MHNHv1OZUCrCETGuaRF62d5pQD1wKIW+L4lmSMTzZA==}
engines: {node: '>=8.0.0'}
@@ -6809,6 +6865,139 @@ packages:
peerDependencies:
vite: ^5.2.0 || ^6 || ^7 || ^8
+ '@tanstack/[email protected]':
+ resolution: {integrity: sha512-utTS5L2OkeYUzXGohL1Z8sefu1GLNOJcxe8Hd6iIdc/Xo1K1nDB2JEp4iSFhvYh33xKC9V91TxrS8qfrpoKobQ==}
+ engines: {node: '>=20.19'}
+
+ '@tanstack/[email protected]':
+ resolution: {integrity: sha512-Mpvw8Wm5MGDbTqI8Yc9flLKxbOHwoWocv0H2aGKcgw2a017oK5nZWqa954P+DrUx/8fI98YNywnHP5XcD3tQ9w==}
+ engines: {node: '>=20.19'}
+ peerDependencies:
+ react: '>=18.0.0 || >=19.0.0'
+ react-dom: '>=18.0.0 || >=19.0.0'
+
+ '@tanstack/[email protected]':
+ resolution: {integrity: sha512-Uby0uo37JlQgUKHU0snDwH9nYiEeAjm9+7pUOFgycU/UszEILC2SO2DSCoNnCMuHKj9z+4URKzBYIP2exT9+wg==}
+ engines: {node: '>=22.12.0'}
+ peerDependencies:
+ react: '>=18.0.0 || >=19.0.0'
+ react-dom: '>=18.0.0 || >=19.0.0'
+
+ '@tanstack/[email protected]':
+ resolution: {integrity: sha512-M2Lqxkk5C1zQncQs5paqX+/OLdOht51pg6D84YfLMrNsjhU/nzb6wd92MIja0mi5i23+L+fxLLjQYR2DObjBlw==}
+ engines: {node: '>=22.12.0'}
+ peerDependencies:
+ '@rspack/core': '>=2.0.0-0'
+ '@vitejs/plugin-rsc': '>=0.5.30'
+ react: '>=18.0.0 || >=19.0.0'
+ react-dom: '>=18.0.0 || >=19.0.0'
+ react-server-dom-rspack: '>=0.0.2'
+ peerDependenciesMeta:
+ '@rspack/core':
+ optional: true
+ '@vitejs/plugin-rsc':
+ optional: true
+ react-server-dom-rspack:
+ optional: true
+
+ '@tanstack/[email protected]':
+ resolution: {integrity: sha512-K7z8xBOEdp8u5CZCxWrbS0tFtk5XZGMdhssLeZlRZKlLDbX7BKLdMtJ7th5sR6QVt9MTUAg3LcoqvJMPSFF+lg==}
+ engines: {node: '>=22.12.0'}
+ peerDependencies:
+ react: '>=18.0.0 || >=19.0.0'
+ react-dom: '>=18.0.0 || >=19.0.0'
+
+ '@tanstack/[email protected]':
+ resolution: {integrity: sha512-WMOM0Xlh2lPbVlbjYM6uOxOpiaWRPvODm/dwkLsGKq5tjyHOHZmKckJgwlrZl7OQUqFlOZHYj8bKUTgoeg8cUQ==}
+ engines: {node: '>=22.12.0'}
+ peerDependencies:
+ '@rsbuild/core': ^2.0.0
+ '@vitejs/plugin-rsc': '*'
+ react: '>=18.0.0 || >=19.0.0'
+ react-dom: '>=18.0.0 || >=19.0.0'
+ vite: '>=7.0.0'
+ peerDependenciesMeta:
+ '@rsbuild/core':
+ optional: true
+ '@vitejs/plugin-rsc':
+ optional: true
+ vite:
+ optional: true
+
+ '@tanstack/[email protected]':
+ resolution: {integrity: sha512-oj5O5DmiMWE+ih+SioX2ayC1kbK7d3fpLx0B75fPJr9nY3zU+hoW010yr64qXsY/9fyiLVE2bn5mGNV3owm8RQ==}
+ peerDependencies:
+ react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0
+ react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0
+
+ '@tanstack/[email protected]':
+ resolution: {integrity: sha512-X+19pGuuLVPvvAvPYw9v/+ktRk5cCll8AtfpBpOhDRmVgUMrfqze0467xtq8YRVVs/mmo5rVtWn/7Tp32RDBKw==}
+ engines: {node: '>=20.19'}
+
+ '@tanstack/[email protected]':
+ resolution: {integrity: sha512-WkEueqEvsBBudzO0fx1nWfOmRNW8OAvBoVABTGls9bAWzjdC+KDGHvjCNrvn88ofs1F6gqL8aWnzKCbxW3dCyQ==}
+ engines: {node: '>=20.19'}
+
+ '@tanstack/[email protected]':
+ resolution: {integrity: sha512-vAR5WXJh/ErseEWQftDhsJcr2c++ucRQ6FbqN3ygMO44+ZxxRfW3sIpZmddHROVSmBk8jc6MrwjTPNjVhd62Vw==}
+ engines: {node: '>=20.19'}
+ peerDependencies:
+ '@rsbuild/core': '>=1.0.2 || ^2.0.0'
+ '@tanstack/react-router': ^1.170.41
+ vite: '>=5.0.0 || >=6.0.0 || >=7.0.0 || >=8.0.0'
+ vite-plugin-solid: ^2.11.10 || ^3.0.0-0
+ webpack: '>=5.92.0'
+ peerDependenciesMeta:
+ '@rsbuild/core':
+ optional: true
+ '@tanstack/react-router':
+ optional: true
+ vite:
+ optional: true
+ vite-plugin-solid:
+ optional: true
+ webpack:
+ optional: true
+
+ '@tanstack/[email protected]':
+ resolution: {integrity: sha512-Icb0xGuG1+54IV0WMLRcc3ErTx2HeJWyPG661FkQ8UT6guoBq1FJjFRqlG/JS0xi4mFFkBhvwO7tbLa32f3yxA==}
+ engines: {node: '>=20.19'}
+
+ '@tanstack/[email protected]':
+ resolution: {integrity: sha512-LfwZSbau2MLLZ/uPAoO+NC9fK3J66c0wLhnNQqIa+Goqw7bXPjkHwlsjY7evlUz1AnyhhQ1Qab95v+VmP0TZ9A==}
+ engines: {node: '>=22.12.0'}
+
+ '@tanstack/[email protected]':
+ resolution: {integrity: sha512-QWfUZ3Yo923tdQn38LyKMU8rcTw69zc+T4dAvgTWV4O56SqFRsGfS0lSWIMhJRwXIx/bvdi7nTUBDdZtTHtpTQ==}
+ engines: {node: '>=22.12.0'}
+
+ '@tanstack/[email protected]':
+ resolution: {integrity: sha512-HPOb7LnMc71k38cd5uvMybPPUU/Q/56KvSqQzSWz7cps1ZDFXaxUM6EFaFHLCdgTWqGexNGDdRE+sUVPVBM4Xg==}
+ engines: {node: '>=22.12.0'}
+ peerDependencies:
+ '@rsbuild/core': ^2.0.0
+ vite: '>=7.0.0'
+ peerDependenciesMeta:
+ '@rsbuild/core':
+ optional: true
+ vite:
+ optional: true
+
+ '@tanstack/[email protected]':
+ resolution: {integrity: sha512-pqqkxhXY46nuFSYt6TsMGyABiplUzHFHndKAlRRGC0fWDrJCH1koWxVMoxySa51ZETV79f/z73b5UZ1jfIkXwQ==}
+ engines: {node: '>=22.12.0'}
+
+ '@tanstack/[email protected]':
+ resolution: {integrity: sha512-x+xCXK2GtFzY6NbXqAg8YpU6cwAjDfMeYSNzxfGzntpjbwBRHHrXeC/kYUnBBQCV7wK4kJ8vBBQGP0OyYTasUg==}
+ engines: {node: '>=22.12.0'}
+
+ '@tanstack/[email protected]':
+ resolution: {integrity: sha512-sJ4mjol8uQsHV0gOJzzjwXfh2Fwm+Sz0+8deqiTm4jGbMdjzNSW+xZCFm0kUa870uhd8yi+DpKnZb5Kc4apa0Q==}
+
+ '@tanstack/[email protected]':
+ resolution: {integrity: sha512-uhOeFyxLcU41HzvrxsGpiWdcMbScY1EDgbZ5K7DVRMYInbLYWAC0EA/kx9wXAoSM8q82bUG2hRl8+EAjE6XAbA==}
+ engines: {node: '>=20.19'}
+
'@tokenizer/[email protected]':
resolution: {integrity: sha512-2mAv+8pkG6GIZiF1kNg1jAjh27IDxEPKwdGul3snfztFerfPGI1LjDezZp3i7BElXompqEtPmoPx6c2wgtWsOA==}
engines: {node: '>=18'}
@@ -7782,6 +7971,22 @@ packages:
resolution: {integrity: sha512-9JjvjeqUndb9otCCFd0/+2ESsLk7VkDE6sxOBy9iy2ukezuQbplVRi+g9g59yAurKofbmTi/KcKxBGO/22zWRw==}
+ '@vitejs/[email protected]':
+ resolution: {integrity: sha512-fhJNGUdscQa4HkI0xFxwonWyhnVReCPDbXI7FH7jmzpnVCrFQI7PRrhWecO263610vOrs9tr2Y4xcf8uAdFxbw==}
+ engines: {node: ^20.19.0 || >=22.12.0}
+ peerDependencies:
+ '@rolldown/plugin-babel': ^0.1.7 || ^0.2.0
+ babel-plugin-react-compiler: ^1.0.0
+ oxc-transform-react: ^0.152.0
+ vite: ^8.0.0
+ peerDependenciesMeta:
+ '@rolldown/plugin-babel':
+ optional: true
+ babel-plugin-react-compiler:
+ optional: true
+ oxc-transform-react:
+ optional: true
+
'@vitejs/[email protected]':
resolution: {integrity: sha512-YXvi4as2clxt6DFw5+a0tTA97ntiQXm/raR8ofNj3aNwwdlVGTiG2gp7EvfZW17P50acL/9bP0ccF4XnqNmlgA==}
engines: {node: ^20.19.0 || >=22.12.0}
@@ -8252,6 +8457,9 @@ packages:
react-native-b4a:
optional: true
+ resolution: {integrity: sha512-GERT7L2TiYcYDtYk1IpD+ASAYXjKbLTDPhBtYj7X1NuRMDTMtAx9kyBenub1Ev41lo91OHCKdmP+egTDmfQ7Ig==}
+
resolution: {integrity: sha512-ycduwJbvdvIMmVvlAZqGggS+pm5Eu4Bk9pcV9Sm2Z4PJNRVsKkv0g7vHj+LeuC1gHTeF67sJXFOq61IlqCa2hA==}
@@ -9973,6 +10181,9 @@ packages:
resolution: {integrity: sha512-n61pQIxP25C6DRhcJxn7BDzgHP/+S56Urowb5WFxtcRMpU6drqXD90xjyAsVQYsNSNNVbaCcYY1DuHsdkZLuiA==}
+ resolution: {integrity: sha512-YoZjBdafyLIop9lSxXVI33oLD5kN31q4Td+CasofLLYeLXRFeOsuOw0Uo+XNRi9PZlbfdlN2GmRtm4tCEQ9/KA==}
+
resolution: {integrity: sha512-tbZNuJrLwGUp3zshBtdy4W+ORxZuIh8a5ilyIEQDC5rY1f3U20JMry0Ll3WBzU58EZKsEuJFXhb5gwv8CsPvgA==}
@@ -10390,6 +10601,16 @@ packages:
resolution: {integrity: sha512-L3THSe2MPeBwgIZVSH5zLdBBU90TOxarvhK9d04IDY2AmVS8j2Jz2LIWtwsGOU3lu2I5jCN7FNvVfY2+XyF+mg==}
+ resolution: {integrity: sha512-28ljodXuUp0fZovdiSRq4G9OgrxCztrJe5VdYzXAB7ueRvI7pIUqLU14Xi3XqdYJ/khXjfpUOOD2EQa6CmBgsg==}
+ engines: {node: '>=20.11.1'}
+ hasBin: true
+ peerDependencies:
+ crossws: ^0.4.1
+ peerDependenciesMeta:
+ crossws:
+ optional: true
+
resolution: {integrity: sha512-Epg1E85L8yIKd9UeAQAVdm6QVrnHbppMsQ641EjpNi4c0IlAg+PJlwp4Xw03Z1loRXPQaH9k64gJT5qDELqm+g==}
engines: {node: '>=20.11.1'}
@@ -10940,6 +11161,10 @@ packages:
resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==}
+ resolution: {integrity: sha512-iQcBXcd+Rv/pkubRyGh2utW2j1oPG5hZY6TUhVPpqK4G+o3IbxpJNx04hgksjc/N7GK5pEorUxDeg31cFgEk/w==}
+ engines: {node: '>=18'}
+
resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==}
@@ -13382,6 +13607,9 @@ packages:
engines: {node: '>=18.0.0', npm: '>=8.0.0'}
hasBin: true
+ resolution: {integrity: sha512-ePa+XGk00/3HuCqrEnK3LxJW7I0SdNg6EFzKUJG73hMAdDcOUC/i/aSz7LSDwLrGr33kal/rqOGydzwl6U7zBA==}
+
resolution: {integrity: sha512-3SOzvaAg8rkHrXtRjpCvCvbyO5to9oOO27Z/XqHEYXfMRVSw/qMIVdmaOk9W2lcRLtR6dlqTjo9hDeJk70QBYQ==}
@@ -13513,6 +13741,12 @@ packages:
resolution: {integrity: sha512-k3CMsaIvvdSwm8oLB4MXSl0wH2/cwlH7xGcnRd2DaeRmBkbzYmyT8j0tsX60DwD1eRwHTpNpH8ljKu9oUT1MeQ==}
engines: {node: '>=20.0.0'}
+ resolution: {integrity: sha512-N7mWAMydj89EnYTHtRpS3LBrAz3J9O6oVrqpuXuvlAHfAUG8WEKqtbAd7SBiJNY5NfCAFhSdyAh7wI4Shjqy4g==}
+ engines: {node: '>=10'}
+ peerDependencies:
+ seroval: ^1.0
+
resolution: {integrity: sha512-AeDcLh0yO2SFm9W71essgnSzLV9DI8ZH0x0knXn2DMnUZj728mpLbxjlbB6IqKCmqh8JA3cEqRyGoNkt584JcQ==}
engines: {node: '>=10'}
@@ -14963,6 +15197,10 @@ packages:
resolution: {integrity: sha512-ghig2TBE/H11aOVgmahA3MhimvkBr6JIYknH/Dhdk10nXwdbIqBJsbfMxpvFPG8bAw77gN29aQWvKpmVoPlvPQ==}
engines: {node: '>=16.0.0'}
+ resolution: {integrity: sha512-bx8Q1STctnNaaDymWnkfQLKofs0mGNN7rLLapJlGuV3VlvegD7Ls4ggMjE3aUSWItCCzU0PEv45lI87iSigiCA==}
+ engines: {node: '>=20.0'}
+
resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==}
engines: {node: '>=0.4'}
@@ -17979,6 +18217,23 @@ snapshots:
- ai
- better-auth
+ '@oozcitak/[email protected]':
+ dependencies:
+ '@oozcitak/infra': 2.0.2
+ '@oozcitak/url': 3.0.0
+ '@oozcitak/util': 10.0.0
+
+ '@oozcitak/[email protected]':
+ dependencies:
+ '@oozcitak/util': 10.0.0
+
+ '@oozcitak/[email protected]':
+ dependencies:
+ '@oozcitak/infra': 2.0.2
+ '@oozcitak/util': 10.0.0
+
+ '@oozcitak/[email protected]': {}
+
'@opentelemetry/[email protected]':
dependencies:
'@opentelemetry/api': 1.9.1
@@ -20501,6 +20756,222 @@ snapshots:
tailwindcss: 4.3.3
+ '@tanstack/[email protected]': {}
+
+ dependencies:
+ '@tanstack/history': 1.162.4
+ '@tanstack/react-store': 0.11.2([email protected]([email protected]))([email protected])
+ '@tanstack/router-core': 1.171.34
+ isbot: 5.2.2
+ react: 19.2.6
+ react-dom: 19.2.6([email protected])
+
+ dependencies:
+ '@tanstack/react-router': 1.170.41([email protected]([email protected]))([email protected])
+ '@tanstack/router-core': 1.171.34
+ '@tanstack/start-client-core': 1.170.34
+ react: 19.2.6
+ react-dom: 19.2.6([email protected])
+
+ dependencies:
+ '@tanstack/react-router': 1.170.41([email protected]([email protected]))([email protected])
+ '@tanstack/router-core': 1.171.34
+ '@tanstack/router-utils': 1.162.3([email protected])
+ '@tanstack/start-client-core': 1.170.34
+ '@tanstack/start-fn-stubs': 1.162.0
+ '@tanstack/start-storage-context': 1.167.36
+ pathe: 2.0.3
+ react: 19.2.6
+ react-dom: 19.2.6([email protected])
+ transitivePeerDependencies:
+ - '@farmfe/core'
+ - '@rsbuild/core'
+ - bun-types-no-globals
+ - crossws
+ - esbuild
+ - rolldown
+ - rollup
+ - supports-color
+ - unloader
+ - vite
+ - vite-plugin-solid
+ - webpack
+
+ dependencies:
+ '@tanstack/react-router': 1.170.41([email protected]([email protected]))([email protected])
+ '@tanstack/router-core': 1.171.34
+ '@tanstack/start-server-core': 1.169.39([email protected]([email protected]))
+ react: 19.2.6
+ react-dom: 19.2.6([email protected])
+ transitivePeerDependencies:
+ - crossws
+
+ dependencies:
+ '@tanstack/react-router': 1.170.41([email protected]([email protected]))([email protected])
+ '@tanstack/react-start-client': 1.168.39([email protected]([email protected]))([email protected])
+ '@tanstack/router-utils': 1.162.3([email protected])
+ '@tanstack/start-client-core': 1.170.34
+ '@tanstack/start-server-core': 1.169.39([email protected]([email protected]))
+ pathe: 2.0.3
+ react: 19.2.6
+ react-dom: 19.2.6([email protected])
+ optionalDependencies:
+ transitivePeerDependencies:
+ - '@farmfe/core'
+ - '@rspack/core'
+ - bun-types-no-globals
+ - crossws
+ - esbuild
+ - react-server-dom-rspack
+ - rolldown
+ - rollup
+ - supports-color
+ - unloader
+ - vite-plugin-solid
+ - webpack
+
+ dependencies:
+ '@tanstack/store': 0.11.2
+ react: 19.2.6
+ react-dom: 19.2.6([email protected])
+ use-sync-external-store: 1.7.0([email protected])
+
+ '@tanstack/[email protected]':
+ dependencies:
+ '@tanstack/history': 1.162.4
+ cookie-es: 3.1.1
+ seroval: 1.6.7
+ seroval-plugins: 1.6.8([email protected])
+
+ dependencies:
+ '@babel/types': 7.29.8
+ '@tanstack/router-core': 1.171.34
+ '@tanstack/router-utils': 1.162.3([email protected])
+ '@tanstack/virtual-file-routes': 1.162.0
+ jiti: 2.7.0
+ magic-string: 0.30.21
+ prettier: 3.9.6
+ zod: 4.5.4
+ transitivePeerDependencies:
+ - supports-color
+
+ dependencies:
+ '@babel/core': 7.29.7([email protected])
+ '@babel/template': 7.29.7
+ '@babel/types': 7.29.8
+ '@tanstack/router-core': 1.171.34
+ '@tanstack/router-generator': 1.167.40([email protected])
+ '@tanstack/router-utils': 1.162.3([email protected])
+ chokidar: 5.0.0
+ zod: 4.5.4
+ optionalDependencies:
+ '@tanstack/react-router': 1.170.41([email protected]([email protected]))([email protected])
+ transitivePeerDependencies:
+ - '@farmfe/core'
+ - '@rspack/core'
+ - bun-types-no-globals
+ - esbuild
+ - rolldown
+ - rollup
+ - supports-color
+ - unloader
+
+ dependencies:
+ '@babel/generator': 7.29.8
+ '@babel/parser': 7.29.8
+ '@babel/types': 7.29.8
+ ansis: 4.4.0
+ babel-dead-code-elimination: 1.0.12([email protected])
+ diff: 8.0.4
+ pathe: 2.0.3
+ tinyglobby: 0.2.17
+ transitivePeerDependencies:
+ - supports-color
+
+ '@tanstack/[email protected]':
+ dependencies:
+ '@tanstack/router-core': 1.171.34
+ '@tanstack/start-fn-stubs': 1.162.0
+ '@tanstack/start-storage-context': 1.167.36
+ seroval: 1.6.7
+
+ '@tanstack/[email protected]': {}
+
+ dependencies:
+ '@babel/code-frame': 7.29.7
+ '@babel/core': 7.29.7([email protected])
+ '@babel/types': 7.29.8
+ '@jridgewell/remapping': 2.3.5
+ '@tanstack/router-core': 1.171.34
+ '@tanstack/router-generator': 1.167.40([email protected])
+ '@tanstack/router-utils': 1.162.3([email protected])
+ '@tanstack/start-server-core': 1.169.39([email protected]([email protected]))
+ exsolve: 1.1.1
+ lightningcss: 1.33.0
+ pathe: 2.0.3
+ picomatch: 4.0.7
+ seroval: 1.6.7
+ source-map: 0.7.6
+ srvx: 0.11.22
+ tinyglobby: 0.2.17
+ ufo: 1.6.4
+ xmlbuilder2: 4.0.3
+ zod: 4.5.4
+ optionalDependencies:
+ transitivePeerDependencies:
+ - '@farmfe/core'
+ - '@rspack/core'
+ - '@tanstack/react-router'
+ - bun-types-no-globals
+ - crossws
+ - esbuild
+ - rolldown
+ - rollup
+ - supports-color
+ - unloader
+ - vite-plugin-solid
+ - webpack
+
+ dependencies:
+ '@tanstack/history': 1.162.4
+ '@tanstack/router-core': 1.171.34
+ '@tanstack/start-client-core': 1.170.34
+ '@tanstack/start-storage-context': 1.167.36
+ fetchdts: 0.1.7
+ seroval: 1.6.7
+ transitivePeerDependencies:
+ - crossws
+
+ '@tanstack/[email protected]':
+ dependencies:
+ '@tanstack/router-core': 1.171.34
+
+ '@tanstack/[email protected]': {}
+
+ '@tanstack/[email protected]': {}
+
dependencies:
debug: 4.4.3([email protected])
@@ -21282,7 +21753,7 @@ snapshots:
'@aws-sdk/credential-provider-web-identity': 3.972.49
ws: 8.21.3([email protected])
- '@vercel/[email protected](79560e942e5066c3fa0e250d382bc1cd)':
+ '@vercel/[email protected](c35d753953df3361bf3d3347cd462dd6)':
dependencies:
'@ai-sdk/react': 3.0.288([email protected])([email protected])
'@clack/prompts': 0.11.0
@@ -21299,9 +21770,9 @@ snapshots:
clsx: 2.1.1
commander: 14.0.3
dexie: 4.4.6
glob: 11.1.0
@@ -21503,6 +21974,11 @@ snapshots:
native-promise-only: 0.8.1
weakmap-polyfill: 2.0.4
+ dependencies:
+ '@rolldown/pluginutils': 1.0.1
+
dependencies:
'@babel/core': 7.29.7([email protected])
@@ -22168,6 +22644,15 @@ snapshots:
+ dependencies:
+ '@babel/core': 7.29.7([email protected])
+ '@babel/parser': 7.29.8
+ '@babel/traverse': 7.29.8([email protected])
+ '@babel/types': 7.29.8
+ transitivePeerDependencies:
+ - supports-color
+
dependencies:
hermes-parser: 0.36.1
@@ -24142,6 +24627,8 @@ snapshots:
set-cookie-parser: 2.7.2
tough-cookie: 6.0.2
+
@@ -24286,7 +24773,7 @@ snapshots:
optional: true
dependencies:
'@formatjs/intl-localematcher': 0.6.2
'@orama/orama': 3.1.18
@@ -24307,6 +24794,7 @@ snapshots:
shiki: 3.23.0
unist-util-visit: 5.1.0
optionalDependencies:
+ '@tanstack/react-router': 1.170.41([email protected]([email protected]))([email protected])
'@types/react': 19.2.15
lucide-react: 1.16.0([email protected])
@@ -24315,14 +24803,14 @@ snapshots:
transitivePeerDependencies:
- supports-color
dependencies:
'@mdx-js/mdx': 3.1.1([email protected])
'@standard-schema/spec': 1.1.0
chokidar: 5.0.0
esbuild: 0.27.7
estree-util-value-to-estree: 3.5.0
js-yaml: 4.3.2
lru-cache: 11.5.2
mdast-util-to-markdown: 2.1.2
@@ -24343,7 +24831,7 @@ snapshots:
transitivePeerDependencies:
- supports-color
dependencies:
@@ -24356,7 +24844,7 @@ snapshots:
'@radix-ui/react-slot': 1.3.3(@types/[email protected])([email protected])
class-variance-authority: 0.7.1
lodash.merge: 4.6.2
postcss-selector-parser: 7.1.6
@@ -24663,6 +25151,13 @@ snapshots:
ufo: 1.6.4
uncrypto: 0.1.3
+ dependencies:
+ rou3: 0.8.1
+ srvx: 0.11.22
+ optionalDependencies:
+ crossws: 0.4.12([email protected])
+
dependencies:
rou3: 0.9.2
@@ -25295,6 +25790,8 @@ snapshots:
+
@@ -28884,6 +29381,8 @@ snapshots:
'@rollup/rollup-win32-x64-msvc': 4.63.3
fsevents: 2.3.3
+
@@ -29020,6 +29519,10 @@ snapshots:
+ dependencies:
+ seroval: 1.6.7
+
@@ -30626,6 +31129,13 @@ snapshots:
+ dependencies:
+ '@oozcitak/dom': 2.0.2
+ '@oozcitak/infra': 2.0.2
+ '@oozcitak/util': 10.0.0
+ js-yaml: 4.3.2
+