eve 0.26.1 → 0.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/src/chunks/{use-eve-agent-CruinZmd.js → use-eve-agent-AeQLLhu9.js} +118 -92
  3. package/dist/src/chunks/{use-eve-agent-BkztZA0v.js → use-eve-agent-PMY2WkAt.js} +118 -92
  4. package/dist/src/cli/commands/info.d.ts +2 -0
  5. package/dist/src/cli/commands/info.js +1 -1
  6. package/dist/src/client/message-action-parts.d.ts +43 -0
  7. package/dist/src/client/message-action-parts.js +1 -0
  8. package/dist/src/client/message-reducer.js +1 -1
  9. package/dist/src/compiled/.vendor-stamp.json +4 -4
  10. package/dist/src/compiled/@chat-adapter/slack/blocks.d.ts +47 -2
  11. package/dist/src/compiled/@chat-adapter/slack/blocks.js +10 -8
  12. package/dist/src/compiled/@chat-adapter/slack/index.d.ts +168 -8
  13. package/dist/src/compiled/@chat-adapter/slack/index.js +28 -28
  14. package/dist/src/compiled/@chat-adapter/slack/{types-AntsVifS.d.ts → types-CdGmMyOr.d.ts} +1 -1
  15. package/dist/src/compiled/@chat-adapter/slack/webhook.d.ts +2 -2
  16. package/dist/src/compiled/@chat-adapter/twilio/index.d.ts +1 -1
  17. package/dist/src/compiled/@chat-adapter/twilio/index.js +1 -1
  18. package/dist/src/compiled/@chat-adapter/twilio/webhook.d.ts +2 -2
  19. package/dist/src/compiled/@vercel/sandbox/index.js +12 -12
  20. package/dist/src/compiled/_chunks/node/{auth-Cuszvn7l.js → auth-BuQkq4Gr.js} +2 -2
  21. package/dist/src/compiled/_chunks/node/{dist-CdH_Yoxt.js → dist-BweCayKF.js} +42 -35
  22. package/dist/src/compiled/_chunks/node/{dist-Drt-_JVK.js → dist-DvkWiagq.js} +6 -4
  23. package/dist/src/compiled/chat/index.d.ts +17 -6
  24. package/dist/src/compiled/chat/index.js +1 -1
  25. package/dist/src/compiled/chat/{jsx-runtime-CzthIo1o.d.ts → jsx-runtime-_JEEAotp.d.ts} +125 -5
  26. package/dist/src/compiler/model-catalog.js +1 -1
  27. package/dist/src/evals/autoevals-client.js +1 -1
  28. package/dist/src/execution/sandbox/bindings/vercel-credentials.js +1 -1
  29. package/dist/src/execution/sandbox/bindings/vercel-lookup.js +1 -1
  30. package/dist/src/execution/session.d.ts +0 -2
  31. package/dist/src/execution/session.js +1 -1
  32. package/dist/src/execution/skills/instructions.d.ts +3 -3
  33. package/dist/src/execution/skills/instructions.js +2 -2
  34. package/dist/src/execution/workflow-steps.js +1 -1
  35. package/dist/src/harness/compaction-prompt.d.ts +19 -1
  36. package/dist/src/harness/compaction-prompt.js +7 -5
  37. package/dist/src/harness/compaction.d.ts +4 -11
  38. package/dist/src/harness/compaction.js +1 -1
  39. package/dist/src/harness/messages.d.ts +7 -0
  40. package/dist/src/harness/messages.js +1 -1
  41. package/dist/src/harness/prompt-cache.d.ts +16 -5
  42. package/dist/src/harness/prompt-cache.js +1 -1
  43. package/dist/src/harness/stale-input-responses.js +2 -2
  44. package/dist/src/harness/token-estimate.d.ts +9 -0
  45. package/dist/src/harness/token-estimate.js +1 -0
  46. package/dist/src/harness/tool-loop.js +2 -2
  47. package/dist/src/internal/application/compiled-artifacts.js +9 -3
  48. package/dist/src/internal/application/package.js +1 -1
  49. package/dist/src/internal/gateway.d.ts +19 -0
  50. package/dist/src/internal/gateway.js +1 -0
  51. package/dist/src/internal/nitro/host/copy-host-middleware.js +1 -1
  52. package/dist/src/internal/user-agent.d.ts +11 -0
  53. package/dist/src/internal/user-agent.js +1 -0
  54. package/dist/src/public/channels/auth.d.ts +59 -9
  55. package/dist/src/public/channels/auth.js +1 -1
  56. package/dist/src/public/next/index.js +1 -1
  57. package/dist/src/public/nuxt/index.d.ts +1 -1
  58. package/dist/src/public/nuxt/index.js +1 -1
  59. package/dist/src/public/nuxt/module.d.ts +10 -24
  60. package/dist/src/public/nuxt/module.js +1 -1
  61. package/dist/src/public/nuxt/routing.d.ts +5 -39
  62. package/dist/src/public/nuxt/routing.js +1 -1
  63. package/dist/src/public/nuxt/vercel-services.d.ts +117 -0
  64. package/dist/src/public/nuxt/vercel-services.js +1 -0
  65. package/dist/src/public/tools/defaults.d.ts +3 -3
  66. package/dist/src/runtime/framework-tools/index.d.ts +3 -2
  67. package/dist/src/runtime/framework-tools/index.js +1 -1
  68. package/dist/src/runtime/framework-tools/skill.d.ts +6 -1
  69. package/dist/src/runtime/framework-tools/skill.js +1 -1
  70. package/dist/src/runtime/framework-tools/todo.js +1 -1
  71. package/dist/src/runtime/governance/auth/http-basic.js +1 -1
  72. package/dist/src/runtime/resolve-agent-graph.js +1 -1
  73. package/dist/src/setup/boxes/select-model.js +1 -1
  74. package/dist/src/setup/gateway-models.js +1 -1
  75. package/dist/src/setup/scaffold/create/project.js +1 -1
  76. package/dist/src/setup/validate-gateway-key.js +1 -1
  77. package/dist/src/{public/next → shared}/resolve-eve-binary.d.ts +1 -1
  78. package/dist/src/svelte/index.js +1 -1
  79. package/dist/src/svelte/use-eve-agent.js +1 -1
  80. package/dist/src/vue/index.js +1 -1
  81. package/dist/src/vue/use-eve-agent.js +1 -1
  82. package/docs/concepts/sessions-runs-and-streaming.md +7 -7
  83. package/docs/extensions.md +115 -77
  84. package/docs/guides/auth-and-route-protection.md +14 -1
  85. package/docs/guides/frontend/nuxt.mdx +22 -1
  86. package/docs/meta.json +1 -0
  87. package/docs/reference/cli.md +1 -1
  88. package/docs/schedules.mdx +1 -1
  89. package/docs/skills.mdx +1 -1
  90. package/package.json +5 -5
  91. package/dist/src/execution/sandbox/bindings/vercel-user-agent.d.ts +0 -6
  92. package/dist/src/execution/sandbox/bindings/vercel-user-agent.js +0 -1
  93. package/dist/src/execution/workflow-skill-root.d.ts +0 -6
  94. package/dist/src/execution/workflow-skill-root.js +0 -1
  95. package/dist/src/public/nuxt/vercel-json.d.ts +0 -17
  96. package/dist/src/public/nuxt/vercel-json.js +0 -1
  97. /package/dist/src/{public/next → shared}/resolve-eve-binary.js +0 -0
