eve 0.52.1 → 0.52.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +40 -0
- package/dist/src/channel/types.d.ts +1 -0
- package/dist/src/chunks/{use-eve-agent-CxkGSusZ.js → use-eve-agent-BR8EpIOX.js} +46 -19
- package/dist/src/chunks/{use-eve-agent-Crmh_YB-.js → use-eve-agent-XnfjQt1Z.js} +46 -19
- package/dist/src/cli/commands/deploy.js +1 -1
- package/dist/src/cli/commands/extension-init.d.ts +2 -1
- package/dist/src/cli/commands/extension-init.js +1 -1
- package/dist/src/cli/commands/init.d.ts +2 -13
- package/dist/src/cli/commands/init.js +1 -1
- package/dist/src/cli/dev/run-interactive-ui.d.ts +3 -0
- package/dist/src/cli/dev/run-interactive-ui.js +1 -1
- package/dist/src/cli/dev/tui/prompt-command-handler.js +1 -1
- package/dist/src/cli/dev/tui/runner.d.ts +6 -0
- package/dist/src/cli/dev/tui/runner.js +1 -1
- package/dist/src/cli/dev/tui/setup-commands.d.ts +5 -3
- package/dist/src/cli/dev/tui/setup-commands.js +2 -2
- package/dist/src/cli/dev/tui/status-line.js +1 -1
- package/dist/src/cli/dev/tui/subagent-pump.js +1 -1
- package/dist/src/cli/dev/tui/tui.d.ts +4 -0
- package/dist/src/cli/dev/tui/tui.js +1 -1
- package/dist/src/cli/run.d.ts +1 -1
- package/dist/src/cli/run.js +2 -2
- package/dist/src/cli/telemetry/index.d.ts +15 -0
- package/dist/src/cli/telemetry/index.js +2 -2
- package/dist/src/client/eve-agent-store.js +1 -1
- package/dist/src/client/ndjson.js +1 -1
- package/dist/src/client/session.js +1 -1
- package/dist/src/compiled/.vendor-stamp.json +1 -1
- package/dist/src/compiler/compile-from-memory.d.ts +1 -0
- package/dist/src/compiler/compile-from-memory.js +1 -1
- package/dist/src/compiler/default-tool-policy.d.ts +6 -0
- package/dist/src/compiler/default-tool-policy.js +1 -0
- package/dist/src/compiler/extension-compatibility.d.ts +18 -18
- package/dist/src/compiler/extension-compatibility.js +1 -1
- package/dist/src/compiler/manifest.js +1 -1
- package/dist/src/compiler/normalize-agent-config.js +1 -1
- package/dist/src/compiler/normalize-manifest.js +1 -1
- package/dist/src/context/build-dynamic-tools.d.ts +2 -1
- package/dist/src/context/build-dynamic-tools.js +1 -1
- package/dist/src/context/dynamic-tool-lifecycle.d.ts +3 -3
- package/dist/src/context/dynamic-tool-lifecycle.js +1 -1
- package/dist/src/context/dynamic-tool-metadata.d.ts +1 -1
- package/dist/src/context/hook-lifecycle.js +1 -1
- package/dist/src/context/keys.d.ts +2 -0
- package/dist/src/context/keys.js +1 -1
- package/dist/src/evals/cli/eval.js +1 -1
- package/dist/src/eve-channel/index.js +1 -1
- package/dist/src/execution/activity-events.d.ts +1 -0
- package/dist/src/execution/activity-events.js +1 -1
- package/dist/src/execution/node-step.js +1 -1
- package/dist/src/execution/sandbox/prewarm.js +1 -1
- package/dist/src/execution/session-activity-projection.js +1 -1
- package/dist/src/execution/session-activity.js +1 -1
- package/dist/src/execution/settle-cancelled-turn-step.js +1 -1
- package/dist/src/execution/tasks/parent/dispatch.js +1 -1
- package/dist/src/execution/tasks/parent/task-cancel.d.ts +2 -2
- package/dist/src/execution/tasks/parent/task-cancel.js +1 -1
- package/dist/src/execution/tasks/parent/tool-execution.js +1 -1
- package/dist/src/execution/tools/sleep-workflow.js +1 -1
- package/dist/src/execution/workflow-runtime.js +1 -1
- package/dist/src/execution/workflow-steps.js +1 -1
- package/dist/src/execution/workflow-webhook-route.js +1 -1
- package/dist/src/framework/sources/registry.js +1 -1
- package/dist/src/harness/action-presentation.d.ts +13 -0
- package/dist/src/harness/action-presentation.js +1 -0
- package/dist/src/harness/approval-delivery-coordinator.js +1 -1
- package/dist/src/harness/compaction-prompt.d.ts +1 -0
- package/dist/src/harness/compaction-prompt.js +1 -1
- package/dist/src/harness/compaction.js +1 -1
- package/dist/src/harness/coordination.js +1 -1
- package/dist/src/harness/emission.d.ts +1 -6
- package/dist/src/harness/emission.js +1 -1
- package/dist/src/harness/execute-tool.d.ts +2 -1
- package/dist/src/harness/finish-reason.d.ts +3 -0
- package/dist/src/harness/finish-reason.js +1 -0
- package/dist/src/harness/provider-tool-schemas.d.ts +1 -0
- package/dist/src/harness/provider-tool-schemas.js +1 -1
- package/dist/src/harness/step-hooks.js +1 -1
- package/dist/src/harness/stream-actions.d.ts +2 -2
- package/dist/src/harness/stream-actions.js +1 -1
- package/dist/src/harness/tool-call-input-errors.d.ts +4 -3
- package/dist/src/harness/tool-call-input-errors.js +1 -1
- package/dist/src/harness/tool-loop.js +2 -2
- package/dist/src/harness/tool-presentation.d.ts +5 -0
- package/dist/src/harness/tool-presentation.js +1 -0
- package/dist/src/harness/turn-client-context.d.ts +1 -0
- package/dist/src/harness/workflow-lifecycle.d.ts +2 -3
- package/dist/src/harness/workflow-lifecycle.js +1 -1
- package/dist/src/internal/application/compiled-artifacts.d.ts +3 -0
- package/dist/src/internal/application/compiled-artifacts.js +1 -1
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/internal/authored-definition/core.js +1 -1
- package/dist/src/internal/authored-definition/schema-backed.js +1 -1
- package/dist/src/internal/authored-module-conditions.d.ts +2 -0
- package/dist/src/internal/authored-module-conditions.js +1 -0
- package/dist/src/internal/authored-module-loader.d.ts +3 -0
- package/dist/src/internal/authored-module-loader.js +3 -3
- package/dist/src/internal/authored-module-map-loader.d.ts +3 -1
- package/dist/src/internal/authored-module-map-loader.js +1 -1
- package/dist/src/internal/authored-runtime-modules.d.ts +2 -0
- package/dist/src/internal/authored-runtime-modules.js +1 -1
- package/dist/src/internal/bundler/nitro-rolldown.d.ts +1 -0
- package/dist/src/internal/bundler/nitro-rolldown.js +1 -1
- package/dist/src/internal/nitro/development-generation.d.ts +2 -0
- package/dist/src/internal/nitro/development-generation.js +1 -1
- package/dist/src/internal/nitro/host/configure-nitro-routes.js +1 -1
- package/dist/src/internal/nitro/host/create-application-nitro.js +1 -1
- package/dist/src/internal/nitro/host/prepare-application-host.js +1 -1
- package/dist/src/internal/nitro/routes/channel-request-instrumentation.js +1 -1
- package/dist/src/internal/node-esm-compat-banner.d.ts +19 -6
- package/dist/src/internal/node-esm-compat-banner.js +2 -2
- package/dist/src/internal/workflow-bundle/builder-support.d.ts +5 -0
- package/dist/src/internal/workflow-bundle/builder.js +2 -2
- package/dist/src/internal/workflow-bundle/dynamic-tool-transform.d.ts +1 -1
- package/dist/src/internal/workflow-bundle/dynamic-tool-transform.js +1 -1
- package/dist/src/internal/workflow-bundle/workflow-core-shim.js +1 -1
- package/dist/src/protocol/activity.d.ts +6 -0
- package/dist/src/protocol/activity.js +1 -1
- package/dist/src/protocol/message.d.ts +13 -1
- package/dist/src/protocol/message.js +1 -1
- package/dist/src/public/channels/slack/activity-plan.js +1 -1
- package/dist/src/public/channels/slack/activity.js +2 -2
- package/dist/src/public/channels/slack/connections.d.ts +2 -2
- package/dist/src/public/channels/slack/connections.js +1 -1
- package/dist/src/public/memory/file/backends/default.js +1 -1
- package/dist/src/public/models/openai/chatgpt/credential-store.d.ts +6 -0
- package/dist/src/public/models/openai/chatgpt/credential-store.js +1 -0
- package/dist/src/public/models/openai/chatgpt/model.d.ts +1 -1
- package/dist/src/public/models/openai/chatgpt/oauth.d.ts +20 -0
- package/dist/src/public/models/openai/chatgpt/oauth.js +1 -0
- package/dist/src/public/models/openai/chatgpt/token-broker.d.ts +4 -3
- package/dist/src/public/models/openai/chatgpt/token-broker.js +1 -1
- package/dist/src/public/models/openai/chatgpt/transport.d.ts +1 -2
- package/dist/src/public/models/openai/index.d.ts +3 -4
- package/dist/src/public/tools/agent.d.ts +1 -0
- package/dist/src/public/tools/agent.js +1 -0
- package/dist/src/public/tools/ask-question.d.ts +1 -0
- package/dist/src/public/tools/ask-question.js +1 -0
- package/dist/src/public/tools/connection-search.d.ts +1 -0
- package/dist/src/public/tools/connection-search.js +1 -0
- package/dist/src/public/tools/index.d.ts +1 -1
- package/dist/src/public/tools/task-cancel.d.ts +1 -0
- package/dist/src/public/tools/task-cancel.js +1 -0
- package/dist/src/public/tools/task-update.d.ts +1 -0
- package/dist/src/public/tools/task-update.js +1 -0
- package/dist/src/runtime/connections/openapi-schema.js +1 -1
- package/dist/src/runtime/prompt/compose.js +1 -1
- package/dist/src/runtime/resolve-agent.js +1 -1
- package/dist/src/runtime/resolve-tool.js +1 -1
- package/dist/src/runtime/subagents/dynamic-agent-config.js +1 -1
- package/dist/src/runtime/types.d.ts +2 -0
- package/dist/src/self-modification/agent.js +1 -1
- package/dist/src/self-modification/extension/instructions.d.ts +1 -3
- package/dist/src/self-modification/extension/instructions.js +4 -2
- package/dist/src/self-modification/filesystem.js +1 -1
- package/dist/src/setup/flows/chatgpt-auth.d.ts +14 -2
- package/dist/src/setup/flows/chatgpt-auth.js +1 -1
- package/dist/src/setup/flows/model.d.ts +3 -2
- package/dist/src/setup/flows/model.js +1 -1
- package/dist/src/setup/flows/provider.js +1 -1
- package/dist/src/setup/flows/registry.d.ts +4 -0
- package/dist/src/setup/flows/registry.js +1 -1
- package/dist/src/setup/integrations/file-memory/vercel.d.ts +2 -2
- package/dist/src/setup/integrations/file-memory/vercel.js +1 -1
- package/dist/src/setup/scaffold/create/project.js +1 -1
- package/dist/src/shared/agent-definition.d.ts +7 -0
- package/dist/src/shared/boundary-hook-error.d.ts +4 -0
- package/dist/src/shared/boundary-hook-error.js +1 -0
- package/dist/src/{execution/activity-text.d.ts → shared/presentation-text.d.ts} +1 -1
- package/dist/src/shared/presentation-text.js +1 -0
- package/dist/src/svelte/index.js +1 -1
- package/dist/src/svelte/use-eve-agent.js +1 -1
- package/dist/src/tools/definition.d.ts +29 -0
- package/dist/src/tools/definition.js +1 -1
- package/dist/src/tools/durable-callbacks.d.ts +40 -9
- package/dist/src/tools/durable-callbacks.js +1 -1
- package/dist/src/tools/dynamic.d.ts +4 -1
- package/dist/src/tools/framework/agent-contract.js +1 -1
- package/dist/src/tools/provided/bash.js +1 -1
- package/dist/src/tools/provided/glob.js +1 -1
- package/dist/src/tools/provided/grep.js +1 -1
- package/dist/src/tools/provided/load-skill.js +1 -1
- package/dist/src/tools/provided/read-file.js +1 -1
- package/dist/src/tools/provided/web-fetch.js +1 -1
- package/dist/src/tools/provided/write-file.js +1 -1
- package/dist/src/tools/tool-label.d.ts +1 -0
- package/dist/src/tools/tool-label.js +1 -0
- package/dist/src/tracing/agent-action-instrumentation.js +1 -1
- package/dist/src/tracing/agent-approval-instrumentation.js +1 -1
- package/dist/src/tracing/agent-channel-delivery-instrumentation.js +1 -1
- package/dist/src/tracing/agent-otel-provider.js +2 -2
- package/dist/src/tracing/agent-otel-session-context.js +1 -1
- package/dist/src/tracing/agent-otel-usage.d.ts +10 -0
- package/dist/src/tracing/agent-otel-usage.js +1 -1
- package/dist/src/tracing/agent-span-naming.d.ts +1 -0
- package/dist/src/tracing/agent-span-naming.js +1 -0
- package/dist/src/tracing/agent-tool-instrumentation.js +1 -1
- package/dist/src/vue/index.js +1 -1
- package/dist/src/vue/use-eve-agent.js +1 -1
- package/docs/channels/slack.mdx +2 -0
- package/docs/concepts/built-in-tools.md +397 -68
- package/docs/concepts/default-harness.md +6 -0
- package/docs/concepts/sessions-runs-and-streaming.md +4 -0
- package/docs/connections/openapi.mdx +4 -0
- package/docs/connections/overview.mdx +1 -1
- package/docs/evals/running.mdx +2 -0
- package/docs/guides/client/continuations.mdx +11 -0
- package/docs/guides/client/streaming.mdx +7 -1
- package/docs/guides/dynamic-capabilities.md +5 -5
- package/docs/guides/frontend/overview.mdx +1 -1
- package/docs/guides/hooks.md +1 -1
- package/docs/guides/instrumentation.md +40 -1
- package/docs/guides/remote-agents.md +2 -0
- package/docs/instructions.mdx +1 -1
- package/docs/memory/custom-provider.md +4 -1
- package/docs/memory/file.md +25 -12
- package/docs/memory/overview.mdx +45 -13
- package/docs/reference/cli.md +6 -0
- package/docs/reference/telemetry.md +2 -2
- package/docs/reference/typescript-api.md +13 -9
- package/docs/sandbox.mdx +14 -2
- package/docs/subagents/index.mdx +8 -4
- package/docs/tools/overview.mdx +44 -2
- package/docs/tools/workflows.mdx +9 -1
- package/docs/tutorial/connect-a-warehouse.mdx +49 -26
- package/docs/tutorial/first-agent.mdx +20 -19
- package/docs/tutorial/guard-the-spend.mdx +4 -4
- package/docs/tutorial/how-it-runs.mdx +2 -3
- package/docs/tutorial/meta.json +2 -2
- package/docs/tutorial/query-sample-data.mdx +30 -19
- package/docs/tutorial/remember-definitions.mdx +5 -5
- package/docs/tutorial/run-analysis.mdx +155 -18
- package/docs/tutorial/ship-it.mdx +71 -81
- package/docs/tutorial/team-playbooks.mdx +10 -10
- package/package.json +32 -7
- package/dist/src/execution/activity-text.js +0 -1
- package/dist/src/internal/workflow-bundle/authored-workflow-modules.d.ts +0 -9
- package/dist/src/internal/workflow-bundle/authored-workflow-modules.js +0 -1
- package/dist/src/public/models/openai/chatgpt/codex-app-server.d.ts +0 -40
- package/dist/src/public/models/openai/chatgpt/codex-app-server.js +0 -1
|
@@ -219,7 +219,7 @@ the handler.
|
|
|
219
219
|
|
|
220
220
|
## Dynamic tools
|
|
221
221
|
|
|
222
|
-
Pass `defineDynamic` an `events` object whose handlers return either a single `defineTool(...)`, a `Record<string, defineTool(...)>`, or `null` for no tools. Wrap every entry in `defineTool()`. eve records durable descriptors for `execute`, approval request and response policies, and `toModelOutput`, so a parked call can reconstruct the same callbacks in a fresh process.
|
|
222
|
+
Pass `defineDynamic` an `events` object whose handlers return either a single `defineTool(...)`, a `Record<string, defineTool(...)>`, or `null` for no tools. Wrap every entry in `defineTool()`. eve records durable descriptors for `execute`, approval request and response policies, input-scoped `approvalKey` callbacks, and `toModelOutput`, so a parked call can reconstruct the same callbacks in a fresh process.
|
|
223
223
|
|
|
224
224
|
Dynamic tool executors receive the same `ToolContext` as static authored tools, including inline provider auth through `ctx.getToken(provider)` and `ctx.requireAuth(provider)`.
|
|
225
225
|
|
|
@@ -257,11 +257,11 @@ Call expressions such as `execute: makeExecutor()` are not transformed. Put the
|
|
|
257
257
|
|
|
258
258
|
### Identity and redeploys
|
|
259
259
|
|
|
260
|
-
A parked call binds to its callback
|
|
260
|
+
A parked call binds to its callback within its session, lifecycle scope, and resolver entry. Another session or scope can expose the same tool name without replacing that binding. Callback identity does not depend on source position:
|
|
261
261
|
|
|
262
|
-
- Editing a callback body
|
|
263
|
-
- If a persisted callback has no registered implementation (fresh process
|
|
264
|
-
- If the
|
|
262
|
+
- Editing a callback body while keeping its resolver entry and tool names is safe: replaying a parked call runs the latest deployed code with the closure values snapshotted when the call was made.
|
|
263
|
+
- If a persisted session-scoped callback has no registered implementation (a fresh process, a redeploy, or an expired in-process binding), eve re-runs `session.started` resolvers once to rebind it, then replays.
|
|
264
|
+
- If the owning resolver no longer returns that tool, replay fails closed with an explicit error instead of invoking something else. Ordinary turn-scoped and step-scoped tools are not rebound; a parked call to a missing one errors. Framework-provided resolvers such as memory provider-tool wrappers opt into the same generic missing-callback rebind while preserving their locked scope.
|
|
265
265
|
|
|
266
266
|
### Naming
|
|
267
267
|
|
|
@@ -306,7 +306,7 @@ then save a final snapshot in `onFinish`.
|
|
|
306
306
|
|
|
307
307
|
For multiple chat threads, keep one saved event log and session cursor per thread. `agent`, `host`, `reducer`, `session`, `initialEvents`, `initialSession`, `auth`, `headers`, `optimistic`, and `resume` are read when the hook creates its store, so remount the chat component when switching threads, for example with `key={chat.id}`.
|
|
308
308
|
|
|
309
|
-
Pass `resume: true` with `initialSession` to rebuild the projection from the durable stream after mount. While `status` is `"resuming"`, render hydrated `data` but disable message and HITL submission; do not present cancellation or active-turn progress controls. If catch-up finds an in-flight turn, `status` changes to `"streaming"` before the binding follows it to a boundary. A settled tail changes directly to `"ready"
|
|
309
|
+
Pass `resume: true` with `initialSession` to rebuild the projection from the durable stream after mount. While `status` is `"resuming"`, render hydrated `data` but disable message and HITL submission; do not present cancellation or active-turn progress controls. If catch-up finds an in-flight turn, `status` changes to `"streaming"` before the binding follows it to a boundary. A settled tail changes directly to `"ready"` after a bounded catch-up check, without waiting for the live stream idle timeout. If that check finds a newly started turn or pending authorization, eve keeps following it. A terminal session failure changes to `"error"`.
|
|
310
310
|
|
|
311
311
|
```tsx
|
|
312
312
|
const agent = useEveAgent({
|
package/docs/guides/hooks.md
CHANGED
|
@@ -176,7 +176,7 @@ Hooks always run after the event is durably recorded, so if a hook throws, the s
|
|
|
176
176
|
|
|
177
177
|
## What happens when a hook throws
|
|
178
178
|
|
|
179
|
-
A thrown handler propagates through the emit composer and surfaces as `turn.failed`. If a hook subscribed to a failure-cascade event also throws, it escalates to `session.failed`. For belt-and-suspenders semantics inside a hook, wrap the body in `try`/`catch`. eve treats a thrown hook as a real failure.
|
|
179
|
+
A thrown handler propagates through the emit composer and surfaces as `turn.failed`. In a conversation session, this includes handlers for `turn.started` and the first `step.started` of a model call: the failed turn ends with `session.waiting`, and the next message can start another turn. Task-mode boundary failures remain terminal. If a hook subscribed to a failure-cascade event also throws, it escalates to `session.failed`. For belt-and-suspenders semantics inside a hook, wrap the body in `try`/`catch`. eve treats a thrown hook as a real failure.
|
|
180
180
|
|
|
181
181
|
## Subagent isolation
|
|
182
182
|
|
|
@@ -97,6 +97,45 @@ retry behavior. Best-effort activity delivery keeps its single
|
|
|
97
97
|
`[eve:execution.activity-submit] activity sink request failed` warning and does
|
|
98
98
|
not mark the active span as failed.
|
|
99
99
|
|
|
100
|
+
## Exported span names and outcomes
|
|
101
|
+
|
|
102
|
+
The built-in OpenTelemetry provider preserves each span's OTel name and adds
|
|
103
|
+
`operation.name` and `resource.name` for Datadog's operation/resource mapping:
|
|
104
|
+
|
|
105
|
+
| OTel span name | `operation.name` | `resource.name` |
|
|
106
|
+
| ------------------------------------------------------------------------------------------------------------------ | ----------------- | ---------------------- |
|
|
107
|
+
| `invoke_agent weather` | `invoke_agent` | `invoke_agent weather` |
|
|
108
|
+
| `execute_tool search` | `execute_tool` | `execute_tool search` |
|
|
109
|
+
| `chat <model>` | `chat` | `chat <model>` |
|
|
110
|
+
| `agent.session`, `agent.step`, `agent.action`, `agent.approval`, `agent.channel.delivery`, `agent.channel.request` | Same as span name | Same as span name |
|
|
111
|
+
|
|
112
|
+
These attributes apply to eve-owned spans in local tracing and the
|
|
113
|
+
[instrumentation provider layout](./instrumentation-providers). They do not
|
|
114
|
+
rename Workflow, AI SDK, or other third-party spans, or change trace IDs,
|
|
115
|
+
parenting, sampling, or session grouping. Legacy `instrumentation.ts` setup
|
|
116
|
+
still owns its exporter configuration and [authored trace
|
|
117
|
+
hierarchy](#authored-trace-hierarchy).
|
|
118
|
+
|
|
119
|
+
In Datadog APM, `operation_name:invoke_agent resource_name:"invoke_agent weather"`
|
|
120
|
+
selects named agent invocations. Operation-based dashboards and monitors may
|
|
121
|
+
need to replace inferred names such as `otel.span` with these explicit names.
|
|
122
|
+
Keep session IDs, turn IDs, and message content in attributes, not operation or
|
|
123
|
+
resource names.
|
|
124
|
+
|
|
125
|
+
If an eve-owned span still appears as `otel.span`, inspect its exported OTel
|
|
126
|
+
name, `operation.name`, and `resource.name` before and after any drain or
|
|
127
|
+
Collector transforms. Datadog's [operation-name mapping
|
|
128
|
+
guide](https://docs.datadoghq.com/opentelemetry/migrate/migrate_operation_names/)
|
|
129
|
+
describes the explicit override. Exported fields must survive the ingestion
|
|
130
|
+
path; a local export does not prove that a hosted backend retained them.
|
|
131
|
+
|
|
132
|
+
Agent invocation spans carry `agent.turn.outcome=completed|failed|cancelled`
|
|
133
|
+
when the turn has a terminal outcome. A failed invocation also has OTel error
|
|
134
|
+
status; cancellation is not an error. The scalar outcome survives backends
|
|
135
|
+
that discard span events, including Sentry's [direct OTLP
|
|
136
|
+
intake](https://docs.sentry.io/concepts/otlp/direct/traces/). These attributes
|
|
137
|
+
remain available when model and tool content is redacted.
|
|
138
|
+
|
|
100
139
|
## Runtime context
|
|
101
140
|
|
|
102
141
|
_Runtime context_ is an [AI SDK concept](https://ai-sdk.dev/docs/reference/ai-sdk-core/stream-text): a user-defined object that flows through a generation lifecycle. eve exposes it through `events["step.started"]`, a callback that runs once eve has assembled the model input for an attempt and returns `{ runtimeContext }`. Because eve registers the AI SDK's OpenTelemetry integration with runtime context enabled, those returned values ride onto the model-call span and its children. The field is named `runtimeContext`, not `metadata`, because AI SDK v7 carries per-call attributes on runtime context rather than a dedicated metadata field.
|
|
@@ -156,7 +195,7 @@ ai.eve.turn {eve.session.id}
|
|
|
156
195
|
|
|
157
196
|
eve creates the `ai.eve.turn` parent span per turn and passes enriched telemetry to the AI SDK so model calls and tool executions are traced automatically. The AI SDK's OpenTelemetry integration names these spans after the [OpenTelemetry GenAI semantic conventions](https://opentelemetry.io/docs/specs/semconv/gen-ai/), so backends that understand `gen_ai.operation.name` can classify them without extra configuration. The `invoke_agent` span is named after the model; the agent name is on its `gen_ai.agent.name` attribute.
|
|
158
197
|
|
|
159
|
-
This hierarchy applies when eve passes telemetry to the AI SDK. When the `otel()` provider layout is declared and eve owns the agent spans, eve names
|
|
198
|
+
This hierarchy applies when eve passes telemetry to the AI SDK. When the `otel()` provider layout is declared and eve owns the agent spans, eve names its invocation span `invoke_agent <agent>` and its model-attempt spans `agent.step`. Session, turn, step, and channel context is injected as the framework half of the runtime context (`eve.version`, `eve.session.id`, `eve.environment`, `eve.turn.id`, `eve.turn.sequence`, `eve.step.index`, `eve.channel.kind`) and rides onto the spans alongside any values your `events["step.started"]` callback returns under `runtimeContext`.
|
|
160
199
|
|
|
161
200
|
Set `traceChannelRequests: true` on `defineInstrumentation` to also wrap each inbound channel HTTP request in a single OpenTelemetry `SERVER` span named for the registered route, which parents the turn tree above (and any `hook.resume` and outgoing HTTP spans):
|
|
162
201
|
|
|
@@ -180,6 +180,8 @@ The parent stream carries the same `subagent.called`, `action.result`, and `suba
|
|
|
180
180
|
|
|
181
181
|
An admitted task survives cancellation of the turn that started it; background work that has not yet been admitted is rejected with the cancelled step. Use `task_cancel` to stop an admitted task. eve resolves the remote's `headers` and `auth` again for every cancellation attempt, so rotating credentials work the same way as they do for session creation. Cancellation always uses the standard eve cancel path on `url`, even when `path` customizes only the create-session endpoint. The remote child reports `turn.cancelled` → `session.waiting` on its own stream; an older or unreachable remote is logged but cannot turn the parent's cancellation into a failure.
|
|
182
182
|
|
|
183
|
+
You can also steer a running remote background child by calling its subagent tool with the same `agentId` and an updated `message`. eve cancels the old task and requests cancellation of the remote turn before continuing the same remote session under a new task ID. The remote must support the standard eve cancellation and session-message routes. See [Agent messaging](../subagents#agent-messaging) for the shared steering contract.
|
|
184
|
+
|
|
183
185
|
When the parent session ends, eve sends an authenticated `POST /eve/v1/session/:childSessionId/reset` for each remote child. Reset retires the parked remote session and recursively cleans up its descendants. The request uses freshly resolved `headers` and `auth`; failures are logged so an unreachable remote cannot block parent finalization.
|
|
184
186
|
|
|
185
187
|
A failed _start_ rejects admission before a task receipt is returned. After a remote starts, a terminal failure callback fails the task and notifies the parent with the remote's error (or `REMOTE_AGENT_FAILED` when none is supplied). Terminal callback delivery runs as a durable step on the underlying workflow engine (see [Execution model & durability](../concepts/execution-model-and-durability)). A failed callback POST is rethrown rather than marking the task complete, so the engine retries it.
|
package/docs/instructions.mdx
CHANGED
|
@@ -86,7 +86,7 @@ See [Dynamic capabilities](./guides/dynamic-capabilities) for examples and failu
|
|
|
86
86
|
|
|
87
87
|
[Compaction](./concepts/sessions-runs-and-streaming#compact-clear-and-reset) treats user-role instructions like ordinary conversation history, so a summary may replace their original text. Clear removes them with the rest of model-message history and does not rerun static or dynamic instructions. System-role instructions remain because they are outside history.
|
|
88
88
|
|
|
89
|
-
Keep system-role content stable and place it before frequently changing context when practical. That gives providers the best opportunity to reuse a prompt prefix, but cache behavior and billing remain provider-specific. User-role instructions preserve the normal append-only message prefix
|
|
89
|
+
Keep system-role content stable and place it before frequently changing context when practical. That gives providers the best opportunity to reuse a prompt prefix, but cache behavior and billing remain provider-specific. User-role instructions preserve the normal append-only message prefix. Framework context such as dynamic skill announcements also keeps its position before the current request across tool steps, including when a durable step resumes. eve does not promise a cache hit.
|
|
90
90
|
|
|
91
91
|
## Disclaimer
|
|
92
92
|
|
|
@@ -173,7 +173,10 @@ turn recalls the same data again.
|
|
|
173
173
|
## Failure behavior
|
|
174
174
|
|
|
175
175
|
- A throwing or invalid `recall["turn.started"]` fails the turn before the
|
|
176
|
-
model call. No slot's recall results are committed.
|
|
176
|
+
model call. No slot's recall results are committed. If the turn's
|
|
177
|
+
`abortSignal` is already aborted, eve treats the error as cancellation and
|
|
178
|
+
continues with any queued steering replacement. An `AbortError` with an active
|
|
179
|
+
signal still fails the turn.
|
|
177
180
|
- A throwing `capture["compaction.requested"]` leaves history unchanged.
|
|
178
181
|
- A throwing `recall["compaction.completed"]` fails an automatic turn. For
|
|
179
182
|
standalone compaction, eve logs the error and returns the session to waiting,
|
package/docs/memory/file.md
CHANGED
|
@@ -18,9 +18,10 @@ eve add memory/file
|
|
|
18
18
|
|
|
19
19
|
After you choose **Install and set up**, eve creates or reuses one private
|
|
20
20
|
Vercel Blob store for the linked project, connects it to production, preview,
|
|
21
|
-
and development
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
and development using OIDC, and pulls the updated environment. The connection
|
|
22
|
+
sets `EVE_MEMORY_BLOB_STORE_ID` and `EVE_MEMORY_BLOB_WEBHOOK_PUBLIC_KEY`
|
|
23
|
+
without adding a read-write token. It uses the project's first configured
|
|
24
|
+
function region, falling back to `iad1`. Blob usage may incur charges.
|
|
24
25
|
|
|
25
26
|
The registry writes:
|
|
26
27
|
|
|
@@ -96,13 +97,21 @@ provider: fileMemory({ backend: inMemory() });
|
|
|
96
97
|
### Vercel Blob
|
|
97
98
|
|
|
98
99
|
Provisioned bindings use the `EVE_MEMORY_BLOB_*` namespace so file memory does
|
|
99
|
-
not take over an application's own Blob store.
|
|
100
|
-
|
|
100
|
+
not take over an application's own Blob store. Vercel supplies the OIDC token;
|
|
101
|
+
the Blob SDK resolves the current token for each operation and handles refresh.
|
|
102
|
+
File-memory reads and writes need the store ID. The webhook public key is for upload callbacks
|
|
103
|
+
and is not used by file memory.
|
|
101
104
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
105
|
+
`fileMemory()` checks Vercel configuration in this order:
|
|
106
|
+
|
|
107
|
+
1. `EVE_MEMORY_BLOB_STORE_ID` with Vercel OIDC from the environment or request context
|
|
108
|
+
2. `EVE_MEMORY_BLOB_READ_WRITE_TOKEN`
|
|
109
|
+
3. `BLOB_STORE_ID` with Vercel OIDC from the environment or request context
|
|
110
|
+
4. `BLOB_READ_WRITE_TOKEN`
|
|
111
|
+
|
|
112
|
+
Prefer OIDC on Vercel. You do not need to set a read-write token or copy
|
|
113
|
+
`VERCEL_OIDC_TOKEN` into your configuration. Redeploy after connecting the
|
|
114
|
+
store: changes to project environment variables apply to new deployments.
|
|
106
115
|
|
|
107
116
|
Generic `BLOB_*` variables remain supported for a store you attach manually.
|
|
108
117
|
Run setup again without reinstalling the memory definition when a previous
|
|
@@ -113,8 +122,11 @@ eve integration setup file-memory
|
|
|
113
122
|
```
|
|
114
123
|
|
|
115
124
|
Setup repairs the deterministic unconnected private store left by a partial
|
|
116
|
-
run and reuses a complete `
|
|
117
|
-
|
|
125
|
+
run and reuses a complete `EVE_MEMORY_BLOB` connection. If an earlier setup
|
|
126
|
+
created an `EVE_MEMORY_` connection, reconnect that same store with the
|
|
127
|
+
`EVE_MEMORY_BLOB` prefix and OIDC in Vercel, then redeploy. Keep the existing
|
|
128
|
+
store to preserve its memory documents. Setup does not adopt an arbitrary
|
|
129
|
+
application store, change a `BLOB_*` connection, or replace a public
|
|
118
130
|
or incompatible store. If the linked project later moves to another primary
|
|
119
131
|
region, setup preserves the existing memory store and warns about the drift
|
|
120
132
|
instead of risking data loss.
|
|
@@ -134,7 +146,8 @@ provider: fileMemory({
|
|
|
134
146
|
`vercelBlob()` accepts `token`, `oidcToken`, `storeId`, and `prefix`. The
|
|
135
147
|
default prefix is `eve/memory/file`; documents are stored privately under
|
|
136
148
|
`<prefix>/<scope key>/MEMORY.md`. Passing these options continues to override
|
|
137
|
-
the generic environment defaults directly.
|
|
149
|
+
the generic environment defaults directly. Leave `oidcToken` unset on Vercel
|
|
150
|
+
so the Blob SDK can manage token refresh.
|
|
138
151
|
|
|
139
152
|
### Custom backend
|
|
140
153
|
|
package/docs/memory/overview.mdx
CHANGED
|
@@ -70,12 +70,23 @@ Every slot needs a provider. The provider decides how memory is stored, how
|
|
|
70
70
|
relevant context is retrieved, and whether the agent captures conversation
|
|
71
71
|
automatically or only through explicit tool calls.
|
|
72
72
|
|
|
73
|
-
| Provider
|
|
74
|
-
|
|
|
75
|
-
| [
|
|
76
|
-
| [
|
|
77
|
-
| [
|
|
78
|
-
| [
|
|
73
|
+
| Provider | Ships as | Recall | Capture |
|
|
74
|
+
| --------------------------------------- | ----------------------- | ------------------------------------------------------ | ---------------------------------------------------- |
|
|
75
|
+
| [File memory](#file-memory) | Built into eve | One bounded document per scope | Model-driven `save_memory` / `remove_memory` |
|
|
76
|
+
| [Supermemory](#supermemory) | `@supermemory/eve` | Semantic search over stored memories | Automatic after each turn, plus tools |
|
|
77
|
+
| [Upstash AgentKit](#upstash-agentkit) | `@upstash/agentkit-eve` | Ranked Redis Search recall or a Redis document backend | Automatic user-message capture or model-driven tools |
|
|
78
|
+
| [Kybernesis Arcana](#kybernesis-arcana) | `@kybernesis/arcana` | Semantic search and brain notes | Model-driven tools or optional automatic capture |
|
|
79
|
+
| [Your own provider](#build-your-own) | Your code | Whatever your store returns | Whatever rules you implement |
|
|
80
|
+
|
|
81
|
+
### File memory
|
|
82
|
+
|
|
83
|
+
`fileMemory()` from `eve/memory/file` keeps one bounded document per scope and
|
|
84
|
+
gives the model `save_memory` and `remove_memory` tools. It does not extract
|
|
85
|
+
facts automatically; the model decides what to save. It needs no external
|
|
86
|
+
service in `eve dev` and stores to Vercel Blob when deployed to Vercel, which
|
|
87
|
+
makes it the shortest path to a working slot.
|
|
88
|
+
|
|
89
|
+
Read [File memory](/docs/memory/file) for size limits, storage backends, and options.
|
|
79
90
|
|
|
80
91
|
### Supermemory
|
|
81
92
|
|
|
@@ -137,15 +148,36 @@ export default defineMemory({
|
|
|
137
148
|
See the [Upstash AgentKit integration page](/integrations/upstash-agentkit) for
|
|
138
149
|
options.
|
|
139
150
|
|
|
140
|
-
###
|
|
151
|
+
### Kybernesis Arcana
|
|
141
152
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
service in `eve dev` and stores to Vercel Blob when deployed to Vercel, which
|
|
146
|
-
makes it the shortest path to a working slot.
|
|
153
|
+
[Kybernesis Arcana](https://github.com/KybernesisAI/platform/tree/master/packages/arcana#readme)
|
|
154
|
+
backs a memory slot with semantic search and brain notes. It gives the model
|
|
155
|
+
tools to remember, recall, and search memory; capture is disabled by default.
|
|
147
156
|
|
|
148
|
-
|
|
157
|
+
```bash
|
|
158
|
+
eve add memory/arcana
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
The command installs `@kybernesis/arcana` and writes an `arcana` slot:
|
|
162
|
+
|
|
163
|
+
```ts title="agent/memory/arcana.ts"
|
|
164
|
+
import { arcanaMemory } from "@kybernesis/arcana/memory";
|
|
165
|
+
import { defineMemory } from "eve/memory";
|
|
166
|
+
import { byPrincipal } from "eve/memory/scope";
|
|
167
|
+
|
|
168
|
+
export default defineMemory({
|
|
169
|
+
description: "Recall and manage durable context for the current user.",
|
|
170
|
+
provider: arcanaMemory({
|
|
171
|
+
apiKey: process.env.ARCANA_API_KEY!,
|
|
172
|
+
workspace: process.env.ARCANA_WORKSPACE!,
|
|
173
|
+
}),
|
|
174
|
+
scope: byPrincipal,
|
|
175
|
+
});
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
Set `capture: { enabled: true }` when you want Arcana to capture completed
|
|
179
|
+
turns automatically. See the [Arcana package documentation](https://github.com/KybernesisAI/platform/tree/master/packages/arcana#readme)
|
|
180
|
+
for provider options.
|
|
149
181
|
|
|
150
182
|
### Build your own
|
|
151
183
|
|
package/docs/reference/cli.md
CHANGED
|
@@ -161,6 +161,10 @@ eve build [--profile <path>] [--skip-sandbox-prewarm]
|
|
|
161
161
|
|
|
162
162
|
Compiles and bundles in an invocation-owned directory under `.eve/builds/`, then publishes the completed host output and prints its path. Scratch workspaces are removed after success or failure.
|
|
163
163
|
|
|
164
|
+
Authored bundles preserve custom Node.js resolution conditions supplied through `--conditions`,
|
|
165
|
+
`-C`, or `NODE_OPTIONS`. For example, `NODE_OPTIONS="--conditions=react-server" eve build`
|
|
166
|
+
keeps a channel's `server-only` imports on the same export used during compilation.
|
|
167
|
+
|
|
164
168
|
| Flag | Type | Default | Description |
|
|
165
169
|
| ------------------------ | ------ | ------- | --------------------------------------------------------------------------------------------- |
|
|
166
170
|
| `--profile <path>` | string | off | Best-effort versioned JSON report with build-phase timings and final output-size measurements |
|
|
@@ -199,6 +203,8 @@ eve start [--host <host>] [--port <port>]
|
|
|
199
203
|
|
|
200
204
|
Serves the previously built output. Prints the listening URL.
|
|
201
205
|
|
|
206
|
+
For self-hosted deployments, copy the app source, `.output/`, and installed dependencies together. The deployment directory can differ from the build directory. Preserve the relative layout of any workspace packages used by the app; startup resolves sandbox prewarm modules from the deployed source.
|
|
207
|
+
|
|
202
208
|
## `eve dev`
|
|
203
209
|
|
|
204
210
|
```bash
|
|
@@ -12,9 +12,9 @@ eve collects usage data from its CLI to help improve its commands and developmen
|
|
|
12
12
|
eve sends the following information to Vercel:
|
|
13
13
|
|
|
14
14
|
- The eve version, operating system, CPU architecture, and whether stdin is a terminal.
|
|
15
|
-
- The command you ran
|
|
15
|
+
- The command you ran, its outcome, and setup or onboarding steps when applicable.
|
|
16
16
|
- For `eve dev`, whether you connected to a local or remote agent and whether the UI was interactive or headless.
|
|
17
|
-
- Random identifiers for the CLI session,
|
|
17
|
+
- Random identifiers for the CLI session, installation, and project, plus whether the installation and project identifiers are ephemeral or persistent.
|
|
18
18
|
|
|
19
19
|
The project identifier lets eve group usage from the same project without sending its name or location. eve derives it from the Git remote when available, otherwise `REPOSITORY_URL` or the working directory, and transforms that value before sending it.
|
|
20
20
|
|
|
@@ -54,7 +54,7 @@ export default defineTool({
|
|
|
54
54
|
| `mockModel` | `eve/evals` | Deterministic fixture agent models | [Evals](../evals/overview) |
|
|
55
55
|
| `useEveAgent` | `eve/react`, `eve/vue`, `eve/svelte` | frontend | [Frontend](../guides/frontend/overview) |
|
|
56
56
|
|
|
57
|
-
Tool-wide authoring helpers such as `defineTool`, `defineWorkflowTool`, `defineDynamic`, and `
|
|
57
|
+
Tool-wide authoring helpers and types such as `defineTool`, `defineWorkflowTool`, `defineDynamic`, `disableTool`, and `ToolLabelDefinition` come from `eve/tools`. Capability-specific definitions and helpers use their own subpaths (see [Built-in tools](../concepts/built-in-tools)): reusable definitions such as `bash` and `glob` come from `eve/tools/<name>`, `webSearch` comes from `eve/tools/web_search`, `experimental_workflow` comes from `eve/tools/workflow`, `sleep` comes from `eve/tools/sleep`, and approval policies and types come from `eve/tools/approval`. The route verbs `GET`/`HEAD`/`POST`/`PUT`/`PATCH`/`DELETE`/`OPTIONS`/`WS` plus `disableRoute` come from `eve/channels`, and the channel auth helpers `localDev`/`vercelOidc`/`placeholderAuth` come from `eve/channels/auth`.
|
|
58
58
|
|
|
59
59
|
`AgentReasoningDefinition` is exported from `eve` for the top-level `defineAgent({ reasoning })` setting. `AgentLimitsDefinition` is exported for `defineAgent({ limits })`. `AgentWorkflowDefinition` and `AgentWorkflowWorldDefinition` are exported from `eve` for the `defineAgent({ experimental: { workflow } })` config shape. `ExperimentalWorkflowToolInput` is exported from `eve/tools/workflow`; `WebSearchToolInput` and `WebSearchProvider` are exported from `eve/tools/web_search`.
|
|
60
60
|
|
|
@@ -170,7 +170,7 @@ Run source mutations inside `withSuspendedSource()`. It acquires a unique watche
|
|
|
170
170
|
|
|
171
171
|
## ChatGPT subscription models
|
|
172
172
|
|
|
173
|
-
`chatgpt()` from `eve/models/openai` serves an OpenAI model through
|
|
173
|
+
`chatgpt()` from `eve/models/openai` serves an OpenAI model through your local ChatGPT login and bills the ChatGPT subscription. With no argument, it selects `gpt-5.6-sol`:
|
|
174
174
|
|
|
175
175
|
```ts title="agent/agent.ts"
|
|
176
176
|
import { defineAgent } from "eve";
|
|
@@ -185,20 +185,24 @@ Pass another bare OpenAI model slug to override the default. `experimental_chatg
|
|
|
185
185
|
|
|
186
186
|
`chatgpt()` uses stateless requests (`store: false`). eve retains reasoning summaries and encrypted reasoning in session history and replays them after tool calls and on later turns. You do not need to configure `reasoning.encrypted_content` explicitly.
|
|
187
187
|
|
|
188
|
-
|
|
188
|
+
Sign in directly from eve; the Codex CLI is not required:
|
|
189
189
|
|
|
190
|
-
1.
|
|
191
|
-
2.
|
|
192
|
-
3.
|
|
190
|
+
1. Run `eve dev`, open `/model`, and select **Provider** → **ChatGPT subscription**.
|
|
191
|
+
2. Complete sign-in in the browser. If the browser does not open, use the URL printed in the terminal.
|
|
192
|
+
3. Return to eve after the terminal confirms that your subscription is connected. Normal token expiry is refreshed automatically.
|
|
193
|
+
|
|
194
|
+
eve stores this session in `~/.eve/auth/chatgpt.json` with owner-only file permissions on Unix. It is separate from any Codex login and is never written to your project. Keep this file private. To remove the local eve login, stop your eve processes and delete the file. Existing Codex users must sign in once through eve after upgrading.
|
|
195
|
+
|
|
196
|
+
Over SSH, or if localhost port 1455 is occupied, eve shows a device code instead. Open the displayed link in a browser and enter the code. Device sign-in requires enabling device code authorization in **ChatGPT Settings → Security**, or having a workspace admin enable it in workspace permissions. Sign-in times out after five minutes; press **Ctrl+C** to cancel sooner.
|
|
193
197
|
|
|
194
198
|
ChatGPT subscription credentials are local user credentials. `eve deploy` blocks agents whose active model is `chatgpt()` because those credentials are not uploaded to a deployment. Use an environment branch with a deployable model, or switch to an AI Gateway model before deploying.
|
|
195
199
|
|
|
196
200
|
Troubleshooting:
|
|
197
201
|
|
|
198
|
-
- **`chatgpt-sub login`**:
|
|
199
|
-
- **`chatgpt-sub unavailable`**:
|
|
202
|
+
- **`chatgpt-sub login`**: open `/model` and select **Provider** → **ChatGPT subscription** to sign in again. The running dev session picks up the new login.
|
|
203
|
+
- **`chatgpt-sub unavailable`**: check your network connection and retry from `/model`. If eve reports an invalid credential file, remove `~/.eve/auth/chatgpt.json` and sign in again.
|
|
200
204
|
- **Model rejected by the backend**: model availability depends on the signed-in ChatGPT account. Pick another supported OpenAI model.
|
|
201
|
-
- **
|
|
205
|
+
- **Device sign-in unavailable**: enable device code authorization in ChatGPT security settings, or sign in from a local terminal with port 1455 available.
|
|
202
206
|
|
|
203
207
|
## What to read next
|
|
204
208
|
|
package/docs/sandbox.mdx
CHANGED
|
@@ -31,6 +31,11 @@ export default defineTool({
|
|
|
31
31
|
const sandbox = await ctx.getSandbox();
|
|
32
32
|
await sandbox.writeTextFile({ path: "analysis/run.py", content: script });
|
|
33
33
|
const result = await sandbox.run({ command: "python analysis/run.py" });
|
|
34
|
+
if (result.exitCode !== 0) {
|
|
35
|
+
throw new Error(
|
|
36
|
+
`Analysis failed (exit ${result.exitCode}): ${result.stderr || result.stdout}`,
|
|
37
|
+
);
|
|
38
|
+
}
|
|
34
39
|
return { stdout: result.stdout };
|
|
35
40
|
},
|
|
36
41
|
});
|
|
@@ -38,13 +43,15 @@ export default defineTool({
|
|
|
38
43
|
|
|
39
44
|
`ctx.getSandbox()` takes no arguments, is async, and only works inside authored runtime execution.
|
|
40
45
|
|
|
46
|
+
`sandbox.run()` resolves with `{ exitCode, stdout, stderr }` when the process exits, including a nonzero exit. Check `exitCode` before reporting success or using generated files. Throw from a tool to report a failed operation to the model, and throw from `bootstrap` to prevent eve from caching an incomplete setup. The built-in `bash` tool returns all three fields so the model can interpret command results itself.
|
|
47
|
+
|
|
41
48
|
`/workspace` is one namespace across every backend, so `/workspace/foo` points at the same file whether the backend is local or Vercel. When you need to interpolate a path into a generated command, `sandbox.resolvePath("repo/build.py")` anchors a relative path to its absolute `/workspace/repo/build.py` form.
|
|
42
49
|
|
|
43
50
|
The handle does more than `run` and `writeTextFile`. In every method, relative paths resolve from `/workspace` and absolute paths pass through untouched:
|
|
44
51
|
|
|
45
52
|
| Method | Does |
|
|
46
53
|
| ---------------------------------------- | ----------------------------------------------------------------------------------------------- |
|
|
47
|
-
| `run({ command })` | run one command, block until it exits, return `{ stdout, stderr
|
|
54
|
+
| `run({ command })` | run one command, block until it exits, return `{ exitCode, stdout, stderr }` |
|
|
48
55
|
| `spawn(options)` | launch a long-running process (server, watcher) and return a `SandboxProcess` handle |
|
|
49
56
|
| `readTextFile` / `writeTextFile` | read/write a UTF-8 (or specified encoding) file; `readTextFile` supports 1-based line ranges |
|
|
50
57
|
| `readBinaryFile` / `writeBinaryFile` | read/write raw bytes (images, archives, anything non-text) |
|
|
@@ -106,7 +113,12 @@ export default defineSandbox({
|
|
|
106
113
|
revalidationKey: () => "repo-bootstrap-v1",
|
|
107
114
|
async bootstrap({ use }) {
|
|
108
115
|
const sandbox = await use();
|
|
109
|
-
await sandbox.run({ command: "sudo apt-get install -y jq" });
|
|
116
|
+
const result = await sandbox.run({ command: "sudo apt-get install -y jq" });
|
|
117
|
+
if (result.exitCode !== 0) {
|
|
118
|
+
throw new Error(
|
|
119
|
+
`Sandbox setup failed (exit ${result.exitCode}): ${result.stderr || result.stdout}`,
|
|
120
|
+
);
|
|
121
|
+
}
|
|
110
122
|
},
|
|
111
123
|
async onSession({ use }) {
|
|
112
124
|
await use({ networkPolicy: "deny-all" });
|
package/docs/subagents/index.mdx
CHANGED
|
@@ -12,7 +12,7 @@ The root session receives `agent` by default. The model calls it to delegate a t
|
|
|
12
12
|
```ts
|
|
13
13
|
{
|
|
14
14
|
message: string; // everything the child needs; it does not see the parent's history
|
|
15
|
-
agentId?: string; // continue an existing child
|
|
15
|
+
agentId?: string; // continue or steer an existing child
|
|
16
16
|
outputSchema?: object; // require structured output for this turn
|
|
17
17
|
}
|
|
18
18
|
```
|
|
@@ -160,7 +160,7 @@ A directly declared subagent's tool name is the bare path-derived name, with no
|
|
|
160
160
|
```ts
|
|
161
161
|
{
|
|
162
162
|
message: string; // all context the child needs; it never sees the parent's history
|
|
163
|
-
agentId?: string; // continue an existing child
|
|
163
|
+
agentId?: string; // continue or steer an existing child
|
|
164
164
|
outputSchema?: object; // require structured output for this turn
|
|
165
165
|
}
|
|
166
166
|
```
|
|
@@ -171,13 +171,17 @@ Do not rely on subagent delegation by itself as an approval boundary. Put sensit
|
|
|
171
171
|
|
|
172
172
|
Each delegated subagent spins up its own child session and stream. The parent stream carries the control-plane events `subagent.called` and `subagent.completed`, plus interactive `input.requested`, `authorization.required`, and `authorization.completed` events proxied from descendants so the root channel can prompt the user. To follow the child's other progress, read `subagent.called.data.childSessionId` and subscribe at `GET /eve/v1/session/:childSessionId/stream`.
|
|
173
173
|
|
|
174
|
-
A background task that was already admitted survives cancellation of the turn that started it; background work that has not yet been admitted is rejected with the cancelled step. Use `task_cancel` to stop an admitted task. Parent-session finalization cancels remaining live tasks.
|
|
174
|
+
A background task that was already admitted survives cancellation of the turn that started it; background work that has not yet been admitted is rejected with the cancelled step. Use `task_cancel` to stop an admitted task. Cancellation delivers the task's final notification to an active parent even if the task must be stopped forcibly. Parent-session finalization cancels remaining live tasks.
|
|
175
175
|
|
|
176
176
|
Subagent model calls automatically retry classified transient provider failures, including overload errors delivered after a stream starts. eve makes at most three fresh model-call attempts, repeating only the current uncommitted call so completed earlier steps, tool results, and sandbox work remain available to the child. Other recoverable task errors fall back to Workflow's durable step retry from the last committed session snapshot. Exhausting the transient model-call attempts or the dedicated empty-response reissue returns one failed task result instead of stacking both retry budgets; terminal errors fail immediately.
|
|
177
177
|
|
|
178
178
|
## Agent messaging
|
|
179
179
|
|
|
180
|
-
A child parks after answering instead of terminating, keeping its session and conversation history alive. A failed child turn can also leave the child parked — its latest status shows the error and the parent may message it again. Pass a parked child's `agentId` to the same subagent tool with a new `message` to continue that session. Omitting `agentId` (or passing an empty string or `null`) always starts a new child, and an `agentId` that matches no known agent falls back to starting a new child rather than failing. Passing a known `agentId` through a different subagent tool fails with `AGENT_MISMATCH
|
|
180
|
+
A child parks after answering instead of terminating, keeping its session and conversation history alive. A failed child turn can also leave the child parked — its latest status shows the error and the parent may message it again. Pass a parked child's `agentId` to the same subagent tool with a new `message` to continue that session. Omitting `agentId` (or passing an empty string or `null`) always starts a new child, and an `agentId` that matches no known agent falls back to starting a new child rather than failing. Passing a known `agentId` through a different subagent tool fails with `AGENT_MISMATCH`.
|
|
181
|
+
|
|
182
|
+
To steer a running background child, call the same subagent tool with its `agentId` and the updated `message`. eve cancels the previous task before starting a new task in the same child session. The child retains its conversation history, and the receipt contains the same `agentId` with a new `taskId`. The cancelled task cannot publish a later successful result. Steering does not undo tool side effects that have already occurred.
|
|
183
|
+
|
|
184
|
+
A child that is still starting, or is owned by a blocking workflow invocation rather than an admitted background task, continues to return `AGENT_BUSY`. Cancellation or delivery failures are reported to the caller; eve does not start a replacement child session to hide them.
|
|
181
185
|
|
|
182
186
|
Whenever the set of parked (resumable) children changes, eve appends a framework-injected note to the conversation — labeled `[Agents]` and carrying an `<agents>` block — listing each child's `agentId`, name, and latest status. The static system prompt tells the model the note is injected by eve, not written by the user. The note is appended only when the listing changes (an append-only design that preserves the provider prompt cache), the most recent note is authoritative, and children that are starting or running do not appear until they park again.
|
|
183
187
|
|
package/docs/tools/overview.mdx
CHANGED
|
@@ -32,6 +32,30 @@ A tool definition needs:
|
|
|
32
32
|
|
|
33
33
|
When a tool returns structured data, add an optional `outputSchema`. With Zod or Standard Schema it also types the `execute` return.
|
|
34
34
|
|
|
35
|
+
### Label tool activity
|
|
36
|
+
|
|
37
|
+
Use `label.start(input)` to describe a call in user-facing activity. The callback receives the validated tool input, so it can select the useful fields without exposing the full argument object:
|
|
38
|
+
|
|
39
|
+
```ts title="agent/tools/deploy.ts"
|
|
40
|
+
export default defineTool({
|
|
41
|
+
description: "Deploy a project to an environment.",
|
|
42
|
+
inputSchema: z.object({
|
|
43
|
+
project: z.string(),
|
|
44
|
+
environment: z.enum(["preview", "production"]),
|
|
45
|
+
}),
|
|
46
|
+
label: {
|
|
47
|
+
start: ({ project, environment }) => `Deploy ${project} to ${environment}`,
|
|
48
|
+
},
|
|
49
|
+
async execute(input) {
|
|
50
|
+
return deploy(input);
|
|
51
|
+
},
|
|
52
|
+
});
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
The label is presentation only. It does not replace the path-derived tool name, enter model input, or change execution. eve records the bounded label on the corresponding public action event so activity renderers and other authorized stream consumers can use it without interpreting raw tool data. Built-in channel activity can show `Deploy storefront to production` instead of `deploy`; if the callback throws or returns an empty label, activity falls back to the tool name.
|
|
56
|
+
|
|
57
|
+
Provided tools define labels for `bash`, `glob`, `grep`, `load_skill`, `read_file`, `web_fetch`, `web_search`, and `write_file`.
|
|
58
|
+
|
|
35
59
|
### Stream preliminary tool results
|
|
36
60
|
|
|
37
61
|
For a `defineTool` executor with the default execution mode, an async generator streams complete
|
|
@@ -42,10 +66,15 @@ yield is the normal tool result the model receives:
|
|
|
42
66
|
export default defineTool({
|
|
43
67
|
description: "Build a project report.",
|
|
44
68
|
inputSchema: z.object({ project: z.string() }),
|
|
69
|
+
label: {
|
|
70
|
+
start: ({ project }) => `Build report for ${project}`,
|
|
71
|
+
delta: (_input, partial) => partial.phase,
|
|
72
|
+
complete: (_input, output) => `Report ready with ${output.report.sections.length} sections`,
|
|
73
|
+
},
|
|
45
74
|
async *execute({ project }) {
|
|
46
|
-
yield { phase: "
|
|
75
|
+
yield { phase: "Collecting sources", report: null };
|
|
47
76
|
const report = await buildReport(project);
|
|
48
|
-
yield { phase: "
|
|
77
|
+
yield { phase: "Complete", report };
|
|
49
78
|
},
|
|
50
79
|
});
|
|
51
80
|
```
|
|
@@ -58,6 +87,19 @@ can retry a step and replay overlapping snapshots. A generator `return` value is
|
|
|
58
87
|
the result in this mode; yield the final output. Workflow and background generators have
|
|
59
88
|
different result rules, described under [yield and return](#yield-and-return).
|
|
60
89
|
|
|
90
|
+
Use `label.delta(input, partial)` to project preliminary snapshots into
|
|
91
|
+
user-facing activity, and `label.complete(input, output)` to describe successful
|
|
92
|
+
settlement differently. Both callbacks receive the validated input first and the typed value yielded by
|
|
93
|
+
`execute` second. Each non-empty update replaces the previous activity label; the
|
|
94
|
+
result projection replaces the latest update immediately before eve marks the
|
|
95
|
+
action complete.
|
|
96
|
+
|
|
97
|
+
eve normalizes and bounds projected text before rendering it. If either
|
|
98
|
+
callback throws or returns an empty string, eve keeps the existing activity
|
|
99
|
+
label. `label.complete` does not run for failed or rejected tool calls. The
|
|
100
|
+
full values remain available in `action.partial` and `action.result`; renderers
|
|
101
|
+
receive only the projected text.
|
|
102
|
+
|
|
61
103
|
### Background execution
|
|
62
104
|
|
|
63
105
|
Background execution controls how a tool delivers its result to the parent agent. Durable
|
package/docs/tools/workflows.mdx
CHANGED
|
@@ -93,6 +93,12 @@ tool object, a channel handler, or a schedule handler fails the build. To start
|
|
|
93
93
|
channel or schedule, use the [channel operations](/docs/channels/custom#channel-operations-and-session-handles)
|
|
94
94
|
or [schedule handler](/docs/schedules#handler-form-run) APIs.
|
|
95
95
|
|
|
96
|
+
Workflow imports resolve `paths` aliases from your application's `tsconfig.json` or
|
|
97
|
+
`jsconfig.json`, including when the application is a workspace package. eve includes only
|
|
98
|
+
workflow and step modules reachable from the agent's runtime modules. Unrelated workflows
|
|
99
|
+
in the host application stay outside the agent bundle. An unresolved workflow import fails
|
|
100
|
+
the build with the missing import in the error.
|
|
101
|
+
|
|
96
102
|
### Migrate an existing workflow tool
|
|
97
103
|
|
|
98
104
|
Replace `defineTool` with `defineWorkflowTool`, keep the executor's `"use workflow"` directive,
|
|
@@ -317,7 +323,9 @@ export default defineWorkflowTool({
|
|
|
317
323
|
```
|
|
318
324
|
|
|
319
325
|
`createWebhook` mints a URL under `/.well-known/workflow/v1/webhook/` that eve serves. The external
|
|
320
|
-
system posts to it when it is done. Nothing runs in between.
|
|
326
|
+
system posts to it when it is done. Nothing runs in between. Webhook tokens are generated for
|
|
327
|
+
you; use `createHook` with `resumeHook` if you need a deterministic token. To customize the HTTP
|
|
328
|
+
response, pass `respondWith: new Response(...)` to `createWebhook`.
|
|
321
329
|
|
|
322
330
|
### Ask now, act when answered
|
|
323
331
|
|