eve 0.74.0 → 0.75.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 +22 -0
- package/dist/src/channel/auth/result.d.ts +4 -0
- package/dist/src/channel/auth/result.js +1 -0
- package/dist/src/channel/types.d.ts +14 -2
- package/dist/src/chunks/{use-eve-agent-mP0M7SrL.js → use-eve-agent-B2Kne9z6.js} +7 -2
- package/dist/src/chunks/{use-eve-agent-DOOXadF0.js → use-eve-agent-DK_T88EP.js} +7 -2
- package/dist/src/cli/commands/integration-connect.d.ts +2 -0
- package/dist/src/cli/commands/integration-connect.js +1 -1
- package/dist/src/cli/commands/integration-setup.js +1 -1
- package/dist/src/cli/commands/registry-declared-setups.d.ts +19 -0
- package/dist/src/cli/commands/registry-declared-setups.js +1 -1
- package/dist/src/cli/commands/registry-recovery.d.ts +3 -1
- package/dist/src/cli/commands/registry-recovery.js +1 -1
- package/dist/src/cli/commands/registry.d.ts +12 -4
- package/dist/src/cli/commands/registry.js +1 -1
- package/dist/src/cli/dev/tui/registry-result-message.js +1 -1
- package/dist/src/cli/dev/tui/setup-commands.d.ts +2 -0
- package/dist/src/cli/dev/tui/setup-commands.js +2 -2
- package/dist/src/client/index.d.ts +1 -0
- package/dist/src/client/session.d.ts +1 -1
- package/dist/src/client/session.js +1 -1
- package/dist/src/client/sessions.d.ts +1 -1
- package/dist/src/client/types.d.ts +6 -0
- package/dist/src/compiled/.vendor-stamp.json +1 -1
- package/dist/src/compiler/extension-compatibility.d.ts +18 -12
- package/dist/src/compiler/extension-compatibility.js +1 -1
- package/dist/src/context/dynamic-connection-lifecycle.d.ts +6 -0
- package/dist/src/context/dynamic-connection-lifecycle.js +1 -1
- package/dist/src/context/keys.d.ts +4 -1
- package/dist/src/context/keys.js +1 -1
- package/dist/src/context/providers/sandbox.js +1 -1
- package/dist/src/context/providers/tool-stubs-key.d.ts +8 -0
- package/dist/src/context/providers/tool-stubs-key.js +1 -0
- package/dist/src/context/providers/tool-stubs.d.ts +10 -0
- package/dist/src/context/providers/tool-stubs.js +1 -0
- package/dist/src/context/run-step.js +1 -1
- package/dist/src/evals/index.d.ts +1 -0
- package/dist/src/evals/runner/execute-task.js +1 -1
- package/dist/src/evals/session-manager.d.ts +2 -0
- package/dist/src/evals/session-manager.js +1 -1
- package/dist/src/eve-channel/create-request.d.ts +2 -0
- package/dist/src/eve-channel/index.js +1 -1
- package/dist/src/eve-channel/request.js +1 -1
- package/dist/src/execution/agent-sessions/context.d.ts +2 -0
- package/dist/src/execution/agent-sessions/context.js +1 -1
- package/dist/src/execution/agent-sessions/steps.js +1 -1
- package/dist/src/execution/cancelled-model-call-batch.js +1 -1
- package/dist/src/execution/dynamic-connection-recovery.d.ts +14 -0
- package/dist/src/execution/dynamic-connection-recovery.js +1 -0
- package/dist/src/execution/dynamic-workflow/tool.js +1 -1
- package/dist/src/execution/forward-session-input.js +1 -1
- package/dist/src/execution/legacy-session/authorization.js +1 -1
- package/dist/src/execution/legacy-session/completion-step.js +1 -1
- package/dist/src/execution/legacy-session/inbox.js +1 -1
- package/dist/src/execution/legacy-session/interrupt-step.js +1 -1
- package/dist/src/execution/proxied-deliver-step.js +1 -1
- package/dist/src/execution/runtime-context.js +1 -1
- package/dist/src/execution/sandbox/bindings/docker.js +1 -1
- package/dist/src/execution/sandbox/bindings/just-bash-runtime.js +1 -1
- package/dist/src/execution/sandbox/bindings/just-bash.js +1 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-lifecycle.js +1 -1
- package/dist/src/execution/sandbox/bindings/vercel.js +1 -1
- package/dist/src/execution/sandbox/ensure.d.ts +3 -1
- package/dist/src/execution/sandbox/ensure.js +1 -1
- package/dist/src/execution/session/active-turn.js +1 -1
- package/dist/src/execution/session/admission.js +1 -1
- package/dist/src/execution/session/checkpoint-migrations.js +1 -1
- package/dist/src/execution/session/end-sandbox-step.d.ts +12 -0
- package/dist/src/execution/session/end-sandbox-step.js +1 -0
- package/dist/src/execution/session/finalization.js +1 -1
- package/dist/src/execution/session/handoff-steps.js +1 -1
- package/dist/src/execution/session/handoff.d.ts +1 -1
- package/dist/src/execution/session/handoff.js +1 -1
- package/dist/src/execution/session/program.js +1 -1
- package/dist/src/execution/session/timeout-steps.js +1 -1
- package/dist/src/execution/session/turn-step.js +1 -1
- package/dist/src/execution/session-inbox/inbox.d.ts +6 -1
- package/dist/src/execution/session-inbox/inbox.js +1 -1
- package/dist/src/execution/session-inbox/release-step.js +1 -1
- package/dist/src/execution/session-inbox/resume.d.ts +2 -1
- package/dist/src/execution/session-inbox/resume.js +1 -1
- package/dist/src/execution/session-workflow-tool-run.js +1 -1
- package/dist/src/execution/settle-cancelled-turn-step.js +1 -1
- package/dist/src/execution/tasks/model-step.js +1 -1
- package/dist/src/execution/tasks/steps.js +1 -1
- package/dist/src/execution/tasks/table.d.ts +7 -1
- package/dist/src/execution/tasks/table.js +1 -1
- package/dist/src/execution/tool-stubs/playback.d.ts +11 -0
- package/dist/src/execution/tool-stubs/playback.js +1 -0
- package/dist/src/execution/tool-stubs/steps.d.ts +18 -0
- package/dist/src/execution/tool-stubs/steps.js +1 -0
- package/dist/src/execution/tools/agent-router-workflow.js +1 -1
- package/dist/src/execution/tools/connection-tools.d.ts +0 -6
- package/dist/src/execution/tools/connection-tools.js +2 -2
- package/dist/src/execution/tools/workflow/authorization-completion.js +1 -1
- package/dist/src/execution/tools/workflow/body.js +1 -1
- package/dist/src/execution/tools/workflow/serve.js +1 -1
- package/dist/src/execution/tools/workflow/withdraw-step.js +1 -1
- package/dist/src/execution/workflow-runtime.js +1 -1
- package/dist/src/execution/workflow-webhook-route.js +1 -1
- package/dist/src/harness/coordination.js +1 -1
- package/dist/src/harness/hitl/approved-calls.d.ts +2 -0
- package/dist/src/harness/hitl/approved-calls.js +1 -1
- package/dist/src/harness/hitl/index.d.ts +9 -1
- package/dist/src/harness/hitl/index.js +1 -1
- package/dist/src/harness/hitl/intake.js +1 -1
- package/dist/src/harness/model-call/run.js +1 -1
- package/dist/src/harness/proxy-input-requests.d.ts +17 -6
- package/dist/src/harness/proxy-input-requests.js +1 -1
- package/dist/src/harness/session-machine/current.d.ts +4 -0
- package/dist/src/harness/session-machine/current.js +1 -1
- package/dist/src/harness/step/after-model.js +1 -1
- package/dist/src/harness/step/context.d.ts +7 -2
- package/dist/src/harness/step/context.js +1 -1
- package/dist/src/harness/tool-call-io.js +1 -1
- package/dist/src/harness/tool-loop.js +1 -1
- package/dist/src/harness/tools.js +1 -1
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/internal/invocation/workflow-execution.js +1 -1
- package/dist/src/internal/nitro/routes/channel-dispatch.js +1 -1
- package/dist/src/internal/workflow/cancel-expired-development-run.js +1 -1
- package/dist/src/protocol/routes.d.ts +4 -0
- package/dist/src/protocol/routes.js +1 -1
- package/dist/src/public/channels/auth.d.ts +21 -4
- package/dist/src/public/channels/auth.js +1 -1
- package/dist/src/public/channels/mcp.js +1 -1
- package/dist/src/public/schedules/providers/in-memory.js +1 -1
- package/dist/src/public/schedules/providers/vercel.js +1 -1
- package/dist/src/public/schedules/subscription.d.ts +0 -1
- package/dist/src/sandbox/state.d.ts +1 -0
- package/dist/src/self-modification/extension/subagents/agent/instructions.js +1 -1
- package/dist/src/self-modification/extension/subagents/agent/tools/registry_add.js +1 -1
- package/dist/src/setup/flows/registry-session.d.ts +10 -2
- package/dist/src/setup/flows/registry-session.js +1 -1
- package/dist/src/setup/flows/registry.d.ts +2 -0
- package/dist/src/setup/flows/registry.js +1 -1
- package/dist/src/setup/integrations/shared/prerequisite.d.ts +8 -0
- package/dist/src/setup/integrations/shared/prerequisite.js +1 -1
- package/dist/src/setup/registry-setup-client.js +1 -1
- package/dist/src/setup/scaffold/create/project.js +1 -1
- package/dist/src/setup/scaffold/index.js +1 -1
- package/dist/src/setup/vercel-project.d.ts +1 -2
- package/dist/src/setup/vercel-project.js +0 -0
- package/dist/src/shared/sandbox-provider.d.ts +9 -2
- package/dist/src/subagents/adapter.d.ts +3 -2
- package/dist/src/subagents/adapter.js +1 -1
- package/dist/src/subagents/callback-route.js +1 -1
- package/dist/src/subagents/hitl-proxy.d.ts +4 -3
- package/dist/src/subagents/hitl-proxy.js +1 -1
- package/dist/src/subagents/parent-notification.js +1 -1
- package/dist/src/svelte/index.js +1 -1
- package/dist/src/svelte/use-eve-agent.js +1 -1
- package/dist/src/tool-stubs/execute.d.ts +13 -0
- package/dist/src/tool-stubs/execute.js +1 -0
- package/dist/src/tool-stubs/output.d.ts +4 -0
- package/dist/src/tool-stubs/output.js +1 -0
- package/dist/src/tool-stubs/playback.d.ts +15 -0
- package/dist/src/tool-stubs/playback.js +1 -0
- package/dist/src/tool-stubs/rules.d.ts +3 -0
- package/dist/src/tool-stubs/rules.js +1 -0
- package/dist/src/tool-stubs/schema.d.ts +4 -0
- package/dist/src/tool-stubs/schema.js +1 -0
- package/dist/src/tool-stubs/target.d.ts +8 -0
- package/dist/src/tool-stubs/target.js +1 -0
- package/dist/src/tool-stubs/types.d.ts +56 -0
- package/dist/src/tool-stubs/types.js +1 -0
- package/dist/src/tool-stubs/validate-targets.d.ts +6 -0
- package/dist/src/tool-stubs/validate-targets.js +1 -0
- package/dist/src/tools/provided/ask-question-workflow.js +1 -1
- package/dist/src/tools/provided/sleep-workflow.js +1 -1
- package/dist/src/vue/index.js +1 -1
- package/dist/src/vue/use-eve-agent.js +1 -1
- package/docs/concepts/sessions-runs-and-streaming.md +2 -2
- package/docs/evals/meta.json +10 -1
- package/docs/evals/overview.mdx +2 -0
- package/docs/evals/tool-stubs.mdx +257 -0
- package/docs/extensions.md +1 -1
- package/docs/guides/auth-and-route-protection.md +25 -0
- package/docs/guides/dynamic-capabilities.md +10 -3
- package/docs/guides/frontend/nextjs.mdx +17 -4
- package/docs/sandbox/index.mdx +10 -2
- package/docs/subagents/index.mdx +1 -1
- package/docs/tools/human-in-the-loop.md +1 -1
- package/docs/tools/overview.mdx +8 -4
- package/docs/tools/workflows.mdx +15 -7
- package/package.json +1 -1
|
@@ -11,21 +11,34 @@ Use this integration when Next.js owns the application's development and deploym
|
|
|
11
11
|
|
|
12
12
|
- The `eve` package installed in your project (`npm install eve@latest`).
|
|
13
13
|
- An existing eve agent directory. If you don't have one, start from [Getting Started](../../getting-started).
|
|
14
|
-
- A Next.js app, or
|
|
14
|
+
- A Next.js app, or an eve project where you want to generate one below.
|
|
15
15
|
|
|
16
16
|
## Add the generated Web Chat app
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
Install the generated Next.js Web Chat app from a standalone agent project:
|
|
19
19
|
|
|
20
20
|
```bash
|
|
21
21
|
eve add channel/web
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
For an agent workspace, select the member the chat should call:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
eve add channel/web --agent support
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
The installer configures the chat for the selected agent. By default, it adds a shared Next.js
|
|
31
|
+
application under `apps/web`; if a root Web Chat app already exists, it configures that app instead.
|
|
32
|
+
For Next.js hosting, the installer wraps `next.config.ts` with `withEve()`. When setting up a new
|
|
33
|
+
app, choose **Next.js** to host the integration. The generated chat uses same-origin `/eve/v1/*`
|
|
34
|
+
routes for a standalone agent or `/eve/<name>/v1/*` routes for a workspace member. Running the
|
|
35
|
+
installer from a workspace root without selecting a member is not supported.
|
|
25
36
|
|
|
26
37
|
Before accepting production browser traffic, replace the generated placeholder authorization policy. See [Authenticate browser requests](./overview#authenticate-browser-requests).
|
|
27
38
|
|
|
28
|
-
|
|
39
|
+
To integrate an existing Next.js application without generating a chat UI, follow the steps below.
|
|
40
|
+
To deploy the frontend and agents as separate Vercel services, choose **Vercel services** during
|
|
41
|
+
setup instead; see the [workspace layout guidance](/docs/concepts/project-structure#configure-a-web-deployment).
|
|
29
42
|
|
|
30
43
|
## Wrap the Next.js config
|
|
31
44
|
|
package/docs/sandbox/index.mdx
CHANGED
|
@@ -182,6 +182,10 @@ export const AcmeSandbox = defineSandboxProvider<
|
|
|
182
182
|
const client = createAcmeClient(options);
|
|
183
183
|
|
|
184
184
|
return {
|
|
185
|
+
async onSessionEnd(_ctx, _artifact, state, { reason }) {
|
|
186
|
+
await client.delete({ id: state.remoteId, reason });
|
|
187
|
+
},
|
|
188
|
+
|
|
185
189
|
async prepare(ctx) {
|
|
186
190
|
const temporary = await client.createTemporary({
|
|
187
191
|
files: await ctx.files.list(),
|
|
@@ -213,7 +217,11 @@ export const AcmeSandbox = defineSandboxProvider<
|
|
|
213
217
|
});
|
|
214
218
|
```
|
|
215
219
|
|
|
216
|
-
`prepare()` returns the complete JSON-serializable artifact. Core calls `start()` once for a new durable sandbox session and persists its minimal JSON-compatible state. Process restarts call `resume()` with only the current context, that state, and the target deployment's exact artifact.
|
|
220
|
+
`prepare()` returns the complete JSON-serializable artifact. Core calls `start()` once for a new durable sandbox session and persists its minimal JSON-compatible state. Process restarts call `resume()` with only the current context, that state, and the target deployment's exact artifact.
|
|
221
|
+
|
|
222
|
+
`onSessionEnd()` is invoked when the durable session reaches a completed, expired, or failed terminal outcome. It receives the exact prepared artifact, persisted provider state, and a `reason` of `"completed"`, `"expired"`, or `"failed"`. Implement idempotent permanent cleanup from those values rather than depending on a live handle. eve retries the cleanup step and logs an exhausted failure without replacing the session's terminal outcome. A session that never opened a sandbox and a child that borrows its parent's sandbox do not call the hook.
|
|
223
|
+
|
|
224
|
+
Provider handles implement `onSandboxStop()`, `onRuntimeShutdown()`, and `onSandboxDelete()`. These handle-level methods cover authored stop or delete calls, process shutdown, and failed initialization; `onSessionEnd()` is the single provider hook for durable terminal session cleanup.
|
|
217
225
|
|
|
218
226
|
Open options belong to `start()` and are not serialized or passed to `resume()`. A provider must put any immutable option-derived data needed for reconnection in its session state. With the current immutable-state contract, `resume()` reconnects existing native state and fails if it is gone rather than recreating callback side effects. A custom provider may define start-only callback fields, but built-in providers initialize the sandbox in `defineSandbox()` after `open()`.
|
|
219
227
|
|
|
@@ -231,7 +239,7 @@ Preparation discovers authored files through `ctx.files`; core keeps project lay
|
|
|
231
239
|
|
|
232
240
|
## Lifecycle
|
|
233
241
|
|
|
234
|
-
Session-owned sandboxes persist across turns and deployments while their provider state remains available. `sandbox.stop()` stops compute without deleting persisted state; a later access resumes that state directly. `sandbox.delete()` clears provider state, so the next `ctx.getSandbox()` reruns the selector and starts a fresh sandbox from the current environment.
|
|
242
|
+
Session-owned sandboxes persist across turns and deployments while their provider state remains available. `sandbox.stop()` stops compute without deleting persisted state; a later access resumes that state directly. `sandbox.delete()` clears provider state, so the next `ctx.getSandbox()` reruns the selector and starts a fresh sandbox from the current environment. When the durable session reaches a terminal outcome, eve calls the provider's `onSessionEnd()` hook to release any remaining session-owned resources.
|
|
235
243
|
|
|
236
244
|
Changing sandbox source, preparation code, Dockerfile content, environment options, workspace resources, or skills produces a new environment generation. Existing durable sessions retain their recorded sandbox state; new sessions use the current generation.
|
|
237
245
|
|
package/docs/subagents/index.mdx
CHANGED
|
@@ -229,7 +229,7 @@ By default, a subagent named `researcher` collides with an authored tool named `
|
|
|
229
229
|
|
|
230
230
|
Do not rely on subagent delegation by itself as an approval boundary. Put sensitive tools behind `approval`, connection approval, route/session authorization, or other controls wherever those tools can be called.
|
|
231
231
|
|
|
232
|
-
Each delegated subagent spins up its own child session and stream. The parent stream carries the call's `task.started` and `task.settled` events, `agent.started` when the child session opens, plus interactive `input.requested`, `authorization.required`, and `authorization.completed` events proxied from descendants so the root channel can prompt the user. The parent emits `input.resolved` when it routes an answer back down to the descendant that asked. `task.settled` carries the child's reply as `output` when the call completes, or `error.message` when it fails, along with the same tool `name` and `kind: "agent"` as the call's `task.started`. To follow the child's other progress, pass the `agent.started` event to [`session.agent()`](./guides/client/streaming#follow-a-subagent) on a client session attached to the parent and follow the child with `stream()`. It reads `agent.started.data.streamPath`: the child's own session stream for a local child, or a parent-origin proxy for a remote child, which the parent authenticates to the remote deployment.
|
|
232
|
+
Each delegated subagent spins up its own child session and stream. The parent stream carries the call's `task.started` and `task.settled` events, `agent.started` when the child session opens, plus interactive `input.requested`, `authorization.required`, and `authorization.completed` events proxied from descendants so the root channel can prompt the user. The parent emits `input.resolved` when it routes an answer back down to the descendant that asked. A tool approval is the exception: the descendant decides it, since its response policy can refuse the person who answered, so the approval stays open on the parent until the descendant settles or resolves it. The parent relays the descendant's `approval.settled` and `input.resolved` for it. On text-only channels, a typed reply that matches an option of the first open prompt, such as `approve` for a tool approval or `continue` for a session limit, answers it as the person who typed it, so a person answers several proxied prompts one message at a time. `task.settled` carries the child's reply as `output` when the call completes, or `error.message` when it fails, along with the same tool `name` and `kind: "agent"` as the call's `task.started`. To follow the child's other progress, pass the `agent.started` event to [`session.agent()`](./guides/client/streaming#follow-a-subagent) on a client session attached to the parent and follow the child with `stream()`. It reads `agent.started.data.streamPath`: the child's own session stream for a local child, or a parent-origin proxy for a remote child, which the parent authenticates to the remote deployment.
|
|
233
233
|
|
|
234
234
|
`agent.started` carries the `callId` and `turnId` of the call that opened the session, the call's `taskId`, the agent `name`, and the child's `sessionId`. Later calls with the same `taskId` reach the same session and do not announce it again, so match a child to its calls by `taskId`. A session an authored workflow tool opens with `ctx.agent` is announced the same way, with its `taskId` only when the workflow tool call runs as a task.
|
|
235
235
|
|
|
@@ -219,7 +219,7 @@ Approvals and questions share one protocol:
|
|
|
219
219
|
3. The run parks durably, for as long as it takes. The turn stays open: the stream emits `turn.waiting`, and after the answer the turn resumes under the same `turnId`. That `turn.waiting` carries `on: "input"`, since a person must act.
|
|
220
220
|
4. The client answers with `inputResponses` (structured, keyed by `requestId`) or a normal follow-up `message`. A follow-up whose text matches an option ID, option label, or numeric option index resolves automatically, including approval options such as `approve` and `cancel`.
|
|
221
221
|
|
|
222
|
-
For `ctx.ask()` questions from tools, a follow-up message answers the first open request, as described in [Several requests at once](#several-requests-at-once). The message must match an option, or the question must allow free text. Otherwise the message follows the session's `turnPolicy`. A steering message, the default, aborts the `ctx.abortSignal` of each `execute` workflow tool call the turn waits on, so a question such a call asked, such as `ask_question`'s, is withdrawn and resolves as `cancelled`. The model reads the message once those calls settle.
|
|
222
|
+
For `ctx.ask()` questions from tools and prompts proxied from subagents, a follow-up message answers the first open request, as described in [Several requests at once](#several-requests-at-once). The message must match an option, or the question must allow free text. Otherwise the message follows the session's `turnPolicy`. A steering message, the default, aborts the `ctx.abortSignal` of each `execute` workflow tool call the turn waits on, so a question such a call asked, such as `ask_question`'s, is withdrawn and resolves as `cancelled`. The model reads the message once those calls settle.
|
|
223
223
|
|
|
224
224
|
Each request includes a `kind` discriminator: `tool-approval`, `question`, or
|
|
225
225
|
`session-limit`. Clients should use `kind` to choose behavior and presentation.
|
package/docs/tools/overview.mdx
CHANGED
|
@@ -176,8 +176,8 @@ receive only the projected text.
|
|
|
176
176
|
|
|
177
177
|
### Durable waits
|
|
178
178
|
|
|
179
|
-
|
|
180
|
-
can wait durably while the call is pending:
|
|
179
|
+
A tool call with an `execute` entry point finishes before the model continues. The definition
|
|
180
|
+
decides whether the executor can wait durably while the call is pending:
|
|
181
181
|
|
|
182
182
|
| Definition | Durable waits inside `execute` | Result delivered to the model |
|
|
183
183
|
| -------------------- | -------------------------------------------------------- | ---------------------------------- |
|
|
@@ -191,11 +191,15 @@ the call returns a receipt at once, and the workflow's output reaches the model
|
|
|
191
191
|
[resumable task](/docs/tools/workflows#resumable-tasks-serve), which the model can send more calls
|
|
192
192
|
by its `taskId`.
|
|
193
193
|
|
|
194
|
+
Built-in, declared local, and remote subagent tools run as resumable tasks: each call returns a
|
|
195
|
+
receipt at once, and the child's reply reaches the model later in a `task.result` message.
|
|
196
|
+
Inside an authored workflow, awaiting a [`ctx.agent` session's `response.result()`](/docs/tools/workflows#delegate-work-ctxagent)
|
|
197
|
+
waits for the child's turn to end instead.
|
|
198
|
+
|
|
194
199
|
The `TaskExec` argument and `task.postMessage` have been removed. Return the result. In a workflow
|
|
195
200
|
body, keep values needed after a wait in local variables; workflow replay reconstructs them across
|
|
196
201
|
durable waits. Use [`ctx.ask`](/docs/tools/workflows#ask-a-human-ctxask) when the body needs an
|
|
197
|
-
answer from the human.
|
|
198
|
-
returns the child's reply as its tool result.
|
|
202
|
+
answer from the human.
|
|
199
203
|
|
|
200
204
|
### Yield and return
|
|
201
205
|
|
package/docs/tools/workflows.mdx
CHANGED
|
@@ -347,10 +347,14 @@ described in [Tasks](/docs/tools/tasks). What differs:
|
|
|
347
347
|
share one identity, so don't keep per-person data for them. Any caller in the session can
|
|
348
348
|
continue or cancel the task; see [Tasks](/docs/tools/tasks#ownership-and-limits).
|
|
349
349
|
- **Agents belong to the call that opened them:** a session the body opens with `ctx.agent` while
|
|
350
|
-
serving a call is that call's child. Its `session.parent` names the call's `callId` and turn
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
350
|
+
serving a call is that call's child. Its `session.parent` names the call's `callId` and turn.
|
|
351
|
+
The first turn of a local child uses the call's tool span as its parent when trace context is
|
|
352
|
+
available. A remote child starts its own trace; its first turn links to the call's tool span
|
|
353
|
+
with `eve.link.type=agent.dispatch` when trace context is available. Later child turns start new
|
|
354
|
+
traces. Parent session lineage stays tied to the opening call, even after the task receives
|
|
355
|
+
another call; a remote receiver accepts that lineage only from a trusted forwarder. Each message
|
|
356
|
+
uses the auth of the call being served; remote identity follows the
|
|
357
|
+
[forwarding rules](../guides/remote-agents#forwarding-the-caller-identity).
|
|
354
358
|
- **Results:** `ctx.reply(output)` settles every call received so far with `output`, all at once.
|
|
355
359
|
Each settled call reports its own `task.settled`, and the model receives the reply once. The task
|
|
356
360
|
then goes idle until its next call. A reply with
|
|
@@ -541,9 +545,13 @@ client's `MessageResult` fields, plus `error` when the turn failed:
|
|
|
541
545
|
| `error` | `{ message }` with the reason the turn failed, present only when `status` is `"failed"`. |
|
|
542
546
|
|
|
543
547
|
Every `ctx.agent(name)` call returns a new session that only the workflow run can address. The model
|
|
544
|
-
does not see it; it sees what the tool returns.
|
|
545
|
-
caller's capabilities
|
|
546
|
-
|
|
548
|
+
does not see it; it sees what the tool returns. A local child runs as the caller's principal with the
|
|
549
|
+
caller's capabilities. A remote child does not inherit the caller's session principal by default;
|
|
550
|
+
the receiving deployment determines its identity from the outbound request. To forward the caller's
|
|
551
|
+
identity, set `forwardPrincipal: true` on the remote agent and configure the receiver's
|
|
552
|
+
`trustedForwarders` (see [Forwarding the caller identity](../guides/remote-agents#forwarding-the-caller-identity)).
|
|
553
|
+
A person answers the child's questions and sign-ins at the root session, as for any subagent.
|
|
554
|
+
The session ends when the run finishes, which cancels any turn still running.
|
|
547
555
|
|
|
548
556
|
The parent stream announces each session with `agent.started`, which carries the `callId` and
|
|
549
557
|
`turnId` of the tool call the run is serving when it opens the session (for a `serve` task, the
|