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
|
@@ -29,6 +29,7 @@ export declare function applyMemoryRecallBatches(input: {
|
|
|
29
29
|
readonly state: SessionStateMap | undefined;
|
|
30
30
|
}): {
|
|
31
31
|
readonly history: ModelMessage[];
|
|
32
|
+
readonly recalledMessages: ModelMessage[];
|
|
32
33
|
readonly state: SessionStateMap;
|
|
33
34
|
};
|
|
34
35
|
export declare function projectMemoryHistory(input: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createHash}from"node:crypto";import{createFrameworkUserMessage}from"#harness/messages.js";import{identityHistoryViewProjector}from"#shared/history-view.js";const MEMORY_NAMESPACE_MAX_BYTES=1024,MEMORY_SCOPE_COMPONENT_MAX_BYTES=1024,MEMORY_CANONICAL_KEY_INPUT_MAX_BYTES=4096,MEMORY_ITEM_ID_MAX_BYTES=1024,MEMORY_MESSAGE_METADATA_KEY=`eve.memory`,MEMORY_SESSION_STATE_KEY=`eve.memory`;function createMemoryLock(e){validateMemoryNamespace(e.namespace),validateMemoryScopeValue(e.scope);let t=encodeScalar(`namespace`,e.namespace),n=encodeScope(e.scope);if(t.byteLength+n.byteLength>MEMORY_CANONICAL_KEY_INPUT_MAX_BYTES)throw Error(`Memory slot "${e.slot}" namespace and scope encoding exceeds ${MEMORY_CANONICAL_KEY_INPUT_MAX_BYTES} UTF-8 bytes.`);let r=digest(`memns1_`,t),i=digest(`memscope1_`,n),a=Buffer.concat([Buffer.from(`eve-memory-composite-v1\0`),lengthPrefix(Buffer.from(r)),lengthPrefix(Buffer.from(i))]),o=Object.freeze({key:digest(`memscope1_`,a),namespace:e.namespace,value:Array.isArray(e.scope)?Object.freeze([...e.scope]):e.scope});return Object.freeze({namespaceKey:r,scope:o,scopeKey:i,slot:e.slot,turn:e.turn,visibility:e.visibility})}function validateMemoryRecallResult(e,t){if(e==null)return[];if(typeof e!=`object`||Array.isArray(e))throw Error(`Memory slot "${t}" recall() must return { messages }, null, or undefined.`);let n=Object.keys(e).filter(e=>e!==`messages`);if(n.length>0)throw Error(`Memory slot "${t}" recall() returned unknown key(s): ${n.join(`, `)}.`);if(!Array.isArray(e.messages))throw Error(`Memory slot "${t}" recall().messages must be an array.`);let r=new Set;return e.messages.map((e,n)=>{if(typeof e!=`object`||!e||Array.isArray(e))throw Error(`Memory slot "${t}" recall message ${n} must be an object.`);let i=Object.keys(e).filter(e=>e!==`content`&&e!==`id`);if(i.length>0)throw Error(`Memory slot "${t}" recall message ${n} has unknown key(s): ${i.join(`, `)}.`);if(typeof e.content!=`string`||e.content.trim().length===0)throw Error(`Memory slot "${t}" recall message ${n} content must be non-blank.`);if(e.id===void 0)return Object.freeze({content:e.content});if(typeof e.id!=`string`||e.id.length===0)throw Error(`Memory slot "${t}" recall message ${n} id must be non-empty.`);if(utf8Bytes(e.id)>MEMORY_ITEM_ID_MAX_BYTES)throw Error(`Memory slot "${t}" recall message ${n} id exceeds ${MEMORY_ITEM_ID_MAX_BYTES} UTF-8 bytes.`);if(r.has(e.id))throw Error(`Memory slot "${t}" recall() returned duplicate id "${e.id}".`);return r.add(e.id),Object.freeze({content:e.content,itemKey:digest(`memitem1_`,encodeScalar(`item`,e.id))})})}function applyMemoryRecallBatches(e){let t={...readMemorySessionState(e.state).operationDigests},n=latestKeyedRecords(e.history),r=[];for(let i of e.batches){let e=recallBatchDigest(i.messages),a=t[i.operationId];if(a!==void 0){if(a!==e)throw Error(`Memory recall operation "${i.operationId}" replayed with a different result.`);continue}t[i.operationId]=e;for(let[e,t]of i.messages.entries()){let a={batchIndex:e,itemKey:t.itemKey,namespaceKey:i.lock.namespaceKey,operationId:i.operationId,scopeKey:i.lock.scopeKey,slot:i.lock.slot,version:1};if(t.itemKey!==void 0){let e=memoryItemIdentity(a);if(n.get(e)?.content===t.content)continue;n.set(e,{attribution:a,content:t.content})}r.push(attributeMemoryRecord(t.content,a))}}let i=Object.fromEntries(Object.entries(t).slice(-1024));return{history:[...e.history,...r],state:writeMemorySessionState(e.state,{locks:Object.fromEntries(e.batches.map(e=>[e.lock.slot,e.lock])),operationDigests:i})}}function projectMemoryHistory(e){let t=latestKeyedRecordIndexes(e.messages);return e.messages.flatMap((n,r)=>{let i=readMemoryRecordAttribution(n);if(i===null)return[n];let a=e.locks[i.slot];return a===void 0||a.namespaceKey!==i.namespaceKey||a.visibility===`scope`&&a.scopeKey!==i.scopeKey||i.itemKey!==void 0&&t.get(memoryItemIdentity(i))!==r?[]:[stripMemoryRecordAttribution(n)]})}function projectMemoryHistoryFromSessionState(e){let t=identityHistoryViewProjector(e);return projectMemoryHistory({locks:readMemorySessionState(e.state).locks,messages:t})}function canonicalizeMemoryRecords(e){let t=latestKeyedRecordIndexes(e),n=[],r=[];for(let[i,a]of e.entries()){let e=readMemoryRecordAttribution(a);if(e===null){r.push(a);continue}(e.itemKey===void 0||t.get(memoryItemIdentity(e))===i)&&n.push(a)}return{memory:n,ordinary:r}}function shouldCanonicalizeMemory(e){let t=0,n=0;for(let r of e)readMemoryRecordAttribution(r)!==null&&(t+=1,n+=serializedBytes(r));return t>512||n>262144}function clearMemorySessionState(e){if(e===void 0||!Object.hasOwn(e,MEMORY_SESSION_STATE_KEY))return e??{};let{[MEMORY_SESSION_STATE_KEY]:t,...n}=e;return n}function validateMemoryNamespace(e){if(e.trim().length===0)throw Error(`Memory namespace must be non-empty.`);if(utf8Bytes(e)>MEMORY_NAMESPACE_MAX_BYTES)throw Error(`Memory namespace exceeds ${MEMORY_NAMESPACE_MAX_BYTES} UTF-8 bytes.`)}function validateMemoryScopeValue(e){let t=Array.isArray(e)?e:[e];if(Array.isArray(e)&&t.length>16)throw Error(`Memory scope tuple exceeds 16 components.`);if(t.length===0)throw Error(`Memory scope tuple must not be empty.`);for(let[e,n]of t.entries()){if(typeof n!=`string`||n.trim().length===0)throw Error(`Memory scope component ${e} must be a non-empty string.`);if(utf8Bytes(n)>MEMORY_SCOPE_COMPONENT_MAX_BYTES)throw Error(`Memory scope component ${e} exceeds ${MEMORY_SCOPE_COMPONENT_MAX_BYTES} UTF-8 bytes.`)}}function encodeScope(e){return typeof e==`string`?encodeScalar(`scope-scalar`,e):Buffer.concat([Buffer.from(`scope-tuple-v1\0`),uint32(e.length),...e.map(e=>lengthPrefix(Buffer.from(e,`utf8`)))])}function encodeScalar(e,t){return Buffer.concat([Buffer.from(`${e}-v1\0`),lengthPrefix(Buffer.from(t,`utf8`))])}function lengthPrefix(e){return Buffer.concat([uint32(e.byteLength),e])}function uint32(e){let t=Buffer.allocUnsafe(4);return t.writeUInt32BE(e),t}function digest(e,t){return`${e}${createHash(`sha256`).update(t).digest(`base64url`)}`}function recallBatchDigest(e){return createHash(`sha256`).update(JSON.stringify(e)).digest(`base64url`)}function attributeMemoryRecord(e,t){return createFrameworkUserMessage(`memory.load`,e,{[MEMORY_MESSAGE_METADATA_KEY]:t})}function readMemoryRecordAttribution(e){if(typeof e!=`object`||!e)return null;let t=Reflect.get(e,`metadata`);if(typeof t!=`object`||!t)return null;let n=Reflect.get(t,MEMORY_MESSAGE_METADATA_KEY);if(typeof n!=`object`||!n)return null;let r=n;if(r.version!==1||typeof r.batchIndex!=`number`||typeof r.namespaceKey!=`string`||typeof r.operationId!=`string`||typeof r.scopeKey!=`string`||typeof r.slot!=`string`||r.itemKey!==void 0&&typeof r.itemKey!=`string`)throw Error(`Durable history contains invalid eve memory attribution.`);return r}function stripMemoryRecordAttribution(e){let t=Reflect.get(e,`metadata`);if(typeof t!=`object`||!t)return e;let{[MEMORY_MESSAGE_METADATA_KEY]:n,...r}=t,{metadata:i,...a}=e;return Object.keys(r).length===0?a:Object.assign(a,{metadata:r})}function latestKeyedRecordIndexes(e){let t=new Map;for(let[n,r]of e.entries()){let e=readMemoryRecordAttribution(r);e?.itemKey!==void 0&&t.set(memoryItemIdentity(e),n)}return t}function latestKeyedRecords(e){let t=new Map;for(let n of e){let e=readMemoryRecordAttribution(n);if(e?.itemKey===void 0)continue;let r=Reflect.get(n,`content`),i=typeof r==`string`?r:``;t.set(memoryItemIdentity(e),{attribution:e,content:i})}return t}function memoryItemIdentity(e){return JSON.stringify([e.slot,e.namespaceKey,e.scopeKey,e.itemKey])}function readMemorySessionState(e){let t=e?.[MEMORY_SESSION_STATE_KEY];if(typeof t!=`object`||!t||Array.isArray(t))return{locks:{},operationDigests:{}};let n=Reflect.get(t,`locks`),r=Reflect.get(t,`operationDigests`);return{locks:typeof n==`object`&&n&&!Array.isArray(n)?n:{},operationDigests:typeof r==`object`&&r&&!Array.isArray(r)?r:{}}}function writeMemorySessionState(e,t){return{...e,[MEMORY_SESSION_STATE_KEY]:t}}function serializedBytes(e){return Buffer.byteLength(JSON.stringify(e),`utf8`)}function utf8Bytes(e){return Buffer.byteLength(e,`utf8`)}export{applyMemoryRecallBatches,canonicalizeMemoryRecords,clearMemorySessionState,createMemoryLock,projectMemoryHistory,projectMemoryHistoryFromSessionState,shouldCanonicalizeMemory,validateMemoryRecallResult};
|
|
1
|
+
import{createHash}from"node:crypto";import{createFrameworkUserMessage}from"#harness/messages.js";import{identityHistoryViewProjector}from"#shared/history-view.js";const MEMORY_NAMESPACE_MAX_BYTES=1024,MEMORY_SCOPE_COMPONENT_MAX_BYTES=1024,MEMORY_CANONICAL_KEY_INPUT_MAX_BYTES=4096,MEMORY_ITEM_ID_MAX_BYTES=1024,MEMORY_MESSAGE_METADATA_KEY=`eve.memory`,MEMORY_SESSION_STATE_KEY=`eve.memory`;function createMemoryLock(e){validateMemoryNamespace(e.namespace),validateMemoryScopeValue(e.scope);let t=encodeScalar(`namespace`,e.namespace),n=encodeScope(e.scope);if(t.byteLength+n.byteLength>MEMORY_CANONICAL_KEY_INPUT_MAX_BYTES)throw Error(`Memory slot "${e.slot}" namespace and scope encoding exceeds ${MEMORY_CANONICAL_KEY_INPUT_MAX_BYTES} UTF-8 bytes.`);let r=digest(`memns1_`,t),i=digest(`memscope1_`,n),a=Buffer.concat([Buffer.from(`eve-memory-composite-v1\0`),lengthPrefix(Buffer.from(r)),lengthPrefix(Buffer.from(i))]),o=Object.freeze({key:digest(`memscope1_`,a),namespace:e.namespace,value:Array.isArray(e.scope)?Object.freeze([...e.scope]):e.scope});return Object.freeze({namespaceKey:r,scope:o,scopeKey:i,slot:e.slot,turn:e.turn,visibility:e.visibility})}function validateMemoryRecallResult(e,t){if(e==null)return[];if(typeof e!=`object`||Array.isArray(e))throw Error(`Memory slot "${t}" recall() must return { messages }, null, or undefined.`);let n=Object.keys(e).filter(e=>e!==`messages`);if(n.length>0)throw Error(`Memory slot "${t}" recall() returned unknown key(s): ${n.join(`, `)}.`);if(!Array.isArray(e.messages))throw Error(`Memory slot "${t}" recall().messages must be an array.`);let r=new Set;return e.messages.map((e,n)=>{if(typeof e!=`object`||!e||Array.isArray(e))throw Error(`Memory slot "${t}" recall message ${n} must be an object.`);let i=Object.keys(e).filter(e=>e!==`content`&&e!==`id`);if(i.length>0)throw Error(`Memory slot "${t}" recall message ${n} has unknown key(s): ${i.join(`, `)}.`);if(typeof e.content!=`string`||e.content.trim().length===0)throw Error(`Memory slot "${t}" recall message ${n} content must be non-blank.`);if(e.id===void 0)return Object.freeze({content:e.content});if(typeof e.id!=`string`||e.id.length===0)throw Error(`Memory slot "${t}" recall message ${n} id must be non-empty.`);if(utf8Bytes(e.id)>MEMORY_ITEM_ID_MAX_BYTES)throw Error(`Memory slot "${t}" recall message ${n} id exceeds ${MEMORY_ITEM_ID_MAX_BYTES} UTF-8 bytes.`);if(r.has(e.id))throw Error(`Memory slot "${t}" recall() returned duplicate id "${e.id}".`);return r.add(e.id),Object.freeze({content:e.content,itemKey:digest(`memitem1_`,encodeScalar(`item`,e.id))})})}function applyMemoryRecallBatches(e){let t={...readMemorySessionState(e.state).operationDigests},n=latestKeyedRecords(e.history),r=[];for(let i of e.batches){let e=recallBatchDigest(i.messages),a=t[i.operationId];if(a!==void 0){if(a!==e)throw Error(`Memory recall operation "${i.operationId}" replayed with a different result.`);continue}t[i.operationId]=e;for(let[e,t]of i.messages.entries()){let a={batchIndex:e,itemKey:t.itemKey,namespaceKey:i.lock.namespaceKey,operationId:i.operationId,scopeKey:i.lock.scopeKey,slot:i.lock.slot,version:1};if(t.itemKey!==void 0){let e=memoryItemIdentity(a);if(n.get(e)?.content===t.content)continue;n.set(e,{attribution:a,content:t.content})}r.push(attributeMemoryRecord(t.content,a))}}let i=Object.fromEntries(Object.entries(t).slice(-1024));return{history:[...e.history,...r],recalledMessages:r,state:writeMemorySessionState(e.state,{locks:Object.fromEntries(e.batches.map(e=>[e.lock.slot,e.lock])),operationDigests:i})}}function projectMemoryHistory(e){let t=latestKeyedRecordIndexes(e.messages);return e.messages.flatMap((n,r)=>{let i=readMemoryRecordAttribution(n);if(i===null)return[n];let a=e.locks[i.slot];return a===void 0||a.namespaceKey!==i.namespaceKey||a.visibility===`scope`&&a.scopeKey!==i.scopeKey||i.itemKey!==void 0&&t.get(memoryItemIdentity(i))!==r?[]:[stripMemoryRecordAttribution(n)]})}function projectMemoryHistoryFromSessionState(e){let t=identityHistoryViewProjector(e);return projectMemoryHistory({locks:readMemorySessionState(e.state).locks,messages:t})}function canonicalizeMemoryRecords(e){let t=latestKeyedRecordIndexes(e),n=[],r=[];for(let[i,a]of e.entries()){let e=readMemoryRecordAttribution(a);if(e===null){r.push(a);continue}(e.itemKey===void 0||t.get(memoryItemIdentity(e))===i)&&n.push(a)}return{memory:n,ordinary:r}}function shouldCanonicalizeMemory(e){let t=0,n=0;for(let r of e)readMemoryRecordAttribution(r)!==null&&(t+=1,n+=serializedBytes(r));return t>512||n>262144}function clearMemorySessionState(e){if(e===void 0||!Object.hasOwn(e,MEMORY_SESSION_STATE_KEY))return e??{};let{[MEMORY_SESSION_STATE_KEY]:t,...n}=e;return n}function validateMemoryNamespace(e){if(e.trim().length===0)throw Error(`Memory namespace must be non-empty.`);if(utf8Bytes(e)>MEMORY_NAMESPACE_MAX_BYTES)throw Error(`Memory namespace exceeds ${MEMORY_NAMESPACE_MAX_BYTES} UTF-8 bytes.`)}function validateMemoryScopeValue(e){let t=Array.isArray(e)?e:[e];if(Array.isArray(e)&&t.length>16)throw Error(`Memory scope tuple exceeds 16 components.`);if(t.length===0)throw Error(`Memory scope tuple must not be empty.`);for(let[e,n]of t.entries()){if(typeof n!=`string`||n.trim().length===0)throw Error(`Memory scope component ${e} must be a non-empty string.`);if(utf8Bytes(n)>MEMORY_SCOPE_COMPONENT_MAX_BYTES)throw Error(`Memory scope component ${e} exceeds ${MEMORY_SCOPE_COMPONENT_MAX_BYTES} UTF-8 bytes.`)}}function encodeScope(e){return typeof e==`string`?encodeScalar(`scope-scalar`,e):Buffer.concat([Buffer.from(`scope-tuple-v1\0`),uint32(e.length),...e.map(e=>lengthPrefix(Buffer.from(e,`utf8`)))])}function encodeScalar(e,t){return Buffer.concat([Buffer.from(`${e}-v1\0`),lengthPrefix(Buffer.from(t,`utf8`))])}function lengthPrefix(e){return Buffer.concat([uint32(e.byteLength),e])}function uint32(e){let t=Buffer.allocUnsafe(4);return t.writeUInt32BE(e),t}function digest(e,t){return`${e}${createHash(`sha256`).update(t).digest(`base64url`)}`}function recallBatchDigest(e){return createHash(`sha256`).update(JSON.stringify(e)).digest(`base64url`)}function attributeMemoryRecord(e,t){return createFrameworkUserMessage(`memory.load`,e,{[MEMORY_MESSAGE_METADATA_KEY]:t})}function readMemoryRecordAttribution(e){if(typeof e!=`object`||!e)return null;let t=Reflect.get(e,`metadata`);if(typeof t!=`object`||!t)return null;let n=Reflect.get(t,MEMORY_MESSAGE_METADATA_KEY);if(typeof n!=`object`||!n)return null;let r=n;if(r.version!==1||typeof r.batchIndex!=`number`||typeof r.namespaceKey!=`string`||typeof r.operationId!=`string`||typeof r.scopeKey!=`string`||typeof r.slot!=`string`||r.itemKey!==void 0&&typeof r.itemKey!=`string`)throw Error(`Durable history contains invalid eve memory attribution.`);return r}function stripMemoryRecordAttribution(e){let t=Reflect.get(e,`metadata`);if(typeof t!=`object`||!t)return e;let{[MEMORY_MESSAGE_METADATA_KEY]:n,...r}=t,{metadata:i,...a}=e;return Object.keys(r).length===0?a:Object.assign(a,{metadata:r})}function latestKeyedRecordIndexes(e){let t=new Map;for(let[n,r]of e.entries()){let e=readMemoryRecordAttribution(r);e?.itemKey!==void 0&&t.set(memoryItemIdentity(e),n)}return t}function latestKeyedRecords(e){let t=new Map;for(let n of e){let e=readMemoryRecordAttribution(n);if(e?.itemKey===void 0)continue;let r=Reflect.get(n,`content`),i=typeof r==`string`?r:``;t.set(memoryItemIdentity(e),{attribution:e,content:i})}return t}function memoryItemIdentity(e){return JSON.stringify([e.slot,e.namespaceKey,e.scopeKey,e.itemKey])}function readMemorySessionState(e){let t=e?.[MEMORY_SESSION_STATE_KEY];if(typeof t!=`object`||!t||Array.isArray(t))return{locks:{},operationDigests:{}};let n=Reflect.get(t,`locks`),r=Reflect.get(t,`operationDigests`);return{locks:typeof n==`object`&&n&&!Array.isArray(n)?n:{},operationDigests:typeof r==`object`&&r&&!Array.isArray(r)?r:{}}}function writeMemorySessionState(e,t){return{...e,[MEMORY_SESSION_STATE_KEY]:t}}function serializedBytes(e){return Buffer.byteLength(JSON.stringify(e),`utf8`)}function utf8Bytes(e){return Buffer.byteLength(e,`utf8`)}export{applyMemoryRecallBatches,canonicalizeMemoryRecords,clearMemorySessionState,createMemoryLock,projectMemoryHistory,projectMemoryHistoryFromSessionState,shouldCanonicalizeMemory,validateMemoryRecallResult};
|
|
@@ -3,13 +3,13 @@ export declare const MODEL_HELPERS: {
|
|
|
3
3
|
readonly chatgpt: {
|
|
4
4
|
readonly module: "eve/models/openai";
|
|
5
5
|
readonly prefix: "chatgpt/";
|
|
6
|
-
readonly defaultModel: "gpt-
|
|
6
|
+
readonly defaultModel: "gpt-6-luna-fast";
|
|
7
7
|
readonly provider: "codex";
|
|
8
8
|
};
|
|
9
9
|
readonly openai: {
|
|
10
10
|
readonly module: "eve/models/openai";
|
|
11
11
|
readonly prefix: "openai-api/";
|
|
12
|
-
readonly defaultModel: "gpt-
|
|
12
|
+
readonly defaultModel: "gpt-6-luna-fast";
|
|
13
13
|
readonly provider: "openai";
|
|
14
14
|
};
|
|
15
15
|
readonly anthropic: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const MODEL_CONNECTION_ENV=`EVE_MODEL_CONNECTION`,MODEL_HELPERS={chatgpt:{module:`eve/models/openai`,prefix:`chatgpt/`,defaultModel:`gpt-
|
|
1
|
+
const MODEL_CONNECTION_ENV=`EVE_MODEL_CONNECTION`,MODEL_HELPERS={chatgpt:{module:`eve/models/openai`,prefix:`chatgpt/`,defaultModel:`gpt-6-luna-fast`,provider:`codex`},openai:{module:`eve/models/openai`,prefix:`openai-api/`,defaultModel:`gpt-6-luna-fast`,provider:`openai`},anthropic:{module:`eve/models/anthropic`,prefix:`anthropic-api/`,defaultModel:`claude-sonnet-5`,provider:`anthropic`}};function parseModelHelper(e){for(let t of Object.keys(MODEL_HELPERS)){let{prefix:n}=MODEL_HELPERS[t];if(e.startsWith(n)){let r=e.slice(n.length);if(r&&r===r.trim()&&!r.includes(`/`))return{helper:t,id:r}}}}export{MODEL_CONNECTION_ENV,MODEL_HELPERS,parseModelHelper};
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The one-line model summary grammar shared by the dev TUI's status line and
|
|
3
|
-
* the /model menu's Change model hint: `slug@level ↯`. One implementation so
|
|
4
|
-
* the two surfaces cannot drift.
|
|
5
|
-
*/
|
|
1
|
+
/** Compact display label for the dev TUI: `model · reasoning · ⚡︎`. */
|
|
6
2
|
export declare function formatModelSummary(input: {
|
|
7
3
|
model: string;
|
|
8
4
|
/** Authored reasoning level; omitted renders the bare slug. */
|
|
9
5
|
reasoning?: string;
|
|
10
|
-
/**
|
|
6
|
+
/** Speed marker glyph, present for intrinsic speed or the priority tier. */
|
|
11
7
|
fastGlyph?: string;
|
|
12
8
|
}): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function formatModelSummary(e){
|
|
1
|
+
function formatModelSummary(e){return[e.model.slice(e.model.lastIndexOf(`/`)+1).replace(/-fast$/u,``),e.reasoning,e.fastGlyph].filter(e=>e!==void 0).join(` · `)}export{formatModelSummary};
|
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
export declare const MAX_ACTIVITY_TEXT_LENGTH = 500;
|
|
2
2
|
/** Normalizes bounded untrusted presentation text before it reaches a renderer. */
|
|
3
3
|
export declare function normalizePresentationText(text: string): string;
|
|
4
|
+
/**
|
|
5
|
+
* The first sentence of the text's first non-empty line, normalized: a brief
|
|
6
|
+
* for a message or result. Returns `undefined` when there is no text.
|
|
7
|
+
*/
|
|
8
|
+
export declare function firstSentence(text: string): string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const MAX_ACTIVITY_TEXT_LENGTH=500;function normalizePresentationText(e){return e.replace(/\p{Cc}/gu,` `).replace(/\s+/g,` `).trim().slice(0,500)}export{MAX_ACTIVITY_TEXT_LENGTH,normalizePresentationText};
|
|
1
|
+
const MAX_ACTIVITY_TEXT_LENGTH=500;function normalizePresentationText(e){return e.replace(/\p{Cc}/gu,` `).replace(/\s+/g,` `).trim().slice(0,500)}function firstSentence(e){for(let t of e.split(/\r?\n/u)){let e=normalizePresentationText(t);if(e!==``)return e.split(/(?<=[.!?])(?<!(?:^|\s)\d{1,2}\.)\s+(?=[\p{Lu}"'`(])/u,1)[0]}}export{MAX_ACTIVITY_TEXT_LENGTH,firstSentence,normalizePresentationText};
|
|
@@ -6,7 +6,3 @@ export declare const SERIALIZED_INSTRUMENTATION_STATE_KEYS: {
|
|
|
6
6
|
};
|
|
7
7
|
/** Keeps instrumentation state needed to settle operations opened by a discarded step. */
|
|
8
8
|
export declare function preserveSerializedInstrumentationState(original: Record<string, unknown>, interrupted: Record<string, unknown>): Record<string, unknown>;
|
|
9
|
-
/** Keeps only the observability state a retained background task needs before readiness. */
|
|
10
|
-
export declare function preserveSerializedBackgroundTaskObservabilityState(original: Record<string, unknown>, completed: Record<string, unknown>, tasks: readonly {
|
|
11
|
-
readonly taskId: string;
|
|
12
|
-
}[]): Record<string, unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const SERIALIZED_INSTRUMENTATION_STATE_KEYS={activeChannelDeliveries:`eve.activeChannelDeliveries`,actionScopes:`eve.harness.instrumentationActionScopes`,inputScopes:`eve.harness.instrumentationInputScopes`,providerState:`eve.harness.instrumentationState`}
|
|
1
|
+
const SERIALIZED_INSTRUMENTATION_STATE_KEYS={activeChannelDeliveries:`eve.activeChannelDeliveries`,actionScopes:`eve.harness.instrumentationActionScopes`,inputScopes:`eve.harness.instrumentationInputScopes`,providerState:`eve.harness.instrumentationState`};function preserveSerializedInstrumentationState(e,t){let n=e;for(let e of Object.values(SERIALIZED_INSTRUMENTATION_STATE_KEYS)){let r=t[e];r!==void 0&&(n={...n,[e]:r})}return n}export{SERIALIZED_INSTRUMENTATION_STATE_KEYS,preserveSerializedInstrumentationState};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Structural deltas between serializable values.
|
|
3
|
+
*
|
|
4
|
+
* `applyValueDelta(base, diffValue(base, next))` rebuilds `next` as a
|
|
5
|
+
* serializer sees it: the same entries, in the same key order, including
|
|
6
|
+
* entries whose value is `undefined`. Plain objects and arrays change entry by
|
|
7
|
+
* entry, so the result shares every unchanged entry with `base`. Any other
|
|
8
|
+
* value is compared by identity and carried whole when it differs, so such
|
|
9
|
+
* values must be replaced rather than edited in place.
|
|
10
|
+
*/
|
|
11
|
+
export type ValueDelta = {
|
|
12
|
+
readonly kind: "value";
|
|
13
|
+
readonly value: unknown;
|
|
14
|
+
} | (EntryChanges & {
|
|
15
|
+
readonly kind: "object";
|
|
16
|
+
/**
|
|
17
|
+
* The next object's keys, present only when they are not the base's keys
|
|
18
|
+
* followed by the added ones: an entry was removed or the order changed.
|
|
19
|
+
*/
|
|
20
|
+
readonly keys?: readonly string[];
|
|
21
|
+
}) | (EntryChanges & {
|
|
22
|
+
readonly kind: "array";
|
|
23
|
+
readonly length: number;
|
|
24
|
+
});
|
|
25
|
+
/** Entry changes by key or index: whole next values in `set`, nested deltas in `patch`. */
|
|
26
|
+
interface EntryChanges {
|
|
27
|
+
readonly patch?: Readonly<Record<string, ValueDelta>>;
|
|
28
|
+
readonly set?: Readonly<Record<string, unknown>>;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Copies every plain object and array in `value` and keeps any other value by
|
|
32
|
+
* reference, so editing `value` in place afterwards leaves the copy intact.
|
|
33
|
+
*/
|
|
34
|
+
export declare function snapshotValue<T>(value: T): T;
|
|
35
|
+
/** The delta from `base` to `next`, or `undefined` when they are equal. */
|
|
36
|
+
export declare function diffValue(base: unknown, next: unknown): ValueDelta | undefined;
|
|
37
|
+
/** Applies a delta from {@link diffValue} to the value it was computed against. */
|
|
38
|
+
export declare function applyValueDelta<T>(base: T, delta: ValueDelta | undefined): T;
|
|
39
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function snapshotValue(e){return Array.isArray(e)?e.map(e=>snapshotValue(e)):isPlainObject(e)?Object.fromEntries(Object.keys(e).map(t=>[t,snapshotValue(e[t])])):e}function diffValue(e,t){if(!Object.is(e,t))return Array.isArray(e)&&Array.isArray(t)?diffArray(e,t):isPlainObject(e)&&isPlainObject(t)?diffObject(e,t):{kind:`value`,value:t}}function applyValueDelta(e,t){if(t===void 0)return e;switch(t.kind){case`value`:return t.value;case`array`:{if(!Array.isArray(e))throw deltaMismatch(`an array`);let n=e.slice(0,t.length);for(let[e,r]of Object.entries(t.set??{}))n[Number(e)]=r;for(let[r,i]of Object.entries(t.patch??{}))n[Number(r)]=applyValueDelta(e[Number(r)],i);return n}case`object`:{if(!isPlainObject(e))throw deltaMismatch(`an object`);let n=Object.keys(e),r=t.set??{},i=t.patch??{},a=t.keys??impliedKeys(n,r);return Object.fromEntries(a.map(t=>Object.hasOwn(r,t)?[t,r[t]]:Object.hasOwn(i,t)?[t,applyValueDelta(e[t],i[t])]:[t,e[t]]))}}}function diffArray(e,t){let n=[],r=[],i=0;for(let a=0;a<t.length;a++){if(!(a in t)||a<e.length&&!(a in e))return{kind:`value`,value:t};if(a>=e.length){n.push([String(a),t[a]]);continue}let o=diffValue(e[a],t[a]);o===void 0?i++:o.kind===`value`?n.push([String(a),o.value]):r.push([String(a),o])}if(n.length!==0||r.length!==0||t.length!==e.length)return i===0&&r.length===0?{kind:`value`,value:t}:{...entryChanges(n,r),kind:`array`,length:t.length}}function diffObject(e,t){let n=Object.keys(e),r=Object.keys(t),i=[],a=[],o=0;for(let n of r){if(!Object.hasOwn(e,n)){i.push([n,t[n]]);continue}let r=diffValue(e[n],t[n]);r===void 0?o++:r.kind===`value`?i.push([n,r.value]):a.push([n,r])}let s=entryChanges(i,a),c=!sameKeys(impliedKeys(n,s.set??{}),r);if(i.length!==0||a.length!==0||c)return o===0&&a.length===0?{kind:`value`,value:t}:c?{...s,keys:r,kind:`object`}:{...s,kind:`object`}}function entryChanges(e,t){let n={};return e.length>0&&(n.set=Object.fromEntries(e)),t.length>0&&(n.patch=Object.fromEntries(t)),n}function impliedKeys(e,t){let n=new Set(e),r=Object.keys(t).filter(e=>!n.has(e));return r.length===0?e:[...e,...r]}function sameKeys(e,t){return e.length===t.length&&e.every((e,n)=>e===t[n])}function isPlainObject(e){if(typeof e!=`object`||!e||Array.isArray(e))return!1;let t=Object.getPrototypeOf(e);return t!==null&&Object.getPrototypeOf(t)===null}function deltaMismatch(e){return Error(`Value delta does not match its base: expected ${e}.`)}export{applyValueDelta,diffValue,snapshotValue};
|
|
@@ -28,8 +28,6 @@ export interface SubagentAdapterState extends Record<string, unknown> {
|
|
|
28
28
|
readonly parentContinuationToken: string;
|
|
29
29
|
readonly parentSessionId: string;
|
|
30
30
|
readonly subagentName: string;
|
|
31
|
-
/** Owning task when this child was started by a background workflow tool. */
|
|
32
|
-
readonly taskId?: string;
|
|
33
31
|
}
|
|
34
32
|
/**
|
|
35
33
|
* Narrow runtime guard for {@link SubagentAdapterState}.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const SUBAGENT_ADAPTER_KIND=`subagent`;function isSubagentAdapterState(e){if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.callId==`string`&&t.callId.length>0&&typeof t.parentContinuationToken==`string`&&t.parentContinuationToken.length>0&&typeof t.parentSessionId==`string`&&typeof t.subagentName==`string`&&t.subagentName.length>0
|
|
1
|
+
const SUBAGENT_ADAPTER_KIND=`subagent`;function isSubagentAdapterState(e){if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.callId==`string`&&t.callId.length>0&&typeof t.parentContinuationToken==`string`&&t.parentContinuationToken.length>0&&typeof t.parentSessionId==`string`&&typeof t.subagentName==`string`&&t.subagentName.length>0}export{SUBAGENT_ADAPTER_KIND,isSubagentAdapterState};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createErrorId,createLogger}from"#internal/logging.js";import{ContinuationTokenKey,SessionIdKey,SessionInboxKey}from"#context/keys.js";import{resumeHook}from"#internal/workflow/runtime.js";import{SUBAGENT_ADAPTER_KIND,isSubagentAdapterState}from"#subagents/adapter-state.js";const log=createLogger(`execution.subagent-adapter`),SUBAGENT_ADAPTER={kind:SUBAGENT_ADAPTER_KIND,async"approval.candidate"(e,t){await forwardSubagentAuthorizationEvent({data:e,type:`approval.candidate`},t)},async"approval.settled"(e,t){await forwardSubagentAuthorizationEvent({data:e,type:`approval.settled`},t)},async"authorization.required"(e,t){await forwardSubagentAuthorizationEvent({data:e,type:`authorization.required`},t)},async"authorization.completed"(e,t){await forwardSubagentAuthorizationEvent({data:e,type:`authorization.completed`},t)},async"input.requested"(e,t){let n=t.state;isSubagentAdapterState(n)&&await forwardSubagentInputRequestStep({hookPayload:{callId:n.callId,childContinuationToken:t.ctx.require(ContinuationTokenKey),childSessionId:t.ctx.require(SessionIdKey),childSessionInbox:t.ctx.get(SessionInboxKey),event:{requests:e.requests,sequence:e.sequence,stepIndex:e.stepIndex,turnId:e.turnId},kind:`subagent-input-request`,subagentName:n.subagentName},parentContinuationToken:n.parentContinuationToken})}};async function forwardSubagentAuthorizationEvent(e,t){let n=t.state;isSubagentAdapterState(n)&&await forwardSubagentAuthorizationEventStep({hookPayload:{callId:n.callId,childSessionId:t.ctx.require(SessionIdKey),event:e,kind:`subagent-authorization-event`,subagentName:n.subagentName},parentContinuationToken:n.parentContinuationToken})}async function forwardSubagentAuthorizationEventStep(e){"use step";try{await resumeHook(e.parentContinuationToken,e.hookPayload)}catch(t){let n=createErrorId();throw log.warn(`failed to forward subagent authorization event to parent`,{callId:e.hookPayload.callId,childSessionId:e.hookPayload.childSessionId,errorId:n,eventType:e.hookPayload.event.type,parentContinuationToken:e.parentContinuationToken,subagentName:e.hookPayload.subagentName,error:t}),t}}async function forwardSubagentInputRequestStep(e){"use step";try{await resumeHook(e.parentContinuationToken,e.hookPayload)}catch(t){let n=createErrorId();throw log.warn(`failed to forward proxied HITL batch to parent`,{callId:e.hookPayload.callId,childContinuationToken:e.hookPayload.childContinuationToken,childSessionId:e.hookPayload.childSessionId,errorId:n,parentContinuationToken:e.parentContinuationToken,subagentName:e.hookPayload.subagentName,error:t}),t}}export{SUBAGENT_ADAPTER};
|
|
1
|
+
import{createErrorId,createLogger}from"#internal/logging.js";import{ContinuationTokenKey,SessionIdKey,SessionInboxKey}from"#context/keys.js";import{resumeHook}from"#internal/workflow/runtime.js";import{SUBAGENT_ADAPTER_KIND,isSubagentAdapterState}from"#subagents/adapter-state.js";const log=createLogger(`execution.subagent-adapter`),SUBAGENT_ADAPTER={kind:SUBAGENT_ADAPTER_KIND,async"approval.candidate"(e,t){await forwardSubagentAuthorizationEvent({data:e,type:`approval.candidate`},t)},async"approval.settled"(e,t){await forwardSubagentAuthorizationEvent({data:e,type:`approval.settled`},t)},async"authorization.required"(e,t){await forwardSubagentAuthorizationEvent({data:e,type:`authorization.required`},t)},async"authorization.completed"(e,t){await forwardSubagentAuthorizationEvent({data:e,type:`authorization.completed`},t)},async"input.requested"(e,t){let n=t.state;isSubagentAdapterState(n)&&await forwardSubagentInputRequestStep({hookPayload:{callId:n.callId,childContinuationToken:t.ctx.require(ContinuationTokenKey),childSessionId:t.ctx.require(SessionIdKey),childSessionInbox:t.ctx.get(SessionInboxKey),inputSource:t.inputSource,event:{requests:e.requests,sequence:e.sequence,stepIndex:e.stepIndex,turnId:e.turnId},kind:`subagent-input-request`,subagentName:n.subagentName},parentContinuationToken:n.parentContinuationToken})}};async function forwardSubagentAuthorizationEvent(e,t){let n=t.state;isSubagentAdapterState(n)&&await forwardSubagentAuthorizationEventStep({hookPayload:{callId:n.callId,childSessionId:t.ctx.require(SessionIdKey),event:e,kind:`subagent-authorization-event`,subagentName:n.subagentName},parentContinuationToken:n.parentContinuationToken})}async function forwardSubagentAuthorizationEventStep(e){"use step";try{await resumeHook(e.parentContinuationToken,e.hookPayload)}catch(t){let n=createErrorId();throw log.warn(`failed to forward subagent authorization event to parent`,{callId:e.hookPayload.callId,childSessionId:e.hookPayload.childSessionId,errorId:n,eventType:e.hookPayload.event.type,parentContinuationToken:e.parentContinuationToken,subagentName:e.hookPayload.subagentName,error:t}),t}}async function forwardSubagentInputRequestStep(e){"use step";try{await resumeHook(e.parentContinuationToken,e.hookPayload)}catch(t){let n=createErrorId();throw log.warn(`failed to forward proxied HITL batch to parent`,{callId:e.hookPayload.callId,childContinuationToken:e.hookPayload.childContinuationToken,childSessionId:e.hookPayload.childSessionId,errorId:n,parentContinuationToken:e.parentContinuationToken,subagentName:e.hookPayload.subagentName,error:t}),t}}export{SUBAGENT_ADAPTER};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z}from"#compiled/zod/index.js";import{
|
|
1
|
+
import{z}from"#compiled/zod/index.js";import{inputRequestSchema}from"#shared/input.js";import{jsonValueSchema}from"#shared/json-schemas.js";import{resumeHook}from"#internal/workflow/runtime.js";import{agentTurnOutcomeWithCostSchema}from"#shared/agent-turn-outcome.js";const sessionInputCallbackSchema=z.object({callId:z.string().min(1),childContinuationToken:z.string().min(1),childSessionId:z.string().min(1),childSessionInbox:z.object({sessionId:z.string().min(1)}).strict().optional(),inputSource:z.string().min(1).optional(),remote:z.object({name:z.string().min(1),url:z.string().url(),forwardPrincipal:z.boolean().optional(),sessionId:z.string().min(1),resolverId:z.string().min(1).optional()}).strict().optional(),kind:z.literal(`subagent-input-request`),subagentName:z.string().min(1),event:z.object({requests:z.array(inputRequestSchema).min(1),sequence:z.number(),stepIndex:z.number(),taskId:z.string().optional(),turnId:z.string()})}),sessionAuthorizationCallbackSchema=z.object({callId:z.string().min(1),childSessionId:z.string().min(1),kind:z.literal(`subagent-authorization-event`),subagentName:z.string().min(1),event:z.discriminatedUnion(`type`,[z.object({type:z.literal(`approval.candidate`),data:z.object({candidateId:z.string(),outcome:z.enum([`pending`,`rejected`,`failed`,`timed-out`,`stale`]),requestId:z.string(),responderPrincipalId:z.string(),reason:z.string().optional(),sequence:z.number(),stepIndex:z.number(),turnId:z.string()}).passthrough()}),z.object({type:z.literal(`approval.settled`),data:z.object({outcome:z.enum([`approved`,`cancelled`]),requestId:z.string(),responderPrincipalId:z.string(),sequence:z.number(),stepIndex:z.number(),turnId:z.string()}).passthrough()}),z.object({type:z.literal(`authorization.required`),data:z.object({description:z.string(),name:z.string(),sequence:z.number(),stepIndex:z.number(),turnId:z.string(),webhookUrl:z.string().optional(),attemptId:z.string().optional(),taskId:z.string().optional(),principalId:z.string().optional()}).passthrough()}),z.object({type:z.literal(`authorization.completed`),data:z.object({name:z.string(),outcome:z.enum([`authorized`,`declined`,`failed`,`timed-out`]),sequence:z.number(),stepIndex:z.number(),turnId:z.string(),attemptId:z.string().optional(),taskId:z.string().optional(),principalId:z.string().optional()}).passthrough()})])}),sessionResultCallbackSchema=z.discriminatedUnion(`kind`,[z.object({callId:z.string().min(1),kind:z.literal(`turn.completed`),outcome:agentTurnOutcomeWithCostSchema,output:jsonValueSchema.optional(),subagentName:z.string().min(1)}),z.object({callId:z.string().min(1),error:jsonValueSchema,kind:z.literal(`turn.failed`),outcome:agentTurnOutcomeWithCostSchema,subagentName:z.string().min(1)})]);async function handleSessionCallbackRequest(e,t){let n=t.params.token;if(typeof n!=`string`||n.length===0)return Response.json({error:`Missing callback token.`,ok:!1},{status:400});let r;try{r=await e.json()}catch{return Response.json({error:`Invalid JSON body.`,ok:!1},{status:400})}let i=callbackKind(r),a=i===`subagent-input-request`?sessionInputCallbackSchema.safeParse(r):i===`subagent-authorization-event`?sessionAuthorizationCallbackSchema.safeParse(r):void 0;if(a!==void 0&&!a.success)return Response.json({error:`Invalid session input callback.`,ok:!1},{status:400});let o=a===void 0?projectSessionCallbackResult(r):void 0;if(o instanceof Response)return o;try{await resumeHook(n,a?.success?a.data:{kind:`runtime-action-result`,results:[o]})}catch{return Response.json({error:`Session callback not pending.`,ok:!1},{status:404})}return Response.json({ok:!0},{status:202})}function callbackKind(e){if(typeof e==`object`&&e)return Reflect.get(e,`kind`)}function projectSessionCallbackResult(e){if(typeof e!=`object`||!e)return Response.json({error:`Expected a JSON object.`,ok:!1},{status:400});let t=callbackKind(e);if(t!==`turn.completed`&&t!==`turn.failed`)return Response.json({error:`Unsupported callback kind.`,ok:!1},{status:400});let n=sessionResultCallbackSchema.safeParse(e);if(!n.success)return Response.json({error:`Invalid session result callback.`,ok:!1},{status:400});let r=n.data;return r.kind===`turn.completed`?{callId:r.callId,kind:`subagent-result`,origin:`child`,outcome:r.outcome,output:r.output??``,subagentName:r.subagentName,usage:r.outcome.usageDelta}:{callId:r.callId,isError:!0,kind:`subagent-result`,origin:`child`,outcome:r.outcome,output:r.error,subagentName:r.subagentName}}export{handleSessionCallbackRequest};
|
|
@@ -1,35 +1,22 @@
|
|
|
1
1
|
import type { SubagentAuthorizationEventHookPayload, SubagentInputRequestHookPayload } from "#channel/types.js";
|
|
2
|
-
import type
|
|
3
|
-
import { type
|
|
4
|
-
import type {
|
|
5
|
-
import type { TaskInputRequestDelivery } from "#tasks/types.js";
|
|
2
|
+
import { type PublishedSessionEvents, type RestoredSessionStep, type SessionStepState } from "#execution/publish-session-events.js";
|
|
3
|
+
import { type SessionStateTransition } from "#execution/session/state-delta.js";
|
|
4
|
+
import type { WorkflowAskRoute } from "#harness/proxy-input-requests.js";
|
|
6
5
|
type SubagentEventHookPayload = SubagentAuthorizationEventHookPayload | SubagentInputRequestHookPayload;
|
|
7
|
-
interface ProxySubagentEventResult {
|
|
8
|
-
readonly serializedContext: Record<string, unknown>;
|
|
9
|
-
readonly sessionState: DurableSessionState;
|
|
10
|
-
}
|
|
11
6
|
/** Proxies one child event through its parent channel across a durable step boundary. */
|
|
12
|
-
export declare function runProxySubagentEventStep(input: {
|
|
13
|
-
readonly
|
|
7
|
+
export declare function runProxySubagentEventStep(input: SessionStepState & {
|
|
8
|
+
readonly workflowAsk?: WorkflowAskRoute;
|
|
9
|
+
readonly runId?: string;
|
|
14
10
|
readonly hookPayload: SubagentEventHookPayload;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
readonly
|
|
23
|
-
readonly
|
|
24
|
-
readonly sessionState: DurableSessionState;
|
|
25
|
-
}): Promise<ProxySubagentEventResult>;
|
|
26
|
-
/** Applies one proxied child event to an already-hydrated parent context. */
|
|
27
|
-
export declare function emitProxiedSubagentEvent(input: {
|
|
28
|
-
readonly answerHook?: AnswerHookRoute;
|
|
29
|
-
readonly ctx: ContextContainer;
|
|
30
|
-
readonly durableSession: DurableSession;
|
|
11
|
+
}): Promise<SessionStateTransition>;
|
|
12
|
+
/**
|
|
13
|
+
* Relays one child event through the parent session's channel. `runId` names
|
|
14
|
+
* the workflow tool run that relayed an input request, so the session can
|
|
15
|
+
* withdraw it when that run ends.
|
|
16
|
+
*/
|
|
17
|
+
export declare function emitProxiedSubagentEvent(input: RestoredSessionStep & {
|
|
18
|
+
readonly workflowAsk?: WorkflowAskRoute;
|
|
19
|
+
readonly runId?: string;
|
|
31
20
|
readonly hookPayload: SubagentEventHookPayload;
|
|
32
|
-
|
|
33
|
-
readonly recordProxyInputRequests?: boolean;
|
|
34
|
-
}): Promise<ProxySubagentEventResult>;
|
|
21
|
+
}): Promise<PublishedSessionEvents>;
|
|
35
22
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{publishFromSessionStep,restoreSessionStep}from"#execution/publish-session-events.js";import{withSessionStateDelta}from"#execution/session/state-delta.js";import{upsertProxyInputRequests}from"#harness/proxy-input-requests.js";import{emitProxiedAuthorizationEvent,emitProxiedInputRequest}from"#subagents/hitl-proxy.js";async function runProxySubagentEventStep(e){"use step";return await withSessionStateDelta(e,async e=>emitProxiedSubagentEvent({...await restoreSessionStep(e),workflowAsk:e.workflowAsk,runId:e.runId,hookPayload:e.hookPayload}))}async function emitProxiedSubagentEvent(e){let{hookPayload:t,runId:n,workflowAsk:r}=e,{published:i}=await publishFromSessionStep(e,{origin:`relayed`,inputSource:t.kind===`subagent-input-request`?JSON.stringify([t.childContinuationToken,t.inputSource??null]):void 0,async publish(e,n){if(t.kind===`subagent-authorization-event`){await emitProxiedAuthorizationEvent({emit:e,hookPayload:t,session:n});return}return await emitProxiedInputRequest({emit:e,hookPayload:t,session:n})},updateSession(e,i){return i===void 0||t.kind!==`subagent-input-request`?{session:e}:{session:upsertProxyInputRequests({entries:i.map(([e,t])=>[e,{...t,...r!==void 0&&{workflowAsk:r},...n!==void 0&&{runId:n}}]),forChildContinuationToken:t.childContinuationToken,inputSource:t.inputSource,session:e})}}});return i}export{emitProxiedSubagentEvent,runProxySubagentEventStep};
|
|
@@ -1,36 +1,54 @@
|
|
|
1
1
|
import type { SessionInboxAddress } from "#execution/session-inbox/address.js";
|
|
2
|
-
import type { DeliverPayload, SubagentInputRequestHookPayload } from "#channel/types.js";
|
|
3
|
-
import type {
|
|
2
|
+
import type { DeliverPayload, SubagentAuthorizationEventHookPayload, SubagentInputRequestHookPayload } from "#channel/types.js";
|
|
3
|
+
import type { PendingInputBatchEvent } from "#harness/pending-input-batches.js";
|
|
4
|
+
import type { WorkflowAskRoute, ProxyInputRequest } from "#harness/proxy-input-requests.js";
|
|
4
5
|
import type { HarnessEmitFn, HarnessSession, SessionStateMap } from "#harness/types.js";
|
|
6
|
+
import { type InputResolution } from "#protocol/message.js";
|
|
5
7
|
import type { InputResponse } from "#shared/input.js";
|
|
6
8
|
/**
|
|
7
|
-
* Runs the parent-side work for a `subagent-input-request`: emits the request
|
|
8
|
-
*
|
|
9
|
-
*
|
|
9
|
+
* Runs the parent-side work for a `subagent-input-request`: emits the request,
|
|
10
|
+
* then `turn.waiting` for the parent's open turn. The call that asked is still
|
|
11
|
+
* running, so the turn stays open until the answer lets that call settle. The
|
|
12
|
+
* returned proxy entries route the eventual response back down to the asker.
|
|
10
13
|
*/
|
|
11
14
|
export declare function emitProxiedInputRequest(input: {
|
|
12
15
|
readonly emit: HarnessEmitFn;
|
|
13
16
|
readonly hookPayload: SubagentInputRequestHookPayload;
|
|
14
17
|
readonly session: HarnessSession;
|
|
15
|
-
}): Promise<
|
|
16
|
-
|
|
18
|
+
}): Promise<readonly (readonly [requestId: string, route: ProxyInputRequest])[]>;
|
|
19
|
+
/**
|
|
20
|
+
* Runs the parent-side work for a `subagent-authorization-event`: re-emits the
|
|
21
|
+
* event, and after `authorization.required` parks the parent's open turn with
|
|
22
|
+
* `turn.waiting`. The sign-in completes on the asker's own callback while the
|
|
23
|
+
* call keeps running, so the parent's turn neither ends nor resets.
|
|
24
|
+
*/
|
|
25
|
+
export declare function emitProxiedAuthorizationEvent(input: {
|
|
26
|
+
readonly emit: HarnessEmitFn;
|
|
27
|
+
readonly hookPayload: SubagentAuthorizationEventHookPayload;
|
|
17
28
|
readonly session: HarnessSession;
|
|
18
|
-
}>;
|
|
29
|
+
}): Promise<void>;
|
|
19
30
|
/** One proxied-child bucket of a routed deliver payload. */
|
|
20
31
|
export interface RoutedChildDelivery {
|
|
21
|
-
readonly
|
|
32
|
+
readonly workflowAsk?: WorkflowAskRoute;
|
|
33
|
+
readonly remote?: ProxyInputRequest["remote"];
|
|
34
|
+
readonly inputSource?: string;
|
|
22
35
|
readonly childContinuationToken: string;
|
|
23
36
|
readonly childSessionInbox?: SessionInboxAddress;
|
|
24
|
-
readonly childResponseUrl?: string;
|
|
25
|
-
/** Answer-hook requests the user moved past; each hook resumes as `dismissed`. */
|
|
26
|
-
readonly dismissedRequestIds?: readonly string[];
|
|
27
37
|
readonly payload: {
|
|
28
38
|
readonly inputResponses: readonly InputResponse[];
|
|
29
39
|
};
|
|
30
|
-
/**
|
|
31
|
-
readonly
|
|
32
|
-
|
|
33
|
-
|
|
40
|
+
/** What forwarding this bucket resolves on the routing session. */
|
|
41
|
+
readonly resolved: ProxiedInputResolutions;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* The parent-visible requests one forwarded bucket resolves: those it answers,
|
|
45
|
+
* plus the rest of a batch those answers complete. Each retires from the proxy
|
|
46
|
+
* map, and the session announces them with one `input.resolved` at `event`,
|
|
47
|
+
* the coordinates of the child batch's `input.requested`.
|
|
48
|
+
*/
|
|
49
|
+
export interface ProxiedInputResolutions {
|
|
50
|
+
readonly event: PendingInputBatchEvent;
|
|
51
|
+
readonly resolutions: readonly InputResolution[];
|
|
34
52
|
}
|
|
35
53
|
/**
|
|
36
54
|
* Outcome of splitting one deliver payload by the session's proxy map.
|
|
@@ -50,7 +68,7 @@ export interface RoutedDeliverPayload {
|
|
|
50
68
|
* With `resolveMessage`, a plain-text message is also resolved against pending
|
|
51
69
|
* `ctx.ask()` questions: when exactly one question is pending, a matching option or
|
|
52
70
|
* permitted free text answers it and consumes the message. Otherwise the
|
|
53
|
-
* message
|
|
71
|
+
* message stays with the parent.
|
|
54
72
|
*/
|
|
55
73
|
export declare function routeDeliverPayload(input: {
|
|
56
74
|
readonly allowRoute?: (requestId: string, route: ProxyInputRequest) => boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createInputRequestedEvent}from"#protocol/message.js";import{resolveTextToResponse}from"#channel/resolve-text.js";import{
|
|
1
|
+
import{createInputRequestedEvent,createTurnWaitingEvent}from"#protocol/message.js";import{resolveTextToResponse}from"#channel/resolve-text.js";import{getHarnessEmissionState}from"#harness/emission.js";import{getProxyInputRequests,toProxyInputRequestEntries}from"#harness/proxy-input-requests.js";import{resolveInputOutcome}from"#harness/input-request-resolution.js";import{SESSION_LIMIT_STOP_OPTION_ID}from"#harness/session-limit-continuation.js";async function emitProxiedInputRequest(e){return await e.emit(createInputRequestedEvent({requests:e.hookPayload.event.requests,sequence:e.hookPayload.event.sequence,stepIndex:e.hookPayload.event.stepIndex,taskId:e.hookPayload.event.taskId,turnId:e.hookPayload.event.turnId})),await emitTurnWaiting(e.emit,e.session),toProxyInputRequestEntries(e.hookPayload)}async function emitProxiedAuthorizationEvent(e){await e.emit(e.hookPayload.event),e.hookPayload.event.type===`authorization.required`&&await emitTurnWaiting(e.emit,e.session)}async function emitTurnWaiting(e,t){let n=getHarnessEmissionState(t.state);await e(createTurnWaitingEvent({sequence:n.sequence,turnId:n.turnId}))}function routeDeliverPayload(e){let t=getProxyInputRequests(e.state),routable=(t,n)=>n!==void 0&&e.allowRoute?.(t,n)!==!1,n=resolveMessageAgainstQuestions({enabled:e.resolveMessage===!0,entries:t,payload:e.payload,routable}),r=[...e.payload.inputResponses??[],...n.responses],i=new Map,a=[],o,bucketFor=e=>{let t=JSON.stringify([e.childContinuationToken,e.childSessionInbox?.sessionId??``,e.remote?.sessionId??``,e.event.sequence,e.event.stepIndex,e.event.turnId,e.inputSource??null]),n=i.get(t);if(n!==void 0)return n;let r={childContinuationToken:e.childContinuationToken,remote:e.remote,event:e.event,parentRequestIds:[],responses:[],routes:[],...e.childSessionInbox!==void 0&&{childSessionInbox:e.childSessionInbox},...e.workflowAsk!==void 0&&{workflowAsk:e.workflowAsk}};return i.set(t,r),r},s=new Set;for(let e of r){let n=t.get(e.requestId);if(n===void 0||!routable(e.requestId,n)){a.push(e);continue}if(s.has(e.requestId))continue;s.add(e.requestId),n.kind===`session-limit`&&e.optionId===SESSION_LIMIT_STOP_OPTION_ID&&(o={kind:`cancel-turn`});let r=bucketFor(n);r.parentRequestIds.push(e.requestId),r.responses.push(e),r.routes.push(n)}let c=[...i.values()].map(({workflowAsk:e,remote:n,childContinuationToken:r,childSessionInbox:i,event:a,parentRequestIds:o,responses:s,routes:c})=>{let l=new Set(o),u=new Set(l);for(let e of c)if(e.batch!==void 0&&batchResolves({batch:e.batch,childContinuationToken:r,entries:t,responseIds:l}))for(let t of e.batch.requestIds)u.add(t);return{childContinuationToken:r,payload:{inputResponses:s},resolved:{event:a,resolutions:resolveRetiredRequests({entries:t,responses:s,retireRequestIds:u})},...i!==void 0&&{childSessionInbox:i},...e!==void 0&&{workflowAsk:e},...n!==void 0&&{remote:n},...c[0]?.inputSource!==void 0&&{inputSource:c[0].inputSource}}}),l={};for(let[t,r]of Object.entries(e.payload))t!==`inputResponses`&&r!==void 0&&(t===`message`&&n.consumed||(l[t]=r));return a.length>0&&(l.inputResponses=a),{forChildren:c,forSelf:Object.keys(l).length>0?l:void 0,parentAction:o}}function resolveRetiredRequests(e){let t=new Map(e.responses.map(e=>[e.requestId,e])),n=[];for(let r of e.retireRequestIds){let i=e.entries.get(r);i!==void 0&&n.push(toInputResolution(r,i,t.get(r)))}return n}function toInputResolution(e,t,n){let r=resolveInputOutcome(t.kind,n),i={kind:t.kind,outcome:r,requestId:e};return n===void 0?i:{...i,response:n}}function resolveMessageAgainstQuestions(e){let t={consumed:!1,responses:[]};if(!e.enabled||(e.payload.inputResponses?.length??0)>0||e.payload.message===void 0)return t;let n=[...e.entries].filter(([t,n])=>n.kind===`question`&&e.routable(t,n)),r=n.flatMap(([e,t])=>{let n=t.workflowAsk?.question??t.question;return n===void 0?[]:[{requestId:e,...n}]});if(r.length===0)return t;let[i]=r,a=n.length===1&&i!==void 0&&typeof e.payload.message==`string`?resolveTextToResponse(e.payload.message,i):void 0;return a===void 0?t:{consumed:!0,responses:[a]}}function batchResolves(e){return e.batch.approvalRequestIds.length===0||e.batch.approvalRequestIds.every(t=>{let n=e.entries.get(t);return n===void 0||!sameBatch(n,e)||e.responseIds.has(t)})}function sameBatch(e,t){return e.childContinuationToken===t.childContinuationToken&&e.batch?.requestIds.length===t.batch.requestIds.length&&e.batch.requestIds.every((e,n)=>e===t.batch.requestIds[n])}export{emitProxiedAuthorizationEvent,emitProxiedInputRequest,routeDeliverPayload};
|
|
@@ -20,8 +20,7 @@ interface FormattedSubagentInvocation extends StepInput {
|
|
|
20
20
|
* Reads the `outputSchema` a `ctx.agent()` call requested. An empty `{}`
|
|
21
21
|
* constrains nothing, but honoring it would flip the child into
|
|
22
22
|
* structured-output mode and discard its text reply, so only a non-empty
|
|
23
|
-
* object counts as a requested schema.
|
|
24
|
-
* rule.
|
|
23
|
+
* object counts as a requested schema.
|
|
25
24
|
*/
|
|
26
25
|
export declare function normalizeRequestedOutputSchema(outputSchema: JsonValue | undefined): JsonObject | undefined;
|
|
27
26
|
type RuntimeSubagentInputFormatRequest = {
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import type { TurnCaller } from "#channel/types.js";
|
|
3
3
|
import type { AgentTurnOutcome } from "#shared/agent-turn-outcome.js";
|
|
4
4
|
import type { TokenUsage } from "#shared/token-usage.js";
|
|
5
|
+
import { type SessionStateTransition } from "#execution/session/state-delta.js";
|
|
5
6
|
/** Settled turn payload forwarded from the owner to the caller. */
|
|
6
7
|
export interface SettledTurnNotification {
|
|
7
8
|
readonly output: unknown;
|
|
@@ -38,4 +39,4 @@ export declare function resolveInitialTurnCallerStep(input: {
|
|
|
38
39
|
export declare function bindTurnCallerContextStep(input: {
|
|
39
40
|
readonly caller: TurnCaller | undefined;
|
|
40
41
|
readonly serializedContext: Record<string, unknown>;
|
|
41
|
-
}): Promise<
|
|
42
|
+
}): Promise<SessionStateTransition>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createLogger}from"#internal/logging.js";import{
|
|
1
|
+
import{createLogger}from"#internal/logging.js";import{SessionCallbackKey}from"#context/keys.js";import{toErrorMessage}from"#shared/errors.js";import{parseJsonValue}from"#shared/json.js";import{ChannelKey}from"#runtime/sessions/runtime-context-keys.js";import{parseSessionCallback}from"#channel/session-callback.js";import{deserializeContext}from"#context/serialize.js";import{withSessionStateDelta}from"#execution/session/state-delta.js";import{postSessionCallbackRequest}from"#execution/session-callback-request.js";import{HookNotFoundError}from"#compiled/@workflow/errors/index.js";import{resumeHook}from"#internal/workflow/runtime.js";import{SUBAGENT_ADAPTER_KIND,isSubagentAdapterState}from"#subagents/adapter-state.js";const log=createLogger(`execution.delegated-parent-notification`),SUBAGENT_EXECUTION_FAILED=`SUBAGENT_EXECUTION_FAILED`,ZERO_TOKEN_USAGE={cacheReadTokens:0,cacheWriteTokens:0,inputTokens:0,outputTokens:0};async function notifyTurnCallerStep(e){"use step";if(e.caller===void 0)return;let t=createSettledTurnResult({caller:e.caller,lifecycle:e.lifecycle,sessionId:e.sessionId,settled:e.settled});if(e.caller.replyTo.kind===`callback`){await postSettledTurnCallback({result:t,sessionId:e.sessionId,url:e.caller.replyTo.url});return}await resumeSettledTurnHook(e.caller.replyTo.token,t)}async function notifyCancelledTaskCallerStep(e){"use step";if(e.caller===void 0)return;let t=e.usage??ZERO_TOKEN_USAGE,n={code:SUBAGENT_EXECUTION_FAILED,message:`The agent invocation was cancelled.`},r={callId:e.caller.callId,isError:!0,kind:`subagent-result`,origin:`child`,outcome:{kind:`parked`,result:{kind:`cancelled`},usageDelta:t},output:n,subagentName:e.caller.subagentName},i=e.usage===void 0?r:{...r,usage:e.usage};if(e.caller.replyTo.kind===`callback`){await postSettledTurnCallback({result:i,sessionId:e.sessionId,url:e.caller.replyTo.url});return}await resumeSettledTurnHook(e.caller.replyTo.token,i)}function createSettledTurnResult(e){let t=e.settled.usage??ZERO_TOKEN_USAGE;if(e.settled.isError===!0){let n={code:SUBAGENT_EXECUTION_FAILED,message:toErrorMessage(e.settled.output)};return{callId:e.caller.callId,isError:!0,kind:`subagent-result`,origin:`child`,outcome:{kind:e.lifecycle,result:{error:n,kind:`failed`},usageDelta:t},output:n,subagentName:e.caller.subagentName}}let n=parseJsonValue(e.settled.output),r={callId:e.caller.callId,kind:`subagent-result`,origin:`child`,outcome:{kind:e.lifecycle,result:{kind:`succeeded`,output:n},usageDelta:t},output:n,subagentName:e.caller.subagentName};return e.settled.usage===void 0?r:{...r,usage:e.settled.usage}}async function resolveInitialTurnCallerStep(e){"use step";let t=e.serializedContext[SessionCallbackKey.name];if(t!==void 0){let e=parseSessionCallback(t);if(!e.ok)throw Error(`Serialized session callback is invalid.`,{cause:e.cause});return{callId:e.callback.callId,replyTo:{kind:`callback`,token:e.callback.token,url:e.callback.url},subagentName:e.callback.subagentName}}let n=(await deserializeContext(e.serializedContext)).get(ChannelKey);if(n?.kind===SUBAGENT_ADAPTER_KIND&&isSubagentAdapterState(n.state))return{callId:n.state.callId,replyTo:{kind:`hook`,token:n.state.parentContinuationToken},subagentName:n.state.subagentName}}async function bindTurnCallerContextStep(e){"use step";return await withSessionStateDelta(e,async({caller:e,serializedContext:t})=>({serializedContext:bindTurnCallerContext(e,t)}))}function bindTurnCallerContext(e,t){if(e===void 0)return t;if(e.replyTo.kind===`callback`){let n={callId:e.callId,subagentName:e.subagentName,token:e.replyTo.token,url:e.replyTo.url};return{...t,[SessionCallbackKey.name]:n}}let n=t[ChannelKey.name];if(typeof n!=`object`||!n||Reflect.get(n,`kind`)!==SUBAGENT_ADAPTER_KIND||!isSubagentAdapterState(Reflect.get(n,`state`)))throw Error(`Delegated local turn is missing its subagent adapter binding.`);let r={...Reflect.get(n,`state`),callId:e.callId,parentContinuationToken:e.replyTo.token,subagentName:e.subagentName};return{...t,[ChannelKey.name]:{...n,state:r}}}async function postSettledTurnCallback(e){let{sessionId:t}=e;if(e.result.isError===!0){await postCallbackPayload({payload:{callId:e.result.callId,error:e.result.output,kind:`turn.failed`,outcome:e.result.outcome,sessionId:t,subagentName:e.result.subagentName},url:e.url});return}await postCallbackPayload({payload:{callId:e.result.callId,kind:`turn.completed`,outcome:e.result.outcome,output:e.result.output,sessionId:t,subagentName:e.result.subagentName},url:e.url})}async function postCallbackPayload(e){let t=await postSessionCallbackRequest({body:e.payload,url:e.url});if(!t.ok)throw Error(`Turn callback failed with HTTP ${t.status}.`)}async function resumeSettledTurnHook(e,t){try{await resumeHook(e,{kind:`runtime-action-result`,results:[t]})}catch(n){if(!HookNotFoundError.is(n))throw n;log.warn(`turn caller hook no longer exists`,{callId:t.callId,callerToken:e})}}export{bindTurnCallerContextStep,notifyCancelledTaskCallerStep,notifyTurnCallerStep,resolveInitialTurnCallerStep};
|
|
@@ -2,15 +2,14 @@ import type { RunSessionLimits } from "#channel/types.js";
|
|
|
2
2
|
import type { HarnessSession } from "#harness/types.js";
|
|
3
3
|
/**
|
|
4
4
|
* Computes the session token limits a delegated child inherits from its
|
|
5
|
-
* parent: the parent's remaining runtime-limit quota split evenly
|
|
6
|
-
*
|
|
5
|
+
* parent: the parent's remaining runtime-limit quota, per axis, split evenly
|
|
6
|
+
* across the `fanoutSize` children started together. `false` marks an axis
|
|
7
7
|
* with no inherited cap.
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* the
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* dispatched after a grant draw from the fresh window.
|
|
9
|
+
* The split bounds children started together by the parent's remainder as a
|
|
10
|
+
* group, not each by the whole of it. Children started later see the quota
|
|
11
|
+
* net of the spend earlier children reported, which counts in the parent's
|
|
12
|
+
* session totals. A granted continuation bumps the parent's runtime limit, so
|
|
13
|
+
* children started after a grant draw from the fresh window.
|
|
15
14
|
*/
|
|
16
|
-
export declare function resolveRemainingSessionTokenLimits(session: Pick<HarnessSession, "limits" | "state">, fanoutSize
|
|
15
|
+
export declare function resolveRemainingSessionTokenLimits(session: Pick<HarnessSession, "limits" | "state">, fanoutSize: number): RunSessionLimits;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getSessionRemainingUsageQuota}from"#harness/turn-tag-state.js";function resolveRemainingSessionTokenLimits(e,t
|
|
1
|
+
import{getSessionRemainingUsageQuota}from"#harness/turn-tag-state.js";function resolveRemainingSessionTokenLimits(e,t){let n=Math.max(1,t),r=getSessionRemainingUsageQuota(e),i={maxInputTokensPerSession:grantTokenShare(r.inputTokens,n),maxOutputTokensPerSession:grantTokenShare(r.outputTokens,n)};return r.costUsd!==!1&&(i.maxTokenCostUsdPerSession=r.costUsd/n),i}function grantTokenShare(e,t){return e!==!1&&Math.floor(e/t)}export{resolveRemainingSessionTokenLimits};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type SubagentParentContext } from "#subagents/invocation.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { ChannelInstrumentationProjection, RunSessionLimits, SessionAuthContext, SessionCapabilities, RunInput } from "#channel/types.js";
|
|
3
3
|
import type { HarnessSession } from "#harness/types.js";
|
|
4
4
|
import type { RuntimeSubagentDispatchRequest } from "#shared/action-types.js";
|
|
5
5
|
import type { ConversationContext } from "#shared/conversation-context.js";
|
|
@@ -48,15 +48,10 @@ export declare function buildSubagentRunInput(input: {
|
|
|
48
48
|
*/
|
|
49
49
|
readonly capabilities?: SessionCapabilities;
|
|
50
50
|
readonly channelMetadata?: ChannelInstrumentationProjection;
|
|
51
|
+
/** Replay-stable key the child's continuation token derives from. */
|
|
52
|
+
readonly continuationKey: string;
|
|
51
53
|
/** Parent's immutable conversation classification. */
|
|
52
54
|
readonly inheritedConversation?: ConversationContext;
|
|
53
|
-
/**
|
|
54
|
-
* Number of local subagent calls dispatched in this batch. The parent's
|
|
55
|
-
* remaining token quota is split evenly across them so parallel children
|
|
56
|
-
* are collectively, not individually, bounded by it. Remote agents run
|
|
57
|
-
* under their own deployment's limits and are not counted.
|
|
58
|
-
*/
|
|
59
|
-
readonly fanoutSize?: number;
|
|
60
55
|
readonly initiatorAuth: SessionAuthContext | null;
|
|
61
56
|
/**
|
|
62
57
|
* Runtime graph used to detect whether this declared child selected the
|
|
@@ -66,11 +61,10 @@ export declare function buildSubagentRunInput(input: {
|
|
|
66
61
|
/** Durable session identity of the sandbox currently used by the parent. */
|
|
67
62
|
readonly sandboxSessionId?: string;
|
|
68
63
|
readonly selfAgent: boolean;
|
|
64
|
+
/** Session token limits the child inherits. */
|
|
65
|
+
readonly limits: RunSessionLimits;
|
|
69
66
|
readonly parent: SubagentParentContext;
|
|
70
|
-
readonly
|
|
71
|
-
readonly session: HarnessSession;
|
|
67
|
+
readonly session: Pick<HarnessSession, "continuationToken" | "sandboxState" | "sessionId">;
|
|
72
68
|
readonly source: SubagentInputSource;
|
|
73
|
-
/** Owning task when this child starts from a background workflow tool. */
|
|
74
|
-
readonly taskId?: string;
|
|
75
69
|
}): SubagentRunInputBuild;
|
|
76
70
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{formatSubagentInput}from"#subagents/invocation.js";import{mintSubagentContinuationToken}from"#execution/session.js";import{SUBAGENT_ADAPTER_KIND}from"#subagents/adapter-state.js";function buildSubagentRunInput(e){let{action:t,auth:n,capabilities:r,channelMetadata:i,inheritedConversation:a,initiatorAuth:o,session:s,source:c}=e,l=mintSubagentContinuationToken(e.continuationKey),u={callId:t.callId,parentContinuationToken:e.parent.continuationToken??s.continuationToken,parentSessionId:s.sessionId,subagentName:t.subagentName};return(e.graph?.nodesByNodeId.get(t.nodeId)?.sandboxRegistry.sandbox?.definition.kind===`parent`||e.selfAgent)&&(s.sandboxState!==void 0&&(u.parentSandboxState=s.sandboxState),u.sandboxSessionId=e.sandboxSessionId??s.sessionId),{childContinuationToken:l,runInput:{adapter:{kind:SUBAGENT_ADAPTER_KIND,state:u},auth:n,capabilities:r,channelMetadata:i,inheritedConversation:a,continuationToken:l,initiatorAuth:o,input:{message:formatSubagentCallInputMessage({action:t,source:c}),outputSchema:t.input.outputSchema},limits:e.limits,conversationId:e.parent.conversationId,parent:e.parent.lineage,parentTraceContext:e.parent.traceContext}}}function formatSubagentCallInputMessage(e){let{message:t}=e.action.input;switch(e.source.type){case`local`:return formatSubagentInput({description:e.source.description,message:t,name:e.action.subagentName,type:`local`}).message;case`runtime`:return formatSubagentInput({message:t,name:e.action.subagentName,type:`runtime`}).message;default:return e.source}}export{buildSubagentRunInput};
|
package/dist/src/svelte/index.js
CHANGED