eve 0.42.0 → 0.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +34 -0
- package/dist/src/channel/adapter.d.ts +2 -1
- package/dist/src/channel/forwarded-principal.d.ts +4 -4
- package/dist/src/channel/instrumentation.js +1 -1
- package/dist/src/cli/commands/registry-project.d.ts +3 -0
- package/dist/src/cli/commands/registry-project.js +2 -1
- package/dist/src/cli/commands/registry.d.ts +2 -0
- package/dist/src/cli/commands/registry.js +1 -1
- package/dist/src/cli/dev/tui/traces/trace-view.js +1 -1
- package/dist/src/compiled/.vendor-stamp.json +1 -1
- package/dist/src/compiled/jsonc-parser/index.d.ts +19 -0
- package/dist/src/compiler/extension-compatibility.d.ts +7 -5
- package/dist/src/compiler/extension-compatibility.js +1 -1
- package/dist/src/compiler/manifest.d.ts +3 -0
- package/dist/src/compiler/manifest.js +1 -1
- package/dist/src/compiler/normalize-manifest.js +1 -1
- package/dist/src/compiler/normalize-tool.js +1 -1
- package/dist/src/context/build-dynamic-tools.d.ts +5 -5
- package/dist/src/context/build-dynamic-tools.js +1 -1
- package/dist/src/context/dynamic-subagent-lifecycle.js +1 -1
- package/dist/src/context/dynamic-tool-lifecycle.d.ts +8 -27
- package/dist/src/context/dynamic-tool-lifecycle.js +1 -1
- package/dist/src/context/keys.d.ts +10 -14
- package/dist/src/context/keys.js +1 -1
- package/dist/src/context/provider.d.ts +5 -1
- package/dist/src/context/run-step.d.ts +3 -2
- package/dist/src/context/run-step.js +1 -1
- package/dist/src/execution/agent-handle-dispatch.d.ts +3 -0
- package/dist/src/execution/agent-handle-dispatch.js +1 -1
- package/dist/src/execution/delegation-tool.d.ts +9 -1
- package/dist/src/execution/delegation-tool.js +1 -1
- package/dist/src/execution/dispatch-runtime-actions-shared.d.ts +14 -1
- package/dist/src/execution/dispatch-runtime-actions-shared.js +1 -1
- package/dist/src/execution/dispatch-runtime-actions-step.js +1 -1
- package/dist/src/execution/history-view.d.ts +9 -0
- package/dist/src/execution/history-view.js +1 -0
- package/dist/src/execution/next-driver-action.d.ts +33 -1
- package/dist/src/execution/node-step.d.ts +5 -2
- package/dist/src/execution/node-step.js +1 -1
- package/dist/src/execution/remote-agent-dispatch.d.ts +2 -0
- package/dist/src/execution/remote-agent-dispatch.js +1 -1
- package/dist/src/execution/session-callback-step.d.ts +2 -2
- package/dist/src/execution/session-callback-step.js +1 -1
- package/dist/src/execution/tasks/child/steps.js +1 -1
- package/dist/src/execution/tasks/child/update.d.ts +2 -2
- package/dist/src/execution/tasks/child/update.js +1 -1
- package/dist/src/execution/tasks/child/workflow.js +1 -1
- package/dist/src/execution/tasks/parent/agent-views.d.ts +2 -1
- package/dist/src/execution/tasks/parent/agent-views.js +1 -1
- package/dist/src/execution/tasks/parent/continuation-dispatch.d.ts +6 -0
- package/dist/src/execution/tasks/parent/continuation-dispatch.js +1 -1
- package/dist/src/execution/tasks/parent/control-shared.d.ts +1 -1
- package/dist/src/execution/tasks/parent/control-shared.js +1 -1
- package/dist/src/execution/tasks/parent/delegate.d.ts +20 -6
- package/dist/src/execution/tasks/parent/delegate.js +1 -1
- package/dist/src/execution/tasks/parent/dispatch-task-step.js +1 -1
- package/dist/src/execution/tasks/parent/dispatch.d.ts +13 -1
- package/dist/src/execution/tasks/parent/dispatch.js +1 -1
- package/dist/src/execution/tasks/parent/hitl-proxy-steps.js +1 -1
- package/dist/src/execution/tasks/parent/tool-execution.d.ts +46 -0
- package/dist/src/execution/tasks/parent/tool-execution.js +1 -0
- package/dist/src/execution/tool-auth.d.ts +12 -3
- package/dist/src/execution/tool-auth.js +1 -1
- package/dist/src/execution/turn-cancellation-control.js +1 -1
- package/dist/src/execution/turn-workflow.js +1 -1
- package/dist/src/execution/wire/session-inbox-wire.v1.js +1 -1
- package/dist/src/execution/workflow-steps.d.ts +1 -54
- package/dist/src/execution/workflow-steps.js +1 -1
- package/dist/src/execution/workflow-trace-context.js +1 -1
- package/dist/src/harness/advertised-tools.js +1 -1
- package/dist/src/harness/background-tools.d.ts +37 -0
- package/dist/src/harness/background-tools.js +1 -0
- package/dist/src/harness/channel-delivery-instrumentation.js +1 -1
- package/dist/src/harness/execute-tool.d.ts +10 -1
- package/dist/src/harness/handles/transitions.d.ts +36 -0
- package/dist/src/harness/handles/transitions.js +1 -1
- package/dist/src/harness/instrumentation/lifecycle.d.ts +4 -0
- package/dist/src/harness/instrumentation/native-events.d.ts +2 -0
- package/dist/src/harness/instrumentation/native-events.js +1 -1
- package/dist/src/harness/messages.d.ts +2 -0
- package/dist/src/harness/messages.js +1 -1
- package/dist/src/harness/prepare-trace-context.d.ts +2 -0
- package/dist/src/harness/prepare-trace-context.js +1 -1
- package/dist/src/harness/tool-loop.js +2 -2
- package/dist/src/harness/tools.d.ts +5 -1
- package/dist/src/harness/tools.js +1 -1
- package/dist/src/harness/types.d.ts +13 -0
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/internal/authored-definition/schema-backed.js +1 -1
- package/dist/src/internal/authored-module-loader.js +1 -1
- package/dist/src/internal/workflow-bundle/dynamic-capability-transform-plugin.js +1 -1
- package/dist/src/internal/workflow-bundle/dynamic-tool-ast-references.d.ts +13 -0
- package/dist/src/internal/workflow-bundle/dynamic-tool-transform.d.ts +7 -31
- package/dist/src/internal/workflow-bundle/dynamic-tool-transform.js +4 -4
- package/dist/src/packages/eve-catalog/src/index.js +1 -1
- package/dist/src/public/channels/chat-sdk/audience.d.ts +2 -0
- package/dist/src/public/channels/chat-sdk/audience.js +1 -0
- package/dist/src/public/channels/chat-sdk/chatSdkChannel.d.ts +2 -0
- package/dist/src/public/channels/chat-sdk/chatSdkChannel.js +2 -2
- package/dist/src/public/channels/discord/audience.d.ts +5 -0
- package/dist/src/public/channels/discord/audience.js +1 -0
- package/dist/src/public/channels/discord/discordChannel.d.ts +2 -0
- package/dist/src/public/channels/discord/discordChannel.js +1 -1
- package/dist/src/public/channels/discord/inbound.d.ts +1 -0
- package/dist/src/public/channels/discord/inbound.js +1 -1
- package/dist/src/public/channels/discord/index.d.ts +1 -0
- package/dist/src/public/channels/eve.d.ts +7 -7
- package/dist/src/public/channels/eve.js +1 -1
- package/dist/src/public/channels/index.d.ts +3 -2
- package/dist/src/public/channels/slack/slackChannel.d.ts +4 -0
- package/dist/src/public/channels/slack/slackChannel.js +1 -1
- package/dist/src/public/channels/teams/index.d.ts +1 -0
- package/dist/src/public/channels/teams/teamsChannel.js +1 -1
- package/dist/src/public/channels/telegram/audience.d.ts +3 -0
- package/dist/src/public/channels/telegram/audience.js +1 -0
- package/dist/src/public/channels/telegram/index.d.ts +1 -0
- package/dist/src/public/channels/telegram/telegramChannel.js +1 -1
- package/dist/src/public/channels/twilio/twilioChannel.d.ts +2 -0
- package/dist/src/public/channels/twilio/twilioChannel.js +1 -1
- package/dist/src/public/definitions/channel.d.ts +1 -0
- package/dist/src/public/definitions/remote-agent.d.ts +7 -5
- package/dist/src/public/definitions/tool.d.ts +23 -0
- package/dist/src/public/definitions/tool.js +1 -1
- package/dist/src/public/instrumentation/otel.d.ts +6 -10
- package/dist/src/public/instrumentation/otel.js +1 -1
- package/dist/src/public/tools/approval/approval-helpers.js +1 -1
- package/dist/src/public/tools/index.d.ts +1 -1
- package/dist/src/runtime/framework-tools/connection-search-dynamic.js +2 -2
- package/dist/src/runtime/framework-tools/subagent/local.d.ts +41 -0
- package/dist/src/runtime/framework-tools/subagent/local.js +1 -0
- package/dist/src/runtime/framework-tools/subagent/remote.d.ts +23 -0
- package/dist/src/runtime/framework-tools/subagent/remote.js +1 -0
- package/dist/src/runtime/framework-tools/tasks.d.ts +11 -2
- package/dist/src/runtime/framework-tools/tasks.js +1 -1
- package/dist/src/runtime/resolve-tool.js +1 -1
- package/dist/src/runtime/session-callback-route.js +1 -1
- package/dist/src/setup/integrations/linq/management.d.ts +5 -0
- package/dist/src/setup/integrations/linq/management.js +1 -0
- package/dist/src/setup/integrations/linq/setup.d.ts +5 -1
- package/dist/src/setup/integrations/linq/setup.js +3 -3
- package/dist/src/setup/scaffold/create/add-to-project.js +1 -1
- package/dist/src/setup/scaffold/create/project.js +4 -10
- package/dist/src/setup/scaffold/create/web-template.d.ts +2 -2
- package/dist/src/setup/scaffold/create/web-template.js +374 -2
- package/dist/src/setup/scaffold/update/channels.d.ts +1 -1
- package/dist/src/setup/scaffold/update/channels.js +2 -2
- package/dist/src/setup/scaffold/update/package-json.d.ts +0 -2
- package/dist/src/setup/scaffold/update/package-json.js +1 -1
- package/dist/src/setup/scaffold/workspace-root.d.ts +0 -1
- package/dist/src/setup/scaffold/workspace-root.js +1 -1
- package/dist/src/shared/channel-audience.d.ts +7 -0
- package/dist/src/shared/channel-audience.js +1 -0
- package/dist/src/shared/channel-definition.d.ts +2 -1
- package/dist/src/shared/durable-dynamic-tool-callbacks.d.ts +34 -0
- package/dist/src/shared/durable-dynamic-tool-callbacks.js +1 -0
- package/dist/src/shared/dynamic-tool-definition.d.ts +2 -4
- package/dist/src/shared/empty-delivery.js +1 -1
- package/dist/src/shared/history-view.d.ts +22 -0
- package/dist/src/shared/history-view.js +1 -0
- package/dist/src/shared/json.d.ts +2 -0
- package/dist/src/shared/json.js +1 -1
- package/dist/src/shared/tool-definition.d.ts +4 -1
- package/dist/src/shared/tool-task.d.ts +107 -0
- package/dist/src/shared/tool-task.js +1 -0
- package/dist/src/tasks/delivery-context.d.ts +12 -0
- package/dist/src/tasks/delivery-context.js +17 -0
- package/dist/src/tasks/json.d.ts +25 -10
- package/dist/src/tasks/json.js +1 -1
- package/dist/src/tasks/session-index.d.ts +5 -3
- package/dist/src/tasks/session-index.js +1 -1
- package/dist/src/tasks/transitions.d.ts +40 -5
- package/dist/src/tasks/transitions.js +1 -1
- package/dist/src/tasks/types.d.ts +46 -4
- package/dist/src/tasks/types.js +1 -1
- 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.d.ts +2 -0
- package/dist/src/tracing/agent-otel-provider.js +2 -2
- package/dist/src/tracing/agent-otel-session-context.d.ts +2 -0
- package/dist/src/tracing/agent-otel-session-context.js +1 -1
- package/dist/src/tracing/agent-trace-context-store.js +1 -1
- package/dist/src/tracing/agent-trace-state.d.ts +3 -0
- package/dist/src/tracing/channel-audience-context.d.ts +4 -0
- package/dist/src/tracing/channel-audience-context.js +1 -0
- package/dist/src/tracing/content-attributes.js +1 -1
- package/dist/src/tracing/content-span-processor.d.ts +7 -7
- package/dist/src/tracing/content-span-processor.js +1 -1
- package/dist/src/tracing/install-instrumentation-runtime.js +1 -1
- package/dist/src/tracing/local-instrumentation-runtime.d.ts +3 -0
- package/dist/src/tracing/local-instrumentation-runtime.js +1 -1
- package/dist/src/tracing/local-traces.d.ts +1 -10
- package/dist/src/tracing/local-traces.js +1 -1
- package/dist/src/tracing/otel-declaration.d.ts +34 -27
- package/dist/src/tracing/otel-declaration.js +1 -1
- package/dist/src/tracing/sampled-trace.d.ts +2 -0
- package/dist/src/tracing/sampled-trace.js +1 -0
- package/dist/src/tracing/span-export-policy.d.ts +41 -0
- package/dist/src/tracing/span-export-policy.js +1 -0
- package/dist/src/tracing/suppress-tracing.d.ts +2 -0
- package/dist/src/tracing/suppress-tracing.js +1 -0
- package/docs/channels/custom.mdx +2 -0
- package/docs/channels/linq.mdx +1 -1
- package/docs/getting-started.mdx +36 -36
- package/docs/guides/auth-and-route-protection.md +6 -2
- package/docs/guides/dynamic-capabilities.md +12 -10
- package/docs/guides/instrumentation.md +2 -0
- package/docs/guides/remote-agents.md +10 -2
- package/docs/tools/overview.mdx +19 -0
- package/docs/tutorial/ship-it.mdx +1 -1
- package/package.json +1 -1
package/docs/getting-started.mdx
CHANGED
|
@@ -24,13 +24,7 @@ Run `eve init` with a project name:
|
|
|
24
24
|
npx eve@latest init my-agent
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
The command creates the project, installs dependencies, and initializes Git.
|
|
28
|
-
|
|
29
|
-
Pass an AI Gateway model ID or reasoning effort when you do not want the defaults:
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
npx eve@latest init my-agent --model openai/gpt-5.6-terra --reasoning high
|
|
33
|
-
```
|
|
27
|
+
The command creates the project, installs dependencies, and initializes Git. After scaffolding, eve offers to start the development server or, if a supported coding agent is installed, to open the project in the coding agent.
|
|
34
28
|
|
|
35
29
|
To add eve to a project that already has a `package.json`, run this command from its root before you create any `agent/` files:
|
|
36
30
|
|
|
@@ -40,15 +34,23 @@ npx eve@latest init .
|
|
|
40
34
|
|
|
41
35
|
eve adds the missing `eve`, `ai`, and `zod` dependencies without changing files the project already owns.
|
|
42
36
|
|
|
37
|
+
### Customize initialization
|
|
38
|
+
|
|
39
|
+
To initialize the agent with a different AI Gateway model or reasoning effort, pass `--model` or `--reasoning`:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
npx eve@latest init my-agent --model openai/gpt-5.6-terra --reasoning high
|
|
43
|
+
```
|
|
44
|
+
|
|
43
45
|
## Run the agent
|
|
44
46
|
|
|
45
|
-
|
|
47
|
+
Choose **Start eve dev** after scaffolding, or run this from the project root:
|
|
46
48
|
|
|
47
49
|
```bash
|
|
48
50
|
npm run dev
|
|
49
51
|
```
|
|
50
52
|
|
|
51
|
-
|
|
53
|
+
This starts an interactive session where you can send messages to your agent.
|
|
52
54
|
|
|
53
55
|
## Project layout
|
|
54
56
|
|
|
@@ -56,7 +58,7 @@ eve builds an agent by walking the filesystem under `agent/`. Each directory is
|
|
|
56
58
|
|
|
57
59
|
### Naming from paths
|
|
58
60
|
|
|
59
|
-
|
|
61
|
+
eve derives names from file paths, so you do not configure them separately.
|
|
60
62
|
|
|
61
63
|
| Path | Resolves to |
|
|
62
64
|
| ------------------------------------- | --------------------- |
|
|
@@ -65,7 +67,7 @@ Identity comes from the path. You never write a `name` or `id` field on a `defin
|
|
|
65
67
|
| `agent/skills/summarize.md` | skill `summarize` |
|
|
66
68
|
| `agent/subagents/researcher/agent.ts` | subagent `researcher` |
|
|
67
69
|
|
|
68
|
-
The root agent
|
|
70
|
+
The root agent uses its `package.json` `name`, or its app directory name if none is set. A subagent uses its directory name.
|
|
69
71
|
|
|
70
72
|
### Recommended layout
|
|
71
73
|
|
|
@@ -93,31 +95,29 @@ my-agent/
|
|
|
93
95
|
|
|
94
96
|
Evals live beside `agent/`, not inside it.
|
|
95
97
|
|
|
96
|
-
###
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
| Path |
|
|
101
|
-
| ------------------------------------------------------- | ----------------------------------------- |
|
|
102
|
-
| `agent.ts` | Runtime config | Yes
|
|
103
|
-
| `instructions.md` / `instructions.ts` / `instructions/` | Base system prompt | Optional
|
|
104
|
-
| `instrumentation.ts` | Telemetry config | No
|
|
105
|
-
| `channels/` | HTTP and messaging entry points | No
|
|
106
|
-
| `connections/` | External MCP and OpenAPI services | Yes
|
|
107
|
-
| `hooks/` | Lifecycle and stream-event subscribers | Yes
|
|
108
|
-
| `skills/` | On-demand procedures and capability packs | Yes
|
|
109
|
-
| `lib/` | Shared authored helper code | Yes
|
|
110
|
-
| `sandbox.ts` or `sandbox/sandbox.ts` | The agent's single sandbox | Yes
|
|
111
|
-
| `sandbox/workspace/**` | Files seeded into the sandbox | Yes
|
|
112
|
-
| `tools/` | Typed executable integrations | Yes
|
|
113
|
-
| `schedules/` | Recurring jobs | No
|
|
114
|
-
| `subagents/` | Specialist child agents | Yes
|
|
115
|
-
|
|
116
|
-
###
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
Skill package files land outside the workspace under `$HOME/.agents/skills/`, with `/workspace/skills/` as a fallback when `$HOME` is unavailable. Everything in `lib/` remains import-only source code.
|
|
98
|
+
### Agent files and directories
|
|
99
|
+
|
|
100
|
+
Each path under `agent/` has a specific purpose. Root agents can use every path below. A subagent has its own files and can use only the paths marked **Yes**.
|
|
101
|
+
|
|
102
|
+
| Path | Use | Available to subagents | Notes |
|
|
103
|
+
| ------------------------------------------------------- | ----------------------------------------- | ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
104
|
+
| `agent.ts` | Runtime config | Yes | Model, model options, compaction, build, and experimental settings. See [Agents](./agent-config). |
|
|
105
|
+
| `instructions.md` / `instructions.ts` / `instructions/` | Base system prompt | Optional | A flat file or directory of `.md` and `.ts` files. Static sources compose at build time. Dynamic sources resolve at runtime. Required on the root, optional on subagents. |
|
|
106
|
+
| `instrumentation.ts` | Telemetry config | No | OTel exporter and AI SDK span settings, auto-discovered and run before agent code. Root-only. |
|
|
107
|
+
| `channels/` | HTTP and messaging entry points | No | Root-only. |
|
|
108
|
+
| `connections/` | External MCP and OpenAPI services | Yes | One connection per file; its name comes from the filename. |
|
|
109
|
+
| `hooks/` | Lifecycle and stream-event subscribers | Yes | Module-backed only. Recursive directories are supported. |
|
|
110
|
+
| `skills/` | On-demand procedures and capability packs | Yes | Flat markdown, module-backed skills, or packaged skills. Runtime files are seeded under `$HOME/.agents/skills/`, with `/workspace/skills/` as a fallback. |
|
|
111
|
+
| `lib/` | Shared authored helper code | Yes | Import-only; not mounted into the workspace. |
|
|
112
|
+
| `sandbox.ts` or `sandbox/sandbox.ts` | The agent's single sandbox | Yes | Use `sandbox.ts` for a definition-only override; use `sandbox/sandbox.ts` with `sandbox/workspace/**` to also seed files. The framework default applies when neither is authored. |
|
|
113
|
+
| `sandbox/workspace/**` | Files seeded into the sandbox | Yes | Mirrored into `/workspace/` when a session starts. |
|
|
114
|
+
| `tools/` | Typed executable integrations | Yes | Module-backed only. |
|
|
115
|
+
| `schedules/` | Recurring jobs | No | Each schedule is a default-exported `defineSchedule` module or a markdown prompt with `cron` frontmatter. Recursive nesting is supported. Root-only. |
|
|
116
|
+
| `subagents/` | Specialist child agents | Yes | Each child is a local package under `subagents/<id>/`. Nested subagents are supported. |
|
|
117
|
+
|
|
118
|
+
### Files available in the sandbox
|
|
119
|
+
|
|
120
|
+
Files under `agent/` define your agent; only files in `agent/sandbox/workspace/` are copied to `/workspace/` when a session starts.
|
|
121
121
|
|
|
122
122
|
### Local subagents
|
|
123
123
|
|
|
@@ -223,7 +223,7 @@ Keep secret values (`ROUTE_AUTH_BASIC_PASSWORD`, signing keys) in environment va
|
|
|
223
223
|
|
|
224
224
|
## Accepting forwarded identity from another deployment
|
|
225
225
|
|
|
226
|
-
A `defineRemoteAgent({ forwardPrincipal: true })` caller (see [Remote agents](./remote-agents#forwarding-the-caller-identity)) asserts its end user's principal on
|
|
226
|
+
A `defineRemoteAgent({ forwardPrincipal: true })` caller (see [Remote agents](./remote-agents#forwarding-the-caller-identity)) asserts its end user's principal on create and continuation requests as a `forwardedPrincipal` body field. By default every such assertion is rejected with `403` — accepting someone else's word for who the user is requires naming exactly which forwarders you trust. Do that with `trustedForwarders` on `eveChannel`:
|
|
227
227
|
|
|
228
228
|
```ts title="agent/channels/eve.ts"
|
|
229
229
|
import { eveChannel } from "eve/channels/eve";
|
|
@@ -239,7 +239,11 @@ export default eveChannel({
|
|
|
239
239
|
|
|
240
240
|
The predicate authorizes the _forwarder_ (the verified route-auth principal — who is asserting), not the forwarded principal (what is asserted). Match it precisely: a permissive predicate like `() => true` lets any caller that passes route auth assert any principal, including preview deployments of your own project when `vercelOidc()` is in the walk. `trustedForwarders` exists only on your authored channel — the framework default channel never accepts a forwarded principal, so a receiving deployment must author `agent/channels/eve.ts`.
|
|
241
241
|
|
|
242
|
-
When the predicate accepts
|
|
242
|
+
When the predicate accepts a create request, `ctx.session.auth.current` and `.initiator` carry the forwarded user exactly as if they had called your deployment directly. On continuation, only `auth.current` is replaced; `auth.initiator` remains the session creator. User-scoped connections, local subagents, and further `forwardPrincipal` hops therefore see the active turn's caller. The forwarder is recorded on accepted contexts as the `eve:forwarded-by` attribute (always overwritten by the receiver, so a forwarder cannot falsify it). Rejections fail loud: a forwarded body without `trustedForwarders` configured or with a forwarder the predicate refuses is a `403`, and a malformed payload is a `400`. Only principal metadata is ever accepted — tokens and credentials never cross the hop.
|
|
243
|
+
|
|
244
|
+
> ⚠️ Both deployments must support continuation forwarding before you resume persistent remote sessions. A create-only receiver rejects a forwarded continuation with HTTP 400; the sender does not fall back to service authority. See [Forwarding the caller identity](./remote-agents#forwarding-the-caller-identity) for the upgrade behavior.
|
|
245
|
+
|
|
246
|
+
Persistent sessions do not preserve caller authority between turns. Every accepted follow-up replaces `auth.current`, including replacing it with no authenticated caller on internal local delivery; per-user connection lookup is then keyed from that current principal. This prevents a later caller from resolving a prior caller's OAuth grant. It does not hide the persistent session's conversation history or artifacts from a caller who is otherwise allowed to continue that session; session ownership remains an application policy.
|
|
243
247
|
|
|
244
248
|
## What reaches `ctx.session.auth`
|
|
245
249
|
|
|
@@ -132,7 +132,7 @@ approval checks.
|
|
|
132
132
|
|
|
133
133
|
## Dynamic tools
|
|
134
134
|
|
|
135
|
-
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()`.
|
|
135
|
+
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.
|
|
136
136
|
|
|
137
137
|
Dynamic tool executors receive the same `ToolContext` as static authored tools, including inline provider auth through `ctx.getToken(provider)` and `ctx.requireAuth(provider)`.
|
|
138
138
|
|
|
@@ -160,11 +160,13 @@ export default defineDynamic({
|
|
|
160
160
|
});
|
|
161
161
|
```
|
|
162
162
|
|
|
163
|
-
###
|
|
163
|
+
### Author replayable callbacks
|
|
164
164
|
|
|
165
|
-
Write
|
|
165
|
+
Write callback properties as inline function expressions, arrows, method shorthand, or module-level function references. eve transforms authored modules that import `defineTool`, including helper modules outside `agent/tools/`, and stores each callback's referenced closure values independently.
|
|
166
166
|
|
|
167
|
-
|
|
167
|
+
Closure values must be JSON-serializable. Plain objects, arrays, strings, finite numbers, booleans, and `null` are supported; `undefined` object properties are omitted. Functions, class instances, `Date`, `Map`, symbols, non-finite numbers, and cyclic values fail resolution with the tool name and callback phase instead of being serialized lossily.
|
|
168
|
+
|
|
169
|
+
Call expressions such as `execute: makeExecutor()` are not transformed. Put the callback body directly in `defineTool()` inside an authored module; eve-provided factories may also supply pre-registered callbacks. eve rejects a dynamic tool if any present callback lacks durable metadata, and replay never reruns the current resolver to recover one.
|
|
168
170
|
|
|
169
171
|
### Naming
|
|
170
172
|
|
|
@@ -181,13 +183,13 @@ A dynamic tool or skill whose name matches an **authored** one **overrides** it
|
|
|
181
183
|
|
|
182
184
|
### Events
|
|
183
185
|
|
|
184
|
-
| Event | Resolver runs
|
|
185
|
-
| ----------------- |
|
|
186
|
-
| `session.started` | At session start;
|
|
187
|
-
| `turn.started` | Once per turn
|
|
188
|
-
| `step.started` | Before each model call
|
|
186
|
+
| Event | Resolver runs | Tools available for |
|
|
187
|
+
| ----------------- | ----------------------------------------------------- | ------------------------------- |
|
|
188
|
+
| `session.started` | At session start; may be redelivered during recovery¹ | Every model call in the session |
|
|
189
|
+
| `turn.started` | Once per turn | Every model call in the turn |
|
|
190
|
+
| `step.started` | Before each model call | That model call |
|
|
189
191
|
|
|
190
|
-
¹
|
|
192
|
+
¹ Workflow recovery can redeliver a resolver event, so keep resolvers idempotent. Replaying a parked callback does not depend on running the resolver again.
|
|
191
193
|
|
|
192
194
|
### Execution order
|
|
193
195
|
|
|
@@ -58,6 +58,8 @@ You are responsible for ensuring any observability or eval provider is approved
|
|
|
58
58
|
|
|
59
59
|
The third configurable surface, [runtime context events](#runtime-context), attaches per-model-call values to these spans.
|
|
60
60
|
|
|
61
|
+
Built-in messaging channels classify their instrumentation metadata with an `audience`: `public`, `private`, or `unknown`. Slack public channels and Chat SDK workspace-visible threads are public; direct and private conversations are private; platform surfaces without enough visibility evidence remain unknown.
|
|
62
|
+
|
|
61
63
|
## Channel delivery traces
|
|
62
64
|
|
|
63
65
|
Instrumentation providers receive `channel.delivery.started` followed by
|
|
@@ -114,9 +114,17 @@ export default defineRemoteAgent({
|
|
|
114
114
|
});
|
|
115
115
|
```
|
|
116
116
|
|
|
117
|
-
The create-session request
|
|
117
|
+
The create-session request carries the parent turn's `session.auth.current` and `session.auth.initiator` as a `forwardedPrincipal` body field (`initiator` is optional on the wire; when absent, the receiver seeds both from `current`). Every continuation carries only that turn's `session.auth.current`; the remote session keeps its original `auth.initiator`. Only principal metadata crosses the wire — never tokens or credentials. The receiving deployment resolves its own per-user credentials through its own connections.
|
|
118
118
|
|
|
119
|
-
|
|
119
|
+
This makes caller authority turn-scoped even when the remote child session is persistent. If Alice starts the child and Bob later continues it, the follow-up runs with Bob as `auth.current`, not Alice. If the parent turn's auth is `null`, a local child clears `auth.current`, while a remote child uses the freshly verified transport principal; neither inherits Alice. eve's in-step bearer cache is also keyed by the resolved principal and is not serialized across steps. The external authorization provider may preserve each user's server-side OAuth grant, but a later turn can resolve only the grant belonging to its own `auth.current` principal.
|
|
120
|
+
|
|
121
|
+
Identity forwarding does not make a persistent session private to one caller. Conversation history, tool outputs, and other child-session state still persist. If those values must not be visible across users, give each user a distinct child session or enforce that ownership at the application boundary.
|
|
122
|
+
|
|
123
|
+
Forwarding is explicit on both sides. The receiver names which forwarders it trusts with `eveChannel({ trustedForwarders })` (see [Auth & route protection](./auth-and-route-protection#accepting-forwarded-identity-from-another-deployment)); a receiver that refuses the forwarder — or has no `trustedForwarders` at all — rejects with a 403 and the dispatch fails.
|
|
124
|
+
|
|
125
|
+
> ⚠️ **Upgrade both deployments before resuming persistent remote sessions.** A sender with continuation forwarding includes `forwardedPrincipal` on each authenticated follow-up. A receiver that supports forwarding only on session creation rejects that continuation with HTTP 400. eve does not retry without the field because that would run the follow-up as the transport service principal and silently change caller authority. The parent retains the child handle after this failure, so you can retry the same session after upgrading the receiver.
|
|
126
|
+
|
|
127
|
+
A receiver on an eve version that predates all principal forwarding may instead drop the unknown field and run the session as your app's service identity; per-user connections there fail with `principal_required`. On remote requests where the dispatching turn has no auth, the field is omitted and the call proceeds on transport trust alone.
|
|
120
128
|
|
|
121
129
|
## How remote dispatch and callbacks work
|
|
122
130
|
|
package/docs/tools/overview.mdx
CHANGED
|
@@ -56,6 +56,25 @@ history or `toModelOutput`; only the final yield does. Treat snapshots as
|
|
|
56
56
|
last-write-wins by tool call id, not append-only progress. The durable runtime
|
|
57
57
|
can retry a step and replay overlapping snapshots.
|
|
58
58
|
|
|
59
|
+
### Experimental background execution
|
|
60
|
+
|
|
61
|
+
`defineTool({ execution: "background" })` receives a third `task` argument. Returning a normal
|
|
62
|
+
value completes the durable task with that value. Returning `task.delegated({ executor, receipt })`
|
|
63
|
+
returns a `working` receipt immediately while an external executor continues the task.
|
|
64
|
+
The root agent must enable `experimental.tasks`; eve rejects background tools at build time otherwise.
|
|
65
|
+
|
|
66
|
+
This contract currently supports framework-owned task executors, including local and remote
|
|
67
|
+
subagents when `experimental.tasks` is enabled. After delegating, an in-process executor reports
|
|
68
|
+
progress with `task.send({ kind: "update", message })` and the terminal result with
|
|
69
|
+
`task.send({ kind: "complete", data })` (or `fail` / `cancel`). `send` is not restart-safe — an
|
|
70
|
+
in-memory callback dies with the process — so the cross-process executor wire remains
|
|
71
|
+
framework-owned and is not yet a stable authored-tool API.
|
|
72
|
+
|
|
73
|
+
Each task-triggered parent turn includes runtime-authored state for tasks started by the same
|
|
74
|
+
parent turn. The model is instructed to keep related intermediate results silent while that state
|
|
75
|
+
contains pending tasks. Once every related task is terminal, the state includes their outputs so
|
|
76
|
+
the model can combine the useful results.
|
|
77
|
+
|
|
59
78
|
### The `ctx` parameter
|
|
60
79
|
|
|
61
80
|
`execute` gets a `ctx` carrying the runtime accessors:
|
|
@@ -73,7 +73,7 @@ export default function Page() {
|
|
|
73
73
|
}
|
|
74
74
|
```
|
|
75
75
|
|
|
76
|
-
`agent.data.messages` and `agent.status` cover most chat UIs. The
|
|
76
|
+
`agent.data.messages` and `agent.status` cover most chat UIs. The generated Web Chat renders HITL prompts directly in the conversation: approvals get action controls, and `ask_question` gets a visible form with vertical choices, a text field, or both. The spend approval from [Step 8](./guard-the-spend) uses the same response path. For the full API, see [Frontend](../guides/frontend/overview).
|
|
77
77
|
|
|
78
78
|
## Replace `placeholderAuth`
|
|
79
79
|
|