eve 0.27.2 → 0.27.4

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 (92) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/src/channel/reset-session.d.ts +8 -0
  3. package/dist/src/channel/reset-session.js +1 -0
  4. package/dist/src/channel/routes.d.ts +24 -1
  5. package/dist/src/channel/send.js +1 -1
  6. package/dist/src/channel/session-callback.js +1 -1
  7. package/dist/src/channel/types.d.ts +14 -0
  8. package/dist/src/chunks/{use-eve-agent-CbF0l_Fp.js → use-eve-agent-BtkhbY2I.js} +53 -4
  9. package/dist/src/chunks/{use-eve-agent-CgxB9WQv.js → use-eve-agent-NUjD28Iu.js} +53 -4
  10. package/dist/src/cli/commands/build.js +1 -1
  11. package/dist/src/cli/commands/info.js +1 -1
  12. package/dist/src/cli/dev/tui/blocks.d.ts +7 -0
  13. package/dist/src/cli/dev/tui/blocks.js +3 -3
  14. package/dist/src/cli/dev/tui/message-queue.d.ts +88 -0
  15. package/dist/src/cli/dev/tui/message-queue.js +1 -0
  16. package/dist/src/cli/dev/tui/runner.d.ts +33 -0
  17. package/dist/src/cli/dev/tui/runner.js +1 -1
  18. package/dist/src/cli/dev/tui/setup-commands.js +1 -1
  19. package/dist/src/cli/dev/tui/subagent-pump.d.ts +9 -0
  20. package/dist/src/cli/dev/tui/subagent-pump.js +1 -1
  21. package/dist/src/cli/dev/tui/terminal-renderer.d.ts +9 -0
  22. package/dist/src/cli/dev/tui/terminal-renderer.js +13 -11
  23. package/dist/src/client/index.d.ts +1 -1
  24. package/dist/src/client/session.d.ts +13 -1
  25. package/dist/src/client/session.js +1 -1
  26. package/dist/src/client/types.d.ts +10 -0
  27. package/dist/src/context/dynamic-tool-lifecycle.d.ts +13 -1
  28. package/dist/src/context/dynamic-tool-lifecycle.js +1 -1
  29. package/dist/src/context/keys.d.ts +5 -0
  30. package/dist/src/context/keys.js +1 -1
  31. package/dist/src/execution/node-step.d.ts +6 -0
  32. package/dist/src/execution/node-step.js +1 -1
  33. package/dist/src/execution/sandbox/bindings/docker.js +1 -1
  34. package/dist/src/execution/sandbox/bindings/just-bash.js +1 -1
  35. package/dist/src/execution/sandbox/bindings/microsandbox-lifecycle.js +1 -1
  36. package/dist/src/execution/sandbox/bindings/vercel.js +1 -1
  37. package/dist/src/execution/terminal-session-failure-step.js +1 -1
  38. package/dist/src/execution/workflow-callback-url.d.ts +12 -2
  39. package/dist/src/execution/workflow-callback-url.js +1 -1
  40. package/dist/src/execution/workflow-entry.js +1 -1
  41. package/dist/src/execution/workflow-runtime.js +1 -1
  42. package/dist/src/execution/workflow-steps.js +1 -1
  43. package/dist/src/internal/application/package.js +1 -1
  44. package/dist/src/internal/authored-module-loader.js +3 -3
  45. package/dist/src/internal/authored-package-tsconfig-paths.js +1 -1
  46. package/dist/src/internal/authored-relative-extension-resolver.d.ts +6 -0
  47. package/dist/src/internal/authored-relative-extension-resolver.js +1 -0
  48. package/dist/src/internal/nitro/dev-runtime-source-snapshot.js +1 -1
  49. package/dist/src/internal/nitro/host/build-application.js +1 -1
  50. package/dist/src/internal/nitro/host/types.d.ts +9 -0
  51. package/dist/src/internal/nitro/routes/channel-dispatch.js +1 -1
  52. package/dist/src/internal/node-esm-compat-banner.js +1 -1
  53. package/dist/src/internal/workflow-bundle/builder-support.d.ts +5 -0
  54. package/dist/src/internal/workflow-bundle/builder.js +2 -2
  55. package/dist/src/internal/workflow-bundle/dynamic-tool-ast-references.d.ts +39 -0
  56. package/dist/src/internal/workflow-bundle/dynamic-tool-ast-references.js +1 -0
  57. package/dist/src/internal/workflow-bundle/dynamic-tool-transform.js +4 -4
  58. package/dist/src/internal/workflow-bundle/vercel-workflow-output.d.ts +10 -1
  59. package/dist/src/internal/workflow-bundle/vercel-workflow-output.js +1 -1
  60. package/dist/src/packages/eve-catalog/src/index.js +1 -1
  61. package/dist/src/protocol/reset-session.d.ts +14 -0
  62. package/dist/src/protocol/reset-session.js +1 -0
  63. package/dist/src/protocol/routes.d.ts +5 -0
  64. package/dist/src/protocol/routes.js +1 -1
  65. package/dist/src/public/channels/eve.d.ts +2 -2
  66. package/dist/src/public/channels/eve.js +1 -1
  67. package/dist/src/public/channels/index.d.ts +1 -1
  68. package/dist/src/public/channels/linear/inbound-images.d.ts +18 -0
  69. package/dist/src/public/channels/linear/inbound-images.js +1 -0
  70. package/dist/src/public/channels/linear/linearChannel.js +1 -1
  71. package/dist/src/public/channels/slack/limits.js +1 -1
  72. package/dist/src/public/definitions/channel.d.ts +1 -1
  73. package/dist/src/public/next/vercel-output-config.js +1 -1
  74. package/dist/src/runtime/sessions/compiled-agent-cache.js +1 -1
  75. package/dist/src/setup/flows/install-vercel-cli.d.ts +8 -2
  76. package/dist/src/setup/flows/install-vercel-cli.js +1 -1
  77. package/dist/src/setup/scaffold/create/project.js +1 -1
  78. package/dist/src/setup/vercel-project-api.d.ts +1 -1
  79. package/dist/src/setup/vercel-project-api.js +1 -1
  80. package/dist/src/shared/public-route-prefix.d.ts +23 -0
  81. package/dist/src/shared/public-route-prefix.js +1 -0
  82. package/dist/src/svelte/index.js +1 -1
  83. package/dist/src/svelte/use-eve-agent.js +1 -1
  84. package/dist/src/vue/index.js +1 -1
  85. package/dist/src/vue/use-eve-agent.js +1 -1
  86. package/docs/channels/custom.mdx +38 -1
  87. package/docs/channels/linear.mdx +1 -1
  88. package/docs/extensions.md +100 -20
  89. package/docs/guides/dev-tui.md +9 -2
  90. package/docs/guides/frontend/nextjs.mdx +2 -0
  91. package/docs/reference/cli.md +1 -1
  92. package/package.json +1 -1
