eve 0.55.0 → 0.57.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 +58 -0
- package/dist/src/channel/adapter-context.d.ts +1 -1
- package/dist/src/channel/adapter.d.ts +2 -2
- package/dist/src/channel/audience.d.ts +3 -3
- package/dist/src/channel/channel-address.js +1 -1
- package/dist/src/channel/conversation-context.d.ts +4 -2
- package/dist/src/channel/conversation-context.js +1 -1
- package/dist/src/channel/session.d.ts +4 -3
- package/dist/src/channel/session.js +1 -1
- package/dist/src/channel/types.d.ts +7 -4
- package/dist/src/chunks/{use-eve-agent-D-KQzzyW.js → use-eve-agent-C2APNCdP.js} +45 -22
- package/dist/src/chunks/{use-eve-agent-CxPlg0KL.js → use-eve-agent-D0YnDLi_.js} +45 -22
- package/dist/src/cli/commands/init.d.ts +2 -6
- package/dist/src/cli/commands/init.js +1 -1
- package/dist/src/cli/commands/registry-metadata.d.ts +0 -18
- package/dist/src/cli/commands/registry-metadata.js +1 -1
- package/dist/src/cli/commands/registry-pnpm-build-policy-flow.js +1 -1
- package/dist/src/cli/commands/registry.js +1 -1
- package/dist/src/cli/commands/trace-detail.js +1 -1
- package/dist/src/cli/dev/environment.js +1 -1
- package/dist/src/cli/dev/run-interactive-ui.js +1 -1
- package/dist/src/cli/dev/tui/agent-header.js +1 -1
- package/dist/src/cli/dev/tui/blocks.d.ts +3 -6
- package/dist/src/cli/dev/tui/blocks.js +3 -3
- package/dist/src/cli/dev/tui/command-typeahead.js +1 -1
- package/dist/src/cli/dev/tui/markdown.d.ts +8 -1
- package/dist/src/cli/dev/tui/markdown.js +7 -7
- package/dist/src/cli/dev/tui/message-queue.d.ts +11 -7
- package/dist/src/cli/dev/tui/message-queue.js +1 -1
- package/dist/src/cli/dev/tui/model-editor.d.ts +1 -1
- package/dist/src/cli/dev/tui/model-editor.js +1 -1
- package/dist/src/cli/dev/tui/prompt-command-handler.d.ts +0 -3
- package/dist/src/cli/dev/tui/prompt-command-handler.js +1 -1
- package/dist/src/cli/dev/tui/prompt-commands.d.ts +1 -1
- package/dist/src/cli/dev/tui/prompt-commands.js +1 -1
- package/dist/src/cli/dev/tui/question-panel.js +1 -1
- package/dist/src/cli/dev/tui/remote-auth-result.js +1 -1
- package/dist/src/cli/dev/tui/remote-auth.js +1 -1
- package/dist/src/cli/dev/tui/remote-startup.d.ts +10 -0
- package/dist/src/cli/dev/tui/remote-startup.js +1 -0
- package/dist/src/cli/dev/tui/runner.d.ts +16 -19
- package/dist/src/cli/dev/tui/runner.js +3 -1
- package/dist/src/cli/dev/tui/setup-commands.d.ts +7 -13
- package/dist/src/cli/dev/tui/setup-commands.js +2 -2
- package/dist/src/cli/dev/tui/setup-issues.d.ts +1 -1
- package/dist/src/cli/dev/tui/setup-issues.js +1 -1
- package/dist/src/cli/dev/tui/setup-panel.d.ts +5 -17
- package/dist/src/cli/dev/tui/setup-panel.js +5 -6
- package/dist/src/cli/dev/tui/status-line.d.ts +1 -8
- package/dist/src/cli/dev/tui/status-line.js +1 -1
- package/dist/src/cli/dev/tui/steering-stream.d.ts +15 -0
- package/dist/src/cli/dev/tui/steering-stream.js +1 -0
- package/dist/src/cli/dev/tui/terminal-renderer.d.ts +8 -3
- package/dist/src/cli/dev/tui/terminal-renderer.js +12 -12
- package/dist/src/cli/dev/tui/test/mock-terminal.d.ts +2 -2
- package/dist/src/cli/dev/tui/test/mock-terminal.js +1 -1
- package/dist/src/cli/dev/tui/theme.d.ts +0 -2
- package/dist/src/cli/dev/tui/theme.js +1 -1
- package/dist/src/cli/dev/tui/tui.d.ts +4 -1
- package/dist/src/cli/dev/tui/vercel-status.d.ts +4 -2
- package/dist/src/cli/dev/tui/vercel-status.js +1 -1
- package/dist/src/cli/run.js +1 -1
- package/dist/src/cli/telemetry/index.d.ts +1 -1
- package/dist/src/cli/telemetry/index.js +1 -1
- package/dist/src/cli/ui/terminal-text.js +1 -1
- package/dist/src/client/agent-info-schema.d.ts +2 -57
- package/dist/src/client/agent-info-schema.js +1 -1
- package/dist/src/client/eve-agent-store-state.d.ts +19 -0
- package/dist/src/client/eve-agent-store.js +1 -1
- package/dist/src/client/ndjson.d.ts +2 -0
- package/dist/src/client/ndjson.js +3 -3
- package/dist/src/client/open-stream.d.ts +1 -0
- package/dist/src/client/open-stream.js +1 -1
- package/dist/src/compiled/.vendor-stamp.json +1 -1
- package/dist/src/compiled/@workflow/core/index.js +2 -2
- package/dist/src/compiled/@workflow/core/private.js +1 -1
- package/dist/src/compiled/@workflow/core/runtime/helpers.js +1 -0
- package/dist/src/compiled/@workflow/core/runtime.js +2 -2
- package/dist/src/compiled/@workflow/core/serialization.js +1 -0
- package/dist/src/compiled/@workflow/core/workflow.js +1 -1
- package/dist/src/compiled/@workflow/world-local/index.js +5 -5
- package/dist/src/compiled/@workflow/world-vercel/index.js +2 -2
- package/dist/src/compiled/_chunks/workflow/attribute-changes-DTFAjP0J.js +6 -0
- package/dist/src/compiled/_chunks/workflow/{dist-PLkAQ-U7.js → dist-C5KCXSdI.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/{frames-BvATzM2t.js → frames-DJw9L4rO.js} +3 -3
- package/dist/src/compiled/_chunks/workflow/global-DFW-hO6M.js +1 -0
- package/dist/src/compiled/_chunks/workflow/helpers-ClCA9Lmc.js +1 -0
- package/dist/src/compiled/_chunks/workflow/logger-D6vwIEf9.js +13 -0
- package/dist/src/compiled/_chunks/workflow/resume-hook-_baK8jaT.js +1 -0
- package/dist/src/compiled/_chunks/workflow/run-CRdL17z4.js +1 -0
- package/dist/src/compiled/_chunks/workflow/serialization-CWYPL4Eq.js +3 -0
- package/dist/src/compiled/_chunks/workflow/sleep-BL0kgJnT.js +1 -0
- package/dist/src/compiled/_chunks/workflow/wait-until-DyIt9lEx.js +1 -0
- package/dist/src/compiled/_chunks/workflow/{ws-transport-CVezyWwZ.js → ws-transport-Dl5FG4Sw.js} +1 -1
- package/dist/src/compiler/extension-compatibility.d.ts +27 -8
- package/dist/src/compiler/extension-compatibility.js +1 -1
- package/dist/src/compiler/manifest.d.ts +12 -11
- package/dist/src/compiler/manifest.js +1 -1
- package/dist/src/compiler/normalize-manifest.js +1 -1
- package/dist/src/compiler/normalize-tool.d.ts +0 -3
- package/dist/src/compiler/normalize-tool.js +1 -1
- package/dist/src/compiler/validate-artifact.js +1 -1
- package/dist/src/context/dynamic-skill-lifecycle.js +1 -1
- package/dist/src/context/keys.d.ts +5 -1
- package/dist/src/context/keys.js +1 -1
- package/dist/src/eve-channel/audience.d.ts +2 -2
- package/dist/src/eve-channel/audience.js +1 -1
- package/dist/src/eve-channel/index.js +1 -1
- package/dist/src/eve-channel/request.js +4 -3
- package/dist/src/eve-channel/types.d.ts +5 -5
- package/dist/src/execution/activity-cohort.js +1 -1
- package/dist/src/execution/activity-collector.js +1 -1
- package/dist/src/execution/authorization-callback-match.d.ts +2 -1
- package/dist/src/execution/authorization-callback-match.js +1 -1
- package/dist/src/execution/cancel-descendant-turns-step.js +1 -1
- package/dist/src/execution/cancel-indexed-session-tasks-step.js +1 -1
- package/dist/src/execution/cancelled-model-call-batch.d.ts +1 -1
- package/dist/src/execution/connections/callback-route.d.ts +1 -11
- package/dist/src/execution/connections/callback-route.js +1 -1
- package/dist/src/execution/continuation-conflict-step.d.ts +0 -1
- package/dist/src/execution/continuation-conflict-step.js +1 -1
- package/dist/src/execution/coordination-dispatch-shared.d.ts +1 -1
- package/dist/src/execution/coordination-dispatch-shared.js +1 -1
- package/dist/src/execution/coordination-dispatch-step.d.ts +2 -2
- package/dist/src/execution/coordination-dispatch-step.js +1 -1
- package/dist/src/execution/create-session-step.d.ts +1 -1
- package/dist/src/execution/create-session-step.js +1 -1
- package/dist/src/execution/durable-session-store.d.ts +10 -49
- package/dist/src/execution/durable-session-store.js +1 -1
- package/dist/src/execution/dynamic-workflow/program-step.d.ts +21 -0
- package/dist/src/execution/dynamic-workflow/program-step.js +1 -0
- package/dist/src/execution/dynamic-workflow/schema.d.ts +36 -0
- package/dist/src/execution/dynamic-workflow/schema.js +1 -0
- package/dist/src/execution/dynamic-workflow/security-step.d.ts +3 -0
- package/dist/src/execution/dynamic-workflow/security-step.js +1 -0
- package/dist/src/execution/dynamic-workflow/tool.d.ts +8 -0
- package/dist/src/execution/dynamic-workflow/tool.js +1 -0
- package/dist/src/execution/dynamic-workflow/workflow.d.ts +10 -0
- package/dist/src/execution/dynamic-workflow/workflow.js +1 -0
- package/dist/src/execution/eve-workflow-attributes.d.ts +2 -17
- package/dist/src/execution/eve-workflow-attributes.js +1 -1
- package/dist/src/execution/hook-ownership.d.ts +2 -4
- package/dist/src/execution/hook-ownership.js +1 -1
- package/dist/src/execution/legacy-session/authorization.d.ts +9 -0
- package/dist/src/execution/legacy-session/authorization.js +1 -0
- package/dist/src/execution/legacy-session/completion-step.d.ts +10 -0
- package/dist/src/execution/legacy-session/completion-step.js +1 -0
- package/dist/src/execution/legacy-session/inbox.d.ts +24 -0
- package/dist/src/execution/legacy-session/inbox.js +1 -0
- package/dist/src/execution/legacy-session/input.d.ts +19 -0
- package/dist/src/execution/legacy-session/input.js +1 -0
- package/dist/src/execution/legacy-session/interrupt-step.d.ts +3 -0
- package/dist/src/execution/legacy-session/interrupt-step.js +1 -0
- package/dist/src/execution/legacy-session/prepare-step.d.ts +24 -0
- package/dist/src/execution/legacy-session/prepare-step.js +1 -0
- package/dist/src/execution/legacy-session/snapshot.d.ts +12 -0
- package/dist/src/execution/legacy-session/snapshot.js +1 -0
- package/dist/src/execution/legacy-session/turn-workflow.d.ts +8 -0
- package/dist/src/execution/legacy-session/turn-workflow.js +1 -0
- package/dist/src/execution/model-call-batching.d.ts +1 -0
- package/dist/src/execution/model-call-batching.js +1 -1
- package/dist/src/execution/node-step.d.ts +1 -5
- package/dist/src/execution/node-step.js +1 -1
- package/dist/src/execution/proxied-deliver-step.d.ts +2 -20
- package/dist/src/execution/proxied-deliver-step.js +1 -1
- package/dist/src/execution/reconcile-session-continuation-token.d.ts +1 -1
- package/dist/src/execution/report-dropped-wire-payload-step.d.ts +1 -1
- package/dist/src/execution/route-child-delivery.d.ts +2 -2
- package/dist/src/execution/route-child-delivery.js +1 -1
- package/dist/src/execution/runtime-context.js +1 -1
- package/dist/src/execution/sandbox/bindings/eve-image.js +1 -1
- package/dist/src/execution/session/accepted-deployment.d.ts +3 -0
- package/dist/src/execution/session/accepted-deployment.js +1 -0
- package/dist/src/execution/session/admission.d.ts +38 -0
- package/dist/src/execution/session/admission.js +1 -0
- package/dist/src/execution/session/entry-input.d.ts +42 -0
- package/dist/src/execution/session/entry-input.js +1 -0
- package/dist/src/execution/session/entry.d.ts +13 -0
- package/dist/src/execution/session/entry.js +1 -0
- package/dist/src/execution/session/event-sink.d.ts +31 -0
- package/dist/src/execution/session/event-sink.js +1 -0
- package/dist/src/execution/session/finalization.d.ts +33 -0
- package/dist/src/execution/session/finalization.js +1 -0
- package/dist/src/execution/session/handoff-steps.d.ts +22 -0
- package/dist/src/execution/session/handoff-steps.js +1 -0
- package/dist/src/execution/session/handoff.d.ts +69 -0
- package/dist/src/execution/session/handoff.js +1 -0
- package/dist/src/execution/session/hook-tokens.d.ts +11 -0
- package/dist/src/execution/session/hook-tokens.js +1 -0
- package/dist/src/execution/session/input-queue.d.ts +72 -0
- package/dist/src/execution/session/input-queue.js +1 -0
- package/dist/src/execution/session/next-input.d.ts +32 -0
- package/dist/src/execution/session/next-input.js +1 -0
- package/dist/src/execution/{pending-turn-state.d.ts → session/pending-turn-state.d.ts} +0 -1
- package/dist/src/execution/{pending-turn-state.js → session/pending-turn-state.js} +1 -1
- package/dist/src/execution/session/program.d.ts +47 -0
- package/dist/src/execution/session/program.js +1 -0
- package/dist/src/execution/session/route-selected-delivery.d.ts +9 -0
- package/dist/src/execution/session/route-selected-delivery.js +1 -0
- package/dist/src/execution/session/state-cursor.d.ts +31 -0
- package/dist/src/execution/session/state-cursor.js +1 -0
- package/dist/src/execution/{session-timeout-control.d.ts → session/timeout-control.d.ts} +1 -1
- package/dist/src/execution/session/timeout-control.js +1 -0
- package/dist/src/execution/{session-timeout-steps.d.ts → session/timeout-steps.d.ts} +3 -2
- package/dist/src/execution/session/timeout-steps.js +1 -0
- package/dist/src/execution/{session-timeout-workflow.d.ts → session/timeout-workflow.d.ts} +3 -1
- package/dist/src/execution/session/timeout-workflow.js +1 -0
- package/dist/src/execution/session/timeout.d.ts +3 -0
- package/dist/src/execution/session/timeout.js +1 -0
- package/dist/src/execution/session/turn-step-result.d.ts +4 -0
- package/dist/src/execution/session/turn-step-result.js +1 -0
- package/dist/src/execution/session/turn-step-types.d.ts +68 -0
- package/dist/src/execution/session/turn-step-types.js +1 -0
- package/dist/src/execution/{workflow-steps.d.ts → session/turn-step.d.ts} +1 -2
- package/dist/src/execution/session/turn-step.js +1 -0
- package/dist/src/execution/session/turn.d.ts +31 -0
- package/dist/src/execution/session/turn.js +1 -0
- package/dist/src/execution/session-inbox/address.d.ts +21 -0
- package/dist/src/execution/session-inbox/address.js +1 -0
- package/dist/src/execution/session-inbox/inbox.d.ts +54 -0
- package/dist/src/execution/session-inbox/inbox.js +1 -0
- package/dist/src/execution/session-inbox/protocol.d.ts +10 -0
- package/dist/src/execution/session-inbox/protocol.js +1 -0
- package/dist/src/execution/session-inbox/release-step.d.ts +5 -0
- package/dist/src/execution/session-inbox/release-step.js +1 -0
- package/dist/src/execution/session-inbox/resume.d.ts +21 -0
- package/dist/src/execution/session-inbox/resume.js +1 -0
- package/dist/src/execution/{turn-workflow-tool-run.d.ts → session-workflow-tool-run.d.ts} +2 -2
- package/dist/src/execution/session-workflow-tool-run.js +1 -0
- 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 +2 -2
- package/dist/src/execution/settle-cancelled-turn-step.js +1 -1
- package/dist/src/execution/skills/instructions.js +1 -1
- package/dist/src/execution/stable-workflow-names.d.ts +1 -1
- package/dist/src/execution/stable-workflow-names.js +1 -1
- package/dist/src/execution/task-input-response-route.js +1 -1
- package/dist/src/execution/tasks/child/steps.d.ts +1 -1
- package/dist/src/execution/tasks/child/steps.js +1 -1
- package/dist/src/execution/tasks/child/workflow.js +1 -1
- package/dist/src/execution/tasks/parent/delegate.d.ts +7 -0
- package/dist/src/execution/tasks/parent/delegate.js +1 -1
- package/dist/src/execution/tasks/parent/dispatch.js +1 -1
- package/dist/src/execution/tasks/parent/hitl-proxy-steps.js +1 -1
- package/dist/src/execution/tasks/parent/tool-execution.js +1 -1
- package/dist/src/execution/terminal-session-completion-step.d.ts +1 -1
- package/dist/src/execution/terminal-session-event.d.ts +1 -1
- package/dist/src/execution/terminal-session-event.js +1 -1
- package/dist/src/execution/terminal-session-failure-step.d.ts +1 -1
- package/dist/src/execution/terminal-session-failure-step.js +1 -1
- package/dist/src/execution/terminate-child-sessions-step.js +1 -1
- package/dist/src/execution/tools/sleep-workflow.js +1 -1
- package/dist/src/execution/tools/subagent/accept-event-step.js +1 -1
- package/dist/src/execution/tools/subagent/emit-called-step.d.ts +1 -1
- package/dist/src/execution/tools/subagent/emit-called-step.js +1 -1
- package/dist/src/execution/tools/subagent/invoke-agent.d.ts +1 -1
- package/dist/src/execution/tools/subagent/invoke-agent.js +1 -1
- package/dist/src/execution/tools/subagent/invoke-preparation.d.ts +6 -0
- package/dist/src/execution/tools/subagent/invoke-preparation.js +1 -1
- package/dist/src/execution/tools/subagent/invoke-step.d.ts +2 -0
- package/dist/src/execution/tools/subagent/invoke-step.js +1 -1
- package/dist/src/execution/tools/subagent/steer.d.ts +13 -0
- package/dist/src/execution/tools/subagent/steer.js +1 -0
- package/dist/src/execution/tools/subagent/task-agent-requests.d.ts +1 -1
- package/dist/src/execution/tools/subagent/task-agent-requests.js +1 -1
- package/dist/src/execution/tools/subagent/task-cancel.js +1 -1
- package/dist/src/execution/tools/workflow/ask.d.ts +0 -9
- package/dist/src/execution/tools/workflow/ask.js +1 -1
- package/dist/src/execution/tools/workflow/body.d.ts +0 -2
- package/dist/src/execution/tools/workflow/body.js +1 -1
- package/dist/src/execution/tools/workflow/emit-workflow-tool-run-report-step.d.ts +1 -1
- package/dist/src/execution/tools/workflow/emit-workflow-tool-run-report-step.js +1 -1
- package/dist/src/execution/tools/workflow/messages.d.ts +0 -1
- package/dist/src/execution/tools/workflow/messages.js +1 -1
- package/dist/src/execution/tools/workflow/owner.d.ts +3 -1
- package/dist/src/execution/tools/workflow/owner.js +1 -1
- package/dist/src/execution/tools/workflow/resume-hook-step.d.ts +1 -1
- package/dist/src/execution/tools/workflow/step-context.d.ts +0 -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/workflow.js +1 -1
- package/dist/src/execution/workflow-runtime.d.ts +15 -18
- package/dist/src/execution/workflow-runtime.js +1 -1
- package/dist/src/harness/advertised-tools.d.ts +0 -3
- package/dist/src/harness/advertised-tools.js +1 -1
- package/dist/src/harness/authorization.d.ts +5 -37
- package/dist/src/harness/authorization.js +1 -1
- package/dist/src/harness/compaction.js +1 -1
- package/dist/src/harness/coordination.js +1 -1
- package/dist/src/harness/emission-state.d.ts +1 -0
- package/dist/src/harness/emission.js +1 -1
- package/dist/src/harness/generation-steering.d.ts +22 -0
- package/dist/src/harness/generation-steering.js +1 -0
- package/dist/src/harness/messages.d.ts +1 -1
- package/dist/src/harness/messages.js +1 -1
- package/dist/src/harness/prompt-cache.js +1 -1
- package/dist/src/harness/proxy-input-requests.d.ts +1 -1
- package/dist/src/harness/proxy-input-requests.js +1 -1
- package/dist/src/harness/semantic-errors/rules/gateway.js +1 -1
- package/dist/src/harness/semantic-errors/signals.js +1 -1
- package/dist/src/harness/session-limit-enforcement.js +1 -1
- package/dist/src/harness/tool-loop.js +2 -2
- package/dist/src/harness/types.d.ts +2 -21
- package/dist/src/instrumentation/ai-sdk-hook-bridge.js +1 -1
- package/dist/src/instrumentation/channel-delivery.js +1 -1
- package/dist/src/instrumentation/content.js +1 -1
- package/dist/src/instrumentation/lifecycle.d.ts +6 -7
- package/dist/src/instrumentation/native-events.d.ts +2 -0
- package/dist/src/instrumentation/native-events.js +1 -1
- package/dist/src/instrumentation/runtime.js +1 -1
- package/dist/src/instrumentation/session-context.d.ts +2 -0
- package/dist/src/instrumentation/session-context.js +1 -1
- package/dist/src/internal/application/compiled-artifacts.js +3 -2
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/internal/authored-definition/connection.js +1 -1
- package/dist/src/internal/authored-definition/schema-backed.d.ts +3 -4
- package/dist/src/internal/authored-definition/schema-backed.js +1 -1
- package/dist/src/internal/gateway.d.ts +1 -0
- package/dist/src/internal/gateway.js +1 -1
- package/dist/src/internal/model-auth/api-key.d.ts +7 -0
- package/dist/src/internal/model-auth/api-key.js +1 -0
- package/dist/src/internal/model-auth/available-models.d.ts +2 -0
- package/dist/src/internal/model-auth/available-models.js +1 -0
- package/dist/src/internal/model-auth/development-broker-client.d.ts +3 -0
- package/dist/src/internal/model-auth/development-broker-client.js +1 -0
- package/dist/src/internal/model-auth/development-broker-protocol.d.ts +12 -0
- package/dist/src/internal/model-auth/development-broker-protocol.js +1 -0
- package/dist/src/internal/model-auth/development-broker-server.d.ts +4 -0
- package/dist/src/internal/model-auth/development-broker-server.js +1 -0
- package/dist/src/internal/model-auth/gateway-credential.d.ts +2 -0
- package/dist/src/internal/model-auth/gateway-credential.js +1 -0
- package/dist/src/internal/model-auth/store.d.ts +16 -0
- package/dist/src/internal/model-auth/store.js +1 -0
- package/dist/src/internal/model-auth/transport.d.ts +6 -0
- package/dist/src/internal/model-auth/transport.js +1 -0
- package/dist/src/internal/model-auth/vercel-cli.d.ts +7 -0
- package/dist/src/internal/model-auth/vercel-cli.js +1 -0
- package/dist/src/internal/model-auth/vercel-team.d.ts +3 -0
- package/dist/src/internal/model-auth/vercel-team.js +1 -0
- package/dist/src/internal/model-auth/vercel.d.ts +13 -0
- package/dist/src/internal/model-auth/vercel.js +1 -0
- package/dist/src/internal/nitro/host/create-application-nitro.js +1 -1
- package/dist/src/internal/nitro/host/dev-authored-source-watcher.js +1 -1
- package/dist/src/internal/nitro/host/dev-host-fingerprint.js +1 -1
- package/dist/src/internal/nitro/host/drained-nitro-dev-server.js +1 -1
- package/dist/src/internal/nitro/host/start-development-server.js +2 -2
- package/dist/src/internal/nitro/host/workflow-sandbox-runtime-plugin.js +1 -1
- package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response.js +1 -1
- package/dist/src/internal/nitro/routes/channel-dispatch.js +1 -1
- package/dist/src/internal/nitro/routes/info.js +1 -1
- package/dist/src/internal/resolve-model-endpoint-status.d.ts +2 -0
- package/dist/src/internal/resolve-model-endpoint-status.js +1 -1
- package/dist/src/internal/vercel/api-resource.d.ts +4 -0
- package/dist/src/internal/vercel/api-resource.js +1 -0
- package/dist/src/internal/vercel/eve-service-contribution.js +1 -1
- package/dist/src/internal/vercel/vercel-services-config.d.ts +2 -0
- package/dist/src/internal/vercel/vercel-services-config.js +1 -1
- package/dist/src/internal/workflow/development-world-client.js +1 -1
- package/dist/src/internal/workflow/development-world-server.js +1 -1
- package/dist/src/internal/workflow/local-world-delivery-timeouts.d.ts +1 -1
- package/dist/src/internal/workflow/runtime.d.ts +1 -6
- package/dist/src/internal/workflow/runtime.js +1 -1
- package/dist/src/internal/workflow/vercel-world-defaults.d.ts +4 -0
- package/dist/src/internal/workflow/vercel-world-defaults.js +1 -0
- package/dist/src/protocol/activity.js +1 -1
- package/dist/src/protocol/message.d.ts +8 -0
- package/dist/src/protocol/message.js +2 -2
- package/dist/src/protocol/routes.d.ts +0 -2
- package/dist/src/protocol/routes.js +1 -1
- package/dist/src/public/channels/chat-sdk/audience.d.ts +2 -2
- package/dist/src/public/channels/discord/discordChannel.js +1 -1
- package/dist/src/public/channels/index.d.ts +1 -1
- package/dist/src/public/channels/slack/slackChannel.js +1 -1
- package/dist/src/public/channels/teams/teamsChannel.js +1 -1
- package/dist/src/public/channels/telegram/audience.d.ts +2 -2
- package/dist/src/public/channels/telegram/telegramChannel.js +1 -1
- package/dist/src/public/connections/index.d.ts +1 -1
- package/dist/src/public/definitions/channel.d.ts +2 -2
- package/dist/src/public/definitions/channel.js +1 -1
- package/dist/src/public/definitions/connections/mcp.d.ts +1 -1
- package/dist/src/public/definitions/connections/openapi.d.ts +1 -1
- package/dist/src/public/models/anthropic/index.d.ts +3 -0
- package/dist/src/public/models/anthropic/index.js +1 -0
- package/dist/src/public/models/openai/chatgpt/codex-app-server.js +1 -1
- package/dist/src/public/models/openai/chatgpt/credential-store.js +1 -1
- package/dist/src/public/models/openai/chatgpt/oauth.js +1 -1
- package/dist/src/public/models/openai/chatgpt/transport.js +1 -1
- package/dist/src/public/models/openai/index.d.ts +4 -2
- package/dist/src/public/models/openai/index.js +1 -1
- package/dist/src/public/sandbox/docker-sandbox.d.ts +1 -1
- package/dist/src/public/sandbox/microsandbox-sandbox.d.ts +1 -1
- package/dist/src/public/sandbox/vercel-sandbox.d.ts +1 -1
- package/dist/src/public/tools/workflow.d.ts +1 -4
- package/dist/src/public/tools/workflow.js +1 -1
- package/dist/src/public/vercel/index.d.ts +2 -1
- package/dist/src/public/vercel/index.js +1 -1
- package/dist/src/runtime/agent/mock-model-adapter.js +1 -1
- package/dist/src/runtime/agent/resolve-model.js +1 -1
- package/dist/src/runtime/connections/authorization-tokens.d.ts +2 -4
- package/dist/src/runtime/connections/principal.d.ts +6 -6
- package/dist/src/runtime/connections/principal.js +1 -1
- package/dist/src/runtime/prompt/compose.js +1 -1
- package/dist/src/runtime/resolve-agent-graph.js +1 -1
- package/dist/src/runtime/resolve-agent.js +1 -1
- package/dist/src/runtime/resolve-tool.js +1 -1
- package/dist/src/runtime/tools/registry.js +1 -1
- package/dist/src/runtime/types.d.ts +3 -9
- package/dist/src/self-modification/agent.js +1 -1
- package/dist/src/self-modification/extension/classify-registry-item.d.ts +3 -3
- package/dist/src/self-modification/extension/classify-registry-item.js +1 -1
- package/dist/src/self-modification/extension/tools/search_registry.d.ts +1 -7
- package/dist/src/self-modification/extension/tools/search_registry.js +1 -1
- package/dist/src/self-modification/setup.d.ts +9 -3
- package/dist/src/self-modification/setup.js +2 -2
- package/dist/src/setup/cli/option-row.d.ts +2 -1
- package/dist/src/setup/cli/option-row.js +1 -1
- package/dist/src/setup/cli/prompt-ui.d.ts +2 -0
- package/dist/src/setup/cli/prompt-ui.js +1 -1
- package/dist/src/setup/cli/select-state.d.ts +1 -1
- package/dist/src/setup/cli/select-state.js +1 -1
- package/dist/src/setup/flows/chatgpt-auth.js +1 -1
- package/dist/src/setup/flows/deploy.d.ts +4 -9
- package/dist/src/setup/flows/deploy.js +1 -1
- package/dist/src/setup/flows/ensure-vercel-project.js +1 -1
- package/dist/src/setup/flows/install-vercel-cli.d.ts +2 -3
- package/dist/src/setup/flows/login.d.ts +3 -1
- package/dist/src/setup/flows/login.js +1 -1
- package/dist/src/setup/flows/model-login-connection.d.ts +36 -0
- package/dist/src/setup/flows/model-login-connection.js +1 -0
- package/dist/src/setup/flows/model-login-progress.d.ts +7 -0
- package/dist/src/setup/flows/model-login-progress.js +1 -0
- package/dist/src/setup/flows/model-login.d.ts +22 -0
- package/dist/src/setup/flows/model-login.js +1 -0
- package/dist/src/setup/flows/model-source-change.d.ts +7 -0
- package/dist/src/setup/flows/model-source-change.js +1 -1
- package/dist/src/setup/flows/model.d.ts +6 -24
- package/dist/src/setup/flows/model.js +1 -1
- package/dist/src/setup/flows/registry.d.ts +3 -19
- package/dist/src/setup/flows/registry.js +1 -1
- package/dist/src/setup/flows/vercel-model-login.d.ts +5 -0
- package/dist/src/setup/flows/vercel-model-login.js +1 -0
- package/dist/src/setup/integrations/self-modification/setup.d.ts +2 -0
- package/dist/src/setup/integrations/self-modification/setup.js +1 -1
- package/dist/src/setup/project-resolution.js +1 -1
- package/dist/src/setup/prompter.d.ts +3 -1
- package/dist/src/setup/provider-settings.d.ts +19 -6
- package/dist/src/setup/provider-settings.js +1 -1
- package/dist/src/setup/scaffold/create/project.js +6 -2
- package/dist/src/setup/vercel-project.js +0 -0
- package/dist/src/setup/with-spinner.d.ts +1 -1
- package/dist/src/setup/with-spinner.js +1 -1
- package/dist/src/shared/action-types.js +1 -1
- package/dist/src/shared/agent-definition.d.ts +6 -4
- package/dist/src/shared/channel-definition.d.ts +2 -2
- package/dist/src/shared/chatgpt-model.d.ts +2 -2
- package/dist/src/shared/chatgpt-model.js +1 -1
- package/dist/src/shared/connection-types.d.ts +20 -7
- package/dist/src/shared/conversation-context.d.ts +15 -0
- package/dist/src/shared/model-connection.d.ts +17 -0
- package/dist/src/shared/model-connection.js +1 -0
- package/dist/src/shared/model-endpoint-status.d.ts +2 -1
- package/dist/src/shared/model-helper.d.ts +26 -0
- package/dist/src/shared/model-helper.js +1 -0
- package/dist/src/shared/package-version.d.ts +2 -0
- package/dist/src/shared/package-version.js +1 -0
- package/dist/src/shared/validate-authorization.js +1 -1
- package/dist/src/shared/vercel-services.d.ts +1 -0
- package/dist/src/shared/vercel-services.js +1 -1
- package/dist/src/shared/workflow-sandbox.d.ts +18 -12
- package/dist/src/shared/workflow-sandbox.js +1 -1
- package/dist/src/source-change/agent-config-ast.d.ts +6 -0
- package/dist/src/source-change/agent-config-ast.js +1 -1
- package/dist/src/source-change/apply-model-selection.d.ts +3 -1
- package/dist/src/source-change/apply-model-selection.js +1 -2
- package/dist/src/source-change/static-source-change.js +1 -1
- package/dist/src/subagents/callback-route.js +1 -1
- package/dist/src/subagents/event-proxy-step.d.ts +3 -3
- package/dist/src/subagents/event-proxy-step.js +1 -1
- package/dist/src/subagents/handle-dispatch.d.ts +12 -2
- package/dist/src/subagents/handle-dispatch.js +1 -1
- package/dist/src/subagents/handles/operation-id.d.ts +1 -1
- package/dist/src/subagents/handles/query.d.ts +0 -6
- package/dist/src/subagents/handles/query.js +1 -1
- package/dist/src/subagents/handles/state-key.d.ts +1 -1
- package/dist/src/subagents/handles/store.d.ts +1 -1
- package/dist/src/subagents/handles/store.js +1 -1
- package/dist/src/subagents/hitl-proxy.d.ts +1 -1
- package/dist/src/subagents/parent-notification.d.ts +2 -2
- package/dist/src/subagents/parent-result.d.ts +1 -1
- package/dist/src/subagents/remote-dispatch.d.ts +1 -1
- package/dist/src/subagents/remote-dispatch.js +1 -1
- package/dist/src/subagents/start-local.js +1 -1
- 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/tasks/session-index.d.ts +11 -0
- package/dist/src/tasks/session-index.js +1 -1
- package/dist/src/tasks/types.d.ts +1 -1
- package/dist/src/tools/auth.d.ts +5 -6
- package/dist/src/tools/provided/workflow.d.ts +12 -0
- package/dist/src/tools/provided/workflow.js +1 -0
- package/dist/src/tools/workflow-program-input.d.ts +6 -0
- package/dist/src/tools/workflow-program-input.js +1 -0
- package/dist/src/tracing/agent-otel-provider.js +2 -2
- package/dist/src/tracing/agent-otel-runtime-context.d.ts +2 -1
- package/dist/src/tracing/agent-otel-runtime-context.js +1 -1
- package/dist/src/tracing/agent-otel-session-context.js +1 -1
- package/dist/src/tracing/agent-otel-usage.js +1 -1
- package/dist/src/tracing/agent-span-contract.d.ts +1 -0
- package/dist/src/tracing/agent-span-contract.js +1 -1
- package/dist/src/tracing/agent-tool-instrumentation.js +1 -1
- package/dist/src/tracing/agent-trace-context-codec.js +1 -1
- package/dist/src/tracing/agent-trace-state.d.ts +2 -0
- package/dist/src/tracing/content-attributes.js +1 -1
- package/dist/src/tracing/local-instrumentation-runtime.d.ts +1 -1
- package/dist/src/tracing/local-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 +23 -23
- package/docs/channels/chat-sdk.mdx +11 -2
- package/docs/channels/custom.mdx +32 -16
- package/docs/channels/eve.mdx +21 -19
- package/docs/channels/linear.mdx +7 -3
- package/docs/channels/linq.mdx +1 -1
- package/docs/channels/overview.mdx +17 -2
- package/docs/channels/photon.mdx +4 -1
- package/docs/channels/slack.mdx +12 -2
- package/docs/concepts/execution-model-and-durability.mdx +62 -13
- package/docs/concepts/sessions-runs-and-streaming.md +14 -5
- package/docs/connections/mcp.mdx +4 -1
- package/docs/connections/openapi.mdx +8 -2
- package/docs/connections/overview.mdx +16 -13
- package/docs/getting-started.mdx +8 -4
- package/docs/guides/deployment/self-hosting.md +1 -1
- package/docs/guides/deployment/vercel.mdx +3 -3
- package/docs/guides/dev-tui.md +58 -31
- package/docs/guides/dynamic-capabilities.md +4 -4
- package/docs/guides/frontend/overview.mdx +3 -1
- package/docs/guides/hooks.md +1 -1
- package/docs/guides/instrumentation/meta.json +5 -0
- package/docs/guides/instrumentation/otel.mdx +149 -0
- package/docs/guides/instrumentation/overview.md +199 -0
- package/docs/guides/instrumentation/providers.mdx +169 -0
- package/docs/guides/meta.json +0 -1
- package/docs/guides/remote-agents.md +19 -21
- package/docs/install-integrations.mdx +2 -4
- package/docs/memory/custom-provider.md +1 -1
- package/docs/patterns/multi-tenant-auth.md +3 -3
- package/docs/protocols/acp.md +1 -1
- package/docs/reference/cli.md +16 -16
- package/docs/reference/telemetry.md +1 -1
- package/docs/reference/typescript-api.md +21 -14
- package/docs/sandbox.mdx +3 -3
- package/docs/subagents/index.mdx +4 -4
- package/docs/tools/workflows.mdx +57 -2
- package/docs/tutorial/how-it-runs.mdx +1 -1
- package/package.json +6 -1
- package/dist/src/cli/commands/init-repl.d.ts +0 -80
- package/dist/src/cli/commands/init-repl.js +0 -1
- package/dist/src/cli/commands/init-self-modification.d.ts +0 -7
- package/dist/src/cli/commands/init-self-modification.js +0 -1
- package/dist/src/cli/commands/registry-package.d.ts +0 -52
- package/dist/src/cli/commands/registry-package.js +0 -1
- package/dist/src/cli/dev/tui/prompt-placeholder.d.ts +0 -12
- package/dist/src/cli/dev/tui/prompt-placeholder.js +0 -1
- package/dist/src/cli/dev/tui/remote-auth-command.d.ts +0 -11
- package/dist/src/cli/dev/tui/remote-auth-command.js +0 -3
- package/dist/src/compiled/_chunks/workflow/attribute-changes-BAcgmlXp.js +0 -20
- package/dist/src/compiled/_chunks/workflow/private-CFJkQA7R.js +0 -1
- package/dist/src/compiled/_chunks/workflow/resume-hook-BEHe0Uut.js +0 -1
- package/dist/src/compiled/_chunks/workflow/run-ChHLjaCt.js +0 -1
- package/dist/src/compiled/_chunks/workflow/sleep-BB2HuVie.js +0 -1
- package/dist/src/execution/accepted-delivery-deployment.d.ts +0 -7
- package/dist/src/execution/accepted-delivery-deployment.js +0 -1
- package/dist/src/execution/dispatch-turn-step.d.ts +0 -5
- package/dist/src/execution/dispatch-turn-step.js +0 -1
- package/dist/src/execution/durable-session-migrations/chain.d.ts +0 -38
- package/dist/src/execution/durable-session-migrations/chain.js +0 -1
- package/dist/src/execution/durable-session-migrations/snapshot.d.ts +0 -6
- package/dist/src/execution/durable-session-migrations/snapshot.js +0 -1
- package/dist/src/execution/durable-session-migrations/turn-workflow-v0-to-v1.d.ts +0 -12
- package/dist/src/execution/durable-session-migrations/turn-workflow-v0-to-v1.js +0 -1
- package/dist/src/execution/durable-session-migrations/turn-workflow-v1-to-v2.d.ts +0 -2
- package/dist/src/execution/durable-session-migrations/turn-workflow-v1-to-v2.js +0 -1
- package/dist/src/execution/durable-session-migrations/turn-workflow.d.ts +0 -88
- package/dist/src/execution/durable-session-migrations/turn-workflow.js +0 -1
- package/dist/src/execution/forward-turn-cancellation-step.d.ts +0 -6
- package/dist/src/execution/forward-turn-cancellation-step.js +0 -1
- package/dist/src/execution/forward-turn-delivery-step.d.ts +0 -6
- package/dist/src/execution/forward-turn-delivery-step.js +0 -1
- package/dist/src/execution/inline-turn.d.ts +0 -31
- package/dist/src/execution/inline-turn.js +0 -1
- package/dist/src/execution/next-driver-action.d.ts +0 -93
- package/dist/src/execution/parked-delivery-wait.d.ts +0 -54
- package/dist/src/execution/parked-delivery-wait.js +0 -1
- package/dist/src/execution/session-command-inbox.d.ts +0 -52
- package/dist/src/execution/session-command-inbox.js +0 -1
- package/dist/src/execution/session-command-token.d.ts +0 -6
- package/dist/src/execution/session-command-token.js +0 -1
- package/dist/src/execution/session-state-cursor.d.ts +0 -25
- package/dist/src/execution/session-state-cursor.js +0 -1
- package/dist/src/execution/session-timeout-control.js +0 -1
- package/dist/src/execution/session-timeout-steps.js +0 -1
- package/dist/src/execution/session-timeout-workflow.js +0 -1
- package/dist/src/execution/session-timeout.d.ts +0 -2
- package/dist/src/execution/session-timeout.js +0 -1
- package/dist/src/execution/turn-cancellation-control.d.ts +0 -30
- package/dist/src/execution/turn-cancellation-control.js +0 -1
- package/dist/src/execution/turn-cancellation-token.d.ts +0 -10
- package/dist/src/execution/turn-cancellation-token.js +0 -1
- package/dist/src/execution/turn-control-protocol.d.ts +0 -36
- package/dist/src/execution/turn-control-protocol.js +0 -1
- package/dist/src/execution/turn-control-receiver.d.ts +0 -54
- package/dist/src/execution/turn-control-receiver.js +0 -1
- package/dist/src/execution/turn-dispatch.d.ts +0 -39
- package/dist/src/execution/turn-dispatch.js +0 -1
- package/dist/src/execution/turn-execution-cursor.d.ts +0 -49
- package/dist/src/execution/turn-execution-cursor.js +0 -1
- package/dist/src/execution/turn-workflow-tool-run.js +0 -1
- package/dist/src/execution/turn-workflow.d.ts +0 -13
- package/dist/src/execution/turn-workflow.js +0 -1
- package/dist/src/execution/wire/session-inbox-contract.d.ts +0 -38
- package/dist/src/execution/wire/session-inbox-contract.js +0 -1
- package/dist/src/execution/wire/session-inbox-encoder.d.ts +0 -47
- package/dist/src/execution/wire/session-inbox-encoder.js +0 -1
- package/dist/src/execution/wire/session-inbox-resume.d.ts +0 -12
- package/dist/src/execution/wire/session-inbox-resume.js +0 -1
- package/dist/src/execution/wire/session-inbox-wire.d.ts +0 -29
- package/dist/src/execution/wire/session-inbox-wire.js +0 -1
- package/dist/src/execution/wire/session-inbox-wire.v0.d.ts +0 -5
- package/dist/src/execution/wire/session-inbox-wire.v0.js +0 -1
- package/dist/src/execution/wire/session-inbox-wire.v1.d.ts +0 -237
- package/dist/src/execution/wire/session-inbox-wire.v1.js +0 -1
- package/dist/src/execution/wire/session-inbox-wire.v2-migration.d.ts +0 -2
- package/dist/src/execution/wire/session-inbox-wire.v2-migration.js +0 -1
- package/dist/src/execution/wire/session-inbox-wire.v2.d.ts +0 -478
- package/dist/src/execution/wire/session-inbox-wire.v2.js +0 -1
- package/dist/src/execution/wire/session-inbox-wire.v2.migration.d.ts +0 -3
- package/dist/src/execution/wire/session-inbox-wire.v2.migration.js +0 -1
- package/dist/src/execution/wire/session-inbox-wire.v3.d.ts +0 -480
- package/dist/src/execution/wire/session-inbox-wire.v3.js +0 -1
- package/dist/src/execution/wire/session-inbox-wire.v3.migration.d.ts +0 -3
- package/dist/src/execution/wire/session-inbox-wire.v3.migration.js +0 -1
- package/dist/src/execution/wire/session-inbox-wire.v4.d.ts +0 -267
- package/dist/src/execution/wire/session-inbox-wire.v4.js +0 -1
- package/dist/src/execution/wire/session-inbox-wire.v4.migration.d.ts +0 -3
- package/dist/src/execution/wire/session-inbox-wire.v4.migration.js +0 -1
- package/dist/src/execution/wire/session-inbox-wire.v5.d.ts +0 -341
- package/dist/src/execution/wire/session-inbox-wire.v5.js +0 -1
- package/dist/src/execution/wire/session-inbox-wire.v5.migration.d.ts +0 -3
- package/dist/src/execution/wire/session-inbox-wire.v5.migration.js +0 -1
- package/dist/src/execution/wire/session-inbox-wire.v6.d.ts +0 -341
- package/dist/src/execution/wire/session-inbox-wire.v6.js +0 -1
- package/dist/src/execution/wire/session-inbox-wire.v7.d.ts +0 -342
- package/dist/src/execution/wire/session-inbox-wire.v7.js +0 -1
- package/dist/src/execution/workflow-entry-crash.d.ts +0 -39
- package/dist/src/execution/workflow-entry-crash.js +0 -1
- package/dist/src/execution/workflow-entry-finalization.d.ts +0 -28
- package/dist/src/execution/workflow-entry-finalization.js +0 -1
- package/dist/src/execution/workflow-entry.d.ts +0 -37
- package/dist/src/execution/workflow-entry.js +0 -1
- package/dist/src/execution/workflow-steps.js +0 -1
- package/dist/src/harness/workflow-continuation-security.d.ts +0 -5
- package/dist/src/harness/workflow-continuation-security.js +0 -1
- package/dist/src/harness/workflow-interrupt-state.d.ts +0 -20
- package/dist/src/harness/workflow-interrupt-state.js +0 -1
- package/dist/src/harness/workflow-lifecycle.d.ts +0 -32
- package/dist/src/harness/workflow-lifecycle.js +0 -1
- package/dist/src/harness/workflow-sandbox.d.ts +0 -28
- package/dist/src/harness/workflow-sandbox.js +0 -2
- package/dist/src/harness/workflow-subagent-limit.d.ts +0 -28
- package/dist/src/harness/workflow-subagent-limit.js +0 -1
- package/dist/src/harness/workflow-task-state.d.ts +0 -9
- package/dist/src/harness/workflow-task-state.js +0 -1
- package/dist/src/harness/workflow-tool-description.d.ts +0 -22
- package/dist/src/harness/workflow-tool-description.js +0 -37
- package/dist/src/subagents/handles/rebase.d.ts +0 -4
- package/dist/src/subagents/handles/rebase.js +0 -1
- package/dist/src/tools/workflow.d.ts +0 -37
- package/dist/src/tools/workflow.js +0 -1
- package/docs/guides/instrumentation-providers.md +0 -249
- package/docs/guides/instrumentation.md +0 -453
- /package/dist/src/{execution/next-driver-action.js → client/eve-agent-store-state.js} +0 -0
|
@@ -1,342 +0,0 @@
|
|
|
1
|
-
import { z } from "#compiled/zod/index.js";
|
|
2
|
-
import type { DeliverHookPayload, SessionCommand, SessionTimeoutHookPayload } from "#channel/types.js";
|
|
3
|
-
/** Version 7 adds optional presentation labels to delegated activity work. */
|
|
4
|
-
export declare const sessionInboxWireV7Schema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
5
|
-
auth: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
6
|
-
attributes: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
7
|
-
authenticator: z.ZodString;
|
|
8
|
-
issuer: z.ZodOptional<z.ZodString>;
|
|
9
|
-
principalId: z.ZodString;
|
|
10
|
-
principalType: z.ZodString;
|
|
11
|
-
subject: z.ZodOptional<z.ZodString>;
|
|
12
|
-
}, z.core.$strict>>>;
|
|
13
|
-
kind: z.ZodLiteral<"deliver">;
|
|
14
|
-
requestId: z.ZodOptional<z.ZodString>;
|
|
15
|
-
taskDeliveryId: z.ZodOptional<z.ZodString>;
|
|
16
|
-
turnPolicy: z.ZodOptional<z.ZodEnum<{
|
|
17
|
-
queue: "queue";
|
|
18
|
-
steer: "steer";
|
|
19
|
-
}>>;
|
|
20
|
-
deliveryMetadata: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
21
|
-
channelKind: z.ZodString;
|
|
22
|
-
channelName: z.ZodString;
|
|
23
|
-
deliveryId: z.ZodString;
|
|
24
|
-
payloadIndex: z.ZodNumber;
|
|
25
|
-
requestId: z.ZodOptional<z.ZodString>;
|
|
26
|
-
requestTraceContext: z.ZodOptional<z.ZodObject<{
|
|
27
|
-
spanId: z.ZodString;
|
|
28
|
-
traceFlags: z.ZodNumber;
|
|
29
|
-
traceId: z.ZodString;
|
|
30
|
-
}, z.core.$strict>>;
|
|
31
|
-
acceptedDeploymentId: z.ZodOptional<z.ZodString>;
|
|
32
|
-
}, z.core.$strict>>>;
|
|
33
|
-
payload: z.ZodObject<{
|
|
34
|
-
context: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
35
|
-
inputResponses: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
36
|
-
optionId: z.ZodOptional<z.ZodString>;
|
|
37
|
-
requestId: z.ZodString;
|
|
38
|
-
text: z.ZodOptional<z.ZodString>;
|
|
39
|
-
}, z.core.$strict>>>;
|
|
40
|
-
message: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
41
|
-
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("../../shared/json.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonObject, unknown>>>>;
|
|
42
|
-
text: z.ZodString;
|
|
43
|
-
type: z.ZodLiteral<"text">;
|
|
44
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
45
|
-
image: z.ZodCustom<URL | import("ai").DataContent, URL | import("ai").DataContent>;
|
|
46
|
-
mediaType: z.ZodOptional<z.ZodString>;
|
|
47
|
-
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("../../shared/json.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonObject, unknown>>>>;
|
|
48
|
-
type: z.ZodLiteral<"image">;
|
|
49
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
50
|
-
data: z.ZodCustom<URL | import("ai").DataContent, URL | import("ai").DataContent>;
|
|
51
|
-
filename: z.ZodOptional<z.ZodString>;
|
|
52
|
-
mediaType: z.ZodString;
|
|
53
|
-
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("../../shared/json.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonObject, unknown>>>>;
|
|
54
|
-
type: z.ZodLiteral<"file">;
|
|
55
|
-
}, z.core.$strict>], "type">>]>>;
|
|
56
|
-
outputSchema: z.ZodOptional<z.ZodType<import("../../shared/json.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonObject, unknown>>>;
|
|
57
|
-
task: z.ZodOptional<z.ZodObject<{
|
|
58
|
-
agentRequests: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
59
|
-
replyTo: z.ZodString;
|
|
60
|
-
request: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
61
|
-
input: z.ZodObject<{
|
|
62
|
-
agentId: z.ZodOptional<z.ZodString>;
|
|
63
|
-
message: z.ZodString;
|
|
64
|
-
outputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("../../shared/json.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonValue, unknown>>>>;
|
|
65
|
-
target: z.ZodString;
|
|
66
|
-
}, z.core.$strict>;
|
|
67
|
-
invocationId: z.ZodString;
|
|
68
|
-
kind: z.ZodLiteral<"agent-invoke">;
|
|
69
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
70
|
-
kind: z.ZodLiteral<"agent-settled">;
|
|
71
|
-
result: z.ZodObject<{
|
|
72
|
-
backgroundTask: z.ZodOptional<z.ZodObject<{
|
|
73
|
-
status: z.ZodLiteral<"working">;
|
|
74
|
-
taskId: z.ZodString;
|
|
75
|
-
}, z.core.$strict>>;
|
|
76
|
-
callId: z.ZodString;
|
|
77
|
-
isError: z.ZodOptional<z.ZodBoolean>;
|
|
78
|
-
kind: z.ZodLiteral<"subagent-result">;
|
|
79
|
-
origin: z.ZodLiteral<"child">;
|
|
80
|
-
outcome: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
81
|
-
kind: z.ZodLiteral<"parked">;
|
|
82
|
-
result: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
83
|
-
kind: z.ZodLiteral<"succeeded">;
|
|
84
|
-
output: z.ZodType<import("../../shared/json.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonValue, unknown>>;
|
|
85
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
86
|
-
error: z.ZodType<import("../../shared/json.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonValue, unknown>>;
|
|
87
|
-
kind: z.ZodLiteral<"failed">;
|
|
88
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
89
|
-
kind: z.ZodLiteral<"cancelled">;
|
|
90
|
-
}, z.core.$strict>], "kind">;
|
|
91
|
-
usageDelta: z.ZodObject<{
|
|
92
|
-
cacheReadTokens: z.ZodNumber;
|
|
93
|
-
cacheWriteTokens: z.ZodNumber;
|
|
94
|
-
inputTokens: z.ZodNumber;
|
|
95
|
-
outputTokens: z.ZodNumber;
|
|
96
|
-
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
97
|
-
}, z.core.$strip>;
|
|
98
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
99
|
-
kind: z.ZodLiteral<"terminal">;
|
|
100
|
-
result: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
101
|
-
kind: z.ZodLiteral<"succeeded">;
|
|
102
|
-
output: z.ZodType<import("../../shared/json.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonValue, unknown>>;
|
|
103
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
104
|
-
error: z.ZodType<import("../../shared/json.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonValue, unknown>>;
|
|
105
|
-
kind: z.ZodLiteral<"failed">;
|
|
106
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
107
|
-
kind: z.ZodLiteral<"cancelled">;
|
|
108
|
-
}, z.core.$strict>], "kind">;
|
|
109
|
-
usageDelta: z.ZodObject<{
|
|
110
|
-
cacheReadTokens: z.ZodNumber;
|
|
111
|
-
cacheWriteTokens: z.ZodNumber;
|
|
112
|
-
inputTokens: z.ZodNumber;
|
|
113
|
-
outputTokens: z.ZodNumber;
|
|
114
|
-
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
115
|
-
}, z.core.$strip>;
|
|
116
|
-
}, z.core.$strict>], "kind">;
|
|
117
|
-
output: z.ZodType<import("../../shared/json.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonValue, unknown>>;
|
|
118
|
-
subagentName: z.ZodString;
|
|
119
|
-
usage: z.ZodOptional<z.ZodObject<{
|
|
120
|
-
cacheReadTokens: z.ZodNumber;
|
|
121
|
-
cacheWriteTokens: z.ZodNumber;
|
|
122
|
-
inputTokens: z.ZodNumber;
|
|
123
|
-
outputTokens: z.ZodNumber;
|
|
124
|
-
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
125
|
-
}, z.core.$strip>>;
|
|
126
|
-
}, z.core.$strict>;
|
|
127
|
-
}, z.core.$strict>], "kind">;
|
|
128
|
-
taskId: z.ZodString;
|
|
129
|
-
}, z.core.$strict>>>;
|
|
130
|
-
authorizationEvents: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
131
|
-
hookPayload: z.ZodObject<{
|
|
132
|
-
callId: z.ZodString;
|
|
133
|
-
childSessionId: z.ZodString;
|
|
134
|
-
event: z.ZodCustom<Record<string, unknown>, Record<string, unknown>>;
|
|
135
|
-
kind: z.ZodLiteral<"subagent-authorization-event">;
|
|
136
|
-
subagentName: z.ZodString;
|
|
137
|
-
}, z.core.$strict>;
|
|
138
|
-
taskId: z.ZodString;
|
|
139
|
-
}, z.core.$strict>>>;
|
|
140
|
-
inputRequests: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
141
|
-
replyTo: z.ZodString;
|
|
142
|
-
sequence: z.ZodNumber;
|
|
143
|
-
stepIndex: z.ZodNumber;
|
|
144
|
-
taskId: z.ZodString;
|
|
145
|
-
turnId: z.ZodString;
|
|
146
|
-
request: z.ZodType<import("../../shared/json.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonValue, unknown>>;
|
|
147
|
-
}, z.core.$loose>, z.ZodObject<{
|
|
148
|
-
replyTo: z.ZodString;
|
|
149
|
-
sequence: z.ZodNumber;
|
|
150
|
-
stepIndex: z.ZodNumber;
|
|
151
|
-
taskId: z.ZodString;
|
|
152
|
-
turnId: z.ZodString;
|
|
153
|
-
requests: z.ZodArray<z.ZodType<import("../../shared/json.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonValue, unknown>>>;
|
|
154
|
-
}, z.core.$loose>]>>>;
|
|
155
|
-
views: z.ZodOptional<z.ZodArray<z.ZodType<import("../../tasks/types.ts").TaskView, unknown, z.core.$ZodTypeInternals<import("../../tasks/types.ts").TaskView, unknown>>>>;
|
|
156
|
-
}, z.core.$strict>>;
|
|
157
|
-
}, z.core.$loose>;
|
|
158
|
-
payloads: z.ZodArray<z.ZodObject<{
|
|
159
|
-
context: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
160
|
-
inputResponses: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
161
|
-
optionId: z.ZodOptional<z.ZodString>;
|
|
162
|
-
requestId: z.ZodString;
|
|
163
|
-
text: z.ZodOptional<z.ZodString>;
|
|
164
|
-
}, z.core.$strict>>>;
|
|
165
|
-
message: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
166
|
-
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("../../shared/json.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonObject, unknown>>>>;
|
|
167
|
-
text: z.ZodString;
|
|
168
|
-
type: z.ZodLiteral<"text">;
|
|
169
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
170
|
-
image: z.ZodCustom<URL | import("ai").DataContent, URL | import("ai").DataContent>;
|
|
171
|
-
mediaType: z.ZodOptional<z.ZodString>;
|
|
172
|
-
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("../../shared/json.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonObject, unknown>>>>;
|
|
173
|
-
type: z.ZodLiteral<"image">;
|
|
174
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
175
|
-
data: z.ZodCustom<URL | import("ai").DataContent, URL | import("ai").DataContent>;
|
|
176
|
-
filename: z.ZodOptional<z.ZodString>;
|
|
177
|
-
mediaType: z.ZodString;
|
|
178
|
-
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("../../shared/json.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonObject, unknown>>>>;
|
|
179
|
-
type: z.ZodLiteral<"file">;
|
|
180
|
-
}, z.core.$strict>], "type">>]>>;
|
|
181
|
-
outputSchema: z.ZodOptional<z.ZodType<import("../../shared/json.ts").JsonObject, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonObject, unknown>>>;
|
|
182
|
-
task: z.ZodOptional<z.ZodObject<{
|
|
183
|
-
agentRequests: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
184
|
-
replyTo: z.ZodString;
|
|
185
|
-
request: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
186
|
-
input: z.ZodObject<{
|
|
187
|
-
agentId: z.ZodOptional<z.ZodString>;
|
|
188
|
-
message: z.ZodString;
|
|
189
|
-
outputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("../../shared/json.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonValue, unknown>>>>;
|
|
190
|
-
target: z.ZodString;
|
|
191
|
-
}, z.core.$strict>;
|
|
192
|
-
invocationId: z.ZodString;
|
|
193
|
-
kind: z.ZodLiteral<"agent-invoke">;
|
|
194
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
195
|
-
kind: z.ZodLiteral<"agent-settled">;
|
|
196
|
-
result: z.ZodObject<{
|
|
197
|
-
backgroundTask: z.ZodOptional<z.ZodObject<{
|
|
198
|
-
status: z.ZodLiteral<"working">;
|
|
199
|
-
taskId: z.ZodString;
|
|
200
|
-
}, z.core.$strict>>;
|
|
201
|
-
callId: z.ZodString;
|
|
202
|
-
isError: z.ZodOptional<z.ZodBoolean>;
|
|
203
|
-
kind: z.ZodLiteral<"subagent-result">;
|
|
204
|
-
origin: z.ZodLiteral<"child">;
|
|
205
|
-
outcome: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
206
|
-
kind: z.ZodLiteral<"parked">;
|
|
207
|
-
result: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
208
|
-
kind: z.ZodLiteral<"succeeded">;
|
|
209
|
-
output: z.ZodType<import("../../shared/json.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonValue, unknown>>;
|
|
210
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
211
|
-
error: z.ZodType<import("../../shared/json.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonValue, unknown>>;
|
|
212
|
-
kind: z.ZodLiteral<"failed">;
|
|
213
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
214
|
-
kind: z.ZodLiteral<"cancelled">;
|
|
215
|
-
}, z.core.$strict>], "kind">;
|
|
216
|
-
usageDelta: z.ZodObject<{
|
|
217
|
-
cacheReadTokens: z.ZodNumber;
|
|
218
|
-
cacheWriteTokens: z.ZodNumber;
|
|
219
|
-
inputTokens: z.ZodNumber;
|
|
220
|
-
outputTokens: z.ZodNumber;
|
|
221
|
-
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
222
|
-
}, z.core.$strip>;
|
|
223
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
224
|
-
kind: z.ZodLiteral<"terminal">;
|
|
225
|
-
result: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
226
|
-
kind: z.ZodLiteral<"succeeded">;
|
|
227
|
-
output: z.ZodType<import("../../shared/json.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonValue, unknown>>;
|
|
228
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
229
|
-
error: z.ZodType<import("../../shared/json.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonValue, unknown>>;
|
|
230
|
-
kind: z.ZodLiteral<"failed">;
|
|
231
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
232
|
-
kind: z.ZodLiteral<"cancelled">;
|
|
233
|
-
}, z.core.$strict>], "kind">;
|
|
234
|
-
usageDelta: z.ZodObject<{
|
|
235
|
-
cacheReadTokens: z.ZodNumber;
|
|
236
|
-
cacheWriteTokens: z.ZodNumber;
|
|
237
|
-
inputTokens: z.ZodNumber;
|
|
238
|
-
outputTokens: z.ZodNumber;
|
|
239
|
-
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
240
|
-
}, z.core.$strip>;
|
|
241
|
-
}, z.core.$strict>], "kind">;
|
|
242
|
-
output: z.ZodType<import("../../shared/json.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonValue, unknown>>;
|
|
243
|
-
subagentName: z.ZodString;
|
|
244
|
-
usage: z.ZodOptional<z.ZodObject<{
|
|
245
|
-
cacheReadTokens: z.ZodNumber;
|
|
246
|
-
cacheWriteTokens: z.ZodNumber;
|
|
247
|
-
inputTokens: z.ZodNumber;
|
|
248
|
-
outputTokens: z.ZodNumber;
|
|
249
|
-
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
250
|
-
}, z.core.$strip>>;
|
|
251
|
-
}, z.core.$strict>;
|
|
252
|
-
}, z.core.$strict>], "kind">;
|
|
253
|
-
taskId: z.ZodString;
|
|
254
|
-
}, z.core.$strict>>>;
|
|
255
|
-
authorizationEvents: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
256
|
-
hookPayload: z.ZodObject<{
|
|
257
|
-
callId: z.ZodString;
|
|
258
|
-
childSessionId: z.ZodString;
|
|
259
|
-
event: z.ZodCustom<Record<string, unknown>, Record<string, unknown>>;
|
|
260
|
-
kind: z.ZodLiteral<"subagent-authorization-event">;
|
|
261
|
-
subagentName: z.ZodString;
|
|
262
|
-
}, z.core.$strict>;
|
|
263
|
-
taskId: z.ZodString;
|
|
264
|
-
}, z.core.$strict>>>;
|
|
265
|
-
inputRequests: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
266
|
-
replyTo: z.ZodString;
|
|
267
|
-
sequence: z.ZodNumber;
|
|
268
|
-
stepIndex: z.ZodNumber;
|
|
269
|
-
taskId: z.ZodString;
|
|
270
|
-
turnId: z.ZodString;
|
|
271
|
-
request: z.ZodType<import("../../shared/json.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonValue, unknown>>;
|
|
272
|
-
}, z.core.$loose>, z.ZodObject<{
|
|
273
|
-
replyTo: z.ZodString;
|
|
274
|
-
sequence: z.ZodNumber;
|
|
275
|
-
stepIndex: z.ZodNumber;
|
|
276
|
-
taskId: z.ZodString;
|
|
277
|
-
turnId: z.ZodString;
|
|
278
|
-
requests: z.ZodArray<z.ZodType<import("../../shared/json.ts").JsonValue, unknown, z.core.$ZodTypeInternals<import("../../shared/json.ts").JsonValue, unknown>>>;
|
|
279
|
-
}, z.core.$loose>]>>>;
|
|
280
|
-
views: z.ZodOptional<z.ZodArray<z.ZodType<import("../../tasks/types.ts").TaskView, unknown, z.core.$ZodTypeInternals<import("../../tasks/types.ts").TaskView, unknown>>>>;
|
|
281
|
-
}, z.core.$strict>>;
|
|
282
|
-
}, z.core.$loose>>;
|
|
283
|
-
caller: z.ZodOptional<z.ZodObject<{
|
|
284
|
-
callId: z.ZodString;
|
|
285
|
-
replyTo: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
286
|
-
kind: z.ZodLiteral<"hook">;
|
|
287
|
-
token: z.ZodString;
|
|
288
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
289
|
-
kind: z.ZodLiteral<"callback">;
|
|
290
|
-
token: z.ZodString;
|
|
291
|
-
url: z.ZodString;
|
|
292
|
-
}, z.core.$strict>], "kind">;
|
|
293
|
-
subagentName: z.ZodString;
|
|
294
|
-
taskId: z.ZodOptional<z.ZodString>;
|
|
295
|
-
activityObserver: z.ZodOptional<z.ZodObject<{
|
|
296
|
-
sink: z.ZodObject<{
|
|
297
|
-
url: z.ZodString;
|
|
298
|
-
version: z.ZodLiteral<1>;
|
|
299
|
-
}, z.core.$strict>;
|
|
300
|
-
workIdentity: z.ZodOptional<z.ZodObject<{
|
|
301
|
-
callId: z.ZodOptional<z.ZodString>;
|
|
302
|
-
id: z.ZodString;
|
|
303
|
-
kind: z.ZodEnum<{
|
|
304
|
-
"remote-agent": "remote-agent";
|
|
305
|
-
"root-turn": "root-turn";
|
|
306
|
-
subagent: "subagent";
|
|
307
|
-
task: "task";
|
|
308
|
-
}>;
|
|
309
|
-
name: z.ZodOptional<z.ZodString>;
|
|
310
|
-
parentId: z.ZodOptional<z.ZodString>;
|
|
311
|
-
rootSessionId: z.ZodString;
|
|
312
|
-
rootTurnId: z.ZodString;
|
|
313
|
-
sessionId: z.ZodOptional<z.ZodString>;
|
|
314
|
-
turnId: z.ZodOptional<z.ZodString>;
|
|
315
|
-
label: z.ZodOptional<z.ZodString>;
|
|
316
|
-
}, z.core.$strict>>;
|
|
317
|
-
}, z.core.$strict>>;
|
|
318
|
-
}, z.core.$strict>>;
|
|
319
|
-
version: z.ZodLiteral<7>;
|
|
320
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
321
|
-
kind: z.ZodLiteral<"session-timeout">;
|
|
322
|
-
version: z.ZodLiteral<7>;
|
|
323
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
324
|
-
kind: z.ZodLiteral<"clear">;
|
|
325
|
-
version: z.ZodLiteral<7>;
|
|
326
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
327
|
-
kind: z.ZodLiteral<"compact">;
|
|
328
|
-
version: z.ZodLiteral<7>;
|
|
329
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
330
|
-
kind: z.ZodLiteral<"reset">;
|
|
331
|
-
reason: z.ZodOptional<z.ZodString>;
|
|
332
|
-
version: z.ZodLiteral<7>;
|
|
333
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
334
|
-
kind: z.ZodLiteral<"cancel">;
|
|
335
|
-
taskId: z.ZodOptional<z.ZodString>;
|
|
336
|
-
turnId: z.ZodOptional<z.ZodString>;
|
|
337
|
-
tasks: z.ZodOptional<z.ZodBoolean>;
|
|
338
|
-
version: z.ZodLiteral<7>;
|
|
339
|
-
}, z.core.$strict>], "kind">;
|
|
340
|
-
export type SessionInboxWireV7 = z.infer<typeof sessionInboxWireV7Schema>;
|
|
341
|
-
/** Builds and validates one complete version-7 wire value. */
|
|
342
|
-
export declare function encodeSessionCommandV7(command: DeliverHookPayload | SessionCommand | SessionTimeoutHookPayload): SessionInboxWireV7;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{z}from"#compiled/zod/index.js";import{formatValidationError}from"#runtime/validation.js";import{SessionInboxWireError}from"#execution/wire/session-inbox-contract.js";import{encodeSessionCommandV6,sessionInboxWireV6Schema}from"#execution/wire/session-inbox-wire.v6.js";const v6=sessionInboxWireV6Schema.options,v6Deliver=v6[0],v6Caller=v6Deliver.shape.caller.unwrap(),v6ActivityObserver=v6Caller.shape.activityObserver.unwrap(),v6WorkIdentity=v6ActivityObserver.shape.workIdentity.unwrap(),version=z.literal(7),sessionInboxWireV7Schema=z.discriminatedUnion(`kind`,[v6Deliver.extend({caller:v6Caller.extend({activityObserver:v6ActivityObserver.extend({workIdentity:v6WorkIdentity.extend({label:z.string().optional()}).optional()}).optional()}).optional(),version}),v6[1].extend({version}),v6[2].extend({version}),v6[3].extend({version}),v6[4].extend({version}),v6[5].extend({version})]);function encodeSessionCommandV7(e){let t=readActivityLabel(e),n=encodeSessionCommandV6(withoutActivityLabel(e)),r=t===void 0||n.kind!==`deliver`||n.caller===void 0?{...n,version:7}:{...n,caller:{...n.caller,activityObserver:{...n.caller.activityObserver,workIdentity:{...n.caller.activityObserver.workIdentity,label:t}}},version:7},i=sessionInboxWireV7Schema.safeParse(r);if(!i.success)throw new SessionInboxWireError(`Produced a session inbox payload that does not match wire version 7: ${formatValidationError(i.error)}`);return i.data}function readActivityLabel(e){return e.kind===`send`||e.kind===`deliver`?e.caller?.activityObserver?.workIdentity?.label:void 0}function withoutActivityLabel(e){if(e.kind!==`send`&&e.kind!==`deliver`||e.caller?.activityObserver?.workIdentity?.label===void 0)return e;let{label:t,...n}=e.caller.activityObserver.workIdentity;return{...e,caller:{...e.caller,activityObserver:{...e.caller.activityObserver,workIdentity:n}}}}export{encodeSessionCommandV7,sessionInboxWireV7Schema};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import type { TurnCaller } from "#channel/types.js";
|
|
2
|
-
import type { DurableSessionState } from "#execution/durable-session-store.js";
|
|
3
|
-
/**
|
|
4
|
-
* Write-through cell owned by `workflowEntry`: written
|
|
5
|
-
* unconditionally by the driver loop as turns advance, read only by the
|
|
6
|
-
* outer catch. When the loop throws, its locals are unreachable, so this
|
|
7
|
-
* cell is the crash path's only view of values that changed after turn 1.
|
|
8
|
-
*
|
|
9
|
-
* Reach for this cell only when all three hold for a value:
|
|
10
|
-
* 1. it is produced or replaced inside the driver loop, so the entry
|
|
11
|
-
* function's own locals go stale;
|
|
12
|
-
* 2. it travels by value inside Workflow step results — there is no
|
|
13
|
-
* store the catch could re-read it from at crash time;
|
|
14
|
-
* 3. the crash path needs its latest value to discharge a cleanup
|
|
15
|
-
* obligation.
|
|
16
|
-
* If any of the three fails, read the value from where it already lives
|
|
17
|
-
* instead of mirroring it here.
|
|
18
|
-
*/
|
|
19
|
-
export interface CrashCleanupState {
|
|
20
|
-
caller: TurnCaller | undefined;
|
|
21
|
-
callerResolved: boolean;
|
|
22
|
-
lastSessionState: DurableSessionState | undefined;
|
|
23
|
-
serializedContext: Record<string, unknown>;
|
|
24
|
-
terminalEmitted: boolean;
|
|
25
|
-
turnId?: string;
|
|
26
|
-
}
|
|
27
|
-
export declare function hasDelegatedCallerContext(serializedContext: Record<string, unknown>): boolean;
|
|
28
|
-
/**
|
|
29
|
-
* Caller to reject from the crash path. Normally the resolved cell value —
|
|
30
|
-
* including `undefined` after a settled reply cleared it, when there is
|
|
31
|
-
* nothing left to notify. When the crash happened before
|
|
32
|
-
* `resolveInitialTurnCallerStep` ever ran (e.g. `createSessionStep` threw),
|
|
33
|
-
* the cell is empty even though a delegated caller may be parked on this
|
|
34
|
-
* session's reply, so the caller is re-resolved from the serialized context
|
|
35
|
-
* — which needs nothing from the failed steps. Best-effort: when resolution
|
|
36
|
-
* fails again there is no reachable caller to notify.
|
|
37
|
-
*/
|
|
38
|
-
export declare function resolveCallerForCrash(state: CrashCleanupState, serializedContext: Record<string, unknown>): Promise<TurnCaller | undefined>;
|
|
39
|
-
export declare function createSafeOuterWorkflowError(): Error;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{resolveInitialTurnCallerStep}from"#subagents/parent-notification.js";function hasDelegatedCallerContext(e){if(e[`eve.sessionCallback`]!==void 0)return!0;let t=e[`eve.channel`];return typeof t==`object`&&!!t&&Reflect.get(t,`kind`)===`subagent`}async function resolveCallerForCrash(e,t){if(e.callerResolved)return e.caller;try{return await resolveInitialTurnCallerStep({serializedContext:t})}catch{return}}function createSafeOuterWorkflowError(){let e=Error(`Agent workflow failed. Inspect the private session trace for details.`);return e.name=`EveWorkflowFailure`,e}export{createSafeOuterWorkflowError,hasDelegatedCallerContext,resolveCallerForCrash};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { TurnCaller } from "#channel/types.js";
|
|
2
|
-
import type { DurableSessionState } from "#execution/durable-session-store.js";
|
|
3
|
-
import type { NextDriverAction } from "#execution/next-driver-action.js";
|
|
4
|
-
import type { RunMode } from "#shared/run-mode.js";
|
|
5
|
-
export declare function finalizeExpiredSession(input: {
|
|
6
|
-
readonly caller: TurnCaller | undefined;
|
|
7
|
-
readonly driverWritable: WritableStream<Uint8Array>;
|
|
8
|
-
readonly mode: RunMode;
|
|
9
|
-
readonly serializedContext: Record<string, unknown>;
|
|
10
|
-
readonly sessionState: DurableSessionState;
|
|
11
|
-
readonly terminalState?: {
|
|
12
|
-
terminalEmitted: boolean;
|
|
13
|
-
};
|
|
14
|
-
}): Promise<{
|
|
15
|
-
readonly output: unknown;
|
|
16
|
-
}>;
|
|
17
|
-
export declare function finalizeDone(input: {
|
|
18
|
-
readonly action: NextDriverAction & {
|
|
19
|
-
readonly kind: "done";
|
|
20
|
-
};
|
|
21
|
-
readonly caller: TurnCaller | undefined;
|
|
22
|
-
readonly mode: RunMode;
|
|
23
|
-
readonly terminalState?: {
|
|
24
|
-
terminalEmitted: boolean;
|
|
25
|
-
};
|
|
26
|
-
}): Promise<{
|
|
27
|
-
readonly output: unknown;
|
|
28
|
-
}>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{fireSessionCallbackStep}from"#subagents/callback-step.js";import{notifyDelegatedParentStep,notifyTurnCallerStep}from"#subagents/parent-notification.js";import{createDelegatedSubagentErrorResult,createDelegatedSubagentSuccessResult}from"#subagents/parent-result.js";import{emitTerminalSessionCompletionStep}from"#execution/terminal-session-completion-step.js";import{terminateChildSessionsStep}from"#execution/terminate-child-sessions-step.js";async function finalizeExpiredSession(e){return await terminateChildSessionsStep({serializedContext:e.serializedContext,sessionState:e.sessionState}),await emitTerminalSessionCompletionStep({parentWritable:e.driverWritable,serializedContext:e.serializedContext}),e.terminalState!==void 0&&(e.terminalState.terminalEmitted=!0),e.mode===`task`?(await fireSessionCallbackStep({output:``,serializedContext:e.serializedContext,status:`completed`}),await notifyDelegatedParentStep({result:createDelegatedSubagentSuccessResult(e.serializedContext,``),serializedContext:e.serializedContext})):e.caller!==void 0&&await notifyTurnCallerStep({caller:e.caller,lifecycle:`terminal`,sessionId:e.sessionState.sessionId,settled:{output:``}}),{output:``}}async function finalizeDone(e){let{output:t,serializedContext:n}=e.action,r=e.action.isError===!0;if(await terminateChildSessionsStep({serializedContext:n,sessionState:e.action.sessionState}),e.terminalState!==void 0&&(e.terminalState.terminalEmitted=!0),e.mode===`task`)await fireSessionCallbackStep({error:r?t:void 0,output:r?void 0:t,serializedContext:n,status:r?`failed`:`completed`,usage:e.action.usage}),await notifyDelegatedParentStep({result:r?createDelegatedSubagentErrorResult(n,t):createDelegatedSubagentSuccessResult(n,t),serializedContext:n,usage:e.action.usage});else{let n={output:t,usage:e.action.usageDelta};r&&(n.isError=!0),e.caller!==void 0&&await notifyTurnCallerStep({caller:e.caller,lifecycle:`terminal`,sessionId:e.action.sessionState.sessionId,settled:n})}return{output:t}}export{finalizeDone,finalizeExpiredSession};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import type { RunInput, SessionCommand } from "#channel/types.js";
|
|
2
|
-
import type { AgentWorkflowRetentionDefinition } from "#shared/agent-definition.js";
|
|
3
|
-
/**
|
|
4
|
-
* Serializable workflow-entry input. All runtime state travels via
|
|
5
|
-
* `serializedContext`, which is produced by `serializeContext(ctx)`
|
|
6
|
-
* and deserialized at each `"use step"` boundary.
|
|
7
|
-
*/
|
|
8
|
-
export interface WorkflowEntryInput {
|
|
9
|
-
readonly activityCollectorRunId?: string;
|
|
10
|
-
readonly continuationConflictCommand?: Extract<SessionCommand, {
|
|
11
|
-
readonly kind: "send";
|
|
12
|
-
}>;
|
|
13
|
-
readonly input: RunInput["input"];
|
|
14
|
-
readonly limits?: RunInput["limits"];
|
|
15
|
-
readonly retention?: AgentWorkflowRetentionDefinition;
|
|
16
|
-
readonly sessionTimeoutMs?: number | false;
|
|
17
|
-
readonly serializedContext: Record<string, unknown>;
|
|
18
|
-
readonly taskId?: string;
|
|
19
|
-
}
|
|
20
|
-
export interface WorkflowEntryResult {
|
|
21
|
-
readonly output: unknown;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Long-lived workflow entrypoint. Handles both root sessions and
|
|
25
|
-
* delegated child sessions: root sessions expose only parent
|
|
26
|
-
* control-plane events; delegated children publish their full progress
|
|
27
|
-
* on a child stream and resume the parked parent with a
|
|
28
|
-
* `subagent-result` on completion.
|
|
29
|
-
*
|
|
30
|
-
* Owns the stable command inbox, its channel alias, and the session lifecycle; each turn-owned
|
|
31
|
-
* turn resolves its own runtime actions in-line and reports back only
|
|
32
|
-
* `done`/`park` via the closed-contract {@link NextDriverAction}. The
|
|
33
|
-
* only session-shape flag the driver reads (besides identity) is
|
|
34
|
-
* `hasProxyInputRequests`, the documented short-circuit for hook-payload
|
|
35
|
-
* routing to any descendant still active when the parent parks.
|
|
36
|
-
*/
|
|
37
|
-
export declare function workflowEntry(input: WorkflowEntryInput): Promise<WorkflowEntryResult>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{attachClientContext,readClientContext}from"#internal/client-context.js";import{sessionCommandHookToken}from"#execution/session-command-token.js";import{SESSION_INBOX_CONTEXT_KEY,SESSION_INBOX_WIRE_VERSION}from"#execution/wire/session-inbox-contract.js";import{getWorkflowMetadata,getWritable}from"#compiled/@workflow/core/index.js";import{isHookConflictError}from"#execution/hook-ownership.js";import{readChannelRequestId,readRootSessionId}from"#execution/eve-workflow-attributes.js";import{SessionStateCursor}from"#execution/session-state-cursor.js";import{fireSessionCallbackStep}from"#subagents/callback-step.js";import{normalizeSerializableError}from"#execution/workflow-errors.js";import{cancelDescendantTurnsStep}from"#execution/cancel-descendant-turns-step.js";import{bindTurnCallerContextStep,notifyCancelledTaskCallerStep,notifyDelegatedParentStep,notifyTurnCallerStep,resolveInitialTurnCallerStep}from"#subagents/parent-notification.js";import{createDelegatedSubagentErrorResult}from"#subagents/parent-result.js";import{terminateChildSessionsStep}from"#execution/terminate-child-sessions-step.js";import{createSafeOuterWorkflowError,hasDelegatedCallerContext,resolveCallerForCrash}from"#execution/workflow-entry-crash.js";import{nextTurnDelivery}from"#execution/parked-delivery-wait.js";import{rebaseTaskAgentHandleMutations}from"#subagents/handles/rebase.js";import{dispatchAndAwaitTurn}from"#execution/turn-dispatch.js";import{createSessionStep}from"#execution/create-session-step.js";import{settleCancelledTurnStep}from"#execution/settle-cancelled-turn-step.js";import{emitTerminalSessionFailureStep}from"#execution/terminal-session-failure-step.js";import{finalizeDone,finalizeExpiredSession}from"#execution/workflow-entry-finalization.js";import{createSessionCommandInbox}from"#execution/session-command-inbox.js";import{DEFAULT_SESSION_TIMEOUT_MS}from"#execution/session-timeout.js";import{createSessionTimeoutControl}from"#execution/session-timeout-control.js";import{settleContinuationConflictStep}from"#execution/continuation-conflict-step.js";async function workflowEntry(e){"use workflow";let{workflowRunId:t,workflowStartedAt:n}=getWorkflowMetadata(),r=e.serializedContext[`eve.continuationToken`]||``,i=e.serializedContext[`eve.mode`],a=e.serializedContext[`eve.capabilities`],o=e.serializedContext[`eve.bundle`];e.serializedContext[`eve.sessionId`]=t,e.serializedContext[SESSION_INBOX_CONTEXT_KEY]={sessionId:t,version:SESSION_INBOX_WIRE_VERSION};let s=getWritable(),c={caller:void 0,callerResolved:!1,lastSessionState:void 0,serializedContext:e.serializedContext,terminalEmitted:!1};try{let l=readRootSessionId(e.serializedContext),u=e.serializedContext[`eve.dynamicSubagentAgentConfig`],d=createSessionCommandInbox(),f=sessionCommandHookToken(t),p=`${t}:auth`,m,h;try{let[g,_,v,y]=await Promise.allSettled([createSessionStep({compiledArtifactsSource:o.source,continuationToken:r,dynamicSubagentAgentConfig:u,inheritedLimits:e.limits,nodeId:o.nodeId,outputSchema:e.input.outputSchema,rootSessionId:l,sessionId:t,taskId:e.taskId}),d.claimStable(f),d.claimAuthorization(p),d.rekeyContinuation(r)]);if(g.status===`rejected`)throw g.reason;if(_.status===`rejected`)throw _.reason;if(v.status===`rejected`)throw v.reason;if(y.status===`rejected`){if(isHookConflictError(y.reason))return(e.activityCollectorRunId!==void 0||e.continuationConflictCommand!==void 0)&&await settleContinuationConflictStep({activityCollectorRunId:e.activityCollectorRunId,command:e.continuationConflictCommand,continuationToken:r,ownerSessionId:typeof y.reason.conflictingRunId==`string`?y.reason.conflictingRunId:void 0}),{output:``};throw y.reason}m=g.value.state,c.lastSessionState=m,c.caller=hasDelegatedCallerContext(e.serializedContext)?await resolveInitialTurnCallerStep({serializedContext:e.serializedContext}):void 0,c.callerResolved=!0,h=await runDriverLoop({capabilities:a,commandInbox:d,driverWritable:s,initialInput:{deliveryMetadata:e.serializedContext[`eve.channelDelivery`]===void 0?void 0:[{...e.serializedContext[`eve.channelDelivery`],payloadIndex:0}],kind:`deliver`,payloads:[attachClientContext({message:e.input.message,context:e.input.context,outputSchema:e.input.outputSchema},readClientContext(e.input))],requestId:readChannelRequestId(e.serializedContext)},crashCleanupState:c,mode:i,retention:e.retention,serializedContext:e.serializedContext,sessionState:m,sessionTimeoutDeadline:e.sessionTimeoutMs===!1?void 0:new Date(n.getTime()+(e.sessionTimeoutMs??DEFAULT_SESSION_TIMEOUT_MS)),stableCommandToken:f})}finally{await d.dispose()}return h.kind===`result`?h.result:await finalizeExpiredSession({caller:c.caller,driverWritable:s,mode:i,serializedContext:h.serializedContext,sessionState:h.sessionState,terminalState:c})}catch(e){let n=c.terminalEmitted;throw!c.terminalEmitted&&c.lastSessionState!==void 0&&await terminateChildSessionsStep({serializedContext:c.serializedContext,sessionState:c.lastSessionState}),c.terminalEmitted||=(await emitTerminalSessionFailureStep({error:normalizeSerializableError(e),parentWritable:s,serializedContext:c.serializedContext,turnId:c.turnId}),!0),n||(i===`task`?(await fireSessionCallbackStep({error:normalizeSerializableError(e),serializedContext:c.serializedContext,status:`failed`}),await notifyDelegatedParentStep({result:createDelegatedSubagentErrorResult(c.serializedContext,e),serializedContext:c.serializedContext})):(c.caller!==void 0||!c.callerResolved)&&await notifyTurnCallerStep({caller:await resolveCallerForCrash(c,c.serializedContext),lifecycle:`terminal`,sessionId:t,settled:{isError:!0,output:e}})),createSafeOuterWorkflowError()}}async function runDriverLoop(e){let t=e.commandInbox,n=new Map,nextParkedActivity=async r=>{let l=new Set(r.expectedAttemptIds);for(let e of n.keys())l.has(e)||n.delete(e);for(;;){if(l.size>0&&[...l].every(e=>n.has(e))){let e=[...l].map(e=>n.get(e));return n.clear(),{kind:`authorization-resume`,payloads:e}}let r=await nextTurnDelivery({awaitAuthorizationCallbacks:l.size>0,bufferedDeliveries:i,bufferedSessionControls:a,cancelledTaskIds:o,commandInbox:t,deferDeliveries:e.mode===`task`&&l.size>0,driverWritable:e.driverWritable,seenTaskDeliveries:s,stateCursor:c});if(r.kind!==`authorization`)return r;for(let e of r.payloads){let t=e.authorizationCallback;typeof t?.attemptId==`string`&&l.has(t.attemptId)&&!n.has(t.attemptId)&&n.set(t.attemptId,e)}if(r.closed){let e=[...n.values()];return n.clear(),{kind:`authorization-resume`,payloads:e}}}},r=0,nextTurnControlToken=()=>`${e.sessionState.sessionId}:turn-control:${String(r++)}`,i=[],a=[],o=new Set,s=new Set,c=new SessionStateCursor({serializedContext:e.serializedContext,sessionState:e.sessionState}),l=e.sessionTimeoutDeadline===void 0?void 0:createSessionTimeoutControl({deadline:e.sessionTimeoutDeadline,token:e.stableCommandToken}),u,runTurn=async n=>{let l=c.sessionState,d=e.crashCleanupState.caller;d?.taskId!==void 0&&s.add(d.taskId);let f=d===void 0?c.serializedContext:await bindTurnCallerContextStep({caller:d,serializedContext:c.serializedContext});e.crashCleanupState.turnId=`turn_${String(r)}`;let p=await dispatchAndAwaitTurn({bufferedDeliveries:i,bufferedSessionControls:a,cancelledTaskIds:o,capabilities:e.capabilities,commandInbox:t,controlToken:nextTurnControlToken(),delivery:n,mode:e.mode,parentWritable:e.driverWritable,retention:e.retention,serializedContext:f,seenTaskDeliveries:s,sessionState:c.sessionState,stateCursor:c});await u?.(),u=p.dispose;let m=c.sessionState===l?p.action:rebaseTaskAgentHandleMutations(p.action,c.sessionState,l);return c.adoptState(m),e.crashCleanupState.lastSessionState=c.sessionState,e.crashCleanupState.serializedContext=c.serializedContext,m};try{await l?.start();let n=await runTurn(e.initialInput);for(;;){if(n.kind===`done`)return{kind:`result`,result:await finalizeDone({action:n,caller:e.crashCleanupState.caller,mode:e.mode,terminalState:e.crashCleanupState})};if(n.kind!==`park`)throw Error(`Driver received unexpected turn action "${n.kind}".`);if(n.cancelled===!0){let t=await settleCancelledTurnStep({parentWritable:e.driverWritable,serializedContext:c.serializedContext,sessionState:c.sessionState});c.adoptState(t),e.crashCleanupState.serializedContext=c.serializedContext;let n={caller:e.crashCleanupState.caller,sessionId:c.sessionState.sessionId};await notifyCancelledTaskCallerStep(t.usage===void 0?n:{...n,usage:t.usage}),e.crashCleanupState.lastSessionState=c.sessionState}c.sessionState.continuationToken&&await t.rekeyContinuation(c.sessionState.continuationToken);let r=n.settled;n.cancelled!==!0&&r!==void 0?(e.crashCleanupState.caller!==void 0&&await notifyTurnCallerStep({caller:e.crashCleanupState.caller,lifecycle:`parked`,sessionId:c.sessionState.sessionId,settled:r}),e.crashCleanupState.caller=void 0):n.cancelled===!0&&(e.crashCleanupState.caller=void 0);let i=await nextParkedActivity({expectedAttemptIds:n.authorizationAttemptIds??[]});if(e.crashCleanupState.lastSessionState=c.sessionState,i.kind===`authorization-resume`){n=await runTurn({kind:`deliver`,payloads:i.payloads});continue}if(i.kind===`expired`)return{kind:`expired`,serializedContext:c.serializedContext,sessionState:c.sessionState};if(i.kind===`reset`)return{kind:`result`,result:await finalizeExpiredSession({caller:e.crashCleanupState.caller,driverWritable:e.driverWritable,mode:e.mode,serializedContext:c.serializedContext,sessionState:c.sessionState,terminalState:e.crashCleanupState})};if(i.kind===`clear`||i.kind===`compact`){n=await runTurn({kind:i.kind});continue}if(i.kind===`closed`)return{kind:`result`,result:await finalizeExpiredSession({caller:e.crashCleanupState.caller,driverWritable:e.driverWritable,mode:e.mode,serializedContext:c.serializedContext,sessionState:c.sessionState,terminalState:e.crashCleanupState})};if(i.kind===`cancel-turn`){await cancelDescendantTurnsStep({serializedContext:c.serializedContext,sessionState:c.sessionState});let t=await settleCancelledTurnStep({parentWritable:e.driverWritable,serializedContext:c.serializedContext,sessionState:c.sessionState});c.adoptState(t),e.crashCleanupState.serializedContext=c.serializedContext,n={...n,settled:void 0},e.crashCleanupState.caller=void 0,e.crashCleanupState.lastSessionState=c.sessionState;continue}i.delivery.caller!==void 0&&(e.crashCleanupState.caller=i.delivery.caller),n=await runTurn(i.delivery)}}finally{await u?.(),await l?.dispose()}}workflowEntry.workflowId=`workflow//eve//workflowEntry`;export{workflowEntry};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{callAdapterEventHandler,defaultDeliverResult}from"#channel/adapter.js";import{contextStorage}from"#context/container.js";import{AuthKey,CapabilitiesKey,ChannelDeliveryKey,HandleEventKey,ModeKey,ScheduleIdKey,SessionDynamicSubagentRuntimeRevisionKey,SessionDynamicToolRuntimeRevisionKey,StaticModelReferenceKey,TurnDeliveryIdsKey,TurnTaskDeliveryKey}from"#context/keys.js";import{createAuthorizationCompletedEvent,createSessionStartedEvent,createTurnStartedEvent,encodeMessageStreamEvent,stampMessageStreamEvent}from"#protocol/message.js";import{BundleKey,ChannelKey}from"#runtime/sessions/runtime-context-keys.js";import{coalesceTurnInputs}from"#harness/messages.js";import{emitTurnPreamble,getHarnessEmissionState,isHarnessBetweenTurns,setHarnessEmissionState}from"#harness/emission.js";import{createWorkflowRuntime}from"#execution/workflow-runtime.js";import{deserializeContext,serializeContext}from"#context/serialize.js";import{createDurableSessionState,readDurableSession}from"#execution/durable-session-store.js";import{dispatchDynamicSubagentEvent,refreshDynamicSessionSubagentsForRuntimeRevision}from"#context/dynamic-subagent-lifecycle.js";import{resolveEffectiveAgentRuntime}from"#execution/effective-agent-config.js";import{hydrateDurableSession,refreshSessionFromTurnAgent}from"#execution/session.js";import{readRetainedBackgroundToolResult,runBackgroundStep}from"#execution/tasks/parent/tool-execution.js";import{preserveSerializedBackgroundTaskObservabilityState}from"#shared/serialized-observability-state.js";import*as agentTraceState from"#tracing/agent-trace-context-store.js";import{buildAdapterContext}from"#channel/adapter-context.js";import{activeTurnId}from"#harness/active-turn-id.js";import{getPendingWorkflowInterrupt}from"#harness/workflow-interrupt-state.js";import{getWorkflowTaskCallIds,isWorkflowTaskInterrupt}from"#harness/workflow-task-state.js";import{deferMismatchedInlineTurnStep}from"#execution/accepted-delivery-deployment.js";import{isTurnCancellation,throwIfTurnAborted}from"#harness/turn-cancellation.js";import{derivePendingState}from"#execution/pending-turn-state.js";import{dispatchDynamicModelEvent}from"#context/dynamic-model-lifecycle.js";import{dispatchDynamicToolEvent,rebindMissingCompiledDynamicToolCallbacks,refreshDynamicSessionToolsForRuntimeRevision}from"#context/dynamic-tool-lifecycle.js";import{CallbackBaseUrlKey,PendingAuthorizationResultKey,clearPendingAuthorization,getPendingAuthorization}from"#harness/authorization.js";import{hasPendingInputBatch}from"#harness/input-requests.js";import{setChannelContext}from"#execution/channel-context.js";import{dispatchStreamEventHooks}from"#context/hook-lifecycle.js";import{observeSessionActivity}from"#execution/session-activity-projection.js";import{reconcileSessionContinuationToken}from"#execution/reconcile-session-continuation-token.js";import{bindSessionInstrumentation}from"#instrumentation/runtime.js";import{getTurnUsageState,takeSessionUsageDelta,toUsage}from"#harness/turn-tag-state.js";import{resolveWorkflowCallbackBaseUrl}from"#execution/workflow-callback-url.js";import{dispatchDynamicInstructionEvent,drainDynamicInstructionUserMessages,prepareDynamicInstructionPreamble}from"#context/dynamic-instruction-lifecycle.js";import{dispatchDynamicSkillEvent}from"#context/dynamic-skill-lifecycle.js";import{dispatchMemoryLifecycleEvent}from"#context/memory-event-lifecycle.js";import{RuntimeActionSettlementTimesKey}from"#harness/runtime-action-settlement-state.js";import{matchAuthorizationCallbacks}from"#execution/authorization-callback-match.js";import{forwardTaskEventToSessionCallback}from"#execution/task-event-callback.js";import{resolveEffectiveOutputSchema}from"#execution/effective-output-schema.js";import{buildRuntimeIdentity,createExecutionNodeStep}from"#execution/node-step.js";import{getBackgroundTaskDelivery,markBackgroundTaskStepInput,resolveInitiatingTaskContext,resolveTaskDeliveryContext}from"#tasks/delivery-context.js";import{scheduledLaunchDeliveryEvent}from"#execution/scheduled-launch-delivery.js";import{prepareWorkflowPreambleTrace}from"#execution/workflow-trace-context.js";import{createExecutionHistoryView}from"#execution/history-view.js";import{resolveRuntimeCompiledArtifactsVersionedCacheKey}from"#runtime/cache-key.js";import{bindDynamicConnections}from"#execution/dynamic-connections.js";import{runModelCallBatch}from"#execution/model-call-batching.js";import{createCancelledModelCallBatchResult}from"#execution/cancelled-model-call-batch.js";import*as activityCohort from"#execution/activity-cohort.js";function channelDeliveryErrorCode(e){if(typeof e==`object`&&e&&`code`in e){let t=e.code;if(typeof t==`string`&&t.length>0)return t}return`CHANNEL_DELIVERY_FAILED`}async function turnStep(e){"use step";let t=deferMismatchedInlineTurnStep(e);if(t!==void 0)return t;let n=e,r=await readDurableSession(n.sessionState),i=await deserializeContext(n.serializedContext);e.input?.kind===`deliver`&&i.set(TurnTaskDeliveryKey,`none`);let a=i.require(ChannelKey),o=i.require(BundleKey),s=resolveEffectiveAgentRuntime(o,i);try{let{getWorkflowMetadata:e}=await import(`#compiled/@workflow/core/index.js`),t=e();typeof t.url==`string`&&i.set(CallbackBaseUrlKey,resolveWorkflowCallbackBaseUrl(t.url))}catch{}let c=getPendingAuthorization(r.state),l;if(c&&n.input?.kind===`deliver`){let{matches:e,remainingPayloads:t}=matchAuthorizationCallbacks(c,n.input.payloads);if(n={...n,input:{...n.input,payloads:t}},e.length>0){let a=activityCohort.restoreAuthorizationActivity({ctx:i,matches:e,pending:c}),o=e.map(e=>e.result);i.set(PendingAuthorizationResultKey,o),r={...r,state:clearPendingAuthorization(r.state,a)},l=e,t.length===0&&(n={...n,input:void 0})}}n.input?.kind===`deliver`&&n.input.auth!==void 0&&i.set(AuthKey,n.input.auth??null);let u=getBackgroundTaskDelivery(n.input),d=hydrateDurableSession({compactionOverrides:{thresholdPercent:s.thresholdPercent},durable:r,turnAgent:s.turnAgent}),f=createExecutionHistoryView(d),p=bindSessionInstrumentation({agentName:s.turnAgent.id,ctx:i,rootSessionId:d.rootSessionId??d.sessionId,sessionId:d.sessionId}),m=getHarnessEmissionState(d.state);e.input?.kind===`deliver`&&e.input.payloads.some(e=>e.message!==void 0)?i.set(TurnDeliveryIdsKey,e.input.deliveryMetadata?.map(e=>e.deliveryId)??[]):!m.sessionStarted&&i.get(ChannelDeliveryKey)!==void 0&&i.set(TurnDeliveryIdsKey,[i.require(ChannelDeliveryKey).deliveryId]),e.input?.kind===`deliver`&&await contextStorage.run(i,()=>p?.instrumentChannelDelivery({agentName:o.turnAgent.id,ctx:i,delivery:e.input,rootSessionId:d.rootSessionId??d.sessionId,sequence:m.sequence,sessionId:d.sessionId,turnId:activeTurnId(m)}));let failChannelDeliveries=async e=>{await contextStorage.run(i,()=>p?.instrumentChannelDelivery({ctx:i,error:e,errorCode:channelDeliveryErrorCode(e),includeTurn:!1,outcome:`failed`})),await p?.flush()},h=buildAdapterContext(a,i),g;if(n.input?.kind===`deliver`){let e=[];try{for(let t of n.input.payloads){let n=a.deliver?await a.deliver(t,h):defaultDeliverResult(t);n!=null&&e.push(u===void 0?n:markBackgroundTaskStepInput(n))}}catch(e){throw await failChannelDeliveries(e),e}g=e.length===0?void 0:e.reduce(coalesceTurnInputs)}else n.input?.kind===`runtime-action-result`&&(n.input.acceptedAtMsByCallId!==void 0&&i.set(RuntimeActionSettlementTimesKey,n.input.acceptedAtMsByCallId),g={runtimeActionResults:n.input.results});let _;if(g!==void 0&&u!==void 0){let e=resolveTaskDeliveryContext({state:r.state,taskDeliveryId:u.taskDeliveryId});e!==void 0&&(i.set(TurnTaskDeliveryKey,e.phase),_=e.rootTurnId,g={...g,context:[...g.context??[],e.context]})}activityCohort.updateActivityRootForDelivery({activeTurnId:activeTurnId(m),ctx:i,delivery:e.input?.kind===`deliver`?e.input:void 0,sessionState:r.state,taskRootTurnId:_});let v=i.get(TurnTaskDeliveryKey);if(v===`none`||v===`initiating`){let e=resolveInitiatingTaskContext({state:r.state,turnId:activeTurnId(m)});e!==void 0&&i.set(TurnTaskDeliveryKey,e.phase)}if(n.input?.kind===`deliver`){let e={...a,state:{...h.state}};setChannelContext(i,e)}if(n.input?.kind===`deliver`&&g===void 0){await contextStorage.run(i,()=>p?.instrumentChannelDelivery({ctx:i,includeTurn:!1,outcome:`completed`})),await p?.flush();let e=reconcileSessionContinuationToken(i,d),t=serializeContext(i),r=e===d?n.sessionState:createDurableSessionState({session:e});return{action:`park`,...derivePendingState(e),serializedContext:t,sessionState:r}}let y=o.hookRegistry,b=bindDynamicConnections(i,o.resolvedAgent),x=o.resolvedAgent.dynamicInstructionsResolvers??[],S=o.resolvedAgent.dynamicSkillResolvers??[],C=o.subagentRegistry.dynamicResolvers??[],w=o.resolvedAgent.dynamicToolResolvers??[],T={...o.graph.root,turnAgent:s.turnAgent},E=buildRuntimeIdentity(T);try{let e=process.env.VERCEL_DEPLOYMENT_ID?.trim(),t=e?`deployment:${e}`:await resolveRuntimeCompiledArtifactsVersionedCacheKey(o.compiledArtifactsSource),n=m.sessionStarted;if(i.setVirtualContext(StaticModelReferenceKey,s.turnAgent.model??null),!n)i.set(SessionDynamicSubagentRuntimeRevisionKey,t),i.set(SessionDynamicToolRuntimeRevisionKey,t);else{let e=createSessionStartedEvent({runtime:E});await Promise.all([refreshDynamicSessionSubagentsForRuntimeRevision({ctx:i,resolvers:C,event:e,messages:f.initial.messages,runtimeRevision:t}),refreshDynamicSessionToolsForRuntimeRevision({ctx:i,resolvers:w,event:e,messages:f.initial.messages,runtimeRevision:t})]),await rebindMissingCompiledDynamicToolCallbacks({ctx:i,event:createTurnStartedEvent({sequence:m.sequence,turnId:activeTurnId(m)}),messages:f.initial.messages,resolvers:w})}}catch(e){throw await failChannelDeliveries(e),e}let D=n.parentWritable.getWriter(),emit=async e=>{let t=scheduledLaunchDeliveryEvent(e,{isFirstTurn:m.sequence===0,isScheduled:i.get(ScheduleIdKey)!==void 0,taskPhase:i.get(TurnTaskDeliveryKey)});if(t===void 0)return{event:stampMessageStreamEvent(e,i.get(TurnDeliveryIdsKey)),suppressed:!0};let n=await callAdapterEventHandler(a,t,h);setChannelContext(i,{...a,state:{...h.state}});let r=stampMessageStreamEvent(n,i.get(TurnDeliveryIdsKey));return await D.write(encodeMessageStreamEvent(r)),{event:r,suppressed:!1}},handleEvent=async(e,t)=>{activityCohort.updateActivityBlockers(i,e);let r=await forwardTaskEventToSessionCallback(i,e)?{event:stampMessageStreamEvent(e,i.get(TurnDeliveryIdsKey)),suppressed:!1}:await emit(e),a=await dispatchMemoryLifecycleEvent({abortSignal:n.abortSignal,appRoot:T.agent?.metadata?.appRoot??``,ctx:i,event:e,instrumentation:p?.memory,memories:T.agent?.memories??[],messages:t,nodeId:o.nodeId??`__root__`});observeSessionActivity({ctx:i,event:r.event,sessionId:d.sessionId}),r.suppressed||await dispatchStreamEventHooks({ctx:i,registry:y,event:r.event}),r.event.type!==`step.started`&&await dispatchDynamicModelEvent({ctx:i,dynamicModel:s.turnAgent.dynamicModel,event:r.event,messages:a,scope:{moduleMap:o.moduleMap,nodeId:o.nodeId}}),await b.dispatch(r.event),await dispatchDynamicSubagentEvent({ctx:i,resolvers:C,event:r.event,messages:a}),await dispatchDynamicToolEvent({ctx:i,resolvers:w,event:r.event,messages:a}),await dispatchDynamicSkillEvent({ctx:i,resolvers:S,event:r.event,messages:a}),await dispatchDynamicInstructionEvent({ctx:i,resolvers:x,event:r.event,messages:a})},O=i.require(ModeKey),k=o.resolvedAgent.config?.experimental?.workflow?.modelCallsPerStep??1,A=i.get(CapabilitiesKey),runHarnessStep=async(e,t)=>{let r=refreshSessionFromTurnAgent({compactionOverrides:{thresholdPercent:s.thresholdPercent},session:e,turnAgent:s.turnAgent}),i=r;return createExecutionNodeStep({abortSignal:n.abortSignal,capabilities:A,clearOnly:n.input?.kind===`clear`,compactOnly:n.input?.kind===`compact`,createRuntime:createWorkflowRuntime,handleEvent,historyProjector:f.projector,historyView:f.prepare(i),instrumentation:p,mode:O,modelResolutionScope:{moduleMap:o.moduleMap,nodeId:o.nodeId},node:T,workflowMaxSubagents:r.workflowMaxSubagents})(i,t)},j,M;try{throwIfTurnAborted(n.abortSignal),M=await runModelCallBatch({initialInput:g,initialSession:d,modelCallsPerStep:k,runStep:async({firstCall:e,session:t,stepInput:r})=>{let a=await runBackgroundStep(i,t,async t=>{i.setVirtualContext(HandleEventKey,handleEvent),i.setVirtualContext(StaticModelReferenceKey,s.turnAgent.model??null);let n=e?resolveEffectiveOutputSchema({agentOutputSchema:s.turnAgent.outputSchema,input:g,mode:O,session:t}):t;if(await b.rehydrate(getHarnessEmissionState(n.state),E,isHarnessBetweenTurns(n)),e&&l){let e=getHarnessEmissionState(n.state);if(isHarnessBetweenTurns(n)){prepareDynamicInstructionPreamble(i,f.messages(n));let t=[],r=await prepareWorkflowPreambleTrace({emissionState:e,instrumentation:p});try{e=await emitTurnPreamble(handleEvent,{},e,E,r)}finally{t=drainDynamicInstructionUserMessages(i),n={...n,history:[...n.history,...t]}}n=setHarnessEmissionState(n,e)}for(let{authorization:t,result:n}of l){let r=c?.challenges.find(e=>e.attemptId===n.attemptId)?.candidateId;await handleEvent(createAuthorizationCompletedEvent({attemptId:n.attemptId,authorization:t,candidateId:r,name:n.name,outcome:`authorized`,sequence:e.sequence,stepIndex:e.stepIndex,turnId:e.turnId}))}}return runHarnessStep(n,r)});return throwIfTurnAborted(n.abortSignal),j={result:a,serializedContext:serializeContext(i)},a}})}catch(e){if(!isTurnCancellation(e)&&n.abortSignal?.aborted!==!0)throw await failChannelDeliveries(e),e;D.releaseLock();let t=readRetainedBackgroundToolResult(i);return p?.rememberBackgroundTasks(t?.backgroundTasks??[]),createCancelledModelCallBatchResult({beforeBatchContext:n.serializedContext,checkpoint:j,ctx:i,initialSession:d,stepInput:g})}p?.rememberBackgroundTasks(M.backgroundTasks??[]);let N=reconcileSessionContinuationToken(i,M.session);agentTraceState.pruneAgentTraceState(i,N.sessionId,N.state);let P=serializeContext(i);M={...M,session:N};let F=createDurableSessionState({session:M.session}),I=M.backgroundTasks===void 0||M.backgroundTaskSession===void 0?{}:{backgroundTaskContext:preserveSerializedBackgroundTaskObservabilityState(n.serializedContext,P,M.backgroundTasks),backgroundTaskState:createDurableSessionState({session:M.backgroundTaskSession}),backgroundTasks:M.backgroundTasks};if(M.next!==null&&typeof M.next==`object`&&`done`in M.next){if(O===`task`&&hasPendingInputBatch(M.session.state))throw D.releaseLock(),Error(`Task mode cannot complete while input requests remain pending.`);await D.close();let e=getTurnUsageState(M.session.state)?.session;return{action:`done`,...I,output:M.next.output,isError:M.next.isError,serializedContext:P,sessionState:F,usage:e===void 0?void 0:toUsage(e),usageDelta:takeSessionUsageDelta(M.session).delta}}if(M.next===null){D.releaseLock();let e=getPendingWorkflowInterrupt(M.session.state);if(e!==void 0&&isWorkflowTaskInterrupt(e.interrupt))return{action:`dispatch-workflow-tasks`,...I,pendingTaskCallIds:getWorkflowTaskCallIds(e.interrupt),serializedContext:P,sessionState:F};let t=derivePendingState(M.session);if(M.settledTurn!==void 0){let{delta:e,session:n}=takeSessionUsageDelta(M.session);return{action:`park`,...I,...t,serializedContext:P,sessionState:createDurableSessionState({session:n}),settled:{output:M.settledTurn.output,isError:M.settledTurn.isError,usage:e}}}return{action:`park`,...I,...t,serializedContext:P,sessionState:F}}return D.releaseLock(),{action:`continue`,...I,serializedContext:P,sessionState:F}}export{turnStep};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { HarnessSession } from "#harness/types.js";
|
|
2
|
-
import type { WorkflowSandboxContinuationSecurity } from "#shared/workflow-sandbox.js";
|
|
3
|
-
export declare function ensureWorkflowContinuationSecurity(session: HarnessSession): HarnessSession;
|
|
4
|
-
export declare function readWorkflowContinuationSecurity(session: HarnessSession): WorkflowSandboxContinuationSecurity | undefined;
|
|
5
|
-
export declare function getWorkflowContinuationSecurity(session: HarnessSession): WorkflowSandboxContinuationSecurity;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{randomBytes}from"node:crypto";const WORKFLOW_CONTINUATION_SECURITY_KEY=`eve.harness.workflowContinuationSecurity`;function ensureWorkflowContinuationSecurity(e){return e.state?.[WORKFLOW_CONTINUATION_SECURITY_KEY]===void 0?{...e,state:{...e.state,[WORKFLOW_CONTINUATION_SECURITY_KEY]:{signingKey:randomBytes(32).toString(`base64url`),version:1}}}:(getWorkflowContinuationSecurity(e),e)}function readWorkflowContinuationSecurity(e){let t=e.state?.[WORKFLOW_CONTINUATION_SECURITY_KEY];if(typeof t==`object`&&t&&t.version===1&&typeof t.signingKey==`string`&&/^[A-Za-z0-9_-]{43}$/.test(t.signingKey))return{signingKey:t.signingKey,maxAgeMs:31536e6}}function getWorkflowContinuationSecurity(e){let t=readWorkflowContinuationSecurity(e);if(t===void 0)throw Error(`Workflow continuation security state is missing or invalid.`);return t}export{ensureWorkflowContinuationSecurity,getWorkflowContinuationSecurity,readWorkflowContinuationSecurity};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { ModelMessage } from "ai";
|
|
2
|
-
import type { HarnessSession, SessionStateMap } from "#harness/types.js";
|
|
3
|
-
import type { WorkflowSandboxInterrupt } from "#shared/workflow-sandbox.js";
|
|
4
|
-
export interface PendingWorkflowInterrupt {
|
|
5
|
-
readonly interrupt: WorkflowSandboxInterrupt;
|
|
6
|
-
readonly responseMessages: readonly ModelMessage[];
|
|
7
|
-
readonly usedCalls: number;
|
|
8
|
-
}
|
|
9
|
-
export declare function getPendingWorkflowInterrupt(state: SessionStateMap | undefined): PendingWorkflowInterrupt | undefined;
|
|
10
|
-
export declare function setPendingWorkflowInterrupt(input: {
|
|
11
|
-
readonly interrupt: WorkflowSandboxInterrupt;
|
|
12
|
-
readonly responseMessages: readonly ModelMessage[];
|
|
13
|
-
readonly session: HarnessSession;
|
|
14
|
-
readonly usedCalls: number;
|
|
15
|
-
}): HarnessSession;
|
|
16
|
-
export declare function setPendingWorkflowUsedCalls(input: {
|
|
17
|
-
readonly session: HarnessSession;
|
|
18
|
-
readonly usedCalls: number;
|
|
19
|
-
}): HarnessSession;
|
|
20
|
-
export declare function clearPendingWorkflowInterrupt(session: HarnessSession): HarnessSession;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{WORKFLOW_TASK_INTERRUPT_KIND}from"#harness/workflow-task-state.js";const PENDING_KEY=`eve.harness.pendingWorkflowInterrupt`;function getPendingWorkflowInterrupt(e){let t=e?.[PENDING_KEY];if(isRecord(t)&&isWorkflowInterruptShape(t.interrupt)&&Array.isArray(t.responseMessages)&&!(!Number.isSafeInteger(t.usedCalls)||t.usedCalls<0))return{interrupt:t.interrupt,responseMessages:t.responseMessages,usedCalls:t.usedCalls}}function setPendingWorkflowInterrupt(e){return{...e.session,state:{...e.session.state,[PENDING_KEY]:{interrupt:e.interrupt,responseMessages:e.responseMessages,usedCalls:e.usedCalls}}}}function setPendingWorkflowUsedCalls(e){let t=getPendingWorkflowInterrupt(e.session.state);return t===void 0?e.session:setPendingWorkflowInterrupt({...t,session:e.session,usedCalls:e.usedCalls})}function clearPendingWorkflowInterrupt(e){if(e.state?.[PENDING_KEY]===void 0)return e;let t={...e.state};return delete t[PENDING_KEY],{...e,state:Object.keys(t).length>0?t:void 0}}function isWorkflowInterruptShape(e){return isRecord(e)&&e.type===`code-mode-interrupt`&&typeof e.interruptId==`string`&&typeof e.outerToolCallId==`string`&&isRecord(e.payload)&&e.payload.kind===WORKFLOW_TASK_INTERRUPT_KIND&&isRecord(e.continuation)&&e.continuation.version===2&&typeof e.continuation.outerToolCallId==`string`&&Array.isArray(e.continuation.pendingInterruptions)&&Array.isArray(e.continuation.resolutions)}function isRecord(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}export{clearPendingWorkflowInterrupt,getPendingWorkflowInterrupt,setPendingWorkflowInterrupt,setPendingWorkflowUsedCalls};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { HarnessEmissionState } from "#harness/emission.js";
|
|
2
|
-
import type { HarnessEmitFn, HarnessToolMap } from "#harness/types.js";
|
|
3
|
-
import type { WorkflowSandboxInterrupt } from "#shared/workflow-sandbox.js";
|
|
4
|
-
export declare function createWorkflowLifecycle(input: {
|
|
5
|
-
readonly emit: EmitWorkflowLifecycleEvent;
|
|
6
|
-
readonly emissionState: HarnessEmissionState;
|
|
7
|
-
readonly skipReplayed?: boolean;
|
|
8
|
-
readonly tools: HarnessToolMap;
|
|
9
|
-
}): {
|
|
10
|
-
onAfterExecute?: (input: {
|
|
11
|
-
readonly result: unknown;
|
|
12
|
-
}) => Promise<void>;
|
|
13
|
-
};
|
|
14
|
-
type EmitWorkflowLifecycleEvent = HarnessEmitFn;
|
|
15
|
-
/** Projects newly parked workflow calls onto eve's existing action stream. */
|
|
16
|
-
export declare function emitWorkflowActionsRequested(input: {
|
|
17
|
-
readonly emit: EmitWorkflowLifecycleEvent;
|
|
18
|
-
readonly emissionState: HarnessEmissionState;
|
|
19
|
-
readonly interrupts: readonly WorkflowSandboxInterrupt[];
|
|
20
|
-
readonly tools: HarnessToolMap;
|
|
21
|
-
}): Promise<void>;
|
|
22
|
-
/** Projects completed workflow children before replaying their continuation. */
|
|
23
|
-
export declare function emitWorkflowActionResults(input: {
|
|
24
|
-
readonly emit: EmitWorkflowLifecycleEvent;
|
|
25
|
-
readonly emissionState: HarnessEmissionState;
|
|
26
|
-
readonly interrupts: readonly WorkflowSandboxInterrupt[];
|
|
27
|
-
readonly results: readonly {
|
|
28
|
-
readonly isError?: boolean;
|
|
29
|
-
readonly output?: unknown;
|
|
30
|
-
}[];
|
|
31
|
-
}): Promise<void>;
|
|
32
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createActionResultEvent,createActionsRequestedEvent}from"#protocol/message.js";import{collectActionPresentation,createPresentedRuntimeActionRequestFromToolCall}from"#harness/action-presentation.js";import{createRuntimeToolResultFromValue}from"#harness/action-result-helpers.js";import{getWorkflowSandboxInterrupt}from"#shared/workflow-sandbox.js";function createWorkflowLifecycle(e){return{async onAfterExecute(t){if(e.skipReplayed)return;let n=await getWorkflowSandboxInterrupt(t.result,{});n!==void 0&&await emitWorkflowActionsRequested({emit:e.emit,emissionState:e.emissionState,interrupts:[n],tools:e.tools})}}}async function emitWorkflowActionsRequested(e){for(let t of e.interrupts){let n={input:t.input,toolCallId:t.toolCallId,toolName:t.toolName,type:`tool-call`},r=createPresentedRuntimeActionRequestFromToolCall({toolCall:n,tools:e.tools});await e.emit(createActionsRequestedEvent({actions:[r.action],presentation:collectActionPresentation([r]),sequence:e.emissionState.sequence,stepIndex:e.emissionState.stepIndex,turnId:e.emissionState.turnId}))}}async function emitWorkflowActionResults(e){for(let[t,n]of e.results.entries()){let r=e.interrupts[t];if(r===void 0)break;await e.emit(createActionResultEvent({result:createRuntimeToolResultFromValue({callId:r.toolCallId,isError:n.isError,output:n.output,toolName:r.toolName}),sequence:e.emissionState.sequence,stepIndex:e.emissionState.stepIndex,turnId:e.emissionState.turnId}))}}export{createWorkflowLifecycle,emitWorkflowActionResults,emitWorkflowActionsRequested};
|