eve 0.64.1 → 0.66.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 +42 -0
- package/README.md +1 -2
- package/dist/src/_virtual/_rolldown/runtime.js +1 -1
- package/dist/src/channel/resolve-text.d.ts +11 -7
- package/dist/src/channel/resolve-text.js +1 -1
- package/dist/src/channel/types.d.ts +4 -5
- package/dist/src/chunks/{use-eve-agent-BdKlQF32.js → use-eve-agent-BUeSjwIk.js} +244 -11
- package/dist/src/chunks/{use-eve-agent-IIuxkn6y.js → use-eve-agent-ydPlURM4.js} +244 -11
- package/dist/src/cli/dev/command-options.d.ts +1 -0
- package/dist/src/cli/dev/command.js +2 -2
- package/dist/src/cli/dev/local-server-process.js +1 -1
- package/dist/src/cli/dev/tui/argument-typeahead.d.ts +36 -0
- package/dist/src/cli/dev/tui/argument-typeahead.js +2 -0
- package/dist/src/cli/dev/tui/blocks.d.ts +1 -1
- package/dist/src/cli/dev/tui/blocks.js +2 -2
- package/dist/src/cli/dev/tui/prompt-command-handler.js +1 -1
- package/dist/src/cli/dev/tui/question-panel.d.ts +3 -2
- package/dist/src/cli/dev/tui/rail.d.ts +1 -1
- package/dist/src/cli/dev/tui/runner.d.ts +3 -0
- package/dist/src/cli/dev/tui/runner.js +1 -1
- package/dist/src/cli/dev/tui/setup-commands.d.ts +2 -8
- package/dist/src/cli/dev/tui/setup-commands.js +1 -2
- package/dist/src/cli/dev/tui/setup-flow.d.ts +0 -3
- package/dist/src/cli/dev/tui/terminal-renderer.d.ts +3 -0
- package/dist/src/cli/dev/tui/terminal-renderer.js +10 -12
- package/dist/src/cli/dev/tui/test/fake-setup-flow-renderer.js +1 -1
- package/dist/src/cli/dev/tui/theme.d.ts +1 -1
- package/dist/src/cli/dev/tui/tool-presentation.d.ts +4 -4
- package/dist/src/cli/dev/tui/tool-presentation.js +1 -1
- package/dist/src/cli/dev/tui/tui.js +1 -1
- package/dist/src/cli/dev/tui/vercel-trusted-sources-policy.d.ts +1 -1
- package/dist/src/cli/dev/tui/vercel-trusted-sources.js +1 -1
- package/dist/src/cli/invoke/result.d.ts +1 -1
- package/dist/src/cli/invoke/result.js +1 -1
- package/dist/src/cli/telemetry/preference.js +1 -1
- package/dist/src/client/agent-info-schema.d.ts +0 -2
- package/dist/src/client/agent-info-schema.js +1 -1
- package/dist/src/client/index.d.ts +1 -3
- package/dist/src/client/index.js +1 -1
- package/dist/src/compiled/.vendor-stamp.json +4 -3
- package/dist/src/compiled/@agentclientprotocol/sdk/index.js +2 -51
- package/dist/src/compiled/@ai-sdk/anthropic/index.js +2 -2
- package/dist/src/compiled/@ai-sdk/google/index.js +7 -7
- package/dist/src/compiled/@ai-sdk/mcp/index.js +1 -1
- package/dist/src/compiled/@ai-sdk/openai/index.js +4 -4
- package/dist/src/compiled/@ai-sdk/otel/index.js +1 -1
- package/dist/src/compiled/@cfworker/json-schema/index.d.ts +18 -0
- package/dist/src/compiled/@cfworker/json-schema/index.js +2 -0
- package/dist/src/compiled/@modelcontextprotocol/server/index.js +9 -58
- package/dist/src/compiled/@opentelemetry/api/index.js +1 -1
- package/dist/src/compiled/@opentelemetry/otlp-transformer/index.js +1 -1
- package/dist/src/compiled/@photon-ai/chat-adapter-imessage/index.js +55 -55
- package/dist/src/compiled/@vercel/blob/index.js +14 -36
- package/dist/src/compiled/@vercel/oidc/index.js +6 -28
- package/dist/src/compiled/@vercel/otel/index.js +1 -1
- package/dist/src/compiled/@vercel/sandbox/index.js +13 -13
- package/dist/src/compiled/{@workflow/builders/LICENSE.md → @vercel/sdk/LICENSE} +2 -2
- package/dist/src/compiled/@vercel/sdk/index.d.ts +41 -0
- package/dist/src/compiled/@vercel/sdk/index.js +1 -0
- package/dist/src/compiled/@workflow/core/index.js +1 -1
- package/dist/src/compiled/@workflow/core/private.js +1 -1
- package/dist/src/compiled/@workflow/core/runtime/helpers.js +1 -1
- package/dist/src/compiled/@workflow/core/runtime.js +2 -2
- package/dist/src/compiled/@workflow/core/serialization.js +1 -1
- package/dist/src/compiled/@workflow/core/workflow.js +1 -1
- package/dist/src/compiled/@workflow/errors/index.js +1 -1
- package/dist/src/compiled/@workflow/world-local/index.js +5 -5
- package/dist/src/compiled/@workflow/world-vercel/index.js +16 -16
- package/dist/src/compiled/_chunks/client/core-CspsxXR-.js +52 -0
- package/dist/src/compiled/_chunks/client/rolldown-runtime-DK3Fl9T5.js +1 -0
- package/dist/src/compiled/_chunks/node/auth-Dztlx9pE.js +2 -0
- package/dist/src/compiled/_chunks/workflow/{attribute-changes-DFx4eluc.js → attribute-changes-89Nwz7XW.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{chunk-5MU5Z6L3-CrYztnvh.js → chunk-5MU5Z6L3-z9-dfnHp.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{chunk-NWCAEW5Y-ClfmNvkQ.js → chunk-NWCAEW5Y-8afLJrun.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{dist-C3919PVU.js → dist-C3ZE62yI.js} +3 -3
- package/dist/src/compiled/_chunks/workflow/dist-CNT2vjZ4.js +1 -0
- package/dist/src/compiled/_chunks/workflow/{dist-xTushGCp.js → dist-DtXwQbZr.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{esm-DyLz8Egm.js → esm-DtrPCf49.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{experimental-evaluation-D8_K_Pe9.js → experimental-evaluation-Dm32egEG.js} +2 -2
- package/dist/src/compiled/_chunks/workflow/frames-DnrfSd1P.js +3 -0
- package/dist/src/compiled/_chunks/workflow/{functions-C06vHfWP.js → functions-DpZiBxgQ.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{getMachineId-bsd-WEBNKY2R-DcIEvZzd.js → getMachineId-bsd-WEBNKY2R-D5OkV-EY.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{getMachineId-darwin-LT47KAXP-C4nRhfn9.js → getMachineId-darwin-LT47KAXP-BqwKrkSO.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{getMachineId-linux-LTVQO6VW-BqQf2T4W.js → getMachineId-linux-LTVQO6VW-CJlbJ4KP.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{getMachineId-unsupported-UKWBA27G-oYffWhib.js → getMachineId-unsupported-UKWBA27G-C4Y3-LZG.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{getMachineId-win-NLJKOPY6-CpL96LtN.js → getMachineId-win-NLJKOPY6-CsPs71SE.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{global-DFW-hO6M.js → global-DIlFoH2w.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{helpers-Bw52uyzw.js → helpers-k3zcudWr.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{logger-DFNCa8Nl.js → logger-Bzc8jWWj.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/resume-hook-BmJ263ZR.js +1 -0
- package/dist/src/compiled/_chunks/workflow/{rolldown-runtime-DPpTSio4.js → rolldown-runtime-B_knIduE.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{run-BT6SQv5f.js → run-NLvREued.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{serialization-Cl0SYU0I.js → serialization-HCDeQWcR.js} +2 -2
- package/dist/src/compiled/_chunks/workflow/{signal-exit-B9U6kH7R.js → signal-exit-DZKTacNU.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/sleep-Bi508qmg.js +1 -0
- package/dist/src/compiled/_chunks/workflow/{token-CrFhCmWs.js → token-1wSBbi5N.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{token-U5XEWlVM.js → token-BhlnqoHM.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{token-util-BkqzD0OM.js → token-util-Cm4Ec1Bg.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/token-util-DaeRTzDa.js +5 -0
- package/dist/src/compiled/_chunks/workflow/{wait-until-Dzhr6tzf.js → wait-until-DXLZx3tU.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{wrapper-CKui_eTd.js → wrapper-CzrF_dmI.js} +3 -3
- package/dist/src/compiled/_chunks/workflow/ws-transport-BSM_Cl7a.js +1 -0
- package/dist/src/compiled/jose/index.js +1 -1
- package/dist/src/compiled/zod/index.js +1 -51
- package/dist/src/compiled/zod/v3.js +1 -0
- package/dist/src/compiled/zod/v4/core.js +1 -0
- package/dist/src/compiled/zod-validation-error/index.js +1 -1
- package/dist/src/compiler/artifacts.d.ts +2 -0
- package/dist/src/compiler/artifacts.js +1 -1
- package/dist/src/compiler/bundled-extension.d.ts +17 -0
- package/dist/src/compiler/bundled-extension.js +1 -0
- package/dist/src/compiler/compile-agent.d.ts +4 -0
- package/dist/src/compiler/compile-agent.js +1 -1
- package/dist/src/compiler/compile-from-memory.js +1 -1
- package/dist/src/compiler/development-extensions.d.ts +23 -0
- package/dist/src/compiler/development-extensions.js +1 -0
- package/dist/src/compiler/extension-compatibility.d.ts +20 -14
- package/dist/src/compiler/extension-compatibility.js +1 -1
- package/dist/src/compiler/load-binding-namespace.js +1 -1
- package/dist/src/compiler/manifest.js +1 -1
- package/dist/src/compiler/normalize-manifest-helpers.js +1 -1
- package/dist/src/compiler/normalize-manifest-types.d.ts +23 -0
- package/dist/src/compiler/normalize-manifest.d.ts +2 -7
- package/dist/src/compiler/normalize-manifest.js +1 -1
- package/dist/src/compiler/source-graph-paths.d.ts +2 -0
- package/dist/src/compiler/source-graph-paths.js +1 -0
- package/dist/src/compiler/source-graph.d.ts +4 -1
- package/dist/src/compiler/source-graph.js +1 -1
- package/dist/src/context/build-base-tool-context.js +1 -1
- package/dist/src/context/build-callback-context.js +1 -1
- package/dist/src/context/dynamic-skill-lifecycle.d.ts +3 -3
- package/dist/src/context/dynamic-skill-lifecycle.js +1 -1
- package/dist/src/context/keys.d.ts +18 -4
- package/dist/src/context/keys.js +1 -1
- package/dist/src/context/session-context.d.ts +5 -4
- package/dist/src/discover/bundled-extension.d.ts +11 -0
- package/dist/src/discover/bundled-extension.js +1 -0
- package/dist/src/discover/discover-agent.js +1 -1
- package/dist/src/discover/manifest.d.ts +5 -0
- package/dist/src/evals/assertions/collector.js +1 -1
- package/dist/src/evals/cli/eval.js +2 -2
- package/dist/src/evals/runner/artifacts.js +1 -1
- package/dist/src/evals/types.d.ts +2 -0
- package/dist/src/execution/coordination-dispatch-step.js +1 -1
- package/dist/src/execution/dynamic-workflow/tool.js +1 -1
- package/dist/src/execution/node-step.d.ts +2 -4
- package/dist/src/execution/node-step.js +1 -1
- package/dist/src/execution/proxied-deliver-step.js +1 -1
- package/dist/src/execution/route-child-delivery.js +1 -1
- package/dist/src/execution/sandbox/bindings/docker-templates.d.ts +6 -0
- package/dist/src/execution/sandbox/bindings/docker-templates.js +1 -1
- package/dist/src/execution/sandbox/bindings/docker.d.ts +6 -2
- package/dist/src/execution/sandbox/bindings/docker.js +1 -1
- package/dist/src/execution/sandbox/bindings/just-bash-runtime.d.ts +2 -2
- package/dist/src/execution/sandbox/bindings/just-bash.d.ts +2 -2
- package/dist/src/execution/sandbox/bindings/local-provider-utils.js +1 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-lifecycle.d.ts +7 -2
- package/dist/src/execution/sandbox/bindings/microsandbox.d.ts +6 -2
- package/dist/src/execution/sandbox/bindings/vercel.d.ts +6 -3
- package/dist/src/execution/sandbox/bindings/vercel.js +1 -1
- package/dist/src/execution/sandbox/ensure.js +1 -1
- package/dist/src/execution/sandbox/glob-tool.js +1 -1
- package/dist/src/execution/sandbox/grep-tool.js +1 -1
- package/dist/src/execution/sandbox/logging-session.js +2 -2
- package/dist/src/execution/sandbox/provider-host.js +1 -1
- package/dist/src/execution/sandbox/read-file.js +1 -1
- package/dist/src/execution/sandbox/session.d.ts +5 -2
- package/dist/src/execution/sandbox/session.js +1 -1
- package/dist/src/execution/session/event-sink.d.ts +7 -13
- package/dist/src/execution/session/event-sink.js +1 -1
- package/dist/src/execution/session/handoff.d.ts +2 -2
- package/dist/src/execution/session/handoff.js +1 -1
- package/dist/src/execution/session/turn-step.js +1 -1
- package/dist/src/execution/session-workflow-tool-run.js +1 -1
- package/dist/src/execution/settle-cancelled-turn-step.js +1 -1
- package/dist/src/execution/skills/instructions.d.ts +6 -8
- package/dist/src/execution/skills/instructions.js +2 -2
- package/dist/src/execution/tasks/parent/tool-execution.js +1 -1
- package/dist/src/execution/tools/agent-router-workflow.js +1 -1
- package/dist/src/execution/tools/agent-router.d.ts +1 -2
- package/dist/src/execution/tools/agent-router.js +1 -1
- package/dist/src/execution/tools/ask-question-workflow.d.ts +11 -0
- package/dist/src/execution/tools/ask-question-workflow.js +1 -0
- package/dist/src/execution/tools/ask-question.d.ts +19 -0
- package/dist/src/execution/tools/ask-question.js +2 -0
- package/dist/src/execution/tools/connection-search.js +1 -1
- package/dist/src/execution/tools/file-state.d.ts +1 -7
- package/dist/src/execution/tools/file-state.js +1 -1
- package/dist/src/execution/tools/load-skill.d.ts +9 -5
- package/dist/src/execution/tools/load-skill.js +1 -1
- package/dist/src/execution/tools/sleep-workflow.js +1 -1
- package/dist/src/execution/tools/sleep.d.ts +8 -9
- package/dist/src/execution/tools/sleep.js +1 -1
- package/dist/src/execution/tools/subagent/emit-event-step.d.ts +2 -1
- package/dist/src/execution/tools/subagent/emit-event-step.js +1 -1
- package/dist/src/execution/tools/subagent/task-agent-requests.js +1 -1
- package/dist/src/execution/tools/workflow/answer.d.ts +2 -0
- package/dist/src/execution/tools/workflow/answer.js +1 -1
- package/dist/src/execution/tools/workflow/ask.d.ts +3 -2
- package/dist/src/execution/tools/workflow/ask.js +1 -1
- package/dist/src/execution/tools/workflow/body.d.ts +5 -0
- package/dist/src/execution/tools/workflow/body.js +1 -1
- package/dist/src/execution/tools/workflow/cancel.d.ts +0 -4
- package/dist/src/execution/tools/workflow/cancel.js +1 -1
- package/dist/src/execution/tools/workflow/start.d.ts +1 -0
- package/dist/src/execution/tools/workflow/start.js +1 -1
- package/dist/src/extensions/code/extension/extension.d.ts +57 -0
- package/dist/src/extensions/code/extension/extension.js +1 -0
- package/dist/src/extensions/code/extension/hooks/authenticate.d.ts +2 -0
- package/dist/src/extensions/code/extension/hooks/authenticate.js +1 -0
- package/dist/src/extensions/code/extension/instructions.md +87 -0
- package/dist/src/extensions/code/extension/lib/command-failure.d.ts +7 -0
- package/dist/src/extensions/code/extension/lib/command-failure.js +2 -0
- package/dist/src/extensions/code/extension/lib/computer-use-driver-source.d.ts +14 -0
- package/dist/src/extensions/code/extension/lib/computer-use-driver-source.js +1309 -0
- package/dist/src/extensions/code/extension/lib/computer-use-sandbox.d.ts +9 -0
- package/dist/src/extensions/code/extension/lib/computer-use-sandbox.js +120 -0
- package/dist/src/extensions/code/extension/lib/computer-use.d.ts +36 -0
- package/dist/src/extensions/code/extension/lib/computer-use.js +78 -0
- package/dist/src/extensions/code/extension/lib/connect-authentication.d.ts +7 -0
- package/dist/src/extensions/code/extension/lib/connect-authentication.js +1 -0
- package/dist/src/extensions/code/extension/lib/credentials.d.ts +13 -0
- package/dist/src/extensions/code/extension/lib/credentials.js +3 -0
- package/dist/src/extensions/code/extension/lib/diagnostics.d.ts +30 -0
- package/dist/src/extensions/code/extension/lib/diagnostics.js +6 -0
- package/dist/src/extensions/code/extension/lib/generated-paths.d.ts +18 -0
- package/dist/src/extensions/code/extension/lib/generated-paths.js +2 -0
- package/dist/src/extensions/code/extension/lib/github-shell-schema.d.ts +11 -0
- package/dist/src/extensions/code/extension/lib/github-shell-schema.js +1 -0
- package/dist/src/extensions/code/extension/lib/github-shell.d.ts +53 -0
- package/dist/src/extensions/code/extension/lib/github-shell.js +1 -0
- package/dist/src/extensions/code/extension/lib/grep-search.d.ts +61 -0
- package/dist/src/extensions/code/extension/lib/grep-search.js +6 -0
- package/dist/src/extensions/code/extension/lib/guidelines.d.ts +25 -0
- package/dist/src/extensions/code/extension/lib/guidelines.js +2 -0
- package/dist/src/extensions/code/extension/lib/patch.d.ts +35 -0
- package/dist/src/extensions/code/extension/lib/patch.js +20 -0
- package/dist/src/extensions/code/extension/lib/prwatch-github.d.ts +70 -0
- package/dist/src/extensions/code/extension/lib/prwatch-github.js +1 -0
- package/dist/src/extensions/code/extension/lib/prwatch-registry.d.ts +27 -0
- package/dist/src/extensions/code/extension/lib/prwatch-registry.js +1 -0
- package/dist/src/extensions/code/extension/lib/prwatch.d.ts +2 -0
- package/dist/src/extensions/code/extension/lib/prwatch.js +1 -0
- package/dist/src/extensions/code/extension/lib/repository-root.d.ts +4 -0
- package/dist/src/extensions/code/extension/lib/repository-root.js +1 -0
- package/dist/src/extensions/code/extension/lib/sandbox.d.ts +12 -0
- package/dist/src/extensions/code/extension/lib/sandbox.js +2 -0
- package/dist/src/extensions/code/extension/lib/shell.d.ts +1 -0
- package/dist/src/extensions/code/extension/lib/shell.js +1 -0
- package/dist/src/extensions/code/extension/lib/signed-commit.d.ts +2 -0
- package/dist/src/extensions/code/extension/lib/signed-commit.js +130 -0
- package/dist/src/extensions/code/extension/lib/tooling.d.ts +27 -0
- package/dist/src/extensions/code/extension/lib/tooling.js +92 -0
- package/dist/src/extensions/code/extension/skills/investigate/SKILL.md +30 -0
- package/dist/src/extensions/code/extension/skills/lookup-agent-run/SKILL.md +29 -0
- package/dist/src/extensions/code/extension/skills/pr/SKILL.md +53 -0
- package/dist/src/extensions/code/extension/skills/review/SKILL.md +21 -0
- package/dist/src/extensions/code/extension/subagents/worker/agent.d.ts +17 -0
- package/dist/src/extensions/code/extension/subagents/worker/agent.js +1 -0
- package/dist/src/extensions/code/extension/subagents/worker/instructions.md +20 -0
- package/dist/src/extensions/code/extension/subagents/worker/sandbox.d.ts +2 -0
- package/dist/src/extensions/code/extension/subagents/worker/sandbox.js +1 -0
- package/dist/src/extensions/code/extension/subagents/worker/tools/glob.d.ts +1 -0
- package/dist/src/extensions/code/extension/subagents/worker/tools/glob.js +1 -0
- package/dist/src/extensions/code/extension/subagents/worker/tools/grep.d.ts +1 -0
- package/dist/src/extensions/code/extension/subagents/worker/tools/grep.js +1 -0
- package/dist/src/extensions/code/extension/subagents/worker/tools/load_skill.d.ts +2 -0
- package/dist/src/extensions/code/extension/subagents/worker/tools/load_skill.js +1 -0
- package/dist/src/extensions/code/extension/subagents/worker/tools/read_file.d.ts +1 -0
- package/dist/src/extensions/code/extension/subagents/worker/tools/read_file.js +1 -0
- package/dist/src/extensions/code/extension/subagents/worker/tools/web_fetch.d.ts +2 -0
- package/dist/src/extensions/code/extension/subagents/worker/tools/web_fetch.js +1 -0
- package/dist/src/extensions/code/extension/subagents/worker/tools/web_search.d.ts +2 -0
- package/dist/src/extensions/code/extension/subagents/worker/tools/web_search.js +1 -0
- package/dist/src/extensions/code/extension/subagents/worker/tools/write_file.d.ts +2 -0
- package/dist/src/extensions/code/extension/subagents/worker/tools/write_file.js +1 -0
- package/dist/src/extensions/code/extension/tools/apply_patch.d.ts +28 -0
- package/dist/src/extensions/code/extension/tools/apply_patch.js +2 -0
- package/dist/src/extensions/code/extension/tools/computer_use.d.ts +400 -0
- package/dist/src/extensions/code/extension/tools/computer_use.js +1 -0
- package/dist/src/extensions/code/extension/tools/gh.d.ts +27 -0
- package/dist/src/extensions/code/extension/tools/gh.js +1 -0
- package/dist/src/extensions/code/extension/tools/grep.d.ts +28 -0
- package/dist/src/extensions/code/extension/tools/grep.js +1 -0
- package/dist/src/extensions/code/tools.d.ts +4 -0
- package/dist/src/extensions/code/tools.js +1 -0
- package/dist/src/framework/sources/registry.js +1 -1
- package/dist/src/harness/compaction-prompt.d.ts +0 -6
- package/dist/src/harness/compaction-prompt.js +2 -2
- package/dist/src/harness/compaction.js +1 -1
- package/dist/src/harness/final-output.js +1 -1
- package/dist/src/harness/hitl/approval-input-requests.d.ts +0 -2
- package/dist/src/harness/hitl/approval-input-requests.js +1 -1
- package/dist/src/harness/input-extraction.d.ts +4 -15
- package/dist/src/harness/input-extraction.js +1 -1
- package/dist/src/harness/input-request-class.d.ts +0 -20
- package/dist/src/harness/input-request-class.js +1 -1
- package/dist/src/harness/input-requests.d.ts +1 -1
- package/dist/src/harness/input-requests.js +1 -1
- package/dist/src/harness/pending-input-batches.d.ts +1 -1
- package/dist/src/harness/proxy-input-requests.d.ts +9 -1
- package/dist/src/harness/proxy-input-requests.js +1 -1
- package/dist/src/harness/stale-input-responses.d.ts +1 -2
- package/dist/src/harness/stale-input-responses.js +1 -1
- package/dist/src/harness/tool-loop.js +2 -2
- package/dist/src/harness/tools.d.ts +0 -9
- package/dist/src/harness/tools.js +1 -1
- package/dist/src/harness/types.d.ts +2 -9
- package/dist/src/internal/application/optional-package-import.d.ts +9 -0
- package/dist/src/internal/application/optional-package-import.js +1 -0
- package/dist/src/internal/application/optional-package-install.d.ts +1 -5
- package/dist/src/internal/application/optional-package-install.js +2 -2
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/internal/authored-definition/schema-backed.js +1 -1
- package/dist/src/internal/authored-module-loader.js +1 -1
- package/dist/src/internal/development-programmatic-source-loader.d.ts +6 -0
- package/dist/src/internal/development-programmatic-source-loader.js +1 -0
- package/dist/src/internal/nitro/dev-runtime-artifacts.js +1 -1
- package/dist/src/internal/nitro/host/create-application-nitro.js +1 -1
- package/dist/src/internal/nitro/host/dev-authored-rebuild-coordinator.d.ts +2 -0
- package/dist/src/internal/nitro/host/dev-authored-rebuild-coordinator.js +1 -1
- package/dist/src/internal/nitro/host/dev-workspace-extensions.js +1 -1
- package/dist/src/internal/nitro/host/prepare-application-host.d.ts +2 -0
- package/dist/src/internal/nitro/host/prepare-application-host.js +1 -1
- package/dist/src/internal/nitro/host/start-development-server.js +2 -2
- package/dist/src/internal/nitro/host/types.d.ts +3 -0
- package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response.js +1 -1
- package/dist/src/internal/workflow-bundle/workflow-builders.d.ts +0 -2
- package/dist/src/internal/workflow-bundle/workflow-builders.js +1 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-config@0.2.7/node_modules/@vercel/cli-config/dist/index.js +21 -0
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/envpath.js +1 -0
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/errors.js +2 -0
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/errutils.js +1 -0
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/exec.js +1 -0
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/fsutils.js +1 -0
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/index.js +1 -0
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/lookup.js +1 -0
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/safety.js +1 -0
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_37d5e4f23f0f03cba2e0819e67e81b38/node_modules/@vercel/connect/dist/authorization.js +1 -0
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_37d5e4f23f0f03cba2e0819e67e81b38/node_modules/@vercel/connect/dist/connector.js +1 -0
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_37d5e4f23f0f03cba2e0819e67e81b38/node_modules/@vercel/connect/dist/index.js +1 -0
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_37d5e4f23f0f03cba2e0819e67e81b38/node_modules/@vercel/connect/dist/installation.js +1 -0
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_37d5e4f23f0f03cba2e0819e67e81b38/node_modules/@vercel/connect/dist/internal/base-url.js +1 -0
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_37d5e4f23f0f03cba2e0819e67e81b38/node_modules/@vercel/connect/dist/internal/default-scopes.js +1 -0
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_37d5e4f23f0f03cba2e0819e67e81b38/node_modules/@vercel/connect/dist/internal/env.js +1 -0
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_37d5e4f23f0f03cba2e0819e67e81b38/node_modules/@vercel/connect/dist/internal/url-validation.js +1 -0
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_37d5e4f23f0f03cba2e0819e67e81b38/node_modules/@vercel/connect/dist/token.js +1 -0
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.8/node_modules/@vercel/oidc/dist/auth-errors.js +1 -0
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.8/node_modules/@vercel/oidc/dist/exchange-vercel-oidc-token.js +1 -0
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.8/node_modules/@vercel/oidc/dist/get-context.js +1 -0
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.8/node_modules/@vercel/oidc/dist/get-vercel-oidc-token-sync.js +1 -0
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.8/node_modules/@vercel/oidc/dist/get-vercel-oidc-token-with-refresh.js +2 -0
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.8/node_modules/@vercel/oidc/dist/index.js +1 -0
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.8/node_modules/@vercel/oidc/dist/oauth.js +1 -0
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.8/node_modules/@vercel/oidc/dist/token-error.js +1 -0
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.8/node_modules/@vercel/oidc/dist/token-io.js +1 -0
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.8/node_modules/@vercel/oidc/dist/token-util.js +2 -0
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.8/node_modules/@vercel/oidc/dist/token.js +1 -0
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.8/node_modules/@vercel/oidc/dist/verify-vercel-oidc-token.js +1 -0
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.8/node_modules/@vercel/oidc/dist/version.js +1 -0
- package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js +1 -0
- package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js +1 -0
- package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js +1 -0
- package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js +1 -0
- package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js +1 -0
- package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js +1 -0
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/index.js +1 -0
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/command.js +1 -0
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/error.js +2 -0
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/kill.js +1 -0
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/promise.js +1 -0
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/stdio.js +1 -0
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/stream.js +1 -0
- package/dist/src/node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/buffer-stream.js +1 -0
- package/dist/src/node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/index.js +1 -0
- package/dist/src/node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/core.js +1 -0
- package/dist/src/node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/main.js +1 -0
- package/dist/src/node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/realtime.js +1 -0
- package/dist/src/node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/signals.js +1 -0
- package/dist/src/node_modules/.pnpm/is-stream@2.0.1/node_modules/is-stream/index.js +1 -0
- package/dist/src/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js +1 -0
- package/dist/src/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js +1 -0
- package/dist/src/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/index.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/compact/decrypt.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/compact/encrypt.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/flattened/decrypt.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/flattened/encrypt.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/general/decrypt.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/general/encrypt.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwk/embedded.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwk/thumbprint.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwks/local.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwks/remote.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/compact/sign.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/compact/verify.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/flattened/sign.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/flattened/verify.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/general/sign.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/general/verify.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/decrypt.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/encrypt.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/produce.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/sign.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/unsecured.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/verify.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/key/export.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/key/generate_key_pair.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/key/generate_secret.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/key/import.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/aesgcmkw.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/buffer_utils.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/cek.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/check_iv_length.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/check_key_type.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/check_p2s.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/crypto_key.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/decrypt_key_management.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/encrypt_key_management.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/epoch.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/invalid_key_input.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/is_disjoint.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/is_jwk.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/is_object.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/iv.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/jwt_claims_set.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/private_symbols.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/secs.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/validate_algorithms.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/validate_crit.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/aeskw.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/asn1.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/base64url.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/cbc_tag.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/check_cek_length.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/check_key_length.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/ciphers.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/decrypt.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/digest.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/dsa_digest.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/ecdhes.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/encrypt.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/fetch_jwks.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/generate.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/get_named_curve.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/get_sign_verify_key.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/hmac_digest.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/is_key_like.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/is_key_object.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/jwk_to_key.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/key_to_jwk.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/node_key.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/normalize_key.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/pbes2kw.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/random.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/rsaes.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/runtime.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/sign.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/timing_safe_equal.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/verify.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/webcrypto.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/base64url.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/decode_jwt.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/decode_protected_header.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/errors.js +1 -0
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/runtime.js +1 -0
- package/dist/src/node_modules/.pnpm/merge-stream@2.0.0/node_modules/merge-stream/index.js +1 -0
- package/dist/src/node_modules/.pnpm/mimic-fn@2.1.0/node_modules/mimic-fn/index.js +1 -0
- package/dist/src/node_modules/.pnpm/npm-run-path@4.0.1/node_modules/npm-run-path/index.js +1 -0
- package/dist/src/node_modules/.pnpm/onetime@5.1.2/node_modules/onetime/index.js +1 -0
- package/dist/src/node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js +1 -0
- package/dist/src/node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js +1 -0
- package/dist/src/node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js +1 -0
- package/dist/src/node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js +1 -0
- package/dist/src/node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/signals.js +1 -0
- package/dist/src/node_modules/.pnpm/strip-final-newline@2.0.0/node_modules/strip-final-newline/index.js +2 -0
- package/dist/src/node_modules/.pnpm/which@2.0.2/node_modules/which/which.js +1 -0
- package/dist/src/public/channels/github/checkout.d.ts +7 -2
- package/dist/src/public/channels/github/checkout.js +1 -1
- package/dist/src/public/channels/github/defaults.js +1 -1
- package/dist/src/public/channels/slack/api-errors.d.ts +33 -0
- package/dist/src/public/channels/slack/api-errors.js +1 -0
- package/dist/src/public/channels/slack/api.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/definitions/sandbox.d.ts +1 -1
- package/dist/src/public/memory/file/provider.js +1 -1
- package/dist/src/public/sandbox/docker.d.ts +7 -0
- package/dist/src/public/sandbox/index.d.ts +1 -1
- package/dist/src/public/sandbox/microsandbox.d.ts +7 -0
- package/dist/src/public/sandbox/vercel.d.ts +7 -0
- package/dist/src/public/skills/index.d.ts +1 -2
- package/dist/src/public/tools/ask-question.d.ts +1 -1
- package/dist/src/public/tools/ask-question.js +1 -1
- package/dist/src/runtime/agent/mock-model-fixtures.js +2 -2
- package/dist/src/runtime/connections/mcp-client.d.ts +0 -7
- package/dist/src/runtime/connections/mcp-client.js +1 -1
- package/dist/src/runtime/connections/openapi-client.d.ts +0 -3
- package/dist/src/runtime/connections/openapi-client.js +1 -1
- package/dist/src/runtime/workspace/seed-files.js +1 -1
- package/dist/src/sandbox/providers/docker.d.ts +4 -4
- package/dist/src/sandbox/providers/just-bash.d.ts +2 -2
- package/dist/src/sandbox/providers/microsandbox.d.ts +4 -4
- package/dist/src/sandbox/providers/vercel.d.ts +4 -3
- package/dist/src/sandbox/state.d.ts +2 -0
- package/dist/src/self-modification/config.d.ts +6 -0
- package/dist/src/self-modification/extension/config-schema.d.ts +25 -0
- package/dist/src/self-modification/extension/config-schema.js +1 -0
- package/dist/src/self-modification/extension/extension.d.ts +3 -47
- package/dist/src/self-modification/extension/extension.js +1 -1
- package/dist/src/self-modification/extension/subagents/agent/instructions.js +6 -2
- package/dist/src/self-modification/extension/subagents/agent/tools/registry_add.js +1 -1
- package/dist/src/self-modification/git-workspace.d.ts +5 -1
- package/dist/src/self-modification/git.d.ts +5 -1
- package/dist/src/services/dev-client/request-headers.d.ts +1 -1
- package/dist/src/services/dev-client/request-headers.js +1 -1
- package/dist/src/setup/flows/model.d.ts +0 -108
- package/dist/src/setup/flows/model.js +1 -1
- package/dist/src/setup/integrations/discord/api.js +1 -1
- package/dist/src/setup/integrations/discord/connect.js +1 -1
- package/dist/src/setup/integrations/github/connect.js +1 -1
- package/dist/src/setup/integrations/linear/connect.js +1 -1
- package/dist/src/setup/integrations/linq/connect.js +1 -1
- package/dist/src/setup/integrations/photon/connect.js +1 -1
- package/dist/src/setup/integrations/teams/connect.js +1 -1
- package/dist/src/setup/project-resolution.js +1 -1
- package/dist/src/setup/scaffold/create/project.js +1 -1
- package/dist/src/setup/slack-connect.d.ts +1 -1
- package/dist/src/setup/slack-connect.js +1 -1
- package/dist/src/setup/vercel-api-failure.js +1 -1
- package/dist/src/setup/vercel-deployment.js +1 -1
- package/dist/src/setup/vercel-project-api.d.ts +1 -1
- package/dist/src/setup/vercel-project-api.js +1 -1
- package/dist/src/setup/vercel-project-framework.js +1 -1
- package/dist/src/setup/vercel-project.js +0 -0
- package/dist/src/shared/connection-types.d.ts +0 -2
- package/dist/src/shared/input.d.ts +1 -6
- package/dist/src/shared/sandbox-network-policy.d.ts +5 -4
- package/dist/src/shared/sandbox-session.d.ts +0 -15
- package/dist/src/shared/skill-package.d.ts +3 -0
- package/dist/src/shared/skill-package.js +1 -1
- package/dist/src/subagents/hitl-proxy.d.ts +11 -1
- package/dist/src/subagents/hitl-proxy.js +1 -1
- package/dist/src/svelte/index.js +1 -1
- package/dist/src/svelte/use-eve-agent.js +1 -1
- package/dist/src/tasks/json.d.ts +72 -2
- package/dist/src/tasks/json.js +1 -1
- package/dist/src/tools/behavior.d.ts +2 -5
- package/dist/src/tools/definition.d.ts +23 -5
- package/dist/src/tools/framework/agent-contract.d.ts +7 -6
- package/dist/src/tools/framework/agent-contract.js +1 -1
- package/dist/src/tools/framework/agent.d.ts +4 -13
- package/dist/src/tools/framework/task-cancel.d.ts +1 -17
- package/dist/src/tools/framework/task-contract.d.ts +16 -137
- package/dist/src/tools/framework/task-contract.js +1 -1
- package/dist/src/tools/provided/ask-question.d.ts +18 -0
- package/dist/src/tools/provided/ask-question.js +1 -0
- package/dist/src/tools/provided/bash.d.ts +11 -12
- package/dist/src/tools/provided/bash.js +1 -1
- package/dist/src/tools/provided/glob.d.ts +13 -14
- package/dist/src/tools/provided/glob.js +1 -1
- package/dist/src/tools/provided/grep.d.ts +17 -18
- package/dist/src/tools/provided/grep.js +1 -1
- package/dist/src/tools/provided/read-file.d.ts +14 -15
- package/dist/src/tools/provided/read-file.js +1 -1
- package/dist/src/tools/provided/sleep.d.ts +2 -2
- package/dist/src/tools/provided/web-fetch.d.ts +13 -18
- package/dist/src/tools/provided/web-fetch.js +1 -1
- package/dist/src/tools/provided/workflow.js +1 -1
- package/dist/src/tools/provided/write-file.d.ts +10 -11
- package/dist/src/tools/provided/write-file.js +1 -1
- package/dist/src/tools/schema.d.ts +40 -10
- package/dist/src/tools/schema.js +1 -1
- package/dist/src/vue/index.js +1 -1
- package/dist/src/vue/use-eve-agent.js +1 -1
- package/docs/README.md +1 -1
- package/docs/agent-config.md +11 -11
- package/docs/channels/slack.mdx +1 -1
- package/docs/concepts/built-in-tools.md +16 -66
- package/docs/concepts/default-harness.md +1 -3
- package/docs/concepts/execution-model-and-durability.mdx +1 -1
- package/docs/concepts/sessions-runs-and-streaming.md +2 -2
- package/docs/connections/overview.mdx +1 -1
- package/docs/evals/assertions.mdx +2 -2
- package/docs/evals/judge.mdx +3 -3
- package/docs/extensions.md +4 -0
- package/docs/getting-started.mdx +2 -2
- package/docs/guides/deployment/vercel.mdx +6 -0
- package/docs/guides/dev-tui.md +2 -2
- package/docs/guides/dynamic-capabilities.md +2 -0
- package/docs/guides/evaluate.md +12 -9
- package/docs/guides/frontend/overview.mdx +1 -1
- package/docs/guides/hooks.md +6 -3
- package/docs/guides/instrumentation/agent-runs.mdx +101 -0
- package/docs/guides/instrumentation/instrumentation.mdx +2 -1
- package/docs/guides/instrumentation/meta.json +1 -1
- package/docs/guides/instrumentation/migration.md +5 -1
- package/docs/guides/instrumentation/otel.mdx +8 -27
- package/docs/guides/self-modification.md +37 -0
- package/docs/guides/session-context.md +11 -13
- package/docs/install-integrations.mdx +1 -1
- package/docs/meta.json +1 -0
- package/docs/reference/cli.md +10 -7
- package/docs/reference/typescript-api.md +42 -42
- package/docs/sandbox/index.mdx +11 -0
- package/docs/skills.mdx +5 -10
- package/docs/subagents/index.mdx +7 -5
- package/docs/tools/human-in-the-loop.md +22 -11
- package/docs/tools/overview.mdx +7 -1
- package/docs/tools/workflows.mdx +45 -20
- package/docs/tutorial/guard-the-spend.mdx +1 -1
- package/package.json +30 -9
- package/dist/src/cli/dev/tui/model-picker.d.ts +0 -50
- package/dist/src/cli/dev/tui/model-picker.js +0 -1
- package/dist/src/cli/dev/tui/todo-panel.d.ts +0 -44
- package/dist/src/cli/dev/tui/todo-panel.js +0 -1
- package/dist/src/compiled/@workflow/builders/index.d.ts +0 -62
- package/dist/src/compiled/@workflow/builders/index.js +0 -1
- package/dist/src/compiled/_chunks/client/errors-Cd0_QQdM.js +0 -2
- package/dist/src/compiled/_chunks/node/auth-DDrvYko5.js +0 -2
- package/dist/src/compiled/_chunks/node/schemas-g-rLPCNX.js +0 -50
- package/dist/src/compiled/_chunks/workflow/coerce-D0oqvQ_w.js +0 -1
- package/dist/src/compiled/_chunks/workflow/dist-DjECvUyK.js +0 -2
- package/dist/src/compiled/_chunks/workflow/frames-D_Q-7A1N.js +0 -3
- package/dist/src/compiled/_chunks/workflow/resume-hook-BhA_nDEV.js +0 -1
- package/dist/src/compiled/_chunks/workflow/schemas-4CmFgxN_.js +0 -50
- package/dist/src/compiled/_chunks/workflow/sleep-DB4AH9-A.js +0 -1
- package/dist/src/compiled/_chunks/workflow/token-util-pP4KRRl0.js +0 -27
- package/dist/src/compiled/_chunks/workflow/ws-transport-BpTMh40s.js +0 -1
- package/dist/src/execution/compaction.d.ts +0 -14
- package/dist/src/execution/compaction.js +0 -1
- package/dist/src/execution/tools/todo.d.ts +0 -91
- package/dist/src/execution/tools/todo.js +0 -2
- package/dist/src/harness/hitl/question-input-requests.d.ts +0 -15
- package/dist/src/harness/hitl/question-input-requests.js +0 -1
- package/dist/src/harness/request-input-tool.d.ts +0 -4
- package/dist/src/harness/request-input-tool.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_sdk@1.28.8/node_modules/@vercel/sdk/esm/lib/primitives.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_sdk@1.28.8/node_modules/@vercel/sdk/esm/lib/schemas.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_sdk@1.28.8/node_modules/@vercel/sdk/esm/models/aclaction.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_sdk@1.28.8/node_modules/@vercel/sdk/esm/models/sdkvalidationerror.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_sdk@1.28.8/node_modules/@vercel/sdk/esm/models/updateprojectblock.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_sdk@1.28.8/node_modules/@vercel/sdk/esm/models/updateprojectprojectsbranchmatcher.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_sdk@1.28.8/node_modules/@vercel/sdk/esm/types/defaultToZeroValue.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_sdk@1.28.8/node_modules/@vercel/sdk/esm/types/fp.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_sdk@1.28.8/node_modules/@vercel/sdk/esm/types/primitives.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_sdk@1.28.8/node_modules/@vercel/sdk/esm/types/rfcdate.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_sdk@1.28.8/node_modules/@vercel/sdk/esm/types/smartUnion.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_sdk@1.28.8/node_modules/@vercel/sdk/esm/types/unrecognized.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/index.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v3/ZodError.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v3/errors.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v3/external.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v3/helpers/errorUtil.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v3/helpers/parseUtil.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v3/helpers/util.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v3/index.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v3/locales/en.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v3/types.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/classic/checks.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/classic/coerce.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/classic/compat.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/classic/deep-partial.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/classic/errors.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/classic/external.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/classic/from-json-schema.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/classic/in-out.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/classic/iso.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/classic/parse.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/classic/schemas.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/api.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/checks.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/compile.js +0 -2
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/core.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/doc.js +0 -3
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/errors.js +0 -2
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/index.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/json-schema-generator.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/json-schema-processors.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/json-schema.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/memoizer.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/parse.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/regexes.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/registries.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/schemas.js +0 -46
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/to-json-schema.js +0 -3
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/util.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/versions.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/visit.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/ar.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/az.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/be.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/bg.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/bn.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/ca.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/ckb.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/cs.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/da.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/de.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/el.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/en.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/eo.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/es.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/fa.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/fi.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/fr-CA.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/fr.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/gu.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/he.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/hi.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/hr.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/hu.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/hy.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/id.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/index.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/is.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/it.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/ja.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/ka.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/kh.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/km.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/kn.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/ko.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/lt.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/mk.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/ms.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/ne.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/nl.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/nn.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/no.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/ota.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/pl.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/ps.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/pt-BR.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/pt.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/ro.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/ru.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/sk.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/sl.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/sv.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/ta.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/th.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/tk.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/tr.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/ua.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/uk.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/ur.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/uz.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/vi.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/yo.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/zh-CN.js +0 -1
- package/dist/src/node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/zh-TW.js +0 -1
- package/dist/src/public/tools/todo.d.ts +0 -3
- package/dist/src/public/tools/todo.js +0 -1
- package/dist/src/runtime/skills/sandbox-access.d.ts +0 -22
- package/dist/src/runtime/skills/sandbox-access.js +0 -1
- package/dist/src/shared/skill-types.d.ts +0 -22
- package/dist/src/shared/skill-types.js +0 -1
- package/dist/src/tools/framework/ask-question.d.ts +0 -38
- package/dist/src/tools/framework/ask-question.js +0 -1
- package/dist/src/tools/provided/todo.d.ts +0 -8
- package/dist/src/tools/provided/todo.js +0 -2
- /package/dist/src/{node_modules/.pnpm/zod@4.5.4/node_modules/zod/v3/helpers/typeAliases.js → compiler/normalize-manifest-types.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defaultDeliverResult}from"#channel/adapter.js";import{contextStorage}from"#context/container.js";import{AuthKey,CapabilitiesKey,ChannelDeliveryKey,HandleEventKey,InitiatorAuthKey,ModeKey,ParentSessionKey,SessionDynamicSubagentRuntimeRevisionKey,SessionDynamicToolRuntimeRevisionKey,SessionTitleKey,StaticModelReferenceKey,TaskDeliveryPolicyKey,TurnDeliveryIdsKey,TurnTaskDeliveryKey}from"#context/keys.js";import{createAuthorizationCompletedEvent,createSessionStartedEvent,createTurnStartedEvent}from"#protocol/message.js";import{BundleKey,ChannelKey}from"#runtime/sessions/runtime-context-keys.js";import{coalesceTurnInputs,createTurnInputMessages,validateHarnessModelMessages}from"#harness/messages.js";import{drainMemoryCommit,prepareMemoryPreamble}from"#context/memory-lifecycle.js";import{emitTurnPreamble,getHarnessEmissionState,isHarnessBetweenTurns,setHarnessEmissionState}from"#harness/emission.js";import{createWorkflowRuntime}from"#execution/workflow-runtime.js";import{consumeDeferredStepInput}from"#harness/pending-input-batches.js";import{deserializeContext,serializeContext}from"#context/serialize.js";import{createDurableSessionState,readDurableSession}from"#execution/durable-session-store.js";import{refreshDynamicSessionSubagentsForRuntimeRevision}from"#context/dynamic-subagent-lifecycle.js";import{resolveEffectiveAgentRuntime}from"#execution/effective-agent-config.js";import{hydrateDurableSession,refreshSessionFromTurnAgent}from"#execution/session.js";import{readRetainedBackgroundToolResult,runBackgroundStep}from"#execution/tasks/parent/tool-execution.js";import*as agentTraceState from"#tracing/agent-trace-context-store.js";import{activeTurnId}from"#harness/active-turn-id.js";import{derivePendingState}from"#execution/session/pending-turn-state.js";import{rebindMissingCompiledDynamicToolCallbacks,refreshDynamicSessionToolsForRuntimeRevision}from"#context/dynamic-tool-lifecycle.js";import{setChannelContext}from"#execution/channel-context.js";import{deriveSessionTitle}from"#execution/eve-workflow-attributes.js";import{drainDynamicInstructionUserMessages,prepareDynamicInstructionPreamble}from"#context/dynamic-instruction-lifecycle.js";import*as activityCohort from"#execution/activity-cohort.js";import{CallbackBaseUrlKey,PendingAuthorizationResultKey,clearPendingAuthorization,getPendingAuthorization}from"#harness/authorization.js";import{setEveAttributes}from"#runtime/attributes/emit.js";import{bindSessionInstrumentation}from"#instrumentation/runtime.js";import{RuntimeActionSettlementTimesKey}from"#harness/runtime-action-settlement-state.js";import{matchAuthorizationCallbacks}from"#execution/authorization-callback-match.js";import{isTurnCancellation,throwIfTurnAborted}from"#harness/turn-cancellation.js";import{resolveSessionStepResult}from"#execution/session/turn-step-result.js";import{createSessionEventSink}from"#execution/session/event-sink.js";import{resolveWorkflowCallbackBaseUrl}from"#execution/workflow-callback-url.js";import{resolveEffectiveOutputSchema}from"#execution/effective-output-schema.js";import{buildRuntimeIdentity,createExecutionNodeStep}from"#execution/node-step.js";import{getBackgroundTaskDelivery,markBackgroundTaskStepInput,resolveInitiatingTaskContext,resolveTaskDeliveryContext}from"#tasks/delivery-context.js";import{prepareWorkflowPreambleTrace}from"#execution/workflow-trace-context.js";import{reconcileSessionContinuationToken}from"#execution/reconcile-session-continuation-token.js";import{createExecutionHistoryView}from"#execution/history-view.js";import{resolveRuntimeCompiledArtifactsVersionedCacheKey}from"#runtime/cache-key.js";import{runModelCallBatch}from"#execution/model-call-batching.js";import{createCancelledModelCallBatchResult}from"#execution/cancelled-model-call-batch.js";function channelDeliveryErrorCode(e){if(typeof e==`object`&&e&&`code`in e){let t=e.code;if(typeof t==`string`&&t.length>0)return t}return`CHANNEL_DELIVERY_FAILED`}async function turnStep(e){"use step";return runSessionStep(e)}async function runSessionStep(e){let t=e.input?.delivery,n=t,r=e.input?.runtimeResults,i=readDurableSession(e.sessionState),a=await deserializeContext(e.serializedContext),o=a.require(ChannelKey),s=a.require(BundleKey),c=resolveEffectiveAgentRuntime(s,a),l=t?.taskDeliveryPolicy??a.get(TaskDeliveryPolicyKey)??`auto`;a.set(TaskDeliveryPolicyKey,l);try{let{getWorkflowMetadata:e}=await import(`#compiled/@workflow/core/index.js`),t=e();typeof t.url==`string`&&a.set(CallbackBaseUrlKey,resolveWorkflowCallbackBaseUrl(t.url))}catch{}let u=getPendingAuthorization(i.state),d;if(u&&n!==void 0){let{matches:e,remainingPayloads:t}=matchAuthorizationCallbacks(u,n.payloads);if(n={...n,payloads:t},e.length>0){let r=activityCohort.restoreAuthorizationActivity({ctx:a,matches:e,pending:u}),o=e.map(e=>e.result);a.set(PendingAuthorizationResultKey,o),i={...i,state:clearPendingAuthorization(i.state,r)},d=e,t.length===0&&(n=void 0)}}let f=a.get(AuthKey);n?.auth!==void 0&&(a.set(AuthKey,n.auth??null),a.has(InitiatorAuthKey)||a.set(InitiatorAuthKey,n.auth??null));let p=getBackgroundTaskDelivery(n),m=hydrateDurableSession({compactionOverrides:{thresholdPercent:c.thresholdPercent},durable:i,turnAgent:c.turnAgent}),h=createExecutionHistoryView(m),g=bindSessionInstrumentation({agentName:c.turnAgent.id,ctx:a,rootSessionId:m.rootSessionId??m.sessionId,sessionId:m.sessionId}),_=getHarnessEmissionState(m.state);if(!_.sessionStarted&&!a.has(SessionTitleKey)&&!a.has(ParentSessionKey)){let e=t?.payloads.find(e=>e.message!==void 0)?.message,n=deriveSessionTitle(t?.title??e);n!==void 0&&(a.set(SessionTitleKey,n),await setEveAttributes({"$eve.title":n}))}t!==void 0&&(await contextStorage.run(a,()=>g?.preparePreamble({sequence:_.sequence,sessionStarted:_.sessionStarted})),await contextStorage.run(a,()=>g?.instrumentChannelDelivery({agentName:s.turnAgent.id,ctx:a,delivery:t,rootSessionId:m.rootSessionId??m.sessionId,sequence:_.sequence,sessionId:m.sessionId,turnId:activeTurnId(_)})));let failChannelDeliveries=async e=>{await contextStorage.run(a,()=>g?.instrumentChannelDelivery({ctx:a,error:e,errorCode:channelDeliveryErrorCode(e),includeTurn:!1,outcome:`failed`})),await g?.flush()},v=createSessionEventSink({abortSignal:e.abortSignal,adapter:o,bundle:s,ctx:a,effectiveAgent:c,instrumentation:g,isFirstTurn:_.sequence===0,sessionWritable:e.sessionWritable,sessionId:m.sessionId}),{adapterCtx:y,dynamicConnections:b,effectiveNode:x,handleEvent:S}=v;try{let C=n!==void 0&&!isHarnessBetweenTurns(m)?structuredClone(y.state):void 0,w;if(n!==void 0){let e=[];try{for(let t of n.payloads){let n=o.deliver?await o.deliver(t,y):defaultDeliverResult(t);n!=null&&e.push(p===void 0?n:markBackgroundTaskStepInput(n))}}catch(e){throw await failChannelDeliveries(e),e}w=e.length===0?void 0:e.reduce(coalesceTurnInputs)}let T=n!==void 0&&w===void 0&&!isHarnessBetweenTurns(m);if(T)f===void 0?a.delete(AuthKey):a.set(AuthKey,f),y.state=C;else if(t!==void 0&&a.set(TurnTaskDeliveryKey,`none`),t?.payloads.some(e=>e.message!==void 0)){let e=t.deliveryMetadata?.map(e=>e.deliveryId)??[];a.set(TurnDeliveryIdsKey,_.turnId?[...new Set([...a.get(TurnDeliveryIdsKey)??[],...e])]:e)}else!_.sessionStarted&&a.get(ChannelDeliveryKey)!==void 0&&a.set(TurnDeliveryIdsKey,[a.require(ChannelDeliveryKey).deliveryId]);r!==void 0&&(r.acceptedAtMsByCallId!==void 0&&a.set(RuntimeActionSettlementTimesKey,r.acceptedAtMsByCallId),w={...w,runtimeActionResults:r.results});let E;if(w!==void 0&&p!==void 0){let e=resolveTaskDeliveryContext({state:i.state,taskDeliveryIds:p.taskDeliveryIds??[p.taskDeliveryId],taskDeliveryPolicy:l});e!==void 0&&(a.set(TurnTaskDeliveryKey,e.phase),E=e.rootTurnId,w={...w,context:[...w.context??[],e.context]})}activityCohort.updateActivityRootForDelivery({activeTurnId:activeTurnId(_),ctx:a,delivery:T?void 0:t,sessionState:i.state,taskRootTurnId:E});let D=a.get(TurnTaskDeliveryKey);if(D===`none`||D===`initiating`){let e=resolveInitiatingTaskContext({state:i.state,turnId:activeTurnId(_)});e!==void 0&&a.set(TurnTaskDeliveryKey,e.phase)}if(t!==void 0){let e={...o,state:{...y.state}};setChannelContext(a,e)}if(n!==void 0&&w===void 0&&isHarnessBetweenTurns(m)){await contextStorage.run(a,()=>g?.instrumentChannelDelivery({ctx:a,includeTurn:!1,outcome:`completed`})),await g?.flush();let t=reconcileSessionContinuationToken(a,m),n=serializeContext(a),r=t===m?e.sessionState:createDurableSessionState({session:t});return{action:`park`,...derivePendingState(t),serializedContext:n,sessionState:r}}let O=s.subagentRegistry.dynamicResolvers??[],k=s.resolvedAgent.dynamicToolResolvers??[],A=buildRuntimeIdentity(x);try{let e=process.env.VERCEL_DEPLOYMENT_ID?.trim(),t=e?`deployment:${e}`:await resolveRuntimeCompiledArtifactsVersionedCacheKey(s.compiledArtifactsSource),n=_.sessionStarted;if(a.setVirtualContext(StaticModelReferenceKey,c.turnAgent.model??null),!n)a.set(SessionDynamicSubagentRuntimeRevisionKey,t),a.set(SessionDynamicToolRuntimeRevisionKey,t);else{let e=createSessionStartedEvent({runtime:A});await Promise.all([refreshDynamicSessionSubagentsForRuntimeRevision({ctx:a,resolvers:O,event:e,messages:h.initial.messages,runtimeRevision:t}),contextStorage.run(a,async()=>await refreshDynamicSessionToolsForRuntimeRevision({ctx:a,resolvers:k,event:e,messages:h.initial.messages,runtimeRevision:t}))]),await rebindMissingCompiledDynamicToolCallbacks({ctx:a,event:createTurnStartedEvent({sequence:_.sequence,turnId:activeTurnId(_)}),messages:h.initial.messages,resolvers:k})}}catch(e){throw await failChannelDeliveries(e),e}let j=a.require(ModeKey),M=s.resolvedAgent.config?.experimental?.workflow?.modelCallsPerStep??1,N=a.get(CapabilitiesKey),runHarnessStep=async(t,n)=>{let r=refreshSessionFromTurnAgent({compactionOverrides:{thresholdPercent:c.thresholdPercent},session:t,turnAgent:c.turnAgent});return createExecutionNodeStep({steeringSignal:e.steeringSignal,abortSignal:e.abortSignal,capabilities:N,clearOnly:e.input?.control===`clear`,compactOnly:e.input?.control===`compact`,createRuntime:createWorkflowRuntime,handleEvent:S,historyProjector:h.projector,historyView:h.prepare(r),instrumentation:g,mode:j,modelResolutionScope:{moduleMap:s.moduleMap,nodeId:s.nodeId},node:x})(r,n)},P,F;try{throwIfTurnAborted(e.abortSignal),F=await runModelCallBatch({steeringSignal:e.steeringSignal,initialInput:w,initialSession:m,modelCallsPerStep:M,runStep:async({firstCall:t,session:n,stepInput:r})=>{let i=await runBackgroundStep(a,n,async e=>{a.setVirtualContext(HandleEventKey,S),a.setVirtualContext(StaticModelReferenceKey,c.turnAgent.model??null);let n=t?resolveEffectiveOutputSchema({agentOutputSchema:c.turnAgent.outputSchema,input:w,mode:j,session:e}):e;if(await b.rehydrate(getHarnessEmissionState(n.state),A,isHarnessBetweenTurns(n)),t&&d){let e=getHarnessEmissionState(n.state);if(isHarnessBetweenTurns(n)){let t=createTurnInputMessages(consumeDeferredStepInput({session:n,input:r}).input);prepareDynamicInstructionPreamble(a,h.messages(n)),prepareMemoryPreamble(a,{history:n.history,input:t,projector:h.projector,state:n.state});let i=[],o=await prepareWorkflowPreambleTrace({emissionState:e,instrumentation:g});try{e=await emitTurnPreamble(S,{},e,h.projector({messages:[...n.history,...t],state:n.state}),A,o)}finally{i=drainDynamicInstructionUserMessages(a);let e=drainMemoryCommit(a);n={...n,history:validateHarnessModelMessages([...e?.history??n.history,...i]),state:e?.state??n.state}}n=setHarnessEmissionState(n,e)}for(let{authorization:t,result:n}of d){let r=u?.challenges.find(e=>e.attemptId===n.attemptId)?.candidateId;await S(createAuthorizationCompletedEvent({attemptId:n.attemptId,authorization:t,candidateId:r,name:n.name,outcome:`authorized`,sequence:e.sequence,stepIndex:e.stepIndex,turnId:e.turnId}))}}return runHarnessStep(n,r)});return i.settledTurn===void 0&&throwIfTurnAborted(e.abortSignal),P={result:i,serializedContext:serializeContext(a)},i}})}catch(t){if(!isTurnCancellation(t)&&e.abortSignal?.aborted!==!0)throw await failChannelDeliveries(t),t;let n=readRetainedBackgroundToolResult(a);return g?.rememberBackgroundTasks(n?.backgroundTasks??[]),createCancelledModelCallBatchResult({beforeBatchContext:e.serializedContext,checkpoint:P,ctx:a,initialSession:m,stepInput:w})}g?.rememberBackgroundTasks(F.backgroundTasks??[]);let I=reconcileSessionContinuationToken(a,F.session);agentTraceState.pruneAgentTraceState(a,I.sessionId,I.state);let L=serializeContext(a);F={...F,session:I};let R=resolveSessionStepResult(F,L,j,e.serializedContext);return R.action===`done`&&await v.close(),R}finally{v.release()}}export{turnStep};
|
|
1
|
+
import{defaultDeliverResult}from"#channel/adapter.js";import{contextStorage}from"#context/container.js";import{AuthKey,CapabilitiesKey,ChannelDeliveryKey,HandleEventKey,InitiatorAuthKey,ModeKey,ParentSessionKey,SessionDynamicSubagentRuntimeRevisionKey,SessionDynamicToolRuntimeRevisionKey,SessionTitleKey,StaticModelReferenceKey,TaskDeliveryPolicyKey,TurnDeliveryIdsKey,TurnTaskDeliveryKey}from"#context/keys.js";import{createAuthorizationCompletedEvent,createSessionStartedEvent,createTurnStartedEvent}from"#protocol/message.js";import{BundleKey,ChannelKey}from"#runtime/sessions/runtime-context-keys.js";import{coalesceTurnInputs,createTurnInputMessages,validateHarnessModelMessages}from"#harness/messages.js";import{drainMemoryCommit,prepareMemoryPreamble}from"#context/memory-lifecycle.js";import{emitTurnPreamble,getHarnessEmissionState,isHarnessBetweenTurns,setHarnessEmissionState}from"#harness/emission.js";import{createWorkflowRuntime}from"#execution/workflow-runtime.js";import{consumeDeferredStepInput}from"#harness/pending-input-batches.js";import{deserializeContext,serializeContext}from"#context/serialize.js";import{createDurableSessionState,readDurableSession}from"#execution/durable-session-store.js";import{dispatchDynamicSubagentEvent,refreshDynamicSessionSubagentsForRuntimeRevision}from"#context/dynamic-subagent-lifecycle.js";import{resolveEffectiveAgentRuntime}from"#execution/effective-agent-config.js";import{hydrateDurableSession,refreshSessionFromTurnAgent}from"#execution/session.js";import{readRetainedBackgroundToolResult,runBackgroundStep}from"#execution/tasks/parent/tool-execution.js";import*as agentTraceState from"#tracing/agent-trace-context-store.js";import{activeTurnId}from"#harness/active-turn-id.js";import{derivePendingState}from"#execution/session/pending-turn-state.js";import{dispatchDynamicModelEvent}from"#context/dynamic-model-lifecycle.js";import{dispatchDynamicToolEvent,rebindMissingCompiledDynamicToolCallbacks,refreshDynamicSessionToolsForRuntimeRevision}from"#context/dynamic-tool-lifecycle.js";import{setChannelContext}from"#execution/channel-context.js";import{deriveSessionTitle}from"#execution/eve-workflow-attributes.js";import*as activityCohort from"#execution/activity-cohort.js";import{CallbackBaseUrlKey,PendingAuthorizationResultKey,clearPendingAuthorization,getPendingAuthorization}from"#harness/authorization.js";import{dispatchDynamicSkillEvent}from"#context/dynamic-skill-lifecycle.js";import{dispatchStreamEventHooks}from"#context/hook-lifecycle.js";import{dispatchMemoryLifecycleEvent}from"#context/memory-event-lifecycle.js";import{bindDynamicConnections}from"#execution/dynamic-connections.js";import{setEveAttributes}from"#runtime/attributes/emit.js";import{dispatchDynamicInstructionEvent,drainDynamicInstructionUserMessages,prepareDynamicInstructionPreamble}from"#context/dynamic-instruction-lifecycle.js";import{bindSessionInstrumentation}from"#instrumentation/runtime.js";import{RuntimeActionSettlementTimesKey}from"#harness/runtime-action-settlement-state.js";import{matchAuthorizationCallbacks}from"#execution/authorization-callback-match.js";import{isTurnCancellation,throwIfTurnAborted}from"#harness/turn-cancellation.js";import{resolveSessionStepResult}from"#execution/session/turn-step-result.js";import{createSessionEventSink}from"#execution/session/event-sink.js";import{resolveWorkflowCallbackBaseUrl}from"#execution/workflow-callback-url.js";import{resolveEffectiveOutputSchema}from"#execution/effective-output-schema.js";import{buildRuntimeIdentity,createExecutionNodeStep}from"#execution/node-step.js";import{getBackgroundTaskDelivery,markBackgroundTaskStepInput,resolveInitiatingTaskContext,resolveTaskDeliveryContext}from"#tasks/delivery-context.js";import{prepareWorkflowPreambleTrace}from"#execution/workflow-trace-context.js";import{reconcileSessionContinuationToken}from"#execution/reconcile-session-continuation-token.js";import{createExecutionHistoryView}from"#execution/history-view.js";import{resolveRuntimeCompiledArtifactsVersionedCacheKey}from"#runtime/cache-key.js";import{runModelCallBatch}from"#execution/model-call-batching.js";import{createCancelledModelCallBatchResult}from"#execution/cancelled-model-call-batch.js";function channelDeliveryErrorCode(e){if(typeof e==`object`&&e&&`code`in e){let t=e.code;if(typeof t==`string`&&t.length>0)return t}return`CHANNEL_DELIVERY_FAILED`}async function turnStep(e){"use step";return runSessionStep(e)}async function runSessionStep(e){let t=e.input?.delivery,n=t,r=e.input?.runtimeResults,i=readDurableSession(e.sessionState),a=await deserializeContext(e.serializedContext),o=a.require(ChannelKey),s=a.require(BundleKey),c=resolveEffectiveAgentRuntime(s,a),l=t?.taskDeliveryPolicy??a.get(TaskDeliveryPolicyKey)??`auto`;a.set(TaskDeliveryPolicyKey,l);try{let{getWorkflowMetadata:e}=await import(`#compiled/@workflow/core/index.js`),t=e();typeof t.url==`string`&&a.set(CallbackBaseUrlKey,resolveWorkflowCallbackBaseUrl(t.url))}catch{}let u=getPendingAuthorization(i.state),d;if(u&&n!==void 0){let{matches:e,remainingPayloads:t}=matchAuthorizationCallbacks(u,n.payloads);if(n={...n,payloads:t},e.length>0){let r=activityCohort.restoreAuthorizationActivity({ctx:a,matches:e,pending:u}),o=e.map(e=>e.result);a.set(PendingAuthorizationResultKey,o),i={...i,state:clearPendingAuthorization(i.state,r)},d=e,t.length===0&&(n=void 0)}}let f=a.get(AuthKey);n?.auth!==void 0&&(a.set(AuthKey,n.auth??null),a.has(InitiatorAuthKey)||a.set(InitiatorAuthKey,n.auth??null));let p=getBackgroundTaskDelivery(n),m=hydrateDurableSession({compactionOverrides:{thresholdPercent:c.thresholdPercent},durable:i,turnAgent:c.turnAgent}),h=createExecutionHistoryView(m),g=bindSessionInstrumentation({agentName:c.turnAgent.id,ctx:a,rootSessionId:m.rootSessionId??m.sessionId,sessionId:m.sessionId}),_=getHarnessEmissionState(m.state);if(!_.sessionStarted&&!a.has(SessionTitleKey)&&!a.has(ParentSessionKey)){let e=t?.payloads.find(e=>e.message!==void 0)?.message,n=deriveSessionTitle(t?.title??e);n!==void 0&&(a.set(SessionTitleKey,n),await setEveAttributes({"$eve.title":n}))}t!==void 0&&(await contextStorage.run(a,()=>g?.preparePreamble({sequence:_.sequence,sessionStarted:_.sessionStarted})),await contextStorage.run(a,()=>g?.instrumentChannelDelivery({agentName:s.turnAgent.id,ctx:a,delivery:t,rootSessionId:m.rootSessionId??m.sessionId,sequence:_.sequence,sessionId:m.sessionId,turnId:activeTurnId(_)})));let failChannelDeliveries=async e=>{await contextStorage.run(a,()=>g?.instrumentChannelDelivery({ctx:a,error:e,errorCode:channelDeliveryErrorCode(e),includeTurn:!1,outcome:`failed`})),await g?.flush()},v=createSessionEventSink({adapter:o,ctx:a,isFirstTurn:_.sequence===0,sessionWritable:e.sessionWritable,sessionId:m.sessionId}),{adapterCtx:y}=v;try{let b=bindDynamicConnections(a,s.resolvedAgent),x={...s.graph.root,turnAgent:c.turnAgent},S=createTurnEventHandler({abortSignal:e.abortSignal,bundle:s,ctx:a,dynamicConnections:b,effectiveAgent:c,effectiveNode:x,instrumentation:g,sink:v}),C=n!==void 0&&!isHarnessBetweenTurns(m)?structuredClone(y.state):void 0,w;if(n!==void 0){let e=[];try{for(let t of n.payloads){let n=o.deliver?await o.deliver(t,y):defaultDeliverResult(t);n!=null&&e.push(p===void 0?n:markBackgroundTaskStepInput(n))}}catch(e){throw await failChannelDeliveries(e),e}w=e.length===0?void 0:e.reduce(coalesceTurnInputs)}let T=n!==void 0&&w===void 0&&!isHarnessBetweenTurns(m);if(T)f===void 0?a.delete(AuthKey):a.set(AuthKey,f),y.state=C;else if(t!==void 0&&a.set(TurnTaskDeliveryKey,`none`),t?.payloads.some(e=>e.message!==void 0)){let e=t.deliveryMetadata?.map(e=>e.deliveryId)??[];a.set(TurnDeliveryIdsKey,_.turnId?[...new Set([...a.get(TurnDeliveryIdsKey)??[],...e])]:e)}else!_.sessionStarted&&a.get(ChannelDeliveryKey)!==void 0&&a.set(TurnDeliveryIdsKey,[a.require(ChannelDeliveryKey).deliveryId]);r!==void 0&&(r.acceptedAtMsByCallId!==void 0&&a.set(RuntimeActionSettlementTimesKey,r.acceptedAtMsByCallId),w={...w,runtimeActionResults:r.results});let E;if(w!==void 0&&p!==void 0){let e=resolveTaskDeliveryContext({state:i.state,taskDeliveryIds:p.taskDeliveryIds??[p.taskDeliveryId],taskDeliveryPolicy:l});e!==void 0&&(a.set(TurnTaskDeliveryKey,e.phase),E=e.rootTurnId,w={...w,context:[...w.context??[],e.context]})}activityCohort.updateActivityRootForDelivery({activeTurnId:activeTurnId(_),ctx:a,delivery:T?void 0:t,sessionState:i.state,taskRootTurnId:E});let D=a.get(TurnTaskDeliveryKey);if(D===`none`||D===`initiating`){let e=resolveInitiatingTaskContext({state:i.state,turnId:activeTurnId(_)});e!==void 0&&a.set(TurnTaskDeliveryKey,e.phase)}if(t!==void 0){let e={...o,state:{...y.state}};setChannelContext(a,e)}if(n!==void 0&&w===void 0&&isHarnessBetweenTurns(m)){await contextStorage.run(a,()=>g?.instrumentChannelDelivery({ctx:a,includeTurn:!1,outcome:`completed`})),await g?.flush();let t=reconcileSessionContinuationToken(a,m),n=serializeContext(a),r=t===m?e.sessionState:createDurableSessionState({session:t});return{action:`park`,...derivePendingState(t),serializedContext:n,sessionState:r}}let O=s.subagentRegistry.dynamicResolvers??[],k=s.resolvedAgent.dynamicToolResolvers??[],A=buildRuntimeIdentity(x);try{let e=process.env.VERCEL_DEPLOYMENT_ID?.trim(),t=e?`deployment:${e}`:await resolveRuntimeCompiledArtifactsVersionedCacheKey(s.compiledArtifactsSource),n=_.sessionStarted;if(a.setVirtualContext(StaticModelReferenceKey,c.turnAgent.model??null),!n)a.set(SessionDynamicSubagentRuntimeRevisionKey,t),a.set(SessionDynamicToolRuntimeRevisionKey,t);else{let e=createSessionStartedEvent({runtime:A});await Promise.all([refreshDynamicSessionSubagentsForRuntimeRevision({ctx:a,resolvers:O,event:e,messages:h.initial.messages,runtimeRevision:t}),contextStorage.run(a,async()=>await refreshDynamicSessionToolsForRuntimeRevision({ctx:a,resolvers:k,event:e,messages:h.initial.messages,runtimeRevision:t}))]),await rebindMissingCompiledDynamicToolCallbacks({ctx:a,event:createTurnStartedEvent({sequence:_.sequence,turnId:activeTurnId(_)}),messages:h.initial.messages,resolvers:k})}}catch(e){throw await failChannelDeliveries(e),e}let j=a.require(ModeKey),M=s.resolvedAgent.config?.experimental?.workflow?.modelCallsPerStep??1,N=a.get(CapabilitiesKey),runHarnessStep=async(t,n)=>{let r=refreshSessionFromTurnAgent({compactionOverrides:{thresholdPercent:c.thresholdPercent},session:t,turnAgent:c.turnAgent});return createExecutionNodeStep({steeringSignal:e.steeringSignal,abortSignal:e.abortSignal,capabilities:N,clearOnly:e.input?.control===`clear`,compactOnly:e.input?.control===`compact`,createRuntime:createWorkflowRuntime,handleEvent:S,historyProjector:h.projector,historyView:h.prepare(r),instrumentation:g,mode:j,modelResolutionScope:{moduleMap:s.moduleMap,nodeId:s.nodeId},node:x})(r,n)},P,F;try{throwIfTurnAborted(e.abortSignal),F=await runModelCallBatch({steeringSignal:e.steeringSignal,initialInput:w,initialSession:m,modelCallsPerStep:M,runStep:async({firstCall:t,session:n,stepInput:r})=>{let i=await runBackgroundStep(a,n,async e=>{a.setVirtualContext(HandleEventKey,S),a.setVirtualContext(StaticModelReferenceKey,c.turnAgent.model??null);let n=t?resolveEffectiveOutputSchema({agentOutputSchema:c.turnAgent.outputSchema,input:w,mode:j,session:e}):e;if(await b.rehydrate(getHarnessEmissionState(n.state),A,isHarnessBetweenTurns(n)),t&&d){let e=getHarnessEmissionState(n.state);if(isHarnessBetweenTurns(n)){let t=createTurnInputMessages(consumeDeferredStepInput({session:n,input:r}).input);prepareDynamicInstructionPreamble(a,h.messages(n)),prepareMemoryPreamble(a,{history:n.history,input:t,projector:h.projector,state:n.state});let i=[],o=await prepareWorkflowPreambleTrace({emissionState:e,instrumentation:g});try{e=await emitTurnPreamble(S,{},e,h.projector({messages:[...n.history,...t],state:n.state}),A,o)}finally{i=drainDynamicInstructionUserMessages(a);let e=drainMemoryCommit(a);n={...n,history:validateHarnessModelMessages([...e?.history??n.history,...i]),state:e?.state??n.state}}n=setHarnessEmissionState(n,e)}for(let{authorization:t,result:n}of d){let r=u?.challenges.find(e=>e.attemptId===n.attemptId)?.candidateId;await S(createAuthorizationCompletedEvent({attemptId:n.attemptId,authorization:t,candidateId:r,name:n.name,outcome:`authorized`,sequence:e.sequence,stepIndex:e.stepIndex,turnId:e.turnId}))}}return runHarnessStep(n,r)});return i.settledTurn===void 0&&throwIfTurnAborted(e.abortSignal),P={result:i,serializedContext:serializeContext(a)},i}})}catch(t){if(!isTurnCancellation(t)&&e.abortSignal?.aborted!==!0)throw await failChannelDeliveries(t),t;let n=readRetainedBackgroundToolResult(a);return g?.rememberBackgroundTasks(n?.backgroundTasks??[]),createCancelledModelCallBatchResult({beforeBatchContext:e.serializedContext,checkpoint:P,ctx:a,initialSession:m,stepInput:w})}g?.rememberBackgroundTasks(F.backgroundTasks??[]);let I=reconcileSessionContinuationToken(a,F.session);agentTraceState.pruneAgentTraceState(a,I.sessionId,I.state);let L=serializeContext(a);F={...F,session:I};let R=resolveSessionStepResult(F,L,j,e.serializedContext);return R.action===`done`&&await v.close(),R}finally{v.release()}}function createTurnEventHandler(e){let{abortSignal:t,bundle:n,ctx:r,effectiveAgent:i,effectiveNode:a}=e;return async(o,s)=>{let c=await e.sink.emit(o),l=await dispatchMemoryLifecycleEvent({abortSignal:t,appRoot:a.agent?.metadata?.appRoot??``,ctx:r,event:o,instrumentation:e.instrumentation?.memory,memories:a.agent?.memories??[],messages:s,nodeId:n.nodeId??`__root__`});c.suppressed||await dispatchStreamEventHooks({ctx:r,registry:n.hookRegistry,event:c.event}),c.event.type!==`step.started`&&await dispatchDynamicModelEvent({abortSignal:t,ctx:r,dynamicModel:i.turnAgent.dynamicModel,event:c.event,messages:l,scope:{moduleMap:n.moduleMap,nodeId:n.nodeId}}),await e.dynamicConnections.dispatch(c.event),await dispatchDynamicSubagentEvent({ctx:r,resolvers:n.subagentRegistry.dynamicResolvers??[],event:c.event,messages:l}),await dispatchDynamicToolEvent({ctx:r,resolvers:n.resolvedAgent.dynamicToolResolvers??[],event:c.event,messages:l}),await dispatchDynamicSkillEvent({ctx:r,resolvers:n.resolvedAgent.dynamicSkillResolvers??[],event:c.event,messages:l}),await dispatchDynamicInstructionEvent({ctx:r,resolvers:n.resolvedAgent.dynamicInstructionsResolvers??[],event:c.event,messages:l})}}export{turnStep};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{findBlockingWorkflowToolRun,isInboxToolResultFromRecordedWorkflowToolRun}from"#harness/workflow-tool-runs.js";import{cancelAgentInvocationOwnerStep}from"#execution/tools/subagent/task-cancel.js";import{runProxySubagentEventStep}from"#subagents/event-proxy-step.js";import{applyTaskAgentRequest}from"#execution/tools/subagent/task-agent-requests.js";import{resolveWorkflowCallbackBaseUrl}from"#execution/workflow-callback-url.js";import{deliverWorkflowAuthorization}from"#execution/tools/workflow/owner.js";import{emitWorkflowToolRunReportStep}from"#execution/tools/workflow/emit-workflow-tool-run-report-step.js";import{releaseAgentInvocationOwnerStep}from"#execution/tools/subagent/invoke-step.js";import{resumeHookStep}from"#execution/tools/workflow/resume-hook-step.js";import{workflowToolRunOutcomeToToolResult,workflowToolRunRequestToInputRequestPayload}from"#execution/tools/workflow/owner-inbox.js";async function handleWorkflowToolRunMessage(e){let{message:t}=e;switch(t.kind){case`outcome`:return await handleWorkflowToolRunOutcome({...e,message:t});case`request`:await handleWorkflowToolRunRequest({...e,message:t});return;case`report`:await emitWorkflowToolRunReportStep({from:t.from,sessionWritable:e.cursor.sessionWritable,update:t.update});return}}async function handleWorkflowToolRunOutcome(e){let{cursor:t,message:n}=e;if(findBlockingWorkflowToolRun(t.sessionState.snapshot.session.state,n.from.callId,n.from.turnId)?.address.runId!==n.from.runId)return;let r=workflowToolRunOutcomeToToolResult(n);await cancelAgentInvocationOwnerStep({ownerId:n.from.runId,serializedContext:t.serializedContext,sessionState:t.sessionState});let i=await releaseAgentInvocationOwnerStep({cancelled:n.result.status===`cancelled`,ownerId:n.from.runId,sessionState:t.sessionState});return await t.apply({serializedContext:t.serializedContext,sessionState:i.sessionState}),isInboxToolResultFromRecordedWorkflowToolRun(t.sessionState.snapshot.session.state,r)?r:void 0}async function handleWorkflowToolRunRequest(e){let{cursor:t,message:n}=e;if(n.request.kind===`agent-invoke`||n.request.kind===`agent-settled`){if(findBlockingWorkflowToolRun(t.sessionState.snapshot.session.state,n.from.callId,n.from.turnId)?.address.runId!==n.from.runId){n.request.kind===`agent-invoke`&&await resumeHookStep(n.replyTo,{kind:`runtime-action-result`,results:[{callId:n.request.invocationId,isError:!0,kind:`subagent-result`,origin:`dispatch`,output:{code:`AGENT_INVOCATION_NOT_ADMITTED`,message:`The workflow tool run no longer owns this agent invocation.`},subagentName:n.request.input.target}]});return}await t.apply(await applyTaskAgentRequest({ownerId:n.from.runId,replyTo:n.replyTo,request:n.request},requestContext(e)));return}if(n.request.kind===`authorization-request`){let e=n.request;await deliverWorkflowAuthorization({...n,request:e},async()=>{await t.apply(await runProxySubagentEventStep({hookPayload:e.event,sessionWritable:t.sessionWritable,serializedContext:t.serializedContext,sessionState:t.sessionState}))});return}await t.apply(await runProxySubagentEventStep({...n.requestCoordinates===void 0?{answerHook:
|
|
1
|
+
import{findBlockingWorkflowToolRun,isInboxToolResultFromRecordedWorkflowToolRun}from"#harness/workflow-tool-runs.js";import{cancelAgentInvocationOwnerStep}from"#execution/tools/subagent/task-cancel.js";import{runProxySubagentEventStep}from"#subagents/event-proxy-step.js";import{applyTaskAgentRequest}from"#execution/tools/subagent/task-agent-requests.js";import{resolveWorkflowCallbackBaseUrl}from"#execution/workflow-callback-url.js";import{deliverWorkflowAuthorization}from"#execution/tools/workflow/owner.js";import{emitWorkflowToolRunReportStep}from"#execution/tools/workflow/emit-workflow-tool-run-report-step.js";import{releaseAgentInvocationOwnerStep}from"#execution/tools/subagent/invoke-step.js";import{resumeHookStep}from"#execution/tools/workflow/resume-hook-step.js";import{workflowToolRunOutcomeToToolResult,workflowToolRunRequestToInputRequestPayload}from"#execution/tools/workflow/owner-inbox.js";async function handleWorkflowToolRunMessage(e){let{message:t}=e;switch(t.kind){case`outcome`:return await handleWorkflowToolRunOutcome({...e,message:t});case`request`:await handleWorkflowToolRunRequest({...e,message:t});return;case`report`:await emitWorkflowToolRunReportStep({from:t.from,sessionWritable:e.cursor.sessionWritable,update:t.update});return}}async function handleWorkflowToolRunOutcome(e){let{cursor:t,message:n}=e;if(findBlockingWorkflowToolRun(t.sessionState.snapshot.session.state,n.from.callId,n.from.turnId)?.address.runId!==n.from.runId)return;let r=workflowToolRunOutcomeToToolResult(n);await cancelAgentInvocationOwnerStep({ownerId:n.from.runId,serializedContext:t.serializedContext,sessionState:t.sessionState});let i=await releaseAgentInvocationOwnerStep({cancelled:n.result.status===`cancelled`,ownerId:n.from.runId,sessionState:t.sessionState});return await t.apply({serializedContext:t.serializedContext,sessionState:i.sessionState}),isInboxToolResultFromRecordedWorkflowToolRun(t.sessionState.snapshot.session.state,r)?r:void 0}async function handleWorkflowToolRunRequest(e){let{cursor:t,message:n}=e;if(n.request.kind===`agent-invoke`||n.request.kind===`agent-settled`){if(findBlockingWorkflowToolRun(t.sessionState.snapshot.session.state,n.from.callId,n.from.turnId)?.address.runId!==n.from.runId){n.request.kind===`agent-invoke`&&await resumeHookStep(n.replyTo,{kind:`runtime-action-result`,results:[{callId:n.request.invocationId,isError:!0,kind:`subagent-result`,origin:`dispatch`,output:{code:`AGENT_INVOCATION_NOT_ADMITTED`,message:`The workflow tool run no longer owns this agent invocation.`},subagentName:n.request.input.target}]});return}await t.apply(await applyTaskAgentRequest({ownerId:n.from.runId,replyTo:n.replyTo,request:n.request},requestContext(e)));return}if(n.request.kind===`authorization-request`){let e=n.request;await deliverWorkflowAuthorization({...n,request:e},async()=>{await t.apply(await runProxySubagentEventStep({hookPayload:e.event,sessionWritable:t.sessionWritable,serializedContext:t.serializedContext,sessionState:t.sessionState}))});return}await t.apply(await runProxySubagentEventStep({...n.requestCoordinates===void 0?{answerHook:createAnswerHookRoute(n)}:{},hookPayload:workflowToolRunRequestToInputRequestPayload(n),sessionWritable:t.sessionWritable,serializedContext:t.serializedContext,sessionState:t.sessionState}))}function createAnswerHookRoute(e){if(e.request.kind!==`ask`)return{runId:e.from.runId};let{allowFreeform:t,dismissible:n,options:r}=e.request.request;return{question:{...t!==void 0&&{allowFreeform:t},...n!==void 0&&{dismissible:n},...r!==void 0&&{options:[...r]}},runId:e.from.runId}}function requestContext(e){return{callbackBaseUrl:resolveWorkflowCallbackBaseUrl(e.callbackMetadataUrl),sessionWritable:e.cursor.sessionWritable,serializedContext:e.cursor.serializedContext,sessionState:e.cursor.sessionState}}export{handleWorkflowToolRunMessage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{callAdapterEventHandler}from"#channel/adapter.js";import{TurnDeliveryIdsKey}from"#context/keys.js";import{encodeMessageStreamEvent,stampMessageStreamEvent}from"#protocol/message.js";import{BundleKey,ChannelKey}from"#runtime/sessions/runtime-context-keys.js";import{getHarnessEmissionState,isHarnessBetweenTurns,setHarnessEmissionState}from"#harness/emission.js";import{clearPendingCoordinationBatch,getPendingCoordinationBatch}from"#harness/coordination.js";import{deserializeContext,serializeContext}from"#context/serialize.js";import{createDurableSessionState,readDurableSession}from"#execution/durable-session-store.js";import{getBlockingWorkflowToolRuns,removeBlockingWorkflowToolRuns}from"#harness/workflow-tool-runs.js";import{resolveEffectiveAgentRuntime}from"#execution/effective-agent-config.js";import{hydrateDurableSession}from"#execution/session.js";import{buildAdapterContext}from"#channel/adapter-context.js";import{withContextScope}from"#context/run-step.js";import{activeTurnId}from"#harness/active-turn-id.js";import{clearAllProxyInputRequests,getProxyInputRequests,hasProxyInputRequests}from"#harness/proxy-input-requests.js";import{setChannelContext}from"#execution/channel-context.js";import{
|
|
1
|
+
import{callAdapterEventHandler}from"#channel/adapter.js";import{TurnDeliveryIdsKey}from"#context/keys.js";import{encodeMessageStreamEvent,stampMessageStreamEvent}from"#protocol/message.js";import{BundleKey,ChannelKey}from"#runtime/sessions/runtime-context-keys.js";import{getHarnessEmissionState,isHarnessBetweenTurns,setHarnessEmissionState}from"#harness/emission.js";import{clearPendingCoordinationBatch,getPendingCoordinationBatch}from"#harness/coordination.js";import{deserializeContext,serializeContext}from"#context/serialize.js";import{createDurableSessionState,readDurableSession}from"#execution/durable-session-store.js";import{getBlockingWorkflowToolRuns,removeBlockingWorkflowToolRuns}from"#harness/workflow-tool-runs.js";import{resolveEffectiveAgentRuntime}from"#execution/effective-agent-config.js";import{hydrateDurableSession}from"#execution/session.js";import{buildAdapterContext}from"#channel/adapter-context.js";import{withContextScope}from"#context/run-step.js";import{activeTurnId}from"#harness/active-turn-id.js";import{clearAllProxyInputRequests,getProxyInputRequests,hasProxyInputRequests}from"#harness/proxy-input-requests.js";import{setChannelContext}from"#execution/channel-context.js";import{observeSessionActivity}from"#execution/session-activity-projection.js";import{clearPendingSessionLimitPrompt}from"#harness/input-requests.js";import{getTurnUsageState,toUsage}from"#harness/turn-tag-state.js";import{dispatchStreamEventHooks}from"#context/hook-lifecycle.js";import{bindSessionInstrumentation}from"#instrumentation/runtime.js";import{reconcileSessionContinuationToken}from"#execution/reconcile-session-continuation-token.js";import{emitCancelledTurn}from"#harness/cancelled-turn-emission.js";import{abandonAgentInvocationOwners,abandonRunningAgentTurns}from"#subagents/handles/transitions.js";async function settleCancelledTurnStep(e){"use step";let t=readDurableSession(e.sessionState),n=await deserializeContext(e.serializedContext),r=n.require(ChannelKey),i=buildAdapterContext(r,n),a=n.require(BundleKey),o=resolveEffectiveAgentRuntime(a,n),s=hydrateDurableSession({compactionOverrides:{thresholdPercent:o.thresholdPercent},durable:t,turnAgent:o.turnAgent}),c=bindSessionInstrumentation({agentName:o.turnAgent.id,ctx:n,rootSessionId:s.rootSessionId??s.sessionId,sessionId:s.sessionId}),l=getHarnessEmissionState(t.state),u=[...getProxyInputRequests(t.state).values()].some(e=>e.kind===`session-limit`);if(!(isHarnessBetweenTurns(s)&&hasProxyInputRequests(t.state)&&!u)){let t=e.sessionWritable.getWriter();try{let e=await withContextScope(n,s,async e=>{let baseEmit=async e=>{let o=await callAdapterEventHandler(r,e,i);setChannelContext(n,{...r,state:{...i.state}});let c=stampMessageStreamEvent(o,n.get(TurnDeliveryIdsKey));await t.write(encodeMessageStreamEvent(c)),observeSessionActivity({ctx:n,event:c,sessionId:s.sessionId}),await dispatchStreamEventHooks({ctx:n,event:c,registry:a.hookRegistry})},o=c?.createHandleEvent({handleEvent:baseEmit,turnId:activeTurnId(l)})??baseEmit;return{result:await emitCancelledTurn(o,l),session:e}});l=e.result,s=e.session}finally{await c?.flush(),t.releaseLock()}}let d=getPendingCoordinationBatch(s.state)?.event.turnId??e.sessionState.emissionState.turnId,f=getBlockingWorkflowToolRuns(s.state,d);s=abandonAgentInvocationOwners(s,new Set(f.map(e=>e.address.runId)));let p=reconcileSessionContinuationToken(n,setHarnessEmissionState(clearPendingSessionLimitPrompt(clearAllProxyInputRequests(clearPendingCoordinationBatch(removeBlockingWorkflowToolRuns(abandonRunningAgentTurns({...s,outputSchema:void 0}),d)))),l)),m=getTurnUsageState(s.state)?.session,h={serializedContext:serializeContext(n),sessionState:createDurableSessionState({session:p})};return m===void 0?h:{...h,usage:toUsage(m)}}export{settleCancelledTurnStep};
|
|
@@ -1,23 +1,21 @@
|
|
|
1
1
|
export interface AvailableSkillDescription {
|
|
2
2
|
readonly description: string;
|
|
3
3
|
readonly name: string;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
readonly skillRoot?: string;
|
|
4
|
+
/** False when the skill has no sandbox files; its path is omitted. */
|
|
5
|
+
readonly hasFiles?: boolean;
|
|
7
6
|
}
|
|
8
7
|
/**
|
|
9
8
|
* Formats the "Available skills" system prompt section.
|
|
10
9
|
*
|
|
11
10
|
* All skills are always listed regardless of activation state. Active skill
|
|
12
11
|
* instructions are never injected into the system prompt — the model already
|
|
13
|
-
* has them from the `load_skill` tool result.
|
|
14
|
-
*
|
|
15
|
-
*
|
|
12
|
+
* has them from the `load_skill` tool result. The formatter uses the canonical
|
|
13
|
+
* symbolic skill root so supporting files remain discoverable without
|
|
14
|
+
* provisioning a sandbox.
|
|
16
15
|
*
|
|
17
16
|
* Authored skills call this at graph resolution time so the section is
|
|
18
17
|
* part of the turn agent's static instructions. Dynamic skills
|
|
19
18
|
* (`defineDynamic` in `agent/skills/`) reuse the same formatter for
|
|
20
19
|
* durable context announcements.
|
|
21
20
|
*/
|
|
22
|
-
export declare function formatAvailableSkillsSection(skills: readonly AvailableSkillDescription[]
|
|
23
|
-
export {};
|
|
21
|
+
export declare function formatAvailableSkillsSection(skills: readonly AvailableSkillDescription[]): string | null;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{FALLBACK_SKILL_ROOT,MODEL_SKILL_ROOT}from"#shared/skill-paths.js";function formatAvailableSkillsSection(e
|
|
2
|
-
`)}function
|
|
1
|
+
import{FALLBACK_SKILL_ROOT,MODEL_SKILL_ROOT}from"#shared/skill-paths.js";function formatAvailableSkillsSection(e){return e.length===0?null:[`Available skills`,`Listed skills are available in this run. Do not claim a listed skill is inaccessible unless activation or workspace inspection actually fails.`,`Dynamic skill announcements replace earlier dynamic skills and override static skills with the same name. Static skills omitted from a dynamic announcement remain available.`,`If the user names a skill or the request clearly matches one of the descriptions below, call load_skill before proceeding.`,`If multiple skills match, activate the minimal set that covers the task. After activation, follow the returned instructions instead of improvising around them.`,`If activation fails, say so briefly and continue with the best available alternative.`,`Skill files live under \`${MODEL_SKILL_ROOT}/<skill>/\`, with \`${FALLBACK_SKILL_ROOT}/<skill>/\` as the fallback when \`$HOME\` is unavailable.`,"When a loaded SKILL.md mentions sibling files such as `references/foo.md`, resolve them relative to the directory containing that specific SKILL.md.",...e.map(formatAvailableSkillLine)].join(`
|
|
2
|
+
`)}function formatAvailableSkillLine(e){let t=`- ${e.name}: ${e.description}`;return e.hasFiles===!1?t:`${t} (path: ${MODEL_SKILL_ROOT}/${e.name}/SKILL.md)`}export{formatAvailableSkillsSection};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{sessionCommandHookToken}from"#execution/session-inbox/address.js";import{loadContext}from"#context/container.js";import{ActivityObserverKey}from"#context/keys.js";import{buildCallbackContext}from"#context/build-callback-context.js";import{parseWorkflowToolInput}from"#execution/tools/workflow/background.js";import{getHarnessEmissionState}from"#harness/emission.js";import{deriveAgentOperationId}from"#subagents/handles/operation-id.js";import{findBackgroundWorkflowToolRun,getBackgroundWorkflowToolRuns,registerWorkflowToolRun}from"#harness/workflow-tool-runs.js";import{getAgentHandleStore,writeHandles}from"#subagents/handles/store.js";import{runStep}from"#context/run-step.js";import{activeTurnId}from"#harness/active-turn-id.js";import{resolveWorkflowAgentMetadata}from"#execution/tools/subagent/metadata.js";import{AGENT_BUSY,AGENT_MISMATCH,AGENT_UNREACHABLE,formatAgentBusyMessage}from"#subagents/agent-handle-errors.js";import{startTaskRun,waitForTaskCommandOwner}from"#execution/tasks/parent/run-parent.js";import{isTurnCancellation}from"#harness/turn-cancellation.js";import{createTaskAgentDispatchContext,prepareBackgroundTask,rejectDelegatedDispatch}from"#execution/tasks/parent/delegate.js";import{applyTaskAgentHandleCommand}from"#subagents/handles/transitions.js";import{BackgroundToolExecutorKey}from"#harness/background-tools.js";import{deriveBackgroundTaskActivityObserver}from"#execution/activity-work.js";import{projectToolStartLabel}from"#harness/action-presentation.js";import{projectSubagentTask}from"#execution/tasks/parent/subagent-task-projection.js";import{steerBackgroundAgent}from"#execution/tools/subagent/steer.js";function runBackgroundStep(e,t,n){return runStep(e,t,n,[backgroundToolExecutionProvider])}const backgroundToolExecutionProvider={key:BackgroundToolExecutorKey,create(e,t){return{value:new BackgroundToolExecutionScope(t)}},async commit(e,t){return await requireExecutionScope(e).commit(t)},async rollback(e,t){await requireExecutionScope(e).rollback(t)},decorateStepResult(e,t){return requireExecutionScope(e).decorate(t)}};function readRetainedBackgroundToolResult(e){let t=e.get(BackgroundToolExecutorKey);return t instanceof BackgroundToolExecutionScope?t.retainedResult():void 0}var BackgroundToolExecutionScope=class{executions=new Map;records=[];agentHandleSession;agentHandlesChanged=!1;retained=!1;initialSession;constructor(e){this.initialSession=e,this.agentHandleSession=e}execute(e){let t=this.executions.get(e.options.toolCallId);if(t!==void 0)return t;if(!e.batch.calls.some(t=>t.callId===e.options.toolCallId))throw Error(`Background tool call "${e.options.toolCallId}" was not registered before execution.`);let n=this.start(e);return this.executions.set(e.options.toolCallId,n),n}async readAgentViews(){return(getAgentHandleStore(this.agentHandleSession.state)?.handles??[]).flatMap(e=>e.phase===`reserved`?[]:e.phase===`available`?[{availability:`available`,id:e.identity.id,name:e.identity.name}]:e.phase===`claimed`?[{availability:`busy`,id:e.identity.id,name:e.identity.name,taskId:e.ownerId,taskStatus:`working`}]:[])}hasPendingTasks(){return getBackgroundWorkflowToolRuns(this.initialSession.state).some(e=>e.task.outcome===void 0)||this.records.some(e=>e.settled&&e.task!==void 0)}async commit(e){let t=this.records.filter(e=>!e.settled);return t.length>0&&await this.compensate(t,Error(`Background tool execution did not delegate or complete its task.`)),this.apply(e)}decorate(e){let t=this.resultFields();return t===void 0?e:{...e,...t}}async rollback(e){let t=this.records.filter(e=>e.settled),n=this.records.filter(e=>!e.settled);if(n.length>0&&await this.compensate(n,e),t.length===0){this.retained=this.agentHandlesChanged&&isTurnCancellation(e);return}if(isTurnCancellation(e)){this.retained=!0;return}await this.compensate(t,e)}retainedResult(){return this.retained?this.resultFields():void 0}apply(e){let t=e;for(let e of this.records)e.settled&&e.task!==void 0&&(t=registerWorkflowToolRun(t,e.task));return this.agentHandlesChanged&&(t=writeHandles(t,getAgentHandleStore(this.agentHandleSession.state)?.handles??[])),t}resultFields(){let e=this.records.flatMap(e=>e.settled&&e.task!==void 0?[{callId:e.callId,taskInboxToken:e.task.address.hookToken,taskId:e.task.task.taskId,taskRunId:e.task.address.runId}]:[]);if(e.length!==0||this.agentHandlesChanged)return{backgroundTaskSession:this.apply(this.initialSession),backgroundTasks:e}}async start(e){let t={callId:e.options.toolCallId,settled:!1};this.records.push(t);let n=getHarnessEmissionState(this.initialSession.state),r=loadContext(),i=await this.startTask({ctx:r,emission:n,input:e,record:t});if(i.kind===`steered`)return t.settled=!0,i.receipt;let a=i.task;return t.task=a,t.settled=!0,{...i.receipt,status:`working`,taskId:a.task.taskId}}async startTask(e){let t=e.input.definition,n=parseWorkflowToolInput(e.input.toolInput,e.input.definition.name),r=activeTurnId(e.emission),i=t.nodeId===void 0?void 0:projectSubagentTask({ctx:e.ctx,input:n,name:e.input.definition.name,nodeId:t.nodeId??e.input.definition.name,taskInput:{callId:e.input.options.toolCallId,parentSessionId:this.initialSession.sessionId,parentTurnId:r}});if(i!==void 0&&i.identity===void 0&&!hasAgentHandle(this.agentHandleSession,i.metadata.agentId)){let{agentId:a,...o}=n;n=o,i=projectSubagentTask({ctx:e.ctx,input:o,name:e.input.definition.name,nodeId:t.nodeId??e.input.definition.name,taskInput:{callId:e.input.options.toolCallId,parentSessionId:this.initialSession.sessionId,parentTurnId:r}})}let a=i?.metadata??{kind:`tool`,name:e.input.definition.name},o=projectToolStartLabel(e.input.definition,e.input.toolInput),s=buildCallbackContext().session,c={activityObserver:deriveBackgroundTaskActivityObserver({activityObserver:e.ctx.get(ActivityObserverKey),callId:e.input.options.toolCallId,label:o,name:a.name,parentSessionId:this.initialSession.sessionId,parentTurnId:r,rootSessionId:this.initialSession.rootSessionId??this.initialSession.sessionId}),callId:e.input.options.toolCallId,dispatchContext:createTaskAgentDispatchContext(e.ctx,s.auth),metadata:a,parentSessionId:this.initialSession.sessionId,parentStepIndex:e.emission.stepIndex,parentTurnId:r,session:this.initialSession},l=prepareBackgroundTask(c),u={...l,task:{...l.task,activityWorkIdentity:c.activityObserver?.workIdentity}};if(t.nodeId!==void 0&&i!==void 0&&i.identity!==void 0){let t=i.identity;if(this.applyAgentHandleCommand({identity:t.identity,callId:c.callId,kind:`reserve`,operationId:t.operation.id,ownerId:u.task.taskId}).kind!==`ready`)throw Error(`Agent handle store rejected start operation "${t.operation.id}".`);e.record.reservation={agentId:t.identity.id,operationId:t.operation.id}}if(t.nodeId!==void 0&&i!==void 0&&i.identity===void 0){let t=deriveAgentOperationId({callId:c.callId,parentSessionId:c.parentSessionId,parentTurnId:r}),a=this.applyAgentHandleCommand({agentId:i.metadata.agentId,callId:c.callId,expectedTarget:i.metadata.mode,invokedName:i.metadata.name,kind:`claim`,operationId:t,ownerId:u.task.taskId});if(a.kind===`busy`&&a.handle.phase===`claimed`){let t=a.handle,r=findBackgroundWorkflowToolRun(this.agentHandleSession.state,t.ownerId);if(r?.task.metadata.kind===`subagent`&&r.task.metadata.agentId===t.identity.id&&r.task.metadata.name===t.identity.name&&r.task.outcome===void 0)return await steerBackgroundAgent({ctx:e.ctx,handle:t,callId:c.callId,input:n,session:this.agentHandleSession}),{kind:`steered`,receipt:{agentId:t.identity.id,taskId:r.task.taskId,status:`working`}}}readClaimedHandle(a)?e.record.claim={operationId:t,taskId:u.task.taskId}:throwAgentClaimError(i.metadata.agentId,a)}await startTaskRun({activityObserver:c.activityObserver,initialView:{metadata:u.task.metadata,status:`working`,taskId:u.task.taskId},parentContinuationToken:sessionCommandHookToken(this.initialSession.sessionId),taskInboxToken:u.address.hookToken,workflow:{agents:resolveWorkflowAgentMetadata(e.ctx),callId:c.callId,executeInput:t.executeInput?.(n),input:n,session:s,stepIndex:e.emission.stepIndex,toolName:e.input.definition.name,workflowId:t.workflowId}});let d=await waitForTaskCommandOwner({taskInboxToken:u.address.hookToken}),f={...u,address:{...u.address,runId:d.runId}};return e.record.task=f,t.nodeId===void 0||i===void 0?{kind:`started`,task:f}:{kind:`started`,receipt:i.receipt,task:f}}applyAgentHandleCommand(e){let t=applyTaskAgentHandleCommand(this.agentHandleSession,e);return t.session!==this.agentHandleSession&&(this.agentHandleSession=t.session,this.agentHandlesChanged=!0),t.result}async compensate(e,t){let n=[];for(let r of e.toReversed()){if(r.task!==void 0)try{await rejectDelegatedDispatch({error:{code:`PARENT_STEP_FAILED`,message:t instanceof Error?t.message:String(t)},task:r.task})}catch(e){n.push(e)}r.claim!==void 0&&this.applyAgentHandleCommand({kind:`release-owner`,ownerId:r.claim.taskId}),r.reservation!==void 0&&r.task!==void 0&&this.applyAgentHandleCommand({agentId:r.reservation.agentId,kind:`remove`,ownerId:r.task.task.taskId})}if(n.length>0)throw AggregateError([t,...n],`Background tool execution failed and its tasks could not all be rejected.`,{cause:t})}};function hasAgentHandle(e,t){return getAgentHandleStore(e.state)?.handles.some(e=>e.identity.id===t)===!0}function requireExecutionScope(e){if(!(e instanceof BackgroundToolExecutionScope))throw Error(`The background tool executor is not owned by the task runtime.`);return e}function readClaimedHandle(e){return e.kind===`ready`&&e.handle?.phase===`claimed`}function throwAgentClaimError(e,t){throw t.kind===`mismatch`?Error(JSON.stringify({code:AGENT_MISMATCH,message:`Agent "${e}" no longer matches this subagent definition. Start a new agent instead.`})):t.kind===`busy`?Error(JSON.stringify({code:AGENT_BUSY,message:formatAgentBusyMessage({agentId:e,agentName:t.handle.identity.name,ownerId:`ownerId`in t.handle?t.handle.ownerId:void 0})})):Error(JSON.stringify({code:AGENT_UNREACHABLE,message:`Agent with id "${e}" is no longer reachable.`}))}export{backgroundToolExecutionProvider,readRetainedBackgroundToolResult,runBackgroundStep};
|
|
1
|
+
import{sessionCommandHookToken}from"#execution/session-inbox/address.js";import{loadContext}from"#context/container.js";import{ActivityObserverKey,CapabilitiesKey}from"#context/keys.js";import{buildCallbackContext}from"#context/build-callback-context.js";import{parseWorkflowToolInput}from"#execution/tools/workflow/background.js";import{getHarnessEmissionState}from"#harness/emission.js";import{deriveAgentOperationId}from"#subagents/handles/operation-id.js";import{findBackgroundWorkflowToolRun,getBackgroundWorkflowToolRuns,registerWorkflowToolRun}from"#harness/workflow-tool-runs.js";import{getAgentHandleStore,writeHandles}from"#subagents/handles/store.js";import{runStep}from"#context/run-step.js";import{activeTurnId}from"#harness/active-turn-id.js";import{resolveWorkflowAgentMetadata}from"#execution/tools/subagent/metadata.js";import{AGENT_BUSY,AGENT_MISMATCH,AGENT_UNREACHABLE,formatAgentBusyMessage}from"#subagents/agent-handle-errors.js";import{startTaskRun,waitForTaskCommandOwner}from"#execution/tasks/parent/run-parent.js";import{isTurnCancellation}from"#harness/turn-cancellation.js";import{createTaskAgentDispatchContext,prepareBackgroundTask,rejectDelegatedDispatch}from"#execution/tasks/parent/delegate.js";import{applyTaskAgentHandleCommand}from"#subagents/handles/transitions.js";import{BackgroundToolExecutorKey}from"#harness/background-tools.js";import{deriveBackgroundTaskActivityObserver}from"#execution/activity-work.js";import{projectToolStartLabel}from"#harness/action-presentation.js";import{projectSubagentTask}from"#execution/tasks/parent/subagent-task-projection.js";import{steerBackgroundAgent}from"#execution/tools/subagent/steer.js";function runBackgroundStep(e,t,n){return runStep(e,t,n,[backgroundToolExecutionProvider])}const backgroundToolExecutionProvider={key:BackgroundToolExecutorKey,create(e,t){return{value:new BackgroundToolExecutionScope(t)}},async commit(e,t){return await requireExecutionScope(e).commit(t)},async rollback(e,t){await requireExecutionScope(e).rollback(t)},decorateStepResult(e,t){return requireExecutionScope(e).decorate(t)}};function readRetainedBackgroundToolResult(e){let t=e.get(BackgroundToolExecutorKey);return t instanceof BackgroundToolExecutionScope?t.retainedResult():void 0}var BackgroundToolExecutionScope=class{executions=new Map;records=[];agentHandleSession;agentHandlesChanged=!1;retained=!1;initialSession;constructor(e){this.initialSession=e,this.agentHandleSession=e}execute(e){let t=this.executions.get(e.options.toolCallId);if(t!==void 0)return t;if(!e.batch.calls.some(t=>t.callId===e.options.toolCallId))throw Error(`Background tool call "${e.options.toolCallId}" was not registered before execution.`);let n=this.start(e);return this.executions.set(e.options.toolCallId,n),n}async readAgentViews(){return(getAgentHandleStore(this.agentHandleSession.state)?.handles??[]).flatMap(e=>e.phase===`reserved`?[]:e.phase===`available`?[{availability:`available`,id:e.identity.id,name:e.identity.name}]:e.phase===`claimed`?[{availability:`busy`,id:e.identity.id,name:e.identity.name,taskId:e.ownerId,taskStatus:`working`}]:[])}hasPendingTasks(){return getBackgroundWorkflowToolRuns(this.initialSession.state).some(e=>e.task.outcome===void 0)||this.records.some(e=>e.settled&&e.task!==void 0)}async commit(e){let t=this.records.filter(e=>!e.settled);return t.length>0&&await this.compensate(t,Error(`Background tool execution did not delegate or complete its task.`)),this.apply(e)}decorate(e){let t=this.resultFields();return t===void 0?e:{...e,...t}}async rollback(e){let t=this.records.filter(e=>e.settled),n=this.records.filter(e=>!e.settled);if(n.length>0&&await this.compensate(n,e),t.length===0){this.retained=this.agentHandlesChanged&&isTurnCancellation(e);return}if(isTurnCancellation(e)){this.retained=!0;return}await this.compensate(t,e)}retainedResult(){return this.retained?this.resultFields():void 0}apply(e){let t=e;for(let e of this.records)e.settled&&e.task!==void 0&&(t=registerWorkflowToolRun(t,e.task));return this.agentHandlesChanged&&(t=writeHandles(t,getAgentHandleStore(this.agentHandleSession.state)?.handles??[])),t}resultFields(){let e=this.records.flatMap(e=>e.settled&&e.task!==void 0?[{callId:e.callId,taskInboxToken:e.task.address.hookToken,taskId:e.task.task.taskId,taskRunId:e.task.address.runId}]:[]);if(e.length!==0||this.agentHandlesChanged)return{backgroundTaskSession:this.apply(this.initialSession),backgroundTasks:e}}async start(e){let t={callId:e.options.toolCallId,settled:!1};this.records.push(t);let n=getHarnessEmissionState(this.initialSession.state),r=loadContext(),i=await this.startTask({ctx:r,emission:n,input:e,record:t});if(i.kind===`steered`)return t.settled=!0,i.receipt;let a=i.task;return t.task=a,t.settled=!0,{...i.receipt,status:`working`,taskId:a.task.taskId}}async startTask(e){let t=e.input.definition,n=parseWorkflowToolInput(e.input.toolInput,e.input.definition.name),r=activeTurnId(e.emission),i=t.nodeId===void 0?void 0:projectSubagentTask({ctx:e.ctx,input:n,name:e.input.definition.name,nodeId:t.nodeId??e.input.definition.name,taskInput:{callId:e.input.options.toolCallId,parentSessionId:this.initialSession.sessionId,parentTurnId:r}});if(i!==void 0&&i.identity===void 0&&!hasAgentHandle(this.agentHandleSession,i.metadata.agentId)){let{agentId:a,...o}=n;n=o,i=projectSubagentTask({ctx:e.ctx,input:o,name:e.input.definition.name,nodeId:t.nodeId??e.input.definition.name,taskInput:{callId:e.input.options.toolCallId,parentSessionId:this.initialSession.sessionId,parentTurnId:r}})}let a=i?.metadata??{kind:`tool`,name:e.input.definition.name},o=projectToolStartLabel(e.input.definition,e.input.toolInput),s=buildCallbackContext().session,c={activityObserver:deriveBackgroundTaskActivityObserver({activityObserver:e.ctx.get(ActivityObserverKey),callId:e.input.options.toolCallId,label:o,name:a.name,parentSessionId:this.initialSession.sessionId,parentTurnId:r,rootSessionId:this.initialSession.rootSessionId??this.initialSession.sessionId}),callId:e.input.options.toolCallId,dispatchContext:createTaskAgentDispatchContext(e.ctx,s.auth),metadata:a,parentSessionId:this.initialSession.sessionId,parentStepIndex:e.emission.stepIndex,parentTurnId:r,session:this.initialSession},l=prepareBackgroundTask(c),u={...l,task:{...l.task,activityWorkIdentity:c.activityObserver?.workIdentity}};if(t.nodeId!==void 0&&i!==void 0&&i.identity!==void 0){let t=i.identity;if(this.applyAgentHandleCommand({identity:t.identity,callId:c.callId,kind:`reserve`,operationId:t.operation.id,ownerId:u.task.taskId}).kind!==`ready`)throw Error(`Agent handle store rejected start operation "${t.operation.id}".`);e.record.reservation={agentId:t.identity.id,operationId:t.operation.id}}if(t.nodeId!==void 0&&i!==void 0&&i.identity===void 0){let t=deriveAgentOperationId({callId:c.callId,parentSessionId:c.parentSessionId,parentTurnId:r}),a=this.applyAgentHandleCommand({agentId:i.metadata.agentId,callId:c.callId,expectedTarget:i.metadata.mode,invokedName:i.metadata.name,kind:`claim`,operationId:t,ownerId:u.task.taskId});if(a.kind===`busy`&&a.handle.phase===`claimed`){let t=a.handle,r=findBackgroundWorkflowToolRun(this.agentHandleSession.state,t.ownerId);if(r?.task.metadata.kind===`subagent`&&r.task.metadata.agentId===t.identity.id&&r.task.metadata.name===t.identity.name&&r.task.outcome===void 0)return await steerBackgroundAgent({ctx:e.ctx,handle:t,callId:c.callId,input:n,session:this.agentHandleSession}),{kind:`steered`,receipt:{agentId:t.identity.id,taskId:r.task.taskId,status:`working`}}}readClaimedHandle(a)?e.record.claim={operationId:t,taskId:u.task.taskId}:throwAgentClaimError(i.metadata.agentId,a)}await startTaskRun({activityObserver:c.activityObserver,initialView:{metadata:u.task.metadata,status:`working`,taskId:u.task.taskId},parentContinuationToken:sessionCommandHookToken(this.initialSession.sessionId),taskInboxToken:u.address.hookToken,workflow:{agents:resolveWorkflowAgentMetadata(e.ctx),callId:c.callId,canRequestInput:e.ctx.get(CapabilitiesKey)?.requestInput===!0,executeInput:t.executeInput?.(n),input:n,session:s,stepIndex:e.emission.stepIndex,toolName:e.input.definition.name,workflowId:t.workflowId}});let d=await waitForTaskCommandOwner({taskInboxToken:u.address.hookToken}),f={...u,address:{...u.address,runId:d.runId}};return e.record.task=f,t.nodeId===void 0||i===void 0?{kind:`started`,task:f}:{kind:`started`,receipt:i.receipt,task:f}}applyAgentHandleCommand(e){let t=applyTaskAgentHandleCommand(this.agentHandleSession,e);return t.session!==this.agentHandleSession&&(this.agentHandleSession=t.session,this.agentHandlesChanged=!0),t.result}async compensate(e,t){let n=[];for(let r of e.toReversed()){if(r.task!==void 0)try{await rejectDelegatedDispatch({error:{code:`PARENT_STEP_FAILED`,message:t instanceof Error?t.message:String(t)},task:r.task})}catch(e){n.push(e)}r.claim!==void 0&&this.applyAgentHandleCommand({kind:`release-owner`,ownerId:r.claim.taskId}),r.reservation!==void 0&&r.task!==void 0&&this.applyAgentHandleCommand({agentId:r.reservation.agentId,kind:`remove`,ownerId:r.task.task.taskId})}if(n.length>0)throw AggregateError([t,...n],`Background tool execution failed and its tasks could not all be rejected.`,{cause:t})}};function hasAgentHandle(e,t){return getAgentHandleStore(e.state)?.handles.some(e=>e.identity.id===t)===!0}function requireExecutionScope(e){if(!(e instanceof BackgroundToolExecutionScope))throw Error(`The background tool executor is not owned by the task runtime.`);return e}function readClaimedHandle(e){return e.kind===`ready`&&e.handle?.phase===`claimed`}function throwAgentClaimError(e,t){throw t.kind===`mismatch`?Error(JSON.stringify({code:AGENT_MISMATCH,message:`Agent "${e}" no longer matches this subagent definition. Start a new agent instead.`})):t.kind===`busy`?Error(JSON.stringify({code:AGENT_BUSY,message:formatAgentBusyMessage({agentId:e,agentName:t.handle.identity.name,ownerId:`ownerId`in t.handle?t.handle.ownerId:void 0})})):Error(JSON.stringify({code:AGENT_UNREACHABLE,message:`Agent with id "${e}" is no longer reachable.`}))}export{backgroundToolExecutionProvider,readRetainedBackgroundToolResult,runBackgroundStep};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{evaluate}from"#ai/evaluate.js";async function executeAgentRouterTool(e,t){"use workflow";let n=await chooseTarget(e.message,descriptions(t),t.abortSignal);return t.agent(n,e.outputSchema===void 0?{message:e.message}:{message:e.message,outputSchema:e.outputSchema})}async function chooseTarget(e,t,n){"use step";let r=Object.keys(t);if(r.length===0)throw Error(`agentRouter requires at least one available agent with a description.`);return r.length===1?r[0]:(await evaluate({abortSignal:n,state:{message:e},questions:{route:{type:`choice`,instructions:`Which subagent should handle this task?`,criteria:t}}})).answers.route.choice}function descriptions(e){return Object.fromEntries(Object.entries(e.agents).flatMap(([e,t])=>{let n=t.description.trim();return n.length===0?[]:[[e,n]]}))}executeAgentRouterTool.workflowId=`workflow//eve@0.
|
|
1
|
+
import{evaluate}from"#ai/evaluate.js";async function executeAgentRouterTool(e,t){"use workflow";let n=await chooseTarget(e.message,descriptions(t),t.abortSignal);return t.agent(n,e.outputSchema===void 0?{message:e.message}:{message:e.message,outputSchema:e.outputSchema})}async function chooseTarget(e,t,n){"use step";let r=Object.keys(t);if(r.length===0)throw Error(`agentRouter requires at least one available agent with a description.`);return r.length===1?r[0]:(await evaluate({abortSignal:n,state:{message:e},questions:{route:{type:`choice`,instructions:`Which subagent should handle this task?`,criteria:t}}})).answers.route.choice}function descriptions(e){return Object.fromEntries(Object.entries(e.agents).flatMap(([e,t])=>{let n=t.description.trim();return n.length===0?[]:[[e,n]]}))}executeAgentRouterTool.workflowId=`workflow//eve@0.66.0//executeAgentRouterTool`;export{executeAgentRouterTool};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { z } from "#compiled/zod/index.js";
|
|
2
1
|
import type { JsonObject } from "#shared/json.js";
|
|
3
2
|
export { executeAgentRouterTool } from "#execution/tools/agent-router-workflow.js";
|
|
4
3
|
export declare const AGENT_ROUTER_TOOL_DESCRIPTION = "Route a task to the best available subagent based on each subagent's declared description.";
|
|
@@ -6,4 +5,4 @@ export interface AgentRouterInput {
|
|
|
6
5
|
readonly message: string;
|
|
7
6
|
readonly outputSchema?: JsonObject;
|
|
8
7
|
}
|
|
9
|
-
export declare const AGENT_ROUTER_INPUT_SCHEMA:
|
|
8
|
+
export declare const AGENT_ROUTER_INPUT_SCHEMA: import("#tools/schema.js").ToolSchema<AgentRouterInput, AgentRouterInput>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{defineJsonSchema}from"#tools/schema.js";import{executeAgentRouterTool}from"#execution/tools/agent-router-workflow.js";const AGENT_ROUTER_TOOL_DESCRIPTION=`Route a task to the best available subagent based on each subagent's declared description.`,AGENT_ROUTER_INPUT_SCHEMA=defineJsonSchema({type:`object`,properties:{message:{type:`string`,minLength:1,description:`The complete task to send to the selected agent.`},outputSchema:{type:`object`,description:`Only provide a non-empty JSON Schema when the caller explicitly requests structured output; otherwise omit this field. The selected agent must match a provided schema, and that structured output becomes the tool result.`}},required:[`message`],additionalProperties:!1});export{AGENT_ROUTER_INPUT_SCHEMA,AGENT_ROUTER_TOOL_DESCRIPTION,executeAgentRouterTool};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { AskQuestionInput, AskQuestionOutput } from "#execution/tools/ask-question.js";
|
|
2
|
+
import type { ToolInputRequest, ToolInputResponse } from "#tools/definition.js";
|
|
3
|
+
import type { WorkflowToolContext } from "#tools/workflow-definition.js";
|
|
4
|
+
/** Asks the session's user one question in a workflow dedicated to this tool call. */
|
|
5
|
+
export declare function executeAskQuestionTool(input: AskQuestionInput, ctx: WorkflowToolContext): Promise<AskQuestionOutput>;
|
|
6
|
+
/**
|
|
7
|
+
* Free text is always allowed, so the model never needs an "Other" option.
|
|
8
|
+
* Labels double as option ids so a late answer still reads as the label.
|
|
9
|
+
*/
|
|
10
|
+
export declare function toAskQuestionRequest(input: AskQuestionInput): ToolInputRequest;
|
|
11
|
+
export declare function toAskQuestionOutput(answer: ToolInputResponse): AskQuestionOutput;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
async function executeAskQuestionTool(e,t){"use workflow";return toAskQuestionOutput(await t.ask(toAskQuestionRequest(e)))}function toAskQuestionRequest(e){let t=e.options?.map(e=>({description:e.description,id:e.label,label:e.label}));return{allowFreeform:!0,dismissible:!0,display:t===void 0?`text`:`select`,prompt:e.question,...t!==void 0&&{options:t}}}function toAskQuestionOutput(e){return e.status===`answered`?{answer:e.optionId??e.text??``,status:`answered`}:{status:e.status}}executeAskQuestionTool.workflowId=`workflow//eve@0.66.0//executeAskQuestionTool`;export{executeAskQuestionTool,toAskQuestionOutput,toAskQuestionRequest};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export { executeAskQuestionTool } from "#execution/tools/ask-question-workflow.js";
|
|
2
|
+
export declare const ASK_QUESTION_TOOL_DESCRIPTION: string;
|
|
3
|
+
export interface AskQuestionInput {
|
|
4
|
+
options?: {
|
|
5
|
+
description: string;
|
|
6
|
+
label: string;
|
|
7
|
+
}[];
|
|
8
|
+
question: string;
|
|
9
|
+
}
|
|
10
|
+
export type AskQuestionOutput = {
|
|
11
|
+
answer: string;
|
|
12
|
+
status: "answered";
|
|
13
|
+
} | {
|
|
14
|
+
status: "dismissed";
|
|
15
|
+
} | {
|
|
16
|
+
status: "unavailable";
|
|
17
|
+
};
|
|
18
|
+
export declare const ASK_QUESTION_INPUT_SCHEMA: import("#tools/schema.js").ToolSchema<AskQuestionInput, AskQuestionInput>;
|
|
19
|
+
export declare const ASK_QUESTION_OUTPUT_SCHEMA: import("#tools/schema.js").ToolSchema<AskQuestionOutput, AskQuestionOutput>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{defineJsonSchema}from"#tools/schema.js";import{executeAskQuestionTool}from"#execution/tools/ask-question-workflow.js";const ASK_QUESTION_TOOL_DESCRIPTION=[`Ask the user a question and wait for the answer. Use this only when you cannot make good progress without the user's input: to choose between materially different approaches, fill in a missing requirement, or confirm something risky or irreversible. Do not ask for information you can find with your other tools, and do not ask the user to confirm routine steps.`,``,`Usage:`,`- Ask one focused question that includes the context needed to answer it.`,`- For a decision, offer 2-3 mutually exclusive options. Put the option you recommend first and end its label with "(Recommended)".`,`- Do not add an "Other" option; the user can always type their own answer.`,"- The result's `answer` is the chosen option's label or the user's own words.",`- If the status is "dismissed", the user moved on without answering; respond to their next message instead.`,`- If the status is "unavailable", no one can answer in this session; continue with your best judgment and state the assumption you made.`].join(`
|
|
2
|
+
`),ASK_QUESTION_INPUT_SCHEMA=defineJsonSchema({type:`object`,properties:{options:{type:`array`,minItems:2,maxItems:3,items:{type:`object`,properties:{description:{type:`string`,minLength:1,maxLength:200,description:`One short sentence on the impact or tradeoff of choosing this option.`},label:{type:`string`,minLength:1,maxLength:80,description:`User-facing label, 1-5 words.`}},required:[`description`,`label`],additionalProperties:!1},description:`Two or three mutually exclusive choices, recommended option first. Omit for an open-ended question. Never include an "Other" option.`},question:{type:`string`,minLength:1,maxLength:2e3,description:`The question to show the user, with the context needed to answer it.`}},required:[`question`],additionalProperties:!1},e=>e.options!==void 0&&new Set(e.options.map(e=>e.label)).size!==e.options.length?`Option labels must be unique.`:void 0),ASK_QUESTION_OUTPUT_SCHEMA=defineJsonSchema({oneOf:[{type:`object`,properties:{answer:{type:`string`,description:`The chosen option's label, or the user's own words.`},status:{type:`string`,const:`answered`}},required:[`answer`,`status`],additionalProperties:!1},{type:`object`,properties:{status:{type:`string`,const:`dismissed`}},required:[`status`],additionalProperties:!1},{type:`object`,properties:{status:{type:`string`,const:`unavailable`}},required:[`status`],additionalProperties:!1}]});export{ASK_QUESTION_INPUT_SCHEMA,ASK_QUESTION_OUTPUT_SCHEMA,ASK_QUESTION_TOOL_DESCRIPTION,executeAskQuestionTool};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{createLogger}from"#internal/logging.js";import{loadContext}from"#context/container.js";import{toError}from"#shared/errors.js";import{defineJsonSchema}from"#tools/schema.js";import{defineTool}from"#tools/definition.js";import{stampDurableDynamicToolCallbacks}from"#tools/durable-callbacks.js";import{ContextKey}from"#context/key.js";import{ConnectionRegistryKey}from"#context/providers/connection-key.js";import{resolveApprovalPolicy}from"#approval/definition.js";import{getAuthorizationResults,requestAuthorization}from"#harness/authorization.js";import{createAuthorizationExecution}from"#runtime/connections/scoped-authorization.js";import{isConnectionAuthorizationFailedError,isConnectionAuthorizationRequiredError}from"#connections/errors.js";import{resolveConnectionAuthorization}from"#runtime/connections/resolve-authorization.js";import{supportsInteractiveAuthorization}from"#shared/connection-types.js";const logger=createLogger(`framework.connection-search-dynamic`),CONNECTION_SEARCH_INPUT_SCHEMA=defineJsonSchema({type:`object`,properties:{connection:{type:`string`,description:`Optional: limit search to a specific connection name.`},keywords:{type:`string`,description:`Search keywords and expanded aliases. Distill intent into keywords; avoid stop words like 'a', 'the', 'in'.`},limit:{type:`number`,description:`Max results to return. Default 10.`}},required:[`keywords`],additionalProperties:!1}),CONNECTION_SEARCH_OUTPUT_SCHEMA=defineJsonSchema({type:`array`,items:{type:`object`,properties:{connection:{type:`string`},description:{type:`string`},error:{type:`string`},inputSchema:{type:`object`},needsAuthorization:{type:`boolean`},outputSchema:{type:`object`},qualifiedName:{type:`string`},tool:{type:`string`}},required:[`connection`,`description`],additionalProperties:!1}}),ConnectionSearchResultsKey=new ContextKey(`eve.connectionSearchResults`);function qualifiedConnectionToolName(e,t){return`${e}__${t}`}function tokenize(e){return e.toLowerCase().split(/[\s_\-./]+/).filter(e=>e.length>1)}function scoreMatch(e,t){let n=tokenize(t.name),r=tokenize(t.description),i=0;for(let t of e){for(let e of n)(e.includes(t)||t.includes(e))&&(i+=3);for(let e of r)(e.includes(t)||t.includes(e))&&(i+=1)}return i}async function resolveInteractiveAuth(e,t){let n=e.getConnections().find(e=>e.connectionName===t);if(n===void 0)return;let r=await resolveConnectionAuthorization(n);if(r!==void 0&&supportsInteractiveAuthorization(r))return{scope:n.connectionName,instanceId:n.instanceId,connection:{url:n.url??``},authorization:r}}async function completePendingAuthorizations(e,t,n){assertPendingConnectionAuthorizationInstances(e);for(let r of t){if(!getAuthorizationResults().some(e=>e.name===r.connectionName))continue;let t=await resolveInteractiveAuth(e,r.connectionName);t!==void 0&&await n.complete(t)}}async function executeConnectionSearch(e){let t=loadContext(),n=t.get(ConnectionRegistryKey);if(n===void 0)return[];let r=e.limit??10,i=tokenize(e.keywords),a=[],o=[],s=e.connection!==void 0&&e.connection!==``?n.getConnections().filter(t=>t.connectionName===e.connection):n.getConnections();if(e.connection&&s.length===0)throw Error(`Connection "${e.connection}" is not registered. Available connections: ${n.getConnectionNames().join(`, `)}.`);let c=createAuthorizationExecution();await completePendingAuthorizations(n,s,c);let l=[];for(let e of s){let t;try{t=await n.getClient(e.connectionName).getToolMetadata()}catch(t){if(isConnectionAuthorizationRequiredError(t)){let r=await resolveInteractiveAuth(n,e.connectionName);if(r!==void 0)try{let e=await c.handleError(t,r);l.push(...e.challenges)}catch(t){let n=toError(t);logger.warn(`connection authorization failed`,{connection:e.connectionName,error:n}),o.push({connection:e.connectionName,description:e.description,error:isConnectionAuthorizationFailedError(n)?n.message:`Failed to start authorization for "${e.connectionName}": ${n.message}`});continue}o.push({connection:e.connectionName,description:e.description,needsAuthorization:!0});continue}if(isConnectionAuthorizationFailedError(t)){logger.warn(`connection authorization failed`,{connection:e.connectionName,reason:t.reason,retryable:t.retryable,error:t}),o.push({connection:e.connectionName,description:e.description,error:`Authorization failed for ${e.connectionName}: ${t.message}`});continue}let r=toError(t);logger.warn(`failed to load connection tools`,{connection:e.connectionName,error:r}),o.push({connection:e.connectionName,description:e.description,error:`Failed to load tools for "${e.connectionName}": ${r.message}`});continue}for(let n of t){let t=scoreMatch(i,n);t>0&&a.push({item:{connection:e.connectionName,description:n.description,inputSchema:n.inputSchema,outputSchema:n.outputSchema,qualifiedName:qualifiedConnectionToolName(e.connectionName,n.name),tool:n.name},score:t})}}if(l.length>0)return requestAuthorization(l);let u=o.filter(e=>e.error!==void 0);if(s.length>0&&u.length===s.length)throw Error(u.map(e=>e.error).join(`
|
|
2
2
|
`));a.sort((e,t)=>t.score-e.score);let d=a.slice(0,r).map(e=>e.item);if(d.length>0){let e=[...d,...o],n=t.get(ConnectionSearchResultsKey)??[],r=new Map(n.map(e=>[e.qualifiedName,e]));for(let e of d)e.qualifiedName&&r.set(e.qualifiedName,e);return t.set(ConnectionSearchResultsKey,[...r.values()]),e}return s.map(e=>o.find(t=>t.connection===e.connectionName)||{connection:e.connectionName,description:e.description})}function readDiscoveredToolClosure(e){let t=e.connectionName,n=e.toolName;if(typeof t!=`string`||typeof n!=`string`)throw Error(`Discovered connection tool callback metadata is invalid.`);return{connectionName:t,toolName:n}}async function executeDiscoveredConnectionTool(e,t,n){let{connectionName:r,toolName:i}=readDiscoveredToolClosure(e),a=loadContext().get(ConnectionRegistryKey);if(a===void 0)throw Error(`Connection registry is unavailable while replaying a discovered tool.`);assertPendingConnectionAuthorizationInstances(a);let o=await resolveInteractiveAuth(a,r),s=createAuthorizationExecution();o!==void 0&&await s.complete(o);try{return await a.getClient(r).executeTool(i,t,{abortSignal:n.abortSignal,callId:n.callId})}catch(e){return await s.handleError(e,o)}}function assertPendingConnectionAuthorizationInstances(e){let t=new Map(e.getConnections().map(e=>[e.connectionName,e]));for(let e of getAuthorizationResults())if(e.instanceId!==void 0&&t.get(e.name)?.instanceId!==e.instanceId)throw Error(`Authorization for "${e.name}" cannot complete because its resolved connection changed while sign-in was pending. Start sign-in again.`)}async function requestDiscoveredConnectionToolApproval(e,t){let{connectionName:n}=readDiscoveredToolClosure(e),r=loadContext().get(ConnectionRegistryKey)?.getConnectionApproval(n);return r===void 0?`not-applicable`:await resolveApprovalPolicy(r)(t)}async function authorizeDiscoveredConnectionToolApproval(e,t){let{connectionName:n}=readDiscoveredToolClosure(e),r=loadContext().get(ConnectionRegistryKey)?.getConnectionApproval(n),i=r===void 0||typeof r==`function`?void 0:r.response;return i===void 0?{reason:`Approval response authorization is unavailable.`,status:`rejected`}:await i(t)}async function resolveConnectionSearchDynamicTools(){let e=loadContext().get(ConnectionRegistryKey);if(!e||e.getConnections().length===0)return null;let t=e.getConnections().map(e=>e.connectionName),n=new Set(t),r=(loadContext().get(ConnectionSearchResultsKey)??[]).filter(e=>n.has(e.connection)),i={},a=defineTool({description:`Search for tools across your connections. Discovered tools become directly callable by their qualified name (e.g. \`linear__list_issues\`) in your next response. Available connections: ${t.join(`, `)}.`,inputSchema:CONNECTION_SEARCH_INPUT_SCHEMA,async execute(e){return executeConnectionSearch(e)},outputSchema:CONNECTION_SEARCH_OUTPUT_SCHEMA});stampDurableDynamicToolCallbacks(a,{inputSchema:{callback:()=>CONNECTION_SEARCH_INPUT_SCHEMA,closure:{}},outputSchema:{callback:()=>CONNECTION_SEARCH_OUTPUT_SCHEMA,closure:{}},execute:{callback:(e,t)=>executeConnectionSearch(t),closure:{}}}),i.connection_search=a;for(let t of r){let n=t.connection,r=t.tool,a=e.getConnectionApproval(n),o={connectionName:n,toolName:r},s=defineTool({description:t.description,inputSchema:t.inputSchema??{type:`object`},approval:a,outputSchema:t.outputSchema,async execute(e,t){return await executeDiscoveredConnectionTool(o,e,t)}});stampDurableDynamicToolCallbacks(s,{execute:{callback:executeDiscoveredConnectionTool,closure:o},...a===void 0?{}:{approvalRequest:{callback:requestDiscoveredConnectionToolApproval,closure:o}},...a===void 0||typeof a==`function`||a.response===void 0?{}:{approvalResponse:{callback:authorizeDiscoveredConnectionToolApproval,closure:o}}}),i[qualifiedConnectionToolName(n,r)]=s}return i}export{resolveConnectionSearchDynamicTools};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { AlsContext } from "#context/container.js";
|
|
2
2
|
import { ContextKey } from "#context/key.js";
|
|
3
3
|
/**
|
|
4
4
|
* Per-file fingerprint stored after a successful `read_file` call. Used by
|
|
@@ -54,9 +54,3 @@ export declare function createReadFileStamp(input: {
|
|
|
54
54
|
* do not duplicate the state mutation pattern.
|
|
55
55
|
*/
|
|
56
56
|
export declare function setReadFileStamp(ctx: AlsContext, targetKey: string, stamp: ReadFileStamp): void;
|
|
57
|
-
/**
|
|
58
|
-
* Clears all read-file stamps from the context. The framework calls this on
|
|
59
|
-
* context compaction so a write afterward must re-read the file whose read
|
|
60
|
-
* evidence was summarized out of history.
|
|
61
|
-
*/
|
|
62
|
-
export declare function clearReadFileState(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createHash}from"node:crypto";import{
|
|
1
|
+
import{createHash}from"node:crypto";import{posix}from"node:path";import{ContextKey}from"#context/key.js";const ReadFileStateKey=new ContextKey(`eve.readFile`);function normalizeModelPath(e){return posix.normalize(e)}function buildReadFileTargetKey(e){return e}function createReadFileStamp(e){let t=createHash(`sha256`).update(e.content,`utf8`).digest(`hex`);return{byteLength:Buffer.byteLength(e.content,`utf8`),contentHash:t,filePath:e.filePath}}function setReadFileStamp(e,t,n){let r=e.ensure(ReadFileStateKey,()=>({byTarget:{}}));e.set(ReadFileStateKey,{byTarget:{...r.byTarget,[t]:n}})}export{ReadFileStateKey,buildReadFileTargetKey,createReadFileStamp,normalizeModelPath,setReadFileStamp};
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Typed input accepted by {@link executeLoadSkillTool}.
|
|
3
|
+
*/
|
|
4
|
+
interface LoadSkillInput {
|
|
5
|
+
skill: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const SKILL_INPUT_SCHEMA: import("#tools/schema.js").ToolSchema<LoadSkillInput, LoadSkillInput>;
|
|
8
|
+
export declare const SKILL_OUTPUT_SCHEMA: import("#tools/schema.js").ToolSchema<string, string>;
|
|
6
9
|
export declare function executeLoadSkill(input: unknown): Promise<unknown>;
|
|
10
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{loadContext}from"#context/container.js";import{DynamicSkillManifestKey}from"#context/keys.js";import{defineJsonSchema}from"#tools/schema.js";import{stripSkillFrontmatter}from"#shared/skill-package.js";import{ConnectionRegistryKey}from"#context/providers/connection-key.js";import{BundleKey}from"#runtime/sessions/runtime-context-keys.js";async function executeLoadSkillTool(e){let t=loadContext(),{skill:n}=e,r=Object.values(t.get(DynamicSkillManifestKey)??{}).flat(),i=t.require(BundleKey).resolvedAgent.skills,a=r.find(e=>e.name===n);if(a!==void 0)return stripSkillFrontmatter(a.markdown);let o=i.find(e=>e.name===n);if(o!==void 0)return o.markdown;let s=formatSkillNotFoundError(n,[...new Set([...r,...i].map(e=>e.name))].sort()),c=t.get(ConnectionRegistryKey)?.getConnectionNames().find(e=>e.toLowerCase()===n.toLowerCase());throw Error(c===void 0?s:`${s} "${c}" is an installed connection, not a skill. Use connection_search with connection "${c}" to find its tools.`)}function formatSkillNotFoundError(e,t){return`No skill named "${e}".${t.length>0?` Available skills: ${t.join(`, `)}.`:``}`}const SKILL_INPUT_SCHEMA=defineJsonSchema({type:`object`,properties:{skill:{type:`string`,description:`Available skill name or id.`}},required:[`skill`],additionalProperties:!1}),SKILL_OUTPUT_SCHEMA=defineJsonSchema({type:`string`});async function executeLoadSkill(e){return await executeLoadSkillTool(e)}export{SKILL_INPUT_SCHEMA,SKILL_OUTPUT_SCHEMA,executeLoadSkill};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{sleep}from"#compiled/@workflow/core/index.js";async function executeSleepTool(e){"use workflow";return await sleep(Math.ceil(e.seconds*1e3)),{waitedSeconds:e.seconds}}executeSleepTool.workflowId=`workflow//eve@0.
|
|
1
|
+
import{sleep}from"#compiled/@workflow/core/index.js";async function executeSleepTool(e){"use workflow";return await sleep(Math.ceil(e.seconds*1e3)),{waitedSeconds:e.seconds}}executeSleepTool.workflowId=`workflow//eve@0.66.0//executeSleepTool`;export{executeSleepTool};
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { z } from "#compiled/zod/index.js";
|
|
2
1
|
export { executeSleepTool } from "#execution/tools/sleep-workflow.js";
|
|
3
2
|
export declare const SLEEP_TOOL_DESCRIPTION = "Wait for a specified amount of time before continuing. Use this when a process or condition needs time to change before it is useful to check its progress or status again.";
|
|
4
|
-
export
|
|
5
|
-
seconds:
|
|
6
|
-
}
|
|
7
|
-
export
|
|
8
|
-
waitedSeconds:
|
|
9
|
-
}
|
|
10
|
-
export
|
|
11
|
-
export
|
|
3
|
+
export interface SleepToolInput {
|
|
4
|
+
seconds: number;
|
|
5
|
+
}
|
|
6
|
+
export interface SleepToolOutput {
|
|
7
|
+
waitedSeconds: number;
|
|
8
|
+
}
|
|
9
|
+
export declare const SLEEP_INPUT_SCHEMA: import("#tools/schema.js").ToolSchema<SleepToolInput, SleepToolInput>;
|
|
10
|
+
export declare const SLEEP_OUTPUT_SCHEMA: import("#tools/schema.js").ToolSchema<SleepToolOutput, SleepToolOutput>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{defineJsonSchema}from"#tools/schema.js";import{executeSleepTool}from"#execution/tools/sleep-workflow.js";const MAX_SLEEP_SECONDS=Math.floor((2**53-1)/1e3),SLEEP_TOOL_DESCRIPTION=`Wait for a specified amount of time before continuing. Use this when a process or condition needs time to change before it is useful to check its progress or status again.`,SLEEP_INPUT_SCHEMA=defineJsonSchema({type:`object`,properties:{seconds:{type:`number`,exclusiveMinimum:0,maximum:MAX_SLEEP_SECONDS,description:`How long to wait, in seconds.`}},required:[`seconds`],additionalProperties:!1}),SLEEP_OUTPUT_SCHEMA=defineJsonSchema({type:`object`,properties:{waitedSeconds:{type:`number`,exclusiveMinimum:0}},required:[`waitedSeconds`],additionalProperties:!1});export{SLEEP_INPUT_SCHEMA,SLEEP_OUTPUT_SCHEMA,SLEEP_TOOL_DESCRIPTION,executeSleepTool};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type DurableSessionState } from "#execution/durable-session-store.js";
|
|
2
2
|
import type { UnstampedMessageStreamEvent } from "#protocol/message.js";
|
|
3
|
-
/**
|
|
3
|
+
/** Publishes a subagent notification, then runs its hooks without model preparation. */
|
|
4
4
|
export declare function emitSubagentEventStep(input: {
|
|
5
5
|
readonly event: UnstampedMessageStreamEvent;
|
|
6
6
|
readonly sessionWritable: WritableStream<Uint8Array>;
|
|
@@ -8,4 +8,5 @@ export declare function emitSubagentEventStep(input: {
|
|
|
8
8
|
readonly sessionState: DurableSessionState;
|
|
9
9
|
}): Promise<{
|
|
10
10
|
readonly serializedContext: Record<string, unknown>;
|
|
11
|
+
readonly sessionState: DurableSessionState;
|
|
11
12
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{contextStorage}from"#context/container.js";import{BundleKey,ChannelKey}from"#runtime/sessions/runtime-context-keys.js";import{
|
|
1
|
+
import{contextStorage}from"#context/container.js";import{BundleKey,ChannelKey}from"#runtime/sessions/runtime-context-keys.js";import{deserializeContext,serializeContext}from"#context/serialize.js";import{createDurableSessionState,readDurableSession}from"#execution/durable-session-store.js";import{resolveEffectiveAgentRuntime}from"#execution/effective-agent-config.js";import{hydrateDurableSession}from"#execution/session.js";import{withContextScope}from"#context/run-step.js";import{dispatchStreamEventHooks}from"#context/hook-lifecycle.js";import{createSessionEventSink}from"#execution/session/event-sink.js";import{reconcileSessionContinuationToken}from"#execution/reconcile-session-continuation-token.js";async function emitSubagentEventStep(e){"use step";let t=await deserializeContext(e.serializedContext),n=t.require(BundleKey),publish=async()=>{let n=createSessionEventSink({adapter:t.require(ChannelKey),ctx:t,isFirstTurn:e.sessionState.emissionState.sequence===0,sessionWritable:e.sessionWritable,sessionId:e.sessionState.sessionId});try{return await contextStorage.run(t,()=>n.emit(e.event))}finally{n.release()}},r=n.hookRegistry;if((r.streamEventsByType.get(e.event.type)?.length??0)===0&&r.streamEventsWildcard.length===0)return await publish(),{serializedContext:serializeContext(t),sessionState:e.sessionState};let i=resolveEffectiveAgentRuntime(n,t),a=hydrateDurableSession({durable:readDurableSession(e.sessionState),turnAgent:i.turnAgent,compactionOverrides:{thresholdPercent:i.thresholdPercent}}),o=await withContextScope(t,a,async e=>{let n=await publish();return n.suppressed||await dispatchStreamEventHooks({ctx:t,registry:r,event:n.event}),{result:void 0,session:e}});return{serializedContext:serializeContext(t),sessionState:createDurableSessionState({session:reconcileSessionContinuationToken(t,o.session)})}}export{emitSubagentEventStep};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{emitSubagentEventStep}from"#execution/tools/subagent/emit-event-step.js";import{dispatchTaskAgentInvocationStep,settleTaskAgentInvocationStep}from"#execution/tools/subagent/invoke-step.js";import{resumeHookStep}from"#execution/tools/workflow/resume-hook-step.js";async function applyTaskAgentRequest(e,t){let{request:n}=e;switch(n.kind){case`agent-settled`:{let r=await settleTaskAgentInvocationStep({ownerId:e.ownerId,result:n.result,serializedContext:t.serializedContext,sessionState:t.sessionState,taskId:e.taskId}),i=r.serializedContext;
|
|
1
|
+
import{emitSubagentEventStep}from"#execution/tools/subagent/emit-event-step.js";import{dispatchTaskAgentInvocationStep,settleTaskAgentInvocationStep}from"#execution/tools/subagent/invoke-step.js";import{resumeHookStep}from"#execution/tools/workflow/resume-hook-step.js";async function applyTaskAgentRequest(e,t){let{request:n}=e;switch(n.kind){case`agent-settled`:{let r=await settleTaskAgentInvocationStep({ownerId:e.ownerId,result:n.result,serializedContext:t.serializedContext,sessionState:t.sessionState,taskId:e.taskId}),i=r.serializedContext,a=r.sessionState;if(r.completion!==void 0){let e=await emitSubagentEventStep({event:r.completion,sessionWritable:t.sessionWritable,serializedContext:i,sessionState:r.sessionState});i=e.serializedContext,a=e.sessionState}return await resumeHookStep(e.replyTo,{kind:`agent-settled`,callId:n.result.callId},{ifPresent:!0}),{serializedContext:i,sessionState:a}}case`agent-invoke`:{let r=await dispatchTaskAgentInvocationStep({ownerId:e.ownerId,replyTo:e.replyTo,request:n,serializedContext:t.serializedContext,sessionState:t.sessionState,taskId:e.taskId});switch(r.kind){case`dispatched`:return await emitSubagentEventStep({event:r.event,sessionWritable:t.sessionWritable,serializedContext:r.serializedContext??t.serializedContext,sessionState:r.sessionState});case`failed`:return await resumeHookStep(e.replyTo,{kind:`runtime-action-result`,results:[r.result]}),{serializedContext:r.serializedContext??t.serializedContext,sessionState:r.sessionState};case`not-admitted`:return{serializedContext:t.serializedContext,sessionState:r.sessionState}}}}}export{applyTaskAgentRequest};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import type { InputResponse } from "#shared/input.js";
|
|
2
2
|
/** Resumed with the bare response, not a session-inbox delivery, so the body can race the hook. */
|
|
3
3
|
export declare function resumeWorkflowToolRunAnswers(answerToken: string, responses: readonly InputResponse[] | undefined): Promise<void>;
|
|
4
|
+
/** Resolves a dismissible `ctx.ask()` request the user moved past without answering. */
|
|
5
|
+
export declare function resumeWorkflowToolRunDismissal(answerToken: string): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{resumeHook}from"#internal/workflow/runtime.js";async function resumeWorkflowToolRunAnswers(e,t){for(let n of t??[]){let t={optionId:n.optionId,text:n.text};await resumeHook(e,t)}}export{resumeWorkflowToolRunAnswers};
|
|
1
|
+
import{resumeHook}from"#internal/workflow/runtime.js";async function resumeWorkflowToolRunAnswers(e,t){for(let n of t??[]){let t={optionId:n.optionId,status:`answered`,text:n.text};await resumeHook(e,t)}}async function resumeWorkflowToolRunDismissal(e){await resumeHook(e,{status:`dismissed`})}export{resumeWorkflowToolRunAnswers,resumeWorkflowToolRunDismissal};
|
|
@@ -2,6 +2,7 @@ import { type Hook } from "#compiled/@workflow/core/index.js";
|
|
|
2
2
|
import type { WorkflowToolRunOwner, WorkflowToolRunRef } from "#execution/tools/workflow/messages.js";
|
|
3
3
|
import type { ToolContext, ToolInputRequest, ToolInputResponse } from "#tools/definition.js";
|
|
4
4
|
export interface WorkflowToolRunContext {
|
|
5
|
+
readonly canRequestInput?: boolean;
|
|
5
6
|
readonly from: WorkflowToolRunRef;
|
|
6
7
|
readonly owner: WorkflowToolRunOwner;
|
|
7
8
|
}
|
|
@@ -9,5 +10,5 @@ export declare function attachWorkflowToolRunContext(ctx: ToolContext, context:
|
|
|
9
10
|
export declare function findWorkflowToolRunContext(value: unknown): WorkflowToolRunContext | undefined;
|
|
10
11
|
export declare function readWorkflowToolRunRef(ctx: ToolContext): WorkflowToolRunRef;
|
|
11
12
|
export declare function readWorkflowToolRunOwner(ctx: ToolContext): WorkflowToolRunOwner;
|
|
12
|
-
/** Returns an answer
|
|
13
|
-
export declare function ask(ctx: ToolContext, request: ToolInputRequest): Hook<ToolInputResponse>;
|
|
13
|
+
/** Returns an answer which may be awaited or raced with another workflow operation. */
|
|
14
|
+
export declare function ask(ctx: ToolContext, request: ToolInputRequest): Hook<ToolInputResponse> | Promise<ToolInputResponse>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{workflowToolContextErrorMessage}from"#shared/workflow-tool-context.js";import{createHook}from"#compiled/@workflow/core/index.js";import{resumeHookStep}from"#execution/tools/workflow/resume-hook-step.js";const WORKFLOW_TOOL_RUN_CONTEXT=Symbol.for(`eve.workflow-tool-run.context`);function attachWorkflowToolRunContext(e,t){Object.defineProperty(e,WORKFLOW_TOOL_RUN_CONTEXT,{enumerable:!1,value:t})}function readWorkflowToolRunContext(e,t){let n=e?.[WORKFLOW_TOOL_RUN_CONTEXT];if(n===void 0)throw Error(workflowToolContextErrorMessage(t));return n}function findWorkflowToolRunContext(e){return typeof e==`object`&&e?e[WORKFLOW_TOOL_RUN_CONTEXT]:void 0}function readWorkflowToolRunRef(e){return readWorkflowToolRunContext(e,`agent`).from}function readWorkflowToolRunOwner(e){return readWorkflowToolRunContext(e,`agent`).owner}function ask(e,t){let n=readWorkflowToolRunContext(e,`ask`)
|
|
1
|
+
import{workflowToolContextErrorMessage}from"#shared/workflow-tool-context.js";import{createHook}from"#compiled/@workflow/core/index.js";import{resumeHookStep}from"#execution/tools/workflow/resume-hook-step.js";const WORKFLOW_TOOL_RUN_CONTEXT=Symbol.for(`eve.workflow-tool-run.context`);function attachWorkflowToolRunContext(e,t){Object.defineProperty(e,WORKFLOW_TOOL_RUN_CONTEXT,{enumerable:!1,value:t})}function readWorkflowToolRunContext(e,t){let n=e?.[WORKFLOW_TOOL_RUN_CONTEXT];if(n===void 0)throw Error(workflowToolContextErrorMessage(t));return n}function findWorkflowToolRunContext(e){return typeof e==`object`&&e?e[WORKFLOW_TOOL_RUN_CONTEXT]:void 0}function readWorkflowToolRunRef(e){return readWorkflowToolRunContext(e,`agent`).from}function readWorkflowToolRunOwner(e){return readWorkflowToolRunContext(e,`agent`).owner}function ask(e,t){let n=readWorkflowToolRunContext(e,`ask`);if(n.canRequestInput===!1)return Promise.resolve({status:`unavailable`});let r=createHook();return resumeHookStep(n.owner.inbox,{kind:`request`,from:n.from,replyTo:r.token,request:{kind:`ask`,request:t}}),r}export{ask,attachWorkflowToolRunContext,findWorkflowToolRunContext,readWorkflowToolRunOwner,readWorkflowToolRunRef};
|
|
@@ -6,6 +6,11 @@ export interface WorkflowBodyDefinition {
|
|
|
6
6
|
/** Snapshot added for new runs; absent only when resuming an older durable payload. */
|
|
7
7
|
readonly agents?: WorkflowToolContext["agents"];
|
|
8
8
|
readonly callId: string;
|
|
9
|
+
/**
|
|
10
|
+
* Whether the owning session can reach a human. `false` makes `ctx.ask()`
|
|
11
|
+
* resolve as `unavailable` instead of waiting for an answer no one can give.
|
|
12
|
+
*/
|
|
13
|
+
readonly canRequestInput?: boolean;
|
|
9
14
|
readonly executeInput?: JsonValue;
|
|
10
15
|
readonly input: JsonObject;
|
|
11
16
|
readonly session: SessionContext["session"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getWorkflowMetadata}from"#compiled/@workflow/core/index.js";import{normalizeSerializableError}from"#execution/workflow-errors.js";import{resumeHookStep}from"#execution/tools/workflow/resume-hook-step.js";import{ask,attachWorkflowToolRunContext}from"#execution/tools/workflow/ask.js";import{agent}from"#execution/tools/subagent/invoke-agent.js";import"#execution/tools/workflow/messages.js";import{readRegisteredWorkflow}from"#execution/workflow-registry.js";async function executeWorkflowBody(e,t){let n=createWorkflowBodyRef(e),r=createWorkflowBodyContext(e,t);attachWorkflowToolRunContext(r,{from:n,owner:e.owner});let i=0;try{let t=resolveWorkflowToolExecute(e)(e.executeInput??e.input,r),a;if(!isAsyncIterable(t))a=await t;else{let r=t[Symbol.asyncIterator](),o,s=await r.next();for(;s.done!==!0;){o=s.value;let t={from:n,update:s.value};await resumeHookStep(e.owner.inbox,{kind:`report`,...t}),i+=1,s=await r.next()}a=s.value??(e.execution===`blocking`?o:void 0)??null}return{outcome:{output:a,status:`completed`},reportCount:i}}catch(e){return t.aborted?{outcome:{reason:t.reason instanceof Error?t.reason.message:String(t.reason??``),status:`cancelled`},reportCount:i}:{outcome:{error:normalizeSerializableError(e),status:`failed`},reportCount:i}}}function createWorkflowBodyRef(e){return{callId:e.callId,execution:e.execution,input:e.input,runId:e.runId??getWorkflowMetadata().workflowRunId,sequence:e.session.turn.sequence,stepIndex:e.stepIndex,toolName:e.toolName,turnId:e.session.turn.id}}function resolveWorkflowToolExecute(e){let t=readRegisteredWorkflow(e.workflowId);if(typeof t!=`function`)throw Error(`Tool "${e.toolName}" is not registered as a workflow in this deployment (${e.workflowId}). The tool was renamed or removed after this run started.`);return t}function createWorkflowBodyContext(e,t){let unavailable=(t,n)=>{throw Error(`ctx.${t} is not available inside a workflow tool; ${n}. Tool "${e.toolName}" runs as a durable workflow body, which only replays deterministic code.`)},n={agent:((e,t)=>agent(n,e,t)),agents:Object.freeze(Object.fromEntries(Object.entries(e.agents??{}).map(([e,t])=>[e,Object.freeze({...t})]))),ask:e=>ask(n,e),abortSignal:t,callId:e.callId,getSandbox:()=>unavailable(`getSandbox()`,`the session sandbox belongs to the turn`),
|
|
1
|
+
import{getWorkflowMetadata}from"#compiled/@workflow/core/index.js";import{normalizeSerializableError}from"#execution/workflow-errors.js";import{resumeHookStep}from"#execution/tools/workflow/resume-hook-step.js";import{ask,attachWorkflowToolRunContext}from"#execution/tools/workflow/ask.js";import{agent}from"#execution/tools/subagent/invoke-agent.js";import"#execution/tools/workflow/messages.js";import{readRegisteredWorkflow}from"#execution/workflow-registry.js";async function executeWorkflowBody(e,t){let n=createWorkflowBodyRef(e),r=createWorkflowBodyContext(e,t);attachWorkflowToolRunContext(r,{canRequestInput:e.canRequestInput,from:n,owner:e.owner});let i=0;try{let t=resolveWorkflowToolExecute(e)(e.executeInput??e.input,r),a;if(!isAsyncIterable(t))a=await t;else{let r=t[Symbol.asyncIterator](),o,s=await r.next();for(;s.done!==!0;){o=s.value;let t={from:n,update:s.value};await resumeHookStep(e.owner.inbox,{kind:`report`,...t}),i+=1,s=await r.next()}a=s.value??(e.execution===`blocking`?o:void 0)??null}return{outcome:{output:a,status:`completed`},reportCount:i}}catch(e){return t.aborted?{outcome:{reason:t.reason instanceof Error?t.reason.message:String(t.reason??``),status:`cancelled`},reportCount:i}:{outcome:{error:normalizeSerializableError(e),status:`failed`},reportCount:i}}}function createWorkflowBodyRef(e){return{callId:e.callId,execution:e.execution,input:e.input,runId:e.runId??getWorkflowMetadata().workflowRunId,sequence:e.session.turn.sequence,stepIndex:e.stepIndex,toolName:e.toolName,turnId:e.session.turn.id}}function resolveWorkflowToolExecute(e){let t=readRegisteredWorkflow(e.workflowId);if(typeof t!=`function`)throw Error(`Tool "${e.toolName}" is not registered as a workflow in this deployment (${e.workflowId}). The tool was renamed or removed after this run started.`);return t}function createWorkflowBodyContext(e,t){let unavailable=(t,n)=>{throw Error(`ctx.${t} is not available inside a workflow tool; ${n}. Tool "${e.toolName}" runs as a durable workflow body, which only replays deterministic code.`)},n={agent:((e,t)=>agent(n,e,t)),agents:Object.freeze(Object.fromEntries(Object.entries(e.agents??{}).map(([e,t])=>[e,Object.freeze({...t})]))),ask:e=>ask(n,e),abortSignal:t,callId:e.callId,getSandbox:()=>unavailable(`getSandbox()`,`the session sandbox belongs to the turn`),getToken:()=>unavailable(`getToken()`,`pass ctx directly to a "use step" helper to resolve credentials`),requireAuth:()=>unavailable(`requireAuth()`,`pass ctx directly to a "use step" helper to request authorization`),session:e.session,toolName:e.toolName};return n}function isAsyncIterable(e){return typeof e==`object`&&!!e&&typeof e[Symbol.asyncIterator]==`function`}export{createWorkflowBodyRef,executeWorkflowBody};
|
|
@@ -6,7 +6,3 @@ import type { WorkflowToolRunAddress } from "#execution/tools/workflow/types.js"
|
|
|
6
6
|
export declare function cancelWorkflowToolRun(run: WorkflowToolRunAddress, reason: string): Promise<void>;
|
|
7
7
|
/** Allows cooperative cleanup, then forcibly stops a still-live run. */
|
|
8
8
|
export declare function settleWorkflowToolRunCancellation(runId: string, reason: string, cooperative?: boolean): Promise<void>;
|
|
9
|
-
export declare function cancelWorkflowToolRunStep(input: {
|
|
10
|
-
readonly reason: string;
|
|
11
|
-
readonly run: WorkflowToolRunAddress;
|
|
12
|
-
}): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createLogger,logError}from"#internal/logging.js";import{cancelRun,getRun,getWorld,resumeHook}from"#internal/workflow/runtime.js";import{isTaskWorkflowTargetGone}from"#execution/tasks/workflow-target.js";import{WORKFLOW_CANCELLATION_SETTLE_MS}from"#execution/tools/workflow/cancellation-policy.js";const log=createLogger(`execution.workflow-tool-run`);async function cancelWorkflowToolRun(e,t){let n={kind:`cancel`,reason:t},r=!1;try{await resumeHook(e.hookToken,n),r=!0}catch(t){isTaskWorkflowTargetGone(t)||logError(log,`failed to signal a workflow tool run to cancel; cancelling it outright`,t,{runId:e.runId})}try{await settleWorkflowToolRunCancellation(e.runId,t,r)}catch(t){if(isTaskWorkflowTargetGone(t))return;logError(log,`failed to cancel workflow tool run; it may run to completion`,t,{runId:e.runId})}}async function settleWorkflowToolRunCancellation(e,t,n=!0){if(n){let t=Date.now()+WORKFLOW_CANCELLATION_SETTLE_MS;for(;Date.now()<t;){try{let t=await getRun(e).status;if(t!==`pending`&&t!==`running`)return}catch(e){if(isTaskWorkflowTargetGone(e))return;throw e}await new Promise(e=>setTimeout(e,250))}}try{await cancelRun(await getWorld(),e,{cancelReason:t})}catch(e){if(isTaskWorkflowTargetGone(e))return;throw e}}
|
|
1
|
+
import{createLogger,logError}from"#internal/logging.js";import{cancelRun,getRun,getWorld,resumeHook}from"#internal/workflow/runtime.js";import{isTaskWorkflowTargetGone}from"#execution/tasks/workflow-target.js";import{WORKFLOW_CANCELLATION_SETTLE_MS}from"#execution/tools/workflow/cancellation-policy.js";const log=createLogger(`execution.workflow-tool-run`);async function cancelWorkflowToolRun(e,t){let n={kind:`cancel`,reason:t},r=!1;try{await resumeHook(e.hookToken,n),r=!0}catch(t){isTaskWorkflowTargetGone(t)||logError(log,`failed to signal a workflow tool run to cancel; cancelling it outright`,t,{runId:e.runId})}try{await settleWorkflowToolRunCancellation(e.runId,t,r)}catch(t){if(isTaskWorkflowTargetGone(t))return;logError(log,`failed to cancel workflow tool run; it may run to completion`,t,{runId:e.runId})}}async function settleWorkflowToolRunCancellation(e,t,n=!0){if(n){let t=Date.now()+WORKFLOW_CANCELLATION_SETTLE_MS;for(;Date.now()<t;){try{let t=await getRun(e).status;if(t!==`pending`&&t!==`running`)return}catch(e){if(isTaskWorkflowTargetGone(e))return;throw e}await new Promise(e=>setTimeout(e,250))}}try{await cancelRun(await getWorld(),e,{cancelReason:t})}catch(e){if(isTaskWorkflowTargetGone(e))return;throw e}}export{cancelWorkflowToolRun,settleWorkflowToolRunCancellation};
|
|
@@ -9,6 +9,7 @@ export declare function startWorkflowToolRun(input: Omit<WorkflowToolRunInput, "
|
|
|
9
9
|
export declare function startWorkflowTask(input: {
|
|
10
10
|
readonly agents: WorkflowToolRunInput["agents"];
|
|
11
11
|
readonly auth: SessionAuth["current"];
|
|
12
|
+
readonly canRequestInput: boolean;
|
|
12
13
|
readonly batchEvent: {
|
|
13
14
|
readonly sequence: number;
|
|
14
15
|
readonly stepIndex: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createLogger,logError}from"#internal/logging.js";import{toError}from"#shared/errors.js";import{startWorkflowOnCurrentDeployment,workflowToolRunWorkflowReference}from"#execution/workflow-runtime.js";import{registerWorkflowToolRun}from"#harness/workflow-tool-runs.js";import{createRuntimeToolResultFromValue}from"#harness/action-result-helpers.js";const log=createLogger(`execution.workflow-tool-run`);async function startWorkflowToolRun(e){let t=crypto.randomUUID();return{hookToken:t,runId:(await startWorkflowOnCurrentDeployment(workflowToolRunWorkflowReference,[{...e,hookToken:t}])).runId}}async function startWorkflowTask(e){let{task:t,batchEvent:n,session:r}=e;try{let i=await startWorkflowToolRun({agents:e.agents,callId:t.callId,executeInput:t.executeInput,input:t.input,owner:e.owner,session:{auth:{current:e.auth,initiator:e.initiatorAuth},id:r.sessionId,parent:e.parentSession,turn:{id:n.turnId,sequence:n.sequence}},stepIndex:n.stepIndex,toolName:t.toolName,workflowId:t.workflowId});return{session:registerWorkflowToolRun(r,{callId:t.callId,lifetime:`turn`,origin:{turnId:n.turnId,stepIndex:n.stepIndex},address:i,toolName:t.toolName})}}catch(e){return logError(log,`workflow tool run failed to start`,e,{callId:t.callId,toolName:t.toolName}),{result:createRuntimeToolResultFromValue({callId:t.callId,isError:!0,output:toError(e),toolName:t.toolName}),session:r}}}export{startWorkflowTask,startWorkflowToolRun};
|
|
1
|
+
import{createLogger,logError}from"#internal/logging.js";import{toError}from"#shared/errors.js";import{startWorkflowOnCurrentDeployment,workflowToolRunWorkflowReference}from"#execution/workflow-runtime.js";import{registerWorkflowToolRun}from"#harness/workflow-tool-runs.js";import{createRuntimeToolResultFromValue}from"#harness/action-result-helpers.js";const log=createLogger(`execution.workflow-tool-run`);async function startWorkflowToolRun(e){let t=crypto.randomUUID();return{hookToken:t,runId:(await startWorkflowOnCurrentDeployment(workflowToolRunWorkflowReference,[{...e,hookToken:t}])).runId}}async function startWorkflowTask(e){let{task:t,batchEvent:n,session:r}=e;try{let i=await startWorkflowToolRun({agents:e.agents,callId:t.callId,canRequestInput:e.canRequestInput,executeInput:t.executeInput,input:t.input,owner:e.owner,session:{auth:{current:e.auth,initiator:e.initiatorAuth},id:r.sessionId,parent:e.parentSession,turn:{id:n.turnId,sequence:n.sequence}},stepIndex:n.stepIndex,toolName:t.toolName,workflowId:t.workflowId});return{session:registerWorkflowToolRun(r,{callId:t.callId,lifetime:`turn`,origin:{turnId:n.turnId,stepIndex:n.stepIndex},address:i,toolName:t.toolName})}}catch(e){return logError(log,`workflow tool run failed to start`,e,{callId:t.callId,toolName:t.toolName}),{result:createRuntimeToolResultFromValue({callId:t.callId,isError:!0,output:toError(e),toolName:t.toolName}),session:r}}}export{startWorkflowTask,startWorkflowToolRun};
|