eve 0.67.2 → 0.69.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +120 -0
- package/bin/eve.js +15 -0
- package/dist/src/_virtual/_rolldown/runtime.js +1 -1
- package/dist/src/approval/definition.d.ts +19 -5
- package/dist/src/channel/adapter.d.ts +2 -0
- package/dist/src/channel/auth/oidc.js +1 -1
- package/dist/src/channel/channel-address.d.ts +1 -4
- package/dist/src/channel/channel-address.js +1 -1
- package/dist/src/channel/channel-operations.d.ts +4 -11
- package/dist/src/channel/channel-operations.js +1 -1
- package/dist/src/channel/compiled-channel.d.ts +0 -2
- package/dist/src/channel/compiled-channel.js +2 -2
- package/dist/src/channel/cross-channel-receive.d.ts +1 -3
- package/dist/src/channel/cross-channel-receive.js +1 -1
- package/dist/src/channel/forwarded-principal.js +1 -1
- package/dist/src/channel/schedule-auth.d.ts +16 -0
- package/dist/src/channel/schedule-auth.js +1 -1
- package/dist/src/channel/session-callback.js +1 -1
- package/dist/src/channel/session.d.ts +3 -8
- package/dist/src/channel/session.js +1 -1
- package/dist/src/channel/task-card.d.ts +121 -0
- package/dist/src/channel/task-card.js +1 -0
- package/dist/src/channel/types.d.ts +12 -54
- package/dist/src/chunks/{use-eve-agent-DXcE_8Ja.js → use-eve-agent-D_5129A9.js} +295 -205
- package/dist/src/chunks/{use-eve-agent-D4HVZBjn.js → use-eve-agent-Dab2MnT2.js} +295 -205
- package/dist/src/cli/commands/info.d.ts +11 -0
- package/dist/src/cli/commands/info.js +1 -1
- package/dist/src/cli/commands/init-agent-workspace.js +1 -1
- package/dist/src/cli/commands/init.js +1 -1
- package/dist/src/cli/dev/command-options.d.ts +3 -2
- package/dist/src/cli/dev/command.js +1 -1
- package/dist/src/cli/dev/local-server-process.js +1 -1
- package/dist/src/cli/dev/tui/blocks.d.ts +19 -18
- package/dist/src/cli/dev/tui/blocks.js +3 -3
- package/dist/src/cli/dev/tui/command-typeahead.d.ts +3 -6
- package/dist/src/cli/dev/tui/diagnostic-presentation.d.ts +10 -0
- package/dist/src/cli/dev/tui/diagnostic-presentation.js +3 -2
- package/dist/src/cli/dev/tui/prompt-placeholder.d.ts +2 -0
- package/dist/src/cli/dev/tui/prompt-placeholder.js +1 -0
- package/dist/src/cli/dev/tui/rail.d.ts +1 -1
- package/dist/src/cli/dev/tui/runner.d.ts +25 -2
- package/dist/src/cli/dev/tui/runner.js +3 -3
- package/dist/src/cli/dev/tui/status-line.d.ts +4 -2
- package/dist/src/cli/dev/tui/status-line.js +1 -1
- package/dist/src/cli/dev/tui/subagent-pump.d.ts +44 -52
- package/dist/src/cli/dev/tui/subagent-pump.js +1 -1
- package/dist/src/cli/dev/tui/task-activity.d.ts +55 -0
- package/dist/src/cli/dev/tui/task-activity.js +1 -0
- package/dist/src/cli/dev/tui/terminal-renderer.d.ts +13 -30
- package/dist/src/cli/dev/tui/terminal-renderer.js +11 -11
- package/dist/src/cli/dev/tui/theme.d.ts +1 -1
- package/dist/src/cli/dev/tui/theme.js +1 -1
- package/dist/src/cli/dev/tui/tool-block-groups.d.ts +6 -9
- package/dist/src/cli/dev/tui/tool-block-groups.js +1 -1
- package/dist/src/cli/dev/tui/tool-presentation.d.ts +16 -3
- package/dist/src/cli/dev/tui/tool-presentation.js +1 -1
- package/dist/src/cli/dev/tui/traces/trace-conversation.js +3 -1
- package/dist/src/cli/dev/tui/traces/trace-view.js +1 -1
- package/dist/src/cli/dev/tui/tui.js +1 -1
- package/dist/src/cli/dev/tui/types.d.ts +11 -5
- package/dist/src/cli/dev/ui-options.d.ts +2 -2
- package/dist/src/cli/option-parsers.d.ts +3 -1
- package/dist/src/cli/option-parsers.js +1 -1
- package/dist/src/cli/ui/terminal-text.js +1 -1
- package/dist/src/client/agent-info-schema.d.ts +150 -9
- package/dist/src/client/agent-info-schema.js +1 -1
- package/dist/src/client/agent-session.d.ts +28 -0
- package/dist/src/client/agent-session.js +1 -0
- package/dist/src/client/eve-agent-store-helpers.d.ts +1 -1
- package/dist/src/client/eve-agent-store-helpers.js +2 -2
- package/dist/src/client/eve-agent-store.js +1 -1
- package/dist/src/client/index.d.ts +2 -1
- package/dist/src/client/index.js +1 -1
- package/dist/src/client/message-action-parts.js +1 -1
- package/dist/src/client/message-reducer.js +1 -1
- package/dist/src/client/message-task-parts.d.ts +8 -0
- package/dist/src/client/message-task-parts.js +1 -0
- package/dist/src/client/optimistic-message-submissions.js +1 -1
- package/dist/src/client/session-controls.d.ts +0 -1
- package/dist/src/client/session-utils.d.ts +10 -0
- package/dist/src/client/session-utils.js +1 -1
- package/dist/src/client/session.d.ts +8 -16
- package/dist/src/client/session.js +1 -1
- package/dist/src/client/stream-version.js +1 -1
- package/dist/src/client/types.d.ts +2 -4
- package/dist/src/compiled/.vendor-stamp.json +3 -2
- package/dist/src/compiled/@eve/catalog/index.js +1 -1
- package/dist/src/compiled/@photon-ai/chat-adapter-imessage/index.js +55 -55
- package/dist/src/compiled/@vercel/blob/index.js +1 -1
- package/dist/src/compiled/@vercel/connect/LICENSE +202 -0
- package/dist/src/compiled/@vercel/connect/authorization-details.d.ts +11 -0
- package/dist/src/compiled/@vercel/connect/authorization.d.ts +47 -0
- package/dist/src/compiled/@vercel/connect/connector.d.ts +32 -0
- package/dist/src/compiled/@vercel/connect/index.d.ts +5 -0
- package/dist/src/compiled/@vercel/connect/index.js +26 -0
- package/dist/src/compiled/@vercel/connect/installation.d.ts +48 -0
- package/dist/src/compiled/@vercel/connect/token.d.ts +137 -0
- package/dist/src/compiled/@vercel/oidc/index.js +1 -1
- package/dist/src/compiled/@workflow/core/runtime.js +3 -3
- package/dist/src/compiled/@workflow/world-vercel/index.js +1 -1
- package/dist/src/compiler/bundled-extension.d.ts +7 -1
- package/dist/src/compiler/bundled-extension.js +1 -1
- package/dist/src/compiler/default-tool-policy.d.ts +2 -2
- package/dist/src/compiler/default-tool-policy.js +1 -1
- package/dist/src/compiler/development-extensions.js +1 -1
- package/dist/src/compiler/extension-compatibility.d.ts +54 -18
- package/dist/src/compiler/extension-compatibility.js +1 -1
- package/dist/src/compiler/extension-mount-bindings.d.ts +5 -0
- package/dist/src/compiler/extension-mount-bindings.js +1 -0
- package/dist/src/compiler/load-binding-namespace.d.ts +10 -2
- package/dist/src/compiler/load-binding-namespace.js +1 -1
- package/dist/src/compiler/manifest.d.ts +19 -17
- package/dist/src/compiler/manifest.js +1 -1
- package/dist/src/compiler/module-lifecycle.d.ts +2 -2
- package/dist/src/compiler/module-lifecycle.js +1 -1
- package/dist/src/compiler/module-map.d.ts +1 -1
- package/dist/src/compiler/module-map.js +3 -3
- package/dist/src/compiler/normalize-manifest-helpers.d.ts +18 -1
- package/dist/src/compiler/normalize-manifest-helpers.js +1 -1
- package/dist/src/compiler/normalize-manifest-types.d.ts +2 -0
- package/dist/src/compiler/normalize-manifest.js +1 -1
- package/dist/src/compiler/normalize-subagent.js +1 -1
- package/dist/src/compiler/normalize-tool.js +1 -1
- package/dist/src/compiler/project-sources.d.ts +4 -0
- package/dist/src/compiler/project-sources.js +1 -1
- package/dist/src/compiler/remote-agent-node.js +1 -1
- package/dist/src/compiler/source-graph.d.ts +5 -0
- package/dist/src/compiler/source-graph.js +1 -1
- package/dist/src/computer-use/extension/extension.d.ts +2 -0
- package/dist/src/computer-use/extension/extension.js +1 -0
- package/dist/src/computer-use/extension/lib/command-failure.d.ts +7 -0
- package/dist/src/computer-use/extension/lib/command-failure.js +2 -0
- package/dist/src/{extensions/code → computer-use}/extension/lib/computer-use-sandbox.d.ts +8 -0
- package/dist/src/{extensions/code → computer-use}/extension/lib/computer-use-sandbox.js +3 -3
- package/dist/src/{extensions/code → computer-use}/extension/lib/computer-use.d.ts +2 -0
- package/dist/src/{extensions/code → computer-use}/extension/lib/computer-use.js +2 -1
- package/dist/src/computer-use/extension/lib/sandbox.d.ts +1 -0
- package/dist/src/computer-use/extension/lib/sandbox.js +1 -0
- package/dist/src/computer-use/extension/lib/shell.d.ts +1 -0
- package/dist/src/computer-use/extension/lib/shell.js +1 -0
- package/dist/src/computer-use/extension/tools/computer_use.js +1 -0
- package/dist/src/computer-use/tools.d.ts +1 -0
- package/dist/src/computer-use/tools.js +1 -0
- package/dist/src/context/build-dynamic-tools.js +1 -1
- package/dist/src/context/dynamic-subagent-lifecycle.d.ts +5 -0
- package/dist/src/context/dynamic-subagent-lifecycle.js +1 -1
- package/dist/src/context/dynamic-tool-lifecycle.d.ts +1 -1
- package/dist/src/context/dynamic-tool-lifecycle.js +1 -1
- package/dist/src/context/dynamic-tool-metadata.d.ts +1 -1
- package/dist/src/context/hook-lifecycle.d.ts +4 -3
- package/dist/src/context/hook-lifecycle.js +1 -1
- package/dist/src/context/key-names.d.ts +0 -1
- package/dist/src/context/key-names.js +1 -1
- package/dist/src/context/keys.d.ts +8 -14
- package/dist/src/context/keys.js +1 -1
- package/dist/src/context/memory-lifecycle.js +1 -1
- package/dist/src/context/memory-tools.d.ts +0 -1
- package/dist/src/context/provider.d.ts +1 -3
- package/dist/src/context/run-step.d.ts +2 -3
- package/dist/src/context/run-step.js +1 -1
- package/dist/src/context/serialize.js +1 -1
- package/dist/src/discover/bundled-extension.js +1 -1
- package/dist/src/discover/discover-agent.js +1 -1
- package/dist/src/discover/extensions.d.ts +0 -7
- package/dist/src/discover/extensions.js +1 -1
- package/dist/src/discover/manifest.d.ts +4 -0
- package/dist/src/evals/assertions/run.d.ts +4 -3
- package/dist/src/evals/assertions/run.js +1 -1
- package/dist/src/evals/index.d.ts +1 -1
- package/dist/src/evals/match.d.ts +4 -4
- package/dist/src/evals/mock-model.js +1 -1
- package/dist/src/evals/runner/derive-run-facts.d.ts +3 -3
- package/dist/src/evals/runner/derive-run-facts.js +1 -1
- package/dist/src/evals/runner/reporters/assertion-scores.d.ts +19 -0
- package/dist/src/evals/runner/reporters/assertion-scores.js +1 -0
- package/dist/src/evals/runner/reporters/braintrust.js +1 -1
- package/dist/src/evals/runner/reporters/datadog-client.d.ts +123 -0
- package/dist/src/evals/runner/reporters/datadog-client.js +4 -0
- package/dist/src/evals/runner/reporters/datadog.d.ts +9 -98
- package/dist/src/evals/runner/reporters/datadog.js +2 -3
- package/dist/src/evals/session-content.js +1 -1
- package/dist/src/evals/session.d.ts +4 -4
- package/dist/src/evals/session.js +2 -2
- package/dist/src/evals/types.d.ts +18 -15
- package/dist/src/eve-channel/create-request.d.ts +5 -4
- package/dist/src/eve-channel/create-request.js +1 -1
- package/dist/src/eve-channel/index.d.ts +0 -9
- package/dist/src/eve-channel/index.js +1 -1
- package/dist/src/eve-channel/request.d.ts +3 -7
- package/dist/src/eve-channel/request.js +1 -1
- package/dist/src/eve-channel/support.d.ts +15 -5
- package/dist/src/eve-channel/support.js +1 -1
- package/dist/src/eve-channel/turn-policy-request.d.ts +2 -0
- package/dist/src/eve-channel/turn-policy-request.js +1 -0
- package/dist/src/eve-channel/types.d.ts +4 -0
- package/dist/src/execution/agent-sessions/context.d.ts +60 -0
- package/dist/src/execution/agent-sessions/context.js +1 -0
- package/dist/src/{subagents/remote-dispatch.d.ts → execution/agent-sessions/remote.d.ts} +17 -40
- package/dist/src/execution/agent-sessions/remote.js +1 -0
- package/dist/src/execution/agent-sessions/requests.d.ts +20 -0
- package/dist/src/execution/agent-sessions/requests.js +1 -0
- package/dist/src/execution/agent-sessions/session.d.ts +12 -0
- package/dist/src/execution/agent-sessions/session.js +1 -0
- package/dist/src/execution/agent-sessions/steps.d.ts +59 -0
- package/dist/src/execution/agent-sessions/steps.js +1 -0
- package/dist/src/execution/agent-sessions/target.d.ts +45 -0
- package/dist/src/execution/agent-sessions/target.js +1 -0
- package/dist/src/execution/agent-sessions/usage.d.ts +18 -0
- package/dist/src/execution/agent-sessions/usage.js +1 -0
- package/dist/src/execution/authorization-callback-match.d.ts +2 -4
- package/dist/src/execution/authorization-callback-match.js +1 -1
- package/dist/src/execution/cancel-descendant-turns-step.d.ts +1 -5
- package/dist/src/execution/cancel-descendant-turns-step.js +1 -1
- package/dist/src/execution/cancelled-model-call-batch.js +1 -1
- package/dist/src/execution/connection-announcement.d.ts +7 -0
- package/dist/src/execution/connection-announcement.js +4 -0
- package/dist/src/execution/continuation-conflict-step.d.ts +2 -3
- package/dist/src/execution/continuation-conflict-step.js +1 -1
- package/dist/src/execution/coordination-dispatch-shared.d.ts +9 -27
- package/dist/src/execution/coordination-dispatch-shared.js +1 -1
- package/dist/src/execution/coordination-dispatch-step.d.ts +3 -2
- package/dist/src/execution/coordination-dispatch-step.js +1 -1
- package/dist/src/execution/create-session-step.d.ts +0 -1
- package/dist/src/execution/create-session-step.js +1 -1
- package/dist/src/execution/deliver-payloads.js +1 -1
- package/dist/src/execution/durable-session-store.d.ts +0 -1
- package/dist/src/execution/dynamic-connections.js +1 -1
- package/dist/src/execution/dynamic-workflow/program-step.js +1 -1
- package/dist/src/execution/dynamic-workflow/schema.d.ts +1 -3
- package/dist/src/execution/dynamic-workflow/schema.js +1 -1
- package/dist/src/execution/dynamic-workflow/tool.d.ts +1 -1
- package/dist/src/execution/dynamic-workflow/tool.js +1 -1
- package/dist/src/execution/dynamic-workflow/workflow.js +1 -1
- package/dist/src/execution/forward-session-input.d.ts +4 -0
- package/dist/src/execution/forward-session-input.js +1 -0
- package/dist/src/execution/legacy-remote-agent/protocol.d.ts +41 -0
- package/dist/src/execution/legacy-remote-agent/protocol.js +1 -0
- package/dist/src/execution/legacy-session/authorization.js +1 -1
- package/dist/src/execution/legacy-session/completion-step.js +1 -1
- package/dist/src/execution/legacy-session/inbox.js +1 -1
- package/dist/src/execution/legacy-session/input.js +1 -1
- package/dist/src/execution/legacy-session/interrupt-step.js +1 -1
- package/dist/src/execution/model-call-batching.js +1 -1
- package/dist/src/execution/node-step.d.ts +1 -1
- package/dist/src/execution/node-step.js +1 -1
- package/dist/src/execution/proxied-deliver-step.d.ts +9 -6
- package/dist/src/execution/proxied-deliver-step.js +1 -1
- package/dist/src/execution/publish-session-events.d.ts +130 -0
- package/dist/src/execution/publish-session-events.js +1 -0
- package/dist/src/execution/route-child-delivery.d.ts +5 -4
- package/dist/src/execution/route-child-delivery.js +1 -3
- package/dist/src/execution/runtime-context.js +1 -1
- package/dist/src/execution/sandbox/prewarm.js +1 -1
- package/dist/src/execution/session/admission.d.ts +1 -12
- package/dist/src/execution/session/admission.js +1 -1
- package/dist/src/execution/session/entry-input.d.ts +0 -2
- package/dist/src/execution/session/entry.js +1 -1
- package/dist/src/execution/session/finalization.js +1 -1
- package/dist/src/execution/session/handoff-steps.d.ts +13 -2
- package/dist/src/execution/session/handoff-steps.js +1 -1
- package/dist/src/execution/session/handoff.d.ts +17 -3
- package/dist/src/execution/session/handoff.js +1 -1
- package/dist/src/execution/session/input-queue.d.ts +27 -28
- package/dist/src/execution/session/input-queue.js +1 -1
- package/dist/src/execution/session/next-input.d.ts +5 -0
- package/dist/src/execution/session/next-input.js +1 -1
- package/dist/src/execution/session/pending-turn-state.d.ts +2 -0
- package/dist/src/execution/session/pending-turn-state.js +1 -1
- package/dist/src/execution/session/principal.d.ts +14 -0
- package/dist/src/execution/session/principal.js +1 -0
- package/dist/src/execution/session/program.js +1 -1
- package/dist/src/execution/session/route-selected-delivery.js +1 -1
- package/dist/src/execution/session/state-cursor.d.ts +17 -15
- package/dist/src/execution/session/state-cursor.js +1 -1
- package/dist/src/execution/session/state-delta.d.ts +33 -0
- package/dist/src/execution/session/state-delta.js +1 -0
- package/dist/src/execution/session/timeout-steps.js +1 -1
- package/dist/src/execution/session/turn-event-handler.d.ts +27 -0
- package/dist/src/execution/session/turn-event-handler.js +1 -0
- package/dist/src/execution/session/turn-step-result.d.ts +1 -3
- package/dist/src/execution/session/turn-step-result.js +1 -1
- package/dist/src/execution/session/turn-step-types.d.ts +24 -15
- package/dist/src/execution/session/turn-step.d.ts +2 -2
- package/dist/src/execution/session/turn-step.js +1 -1
- package/dist/src/execution/session/turn-waiting-step.d.ts +4 -0
- package/dist/src/execution/session/turn-waiting-step.js +1 -0
- package/dist/src/execution/session/turn.d.ts +33 -2
- package/dist/src/execution/session/turn.js +1 -1
- package/dist/src/execution/session-callback-request.js +1 -1
- package/dist/src/execution/session-event-stream.d.ts +33 -0
- package/dist/src/execution/session-event-stream.js +1 -0
- package/dist/src/execution/session-inbox/inbox.d.ts +2 -0
- package/dist/src/execution/session-inbox/inbox.js +1 -1
- package/dist/src/execution/session-inbox/protocol.js +1 -1
- package/dist/src/execution/session-inbox/release-step.js +1 -1
- package/dist/src/execution/session-inbox/resume.js +1 -1
- package/dist/src/execution/session-workflow-tool-run.d.ts +11 -2
- package/dist/src/execution/session-workflow-tool-run.js +1 -1
- package/dist/src/execution/session.d.ts +0 -1
- package/dist/src/execution/session.js +2 -2
- package/dist/src/execution/settle-cancelled-turn-step.d.ts +21 -9
- package/dist/src/execution/settle-cancelled-turn-step.js +1 -1
- package/dist/src/execution/stable-workflow-names.d.ts +0 -1
- package/dist/src/execution/stable-workflow-names.js +1 -1
- package/dist/src/execution/tasks/calls.d.ts +42 -0
- package/dist/src/execution/tasks/calls.js +1 -0
- package/dist/src/execution/tasks/model-step.d.ts +58 -0
- package/dist/src/execution/tasks/model-step.js +1 -0
- package/dist/src/execution/tasks/render.d.ts +66 -0
- package/dist/src/execution/tasks/render.js +8 -0
- package/dist/src/execution/tasks/session.d.ts +19 -0
- package/dist/src/execution/tasks/session.js +1 -0
- package/dist/src/execution/tasks/start.d.ts +34 -0
- package/dist/src/execution/tasks/start.js +1 -0
- package/dist/src/execution/tasks/steps.d.ts +31 -0
- package/dist/src/execution/tasks/steps.js +1 -0
- package/dist/src/execution/tasks/table.d.ts +192 -0
- package/dist/src/execution/tasks/table.js +1 -0
- package/dist/src/execution/tasks/task-id-input.d.ts +19 -0
- package/dist/src/execution/tasks/task-id-input.js +1 -0
- package/dist/src/execution/tasks/tool-entry-point.d.ts +11 -0
- package/dist/src/execution/tasks/tool-entry-point.js +1 -0
- package/dist/src/execution/tasks/workflow-target.d.ts +2 -0
- package/dist/src/execution/tasks/workflow-target.js +1 -1
- package/dist/src/execution/terminal-session-completion-step.js +1 -1
- package/dist/src/execution/terminal-session-failure-step.js +1 -1
- package/dist/src/execution/terminate-child-sessions-step.d.ts +2 -9
- package/dist/src/execution/terminate-child-sessions-step.js +1 -1
- package/dist/src/execution/tool-auth.js +1 -1
- package/dist/src/execution/tools/agent-router-workflow.d.ts +1 -1
- package/dist/src/execution/tools/agent-router-workflow.js +1 -1
- package/dist/src/execution/tools/agent-router.d.ts +1 -1
- package/dist/src/execution/tools/agent-router.js +1 -1
- package/dist/src/execution/tools/connection-approval.d.ts +25 -0
- package/dist/src/execution/tools/connection-approval.js +1 -0
- package/dist/src/execution/tools/connection-search-rank.d.ts +21 -0
- package/dist/src/execution/tools/connection-search-rank.js +1 -0
- package/dist/src/execution/tools/connection-target.d.ts +13 -0
- package/dist/src/execution/tools/connection-target.js +1 -0
- package/dist/src/execution/tools/connection-tools.d.ts +10 -0
- package/dist/src/execution/tools/connection-tools.js +2 -0
- package/dist/src/execution/tools/load-skill.js +1 -1
- package/dist/src/execution/tools/workflow/answer.d.ts +10 -4
- package/dist/src/execution/tools/workflow/answer.js +1 -1
- package/dist/src/execution/tools/workflow/ask.d.ts +73 -10
- package/dist/src/execution/tools/workflow/ask.js +1 -1
- package/dist/src/execution/tools/workflow/body.d.ts +60 -19
- package/dist/src/execution/tools/workflow/body.js +1 -1
- package/dist/src/execution/tools/workflow/cancel.d.ts +7 -2
- package/dist/src/execution/tools/workflow/cancel.js +1 -1
- package/dist/src/execution/tools/workflow/emit-workflow-tool-run-report-step.d.ts +10 -4
- package/dist/src/execution/tools/workflow/emit-workflow-tool-run-report-step.js +1 -1
- package/dist/src/execution/tools/workflow/{background.d.ts → harness-definition.d.ts} +6 -6
- package/dist/src/execution/tools/workflow/harness-definition.js +1 -0
- package/dist/src/execution/tools/workflow/interrupt.d.ts +6 -0
- package/dist/src/execution/tools/workflow/interrupt.js +1 -0
- package/dist/src/execution/tools/workflow/messages.d.ts +135 -10
- package/dist/src/execution/tools/workflow/messages.js +1 -1
- package/dist/src/execution/tools/workflow/owner-inbox.js +1 -1
- package/dist/src/execution/tools/workflow/owner.d.ts +15 -4
- package/dist/src/execution/tools/workflow/owner.js +1 -1
- package/dist/src/execution/tools/workflow/serve.d.ts +3 -0
- package/dist/src/execution/tools/workflow/serve.js +1 -0
- package/dist/src/execution/tools/workflow/start.d.ts +18 -11
- package/dist/src/execution/tools/workflow/start.js +1 -1
- package/dist/src/execution/tools/workflow/step-execution.js +1 -1
- package/dist/src/execution/tools/workflow/step.js +1 -1
- package/dist/src/execution/tools/workflow/types.d.ts +0 -10
- package/dist/src/execution/tools/workflow/withdraw-step.d.ts +31 -0
- package/dist/src/execution/tools/workflow/withdraw-step.js +1 -0
- package/dist/src/execution/tools/workflow/workflow-owner-blocking.d.ts +3 -5
- package/dist/src/execution/tools/workflow/workflow-owner-blocking.js +1 -1
- package/dist/src/execution/tools/workflow/workflow.d.ts +3 -3
- package/dist/src/execution/tools/workflow/workflow.js +1 -1
- package/dist/src/execution/web-fetch/request.js +1 -1
- package/dist/src/execution/workflow-callback-url.d.ts +0 -5
- package/dist/src/execution/workflow-callback-url.js +1 -1
- package/dist/src/execution/workflow-runtime.d.ts +3 -5
- package/dist/src/execution/workflow-runtime.js +1 -1
- package/dist/src/execution/workflow-webhook-route.js +1 -1
- package/dist/src/extensions/code/extension/lib/connect-authentication.js +1 -1
- package/dist/src/extensions/code/extension/lib/github-shell.js +1 -1
- package/dist/src/extensions/code/extension/lib/prwatch-github.js +1 -1
- package/dist/src/extensions/code/extension/lib/sandbox.d.ts +3 -2
- package/dist/src/extensions/code/extension/lib/sandbox.js +1 -1
- package/dist/src/extensions/code/extension/lib/signed-commit.d.ts +1 -1
- package/dist/src/extensions/code/extension/lib/signed-commit.js +2 -2
- package/dist/src/extensions/code/tools.d.ts +2 -1
- package/dist/src/extensions/code/tools.js +1 -1
- package/dist/src/framework/sources/modules/agent.d.ts +1 -0
- package/dist/src/framework/sources/modules/agent.js +1 -1
- package/dist/src/framework/sources/registry.js +1 -1
- package/dist/src/harness/action-presentation.js +1 -1
- package/dist/src/harness/action-result-helpers.d.ts +1 -0
- package/dist/src/harness/action-result-helpers.js +1 -1
- package/dist/src/harness/advertised-tools.d.ts +1 -1
- package/dist/src/harness/advertised-tools.js +1 -1
- package/dist/src/harness/announcements.d.ts +22 -0
- package/dist/src/harness/announcements.js +1 -0
- package/dist/src/harness/approval-candidates.d.ts +10 -2
- package/dist/src/harness/approval-candidates.js +1 -1
- package/dist/src/harness/approval-delivery-coordinator.d.ts +4 -5
- package/dist/src/harness/approval-delivery-coordinator.js +1 -1
- package/dist/src/harness/approval-recheck.d.ts +7 -0
- package/dist/src/harness/approval-recheck.js +1 -0
- package/dist/src/harness/authorization-event-fields.d.ts +13 -0
- package/dist/src/harness/authorization-event-fields.js +1 -0
- package/dist/src/harness/authorization.d.ts +2 -1
- package/dist/src/harness/authorization.js +1 -1
- package/dist/src/harness/coordination.d.ts +31 -27
- package/dist/src/harness/coordination.js +1 -1
- package/dist/src/harness/current-messages.d.ts +6 -1
- package/dist/src/harness/current-messages.js +1 -1
- package/dist/src/harness/emission.d.ts +7 -1
- package/dist/src/harness/emission.js +1 -1
- package/dist/src/harness/execute-tool.d.ts +4 -15
- package/dist/src/harness/hitl/session-limit-input-requests.d.ts +2 -0
- package/dist/src/harness/hitl/session-limit-input-requests.js +1 -1
- package/dist/src/harness/input-request-resolution.d.ts +5 -2
- package/dist/src/harness/input-request-resolution.js +1 -1
- package/dist/src/harness/input-requests.js +1 -1
- package/dist/src/harness/messages.d.ts +11 -3
- package/dist/src/harness/messages.js +1 -1
- package/dist/src/harness/nested-actions.d.ts +23 -0
- package/dist/src/harness/nested-actions.js +1 -0
- package/dist/src/harness/pending-input-batches.d.ts +8 -6
- package/dist/src/harness/pending-input-batches.js +1 -1
- package/dist/src/harness/provider-tool-history.d.ts +7 -2
- package/dist/src/harness/provider-tool-history.js +1 -1
- package/dist/src/harness/proxy-input-requests.d.ts +41 -36
- package/dist/src/harness/proxy-input-requests.js +1 -1
- package/dist/src/harness/session-limit-enforcement.js +1 -1
- package/dist/src/harness/stale-input-responses.js +1 -1
- package/dist/src/harness/step-hooks.js +1 -1
- package/dist/src/harness/tool-loop.js +2 -2
- package/dist/src/harness/tool-model-output.js +1 -1
- package/dist/src/harness/tool-presentation.js +1 -1
- package/dist/src/harness/tools.d.ts +1 -5
- package/dist/src/harness/tools.js +1 -1
- package/dist/src/harness/turn-tag-state.d.ts +6 -5
- package/dist/src/harness/types.d.ts +7 -15
- package/dist/src/harness/workflow-dispatch.d.ts +30 -0
- package/dist/src/harness/workflow-dispatch.js +1 -0
- package/dist/src/harness/workflow-tool-runs.d.ts +5 -65
- package/dist/src/harness/workflow-tool-runs.js +1 -1
- package/dist/src/instrumentation/ai-sdk-hook-bridge.js +1 -1
- package/dist/src/instrumentation/lifecycle.d.ts +5 -2
- package/dist/src/instrumentation/lifecycle.js +1 -1
- package/dist/src/instrumentation/native-events.d.ts +0 -7
- package/dist/src/instrumentation/native-events.js +1 -1
- package/dist/src/instrumentation/runtime.d.ts +1 -4
- package/dist/src/instrumentation/runtime.js +1 -1
- package/dist/src/instrumentation/state.d.ts +0 -6
- package/dist/src/instrumentation/state.js +1 -1
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/internal/authored-definition/schema-backed.d.ts +10 -0
- package/dist/src/internal/authored-definition/schema-backed.js +1 -1
- package/dist/src/internal/authored-module-loader.d.ts +12 -6
- package/dist/src/internal/authored-module-loader.js +2 -2
- package/dist/src/internal/authored-module-map-loader.js +1 -1
- package/dist/src/internal/authored-package-boundary.d.ts +3 -0
- package/dist/src/internal/authored-package-boundary.js +1 -1
- package/dist/src/internal/bundler/extension-mount-plugin.d.ts +14 -0
- package/dist/src/internal/bundler/extension-mount-plugin.js +1 -0
- package/dist/src/internal/bundler/extension-scope-plugin.d.ts +8 -11
- package/dist/src/internal/bundler/extension-scope-plugin.js +2 -3
- package/dist/src/internal/invocation/workflow-execution.d.ts +2 -2
- package/dist/src/internal/invocation/workflow-execution.js +1 -1
- package/dist/src/internal/mount-state.d.ts +1 -0
- package/dist/src/internal/mount-state.js +1 -0
- package/dist/src/internal/nitro/dev-runtime-artifacts-retention.d.ts +2 -2
- package/dist/src/internal/nitro/dev-runtime-artifacts-retention.js +1 -1
- package/dist/src/internal/nitro/dev-runtime-artifacts.d.ts +2 -4
- package/dist/src/internal/nitro/dev-runtime-artifacts.js +1 -1
- package/dist/src/internal/nitro/dev-runtime-generation-metadata.d.ts +13 -0
- package/dist/src/internal/nitro/dev-runtime-generation-metadata.js +1 -0
- package/dist/src/internal/nitro/development-generation.d.ts +2 -0
- package/dist/src/internal/nitro/development-generation.js +1 -1
- package/dist/src/internal/nitro/host/build-application.js +1 -1
- package/dist/src/internal/nitro/host/create-application-nitro.js +1 -1
- package/dist/src/internal/nitro/host/dev-authored-rebuild-coordinator.d.ts +1 -0
- package/dist/src/internal/nitro/host/dev-authored-rebuild-coordinator.js +1 -1
- package/dist/src/internal/nitro/host/dev-host-fingerprint.js +1 -1
- package/dist/src/internal/nitro/host/dev-workflow-world-setup.d.ts +1 -0
- package/dist/src/internal/nitro/host/dev-workflow-world-setup.js +1 -1
- package/dist/src/internal/nitro/host/extension-capability-requirements.js +1 -1
- package/dist/src/internal/nitro/host/start-development-server.js +1 -1
- package/dist/src/internal/nitro/host/types.d.ts +2 -0
- package/dist/src/internal/nitro/host/workspace-extensions.js +1 -1
- package/dist/src/internal/nitro/routes/runtime-stack.js +1 -1
- package/dist/src/internal/node-esm-compat-banner.js +1 -1
- package/dist/src/internal/workflow/cancel-expired-development-run.d.ts +2 -0
- package/dist/src/internal/workflow/cancel-expired-development-run.js +1 -0
- package/dist/src/internal/workflow/development-runtime-compatibility.d.ts +12 -0
- package/dist/src/internal/workflow/development-runtime-compatibility.js +1 -0
- package/dist/src/internal/workflow/development-world-client.js +1 -1
- package/dist/src/internal/workflow/development-world-protocol.d.ts +9 -0
- package/dist/src/internal/workflow/development-world-server.d.ts +2 -0
- package/dist/src/internal/workflow/development-world-server.js +1 -1
- package/dist/src/internal/workflow/is-inactive-workflow-run-error.d.ts +2 -0
- package/dist/src/internal/workflow/is-inactive-workflow-run-error.js +1 -0
- package/dist/src/internal/workflow-bundle/authored-workflow-directives.d.ts +4 -3
- package/dist/src/internal/workflow-bundle/authored-workflow-directives.js +1 -1
- package/dist/src/internal/workflow-bundle/builder.js +1 -1
- package/dist/src/internal/workflow-bundle/dynamic-capability-transform-plugin.js +1 -1
- package/dist/src/internal/workflow-bundle/workflow-builders.js +1 -1
- package/dist/src/models/auto.d.ts +6 -0
- package/dist/src/models/auto.js +2 -2
- package/dist/src/protocol/message-version.d.ts +1 -0
- package/dist/src/protocol/message-version.js +1 -1
- package/dist/src/protocol/message.d.ts +126 -67
- package/dist/src/protocol/message.js +2 -2
- package/dist/src/protocol/remote-agent-protocol.d.ts +16 -0
- package/dist/src/protocol/remote-agent-protocol.js +1 -0
- package/dist/src/protocol/routes.d.ts +0 -6
- package/dist/src/protocol/routes.js +1 -1
- package/dist/src/protocol/task-tools.d.ts +21 -0
- package/dist/src/protocol/task-tools.js +1 -0
- package/dist/src/public/channels/auth.js +1 -1
- package/dist/src/public/channels/chat-sdk/chatSdkChannel.d.ts +25 -16
- package/dist/src/public/channels/chat-sdk/chatSdkChannel.js +2 -2
- package/dist/src/public/channels/chat-sdk/index.d.ts +1 -1
- package/dist/src/public/channels/chat-sdk/input-actions.d.ts +8 -0
- package/dist/src/public/channels/chat-sdk/input-actions.js +1 -0
- package/dist/src/public/channels/index.d.ts +1 -1
- package/dist/src/public/channels/linq/linqChannel.js +1 -1
- package/dist/src/public/channels/photon/photonIMessageChannel.js +1 -1
- package/dist/src/public/channels/slack/action-status.d.ts +11 -12
- package/dist/src/public/channels/slack/action-status.js +1 -1
- package/dist/src/public/channels/slack/api.js +1 -1
- package/dist/src/public/channels/slack/attachments.js +1 -1
- package/dist/src/public/channels/slack/auth.d.ts +3 -0
- package/dist/src/public/channels/slack/auth.js +1 -1
- package/dist/src/public/channels/slack/connections.d.ts +6 -6
- package/dist/src/public/channels/slack/connections.js +1 -1
- package/dist/src/public/channels/slack/defaults.d.ts +13 -19
- package/dist/src/public/channels/slack/defaults.js +4 -4
- package/dist/src/public/channels/slack/hitl.d.ts +22 -13
- package/dist/src/public/channels/slack/hitl.js +2 -2
- package/dist/src/public/channels/slack/index.d.ts +4 -3
- package/dist/src/public/channels/slack/index.js +1 -1
- package/dist/src/public/channels/slack/input-response.d.ts +1 -5
- package/dist/src/public/channels/slack/input-response.js +1 -1
- package/dist/src/public/channels/slack/interaction-cards.js +1 -1
- package/dist/src/public/channels/slack/interactions.js +1 -1
- package/dist/src/public/channels/slack/renderers.d.ts +76 -0
- package/dist/src/public/channels/slack/renderers.js +1 -0
- package/dist/src/public/channels/slack/session-operations.d.ts +6 -0
- package/dist/src/public/channels/slack/session-operations.js +1 -1
- package/dist/src/public/channels/slack/slackChannel.d.ts +47 -103
- package/dist/src/public/channels/slack/slackChannel.js +1 -1
- package/dist/src/public/channels/slack/task-card.d.ts +24 -0
- package/dist/src/public/channels/slack/task-card.js +1 -0
- package/dist/src/public/channels/telegram/hitl.d.ts +7 -1
- package/dist/src/public/channels/telegram/hitl.js +2 -1
- package/dist/src/public/channels/telegram/state.js +1 -1
- package/dist/src/public/channels/telegram/telegramChannel.d.ts +5 -0
- package/dist/src/public/channels/telegram/telegramChannel.js +1 -1
- package/dist/src/public/definitions/channel.d.ts +6 -1
- package/dist/src/public/definitions/channel.js +1 -1
- package/dist/src/public/definitions/connections/mcp.d.ts +4 -6
- package/dist/src/public/definitions/connections/openapi.d.ts +7 -8
- package/dist/src/public/definitions/extension.d.ts +2 -2
- package/dist/src/public/definitions/extension.js +1 -1
- package/dist/src/public/definitions/hook.d.ts +16 -4
- package/dist/src/public/definitions/state.d.ts +4 -2
- package/dist/src/public/definitions/state.js +1 -1
- package/dist/src/public/memory/index.d.ts +0 -1
- package/dist/src/public/models/openai/index.d.ts +1 -1
- package/dist/src/public/models/openai/index.js +1 -1
- package/dist/src/public/schedules/index.d.ts +1 -0
- package/dist/src/public/schedules/index.js +1 -1
- package/dist/src/public/server/index.d.ts +28 -0
- package/dist/src/public/server/index.js +1 -0
- package/dist/src/public/tools/index.d.ts +3 -2
- package/dist/src/public/tools/index.js +1 -1
- package/dist/src/public/tools/no-reply.d.ts +1 -0
- package/dist/src/public/tools/no-reply.js +1 -0
- package/dist/src/runtime/agent/bootstrap-model-utils.d.ts +6 -7
- package/dist/src/runtime/agent/bootstrap-model-utils.js +1 -1
- package/dist/src/runtime/agent/bootstrap.d.ts +0 -1
- package/dist/src/runtime/agent/bootstrap.js +1 -1
- package/dist/src/runtime/agent/mock-model-adapter.js +1 -1
- package/dist/src/runtime/agent/mock-model-fixtures.d.ts +1 -1
- package/dist/src/runtime/agent/mock-model-fixtures.js +2 -2
- package/dist/src/runtime/channels/registry.js +1 -1
- package/dist/src/runtime/connections/mcp-client.d.ts +1 -2
- package/dist/src/runtime/connections/openapi-client.js +1 -1
- package/dist/src/runtime/connections/scoped-authorization.d.ts +1 -1
- package/dist/src/runtime/connections/scoped-authorization.js +1 -1
- package/dist/src/runtime/connections/tool-result.d.ts +27 -0
- package/dist/src/runtime/connections/tool-result.js +2 -0
- package/dist/src/runtime/connections/tool-signature.d.ts +14 -0
- package/dist/src/runtime/connections/tool-signature.js +1 -0
- package/dist/src/runtime/local-dev-capability.js +1 -1
- package/dist/src/runtime/prompt/compose.d.ts +1 -3
- package/dist/src/runtime/prompt/compose.js +3 -3
- package/dist/src/runtime/resolve-agent-graph.js +1 -1
- package/dist/src/runtime/resolve-tool.js +1 -1
- package/dist/src/runtime/sessions/compiled-agent-cache.js +1 -1
- package/dist/src/runtime/sessions/runtime-context-keys.js +1 -1
- package/dist/src/runtime/sessions/turn.d.ts +1 -16
- package/dist/src/runtime/subagents/dynamic-remote-agent-config.js +1 -1
- package/dist/src/runtime/subagents/registry.js +1 -1
- package/dist/src/runtime/subagents/workflow-reference.d.ts +6 -3
- package/dist/src/runtime/subagents/workflow-reference.js +1 -1
- package/dist/src/runtime/subagents/workflow.d.ts +12 -6
- package/dist/src/runtime/subagents/workflow.js +1 -1
- package/dist/src/runtime/tools/registry.js +1 -1
- package/dist/src/self-modification/extension/classify-registry-item.d.ts +3 -0
- package/dist/src/self-modification/extension/classify-registry-item.js +1 -1
- package/dist/src/self-modification/extension/subagents/agent/agent.d.ts +1 -1
- package/dist/src/self-modification/extension/subagents/agent/agent.js +1 -1
- package/dist/src/self-modification/extension/subagents/agent/instructions.js +7 -7
- package/dist/src/self-modification/extension/subagents/agent/tools/registry_add.js +1 -1
- package/dist/src/self-modification/extension/subagents/agent/tools/search_registry.d.ts +2 -0
- package/dist/src/self-modification/extension/subagents/agent/tools/search_registry.js +1 -1
- package/dist/src/self-modification/extension/subagents/agent/tools/search_traces.js +1 -1
- package/dist/src/self-modification/scaffold.d.ts +2 -0
- package/dist/src/self-modification/scaffold.js +7 -0
- package/dist/src/self-modification/setup.js +1 -7
- package/dist/src/setup/boxes/model-capabilities.d.ts +2 -2
- package/dist/src/setup/boxes/model-capabilities.js +1 -1
- package/dist/src/setup/boxes/select-model.js +1 -1
- package/dist/src/setup/integrations/shopify/templates.d.ts +1 -1
- package/dist/src/setup/integrations/shopify/templates.js +31 -19
- package/dist/src/setup/integrations/web/setup.d.ts +0 -2
- package/dist/src/setup/integrations/web/setup.js +3 -3
- package/dist/src/setup/scaffold/create/agent-paths.d.ts +5 -0
- package/dist/src/setup/scaffold/create/agent-paths.js +1 -0
- package/dist/src/setup/scaffold/create/instructions-template.d.ts +1 -0
- package/dist/src/setup/scaffold/create/instructions-template.js +8 -0
- package/dist/src/setup/scaffold/create/project.js +3 -10
- package/dist/src/setup/scaffold/create/web-template.d.ts +1 -1
- package/dist/src/setup/scaffold/create/web-template.js +1 -1
- package/dist/src/shared/action-request-name.d.ts +3 -0
- package/dist/src/shared/action-request-name.js +1 -0
- package/dist/src/shared/action-types.d.ts +49 -21
- package/dist/src/shared/action-types.js +1 -1
- package/dist/src/shared/agent-definition.d.ts +0 -7
- package/dist/src/shared/chatgpt-model.d.ts +1 -1
- package/dist/src/shared/chatgpt-model.js +1 -1
- package/dist/src/shared/connection-types.d.ts +2 -3
- package/dist/src/shared/default-agent-model.d.ts +10 -1
- package/dist/src/shared/default-agent-model.js +1 -1
- package/dist/src/shared/extension-mount.d.ts +2 -0
- package/dist/src/shared/extension-mount.js +1 -0
- package/dist/src/shared/format-duration.d.ts +2 -0
- package/dist/src/shared/format-duration.js +1 -0
- package/dist/src/shared/gateway-model-catalog.d.ts +25 -2
- package/dist/src/shared/gateway-model-catalog.js +1 -1
- package/dist/src/shared/input.d.ts +1 -0
- package/dist/src/shared/memory-state.d.ts +1 -0
- package/dist/src/shared/memory-state.js +1 -1
- package/dist/src/shared/model-helper.d.ts +2 -2
- package/dist/src/shared/model-helper.js +1 -1
- package/dist/src/shared/model-summary.d.ts +2 -6
- package/dist/src/shared/model-summary.js +1 -1
- package/dist/src/shared/presentation-text.d.ts +5 -0
- package/dist/src/shared/presentation-text.js +1 -1
- package/dist/src/shared/serialized-observability-state.d.ts +0 -4
- package/dist/src/shared/serialized-observability-state.js +1 -1
- package/dist/src/shared/value-delta.d.ts +39 -0
- package/dist/src/shared/value-delta.js +1 -0
- package/dist/src/subagents/adapter-state.d.ts +0 -2
- package/dist/src/subagents/adapter-state.js +1 -1
- package/dist/src/subagents/adapter.js +1 -1
- package/dist/src/subagents/callback-route.js +1 -1
- package/dist/src/subagents/event-proxy-step.d.ts +16 -29
- package/dist/src/subagents/event-proxy-step.js +1 -1
- package/dist/src/subagents/hitl-proxy.d.ts +35 -17
- package/dist/src/subagents/hitl-proxy.js +1 -1
- package/dist/src/subagents/invocation.d.ts +1 -2
- package/dist/src/subagents/parent-notification.d.ts +2 -1
- package/dist/src/subagents/parent-notification.js +1 -1
- package/dist/src/subagents/token-budget.d.ts +8 -9
- package/dist/src/subagents/token-budget.js +1 -1
- package/dist/src/subagents/tool.d.ts +6 -12
- package/dist/src/subagents/tool.js +1 -1
- package/dist/src/svelte/index.js +1 -1
- package/dist/src/svelte/use-eve-agent.js +1 -1
- package/dist/src/tools/behavior.d.ts +5 -5
- package/dist/src/tools/definition.d.ts +58 -14
- package/dist/src/tools/definition.js +1 -1
- package/dist/src/tools/durable-callbacks.d.ts +1 -1
- package/dist/src/tools/dynamic.d.ts +6 -0
- package/dist/src/tools/framework/agent-contract.d.ts +2 -5
- package/dist/src/tools/framework/agent-contract.js +1 -1
- package/dist/src/tools/framework/agent.d.ts +2 -5
- package/dist/src/tools/framework/agent.js +1 -1
- package/dist/src/tools/framework/connection-tools.d.ts +3 -0
- package/dist/src/tools/framework/connection-tools.js +1 -0
- package/dist/src/tools/provided/agent-router.d.ts +6 -3
- package/dist/src/tools/provided/agent-router.js +1 -1
- package/dist/src/{execution/tools → tools/provided}/ask-question-workflow.d.ts +3 -4
- package/dist/src/tools/provided/ask-question-workflow.js +1 -0
- package/dist/src/tools/provided/ask-question.d.ts +20 -5
- package/dist/src/tools/provided/ask-question.js +2 -1
- package/dist/src/tools/provided/interrupted.d.ts +18 -0
- package/dist/src/tools/provided/interrupted.js +1 -0
- package/dist/src/tools/provided/no-reply.d.ts +19 -0
- package/dist/src/tools/provided/no-reply.js +1 -0
- package/dist/src/tools/provided/sleep-workflow.d.ts +4 -0
- package/dist/src/tools/provided/sleep-workflow.js +1 -0
- package/dist/src/tools/provided/sleep.d.ts +11 -5
- package/dist/src/tools/provided/sleep.js +1 -1
- package/dist/src/tools/provided/task-cancel.d.ts +6 -0
- package/dist/src/tools/provided/task-cancel.js +1 -0
- package/dist/src/tools/provided/task-wait.d.ts +9 -0
- package/dist/src/tools/provided/task-wait.js +1 -0
- package/dist/src/tools/provided/workflow.d.ts +2 -2
- package/dist/src/tools/provided/workflow.js +1 -1
- package/dist/src/tools/schema-emission.d.ts +23 -0
- package/dist/src/tools/schema-emission.js +1 -0
- package/dist/src/tools/schema.d.ts +22 -8
- package/dist/src/tools/schema.js +1 -1
- package/dist/src/tools/workflow-definition.d.ts +187 -85
- package/dist/src/tools/workflow-definition.js +1 -1
- package/dist/src/tools/workflow-entry-point.d.ts +3 -0
- package/dist/src/tools/workflow-entry-point.js +1 -0
- package/dist/src/tracing/agent-action-instrumentation.d.ts +1 -3
- package/dist/src/tracing/agent-action-instrumentation.js +1 -1
- package/dist/src/tracing/agent-invocation-coordinator.d.ts +9 -18
- package/dist/src/tracing/agent-invocation-coordinator.js +1 -1
- package/dist/src/tracing/agent-otel-content.d.ts +0 -2
- package/dist/src/tracing/agent-otel-content.js +3 -3
- package/dist/src/tracing/agent-otel-provider.js +2 -2
- package/dist/src/tracing/agent-otel-runtime-context.d.ts +20 -0
- package/dist/src/tracing/agent-otel-runtime-context.js +1 -1
- package/dist/src/tracing/agent-otel-usage.js +1 -1
- package/dist/src/tracing/agent-span-contract.d.ts +1 -1
- package/dist/src/tracing/agent-span-contract.js +1 -1
- package/dist/src/tracing/agent-span-id-generator.d.ts +0 -1
- package/dist/src/tracing/agent-span-id-generator.js +1 -1
- package/dist/src/tracing/agent-trace-context-codec.d.ts +1 -2
- package/dist/src/tracing/agent-trace-context-codec.js +1 -1
- package/dist/src/tracing/agent-trace-context-store.d.ts +2 -27
- package/dist/src/tracing/agent-trace-context-store.js +1 -1
- package/dist/src/tracing/agent-trace-state.d.ts +1 -19
- package/dist/src/tracing/content-attributes.js +1 -1
- package/dist/src/tracing/install-instrumentation-runtime.js +1 -1
- package/dist/src/vue/index.js +1 -1
- package/dist/src/vue/use-eve-agent.js +1 -1
- package/docs/agent-config.md +36 -13
- package/docs/channels/chat-sdk.mdx +15 -4
- package/docs/channels/custom.mdx +89 -17
- package/docs/channels/eve.mdx +1 -1
- package/docs/channels/mcp.mdx +1 -1
- package/docs/channels/overview.mdx +14 -56
- package/docs/channels/slack.mdx +230 -35
- package/docs/channels/telegram.mdx +2 -0
- package/docs/concepts/built-in-tools.md +36 -28
- package/docs/concepts/context-control.md +2 -2
- package/docs/concepts/execution-model-and-durability.mdx +10 -11
- package/docs/concepts/project-structure.mdx +1 -1
- package/docs/concepts/sessions-runs-and-streaming.md +67 -47
- package/docs/connections/mcp.mdx +4 -4
- package/docs/connections/openapi.mdx +2 -2
- package/docs/connections/overview.mdx +2 -2
- package/docs/evals/assertions.mdx +5 -5
- package/docs/evals/cases.mdx +1 -1
- package/docs/evals/reporters.mdx +6 -4
- package/docs/extensions.md +11 -2
- package/docs/guides/auth-and-route-protection.md +1 -1
- package/docs/guides/client/streaming.mdx +31 -11
- package/docs/guides/deployment/vercel.mdx +1 -1
- package/docs/guides/dev-tui.md +13 -3
- package/docs/guides/dynamic-capabilities.md +15 -10
- package/docs/guides/evaluate.md +29 -2
- package/docs/guides/frontend/overview.mdx +5 -7
- package/docs/guides/hooks.md +48 -12
- package/docs/guides/instrumentation/instrumentation.mdx +2 -0
- package/docs/guides/remote-agents.md +12 -14
- package/docs/guides/self-modification.md +10 -0
- package/docs/install-integrations.mdx +1 -1
- package/docs/instructions.mdx +1 -1
- package/docs/patterns/multi-tenant-approvals.md +1 -1
- package/docs/protocols/ucp.mdx +20 -16
- package/docs/reference/cli.md +96 -22
- package/docs/reference/typescript-api.md +43 -41
- package/docs/schedules.mdx +14 -34
- package/docs/subagents/index.mdx +24 -56
- package/docs/tools/human-in-the-loop.md +50 -13
- package/docs/tools/meta.json +1 -1
- package/docs/tools/overview.mdx +79 -59
- package/docs/tools/tasks-upgrade.md +201 -0
- package/docs/tools/tasks.md +315 -0
- package/docs/tools/workflows.mdx +368 -154
- package/package.json +41 -14
- package/dist/src/channel/activity-renderer.d.ts +0 -21
- package/dist/src/channel/activity-renderer.js +0 -1
- package/dist/src/channel/activity-sink.d.ts +0 -2
- package/dist/src/channel/activity-sink.js +0 -1
- package/dist/src/eve-channel/activity-observer-request.d.ts +0 -7
- package/dist/src/eve-channel/activity-observer-request.js +0 -1
- package/dist/src/eve-channel/delivery-policy-request.d.ts +0 -4
- package/dist/src/eve-channel/delivery-policy-request.js +0 -1
- package/dist/src/execution/activity-cohort.d.ts +0 -20
- package/dist/src/execution/activity-cohort.js +0 -1
- package/dist/src/execution/activity-collector.d.ts +0 -12
- package/dist/src/execution/activity-collector.js +0 -1
- package/dist/src/execution/activity-events.d.ts +0 -8
- package/dist/src/execution/activity-events.js +0 -1
- package/dist/src/execution/activity-route.d.ts +0 -2
- package/dist/src/execution/activity-route.js +0 -1
- package/dist/src/execution/activity-work-id.d.ts +0 -9
- package/dist/src/execution/activity-work-id.js +0 -1
- package/dist/src/execution/activity-work.d.ts +0 -30
- package/dist/src/execution/activity-work.js +0 -1
- package/dist/src/execution/cancel-indexed-session-tasks-step.d.ts +0 -7
- package/dist/src/execution/cancel-indexed-session-tasks-step.js +0 -1
- package/dist/src/execution/dispatch-action-failures.d.ts +0 -8
- package/dist/src/execution/dispatch-action-failures.js +0 -1
- package/dist/src/execution/dispatch-start-operation.d.ts +0 -15
- package/dist/src/execution/dispatch-start-operation.js +0 -1
- package/dist/src/execution/publish-channel-event.d.ts +0 -23
- package/dist/src/execution/publish-channel-event.js +0 -1
- package/dist/src/execution/scheduled-launch-delivery.d.ts +0 -7
- package/dist/src/execution/scheduled-launch-delivery.js +0 -1
- package/dist/src/execution/session/event-sink.d.ts +0 -26
- package/dist/src/execution/session/event-sink.js +0 -1
- package/dist/src/execution/session-activity-projection.d.ts +0 -16
- package/dist/src/execution/session-activity-projection.js +0 -1
- package/dist/src/execution/session-activity-renderer-step.d.ts +0 -15
- package/dist/src/execution/session-activity-renderer-step.js +0 -1
- package/dist/src/execution/session-activity.d.ts +0 -3
- package/dist/src/execution/session-activity.js +0 -1
- package/dist/src/execution/submit-activity.d.ts +0 -7
- package/dist/src/execution/submit-activity.js +0 -1
- package/dist/src/execution/task-event-callback.d.ts +0 -12
- package/dist/src/execution/task-event-callback.js +0 -1
- package/dist/src/execution/task-input-capability.d.ts +0 -4
- package/dist/src/execution/task-input-capability.js +0 -1
- package/dist/src/execution/task-input-response-route.d.ts +0 -2
- package/dist/src/execution/task-input-response-route.js +0 -1
- package/dist/src/execution/tasks/child/notify.d.ts +0 -44
- package/dist/src/execution/tasks/child/notify.js +0 -1
- package/dist/src/execution/tasks/parent/control-shared.d.ts +0 -23
- package/dist/src/execution/tasks/parent/control-shared.js +0 -1
- package/dist/src/execution/tasks/parent/delegate.d.ts +0 -35
- package/dist/src/execution/tasks/parent/delegate.js +0 -1
- package/dist/src/execution/tasks/parent/dispatch.d.ts +0 -22
- package/dist/src/execution/tasks/parent/dispatch.js +0 -1
- package/dist/src/execution/tasks/parent/hitl-proxy-steps.d.ts +0 -27
- package/dist/src/execution/tasks/parent/hitl-proxy-steps.js +0 -1
- package/dist/src/execution/tasks/parent/run-parent.d.ts +0 -58
- package/dist/src/execution/tasks/parent/run-parent.js +0 -1
- package/dist/src/execution/tasks/parent/subagent-task-projection.d.ts +0 -26
- package/dist/src/execution/tasks/parent/subagent-task-projection.js +0 -1
- package/dist/src/execution/tasks/parent/task-cancel.d.ts +0 -12
- package/dist/src/execution/tasks/parent/task-cancel.js +0 -1
- package/dist/src/execution/tasks/parent/tool-execution.d.ts +0 -45
- package/dist/src/execution/tasks/parent/tool-execution.js +0 -1
- package/dist/src/execution/terminal-session-event.d.ts +0 -13
- package/dist/src/execution/terminal-session-event.js +0 -1
- package/dist/src/execution/tools/ask-question-workflow.js +0 -1
- package/dist/src/execution/tools/ask-question.d.ts +0 -19
- package/dist/src/execution/tools/ask-question.js +0 -2
- package/dist/src/execution/tools/connection-search.d.ts +0 -2
- package/dist/src/execution/tools/connection-search.js +0 -2
- package/dist/src/execution/tools/sleep-workflow.d.ts +0 -3
- package/dist/src/execution/tools/sleep-workflow.js +0 -1
- package/dist/src/execution/tools/sleep.d.ts +0 -10
- package/dist/src/execution/tools/sleep.js +0 -1
- package/dist/src/execution/tools/subagent/accept-event-step.d.ts +0 -7
- package/dist/src/execution/tools/subagent/accept-event-step.js +0 -1
- package/dist/src/execution/tools/subagent/emit-event-step.d.ts +0 -12
- package/dist/src/execution/tools/subagent/emit-event-step.js +0 -1
- package/dist/src/execution/tools/subagent/invoke-agent.d.ts +0 -42
- package/dist/src/execution/tools/subagent/invoke-agent.js +0 -1
- package/dist/src/execution/tools/subagent/invoke-preparation.d.ts +0 -44
- package/dist/src/execution/tools/subagent/invoke-preparation.js +0 -1
- package/dist/src/execution/tools/subagent/invoke-step.d.ts +0 -64
- package/dist/src/execution/tools/subagent/invoke-step.js +0 -1
- package/dist/src/execution/tools/subagent/receipt-identity.d.ts +0 -11
- package/dist/src/execution/tools/subagent/receipt-identity.js +0 -1
- package/dist/src/execution/tools/subagent/start.d.ts +0 -51
- package/dist/src/execution/tools/subagent/start.js +0 -1
- package/dist/src/execution/tools/subagent/steer.d.ts +0 -13
- package/dist/src/execution/tools/subagent/steer.js +0 -1
- package/dist/src/execution/tools/subagent/task-agent-requests.d.ts +0 -24
- package/dist/src/execution/tools/subagent/task-agent-requests.js +0 -1
- package/dist/src/execution/tools/subagent/task-cancel.d.ts +0 -10
- package/dist/src/execution/tools/subagent/task-cancel.js +0 -1
- package/dist/src/execution/tools/tasks.d.ts +0 -3
- package/dist/src/execution/tools/tasks.js +0 -1
- package/dist/src/execution/tools/workflow/background.js +0 -1
- package/dist/src/execution/tools/workflow/workflow-owner-background.d.ts +0 -14
- package/dist/src/execution/tools/workflow/workflow-owner-background.js +0 -1
- package/dist/src/extensions/code/extension/tools/computer_use.js +0 -1
- package/dist/src/harness/background-tools.d.ts +0 -45
- package/dist/src/harness/background-tools.js +0 -1
- package/dist/src/instrumentation/background-task-runtime.d.ts +0 -18
- package/dist/src/instrumentation/background-task-runtime.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-config@0.3.0/node_modules/@vercel/cli-config/dist/index.js +0 -21
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/envpath.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/errors.js +0 -2
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/errutils.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/exec.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/fsutils.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/index.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/lookup.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_cli-exec@1.0.1/node_modules/@vercel/cli-exec/dist/safety.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/authorization.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/connector.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/index.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/installation.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/internal/base-url.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/internal/default-scopes.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/internal/env.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/internal/url-validation.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_connect@2.3.3_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_a37674779346d612fa7d2ca9bd316494/node_modules/@vercel/connect/dist/token.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/auth-errors.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/exchange-vercel-oidc-token.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/get-context.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/get-vercel-oidc-token-sync.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/get-vercel-oidc-token-with-refresh.js +0 -2
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/index.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/oauth.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/token-error.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/token-io.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/token-util.js +0 -2
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/token.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/verify-vercel-oidc-token.js +0 -1
- package/dist/src/node_modules/.pnpm/@vercel_oidc@3.8.9/node_modules/@vercel/oidc/dist/version.js +0 -1
- package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js +0 -1
- package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js +0 -1
- package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js +0 -1
- package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js +0 -1
- package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js +0 -1
- package/dist/src/node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js +0 -1
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/index.js +0 -1
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/command.js +0 -1
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/error.js +0 -2
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/kill.js +0 -1
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/promise.js +0 -1
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/stdio.js +0 -1
- package/dist/src/node_modules/.pnpm/execa@5.1.1/node_modules/execa/lib/stream.js +0 -1
- package/dist/src/node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/buffer-stream.js +0 -1
- package/dist/src/node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/index.js +0 -1
- package/dist/src/node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/core.js +0 -1
- package/dist/src/node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/main.js +0 -1
- package/dist/src/node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/realtime.js +0 -1
- package/dist/src/node_modules/.pnpm/human-signals@2.1.0/node_modules/human-signals/build/src/signals.js +0 -1
- package/dist/src/node_modules/.pnpm/is-stream@2.0.1/node_modules/is-stream/index.js +0 -1
- package/dist/src/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js +0 -1
- package/dist/src/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js +0 -1
- package/dist/src/node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/index.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/compact/decrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/compact/encrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/flattened/decrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/flattened/encrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/general/decrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwe/general/encrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwk/embedded.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwk/thumbprint.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwks/local.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwks/remote.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/compact/sign.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/compact/verify.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/flattened/sign.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/flattened/verify.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/general/sign.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jws/general/verify.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/decrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/encrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/produce.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/sign.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/unsecured.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/jwt/verify.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/key/export.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/key/generate_key_pair.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/key/generate_secret.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/key/import.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/aesgcmkw.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/buffer_utils.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/cek.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/check_iv_length.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/check_key_type.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/check_p2s.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/crypto_key.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/decrypt_key_management.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/encrypt_key_management.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/epoch.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/invalid_key_input.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/is_disjoint.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/is_jwk.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/is_object.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/iv.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/jwt_claims_set.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/private_symbols.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/secs.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/validate_algorithms.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/lib/validate_crit.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/aeskw.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/asn1.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/base64url.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/cbc_tag.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/check_cek_length.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/check_key_length.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/ciphers.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/decrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/digest.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/dsa_digest.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/ecdhes.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/encrypt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/fetch_jwks.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/generate.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/get_named_curve.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/get_sign_verify_key.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/hmac_digest.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/is_key_like.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/is_key_object.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/jwk_to_key.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/key_to_jwk.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/node_key.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/normalize_key.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/pbes2kw.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/random.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/rsaes.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/runtime.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/sign.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/timing_safe_equal.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/verify.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/runtime/webcrypto.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/base64url.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/decode_jwt.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/decode_protected_header.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/errors.js +0 -1
- package/dist/src/node_modules/.pnpm/jose@5.10.0/node_modules/jose/dist/node/cjs/util/runtime.js +0 -1
- package/dist/src/node_modules/.pnpm/merge-stream@2.0.0/node_modules/merge-stream/index.js +0 -1
- package/dist/src/node_modules/.pnpm/mimic-fn@2.1.0/node_modules/mimic-fn/index.js +0 -1
- package/dist/src/node_modules/.pnpm/npm-run-path@4.0.1/node_modules/npm-run-path/index.js +0 -1
- package/dist/src/node_modules/.pnpm/onetime@5.1.2/node_modules/onetime/index.js +0 -1
- package/dist/src/node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js +0 -1
- package/dist/src/node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js +0 -1
- package/dist/src/node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js +0 -1
- package/dist/src/node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js +0 -1
- package/dist/src/node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/signals.js +0 -1
- package/dist/src/node_modules/.pnpm/strip-final-newline@2.0.0/node_modules/strip-final-newline/index.js +0 -2
- package/dist/src/node_modules/.pnpm/which@2.0.2/node_modules/which/which.js +0 -1
- package/dist/src/protocol/activity.d.ts +0 -112
- package/dist/src/protocol/activity.js +0 -1
- package/dist/src/protocol/agent-handle-error.d.ts +0 -13
- package/dist/src/protocol/agent-handle-error.js +0 -1
- package/dist/src/public/channels/slack/activity-plan.d.ts +0 -5
- package/dist/src/public/channels/slack/activity-plan.js +0 -1
- package/dist/src/public/channels/slack/activity.d.ts +0 -63
- package/dist/src/public/channels/slack/activity.js +0 -2
- package/dist/src/public/tools/connection-search.d.ts +0 -1
- package/dist/src/public/tools/connection-search.js +0 -1
- package/dist/src/public/tools/task-cancel.d.ts +0 -1
- package/dist/src/public/tools/task-cancel.js +0 -1
- package/dist/src/runtime/prompt/connections.d.ts +0 -9
- package/dist/src/runtime/prompt/connections.js +0 -2
- package/dist/src/shared/boundary-hook-error.d.ts +0 -4
- package/dist/src/shared/boundary-hook-error.js +0 -1
- package/dist/src/shared/empty-delivery.d.ts +0 -3
- package/dist/src/shared/empty-delivery.js +0 -1
- package/dist/src/subagents/agent-handle-errors.d.ts +0 -25
- package/dist/src/subagents/agent-handle-errors.js +0 -1
- package/dist/src/subagents/callback-step.d.ts +0 -11
- package/dist/src/subagents/callback-step.js +0 -1
- package/dist/src/subagents/continuation-bundle.d.ts +0 -13
- package/dist/src/subagents/continuation-bundle.js +0 -1
- package/dist/src/subagents/handle-dispatch.d.ts +0 -65
- package/dist/src/subagents/handle-dispatch.js +0 -1
- package/dist/src/subagents/handles/operation-id.d.ts +0 -15
- package/dist/src/subagents/handles/operation-id.js +0 -1
- package/dist/src/subagents/handles/prompt.d.ts +0 -52
- package/dist/src/subagents/handles/prompt.js +0 -3
- package/dist/src/subagents/handles/query.d.ts +0 -41
- package/dist/src/subagents/handles/query.js +0 -1
- package/dist/src/subagents/handles/state-key.d.ts +0 -8
- package/dist/src/subagents/handles/state-key.js +0 -1
- package/dist/src/subagents/handles/store.d.ts +0 -217
- package/dist/src/subagents/handles/store.js +0 -1
- package/dist/src/subagents/handles/transitions.d.ts +0 -103
- package/dist/src/subagents/handles/transitions.js +0 -1
- package/dist/src/subagents/remote-dispatch.js +0 -1
- package/dist/src/subagents/start-local.d.ts +0 -29
- package/dist/src/subagents/start-local.js +0 -1
- package/dist/src/subagents/start-remote.d.ts +0 -21
- package/dist/src/subagents/start-remote.js +0 -1
- package/dist/src/tasks/delivery-context.d.ts +0 -32
- package/dist/src/tasks/delivery-context.js +0 -4
- package/dist/src/tasks/delivery-policy.d.ts +0 -14
- package/dist/src/tasks/delivery-policy.js +0 -1
- package/dist/src/tasks/json.d.ts +0 -88
- package/dist/src/tasks/json.js +0 -1
- package/dist/src/tasks/notification.d.ts +0 -10
- package/dist/src/tasks/notification.js +0 -1
- package/dist/src/tasks/task-id.d.ts +0 -31
- package/dist/src/tasks/task-id.js +0 -1
- package/dist/src/tasks/task-inbox-token.d.ts +0 -2
- package/dist/src/tasks/task-inbox-token.js +0 -1
- package/dist/src/tasks/transitions.d.ts +0 -17
- package/dist/src/tasks/transitions.js +0 -1
- package/dist/src/tasks/types.d.ts +0 -136
- package/dist/src/tasks/types.js +0 -1
- package/dist/src/tools/framework/connection-search.d.ts +0 -3
- package/dist/src/tools/framework/connection-search.js +0 -1
- package/dist/src/tools/framework/task-cancel.d.ts +0 -4
- package/dist/src/tools/framework/task-cancel.js +0 -1
- package/dist/src/tools/framework/task-contract.d.ts +0 -19
- package/dist/src/tools/framework/task-contract.js +0 -1
- package/dist/src/tools/native-definition.d.ts +0 -7
- package/dist/src/tools/native-definition.js +0 -1
- package/dist/src/tracing/agent-invocation-terminal.d.ts +0 -18
- package/dist/src/tracing/agent-invocation-terminal.js +0 -1
- /package/dist/src/{extensions/code → computer-use}/extension/lib/computer-use-driver-source.d.ts +0 -0
- /package/dist/src/{extensions/code → computer-use}/extension/lib/computer-use-driver-source.js +0 -0
- /package/dist/src/{extensions/code → computer-use}/extension/tools/computer_use.d.ts +0 -0
- /package/dist/src/execution/{tools/subagent → agent-sessions}/metadata.d.ts +0 -0
- /package/dist/src/execution/{tools/subagent → agent-sessions}/metadata.js +0 -0
|
@@ -3,7 +3,6 @@ import type { RuntimeModelReference } from "#runtime/agent/bootstrap.js";
|
|
|
3
3
|
import type { HarnessToolDefinition } from "#harness/execute-tool.js";
|
|
4
4
|
import type { HarnessToolMap } from "#harness/types.js";
|
|
5
5
|
import type { ToolExecuteOptions } from "#tools/definition.js";
|
|
6
|
-
import { type BackgroundToolCallBatch } from "#harness/background-tools.js";
|
|
7
6
|
/**
|
|
8
7
|
* Builds an AI SDK `ToolSet` from unified harness tool definitions.
|
|
9
8
|
*
|
|
@@ -17,7 +16,6 @@ import { type BackgroundToolCallBatch } from "#harness/background-tools.js";
|
|
|
17
16
|
*/
|
|
18
17
|
export declare function buildToolSet(input: {
|
|
19
18
|
readonly approvedTools?: ReadonlySet<string>;
|
|
20
|
-
readonly backgroundBatch?: BackgroundToolCallBatch;
|
|
21
19
|
readonly disabledProviderTools?: ReadonlySet<string>;
|
|
22
20
|
readonly tools: HarnessToolMap;
|
|
23
21
|
}): ToolSet;
|
|
@@ -29,7 +27,6 @@ export declare function buildToolSet(input: {
|
|
|
29
27
|
*/
|
|
30
28
|
export declare function buildToolSetFromDefinitions(input: {
|
|
31
29
|
readonly approvedTools?: ReadonlySet<string>;
|
|
32
|
-
readonly backgroundBatch?: BackgroundToolCallBatch;
|
|
33
30
|
readonly disabledProviderTools?: ReadonlySet<string>;
|
|
34
31
|
readonly tools: readonly HarnessToolDefinition[];
|
|
35
32
|
}): ToolSet;
|
|
@@ -40,7 +37,7 @@ export declare function buildToolSetFromDefinitions(input: {
|
|
|
40
37
|
* omits OAuth URLs, user codes, and hook URLs from model-facing history.
|
|
41
38
|
* Returns `undefined` for client-side tools (no `execute`).
|
|
42
39
|
*/
|
|
43
|
-
export declare function wrapToolExecute(definition: HarnessToolDefinition
|
|
40
|
+
export declare function wrapToolExecute(definition: HarnessToolDefinition): ((input: any, options: ToolExecuteOptions) => Promise<any> | AsyncIterable<any>) | undefined;
|
|
44
41
|
/**
|
|
45
42
|
* Builds the AI SDK ToolSet for one harness step.
|
|
46
43
|
*
|
|
@@ -62,7 +59,6 @@ export declare function wrapToolExecute(definition: HarnessToolDefinition, backg
|
|
|
62
59
|
*/
|
|
63
60
|
export declare function buildToolSetWithProviderTools(input: {
|
|
64
61
|
readonly approvedTools?: ReadonlySet<string>;
|
|
65
|
-
readonly backgroundBatch?: BackgroundToolCallBatch;
|
|
66
62
|
readonly disabledProviderTools?: ReadonlySet<string>;
|
|
67
63
|
readonly modelReference: RuntimeModelReference;
|
|
68
64
|
readonly tools: HarnessToolMap;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{tool}from"ai";import{isObject}from"#shared/guards.js";import{loadContext}from"#context/container.js";import{toModelSchema}from"#tools/schema.js";import{buildCallbackContext}from"#context/build-callback-context.js";import{resolveApprovalPolicy}from"#approval/definition.js";import{authorizationPendingModelText,isAuthorizationPendingModelOutput,isAuthorizationSignal,modelFacingAuthorizationOutput}from"#harness/authorization.js";import{
|
|
1
|
+
import{tool}from"ai";import{isObject}from"#shared/guards.js";import{loadContext}from"#context/container.js";import{toModelSchema}from"#tools/schema.js";import{buildCallbackContext}from"#context/build-callback-context.js";import{resolveApprovalPolicy}from"#approval/definition.js";import{authorizationPendingModelText,isAuthorizationPendingModelOutput,isAuthorizationSignal,modelFacingAuthorizationOutput}from"#harness/authorization.js";import{isApprovedToolCall,markApprovalRecheck}from"#harness/approval-recheck.js";import{normalizeToolJsonOutput,normalizeToolModelOutput}from"#harness/tool-model-output.js";import{stashToolInterrupt}from"#harness/tool-interrupts.js";import{resolveWebSearchBackend,resolveWebSearchProviderTool}from"#harness/provider-tools.js";import{isAsyncIterable}from"#shared/async-iterable.js";const toolApprovals=new WeakMap;function buildToolSet(e){let t={},n=e.disabledProviderTools;for(let r of e.tools.values()){if(n?.has(r.name))continue;let i=r.toModelOutput,a=buildApprovalFn(r,e),o=tool({description:r.description,execute:wrapToolExecute(r),inputSchema:toModelSchema(r.inputSchema,`input`),strict:!1,outputSchema:toModelSchema(r.outputSchema,`output`),...r.execute===void 0?i===void 0?{}:{toModelOutput:async({output:e,toolCallId:t})=>normalizeToolModelOutput({output:await i(e),toolCallId:t,toolName:r.name})}:{toModelOutput:async({output:e,toolCallId:t})=>isAuthorizationPendingModelOutput(e)?{type:`text`,value:authorizationPendingModelText(e.connections)}:i===void 0?typeof e==`string`?{type:`text`,value:e}:normalizeToolModelOutput({output:{type:`json`,value:e??null},toolCallId:t,toolName:r.name}):normalizeToolModelOutput({output:await i(e),toolCallId:t,toolName:r.name})}});t[r.name]=o,r.approval!==void 0&&toolApprovals.set(o,a)}return t}function buildToolSetFromDefinitions(e){let t=new Map;for(let n of e.tools)t.has(n.name)||t.set(n.name,n);return buildToolSet({approvedTools:e.approvedTools,disabledProviderTools:e.disabledProviderTools,tools:t})}function wrapToolExecute(e){let t=e.execute;if(t!==void 0)return(n,r)=>{let i;try{i=t(n,r)}catch(e){return Promise.reject(e)}return isAsyncIterable(i)?normalizeToolExecuteIterable(i,e.name,r):Promise.resolve(i).then(t=>normalizeToolExecuteOutput(t,e.name,r))}}async function*normalizeToolExecuteIterable(e,t,n){for await(let r of e)yield normalizeToolExecuteOutput(r,t,n)}function normalizeToolExecuteOutput(e,t,n){return isAuthorizationSignal(e)?(stashToolInterrupt(loadContext(),n.toolCallId,e),modelFacingAuthorizationOutput(e)):normalizeToolJsonOutput({boundary:`execute`,output:e,toolCallId:n.toolCallId,toolName:t})}async function buildToolSetWithProviderTools(e){let t=e.disabledProviderTools,n={...buildToolSet({approvedTools:e.approvedTools,disabledProviderTools:t,tools:e.tools})};for(let r of e.tools.values()){let i=r.behavior?.handling;if(i?.kind===`provider-tool`&&r.execute===void 0&&!t?.has(r.name)){let t=resolveWebSearchBackend(e.modelReference,i.provider);t===null?delete n[r.name]:n[r.name]=await resolveWebSearchProviderTool(t)}}return n}function buildApprovalFn(e,t){return async(n,r,i,a)=>{if(e.approval===void 0)return;let o=isObject(n)?n:void 0,s={...buildCallbackContext(),abortSignal:i??new AbortController().signal,approvedTools:t.approvedTools??new Set,callId:r,toolInput:o,toolName:e.name},c=await resolveApprovalPolicy(e.approval)(a?markApprovalRecheck(s):s);return typeof c==`boolean`?c?`user-approval`:`not-applicable`:c}}function buildToolApproval(e,t){return async({toolCall:n,messages:r})=>{let i=e[n.toolName];return i===void 0?void 0:await toolApprovals.get(i)?.(n.input,n.toolCallId,t,isApprovedToolCall(r,n.toolCallId))}}export{buildToolApproval,buildToolSet,buildToolSetFromDefinitions,buildToolSetWithProviderTools,wrapToolExecute};
|
|
@@ -107,11 +107,12 @@ export declare function accumulateTurnUsage(input: {
|
|
|
107
107
|
readonly usage: TokenUsageDelta | undefined;
|
|
108
108
|
}): TurnUsageState;
|
|
109
109
|
/**
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
* attribute only the parent's own model
|
|
113
|
-
* the caller's durable `agent.action`
|
|
114
|
-
* token limits and the remaining-quota
|
|
110
|
+
* Adds usage to session totals without touching the in-flight turn totals:
|
|
111
|
+
* the delegated spend a parent counts, or a run's tally of what its
|
|
112
|
+
* `ctx.agent` sessions spent. Turn tags attribute only the parent's own model
|
|
113
|
+
* calls (child spend is attributed by the caller's durable `agent.action`
|
|
114
|
+
* span); session totals feed the session token limits and the remaining-quota
|
|
115
|
+
* budget granted to later delegations.
|
|
115
116
|
*/
|
|
116
117
|
export declare function accumulateSessionUsage(input: {
|
|
117
118
|
readonly previous: TurnUsageState | undefined;
|
|
@@ -79,8 +79,6 @@ export interface HarnessSession {
|
|
|
79
79
|
readonly sessionId: string;
|
|
80
80
|
readonly sandboxState?: SandboxState;
|
|
81
81
|
readonly state?: SessionStateMap;
|
|
82
|
-
/** Framework task that owns this durable session, when present. */
|
|
83
|
-
readonly taskId?: string;
|
|
84
82
|
}
|
|
85
83
|
export declare function requireSessionModelReference(session: HarnessSession): RuntimeModelReference;
|
|
86
84
|
/**
|
|
@@ -183,15 +181,6 @@ export interface SettledTurn {
|
|
|
183
181
|
*/
|
|
184
182
|
export interface StepResult {
|
|
185
183
|
readonly steered?: true;
|
|
186
|
-
/** Background-tool effects projected onto the session that entered this step. */
|
|
187
|
-
readonly backgroundTaskSession?: HarnessSession;
|
|
188
|
-
/** Durable tasks started by background tools and awaiting the parent commit barrier. */
|
|
189
|
-
readonly backgroundTasks?: readonly {
|
|
190
|
-
readonly callId?: string;
|
|
191
|
-
readonly taskInboxToken: string;
|
|
192
|
-
readonly taskId: string;
|
|
193
|
-
readonly taskRunId: string;
|
|
194
|
-
}[];
|
|
195
184
|
readonly next: StepNext;
|
|
196
185
|
readonly session: HarnessSession;
|
|
197
186
|
/**
|
|
@@ -199,6 +188,13 @@ export interface StepResult {
|
|
|
199
188
|
* across the park boundary so a delegated parent can be notified.
|
|
200
189
|
*/
|
|
201
190
|
readonly settledTurn?: SettledTurn;
|
|
191
|
+
/**
|
|
192
|
+
* Present when the model ended the turn while tasks are working. The turn
|
|
193
|
+
* stays open until one settles.
|
|
194
|
+
*/
|
|
195
|
+
readonly held?: {
|
|
196
|
+
readonly taskIds: readonly string[];
|
|
197
|
+
};
|
|
202
198
|
}
|
|
203
199
|
/**
|
|
204
200
|
* A single step of AI work. Takes the current session and optional user input,
|
|
@@ -256,15 +252,11 @@ export interface ToolLoopHarnessConfig {
|
|
|
256
252
|
* Omitted in production until an instrumentation runtime opts in.
|
|
257
253
|
*/
|
|
258
254
|
readonly instrumentation?: SessionInstrumentation;
|
|
259
|
-
/** Whether this node enables framework background-task behavior. */
|
|
260
|
-
readonly tasksEnabled?: boolean;
|
|
261
255
|
/** Restores runtime resources for the originating turn before approval work. */
|
|
262
256
|
readonly prepareApprovalTurn?: (event: {
|
|
263
257
|
readonly sequence: number;
|
|
264
258
|
readonly turnId: string;
|
|
265
259
|
}) => Promise<void>;
|
|
266
|
-
/** Opaque runtime identity retained by a pending approval batch. */
|
|
267
|
-
readonly toolReplayIdentity?: (toolName: string) => string | undefined;
|
|
268
260
|
/** Resolves persisted step-scoped tools before an approval policy reads them. */
|
|
269
261
|
readonly resolveStepDynamicTools?: (input: {
|
|
270
262
|
readonly ctx: AlsContext;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { ModelMessage } from "ai";
|
|
2
|
+
import { type CoordinationToolCall } from "#harness/coordination.js";
|
|
3
|
+
import type { ResolvedInputBatch } from "#harness/input-request-resolution.js";
|
|
4
|
+
import type { HarnessSession, HarnessToolMap } from "#harness/types.js";
|
|
5
|
+
import type { RuntimeWorkflowTaskRequest } from "#shared/action-types.js";
|
|
6
|
+
/**
|
|
7
|
+
* Parks the step on the workflow tools a person just approved. The approval
|
|
8
|
+
* tool message moves into the batch's response so workflow results join it:
|
|
9
|
+
* AI SDK then resumes approved sibling tools without replaying the workflows.
|
|
10
|
+
*/
|
|
11
|
+
export declare function dispatchApprovedWorkflowCalls(input: {
|
|
12
|
+
readonly messages: readonly ModelMessage[];
|
|
13
|
+
readonly resolvedInputs: readonly ResolvedInputBatch[] | undefined;
|
|
14
|
+
readonly session: HarnessSession;
|
|
15
|
+
readonly tools: HarnessToolMap;
|
|
16
|
+
}): HarnessSession | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Turns a step's deferred calls into workflow runs, committing a task record
|
|
19
|
+
* for each call that starts a task. Task tool calls stay in the response
|
|
20
|
+
* alone: the session reads them from there.
|
|
21
|
+
*/
|
|
22
|
+
export declare function collectDeferredCalls(input: {
|
|
23
|
+
readonly session: HarnessSession;
|
|
24
|
+
readonly toolCalls: readonly CoordinationToolCall[];
|
|
25
|
+
readonly tools: HarnessToolMap;
|
|
26
|
+
readonly turnId: string;
|
|
27
|
+
}): {
|
|
28
|
+
readonly session: HarnessSession;
|
|
29
|
+
readonly workflowRequests: readonly RuntimeWorkflowTaskRequest[];
|
|
30
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{validateHarnessModelMessages}from"#harness/messages.js";import{createCoordinationRequestFromToolCall,resolveToolCallInputObject,setPendingCoordinationBatch}from"#harness/coordination.js";import{hasTailApprovalResponse}from"#harness/current-messages.js";import{commitCallEntry,isTaskTool}from"#execution/tasks/model-step.js";function dispatchApprovedWorkflowCalls(e){for(let t of e.resolvedInputs??[]){let n=t.inputs.filter(({outcome:t,request:n})=>t===`approved`&&e.tools.get(n.action.toolName)?.workflowId!==void 0);if(n.length===0)continue;if(!hasTailApprovalResponse(e.messages))throw Error(`Approved workflow calls must follow their approval tool message.`);let r=collectDeferredCalls({session:e.session,toolCalls:n.map(({request:e})=>({input:e.action.input,toolCallId:e.action.callId,toolName:e.action.toolName})),tools:e.tools,turnId:t.event.turnId});return setPendingCoordinationBatch({tasks:r.workflowRequests,event:t.event,responseMessages:e.messages.slice(-1),session:{...r.session,history:validateHarnessModelMessages(e.messages.slice(0,-1))}})}}function collectDeferredCalls(e){let{session:t}=e,n=[];for(let r of e.toolCalls){let i=e.tools.get(r.toolName);if(isTaskTool(i))continue;let a=commitCallEntry(t,{callId:r.toolCallId,definition:i,input:resolveToolCallInputObject(r.input,{callId:r.toolCallId,toolName:r.toolName}),toolName:r.toolName,turnId:e.turnId});t=a.session,n.push(createCoordinationRequestFromToolCall({entry:a.entry,input:a.input,toolCall:r,tools:e.tools}))}return{session:t,workflowRequests:n}}export{collectDeferredCalls,dispatchApprovedWorkflowCalls};
|
|
@@ -1,19 +1,8 @@
|
|
|
1
1
|
import type { RuntimeToolResultActionResult } from "#shared/action-types.js";
|
|
2
2
|
import type { SessionStateMap } from "#harness/types.js";
|
|
3
|
-
import { type ActivityWorkIdentityV1 } from "#protocol/activity.js";
|
|
4
|
-
import { type TaskMetadata, type TaskStatus, type TaskView } from "#tasks/types.js";
|
|
5
|
-
import type { DurableDynamicSubagentSelection, SessionAuth } from "#context/keys.js";
|
|
6
3
|
export declare const WORKFLOW_TOOL_RUNS_STATE_KEY = "eve.workflowTool";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
readonly metadata: TaskMetadata;
|
|
10
|
-
readonly dispatchContext: TaskAgentDispatchContext;
|
|
11
|
-
readonly activityWorkIdentity?: ActivityWorkIdentityV1;
|
|
12
|
-
readonly cohortId?: string;
|
|
13
|
-
/** Parent-owned outcome. Read through readWorkflowTaskView before consuming it. */
|
|
14
|
-
readonly outcome?: unknown;
|
|
15
|
-
}
|
|
16
|
-
interface WorkflowToolRunBase {
|
|
4
|
+
/** One workflow tool call the originating turn waits on. */
|
|
5
|
+
export interface BlockingWorkflowToolRun {
|
|
17
6
|
readonly callId: string;
|
|
18
7
|
readonly toolName: string;
|
|
19
8
|
readonly origin: {
|
|
@@ -25,60 +14,12 @@ interface WorkflowToolRunBase {
|
|
|
25
14
|
readonly hookToken: string;
|
|
26
15
|
};
|
|
27
16
|
}
|
|
28
|
-
export type BlockingWorkflowToolRun = WorkflowToolRunBase & {
|
|
29
|
-
readonly lifetime: "turn";
|
|
30
|
-
};
|
|
31
|
-
export type BackgroundWorkflowToolRun = WorkflowToolRunBase & {
|
|
32
|
-
readonly lifetime: "session";
|
|
33
|
-
readonly task: WorkflowTaskPayload;
|
|
34
|
-
};
|
|
35
|
-
export type WorkflowToolRun = BlockingWorkflowToolRun | BackgroundWorkflowToolRun;
|
|
36
|
-
export interface TaskAgentDispatchContext {
|
|
37
|
-
readonly auth: SessionAuth;
|
|
38
|
-
readonly sessionDynamicSubagentSelections?: Readonly<Record<string, DurableDynamicSubagentSelection>>;
|
|
39
|
-
readonly turnDynamicSubagentSelections?: Readonly<Record<string, DurableDynamicSubagentSelection>>;
|
|
40
|
-
}
|
|
41
|
-
/** Decode retained output only when it is consumed, independently of ownership reads. */
|
|
42
|
-
export declare function readWorkflowTaskView(task: WorkflowTaskPayload): TaskView | undefined;
|
|
43
|
-
export declare function getWorkflowToolRuns(state: SessionStateMap | undefined): readonly WorkflowToolRun[];
|
|
44
|
-
/** Parent-observed lifecycle state. Input requests are tracked on the parent session instead. */
|
|
45
|
-
export type BackgroundTaskState = Exclude<TaskStatus, "input_required">;
|
|
46
|
-
/** A background run with its decoded lifecycle view. */
|
|
47
|
-
export type BackgroundTask = TaskView & {
|
|
48
|
-
/** Overlapping work reported together; a task without a join target starts its own cohort. */
|
|
49
|
-
readonly cohortId: string;
|
|
50
|
-
/** The parent turn that started the task. */
|
|
51
|
-
readonly turnId: string;
|
|
52
|
-
readonly run: BackgroundWorkflowToolRun;
|
|
53
|
-
};
|
|
54
|
-
export interface BackgroundTaskFilter {
|
|
55
|
-
readonly state?: BackgroundTaskState | readonly BackgroundTaskState[];
|
|
56
|
-
readonly cohortId?: string;
|
|
57
|
-
readonly turnId?: string;
|
|
58
|
-
}
|
|
59
|
-
export interface BackgroundTasks {
|
|
60
|
-
get(taskId: string): BackgroundTask | undefined;
|
|
61
|
-
query(filter?: BackgroundTaskFilter): readonly BackgroundTask[];
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Read-only parent view: a task without a recorded terminal outcome is working.
|
|
65
|
-
* Only returned tasks are decoded, so one corrupt retained outcome cannot block
|
|
66
|
-
* reads of unrelated tasks, and working-only reads never decode.
|
|
67
|
-
*/
|
|
68
|
-
export declare function getBackgroundTasks(state: SessionStateMap | undefined): BackgroundTasks;
|
|
69
17
|
export declare function getBlockingWorkflowToolRuns(state: SessionStateMap | undefined, turnId?: string): readonly BlockingWorkflowToolRun[];
|
|
70
|
-
/** Registration is idempotent by originating turn and call
|
|
18
|
+
/** Registration is idempotent by originating turn and call. */
|
|
71
19
|
export declare function registerWorkflowToolRun<T extends {
|
|
72
20
|
readonly state?: SessionStateMap;
|
|
73
|
-
}>(session: T, entry:
|
|
74
|
-
/**
|
|
75
|
-
export declare function recordWorkflowTaskView(state: SessionStateMap | undefined, view: TaskView): {
|
|
76
|
-
readonly state: SessionStateMap | undefined;
|
|
77
|
-
readonly view: TaskView;
|
|
78
|
-
/** True only when this call recorded the task's first outcome. */
|
|
79
|
-
readonly firstOutcome: boolean;
|
|
80
|
-
};
|
|
81
|
-
/** Removes only this turn's waiting calls. Session-owned task payloads are never pruned here. */
|
|
21
|
+
}>(session: T, entry: BlockingWorkflowToolRun): T;
|
|
22
|
+
/** Removes this turn's waiting calls, or only one of them when `callId` is given. */
|
|
82
23
|
export declare function removeBlockingWorkflowToolRuns<T extends {
|
|
83
24
|
readonly state?: SessionStateMap;
|
|
84
25
|
}>(session: T, turnId: string, callId?: string): T;
|
|
@@ -86,4 +27,3 @@ export declare function removeBlockingWorkflowToolRuns<T extends {
|
|
|
86
27
|
export declare function findBlockingWorkflowToolRun(state: SessionStateMap | undefined, callId: string, turnId?: string): BlockingWorkflowToolRun | undefined;
|
|
87
28
|
/** The turn inbox is shared; a result settles a call only if the turn recorded that run. */
|
|
88
29
|
export declare function isInboxToolResultFromRecordedWorkflowToolRun(state: SessionStateMap | undefined, result: RuntimeToolResultActionResult): boolean;
|
|
89
|
-
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isNonEmptyString,isObject}from"#shared/guards.js";
|
|
1
|
+
import{isNonEmptyString,isObject}from"#shared/guards.js";const WORKFLOW_TOOL_RUNS_STATE_KEY=`eve.workflowTool`;function isWorkflowToolRun(e){return isObject(e)&&isNonEmptyString(e.callId)&&isNonEmptyString(e.toolName)&&isObject(e.origin)&&isNonEmptyString(e.origin.turnId)&&typeof e.origin.stepIndex==`number`&&Number.isSafeInteger(e.origin.stepIndex)&&e.origin.stepIndex>=0&&isObject(e.address)&&isNonEmptyString(e.address.runId)&&isNonEmptyString(e.address.hookToken)}function parseRegistry(e){if(!isObject(e)||e.version!==4||!Array.isArray(e.runs)||!Array.from(e.runs).every(isWorkflowToolRun))throw Error(`Corrupt workflow tool run registry: invalid version or run.`);let t=new Set;for(let n of e.runs){let e=JSON.stringify([n.origin.turnId,n.callId]);if(t.has(e))throw Error(`Corrupt workflow tool run registry: Run identities must be unique.`);t.add(e)}return{...e,version:4,runs:e.runs.map(copyWorkflowToolRun)}}function copyWorkflowToolRun(e){return{...e,origin:{...e.origin},address:{...e.address}}}function readRegistry(e){let t=e?.[WORKFLOW_TOOL_RUNS_STATE_KEY];if(isUnsupportedState(e,t))throw Error(`Unsupported workflow tool run state: start a new session or import its conversation.`);return t===void 0?{version:4,runs:[]}:parseRegistry(t)}function isUnsupportedState(e,t){let n=e?.[`eve.tasks`]!==void 0||e?.[`eve.runtime.workflowToolRuns`]!==void 0,r=isObject(t)&&t.version!==4;return n||r}function getBlockingWorkflowToolRuns(e,t){return readRegistry(e).runs.filter(e=>t===void 0||e.origin.turnId===t)}function writeRegistry(e,t){if(t.runs.length===0){let t={...e};return delete t[WORKFLOW_TOOL_RUNS_STATE_KEY],Object.keys(t).length===0?void 0:t}return{...e,[WORKFLOW_TOOL_RUNS_STATE_KEY]:parseRegistry(t)}}function registerWorkflowToolRun(e,t){let n=readRegistry(e.state),r=[...n.runs],i=r.findIndex(e=>e.origin.turnId===t.origin.turnId&&e.callId===t.callId),a=r[i];if(a!==void 0&&a.toolName!==t.toolName)throw Error(`Replayed invocation changed its tool identity.`);return a===void 0?r.push(t):r[i]={...a,...t,origin:a.origin,address:{...a.address,...t.address}},{...e,state:writeRegistry(e.state,{...n,runs:r})}}function removeBlockingWorkflowToolRuns(e,t,n){let r=readRegistry(e.state),i=r.runs,a=i.filter(e=>e.origin.turnId!==t||n!==void 0&&e.callId!==n);return a.length===i.length?e:{...e,state:writeRegistry(e.state,{...r,runs:a})}}function findBlockingWorkflowToolRun(e,t,n){let r=getBlockingWorkflowToolRuns(e,n).filter(e=>e.callId===t);return r.length===1?r[0]:void 0}function isInboxToolResultFromRecordedWorkflowToolRun(e,t){let n=findBlockingWorkflowToolRun(e,t.callId);return n!==void 0&&n.toolName===t.toolName}export{WORKFLOW_TOOL_RUNS_STATE_KEY,findBlockingWorkflowToolRun,getBlockingWorkflowToolRuns,isInboxToolResultFromRecordedWorkflowToolRun,registerWorkflowToolRun,removeBlockingWorkflowToolRuns};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{attemptIdempotencyKey,modelCallIdempotencyKey,toolCallIdempotencyKey}from"#instrumentation/lifecycle.js";import{structuralProviderMetadata}from"#instrumentation/content.js";function createAiSdkHookBridge(e,t,n=directRunInContext,r){let i={capturesInputs:t.capturesInputs??t.capturesContent,capturesOutputs:t.capturesOutputs??t.capturesContent,modelKeys:new Map,runtimeContext:r!==void 0&&Object.keys(r).length>0?Object.freeze({...r}):void 0,scope:e,toolKeys:new Map};return{onStart(e){i.operation=Object.freeze({modelId:e.modelId,operationId:e.operationId,provider:e.provider})},async onStepStart(e){i.stepNumber=e.stepNumber;let n=toStepAttemptStarted(i);n!==void 0&&await t.publish(n)},async onLanguageModelCallStart(e){let n=
|
|
1
|
+
import{attemptIdempotencyKey,modelCallIdempotencyKey,toolCallIdempotencyKey}from"#instrumentation/lifecycle.js";import{structuralProviderMetadata}from"#instrumentation/content.js";function createAiSdkHookBridge(e,t,n=directRunInContext,r){let i={capturesInputs:t.capturesInputs??t.capturesContent,capturesOutputs:t.capturesOutputs??t.capturesContent,modelCallIndexes:new Map,modelCallStartEvents:new Map,modelKeys:new Map,runtimeContext:r!==void 0&&Object.keys(r).length>0?Object.freeze({...r}):void 0,scope:e,toolKeys:new Map},nextModelCallKey=e=>{let t=i.modelCallIndexes.get(e)??0;return i.modelCallIndexes.set(e,t+1),modelCallIdempotencyKey(i.scope,e,t)};return{onStart(e){i.operation=Object.freeze({modelId:e.modelId,operationId:e.operationId,provider:e.provider})},async onStepStart(e){i.stepNumber=e.stepNumber;let n=toStepAttemptStarted(i);n!==void 0&&await t.publish(n)},async onLanguageModelCallStart(e){let n=i.stepNumber??0,r=nextModelCallKey(n);i.modelKeys.set(e.callId,r);let a=toModelCallStarted(i,r,e);i.modelCallStartEvents.set(e.callId,{event:a,stepNumber:n}),await t.publish(a)},async executeLanguageModelCall({callId:r,execute:a}){let o=i.modelKeys.get(r);if(o===void 0){let e=i.modelCallStartEvents.get(r);if(e===void 0)return a();o=nextModelCallKey(e.stepNumber),i.modelKeys.set(r,o),await t.publish(Object.freeze({...e.event,idempotencyKey:o}))}try{return await n({idempotencyKey:o,scope:e,type:`model.call`},a)}catch(n){throw i.modelKeys.get(r)===o&&i.modelKeys.delete(r),await t.publish(Object.freeze({error:n,idempotencyKey:o,scope:e,type:`model.call.failed`})),n}},async onLanguageModelCallEnd(e){let n=i.modelKeys.get(e.callId);if(n===void 0)return;i.modelKeys.delete(e.callId),i.modelCallStartEvents.delete(e.callId);let r=toModelCallCompleted(i,n,e);await t.publish(r)},async onStepEnd(e){if(e.providerMetadata===void 0)return;let n=i.capturesOutputs?e.providerMetadata:structuralProviderMetadata(e.providerMetadata);await t.publish(Object.freeze({idempotencyKey:attemptIdempotencyKey(i.scope),providerMetadata:n,scope:i.scope,type:`step.attempt.metadata`}))},async onToolExecutionStart(e){let n=toolCallIdempotencyKey(i.scope,e.toolCall.toolCallId,i.stepNumber??0);i.toolKeys.set(e.toolCall.toolCallId,n);let r=toToolCallStarted(i,n,e);await t.publish(r)},executeTool({toolCallId:t,execute:r}){let a=i.toolKeys.get(t);return a===void 0?r():n({idempotencyKey:a,scope:e,type:`tool.call`},r)},async onToolExecutionEnd(e){let n=e.toolCall.toolCallId,r=i.toolKeys.get(n);if(r===void 0)return;i.toolKeys.delete(n);let a=toToolCallCompleted(i,r,e);await t.publish(a)},async onAbort(e){await failOpenOperations(e.reason)},async onError(e){await failOpenOperations(e.error)}};async function failOpenOperations(n){let r=[];for(let a of i.modelKeys.values())r.push(t.publish(Object.freeze({error:n,idempotencyKey:a,scope:e,type:`model.call.failed`})));for(let a of i.toolKeys.values())r.push(t.publish(Object.freeze({error:n,idempotencyKey:a,scope:e,type:`tool.call.failed`})));i.modelKeys.clear(),i.modelCallStartEvents.clear(),i.toolKeys.clear(),await Promise.all(r)}}const directRunInContext=(e,t)=>t();function toStepAttemptStarted(e){if(e.operation!==void 0&&e.stepNumber!==void 0)return Object.freeze({idempotencyKey:attemptIdempotencyKey(e.scope),operation:e.operation,runtimeContext:e.runtimeContext,scope:e.scope,type:`step.attempt.started`})}function toModelCallStarted(e,t,n){return Object.freeze({idempotencyKey:t,input:e.capturesInputs?Object.freeze({instructions:n.instructions,messages:Object.freeze([...n.messages])}):void 0,model:Object.freeze({modelId:n.modelId,provider:n.provider}),runtimeContext:e.runtimeContext,scope:e.scope,type:`model.call.started`})}function toModelCallCompleted(e,t,n){return Object.freeze({content:e.capturesOutputs?toContentParts(n.content):void 0,finishReason:n.finishReason,idempotencyKey:t,responseModelId:n.modelId,responseId:n.responseId,scope:e.scope,type:`model.call.completed`,usage:toUsage(n.usage)})}function toUsage(e){return Object.freeze({inputTokenDetails:Object.freeze({cacheReadTokens:e.inputTokenDetails?.cacheReadTokens,cacheWriteTokens:e.inputTokenDetails?.cacheWriteTokens}),inputTokens:e.inputTokens,outputTokens:e.outputTokens})}function toContentParts(e){let t=[];for(let n of e)switch(n.type){case`text`:case`reasoning`:t.push(Object.freeze({text:n.text,type:n.type}));break;case`tool-call`:t.push(Object.freeze({callId:n.toolCallId,input:n.input,toolName:n.toolName,type:`tool-call`}));break;case`tool-result`:t.push(Object.freeze({callId:n.toolCallId,input:n.input,output:n.output,toolName:n.toolName,type:`tool-result`}));break;case`tool-error`:t.push(Object.freeze({callId:n.toolCallId,error:n.error,input:n.input,toolName:n.toolName,type:`tool-error`}))}return Object.freeze(t)}function toToolCallStarted(e,t,n){return Object.freeze({callId:n.toolCall.toolCallId,idempotencyKey:t,input:e.capturesInputs?n.toolCall.input:void 0,scope:e.scope,toolName:n.toolCall.toolName,type:`tool.call.started`})}function toToolCallCompleted(e,t,n){return Object.freeze({idempotencyKey:t,output:toToolOutput(n.toolOutput,e.capturesOutputs),scope:e.scope,type:`tool.call.completed`})}function toToolOutput(e,t){return e.type===`tool-result`?Object.freeze(t?{output:e.output,type:`result`}:{type:`result`}):Object.freeze(t?{error:e.error,type:`error`}:{type:`error`})}export{createAiSdkHookBridge};
|
|
@@ -31,6 +31,8 @@ export interface InstrumentationModelRef {
|
|
|
31
31
|
}
|
|
32
32
|
/** Token usage for one model call. A field is absent when the provider omits it. */
|
|
33
33
|
export interface InstrumentationUsage {
|
|
34
|
+
/** Provider-reported cost in US dollars. Absent when the provider omits pricing. */
|
|
35
|
+
readonly costUsd?: number;
|
|
34
36
|
readonly inputTokenDetails?: {
|
|
35
37
|
readonly cacheReadTokens?: number;
|
|
36
38
|
readonly cacheWriteTokens?: number;
|
|
@@ -103,8 +105,8 @@ export type InstrumentationActionOutput = {
|
|
|
103
105
|
export declare function sessionIdempotencyKey(sessionId: string): string;
|
|
104
106
|
export declare function turnIdempotencyKey(sessionId: string, turnId: string): string;
|
|
105
107
|
export declare function attemptIdempotencyKey(scope: InstrumentationAttemptScope): string;
|
|
106
|
-
/**
|
|
107
|
-
export declare function modelCallIdempotencyKey(scope: InstrumentationAttemptScope, stepNumber: number): string;
|
|
108
|
+
/** Identifies one provider call, including retries, within an AI SDK step. */
|
|
109
|
+
export declare function modelCallIdempotencyKey(scope: InstrumentationAttemptScope, stepNumber: number, callIndex: number): string;
|
|
108
110
|
export declare function toolCallIdempotencyKey(scope: InstrumentationAttemptScope, callId: string, stepNumber: number): string;
|
|
109
111
|
export declare function inputIdempotencyKey(sessionId: string, turnId: string, requestId: string): string;
|
|
110
112
|
export declare function channelDeliveryIdempotencyKey(sessionId: string, deliveryId: string): string;
|
|
@@ -405,6 +407,7 @@ export interface InstrumentationActionFailedEvent {
|
|
|
405
407
|
readonly idempotencyKey: string;
|
|
406
408
|
readonly outcome: Exclude<InstrumentationActionOutcome, "completed">;
|
|
407
409
|
readonly scope: InstrumentationAttemptScope;
|
|
410
|
+
readonly usage?: InstrumentationUsage;
|
|
408
411
|
}
|
|
409
412
|
export type InstrumentationActionTerminalEvent = InstrumentationActionCompletedEvent | InstrumentationActionFailedEvent;
|
|
410
413
|
/** The second argument to every handler. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createInstrumentationDispatcher}from"#instrumentation/dispatch.js";function sessionIdempotencyKey(e){return`session:${e}`}function turnIdempotencyKey(e,t){return`turn:${e}:${t}`}function attemptIdempotencyKey(e){return`step:${e.attemptId}`}function modelCallIdempotencyKey(e,t){return`model:${e.attemptId}:${String(t)}`}function toolCallIdempotencyKey(e,t,n){return`tool:${e.attemptId}:${t}:${String(n)}`}function inputIdempotencyKey(e,t,n){return`input:${e}:${t}:${n}`}function channelDeliveryIdempotencyKey(e,t){return`channel-delivery:${e}:${t}`}function actionIdempotencyKey(e,t,n){return`action:${e}:${t}:${n}`}const INSTRUMENTATION_PRINCIPAL_TYPES=[`anonymous`,`app`,`local-dev`,`none`,`other`,`runtime`,`service`,`unknown`,`user`];function isInstrumentationPrincipalType(e){return INSTRUMENTATION_PRINCIPAL_TYPES.some(t=>t===e)}function createInstrumentationHooks(e,t={}){return createInstrumentationDispatcher(e,t)}export{INSTRUMENTATION_PRINCIPAL_TYPES,actionIdempotencyKey,attemptIdempotencyKey,channelDeliveryIdempotencyKey,createInstrumentationHooks,inputIdempotencyKey,isInstrumentationPrincipalType,modelCallIdempotencyKey,sessionIdempotencyKey,toolCallIdempotencyKey,turnIdempotencyKey};
|
|
1
|
+
import{createInstrumentationDispatcher}from"#instrumentation/dispatch.js";function sessionIdempotencyKey(e){return`session:${e}`}function turnIdempotencyKey(e,t){return`turn:${e}:${t}`}function attemptIdempotencyKey(e){return`step:${e.attemptId}`}function modelCallIdempotencyKey(e,t,n){return`model:${e.attemptId}:${String(t)}:${String(n)}`}function toolCallIdempotencyKey(e,t,n){return`tool:${e.attemptId}:${t}:${String(n)}`}function inputIdempotencyKey(e,t,n){return`input:${e}:${t}:${n}`}function channelDeliveryIdempotencyKey(e,t){return`channel-delivery:${e}:${t}`}function actionIdempotencyKey(e,t,n){return`action:${e}:${t}:${n}`}const INSTRUMENTATION_PRINCIPAL_TYPES=[`anonymous`,`app`,`local-dev`,`none`,`other`,`runtime`,`service`,`unknown`,`user`];function isInstrumentationPrincipalType(e){return INSTRUMENTATION_PRINCIPAL_TYPES.some(t=>t===e)}function createInstrumentationHooks(e,t={}){return createInstrumentationDispatcher(e,t)}export{INSTRUMENTATION_PRINCIPAL_TYPES,actionIdempotencyKey,attemptIdempotencyKey,channelDeliveryIdempotencyKey,createInstrumentationHooks,inputIdempotencyKey,isInstrumentationPrincipalType,modelCallIdempotencyKey,sessionIdempotencyKey,toolCallIdempotencyKey,turnIdempotencyKey};
|
|
@@ -2,7 +2,6 @@ import type { InstrumentationAttemptScope, InstrumentationHooks, Instrumentation
|
|
|
2
2
|
import type { ResolvedInputBatch } from "#harness/input-requests.js";
|
|
3
3
|
import type { HandleEventFn } from "#harness/types.js";
|
|
4
4
|
import type { ChannelAudience } from "#shared/channel-audience.js";
|
|
5
|
-
import type { TaskView } from "#tasks/types.js";
|
|
6
5
|
export interface CreateInstrumentationHandleEventInput {
|
|
7
6
|
readonly agentName?: string;
|
|
8
7
|
readonly channelKind?: string;
|
|
@@ -26,9 +25,3 @@ export declare function publishInputResolutions(input: {
|
|
|
26
25
|
readonly hooks: InstrumentationHooks;
|
|
27
26
|
readonly sessionId: string;
|
|
28
27
|
}): Promise<void>;
|
|
29
|
-
/** Settles actions whose model-facing result was an admitted background-task receipt. */
|
|
30
|
-
export declare function publishBackgroundTaskSettlements(input: {
|
|
31
|
-
readonly acceptedAtMs?: number;
|
|
32
|
-
readonly hooks: InstrumentationHooks;
|
|
33
|
-
readonly views: readonly TaskView[];
|
|
34
|
-
}): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{contextStorage}from"#context/container.js";import{
|
|
1
|
+
import{contextStorage}from"#context/container.js";import{rememberInstrumentationActionScope,rememberInstrumentationInputScope,takeInstrumentationActionScopeForCall,takeInstrumentationInputScope}from"#instrumentation/state.js";import{RuntimeActionSettlementTimesKey}from"#harness/runtime-action-settlement-state.js";import{isRuntimeWorkflowToolAction}from"#shared/action-types.js";import{actionIdempotencyKey,inputIdempotencyKey,sessionIdempotencyKey,turnIdempotencyKey}from"#instrumentation/lifecycle.js";import{instrumentChannelDelivery}from"#instrumentation/channel-delivery.js";function createInstrumentationHandleEvent(e){if(e.hooks===void 0)return e.handleEvent;if(e.handleEvent===void 0)return;let t=e.handleEvent,n=e.hooks,r=new Set,i=new Set,a=e.turnId;return async(o,s)=>{await t(o,s);let c=toLifecycleEvent(o,e,a);if(o.type===`turn.started`&&(a=o.data.turnId),o.type===`turn.cancelled`||o.type===`turn.completed`||o.type===`turn.failed`||o.type===`session.completed`||o.type===`session.failed`){let e=contextStorage.getStore();e!==void 0&&await instrumentChannelDelivery({ctx:e,error:o.type===`turn.failed`||o.type===`session.failed`?Error(o.data.message):void 0,errorCode:o.type===`turn.failed`||o.type===`session.failed`?o.data.code:void 0,hooks:n,includeTurn:o.type===`turn.cancelled`||o.type===`turn.completed`||o.type===`turn.failed`||o.type===`session.failed`,outcome:o.type===`turn.failed`||o.type===`session.failed`?`failed`:o.type===`turn.cancelled`?`cancelled`:`completed`})}c!==void 0&&await n.publish(c),o.type===`actions.requested`?await publishActionStarts(o,e,n,r):o.type===`action.result`?await publishActionTerminal(o,e,n):o.type===`input.requested`&&await publishInputStarts(o,e,n,i)}}async function publishInputStarts(e,t,n,r){let i=t.getAttemptScope?.();if(i===void 0)return;let a=n.capturesOutputs??n.capturesContent;for(let o of e.data.requests){let s=inputIdempotencyKey(t.sessionId,e.data.turnId,o.requestId);r.has(s)||(r.add(s),rememberInstrumentationInputScope(s,i),await n.publish(Object.freeze({action:Object.freeze({callId:o.action.callId,name:o.action.toolName}),idempotencyKey:s,kind:o.kind,request:a?Object.freeze({allowFreeform:o.allowFreeform,display:o.display,options:o.options,prompt:o.prompt}):void 0,requestId:o.requestId,scope:i,type:`input.requested`})))}}async function publishInputResolutions(e){let t=e.hooks.capturesInputs??e.hooks.capturesContent;for(let n of e.batch.inputs){let r=inputIdempotencyKey(e.sessionId,e.batch.event.turnId,n.request.requestId),i=takeInstrumentationInputScope(r);i!==void 0&&await e.hooks.publish(Object.freeze({idempotencyKey:r,kind:n.request.kind,outcome:n.outcome,requestId:n.request.requestId,response:!t||n.response===void 0?void 0:Object.freeze({optionId:n.response.optionId,text:n.response.text}),scope:i,type:`input.resolved`}))}}async function publishActionStarts(e,t,n,r){let i=t.getAttemptScope?.();if(i===void 0)return;let a=n.capturesInputs??n.capturesContent;for(let o of e.data.actions){let s=actionIdempotencyKey(t.sessionId,e.data.turnId,o.callId);r.has(s)||(r.add(s),rememberInstrumentationActionScope(s,i),await n.publish(Object.freeze({callId:o.callId,idempotencyKey:s,input:a?o.input:void 0,...isRuntimeWorkflowToolAction(o)?{isWorkflowTool:!0}:void 0,kind:o.kind===`workflow-tool-call`?`tool-call`:o.kind,name:actionName(o),scope:i,type:`action.started`})))}}async function publishActionTerminal(e,t,n){let r=takeInstrumentationActionScopeForCall(t.sessionId,e.data.result.callId);if(r===void 0)return;let{idempotencyKey:i,scope:a}=r,o=n.capturesOutputs??n.capturesContent;if(e.data.status===`completed`){await n.publish(Object.freeze({acceptedAtMs:contextStorage.getStore()?.get(RuntimeActionSettlementTimesKey)?.[e.data.result.callId],idempotencyKey:i,outcome:`completed`,output:Object.freeze(o?{output:e.data.result.output,type:`result`}:{type:`result`}),scope:a,type:`action.completed`,usage:actionUsage(e.data.result)}));return}let s=o?e.data.error===void 0?e.data.result.output:Object.assign(Error(e.data.error.message),{code:e.data.error.code}):void 0;await n.publish(Object.freeze({acceptedAtMs:contextStorage.getStore()?.get(RuntimeActionSettlementTimesKey)?.[e.data.result.callId],error:s,errorCode:e.data.error?.code,idempotencyKey:i,outcome:e.data.status,scope:a,type:`action.failed`,usage:actionUsage(e.data.result)}))}function actionUsage(e){if(e.kind!==`subagent-result`||e.origin!==`child`||e.usage===void 0)return;let t={inputTokenDetails:{cacheReadTokens:e.usage.cacheReadTokens,cacheWriteTokens:e.usage.cacheWriteTokens},inputTokens:e.usage.inputTokens,outputTokens:e.usage.outputTokens};return e.usage.costUsd!==void 0&&(t.costUsd=e.usage.costUsd),t}function actionName(e){return e.kind===`tool-call`||e.kind===`workflow-tool-call`?e.toolName:e.kind===`load-skill`?`load_skill`:e.name}function toLifecycleEvent(e,t,n){switch(e.type){case`session.started`:return{agentName:t.agentName,channelAudience:t.channelAudience,channelKind:t.channelKind,idempotencyKey:sessionIdempotencyKey(t.sessionId),parentLineage:t.parentLineage,parentTraceContext:t.parentTraceContext,rootSessionId:t.rootSessionId??t.sessionId,scheduleId:t.scheduleId,sessionId:t.sessionId,title:t.title,type:`session.started`};case`session.completed`:case`session.waiting`:return{idempotencyKey:sessionIdempotencyKey(t.sessionId),sessionId:t.sessionId,turnId:n,type:e.type};case`session.failed`:return{error:Error(e.data.message),idempotencyKey:sessionIdempotencyKey(t.sessionId),sessionId:t.sessionId,turnId:n,type:`session.failed`};case`turn.started`:return{idempotencyKey:turnIdempotencyKey(t.sessionId,e.data.turnId),parentLineage:t.parentLineage,parentTraceContext:t.parentTraceContext,rootSessionId:t.rootSessionId??t.sessionId,sequence:e.data.sequence,sessionId:t.sessionId,turnId:e.data.turnId,type:`turn.started`};case`turn.completed`:case`turn.cancelled`:return{idempotencyKey:turnIdempotencyKey(t.sessionId,e.data.turnId),sessionId:t.sessionId,turnId:e.data.turnId,type:e.type};case`turn.failed`:return{error:Error(e.data.message),idempotencyKey:turnIdempotencyKey(t.sessionId,e.data.turnId),sessionId:t.sessionId,turnId:e.data.turnId,type:`turn.failed`};default:return}}export{createInstrumentationHandleEvent,publishInputResolutions};
|
|
@@ -2,7 +2,6 @@ import type { TelemetryOptions } from "ai";
|
|
|
2
2
|
import type { InstrumentationAttemptScope, InstrumentationContextRunner, InstrumentationHooks, InstrumentationSessionStartedEvent, InstrumentationTraceContext, InstrumentationTraceSeed, InstrumentationTurnStartedEvent } from "#instrumentation/lifecycle.js";
|
|
3
3
|
import { type BuildTelemetryRuntimeContextInput } from "#instrumentation/runtime-context.js";
|
|
4
4
|
import { type CreateInstrumentationHandleEventInput } from "#instrumentation/native-events.js";
|
|
5
|
-
import { type BackgroundTaskInstrumentation } from "#instrumentation/background-task-runtime.js";
|
|
6
5
|
import type { ResolvedInputBatch } from "#harness/input-requests.js";
|
|
7
6
|
import type { HandleEventFn } from "#harness/types.js";
|
|
8
7
|
import { type ChannelDeliveryStartInstrumentation, type ChannelDeliveryTerminalInstrumentation } from "#instrumentation/channel-delivery.js";
|
|
@@ -55,8 +54,6 @@ export interface BoundInstrumentationSession {
|
|
|
55
54
|
}
|
|
56
55
|
/** Process-wide runtime consumed by every harness execution surface. */
|
|
57
56
|
export interface InstrumentationRuntime {
|
|
58
|
-
/** Materializes settled invocation spans without draining the exporter pipeline. */
|
|
59
|
-
readonly flushSettledInvocations?: () => Promise<void>;
|
|
60
57
|
readonly forceFlush: () => Promise<void>;
|
|
61
58
|
readonly hooks: InstrumentationHooks;
|
|
62
59
|
readonly idGenerator?: AgentSpanIdGenerator;
|
|
@@ -81,7 +78,7 @@ export interface SessionInstrumentation {
|
|
|
81
78
|
readonly session: TSession;
|
|
82
79
|
}, execute: (scope: InstrumentationStepScope<TSession>) => Promise<TResult>) => Promise<TResult>;
|
|
83
80
|
}
|
|
84
|
-
export interface ExecutionInstrumentation
|
|
81
|
+
export interface ExecutionInstrumentation {
|
|
85
82
|
readonly createHandleEvent: (input: {
|
|
86
83
|
readonly handleEvent?: HandleEventFn;
|
|
87
84
|
readonly turnId?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ensureAiSdkWarningLogger}from"#instrumentation/ai-sdk-warnings.js";import{recordErrorOnSpan}from"#internal/logging.js";import{applyLiveDeliveryAudienceCeiling}from"#shared/forwarded-trace-policy.js";import{contextStorage}from"#context/container.js";import{ConversationIdKey,ParentSessionKey}from"#context/keys.js";import{createMemoryInstrumentation}from"#instrumentation/memory.js";import{readSessionTraceDecision}from"#tracing/agent-trace-context-store.js";import{shouldCaptureInstrumentationContent}from"#shared/instrumentation-content.js";import{isSampledTrace,resolveTracePolicy,resolveTracePolicyDecision}from"#tracing/sampled-trace.js";import{
|
|
1
|
+
import{ensureAiSdkWarningLogger}from"#instrumentation/ai-sdk-warnings.js";import{recordErrorOnSpan}from"#internal/logging.js";import{applyLiveDeliveryAudienceCeiling}from"#shared/forwarded-trace-policy.js";import{contextStorage}from"#context/container.js";import{ConversationIdKey,ParentSessionKey}from"#context/keys.js";import{createMemoryInstrumentation}from"#instrumentation/memory.js";import{readConversationId}from"#shared/conversation-identity.js";import{readSessionTraceDecision}from"#tracing/agent-trace-context-store.js";import{shouldCaptureInstrumentationContent}from"#shared/instrumentation-content.js";import{isSampledTrace,resolveTracePolicy,resolveTracePolicyDecision}from"#tracing/sampled-trace.js";import{context,trace}from"#compiled/@opentelemetry/api/index.js";import{attemptIdempotencyKey}from"#instrumentation/lifecycle.js";import{instrumentChannelDelivery}from"#instrumentation/channel-delivery.js";import{buildTelemetryRuntimeContext,snapshotInstrumentationRuntimeContext}from"#instrumentation/runtime-context.js";import{ensureOtelIntegration,getRegisteredTelemetryIntegrations}from"#instrumentation/ai-sdk-telemetry.js";import{createAiSdkHookBridge}from"#instrumentation/ai-sdk-hook-bridge.js";import{createInstrumentationHandleEvent,publishInputResolutions}from"#instrumentation/native-events.js";import{prepareTurnTraceContext}from"#instrumentation/prepare-trace-context.js";import"#tracing/agent-span-id-generator.js";import{withErrorContent}from"#tracing/error-content-context.js";import{readInstrumentationSessionContext}from"#instrumentation/session-context.js";import{readInstrumentationDecision}from"#shared/instrumentation-decision.js";import{getInstrumentationRuntime,registerInstrumentationRuntime}from"#instrumentation/runtime-global.js";import{initializeSessionInstrumentation}from"#instrumentation/session-init.js";const TURN_TRACE_STATE_KEY=`eve.harness.turnTrace`;function bindInstrumentationRuntime(e,t,n){if(readConversationId(t.get(ConversationIdKey))===void 0&&t.set(ConversationIdKey,t.get(ParentSessionKey)?.rootSessionId??n.rootSessionId),e===void 0)return;let r=e.hooks,readSessionContext=()=>readInstrumentationSessionContext(contextStorage.getStore()??t),bindHooks=e=>r.forTrace?.({agentName:n.agentName,...e.conversation})??r,captureExecutionRuntime=()=>{let t=e.otelSettings,n=e.ownsAgentSpans===!0;return t!==void 0&&!n&&ensureOtelIntegration(),{ownsAgentSpans:n,otelSettings:t,runtimeContextResolvers:e.runtimeContextResolvers,tracer:t===void 0?void 0:trace.getTracer(`eve`)}},preparePreamble=(t,r)=>prepareTurnTraceContext({...t,instrumentation:e,principals:r.principals,session:{agentName:n.agentName,channelAudience:r.conversation.audience,channelKind:r.conversation.channel.kind,channelType:r.instrumentation?.channelType,parentLineage:r.parentLineage,parentTraceContext:r.parentTraceContext,rootSessionId:r.parent?.rootSessionId??n.rootSessionId,scheduleId:r.scheduleId,sessionId:n.sessionId,title:r.title,traceSeed:r.traceSeed}}),i=e.memoryOperations===!0?createMemoryInstrumentation({resolveContext:()=>{let e=readSessionContext();return{hooks:bindHooks(e),rootSessionId:e.parent?.rootSessionId??n.rootSessionId}},runInContext:e.runInContext,sessionId:n.sessionId}):void 0;return{createHandleEvent:e=>{let t=readSessionContext();return createInstrumentationHandleEvent({agentName:n.agentName,channelKind:t.conversation.channel.kind,handleEvent:e.handleEvent,hooks:bindHooks(t),scheduleId:t.scheduleId,sessionId:n.sessionId,title:t.title,turnId:e.turnId})},flush:e.forceFlush,instrumentChannelDelivery:e=>instrumentChannelDelivery({...e,hooks:r,policyAgentName:n.agentName}),memory:i,prepareExecution:()=>{let t=captureExecutionRuntime();return{installAiSdkWarningLogger:ensureAiSdkWarningLogger,runStep:async(r,i)=>{let a=readSessionContext(),o=bindHooks(a),s=t.otelSettings,c=resolveStepInstrumentationDecision(s,n.agentName,a.conversation,a.traceSeed,readSessionTraceDecision(a.context,n.sessionId)),l=t.tracer,u={"eve.environment":r.environment,"eve.session.id":r.session.sessionId,"eve.version":r.eveVersion},d=s?.functionId??n.agentName;d&&(u[`ai.telemetry.functionId`]=d);let f=l!==void 0&&!t.ownsAgentSpans&&c?.action!==`drop`&&r.hasInput?l.startSpan(`ai.eve.turn`,{attributes:u}):void 0,p=f?.spanContext(),m=p===void 0?r.session:{...r.session,state:{...r.session.state,[TURN_TRACE_STATE_KEY]:{spanId:p.spanId,traceFlags:p.traceFlags,traceId:p.traceId}}},h=f===void 0?void 0:trace.setSpan(context.active(),f);if(h===void 0&&l!==void 0){let e=r.session.state?.[TURN_TRACE_STATE_KEY];e!==void 0&&(h=trace.setSpan(context.active(),trace.wrapSpanContext({...e,isRemote:!0})))}let g=readSessionContext(),_=snapshotInstrumentationRuntimeContext(g.context),v=g.conversation,y=v.audience,b=shouldCaptureInstrumentationContent(v),x=c===void 0?c:applyLiveDeliveryAudienceCeiling(c,y,g.forwardedTracePolicy,v.environment),S=x===void 0?b:x.action===`record`&&x.recordInputs,C=c?.action===`drop`,w={recordInputs:!C&&(x?.action===`record`?x.recordInputs:b)&&(s?.recordInputs??!1),recordOutputs:!C&&(x?.action===`record`?x.recordOutputs:b)&&(s?.recordOutputs??!1)},telemetry=e=>{if(s===void 0&&e.bridgeIntegration===void 0)return;let r={};for(let t of Object.keys(e.runtimeContext??{}))r[t]=!0;let i=s!==void 0&&!(w.recordInputs&&w.recordOutputs),integrations=()=>getRegisteredTelemetryIntegrations({...t.ownsAgentSpans?{excludeEveOtelIntegration:!0}:void 0,sanitizeEveOtelErrors:i});return{functionId:s?.functionId??n.agentName,includeRuntimeContext:r,integrations:e.bridgeIntegration===void 0?i?[...integrations()]:void 0:[e.bridgeIntegration,...integrations()],isEnabled:!0,recordInputs:w.recordInputs,recordOutputs:w.recordOutputs}},run=()=>i({createHandleEvent:e=>createInstrumentationHandleEvent({...e,agentName:n.agentName,channelAudience:y,channelKind:v.channel.kind,hooks:o,parentLineage:g.parentLineage,parentTraceContext:g.parentTraceContext,rootSessionId:g.parent?.rootSessionId,scheduleId:g.scheduleId,sessionId:n.sessionId,title:g.title}),prepareAttempt:t=>{let r={attemptId:`${n.sessionId}:${t.turnId}:${t.stepIndex}:${t.attemptIndex}`,attemptIndex:t.attemptIndex,channelAudience:y,functionId:s?.functionId??n.agentName,rootSessionId:g.parent?.rootSessionId??n.sessionId,sessionId:n.sessionId,stepIndex:t.stepIndex,turnId:t.turnId},i=createAiSdkHookBridge(r,o,e.runInContext,t.runtimeContext);return{complete:()=>o.publish({idempotencyKey:attemptIdempotencyKey(r),scope:r,type:`step.attempt.completed`}),fail:e=>o.publish({error:e,idempotencyKey:attemptIdempotencyKey(r),scope:r,type:`step.attempt.failed`}),scope:r,telemetry:telemetry({bridgeIntegration:i,runtimeContext:t.runtimeContext})}},preparePreamble:e=>preparePreamble(e,g),publishInputResolutions:e=>publishInputResolutions({...e,hooks:o}),recordError:e=>{f!==void 0&&recordErrorOnSpan(f,e)},resolveRuntimeContext:e=>buildTelemetryRuntimeContext({...e,capturesContent:S,context:_,providerResolvers:t.runtimeContextResolvers}),session:m,setTurnId:e=>f?.setAttribute(`eve.turn.id`,e),telemetry:()=>telemetry({}),traceContext:p===void 0||!isValidSpanContext(p)?void 0:{spanId:p.spanId,traceFlags:p.traceFlags,traceId:p.traceId}});try{return await context.with(withErrorContent(h??context.active(),w.recordOutputs),run)}finally{f?.end(),f=void 0}}}},preparePreamble:e=>preparePreamble(e,readSessionContext())}}function bindSessionInstrumentation(e){return bindInstrumentationRuntime(getInstrumentationRuntime(),e.ctx,{agentName:e.agentName,rootSessionId:e.rootSessionId,sessionId:e.sessionId})}function resolveStepInstrumentationDecision(e,t,n,r,i){if(e!==void 0)return r?.decision===void 0?i===void 0?r===void 0?resolveTracePolicy(e.tracePolicy,{agentName:t,...n}):resolveTracePolicyDecision(isSampledTrace(r),n):i:readInstrumentationDecision(r.decision)}function isValidSpanContext(e){return/^[0-9a-f]{32}$/u.test(e.traceId)&&e.traceId!==`00000000000000000000000000000000`&&/^[0-9a-f]{16}$/u.test(e.spanId)&&e.spanId!==`0000000000000000`}export{bindInstrumentationRuntime,bindSessionInstrumentation,getInstrumentationRuntime,initializeSessionInstrumentation,registerInstrumentationRuntime};
|
|
@@ -42,14 +42,8 @@ interface InstrumentationActionCorrelation {
|
|
|
42
42
|
readonly idempotencyKey: string;
|
|
43
43
|
readonly scope: InstrumentationAttemptScope;
|
|
44
44
|
}
|
|
45
|
-
/** Binds an admitted background task to the action that started it. */
|
|
46
|
-
export declare function rememberInstrumentationBackgroundTask(taskId: string, correlation: InstrumentationActionCorrelation): void;
|
|
47
|
-
/** Binds a background task when its executor admits the originating call. */
|
|
48
|
-
export declare function rememberInstrumentationBackgroundTaskForCall(sessionId: string, callId: string, taskId: string): void;
|
|
49
45
|
export declare function findInstrumentationActionScopeForCall(sessionId: string, callId: string): InstrumentationActionCorrelation | undefined;
|
|
50
46
|
/** Reads and releases one durable runtime action's originating scope. */
|
|
51
47
|
export declare function takeInstrumentationActionScopeForCall(sessionId: string, callId: string): InstrumentationActionCorrelation | undefined;
|
|
52
|
-
/** Reads and releases the action correlation owned by a terminal background task. */
|
|
53
|
-
export declare function takeInstrumentationActionScopeForTask(taskId: string): InstrumentationActionCorrelation | undefined;
|
|
54
48
|
/** Takes every still-open action owned by one session or turn. */
|
|
55
49
|
export declare function takeInstrumentationActionScopes(sessionId: string, turnId?: string): readonly InstrumentationActionCorrelation[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{contextStorage,loadContext}from"#context/container.js";import{parseJsonValue}from"#shared/json.js";import{ContextKey}from"#context/key.js";import{SERIALIZED_INSTRUMENTATION_STATE_KEYS,preserveSerializedInstrumentationState}from"#shared/serialized-observability-state.js";const InstrumentationStateKey=new ContextKey(SERIALIZED_INSTRUMENTATION_STATE_KEYS.providerState,{codec:{deserialize:deserializeState,serialize:e=>e}}),InstrumentationActionStateKey=new ContextKey(SERIALIZED_INSTRUMENTATION_STATE_KEYS.actionScopes,{codec:{deserialize:deserializeActionStates,serialize:e=>e}}),InstrumentationInputScopeKey=new ContextKey(SERIALIZED_INSTRUMENTATION_STATE_KEYS.inputScopes,{codec:{deserialize:deserializeScopes,serialize:e=>e}});function instrumentationStateSlot(e,t,n={}){let r=stateKey(e,t),i=!0;return{get:()=>{if(!i)return;let e=contextStorage.getStore()?.get(InstrumentationStateKey)?.[r]?.value;return e===void 0?void 0:cloneAndFreezeJson(e)},revoke:()=>{i=!1},set:e=>{if(!i)return;let t=e===void 0?void 0:cloneAndFreezeJson(parseJsonValue(e));writeInstrumentationState(e=>{if(t===void 0)return writeSlot(e,r,void 0);let i=e[r],a={value:t};return i?.abandoned===!0&&(a.abandoned=!0),assignOwner(a,n),writeSlot(e,r,a)})}}}function abandonInstrumentationState(e,t,n={}){let r=stateKey(e,t);writeInstrumentationState(e=>{let t=e[r],i={attemptId:n.attemptId??t?.attemptId,sessionId:n.sessionId??t?.sessionId,turnId:n.turnId??t?.turnId},a={abandoned:!0};return assignOwner(a,i),t?.value!==void 0&&(a.value=t.value),writeSlot(e,r,a)})}function isInstrumentationStateAbandoned(e,t){return contextStorage.getStore()?.get(InstrumentationStateKey)?.[stateKey(e,t)]?.abandoned===!0}function releaseAllInstrumentationState(e){let t=`\0${e}`;releaseMatchingInstrumentationState(e=>e.endsWith(t))}function releaseAllInstrumentationAttemptState(e){releaseMatchingInstrumentationState((t,n)=>n.attemptId===e)}function releaseAllInstrumentationTurnState(e,t){
|
|
1
|
+
import{contextStorage,loadContext}from"#context/container.js";import{parseJsonValue}from"#shared/json.js";import{ContextKey}from"#context/key.js";import{SERIALIZED_INSTRUMENTATION_STATE_KEYS,preserveSerializedInstrumentationState}from"#shared/serialized-observability-state.js";const InstrumentationStateKey=new ContextKey(SERIALIZED_INSTRUMENTATION_STATE_KEYS.providerState,{codec:{deserialize:deserializeState,serialize:e=>e}}),InstrumentationActionStateKey=new ContextKey(SERIALIZED_INSTRUMENTATION_STATE_KEYS.actionScopes,{codec:{deserialize:deserializeActionStates,serialize:e=>e}}),InstrumentationInputScopeKey=new ContextKey(SERIALIZED_INSTRUMENTATION_STATE_KEYS.inputScopes,{codec:{deserialize:deserializeScopes,serialize:e=>e}});function instrumentationStateSlot(e,t,n={}){let r=stateKey(e,t),i=!0;return{get:()=>{if(!i)return;let e=contextStorage.getStore()?.get(InstrumentationStateKey)?.[r]?.value;return e===void 0?void 0:cloneAndFreezeJson(e)},revoke:()=>{i=!1},set:e=>{if(!i)return;let t=e===void 0?void 0:cloneAndFreezeJson(parseJsonValue(e));writeInstrumentationState(e=>{if(t===void 0)return writeSlot(e,r,void 0);let i=e[r],a={value:t};return i?.abandoned===!0&&(a.abandoned=!0),assignOwner(a,n),writeSlot(e,r,a)})}}}function abandonInstrumentationState(e,t,n={}){let r=stateKey(e,t);writeInstrumentationState(e=>{let t=e[r],i={attemptId:n.attemptId??t?.attemptId,sessionId:n.sessionId??t?.sessionId,turnId:n.turnId??t?.turnId},a={abandoned:!0};return assignOwner(a,i),t?.value!==void 0&&(a.value=t.value),writeSlot(e,r,a)})}function isInstrumentationStateAbandoned(e,t){return contextStorage.getStore()?.get(InstrumentationStateKey)?.[stateKey(e,t)]?.abandoned===!0}function releaseAllInstrumentationState(e){let t=`\0${e}`;releaseMatchingInstrumentationState(e=>e.endsWith(t))}function releaseAllInstrumentationAttemptState(e){releaseMatchingInstrumentationState((t,n)=>n.attemptId===e)}function releaseAllInstrumentationTurnState(e,t){releaseMatchingInstrumentationState((n,r)=>r.sessionId===e&&(t===void 0||r.turnId===t))}function releaseMatchingInstrumentationState(e){let t=contextStorage.getStore()?.get(InstrumentationStateKey);t!==void 0&&Object.entries(t).some(([t,n])=>e(t,n))&&writeInstrumentationState(t=>{let n={...t};for(let[r,i]of Object.entries(t))e(r,i)&&delete n[r];return n})}function rememberInstrumentationActionScope(e,t){writeContextKey(InstrumentationActionStateKey,n=>({...n,[e]:{scope:t}}))}function rememberInstrumentationInputScope(e,t){writeContextKey(InstrumentationInputScopeKey,n=>({...n,[e]:t}))}function takeInstrumentationInputScope(e){let t=contextStorage.getStore()?.get(InstrumentationInputScopeKey)?.[e];if(t!==void 0)return writeContextKey(InstrumentationInputScopeKey,t=>{let n={...t};return delete n[e],n}),t}function findInstrumentationActionScopeForCall(e,t){let n=contextStorage.getStore()?.get(InstrumentationActionStateKey);if(n!==void 0)for(let r of Object.values(n)){let i=`action:${e}:${r.scope.turnId}:${t}`,a=n[i];if(a!==void 0)return{idempotencyKey:i,scope:a.scope}}}function takeInstrumentationActionScopeForCall(e,t){let n=findInstrumentationActionScopeForCall(e,t);if(n!==void 0)return releaseInstrumentationActionCorrelation(n.idempotencyKey),n}function takeInstrumentationActionScopes(e,t){let n=contextStorage.getStore()?.get(InstrumentationActionStateKey);if(n===void 0)return[];let r=Object.entries(n).filter(([,n])=>n.scope.sessionId===e&&(t===void 0||n.scope.turnId===t)).map(([e,t])=>({idempotencyKey:e,scope:t.scope}));if(r.length===0)return[];let i=new Set(r.map(e=>e.idempotencyKey));return writeContextKey(InstrumentationActionStateKey,e=>{let t={...e};for(let e of i)delete t[e];return t}),r}function releaseInstrumentationActionCorrelation(e){writeContextKey(InstrumentationActionStateKey,t=>{let n={...t};return delete n[e],n})}function writeSlot(e,t,n){if(n===void 0){let n={...e};return delete n[t],n}return{...e,[t]:n}}function writeInstrumentationState(e){writeContextKey(InstrumentationStateKey,e)}function assignOwner(e,t){t.attemptId!==void 0&&(e.attemptId=t.attemptId),t.sessionId!==void 0&&(e.sessionId=t.sessionId),t.turnId!==void 0&&(e.turnId=t.turnId)}function writeContextKey(e,t){contextStorage.getStore()!==void 0&&loadContext().set(e,e=>t(e??{}))}function stateKey(e,t){return`${e}\0${t}`}function deserializeState(e){if(typeof e!=`object`||!e||Array.isArray(e))return{};let t={};for(let[n,r]of Object.entries(e)){if(typeof r!=`object`||!r||Array.isArray(r))continue;let e=r,i=typeof e.attemptId==`string`?e.attemptId:void 0,a=typeof e.sessionId==`string`?e.sessionId:void 0,o=typeof e.turnId==`string`?e.turnId:void 0,s={};e.abandoned===!0&&(s.abandoned=!0),i!==void 0&&(s.attemptId=i),a!==void 0&&(s.sessionId=a),o!==void 0&&(s.turnId=o),e.value!==void 0&&(s.value=cloneAndFreezeJson(e.value)),t[n]=s}return t}function cloneAndFreezeJson(e){if(Array.isArray(e))return Object.freeze(e.map(e=>cloneAndFreezeJson(e)));if(typeof e!=`object`||!e)return e;let t={};for(let[n,r]of Object.entries(e))t[n]=cloneAndFreezeJson(r);return Object.freeze(t)}function deserializeScopes(e){return typeof e!=`object`||!e||Array.isArray(e)?{}:e}function deserializeActionStates(e){if(typeof e!=`object`||!e||Array.isArray(e))return{};let t={};for(let[n,r]of Object.entries(e)){if(typeof r!=`object`||!r||Array.isArray(r))continue;let e=r;t[n]={scope:typeof e.scope==`object`&&e.scope!==null&&!Array.isArray(e.scope)?e.scope:r}}return t}export{abandonInstrumentationState,findInstrumentationActionScopeForCall,instrumentationStateSlot,isInstrumentationStateAbandoned,preserveSerializedInstrumentationState,releaseAllInstrumentationAttemptState,releaseAllInstrumentationState,releaseAllInstrumentationTurnState,rememberInstrumentationActionScope,rememberInstrumentationInputScope,takeInstrumentationActionScopeForCall,takeInstrumentationActionScopes,takeInstrumentationInputScope};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createRequire}from"node:module";import{existsSync,readFileSync,realpathSync}from"node:fs";import{basename,dirname,join}from"node:path";import{fileURLToPath}from"node:url";import{EVE_PACKAGE_NAME}from"#internal/package-name.js";let cachedPackageInfo,cachedPackageLocation;const BUNDLED_FALLBACK_PACKAGE_VERSION=`0.
|
|
1
|
+
import{createRequire}from"node:module";import{existsSync,readFileSync,realpathSync}from"node:fs";import{basename,dirname,join}from"node:path";import{fileURLToPath}from"node:url";import{EVE_PACKAGE_NAME}from"#internal/package-name.js";let cachedPackageInfo,cachedPackageLocation;const BUNDLED_FALLBACK_PACKAGE_VERSION=`0.69.0`,WORKFLOW_MODULE_ALIASES={"workflow/errors":`src/compiled/@workflow/errors/index.js`,"workflow/internal/private":`src/compiled/@workflow/core/private.js`};function resolveFallbackPackageVersion(){return BUNDLED_FALLBACK_PACKAGE_VERSION.startsWith(`__`)?`0.0.0`:BUNDLED_FALLBACK_PACKAGE_VERSION}const FALLBACK_PACKAGE_INFO={name:EVE_PACKAGE_NAME,version:resolveFallbackPackageVersion()};function resolveCurrentModulePath(){return typeof __filename==`string`?__filename:resolveCurrentModulePathFromStack()}function resolveCurrentModulePathFromStack(){let e=Error.prepareStackTrace;try{Error.prepareStackTrace=(e,t)=>t;let e=Error().stack?.[0]?.getFileName();if(typeof e!=`string`||e.length===0)throw Error(`Failed to resolve the current module path from the stack trace.`);return e.startsWith(`file:`)?fileURLToPath(e):e}finally{Error.prepareStackTrace=e}}const packageRequire=createRequire(resolveCurrentModulePath());function tryResolveVerifiedPackageRoot(e){try{let t=realpathSync.native(e);return tryReadInstalledPackageInfo(t,EVE_PACKAGE_NAME)===void 0?void 0:dirname(t)}catch{return}}function findNearestVerifiedPackageRoot(e){let t=e;for(;;){let e=tryResolveVerifiedPackageRoot(join(t,`package.json`));if(e!==void 0)return e;let n=dirname(t);if(n===t)return;t=n}}function tryResolveDirectBuildLocation(e){let t=dirname(e);for(;;){if(basename(t)===`dist`){let e=tryResolveVerifiedPackageRoot(join(dirname(t),`package.json`));if(e!==void 0)return{packageBuildRoot:t,packageRoot:e}}let e=dirname(t);if(e===t)return;t=e}}function isSourceCheckout(e){return existsSync(join(e,`src`,`internal`,`application`,`package.ts`))}function tryCreatePackageLocation(e){if(isSourceCheckout(e))return{packageBuildRoot:null,packageRoot:e};let t=join(e,`dist`);if(existsSync(t))return{packageBuildRoot:t,packageRoot:e}}function resolveSelfPackageJsonPath(e){return createRequire(e).resolve(`${EVE_PACKAGE_NAME}/package.json`)}function resolvePackageLocationFromModulePath(e,t=resolveSelfPackageJsonPath){let n=realpathSync.native(e),r=tryResolveDirectBuildLocation(n);if(r!==void 0)return r;let i=findNearestVerifiedPackageRoot(dirname(n));if(i!==void 0&&isSourceCheckout(i))return{packageBuildRoot:null,packageRoot:i};try{let e=tryResolveVerifiedPackageRoot(t(n)),r=e===void 0?void 0:tryCreatePackageLocation(e);if(r!==void 0)return r}catch{}let a=i===void 0?void 0:tryCreatePackageLocation(i);if(a!==void 0)return a;throw Error(`Failed to resolve the eve package root from "${e}".`)}function resolvePackageLocation(){return cachedPackageLocation??=resolvePackageLocationFromModulePath(resolveCurrentModulePath()),cachedPackageLocation}function resolvePackageBuildRoot(){return resolvePackageLocation().packageBuildRoot}function resolvePackageRoot(){return resolvePackageLocation().packageRoot}function tryResolvePackageRoot(){try{return resolvePackageRoot()}catch{return}}function rewriteSourceFilePathForBuild(e){return e.replace(/\.[cm]?tsx?$/,`.js`)}function resolvePackageSourceFilePath(e){let t=resolvePackageBuildRoot();return t===null?join(resolvePackageRoot(),e):join(t,rewriteSourceFilePathForBuild(e))}function resolvePackageSourceDirectoryPath(e){let t=resolvePackageBuildRoot();return join(t===null?resolvePackageRoot():t,e)}function resolvePackageDependencyPath(e){try{return packageRequire.resolve(e)}catch(t){let n=tryResolvePackageRoot(),r=n===void 0||!isSourceCheckout(n)?void 0:resolveSourceCheckoutExport(n,e);if(r!==void 0)return r;throw t}}function resolveSourceCheckoutExport(e,t){if(t!==EVE_PACKAGE_NAME&&!t.startsWith(`${EVE_PACKAGE_NAME}/`))return;let n=t===EVE_PACKAGE_NAME?`.`:`.${t.slice(EVE_PACKAGE_NAME.length)}`;try{let t=JSON.parse(readFileSync(join(e,`package.json`),`utf8`)).exports?.[n],r=typeof t==`string`?t:t?.[`eve-source`]??t?.import??t?.default;if(r===void 0)return;let i=r.replace(/^\.\/dist\/src\//,`src/`).replace(/\.[cm]?js$/u,`.ts`),a=join(e,i);return existsSync(a)?a:void 0}catch{return}}function resolvePackageCompiledFilePath(e){let t=resolvePackageBuildRoot();return t===null?join(resolvePackageRoot(),`.generated`,`compiled`,e.replace(/^src\/compiled\//,``)):join(t,e)}function normalizeInstalledPackageInfo(e){let t=e;if(typeof t.name==`string`&&typeof t.version==`string`)return{name:t.name,version:t.version}}function tryReadInstalledPackageInfo(e,t){let n=normalizeInstalledPackageInfo(JSON.parse(readFileSync(e,`utf8`)));if(n?.name===t)return n}function resolveInstalledPackageInfo(){if(cachedPackageInfo)return cachedPackageInfo;let e=tryResolvePackageRoot(),t=e===void 0?void 0:tryReadInstalledPackageInfo(join(e,`package.json`),EVE_PACKAGE_NAME);if(t)return cachedPackageInfo=t,cachedPackageInfo;try{let e=tryReadInstalledPackageInfo(packageRequire.resolve(`${EVE_PACKAGE_NAME}/package.json`),EVE_PACKAGE_NAME);if(e)return cachedPackageInfo=e,cachedPackageInfo}catch{}return cachedPackageInfo={...FALLBACK_PACKAGE_INFO},cachedPackageInfo}function readWorkflowVersionFromManifest(e){let t=e;for(let e of[t.devDependencies,t.dependencies,t.peerDependencies]){let t=e?.[`@workflow/core`];if(typeof t==`string`&&t.trim().length>0)return t}}function resolveExpectedWorkflowVersion(){let e=tryResolvePackageRoot();if(e!==void 0)try{return readWorkflowVersionFromManifest(JSON.parse(readFileSync(join(e,`package.json`),`utf8`)))}catch{}try{return readWorkflowVersionFromManifest(JSON.parse(readFileSync(packageRequire.resolve(`${EVE_PACKAGE_NAME}/package.json`),`utf8`)))}catch{return}}function resolveWorkflowModulePath(e){if(e===`workflow`)return resolvePackageSourceFilePath(`src/internal/workflow/index.ts`);if(e===`workflow/api`||e===`workflow/runtime`)return resolvePackageSourceFilePath(`src/internal/workflow/runtime.ts`);if(e===`workflow/internal/builtins`)return resolvePackageSourceFilePath(`src/internal/workflow/builtins.ts`);let t=WORKFLOW_MODULE_ALIASES[e];return t===void 0?packageRequire.resolve(e):resolvePackageCompiledFilePath(t)}export{resolveExpectedWorkflowVersion,resolveInstalledPackageInfo,resolvePackageCompiledFilePath,resolvePackageDependencyPath,resolvePackageLocationFromModulePath,resolvePackageRoot,resolvePackageSourceDirectoryPath,resolvePackageSourceFilePath,resolveWorkflowModulePath};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { type WorkflowToolEntryPoint } from "#tools/workflow-definition.js";
|
|
2
|
+
import type { JsonObject } from "#shared/json.js";
|
|
1
3
|
import type { InternalToolDefinition, ToolExecuteFn } from "#tools/definition.js";
|
|
2
4
|
import { type CompiledToolBehavior } from "#tools/behavior.js";
|
|
3
5
|
import { type WorkflowProgramOptions } from "#tools/workflow-program-input.js";
|
|
@@ -14,8 +16,16 @@ type NormalizedAuthoredTool = Readonly<Omit<InternalToolDefinition, "name"> & {
|
|
|
14
16
|
readonly hasApproval: boolean;
|
|
15
17
|
readonly hasExecute: boolean;
|
|
16
18
|
readonly hasModelOutputProjection: boolean;
|
|
19
|
+
/** The input schema as eve sends it to a model, from the live authored schema. */
|
|
20
|
+
readonly modelInputSchema: JsonObject;
|
|
21
|
+
readonly workflow?: CompiledWorkflowEntry;
|
|
17
22
|
readonly workflowProgram?: WorkflowProgramOptions;
|
|
18
23
|
}>;
|
|
24
|
+
/** The compiled entry point of a `defineWorkflowTool()` definition. */
|
|
25
|
+
interface CompiledWorkflowEntry {
|
|
26
|
+
readonly entryPoint: WorkflowToolEntryPoint;
|
|
27
|
+
readonly workflowId: string;
|
|
28
|
+
}
|
|
19
29
|
/**
|
|
20
30
|
* Result of normalizing one authored tool default export. Either a real tool
|
|
21
31
|
* definition, a sentinel that disables a framework default, or a dynamic
|