eve 0.68.0 → 0.70.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 +132 -0
- package/bin/eve.js +15 -0
- package/dist/src/_virtual/_rolldown/runtime.js +1 -1
- package/dist/src/acp/adapter.js +1 -1
- package/dist/src/approval/definition.d.ts +19 -5
- package/dist/src/channel/adapter.d.ts +2 -0
- package/dist/src/channel/auth/oidc.js +1 -1
- package/dist/src/channel/channel-address.d.ts +1 -4
- package/dist/src/channel/channel-address.js +1 -1
- package/dist/src/channel/channel-operations.d.ts +4 -11
- package/dist/src/channel/channel-operations.js +1 -1
- package/dist/src/channel/compiled-channel.d.ts +0 -2
- package/dist/src/channel/compiled-channel.js +2 -2
- package/dist/src/channel/cross-channel-receive.d.ts +1 -3
- package/dist/src/channel/cross-channel-receive.js +1 -1
- package/dist/src/channel/forwarded-principal.js +1 -1
- package/dist/src/channel/schedule-auth.d.ts +16 -0
- package/dist/src/channel/schedule-auth.js +1 -1
- package/dist/src/channel/session-callback.js +1 -1
- package/dist/src/channel/session.d.ts +3 -8
- package/dist/src/channel/session.js +1 -1
- package/dist/src/channel/task-card.d.ts +121 -0
- package/dist/src/channel/task-card.js +1 -0
- package/dist/src/channel/types.d.ts +30 -57
- package/dist/src/chunks/{use-eve-agent-D4HVZBjn.js → use-eve-agent-CJQeE7-t.js} +2058 -1331
- package/dist/src/chunks/{use-eve-agent-DXcE_8Ja.js → use-eve-agent-DdemtY6C.js} +2061 -1331
- package/dist/src/cli/commands/info.d.ts +11 -0
- package/dist/src/cli/commands/info.js +1 -1
- package/dist/src/cli/commands/init-agent-workspace.js +1 -1
- package/dist/src/cli/commands/init.js +1 -1
- package/dist/src/cli/dev/command-options.d.ts +2 -2
- package/dist/src/cli/dev/command.js +1 -1
- package/dist/src/cli/dev/console-records-preload.d.ts +1 -0
- package/dist/src/cli/dev/console-records-preload.js +1 -0
- package/dist/src/cli/dev/console-records.d.ts +17 -0
- package/dist/src/cli/dev/console-records.js +3 -0
- package/dist/src/cli/dev/diagnostic-sink.d.ts +1 -0
- package/dist/src/cli/dev/local-server-process.js +1 -1
- package/dist/src/cli/dev/tui/blocks.d.ts +21 -19
- package/dist/src/cli/dev/tui/blocks.js +4 -4
- package/dist/src/cli/dev/tui/command-typeahead.d.ts +3 -6
- package/dist/src/cli/dev/tui/conversation-view.d.ts +54 -0
- package/dist/src/cli/dev/tui/conversation-view.js +1 -0
- package/dist/src/cli/dev/tui/diagnostic-presentation.d.ts +10 -0
- package/dist/src/cli/dev/tui/diagnostic-presentation.js +3 -2
- package/dist/src/cli/dev/tui/flow-drawer.d.ts +5 -2
- package/dist/src/cli/dev/tui/flow-drawer.js +1 -1
- package/dist/src/cli/dev/tui/log-display-mode.d.ts +4 -10
- package/dist/src/cli/dev/tui/log-display-mode.js +1 -1
- package/dist/src/cli/dev/tui/message-queue.d.ts +7 -63
- package/dist/src/cli/dev/tui/message-queue.js +3 -1
- package/dist/src/cli/dev/tui/prompt-commands.js +1 -1
- package/dist/src/cli/dev/tui/prompt-placeholder.d.ts +2 -0
- package/dist/src/cli/dev/tui/prompt-placeholder.js +1 -0
- package/dist/src/cli/dev/tui/question-panel.d.ts +3 -1
- package/dist/src/cli/dev/tui/question-panel.js +1 -1
- package/dist/src/cli/dev/tui/rail.d.ts +1 -1
- package/dist/src/cli/dev/tui/runner.d.ts +60 -174
- package/dist/src/cli/dev/tui/runner.js +3 -3
- package/dist/src/cli/dev/tui/status-line.d.ts +4 -2
- package/dist/src/cli/dev/tui/status-line.js +1 -1
- package/dist/src/cli/dev/tui/task-activity.d.ts +59 -0
- package/dist/src/cli/dev/tui/task-activity.js +1 -0
- package/dist/src/cli/dev/tui/terminal-renderer.d.ts +18 -57
- package/dist/src/cli/dev/tui/terminal-renderer.js +10 -13
- package/dist/src/cli/dev/tui/terminal-tool-part.d.ts +2 -0
- package/dist/src/cli/dev/tui/terminal-tool-part.js +1 -0
- package/dist/src/cli/dev/tui/test/fake-eve-server.d.ts +34 -0
- package/dist/src/cli/dev/tui/test/fake-eve-server.js +1 -0
- package/dist/src/cli/dev/tui/test/index.d.ts +1 -0
- package/dist/src/cli/dev/tui/test/index.js +1 -1
- package/dist/src/cli/dev/tui/theme.d.ts +1 -1
- package/dist/src/cli/dev/tui/theme.js +1 -1
- package/dist/src/cli/dev/tui/tool-block-groups.d.ts +6 -9
- package/dist/src/cli/dev/tui/tool-block-groups.js +1 -1
- package/dist/src/cli/dev/tui/tool-presentation.d.ts +17 -3
- package/dist/src/cli/dev/tui/tool-presentation.js +1 -1
- package/dist/src/cli/dev/tui/tool-rows.d.ts +1 -0
- package/dist/src/cli/dev/tui/tool-rows.js +2 -2
- package/dist/src/cli/dev/tui/traces/trace-conversation.js +3 -1
- package/dist/src/cli/dev/tui/traces/trace-view.js +1 -1
- package/dist/src/cli/dev/tui/transcript-parts.d.ts +73 -0
- package/dist/src/cli/dev/tui/transcript-parts.js +3 -0
- package/dist/src/cli/dev/tui/transcript.d.ts +47 -0
- package/dist/src/cli/dev/tui/transcript.js +1 -0
- package/dist/src/cli/dev/tui/tui.js +1 -1
- package/dist/src/cli/dev/tui/turn-clock.d.ts +11 -26
- package/dist/src/cli/dev/tui/turn-clock.js +1 -1
- package/dist/src/cli/dev/tui/types.d.ts +13 -9
- package/dist/src/cli/dev/ui-options.d.ts +2 -2
- package/dist/src/cli/dev/ui-options.js +1 -1
- package/dist/src/cli/option-parsers.d.ts +3 -1
- package/dist/src/cli/option-parsers.js +1 -1
- package/dist/src/cli/ui/terminal-text.js +1 -1
- package/dist/src/client/agent-info-schema.d.ts +150 -9
- package/dist/src/client/agent-info-schema.js +1 -1
- package/dist/src/client/agent-session.d.ts +28 -0
- package/dist/src/client/agent-session.js +1 -0
- package/dist/src/client/agent-stream-follower.d.ts +26 -0
- package/dist/src/client/agent-stream-follower.js +1 -0
- package/dist/src/client/authorization-message-parts.js +1 -1
- package/dist/src/client/conversation-client.d.ts +40 -0
- package/dist/src/client/conversation-client.js +1 -0
- package/dist/src/client/conversation-reducer.d.ts +29 -0
- package/dist/src/client/conversation-reducer.js +1 -0
- package/dist/src/client/conversation-state.d.ts +110 -0
- package/dist/src/client/conversation-state.js +1 -0
- package/dist/src/client/eve-agent-projection.d.ts +24 -7
- package/dist/src/client/eve-agent-projection.js +1 -1
- package/dist/src/client/eve-agent-store-helpers.d.ts +20 -1
- package/dist/src/client/eve-agent-store-helpers.js +2 -2
- package/dist/src/client/eve-agent-store-state.d.ts +15 -3
- package/dist/src/client/eve-agent-store.d.ts +10 -1
- package/dist/src/client/eve-agent-store.js +1 -1
- package/dist/src/client/index.d.ts +5 -1
- package/dist/src/client/index.js +1 -1
- package/dist/src/client/message-action-parts.js +1 -1
- package/dist/src/client/message-reducer-primitives.d.ts +1 -2
- package/dist/src/client/message-reducer-primitives.js +1 -1
- package/dist/src/client/message-reducer-types.d.ts +9 -2
- package/dist/src/client/message-reducer.js +1 -1
- package/dist/src/client/message-response.js +1 -1
- package/dist/src/client/message-run-parts.d.ts +10 -6
- package/dist/src/client/message-run-parts.js +1 -1
- package/dist/src/client/message-task-parts.d.ts +8 -0
- package/dist/src/client/message-task-parts.js +1 -0
- package/dist/src/client/optimistic-message-submissions.d.ts +6 -4
- package/dist/src/client/optimistic-message-submissions.js +1 -1
- package/dist/src/client/reducer.d.ts +5 -1
- package/dist/src/client/session-controls.d.ts +0 -1
- package/dist/src/client/session-turn-dispatch.d.ts +15 -0
- package/dist/src/client/session-turn-dispatch.js +1 -0
- package/dist/src/client/session-utils.d.ts +29 -2
- package/dist/src/client/session-utils.js +1 -1
- package/dist/src/client/session.d.ts +8 -16
- package/dist/src/client/session.js +1 -1
- package/dist/src/client/stream-version.js +1 -1
- package/dist/src/client/types.d.ts +4 -5
- package/dist/src/compiled/.vendor-stamp.json +3 -2
- package/dist/src/compiled/@eve/catalog/index.js +1 -1
- package/dist/src/compiled/@vercel/connect/LICENSE +202 -0
- package/dist/src/compiled/@vercel/connect/authorization-details.d.ts +11 -0
- package/dist/src/compiled/@vercel/connect/authorization.d.ts +47 -0
- package/dist/src/compiled/@vercel/connect/connector.d.ts +32 -0
- package/dist/src/compiled/@vercel/connect/index.d.ts +5 -0
- package/dist/src/compiled/@vercel/connect/index.js +26 -0
- package/dist/src/compiled/@vercel/connect/installation.d.ts +48 -0
- package/dist/src/compiled/@vercel/connect/token.d.ts +137 -0
- package/dist/src/compiled/@workflow/core/runtime.js +3 -3
- package/dist/src/compiler/bundled-extension.d.ts +7 -1
- package/dist/src/compiler/bundled-extension.js +1 -1
- package/dist/src/compiler/default-tool-policy.d.ts +2 -2
- package/dist/src/compiler/default-tool-policy.js +1 -1
- package/dist/src/compiler/development-extensions.js +1 -1
- package/dist/src/compiler/extension-compatibility.d.ts +54 -18
- package/dist/src/compiler/extension-compatibility.js +1 -1
- package/dist/src/compiler/extension-mount-bindings.d.ts +5 -0
- package/dist/src/compiler/extension-mount-bindings.js +1 -0
- package/dist/src/compiler/load-binding-namespace.d.ts +10 -2
- package/dist/src/compiler/load-binding-namespace.js +1 -1
- package/dist/src/compiler/manifest.d.ts +19 -17
- package/dist/src/compiler/manifest.js +1 -1
- package/dist/src/compiler/module-lifecycle.d.ts +2 -2
- package/dist/src/compiler/module-lifecycle.js +1 -1
- package/dist/src/compiler/module-map.d.ts +1 -1
- package/dist/src/compiler/module-map.js +3 -3
- package/dist/src/compiler/normalize-manifest-helpers.d.ts +18 -1
- package/dist/src/compiler/normalize-manifest-helpers.js +1 -1
- package/dist/src/compiler/normalize-manifest-types.d.ts +2 -0
- package/dist/src/compiler/normalize-manifest.js +1 -1
- package/dist/src/compiler/normalize-subagent.js +1 -1
- package/dist/src/compiler/normalize-tool.js +1 -1
- package/dist/src/compiler/project-sources.d.ts +4 -0
- package/dist/src/compiler/project-sources.js +1 -1
- package/dist/src/compiler/remote-agent-node.js +1 -1
- package/dist/src/compiler/source-graph.d.ts +5 -0
- package/dist/src/compiler/source-graph.js +1 -1
- package/dist/src/computer-use/extension/lib/computer-use-sandbox.d.ts +8 -0
- package/dist/src/computer-use/extension/lib/computer-use-sandbox.js +3 -3
- package/dist/src/computer-use/extension/lib/computer-use.d.ts +2 -0
- package/dist/src/computer-use/extension/lib/computer-use.js +2 -1
- package/dist/src/computer-use/extension/tools/computer_use.js +1 -1
- package/dist/src/context/build-dynamic-tools.js +1 -1
- package/dist/src/context/dynamic-subagent-lifecycle.d.ts +5 -0
- package/dist/src/context/dynamic-subagent-lifecycle.js +1 -1
- 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/key-names.d.ts +0 -1
- package/dist/src/context/key-names.js +1 -1
- package/dist/src/context/keys.d.ts +12 -15
- package/dist/src/context/keys.js +1 -1
- package/dist/src/context/memory-lifecycle.js +1 -1
- package/dist/src/context/memory-tools.d.ts +0 -1
- package/dist/src/context/provider.d.ts +5 -11
- package/dist/src/context/run-step.d.ts +5 -6
- package/dist/src/context/run-step.js +1 -1
- package/dist/src/context/serialize.js +1 -1
- package/dist/src/discover/bundled-extension.js +1 -1
- package/dist/src/discover/discover-agent.js +1 -1
- package/dist/src/discover/extensions.d.ts +0 -7
- package/dist/src/discover/extensions.js +1 -1
- package/dist/src/discover/manifest.d.ts +4 -0
- package/dist/src/evals/assertions/run.d.ts +4 -3
- package/dist/src/evals/assertions/run.js +1 -1
- package/dist/src/evals/index.d.ts +1 -1
- package/dist/src/evals/match.d.ts +4 -4
- package/dist/src/evals/mock-model.js +1 -1
- package/dist/src/evals/runner/derive-run-facts.d.ts +3 -3
- package/dist/src/evals/runner/derive-run-facts.js +1 -1
- package/dist/src/evals/runner/execute-task.js +1 -1
- package/dist/src/evals/runner/reporters/assertion-scores.d.ts +19 -0
- package/dist/src/evals/runner/reporters/assertion-scores.js +1 -0
- package/dist/src/evals/runner/reporters/braintrust.js +1 -1
- package/dist/src/evals/runner/reporters/datadog-client.d.ts +123 -0
- package/dist/src/evals/runner/reporters/datadog-client.js +4 -0
- package/dist/src/evals/runner/reporters/datadog.d.ts +9 -98
- package/dist/src/evals/runner/reporters/datadog.js +2 -3
- package/dist/src/evals/session-content.js +1 -1
- package/dist/src/evals/session.d.ts +4 -4
- package/dist/src/evals/session.js +2 -2
- package/dist/src/evals/types.d.ts +34 -15
- package/dist/src/eve-channel/create-request.d.ts +5 -4
- package/dist/src/eve-channel/create-request.js +1 -1
- package/dist/src/eve-channel/index.d.ts +0 -9
- package/dist/src/eve-channel/index.js +1 -1
- package/dist/src/eve-channel/request.d.ts +3 -7
- package/dist/src/eve-channel/request.js +1 -1
- package/dist/src/eve-channel/support.d.ts +15 -5
- package/dist/src/eve-channel/support.js +1 -1
- package/dist/src/eve-channel/turn-policy-request.d.ts +2 -0
- package/dist/src/eve-channel/turn-policy-request.js +1 -0
- package/dist/src/eve-channel/types.d.ts +4 -0
- package/dist/src/execution/agent-sessions/context.d.ts +62 -0
- package/dist/src/execution/agent-sessions/context.js +1 -0
- package/dist/src/{subagents/remote-dispatch.d.ts → execution/agent-sessions/remote.d.ts} +17 -40
- package/dist/src/execution/agent-sessions/remote.js +1 -0
- package/dist/src/execution/agent-sessions/requests.d.ts +20 -0
- package/dist/src/execution/agent-sessions/requests.js +1 -0
- package/dist/src/execution/agent-sessions/session.d.ts +12 -0
- package/dist/src/execution/agent-sessions/session.js +1 -0
- package/dist/src/execution/agent-sessions/steps.d.ts +59 -0
- package/dist/src/execution/agent-sessions/steps.js +1 -0
- package/dist/src/execution/agent-sessions/target.d.ts +45 -0
- package/dist/src/execution/agent-sessions/target.js +1 -0
- package/dist/src/execution/agent-sessions/usage.d.ts +18 -0
- package/dist/src/execution/agent-sessions/usage.js +1 -0
- package/dist/src/execution/authorization-callback-match.d.ts +2 -4
- package/dist/src/execution/authorization-callback-match.js +1 -1
- package/dist/src/execution/cancel-descendant-turns-step.d.ts +1 -5
- package/dist/src/execution/cancel-descendant-turns-step.js +1 -1
- package/dist/src/execution/cancelled-model-call-batch.js +1 -1
- package/dist/src/execution/connection-announcement.d.ts +7 -0
- package/dist/src/execution/connection-announcement.js +4 -0
- package/dist/src/execution/continuation-conflict-step.d.ts +2 -3
- package/dist/src/execution/continuation-conflict-step.js +1 -1
- package/dist/src/execution/coordination-dispatch-shared.d.ts +12 -28
- package/dist/src/execution/coordination-dispatch-shared.js +1 -1
- package/dist/src/execution/coordination-dispatch-step.d.ts +3 -2
- package/dist/src/execution/coordination-dispatch-step.js +1 -1
- package/dist/src/execution/create-session-step.d.ts +4 -3
- package/dist/src/execution/create-session-step.js +1 -1
- package/dist/src/execution/deliver-payloads.js +1 -1
- package/dist/src/execution/durable-session-store.d.ts +10 -5
- package/dist/src/execution/durable-session-store.js +1 -1
- package/dist/src/execution/dynamic-connections.js +1 -1
- package/dist/src/execution/dynamic-workflow/program-step.js +1 -1
- package/dist/src/execution/dynamic-workflow/schema.d.ts +1 -3
- package/dist/src/execution/dynamic-workflow/schema.js +1 -1
- package/dist/src/execution/dynamic-workflow/tool.d.ts +1 -1
- package/dist/src/execution/dynamic-workflow/tool.js +1 -1
- package/dist/src/execution/dynamic-workflow/workflow.js +1 -1
- package/dist/src/execution/forward-session-input.d.ts +4 -0
- package/dist/src/execution/forward-session-input.js +1 -0
- package/dist/src/execution/legacy-remote-agent/protocol.d.ts +41 -0
- package/dist/src/execution/legacy-remote-agent/protocol.js +1 -0
- package/dist/src/execution/legacy-session/authorization.js +1 -1
- package/dist/src/execution/legacy-session/completion-step.d.ts +2 -0
- 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/input.js +1 -1
- package/dist/src/execution/legacy-session/interrupt-step.js +1 -1
- package/dist/src/execution/legacy-session/prepare-step.d.ts +1 -0
- package/dist/src/execution/legacy-session/prepare-step.js +1 -1
- package/dist/src/execution/legacy-session/snapshot.d.ts +8 -4
- package/dist/src/execution/legacy-session/snapshot.js +1 -1
- package/dist/src/execution/legacy-session/turn-workflow.js +1 -1
- package/dist/src/execution/model-call-batching.js +1 -1
- package/dist/src/execution/node-step.d.ts +1 -1
- package/dist/src/execution/node-step.js +1 -1
- package/dist/src/execution/proxied-deliver-step.d.ts +9 -6
- package/dist/src/execution/proxied-deliver-step.js +1 -1
- package/dist/src/execution/publish-session-events.d.ts +150 -0
- package/dist/src/execution/publish-session-events.js +1 -0
- package/dist/src/execution/reconcile-session-continuation-token.d.ts +2 -2
- package/dist/src/execution/route-child-delivery.d.ts +5 -4
- package/dist/src/execution/route-child-delivery.js +1 -3
- package/dist/src/execution/runtime-context.js +1 -1
- package/dist/src/execution/sandbox/prewarm.js +1 -1
- package/dist/src/execution/session/active-turn.d.ts +97 -0
- package/dist/src/execution/session/active-turn.js +1 -0
- package/dist/src/execution/session/admission.d.ts +1 -12
- package/dist/src/execution/session/admission.js +1 -1
- package/dist/src/execution/session/entry-input.d.ts +0 -2
- package/dist/src/execution/session/entry.js +1 -1
- package/dist/src/execution/session/finalization.js +1 -1
- package/dist/src/execution/session/handoff-steps.d.ts +13 -2
- package/dist/src/execution/session/handoff-steps.js +1 -1
- package/dist/src/execution/session/handoff.d.ts +21 -5
- package/dist/src/execution/session/handoff.js +1 -1
- package/dist/src/execution/session/input-queue.d.ts +44 -39
- package/dist/src/execution/session/input-queue.js +1 -1
- package/dist/src/execution/session/next-input.d.ts +7 -10
- package/dist/src/execution/session/next-input.js +1 -1
- package/dist/src/execution/session/pending-turn-state.d.ts +2 -0
- package/dist/src/execution/session/pending-turn-state.js +1 -1
- package/dist/src/execution/session/principal.d.ts +14 -0
- package/dist/src/execution/session/principal.js +1 -0
- package/dist/src/execution/session/program.d.ts +2 -0
- package/dist/src/execution/session/program.js +1 -1
- package/dist/src/execution/session/route-selected-delivery.js +1 -1
- package/dist/src/execution/session/state-cursor.d.ts +26 -18
- package/dist/src/execution/session/state-cursor.js +1 -1
- package/dist/src/execution/session/state-delta.d.ts +40 -0
- package/dist/src/execution/session/state-delta.js +1 -0
- package/dist/src/execution/session/timeout-steps.js +1 -1
- package/dist/src/execution/session/turn-event-handler.d.ts +2 -2
- package/dist/src/execution/session/turn-event-handler.js +1 -1
- package/dist/src/execution/session/turn-step-result.d.ts +1 -3
- package/dist/src/execution/session/turn-step-result.js +1 -1
- package/dist/src/execution/session/turn-step-types.d.ts +37 -19
- package/dist/src/execution/session/turn-step.d.ts +2 -2
- package/dist/src/execution/session/turn-step.js +1 -1
- package/dist/src/execution/session/turn-waiting-step.d.ts +4 -0
- package/dist/src/execution/session/turn-waiting-step.js +1 -0
- package/dist/src/execution/session/turn.d.ts +41 -3
- package/dist/src/execution/session/turn.js +1 -1
- package/dist/src/execution/session-callback-request.js +1 -1
- package/dist/src/execution/session-event-stream.d.ts +33 -0
- package/dist/src/execution/session-event-stream.js +1 -0
- package/dist/src/execution/session-inbox/inbox.d.ts +2 -0
- package/dist/src/execution/session-inbox/inbox.js +1 -1
- package/dist/src/execution/session-inbox/protocol.js +1 -1
- package/dist/src/execution/session-inbox/release-step.js +1 -1
- package/dist/src/execution/session-inbox/resume.js +1 -1
- package/dist/src/execution/session-workflow-tool-run.d.ts +11 -2
- package/dist/src/execution/session-workflow-tool-run.js +1 -1
- package/dist/src/execution/session.d.ts +5 -6
- package/dist/src/execution/session.js +2 -2
- package/dist/src/execution/settle-cancelled-turn-step.d.ts +23 -10
- package/dist/src/execution/settle-cancelled-turn-step.js +1 -1
- package/dist/src/execution/stable-workflow-names.d.ts +0 -1
- package/dist/src/execution/stable-workflow-names.js +1 -1
- package/dist/src/execution/tasks/calls.d.ts +42 -0
- package/dist/src/execution/tasks/calls.js +1 -0
- package/dist/src/execution/tasks/model-step.d.ts +58 -0
- package/dist/src/execution/tasks/model-step.js +1 -0
- package/dist/src/execution/tasks/render.d.ts +66 -0
- package/dist/src/execution/tasks/render.js +8 -0
- package/dist/src/execution/tasks/session.d.ts +19 -0
- package/dist/src/execution/tasks/session.js +1 -0
- package/dist/src/execution/tasks/start.d.ts +34 -0
- package/dist/src/execution/tasks/start.js +1 -0
- package/dist/src/execution/tasks/steps.d.ts +31 -0
- package/dist/src/execution/tasks/steps.js +1 -0
- package/dist/src/execution/tasks/table.d.ts +192 -0
- package/dist/src/execution/tasks/table.js +1 -0
- package/dist/src/execution/tasks/task-id-input.d.ts +19 -0
- package/dist/src/execution/tasks/task-id-input.js +1 -0
- package/dist/src/execution/tasks/tool-entry-point.d.ts +11 -0
- package/dist/src/execution/tasks/tool-entry-point.js +1 -0
- package/dist/src/execution/tasks/workflow-target.d.ts +2 -0
- package/dist/src/execution/tasks/workflow-target.js +1 -1
- package/dist/src/execution/terminal-session-completion-step.d.ts +2 -0
- package/dist/src/execution/terminal-session-completion-step.js +1 -1
- package/dist/src/execution/terminal-session-failure-step.d.ts +2 -0
- package/dist/src/execution/terminal-session-failure-step.js +1 -1
- package/dist/src/execution/terminate-child-sessions-step.d.ts +2 -9
- package/dist/src/execution/terminate-child-sessions-step.js +1 -1
- package/dist/src/execution/tool-auth.js +1 -1
- package/dist/src/execution/tools/agent-router-workflow.d.ts +1 -1
- package/dist/src/execution/tools/agent-router-workflow.js +1 -1
- package/dist/src/execution/tools/agent-router.d.ts +1 -1
- package/dist/src/execution/tools/agent-router.js +1 -1
- package/dist/src/execution/tools/connection-approval.d.ts +25 -0
- package/dist/src/execution/tools/connection-approval.js +1 -0
- package/dist/src/execution/tools/connection-search-rank.d.ts +21 -0
- package/dist/src/execution/tools/connection-search-rank.js +1 -0
- package/dist/src/execution/tools/connection-target.d.ts +18 -0
- package/dist/src/execution/tools/connection-target.js +1 -0
- package/dist/src/execution/tools/connection-tools.d.ts +10 -0
- package/dist/src/execution/tools/connection-tools.js +2 -0
- package/dist/src/execution/tools/load-skill.js +1 -1
- package/dist/src/execution/tools/workflow/answer.d.ts +7 -4
- package/dist/src/execution/tools/workflow/answer.js +1 -1
- package/dist/src/execution/tools/workflow/ask.d.ts +73 -10
- package/dist/src/execution/tools/workflow/ask.js +1 -1
- package/dist/src/execution/tools/workflow/body.d.ts +60 -19
- package/dist/src/execution/tools/workflow/body.js +1 -1
- package/dist/src/execution/tools/workflow/cancel.d.ts +7 -2
- package/dist/src/execution/tools/workflow/cancel.js +1 -1
- package/dist/src/execution/tools/workflow/emit-workflow-tool-run-report-step.d.ts +10 -4
- package/dist/src/execution/tools/workflow/emit-workflow-tool-run-report-step.js +1 -1
- package/dist/src/execution/tools/workflow/{background.d.ts → harness-definition.d.ts} +6 -6
- package/dist/src/execution/tools/workflow/harness-definition.js +1 -0
- package/dist/src/execution/tools/workflow/interrupt.d.ts +6 -0
- package/dist/src/execution/tools/workflow/interrupt.js +1 -0
- package/dist/src/execution/tools/workflow/messages.d.ts +135 -10
- package/dist/src/execution/tools/workflow/messages.js +1 -1
- package/dist/src/execution/tools/workflow/owner-inbox.js +1 -1
- package/dist/src/execution/tools/workflow/owner.d.ts +15 -4
- package/dist/src/execution/tools/workflow/owner.js +1 -1
- package/dist/src/execution/tools/workflow/serve.d.ts +3 -0
- package/dist/src/execution/tools/workflow/serve.js +1 -0
- package/dist/src/execution/tools/workflow/start.d.ts +18 -11
- package/dist/src/execution/tools/workflow/start.js +1 -1
- package/dist/src/execution/tools/workflow/step-execution.js +1 -1
- package/dist/src/execution/tools/workflow/step.js +1 -1
- package/dist/src/execution/tools/workflow/types.d.ts +0 -10
- package/dist/src/execution/tools/workflow/withdraw-step.d.ts +31 -0
- package/dist/src/execution/tools/workflow/withdraw-step.js +1 -0
- package/dist/src/execution/tools/workflow/workflow-owner-blocking.d.ts +3 -5
- package/dist/src/execution/tools/workflow/workflow-owner-blocking.js +1 -1
- package/dist/src/execution/tools/workflow/workflow.d.ts +3 -3
- package/dist/src/execution/tools/workflow/workflow.js +1 -1
- package/dist/src/execution/web-fetch/request.js +1 -1
- package/dist/src/execution/workflow-callback-url.d.ts +0 -5
- package/dist/src/execution/workflow-callback-url.js +1 -1
- package/dist/src/execution/workflow-runtime.d.ts +3 -5
- package/dist/src/execution/workflow-runtime.js +1 -1
- package/dist/src/execution/workflow-webhook-route.js +1 -1
- package/dist/src/extensions/code/extension/lib/connect-authentication.js +1 -1
- package/dist/src/extensions/code/extension/lib/github-shell.js +1 -1
- package/dist/src/extensions/code/extension/lib/prwatch-github.js +1 -1
- package/dist/src/framework/sources/modules/agent.d.ts +1 -0
- package/dist/src/framework/sources/modules/agent.js +1 -1
- package/dist/src/framework/sources/registry.js +1 -1
- package/dist/src/harness/action-presentation.js +1 -1
- package/dist/src/harness/action-result-helpers.d.ts +1 -0
- package/dist/src/harness/action-result-helpers.js +1 -1
- package/dist/src/harness/advertised-tools.d.ts +1 -1
- package/dist/src/harness/advertised-tools.js +1 -1
- package/dist/src/harness/announcements.d.ts +22 -0
- package/dist/src/harness/announcements.js +1 -0
- package/dist/src/harness/approval-candidates.d.ts +10 -2
- package/dist/src/harness/approval-candidates.js +1 -1
- package/dist/src/harness/approval-delivery-coordinator.d.ts +4 -5
- package/dist/src/harness/approval-delivery-coordinator.js +1 -1
- package/dist/src/harness/approval-recheck.d.ts +7 -0
- package/dist/src/harness/approval-recheck.js +1 -0
- package/dist/src/harness/authorization-event-fields.d.ts +13 -0
- package/dist/src/harness/authorization-event-fields.js +1 -0
- package/dist/src/harness/authorization.d.ts +17 -3
- package/dist/src/harness/authorization.js +1 -1
- package/dist/src/harness/cancelled-turn-emission.d.ts +2 -1
- package/dist/src/harness/cancelled-turn-emission.js +1 -1
- package/dist/src/harness/coordination.d.ts +36 -30
- package/dist/src/harness/coordination.js +1 -1
- package/dist/src/harness/current-messages.d.ts +6 -1
- package/dist/src/harness/current-messages.js +1 -1
- package/dist/src/harness/emission.d.ts +11 -2
- package/dist/src/harness/emission.js +1 -1
- package/dist/src/harness/execute-tool.d.ts +4 -15
- package/dist/src/harness/held-requests.d.ts +18 -0
- package/dist/src/harness/held-requests.js +1 -0
- package/dist/src/harness/hitl/approval-input-requests.d.ts +16 -0
- package/dist/src/harness/hitl/approval-input-requests.js +1 -1
- package/dist/src/harness/hitl/session-limit-input-requests.d.ts +2 -0
- package/dist/src/harness/hitl/session-limit-input-requests.js +1 -1
- package/dist/src/harness/input-extraction.js +1 -1
- package/dist/src/harness/input-request-resolution.d.ts +5 -2
- package/dist/src/harness/input-request-resolution.js +1 -1
- package/dist/src/harness/input-requests.d.ts +0 -4
- package/dist/src/harness/input-requests.js +1 -1
- package/dist/src/harness/messages.d.ts +11 -3
- package/dist/src/harness/messages.js +1 -1
- package/dist/src/harness/model-call-error.js +1 -1
- package/dist/src/harness/nested-actions.d.ts +23 -0
- package/dist/src/harness/nested-actions.js +1 -0
- package/dist/src/harness/pending-input-batches.d.ts +8 -6
- package/dist/src/harness/pending-input-batches.js +1 -1
- package/dist/src/harness/provider-tool-history.d.ts +7 -2
- package/dist/src/harness/provider-tool-history.js +1 -1
- package/dist/src/harness/proxy-input-requests.d.ts +45 -40
- package/dist/src/harness/proxy-input-requests.js +1 -1
- package/dist/src/harness/session-limit-enforcement.js +1 -1
- package/dist/src/harness/stale-input-responses.js +1 -1
- package/dist/src/harness/step-hooks.js +1 -1
- package/dist/src/harness/tool-loop.js +2 -2
- package/dist/src/harness/tool-model-output.js +1 -1
- package/dist/src/harness/tool-presentation.js +1 -1
- package/dist/src/harness/tools.d.ts +1 -5
- package/dist/src/harness/tools.js +1 -1
- package/dist/src/harness/turn-tag-state.d.ts +8 -5
- package/dist/src/harness/turn-tag-state.js +1 -1
- package/dist/src/harness/types.d.ts +25 -21
- package/dist/src/harness/workflow-dispatch.d.ts +30 -0
- package/dist/src/harness/workflow-dispatch.js +1 -0
- package/dist/src/harness/workflow-tool-runs.d.ts +5 -65
- package/dist/src/harness/workflow-tool-runs.js +1 -1
- package/dist/src/instrumentation/channel-delivery.d.ts +1 -0
- package/dist/src/instrumentation/channel-delivery.js +1 -1
- package/dist/src/instrumentation/lifecycle.d.ts +7 -0
- package/dist/src/instrumentation/memory.d.ts +2 -0
- package/dist/src/instrumentation/memory.js +1 -1
- package/dist/src/instrumentation/native-events.d.ts +1 -7
- package/dist/src/instrumentation/native-events.js +1 -1
- package/dist/src/instrumentation/runtime.d.ts +5 -7
- package/dist/src/instrumentation/runtime.js +1 -1
- package/dist/src/instrumentation/session-init.js +1 -1
- package/dist/src/instrumentation/state.d.ts +0 -6
- package/dist/src/instrumentation/state.js +1 -1
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/internal/authored-definition/schema-backed.d.ts +10 -0
- package/dist/src/internal/authored-definition/schema-backed.js +1 -1
- package/dist/src/internal/authored-module-loader.d.ts +20 -6
- package/dist/src/internal/authored-module-loader.js +2 -2
- package/dist/src/internal/authored-module-map-loader.js +1 -1
- package/dist/src/internal/authored-package-boundary.d.ts +3 -0
- package/dist/src/internal/authored-package-boundary.js +1 -1
- package/dist/src/internal/bundler/extension-mount-plugin.d.ts +14 -0
- package/dist/src/internal/bundler/extension-mount-plugin.js +1 -0
- package/dist/src/internal/bundler/extension-scope-plugin.d.ts +8 -11
- package/dist/src/internal/bundler/extension-scope-plugin.js +2 -3
- package/dist/src/internal/invocation/workflow-execution.d.ts +2 -2
- package/dist/src/internal/invocation/workflow-execution.js +1 -1
- package/dist/src/internal/mount-state.d.ts +1 -0
- package/dist/src/internal/mount-state.js +1 -0
- package/dist/src/internal/nitro/host/build-application.js +1 -1
- package/dist/src/internal/nitro/host/create-application-nitro.js +1 -1
- package/dist/src/internal/nitro/host/dev-host-fingerprint.js +1 -1
- package/dist/src/internal/nitro/host/extension-capability-requirements.js +1 -1
- package/dist/src/internal/nitro/host/workspace-extensions.js +1 -1
- package/dist/src/internal/nitro/routes/runtime-stack.js +1 -1
- package/dist/src/internal/node-esm-compat-banner.js +1 -1
- package/dist/src/internal/workflow/development-world-client.js +1 -1
- package/dist/src/internal/workflow-bundle/authored-workflow-directives.d.ts +4 -3
- package/dist/src/internal/workflow-bundle/authored-workflow-directives.js +1 -1
- package/dist/src/internal/workflow-bundle/builder.js +1 -1
- package/dist/src/internal/workflow-bundle/dynamic-capability-transform-plugin.js +1 -1
- package/dist/src/internal/workflow-bundle/dynamic-remote-agent-transform.js +1 -1
- package/dist/src/internal/workflow-bundle/dynamic-tool-ast-references.d.ts +27 -1
- package/dist/src/internal/workflow-bundle/dynamic-tool-ast-references.js +1 -1
- package/dist/src/internal/workflow-bundle/dynamic-tool-transform.js +2 -2
- package/dist/src/internal/workflow-bundle/workflow-builders.js +1 -1
- package/dist/src/models/auto.d.ts +6 -0
- package/dist/src/models/auto.js +2 -2
- package/dist/src/protocol/message-version.d.ts +1 -0
- package/dist/src/protocol/message-version.js +1 -1
- package/dist/src/protocol/message.d.ts +166 -69
- package/dist/src/protocol/message.js +2 -2
- package/dist/src/protocol/remote-agent-protocol.d.ts +16 -0
- package/dist/src/protocol/remote-agent-protocol.js +1 -0
- package/dist/src/protocol/routes.d.ts +0 -6
- package/dist/src/protocol/routes.js +1 -1
- package/dist/src/protocol/task-tools.d.ts +21 -0
- package/dist/src/protocol/task-tools.js +1 -0
- package/dist/src/public/channels/auth.js +1 -1
- package/dist/src/public/channels/chat-sdk/chatSdkChannel.d.ts +25 -16
- package/dist/src/public/channels/chat-sdk/chatSdkChannel.js +2 -2
- package/dist/src/public/channels/chat-sdk/index.d.ts +1 -1
- package/dist/src/public/channels/chat-sdk/input-actions.d.ts +8 -0
- package/dist/src/public/channels/chat-sdk/input-actions.js +1 -0
- package/dist/src/public/channels/index.d.ts +1 -1
- package/dist/src/public/channels/linq/linqChannel.js +1 -1
- package/dist/src/public/channels/photon/photonIMessageChannel.js +1 -1
- package/dist/src/public/channels/slack/action-status.d.ts +11 -12
- package/dist/src/public/channels/slack/action-status.js +1 -1
- package/dist/src/public/channels/slack/api.js +1 -1
- package/dist/src/public/channels/slack/approval-cards.d.ts +15 -0
- package/dist/src/public/channels/slack/approval-cards.js +2 -0
- package/dist/src/public/channels/slack/attachments.js +1 -1
- package/dist/src/public/channels/slack/auth.d.ts +5 -0
- package/dist/src/public/channels/slack/auth.js +1 -1
- package/dist/src/public/channels/slack/connections.d.ts +20 -16
- package/dist/src/public/channels/slack/connections.js +1 -1
- package/dist/src/public/channels/slack/defaults.d.ts +13 -33
- package/dist/src/public/channels/slack/defaults.js +3 -4
- package/dist/src/public/channels/slack/hitl.d.ts +22 -13
- package/dist/src/public/channels/slack/hitl.js +2 -2
- package/dist/src/public/channels/slack/inbound.d.ts +10 -2
- package/dist/src/public/channels/slack/inbound.js +1 -1
- package/dist/src/public/channels/slack/index.d.ts +6 -3
- package/dist/src/public/channels/slack/index.js +1 -1
- package/dist/src/public/channels/slack/input-response.d.ts +1 -5
- package/dist/src/public/channels/slack/input-response.js +1 -1
- package/dist/src/public/channels/slack/interaction-cards.js +1 -1
- package/dist/src/public/channels/slack/interactions.js +1 -1
- package/dist/src/public/channels/slack/limits.d.ts +5 -3
- package/dist/src/public/channels/slack/private-approval-delivery.js +1 -1
- package/dist/src/public/channels/slack/renderers.d.ts +76 -0
- package/dist/src/public/channels/slack/renderers.js +1 -0
- package/dist/src/public/channels/slack/reply-delivery.d.ts +72 -0
- package/dist/src/public/channels/slack/reply-delivery.js +1 -0
- package/dist/src/public/channels/slack/session-operations.d.ts +6 -0
- package/dist/src/public/channels/slack/session-operations.js +1 -1
- package/dist/src/public/channels/slack/sign-in-cancel.d.ts +20 -0
- package/dist/src/public/channels/slack/sign-in-cancel.js +1 -0
- package/dist/src/public/channels/slack/slackChannel.d.ts +62 -103
- package/dist/src/public/channels/slack/slackChannel.js +1 -1
- package/dist/src/public/channels/slack/task-card.d.ts +24 -0
- package/dist/src/public/channels/slack/task-card.js +1 -0
- package/dist/src/public/channels/teams/defaults.d.ts +1 -1
- package/dist/src/public/channels/teams/defaults.js +2 -2
- package/dist/src/public/channels/telegram/hitl.d.ts +7 -1
- package/dist/src/public/channels/telegram/hitl.js +2 -1
- package/dist/src/public/channels/telegram/state.js +1 -1
- package/dist/src/public/channels/telegram/telegramChannel.d.ts +5 -0
- package/dist/src/public/channels/telegram/telegramChannel.js +1 -1
- package/dist/src/public/definitions/channel.d.ts +7 -1
- package/dist/src/public/definitions/channel.js +1 -1
- package/dist/src/public/definitions/connections/mcp.d.ts +4 -6
- package/dist/src/public/definitions/connections/openapi.d.ts +7 -8
- package/dist/src/public/definitions/extension.d.ts +2 -2
- package/dist/src/public/definitions/extension.js +1 -1
- package/dist/src/public/definitions/hook.d.ts +4 -4
- package/dist/src/public/definitions/state.d.ts +4 -2
- package/dist/src/public/definitions/state.js +1 -1
- package/dist/src/public/memory/index.d.ts +0 -1
- package/dist/src/public/models/openai/index.d.ts +1 -1
- package/dist/src/public/models/openai/index.js +1 -1
- package/dist/src/public/next/index.js +1 -1
- package/dist/src/public/next/server.d.ts +2 -0
- package/dist/src/public/next/server.js +1 -2
- package/dist/src/public/nuxt/module.d.ts +6 -0
- package/dist/src/public/nuxt/module.js +1 -1
- package/dist/src/public/schedules/index.d.ts +1 -0
- package/dist/src/public/schedules/index.js +1 -1
- package/dist/src/public/server/index.d.ts +28 -0
- package/dist/src/public/server/index.js +1 -0
- package/dist/src/public/tools/index.d.ts +3 -2
- package/dist/src/public/tools/index.js +1 -1
- package/dist/src/public/tools/no-reply.d.ts +1 -0
- package/dist/src/public/tools/no-reply.js +1 -0
- package/dist/src/react/index.d.ts +3 -0
- package/dist/src/react/index.js +1 -1
- package/dist/src/react/use-eve-agent.d.ts +7 -5
- package/dist/src/react/use-eve-agent.js +1 -1
- package/dist/src/runtime/agent/bootstrap-model-utils.d.ts +6 -7
- package/dist/src/runtime/agent/bootstrap-model-utils.js +1 -1
- package/dist/src/runtime/agent/bootstrap.d.ts +0 -1
- package/dist/src/runtime/agent/bootstrap.js +1 -1
- package/dist/src/runtime/agent/mock-model-adapter.js +1 -1
- package/dist/src/runtime/agent/mock-model-fixtures.d.ts +1 -1
- package/dist/src/runtime/agent/mock-model-fixtures.js +2 -2
- package/dist/src/runtime/channels/registry.js +1 -1
- package/dist/src/runtime/connections/mcp-client.d.ts +1 -9
- package/dist/src/runtime/connections/mcp-client.js +1 -1
- package/dist/src/runtime/connections/openapi-client.js +1 -1
- package/dist/src/runtime/connections/scoped-authorization.d.ts +3 -1
- package/dist/src/runtime/connections/scoped-authorization.js +1 -1
- package/dist/src/runtime/connections/tool-result.d.ts +27 -0
- package/dist/src/runtime/connections/tool-result.js +2 -0
- package/dist/src/runtime/connections/tool-signature.d.ts +14 -0
- package/dist/src/runtime/connections/tool-signature.js +1 -0
- package/dist/src/runtime/local-dev-capability.js +1 -1
- package/dist/src/runtime/prompt/compose.d.ts +1 -3
- package/dist/src/runtime/prompt/compose.js +3 -3
- package/dist/src/runtime/resolve-agent-graph.js +1 -1
- package/dist/src/runtime/resolve-tool.js +1 -1
- package/dist/src/runtime/sessions/compiled-agent-cache.js +1 -1
- package/dist/src/runtime/sessions/runtime-context-keys.js +1 -1
- package/dist/src/runtime/sessions/turn.d.ts +1 -16
- package/dist/src/runtime/subagents/dynamic-remote-agent-config.js +1 -1
- package/dist/src/runtime/subagents/registry.js +1 -1
- package/dist/src/runtime/subagents/workflow-reference.d.ts +6 -3
- package/dist/src/runtime/subagents/workflow-reference.js +1 -1
- package/dist/src/runtime/subagents/workflow.d.ts +12 -6
- package/dist/src/runtime/subagents/workflow.js +1 -1
- package/dist/src/runtime/tools/registry.js +1 -1
- package/dist/src/self-modification/extension/classify-registry-item.d.ts +3 -0
- package/dist/src/self-modification/extension/classify-registry-item.js +1 -1
- package/dist/src/self-modification/extension/subagents/agent/agent.d.ts +1 -1
- package/dist/src/self-modification/extension/subagents/agent/agent.js +1 -1
- package/dist/src/self-modification/extension/subagents/agent/instructions.js +7 -7
- package/dist/src/self-modification/extension/subagents/agent/tools/registry_add.js +1 -1
- package/dist/src/self-modification/extension/subagents/agent/tools/search_registry.d.ts +2 -0
- package/dist/src/self-modification/extension/subagents/agent/tools/search_registry.js +1 -1
- package/dist/src/self-modification/scaffold.d.ts +2 -0
- package/dist/src/self-modification/scaffold.js +7 -0
- package/dist/src/self-modification/setup.js +1 -7
- package/dist/src/setup/boxes/deploy-project.js +1 -1
- package/dist/src/setup/boxes/select-model.js +1 -1
- package/dist/src/setup/integrations/shopify/templates.d.ts +1 -1
- package/dist/src/setup/integrations/shopify/templates.js +31 -19
- package/dist/src/setup/integrations/web/setup.js +6 -2
- package/dist/src/setup/scaffold/create/agent-paths.d.ts +5 -0
- package/dist/src/setup/scaffold/create/agent-paths.js +1 -0
- package/dist/src/setup/scaffold/create/instructions-template.d.ts +1 -0
- package/dist/src/setup/scaffold/create/instructions-template.js +8 -0
- package/dist/src/setup/scaffold/create/project.js +3 -10
- package/dist/src/setup/scaffold/create/web-template.d.ts +2 -2
- package/dist/src/setup/scaffold/create/web-template.js +28 -9
- package/dist/src/setup/vercel-project-framework.js +1 -1
- package/dist/src/shared/action-request-name.d.ts +3 -0
- package/dist/src/shared/action-request-name.js +1 -0
- package/dist/src/shared/action-types.d.ts +49 -21
- package/dist/src/shared/action-types.js +1 -1
- package/dist/src/shared/agent-definition.d.ts +0 -7
- package/dist/src/shared/chatgpt-model.d.ts +1 -1
- package/dist/src/shared/chatgpt-model.js +1 -1
- package/dist/src/shared/connection-types.d.ts +2 -8
- package/dist/src/shared/default-agent-model.d.ts +10 -1
- package/dist/src/shared/default-agent-model.js +1 -1
- package/dist/src/shared/display-name.d.ts +15 -0
- package/dist/src/shared/display-name.js +1 -0
- package/dist/src/shared/extension-mount.d.ts +2 -0
- package/dist/src/shared/extension-mount.js +1 -0
- package/dist/src/shared/format-duration.d.ts +2 -0
- package/dist/src/shared/format-duration.js +1 -0
- package/dist/src/shared/framework-eve-server.d.ts +43 -0
- package/dist/src/shared/framework-eve-server.js +2 -0
- package/dist/src/shared/input.d.ts +1 -0
- package/dist/src/shared/memory-state.d.ts +1 -0
- package/dist/src/shared/memory-state.js +1 -1
- package/dist/src/shared/model-helper.d.ts +2 -2
- package/dist/src/shared/model-helper.js +1 -1
- package/dist/src/shared/model-summary.d.ts +2 -6
- package/dist/src/shared/model-summary.js +1 -1
- package/dist/src/shared/presentation-text.d.ts +5 -0
- package/dist/src/shared/presentation-text.js +1 -1
- package/dist/src/shared/serialized-observability-state.d.ts +0 -4
- package/dist/src/shared/serialized-observability-state.js +1 -1
- package/dist/src/shared/token-usage.d.ts +2 -0
- package/dist/src/shared/token-usage.js +1 -1
- package/dist/src/shared/trace-root.d.ts +8 -0
- package/dist/src/shared/trace-root.js +1 -0
- package/dist/src/shared/value-delta.d.ts +39 -0
- package/dist/src/shared/value-delta.js +1 -0
- package/dist/src/subagents/adapter-state.d.ts +0 -2
- package/dist/src/subagents/adapter-state.js +1 -1
- package/dist/src/subagents/adapter.js +1 -1
- package/dist/src/subagents/callback-route.js +1 -1
- package/dist/src/subagents/event-proxy-step.d.ts +16 -29
- package/dist/src/subagents/event-proxy-step.js +1 -1
- package/dist/src/subagents/hitl-proxy.d.ts +38 -20
- package/dist/src/subagents/hitl-proxy.js +1 -1
- package/dist/src/subagents/invocation.d.ts +4 -3
- package/dist/src/subagents/parent-notification.d.ts +2 -1
- package/dist/src/subagents/parent-notification.js +1 -1
- package/dist/src/subagents/token-budget.d.ts +8 -9
- package/dist/src/subagents/token-budget.js +1 -1
- package/dist/src/subagents/tool.d.ts +6 -12
- package/dist/src/subagents/tool.js +1 -1
- package/dist/src/svelte/index.d.ts +3 -0
- package/dist/src/svelte/index.js +2 -2
- package/dist/src/svelte/use-eve-agent.d.ts +7 -4
- package/dist/src/svelte/use-eve-agent.js +1 -1
- package/dist/src/tools/behavior.d.ts +5 -5
- package/dist/src/tools/definition.d.ts +50 -14
- package/dist/src/tools/definition.js +1 -1
- package/dist/src/tools/durable-callbacks.d.ts +1 -1
- package/dist/src/tools/dynamic.d.ts +6 -0
- package/dist/src/tools/framework/agent-contract.d.ts +2 -5
- package/dist/src/tools/framework/agent-contract.js +1 -1
- package/dist/src/tools/framework/agent.d.ts +2 -5
- package/dist/src/tools/framework/agent.js +1 -1
- package/dist/src/tools/framework/connection-tools.d.ts +3 -0
- package/dist/src/tools/framework/connection-tools.js +1 -0
- package/dist/src/tools/provided/agent-router.d.ts +6 -3
- package/dist/src/tools/provided/agent-router.js +1 -1
- package/dist/src/{execution/tools → tools/provided}/ask-question-workflow.d.ts +3 -4
- package/dist/src/tools/provided/ask-question-workflow.js +1 -0
- package/dist/src/tools/provided/ask-question.d.ts +20 -5
- package/dist/src/tools/provided/ask-question.js +2 -1
- package/dist/src/tools/provided/interrupted.d.ts +18 -0
- package/dist/src/tools/provided/interrupted.js +1 -0
- package/dist/src/tools/provided/load-skill.js +1 -1
- package/dist/src/tools/provided/no-reply.d.ts +19 -0
- package/dist/src/tools/provided/no-reply.js +1 -0
- package/dist/src/tools/provided/sleep-workflow.d.ts +4 -0
- package/dist/src/tools/provided/sleep-workflow.js +1 -0
- package/dist/src/tools/provided/sleep.d.ts +11 -5
- package/dist/src/tools/provided/sleep.js +1 -1
- package/dist/src/tools/provided/task-cancel.d.ts +6 -0
- package/dist/src/tools/provided/task-cancel.js +1 -0
- package/dist/src/tools/provided/task-wait.d.ts +9 -0
- package/dist/src/tools/provided/task-wait.js +1 -0
- package/dist/src/tools/provided/workflow.d.ts +2 -2
- package/dist/src/tools/provided/workflow.js +1 -1
- package/dist/src/tools/schema-emission.d.ts +23 -0
- package/dist/src/tools/schema-emission.js +1 -0
- package/dist/src/tools/schema.d.ts +22 -8
- package/dist/src/tools/schema.js +1 -1
- package/dist/src/tools/workflow-definition.d.ts +187 -85
- package/dist/src/tools/workflow-definition.js +1 -1
- package/dist/src/tools/workflow-entry-point.d.ts +3 -0
- package/dist/src/tools/workflow-entry-point.js +1 -0
- package/dist/src/tracing/agent-action-instrumentation.d.ts +1 -3
- 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-invocation-coordinator.d.ts +9 -18
- package/dist/src/tracing/agent-invocation-coordinator.js +1 -1
- package/dist/src/tracing/agent-memory-instrumentation.js +1 -1
- package/dist/src/tracing/agent-otel-attributes.d.ts +6 -0
- package/dist/src/tracing/agent-otel-attributes.js +1 -1
- package/dist/src/tracing/agent-otel-content.d.ts +0 -2
- package/dist/src/tracing/agent-otel-content.js +3 -3
- package/dist/src/tracing/agent-otel-provider.js +2 -2
- package/dist/src/tracing/agent-otel-runtime-context.d.ts +20 -0
- package/dist/src/tracing/agent-otel-runtime-context.js +1 -1
- package/dist/src/tracing/agent-otel-session-context.js +1 -1
- package/dist/src/tracing/agent-otel-usage.js +1 -1
- package/dist/src/tracing/agent-span-contract.d.ts +1 -1
- package/dist/src/tracing/agent-span-contract.js +1 -1
- package/dist/src/tracing/agent-span-id-generator.d.ts +0 -1
- package/dist/src/tracing/agent-span-id-generator.js +1 -1
- package/dist/src/tracing/agent-tool-instrumentation.js +1 -1
- package/dist/src/tracing/agent-trace-context-codec.d.ts +5 -2
- package/dist/src/tracing/agent-trace-context-codec.js +1 -1
- package/dist/src/tracing/agent-trace-context-store.d.ts +2 -27
- package/dist/src/tracing/agent-trace-context-store.js +1 -1
- package/dist/src/tracing/agent-trace-span-processor.js +1 -1
- package/dist/src/tracing/agent-trace-state.d.ts +4 -19
- package/dist/src/tracing/content-attributes.js +1 -1
- package/dist/src/tracing/conversation-context.d.ts +10 -0
- package/dist/src/tracing/conversation-context.js +1 -1
- package/dist/src/tracing/install-instrumentation-runtime.js +1 -1
- package/dist/src/tracing/otel-registration.js +1 -1
- package/dist/src/vue/index.d.ts +3 -0
- package/dist/src/vue/index.js +2 -2
- package/dist/src/vue/use-eve-agent.d.ts +7 -3
- package/dist/src/vue/use-eve-agent.js +1 -1
- package/docs/agent-config.md +36 -13
- package/docs/channels/chat-sdk.mdx +15 -4
- package/docs/channels/custom.mdx +89 -17
- package/docs/channels/eve.mdx +1 -1
- package/docs/channels/mcp.mdx +1 -1
- package/docs/channels/overview.mdx +14 -56
- package/docs/channels/slack.mdx +287 -45
- package/docs/channels/telegram.mdx +2 -0
- package/docs/concepts/built-in-tools.md +37 -28
- package/docs/concepts/context-control.md +2 -2
- package/docs/concepts/execution-model-and-durability.mdx +10 -11
- package/docs/concepts/sessions-runs-and-streaming.md +69 -49
- package/docs/connections/mcp.mdx +4 -4
- package/docs/connections/openapi.mdx +2 -2
- package/docs/connections/overview.mdx +11 -5
- package/docs/evals/assertions.mdx +5 -5
- package/docs/evals/cases.mdx +1 -1
- package/docs/evals/reporters.mdx +10 -4
- package/docs/extensions.md +22 -2
- package/docs/guides/client/streaming.mdx +33 -12
- package/docs/guides/deployment/vercel.mdx +2 -1
- package/docs/guides/dev-tui.md +26 -16
- package/docs/guides/dynamic-capabilities.md +6 -4
- package/docs/guides/evaluate.md +29 -2
- package/docs/guides/frontend/nuxt.mdx +24 -4
- package/docs/guides/frontend/overview.mdx +45 -41
- package/docs/guides/frontend/use-eve-agent-svelte.mdx +4 -10
- package/docs/guides/frontend/use-eve-agent-vue.mdx +4 -10
- package/docs/guides/hooks.md +16 -12
- package/docs/guides/instrumentation/instrumentation.mdx +2 -0
- package/docs/guides/instrumentation/otel.mdx +24 -6
- package/docs/guides/remote-agents.md +38 -22
- package/docs/guides/self-modification.md +10 -0
- package/docs/instructions.mdx +1 -1
- package/docs/patterns/multi-tenant-approvals.md +1 -1
- package/docs/protocols/ucp.mdx +20 -16
- package/docs/reference/cli.md +64 -11
- package/docs/reference/typescript-api.md +43 -41
- package/docs/schedules.mdx +14 -34
- package/docs/subagents/index.mdx +24 -56
- package/docs/tools/human-in-the-loop.md +50 -15
- package/docs/tools/meta.json +1 -1
- package/docs/tools/overview.mdx +80 -60
- package/docs/tools/tasks-upgrade.md +201 -0
- package/docs/tools/tasks.md +315 -0
- package/docs/tools/workflows.mdx +368 -154
- package/package.json +18 -12
- package/dist/src/channel/activity-renderer.d.ts +0 -21
- package/dist/src/channel/activity-renderer.js +0 -1
- package/dist/src/channel/activity-sink.d.ts +0 -2
- package/dist/src/channel/activity-sink.js +0 -1
- package/dist/src/cli/dev/tui/steering-stream.d.ts +0 -15
- package/dist/src/cli/dev/tui/steering-stream.js +0 -1
- package/dist/src/cli/dev/tui/subagent-pump.d.ts +0 -142
- package/dist/src/cli/dev/tui/subagent-pump.js +0 -1
- package/dist/src/eve-channel/activity-observer-request.d.ts +0 -7
- package/dist/src/eve-channel/activity-observer-request.js +0 -1
- package/dist/src/eve-channel/delivery-policy-request.d.ts +0 -4
- package/dist/src/eve-channel/delivery-policy-request.js +0 -1
- package/dist/src/execution/activity-cohort.d.ts +0 -20
- package/dist/src/execution/activity-cohort.js +0 -1
- package/dist/src/execution/activity-collector.d.ts +0 -12
- package/dist/src/execution/activity-collector.js +0 -1
- package/dist/src/execution/activity-events.d.ts +0 -8
- package/dist/src/execution/activity-events.js +0 -1
- package/dist/src/execution/activity-route.d.ts +0 -2
- package/dist/src/execution/activity-route.js +0 -1
- package/dist/src/execution/activity-work-id.d.ts +0 -9
- package/dist/src/execution/activity-work-id.js +0 -1
- package/dist/src/execution/activity-work.d.ts +0 -30
- package/dist/src/execution/activity-work.js +0 -1
- package/dist/src/execution/cancel-indexed-session-tasks-step.d.ts +0 -7
- package/dist/src/execution/cancel-indexed-session-tasks-step.js +0 -1
- package/dist/src/execution/dispatch-action-failures.d.ts +0 -8
- package/dist/src/execution/dispatch-action-failures.js +0 -1
- package/dist/src/execution/dispatch-start-operation.d.ts +0 -15
- package/dist/src/execution/dispatch-start-operation.js +0 -1
- package/dist/src/execution/publish-channel-event.d.ts +0 -23
- package/dist/src/execution/publish-channel-event.js +0 -1
- package/dist/src/execution/scheduled-launch-delivery.d.ts +0 -7
- package/dist/src/execution/scheduled-launch-delivery.js +0 -1
- package/dist/src/execution/session/event-sink.d.ts +0 -26
- package/dist/src/execution/session/event-sink.js +0 -1
- package/dist/src/execution/session-activity-projection.d.ts +0 -16
- package/dist/src/execution/session-activity-projection.js +0 -1
- package/dist/src/execution/session-activity-renderer-step.d.ts +0 -15
- package/dist/src/execution/session-activity-renderer-step.js +0 -1
- package/dist/src/execution/session-activity.d.ts +0 -3
- package/dist/src/execution/session-activity.js +0 -1
- package/dist/src/execution/submit-activity.d.ts +0 -7
- package/dist/src/execution/submit-activity.js +0 -1
- package/dist/src/execution/task-event-callback.d.ts +0 -12
- package/dist/src/execution/task-event-callback.js +0 -1
- package/dist/src/execution/task-input-capability.d.ts +0 -4
- package/dist/src/execution/task-input-capability.js +0 -1
- package/dist/src/execution/task-input-response-route.d.ts +0 -2
- package/dist/src/execution/task-input-response-route.js +0 -1
- package/dist/src/execution/tasks/child/notify.d.ts +0 -44
- package/dist/src/execution/tasks/child/notify.js +0 -1
- package/dist/src/execution/tasks/parent/control-shared.d.ts +0 -23
- package/dist/src/execution/tasks/parent/control-shared.js +0 -1
- package/dist/src/execution/tasks/parent/delegate.d.ts +0 -35
- package/dist/src/execution/tasks/parent/delegate.js +0 -1
- package/dist/src/execution/tasks/parent/dispatch.d.ts +0 -22
- package/dist/src/execution/tasks/parent/dispatch.js +0 -1
- package/dist/src/execution/tasks/parent/hitl-proxy-steps.d.ts +0 -27
- package/dist/src/execution/tasks/parent/hitl-proxy-steps.js +0 -1
- package/dist/src/execution/tasks/parent/run-parent.d.ts +0 -58
- package/dist/src/execution/tasks/parent/run-parent.js +0 -1
- package/dist/src/execution/tasks/parent/subagent-task-projection.d.ts +0 -26
- package/dist/src/execution/tasks/parent/subagent-task-projection.js +0 -1
- package/dist/src/execution/tasks/parent/task-cancel.d.ts +0 -12
- package/dist/src/execution/tasks/parent/task-cancel.js +0 -1
- package/dist/src/execution/tasks/parent/tool-execution.d.ts +0 -45
- package/dist/src/execution/tasks/parent/tool-execution.js +0 -1
- package/dist/src/execution/terminal-session-event.d.ts +0 -13
- package/dist/src/execution/terminal-session-event.js +0 -1
- package/dist/src/execution/tools/ask-question-workflow.js +0 -1
- package/dist/src/execution/tools/ask-question.d.ts +0 -19
- package/dist/src/execution/tools/ask-question.js +0 -2
- package/dist/src/execution/tools/connection-search.d.ts +0 -2
- package/dist/src/execution/tools/connection-search.js +0 -2
- package/dist/src/execution/tools/sleep-workflow.d.ts +0 -3
- package/dist/src/execution/tools/sleep-workflow.js +0 -1
- package/dist/src/execution/tools/sleep.d.ts +0 -10
- package/dist/src/execution/tools/sleep.js +0 -1
- package/dist/src/execution/tools/subagent/accept-event-step.d.ts +0 -7
- package/dist/src/execution/tools/subagent/accept-event-step.js +0 -1
- package/dist/src/execution/tools/subagent/emit-event-step.d.ts +0 -12
- package/dist/src/execution/tools/subagent/emit-event-step.js +0 -1
- package/dist/src/execution/tools/subagent/invoke-agent.d.ts +0 -42
- package/dist/src/execution/tools/subagent/invoke-agent.js +0 -1
- package/dist/src/execution/tools/subagent/invoke-preparation.d.ts +0 -44
- package/dist/src/execution/tools/subagent/invoke-preparation.js +0 -1
- package/dist/src/execution/tools/subagent/invoke-step.d.ts +0 -64
- package/dist/src/execution/tools/subagent/invoke-step.js +0 -1
- package/dist/src/execution/tools/subagent/receipt-identity.d.ts +0 -11
- package/dist/src/execution/tools/subagent/receipt-identity.js +0 -1
- package/dist/src/execution/tools/subagent/start.d.ts +0 -51
- package/dist/src/execution/tools/subagent/start.js +0 -1
- package/dist/src/execution/tools/subagent/steer.d.ts +0 -13
- package/dist/src/execution/tools/subagent/steer.js +0 -1
- package/dist/src/execution/tools/subagent/task-agent-requests.d.ts +0 -24
- package/dist/src/execution/tools/subagent/task-agent-requests.js +0 -1
- package/dist/src/execution/tools/subagent/task-cancel.d.ts +0 -10
- package/dist/src/execution/tools/subagent/task-cancel.js +0 -1
- package/dist/src/execution/tools/tasks.d.ts +0 -3
- package/dist/src/execution/tools/tasks.js +0 -1
- package/dist/src/execution/tools/workflow/background.js +0 -1
- package/dist/src/execution/tools/workflow/workflow-owner-background.d.ts +0 -14
- package/dist/src/execution/tools/workflow/workflow-owner-background.js +0 -1
- package/dist/src/harness/background-tools.d.ts +0 -45
- package/dist/src/harness/background-tools.js +0 -1
- package/dist/src/instrumentation/background-task-runtime.d.ts +0 -18
- package/dist/src/instrumentation/background-task-runtime.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-config@0.3.0/node_modules/@vercel/cli-config/dist/index.js +0 -21
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/envpath.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/errors.js +0 -2
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/errutils.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/exec.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/fsutils.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/index.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/lookup.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/safety.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/authorization.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/connector.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/index.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/installation.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/internal/base-url.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/internal/default-scopes.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/internal/env.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/internal/url-validation.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/token.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/auth-errors.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/exchange-vercel-oidc-token.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/get-context.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/get-vercel-oidc-token-sync.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/get-vercel-oidc-token-with-refresh.js +0 -2
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/index.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/oauth.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/token-error.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/token-io.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/token-util.js +0 -2
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/token.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/verify-vercel-oidc-token.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/version.js +0 -1
- package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js +0 -1
- package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js +0 -1
- package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js +0 -1
- package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js +0 -1
- package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js +0 -1
- package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js +0 -1
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/index.js +0 -1
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/command.js +0 -1
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/error.js +0 -2
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/kill.js +0 -1
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/promise.js +0 -1
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/stdio.js +0 -1
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/stream.js +0 -1
- package/dist/src/node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/buffer-stream.js +0 -1
- package/dist/src/node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/index.js +0 -1
- package/dist/src/node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/core.js +0 -1
- package/dist/src/node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/main.js +0 -1
- package/dist/src/node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/realtime.js +0 -1
- package/dist/src/node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/signals.js +0 -1
- package/dist/src/node_modules/.pnpm/is-stream@2.0.1/node_modules/is-stream/index.js +0 -1
- package/dist/src/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js +0 -1
- package/dist/src/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js +0 -1
- package/dist/src/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/index.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/compact/decrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/compact/encrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/flattened/decrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/flattened/encrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/general/decrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/general/encrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwk/embedded.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwk/thumbprint.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwks/local.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwks/remote.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/compact/sign.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/compact/verify.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/flattened/sign.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/flattened/verify.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/general/sign.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/general/verify.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/decrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/encrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/produce.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/sign.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/unsecured.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/verify.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/key/export.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/key/generate_key_pair.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/key/generate_secret.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/key/import.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/aesgcmkw.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/buffer_utils.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/cek.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/check_iv_length.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/check_key_type.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/check_p2s.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/crypto_key.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/decrypt_key_management.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/encrypt_key_management.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/epoch.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/invalid_key_input.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/is_disjoint.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/is_jwk.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/is_object.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/iv.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/jwt_claims_set.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/private_symbols.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/secs.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/validate_algorithms.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/validate_crit.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/aeskw.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/asn1.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/base64url.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/cbc_tag.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/check_cek_length.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/check_key_length.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/ciphers.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/decrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/digest.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/dsa_digest.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/ecdhes.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/encrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/fetch_jwks.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/generate.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/get_named_curve.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/get_sign_verify_key.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/hmac_digest.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/is_key_like.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/is_key_object.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/jwk_to_key.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/key_to_jwk.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/node_key.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/normalize_key.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/pbes2kw.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/random.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/rsaes.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/runtime.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/sign.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/timing_safe_equal.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/verify.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/webcrypto.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/base64url.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/decode_jwt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/decode_protected_header.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/errors.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/runtime.js +0 -1
- package/dist/src/node_modules/.pnpm/merge-stream@2.0.0/node_modules/merge-stream/index.js +0 -1
- package/dist/src/node_modules/.pnpm/mimic-fn@2.1.0/node_modules/mimic-fn/index.js +0 -1
- package/dist/src/node_modules/.pnpm/npm-run-path@4.0.1/node_modules/npm-run-path/index.js +0 -1
- package/dist/src/node_modules/.pnpm/onetime@5.1.2/node_modules/onetime/index.js +0 -1
- package/dist/src/node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js +0 -1
- package/dist/src/node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js +0 -1
- package/dist/src/node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js +0 -1
- package/dist/src/node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js +0 -1
- package/dist/src/node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/signals.js +0 -1
- package/dist/src/node_modules/.pnpm/strip-final-newline@2.0.0/node_modules/strip-final-newline/index.js +0 -2
- package/dist/src/node_modules/.pnpm/which@2.0.2/node_modules/which/which.js +0 -1
- package/dist/src/protocol/activity.d.ts +0 -112
- package/dist/src/protocol/activity.js +0 -1
- package/dist/src/protocol/agent-handle-error.d.ts +0 -13
- package/dist/src/protocol/agent-handle-error.js +0 -1
- package/dist/src/public/channels/slack/activity-plan.d.ts +0 -5
- package/dist/src/public/channels/slack/activity-plan.js +0 -1
- package/dist/src/public/channels/slack/activity.d.ts +0 -63
- package/dist/src/public/channels/slack/activity.js +0 -2
- package/dist/src/public/nuxt/dev-server.d.ts +0 -25
- package/dist/src/public/nuxt/dev-server.js +0 -1
- package/dist/src/public/tools/connection-search.d.ts +0 -1
- package/dist/src/public/tools/connection-search.js +0 -1
- package/dist/src/public/tools/task-cancel.d.ts +0 -1
- package/dist/src/public/tools/task-cancel.js +0 -1
- package/dist/src/runtime/prompt/connections.d.ts +0 -9
- package/dist/src/runtime/prompt/connections.js +0 -2
- package/dist/src/shared/empty-delivery.d.ts +0 -3
- package/dist/src/shared/empty-delivery.js +0 -1
- package/dist/src/subagents/agent-handle-errors.d.ts +0 -25
- package/dist/src/subagents/agent-handle-errors.js +0 -1
- package/dist/src/subagents/callback-step.d.ts +0 -11
- package/dist/src/subagents/callback-step.js +0 -1
- package/dist/src/subagents/continuation-bundle.d.ts +0 -13
- package/dist/src/subagents/continuation-bundle.js +0 -1
- package/dist/src/subagents/handle-dispatch.d.ts +0 -65
- package/dist/src/subagents/handle-dispatch.js +0 -1
- package/dist/src/subagents/handles/operation-id.d.ts +0 -15
- package/dist/src/subagents/handles/operation-id.js +0 -1
- package/dist/src/subagents/handles/prompt.d.ts +0 -52
- package/dist/src/subagents/handles/prompt.js +0 -3
- package/dist/src/subagents/handles/query.d.ts +0 -41
- package/dist/src/subagents/handles/query.js +0 -1
- package/dist/src/subagents/handles/state-key.d.ts +0 -8
- package/dist/src/subagents/handles/state-key.js +0 -1
- package/dist/src/subagents/handles/store.d.ts +0 -217
- package/dist/src/subagents/handles/store.js +0 -1
- package/dist/src/subagents/handles/transitions.d.ts +0 -103
- package/dist/src/subagents/handles/transitions.js +0 -1
- package/dist/src/subagents/remote-dispatch.js +0 -1
- package/dist/src/subagents/start-local.d.ts +0 -29
- package/dist/src/subagents/start-local.js +0 -1
- package/dist/src/subagents/start-remote.d.ts +0 -21
- package/dist/src/subagents/start-remote.js +0 -1
- package/dist/src/tasks/delivery-context.d.ts +0 -32
- package/dist/src/tasks/delivery-context.js +0 -4
- package/dist/src/tasks/delivery-policy.d.ts +0 -14
- package/dist/src/tasks/delivery-policy.js +0 -1
- package/dist/src/tasks/json.d.ts +0 -88
- package/dist/src/tasks/json.js +0 -1
- package/dist/src/tasks/notification.d.ts +0 -10
- package/dist/src/tasks/notification.js +0 -1
- package/dist/src/tasks/task-id.d.ts +0 -31
- package/dist/src/tasks/task-id.js +0 -1
- package/dist/src/tasks/task-inbox-token.d.ts +0 -2
- package/dist/src/tasks/task-inbox-token.js +0 -1
- package/dist/src/tasks/transitions.d.ts +0 -17
- package/dist/src/tasks/transitions.js +0 -1
- package/dist/src/tasks/types.d.ts +0 -138
- package/dist/src/tasks/types.js +0 -1
- package/dist/src/tools/framework/connection-search.d.ts +0 -3
- package/dist/src/tools/framework/connection-search.js +0 -1
- package/dist/src/tools/framework/task-cancel.d.ts +0 -4
- package/dist/src/tools/framework/task-cancel.js +0 -1
- package/dist/src/tools/framework/task-contract.d.ts +0 -19
- package/dist/src/tools/framework/task-contract.js +0 -1
- package/dist/src/tools/native-definition.d.ts +0 -7
- package/dist/src/tools/native-definition.js +0 -1
- package/dist/src/tracing/agent-invocation-terminal.d.ts +0 -18
- package/dist/src/tracing/agent-invocation-terminal.js +0 -1
- /package/dist/src/execution/{tools/subagent → agent-sessions}/metadata.d.ts +0 -0
- /package/dist/src/execution/{tools/subagent → agent-sessions}/metadata.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isObject}from"#shared/guards.js";function readLegacyTurnInput(e){if(!isObject(e)||e.version!==1&&e.version!==2)throw Error(`Unsupported legacy turn input version.`);let t=e.stepInput;if(!isObject(t)||typeof e.completionToken!=`string`||!e.completionToken)throw Error(`Invalid legacy turn input.`);let n=isObject(e.initialStep)&&isObject(e.initialStep.result)?e.initialStep.result:void 0,r=
|
|
1
|
+
import{isObject}from"#shared/guards.js";function readLegacyTurnInput(e){if(!isObject(e)||e.version!==1&&e.version!==2)throw Error(`Unsupported legacy turn input version.`);let t=e.stepInput;if(!isObject(t)||typeof e.completionToken!=`string`||!e.completionToken)throw Error(`Invalid legacy turn input.`);let n=isObject(e.initialStep)&&isObject(e.initialStep.result)?e.initialStep.result:void 0,r=n?.sessionState??t.sessionState,i=n?.serializedContext??t.serializedContext;if(!isObject(r)||typeof r.sessionId!=`string`||!r.sessionId||!isObject(i)||t.parentWritable===void 0)throw Error(`Legacy turn input has no session checkpoint or output stream.`);let a=t.input;if(n===void 0&&a!==void 0&&(!isObject(a)||![`deliver`,`clear`,`compact`,`runtime-action-result`].includes(String(a.kind))||a.kind===`deliver`&&!Array.isArray(a.payloads)))throw Error(`Unsupported legacy turn delivery.`);let o=n===void 0&&isObject(a)&&a.kind===`deliver`?a:void 0;return{completionToken:e.completionToken,capabilities:e.capabilities,retention:e.retention,sessionWritable:t.parentWritable,serializedContext:i,sessionState:r,delivery:o,inputCommitted:n!==void 0}}export{readLegacyTurnInput};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createLogger,logError}from"#internal/logging.js";import{isObject}from"#shared/guards.js";import{walkCauseChain}from"#shared/errors.js";import{
|
|
1
|
+
import{createLogger,logError}from"#internal/logging.js";import{isObject}from"#shared/guards.js";import{walkCauseChain}from"#shared/errors.js";import{EntityConflictError,RunExpiredError,WorkflowRunNotFoundError}from"#compiled/@workflow/errors/index.js";import{cancelRun,getWorld}from"#internal/workflow/runtime.js";import{terminateChildSessionsStep}from"#execution/terminate-child-sessions-step.js";import{settleCancelledTurn}from"#execution/settle-cancelled-turn-step.js";async function interruptLegacySessionStep(e){"use step";let{history:t,...n}=e.originalSession,r={...e.sessionState,snapshot:{session:n}};try{await terminateChildSessionsStep({sessionState:r})}catch(e){logError(createLogger(`execution.legacy-session`),`could not cooperatively stop legacy children`,e)}let i=await getWorld(),a=e.originalSession.state,o=new Set,s=a?.[`eve.runtime.workflowToolRuns`];if(Array.isArray(s))for(let e of s)isObject(e)&&typeof e.runId==`string`&&o.add(e.runId);let c=a?.[`eve.agent.handles`];if(isObject(c)&&Array.isArray(c.handles))for(let e of c.handles)isObject(e)&&isObject(e.address)&&(e.address.kind===`agent/local`||e.address.kind===`agent/self`)&&typeof e.address.sessionId==`string`&&o.add(e.address.sessionId);let l=a?.[`eve.tasks`];if(isObject(l)&&Array.isArray(l.tasks))for(let e of l.tasks)isObject(e)&&typeof e.taskRunId==`string`&&o.add(e.taskRunId);for(let t of o)if(t&&t!==e.sessionState.sessionId)try{await cancelRun(i,t,{cancelReason:`Session upgraded`})}catch(e){if(![...walkCauseChain(e)].some(e=>EntityConflictError.is(e)||RunExpiredError.is(e)||WorkflowRunNotFoundError.is(e)))throw e}return e.input.inputCommitted||e.sessionState.emissionState.turnId===``?{history:e.history,sessionState:e.sessionState,serializedContext:e.serializedContext}:await settleCancelledTurn({history:e.history,reportUsage:!1,sessionWritable:e.input.sessionWritable,serializedContext:e.serializedContext,sessionState:e.sessionState})}export{interruptLegacySessionStep};
|
|
@@ -13,6 +13,7 @@ export declare function prepareLegacySessionStep(rawInput: unknown): Promise<{
|
|
|
13
13
|
inputCommitted: boolean;
|
|
14
14
|
retention: "default" | 0 | undefined;
|
|
15
15
|
};
|
|
16
|
+
history: import("../../harness/messages.ts").HarnessModelMessage[];
|
|
16
17
|
originalSession: import("./snapshot.js").LegacySession;
|
|
17
18
|
sessionState: import("../durable-session-store.ts").DurableSessionState;
|
|
18
19
|
serializedContext: Record<string, unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{readLegacyTurnInput}from"./input.js";import{importConversation,readLegacySnapshot}from"./snapshot.js";import{isObject}from"#shared/guards.js";import{SESSION_INBOX_CONTEXT_KEY}from"#execution/session-inbox/address.js";import{getWorld,resolveRunEncryptionKey}from"#internal/workflow/runtime.js";import{hydrateWorkflowArguments}from"#compiled/@workflow/core/serialization.js";import{DEFAULT_SESSION_TIMEOUT_MS}from"#execution/session/timeout.js";async function prepareLegacySessionStep(e){"use step";let t=readLegacyTurnInput(e),n=readLegacySnapshot(t.sessionState),r=importConversation(n),
|
|
1
|
+
import{readLegacyTurnInput}from"./input.js";import{importConversation,readLegacySnapshot}from"./snapshot.js";import{isObject}from"#shared/guards.js";import{SESSION_INBOX_CONTEXT_KEY}from"#execution/session-inbox/address.js";import{getWorld,resolveRunEncryptionKey}from"#internal/workflow/runtime.js";import{hydrateWorkflowArguments}from"#compiled/@workflow/core/serialization.js";import{DEFAULT_SESSION_TIMEOUT_MS}from"#execution/session/timeout.js";async function prepareLegacySessionStep(e){"use step";let t=readLegacyTurnInput(e),n=readLegacySnapshot(t.sessionState),{history:r,sessionState:i}=importConversation(n),a=await getWorld(),o=await a.runs.get(i.sessionId),s=await hydrateWorkflowArguments(o.input,o.runId,await resolveRunEncryptionKey(a,o)),c=Array.isArray(s)&&isObject(s[0])?s[0]:void 0;if(c===void 0)throw Error(`Cannot read the original session timeout.`);let l=c.sessionTimeoutMs;if(l!==void 0&&l!==!1&&(typeof l!=`number`||!Number.isFinite(l)||l<0))throw Error(`Invalid original session timeout.`);let u=l??DEFAULT_SESSION_TIMEOUT_MS,d={...t.serializedContext,"eve.sessionId":i.sessionId,[SESSION_INBOX_CONTEXT_KEY]:{sessionId:i.sessionId}};delete d[`eve.sessionCallback`];let f=d[`eve.channel`];return isObject(f)&&f.kind===`subagent`&&isObject(f.state)&&(d[`eve.channel`]={...f,state:{...f.state,parentContinuationToken:``}}),{input:{...t,retention:t.retention??c.retention},history:r,originalSession:n,sessionState:i,serializedContext:d,sessionTimeoutMs:u,deploymentId:process.env.VERCEL_DEPLOYMENT_ID?.trim()||await a.getDeploymentId()}}export{prepareLegacySessionStep};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ModelMessage } from "ai";
|
|
2
|
-
import type
|
|
3
|
-
|
|
2
|
+
import { type DurableSession, type DurableSessionState } from "#execution/durable-session-store.js";
|
|
3
|
+
import type { HarnessModelMessage } from "#harness/messages.js";
|
|
4
|
+
export type LegacySession = DurableSession & {
|
|
4
5
|
readonly history: ModelMessage[];
|
|
5
6
|
};
|
|
6
7
|
/** Reads the driver's embedded snapshot; every supported driver carries one. */
|
|
@@ -8,5 +9,8 @@ export declare function readLegacySnapshot(state: Record<string, unknown> & {
|
|
|
8
9
|
sessionId: string;
|
|
9
10
|
}): LegacySession;
|
|
10
11
|
/** Keep committed conversation data, but no pre-cutover execution registries. */
|
|
11
|
-
export declare function importConversation(session: LegacySession):
|
|
12
|
-
|
|
12
|
+
export declare function importConversation(session: LegacySession): {
|
|
13
|
+
readonly history: HarnessModelMessage[];
|
|
14
|
+
readonly sessionState: DurableSessionState;
|
|
15
|
+
};
|
|
16
|
+
export declare function normalizeHistory(messages: readonly ModelMessage[]): HarnessModelMessage[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isObject}from"#shared/guards.js";import{isUserMessageKind,validateHarnessModelMessages}from"#harness/messages.js";import{getHarnessEmissionState}from"#harness/emission.js";const PRESERVED_FRAMEWORK_STATE=new Set([`eve.harness.emission`,`eve.harness.turnUsage`,`eve.harness.reportedSessionUsage`,`eve.harness.sessionRuntimeTokenLimit`]);function readLegacySnapshot(e){let t=e.snapshot;if(!isObject(t)||t.version!==1||!isObject(t.session)||t.session.sessionId!==e.sessionId||!Array.isArray(t.session.history))throw Error(`Unsupported legacy session snapshot.`);return t.session}function importConversation(e){let
|
|
1
|
+
import{isObject}from"#shared/guards.js";import{isUserMessageKind,validateHarnessModelMessages}from"#harness/messages.js";import{getHarnessEmissionState}from"#harness/emission.js";import{DURABLE_SESSION_VERSION}from"#execution/durable-session-store.js";const PRESERVED_FRAMEWORK_STATE=new Set([`eve.harness.emission`,`eve.harness.turnUsage`,`eve.harness.reportedSessionUsage`,`eve.harness.sessionRuntimeTokenLimit`]);function readLegacySnapshot(e){let t=e.snapshot;if(!isObject(t)||t.version!==1||!isObject(t.session)||t.session.sessionId!==e.sessionId||!Array.isArray(t.session.history))throw Error(`Unsupported legacy session snapshot.`);return t.session}function importConversation(e){let{history:t,...n}=e,r=Object.fromEntries(Object.entries(e.state??{}).filter(([e])=>!e.startsWith(`eve.`)||PRESERVED_FRAMEWORK_STATE.has(e)));return{history:normalizeHistory(t),sessionState:{version:DURABLE_SESSION_VERSION,sessionId:e.sessionId,continuationToken:e.continuationToken,hasProxyInputRequests:!1,emissionState:getHarnessEmissionState(r),snapshot:{session:{...n,state:r}}}}}function normalizeHistory(e){let t=[],n=new Map,settle=()=>{n.size!==0&&(t.push({role:`tool`,content:[...n].map(([e,t])=>({type:`tool-result`,toolCallId:e,toolName:t,output:{type:`error-text`,value:`Interrupted by the session upgrade. Start this work again if it is still needed.`}}))}),n.clear())};for(let r of e){let e=r;if(e.role===`assistant`&&Array.isArray(e.content))e={...e,content:e.content.filter(e=>e.type!==`tool-approval-request`)};else if(e.role===`tool`&&(e={...e,content:e.content.filter(e=>e.type!==`tool-approval-response`)},e.content.length===0))continue;if(e.role!==`tool`&&settle(),e.role===`assistant`&&Array.isArray(e.content))for(let t of e.content)t.type===`tool-call`&&n.set(t.toolCallId,t.toolName);if(e.role===`tool`)for(let t of e.content)t.type===`tool-result`&&n.delete(t.toolCallId);let i=e.kind;t.push(e.role===`user`&&!isUserMessageKind(i)?{...e,kind:`user`}:e)}return settle(),validateHarnessModelMessages(t)}export{importConversation,normalizeHistory,readLegacySnapshot};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{completeLegacyDriverStep}from"./completion-step.js";import{interruptLegacySessionStep}from"./interrupt-step.js";import{prepareLegacySessionStep}from"./prepare-step.js";import{sessionCommandHookToken}from"#execution/session-inbox/address.js";import{isHookConflictError}from"#execution/hook-ownership.js";import{sessionTimeoutDeadline}from"#execution/session/timeout.js";import{sessionHookTokens}from"#execution/session/hook-tokens.js";import{createSessionInbox}from"#execution/session-inbox/inbox.js";import{failSession,runPreparedSession}from"#execution/session/program.js";async function turnWorkflow(e){"use workflow";let t=await prepareLegacySessionStep(e),{sessionId:n}=t.sessionState,r=createSessionInbox(n);try{await r.claimSessionHook(sessionCommandHookToken(n))}catch(e){if(isHookConflictError(e))return;throw e}let{sessionWritable:i}=t.input,a;try{await r.claimSessionHooks(sessionHookTokens(t)),a=await interruptLegacySessionStep(t)}catch(e){return await r.dispose(),await failSession({error:e,serializedContext:t.serializedContext,sessionId:n,sessionState:t.sessionState,sessionWritable:i})}await runPreparedSession({anchor:{kind:`self`,notify:e=>completeLegacyDriverStep({completionToken:t.input.completionToken,result:e,serializedContext:t.serializedContext,sessionState:t.sessionState,sessionWritable:i})},caller:void 0,capabilities:t.input.capabilities,deploymentId:t.deploymentId,initialInput:t.input.delivery===void 0?void 0:{...t.input.delivery,caller:void 0},awaitFirstMessage:!1,retention:t.input.retention,serializedContext:a.serializedContext,sessionId:n,sessionState:a.sessionState,sessionTimeoutMs:t.sessionTimeoutMs,sessionTimeoutDeadline:sessionTimeoutDeadline(t.sessionTimeoutMs,Date.now()),sessionWritable:i},r)}turnWorkflow.workflowId=`workflow//eve//turnWorkflow`;export{turnWorkflow};
|
|
1
|
+
import{completeLegacyDriverStep}from"./completion-step.js";import{interruptLegacySessionStep}from"./interrupt-step.js";import{prepareLegacySessionStep}from"./prepare-step.js";import{sessionCommandHookToken}from"#execution/session-inbox/address.js";import{isHookConflictError}from"#execution/hook-ownership.js";import{sessionTimeoutDeadline}from"#execution/session/timeout.js";import{sessionHookTokens}from"#execution/session/hook-tokens.js";import{createSessionInbox}from"#execution/session-inbox/inbox.js";import{failSession,runPreparedSession}from"#execution/session/program.js";async function turnWorkflow(e){"use workflow";let t=await prepareLegacySessionStep(e),{sessionId:n}=t.sessionState,r=createSessionInbox(n);try{await r.claimSessionHook(sessionCommandHookToken(n))}catch(e){if(isHookConflictError(e))return;throw e}let{sessionWritable:i}=t.input,a;try{await r.claimSessionHooks(sessionHookTokens(t)),a=await interruptLegacySessionStep(t)}catch(e){return await r.dispose(),await failSession({error:e,serializedContext:t.serializedContext,sessionId:n,sessionState:t.sessionState,sessionWritable:i})}await runPreparedSession({anchor:{kind:`self`,notify:e=>completeLegacyDriverStep({completionToken:t.input.completionToken,history:t.history,result:e,serializedContext:t.serializedContext,sessionState:t.sessionState,sessionWritable:i})},caller:void 0,capabilities:t.input.capabilities,deploymentId:t.deploymentId,history:a.history,initialInput:t.input.delivery===void 0?void 0:{...t.input.delivery,caller:void 0},awaitFirstMessage:!1,retention:t.input.retention,serializedContext:a.serializedContext,sessionId:n,sessionState:a.sessionState,sessionTimeoutMs:t.sessionTimeoutMs,sessionTimeoutDeadline:sessionTimeoutDeadline(t.sessionTimeoutMs,Date.now()),sessionWritable:i},r)}turnWorkflow.workflowId=`workflow//eve//turnWorkflow`;export{turnWorkflow};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{derivePendingState}from"#execution/session/pending-turn-state.js";async function runModelCallBatch(e){let t=e.initialSession,n=e.initialInput,r=0;for(;;){let i=await e.runStep({firstCall:r===0,session:t,stepInput:n});if(r++,e.steeringSignal?.aborted===!0||i.steered===!0||!shouldRunAnotherModelCall({completedModelCalls:r,modelCallsPerStep:e.modelCallsPerStep,result:i}))return i;t=i.session,n=void 0}}function shouldRunAnotherModelCall(e){if(e.completedModelCalls>=e.modelCallsPerStep||typeof e.result.next!=`function
|
|
1
|
+
import{derivePendingState}from"#execution/session/pending-turn-state.js";async function runModelCallBatch(e){let t=e.initialSession,n=e.initialInput,r=0;for(;;){let i=await e.runStep({firstCall:r===0,session:t,stepInput:n});if(r++,e.steeringSignal?.aborted===!0||i.steered===!0||!shouldRunAnotherModelCall({completedModelCalls:r,modelCallsPerStep:e.modelCallsPerStep,result:i}))return i;t=i.session,n=void 0}}function shouldRunAnotherModelCall(e){if(e.completedModelCalls>=e.modelCallsPerStep||typeof e.result.next!=`function`)return!1;let t=derivePendingState(e.result.session);return!t.hasPendingAuthorization&&!t.hasPendingInputBatch&&(t.pendingCoordinationCallIds?.length??0)===0}export{runModelCallBatch};
|
|
@@ -62,7 +62,7 @@ export declare function buildRuntimeIdentity(node: ResolvedRuntimeAgentNode): Ru
|
|
|
62
62
|
* Resolves unified {@link HarnessToolDefinition}s from the node's registries.
|
|
63
63
|
*
|
|
64
64
|
* For authored tools: copies all lifecycle fields from the resolved definition.
|
|
65
|
-
* Prepared workflow-
|
|
65
|
+
* Prepared workflow-backed tools share the workflow-tool harness path.
|
|
66
66
|
* Tools without `execute` (provider-managed) get entries with schema but no execute.
|
|
67
67
|
*/
|
|
68
68
|
export declare function createNodeHarnessTools(input: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createLogger}from"#internal/logging.js";import{resolveInstalledPackageInfo}from"#internal/application/package.js";import{UNSPECIFIED_INPUT_SCHEMA}from"#tools/schema.js";import{createToolExecuteWithAuth}from"#execution/tool-auth.js";import{resolveRuntimeModelReference}from"#runtime/agent/resolve-model.js";import{createPreparedWorkflowToolHarnessDefinition,createWorkflowToolHarnessDefinition}from"#execution/tools/workflow/
|
|
1
|
+
import{createLogger}from"#internal/logging.js";import{resolveInstalledPackageInfo}from"#internal/application/package.js";import{UNSPECIFIED_INPUT_SCHEMA}from"#tools/schema.js";import{createToolExecuteWithAuth}from"#execution/tool-auth.js";import{resolveRuntimeModelReference}from"#runtime/agent/resolve-model.js";import{createPreparedWorkflowToolHarnessDefinition,createWorkflowToolHarnessDefinition}from"#execution/tools/workflow/harness-definition.js";import{LOAD_SKILL_TOOL_NAME}from"#runtime/skills/fragment-context.js";import{dispatchDynamicModelEvent}from"#context/dynamic-model-lifecycle.js";import{preparePersistedStepDynamicToolMetadata}from"#context/dynamic-tool-lifecycle.js";import{createToolLoopHarness}from"#harness/tool-loop.js";import{workflowIdForHandling}from"#runtime/subagents/workflow-reference.js";import{findRegisteredRuntimeTool}from"#runtime/tools/registry.js";import{WEB_SEARCH_TOOL_NAME,resolveWebSearchActivityLabel}from"#harness/provider-tool-schemas.js";const log=createLogger(`execution.node-step`);function createExecutionNodeStep(e){let t=createRuntimeModelResolver(e.modelResolutionScope),n=e.node.turnAgent.dynamicModel===void 0?void 0:createRuntimeDynamicModelEventDispatcher(e.modelResolutionScope,e.node.turnAgent.dynamicModel,e.abortSignal),r=createNodeHarnessTools({node:e.node}),i=e.instrumentation,a=i?.prepareExecution(),o=createToolLoopHarness({steeringSignal:e.steeringSignal,abortSignal:e.abortSignal,capabilities:e.capabilities,clearOnly:e.clearOnly,compactOnly:e.compactOnly,handleEvent:e.handleEvent,historyProjector:e.historyProjector,historyView:e.historyView,instrumentation:a,prepareApprovalTurn:e.prepareApprovalTurn,resolveStepDynamicTools:t=>preparePersistedStepDynamicToolMetadata({...t,resolvers:e.node.agent.dynamicToolResolvers??[]}),dispatchDynamicModelEvent:n,resolveModel:t,runtimeIdentity:buildRuntimeIdentity(e.node),tools:r});return i===void 0?o:async(e,t)=>{try{return await o(e,t)}finally{await i.flush()}}}function buildRuntimeIdentity(e){let t=resolveInstalledPackageInfo(),n={agentId:e.turnAgent.id,agentName:e.agent.config?.name,eveVersion:t.version},r=process.env.VERCEL_GIT_COMMIT_SHA?.trim(),i=process.env.VERCEL_GIT_COMMIT_REF?.trim(),a=process.env.VERCEL_DEPLOYMENT_CREATED_AT?.trim();return r||i||a?{...n,build:{deployedAt:a||void 0,gitBranch:i||void 0,gitSha:r||void 0}}:n}function createRuntimeModelResolver(e){return t=>resolveRuntimeModelReference(t,e)}function createRuntimeDynamicModelEventDispatcher(e,t,n){return r=>dispatchDynamicModelEvent({abortSignal:n,ctx:r.ctx,dynamicModel:t,event:r.event,messages:r.messages,scope:e})}function createNodeHarnessTools(e){let t=new Map;for(let n of e.node.turnAgent.tools){let r=resolveHarnessToolDefinition({node:e.node,tool:n});r!==null&&t.set(n.name,r)}return t}function resolveHarnessToolDefinition(e){let t=findRegisteredRuntimeTool(e.node.toolRegistry,e.tool.name),n=workflowIdForHandling(e.tool.behavior?.handling);return n===void 0?t===null?(log.warn(`declared tool is not registered — omitting from toolset`,{toolName:e.tool.name,nodeId:e.node.nodeId}),null):createRegisteredHarnessToolDefinition({behavior:e.tool.behavior,definition:t.definition,rootOnly:e.tool.rootOnly}):t===null?createPreparedWorkflowToolHarnessDefinition(e.tool):createWorkflowToolHarnessDefinition({executeInput:t.definition.executeInput,definition:createRegisteredHarnessToolDefinition({behavior:e.tool.behavior,definition:t.definition,rootOnly:e.tool.rootOnly}),workflowId:n})}function createRegisteredHarnessToolDefinition(e){let t=e.definition,n=t.execute;return{availableInSubagents:t.availableInSubagents,label:t.label??(t.owner.kind===`framework`&&t.name===WEB_SEARCH_TOOL_NAME?{start:resolveWebSearchActivityLabel}:void 0),approvalKey:t.approvalKey,behavior:e.behavior,description:t.description,endsTurn:t.endsTurn,executeInput:t.executeInput,execute:resolveAuthoredExecute({rawExecute:n,scope:t.name}),frameworkAction:t.owner.kind===`framework`&&t.name===LOAD_SKILL_TOOL_NAME?`load-skill`:void 0,inputSchema:t.inputSchema??UNSPECIFIED_INPUT_SCHEMA,name:t.name,approval:t.approval,outputSchema:t.outputSchema,rootOnly:e.rootOnly,toModelOutput:t.toModelOutput}}function resolveAuthoredExecute(e){let{rawExecute:t,scope:n}=e;return t===void 0?void 0:createToolExecuteWithAuth({execute:t,scope:n})}export{buildRuntimeIdentity,createExecutionNodeStep,createNodeHarnessTools};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { DeliverHookPayload } from "#channel/types.js";
|
|
2
2
|
import { type DurableSessionState } from "#execution/durable-session-store.js";
|
|
3
|
+
import { type SessionStepState } from "#execution/publish-session-events.js";
|
|
4
|
+
import { type WithSessionStateDelta } from "#execution/session/state-delta.js";
|
|
3
5
|
export type RoutedDeliverResult = {
|
|
4
6
|
readonly kind: "cancel-turn";
|
|
5
7
|
readonly serializedContext: Record<string, unknown>;
|
|
@@ -10,10 +12,11 @@ export type RoutedDeliverResult = {
|
|
|
10
12
|
readonly serializedContext: Record<string, unknown>;
|
|
11
13
|
readonly sessionState: DurableSessionState;
|
|
12
14
|
};
|
|
13
|
-
/**
|
|
14
|
-
|
|
15
|
+
/**
|
|
16
|
+
* Splits an envelope and forwards descendant input to the child that asked for
|
|
17
|
+
* it. This session relayed each forwarded request's `input.requested`, so it
|
|
18
|
+
* also relays their `input.resolved` once the answers are on their way down.
|
|
19
|
+
*/
|
|
20
|
+
export declare function routeProxiedDeliverStep(input: SessionStepState & {
|
|
15
21
|
readonly delivery: DeliverHookPayload;
|
|
16
|
-
|
|
17
|
-
readonly serializedContext?: Record<string, unknown>;
|
|
18
|
-
readonly sessionState: DurableSessionState;
|
|
19
|
-
}): Promise<RoutedDeliverResult>;
|
|
22
|
+
}): Promise<WithSessionStateDelta<RoutedDeliverResult>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createInputResolvedEvent
|
|
1
|
+
import{AuthKey}from"#context/keys.js";import{createInputResolvedEvent}from"#protocol/message.js";import{BundleKey,ChannelKey}from"#runtime/sessions/runtime-context-keys.js";import{resolveRemoteAgentStreamHeaders,respondToRemoteAgentSession}from"#execution/agent-sessions/remote.js";import{readDurableSession,replaceDurableSessionSnapshot}from"#execution/durable-session-store.js";import{deserializeContext,serializeContext}from"#context/serialize.js";import{resumeSessionInbox}from"#execution/session-inbox/resume.js";import{buildAdapterContext}from"#channel/adapter-context.js";import{relaySessionEvents}from"#execution/publish-session-events.js";import{withSessionStateDelta}from"#execution/session/state-delta.js";import{getProxyInputRequests,retireProxyInputRequests}from"#harness/proxy-input-requests.js";import{coalesceDeliverPayloads}from"#execution/deliver-payloads.js";import{hasDelegatedSessionContext}from"#execution/delegated-session-context.js";import{setChannelContext}from"#execution/channel-context.js";import{routeDeliverPayload}from"#subagents/hitl-proxy.js";import{sendWorkflowAskAnswers,toToolInputResponseResponder}from"#execution/tools/workflow/answer.js";async function routeProxiedDeliverStep(e){"use step";return await withSessionStateDelta(e,routeProxiedDeliver)}async function routeProxiedDeliver(e){let{delivery:t,serializedContext:n}=await deliverChannelInputResponses(e),r=readDurableSession(e.sessionState),i=new Map,a=new Map,o,s=!hasDelegatedSessionContext(n)&&t.caller===void 0,c=new Set;for(let[e,n]of t.payloads.entries()){let l=routeDeliverPayload({allowRoute:e=>!c.has(e),payload:n,resolveMessage:s,state:r.state});o??=l.parentAction,l.forSelf!==void 0&&i.set(e,l.forSelf);for(let[n,r]of l.forChildren.entries()){if(r.workflowAsk!==void 0)for(let{requestId:e}of r.resolved.resolutions)c.add(e);let i=JSON.stringify([r.childContinuationToken,r.childSessionInbox?.sessionId??``,r.remote?.sessionId??``,r.resolved.event.sequence,r.resolved.event.stepIndex,r.resolved.event.turnId,r.inputSource??null]),o=a.get(i)??{workflowAsk:r.workflowAsk,remote:r.remote,childContinuationToken:r.childContinuationToken,childSessionInbox:r.childSessionInbox,event:r.resolved.event,metadata:[],payloads:[],resolutions:new Map},s=o.payloads.length;o.payloads.push(r.payload);for(let e of r.resolved.resolutions)o.resolutions.has(e.requestId)||o.resolutions.set(e.requestId,e);if(l.forSelf===void 0&&n===0)for(let n of t.deliveryMetadata??[])n.payloadIndex===e&&o.metadata.push({...n,payloadIndex:s});a.set(i,o)}}let l=!1,u=[];for(let e of a.values()){if(e.workflowAsk!==void 0){let n=coalesceDeliverPayloads(e.payloads).inputResponses??[];await sendWorkflowAskAnswers(e.workflowAsk,n,toToolInputResponseResponder(t.auth))}else{let r={...t,deliveryMetadata:e.metadata.length===0?void 0:e.metadata,payloads:e.payloads},i=e.remote;if(i!==void 0){let r=await deserializeContext(n),a=await resolveRemoteAgentStreamHeaders({bundle:r.require(BundleKey),name:i.name,resolverId:i.resolverId,url:i.url});await respondToRemoteAgentSession({remote:i,headers:a,auth:t.auth,responses:coalesceDeliverPayloads(e.payloads).inputResponses??[]})}else await resumeSessionInbox(e.childSessionInbox??e.childContinuationToken,r)}e.resolutions.size>0&&u.push(createInputResolvedEvent({resolutions:[...e.resolutions.values()],...e.event})),r=retireProxyInputRequests(r,[...e.resolutions.keys()]),l=!0}let d=await relaySessionEvents({serializedContext:n,sessionState:l?replaceDurableSessionSnapshot({session:r,state:e.sessionState}):e.sessionState,sessionWritable:e.sessionWritable},u);if(o!==void 0)return{...d,...o};let f=[...i].sort(([e],[t])=>e-t),p=f.flatMap(([e],n)=>(t.deliveryMetadata??[]).filter(t=>t.payloadIndex===e).map(e=>({...e,payloadIndex:n}))),m=f.length===0?void 0:{...t,deliveryMetadata:p.length===0?void 0:p,payloads:f.map(([,e])=>e)};return{...d,kind:`continue`,remainder:m}}async function deliverChannelInputResponses(e){let t=getProxyInputRequests(readDurableSession(e.sessionState).state),routable=e=>t.has(e.requestId);if(!e.delivery.payloads.some(e=>e.inputResponses?.some(e=>!routable(e))===!0))return e;let n=await deserializeContext(e.serializedContext),r=n.require(ChannelKey);if(r.deliver===void 0)return e;e.delivery.auth!==void 0&&n.set(AuthKey,e.delivery.auth??null);let i=buildAdapterContext(r,n),a=!1,o=[];for(let t of e.delivery.payloads){if(t.inputResponses===void 0){o.push(t);continue}let e=[];for(let n of t.inputResponses){if(routable(n)){e.push(n);continue}let o=(await r.deliver({...t,inputResponses:[n],message:void 0},i))?.inputResponses?.filter(routable)??[];a||=o.length>0,e.push(...o.length>0?o:[n])}o.push({...t,inputResponses:e})}if(!a)return e;let s=await deserializeContext(e.serializedContext);return setChannelContext(s,{...r,state:{...i.state}}),{delivery:{...e.delivery,payloads:o},serializedContext:serializeContext(s)}}export{routeProxiedDeliverStep};
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { type ChannelAdapterContext } from "#channel/adapter.js";
|
|
2
|
+
import { type ContextContainer } from "#context/container.js";
|
|
3
|
+
import { type DurableSession, type DurableSessionState } from "#execution/durable-session-store.js";
|
|
4
|
+
import { type HarnessModelMessage } from "#harness/messages.js";
|
|
5
|
+
import type { HandleEventFn, HarnessSession, HarnessSessionBase } from "#harness/types.js";
|
|
6
|
+
import { type MessageStreamEvent, type UnstampedMessageStreamEvent } from "#protocol/message.js";
|
|
7
|
+
/**
|
|
8
|
+
* Whose event a session publishes. Every event reaches the channel adapter, the
|
|
9
|
+
* session stream, and stream-event hooks. The session's own events also reach
|
|
10
|
+
* its instrumentation and carry its turn's delivery ids.
|
|
11
|
+
*
|
|
12
|
+
* A relayed event belongs to an exchange this session carries for a child
|
|
13
|
+
* session or a workflow run: the question or sign-in it raised, the turn
|
|
14
|
+
* boundary that question causes here, and the `input.resolved` for the answer
|
|
15
|
+
* this session routes back. This session's instrumentation never tracks that
|
|
16
|
+
* pending input, so no event of the exchange reaches it; the child records its
|
|
17
|
+
* side as its own.
|
|
18
|
+
*/
|
|
19
|
+
export type SessionEventOrigin = "own" | "relayed";
|
|
20
|
+
/** The session a step publishes to: its stream and the state it starts from. */
|
|
21
|
+
export interface SessionStepState {
|
|
22
|
+
readonly serializedContext: Record<string, unknown>;
|
|
23
|
+
readonly sessionState: DurableSessionState;
|
|
24
|
+
readonly sessionWritable: WritableStream<Uint8Array>;
|
|
25
|
+
}
|
|
26
|
+
/** A {@link SessionStepState} with the conversation history, for a step that reads or changes it. */
|
|
27
|
+
export interface SessionHistoryStepState extends SessionStepState {
|
|
28
|
+
readonly history: HarnessModelMessage[];
|
|
29
|
+
}
|
|
30
|
+
/** The context and session state a publication leaves behind. */
|
|
31
|
+
export interface PublishedSessionEvents {
|
|
32
|
+
readonly serializedContext: Record<string, unknown>;
|
|
33
|
+
readonly sessionState: DurableSessionState;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Publishes a session step's own events, such as a workflow tool's
|
|
37
|
+
* `action.partial`, exactly as a turn publishes its events. Call from a step
|
|
38
|
+
* and adopt the result: hooks run in the session's context and may change it.
|
|
39
|
+
*/
|
|
40
|
+
export declare function publishSessionEvents(target: SessionStepState, events: readonly UnstampedMessageStreamEvent[]): Promise<PublishedSessionEvents>;
|
|
41
|
+
/** Publishes events of an exchange this session relays; see {@link SessionEventOrigin}. */
|
|
42
|
+
export declare function relaySessionEvents(target: SessionStepState, events: readonly UnstampedMessageStreamEvent[]): Promise<PublishedSessionEvents>;
|
|
43
|
+
/** A session step's context and session, restored so the step can publish. */
|
|
44
|
+
export interface RestoredSessionStep {
|
|
45
|
+
readonly ctx: ContextContainer;
|
|
46
|
+
readonly durableSession: DurableSession;
|
|
47
|
+
readonly sessionWritable: WritableStream<Uint8Array>;
|
|
48
|
+
}
|
|
49
|
+
/** A {@link RestoredSessionStep} with the history, so its publication sees a whole session. */
|
|
50
|
+
export interface RestoredSessionHistoryStep extends RestoredSessionStep {
|
|
51
|
+
readonly history: HarnessModelMessage[];
|
|
52
|
+
}
|
|
53
|
+
export declare function restoreSessionStep(step: SessionStepState): Promise<RestoredSessionStep>;
|
|
54
|
+
/**
|
|
55
|
+
* What a session step publishes, and how it changes the session the
|
|
56
|
+
* publication leaves. `S` is a {@link HarnessSession} only for a step
|
|
57
|
+
* restored with its history.
|
|
58
|
+
*/
|
|
59
|
+
export interface SessionStepPublication<T, R, S extends HarnessSessionBase = HarnessSessionBase> {
|
|
60
|
+
readonly origin: SessionEventOrigin;
|
|
61
|
+
/** Where a relayed input batch came from; the channel adapter and its forwarding see it. */
|
|
62
|
+
readonly inputSource?: string;
|
|
63
|
+
/** Emits the step's events in the session's context scope. */
|
|
64
|
+
publish(emit: HandleEventFn, session: S): Promise<T>;
|
|
65
|
+
/**
|
|
66
|
+
* Changes the step makes to the session once the scope has committed it,
|
|
67
|
+
* before its continuation token is reconciled.
|
|
68
|
+
*/
|
|
69
|
+
updateSession?(session: S, published: T): SessionUpdate<R, S>;
|
|
70
|
+
}
|
|
71
|
+
/** The session a step keeps, and anything it derived while changing it. */
|
|
72
|
+
export interface SessionUpdate<R, S extends HarnessSessionBase = HarnessSessionBase> {
|
|
73
|
+
readonly session: S;
|
|
74
|
+
readonly result?: R;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Publishes from a step that owns the session. Returns the context and session
|
|
78
|
+
* state to adopt, and the result of `updateSession`. `step.ctx` is updated in place.
|
|
79
|
+
* The history is published and returned only when the step was restored with it.
|
|
80
|
+
*/
|
|
81
|
+
export declare function publishFromSessionStep<T, R = undefined>(step: RestoredSessionHistoryStep, publication: SessionStepPublication<T, R, HarnessSession>): Promise<{
|
|
82
|
+
readonly published: PublishedSessionEvents & {
|
|
83
|
+
readonly history: HarnessModelMessage[];
|
|
84
|
+
};
|
|
85
|
+
readonly result: R | undefined;
|
|
86
|
+
}>;
|
|
87
|
+
export declare function publishFromSessionStep<T, R = undefined>(step: RestoredSessionStep, publication: SessionStepPublication<T, R>): Promise<{
|
|
88
|
+
readonly published: PublishedSessionEvents;
|
|
89
|
+
readonly result: R | undefined;
|
|
90
|
+
}>;
|
|
91
|
+
/**
|
|
92
|
+
* Holds a session's stream for one step, which keeps its writer lock until it
|
|
93
|
+
* releases it. Events reach the stream through `SessionEventPublisher.emit`.
|
|
94
|
+
*/
|
|
95
|
+
export interface SessionEventWriter {
|
|
96
|
+
/** Closes the session stream; only a terminal `done` step does this. */
|
|
97
|
+
close(): Promise<void>;
|
|
98
|
+
/** Releases the writer lock so the next step can acquire it. Safe after `close()`. */
|
|
99
|
+
release(): void;
|
|
100
|
+
}
|
|
101
|
+
/** Dispatches a session's events to its channel and stream-event hooks. */
|
|
102
|
+
export interface SessionEventDispatcher {
|
|
103
|
+
/** The context delivery hands the channel adapter; a turn step also hands it to `adapter.deliver`. */
|
|
104
|
+
readonly adapterCtx: ChannelAdapterContext;
|
|
105
|
+
/**
|
|
106
|
+
* Runs the stream-event hooks for a written event. Only a turn step passes
|
|
107
|
+
* `cancelTurn`; see `turn-event-handler.ts`.
|
|
108
|
+
*/
|
|
109
|
+
runHooks(event: MessageStreamEvent, cancelTurn?: () => void): Promise<void>;
|
|
110
|
+
}
|
|
111
|
+
/** A session's stream held by one step, with the dispatch of the events that step publishes. */
|
|
112
|
+
export interface SessionEventPublisher {
|
|
113
|
+
readonly dispatcher: SessionEventDispatcher;
|
|
114
|
+
readonly writer: SessionEventWriter;
|
|
115
|
+
/**
|
|
116
|
+
* Delivers and writes one event the step produced, and returns it
|
|
117
|
+
* as written for its hooks. Delivery comes first so the channel adapter's
|
|
118
|
+
* handler shapes what is written.
|
|
119
|
+
*/
|
|
120
|
+
emit(event: UnstampedMessageStreamEvent): Promise<MessageStreamEvent>;
|
|
121
|
+
/** `emit`, then the event's stream-event hooks. */
|
|
122
|
+
publish(event: UnstampedMessageStreamEvent): Promise<void>;
|
|
123
|
+
}
|
|
124
|
+
export declare function openSessionEventPublisher(input: {
|
|
125
|
+
readonly ctx: ContextContainer;
|
|
126
|
+
readonly origin: SessionEventOrigin;
|
|
127
|
+
readonly sessionWritable: WritableStream<Uint8Array>;
|
|
128
|
+
readonly inputSource?: string;
|
|
129
|
+
}): SessionEventPublisher;
|
|
130
|
+
type TerminalSessionEvent = Extract<UnstampedMessageStreamEvent, {
|
|
131
|
+
type: "session.completed" | "session.failed";
|
|
132
|
+
}>;
|
|
133
|
+
/**
|
|
134
|
+
* Publishes a terminal `session.completed` or `session.failed` from outside a
|
|
135
|
+
* turn as the session's own event, through its channel adapter and
|
|
136
|
+
* instrumentation. Stream-event hooks do not run: the ending session may not
|
|
137
|
+
* restore, and no turn scope remains for authored code. Never throws.
|
|
138
|
+
*
|
|
139
|
+
* When the context cannot be restored, the event is only stamped and written so
|
|
140
|
+
* the stream still ends: the one degraded write of a session event.
|
|
141
|
+
*/
|
|
142
|
+
export declare function publishTerminalSessionEvent(input: {
|
|
143
|
+
readonly errorId?: string;
|
|
144
|
+
readonly event: TerminalSessionEvent;
|
|
145
|
+
readonly serializedContext: Record<string, unknown>;
|
|
146
|
+
readonly sessionWritable: WritableStream<Uint8Array>;
|
|
147
|
+
/** The turn the event ends, for instrumentation. */
|
|
148
|
+
readonly turnId?: string;
|
|
149
|
+
}): Promise<void>;
|
|
150
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createLogger}from"#internal/logging.js";import{callAdapterEventHandler}from"#channel/adapter.js";import{contextStorage}from"#context/container.js";import{ParentSessionKey,TurnDeliveryIdsKey}from"#context/keys.js";import{encodeMessageStreamEvent,stampMessageStreamEvent}from"#protocol/message.js";import{BundleKey,ChannelKey}from"#runtime/sessions/runtime-context-keys.js";import{validateHarnessModelMessages}from"#harness/messages.js";import{getHarnessEmissionState}from"#harness/emission.js";import{createDurableSessionState,readDurableSession}from"#execution/durable-session-store.js";import{deserializeContext,serializeContext}from"#context/serialize.js";import{buildAdapterContext}from"#channel/adapter-context.js";import{activeTurnId}from"#harness/active-turn-id.js";import{hydrateDurableSession}from"#execution/session.js";import{resolveEffectiveAgentRuntime}from"#execution/effective-agent-config.js";import{setChannelContext}from"#execution/channel-context.js";import{dispatchStreamEventHooks}from"#context/hook-lifecycle.js";import{withContextScope}from"#context/run-step.js";import{forwardSessionInput}from"#execution/forward-session-input.js";import{reconcileSessionContinuationToken}from"#execution/reconcile-session-continuation-token.js";import{bindSessionInstrumentation}from"#instrumentation/runtime.js";const log=createLogger(`execution.publish-session-events`);async function publishSessionEvents(e,t){return await publishEventsFromStep(e,`own`,t)}async function relaySessionEvents(e,t){return await publishEventsFromStep(e,`relayed`,t)}async function publishEventsFromStep(e,t,n){if(n.length===0)return{serializedContext:e.serializedContext,sessionState:e.sessionState};let{published:r}=await publishFromSessionStep(await restoreSessionStep(e),{origin:t,async publish(e){for(let t of n)await e(t)}});return r}async function restoreSessionStep(e){return{ctx:await deserializeContext(e.serializedContext),durableSession:readDurableSession(e.sessionState),sessionWritable:e.sessionWritable}}async function publishFromSessionStep(e,t){let{ctx:n}=e,r=await publishInSessionScope(e,t),i=t.updateSession?.(r.session,r.result)??{session:r.session},a=reconcileSessionContinuationToken(n,i.session);return{published:{serializedContext:serializeContext(n),sessionState:createDurableSessionState({session:a}),...`history`in a&&{history:a.history}},result:i.result}}async function publishInSessionScope(e,t){let{ctx:n}=e,r=resolveEffectiveAgentRuntime(n.require(BundleKey),n),i=hydrateDurableSession({compactionOverrides:{thresholdPercent:r.thresholdPercent},durable:e.durableSession,turnAgent:r.turnAgent}),a=e.history===void 0?i:{...i,history:validateHarnessModelMessages(e.history)},o=t.origin===`own`?bindSessionInstrumentation({agentName:r.turnAgent.id,ctx:n,rootSessionId:a.rootSessionId??a.sessionId,sessionId:a.sessionId}):void 0,s=openSessionEventPublisher({ctx:n,inputSource:t.inputSource,origin:t.origin,sessionWritable:e.sessionWritable});try{return await withContextScope(n,a,async n=>{let r=o?.createHandleEvent({handleEvent:s.publish,turnId:activeTurnId(getHarnessEmissionState(e.durableSession.state))})??s.publish;return{result:await t.publish(r,n),session:n}})}finally{await o?.flush(),s.writer.release()}}function openSessionEventPublisher(e){let{ctx:t,origin:n}=e,r=createSessionEventDispatcher(e),i=openSessionEventWriter({deliveryIds:()=>n===`own`?t.get(TurnDeliveryIdsKey):void 0,sessionWritable:e.sessionWritable}),emit=async e=>await i.write(await r.deliver(e));return{dispatcher:r,writer:i,emit,async publish(e){await r.runHooks(await emit(e))}}}function createSessionEventDispatcher(e){let{ctx:t,inputSource:n}=e,r=t.require(ChannelKey),i=buildAdapterContext(r,t);return{adapterCtx:i,async deliver(e){let a=await forwardSessionInput(t,e,n)?e:await callAdapterEventHandler(r,e,n===void 0?i:{...i,inputSource:n});return setChannelContext(t,{...r,state:{...i.state}}),a},async runHooks(e,n){await dispatchStreamEventHooks({cancelTurn:n,ctx:t,event:e,registry:t.require(BundleKey).hookRegistry})}}}function openSessionEventWriter(e){let t=e.sessionWritable.getWriter(),n=!1,release=()=>{n||(n=!0,t.releaseLock())};return{async write(n){let r=stampMessageStreamEvent(n,e.deliveryIds());return await t.write(encodeMessageStreamEvent(r)),r},close:async()=>{await t.close(),release()},release}}async function publishTerminalSessionEvent(e){let t=e.serializedContext[`eve.sessionId`]??``,n={errorId:e.errorId,sessionId:t},{type:r}=e.event,i,a;try{i=await deserializeContext(e.serializedContext),a=openSessionEventPublisher({ctx:i,origin:`own`,sessionWritable:e.sessionWritable})}catch(t){log.error(`failed to restore context for terminal ${r} event`,{...n,error:t}),await writeUnroutedSessionEvent(e.sessionWritable,e.event).catch(e=>log.error(`failed to write terminal ${r} event`,{...n,error:e}));return}let publish=async e=>{await a.emit(e)},o;try{o=bindSessionInstrumentation({agentName:i.require(BundleKey).turnAgent.id,ctx:i,rootSessionId:i.get(ParentSessionKey)?.rootSessionId??t,sessionId:t})}catch(e){log.error(`failed to bind instrumentation for terminal ${r} event`,{...n,error:e})}let s=o?.createHandleEvent({handleEvent:publish,turnId:e.turnId})??publish;try{await contextStorage.run(i,()=>s(e.event))}catch(e){log.error(`failed to publish terminal ${r} event`,{...n,error:e})}finally{a.writer.release();try{await o?.flush()}catch(e){log.error(`failed to flush instrumentation after terminal ${r} event`,{...n,error:e})}}}async function writeUnroutedSessionEvent(e,t){let n=openSessionEventWriter({deliveryIds:()=>void 0,sessionWritable:e});try{await n.write(t)}finally{n.release()}}export{openSessionEventPublisher,publishFromSessionStep,publishSessionEvents,publishTerminalSessionEvent,relaySessionEvents,restoreSessionStep};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { ContextAccessor } from "#context/key.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { HarnessSessionBase } from "#harness/types.js";
|
|
3
3
|
/** Re-stamps a session after a channel handler selects a new current continuation address. */
|
|
4
|
-
export declare function reconcileSessionContinuationToken(ctx: ContextAccessor, session:
|
|
4
|
+
export declare function reconcileSessionContinuationToken<S extends HarnessSessionBase>(ctx: ContextAccessor, session: S): S;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { DeliverHookPayload } from "#channel/types.js";
|
|
2
2
|
import type { DurableSessionState } from "#execution/durable-session-store.js";
|
|
3
3
|
import { type RoutedDeliverResult } from "#execution/proxied-deliver-step.js";
|
|
4
|
+
import type { WithSessionStateDelta } from "#execution/session/state-delta.js";
|
|
4
5
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
6
|
+
* Routes any descendant-bound input responses down to the owning child. A
|
|
7
|
+
* descendant session-limit Stop is returned as parent-owned turn control after
|
|
8
|
+
* the child consumes the answer.
|
|
8
9
|
*
|
|
9
10
|
* Short-circuits via `hasProxyInputRequests` so the common no-active-descendant
|
|
10
11
|
* path skips a durable step boundary. Lives in its own non-step module so both
|
|
@@ -16,4 +17,4 @@ export declare function routeDeliverToChildren(input: {
|
|
|
16
17
|
readonly sessionWritable: WritableStream<Uint8Array>;
|
|
17
18
|
readonly sessionState: DurableSessionState;
|
|
18
19
|
readonly serializedContext: Record<string, unknown>;
|
|
19
|
-
}): Promise<RoutedDeliverResult
|
|
20
|
+
}): Promise<WithSessionStateDelta<RoutedDeliverResult>>;
|
|
@@ -1,3 +1 @@
|
|
|
1
|
-
import{
|
|
2
|
-
|
|
3
|
-
`)}if(Object.keys(r).length===0)continue;let a=s.length;s.push(r);for(let n of e.delivery.deliveryMetadata??[])n.payloadIndex===t&&c.push({...n,payloadIndex:a})}let l=s.length===0?void 0:{...e.delivery,deliveryMetadata:c.length===0?void 0:c,payloads:s};return l===void 0?{kind:`continue`,remainder:void 0,serializedContext:n,sessionState:r}:r.hasProxyInputRequests?await routeProxiedDeliverStep({delivery:l,sessionWritable:e.sessionWritable,serializedContext:n,sessionState:r}):{kind:`continue`,remainder:l,serializedContext:n,sessionState:r}}export{routeDeliverToChildren};
|
|
1
|
+
import{routeProxiedDeliverStep}from"#execution/proxied-deliver-step.js";async function routeDeliverToChildren(e){return e.sessionState.hasProxyInputRequests?await routeProxiedDeliverStep(e):{kind:`continue`,remainder:e.delivery,stateDelta:{}}}export{routeDeliverToChildren};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ConversationContextKey}from"#shared/conversation-context.js";import{ContextContainer,contextStorage}from"#context/container.js";import{
|
|
1
|
+
import{ConversationContextKey}from"#shared/conversation-context.js";import{ContextContainer,contextStorage}from"#context/container.js";import{AuthKey,CapabilitiesKey,ChannelDeliveryKey,ChannelInstrumentationKey,ChannelRequestIdKey,ContinuationHookTokensKey,ContinuationTokenKey,ConversationIdKey,DynamicSubagentAgentConfigKey,InitiatorAuthKey,LegacyRemoteAgentCallerKey,ParentSessionKey,ParentTraceContextKey,ScheduleIdKey,SessionCallbackKey,SessionTitleKey,TraceRootKey}from"#context/keys.js";import{BundleKey}from"#runtime/sessions/runtime-context-keys.js";import{resolveInstrumentationEnvironment}from"#internal/application/dev-environment.js";import{readConversationId}from"#shared/conversation-identity.js";import{setChannelContext}from"#execution/channel-context.js";import{deriveSessionTitle}from"#execution/eve-workflow-attributes.js";import{buildConversationContext}from"#channel/conversation-context.js";function buildRunContext(e){let{bundle:t,run:n}=e,r=new ContextContainer,i=n.auth,a=readConversationId(n.conversationId);if(a!==void 0&&r.set(ConversationIdKey,a),r.set(BundleKey,t),setChannelContext(r,n.adapter,{channelName:n.channelName}),r.set(ConversationContextKey,buildConversationContext(n,resolveInstrumentationEnvironment())),n.parent===void 0||n.traceRoot?.kind===`own`){let e=deriveSessionTitle(n.title??n.input.message);e!==void 0&&r.set(SessionTitleKey,e)}if(n.channelMetadata!==void 0){let e=r.get(ChannelInstrumentationKey);r.set(ChannelInstrumentationKey,{channelType:e?.channelType??n.channelMetadata.channelType,kind:e?.kind??n.channelMetadata.kind,metadata:n.channelMetadata.metadata})}n.continuationToken!==void 0&&(r.set(ContinuationTokenKey,n.continuationToken),r.set(ContinuationHookTokensKey,[n.continuationToken])),r.set(AuthKey,i),(n.initiatorAuth!==void 0||n.input.message!==void 0)&&r.set(InitiatorAuthKey,n.initiatorAuth??i),e.dynamicSubagentAgentConfig!==void 0&&r.set(DynamicSubagentAgentConfigKey,e.dynamicSubagentAgentConfig),n.capabilities!==void 0&&r.set(CapabilitiesKey,n.capabilities),n.requestId!==void 0&&r.set(ChannelRequestIdKey,n.requestId);let o=contextStorage.getStore()?.get(ScheduleIdKey);return o!==void 0&&r.set(ScheduleIdKey,o),n.delivery!==void 0&&r.set(ChannelDeliveryKey,n.delivery),n.callback!==void 0&&r.set(SessionCallbackKey,n.callback),n.legacyRemoteAgentCaller!==void 0&&r.set(LegacyRemoteAgentCallerKey,n.legacyRemoteAgentCaller),n.parent!==void 0&&r.set(ParentSessionKey,n.parent),n.traceRoot!==void 0&&r.set(TraceRootKey,n.traceRoot),n.parentTraceContext!==void 0&&r.set(ParentTraceContextKey,n.parentTraceContext),r}export{buildRunContext};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{join,relative,resolve}from"node:path";import{toErrorMessage}from"#shared/errors.js";import{resolveSandboxCacheDirectory}from"#internal/application/paths.js";import{getSandboxEnvironmentRuntime}from"#shared/sandbox-environment.js";import{createSandboxProviderResources}from"#shared/sandbox-provider.js";import{writeSandboxPreparedArtifactsManifest}from"#runtime/sandbox/prepared-artifacts.js";import{resolveRuntimeCompilerArtifactPaths}from"#runtime/loaders/artifact-paths.js";import{loadCompiledModuleMapFromAuthoredSource}from"#internal/authored-module-map-loader.js";import{createAuthoredSourceRuntimeCompiledArtifactsSource}from"#internal/application/runtime-compiled-artifacts-source.js";import{getRuntimeCompiledArtifactsSandboxAppRoot}from"#runtime/compiled-artifacts-source.js";import{
|
|
1
|
+
import{join,relative,resolve}from"node:path";import{toErrorMessage}from"#shared/errors.js";import{resolveSandboxCacheDirectory}from"#internal/application/paths.js";import{getSandboxEnvironmentRuntime}from"#shared/sandbox-environment.js";import{loadCompiledManifest}from"#runtime/loaders/manifest.js";import{ROOT_RUNTIME_AGENT_NODE_ID,getResolvedRuntimeAgentNode}from"#runtime/graph.js";import{createSandboxProviderResources}from"#shared/sandbox-provider.js";import{writeSandboxPreparedArtifactsManifest}from"#runtime/sandbox/prepared-artifacts.js";import{resolveRuntimeCompilerArtifactPaths}from"#runtime/loaders/artifact-paths.js";import{loadCompiledModuleMapFromAuthoredSource}from"#internal/authored-module-map-loader.js";import{createAuthoredSourceRuntimeCompiledArtifactsSource}from"#internal/application/runtime-compiled-artifacts-source.js";import{getRuntimeCompiledArtifactsSandboxAppRoot}from"#runtime/compiled-artifacts-source.js";import{resolveRuntimeAgentGraph}from"#runtime/resolve-agent-graph.js";import{createSandboxProviderFiles}from"#execution/sandbox/provider-files.js";import{createDevelopmentSandboxProviderHost}from"#execution/sandbox/provider-host-development.js";import{materializeWorkspaceDirectory}from"#runtime/workspace/seed-files.js";const diskPreparedArtifactStore={async write(e){await writeSandboxPreparedArtifactsManifest(e)}};async function prewarmSandboxes(e){let t=await collectPrewarmTargets(e);if(t.length===0)return;let n=e.preparedArtifactStore??diskPreparedArtifactStore,r=e.dispatch??(async({context:e,provider:t})=>await t.implementation.prepare(e));e.log?.(`eve: initializing ${formatSandboxTemplateCount(t.length)}...`);let i=await Promise.allSettled(t.map(async({context:t,label:n,nodeId:i,provider:a})=>{let logProviderProgress=t=>{shouldLogSandboxPrewarmProgress(t)&&e.log?.(`eve: sandbox template "${n}" (${a.providerName}): ${t}`)};try{return{nodeId:i,provider:a,result:await r({context:{...t,log:e.log===void 0?void 0:logProviderProgress},provider:a})}}catch(t){let r=formatPrewarmFailureForEnvironment({providerName:a.providerName,error:t});throw e.log?.(`eve: failed to initialize sandbox template "${n}" on provider "${a.providerName}": ${toErrorMessage(r)}`),r}})),a=i.find(e=>e.status===`rejected`);if(a?.status===`rejected`)throw a.reason;let o=i.flatMap(e=>e.status===`fulfilled`?[{artifact:e.value.result,nodeId:e.value.nodeId,providerName:e.value.provider.providerName}]:[]);await n.write({compileDirectoryPath:e.compileDirectoryPath,entries:o}),e.log?.(`eve: initialized ${formatSandboxTemplateCount(t.length)}.`)}async function prewarmAppSandboxes(e){let t=e.compiledArtifactsSource??createAuthoredSourceRuntimeCompiledArtifactsSource(e.appRoot);if(t.kind!==`disk`)throw Error(`prewarmAppSandboxes requires disk-backed compiled artifacts.`);let n=await(e.loadAgentGraph??loadGraphFromArtifacts)({compiledArtifactsSource:t});await prewarmSandboxes({appRoot:getRuntimeCompiledArtifactsSandboxAppRoot(t)??e.appRoot,compileDirectoryPath:resolveRuntimeCompilerArtifactPaths(t.appRoot).compileDirectoryPath,compiledArtifactsSource:t,dispatch:e.dispatch,graph:n,log:e.log,preparedArtifactStore:e.preparedArtifactStore})}async function collectPrewarmTargets(e){let t=[];return await Promise.all(collectNodeSandboxes(e.graph).map(async({definition:n,nodeId:r,workspaceResourceRoot:i})=>{let a=getResolvedRuntimeAgentNode(e.graph,r).agent,o=join(resolve(e.appRoot,relative(a.metadata.appRoot,a.metadata.agentRoot)),`sandbox`),s=getSandboxEnvironmentRuntime(n.environment),c=await loadResourceRootSeedFiles({compileDirectoryPath:e.compileDirectoryPath,workspaceResourceRoot:i});t.push({context:{files:createSandboxProviderFiles(o),host:createDevelopmentSandboxProviderHost(e.appRoot),resources:createSandboxProviderResources({resourcesKey:i.contentHash,resourcesPath:i.contentHash===void 0?void 0:`${e.compileDirectoryPath}/${i.logicalPath}`,seedFiles:c}),sourceRevision:n.revisionHash,storagePath:resolveSandboxCacheDirectory(e.appRoot)},label:formatLabel(r),nodeId:r,provider:s})})),t.sort((e,t)=>e.label.localeCompare(t.label))}async function loadResourceRootSeedFiles(e){return e.workspaceResourceRoot.contentHash===void 0&&e.workspaceResourceRoot.rootEntries.length===0?[]:(await materializeWorkspaceDirectory(`${e.compileDirectoryPath}/${e.workspaceResourceRoot.logicalPath}`)).map(e=>({content:e.content,path:e.path}))}async function loadGraphFromArtifacts(e){let[t,n]=await Promise.all([loadCompiledManifest({compiledArtifactsSource:e.compiledArtifactsSource}),loadCompiledModuleMapFromAuthoredSource({compiledArtifactsSource:e.compiledArtifactsSource})]);return await resolveRuntimeAgentGraph({manifest:t,moduleMap:n})}function collectNodeSandboxes(e){return[...e.nodesByNodeId.entries()].flatMap(([e,t])=>{let n=t.sandboxRegistry.sandbox;return n.definition.kind===`parent`?[]:[{...n,definition:n.definition,nodeId:e}]})}function formatLabel(e){return e===ROOT_RUNTIME_AGENT_NODE_ID?`root`:e}function formatSandboxTemplateCount(e){return`${e} sandbox ${e===1?`template`:`templates`}`}function shouldLogSandboxPrewarmProgress(e){return!e.startsWith(`checking `)&&!e.startsWith(`reusing `)&&e!==`loading microsandbox runtime`&&e!==`microsandbox runtime ready`}function formatPrewarmFailureForEnvironment(e){return!isVercelEnvironment()||!isLocalSandboxProvider(e.providerName)?e.error:Error(`The ${e.providerName} sandbox provider is not available when deploying on Vercel. Vercel build containers cannot run local Docker containers or microsandbox VMs. Use DefaultSandbox.environment() so eve selects Vercel Sandbox on Vercel, or configure VercelSandbox.environment() explicitly. Original ${e.providerName} error: ${toErrorMessage(e.error)}`,{cause:e.error})}function isVercelEnvironment(){return!!process.env.VERCEL?.trim()}function isLocalSandboxProvider(e){return e===`docker`||e===`microsandbox`}export{prewarmAppSandboxes};
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import type { DeliverHookPayload, TurnCaller } from "#channel/types.js";
|
|
2
|
+
import { type SteeringOptions } from "#execution/session/input-queue.js";
|
|
3
|
+
import type { SessionExecutionInput } from "#execution/session/turn.js";
|
|
4
|
+
import type { WorkflowToolRunMessage } from "#execution/tools/workflow/messages.js";
|
|
5
|
+
import type { RuntimeActionResult } from "#shared/action-types.js";
|
|
6
|
+
export type RuntimeEvent = {
|
|
7
|
+
readonly kind: "runtime-action-result";
|
|
8
|
+
readonly results: readonly RuntimeActionResult[];
|
|
9
|
+
} | {
|
|
10
|
+
readonly kind: "workflow";
|
|
11
|
+
readonly message: WorkflowToolRunMessage;
|
|
12
|
+
}
|
|
13
|
+
/** A steering message that answered no pending request arrived during the wait. */
|
|
14
|
+
| {
|
|
15
|
+
readonly kind: "steering";
|
|
16
|
+
}
|
|
17
|
+
/** A `task_wait` call's timeout passed. */
|
|
18
|
+
| {
|
|
19
|
+
readonly kind: "timeout";
|
|
20
|
+
readonly callId: string;
|
|
21
|
+
}
|
|
22
|
+
/** A delivery or sign-in callback was admitted; a held request may be answered. */
|
|
23
|
+
| {
|
|
24
|
+
readonly kind: "input";
|
|
25
|
+
} | "cancelled";
|
|
26
|
+
/**
|
|
27
|
+
* Admission policy, cancellation, and steering for one active turn.
|
|
28
|
+
* Deliveries admitted while a model step runs stay in the shared queue until
|
|
29
|
+
* the turn reaches a committed boundary; a runtime-action wait routes them
|
|
30
|
+
* eagerly so a proxied child can receive the answer it is blocked on.
|
|
31
|
+
*
|
|
32
|
+
* The pump signals cancellation and eligible steering immediately. Cancellation
|
|
33
|
+
* aborts the turn; steering only interrupts generation before assistant output
|
|
34
|
+
* or local tool execution. Both retain ordered admission at the next boundary.
|
|
35
|
+
*/
|
|
36
|
+
export declare class ActiveTurn {
|
|
37
|
+
private readonly admitted;
|
|
38
|
+
private readonly routedToChildren;
|
|
39
|
+
private readonly runtimeResults;
|
|
40
|
+
private readonly controller;
|
|
41
|
+
private readonly expectedTurnId;
|
|
42
|
+
private readonly input;
|
|
43
|
+
/** Who alone steers the turn: its principal, or its delegated caller. */
|
|
44
|
+
private readonly identity;
|
|
45
|
+
private readonly unsubscribe;
|
|
46
|
+
private unsubscribeDelivery;
|
|
47
|
+
private steeringController;
|
|
48
|
+
/** The delegated caller of the latest message the turn read. */
|
|
49
|
+
caller: TurnCaller | undefined;
|
|
50
|
+
constructor(input: SessionExecutionInput, owner: {
|
|
51
|
+
readonly caller: TurnCaller | undefined;
|
|
52
|
+
readonly principal: string;
|
|
53
|
+
});
|
|
54
|
+
private readonly signalSteering;
|
|
55
|
+
get signal(): AbortSignal;
|
|
56
|
+
dispose(): void;
|
|
57
|
+
get steeringSignal(): AbortSignal;
|
|
58
|
+
private resetSteering;
|
|
59
|
+
/** Admits everything the pump accepted while the last step ran. */
|
|
60
|
+
admitBoundary(): Promise<void>;
|
|
61
|
+
/**
|
|
62
|
+
* Steering admitted during this turn, routed to children first and coalesced.
|
|
63
|
+
* The next step reads it as input, so its signal must not interrupt that
|
|
64
|
+
* step; only deliveries still unread re-signal the next generation.
|
|
65
|
+
*/
|
|
66
|
+
takeSteering(options?: SteeringOptions): Promise<DeliverHookPayload | undefined>;
|
|
67
|
+
/**
|
|
68
|
+
* Removes the admitted run messages the session applies at once instead of
|
|
69
|
+
* in a runtime wait, or only those of `kind`.
|
|
70
|
+
*/
|
|
71
|
+
takeBoundaryMessages(kind?: "agent-started"): WorkflowToolRunMessage[];
|
|
72
|
+
/**
|
|
73
|
+
* Next runtime result, workflow message, steering, or timeout, admitting
|
|
74
|
+
* inbox traffic while waiting. Deliveries admitted before the wait began are
|
|
75
|
+
* routed first, so a message that arrived as the calls started still steers.
|
|
76
|
+
* `timers` are durable sleeps raced against the inbox.
|
|
77
|
+
*/
|
|
78
|
+
nextRuntimeEvent(timers: readonly Promise<string>[]): Promise<RuntimeEvent>;
|
|
79
|
+
/**
|
|
80
|
+
* Takes one admitted delivery that answers a pending input request, from any
|
|
81
|
+
* responder: an approver need not be the turn's own person. Returns
|
|
82
|
+
* `undefined` when no admitted delivery answers one.
|
|
83
|
+
*/
|
|
84
|
+
takeInputResponses(requestIds: ReadonlySet<string>): DeliverHookPayload | undefined;
|
|
85
|
+
/** Resolves with the id of the call whose timer won, or `undefined` once inbox input is ready. */
|
|
86
|
+
private waitForInboxOrTimer;
|
|
87
|
+
private cancelsThisTurn;
|
|
88
|
+
/** Admits one payload; returns whether it was a delivery or sign-in callback. */
|
|
89
|
+
private admit;
|
|
90
|
+
/**
|
|
91
|
+
* During a runtime wait, descendant-bound answers cannot wait for the
|
|
92
|
+
* boundary. Returns whether a newly routed delivery still steers: it
|
|
93
|
+
* answered nothing, so its message is for the model.
|
|
94
|
+
*/
|
|
95
|
+
private routeAdmittedToChildren;
|
|
96
|
+
private abort;
|
|
97
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{coalesceDeliveries}from"#harness/messages.js";import{activeTurnId}from"#harness/active-turn-id.js";import{routeDeliverToChildren}from"#execution/route-child-delivery.js";import{admitSessionInboxPayload}from"#execution/session/admission.js";import{isSteeringMessage}from"#execution/session/input-queue.js";import{routeSelectedDelivery}from"#execution/session/route-selected-delivery.js";import{decodeSessionInboxPayload}from"#execution/session-inbox/protocol.js";import{TurnCancelledError}from"#harness/turn-cancellation.js";var ActiveTurn=class{admitted=new Set;routedToChildren=new Set;runtimeResults=[];controller=new AbortController;expectedTurnId;input;identity;unsubscribe;unsubscribeDelivery;steeringController=new AbortController;caller;constructor(e,t){this.input=e,this.caller=t.caller,this.identity={callerCallId:t.caller?.callId,principal:t.principal},this.expectedTurnId=activeTurnId(e.cursor.sessionState.emissionState),this.unsubscribe=e.inbox.onInterrupt(e=>{this.cancelsThisTurn(e)&&this.abort()}),this.unsubscribeDelivery=e.inbox.onDelivery(this.signalSteering)}signalSteering=e=>{let t;try{t=decodeSessionInboxPayload(e)}catch{return}t.kind===`deliver`&&isSteeringMessage(t,this.identity)&&!this.input.cursor.sessionState.hasProxyInputRequests&&this.steeringController.abort()};get signal(){return this.controller.signal}dispose(){this.unsubscribe(),this.unsubscribeDelivery()}get steeringSignal(){return this.steeringController.signal}resetSteering(){this.steeringController.signal.aborted&&(this.unsubscribeDelivery(),this.steeringController=new AbortController,this.unsubscribeDelivery=this.input.inbox.onDelivery(this.signalSteering))}async admitBoundary(){let e=this.input.inbox.drain();for(let t of e)await this.admit(t)}async takeSteering(e){let t=[];for(;;){let n=this.input.queue.takeSteering(this.admitted,this.identity,e);if(n===void 0)break;for(let e of n.sequences)this.admitted.delete(e);let r=await routeSelectedDelivery(n,this.input.cursor);if(r.kind===`cancel-turn`){this.abort();break}r.kind===`turn`&&t.push(r.delivery)}if(this.resetSteering(),t.length===0)return;let n=t.length===1?t[0]:coalesceDeliveries(t);return n.caller!==void 0&&(this.caller=n.caller),n}takeBoundaryMessages(e){let t=[],n=[];for(let r of this.runtimeResults){let i=asBoundaryMessage(r);i===void 0||e!==void 0&&i.kind!==e?n.push(r):t.push(i)}return this.runtimeResults.splice(0,this.runtimeResults.length,...n),t}async nextRuntimeEvent(e){for(;;){let t=await this.routeAdmittedToChildren();if(this.signal.aborted)return`cancelled`;if(t)return{kind:`steering`};let n=this.runtimeResults.shift();if(n!==void 0)return n;let r=await this.waitForInboxOrTimer(e);if(r!==void 0)return{callId:r,kind:`timeout`};let i=await this.input.inbox.next();if(i===void 0)throw Error(`Session inbox closed before runtime actions completed.`);if(await this.admit(i))return{kind:`input`}}}takeInputResponses(e){for(let t of this.admitted){let n=this.input.queue.delivery(t);if(n!==void 0&&n.payloads.some(t=>t.inputResponses?.some(t=>e.has(t.requestId))))return this.admitted.delete(t),this.input.queue.replaceDelivery(t,void 0),n}}async waitForInboxOrTimer(e){if(e.length===0||this.input.inbox.hasPending())return;let t=this.input.inbox.whenPending().then(()=>void 0);return await Promise.race([t,...e])}cancelsThisTurn(e){return e.kind===`reset`?!0:e.kind===`cancel`?e.turnId===void 0||e.turnId===this.expectedTurnId:!1}async admit(e){let t=await admitSessionInboxPayload(e,this.input);switch(t.kind){case`delivery`:return this.admitted.add(t.admission.sequence),!0;case`runtime-action-result`:return this.runtimeResults.push({kind:`runtime-action-result`,results:t.payload.results}),!1;case`workflow`:return this.runtimeResults.push({kind:`workflow`,message:t.message}),!1;case`cancel`:return this.cancelsThisTurn(e)&&this.abort(),!1;case`consumed`:return e.kind===`authorization-callback`}}async routeAdmittedToChildren(){let e=!1;for(let t of this.admitted){if(this.routedToChildren.has(t))continue;let n=this.input.queue.delivery(t);if(n===void 0){this.admitted.delete(t);continue}this.routedToChildren.add(t);let r=await this.input.cursor.advance(e=>routeDeliverToChildren({delivery:n,...e}));if(r.kind===`cancel-turn`)return this.input.queue.replaceDelivery(t,void 0),this.admitted.delete(t),this.abort(),!1;if(this.input.queue.replaceDelivery(t,r.remainder),r.remainder===void 0){this.admitted.delete(t);continue}isSteeringMessage(r.remainder,this.identity)&&(e=!0)}return e}abort(){this.controller.signal.aborted||this.controller.abort(new TurnCancelledError)}};function asBoundaryMessage(e){if(e!==`cancelled`&&e.kind===`workflow`&&(e.message.from.taskId!==void 0||e.message.kind===`agent-started`))return e.message}export{ActiveTurn};
|
|
@@ -1,17 +1,12 @@
|
|
|
1
|
-
import type { RuntimeActionResultHookPayload
|
|
1
|
+
import type { RuntimeActionResultHookPayload } from "#channel/types.js";
|
|
2
2
|
import type { DeliveryAdmission, SessionInputQueue } from "#execution/session/input-queue.js";
|
|
3
3
|
import { type SessionInboxPayload } from "#execution/session-inbox/inbox.js";
|
|
4
|
-
import type { SessionStateCursor } from "#execution/session/state-cursor.js";
|
|
5
4
|
import type { WorkflowToolRunMessage } from "#execution/tools/workflow/messages.js";
|
|
6
|
-
type SessionCancellation = Extract<SessionCommand, {
|
|
7
|
-
readonly kind: "cancel";
|
|
8
|
-
}>;
|
|
9
5
|
/** One canonical admission result, after wire decoding but before turn policy. */
|
|
10
6
|
type SessionAdmission = {
|
|
11
7
|
readonly admission: DeliveryAdmission;
|
|
12
8
|
readonly kind: "delivery";
|
|
13
9
|
} | {
|
|
14
|
-
readonly command: SessionCancellation;
|
|
15
10
|
readonly kind: "cancel";
|
|
16
11
|
} | {
|
|
17
12
|
readonly kind: "consumed";
|
|
@@ -28,12 +23,6 @@ type SessionAdmission = {
|
|
|
28
23
|
* and delivery-routing policies owned by their respective layers.
|
|
29
24
|
*/
|
|
30
25
|
export declare function admitSessionInboxPayload(value: SessionInboxPayload, input: {
|
|
31
|
-
readonly cursor: SessionStateCursor;
|
|
32
26
|
readonly queue: SessionInputQueue;
|
|
33
27
|
}): Promise<SessionAdmission>;
|
|
34
|
-
/** Applies accepted cancellation effects after the active-turn guard passes. */
|
|
35
|
-
export declare function applySessionCancellation(command: SessionCancellation, input: {
|
|
36
|
-
readonly cursor: SessionStateCursor;
|
|
37
|
-
readonly queue: SessionInputQueue;
|
|
38
|
-
}): Promise<void>;
|
|
39
28
|
export {};
|