eve 0.27.6 → 0.27.7

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 (64) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/src/channel/session.d.ts +5 -0
  3. package/dist/src/channel/session.js +1 -1
  4. package/dist/src/channel/types.d.ts +7 -0
  5. package/dist/src/chunks/{use-eve-agent-COlXhAaF.js → use-eve-agent-JPfBHZJr.js} +36 -6
  6. package/dist/src/chunks/{use-eve-agent-DzVlKcUV.js → use-eve-agent-r5tkzjmt.js} +36 -6
  7. package/dist/src/client/open-stream.d.ts +17 -2
  8. package/dist/src/client/open-stream.js +1 -1
  9. package/dist/src/client/session.d.ts +5 -1
  10. package/dist/src/client/session.js +1 -1
  11. package/dist/src/client/types.d.ts +7 -0
  12. package/dist/src/execution/workflow-runtime.js +1 -1
  13. package/dist/src/harness/emission.js +1 -1
  14. package/dist/src/harness/input-requests.js +1 -1
  15. package/dist/src/harness/runtime-actions.d.ts +4 -0
  16. package/dist/src/harness/runtime-actions.js +1 -1
  17. package/dist/src/harness/tool-call-input-errors.d.ts +20 -0
  18. package/dist/src/harness/tool-call-input-errors.js +1 -1
  19. package/dist/src/internal/application/build-workspace.d.ts +0 -1
  20. package/dist/src/internal/application/build-workspace.js +1 -1
  21. package/dist/src/internal/application/package.js +1 -1
  22. package/dist/src/internal/application/paths.d.ts +1 -6
  23. package/dist/src/internal/application/paths.js +1 -1
  24. package/dist/src/internal/nitro/host/build-application.js +1 -1
  25. package/dist/src/internal/nitro/host/configure-nitro-routes.d.ts +4 -4
  26. package/dist/src/internal/nitro/host/configure-nitro-routes.js +2 -2
  27. package/dist/src/internal/nitro/host/create-application-nitro.d.ts +11 -7
  28. package/dist/src/internal/nitro/host/create-application-nitro.js +1 -1
  29. package/dist/src/internal/nitro/host/types.d.ts +0 -4
  30. package/dist/src/internal/nitro/host/vercel-build-output-config.d.ts +29 -1
  31. package/dist/src/internal/nitro/host/vercel-build-output-config.js +1 -1
  32. package/dist/src/internal/workflow/queue-namespace.d.ts +8 -0
  33. package/dist/src/internal/workflow/queue-namespace.js +1 -1
  34. package/dist/src/internal/workflow-bundle/builder-support.d.ts +0 -5
  35. package/dist/src/internal/workflow-bundle/builder.d.ts +0 -5
  36. package/dist/src/internal/workflow-bundle/builder.js +2 -2
  37. package/dist/src/internal/workflow-bundle/vercel-workflow-output.d.ts +0 -51
  38. package/dist/src/internal/workflow-bundle/vercel-workflow-output.js +1 -3
  39. package/dist/src/internal/workflow-bundle/workflow-builders.d.ts +0 -7
  40. package/dist/src/internal/workflow-bundle/workflow-builders.js +1 -1
  41. package/dist/src/packages/eve-catalog/src/index.js +1 -1
  42. package/dist/src/protocol/message.d.ts +1 -0
  43. package/dist/src/protocol/message.js +2 -2
  44. package/dist/src/public/channels/eve.js +2 -2
  45. package/dist/src/setup/scaffold/create/project.js +1 -1
  46. package/dist/src/svelte/index.js +1 -1
  47. package/dist/src/svelte/use-eve-agent.js +1 -1
  48. package/dist/src/vue/index.js +1 -1
  49. package/dist/src/vue/use-eve-agent.js +1 -1
  50. package/docs/README.md +21 -20
  51. package/docs/channels/custom.mdx +1 -1
  52. package/docs/channels/overview.mdx +2 -0
  53. package/docs/channels/slack.mdx +0 -1
  54. package/docs/concepts/{execution-model-and-durability.md → execution-model-and-durability.mdx} +16 -0
  55. package/docs/concepts/security-model.md +2 -0
  56. package/docs/concepts/sessions-runs-and-streaming.md +9 -0
  57. package/docs/getting-started.mdx +13 -196
  58. package/docs/guides/client/streaming.mdx +15 -0
  59. package/docs/installation.mdx +60 -0
  60. package/docs/meta.json +7 -6
  61. package/docs/project-structure.mdx +53 -0
  62. package/docs/tutorial/meta.json +1 -1
  63. package/package.json +1 -1
  64. package/docs/introduction.mdx +0 -103
