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
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { DurableDynamicSubagentSelection } from "#context/keys.js";
|
|
2
|
+
import type { CompiledBundle } from "#runtime/sessions/runtime-context-keys.js";
|
|
3
|
+
import type { DynamicSubagentAgentConfig } from "#runtime/subagents/dynamic-agent-config.js";
|
|
4
|
+
import type { DynamicRemoteAgentConfig } from "#runtime/subagents/dynamic-remote-agent-config.js";
|
|
5
|
+
import type { RuntimeAgentDispatchRequest, RuntimeRemoteAgentDispatchRequest, RuntimeSubagentDispatchRequest } from "#shared/action-types.js";
|
|
6
|
+
import type { JsonObject } from "#shared/json.js";
|
|
7
|
+
import type { SubagentInputSource } from "#subagents/tool.js";
|
|
8
|
+
export type DynamicSubagentSelections = Readonly<Record<string, DurableDynamicSubagentSelection>>;
|
|
9
|
+
/** One message to an agent, addressed by its invocation name. */
|
|
10
|
+
export interface AgentActionInput {
|
|
11
|
+
readonly message: string;
|
|
12
|
+
readonly outputSchema?: JsonObject;
|
|
13
|
+
readonly target: string;
|
|
14
|
+
}
|
|
15
|
+
/** Where a new session with an agent starts: in this deployment, or at a remote agent. */
|
|
16
|
+
export type SubagentStartTarget = {
|
|
17
|
+
readonly kind: "local";
|
|
18
|
+
readonly action: RuntimeSubagentDispatchRequest;
|
|
19
|
+
readonly dynamicSubagentAgentConfig?: DynamicSubagentAgentConfig;
|
|
20
|
+
readonly source: SubagentInputSource;
|
|
21
|
+
} | {
|
|
22
|
+
readonly kind: "remote";
|
|
23
|
+
readonly action: RuntimeRemoteAgentDispatchRequest;
|
|
24
|
+
readonly dynamicRemoteAgent?: DynamicRemoteAgentConfig;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Resolves an agent name against the calling agent's registry, its dynamic
|
|
28
|
+
* selections, and the built-in root copy, as a dispatch request.
|
|
29
|
+
*/
|
|
30
|
+
export declare function resolveAgentAction(input: {
|
|
31
|
+
readonly bundle: CompiledBundle;
|
|
32
|
+
readonly callId: string;
|
|
33
|
+
readonly dynamicSelections: DynamicSubagentSelections;
|
|
34
|
+
readonly input: AgentActionInput;
|
|
35
|
+
}): RuntimeAgentDispatchRequest;
|
|
36
|
+
/**
|
|
37
|
+
* Plans a fresh child for a dispatch request. A dynamic agent whose selection
|
|
38
|
+
* changed and a root copy outside the root session can't start.
|
|
39
|
+
*/
|
|
40
|
+
export declare function resolveAgentStartTarget(input: {
|
|
41
|
+
readonly action: RuntimeAgentDispatchRequest;
|
|
42
|
+
readonly bundle: CompiledBundle;
|
|
43
|
+
readonly dynamicSelections: DynamicSubagentSelections;
|
|
44
|
+
readonly isRootSession: boolean;
|
|
45
|
+
}): SubagentStartTarget;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createLogger}from"#internal/logging.js";import{AGENT_TOOL_DESCRIPTION,AGENT_TOOL_NAME}from"#tools/framework/agent-contract.js";import{FatalError}from"#compiled/@workflow/core/index.js";import{ROOT_RUNTIME_AGENT_NODE_ID}from"#runtime/graph.js";const log=createLogger(`execution.agent-target`);function resolveAgentAction(e){let t=findAgentDefinition(e.bundle,e.dynamicSelections,e.input.target);if(t===void 0)throw new FatalError(`Agent target "${e.input.target}" is not available to this agent.`);let n={message:e.input.message};e.input.outputSchema!==void 0&&(n.outputSchema=e.input.outputSchema);let r={callId:e.callId,description:t.description??``,input:n,name:t.name,nodeId:t.nodeId};return t.kind===`remote`?{...r,kind:`remote-agent-call`,remoteAgentName:t.name}:{...r,kind:`subagent-call`,subagentName:t.name}}function findAgentDefinition(e,t,n){let r=e.subagentRegistry.subagentsByName.get(n);if(r!==void 0)return r.definition;let i=Object.values(t).find(e=>e!==null&&e.prepared.name===n);if(i!=null)return i.prepared;if(n===AGENT_TOOL_NAME&&e.nodeId===void 0)return{description:AGENT_TOOL_DESCRIPTION,kind:`subagent`,name:AGENT_TOOL_NAME,nodeId:ROOT_RUNTIME_AGENT_NODE_ID}}function resolveAgentStartTarget(e){let{action:t}=e,n=e.bundle.subagentRegistry.subagentsByNodeId,r=e.bundle.subagentRegistry.dynamicNodeIds?.has(t.nodeId)===!0,i=r?e.dynamicSelections[t.nodeId]??void 0:void 0;if(r&&(i===void 0||t.kind===`subagent-call`&&i.kind!==`subagent`||t.kind===`remote-agent-call`&&i.kind!==`remote`))throw log.warn(`dynamic subagent call blocked after availability changed`,{callId:t.callId,nodeId:t.nodeId,subagentName:t.name}),new FatalError(`Subagent "${t.name}" is not available in the current session context.`);if(isRecursiveAgentAction(t,n)&&!e.isRootSession)throw log.warn(`recursive agent call blocked outside the root session`,{callId:t.callId,nodeId:t.nodeId,subagentName:t.subagentName}),new FatalError(`The built-in "agent" tool is only available to the root session.`);if(t.kind===`remote-agent-call`)return{action:t,dynamicRemoteAgent:i?.kind===`remote`?i.remoteAgent:void 0,kind:`remote`};let a=i?.kind===`subagent`?i.agentConfig:void 0,o=n.get(t.nodeId),s=a?.description??(o?.definition.kind===`subagent`?o.definition.description:void 0);return{action:t,dynamicSubagentAgentConfig:a,kind:`local`,source:s===void 0?{type:`runtime`}:{description:s,type:`local`}}}function isRecursiveAgentAction(e,t){return e.kind===`subagent-call`&&e.subagentName===AGENT_TOOL_NAME&&!t.has(e.nodeId)}export{resolveAgentAction,resolveAgentStartTarget};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { SessionStateMap } from "#harness/types.js";
|
|
2
|
+
import type { TokenUsage } from "#shared/token-usage.js";
|
|
3
|
+
/** What a run's `ctx.agent` sessions have spent, turn by turn. */
|
|
4
|
+
export interface RunUsageTally {
|
|
5
|
+
/** Adds one ended turn's usage. */
|
|
6
|
+
record(turnUsage: TokenUsage): void;
|
|
7
|
+
/** The running total, or `undefined` before any turn ended. */
|
|
8
|
+
total(): TokenUsage | undefined;
|
|
9
|
+
}
|
|
10
|
+
/** `onRecord` runs after each recorded turn, so the run can send a total no reply will carry. */
|
|
11
|
+
export declare function createRunUsageTally(onRecord?: () => void): RunUsageTally;
|
|
12
|
+
/**
|
|
13
|
+
* Adds a run's delegated spend to the session's totals: its running `total`,
|
|
14
|
+
* less the part of it `counted` earlier.
|
|
15
|
+
*/
|
|
16
|
+
export declare function countRunUsage<T extends {
|
|
17
|
+
readonly state?: SessionStateMap;
|
|
18
|
+
}>(session: T, total: TokenUsage, counted?: TokenUsage): T;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{accumulateSessionUsage,getTurnUsageState,setTurnUsageState,toUsage}from"#harness/turn-tag-state.js";function createRunUsageTally(e){let t;return{record(n){t=accumulateSessionUsage({previous:t,usage:n}),e?.()},total(){return t===void 0?void 0:toUsage(t.session)}}}function countRunUsage(e,t,n){return setTurnUsageState(e,accumulateSessionUsage({previous:getTurnUsageState(e.state),usage:usageSince(t,n)}))}function usageSince(e,t){return t===void 0?e:{cacheReadTokens:e.cacheReadTokens-t.cacheReadTokens,cacheWriteTokens:e.cacheWriteTokens-t.cacheWriteTokens,costUsd:e.costUsd===void 0?void 0:e.costUsd-(t.costUsd??0),inputTokens:e.inputTokens-t.inputTokens,outputTokens:e.outputTokens-t.outputTokens}}export{countRunUsage,createRunUsageTally};
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import type { DeliverPayload } from "#channel/types.js";
|
|
2
|
-
import type { AuthorizationResult, PendingAuthorizationState } from "#harness/authorization.js";
|
|
3
|
-
import type { ConnectionAuthorizationChallenge } from "#connections/errors.js";
|
|
2
|
+
import type { AuthorizationChallenge, AuthorizationResult, PendingAuthorizationState } from "#harness/authorization.js";
|
|
4
3
|
export interface MatchedAuthorizationCallback {
|
|
5
|
-
readonly
|
|
6
|
-
readonly candidateId?: string;
|
|
4
|
+
readonly challenge: AuthorizationChallenge;
|
|
7
5
|
readonly result: {
|
|
8
6
|
readonly name: string;
|
|
9
7
|
readonly attemptId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function matchAuthorizationCallbacks(e,t){let n=[],r=[],i=new Set;for(let a of t){let t=a.authorizationCallback;if(t===void 0){r.push(a);continue}let o=e.challenges.find(e=>e.name===t.connectionName&&typeof t.attemptId==`string`&&e.attemptId===t.attemptId),s=o?.attemptId;o===void 0||s===void 0||o.principal===void 0||i.has(s)||(i.add(s),n.push({
|
|
1
|
+
function matchAuthorizationCallbacks(e,t){let n=[],r=[],i=new Set;for(let a of t){let t=a.authorizationCallback;if(t===void 0){r.push(a);continue}let o=e.challenges.find(e=>e.name===t.connectionName&&typeof t.attemptId==`string`&&e.attemptId===t.attemptId),s=o?.attemptId;o===void 0||s===void 0||o.principal===void 0||i.has(s)||(i.add(s),n.push({challenge:o,result:{attemptId:s,callback:t.callback,hookUrl:o.hookUrl,instanceId:o.instanceId,name:o.name,principal:o.principal,resume:o.resume}}))}return{matches:n,remainingPayloads:r}}export{matchAuthorizationCallbacks};
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { type DurableSessionState } from "#execution/durable-session-store.js";
|
|
2
|
-
/**
|
|
3
|
-
* Cancels every running delegated child recorded in the agent handle store
|
|
4
|
-
* and every workflow tool run the turn is waiting on.
|
|
5
|
-
*/
|
|
2
|
+
/** Cancels every workflow tool run the turn is waiting on. */
|
|
6
3
|
export declare function cancelDescendantTurnsStep(input: {
|
|
7
|
-
readonly serializedContext: Record<string, unknown>;
|
|
8
4
|
readonly sessionState: DurableSessionState;
|
|
9
5
|
}): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createLogger,logError}from"#internal/logging.js";import{
|
|
1
|
+
import{createLogger,logError}from"#internal/logging.js";import{getPendingCoordinationBatch}from"#harness/coordination.js";import{readDurableSession}from"#execution/durable-session-store.js";import{cancelWorkflowToolRun}from"#execution/tools/workflow/cancel.js";import{getBlockingWorkflowToolRuns}from"#harness/workflow-tool-runs.js";const log=createLogger(`execution.cancel-descendant-turns`);async function cancelDescendantTurnsStep(e){"use step";let t;try{let n=readDurableSession(e.sessionState);t=getBlockingWorkflowToolRuns(n.state,getPendingCoordinationBatch(n.state)?.event.turnId??e.sessionState.emissionState.turnId)}catch(t){logError(log,`failed to read pending descendants during cancellation`,t,{sessionId:e.sessionState.sessionId});return}await Promise.all(t.map(e=>cancelWorkflowToolRun(e.address,{kind:`cancel`,reason:`The turn that called the tool was cancelled.`})))}export{cancelDescendantTurnsStep};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{contextStorage}from"#context/container.js";import{TurnDeliveryIdsKey}from"#context/keys.js";import{
|
|
1
|
+
import{contextStorage}from"#context/container.js";import{TurnDeliveryIdsKey}from"#context/keys.js";import{createDurableSessionValues}from"#execution/durable-session-store.js";import{preserveSerializedSessionDynamicModelSelection}from"#context/serialized-dynamic-model-selection.js";import{serializeContext}from"#context/serialize.js";import{preserveCancelledTurnMessage}from"#execution/cancelled-turn-message.js";import{preserveSerializedInstrumentationState}from"#instrumentation/state.js";import{preserveSerializedAgentTraceState}from"#tracing/agent-trace-context-store.js";async function createCancelledModelCallBatchResult(e){let t=serializeContext(e.ctx),n=e.checkpoint?.result.session??e.initialSession,r=e.checkpoint===void 0?await contextStorage.run(e.ctx,()=>preserveCancelledTurnMessage(n,e.stepInput)):n,i={...e.checkpoint?.serializedContext??e.beforeBatchContext,[TurnDeliveryIdsKey.name]:t[TurnDeliveryIdsKey.name]};return{action:`cancelled`,serializedContext:preserveSerializedInstrumentationState(preserveSerializedAgentTraceState(preserveSerializedSessionDynamicModelSelection(i,t),t),t),...createDurableSessionValues(r)}}export{createCancelledModelCallBatchResult};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ContextContainer } from "#context/container.js";
|
|
2
|
+
/**
|
|
3
|
+
* Announces the agent's connections for the current step: a baseline listing
|
|
4
|
+
* the first time, then only what changed. Tool names and signatures stay out
|
|
5
|
+
* of the listing; `connection_search` returns them.
|
|
6
|
+
*/
|
|
7
|
+
export declare function announceConnections(ctx: ContextContainer): void;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{ConnectionRegistryKey}from"#context/providers/connection-key.js";import{setPendingAnnouncement}from"#harness/announcements.js";const ANNOUNCEMENT_KEY=`connections`;function announceConnections(e){let t=e.get(ConnectionRegistryKey);if(t===void 0){setPendingAnnouncement(e,ANNOUNCEMENT_KEY,void 0);return}let n=t.getConnections().map(e=>({description:e.description,name:e.connectionName})).sort((e,t)=>e.name.localeCompare(t.name));setPendingAnnouncement(e,ANNOUNCEMENT_KEY,{value:JSON.stringify(n),render:e=>renderConnectionsAnnouncement(parseListing(e),n)})}function renderConnectionsAnnouncement(e,t){if(e===void 0||e.length===0)return t.length===0?void 0:renderListing(t);if(t.length===0)return`Connections changed. No connections are available now; do not call connection_execute.`;let n=new Map(e.map(e=>[e.name,e])),r=new Set(t.map(e=>e.name)),i=t.filter(e=>n.get(e.name)?.description!==e.description),a=e.filter(e=>!r.has(e.name)),o=[`Connections changed.`];i.length>0&&o.push([`Added or updated:`,...i.map(formatEntry)].join(`
|
|
2
|
+
`)),a.length>0&&o.push(`No longer available, do not call: ${a.map(e=>e.name).join(`, `)}`);let s=o.join(`
|
|
3
|
+
`),c=`Connections changed. This list replaces the previous one.\n${renderListing(t)}`;return s.length<c.length?s:c}function renderListing(e){return[`Connections. Find their tools with connection_search and call them with connection_execute.`,...e.map(formatEntry)].join(`
|
|
4
|
+
`)}function formatEntry(e){return e.description.length===0?`- ${e.name}`:`- ${e.name}: ${e.description}`}function parseListing(e){if(e!==void 0)try{let t=JSON.parse(e);return Array.isArray(t)?t:void 0}catch{return}}export{announceConnections};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { SessionCommand } from "#channel/types.js";
|
|
2
|
-
/**
|
|
2
|
+
/** Hands a losing session candidate's command to the session that owns the continuation. */
|
|
3
3
|
export declare function settleContinuationConflictStep(input: {
|
|
4
|
-
readonly
|
|
5
|
-
readonly command?: Extract<SessionCommand, {
|
|
4
|
+
readonly command: Extract<SessionCommand, {
|
|
6
5
|
readonly kind: "send";
|
|
7
6
|
}>;
|
|
8
7
|
readonly continuationToken: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{resumeSessionInbox}from"#execution/session-inbox/resume.js";async function settleContinuationConflictStep(e){"use step";await resumeSessionInbox(e.continuationToken,e.command)}export{settleContinuationConflictStep};
|
|
@@ -1,39 +1,31 @@
|
|
|
1
1
|
/** Shared owner-side dispatch context preparation. */
|
|
2
|
-
import type { ActivityObserverConfig } from "#channel/types.js";
|
|
3
2
|
import { type ChannelAdapter, type ChannelAdapterContext } from "#channel/adapter.js";
|
|
4
3
|
import { type LocalDevRequestProvenance } from "#context/keys.js";
|
|
5
4
|
import { ContextContainer } from "#context/container.js";
|
|
6
5
|
import { type CompiledBundle } from "#runtime/sessions/runtime-context-keys.js";
|
|
7
|
-
import type {
|
|
8
|
-
import type {
|
|
9
|
-
import type {
|
|
10
|
-
import type { SessionParent } from "#channel/types.js";
|
|
6
|
+
import type { HarnessSessionBase } from "#harness/types.js";
|
|
7
|
+
import type { RuntimeActionResult, RuntimeWorkflowTaskRequest } from "#shared/action-types.js";
|
|
8
|
+
import type { SessionParent, SessionTraceRoot } from "#channel/types.js";
|
|
11
9
|
import { type DurableSessionState, readDurableSession } from "#execution/durable-session-store.js";
|
|
12
10
|
import { buildSubagentRunInput } from "#subagents/tool.js";
|
|
13
11
|
import type { WorkflowToolRunOwner } from "#execution/tools/workflow/messages.js";
|
|
12
|
+
import type { DynamicSubagentSelections } from "#execution/agent-sessions/target.js";
|
|
14
13
|
import type { WorkflowAgentMetadata } from "#tools/workflow-definition.js";
|
|
15
|
-
export type DispatchPlanEntry = {
|
|
16
|
-
readonly kind: "task-control";
|
|
17
|
-
readonly action: RuntimeToolCallActionRequest;
|
|
18
|
-
} | {
|
|
19
|
-
readonly kind: "workflow-task";
|
|
20
|
-
readonly task: RuntimeWorkflowTaskRequest;
|
|
21
|
-
};
|
|
22
14
|
/** Input shared by direct and Workflow-originated owner-side dispatch. */
|
|
23
15
|
export interface CoordinationDispatchInput {
|
|
24
|
-
readonly callbackBaseUrl?: string;
|
|
25
16
|
readonly workflowToolRunOwner: WorkflowToolRunOwner;
|
|
26
17
|
readonly sessionWritable: WritableStream<Uint8Array>;
|
|
27
18
|
readonly serializedContext: Record<string, unknown>;
|
|
28
19
|
readonly sessionState: DurableSessionState;
|
|
29
20
|
}
|
|
30
|
-
/** Owner-side results and the updated session. */
|
|
21
|
+
/** Owner-side results and the updated context and session. */
|
|
31
22
|
export interface CoordinationDispatchResult {
|
|
32
23
|
readonly results: readonly RuntimeActionResult[];
|
|
24
|
+
readonly serializedContext: Record<string, unknown>;
|
|
33
25
|
readonly sessionState: DurableSessionState;
|
|
34
26
|
}
|
|
35
27
|
/** Everything preflight produces before either step's dispatch loop runs. */
|
|
36
|
-
export interface PreparedCoordinationDispatch<PlanEntry =
|
|
28
|
+
export interface PreparedCoordinationDispatch<PlanEntry = RuntimeWorkflowTaskRequest> {
|
|
37
29
|
readonly adapter: ChannelAdapter;
|
|
38
30
|
readonly adapterCtx: ChannelAdapterContext;
|
|
39
31
|
readonly auth: Parameters<typeof buildSubagentRunInput>[0]["auth"];
|
|
@@ -41,22 +33,20 @@ export interface PreparedCoordinationDispatch<PlanEntry = DispatchPlanEntry> {
|
|
|
41
33
|
readonly bundle: CompiledBundle;
|
|
42
34
|
readonly capabilities: Parameters<typeof buildSubagentRunInput>[0]["capabilities"];
|
|
43
35
|
readonly channelMetadata: Parameters<typeof buildSubagentRunInput>[0]["channelMetadata"];
|
|
36
|
+
readonly dynamicSubagentSelections: DynamicSubagentSelections;
|
|
44
37
|
readonly inheritedConversation: Parameters<typeof buildSubagentRunInput>[0]["inheritedConversation"];
|
|
45
|
-
/** Number of local children sharing the parent's remaining token quota. */
|
|
46
|
-
readonly fanoutSize: number;
|
|
47
38
|
readonly initiatorAuth: Parameters<typeof buildSubagentRunInput>[0]["initiatorAuth"];
|
|
48
39
|
/** Inherited originating-client metadata for the dev-TUI hint. */
|
|
49
40
|
readonly localDevRequest?: LocalDevRequestProvenance;
|
|
50
41
|
/** Lineage of the session running this dispatch, when it is itself a delegated child. */
|
|
51
42
|
readonly parentSession: SessionParent | undefined;
|
|
52
|
-
readonly activityObserver?: ActivityObserverConfig & {
|
|
53
|
-
readonly workIdentity: ActivityWorkIdentityV1;
|
|
54
|
-
};
|
|
55
43
|
readonly sandboxSessionId: string;
|
|
56
44
|
readonly serializedContext: Record<string, unknown>;
|
|
57
45
|
readonly plan: readonly PlanEntry[];
|
|
58
|
-
readonly session:
|
|
46
|
+
readonly session: HarnessSessionBase;
|
|
59
47
|
readonly sessionState: DurableSessionState;
|
|
48
|
+
/** Trace root that this session's local children inherit, when it isn't the lineage root. */
|
|
49
|
+
readonly traceRoot?: SessionTraceRoot;
|
|
60
50
|
readonly workflowAgents: Readonly<Record<string, WorkflowAgentMetadata>>;
|
|
61
51
|
}
|
|
62
52
|
/**
|
|
@@ -76,7 +66,6 @@ interface DispatchBatch {
|
|
|
76
66
|
readonly stepIndex: number;
|
|
77
67
|
readonly turnId: string;
|
|
78
68
|
};
|
|
79
|
-
readonly localFanoutSize?: number;
|
|
80
69
|
readonly requests: readonly {
|
|
81
70
|
readonly callId: string;
|
|
82
71
|
}[];
|
|
@@ -85,17 +74,12 @@ export declare function prepareActionDispatch<PlanEntry>(input: {
|
|
|
85
74
|
readonly batch: DispatchBatch;
|
|
86
75
|
readonly ctx: ContextContainer;
|
|
87
76
|
readonly durableSession: Awaited<ReturnType<typeof readDurableSession>>;
|
|
88
|
-
readonly fanoutSize?: number;
|
|
89
77
|
readonly plan: (input: {
|
|
90
78
|
readonly bundle: CompiledBundle;
|
|
91
79
|
readonly ctx: ContextContainer;
|
|
92
80
|
readonly requests: DispatchBatch["requests"];
|
|
93
|
-
readonly session:
|
|
81
|
+
readonly session: HarnessSessionBase;
|
|
94
82
|
}) => readonly PlanEntry[];
|
|
95
|
-
readonly planReusesOwnerSandbox?: (input: {
|
|
96
|
-
readonly bundle: CompiledBundle;
|
|
97
|
-
readonly plan: readonly PlanEntry[];
|
|
98
|
-
}) => boolean;
|
|
99
83
|
readonly serializedContext: Record<string, unknown>;
|
|
100
84
|
}): Promise<Omit<PreparedCoordinationDispatch<PlanEntry>, "sessionState">>;
|
|
101
85
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ConversationContextKey}from"#shared/conversation-context.js";import"#channel/adapter.js";import"#context/container.js";import{
|
|
1
|
+
import{ConversationContextKey}from"#shared/conversation-context.js";import"#channel/adapter.js";import"#context/container.js";import{AuthKey,CapabilitiesKey,ChannelInstrumentationKey,InitiatorAuthKey,LocalDevRequestKey,ParentSessionKey,TraceRootKey}from"#context/keys.js";import{BundleKey,ChannelKey}from"#runtime/sessions/runtime-context-keys.js";import"#subagents/tool.js";import{assertUniqueCoordinationCallIds,getPendingCoordinationBatch,setPendingCoordinationBatch}from"#harness/coordination.js";import{createDurableSessionState,readDurableSession}from"#execution/durable-session-store.js";import{deserializeContext}from"#context/serialize.js";import{buildAdapterContext}from"#channel/adapter-context.js";import{activeTurnId}from"#harness/active-turn-id.js";import{resolveTraceRootSessionId}from"#shared/trace-root.js";import{hydrateDurableSession}from"#execution/session.js";import{resolveEffectiveAgentRuntime}from"#execution/effective-agent-config.js";import{resolveWorkflowAgentMetadata}from"#execution/agent-sessions/metadata.js";import{readDynamicSubagentSelections}from"#context/dynamic-subagent-lifecycle.js";async function prepareCoordinationDispatch(e){let t=readDurableSession(e.sessionState),n=getPendingCoordinationBatch(t.state);if(n===void 0)return;let r=n.tasks;if(r.length===0)return;let i=n.event.turnId||activeTurnId(e.sessionState.emissionState),a=n.event.turnId===i?n.event:{...n.event,turnId:i},o=await deserializeContext(e.serializedContext),s=await prepareActionDispatch({batch:{event:a,requests:r},ctx:o,durableSession:t,plan:()=>r,serializedContext:e.serializedContext});if(a===n.event)return{...s,sessionState:e.sessionState};let c=setPendingCoordinationBatch({...n,event:a,session:s.session});return{...s,session:c,sessionState:createDurableSessionState({session:c})}}async function prepareActionDispatch(e){let{batch:t,durableSession:n}=e;assertUniqueCoordinationCallIds(t.requests);let r=e.ctx,i=r.require(BundleKey),a=resolveEffectiveAgentRuntime(i,r),o=hydrateDurableSession({compactionOverrides:{thresholdPercent:a.thresholdPercent},durable:n,turnAgent:a.turnAgent}),s=r.require(ChannelKey),c=e.plan({bundle:i,ctx:r,requests:t.requests,session:o}),l=resolveActiveSandboxSessionId(s.state,o.sessionId);return{adapter:s,adapterCtx:buildAdapterContext(s,r),auth:r.get(AuthKey)??null,batch:t,bundle:i,capabilities:r.get(CapabilitiesKey),channelMetadata:r.get(ChannelInstrumentationKey),dynamicSubagentSelections:readDynamicSubagentSelections(r),inheritedConversation:r.get(ConversationContextKey),initiatorAuth:r.get(InitiatorAuthKey)??null,localDevRequest:r.get(LocalDevRequestKey),parentSession:r.get(ParentSessionKey),plan:c,sandboxSessionId:l,serializedContext:e.serializedContext,session:o,traceRoot:childTraceRoot(r,o.sessionId),workflowAgents:resolveWorkflowAgentMetadata(r)}}function childTraceRoot(e,t){if(e.get(TraceRootKey)!==void 0)return{kind:`inherited`,sessionId:resolveTraceRootSessionId(e,t)}}function resolveActiveSandboxSessionId(e,t){if(typeof e!=`object`||!e)return t;let n=e.sandboxSessionId;return typeof n==`string`&&n.length>0?n:t}export{prepareActionDispatch,prepareCoordinationDispatch};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
/** Starts workflow-tool runs
|
|
1
|
+
/** Starts workflow-tool runs for pending coordination. */
|
|
2
2
|
import { type CoordinationDispatchInput, type CoordinationDispatchResult } from "#execution/coordination-dispatch-shared.js";
|
|
3
|
+
import { type WithSessionStateDelta } from "#execution/session/state-delta.js";
|
|
3
4
|
type CoordinationDispatchStepInput = CoordinationDispatchInput & {
|
|
4
5
|
readonly action: "park";
|
|
5
6
|
};
|
|
6
|
-
export declare function dispatchCoordinationStep(input: CoordinationDispatchStepInput): Promise<CoordinationDispatchResult
|
|
7
|
+
export declare function dispatchCoordinationStep(input: CoordinationDispatchStepInput): Promise<WithSessionStateDelta<CoordinationDispatchResult>>;
|
|
7
8
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createDurableSessionState}from"#execution/durable-session-store.js";import{
|
|
1
|
+
import{createDurableSessionState}from"#execution/durable-session-store.js";import{prepareCoordinationDispatch}from"#execution/coordination-dispatch-shared.js";import{publishSessionEvents}from"#execution/publish-session-events.js";import{withSessionStateDelta}from"#execution/session/state-delta.js";import{startWorkflowTask}from"#execution/tools/workflow/start.js";import{sendToTask,startTaskRun}from"#execution/tasks/start.js";import{captureAgentSessionContext,resolveStepAgentLimits}from"#execution/agent-sessions/context.js";async function dispatchCoordinationStep(e){"use step";return await withSessionStateDelta(e,dispatchCoordination)}async function dispatchCoordination(e){let t=await prepareCoordinationDispatch({serializedContext:e.serializedContext,sessionState:e.sessionState});if(t===void 0)return{results:[],serializedContext:e.serializedContext,sessionState:e.sessionState};let{batch:n,session:r}=t,i=r,a=[],o=[],s=resolveStepAgentLimits(t);for(let r of t.plan){let c=await dispatchWorkflowCall({agentContext:captureAgentSessionContext(t,r.callId,s),auth:{current:t.auth,initiator:t.initiatorAuth},batchEvent:n.event,owner:e.workflowToolRunOwner,parentSession:t.parentSession,session:i,task:r});i=c.session,c.result!==void 0&&a.push(c.result),c.started!==void 0&&o.push(c.started)}return{results:a,...await publishSessionEvents({serializedContext:e.serializedContext,sessionState:i===r?t.sessionState:createDurableSessionState({session:i}),sessionWritable:e.sessionWritable},o)}}async function dispatchWorkflowCall(e){let{entry:t}=e.task;switch(t.entryPoint){case`execute`:return await startWorkflowTask(e);case`task`:case`serve`:return await startTaskRun({...e,entry:t});case`receive`:return await sendToTask({...e,taskId:t.taskId})}}export{dispatchCoordinationStep};
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import { type DurableCompiledArtifactsSource } from "#runtime/durable-compiled-artifacts-source.js";
|
|
2
2
|
import { type DurableSessionState } from "#execution/durable-session-store.js";
|
|
3
|
+
import type { HarnessModelMessage } from "#harness/messages.js";
|
|
3
4
|
import type { RunSessionLimits } from "#channel/types.js";
|
|
4
5
|
import type { JsonObject } from "#shared/json.js";
|
|
5
6
|
import type { DynamicSubagentAgentConfig } from "#runtime/subagents/dynamic-agent-config.js";
|
|
6
7
|
/**
|
|
7
8
|
* Result returned by {@link createSessionStep}.
|
|
8
9
|
*
|
|
9
|
-
* Exposes the projected {@link DurableSessionState} the
|
|
10
|
-
* drive the turn loop.
|
|
10
|
+
* Exposes the projected {@link DurableSessionState} and the history the
|
|
11
|
+
* owner needs to drive the turn loop.
|
|
11
12
|
*/
|
|
12
13
|
export interface CreateSessionStepResult {
|
|
14
|
+
readonly history: HarnessModelMessage[];
|
|
13
15
|
readonly state: DurableSessionState;
|
|
14
16
|
}
|
|
15
17
|
/**
|
|
@@ -27,5 +29,4 @@ export declare function createSessionStep(input: {
|
|
|
27
29
|
readonly nodeId?: string;
|
|
28
30
|
readonly rootSessionId?: string;
|
|
29
31
|
readonly sessionId: string;
|
|
30
|
-
readonly taskId?: string;
|
|
31
32
|
}): Promise<CreateSessionStepResult>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{resolveDurableCompiledArtifactsSource}from"#runtime/durable-compiled-artifacts-source.js";import{getCompiledRuntimeAgentBundle}from"#runtime/sessions/compiled-agent-cache.js";import{createDurableSessionValues}from"#execution/durable-session-store.js";import{createSession}from"#execution/session.js";import{resolveEffectiveAgentRuntimeFromConfig}from"#execution/effective-agent-config.js";import{resolveInheritedTokenLimit}from"#execution/run-session-limits.js";async function createSessionStep(e){"use step";let t=await getCompiledRuntimeAgentBundle({compiledArtifactsSource:resolveDurableCompiledArtifactsSource(e.compiledArtifactsSource),nodeId:e.nodeId}),n=resolveEffectiveAgentRuntimeFromConfig(t,e.dynamicSubagentAgentConfig),r=createSession({compactionOverrides:{thresholdPercent:n.thresholdPercent},continuationToken:e.continuationToken,limits:{maxInputTokensPerSession:resolveInheritedTokenLimit({configured:n.limits?.maxInputTokensPerSession,inherited:e.inheritedLimits?.maxInputTokensPerSession}),maxOutputTokensPerSession:resolveInheritedTokenLimit({configured:n.limits?.maxOutputTokensPerSession,inherited:e.inheritedLimits?.maxOutputTokensPerSession}),maxTokenCostUsdPerSession:resolveInheritedTokenLimit({configured:n.limits?.maxTokenCostUsdPerSession,inherited:e.inheritedLimits?.maxTokenCostUsdPerSession})},outputSchema:e.outputSchema,rootSessionId:e.rootSessionId,sessionId:e.sessionId,turnAgent:n.turnAgent}),{history:i,sessionState:a}=createDurableSessionValues(r);return{history:i,state:a}}export{createSessionStep};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{coalesceTurnInputs}from"#harness/messages.js";const COALESCED_DELIVER_FIELDS=[`context`,`inputResponses`,`message`,`outputSchema
|
|
1
|
+
import{coalesceTurnInputs}from"#harness/messages.js";const COALESCED_DELIVER_FIELDS=[`context`,`inputResponses`,`message`,`outputSchema`];function coalesceDeliverPayloads(e){if(e.length===0)return{};if(e.length===1)return e[0]??{};let t={},n={};for(let r of e){for(let[e,n]of Object.entries(r))n!==void 0&&(t[e]=n);n=coalesceTurnInputs(n,r)}for(let e of COALESCED_DELIVER_FIELDS)delete t[e];return Object.assign(t,n)}export{coalesceDeliverPayloads};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { type HarnessEmissionState } from "#harness/emission.js";
|
|
2
2
|
import type { HarnessModelMessage } from "#harness/messages.js";
|
|
3
|
-
import type { HarnessSession, SessionStateMap } from "#harness/types.js";
|
|
3
|
+
import type { HarnessSession, HarnessSessionBase, SessionStateMap } from "#harness/types.js";
|
|
4
4
|
import type { SandboxState } from "#sandbox/state.js";
|
|
5
5
|
import type { JsonObject } from "#shared/json.js";
|
|
6
6
|
/** Explicit checkpoint contract shared by deployment handoffs. */
|
|
7
|
-
export declare const DURABLE_SESSION_VERSION =
|
|
7
|
+
export declare const DURABLE_SESSION_VERSION = 2;
|
|
8
8
|
/**
|
|
9
9
|
* Serializable handle to a durable session.
|
|
10
10
|
*
|
|
@@ -35,6 +35,8 @@ export interface DurableSessionState {
|
|
|
35
35
|
* `agent.compactionModelReference`, and the `compaction` thresholds —
|
|
36
36
|
* those are rebuilt every turn from `bundle.turnAgent` by
|
|
37
37
|
* {@link import("#execution/session.js").hydrateDurableSession}.
|
|
38
|
+
* Omits `history` too: the session workflow carries it as its own value, so
|
|
39
|
+
* only the steps that read or change it receive it as input.
|
|
38
40
|
* `agent.system` is the last applied prompt snapshot. Before each model step,
|
|
39
41
|
* the execution layer replaces it from the current deployment's
|
|
40
42
|
* `bundle.turnAgent`.
|
|
@@ -49,12 +51,10 @@ export interface DurableSession {
|
|
|
49
51
|
*/
|
|
50
52
|
readonly rootSessionId?: string;
|
|
51
53
|
readonly continuationToken: string;
|
|
52
|
-
readonly history: HarnessModelMessage[];
|
|
53
54
|
readonly limits?: HarnessSession["limits"];
|
|
54
55
|
readonly outputSchema?: JsonObject;
|
|
55
56
|
readonly state?: SessionStateMap;
|
|
56
57
|
readonly sandboxState?: SandboxState;
|
|
57
|
-
readonly taskId?: string;
|
|
58
58
|
readonly agent: {
|
|
59
59
|
readonly system: string;
|
|
60
60
|
};
|
|
@@ -74,8 +74,13 @@ export declare function readDurableSession(state: DurableSessionState): DurableS
|
|
|
74
74
|
* snapshot embedded in the Workflow step result.
|
|
75
75
|
*/
|
|
76
76
|
export declare function createDurableSessionState(input: {
|
|
77
|
-
readonly session:
|
|
77
|
+
readonly session: HarnessSessionBase;
|
|
78
78
|
}): DurableSessionState;
|
|
79
|
+
/** The session state and history a step that ran with the history leaves. */
|
|
80
|
+
export declare function createDurableSessionValues(session: HarnessSession): {
|
|
81
|
+
readonly history: HarnessModelMessage[];
|
|
82
|
+
readonly sessionState: DurableSessionState;
|
|
83
|
+
};
|
|
79
84
|
/** Replaces session program memory and refreshes its workflow projections. */
|
|
80
85
|
export declare function replaceDurableSessionSnapshot(input: {
|
|
81
86
|
readonly session: DurableSession;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getHarnessEmissionState}from"#harness/emission.js";import{projectToDurableSession}from"#execution/session.js";import{hasProxyInputRequests}from"#harness/proxy-input-requests.js";const DURABLE_SESSION_VERSION=
|
|
1
|
+
import{getHarnessEmissionState}from"#harness/emission.js";import{projectToDurableSession}from"#execution/session.js";import{hasProxyInputRequests}from"#harness/proxy-input-requests.js";const DURABLE_SESSION_VERSION=2;function readDurableSession(e){if(e.version!==2||e.snapshot?.session===void 0)throw Error(`Unsupported session checkpoint. Start a new session on this deployment.`);return e.snapshot.session}function createDurableSessionState(e){return projectDurableSessionState(projectToDurableSession(e.session))}function createDurableSessionValues(e){return{history:e.history,sessionState:createDurableSessionState({session:e})}}function replaceDurableSessionSnapshot(e){return{...e.state,...projectDurableSessionState(e.session)}}function projectDurableSessionState(e){return{continuationToken:e.continuationToken,emissionState:getHarnessEmissionState(e.state),hasProxyInputRequests:hasProxyInputRequests(e.state),sessionId:e.sessionId,version:2,snapshot:{session:e}}}export{DURABLE_SESSION_VERSION,createDurableSessionState,createDurableSessionValues,readDurableSession,replaceDurableSessionSnapshot};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createSessionStartedEvent,createTurnStartedEvent}from"#protocol/message.js";import{dispatchDynamicConnectionEvent}from"#context/dynamic-connection-lifecycle.js";function bindDynamicConnections(e,t){let n=t.dynamicConnectionResolvers??[],dispatch=t=>dispatchDynamicConnectionEvent({ctx:e,event:t,resolvers:n});return{dispatch,async rehydrate(e,t,n){e.sessionStarted&&(await dispatch(createSessionStartedEvent({runtime:t})),n!==void 0&&await dispatch(createTurnStartedEvent(n)))}}}export{bindDynamicConnections};
|
|
1
|
+
import{createSessionStartedEvent,createTurnStartedEvent}from"#protocol/message.js";import{dispatchDynamicConnectionEvent}from"#context/dynamic-connection-lifecycle.js";import{announceConnections}from"#execution/connection-announcement.js";function bindDynamicConnections(e,t){let n=t.dynamicConnectionResolvers??[],dispatch=async t=>{await dispatchDynamicConnectionEvent({ctx:e,event:t,resolvers:n}),t.type===`step.started`&&announceConnections(e)};return{dispatch,async rehydrate(e,t,n){e.sessionStarted&&(await dispatch(createSessionStartedEvent({runtime:t})),n!==void 0&&await dispatch(createTurnStartedEvent(n)))}}}export{bindDynamicConnections};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsonSchema}from"ai";import{WORKFLOW_PROGRAM_BRIDGE_REQUEST_LIMIT,WORKFLOW_PROGRAM_CALL_INTERRUPT_KIND,parseWorkflowProgramOutput,readWorkflowProgramCallInterrupt}from"#execution/dynamic-workflow/schema.js";import{continueWorkflowSandboxInterrupt,createParkingHostTool,createWorkflowSandboxTool,getWorkflowSandboxPendingInterrupts,unwrapWorkflowSandboxResult}from"#shared/workflow-sandbox.js";const agentBridgeSchema=jsonSchema({additionalProperties:!1,properties:{input:{additionalProperties:!1,properties:{
|
|
1
|
+
import{jsonSchema}from"ai";import{toErrorMessage}from"#shared/errors.js";import{FatalError}from"#compiled/@workflow/core/index.js";import{WORKFLOW_PROGRAM_BRIDGE_REQUEST_LIMIT,WORKFLOW_PROGRAM_CALL_INTERRUPT_KIND,parseWorkflowProgramOutput,readWorkflowProgramCallInterrupt}from"#execution/dynamic-workflow/schema.js";import{continueWorkflowSandboxInterrupt,createParkingHostTool,createWorkflowSandboxTool,getWorkflowSandboxPendingInterrupts,unwrapWorkflowSandboxResult}from"#shared/workflow-sandbox.js";const agentBridgeSchema=jsonSchema({additionalProperties:!1,properties:{input:{additionalProperties:!1,properties:{message:{type:`string`},outputSchema:{type:`object`}},required:[`message`],type:`object`},target:{type:`string`}},required:[`target`,`input`],type:`object`});async function runWorkflowProgramStep(e){"use step";try{return await runWorkflowProgram(e)}catch(e){throw new FatalError(toErrorMessage(e))}}async function runWorkflowProgram(e){let t=buildWorkflowProgramTools(),n=e.program.continuationSecurity,r;if(e.resume===void 0){let i=await createWorkflowSandboxTool({bridgeRequestLimit:WORKFLOW_PROGRAM_BRIDGE_REQUEST_LIMIT,continuationSecurity:n,hostTools:t});if(i.execute===void 0)throw Error(`Workflow program has no sandbox executor.`);r=await i.execute({js:wrapWorkflowProgram(e.program.js)},{toolCallId:e.callId})}else{let i=e.resume.interrupt;r=i;for(let a of e.resume.resolutions){r=await continueWorkflowSandboxInterrupt({bridgeRequestLimit:WORKFLOW_PROGRAM_BRIDGE_REQUEST_LIMIT,continuationSecurity:n,interrupt:i,resolution:a,tools:t});let e=await unwrapWorkflowSandboxResult(r,n);if(e.status===`completed`)break;let o=getWorkflowSandboxPendingInterrupts(e.interrupt)[0];if(o===void 0)throw Error(`Workflow program continuation contains no pending agent call.`);i=o}}let i=await unwrapWorkflowSandboxResult(r,n);if(i.status===`completed`)return{output:parseWorkflowProgramOutput(i.output),status:`completed`};let a=getWorkflowSandboxPendingInterrupts(i.interrupt);if(a.length===0)throw Error(`Workflow program continuation contains no pending agent call.`);for(let e of a)readWorkflowProgramCallInterrupt(e);return{interrupt:a[0],pending:a,status:`interrupted`}}function buildWorkflowProgramTools(){return{agent:createParkingHostTool({description:`Invoke one allowlisted child agent.`,inputSchema:agentBridgeSchema,interrupt:e=>({kind:WORKFLOW_PROGRAM_CALL_INTERRUPT_KIND,task:void 0,toolInput:e,toolName:`agent`})})}}function wrapWorkflowProgram(e){return`return await (async (ctx) => {\n${e}\n})(Object.freeze({\n agent: (target, input) => tools.agent({ target, input }),\n}));`}export{runWorkflowProgramStep};
|
|
@@ -20,9 +20,8 @@ export interface WorkflowProgramInput {
|
|
|
20
20
|
readonly maxSubagents: number;
|
|
21
21
|
}
|
|
22
22
|
export type WorkflowProgramOptions = Pick<WorkflowProgramInput, "maxSubagents">;
|
|
23
|
-
interface WorkflowProgramAgentCall {
|
|
23
|
+
export interface WorkflowProgramAgentCall {
|
|
24
24
|
readonly input: {
|
|
25
|
-
readonly agentId?: string;
|
|
26
25
|
readonly message: string;
|
|
27
26
|
readonly outputSchema?: JsonObject;
|
|
28
27
|
};
|
|
@@ -34,4 +33,3 @@ export declare function readWorkflowProgramCallInterrupt(input: {
|
|
|
34
33
|
}): WorkflowProgramCallInterrupt;
|
|
35
34
|
export declare function readWorkflowProgramAgentCall(value: unknown): WorkflowProgramAgentCall;
|
|
36
35
|
export declare function parseWorkflowProgramOutput(value: unknown): JsonValue;
|
|
37
|
-
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{parseJsonObject,parseJsonValue}from"#shared/json.js";const DEFAULT_WORKFLOW_PROGRAM_MAX_SUBAGENTS=100,MAX_WORKFLOW_PROGRAM_MAX_SUBAGENTS=128,WORKFLOW_PROGRAM_BRIDGE_REQUEST_LIMIT=256,WORKFLOW_PROGRAM_CALL_INTERRUPT_KIND=`eve.workflow-program-agent-call`;function parseWorkflowProgramOptions(e){let t=parseJsonObject(e);if(!isPositiveInteger(t.maxSubagents)||t.maxSubagents>128)throw TypeError(`workflow maxSubagents must be an integer between 1 and 128.`);return{maxSubagents:t.maxSubagents}}function readWorkflowProgramCallInterrupt(e){let t=e.payload;if(t.kind!==`eve.workflow-program-agent-call`||t.toolName!==`agent`)throw Error(`Unsupported workflow program interrupt kind "${String(t.kind)}".`);return{kind:WORKFLOW_PROGRAM_CALL_INTERRUPT_KIND,task:void 0,toolInput:t.toolInput,toolName:`agent`}}function readWorkflowProgramAgentCall(e){let t=parseJsonObject(e);if(typeof t.target!=`string`||t.target.trim()===``)throw TypeError(`Workflow program ctx.agent() requires a non-empty agent name.`);let n=parseJsonObject(t.input);if(typeof n.message!=`string`)throw TypeError(`Workflow program ctx.agent() requires a "message" string.`);
|
|
1
|
+
import{parseJsonObject,parseJsonValue}from"#shared/json.js";const DEFAULT_WORKFLOW_PROGRAM_MAX_SUBAGENTS=100,MAX_WORKFLOW_PROGRAM_MAX_SUBAGENTS=128,WORKFLOW_PROGRAM_BRIDGE_REQUEST_LIMIT=256,WORKFLOW_PROGRAM_CALL_INTERRUPT_KIND=`eve.workflow-program-agent-call`;function parseWorkflowProgramOptions(e){let t=parseJsonObject(e);if(!isPositiveInteger(t.maxSubagents)||t.maxSubagents>128)throw TypeError(`workflow maxSubagents must be an integer between 1 and 128.`);return{maxSubagents:t.maxSubagents}}function readWorkflowProgramCallInterrupt(e){let t=e.payload;if(t.kind!==`eve.workflow-program-agent-call`||t.toolName!==`agent`)throw Error(`Unsupported workflow program interrupt kind "${String(t.kind)}".`);return{kind:WORKFLOW_PROGRAM_CALL_INTERRUPT_KIND,task:void 0,toolInput:t.toolInput,toolName:`agent`}}function readWorkflowProgramAgentCall(e){let t=parseJsonObject(e);if(typeof t.target!=`string`||t.target.trim()===``)throw TypeError(`Workflow program ctx.agent() requires a non-empty agent name.`);let n=parseJsonObject(t.input);if(typeof n.message!=`string`)throw TypeError(`Workflow program ctx.agent() requires a "message" string.`);let r={message:n.message};return n.outputSchema!==void 0&&(r.outputSchema=parseJsonObject(n.outputSchema)),{input:r,target:t.target}}function parseWorkflowProgramOutput(e){return parseJsonValue(e??null)}function isPositiveInteger(e){return typeof e==`number`&&Number.isSafeInteger(e)&&e>0}export{DEFAULT_WORKFLOW_PROGRAM_MAX_SUBAGENTS,MAX_WORKFLOW_PROGRAM_MAX_SUBAGENTS,WORKFLOW_PROGRAM_BRIDGE_REQUEST_LIMIT,WORKFLOW_PROGRAM_CALL_INTERRUPT_KIND,parseWorkflowProgramOptions,parseWorkflowProgramOutput,readWorkflowProgramAgentCall,readWorkflowProgramCallInterrupt};
|
|
@@ -5,4 +5,4 @@ export interface WorkflowProgramToolInput {
|
|
|
5
5
|
readonly maxSubagents?: number;
|
|
6
6
|
}
|
|
7
7
|
/** Static workflow executor used by the provided `workflow` tool. */
|
|
8
|
-
export declare function
|
|
8
|
+
export declare function runWorkflowProgramTask(input: WorkflowProgramToolInput, ctx: WorkflowToolContext): Promise<JsonValue>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{runJsProgram}from"#execution/dynamic-workflow/workflow.js";async function
|
|
1
|
+
import{runJsProgram}from"#execution/dynamic-workflow/workflow.js";async function runWorkflowProgramTask(e,t){"use workflow";return runJsProgram(e.js,t,{maxSubagents:e.maxSubagents??0})}runWorkflowProgramTask.workflowId=`workflow//eve@0.70.0//runWorkflowProgramTask`;export{runWorkflowProgramTask};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{toErrorMessage}from"#shared/errors.js";import{DEFAULT_WORKFLOW_PROGRAM_MAX_SUBAGENTS,MAX_WORKFLOW_PROGRAM_MAX_SUBAGENTS,parseWorkflowProgramOptions,readWorkflowProgramAgentCall,readWorkflowProgramCallInterrupt}from"#execution/dynamic-workflow/schema.js";import{runWorkflowProgramStep}from"#execution/dynamic-workflow/program-step.js";import{createWorkflowProgramContinuationSecurityStep}from"#execution/dynamic-workflow/security-step.js";async function runJsProgram(e,t,n){if(typeof e!=`string`)throw TypeError(`workflow requires a "js" string.`);let r={...parseWorkflowProgramOptions({maxSubagents:n.maxSubagents??DEFAULT_WORKFLOW_PROGRAM_MAX_SUBAGENTS}),continuationSecurity:await createWorkflowProgramContinuationSecurityStep(),js:e},i={callId:t.callId,program:r},a=await runWorkflowProgramStep(i),o=0;for(;a.status===`interrupted`;){t.abortSignal.throwIfAborted();let e=await Promise.all(a.pending.map(async e=>{let n=readWorkflowProgramCallInterrupt(e),i=readWorkflowProgramAgentCall(n.toolInput);if(o++>=r.maxSubagents)return{status:`failed`,error:`WORKFLOW_PROGRAM_SUBAGENT_LIMIT_REACHED: workflow may invoke at most ${String(r.maxSubagents)} agents; "${i.target}" was not called.`};try{return{status:`completed`,output:await t
|
|
1
|
+
import{toErrorMessage}from"#shared/errors.js";import{DEFAULT_WORKFLOW_PROGRAM_MAX_SUBAGENTS,MAX_WORKFLOW_PROGRAM_MAX_SUBAGENTS,parseWorkflowProgramOptions,readWorkflowProgramAgentCall,readWorkflowProgramCallInterrupt}from"#execution/dynamic-workflow/schema.js";import{runWorkflowProgramStep}from"#execution/dynamic-workflow/program-step.js";import{createWorkflowProgramContinuationSecurityStep}from"#execution/dynamic-workflow/security-step.js";async function runJsProgram(e,t,n){if(typeof e!=`string`)throw TypeError(`workflow requires a "js" string.`);let r={...parseWorkflowProgramOptions({maxSubagents:n.maxSubagents??DEFAULT_WORKFLOW_PROGRAM_MAX_SUBAGENTS}),continuationSecurity:await createWorkflowProgramContinuationSecurityStep(),js:e},i={callId:t.callId,program:r},a=await runWorkflowProgramStep(i),o=0;for(;a.status===`interrupted`;){t.abortSignal.throwIfAborted();let e=await Promise.all(a.pending.map(async e=>{let n=readWorkflowProgramCallInterrupt(e),i=readWorkflowProgramAgentCall(n.toolInput);if(o++>=r.maxSubagents)return{status:`failed`,error:`WORKFLOW_PROGRAM_SUBAGENT_LIMIT_REACHED: workflow may invoke at most ${String(r.maxSubagents)} agents; "${i.target}" was not called.`};try{return{status:`completed`,output:await callProgramAgent(t,i)}}catch(e){return t.abortSignal.throwIfAborted(),{status:`failed`,error:toErrorMessage(e)}}}));a=await runWorkflowProgramStep({...i,resume:{interrupt:a.interrupt,resolutions:e}})}return a.output}async function callProgramAgent(e,t){let{message:n,outputSchema:r}=t.input,i=await(await e.agent(t.target).send(n,{outputSchema:r,signal:e.abortSignal})).result();if(i.status===`failed`)throw Error(`Agent "${t.target}" failed to handle the message: ${i.error?.message??`no reason given`}`);return r===void 0?i.message??null:i.data??null}export{MAX_WORKFLOW_PROGRAM_MAX_SUBAGENTS,runJsProgram};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ContextContainer } from "#context/container.js";
|
|
2
|
+
import type { UnstampedMessageStreamEvent } from "#protocol/message.js";
|
|
3
|
+
/** A remote session sends input to its caller instead of presenting it on its own channel. */
|
|
4
|
+
export declare function forwardSessionInput(ctx: ContextContainer, event: UnstampedMessageStreamEvent, inputSource?: string): Promise<boolean>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{sessionCommandHookToken}from"#execution/session-inbox/address.js";import{ContinuationTokenKey,LegacyRemoteAgentCallerKey,SessionCallbackKey,SessionIdKey,SessionInboxKey}from"#context/keys.js";import{forwardLegacySessionInput}from"#execution/legacy-remote-agent/protocol.js";import{postSessionCallbackRequest}from"#execution/session-callback-request.js";async function forwardSessionInput(e,t,n){let r=e.get(SessionCallbackKey);if(r===void 0)return!1;let i=e.get(LegacyRemoteAgentCallerKey);if(i!==void 0)return await forwardLegacySessionInput(e,i,t);if(t.type!==`input.requested`&&t.type!==`authorization.required`&&t.type!==`authorization.completed`&&t.type!==`approval.candidate`&&t.type!==`approval.settled`)return!1;let a=t.type===`input.requested`?{callId:r.callId,childContinuationToken:e.get(ContinuationTokenKey)??sessionCommandHookToken(e.require(SessionIdKey)),childSessionId:e.require(SessionIdKey),childSessionInbox:e.get(SessionInboxKey),event:t.data,inputSource:n??`session`,kind:`subagent-input-request`,subagentName:r.subagentName}:{callId:r.callId,childSessionId:e.require(SessionIdKey),event:t,kind:`subagent-authorization-event`,subagentName:r.subagentName},o=await postSessionCallbackRequest({body:a,url:r.url});if(!o.ok)throw Error(`Remote input callback failed with HTTP ${o.status}.`);return!0}export{forwardSessionInput};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { ContextContainer } from "#context/container.js";
|
|
2
|
+
import type { UnstampedMessageStreamEvent } from "#protocol/message.js";
|
|
3
|
+
import type { RouteContext } from "#public/definitions/channel.js";
|
|
4
|
+
export declare const LEGACY_REMOTE_AGENT_PROTOCOL_VERSION = 1;
|
|
5
|
+
/** A session created by a protocol-1 caller. */
|
|
6
|
+
export interface LegacyRemoteAgentCaller {
|
|
7
|
+
/**
|
|
8
|
+
* The caller's background task; its questions and sign-ins are forwarded
|
|
9
|
+
* only with one. Captured at create: a 0.66–0.68 caller's model-called
|
|
10
|
+
* agents start in a task, and those callers never check it against later turns.
|
|
11
|
+
*/
|
|
12
|
+
readonly taskId?: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Removes the `callback.taskId` a protocol-1 caller adds when it delegates
|
|
16
|
+
* from a background task. Current callers don't send it. The task id is
|
|
17
|
+
* returned so the session can name it back to the caller. The caller's
|
|
18
|
+
* `activityObserver` needs no removal: eve ignores that field from any caller.
|
|
19
|
+
*/
|
|
20
|
+
export declare function splitLegacyTaskFields(input: Record<string, unknown>): {
|
|
21
|
+
readonly payload: Record<string, unknown>;
|
|
22
|
+
readonly taskId?: string;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Sends a question, approval, or sign-in to a protocol-1 caller in the
|
|
26
|
+
* `task.*` callback it expects. Returns whether the event was forwarded and
|
|
27
|
+
* must stay off this session's own channel.
|
|
28
|
+
*/
|
|
29
|
+
export declare function forwardLegacySessionInput(ctx: ContextContainer, caller: LegacyRemoteAgentCaller, event: UnstampedMessageStreamEvent): Promise<boolean>;
|
|
30
|
+
/** Route a protocol-1 caller posts its answers to a remote agent's question or approval. */
|
|
31
|
+
export declare const legacyTaskInputRoute: {
|
|
32
|
+
readonly handler: typeof handleLegacyTaskInputRequest;
|
|
33
|
+
readonly path: "/eve/v1/task-input/:token";
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Delivers a protocol-1 caller's answers. The token is the capability the
|
|
37
|
+
* caller derived from this session's create-once continuation token, so it
|
|
38
|
+
* authorizes the request on its own, as it did in protocol 1.
|
|
39
|
+
*/
|
|
40
|
+
declare function handleLegacyTaskInputRequest(request: Request, ctx: RouteContext): Promise<Response>;
|
|
41
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createLogger,logError}from"#internal/logging.js";import{isObject}from"#shared/guards.js";import{isInputResponse}from"#shared/input.js";import{ContinuationTokenKey,SessionCallbackKey,SessionIdKey}from"#context/keys.js";import{EVE_ROUTE_PREFIX}from"#protocol/routes.js";import{resumeSessionInbox}from"#execution/session-inbox/resume.js";import{postSessionCallbackRequest}from"#execution/session-callback-request.js";import{HookNotFoundError}from"#compiled/@workflow/errors/index.js";const log=createLogger(`execution.legacy-remote-agent`),LEGACY_REMOTE_AGENT_PROTOCOL_VERSION=1,TASK_INPUT_TOKEN_RE=/^eve:task-input:([a-f0-9]{32})$/;function splitLegacyTaskFields(e){let{callback:t}=e;if(!isObject(t)||!(`taskId`in t))return{payload:e};let{taskId:n,...r}=t,i={...e,callback:r};return typeof n==`string`&&n.length>0?{payload:i,taskId:n}:{payload:i}}async function forwardLegacySessionInput(e,t,n){let r=e.get(SessionCallbackKey),i=e.get(ContinuationTokenKey);if(t.taskId===void 0||r===void 0||!i)return!1;let a;if(n.type===`input.requested`)a={event:n.data,kind:`task.input-requested`};else if(n.type===`authorization.required`||n.type===`authorization.completed`)a={event:n,kind:`task.authorization`};else return!1;let o=await postSessionCallbackRequest({body:{callId:r.callId,childContinuationToken:i,childSessionId:e.require(SessionIdKey),event:a.event,kind:a.kind,subagentName:r.subagentName,taskId:t.taskId},url:r.url});if(!o.ok)throw Error(`Remote task event callback failed with HTTP ${o.status}.`);return!0}const legacyTaskInputRoute={handler:handleLegacyTaskInputRequest,path:`${EVE_ROUTE_PREFIX}/task-input/:token`};async function handleLegacyTaskInputRequest(e,t){let n=TASK_INPUT_TOKEN_RE.exec(t.params.token??``)?.[1];if(n===void 0)return Response.json({error:`Invalid task input token.`,ok:!1},{status:403});let r;try{r=await e.json()}catch{return Response.json({error:`Invalid JSON body.`,ok:!1},{status:400})}let i=isObject(r)?r.inputResponses:void 0;if(!Array.isArray(i)||i.length===0||!i.every(isInputResponse))return Response.json({error:`Expected a non-empty inputResponses array.`,ok:!1},{status:400});try{await resumeSessionInbox(`eve:eve:op:${n}`,{kind:`send`,payload:{inputResponses:i}})}catch(e){if(HookNotFoundError.is(e))return Response.json({error:`Task input target is not pending.`,ok:!1},{status:404});let t=logError(log,`legacy task input delivery failed`,e);return Response.json({error:`Failed to deliver the task input.`,errorId:t,ok:!1},{status:500})}return Response.json({ok:!0},{status:202})}export{LEGACY_REMOTE_AGENT_PROTOCOL_VERSION,forwardLegacySessionInput,legacyTaskInputRoute,splitLegacyTaskFields};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{encodeLegacyCommand,resolveLegacyInbox}from"./inbox.js";import{isObject}from"#shared/guards.js";import{
|
|
1
|
+
import{encodeLegacyCommand,resolveLegacyInbox}from"./inbox.js";import{isObject}from"#shared/guards.js";import{HookNotFoundError}from"#compiled/@workflow/errors/index.js";import{resumeHook}from"#internal/workflow/runtime.js";async function resumeAuthorizationCallback(e,t){try{await resumeHook(e,t);return}catch(e){if(!HookNotFoundError.is(e))throw e}let n=await resolveLegacyInbox(e);if(n.current)throw Error(`Authorization was interrupted by the session upgrade. Request authorization again.`);let r=await n.hook.metadata;await resumeHook(n.hook.token,encodeLegacyCommand({kind:`deliver`,payloads:t.payloads},isObject(r)?r.sessionInboxWireVersion:void 0))}async function handleExpiredLegacyAuthorization(){return Response.json({ok:!1,error:`This authorization link predates the session upgrade. Request authorization again.`},{status:410})}export{handleExpiredLegacyAuthorization,resumeAuthorizationCallback};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { DurableSessionState } from "#execution/durable-session-store.js";
|
|
2
|
+
import type { HarnessModelMessage } from "#harness/messages.js";
|
|
2
3
|
import type { WorkflowEntryResult } from "#execution/session/entry-input.js";
|
|
3
4
|
/** The old driver owns final notifications for the dispatch that became this session. */
|
|
4
5
|
export declare function completeLegacyDriverStep(input: {
|
|
5
6
|
readonly completionToken: string;
|
|
7
|
+
readonly history: HarnessModelMessage[];
|
|
6
8
|
readonly result: WorkflowEntryResult;
|
|
7
9
|
readonly serializedContext: Record<string, unknown>;
|
|
8
10
|
readonly sessionState: DurableSessionState;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{HookNotFoundError}from"#compiled/@workflow/errors/index.js";import{resumeHook}from"#internal/workflow/runtime.js";async function completeLegacyDriverStep(e){"use step";let t=e.sessionWritable.getWriter();try{await t.close()}finally{t.releaseLock()}try{await resumeHook(e.completionToken,{kind:`turn-result`,action:{kind:`done`,...e.result,serializedContext:e.serializedContext,sessionState:{...e.sessionState,snapshot:{version:1,session:{...e.sessionState.snapshot.session,history:e.history}}}}})}catch(e){if(!HookNotFoundError.is(e))throw e}}export{completeLegacyDriverStep};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isObject}from"#shared/guards.js";import{sessionCommandHookToken,sessionInboxHookToken}from"#execution/session-inbox/address.js";import{
|
|
1
|
+
import{isObject}from"#shared/guards.js";import{sessionCommandHookToken,sessionInboxHookToken}from"#execution/session-inbox/address.js";import{HookNotFoundError}from"#compiled/@workflow/errors/index.js";import{getHookByToken,resumeHook}from"#internal/workflow/runtime.js";import{coalesceDeliverPayloads}from"#execution/deliver-payloads.js";var UnsupportedLegacySessionError=class extends Error{constructor(){super(`This session predates eve 0.45 and cannot be continued. Start a new session.`),this.name=`UnsupportedLegacySessionError`}};async function resolveLegacyInbox(e){let t=await getHookByToken(e),n=await t.metadata,r=isObject(n)&&typeof n.sessionId==`string`?n.sessionId:t.runId;try{return{hook:await getHookByToken(sessionInboxHookToken(sessionCommandHookToken(r))),sessionId:r,current:!0}}catch(e){if(!HookNotFoundError.is(e))throw e;return{hook:t,sessionId:r,current:!1}}}async function resumeLegacyInbox(e,t){let n=await resolveLegacyInbox(e),r=t;if(!n.current){let e=await n.hook.metadata;r=encodeLegacyCommand(t,isObject(e)?e.sessionInboxWireVersion:void 0)}return{ownerRunId:(await resumeHook(n.hook.token,r)).runId,sessionId:Promise.resolve(n.sessionId)}}function encodeLegacyCommand(e,t){let n=t;if(typeof n!=`number`||!Number.isInteger(n)||n<1||n>7)throw new UnsupportedLegacySessionError;if(e.kind!==`send`&&e.kind!==`deliver`)return{...e,version:n};let r=e.kind===`send`?[e.payload]:e.payloads,i=e.caller,a=e.kind===`send`?e.delivery===void 0?void 0:[{...e.delivery,payloadIndex:0}]:e.deliveryMetadata;return n<3&&a!==void 0&&(a=a.map(({acceptedDeploymentId:e,...t})=>t)),{auth:e.auth,caller:i,deliveryMetadata:a,kind:`deliver`,payload:coalesceDeliverPayloads(r),payloads:r,requestId:e.requestId,turnPolicy:e.turnPolicy,version:n}}export{UnsupportedLegacySessionError,encodeLegacyCommand,resolveLegacyInbox,resumeLegacyInbox};
|