eve 0.68.0 → 0.69.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 +96 -0
- package/bin/eve.js +15 -0
- package/dist/src/_virtual/_rolldown/runtime.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 +12 -57
- package/dist/src/chunks/{use-eve-agent-DXcE_8Ja.js → use-eve-agent-D_5129A9.js} +295 -205
- package/dist/src/chunks/{use-eve-agent-D4HVZBjn.js → use-eve-agent-Dab2MnT2.js} +295 -205
- 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/tui/blocks.d.ts +19 -18
- package/dist/src/cli/dev/tui/blocks.js +3 -3
- package/dist/src/cli/dev/tui/command-typeahead.d.ts +3 -6
- 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/prompt-placeholder.d.ts +2 -0
- package/dist/src/cli/dev/tui/prompt-placeholder.js +1 -0
- package/dist/src/cli/dev/tui/rail.d.ts +1 -1
- package/dist/src/cli/dev/tui/runner.d.ts +25 -2
- 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/subagent-pump.d.ts +44 -52
- package/dist/src/cli/dev/tui/subagent-pump.js +1 -1
- package/dist/src/cli/dev/tui/task-activity.d.ts +55 -0
- package/dist/src/cli/dev/tui/task-activity.js +1 -0
- package/dist/src/cli/dev/tui/terminal-renderer.d.ts +13 -30
- package/dist/src/cli/dev/tui/terminal-renderer.js +11 -11
- 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 +16 -3
- package/dist/src/cli/dev/tui/tool-presentation.js +1 -1
- 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/types.d.ts +11 -5
- package/dist/src/cli/dev/ui-options.d.ts +2 -2
- 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/eve-agent-store-helpers.d.ts +1 -1
- package/dist/src/client/eve-agent-store-helpers.js +2 -2
- package/dist/src/client/eve-agent-store.js +1 -1
- package/dist/src/client/index.d.ts +2 -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.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.js +1 -1
- package/dist/src/client/session-controls.d.ts +0 -1
- package/dist/src/client/session-utils.d.ts +10 -0
- 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 +2 -4
- 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 +8 -14
- 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 +1 -3
- package/dist/src/context/run-step.d.ts +2 -3
- 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/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 +18 -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 +60 -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 +9 -27
- 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 +0 -1
- 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 +0 -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.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/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 +130 -0
- package/dist/src/execution/publish-session-events.js +1 -0
- 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/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 +17 -3
- package/dist/src/execution/session/handoff.js +1 -1
- package/dist/src/execution/session/input-queue.d.ts +27 -28
- package/dist/src/execution/session/input-queue.js +1 -1
- package/dist/src/execution/session/next-input.d.ts +5 -0
- 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.js +1 -1
- package/dist/src/execution/session/route-selected-delivery.js +1 -1
- package/dist/src/execution/session/state-cursor.d.ts +17 -15
- package/dist/src/execution/session/state-cursor.js +1 -1
- package/dist/src/execution/session/state-delta.d.ts +33 -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 +24 -15
- 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 +33 -2
- 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 +0 -1
- package/dist/src/execution/session.js +2 -2
- package/dist/src/execution/settle-cancelled-turn-step.d.ts +21 -9
- 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.js +1 -1
- 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 +13 -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 +2 -1
- package/dist/src/harness/authorization.js +1 -1
- package/dist/src/harness/coordination.d.ts +31 -27
- 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 +7 -1
- package/dist/src/harness/emission.js +1 -1
- package/dist/src/harness/execute-tool.d.ts +4 -15
- 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-request-resolution.d.ts +5 -2
- package/dist/src/harness/input-request-resolution.js +1 -1
- 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/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 +41 -36
- 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 +6 -5
- package/dist/src/harness/types.d.ts +7 -15
- 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/lifecycle.d.ts +3 -0
- package/dist/src/instrumentation/native-events.d.ts +0 -7
- package/dist/src/instrumentation/native-events.js +1 -1
- package/dist/src/instrumentation/runtime.d.ts +1 -4
- package/dist/src/instrumentation/runtime.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 +12 -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/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 +126 -67
- 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/attachments.js +1 -1
- package/dist/src/public/channels/slack/auth.d.ts +3 -0
- package/dist/src/public/channels/slack/auth.js +1 -1
- package/dist/src/public/channels/slack/connections.d.ts +6 -6
- package/dist/src/public/channels/slack/connections.js +1 -1
- package/dist/src/public/channels/slack/defaults.d.ts +13 -19
- package/dist/src/public/channels/slack/defaults.js +4 -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/index.d.ts +4 -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/renderers.d.ts +76 -0
- package/dist/src/public/channels/slack/renderers.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/slackChannel.d.ts +47 -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/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 +6 -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/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/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 +1 -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/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/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/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/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/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/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 +35 -17
- package/dist/src/subagents/hitl-proxy.js +1 -1
- package/dist/src/subagents/invocation.d.ts +1 -2
- 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.js +1 -1
- 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/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-invocation-coordinator.d.ts +9 -18
- package/dist/src/tracing/agent-invocation-coordinator.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-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-trace-context-codec.d.ts +1 -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-state.d.ts +1 -19
- package/dist/src/tracing/content-attributes.js +1 -1
- package/dist/src/tracing/install-instrumentation-runtime.js +1 -1
- package/dist/src/vue/index.js +1 -1
- 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 +230 -35
- package/docs/channels/telegram.mdx +2 -0
- package/docs/concepts/built-in-tools.md +36 -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 +67 -47
- package/docs/connections/mcp.mdx +4 -4
- package/docs/connections/openapi.mdx +2 -2
- package/docs/connections/overview.mdx +2 -2
- package/docs/evals/assertions.mdx +5 -5
- package/docs/evals/cases.mdx +1 -1
- package/docs/evals/reporters.mdx +6 -4
- package/docs/extensions.md +11 -2
- package/docs/guides/client/streaming.mdx +31 -11
- package/docs/guides/dev-tui.md +13 -3
- package/docs/guides/dynamic-capabilities.md +5 -3
- package/docs/guides/evaluate.md +29 -2
- package/docs/guides/frontend/overview.mdx +5 -7
- package/docs/guides/hooks.md +16 -12
- package/docs/guides/instrumentation/instrumentation.mdx +2 -0
- package/docs/guides/remote-agents.md +12 -14
- 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 +61 -8
- 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 +48 -13
- package/docs/tools/meta.json +1 -1
- package/docs/tools/overview.mdx +79 -59
- 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/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/tools/connection-search.d.ts +0 -1
- package/dist/src/public/tools/connection-search.js +0 -1
- package/dist/src/public/tools/task-cancel.d.ts +0 -1
- package/dist/src/public/tools/task-cancel.js +0 -1
- package/dist/src/runtime/prompt/connections.d.ts +0 -9
- package/dist/src/runtime/prompt/connections.js +0 -2
- package/dist/src/shared/empty-delivery.d.ts +0 -3
- package/dist/src/shared/empty-delivery.js +0 -1
- package/dist/src/subagents/agent-handle-errors.d.ts +0 -25
- package/dist/src/subagents/agent-handle-errors.js +0 -1
- package/dist/src/subagents/callback-step.d.ts +0 -11
- package/dist/src/subagents/callback-step.js +0 -1
- package/dist/src/subagents/continuation-bundle.d.ts +0 -13
- package/dist/src/subagents/continuation-bundle.js +0 -1
- package/dist/src/subagents/handle-dispatch.d.ts +0 -65
- package/dist/src/subagents/handle-dispatch.js +0 -1
- package/dist/src/subagents/handles/operation-id.d.ts +0 -15
- package/dist/src/subagents/handles/operation-id.js +0 -1
- package/dist/src/subagents/handles/prompt.d.ts +0 -52
- package/dist/src/subagents/handles/prompt.js +0 -3
- package/dist/src/subagents/handles/query.d.ts +0 -41
- package/dist/src/subagents/handles/query.js +0 -1
- package/dist/src/subagents/handles/state-key.d.ts +0 -8
- package/dist/src/subagents/handles/state-key.js +0 -1
- package/dist/src/subagents/handles/store.d.ts +0 -217
- package/dist/src/subagents/handles/store.js +0 -1
- package/dist/src/subagents/handles/transitions.d.ts +0 -103
- package/dist/src/subagents/handles/transitions.js +0 -1
- package/dist/src/subagents/remote-dispatch.js +0 -1
- package/dist/src/subagents/start-local.d.ts +0 -29
- package/dist/src/subagents/start-local.js +0 -1
- package/dist/src/subagents/start-remote.d.ts +0 -21
- package/dist/src/subagents/start-remote.js +0 -1
- package/dist/src/tasks/delivery-context.d.ts +0 -32
- package/dist/src/tasks/delivery-context.js +0 -4
- package/dist/src/tasks/delivery-policy.d.ts +0 -14
- package/dist/src/tasks/delivery-policy.js +0 -1
- package/dist/src/tasks/json.d.ts +0 -88
- package/dist/src/tasks/json.js +0 -1
- package/dist/src/tasks/notification.d.ts +0 -10
- package/dist/src/tasks/notification.js +0 -1
- package/dist/src/tasks/task-id.d.ts +0 -31
- package/dist/src/tasks/task-id.js +0 -1
- package/dist/src/tasks/task-inbox-token.d.ts +0 -2
- package/dist/src/tasks/task-inbox-token.js +0 -1
- package/dist/src/tasks/transitions.d.ts +0 -17
- package/dist/src/tasks/transitions.js +0 -1
- package/dist/src/tasks/types.d.ts +0 -138
- package/dist/src/tasks/types.js +0 -1
- package/dist/src/tools/framework/connection-search.d.ts +0 -3
- package/dist/src/tools/framework/connection-search.js +0 -1
- package/dist/src/tools/framework/task-cancel.d.ts +0 -4
- package/dist/src/tools/framework/task-cancel.js +0 -1
- package/dist/src/tools/framework/task-contract.d.ts +0 -19
- package/dist/src/tools/framework/task-contract.js +0 -1
- package/dist/src/tools/native-definition.d.ts +0 -7
- package/dist/src/tools/native-definition.js +0 -1
- package/dist/src/tracing/agent-invocation-terminal.d.ts +0 -18
- package/dist/src/tracing/agent-invocation-terminal.js +0 -1
- /package/dist/src/execution/{tools/subagent → agent-sessions}/metadata.d.ts +0 -0
- /package/dist/src/execution/{tools/subagent → agent-sessions}/metadata.js +0 -0
|
@@ -1,10 +1,19 @@
|
|
|
1
|
-
import type { WorkflowToolRunMessage } from "#execution/tools/workflow/messages.js";
|
|
1
|
+
import type { WorkflowToolRunAgentStartedMessage, WorkflowToolRunMessage } from "#execution/tools/workflow/messages.js";
|
|
2
2
|
import type { SessionStateCursor } from "#execution/session/state-cursor.js";
|
|
3
3
|
import type { RuntimeActionResult } from "#shared/action-types.js";
|
|
4
4
|
interface HandlerInput<T> {
|
|
5
|
-
readonly callbackMetadataUrl: string;
|
|
6
5
|
readonly cursor: SessionStateCursor;
|
|
7
6
|
readonly message: T;
|
|
8
7
|
}
|
|
9
8
|
export declare function handleWorkflowToolRunMessage(input: HandlerInput<WorkflowToolRunMessage>): Promise<RuntimeActionResult | undefined>;
|
|
9
|
+
/** Boundary messages in admission order, with consecutive `agent-started` messages grouped. */
|
|
10
|
+
type BoundaryBatch = {
|
|
11
|
+
readonly kind: "agent-started";
|
|
12
|
+
readonly messages: WorkflowToolRunAgentStartedMessage[];
|
|
13
|
+
} | {
|
|
14
|
+
readonly kind: "message";
|
|
15
|
+
readonly message: WorkflowToolRunMessage;
|
|
16
|
+
};
|
|
17
|
+
/** Groups consecutive `agent-started` messages so one `emitAgentStartedStep` publishes each group. */
|
|
18
|
+
export declare function batchAgentStarts(messages: readonly WorkflowToolRunMessage[]): BoundaryBatch[];
|
|
10
19
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{findBlockingWorkflowToolRun,isInboxToolResultFromRecordedWorkflowToolRun}from"#harness/workflow-tool-runs.js";import{
|
|
1
|
+
import{findBlockingWorkflowToolRun,isInboxToolResultFromRecordedWorkflowToolRun}from"#harness/workflow-tool-runs.js";import{emitAgentStartedStep,emitWorkflowToolRunReportStep}from"#execution/tools/workflow/emit-workflow-tool-run-report-step.js";import{deliverWorkflowAuthorization}from"#execution/tools/workflow/owner.js";import{withdrawFinishedRunQuestionsStep,withdrawWorkflowToolRunQuestionStep}from"#execution/tools/workflow/withdraw-step.js";import{workflowToolRunOutcomeToToolResult,workflowToolRunRequestToInputRequestPayload}from"#execution/tools/workflow/owner-inbox.js";import{runProxySubagentEventStep}from"#subagents/event-proxy-step.js";async function handleWorkflowToolRunMessage(e){let{message:t}=e;switch(t.kind){case`started`:case`reply`:case`usage`:return;case`outcome`:return await handleWorkflowToolRunOutcome({...e,message:t});case`request`:await handleWorkflowToolRunRequest({...e,message:t});return;case`withdraw`:await handleWorkflowToolRunWithdraw({...e,message:t});return;case`report`:await e.cursor.advance(e=>emitWorkflowToolRunReportStep({...e,from:t.from,update:t.update}));return;case`agent-started`:await e.cursor.advance(e=>emitAgentStartedStep({...e,messages:[t]}));return}}function batchAgentStarts(e){let t=[];for(let n of e){let e=t.at(-1);n.kind===`agent-started`?e?.kind===`agent-started`?e.messages.push(n):t.push({kind:`agent-started`,messages:[n]}):t.push({kind:`message`,message:n})}return t}async function handleWorkflowToolRunOutcome(e){let{cursor:t,message:n}=e,r=t.sessionState.snapshot.session.state;if(findBlockingWorkflowToolRun(r,n.from.callId,n.from.turnId)?.address.runId!==n.from.runId)return;let i=workflowToolRunOutcomeToToolResult(n);if(isInboxToolResultFromRecordedWorkflowToolRun(r,i)){if(t.sessionState.hasProxyInputRequests){let{runId:e}=n.from;await t.advance(t=>withdrawFinishedRunQuestionsStep({...t,runId:e}))}return i}}async function handleWorkflowToolRunRequest(e){let{cursor:t,message:n}=e;if(n.request.kind===`authorization-request`){let e=n.request;await deliverWorkflowAuthorization({...n,request:e},async()=>{await t.advance(t=>runProxySubagentEventStep({hookPayload:e.event,...t}))});return}await t.advance(e=>runProxySubagentEventStep({...n.request.kind===`ask`&&{workflowAsk:createWorkflowAskRoute(n.request)},hookPayload:workflowToolRunRequestToInputRequestPayload(n),runId:n.from.runId,...e}))}async function handleWorkflowToolRunWithdraw(e){let{cursor:t,message:n}=e;await t.advance(e=>withdrawWorkflowToolRunQuestionStep({...e,control:n.control,requestId:n.replyTo,runId:n.from.runId}))}function createWorkflowAskRoute(e){let{allowFreeform:t,options:n}=e.request;return{control:e.control,question:{...t!==void 0&&{allowFreeform:t},...n!==void 0&&{options:[...n]}}}}export{batchAgentStarts,handleWorkflowToolRunMessage};
|
|
@@ -46,7 +46,6 @@ interface CreateSessionInput {
|
|
|
46
46
|
readonly turnAgent: RuntimeTurnAgent;
|
|
47
47
|
readonly limits?: AuthoredSessionLimits;
|
|
48
48
|
readonly outputSchema?: HarnessSession["outputSchema"];
|
|
49
|
-
readonly taskId?: string;
|
|
50
49
|
}
|
|
51
50
|
/** Creates a fresh {@link HarnessSession} from the current `turnAgent`. */
|
|
52
51
|
export declare function createSession(input: CreateSessionInput): HarnessSession;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{validateHarnessModelMessages}from"#harness/messages.js";import{formatAvailableSkillsSection}from"#execution/skills/instructions.js";const DEFAULT_ROOT_MAX_INPUT_TOKENS_PER_SESSION=4e7;function createCompactionConfig(e={}){let t=e.thresholdPercent??.9,n={recentWindowSize:10,threshold:e.contextWindowTokens===void 0?1e5:Math.max(1,Math.floor(e.contextWindowTokens*t)),thresholdPercent:t};return e.lastKnownInputTokens===void 0?n:{...n,lastKnownInputTokens:e.lastKnownInputTokens,lastKnownPromptMessageCount:e.lastKnownPromptMessageCount}}function createSession(e){let{turnAgent:t}=e,n=createSessionToolDefinitions(t),r={agent:createSessionAgent(t,createSessionSystemPrompt(t),n),compaction:createCompactionConfig({contextWindowTokens:t.model?.contextWindowTokens,thresholdPercent:e.compactionOverrides?.thresholdPercent}),continuationToken:e.continuationToken,history:[...t.initialMessages??[]],sessionId:e.sessionId};return e.rootSessionId!==void 0&&(r.rootSessionId=e.rootSessionId),r.limits=resolveSessionLimits(e),e.outputSchema!==void 0&&(r.outputSchema=e.outputSchema),
|
|
1
|
+
import{validateHarnessModelMessages}from"#harness/messages.js";import{formatAvailableSkillsSection}from"#execution/skills/instructions.js";const DEFAULT_ROOT_MAX_INPUT_TOKENS_PER_SESSION=4e7;function createCompactionConfig(e={}){let t=e.thresholdPercent??.9,n={recentWindowSize:10,threshold:e.contextWindowTokens===void 0?1e5:Math.max(1,Math.floor(e.contextWindowTokens*t)),thresholdPercent:t};return e.lastKnownInputTokens===void 0?n:{...n,lastKnownInputTokens:e.lastKnownInputTokens,lastKnownPromptMessageCount:e.lastKnownPromptMessageCount}}function createSession(e){let{turnAgent:t}=e,n=createSessionToolDefinitions(t),r={agent:createSessionAgent(t,createSessionSystemPrompt(t),n),compaction:createCompactionConfig({contextWindowTokens:t.model?.contextWindowTokens,thresholdPercent:e.compactionOverrides?.thresholdPercent}),continuationToken:e.continuationToken,history:[...t.initialMessages??[]],sessionId:e.sessionId};return e.rootSessionId!==void 0&&(r.rootSessionId=e.rootSessionId),r.limits=resolveSessionLimits(e),e.outputSchema!==void 0&&(r.outputSchema=e.outputSchema),r}function createSessionAgent(e,t,n){let r={compactionModelReference:e.compactionModel,reasoning:e.reasoning,system:t,tools:n};if(e.model!==void 0)return{...r,modelReference:e.model};if(e.dynamicModel!==void 0)return{...r,dynamicModel:!0};throw Error(`Cannot create a session before dynamic subagent config is selected.`)}function refreshSessionFromTurnAgent(e){return{...e.session,agent:createSessionAgent(e.turnAgent,createSessionSystemPrompt(e.turnAgent),createSessionToolDefinitions(e.turnAgent)),compaction:createCompactionConfig({contextWindowTokens:e.turnAgent.model?.contextWindowTokens,lastKnownInputTokens:e.session.compaction.lastKnownInputTokens,lastKnownPromptMessageCount:e.session.compaction.lastKnownPromptMessageCount,thresholdPercent:e.compactionOverrides?.thresholdPercent})}}function createSessionSystemPrompt(e){let t=formatAvailableSkillsSection(e.availableSkills??[]);return(t===null?e.instructions:[...e.instructions,t]).join(`
|
|
2
2
|
|
|
3
|
-
`)}function mintSubagentContinuationToken(e){return`subagent:${e??crypto.randomUUID()}`}function projectToDurableSession(e){let t={agent:{system:e.agent.system},continuationToken:e.continuationToken,history:e.history,sessionId:e.sessionId};return(e.compaction.lastKnownInputTokens!==void 0||e.compaction.lastKnownPromptMessageCount!==void 0)&&(t.compaction={lastKnownInputTokens:e.compaction.lastKnownInputTokens,lastKnownPromptMessageCount:e.compaction.lastKnownPromptMessageCount}),e.rootSessionId!==void 0&&(t.rootSessionId=e.rootSessionId),e.limits!==void 0&&(t.limits=e.limits),e.outputSchema!==void 0&&(t.outputSchema=e.outputSchema),e.sandboxState!==void 0&&(t.sandboxState=e.sandboxState),e.state!==void 0&&(t.state=e.state),
|
|
3
|
+
`)}function mintSubagentContinuationToken(e){return`subagent:${e??crypto.randomUUID()}`}function projectToDurableSession(e){let t={agent:{system:e.agent.system},continuationToken:e.continuationToken,history:e.history,sessionId:e.sessionId};return(e.compaction.lastKnownInputTokens!==void 0||e.compaction.lastKnownPromptMessageCount!==void 0)&&(t.compaction={lastKnownInputTokens:e.compaction.lastKnownInputTokens,lastKnownPromptMessageCount:e.compaction.lastKnownPromptMessageCount}),e.rootSessionId!==void 0&&(t.rootSessionId=e.rootSessionId),e.limits!==void 0&&(t.limits=e.limits),e.outputSchema!==void 0&&(t.outputSchema=e.outputSchema),e.sandboxState!==void 0&&(t.sandboxState=e.sandboxState),e.state!==void 0&&(t.state=e.state),t}function hydrateDurableSession(e){let{durable:t,turnAgent:n}=e,r=createSessionToolDefinitions(n),i={agent:createSessionAgent(n,t.agent.system,r),compaction:createCompactionConfig({contextWindowTokens:n.model?.contextWindowTokens,lastKnownInputTokens:t.compaction?.lastKnownInputTokens,lastKnownPromptMessageCount:t.compaction?.lastKnownPromptMessageCount,thresholdPercent:e.compactionOverrides?.thresholdPercent}),continuationToken:t.continuationToken,history:validateHarnessModelMessages(t.history),sessionId:t.sessionId};return t.rootSessionId!==void 0&&(i.rootSessionId=t.rootSessionId),t.limits!==void 0&&(i.limits=t.limits),t.outputSchema!==void 0&&(i.outputSchema=t.outputSchema),t.sandboxState!==void 0&&(i.sandboxState=t.sandboxState),t.state!==void 0&&(i.state=t.state),i}function createSessionToolDefinitions(e){return e.tools.map(e=>({description:e.description??``,inputSchema:e.inputSchema,name:e.name,outputSchema:e.outputSchema}))}function resolveSessionLimits(e){let t=resolveSessionTokenLimit({authored:e.limits?.maxInputTokensPerSession,fallback:DEFAULT_ROOT_MAX_INPUT_TOKENS_PER_SESSION}),n=resolveSessionTokenLimit({authored:e.limits?.maxOutputTokensPerSession,fallback:void 0}),r=resolveSessionTokenLimit({authored:e.limits?.maxTokenCostUsdPerSession,fallback:void 0}),i={};return t!==void 0&&(i.maxInputTokensPerSession=t),n!==void 0&&(i.maxOutputTokensPerSession=n),r!==void 0&&(i.maxTokenCostUsdPerSession=r),i}function resolveSessionTokenLimit(e){return e.authored===!1?void 0:e.authored??e.fallback}export{DEFAULT_ROOT_MAX_INPUT_TOKENS_PER_SESSION,createCompactionConfig,createSession,hydrateDurableSession,mintSubagentContinuationToken,projectToDurableSession,refreshSessionFromTurnAgent};
|
|
@@ -1,18 +1,30 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { DurableSessionState } from "#execution/durable-session-store.js";
|
|
2
|
+
import { type WithSessionStateDelta } from "#execution/session/state-delta.js";
|
|
2
3
|
import type { TokenUsage } from "#shared/token-usage.js";
|
|
3
4
|
export interface CancelledTurnSettleResult {
|
|
4
5
|
readonly serializedContext: Record<string, unknown>;
|
|
5
6
|
readonly sessionState: DurableSessionState;
|
|
7
|
+
/** What the session spent since its caller's last report, when asked to report it. */
|
|
6
8
|
readonly usage?: TokenUsage;
|
|
7
9
|
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
export declare function settleCancelledTurnStep(input: {
|
|
10
|
+
interface CancelledTurnSettleInput {
|
|
11
|
+
/**
|
|
12
|
+
* Whether a caller receives the turn's usage. Only then is it marked
|
|
13
|
+
* reported; otherwise the next settled turn reports it.
|
|
14
|
+
*/
|
|
15
|
+
readonly reportUsage: boolean;
|
|
15
16
|
readonly sessionWritable: WritableStream<Uint8Array>;
|
|
16
17
|
readonly serializedContext: Record<string, unknown>;
|
|
17
18
|
readonly sessionState: DurableSessionState;
|
|
18
|
-
}
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Settles one cancelled turn: relays `input.resolved` for every request the
|
|
22
|
+
* session proxies, emits `turn.cancelled` → `session.waiting`, drops pending
|
|
23
|
+
* coordination state, and persists the between-turns session. Runs in the
|
|
24
|
+
* owner, whose wake sources exclude the cancel hook, so a queued cancel wake
|
|
25
|
+
* cannot re-dispatch it.
|
|
26
|
+
*/
|
|
27
|
+
export declare function settleCancelledTurnStep(input: CancelledTurnSettleInput): Promise<WithSessionStateDelta<CancelledTurnSettleResult>>;
|
|
28
|
+
/** {@link settleCancelledTurnStep} for a caller that is already a step and adopts the whole state. */
|
|
29
|
+
export declare function settleCancelledTurn(input: CancelledTurnSettleInput): Promise<CancelledTurnSettleResult>;
|
|
30
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{getHarnessEmissionState,setHarnessEmissionState}from"#harness/emission.js";import{getTurnUsageState,takeSessionUsageDelta}from"#harness/turn-tag-state.js";import{commitCancelledCoordinationBatch,getPendingCoordinationBatch}from"#harness/coordination.js";import{removeBlockingWorkflowToolRuns}from"#harness/workflow-tool-runs.js";import{publishFromSessionStep,restoreSessionStep}from"#execution/publish-session-events.js";import{withSessionStateDelta}from"#execution/session/state-delta.js";import{clearPendingSessionLimitPrompt}from"#harness/input-requests.js";import{relayWithdrawnRequests}from"#execution/tools/workflow/withdraw-step.js";import{emitCancelledTurn}from"#harness/cancelled-turn-emission.js";async function settleCancelledTurnStep(e){"use step";return await withSessionStateDelta(e,settleCancelledTurn)}async function settleCancelledTurn(e){let t=await relayWithdrawnRequests(e,()=>!0),n=await restoreSessionStep({...t,sessionWritable:e.sessionWritable}),r=n.durableSession.state,{published:i,result:a}=await publishFromSessionStep(n,{origin:`own`,publish:e=>emitCancelledTurn(e,getHarnessEmissionState(r)),updateSession(t,n){let r=getPendingCoordinationBatch(t.state)?.event.turnId??e.sessionState.emissionState.turnId,i=setHarnessEmissionState(clearPendingSessionLimitPrompt(commitCancelledCoordinationBatch(removeBlockingWorkflowToolRuns({...t,outputSchema:void 0},r))),n);if(!e.reportUsage||getTurnUsageState(t.state)===void 0)return{session:i};let a=takeSessionUsageDelta(i);return{result:a.delta,session:a.session}}});return a===void 0?i:{...i,usage:a}}export{settleCancelledTurn,settleCancelledTurnStep};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export declare const WORKFLOW_ENTRY_NAME = "workflowEntry";
|
|
2
2
|
export declare const SESSION_TIMEOUT_WORKFLOW_NAME = "sessionTimeoutWorkflow";
|
|
3
3
|
export declare const WORKFLOW_TOOL_RUN_WORKFLOW_NAME = "workflowToolRunWorkflow";
|
|
4
|
-
export declare const ACTIVITY_COLLECTOR_WORKFLOW_NAME = "activityCollectorWorkflow";
|
|
5
4
|
export declare const STABLE_WORKFLOW_NAMES: ReadonlySet<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const WORKFLOW_ENTRY_NAME=`workflowEntry`,SESSION_TIMEOUT_WORKFLOW_NAME=`sessionTimeoutWorkflow`,WORKFLOW_TOOL_RUN_WORKFLOW_NAME=`workflowToolRunWorkflow`,
|
|
1
|
+
const WORKFLOW_ENTRY_NAME=`workflowEntry`,SESSION_TIMEOUT_WORKFLOW_NAME=`sessionTimeoutWorkflow`,WORKFLOW_TOOL_RUN_WORKFLOW_NAME=`workflowToolRunWorkflow`,STABLE_WORKFLOW_NAMES=new Set([WORKFLOW_ENTRY_NAME,`turnWorkflow`,SESSION_TIMEOUT_WORKFLOW_NAME,WORKFLOW_TOOL_RUN_WORKFLOW_NAME]);export{SESSION_TIMEOUT_WORKFLOW_NAME,STABLE_WORKFLOW_NAMES,WORKFLOW_ENTRY_NAME,WORKFLOW_TOOL_RUN_WORKFLOW_NAME};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { ModelMessage } from "ai";
|
|
2
|
+
import type { RuntimeToolResultActionResult } from "#shared/action-types.js";
|
|
3
|
+
import type { JsonValue } from "#shared/json.js";
|
|
4
|
+
/**
|
|
5
|
+
* Calls to the task tools. They defer out of the model step like
|
|
6
|
+
* workflow tool calls; the session answers them instead of a workflow run.
|
|
7
|
+
*/
|
|
8
|
+
export type TaskToolCall = {
|
|
9
|
+
readonly callId: string;
|
|
10
|
+
readonly kind: "task_wait";
|
|
11
|
+
readonly timeoutMs?: number;
|
|
12
|
+
} | {
|
|
13
|
+
readonly callId: string;
|
|
14
|
+
readonly kind: "task_cancel";
|
|
15
|
+
readonly taskId: string;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* The task tool calls a parked step's response still waits on. The response
|
|
19
|
+
* is the one record of these calls: a call without a result is pending, and
|
|
20
|
+
* a call with invalid input already carries its error result. The names are
|
|
21
|
+
* reserved, so no authored tool's call matches.
|
|
22
|
+
*/
|
|
23
|
+
export declare function pendingTaskToolCalls(messages: readonly ModelMessage[]): TaskToolCall[];
|
|
24
|
+
/** Why a `task_wait` call, or a held turn, stopped waiting. */
|
|
25
|
+
export type TaskWaitResult = {
|
|
26
|
+
readonly status: "settled";
|
|
27
|
+
/** Tasks whose results follow; both lists are empty when nothing was working. */
|
|
28
|
+
readonly settled: readonly {
|
|
29
|
+
readonly id: string;
|
|
30
|
+
readonly status: "completed" | "failed";
|
|
31
|
+
}[];
|
|
32
|
+
readonly working: readonly string[];
|
|
33
|
+
} | {
|
|
34
|
+
readonly status: "timeout" | "interrupt";
|
|
35
|
+
readonly working: readonly string[];
|
|
36
|
+
};
|
|
37
|
+
export interface TaskCancelResult {
|
|
38
|
+
readonly resumable: boolean;
|
|
39
|
+
readonly status: "cancelled" | "already_finished";
|
|
40
|
+
readonly tool: string;
|
|
41
|
+
}
|
|
42
|
+
export declare function taskToolResult(callId: string, toolName: string, output: JsonValue): RuntimeToolResultActionResult;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{TASK_CANCEL_TOOL_NAME,TASK_WAIT_TOOL_NAME}from"#protocol/task-tools.js";function pendingTaskToolCalls(e){let t=new Set;for(let n of e)if(typeof n.content!=`string`)for(let e of n.content)e.type===`tool-result`&&t.add(e.toolCallId);let n=[];for(let r of e)if(r.role===`assistant`&&typeof r.content!=`string`)for(let e of r.content){if(e.type!==`tool-call`||t.has(e.toolCallId))continue;let r=typeof e.input==`object`&&e.input!==null?e.input:{};if(e.toolName===TASK_CANCEL_TOOL_NAME){let t=String(Reflect.get(r,`taskId`));n.push({callId:e.toolCallId,kind:`task_cancel`,taskId:t})}else if(e.toolName===TASK_WAIT_TOOL_NAME){let t=Reflect.get(r,`timeoutSeconds`);n.push(typeof t==`number`?{callId:e.toolCallId,kind:`task_wait`,timeoutMs:t*1e3}:{callId:e.toolCallId,kind:`task_wait`})}}return n}function taskToolResult(e,t,n){return{callId:e,kind:`tool-result`,output:n,toolName:t}}export{pendingTaskToolCalls,taskToolResult};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { ModelMessage, SystemModelMessage } from "ai";
|
|
2
|
+
import type { HarnessToolDefinition } from "#harness/execute-tool.js";
|
|
3
|
+
import { type HarnessModelMessage } from "#harness/messages.js";
|
|
4
|
+
import type { HarnessSession, HarnessToolMap } from "#harness/types.js";
|
|
5
|
+
import type { WorkflowToolCallEntry } from "#shared/action-types.js";
|
|
6
|
+
import type { JsonObject } from "#shared/json.js";
|
|
7
|
+
export declare function isTaskTool(definition: HarnessToolDefinition | undefined): boolean;
|
|
8
|
+
/** Whether the agent can start tasks, so the task tools and system block are offered. */
|
|
9
|
+
export declare function offersTasks(tools: HarnessToolMap): boolean;
|
|
10
|
+
/** Adds `task_wait` and `task_cancel` to a tool set that can start tasks. */
|
|
11
|
+
export declare function withTaskTools(tools: HarnessToolMap): HarnessToolMap;
|
|
12
|
+
/**
|
|
13
|
+
* The task block, when the agent can start tasks. `finalReplyOnly` is set for a
|
|
14
|
+
* child or schedule session, which hides a held turn's text, so a reply before
|
|
15
|
+
* a result would reach no one.
|
|
16
|
+
*/
|
|
17
|
+
export declare function taskSystemMessages(tools: HarnessToolMap, options: {
|
|
18
|
+
readonly finalReplyOnly: boolean;
|
|
19
|
+
}): SystemModelMessage[];
|
|
20
|
+
/** A deferred call as the model made it, before the session knows what it enters. */
|
|
21
|
+
export interface DeferredCall {
|
|
22
|
+
readonly callId: string;
|
|
23
|
+
readonly definition: HarnessToolDefinition | undefined;
|
|
24
|
+
/** The call's model input. */
|
|
25
|
+
readonly input: JsonObject;
|
|
26
|
+
readonly toolName: string;
|
|
27
|
+
readonly turnId: string;
|
|
28
|
+
}
|
|
29
|
+
/** How a deferred call enters its workflow, with the tool's own input. */
|
|
30
|
+
export interface CommittedCallEntry {
|
|
31
|
+
readonly entry: WorkflowToolCallEntry;
|
|
32
|
+
readonly input: JsonObject;
|
|
33
|
+
readonly session: HarnessSession;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* How a deferred call enters its workflow. A call that starts a task commits
|
|
37
|
+
* the task's record alongside the call, so the run starts with its id; a
|
|
38
|
+
* `serve` tool's call with `taskId` goes to that task's `receive()`, which the
|
|
39
|
+
* session checks when it sends the call.
|
|
40
|
+
*/
|
|
41
|
+
export declare function commitCallEntry(session: HarnessSession, call: DeferredCall): CommittedCallEntry;
|
|
42
|
+
export declare function workingTaskIds(session: HarnessSession): readonly string[];
|
|
43
|
+
/**
|
|
44
|
+
* The messages a model step appends for tasks, before any new input: one
|
|
45
|
+
* `task.result` message with every settled result, then the
|
|
46
|
+
* `[Tasks]` note when the listing changed. The results are marked delivered
|
|
47
|
+
* in the same step. The message lives only in the model's history: clients
|
|
48
|
+
* read outcomes from `task.settled`.
|
|
49
|
+
*/
|
|
50
|
+
export declare function appendTaskContext(input: {
|
|
51
|
+
readonly messages: readonly HarnessModelMessage[];
|
|
52
|
+
readonly projectHistory: (messages: readonly ModelMessage[], state: HarnessSession["state"]) => readonly ModelMessage[];
|
|
53
|
+
readonly session: HarnessSession;
|
|
54
|
+
readonly tools: HarnessToolMap;
|
|
55
|
+
}): Promise<{
|
|
56
|
+
readonly messages: readonly HarnessModelMessage[];
|
|
57
|
+
readonly session: HarnessSession;
|
|
58
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{TASK_CANCEL_TOOL_NAME,TASK_WAIT_TOOL_NAME}from"#protocol/task-tools.js";import{createFrameworkUserMessage}from"#harness/messages.js";import{FINAL_REPLY_TASK_SYSTEM_BLOCK,TASKS_NOTE_LABEL,TASK_SYSTEM_BLOCK,renderModelOutputText,renderTaskResults,renderTasksNote}from"#execution/tasks/render.js";import{createTask,idleTasks,readTaskTable,takeTaskResults,workingTasks,writeTaskTable}from"#execution/tasks/table.js";import{splitTaskIdInput}from"#execution/tasks/task-id-input.js";import{entryPointOf,isAgentTool,startsTasks}from"#execution/tasks/tool-entry-point.js";import{taskCancelTool}from"#tools/provided/task-cancel.js";import{taskWaitTool}from"#tools/provided/task-wait.js";function isTaskTool(e){return e?.frameworkAction===`task-wait`||e?.frameworkAction===`task-cancel`}function offersTasks(e){for(let t of e.values())if(startsTasks(t))return!0;return!1}function withTaskTools(e){return offersTasks(e)?new Map([...e,[TASK_WAIT_TOOL_NAME,taskWaitTool],[TASK_CANCEL_TOOL_NAME,taskCancelTool]]):e}function taskSystemMessages(e,t){return offersTasks(e)?[{content:t.finalReplyOnly?FINAL_REPLY_TASK_SYSTEM_BLOCK:TASK_SYSTEM_BLOCK,role:`system`}]:[]}function commitCallEntry(e,t){let n=entryPointOf(t.definition);switch(n){case`execute`:return{entry:{entryPoint:n},input:t.input,session:e};case`task`:return commitTask(e,t,n,t.input);case`serve`:{let{input:r,taskId:i}=splitTaskIdInput(t.input);return i===void 0?commitTask(e,t,n,r):{entry:{entryPoint:`receive`,taskId:i},input:r,session:e}}}}function commitTask(e,t,n,r){let i=createTask(readTaskTable(e.state),{callId:t.callId,kind:isAgentTool(t.definition)?`agent`:`tool`,name:t.toolName,resumable:n===`serve`,turnId:t.turnId});return{entry:{entryPoint:n,taskId:i.taskId},input:r,session:writeTaskTable(e,i.table)}}function workingTaskIds(e){return workingTasks(readTaskTable(e.state)).map(e=>e.id)}async function appendTaskContext(e){let t=[],n=await deliverTaskResults(e);n.message!==void 0&&t.push(createFrameworkUserMessage(`task.result`,n.message));let r=resolveTasksNote({messages:e.projectHistory([...e.messages,...t],n.session.state),session:n.session});return r!==void 0&&t.push(createFrameworkUserMessage(`context.state`,r)),{messages:t,session:n.session}}async function deliverTaskResults(e){let{table:t,taken:n}=takeTaskResults(readTaskTable(e.session.state));if(n.length===0)return{session:e.session};let r=[];for(let t of n)for(let n of t.results)r.push(await toResultBlock(t,n,e.tools.get(t.name)));return{message:renderTaskResults(r),session:writeTaskTable(e.session,t)}}async function toResultBlock(e,t,n){let r={taskId:e.id,tool:e.name};return t.status===`failed`?{...r,body:t.error,status:`failed`}:{...r,body:await projectOutput(t.output,n),status:`completed`}}async function projectOutput(e,t){if(t?.toModelOutput===void 0)return renderModelOutputText(e);try{return renderModelOutputText(await t.toModelOutput(e))}catch{return renderModelOutputText(e)}}function resolveTasksNote(e){let t=readTaskTable(e.session.state),n=workingTasks(t).map(toListedTask),r=idleTasks(t).map(toListedTask),i=e.messages.findLast(isTasksNote);if(i===void 0&&n.length===0&&r.length===0)return;let a=renderTasksNote({idle:r,working:n});return i?.content===a?void 0:a}function toListedTask(e){return{id:e.id,tool:e.name}}function isTasksNote(e){return e.role===`user`&&typeof e.content==`string`&&e.content.startsWith(TASKS_NOTE_LABEL)}export{appendTaskContext,commitCallEntry,isTaskTool,offersTasks,taskSystemMessages,withTaskTools,workingTaskIds};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { TaskCancelResult, TaskWaitResult } from "#execution/tasks/calls.js";
|
|
2
|
+
export declare const TASK_WAIT_DESCRIPTION = "Call task_wait sparingly, only when you deliberately want to withhold a message from the user while waiting for a task result. Tasks keep running and their results reach you without calling task_wait. If the user should hear from you now, reply instead. Wait silently until any of your tasks has a result, a new message arrives, or timeoutSeconds pass. It returns after the first result, which follows in a <task_result> message; wait again only if you still want to withhold a reply until another result arrives. Waiting never stops a task.";
|
|
3
|
+
export declare const TASK_WAIT_TIMEOUT_DESCRIPTION = "Optional. Seconds to wait before returning without a result. Omit it to wait for a result or a new message, which is almost always right. Don't use short timeouts to check on tasks: results reach you without checking.";
|
|
4
|
+
export declare const TASK_CANCEL_DESCRIPTION = "Stop a task's current work. That work never reports back; if it already had a result, that result is still delivered. An agent, or any task that accepts more input, stays available: call its tool with its taskId to give it new work.";
|
|
5
|
+
export declare const TASK_CANCEL_TASK_ID_DESCRIPTION = "The id of the task to stop, copied from its \"Started task\" receipt or the [Tasks] note.";
|
|
6
|
+
/** The task block for a session a person reads, where a reply before a result is posted. */
|
|
7
|
+
export declare const TASK_SYSTEM_BLOCK: string;
|
|
8
|
+
/** The task block for a child or schedule session, whose caller reads only the final reply. */
|
|
9
|
+
export declare const FINAL_REPLY_TASK_SYSTEM_BLOCK: string;
|
|
10
|
+
/** Appended to a `serve` tool's description. */
|
|
11
|
+
export declare const SERVE_TOOL_DESCRIPTION = "To send this task more input, call this tool again with its taskId; without taskId, each call starts a new task.";
|
|
12
|
+
/** Appended to an agent tool's description, in place of the `serve` tool sentence. */
|
|
13
|
+
export declare const AGENT_SERVE_TOOL_DESCRIPTION = "It does not see this conversation, so put everything it needs in message. To correct or continue an agent task, call this tool again with its taskId; without taskId, each call starts a new agent.";
|
|
14
|
+
/** Describes the `taskId` eve adds to a `serve` tool's model input. */
|
|
15
|
+
export declare const TASK_ID_INPUT_DESCRIPTION = "The id of a task this tool started, copied from its \"Started task\" receipt or the [Tasks] note, to send it this input. Omit it to start a new task.";
|
|
16
|
+
/** Labels the `context.state` note that lists the turn's tasks. */
|
|
17
|
+
export declare const TASKS_NOTE_LABEL = "[Tasks]";
|
|
18
|
+
/** Opens every block of a `task.result` message. */
|
|
19
|
+
export declare const TASK_RESULT_TAG = "<task_result";
|
|
20
|
+
/** The failure a task reports when its record could not be decoded. */
|
|
21
|
+
export declare const UNREADABLE_TASK_ERROR = "The task's state could not be read.";
|
|
22
|
+
/** The receipt for a call that starts a task; a resumable task's says how to reach it again. */
|
|
23
|
+
export declare function renderTaskReceipt(task: {
|
|
24
|
+
readonly id: string;
|
|
25
|
+
readonly resumable: boolean;
|
|
26
|
+
readonly tool: string;
|
|
27
|
+
}): string;
|
|
28
|
+
/** The receipt for a call that reaches a resumable task by its `taskId`. */
|
|
29
|
+
export declare function renderTaskSentReceipt(taskId: string): string;
|
|
30
|
+
export declare function renderUnknownTaskError(taskId: string, tool: string): string;
|
|
31
|
+
export declare function renderUnknownCancelTaskError(taskId: string): string;
|
|
32
|
+
/** What the model reads when `task_cancel` answers. */
|
|
33
|
+
export declare function renderTaskCancelResult(taskId: string, result: TaskCancelResult): string;
|
|
34
|
+
export declare function renderTooManyTasksError(max: number, workingIds: readonly string[]): string;
|
|
35
|
+
export declare function renderFinalOutputWhileWorkingError(workingIds: readonly string[]): string;
|
|
36
|
+
/** What the model reads when `task_wait` returns after waiting `waitedMs`. */
|
|
37
|
+
export declare function renderTaskWaitResult(result: TaskWaitResult, waitedMs: number): string;
|
|
38
|
+
/** One `<task_result>` block of a `task.result` message. */
|
|
39
|
+
export interface TaskResultBlock {
|
|
40
|
+
readonly body: string;
|
|
41
|
+
readonly status: "completed" | "failed";
|
|
42
|
+
readonly taskId: string;
|
|
43
|
+
readonly tool: string;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* The `task.result` message: one `<task_result>` block per result. All
|
|
47
|
+
* bodies share one size budget; a body past it is cut and marked.
|
|
48
|
+
*/
|
|
49
|
+
export declare function renderTaskResults(results: readonly TaskResultBlock[]): string;
|
|
50
|
+
/**
|
|
51
|
+
* The blocks of a `task.result` message, in order, as a deterministic mock
|
|
52
|
+
* model reads them back; empty for any other text.
|
|
53
|
+
*/
|
|
54
|
+
export declare function readTaskResults(message: string): TaskResultBlock[];
|
|
55
|
+
/** The text of a tool's `toModelOutput` result, or of a raw output without one. */
|
|
56
|
+
export declare function renderModelOutputText(output: unknown): string;
|
|
57
|
+
/** A task as the `[Tasks]` note lists it. */
|
|
58
|
+
export interface ListedTask {
|
|
59
|
+
readonly id: string;
|
|
60
|
+
readonly tool: string;
|
|
61
|
+
}
|
|
62
|
+
/** The `[Tasks]` note: working tasks, then idle resumable tasks when there are any. */
|
|
63
|
+
export declare function renderTasksNote(input: {
|
|
64
|
+
readonly idle: readonly ListedTask[];
|
|
65
|
+
readonly working: readonly ListedTask[];
|
|
66
|
+
}): string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{formatDuration}from"#shared/format-duration.js";const TASK_WAIT_DESCRIPTION=`Call task_wait sparingly, only when you deliberately want to withhold a message from the user while waiting for a task result. Tasks keep running and their results reach you without calling task_wait. If the user should hear from you now, reply instead. Wait silently until any of your tasks has a result, a new message arrives, or timeoutSeconds pass. It returns after the first result, which follows in a <task_result> message; wait again only if you still want to withhold a reply until another result arrives. Waiting never stops a task.`,TASK_WAIT_TIMEOUT_DESCRIPTION=`Optional. Seconds to wait before returning without a result. Omit it to wait for a result or a new message, which is almost always right. Don't use short timeouts to check on tasks: results reach you without checking.`,TASK_CANCEL_DESCRIPTION=`Stop a task's current work. That work never reports back; if it already had a result, that result is still delivered. An agent, or any task that accepts more input, stays available: call its tool with its taskId to give it new work.`,TASK_ID_SOURCE=`copied from its "Started task" receipt or the [Tasks] note`,TASK_CANCEL_TASK_ID_DESCRIPTION=`The id of the task to stop, ${TASK_ID_SOURCE}.`,TASK_SYSTEM_BLOCK_OPENING=[`Tasks`,`- A call that returns "Started task <id>" is a task: it keeps working while you continue. Every agent call is a task.`,`- Each result arrives once, in a <task_result> message. Until then you know nothing about it, so don't guess or report its result.`,`- Ending your reply doesn't end your turn. While tasks work, eve holds your turn and calls you again with each result.`],TASK_SYSTEM_BLOCK_CLOSING=[`- Don't redo work you delegated. Never use sleep or shell commands to wait for a task.`,`- To correct or continue an agent, or any task that accepts more input, call its tool again with its taskId. A new message never stops your tasks: answer it if it asks you something, decide whether it changes the work, then keep each task, correct an agent by taskId, or stop a task with task_cancel.`],TASK_SYSTEM_BLOCK=[...TASK_SYSTEM_BLOCK_OPENING,`- If you have nothing to tell the person until a result arrives, call task_wait. Start every independent task first, then wait.`,`- If the person should hear from you now, for example to confirm work is underway when they don't need the result yet, reply. When results arrive, report them without repeating yourself.`,...TASK_SYSTEM_BLOCK_CLOSING].join(`
|
|
2
|
+
`),FINAL_REPLY_TASK_SYSTEM_BLOCK=[...TASK_SYSTEM_BLOCK_OPENING,`- Only your final reply reaches your caller. While tasks work, call task_wait instead of replying. Start every independent task first, then wait.`,...TASK_SYSTEM_BLOCK_CLOSING].join(`
|
|
3
|
+
`),SERVE_TOOL_DESCRIPTION=`To send this task more input, call this tool again with its taskId; without taskId, each call starts a new task.`,AGENT_SERVE_TOOL_DESCRIPTION=`It does not see this conversation, so put everything it needs in message. To correct or continue an agent task, call this tool again with its taskId; without taskId, each call starts a new agent.`,TASK_ID_INPUT_DESCRIPTION=`The id of a task this tool started, ${TASK_ID_SOURCE}, to send it this input. Omit it to start a new task.`,TASKS_NOTE_LABEL=`[Tasks]`,TASK_RESULT_TAG=`<task_result`,UNREADABLE_TASK_ERROR=`The task's state could not be read.`;function renderTaskReceipt(e){let t=`Started task ${e.id}. Its result will arrive in a <task_result> message.`;return e.resumable?`${t} To send it another message, call ${e.tool} again with taskId ${e.id}.`:t}function renderTaskSentReceipt(e){return`Sent to task ${e}. Its reply will arrive in a <task_result> message.`}function renderUnknownTaskError(e,t){return`No task "${e}" is available to ${t}: it may have ended or belong to another tool. Start a new one by calling ${t} without taskId.`}function renderUnknownCancelTaskError(e){return`No task "${e}" is in this session. Copy an id from a "Started task" receipt or the [Tasks] note.`}function renderTaskCancelResult(e,t){return t.status===`already_finished`?`${e} had no work to stop.`:t.resumable?`Stopped ${e}'s current work; it won't report back. To give it new work, call ${t.tool} again with taskId ${e}.`:`Stopped ${e}; it won't report back.`}function renderTooManyTasksError(e,t){return`${String(e)} tasks are already working (${t.join(`, `)}). Wait with task_wait or stop one with task_cancel, then try again.`}function renderFinalOutputWhileWorkingError(e){return`You can't give your final output while tasks you started are working (${e.join(`, `)}). Wait for their results with task_wait, or stop a task with task_cancel, then call final_output.`}function renderTaskWaitResult(e,t){switch(e.status){case`settled`:return renderSettledWait(e.settled,e.working);case`timeout`:return`Stopped waiting after ${formatDuration(t)}; ${countWorking(e.working)}. ${resultsArriveLater(e.working.length)}`;case`interrupt`:return`A new message arrived, so the wait ended after ${formatDuration(t)}; ${countWorking(e.working)}. Read the message, answer it if it asks you something, and decide whether it changes this work: ${interruptChoices(e.working.length)}`}}function renderSettledWait(e,t){if(e.length===0&&t.length===0)return`No tasks are working.`;let n=[];if(e.length>0){let t=e.map(e=>`${e.id} ${e.status}`),r=e.length===1?`its result follows`:`their results follow`;n.push(`${joinList(t)}; ${r}.`)}return t.length>0&&n.push(`${capitalize(countWorking(t))}: ${t.join(`, `)}.`),n.join(` `)}function countWorking(e){return e.length===1?`1 task is still working`:`${String(e.length)} tasks are still working`}function resultsArriveLater(e){return e===1?`Its result arrives before your turn ends; wait again only if you need it now.`:`Their results arrive before your turn ends; wait again only if you need them now.`}function interruptChoices(e){return`${e===1?`keep the task`:`keep the tasks`}, call an agent again with its taskId to correct it, or stop a task with task_cancel.`}function renderTaskResults(e){let t={bytes:51200,lines:2e3};return e.map(e=>{let n=fitToBudget(escapeTaskResultBody(e.body),t),r=`id="${escapeAttribute(e.taskId)}" tool="${escapeAttribute(e.tool)}" status="${e.status}"`;return`${TASK_RESULT_TAG} ${r}>${n}</task_result>`}).join(`
|
|
4
|
+
`)}const TASK_RESULT_BLOCK=RegExp(`${TASK_RESULT_TAG} id="([^"]*)" tool="([^"]*)" status="(completed|failed)">([\\s\\S]*?)</task_result>`,`g`);function readTaskResults(e){return[...e.matchAll(TASK_RESULT_BLOCK)].map(([,e,t,n,r])=>({body:r.replaceAll(`<\\/task_result`,`</task_result`),status:n,taskId:e,tool:t}))}function fitToBudget(e,t){let n=new TextEncoder,r=e.split(`
|
|
5
|
+
`),i=[];for(let e of r){let r=n.encode(e).byteLength+1;if(t.lines===0||r>t.bytes){i.push(`[truncated]`),t.lines=0,t.bytes=0;break}i.push(e),--t.lines,t.bytes-=r}return i.join(`
|
|
6
|
+
`)}function escapeTaskResultBody(e){return e.replaceAll(`</task_result`,`<\\/task_result`)}function renderModelOutputText(e){if(typeof e==`string`)return e;if(isModelOutput(e))switch(e.type){case`text`:return String(e.value);case`json`:return JSON.stringify(e.value);case`content`:return renderContentParts(e.value)}return JSON.stringify(e??null)}function renderContentParts(e){return Array.isArray(e)?e.map(e=>e.type===`text`?String(e.text):`[file: ${typeof e.filename==`string`?e.filename:String(e.mediaType)}]`).join(`
|
|
7
|
+
`):``}function isModelOutput(e){if(typeof e!=`object`||!e)return!1;let t=Reflect.get(e,`type`);return(t===`text`||t===`json`||t===`content`)&&`value`in e}function renderTasksNote(e){let t=[TASKS_NOTE_LABEL,`<tasks>`];for(let n of e.working)t.push(`<task ${listedTaskAttributes(n)} status="working"/>`);if(t.push(`</tasks>`),e.idle.length>0){t.push(`<idle>`);for(let n of e.idle)t.push(`<task ${listedTaskAttributes(n)}/>`);t.push(`</idle>`)}return t.join(`
|
|
8
|
+
`)}function listedTaskAttributes(e){return`id="${escapeAttribute(e.id)}" tool="${escapeAttribute(e.tool)}"`}function joinList(e){return e.length<=1?e.join(``):`${e.slice(0,-1).join(`, `)} and ${e.at(-1)}`}function capitalize(e){return e.charAt(0).toUpperCase()+e.slice(1)}function escapeAttribute(e){return e.replaceAll(`&`,`&`).replaceAll(`"`,`"`).replaceAll(`<`,`<`).replaceAll(`>`,`>`)}export{AGENT_SERVE_TOOL_DESCRIPTION,FINAL_REPLY_TASK_SYSTEM_BLOCK,SERVE_TOOL_DESCRIPTION,TASKS_NOTE_LABEL,TASK_CANCEL_DESCRIPTION,TASK_CANCEL_TASK_ID_DESCRIPTION,TASK_ID_INPUT_DESCRIPTION,TASK_RESULT_TAG,TASK_SYSTEM_BLOCK,TASK_WAIT_DESCRIPTION,TASK_WAIT_TIMEOUT_DESCRIPTION,UNREADABLE_TASK_ERROR,readTaskResults,renderFinalOutputWhileWorkingError,renderModelOutputText,renderTaskCancelResult,renderTaskReceipt,renderTaskResults,renderTaskSentReceipt,renderTaskWaitResult,renderTasksNote,renderTooManyTasksError,renderUnknownCancelTaskError,renderUnknownTaskError};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { SessionStateCursor } from "#execution/session/state-cursor.js";
|
|
2
|
+
import { type TaskToolCall } from "#execution/tasks/calls.js";
|
|
3
|
+
import { type TaskRunMessage } from "#execution/tasks/steps.js";
|
|
4
|
+
import { type TaskTable } from "#execution/tasks/table.js";
|
|
5
|
+
import type { WorkflowToolRunMessage } from "#execution/tools/workflow/messages.js";
|
|
6
|
+
import type { TaskCancelReason } from "#protocol/message.js";
|
|
7
|
+
import type { RuntimeActionResult } from "#shared/action-types.js";
|
|
8
|
+
/** Whether a run's message changes a task record. */
|
|
9
|
+
export declare function isTaskRunMessage(message: WorkflowToolRunMessage): message is TaskRunMessage;
|
|
10
|
+
/** The session's task table as the workflow body last committed it. */
|
|
11
|
+
export declare function sessionTaskTable(cursor: SessionStateCursor): TaskTable;
|
|
12
|
+
/**
|
|
13
|
+
* Cancels every working task: `session.cancel()` stops them, and a turn that
|
|
14
|
+
* ends anyway, such as by failing, cancels the tasks it held on.
|
|
15
|
+
*/
|
|
16
|
+
export declare function cancelWorkingTasks(cursor: SessionStateCursor, reason: Exclude<TaskCancelReason, "task_cancel">): Promise<void>;
|
|
17
|
+
export declare function answerTaskCancel(cursor: SessionStateCursor, call: Extract<TaskToolCall, {
|
|
18
|
+
readonly kind: "task_cancel";
|
|
19
|
+
}>): Promise<RuntimeActionResult>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{TASK_CANCEL_TOOL_NAME,UNKNOWN_TASK_CODE}from"#protocol/task-tools.js";import{renderTaskCancelResult,renderUnknownCancelTaskError}from"#execution/tasks/render.js";import{readTaskTable,taskCancelResult,workingTasks}from"#execution/tasks/table.js";import{taskToolResult}from"#execution/tasks/calls.js";import{cancelTasksStep}from"#execution/tasks/steps.js";function isTaskRunMessage(e){return e.from.taskId===void 0?!1:e.kind===`started`||e.kind===`reply`||e.kind===`usage`||e.kind===`outcome`}function sessionTaskTable(e){return readTaskTable(e.sessionState.snapshot.session.state)}async function cancelWorkingTasks(e,t){let n=workingTasks(sessionTaskTable(e)).map(e=>e.id);n.length!==0&&await e.advance(e=>cancelTasksStep({...e,reason:t,taskIds:n}))}async function answerTaskCancel(e,t){let n=taskCancelResult(sessionTaskTable(e),t.taskId);if(n===void 0){let e={code:UNKNOWN_TASK_CODE,message:renderUnknownCancelTaskError(t.taskId)};return{...taskToolResult(t.callId,TASK_CANCEL_TOOL_NAME,e),isError:!0}}return n.status===`cancelled`&&await e.advance(e=>cancelTasksStep({...e,reason:`task_cancel`,taskIds:[t.taskId]})),taskToolResult(t.callId,TASK_CANCEL_TOOL_NAME,renderTaskCancelResult(t.taskId,n))}export{answerTaskCancel,cancelWorkingTasks,isTaskRunMessage,sessionTaskTable};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type StartWorkflowTaskInput } from "#execution/tools/workflow/start.js";
|
|
2
|
+
import type { HarnessSession } from "#harness/types.js";
|
|
3
|
+
import { type TaskStartedStreamEvent } from "#protocol/message.js";
|
|
4
|
+
import type { RuntimeToolResultActionResult, WorkflowToolRunEntry } from "#shared/action-types.js";
|
|
5
|
+
type TaskDispatchInput = StartWorkflowTaskInput & {
|
|
6
|
+
readonly taskId: string;
|
|
7
|
+
};
|
|
8
|
+
/** The call's answer, and the `task.started` event the dispatch step publishes for it. */
|
|
9
|
+
interface TaskDispatchResult {
|
|
10
|
+
readonly result: RuntimeToolResultActionResult;
|
|
11
|
+
readonly session: HarnessSession;
|
|
12
|
+
readonly started?: TaskStartedStreamEvent;
|
|
13
|
+
}
|
|
14
|
+
/** The entry of a run that does a task's work. */
|
|
15
|
+
type TaskRunEntry = Extract<WorkflowToolRunEntry, {
|
|
16
|
+
readonly taskId: string;
|
|
17
|
+
}>;
|
|
18
|
+
/**
|
|
19
|
+
* Starts the run for a task its model step committed, once, and answers the
|
|
20
|
+
* call with its receipt and the `task.started` event the dispatch step
|
|
21
|
+
* publishes. Runs inside that step, where the task's cap is enforced: past
|
|
22
|
+
* it, the record is dropped and the call fails.
|
|
23
|
+
*/
|
|
24
|
+
export declare function startTaskRun(input: StartWorkflowTaskInput & {
|
|
25
|
+
readonly entry: TaskRunEntry;
|
|
26
|
+
}): Promise<TaskDispatchResult>;
|
|
27
|
+
/**
|
|
28
|
+
* Sends a call to the `serve` task it names by `taskId`. The task must be
|
|
29
|
+
* available to the tool, and a call that makes an idle task work again
|
|
30
|
+
* counts toward the cap. The call is recorded, reported as started, and sent
|
|
31
|
+
* to the task's run, whose body receives it from `receive()`.
|
|
32
|
+
*/
|
|
33
|
+
export declare function sendToTask(input: TaskDispatchInput): Promise<TaskDispatchResult>;
|
|
34
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createLogger,logError}from"#internal/logging.js";import{TOO_MANY_TASKS_CODE,UNKNOWN_TASK_CODE}from"#protocol/task-tools.js";import{createTaskStartedEvent}from"#protocol/message.js";import{renderTaskReceipt,renderTaskSentReceipt,renderTooManyTasksError,renderUnknownTaskError}from"#execution/tasks/render.js";import{MAX_WORKING_TASKS,findTask,isTaskAvailable,isTaskWorking,readTaskTable,recordTaskCall,recordTaskRun,removeTask,workingTasks,writeTaskTable}from"#execution/tasks/table.js";import{startFailureResult,startWorkflowToolCallRun}from"#execution/tools/workflow/start.js";import{sendTaskRunCommands}from"#execution/tasks/steps.js";import{createRuntimeToolResultFromValue}from"#harness/action-result-helpers.js";const log=createLogger(`execution.tasks`);async function startTaskRun(e){let{entry:t,session:n,task:r}=e,{taskId:i}=t,a={...e,taskId:i},o=startReceipt(a,t.entryPoint===`serve`),s=readTaskTable(n.state),c=findTask(s,i);if(c===void 0||!isTaskWorking(c))return{result:o,session:n};let l=tooManyTasks(a,s);if(l!==void 0)return{result:l,session:writeTaskTable(n,removeTask(s,i))};let u;try{u=await startWorkflowToolCallRun(e,t)}catch(e){return logError(log,`task run failed to start`,e,{taskId:i,toolName:r.toolName}),{result:startFailureResult(r,e),session:writeTaskTable(n,removeTask(s,i))}}return{result:o,session:writeTaskTable(n,recordTaskRun(s,i,u)),started:taskStartedEvent(a,c)}}async function sendToTask(e){let{session:t,task:n,taskId:r}=e,i=readTaskTable(t.state),a=findTask(i,r);if(!isTaskAvailable(a,n.toolName))return{result:unknownTaskResult(e),session:t};if(!isTaskWorking(a)){let n=tooManyTasks(e,i);if(n!==void 0)return{result:n,session:t}}let o=recordTaskCall(i,r,{agentContext:e.agentContext,auth:e.auth,callId:n.callId,executeInput:n.executeInput,input:n.input,sequence:e.batchEvent.sequence,stepIndex:e.batchEvent.stepIndex,turnId:e.batchEvent.turnId});return o.send!==void 0&&await sendTaskRunCommands(o.send),{result:toolResult(e,renderTaskSentReceipt(r)),session:writeTaskTable(t,o.table),started:taskStartedEvent(e,a)}}function tooManyTasks(e,t){let n=workingTasks(t).filter(e=>e.run!==void 0);if(n.length<MAX_WORKING_TASKS)return;let r=n.map(e=>e.id);return createRuntimeToolResultFromValue({callId:e.task.callId,isError:!0,output:{code:TOO_MANY_TASKS_CODE,message:renderTooManyTasksError(MAX_WORKING_TASKS,r)},toolName:e.task.toolName})}function unknownTaskResult(e){return createRuntimeToolResultFromValue({callId:e.task.callId,isError:!0,output:{code:UNKNOWN_TASK_CODE,message:renderUnknownTaskError(e.taskId,e.task.toolName)},toolName:e.task.toolName})}function taskStartedEvent(e,t){return createTaskStartedEvent({callId:e.task.callId,kind:t.kind,name:e.task.toolName,taskId:e.taskId,turnId:e.batchEvent.turnId})}function startReceipt(e,t){return toolResult(e,renderTaskReceipt({id:e.taskId,resumable:t,tool:e.task.toolName}))}function toolResult(e,t){return createRuntimeToolResultFromValue({callId:e.task.callId,output:t,toolName:e.task.toolName})}export{sendToTask,startTaskRun};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type TaskRunCommands } from "#execution/tasks/table.js";
|
|
2
|
+
import { type SessionStepState } from "#execution/publish-session-events.js";
|
|
3
|
+
import { type SessionStateTransition } from "#execution/session/state-delta.js";
|
|
4
|
+
import type { WorkflowToolRunMessage } from "#execution/tools/workflow/messages.js";
|
|
5
|
+
import { type TaskCancelReason } from "#protocol/message.js";
|
|
6
|
+
/** The messages a task's run sends that change its record. */
|
|
7
|
+
export type TaskRunMessage = Extract<WorkflowToolRunMessage, {
|
|
8
|
+
readonly kind: "outcome" | "reply" | "started" | "usage";
|
|
9
|
+
}>;
|
|
10
|
+
/** Applies one message from a task's run: started, a reply, usage no reply carried, or the run's outcome. */
|
|
11
|
+
export declare function applyTaskRunMessageStep(input: SessionStepState & {
|
|
12
|
+
readonly message: TaskRunMessage;
|
|
13
|
+
}): Promise<SessionStateTransition>;
|
|
14
|
+
/**
|
|
15
|
+
* Cancels tasks: their calls settle as cancelled and their runs are told to
|
|
16
|
+
* stop. A run ends itself within its cleanup deadline and reports cancelled.
|
|
17
|
+
* A `task()` run's cancel settles every request it relayed, so the session
|
|
18
|
+
* withdraws them in the same step and accepts no answer after it. A `serve()`
|
|
19
|
+
* run withdraws its stretch's questions itself, and the session decides each one.
|
|
20
|
+
*/
|
|
21
|
+
export declare function cancelTasksStep(input: SessionStepState & TaskCancellationInput): Promise<SessionStateTransition>;
|
|
22
|
+
interface TaskCancellationInput {
|
|
23
|
+
readonly reason: TaskCancelReason;
|
|
24
|
+
readonly taskIds: readonly string[];
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Sends commands to a task's run, in order. A run that already finished takes
|
|
28
|
+
* none; its outcome settles any call still waiting.
|
|
29
|
+
*/
|
|
30
|
+
export declare function sendTaskRunCommands(commands: TaskRunCommands): Promise<void>;
|
|
31
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createTaskSettledEvent}from"#protocol/message.js";import{cancelTask,findTask,finishTaskRun,markTaskRunStarted,readTaskTable,recordTaskRunUsage,settleRemainingTaskCalls,settleTaskCalls,writeTaskTable}from"#execution/tasks/table.js";import{readDurableSession,replaceDurableSessionSnapshot}from"#execution/durable-session-store.js";import{publishSessionEvents,relaySessionEvents}from"#execution/publish-session-events.js";import{withSessionStateDelta}from"#execution/session/state-delta.js";import{withdrawProxyInputRequests}from"#harness/proxy-input-requests.js";import{resumeHook}from"#internal/workflow/runtime.js";import{countRunUsage}from"#execution/agent-sessions/usage.js";import{workflowToolRunFailureOutput}from"#execution/tools/workflow/owner-inbox.js";import{ignoreGoneTarget}from"#execution/tasks/workflow-target.js";async function applyTaskRunMessageStep(e){"use step";return await withSessionStateDelta(e,applyTaskRunMessage)}async function applyTaskRunMessage(e){let{message:t}=e,n=t.from.taskId,r=readDurableSession(e.sessionState);if(n===void 0)return{serializedContext:e.serializedContext,sessionState:e.sessionState};let i=readTaskTable(r.state),a=[],o=[];switch(t.kind){case`started`:{let e=markTaskRunStarted(i,n,t.from.runId);i=e.table,e.held!==void 0&&await sendTaskRunCommands(e.held);break}case`reply`:{({session:r,table:i}=countTaskRunUsage(r,i,n,t));let e={output:t.output,status:`completed`},o=findTask(i,n),s=settleTaskCalls(i,{callIds:t.callIds,outcome:e,taskId:n});i=s.table,a.push(...taskSettledEvents(o,s.settled,e));break}case`usage`:({session:r,table:i}=countTaskRunUsage(r,i,n,t));break;case`outcome`:{({session:r,table:i}=countTaskRunUsage(r,i,n,t));let e=toOutcome(t),s=findTask(i,n),c=settleRemainingTaskCalls(i,n,e);a.push(...taskSettledEvents(s,c.settled,e)),i=finishTaskRun(c.table,n,t.from.runId),{events:o,session:r}=withdrawProxyInputRequests(r,(e,n)=>n.runId===t.from.runId);break}}let s=await relaySessionEvents({...e,sessionState:saveTable(e.sessionState,r,i)},o);return await publishSessionEvents({...e,...s},a)}async function cancelTasksStep(e){"use step";return await withSessionStateDelta(e,cancelTasks)}async function cancelTasks(e){let t=readDurableSession(e.sessionState),n=readTaskTable(t.state),r=[],i=new Set,a={reason:e.reason,status:`cancelled`};for(let t of e.taskIds){let e=findTask(n,t),o=cancelTask(n,t);n=o.table,r.push(...taskSettledEvents(e,o.settled,a)),o.send!==void 0&&(e?.resumable===!1&&i.add(o.send.run.runId),await sendTaskRunCommands(o.send))}let o=withdrawProxyInputRequests(t,(e,t)=>t.runId!==void 0&&i.has(t.runId)),s=await relaySessionEvents({...e,sessionState:saveTable(e.sessionState,o.session,n)},o.events);return await publishSessionEvents({...e,...s},r)}function taskSettledEvents(e,t,n){return e===void 0?[]:t.map(t=>taskSettledEvent(e,t,n))}function taskSettledEvent(e,t,n){let r={callId:t.callId,kind:e.kind,name:e.name,taskId:e.id,turnId:t.turnId};switch(n.status){case`completed`:return createTaskSettledEvent({...r,output:n.output,status:`completed`});case`failed`:return createTaskSettledEvent({...r,error:{message:n.error},status:`failed`});case`cancelled`:return createTaskSettledEvent(n.reason===void 0?{...r,status:`cancelled`}:{...r,cancel:{reason:n.reason},status:`cancelled`})}}async function sendTaskRunCommands(e){for(let t of e.commands)await ignoreGoneTarget(resumeHook(e.run.hookToken,toControlMessage(t)))}function toControlMessage(e){switch(e.kind){case`cancel`:return{kind:`cancel`,reason:`The task was cancelled.`};case`call`:return{call:e.call,kind:`call`}}}function toOutcome(e){switch(e.result.status){case`completed`:return{output:e.result.output,status:`completed`};case`failed`:return{error:failureMessage(e),status:`failed`};case`cancelled`:return{status:`cancelled`}}}function failureMessage(e){let t=workflowToolRunFailureOutput(e);if(typeof t==`string`)return t;let n=typeof t==`object`&&t?Reflect.get(t,`message`):void 0;return typeof n==`string`?n:JSON.stringify(t)}function countTaskRunUsage(e,t,n,r){let i=findTask(t,n)?.run;return r.usage===void 0||i?.runId!==r.from.runId?{session:e,table:t}:{session:countRunUsage(e,r.usage,i.usage),table:recordTaskRunUsage(t,n,r.usage)}}function saveTable(e,t,n){return replaceDurableSessionSnapshot({session:writeTaskTable(t,n),state:e})}export{applyTaskRunMessageStep,cancelTasksStep,sendTaskRunCommands};
|