eve 0.75.1 → 0.76.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/dist/src/_virtual/_rolldown/runtime.js +1 -1
- package/dist/src/acp/adapter.js +1 -1
- package/dist/src/channel/task-card.js +1 -1
- package/dist/src/channel/tool-eligibility.d.ts +1 -2
- package/dist/src/chunks/{use-eve-agent-B2Kne9z6.js → use-eve-agent-D2V9UhLt.js} +68 -10
- package/dist/src/chunks/{use-eve-agent-DK_T88EP.js → use-eve-agent-QmriPA-w.js} +68 -10
- package/dist/src/cli/dev/environment.d.ts +0 -6
- package/dist/src/cli/dev/environment.js +1 -1
- package/dist/src/cli/dev/tui/conversation-view.js +1 -1
- package/dist/src/cli/dev/tui/runner.js +1 -1
- package/dist/src/cli/dev/tui/tool-presentation.js +1 -1
- package/dist/src/cli/dev/tui/transcript.js +1 -1
- package/dist/src/client/message-action-parts.d.ts +3 -0
- package/dist/src/client/message-action-parts.js +1 -1
- package/dist/src/client/message-reducer-types.d.ts +6 -1
- package/dist/src/client/message-reducer.js +1 -1
- package/dist/src/compiled/.vendor-stamp.json +3 -2
- package/dist/src/compiled/@eve/catalog/index.js +1 -1
- package/dist/src/compiled/@vercel/queue/index.d.ts +1066 -0
- package/dist/src/compiled/@vercel/queue/index.js +47 -0
- package/dist/src/compiler/connection-ownership.d.ts +6 -0
- package/dist/src/compiler/connection-ownership.js +1 -0
- package/dist/src/compiler/default-tool-policy.d.ts +0 -3
- package/dist/src/compiler/default-tool-policy.js +1 -1
- package/dist/src/compiler/extension-compatibility.d.ts +21 -20
- package/dist/src/compiler/extension-compatibility.js +1 -1
- package/dist/src/compiler/manifest.d.ts +9 -6
- package/dist/src/compiler/manifest.js +1 -1
- package/dist/src/compiler/normalize-connection.js +1 -1
- package/dist/src/compiler/normalize-manifest.js +1 -1
- package/dist/src/compiler/normalize-skill.d.ts +5 -0
- package/dist/src/compiler/normalize-skill.js +1 -1
- package/dist/src/compiler/normalize-subagent.d.ts +2 -1
- package/dist/src/compiler/normalize-subagent.js +1 -1
- package/dist/src/compiler/normalize-tool.js +1 -1
- package/dist/src/compiler/remote-agent-node.d.ts +2 -1
- package/dist/src/compiler/remote-agent-node.js +1 -1
- package/dist/src/connections/ownership.d.ts +18 -0
- package/dist/src/connections/ownership.js +1 -0
- package/dist/src/context/build-dynamic-tools.d.ts +3 -9
- package/dist/src/context/build-dynamic-tools.js +1 -1
- package/dist/src/context/dynamic-connection-lifecycle.js +1 -1
- package/dist/src/context/dynamic-skill-lifecycle.d.ts +2 -11
- package/dist/src/context/dynamic-skill-lifecycle.js +1 -1
- package/dist/src/context/dynamic-subagent-lifecycle.js +1 -1
- package/dist/src/context/dynamic-tool-lifecycle.js +1 -1
- package/dist/src/context/dynamic-tool-metadata.d.ts +1 -0
- package/dist/src/context/keys.d.ts +5 -4
- package/dist/src/context/memory-tools.js +1 -1
- package/dist/src/context/schedule-collection-tools.js +1 -1
- package/dist/src/discover/grammar.d.ts +11 -0
- package/dist/src/discover/grammar.js +1 -1
- package/dist/src/discover/manifest.d.ts +1 -0
- package/dist/src/discover/manifest.js +1 -1
- package/dist/src/discover/skills.d.ts +1 -0
- package/dist/src/discover/skills.js +1 -1
- package/dist/src/dynamic/definition.d.ts +7 -5
- package/dist/src/evals/assertions/collector.d.ts +4 -0
- package/dist/src/evals/assertions/collector.js +1 -1
- package/dist/src/evals/assertions/run.d.ts +2 -3
- package/dist/src/evals/assertions/run.js +2 -2
- package/dist/src/evals/assertions/scoped.js +1 -1
- package/dist/src/evals/index.d.ts +1 -1
- package/dist/src/evals/match.d.ts +9 -6
- package/dist/src/evals/reported-tool-name.d.ts +9 -0
- package/dist/src/evals/reported-tool-name.js +1 -0
- package/dist/src/evals/runner/derive-run-facts.d.ts +3 -3
- package/dist/src/evals/runner/derive-run-facts.js +1 -1
- package/dist/src/evals/runner/execute-task.js +1 -1
- package/dist/src/evals/runner/reporters/braintrust.js +1 -1
- package/dist/src/evals/runner/reporters/datadog-runtime-trace-links.d.ts +11 -0
- package/dist/src/evals/runner/reporters/datadog-runtime-trace-links.js +1 -0
- package/dist/src/evals/runner/reporters/datadog.js +2 -2
- package/dist/src/evals/session.js +2 -2
- package/dist/src/evals/target.d.ts +7 -0
- package/dist/src/evals/target.js +1 -1
- package/dist/src/evals/types.d.ts +17 -1
- package/dist/src/execution/agent-sessions/remote.js +1 -1
- package/dist/src/execution/catalog/connection-auth.d.ts +41 -0
- package/dist/src/execution/catalog/connection-auth.js +1 -0
- package/dist/src/execution/catalog/connection-entry.d.ts +16 -0
- package/dist/src/execution/catalog/connection-entry.js +1 -0
- package/dist/src/execution/catalog/listing.d.ts +9 -0
- package/dist/src/execution/catalog/listing.js +3 -0
- package/dist/src/execution/catalog/rank.d.ts +44 -0
- package/dist/src/execution/catalog/rank.js +1 -0
- package/dist/src/execution/catalog/search.d.ts +28 -0
- package/dist/src/execution/catalog/search.js +1 -0
- package/dist/src/execution/catalog/signatures.d.ts +11 -0
- package/dist/src/execution/catalog/signatures.js +1 -0
- package/dist/src/execution/catalog/skills.d.ts +24 -0
- package/dist/src/execution/catalog/skills.js +1 -0
- package/dist/src/execution/catalog/step-catalog.d.ts +51 -0
- package/dist/src/execution/catalog/step-catalog.js +1 -0
- package/dist/src/execution/coordination-dispatch-shared.js +1 -1
- package/dist/src/execution/dynamic-connections.js +1 -1
- package/dist/src/execution/dynamic-workflow/tool.js +1 -1
- package/dist/src/execution/invoke-tool.js +1 -1
- package/dist/src/execution/node-step.js +1 -1
- package/dist/src/execution/session/active-turn.d.ts +1 -1
- package/dist/src/execution/session/pending-turn-state.js +1 -1
- package/dist/src/execution/session/turn-step.js +1 -1
- package/dist/src/execution/session/turn.d.ts +5 -5
- package/dist/src/execution/session/turn.js +1 -1
- package/dist/src/execution/session.js +1 -1
- package/dist/src/execution/skills/instructions.d.ts +20 -10
- package/dist/src/execution/skills/instructions.js +2 -2
- package/dist/src/execution/tasks/calls.d.ts +6 -5
- package/dist/src/execution/tasks/calls.js +1 -1
- package/dist/src/execution/tasks/model-step.d.ts +10 -10
- package/dist/src/execution/tasks/model-step.js +1 -1
- package/dist/src/execution/tasks/render.d.ts +3 -3
- package/dist/src/execution/tasks/render.js +3 -3
- package/dist/src/execution/tasks/session.d.ts +2 -1
- package/dist/src/execution/tasks/table.d.ts +1 -1
- package/dist/src/execution/tasks/tool-entry-point.d.ts +1 -1
- package/dist/src/execution/tool-auth.js +1 -1
- package/dist/src/execution/tools/agent-router-workflow.js +1 -1
- package/dist/src/execution/tools/workflow/harness-definition.js +1 -1
- package/dist/src/extensions/code/extension/extension.d.ts +4 -18
- package/dist/src/extensions/code/extension/instructions/github.d.ts +3 -0
- package/dist/src/extensions/code/extension/instructions/github.js +1 -0
- package/dist/src/extensions/code/extension/instructions.md +1 -13
- package/dist/src/extensions/code/extension/lib/diagnostics.d.ts +4 -2
- package/dist/src/extensions/code/extension/lib/diagnostics.js +3 -3
- package/dist/src/extensions/code/extension/lib/github-compat.d.ts +28 -0
- package/dist/src/extensions/code/extension/lib/github-compat.js +1 -0
- package/dist/src/extensions/code/extension/lib/grep-search.d.ts +3 -13
- package/dist/src/extensions/code/extension/lib/grep-search.js +2 -2
- package/dist/src/extensions/code/extension/lib/patch.d.ts +8 -2
- package/dist/src/extensions/code/extension/lib/patch.js +4 -4
- package/dist/src/extensions/code/extension/lib/repository-root.d.ts +3 -4
- package/dist/src/extensions/code/extension/lib/repository-root.js +1 -1
- package/dist/src/extensions/code/extension/lib/sandbox.d.ts +2 -1
- package/dist/src/extensions/code/extension/lib/sandbox.js +1 -1
- package/dist/src/extensions/code/extension/lib/tooling.d.ts +4 -4
- package/dist/src/extensions/code/extension/lib/tooling.js +7 -7
- package/dist/src/extensions/code/extension/lib/workspace-root.d.ts +31 -0
- package/dist/src/extensions/code/extension/lib/workspace-root.js +1 -0
- package/dist/src/extensions/code/extension/skills/pr.d.ts +6 -0
- package/dist/src/extensions/code/extension/skills/pr.js +1 -0
- package/dist/src/extensions/code/extension/tools/apply_patch.d.ts +2 -2
- package/dist/src/extensions/code/extension/tools/apply_patch.js +2 -2
- package/dist/src/extensions/code/extension/tools/gh.d.ts +4 -3
- package/dist/src/extensions/code/extension/tools/gh.js +1 -1
- package/dist/src/extensions/code/extension/tools/grep.js +1 -1
- package/dist/src/extensions/code/tools.d.ts +2 -1
- package/dist/src/extensions/code/tools.js +1 -1
- package/dist/src/extensions/git/extension/extension.d.ts +12 -0
- package/dist/src/extensions/git/extension/extension.js +1 -0
- package/dist/src/extensions/git/extension/instructions/github.d.ts +2 -0
- package/dist/src/extensions/git/extension/instructions/github.js +1 -0
- package/dist/src/extensions/git/extension/lib/gh-tool.d.ts +29 -0
- package/dist/src/extensions/git/extension/lib/gh-tool.js +1 -0
- package/dist/src/extensions/git/extension/lib/github-guidance.d.ts +3 -0
- package/dist/src/extensions/git/extension/lib/github-guidance.js +49 -0
- package/dist/src/extensions/{code → git}/extension/lib/github-shell.d.ts +1 -1
- package/dist/src/extensions/git/extension/lib/github-shell.js +1 -0
- package/dist/src/extensions/git/extension/lib/repository-root.d.ts +5 -0
- package/dist/src/extensions/git/extension/lib/repository-root.js +1 -0
- package/dist/src/extensions/git/extension/lib/sandbox.d.ts +6 -0
- package/dist/src/extensions/git/extension/lib/sandbox.js +1 -0
- package/dist/src/extensions/git/extension/lib/shell.d.ts +1 -0
- package/dist/src/extensions/git/extension/lib/shell.js +1 -0
- package/dist/src/extensions/git/extension/lib/tooling.d.ts +4 -0
- package/dist/src/extensions/git/extension/lib/tooling.js +1 -0
- package/dist/src/extensions/git/extension/skills/pr.d.ts +5 -0
- package/dist/src/extensions/git/extension/skills/pr.js +1 -0
- package/dist/src/extensions/git/extension/tools/gh.d.ts +28 -0
- package/dist/src/extensions/git/extension/tools/gh.js +1 -0
- package/dist/src/extensions/git/tools.d.ts +27 -0
- package/dist/src/extensions/git/tools.js +1 -0
- package/dist/src/framework/sources/registry.js +1 -1
- package/dist/src/harness/action-presentation.d.ts +2 -2
- package/dist/src/harness/action-result-helpers.d.ts +10 -2
- package/dist/src/harness/action-result-helpers.js +1 -1
- package/dist/src/harness/announcements.d.ts +2 -8
- package/dist/src/harness/announcements.js +1 -1
- package/dist/src/harness/coordination.d.ts +11 -11
- package/dist/src/harness/coordination.js +1 -1
- package/dist/src/harness/current-messages.d.ts +1 -5
- package/dist/src/harness/current-messages.js +1 -1
- package/dist/src/harness/emission.d.ts +2 -2
- package/dist/src/harness/emission.js +1 -1
- package/dist/src/harness/execute-call.d.ts +48 -0
- package/dist/src/harness/execute-call.js +1 -0
- package/dist/src/harness/execute-tool.d.ts +3 -1
- package/dist/src/harness/final-output.d.ts +2 -6
- package/dist/src/harness/final-output.js +1 -1
- package/dist/src/harness/hitl/approvals.d.ts +5 -0
- package/dist/src/harness/hitl/approvals.js +1 -1
- package/dist/src/harness/hitl/approved-calls.d.ts +3 -2
- package/dist/src/harness/hitl/approved-calls.js +1 -1
- package/dist/src/harness/hitl/candidates.d.ts +13 -2
- package/dist/src/harness/hitl/candidates.js +1 -1
- package/dist/src/harness/hitl/coordinator.d.ts +3 -3
- package/dist/src/harness/hitl/coordinator.js +1 -1
- package/dist/src/harness/hitl/index.d.ts +6 -4
- package/dist/src/harness/hitl/index.js +1 -1
- package/dist/src/harness/hitl/intake.d.ts +3 -3
- package/dist/src/harness/hitl/intake.js +1 -1
- package/dist/src/harness/input-extraction.d.ts +4 -1
- package/dist/src/harness/input-extraction.js +1 -1
- package/dist/src/harness/input-request-resolution.d.ts +15 -0
- package/dist/src/harness/input-request-resolution.js +1 -1
- package/dist/src/harness/model-call/call.d.ts +3 -5
- package/dist/src/harness/model-call/call.js +1 -1
- package/dist/src/harness/model-call/errors.js +1 -1
- package/dist/src/harness/model-call/request.d.ts +3 -2
- package/dist/src/harness/model-call/request.js +1 -1
- package/dist/src/harness/model-call/response.d.ts +2 -1
- package/dist/src/harness/model-call/response.js +1 -1
- package/dist/src/harness/model-call/run.d.ts +5 -3
- package/dist/src/harness/model-call/run.js +1 -1
- package/dist/src/harness/model-call/tools.d.ts +12 -21
- package/dist/src/harness/model-call/tools.js +1 -1
- package/dist/src/harness/model-profile.d.ts +5 -0
- package/dist/src/harness/model-profile.js +1 -1
- package/dist/src/harness/provider-tools.d.ts +6 -5
- package/dist/src/harness/provider-tools.js +1 -1
- package/dist/src/harness/session-machine/commit.js +1 -1
- package/dist/src/harness/session-machine/transitions.d.ts +5 -2
- package/dist/src/harness/session-machine/transitions.js +1 -1
- package/dist/src/harness/step/after-model.js +1 -1
- package/dist/src/harness/step-hooks.d.ts +4 -6
- package/dist/src/harness/step-hooks.js +1 -1
- package/dist/src/harness/tool-call-input-errors.d.ts +2 -2
- package/dist/src/harness/tool-call-io.d.ts +3 -0
- package/dist/src/harness/tool-call-io.js +1 -1
- package/dist/src/harness/tools.d.ts +22 -19
- package/dist/src/harness/tools.js +1 -1
- package/dist/src/harness/types.d.ts +14 -0
- package/dist/src/instrumentation/lifecycle.d.ts +0 -1
- package/dist/src/instrumentation/native-events.js +1 -1
- package/dist/src/instrumentation/runtime.d.ts +2 -1
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/internal/authored-definition/core.js +1 -1
- package/dist/src/internal/authored-definition/schedule-collection.js +1 -1
- package/dist/src/internal/authored-definition/schema-backed.d.ts +2 -2
- package/dist/src/internal/authored-definition/schema-backed.js +1 -1
- package/dist/src/internal/authored-module.d.ts +2 -1
- package/dist/src/internal/authored-module.js +1 -1
- package/dist/src/internal/helpers/markdown.js +1 -1
- package/dist/src/internal/mcp/skills.js +1 -1
- package/dist/src/internal/nitro/host/create-application-nitro.js +1 -1
- package/dist/src/internal/nitro/host/dev-host-fingerprint.js +1 -1
- package/dist/src/internal/nitro/host/local-schedules-runtime-plugin.d.ts +5 -0
- package/dist/src/internal/nitro/host/local-schedules-runtime-plugin.js +1 -0
- package/dist/src/internal/nitro/routes/schedule-collection-consumer.d.ts +6 -0
- package/dist/src/internal/nitro/routes/schedule-collection-consumer.js +1 -1
- package/dist/src/internal/schedules/consumer-route.d.ts +2 -0
- package/dist/src/internal/schedules/consumer-route.js +1 -1
- package/dist/src/internal/schedules/dev-environment.d.ts +2 -0
- package/dist/src/internal/schedules/dev-environment.js +1 -0
- package/dist/src/internal/vercel-agent-summary.d.ts +2 -2
- package/dist/src/internal/workflow/vercel-world-defaults.d.ts +1 -1
- package/dist/src/internal/workflow/vercel-world-defaults.js +1 -1
- package/dist/src/protocol/catalog-tools.d.ts +12 -0
- package/dist/src/protocol/catalog-tools.js +1 -0
- package/dist/src/protocol/message-version.js +1 -1
- package/dist/src/protocol/message.d.ts +1 -1
- package/dist/src/protocol/remote-agent-protocol.d.ts +2 -0
- package/dist/src/protocol/remote-agent-protocol.js +1 -1
- package/dist/src/protocol/reply-tool.d.ts +2 -0
- package/dist/src/protocol/reply-tool.js +1 -0
- package/dist/src/protocol/runtime-tools.d.ts +6 -0
- package/dist/src/protocol/runtime-tools.js +1 -0
- package/dist/src/protocol/session-projection.js +1 -1
- package/dist/src/protocol/task-tools.d.ts +4 -4
- package/dist/src/protocol/task-tools.js +1 -1
- package/dist/src/public/channels/chat-sdk/chatSdkChannel.js +1 -1
- package/dist/src/public/channels/linear/defaults.js +2 -2
- package/dist/src/public/channels/slack/action-status.d.ts +0 -9
- package/dist/src/public/channels/slack/action-status.js +1 -1
- package/dist/src/public/channels/slack/defaults.js +2 -2
- package/dist/src/public/channels/slack/task-card.d.ts +1 -1
- package/dist/src/public/definitions/connections/mcp.d.ts +4 -4
- package/dist/src/public/definitions/connections/openapi.d.ts +6 -7
- package/dist/src/public/definitions/remote-agent.d.ts +6 -3
- package/dist/src/public/definitions/workspace-agent.d.ts +6 -3
- package/dist/src/public/experimental/schedules/index.d.ts +1 -1
- package/dist/src/public/schedules/providers/in-memory.js +1 -1
- package/dist/src/public/schedules/providers/vercel.js +1 -1
- package/dist/src/public/schedules/subscription.d.ts +36 -16
- package/dist/src/public/tools/web-search.d.ts +1 -1
- package/dist/src/runtime/agent/bootstrap.d.ts +2 -1
- package/dist/src/runtime/agent/bootstrap.js +1 -1
- package/dist/src/runtime/agent/mock-model-adapter.js +2 -2
- package/dist/src/runtime/agent/mock-model-fixtures.js +2 -2
- package/dist/src/runtime/agent/mock-model-skill-selection.d.ts +2 -0
- package/dist/src/runtime/agent/mock-model-skill-selection.js +2 -2
- package/dist/src/runtime/agent/mock-structured-output.d.ts +1 -1
- package/dist/src/runtime/connections/mcp-client.js +1 -1
- package/dist/src/runtime/connections/registry.js +1 -1
- package/dist/src/runtime/connections/scoped-authorization.js +1 -1
- package/dist/src/runtime/connections/tool-result.d.ts +2 -2
- package/dist/src/runtime/resolve-agent-graph.js +1 -1
- package/dist/src/runtime/resolve-tool.js +1 -1
- package/dist/src/runtime/schedules/collection-client.d.ts +12 -3
- package/dist/src/runtime/schedules/collection-client.js +1 -1
- package/dist/src/runtime/subagents/dynamic-agent-config.d.ts +2 -2
- package/dist/src/runtime/subagents/dynamic-remote-agent-config.d.ts +2 -1
- package/dist/src/runtime/subagents/dynamic-remote-agent-config.js +1 -1
- package/dist/src/runtime/subagents/registry.d.ts +2 -1
- package/dist/src/runtime/subagents/registry.js +1 -1
- package/dist/src/runtime/tools/registry.d.ts +2 -0
- package/dist/src/runtime/tools/registry.js +1 -1
- package/dist/src/runtime/types.d.ts +3 -3
- package/dist/src/setup/connection-connector.js +1 -2
- package/dist/src/setup/index.d.ts +1 -1
- package/dist/src/setup/index.js +1 -1
- package/dist/src/setup/integrations/slack/setup.d.ts +23 -3
- package/dist/src/setup/integrations/slack/setup.js +1 -1
- package/dist/src/setup/primitives/process-output.d.ts +5 -0
- package/dist/src/setup/primitives/process-output.js +2 -1
- package/dist/src/setup/scaffold/create/project.js +1 -1
- package/dist/src/setup/scaffold/create/web-template.d.ts +1 -1
- package/dist/src/setup/scaffold/create/web-template.js +1 -1
- package/dist/src/setup/scaffold/update/update-slack-channel.d.ts +17 -0
- package/dist/src/setup/scaffold/update/update-slack-channel.js +1 -1
- package/dist/src/setup/slack-connect-create.d.ts +10 -2
- package/dist/src/setup/slack-connect-create.js +1 -1
- package/dist/src/setup/slack-connect-lifecycle.d.ts +92 -44
- package/dist/src/setup/slack-connect-lifecycle.js +1 -1
- package/dist/src/setup/slack-connect.d.ts +30 -11
- package/dist/src/setup/slack-connect.js +1 -1
- package/dist/src/setup/slack-setup-plan.d.ts +72 -0
- package/dist/src/setup/slack-setup-plan.js +1 -0
- package/dist/src/setup/slackbot.d.ts +75 -35
- package/dist/src/setup/slackbot.js +2 -1
- package/dist/src/shared/action-label.d.ts +10 -0
- package/dist/src/shared/action-label.js +1 -0
- package/dist/src/shared/action-request-name.d.ts +3 -1
- package/dist/src/shared/action-request-name.js +1 -1
- package/dist/src/shared/action-types.d.ts +7 -8
- package/dist/src/shared/action-types.js +1 -1
- package/dist/src/shared/agent-definition.d.ts +11 -3
- package/dist/src/shared/development-env-files.d.ts +4 -0
- package/dist/src/shared/development-env-files.js +1 -0
- package/dist/src/shared/input.d.ts +0 -1
- package/dist/src/shared/map-with-concurrency.d.ts +2 -0
- package/dist/src/shared/map-with-concurrency.js +1 -0
- package/dist/src/shared/skill-definition.d.ts +6 -0
- package/dist/src/shared/skill-package.d.ts +1 -0
- package/dist/src/shared/skill-package.js +1 -1
- package/dist/src/shared/web-search.d.ts +15 -2
- package/dist/src/shared/web-search.js +1 -1
- package/dist/src/svelte/index.js +1 -1
- package/dist/src/svelte/use-eve-agent.js +1 -1
- package/dist/src/tool-stubs/execute.d.ts +0 -3
- package/dist/src/tool-stubs/execute.js +1 -1
- package/dist/src/tool-stubs/rules.js +1 -1
- package/dist/src/tool-stubs/validate-targets.js +1 -1
- package/dist/src/tools/behavior.d.ts +3 -6
- package/dist/src/tools/definition.d.ts +5 -0
- package/dist/src/tools/dynamic.d.ts +5 -2
- package/dist/src/tools/provided/ask-question-workflow.js +1 -1
- package/dist/src/tools/provided/sleep-workflow.js +1 -1
- package/dist/src/tools/provided/task-cancel.d.ts +1 -1
- package/dist/src/tools/provided/task-wait.d.ts +1 -1
- package/dist/src/tools/provided/web-search.d.ts +20 -7
- package/dist/src/tools/provided/web-search.js +1 -1
- package/dist/src/tools/schema.d.ts +5 -0
- package/dist/src/tools/schema.js +1 -1
- package/dist/src/{runtime/connections/tool-signature.d.ts → tools/signature.d.ts} +2 -2
- package/dist/src/tools/workflow-definition.d.ts +1 -1
- package/dist/src/tracing/agent-approval-instrumentation.js +1 -1
- package/dist/src/tracing/agent-otel-provider.js +2 -2
- package/dist/src/tracing/agent-otel-runtime-context.d.ts +1 -0
- package/dist/src/tracing/agent-otel-runtime-context.js +1 -1
- package/dist/src/tracing/agent-otel-turn-state.d.ts +6 -0
- package/dist/src/tracing/agent-otel-turn-state.js +1 -0
- package/dist/src/tracing/agent-tool-instrumentation.js +1 -1
- package/dist/src/tracing/agent-trace-context-codec.js +1 -1
- package/dist/src/tracing/agent-trace-state.d.ts +4 -1
- package/dist/src/vue/index.js +1 -1
- package/dist/src/vue/use-eve-agent.js +1 -1
- package/docs/agent-config.md +8 -8
- package/docs/channels/chat-sdk.mdx +1 -1
- package/docs/channels/slack.mdx +32 -82
- package/docs/code-extension.mdx +28 -7
- package/docs/concepts/built-in-tools.md +43 -43
- package/docs/concepts/context-control.md +1 -1
- package/docs/concepts/execution-model-and-durability.mdx +1 -1
- package/docs/concepts/sessions-runs-and-streaming.md +4 -4
- package/docs/connections/mcp.mdx +5 -5
- package/docs/connections/openapi.mdx +1 -1
- package/docs/connections/overview.mdx +4 -2
- package/docs/evals/assertions.mdx +5 -3
- package/docs/evals/reporters.mdx +3 -1
- package/docs/evals/tool-stubs.mdx +3 -1
- package/docs/extensions.md +2 -0
- package/docs/guides/dev-tui.md +2 -2
- package/docs/guides/dynamic-capabilities.md +14 -4
- package/docs/guides/frontend/overview.mdx +1 -1
- package/docs/guides/remote-agents.md +10 -3
- package/docs/instructions.mdx +5 -5
- package/docs/reference/cli.md +2 -2
- package/docs/reference/typescript-api.md +3 -3
- package/docs/skills.mdx +19 -4
- package/docs/subagents/index.mdx +5 -3
- package/docs/tools/overview.mdx +22 -1
- package/docs/tools/tasks-upgrade.md +1 -1
- package/docs/tools/tasks.md +32 -32
- package/docs/tools/workflows.mdx +6 -6
- package/docs/tutorial/team-playbooks.mdx +2 -2
- package/package.json +22 -6
- package/dist/src/execution/connection-announcement.d.ts +0 -7
- package/dist/src/execution/connection-announcement.js +0 -4
- package/dist/src/execution/tools/connection-approval.d.ts +0 -25
- package/dist/src/execution/tools/connection-approval.js +0 -1
- package/dist/src/execution/tools/connection-search-rank.d.ts +0 -21
- package/dist/src/execution/tools/connection-search-rank.js +0 -1
- package/dist/src/execution/tools/connection-target.d.ts +0 -18
- package/dist/src/execution/tools/connection-target.js +0 -1
- package/dist/src/execution/tools/connection-tools.d.ts +0 -4
- package/dist/src/execution/tools/connection-tools.js +0 -2
- package/dist/src/execution/tools/load-skill.d.ts +0 -10
- package/dist/src/execution/tools/load-skill.js +0 -1
- package/dist/src/extensions/code/extension/lib/github-shell.js +0 -1
- package/dist/src/extensions/code/extension/skills/pr/SKILL.md +0 -53
- package/dist/src/extensions/code/extension/subagents/worker/tools/load_skill.d.ts +0 -2
- package/dist/src/extensions/code/extension/subagents/worker/tools/load_skill.js +0 -1
- package/dist/src/harness/advertised-tools.d.ts +0 -26
- package/dist/src/harness/advertised-tools.js +0 -1
- package/dist/src/harness/nested-actions.d.ts +0 -23
- package/dist/src/harness/nested-actions.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-config@0.2.0/node_modules/@vercel/cli-config/dist/cli-config.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-config@0.2.0/node_modules/@vercel/cli-config/dist/cred-storage.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-config@0.2.0/node_modules/@vercel/cli-config/dist/index.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-config@0.2.0/node_modules/@vercel/cli-config/dist/schema.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-config@0.2.0/node_modules/@vercel/cli-config/dist/schema.zod.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-config@0.2.0/node_modules/@vercel/cli-config/dist/types.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.0/node_modules/@vercel/cli-exec/dist/envpath.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.0/node_modules/@vercel/cli-exec/dist/errors.js +0 -2
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.0/node_modules/@vercel/cli-exec/dist/errutils.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.0/node_modules/@vercel/cli-exec/dist/exec.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.0/node_modules/@vercel/cli-exec/dist/fsutils.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.0/node_modules/@vercel/cli-exec/dist/index.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.0/node_modules/@vercel/cli-exec/dist/lookup.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.0/node_modules/@vercel/cli-exec/dist/safety.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.0/node_modules/@vercel/oidc/dist/auth-errors.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.0/node_modules/@vercel/oidc/dist/exchange-vercel-oidc-token.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.0/node_modules/@vercel/oidc/dist/get-context.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.0/node_modules/@vercel/oidc/dist/get-vercel-oidc-token-sync.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.0/node_modules/@vercel/oidc/dist/get-vercel-oidc-token-with-refresh.js +0 -2
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.0/node_modules/@vercel/oidc/dist/index.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.0/node_modules/@vercel/oidc/dist/oauth.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.0/node_modules/@vercel/oidc/dist/token-error.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.0/node_modules/@vercel/oidc/dist/token-io.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.0/node_modules/@vercel/oidc/dist/token-util.js +0 -2
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.0/node_modules/@vercel/oidc/dist/token.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.0/node_modules/@vercel/oidc/dist/verify-vercel-oidc-token.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.0/node_modules/@vercel/oidc/dist/version.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_queue@0.5.1_@opentelemetry_api@1.9.1/node_modules/@vercel/queue/dist/index.js +0 -36
- package/dist/src/node_modules/.pnpm/balanced-match@4.0.4/node_modules/balanced-match/dist/esm/index.js +0 -1
- package/dist/src/node_modules/.pnpm/brace-expansion@5.0.12/node_modules/brace-expansion/dist/esm/index.js +0 -1
- package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js +0 -1
- package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js +0 -1
- package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js +0 -1
- package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js +0 -1
- package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js +0 -1
- package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js +0 -1
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/index.js +0 -1
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/command.js +0 -1
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/error.js +0 -2
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/kill.js +0 -1
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/promise.js +0 -1
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/stdio.js +0 -1
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/stream.js +0 -1
- package/dist/src/node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/buffer-stream.js +0 -1
- package/dist/src/node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/index.js +0 -1
- package/dist/src/node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/core.js +0 -1
- package/dist/src/node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/main.js +0 -1
- package/dist/src/node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/realtime.js +0 -1
- package/dist/src/node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/signals.js +0 -1
- package/dist/src/node_modules/.pnpm/is-stream@2.0.1/node_modules/is-stream/index.js +0 -1
- package/dist/src/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js +0 -1
- package/dist/src/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js +0 -1
- package/dist/src/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/index.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/compact/decrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/compact/encrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/flattened/decrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/flattened/encrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/general/decrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/general/encrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwk/embedded.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwk/thumbprint.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwks/local.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwks/remote.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/compact/sign.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/compact/verify.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/flattened/sign.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/flattened/verify.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/general/sign.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/general/verify.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/decrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/encrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/produce.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/sign.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/unsecured.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/verify.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/key/export.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/key/generate_key_pair.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/key/generate_secret.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/key/import.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/aesgcmkw.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/buffer_utils.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/cek.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/check_iv_length.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/check_key_type.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/check_p2s.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/crypto_key.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/decrypt_key_management.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/encrypt_key_management.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/epoch.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/invalid_key_input.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/is_disjoint.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/is_jwk.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/is_object.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/iv.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/jwt_claims_set.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/private_symbols.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/secs.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/validate_algorithms.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/validate_crit.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/aeskw.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/asn1.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/base64url.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/cbc_tag.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/check_cek_length.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/check_key_length.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/ciphers.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/decrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/digest.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/dsa_digest.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/ecdhes.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/encrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/fetch_jwks.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/generate.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/get_named_curve.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/get_sign_verify_key.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/hmac_digest.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/is_key_like.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/is_key_object.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/jwk_to_key.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/key_to_jwk.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/node_key.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/normalize_key.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/pbes2kw.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/random.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/rsaes.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/runtime.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/sign.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/timing_safe_equal.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/verify.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/webcrypto.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/base64url.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/decode_jwt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/decode_protected_header.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/errors.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/runtime.js +0 -1
- package/dist/src/node_modules/.pnpm/merge-stream@2.0.0/node_modules/merge-stream/index.js +0 -1
- package/dist/src/node_modules/.pnpm/mimic-fn@2.1.0/node_modules/mimic-fn/index.js +0 -1
- package/dist/src/node_modules/.pnpm/minimatch@10.2.6/node_modules/minimatch/dist/esm/assert-valid-pattern.js +0 -1
- package/dist/src/node_modules/.pnpm/minimatch@10.2.6/node_modules/minimatch/dist/esm/ast.js +0 -1
- package/dist/src/node_modules/.pnpm/minimatch@10.2.6/node_modules/minimatch/dist/esm/brace-expressions.js +0 -1
- package/dist/src/node_modules/.pnpm/minimatch@10.2.6/node_modules/minimatch/dist/esm/escape.js +0 -1
- package/dist/src/node_modules/.pnpm/minimatch@10.2.6/node_modules/minimatch/dist/esm/index.js +0 -1
- package/dist/src/node_modules/.pnpm/minimatch@10.2.6/node_modules/minimatch/dist/esm/unescape.js +0 -1
- package/dist/src/node_modules/.pnpm/mixpart@0.0.6/node_modules/mixpart/dist/index.js +0 -7
- package/dist/src/node_modules/.pnpm/npm-run-path@4.0.1/node_modules/npm-run-path/index.js +0 -1
- package/dist/src/node_modules/.pnpm/onetime@5.1.2/node_modules/onetime/index.js +0 -1
- package/dist/src/node_modules/.pnpm/os-paths@4.4.0/node_modules/os-paths/src/lib/index.js +0 -1
- package/dist/src/node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js +0 -1
- package/dist/src/node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js +0 -1
- package/dist/src/node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js +0 -1
- package/dist/src/node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js +0 -1
- package/dist/src/node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js +0 -1
- package/dist/src/node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/signals.js +0 -1
- package/dist/src/node_modules/.pnpm/strip-final-newline@2.0.0/node_modules/strip-final-newline/index.js +0 -2
- package/dist/src/node_modules/.pnpm/which@2.0.2/node_modules/which/which.js +0 -1
- package/dist/src/node_modules/.pnpm/xdg-app-paths@5.5.1/node_modules/xdg-app-paths/src/lib/index.js +0 -1
- package/dist/src/node_modules/.pnpm/xdg-portable@7.3.0/node_modules/xdg-portable/src/lib/index.js +0 -1
- package/dist/src/public/tools/load-skill.d.ts +0 -3
- package/dist/src/public/tools/load-skill.js +0 -1
- package/dist/src/runtime/skills/fragment-context.d.ts +0 -4
- package/dist/src/runtime/skills/fragment-context.js +0 -1
- package/dist/src/tools/framework/connection-tools.d.ts +0 -3
- package/dist/src/tools/framework/connection-tools.js +0 -1
- package/dist/src/tools/provided/load-skill.d.ts +0 -2
- package/dist/src/tools/provided/load-skill.js +0 -1
- /package/dist/src/extensions/{code → git}/extension/lib/github-shell-schema.d.ts +0 -0
- /package/dist/src/extensions/{code → git}/extension/lib/github-shell-schema.js +0 -0
- /package/dist/src/extensions/{code → git}/extension/lib/signed-commit.d.ts +0 -0
- /package/dist/src/extensions/{code → git}/extension/lib/signed-commit.js +0 -0
- /package/dist/src/{runtime/connections/tool-signature.js → tools/signature.js} +0 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `eve__search`: finds catalog entries, the agent's deferred tools and skills
|
|
3
|
+
* and every connection tool, by keyword. It never prompts: a connection whose
|
|
4
|
+
* tools need sign-in is found as its sign-in entry instead. Its definition is
|
|
5
|
+
* fixed for each eve version, so the catalog can change without changing the model's
|
|
6
|
+
* tool list.
|
|
7
|
+
*/
|
|
8
|
+
import type { HarnessToolDefinition } from "#harness/execute-tool.js";
|
|
9
|
+
import type { ConnectionRegistry } from "#runtime/connections/registry-types.js";
|
|
10
|
+
import type { CatalogSkill } from "./skills.js";
|
|
11
|
+
/** What an agent's search can return, from what it declares. */
|
|
12
|
+
export interface SearchReach {
|
|
13
|
+
readonly connections: boolean;
|
|
14
|
+
readonly skills: boolean;
|
|
15
|
+
readonly tools: boolean;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Builds `eve__search` over one step's deferred entries and skills and the
|
|
19
|
+
* connections in `registry`. `describe` returns an entry's description as the
|
|
20
|
+
* model would read it in its tool list.
|
|
21
|
+
*/
|
|
22
|
+
export declare function createSearchTool(input: {
|
|
23
|
+
readonly deferred: readonly HarnessToolDefinition[];
|
|
24
|
+
readonly describe: (definition: HarnessToolDefinition) => string;
|
|
25
|
+
readonly reach: SearchReach;
|
|
26
|
+
readonly registry: ConnectionRegistry | undefined;
|
|
27
|
+
readonly skills: readonly CatalogSkill[];
|
|
28
|
+
}): HarnessToolDefinition;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{completeConnectionSignIn,listConnectionTools,listingFailureMessage}from"./connection-auth.js";import{closestNames,isEmptyQuery,rankCandidates}from"./rank.js";import{connectionToolSignature,entrySignature}from"./signatures.js";import{connectionSignInEntry}from"./connection-entry.js";import{CALL_TOOL_NAME,SEARCH_TOOL_NAME,SKILL_TOOL_NAME}from"#protocol/catalog-tools.js";import{serializeInputSchema,toInputSchema}from"#tools/schema.js";import{connectionToolName}from"#connections/ownership.js";function searchDescription({connections:e,skills:t,tools:n}){return[`Find your own tools, agents, skills, and connected services by keyword; this searches what you can do, not the web.`,n?`A result with \`tool\` has the exact name, description, and TypeScript signature: call it with ${CALL_TOOL_NAME}({ name, input }).`:void 0,t?`A result with \`skill\` has the name and description: load it with ${SKILL_TOOL_NAME}({ name }).`:void 0,`When you already know a name or connection, from the catalog listing, an earlier result, or an error, search it directly: the exact name, or "<connection>__", which is faster and returns only that connection's tools.`,e?`A connection that needs sign-in appears as a tool named after the connection: calling it with ${CALL_TOOL_NAME}({ name }) asks the user to sign in.`:void 0].filter(e=>e!==void 0).join(` `)}const SEARCH_INPUT_SCHEMA=toInputSchema({type:`object`,properties:{query:{type:`string`,minLength:1,description:`Words describing the capability, such as 'list open issues'; an exact name; or a namespace prefix such as 'linear__', which searches only that connection's tools.`},limit:{type:`integer`,minimum:1,maximum:50,description:`Maximum results, best matches first. Defaults to 10.`}},required:[`query`],additionalProperties:!1}),SEARCH_LABEL={start:e=>`Search tools${labelQuery(e)}`,complete:(e,t)=>{let{results:n,unavailable:r=[]}=t,i=`Searched tools${labelQuery(e)}, found ${n.length===0?`nothing`:String(n.length)}`;if(n.length>0||r.length===0)return i;let a=r.length===1?`connection`:`connections`;return`${i}; ${String(r.length)} ${a} unavailable`}};function labelQuery(e){let t=e.query?.trim();return t?` for “${t}”`:``}function createSearchTool(e){return{description:searchDescription(e.reach),execute:t=>search(e,t),frameworkTool:!0,inputSchema:SEARCH_INPUT_SCHEMA,label:SEARCH_LABEL,name:SEARCH_TOOL_NAME}}async function search(e,t){let n=t.query??``;if(isEmptyQuery(n))throw Error(`${SEARCH_TOOL_NAME} needs at least one word in query, such as a capability ("list open issues") or a name or connection prefix ("linear__").`);let r=parseNamespace(n),inScope=e=>r===void 0||inNamespace(e,r),i=[...e.deferred.map(t=>entryCandidate(t,e.describe)),...e.skills.map(skillCandidate)].filter(e=>inScope(e.fullName)),a=[],{registry:o}=e;if(o!==void 0){let e=o.getConnections().filter(({connectionName:e})=>r===void 0||mayOwnNamespace(e,r)),t=await Promise.all(e.map(e=>searchConnection(o,e)));for(let e of t)`unavailable`in e?a.push(e.unavailable):i.push(...e.candidates.filter(e=>inScope(e.fullName)))}if(r!==void 0&&i.length===0&&a.length===0)throw Error(unknownNamespaceMessage(r,o?.getConnections()??[]));let s=clampInteger(t.limit,1,50,10),c=rankCandidates(n,i).slice(0,s).map(e=>e.result());return a.length>0?{results:c,unavailable:a}:{results:c}}function parseNamespace(e){let t=(e.trim().split(/\s+/u)[0]??``).replace(/^[^A-Za-z0-9_-]+/u,``),n=t.slice(0,Math.max(0,t.lastIndexOf(`__`))).replace(/_+$/u,``);return n===``?void 0:n}function inNamespace(e,t){return e===t||e.startsWith(`${t}__`)}function mayOwnNamespace(e,t){return inNamespace(e,t)||t.startsWith(`${e}__`)}function unknownNamespaceMessage(e,t){if(t.some(({connectionName:t})=>t===e))return`Connection "${e}" has no tools.`;let n=closestNames(e,t.map(({connectionName:e,description:t})=>({description:t,name:e})));return`No entries are named "${e}__…". ${n.length>0?`Closest connections: ${n.join(`, `)}.`:`Find names in the catalog listing or your tool list, or call ${SEARCH_TOOL_NAME} with plain words.`}`}async function searchConnection(e,t){let n=t.connectionName,r;try{r=await listConnectionTools(t,await completeConnectionSignIn(e,t))}catch(e){return{unavailable:{connection:n,error:listingFailureMessage(n,e)}}}return`failure`in r?{unavailable:{connection:n,error:r.failure}}:`authorization`in r?{candidates:[signInCandidate(e,t)]}:{candidates:r.tools.map(e=>toolCandidate(t,e))}}function entryCandidate(e,t){let n=serializeInputSchema(e.inputSchema),r=t(e);return{description:r,inputSchema:n,name:e.name,result:()=>({description:r,signature:entrySignature(e,n),tool:e.name}),fullName:e.name}}function skillCandidate({description:e,name:t,path:n}){return{description:e,fullName:t,name:t,result:()=>({description:e,path:n,skill:t})}}function toolCandidate(e,t){let n=connectionToolName(e.connectionName,t.name);return{connection:{description:e.description,name:e.connectionName},description:t.description,inputSchema:t.inputSchema,name:t.name,result:()=>({description:t.description,signature:connectionToolSignature(e,t),tool:n}),fullName:n}}function signInCandidate(e,t){let n=connectionSignInEntry(e,t);return{description:t.description,name:t.connectionName,result:()=>({description:n.description,signature:entrySignature(n),tool:n.name}),fullName:n.name}}function clampInteger(e,t,n,r){return typeof e!=`number`||!Number.isFinite(e)?r:Math.min(n,Math.max(t,Math.trunc(e)))}export{createSearchTool};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** TypeScript signatures for catalog entries, rendered from the schemas each call sees. */
|
|
2
|
+
import type { HarnessToolDefinition } from "#harness/execute-tool.js";
|
|
3
|
+
import type { ResolvedConnectionDefinition } from "#runtime/types.js";
|
|
4
|
+
import type { ConnectionToolMetadata } from "#shared/connection-types.js";
|
|
5
|
+
/**
|
|
6
|
+
* An agent entry's signature, from the schemas the model would see for it.
|
|
7
|
+
* A caller that already converted the input schema passes it in.
|
|
8
|
+
*/
|
|
9
|
+
export declare function entrySignature(definition: HarnessToolDefinition, inputSchema?: import("../../shared/json.ts").JsonObject): string;
|
|
10
|
+
/** A connection tool's signature under its full name. */
|
|
11
|
+
export declare function connectionToolSignature(connection: ResolvedConnectionDefinition, tool: ConnectionToolMetadata): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{serializeInputSchema,serializeOutputSchema}from"#tools/schema.js";import{connectionToolName}from"#connections/ownership.js";import{renderToolSignature}from"#tools/signature.js";function entrySignature(e,t=serializeInputSchema(e.inputSchema)){return renderToolSignature({inputSchema:t,name:e.name,outputSchema:serializeOutputSchema(e.outputSchema)})}function connectionToolSignature(e,t){return renderToolSignature({inputSchema:t.inputSchema,name:connectionToolName(e.connectionName,t.name),outputSchema:t.outputSchema})}export{connectionToolSignature,entrySignature};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skills in the catalog. Every skill the session can see loads through
|
|
3
|
+
* `eve__skill({ name })`, deferred or not. The call resolves to one loader entry
|
|
4
|
+
* whose name sits outside the tool namespace, because skills and tools have
|
|
5
|
+
* separate names.
|
|
6
|
+
*/
|
|
7
|
+
import type { ContextReader } from "#context/key.js";
|
|
8
|
+
import type { HarnessToolDefinition } from "#harness/execute-tool.js";
|
|
9
|
+
/** A skill the session can load. */
|
|
10
|
+
export interface CatalogSkill {
|
|
11
|
+
readonly deferred: boolean;
|
|
12
|
+
readonly description: string;
|
|
13
|
+
/** The instructions loading returns. */
|
|
14
|
+
readonly markdown: string;
|
|
15
|
+
readonly name: string;
|
|
16
|
+
/** The skill's `SKILL.md` under the skills root, when it has package files. */
|
|
17
|
+
readonly path?: string;
|
|
18
|
+
}
|
|
19
|
+
/** The session's skills by name; a dynamic skill overrides a same-named authored one. */
|
|
20
|
+
export declare function sessionSkills(ctx: ContextReader | undefined): ReadonlyMap<string, CatalogSkill>;
|
|
21
|
+
/** The entry every `eve__skill` call resolves to, with the call's own `{ name }` input. */
|
|
22
|
+
export declare function createSkillLoader(skills: ReadonlyMap<string, CatalogSkill>): HarnessToolDefinition;
|
|
23
|
+
/** Why `eve__skill` can't load `name`: the closest skills, or the connection it names. */
|
|
24
|
+
export declare function unknownSkillMessage(name: string, skills: ReadonlyMap<string, CatalogSkill>, connections: readonly string[], searchable: boolean): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{closestNames}from"./rank.js";import{DynamicSkillManifestKey}from"#context/keys.js";import{skillTarget}from"#shared/action-request-name.js";import{SEARCH_TOOL_NAME,SKILL_ENTRY_NAME}from"#protocol/catalog-tools.js";import{toInputSchema}from"#tools/schema.js";import{stripSkillFrontmatter}from"#shared/skill-package.js";import{BundleKey}from"#runtime/sessions/runtime-context-keys.js";import{skillFilePath}from"#execution/skills/instructions.js";function sessionSkills(e){let t=new Map;for(let n of e?.get(BundleKey)?.resolvedAgent.skills??[])t.set(n.name,{deferred:n.deferred===!0,description:n.description,markdown:n.markdown,name:n.name,path:skillFilePath(n.name)});for(let n of Object.values(e?.get(DynamicSkillManifestKey)??{}).flat())t.set(n.name,{deferred:n.deferred===!0,description:n.description,markdown:stripSkillFrontmatter(n.markdown),name:n.name,path:n.revision===void 0?void 0:skillFilePath(n.name)});return t}const SKILL_LOAD_LABEL={start:e=>`Load skill${skillName(e)}`,complete:e=>`Loaded skill${skillName(e)}`};function skillName(e){let t=skillTarget(e);return t===void 0?``:` ${t}`}function createSkillLoader(e){return{description:`Loads a skill's instructions.`,execute:t=>{let n=e.get(t.name);if(n===void 0)throw Error(`No skill named "${t.name}".`);return n.markdown},frameworkTool:!0,inputSchema:SKILL_INPUT_SCHEMA,label:SKILL_LOAD_LABEL,name:SKILL_ENTRY_NAME}}function unknownSkillMessage(e,t,n,r){let i=closestNames(e,[...t.values()]),a=i.length>0?` Closest skills: ${i.join(`, `)}.`:r?` Find skills with ${SEARCH_TOOL_NAME}.`:``,o=n.find(t=>t.toLowerCase()===e.toLowerCase());return`No skill named "${e}".${a}${o===void 0?``:` "${o}" is a connection, not a skill. Find its tools with ${SEARCH_TOOL_NAME}({ query: "${o}__" }).`}`}const SKILL_INPUT_SCHEMA=toInputSchema({type:`object`,properties:{name:{type:`string`}},required:[`name`],additionalProperties:!1});export{createSkillLoader,sessionSkills,unknownSkillMessage};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The step's catalog: one table of every entry a model step can reach. Direct
|
|
3
|
+
* entries go into the model's tool list next to the catalog tools the agent
|
|
4
|
+
* has: `eve__search` finds entries, `eve__tool` calls deferred entries and
|
|
5
|
+
* connection tools, and `eve__skill` loads skills. A call resolves to its entry
|
|
6
|
+
* here and then runs exactly as a direct call would, so only model history
|
|
7
|
+
* ever names a catalog tool.
|
|
8
|
+
*/
|
|
9
|
+
import type { ContextReader } from "#context/key.js";
|
|
10
|
+
import type { HarnessToolDefinition } from "#harness/execute-tool.js";
|
|
11
|
+
import type { CallResolver, HarnessSession, HarnessToolLookup, HarnessToolMap } from "#harness/types.js";
|
|
12
|
+
import type { ResolvedConnectionDefinition } from "#runtime/types.js";
|
|
13
|
+
import { type CatalogSkill } from "./skills.js";
|
|
14
|
+
export interface StepCatalog extends HarnessToolLookup {
|
|
15
|
+
/** The model's tool list: direct entries, then the catalog tools the agent has. */
|
|
16
|
+
readonly advertised: HarnessToolMap;
|
|
17
|
+
readonly connections: readonly ResolvedConnectionDefinition[];
|
|
18
|
+
/** Entries reached only through `eve__tool`, connection tools aside. */
|
|
19
|
+
readonly deferred: HarnessToolMap;
|
|
20
|
+
/** Every direct and deferred entry the session sees, connection tools aside. */
|
|
21
|
+
readonly entries: HarnessToolMap;
|
|
22
|
+
/** Every skill the session can load, deferred or not. */
|
|
23
|
+
readonly skills: ReadonlyMap<string, CatalogSkill>;
|
|
24
|
+
/**
|
|
25
|
+
* Whether the session offers tasks: one of the agent's own tools it sees
|
|
26
|
+
* starts them, or the agent resolves subagents at runtime. Both are fixed by
|
|
27
|
+
* the deployment, so the task tools and system block change only on upgrade.
|
|
28
|
+
*/
|
|
29
|
+
readonly offersTasks: boolean;
|
|
30
|
+
/** An entry's description as the model reads it, with the notes eve appends. */
|
|
31
|
+
describe(definition: HarnessToolDefinition): string;
|
|
32
|
+
/**
|
|
33
|
+
* Resolves a model tool call to the entry it runs. An `eve__tool` call that
|
|
34
|
+
* names an entry `callableByName` accepts becomes the call to that entry, and
|
|
35
|
+
* an `eve__skill` call becomes the call to load its skill; any other call runs
|
|
36
|
+
* the listed tool it names. A call that reaches none of these resolves to
|
|
37
|
+
* nothing.
|
|
38
|
+
*/
|
|
39
|
+
readonly resolve: CallResolver;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Builds the catalog for one step from the agent's tools, the dynamic tools and
|
|
43
|
+
* subagents resolved for it, and its skills, keeping only what the session sees.
|
|
44
|
+
*/
|
|
45
|
+
export declare function buildStepCatalog(input: {
|
|
46
|
+
readonly agentTools: HarnessToolMap;
|
|
47
|
+
readonly ctx: ContextReader | undefined;
|
|
48
|
+
/** Whether `endsTurn` applies: a root turn without an output schema. */
|
|
49
|
+
readonly endsTurn: boolean;
|
|
50
|
+
readonly session: Pick<HarnessSession, "rootSessionId">;
|
|
51
|
+
}): StepCatalog;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{closestNames}from"./rank.js";import{entrySignature}from"./signatures.js";import{connectionEntry,connectionSignInEntry}from"./connection-entry.js";import{createSearchTool}from"./search.js";import{createSkillLoader,sessionSkills,unknownSkillMessage}from"./skills.js";import{isObject}from"#shared/guards.js";import{CALL_TOOL_NAME,SEARCH_TOOL_NAME,SKILL_ENTRY_NAME,SKILL_TOOL_NAME}from"#protocol/catalog-tools.js";import{refineJsonSchema}from"#tools/schema.js";import{connectionToolName}from"#connections/ownership.js";import{eveNamespaceReservation}from"#protocol/runtime-tools.js";import{buildDynamicTools}from"#context/build-dynamic-tools.js";import{ConnectionRegistryKey}from"#context/providers/connection-key.js";import{BundleKey}from"#runtime/sessions/runtime-context-keys.js";import{startsTasks}from"#execution/tasks/tool-entry-point.js";import{buildDynamicSubagentTools}from"#context/dynamic-subagent-lifecycle.js";import{withTaskTools}from"#execution/tasks/model-step.js";import{runEntryCall}from"#harness/execute-call.js";import{checkToolCallInput}from"#harness/tool-call-io.js";const CALL_TOOL_DESCRIPTION=`Call a tool that isn't in your tool list by its exact name from ${SEARCH_TOOL_NAME}, with \`input\` matching its signature.`,SEARCHABLE_SKILL_DESCRIPTION=`Load a skill's instructions when the request clearly matches a listed skill or one ${SEARCH_TOOL_NAME} found, or the user asks for it, then follow them.`;function catalogToolsFor(e,t){let n=t?.resolvedAgent,r=n?.skills??[],i=(n?.dynamicSkillResolvers.length??0)>0,a=(n?.connections??[]).length>0||(n?.dynamicConnectionResolvers?.length??0)>0,o=i||r.some(e=>e.deferred===!0),s=a||e.some(e=>e.deferred===!0)||(n?.dynamicToolResolvers.length??0)>0||(t?.subagentRegistry.dynamicResolvers.length??0)>0;return{connections:a,search:s||o,searchableSkills:o,skills:r.length>0||i,tools:s}}function buildStepCatalog(e){let visible=t=>isVisible(t,e.session),t=e.ctx?.get(BundleKey),n=catalogToolsFor([...e.agentTools.values()].filter(visible),t),r=(t?.subagentRegistry.dynamicResolvers.length??0)>0||[...e.agentTools.values()].some(e=>visible(e)&&startsTasks(e)),i=stepEntries(e,visible),a=r?withTaskTools(i):i,o=new Map,s=new Map;for(let[e,t]of a)(t.deferred===!0?s:o).set(e,t);let c=e.ctx?.get(ConnectionRegistryKey),l=c?.getConnections()??[],u=sessionSkills(e.ctx),d=createSkillLoader(u),f=new Map(o),toolEntry=e=>a.get(e)??f.get(e)??(c===void 0?void 0:connectionEntryNamed(e,c,l)),describe=t=>describeEntry(t,e.endsTurn),p={advertised:f,connections:l,deferred:s,describe,entries:a,get:e=>e===SKILL_ENTRY_NAME?d:toolEntry(e),offersTasks:r,resolve:e=>{if(e.toolName===CALL_TOOL_NAME&&n.tools){let t=targetName(e.input),n=t===void 0?void 0:toolEntry(t);return t===void 0||n===void 0||!callableByName(n)?void 0:{call:asEntryCall(e,t),definition:n}}if(e.toolName===SKILL_TOOL_NAME&&n.skills){let t=targetName(e.input);return t===void 0||!u.has(t)?void 0:{call:{...e,input:{name:t},toolName:SKILL_ENTRY_NAME},definition:d}}let t=f.get(e.toolName);return t===void 0?void 0:{call:e,definition:t}},skills:u};if(n.search){let e=createSearchTool({deferred:[...s.values()],describe,reach:{connections:n.connections,skills:n.searchableSkills,tools:n.tools},registry:c,skills:[...u.values()].filter(e=>e.deferred)});f.set(e.name,e)}return n.tools&&f.set(CALL_TOOL_NAME,createCallTool(p,toolEntry,n)),n.skills&&f.set(SKILL_TOOL_NAME,createSkillTool(p,toolEntry,n)),p}function targetName(e){return isObject(e)&&typeof e.name==`string`?e.name:void 0}function asEntryCall(e,t){let n=e.input.input;return{...e,input:n??{},toolName:t}}function describeEntry(e,t){return t&&e.endsTurn===!0?`${e.description}\n\nCalling this tool ends your turn once it succeeds: do not write a reply or call other tools in the same step. If it fails, you will see the error and can continue.`.trimStart():e.description}function stepEntries(e,t){let n=new Map([...e.agentTools].filter(([,e])=>t(e)));if(e.ctx===void 0)return n;for(let r of buildDynamicSubagentTools(e.ctx).filter(t))n.set(r.name,r);let r=new Set;for(let i of buildDynamicTools(e.ctx).filter(t))r.has(i.name)||(r.add(i.name),n.set(i.name,i));return n}function isVisible(e,t){return e.rootOnly!==!0&&e.availableInSubagents!==!1&&e.behavior?.availability.includes(`root-session`)!==!0||t.rootSessionId===void 0}function connectionEntryNamed(e,t,n){for(let r of n){if(e===r.connectionName)return connectionSignInEntry(t,r);let n=connectionToolName(r.connectionName,``);if(e.length>n.length&&e.startsWith(n))return connectionEntry(t,r,e.slice(n.length))}}function createCallTool(e,t,n){return{description:n.connections?`${CALL_TOOL_DESCRIPTION} Prefer connected services over web search or general knowledge when a request relates to them.`:CALL_TOOL_DESCRIPTION,execute:(t,n)=>runResolved(e,{input:t,toolName:CALL_TOOL_NAME},n),frameworkTool:!0,inputSchema:refineJsonSchema({type:`object`,properties:{name:{type:`string`,description:`The tool's exact name, as ${SEARCH_TOOL_NAME} returns it.`},input:{type:`object`,description:`Arguments matching the tool's signature. Defaults to {}.`}},required:[`name`],additionalProperties:!1},n=>resolveToolInput(e,t,n)),name:CALL_TOOL_NAME}}function createSkillTool(e,t,n){return{description:n.searchableSkills?SEARCHABLE_SKILL_DESCRIPTION:`Load a skill's instructions when the request clearly matches one of your listed skills or the user asks for it, then follow them.`,execute:(t,n)=>runResolved(e,{input:t,toolName:SKILL_TOOL_NAME},n),frameworkTool:!0,inputSchema:refineJsonSchema({type:`object`,properties:{name:{type:`string`,description:n.searchableSkills?`The skill's name, from your listed skills or ${SEARCH_TOOL_NAME}.`:`The skill's name, from your listed skills.`}},required:[`name`],additionalProperties:!1},async r=>resolveSkillInput(e,t,r.name,n)),name:SKILL_TOOL_NAME}}function runResolved(e,t,n){let r=e.resolve(t);if(r===void 0)throw Error(`A ${t.toolName} call ran without a resolved entry.`);return runEntryCall(r,n)}function callableByName(e){return e.deferred===!0||eveNamespaceReservation(e.name)===void 0&&(e.execute!==void 0||e.workflowId!==void 0)}async function resolveToolInput(e,t,{input:n,name:r}){let i=t(r);if(i===void 0)return failure(`name`,unknownEntryMessage(r,e));if(!callableByName(i))return failure(`name`,`"${r}" is in your tool list; call it directly.`);let a=await checkToolCallInput(i,n,``);if(a.kind===`threw`)throw a.error;return a.kind===`invalid`?{issues:(isConnectionTool(r,e.connections)?a.issues:[...a.issues,{message:`Signature: ${entrySignature(i)}`}]).map(({message:e,path:t=[]})=>({message:e,path:[`input`,...t]}))}:{value:{input:a.value,name:r}}}function resolveSkillInput(e,t,n,r){if(e.skills.has(n))return{value:{name:n}};let i=e.connections.map(e=>e.connectionName),a=i.includes(n)?void 0:t(n);return a===void 0?failure(`name`,unknownSkillMessage(n,e.skills,i,r.searchableSkills)):failure(`name`,a.deferred===!0?`"${n}" is a tool, not a skill; call it with ${CALL_TOOL_NAME}({ name: "${n}" }).`:`"${n}" is a tool in your tool list, not a skill; call it directly.`)}function isConnectionTool(e,t){return t.some(({connectionName:t})=>e.startsWith(connectionToolName(t,``)))}function failure(e,t){return{issues:[{message:t,path:[e]}]}}function unknownEntryMessage(e,t){if(t.skills.has(e))return`"${e}" is a skill; load it with ${SKILL_TOOL_NAME}({ name: "${e}" }).`;let n=[...t.deferred.values()].map(({description:e,name:t})=>({description:e,name:t})),r=closestNames(e,n);return`No tool named "${e}".${r.length>0?` Closest tools: ${r.join(`, `)}.`:` Find tools with ${SEARCH_TOOL_NAME}.`}`}export{buildStepCatalog};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ConversationContextKey}from"#shared/conversation-context.js";import"#channel/adapter.js";import"#context/container.js";import{AuthKey,CapabilitiesKey,ChannelInstrumentationKey,InitiatorAuthKey,LocalDevRequestKey,ParentSessionKey,TraceRootKey}from"#context/keys.js";import{BundleKey,ChannelKey}from"#runtime/sessions/runtime-context-keys.js";import{activeTurnId,runtimeWait,storedProjection,turnPosition}from"#harness/session-machine/view.js";import"#subagents/tool.js";import{readDurableSession}from"#execution/durable-session-store.js";import{deserializeContext}from"#context/serialize.js";import{buildAdapterContext}from"#channel/adapter-context.js";import{assertUniqueCoordinationCallIds}from"#harness/coordination.js";import{resolveTraceRootSessionId}from"#shared/trace-root.js";import{hydrateDurableSession}from"#execution/session.js";import{resolveEffectiveAgentRuntime}from"#execution/effective-agent-config.js";import{resolveWorkflowAgentMetadata}from"#execution/agent-sessions/metadata.js";
|
|
1
|
+
import{ConversationContextKey}from"#shared/conversation-context.js";import"#channel/adapter.js";import"#context/container.js";import{AuthKey,CapabilitiesKey,ChannelInstrumentationKey,InitiatorAuthKey,LocalDevRequestKey,ParentSessionKey,TraceRootKey}from"#context/keys.js";import{BundleKey,ChannelKey}from"#runtime/sessions/runtime-context-keys.js";import{activeTurnId,runtimeWait,storedProjection,turnPosition}from"#harness/session-machine/view.js";import"#subagents/tool.js";import{readDurableSession}from"#execution/durable-session-store.js";import{deserializeContext}from"#context/serialize.js";import{readDynamicSubagentSelections}from"#context/dynamic-subagent-lifecycle.js";import{buildAdapterContext}from"#channel/adapter-context.js";import{assertUniqueCoordinationCallIds}from"#harness/coordination.js";import{resolveTraceRootSessionId}from"#shared/trace-root.js";import{hydrateDurableSession}from"#execution/session.js";import{resolveEffectiveAgentRuntime}from"#execution/effective-agent-config.js";import{resolveWorkflowAgentMetadata}from"#execution/agent-sessions/metadata.js";async function prepareCoordinationDispatch(e){let t=readDurableSession(e.sessionState),n=runtimeWait(t.state);if(n===void 0)return;let r=n.tasks;if(r.length===0)return;let i=n.event.turnId||activeTurnId(turnPosition(storedProjection(t.state))),a=await deserializeContext(e.serializedContext);return{...await prepareActionDispatch({batch:{approvers:n.approvers,event:{...n.event,turnId:i},requests:r},ctx:a,durableSession:t,plan:()=>r,serializedContext:e.serializedContext}),sessionState:e.sessionState}}async function prepareActionDispatch(e){let{batch:t,durableSession:n}=e;assertUniqueCoordinationCallIds(t.requests);let r=e.ctx,i=r.require(BundleKey),a=resolveEffectiveAgentRuntime(i,r),o=hydrateDurableSession({compactionOverrides:{thresholdPercent:a.thresholdPercent},durable:n,turnAgent:a.turnAgent}),s=r.require(ChannelKey),c=e.plan({bundle:i,ctx:r,requests:t.requests,session:o}),l=resolveActiveSandboxSessionId(s.state,o.sessionId);return{adapter:s,adapterCtx:buildAdapterContext(s,r),auth:r.get(AuthKey)??null,batch:t,bundle:i,capabilities:r.get(CapabilitiesKey),channelMetadata:r.get(ChannelInstrumentationKey),dynamicSubagentSelections:readDynamicSubagentSelections(r),inheritedConversation:r.get(ConversationContextKey),initiatorAuth:r.get(InitiatorAuthKey)??null,localDevRequest:r.get(LocalDevRequestKey),parentSession:r.get(ParentSessionKey),plan:c,sandboxSessionId:l,serializedContext:e.serializedContext,session:o,traceRoot:childTraceRoot(r,o.sessionId),workflowAgents:resolveWorkflowAgentMetadata(r)}}function childTraceRoot(e,t){if(e.get(TraceRootKey)!==void 0)return{kind:`inherited`,sessionId:resolveTraceRootSessionId(e,t)}}function resolveActiveSandboxSessionId(e,t){if(typeof e!=`object`||!e)return t;let n=e.sandboxSessionId;return typeof n==`string`&&n.length>0?n:t}export{prepareActionDispatch,prepareCoordinationDispatch};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{dispatchDynamicConnectionEvent}from"#context/dynamic-connection-lifecycle.js";import{
|
|
1
|
+
import{dispatchDynamicConnectionEvent}from"#context/dynamic-connection-lifecycle.js";import{sessionStartedForResolvers,turnStartedForResolvers}from"#harness/session-machine/resolver-events.js";function bindDynamicConnections(e,t){let n=t.dynamicConnectionResolvers??[],dispatch=async t=>{await dispatchDynamicConnectionEvent({ctx:e,event:t,resolvers:n})};return{dispatch,async rehydrate(e,t,n){e.sessionStarted&&(await dispatch(sessionStartedForResolvers(t)),n!==void 0&&await dispatch(turnStartedForResolvers(n)))}}}export{bindDynamicConnections};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{runJsProgram}from"#execution/dynamic-workflow/workflow.js";async function runWorkflowProgramTask(e,t){"use workflow";return runJsProgram(e.js,t,{maxSubagents:e.maxSubagents??0})}runWorkflowProgramTask.workflowId=`workflow//eve@0.
|
|
1
|
+
import{runJsProgram}from"#execution/dynamic-workflow/workflow.js";async function runWorkflowProgramTask(e,t){"use workflow";return runJsProgram(e.js,t,{maxSubagents:e.maxSubagents??0})}runWorkflowProgramTask.workflowId=`workflow//eve@0.76.0//runWorkflowProgramTask`;export{runWorkflowProgramTask};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createLogger,logError}from"#internal/logging.js";import{compiledToolOwner,isInvocableCompiledTool}from"#channel/tool-eligibility.js";import{ContextContainer,contextStorage}from"#context/container.js";import{AuthKey,InitiatorAuthKey,SandboxKey,SessionIdKey,SessionKey}from"#context/keys.js";import{toErrorMessage}from"#shared/errors.js";import{buildCallbackContext}from"#context/build-callback-context.js";import{BundleKey}from"#runtime/sessions/runtime-context-keys.js";import{resolveApprovalPolicy}from"#approval/definition.js";import{ensureSandboxAccess}from"#execution/sandbox/ensure.js";import{
|
|
1
|
+
import{createLogger,logError}from"#internal/logging.js";import{compiledToolOwner,isInvocableCompiledTool}from"#channel/tool-eligibility.js";import{ContextContainer,contextStorage}from"#context/container.js";import{AuthKey,InitiatorAuthKey,SandboxKey,SessionIdKey,SessionKey}from"#context/keys.js";import{toErrorMessage}from"#shared/errors.js";import{buildCallbackContext}from"#context/build-callback-context.js";import{BundleKey}from"#runtime/sessions/runtime-context-keys.js";import{resolveApprovalPolicy}from"#approval/definition.js";import{ensureSandboxAccess}from"#execution/sandbox/ensure.js";import{isConnectionAuthorizationFailedError}from"#connections/errors.js";import{AuthorizationHookKey,CallbackBaseUrlKey,isAuthorizationSignal,modelFacingAuthorizationOutput}from"#harness/authorization.js";import{checkToolCallInput,toolCallModelOutput}from"#harness/tool-call-io.js";import{context,trace}from"#compiled/@opentelemetry/api/index.js";import{isAnonymousPrincipal}from"#channel/principal-identity.js";import{deriveToolSessionId,validateToolSessionKey}from"#execution/tool-session/id.js";import{ToolSessionSandboxUnsupportedError,assertToolSessionSandboxSupport,releaseToolSessionHandle}from"#execution/tool-session/sandbox.js";import{normalizeToolJsonOutput}from"#harness/tool-model-output.js";import{isAsyncIterable}from"#shared/async-iterable.js";import{createUlid}from"#shared/ulid.js";import{withInvokeToolSpan}from"#tracing/invoke-tool-span.js";const log=createLogger(`invoke-tool`);function ineligibility(e,t){if(!isInvocableCompiledTool(e,t))return compiledToolOwner(e,t).kind===`framework`?`it is a framework tool, which needs a conversation`:t.behavior?.handling===void 0?`it has no server-side execute`:`the harness or the model provider runs it, not its execute`}async function invokeTool(e,t,n,r){let i=e.manifest.tools.find(e=>e.name===t),a=e.tools.get(t);if(i===void 0||a===void 0)return failed(`The agent has no tool named "${t}".`);let o=ineligibility(e.manifest,i)??(a.execute===void 0?`it has no server-side execute`:void 0);if(o!==void 0)return failed(`Tool "${t}" cannot be invoked outside a conversation: ${o}.`);let s=r.key,c=s===void 0?void 0:validateToolSessionKey(s);if(c!==void 0)return{message:c,status:`invalid-input`};if(s!==void 0&&isAnonymousPrincipal(r.auth))return denied(`Tool sessions need an authenticated caller: an anonymous caller cannot send a key. Call without a key for a one-off session.`);let l=`call_${createUlid()}`,u=`call_session_${createUlid()}`,d=s===void 0?u:deriveToolSessionId({current:r.auth,forwardedBy:r.forwardedBy,key:s});return await withInvokeToolSpan({agentName:e.agentName,auth:r.auth,callId:l,origin:e.origin,sessionId:u,toolName:t},i=>runInvocation({callId:l,definition:a,input:n,name:t,observer:i,options:r,runtime:e,sessionId:d}))}async function runInvocation(e){let{callId:t,definition:n,name:r,observer:i,options:a,runtime:o,sessionId:s}=e,c=await checkToolCallInput(n,e.input,t);if(c.kind===`threw`)return i.failedWith(c.error),failedFromError(c.error,r,`input validation failed`);if(c.kind===`invalid`)return{message:c.message,status:`invalid-input`};let l=a.key===void 0?await callSandbox(o,s):await keyedSandbox(o,s),u=createCallContext({auth:a.auth,initiator:a.initiator??a.auth,callId:t,callbackBaseUrl:o.callbackBaseUrl,sessionId:s});u.setVirtualContext(SandboxKey,l.access),o.bundle!==void 0&&u.setVirtualContext(BundleKey,o.bundle);try{return await contextStorage.run(u,()=>runCall({callId:t,definition:n,input:c.value,observer:i,signal:a.signal}))}finally{await l.release().catch(e=>{logError(log,`failed to release a call's sandbox`,e,{sessionId:s,toolName:r})})}}async function keyedSandbox(e,t){let n=await ensureSandboxAccess({compiledArtifactsSource:e.compiledArtifactsSource,nodeId:e.nodeId,ownsSandbox:!1,registry:e.sandboxRegistry,sessionId:t,state:null});return{access:{...n,async get(){return assertToolSessionSandboxSupport(e.sandboxRegistry),await n.get()}},async release(){let t=await n.detach();t!==void 0&&await releaseToolSessionHandle(e.sandboxRegistry,t)}}}async function callSandbox(e,t){let n=await ensureSandboxAccess({compiledArtifactsSource:e.compiledArtifactsSource,nodeId:e.nodeId,ownsSandbox:!0,registry:e.sandboxRegistry,sessionId:t,state:null}),r;return{access:{...n,get(){let e=n.get();return r=e,e}},async release(){r!==void 0&&await r.catch(()=>null)!==null&&await n.delete?.()}}}function createCallContext(e){let t=new ContextContainer;return t.set(AuthKey,e.auth),t.set(InitiatorAuthKey,e.initiator),t.set(SessionIdKey,e.sessionId),t.setVirtualContext(SessionKey,{auth:{current:e.auth,initiator:e.initiator},sessionId:e.sessionId,turn:{id:e.callId,sequence:0}}),t.set(CallbackBaseUrlKey,e.callbackBaseUrl.replace(/\/$/,``)),t.setVirtualContext(AuthorizationHookKey,`invoke-tool:${e.callId}`),t}async function runCall(e){let{callId:t,definition:n,observer:r}=e,i=e.signal??new AbortController().signal;if(n.approval!==void 0){let a;try{a=await resolveApprovalPolicy(n.approval)({...buildCallbackContext(),abortSignal:i,approvedTools:new Set,callId:t,toolInput:e.input,toolName:n.name})}catch(e){return r.failedWith(e),failedFromError(e,n.name,`approval policy failed`)}let o=decideApproval(a);if(o.kind===`denied`)return denied(o.reason);if(o.kind===`user-approval`)return{status:`approval-required`}}let a={abortSignal:i,messages:[],toolCallId:t};await r.executing(e.input);let o,s,c=!1,l=performance.now(),elapsed=()=>performance.now()-l,u;try{o=await n.execute(e.input,a),isAsyncIterable(o)&&(o=await lastIterated(o)),c=!0,isAuthorizationSignal(o)||(s=normalizeToolJsonOutput({boundary:`execute`,output:o,toolCallId:t,toolName:n.name})),u=elapsed()}catch(e){return await r.executed({durationMs:elapsed(),error:e,type:`error`}),r.failedWith(e),c?failedFromError(e,n.name,`tool output could not be serialized`):isConnectionAuthorizationFailedError(e)||e instanceof ToolSessionSandboxUnsupportedError?failed(toErrorMessage(e)):failedFromError(e,n.name,`tool execution failed`)}if(isAuthorizationSignal(o))return await r.executed({durationMs:u,output:modelFacingAuthorizationOutput(o),type:`result`}),{connections:o.challenges.map(e=>e.name),status:`authorization-required`};await r.executed({durationMs:u,output:s,type:`result`});try{return{modelOutput:await toolCallModelOutput(n,s,t),output:s,status:`completed`}}catch(e){return r.failedWith(e),failedFromError(e,n.name,`tool output could not be serialized`)}}function decideApproval(e){if(e===!0||e===`user-approval`)return{kind:`user-approval`};if(e===`denied`)return{kind:`denied`};if(typeof e==`object`&&e){if(e.type===`user-approval`)return{kind:`user-approval`};if(e.type===`denied`)return{kind:`denied`,reason:e.reason}}return{kind:`run`}}async function lastIterated(e){let t;for await(let n of e)t=n;return t}function denied(e){return e===void 0?{status:`denied`}:{reason:e,status:`denied`}}function failed(e){return{message:e,status:`failed`}}function failedFromError(e,t,n){let r=context.with(trace.deleteSpan(context.active()),()=>logError(log,`invokeTool ${n}`,e,{toolName:t}));return{errorId:r,message:`Tool "${t}" failed: ${n}. The error is logged with id ${r}.`,status:`failed`}}export{invokeTool};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createLogger}from"#internal/logging.js";import{resolveInstalledPackageInfo}from"#internal/application/package.js";import{UNSPECIFIED_INPUT_SCHEMA}from"#tools/schema.js";import{createToolExecuteWithAuth}from"#execution/tool-auth.js";import{resolveRuntimeModelReference}from"#runtime/agent/resolve-model.js";import{createPreparedWorkflowToolHarnessDefinition,createWorkflowToolHarnessDefinition}from"#execution/tools/workflow/harness-definition.js";import{isFrameworkTool}from"#tools/provided/framework-tool.js";import{
|
|
1
|
+
import{createLogger}from"#internal/logging.js";import{resolveInstalledPackageInfo}from"#internal/application/package.js";import{UNSPECIFIED_INPUT_SCHEMA}from"#tools/schema.js";import{createToolExecuteWithAuth}from"#execution/tool-auth.js";import{resolveRuntimeModelReference}from"#runtime/agent/resolve-model.js";import{createPreparedWorkflowToolHarnessDefinition,createWorkflowToolHarnessDefinition}from"#execution/tools/workflow/harness-definition.js";import{isFrameworkTool}from"#tools/provided/framework-tool.js";import{workflowIdForHandling}from"#runtime/subagents/workflow-reference.js";import{dispatchDynamicModelEvent}from"#context/dynamic-model-lifecycle.js";import{preparePersistedStepDynamicToolMetadata}from"#context/dynamic-tool-lifecycle.js";import{createToolLoopHarness}from"#harness/tool-loop.js";import{findRegisteredRuntimeTool}from"#runtime/tools/registry.js";import{WEB_SEARCH_TOOL_NAME,resolveWebSearchActivityLabel}from"#harness/provider-tool-schemas.js";const log=createLogger(`execution.node-step`);function createExecutionNodeStep(e){let t=createRuntimeModelResolver(e.modelResolutionScope),n=e.node.turnAgent.dynamicModel===void 0?void 0:createRuntimeDynamicModelEventDispatcher(e.modelResolutionScope,e.node.turnAgent.dynamicModel,e.abortSignal),r=createNodeHarnessTools({node:e.node}),i=e.instrumentation,a=i?.prepareExecution(),o=createToolLoopHarness({steeringSignal:e.steeringSignal,abortSignal:e.abortSignal,capabilities:e.capabilities,clearOnly:e.clearOnly,compactOnly:e.compactOnly,handleEvent:e.handleEvent,historyProjector:e.historyProjector,historyView:e.historyView,instrumentation:a,prepareApprovalTurn:e.prepareApprovalTurn,signInCompletions:e.signInCompletions,resolveStepDynamicTools:t=>preparePersistedStepDynamicToolMetadata({...t,resolvers:e.node.agent.dynamicToolResolvers??[]}),dispatchDynamicModelEvent:n,resolveModel:t,runtimeIdentity:buildRuntimeIdentity(e.node),tools:r,titleAttributeWrite:e.titleAttributeWrite});return i===void 0?o:async(e,t)=>{try{return await o(e,t)}finally{await i.flush()}}}function buildRuntimeIdentity(e){let t=resolveInstalledPackageInfo(),n={agentId:e.turnAgent.id,agentName:e.agent.config?.name,eveVersion:t.version},r=process.env.VERCEL_GIT_COMMIT_SHA?.trim(),i=process.env.VERCEL_GIT_COMMIT_REF?.trim(),a=process.env.VERCEL_DEPLOYMENT_CREATED_AT?.trim();return r||i||a?{...n,build:{deployedAt:a||void 0,gitBranch:i||void 0,gitSha:r||void 0}}:n}function createRuntimeModelResolver(e){return t=>resolveRuntimeModelReference(t,e)}function createRuntimeDynamicModelEventDispatcher(e,t,n){return r=>dispatchDynamicModelEvent({abortSignal:n,ctx:r.ctx,dynamicModel:t,event:r.event,messages:r.messages,scope:e})}function createNodeHarnessTools(e){let t=new Map;for(let n of e.node.turnAgent.tools){let r=resolveHarnessToolDefinition({node:e.node,tool:n});r!==null&&t.set(n.name,r)}return t}function resolveHarnessToolDefinition(e){let t=findRegisteredRuntimeTool(e.node.toolRegistry,e.tool.name),n=workflowIdForHandling(e.tool.behavior?.handling);return n===void 0?t===null?(log.warn(`declared tool is not registered — omitting from toolset`,{toolName:e.tool.name,nodeId:e.node.nodeId}),null):createRegisteredHarnessToolDefinition({behavior:e.tool.behavior,definition:t.definition,rootOnly:e.tool.rootOnly}):t===null?createPreparedWorkflowToolHarnessDefinition(e.tool):createWorkflowToolHarnessDefinition({executeInput:t.definition.executeInput,definition:createRegisteredHarnessToolDefinition({behavior:e.tool.behavior,definition:t.definition,rootOnly:e.tool.rootOnly}),workflowId:n})}function createRegisteredHarnessToolDefinition(e){let t=e.definition,n=t.execute;return{availableInSubagents:t.availableInSubagents,label:t.label??(t.owner.kind===`framework`&&t.name===WEB_SEARCH_TOOL_NAME?{start:resolveWebSearchActivityLabel}:void 0),approvalKey:t.approvalKey,behavior:e.behavior,deferred:t.deferred,description:t.description,endsTurn:t.endsTurn,executeInput:t.executeInput,execute:resolveAuthoredExecute({rawExecute:n,scope:t.name}),frameworkTool:isFrameworkTool(t)||t.owner.kind===`framework`,inputSchema:t.inputSchema??UNSPECIFIED_INPUT_SCHEMA,name:t.name,approval:t.approval,outputSchema:t.outputSchema,rootOnly:e.rootOnly,toModelOutput:t.toModelOutput}}function resolveAuthoredExecute(e){let{rawExecute:t,scope:n}=e;return t===void 0?void 0:createToolExecuteWithAuth({execute:t,scope:n})}export{buildRuntimeIdentity,createExecutionNodeStep,createNodeHarnessTools};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{openSignIns}from"#protocol/session-projection.js";import{runtimeWait}from"#harness/session-machine/view.js";import{
|
|
1
|
+
import{openSignIns}from"#protocol/session-projection.js";import{runtimeWait}from"#harness/session-machine/view.js";import{getPendingAuthorization}from"#harness/authorization.js";import{sessionView}from"#harness/session-machine/commit.js";import{ownOpenRequestIds}from"#harness/session-machine/transitions.js";function derivePendingState(e,t){let n={authorizationAttemptIds:getPendingAuthorization(e.state)?.challenges.flatMap(e=>e.attemptId===void 0?[]:[e.attemptId]),hasPendingAuthorization:openSignIns(t).length>0,hasPendingInputBatch:ownOpenRequestIds(sessionView(t,e.state)).size>0},r=runtimeWait(e.state);return r===void 0?n:{...n,hasRunsToDispatch:r.tasks.length>0,pendingCoordinationCallIds:r.callIds,pendingTaskToolCalls:r.taskToolCalls}}export{derivePendingState};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{resolveRuntimeCompiledArtifactsVersionedCacheKey}from"#runtime/cache-key.js";import{defaultDeliverResult}from"#channel/adapter.js";import{contextStorage}from"#context/container.js";import{currentProjection,enterSessionProjection,saveSessionProjection}from"#harness/session-machine/current.js";import{AuthKey,CapabilitiesKey,ChannelDeliveryKey,HandleEventKey,InitiatorAuthKey,OccurrenceIdKey,ParentSessionKey,ScheduleIdKey,ScheduleInstanceKey,SessionDynamicSubagentRuntimeRevisionKey,SessionDynamicToolRuntimeRevisionKey,SessionTitleKey,StaticModelReferenceKey,TurnDeliveryIdsKey}from"#context/keys.js";import{BundleKey,ChannelKey}from"#runtime/sessions/runtime-context-keys.js";import{coalesceTurnInputs,validateHarnessModelMessages}from"#harness/messages.js";import{activeTurnId,isBetweenTurns,turnPosition}from"#harness/session-machine/view.js";import{createWorkflowRuntime}from"#execution/workflow-runtime.js";import{resolveWorkflowCallbackBaseUrl}from"#execution/workflow-callback-url.js";import{createDurableSessionValues,readDurableSession}from"#execution/durable-session-store.js";import{deserializeContext,serializeContext}from"#context/serialize.js";import*as agentTraceState from"#tracing/agent-trace-context-store.js";import{hydrateDurableSession,refreshSessionFromTurnAgent}from"#execution/session.js";import{resolveEffectiveAgentRuntime}from"#execution/effective-agent-config.js";import{refreshDynamicSessionSubagentsForRuntimeRevision}from"#context/dynamic-subagent-lifecycle.js";import{openSessionEventPublisher}from"#execution/publish-session-events.js";import{withSessionStateDelta}from"#execution/session/state-delta.js";import{dropClosedRecords}from"#harness/session-machine/commit.js";import{sessionStartedForResolvers,turnStartedForResolvers}from"#harness/session-machine/resolver-events.js";import{CallbackBaseUrlKey,PendingAuthorizationResultKey,clearPendingAuthorization,getPendingAuthorization}from"#harness/authorization.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{runStep}from"#context/run-step.js";import{reconcileSessionContinuationToken}from"#execution/reconcile-session-continuation-token.js";import{bindSessionInstrumentation}from"#instrumentation/runtime.js";import{deriveSessionTitle}from"#execution/eve-workflow-attributes.js";import{isTurnCancellation,throwIfTurnAborted}from"#harness/turn-cancellation.js";import{bindTurnCallerContext}from"#subagents/parent-notification.js";import{bindDynamicConnections}from"#execution/dynamic-connections.js";import{recoverDynamicConnectionRehydration}from"#execution/dynamic-connection-recovery.js";import{setEveAttributes}from"#runtime/attributes/emit.js";import{RuntimeActionSettlementTimesKey}from"#harness/runtime-action-settlement-state.js";import{matchAuthorizationCallbacks}from"#execution/authorization-callback-match.js";import{attributeAnswers}from"#execution/session/answer-caller.js";import{resolveSessionStepResult}from"#execution/session/turn-step-result.js";import{createTurnEventHandler}from"#execution/session/turn-event-handler.js";import{countRunUsage}from"#execution/agent-sessions/usage.js";import{buildRuntimeIdentity,createExecutionNodeStep}from"#execution/node-step.js";import{createExecutionHistoryView}from"#execution/history-view.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 await withSessionStateDelta(e,e=>runSessionStep({...e,serializedContext:bindTurnCallerContext(e.caller,e.serializedContext)}))}async function runSessionStep(e){let t={};try{return await runSessionStepBody(e,t)}finally{await t.title}}async function runSessionStepBody(e,t){let n=e.input?.delivery,r=n,i=e.input?.runtimeResults,a=readDurableSession(e.sessionState);for(let e of i?.delegatedUsage??[])a=countRunUsage(a,e);let o=await deserializeContext(e.serializedContext);enterSessionProjection(o,a.state);let s=o.require(ChannelKey),c=o.require(BundleKey),l=resolveEffectiveAgentRuntime(c,o);try{let{getWorkflowMetadata:e}=await import(`#compiled/@workflow/core/index.js`),t=e();typeof t.url==`string`&&o.set(CallbackBaseUrlKey,resolveWorkflowCallbackBaseUrl(t.url))}catch{}let u=getPendingAuthorization(a.state),d;if(u&&r!==void 0){let{matches:e,remainingPayloads:t}=matchAuthorizationCallbacks(u,r.payloads);if(r={...r,payloads:t},e.length>0){let n=e.map(e=>e.result.attemptId),i=e.map(e=>e.result);o.set(PendingAuthorizationResultKey,i),a={...a,state:clearPendingAuthorization(a.state,n)},d=e,t.length===0&&(r=void 0)}}r?.payloads.some(e=>e.message!==void 0)&&(o.delete(ScheduleIdKey),o.delete(ScheduleInstanceKey),o.delete(OccurrenceIdKey),r.schedule!==void 0&&(o.set(ScheduleIdKey,r.schedule.definition),r.schedule.instance!==void 0&&o.set(ScheduleInstanceKey,r.schedule.instance),r.schedule.occurrenceId!==void 0&&o.set(OccurrenceIdKey,r.schedule.occurrenceId)));let f=o.get(AuthKey),p=o.has(InitiatorAuthKey);r?.auth!==void 0&&(o.set(AuthKey,r.auth??null),o.has(InitiatorAuthKey)||o.set(InitiatorAuthKey,r.auth??null));let m=r===void 0?d?.find(({challenge:e})=>e.candidateId===void 0)?.challenge.requester:void 0;m!==void 0&&o.set(AuthKey,m);let h={...hydrateDurableSession({compactionOverrides:{thresholdPercent:l.thresholdPercent},durable:a,turnAgent:l.turnAgent}),history:validateHarnessModelMessages(e.history)},g=createExecutionHistoryView(h),_=bindSessionInstrumentation({agentName:l.turnAgent.id,ctx:o,rootSessionId:h.rootSessionId??h.sessionId,sessionId:h.sessionId}),v=turnPosition(currentProjection(o)),y=isBetweenTurns(currentProjection(o));if(!v.sessionStarted&&!o.has(SessionTitleKey)&&!o.has(ParentSessionKey)){let e=n?.payloads.find(e=>e.message!==void 0)?.message,r=deriveSessionTitle(n?.title??e);r!==void 0&&(o.set(SessionTitleKey,r),t.title=setEveAttributes({"$eve.title":r}))}n!==void 0&&(await contextStorage.run(o,()=>_?.preparePreamble({sequence:v.sequence,sessionStarted:v.sessionStarted})),await contextStorage.run(o,()=>_?.instrumentChannelDelivery({agentName:c.turnAgent.id,ctx:o,delivery:n,rootSessionId:h.rootSessionId??h.sessionId,sequence:v.sequence,sessionId:h.sessionId,turnId:activeTurnId(v)})));let failChannelDeliveries=async e=>{await contextStorage.run(o,()=>_?.instrumentChannelDelivery({ctx:o,error:e,errorCode:channelDeliveryErrorCode(e),includeTurn:!1,outcome:`failed`})),await _?.flush()},b=openSessionEventPublisher({ctx:o,origin:`own`,sessionWritable:e.sessionWritable}),{adapterCtx:x}=b.dispatcher,S=new AbortController,C=e.abortSignal===void 0?S.signal:AbortSignal.any([e.abortSignal,S.signal]);try{let u=bindDynamicConnections(o,c.resolvedAgent),m={...c.graph.root,turnAgent:l.turnAgent},w=!1,T=createTurnEventHandler({abortSignal:C,bundle:c,canCancelTurn:e.input?.control===void 0,hookCancellation:S,ctx:o,dynamicConnections:u,effectiveAgent:l,effectiveNode:m,instrumentation:_,publisher:b}),handleEvent=async(e,t)=>{e.type===`compaction.completed`&&(w=!0),await T(e,t)},E=r!==void 0&&!y?structuredClone(x.state):void 0,D;if(r!==void 0){let e=[];try{for(let t of r.payloads){let n=s.deliver?await s.deliver(t,x):defaultDeliverResult(t);n!=null&&e.push(n)}}catch(e){throw await failChannelDeliveries(e),e}D=e.length===0?void 0:e.reduce(coalesceTurnInputs)}let O=r?.auth===void 0?void 0:attributeAnswers({responder:r.auth,state:a.state,stepInput:D});if(O!==void 0&&(D=O,f===void 0?o.delete(AuthKey):o.set(AuthKey,f),p||o.delete(InitiatorAuthKey)),r!==void 0&&D===void 0&&!y)f===void 0?o.delete(AuthKey):o.set(AuthKey,f),x.state=E;else if(n?.payloads.some(e=>e.message!==void 0)){let e=n.deliveryMetadata?.map(e=>e.deliveryId)??[];o.set(TurnDeliveryIdsKey,v.turnId?[...new Set([...o.get(TurnDeliveryIdsKey)??[],...e])]:e)}else!v.sessionStarted&&o.get(ChannelDeliveryKey)!==void 0&&o.set(TurnDeliveryIdsKey,[o.require(ChannelDeliveryKey).deliveryId]);if(i!==void 0&&(i.acceptedAtMsByCallId!==void 0&&o.set(RuntimeActionSettlementTimesKey,i.acceptedAtMsByCallId),D={...D,runtimeActionResults:i.results}),n!==void 0){let e={...s,state:{...x.state}};setChannelContext(o,e)}if(r!==void 0&&D===void 0&&y){await contextStorage.run(o,()=>_?.instrumentChannelDelivery({ctx:o,includeTurn:!1,outcome:`completed`})),await _?.flush();let t=saveSessionProjection(reconcileSessionContinuationToken(o,h),o),n=serializeContext(o),r=t===h?{history:e.history,sessionState:e.sessionState}:createDurableSessionValues(t);return{action:`park`,...derivePendingState(t,currentProjection(o)),serializedContext:n,...r}}let k=c.subagentRegistry.dynamicResolvers??[],A=c.resolvedAgent.dynamicToolResolvers??[],j=buildRuntimeIdentity(m);try{let e=process.env.VERCEL_DEPLOYMENT_ID?.trim(),t=e?`deployment:${e}`:await resolveRuntimeCompiledArtifactsVersionedCacheKey(c.compiledArtifactsSource),n=v.sessionStarted;if(o.setVirtualContext(StaticModelReferenceKey,l.turnAgent.model??null),!n)o.set(SessionDynamicSubagentRuntimeRevisionKey,t),o.set(SessionDynamicToolRuntimeRevisionKey,t);else{let e=sessionStartedForResolvers(j);await Promise.all([refreshDynamicSessionSubagentsForRuntimeRevision({ctx:o,resolvers:k,event:e,messages:g.initial.messages,runtimeRevision:t}),contextStorage.run(o,async()=>await refreshDynamicSessionToolsForRuntimeRevision({ctx:o,resolvers:A,event:e,messages:g.initial.messages,runtimeRevision:t}))]),y||await rebindMissingCompiledDynamicToolCallbacks({ctx:o,event:turnStartedForResolvers({sequence:v.sequence,turnId:activeTurnId(v)}),messages:g.initial.messages,resolvers:A})}}catch(e){throw await failChannelDeliveries(e),e}let M=c.resolvedAgent.config?.experimental?.workflow?.modelCallsPerStep??1,N=o.get(CapabilitiesKey),runHarnessStep=async(n,r,i)=>{let a=refreshSessionFromTurnAgent({compactionOverrides:{thresholdPercent:l.thresholdPercent},session:n,turnAgent:l.turnAgent});return createExecutionNodeStep({steeringSignal:e.steeringSignal,abortSignal:C,capabilities:N,clearOnly:e.input?.control===`clear`,compactOnly:e.input?.control===`compact`,createRuntime:createWorkflowRuntime,handleEvent,prepareApprovalTurn:e=>u.dispatch(turnStartedForResolvers(e)),signInCompletions:i,historyProjector:g.projector,historyView:g.prepare(a),instrumentation:_,modelResolutionScope:{moduleMap:c.moduleMap,nodeId:c.nodeId},node:m,titleAttributeWrite:t.title})(a,r)},P,F;try{throwIfTurnAborted(C),F=await runModelCallBatch({steeringSignal:e.steeringSignal,initialInput:D,initialSession:h,modelCallsPerStep:M,runStep:async({firstCall:e,session:t,stepInput:n})=>{let r=await runStep(o,t,async t=>{o.setVirtualContext(HandleEventKey,handleEvent),o.setVirtualContext(StaticModelReferenceKey,l.turnAgent.model??null);let r=e&&D?.outputSchema!==void 0?{...t,outputSchema:D.outputSchema}:t,i=turnPosition(currentProjection(o));try{await u.rehydrate(i,j,isBetweenTurns(currentProjection(o))?void 0:{sequence:i.sequence,turnId:activeTurnId(i)})}catch(e){let t=await recoverDynamicConnectionRehydration({emit:handleEvent,error:e,projection:currentProjection(o),session:r});if(t!==void 0)return t;throw e}let a=e&&d!==void 0?d.map(({challenge:e})=>e):void 0;return runHarnessStep(r,n,a)});r.settledTurn===void 0&&throwIfTurnAborted(C);let i={...r,session:saveSessionProjection(r.session,o)};return P={result:i,serializedContext:serializeContext(o)},i}})}catch(t){if(!isTurnCancellation(t)&&!C.aborted)throw await failChannelDeliveries(t),t;return createCancelledModelCallBatchResult({beforeBatchContext:e.serializedContext,checkpoint:P,ctx:o,initialSession:h,stepInput:D})}let I=saveSessionProjection(dropClosedRecords(reconcileSessionContinuationToken(o,F.session),currentProjection(o)),o);agentTraceState.pruneAgentTraceState(o,I.sessionId,I.state);let L=serializeContext(o);F={...F,session:I};let R=resolveSessionStepResult(F,L);return R.action===`done`&&await b.writer.close(),w?{...R,compacted:!0}:R}finally{b.writer.release()}}export{turnStep};
|
|
1
|
+
import{resolveRuntimeCompiledArtifactsVersionedCacheKey}from"#runtime/cache-key.js";import{defaultDeliverResult}from"#channel/adapter.js";import{contextStorage}from"#context/container.js";import{currentProjection,enterSessionProjection,saveSessionProjection}from"#harness/session-machine/current.js";import{AuthKey,CapabilitiesKey,ChannelDeliveryKey,HandleEventKey,InitiatorAuthKey,OccurrenceIdKey,ParentSessionKey,ScheduleIdKey,ScheduleInstanceKey,SessionDynamicSubagentRuntimeRevisionKey,SessionDynamicToolRuntimeRevisionKey,SessionTitleKey,StaticModelReferenceKey,TurnDeliveryIdsKey}from"#context/keys.js";import{BundleKey,ChannelKey}from"#runtime/sessions/runtime-context-keys.js";import{coalesceTurnInputs,validateHarnessModelMessages}from"#harness/messages.js";import{activeTurnId,isBetweenTurns,turnPosition}from"#harness/session-machine/view.js";import{createWorkflowRuntime}from"#execution/workflow-runtime.js";import{resolveWorkflowCallbackBaseUrl}from"#execution/workflow-callback-url.js";import{createDurableSessionValues,readDurableSession}from"#execution/durable-session-store.js";import{deserializeContext,serializeContext}from"#context/serialize.js";import*as agentTraceState from"#tracing/agent-trace-context-store.js";import{CallbackBaseUrlKey,PendingAuthorizationResultKey,clearPendingAuthorization,getPendingAuthorization}from"#harness/authorization.js";import{refreshDynamicSessionSubagentsForRuntimeRevision}from"#context/dynamic-subagent-lifecycle.js";import{hydrateDurableSession,refreshSessionFromTurnAgent}from"#execution/session.js";import{resolveEffectiveAgentRuntime}from"#execution/effective-agent-config.js";import{openSessionEventPublisher}from"#execution/publish-session-events.js";import{withSessionStateDelta}from"#execution/session/state-delta.js";import{dropClosedRecords}from"#harness/session-machine/commit.js";import{sessionStartedForResolvers,turnStartedForResolvers}from"#harness/session-machine/resolver-events.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{runStep}from"#context/run-step.js";import{reconcileSessionContinuationToken}from"#execution/reconcile-session-continuation-token.js";import{bindSessionInstrumentation}from"#instrumentation/runtime.js";import{deriveSessionTitle}from"#execution/eve-workflow-attributes.js";import{isTurnCancellation,throwIfTurnAborted}from"#harness/turn-cancellation.js";import{bindTurnCallerContext}from"#subagents/parent-notification.js";import{bindDynamicConnections}from"#execution/dynamic-connections.js";import{recoverDynamicConnectionRehydration}from"#execution/dynamic-connection-recovery.js";import{setEveAttributes}from"#runtime/attributes/emit.js";import{RuntimeActionSettlementTimesKey}from"#harness/runtime-action-settlement-state.js";import{matchAuthorizationCallbacks}from"#execution/authorization-callback-match.js";import{attributeAnswers}from"#execution/session/answer-caller.js";import{resolveSessionStepResult}from"#execution/session/turn-step-result.js";import{createTurnEventHandler}from"#execution/session/turn-event-handler.js";import{countRunUsage}from"#execution/agent-sessions/usage.js";import{buildRuntimeIdentity,createExecutionNodeStep}from"#execution/node-step.js";import{createExecutionHistoryView}from"#execution/history-view.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 await withSessionStateDelta(e,e=>runSessionStep({...e,serializedContext:bindTurnCallerContext(e.caller,e.serializedContext)}))}async function runSessionStep(e){let t={};try{return await runSessionStepBody(e,t)}finally{await t.title}}async function runSessionStepBody(e,t){let n=e.input?.delivery,r=n,i=e.input?.runtimeResults,a=readDurableSession(e.sessionState);for(let e of i?.delegatedUsage??[])a=countRunUsage(a,e);let o=await deserializeContext(e.serializedContext);enterSessionProjection(o,a.state);let s=o.require(ChannelKey),c=o.require(BundleKey),l=resolveEffectiveAgentRuntime(c,o);try{let{getWorkflowMetadata:e}=await import(`#compiled/@workflow/core/index.js`),t=e();typeof t.url==`string`&&o.set(CallbackBaseUrlKey,resolveWorkflowCallbackBaseUrl(t.url))}catch{}let u=getPendingAuthorization(a.state),d;if(u&&r!==void 0){let{matches:e,remainingPayloads:t}=matchAuthorizationCallbacks(u,r.payloads);if(r={...r,payloads:t},e.length>0){let n=e.map(e=>e.result.attemptId),i=e.map(e=>e.result);o.set(PendingAuthorizationResultKey,i),a={...a,state:clearPendingAuthorization(a.state,n)},d=e,t.length===0&&(r=void 0)}}r?.payloads.some(e=>e.message!==void 0)&&(o.delete(ScheduleIdKey),o.delete(ScheduleInstanceKey),o.delete(OccurrenceIdKey),r.schedule!==void 0&&(o.set(ScheduleIdKey,r.schedule.definition),r.schedule.instance!==void 0&&o.set(ScheduleInstanceKey,r.schedule.instance),r.schedule.occurrenceId!==void 0&&o.set(OccurrenceIdKey,r.schedule.occurrenceId)));let f=o.get(AuthKey),p=o.has(InitiatorAuthKey);r?.auth!==void 0&&(o.set(AuthKey,r.auth??null),o.has(InitiatorAuthKey)||o.set(InitiatorAuthKey,r.auth??null));let m=r===void 0?d?.find(({challenge:e})=>e.candidateId===void 0)?.challenge.requester:void 0;m!==void 0&&o.set(AuthKey,m);let h={...hydrateDurableSession({compactionOverrides:{thresholdPercent:l.thresholdPercent},durable:a,turnAgent:l.turnAgent}),history:validateHarnessModelMessages(e.history)},g=createExecutionHistoryView(h),_=bindSessionInstrumentation({agentName:l.turnAgent.id,ctx:o,rootSessionId:h.rootSessionId??h.sessionId,sessionId:h.sessionId}),v=turnPosition(currentProjection(o)),y=isBetweenTurns(currentProjection(o));if(!v.sessionStarted&&!o.has(SessionTitleKey)&&!o.has(ParentSessionKey)){let e=n?.payloads.find(e=>e.message!==void 0)?.message,r=deriveSessionTitle(n?.title??e);r!==void 0&&(o.set(SessionTitleKey,r),t.title=setEveAttributes({"$eve.title":r}))}n!==void 0&&(await contextStorage.run(o,()=>_?.preparePreamble({sequence:v.sequence,sessionStarted:v.sessionStarted})),await contextStorage.run(o,()=>_?.instrumentChannelDelivery({agentName:c.turnAgent.id,ctx:o,delivery:n,rootSessionId:h.rootSessionId??h.sessionId,sequence:v.sequence,sessionId:h.sessionId,turnId:activeTurnId(v)})));let failChannelDeliveries=async e=>{await contextStorage.run(o,()=>_?.instrumentChannelDelivery({ctx:o,error:e,errorCode:channelDeliveryErrorCode(e),includeTurn:!1,outcome:`failed`})),await _?.flush()},b=openSessionEventPublisher({ctx:o,origin:`own`,sessionWritable:e.sessionWritable}),{adapterCtx:x}=b.dispatcher,S=new AbortController,C=e.abortSignal===void 0?S.signal:AbortSignal.any([e.abortSignal,S.signal]);try{let u=bindDynamicConnections(o,c.resolvedAgent),m={...c.graph.root,turnAgent:l.turnAgent},w=!1,T=createTurnEventHandler({abortSignal:C,bundle:c,canCancelTurn:e.input?.control===void 0,hookCancellation:S,ctx:o,dynamicConnections:u,effectiveAgent:l,effectiveNode:m,instrumentation:_,publisher:b}),handleEvent=async(e,t)=>{e.type===`compaction.completed`&&(w=!0),await T(e,t)},E=r!==void 0&&!y?structuredClone(x.state):void 0,D;if(r!==void 0){let e=[];try{for(let t of r.payloads){let n=s.deliver?await s.deliver(t,x):defaultDeliverResult(t);n!=null&&e.push(n)}}catch(e){throw await failChannelDeliveries(e),e}D=e.length===0?void 0:e.reduce(coalesceTurnInputs)}let O=r?.auth===void 0?void 0:attributeAnswers({responder:r.auth,state:a.state,stepInput:D});if(O!==void 0&&(D=O,f===void 0?o.delete(AuthKey):o.set(AuthKey,f),p||o.delete(InitiatorAuthKey)),r!==void 0&&D===void 0&&!y)f===void 0?o.delete(AuthKey):o.set(AuthKey,f),x.state=E;else if(n?.payloads.some(e=>e.message!==void 0)){let e=n.deliveryMetadata?.map(e=>e.deliveryId)??[];o.set(TurnDeliveryIdsKey,v.turnId?[...new Set([...o.get(TurnDeliveryIdsKey)??[],...e])]:e)}else!v.sessionStarted&&o.get(ChannelDeliveryKey)!==void 0&&o.set(TurnDeliveryIdsKey,[o.require(ChannelDeliveryKey).deliveryId]);if(i!==void 0&&(i.acceptedAtMsByCallId!==void 0&&o.set(RuntimeActionSettlementTimesKey,i.acceptedAtMsByCallId),D={...D,runtimeActionResults:i.results}),n!==void 0){let e={...s,state:{...x.state}};setChannelContext(o,e)}if(r!==void 0&&D===void 0&&y){await contextStorage.run(o,()=>_?.instrumentChannelDelivery({ctx:o,includeTurn:!1,outcome:`completed`})),await _?.flush();let t=saveSessionProjection(reconcileSessionContinuationToken(o,h),o),n=serializeContext(o),r=t===h?{history:e.history,sessionState:e.sessionState}:createDurableSessionValues(t);return{action:`park`,...derivePendingState(t,currentProjection(o)),serializedContext:n,...r}}let k=c.subagentRegistry.dynamicResolvers??[],A=c.resolvedAgent.dynamicToolResolvers??[],j=buildRuntimeIdentity(m);try{let e=process.env.VERCEL_DEPLOYMENT_ID?.trim(),t=e?`deployment:${e}`:await resolveRuntimeCompiledArtifactsVersionedCacheKey(c.compiledArtifactsSource),n=v.sessionStarted;if(o.setVirtualContext(StaticModelReferenceKey,l.turnAgent.model??null),!n)o.set(SessionDynamicSubagentRuntimeRevisionKey,t),o.set(SessionDynamicToolRuntimeRevisionKey,t);else{let e=sessionStartedForResolvers(j);await Promise.all([refreshDynamicSessionSubagentsForRuntimeRevision({ctx:o,resolvers:k,event:e,messages:g.initial.messages,runtimeRevision:t}),contextStorage.run(o,async()=>await refreshDynamicSessionToolsForRuntimeRevision({ctx:o,resolvers:A,event:e,messages:g.initial.messages,runtimeRevision:t}))]),y||await rebindMissingCompiledDynamicToolCallbacks({ctx:o,event:turnStartedForResolvers({sequence:v.sequence,turnId:activeTurnId(v)}),messages:g.initial.messages,resolvers:A})}}catch(e){throw await failChannelDeliveries(e),e}let M=c.resolvedAgent.config?.experimental?.workflow?.modelCallsPerStep??1,N=o.get(CapabilitiesKey),runHarnessStep=async(n,r,i)=>{let a=refreshSessionFromTurnAgent({compactionOverrides:{thresholdPercent:l.thresholdPercent},session:n,turnAgent:l.turnAgent});return createExecutionNodeStep({steeringSignal:e.steeringSignal,abortSignal:C,capabilities:N,clearOnly:e.input?.control===`clear`,compactOnly:e.input?.control===`compact`,createRuntime:createWorkflowRuntime,handleEvent,prepareApprovalTurn:e=>u.dispatch(turnStartedForResolvers(e)),signInCompletions:i,historyProjector:g.projector,historyView:g.prepare(a),instrumentation:_,modelResolutionScope:{moduleMap:c.moduleMap,nodeId:c.nodeId},node:m,titleAttributeWrite:t.title})(a,r)},P,F;try{throwIfTurnAborted(C),F=await runModelCallBatch({steeringSignal:e.steeringSignal,initialInput:D,initialSession:h,modelCallsPerStep:M,runStep:async({firstCall:e,session:t,stepInput:n})=>{let r=await runStep(o,t,async t=>{o.setVirtualContext(HandleEventKey,handleEvent),o.setVirtualContext(StaticModelReferenceKey,l.turnAgent.model??null);let r=e&&D?.outputSchema!==void 0?{...t,outputSchema:D.outputSchema}:t,i=turnPosition(currentProjection(o));try{await u.rehydrate(i,j,isBetweenTurns(currentProjection(o))?void 0:{sequence:i.sequence,turnId:activeTurnId(i)})}catch(e){let t=await recoverDynamicConnectionRehydration({emit:handleEvent,error:e,projection:currentProjection(o),session:r});if(t!==void 0)return t;throw e}let a=e&&d!==void 0?d.map(({challenge:e})=>e):void 0;return runHarnessStep(r,n,a)});r.settledTurn===void 0&&throwIfTurnAborted(C);let i={...r,session:saveSessionProjection(r.session,o)};return P={result:i,serializedContext:serializeContext(o)},i}})}catch(t){if(!isTurnCancellation(t)&&!C.aborted)throw await failChannelDeliveries(t),t;return createCancelledModelCallBatchResult({beforeBatchContext:e.serializedContext,checkpoint:P,ctx:o,initialSession:h,stepInput:D})}let I=saveSessionProjection(dropClosedRecords(reconcileSessionContinuationToken(o,F.session),currentProjection(o)),o);agentTraceState.pruneAgentTraceState(o,I.sessionId,I.state);let L=serializeContext(o);F={...F,session:I};let R=resolveSessionStepResult(F,L);return R.action===`done`&&await b.writer.close(),w?{...R,compacted:!0}:R}finally{b.writer.release()}}export{turnStep};
|
|
@@ -57,7 +57,7 @@ export declare class SessionExecution {
|
|
|
57
57
|
private finishCancelledTurn;
|
|
58
58
|
/**
|
|
59
59
|
* The model tried to end the turn while its tasks work. The turn parks as
|
|
60
|
-
* `
|
|
60
|
+
* `eve__task_wait` would, until one of them settles or the turn is steered.
|
|
61
61
|
*/
|
|
62
62
|
private waitForHeldTurn;
|
|
63
63
|
/**
|
|
@@ -68,14 +68,14 @@ export declare class SessionExecution {
|
|
|
68
68
|
*/
|
|
69
69
|
private waitForHeldRequest;
|
|
70
70
|
private waitForRuntimeActionResults;
|
|
71
|
-
/** Answers every `
|
|
71
|
+
/** Answers every `eve__task_wait` that can return now; returns the ones still waiting. */
|
|
72
72
|
private resolveTaskWaits;
|
|
73
73
|
/**
|
|
74
|
-
* `
|
|
74
|
+
* `eve__task_cancel` is answered at once, and so is each `eve__task_wait` that can
|
|
75
75
|
* return now: a timeout of 0, a result already waiting, or nothing working.
|
|
76
|
-
* Any other `
|
|
76
|
+
* Any other `eve__task_wait` parks the open turn, reported once as
|
|
77
77
|
* `turn.waiting`, and the turn resolves it alongside the step's other
|
|
78
|
-
*
|
|
78
|
+
* workflow tool calls.
|
|
79
79
|
*/
|
|
80
80
|
private answerTaskToolCalls;
|
|
81
81
|
private traceTaskWait;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{sessionCommandHookToken,sessionInboxHookToken}from"#execution/session-inbox/address.js";import{TASK_WAIT_TOOL_NAME}from"#protocol/task-tools.js";import{renderTaskWaitResult}from"#execution/tasks/render.js";import{taskWaitResult}from"#execution/tasks/table.js";import{sleep}from"#compiled/@workflow/core/index.js";import{findBlockingWorkflowToolRun,getBlockingWorkflowToolRuns,isInboxToolResultFromRecordedWorkflowToolRun}from"#harness/workflow-tool-runs.js";import{resolveTurnPrincipal}from"#execution/session/principal.js";import{answerTaskCancel,cancelWorkingTasks,isTaskRunMessage,sessionTaskTable}from"#execution/tasks/session.js";import{cancelDescendantTurnsStep}from"#execution/cancel-descendant-turns-step.js";import{dispatchCoordinationStep}from"#execution/coordination-dispatch-step.js";import{taskToolResult}from"#execution/tasks/calls.js";import{applyTaskRunMessageStep}from"#execution/tasks/steps.js";import{publishTurnWaitingStep}from"#execution/session/turn-waiting-step.js";import{batchAgentStarts,handleWorkflowToolRunMessage}from"#execution/session-workflow-tool-run.js";import{emitAgentStartedStep}from"#execution/tools/workflow/emit-workflow-tool-run-report-step.js";import{interruptWorkflowToolRun}from"#execution/tools/workflow/interrupt.js";import{turnStep}from"#execution/session/turn-step.js";import{ActiveTurn}from"#execution/session/active-turn.js";import{resolveRuntimeActionResultsForCallIds}from"#runtime/actions/results.js";import{startTaskToolCallsStep,traceTaskToolCallStep}from"#execution/session/task-tool-tracing-step.js";function hasDelegatedCallerContext(e){if(e[`eve.sessionCallback`]!==void 0)return!0;let t=e[`eve.channel`];return typeof t==`object`&&!!t&&Reflect.get(t,`kind`)===`subagent`}var SessionExecution=class{input;constructor(e){this.input=e}get cursor(){return this.input.cursor}async runTurn(e,t={}){let n;try{n=new ActiveTurn(this.input,{caller:t.caller,principal:resolveTurnPrincipal(e,this.input.cursor.serializedContext)},t.control)}catch(e){throw t.control?.dispose(),e}try{let t=await this.runTurnSteps(n,e);return await this.handleBoundaryMessages(n.takeBoundaryMessages(),t.kind===`done`),t.kind===`park`&&t.settled!==void 0&&await cancelWorkingTasks(this.input.cursor,`turn_ended`),{...t,...n.caller!==void 0&&{caller:n.caller},...n.compacted&&{compacted:!0}}}finally{n.dispose()}}async handleBoundaryMessages(e,t=!1){for(let n of batchAgentStarts(e))n.kind===`message`?await this.handleWorkflowMessage(n.message):t||await this.input.cursor.advance(e=>emitAgentStartedStep({...e,messages:n.messages}))}async runTurnSteps(e,t){let n=t,r=e.caller;for(;;){let{cursor:t}=this.input,i=r;r=void 0;let a=await t.advanceWithHistory(t=>turnStep({...t,abortSignal:e.signal,caller:i,input:n,steeringSignal:e.steeringSignal}));a.compacted===!0&&(e.compacted=!0);let o=a.action===`park`?a.pendingCoordinationCallIds:void 0,s=a.action===`park`&&a.settled!==void 0;if(await e.admitBoundary(),await this.handleBoundaryMessages(e.takeBoundaryMessages(),a.action===`done`),a.action===`cancelled`||!s&&e.signal.aborted&&o===void 0)return await this.finishCancelledTurn(e);if(a.action===`done`)return{isError:a.isError,kind:`done`,output:a.output??``,usage:a.usage,usageDelta:a.usageDelta};if(a.action===`held`&&a.hold===`request`){if(a.hasPendingInputBatch&&this.input.capabilities?.requestInput!==!0&&!hasDelegatedCallerContext(this.input.cursor.serializedContext))throw Error(`This session cannot request human input, so it cannot wait for a tool approval or question. Configure unattended tools with an approval policy that does not require human input.`);let t=await this.waitForHeldRequest(e,a);if(t===`cancelled`)return await this.finishCancelledTurn(e);n={delivery:t};continue}if(a.action===`held`){if(await this.waitForHeldTurn(e)===`cancelled`)return await this.finishCancelledTurn(e);let t=await e.takeSteering();n=t===void 0?void 0:{delivery:t};continue}if(o!==void 0&&a.action===`park`){let t=a.hasRunsToDispatch===!1?[]:await this.dispatchRuns(),r=t.length===0?void 0:Date.now(),i=await this.waitForRuntimeActionResults({initialAcceptedAtMs:r,initialResults:t,taskToolCalls:a.pendingTaskToolCalls??[],pendingCallIds:o,turn:e});if(i===`cancelled`)return await this.finishCancelledTurn(e);n={delivery:await e.takeSteering(),runtimeResults:i};continue}if(a.action===`park`)return{kind:`park`,settled:a.settled};let c=await e.takeSteering();n=c===void 0?void 0:{delivery:c}}}async dispatchRuns(){return(await this.input.cursor.advance(e=>dispatchCoordinationStep({action:`park`,workflowToolRunOwner:{inbox:sessionInboxHookToken(sessionCommandHookToken(this.input.sessionId))},...e}))).results}async handleWorkflowMessage(e){if(isTaskRunMessage(e)){await this.input.cursor.advance(t=>applyTaskRunMessageStep({...t,message:e}));return}return await handleWorkflowToolRunMessage({cursor:this.input.cursor,message:e})}async cancelTurnWork(){let{cursor:e}=this.input;mayWaitOnWorkflowToolRuns(e.sessionState)&&await cancelDescendantTurnsStep({serializedContext:e.serializedContext,sessionState:e.sessionState}),await cancelWorkingTasks(e,`turn_cancelled`)}async finishCancelledTurn(e){return await this.handleBoundaryMessages(e.takeBoundaryMessages(`agent-started`)),await this.cancelTurnWork(),{cancelled:!0,kind:`park`}}async waitForHeldTurn(e){let t=!1;for(;;){let n={interrupted:t,timedOut:!1};if(taskWaitResult(sessionTaskTable(this.input.cursor),n)!==void 0)return`woke`;let r=await e.nextRuntimeEvent([]);if(r===`cancelled`)return r;switch(r.kind){case`steering`:t=!0;continue;case`workflow`:await this.handleWorkflowMessage(r.message);continue;case`input`:case`runtime-action-result`:case`timeout`:continue}}}async waitForHeldRequest(e,t){let n=new Set(t.authorizationAttemptIds),r=new Set(t.inputRequestIds);for(;;){let t=this.input.queue.takeAuthorizations(n);if(t!==void 0)return{kind:`deliver`,payloads:t};let i=await e.takeInputResponses(r);if(i!==void 0)return i;let a=await e.takeSteering({heldOnPerson:!0});if(a!==void 0)return a;let o=await e.nextRuntimeEvent([]);if(o===`cancelled`)return o;o.kind===`workflow`&&await this.handleWorkflowMessage(o.message)}}async waitForRuntimeActionResults(e){let t=[...e.initialResults],n=!1,r=new Map,i=new Map;if(e.initialAcceptedAtMs!==void 0)for(let n of t)r.set(n.callId,e.initialAcceptedAtMs);let accept=e=>{t.push(e),r.set(e.callId,Date.now())},a=await this.answerTaskToolCalls(e.taskToolCalls,accept);try{for(;;){a=await this.resolveTaskWaits(a,n,accept);let o=resolveRuntimeActionResultsForCallIds({pendingCallIds:e.pendingCallIds,results:t});if(o!==void 0){let e=o.flatMap(e=>{let t=i.get(e.callId);return t===void 0?[]:[t]});return{acceptedAtMsByCallId:Object.fromEntries(o.map(e=>[e.callId,r.get(e.callId)])),...e.length>0&&{delegatedUsage:e},results:o}}let s=a.flatMap(e=>e.timer===void 0?[]:[e.timer]),c=await e.turn.nextRuntimeEvent(s);if(c===`cancelled`)return c;if(c.kind===`timeout`){for(let e of a)e.callId===c.callId&&(e.timedOut=!0);continue}if(c.kind===`input`)continue;if(c.kind===`steering`){n||await this.interruptWaitedWorkflowCalls(e.pendingCallIds,t),n=!0;continue}if(c.kind===`runtime-action-result`){let e=this.input.cursor.sessionState.snapshot.session.state,n=c.results.filter(t=>t.kind===`tool-result`&&isInboxToolResultFromRecordedWorkflowToolRun(e,t));if(n.length>0){let e=Date.now();t.push(...n);for(let t of n)r.set(t.callId,e)}continue}let l=await this.handleWorkflowMessage(c.message);l!==void 0&&(accept(l),c.message.kind===`outcome`&&c.message.usage!==void 0&&i.set(l.callId,c.message.usage))}}finally{for(let e of a)await this.traceTaskWait(e,void 0,!0)}}async resolveTaskWaits(e,t,n){let r=sessionTaskTable(this.input.cursor),i=[];for(let a of e){let e=taskWaitResult(r,{interrupted:t,timedOut:a.timedOut});if(e===void 0){i.push(a);continue}let o=renderTaskWaitResult(e,Date.now()-a.startedAtMs);await this.traceTaskWait(a,o,t),n(taskToolResult(a.callId,TASK_WAIT_TOOL_NAME,o))}return i}async answerTaskToolCalls(e,t){let n=[],r=e.length===0?0:await startTaskToolCallsStep();for(let i of e)if(i.kind
|
|
1
|
+
import{sessionCommandHookToken,sessionInboxHookToken}from"#execution/session-inbox/address.js";import{TASK_WAIT_TOOL_NAME}from"#protocol/task-tools.js";import{renderTaskWaitResult}from"#execution/tasks/render.js";import{taskWaitResult}from"#execution/tasks/table.js";import{sleep}from"#compiled/@workflow/core/index.js";import{findBlockingWorkflowToolRun,getBlockingWorkflowToolRuns,isInboxToolResultFromRecordedWorkflowToolRun}from"#harness/workflow-tool-runs.js";import{resolveTurnPrincipal}from"#execution/session/principal.js";import{answerTaskCancel,cancelWorkingTasks,isTaskRunMessage,sessionTaskTable}from"#execution/tasks/session.js";import{cancelDescendantTurnsStep}from"#execution/cancel-descendant-turns-step.js";import{dispatchCoordinationStep}from"#execution/coordination-dispatch-step.js";import{taskToolResult}from"#execution/tasks/calls.js";import{applyTaskRunMessageStep}from"#execution/tasks/steps.js";import{publishTurnWaitingStep}from"#execution/session/turn-waiting-step.js";import{batchAgentStarts,handleWorkflowToolRunMessage}from"#execution/session-workflow-tool-run.js";import{emitAgentStartedStep}from"#execution/tools/workflow/emit-workflow-tool-run-report-step.js";import{interruptWorkflowToolRun}from"#execution/tools/workflow/interrupt.js";import{turnStep}from"#execution/session/turn-step.js";import{ActiveTurn}from"#execution/session/active-turn.js";import{resolveRuntimeActionResultsForCallIds}from"#runtime/actions/results.js";import{startTaskToolCallsStep,traceTaskToolCallStep}from"#execution/session/task-tool-tracing-step.js";function hasDelegatedCallerContext(e){if(e[`eve.sessionCallback`]!==void 0)return!0;let t=e[`eve.channel`];return typeof t==`object`&&!!t&&Reflect.get(t,`kind`)===`subagent`}var SessionExecution=class{input;constructor(e){this.input=e}get cursor(){return this.input.cursor}async runTurn(e,t={}){let n;try{n=new ActiveTurn(this.input,{caller:t.caller,principal:resolveTurnPrincipal(e,this.input.cursor.serializedContext)},t.control)}catch(e){throw t.control?.dispose(),e}try{let t=await this.runTurnSteps(n,e);return await this.handleBoundaryMessages(n.takeBoundaryMessages(),t.kind===`done`),t.kind===`park`&&t.settled!==void 0&&await cancelWorkingTasks(this.input.cursor,`turn_ended`),{...t,...n.caller!==void 0&&{caller:n.caller},...n.compacted&&{compacted:!0}}}finally{n.dispose()}}async handleBoundaryMessages(e,t=!1){for(let n of batchAgentStarts(e))n.kind===`message`?await this.handleWorkflowMessage(n.message):t||await this.input.cursor.advance(e=>emitAgentStartedStep({...e,messages:n.messages}))}async runTurnSteps(e,t){let n=t,r=e.caller;for(;;){let{cursor:t}=this.input,i=r;r=void 0;let a=await t.advanceWithHistory(t=>turnStep({...t,abortSignal:e.signal,caller:i,input:n,steeringSignal:e.steeringSignal}));a.compacted===!0&&(e.compacted=!0);let o=a.action===`park`?a.pendingCoordinationCallIds:void 0,s=a.action===`park`&&a.settled!==void 0;if(await e.admitBoundary(),await this.handleBoundaryMessages(e.takeBoundaryMessages(),a.action===`done`),a.action===`cancelled`||!s&&e.signal.aborted&&o===void 0)return await this.finishCancelledTurn(e);if(a.action===`done`)return{isError:a.isError,kind:`done`,output:a.output??``,usage:a.usage,usageDelta:a.usageDelta};if(a.action===`held`&&a.hold===`request`){if(a.hasPendingInputBatch&&this.input.capabilities?.requestInput!==!0&&!hasDelegatedCallerContext(this.input.cursor.serializedContext))throw Error(`This session cannot request human input, so it cannot wait for a tool approval or question. Configure unattended tools with an approval policy that does not require human input.`);let t=await this.waitForHeldRequest(e,a);if(t===`cancelled`)return await this.finishCancelledTurn(e);n={delivery:t};continue}if(a.action===`held`){if(await this.waitForHeldTurn(e)===`cancelled`)return await this.finishCancelledTurn(e);let t=await e.takeSteering();n=t===void 0?void 0:{delivery:t};continue}if(o!==void 0&&a.action===`park`){let t=a.hasRunsToDispatch===!1?[]:await this.dispatchRuns(),r=t.length===0?void 0:Date.now(),i=await this.waitForRuntimeActionResults({initialAcceptedAtMs:r,initialResults:t,taskToolCalls:a.pendingTaskToolCalls??[],pendingCallIds:o,turn:e});if(i===`cancelled`)return await this.finishCancelledTurn(e);n={delivery:await e.takeSteering(),runtimeResults:i};continue}if(a.action===`park`)return{kind:`park`,settled:a.settled};let c=await e.takeSteering();n=c===void 0?void 0:{delivery:c}}}async dispatchRuns(){return(await this.input.cursor.advance(e=>dispatchCoordinationStep({action:`park`,workflowToolRunOwner:{inbox:sessionInboxHookToken(sessionCommandHookToken(this.input.sessionId))},...e}))).results}async handleWorkflowMessage(e){if(isTaskRunMessage(e)){await this.input.cursor.advance(t=>applyTaskRunMessageStep({...t,message:e}));return}return await handleWorkflowToolRunMessage({cursor:this.input.cursor,message:e})}async cancelTurnWork(){let{cursor:e}=this.input;mayWaitOnWorkflowToolRuns(e.sessionState)&&await cancelDescendantTurnsStep({serializedContext:e.serializedContext,sessionState:e.sessionState}),await cancelWorkingTasks(e,`turn_cancelled`)}async finishCancelledTurn(e){return await this.handleBoundaryMessages(e.takeBoundaryMessages(`agent-started`)),await this.cancelTurnWork(),{cancelled:!0,kind:`park`}}async waitForHeldTurn(e){let t=!1;for(;;){let n={interrupted:t,timedOut:!1};if(taskWaitResult(sessionTaskTable(this.input.cursor),n)!==void 0)return`woke`;let r=await e.nextRuntimeEvent([]);if(r===`cancelled`)return r;switch(r.kind){case`steering`:t=!0;continue;case`workflow`:await this.handleWorkflowMessage(r.message);continue;case`input`:case`runtime-action-result`:case`timeout`:continue}}}async waitForHeldRequest(e,t){let n=new Set(t.authorizationAttemptIds),r=new Set(t.inputRequestIds);for(;;){let t=this.input.queue.takeAuthorizations(n);if(t!==void 0)return{kind:`deliver`,payloads:t};let i=await e.takeInputResponses(r);if(i!==void 0)return i;let a=await e.takeSteering({heldOnPerson:!0});if(a!==void 0)return a;let o=await e.nextRuntimeEvent([]);if(o===`cancelled`)return o;o.kind===`workflow`&&await this.handleWorkflowMessage(o.message)}}async waitForRuntimeActionResults(e){let t=[...e.initialResults],n=!1,r=new Map,i=new Map;if(e.initialAcceptedAtMs!==void 0)for(let n of t)r.set(n.callId,e.initialAcceptedAtMs);let accept=e=>{t.push(e),r.set(e.callId,Date.now())},a=await this.answerTaskToolCalls(e.taskToolCalls,accept);try{for(;;){a=await this.resolveTaskWaits(a,n,accept);let o=resolveRuntimeActionResultsForCallIds({pendingCallIds:e.pendingCallIds,results:t});if(o!==void 0){let e=o.flatMap(e=>{let t=i.get(e.callId);return t===void 0?[]:[t]});return{acceptedAtMsByCallId:Object.fromEntries(o.map(e=>[e.callId,r.get(e.callId)])),...e.length>0&&{delegatedUsage:e},results:o}}let s=a.flatMap(e=>e.timer===void 0?[]:[e.timer]),c=await e.turn.nextRuntimeEvent(s);if(c===`cancelled`)return c;if(c.kind===`timeout`){for(let e of a)e.callId===c.callId&&(e.timedOut=!0);continue}if(c.kind===`input`)continue;if(c.kind===`steering`){n||await this.interruptWaitedWorkflowCalls(e.pendingCallIds,t),n=!0;continue}if(c.kind===`runtime-action-result`){let e=this.input.cursor.sessionState.snapshot.session.state,n=c.results.filter(t=>t.kind===`tool-result`&&isInboxToolResultFromRecordedWorkflowToolRun(e,t));if(n.length>0){let e=Date.now();t.push(...n);for(let t of n)r.set(t.callId,e)}continue}let l=await this.handleWorkflowMessage(c.message);l!==void 0&&(accept(l),c.message.kind===`outcome`&&c.message.usage!==void 0&&i.set(l.callId,c.message.usage))}}finally{for(let e of a)await this.traceTaskWait(e,void 0,!0)}}async resolveTaskWaits(e,t,n){let r=sessionTaskTable(this.input.cursor),i=[];for(let a of e){let e=taskWaitResult(r,{interrupted:t,timedOut:a.timedOut});if(e===void 0){i.push(a);continue}let o=renderTaskWaitResult(e,Date.now()-a.startedAtMs);await this.traceTaskWait(a,o,t),n(taskToolResult(a.callId,TASK_WAIT_TOOL_NAME,o))}return i}async answerTaskToolCalls(e,t){let n=[],r=e.length===0?0:await startTaskToolCallsStep();for(let i of e)if(i.kind===TASK_WAIT_TOOL_NAME)n.push(startTaskWait(i,r));else{let e;try{e=await answerTaskCancel(this.input.cursor,i)}catch(e){throw await this.input.cursor.advance(e=>traceTaskToolCallStep(e,{callId:i.callId,toolName:i.kind,startedAtMs:r,completedAtMs:Date.now(),input:{taskId:i.taskId},failed:!0})),e}await this.input.cursor.advance(t=>traceTaskToolCallStep(t,{callId:i.callId,toolName:i.kind,startedAtMs:r,completedAtMs:Date.now(),input:{taskId:i.taskId},output:e.output})),t(e)}let i=await this.resolveTaskWaits(n,!1,t);return i.length>0&&await this.input.cursor.advance(publishTurnWaitingStep),i}async traceTaskWait(e,t,n=!1){await this.input.cursor.advance(r=>traceTaskToolCallStep(r,{callId:e.callId,toolName:TASK_WAIT_TOOL_NAME,startedAtMs:e.startedAtMs,completedAtMs:Date.now(),input:e.input,output:t,failed:n}))}async interruptWaitedWorkflowCalls(e,t){let n=this.input.cursor.sessionState.snapshot.session.state,r=new Set(t.map(e=>e.callId)),i=e.filter(e=>!r.has(e)).flatMap(e=>{let t=findBlockingWorkflowToolRun(n,e);return t===void 0?[]:[t.address]});await Promise.all(i.map(e=>interruptWorkflowToolRun(e)))}};function startTaskWait(e,t){let{callId:n,timeoutMs:r}=e,i=r===void 0?void 0:sleep(r).then(()=>n);return{callId:n,startedAtMs:t,input:r===void 0?{}:{timeoutSeconds:r/1e3},timedOut:r===0,timer:i}}function mayWaitOnWorkflowToolRuns(e){try{return getBlockingWorkflowToolRuns(e.snapshot?.session?.state).length>0}catch{return!0}}export{SessionExecution,hasDelegatedCallerContext};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{formatAvailableSkillsSection}from"#execution/skills/instructions.js";const DEFAULT_ROOT_MAX_INPUT_TOKENS_PER_SESSION=4e7;function createCompactionConfig(e={}){let t=e.thresholdPercent??.9,n={recentWindowSize:10,threshold:e.contextWindowTokens===void 0?1e5:Math.max(1,Math.floor(e.contextWindowTokens*t)),thresholdPercent:t};return e.lastKnownInputTokens===void 0?n:{...n,lastKnownInputTokens:e.lastKnownInputTokens,lastKnownPromptMessageCount:e.lastKnownPromptMessageCount}}function createSession(e){let{turnAgent:t}=e,n=createSessionToolDefinitions(t),r={agent:createSessionAgent(t,createSessionSystemPrompt(t),n),compaction:createCompactionConfig({contextWindowTokens:t.model?.contextWindowTokens,thresholdPercent:e.compactionOverrides?.thresholdPercent}),continuationToken:e.continuationToken,history:[...t.initialMessages??[]],sessionId:e.sessionId};return e.rootSessionId!==void 0&&(r.rootSessionId=e.rootSessionId),r.limits=resolveSessionLimits(e),e.outputSchema!==void 0&&(r.outputSchema=e.outputSchema),r}function createSessionAgent(e,t,n){let r={compactionModelReference:e.compactionModel,reasoning:e.reasoning,system:t,tools:n};if(e.model!==void 0)return{...r,modelReference:e.model};if(e.dynamicModel!==void 0)return{...r,dynamicModel:!0};throw Error(`Cannot create a session before dynamic subagent config is selected.`)}function refreshSessionFromTurnAgent(e){return{...e.session,agent:createSessionAgent(e.turnAgent,createSessionSystemPrompt(e.turnAgent),createSessionToolDefinitions(e.turnAgent)),compaction:createCompactionConfig({contextWindowTokens:e.turnAgent.model?.contextWindowTokens,lastKnownInputTokens:e.session.compaction.lastKnownInputTokens,lastKnownPromptMessageCount:e.session.compaction.lastKnownPromptMessageCount,thresholdPercent:e.compactionOverrides?.thresholdPercent})}}function createSessionSystemPrompt(e){let t=formatAvailableSkillsSection(e.
|
|
1
|
+
import{formatAvailableSkillsSection}from"#execution/skills/instructions.js";const DEFAULT_ROOT_MAX_INPUT_TOKENS_PER_SESSION=4e7;function createCompactionConfig(e={}){let t=e.thresholdPercent??.9,n={recentWindowSize:10,threshold:e.contextWindowTokens===void 0?1e5:Math.max(1,Math.floor(e.contextWindowTokens*t)),thresholdPercent:t};return e.lastKnownInputTokens===void 0?n:{...n,lastKnownInputTokens:e.lastKnownInputTokens,lastKnownPromptMessageCount:e.lastKnownPromptMessageCount}}function createSession(e){let{turnAgent:t}=e,n=createSessionToolDefinitions(t),r={agent:createSessionAgent(t,createSessionSystemPrompt(t),n),compaction:createCompactionConfig({contextWindowTokens:t.model?.contextWindowTokens,thresholdPercent:e.compactionOverrides?.thresholdPercent}),continuationToken:e.continuationToken,history:[...t.initialMessages??[]],sessionId:e.sessionId};return e.rootSessionId!==void 0&&(r.rootSessionId=e.rootSessionId),r.limits=resolveSessionLimits(e),e.outputSchema!==void 0&&(r.outputSchema=e.outputSchema),r}function createSessionAgent(e,t,n){let r={compactionModelReference:e.compactionModel,reasoning:e.reasoning,system:t,tools:n};if(e.model!==void 0)return{...r,modelReference:e.model};if(e.dynamicModel!==void 0)return{...r,dynamicModel:!0};throw Error(`Cannot create a session before dynamic subagent config is selected.`)}function refreshSessionFromTurnAgent(e){return{...e.session,agent:createSessionAgent(e.turnAgent,createSessionSystemPrompt(e.turnAgent),createSessionToolDefinitions(e.turnAgent)),compaction:createCompactionConfig({contextWindowTokens:e.turnAgent.model?.contextWindowTokens,lastKnownInputTokens:e.session.compaction.lastKnownInputTokens,lastKnownPromptMessageCount:e.session.compaction.lastKnownPromptMessageCount,thresholdPercent:e.compactionOverrides?.thresholdPercent})}}function createSessionSystemPrompt(e){let t=formatAvailableSkillsSection(e.listedSkills??[]);return(t===null?e.instructions:[...e.instructions,t]).join(`
|
|
2
2
|
|
|
3
3
|
`)}function mintSubagentContinuationToken(e){return`subagent:${e??crypto.randomUUID()}`}function projectToDurableSession(e){let t={agent:{system:e.agent.system},continuationToken:e.continuationToken,sessionId:e.sessionId};return(e.compaction.lastKnownInputTokens!==void 0||e.compaction.lastKnownPromptMessageCount!==void 0)&&(t.compaction={lastKnownInputTokens:e.compaction.lastKnownInputTokens,lastKnownPromptMessageCount:e.compaction.lastKnownPromptMessageCount}),e.rootSessionId!==void 0&&(t.rootSessionId=e.rootSessionId),e.limits!==void 0&&(t.limits=e.limits),e.outputSchema!==void 0&&(t.outputSchema=e.outputSchema),e.sandboxState!==void 0&&(t.sandboxState=e.sandboxState),e.state!==void 0&&(t.state=e.state),t}function hydrateDurableSession(e){let{durable:t,turnAgent:n}=e,r=createSessionToolDefinitions(n),i={agent:createSessionAgent(n,t.agent.system,r),compaction:createCompactionConfig({contextWindowTokens:n.model?.contextWindowTokens,lastKnownInputTokens:t.compaction?.lastKnownInputTokens,lastKnownPromptMessageCount:t.compaction?.lastKnownPromptMessageCount,thresholdPercent:e.compactionOverrides?.thresholdPercent}),continuationToken:t.continuationToken,sessionId:t.sessionId};return t.rootSessionId!==void 0&&(i.rootSessionId=t.rootSessionId),t.limits!==void 0&&(i.limits=t.limits),t.outputSchema!==void 0&&(i.outputSchema=t.outputSchema),t.sandboxState!==void 0&&(i.sandboxState=t.sandboxState),t.state!==void 0&&(i.state=t.state),i}function createSessionToolDefinitions(e){return e.tools.map(e=>({description:e.description??``,inputSchema:e.inputSchema,name:e.name,outputSchema:e.outputSchema}))}function resolveSessionLimits(e){let t=resolveSessionTokenLimit({authored:e.limits?.maxInputTokensPerSession,fallback:DEFAULT_ROOT_MAX_INPUT_TOKENS_PER_SESSION}),n=resolveSessionTokenLimit({authored:e.limits?.maxOutputTokensPerSession,fallback:void 0}),r=resolveSessionTokenLimit({authored:e.limits?.maxTokenCostUsdPerSession,fallback:void 0}),i={};return t!==void 0&&(i.maxInputTokensPerSession=t),n!==void 0&&(i.maxOutputTokensPerSession=n),r!==void 0&&(i.maxTokenCostUsdPerSession=r),i}function resolveSessionTokenLimit(e){return e.authored===!1?void 0:e.authored??e.fallback}export{DEFAULT_ROOT_MAX_INPUT_TOKENS_PER_SESSION,createCompactionConfig,createSession,hydrateDurableSession,mintSubagentContinuationToken,projectToDurableSession,refreshSessionFromTurnAgent};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { DynamicSkillManifest } from "#context/keys.js";
|
|
2
|
+
import type { Announcement } from "#harness/announcements.js";
|
|
1
3
|
export interface AvailableSkillDescription {
|
|
2
4
|
readonly description: string;
|
|
3
5
|
readonly name: string;
|
|
@@ -5,17 +7,25 @@ export interface AvailableSkillDescription {
|
|
|
5
7
|
readonly hasFiles?: boolean;
|
|
6
8
|
}
|
|
7
9
|
/**
|
|
8
|
-
* Formats the "Available skills"
|
|
10
|
+
* Formats the "Available skills" section: every skill that isn't deferred,
|
|
11
|
+
* with the instruction to load it. Deferred skills stay out of context until
|
|
12
|
+
* search finds them.
|
|
9
13
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* provisioning a sandbox.
|
|
14
|
+
* A loaded skill's instructions are never injected into the system prompt;
|
|
15
|
+
* the model has them from the result of loading it. The formatter uses the
|
|
16
|
+
* canonical symbolic skill root so supporting files remain discoverable
|
|
17
|
+
* without provisioning a sandbox.
|
|
15
18
|
*
|
|
16
|
-
* Authored skills call this at graph resolution time so the section is
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* durable context announcements.
|
|
19
|
+
* Authored skills call this at graph resolution time so the section is part of
|
|
20
|
+
* the turn agent's static instructions. Dynamic skills reuse it for their
|
|
21
|
+
* announcement.
|
|
20
22
|
*/
|
|
21
23
|
export declare function formatAvailableSkillsSection(skills: readonly AvailableSkillDescription[]): string | null;
|
|
24
|
+
/**
|
|
25
|
+
* Announces the dynamic skills that aren't deferred, in full whenever they
|
|
26
|
+
* change. Nothing is announced until the first one resolves. `announced` holds
|
|
27
|
+
* the values announced so far.
|
|
28
|
+
*/
|
|
29
|
+
export declare function dynamicSkillAnnouncements(manifest: DynamicSkillManifest | undefined, announced: Readonly<Record<string, string>> | undefined): Readonly<Record<string, Announcement>>;
|
|
30
|
+
/** Where a skill's `SKILL.md` lives under the model's skill root. */
|
|
31
|
+
export declare function skillFilePath(name: string): string;
|
|
@@ -1,2 +1,2 @@
|
|
|
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,
|
|
2
|
-
`)}function formatAvailableSkillLine(e){let t=`- ${e.name}: ${e.description}`;return e.hasFiles===!1?t:`${t} (path: ${MODEL_SKILL_ROOT}/${e
|
|
1
|
+
import{SKILL_TOOL_NAME}from"#protocol/catalog-tools.js";import{FALLBACK_SKILL_ROOT,MODEL_SKILL_ROOT}from"#shared/skill-paths.js";const ANNOUNCEMENT_KEY=`skills`;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, load it with ${SKILL_TOOL_NAME}({ name }) 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 dynamicSkillAnnouncements(e,t){let n=Object.values(e??{}).flat().filter(e=>e.deferred!==!0);if(n.length===0&&t?.[ANNOUNCEMENT_KEY]===void 0)return{};let r=formatAvailableSkillsSection(n.map(({description:e,name:t,revision:n})=>({description:e,hasFiles:n!==void 0,name:t})))??`Available skills: none`;return{[ANNOUNCEMENT_KEY]:{value:r,render:()=>r}}}function formatAvailableSkillLine(e){let t=`- ${e.name}: ${e.description}`;return e.hasFiles===!1?t:`${t} (path: ${skillFilePath(e.name)})`}function skillFilePath(e){return`${MODEL_SKILL_ROOT}/${e}/SKILL.md`}export{dynamicSkillAnnouncements,formatAvailableSkillsSection,skillFilePath};
|
|
@@ -1,27 +1,28 @@
|
|
|
1
1
|
import type { ModelMessage } from "ai";
|
|
2
2
|
import type { RuntimeToolResultActionResult } from "#shared/action-types.js";
|
|
3
3
|
import type { JsonValue } from "#shared/json.js";
|
|
4
|
+
import { TASK_CANCEL_TOOL_NAME, TASK_WAIT_TOOL_NAME } from "#protocol/task-tools.js";
|
|
4
5
|
/**
|
|
5
6
|
* Calls to the task tools. They defer out of the model step like
|
|
6
7
|
* workflow tool calls; the session answers them instead of a workflow run.
|
|
7
8
|
*/
|
|
8
9
|
export type TaskToolCall = {
|
|
9
10
|
readonly callId: string;
|
|
10
|
-
readonly kind:
|
|
11
|
+
readonly kind: typeof TASK_WAIT_TOOL_NAME;
|
|
11
12
|
readonly timeoutMs?: number;
|
|
12
13
|
} | {
|
|
13
14
|
readonly callId: string;
|
|
14
|
-
readonly kind:
|
|
15
|
+
readonly kind: typeof TASK_CANCEL_TOOL_NAME;
|
|
15
16
|
readonly taskId: string;
|
|
16
17
|
};
|
|
17
18
|
/**
|
|
18
19
|
* The task tool calls a parked step's response still waits on. The response
|
|
19
20
|
* is the one record of these calls: a call without a result is pending, and
|
|
20
|
-
* a call with invalid input already carries its error result. The
|
|
21
|
-
* reserved, so no authored tool's call matches.
|
|
21
|
+
* a call with invalid input already carries its error result. The `eve`
|
|
22
|
+
* namespace is reserved, so no authored tool's call matches.
|
|
22
23
|
*/
|
|
23
24
|
export declare function pendingTaskToolCalls(messages: readonly ModelMessage[]): TaskToolCall[];
|
|
24
|
-
/** Why
|
|
25
|
+
/** Why an `eve__task_wait` call, or a held turn, stopped waiting. */
|
|
25
26
|
export type TaskWaitResult = {
|
|
26
27
|
readonly status: "settled";
|
|
27
28
|
/** Tasks whose results follow; both lists are empty when nothing was working. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{TASK_CANCEL_TOOL_NAME,TASK_WAIT_TOOL_NAME}from"#protocol/task-tools.js";function pendingTaskToolCalls(e){let t=new Set;for(let n of e)if(typeof n.content!=`string`)for(let e of n.content)e.type===`tool-result`&&t.add(e.toolCallId);let n=[];for(let r of e)if(r.role===`assistant`&&typeof r.content!=`string`)for(let e of r.content){if(e.type!==`tool-call`||t.has(e.toolCallId))continue;let r=typeof e.input==`object`&&e.input!==null?e.input:{};if(e.toolName===TASK_CANCEL_TOOL_NAME){let t=String(Reflect.get(r,`taskId`));n.push({callId:e.toolCallId,kind
|
|
1
|
+
import{TASK_CANCEL_TOOL_NAME,TASK_WAIT_TOOL_NAME}from"#protocol/task-tools.js";function pendingTaskToolCalls(e){let t=new Set;for(let n of e)if(typeof n.content!=`string`)for(let e of n.content)e.type===`tool-result`&&t.add(e.toolCallId);let n=[];for(let r of e)if(r.role===`assistant`&&typeof r.content!=`string`)for(let e of r.content){if(e.type!==`tool-call`||t.has(e.toolCallId))continue;let r=typeof e.input==`object`&&e.input!==null?e.input:{};if(e.toolName===TASK_CANCEL_TOOL_NAME){let t=String(Reflect.get(r,`taskId`));n.push({callId:e.toolCallId,kind:TASK_CANCEL_TOOL_NAME,taskId:t})}else if(e.toolName===TASK_WAIT_TOOL_NAME){let t=Reflect.get(r,`timeoutSeconds`);n.push(typeof t==`number`?{callId:e.toolCallId,kind:TASK_WAIT_TOOL_NAME,timeoutMs:t*1e3}:{callId:e.toolCallId,kind:TASK_WAIT_TOOL_NAME})}}return n}function taskToolResult(e,t,n){return{callId:e,kind:`tool-result`,output:n,toolName:t}}export{pendingTaskToolCalls,taskToolResult};
|
|
@@ -5,20 +5,20 @@ import type { HarnessSession, HarnessToolMap } from "#harness/types.js";
|
|
|
5
5
|
import type { WorkflowToolCallEntry } from "#shared/action-types.js";
|
|
6
6
|
import type { JsonObject } from "#shared/json.js";
|
|
7
7
|
export declare function isTaskTool(definition: HarnessToolDefinition | undefined): boolean;
|
|
8
|
-
/**
|
|
9
|
-
export declare function
|
|
10
|
-
/** Adds `
|
|
8
|
+
/** Workflow tools, and the task tools that control them, run after the model step. */
|
|
9
|
+
export declare function isWorkflowTool(definition: HarnessToolDefinition | undefined): boolean;
|
|
10
|
+
/** Adds `eve__task_wait` and `eve__task_cancel` to the tools of a session that offers tasks. */
|
|
11
11
|
export declare function withTaskTools(tools: HarnessToolMap): HarnessToolMap;
|
|
12
12
|
/**
|
|
13
|
-
* The task block, when the
|
|
13
|
+
* The task block, when the session offers tasks. `finalReplyOnly` is set for a
|
|
14
14
|
* child or schedule session, which hides a held turn's text, so a reply before
|
|
15
15
|
* a result would reach no one.
|
|
16
16
|
*/
|
|
17
|
-
export declare function taskSystemMessages(
|
|
17
|
+
export declare function taskSystemMessages(offers: boolean, options: {
|
|
18
18
|
readonly finalReplyOnly: boolean;
|
|
19
19
|
}): SystemModelMessage[];
|
|
20
|
-
/** A
|
|
21
|
-
export interface
|
|
20
|
+
/** A workflow tool call as the model made it, before the session knows what it enters. */
|
|
21
|
+
export interface WorkflowCall {
|
|
22
22
|
readonly callId: string;
|
|
23
23
|
readonly definition: HarnessToolDefinition | undefined;
|
|
24
24
|
/** The call's model input. */
|
|
@@ -26,19 +26,19 @@ export interface DeferredCall {
|
|
|
26
26
|
readonly toolName: string;
|
|
27
27
|
readonly turnId: string;
|
|
28
28
|
}
|
|
29
|
-
/** How a
|
|
29
|
+
/** How a workflow tool call enters its workflow, with the tool's own input. */
|
|
30
30
|
export interface CommittedCallEntry {
|
|
31
31
|
readonly entry: WorkflowToolCallEntry;
|
|
32
32
|
readonly input: JsonObject;
|
|
33
33
|
readonly session: HarnessSession;
|
|
34
34
|
}
|
|
35
35
|
/**
|
|
36
|
-
* How a
|
|
36
|
+
* How a workflow tool call enters its workflow. A call that starts a task commits
|
|
37
37
|
* the task's record alongside the call, so the run starts with its id; a
|
|
38
38
|
* `serve` tool's call with `taskId` goes to that task's `receive()`, which the
|
|
39
39
|
* session checks when it sends the call.
|
|
40
40
|
*/
|
|
41
|
-
export declare function commitCallEntry(session: HarnessSession, call:
|
|
41
|
+
export declare function commitCallEntry(session: HarnessSession, call: WorkflowCall): CommittedCallEntry;
|
|
42
42
|
export declare function workingTaskIds(session: HarnessSession): readonly string[];
|
|
43
43
|
/**
|
|
44
44
|
* The messages a model step appends for tasks, before any new input: one
|