eve 0.68.0 → 0.70.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +132 -0
- package/bin/eve.js +15 -0
- package/dist/src/_virtual/_rolldown/runtime.js +1 -1
- package/dist/src/acp/adapter.js +1 -1
- package/dist/src/approval/definition.d.ts +19 -5
- package/dist/src/channel/adapter.d.ts +2 -0
- package/dist/src/channel/auth/oidc.js +1 -1
- package/dist/src/channel/channel-address.d.ts +1 -4
- package/dist/src/channel/channel-address.js +1 -1
- package/dist/src/channel/channel-operations.d.ts +4 -11
- package/dist/src/channel/channel-operations.js +1 -1
- package/dist/src/channel/compiled-channel.d.ts +0 -2
- package/dist/src/channel/compiled-channel.js +2 -2
- package/dist/src/channel/cross-channel-receive.d.ts +1 -3
- package/dist/src/channel/cross-channel-receive.js +1 -1
- package/dist/src/channel/forwarded-principal.js +1 -1
- package/dist/src/channel/schedule-auth.d.ts +16 -0
- package/dist/src/channel/schedule-auth.js +1 -1
- package/dist/src/channel/session-callback.js +1 -1
- package/dist/src/channel/session.d.ts +3 -8
- package/dist/src/channel/session.js +1 -1
- package/dist/src/channel/task-card.d.ts +121 -0
- package/dist/src/channel/task-card.js +1 -0
- package/dist/src/channel/types.d.ts +30 -57
- package/dist/src/chunks/{use-eve-agent-D4HVZBjn.js → use-eve-agent-CJQeE7-t.js} +2058 -1331
- package/dist/src/chunks/{use-eve-agent-DXcE_8Ja.js → use-eve-agent-DdemtY6C.js} +2061 -1331
- package/dist/src/cli/commands/info.d.ts +11 -0
- package/dist/src/cli/commands/info.js +1 -1
- package/dist/src/cli/commands/init-agent-workspace.js +1 -1
- package/dist/src/cli/commands/init.js +1 -1
- package/dist/src/cli/dev/command-options.d.ts +2 -2
- package/dist/src/cli/dev/command.js +1 -1
- package/dist/src/cli/dev/console-records-preload.d.ts +1 -0
- package/dist/src/cli/dev/console-records-preload.js +1 -0
- package/dist/src/cli/dev/console-records.d.ts +17 -0
- package/dist/src/cli/dev/console-records.js +3 -0
- package/dist/src/cli/dev/diagnostic-sink.d.ts +1 -0
- package/dist/src/cli/dev/local-server-process.js +1 -1
- package/dist/src/cli/dev/tui/blocks.d.ts +21 -19
- package/dist/src/cli/dev/tui/blocks.js +4 -4
- package/dist/src/cli/dev/tui/command-typeahead.d.ts +3 -6
- package/dist/src/cli/dev/tui/conversation-view.d.ts +54 -0
- package/dist/src/cli/dev/tui/conversation-view.js +1 -0
- package/dist/src/cli/dev/tui/diagnostic-presentation.d.ts +10 -0
- package/dist/src/cli/dev/tui/diagnostic-presentation.js +3 -2
- package/dist/src/cli/dev/tui/flow-drawer.d.ts +5 -2
- package/dist/src/cli/dev/tui/flow-drawer.js +1 -1
- package/dist/src/cli/dev/tui/log-display-mode.d.ts +4 -10
- package/dist/src/cli/dev/tui/log-display-mode.js +1 -1
- package/dist/src/cli/dev/tui/message-queue.d.ts +7 -63
- package/dist/src/cli/dev/tui/message-queue.js +3 -1
- package/dist/src/cli/dev/tui/prompt-commands.js +1 -1
- package/dist/src/cli/dev/tui/prompt-placeholder.d.ts +2 -0
- package/dist/src/cli/dev/tui/prompt-placeholder.js +1 -0
- package/dist/src/cli/dev/tui/question-panel.d.ts +3 -1
- package/dist/src/cli/dev/tui/question-panel.js +1 -1
- package/dist/src/cli/dev/tui/rail.d.ts +1 -1
- package/dist/src/cli/dev/tui/runner.d.ts +60 -174
- package/dist/src/cli/dev/tui/runner.js +3 -3
- package/dist/src/cli/dev/tui/status-line.d.ts +4 -2
- package/dist/src/cli/dev/tui/status-line.js +1 -1
- package/dist/src/cli/dev/tui/task-activity.d.ts +59 -0
- package/dist/src/cli/dev/tui/task-activity.js +1 -0
- package/dist/src/cli/dev/tui/terminal-renderer.d.ts +18 -57
- package/dist/src/cli/dev/tui/terminal-renderer.js +10 -13
- package/dist/src/cli/dev/tui/terminal-tool-part.d.ts +2 -0
- package/dist/src/cli/dev/tui/terminal-tool-part.js +1 -0
- package/dist/src/cli/dev/tui/test/fake-eve-server.d.ts +34 -0
- package/dist/src/cli/dev/tui/test/fake-eve-server.js +1 -0
- package/dist/src/cli/dev/tui/test/index.d.ts +1 -0
- package/dist/src/cli/dev/tui/test/index.js +1 -1
- package/dist/src/cli/dev/tui/theme.d.ts +1 -1
- package/dist/src/cli/dev/tui/theme.js +1 -1
- package/dist/src/cli/dev/tui/tool-block-groups.d.ts +6 -9
- package/dist/src/cli/dev/tui/tool-block-groups.js +1 -1
- package/dist/src/cli/dev/tui/tool-presentation.d.ts +17 -3
- package/dist/src/cli/dev/tui/tool-presentation.js +1 -1
- package/dist/src/cli/dev/tui/tool-rows.d.ts +1 -0
- package/dist/src/cli/dev/tui/tool-rows.js +2 -2
- package/dist/src/cli/dev/tui/traces/trace-conversation.js +3 -1
- package/dist/src/cli/dev/tui/traces/trace-view.js +1 -1
- package/dist/src/cli/dev/tui/transcript-parts.d.ts +73 -0
- package/dist/src/cli/dev/tui/transcript-parts.js +3 -0
- package/dist/src/cli/dev/tui/transcript.d.ts +47 -0
- package/dist/src/cli/dev/tui/transcript.js +1 -0
- package/dist/src/cli/dev/tui/tui.js +1 -1
- package/dist/src/cli/dev/tui/turn-clock.d.ts +11 -26
- package/dist/src/cli/dev/tui/turn-clock.js +1 -1
- package/dist/src/cli/dev/tui/types.d.ts +13 -9
- package/dist/src/cli/dev/ui-options.d.ts +2 -2
- package/dist/src/cli/dev/ui-options.js +1 -1
- package/dist/src/cli/option-parsers.d.ts +3 -1
- package/dist/src/cli/option-parsers.js +1 -1
- package/dist/src/cli/ui/terminal-text.js +1 -1
- package/dist/src/client/agent-info-schema.d.ts +150 -9
- package/dist/src/client/agent-info-schema.js +1 -1
- package/dist/src/client/agent-session.d.ts +28 -0
- package/dist/src/client/agent-session.js +1 -0
- package/dist/src/client/agent-stream-follower.d.ts +26 -0
- package/dist/src/client/agent-stream-follower.js +1 -0
- package/dist/src/client/authorization-message-parts.js +1 -1
- package/dist/src/client/conversation-client.d.ts +40 -0
- package/dist/src/client/conversation-client.js +1 -0
- package/dist/src/client/conversation-reducer.d.ts +29 -0
- package/dist/src/client/conversation-reducer.js +1 -0
- package/dist/src/client/conversation-state.d.ts +110 -0
- package/dist/src/client/conversation-state.js +1 -0
- package/dist/src/client/eve-agent-projection.d.ts +24 -7
- package/dist/src/client/eve-agent-projection.js +1 -1
- package/dist/src/client/eve-agent-store-helpers.d.ts +20 -1
- package/dist/src/client/eve-agent-store-helpers.js +2 -2
- package/dist/src/client/eve-agent-store-state.d.ts +15 -3
- package/dist/src/client/eve-agent-store.d.ts +10 -1
- package/dist/src/client/eve-agent-store.js +1 -1
- package/dist/src/client/index.d.ts +5 -1
- package/dist/src/client/index.js +1 -1
- package/dist/src/client/message-action-parts.js +1 -1
- package/dist/src/client/message-reducer-primitives.d.ts +1 -2
- package/dist/src/client/message-reducer-primitives.js +1 -1
- package/dist/src/client/message-reducer-types.d.ts +9 -2
- package/dist/src/client/message-reducer.js +1 -1
- package/dist/src/client/message-response.js +1 -1
- package/dist/src/client/message-run-parts.d.ts +10 -6
- package/dist/src/client/message-run-parts.js +1 -1
- package/dist/src/client/message-task-parts.d.ts +8 -0
- package/dist/src/client/message-task-parts.js +1 -0
- package/dist/src/client/optimistic-message-submissions.d.ts +6 -4
- package/dist/src/client/optimistic-message-submissions.js +1 -1
- package/dist/src/client/reducer.d.ts +5 -1
- package/dist/src/client/session-controls.d.ts +0 -1
- package/dist/src/client/session-turn-dispatch.d.ts +15 -0
- package/dist/src/client/session-turn-dispatch.js +1 -0
- package/dist/src/client/session-utils.d.ts +29 -2
- package/dist/src/client/session-utils.js +1 -1
- package/dist/src/client/session.d.ts +8 -16
- package/dist/src/client/session.js +1 -1
- package/dist/src/client/stream-version.js +1 -1
- package/dist/src/client/types.d.ts +4 -5
- package/dist/src/compiled/.vendor-stamp.json +3 -2
- package/dist/src/compiled/@eve/catalog/index.js +1 -1
- package/dist/src/compiled/@vercel/connect/LICENSE +202 -0
- package/dist/src/compiled/@vercel/connect/authorization-details.d.ts +11 -0
- package/dist/src/compiled/@vercel/connect/authorization.d.ts +47 -0
- package/dist/src/compiled/@vercel/connect/connector.d.ts +32 -0
- package/dist/src/compiled/@vercel/connect/index.d.ts +5 -0
- package/dist/src/compiled/@vercel/connect/index.js +26 -0
- package/dist/src/compiled/@vercel/connect/installation.d.ts +48 -0
- package/dist/src/compiled/@vercel/connect/token.d.ts +137 -0
- package/dist/src/compiled/@workflow/core/runtime.js +3 -3
- package/dist/src/compiler/bundled-extension.d.ts +7 -1
- package/dist/src/compiler/bundled-extension.js +1 -1
- package/dist/src/compiler/default-tool-policy.d.ts +2 -2
- package/dist/src/compiler/default-tool-policy.js +1 -1
- package/dist/src/compiler/development-extensions.js +1 -1
- package/dist/src/compiler/extension-compatibility.d.ts +54 -18
- package/dist/src/compiler/extension-compatibility.js +1 -1
- package/dist/src/compiler/extension-mount-bindings.d.ts +5 -0
- package/dist/src/compiler/extension-mount-bindings.js +1 -0
- package/dist/src/compiler/load-binding-namespace.d.ts +10 -2
- package/dist/src/compiler/load-binding-namespace.js +1 -1
- package/dist/src/compiler/manifest.d.ts +19 -17
- package/dist/src/compiler/manifest.js +1 -1
- package/dist/src/compiler/module-lifecycle.d.ts +2 -2
- package/dist/src/compiler/module-lifecycle.js +1 -1
- package/dist/src/compiler/module-map.d.ts +1 -1
- package/dist/src/compiler/module-map.js +3 -3
- package/dist/src/compiler/normalize-manifest-helpers.d.ts +18 -1
- package/dist/src/compiler/normalize-manifest-helpers.js +1 -1
- package/dist/src/compiler/normalize-manifest-types.d.ts +2 -0
- package/dist/src/compiler/normalize-manifest.js +1 -1
- package/dist/src/compiler/normalize-subagent.js +1 -1
- package/dist/src/compiler/normalize-tool.js +1 -1
- package/dist/src/compiler/project-sources.d.ts +4 -0
- package/dist/src/compiler/project-sources.js +1 -1
- package/dist/src/compiler/remote-agent-node.js +1 -1
- package/dist/src/compiler/source-graph.d.ts +5 -0
- package/dist/src/compiler/source-graph.js +1 -1
- package/dist/src/computer-use/extension/lib/computer-use-sandbox.d.ts +8 -0
- package/dist/src/computer-use/extension/lib/computer-use-sandbox.js +3 -3
- package/dist/src/computer-use/extension/lib/computer-use.d.ts +2 -0
- package/dist/src/computer-use/extension/lib/computer-use.js +2 -1
- package/dist/src/computer-use/extension/tools/computer_use.js +1 -1
- package/dist/src/context/build-dynamic-tools.js +1 -1
- package/dist/src/context/dynamic-subagent-lifecycle.d.ts +5 -0
- package/dist/src/context/dynamic-subagent-lifecycle.js +1 -1
- package/dist/src/context/dynamic-tool-lifecycle.js +1 -1
- package/dist/src/context/dynamic-tool-metadata.d.ts +1 -1
- package/dist/src/context/key-names.d.ts +0 -1
- package/dist/src/context/key-names.js +1 -1
- package/dist/src/context/keys.d.ts +12 -15
- package/dist/src/context/keys.js +1 -1
- package/dist/src/context/memory-lifecycle.js +1 -1
- package/dist/src/context/memory-tools.d.ts +0 -1
- package/dist/src/context/provider.d.ts +5 -11
- package/dist/src/context/run-step.d.ts +5 -6
- package/dist/src/context/run-step.js +1 -1
- package/dist/src/context/serialize.js +1 -1
- package/dist/src/discover/bundled-extension.js +1 -1
- package/dist/src/discover/discover-agent.js +1 -1
- package/dist/src/discover/extensions.d.ts +0 -7
- package/dist/src/discover/extensions.js +1 -1
- package/dist/src/discover/manifest.d.ts +4 -0
- package/dist/src/evals/assertions/run.d.ts +4 -3
- package/dist/src/evals/assertions/run.js +1 -1
- package/dist/src/evals/index.d.ts +1 -1
- package/dist/src/evals/match.d.ts +4 -4
- package/dist/src/evals/mock-model.js +1 -1
- package/dist/src/evals/runner/derive-run-facts.d.ts +3 -3
- package/dist/src/evals/runner/derive-run-facts.js +1 -1
- package/dist/src/evals/runner/execute-task.js +1 -1
- package/dist/src/evals/runner/reporters/assertion-scores.d.ts +19 -0
- package/dist/src/evals/runner/reporters/assertion-scores.js +1 -0
- package/dist/src/evals/runner/reporters/braintrust.js +1 -1
- package/dist/src/evals/runner/reporters/datadog-client.d.ts +123 -0
- package/dist/src/evals/runner/reporters/datadog-client.js +4 -0
- package/dist/src/evals/runner/reporters/datadog.d.ts +9 -98
- package/dist/src/evals/runner/reporters/datadog.js +2 -3
- package/dist/src/evals/session-content.js +1 -1
- package/dist/src/evals/session.d.ts +4 -4
- package/dist/src/evals/session.js +2 -2
- package/dist/src/evals/types.d.ts +34 -15
- package/dist/src/eve-channel/create-request.d.ts +5 -4
- package/dist/src/eve-channel/create-request.js +1 -1
- package/dist/src/eve-channel/index.d.ts +0 -9
- package/dist/src/eve-channel/index.js +1 -1
- package/dist/src/eve-channel/request.d.ts +3 -7
- package/dist/src/eve-channel/request.js +1 -1
- package/dist/src/eve-channel/support.d.ts +15 -5
- package/dist/src/eve-channel/support.js +1 -1
- package/dist/src/eve-channel/turn-policy-request.d.ts +2 -0
- package/dist/src/eve-channel/turn-policy-request.js +1 -0
- package/dist/src/eve-channel/types.d.ts +4 -0
- package/dist/src/execution/agent-sessions/context.d.ts +62 -0
- package/dist/src/execution/agent-sessions/context.js +1 -0
- package/dist/src/{subagents/remote-dispatch.d.ts → execution/agent-sessions/remote.d.ts} +17 -40
- package/dist/src/execution/agent-sessions/remote.js +1 -0
- package/dist/src/execution/agent-sessions/requests.d.ts +20 -0
- package/dist/src/execution/agent-sessions/requests.js +1 -0
- package/dist/src/execution/agent-sessions/session.d.ts +12 -0
- package/dist/src/execution/agent-sessions/session.js +1 -0
- package/dist/src/execution/agent-sessions/steps.d.ts +59 -0
- package/dist/src/execution/agent-sessions/steps.js +1 -0
- package/dist/src/execution/agent-sessions/target.d.ts +45 -0
- package/dist/src/execution/agent-sessions/target.js +1 -0
- package/dist/src/execution/agent-sessions/usage.d.ts +18 -0
- package/dist/src/execution/agent-sessions/usage.js +1 -0
- package/dist/src/execution/authorization-callback-match.d.ts +2 -4
- package/dist/src/execution/authorization-callback-match.js +1 -1
- package/dist/src/execution/cancel-descendant-turns-step.d.ts +1 -5
- package/dist/src/execution/cancel-descendant-turns-step.js +1 -1
- package/dist/src/execution/cancelled-model-call-batch.js +1 -1
- package/dist/src/execution/connection-announcement.d.ts +7 -0
- package/dist/src/execution/connection-announcement.js +4 -0
- package/dist/src/execution/continuation-conflict-step.d.ts +2 -3
- package/dist/src/execution/continuation-conflict-step.js +1 -1
- package/dist/src/execution/coordination-dispatch-shared.d.ts +12 -28
- package/dist/src/execution/coordination-dispatch-shared.js +1 -1
- package/dist/src/execution/coordination-dispatch-step.d.ts +3 -2
- package/dist/src/execution/coordination-dispatch-step.js +1 -1
- package/dist/src/execution/create-session-step.d.ts +4 -3
- package/dist/src/execution/create-session-step.js +1 -1
- package/dist/src/execution/deliver-payloads.js +1 -1
- package/dist/src/execution/durable-session-store.d.ts +10 -5
- package/dist/src/execution/durable-session-store.js +1 -1
- package/dist/src/execution/dynamic-connections.js +1 -1
- package/dist/src/execution/dynamic-workflow/program-step.js +1 -1
- package/dist/src/execution/dynamic-workflow/schema.d.ts +1 -3
- package/dist/src/execution/dynamic-workflow/schema.js +1 -1
- package/dist/src/execution/dynamic-workflow/tool.d.ts +1 -1
- package/dist/src/execution/dynamic-workflow/tool.js +1 -1
- package/dist/src/execution/dynamic-workflow/workflow.js +1 -1
- package/dist/src/execution/forward-session-input.d.ts +4 -0
- package/dist/src/execution/forward-session-input.js +1 -0
- package/dist/src/execution/legacy-remote-agent/protocol.d.ts +41 -0
- package/dist/src/execution/legacy-remote-agent/protocol.js +1 -0
- package/dist/src/execution/legacy-session/authorization.js +1 -1
- package/dist/src/execution/legacy-session/completion-step.d.ts +2 -0
- package/dist/src/execution/legacy-session/completion-step.js +1 -1
- package/dist/src/execution/legacy-session/inbox.js +1 -1
- package/dist/src/execution/legacy-session/input.js +1 -1
- package/dist/src/execution/legacy-session/interrupt-step.js +1 -1
- package/dist/src/execution/legacy-session/prepare-step.d.ts +1 -0
- package/dist/src/execution/legacy-session/prepare-step.js +1 -1
- package/dist/src/execution/legacy-session/snapshot.d.ts +8 -4
- package/dist/src/execution/legacy-session/snapshot.js +1 -1
- package/dist/src/execution/legacy-session/turn-workflow.js +1 -1
- package/dist/src/execution/model-call-batching.js +1 -1
- package/dist/src/execution/node-step.d.ts +1 -1
- package/dist/src/execution/node-step.js +1 -1
- package/dist/src/execution/proxied-deliver-step.d.ts +9 -6
- package/dist/src/execution/proxied-deliver-step.js +1 -1
- package/dist/src/execution/publish-session-events.d.ts +150 -0
- package/dist/src/execution/publish-session-events.js +1 -0
- package/dist/src/execution/reconcile-session-continuation-token.d.ts +2 -2
- package/dist/src/execution/route-child-delivery.d.ts +5 -4
- package/dist/src/execution/route-child-delivery.js +1 -3
- package/dist/src/execution/runtime-context.js +1 -1
- package/dist/src/execution/sandbox/prewarm.js +1 -1
- package/dist/src/execution/session/active-turn.d.ts +97 -0
- package/dist/src/execution/session/active-turn.js +1 -0
- package/dist/src/execution/session/admission.d.ts +1 -12
- package/dist/src/execution/session/admission.js +1 -1
- package/dist/src/execution/session/entry-input.d.ts +0 -2
- package/dist/src/execution/session/entry.js +1 -1
- package/dist/src/execution/session/finalization.js +1 -1
- package/dist/src/execution/session/handoff-steps.d.ts +13 -2
- package/dist/src/execution/session/handoff-steps.js +1 -1
- package/dist/src/execution/session/handoff.d.ts +21 -5
- package/dist/src/execution/session/handoff.js +1 -1
- package/dist/src/execution/session/input-queue.d.ts +44 -39
- package/dist/src/execution/session/input-queue.js +1 -1
- package/dist/src/execution/session/next-input.d.ts +7 -10
- package/dist/src/execution/session/next-input.js +1 -1
- package/dist/src/execution/session/pending-turn-state.d.ts +2 -0
- package/dist/src/execution/session/pending-turn-state.js +1 -1
- package/dist/src/execution/session/principal.d.ts +14 -0
- package/dist/src/execution/session/principal.js +1 -0
- package/dist/src/execution/session/program.d.ts +2 -0
- package/dist/src/execution/session/program.js +1 -1
- package/dist/src/execution/session/route-selected-delivery.js +1 -1
- package/dist/src/execution/session/state-cursor.d.ts +26 -18
- package/dist/src/execution/session/state-cursor.js +1 -1
- package/dist/src/execution/session/state-delta.d.ts +40 -0
- package/dist/src/execution/session/state-delta.js +1 -0
- package/dist/src/execution/session/timeout-steps.js +1 -1
- package/dist/src/execution/session/turn-event-handler.d.ts +2 -2
- package/dist/src/execution/session/turn-event-handler.js +1 -1
- package/dist/src/execution/session/turn-step-result.d.ts +1 -3
- package/dist/src/execution/session/turn-step-result.js +1 -1
- package/dist/src/execution/session/turn-step-types.d.ts +37 -19
- package/dist/src/execution/session/turn-step.d.ts +2 -2
- package/dist/src/execution/session/turn-step.js +1 -1
- package/dist/src/execution/session/turn-waiting-step.d.ts +4 -0
- package/dist/src/execution/session/turn-waiting-step.js +1 -0
- package/dist/src/execution/session/turn.d.ts +41 -3
- package/dist/src/execution/session/turn.js +1 -1
- package/dist/src/execution/session-callback-request.js +1 -1
- package/dist/src/execution/session-event-stream.d.ts +33 -0
- package/dist/src/execution/session-event-stream.js +1 -0
- package/dist/src/execution/session-inbox/inbox.d.ts +2 -0
- package/dist/src/execution/session-inbox/inbox.js +1 -1
- package/dist/src/execution/session-inbox/protocol.js +1 -1
- package/dist/src/execution/session-inbox/release-step.js +1 -1
- package/dist/src/execution/session-inbox/resume.js +1 -1
- package/dist/src/execution/session-workflow-tool-run.d.ts +11 -2
- package/dist/src/execution/session-workflow-tool-run.js +1 -1
- package/dist/src/execution/session.d.ts +5 -6
- package/dist/src/execution/session.js +2 -2
- package/dist/src/execution/settle-cancelled-turn-step.d.ts +23 -10
- package/dist/src/execution/settle-cancelled-turn-step.js +1 -1
- package/dist/src/execution/stable-workflow-names.d.ts +0 -1
- package/dist/src/execution/stable-workflow-names.js +1 -1
- package/dist/src/execution/tasks/calls.d.ts +42 -0
- package/dist/src/execution/tasks/calls.js +1 -0
- package/dist/src/execution/tasks/model-step.d.ts +58 -0
- package/dist/src/execution/tasks/model-step.js +1 -0
- package/dist/src/execution/tasks/render.d.ts +66 -0
- package/dist/src/execution/tasks/render.js +8 -0
- package/dist/src/execution/tasks/session.d.ts +19 -0
- package/dist/src/execution/tasks/session.js +1 -0
- package/dist/src/execution/tasks/start.d.ts +34 -0
- package/dist/src/execution/tasks/start.js +1 -0
- package/dist/src/execution/tasks/steps.d.ts +31 -0
- package/dist/src/execution/tasks/steps.js +1 -0
- package/dist/src/execution/tasks/table.d.ts +192 -0
- package/dist/src/execution/tasks/table.js +1 -0
- package/dist/src/execution/tasks/task-id-input.d.ts +19 -0
- package/dist/src/execution/tasks/task-id-input.js +1 -0
- package/dist/src/execution/tasks/tool-entry-point.d.ts +11 -0
- package/dist/src/execution/tasks/tool-entry-point.js +1 -0
- package/dist/src/execution/tasks/workflow-target.d.ts +2 -0
- package/dist/src/execution/tasks/workflow-target.js +1 -1
- package/dist/src/execution/terminal-session-completion-step.d.ts +2 -0
- package/dist/src/execution/terminal-session-completion-step.js +1 -1
- package/dist/src/execution/terminal-session-failure-step.d.ts +2 -0
- package/dist/src/execution/terminal-session-failure-step.js +1 -1
- package/dist/src/execution/terminate-child-sessions-step.d.ts +2 -9
- package/dist/src/execution/terminate-child-sessions-step.js +1 -1
- package/dist/src/execution/tool-auth.js +1 -1
- package/dist/src/execution/tools/agent-router-workflow.d.ts +1 -1
- package/dist/src/execution/tools/agent-router-workflow.js +1 -1
- package/dist/src/execution/tools/agent-router.d.ts +1 -1
- package/dist/src/execution/tools/agent-router.js +1 -1
- package/dist/src/execution/tools/connection-approval.d.ts +25 -0
- package/dist/src/execution/tools/connection-approval.js +1 -0
- package/dist/src/execution/tools/connection-search-rank.d.ts +21 -0
- package/dist/src/execution/tools/connection-search-rank.js +1 -0
- package/dist/src/execution/tools/connection-target.d.ts +18 -0
- package/dist/src/execution/tools/connection-target.js +1 -0
- package/dist/src/execution/tools/connection-tools.d.ts +10 -0
- package/dist/src/execution/tools/connection-tools.js +2 -0
- package/dist/src/execution/tools/load-skill.js +1 -1
- package/dist/src/execution/tools/workflow/answer.d.ts +7 -4
- package/dist/src/execution/tools/workflow/answer.js +1 -1
- package/dist/src/execution/tools/workflow/ask.d.ts +73 -10
- package/dist/src/execution/tools/workflow/ask.js +1 -1
- package/dist/src/execution/tools/workflow/body.d.ts +60 -19
- package/dist/src/execution/tools/workflow/body.js +1 -1
- package/dist/src/execution/tools/workflow/cancel.d.ts +7 -2
- package/dist/src/execution/tools/workflow/cancel.js +1 -1
- package/dist/src/execution/tools/workflow/emit-workflow-tool-run-report-step.d.ts +10 -4
- package/dist/src/execution/tools/workflow/emit-workflow-tool-run-report-step.js +1 -1
- package/dist/src/execution/tools/workflow/{background.d.ts → harness-definition.d.ts} +6 -6
- package/dist/src/execution/tools/workflow/harness-definition.js +1 -0
- package/dist/src/execution/tools/workflow/interrupt.d.ts +6 -0
- package/dist/src/execution/tools/workflow/interrupt.js +1 -0
- package/dist/src/execution/tools/workflow/messages.d.ts +135 -10
- package/dist/src/execution/tools/workflow/messages.js +1 -1
- package/dist/src/execution/tools/workflow/owner-inbox.js +1 -1
- package/dist/src/execution/tools/workflow/owner.d.ts +15 -4
- package/dist/src/execution/tools/workflow/owner.js +1 -1
- package/dist/src/execution/tools/workflow/serve.d.ts +3 -0
- package/dist/src/execution/tools/workflow/serve.js +1 -0
- package/dist/src/execution/tools/workflow/start.d.ts +18 -11
- package/dist/src/execution/tools/workflow/start.js +1 -1
- package/dist/src/execution/tools/workflow/step-execution.js +1 -1
- package/dist/src/execution/tools/workflow/step.js +1 -1
- package/dist/src/execution/tools/workflow/types.d.ts +0 -10
- package/dist/src/execution/tools/workflow/withdraw-step.d.ts +31 -0
- package/dist/src/execution/tools/workflow/withdraw-step.js +1 -0
- package/dist/src/execution/tools/workflow/workflow-owner-blocking.d.ts +3 -5
- package/dist/src/execution/tools/workflow/workflow-owner-blocking.js +1 -1
- package/dist/src/execution/tools/workflow/workflow.d.ts +3 -3
- package/dist/src/execution/tools/workflow/workflow.js +1 -1
- package/dist/src/execution/web-fetch/request.js +1 -1
- package/dist/src/execution/workflow-callback-url.d.ts +0 -5
- package/dist/src/execution/workflow-callback-url.js +1 -1
- package/dist/src/execution/workflow-runtime.d.ts +3 -5
- package/dist/src/execution/workflow-runtime.js +1 -1
- package/dist/src/execution/workflow-webhook-route.js +1 -1
- package/dist/src/extensions/code/extension/lib/connect-authentication.js +1 -1
- package/dist/src/extensions/code/extension/lib/github-shell.js +1 -1
- package/dist/src/extensions/code/extension/lib/prwatch-github.js +1 -1
- package/dist/src/framework/sources/modules/agent.d.ts +1 -0
- package/dist/src/framework/sources/modules/agent.js +1 -1
- package/dist/src/framework/sources/registry.js +1 -1
- package/dist/src/harness/action-presentation.js +1 -1
- package/dist/src/harness/action-result-helpers.d.ts +1 -0
- package/dist/src/harness/action-result-helpers.js +1 -1
- package/dist/src/harness/advertised-tools.d.ts +1 -1
- package/dist/src/harness/advertised-tools.js +1 -1
- package/dist/src/harness/announcements.d.ts +22 -0
- package/dist/src/harness/announcements.js +1 -0
- package/dist/src/harness/approval-candidates.d.ts +10 -2
- package/dist/src/harness/approval-candidates.js +1 -1
- package/dist/src/harness/approval-delivery-coordinator.d.ts +4 -5
- package/dist/src/harness/approval-delivery-coordinator.js +1 -1
- package/dist/src/harness/approval-recheck.d.ts +7 -0
- package/dist/src/harness/approval-recheck.js +1 -0
- package/dist/src/harness/authorization-event-fields.d.ts +13 -0
- package/dist/src/harness/authorization-event-fields.js +1 -0
- package/dist/src/harness/authorization.d.ts +17 -3
- package/dist/src/harness/authorization.js +1 -1
- package/dist/src/harness/cancelled-turn-emission.d.ts +2 -1
- package/dist/src/harness/cancelled-turn-emission.js +1 -1
- package/dist/src/harness/coordination.d.ts +36 -30
- package/dist/src/harness/coordination.js +1 -1
- package/dist/src/harness/current-messages.d.ts +6 -1
- package/dist/src/harness/current-messages.js +1 -1
- package/dist/src/harness/emission.d.ts +11 -2
- package/dist/src/harness/emission.js +1 -1
- package/dist/src/harness/execute-tool.d.ts +4 -15
- package/dist/src/harness/held-requests.d.ts +18 -0
- package/dist/src/harness/held-requests.js +1 -0
- package/dist/src/harness/hitl/approval-input-requests.d.ts +16 -0
- package/dist/src/harness/hitl/approval-input-requests.js +1 -1
- package/dist/src/harness/hitl/session-limit-input-requests.d.ts +2 -0
- package/dist/src/harness/hitl/session-limit-input-requests.js +1 -1
- package/dist/src/harness/input-extraction.js +1 -1
- package/dist/src/harness/input-request-resolution.d.ts +5 -2
- package/dist/src/harness/input-request-resolution.js +1 -1
- package/dist/src/harness/input-requests.d.ts +0 -4
- package/dist/src/harness/input-requests.js +1 -1
- package/dist/src/harness/messages.d.ts +11 -3
- package/dist/src/harness/messages.js +1 -1
- package/dist/src/harness/model-call-error.js +1 -1
- package/dist/src/harness/nested-actions.d.ts +23 -0
- package/dist/src/harness/nested-actions.js +1 -0
- package/dist/src/harness/pending-input-batches.d.ts +8 -6
- package/dist/src/harness/pending-input-batches.js +1 -1
- package/dist/src/harness/provider-tool-history.d.ts +7 -2
- package/dist/src/harness/provider-tool-history.js +1 -1
- package/dist/src/harness/proxy-input-requests.d.ts +45 -40
- package/dist/src/harness/proxy-input-requests.js +1 -1
- package/dist/src/harness/session-limit-enforcement.js +1 -1
- package/dist/src/harness/stale-input-responses.js +1 -1
- package/dist/src/harness/step-hooks.js +1 -1
- package/dist/src/harness/tool-loop.js +2 -2
- package/dist/src/harness/tool-model-output.js +1 -1
- package/dist/src/harness/tool-presentation.js +1 -1
- package/dist/src/harness/tools.d.ts +1 -5
- package/dist/src/harness/tools.js +1 -1
- package/dist/src/harness/turn-tag-state.d.ts +8 -5
- package/dist/src/harness/turn-tag-state.js +1 -1
- package/dist/src/harness/types.d.ts +25 -21
- package/dist/src/harness/workflow-dispatch.d.ts +30 -0
- package/dist/src/harness/workflow-dispatch.js +1 -0
- package/dist/src/harness/workflow-tool-runs.d.ts +5 -65
- package/dist/src/harness/workflow-tool-runs.js +1 -1
- package/dist/src/instrumentation/channel-delivery.d.ts +1 -0
- package/dist/src/instrumentation/channel-delivery.js +1 -1
- package/dist/src/instrumentation/lifecycle.d.ts +7 -0
- package/dist/src/instrumentation/memory.d.ts +2 -0
- package/dist/src/instrumentation/memory.js +1 -1
- package/dist/src/instrumentation/native-events.d.ts +1 -7
- package/dist/src/instrumentation/native-events.js +1 -1
- package/dist/src/instrumentation/runtime.d.ts +5 -7
- package/dist/src/instrumentation/runtime.js +1 -1
- package/dist/src/instrumentation/session-init.js +1 -1
- package/dist/src/instrumentation/state.d.ts +0 -6
- package/dist/src/instrumentation/state.js +1 -1
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/internal/authored-definition/schema-backed.d.ts +10 -0
- package/dist/src/internal/authored-definition/schema-backed.js +1 -1
- package/dist/src/internal/authored-module-loader.d.ts +20 -6
- package/dist/src/internal/authored-module-loader.js +2 -2
- package/dist/src/internal/authored-module-map-loader.js +1 -1
- package/dist/src/internal/authored-package-boundary.d.ts +3 -0
- package/dist/src/internal/authored-package-boundary.js +1 -1
- package/dist/src/internal/bundler/extension-mount-plugin.d.ts +14 -0
- package/dist/src/internal/bundler/extension-mount-plugin.js +1 -0
- package/dist/src/internal/bundler/extension-scope-plugin.d.ts +8 -11
- package/dist/src/internal/bundler/extension-scope-plugin.js +2 -3
- package/dist/src/internal/invocation/workflow-execution.d.ts +2 -2
- package/dist/src/internal/invocation/workflow-execution.js +1 -1
- package/dist/src/internal/mount-state.d.ts +1 -0
- package/dist/src/internal/mount-state.js +1 -0
- package/dist/src/internal/nitro/host/build-application.js +1 -1
- package/dist/src/internal/nitro/host/create-application-nitro.js +1 -1
- package/dist/src/internal/nitro/host/dev-host-fingerprint.js +1 -1
- package/dist/src/internal/nitro/host/extension-capability-requirements.js +1 -1
- package/dist/src/internal/nitro/host/workspace-extensions.js +1 -1
- package/dist/src/internal/nitro/routes/runtime-stack.js +1 -1
- package/dist/src/internal/node-esm-compat-banner.js +1 -1
- package/dist/src/internal/workflow/development-world-client.js +1 -1
- package/dist/src/internal/workflow-bundle/authored-workflow-directives.d.ts +4 -3
- package/dist/src/internal/workflow-bundle/authored-workflow-directives.js +1 -1
- package/dist/src/internal/workflow-bundle/builder.js +1 -1
- package/dist/src/internal/workflow-bundle/dynamic-capability-transform-plugin.js +1 -1
- package/dist/src/internal/workflow-bundle/dynamic-remote-agent-transform.js +1 -1
- package/dist/src/internal/workflow-bundle/dynamic-tool-ast-references.d.ts +27 -1
- package/dist/src/internal/workflow-bundle/dynamic-tool-ast-references.js +1 -1
- package/dist/src/internal/workflow-bundle/dynamic-tool-transform.js +2 -2
- package/dist/src/internal/workflow-bundle/workflow-builders.js +1 -1
- package/dist/src/models/auto.d.ts +6 -0
- package/dist/src/models/auto.js +2 -2
- package/dist/src/protocol/message-version.d.ts +1 -0
- package/dist/src/protocol/message-version.js +1 -1
- package/dist/src/protocol/message.d.ts +166 -69
- package/dist/src/protocol/message.js +2 -2
- package/dist/src/protocol/remote-agent-protocol.d.ts +16 -0
- package/dist/src/protocol/remote-agent-protocol.js +1 -0
- package/dist/src/protocol/routes.d.ts +0 -6
- package/dist/src/protocol/routes.js +1 -1
- package/dist/src/protocol/task-tools.d.ts +21 -0
- package/dist/src/protocol/task-tools.js +1 -0
- package/dist/src/public/channels/auth.js +1 -1
- package/dist/src/public/channels/chat-sdk/chatSdkChannel.d.ts +25 -16
- package/dist/src/public/channels/chat-sdk/chatSdkChannel.js +2 -2
- package/dist/src/public/channels/chat-sdk/index.d.ts +1 -1
- package/dist/src/public/channels/chat-sdk/input-actions.d.ts +8 -0
- package/dist/src/public/channels/chat-sdk/input-actions.js +1 -0
- package/dist/src/public/channels/index.d.ts +1 -1
- package/dist/src/public/channels/linq/linqChannel.js +1 -1
- package/dist/src/public/channels/photon/photonIMessageChannel.js +1 -1
- package/dist/src/public/channels/slack/action-status.d.ts +11 -12
- package/dist/src/public/channels/slack/action-status.js +1 -1
- package/dist/src/public/channels/slack/api.js +1 -1
- package/dist/src/public/channels/slack/approval-cards.d.ts +15 -0
- package/dist/src/public/channels/slack/approval-cards.js +2 -0
- package/dist/src/public/channels/slack/attachments.js +1 -1
- package/dist/src/public/channels/slack/auth.d.ts +5 -0
- package/dist/src/public/channels/slack/auth.js +1 -1
- package/dist/src/public/channels/slack/connections.d.ts +20 -16
- package/dist/src/public/channels/slack/connections.js +1 -1
- package/dist/src/public/channels/slack/defaults.d.ts +13 -33
- package/dist/src/public/channels/slack/defaults.js +3 -4
- package/dist/src/public/channels/slack/hitl.d.ts +22 -13
- package/dist/src/public/channels/slack/hitl.js +2 -2
- package/dist/src/public/channels/slack/inbound.d.ts +10 -2
- package/dist/src/public/channels/slack/inbound.js +1 -1
- package/dist/src/public/channels/slack/index.d.ts +6 -3
- package/dist/src/public/channels/slack/index.js +1 -1
- package/dist/src/public/channels/slack/input-response.d.ts +1 -5
- package/dist/src/public/channels/slack/input-response.js +1 -1
- package/dist/src/public/channels/slack/interaction-cards.js +1 -1
- package/dist/src/public/channels/slack/interactions.js +1 -1
- package/dist/src/public/channels/slack/limits.d.ts +5 -3
- package/dist/src/public/channels/slack/private-approval-delivery.js +1 -1
- package/dist/src/public/channels/slack/renderers.d.ts +76 -0
- package/dist/src/public/channels/slack/renderers.js +1 -0
- package/dist/src/public/channels/slack/reply-delivery.d.ts +72 -0
- package/dist/src/public/channels/slack/reply-delivery.js +1 -0
- package/dist/src/public/channels/slack/session-operations.d.ts +6 -0
- package/dist/src/public/channels/slack/session-operations.js +1 -1
- package/dist/src/public/channels/slack/sign-in-cancel.d.ts +20 -0
- package/dist/src/public/channels/slack/sign-in-cancel.js +1 -0
- package/dist/src/public/channels/slack/slackChannel.d.ts +62 -103
- package/dist/src/public/channels/slack/slackChannel.js +1 -1
- package/dist/src/public/channels/slack/task-card.d.ts +24 -0
- package/dist/src/public/channels/slack/task-card.js +1 -0
- package/dist/src/public/channels/teams/defaults.d.ts +1 -1
- package/dist/src/public/channels/teams/defaults.js +2 -2
- package/dist/src/public/channels/telegram/hitl.d.ts +7 -1
- package/dist/src/public/channels/telegram/hitl.js +2 -1
- package/dist/src/public/channels/telegram/state.js +1 -1
- package/dist/src/public/channels/telegram/telegramChannel.d.ts +5 -0
- package/dist/src/public/channels/telegram/telegramChannel.js +1 -1
- package/dist/src/public/definitions/channel.d.ts +7 -1
- package/dist/src/public/definitions/channel.js +1 -1
- package/dist/src/public/definitions/connections/mcp.d.ts +4 -6
- package/dist/src/public/definitions/connections/openapi.d.ts +7 -8
- package/dist/src/public/definitions/extension.d.ts +2 -2
- package/dist/src/public/definitions/extension.js +1 -1
- package/dist/src/public/definitions/hook.d.ts +4 -4
- package/dist/src/public/definitions/state.d.ts +4 -2
- package/dist/src/public/definitions/state.js +1 -1
- package/dist/src/public/memory/index.d.ts +0 -1
- package/dist/src/public/models/openai/index.d.ts +1 -1
- package/dist/src/public/models/openai/index.js +1 -1
- package/dist/src/public/next/index.js +1 -1
- package/dist/src/public/next/server.d.ts +2 -0
- package/dist/src/public/next/server.js +1 -2
- package/dist/src/public/nuxt/module.d.ts +6 -0
- package/dist/src/public/nuxt/module.js +1 -1
- package/dist/src/public/schedules/index.d.ts +1 -0
- package/dist/src/public/schedules/index.js +1 -1
- package/dist/src/public/server/index.d.ts +28 -0
- package/dist/src/public/server/index.js +1 -0
- package/dist/src/public/tools/index.d.ts +3 -2
- package/dist/src/public/tools/index.js +1 -1
- package/dist/src/public/tools/no-reply.d.ts +1 -0
- package/dist/src/public/tools/no-reply.js +1 -0
- package/dist/src/react/index.d.ts +3 -0
- package/dist/src/react/index.js +1 -1
- package/dist/src/react/use-eve-agent.d.ts +7 -5
- package/dist/src/react/use-eve-agent.js +1 -1
- package/dist/src/runtime/agent/bootstrap-model-utils.d.ts +6 -7
- package/dist/src/runtime/agent/bootstrap-model-utils.js +1 -1
- package/dist/src/runtime/agent/bootstrap.d.ts +0 -1
- package/dist/src/runtime/agent/bootstrap.js +1 -1
- package/dist/src/runtime/agent/mock-model-adapter.js +1 -1
- package/dist/src/runtime/agent/mock-model-fixtures.d.ts +1 -1
- package/dist/src/runtime/agent/mock-model-fixtures.js +2 -2
- package/dist/src/runtime/channels/registry.js +1 -1
- package/dist/src/runtime/connections/mcp-client.d.ts +1 -9
- package/dist/src/runtime/connections/mcp-client.js +1 -1
- package/dist/src/runtime/connections/openapi-client.js +1 -1
- package/dist/src/runtime/connections/scoped-authorization.d.ts +3 -1
- package/dist/src/runtime/connections/scoped-authorization.js +1 -1
- package/dist/src/runtime/connections/tool-result.d.ts +27 -0
- package/dist/src/runtime/connections/tool-result.js +2 -0
- package/dist/src/runtime/connections/tool-signature.d.ts +14 -0
- package/dist/src/runtime/connections/tool-signature.js +1 -0
- package/dist/src/runtime/local-dev-capability.js +1 -1
- package/dist/src/runtime/prompt/compose.d.ts +1 -3
- package/dist/src/runtime/prompt/compose.js +3 -3
- package/dist/src/runtime/resolve-agent-graph.js +1 -1
- package/dist/src/runtime/resolve-tool.js +1 -1
- package/dist/src/runtime/sessions/compiled-agent-cache.js +1 -1
- package/dist/src/runtime/sessions/runtime-context-keys.js +1 -1
- package/dist/src/runtime/sessions/turn.d.ts +1 -16
- package/dist/src/runtime/subagents/dynamic-remote-agent-config.js +1 -1
- package/dist/src/runtime/subagents/registry.js +1 -1
- package/dist/src/runtime/subagents/workflow-reference.d.ts +6 -3
- package/dist/src/runtime/subagents/workflow-reference.js +1 -1
- package/dist/src/runtime/subagents/workflow.d.ts +12 -6
- package/dist/src/runtime/subagents/workflow.js +1 -1
- package/dist/src/runtime/tools/registry.js +1 -1
- package/dist/src/self-modification/extension/classify-registry-item.d.ts +3 -0
- package/dist/src/self-modification/extension/classify-registry-item.js +1 -1
- package/dist/src/self-modification/extension/subagents/agent/agent.d.ts +1 -1
- package/dist/src/self-modification/extension/subagents/agent/agent.js +1 -1
- package/dist/src/self-modification/extension/subagents/agent/instructions.js +7 -7
- package/dist/src/self-modification/extension/subagents/agent/tools/registry_add.js +1 -1
- package/dist/src/self-modification/extension/subagents/agent/tools/search_registry.d.ts +2 -0
- package/dist/src/self-modification/extension/subagents/agent/tools/search_registry.js +1 -1
- package/dist/src/self-modification/scaffold.d.ts +2 -0
- package/dist/src/self-modification/scaffold.js +7 -0
- package/dist/src/self-modification/setup.js +1 -7
- package/dist/src/setup/boxes/deploy-project.js +1 -1
- package/dist/src/setup/boxes/select-model.js +1 -1
- package/dist/src/setup/integrations/shopify/templates.d.ts +1 -1
- package/dist/src/setup/integrations/shopify/templates.js +31 -19
- package/dist/src/setup/integrations/web/setup.js +6 -2
- package/dist/src/setup/scaffold/create/agent-paths.d.ts +5 -0
- package/dist/src/setup/scaffold/create/agent-paths.js +1 -0
- package/dist/src/setup/scaffold/create/instructions-template.d.ts +1 -0
- package/dist/src/setup/scaffold/create/instructions-template.js +8 -0
- package/dist/src/setup/scaffold/create/project.js +3 -10
- package/dist/src/setup/scaffold/create/web-template.d.ts +2 -2
- package/dist/src/setup/scaffold/create/web-template.js +28 -9
- package/dist/src/setup/vercel-project-framework.js +1 -1
- package/dist/src/shared/action-request-name.d.ts +3 -0
- package/dist/src/shared/action-request-name.js +1 -0
- package/dist/src/shared/action-types.d.ts +49 -21
- package/dist/src/shared/action-types.js +1 -1
- package/dist/src/shared/agent-definition.d.ts +0 -7
- package/dist/src/shared/chatgpt-model.d.ts +1 -1
- package/dist/src/shared/chatgpt-model.js +1 -1
- package/dist/src/shared/connection-types.d.ts +2 -8
- package/dist/src/shared/default-agent-model.d.ts +10 -1
- package/dist/src/shared/default-agent-model.js +1 -1
- package/dist/src/shared/display-name.d.ts +15 -0
- package/dist/src/shared/display-name.js +1 -0
- package/dist/src/shared/extension-mount.d.ts +2 -0
- package/dist/src/shared/extension-mount.js +1 -0
- package/dist/src/shared/format-duration.d.ts +2 -0
- package/dist/src/shared/format-duration.js +1 -0
- package/dist/src/shared/framework-eve-server.d.ts +43 -0
- package/dist/src/shared/framework-eve-server.js +2 -0
- package/dist/src/shared/input.d.ts +1 -0
- package/dist/src/shared/memory-state.d.ts +1 -0
- package/dist/src/shared/memory-state.js +1 -1
- package/dist/src/shared/model-helper.d.ts +2 -2
- package/dist/src/shared/model-helper.js +1 -1
- package/dist/src/shared/model-summary.d.ts +2 -6
- package/dist/src/shared/model-summary.js +1 -1
- package/dist/src/shared/presentation-text.d.ts +5 -0
- package/dist/src/shared/presentation-text.js +1 -1
- package/dist/src/shared/serialized-observability-state.d.ts +0 -4
- package/dist/src/shared/serialized-observability-state.js +1 -1
- package/dist/src/shared/token-usage.d.ts +2 -0
- package/dist/src/shared/token-usage.js +1 -1
- package/dist/src/shared/trace-root.d.ts +8 -0
- package/dist/src/shared/trace-root.js +1 -0
- package/dist/src/shared/value-delta.d.ts +39 -0
- package/dist/src/shared/value-delta.js +1 -0
- package/dist/src/subagents/adapter-state.d.ts +0 -2
- package/dist/src/subagents/adapter-state.js +1 -1
- package/dist/src/subagents/adapter.js +1 -1
- package/dist/src/subagents/callback-route.js +1 -1
- package/dist/src/subagents/event-proxy-step.d.ts +16 -29
- package/dist/src/subagents/event-proxy-step.js +1 -1
- package/dist/src/subagents/hitl-proxy.d.ts +38 -20
- package/dist/src/subagents/hitl-proxy.js +1 -1
- package/dist/src/subagents/invocation.d.ts +4 -3
- package/dist/src/subagents/parent-notification.d.ts +2 -1
- package/dist/src/subagents/parent-notification.js +1 -1
- package/dist/src/subagents/token-budget.d.ts +8 -9
- package/dist/src/subagents/token-budget.js +1 -1
- package/dist/src/subagents/tool.d.ts +6 -12
- package/dist/src/subagents/tool.js +1 -1
- package/dist/src/svelte/index.d.ts +3 -0
- package/dist/src/svelte/index.js +2 -2
- package/dist/src/svelte/use-eve-agent.d.ts +7 -4
- package/dist/src/svelte/use-eve-agent.js +1 -1
- package/dist/src/tools/behavior.d.ts +5 -5
- package/dist/src/tools/definition.d.ts +50 -14
- package/dist/src/tools/definition.js +1 -1
- package/dist/src/tools/durable-callbacks.d.ts +1 -1
- package/dist/src/tools/dynamic.d.ts +6 -0
- package/dist/src/tools/framework/agent-contract.d.ts +2 -5
- package/dist/src/tools/framework/agent-contract.js +1 -1
- package/dist/src/tools/framework/agent.d.ts +2 -5
- package/dist/src/tools/framework/agent.js +1 -1
- package/dist/src/tools/framework/connection-tools.d.ts +3 -0
- package/dist/src/tools/framework/connection-tools.js +1 -0
- package/dist/src/tools/provided/agent-router.d.ts +6 -3
- package/dist/src/tools/provided/agent-router.js +1 -1
- package/dist/src/{execution/tools → tools/provided}/ask-question-workflow.d.ts +3 -4
- package/dist/src/tools/provided/ask-question-workflow.js +1 -0
- package/dist/src/tools/provided/ask-question.d.ts +20 -5
- package/dist/src/tools/provided/ask-question.js +2 -1
- package/dist/src/tools/provided/interrupted.d.ts +18 -0
- package/dist/src/tools/provided/interrupted.js +1 -0
- package/dist/src/tools/provided/load-skill.js +1 -1
- package/dist/src/tools/provided/no-reply.d.ts +19 -0
- package/dist/src/tools/provided/no-reply.js +1 -0
- package/dist/src/tools/provided/sleep-workflow.d.ts +4 -0
- package/dist/src/tools/provided/sleep-workflow.js +1 -0
- package/dist/src/tools/provided/sleep.d.ts +11 -5
- package/dist/src/tools/provided/sleep.js +1 -1
- package/dist/src/tools/provided/task-cancel.d.ts +6 -0
- package/dist/src/tools/provided/task-cancel.js +1 -0
- package/dist/src/tools/provided/task-wait.d.ts +9 -0
- package/dist/src/tools/provided/task-wait.js +1 -0
- package/dist/src/tools/provided/workflow.d.ts +2 -2
- package/dist/src/tools/provided/workflow.js +1 -1
- package/dist/src/tools/schema-emission.d.ts +23 -0
- package/dist/src/tools/schema-emission.js +1 -0
- package/dist/src/tools/schema.d.ts +22 -8
- package/dist/src/tools/schema.js +1 -1
- package/dist/src/tools/workflow-definition.d.ts +187 -85
- package/dist/src/tools/workflow-definition.js +1 -1
- package/dist/src/tools/workflow-entry-point.d.ts +3 -0
- package/dist/src/tools/workflow-entry-point.js +1 -0
- package/dist/src/tracing/agent-action-instrumentation.d.ts +1 -3
- package/dist/src/tracing/agent-action-instrumentation.js +1 -1
- package/dist/src/tracing/agent-approval-instrumentation.js +1 -1
- package/dist/src/tracing/agent-invocation-coordinator.d.ts +9 -18
- package/dist/src/tracing/agent-invocation-coordinator.js +1 -1
- package/dist/src/tracing/agent-memory-instrumentation.js +1 -1
- package/dist/src/tracing/agent-otel-attributes.d.ts +6 -0
- package/dist/src/tracing/agent-otel-attributes.js +1 -1
- package/dist/src/tracing/agent-otel-content.d.ts +0 -2
- package/dist/src/tracing/agent-otel-content.js +3 -3
- package/dist/src/tracing/agent-otel-provider.js +2 -2
- package/dist/src/tracing/agent-otel-runtime-context.d.ts +20 -0
- package/dist/src/tracing/agent-otel-runtime-context.js +1 -1
- package/dist/src/tracing/agent-otel-session-context.js +1 -1
- package/dist/src/tracing/agent-otel-usage.js +1 -1
- package/dist/src/tracing/agent-span-contract.d.ts +1 -1
- package/dist/src/tracing/agent-span-contract.js +1 -1
- package/dist/src/tracing/agent-span-id-generator.d.ts +0 -1
- package/dist/src/tracing/agent-span-id-generator.js +1 -1
- package/dist/src/tracing/agent-tool-instrumentation.js +1 -1
- package/dist/src/tracing/agent-trace-context-codec.d.ts +5 -2
- package/dist/src/tracing/agent-trace-context-codec.js +1 -1
- package/dist/src/tracing/agent-trace-context-store.d.ts +2 -27
- package/dist/src/tracing/agent-trace-context-store.js +1 -1
- package/dist/src/tracing/agent-trace-span-processor.js +1 -1
- package/dist/src/tracing/agent-trace-state.d.ts +4 -19
- package/dist/src/tracing/content-attributes.js +1 -1
- package/dist/src/tracing/conversation-context.d.ts +10 -0
- package/dist/src/tracing/conversation-context.js +1 -1
- package/dist/src/tracing/install-instrumentation-runtime.js +1 -1
- package/dist/src/tracing/otel-registration.js +1 -1
- package/dist/src/vue/index.d.ts +3 -0
- package/dist/src/vue/index.js +2 -2
- package/dist/src/vue/use-eve-agent.d.ts +7 -3
- package/dist/src/vue/use-eve-agent.js +1 -1
- package/docs/agent-config.md +36 -13
- package/docs/channels/chat-sdk.mdx +15 -4
- package/docs/channels/custom.mdx +89 -17
- package/docs/channels/eve.mdx +1 -1
- package/docs/channels/mcp.mdx +1 -1
- package/docs/channels/overview.mdx +14 -56
- package/docs/channels/slack.mdx +287 -45
- package/docs/channels/telegram.mdx +2 -0
- package/docs/concepts/built-in-tools.md +37 -28
- package/docs/concepts/context-control.md +2 -2
- package/docs/concepts/execution-model-and-durability.mdx +10 -11
- package/docs/concepts/sessions-runs-and-streaming.md +69 -49
- package/docs/connections/mcp.mdx +4 -4
- package/docs/connections/openapi.mdx +2 -2
- package/docs/connections/overview.mdx +11 -5
- package/docs/evals/assertions.mdx +5 -5
- package/docs/evals/cases.mdx +1 -1
- package/docs/evals/reporters.mdx +10 -4
- package/docs/extensions.md +22 -2
- package/docs/guides/client/streaming.mdx +33 -12
- package/docs/guides/deployment/vercel.mdx +2 -1
- package/docs/guides/dev-tui.md +26 -16
- package/docs/guides/dynamic-capabilities.md +6 -4
- package/docs/guides/evaluate.md +29 -2
- package/docs/guides/frontend/nuxt.mdx +24 -4
- package/docs/guides/frontend/overview.mdx +45 -41
- package/docs/guides/frontend/use-eve-agent-svelte.mdx +4 -10
- package/docs/guides/frontend/use-eve-agent-vue.mdx +4 -10
- package/docs/guides/hooks.md +16 -12
- package/docs/guides/instrumentation/instrumentation.mdx +2 -0
- package/docs/guides/instrumentation/otel.mdx +24 -6
- package/docs/guides/remote-agents.md +38 -22
- package/docs/guides/self-modification.md +10 -0
- package/docs/instructions.mdx +1 -1
- package/docs/patterns/multi-tenant-approvals.md +1 -1
- package/docs/protocols/ucp.mdx +20 -16
- package/docs/reference/cli.md +64 -11
- package/docs/reference/typescript-api.md +43 -41
- package/docs/schedules.mdx +14 -34
- package/docs/subagents/index.mdx +24 -56
- package/docs/tools/human-in-the-loop.md +50 -15
- package/docs/tools/meta.json +1 -1
- package/docs/tools/overview.mdx +80 -60
- package/docs/tools/tasks-upgrade.md +201 -0
- package/docs/tools/tasks.md +315 -0
- package/docs/tools/workflows.mdx +368 -154
- package/package.json +18 -12
- package/dist/src/channel/activity-renderer.d.ts +0 -21
- package/dist/src/channel/activity-renderer.js +0 -1
- package/dist/src/channel/activity-sink.d.ts +0 -2
- package/dist/src/channel/activity-sink.js +0 -1
- package/dist/src/cli/dev/tui/steering-stream.d.ts +0 -15
- package/dist/src/cli/dev/tui/steering-stream.js +0 -1
- package/dist/src/cli/dev/tui/subagent-pump.d.ts +0 -142
- package/dist/src/cli/dev/tui/subagent-pump.js +0 -1
- package/dist/src/eve-channel/activity-observer-request.d.ts +0 -7
- package/dist/src/eve-channel/activity-observer-request.js +0 -1
- package/dist/src/eve-channel/delivery-policy-request.d.ts +0 -4
- package/dist/src/eve-channel/delivery-policy-request.js +0 -1
- package/dist/src/execution/activity-cohort.d.ts +0 -20
- package/dist/src/execution/activity-cohort.js +0 -1
- package/dist/src/execution/activity-collector.d.ts +0 -12
- package/dist/src/execution/activity-collector.js +0 -1
- package/dist/src/execution/activity-events.d.ts +0 -8
- package/dist/src/execution/activity-events.js +0 -1
- package/dist/src/execution/activity-route.d.ts +0 -2
- package/dist/src/execution/activity-route.js +0 -1
- package/dist/src/execution/activity-work-id.d.ts +0 -9
- package/dist/src/execution/activity-work-id.js +0 -1
- package/dist/src/execution/activity-work.d.ts +0 -30
- package/dist/src/execution/activity-work.js +0 -1
- package/dist/src/execution/cancel-indexed-session-tasks-step.d.ts +0 -7
- package/dist/src/execution/cancel-indexed-session-tasks-step.js +0 -1
- package/dist/src/execution/dispatch-action-failures.d.ts +0 -8
- package/dist/src/execution/dispatch-action-failures.js +0 -1
- package/dist/src/execution/dispatch-start-operation.d.ts +0 -15
- package/dist/src/execution/dispatch-start-operation.js +0 -1
- package/dist/src/execution/publish-channel-event.d.ts +0 -23
- package/dist/src/execution/publish-channel-event.js +0 -1
- package/dist/src/execution/scheduled-launch-delivery.d.ts +0 -7
- package/dist/src/execution/scheduled-launch-delivery.js +0 -1
- package/dist/src/execution/session/event-sink.d.ts +0 -26
- package/dist/src/execution/session/event-sink.js +0 -1
- package/dist/src/execution/session-activity-projection.d.ts +0 -16
- package/dist/src/execution/session-activity-projection.js +0 -1
- package/dist/src/execution/session-activity-renderer-step.d.ts +0 -15
- package/dist/src/execution/session-activity-renderer-step.js +0 -1
- package/dist/src/execution/session-activity.d.ts +0 -3
- package/dist/src/execution/session-activity.js +0 -1
- package/dist/src/execution/submit-activity.d.ts +0 -7
- package/dist/src/execution/submit-activity.js +0 -1
- package/dist/src/execution/task-event-callback.d.ts +0 -12
- package/dist/src/execution/task-event-callback.js +0 -1
- package/dist/src/execution/task-input-capability.d.ts +0 -4
- package/dist/src/execution/task-input-capability.js +0 -1
- package/dist/src/execution/task-input-response-route.d.ts +0 -2
- package/dist/src/execution/task-input-response-route.js +0 -1
- package/dist/src/execution/tasks/child/notify.d.ts +0 -44
- package/dist/src/execution/tasks/child/notify.js +0 -1
- package/dist/src/execution/tasks/parent/control-shared.d.ts +0 -23
- package/dist/src/execution/tasks/parent/control-shared.js +0 -1
- package/dist/src/execution/tasks/parent/delegate.d.ts +0 -35
- package/dist/src/execution/tasks/parent/delegate.js +0 -1
- package/dist/src/execution/tasks/parent/dispatch.d.ts +0 -22
- package/dist/src/execution/tasks/parent/dispatch.js +0 -1
- package/dist/src/execution/tasks/parent/hitl-proxy-steps.d.ts +0 -27
- package/dist/src/execution/tasks/parent/hitl-proxy-steps.js +0 -1
- package/dist/src/execution/tasks/parent/run-parent.d.ts +0 -58
- package/dist/src/execution/tasks/parent/run-parent.js +0 -1
- package/dist/src/execution/tasks/parent/subagent-task-projection.d.ts +0 -26
- package/dist/src/execution/tasks/parent/subagent-task-projection.js +0 -1
- package/dist/src/execution/tasks/parent/task-cancel.d.ts +0 -12
- package/dist/src/execution/tasks/parent/task-cancel.js +0 -1
- package/dist/src/execution/tasks/parent/tool-execution.d.ts +0 -45
- package/dist/src/execution/tasks/parent/tool-execution.js +0 -1
- package/dist/src/execution/terminal-session-event.d.ts +0 -13
- package/dist/src/execution/terminal-session-event.js +0 -1
- package/dist/src/execution/tools/ask-question-workflow.js +0 -1
- package/dist/src/execution/tools/ask-question.d.ts +0 -19
- package/dist/src/execution/tools/ask-question.js +0 -2
- package/dist/src/execution/tools/connection-search.d.ts +0 -2
- package/dist/src/execution/tools/connection-search.js +0 -2
- package/dist/src/execution/tools/sleep-workflow.d.ts +0 -3
- package/dist/src/execution/tools/sleep-workflow.js +0 -1
- package/dist/src/execution/tools/sleep.d.ts +0 -10
- package/dist/src/execution/tools/sleep.js +0 -1
- package/dist/src/execution/tools/subagent/accept-event-step.d.ts +0 -7
- package/dist/src/execution/tools/subagent/accept-event-step.js +0 -1
- package/dist/src/execution/tools/subagent/emit-event-step.d.ts +0 -12
- package/dist/src/execution/tools/subagent/emit-event-step.js +0 -1
- package/dist/src/execution/tools/subagent/invoke-agent.d.ts +0 -42
- package/dist/src/execution/tools/subagent/invoke-agent.js +0 -1
- package/dist/src/execution/tools/subagent/invoke-preparation.d.ts +0 -44
- package/dist/src/execution/tools/subagent/invoke-preparation.js +0 -1
- package/dist/src/execution/tools/subagent/invoke-step.d.ts +0 -64
- package/dist/src/execution/tools/subagent/invoke-step.js +0 -1
- package/dist/src/execution/tools/subagent/receipt-identity.d.ts +0 -11
- package/dist/src/execution/tools/subagent/receipt-identity.js +0 -1
- package/dist/src/execution/tools/subagent/start.d.ts +0 -51
- package/dist/src/execution/tools/subagent/start.js +0 -1
- package/dist/src/execution/tools/subagent/steer.d.ts +0 -13
- package/dist/src/execution/tools/subagent/steer.js +0 -1
- package/dist/src/execution/tools/subagent/task-agent-requests.d.ts +0 -24
- package/dist/src/execution/tools/subagent/task-agent-requests.js +0 -1
- package/dist/src/execution/tools/subagent/task-cancel.d.ts +0 -10
- package/dist/src/execution/tools/subagent/task-cancel.js +0 -1
- package/dist/src/execution/tools/tasks.d.ts +0 -3
- package/dist/src/execution/tools/tasks.js +0 -1
- package/dist/src/execution/tools/workflow/background.js +0 -1
- package/dist/src/execution/tools/workflow/workflow-owner-background.d.ts +0 -14
- package/dist/src/execution/tools/workflow/workflow-owner-background.js +0 -1
- package/dist/src/harness/background-tools.d.ts +0 -45
- package/dist/src/harness/background-tools.js +0 -1
- package/dist/src/instrumentation/background-task-runtime.d.ts +0 -18
- package/dist/src/instrumentation/background-task-runtime.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-config@0.3.0/node_modules/@vercel/cli-config/dist/index.js +0 -21
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/envpath.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/errors.js +0 -2
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/errutils.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/exec.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/fsutils.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/index.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/lookup.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/safety.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/authorization.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/connector.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/index.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/installation.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/internal/base-url.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/internal/default-scopes.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/internal/env.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/internal/url-validation.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/token.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/auth-errors.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/exchange-vercel-oidc-token.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/get-context.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/get-vercel-oidc-token-sync.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/get-vercel-oidc-token-with-refresh.js +0 -2
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/index.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/oauth.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/token-error.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/token-io.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/token-util.js +0 -2
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/token.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/verify-vercel-oidc-token.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/version.js +0 -1
- package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js +0 -1
- package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js +0 -1
- package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js +0 -1
- package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js +0 -1
- package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js +0 -1
- package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js +0 -1
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/index.js +0 -1
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/command.js +0 -1
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/error.js +0 -2
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/kill.js +0 -1
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/promise.js +0 -1
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/stdio.js +0 -1
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/stream.js +0 -1
- package/dist/src/node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/buffer-stream.js +0 -1
- package/dist/src/node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/index.js +0 -1
- package/dist/src/node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/core.js +0 -1
- package/dist/src/node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/main.js +0 -1
- package/dist/src/node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/realtime.js +0 -1
- package/dist/src/node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/signals.js +0 -1
- package/dist/src/node_modules/.pnpm/is-stream@2.0.1/node_modules/is-stream/index.js +0 -1
- package/dist/src/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js +0 -1
- package/dist/src/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js +0 -1
- package/dist/src/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/index.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/compact/decrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/compact/encrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/flattened/decrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/flattened/encrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/general/decrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/general/encrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwk/embedded.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwk/thumbprint.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwks/local.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwks/remote.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/compact/sign.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/compact/verify.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/flattened/sign.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/flattened/verify.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/general/sign.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/general/verify.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/decrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/encrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/produce.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/sign.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/unsecured.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/verify.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/key/export.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/key/generate_key_pair.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/key/generate_secret.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/key/import.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/aesgcmkw.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/buffer_utils.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/cek.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/check_iv_length.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/check_key_type.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/check_p2s.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/crypto_key.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/decrypt_key_management.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/encrypt_key_management.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/epoch.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/invalid_key_input.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/is_disjoint.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/is_jwk.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/is_object.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/iv.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/jwt_claims_set.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/private_symbols.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/secs.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/validate_algorithms.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/validate_crit.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/aeskw.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/asn1.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/base64url.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/cbc_tag.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/check_cek_length.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/check_key_length.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/ciphers.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/decrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/digest.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/dsa_digest.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/ecdhes.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/encrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/fetch_jwks.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/generate.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/get_named_curve.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/get_sign_verify_key.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/hmac_digest.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/is_key_like.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/is_key_object.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/jwk_to_key.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/key_to_jwk.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/node_key.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/normalize_key.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/pbes2kw.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/random.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/rsaes.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/runtime.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/sign.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/timing_safe_equal.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/verify.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/webcrypto.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/base64url.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/decode_jwt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/decode_protected_header.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/errors.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/runtime.js +0 -1
- package/dist/src/node_modules/.pnpm/merge-stream@2.0.0/node_modules/merge-stream/index.js +0 -1
- package/dist/src/node_modules/.pnpm/mimic-fn@2.1.0/node_modules/mimic-fn/index.js +0 -1
- package/dist/src/node_modules/.pnpm/npm-run-path@4.0.1/node_modules/npm-run-path/index.js +0 -1
- package/dist/src/node_modules/.pnpm/onetime@5.1.2/node_modules/onetime/index.js +0 -1
- package/dist/src/node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js +0 -1
- package/dist/src/node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js +0 -1
- package/dist/src/node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js +0 -1
- package/dist/src/node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js +0 -1
- package/dist/src/node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/signals.js +0 -1
- package/dist/src/node_modules/.pnpm/strip-final-newline@2.0.0/node_modules/strip-final-newline/index.js +0 -2
- package/dist/src/node_modules/.pnpm/which@2.0.2/node_modules/which/which.js +0 -1
- package/dist/src/protocol/activity.d.ts +0 -112
- package/dist/src/protocol/activity.js +0 -1
- package/dist/src/protocol/agent-handle-error.d.ts +0 -13
- package/dist/src/protocol/agent-handle-error.js +0 -1
- package/dist/src/public/channels/slack/activity-plan.d.ts +0 -5
- package/dist/src/public/channels/slack/activity-plan.js +0 -1
- package/dist/src/public/channels/slack/activity.d.ts +0 -63
- package/dist/src/public/channels/slack/activity.js +0 -2
- package/dist/src/public/nuxt/dev-server.d.ts +0 -25
- package/dist/src/public/nuxt/dev-server.js +0 -1
- package/dist/src/public/tools/connection-search.d.ts +0 -1
- package/dist/src/public/tools/connection-search.js +0 -1
- package/dist/src/public/tools/task-cancel.d.ts +0 -1
- package/dist/src/public/tools/task-cancel.js +0 -1
- package/dist/src/runtime/prompt/connections.d.ts +0 -9
- package/dist/src/runtime/prompt/connections.js +0 -2
- package/dist/src/shared/empty-delivery.d.ts +0 -3
- package/dist/src/shared/empty-delivery.js +0 -1
- package/dist/src/subagents/agent-handle-errors.d.ts +0 -25
- package/dist/src/subagents/agent-handle-errors.js +0 -1
- package/dist/src/subagents/callback-step.d.ts +0 -11
- package/dist/src/subagents/callback-step.js +0 -1
- package/dist/src/subagents/continuation-bundle.d.ts +0 -13
- package/dist/src/subagents/continuation-bundle.js +0 -1
- package/dist/src/subagents/handle-dispatch.d.ts +0 -65
- package/dist/src/subagents/handle-dispatch.js +0 -1
- package/dist/src/subagents/handles/operation-id.d.ts +0 -15
- package/dist/src/subagents/handles/operation-id.js +0 -1
- package/dist/src/subagents/handles/prompt.d.ts +0 -52
- package/dist/src/subagents/handles/prompt.js +0 -3
- package/dist/src/subagents/handles/query.d.ts +0 -41
- package/dist/src/subagents/handles/query.js +0 -1
- package/dist/src/subagents/handles/state-key.d.ts +0 -8
- package/dist/src/subagents/handles/state-key.js +0 -1
- package/dist/src/subagents/handles/store.d.ts +0 -217
- package/dist/src/subagents/handles/store.js +0 -1
- package/dist/src/subagents/handles/transitions.d.ts +0 -103
- package/dist/src/subagents/handles/transitions.js +0 -1
- package/dist/src/subagents/remote-dispatch.js +0 -1
- package/dist/src/subagents/start-local.d.ts +0 -29
- package/dist/src/subagents/start-local.js +0 -1
- package/dist/src/subagents/start-remote.d.ts +0 -21
- package/dist/src/subagents/start-remote.js +0 -1
- package/dist/src/tasks/delivery-context.d.ts +0 -32
- package/dist/src/tasks/delivery-context.js +0 -4
- package/dist/src/tasks/delivery-policy.d.ts +0 -14
- package/dist/src/tasks/delivery-policy.js +0 -1
- package/dist/src/tasks/json.d.ts +0 -88
- package/dist/src/tasks/json.js +0 -1
- package/dist/src/tasks/notification.d.ts +0 -10
- package/dist/src/tasks/notification.js +0 -1
- package/dist/src/tasks/task-id.d.ts +0 -31
- package/dist/src/tasks/task-id.js +0 -1
- package/dist/src/tasks/task-inbox-token.d.ts +0 -2
- package/dist/src/tasks/task-inbox-token.js +0 -1
- package/dist/src/tasks/transitions.d.ts +0 -17
- package/dist/src/tasks/transitions.js +0 -1
- package/dist/src/tasks/types.d.ts +0 -138
- package/dist/src/tasks/types.js +0 -1
- package/dist/src/tools/framework/connection-search.d.ts +0 -3
- package/dist/src/tools/framework/connection-search.js +0 -1
- package/dist/src/tools/framework/task-cancel.d.ts +0 -4
- package/dist/src/tools/framework/task-cancel.js +0 -1
- package/dist/src/tools/framework/task-contract.d.ts +0 -19
- package/dist/src/tools/framework/task-contract.js +0 -1
- package/dist/src/tools/native-definition.d.ts +0 -7
- package/dist/src/tools/native-definition.js +0 -1
- package/dist/src/tracing/agent-invocation-terminal.d.ts +0 -18
- package/dist/src/tracing/agent-invocation-terminal.js +0 -1
- /package/dist/src/execution/{tools/subagent → agent-sessions}/metadata.d.ts +0 -0
- /package/dist/src/execution/{tools/subagent → agent-sessions}/metadata.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createActionPartialEvent,
|
|
1
|
+
import{createActionPartialEvent,createAgentStartedEvent}from"#protocol/message.js";import{publishSessionEvents}from"#execution/publish-session-events.js";import{withSessionStateDelta}from"#execution/session/state-delta.js";import{createRuntimeToolResultFromValue}from"#harness/action-result-helpers.js";async function emitWorkflowToolRunReportStep(e){"use step";let t=createActionPartialEvent({result:createRuntimeToolResultFromValue({callId:e.from.callId,output:e.update,toolName:e.from.toolName}),sequence:e.from.sequence,stepIndex:e.from.stepIndex,turnId:e.from.turnId});return await withSessionStateDelta(e,e=>publishSessionEvents(e,[t]))}async function emitAgentStartedStep(e){"use step";let t=e.messages.map(({from:t,session:n})=>createAgentStartedEvent({callId:t.callId,name:n.name,parentSessionId:e.sessionState.sessionId,remote:n.kind===`remote`?{url:n.url,...n.resolverId!==void 0&&{resolverId:n.resolverId}}:void 0,sessionId:n.sessionId,...t.taskId!==void 0&&{taskId:t.taskId},turnId:t.turnId}));return await withSessionStateDelta(e,e=>publishSessionEvents(e,t))}export{emitAgentStartedStep,emitWorkflowToolRunReportStep};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type { HarnessToolDefinition } from "#harness/execute-tool.js";
|
|
2
2
|
import type { PreparedRuntimeTool } from "#runtime/sessions/turn.js";
|
|
3
|
-
import {
|
|
4
|
-
interface WorkflowToolHarnessDefinitionInput {
|
|
3
|
+
import type { JsonValue } from "#shared/json.js";
|
|
4
|
+
export interface WorkflowToolHarnessDefinitionInput {
|
|
5
5
|
readonly definition: HarnessToolDefinition;
|
|
6
6
|
readonly executeInput?: (input: unknown) => JsonValue;
|
|
7
|
-
/** Selected agent definition's runtime graph ID; absent for authored workflow tools. */
|
|
8
|
-
readonly nodeId?: string;
|
|
9
7
|
readonly workflowId: string;
|
|
10
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* Workflow tools run outside the model step, so the harness definition carries
|
|
11
|
+
* no `execute`. A `serve` tool's model input gains `taskId`.
|
|
12
|
+
*/
|
|
11
13
|
export declare function createWorkflowToolHarnessDefinition(input: WorkflowToolHarnessDefinitionInput): HarnessToolDefinition;
|
|
12
14
|
export declare function createPreparedWorkflowToolHarnessDefinition(tool: PreparedRuntimeTool): HarnessToolDefinition;
|
|
13
|
-
export declare function parseWorkflowToolInput(toolInput: unknown, toolName: string): ReturnType<typeof parseJsonObject>;
|
|
14
|
-
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{UNSPECIFIED_INPUT_SCHEMA,toInputSchema,toOutputSchema}from"#tools/schema.js";import{workflowIdForHandling}from"#runtime/subagents/workflow-reference.js";import{withTaskIdInput}from"#execution/tasks/task-id-input.js";import{entryPointOf}from"#execution/tasks/tool-entry-point.js";function createWorkflowToolHarnessDefinition(e){return{...entryPointOf(e.definition)===`serve`?withTaskIdInput(e.definition):e.definition,execute:void 0,executeInput:e.executeInput,workflowId:e.workflowId}}function createPreparedWorkflowToolHarnessDefinition(e){let t=workflowIdForHandling(e.behavior?.handling);if(t===void 0)throw Error(`Prepared tool "${e.name}" is not backed by a workflow.`);return createWorkflowToolHarnessDefinition({definition:{behavior:e.behavior,description:e.description,inputSchema:toInputSchema(e.inputSchema)??UNSPECIFIED_INPUT_SCHEMA,name:e.name,outputSchema:toOutputSchema(e.outputSchema),rootOnly:e.rootOnly},workflowId:t})}export{createPreparedWorkflowToolHarnessDefinition,createWorkflowToolHarnessDefinition};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { WorkflowToolRunAddress } from "#execution/tools/workflow/types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Aborts the `execute` call's `abortSignal`. A run that already finished has nothing
|
|
4
|
+
* left to interrupt, so a missing hook is not an error.
|
|
5
|
+
*/
|
|
6
|
+
export declare function interruptWorkflowToolRun(run: WorkflowToolRunAddress): Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{resumeHookStep}from"#execution/tools/workflow/resume-hook-step.js";const INTERRUPT={kind:`interrupt`};async function interruptWorkflowToolRun(e){await resumeHookStep(e.hookToken,INTERRUPT,{ifPresent:!0})}export{interruptWorkflowToolRun};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import type { SubagentAuthorizationEventHookPayload } from "#channel/types.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { SessionInboxAddress } from "#execution/session-inbox/address.js";
|
|
3
|
+
import type { RemoteAgentBinding } from "#eve-channel/support.js";
|
|
4
|
+
import type { SessionAuth } from "#context/session-context.js";
|
|
5
|
+
import type { AgentSessionContext } from "#execution/agent-sessions/context.js";
|
|
6
|
+
import type { AgentSessionAddress } from "#execution/agent-sessions/steps.js";
|
|
3
7
|
import type { InputRequest } from "#shared/input.js";
|
|
4
8
|
import type { JsonObject, JsonValue } from "#shared/json.js";
|
|
5
|
-
import type {
|
|
9
|
+
import type { TokenUsage } from "#shared/token-usage.js";
|
|
10
|
+
import type { ToolInputRequest, ToolInputResponse } from "#tools/definition.js";
|
|
6
11
|
export interface WorkflowToolRunOwner {
|
|
7
12
|
readonly inbox: string;
|
|
8
13
|
}
|
|
9
|
-
/**
|
|
10
|
-
* Requests the owner must apply on the run's behalf because they touch
|
|
11
|
-
* owner-held state: spawning an agent and releasing its handle afterwards.
|
|
12
|
-
*/
|
|
13
|
-
export type WorkflowToolAgentRequest = AgentInvocationRequest | AgentSettlementRequest;
|
|
14
14
|
/**
|
|
15
15
|
* A child authorization event the owner should display. Unlike input requests
|
|
16
16
|
* it has no answer: the authorization callback completes against the child
|
|
@@ -22,6 +22,8 @@ export interface WorkflowToolAuthorizationRequest {
|
|
|
22
22
|
}
|
|
23
23
|
/** A question authored with `ask()` from `eve/workflow`, before owner normalization. */
|
|
24
24
|
export interface WorkflowToolAskRequest {
|
|
25
|
+
/** The run's control hook, where the session sends its decision on the question. */
|
|
26
|
+
readonly control: string;
|
|
25
27
|
readonly kind: "ask";
|
|
26
28
|
readonly request: ToolInputRequest;
|
|
27
29
|
}
|
|
@@ -33,15 +35,16 @@ export interface WorkflowToolInputRequestBatch {
|
|
|
33
35
|
readonly kind: "input-batch";
|
|
34
36
|
readonly requests: readonly InputRequest[];
|
|
35
37
|
}
|
|
36
|
-
export type WorkflowToolRequest =
|
|
38
|
+
export type WorkflowToolRequest = WorkflowToolAuthorizationRequest | WorkflowToolAskRequest | InputRequest | WorkflowToolInputRequestBatch;
|
|
37
39
|
/** Identifies the sending workflow tool run to an owner shared by many runs. */
|
|
38
40
|
export interface WorkflowToolRunRef {
|
|
39
41
|
readonly callId: string;
|
|
40
|
-
readonly execution: "background" | "blocking";
|
|
41
42
|
readonly input: JsonObject;
|
|
42
43
|
readonly runId: string;
|
|
43
44
|
readonly sequence: number;
|
|
44
45
|
readonly stepIndex: number;
|
|
46
|
+
/** Set when the run does a task's work; the session routes its messages by it. */
|
|
47
|
+
readonly taskId?: string;
|
|
45
48
|
readonly toolName: string;
|
|
46
49
|
readonly turnId: string;
|
|
47
50
|
}
|
|
@@ -60,7 +63,12 @@ export interface WorkflowToolRunReport {
|
|
|
60
63
|
readonly update: JsonValue;
|
|
61
64
|
}
|
|
62
65
|
export interface WorkflowToolRunRequestMessage {
|
|
66
|
+
readonly childSessionInbox?: SessionInboxAddress;
|
|
67
|
+
readonly remote?: RemoteAgentBinding & {
|
|
68
|
+
readonly sessionId: string;
|
|
69
|
+
};
|
|
63
70
|
readonly from: WorkflowToolRunRef;
|
|
71
|
+
readonly inputSource?: string;
|
|
64
72
|
readonly replyTo: string;
|
|
65
73
|
readonly request: WorkflowToolRequest;
|
|
66
74
|
readonly requestCoordinates?: {
|
|
@@ -72,16 +80,133 @@ export interface WorkflowToolRunRequestMessage {
|
|
|
72
80
|
export interface WorkflowToolRunOutcomeMessage {
|
|
73
81
|
readonly from: WorkflowToolRunRef;
|
|
74
82
|
readonly result: WorkflowToolRunOutcome;
|
|
83
|
+
/** What the run's `ctx.agent` sessions spent in all, once any of their turns ended. */
|
|
84
|
+
readonly usage?: TokenUsage;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* The run asks the session to withdraw the `ctx.ask()` question sent under
|
|
88
|
+
* `replyTo`. The session answers `withdrawn` on `control`, unless it accepted
|
|
89
|
+
* an answer first.
|
|
90
|
+
*/
|
|
91
|
+
export interface WorkflowToolRunWithdrawMessage {
|
|
92
|
+
readonly control: string;
|
|
93
|
+
readonly from: WorkflowToolRunRef;
|
|
94
|
+
readonly replyTo: string;
|
|
95
|
+
}
|
|
96
|
+
/** The run opened a session with `ctx.agent`, which its session announces as `agent.started`. */
|
|
97
|
+
export interface WorkflowToolRunAgentStartedMessage {
|
|
98
|
+
readonly from: WorkflowToolRunRef;
|
|
99
|
+
readonly session: AgentSessionAddress;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* A `serve` body's reply, sent once for each `ctx.reply()`. It settles every
|
|
103
|
+
* call the body received since its last reply, so the session settles them
|
|
104
|
+
* together and the model receives the reply once.
|
|
105
|
+
*/
|
|
106
|
+
export interface WorkflowToolRunReplyMessage {
|
|
107
|
+
/** The calls the reply settles, oldest first. */
|
|
108
|
+
readonly callIds: readonly string[];
|
|
109
|
+
/** The latest call the reply settles, which the body serves now. */
|
|
110
|
+
readonly from: WorkflowToolRunRef;
|
|
111
|
+
readonly output: JsonValue;
|
|
112
|
+
/**
|
|
113
|
+
* What the run's `ctx.agent` sessions spent so far, once any of their turns
|
|
114
|
+
* ended. A running total, so the session counts only what it adds to the
|
|
115
|
+
* last one it counted, and a redelivered reply adds nothing.
|
|
116
|
+
*/
|
|
117
|
+
readonly usage?: TokenUsage;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* A `serve` body's delegated spend that no reply carries: its `ctx.agent`
|
|
121
|
+
* sessions ended a turn while no call waited for a reply, such as a turn a
|
|
122
|
+
* cancel stopped. A running total, like a reply's.
|
|
123
|
+
*/
|
|
124
|
+
export interface WorkflowToolRunUsageMessage {
|
|
125
|
+
readonly from: WorkflowToolRunRef;
|
|
126
|
+
readonly usage: TokenUsage;
|
|
127
|
+
}
|
|
128
|
+
/** A task's run can take commands: its control hook is registered. */
|
|
129
|
+
export interface WorkflowToolRunStartedMessage {
|
|
130
|
+
readonly from: WorkflowToolRunRef;
|
|
75
131
|
}
|
|
76
132
|
export type WorkflowToolRunMessage = ({
|
|
133
|
+
readonly kind: "agent-started";
|
|
134
|
+
} & WorkflowToolRunAgentStartedMessage) | ({
|
|
135
|
+
readonly kind: "started";
|
|
136
|
+
} & WorkflowToolRunStartedMessage) | ({
|
|
77
137
|
readonly kind: "report";
|
|
78
138
|
} & WorkflowToolRunReport) | ({
|
|
139
|
+
readonly kind: "reply";
|
|
140
|
+
} & WorkflowToolRunReplyMessage) | ({
|
|
79
141
|
readonly kind: "request";
|
|
80
142
|
} & WorkflowToolRunRequestMessage) | ({
|
|
143
|
+
readonly kind: "withdraw";
|
|
144
|
+
} & WorkflowToolRunWithdrawMessage) | ({
|
|
145
|
+
readonly kind: "usage";
|
|
146
|
+
} & WorkflowToolRunUsageMessage) | ({
|
|
81
147
|
readonly kind: "outcome";
|
|
82
148
|
} & WorkflowToolRunOutcomeMessage);
|
|
83
|
-
|
|
149
|
+
/**
|
|
150
|
+
* A later call to a `serve` task, which its run hands to `receive()`. It
|
|
151
|
+
* carries everything the session knew of the call when it admitted it, as a
|
|
152
|
+
* run's input does for the call that started it: the coordinates of the model
|
|
153
|
+
* step that made it, the caller's auth, and the context of sessions opened
|
|
154
|
+
* for it, with the agents it may open. Everything the run does while serving
|
|
155
|
+
* the call comes from these.
|
|
156
|
+
*/
|
|
157
|
+
export interface WorkflowToolRunCall extends Pick<WorkflowToolRunRef, "callId" | "sequence" | "stepIndex" | "turnId"> {
|
|
158
|
+
/** Sessions opened while serving the call are its children, in its trace. */
|
|
159
|
+
readonly agentContext: AgentSessionContext;
|
|
160
|
+
/** The caller's auth the session admitted the call with, which messages sent while serving it carry. */
|
|
161
|
+
readonly auth: SessionAuth;
|
|
162
|
+
readonly executeInput?: JsonValue;
|
|
163
|
+
/** The call's input, without the `taskId` that named the task. */
|
|
164
|
+
readonly input: JsonObject;
|
|
165
|
+
}
|
|
166
|
+
/** A person's answer to a `ctx.ask()` question, as the session accepted it. */
|
|
167
|
+
export type WorkflowToolRunAnswer = Extract<ToolInputResponse, {
|
|
168
|
+
readonly status: "answered";
|
|
169
|
+
}>;
|
|
170
|
+
/**
|
|
171
|
+
* The session's decision on one `ctx.ask()` question: it accepted an answer,
|
|
172
|
+
* or it withdrew the question first. It decides once, and the ask resolves
|
|
173
|
+
* from that decision alone.
|
|
174
|
+
*/
|
|
175
|
+
export type WorkflowToolRunAskDecision = {
|
|
176
|
+
readonly kind: "answer";
|
|
177
|
+
readonly requestId: string;
|
|
178
|
+
readonly response: WorkflowToolRunAnswer;
|
|
179
|
+
} | {
|
|
180
|
+
readonly kind: "withdrawn";
|
|
181
|
+
readonly requestId: string;
|
|
182
|
+
};
|
|
183
|
+
/**
|
|
184
|
+
* Commands the body applies, in the order the session sent them.
|
|
185
|
+
*
|
|
186
|
+
* - `cancel` stops the current work: an `execute` or `task` call's run, or a
|
|
187
|
+
* `serve` task's current stretch of work, after which it waits for more calls.
|
|
188
|
+
* - `end` stops the run for good, because the session ended.
|
|
189
|
+
* - `interrupt` aborts an `execute` call's `abortSignal` without cancelling the
|
|
190
|
+
* call, because steering arrived while the turn waits on it.
|
|
191
|
+
* - `call` delivers a later call to a `serve` task.
|
|
192
|
+
*/
|
|
193
|
+
export type WorkflowBodyCommand = {
|
|
194
|
+
readonly kind: "call";
|
|
195
|
+
readonly call: WorkflowToolRunCall;
|
|
196
|
+
} | {
|
|
84
197
|
readonly kind: "cancel";
|
|
85
198
|
readonly reason: string;
|
|
199
|
+
} | {
|
|
200
|
+
readonly kind: "end";
|
|
201
|
+
readonly reason: string;
|
|
202
|
+
} | {
|
|
203
|
+
readonly kind: "interrupt";
|
|
86
204
|
};
|
|
205
|
+
/**
|
|
206
|
+
* Everything the session sends a run, on the run's control hook: its one
|
|
207
|
+
* inbox. Only the session writes to it, so the run receives commands and
|
|
208
|
+
* decisions in the order the session made them.
|
|
209
|
+
*/
|
|
210
|
+
export type WorkflowToolRunControlMessage = WorkflowBodyCommand | WorkflowToolRunAskDecision;
|
|
87
211
|
export declare function isWorkflowToolRunControlMessage(value: unknown): value is WorkflowToolRunControlMessage;
|
|
212
|
+
export declare function isWorkflowToolRunAskDecision(message: WorkflowToolRunControlMessage): message is WorkflowToolRunAskDecision;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function isWorkflowToolRunControlMessage(e){if(typeof e!=`object`||!e)return!1;let{
|
|
1
|
+
function isWorkflowToolRunControlMessage(e){if(typeof e!=`object`||!e)return!1;let{call:t,kind:n,reason:r,requestId:i,response:a}=e;switch(n){case`interrupt`:return!0;case`cancel`:case`end`:return typeof r==`string`;case`call`:return isWorkflowToolRunCall(t);case`answer`:return typeof i==`string`&&isWorkflowToolRunAnswer(a);case`withdrawn`:return typeof i==`string`;default:return!1}}function isWorkflowToolRunAskDecision(e){return e.kind===`answer`||e.kind===`withdrawn`}function isWorkflowToolRunAnswer(e){if(typeof e!=`object`||!e)return!1;let{optionId:t,responder:n,status:r,text:i}=e;return r===`answered`&&(t===void 0||typeof t==`string`)&&(n===void 0||isToolInputResponseResponder(n))&&(i===void 0||typeof i==`string`)}function isToolInputResponseResponder(e){if(typeof e!=`object`||!e)return!1;let{authenticator:t,principalId:n,principalType:r}=e;return typeof t==`string`&&typeof n==`string`&&typeof r==`string`}function isWorkflowToolRunCall(e){if(typeof e!=`object`||!e)return!1;let{agentContext:t,auth:n,callId:r,input:i,sequence:a,stepIndex:o,turnId:s}=e;return typeof t==`object`&&!!t&&typeof n==`object`&&!!n&&typeof r==`string`&&typeof i==`object`&&!!i&&typeof a==`number`&&typeof o==`number`&&typeof s==`string`}export{isWorkflowToolRunAskDecision,isWorkflowToolRunControlMessage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{parseJsonValue}from"#shared/json.js";function workflowToolRunOutcomeToToolResult(e){let{from:t,result:n}=e;return n.status===`completed`?{callId:t.callId,kind:`tool-result`,output:n.output,toolName:t.toolName}:{callId:t.callId,isError:!0,kind:`tool-result`,output:n.status===`failed`?workflowToolRunFailureOutput(e):n.reason??`The workflow tool run was cancelled.`,toolName:t.toolName}}function workflowToolRunFailureOutput(e){if(e.result.status!==`failed`)throw TypeError(`Expected a failed workflow outcome.`);let t=parseJsonValueOrUndefined(e.result.error);return t!==void 0&&typeof t==`object`&&t&&!Array.isArray(t)&&typeof Reflect.get(t,`code`)==`string`?t:errorMessage(e.result.error)}function errorMessage(e){if(typeof e==`object`&&e&&`message`in e){let t=e.message;if(typeof t==`string`)return t}return String(e)}function parseJsonValueOrUndefined(e){try{return parseJsonValue(e)}catch{return}}function workflowToolRunRequestToInputRequestPayload(e){let{from:t,replyTo:n,requestCoordinates:r}=e;return{callId:t.callId,childContinuationToken:n,childSessionId:t.runId,event:{requests:workflowToolRunInputRequests(e),sequence:r?.sequence??t.sequence,stepIndex:r?.stepIndex??t.stepIndex,turnId:r?.turnId??t.turnId},kind:`subagent-input-request`,subagentName:t.toolName}}function workflowToolRunInputRequests(e){return e.request.kind===`input-batch`?e.request.requests:[normalizeInputRequest(e.request,e.from,e.replyTo)]}function normalizeInputRequest(e,t,n){switch(e.kind){case`
|
|
1
|
+
import{parseJsonValue}from"#shared/json.js";function workflowToolRunOutcomeToToolResult(e){let{from:t,result:n}=e;return n.status===`completed`?{callId:t.callId,kind:`tool-result`,output:n.output,toolName:t.toolName}:{callId:t.callId,isError:!0,kind:`tool-result`,output:n.status===`failed`?workflowToolRunFailureOutput(e):n.reason??`The workflow tool run was cancelled.`,toolName:t.toolName}}function workflowToolRunFailureOutput(e){if(e.result.status!==`failed`)throw TypeError(`Expected a failed workflow outcome.`);let t=parseJsonValueOrUndefined(e.result.error);return t!==void 0&&typeof t==`object`&&t&&!Array.isArray(t)&&typeof Reflect.get(t,`code`)==`string`?t:errorMessage(e.result.error)}function errorMessage(e){if(typeof e==`object`&&e&&`message`in e){let t=e.message;if(typeof t==`string`)return t}return String(e)}function parseJsonValueOrUndefined(e){try{return parseJsonValue(e)}catch{return}}function workflowToolRunRequestToInputRequestPayload(e){let{from:t,replyTo:n,requestCoordinates:r}=e;return{callId:t.callId,childContinuationToken:n,childSessionId:t.runId,childSessionInbox:e.childSessionInbox,remote:e.remote,inputSource:e.inputSource,event:{requests:workflowToolRunInputRequests(e),sequence:r?.sequence??t.sequence,stepIndex:r?.stepIndex??t.stepIndex,taskId:t.taskId,turnId:r?.turnId??t.turnId},kind:`subagent-input-request`,subagentName:t.toolName}}function workflowToolRunInputRequests(e){return e.request.kind===`input-batch`?e.request.requests:[normalizeInputRequest(e.request,e.from,e.replyTo)]}function normalizeInputRequest(e,t,n){switch(e.kind){case`authorization-request`:throw TypeError(`A workflow authorization event cannot be normalized as human input.`);case`ask`:return normalizeAskRequest(e.request,t,n);default:return e}}function normalizeAskRequest(e,t,n){if(typeof e.prompt!=`string`||e.prompt.length===0)throw TypeError("A workflow tool run request needs a non-empty `prompt`.");let r={action:{callId:t.callId,input:t.input,kind:`tool-call`,toolName:t.toolName},kind:`question`,prompt:e.prompt,requestId:n};return e.allowFreeform!==void 0&&(r.allowFreeform=e.allowFreeform),e.display!==void 0&&(r.display=e.display),e.options!==void 0&&(r.options=[...e.options]),r}export{workflowToolRunFailureOutput,workflowToolRunInputRequests,workflowToolRunOutcomeToToolResult,workflowToolRunRequestToInputRequestPayload};
|
|
@@ -1,11 +1,22 @@
|
|
|
1
|
-
import type { WorkflowToolRunMessage, WorkflowToolRunRequestMessage, WorkflowToolAuthorizationRequest
|
|
1
|
+
import type { WorkflowToolRunMessage, WorkflowToolRunRequestMessage, WorkflowToolAuthorizationRequest } from "#execution/tools/workflow/messages.js";
|
|
2
2
|
import { type ChannelReader } from "#execution/tools/workflow/owner-channels.js";
|
|
3
|
+
/**
|
|
4
|
+
* The run's inbox as its body sees it. Everything the body sends its session,
|
|
5
|
+
* except the outcome, goes through the run, which relays each message before
|
|
6
|
+
* the outcome.
|
|
7
|
+
*/
|
|
8
|
+
export interface WorkflowToolRunInbox {
|
|
9
|
+
/** Messages that reached the run's inbox so far. */
|
|
10
|
+
readonly sent: number;
|
|
11
|
+
send(message: Exclude<WorkflowToolRunMessage, {
|
|
12
|
+
readonly kind: "outcome";
|
|
13
|
+
}>): Promise<void>;
|
|
14
|
+
}
|
|
3
15
|
export interface WorkflowToolRunOwnerInbox {
|
|
4
|
-
|
|
5
|
-
readonly owner: WorkflowToolRunOwner;
|
|
16
|
+
readonly owner: WorkflowToolRunInbox;
|
|
6
17
|
readonly reader: ChannelReader<"workflow", WorkflowToolRunMessage>;
|
|
7
18
|
}
|
|
8
|
-
/** Receives body messages before routing them to the turn
|
|
19
|
+
/** Receives body messages before routing them to the waiting turn. */
|
|
9
20
|
export declare function openWorkflowToolRunOwnerInbox(): WorkflowToolRunOwnerInbox;
|
|
10
21
|
/** Acknowledge only step-owned events, after delivery or deliberate discard. */
|
|
11
22
|
export declare function deliverWorkflowAuthorization(message: WorkflowToolRunRequestMessage & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createHook}from"#compiled/@workflow/core/index.js";import{
|
|
1
|
+
import{createHook}from"#compiled/@workflow/core/index.js";import{resumeHookStep}from"#execution/tools/workflow/resume-hook-step.js";import{createChannelReader}from"#execution/tools/workflow/owner-channels.js";function openWorkflowToolRunOwnerInbox(){let e=createHook(),t=0;return{owner:{get sent(){return t},async send(n){await resumeHookStep(e.token,n),t+=1}},reader:createChannelReader(`workflow`,e)}}async function deliverWorkflowAuthorization(e,t){await t(),e.request.event.childSessionId===e.from.runId&&await resumeHookStep(e.replyTo,null,{ifPresent:!0})}export{deliverWorkflowAuthorization,openWorkflowToolRunOwnerInbox};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { type StartedWorkflowBody, type WorkflowBodyInput } from "#execution/tools/workflow/body.js";
|
|
2
|
+
/** Starts a `serve` body, which runs once for its task and serves every call to it. */
|
|
3
|
+
export declare function startServeBody(input: WorkflowBodyInput): StartedWorkflowBody;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createRunUsageTally}from"#execution/agent-sessions/usage.js";import{createAgentSessions}from"#execution/agent-sessions/session.js";import{WorkflowToolRunAsks,ask,attachWorkflowToolRunContext}from"#execution/tools/workflow/ask.js";import{WorkflowToolRunCancelledError,createAgentsView,createSharedContext,createWorkflowBodyRef,resolveWorkflowEntryPoint,toFailedOutcome}from"#execution/tools/workflow/body.js";var WorkflowServeCalls=class{asks;run=new AbortController;first;runRef;runSession;owner;usage=createRunUsageTally(()=>this.sendUncarriedUsage());carriedUsage;toolName;seenCallIds;firstReceived=!1;arrived=[];waiting;latest;pendingReceive;stretch;unwindingCancel=!1;endedBy;replies=Promise.resolve();constructor(e){this.runRef=createWorkflowBodyRef(e),this.asks=new WorkflowToolRunAsks(this.runRef.runId),this.runSession=e.session,this.owner=e.owner,this.toolName=e.toolName,this.seenCallIds=new Set([e.callId]),this.first=this.serve({agentContext:e.agentContext,auth:e.session.auth,callId:this.runRef.callId,executeInput:e.executeInput,input:this.runRef.input,sequence:this.runRef.sequence,stepIndex:this.runRef.stepIndex,turnId:this.runRef.turnId}),this.waiting=[this.first],this.latest=this.first}get runSignal(){return this.run.signal}get unwinding(){return this.run.signal.aborted||this.unwindingCancel}get currentSignal(){return this.stretch?.signal??this.run.signal}get current(){return this.latest}apply(e){switch(e.kind){case`call`:this.accept(e.call);return;case`cancel`:this.cancel(new WorkflowToolRunCancelledError(e.reason));return;case`end`:this.end(new WorkflowToolRunCancelledError(e.reason));return;case`interrupt`:return}}receive(){if(!this.firstReceived)return this.firstReceived=!0,Promise.resolve(this.first.call);if(this.unwindingCancel=!1,this.pendingReceive!==void 0)return this.pendingReceive.promise;if(this.endedBy!==void 0)return Promise.reject(this.endedBy);let e=this.arrived.shift();return e===void 0?(this.pendingReceive=createPendingReceive(),this.pendingReceive.promise):(this.take(e),Promise.resolve(e.call))}reply(e){let t=this.waiting;if(t.length===0)return;this.waiting=[],this.arrived.length===0&&(this.stretch=void 0),this.asks.withdrawAll();let n=this.replies;this.replies=n.then(()=>this.deliverReply(t,e))}assertWaiting(){if(!(this.waiting.length>0))throw Error(`ctx.ask() needs a call waiting for a result, but tool "${this.toolName}" already replied to every call it received.`)}async flush(){await this.asks.flush(),await this.replies}sendUncarriedUsage(){if(this.waiting.length>0||this.endedBy!==void 0)return;let{from:e}=this.latest;this.replies=this.replies.then(async()=>{let t=this.usage.total();t===void 0||isSameUsage(t,this.carriedUsage)||(this.carriedUsage=t,await this.owner.send({from:e,kind:`usage`,usage:t}))})}accept(e){if(this.endedBy!==void 0||this.seenCallIds.has(e.callId))return;this.seenCallIds.add(e.callId);let t=this.serve(e),n=this.pendingReceive;if(n===void 0){this.arrived.push(t);return}this.pendingReceive=void 0,this.take(t),n.resolve(t.call)}take(e){this.waiting.push(e),this.latest=e}cancel(e){this.pendingReceive===void 0&&(this.unwindingCancel=!0),this.stretch?.abort(e),this.stretch=void 0,this.waiting=[],this.arrived=[]}end(e){this.asks.cancelAll(),this.endedBy=e,this.run.abort(e),this.stretch?.abort(e);let t=this.pendingReceive;this.pendingReceive=void 0,t?.reject(e)}serve(e){return this.stretch??=new AbortController,{agentContext:e.agentContext,agents:createAgentsView(e.agentContext),call:{abortSignal:this.stretch.signal,callId:e.callId,input:e.executeInput??e.input},from:{...this.runRef,callId:e.callId,input:e.input,sequence:e.sequence,stepIndex:e.stepIndex,turnId:e.turnId},session:{...this.runSession,auth:e.auth,turn:{id:e.turnId,sequence:e.sequence}}}}async deliverReply(e,t){let n=e.at(-1);if(n===void 0)return;let r=e.map(e=>e.from.callId),i=this.usage.total();this.carriedUsage=i,await this.owner.send({callIds:r,from:n.from,kind:`reply`,output:t,...i!==void 0&&{usage:i}})}};function isSameUsage(e,t){return t!==void 0&&e.inputTokens===t.inputTokens&&e.outputTokens===t.outputTokens&&e.cacheReadTokens===t.cacheReadTokens&&e.cacheWriteTokens===t.cacheWriteTokens&&e.costUsd===t.costUsd}function startServeBody(e){let t=new WorkflowServeCalls(e),n={get agentContext(){return t.current.agentContext},asks:t.asks,get auth(){return t.current.session.auth},control:e.hookToken,get from(){return t.current.from},owner:e.owner},r=createAgentSessions(n,t.usage),i=createServeContext(e,t,r.open);return attachWorkflowToolRunContext(i,n),{asks:t.asks,close:r.close,control:t,outcome:executeServeBody(e,t,i),usage:t.usage}}async function executeServeBody(e,t,n){let r;try{r={output:await resolveWorkflowEntryPoint(e)(()=>t.receive(),n),status:`completed`}}catch(e){r=toFailedOutcome(e,t.runSignal)}return await t.flush(),r}function createServeContext(e,t,n){let r={...createSharedContext(e,n,(e,n)=>(t.assertWaiting(),ask(r,e,n))),get abortSignal(){return t.currentSignal},get agents(){return t.current.agents},get callId(){return t.current.from.callId},get session(){return t.current.session},reply:e=>t.reply(e)};return r}function createPendingReceive(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),reject:t,resolve:e}}export{startServeBody};
|
|
@@ -1,26 +1,33 @@
|
|
|
1
1
|
import type { SessionAuth, SessionParent } from "#context/session-context.js";
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
2
|
+
import type { AgentSessionContext } from "#execution/agent-sessions/context.js";
|
|
3
|
+
import type { HarnessSessionBase } from "#harness/types.js";
|
|
4
|
+
import type { RuntimeToolResultActionResult, RuntimeWorkflowTaskRequest, WorkflowToolRunEntry } from "#shared/action-types.js";
|
|
4
5
|
import type { WorkflowToolRunAddress, WorkflowToolRunInput } from "#execution/tools/workflow/types.js";
|
|
5
6
|
import type { WorkflowToolRunOwner } from "#execution/tools/workflow/messages.js";
|
|
6
7
|
/** Starts a new run for each dispatch attempt. Call from a `"use step"` body. */
|
|
7
8
|
export declare function startWorkflowToolRun(input: Omit<WorkflowToolRunInput, "hookToken">): Promise<WorkflowToolRunAddress>;
|
|
8
|
-
/**
|
|
9
|
-
export
|
|
10
|
-
|
|
11
|
-
readonly
|
|
12
|
-
|
|
9
|
+
/** Everything the session knows when it starts one workflow tool call's run. */
|
|
10
|
+
export interface StartWorkflowTaskInput {
|
|
11
|
+
/** Captured for this call, as the context of the sessions opened for it. */
|
|
12
|
+
readonly agentContext: AgentSessionContext;
|
|
13
|
+
/** The caller's auth the session admits the call with. */
|
|
14
|
+
readonly auth: SessionAuth;
|
|
13
15
|
readonly batchEvent: {
|
|
14
16
|
readonly sequence: number;
|
|
15
17
|
readonly stepIndex: number;
|
|
16
18
|
readonly turnId: string;
|
|
17
19
|
};
|
|
18
|
-
readonly initiatorAuth: SessionAuth["initiator"];
|
|
19
20
|
readonly owner: WorkflowToolRunOwner;
|
|
20
21
|
readonly parentSession: SessionParent | undefined;
|
|
21
|
-
readonly session:
|
|
22
|
+
readonly session: HarnessSessionBase;
|
|
22
23
|
readonly task: RuntimeWorkflowTaskRequest;
|
|
23
|
-
}
|
|
24
|
+
}
|
|
25
|
+
/** Starts the run for one call, which invokes `entry`. */
|
|
26
|
+
export declare function startWorkflowToolCallRun(input: StartWorkflowTaskInput, entry: WorkflowToolRunEntry): Promise<WorkflowToolRunAddress>;
|
|
27
|
+
/** Starts the run of an `execute` call the turn waits on and records it on the owning session. */
|
|
28
|
+
export declare function startWorkflowTask(input: StartWorkflowTaskInput): Promise<{
|
|
24
29
|
readonly result?: RuntimeToolResultActionResult;
|
|
25
|
-
readonly session:
|
|
30
|
+
readonly session: HarnessSessionBase;
|
|
26
31
|
}>;
|
|
32
|
+
/** The call's tool result when its run could not start. */
|
|
33
|
+
export declare function startFailureResult(task: RuntimeWorkflowTaskRequest, error: unknown): RuntimeToolResultActionResult;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createLogger,logError}from"#internal/logging.js";import{toError}from"#shared/errors.js";import{startWorkflowOnCurrentDeployment,workflowToolRunWorkflowReference}from"#execution/workflow-runtime.js";import{registerWorkflowToolRun}from"#harness/workflow-tool-runs.js";import{createRuntimeToolResultFromValue}from"#harness/action-result-helpers.js";const log=createLogger(`execution.workflow-tool-run`);async function startWorkflowToolRun(e){let t=crypto.randomUUID();return{hookToken:t,runId:(await startWorkflowOnCurrentDeployment(workflowToolRunWorkflowReference,[{...e,hookToken:t}])).runId}}async function
|
|
1
|
+
import{createLogger,logError}from"#internal/logging.js";import{toError}from"#shared/errors.js";import{startWorkflowOnCurrentDeployment,workflowToolRunWorkflowReference}from"#execution/workflow-runtime.js";import{registerWorkflowToolRun}from"#harness/workflow-tool-runs.js";import{createRuntimeToolResultFromValue}from"#harness/action-result-helpers.js";const log=createLogger(`execution.workflow-tool-run`);async function startWorkflowToolRun(e){let t=e.entry.entryPoint===`execute`?crypto.randomUUID():taskRunHookToken(e.session.id,e.entry.taskId);return{hookToken:t,runId:(await startWorkflowOnCurrentDeployment(workflowToolRunWorkflowReference,[{...e,hookToken:t}])).runId}}function taskRunHookToken(e,t){return`eve:task:${e}:${t}`}async function startWorkflowToolCallRun(e,t){let{task:n,batchEvent:r,session:i}=e;return await startWorkflowToolRun({agentContext:e.agentContext,callId:n.callId,entry:t,executeInput:n.executeInput,input:n.input,owner:e.owner,session:{auth:e.auth,id:i.sessionId,parent:e.parentSession,turn:{id:r.turnId,sequence:r.sequence}},stepIndex:r.stepIndex,toolName:n.toolName,workflowId:n.workflowId})}async function startWorkflowTask(e){let{task:t,batchEvent:n,session:r}=e;try{let i=await startWorkflowToolCallRun(e,{entryPoint:`execute`});return{session:registerWorkflowToolRun(r,{callId:t.callId,origin:{turnId:n.turnId,stepIndex:n.stepIndex},address:i,toolName:t.toolName})}}catch(e){return logError(log,`workflow tool run failed to start`,e,{callId:t.callId,toolName:t.toolName}),{result:startFailureResult(t,e),session:r}}}function startFailureResult(e,t){return createRuntimeToolResultFromValue({callId:e.callId,isError:!0,output:toError(t),toolName:e.toolName})}export{startFailureResult,startWorkflowTask,startWorkflowToolCallRun,startWorkflowToolRun};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ContextContainer,contextStorage}from"#context/container.js";import{AuthKey,InitiatorAuthKey,SessionIdKey,SessionKey}from"#context/keys.js";import{getStepMetadata}from"#compiled/@workflow/core/index.js";import{
|
|
1
|
+
import{ContextContainer,contextStorage}from"#context/container.js";import{AuthKey,InitiatorAuthKey,SessionIdKey,SessionKey}from"#context/keys.js";import{getStepMetadata}from"#compiled/@workflow/core/index.js";import{resolveWorkflowCallbackBaseUrl}from"#execution/workflow-callback-url.js";import{AuthorizationHookKey,CallbackBaseUrlKey,PendingAuthorizationResultKey,isAuthorizationSignal}from"#harness/authorization.js";import{buildBaseToolContext}from"#context/build-base-tool-context.js";import{createAuthorizationContext}from"#runtime/authorization-context.js";import{isConnectionAuthorizationFailedError}from"#connections/errors.js";import{completeWorkflowStepAuthorization}from"#execution/tools/workflow/authorization-completion.js";import"#execution/tools/workflow/step-context.js";function withWorkflowStepAuthorization(e){let wrapped=async function(t){let{args:n,context:r}=t;getStepMetadata();let i=new ContextContainer;return i.set(AuthKey,r.session.auth.current),i.set(InitiatorAuthKey,r.session.auth.initiator),i.set(SessionIdKey,r.session.id),i.setVirtualContext(SessionKey,{...r.session,sessionId:r.session.id}),i.set(CallbackBaseUrlKey,resolveWorkflowCallbackBaseUrl(r.baseUrl)),i.setVirtualContext(AuthorizationHookKey,r.token),i.setVirtualContext(PendingAuthorizationResultKey,r.authorizationResults),contextStorage.run(i,async()=>{let a=createAuthorizationContext({scope:r.toolName,completeAuthorization:completeWorkflowStepAuthorization}),o={...buildBaseToolContext({toolName:r.toolName,options:{abortSignal:r.abortSignal,toolCallId:r.callId}}),agent:()=>unavailableInStep(`ctx.agent()`,`Call ctx.agent() in the workflow body.`),ask:()=>unavailableInStep(`ctx.ask()`,`Call ctx.ask() in the workflow body.`),getToken:a.getToken,requireAuth:a.requireAuth};Object.defineProperty(o,"agents",{get:()=>unavailableInStep(`ctx.agents`,`Read ctx.agents in the workflow body and pass the required serializable metadata into the step.`)});let s;try{s=await a.run(()=>Reflect.apply(e,this,n.map((e,n)=>t.contextIndexes.includes(n)?o:e)))}catch(e){throw isConnectionAuthorizationFailedError(e)&&!e.retryable&&Object.assign(e,{fatal:!0}),e}let c=i.get(PendingAuthorizationResultKey)??[],l=r.authorizationResults.filter(e=>!c.includes(e)).map(e=>e.attemptId);return isAuthorizationSignal(s)?{kind:`authorization-required`,signal:s,authorized:l}:{kind:`result`,output:s,authorized:l}})};return Object.defineProperty(wrapped,"maxRetries",{get:()=>Reflect.get(e,`maxRetries`)}),wrapped}function unavailableInStep(e,t){throw Object.assign(Error(`${e} is unavailable inside a "use step" function. ${t}`),{fatal:!0})}export{withWorkflowStepAuthorization};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createAuthorizationCompletedEvent,createAuthorizationRequiredEvent}from"#protocol/message.js";import{createHook,getWorkflowMetadata}from"#compiled/@workflow/core/index.js";import{disposeHook}from"#execution/hook-ownership.js";import{
|
|
1
|
+
import{createAuthorizationCompletedEvent,createAuthorizationRequiredEvent}from"#protocol/message.js";import{createHook,getWorkflowMetadata}from"#compiled/@workflow/core/index.js";import{disposeHook}from"#execution/hook-ownership.js";import{authorizationEventFields}from"#harness/authorization-event-fields.js";import{findWorkflowToolRunContext}from"#execution/tools/workflow/ask.js";function workflowToolStep(e,t){return new Proxy(e,{apply(e,n,r){let i=findWorkflowContextArgument(r);return i===void 0?Reflect.apply(e,n,r):executeAuthorizedStep(t,n,r,i)}})}function findWorkflowContextArgument(e){for(let t of e){let e=findWorkflowToolRunContext(t);if(e!==void 0)return{ctx:t,run:e}}}async function executeAuthorizedStep(e,t,n,r){let{ctx:i,run:a}=r,o=[],s=new Map;for(;;){let r=createHook();try{let c;try{c=await invokeAuthorizedStep({args:n,authorizationResults:o,callbackToken:r.token,ctx:i,execute:e,receiver:t})}catch(e){throw i.abortSignal.aborted||await reportPendingAsFailed(a,i.abortSignal,s),e}if(await reconcileCompletedAuthorizations(a,i.abortSignal,s,o,c.authorized),c.kind===`result`)return await reportPendingAsFailed(a,i.abortSignal,s),c.output;await collectAuthorizationCallbacks({authorizationResults:o,callback:r,challenges:c.signal.challenges,ctx:i,pending:s,run:a})}finally{await disposeHook(r)}}}async function invokeAuthorizedStep(e){let{args:t,authorizationResults:n,callbackToken:r,ctx:i,execute:a,receiver:o}=e,s={callId:i.callId,toolName:i.toolName,session:i.session,abortSignal:i.abortSignal,baseUrl:getWorkflowMetadata().url,token:r,authorizationResults:n},c={args:t.map(e=>e===i?null:e),context:s,contextIndexes:t.flatMap((e,t)=>e===i?[t]:[])};return await a.call(o,c)}async function reconcileCompletedAuthorizations(e,t,n,r,i){let a=new Set(i);for(let r of a){let i=n.get(r);i!==void 0&&await reportAuthorization(e,t,i,`authorized`),n.delete(r)}for(let e=r.length-1;e>=0;e--){let t=r[e];t!==void 0&&a.has(t.attemptId)&&r.splice(e,1)}}async function collectAuthorizationCallbacks(e){let{authorizationResults:t,callback:n,challenges:r,ctx:i,pending:a,run:o}=e;for(let e of r){let r=requireAttemptId(e);a.set(r.attemptId,r),await reportAuthorization(o,i.abortSignal,r);try{let e=await waitForCallback(n,r,i.abortSignal);t.push({name:r.name,instanceId:r.instanceId,attemptId:r.attemptId,hookUrl:r.hookUrl,principal:r.principal,resume:r.resume,callback:e})}catch(e){throw i.abortSignal.aborted||await reportAuthorization(o,i.abortSignal,r,`failed`),e}}}function requireAttemptId(e){if(e.attemptId===void 0)throw Error(`Workflow authorization challenge "${e.name}" has no attempt id.`);return e}async function reportPendingAsFailed(e,t,n){for(let r of n.values())await reportAuthorization(e,t,r,`failed`)}async function reportAuthorization(e,t,n,r){let i={...authorizationEventFields(n),sequence:e.from.sequence,stepIndex:e.from.stepIndex,taskId:e.from.taskId,turnId:e.from.turnId},a=r===void 0?createAuthorizationRequiredEvent({...i,description:`Sign in to ${n.name} to continue.`,webhookUrl:n.hookUrl}):createAuthorizationCompletedEvent({...i,outcome:r}),o=createHook();try{await withAbort(e.owner.send({kind:`request`,from:e.from,replyTo:o.token,request:{kind:`authorization-request`,event:{kind:`subagent-authorization-event`,callId:e.from.callId,childSessionId:e.from.runId,subagentName:e.from.toolName,event:a}}}),t),await withAbort(o,t)}finally{await disposeHook(o)}}async function waitForCallback(e,t,n){let r=e[Symbol.asyncIterator]();for(;;){let e=await withAbort(r.next(),n);if(e.done)throw Error(`Authorization callback closed before sign-in completed.`);let i=readCallback(e.value,t);if(i!==void 0)return i}}async function withAbort(e,t){let abort,n=new Promise((e,n)=>{abort=()=>n(t.reason??Error(`Workflow authorization cancelled.`)),t.addEventListener(`abort`,abort,{once:!0}),t.aborted&&abort()});try{return await Promise.race([e,n])}finally{t.removeEventListener(`abort`,abort)}}function readCallback(e,t){if(typeof e==`object`&&e&&`payloads`in e&&Array.isArray(e.payloads))for(let n of e.payloads){let e=n?.authorizationCallback;if(e?.attemptId!==t.attemptId||e?.connectionName!==t.name)continue;let r=e.callback;if(!(typeof r?.method!=`string`||typeof r.params!=`object`||r.params===null||Array.isArray(r.params))&&Object.values(r.params).every(e=>typeof e==`string`)&&(r.body===void 0||typeof r.body==`string`))return r}}export{workflowToolStep};
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import type { ActivityObserverConfig } from "#channel/types.js";
|
|
2
|
-
import type { TaskView } from "#tasks/types.js";
|
|
3
1
|
import type { WorkflowBodyDefinition } from "#execution/tools/workflow/body.js";
|
|
4
2
|
import type { WorkflowToolRunOwner } from "#execution/tools/workflow/messages.js";
|
|
5
3
|
export interface WorkflowToolRunInput extends WorkflowBodyDefinition {
|
|
6
|
-
readonly execution?: "background" | "blocking";
|
|
7
4
|
readonly hookToken: string;
|
|
8
5
|
readonly owner: WorkflowToolRunOwner;
|
|
9
6
|
}
|
|
@@ -11,10 +8,3 @@ export interface WorkflowToolRunAddress {
|
|
|
11
8
|
readonly hookToken: string;
|
|
12
9
|
readonly runId: string;
|
|
13
10
|
}
|
|
14
|
-
export interface BackgroundWorkflowToolRunInput {
|
|
15
|
-
readonly activityObserver?: ActivityObserverConfig;
|
|
16
|
-
readonly initialView: TaskView;
|
|
17
|
-
readonly parentContinuationToken: string;
|
|
18
|
-
readonly taskInboxToken: string;
|
|
19
|
-
readonly workflow: WorkflowBodyDefinition;
|
|
20
|
-
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type PublishedSessionEvents, type SessionStepState } from "#execution/publish-session-events.js";
|
|
2
|
+
import { type SessionStateTransition } from "#execution/session/state-delta.js";
|
|
3
|
+
import { type ProxyInputRequest } from "#harness/proxy-input-requests.js";
|
|
4
|
+
/**
|
|
5
|
+
* Decides a run's request to withdraw a question. A question the session
|
|
6
|
+
* still offers is retired and relayed `cancelled`, so channels stop offering
|
|
7
|
+
* it. One it no longer offers was already answered or withdrawn when its turn
|
|
8
|
+
* was cancelled. Either way the run hears `withdrawn`, after any answer the
|
|
9
|
+
* session sent it first, so the question resolves from the session's first
|
|
10
|
+
* decision.
|
|
11
|
+
*/
|
|
12
|
+
export declare function withdrawWorkflowToolRunQuestionStep(input: WithdrawQuestionInput): Promise<SessionStateTransition>;
|
|
13
|
+
type WithdrawQuestionInput = SessionStepState & {
|
|
14
|
+
readonly control: string;
|
|
15
|
+
readonly requestId: string;
|
|
16
|
+
readonly runId: string;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Withdraws the requests a finished run left open: its own questions and those
|
|
20
|
+
* of the sessions it opened, which ended with it. Nobody can answer them now,
|
|
21
|
+
* so each is relayed `cancelled`.
|
|
22
|
+
*/
|
|
23
|
+
export declare function withdrawFinishedRunQuestionsStep(input: SessionStepState & {
|
|
24
|
+
readonly runId: string;
|
|
25
|
+
}): Promise<SessionStateTransition>;
|
|
26
|
+
/**
|
|
27
|
+
* Retires the relayed requests `select` picks and relays the `input.resolved`
|
|
28
|
+
* that reports each one `cancelled`, for a step that owns the session.
|
|
29
|
+
*/
|
|
30
|
+
export declare function relayWithdrawnRequests(input: SessionStepState, select: (requestId: string, route: ProxyInputRequest) => boolean): Promise<PublishedSessionEvents>;
|
|
31
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{readDurableSession,replaceDurableSessionSnapshot}from"#execution/durable-session-store.js";import{relaySessionEvents}from"#execution/publish-session-events.js";import{withSessionStateDelta}from"#execution/session/state-delta.js";import{withdrawProxyInputRequests}from"#harness/proxy-input-requests.js";import{resumeHook}from"#internal/workflow/runtime.js";import{ignoreGoneTarget}from"#execution/tasks/workflow-target.js";async function withdrawWorkflowToolRunQuestionStep(e){"use step";return await withSessionStateDelta(e,withdrawWorkflowToolRunQuestion)}async function withdrawWorkflowToolRunQuestion(e){let t={kind:`withdrawn`,requestId:e.requestId};return await ignoreGoneTarget(resumeHook(e.control,t)),await relayWithdrawnRequests(e,(t,n)=>t===e.requestId&&n.workflowAsk!==void 0&&n.runId===e.runId)}async function withdrawFinishedRunQuestionsStep(e){"use step";return await withSessionStateDelta(e,e=>relayWithdrawnRequests(e,(t,n)=>n.runId===e.runId))}async function relayWithdrawnRequests(e,t){let n=withdrawProxyInputRequests(readDurableSession(e.sessionState),t);return await relaySessionEvents({serializedContext:e.serializedContext,sessionState:replaceDurableSessionSnapshot({session:n.session,state:e.sessionState}),sessionWritable:e.sessionWritable},n.events)}export{relayWithdrawnRequests,withdrawFinishedRunQuestionsStep,withdrawWorkflowToolRunQuestionStep};
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { type ChannelReader } from "#execution/tools/workflow/owner-channels.js";
|
|
2
|
-
import {
|
|
2
|
+
import type { WorkflowToolRunMessage, WorkflowToolRunControlMessage } from "#execution/tools/workflow/messages.js";
|
|
3
3
|
import type { WorkflowToolRunInput } from "#execution/tools/workflow/types.js";
|
|
4
4
|
export interface BlockingWorkflowOwner {
|
|
5
|
-
|
|
5
|
+
/** The session's commands, from the run's control hook. */
|
|
6
6
|
readonly commands: ChannelReader<"control", WorkflowToolRunControlMessage>;
|
|
7
|
-
readonly signal: AbortSignal;
|
|
8
|
-
handleCommand(message: WorkflowToolRunControlMessage): void;
|
|
9
7
|
handleMessage(message: WorkflowToolRunMessage): Promise<void>;
|
|
10
8
|
}
|
|
11
|
-
/**
|
|
9
|
+
/** The run's link to its session: commands arrive on its control hook, and its messages go to the session's inbox. */
|
|
12
10
|
export declare function createBlockingWorkflow(input: WorkflowToolRunInput): BlockingWorkflowOwner;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createHook}from"#compiled/@workflow/core/index.js";import{resumeHookStep}from"#execution/tools/workflow/resume-hook-step.js";import{
|
|
1
|
+
import{createHook}from"#compiled/@workflow/core/index.js";import{resumeHookStep}from"#execution/tools/workflow/resume-hook-step.js";import{createChannelReader}from"#execution/tools/workflow/owner-channels.js";function createBlockingWorkflow(e){let t=createHook({token:e.hookToken});return{commands:createChannelReader(`control`,t),handleMessage(t){return resumeHookStep(e.owner.inbox,t,{ifPresent:t.kind===`outcome`&&t.result.status===`cancelled`})}}}export{createBlockingWorkflow};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
/** Owns
|
|
3
|
-
export declare function workflowToolRunWorkflow(input: WorkflowToolRunInput
|
|
1
|
+
import type { WorkflowToolRunInput } from "#execution/tools/workflow/types.js";
|
|
2
|
+
/** Owns command intake, body execution, and settlement for one workflow tool call. */
|
|
3
|
+
export declare function workflowToolRunWorkflow(input: WorkflowToolRunInput): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{sleep}from"#compiled/@workflow/core/index.js";import{normalizeSerializableError}from"#execution/workflow-errors.js";import{openWorkflowToolRunOwnerInbox}from"#execution/tools/workflow/owner.js";import{WORKFLOW_CANCELLATION_CLEANUP_MS}from"#execution/tools/workflow/cancellation-policy.js";import{createChannelReader,raceChannelReads}from"#execution/tools/workflow/owner-channels.js";import{createWorkflowBodyRef,
|
|
1
|
+
import{sleep}from"#compiled/@workflow/core/index.js";import{normalizeSerializableError}from"#execution/workflow-errors.js";import{openWorkflowToolRunOwnerInbox}from"#execution/tools/workflow/owner.js";import{WORKFLOW_CANCELLATION_CLEANUP_MS}from"#execution/tools/workflow/cancellation-policy.js";import{resumeHookStep}from"#execution/tools/workflow/resume-hook-step.js";import{createChannelReader,raceChannelReads}from"#execution/tools/workflow/owner-channels.js";import{createWorkflowBodyRef,startCallBody}from"#execution/tools/workflow/body.js";import{isWorkflowToolRunAskDecision,isWorkflowToolRunControlMessage}from"#execution/tools/workflow/messages.js";import{createBlockingWorkflow}from"#execution/tools/workflow/workflow-owner-blocking.js";import{startServeBody}from"#execution/tools/workflow/serve.js";async function workflowToolRunWorkflow(e){"use workflow";let t=createBlockingWorkflow(e),n=openWorkflowToolRunOwnerInbox();e.entry.entryPoint!==`execute`&&await reportTaskStarted(e);let r=startWorkflowBody({...e,owner:n.owner}),i=r.control.runSignal,a=createChannelReader(`body`,awaitBodyOutcome(r.outcome)),o=!0,s=0,c,l,u;try{for(;;){if(r.control.unwinding&&(l??=sleep(WORKFLOW_CANCELLATION_CLEANUP_MS).then(()=>`cancel`)),c!==void 0&&s>=n.owner.sent&&t.commands.landed.length===0&&t.commands.failure===void 0){u=c;break}let e;try{let r=[];o&&r.push(t.commands),r.push(n.reader),c===void 0&&r.push(a),e=await raceChannelReads(r,l)}catch(e){if(t.commands.failure!==void 0)throw e;u={status:`failed`,error:normalizeSerializableError(e)};break}if(e===`cancel`){if(!r.control.unwinding){l=void 0;continue}i.aborted||r.control.apply({kind:`end`,reason:`The task was cancelled and its serve body didn't return to receive() within 30 seconds.`});break}if(e.next.done){if(e.channel===`control`){o=!1;continue}if(e.channel===`body`){u={status:`failed`,error:`Workflow body ended without an outcome.`};break}if(i.aborted)break;return}if(e.channel===`control`){r.control.unwinding||(l=void 0),applyControlMessage(r,e.next.value);continue}if(e.channel===`body`){c=e.next.value;continue}let d=e.next.value;d.kind!==`outcome`&&(s+=1,await t.handleMessage(d))}}finally{await r.close()}if(i.aborted&&(u={status:`cancelled`,reason:i.reason instanceof Error?i.reason.message:String(i.reason??``)}),u!==void 0){let n=r.usage.total();await t.handleMessage({from:createWorkflowBodyRef(e),kind:`outcome`,result:u,...n!==void 0&&{usage:n}})}}async function reportTaskStarted(e){await resumeHookStep(e.owner.inbox,{from:createWorkflowBodyRef(e),kind:`started`},{ifPresent:!0})}function applyControlMessage(e,t){if(isWorkflowToolRunControlMessage(t)){if(isWorkflowToolRunAskDecision(t)){e.asks.settle(t);return}e.control.apply(t)}}function startWorkflowBody(e){switch(e.entry.entryPoint){case`execute`:case`task`:return startCallBody(e);case`serve`:return startServeBody(e)}}async function*awaitBodyOutcome(e){yield await e}workflowToolRunWorkflow.workflowId=`workflow//eve//workflowToolRunWorkflow`;export{workflowToolRunWorkflow};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isLoopbackHostname,isPrivateOrReservedIpAddress}from"#shared/network-address.js";import{
|
|
1
|
+
import{isIP}from"node:net";import{isLoopbackHostname,isPrivateOrReservedIpAddress}from"#shared/network-address.js";import{lookup}from"node:dns";const REDIRECT_STATUSES=new Set([301,302,303,307,308]),UNSAFE_DESTINATION_ERROR=`URL must not target localhost, private, link-local, or reserved IP addresses.`;async function requestPublicUrl(e,t){let n=parseHttpsUrl(e);for(let e=0;;e++){let{dispatcher:r,response:i}=await requestOnce(n,t);try{let r=i.headers.get(`location`);if(r!==null&&REDIRECT_STATUSES.has(i.status)&&e<10){await cancelResponseBody(i),n=parseHttpsUrl(new URL(r,n).toString());continue}return await consumeResponse(i,t.maxResponseSize)}finally{await r.close()}}}function parseHttpsUrl(e){let t;try{t=new URL(e)}catch{throw Error(`URL must be a valid absolute https:// URL.`)}if(t.protocol!==`https:`)throw Error(`URL must start with https://`);return t}async function requestOnce(e,t){assertPublicHostname(e.hostname);let{Agent:n,Dispatcher1Wrapper:r}=await import(`undici`),i=new r(new n({connect:{lookup:createPublicLookup()}}));try{return{dispatcher:i,response:await fetchWithDispatcher(e,{dispatcher:i,headers:t.headers,redirect:`manual`,signal:t.signal})}}catch(e){throw await i.close(),e}}function fetchWithDispatcher(e,t){return fetch(e,t)}function assertPublicHostname(e){let t=e.replace(/^\[(.*)\]$/u,`$1`);if(isIP(t)!==0){assertPublicAddress(t);return}if(isLoopbackHostname(t))throw Error(UNSAFE_DESTINATION_ERROR)}function assertPublicAddress(e){if(isPrivateOrReservedIpAddress(e))throw Error(UNSAFE_DESTINATION_ERROR)}function createPublicLookup(){return(e,t,n)=>{lookup(e,{all:!0,verbatim:!0},(r,i)=>{if(r!==null){n(r,``,0);return}try{for(let{address:e}of i)assertPublicAddress(e)}catch(e){n(e,``,0);return}let a=t.family===void 0||t.family===0?i:i.filter(({family:e})=>e===t.family);if(a.length===0){let t=Error(`Unable to resolve URL hostname "${e}" in the requested IP family.`);Object.assign(t,{code:`ENOTFOUND`}),n(t,``,0);return}if(t.all===!0){n(null,a);return}let o=a[0];n(null,o.address,o.family)})}}async function consumeResponse(e,t){let n=parseContentLength(e.headers.get(`content-length`));if(n!==void 0&&n>t)throw await cancelResponseBody(e),createResponseTooLargeError();let r=await readBoundedBody(e,t),i=r.byteLength===0?null:Uint8Array.from(r).buffer;return new Response(i,{headers:e.headers,status:e.status,statusText:e.statusText})}function parseContentLength(e){if(e===null)return;let t=Number.parseInt(e,10);return Number.isFinite(t)&&t>=0?t:void 0}async function readBoundedBody(e,t){if(e.body===null)return new Uint8Array;let n=e.body.getReader(),r=[],i=0;try{for(;;){let{done:e,value:a}=await n.read();if(e)break;if(i+=a.byteLength,i>t)throw await n.cancel(),createResponseTooLargeError();r.push(a)}}finally{n.releaseLock()}let a=new Uint8Array(i),o=0;for(let e of r)a.set(e,o),o+=e.byteLength;return a}async function cancelResponseBody(e){try{await e.body?.cancel()}catch{}}function createResponseTooLargeError(){return Error(`Response too large (exceeds 5 MB limit).`)}export{requestPublicUrl};
|
|
@@ -28,8 +28,3 @@ export declare function resolveWorkflowCallbackBaseUrl(metadataUrl: string): str
|
|
|
28
28
|
* `new URL(path, base)` would drop for absolute paths.
|
|
29
29
|
*/
|
|
30
30
|
export declare function createWorkflowCallbackUrl(baseUrl: string, callbackPath: string): string;
|
|
31
|
-
/**
|
|
32
|
-
* Builds a callback to a remote task child without disclosing this deployment's
|
|
33
|
-
* protection bypass secret to an authored external origin.
|
|
34
|
-
*/
|
|
35
|
-
export declare function createRemoteTaskInputCallbackUrl(baseUrl: string, callbackPath: string): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{joinEveRoutePath}from"#shared/eve-route-path.js";import{EVE_PUBLIC_ROUTE_PREFIX_ENV,normalizePublicRoutePrefix}from"#shared/public-route-prefix.js";
|
|
1
|
+
import{joinEveRoutePath}from"#shared/eve-route-path.js";import{EVE_PUBLIC_ROUTE_PREFIX_ENV,normalizePublicRoutePrefix}from"#shared/public-route-prefix.js";function resolveVercelProductionCallbackBaseUrl(){return process.env.VERCEL_ENV===`production`&&process.env.VERCEL_PROJECT_PRODUCTION_URL?`https://${process.env.VERCEL_PROJECT_PRODUCTION_URL}`:null}function resolveWorkflowCallbackBaseUrl(e){let t=process.env.WORKFLOW_LOCAL_BASE_URL?.trim()||void 0,n=(resolveVercelProductionCallbackBaseUrl()??t??e).replace(/\/$/,``),r=normalizePublicRoutePrefix(process.env[EVE_PUBLIC_ROUTE_PREFIX_ENV]);return r===void 0?n:`${n}${r}`}function createWorkflowCallbackUrl(e,t){let n=new URL(t,`http://eve.local`),r=new URL(e);r.pathname=joinEveRoutePath(r.pathname,n.pathname),r.search=n.search;let i=process.env.VERCEL_AUTOMATION_BYPASS_SECRET?.trim();return i&&r.searchParams.set(`x-vercel-protection-bypass`,i),r.toString()}export{createWorkflowCallbackUrl,resolveVercelProductionCallbackBaseUrl,resolveWorkflowCallbackBaseUrl};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CancelTurnInput, CancelTurnResult, DeliverHookPayload, Runtime } from "#channel/types.js";
|
|
1
|
+
import type { CancelTurnInput, CancelTurnResult, DeliverHookPayload, DispatchSessionInput, Runtime, SessionCommand, SessionCommandResult } from "#channel/types.js";
|
|
2
2
|
import { type Run, type StartOptionsWithoutDeploymentId, type WorkflowFunction, type WorkflowMetadata } from "#internal/workflow/runtime.js";
|
|
3
3
|
import type { RuntimeCompiledArtifactsSource } from "#runtime/compiled-artifacts-source.js";
|
|
4
4
|
import type { SessionCheckpoint } from "#execution/session/handoff.js";
|
|
@@ -19,10 +19,6 @@ export declare const workflowEntryReference: {
|
|
|
19
19
|
export declare const sessionTimeoutWorkflowReference: {
|
|
20
20
|
workflowId: string;
|
|
21
21
|
};
|
|
22
|
-
/** Stable workflow reference for root-session activity collectors. */
|
|
23
|
-
export declare const activityCollectorWorkflowReference: {
|
|
24
|
-
workflowId: string;
|
|
25
|
-
};
|
|
26
22
|
/** Stable workflow reference for authored workflow tool runs. */
|
|
27
23
|
export declare const workflowToolRunWorkflowReference: {
|
|
28
24
|
workflowId: string;
|
|
@@ -46,6 +42,8 @@ export interface SessionOwnerStartInput {
|
|
|
46
42
|
}
|
|
47
43
|
/** Starts a successor owner and binds its output to the original session stream. */
|
|
48
44
|
export declare function startSessionOwnerStep(input: SessionOwnerStartInput): Promise<void>;
|
|
45
|
+
/** Sends one command to a session through its stable command inbox. */
|
|
46
|
+
export declare function dispatchWorkflowSessionCommand<TCommand extends SessionCommand>(input: DispatchSessionInput<TCommand>): Promise<SessionCommandResult<TCommand>>;
|
|
49
47
|
/** Requests cancellation through a session's stable command inbox. */
|
|
50
48
|
export declare function requestWorkflowTurnCancellation(input: CancelTurnInput): Promise<CancelTurnResult>;
|
|
51
49
|
/**
|