eve 0.68.0 → 0.70.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +132 -0
- package/bin/eve.js +15 -0
- package/dist/src/_virtual/_rolldown/runtime.js +1 -1
- package/dist/src/acp/adapter.js +1 -1
- package/dist/src/approval/definition.d.ts +19 -5
- package/dist/src/channel/adapter.d.ts +2 -0
- package/dist/src/channel/auth/oidc.js +1 -1
- package/dist/src/channel/channel-address.d.ts +1 -4
- package/dist/src/channel/channel-address.js +1 -1
- package/dist/src/channel/channel-operations.d.ts +4 -11
- package/dist/src/channel/channel-operations.js +1 -1
- package/dist/src/channel/compiled-channel.d.ts +0 -2
- package/dist/src/channel/compiled-channel.js +2 -2
- package/dist/src/channel/cross-channel-receive.d.ts +1 -3
- package/dist/src/channel/cross-channel-receive.js +1 -1
- package/dist/src/channel/forwarded-principal.js +1 -1
- package/dist/src/channel/schedule-auth.d.ts +16 -0
- package/dist/src/channel/schedule-auth.js +1 -1
- package/dist/src/channel/session-callback.js +1 -1
- package/dist/src/channel/session.d.ts +3 -8
- package/dist/src/channel/session.js +1 -1
- package/dist/src/channel/task-card.d.ts +121 -0
- package/dist/src/channel/task-card.js +1 -0
- package/dist/src/channel/types.d.ts +30 -57
- package/dist/src/chunks/{use-eve-agent-D4HVZBjn.js → use-eve-agent-CJQeE7-t.js} +2058 -1331
- package/dist/src/chunks/{use-eve-agent-DXcE_8Ja.js → use-eve-agent-DdemtY6C.js} +2061 -1331
- package/dist/src/cli/commands/info.d.ts +11 -0
- package/dist/src/cli/commands/info.js +1 -1
- package/dist/src/cli/commands/init-agent-workspace.js +1 -1
- package/dist/src/cli/commands/init.js +1 -1
- package/dist/src/cli/dev/command-options.d.ts +2 -2
- package/dist/src/cli/dev/command.js +1 -1
- package/dist/src/cli/dev/console-records-preload.d.ts +1 -0
- package/dist/src/cli/dev/console-records-preload.js +1 -0
- package/dist/src/cli/dev/console-records.d.ts +17 -0
- package/dist/src/cli/dev/console-records.js +3 -0
- package/dist/src/cli/dev/diagnostic-sink.d.ts +1 -0
- package/dist/src/cli/dev/local-server-process.js +1 -1
- package/dist/src/cli/dev/tui/blocks.d.ts +21 -19
- package/dist/src/cli/dev/tui/blocks.js +4 -4
- package/dist/src/cli/dev/tui/command-typeahead.d.ts +3 -6
- package/dist/src/cli/dev/tui/conversation-view.d.ts +54 -0
- package/dist/src/cli/dev/tui/conversation-view.js +1 -0
- package/dist/src/cli/dev/tui/diagnostic-presentation.d.ts +10 -0
- package/dist/src/cli/dev/tui/diagnostic-presentation.js +3 -2
- package/dist/src/cli/dev/tui/flow-drawer.d.ts +5 -2
- package/dist/src/cli/dev/tui/flow-drawer.js +1 -1
- package/dist/src/cli/dev/tui/log-display-mode.d.ts +4 -10
- package/dist/src/cli/dev/tui/log-display-mode.js +1 -1
- package/dist/src/cli/dev/tui/message-queue.d.ts +7 -63
- package/dist/src/cli/dev/tui/message-queue.js +3 -1
- package/dist/src/cli/dev/tui/prompt-commands.js +1 -1
- package/dist/src/cli/dev/tui/prompt-placeholder.d.ts +2 -0
- package/dist/src/cli/dev/tui/prompt-placeholder.js +1 -0
- package/dist/src/cli/dev/tui/question-panel.d.ts +3 -1
- package/dist/src/cli/dev/tui/question-panel.js +1 -1
- package/dist/src/cli/dev/tui/rail.d.ts +1 -1
- package/dist/src/cli/dev/tui/runner.d.ts +60 -174
- package/dist/src/cli/dev/tui/runner.js +3 -3
- package/dist/src/cli/dev/tui/status-line.d.ts +4 -2
- package/dist/src/cli/dev/tui/status-line.js +1 -1
- package/dist/src/cli/dev/tui/task-activity.d.ts +59 -0
- package/dist/src/cli/dev/tui/task-activity.js +1 -0
- package/dist/src/cli/dev/tui/terminal-renderer.d.ts +18 -57
- package/dist/src/cli/dev/tui/terminal-renderer.js +10 -13
- package/dist/src/cli/dev/tui/terminal-tool-part.d.ts +2 -0
- package/dist/src/cli/dev/tui/terminal-tool-part.js +1 -0
- package/dist/src/cli/dev/tui/test/fake-eve-server.d.ts +34 -0
- package/dist/src/cli/dev/tui/test/fake-eve-server.js +1 -0
- package/dist/src/cli/dev/tui/test/index.d.ts +1 -0
- package/dist/src/cli/dev/tui/test/index.js +1 -1
- package/dist/src/cli/dev/tui/theme.d.ts +1 -1
- package/dist/src/cli/dev/tui/theme.js +1 -1
- package/dist/src/cli/dev/tui/tool-block-groups.d.ts +6 -9
- package/dist/src/cli/dev/tui/tool-block-groups.js +1 -1
- package/dist/src/cli/dev/tui/tool-presentation.d.ts +17 -3
- package/dist/src/cli/dev/tui/tool-presentation.js +1 -1
- package/dist/src/cli/dev/tui/tool-rows.d.ts +1 -0
- package/dist/src/cli/dev/tui/tool-rows.js +2 -2
- package/dist/src/cli/dev/tui/traces/trace-conversation.js +3 -1
- package/dist/src/cli/dev/tui/traces/trace-view.js +1 -1
- package/dist/src/cli/dev/tui/transcript-parts.d.ts +73 -0
- package/dist/src/cli/dev/tui/transcript-parts.js +3 -0
- package/dist/src/cli/dev/tui/transcript.d.ts +47 -0
- package/dist/src/cli/dev/tui/transcript.js +1 -0
- package/dist/src/cli/dev/tui/tui.js +1 -1
- package/dist/src/cli/dev/tui/turn-clock.d.ts +11 -26
- package/dist/src/cli/dev/tui/turn-clock.js +1 -1
- package/dist/src/cli/dev/tui/types.d.ts +13 -9
- package/dist/src/cli/dev/ui-options.d.ts +2 -2
- package/dist/src/cli/dev/ui-options.js +1 -1
- package/dist/src/cli/option-parsers.d.ts +3 -1
- package/dist/src/cli/option-parsers.js +1 -1
- package/dist/src/cli/ui/terminal-text.js +1 -1
- package/dist/src/client/agent-info-schema.d.ts +150 -9
- package/dist/src/client/agent-info-schema.js +1 -1
- package/dist/src/client/agent-session.d.ts +28 -0
- package/dist/src/client/agent-session.js +1 -0
- package/dist/src/client/agent-stream-follower.d.ts +26 -0
- package/dist/src/client/agent-stream-follower.js +1 -0
- package/dist/src/client/authorization-message-parts.js +1 -1
- package/dist/src/client/conversation-client.d.ts +40 -0
- package/dist/src/client/conversation-client.js +1 -0
- package/dist/src/client/conversation-reducer.d.ts +29 -0
- package/dist/src/client/conversation-reducer.js +1 -0
- package/dist/src/client/conversation-state.d.ts +110 -0
- package/dist/src/client/conversation-state.js +1 -0
- package/dist/src/client/eve-agent-projection.d.ts +24 -7
- package/dist/src/client/eve-agent-projection.js +1 -1
- package/dist/src/client/eve-agent-store-helpers.d.ts +20 -1
- package/dist/src/client/eve-agent-store-helpers.js +2 -2
- package/dist/src/client/eve-agent-store-state.d.ts +15 -3
- package/dist/src/client/eve-agent-store.d.ts +10 -1
- package/dist/src/client/eve-agent-store.js +1 -1
- package/dist/src/client/index.d.ts +5 -1
- package/dist/src/client/index.js +1 -1
- package/dist/src/client/message-action-parts.js +1 -1
- package/dist/src/client/message-reducer-primitives.d.ts +1 -2
- package/dist/src/client/message-reducer-primitives.js +1 -1
- package/dist/src/client/message-reducer-types.d.ts +9 -2
- package/dist/src/client/message-reducer.js +1 -1
- package/dist/src/client/message-response.js +1 -1
- package/dist/src/client/message-run-parts.d.ts +10 -6
- package/dist/src/client/message-run-parts.js +1 -1
- package/dist/src/client/message-task-parts.d.ts +8 -0
- package/dist/src/client/message-task-parts.js +1 -0
- package/dist/src/client/optimistic-message-submissions.d.ts +6 -4
- package/dist/src/client/optimistic-message-submissions.js +1 -1
- package/dist/src/client/reducer.d.ts +5 -1
- package/dist/src/client/session-controls.d.ts +0 -1
- package/dist/src/client/session-turn-dispatch.d.ts +15 -0
- package/dist/src/client/session-turn-dispatch.js +1 -0
- package/dist/src/client/session-utils.d.ts +29 -2
- package/dist/src/client/session-utils.js +1 -1
- package/dist/src/client/session.d.ts +8 -16
- package/dist/src/client/session.js +1 -1
- package/dist/src/client/stream-version.js +1 -1
- package/dist/src/client/types.d.ts +4 -5
- package/dist/src/compiled/.vendor-stamp.json +3 -2
- package/dist/src/compiled/@eve/catalog/index.js +1 -1
- package/dist/src/compiled/@vercel/connect/LICENSE +202 -0
- package/dist/src/compiled/@vercel/connect/authorization-details.d.ts +11 -0
- package/dist/src/compiled/@vercel/connect/authorization.d.ts +47 -0
- package/dist/src/compiled/@vercel/connect/connector.d.ts +32 -0
- package/dist/src/compiled/@vercel/connect/index.d.ts +5 -0
- package/dist/src/compiled/@vercel/connect/index.js +26 -0
- package/dist/src/compiled/@vercel/connect/installation.d.ts +48 -0
- package/dist/src/compiled/@vercel/connect/token.d.ts +137 -0
- package/dist/src/compiled/@workflow/core/runtime.js +3 -3
- package/dist/src/compiler/bundled-extension.d.ts +7 -1
- package/dist/src/compiler/bundled-extension.js +1 -1
- package/dist/src/compiler/default-tool-policy.d.ts +2 -2
- package/dist/src/compiler/default-tool-policy.js +1 -1
- package/dist/src/compiler/development-extensions.js +1 -1
- package/dist/src/compiler/extension-compatibility.d.ts +54 -18
- package/dist/src/compiler/extension-compatibility.js +1 -1
- package/dist/src/compiler/extension-mount-bindings.d.ts +5 -0
- package/dist/src/compiler/extension-mount-bindings.js +1 -0
- package/dist/src/compiler/load-binding-namespace.d.ts +10 -2
- package/dist/src/compiler/load-binding-namespace.js +1 -1
- package/dist/src/compiler/manifest.d.ts +19 -17
- package/dist/src/compiler/manifest.js +1 -1
- package/dist/src/compiler/module-lifecycle.d.ts +2 -2
- package/dist/src/compiler/module-lifecycle.js +1 -1
- package/dist/src/compiler/module-map.d.ts +1 -1
- package/dist/src/compiler/module-map.js +3 -3
- package/dist/src/compiler/normalize-manifest-helpers.d.ts +18 -1
- package/dist/src/compiler/normalize-manifest-helpers.js +1 -1
- package/dist/src/compiler/normalize-manifest-types.d.ts +2 -0
- package/dist/src/compiler/normalize-manifest.js +1 -1
- package/dist/src/compiler/normalize-subagent.js +1 -1
- package/dist/src/compiler/normalize-tool.js +1 -1
- package/dist/src/compiler/project-sources.d.ts +4 -0
- package/dist/src/compiler/project-sources.js +1 -1
- package/dist/src/compiler/remote-agent-node.js +1 -1
- package/dist/src/compiler/source-graph.d.ts +5 -0
- package/dist/src/compiler/source-graph.js +1 -1
- package/dist/src/computer-use/extension/lib/computer-use-sandbox.d.ts +8 -0
- package/dist/src/computer-use/extension/lib/computer-use-sandbox.js +3 -3
- package/dist/src/computer-use/extension/lib/computer-use.d.ts +2 -0
- package/dist/src/computer-use/extension/lib/computer-use.js +2 -1
- package/dist/src/computer-use/extension/tools/computer_use.js +1 -1
- package/dist/src/context/build-dynamic-tools.js +1 -1
- package/dist/src/context/dynamic-subagent-lifecycle.d.ts +5 -0
- package/dist/src/context/dynamic-subagent-lifecycle.js +1 -1
- package/dist/src/context/dynamic-tool-lifecycle.js +1 -1
- package/dist/src/context/dynamic-tool-metadata.d.ts +1 -1
- package/dist/src/context/key-names.d.ts +0 -1
- package/dist/src/context/key-names.js +1 -1
- package/dist/src/context/keys.d.ts +12 -15
- package/dist/src/context/keys.js +1 -1
- package/dist/src/context/memory-lifecycle.js +1 -1
- package/dist/src/context/memory-tools.d.ts +0 -1
- package/dist/src/context/provider.d.ts +5 -11
- package/dist/src/context/run-step.d.ts +5 -6
- package/dist/src/context/run-step.js +1 -1
- package/dist/src/context/serialize.js +1 -1
- package/dist/src/discover/bundled-extension.js +1 -1
- package/dist/src/discover/discover-agent.js +1 -1
- package/dist/src/discover/extensions.d.ts +0 -7
- package/dist/src/discover/extensions.js +1 -1
- package/dist/src/discover/manifest.d.ts +4 -0
- package/dist/src/evals/assertions/run.d.ts +4 -3
- package/dist/src/evals/assertions/run.js +1 -1
- package/dist/src/evals/index.d.ts +1 -1
- package/dist/src/evals/match.d.ts +4 -4
- package/dist/src/evals/mock-model.js +1 -1
- package/dist/src/evals/runner/derive-run-facts.d.ts +3 -3
- package/dist/src/evals/runner/derive-run-facts.js +1 -1
- package/dist/src/evals/runner/execute-task.js +1 -1
- package/dist/src/evals/runner/reporters/assertion-scores.d.ts +19 -0
- package/dist/src/evals/runner/reporters/assertion-scores.js +1 -0
- package/dist/src/evals/runner/reporters/braintrust.js +1 -1
- package/dist/src/evals/runner/reporters/datadog-client.d.ts +123 -0
- package/dist/src/evals/runner/reporters/datadog-client.js +4 -0
- package/dist/src/evals/runner/reporters/datadog.d.ts +9 -98
- package/dist/src/evals/runner/reporters/datadog.js +2 -3
- package/dist/src/evals/session-content.js +1 -1
- package/dist/src/evals/session.d.ts +4 -4
- package/dist/src/evals/session.js +2 -2
- package/dist/src/evals/types.d.ts +34 -15
- package/dist/src/eve-channel/create-request.d.ts +5 -4
- package/dist/src/eve-channel/create-request.js +1 -1
- package/dist/src/eve-channel/index.d.ts +0 -9
- package/dist/src/eve-channel/index.js +1 -1
- package/dist/src/eve-channel/request.d.ts +3 -7
- package/dist/src/eve-channel/request.js +1 -1
- package/dist/src/eve-channel/support.d.ts +15 -5
- package/dist/src/eve-channel/support.js +1 -1
- package/dist/src/eve-channel/turn-policy-request.d.ts +2 -0
- package/dist/src/eve-channel/turn-policy-request.js +1 -0
- package/dist/src/eve-channel/types.d.ts +4 -0
- package/dist/src/execution/agent-sessions/context.d.ts +62 -0
- package/dist/src/execution/agent-sessions/context.js +1 -0
- package/dist/src/{subagents/remote-dispatch.d.ts → execution/agent-sessions/remote.d.ts} +17 -40
- package/dist/src/execution/agent-sessions/remote.js +1 -0
- package/dist/src/execution/agent-sessions/requests.d.ts +20 -0
- package/dist/src/execution/agent-sessions/requests.js +1 -0
- package/dist/src/execution/agent-sessions/session.d.ts +12 -0
- package/dist/src/execution/agent-sessions/session.js +1 -0
- package/dist/src/execution/agent-sessions/steps.d.ts +59 -0
- package/dist/src/execution/agent-sessions/steps.js +1 -0
- package/dist/src/execution/agent-sessions/target.d.ts +45 -0
- package/dist/src/execution/agent-sessions/target.js +1 -0
- package/dist/src/execution/agent-sessions/usage.d.ts +18 -0
- package/dist/src/execution/agent-sessions/usage.js +1 -0
- package/dist/src/execution/authorization-callback-match.d.ts +2 -4
- package/dist/src/execution/authorization-callback-match.js +1 -1
- package/dist/src/execution/cancel-descendant-turns-step.d.ts +1 -5
- package/dist/src/execution/cancel-descendant-turns-step.js +1 -1
- package/dist/src/execution/cancelled-model-call-batch.js +1 -1
- package/dist/src/execution/connection-announcement.d.ts +7 -0
- package/dist/src/execution/connection-announcement.js +4 -0
- package/dist/src/execution/continuation-conflict-step.d.ts +2 -3
- package/dist/src/execution/continuation-conflict-step.js +1 -1
- package/dist/src/execution/coordination-dispatch-shared.d.ts +12 -28
- package/dist/src/execution/coordination-dispatch-shared.js +1 -1
- package/dist/src/execution/coordination-dispatch-step.d.ts +3 -2
- package/dist/src/execution/coordination-dispatch-step.js +1 -1
- package/dist/src/execution/create-session-step.d.ts +4 -3
- package/dist/src/execution/create-session-step.js +1 -1
- package/dist/src/execution/deliver-payloads.js +1 -1
- package/dist/src/execution/durable-session-store.d.ts +10 -5
- package/dist/src/execution/durable-session-store.js +1 -1
- package/dist/src/execution/dynamic-connections.js +1 -1
- package/dist/src/execution/dynamic-workflow/program-step.js +1 -1
- package/dist/src/execution/dynamic-workflow/schema.d.ts +1 -3
- package/dist/src/execution/dynamic-workflow/schema.js +1 -1
- package/dist/src/execution/dynamic-workflow/tool.d.ts +1 -1
- package/dist/src/execution/dynamic-workflow/tool.js +1 -1
- package/dist/src/execution/dynamic-workflow/workflow.js +1 -1
- package/dist/src/execution/forward-session-input.d.ts +4 -0
- package/dist/src/execution/forward-session-input.js +1 -0
- package/dist/src/execution/legacy-remote-agent/protocol.d.ts +41 -0
- package/dist/src/execution/legacy-remote-agent/protocol.js +1 -0
- package/dist/src/execution/legacy-session/authorization.js +1 -1
- package/dist/src/execution/legacy-session/completion-step.d.ts +2 -0
- package/dist/src/execution/legacy-session/completion-step.js +1 -1
- package/dist/src/execution/legacy-session/inbox.js +1 -1
- package/dist/src/execution/legacy-session/input.js +1 -1
- package/dist/src/execution/legacy-session/interrupt-step.js +1 -1
- package/dist/src/execution/legacy-session/prepare-step.d.ts +1 -0
- package/dist/src/execution/legacy-session/prepare-step.js +1 -1
- package/dist/src/execution/legacy-session/snapshot.d.ts +8 -4
- package/dist/src/execution/legacy-session/snapshot.js +1 -1
- package/dist/src/execution/legacy-session/turn-workflow.js +1 -1
- package/dist/src/execution/model-call-batching.js +1 -1
- package/dist/src/execution/node-step.d.ts +1 -1
- package/dist/src/execution/node-step.js +1 -1
- package/dist/src/execution/proxied-deliver-step.d.ts +9 -6
- package/dist/src/execution/proxied-deliver-step.js +1 -1
- package/dist/src/execution/publish-session-events.d.ts +150 -0
- package/dist/src/execution/publish-session-events.js +1 -0
- package/dist/src/execution/reconcile-session-continuation-token.d.ts +2 -2
- package/dist/src/execution/route-child-delivery.d.ts +5 -4
- package/dist/src/execution/route-child-delivery.js +1 -3
- package/dist/src/execution/runtime-context.js +1 -1
- package/dist/src/execution/sandbox/prewarm.js +1 -1
- package/dist/src/execution/session/active-turn.d.ts +97 -0
- package/dist/src/execution/session/active-turn.js +1 -0
- package/dist/src/execution/session/admission.d.ts +1 -12
- package/dist/src/execution/session/admission.js +1 -1
- package/dist/src/execution/session/entry-input.d.ts +0 -2
- package/dist/src/execution/session/entry.js +1 -1
- package/dist/src/execution/session/finalization.js +1 -1
- package/dist/src/execution/session/handoff-steps.d.ts +13 -2
- package/dist/src/execution/session/handoff-steps.js +1 -1
- package/dist/src/execution/session/handoff.d.ts +21 -5
- package/dist/src/execution/session/handoff.js +1 -1
- package/dist/src/execution/session/input-queue.d.ts +44 -39
- package/dist/src/execution/session/input-queue.js +1 -1
- package/dist/src/execution/session/next-input.d.ts +7 -10
- package/dist/src/execution/session/next-input.js +1 -1
- package/dist/src/execution/session/pending-turn-state.d.ts +2 -0
- package/dist/src/execution/session/pending-turn-state.js +1 -1
- package/dist/src/execution/session/principal.d.ts +14 -0
- package/dist/src/execution/session/principal.js +1 -0
- package/dist/src/execution/session/program.d.ts +2 -0
- package/dist/src/execution/session/program.js +1 -1
- package/dist/src/execution/session/route-selected-delivery.js +1 -1
- package/dist/src/execution/session/state-cursor.d.ts +26 -18
- package/dist/src/execution/session/state-cursor.js +1 -1
- package/dist/src/execution/session/state-delta.d.ts +40 -0
- package/dist/src/execution/session/state-delta.js +1 -0
- package/dist/src/execution/session/timeout-steps.js +1 -1
- package/dist/src/execution/session/turn-event-handler.d.ts +2 -2
- package/dist/src/execution/session/turn-event-handler.js +1 -1
- package/dist/src/execution/session/turn-step-result.d.ts +1 -3
- package/dist/src/execution/session/turn-step-result.js +1 -1
- package/dist/src/execution/session/turn-step-types.d.ts +37 -19
- package/dist/src/execution/session/turn-step.d.ts +2 -2
- package/dist/src/execution/session/turn-step.js +1 -1
- package/dist/src/execution/session/turn-waiting-step.d.ts +4 -0
- package/dist/src/execution/session/turn-waiting-step.js +1 -0
- package/dist/src/execution/session/turn.d.ts +41 -3
- package/dist/src/execution/session/turn.js +1 -1
- package/dist/src/execution/session-callback-request.js +1 -1
- package/dist/src/execution/session-event-stream.d.ts +33 -0
- package/dist/src/execution/session-event-stream.js +1 -0
- package/dist/src/execution/session-inbox/inbox.d.ts +2 -0
- package/dist/src/execution/session-inbox/inbox.js +1 -1
- package/dist/src/execution/session-inbox/protocol.js +1 -1
- package/dist/src/execution/session-inbox/release-step.js +1 -1
- package/dist/src/execution/session-inbox/resume.js +1 -1
- package/dist/src/execution/session-workflow-tool-run.d.ts +11 -2
- package/dist/src/execution/session-workflow-tool-run.js +1 -1
- package/dist/src/execution/session.d.ts +5 -6
- package/dist/src/execution/session.js +2 -2
- package/dist/src/execution/settle-cancelled-turn-step.d.ts +23 -10
- package/dist/src/execution/settle-cancelled-turn-step.js +1 -1
- package/dist/src/execution/stable-workflow-names.d.ts +0 -1
- package/dist/src/execution/stable-workflow-names.js +1 -1
- package/dist/src/execution/tasks/calls.d.ts +42 -0
- package/dist/src/execution/tasks/calls.js +1 -0
- package/dist/src/execution/tasks/model-step.d.ts +58 -0
- package/dist/src/execution/tasks/model-step.js +1 -0
- package/dist/src/execution/tasks/render.d.ts +66 -0
- package/dist/src/execution/tasks/render.js +8 -0
- package/dist/src/execution/tasks/session.d.ts +19 -0
- package/dist/src/execution/tasks/session.js +1 -0
- package/dist/src/execution/tasks/start.d.ts +34 -0
- package/dist/src/execution/tasks/start.js +1 -0
- package/dist/src/execution/tasks/steps.d.ts +31 -0
- package/dist/src/execution/tasks/steps.js +1 -0
- package/dist/src/execution/tasks/table.d.ts +192 -0
- package/dist/src/execution/tasks/table.js +1 -0
- package/dist/src/execution/tasks/task-id-input.d.ts +19 -0
- package/dist/src/execution/tasks/task-id-input.js +1 -0
- package/dist/src/execution/tasks/tool-entry-point.d.ts +11 -0
- package/dist/src/execution/tasks/tool-entry-point.js +1 -0
- package/dist/src/execution/tasks/workflow-target.d.ts +2 -0
- package/dist/src/execution/tasks/workflow-target.js +1 -1
- package/dist/src/execution/terminal-session-completion-step.d.ts +2 -0
- package/dist/src/execution/terminal-session-completion-step.js +1 -1
- package/dist/src/execution/terminal-session-failure-step.d.ts +2 -0
- package/dist/src/execution/terminal-session-failure-step.js +1 -1
- package/dist/src/execution/terminate-child-sessions-step.d.ts +2 -9
- package/dist/src/execution/terminate-child-sessions-step.js +1 -1
- package/dist/src/execution/tool-auth.js +1 -1
- package/dist/src/execution/tools/agent-router-workflow.d.ts +1 -1
- package/dist/src/execution/tools/agent-router-workflow.js +1 -1
- package/dist/src/execution/tools/agent-router.d.ts +1 -1
- package/dist/src/execution/tools/agent-router.js +1 -1
- package/dist/src/execution/tools/connection-approval.d.ts +25 -0
- package/dist/src/execution/tools/connection-approval.js +1 -0
- package/dist/src/execution/tools/connection-search-rank.d.ts +21 -0
- package/dist/src/execution/tools/connection-search-rank.js +1 -0
- package/dist/src/execution/tools/connection-target.d.ts +18 -0
- package/dist/src/execution/tools/connection-target.js +1 -0
- package/dist/src/execution/tools/connection-tools.d.ts +10 -0
- package/dist/src/execution/tools/connection-tools.js +2 -0
- package/dist/src/execution/tools/load-skill.js +1 -1
- package/dist/src/execution/tools/workflow/answer.d.ts +7 -4
- package/dist/src/execution/tools/workflow/answer.js +1 -1
- package/dist/src/execution/tools/workflow/ask.d.ts +73 -10
- package/dist/src/execution/tools/workflow/ask.js +1 -1
- package/dist/src/execution/tools/workflow/body.d.ts +60 -19
- package/dist/src/execution/tools/workflow/body.js +1 -1
- package/dist/src/execution/tools/workflow/cancel.d.ts +7 -2
- package/dist/src/execution/tools/workflow/cancel.js +1 -1
- package/dist/src/execution/tools/workflow/emit-workflow-tool-run-report-step.d.ts +10 -4
- package/dist/src/execution/tools/workflow/emit-workflow-tool-run-report-step.js +1 -1
- package/dist/src/execution/tools/workflow/{background.d.ts → harness-definition.d.ts} +6 -6
- package/dist/src/execution/tools/workflow/harness-definition.js +1 -0
- package/dist/src/execution/tools/workflow/interrupt.d.ts +6 -0
- package/dist/src/execution/tools/workflow/interrupt.js +1 -0
- package/dist/src/execution/tools/workflow/messages.d.ts +135 -10
- package/dist/src/execution/tools/workflow/messages.js +1 -1
- package/dist/src/execution/tools/workflow/owner-inbox.js +1 -1
- package/dist/src/execution/tools/workflow/owner.d.ts +15 -4
- package/dist/src/execution/tools/workflow/owner.js +1 -1
- package/dist/src/execution/tools/workflow/serve.d.ts +3 -0
- package/dist/src/execution/tools/workflow/serve.js +1 -0
- package/dist/src/execution/tools/workflow/start.d.ts +18 -11
- package/dist/src/execution/tools/workflow/start.js +1 -1
- package/dist/src/execution/tools/workflow/step-execution.js +1 -1
- package/dist/src/execution/tools/workflow/step.js +1 -1
- package/dist/src/execution/tools/workflow/types.d.ts +0 -10
- package/dist/src/execution/tools/workflow/withdraw-step.d.ts +31 -0
- package/dist/src/execution/tools/workflow/withdraw-step.js +1 -0
- package/dist/src/execution/tools/workflow/workflow-owner-blocking.d.ts +3 -5
- package/dist/src/execution/tools/workflow/workflow-owner-blocking.js +1 -1
- package/dist/src/execution/tools/workflow/workflow.d.ts +3 -3
- package/dist/src/execution/tools/workflow/workflow.js +1 -1
- package/dist/src/execution/web-fetch/request.js +1 -1
- package/dist/src/execution/workflow-callback-url.d.ts +0 -5
- package/dist/src/execution/workflow-callback-url.js +1 -1
- package/dist/src/execution/workflow-runtime.d.ts +3 -5
- package/dist/src/execution/workflow-runtime.js +1 -1
- package/dist/src/execution/workflow-webhook-route.js +1 -1
- package/dist/src/extensions/code/extension/lib/connect-authentication.js +1 -1
- package/dist/src/extensions/code/extension/lib/github-shell.js +1 -1
- package/dist/src/extensions/code/extension/lib/prwatch-github.js +1 -1
- package/dist/src/framework/sources/modules/agent.d.ts +1 -0
- package/dist/src/framework/sources/modules/agent.js +1 -1
- package/dist/src/framework/sources/registry.js +1 -1
- package/dist/src/harness/action-presentation.js +1 -1
- package/dist/src/harness/action-result-helpers.d.ts +1 -0
- package/dist/src/harness/action-result-helpers.js +1 -1
- package/dist/src/harness/advertised-tools.d.ts +1 -1
- package/dist/src/harness/advertised-tools.js +1 -1
- package/dist/src/harness/announcements.d.ts +22 -0
- package/dist/src/harness/announcements.js +1 -0
- package/dist/src/harness/approval-candidates.d.ts +10 -2
- package/dist/src/harness/approval-candidates.js +1 -1
- package/dist/src/harness/approval-delivery-coordinator.d.ts +4 -5
- package/dist/src/harness/approval-delivery-coordinator.js +1 -1
- package/dist/src/harness/approval-recheck.d.ts +7 -0
- package/dist/src/harness/approval-recheck.js +1 -0
- package/dist/src/harness/authorization-event-fields.d.ts +13 -0
- package/dist/src/harness/authorization-event-fields.js +1 -0
- package/dist/src/harness/authorization.d.ts +17 -3
- package/dist/src/harness/authorization.js +1 -1
- package/dist/src/harness/cancelled-turn-emission.d.ts +2 -1
- package/dist/src/harness/cancelled-turn-emission.js +1 -1
- package/dist/src/harness/coordination.d.ts +36 -30
- package/dist/src/harness/coordination.js +1 -1
- package/dist/src/harness/current-messages.d.ts +6 -1
- package/dist/src/harness/current-messages.js +1 -1
- package/dist/src/harness/emission.d.ts +11 -2
- package/dist/src/harness/emission.js +1 -1
- package/dist/src/harness/execute-tool.d.ts +4 -15
- package/dist/src/harness/held-requests.d.ts +18 -0
- package/dist/src/harness/held-requests.js +1 -0
- package/dist/src/harness/hitl/approval-input-requests.d.ts +16 -0
- package/dist/src/harness/hitl/approval-input-requests.js +1 -1
- package/dist/src/harness/hitl/session-limit-input-requests.d.ts +2 -0
- package/dist/src/harness/hitl/session-limit-input-requests.js +1 -1
- package/dist/src/harness/input-extraction.js +1 -1
- package/dist/src/harness/input-request-resolution.d.ts +5 -2
- package/dist/src/harness/input-request-resolution.js +1 -1
- package/dist/src/harness/input-requests.d.ts +0 -4
- package/dist/src/harness/input-requests.js +1 -1
- package/dist/src/harness/messages.d.ts +11 -3
- package/dist/src/harness/messages.js +1 -1
- package/dist/src/harness/model-call-error.js +1 -1
- package/dist/src/harness/nested-actions.d.ts +23 -0
- package/dist/src/harness/nested-actions.js +1 -0
- package/dist/src/harness/pending-input-batches.d.ts +8 -6
- package/dist/src/harness/pending-input-batches.js +1 -1
- package/dist/src/harness/provider-tool-history.d.ts +7 -2
- package/dist/src/harness/provider-tool-history.js +1 -1
- package/dist/src/harness/proxy-input-requests.d.ts +45 -40
- package/dist/src/harness/proxy-input-requests.js +1 -1
- package/dist/src/harness/session-limit-enforcement.js +1 -1
- package/dist/src/harness/stale-input-responses.js +1 -1
- package/dist/src/harness/step-hooks.js +1 -1
- package/dist/src/harness/tool-loop.js +2 -2
- package/dist/src/harness/tool-model-output.js +1 -1
- package/dist/src/harness/tool-presentation.js +1 -1
- package/dist/src/harness/tools.d.ts +1 -5
- package/dist/src/harness/tools.js +1 -1
- package/dist/src/harness/turn-tag-state.d.ts +8 -5
- package/dist/src/harness/turn-tag-state.js +1 -1
- package/dist/src/harness/types.d.ts +25 -21
- package/dist/src/harness/workflow-dispatch.d.ts +30 -0
- package/dist/src/harness/workflow-dispatch.js +1 -0
- package/dist/src/harness/workflow-tool-runs.d.ts +5 -65
- package/dist/src/harness/workflow-tool-runs.js +1 -1
- package/dist/src/instrumentation/channel-delivery.d.ts +1 -0
- package/dist/src/instrumentation/channel-delivery.js +1 -1
- package/dist/src/instrumentation/lifecycle.d.ts +7 -0
- package/dist/src/instrumentation/memory.d.ts +2 -0
- package/dist/src/instrumentation/memory.js +1 -1
- package/dist/src/instrumentation/native-events.d.ts +1 -7
- package/dist/src/instrumentation/native-events.js +1 -1
- package/dist/src/instrumentation/runtime.d.ts +5 -7
- package/dist/src/instrumentation/runtime.js +1 -1
- package/dist/src/instrumentation/session-init.js +1 -1
- package/dist/src/instrumentation/state.d.ts +0 -6
- package/dist/src/instrumentation/state.js +1 -1
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/internal/authored-definition/schema-backed.d.ts +10 -0
- package/dist/src/internal/authored-definition/schema-backed.js +1 -1
- package/dist/src/internal/authored-module-loader.d.ts +20 -6
- package/dist/src/internal/authored-module-loader.js +2 -2
- package/dist/src/internal/authored-module-map-loader.js +1 -1
- package/dist/src/internal/authored-package-boundary.d.ts +3 -0
- package/dist/src/internal/authored-package-boundary.js +1 -1
- package/dist/src/internal/bundler/extension-mount-plugin.d.ts +14 -0
- package/dist/src/internal/bundler/extension-mount-plugin.js +1 -0
- package/dist/src/internal/bundler/extension-scope-plugin.d.ts +8 -11
- package/dist/src/internal/bundler/extension-scope-plugin.js +2 -3
- package/dist/src/internal/invocation/workflow-execution.d.ts +2 -2
- package/dist/src/internal/invocation/workflow-execution.js +1 -1
- package/dist/src/internal/mount-state.d.ts +1 -0
- package/dist/src/internal/mount-state.js +1 -0
- package/dist/src/internal/nitro/host/build-application.js +1 -1
- package/dist/src/internal/nitro/host/create-application-nitro.js +1 -1
- package/dist/src/internal/nitro/host/dev-host-fingerprint.js +1 -1
- package/dist/src/internal/nitro/host/extension-capability-requirements.js +1 -1
- package/dist/src/internal/nitro/host/workspace-extensions.js +1 -1
- package/dist/src/internal/nitro/routes/runtime-stack.js +1 -1
- package/dist/src/internal/node-esm-compat-banner.js +1 -1
- package/dist/src/internal/workflow/development-world-client.js +1 -1
- package/dist/src/internal/workflow-bundle/authored-workflow-directives.d.ts +4 -3
- package/dist/src/internal/workflow-bundle/authored-workflow-directives.js +1 -1
- package/dist/src/internal/workflow-bundle/builder.js +1 -1
- package/dist/src/internal/workflow-bundle/dynamic-capability-transform-plugin.js +1 -1
- package/dist/src/internal/workflow-bundle/dynamic-remote-agent-transform.js +1 -1
- package/dist/src/internal/workflow-bundle/dynamic-tool-ast-references.d.ts +27 -1
- package/dist/src/internal/workflow-bundle/dynamic-tool-ast-references.js +1 -1
- package/dist/src/internal/workflow-bundle/dynamic-tool-transform.js +2 -2
- package/dist/src/internal/workflow-bundle/workflow-builders.js +1 -1
- package/dist/src/models/auto.d.ts +6 -0
- package/dist/src/models/auto.js +2 -2
- package/dist/src/protocol/message-version.d.ts +1 -0
- package/dist/src/protocol/message-version.js +1 -1
- package/dist/src/protocol/message.d.ts +166 -69
- package/dist/src/protocol/message.js +2 -2
- package/dist/src/protocol/remote-agent-protocol.d.ts +16 -0
- package/dist/src/protocol/remote-agent-protocol.js +1 -0
- package/dist/src/protocol/routes.d.ts +0 -6
- package/dist/src/protocol/routes.js +1 -1
- package/dist/src/protocol/task-tools.d.ts +21 -0
- package/dist/src/protocol/task-tools.js +1 -0
- package/dist/src/public/channels/auth.js +1 -1
- package/dist/src/public/channels/chat-sdk/chatSdkChannel.d.ts +25 -16
- package/dist/src/public/channels/chat-sdk/chatSdkChannel.js +2 -2
- package/dist/src/public/channels/chat-sdk/index.d.ts +1 -1
- package/dist/src/public/channels/chat-sdk/input-actions.d.ts +8 -0
- package/dist/src/public/channels/chat-sdk/input-actions.js +1 -0
- package/dist/src/public/channels/index.d.ts +1 -1
- package/dist/src/public/channels/linq/linqChannel.js +1 -1
- package/dist/src/public/channels/photon/photonIMessageChannel.js +1 -1
- package/dist/src/public/channels/slack/action-status.d.ts +11 -12
- package/dist/src/public/channels/slack/action-status.js +1 -1
- package/dist/src/public/channels/slack/api.js +1 -1
- package/dist/src/public/channels/slack/approval-cards.d.ts +15 -0
- package/dist/src/public/channels/slack/approval-cards.js +2 -0
- package/dist/src/public/channels/slack/attachments.js +1 -1
- package/dist/src/public/channels/slack/auth.d.ts +5 -0
- package/dist/src/public/channels/slack/auth.js +1 -1
- package/dist/src/public/channels/slack/connections.d.ts +20 -16
- package/dist/src/public/channels/slack/connections.js +1 -1
- package/dist/src/public/channels/slack/defaults.d.ts +13 -33
- package/dist/src/public/channels/slack/defaults.js +3 -4
- package/dist/src/public/channels/slack/hitl.d.ts +22 -13
- package/dist/src/public/channels/slack/hitl.js +2 -2
- package/dist/src/public/channels/slack/inbound.d.ts +10 -2
- package/dist/src/public/channels/slack/inbound.js +1 -1
- package/dist/src/public/channels/slack/index.d.ts +6 -3
- package/dist/src/public/channels/slack/index.js +1 -1
- package/dist/src/public/channels/slack/input-response.d.ts +1 -5
- package/dist/src/public/channels/slack/input-response.js +1 -1
- package/dist/src/public/channels/slack/interaction-cards.js +1 -1
- package/dist/src/public/channels/slack/interactions.js +1 -1
- package/dist/src/public/channels/slack/limits.d.ts +5 -3
- package/dist/src/public/channels/slack/private-approval-delivery.js +1 -1
- package/dist/src/public/channels/slack/renderers.d.ts +76 -0
- package/dist/src/public/channels/slack/renderers.js +1 -0
- package/dist/src/public/channels/slack/reply-delivery.d.ts +72 -0
- package/dist/src/public/channels/slack/reply-delivery.js +1 -0
- package/dist/src/public/channels/slack/session-operations.d.ts +6 -0
- package/dist/src/public/channels/slack/session-operations.js +1 -1
- package/dist/src/public/channels/slack/sign-in-cancel.d.ts +20 -0
- package/dist/src/public/channels/slack/sign-in-cancel.js +1 -0
- package/dist/src/public/channels/slack/slackChannel.d.ts +62 -103
- package/dist/src/public/channels/slack/slackChannel.js +1 -1
- package/dist/src/public/channels/slack/task-card.d.ts +24 -0
- package/dist/src/public/channels/slack/task-card.js +1 -0
- package/dist/src/public/channels/teams/defaults.d.ts +1 -1
- package/dist/src/public/channels/teams/defaults.js +2 -2
- package/dist/src/public/channels/telegram/hitl.d.ts +7 -1
- package/dist/src/public/channels/telegram/hitl.js +2 -1
- package/dist/src/public/channels/telegram/state.js +1 -1
- package/dist/src/public/channels/telegram/telegramChannel.d.ts +5 -0
- package/dist/src/public/channels/telegram/telegramChannel.js +1 -1
- package/dist/src/public/definitions/channel.d.ts +7 -1
- package/dist/src/public/definitions/channel.js +1 -1
- package/dist/src/public/definitions/connections/mcp.d.ts +4 -6
- package/dist/src/public/definitions/connections/openapi.d.ts +7 -8
- package/dist/src/public/definitions/extension.d.ts +2 -2
- package/dist/src/public/definitions/extension.js +1 -1
- package/dist/src/public/definitions/hook.d.ts +4 -4
- package/dist/src/public/definitions/state.d.ts +4 -2
- package/dist/src/public/definitions/state.js +1 -1
- package/dist/src/public/memory/index.d.ts +0 -1
- package/dist/src/public/models/openai/index.d.ts +1 -1
- package/dist/src/public/models/openai/index.js +1 -1
- package/dist/src/public/next/index.js +1 -1
- package/dist/src/public/next/server.d.ts +2 -0
- package/dist/src/public/next/server.js +1 -2
- package/dist/src/public/nuxt/module.d.ts +6 -0
- package/dist/src/public/nuxt/module.js +1 -1
- package/dist/src/public/schedules/index.d.ts +1 -0
- package/dist/src/public/schedules/index.js +1 -1
- package/dist/src/public/server/index.d.ts +28 -0
- package/dist/src/public/server/index.js +1 -0
- package/dist/src/public/tools/index.d.ts +3 -2
- package/dist/src/public/tools/index.js +1 -1
- package/dist/src/public/tools/no-reply.d.ts +1 -0
- package/dist/src/public/tools/no-reply.js +1 -0
- package/dist/src/react/index.d.ts +3 -0
- package/dist/src/react/index.js +1 -1
- package/dist/src/react/use-eve-agent.d.ts +7 -5
- package/dist/src/react/use-eve-agent.js +1 -1
- package/dist/src/runtime/agent/bootstrap-model-utils.d.ts +6 -7
- package/dist/src/runtime/agent/bootstrap-model-utils.js +1 -1
- package/dist/src/runtime/agent/bootstrap.d.ts +0 -1
- package/dist/src/runtime/agent/bootstrap.js +1 -1
- package/dist/src/runtime/agent/mock-model-adapter.js +1 -1
- package/dist/src/runtime/agent/mock-model-fixtures.d.ts +1 -1
- package/dist/src/runtime/agent/mock-model-fixtures.js +2 -2
- package/dist/src/runtime/channels/registry.js +1 -1
- package/dist/src/runtime/connections/mcp-client.d.ts +1 -9
- package/dist/src/runtime/connections/mcp-client.js +1 -1
- package/dist/src/runtime/connections/openapi-client.js +1 -1
- package/dist/src/runtime/connections/scoped-authorization.d.ts +3 -1
- package/dist/src/runtime/connections/scoped-authorization.js +1 -1
- package/dist/src/runtime/connections/tool-result.d.ts +27 -0
- package/dist/src/runtime/connections/tool-result.js +2 -0
- package/dist/src/runtime/connections/tool-signature.d.ts +14 -0
- package/dist/src/runtime/connections/tool-signature.js +1 -0
- package/dist/src/runtime/local-dev-capability.js +1 -1
- package/dist/src/runtime/prompt/compose.d.ts +1 -3
- package/dist/src/runtime/prompt/compose.js +3 -3
- package/dist/src/runtime/resolve-agent-graph.js +1 -1
- package/dist/src/runtime/resolve-tool.js +1 -1
- package/dist/src/runtime/sessions/compiled-agent-cache.js +1 -1
- package/dist/src/runtime/sessions/runtime-context-keys.js +1 -1
- package/dist/src/runtime/sessions/turn.d.ts +1 -16
- package/dist/src/runtime/subagents/dynamic-remote-agent-config.js +1 -1
- package/dist/src/runtime/subagents/registry.js +1 -1
- package/dist/src/runtime/subagents/workflow-reference.d.ts +6 -3
- package/dist/src/runtime/subagents/workflow-reference.js +1 -1
- package/dist/src/runtime/subagents/workflow.d.ts +12 -6
- package/dist/src/runtime/subagents/workflow.js +1 -1
- package/dist/src/runtime/tools/registry.js +1 -1
- package/dist/src/self-modification/extension/classify-registry-item.d.ts +3 -0
- package/dist/src/self-modification/extension/classify-registry-item.js +1 -1
- package/dist/src/self-modification/extension/subagents/agent/agent.d.ts +1 -1
- package/dist/src/self-modification/extension/subagents/agent/agent.js +1 -1
- package/dist/src/self-modification/extension/subagents/agent/instructions.js +7 -7
- package/dist/src/self-modification/extension/subagents/agent/tools/registry_add.js +1 -1
- package/dist/src/self-modification/extension/subagents/agent/tools/search_registry.d.ts +2 -0
- package/dist/src/self-modification/extension/subagents/agent/tools/search_registry.js +1 -1
- package/dist/src/self-modification/scaffold.d.ts +2 -0
- package/dist/src/self-modification/scaffold.js +7 -0
- package/dist/src/self-modification/setup.js +1 -7
- package/dist/src/setup/boxes/deploy-project.js +1 -1
- package/dist/src/setup/boxes/select-model.js +1 -1
- package/dist/src/setup/integrations/shopify/templates.d.ts +1 -1
- package/dist/src/setup/integrations/shopify/templates.js +31 -19
- package/dist/src/setup/integrations/web/setup.js +6 -2
- package/dist/src/setup/scaffold/create/agent-paths.d.ts +5 -0
- package/dist/src/setup/scaffold/create/agent-paths.js +1 -0
- package/dist/src/setup/scaffold/create/instructions-template.d.ts +1 -0
- package/dist/src/setup/scaffold/create/instructions-template.js +8 -0
- package/dist/src/setup/scaffold/create/project.js +3 -10
- package/dist/src/setup/scaffold/create/web-template.d.ts +2 -2
- package/dist/src/setup/scaffold/create/web-template.js +28 -9
- package/dist/src/setup/vercel-project-framework.js +1 -1
- package/dist/src/shared/action-request-name.d.ts +3 -0
- package/dist/src/shared/action-request-name.js +1 -0
- package/dist/src/shared/action-types.d.ts +49 -21
- package/dist/src/shared/action-types.js +1 -1
- package/dist/src/shared/agent-definition.d.ts +0 -7
- package/dist/src/shared/chatgpt-model.d.ts +1 -1
- package/dist/src/shared/chatgpt-model.js +1 -1
- package/dist/src/shared/connection-types.d.ts +2 -8
- package/dist/src/shared/default-agent-model.d.ts +10 -1
- package/dist/src/shared/default-agent-model.js +1 -1
- package/dist/src/shared/display-name.d.ts +15 -0
- package/dist/src/shared/display-name.js +1 -0
- package/dist/src/shared/extension-mount.d.ts +2 -0
- package/dist/src/shared/extension-mount.js +1 -0
- package/dist/src/shared/format-duration.d.ts +2 -0
- package/dist/src/shared/format-duration.js +1 -0
- package/dist/src/shared/framework-eve-server.d.ts +43 -0
- package/dist/src/shared/framework-eve-server.js +2 -0
- package/dist/src/shared/input.d.ts +1 -0
- package/dist/src/shared/memory-state.d.ts +1 -0
- package/dist/src/shared/memory-state.js +1 -1
- package/dist/src/shared/model-helper.d.ts +2 -2
- package/dist/src/shared/model-helper.js +1 -1
- package/dist/src/shared/model-summary.d.ts +2 -6
- package/dist/src/shared/model-summary.js +1 -1
- package/dist/src/shared/presentation-text.d.ts +5 -0
- package/dist/src/shared/presentation-text.js +1 -1
- package/dist/src/shared/serialized-observability-state.d.ts +0 -4
- package/dist/src/shared/serialized-observability-state.js +1 -1
- package/dist/src/shared/token-usage.d.ts +2 -0
- package/dist/src/shared/token-usage.js +1 -1
- package/dist/src/shared/trace-root.d.ts +8 -0
- package/dist/src/shared/trace-root.js +1 -0
- package/dist/src/shared/value-delta.d.ts +39 -0
- package/dist/src/shared/value-delta.js +1 -0
- package/dist/src/subagents/adapter-state.d.ts +0 -2
- package/dist/src/subagents/adapter-state.js +1 -1
- package/dist/src/subagents/adapter.js +1 -1
- package/dist/src/subagents/callback-route.js +1 -1
- package/dist/src/subagents/event-proxy-step.d.ts +16 -29
- package/dist/src/subagents/event-proxy-step.js +1 -1
- package/dist/src/subagents/hitl-proxy.d.ts +38 -20
- package/dist/src/subagents/hitl-proxy.js +1 -1
- package/dist/src/subagents/invocation.d.ts +4 -3
- package/dist/src/subagents/parent-notification.d.ts +2 -1
- package/dist/src/subagents/parent-notification.js +1 -1
- package/dist/src/subagents/token-budget.d.ts +8 -9
- package/dist/src/subagents/token-budget.js +1 -1
- package/dist/src/subagents/tool.d.ts +6 -12
- package/dist/src/subagents/tool.js +1 -1
- package/dist/src/svelte/index.d.ts +3 -0
- package/dist/src/svelte/index.js +2 -2
- package/dist/src/svelte/use-eve-agent.d.ts +7 -4
- package/dist/src/svelte/use-eve-agent.js +1 -1
- package/dist/src/tools/behavior.d.ts +5 -5
- package/dist/src/tools/definition.d.ts +50 -14
- package/dist/src/tools/definition.js +1 -1
- package/dist/src/tools/durable-callbacks.d.ts +1 -1
- package/dist/src/tools/dynamic.d.ts +6 -0
- package/dist/src/tools/framework/agent-contract.d.ts +2 -5
- package/dist/src/tools/framework/agent-contract.js +1 -1
- package/dist/src/tools/framework/agent.d.ts +2 -5
- package/dist/src/tools/framework/agent.js +1 -1
- package/dist/src/tools/framework/connection-tools.d.ts +3 -0
- package/dist/src/tools/framework/connection-tools.js +1 -0
- package/dist/src/tools/provided/agent-router.d.ts +6 -3
- package/dist/src/tools/provided/agent-router.js +1 -1
- package/dist/src/{execution/tools → tools/provided}/ask-question-workflow.d.ts +3 -4
- package/dist/src/tools/provided/ask-question-workflow.js +1 -0
- package/dist/src/tools/provided/ask-question.d.ts +20 -5
- package/dist/src/tools/provided/ask-question.js +2 -1
- package/dist/src/tools/provided/interrupted.d.ts +18 -0
- package/dist/src/tools/provided/interrupted.js +1 -0
- package/dist/src/tools/provided/load-skill.js +1 -1
- package/dist/src/tools/provided/no-reply.d.ts +19 -0
- package/dist/src/tools/provided/no-reply.js +1 -0
- package/dist/src/tools/provided/sleep-workflow.d.ts +4 -0
- package/dist/src/tools/provided/sleep-workflow.js +1 -0
- package/dist/src/tools/provided/sleep.d.ts +11 -5
- package/dist/src/tools/provided/sleep.js +1 -1
- package/dist/src/tools/provided/task-cancel.d.ts +6 -0
- package/dist/src/tools/provided/task-cancel.js +1 -0
- package/dist/src/tools/provided/task-wait.d.ts +9 -0
- package/dist/src/tools/provided/task-wait.js +1 -0
- package/dist/src/tools/provided/workflow.d.ts +2 -2
- package/dist/src/tools/provided/workflow.js +1 -1
- package/dist/src/tools/schema-emission.d.ts +23 -0
- package/dist/src/tools/schema-emission.js +1 -0
- package/dist/src/tools/schema.d.ts +22 -8
- package/dist/src/tools/schema.js +1 -1
- package/dist/src/tools/workflow-definition.d.ts +187 -85
- package/dist/src/tools/workflow-definition.js +1 -1
- package/dist/src/tools/workflow-entry-point.d.ts +3 -0
- package/dist/src/tools/workflow-entry-point.js +1 -0
- package/dist/src/tracing/agent-action-instrumentation.d.ts +1 -3
- package/dist/src/tracing/agent-action-instrumentation.js +1 -1
- package/dist/src/tracing/agent-approval-instrumentation.js +1 -1
- package/dist/src/tracing/agent-invocation-coordinator.d.ts +9 -18
- package/dist/src/tracing/agent-invocation-coordinator.js +1 -1
- package/dist/src/tracing/agent-memory-instrumentation.js +1 -1
- package/dist/src/tracing/agent-otel-attributes.d.ts +6 -0
- package/dist/src/tracing/agent-otel-attributes.js +1 -1
- package/dist/src/tracing/agent-otel-content.d.ts +0 -2
- package/dist/src/tracing/agent-otel-content.js +3 -3
- package/dist/src/tracing/agent-otel-provider.js +2 -2
- package/dist/src/tracing/agent-otel-runtime-context.d.ts +20 -0
- package/dist/src/tracing/agent-otel-runtime-context.js +1 -1
- package/dist/src/tracing/agent-otel-session-context.js +1 -1
- package/dist/src/tracing/agent-otel-usage.js +1 -1
- package/dist/src/tracing/agent-span-contract.d.ts +1 -1
- package/dist/src/tracing/agent-span-contract.js +1 -1
- package/dist/src/tracing/agent-span-id-generator.d.ts +0 -1
- package/dist/src/tracing/agent-span-id-generator.js +1 -1
- package/dist/src/tracing/agent-tool-instrumentation.js +1 -1
- package/dist/src/tracing/agent-trace-context-codec.d.ts +5 -2
- package/dist/src/tracing/agent-trace-context-codec.js +1 -1
- package/dist/src/tracing/agent-trace-context-store.d.ts +2 -27
- package/dist/src/tracing/agent-trace-context-store.js +1 -1
- package/dist/src/tracing/agent-trace-span-processor.js +1 -1
- package/dist/src/tracing/agent-trace-state.d.ts +4 -19
- package/dist/src/tracing/content-attributes.js +1 -1
- package/dist/src/tracing/conversation-context.d.ts +10 -0
- package/dist/src/tracing/conversation-context.js +1 -1
- package/dist/src/tracing/install-instrumentation-runtime.js +1 -1
- package/dist/src/tracing/otel-registration.js +1 -1
- package/dist/src/vue/index.d.ts +3 -0
- package/dist/src/vue/index.js +2 -2
- package/dist/src/vue/use-eve-agent.d.ts +7 -3
- package/dist/src/vue/use-eve-agent.js +1 -1
- package/docs/agent-config.md +36 -13
- package/docs/channels/chat-sdk.mdx +15 -4
- package/docs/channels/custom.mdx +89 -17
- package/docs/channels/eve.mdx +1 -1
- package/docs/channels/mcp.mdx +1 -1
- package/docs/channels/overview.mdx +14 -56
- package/docs/channels/slack.mdx +287 -45
- package/docs/channels/telegram.mdx +2 -0
- package/docs/concepts/built-in-tools.md +37 -28
- package/docs/concepts/context-control.md +2 -2
- package/docs/concepts/execution-model-and-durability.mdx +10 -11
- package/docs/concepts/sessions-runs-and-streaming.md +69 -49
- package/docs/connections/mcp.mdx +4 -4
- package/docs/connections/openapi.mdx +2 -2
- package/docs/connections/overview.mdx +11 -5
- package/docs/evals/assertions.mdx +5 -5
- package/docs/evals/cases.mdx +1 -1
- package/docs/evals/reporters.mdx +10 -4
- package/docs/extensions.md +22 -2
- package/docs/guides/client/streaming.mdx +33 -12
- package/docs/guides/deployment/vercel.mdx +2 -1
- package/docs/guides/dev-tui.md +26 -16
- package/docs/guides/dynamic-capabilities.md +6 -4
- package/docs/guides/evaluate.md +29 -2
- package/docs/guides/frontend/nuxt.mdx +24 -4
- package/docs/guides/frontend/overview.mdx +45 -41
- package/docs/guides/frontend/use-eve-agent-svelte.mdx +4 -10
- package/docs/guides/frontend/use-eve-agent-vue.mdx +4 -10
- package/docs/guides/hooks.md +16 -12
- package/docs/guides/instrumentation/instrumentation.mdx +2 -0
- package/docs/guides/instrumentation/otel.mdx +24 -6
- package/docs/guides/remote-agents.md +38 -22
- package/docs/guides/self-modification.md +10 -0
- package/docs/instructions.mdx +1 -1
- package/docs/patterns/multi-tenant-approvals.md +1 -1
- package/docs/protocols/ucp.mdx +20 -16
- package/docs/reference/cli.md +64 -11
- package/docs/reference/typescript-api.md +43 -41
- package/docs/schedules.mdx +14 -34
- package/docs/subagents/index.mdx +24 -56
- package/docs/tools/human-in-the-loop.md +50 -15
- package/docs/tools/meta.json +1 -1
- package/docs/tools/overview.mdx +80 -60
- package/docs/tools/tasks-upgrade.md +201 -0
- package/docs/tools/tasks.md +315 -0
- package/docs/tools/workflows.mdx +368 -154
- package/package.json +18 -12
- package/dist/src/channel/activity-renderer.d.ts +0 -21
- package/dist/src/channel/activity-renderer.js +0 -1
- package/dist/src/channel/activity-sink.d.ts +0 -2
- package/dist/src/channel/activity-sink.js +0 -1
- package/dist/src/cli/dev/tui/steering-stream.d.ts +0 -15
- package/dist/src/cli/dev/tui/steering-stream.js +0 -1
- package/dist/src/cli/dev/tui/subagent-pump.d.ts +0 -142
- package/dist/src/cli/dev/tui/subagent-pump.js +0 -1
- package/dist/src/eve-channel/activity-observer-request.d.ts +0 -7
- package/dist/src/eve-channel/activity-observer-request.js +0 -1
- package/dist/src/eve-channel/delivery-policy-request.d.ts +0 -4
- package/dist/src/eve-channel/delivery-policy-request.js +0 -1
- package/dist/src/execution/activity-cohort.d.ts +0 -20
- package/dist/src/execution/activity-cohort.js +0 -1
- package/dist/src/execution/activity-collector.d.ts +0 -12
- package/dist/src/execution/activity-collector.js +0 -1
- package/dist/src/execution/activity-events.d.ts +0 -8
- package/dist/src/execution/activity-events.js +0 -1
- package/dist/src/execution/activity-route.d.ts +0 -2
- package/dist/src/execution/activity-route.js +0 -1
- package/dist/src/execution/activity-work-id.d.ts +0 -9
- package/dist/src/execution/activity-work-id.js +0 -1
- package/dist/src/execution/activity-work.d.ts +0 -30
- package/dist/src/execution/activity-work.js +0 -1
- package/dist/src/execution/cancel-indexed-session-tasks-step.d.ts +0 -7
- package/dist/src/execution/cancel-indexed-session-tasks-step.js +0 -1
- package/dist/src/execution/dispatch-action-failures.d.ts +0 -8
- package/dist/src/execution/dispatch-action-failures.js +0 -1
- package/dist/src/execution/dispatch-start-operation.d.ts +0 -15
- package/dist/src/execution/dispatch-start-operation.js +0 -1
- package/dist/src/execution/publish-channel-event.d.ts +0 -23
- package/dist/src/execution/publish-channel-event.js +0 -1
- package/dist/src/execution/scheduled-launch-delivery.d.ts +0 -7
- package/dist/src/execution/scheduled-launch-delivery.js +0 -1
- package/dist/src/execution/session/event-sink.d.ts +0 -26
- package/dist/src/execution/session/event-sink.js +0 -1
- package/dist/src/execution/session-activity-projection.d.ts +0 -16
- package/dist/src/execution/session-activity-projection.js +0 -1
- package/dist/src/execution/session-activity-renderer-step.d.ts +0 -15
- package/dist/src/execution/session-activity-renderer-step.js +0 -1
- package/dist/src/execution/session-activity.d.ts +0 -3
- package/dist/src/execution/session-activity.js +0 -1
- package/dist/src/execution/submit-activity.d.ts +0 -7
- package/dist/src/execution/submit-activity.js +0 -1
- package/dist/src/execution/task-event-callback.d.ts +0 -12
- package/dist/src/execution/task-event-callback.js +0 -1
- package/dist/src/execution/task-input-capability.d.ts +0 -4
- package/dist/src/execution/task-input-capability.js +0 -1
- package/dist/src/execution/task-input-response-route.d.ts +0 -2
- package/dist/src/execution/task-input-response-route.js +0 -1
- package/dist/src/execution/tasks/child/notify.d.ts +0 -44
- package/dist/src/execution/tasks/child/notify.js +0 -1
- package/dist/src/execution/tasks/parent/control-shared.d.ts +0 -23
- package/dist/src/execution/tasks/parent/control-shared.js +0 -1
- package/dist/src/execution/tasks/parent/delegate.d.ts +0 -35
- package/dist/src/execution/tasks/parent/delegate.js +0 -1
- package/dist/src/execution/tasks/parent/dispatch.d.ts +0 -22
- package/dist/src/execution/tasks/parent/dispatch.js +0 -1
- package/dist/src/execution/tasks/parent/hitl-proxy-steps.d.ts +0 -27
- package/dist/src/execution/tasks/parent/hitl-proxy-steps.js +0 -1
- package/dist/src/execution/tasks/parent/run-parent.d.ts +0 -58
- package/dist/src/execution/tasks/parent/run-parent.js +0 -1
- package/dist/src/execution/tasks/parent/subagent-task-projection.d.ts +0 -26
- package/dist/src/execution/tasks/parent/subagent-task-projection.js +0 -1
- package/dist/src/execution/tasks/parent/task-cancel.d.ts +0 -12
- package/dist/src/execution/tasks/parent/task-cancel.js +0 -1
- package/dist/src/execution/tasks/parent/tool-execution.d.ts +0 -45
- package/dist/src/execution/tasks/parent/tool-execution.js +0 -1
- package/dist/src/execution/terminal-session-event.d.ts +0 -13
- package/dist/src/execution/terminal-session-event.js +0 -1
- package/dist/src/execution/tools/ask-question-workflow.js +0 -1
- package/dist/src/execution/tools/ask-question.d.ts +0 -19
- package/dist/src/execution/tools/ask-question.js +0 -2
- package/dist/src/execution/tools/connection-search.d.ts +0 -2
- package/dist/src/execution/tools/connection-search.js +0 -2
- package/dist/src/execution/tools/sleep-workflow.d.ts +0 -3
- package/dist/src/execution/tools/sleep-workflow.js +0 -1
- package/dist/src/execution/tools/sleep.d.ts +0 -10
- package/dist/src/execution/tools/sleep.js +0 -1
- package/dist/src/execution/tools/subagent/accept-event-step.d.ts +0 -7
- package/dist/src/execution/tools/subagent/accept-event-step.js +0 -1
- package/dist/src/execution/tools/subagent/emit-event-step.d.ts +0 -12
- package/dist/src/execution/tools/subagent/emit-event-step.js +0 -1
- package/dist/src/execution/tools/subagent/invoke-agent.d.ts +0 -42
- package/dist/src/execution/tools/subagent/invoke-agent.js +0 -1
- package/dist/src/execution/tools/subagent/invoke-preparation.d.ts +0 -44
- package/dist/src/execution/tools/subagent/invoke-preparation.js +0 -1
- package/dist/src/execution/tools/subagent/invoke-step.d.ts +0 -64
- package/dist/src/execution/tools/subagent/invoke-step.js +0 -1
- package/dist/src/execution/tools/subagent/receipt-identity.d.ts +0 -11
- package/dist/src/execution/tools/subagent/receipt-identity.js +0 -1
- package/dist/src/execution/tools/subagent/start.d.ts +0 -51
- package/dist/src/execution/tools/subagent/start.js +0 -1
- package/dist/src/execution/tools/subagent/steer.d.ts +0 -13
- package/dist/src/execution/tools/subagent/steer.js +0 -1
- package/dist/src/execution/tools/subagent/task-agent-requests.d.ts +0 -24
- package/dist/src/execution/tools/subagent/task-agent-requests.js +0 -1
- package/dist/src/execution/tools/subagent/task-cancel.d.ts +0 -10
- package/dist/src/execution/tools/subagent/task-cancel.js +0 -1
- package/dist/src/execution/tools/tasks.d.ts +0 -3
- package/dist/src/execution/tools/tasks.js +0 -1
- package/dist/src/execution/tools/workflow/background.js +0 -1
- package/dist/src/execution/tools/workflow/workflow-owner-background.d.ts +0 -14
- package/dist/src/execution/tools/workflow/workflow-owner-background.js +0 -1
- package/dist/src/harness/background-tools.d.ts +0 -45
- package/dist/src/harness/background-tools.js +0 -1
- package/dist/src/instrumentation/background-task-runtime.d.ts +0 -18
- package/dist/src/instrumentation/background-task-runtime.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-config@0.3.0/node_modules/@vercel/cli-config/dist/index.js +0 -21
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/envpath.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/errors.js +0 -2
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/errutils.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/exec.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/fsutils.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/index.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/lookup.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/safety.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/authorization.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/connector.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/index.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/installation.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/internal/base-url.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/internal/default-scopes.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/internal/env.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/internal/url-validation.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/token.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/auth-errors.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/exchange-vercel-oidc-token.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/get-context.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/get-vercel-oidc-token-sync.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/get-vercel-oidc-token-with-refresh.js +0 -2
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/index.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/oauth.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/token-error.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/token-io.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/token-util.js +0 -2
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/token.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/verify-vercel-oidc-token.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/version.js +0 -1
- package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js +0 -1
- package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js +0 -1
- package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js +0 -1
- package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js +0 -1
- package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js +0 -1
- package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js +0 -1
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/index.js +0 -1
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/command.js +0 -1
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/error.js +0 -2
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/kill.js +0 -1
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/promise.js +0 -1
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/stdio.js +0 -1
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/stream.js +0 -1
- package/dist/src/node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/buffer-stream.js +0 -1
- package/dist/src/node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/index.js +0 -1
- package/dist/src/node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/core.js +0 -1
- package/dist/src/node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/main.js +0 -1
- package/dist/src/node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/realtime.js +0 -1
- package/dist/src/node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/signals.js +0 -1
- package/dist/src/node_modules/.pnpm/is-stream@2.0.1/node_modules/is-stream/index.js +0 -1
- package/dist/src/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js +0 -1
- package/dist/src/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js +0 -1
- package/dist/src/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/index.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/compact/decrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/compact/encrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/flattened/decrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/flattened/encrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/general/decrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/general/encrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwk/embedded.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwk/thumbprint.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwks/local.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwks/remote.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/compact/sign.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/compact/verify.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/flattened/sign.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/flattened/verify.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/general/sign.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/general/verify.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/decrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/encrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/produce.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/sign.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/unsecured.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/verify.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/key/export.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/key/generate_key_pair.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/key/generate_secret.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/key/import.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/aesgcmkw.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/buffer_utils.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/cek.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/check_iv_length.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/check_key_type.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/check_p2s.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/crypto_key.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/decrypt_key_management.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/encrypt_key_management.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/epoch.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/invalid_key_input.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/is_disjoint.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/is_jwk.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/is_object.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/iv.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/jwt_claims_set.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/private_symbols.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/secs.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/validate_algorithms.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/validate_crit.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/aeskw.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/asn1.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/base64url.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/cbc_tag.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/check_cek_length.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/check_key_length.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/ciphers.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/decrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/digest.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/dsa_digest.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/ecdhes.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/encrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/fetch_jwks.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/generate.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/get_named_curve.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/get_sign_verify_key.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/hmac_digest.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/is_key_like.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/is_key_object.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/jwk_to_key.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/key_to_jwk.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/node_key.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/normalize_key.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/pbes2kw.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/random.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/rsaes.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/runtime.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/sign.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/timing_safe_equal.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/verify.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/webcrypto.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/base64url.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/decode_jwt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/decode_protected_header.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/errors.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/runtime.js +0 -1
- package/dist/src/node_modules/.pnpm/merge-stream@2.0.0/node_modules/merge-stream/index.js +0 -1
- package/dist/src/node_modules/.pnpm/mimic-fn@2.1.0/node_modules/mimic-fn/index.js +0 -1
- package/dist/src/node_modules/.pnpm/npm-run-path@4.0.1/node_modules/npm-run-path/index.js +0 -1
- package/dist/src/node_modules/.pnpm/onetime@5.1.2/node_modules/onetime/index.js +0 -1
- package/dist/src/node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js +0 -1
- package/dist/src/node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js +0 -1
- package/dist/src/node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js +0 -1
- package/dist/src/node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js +0 -1
- package/dist/src/node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/signals.js +0 -1
- package/dist/src/node_modules/.pnpm/strip-final-newline@2.0.0/node_modules/strip-final-newline/index.js +0 -2
- package/dist/src/node_modules/.pnpm/which@2.0.2/node_modules/which/which.js +0 -1
- package/dist/src/protocol/activity.d.ts +0 -112
- package/dist/src/protocol/activity.js +0 -1
- package/dist/src/protocol/agent-handle-error.d.ts +0 -13
- package/dist/src/protocol/agent-handle-error.js +0 -1
- package/dist/src/public/channels/slack/activity-plan.d.ts +0 -5
- package/dist/src/public/channels/slack/activity-plan.js +0 -1
- package/dist/src/public/channels/slack/activity.d.ts +0 -63
- package/dist/src/public/channels/slack/activity.js +0 -2
- package/dist/src/public/nuxt/dev-server.d.ts +0 -25
- package/dist/src/public/nuxt/dev-server.js +0 -1
- package/dist/src/public/tools/connection-search.d.ts +0 -1
- package/dist/src/public/tools/connection-search.js +0 -1
- package/dist/src/public/tools/task-cancel.d.ts +0 -1
- package/dist/src/public/tools/task-cancel.js +0 -1
- package/dist/src/runtime/prompt/connections.d.ts +0 -9
- package/dist/src/runtime/prompt/connections.js +0 -2
- package/dist/src/shared/empty-delivery.d.ts +0 -3
- package/dist/src/shared/empty-delivery.js +0 -1
- package/dist/src/subagents/agent-handle-errors.d.ts +0 -25
- package/dist/src/subagents/agent-handle-errors.js +0 -1
- package/dist/src/subagents/callback-step.d.ts +0 -11
- package/dist/src/subagents/callback-step.js +0 -1
- package/dist/src/subagents/continuation-bundle.d.ts +0 -13
- package/dist/src/subagents/continuation-bundle.js +0 -1
- package/dist/src/subagents/handle-dispatch.d.ts +0 -65
- package/dist/src/subagents/handle-dispatch.js +0 -1
- package/dist/src/subagents/handles/operation-id.d.ts +0 -15
- package/dist/src/subagents/handles/operation-id.js +0 -1
- package/dist/src/subagents/handles/prompt.d.ts +0 -52
- package/dist/src/subagents/handles/prompt.js +0 -3
- package/dist/src/subagents/handles/query.d.ts +0 -41
- package/dist/src/subagents/handles/query.js +0 -1
- package/dist/src/subagents/handles/state-key.d.ts +0 -8
- package/dist/src/subagents/handles/state-key.js +0 -1
- package/dist/src/subagents/handles/store.d.ts +0 -217
- package/dist/src/subagents/handles/store.js +0 -1
- package/dist/src/subagents/handles/transitions.d.ts +0 -103
- package/dist/src/subagents/handles/transitions.js +0 -1
- package/dist/src/subagents/remote-dispatch.js +0 -1
- package/dist/src/subagents/start-local.d.ts +0 -29
- package/dist/src/subagents/start-local.js +0 -1
- package/dist/src/subagents/start-remote.d.ts +0 -21
- package/dist/src/subagents/start-remote.js +0 -1
- package/dist/src/tasks/delivery-context.d.ts +0 -32
- package/dist/src/tasks/delivery-context.js +0 -4
- package/dist/src/tasks/delivery-policy.d.ts +0 -14
- package/dist/src/tasks/delivery-policy.js +0 -1
- package/dist/src/tasks/json.d.ts +0 -88
- package/dist/src/tasks/json.js +0 -1
- package/dist/src/tasks/notification.d.ts +0 -10
- package/dist/src/tasks/notification.js +0 -1
- package/dist/src/tasks/task-id.d.ts +0 -31
- package/dist/src/tasks/task-id.js +0 -1
- package/dist/src/tasks/task-inbox-token.d.ts +0 -2
- package/dist/src/tasks/task-inbox-token.js +0 -1
- package/dist/src/tasks/transitions.d.ts +0 -17
- package/dist/src/tasks/transitions.js +0 -1
- package/dist/src/tasks/types.d.ts +0 -138
- package/dist/src/tasks/types.js +0 -1
- package/dist/src/tools/framework/connection-search.d.ts +0 -3
- package/dist/src/tools/framework/connection-search.js +0 -1
- package/dist/src/tools/framework/task-cancel.d.ts +0 -4
- package/dist/src/tools/framework/task-cancel.js +0 -1
- package/dist/src/tools/framework/task-contract.d.ts +0 -19
- package/dist/src/tools/framework/task-contract.js +0 -1
- package/dist/src/tools/native-definition.d.ts +0 -7
- package/dist/src/tools/native-definition.js +0 -1
- package/dist/src/tracing/agent-invocation-terminal.d.ts +0 -18
- package/dist/src/tracing/agent-invocation-terminal.js +0 -1
- /package/dist/src/execution/{tools/subagent → agent-sessions}/metadata.d.ts +0 -0
- /package/dist/src/execution/{tools/subagent → agent-sessions}/metadata.js +0 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { HarnessToolDefinition } from "#harness/execute-tool.js";
|
|
2
|
+
import type { JsonObject } from "#shared/json.js";
|
|
3
|
+
import { type ToolSchema } from "#tools/schema.js";
|
|
4
|
+
/** The model input property eve adds to every `serve` tool. */
|
|
5
|
+
export declare const TASK_ID_INPUT = "taskId";
|
|
6
|
+
/** A `serve` tool's input schema as the model sees it, with the optional `taskId`. */
|
|
7
|
+
export declare function withTaskIdSchema(schema: ToolSchema): ToolSchema;
|
|
8
|
+
/**
|
|
9
|
+
* The tool as the model sees it: its input gains `taskId`, and its description
|
|
10
|
+
* explains it. An agent tool also gets its activity label, the agent and the
|
|
11
|
+
* first sentence of its message: `Researcher: Find the March incidents`.
|
|
12
|
+
*/
|
|
13
|
+
export declare function withTaskIdInput(definition: HarnessToolDefinition): HarnessToolDefinition;
|
|
14
|
+
/** A `serve` tool call's model input, split into the task it names and the tool's own input. */
|
|
15
|
+
export interface ServeCallInput {
|
|
16
|
+
readonly input: JsonObject;
|
|
17
|
+
readonly taskId?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare function splitTaskIdInput(modelInput: JsonObject): ServeCallInput;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{displayTitle}from"#shared/display-name.js";import{firstSentence}from"#shared/presentation-text.js";import{isToolSchema,withOptionalStringProperty}from"#tools/schema.js";import{AGENT_SERVE_TOOL_DESCRIPTION,SERVE_TOOL_DESCRIPTION,TASK_ID_INPUT_DESCRIPTION}from"#execution/tasks/render.js";import{AGENT_TOOL_NAME}from"#tools/framework/agent-contract.js";import{isAgentTool}from"#execution/tasks/tool-entry-point.js";const TASK_ID_INPUT=`taskId`;function withTaskIdSchema(e){return withOptionalStringProperty(e,{description:TASK_ID_INPUT_DESCRIPTION,name:TASK_ID_INPUT})}function withTaskIdInput(e){let t=e.inputSchema;if(!isToolSchema(t))throw Error(`Tool "${e.name}" has no input schema eve can add taskId to.`);let n=isAgentTool(e),r={...e,description:appendSentence(e.description,n?AGENT_SERVE_TOOL_DESCRIPTION:SERVE_TOOL_DESCRIPTION),inputSchema:withTaskIdSchema(t)};return!n||e.label?.start!==void 0?r:{...r,label:{...e.label,start:t=>agentCallLabel(e.name,t)}}}function agentCallLabel(e,t){let n=typeof t==`object`&&t?t.message:void 0,r=typeof n==`string`?firstSentence(n):void 0;return r===void 0?displayTitle(e):e===AGENT_TOOL_NAME?r:`${displayTitle(e)}: ${r}`}function splitTaskIdInput(e){let{[TASK_ID_INPUT]:t,...n}=e;return typeof t==`string`?{input:n,taskId:t}:{input:n}}function appendSentence(e,t){let n=e.trimEnd();return n===``?t:`${n} ${t}`}export{TASK_ID_INPUT,splitTaskIdInput,withTaskIdInput,withTaskIdSchema};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { HarnessToolDefinition } from "#harness/execute-tool.js";
|
|
2
|
+
import type { WorkflowToolEntryPoint } from "#tools/workflow-entry-point.js";
|
|
3
|
+
/**
|
|
4
|
+
* The entry point a deferred tool's calls run through. Every agent tool is a
|
|
5
|
+
* `serve` tool; tools that dispatch nowhere are called like `execute`.
|
|
6
|
+
*/
|
|
7
|
+
export declare function entryPointOf(definition: HarnessToolDefinition | undefined): WorkflowToolEntryPoint;
|
|
8
|
+
/** Whether calls to the tool run as tasks: every call to an agent, `task`, or `serve` tool. */
|
|
9
|
+
export declare function startsTasks(definition: HarnessToolDefinition | undefined): boolean;
|
|
10
|
+
/** Whether the tool is an agent: a declared, remote, dynamic, or root-copy agent. */
|
|
11
|
+
export declare function isAgentTool(definition: HarnessToolDefinition | undefined): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function entryPointOf(e){let t=dispatchTargetOf(e);return t===void 0?`execute`:t.kind===`workflow-tool-call`?t.entryPoint:`serve`}function startsTasks(e){return entryPointOf(e)!==`execute`}function isAgentTool(e){let t=dispatchTargetOf(e);return t!==void 0&&t.kind!==`workflow-tool-call`}function dispatchTargetOf(e){let t=e?.behavior?.handling;if(t?.kind===`dispatch`)return t.target}export{entryPointOf,isAgentTool,startsTasks};
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
/** Whether a workflow hook or run can no longer accept task traffic. */
|
|
2
2
|
export declare function isTaskWorkflowTargetGone(error: unknown): boolean;
|
|
3
|
+
/** Awaits traffic to a workflow hook or run, which a target already gone makes moot. */
|
|
4
|
+
export declare function ignoreGoneTarget(pending: Promise<unknown>): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{walkCauseChain}from"#shared/errors.js";import{EntityConflictError,HookNotFoundError,RunExpiredError,WorkflowRunNotFoundError}from"#compiled/@workflow/errors/index.js";function isTaskWorkflowTargetGone(e){for(let t of walkCauseChain(e))if(HookNotFoundError.is(t)||WorkflowRunNotFoundError.is(t)||RunExpiredError.is(t)||EntityConflictError.is(t))return!0;return!1}export{isTaskWorkflowTargetGone};
|
|
1
|
+
import{walkCauseChain}from"#shared/errors.js";import{EntityConflictError,HookNotFoundError,RunExpiredError,WorkflowRunNotFoundError}from"#compiled/@workflow/errors/index.js";function isTaskWorkflowTargetGone(e){for(let t of walkCauseChain(e))if(HookNotFoundError.is(t)||WorkflowRunNotFoundError.is(t)||RunExpiredError.is(t)||EntityConflictError.is(t))return!0;return!1}async function ignoreGoneTarget(e){try{await e}catch(e){if(!isTaskWorkflowTargetGone(e))throw e}}export{ignoreGoneTarget,isTaskWorkflowTargetGone};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import type { TokenUsage } from "#shared/token-usage.js";
|
|
1
2
|
/** Emits a terminal `session.completed` outside a turn. */
|
|
2
3
|
export declare function emitTerminalSessionCompletionStep(input: {
|
|
3
4
|
readonly sessionWritable: WritableStream<Uint8Array>;
|
|
4
5
|
readonly serializedContext: Record<string, unknown>;
|
|
6
|
+
readonly usage: TokenUsage | undefined;
|
|
5
7
|
}): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createSessionCompletedEvent}from"#protocol/message.js";import{
|
|
1
|
+
import{createSessionCompletedEvent}from"#protocol/message.js";import{publishTerminalSessionEvent}from"#execution/publish-session-events.js";async function emitTerminalSessionCompletionStep(e){"use step";await publishTerminalSessionEvent({sessionWritable:e.sessionWritable,serializedContext:e.serializedContext,event:createSessionCompletedEvent(e.usage)})}export{emitTerminalSessionCompletionStep};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import type { TokenUsage } from "#shared/token-usage.js";
|
|
1
2
|
/** Emits a terminal `session.failed` to the adapter and durable stream. */
|
|
2
3
|
export declare function emitTerminalSessionFailureStep(input: {
|
|
3
4
|
readonly error: unknown;
|
|
4
5
|
readonly sessionWritable: WritableStream<Uint8Array>;
|
|
5
6
|
readonly serializedContext: Record<string, unknown>;
|
|
6
7
|
readonly turnId?: string;
|
|
8
|
+
readonly usage: TokenUsage | undefined;
|
|
7
9
|
}): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createLogger,formatError}from"#internal/logging.js";import{createSessionFailedEvent}from"#protocol/message.js";import{
|
|
1
|
+
import{createLogger,formatError}from"#internal/logging.js";import{createSessionFailedEvent}from"#protocol/message.js";import{publishTerminalSessionEvent}from"#execution/publish-session-events.js";import{summarizeKnownError}from"#harness/semantic-errors/index.js";const log=createLogger(`execution.workflow-entry`);async function emitTerminalSessionFailureStep(e){"use step";let t=formatError(e.error),n=summarizeKnownError(e.error),r=t;if(n!==null){let e={...t,message:n.message,name:n.name,semanticErrorId:n.id};r=n.hint===void 0?e:{...e,hint:n.hint}}let i=typeof r.name==`string`?r.name:`WORKFLOW_EXECUTION_FAILED`,a=typeof r.message==`string`?r.message:String(e.error),o=e.serializedContext[`eve.sessionId`]??``;log.error(`workflow loop threw — emitting terminal session.failed`,{sessionId:o,errorId:typeof r.errorId==`string`?r.errorId:void 0,code:i}),await publishTerminalSessionEvent({errorId:typeof r.errorId==`string`?r.errorId:void 0,event:createSessionFailedEvent({code:i,details:r,message:a,sessionId:o,usage:e.usage}),sessionWritable:e.sessionWritable,serializedContext:e.serializedContext,turnId:e.turnId})}export{emitTerminalSessionFailureStep};
|
|
@@ -1,15 +1,8 @@
|
|
|
1
1
|
import { type DurableSessionState } from "#execution/durable-session-store.js";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
* ends.
|
|
5
|
-
*
|
|
6
|
-
* Every nonterminal `agent/local`/`agent/self` handle is covered: `running`
|
|
7
|
-
* and `parked` handles carry a confirmed address; a `starting` handle has
|
|
8
|
-
* no session id yet (the child may not exist), so it is skipped with a
|
|
9
|
-
* debug log rather than guessed at. Remote handles are retired through the
|
|
10
|
-
* authenticated session-reset route.
|
|
3
|
+
* Session end ends every task, including cancelled runs that haven't
|
|
4
|
+
* confirmed yet. Each run ends the agent sessions it opened.
|
|
11
5
|
*/
|
|
12
6
|
export declare function terminateChildSessionsStep(input: {
|
|
13
|
-
readonly serializedContext?: Record<string, unknown>;
|
|
14
7
|
readonly sessionState: DurableSessionState;
|
|
15
8
|
}): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createLogger,logError}from"#internal/logging.js";import{
|
|
1
|
+
import{createLogger,logError}from"#internal/logging.js";import{liveTaskRuns,readTaskTable}from"#execution/tasks/table.js";import{readDurableSession}from"#execution/durable-session-store.js";import{cancelWorkflowToolRun}from"#execution/tools/workflow/cancel.js";const log=createLogger(`execution.terminate-child-sessions`);async function terminateChildSessionsStep(e){"use step";let t;try{t=readDurableSession(e.sessionState)}catch(t){logError(log,`failed to read child sessions for termination`,t,{parentSessionId:e.sessionState.sessionId});return}await stopTaskRuns(t)}async function stopTaskRuns(e){let t=liveTaskRuns(readTaskTable(e.state));await Promise.all(t.map(e=>cancelWorkflowToolRun(e,{kind:`end`,reason:`The session ended.`})))}export{terminateChildSessionsStep};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{buildBaseToolContext}from"#context/build-base-tool-context.js";import{createAuthorizationContext}from"#runtime/authorization-context.js";import{handleAuthorizationError}from"#runtime/connections/scoped-authorization.js";function createToolExecuteWithAuth(e){return(t,n)=>{let r=createAuthorizationContext({scope:e.scope}),i={...buildBaseToolContext({options:n,toolName:e.scope}),getToken:r.getToken,requireAuth:r.requireAuth};return r.run(()=>e.execute(t,i))}}function buildApprovalResponseAuth(e){let t=createAuthorizationContext({scope:e.scope,boundResponder:e.responder});return{getToken:(n,r)=>t.getToken(n,namespaceApprovalAuthOptions(e.scope,r)),requireAuth:(n,r)=>t.requireAuth(n,namespaceApprovalAuthOptions(e.scope,r))}}function namespaceApprovalAuthOptions(e,t){return t?.authKey===void 0?t:{...t,authKey:`${e}:${t.authKey}`}}async function handleApprovalResponsePolicyError(e){return await handleAuthorizationError(e)}export{buildApprovalResponseAuth,createToolExecuteWithAuth,handleApprovalResponsePolicyError};
|
|
1
|
+
import{buildBaseToolContext}from"#context/build-base-tool-context.js";import{createAuthorizationContext}from"#runtime/authorization-context.js";import{handleAuthorizationError}from"#runtime/connections/scoped-authorization.js";function createToolExecuteWithAuth(e){return(t,n)=>{let r=createAuthorizationContext({scope:e.scope}),i={...buildBaseToolContext({options:n,toolName:e.scope}),messages:n.messages,getToken:r.getToken,requireAuth:r.requireAuth};return r.run(()=>e.execute(t,i))}}function buildApprovalResponseAuth(e){let t=createAuthorizationContext({scope:e.scope,boundResponder:e.responder});return{getToken:(n,r)=>t.getToken(n,namespaceApprovalAuthOptions(e.scope,r)),requireAuth:(n,r)=>t.requireAuth(n,namespaceApprovalAuthOptions(e.scope,r))}}function namespaceApprovalAuthOptions(e,t){return t?.authKey===void 0?t:{...t,authKey:`${e}:${t.authKey}`}}async function handleApprovalResponsePolicyError(e){return await handleAuthorizationError(e)}export{buildApprovalResponseAuth,createToolExecuteWithAuth,handleApprovalResponsePolicyError};
|
|
@@ -2,4 +2,4 @@ import type { JsonValue } from "#shared/json.js";
|
|
|
2
2
|
import type { WorkflowToolContext } from "#tools/workflow-definition.js";
|
|
3
3
|
import type { AgentRouterInput } from "#execution/tools/agent-router.js";
|
|
4
4
|
/** Routes one task through the complete workflow agent metadata snapshot. */
|
|
5
|
-
export declare function
|
|
5
|
+
export declare function runAgentRouterTask(input: AgentRouterInput, ctx: WorkflowToolContext): Promise<JsonValue>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{evaluate}from"#ai/evaluate.js";async function
|
|
1
|
+
import{evaluate}from"#ai/evaluate.js";async function runAgentRouterTask(e,t){"use workflow";let n=await chooseTarget(e.message,descriptions(t),t.abortSignal),{message:r,status:i}=await(await t.agent(n).send(e.message,{signal:t.abortSignal})).result();if(i===`failed`)throw Error(`Agent "${n}" failed to handle the task.`);return r??null}async function chooseTarget(e,t,n){"use step";let r=Object.keys(t);if(r.length===0)throw Error(`agentRouter requires at least one available agent with a description.`);return r.length===1?r[0]:(await evaluate({abortSignal:n,state:{message:e},questions:{route:{type:`choice`,instructions:`Which subagent should handle this task?`,criteria:t}}})).answers.route.choice}function descriptions(e){return Object.fromEntries(Object.entries(e.agents).flatMap(([e,t])=>{let n=t.description.trim();return n.length===0?[]:[[e,n]]}))}runAgentRouterTask.workflowId=`workflow//eve@0.70.0//runAgentRouterTask`;export{runAgentRouterTask};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { runAgentRouterTask } from "#execution/tools/agent-router-workflow.js";
|
|
2
2
|
export declare const AGENT_ROUTER_TOOL_DESCRIPTION = "Route a task to the best available subagent based on each subagent's declared description.";
|
|
3
3
|
export interface AgentRouterInput {
|
|
4
4
|
readonly message: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineJsonSchema}from"#tools/schema.js";import{
|
|
1
|
+
import{defineJsonSchema}from"#tools/schema.js";import{runAgentRouterTask}from"#execution/tools/agent-router-workflow.js";const AGENT_ROUTER_TOOL_DESCRIPTION=`Route a task to the best available subagent based on each subagent's declared description.`,AGENT_ROUTER_INPUT_SCHEMA=defineJsonSchema({type:`object`,properties:{message:{type:`string`,minLength:1,description:`The complete task to send to the selected agent.`}},required:[`message`],additionalProperties:!1});export{AGENT_ROUTER_INPUT_SCHEMA,AGENT_ROUTER_TOOL_DESCRIPTION,runAgentRouterTask};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Approval for `connection_execute`: each call is approved under the called
|
|
3
|
+
* connection's own policy, keyed by connection and tool, and an approved call
|
|
4
|
+
* runs only against the connection instance it was approved for.
|
|
5
|
+
*/
|
|
6
|
+
import { type Approval, type ApprovalContext, type ApprovalResponseContext, type ApprovalResponseDecision, type ApprovalStatus } from "#approval/definition.js";
|
|
7
|
+
import type { ResolvedConnectionDefinition } from "#runtime/types.js";
|
|
8
|
+
/**
|
|
9
|
+
* Delegates approval to the called connection's policy. The request and
|
|
10
|
+
* response phases exist only when some registered connection defines them,
|
|
11
|
+
* so connections without a response policy keep the default response flow
|
|
12
|
+
* unless another connection in the same agent defines one.
|
|
13
|
+
*/
|
|
14
|
+
export declare function connectionExecuteApproval(approvals: readonly Approval[]): {
|
|
15
|
+
approvalKey?: undefined;
|
|
16
|
+
approval?: undefined;
|
|
17
|
+
} | {
|
|
18
|
+
approvalKey: (input: unknown) => string;
|
|
19
|
+
approval: ((context: ApprovalContext<Record<string, unknown>>) => Promise<ApprovalStatus>) | {
|
|
20
|
+
request: (context: ApprovalContext<Record<string, unknown>>) => Promise<ApprovalStatus>;
|
|
21
|
+
response: (context: ApprovalResponseContext<Record<string, unknown>>) => Promise<ApprovalResponseDecision>;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
/** Consumes the call's approval pin, rejecting the call if its connection changed. */
|
|
25
|
+
export declare function releaseApprovalPin(callId: string, connection: ResolvedConnectionDefinition): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{CONNECTION_EXECUTE_TOOL_NAME,findConnection,qualifiedToolName,readExecuteTarget}from"./connection-target.js";import{loadContext}from"#context/container.js";import{defineDurableCallback}from"#tools/durable-callbacks.js";import{ContextKey}from"#context/key.js";import{ConnectionRegistryKey}from"#context/providers/connection-key.js";import{resolveApprovalPolicy}from"#approval/definition.js";import{isApprovalRecheck}from"#harness/approval-recheck.js";const ConnectionApprovalPinsKey=new ContextKey(`eve.connectionApprovalPins`);function connectionExecuteApproval(e){if(e.length===0)return{};let t=defineDurableCallback({callback:requestConnectionApproval,closure:{}}),n=e.some(e=>typeof e!=`function`&&e.response!==void 0);return{approvalKey:defineDurableCallback({callback:connectionApprovalKey,closure:{}}),approval:n?{request:t,response:defineDurableCallback({callback:authorizeConnectionApprovalResponse,closure:{}})}:t}}function connectionApprovalKey(e,t){let n=readExecuteTarget(t);return n===void 0?CONNECTION_EXECUTE_TOOL_NAME:approvalKeyFor(n)}function approvalKeyFor(e){return JSON.stringify([e.connection,e.tool])}function policyApprovedTools(e,t){let n=qualifiedToolName(t),r=new Set([...e].filter(e=>e!==n));return e.has(approvalKeyFor(t))&&r.add(n),r}async function requestConnectionApproval(e,t){let n=readExecuteTarget(t.toolInput),r=loadContext().get(ConnectionRegistryKey);if(n===void 0||r===void 0)return`not-applicable`;let i=findConnection(r,n.connection),a=i===void 0?void 0:r.getConnectionApproval(i.connectionName);if(i===void 0||a===void 0)return`not-applicable`;isApprovalRecheck(t)&&!matchesApprovalPin(t.callId,i)&&markApprovalPinChanged(t.callId);let o=await resolveApprovalPolicy(a)({...t,approvedTools:policyApprovedTools(t.approvedTools,n),toolInput:n.input,toolName:qualifiedToolName(n)});return!isApprovalRecheck(t)&&parksForApproval(o)&&pinApprovedInstance(t.callId,i),o}function parksForApproval(e){return e===!0||e===`user-approval`||typeof e==`object`&&e.type===`user-approval`}async function authorizeConnectionApprovalResponse(e,t){let n=readExecuteTarget(t.request.toolInput),r=loadContext().get(ConnectionRegistryKey),i=n===void 0||r===void 0?void 0:findConnection(r,n.connection);if(n===void 0||r===void 0||i===void 0)return{reason:`The connection for this tool call is unavailable.`,status:`rejected`};if(!matchesApprovalPin(t.request.callId,i))return{reason:CONNECTION_CHANGED_MESSAGE,status:`rejected`};let a=r.getConnectionApproval(i.connectionName),o=a===void 0||typeof a==`function`?void 0:a.response;return o===void 0?{status:`allowed`}:await o({...t,request:{...t.request,toolInput:n.input,toolName:qualifiedToolName(n)}})}const CONNECTION_CHANGED_MESSAGE=`The connection for this tool call changed or is unavailable. Request a new tool call and approval.`;function pinApprovedInstance(e,t){let n=t.instanceId??``,r=loadContext();r.get(ConnectionApprovalPinsKey)?.[e]===void 0&&r.set(ConnectionApprovalPinsKey,(t={})=>Object.fromEntries([...Object.entries(t).slice(-49),[e,n]]))}function matchesApprovalPin(e,t){let n=loadContext().get(ConnectionApprovalPinsKey)?.[e];return n!==void 0&&n===(t.instanceId??``)}function markApprovalPinChanged(e){loadContext().set(ConnectionApprovalPinsKey,(t={})=>({...t,[e]:`\0changed`}))}function releaseApprovalPin(e,t){let n=loadContext(),r=n.get(ConnectionApprovalPinsKey);if(r?.[e]===void 0)return;let{[e]:i,...a}=r;if(n.set(ConnectionApprovalPinsKey,a),i!==(t.instanceId??``))throw Error(CONNECTION_CHANGED_MESSAGE)}export{connectionExecuteApproval,releaseApprovalPin};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Keyword ranking for `connection_search` and for `connection_execute`'s
|
|
3
|
+
* suggestions when a tool name is unknown. Query and field text split into
|
|
4
|
+
* lowercase words (camelCase and punctuation are boundaries); a query word
|
|
5
|
+
* matches a field word when either is a prefix of the other, so `repo` finds
|
|
6
|
+
* `repositories` and `issues` finds `issue`. Each query word adds the weight of
|
|
7
|
+
* every field it matches, so broad fields rank below a tool's own name.
|
|
8
|
+
*/
|
|
9
|
+
import type { ResolvedConnectionDefinition } from "#runtime/types.js";
|
|
10
|
+
import type { ConnectionToolMetadata } from "#shared/connection-types.js";
|
|
11
|
+
export interface RankCandidate {
|
|
12
|
+
readonly connection: Pick<ResolvedConnectionDefinition, "connectionName" | "description">;
|
|
13
|
+
readonly tool: ConnectionToolMetadata;
|
|
14
|
+
}
|
|
15
|
+
/** Candidates matching `query`, best first. An empty query matches every candidate. */
|
|
16
|
+
export declare function rankConnectionTools<T extends RankCandidate>(query: string, candidates: readonly T[]): T[];
|
|
17
|
+
/**
|
|
18
|
+
* Names of one connection's tools closest to an unknown `name`. Only the tools'
|
|
19
|
+
* own fields count, since every candidate shares the connection.
|
|
20
|
+
*/
|
|
21
|
+
export declare function closestToolNames(name: string, tools: readonly ConnectionToolMetadata[], limit: number): string[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isObject}from"#shared/guards.js";function rankConnectionTools(e,t){let n=tokenize(e);return t.map(e=>({candidate:e,score:n.length===0?1:scoreFields(n,[...toolFields(e.tool),[tokenize(e.connection.connectionName),4],[tokenize(e.connection.description),1]])})).filter(e=>e.score>0).sort((e,t)=>t.score-e.score||e.candidate.connection.connectionName.localeCompare(t.candidate.connection.connectionName)||e.candidate.tool.name.localeCompare(t.candidate.tool.name)).map(e=>e.candidate)}function closestToolNames(e,t,n){let r=tokenize(e);return r.length===0?[]:t.map(e=>({name:e.name,score:scoreFields(r,toolFields(e))})).filter(e=>e.score>0).sort((e,t)=>t.score-e.score||e.name.localeCompare(t.name)).slice(0,n).map(e=>e.name)}function toolFields(e){let t=isObject(e.inputSchema.properties)?Object.entries(e.inputSchema.properties):[],n=t.flatMap(([,e])=>isObject(e)&&typeof e.description==`string`?[e.description]:[]);return[[tokenize(e.name),6],[t.flatMap(([e])=>tokenize(e)),3],[tokenize(e.description),2],[n.flatMap(tokenize),1]]}function scoreFields(e,t){let n=0;for(let r of e)for(let[e,i]of t)e.some(e=>matchesWord(e,r))&&(n+=i);return n}function matchesWord(e,t){return e.startsWith(t)||e.length>=3&&t.startsWith(e)}function tokenize(e){return e.replaceAll(/([a-z0-9])([A-Z])/gu,`$1 $2`).toLowerCase().split(/[^a-z0-9]+/u).filter(e=>e.length>1)}export{closestToolNames,rankConnectionTools};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** The `connection_execute` call target, shared by execution and approval. */
|
|
2
|
+
import type { ConnectionRegistry } from "#runtime/connections/registry-types.js";
|
|
3
|
+
import type { ResolvedConnectionDefinition } from "#runtime/types.js";
|
|
4
|
+
import type { JsonObject } from "#shared/json.js";
|
|
5
|
+
export declare const CONNECTION_EXECUTE_TOOL_NAME = "connection_execute";
|
|
6
|
+
export interface ExecuteTarget {
|
|
7
|
+
readonly connection: string;
|
|
8
|
+
readonly input: JsonObject;
|
|
9
|
+
readonly tool: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function readExecuteTarget(value: unknown): ExecuteTarget | undefined;
|
|
12
|
+
export declare function qualifiedToolName(target: Pick<ExecuteTarget, "connection" | "tool">): string;
|
|
13
|
+
/**
|
|
14
|
+
* How a tool call reads to a person: `Linear: List issues` for a
|
|
15
|
+
* `connection_execute` call, otherwise the tool's display title.
|
|
16
|
+
*/
|
|
17
|
+
export declare function toolCallDisplayName(toolName: string, input: unknown): string;
|
|
18
|
+
export declare function findConnection(registry: ConnectionRegistry, name: string): ResolvedConnectionDefinition | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isObject}from"#shared/guards.js";import{displayProperName,displayTitle}from"#shared/display-name.js";const CONNECTION_EXECUTE_TOOL_NAME=`connection_execute`;function readExecuteTarget(e){if(!isObject(e))return;let{connection:t,input:n,tool:r}=e;if(typeof t==`string`&&typeof r==`string`)return{connection:t,input:isObject(n)?n:{},tool:r}}function qualifiedToolName(e){return`${e.connection}__${e.tool}`}function toolCallDisplayName(e,t){let n=e===`connection_execute`?readExecuteTarget(t):void 0;return n===void 0?displayTitle(e):`${displayProperName(n.connection)}: ${displayTitle(n.tool)}`}function findConnection(e,t){return e.getConnections().find(e=>e.connectionName===t)}export{CONNECTION_EXECUTE_TOOL_NAME,findConnection,qualifiedToolName,readExecuteTarget,toolCallDisplayName};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `connection_search` and `connection_execute`: fixed tools that reach every
|
|
3
|
+
* connection tool without adding definitions to the model's tool list, so
|
|
4
|
+
* discovery never changes the cached prompt prefix. Both are rebuilt each
|
|
5
|
+
* step from the connection registry with identical model-facing definitions.
|
|
6
|
+
*/
|
|
7
|
+
import type { DynamicToolSet } from "#tools/dynamic.js";
|
|
8
|
+
export declare const CONNECTION_SEARCH_TOOL_NAME = "connection_search";
|
|
9
|
+
/** Builds both tools for the current step, or `null` when the agent has no connections. */
|
|
10
|
+
export declare function resolveConnectionTools(): DynamicToolSet | null;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{CONNECTION_EXECUTE_TOOL_NAME,findConnection,qualifiedToolName,readExecuteTarget,toolCallDisplayName}from"./connection-target.js";import{connectionExecuteApproval,releaseApprovalPin}from"./connection-approval.js";import{closestToolNames,rankConnectionTools}from"./connection-search-rank.js";import{createLogger}from"#internal/logging.js";import{isObject}from"#shared/guards.js";import{loadContext}from"#context/container.js";import{displayProperName}from"#shared/display-name.js";import{toErrorMessage}from"#shared/errors.js";import{defineJsonSchema}from"#tools/schema.js";import{defineDurableCallback}from"#tools/durable-callbacks.js";import{ConnectionRegistryKey}from"#context/providers/connection-key.js";import{getAuthorizationResults}from"#harness/authorization.js";import{createAuthorizationExecution}from"#runtime/connections/scoped-authorization.js";import{isConnectionAuthorizationFailedError,isConnectionAuthorizationRequiredError}from"#connections/errors.js";import{reportNestedToolAction}from"#harness/nested-actions.js";import{resolveConnectionAuthorization}from"#runtime/connections/resolve-authorization.js";import{connectionToolModelOutput,toConnectionToolResult}from"#runtime/connections/tool-result.js";import{renderToolSignature}from"#runtime/connections/tool-signature.js";import{supportsInteractiveAuthorization}from"#shared/connection-types.js";import{defineTool}from"#tools/definition.js";const log=createLogger(`framework.connection-tools`),CONNECTION_SEARCH_TOOL_NAME=`connection_search`,CONNECTION_SEARCH_DESCRIPTION=[`Find tools in your connected services (MCP servers and OpenAPI APIs).`,`Returns each matching tool's connection, name, description, and TypeScript signature.`,"Omit `query` to list a connection's tools. Call a found tool with connection_execute.","Connections the user has not signed in to are listed under `unavailable` with `requiresSignIn`;","when the request needs one, search it again with `connection` and `signIn: true` to ask the user to sign in.",`Prefer connected services over web search or general knowledge when a request relates to them.`].join(` `),CONNECTION_EXECUTE_DESCRIPTION=[`Call one tool from a connected service and return its result.`,"Use the exact `connection` and `tool` names returned by connection_search,","and pass `input` matching the tool's signature."].join(` `),CONNECTION_SEARCH_INPUT_SCHEMA={type:`object`,properties:{query:{type:`string`,description:`Words describing the capability, such as 'list open issues'. Omit to list every tool.`},connection:{type:`string`,description:`Only search this connection.`},signIn:{type:`boolean`,description:"Ask the user to sign in to `connection` first, then search it. Requires `connection`. Use only for a connection listed with `requiresSignIn` that the request needs."},limit:{type:`integer`,minimum:1,maximum:50,description:`Maximum results. Defaults to 10.`},offset:{type:`integer`,minimum:0,description:`Results to skip, for paging.`}},additionalProperties:!1},CONNECTION_EXECUTE_INPUT_SCHEMA={type:`object`,properties:{connection:{type:`string`,description:`Connection name from connection_search.`},tool:{type:`string`,description:`Tool name from connection_search.`},input:{type:`object`,description:`Arguments matching the tool's signature. Defaults to {}.`}},required:[`connection`,`tool`],additionalProperties:!1};function resolveConnectionTools(){let e=loadContext().get(ConnectionRegistryKey);if(e===void 0)return null;let t=e.getConnections().map(t=>e.getConnectionApproval(t.connectionName)).filter(e=>e!==void 0);return{[CONNECTION_SEARCH_TOOL_NAME]:defineTool({description:CONNECTION_SEARCH_DESCRIPTION,inputSchema:CONNECTION_SEARCH_INPUT_SCHEMA,execute:defineDurableCallback({callback:searchConnectionTools,closure:{}}),label:{start:defineDurableCallback({callback:connectionSearchLabel,closure:{}})}}),[CONNECTION_EXECUTE_TOOL_NAME]:defineTool({description:CONNECTION_EXECUTE_DESCRIPTION,inputSchema:CONNECTION_EXECUTE_INPUT_SCHEMA,execute:defineDurableCallback({callback:executeConnectionTool,closure:{}}),label:{start:defineDurableCallback({callback:connectionToolLabel,closure:{}})},toModelOutput:defineDurableCallback({callback:(e,t)=>connectionToolModelOutput(t),closure:{}}),...connectionExecuteApproval(t)})}}function connectionToolLabel(e,t){return toolCallDisplayName(CONNECTION_EXECUTE_TOOL_NAME,t)}function connectionSearchLabel(e,t){let n=isObject(t)?t.connection:void 0;return typeof n!=`string`||n===``?`Search connected tools`:isObject(t)&&t.signIn===!0?`Connect ${displayProperName(n)}`:`Search ${displayProperName(n)} tools`}async function searchConnectionTools(e,t){let n=isObject(t)?t:{},r=requireRegistry(),i=n.connection===void 0||n.connection===``?void 0:n.connection;if(n.signIn===!0&&i===void 0)throw Error("connection_search with signIn: true requires `connection`. Ask the user to sign in to one connection at a time.");let a=i===void 0?r.getConnections():[requireConnection(r,i)],o=createAuthorizationExecution();await completePendingAuthorizations(r,a,o);let s=[],c=[];for(let e of a){let t=await listConnectionTools(r,e,o,n.signIn===!0);if(`signIn`in t)return t.signIn;if(`unavailable`in t)s.push(t.unavailable);else for(let n of t.tools)c.push({connection:e,tool:n})}let l=s.filter(e=>e.terminal);if(a.length>0&&l.length===a.length)throw Error(l.map(e=>e.error).join(`
|
|
2
|
+
`));let u=rankConnectionTools(n.query??``,c),d=clampInteger(n.limit,1,50,10),f=clampInteger(n.offset,0,2**53-1,0),p={tools:u.slice(f,f+d).map(({connection:e,tool:t})=>({connection:e.connectionName,description:t.description,signature:renderToolSignature({inputSchema:t.inputSchema,name:t.name,outputSchema:t.outputSchema}),tool:t.name})),total:u.length};return s.length>0&&(p.unavailable=s.map(({terminal:e,...t})=>t)),p}async function listConnectionTools(e,t,n,r){let i=t.connectionName;try{return{tools:await e.getClient(i).getToolMetadata()}}catch(t){if(isConnectionAuthorizationRequiredError(t)){let a=await resolveInteractiveAuthorization(e,i);if(a!==void 0&&n.isJustAuthorized(a))return{unavailable:{connection:i,error:`Authorization failed for "${i}": the service rejected the token immediately after authorization.`,terminal:!0}};if(a===void 0){let e=`"${i}" requires authorization and cannot start interactive sign-in.`;if(r)throw Error(e);return{unavailable:{connection:i,error:e,terminal:!1}}}return r?{signIn:await n.handleError(t,a)}:{unavailable:{connection:i,error:`Sign-in required: the user has not signed in to "${i}", so its tools cannot be listed. If the request needs "${i}", call connection_search with connection "${i}" and signIn: true to ask the user to sign in.`,requiresSignIn:!0,terminal:!1}}}return log.warn(`failed to load connection tools`,{connection:i,error:t}),{unavailable:{connection:i,error:isConnectionAuthorizationFailedError(t)?`Authorization failed for "${i}": ${t.message}`:`Failed to load tools for "${i}": ${toErrorMessage(t)}`,terminal:!0}}}}function clampInteger(e,t,n,r){return typeof e!=`number`||!Number.isFinite(e)?r:Math.min(n,Math.max(t,Math.trunc(e)))}async function executeConnectionTool(e,t,n){let r=readExecuteTarget(t);if(r===void 0)throw Error("connection_execute requires string `connection` and `tool` values.");let i=requireRegistry(),a=requireConnection(i,r.connection);releaseApprovalPin(n.callId,a),assertPendingAuthorizationInstances(i,[a]);let o=await resolveInteractiveAuthorization(i,a.connectionName),s=createAuthorizationExecution();o!==void 0&&await s.complete(o);let c=i.getClient(a.connectionName),l;try{l=await c.getToolMetadata()}catch(e){return await s.handleError(e,o)}let u=l.find(e=>e.name===r.tool);if(u===void 0)throw Error(unknownToolMessage(a,r.tool,l));let d=await validToolInput(a,u,r.input),f=qualifiedToolName(r),p;try{p=await c.executeTool(u.name,d,{abortSignal:n.abortSignal,callId:n.callId})}catch(e){if(isConnectionAuthorizationRequiredError(e))return await s.handleError(e,o);throw reportNestedToolAction(n.callId,{input:d,isError:!0,output:toErrorMessage(e),toolName:f}),e}let m=toConnectionToolResult(a.protocol,u,p);if(!m.ok)throw reportNestedToolAction(n.callId,{input:d,isError:!0,output:m.error,toolName:f}),Error(m.error);return reportNestedToolAction(n.callId,{input:d,output:m.value,toolName:f}),m.value}async function validToolInput(e,t,n){let r=await defineJsonSchema(t.inputSchema)[`~standard`].validate(n);if(r.issues===void 0)return r.value;let i=r.issues.map(e=>{let t=(e.path??[]).map(e=>String(typeof e==`object`?e.key:e)).join(`.`);return t.length>0?`${t}: ${e.message}`:e.message}).join(`; `);throw Error(`Invalid input for "${t.name}" on connection "${e.connectionName}": ${i}. Signature: ${renderToolSignature({inputSchema:t.inputSchema,name:t.name,outputSchema:t.outputSchema})}`)}function unknownToolMessage(e,t,n){let r=closestToolNames(t,n,5),i=r.length>0?` Closest tools: ${r.join(`, `)}.`:` Use connection_search to find its tools.`;return`Connection "${e.connectionName}" has no tool named "${t}".${i}`}async function resolveInteractiveAuthorization(e,t){let n=findConnection(e,t);if(n===void 0)return;let r=await resolveConnectionAuthorization(n);if(r!==void 0&&supportsInteractiveAuthorization(r))return{scope:n.connectionName,instanceId:n.instanceId,connection:{url:n.url??``},authorization:r}}async function completePendingAuthorizations(e,t,n){assertPendingAuthorizationInstances(e,t);let r=getAuthorizationResults();for(let i of t){if(!r.some(e=>e.name===i.connectionName))continue;let t=await resolveInteractiveAuthorization(e,i.connectionName);t!==void 0&&await n.complete(t)}}function assertPendingAuthorizationInstances(e,t){let n=new Set(t.map(e=>e.connectionName));for(let t of getAuthorizationResults())if(t.instanceId!==void 0&&n.has(t.name)&&findConnection(e,t.name)?.instanceId!==t.instanceId)throw Error(`Authorization for "${t.name}" cannot complete because its resolved connection changed while sign-in was pending. Start sign-in again.`)}function requireRegistry(){let e=loadContext().get(ConnectionRegistryKey);if(e===void 0)throw Error(`This agent has no connections.`);return e}function requireConnection(e,t){let n=findConnection(e,t);if(n!==void 0)return n;let r=e.getConnectionNames();throw Error(r.length===0?`Connection "${t}" is not available. No connections are available right now.`:`Connection "${t}" is not available. Available connections: ${r.join(`, `)}.`)}export{CONNECTION_SEARCH_TOOL_NAME,resolveConnectionTools};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{loadContext}from"#context/container.js";import{DynamicSkillManifestKey}from"#context/keys.js";import{defineJsonSchema}from"#tools/schema.js";import{stripSkillFrontmatter}from"#shared/skill-package.js";import{ConnectionRegistryKey}from"#context/providers/connection-key.js";import{BundleKey}from"#runtime/sessions/runtime-context-keys.js";async function executeLoadSkillTool(e){let t=loadContext(),{skill:n}=e,r=Object.values(t.get(DynamicSkillManifestKey)??{}).flat(),i=t.require(BundleKey).resolvedAgent.skills,a=r.find(e=>e.name===n);if(a!==void 0)return stripSkillFrontmatter(a.markdown);let o=i.find(e=>e.name===n);if(o!==void 0)return o.markdown;let s=formatSkillNotFoundError(n,[...new Set([...r,...i].map(e=>e.name))].sort()),c=t.get(ConnectionRegistryKey)?.getConnectionNames().find(e=>e.toLowerCase()===n.toLowerCase());throw Error(c===void 0?s:`${s} "${c}" is
|
|
1
|
+
import{loadContext}from"#context/container.js";import{DynamicSkillManifestKey}from"#context/keys.js";import{defineJsonSchema}from"#tools/schema.js";import{stripSkillFrontmatter}from"#shared/skill-package.js";import{ConnectionRegistryKey}from"#context/providers/connection-key.js";import{BundleKey}from"#runtime/sessions/runtime-context-keys.js";async function executeLoadSkillTool(e){let t=loadContext(),{skill:n}=e,r=Object.values(t.get(DynamicSkillManifestKey)??{}).flat(),i=t.require(BundleKey).resolvedAgent.skills,a=r.find(e=>e.name===n);if(a!==void 0)return stripSkillFrontmatter(a.markdown);let o=i.find(e=>e.name===n);if(o!==void 0)return o.markdown;let s=formatSkillNotFoundError(n,[...new Set([...r,...i].map(e=>e.name))].sort()),c=t.get(ConnectionRegistryKey)?.getConnectionNames().find(e=>e.toLowerCase()===n.toLowerCase());throw Error(c===void 0?s:`${s} "${c}" is a connection, not a skill. Find its tools with connection_search and connection "${c}", then call them with connection_execute.`)}function formatSkillNotFoundError(e,t){return`No skill named "${e}".${t.length>0?` Available skills: ${t.join(`, `)}.`:``}`}const SKILL_INPUT_SCHEMA=defineJsonSchema({type:`object`,properties:{skill:{type:`string`,description:`Available skill name or id.`}},required:[`skill`],additionalProperties:!1}),SKILL_OUTPUT_SCHEMA=defineJsonSchema({type:`string`});async function executeLoadSkill(e){return await executeLoadSkillTool(e)}export{SKILL_INPUT_SCHEMA,SKILL_OUTPUT_SCHEMA,executeLoadSkill};
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import type { SessionAuthContext } from "#channel/types.js";
|
|
2
|
+
import type { WorkflowAskRoute } from "#harness/proxy-input-requests.js";
|
|
2
3
|
import type { InputResponse } from "#shared/input.js";
|
|
3
4
|
import type { ToolInputResponseResponder } from "#tools/definition.js";
|
|
4
5
|
export declare function toToolInputResponseResponder(auth: SessionAuthContext | null | undefined): ToolInputResponseResponder | undefined;
|
|
5
|
-
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Sends the answers the session accepted to the asking run's control hook,
|
|
8
|
+
* the same ordered inbox its commands use, so an answer the session accepted
|
|
9
|
+
* before an interrupt or cancel reaches the body before them.
|
|
10
|
+
*/
|
|
11
|
+
export declare function sendWorkflowAskAnswers(route: WorkflowAskRoute, responses: readonly InputResponse[] | undefined, responder?: ToolInputResponseResponder): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{resumeHook}from"#internal/workflow/runtime.js";function toToolInputResponseResponder(e){return e==null?void 0:{authenticator:e.authenticator,principalId:e.principalId,principalType:e.principalType}}async function
|
|
1
|
+
import{resumeHook}from"#internal/workflow/runtime.js";function toToolInputResponseResponder(e){return e==null?void 0:{authenticator:e.authenticator,principalId:e.principalId,principalType:e.principalType}}async function sendWorkflowAskAnswers(e,t,n){for(let r of t??[]){let{optionId:t,text:i}=r,a=n===void 0?{optionId:t,status:`answered`,text:i}:{optionId:t,responder:n,status:`answered`,text:i},o={kind:`answer`,requestId:r.requestId,response:a};await resumeHook(e.control,o)}}export{sendWorkflowAskAnswers,toToolInputResponseResponder};
|
|
@@ -1,14 +1,77 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
1
|
+
import type { SessionAuth } from "#context/session-context.js";
|
|
2
|
+
import type { AgentSessionContext } from "#execution/agent-sessions/context.js";
|
|
3
|
+
import type { WorkflowToolRunAskDecision, WorkflowToolRunRef } from "#execution/tools/workflow/messages.js";
|
|
4
|
+
import type { WorkflowToolRunInbox } from "#execution/tools/workflow/owner.js";
|
|
5
|
+
import type { ToolContext, ToolInputRequest, ToolInputRequestOptions, ToolInputResponse } from "#tools/definition.js";
|
|
6
|
+
/**
|
|
7
|
+
* The run a workflow body belongs to. Members that describe a call describe
|
|
8
|
+
* the one the run serves now, which a `serve` task changes with each call, so
|
|
9
|
+
* read them when they are used.
|
|
10
|
+
*/
|
|
4
11
|
export interface WorkflowToolRunContext {
|
|
5
|
-
|
|
12
|
+
/**
|
|
13
|
+
* What the call's caller lends it: the lineage a `ctx.agent` session opened
|
|
14
|
+
* now binds, and whether `ctx.ask()` can reach a person.
|
|
15
|
+
*/
|
|
16
|
+
readonly agentContext: AgentSessionContext;
|
|
17
|
+
readonly asks: WorkflowToolRunAsks;
|
|
18
|
+
/** The auth of the call, which a message sent to a `ctx.agent` session now carries. */
|
|
19
|
+
readonly auth: SessionAuth;
|
|
20
|
+
/** The run's control hook, where the session sends its decisions on the run's questions. */
|
|
21
|
+
readonly control: string;
|
|
22
|
+
/**
|
|
23
|
+
* The ref of the call the run serves now, which questions and sign-ins come
|
|
24
|
+
* from. A `serve` task's changes with each call, so read it when sending.
|
|
25
|
+
*/
|
|
6
26
|
readonly from: WorkflowToolRunRef;
|
|
7
|
-
readonly owner:
|
|
27
|
+
readonly owner: WorkflowToolRunInbox;
|
|
8
28
|
}
|
|
9
|
-
export declare function attachWorkflowToolRunContext(ctx: ToolContext, context: WorkflowToolRunContext): void;
|
|
29
|
+
export declare function attachWorkflowToolRunContext(ctx: Pick<ToolContext, "abortSignal">, context: WorkflowToolRunContext): void;
|
|
10
30
|
export declare function findWorkflowToolRunContext(value: unknown): WorkflowToolRunContext | undefined;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
31
|
+
/**
|
|
32
|
+
* The run's pending `ctx.ask()` questions. The run names each one, and each
|
|
33
|
+
* resolves only from what the session decided about it, delivered in order on
|
|
34
|
+
* the run's control hook, or as `cancelled` once the session stops the work.
|
|
35
|
+
*/
|
|
36
|
+
export declare class WorkflowToolRunAsks {
|
|
37
|
+
private opened;
|
|
38
|
+
private readonly pending;
|
|
39
|
+
/** Withdrawal requests on their way to the run's inbox. */
|
|
40
|
+
private readonly withdrawing;
|
|
41
|
+
private readonly runId;
|
|
42
|
+
constructor(runId: string);
|
|
43
|
+
/**
|
|
44
|
+
* Opens a question under a request ID that replays deterministically with
|
|
45
|
+
* the run. `send` sends the request and returns how to send its withdrawal.
|
|
46
|
+
*/
|
|
47
|
+
open(send: (requestId: string) => () => Promise<void>): {
|
|
48
|
+
readonly answer: Promise<ToolInputResponse>;
|
|
49
|
+
readonly requestId: string;
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Asks the session to withdraw a pending question, at most once. The
|
|
53
|
+
* question stays pending until the session decides it, so an answer the
|
|
54
|
+
* session accepted first still wins.
|
|
55
|
+
*/
|
|
56
|
+
withdraw(requestId: string): void;
|
|
57
|
+
/** Asks the session to withdraw every pending question not already withdrawn. */
|
|
58
|
+
withdrawAll(): void;
|
|
59
|
+
/**
|
|
60
|
+
* Waits until every withdrawal asked for has reached the run's inbox, so the
|
|
61
|
+
* session decides each one before the run's outcome withdraws the rest.
|
|
62
|
+
*/
|
|
63
|
+
flush(): Promise<void>;
|
|
64
|
+
/** Applies the session's decision. The first one wins; a repeated one is dropped. */
|
|
65
|
+
settle(decision: WorkflowToolRunAskDecision): void;
|
|
66
|
+
fail(requestId: string, error: unknown): void;
|
|
67
|
+
/** The session stopped the work, so it answers none of its questions anymore. */
|
|
68
|
+
cancelAll(): void;
|
|
69
|
+
private take;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Returns an answer which may be awaited or raced with another workflow
|
|
73
|
+
* operation. When the call's `abortSignal` or `options.signal` aborts, the run
|
|
74
|
+
* asks the session to withdraw the question. The answer is `cancelled` only if
|
|
75
|
+
* the session withdrew it before it accepted a person's answer.
|
|
76
|
+
*/
|
|
77
|
+
export declare function ask(ctx: Pick<ToolContext, "abortSignal">, request: ToolInputRequest, options?: ToolInputRequestOptions): Promise<ToolInputResponse>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{workflowToolContextErrorMessage}from"#shared/workflow-tool-context.js";
|
|
1
|
+
import{workflowToolContextErrorMessage}from"#shared/workflow-tool-context.js";const WORKFLOW_TOOL_RUN_CONTEXT=Symbol.for(`eve.workflow-tool-run.context`);function attachWorkflowToolRunContext(e,t){Object.defineProperty(e,WORKFLOW_TOOL_RUN_CONTEXT,{enumerable:!1,value:t})}function readWorkflowToolRunContext(e,t){let n=e?.[WORKFLOW_TOOL_RUN_CONTEXT];if(n===void 0)throw Error(workflowToolContextErrorMessage(t));return n}function findWorkflowToolRunContext(e){return typeof e==`object`&&e?e[WORKFLOW_TOOL_RUN_CONTEXT]:void 0}const CANCELLED={status:`cancelled`},UNAVAILABLE={status:`unavailable`};var WorkflowToolRunAsks=class{opened=0;pending=new Map;withdrawing=new Set;runId;constructor(e){this.runId=e}open(e){this.opened+=1;let t=`${this.runId}-ask-${String(this.opened)}`,n,r=new Promise((e,t)=>{n={reject:t,resolve:e,withdraw:void 0}});return this.pending.set(t,n),n.withdraw=e(t),{answer:r,requestId:t}}withdraw(e){let t=this.pending.get(e),n=t?.withdraw;if(t===void 0||n===void 0)return;t.withdraw=void 0;let r=n().catch(t=>this.fail(e,t));this.withdrawing.add(r),r.then(()=>this.withdrawing.delete(r))}withdrawAll(){for(let e of this.pending.keys())this.withdraw(e)}async flush(){for(;this.withdrawing.size>0;)await Promise.all(this.withdrawing)}settle(e){let t=e.kind===`answer`?e.response:CANCELLED;this.take(e.requestId)?.resolve(t)}fail(e,t){this.take(e)?.reject(t)}cancelAll(){for(let e of this.pending.keys())this.take(e)?.resolve(CANCELLED)}take(e){let t=this.pending.get(e);return this.pending.delete(e),t}};function ask(e,t,n={}){let r=readWorkflowToolRunContext(e,`ask`);if(r.agentContext.capabilities?.requestInput!==!0)return Promise.resolve(UNAVAILABLE);let i=[e.abortSignal];if(n.signal!==void 0&&i.push(n.signal),i.some(e=>e.aborted))return Promise.resolve(CANCELLED);let{asks:a,control:o,owner:s}=r,c=r.from,{answer:l,requestId:u}=a.open(e=>{let n=s.send({kind:`request`,from:c,replyTo:e,request:{control:o,kind:`ask`,request:t}});return n.catch(t=>a.fail(e,t)),()=>n.then(()=>s.send({control:o,from:c,kind:`withdraw`,replyTo:e}))}),requestWithdrawal=()=>a.withdraw(u);for(let e of i)e.addEventListener(`abort`,requestWithdrawal,{once:!0});return l.finally(()=>{for(let e of i)e.removeEventListener(`abort`,requestWithdrawal)})}export{WorkflowToolRunAsks,ask,attachWorkflowToolRunContext,findWorkflowToolRunContext};
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import type { SessionContext } from "#context/session-context.js";
|
|
2
|
-
import type {
|
|
3
|
-
import { type
|
|
2
|
+
import type { AgentSessionContext } from "#execution/agent-sessions/context.js";
|
|
3
|
+
import { type RunUsageTally } from "#execution/agent-sessions/usage.js";
|
|
4
|
+
import type { AgentSession, WorkflowSharedContext } from "#tools/workflow-definition.js";
|
|
5
|
+
import { WorkflowToolRunAsks } from "#execution/tools/workflow/ask.js";
|
|
6
|
+
import type { WorkflowBodyCommand, WorkflowToolRunOutcome, WorkflowToolRunRef } from "#execution/tools/workflow/messages.js";
|
|
7
|
+
import type { WorkflowToolRunInbox } from "#execution/tools/workflow/owner.js";
|
|
8
|
+
import type { WorkflowToolRunEntry } from "#shared/action-types.js";
|
|
4
9
|
import type { JsonObject, JsonValue } from "#shared/json.js";
|
|
10
|
+
import type { ToolContext } from "#tools/definition.js";
|
|
5
11
|
export interface WorkflowBodyDefinition {
|
|
6
|
-
/**
|
|
7
|
-
readonly
|
|
12
|
+
/** Everything the run needs to open `ctx.agent` sessions for its caller, and `ctx.agents`. */
|
|
13
|
+
readonly agentContext: AgentSessionContext;
|
|
8
14
|
readonly callId: string;
|
|
9
|
-
/**
|
|
10
|
-
|
|
11
|
-
* resolve as `unavailable` instead of waiting for an answer no one can give.
|
|
12
|
-
*/
|
|
13
|
-
readonly canRequestInput?: boolean;
|
|
15
|
+
/** The entry point the run invokes, which decides the body's context. */
|
|
16
|
+
readonly entry: WorkflowToolRunEntry;
|
|
14
17
|
readonly executeInput?: JsonValue;
|
|
15
18
|
readonly input: JsonObject;
|
|
16
19
|
readonly session: SessionContext["session"];
|
|
@@ -19,18 +22,56 @@ export interface WorkflowBodyDefinition {
|
|
|
19
22
|
readonly workflowId: string;
|
|
20
23
|
}
|
|
21
24
|
export interface WorkflowBodyInput extends WorkflowBodyDefinition {
|
|
22
|
-
|
|
25
|
+
/** The run's control hook, which the session answers the body's questions on. */
|
|
26
|
+
readonly hookToken: string;
|
|
27
|
+
readonly owner: WorkflowToolRunInbox;
|
|
28
|
+
readonly runId?: string;
|
|
23
29
|
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
30
|
+
/**
|
|
31
|
+
* How the session's commands reach a running body. What a command means
|
|
32
|
+
* depends on the entry point: a cancel ends an `execute` or `task` call, but
|
|
33
|
+
* only the current stretch of work of a `serve` task.
|
|
34
|
+
*/
|
|
35
|
+
export interface WorkflowBodyControl {
|
|
36
|
+
/** Aborts when the run stops for good; the run then settles as cancelled. */
|
|
37
|
+
readonly runSignal: AbortSignal;
|
|
38
|
+
/** The body is winding down cancelled work, which the run bounds with its cleanup deadline. */
|
|
39
|
+
readonly unwinding: boolean;
|
|
40
|
+
apply(command: WorkflowBodyCommand): void;
|
|
27
41
|
}
|
|
28
|
-
/**
|
|
29
|
-
export
|
|
30
|
-
|
|
31
|
-
readonly
|
|
32
|
-
|
|
42
|
+
/** A body the run started and how its commands reach it. */
|
|
43
|
+
export interface StartedWorkflowBody {
|
|
44
|
+
/** The body's pending questions, which the session's decisions settle. */
|
|
45
|
+
readonly asks: WorkflowToolRunAsks;
|
|
46
|
+
/** Releases what the body opened, such as its `ctx.agent` sessions, once the run ends. */
|
|
47
|
+
close(): Promise<void>;
|
|
48
|
+
readonly control: WorkflowBodyControl;
|
|
49
|
+
readonly outcome: Promise<WorkflowToolRunOutcome>;
|
|
50
|
+
/** What the body's `ctx.agent` sessions spent, which the run's outcome carries. */
|
|
51
|
+
readonly usage: RunUsageTally;
|
|
52
|
+
}
|
|
53
|
+
/** Starts the body of an `execute` or `task` call, which serves the call the run started with. */
|
|
54
|
+
export declare function startCallBody(input: WorkflowBodyInput): StartedWorkflowBody;
|
|
55
|
+
/** A body's failure, or its cancellation when the run stopped. */
|
|
56
|
+
export declare function toFailedOutcome(error: unknown, runSignal: AbortSignal): WorkflowToolRunOutcome;
|
|
33
57
|
export declare function createWorkflowBodyRef(input: WorkflowBodyDefinition & {
|
|
34
|
-
readonly execution: "background" | "blocking";
|
|
35
58
|
readonly runId?: string;
|
|
36
59
|
}): WorkflowToolRunRef;
|
|
60
|
+
export declare function resolveWorkflowEntryPoint<TEntryPoint>(input: WorkflowBodyInput): TEntryPoint;
|
|
61
|
+
/**
|
|
62
|
+
* The members every entry point's context shares, bound to the run. `ask`
|
|
63
|
+
* is the entry point's own, since what it may ask for depends on its calls.
|
|
64
|
+
* The members that describe a call, `abortSignal`, `agents`, `callId`, and
|
|
65
|
+
* `session` (whose turn is the call's), come from the entry point, which
|
|
66
|
+
* knows its calls.
|
|
67
|
+
*/
|
|
68
|
+
export declare function createSharedContext(input: WorkflowBodyInput, agent: (name: string) => AgentSession, askPerson: WorkflowSharedContext["ask"]): Omit<ToolContext & WorkflowSharedContext, "abortSignal" | "agents" | "callId" | "messages" | "session">;
|
|
69
|
+
/** `ctx.agents` for a call: the agents its context lists, frozen. */
|
|
70
|
+
export declare function createAgentsView(context: AgentSessionContext): WorkflowSharedContext["agents"];
|
|
71
|
+
export declare class WorkflowToolRunCancelledError extends Error {
|
|
72
|
+
constructor(reason: string);
|
|
73
|
+
}
|
|
74
|
+
/** Why an `execute` call's `abortSignal` aborted when a steering message arrived. */
|
|
75
|
+
export declare class WorkflowToolRunInterruptedError extends Error {
|
|
76
|
+
constructor();
|
|
77
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getWorkflowMetadata}from"#compiled/@workflow/core/index.js";import{normalizeSerializableError}from"#execution/workflow-errors.js";import{
|
|
1
|
+
import{getWorkflowMetadata}from"#compiled/@workflow/core/index.js";import{normalizeSerializableError}from"#execution/workflow-errors.js";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{readRegisteredWorkflow}from"#execution/workflow-registry.js";const INTERRUPTED_OUTPUT={interrupted:!0};var WorkflowCallSignals=class{body=new AbortController;run=new AbortController;asks;constructor(e){this.asks=e}get abortSignal(){return this.body.signal}get runSignal(){return this.run.signal}get interrupted(){return this.body.signal.aborted&&!this.run.signal.aborted}get unwinding(){return this.run.signal.aborted}apply(e){switch(e.kind){case`cancel`:case`end`:this.asks.cancelAll(),this.run.abort(new WorkflowToolRunCancelledError(e.reason)),this.body.abort(this.run.signal.reason);return;case`interrupt`:this.body.abort(new WorkflowToolRunInterruptedError);return;case`call`:return}}};function startCallBody(e){let t=createWorkflowBodyRef(e),n=new WorkflowToolRunAsks(t.runId),r=new WorkflowCallSignals(n),i={agentContext:e.agentContext,asks:n,auth:e.session.auth,control:e.hookToken,from:t,owner:e.owner},a=createRunUsageTally(),o=createAgentSessions(i,a),s=createCallContext(e,r,o.open);return attachWorkflowToolRunContext(s,i),{asks:n,close:o.close,control:r,outcome:executeCallBody(e,s,r,t),usage:a}}async function executeCallBody(e,t,n,r){try{let n=resolveWorkflowEntryPoint(e)(e.executeInput??e.input,t),i;if(!isAsyncIterable(n))i=await n;else{let t=n[Symbol.asyncIterator](),a,o=await t.next();for(;o.done!==!0;)a=o.value,await e.owner.send({from:r,kind:`report`,update:o.value}),o=await t.next();i=o.value??a??null}return{output:i,status:`completed`}}catch(e){return n.interrupted?{output:INTERRUPTED_OUTPUT,status:`completed`}:toFailedOutcome(e,n.runSignal)}}function toFailedOutcome(e,t){if(t.aborted){let{reason:e}=t;return{reason:e instanceof Error?e.message:String(e??``),status:`cancelled`}}return{error:normalizeSerializableError(e),status:`failed`}}function createWorkflowBodyRef(e){let t={callId:e.callId,input:e.input,runId:e.runId??getWorkflowMetadata().workflowRunId,sequence:e.session.turn.sequence,stepIndex:e.stepIndex,toolName:e.toolName,turnId:e.session.turn.id};return e.entry.entryPoint===`execute`?t:{...t,taskId:e.entry.taskId}}function resolveWorkflowEntryPoint(e){let t=readRegisteredWorkflow(e.workflowId);if(typeof t!=`function`)throw Error(`Tool "${e.toolName}" is not registered as a workflow in this deployment (${e.workflowId}). The tool was renamed or removed after this run started.`);return t}function createSharedContext(e,t,n){let unavailable=(t,n)=>{throw Error(`ctx.${t} is not available inside a workflow tool; ${n}. Tool "${e.toolName}" runs as a durable workflow body, which only replays deterministic code.`)};return{agent:t,ask:n,getSandbox:()=>unavailable(`getSandbox()`,`the session sandbox belongs to the turn`),getToken:()=>unavailable(`getToken()`,`pass ctx directly to a "use step" helper to resolve credentials`),requireAuth:()=>unavailable(`requireAuth()`,`pass ctx directly to a "use step" helper to request authorization`),toolName:e.toolName}}function createAgentsView(e){return Object.freeze(Object.fromEntries(Object.entries(e.agents).map(([e,t])=>[e,Object.freeze({...t})])))}function createCallContext(e,t,n){let r={...createSharedContext(e,n,(e,t)=>ask(r,e,t)),abortSignal:t.abortSignal,agents:createAgentsView(e.agentContext),callId:e.callId,session:e.session};return r}function isAsyncIterable(e){return typeof e==`object`&&!!e&&typeof e[Symbol.asyncIterator]==`function`}var WorkflowToolRunCancelledError=class extends Error{constructor(e){super(e),this.name=`WorkflowToolRunCancelledError`}},WorkflowToolRunInterruptedError=class extends Error{constructor(){super(`A new message arrived while the turn waited on this call.`),this.name=`WorkflowToolRunInterruptedError`}};export{WorkflowToolRunCancelledError,WorkflowToolRunInterruptedError,createAgentsView,createSharedContext,createWorkflowBodyRef,resolveWorkflowEntryPoint,startCallBody,toFailedOutcome};
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
+
import type { WorkflowToolRunControlMessage } from "#execution/tools/workflow/messages.js";
|
|
1
2
|
import type { WorkflowToolRunAddress } from "#execution/tools/workflow/types.js";
|
|
3
|
+
/** How a run is told to stop: `end` also finishes a `serve` task's run, which a cancel keeps. */
|
|
4
|
+
export type WorkflowToolRunStop = Extract<WorkflowToolRunControlMessage, {
|
|
5
|
+
readonly kind: "cancel" | "end";
|
|
6
|
+
}>;
|
|
2
7
|
/**
|
|
3
|
-
* Asks the run to
|
|
8
|
+
* Asks the run to stop itself, then bounds cooperative cleanup. Failures are
|
|
4
9
|
* logged: the caller has already committed cancellation of the calling turn.
|
|
5
10
|
*/
|
|
6
|
-
export declare function cancelWorkflowToolRun(run: WorkflowToolRunAddress,
|
|
11
|
+
export declare function cancelWorkflowToolRun(run: WorkflowToolRunAddress, stop: WorkflowToolRunStop): Promise<void>;
|
|
7
12
|
/** Allows cooperative cleanup, then forcibly stops a still-live run. */
|
|
8
13
|
export declare function settleWorkflowToolRunCancellation(runId: string, reason: string, cooperative?: boolean): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createLogger,logError}from"#internal/logging.js";import{cancelRun,getRun,getWorld,resumeHook}from"#internal/workflow/runtime.js";import{isTaskWorkflowTargetGone}from"#execution/tasks/workflow-target.js";import{WORKFLOW_CANCELLATION_SETTLE_MS}from"#execution/tools/workflow/cancellation-policy.js";const log=createLogger(`execution.workflow-tool-run`);async function cancelWorkflowToolRun(e,t){let
|
|
1
|
+
import{createLogger,logError}from"#internal/logging.js";import{cancelRun,getRun,getWorld,resumeHook}from"#internal/workflow/runtime.js";import{isTaskWorkflowTargetGone}from"#execution/tasks/workflow-target.js";import{WORKFLOW_CANCELLATION_SETTLE_MS}from"#execution/tools/workflow/cancellation-policy.js";const log=createLogger(`execution.workflow-tool-run`);async function cancelWorkflowToolRun(e,t){let{reason:n}=t,r=!1;try{await resumeHook(e.hookToken,t),r=!0}catch(t){isTaskWorkflowTargetGone(t)||logError(log,`failed to signal a workflow tool run to cancel; cancelling it outright`,t,{runId:e.runId})}try{await settleWorkflowToolRunCancellation(e.runId,n,r)}catch(t){if(isTaskWorkflowTargetGone(t))return;logError(log,`failed to cancel workflow tool run; it may run to completion`,t,{runId:e.runId})}}async function settleWorkflowToolRunCancellation(e,t,n=!0){if(n){let t=Date.now()+WORKFLOW_CANCELLATION_SETTLE_MS;for(;Date.now()<t;){try{let t=await getRun(e).status;if(t!==`pending`&&t!==`running`)return}catch(e){if(isTaskWorkflowTargetGone(e))return;throw e}await new Promise(e=>setTimeout(e,250))}}try{await cancelRun(await getWorld(),e,{cancelReason:t})}catch(e){if(isTaskWorkflowTargetGone(e))return;throw e}}export{cancelWorkflowToolRun,settleWorkflowToolRunCancellation};
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type SessionStepState } from "#execution/publish-session-events.js";
|
|
2
|
+
import { type SessionStateTransition } from "#execution/session/state-delta.js";
|
|
3
|
+
import type { WorkflowToolRunAgentStartedMessage, WorkflowToolRunRef } from "#execution/tools/workflow/messages.js";
|
|
2
4
|
import type { JsonValue } from "#shared/json.js";
|
|
3
|
-
|
|
5
|
+
/** Publishes a workflow tool run's `ctx.report()` update as `action.partial`. */
|
|
6
|
+
export declare function emitWorkflowToolRunReportStep(input: SessionStepState & {
|
|
4
7
|
readonly from: WorkflowToolRunRef;
|
|
5
|
-
readonly sessionWritable: WritableStream<Uint8Array>;
|
|
6
8
|
readonly update: JsonValue;
|
|
7
|
-
}): Promise<
|
|
9
|
+
}): Promise<SessionStateTransition>;
|
|
10
|
+
/** Publishes `agent.started`, in order, for sessions workflow tool runs opened. */
|
|
11
|
+
export declare function emitAgentStartedStep(input: SessionStepState & {
|
|
12
|
+
readonly messages: readonly WorkflowToolRunAgentStartedMessage[];
|
|
13
|
+
}): Promise<SessionStateTransition>;
|