@@ -19,7 +19,7 @@ React, Vue, and Svelte apps reach for [`useEveAgent()`](../guides/frontend/overv
19
19
  ## Start a session
20
20
 
21
21
  ```bash
22
- curl -X POST http://127.0.0.1:3000/eve/v1/session \
22
+ curl -X POST http://127.0.0.1:2000/eve/v1/session \
23
23
  -H 'content-type: application/json' \
24
24
  -d '{"message":"Summarize the latest forecast."}'
25
25
  ```
@@ -29,7 +29,7 @@ eve responds right away. The JSON body carries a `sessionId` and a `continuation
29
29
  ## Stream a session
30
30
 
31
31
  ```bash
32
- curl http://127.0.0.1:3000/eve/v1/session/<sessionId>/stream
32
+ curl http://127.0.0.1:2000/eve/v1/session/<sessionId>/stream
33
33
  ```
34
34
 
35
35
  The stream is newline-delimited JSON (NDJSON), one event per line:
@@ -78,7 +78,7 @@ A delegated subagent publishes progress on its own child-session stream. The par
78
78
  Once the session is waiting (you'll see `session.waiting`), POST your follow-up to the session endpoint with `event.data.continuationToken`:
79
79
 
80
80
  ```bash
81
- curl -X POST http://127.0.0.1:3000/eve/v1/session/<sessionId> \
81
+ curl -X POST http://127.0.0.1:2000/eve/v1/session/<sessionId> \
82
82
  -H 'content-type: application/json' \
83
83
  -d '{"continuationToken":"<token>","message":"Now send the short version."}'
84
84
  ```
@@ -100,7 +100,7 @@ For deterministic ordering, send one follow-up at a time and wait for the next `
100
100
  POST to the session's cancel endpoint to stop the turn that is currently running. The body is optional; pass `turnId` (stamped on every turn-scoped stream event) to scope the cancel to the turn you observed:
101
101
 
102
102
  ```bash
103
- curl -X POST http://127.0.0.1:3000/eve/v1/session/<sessionId>/cancel
103
+ curl -X POST http://127.0.0.1:2000/eve/v1/session/<sessionId>/cancel
104
104
  # {"ok":true,"sessionId":"<sessionId>","status":"accepted"}
105
105
  ```
106
106
 
@@ -113,13 +113,13 @@ Custom channel routes request the same cancellation without knowing the session
113
113
  The stream is durable. Every event is recorded before a step completes, so consumers can reconnect from their cursor when an HTTP connection ends. A nonnegative `startIndex` is an absolute event count: use it to pick up where you dropped off or pass `0` to rewind to the start.
114
114
 
115
115
  ```bash
116
- curl "http://127.0.0.1:3000/eve/v1/session/<sessionId>/stream?startIndex=<count>"
116
+ curl "http://127.0.0.1:2000/eve/v1/session/<sessionId>/stream?startIndex=<count>"
117
117
  ```
118
118
 
119
119
  A negative `startIndex` reads relative to the stream's current tail. For example, `-1` reads the latest event, which is normally `session.waiting` for a resumable session:
120
120
 
121
121
  ```bash
122
- curl "http://127.0.0.1:3000/eve/v1/session/<sessionId>/stream?startIndex=-1"
122
+ curl "http://127.0.0.1:2000/eve/v1/session/<sessionId>/stream?startIndex=-1"
123
123
  ```
124
124
 
125
125
  This gives a consumer that only persisted `sessionId` a lightweight way to recover the current `continuationToken`. Because a tail-relative position does not resolve to an absolute consumed-event count, client tail reads do not automatically reconnect or advance the stored cursor.
@@ -135,7 +135,7 @@ Start with the [TypeScript SDK](../guides/client/overview) guide. It covers basi
135
135
  `GET /eve/v1/info` returns a JSON inspection snapshot for the running agent: model, instructions, authored and framework tools, skills, channels, schedules, subagents, sandbox, connections, hooks, workflow, and workspace metadata. It uses the resolved `eveChannel()` route auth when `agent/channels/eve.ts` authors one; otherwise it falls back to the framework default of Vercel OIDC plus local development access.
136
136
 
137
137
  ```bash
138
- curl http://127.0.0.1:3000/eve/v1/info
138
+ curl http://127.0.0.1:2000/eve/v1/info
139
139
  ```
140
140
 
141
141
  With the default auth chain (`[vercelOidc(), localDev()]`), a local Vercel OIDC bearer takes precedence and other local requests fall back to development access. A deployed Vercel target requires a valid OIDC bearer, with a same-project bypass for in-deployment callers. See [auth & route protection](../guides/auth-and-route-protection).
@@ -1,39 +1,48 @@
1
1
  ---
2
2
  title: "Extensions"
3
- description: "Package tools, connections, skills, and hooks as a reusable package and mount it into an agent."
3
+ description: "Publish reusable eve capabilities as an npm package, then install and mount them in an agent."
4
4
  ---
5
5
 
6
- An extension packages eve capabilities — tools, connections, skills, instructions, hooks as a reusable npm or local package. You author it as an agent-shaped directory; a consuming agent mounts it under `agent/extensions/`, and its contributions compose into the agent under a namespace. Nothing is copied — upgrades come through the package manager.
6
+ Extensions package eve tools, connections, skills, instruction fragments, and hooks. A publisher builds and distributes a package; a consumer installs it and mounts it in an agent.
7
7
 
8
- ## Authoring
8
+ This enables sharing many different capability sets. A browser extension might include several tools for navigating a site. A memory extension could use hooks to capture context and tools to recall it. A self-improving extension could pair hooks with dynamic instructions.
9
9
 
10
- Start from a scaffold:
10
+ ## Publisher: create and publish an extension
11
+
12
+ ### Create the package
13
+
14
+ Start with the extension scaffold:
11
15
 
12
16
  ```bash
13
17
  npx eve@latest extension init my-crm
14
18
  ```
15
19
 
16
- This creates the package, installs dependencies, and initializes Git. You get `extension/extension.ts`, TypeScript config, and a `package.json` ready to publish or mount. Add tools, skills, hooks, and connections under `extension/` yourself.
20
+ The command creates the package, installs dependencies, and initializes Git. It includes `extension/extension.ts`, TypeScript configuration, and the package metadata required to build and publish.
17
21
 
18
- An extension is an agent-shaped directory without `agent.ts` or `sandbox` (those belong to the consuming agent). Every slot works as it does in an agent, with names derived from paths.
22
+ An extension uses the same file conventions as an agent for its contributions:
19
23
 
20
24
  ```
21
25
  @acme/crm/
22
26
  package.json
23
27
  extension/
24
- extension.ts # the extension declaration — see Configuration
28
+ extension.ts
25
29
  tools/search.ts
26
30
  connections/api.ts
27
31
  skills/triage/SKILL.md
32
+ instructions.md
28
33
  hooks/audit.ts
29
- lib/http.ts # shared helpers, imported as ../lib/http
34
+ lib/http.ts
30
35
  ```
31
36
 
32
- Name tools and connections for what they do (`search`, not `crm_search`) the mount supplies the namespace. Shared code goes in `extension/lib/`, imported by relative path eve compiles the source, so relative imports need no `.js` extension.
37
+ Each listed slot accepts the same authored forms as its agent counterpart. Static and dynamic tools, skills, and instructions all work in an extension: `extension/instructions.ts` is as valid as `extension/instructions.md`, and `extension/tools/` can contain `defineDynamic(...)`.
38
+
39
+ Names come from paths, so call the tool `search`, not `crm_search`; the consumer's mount adds the `crm__` prefix. Keep shared code in `extension/lib/`.
33
40
 
34
- ### Configuration
41
+ Keep agent configuration, sandboxes, schedules, and nested extensions in the consumer's agent.
35
42
 
36
- Declare the extension in `extension/extension.ts` with `defineExtension`; its default export is the mount factory a consumer calls. Pass `config` — any [Standard Schema](https://standardschema.dev) (a Zod object here), like a tool's `inputSchema` — to accept consumer settings:
43
+ ### Add configuration and contributions
44
+
45
+ The publisher's `extension/extension.ts` default-exports a `defineExtension` handle. Give it a [Standard Schema](https://standardschema.dev) when consumers need to provide settings:
37
46
 
38
47
  ```ts title="extension/extension.ts"
39
48
  import { defineExtension } from "eve/extension";
@@ -42,40 +51,41 @@ import { z } from "zod";
42
51
  export default defineExtension({
43
52
  config: z.object({
44
53
  apiKey: z.string(),
45
- baseUrl: z.string().default("https://api.acme.example"),
54
+ baseUrl: z.string().url().default("https://api.acme.example"),
46
55
  }),
47
56
  });
48
57
  ```
49
58
 
50
- Config is optional `defineExtension()` with no schema. Read it off the handle, imported from the declaration; it's typed from the schema:
59
+ Contributions import that handle to read the validated configuration. Defaults have already been applied:
51
60
 
52
61
  ```ts title="extension/tools/search.ts"
53
62
  import { defineTool } from "eve/tools";
63
+ import { z } from "zod";
54
64
 
55
65
  import extension from "../extension";
56
66
 
57
67
  export default defineTool({
58
68
  description: "Search the CRM.",
59
- inputSchema: {/* ... */},
69
+ inputSchema: z.object({ query: z.string() }),
60
70
  async execute({ query }) {
61
- const { apiKey, baseUrl } = extension.config; // validated, defaults applied
71
+ const { apiKey, baseUrl } = extension.config;
72
+ return { query, baseUrl, authenticated: apiKey.length > 0 };
62
73
  },
63
74
  });
64
75
  ```
65
76
 
66
- Config is bound once when the consumer mounts the extension and stays constant for the session; per-request values belong in connection auth instead.
77
+ If no configuration is needed, export `defineExtension()` and let consumers re-export it directly. Config schemas must validate synchronously.
67
78
 
68
- ### State
79
+ `defineState` is automatically scoped to the publisher's package, so the same state name does not collide with the consumer or another extension.
69
80
 
70
- `defineState` is scoped to the extension's package automatically, so identically-named state never collides with the consuming agent or another extension. Author it exactly as in an agent — `defineState("budget", …)`.
81
+ ### Build and publish
71
82
 
72
- ## Publishing
73
-
74
- Declare separate authoring and distribution roots and run `eve extension build` (wired to `build`/`prepare`):
83
+ The scaffold's `package.json` declares separate source and distribution roots:
75
84
 
76
85
  ```jsonc title="package.json"
77
86
  {
78
- "name": "@acme/crm",
87
+ "name": "my-crm",
88
+ "version": "0.0.0",
79
89
  "type": "module",
80
90
  "eve": {
81
91
  "extension": {
@@ -84,86 +94,105 @@ Declare separate authoring and distribution roots and run `eve extension build`
84
94
  },
85
95
  },
86
96
  "files": ["dist"],
87
- "peerDependencies": { "eve": "*" },
88
- "devDependencies": { "eve": "x.y.z", "typescript": "^x" },
89
- "dependencies": { "zod": "^3" },
90
- "scripts": { "build": "eve extension build", "prepare": "eve extension build" },
91
- }
92
- ```
93
-
94
- Author the source with `moduleResolution: "bundler"` — eve compiles it, so relative imports need no `.js` extension:
95
-
96
- ```jsonc title="tsconfig.json"
97
- {
98
- "compilerOptions": {
99
- "module": "esnext",
100
- "moduleResolution": "bundler",
101
- "strict": true,
102
- "noEmit": true,
103
- "types": ["node"],
97
+ "exports": {
98
+ ".": {
99
+ "types": "./dist/index.d.ts",
100
+ "default": "./dist/index.mjs",
101
+ },
102
+ "./tools": {
103
+ "types": "./dist/tools/index.d.ts",
104
+ "default": "./dist/tools/index.mjs",
105
+ },
106
+ },
107
+ "scripts": {
108
+ "build": "eve extension build",
109
+ "prepare": "eve extension build",
110
+ "typecheck": "tsc",
111
+ },
112
+ "dependencies": {
113
+ "zod": "^x",
114
+ },
115
+ "devDependencies": {
116
+ "@types/node": "^x",
117
+ "eve": "x.y.z",
118
+ "typescript": "^x",
119
+ },
120
+ "peerDependencies": {
121
+ "eve": "*",
122
+ },
123
+ "engines": {
124
+ "node": ">=24",
104
125
  },
105
- "include": ["extension/**/*.ts"],
106
126
  }
107
127
  ```
108
128
 
109
- `eve extension build` transforms every JavaScript or TypeScript module into an agent-shaped `dist/extension` tree, copies skill packages and their assets, emits type declarations, and writes `dist/extension/_manifest.json`. The generated package entrypoints (`dist/index.mjs` and `dist/tools/index.mjs`) re-export those same dist modules, and the build fills the `exports` map so you never hand-list it. The published package therefore needs `dist/`, not the author's original TypeScript. Consumers read only `eve.extension.dist`, so a published package may omit `eve.extension.source`; keep `source` declared wherever `eve extension build` runs.
129
+ The scaffold omits `engines` when it creates a workspace package.
110
130
 
111
- The build uses the package `tsconfig.json` when it emits declarations. Its `include` must cover every JavaScript or TypeScript module in the extension source (and JavaScript modules require `allowJs`); the build fails before publishing if any distributed module would be missing its declaration.
131
+ Build the package with `eve extension build`:
112
132
 
113
- The manifest contains only its format, the diagnostic eve build version, and the versions of extension capabilities this package actually uses. It does not contain compiled tools, schemas, names, or executable definitions; the consuming eve still discovers and normalizes the agent-shaped dist tree.
133
+ ```bash
134
+ eve extension build
135
+ ```
114
136
 
115
- ### Workspace development
137
+ `eve extension build` writes an agent-shaped `dist/extension` tree, copies skill assets, emits declarations, and records compatibility metadata. It also manages the package exports for the mount factory (`@acme/crm`) and tool definitions (`@acme/crm/tools`). Publish `dist/`; consumers do not need the publisher's TypeScript source.
116
138
 
117
- During local development, `eve dev` automatically rebuilds mounted workspace extensions when their source changes.
139
+ The exact `eve` development pin controls the publisher's authoring API and build tooling. The wildcard peer lets the consumer provide the runtime copy of eve. At consumption time, eve checks generated metadata, not the npm peer range. Do not add eve to regular `dependencies`.
118
140
 
119
- ### Dependencies
141
+ Put runtime packages such as `zod` or an SDK in `dependencies`. If a dependency cannot be bundled, such as a native addon, tell consumers to add it to `build.externalDependencies` in `agent.ts`.
120
142
 
121
- `eve` is a required wildcard **peer** dependency: one eve lives in the consuming app and the extension's `eve/*` imports resolve to it. The extension's concrete eve version belongs in `devDependencies` for authoring types and build tooling. npm peer semver does not decide extension compatibility; eve validates the generated per-capability requirements. Do not mark the eve peer optional and do not add eve to regular `dependencies`.
143
+ Consumers can now add the built package to an agent.
122
144
 
123
- `eve extension init` pins `devDependencies.eve` to the exact eve release that created the scaffold:
145
+ ## Consumer: install and mount an extension
124
146
 
125
- ```jsonc title="package.json"
126
- {
127
- "peerDependencies": { "eve": "*" },
128
- "devDependencies": { "eve": "0.25.0" },
129
- }
130
- ```
131
-
132
- The exact pin makes builds reproducible. Keep it until the extension intentionally upgrades its eve authoring API. `eve extension build` records the capability contracts required by the build, and each consuming eve validates those requirements before it runs the extension.
147
+ A mount gives the publisher's contributions a namespace. Updating the package updates the mounted extension; nothing is copied into the consumer's agent.
133
148
 
134
- If the extension must support an older eve release, replace the development pin with that exact version, then typecheck and build with it. Test the same dist against both the oldest and latest supported consumers; rebuilding with each consumer would produce and test different artifacts.
149
+ ### Install the package
135
150
 
136
- Everything else the extension imports at execution time (SDKs, `zod`, …) goes in `dependencies`; each extension resolves its own versions. Build-only and test-only packages go in `devDependencies`.
151
+ Install the extension in the consumer's agent project:
137
152
 
138
- Those deps resolve from `node_modules` under `eve dev`/`eve eval` and are bundled into the deployable by the consuming agent's `eve build`. A dependency that can't be bundled (a native addon) must be listed in the **consuming agent's** `build.externalDependencies` — an extension can't declare build config, so note it in your README.
153
+ ```bash
154
+ npm install @acme/crm
155
+ ```
139
156
 
140
- ## Mounting
157
+ ### Mount it
141
158
 
142
- A consuming agent mounts an extension under `agent/extensions/` a single file, or a directory when it needs [overrides](#overrides). The namespace is the file basename or directory name; contributions compose as `<namespace>__<name>` (`crm__search`, `crm__api`).
159
+ Create a file under `agent/extensions/`. Its filename becomes the mount namespace. Call the publisher's default export when the extension needs configuration:
143
160
 
144
161
  ```ts title="agent/extensions/crm.ts"
145
162
  import crm from "@acme/crm";
146
163
 
147
- export default crm({ apiKey: process.env.CRM_API_KEY });
164
+ export default crm({ apiKey: process.env.CRM_API_KEY! });
148
165
  ```
149
166
 
150
- A no-config extension takes no factory call mount it with a bare re-export:
167
+ Set `CRM_API_KEY` in the consumer's environment, such as `.env.local` for local development.
168
+
169
+ The mount adds `crm__` to named contributions: `tools/search.ts` becomes `crm__search`, and `connections/api.ts` becomes `crm__api`.
170
+
171
+ For a publisher with no configuration, mount its default export directly:
151
172
 
152
173
  ```ts title="agent/extensions/gizmo.ts"
153
174
  export { default } from "@acme/gizmo";
154
175
  ```
155
176
 
156
- ### Overrides
177
+ The same mount shape works with an npm package, a workspace dependency, or a linked local package.
178
+
179
+ ### Override a contribution
157
180
 
158
- To override a mounted extension's contributions, author the mount as a directory: the declaration in `extension.ts`, override slots alongside it.
181
+ Use a directory mount to replace or remove a publisher contribution. Put the mount declaration in `extension.ts` and add overrides beside it:
159
182
 
160
183
  ```
161
184
  agent/extensions/crm/
162
- extension.ts # export default crm({ apiKey: process.env.CRM_API_KEY })
163
- tools/search.ts # composes as crm__search, shadowing the extension's own
185
+ extension.ts
186
+ tools/search.ts
164
187
  ```
165
188
 
166
- A file in an override slot composes under the mount namespace and wins on a name collision. Name it for the bare contribution name (`search`, not `crm__search`) — the directory supplies the prefix. To tweak the extension's own definition, import and re-define it:
189
+ ```ts title="agent/extensions/crm/extension.ts"
190
+ import crm from "@acme/crm";
191
+
192
+ export default crm({ apiKey: process.env.CRM_API_KEY! });
193
+ ```
194
+
195
+ A same-named consumer tool, connection, or skill wins. To adjust a publisher tool, import it from the package's `./tools` export and define it again:
167
196
 
168
197
  ```ts title="agent/extensions/crm/tools/search.ts"
169
198
  import { search } from "@acme/crm/tools";
@@ -173,7 +202,7 @@ import { always } from "eve/tools/approval";
173
202
  export default defineTool({ ...search, approval: always() });
174
203
  ```
175
204
 
176
- Or drop it entirely by opting out of the slot with `disableTool()`:
205
+ To remove a publisher tool, use `disableTool()` in its matching slot:
177
206
 
178
207
  ```ts title="agent/extensions/crm/tools/search.ts"
179
208
  import { disableTool } from "eve/tools";
@@ -181,13 +210,13 @@ import { disableTool } from "eve/tools";
181
210
  export default disableTool();
182
211
  ```
183
212
 
184
- An override targets one slot, matched by name and kind: a static file replaces the extension's static tool, a dynamic file replaces its dynamic resolver, and `disableTool()` removes whichever the extension put there. Because a dynamic tool wins over a same-named static one at runtime, replace or disable a dynamic tool through its own slot — a static file of the same name won't shadow it.
213
+ Hooks and instruction fragments are additive, so they cannot be replaced. To replace a dynamic tool, use a dynamic definition in the same slot; dynamic tools win over same-named static tools at runtime. `disableTool()` removes either kind.
185
214
 
186
- Overrides only work here — the `<namespace>__` prefix is reserved, so an agent-root contribution named `crm__…` is a build error and an extension can't be shadowed from outside its mount.
215
+ The `crm__` prefix is reserved for this directory mount. A consumer cannot override the extension from `agent/tools/`, `agent/connections/`, or another agent-root slot.
187
216
 
188
- ### Typed tool results
217
+ ### Use a publisher tool result in a hook
189
218
 
190
- A consuming agent can narrow a mounted extension's tool result in a hook: import the tool from the extension's `./tools` export and pass it to [`toolResultFrom`](/guides/hooks#narrowing-tool-results). It matches the namespaced result (`crm__search`) because identity keys off the tool definition, not its name.
219
+ To retain a publisher tool's result type in a consumer hook, import its definition from `./tools` and pass it to [`toolResultFrom`](/guides/hooks#narrowing-tool-results):
191
220
 
192
221
  ```ts title="agent/hooks/narrow-crm.ts"
193
222
  import { defineHook } from "eve/hooks";
@@ -198,14 +227,23 @@ export default defineHook({
198
227
  events: {
199
228
  "action.result"(event) {
200
229
  const match = toolResultFrom(event.data.result, search);
201
- if (match) console.log(match.output); // typed as search's output
230
+ if (match) console.log(match.output);
202
231
  },
203
232
  },
204
233
  });
205
234
  ```
206
235
 
207
- Matching keys off the tool's description, so keep extension tool descriptions distinct one shared with another tool makes the identity ambiguous and `toolResultFrom` stops matching.
236
+ `toolResultFrom` recognizes the mounted `crm__search` result from the original definition, not the namespaced string. Publishers should keep tool descriptions distinct so eve can assign each definition an unambiguous identity.
237
+
238
+ ### Compatibility
239
+
240
+ At build time, eve checks the publisher's generated capability metadata. If the extension needs an unsupported capability contract, upgrade eve or install a compatible extension release.
208
241
 
209
- ## Limits
242
+ ## What to read next
210
243
 
211
- An extension cannot declare a `sandbox`, agent config, schedules, or limits, and cannot mount other extensions — those are the consuming agent's to own (background scheduling, for instance, runs on the agent's deployment under its limits). An extension's tools run within the consuming agent's per-session limits.
244
+ - [Tools](/docs/tools): static tools, approval, and tool output
245
+ - [Dynamic capabilities](/docs/guides/dynamic-capabilities): dynamic tools, skills, and instructions
246
+ - [Instructions](/docs/instructions): static and TypeScript instructions
247
+ - [Skills](/docs/skills): package procedures and supporting files
248
+ - [Connections](/docs/connections): integrate external services
249
+ - [Hooks](/docs/guides/hooks): observe agent events
@@ -41,7 +41,7 @@ export default eveChannel({
41
41
  - returns `null` / `undefined`: skip to the next entry
42
42
  - **throws**: reject with a specific status
43
43
 
44
- If every entry skips, the request gets a `401`. An empty array `auth: []` rejects everything.
44
+ If every entry skips, the request gets a `401` whose `WWW-Authenticate` header advertises the challenge scheme(s) the configured entries declare — `Basic` for `httpBasic()`, `Bearer` for the token-based helpers (`jwtHmac`, `jwtEcdsa`, `oidc`, `vercelOidc`), both when you mix them, and `Bearer` as a fallback for entries that don't declare a scheme (custom `AuthFn`s, or an empty array). See [`withAuthChallenges`](#custom-verifiers) to declare a scheme on a custom `AuthFn`.
45
45
 
46
46
  ```ts
47
47
  import { type AuthFn, localDev, vercelOidc } from "eve/channels/auth";
@@ -96,6 +96,8 @@ Any other thrown error follows the normal channel failure path. When building a
96
96
  | `jwtEcdsa(...)` | You verify asymmetric JWTs minted by another system. |
97
97
  | `oidc(...)` | You want eve to verify OIDC-issued tokens from an arbitrary issuer. |
98
98
 
99
+ `httpBasic(credentials, { realm })` accepts an optional `realm`, rendered on the `WWW-Authenticate: Basic` challenge (e.g. `Basic realm="agent", charset="UTF-8"`) so browsers label their native login prompt. It defaults to `"eve"`, ensuring every Basic challenge includes the required realm. Usernames and passwords are normalized to Unicode NFC before comparison, matching the advertised UTF-8 credential encoding.
100
+
99
101
  Exercise caution for agents that process non-public, sensitive, regulated, or production data unless you have implemented other access controls.
100
102
 
101
103
  ### `localDev()`
@@ -131,6 +133,17 @@ vercelOidc({
131
133
 
132
134
  When none of the shipped helpers fit, write your own `AuthFn` (the array example above) or call the low-level verifiers directly. Each verifier is the pure function sitting behind the matching strategy helper, and returns `{ ok: true, sessionAuth }` or `{ ok: false }`:
133
135
 
136
+ A custom `AuthFn` doesn't declare a `WWW-Authenticate` scheme by default, so `routeAuth` falls back to `Bearer` for it. Wrap it with `withAuthChallenges(fn, challenges)` to declare the scheme(s) it actually satisfies, so a mixed `auth` array produces an accurate 401:
137
+
138
+ ```ts
139
+ import { withAuthChallenges, type AuthFn } from "eve/channels/auth";
140
+
141
+ const apiKeyAuth: AuthFn<Request> = withAuthChallenges(
142
+ (request) => (isValidApiKey(request) ? apiKeySessionAuth : null),
143
+ [{ scheme: "Bearer" }],
144
+ );
145
+ ```
146
+
134
147
  | Verifier | Behind | Input |
135
148
  | -------------------------------------- | -------------- | -------------------------------- |
136
149
  | `verifyHttpBasic(header, credentials)` | `httpBasic()` | raw `Authorization` header value |
@@ -74,7 +74,7 @@ For a public demo, use `none()` (also from `eve/channels/auth`) to skip authenti
74
74
  ## Dev vs deploy topology
75
75
 
76
76
  - **Local dev.** `npm run dev` starts the eve dev server next to `nuxt dev` and proxies the eve routes through it. As far as the browser knows, everything is the Nuxt origin.
77
- - **Vercel.** A single Vercel project carries both the Nuxt app and the eve runtime. The web app stays public; the runtime sits behind it on the same origin. Set `eveBuildCommand` when the agent needs its own build step:
77
+ - **Vercel.** The web app and the eve runtime deploy as a single project. On Vercel builds the module adds Build Output [`services`](https://vercel.com/docs/services) for eve and `routes` that send `/eve/v1/**` to that service before filesystem routing; the Nuxt app itself remains the default app. No `vercel.json` is required. By default the generated service runs the installed eve binary from the agent root, so the agent directory does not need its own `package.json`. When the agent needs its own build step, set `eveBuildCommand`:
78
78
 
79
79
  ```ts
80
80
  export default defineNuxtConfig({
@@ -92,6 +92,27 @@ For a public demo, use `none()` (also from `eve/channels/auth`) to skip authenti
92
92
  EVE_NUXT_PRODUCTION_PORT=5000 npm run build && npm run preview
93
93
  ```
94
94
 
95
+ ## Managing vercel.json yourself
96
+
97
+ When `vercel.json` declares [`services`](https://vercel.com/docs/services), the module 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 module fails the build:
98
+
99
+ ```json title="vercel.json"
100
+ {
101
+ "services": {
102
+ "web": { "root": ".", "framework": "nuxtjs" },
103
+ "eve": { "root": "agent", "framework": "eve", "buildCommand": "eve build" }
104
+ },
105
+ "rewrites": [{ "source": "/eve/v1/(.*)", "destination": { "service": "eve" } }]
106
+ }
107
+ ```
108
+
109
+ ### Migrating from experimentalServices
110
+
111
+ Earlier versions of the module wrote the legacy `experimentalServices` field into `vercel.json`. Vercel no longer routes that model — deployments build both services but every `/eve/v1/*` request returns a platform NOT_FOUND — so the module now ignores the field and warns when it sees one. Migrate either way:
112
+
113
+ - **Generated (default).** Delete `vercel.json` (or just its `experimentalServices` block) and set the project's Framework Preset back to Nuxt.js. The module generates the eve service and its routing on every Vercel build.
114
+ - **Hand-maintained.** Replace `experimentalServices` with the stable `services` and `rewrites` shown above, and keep the "Services" Framework Preset.
115
+
95
116
  ## What to read next
96
117
 
97
118
  - [`useEveAgent` (Vue)](./use-eve-agent-vue): the composable API
package/docs/meta.json CHANGED
@@ -9,6 +9,7 @@
9
9
  "skills",
10
10
  "channels",
11
11
  "connections",
12
+ "extensions",
12
13
  "sandbox",
13
14
  "subagents",
14
15
  "schedules",
@@ -147,7 +147,7 @@ Pass a bare URL and the UI connects to that server instead of booting a local on
147
147
  | Flag | Type | Default | Description |
148
148
  | ----------------------------------- | ------ | ------------------ | ----------------------------------------------------------------------------------------- |
149
149
  | `--host <host>` | string | all interfaces | Host interface to bind |
150
- | `--port <port>` | number | `$PORT`, then 3000 | Port to listen on |
150
+ | `--port <port>` | number | `$PORT`, then 2000 | Port to listen on |
151
151
  | `-u, --url <url>` | string | none | Connect to an existing server URL instead of starting one |
152
152
  | `-H, --header <header>` | string | none | Request header for a URL target, in `Name: value` form; repeat for multiple headers |
153
153
  | `--no-ui` | flag | UI on | Start the server without an interactive UI |
@@ -90,7 +90,7 @@ A handler-form session runs on the same durable runtime engine as any other sess
90
90
  The dev server mounts a one-shot dispatch route that fires a schedule by name, out of band, exactly once. Since `eve dev` never runs schedules on their cron cadence, this is how you trigger one without waiting for the next production tick.
91
91
 
92
92
  ```sh
93
- curl -X POST http://localhost:3000/eve/v1/dev/schedules/heartbeat
93
+ curl -X POST http://localhost:2000/eve/v1/dev/schedules/heartbeat
94
94
  # -> { "scheduleId": "heartbeat", "sessionIds": ["..."] }
95
95
  ```
96
96
 
package/docs/skills.mdx CHANGED
@@ -9,7 +9,7 @@ A skill is a model-loadable procedure that follows the `SKILL.md` convention. It
9
9
 
10
10
  eve scans the files under `agent/skills/` and exposes each one's description to the model alongside a framework-owned `load_skill` tool. When a request matches a skill's description (or you name the skill outright), the model calls `load_skill`, and eve appends that skill's markdown to the active turn's context.
11
11
 
12
- At runtime, skill package files are placed under `$HOME/.agents/skills/<skill>/`. If `$HOME` is unavailable in a sandbox, eve falls back to `/workspace/skills/<skill>/`. `load_skill` reads `SKILL.md` automatically; any sibling references inside that file, such as `references/checklist.md`, are relative to the directory containing that specific `SKILL.md`.
12
+ Static skills do not require a sandbox: `load_skill` returns their instructions directly from the compiled agent. Dynamic skills and access to supporting package files require a sandbox. Builds may also prewarm sandbox templates that contain static package files. Supporting files are available under `$HOME/.agents/skills/<skill>/`, with `/workspace/skills/<skill>/` as the fallback when `$HOME` is unavailable. Sibling references inside `SKILL.md`, such as `references/checklist.md`, are relative to the directory containing that specific `SKILL.md`.
13
13
 
14
14
  The description is a routing hint, not a label. Write it as the task that should trigger activation:
15
15
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eve",
3
- "version": "0.26.1",
3
+ "version": "0.27.0",
4
4
  "private": false,
5
5
  "description": "Filesystem-first framework for durable backend AI agents that run anywhere.",
6
6
  "keywords": [
@@ -289,9 +289,9 @@
289
289
  "@ai-sdk/otel": "^1.0.26",
290
290
  "@ai-sdk/provider": "^4.0.3",
291
291
  "@ai-sdk/provider-utils": "^5.0.9",
292
- "@chat-adapter/slack": "4.31.0",
293
- "@chat-adapter/state-memory": "4.31.0",
294
- "@chat-adapter/twilio": "4.31.0",
292
+ "@chat-adapter/slack": "4.34.0",
293
+ "@chat-adapter/state-memory": "4.34.0",
294
+ "@chat-adapter/twilio": "4.34.0",
295
295
  "@clack/core": "1.3.1",
296
296
  "@nuxt/kit": "^4.0.0",
297
297
  "@standard-schema/spec": "1.1.0",
@@ -312,7 +312,7 @@
312
312
  "@workflow/world-vercel": "5.0.0-beta.31",
313
313
  "ai": "^7.0.26",
314
314
  "autoevals": "0.0.132",
315
- "chat": "4.31.0",
315
+ "chat": "4.34.0",
316
316
  "chokidar": "5.0.0",
317
317
  "commander": "14.0.3",
318
318
  "emulate": "0.6.0",
@@ -1,6 +0,0 @@
1
- export declare function eveSandboxUserAgentToken(): string;
2
- /**
3
- * Wraps a `fetch` implementation so every request's `user-agent` ends with the
4
- * {@link eveSandboxUserAgentToken} (e.g.: eve/0.18.1).
5
- */
6
- export declare function withEveSandboxUserAgent(inner?: typeof globalThis.fetch): typeof globalThis.fetch;
@@ -1 +0,0 @@
1
- import{resolveInstalledPackageInfo}from"#internal/application/package.js";function eveSandboxUserAgentToken(){let{name:t,version:n}=resolveInstalledPackageInfo();return`${t}/${n}`}function withEveSandboxUserAgent(e=globalThis.fetch){let t=eveSandboxUserAgentToken();return(n,r)=>{let i=new Headers(r?.headers??(typeof n==`object`&&n&&`headers`in n?n.headers:void 0)),a=i.get(`user-agent`);return i.set(`user-agent`,a?`${a} ${t}`:t),e(n,{...r,headers:i})}}export{eveSandboxUserAgentToken,withEveSandboxUserAgent};
@@ -1,6 +0,0 @@
1
- import type { ContextContainer } from "#context/container.js";
2
- import type { RuntimeTurnAgent } from "#runtime/agent/bootstrap.js";
3
- export declare function resolveSessionSkillRoot(input: {
4
- readonly ctx: ContextContainer;
5
- readonly turnAgent: RuntimeTurnAgent;
6
- }): Promise<string | undefined>;
@@ -1 +0,0 @@
1
- import{SandboxKey}from"#context/keys.js";import{resolveSandboxSkillRoot}from"#shared/skill-paths.js";async function resolveSessionSkillRoot(e){if((e.turnAgent.availableSkills?.length??0)===0)return;let t=e.ctx.get(SandboxKey);if(t===void 0)return;let n=await t.get();if(n!==null)return await resolveSandboxSkillRoot({sandbox:n})}export{resolveSessionSkillRoot};
@@ -1,17 +0,0 @@
1
- export interface EnsureVercelJsonResult {
2
- readonly servicePrefix: string;
3
- }
4
- /**
5
- * Ensure `vercel.json` declares the Nuxt web service and the eve agent
6
- * service so a Vercel deployment ships both from one project.
7
- *
8
- * Existing services are preserved untouched; an already-configured eve
9
- * service's `routePrefix` wins over {@link input.servicePrefix}. The file is
10
- * only rewritten when the resulting config differs from what is on disk.
11
- */
12
- export declare function ensureEveVercelJson(input: {
13
- readonly appRoot: string;
14
- readonly eveBuildCommand: string;
15
- readonly nuxtRoot: string;
16
- readonly servicePrefix: string;
17
- }): Promise<EnsureVercelJsonResult>;
@@ -1 +0,0 @@
1
- import{join,relative}from"node:path";import{readFile,writeFile}from"node:fs/promises";const VERCEL_JSON_FILE_NAME=`vercel.json`;function isRecord(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function resolveRelativeEntrypoint(e,n){let r=relative(e,n);return r.length===0?`.`:r.replaceAll(`\\`,`/`)}function normalizeVercelJsonConfig(e){if(!isRecord(e))throw Error(`${VERCEL_JSON_FILE_NAME} must contain a JSON object.`);let t=e.experimentalServices;if(t!==void 0&&!isRecord(t))throw Error(`${VERCEL_JSON_FILE_NAME} experimentalServices must be a JSON object.`);return e}async function readVercelJsonConfig(e){try{return normalizeVercelJsonConfig(JSON.parse(await readFile(e,`utf8`)))}catch(e){if(e instanceof Error&&`code`in e&&e.code===`ENOENT`)return{};throw e}}function findServiceByFramework(e,t){return Object.values(e).find(e=>e.framework===t)}async function ensureEveVercelJson(t){let n=join(t.nuxtRoot,VERCEL_JSON_FILE_NAME),i=await readVercelJsonConfig(n),a=resolveRelativeEntrypoint(t.nuxtRoot,t.appRoot),o=i.experimentalServices??{},s=findServiceByFramework(o,`eve`),c=findServiceByFramework(o,`nuxtjs`),l=s?.routePrefix??t.servicePrefix,u={...o};c===void 0&&(u.web={entrypoint:`.`,framework:`nuxtjs`,routePrefix:`/`}),s===void 0&&(u.eve={buildCommand:t.eveBuildCommand,entrypoint:a,framework:`eve`,routePrefix:l});let d={...i,$schema:i.$schema??`https://openapi.vercel.sh/vercel.json`,experimentalServices:u};return JSON.stringify(i)!==JSON.stringify(d)&&await writeFile(n,`${JSON.stringify(d,null,2)}\n`),{servicePrefix:l}}export{ensureEveVercelJson};