@@ -1,13 +1,13 @@
1
1
  ---
2
2
  title: "Extensions"
3
- description: "Publish reusable eve capabilities as an npm package, then install and mount them in an agent."
3
+ description: "Package reusable eve capabilities and mount them from npm or a monorepo workspace."
4
4
  ---
5
5
 
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.
6
+ Extensions package eve tools, connections, skills, instruction fragments, and hooks. An author builds an extension package; each agent that uses it declares the package as a dependency and mounts it. The package can be published to a registry or kept private inside a monorepo workspace.
7
7
 
8
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
- ## Publisher: create and publish an extension
10
+ ## Author: create an extension
11
11
 
12
12
  ### Create the package
13
13
 
@@ -42,7 +42,7 @@ Keep agent configuration, sandboxes, schedules, and nested extensions in the con
42
42
 
43
43
  ### Add configuration and contributions
44
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:
45
+ The author's `extension/extension.ts` default-exports a `defineExtension` handle. Give it a [Standard Schema](https://standardschema.dev) when consumers need to provide settings:
46
46
 
47
47
  ```ts title="extension/extension.ts"
48
48
  import { defineExtension } from "eve/extension";
@@ -76,9 +76,9 @@ export default defineTool({
76
76
 
77
77
  If no configuration is needed, export `defineExtension()` and let consumers re-export it directly. Config schemas must validate synchronously.
78
78
 
79
- `defineState` is automatically scoped to the publisher's package, so the same state name does not collide with the consumer or another extension.
79
+ `defineState` is automatically scoped to the extension package, so the same state name does not collide with the consumer or another extension.
80
80
 
81
- ### Build and publish
81
+ ### Build and optionally publish
82
82
 
83
83
  The scaffold's `package.json` declares separate source and distribution roots:
84
84
 
@@ -134,29 +134,29 @@ Build the package with `eve extension build`:
134
134
  eve extension build
135
135
  ```