@@ -157,6 +157,21 @@ for await (const event of session.stream({ startIndex: -1 })) {
157
157
 
158
158
  Tail-relative attachments do not automatically reconnect or advance the session's stored absolute `streamIndex`. Break after the event you need when using one as a tail lookup.
159
159
 
160
+ ## Bounded catch-up reads
161
+
162
+ Pass `follow: false` to read from the cursor to the durable tail and then stop, instead of following the live stream (the default):
163
+
164
+ ```ts
165
+ for await (const event of session.stream({ follow: false })) {
166
+ console.log(event.type);
167
+ }
168
+ // Returns once every event recorded before the stream opened is consumed.
169
+ ```
170
+
171
+ The first connection pins the bound to the tail the server reports at open time; events recorded afterward are not part of the read. Reconnects during the read keep that original bound, and the session's stored `streamIndex` still advances past the consumed events, so a follow-up `stream()` or `send()` picks up exactly where the bounded read ended. When the cursor is already at or past the tail, the iterator returns immediately without yielding.
172
+
173
+ Because a tail-relative cursor cannot be bounded, `follow: false` throws when combined with a negative `startIndex`. It also fails if the server does not report the durable tail (an agent running an older eve version).
174
+
160
175
  `stream()` throws if the session has no `sessionId`, because there's no stream to attach to before the first send.
161
176
 
162
177
  ## Abort a request
@@ -0,0 +1,60 @@
1
+ ---
2
+ title: "Installation"
3
+ description: "Create an eve project, configure a model credential, and run it locally."
4
+ contentType: "How-to"
5
+ ---
6
+
7
+ Create an eve project with `eve init`. The scaffold installs dependencies, creates the agent files, and starts the local development server.
8
+
9
+ ## Configure a model credential
10
+
11
+ The default scaffolded model routes through the Vercel AI Gateway. Set `AI_GATEWAY_API_KEY`, or link a Vercel project to use `VERCEL_OIDC_TOKEN`.
12
+
13
+ You can also use a direct provider model. Install its AI SDK provider package and set that provider's API key before you run the agent.
14
+
15
+ Choose a model, provider, and channel that meet your data-processing and compliance requirements.
16
+
17
+ ## Create a project
18
+
19
+ Run `eve init` with a project name:
20
+
21
+ ```bash
22
+ npx eve@latest init my-agent
23
+ ```
24
+
25
+ The command creates `my-agent/`, installs dependencies, initializes Git, and starts eve's development server. If a supported coding-agent REPL is available, eve offers to open it instead.
26
+
27
+ ## Run the agent
28
+
29
+ From the project root, run the generated development command:
30
+
31
+ ```bash
32
+ cd my-agent
33
+ npm run dev
34
+ ```
35
+
36
+ The terminal UI sends messages to your agent. Stop the server with Ctrl+C when you need your shell for another command.
37
+
38
+ ## Add eve to an existing project
39
+
40
+ Run `eve init .` from a project with a `package.json` and no existing `agent/` files:
41
+
42
+ ```bash
43
+ npx eve@latest init .
44
+ ```
45
+
46
+ eve adds the missing `eve`, `ai`, and `zod` dependencies without changing files the project already owns.
47
+
48
+ ## Install manually
49
+
50
+ Install the runtime dependencies when you do not want to use the scaffold:
51
+
52
+ ```bash
53
+ npm install eve@latest ai zod
54
+ ```
55
+
56
+ Declare Node.js 24 in `package.json`, then create `agent/agent.ts` and `agent/instructions.md`. [Project structure](/docs/project-structure) shows the required layout, and [`agent.ts`](./agent-config) documents the runtime configuration.
57
+
58
+ ## Continue building
59
+
60
+ Read [Project structure](/docs/project-structure) before adding instructions, tools, connections, or channels.
package/docs/meta.json CHANGED
@@ -1,8 +1,10 @@
1
1
  {
2
2
  "pages": [
3
- "introduction",
3
+ "---Getting Started---",
4
4
  "getting-started",
5
- "---",
5
+ "installation",
6
+ "project-structure",
7
+ "---Build Your Agent---",
6
8
  "agent-config",
7
9
  "instructions",
8
10
  "tools",
@@ -14,12 +16,11 @@
14
16
  "subagents",
15
17
  "schedules",
16
18
  "evals",
17
- "---",
19
+ "---Learn More---",
20
+ "tutorial",
18
21
  "guides",
19
22
  "concepts",
20
23
  "patterns",
21
- "---",
22
- "reference",
23
- "tutorial"
24
+ "reference"
24
25
  ]
25
26
  }
@@ -0,0 +1,53 @@
1
+ ---
2
+ title: "Project Structure"
3
+ description: "Learn the files eve discovers and how their paths define agent capabilities."
4
+ contentType: "Conceptual"
5
+ ---
6
+
7
+ eve builds an agent from files under `agent/`. A file's location determines what eve loads, and most paths also determine the capability's name.
8
+
9
+ ## Start with two files
10
+
11
+ A minimal agent needs an instructions file and optional runtime configuration:
12
+
13
+ ```text
14
+ my-agent/
15
+ ├── package.json
16
+ ├── agent/
17
+ │ ├── agent.ts
18
+ │ └── instructions.md
19
+ └── evals/
20
+ ```
21
+
22
+ `agent/instructions.md` is the agent's always-on system prompt. `agent/agent.ts` selects the model and configures runtime behavior. Omit `agent.ts` when the defaults are sufficient.
23
+
24
+ ## Add capabilities as directories
25
+
26
+ Add a directory when the agent needs that capability:
27
+
28
+ | Path | Purpose |
29
+ | ----------------------------------- | --------------------------------------------- |
30
+ | [`tools/`](./tools) | Typed functions the model can call |
31
+ | [`skills/`](./skills) | Procedures the model loads when useful |
32
+ | [`channels/`](./channels/overview) | HTTP and messaging entry points |
33
+ | [`connections/`](/docs/connections) | MCP and OpenAPI services |
34
+ | [`sandbox/`](./sandbox) | Controlled workspace files and commands |
35
+ | [`subagents/`](./subagents) | Specialist agents the root agent delegates to |
36
+ | [`schedules/`](./schedules) | Recurring work |
37
+ | `lib/` | Shared code imported by agent files |
38
+
39
+ The `evals/` directory sits beside `agent/`. It holds the checks that measure whether the agent completes its tasks. See [Evals](./evals/overview).
40
+
41
+ ## Let paths name capabilities
42
+
43
+ The path supplies the name. This tool file becomes the `get_weather` tool:
44
+
45
+ ```text
46
+ agent/tools/get_weather.ts
47
+ ```
48
+
49
+ The same rule applies to connections, skills, and subagents. You do not add a duplicate `name` or `id` field to the definition.
50
+
51
+ ## Use the full layout reference
52
+
53
+ [Project layout](./reference/project-layout) lists every supported slot, the root and subagent boundaries, and the file-discovery rules.
@@ -1,5 +1,5 @@
1
1
  {
2
- "title": "Build an Agent",
2
+ "title": "Tutorial",
3
3
  "pages": [
4
4
  "first-agent",
5
5
  "how-it-runs",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eve",
3
- "version": "0.27.6",
3
+ "version": "0.27.7",
4
4
  "private": false,
5
5
  "description": "Filesystem-first framework for durable backend AI agents that run anywhere.",
6
6
  "keywords": [
@@ -1,103 +0,0 @@
1
- ---
2
- title: "Introduction"
3
- description: "How an eve agent is laid out as files, what runs when a message arrives, and the building blocks you add as it grows."
4
- ---
5
-
6
- eve is a framework for building durable agents as ordinary files in a TypeScript project.
7
-
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
-
10
- ## An eve project at a glance
11
-
12
- A small eve app looks like this:
13
-
14
- ```text
15
- my-agent/
16
- ├── package.json
17
- └── agent/
18
- ├── agent.ts
19
- ├── instructions.md
20
- ├── tools/
21
- │ └── get_weather.ts
22
- ├── skills/
23
- │ └── plan_a_trip.md
24
- └── channels/
25
- └── slack.ts
26
- ```
27
-
28
- You can understand most eve projects by reading that tree:
29
-
30
- - `instructions.md` tells the agent who it is and how it should behave.
31
- - [`agent.ts`](./agent-config) chooses the model and configures runtime options.
32
- - [`tools/`](./tools) holds typed functions the model can call.
33
- - [`skills/`](./skills) holds longer procedures the model loads only when they are useful.
34
- - [`channels/`](./channels/overview) connect the agent to HTTP clients, Slack, Discord, and the other places people talk to it.
35
-
36
- Start with only `instructions.md` and `agent.ts`. Add the other folders when the agent needs them.
37
-
38
- ## The files are the interface
39
-
40
- eve is [filesystem-first](./reference/project-layout). A file's location says what it does, and its path usually gives it a name. For example, this file:
41
-
42
- ```text
43
- agent/tools/get_weather.ts
44
- ```
45
-
46
- defines a tool named `get_weather`:
47
-
48
- ```ts
49
- import { defineTool } from "eve/tools";
50
- import { z } from "zod";
51
-
52
- export default defineTool({
53
- description: "Get the weather for a city.",
54
- inputSchema: z.object({ city: z.string() }),
55
- async execute({ city }) {
56
- return { city, condition: "Sunny" };
57
- },
58
- });
59
- ```
60
-
61
- There is no separate registry to keep in sync. Add the file and eve discovers it; move or rename it and its identity moves with it. See [Tools](./tools) for the complete API.
62
-
63
- ## What happens when a message arrives
64
-
65
- The same flow runs whether a message comes from a web app, the terminal, or Slack. eve turns the platform input into a message, gives the model its instructions, skills, tools, and conversation history, runs the work (calling tools and subagents as needed), saves the session and streams events, then delivers the result back in the form the platform expects.
66
-
67
- That keeps agent behavior portable. Your weather tool does not need to know whether the question came from a browser or from Slack.
68
-
69
- ## Durable by default
70
-
71
- An eve session is more than one request and one response. It can:
72
-
73
- - Stream progress while work is happening
74
- - Call tools and subagents
75
- - Pause for [approval or a human answer](./tools)
76
- - Resume after that answer arrives
77
- - Keep durable state across turns
78
-
79
- Under the hood, eve uses the open-source [Workflow SDK](https://workflow-sdk.dev) to make sessions durable, resumable, and crash-safe. eve handles that machinery so your tools focus on the work itself.
80
-
81
- ## Grow the project by adding capabilities
82
-
83
- As the agent grows, each concern still has a predictable home:
84
-
85
- | Path | Add it when you need... |
86
- | ------------------------------- | ------------------------------------------------ |
87
- | [`connections/`](./connections) | Tools from external MCP or OpenAPI services |
88
- | [`hooks/`](./guides/hooks) | Code that reacts to lifecycle and stream events |
89
- | [`sandbox/`](./sandbox) | A controlled workspace for files and commands |
90
- | [`subagents/`](./subagents) | Specialist agents the root agent can delegate to |
91
- | [`schedules/`](./schedules) | Recurring or scheduled work |
92
- | `lib/` | Shared code imported by the other agent files |
93
-
94
- The result stays readable before it runs. The directory tells you what the agent can do.
95
-
96
- ## What to read next
97
-
98
- - [Getting started](./getting-started): scaffold and run your first agent
99
- - [Tools](./tools): the typed actions your agent calls
100
- - [Instructions](./instructions): the always-on system prompt that shapes behavior
101
- - [Channels](./channels/overview): reach the agent from Slack, Discord, or a web UI
102
- - [Connections](./connections): pull in tools from external services
103
- - [Project layout](./reference/project-layout): every authored slot under `agent/`