The Open Framework for Building Agents
docs: correct statements that contradict current eve behavior (#5088)
Colton Paddena96473ecc3f5
diff --git a/docs/agent-config.md b/docs/agent-config.mdindex 6e2dd4086..1c9781558 100644--- a/docs/agent-config.md+++ b/docs/agent-config.md@@ -3,7 +3,7 @@ title: "Agent Configuration"description: "Configure an eve agent's model, reasoning effort, compaction, limits, and runtime behavior in agent.ts."----An eve app has one root agent assembled from the files under `agent/`. Its optional `agent.ts` calls `defineAgent` (from `eve`) when you need to configure the model or other runtime behavior. Declared [subagents](./subagents) have their own `agent.ts` and capabilities; this page covers the configuration shared by root agents and subagents.+An eve app's root agent uses files under `agent/` by default; a [flat layout](./reference/agent-files#flat-layout) places them directly in the app root instead. Its optional `agent.ts` calls `defineAgent` (from `eve`) when you need to configure the model or other runtime behavior. Declared [subagents](./subagents) have their own `agent.ts` and capabilities; this page covers the configuration shared by root agents and subagents.## Set the modeldiff --git a/docs/concepts/built-in-tools.md b/docs/concepts/built-in-tools.mdindex 9c7383c08..fe09e6317 100644--- a/docs/concepts/built-in-tools.md+++ b/docs/concepts/built-in-tools.md@@ -352,7 +352,7 @@ import { askQuestion } from "eve/tools/ask_question";export default askQuestion();```-`ask_question` is a [workflow tool](/docs/tools/workflows) that calls `ctx.ask()`. The model receives `{ status: "answered", answer }`, where `answer` is the chosen option's label or the user's own words. A plain follow-up message answers the question too when it is the only pending question. When other questions are also pending, a message does not answer any of them: `ask_question` withdraws its question, resolves as `{ interrupted: true }`, which the model reads as `Stopped early because a new message arrived.`, and the model reads the message next. In a session that cannot request input, such as a scheduled run, the result is `{ status: "unavailable" }` and the model continues on its own judgment. Remove the file to remove the tool.+`ask_question` is a [workflow tool](/docs/tools/workflows) that calls `ctx.ask()`. The model receives `{ status: "answered", answer }`, where `answer` is the chosen option's label or the user's own words. A plain follow-up message answers the question too when it is the first open request and the message matches an option or the question allows free text; see [Several requests at once](/docs/human-in-the-loop#several-requests-at-once). A steering message that doesn't answer it withdraws the question: `ask_question` resolves as `{ interrupted: true }`, which the model reads as `Stopped early because a new message arrived.`, and the model reads the message next. In a session that cannot request input, such as a [markdown schedule](/docs/schedules#markdown-form-fire-and-forget), the result is `{ status: "unavailable" }` and the model continues on its own judgment. Remove the file to remove the tool.### `glob`diff --git a/docs/concepts/sessions-runs-and-streaming.md b/docs/concepts/sessions-runs-and-streaming.mdindex 0a7af3faa..4a780a40c 100644--- a/docs/concepts/sessions-runs-and-streaming.md+++ b/docs/concepts/sessions-runs-and-streaming.md@@ -343,7 +343,7 @@ Every stream event runs four steps, in this order:3. **Hooks**: authored [hooks](../guides/hooks) subscribed to the event fire.4. **Dynamic resolvers**: [dynamic](../guides/dynamic-capabilities) tool, skill, and instruction resolvers fire, and `ctx.channel.metadata` already holds the freshly projected metadata from step 2.-The order is structural, not incidental. By the time a resolver or hook reads channel metadata, the channel has already updated its state and the projection is current.+The order is structural, not incidental. By the time a dynamic resolver reads `ctx.channel.metadata`, the channel has already updated its state and the projection is current.## What to read nextdiff --git a/docs/connections/overview.mdx b/docs/connections/overview.mdxindex 0067e1039..73320a7ba 100644--- a/docs/connections/overview.mdx+++ b/docs/connections/overview.mdx@@ -8,7 +8,7 @@ A connection wires an agent into an external server you don't author, either anConnections live under `agent/connections/`. A static connection's runtime name comes from the filename, so `agent/connections/linear.ts` registers as `"linear"`. A dynamic connection file can instead resolve a caller-specific connection set at session or turn boundaries. The model never sees a connection's URL or credentials. It finds tools with the built-in [`eve__search`](/docs/concepts/built-in-tools#eve__search-eve__tool-and-eve__skill), where a query such as `linear__` searches one connection's tools, and calls them with `eve__tool`. Stream events, approval policies, and hooks name each call by its qualified name, `<connection>__<tool>` (e.g. `linear__list_issues`).-A connection owns its name and every name that starts with `<name>__`, so `linear__list_issues` always means the `linear` connection's `list_issues` tool. The compiler rejects a tool, subagent, or connection whose name is a static connection's name or starts with its `<name>__` prefix. eve applies the same rule to dynamic connections, tools, and subagents when they resolve. Both errors name the two sides of the conflict; rename either one.+A connection owns its name and every name that starts with `<name>__`, so `linear__list_issues` always means the `linear` connection's `list_issues` tool. The compiler rejects a tool, subagent, or connection whose name is a static connection's name or starts with its `<name>__` prefix. eve applies the same rule to dynamic connections, tools, and subagents when they resolve, except that a dynamic connection with exactly a static connection's name replaces that static connection; see [Naming and conflicts](/docs/guides/dynamic-capabilities#naming-and-conflicts). Both errors name the two sides of the conflict; rename either one.## MCP connectionsdiff --git a/docs/guides/deployment/self-hosting.md b/docs/guides/deployment/self-hosting.mdindex dc727e026..c52ccecbb 100644--- a/docs/guides/deployment/self-hosting.md+++ b/docs/guides/deployment/self-hosting.md@@ -34,6 +34,7 @@ You can instead select an installed Workflow world package in the root `agent.tsimport { defineAgent } from "eve";export default defineAgent({+ model: "anthropic/claude-opus-5.5",experimental: {workflow: {world: "@acme/eve-workflow-world",diff --git a/docs/memory/overview.mdx b/docs/memory/overview.mdxindex fe8ea9933..47ac2f2ea 100644--- a/docs/memory/overview.mdx+++ b/docs/memory/overview.mdx@@ -87,7 +87,8 @@ automatically or only through explicit tool calls.`fileMemory()` from `eve/memory/file` keeps one bounded document per scope andgives the model `save_memory` and `remove_memory` tools. It does not extractfacts automatically; the model decides what to save. It needs no external-service in `eve dev` and stores to Vercel Blob when deployed to Vercel, which+service in `eve dev` and stores to Vercel Blob when deployed to Vercel with Blob+configured, whichmakes it the shortest path to a working slot.Read [File memory](/docs/memory/file) for size limits, storage backends, and options.diff --git a/docs/tools/overview.mdx b/docs/tools/overview.mdxindex e40607269..297abdbc8 100644--- a/docs/tools/overview.mdx+++ b/docs/tools/overview.mdx@@ -174,7 +174,8 @@ export default defineTool({});```-eve publishes every earlier yield as an `action.partial` stream event. The+eve publishes earlier yields as `action.partial` stream events. When the durable+writer is busy, eve may keep only the newest adjacent snapshot for a call. Thesnapshot is visible to channels, hooks, and clients but never enters modelhistory or `toModelOutput`; only the final yield does. Treat snapshots aslast-write-wins by tool call id, not append-only progress. The durable runtimediff --git a/docs/tools/tasks-upgrade.md b/docs/tools/tasks-upgrade.mdindex b8b74a2aa..5aaed93ae 100644--- a/docs/tools/tasks-upgrade.md+++ b/docs/tools/tasks-upgrade.md@@ -158,15 +158,18 @@ reports each wait with the new `turn.waiting` event, which carries the open turnsubagent's question, emitted `turn.completed` and `session.waiting` in the middle of the turn.It now emits `input.requested` or `authorization.required`, then `turn.waiting`, and the turnresumes under the same `turnId` after the answer. The session you answer on emits- `input.resolved` for every question it routes an answer to. A tool approval the turn itself- requests still ends the turn with `turn.completed` and `session.waiting`.+ `input.resolved` for every question it routes an answer to. A sign-in or tool approval the+ turn itself requests holds the turn the same way, with `turn.waiting` on `"input"`.- **`turn.completed` comes only when the turn really ends,** and `session.waiting` always meansthe turn has ended.The TypeScript client's `send(...).result()` reads past `turn.waiting` and returns the final reply-of a held turn, not the text written before the wait. It stops at `turn.waiting` only while a-question is pending, and returns `status: "waiting"` with that question; `respond()` then reads the-same turn to its end. A custom client that ends a response at `turn.completed` or+of a held turn, not the text written before the wait. At `turn.waiting`, an unanswered input+request (a question, approval, or `session-limit` prompt) makes `result()` return+`status: "waiting"`; use `respond()` to answer it and continue reading the same turn.+A sign-in keeps the response attached while its authorization callback is pending. Render the+sign-in prompt from the live `authorization.required` event rather than waiting for `result()`.+A custom client that ends a response at `turn.completed` or`session.waiting` mid-turn, or that shows the first completed message as the reply, should followthe same rule. See [Aggregate a turn](/docs/guides/client/streaming#aggregate-a-turn).@@ -197,5 +200,7 @@ Two things differ from a remote agent on the caller's own release:Each protocol-1 create logs `serving a remote agent protocol 1 caller` with the caller's origin.-Upgrade a caller after every remote agent it calls. A caller on this release fails a call at start,-with an error that names both versions, when the remote agent's deployment speaks protocol 1.+Upgrade a caller after every remote agent it calls. A caller on this release accepts a protocol-1+remote agent's results and failures, but that remote agent's approvals and sign-in requests don't+reach the caller. Any other protocol mismatch fails the call at start, with an error that names+both versions.diff --git a/docs/tools/tasks.md b/docs/tools/tasks.mdindex 67683b9c5..358263acb 100644--- a/docs/tools/tasks.md+++ b/docs/tools/tasks.md@@ -232,9 +232,12 @@ continues once the person answers or signs in.In every session, `turn.completed` comes only when the turn really ends. The TypeScript client's`send(...).result()` and the MCP channel's `agent_get` read past `turn.waiting` and report the-final reply rather than the text written before the wait. `result()` stops at `turn.waiting` only-while a question is pending or the turn waits on a sign-in or approval, and returns-`status: "waiting"`; `respond()` then reads the same turn to its end. See [Aggregate a turn](/docs/guides/client/streaming#aggregate-a-turn).+final reply rather than the text written before the wait. At `turn.waiting`, an unanswered input+request (a question, approval, or `session-limit` prompt) makes `result()` return+`status: "waiting"`; use `respond()` to answer it and continue reading the same turn.+A sign-in keeps the response attached while its authorization callback is pending. Render the+sign-in prompt from the live `authorization.required` event rather than waiting for `result()`.+See [Aggregate a turn](/docs/guides/client/streaming#aggregate-a-turn).Channels such as [Slack](/docs/channels/slack) post a root session's text before the wait as anordinary reply, then post the reply after the results as another message. Slack also shows eachturn's tasks in a live [task card](/docs/channels/slack#task-card).diff --git a/docs/tutorial/connect-a-warehouse.mdx b/docs/tutorial/connect-a-warehouse.mdxindex f1637897f..3935956c5 100644--- a/docs/tutorial/connect-a-warehouse.mdx+++ b/docs/tutorial/connect-a-warehouse.mdx@@ -72,7 +72,7 @@ If the user has not authorized the connector, the turn parks and the channel sho## The token never reaches the model-Right before each request to the MCP server, eve resolves the bearer and sends it as `Authorization: Bearer <token>`. The model sees tool names, descriptions, and results. The credential stays in the app runtime.+Right before each request to the MCP server, eve resolves the user's bearer and, once the user has authorized, sends it as `Authorization: Bearer <token>`. The model sees tool names, descriptions, and results. The credential stays in the app runtime.Gate the connection behind approval (`approval: once()`) or narrow which tools the model sees (`tools.allow`) when needed. See [MCP connections](../connections/mcp).diff --git a/docs/tutorial/run-analysis.mdx b/docs/tutorial/run-analysis.mdxindex 8fc3b5543..798627c8e 100644--- a/docs/tutorial/run-analysis.mdx+++ b/docs/tutorial/run-analysis.mdx@@ -217,7 +217,7 @@ This example caps charts at 1 MiB because tool outputs are persisted with sessio## Secrets stay out of the sandbox-The sandbox has no `process.env` and no access to your app's secrets. The `run_sql` tool and sample database run in your app. You pass only the query results to the chart tool; the sandbox does not need database credentials.+The sandbox doesn't inherit your app's `process.env`. Secrets you pass explicitly through an environment or per-call `env` option are available inside the sandbox. The `run_sql` tool and sample database run in your app. You pass only the query results to the chart tool; the sandbox does not need database credentials.The local backend runs the sandbox on your laptop during `eve dev`; on Vercel it runs on Vercel Sandbox. Lifecycle, backends, and network policy are in [Sandbox](../sandbox).