136
136
 
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.
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 author's TypeScript source.
138
138
 
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`.
139
+ The exact `eve` development pin controls the extension 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`.
140
140
 
141
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`.
142
142
 
143
- Consumers can now add the built package to an agent.
143
+ Consumers can now add the built package to an agent. A workspace-only extension uses the same package contract but does not need to be published; see [Use an extension in a workspace](#use-an-extension-in-a-workspace).
144
144
 
145
145
  ## Consumer: install and mount an extension
146
146
 
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.
147
+ A mount gives the extension's contributions a namespace. Updating the package updates the mounted extension; nothing is copied into the consumer's agent.
148
148
 
149
149
  ### Install the package
150
150
 
151
- Install the extension in the consumer's agent project:
151
+ Install the extension with the package manager already used by the consumer's agent project. Fresh eve projects use pnpm:
152
152
 
153
153
  ```bash
154
- npm install @acme/crm
154
+ pnpm add @acme/crm
155
155
  ```
156
156
 
157
157
  ### Mount it
158
158
 
159
- Create a file under `agent/extensions/`. Its filename becomes the mount namespace. Call the publisher's default export when the extension needs configuration:
159
+ Create a file under `agent/extensions/`. Its filename becomes the mount namespace. Call the extension's default export when it needs configuration:
160
160
 
161
161
  ```ts title="agent/extensions/crm.ts"
162
162
  import crm from "@acme/crm";
@@ -168,7 +168,7 @@ Set `CRM_API_KEY` in the consumer's environment, such as `.env.local` for local
168
168
 
169
169
  The mount adds `crm__` to named contributions: `tools/search.ts` becomes `crm__search`, and `connections/api.ts` becomes `crm__api`.
170
170
 
171
- For a publisher with no configuration, mount its default export directly:
171
+ For an extension with no configuration, mount its default export directly:
172
172
 
173
173
  ```ts title="agent/extensions/gizmo.ts"
174
174
  export { default } from "@acme/gizmo";
@@ -176,9 +176,89 @@ export { default } from "@acme/gizmo";
176
176
 
177
177
  The same mount shape works with an npm package, a workspace dependency, or a linked local package.
178
178
 
179
+ ### Use an extension in a workspace
180
+
181
+ A workspace extension is a regular extension package kept in the same monorepo as its consumers. It is useful when several agents need the same capabilities, or when a private capability should evolve alongside the agents that use it.
182
+
183
+ For example, a pnpm workspace can keep one extension next to two independently deployable agents:
184
+
185
+ ```text
186
+ acme-agents/
187
+ ├── pnpm-workspace.yaml
188
+ ├── packages/
189
+ │ └── shared-capabilities/
190
+ │ ├── package.json
191
+ │ └── extension/
192
+ │ ├── extension.ts
193
+ │ ├── tools/
194
+ │ ├── skills/
195
+ │ └── hooks/
196
+ └── agents/
197
+ ├── support/
198
+ │ ├── package.json
199
+ │ └── agent/extensions/shared.ts
200
+ └── operations/
201
+ ├── package.json
202
+ └── agent/extensions/shared.ts
203
+ ```
204
+
205
+ Make both the extension and agent directories workspace members:
206
+
207
+ ```yaml title="pnpm-workspace.yaml"
208
+ packages:
209
+ - "agents/*"
210
+ - "packages/*"
211
+ ```
212
+
213
+ You can scaffold the extension from a directory already covered by the workspace configuration:
214
+
215
+ ```bash
216
+ cd packages
217
+ npx eve@latest extension init shared-capabilities
218
+ ```
219
+
220
+ Give the generated package the name consumers will import. Add `"private": true` if it should never be published:
221
+
222
+ ```jsonc title="packages/shared-capabilities/package.json"
223
+ {
224
+ "name": "@acme/shared-capabilities",
225
+ "private": true,
226
+ "eve": {
227
+ "extension": {
228
+ "source": "./extension",
229
+ "dist": "./dist/extension",
230
+ },
231
+ },
232
+ }
233
+ ```
234
+
235
+ Each consuming agent declares its own workspace dependency:
236
+
237
+ ```jsonc title="agents/support/package.json"
238
+ {
239
+ "dependencies": {
240
+ "@acme/shared-capabilities": "workspace:*",
241
+ },
242
+ }
243
+ ```
244
+
245
+ Then each agent mounts the package:
246
+
247
+ ```ts title="agents/support/agent/extensions/shared.ts"
248
+ export { default } from "@acme/shared-capabilities";
249
+ ```
250
+
251
+ The mount is intentionally per agent. Each consumer chooses its own mount namespace and, for a configured extension, passes its own configuration. For example, `shared.ts` contributes `shared__search`, while mounting the same package as `company.ts` in another agent contributes `company__search`.
252
+
253
+ #### Develop from source
254
+
255
+ When `eve dev` starts a consuming agent, it builds mounted, source-backed extensions found inside the same workspace before compiling the agent. It watches the extension source and relevant package and TypeScript configuration, then rebuilds only the affected extension. If an extension edit fails to build, the previous successful development generation keeps running.
256
+
257
+ Production `eve build` expects the extension distribution to exist already. Keep `eve extension build` in the extension package's `build` and `prepare` scripts, as the scaffold does, and run workspace builds in dependency order so extensions build before their consuming agents.
258
+
179
259
  ### Override a contribution
180
260
 
181
- Use a directory mount to replace or remove a publisher contribution. Put the mount declaration in `extension.ts` and add overrides beside it:
261
+ Use a directory mount to replace or remove an extension contribution. Put the mount declaration in `extension.ts` and add overrides beside it:
182
262
 
183
263
  ```
