eve 0.13.6 → 0.13.8
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 +16 -0
- package/dist/src/cli/banner.d.ts +2 -4
- package/dist/src/cli/banner.js +1 -1
- package/dist/src/cli/commands/agent-prompt/build-and-verify.md +7 -4
- package/dist/src/cli/dev/tui/agent-header.js +1 -1
- package/dist/src/context/build-dynamic-tools.js +1 -1
- package/dist/src/context/dynamic-tool-lifecycle.js +1 -1
- package/dist/src/context/keys.d.ts +1 -0
- package/dist/src/execution/create-session-step.d.ts +0 -17
- package/dist/src/execution/create-session-step.js +1 -1
- package/dist/src/execution/eve-workflow-attributes.d.ts +1 -1
- package/dist/src/execution/sandbox/prewarm.js +1 -1
- package/dist/src/execution/workflow-entry.js +1 -1
- package/dist/src/execution/workflow-runtime.d.ts +10 -2
- package/dist/src/execution/workflow-runtime.js +1 -1
- package/dist/src/execution/workflow-steps.js +1 -1
- package/dist/src/harness/tool-loop.js +1 -1
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/internal/authored-definition/connection.js +1 -1
- package/dist/src/public/channels/slack/interactions.js +1 -1
- package/dist/src/runtime/attributes/emit.d.ts +2 -43
- package/dist/src/runtime/attributes/emit.js +1 -1
- package/dist/src/runtime/attributes/normalize.d.ts +17 -0
- package/dist/src/runtime/attributes/normalize.js +1 -0
- package/dist/src/runtime/connections/principal.js +1 -1
- package/dist/src/runtime/resolve-agent-graph.js +1 -1
- package/dist/src/runtime/sessions/compiled-agent-cache.js +1 -1
- package/dist/src/setup/primitives/run-vercel.d.ts +8 -0
- package/dist/src/setup/primitives/run-vercel.js +1 -1
- package/dist/src/setup/scaffold/create/project.js +6 -2
- package/dist/src/setup/scaffold/create/web-template.d.ts +1 -1
- package/dist/src/setup/scaffold/create/web-template.js +0 -17
- package/docs/README.md +2 -2
- package/docs/channels/linear.mdx +1 -1
- package/docs/connections/mcp.mdx +61 -0
- package/docs/connections/meta.json +4 -0
- package/docs/connections/openapi.mdx +68 -0
- package/docs/{connections.mdx → connections/overview.mdx} +28 -63
- package/docs/getting-started.mdx +0 -6
- package/docs/introduction.mdx +2 -8
- package/docs/reference/typescript-api.md +20 -19
- package/docs/tutorial/connect-a-warehouse.mdx +3 -3
- package/docs/tutorial/ship-it.mdx +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "Connections"
|
|
3
3
|
description: "Expose external MCP and OpenAPI servers to the model, with connection tokens the model never sees."
|
|
4
|
+
url: /connections
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
A connection wires an agent into an external server you don't author, either an MCP server (Linear, GitHub, a warehouse) or any HTTP API with an OpenAPI document. eve handles the parts you'd otherwise hand-roll, discovering the remote tools, surfacing them to the model, and brokering auth.
|
|
@@ -9,23 +10,17 @@ Connections live under `agent/connections/`. The runtime name comes from the fil
|
|
|
9
10
|
|
|
10
11
|
## MCP connections
|
|
11
12
|
|
|
12
|
-
|
|
13
|
+
Use an MCP connection when the external service already exposes an MCP server. The server publishes its tools and schemas, and eve makes the matched tools callable by the model.
|
|
13
14
|
|
|
14
|
-
|
|
15
|
-
import { defineMcpClientConnection } from "eve/connections";
|
|
15
|
+
Read [MCP connections](/docs/connections/mcp) for `defineMcpClientConnection`, transport requirements, and MCP tool filters.
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
auth: {
|
|
21
|
-
getToken: async () => ({ token: process.env.LINEAR_API_TOKEN! }),
|
|
22
|
-
},
|
|
23
|
-
});
|
|
24
|
-
```
|
|
17
|
+
## OpenAPI connections
|
|
18
|
+
|
|
19
|
+
Use an OpenAPI connection when the service exposes an OpenAPI 3.x document. eve turns operations in the document into connection tools, one per operation.
|
|
25
20
|
|
|
26
|
-
|
|
21
|
+
Read [OpenAPI connections](/docs/connections/openapi) for `defineOpenAPIConnection`, `baseUrl`, and operation filters.
|
|
27
22
|
|
|
28
|
-
|
|
23
|
+
## Static-token auth
|
|
29
24
|
|
|
30
25
|
`getToken` returns a `TokenResult` (`{ token, expiresAt? }`), and eve sends it as `Authorization: Bearer <token>` on every request. Because it runs on each connection attempt, you can mint a fresh token from wherever you keep secrets, including an env var, a secrets manager, an internal vault, or your own OAuth exchange. If the token has a known TTL, set `expiresAt` (milliseconds since epoch) and eve refreshes ahead of time rather than waiting for a `401`.
|
|
31
26
|
|
|
@@ -33,24 +28,28 @@ When `getToken` is the only auth, `principalType` defaults to `"app"`: one share
|
|
|
33
28
|
|
|
34
29
|
eve resolves and caches connection tokens per step; they never land in conversation history or reach the model.
|
|
35
30
|
|
|
36
|
-
|
|
31
|
+
## No auth
|
|
37
32
|
|
|
38
33
|
Drop `auth` entirely for servers that need no token, such as a localhost server during development or a public one:
|
|
39
34
|
|
|
40
|
-
```ts
|
|
35
|
+
```ts title="agent/connections/local.ts"
|
|
36
|
+
import { defineMcpClientConnection } from "eve/connections";
|
|
37
|
+
|
|
41
38
|
export default defineMcpClientConnection({
|
|
42
39
|
url: "http://localhost:3001/mcp",
|
|
43
40
|
description: "Local dev server.",
|
|
44
41
|
});
|
|
45
42
|
```
|
|
46
43
|
|
|
47
|
-
|
|
44
|
+
Use no-auth connections only for services that are intentionally public, local-only, or otherwise protected outside eve. Do not use no-auth connections for sensitive third-party services.
|
|
48
45
|
|
|
49
|
-
|
|
46
|
+
## Headers
|
|
50
47
|
|
|
51
|
-
Use `headers` when the server wants a non-Bearer scheme (an API-key header) or extra configuration. Headers stack on top of `auth
|
|
48
|
+
Use `headers` when the server wants a non-Bearer scheme (an API-key header) or extra configuration. Headers stack on top of `auth` and work for both MCP and OpenAPI connections:
|
|
49
|
+
|
|
50
|
+
```ts title="agent/connections/example.ts"
|
|
51
|
+
import { defineMcpClientConnection } from "eve/connections";
|
|
52
52
|
|
|
53
|
-
```ts
|
|
54
53
|
export default defineMcpClientConnection({
|
|
55
54
|
url: "https://example.com/mcp",
|
|
56
55
|
description: "Example service.",
|
|
@@ -58,24 +57,12 @@ export default defineMcpClientConnection({
|
|
|
58
57
|
});
|
|
59
58
|
```
|
|
60
59
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
To narrow which remote tools the model sees, set exactly one of `tools.allow` or `tools.block`. Filtered-out tools do not appear in `connection_search`:
|
|
64
|
-
|
|
65
|
-
```ts
|
|
66
|
-
export default defineMcpClientConnection({
|
|
67
|
-
url: "https://mcp.linear.app/sse",
|
|
68
|
-
description: "Linear: read-only.",
|
|
69
|
-
auth: { getToken: async () => ({ token: process.env.LINEAR_API_TOKEN! }) },
|
|
70
|
-
tools: { allow: ["search_issues", "get_issue"] },
|
|
71
|
-
});
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
### Per-connection approval
|
|
60
|
+
## Per-connection approval
|
|
75
61
|
|
|
76
62
|
To put every tool a connection serves behind a human, use the helpers from `eve/tools/approval`:
|
|
77
63
|
|
|
78
|
-
```ts
|
|
64
|
+
```ts title="agent/connections/linear.ts"
|
|
65
|
+
import { defineMcpClientConnection } from "eve/connections";
|
|
79
66
|
import { once } from "eve/tools/approval";
|
|
80
67
|
|
|
81
68
|
export default defineMcpClientConnection({
|
|
@@ -86,32 +73,9 @@ export default defineMcpClientConnection({
|
|
|
86
73
|
});
|
|
87
74
|
```
|
|
88
75
|
|
|
89
|
-
`never()` lets every call through, `once()` asks for approval the first time in a session, and `always()` asks every time. The pause and resume is the same human-in-the-loop flow covered in [Tools](
|
|
90
|
-
|
|
91
|
-
For connection tools that can create, modify, delete, transmit, purchase, message, or access sensitive data, use approval, tool allow-lists, or other safeguards appropriate to the action.
|
|
92
|
-
|
|
93
|
-
## OpenAPI connections
|
|
94
|
-
|
|
95
|
-
`defineOpenAPIConnection` turns any OpenAPI 3.x document into connection tools, one per operation. Pass an HTTPS URL eve fetches at runtime, or an inline parsed object:
|
|
96
|
-
|
|
97
|
-
```ts title="agent/connections/petstore.ts"
|
|
98
|
-
import { defineOpenAPIConnection } from "eve/connections";
|
|
99
|
-
|
|
100
|
-
export default defineOpenAPIConnection({
|
|
101
|
-
spec: "https://petstore3.swagger.io/api/v3/openapi.json",
|
|
102
|
-
description: "Pet store inventory and orders.",
|
|
103
|
-
auth: { getToken: async () => ({ token: process.env.PETSTORE_TOKEN! }) },
|
|
104
|
-
});
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
Each operation becomes `<connection>__<operationId>` (e.g. `petstore__getInventory`). When an operation has no `operationId`, eve derives a deterministic `<method>_<sanitized-path>` name instead.
|
|
108
|
-
|
|
109
|
-
`auth`, `headers`, and `approval` work exactly as they do for MCP. There are two fields specific to OpenAPI:
|
|
76
|
+
`never()` lets every call through, `once()` asks for approval the first time in a session, and `always()` asks every time. The pause and resume is the same human-in-the-loop flow covered in [Tools](/docs/tools).
|
|
110
77
|
|
|
111
|
-
|
|
112
|
-
| ------------ | ----------------------------------------------------------------------------------------------------------------------- |
|
|
113
|
-
| `baseUrl` | Base URL operation paths resolve against. Optional; defaults to the document's first usable `servers` entry. |
|
|
114
|
-
| `operations` | Filter keyed on `operationId` (`allow` or `block`). Mirrors `tools` on MCP connections, but names operations not tools. |
|
|
78
|
+
For connection tools that can create, modify, delete, transmit, purchase, message, or access sensitive data, use approval, allow-lists, or other safeguards appropriate to the action.
|
|
115
79
|
|
|
116
80
|
## Interactive OAuth via Vercel Connect
|
|
117
81
|
|
|
@@ -128,7 +92,7 @@ export default defineMcpClientConnection({
|
|
|
128
92
|
});
|
|
129
93
|
```
|
|
130
94
|
|
|
131
|
-
`"linear/myagent"` is the UID you chose when registering the Connect client. Connect-managed OAuth is user-scoped by default, so the runtime resolves the per-user token before each tool call. The full setup (Connect client provisioning, project linking, the runtime consent flow) lives in [Auth & route protection](
|
|
95
|
+
`"linear/myagent"` is the UID you chose when registering the Connect client. Connect-managed OAuth is user-scoped by default, so the runtime resolves the per-user token before each tool call. The full setup (Connect client provisioning, project linking, the runtime consent flow) lives in [Auth & route protection](/docs/guides/auth-and-route-protection).
|
|
132
96
|
|
|
133
97
|
## Self-hosted interactive OAuth
|
|
134
98
|
|
|
@@ -236,7 +200,8 @@ A tool can require both sign-in (`auth`) and a human approval. The model's appro
|
|
|
236
200
|
|
|
237
201
|
## What to read next
|
|
238
202
|
|
|
203
|
+
- [MCP connections](/docs/connections/mcp): connect to remote MCP servers.
|
|
204
|
+
- [OpenAPI connections](/docs/connections/openapi): generate tools from OpenAPI operations.
|
|
239
205
|
- [Integrations](/integrations): browse every channel and connection eve ships, in one gallery.
|
|
240
|
-
- [Tools](
|
|
241
|
-
- [
|
|
242
|
-
- [Security model](./concepts/security-model): how connection credentials stay out of the model's reach.
|
|
206
|
+
- [Tools](/docs/tools): authored tools live alongside connection-provided tools; the same approval helpers apply.
|
|
207
|
+
- [Security model](/docs/concepts/security-model): how connection credentials stay out of the model's reach.
|
package/docs/getting-started.mdx
CHANGED
|
@@ -5,12 +5,6 @@ description: "Install eve, scaffold your first agent, give it a tool, and run it
|
|
|
5
5
|
|
|
6
6
|
eve is a filesystem-first framework for durable agents. You write capabilities under `agent/`, and eve runs the model loop, persists every session, and serves the agent over HTTP and platform channels. You'll scaffold an app, add a tool, run it locally, then create, stream, and continue a session over HTTP.
|
|
7
7
|
|
|
8
|
-
<Callout>
|
|
9
|
-
eve is currently in beta and subject to the [Vercel beta
|
|
10
|
-
terms](https://vercel.com/docs/release-phases/public-beta-agreement); the framework, APIs,
|
|
11
|
-
documentation, and behavior may change before general availability.
|
|
12
|
-
</Callout>
|
|
13
|
-
|
|
14
8
|
## Prerequisites
|
|
15
9
|
|
|
16
10
|
- Node 24 or newer
|
package/docs/introduction.mdx
CHANGED
|
@@ -7,12 +7,6 @@ eve is a framework for building durable agents as ordinary files in a TypeScript
|
|
|
7
7
|
|
|
8
8
|
Instead of one large configuration object, each part of your agent gets a clear home. Instructions go in one file, tools in one folder, channels in another. eve discovers that structure and turns it into an agent that runs locally, serves HTTP, connects to other platforms, and keeps working across many turns.
|
|
9
9
|
|
|
10
|
-
<Callout>
|
|
11
|
-
eve is currently in beta and subject to the [Vercel beta
|
|
12
|
-
terms](https://vercel.com/docs/release-phases/public-beta-agreement); the framework, APIs,
|
|
13
|
-
documentation, and behavior may change before general availability.
|
|
14
|
-
</Callout>
|
|
15
|
-
|
|
16
10
|
## An eve project at a glance
|
|
17
11
|
|
|
18
12
|
A small eve app looks like this:
|
|
@@ -90,7 +84,7 @@ As the agent grows, each concern still has a predictable home:
|
|
|
90
84
|
|
|
91
85
|
| Path | Add it when you need... |
|
|
92
86
|
| ------------------------------- | ------------------------------------------------ |
|
|
93
|
-
| [`connections/`](./connections) | Tools from external MCP
|
|
87
|
+
| [`connections/`](./connections) | Tools from external MCP or OpenAPI services |
|
|
94
88
|
| [`hooks/`](./guides/hooks) | Code that reacts to lifecycle and stream events |
|
|
95
89
|
| [`sandbox/`](./sandbox) | A controlled workspace for files and commands |
|
|
96
90
|
| [`subagents/`](./subagents) | Specialist agents the root agent can delegate to |
|
|
@@ -105,5 +99,5 @@ The result stays readable before it runs. The directory tells you what the agent
|
|
|
105
99
|
- [Tools](./tools): the typed actions your agent calls
|
|
106
100
|
- [Instructions](./instructions): the always-on system prompt that shapes behavior
|
|
107
101
|
- [Channels](./channels/overview): reach the agent from Slack, Discord, or a web UI
|
|
108
|
-
- [Connections](./connections): pull in tools from external
|
|
102
|
+
- [Connections](./connections): pull in tools from external services
|
|
109
103
|
- [Project layout](./reference/project-layout): every authored slot under `agent/`
|
|
@@ -30,25 +30,26 @@ export default defineTool({
|
|
|
30
30
|
|
|
31
31
|
## The define\* helpers
|
|
32
32
|
|
|
33
|
-
| Helper
|
|
34
|
-
|
|
|
35
|
-
| `defineAgent`
|
|
36
|
-
| `defineTool`
|
|
37
|
-
| `defineDynamic`
|
|
38
|
-
| `defineMcpClientConnection
|
|
39
|
-
| `
|
|
40
|
-
| `
|
|
41
|
-
| `
|
|
42
|
-
| `
|
|
43
|
-
| `
|
|
44
|
-
| `
|
|
45
|
-
| `
|
|
46
|
-
| `
|
|
47
|
-
| `
|
|
48
|
-
| `
|
|
49
|
-
| `
|
|
50
|
-
| `
|
|
51
|
-
| `
|
|
33
|
+
| Helper | Import from | Authored at | Guide |
|
|
34
|
+
| ----------------------------------------------------- | --------------------------------------------- | ------------------------------------ | ------------------------------------------------------ |
|
|
35
|
+
| `defineAgent` | `eve` | `agent/agent.ts` | [agent.ts](../agent-config) |
|
|
36
|
+
| `defineTool` | `eve/tools` | `agent/tools/<name>.ts` | [Tools](../tools) |
|
|
37
|
+
| `defineDynamic` | `eve/tools`, `eve/skills`, `eve/instructions` | `agent/{tools,skills,instructions}/` | [Dynamic capabilities](../guides/dynamic-capabilities) |
|
|
38
|
+
| `defineMcpClientConnection` | `eve/connections` | `agent/connections/<name>.ts` | [MCP connections](../connections/mcp) |
|
|
39
|
+
| `defineOpenAPIConnection` | `eve/connections` | `agent/connections/<name>.ts` | [OpenAPI connections](../connections/openapi) |
|
|
40
|
+
| `defineChannel` | `eve/channels` | `agent/channels/<name>.ts` | [Custom channels](../channels/custom) |
|
|
41
|
+
| `eveChannel`, `slackChannel`, and the other platforms | `eve/channels/<platform>` | `agent/channels/<platform>.ts` | [Channels](../channels/overview) |
|
|
42
|
+
| `defineSkill` | `eve/skills` | `agent/skills/<name>.ts` | [Skills](../skills) |
|
|
43
|
+
| `defineInstructions` | `eve/instructions` | `agent/instructions.ts` | [Instructions](../instructions) |
|
|
44
|
+
| `defineHook` | `eve/hooks` | `agent/hooks/<slug>.ts` | [Hooks](../guides/hooks) |
|
|
45
|
+
| `defineSchedule` | `eve/schedules` | `agent/schedules/<name>.ts` | [Schedules](../schedules) |
|
|
46
|
+
| `defineState` | `eve/context` | tools, hooks, lifecycle | [Session context](../guides/session-context) |
|
|
47
|
+
| `defineSandbox` | `eve/sandbox` | `agent/sandbox.ts` | [Sandbox](../sandbox) |
|
|
48
|
+
| `defineInstrumentation` | `eve/instrumentation` | `agent/instrumentation.ts` | [instrumentation.ts](../guides/instrumentation) |
|
|
49
|
+
| `defineRemoteAgent` | `eve` | `agent/subagents/<id>/agent.ts` | [Remote agents](../guides/remote-agents) |
|
|
50
|
+
| `defineEval` | `eve/evals` | `evals/*.eval.ts` | [Evals](../evals/overview) |
|
|
51
|
+
| `defineEvalConfig` | `eve/evals` | `evals/evals.config.ts` | [Evals](../evals/overview) |
|
|
52
|
+
| `useEveAgent` | `eve/react`, `eve/vue`, `eve/svelte` | frontend | [Frontend](../guides/frontend/overview) |
|
|
52
53
|
|
|
53
54
|
A few non-`define*` helpers round out the set: `disableTool` and `ExperimentalWorkflow` from `eve/tools` (see [Default harness](../concepts/default-harness)), the route verbs `GET`/`POST`/`PUT`/`PATCH`/`DELETE`/`WS` from `eve/channels`, the approval predicates `always`/`once`/`never` from `eve/tools/approval`, and the channel auth helpers `localDev`/`vercelOidc`/`placeholderAuth` from `eve/channels/auth`. To wrap a built-in tool, import its default value from `eve/tools/defaults` (`bash`, `readFile`, `writeFile`, `glob`, `grep`, `webFetch`, `webSearch`, `todo`, `loadSkill`). `AgentWorkflowDefinition` and `AgentWorkflowWorldDefinition` are exported from `eve` for the `defineAgent({ experimental: { workflow } })` config shape.
|
|
54
55
|
|
|
@@ -33,7 +33,7 @@ Once Connect is enabled on your account, wire it up:
|
|
|
33
33
|
3. Link the client to your project.
|
|
34
34
|
4. Run `vercel link` and `vercel env pull` so `VERCEL_OIDC_TOKEN` is available locally.
|
|
35
35
|
|
|
36
|
-
For the full reference, see [
|
|
36
|
+
For the full reference, see [MCP connections](../connections/mcp).
|
|
37
37
|
|
|
38
38
|
## What the user sees
|
|
39
39
|
|
|
@@ -49,8 +49,8 @@ The first time, the model picks a warehouse tool but there's no token yet, so th
|
|
|
49
49
|
|
|
50
50
|
Right before each request to the MCP server, eve resolves the bearer and sends it as `Authorization: Bearer <token>`. The model only ever sees tool names, descriptions, and results. The credential stays out of its reach.
|
|
51
51
|
|
|
52
|
-
If you want more control, gate the connection behind approval (`approval: once()`) or narrow which tools the model sees (`tools.allow`). See [
|
|
52
|
+
If you want more control, gate the connection behind approval (`approval: once()`) or narrow which tools the model sees (`tools.allow`). See [MCP connections](../connections/mcp).
|
|
53
53
|
|
|
54
54
|
→ Next: [Run analysis](./run-analysis)
|
|
55
55
|
|
|
56
|
-
Learn more: [
|
|
56
|
+
Learn more: [MCP connections](../connections/mcp) · [Auth and route protection](../guides/auth-and-route-protection)
|
|
@@ -148,7 +148,7 @@ Across the nine steps you built and shipped one agent, and along the way you use
|
|
|
148
148
|
|
|
149
149
|
## Next steps
|
|
150
150
|
|
|
151
|
-
- [
|
|
151
|
+
- [MCP connections](../connections/mcp) for tool allowlists and per-connection approval.
|
|
152
152
|
- [Sandbox](../sandbox) for backends, lifecycle, and network policy.
|
|
153
153
|
- [Dynamic capabilities](../guides/dynamic-capabilities) for schema-derived dynamic tools, a read-only analyst subagent, and model-authored report workflows on this same example.
|
|
154
154
|
- [Auth and route protection](../guides/auth-and-route-protection) for production auth patterns.
|