eve 0.57.0 → 0.58.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/README.md +1 -0
- package/dist/src/channel/activity-sink.js +1 -1
- package/dist/src/channel/session-callback.js +1 -1
- package/dist/src/chunks/{use-eve-agent-C2APNCdP.js → use-eve-agent-CxWcZCsU.js} +22 -3
- package/dist/src/chunks/{use-eve-agent-D0YnDLi_.js → use-eve-agent-X0asmJg-.js} +22 -3
- package/dist/src/cli/commands/integration-setup.js +1 -1
- package/dist/src/cli/dev/command.d.ts +30 -0
- package/dist/src/cli/dev/command.js +3 -0
- package/dist/src/cli/dev/tui/setup-commands.js +1 -1
- package/dist/src/cli/dev/tui/setup-issues.js +1 -1
- package/dist/src/cli/dev/tui/setup-panel.js +2 -1
- package/dist/src/cli/dev/tui/terminal-renderer.js +1 -1
- package/dist/src/cli/dev/tui/tui.js +1 -1
- package/dist/src/cli/option-parsers.js +1 -1
- package/dist/src/cli/run.js +1 -3
- package/dist/src/client/agent-host.js +1 -1
- package/dist/src/client/url.js +1 -1
- package/dist/src/compiled/.vendor-stamp.json +2 -2
- package/dist/src/compiled/@ai-sdk/code-mode/index.d.ts +18 -2
- package/dist/src/compiled/@ai-sdk/code-mode/index.js +16 -14
- package/dist/src/compiler/extension-compatibility.d.ts +12 -12
- package/dist/src/compiler/extension-compatibility.js +1 -1
- package/dist/src/context/dynamic-model-lifecycle.d.ts +1 -0
- package/dist/src/context/dynamic-model-lifecycle.js +1 -1
- package/dist/src/context/keys.d.ts +11 -3
- package/dist/src/context/memory-lifecycle.d.ts +2 -5
- package/dist/src/context/memory-lifecycle.js +1 -1
- package/dist/src/dynamic/definition.d.ts +2 -0
- package/dist/src/execution/dynamic-workflow/tool.js +1 -1
- package/dist/src/execution/node-step.js +1 -1
- package/dist/src/execution/session/event-sink.js +1 -1
- package/dist/src/execution/session/turn-step.js +1 -1
- package/dist/src/execution/tools/sleep-workflow.js +1 -1
- package/dist/src/execution/workflow-callback-url.js +1 -1
- package/dist/src/experimental/evaluate/auto-model.d.ts +16 -0
- package/dist/src/experimental/evaluate/auto-model.js +2 -0
- package/dist/src/harness/emission.d.ts +1 -1
- package/dist/src/harness/emission.js +1 -1
- package/dist/src/harness/messages.d.ts +1 -0
- package/dist/src/harness/messages.js +1 -1
- package/dist/src/harness/tool-loop.js +2 -2
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/internal/authored-definition/core.js +1 -1
- package/dist/src/internal/model-auth/transport.d.ts +3 -1
- package/dist/src/internal/model-auth/transport.js +1 -1
- package/dist/src/internal/nitro/host/normalize-vercel-service-crons.js +1 -1
- package/dist/src/internal/nitro/host/start-development-server.js +1 -1
- package/dist/src/internal/runtime-model.d.ts +3 -0
- package/dist/src/internal/runtime-model.js +1 -1
- package/dist/src/internal/vercel/build-agent-workspace.js +1 -1
- package/dist/src/internal/vercel/eve-service-contribution.d.ts +1 -0
- package/dist/src/internal/vercel/eve-service-contribution.js +1 -1
- package/dist/src/internal/vercel/vercel-services-config.d.ts +1 -0
- package/dist/src/internal/vercel/vercel-services-config.js +1 -1
- package/dist/src/public/definitions/workspace-agent.js +1 -1
- package/dist/src/public/experimental/evaluate/index.d.ts +1 -0
- package/dist/src/public/experimental/evaluate/index.js +1 -0
- package/dist/src/public/models/anthropic/index.js +1 -1
- package/dist/src/public/next/index.d.ts +1 -1
- package/dist/src/public/next/index.js +1 -1
- package/dist/src/public/vercel/index.d.ts +1 -1
- package/dist/src/public/vercel/index.js +1 -1
- package/dist/src/react/use-eve-agent.d.ts +1 -1
- package/dist/src/runtime/agent/bootstrap.d.ts +4 -2
- package/dist/src/runtime/agent/resolve-model.d.ts +0 -1
- package/dist/src/runtime/agent/resolve-model.js +1 -1
- package/dist/src/self-modification/agent.d.ts +6 -18
- package/dist/src/self-modification/agent.js +1 -1
- package/dist/src/self-modification/config.d.ts +17 -12
- package/dist/src/self-modification/config.js +1 -1
- package/dist/src/self-modification/credentials.d.ts +1 -10
- package/dist/src/self-modification/credentials.js +1 -1
- package/dist/src/self-modification/extension/extension.d.ts +7 -13
- package/dist/src/self-modification/extension/extension.js +1 -1
- package/dist/src/self-modification/github-publisher.d.ts +1 -1
- package/dist/src/self-modification/mode.js +1 -1
- package/dist/src/self-modification/setup.d.ts +1 -1
- package/dist/src/self-modification/setup.js +23 -4
- package/dist/src/setup/flows/model-login-connection.js +1 -1
- package/dist/src/setup/flows/registry.d.ts +3 -0
- package/dist/src/setup/flows/registry.js +2 -2
- package/dist/src/setup/integrations/discord/setup.js +1 -1
- package/dist/src/setup/integrations/file-memory/setup.js +2 -2
- package/dist/src/setup/integrations/github/setup.js +1 -1
- package/dist/src/setup/integrations/linear/setup.js +1 -1
- package/dist/src/setup/integrations/linq/setup.js +1 -1
- package/dist/src/setup/integrations/photon/setup-flow.js +1 -1
- package/dist/src/setup/integrations/registry.js +1 -1
- package/dist/src/setup/integrations/runner.d.ts +3 -0
- package/dist/src/setup/integrations/runner.js +1 -1
- package/dist/src/setup/integrations/self-modification/setup.d.ts +7 -1
- package/dist/src/setup/integrations/self-modification/setup.js +1 -1
- package/dist/src/setup/integrations/shared/scaffold.js +1 -1
- package/dist/src/setup/integrations/shared/ui.d.ts +1 -0
- package/dist/src/setup/integrations/shared/ui.js +1 -1
- package/dist/src/setup/integrations/shopify/setup.js +1 -1
- package/dist/src/setup/integrations/slack/setup.js +1 -1
- package/dist/src/setup/integrations/teams/connect.d.ts +22 -0
- package/dist/src/setup/integrations/teams/connect.js +1 -0
- package/dist/src/setup/integrations/teams/setup.d.ts +21 -0
- package/dist/src/setup/integrations/teams/setup.js +7 -0
- package/dist/src/setup/integrations/types.d.ts +6 -0
- package/dist/src/setup/scaffold/create/add-to-project.js +1 -1
- package/dist/src/setup/scaffold/create/project.d.ts +1 -1
- package/dist/src/setup/scaffold/create/project.js +2 -2
- package/dist/src/setup/scaffold/update/channels.d.ts +2 -0
- package/dist/src/setup/scaffold/update/channels.js +2 -2
- package/dist/src/setup/scaffold/update/connections.js +3 -3
- package/dist/src/setup/scaffold/update/web-options.js +1 -1
- package/dist/src/setup/scaffold/version-tokens.d.ts +2 -1
- package/dist/src/setup/scaffold/version-tokens.js +1 -1
- package/dist/src/shared/agent-definition.d.ts +2 -0
- package/dist/src/shared/eve-route-path.d.ts +4 -0
- package/dist/src/shared/eve-route-path.js +1 -0
- package/dist/src/shared/public-route-prefix.d.ts +1 -1
- package/dist/src/subagents/remote-route-url.js +1 -1
- package/dist/src/svelte/index.js +1 -1
- package/dist/src/svelte/use-eve-agent.d.ts +1 -1
- package/dist/src/svelte/use-eve-agent.js +1 -1
- package/dist/src/vue/index.js +1 -1
- package/dist/src/vue/use-eve-agent.d.ts +1 -1
- package/dist/src/vue/use-eve-agent.js +1 -1
- package/docs/README.md +45 -40
- package/docs/agent-config.md +8 -1
- package/docs/channels/teams.mdx +29 -0
- package/docs/concepts/meta.json +1 -0
- package/docs/concepts/project-structure.mdx +111 -0
- package/docs/getting-started.mdx +18 -106
- package/docs/guides/auth-and-route-protection.md +8 -4
- package/docs/guides/deployment/self-hosting.md +40 -0
- package/docs/guides/deployment/vercel.mdx +26 -23
- package/docs/guides/dynamic-capabilities.md +4 -0
- package/docs/guides/evaluate.md +118 -0
- package/docs/guides/frontend/nextjs.mdx +61 -20
- package/docs/guides/frontend/overview.mdx +3 -3
- package/docs/guides/instrumentation/otel.mdx +7 -2
- package/docs/guides/instrumentation/providers.mdx +2 -3
- package/docs/guides/remote-agents.md +5 -1
- package/docs/install-integrations.mdx +1 -1
- package/docs/meta.json +1 -0
- package/docs/reference/agent-files.md +104 -0
- package/docs/reference/cli.md +2 -2
- package/docs/reference/meta.json +1 -1
- package/docs/reference/typescript-api.md +2 -1
- package/docs/schedules.mdx +1 -1
- package/docs/subagents/index.mdx +2 -2
- package/package.json +9 -4
|
@@ -3,13 +3,29 @@ title: "Next.js"
|
|
|
3
3
|
description: "Run an eve agent and a Next.js app as one project with withEve."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
`eve/next`
|
|
6
|
+
`eve/next` connects a Next.js app to one or more eve agents. Wrap your Next.js config with `withEve(nextConfig)` to run the app and agents with one development command and deploy them as one Vercel project. Browser requests use same-origin routes; the agent runtimes remain separate services.
|
|
7
|
+
|
|
8
|
+
Use this integration when Next.js owns the application's development and deployment lifecycle. If the frontend is a peer of an agent workspace, compose the services with [`eve/vercel`](../deployment/vercel#compose-agents-with-other-vercel-services) on Vercel or your [self-hosted process manager and proxy](../deployment/self-hosting#run-workspace-members). A peer frontend can use `eve/react` without `eve/next`. See [Project Structure](/docs/concepts/project-structure#configure-a-web-deployment) for the choice.
|
|
7
9
|
|
|
8
10
|
## Prerequisites
|
|
9
11
|
|
|
10
12
|
- The `eve` package installed in your project (`npm install eve@latest`).
|
|
11
|
-
- An existing eve agent directory. If you don't have one, start from [Getting
|
|
12
|
-
- A Next.js app to
|
|
13
|
+
- An existing eve agent directory. If you don't have one, start from [Getting Started](../../getting-started).
|
|
14
|
+
- A Next.js app, or a single-agent project where you want to generate one below.
|
|
15
|
+
|
|
16
|
+
## Add the generated Web Chat app
|
|
17
|
+
|
|
18
|
+
For a single-agent project, install the generated Next.js Web Chat app:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
eve add channel/web
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
The installer adds a Next.js application and wraps `next.config.ts` with `withEve()`. The generated chat calls the unnamed agent through same-origin `/eve/v1/*` routes.
|
|
25
|
+
|
|
26
|
+
Before accepting production browser traffic, replace the generated placeholder authorization policy. See [Authenticate browser requests](./overview#authenticate-browser-requests).
|
|
27
|
+
|
|
28
|
+
The Web Chat installer does not support eve agent workspaces. If you want Next.js to host the integration, create a root Next.js application and follow the steps below; `withEve(nextConfig)` discovers workspace members but does not generate a chat UI. To keep the frontend as a peer application instead, follow the [workspace layout guidance](/docs/concepts/project-structure#configure-a-web-deployment).
|
|
13
29
|
|
|
14
30
|
## Wrap the Next.js config
|
|
15
31
|
|
|
@@ -22,7 +38,7 @@ const nextConfig: NextConfig = {};
|
|
|
22
38
|
export default withEve(nextConfig);
|
|
23
39
|
```
|
|
24
40
|
|
|
25
|
-
By default `withEve()` looks for an `agent/` folder inside your Next.js project root
|
|
41
|
+
By default `withEve(nextConfig)` looks for an `agent/` folder inside your Next.js project root and mounts its API at `/eve/v1/*`. When the project root is an eve workspace with `agents/<name>/` members, it discovers every member and mounts each at `/eve/<name>/v1/*` instead. You do not need an explicit `agents` map for this layout.
|
|
26
42
|
|
|
27
43
|
If one agent lives somewhere else, point at it with `eveRoot`:
|
|
28
44
|
|
|
@@ -32,14 +48,16 @@ export default withEve(nextConfig, {
|
|
|
32
48
|
});
|
|
33
49
|
```
|
|
34
50
|
|
|
51
|
+
## Mount agents outside a workspace
|
|
52
|
+
|
|
35
53
|
To mount agents that are not members of the project-level `agents/` workspace, use `agents`. String values are agent roots; object values can override the build command or private production service prefix for that agent:
|
|
36
54
|
|
|
37
55
|
```ts
|
|
38
56
|
export default withEve(nextConfig, {
|
|
39
57
|
agents: {
|
|
40
|
-
support: "./
|
|
58
|
+
support: "./apps/support-agent",
|
|
41
59
|
billing: {
|
|
42
|
-
root: "./
|
|
60
|
+
root: "./apps/billing-agent",
|
|
43
61
|
buildCommand: "pnpm build:billing-agent",
|
|
44
62
|
servicePrefix: "/_eve_internal/billing",
|
|
45
63
|
},
|
|
@@ -47,7 +65,7 @@ export default withEve(nextConfig, {
|
|
|
47
65
|
});
|
|
48
66
|
```
|
|
49
67
|
|
|
50
|
-
Named agents mount under `/eve
|
|
68
|
+
Named agents mount under `/eve/<name>/v1/*`. Call the matching agent from React with `agent`:
|
|
51
69
|
|
|
52
70
|
```tsx
|
|
53
71
|
const support = useEveAgent({ agent: "support" });
|
|
@@ -56,19 +74,19 @@ const billing = useEveAgent({ agent: "billing" });
|
|
|
56
74
|
|
|
57
75
|
Use either `eveRoot` or `agents`, not both. `eveRoot` remains the shorthand for a single unnamed agent mounted at `/eve/v1/*`.
|
|
58
76
|
|
|
59
|
-
Generated agent services build with `EVE_PUBLIC_ROUTE_PREFIX` set to the agent's public mount (for example `/eve/
|
|
77
|
+
Generated agent services build with `EVE_PUBLIC_ROUTE_PREFIX` set to the agent's public mount (for example `/eve/support`) so framework-minted callback URLs — OAuth connection callbacks and remote-subagent session callbacks — resolve to the public per-agent path. If you configure eve services manually in `vercel.json` instead, export that variable in each named agent's build command.
|
|
60
78
|
|
|
61
79
|
### `withEve` options
|
|
62
80
|
|
|
63
81
|
All fields are optional.
|
|
64
82
|
|
|
65
|
-
| Option | Type | Default | Purpose
|
|
66
|
-
| -------------------- | --------------------- | ------------------------ |
|
|
67
|
-
| `eveRoot` | `string` | Next.js app root | Path to one unnamed eve app root, relative to `process.cwd()` unless absolute. Do not combine with `agents`.
|
|
68
|
-
| `agents` | `Record<string, ...>` | inferred for a workspace | Named eve agents to mount under `/eve
|
|
69
|
-
| `eveBuildCommand` | `string` | generated | Build command for generated eve Vercel services. In multi-agent mode this is the default for agents without their own `buildCommand`.
|
|
70
|
-
| `servicePrefix` | `string` | `"/_eve_internal/eve"` | Private route namespace for legacy manual Vercel service configs and non-Vercel production proxying. Named agents derive unique defaults from this prefix.
|
|
71
|
-
| `devServerTimeoutMs` | `number` | `180000` | Maximum time to wait for each eve development server to become available.
|
|
83
|
+
| Option | Type | Default | Purpose |
|
|
84
|
+
| -------------------- | --------------------- | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
85
|
+
| `eveRoot` | `string` | Next.js app root | Path to one unnamed eve app root, relative to `process.cwd()` unless absolute. Do not combine with `agents`. |
|
|
86
|
+
| `agents` | `Record<string, ...>` | inferred for a workspace | Named eve agents to mount under `/eve/<name>/v1/*`. `withEve()` discovers project-level `agents/<name>/` members when neither `agents` nor `eveRoot` is set; otherwise each value is a root string or `{ root, buildCommand?, servicePrefix? }`. |
|
|
87
|
+
| `eveBuildCommand` | `string` | generated | Build command for generated eve Vercel services. In multi-agent mode this is the default for agents without their own `buildCommand`. |
|
|
88
|
+
| `servicePrefix` | `string` | `"/_eve_internal/eve"` | Private route namespace for legacy manual Vercel service configs and non-Vercel production proxying. Named agents derive unique defaults from this prefix. |
|
|
89
|
+
| `devServerTimeoutMs` | `number` | `180000` | Maximum time to wait for each eve development server to become available. |
|
|
72
90
|
|
|
73
91
|
For slow cold starts, increase the development timeout:
|
|
74
92
|
|
|
@@ -80,7 +98,24 @@ export default withEve(nextConfig, {
|
|
|
80
98
|
|
|
81
99
|
## Call the hook
|
|
82
100
|
|
|
83
|
-
|
|
101
|
+
For a single unnamed agent, call [`useEveAgent`](./overview) without `agent` or `host`. For named agents, whether discovered from a workspace or configured explicitly, pass the name:
|
|
102
|
+
|
|
103
|
+
```tsx
|
|
104
|
+
"use client";
|
|
105
|
+
|
|
106
|
+
import { useEveAgent } from "eve/react";
|
|
107
|
+
|
|
108
|
+
export function SupportStatus() {
|
|
109
|
+
const support = useEveAgent({ agent: "support" });
|
|
110
|
+
return <p>{support.status}</p>;
|
|
111
|
+
}
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
See [Basic chat](./overview#basic-chat-react) for rendering messages and sending turns.
|
|
115
|
+
|
|
116
|
+
Bind each chat route to its agent, and include the agent identity in durable-session URLs so the UI does not restore a session through the wrong agent route. Remount the chat component when switching agents: the hook reads `agent` when it creates its store.
|
|
117
|
+
|
|
118
|
+
Requests are same-origin, so the browser sends application cookies to the agent. Each agent must verify those credentials through its own channel authentication policy. For non-cookie schemes, attach the credentials yourself:
|
|
84
119
|
|
|
85
120
|
```tsx
|
|
86
121
|
const agent = useEveAgent({
|
|
@@ -90,7 +125,7 @@ const agent = useEveAgent({
|
|
|
90
125
|
});
|
|
91
126
|
```
|
|
92
127
|
|
|
93
|
-
|
|
128
|
+
Configure authorization for every exposed agent before accepting production browser traffic. See [Authenticate browser requests](./overview#authenticate-browser-requests) for the default fail-closed behavior and channel configuration.
|
|
94
129
|
|
|
95
130
|
## Use the generated Web Chat routes
|
|
96
131
|
|
|
@@ -129,15 +164,21 @@ See [Resumable sessions](./overview#resumable-sessions) for persistence and repl
|
|
|
129
164
|
- **Local production build.** `next build && next start` serves the eve runtime from its built `.output/server/index.mjs` on a stable local port (`4274`) and proxies the eve routes to it. Run `eve build` first so that output exists. In an `agents/` workspace, build every member from its `agents/<name>/` directory before starting Next.js. Change the port with `EVE_NEXT_PRODUCTION_PORT`:
|
|
130
165
|
|
|
131
166
|
```bash
|
|
132
|
-
EVE_NEXT_PRODUCTION_PORT=5000
|
|
167
|
+
export EVE_NEXT_PRODUCTION_PORT=5000
|
|
168
|
+
npm run build && npm start
|
|
133
169
|
```
|
|
134
170
|
|
|
135
|
-
- **Non-Vercel hosts.**
|
|
171
|
+
- **Non-Vercel hosts.** `withEve()` provides both agent process startup and Next.js proxy rewrites; self-hosters using this path do not need to recreate the browser-facing routing. The Vercel service output is a separate integration, not a self-hosting requirement. By default, `next start` runs each built eve service on its derived loopback port. If your host supervises eve services itself, run each service separately and set `EVE_NEXT_PRODUCTION_ORIGIN` to the origin that serves its private route prefix:
|
|
136
172
|
|
|
137
173
|
```bash
|
|
138
|
-
EVE_NEXT_PRODUCTION_ORIGIN=https://agent.example.com
|
|
174
|
+
export EVE_NEXT_PRODUCTION_ORIGIN=https://agent.example.com
|
|
175
|
+
npm run build && npm start
|
|
139
176
|
```
|
|
140
177
|
|
|
178
|
+
This setting disables automatic production agent startup. The destination includes `servicePrefix`: for named agents, the default is `/_eve_internal/eve/<name>/eve/v1/*`. Configure that routing on the destination host, and use the same origin setting when building and starting Next.js.
|
|
179
|
+
|
|
180
|
+
If the public routing layer mounts an agent below a path, set `EVE_PUBLIC_ROUTE_PREFIX` in that agent's build and runtime environments so callback URLs use the public path. Process restarts, persistent workflow storage, sandbox configuration, and workflow callback routing remain hosting responsibilities; see [Self-host eve](../deployment/self-hosting).
|
|
181
|
+
|
|
141
182
|
## What to read next
|
|
142
183
|
|
|
143
184
|
- [Frontend overview](./overview): the `useEveAgent` API
|
|
@@ -3,16 +3,16 @@ title: "Overview"
|
|
|
3
3
|
description: "Put an eve agent behind a browser chat UI with useEveAgent."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
Use this guide when you already have a browser application and need to connect it to an eve agent. `useEveAgent()` opens a durable session, sends turns, streams the reply back, and turns the raw event stream into render-ready state. React is the reference implementation; [Vue](./use-eve-agent-vue) and [Svelte](./use-eve-agent-svelte) ship the same surface.
|
|
7
7
|
|
|
8
8
|
## The integration model
|
|
9
9
|
|
|
10
10
|
A browser UI is a client of the agent's HTTP routes (the [eve channel](../../channels/overview)). Two layers wire it up:
|
|
11
11
|
|
|
12
|
-
- **
|
|
12
|
+
- **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.
|
|
13
13
|
- **The hook** (`useEveAgent`) holds the session state, streaming, errors, and composer status. It defaults to same-origin eve routes such as `/eve/v1/session`.
|
|
14
14
|
|
|
15
|
-
The
|
|
15
|
+
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.
|
|
16
16
|
|
|
17
17
|
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.
|
|
18
18
|
|
|
@@ -40,6 +40,8 @@ export default otel({
|
|
|
40
40
|
The OpenTelemetry `tracePolicy` is a capture ceiling shared by every OTel
|
|
41
41
|
destination. A destination cannot restore content excluded by this policy. It
|
|
42
42
|
does not affect lifecycle-event providers created with `defineInstrumentation()`.
|
|
43
|
+
See [Audience](../channels/overview#audience) for how channels classify the
|
|
44
|
+
conversation passed to this policy.
|
|
43
45
|
|
|
44
46
|
## Add an OpenTelemetry destination
|
|
45
47
|
|
|
@@ -72,8 +74,11 @@ invoke_agent <agent>
|
|
|
72
74
|
```
|
|
73
75
|
|
|
74
76
|
Each turn starts a new trace. The first subagent trace links to its caller with
|
|
75
|
-
`eve.link.type=agent.dispatch
|
|
76
|
-
|
|
77
|
+
`eve.link.type=agent.dispatch`; the link is not an authorization grant. For a
|
|
78
|
+
remote agent, `trustedForwarders` lets the receiver accept the sender's session
|
|
79
|
+
lineage and trace-content policy. See [Remote agents](../guides/remote-agents#preserving-trace-content).
|
|
80
|
+
Use `gen_ai.conversation.id` to find the traces for one conversation in your
|
|
81
|
+
destination's span-search surface.
|
|
77
82
|
|
|
78
83
|
## Manage built-in destinations
|
|
79
84
|
|
|
@@ -109,9 +109,8 @@ requests for user input, provider metadata, and error details. Omitted content
|
|
|
109
109
|
fields are unavailable to the handler.
|
|
110
110
|
|
|
111
111
|
The channel assigns the audience once when it creates the session. It controls
|
|
112
|
-
content capture, not access.
|
|
113
|
-
channel
|
|
114
|
-
channel](../channels/custom#conversation-audience).
|
|
112
|
+
content capture, not access. See [Audience](../channels/overview#audience) for
|
|
113
|
+
how the channel derives `public`, `private`, and `unknown`.
|
|
115
114
|
|
|
116
115
|
## Redact fields in a custom provider
|
|
117
116
|
|
|
@@ -137,7 +137,7 @@ This makes caller authority turn-scoped even when the remote child session is pe
|
|
|
137
137
|
|
|
138
138
|
Identity forwarding does not make a persistent session private to one caller. Conversation history, tool outputs, and other child-session state still persist. If those values must not be visible across users, give each user a distinct child session or enforce that ownership at the application boundary.
|
|
139
139
|
|
|
140
|
-
Forwarding is explicit on both sides. The receiver names which
|
|
140
|
+
Forwarding identity is explicit on both sides. The receiver names which deployments it trusts with `eveChannel({ trustedForwarders })` (see [Auth & route protection](./auth-and-route-protection#accepting-forwarded-identity-from-another-deployment)); refusing the forwarder rejects a forwarded principal with a 403. The same trust decision covers parent session lineage and, with principal forwarding, trace-content constraints.
|
|
141
141
|
|
|
142
142
|
## Trace propagation
|
|
143
143
|
|
|
@@ -147,6 +147,10 @@ traces for one conversation. Trace context is observability metadata, not an
|
|
|
147
147
|
authorization grant. See [OpenTelemetry](../observability/otel#trace-topology)
|
|
148
148
|
for the trace topology.
|
|
149
149
|
|
|
150
|
+
eve carries parent session lineage separately. The receiver accepts it only
|
|
151
|
+
when `trustedForwarders` approves the authenticated caller; otherwise, trace
|
|
152
|
+
correlation continues without it.
|
|
153
|
+
|
|
150
154
|
## Preserving trace content
|
|
151
155
|
|
|
152
156
|
With `forwardPrincipal: true`, a sampled remote dispatch forwards its original
|
|
@@ -19,7 +19,7 @@ eve add memory/file
|
|
|
19
19
|
|
|
20
20
|
If an item is not found, `eve add` searches the available catalogs and prints close matches without installing anything.
|
|
21
21
|
|
|
22
|
-
Web Chat installs a project-level Next.js application
|
|
22
|
+
Web Chat installs a project-level Next.js application. It cannot be added to an eve agent workspace; eve rejects the installation before writing files. See [Project Structure](./concepts/project-structure) for browser-app placement and [Next.js](./guides/frontend/nextjs) for manual integration.
|
|
23
23
|
|
|
24
24
|
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>`.
|
|
25
25
|
|
package/docs/meta.json
CHANGED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Agent Files"
|
|
3
|
+
description: "Look up agent directory slots, path-derived names, subagent files, and filesystem discovery rules."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
eve builds an agent from files under its agent directory. Each supported path determines how eve loads the file. For recommended project layouts and when to split agents, read [Project Structure](/docs/concepts/project-structure).
|
|
7
|
+
|
|
8
|
+
## Agent directory layout
|
|
9
|
+
|
|
10
|
+
In a single-agent project, the agent directory is `agent/`. In an eve agent workspace, each member has an `agents/<name>/agent/` directory. A minimal root agent needs an instructions source; `agent.ts` is optional when the default configuration is sufficient.
|
|
11
|
+
|
|
12
|
+
```text
|
|
13
|
+
agent/
|
|
14
|
+
├── agent.ts
|
|
15
|
+
├── instructions.md
|
|
16
|
+
├── instrumentation.ts
|
|
17
|
+
├── channels/
|
|
18
|
+
├── connections/
|
|
19
|
+
├── extensions/
|
|
20
|
+
├── hooks/
|
|
21
|
+
├── skills/
|
|
22
|
+
├── lib/
|
|
23
|
+
├── memory/
|
|
24
|
+
├── sandbox/
|
|
25
|
+
├── tools/
|
|
26
|
+
├── schedules/
|
|
27
|
+
└── subagents/
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Add only the files you need. Framework defaults use the same slots, so a file at the same path replaces the default when eve compiles the agent. Evals live beside `agent/`, not inside it.
|
|
31
|
+
|
|
32
|
+
## Naming from paths
|
|
33
|
+
|
|
34
|
+
eve derives capability names from file paths:
|
|
35
|
+
|
|
36
|
+
| Path | Resolves to |
|
|
37
|
+
| ------------------------------------- | --------------------- |
|
|
38
|
+
| `agent/tools/get_weather.ts` | tool `get_weather` |
|
|
39
|
+
| `agent/connections/linear.ts` | connection `linear` |
|
|
40
|
+
| `agent/skills/summarize.md` | skill `summarize` |
|
|
41
|
+
| `agent/subagents/researcher/agent.ts` | subagent `researcher` |
|
|
42
|
+
|
|
43
|
+
A standalone root agent uses its package name (without an npm scope), or its app directory name when no name is set. An eve workspace member uses its directory name under `agents/`. A local subagent uses its directory name under `subagents/`.
|
|
44
|
+
|
|
45
|
+
## Agent files and directories
|
|
46
|
+
|
|
47
|
+
Paths below are relative to the agent directory. Root agents can use every path; subagents can use paths marked **Yes**.
|
|
48
|
+
|
|
49
|
+
| Path | Purpose | Available to subagents | Notes |
|
|
50
|
+
| ------------------------------------------------------- | ----------------------------------------- | ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
|
|
51
|
+
| `agent.ts` | Runtime config | Yes | Model, model options, compaction, build, and experimental settings. See [Agents](/docs/agent-config). |
|
|
52
|
+
| `instructions.md` / `instructions.ts` / `instructions/` | Base system prompt | Yes | A flat file or directory of `.md` and `.ts` files. Required on the root, optional on subagents. See [Instructions](/docs/instructions). |
|
|
53
|
+
| `instrumentation.ts` | Telemetry config | No | Auto-discovered and run before agent code. See [Instrumentation](/docs/observability/instrumentation). |
|
|
54
|
+
| `channels/` | HTTP and messaging entry points | No | See [Channels](/docs/channels/overview). |
|
|
55
|
+
| `connections/` | External MCP and OpenAPI services | Yes | Static files define path-named connections; dynamic sources can resolve caller-specific connections. |
|
|
56
|
+
| `extensions/` | Mounted reusable capabilities | Yes | File or directory mounts. See [Extensions](/docs/extensions). |
|
|
57
|
+
| `hooks/` | Lifecycle and stream-event subscribers | Yes | Module-backed only; recursive directories are supported. |
|
|
58
|
+
| `skills/` | On-demand procedures and capability packs | Yes | Flat Markdown, module-backed skills, or packaged skills. |
|
|
59
|
+
| `lib/` | Shared authored helper code | Yes | Import-only; not copied into the sandbox. |
|
|
60
|
+
| `memory.ts` or `memory/<name>.ts` | Cross-session memory | Yes | Provider-backed slots. See [Memory](/docs/memory). |
|
|
61
|
+
| `sandbox.ts` or `sandbox/sandbox.ts` | The agent's sandbox | Yes | The framework default applies when neither is authored. |
|
|
62
|
+
| `sandbox/workspace/**` | Files seeded into the sandbox | Yes | Mirrored into `/workspace/` when a session starts. |
|
|
63
|
+
| `tools/` | Typed executable integrations | Yes | Module-backed only. |
|
|
64
|
+
| `schedules/` | Recurring jobs | No | `defineSchedule` modules or Markdown prompts with `cron` frontmatter; recursive nesting is supported. |
|
|
65
|
+
| `subagents/` | Specialist child agents | Yes | Local directories or remote-agent definitions; nested subagents are supported. |
|
|
66
|
+
|
|
67
|
+
## Files available in the sandbox
|
|
68
|
+
|
|
69
|
+
Agent source files are not automatically available to shell commands. Put files to copy into the sandbox's `/workspace/` under `agent/sandbox/workspace/`. Skill runtime files are seeded separately under `$HOME/.agents/skills/`, with `/workspace/skills/` as a fallback. See [Sandboxes](/docs/sandbox) and [Skills](/docs/skills).
|
|
70
|
+
|
|
71
|
+
## Local subagents
|
|
72
|
+
|
|
73
|
+
A local declared subagent lives at `agent/subagents/<name>/`:
|
|
74
|
+
|
|
75
|
+
```text
|
|
76
|
+
agent/subagents/researcher/
|
|
77
|
+
├── agent.ts # required; must include description
|
|
78
|
+
├── instructions.md # optional
|
|
79
|
+
├── tools/
|
|
80
|
+
└── subagents/
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
It uses the same `defineAgent` helper as the root and supports the slots marked **Yes** above. Channels, schedules, and instrumentation are root-only. A declared subagent does not inherit its parent's authored slots; see [Subagents](/docs/subagents#the-isolation-boundary) for defaults and isolation behavior.
|
|
84
|
+
|
|
85
|
+
## Flat layout
|
|
86
|
+
|
|
87
|
+
eve also supports agent files directly in the app root, without an `agent/` directory:
|
|
88
|
+
|
|
89
|
+
```text
|
|
90
|
+
my-agent/
|
|
91
|
+
├── package.json
|
|
92
|
+
├── agent.ts
|
|
93
|
+
├── instructions.md
|
|
94
|
+
├── tools/
|
|
95
|
+
└── skills/
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Workspace members can also use flat agent files directly under `agents/<name>/`. Prefer the nested layouts in [Project Structure](/docs/concepts/project-structure) to keep application files separate from agent definitions.
|
|
99
|
+
|
|
100
|
+
## Debug file discovery
|
|
101
|
+
|
|
102
|
+
Run `eve info` from the agent's app directory, or `eve info --agent <name>` from an eve workspace root. It lists the discovered files and diagnostics. eve also writes inspectable artifacts under `.eve/`; see the [CLI reference](/docs/reference/cli#eve-info).
|
|
103
|
+
|
|
104
|
+
Workspace discovery includes only direct `agents/<name>/` children with agent files and no `package.json` of their own. A root `agent/` directory takes precedence over `agents/` and makes the project single-agent. See [Add a second root agent](/docs/concepts/project-structure#add-a-second-root-agent) to convert that layout.
|
package/docs/reference/cli.md
CHANGED
|
@@ -399,10 +399,10 @@ Lists the user-authored channels in the current project.
|
|
|
399
399
|
4. `eve build` before shipping.
|
|
400
400
|
5. `eve start` to smoke-test the built output locally.
|
|
401
401
|
|
|
402
|
-
Related: [
|
|
402
|
+
Related: [Agent Files](/docs/reference/agent-files) · [Instrumentation](../observability/instrumentation).
|
|
403
403
|
|
|
404
404
|
## What to read next
|
|
405
405
|
|
|
406
|
-
- [
|
|
406
|
+
- [Agent Files](/docs/reference/agent-files): what `eve info` discovers
|
|
407
407
|
- [Instrumentation](../observability/instrumentation): tracing and the error catalog
|
|
408
408
|
- [Deployment](../guides/deployment/overview): `eve build` and `eve start` in production
|
package/docs/reference/meta.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{ "title": "Reference", "pages": ["typescript-api", "cli", "telemetry"] }
|
|
1
|
+
{ "title": "Reference", "pages": ["agent-files", "typescript-api", "cli", "telemetry"] }
|
|
@@ -137,6 +137,7 @@ import template from "../../prompts/template.txt?raw";
|
|
|
137
137
|
| `eve/local-dev` | `getLocalDevCapability`, `LocalDevCapability` |
|
|
138
138
|
| `eve/models/openai` | `openai`, `chatgpt`, deprecated `experimental_chatgpt` |
|
|
139
139
|
| `eve/models/anthropic` | `anthropic` |
|
|
140
|
+
| [`eve/experimental/evaluate`](../guides/evaluate) | Experimental `autoModel` |
|
|
140
141
|
| `eve/evals` | `defineEval`, `defineEvalConfig`, `mockModel`, eval types |
|
|
141
142
|
| `eve/evals/expect` | `includes`, `equals`, `matches`, `similarity` |
|
|
142
143
|
| `eve/evals/reporters` | `Braintrust`, `JUnit`, `EvalReporter` |
|
|
@@ -223,4 +224,4 @@ Troubleshooting:
|
|
|
223
224
|
|
|
224
225
|
- [`agent.ts`](../agent-config): the agent config these helpers configure
|
|
225
226
|
- [Tools](../tools): `defineTool`, the most-used helper
|
|
226
|
-
- [
|
|
227
|
+
- [Agent Files](/docs/reference/agent-files): where each define\* lives on disk
|
package/docs/schedules.mdx
CHANGED
|
@@ -107,7 +107,7 @@ The route is dev-only. Production builds never mount it, and it needs no auth si
|
|
|
107
107
|
|
|
108
108
|
## On Vercel
|
|
109
109
|
|
|
110
|
-
Hosted Vercel builds turn every `defineSchedule(...)` into a Vercel Cron Job, with each `cron` written as an entry in `.vercel/output/config.json`. This also applies when [`withEve`](./guides/frontend/nextjs) embeds one or more agents in a Next.js deployment: Vercel assembles each generated eve service's schedules into the project Build Output config while preserving existing project cron entries. Named agents use their public `/eve
|
|
110
|
+
Hosted Vercel builds turn every `defineSchedule(...)` into a Vercel Cron Job, with each `cron` written as an entry in `.vercel/output/config.json`. This also applies when [`withEve`](./guides/frontend/nextjs) embeds one or more agents in a Next.js deployment: Vercel assembles each generated eve service's schedules into the project Build Output config while preserving existing project cron entries. Named agents use their public `/eve/<name>` route prefix automatically.
|
|
111
111
|
|
|
112
112
|
When running `vercel build` locally, use Vercel CLI 56.4.0 or later so generated-service cron entries are included in the project output.
|
|
113
113
|
|
package/docs/subagents/index.mdx
CHANGED
|
@@ -79,7 +79,7 @@ export default defineWorkspaceAgent({
|
|
|
79
79
|
});
|
|
80
80
|
```
|
|
81
81
|
|
|
82
|
-
The helper uses the peer's root `defineAgent({ description })` value as the model-visible tool description. Pass `description` to override it for this caller. When `transport` is omitted, eve selects the built-in transport for the runtime environment. Vercel deployments route through the current deployment and authenticate with the caller's Vercel OIDC token.
|
|
82
|
+
The helper uses the peer's root `defineAgent({ description })` value as the model-visible tool description. Pass `description` to override it for this caller. When `transport` is omitted, eve selects the built-in transport for the Vercel runtime environment. Local `vercel dev` routes workspace calls without deployment credentials; Vercel deployments route calls through the current deployment and authenticate with the caller's Vercel OIDC token. Named peers use their `/eve/<name>` mount. Outside those environments, provide an explicit transport with `url` and optional `auth` or `headers`:
|
|
83
83
|
|
|
84
84
|
```ts title="agents/foreman/agent/subagents/research.ts"
|
|
85
85
|
import { defineWorkspaceAgent } from "eve";
|
|
@@ -96,7 +96,7 @@ export default defineWorkspaceAgent({
|
|
|
96
96
|
|
|
97
97
|
An explicit transport replaces the environment default completely. The receiving peer must still accept the transport's credentials through its channel authentication policy. Set `forwardPrincipal: true` only when the peer trusts the caller to forward user identity, as described in [Remote agents](./guides/remote-agents#forward-the-callers-identity).
|
|
98
98
|
|
|
99
|
-
Use the peer's directory name under `agents/`. eve requires an exact workspace-member match, so add another declared subagent file for each additional peer. `
|
|
99
|
+
Use the peer's directory name under `agents/`. eve requires an exact workspace-member match, so add another declared subagent file for each additional peer. Run `vercel dev --local` with a root `vercel.ts` composed by `withEve` to start every member and enable the default local workspace transport. `eve dev` starts only the selected agent; use an explicit transport if it must call a separately running peer.
|
|
100
100
|
|
|
101
101
|
### Conditional availability
|
|
102
102
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eve",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.58.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Filesystem-first framework for durable backend AI agents that run anywhere.",
|
|
6
6
|
"keywords": [
|
|
@@ -437,6 +437,11 @@
|
|
|
437
437
|
"types": "./dist/src/self-modification/config.d.ts",
|
|
438
438
|
"import": "./dist/src/self-modification/config.js",
|
|
439
439
|
"default": "./dist/src/self-modification/config.js"
|
|
440
|
+
},
|
|
441
|
+
"./experimental/evaluate": {
|
|
442
|
+
"types": "./dist/src/public/experimental/evaluate/index.d.ts",
|
|
443
|
+
"import": "./dist/src/public/experimental/evaluate/index.js",
|
|
444
|
+
"default": "./dist/src/public/experimental/evaluate/index.js"
|
|
440
445
|
}
|
|
441
446
|
},
|
|
442
447
|
"publishConfig": {
|
|
@@ -449,7 +454,7 @@
|
|
|
449
454
|
"devDependencies": {
|
|
450
455
|
"@agentclientprotocol/sdk": "1.3.0",
|
|
451
456
|
"@ai-sdk/anthropic": "^4.0.49",
|
|
452
|
-
"@ai-sdk/code-mode": "^1.0.
|
|
457
|
+
"@ai-sdk/code-mode": "^1.0.62",
|
|
453
458
|
"@ai-sdk/google": "^4.0.64",
|
|
454
459
|
"@ai-sdk/mcp": "^2.0.45",
|
|
455
460
|
"@ai-sdk/openai": "^4.0.60",
|
|
@@ -490,7 +495,7 @@
|
|
|
490
495
|
"@workflow/world": "5.0.0-beta.35",
|
|
491
496
|
"@workflow/world-local": "5.0.0-beta.44",
|
|
492
497
|
"@workflow/world-vercel": "5.0.0-beta.46",
|
|
493
|
-
"ai": "^7.0.
|
|
498
|
+
"ai": "^7.0.105",
|
|
494
499
|
"autoevals": "0.0.132",
|
|
495
500
|
"chat": "4.34.0",
|
|
496
501
|
"chokidar": "5.0.0",
|
|
@@ -524,7 +529,7 @@
|
|
|
524
529
|
},
|
|
525
530
|
"peerDependencies": {
|
|
526
531
|
"@opentelemetry/api": "^1.0.0",
|
|
527
|
-
"ai": "^7.0.
|
|
532
|
+
"ai": "^7.0.105",
|
|
528
533
|
"braintrust": "^3.0.0",
|
|
529
534
|
"dd-trace": "^6.13.0",
|
|
530
535
|
"just-bash": "^3.1.0",
|