184
264
  agent/extensions/crm/
@@ -192,7 +272,7 @@ import crm from "@acme/crm";
192
272
  export default crm({ apiKey: process.env.CRM_API_KEY! });
193
273
  ```
194
274
 
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:
275
+ A same-named consumer tool, connection, or skill wins. To adjust an extension tool, import it from the package's `./tools` export and define it again:
196
276
 
197
277
  ```ts title="agent/extensions/crm/tools/search.ts"
198
278
  import { search } from "@acme/crm/tools";
@@ -202,7 +282,7 @@ import { always } from "eve/tools/approval";
202
282
  export default defineTool({ ...search, approval: always() });
203
283
  ```
204
284
 
205
- To remove a publisher tool, use `disableTool()` in its matching slot:
285
+ To remove an extension tool, use `disableTool()` in its matching slot:
206
286
 
207
287
  ```ts title="agent/extensions/crm/tools/search.ts"
208
288
  import { disableTool } from "eve/tools";
@@ -214,9 +294,9 @@ Hooks and instruction fragments are additive, so they cannot be replaced. To rep
214
294
 
215
295
  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.
216
296
 
217
- ### Use a publisher tool result in a hook
297
+ ### Use an extension tool result in a hook
218
298
 
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):
299
+ To retain an extension tool's result type in a consumer hook, import its definition from `./tools` and pass it to [`toolResultFrom`](/guides/hooks#narrowing-tool-results):
220
300
 
221
301
  ```ts title="agent/hooks/narrow-crm.ts"
222
302
  import { defineHook } from "eve/hooks";
@@ -237,7 +317,7 @@ export default defineHook({
237
317
 
238
318
  ### Compatibility
239
319
 
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.
320
+ At build time, eve checks the extension's generated capability metadata. If the extension needs an unsupported capability contract, upgrade eve or install a compatible extension release.
241
321
 
242
322
  ## What to read next
243
323
 
@@ -71,7 +71,8 @@ Chat and freeform `ask_question` inputs behave like a shell line editor.
71
71
 
72
72
  | Key | Action |
73
73
  | ---------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
74
- | `Enter` | Submit the message or question response. |
74
+ | `Enter` | Submit the message or question response. While a turn is running, queue the message for the next turn. |
75
+ | `Esc` | While a turn runs: pop the oldest queued message and steer with it; with nothing queued, press twice to cancel. |
75
76
  | `Shift+Enter` | Insert a newline without sending (needs a terminal that reports modified keys). |
76
77
  | `Ctrl+C` | Interrupt a running turn. At the chat or freeform-question prompt, clear non-empty input; when empty, quit. |
77
78
  | `↑` / `↓` | Move between input lines; at a chat-buffer edge, navigate messages you have sent this session. |
@@ -82,7 +83,13 @@ Chat and freeform `ask_question` inputs behave like a shell line editor.
82
83
 
83
84
  In terminals that support bracketed paste, pasting multi-line text into chat or a freeform question inserts it intact and renders one row per line rather than submitting at the first line. `Shift+Enter` adds a line by hand. The input grows down to the available terminal height, then scrolls to keep the caret visible; `Enter` submits the whole response.
84
85
 
85
- If a turn fails terminally (the server session dies or the connection drops), the TUI starts a fresh session and notes it inline so you can keep going. Server-side context resets with the old session.
86
+ ### Queue and steer while the agent works
87
+
88
+ Sending a message while a turn is still running does not interrupt it — the message joins a queue of up to five, pinned in a panel directly above the input with one line per message. When the turn ends, the queued messages coalesce into the next turn's message.
89
+
90
+ `Esc` steers instead of waiting: it pops the oldest queued message, cancels the running turn cooperatively, and submits the popped message as the replacement turn. In the transcript, a steered message carries an accent `↑` on its own line above its gutter bar; a queued message that waited for the boundary carries it below. Any remaining messages stay queued behind it. With nothing queued, the first `Esc` arms cancellation and a second `Esc` cancels the turn. Unlike `Ctrl+C` — which drops the stream client-side — a cancelled turn ends cleanly on the server and the session keeps its context; the conversation picks up at the next prompt.
91
+
92
+ If a turn fails terminally (the server session dies or the connection drops), the TUI starts a fresh session and notes it inline so you can keep going. Server-side context resets with the old session. Messages still queued when a turn is interrupted or fails are restored into the next prompt's input instead of being sent blind.
86
93
 
87
94
  ## Answer the agent inline
88
95
 
@@ -54,6 +54,8 @@ const billing = useEveAgent({ agent: "billing" });
54
54
 
55
55
  Use either `eveRoot` or `agents`, not both. `eveRoot` remains the shorthand for a single unnamed agent mounted at `/eve/v1/*`.
56
56
 
57
+ Generated agent services build with `EVE_PUBLIC_ROUTE_PREFIX` set to the agent's public mount (for example `/eve/agents/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.
58
+
57
59
  ### `withEve` options
58
60
 
59
61
  All fields are optional.
@@ -173,7 +173,7 @@ For bearer tokens or custom schemes, pass explicit headers with `-H`.
173
173
 
174
174
  Local dev records the last ready URL per resolved app root in `.eve/dev-server-state.v1.json`. A second interactive `eve dev` reconnects only when that URL is loopback and healthy; each terminal UI creates a fresh client session while sharing the server process. A stale or malformed record is replaced when eve starts a new server. Passing `--host`, `--port`, or a `PORT` environment value skips reconnection and reports a healthy recorded server instead.
175
175
 
176
- Local dev keeps immutable runtime source snapshots under `.eve/dev-runtime/snapshots/` so in-flight turns hold a consistent code revision while new turns pick up rebuilds. The terminal REPL keeps its logical session across successful rebuilds, so the next turn continues the conversation on the latest generation; use `/new` to start a fresh session. After a generation is superseded, `eve dev` retains it for at least 30 minutes and also retains the five most recently superseded generations, regardless of the configured Workflow World. The active generation is never pruned. Old runtime snapshots and local sandbox templates are pruned in the background. For manual cleanup, stop `eve dev` before deleting `.eve/dev-runtime/snapshots/` or `.eve/sandbox-cache/local/templates/`. A turn that remains unfinished beyond the automatic retention window can no longer resume after its generation is pruned.
176
+ Local dev keeps immutable runtime source snapshots under `.eve/dev-runtime/snapshots/` so in-flight turns hold a consistent code revision while new turns pick up rebuilds. The terminal REPL keeps its logical session across successful rebuilds, so the next turn continues the conversation on the latest generation; `/new` terminally retires that session before clearing the transcript, and the next prompt starts a fresh session with a new session-scoped sandbox on first sandbox use. After a generation is superseded, `eve dev` retains it for at least 30 minutes and also retains the five most recently superseded generations, regardless of the configured Workflow World. The active generation is never pruned. Old runtime snapshots and local sandbox templates are pruned in the background. For manual cleanup, stop `eve dev` before deleting `.eve/dev-runtime/snapshots/` or `.eve/sandbox-cache/local/templates/`. A turn that remains unfinished beyond the automatic retention window can no longer resume after its generation is pruned.
177
177
 
178
178
  ## `eve logs`
179
179
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eve",
3
- "version": "0.27.2",
3
+ "version": "0.27.4",
4
4
  "private": false,
5
5
  "description": "Filesystem-first framework for durable backend AI agents that run anywhere.",
6
6
  "keywords": [