eve 1.0.0 → 1.0.2
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 +5 -375
- package/README.md +5 -1
- package/dist/src/channel/auth/oidc.js +1 -1
- package/dist/src/channel/channel-address.d.ts +13 -2
- package/dist/src/channel/channel-address.js +1 -1
- package/dist/src/cli/commands/init-git.js +1 -1
- package/dist/src/cli/commands/init-onboarding.js +1 -0
- package/dist/src/cli/commands/init.js +2 -1
- package/dist/src/cli/commands/registry-setup-command.js +1 -1
- package/dist/src/cli/dev/command-options.js +1 -1
- package/dist/src/cli/dev/command.js +1 -1
- package/dist/src/cli/dev/run-interactive-ui.js +1 -1
- package/dist/src/cli/dev/tui/message-queue.js +2 -2
- package/dist/src/cli/dev/tui/prompt-command-handler.js +1 -1
- package/dist/src/cli/dev/tui/run-setup-flow-command.js +1 -0
- package/dist/src/cli/dev/tui/runner.js +3 -3
- package/dist/src/cli/dev/tui/setup-commands.js +1 -1
- package/dist/src/cli/dev/tui/setup-panel.js +1 -1
- package/dist/src/cli/dev/tui/startup-onboarding.js +1 -0
- package/dist/src/cli/dev/tui/startup.js +1 -1
- package/dist/src/cli/dev/tui/terminal-renderer.js +10 -10
- package/dist/src/cli/dev/tui/test/mock-terminal.js +4 -4
- package/dist/src/cli/dev/tui/tui.js +1 -1
- package/dist/src/cli/run.js +1 -1
- package/dist/src/cli/ui/live-region.js +1 -1
- package/dist/src/cli/ui/live-row.js +1 -1
- package/dist/src/compiled/.vendor-stamp.json +17 -5
- package/dist/src/compiled/@ai-sdk/anthropic/index.js +2 -2
- package/dist/src/compiled/@ai-sdk/google/index.js +6 -6
- package/dist/src/compiled/@ai-sdk/mcp/index.js +1 -1
- package/dist/src/compiled/@ai-sdk/openai/index.js +4 -4
- package/dist/src/compiled/@ai-sdk/otel/index.js +3 -3
- package/dist/src/compiled/@ai-sdk/provider/index.js +1 -1
- package/dist/src/compiled/@chat-adapter/slack/index.js +46 -51
- package/dist/src/compiled/@eve/catalog/index.js +1 -1
- package/dist/src/compiled/@opentelemetry/api/index.js +1 -1
- package/dist/src/compiled/@opentelemetry/otlp-transformer/index.js +1 -1
- package/dist/src/compiled/@photon-ai/chat-adapter-imessage/index.js +61 -155
- package/dist/src/compiled/@vercel/agent-runs/delegation.js +1 -1
- package/dist/src/compiled/@vercel/agent-runs/index.js +1 -1
- package/dist/src/compiled/@vercel/agent-runs/otel.js +1 -1
- package/dist/src/compiled/@vercel/blob/index.js +11 -36
- package/dist/src/compiled/@vercel/connect/index.js +1 -63
- package/dist/src/compiled/@vercel/oidc/index.js +1 -63
- package/dist/src/compiled/@vercel/otel/index.js +1 -1
- package/dist/src/compiled/@vercel/queue/index.js +12 -43
- package/dist/src/compiled/@vercel/sandbox/index.js +13 -114
- package/dist/src/compiled/@vercel/schedules/index.js +2 -27
- package/dist/src/compiled/@workflow/core/index.js +1 -1
- package/dist/src/compiled/@workflow/core/private.js +1 -1
- package/dist/src/compiled/@workflow/core/runtime/helpers.js +1 -1
- package/dist/src/compiled/@workflow/core/runtime.js +1 -1
- package/dist/src/compiled/@workflow/core/serialization.js +1 -1
- package/dist/src/compiled/@workflow/core/workflow.js +1 -1
- package/dist/src/compiled/@workflow/world/index.js +1 -1
- package/dist/src/compiled/@workflow/world-local/index.js +6 -6
- package/dist/src/compiled/@workflow/world-vercel/index.js +36 -1
- package/dist/src/compiled/_chunks/{workflow/attribute-changes-BCNqKjr-.js → node/attribute-changes-9TDYamoB.js} +2 -2
- package/dist/src/compiled/_chunks/node/{auth-VDi2758t.js → auth-C6x8BkZ1.js} +2 -2
- package/dist/src/compiled/_chunks/node/chunk-5MU5Z6L3-DdGH_80b.js +1 -0
- package/dist/src/compiled/_chunks/node/chunk-WVKEO4WS-CcXj6Pbu.js +1 -0
- package/dist/src/compiled/_chunks/node/cjs-rUgqAJxb.js +1 -0
- package/dist/src/compiled/_chunks/node/delegation-nXIIGof2.js +1 -0
- package/dist/src/compiled/_chunks/node/delivery-ZirLueQB.js +1 -0
- package/dist/src/compiled/_chunks/node/dist-Ar8FFwah.js +1 -0
- package/dist/src/compiled/_chunks/node/dist-BlVGA8Bc.js +2 -0
- package/dist/src/compiled/_chunks/{workflow/dist-DkHcYt13.js → node/dist-C-W-BUim.js} +4 -4
- package/dist/src/compiled/_chunks/node/dist-CJqVJRdy.js +1 -0
- package/dist/src/compiled/_chunks/node/dist-Dff3FJd4.js +2 -0
- package/dist/src/compiled/_chunks/node/dist-SjWKZevK.js +1 -0
- package/dist/src/compiled/_chunks/node/dist-Y7k9L0_i.js +4 -0
- package/dist/src/compiled/_chunks/node/esm-BQbQSdEk.js +1 -0
- package/dist/src/compiled/_chunks/node/esm-V84xqwqm.js +7 -0
- package/dist/src/compiled/_chunks/{workflow/experimental-extraction-BE-Zv-lu.js → node/experimental-extraction-BddLppMC.js} +2 -2
- package/dist/src/compiled/_chunks/node/functions-CrSNYLMQ.js +2 -0
- package/dist/src/compiled/_chunks/{workflow/getMachineId-bsd-BDZRITBA-ByMis12M.js → node/getMachineId-bsd-BDZRITBA-DLL53RiE.js} +1 -1
- package/dist/src/compiled/_chunks/{workflow/getMachineId-darwin-YASTVJY7-BVAknd8k.js → node/getMachineId-darwin-YASTVJY7-Bt7YOVRS.js} +1 -1
- package/dist/src/compiled/_chunks/node/getMachineId-linux-NDQO5XIJ-35soE6HM.js +1 -0
- package/dist/src/compiled/_chunks/node/getMachineId-unsupported-4HKOBEHB-BIvYzL3H.js +1 -0
- package/dist/src/compiled/_chunks/{workflow/getMachineId-win-5LM2K5X3-Cj6CA3It.js → node/getMachineId-win-5LM2K5X3-DjHieqnK.js} +1 -1
- package/dist/src/compiled/_chunks/{workflow/helpers-D1eianSs.js → node/helpers-D0wk1DpF.js} +2 -2
- package/dist/src/compiled/_chunks/node/lib-kYMsDr_I.js +1 -0
- package/dist/src/compiled/_chunks/node/mcp-CpcK9m5J.js +5 -0
- package/dist/src/compiled/_chunks/node/ms-Cgt_-jny.js +1 -0
- package/dist/src/compiled/_chunks/node/node-http-BJoNWVEH.js +1 -0
- package/dist/src/compiled/_chunks/node/picocolors-BvkTgkT5.js +1 -0
- package/dist/src/compiled/_chunks/node/resume-hook-HOi86Mpt.js +1 -0
- package/dist/src/compiled/_chunks/node/resume-hook-MNXqhfUQ.js +1 -0
- package/dist/src/compiled/_chunks/node/retry-BsKFOQYI.js +1 -0
- package/dist/src/compiled/_chunks/node/run-iZaWiaIW.js +34 -0
- package/dist/src/compiled/_chunks/node/serialization-SOBM-hqQ.js +12 -0
- package/dist/src/compiled/_chunks/{workflow/signal-exit-fprSURbq.js → node/signal-exit-DUUCjAID.js} +1 -1
- package/dist/src/compiled/_chunks/node/sleep-kn6Idr6A.js +1 -0
- package/dist/src/compiled/_chunks/node/suspension-hooks-DGVf4ZTu.js +3 -0
- package/dist/src/compiled/_chunks/node/time-DlDfzITA.js +1 -0
- package/dist/src/compiled/_chunks/node/token-Bx_BK6UD.js +1 -0
- package/dist/src/compiled/_chunks/node/{token-DGjjdToG.js → token-C3MqBzSe.js} +1 -1
- package/dist/src/compiled/_chunks/node/token-C8MvBi8U.js +1 -0
- package/dist/src/compiled/_chunks/node/token-DCqq5r4M.js +1 -0
- package/dist/src/compiled/_chunks/node/token-d3oeMwv2.js +1 -0
- package/dist/src/compiled/_chunks/node/token-util-5HFX0QsS.js +1 -0
- package/dist/src/compiled/_chunks/node/token-util-B-3umg_h.js +59 -0
- package/dist/src/compiled/_chunks/node/token-util-BdFM23p-.js +1 -0
- package/dist/src/compiled/_chunks/node/token-util-Bga2H4s7.js +1 -0
- package/dist/src/compiled/_chunks/node/token-util-C53yPU2Q.js +1 -0
- package/dist/src/compiled/_chunks/node/token-util-CMdCnQTY.js +1 -0
- package/dist/src/compiled/_chunks/node/token-util-DRfyDqhP.js +59 -0
- package/dist/src/compiled/_chunks/node/token-util-DdfuyqVB.js +1 -0
- package/dist/src/compiled/_chunks/node/token-util-S816eCve.js +22 -0
- package/dist/src/compiled/_chunks/node/token-util-hJVPA0w0.js +22 -0
- package/dist/src/compiled/_chunks/node/undici-CXX9Qrag.js +95 -0
- package/dist/src/compiled/_chunks/node/websocket-server-Usb_vYYJ.js +6 -0
- package/dist/src/compiled/_chunks/node/wrapper-B8sMmFpP.js +1 -0
- package/dist/src/compiled/_chunks/node/wrapper-DTBQ2yNI.js +1 -0
- package/dist/src/compiled/_chunks/node/ws-transport-BWQwR7zD.js +1 -0
- package/dist/src/compiled/_chunks/node/ws-transport-Dah44MMA.js +3 -0
- package/dist/src/compiled/jose/index.js +1 -1
- package/dist/src/eve-channel/request.js +1 -1
- package/dist/src/execution/dynamic-workflow/tool.js +1 -1
- package/dist/src/execution/session-inbox/handle.js +1 -1
- package/dist/src/execution/session-inbox/owner.js +1 -1
- package/dist/src/execution/session-inbox/resume.js +1 -1
- package/dist/src/execution/tools/agent-router-workflow.js +1 -1
- package/dist/src/harness/provider-tools.js +1 -1
- package/dist/src/harness/step/prompt.js +1 -1
- package/dist/src/instrumentation/decide.js +1 -1
- package/dist/src/instrumentation/dispatch.js +1 -1
- package/dist/src/instrumentation/lifecycle.d.ts +10 -1
- package/dist/src/instrumentation/runtime.js +1 -1
- package/dist/src/internal/application/stamped-package-version.js +1 -1
- package/dist/src/public/channels/slack/attachments.js +1 -1
- package/dist/src/public/channels/slack/connections.js +1 -1
- package/dist/src/public/channels/slack/renderers.d.ts +4 -2
- package/dist/src/public/channels/slack/slackChannel.js +1 -1
- package/dist/src/runtime/subagents/workflow.js +1 -1
- package/dist/src/setup/primitives/pm/npm.js +1 -1
- package/dist/src/setup/primitives/pm/run.js +1 -1
- package/dist/src/setup/registry-setup-client.js +2 -2
- package/dist/src/setup/registry-setup-protocol.js +1 -1
- package/dist/src/setup/scaffold/create/project.js +1 -1
- package/dist/src/setup/scaffold/update/channels.js +1 -1
- package/dist/src/shared/forwarded-trace-policy.d.ts +2 -0
- package/dist/src/shared/forwarded-trace-policy.js +1 -1
- package/dist/src/tools/provided/ask-question-workflow.js +1 -1
- package/dist/src/tools/provided/sleep-workflow.js +1 -1
- package/dist/src/tools/provided/web-search.d.ts +2 -2
- package/dist/src/tools/provided/web-search.js +1 -1
- package/docs/channels/slack/reference.mdx +1 -1
- package/docs/concepts/built-in-tools.md +3 -3
- package/docs/getting-started.mdx +5 -1
- package/docs/guides/client/index.mdx +1 -1
- package/docs/reference/typescript-api.md +1 -1
- package/package.json +3 -7
- package/dist/src/acp/adapter.d.ts +0 -28
- package/dist/src/acp/line-limit.d.ts +0 -3
- package/dist/src/acp/server.d.ts +0 -21
- package/dist/src/ai/decision-adapter.d.ts +0 -15
- package/dist/src/approval/agent.d.ts +0 -24
- package/dist/src/approval/requester-only.d.ts +0 -11
- package/dist/src/channel/adapter-context.d.ts +0 -9
- package/dist/src/channel/auth/http-basic.d.ts +0 -8
- package/dist/src/channel/auth/jwt-ecdsa.d.ts +0 -8
- package/dist/src/channel/auth/jwt-hmac.d.ts +0 -8
- package/dist/src/channel/auth/oidc.d.ts +0 -8
- package/dist/src/channel/auth/result.d.ts +0 -3
- package/dist/src/channel/auth/token-claims.d.ts +0 -17
- package/dist/src/channel/auth/types.d.ts +0 -108
- package/dist/src/channel/auth/vercel-oidc-project.d.ts +0 -12
- package/dist/src/channel/conversation-context.d.ts +0 -8
- package/dist/src/channel/delivery-idempotency.d.ts +0 -10
- package/dist/src/channel/delivery.d.ts +0 -8
- package/dist/src/channel/http.d.ts +0 -29
- package/dist/src/channel/inactive-prompt.d.ts +0 -46
- package/dist/src/channel/pending-authorization.d.ts +0 -4
- package/dist/src/channel/principal-identity.d.ts +0 -11
- package/dist/src/channel/relay-event.d.ts +0 -11
- package/dist/src/channel/resolved-prompt.d.ts +0 -22
- package/dist/src/channel/route-args.d.ts +0 -35
- package/dist/src/channel/schedule.d.ts +0 -78
- package/dist/src/channel/send-input.d.ts +0 -10
- package/dist/src/channel/session-callback.d.ts +0 -11
- package/dist/src/channel/tool-eligibility.d.ts +0 -38
- package/dist/src/cli/acp/command.d.ts +0 -24
- package/dist/src/cli/agent-command.d.ts +0 -6
- package/dist/src/cli/agent-detection.d.ts +0 -7
- package/dist/src/cli/application-command.d.ts +0 -13
- package/dist/src/cli/application-root.d.ts +0 -5
- package/dist/src/cli/banner.d.ts +0 -11
- package/dist/src/cli/commands/agent-instructions.d.ts +0 -34
- package/dist/src/cli/commands/build.d.ts +0 -15
- package/dist/src/cli/commands/deploy.d.ts +0 -27
- package/dist/src/cli/commands/extension-build.d.ts +0 -9
- package/dist/src/cli/commands/extension-init.d.ts +0 -26
- package/dist/src/cli/commands/info.d.ts +0 -68
- package/dist/src/cli/commands/init-agent-workspace.d.ts +0 -18
- package/dist/src/cli/commands/init-git.d.ts +0 -17
- package/dist/src/cli/commands/init-install.d.ts +0 -11
- package/dist/src/cli/commands/init-project.d.ts +0 -44
- package/dist/src/cli/commands/init-recovery.d.ts +0 -3
- package/dist/src/cli/commands/init-target.d.ts +0 -20
- package/dist/src/cli/commands/init-telemetry.d.ts +0 -7
- package/dist/src/cli/commands/init.d.ts +0 -28
- package/dist/src/cli/commands/integration-connect.d.ts +0 -35
- package/dist/src/cli/commands/integration-setup.d.ts +0 -18
- package/dist/src/cli/commands/link.d.ts +0 -25
- package/dist/src/cli/commands/logs-events.d.ts +0 -38
- package/dist/src/cli/commands/logs.d.ts +0 -64
- package/dist/src/cli/commands/preconditions.d.ts +0 -22
- package/dist/src/cli/commands/register-integration-commands.d.ts +0 -15
- package/dist/src/cli/commands/register-project-commands.d.ts +0 -13
- package/dist/src/cli/commands/register-registry-commands.d.ts +0 -13
- package/dist/src/cli/commands/registry-add-command.d.ts +0 -3
- package/dist/src/cli/commands/registry-declared-setups.d.ts +0 -43
- package/dist/src/cli/commands/registry-install-transaction.d.ts +0 -10
- package/dist/src/cli/commands/registry-metadata.d.ts +0 -99
- package/dist/src/cli/commands/registry-pnpm-build-policy-flow.d.ts +0 -30
- package/dist/src/cli/commands/registry-presentation.d.ts +0 -19
- package/dist/src/cli/commands/registry-project.d.ts +0 -23
- package/dist/src/cli/commands/registry-recovery.d.ts +0 -20
- package/dist/src/cli/commands/registry-setup-command.d.ts +0 -21
- package/dist/src/cli/commands/registry.d.ts +0 -98
- package/dist/src/cli/commands/set.d.ts +0 -18
- package/dist/src/cli/commands/setup-answers.d.ts +0 -2
- package/dist/src/cli/commands/setup-headless.d.ts +0 -97
- package/dist/src/cli/commands/trace-detail.d.ts +0 -34
- package/dist/src/cli/commands/trace.d.ts +0 -18
- package/dist/src/cli/commands/vercel-non-interactive.d.ts +0 -37
- package/dist/src/cli/dev/boot-progress.d.ts +0 -3
- package/dist/src/cli/dev/command-options.d.ts +0 -27
- package/dist/src/cli/dev/command.d.ts +0 -34
- package/dist/src/cli/dev/console-records-preload.d.ts +0 -1
- package/dist/src/cli/dev/console-records.d.ts +0 -17
- package/dist/src/cli/dev/diagnostic-dump.d.ts +0 -58
- package/dist/src/cli/dev/diagnostic-sink.d.ts +0 -39
- package/dist/src/cli/dev/diagnostics.d.ts +0 -42
- package/dist/src/cli/dev/environment.d.ts +0 -20
- package/dist/src/cli/dev/local-server-child.d.ts +0 -1
- package/dist/src/cli/dev/local-server-cleanup.d.ts +0 -5
- package/dist/src/cli/dev/local-server-process.d.ts +0 -35
- package/dist/src/cli/dev/remote-print.d.ts +0 -8
- package/dist/src/cli/dev/run-interactive-ui.d.ts +0 -22
- package/dist/src/cli/dev/tui/agent-header.d.ts +0 -15
- package/dist/src/cli/dev/tui/argument-typeahead.d.ts +0 -36
- package/dist/src/cli/dev/tui/blocks.d.ts +0 -148
- package/dist/src/cli/dev/tui/clipboard.d.ts +0 -17
- package/dist/src/cli/dev/tui/command-typeahead.d.ts +0 -54
- package/dist/src/cli/dev/tui/conversation-view.d.ts +0 -59
- package/dist/src/cli/dev/tui/dev-rebuild-status.d.ts +0 -22
- package/dist/src/cli/dev/tui/diagnostic-presentation.d.ts +0 -17
- package/dist/src/cli/dev/tui/errors.d.ts +0 -14
- package/dist/src/cli/dev/tui/file-content-cache.d.ts +0 -41
- package/dist/src/cli/dev/tui/flow-drawer.d.ts +0 -15
- package/dist/src/cli/dev/tui/line-diff.d.ts +0 -24
- package/dist/src/cli/dev/tui/line-editor.d.ts +0 -124
- package/dist/src/cli/dev/tui/log-display-mode.d.ts +0 -7
- package/dist/src/cli/dev/tui/markdown.d.ts +0 -14
- package/dist/src/cli/dev/tui/mcp-connection-status.d.ts +0 -20
- package/dist/src/cli/dev/tui/message-queue.d.ts +0 -33
- package/dist/src/cli/dev/tui/prompt-command-handler.d.ts +0 -18
- package/dist/src/cli/dev/tui/prompt-commands.d.ts +0 -266
- package/dist/src/cli/dev/tui/prompt-placeholder.d.ts +0 -2
- package/dist/src/cli/dev/tui/provider-picker.d.ts +0 -65
- package/dist/src/cli/dev/tui/question-panel.d.ts +0 -31
- package/dist/src/cli/dev/tui/rail.d.ts +0 -15
- package/dist/src/cli/dev/tui/registry-result-message.d.ts +0 -27
- package/dist/src/cli/dev/tui/remote-auth-result.d.ts +0 -26
- package/dist/src/cli/dev/tui/remote-auth.d.ts +0 -33
- package/dist/src/cli/dev/tui/remote-connection-probe.d.ts +0 -12
- package/dist/src/cli/dev/tui/remote-connection-types.d.ts +0 -69
- package/dist/src/cli/dev/tui/remote-connection.d.ts +0 -3
- package/dist/src/cli/dev/tui/remote-startup.d.ts +0 -10
- package/dist/src/cli/dev/tui/runner.d.ts +0 -322
- package/dist/src/cli/dev/tui/setup-commands.d.ts +0 -72
- package/dist/src/cli/dev/tui/setup-flow.d.ts +0 -133
- package/dist/src/cli/dev/tui/setup-issues.d.ts +0 -66
- package/dist/src/cli/dev/tui/setup-panel.d.ts +0 -182
- package/dist/src/cli/dev/tui/setup-selection-input.d.ts +0 -52
- package/dist/src/cli/dev/tui/startup.d.ts +0 -20
- package/dist/src/cli/dev/tui/status-line.d.ts +0 -39
- package/dist/src/cli/dev/tui/stranded-session.d.ts +0 -9
- package/dist/src/cli/dev/tui/stream-format.d.ts +0 -158
- package/dist/src/cli/dev/tui/target.d.ts +0 -11
- package/dist/src/cli/dev/tui/task-activity.d.ts +0 -42
- package/dist/src/cli/dev/tui/task-records.d.ts +0 -17
- package/dist/src/cli/dev/tui/terminal-background.d.ts +0 -23
- package/dist/src/cli/dev/tui/terminal-renderer.d.ts +0 -148
- package/dist/src/cli/dev/tui/terminal-tool-part.d.ts +0 -2
- package/dist/src/cli/dev/tui/test/fake-eve-server.d.ts +0 -34
- package/dist/src/cli/dev/tui/test/fake-setup-flow-renderer.d.ts +0 -2
- package/dist/src/cli/dev/tui/test/index.d.ts +0 -15
- package/dist/src/cli/dev/tui/test/mock-terminal.d.ts +0 -51
- package/dist/src/cli/dev/tui/theme.d.ts +0 -127
- package/dist/src/cli/dev/tui/tool-block-groups.d.ts +0 -38
- package/dist/src/cli/dev/tui/tool-format.d.ts +0 -31
- package/dist/src/cli/dev/tui/tool-presentation.d.ts +0 -95
- package/dist/src/cli/dev/tui/tool-rows.d.ts +0 -16
- package/dist/src/cli/dev/tui/traces/trace-content.d.ts +0 -24
- package/dist/src/cli/dev/tui/traces/trace-conversation.d.ts +0 -61
- package/dist/src/cli/dev/tui/traces/trace-store.d.ts +0 -27
- package/dist/src/cli/dev/tui/traces/trace-surfaces.d.ts +0 -40
- package/dist/src/cli/dev/tui/traces/trace-view.d.ts +0 -56
- package/dist/src/cli/dev/tui/traces/trace-viewer-session.d.ts +0 -55
- package/dist/src/cli/dev/tui/traces/trace-viewer-state.d.ts +0 -109
- package/dist/src/cli/dev/tui/transcript-parts.d.ts +0 -85
- package/dist/src/cli/dev/tui/transcript.d.ts +0 -43
- package/dist/src/cli/dev/tui/tui-prompter.d.ts +0 -20
- package/dist/src/cli/dev/tui/tui.d.ts +0 -37
- package/dist/src/cli/dev/tui/turn-clock.d.ts +0 -21
- package/dist/src/cli/dev/tui/types.d.ts +0 -70
- package/dist/src/cli/dev/tui/vercel-status.d.ts +0 -44
- package/dist/src/cli/dev/tui/vercel-trusted-sources-policy.d.ts +0 -22
- package/dist/src/cli/dev/tui/vercel-trusted-sources.d.ts +0 -48
- package/dist/src/cli/dev/ui-options.d.ts +0 -22
- package/dist/src/cli/dev/url-target.d.ts +0 -15
- package/dist/src/cli/dev/url.d.ts +0 -4
- package/dist/src/cli/dev/wait-for-ui.d.ts +0 -13
- package/dist/src/cli/format-elapsed.d.ts +0 -2
- package/dist/src/cli/option-parsers.d.ts +0 -17
- package/dist/src/cli/run.d.ts +0 -38
- package/dist/src/cli/shutdown.d.ts +0 -25
- package/dist/src/cli/telemetry/command.d.ts +0 -9
- package/dist/src/cli/telemetry/flush.d.ts +0 -2
- package/dist/src/cli/telemetry/identity.d.ts +0 -13
- package/dist/src/cli/telemetry/index.d.ts +0 -37
- package/dist/src/cli/telemetry/preference.d.ts +0 -10
- package/dist/src/cli/ui/alt-screen.d.ts +0 -49
- package/dist/src/cli/ui/live-region.d.ts +0 -63
- package/dist/src/cli/ui/live-row.d.ts +0 -22
- package/dist/src/cli/ui/output.d.ts +0 -48
- package/dist/src/cli/ui/progress-pulse.d.ts +0 -10
- package/dist/src/cli/ui/terminal-text.d.ts +0 -36
- package/dist/src/cli/vercel-service-output.d.ts +0 -4
- package/dist/src/client/abort-signal.d.ts +0 -2
- package/dist/src/client/agent-base-url.d.ts +0 -4
- package/dist/src/client/agent-info-schema.d.ts +0 -1356
- package/dist/src/client/agent-stream-follower.d.ts +0 -17
- package/dist/src/client/conversation-client.d.ts +0 -51
- package/dist/src/client/delivery-events.d.ts +0 -3
- package/dist/src/client/file-parts.d.ts +0 -23
- package/dist/src/client/health-schema.d.ts +0 -7
- package/dist/src/client/messages.d.ts +0 -30
- package/dist/src/client/ndjson.d.ts +0 -18
- package/dist/src/client/open-stream.d.ts +0 -96
- package/dist/src/client/optimistic-message-submissions.d.ts +0 -15
- package/dist/src/client/session-controls.d.ts +0 -34
- package/dist/src/client/session-event-stream.d.ts +0 -19
- package/dist/src/client/session-store-helpers.d.ts +0 -8
- package/dist/src/client/stream-version.d.ts +0 -5
- package/dist/src/client/url.d.ts +0 -13
- package/dist/src/compiled/@agentclientprotocol/sdk/core/app-handlers.d.ts +0 -28
- package/dist/src/compiled/@agentclientprotocol/sdk/core/connection-access.d.ts +0 -23
- package/dist/src/compiled/@agentclientprotocol/sdk/core/jsonrpc.d.ts +0 -576
- package/dist/src/compiled/@agentclientprotocol/sdk/core/stream-limits.d.ts +0 -15
- package/dist/src/compiled/@agentclientprotocol/sdk/core/stream.d.ts +0 -33
- package/dist/src/compiled/@agentclientprotocol/sdk/index.d.ts +0 -1
- package/dist/src/compiled/@agentclientprotocol/sdk/transports/connection.d.ts +0 -273
- package/dist/src/compiled/@agentclientprotocol/sdk/v1/schema/guards.gen.d.ts +0 -183
- package/dist/src/compiled/@agentclientprotocol/sdk/v1/schema/index.d.ts +0 -33
- package/dist/src/compiled/@agentclientprotocol/sdk/v1/schema/types.gen.d.ts +0 -4093
- package/dist/src/compiled/@agentclientprotocol/sdk/v1/stable/acp.d.ts +0 -812
- package/dist/src/compiled/@ai-sdk/anthropic/index.d.ts +0 -1891
- package/dist/src/compiled/@ai-sdk/google/index.d.ts +0 -961
- package/dist/src/compiled/@ai-sdk/mcp/index.d.ts +0 -1439
- package/dist/src/compiled/@ai-sdk/openai/index.d.ts +0 -2196
- package/dist/src/compiled/@ai-sdk/otel/index.d.ts +0 -1059
- package/dist/src/compiled/@ai-sdk/provider/index.d.ts +0 -9624
- package/dist/src/compiled/@ai-sdk/provider-utils/index.d.ts +0 -3364
- package/dist/src/compiled/@cfworker/json-schema/index.d.ts +0 -18
- package/dist/src/compiled/@chat-adapter/slack/_chat-adapter-shared.d.ts +0 -10
- package/dist/src/compiled/@chat-adapter/slack/_slack-web-api.d.ts +0 -8
- package/dist/src/compiled/@chat-adapter/slack/blocks.d.ts +0 -205
- package/dist/src/compiled/@chat-adapter/slack/format.d.ts +0 -33
- package/dist/src/compiled/@chat-adapter/slack/index.d.ts +0 -1437
- package/dist/src/compiled/@chat-adapter/state-memory/index.d.ts +0 -50
- package/dist/src/compiled/@chat-adapter/twilio/format.d.ts +0 -12
- package/dist/src/compiled/@chat-adapter/twilio/index.d.ts +0 -166
- package/dist/src/compiled/@clack/core/index.d.ts +0 -505
- package/dist/src/compiled/@modelcontextprotocol/server/index.d.ts +0 -180
- package/dist/src/compiled/@opentelemetry/otlp-transformer/index.d.ts +0 -3
- package/dist/src/compiled/@vercel/agent-runs/adapters/agent-transport.d.ts +0 -8
- package/dist/src/compiled/@vercel/agent-runs/adapters/ai-sdk-payload.d.ts +0 -15
- package/dist/src/compiled/@vercel/agent-runs/adapters/ai-sdk-telemetry.d.ts +0 -14
- package/dist/src/compiled/@vercel/agent-runs/adapters/otel-error.d.ts +0 -3
- package/dist/src/compiled/@vercel/agent-runs/adapters/serialization.d.ts +0 -36
- package/dist/src/compiled/@vercel/agent-runs/ai-sdk.d.ts +0 -7
- package/dist/src/compiled/@vercel/agent-runs/core/activation.d.ts +0 -3
- package/dist/src/compiled/@vercel/agent-runs/core/attributes.d.ts +0 -14
- package/dist/src/compiled/@vercel/agent-runs/core/content-policy.d.ts +0 -36
- package/dist/src/compiled/@vercel/agent-runs/core/context.d.ts +0 -3
- package/dist/src/compiled/@vercel/agent-runs/core/delegation.d.ts +0 -13
- package/dist/src/compiled/@vercel/agent-runs/core/snapshot.d.ts +0 -7
- package/dist/src/compiled/@vercel/agent-runs/core/span-kinds.d.ts +0 -12
- package/dist/src/compiled/@vercel/agent-runs/core/writer.d.ts +0 -15
- package/dist/src/compiled/@vercel/agent-runs/delegation.d.ts +0 -2
- package/dist/src/compiled/@vercel/agent-runs/otel.d.ts +0 -12
- package/dist/src/compiled/@vercel/blob/client.d.ts +0 -488
- package/dist/src/compiled/@vercel/blob/create-folder-DoYODb65.d.ts +0 -487
- package/dist/src/compiled/@vercel/blob/index.d.ts +0 -633
- package/dist/src/compiled/@vercel/connect/authorization-details.d.ts +0 -11
- package/dist/src/compiled/@vercel/connect/authorization.d.ts +0 -47
- package/dist/src/compiled/@vercel/connect/connector.d.ts +0 -32
- package/dist/src/compiled/@vercel/connect/index.d.ts +0 -5
- package/dist/src/compiled/@vercel/connect/installation.d.ts +0 -48
- package/dist/src/compiled/@vercel/connect/token.d.ts +0 -147
- package/dist/src/compiled/@vercel/detect-agent/index.d.ts +0 -20
- package/dist/src/compiled/@vercel/oidc/index.d.ts +0 -21
- package/dist/src/compiled/@vercel/otel/index.d.ts +0 -76
- package/dist/src/compiled/@vercel/queue/index.d.ts +0 -1439
- package/dist/src/compiled/@vercel/sandbox/_async-retry.d.ts +0 -8
- package/dist/src/compiled/@vercel/sandbox/_workflow-serde.d.ts +0 -5
- package/dist/src/compiled/@vercel/sandbox/api-client/api-client.d.ts +0 -1914
- package/dist/src/compiled/@vercel/sandbox/api-client/api-error.d.ts +0 -29
- package/dist/src/compiled/@vercel/sandbox/api-client/base-client.d.ts +0 -39
- package/dist/src/compiled/@vercel/sandbox/api-client/file-writer.d.ts +0 -66
- package/dist/src/compiled/@vercel/sandbox/api-client/index.d.ts +0 -2
- package/dist/src/compiled/@vercel/sandbox/api-client/validators.d.ts +0 -951
- package/dist/src/compiled/@vercel/sandbox/api-client/with-retry.d.ts +0 -10
- package/dist/src/compiled/@vercel/sandbox/auth/error.d.ts +0 -15
- package/dist/src/compiled/@vercel/sandbox/auth/file.d.ts +0 -18
- package/dist/src/compiled/@vercel/sandbox/auth/index.d.ts +0 -6
- package/dist/src/compiled/@vercel/sandbox/auth/oauth.d.ts +0 -111
- package/dist/src/compiled/@vercel/sandbox/auth/poll-for-token.d.ts +0 -28
- package/dist/src/compiled/@vercel/sandbox/auth/project.d.ts +0 -40
- package/dist/src/compiled/@vercel/sandbox/command.d.ts +0 -370
- package/dist/src/compiled/@vercel/sandbox/constants.d.ts +0 -15
- package/dist/src/compiled/@vercel/sandbox/drive.d.ts +0 -201
- package/dist/src/compiled/@vercel/sandbox/execution-context.d.ts +0 -116
- package/dist/src/compiled/@vercel/sandbox/filesystem.d.ts +0 -258
- package/dist/src/compiled/@vercel/sandbox/index.d.ts +0 -15
- package/dist/src/compiled/@vercel/sandbox/network-policy.d.ts +0 -200
- package/dist/src/compiled/@vercel/sandbox/proxy.d.ts +0 -55
- package/dist/src/compiled/@vercel/sandbox/sandbox-user.d.ts +0 -211
- package/dist/src/compiled/@vercel/sandbox/sandbox.d.ts +0 -1330
- package/dist/src/compiled/@vercel/sandbox/session.d.ts +0 -461
- package/dist/src/compiled/@vercel/sandbox/snapshot.d.ts +0 -238
- package/dist/src/compiled/@vercel/sandbox/utils/get-credentials.d.ts +0 -21
- package/dist/src/compiled/@vercel/sandbox/utils/network-policy.d.ts +0 -27
- package/dist/src/compiled/@vercel/sandbox/utils/paginator.d.ts +0 -16
- package/dist/src/compiled/@vercel/sandbox/utils/pipe-stdin.d.ts +0 -19
- package/dist/src/compiled/@vercel/sandbox/utils/resolveSignal.d.ts +0 -15
- package/dist/src/compiled/@vercel/sandbox/utils/sandbox-snapshot.d.ts +0 -11
- package/dist/src/compiled/@vercel/sandbox/utils/types.d.ts +0 -11
- package/dist/src/compiled/@vercel/schedules/index.d.ts +0 -290
- package/dist/src/compiled/@vercel/sdk/index.d.ts +0 -41
- package/dist/src/compiled/@workflow/core/_devalue.d.ts +0 -8
- package/dist/src/compiled/@workflow/core/_ms.d.ts +0 -4
- package/dist/src/compiled/@workflow/core/_quickjs-wasi.d.ts +0 -11
- package/dist/src/compiled/@workflow/core/_workflow-serde.d.ts +0 -5
- package/dist/src/compiled/@workflow/core/_workflow-utils.d.ts +0 -8
- package/dist/src/compiled/@workflow/core/_workflow-vm.d.ts +0 -119
- package/dist/src/compiled/@workflow/core/attribute-changes.d.ts +0 -6
- package/dist/src/compiled/@workflow/core/capabilities.d.ts +0 -107
- package/dist/src/compiled/@workflow/core/capture-stack.d.ts +0 -16
- package/dist/src/compiled/@workflow/core/class-serialization.d.ts +0 -63
- package/dist/src/compiled/@workflow/core/classify-error.d.ts +0 -35
- package/dist/src/compiled/@workflow/core/context-errors.d.ts +0 -27
- package/dist/src/compiled/@workflow/core/context-violation-error.d.ts +0 -97
- package/dist/src/compiled/@workflow/core/create-hook.d.ts +0 -296
- package/dist/src/compiled/@workflow/core/define-hook.d.ts +0 -68
- package/dist/src/compiled/@workflow/core/describe-error.d.ts +0 -70
- package/dist/src/compiled/@workflow/core/encryption.d.ts +0 -79
- package/dist/src/compiled/@workflow/core/events-consumer.d.ts +0 -458
- package/dist/src/compiled/@workflow/core/flushable-stream.d.ts +0 -180
- package/dist/src/compiled/@workflow/core/global.d.ts +0 -100
- package/dist/src/compiled/@workflow/core/index.d.ts +0 -21
- package/dist/src/compiled/@workflow/core/log-format.d.ts +0 -29
- package/dist/src/compiled/@workflow/core/logger.d.ts +0 -30
- package/dist/src/compiled/@workflow/core/private.d.ts +0 -364
- package/dist/src/compiled/@workflow/core/replay-divergence.d.ts +0 -25
- package/dist/src/compiled/@workflow/core/replay-payload-cache.d.ts +0 -78
- package/dist/src/compiled/@workflow/core/runtime/after-terminal-write.d.ts +0 -33
- package/dist/src/compiled/@workflow/core/runtime/child-run-completion-notify.d.ts +0 -36
- package/dist/src/compiled/@workflow/core/runtime/child-run-completion.d.ts +0 -46
- package/dist/src/compiled/@workflow/core/runtime/compute-instance.d.ts +0 -13
- package/dist/src/compiled/@workflow/core/runtime/constants.d.ts +0 -321
- package/dist/src/compiled/@workflow/core/runtime/delivery.d.ts +0 -270
- package/dist/src/compiled/@workflow/core/runtime/deployment-guard.d.ts +0 -107
- package/dist/src/compiled/@workflow/core/runtime/dynamic-workflow.d.ts +0 -182
- package/dist/src/compiled/@workflow/core/runtime/event-limit-warning.d.ts +0 -32
- package/dist/src/compiled/@workflow/core/runtime/get-port-lazy.d.ts +0 -25
- package/dist/src/compiled/@workflow/core/runtime/get-world-lazy.d.ts +0 -23
- package/dist/src/compiled/@workflow/core/runtime/helpers.d.ts +0 -549
- package/dist/src/compiled/@workflow/core/runtime/hook-creation.d.ts +0 -45
- package/dist/src/compiled/@workflow/core/runtime/hook-wake.d.ts +0 -124
- package/dist/src/compiled/@workflow/core/runtime/invocations.d.ts +0 -35
- package/dist/src/compiled/@workflow/core/runtime/lifecycle-hooks.d.ts +0 -97
- package/dist/src/compiled/@workflow/core/runtime/out-of-band-observation.d.ts +0 -191
- package/dist/src/compiled/@workflow/core/runtime/queue-auth.d.ts +0 -53
- package/dist/src/compiled/@workflow/core/runtime/quickjs-assets.generated.d.ts +0 -21
- package/dist/src/compiled/@workflow/core/runtime/quickjs-delivery-shared.d.ts +0 -126
- package/dist/src/compiled/@workflow/core/runtime/quickjs-log-view.d.ts +0 -211
- package/dist/src/compiled/@workflow/core/runtime/quickjs-pending-ops.d.ts +0 -181
- package/dist/src/compiled/@workflow/core/runtime/quickjs-runtime.d.ts +0 -356
- package/dist/src/compiled/@workflow/core/runtime/quickjs-serde.d.ts +0 -107
- package/dist/src/compiled/@workflow/core/runtime/quickjs-snapshot-codec.d.ts +0 -74
- package/dist/src/compiled/@workflow/core/runtime/replay-budget.d.ts +0 -104
- package/dist/src/compiled/@workflow/core/runtime/replay-recovery-reporter.d.ts +0 -36
- package/dist/src/compiled/@workflow/core/runtime/resume-hook.d.ts +0 -167
- package/dist/src/compiled/@workflow/core/runtime/resume-latency.d.ts +0 -150
- package/dist/src/compiled/@workflow/core/runtime/run-id-time.d.ts +0 -19
- package/dist/src/compiled/@workflow/core/runtime/run-spec-routing.d.ts +0 -52
- package/dist/src/compiled/@workflow/core/runtime/run-spec-version.d.ts +0 -20
- package/dist/src/compiled/@workflow/core/runtime/run.d.ts +0 -221
- package/dist/src/compiled/@workflow/core/runtime/runs.d.ts +0 -166
- package/dist/src/compiled/@workflow/core/runtime/spec8/constants.d.ts +0 -129
- package/dist/src/compiled/@workflow/core/runtime/spec8/count-step-started-events.d.ts +0 -52
- package/dist/src/compiled/@workflow/core/runtime/spec8/delivery.d.ts +0 -6
- package/dist/src/compiled/@workflow/core/runtime/spec8/inline-steps-in-flight.d.ts +0 -58
- package/dist/src/compiled/@workflow/core/runtime/spec8/open-hook-wait-state.d.ts +0 -55
- package/dist/src/compiled/@workflow/core/runtime/spec8/quickjs-entrypoint.d.ts +0 -110
- package/dist/src/compiled/@workflow/core/runtime/spec8/step-executor.d.ts +0 -233
- package/dist/src/compiled/@workflow/core/runtime/spec8/step-ownership.d.ts +0 -72
- package/dist/src/compiled/@workflow/core/runtime/spec8/step-single-flight.d.ts +0 -34
- package/dist/src/compiled/@workflow/core/runtime/spec8/suspension-handler.d.ts +0 -352
- package/dist/src/compiled/@workflow/core/runtime/spec9/consume-after-commit.d.ts +0 -37
- package/dist/src/compiled/@workflow/core/runtime/spec9/consumed-position.d.ts +0 -38
- package/dist/src/compiled/@workflow/core/runtime/spec9/creator-rules.d.ts +0 -220
- package/dist/src/compiled/@workflow/core/runtime/spec9/deadline.d.ts +0 -18
- package/dist/src/compiled/@workflow/core/runtime/spec9/delivery.d.ts +0 -17
- package/dist/src/compiled/@workflow/core/runtime/spec9/fence-refusals.d.ts +0 -20
- package/dist/src/compiled/@workflow/core/runtime/spec9/in-band-writer.d.ts +0 -282
- package/dist/src/compiled/@workflow/core/runtime/spec9/live-feed.d.ts +0 -197
- package/dist/src/compiled/@workflow/core/runtime/spec9/log-index.d.ts +0 -74
- package/dist/src/compiled/@workflow/core/runtime/spec9/log-state.d.ts +0 -155
- package/dist/src/compiled/@workflow/core/runtime/spec9/quickjs-entrypoint.d.ts +0 -198
- package/dist/src/compiled/@workflow/core/runtime/spec9/read-deadline.d.ts +0 -46
- package/dist/src/compiled/@workflow/core/runtime/spec9/run-ahead.d.ts +0 -74
- package/dist/src/compiled/@workflow/core/runtime/spec9/step-delivery.d.ts +0 -146
- package/dist/src/compiled/@workflow/core/runtime/spec9/step-executor.d.ts +0 -225
- package/dist/src/compiled/@workflow/core/runtime/spec9/step-handler.d.ts +0 -92
- package/dist/src/compiled/@workflow/core/runtime/spec9/step-message.d.ts +0 -42
- package/dist/src/compiled/@workflow/core/runtime/spec9/step-retention.d.ts +0 -44
- package/dist/src/compiled/@workflow/core/runtime/spec9/step-single-flight.d.ts +0 -19
- package/dist/src/compiled/@workflow/core/runtime/spec9/step-wait-creation.d.ts +0 -162
- package/dist/src/compiled/@workflow/core/runtime/spec9/suspension-handler.d.ts +0 -125
- package/dist/src/compiled/@workflow/core/runtime/spec9/wait-timer.d.ts +0 -143
- package/dist/src/compiled/@workflow/core/runtime/start-hook-binding.d.ts +0 -51
- package/dist/src/compiled/@workflow/core/runtime/start-hook-delivery.d.ts +0 -47
- package/dist/src/compiled/@workflow/core/runtime/start-hook-holder.d.ts +0 -50
- package/dist/src/compiled/@workflow/core/runtime/start.d.ts +0 -308
- package/dist/src/compiled/@workflow/core/runtime/step-latency.d.ts +0 -221
- package/dist/src/compiled/@workflow/core/runtime/step-single-flight.d.ts +0 -8
- package/dist/src/compiled/@workflow/core/runtime/step-streams.d.ts +0 -6
- package/dist/src/compiled/@workflow/core/runtime/suspension-hooks.d.ts +0 -84
- package/dist/src/compiled/@workflow/core/runtime/unserializable-step.d.ts +0 -34
- package/dist/src/compiled/@workflow/core/runtime/vm-mode.d.ts +0 -132
- package/dist/src/compiled/@workflow/core/runtime/wait-continuation.d.ts +0 -133
- package/dist/src/compiled/@workflow/core/runtime/wait-until.d.ts +0 -18
- package/dist/src/compiled/@workflow/core/runtime/world-compatibility.d.ts +0 -51
- package/dist/src/compiled/@workflow/core/runtime/world-init.d.ts +0 -50
- package/dist/src/compiled/@workflow/core/runtime/world.d.ts +0 -44
- package/dist/src/compiled/@workflow/core/runtime.d.ts +0 -26
- package/dist/src/compiled/@workflow/core/schemas.d.ts +0 -15
- package/dist/src/compiled/@workflow/core/sealed-box.d.ts +0 -167
- package/dist/src/compiled/@workflow/core/seeded-nanoid.d.ts +0 -2
- package/dist/src/compiled/@workflow/core/serialization/abort-stream.d.ts +0 -11
- package/dist/src/compiled/@workflow/core/serialization/client.d.ts +0 -17
- package/dist/src/compiled/@workflow/core/serialization/codec-devalue-vm.d.ts +0 -16
- package/dist/src/compiled/@workflow/core/serialization/codec-devalue.d.ts +0 -14
- package/dist/src/compiled/@workflow/core/serialization/codec.d.ts +0 -140
- package/dist/src/compiled/@workflow/core/serialization/compression.d.ts +0 -149
- package/dist/src/compiled/@workflow/core/serialization/encryption.d.ts +0 -134
- package/dist/src/compiled/@workflow/core/serialization/errors.d.ts +0 -34
- package/dist/src/compiled/@workflow/core/serialization/format.d.ts +0 -60
- package/dist/src/compiled/@workflow/core/serialization/hardened.d.ts +0 -164
- package/dist/src/compiled/@workflow/core/serialization/index.d.ts +0 -20
- package/dist/src/compiled/@workflow/core/serialization/reducers/class-vm.d.ts +0 -20
- package/dist/src/compiled/@workflow/core/serialization/reducers/class.d.ts +0 -11
- package/dist/src/compiled/@workflow/core/serialization/reducers/common-vm.d.ts +0 -15
- package/dist/src/compiled/@workflow/core/serialization/reducers/common.d.ts +0 -16
- package/dist/src/compiled/@workflow/core/serialization/reducers/step-function-vm.d.ts +0 -44
- package/dist/src/compiled/@workflow/core/serialization/reducers/step-function.d.ts +0 -35
- package/dist/src/compiled/@workflow/core/serialization/state-recovery.d.ts +0 -21
- package/dist/src/compiled/@workflow/core/serialization/state-refs.d.ts +0 -229
- package/dist/src/compiled/@workflow/core/serialization/step.d.ts +0 -17
- package/dist/src/compiled/@workflow/core/serialization/types.d.ts +0 -298
- package/dist/src/compiled/@workflow/core/serialization/workflow-vm.d.ts +0 -29
- package/dist/src/compiled/@workflow/core/serialization/workflow.d.ts +0 -29
- package/dist/src/compiled/@workflow/core/serialization-format.d.ts +0 -220
- package/dist/src/compiled/@workflow/core/serialization.d.ts +0 -641
- package/dist/src/compiled/@workflow/core/set-attributes.d.ts +0 -13
- package/dist/src/compiled/@workflow/core/set-error-stack.d.ts +0 -12
- package/dist/src/compiled/@workflow/core/sleep.d.ts +0 -33
- package/dist/src/compiled/@workflow/core/source-map.d.ts +0 -35
- package/dist/src/compiled/@workflow/core/state-resolver.d.ts +0 -44
- package/dist/src/compiled/@workflow/core/state.d.ts +0 -56
- package/dist/src/compiled/@workflow/core/step/context-storage.d.ts +0 -76
- package/dist/src/compiled/@workflow/core/step/get-closure-vars.d.ts +0 -9
- package/dist/src/compiled/@workflow/core/step/get-step-metadata.d.ts +0 -53
- package/dist/src/compiled/@workflow/core/step/get-workflow-metadata.d.ts +0 -7
- package/dist/src/compiled/@workflow/core/step/writable-stream.d.ts +0 -22
- package/dist/src/compiled/@workflow/core/step.d.ts +0 -4
- package/dist/src/compiled/@workflow/core/symbols.d.ts +0 -72
- package/dist/src/compiled/@workflow/core/telemetry/semantic-conventions.d.ts +0 -995
- package/dist/src/compiled/@workflow/core/telemetry.d.ts +0 -156
- package/dist/src/compiled/@workflow/core/test-support/append-only-world.d.ts +0 -458
- package/dist/src/compiled/@workflow/core/test-support/fence-snapshot.d.ts +0 -11
- package/dist/src/compiled/@workflow/core/test-support/load-events.d.ts +0 -8
- package/dist/src/compiled/@workflow/core/test-support/orchestrator-context.d.ts +0 -25
- package/dist/src/compiled/@workflow/core/test-support/orchestrator-harness.d.ts +0 -504
- package/dist/src/compiled/@workflow/core/types.d.ts +0 -43
- package/dist/src/compiled/@workflow/core/util.d.ts +0 -35
- package/dist/src/compiled/@workflow/core/version.d.ts +0 -2
- package/dist/src/compiled/@workflow/core/vm/index.d.ts +0 -17
- package/dist/src/compiled/@workflow/core/vm/script-cache.d.ts +0 -26
- package/dist/src/compiled/@workflow/core/vm/uint8array-base64.d.ts +0 -21
- package/dist/src/compiled/@workflow/core/vm/uuid.d.ts +0 -10
- package/dist/src/compiled/@workflow/core/workflow/abort-controller.d.ts +0 -65
- package/dist/src/compiled/@workflow/core/workflow/attribute-dispatcher.d.ts +0 -6
- package/dist/src/compiled/@workflow/core/workflow/create-hook.d.ts +0 -7
- package/dist/src/compiled/@workflow/core/workflow/define-hook.d.ts +0 -10
- package/dist/src/compiled/@workflow/core/workflow/get-workflow-metadata.d.ts +0 -32
- package/dist/src/compiled/@workflow/core/workflow/hook.d.ts +0 -15
- package/dist/src/compiled/@workflow/core/workflow/index.d.ts +0 -13
- package/dist/src/compiled/@workflow/core/workflow/set-attributes.d.ts +0 -72
- package/dist/src/compiled/@workflow/core/workflow/sleep.d.ts +0 -4
- package/dist/src/compiled/@workflow/core/workflow/world-init-stub.d.ts +0 -15
- package/dist/src/compiled/@workflow/core/workflow/writable-stream.d.ts +0 -3
- package/dist/src/compiled/@workflow/core/workflow.d.ts +0 -2
- package/dist/src/compiled/@workflow/errors/_ms.d.ts +0 -4
- package/dist/src/compiled/@workflow/errors/ansi.d.ts +0 -57
- package/dist/src/compiled/@workflow/errors/error-codes.d.ts +0 -29
- package/dist/src/compiled/@workflow/errors/index.d.ts +0 -842
- package/dist/src/compiled/@workflow/serde/index.d.ts +0 -30
- package/dist/src/compiled/@workflow/world/analytics.d.ts +0 -275
- package/dist/src/compiled/@workflow/world/attributes-validation.d.ts +0 -101
- package/dist/src/compiled/@workflow/world/attributes.d.ts +0 -18
- package/dist/src/compiled/@workflow/world/capabilities.d.ts +0 -37
- package/dist/src/compiled/@workflow/world/env-config.d.ts +0 -76
- package/dist/src/compiled/@workflow/world/event-metadata.d.ts +0 -132
- package/dist/src/compiled/@workflow/world/events.d.ts +0 -1292
- package/dist/src/compiled/@workflow/world/hooks.d.ts +0 -147
- package/dist/src/compiled/@workflow/world/index.d.ts +0 -37
- package/dist/src/compiled/@workflow/world/interfaces.d.ts +0 -938
- package/dist/src/compiled/@workflow/world/invocation.d.ts +0 -19
- package/dist/src/compiled/@workflow/world/node-http-flag.d.ts +0 -41
- package/dist/src/compiled/@workflow/world/node-http.d.ts +0 -81
- package/dist/src/compiled/@workflow/world/queue.d.ts +0 -888
- package/dist/src/compiled/@workflow/world/recovery.d.ts +0 -36
- package/dist/src/compiled/@workflow/world/runs.d.ts +0 -314
- package/dist/src/compiled/@workflow/world/serialization.d.ts +0 -25
- package/dist/src/compiled/@workflow/world/shared.d.ts +0 -122
- package/dist/src/compiled/@workflow/world/slot-identity.d.ts +0 -90
- package/dist/src/compiled/@workflow/world/snapshots.d.ts +0 -64
- package/dist/src/compiled/@workflow/world/spec-version.d.ts +0 -257
- package/dist/src/compiled/@workflow/world/start-hook.d.ts +0 -177
- package/dist/src/compiled/@workflow/world/steps.d.ts +0 -82
- package/dist/src/compiled/@workflow/world/test-support/atomic-start-hook-conformance.d.ts +0 -109
- package/dist/src/compiled/@workflow/world/test-support/duplicate-event-fixtures.d.ts +0 -44
- package/dist/src/compiled/@workflow/world/test-support/in-band-fence-conformance.d.ts +0 -51
- package/dist/src/compiled/@workflow/world/ulid.d.ts +0 -50
- package/dist/src/compiled/@workflow/world/waits.d.ts +0 -21
- package/dist/src/compiled/@workflow/world-local/index.d.ts +0 -15
- package/dist/src/compiled/_chunks/node/retry-DrgXNq3T.js +0 -1
- package/dist/src/compiled/_chunks/node/token-util-Bjo0BJMz.js +0 -25
- package/dist/src/compiled/_chunks/node/token-util-Dz7NR_Tr.js +0 -1
- package/dist/src/compiled/_chunks/workflow/chunk-5MU5Z6L3-YIxCtn7b.js +0 -1
- package/dist/src/compiled/_chunks/workflow/chunk-WVKEO4WS-BAUmOByS.js +0 -1
- package/dist/src/compiled/_chunks/workflow/delegation-DLl-shwK.js +0 -1
- package/dist/src/compiled/_chunks/workflow/delivery-BrRGuXkQ.js +0 -1
- package/dist/src/compiled/_chunks/workflow/dist-74tor0XD.js +0 -66
- package/dist/src/compiled/_chunks/workflow/dist-DxRkCvK_.js +0 -4
- package/dist/src/compiled/_chunks/workflow/dist-M6hOHh4e.js +0 -1
- package/dist/src/compiled/_chunks/workflow/esm-B-KJJdww.js +0 -1
- package/dist/src/compiled/_chunks/workflow/functions-C4nAezjk.js +0 -60
- package/dist/src/compiled/_chunks/workflow/getMachineId-linux-NDQO5XIJ-Df0-OceL.js +0 -1
- package/dist/src/compiled/_chunks/workflow/getMachineId-unsupported-4HKOBEHB-Cp1dgBjO.js +0 -1
- package/dist/src/compiled/_chunks/workflow/mcp-BwOs3XEw.js +0 -5
- package/dist/src/compiled/_chunks/workflow/resume-hook-C7lViLeL.js +0 -1
- package/dist/src/compiled/_chunks/workflow/rolldown-runtime-Bdq61TOx.js +0 -1
- package/dist/src/compiled/_chunks/workflow/run-CBoukBsx.js +0 -34
- package/dist/src/compiled/_chunks/workflow/serialization-C5CU_DM9.js +0 -12
- package/dist/src/compiled/_chunks/workflow/sleep-c59AMqRs.js +0 -1
- package/dist/src/compiled/_chunks/workflow/suspension-hooks-CBo2hPl5.js +0 -3
- package/dist/src/compiled/_chunks/workflow/token-D3jqBt4E.js +0 -1
- package/dist/src/compiled/_chunks/workflow/token-DdYeX5AJ.js +0 -1
- package/dist/src/compiled/_chunks/workflow/token-lvcx9AkX.js +0 -1
- package/dist/src/compiled/_chunks/workflow/token-util-cvUzLGvF.js +0 -1
- package/dist/src/compiled/_chunks/workflow/undici-Dq-ari9z.js +0 -95
- package/dist/src/compiled/_chunks/workflow/wrapper-D2LPJXTV.js +0 -8
- package/dist/src/compiled/chokidar/index.d.ts +0 -33
- package/dist/src/compiled/commander/index.d.ts +0 -1116
- package/dist/src/compiled/croner/index.d.ts +0 -8
- package/dist/src/compiled/env-runner/index.d.ts +0 -74
- package/dist/src/compiled/env-runner/node-worker.d.ts +0 -1
- package/dist/src/compiled/eventsource-parser/stream/errors.d.ts +0 -35
- package/dist/src/compiled/eventsource-parser/stream/index.d.ts +0 -76
- package/dist/src/compiled/eventsource-parser/stream/types.d.ts +0 -130
- package/dist/src/compiled/immer/index.d.ts +0 -10
- package/dist/src/compiled/js-yaml/index.d.ts +0 -31
- package/dist/src/compiled/json-schema/index.d.ts +0 -749
- package/dist/src/compiled/jsonc-parser/index.d.ts +0 -32
- package/dist/src/compiled/just-secrets/index.d.ts +0 -20
- package/dist/src/compiled/marked/index.d.ts +0 -24
- package/dist/src/compiled/picocolors/index.d.ts +0 -55
- package/dist/src/compiled/run/index.d.ts +0 -388
- package/dist/src/compiled/semver/index.d.ts +0 -29
- package/dist/src/compiled/shadcn-registry/index.d.ts +0 -58
- package/dist/src/compiled/zod-validation-error/index.d.ts +0 -12
- package/dist/src/compiler/artifact-contract.d.ts +0 -43
- package/dist/src/compiler/artifacts.d.ts +0 -80
- package/dist/src/compiler/bundled-extension.d.ts +0 -23
- package/dist/src/compiler/channel-route-plan.d.ts +0 -12
- package/dist/src/compiler/compile-agent.d.ts +0 -58
- package/dist/src/compiler/connection-ownership.d.ts +0 -6
- package/dist/src/compiler/default-tool-policy.d.ts +0 -9
- package/dist/src/compiler/development-extensions.d.ts +0 -23
- package/dist/src/compiler/diagnostics.d.ts +0 -27
- package/dist/src/compiler/extension-compatibility.d.ts +0 -32
- package/dist/src/compiler/extension-mount-bindings.d.ts +0 -5
- package/dist/src/compiler/model-catalog.d.ts +0 -22
- package/dist/src/compiler/module-lifecycle.d.ts +0 -14
- package/dist/src/compiler/node-source-state.d.ts +0 -27
- package/dist/src/compiler/normalize-agent-config.d.ts +0 -14
- package/dist/src/compiler/normalize-channel.d.ts +0 -23
- package/dist/src/compiler/normalize-connection.d.ts +0 -30
- package/dist/src/compiler/normalize-definitions.d.ts +0 -8
- package/dist/src/compiler/normalize-helpers.d.ts +0 -48
- package/dist/src/compiler/normalize-instructions.d.ts +0 -32
- package/dist/src/compiler/normalize-manifest-helpers.d.ts +0 -45
- package/dist/src/compiler/normalize-manifest-types.d.ts +0 -28
- package/dist/src/compiler/normalize-manifest.d.ts +0 -5
- package/dist/src/compiler/normalize-sandbox.d.ts +0 -4
- package/dist/src/compiler/normalize-schedule-collection.d.ts +0 -10
- package/dist/src/compiler/normalize-schedule.d.ts +0 -15
- package/dist/src/compiler/normalize-skill.d.ts +0 -28
- package/dist/src/compiler/normalize-subagent.d.ts +0 -16
- package/dist/src/compiler/normalize-tool.d.ts +0 -36
- package/dist/src/compiler/project-sources.d.ts +0 -66
- package/dist/src/compiler/resolve-workspace-subagent.d.ts +0 -13
- package/dist/src/compiler/validate-artifact.d.ts +0 -17
- package/dist/src/compiler/workspace-resources.d.ts +0 -14
- package/dist/src/computer-use/extension/lib/command-failure.d.ts +0 -7
- package/dist/src/computer-use/extension/lib/computer-use-driver-source.d.ts +0 -12
- package/dist/src/computer-use/extension/lib/computer-use.d.ts +0 -38
- package/dist/src/computer-use/extension/lib/shell.d.ts +0 -1
- package/dist/src/connections/ownership.d.ts +0 -18
- package/dist/src/context/build-base-tool-context.d.ts +0 -14
- package/dist/src/context/build-callback-context.d.ts +0 -15
- package/dist/src/context/key-names.d.ts +0 -14
- package/dist/src/context/prewarm.d.ts +0 -27
- package/dist/src/context/provider.d.ts +0 -30
- package/dist/src/context/providers/connection-key.d.ts +0 -9
- package/dist/src/context/providers/connection.d.ts +0 -4
- package/dist/src/context/providers/sandbox.d.ts +0 -10
- package/dist/src/context/providers/session.d.ts +0 -21
- package/dist/src/context/providers/tool-stubs-key.d.ts +0 -8
- package/dist/src/context/run-step.d.ts +0 -23
- package/dist/src/context/schedule-collection-tools.d.ts +0 -23
- package/dist/src/context/serialize.d.ts +0 -19
- package/dist/src/context/turn-principals.d.ts +0 -12
- package/dist/src/context/workflow-step.d.ts +0 -3
- package/dist/src/definitions/agent-definitions.d.ts +0 -57
- package/dist/src/definitions/agent.d.ts +0 -7
- package/dist/src/definitions/approvals.d.ts +0 -6
- package/dist/src/definitions/builtins.d.ts +0 -6
- package/dist/src/definitions/catalog.d.ts +0 -7
- package/dist/src/definitions/combine.d.ts +0 -9
- package/dist/src/definitions/compiled-agent.d.ts +0 -12
- package/dist/src/definitions/connections.d.ts +0 -21
- package/dist/src/definitions/continuation.d.ts +0 -19
- package/dist/src/definitions/frame.d.ts +0 -13
- package/dist/src/definitions/hooks.d.ts +0 -33
- package/dist/src/definitions/instructions.d.ts +0 -21
- package/dist/src/definitions/intents.d.ts +0 -33
- package/dist/src/definitions/messages.d.ts +0 -17
- package/dist/src/definitions/session-agent.d.ts +0 -26
- package/dist/src/definitions/skills.d.ts +0 -27
- package/dist/src/definitions/state.d.ts +0 -113
- package/dist/src/definitions/step.d.ts +0 -53
- package/dist/src/definitions/subagents.d.ts +0 -16
- package/dist/src/definitions/tools.d.ts +0 -33
- package/dist/src/definitions/turn.d.ts +0 -12
- package/dist/src/discover/bundled-extension.d.ts +0 -11
- package/dist/src/discover/connections.d.ts +0 -19
- package/dist/src/discover/discover-agent.d.ts +0 -87
- package/dist/src/discover/discover-subagent.d.ts +0 -35
- package/dist/src/discover/extension-specifier.d.ts +0 -17
- package/dist/src/discover/extensions.d.ts +0 -127
- package/dist/src/discover/filesystem.d.ts +0 -74
- package/dist/src/discover/grammar.d.ts +0 -196
- package/dist/src/discover/lib.d.ts +0 -35
- package/dist/src/discover/manifest.d.ts +0 -297
- package/dist/src/discover/markdown.d.ts +0 -19
- package/dist/src/discover/memory.d.ts +0 -13
- package/dist/src/discover/named-source-directory.d.ts +0 -98
- package/dist/src/discover/project-source.d.ts +0 -113
- package/dist/src/discover/project.d.ts +0 -33
- package/dist/src/discover/sandbox.d.ts +0 -32
- package/dist/src/discover/schedules.d.ts +0 -38
- package/dist/src/discover/skills.d.ts +0 -35
- package/dist/src/discover/slots.d.ts +0 -30
- package/dist/src/evals/abort.d.ts +0 -2
- package/dist/src/evals/assertions/scoped.d.ts +0 -17
- package/dist/src/evals/cli/eval-client.d.ts +0 -20
- package/dist/src/evals/cli/eval-state-directory.d.ts +0 -7
- package/dist/src/evals/cli/eval.d.ts +0 -31
- package/dist/src/evals/cli/filter.d.ts +0 -14
- package/dist/src/evals/context.d.ts +0 -21
- package/dist/src/evals/control-flow.d.ts +0 -9
- package/dist/src/evals/diagnostics.d.ts +0 -8
- package/dist/src/evals/expect/levenshtein.d.ts +0 -2
- package/dist/src/evals/judge.d.ts +0 -12
- package/dist/src/evals/output.d.ts +0 -3
- package/dist/src/evals/reported-tool-name.d.ts +0 -9
- package/dist/src/evals/runner/artifacts.d.ts +0 -12
- package/dist/src/evals/runner/attempt-label.d.ts +0 -2
- package/dist/src/evals/runner/derive-run-facts.d.ts +0 -16
- package/dist/src/evals/runner/discover.d.ts +0 -51
- package/dist/src/evals/runner/execute-eval.d.ts +0 -31
- package/dist/src/evals/runner/execute-task.d.ts +0 -38
- package/dist/src/evals/runner/reporters/assertion-diagnostics.d.ts +0 -3
- package/dist/src/evals/runner/reporters/assertion-scores.d.ts +0 -30
- package/dist/src/evals/runner/reporters/datadog-runtime-trace-links.d.ts +0 -11
- package/dist/src/evals/runner/resolve-git-metadata.d.ts +0 -16
- package/dist/src/evals/runner/run-evals.d.ts +0 -44
- package/dist/src/evals/runner/verdict.d.ts +0 -14
- package/dist/src/evals/session-cleanup.d.ts +0 -7
- package/dist/src/evals/session-content.d.ts +0 -5
- package/dist/src/eve-channel/audience.d.ts +0 -3
- package/dist/src/eve-channel/create-request.d.ts +0 -24
- package/dist/src/eve-channel/descendant-stream.d.ts +0 -9
- package/dist/src/eve-channel/request.d.ts +0 -43
- package/dist/src/eve-channel/stream-headers.d.ts +0 -1
- package/dist/src/eve-channel/turn-policy-request.d.ts +0 -2
- package/dist/src/execution/agent-sessions/message.d.ts +0 -4
- package/dist/src/execution/agent-sessions/metadata.d.ts +0 -8
- package/dist/src/execution/agent-sessions/remote-credentials.d.ts +0 -19
- package/dist/src/execution/agent-sessions/remote-session.d.ts +0 -16
- package/dist/src/execution/agent-sessions/remote.d.ts +0 -117
- package/dist/src/execution/agent-sessions/requests.d.ts +0 -22
- package/dist/src/execution/agent-sessions/session.d.ts +0 -12
- package/dist/src/execution/agent-sessions/sessions-over.d.ts +0 -29
- package/dist/src/execution/agent-sessions/steps.d.ts +0 -27
- package/dist/src/execution/agent-sessions/usage.d.ts +0 -10
- package/dist/src/execution/authorization-callback-match.d.ts +0 -14
- package/dist/src/execution/callback-hook-tokens.d.ts +0 -18
- package/dist/src/execution/cancelled-model-call-batch.d.ts +0 -17
- package/dist/src/execution/cancelled-turn-message.d.ts +0 -2
- package/dist/src/execution/catalog/catalog-tools.d.ts +0 -22
- package/dist/src/execution/catalog/connection-auth.d.ts +0 -43
- package/dist/src/execution/catalog/connection-entry.d.ts +0 -17
- package/dist/src/execution/catalog/listing.d.ts +0 -12
- package/dist/src/execution/catalog/rank.d.ts +0 -44
- package/dist/src/execution/catalog/search.d.ts +0 -28
- package/dist/src/execution/catalog/signatures.d.ts +0 -11
- package/dist/src/execution/catalog/step-catalog.d.ts +0 -74
- package/dist/src/execution/channel-context.d.ts +0 -5
- package/dist/src/execution/close-session-stream-step.d.ts +0 -9
- package/dist/src/execution/connections/callback-route.d.ts +0 -27
- package/dist/src/execution/continuation-conflict-step.d.ts +0 -8
- package/dist/src/execution/coordination-dispatch-step.d.ts +0 -20
- package/dist/src/execution/create-session-step.d.ts +0 -35
- package/dist/src/execution/delegated-session-context.d.ts +0 -2
- package/dist/src/execution/deliver-payloads.d.ts +0 -3
- package/dist/src/execution/dynamic-workflow/program-step.d.ts +0 -21
- package/dist/src/execution/dynamic-workflow/schema.d.ts +0 -42
- package/dist/src/execution/dynamic-workflow/security-step.d.ts +0 -3
- package/dist/src/execution/dynamic-workflow/tool.d.ts +0 -8
- package/dist/src/execution/dynamic-workflow/workflow.d.ts +0 -10
- package/dist/src/execution/effective-agent-config.d.ts +0 -29
- package/dist/src/execution/eve-workflow-attributes.d.ts +0 -159
- package/dist/src/execution/failure-summary.d.ts +0 -11
- package/dist/src/execution/forward-session-input.d.ts +0 -4
- package/dist/src/execution/framework-workflow-bodies.d.ts +0 -7
- package/dist/src/execution/hook-ownership.d.ts +0 -23
- package/dist/src/execution/hosts.d.ts +0 -131
- package/dist/src/execution/initial-session-values.d.ts +0 -17
- package/dist/src/execution/install-workflow-deployment-id.d.ts +0 -3
- package/dist/src/execution/install-workflow-world.d.ts +0 -15
- package/dist/src/execution/invoke-tool.d.ts +0 -39
- package/dist/src/execution/legacy-session/authorization.d.ts +0 -1
- package/dist/src/execution/legacy-session/completion-step.d.ts +0 -12
- package/dist/src/execution/legacy-session/inbox.d.ts +0 -24
- package/dist/src/execution/legacy-session/input.d.ts +0 -17
- package/dist/src/execution/legacy-session/interrupt-step.d.ts +0 -3
- package/dist/src/execution/legacy-session/prepare-step.d.ts +0 -24
- package/dist/src/execution/legacy-session/snapshot.d.ts +0 -21
- package/dist/src/execution/legacy-session/turn-workflow.d.ts +0 -8
- package/dist/src/execution/model-call-batching.d.ts +0 -12
- package/dist/src/execution/ndjson-stream.d.ts +0 -19
- package/dist/src/execution/node-step.d.ts +0 -78
- package/dist/src/execution/proxied-deliver-step.d.ts +0 -45
- package/dist/src/execution/public-destination.d.ts +0 -37
- package/dist/src/execution/reconcile-session-continuation-token.d.ts +0 -4
- package/dist/src/execution/report-dropped-wire-payload-step.d.ts +0 -13
- package/dist/src/execution/route-child-delivery.d.ts +0 -20
- package/dist/src/execution/run-host.d.ts +0 -52
- package/dist/src/execution/runtime-context.d.ts +0 -14
- package/dist/src/execution/sandbox/abort-bound-session.d.ts +0 -6
- package/dist/src/execution/sandbox/active-connections.d.ts +0 -28
- package/dist/src/execution/sandbox/bash.d.ts +0 -69
- package/dist/src/execution/sandbox/bindings/docker-base-setup.d.ts +0 -7
- package/dist/src/execution/sandbox/bindings/docker-connection.d.ts +0 -15
- package/dist/src/execution/sandbox/bindings/docker-container.d.ts +0 -18
- package/dist/src/execution/sandbox/bindings/docker-network.d.ts +0 -13
- package/dist/src/execution/sandbox/bindings/docker-options.d.ts +0 -20
- package/dist/src/execution/sandbox/bindings/docker-templates.d.ts +0 -41
- package/dist/src/execution/sandbox/bindings/docker-utils.d.ts +0 -2
- package/dist/src/execution/sandbox/bindings/docker.d.ts +0 -32
- package/dist/src/execution/sandbox/bindings/just-bash-runtime.d.ts +0 -26
- package/dist/src/execution/sandbox/bindings/just-bash.d.ts +0 -18
- package/dist/src/execution/sandbox/bindings/local-provider-utils.d.ts +0 -6
- package/dist/src/execution/sandbox/bindings/local-template-prune.d.ts +0 -16
- package/dist/src/execution/sandbox/bindings/local.d.ts +0 -22
- package/dist/src/execution/sandbox/bindings/vercel-base-runtime.d.ts +0 -12
- package/dist/src/execution/sandbox/bindings/vercel-create-sdk.d.ts +0 -19
- package/dist/src/execution/sandbox/bindings/vercel-credentials.d.ts +0 -10
- package/dist/src/execution/sandbox/bindings/vercel-errors.d.ts +0 -13
- package/dist/src/execution/sandbox/bindings/vercel-lifecycle.d.ts +0 -15
- package/dist/src/execution/sandbox/bindings/vercel-lookup.d.ts +0 -12
- package/dist/src/execution/sandbox/bindings/vercel-options.d.ts +0 -9
- package/dist/src/execution/sandbox/bindings/vercel-read-stream.d.ts +0 -5
- package/dist/src/execution/sandbox/bindings/vercel-sdk-types.d.ts +0 -5
- package/dist/src/execution/sandbox/bindings/vercel-tool-sessions.d.ts +0 -7
- package/dist/src/execution/sandbox/bindings/vercel.d.ts +0 -21
- package/dist/src/execution/sandbox/development-cleanup.d.ts +0 -4
- package/dist/src/execution/sandbox/development-lazy-prewarm.d.ts +0 -7
- package/dist/src/execution/sandbox/development-run.d.ts +0 -5
- package/dist/src/execution/sandbox/dockerfile.d.ts +0 -20
- package/dist/src/execution/sandbox/ensure.d.ts +0 -42
- package/dist/src/execution/sandbox/glob-tool.d.ts +0 -22
- package/dist/src/execution/sandbox/logging-session.d.ts +0 -5
- package/dist/src/execution/sandbox/multiplexed-command.d.ts +0 -38
- package/dist/src/execution/sandbox/prewarm.d.ts +0 -61
- package/dist/src/execution/sandbox/provider-files.d.ts +0 -2
- package/dist/src/execution/sandbox/provider-identity.d.ts +0 -1
- package/dist/src/execution/sandbox/read-file.d.ts +0 -35
- package/dist/src/execution/sandbox/require-sandbox.d.ts +0 -7
- package/dist/src/execution/sandbox/ripgrep-probe.d.ts +0 -2
- package/dist/src/execution/sandbox/shell-quote.d.ts +0 -1
- package/dist/src/execution/sandbox/stream-utils.d.ts +0 -9
- package/dist/src/execution/sandbox/truncate-output.d.ts +0 -69
- package/dist/src/execution/session/accepted-deployment.d.ts +0 -3
- package/dist/src/execution/session/active-turn.d.ts +0 -117
- package/dist/src/execution/session/admission.d.ts +0 -40
- package/dist/src/execution/session/answer-caller.d.ts +0 -19
- package/dist/src/execution/session/checkpoint-migrations.d.ts +0 -32
- package/dist/src/execution/session/checkpoint-refusal.d.ts +0 -4
- package/dist/src/execution/session/control-delivery.d.ts +0 -4
- package/dist/src/execution/session/delivery-facts.d.ts +0 -27
- package/dist/src/execution/session/end-sandbox-step.d.ts +0 -12
- package/dist/src/execution/session/entry.d.ts +0 -17
- package/dist/src/execution/session/finalization.d.ts +0 -35
- package/dist/src/execution/session/handoff-state.d.ts +0 -5
- package/dist/src/execution/session/handoff-steps.d.ts +0 -130
- package/dist/src/execution/session/handoff.d.ts +0 -124
- package/dist/src/execution/session/handover-tracing.d.ts +0 -3
- package/dist/src/execution/session/hook-tokens.d.ts +0 -11
- package/dist/src/execution/session/imported-conversation.d.ts +0 -2
- package/dist/src/execution/session/input-queue.d.ts +0 -101
- package/dist/src/execution/session/interrupted-step.d.ts +0 -69
- package/dist/src/execution/session/next-input.d.ts +0 -37
- package/dist/src/execution/session/owner-boot.d.ts +0 -31
- package/dist/src/execution/session/pending-history.d.ts +0 -5
- package/dist/src/execution/session/pending-turn-state.d.ts +0 -37
- package/dist/src/execution/session/pre-v27-checkpoint.d.ts +0 -42
- package/dist/src/execution/session/prewarm-step.d.ts +0 -13
- package/dist/src/execution/session/principal.d.ts +0 -22
- package/dist/src/execution/session/program.d.ts +0 -87
- package/dist/src/execution/session/route-selected-delivery.d.ts +0 -10
- package/dist/src/execution/session/run-watch.d.ts +0 -26
- package/dist/src/execution/session/settle-control-delivery-step.d.ts +0 -8
- package/dist/src/execution/session/settle-duplicate-delivery-step.d.ts +0 -8
- package/dist/src/execution/session/state-cursor.d.ts +0 -50
- package/dist/src/execution/session/state-delta.d.ts +0 -30
- package/dist/src/execution/session/step-decision-check.d.ts +0 -9
- package/dist/src/execution/session/step-state-delta.d.ts +0 -24
- package/dist/src/execution/session/task-tool-tracing-step.d.ts +0 -2
- package/dist/src/execution/session/timeout-control.d.ts +0 -31
- package/dist/src/execution/session/timeout-steps.d.ts +0 -14
- package/dist/src/execution/session/timeout-workflow.d.ts +0 -8
- package/dist/src/execution/session/timeout.d.ts +0 -2
- package/dist/src/execution/session/turn-control.d.ts +0 -17
- package/dist/src/execution/session/turn-event-handler.d.ts +0 -17
- package/dist/src/execution/session/turn-step-result.d.ts +0 -8
- package/dist/src/execution/session/turn-step-types.d.ts +0 -110
- package/dist/src/execution/session/turn-step.d.ts +0 -28
- package/dist/src/execution/session/turn.d.ts +0 -110
- package/dist/src/execution/session/workflow-host.d.ts +0 -7
- package/dist/src/execution/session-callback-request.d.ts +0 -14
- package/dist/src/execution/session-commands.d.ts +0 -7
- package/dist/src/execution/session-event-stream.d.ts +0 -65
- package/dist/src/execution/session-inbox/end-stranded-session.d.ts +0 -36
- package/dist/src/execution/session-inbox/handle.d.ts +0 -7
- package/dist/src/execution/session-inbox/hook-release.d.ts +0 -11
- package/dist/src/execution/session-inbox/owner.d.ts +0 -69
- package/dist/src/execution/session-inbox/pre-v27.d.ts +0 -5
- package/dist/src/execution/session-inbox/protocol.d.ts +0 -12
- package/dist/src/execution/session-inbox/resume.d.ts +0 -42
- package/dist/src/execution/session-inbox/runnable-owner.d.ts +0 -13
- package/dist/src/execution/session-inbox/stranded-replay-guard.d.ts +0 -16
- package/dist/src/execution/session-inbox/workflow-transport.d.ts +0 -10
- package/dist/src/execution/session-line-store.d.ts +0 -19
- package/dist/src/execution/session-workflow-tool-run.d.ts +0 -21
- package/dist/src/execution/session.d.ts +0 -27
- package/dist/src/execution/settle-cancelled-turn-step.d.ts +0 -32
- package/dist/src/execution/skills/instructions.d.ts +0 -29
- package/dist/src/execution/stable-workflow-names.d.ts +0 -6
- package/dist/src/execution/stop-runs.d.ts +0 -35
- package/dist/src/execution/tasks/model-step.d.ts +0 -54
- package/dist/src/execution/tasks/render.d.ts +0 -69
- package/dist/src/execution/tasks/session.d.ts +0 -23
- package/dist/src/execution/tasks/start.d.ts +0 -50
- package/dist/src/execution/tasks/steps.d.ts +0 -39
- package/dist/src/execution/tasks/task-id-input.d.ts +0 -19
- package/dist/src/execution/tasks/tool-entry-point.d.ts +0 -11
- package/dist/src/execution/tasks/workflow-target.d.ts +0 -2
- package/dist/src/execution/terminal-session-completion-step.d.ts +0 -24
- package/dist/src/execution/terminal-session-failure-step.d.ts +0 -14
- package/dist/src/execution/terminate-child-sessions-step.d.ts +0 -12
- package/dist/src/execution/tool-auth.d.ts +0 -17
- package/dist/src/execution/tool-session/id.d.ts +0 -22
- package/dist/src/execution/tool-stub-host.d.ts +0 -20
- package/dist/src/execution/tool-stubs/playback.d.ts +0 -11
- package/dist/src/execution/tool-stubs/steps.d.ts +0 -18
- package/dist/src/execution/tools/channel-to.d.ts +0 -15
- package/dist/src/execution/tools/file-state.d.ts +0 -56
- package/dist/src/execution/tools/workflow/answer.d.ts +0 -10
- package/dist/src/execution/tools/workflow/apply-run-messages-step.d.ts +0 -3
- package/dist/src/execution/tools/workflow/apply-run-messages.d.ts +0 -36
- package/dist/src/execution/tools/workflow/ask.d.ts +0 -79
- package/dist/src/execution/tools/workflow/authorization-completion.d.ts +0 -3
- package/dist/src/execution/tools/workflow/body.d.ts +0 -92
- package/dist/src/execution/tools/workflow/cancellation-policy.d.ts +0 -2
- package/dist/src/execution/tools/workflow/harness-definition.d.ts +0 -14
- package/dist/src/execution/tools/workflow/interrupt.d.ts +0 -9
- package/dist/src/execution/tools/workflow/owner-channels.d.ts +0 -29
- package/dist/src/execution/tools/workflow/owner-inbox.d.ts +0 -13
- package/dist/src/execution/tools/workflow/owner.d.ts +0 -36
- package/dist/src/execution/tools/workflow/resume-hook-step.d.ts +0 -4
- package/dist/src/execution/tools/workflow/resume-hook.d.ts +0 -4
- package/dist/src/execution/tools/workflow/run.d.ts +0 -8
- package/dist/src/execution/tools/workflow/serve.d.ts +0 -3
- package/dist/src/execution/tools/workflow/start.d.ts +0 -51
- package/dist/src/execution/tools/workflow/step.d.ts +0 -3
- package/dist/src/execution/tools/workflow/types.d.ts +0 -10
- package/dist/src/execution/tools/workflow/withdraw-step.d.ts +0 -29
- package/dist/src/execution/tools/workflow/workflow-owner-blocking.d.ts +0 -23
- package/dist/src/execution/tools/workflow/workflow-run-host.d.ts +0 -2
- package/dist/src/execution/tools/workflow/workflow.d.ts +0 -3
- package/dist/src/execution/v26-history.fixtures.d.ts +0 -4
- package/dist/src/execution/web-fetch/execute.d.ts +0 -39
- package/dist/src/execution/web-fetch/html.d.ts +0 -8
- package/dist/src/execution/web-fetch/request.d.ts +0 -15
- package/dist/src/execution/workflow-errors.d.ts +0 -19
- package/dist/src/execution/workflow-host/dispatch-step.d.ts +0 -9
- package/dist/src/execution/workflow-host/host.d.ts +0 -5
- package/dist/src/execution/workflow-host/start-run.d.ts +0 -6
- package/dist/src/execution/workflow-host/tool-stubs.d.ts +0 -7
- package/dist/src/execution/workflow-host/turn-step.d.ts +0 -3
- package/dist/src/execution/workflow-references.d.ts +0 -23
- package/dist/src/execution/workflow-registry.d.ts +0 -5
- package/dist/src/execution/workflow-runtime.d.ts +0 -41
- package/dist/src/execution/workflow-webhook-route.d.ts +0 -4
- package/dist/src/extensions/code/extension/hooks/authenticate.d.ts +0 -2
- package/dist/src/extensions/code/extension/instructions/project.d.ts +0 -2
- package/dist/src/extensions/code/extension/lib/command-failure.d.ts +0 -7
- package/dist/src/extensions/code/extension/lib/connect-authentication.d.ts +0 -7
- package/dist/src/extensions/code/extension/lib/project-instructions.d.ts +0 -13
- package/dist/src/extensions/code/extension/lib/tooling.d.ts +0 -15
- package/dist/src/extensions/custom-skills/extension/instructions/always-on.d.ts +0 -4
- package/dist/src/extensions/custom-skills/extension/lib/lifecycle.d.ts +0 -122
- package/dist/src/extensions/custom-skills/extension/lib/render.d.ts +0 -5
- package/dist/src/extensions/custom-skills/extension/lib/runtime.d.ts +0 -26
- package/dist/src/extensions/custom-skills/extension/lib/tool-support.d.ts +0 -102
- package/dist/src/extensions/custom-skills/extension/skills/custom.d.ts +0 -9
- package/dist/src/extensions/custom-skills/extension/tools/create.d.ts +0 -28
- package/dist/src/extensions/custom-skills/extension/tools/list.d.ts +0 -60
- package/dist/src/extensions/custom-skills/extension/tools/publish.d.ts +0 -36
- package/dist/src/extensions/custom-skills/extension/tools/read.d.ts +0 -32
- package/dist/src/extensions/custom-skills/extension/tools/remove.d.ts +0 -17
- package/dist/src/extensions/custom-skills/extension/tools/set_mode.d.ts +0 -19
- package/dist/src/extensions/git/extension/instructions/github.d.ts +0 -2
- package/dist/src/extensions/git/extension/lib/connect-user-auth.d.ts +0 -15
- package/dist/src/extensions/git/extension/lib/gh-tool.d.ts +0 -28
- package/dist/src/extensions/git/extension/lib/github-guidance.d.ts +0 -4
- package/dist/src/extensions/git/extension/lib/github-shell-schema.d.ts +0 -9
- package/dist/src/extensions/git/extension/lib/repository-root.d.ts +0 -11
- package/dist/src/extensions/git/extension/lib/sandbox-lease-lock.d.ts +0 -32
- package/dist/src/extensions/git/extension/lib/shell.d.ts +0 -1
- package/dist/src/extensions/git/extension/skills/pr.d.ts +0 -2
- package/dist/src/extensions/git/extension/tools/gh.d.ts +0 -3
- package/dist/src/framework/host-inventory.d.ts +0 -8
- package/dist/src/framework/sources/default-tools.d.ts +0 -36
- package/dist/src/framework/sources/modules/agent.d.ts +0 -5
- package/dist/src/framework/sources/modules/eve-channel.d.ts +0 -1
- package/dist/src/framework/sources/modules/home-channel.d.ts +0 -2
- package/dist/src/framework/sources/modules/sandbox.d.ts +0 -3
- package/dist/src/harness/action-presentation.d.ts +0 -18
- package/dist/src/harness/action-result-helpers.d.ts +0 -52
- package/dist/src/harness/approval-outcome.d.ts +0 -32
- package/dist/src/harness/attachment-staging.d.ts +0 -47
- package/dist/src/harness/call-facts.d.ts +0 -34
- package/dist/src/harness/call-outcome.d.ts +0 -6
- package/dist/src/harness/compaction/config.d.ts +0 -17
- package/dist/src/harness/compaction/engine.d.ts +0 -64
- package/dist/src/harness/compaction/over-limit-error.d.ts +0 -8
- package/dist/src/harness/compaction/prompt.d.ts +0 -50
- package/dist/src/harness/compaction/step.d.ts +0 -42
- package/dist/src/harness/coordination.d.ts +0 -80
- package/dist/src/harness/emission.d.ts +0 -40
- package/dist/src/harness/execute-call.d.ts +0 -31
- package/dist/src/harness/final-output.d.ts +0 -15
- package/dist/src/harness/finish-reason.d.ts +0 -8
- package/dist/src/harness/generation-steering.d.ts +0 -24
- package/dist/src/harness/hitl/approval-prompt.d.ts +0 -10
- package/dist/src/harness/hitl/approved-calls.d.ts +0 -51
- package/dist/src/harness/hitl/budget.d.ts +0 -28
- package/dist/src/harness/hitl/stale-responses.d.ts +0 -46
- package/dist/src/harness/interaction-facts.d.ts +0 -42
- package/dist/src/harness/interaction-relay.d.ts +0 -10
- package/dist/src/harness/interruptible-stream.d.ts +0 -5
- package/dist/src/harness/kernel.d.ts +0 -9
- package/dist/src/harness/model-call/call.d.ts +0 -113
- package/dist/src/harness/model-call/errors.d.ts +0 -94
- package/dist/src/harness/model-call/failure.d.ts +0 -17
- package/dist/src/harness/model-call/model.d.ts +0 -17
- package/dist/src/harness/model-call/recovery.d.ts +0 -24
- package/dist/src/harness/model-call/request.d.ts +0 -42
- package/dist/src/harness/model-call/response.d.ts +0 -53
- package/dist/src/harness/model-call/retry.d.ts +0 -28
- package/dist/src/harness/model-call/run.d.ts +0 -33
- package/dist/src/harness/model-call/tools.d.ts +0 -19
- package/dist/src/harness/model-call/unique-call-ids.d.ts +0 -13
- package/dist/src/harness/model-call/usage.d.ts +0 -26
- package/dist/src/harness/ordered-stream-emitter.d.ts +0 -19
- package/dist/src/harness/prompt-cache.d.ts +0 -71
- package/dist/src/harness/provider-safety.d.ts +0 -15
- package/dist/src/harness/provider-tool-history.d.ts +0 -31
- package/dist/src/harness/provider-tool-schemas.d.ts +0 -23
- package/dist/src/harness/provider-tools.d.ts +0 -39
- package/dist/src/harness/publication.d.ts +0 -4
- package/dist/src/harness/request-envelope.d.ts +0 -8
- package/dist/src/harness/running-work.d.ts +0 -10
- package/dist/src/harness/runtime-action-settlement-state.d.ts +0 -3
- package/dist/src/harness/semantic-errors/index.d.ts +0 -9
- package/dist/src/harness/semantic-errors/rule.d.ts +0 -83
- package/dist/src/harness/semantic-errors/rules/gateway.d.ts +0 -11
- package/dist/src/harness/semantic-errors/rules/model-provider.d.ts +0 -11
- package/dist/src/harness/semantic-errors/rules/sandbox.d.ts +0 -14
- package/dist/src/harness/semantic-errors/rules/system.d.ts +0 -2
- package/dist/src/harness/semantic-errors/rules/workflow.d.ts +0 -9
- package/dist/src/harness/semantic-errors/signals.d.ts +0 -31
- package/dist/src/harness/session-machine/calls.d.ts +0 -16
- package/dist/src/harness/session-machine/cascade.d.ts +0 -18
- package/dist/src/harness/session-machine/children.d.ts +0 -11
- package/dist/src/harness/session-machine/content.d.ts +0 -4
- package/dist/src/harness/session-machine/context-changes.d.ts +0 -32
- package/dist/src/harness/session-machine/deliveries.d.ts +0 -41
- package/dist/src/harness/session-machine/lines.d.ts +0 -21
- package/dist/src/harness/session-machine/runs.d.ts +0 -44
- package/dist/src/harness/session-machine/waiting.d.ts +0 -16
- package/dist/src/harness/session-stream-write-error.d.ts +0 -11
- package/dist/src/harness/session-usage.d.ts +0 -22
- package/dist/src/harness/step/after-model.d.ts +0 -29
- package/dist/src/harness/step/park.d.ts +0 -19
- package/dist/src/harness/step-hooks.d.ts +0 -103
- package/dist/src/harness/stream-actions.d.ts +0 -17
- package/dist/src/harness/token-estimate.d.ts +0 -13
- package/dist/src/harness/tool-call-input-errors.d.ts +0 -40
- package/dist/src/harness/tool-call-io.d.ts +0 -28
- package/dist/src/harness/tool-history-repair.d.ts +0 -11
- package/dist/src/harness/tool-model-output.d.ts +0 -59
- package/dist/src/harness/tool-output-serialization.d.ts +0 -17
- package/dist/src/harness/turn-cancellation.d.ts +0 -16
- package/dist/src/harness/usage-sink.d.ts +0 -21
- package/dist/src/harness/user-parts.d.ts +0 -4
- package/dist/src/harness/workflow-admission.d.ts +0 -6
- package/dist/src/harness/workflow-stream-error.d.ts +0 -22
- package/dist/src/harness/workflow-tool-runs.d.ts +0 -28
- package/dist/src/instrumentation/ai-sdk-hook-bridge.d.ts +0 -4
- package/dist/src/instrumentation/ai-sdk-telemetry.d.ts +0 -35
- package/dist/src/instrumentation/ai-sdk-warnings.d.ts +0 -6
- package/dist/src/instrumentation/channel-delivery.d.ts +0 -5
- package/dist/src/instrumentation/content-policy.d.ts +0 -7
- package/dist/src/instrumentation/content.d.ts +0 -10
- package/dist/src/instrumentation/decide.d.ts +0 -4
- package/dist/src/instrumentation/decision-results.d.ts +0 -37
- package/dist/src/instrumentation/dispatch.d.ts +0 -2
- package/dist/src/instrumentation/parent-lineage.d.ts +0 -11
- package/dist/src/instrumentation/principal-summary.d.ts +0 -13
- package/dist/src/instrumentation/providers.d.ts +0 -13
- package/dist/src/instrumentation/scope.d.ts +0 -18
- package/dist/src/instrumentation/session-context.d.ts +0 -25
- package/dist/src/instrumentation/setup-context.d.ts +0 -1
- package/dist/src/instrumentation/trace-decision.d.ts +0 -5
- package/dist/src/internal/a2a/execution.d.ts +0 -56
- package/dist/src/internal/a2a/json-rpc.d.ts +0 -18
- package/dist/src/internal/agent-name.d.ts +0 -2
- package/dist/src/internal/application/build-output-environment.d.ts +0 -3
- package/dist/src/internal/application/build-profile.d.ts +0 -67
- package/dist/src/internal/application/build-workspace.d.ts +0 -35
- package/dist/src/internal/application/compiled-artifacts.d.ts +0 -74
- package/dist/src/internal/application/dev-environment.d.ts +0 -32
- package/dist/src/internal/application/dev-transport.d.ts +0 -4
- package/dist/src/internal/application/import-specifier.d.ts +0 -19
- package/dist/src/internal/application/optional-package-import.d.ts +0 -24
- package/dist/src/internal/application/optional-package-install.d.ts +0 -37
- package/dist/src/internal/application/output-publication-artifacts.d.ts +0 -7
- package/dist/src/internal/application/output-publication-journal.d.ts +0 -30
- package/dist/src/internal/application/output-publication-lock.d.ts +0 -16
- package/dist/src/internal/application/output-publication.d.ts +0 -33
- package/dist/src/internal/application/package.d.ts +0 -63
- package/dist/src/internal/application/paths.d.ts +0 -37
- package/dist/src/internal/application/production-compiler-artifacts.d.ts +0 -4
- package/dist/src/internal/application/runtime-compiled-artifacts-source.d.ts +0 -6
- package/dist/src/internal/application/stamped-package-version.d.ts +0 -5
- package/dist/src/internal/application/tsconfig-dependencies.d.ts +0 -7
- package/dist/src/internal/attachments/data.d.ts +0 -37
- package/dist/src/internal/attachments/errors.d.ts +0 -41
- package/dist/src/internal/attachments/limited-read.d.ts +0 -18
- package/dist/src/internal/attachments/media-metadata.d.ts +0 -40
- package/dist/src/internal/attachments/public-link.d.ts +0 -5
- package/dist/src/internal/attachments/read-media-metadata.d.ts +0 -7
- package/dist/src/internal/attachments/sandbox-refs.d.ts +0 -52
- package/dist/src/internal/attachments/url-refs.d.ts +0 -17
- package/dist/src/internal/authored-asset-import-plugin.d.ts +0 -24
- package/dist/src/internal/authored-definition/approval.d.ts +0 -8
- package/dist/src/internal/authored-definition/channel.d.ts +0 -16
- package/dist/src/internal/authored-definition/connection.d.ts +0 -18
- package/dist/src/internal/authored-definition/core.d.ts +0 -49
- package/dist/src/internal/authored-definition/hook.d.ts +0 -5
- package/dist/src/internal/authored-definition/memory.d.ts +0 -5
- package/dist/src/internal/authored-definition/schedule-collection.d.ts +0 -2
- package/dist/src/internal/authored-definition/schema-backed.d.ts +0 -57
- package/dist/src/internal/authored-definition/source-identity.d.ts +0 -32
- package/dist/src/internal/authored-module-build-options.d.ts +0 -13
- package/dist/src/internal/authored-module-bundle.d.ts +0 -4
- package/dist/src/internal/authored-module-cache.d.ts +0 -10
- package/dist/src/internal/authored-module-conditions.d.ts +0 -2
- package/dist/src/internal/authored-module-evaluation-error.d.ts +0 -2
- package/dist/src/internal/authored-module-map-loader.d.ts +0 -8
- package/dist/src/internal/authored-package-tsconfig-paths.d.ts +0 -17
- package/dist/src/internal/authored-relative-extension-resolver.d.ts +0 -14
- package/dist/src/internal/authored-runtime-modules.d.ts +0 -25
- package/dist/src/internal/bundler/authored-plugins.d.ts +0 -30
- package/dist/src/internal/bundler/extension-mount-plugin.d.ts +0 -19
- package/dist/src/internal/bundler/extension-scope-plugin.d.ts +0 -45
- package/dist/src/internal/bundler/filters.d.ts +0 -33
- package/dist/src/internal/bundler/pseudo-packages.d.ts +0 -21
- package/dist/src/internal/bundler/rolldown.d.ts +0 -30
- package/dist/src/internal/bundler/vendored-dependency-log.d.ts +0 -6
- package/dist/src/internal/capability-error.d.ts +0 -3
- package/dist/src/internal/classify-model-routing.d.ts +0 -23
- package/dist/src/internal/client-context.d.ts +0 -2
- package/dist/src/internal/compiled-manifest-fingerprint.d.ts +0 -5
- package/dist/src/internal/dev-boot-progress.d.ts +0 -13
- package/dist/src/internal/development-programmatic-source-loader.d.ts +0 -7
- package/dist/src/internal/eve-project-root.d.ts +0 -5
- package/dist/src/internal/external-resources-snapshot.d.ts +0 -46
- package/dist/src/internal/external-resources.d.ts +0 -19
- package/dist/src/internal/gateway.d.ts +0 -11
- package/dist/src/internal/helpers/frontmatter.d.ts +0 -24
- package/dist/src/internal/helpers/markdown.d.ts +0 -42
- package/dist/src/internal/host-traced-dependencies.d.ts +0 -16
- package/dist/src/internal/http/basic-auth.d.ts +0 -1
- package/dist/src/internal/http/json-body.d.ts +0 -16
- package/dist/src/internal/http/request-guards.d.ts +0 -34
- package/dist/src/internal/input-text.d.ts +0 -13
- package/dist/src/internal/installed-packages.d.ts +0 -28
- package/dist/src/internal/instrumentation-layout.d.ts +0 -14
- package/dist/src/internal/instrumentation.d.ts +0 -29
- package/dist/src/internal/invocation/agent-invocation.d.ts +0 -53
- package/dist/src/internal/invocation/attributes.d.ts +0 -2
- package/dist/src/internal/invocation/metadata.d.ts +0 -7
- package/dist/src/internal/invocation/owned-run.d.ts +0 -110
- package/dist/src/internal/invocation/workflow-execution.d.ts +0 -30
- package/dist/src/internal/materialized-authored-modules.d.ts +0 -21
- package/dist/src/internal/mcp/forwarded-principal-header.d.ts +0 -31
- package/dist/src/internal/mcp/protected-resource.d.ts +0 -10
- package/dist/src/internal/mcp/published-tools.d.ts +0 -20
- package/dist/src/internal/mcp/request-trace-context.d.ts +0 -12
- package/dist/src/internal/mcp/skills.d.ts +0 -57
- package/dist/src/internal/mcp/streamable-http-server.d.ts +0 -114
- package/dist/src/internal/mock-model-identity.d.ts +0 -2
- package/dist/src/internal/model-auth/api-key.d.ts +0 -7
- package/dist/src/internal/model-auth/available-models.d.ts +0 -2
- package/dist/src/internal/model-auth/development-broker-client.d.ts +0 -3
- package/dist/src/internal/model-auth/development-broker-protocol.d.ts +0 -12
- package/dist/src/internal/model-auth/development-broker-server.d.ts +0 -4
- package/dist/src/internal/model-auth/gateway-credential.d.ts +0 -2
- package/dist/src/internal/model-auth/store.d.ts +0 -16
- package/dist/src/internal/model-auth/transport.d.ts +0 -8
- package/dist/src/internal/model-auth/vercel-cli.d.ts +0 -9
- package/dist/src/internal/model-auth/vercel-team.d.ts +0 -3
- package/dist/src/internal/model-auth/vercel.d.ts +0 -13
- package/dist/src/internal/nitro/dev-client-address.d.ts +0 -36
- package/dist/src/internal/nitro/dev-runtime-artifacts-retention.d.ts +0 -11
- package/dist/src/internal/nitro/dev-runtime-artifacts.d.ts +0 -49
- package/dist/src/internal/nitro/dev-runtime-generation-metadata.d.ts +0 -13
- package/dist/src/internal/nitro/dev-runtime-source-snapshot-copy.d.ts +0 -2
- package/dist/src/internal/nitro/dev-runtime-source-snapshot-local-roots.d.ts +0 -14
- package/dist/src/internal/nitro/dev-runtime-source-snapshot.d.ts +0 -38
- package/dist/src/internal/nitro/development-generation.d.ts +0 -33
- package/dist/src/internal/nitro/host/artifacts-config.d.ts +0 -21
- package/dist/src/internal/nitro/host/build-application.d.ts +0 -5
- package/dist/src/internal/nitro/host/build-deployment-id.d.ts +0 -8
- package/dist/src/internal/nitro/host/build-extension.d.ts +0 -15
- package/dist/src/internal/nitro/host/build-vercel-agent-summary.d.ts +0 -34
- package/dist/src/internal/nitro/host/connection-drain-plugin.d.ts +0 -12
- package/dist/src/internal/nitro/host/copy-host-middleware.d.ts +0 -12
- package/dist/src/internal/nitro/host/create-host-nitro.d.ts +0 -7
- package/dist/src/internal/nitro/host/dev-authored-rebuild-coordinator.d.ts +0 -40
- package/dist/src/internal/nitro/host/dev-authored-source-watcher.d.ts +0 -24
- package/dist/src/internal/nitro/host/dev-build-host.d.ts +0 -83
- package/dist/src/internal/nitro/host/dev-build-operations.d.ts +0 -6
- package/dist/src/internal/nitro/host/dev-build-process.d.ts +0 -1
- package/dist/src/internal/nitro/host/dev-host-candidate.d.ts +0 -17
- package/dist/src/internal/nitro/host/dev-host-fingerprint.d.ts +0 -6
- package/dist/src/internal/nitro/host/dev-host-supervisor.d.ts +0 -61
- package/dist/src/internal/nitro/host/dev-host-workspace.d.ts +0 -10
- package/dist/src/internal/nitro/host/dev-runner.d.ts +0 -19
- package/dist/src/internal/nitro/host/dev-server-http.d.ts +0 -5
- package/dist/src/internal/nitro/host/dev-server-state.d.ts +0 -20
- package/dist/src/internal/nitro/host/dev-server-url.d.ts +0 -6
- package/dist/src/internal/nitro/host/dev-watcher-log.d.ts +0 -40
- package/dist/src/internal/nitro/host/dev-worker-entry.d.ts +0 -1
- package/dist/src/internal/nitro/host/dev-workflow-world-setup.d.ts +0 -10
- package/dist/src/internal/nitro/host/dispatch-schedule-in-dev.d.ts +0 -46
- package/dist/src/internal/nitro/host/extension-build-config.d.ts +0 -20
- package/dist/src/internal/nitro/host/extension-build-lock.d.ts +0 -9
- package/dist/src/internal/nitro/host/extension-declarations.d.ts +0 -10
- package/dist/src/internal/nitro/host/extension-distribution.d.ts +0 -32
- package/dist/src/internal/nitro/host/extension-external-dependencies.d.ts +0 -7
- package/dist/src/internal/nitro/host/extension-state-usage.d.ts +0 -7
- package/dist/src/internal/nitro/host/external-dependency-output-check.d.ts +0 -20
- package/dist/src/internal/nitro/host/externals-policy.d.ts +0 -21
- package/dist/src/internal/nitro/host/host-plugins.d.ts +0 -46
- package/dist/src/internal/nitro/host/host-routes.d.ts +0 -100
- package/dist/src/internal/nitro/host/host-spec.d.ts +0 -70
- package/dist/src/internal/nitro/host/hosted-graph-plugin.d.ts +0 -44
- package/dist/src/internal/nitro/host/instrumentation-entry.d.ts +0 -35
- package/dist/src/internal/nitro/host/local-schedules-runtime-plugin.d.ts +0 -5
- package/dist/src/internal/nitro/host/local-tracing-runtime.d.ts +0 -6
- package/dist/src/internal/nitro/host/ports.d.ts +0 -18
- package/dist/src/internal/nitro/host/prepare-application-host.d.ts +0 -26
- package/dist/src/internal/nitro/host/route-handlers.d.ts +0 -65
- package/dist/src/internal/nitro/host/runtime-plugin.d.ts +0 -17
- package/dist/src/internal/nitro/host/sandbox-shutdown-plugin.d.ts +0 -32
- package/dist/src/internal/nitro/host/skill-files-plugin.d.ts +0 -21
- package/dist/src/internal/nitro/host/stage-build-deployment-id.d.ts +0 -2
- package/dist/src/internal/nitro/host/start-development-server.d.ts +0 -20
- package/dist/src/internal/nitro/host/start-production-server.d.ts +0 -9
- package/dist/src/internal/nitro/host/timezone-schedules-runtime.d.ts +0 -13
- package/dist/src/internal/nitro/host/types.d.ts +0 -91
- package/dist/src/internal/nitro/host/vercel-build-output-config.d.ts +0 -49
- package/dist/src/internal/nitro/host/vercel-build-prewarm.d.ts +0 -12
- package/dist/src/internal/nitro/host/vercel-output.d.ts +0 -17
- package/dist/src/internal/nitro/host/vercel-schedule-name.d.ts +0 -17
- package/dist/src/internal/nitro/host/workflow-sandbox-runtime.d.ts +0 -2
- package/dist/src/internal/nitro/host/workspace-extensions.d.ts +0 -31
- package/dist/src/internal/nitro/host.d.ts +0 -4
- package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response.d.ts +0 -11
- package/dist/src/internal/nitro/routes/agent-info/load-agent-info-data.d.ts +0 -25
- package/dist/src/internal/nitro/routes/channel-dispatch.d.ts +0 -20
- package/dist/src/internal/nitro/routes/channel-request-instrumentation.d.ts +0 -17
- package/dist/src/internal/nitro/routes/channel-route-context.d.ts +0 -39
- package/dist/src/internal/nitro/routes/connection-events.d.ts +0 -5
- package/dist/src/internal/nitro/routes/dev-runtime-artifacts.d.ts +0 -10
- package/dist/src/internal/nitro/routes/dev-schedule-dispatch.d.ts +0 -14
- package/dist/src/internal/nitro/routes/index.d.ts +0 -14
- package/dist/src/internal/nitro/routes/info.d.ts +0 -5
- package/dist/src/internal/nitro/routes/method-guard.d.ts +0 -6
- package/dist/src/internal/nitro/routes/route-invoke-tool.d.ts +0 -24
- package/dist/src/internal/nitro/routes/runtime-artifacts.d.ts +0 -29
- package/dist/src/internal/nitro/routes/runtime-stack.d.ts +0 -29
- package/dist/src/internal/nitro/routes/schedule-collection-consumer.d.ts +0 -9
- package/dist/src/internal/nitro/routes/schedule-task.d.ts +0 -24
- package/dist/src/internal/node-esm-compat-banner.d.ts +0 -45
- package/dist/src/internal/package-imports-hook.d.ts +0 -1
- package/dist/src/internal/package-imports.d.ts +0 -2
- package/dist/src/internal/package-name.d.ts +0 -8
- package/dist/src/internal/project-context.d.ts +0 -31
- package/dist/src/internal/resolve-model-endpoint-status.d.ts +0 -61
- package/dist/src/internal/runtime-model.d.ts +0 -21
- package/dist/src/internal/runtime-registry.d.ts +0 -76
- package/dist/src/internal/schedules/consumer-route.d.ts +0 -19
- package/dist/src/internal/schedules/dev-environment.d.ts +0 -2
- package/dist/src/internal/schedules/disabled.d.ts +0 -2
- package/dist/src/internal/schedules/verify-delivery.d.ts +0 -25
- package/dist/src/internal/user-agent.d.ts +0 -13
- package/dist/src/internal/vercel/api-resource.d.ts +0 -4
- package/dist/src/internal/vercel/assemble-eve-services.d.ts +0 -18
- package/dist/src/internal/vercel/build-agent-workspace.d.ts +0 -5
- package/dist/src/internal/vercel/build-command.d.ts +0 -5
- package/dist/src/internal/vercel/build-multi-agent-landing-page.d.ts +0 -3
- package/dist/src/internal/vercel/eve-service-contribution.d.ts +0 -32
- package/dist/src/internal/vercel/project-link.d.ts +0 -11
- package/dist/src/internal/vercel/vercel-service-config-operations.d.ts +0 -18
- package/dist/src/internal/vercel/vercel-service-name.d.ts +0 -6
- package/dist/src/internal/vercel-agent-summary.d.ts +0 -248
- package/dist/src/internal/workflow/builtins.d.ts +0 -34
- package/dist/src/internal/workflow/cancel-expired-development-run.d.ts +0 -2
- package/dist/src/internal/workflow/development-run-unavailable-error.d.ts +0 -15
- package/dist/src/internal/workflow/development-runtime-compatibility.d.ts +0 -12
- package/dist/src/internal/workflow/development-world-client.d.ts +0 -29
- package/dist/src/internal/workflow/development-world-codec.d.ts +0 -12
- package/dist/src/internal/workflow/development-world-protocol.d.ts +0 -36
- package/dist/src/internal/workflow/development-world-server.d.ts +0 -29
- package/dist/src/internal/workflow/index.d.ts +0 -6
- package/dist/src/internal/workflow/local-world-data-directory.d.ts +0 -3
- package/dist/src/internal/workflow/local-world-delivery-auth.d.ts +0 -17
- package/dist/src/internal/workflow/local-world-delivery-timeouts.d.ts +0 -7
- package/dist/src/internal/workflow/local-world-recovery.d.ts +0 -23
- package/dist/src/internal/workflow/owner-deployment-deleted.d.ts +0 -9
- package/dist/src/internal/workflow/queue-namespace.d.ts +0 -19
- package/dist/src/internal/workflow/runtime.d.ts +0 -5
- package/dist/src/internal/workflow/spec-version-default.d.ts +0 -9
- package/dist/src/internal/workflow/start-claim.d.ts +0 -16
- package/dist/src/internal/workflow/validate-world.d.ts +0 -16
- package/dist/src/internal/workflow/vercel-world-defaults.d.ts +0 -4
- package/dist/src/internal/workflow/world-compatibility.d.ts +0 -22
- package/dist/src/internal/workflow/world-target.d.ts +0 -7
- package/dist/src/internal/workflow-bundle/authored-workflow-directives.d.ts +0 -16
- package/dist/src/internal/workflow-bundle/builder.d.ts +0 -26
- package/dist/src/internal/workflow-bundle/flow-route.d.ts +0 -2
- package/dist/src/internal/workflow-bundle/framework-driver-cache.d.ts +0 -30
- package/dist/src/internal/workflow-bundle/nitro-step-entry.d.ts +0 -21
- package/dist/src/internal/workflow-bundle/stable-module-id.d.ts +0 -6
- package/dist/src/internal/workflow-bundle/workflow-core-shim.d.ts +0 -83
- package/dist/src/internal/workflow-bundle/workflow-directive-ast.d.ts +0 -8
- package/dist/src/internal/workflow-bundle/workflow-source-ast.d.ts +0 -6
- package/dist/src/internal/workflow-bundle/workflow-transformer.d.ts +0 -37
- package/dist/src/memory/definition.d.ts +0 -85
- package/dist/src/protocol/baggage.d.ts +0 -26
- package/dist/src/protocol/catalog-tools.d.ts +0 -12
- package/dist/src/protocol/interaction-json.d.ts +0 -68
- package/dist/src/protocol/remote-agent-protocol.d.ts +0 -45
- package/dist/src/protocol/reply-tool.d.ts +0 -2
- package/dist/src/protocol/reset-session.d.ts +0 -12
- package/dist/src/protocol/routes.d.ts +0 -160
- package/dist/src/protocol/runtime-tools.d.ts +0 -6
- package/dist/src/protocol/session-events/common.d.ts +0 -105
- package/dist/src/protocol/session-events/index.d.ts +0 -16
- package/dist/src/protocol/session-events/schemas.d.ts +0 -320
- package/dist/src/protocol/session-http.d.ts +0 -7
- package/dist/src/protocol/session-lines.d.ts +0 -19
- package/dist/src/protocol/session-projection/display-name.d.ts +0 -15
- package/dist/src/protocol/session-projection/index.d.ts +0 -4
- package/dist/src/protocol/session-projection/tree.d.ts +0 -72
- package/dist/src/protocol/traceparent.d.ts +0 -24
- package/dist/src/protocol/v26-interactions.d.ts +0 -11
- package/dist/src/protocol/v26-lines.d.ts +0 -5
- package/dist/src/public/channels/chat-sdk/attachment-refs.d.ts +0 -15
- package/dist/src/public/channels/chat-sdk/audience.d.ts +0 -9
- package/dist/src/public/channels/chat-sdk/authorization.d.ts +0 -6
- package/dist/src/public/channels/chat-sdk/fetch-message.d.ts +0 -10
- package/dist/src/public/channels/chat-sdk/input-actions.d.ts +0 -22
- package/dist/src/public/channels/chat-sdk/reply-context.d.ts +0 -15
- package/dist/src/public/channels/discord/attachments.d.ts +0 -15
- package/dist/src/public/channels/discord/audience.d.ts +0 -14
- package/dist/src/public/channels/discord/authorization.d.ts +0 -35
- package/dist/src/public/channels/discord/gateway/forwarder.d.ts +0 -14
- package/dist/src/public/channels/discord/hitl.d.ts +0 -48
- package/dist/src/public/channels/discord/responses.d.ts +0 -11
- package/dist/src/public/channels/discord/verifyInbound.d.ts +0 -6
- package/dist/src/public/channels/github/checkout.d.ts +0 -53
- package/dist/src/public/channels/github/constants.d.ts +0 -2
- package/dist/src/public/channels/github/dispatch.d.ts +0 -61
- package/dist/src/public/channels/github/limits.d.ts +0 -2
- package/dist/src/public/channels/linear/constants.d.ts +0 -2
- package/dist/src/public/channels/linear/hitl.d.ts +0 -9
- package/dist/src/public/channels/linear/inbound-uploads.d.ts +0 -21
- package/dist/src/public/channels/linq/inboundContent.d.ts +0 -17
- package/dist/src/public/channels/photon/attachments.d.ts +0 -24
- package/dist/src/public/channels/photon/inboundContent.d.ts +0 -11
- package/dist/src/public/channels/reply.d.ts +0 -22
- package/dist/src/public/channels/same-environment-oidc.d.ts +0 -7
- package/dist/src/public/channels/slack/action-status.d.ts +0 -14
- package/dist/src/public/channels/slack/answers.d.ts +0 -13
- package/dist/src/public/channels/slack/app-manifest.d.ts +0 -14
- package/dist/src/public/channels/slack/attachments.d.ts +0 -67
- package/dist/src/public/channels/slack/auth.d.ts +0 -27
- package/dist/src/public/channels/slack/connections.d.ts +0 -50
- package/dist/src/public/channels/slack/constants.d.ts +0 -7
- package/dist/src/public/channels/slack/inbound-content.d.ts +0 -4
- package/dist/src/public/channels/slack/interaction-cards.d.ts +0 -34
- package/dist/src/public/channels/slack/interactions.d.ts +0 -56
- package/dist/src/public/channels/slack/limits.d.ts +0 -103
- package/dist/src/public/channels/slack/model-context.d.ts +0 -34
- package/dist/src/public/channels/slack/mrkdwn.d.ts +0 -2
- package/dist/src/public/channels/slack/privacy.d.ts +0 -24
- package/dist/src/public/channels/slack/private-approval-delivery.d.ts +0 -34
- package/dist/src/public/channels/slack/request-card-render.d.ts +0 -51
- package/dist/src/public/channels/slack/request-cards.d.ts +0 -36
- package/dist/src/public/channels/slack/sign-in-cancel.d.ts +0 -18
- package/dist/src/public/channels/slack/slash-command.d.ts +0 -13
- package/dist/src/public/channels/slack/space.d.ts +0 -17
- package/dist/src/public/channels/slack/task-card.d.ts +0 -24
- package/dist/src/public/channels/slack/thread-status.d.ts +0 -33
- package/dist/src/public/channels/slack/utils.d.ts +0 -1
- package/dist/src/public/channels/teams/authorization.d.ts +0 -49
- package/dist/src/public/channels/teams/hitl.d.ts +0 -73
- package/dist/src/public/channels/teams/limits.d.ts +0 -8
- package/dist/src/public/channels/teams/space.d.ts +0 -9
- package/dist/src/public/channels/telegram/attachments.d.ts +0 -31
- package/dist/src/public/channels/telegram/audience.d.ts +0 -10
- package/dist/src/public/channels/telegram/authorization-callback.d.ts +0 -10
- package/dist/src/public/channels/telegram/authorization.d.ts +0 -15
- package/dist/src/public/channels/telegram/state.d.ts +0 -8
- package/dist/src/public/channels/text.d.ts +0 -4
- package/dist/src/public/channels/twilio/defaults.d.ts +0 -9
- package/dist/src/public/channels/twilio/routing.d.ts +0 -14
- package/dist/src/public/definitions/connections/protocol.d.ts +0 -12
- package/dist/src/public/definitions/removed-event-keys.d.ts +0 -2
- package/dist/src/public/memory/file/backends/default.d.ts +0 -7
- package/dist/src/public/memory/file/backends/lazy.d.ts +0 -3
- package/dist/src/public/models/openai/chatgpt/auth.d.ts +0 -4
- package/dist/src/public/models/openai/chatgpt/codex-app-server.d.ts +0 -41
- package/dist/src/public/models/openai/chatgpt/credential-store.d.ts +0 -28
- package/dist/src/public/models/openai/chatgpt/model.d.ts +0 -9
- package/dist/src/public/models/openai/chatgpt/oauth.d.ts +0 -22
- package/dist/src/public/models/openai/chatgpt/token-broker.d.ts +0 -34
- package/dist/src/public/models/openai/chatgpt/token.d.ts +0 -13
- package/dist/src/public/models/openai/chatgpt/transport.d.ts +0 -15
- package/dist/src/public/next/server.d.ts +0 -22
- package/dist/src/public/next/vercel-output-config.d.ts +0 -19
- package/dist/src/public/nuxt/production-origin.d.ts +0 -12
- package/dist/src/public/schedules/testing.d.ts +0 -1
- package/dist/src/runtime/actions/results.d.ts +0 -6
- package/dist/src/runtime/agent/bootstrap-model-utils.d.ts +0 -47
- package/dist/src/runtime/agent/bootstrap-model.d.ts +0 -7
- package/dist/src/runtime/agent/mock-model-adapter.d.ts +0 -19
- package/dist/src/runtime/agent/mock-model-fixtures.d.ts +0 -11
- package/dist/src/runtime/agent/mock-model-skill-selection.d.ts +0 -11
- package/dist/src/runtime/agent/mock-structured-output.d.ts +0 -5
- package/dist/src/runtime/agent/resolve-model.d.ts +0 -35
- package/dist/src/runtime/attributes/emit.d.ts +0 -32
- package/dist/src/runtime/authorization-context.d.ts +0 -19
- package/dist/src/runtime/cache-key.d.ts +0 -9
- package/dist/src/runtime/connections/approval-scope.d.ts +0 -9
- package/dist/src/runtime/connections/authorization-complete-page.d.ts +0 -23
- package/dist/src/runtime/connections/authorization-tokens.d.ts +0 -50
- package/dist/src/runtime/connections/events/actions.d.ts +0 -17
- package/dist/src/runtime/connections/events/delivery.d.ts +0 -10
- package/dist/src/runtime/connections/events/dispatch-step.d.ts +0 -20
- package/dist/src/runtime/connections/events/lifecycle-step.d.ts +0 -42
- package/dist/src/runtime/connections/events/owner.d.ts +0 -38
- package/dist/src/runtime/connections/events/owners.d.ts +0 -15
- package/dist/src/runtime/connections/events/path.d.ts +0 -4
- package/dist/src/runtime/connections/events/state.d.ts +0 -37
- package/dist/src/runtime/connections/events/workflow.d.ts +0 -28
- package/dist/src/runtime/connections/instance-identity.d.ts +0 -9
- package/dist/src/runtime/connections/mcp-client.d.ts +0 -88
- package/dist/src/runtime/connections/mcp-tracing.d.ts +0 -14
- package/dist/src/runtime/connections/openapi-client.d.ts +0 -42
- package/dist/src/runtime/connections/openapi-operations.d.ts +0 -34
- package/dist/src/runtime/connections/openapi-schema.d.ts +0 -44
- package/dist/src/runtime/connections/openapi-security.d.ts +0 -42
- package/dist/src/runtime/connections/openapi-spec.d.ts +0 -15
- package/dist/src/runtime/connections/principal.d.ts +0 -73
- package/dist/src/runtime/connections/provided-arguments.d.ts +0 -10
- package/dist/src/runtime/connections/registry-types.d.ts +0 -14
- package/dist/src/runtime/connections/registry.d.ts +0 -42
- package/dist/src/runtime/connections/resolve-authorization.d.ts +0 -11
- package/dist/src/runtime/connections/tool-result.d.ts +0 -27
- package/dist/src/runtime/development-generation.d.ts +0 -8
- package/dist/src/runtime/loaders/artifact-paths.d.ts +0 -21
- package/dist/src/runtime/loaders/bundled-artifacts.d.ts +0 -40
- package/dist/src/runtime/loaders/compile-metadata.d.ts +0 -14
- package/dist/src/runtime/loaders/manifest.d.ts +0 -21
- package/dist/src/runtime/loaders/model-metadata.d.ts +0 -4
- package/dist/src/runtime/loaders/module-map.d.ts +0 -21
- package/dist/src/runtime/prompt/compose.d.ts +0 -14
- package/dist/src/runtime/resolve-agent-graph.d.ts +0 -17
- package/dist/src/runtime/resolve-agent.d.ts +0 -18
- package/dist/src/runtime/resolve-channel.d.ts +0 -17
- package/dist/src/runtime/resolve-connection.d.ts +0 -20
- package/dist/src/runtime/resolve-definition.d.ts +0 -24
- package/dist/src/runtime/resolve-helpers.d.ts +0 -43
- package/dist/src/runtime/resolve-sandbox.d.ts +0 -4
- package/dist/src/runtime/resolve-tool.d.ts +0 -14
- package/dist/src/runtime/sandbox/prepared-artifacts.d.ts +0 -12
- package/dist/src/runtime/schedules/dispatch-occurrence.d.ts +0 -34
- package/dist/src/runtime/schedules/load-collection.d.ts +0 -14
- package/dist/src/runtime/schedules/named-scope.d.ts +0 -11
- package/dist/src/runtime/schedules/payload.d.ts +0 -24
- package/dist/src/runtime/schedules/queue-namespace.d.ts +0 -2
- package/dist/src/runtime/schedules/record.d.ts +0 -4
- package/dist/src/runtime/schedules/register.d.ts +0 -32
- package/dist/src/runtime/schedules/resolve-schedule.d.ts +0 -31
- package/dist/src/runtime/schedules/validation.d.ts +0 -6
- package/dist/src/runtime/sessions/compiled-session-agent.d.ts +0 -13
- package/dist/src/runtime/sessions/runtime-session.d.ts +0 -66
- package/dist/src/runtime/subagents/workflow-reference.d.ts +0 -8
- package/dist/src/runtime/validation.d.ts +0 -5
- package/dist/src/runtime/workspace/seed-files.d.ts +0 -12
- package/dist/src/runtime/workspace/spec.d.ts +0 -6
- package/dist/src/sandbox/providers.d.ts +0 -4
- package/dist/src/self-modification/credentials.d.ts +0 -6
- package/dist/src/self-modification/deployed-sandbox.d.ts +0 -9
- package/dist/src/self-modification/extension/classify-registry-item.d.ts +0 -22
- package/dist/src/self-modification/extension/config-schema.d.ts +0 -10
- package/dist/src/self-modification/extension/eve-add.d.ts +0 -61
- package/dist/src/self-modification/extension/local-only.d.ts +0 -5
- package/dist/src/self-modification/extension/subagents/agent/agent.d.ts +0 -30
- package/dist/src/self-modification/extension/subagents/agent/instructions.d.ts +0 -2
- package/dist/src/self-modification/extension/subagents/agent/sandbox.d.ts +0 -3
- package/dist/src/self-modification/extension/subagents/agent/skills/trace_analysis.d.ts +0 -10
- package/dist/src/self-modification/extension/subagents/agent/tools/edit_file.d.ts +0 -16
- package/dist/src/self-modification/extension/subagents/agent/tools/inspect_trace.d.ts +0 -128
- package/dist/src/self-modification/extension/subagents/agent/tools/inspect_trace_spans.d.ts +0 -80
- package/dist/src/self-modification/extension/subagents/agent/tools/registry_add.d.ts +0 -56
- package/dist/src/self-modification/extension/subagents/agent/tools/search_models.d.ts +0 -22
- package/dist/src/self-modification/extension/subagents/agent/tools/search_registry.d.ts +0 -100
- package/dist/src/self-modification/extension/subagents/agent/tools/search_traces.d.ts +0 -53
- package/dist/src/self-modification/extension/trace-inspection.d.ts +0 -15
- package/dist/src/self-modification/filesystem.d.ts +0 -7
- package/dist/src/self-modification/git-workspace.d.ts +0 -31
- package/dist/src/self-modification/git.d.ts +0 -10
- package/dist/src/self-modification/github-publisher.d.ts +0 -28
- package/dist/src/self-modification/identifiers.d.ts +0 -4
- package/dist/src/self-modification/mode.d.ts +0 -13
- package/dist/src/self-modification/network-policy.d.ts +0 -1
- package/dist/src/self-modification/proposal.d.ts +0 -37
- package/dist/src/self-modification/remote/config-schema.d.ts +0 -20
- package/dist/src/self-modification/remote/production-registry-add.d.ts +0 -42
- package/dist/src/self-modification/remote/subagents/agent/agent.d.ts +0 -7
- package/dist/src/self-modification/remote/subagents/agent/instructions.d.ts +0 -2
- package/dist/src/self-modification/remote/subagents/agent/sandbox.d.ts +0 -2
- package/dist/src/self-modification/remote/subagents/agent/tools/edit_file.d.ts +0 -1
- package/dist/src/self-modification/remote/subagents/agent/tools/publish.d.ts +0 -5
- package/dist/src/self-modification/remote/subagents/agent/tools/registry_add.d.ts +0 -30
- package/dist/src/self-modification/remote/subagents/agent/tools/search_models.d.ts +0 -1
- package/dist/src/self-modification/remote/subagents/agent/tools/search_registry.d.ts +0 -1
- package/dist/src/self-modification/scaffold.d.ts +0 -2
- package/dist/src/self-modification/setup.d.ts +0 -48
- package/dist/src/self-modification/subagent-guidance.d.ts +0 -15
- package/dist/src/self-modification/workspace-lock.d.ts +0 -2
- package/dist/src/services/dev-client/agent-info-probe.d.ts +0 -18
- package/dist/src/services/dev-client/client-options.d.ts +0 -25
- package/dist/src/services/dev-client/credential-gate.d.ts +0 -24
- package/dist/src/services/dev-client/local-host.d.ts +0 -4
- package/dist/src/services/dev-client/request-headers.d.ts +0 -54
- package/dist/src/services/dev-client/runtime-artifacts.d.ts +0 -28
- package/dist/src/services/dev-client/target.d.ts +0 -19
- package/dist/src/services/dev-client/vercel-auth-error.d.ts +0 -34
- package/dist/src/services/dev-client.d.ts +0 -42
- package/dist/src/services/inspect-application.d.ts +0 -23
- package/dist/src/setup/ai-gateway-api-key.d.ts +0 -16
- package/dist/src/setup/append-env.d.ts +0 -22
- package/dist/src/setup/ask-editable.d.ts +0 -22
- package/dist/src/setup/ask-signals.d.ts +0 -23
- package/dist/src/setup/ask.d.ts +0 -206
- package/dist/src/setup/boxes/apply-ai-gateway-credential.d.ts +0 -29
- package/dist/src/setup/boxes/deploy-project.d.ts +0 -73
- package/dist/src/setup/boxes/detect-ai-gateway.d.ts +0 -17
- package/dist/src/setup/boxes/link-project.d.ts +0 -34
- package/dist/src/setup/boxes/model-capabilities.d.ts +0 -24
- package/dist/src/setup/boxes/resolve-provisioning.d.ts +0 -76
- package/dist/src/setup/boxes/select-model.d.ts +0 -14
- package/dist/src/setup/cli/channel-setup-prompter.d.ts +0 -51
- package/dist/src/setup/cli/command-output.d.ts +0 -12
- package/dist/src/setup/cli/connection-add-prompter.d.ts +0 -8
- package/dist/src/setup/cli/index.d.ts +0 -8
- package/dist/src/setup/cli/option-row.d.ts +0 -100
- package/dist/src/setup/cli/prompt-ui.d.ts +0 -160
- package/dist/src/setup/cli/rail-log.d.ts +0 -51
- package/dist/src/setup/cli/select-component.d.ts +0 -90
- package/dist/src/setup/cli/select-option-codec.d.ts +0 -13
- package/dist/src/setup/cli/select-state.d.ts +0 -87
- package/dist/src/setup/cli/whimsy.d.ts +0 -16
- package/dist/src/setup/connect-provisioning.d.ts +0 -33
- package/dist/src/setup/connection-connector.d.ts +0 -45
- package/dist/src/setup/flows/chatgpt-auth.d.ts +0 -15
- package/dist/src/setup/flows/deploy.d.ts +0 -43
- package/dist/src/setup/flows/ensure-vercel-project.d.ts +0 -23
- package/dist/src/setup/flows/in-project.d.ts +0 -16
- package/dist/src/setup/flows/install-vercel-cli.d.ts +0 -47
- package/dist/src/setup/flows/link.d.ts +0 -63
- package/dist/src/setup/flows/login.d.ts +0 -53
- package/dist/src/setup/flows/model-login-connection.d.ts +0 -20
- package/dist/src/setup/flows/model-login-options.d.ts +0 -59
- package/dist/src/setup/flows/model-login-progress.d.ts +0 -7
- package/dist/src/setup/flows/model-login.d.ts +0 -26
- package/dist/src/setup/flows/model-source-change.d.ts +0 -44
- package/dist/src/setup/flows/model.d.ts +0 -7
- package/dist/src/setup/flows/provider.d.ts +0 -27
- package/dist/src/setup/flows/registry-session.d.ts +0 -61
- package/dist/src/setup/flows/registry.d.ts +0 -41
- package/dist/src/setup/flows/vercel-model-login.d.ts +0 -5
- package/dist/src/setup/headless.d.ts +0 -46
- package/dist/src/setup/human-action.d.ts +0 -23
- package/dist/src/setup/index.d.ts +0 -15
- package/dist/src/setup/integrations/discord/api.d.ts +0 -23
- package/dist/src/setup/integrations/discord/connect.d.ts +0 -24
- package/dist/src/setup/integrations/discord/daemon.d.ts +0 -18
- package/dist/src/setup/integrations/discord/setup.d.ts +0 -52
- package/dist/src/setup/integrations/file-memory/setup.d.ts +0 -15
- package/dist/src/setup/integrations/file-memory/vercel.d.ts +0 -103
- package/dist/src/setup/integrations/github/connect.d.ts +0 -28
- package/dist/src/setup/integrations/github/setup.d.ts +0 -44
- package/dist/src/setup/integrations/linear/connect.d.ts +0 -42
- package/dist/src/setup/integrations/linear/setup.d.ts +0 -31
- package/dist/src/setup/integrations/linq/connect.d.ts +0 -31
- package/dist/src/setup/integrations/linq/management.d.ts +0 -6
- package/dist/src/setup/integrations/linq/setup.d.ts +0 -18
- package/dist/src/setup/integrations/photon/connect.d.ts +0 -38
- package/dist/src/setup/integrations/photon/management.d.ts +0 -42
- package/dist/src/setup/integrations/photon/setup-flow.d.ts +0 -44
- package/dist/src/setup/integrations/photon/setup.d.ts +0 -1
- package/dist/src/setup/integrations/registry.d.ts +0 -4
- package/dist/src/setup/integrations/runner.d.ts +0 -32
- package/dist/src/setup/integrations/self-modification/setup.d.ts +0 -37
- package/dist/src/setup/integrations/shared/environment.d.ts +0 -16
- package/dist/src/setup/integrations/shared/prerequisite.d.ts +0 -25
- package/dist/src/setup/integrations/shared/scaffold.d.ts +0 -20
- package/dist/src/setup/integrations/shared/ui.d.ts +0 -26
- package/dist/src/setup/integrations/shared/vercel-project.d.ts +0 -12
- package/dist/src/setup/integrations/shopify/setup.d.ts +0 -21
- package/dist/src/setup/integrations/shopify/templates.d.ts +0 -1
- package/dist/src/setup/integrations/slack/setup.d.ts +0 -51
- package/dist/src/setup/integrations/teams/connect.d.ts +0 -22
- package/dist/src/setup/integrations/teams/setup.d.ts +0 -22
- package/dist/src/setup/integrations/telegram/connect.d.ts +0 -27
- package/dist/src/setup/integrations/telegram/management.d.ts +0 -6
- package/dist/src/setup/integrations/telegram/setup.d.ts +0 -25
- package/dist/src/setup/integrations/types.d.ts +0 -64
- package/dist/src/setup/integrations/web/auth-options.d.ts +0 -4
- package/dist/src/setup/integrations/web/auth-scaffold.d.ts +0 -7
- package/dist/src/setup/integrations/web/framework.d.ts +0 -8
- package/dist/src/setup/integrations/web/hosting.d.ts +0 -43
- package/dist/src/setup/integrations/web/provision-auth.d.ts +0 -3
- package/dist/src/setup/integrations/web/setup.d.ts +0 -25
- package/dist/src/setup/path-exists.d.ts +0 -1
- package/dist/src/setup/primitives/coding-agent-env.d.ts +0 -17
- package/dist/src/setup/primitives/index.d.ts +0 -4
- package/dist/src/setup/primitives/open-url.d.ts +0 -14
- package/dist/src/setup/primitives/pm/bun.d.ts +0 -10
- package/dist/src/setup/primitives/pm/index.d.ts +0 -11
- package/dist/src/setup/primitives/pm/npm.d.ts +0 -10
- package/dist/src/setup/primitives/pm/pnpm-build-policy.d.ts +0 -16
- package/dist/src/setup/primitives/pm/pnpm.d.ts +0 -46
- package/dist/src/setup/primitives/pm/process-result.d.ts +0 -35
- package/dist/src/setup/primitives/pm/run.d.ts +0 -38
- package/dist/src/setup/primitives/pm/shared.d.ts +0 -9
- package/dist/src/setup/primitives/pm/types.d.ts +0 -53
- package/dist/src/setup/primitives/pm/yarn.d.ts +0 -10
- package/dist/src/setup/primitives/process-abort.d.ts +0 -7
- package/dist/src/setup/primitives/process-output.d.ts +0 -25
- package/dist/src/setup/primitives/run-vercel.d.ts +0 -79
- package/dist/src/setup/project-name.d.ts +0 -5
- package/dist/src/setup/project-resolution.d.ts +0 -65
- package/dist/src/setup/prompter.d.ts +0 -274
- package/dist/src/setup/provider-settings.d.ts +0 -25
- package/dist/src/setup/question-options.d.ts +0 -15
- package/dist/src/setup/quit-guard.d.ts +0 -48
- package/dist/src/setup/registry-setup-client.d.ts +0 -21
- package/dist/src/setup/registry-setup-completion.d.ts +0 -3
- package/dist/src/setup/registry-setup-protocol.d.ts +0 -108
- package/dist/src/setup/run-vercel-link.d.ts +0 -10
- package/dist/src/setup/runner.d.ts +0 -52
- package/dist/src/setup/scaffold/channels-catalog.d.ts +0 -31
- package/dist/src/setup/scaffold/create/add-to-project.d.ts +0 -36
- package/dist/src/setup/scaffold/create/agent-paths.d.ts +0 -5
- package/dist/src/setup/scaffold/create/extension.d.ts +0 -30
- package/dist/src/setup/scaffold/create/instructions-template.d.ts +0 -1
- package/dist/src/setup/scaffold/create/web-template.d.ts +0 -99
- package/dist/src/setup/scaffold/create-in-place.d.ts +0 -1
- package/dist/src/setup/scaffold/files.d.ts +0 -10
- package/dist/src/setup/scaffold/index.d.ts +0 -9
- package/dist/src/setup/scaffold/update/dependencies.d.ts +0 -12
- package/dist/src/setup/scaffold/update/module-files.d.ts +0 -3
- package/dist/src/setup/scaffold/update/update-connection-connector.d.ts +0 -8
- package/dist/src/setup/scaffold/update/update-slack-channel.d.ts +0 -23
- package/dist/src/setup/scaffold/workspace-glob.d.ts +0 -4
- package/dist/src/setup/setup-question-wire.d.ts +0 -48
- package/dist/src/setup/slack-connect-create.d.ts +0 -49
- package/dist/src/setup/slack-connect-lifecycle.d.ts +0 -160
- package/dist/src/setup/slack-connect.d.ts +0 -79
- package/dist/src/setup/slack-setup-plan.d.ts +0 -72
- package/dist/src/setup/slackbot.d.ts +0 -125
- package/dist/src/setup/state.d.ts +0 -183
- package/dist/src/setup/step.d.ts +0 -49
- package/dist/src/setup/validate-gateway-key.d.ts +0 -30
- package/dist/src/setup/vercel-api-failure.d.ts +0 -7
- package/dist/src/setup/vercel-deployment.d.ts +0 -60
- package/dist/src/setup/vercel-project-api.d.ts +0 -45
- package/dist/src/setup/vercel-project-framework.d.ts +0 -24
- package/dist/src/setup/vercel-project.d.ts +0 -87
- package/dist/src/setup/vercel-trace-sampling.d.ts +0 -3
- package/dist/src/setup/verified-remote-agent.d.ts +0 -29
- package/dist/src/setup/verified-remote-client.d.ts +0 -30
- package/dist/src/setup/with-spinner.d.ts +0 -3
- package/dist/src/shared/action-label.d.ts +0 -12
- package/dist/src/shared/action-request-name.d.ts +0 -5
- package/dist/src/shared/agent-info-access.d.ts +0 -5
- package/dist/src/shared/answers-delivery-id.d.ts +0 -1
- package/dist/src/shared/async-iterable.d.ts +0 -2
- package/dist/src/shared/atomic-write-file.d.ts +0 -11
- package/dist/src/shared/built-server-start-failure.d.ts +0 -16
- package/dist/src/shared/chatgpt-model.d.ts +0 -16
- package/dist/src/shared/continuation-token.d.ts +0 -2
- package/dist/src/shared/conversation-identity.d.ts +0 -2
- package/dist/src/shared/default-agent-model.d.ts +0 -14
- package/dist/src/shared/dev-checks.d.ts +0 -8
- package/dist/src/shared/development-env-files.d.ts +0 -4
- package/dist/src/shared/errors.d.ts +0 -22
- package/dist/src/shared/eve-route-path.d.ts +0 -4
- package/dist/src/shared/extension-mount.d.ts +0 -2
- package/dist/src/shared/extension-package-contract.d.ts +0 -16
- package/dist/src/shared/format-duration.d.ts +0 -2
- package/dist/src/shared/framework-eve-integration.d.ts +0 -33
- package/dist/src/shared/gateway-model-catalog.d.ts +0 -44
- package/dist/src/shared/gateway-routing.d.ts +0 -20
- package/dist/src/shared/gateway-service-tier.d.ts +0 -20
- package/dist/src/shared/git.d.ts +0 -16
- package/dist/src/shared/guards.d.ts +0 -54
- package/dist/src/shared/html-to-markdown.d.ts +0 -21
- package/dist/src/shared/instrumentation-channel-kind.d.ts +0 -3
- package/dist/src/shared/json-schemas.d.ts +0 -10
- package/dist/src/shared/line-diff.d.ts +0 -11
- package/dist/src/shared/map-concurrent.d.ts +0 -2
- package/dist/src/shared/map-with-concurrency.d.ts +0 -2
- package/dist/src/shared/memory-state.d.ts +0 -12
- package/dist/src/shared/model-connection.d.ts +0 -17
- package/dist/src/shared/model-endpoint-status.d.ts +0 -33
- package/dist/src/shared/model-helper.d.ts +0 -26
- package/dist/src/shared/model-summary.d.ts +0 -8
- package/dist/src/shared/network-address.d.ts +0 -38
- package/dist/src/shared/objects.d.ts +0 -5
- package/dist/src/shared/package-name.d.ts +0 -4
- package/dist/src/shared/path-exists.d.ts +0 -9
- package/dist/src/shared/path-inside.d.ts +0 -2
- package/dist/src/shared/poll-until.d.ts +0 -5
- package/dist/src/shared/presentation-text.d.ts +0 -8
- package/dist/src/shared/principal-scope.d.ts +0 -2
- package/dist/src/shared/public-route-prefix.d.ts +0 -23
- package/dist/src/shared/read-optional-file.d.ts +0 -2
- package/dist/src/shared/rename-with-retry.d.ts +0 -5
- package/dist/src/shared/resolve-eve-binary.d.ts +0 -12
- package/dist/src/shared/restriction.d.ts +0 -13
- package/dist/src/shared/result.d.ts +0 -12
- package/dist/src/shared/run-errors.d.ts +0 -39
- package/dist/src/shared/sandbox-prepared-artifacts.d.ts +0 -16
- package/dist/src/shared/sandbox-recorded-data-error.d.ts +0 -4
- package/dist/src/shared/sandbox-tool-session-error.d.ts +0 -4
- package/dist/src/shared/schedule-collection-tools.d.ts +0 -11
- package/dist/src/shared/schedule-timezone.d.ts +0 -6
- package/dist/src/shared/session-auth.d.ts +0 -39
- package/dist/src/shared/shell-quote.d.ts +0 -2
- package/dist/src/shared/skill-package.d.ts +0 -49
- package/dist/src/shared/skill-paths.d.ts +0 -24
- package/dist/src/shared/text-boundaries.d.ts +0 -19
- package/dist/src/shared/token-usage-math.d.ts +0 -5
- package/dist/src/shared/trace-root.d.ts +0 -8
- package/dist/src/shared/ulid.d.ts +0 -33
- package/dist/src/shared/validate-authorization.d.ts +0 -21
- package/dist/src/shared/value-delta.d.ts +0 -40
- package/dist/src/shared/vercel-output-directory.d.ts +0 -2
- package/dist/src/shared/vercel-project.d.ts +0 -27
- package/dist/src/shared/wait-with-signal.d.ts +0 -2
- package/dist/src/shared/workflow-function-id.d.ts +0 -2
- package/dist/src/shared/workflow-sandbox.d.ts +0 -10
- package/dist/src/shared/workflow-tool-context.d.ts +0 -2
- package/dist/src/source-change/agent-config-ast.d.ts +0 -61
- package/dist/src/source-change/agent-config-string-path.d.ts +0 -18
- package/dist/src/source-change/apply-agent-model-settings.d.ts +0 -27
- package/dist/src/source-change/apply-model-selection.d.ts +0 -15
- package/dist/src/source-change/static-source-change.d.ts +0 -51
- package/dist/src/subagents/adapter-state.d.ts +0 -39
- package/dist/src/subagents/adapter.d.ts +0 -8
- package/dist/src/subagents/callback-route.d.ts +0 -2
- package/dist/src/subagents/event-proxy-step.d.ts +0 -23
- package/dist/src/subagents/hitl-proxy.d.ts +0 -47
- package/dist/src/subagents/parent-notification.d.ts +0 -47
- package/dist/src/subagents/protocol-two-callback.d.ts +0 -27
- package/dist/src/subagents/remote-route-url.d.ts +0 -2
- package/dist/src/tool-stubs/execute.d.ts +0 -10
- package/dist/src/tool-stubs/output.d.ts +0 -4
- package/dist/src/tool-stubs/playback.d.ts +0 -15
- package/dist/src/tool-stubs/rules.d.ts +0 -3
- package/dist/src/tool-stubs/schema.d.ts +0 -4
- package/dist/src/tool-stubs/target.d.ts +0 -8
- package/dist/src/tool-stubs/validate-targets.d.ts +0 -6
- package/dist/src/tools/agent-models.d.ts +0 -7
- package/dist/src/tools/framework/agent-contract.d.ts +0 -4
- package/dist/src/tools/provided/ask-question-body.d.ts +0 -10
- package/dist/src/tools/provided/ask-question-workflow.d.ts +0 -4
- package/dist/src/tools/provided/framework-tool.d.ts +0 -13
- package/dist/src/tools/provided/sleep-workflow.d.ts +0 -4
- package/dist/src/tools/provided/task-cancel.d.ts +0 -6
- package/dist/src/tools/provided/task-wait.d.ts +0 -9
- package/dist/src/tools/signature.d.ts +0 -16
- package/dist/src/tools/tool-label.d.ts +0 -1
- package/dist/src/tools/workflow-body.d.ts +0 -15
- package/dist/src/tools/workflow-program-input.d.ts +0 -6
- package/dist/src/tracing/eve/agent-approval-instrumentation.d.ts +0 -13
- package/dist/src/tracing/eve/agent-channel-delivery-instrumentation.d.ts +0 -7
- package/dist/src/tracing/eve/agent-memory-instrumentation.d.ts +0 -17
- package/dist/src/tracing/eve/agent-otel-provider.d.ts +0 -30
- package/dist/src/tracing/eve/agent-tool-instrumentation.d.ts +0 -43
- package/dist/src/tracing/eve/agent-trace-context-store.d.ts +0 -24
- package/dist/src/tracing/eve/agent-trace-context.d.ts +0 -3
- package/dist/src/tracing/eve/agent-trace-state.d.ts +0 -70
- package/dist/src/tracing/eve/batch-span-processor.d.ts +0 -25
- package/dist/src/tracing/eve/channel-audience-context.d.ts +0 -4
- package/dist/src/tracing/eve/connection-authorization.d.ts +0 -11
- package/dist/src/tracing/eve/connection-events.d.ts +0 -25
- package/dist/src/tracing/eve/content-span-processor.d.ts +0 -1
- package/dist/src/tracing/eve/conversation-context.d.ts +0 -15
- package/dist/src/tracing/eve/delegation.d.ts +0 -20
- package/dist/src/tracing/eve/gateway.d.ts +0 -22
- package/dist/src/tracing/eve/install-instrumentation-runtime.d.ts +0 -19
- package/dist/src/tracing/eve/invoke-tool-span.d.ts +0 -63
- package/dist/src/tracing/eve/mcp.d.ts +0 -30
- package/dist/src/tracing/eve/metadata.d.ts +0 -7
- package/dist/src/tracing/eve/operation-input.d.ts +0 -18
- package/dist/src/tracing/eve/policy.d.ts +0 -15
- package/dist/src/tracing/eve/profile.d.ts +0 -7
- package/dist/src/tracing/eve/session.d.ts +0 -32
- package/dist/src/tracing/eve/vercel-runtime-span-exporter.d.ts +0 -5
- package/dist/src/tracing/local/agent-trace-span-processor.d.ts +0 -16
- package/dist/src/tracing/local/inspection.d.ts +0 -15
- package/dist/src/tracing/local/instrumentation-runtime.d.ts +0 -7
- package/dist/src/tracing/local/trace-analysis.d.ts +0 -52
- package/dist/src/tracing/local/trace-discovery-index.d.ts +0 -13
- package/dist/src/tracing/local/trace-operations.d.ts +0 -13
- package/dist/src/tracing/local/trace-query.d.ts +0 -18
- package/dist/src/tracing/local/trace-reader.d.ts +0 -83
- package/dist/src/tracing/local/trace-retention.d.ts +0 -67
- package/dist/src/tracing/local/trace-span-processor.d.ts +0 -19
- package/dist/src/tracing/local/trace-summary.d.ts +0 -31
- package/dist/src/tracing/local/traces.d.ts +0 -27
- /package/dist/src/compiled/_chunks/{workflow → node}/LogRecord-CbGROCJy.js +0 -0
- /package/dist/src/compiled/_chunks/{workflow → node}/_eve-core-quickjs-entrypoint-stub-qIV0OaFz.js +0 -0
- /package/dist/src/compiled/_chunks/{workflow → node}/global-singleton-BNinwFrL.js +0 -0
- /package/dist/src/compiled/_chunks/{workflow → node}/private-DD2PSMRM.js +0 -0
- /package/dist/src/compiled/_chunks/{workflow → node}/queue-auth-C7YIFJ-G.js +0 -0
- /package/dist/src/compiled/_chunks/{workflow → node}/run-id-Ct9AjQDR.js +0 -0
- /package/dist/src/compiled/_chunks/{workflow → node}/workflow-routes-BaljomCk.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as e,n as t,p as n}from"./private-DD2PSMRM.js";import{$ as r,$n as i,An as a,Ar as o,Br as s,Cn as c,Ct as l,En as u,Er as d,Gt as f,Hn as p,Ht as m,J as h,Ji as g,Kr as _,Mn as v,Ot as ee,Qi as y,Qn as te,Sn as b,St as ne,Tn as x,U as re,Un as S,Ur as C,Ut as w,Vr as T,W as E,Xi as D,Xn as ie,Yi as O,Z as ae,Zi as oe,Zn as se,_n as ce,_r as le,_t as k,a as A,at as ue,bn as de,ci as fe,cn as j,cr as pe,d as M,di as me,dn as N,et as P,f as he,fn as F,gn as ge,gr as I,hn as _e,j as ve,jn as ye,ki as L,kn as be,l as xe,li as R,ln as z,lr as B,mn as Se,mt as Ce,nt as we,pn as Te,qn as Ee,qr as De,rr as Oe,si as ke,sn as Ae,tt as V,u as je,un as Me,vn as Ne,vr as Pe,wn as Fe,xn as Ie,xt as Le,yn as Re,zn as ze}from"./serialization-C5CU_DM9.js";import{At as Be,b as Ve,c as He,d as Ue,et as We,s as H,st as Ge,u as Ke,x as qe,yt as Je}from"./dist-M6hOHh4e.js";import{A as Ye,B as Xe,C as Ze,D as Qe,E as $e,F as et,I as tt,L as nt,M as rt,N as it,O as at,P as ot,R as U,S as st,T as W,U as ct,W as lt,_ as ut,a as dt,b as ft,c as pt,d as mt,f as ht,g as gt,h as _t,i as vt,j as yt,k as bt,l as xt,m as St,n as Ct,o as G,p as wt,r as Tt,s as Et,t as Dt,v as Ot,w as kt,x as At,y as jt,z as Mt}from"./suspension-hooks-CBo2hPl5.js";import{_ as Nt,b as K,f as Pt,g as Ft,h as It,m as q,v as Lt,x as Rt,y as zt}from"./run-CBoukBsx.js";import{$ as Bt,C as Vt,D as Ht,E as Ut,G as Wt,K as Gt,O as Kt,Q as qt,R as J,S as Jt,T as Yt,U as Xt,W as Zt,Y as Qt,Z as Y,_ as $t,a as en,c as tn,g as nn,k as rn,m as an,n as on,u as sn,v as X,w as cn,y as Z}from"./helpers-D1eianSs.js";import{t as ln}from"./global-singleton-BNinwFrL.js";import{r as un}from"./workflow-routes-BaljomCk.js";import{d as dn,o as fn}from"./resume-hook-C7lViLeL.js";import{CorruptedEventLogError as pn,EntityConflictError as mn,FatalError as hn,HookNotFoundError as gn,InBandSupersededError as _n,MaxEventsExceededError as vn,RUN_ERROR_CODES as yn,ReplayDivergenceError as bn,RetryableError as xn,RunExpiredError as Q,SerializationError as Sn,ThrottleError as Cn,TooEarlyError as wn,WorkflowRunNotFoundError as Tn,WorkflowRuntimeError as En,WorkflowWorldError as Dn}from"#compiled/@workflow/errors/index.js";import{types as On}from"node:util";import kn from"node:assert/strict";function An(e,t){if(t.hasMore===!0)return{type:`reload`};let n=t.event;if(!n)return{type:`reload`};let r=[...(t.events??[]).filter(e=>e.eventId!==n.eventId),n];return{type:`merged`,added:Array.isArray(e)?Z(e,r):e.merge(r)}}const $=new WeakMap;function jn(e){let t=$.get(e);return t||(t=new Map,$.set(e,t)),t}function Mn(e,t,n){let r=jn(e);if(r.delete(t),r.set(t,n),r.size>1e4){let e=r.keys().next().value;e!==void 0&&r.delete(e)}}function Nn(e,t){return jn(e).has(t)}function Pn(e,t){jn(e).delete(t)}function Fn(e){let t=jn(e.world).get(e.runId);return!t||e.tailSlot===void 0||e.tailSlot!==t.slot?!1:t.nextTimerAtMs===void 0||t.nextTimerAtMs>e.nowMs}function In(e){if(e.eventType===`step_created`)return{stepName:e.eventData.stepName,inline:e.eventData.inline===!0,creatorMessageId:e.eventData.creatorMessageId};if(e.eventType===`step_started`&&e.eventData?.inline===!0&&e.eventData.stepName!==void 0)return{stepName:e.eventData.stepName,inline:!0}}function Ln(e){let t=new Map,n=new Set;for(let r of e){let e=r.correlationId;if(!e)continue;if(!t.has(e)){let n=In(r);n&&t.set(e,{correlationId:e,stepName:n.stepName,createdEventId:r.eventId,...r.eventType===`step_created`?{createdAt:new Date(r.createdAt)}:{},inline:n.inline,starts:0,terminal:!1,lastIsRetrying:!1,runnableInline:!1})}if(r.eventType===`step_created`)continue;let i=t.get(e);if(i&&!i.terminal)switch(r.eventType){case`step_started`:i.starts++,i.firstStartedAt??=new Date(r.createdAt),i.lastIsRetrying=!1;break;case`step_retrying`:i.lastIsRetrying=!0,n.add(e);break;case`step_completed`:case`step_failed`:i.terminal=!0}}let r=[...t.values()];for(let e of r)e.runnableInline=e.inline&&!e.terminal&&!n.has(e.correlationId);return r}function Rn(e,t){let n=new Set,r=new Set;for(let i of e)if(i.correlationId){if(i.eventType===`hook_created`){let e=i.eventData?.token;(t===void 0||typeof e!=`string`||!e.startsWith(`wkf_child_run_completion:`)||t.has(i.correlationId))&&n.add(i.correlationId)}else i.eventType===`hook_disposed`?n.delete(i.correlationId):i.eventType===`step_retrying`&&r.add(i.correlationId)}return Ln(e).some(e=>!e.terminal&&(!e.inline||r.has(e.correlationId)))?`step`:n.size>0?`hook`:void 0}function zn(e){let t=new Set;for(let n of e)n.eventType===`wait_completed`&&n.correlationId&&t.add(n.correlationId);let n=new Set,r=[];for(let i of e){if(i.eventType!==`wait_created`||!i.correlationId||t.has(i.correlationId)||n.has(i.correlationId))continue;n.add(i.correlationId);let e=new Date(i.eventData.resumeAt);r.push({correlationId:i.correlationId,resumeAt:e,resumeAtMs:e.getTime(),event:i})}return r}function Bn(e,t,n){return zn(e).filter(e=>e.resumeAtMs<=t||n?.has(e.correlationId))}function Vn(e){let t;for(let n of zn(e))(t===void 0||n.resumeAtMs<t)&&(t=n.resumeAtMs);return t===void 0?{}:{nextTimerAtMs:t}}function Hn(e){if(e.stepAttempt!==void 0&&e.stepAttempt>1)return{};let t=e.stepCreatedAt?.getTime();return t!==void 0&&Number.isFinite(t)?{stepCreatedAt:t}:{}}const Un=Ve-36e5;function Wn(e){let{events:t,deliveryCount:n,nowMs:r,exclude:i}=e,a=e.recovery===!0,o={resend:[],tooOld:[]};if(!a&&n===1)return o;let s=new Map;for(let e of t){let t=e.correlationId;if(t){if(!s.has(t)){let n=In(e);n&&s.set(t,{inline:n.inline,createdAtMs:Jn(e),started:!1,terminal:!1,retried:!1,lastIsRetrying:!1})}switch(e.eventType){case`step_started`:{let e=s.get(t);e&&(e.started=!0,e.lastIsRetrying=!1,e.retryCreator=void 0);break}case`step_retrying`:{let n=s.get(t);n&&(n.retried=!0,n.lastIsRetrying=!0,n.retryCreator=Xn(e),n.retriedAtMs=Jn(e));break}case`step_completed`:case`step_failed`:{let e=s.get(t);e&&(e.terminal=!0);break}}}}for(let[e,t]of s){if(t.terminal||i?.has(e))continue;if(a){(!t.inline||t.retried)&&o.resend.push(e);continue}let n;t.inline?t.lastIsRetrying&&t.retryCreator!==void 0&&(n=t.retriedAtMs):t.started||(n=t.createdAtMs),n!==void 0&&(r-n<Un?o.resend.push(e):o.tooOld.push(e))}return o}function Gn(e){return e.recovery===!0||e.deliveryCount!==1}const Kn=new Map;function qn(e){let t=()=>({sent:new Set,tooOld:new Set,swept:!1});if(e.invocationStartedAt===void 0)return t();let n=`${e.runId}|${e.messageId}|${e.invocationStartedAt}`,r=Kn.get(n);if(!r&&(r=t(),Kn.set(n,r),Kn.size>1e3)){let e=Kn.keys().next().value;e!==void 0&&Kn.delete(e)}return r}function Jn(e){let t=+new Date(e.createdAt);return Number.isFinite(t)?t:-1/0}function Yn(e,t){return e.eventType!==`step_retrying`||t===void 0?e:{...e,eventData:{...e.eventData,creatorMessageId:t}}}function Xn(e){let t=e.eventData?.creatorMessageId;return typeof t==`string`?t:void 0}function Zn(e){let{events:t,messageId:n,completedWaits:r,timerFor:i,redelivery:a}=e,o=new Set([n]),s=e=>tr(t.find(t=>t.eventType===`wait_created`&&t.correlationId===e));for(let e of r){let t=s(e);t!==void 0&&o.add(t)}if(a&&i!==void 0){let e=s(i);e!==void 0&&o.add(e)}return o}function Qn(e){let{wait:t,correlationId:n,timerFor:r,ownedChains:i}=e;if(r===n||t===void 0)return!0;let a=tr(t);return a!==void 0&&i.has(a)}function $n(e){let{openWaits:t}=e,n=new Set(e.completing),r=new Map;for(let e of n){let i=tr(t.find(t=>t.correlationId===e)?.event);if(i===void 0||r.has(i))continue;let a;for(let e of t)n.has(e.correlationId)||tr(e.event)===i&&(!a||e.resumeAtMs<a.resumeAtMs)&&(a=e);a&&r.set(i,a)}return[...r.values()]}function er(e,t,n){let r=new Map,i=[];for(let a of e){a.correlationId===n&&i.push(a);let e=tr(a.event)??t,o=r.get(e);(!o||a.resumeAtMs<o.resumeAtMs)&&r.set(e,a)}for(let e of r.values())i.includes(e)||i.push(e);return i}function tr(e){return e?.eventType===`wait_created`?e.eventData.creatorMessageId:void 0}const nr=6e4;function rr(e=process.env){let t=e.WORKFLOW_INLINE_STEP_DEADLINE_MARGIN_MS;if(t===void 0||t===``)return nr;let n=Number(t);return Number.isFinite(n)&&n>=0?n:nr}function ir(e){return e.deadlineMs===void 0||e.nowMs<e.deadlineMs-e.marginMs}const ar=new Map;function or(e){let t=(ar.get(e)??0)+1;if(ar.delete(e),ar.set(e,t),ar.size>1e3){let e=ar.keys().next().value;e!==void 0&&ar.delete(e)}return t}function sr(e){ar.delete(e)}function cr(e){return e<3?!1:e===3||!(e&e-1)}async function lr(e){let{suspension:t,run:n,encryptionKey:r,compression:i}=e,a=n.runId,o=t.items.filter(e=>e.type===`step`&&!e.hasCreatedEvent),s=t.items.filter(e=>e.type===`wait`&&!e.hasCreatedEvent),c=0,l=[],u=await Promise.all(o.map(async e=>{let n={executions:[]};try{return{item:e,input:await je({args:e.args,closureVars:e.closureVars,thisVal:e.thisVal},a,r,t.globalThis,!1,i,n)}}catch(t){if(!Sn.is(t))throw t;return{item:e,error:t}}finally{c+=n.totalExecutions??n.executions.length,l.push(...n.executions.slice(0,5-l.length).map(t=>({source:`step_input`,correlationId:e.correlationId,...t})))}})),d=[],f=[],p=e.inlineSlots;for(let t of u){if(`error`in t)continue;let r=p>0;r&&p--,f.push({correlationId:t.item.correlationId,stepName:t.item.stepName,inline:r,input:t.input}),r?d.push({eventType:`step_started`,specVersion:9,correlationId:t.item.correlationId,eventData:{stepName:t.item.stepName,workflowName:n.workflowName,input:t.input,inline:!0,attempt:1}}):d.push({eventType:`step_created`,specVersion:9,correlationId:t.item.correlationId,eventData:{stepName:t.item.stepName,workflowName:n.workflowName,input:t.input,inline:!1,creatorMessageId:e.creatorMessageId}})}for(let t of s)d.push({eventType:`wait_created`,specVersion:9,correlationId:t.correlationId,eventData:{resumeAt:t.resumeAt,creatorMessageId:e.creatorMessageId}});return{steps:f,waitCount:s.length,failedCount:u.length-f.length,serializationBlockerCount:c,serializationBlockers:l,events:d,commit:()=>fr(e,u,d,f,{serializationBlockerCount:c,serializationBlockers:l}),commitInChunks:t=>ur(e,d,f,{serializationBlockerCount:c,serializationBlockers:l},t)}}function ur(e,t,n,r,i){let a=Date.now(),o=(e,t)=>({...dr(t,e,a,Date.now()),failedStepCorrelationIds:new Set,...r}),s,c=new Promise(e=>{s=e}),l,u=new Promise(e=>{l=e}),d=pr(e,t,e=>s(o(e,n)),l,i&&(e=>i(o(e,n)))).then(async e=>{s(o(e,n));let t=new Set((await c).createdSteps.map(e=>e.correlationId));return o(e,n.filter(e=>!t.has(e.correlationId)))}),f=Promise.race([c,d.then(()=>c)]);return f.catch(()=>{}),d.catch(()=>{}),d.then(l,l),{first:f,rest:d,queued:u}}function dr(e,t,n,r){let i=new Map,a=[];for(let e of t.committed)(e.eventType===`step_created`||e.eventType===`step_started`)&&e.correlationId?i.set(e.correlationId,e):e.eventType===`wait_created`&&a.push(e);return{createdSteps:e.flatMap(e=>{let a=i.get(e.correlationId);if(!a){let n=t.refusedStarts.get(e.correlationId);return n?[{...e,startRefusal:n}]:[]}return[{...e,event:a,...a.eventType===`step_started`?{started:{event:a,postSentAtMs:n,completedAtMs:r}}:{}}]}),createdWaits:a}}async function fr(e,t,n,r,i){let a=new Set,o=Date.now(),s=await pr(e,n),c=Date.now();for(let n of t)`error`in n&&(await mr(e,n.item,n.error),a.add(n.item.correlationId));return{...dr(r,s,o,c),failedStepCorrelationIds:a,serializationBlockerCount:i.serializationBlockerCount,serializationBlockers:i.serializationBlockers}}async function pr(e,t,n,r,i){let a=new Map;if(t.length===0)return{committed:[],refusedStarts:a};let{writer:o}=e;if(t.length>1&&o.supportsBatch){let s=[],c=t.filter(e=>e.eventType===`step_started`).length,l=hr(t);for(let[t,u]of l.entries()){let d=u.map(e=>e.eventType===`step_started`?{event:e,computeInstanceId:lt}:{event:e}),f=e.eventCount(),p=o.createBatch(d,{...e.requestId?{requestId:e.requestId}:{},...f===void 0?{}:{eventCount:f}});t===l.length-1&&r?.();let m=await p,{results:h}=m,g=n===void 0,_=s.length,v=!0;for(let t of h)t.error===void 0&&(e.onCommitted?.({event:t.event,...v?{events:m.events,hasMore:m.hasMore}:{}}),v=!1);h.forEach((t,n)=>{if(t.error===void 0){s.push(t.event);return}V.warn(`Suspension batch item was not committed`,{workflowRunId:e.run.runId,eventType:u[n]?.eventType,correlationId:u[n]?.correlationId,status:t.status,error:t.error});let r=`Suspension batch item failed with ${t.status}: ${t.message}`,i=u[n];if(i?.eventType===`step_started`&&i.correlationId&&(t.status===429||t.status===410))a.set(i.correlationId,t.status===429?new Cn(r):new Q(r));else{if(t.status===429)throw new Cn(r);if(t.status>=500)throw new Dn(r,{status:t.status})}}),c-=u.filter(e=>e.eventType===`step_started`).length,g?i?.({committed:s.slice(_),refusedStarts:new Map}):n&&c===0&&(n({committed:[...s],refusedStarts:new Map(a)}),n=void 0)}return{committed:s,refusedStarts:a}}let s=[];for(let n of t){let t=e.eventCount(),r;try{r=await o.create(n,{...n.eventType===`step_started`?{computeInstanceId:lt}:{},...e.requestId?{requestId:e.requestId}:{},...t===void 0?{}:{eventCount:t}})}catch(e){if(n.eventType===`step_started`&&n.correlationId&&(Cn.is(e)||Q.is(e))){a.set(n.correlationId,e);continue}throw e}e.onCommitted?.(r),r.event&&s.push(r.event)}return{committed:s,refusedStarts:a}}async function mr(e,t,n){let{run:r,writer:i,encryptionKey:a,compression:o,suspension:s}=e;V.warn(`Step arguments failed to serialize; failing the step so the workflow can observe the error`,{workflowRunId:r.runId,correlationId:t.correlationId,stepName:t.stepName,error:n.message});let c=await je(G(),r.runId,a,s.globalThis,!1,o);await i.create({eventType:`step_created`,specVersion:9,correlationId:t.correlationId,eventData:{stepName:t.stepName,workflowName:r.workflowName,input:c,inline:!0,creatorMessageId:e.creatorMessageId}}),await i.create({eventType:`step_failed`,specVersion:9,correlationId:t.correlationId,eventData:{stepName:t.stepName,attempt:1,error:await M(n,r.runId,a,[],s.globalThis,o)}})}function hr(e){let t=[],n=[],r=0;for(let i of e){let e=gr(i);n.length>0&&(n.length+1>64||r+e>524288)&&(t.push(n),n=[],r=0),n.push(i),r+=e}return n.length>0&&t.push(n),t}function gr(e){let t=J,n=e.eventData;if(n)for(let e of Object.values(n))ArrayBuffer.isView(e)&&(t+=e.byteLength);return t}var _r=class extends Error{cause;constructor(e){super(`This orchestrator invocation was superseded by another invocation of the same run`),this.cause=e,this.name=`OrchestratorSupersededError`}static is(e){return e instanceof Error&&e.name===`OrchestratorSupersededError`}};const vr=new Set([`EntityConflictError`,`RunExpiredError`,`HookNotFoundError`,`TooEarlyError`,`ThrottleError`,`WorkflowRunNotFoundError`,`AttributeValidationError`]);function yr(e){if(typeof e!=`object`||!e)return!1;let t=e.name;if(typeof t==`string`&&vr.has(t))return!0;let n=e.status;return typeof n==`number`&&n>=400&&n<500}function br(e,t){if(t.snapshot)return t.snapshot;if(t.events.length===0)return xr;throw new Dn(`The World returned no in-band fence snapshot (\`snapshot: { seq, seqInBand }\`) with the event log of run "${e}". A World that drives spec 9 runs must return it on their logs; see \`WorldCapabilities.inBandFence\`.`,{code:yn.WORLD_CONTRACT_ERROR})}const xr=Object.freeze({seq:0,seqInBand:1});var Sr=class{world;runId;expected;knownMaxSlot=0;loadedSlot;completeThrough=0;stoppedBy;stopped=!1;decisionsStop;openGroup;tail=Promise.resolve();onAccepted;commitListeners=new Set;addCommitListener(e){return this.commitListeners.add(e),()=>{this.commitListeners.delete(e)}}constructor(e,t){this.world=e,this.runId=t,L(e)}accepted(e){if(e){this.onAccepted?.(e);for(let e of this.commitListeners)e()}}adoptSnapshot(e){this.stopped||(this.expected=e.seqInBand,this.loadedSlot=e.seq,this.completeThrough=e.seq,this.knownMaxSlot=Math.max(this.knownMaxSlot,e.seq))}get hasSnapshot(){return this.expected!==void 0}get isStopped(){return this.stopped}stopDecisions(e,t){this.stopped||this.decisionsStop||(this.decisionsStop={error:e,mayStillWrite:t})}assertMayWrite(e){if(this.stopped&&this.assertActive(),this.decisionsStop&&!this.decisionsStop.mayStillWrite(e))throw this.decisionsStop.error}get isSuperseded(){return this.stopped&&_n.is(this.stoppedBy)}get supportsBatch(){return typeof this.world.events.createBatch==`function`}get expectedSeqInBand(){return this.expected}assertActive(){if(this.stopped)throw _n.is(this.stoppedBy)?new _r(this.stoppedBy):this.stoppedBy;if(this.decisionsStop)throw this.decisionsStop.error}create(e,t){return this.write(e,t,!1)}createRequired(e,t,n){return this.write(e,t,!0,n)}predictNextSlot(){return this.knownMaxSlot+this.pendingPositions+1}observeSlot(e){e>this.knownMaxSlot&&(this.knownMaxSlot=e)}halt(e){this.stopped||(this.stopped=!0,this.stoppedBy=e)}get stopCause(){return this.stoppedBy}exclusive(e){return this.serialize(0,e)}idle(){return this.tail.then(()=>{})}write(e,t,n,r){return this.serialize(1,()=>this.sendSingle(e,t,n,r))}async sendSingle(e,t,n,r){{this.assertMayWrite([e]);let i=this.knownMaxSlot,a;try{let n=this.sendPosition(t?.eventCount),r=await this.world.events.create(this.runId,e,{...t,...n,...this.fenceParams()});this.noteComplete(n,r,[r.event]);let o=this.allocatedBy([r.event],i),s=r.allocated??o;this.advance(s),a=r.event?{...r,event:Er(r.event,e,s>0)}:r}catch(e){throw this.stop(e,n)}if(this.accepted(a.event),r)try{r(a)}catch(e){throw this.stop(e,!0)}return a}}createBatch(e,t){return this.writeBatch(e,t,!1)}createBatchRequired(e,t,n){return this.writeBatch(e,t,!0,n)}createAhead(e,t,n){return this.supportsBatch?this.enqueueAhead({kind:`single`,events:[{event:e,...t.occurredAt===void 0?{}:{occurredAt:new Date(t.occurredAt)},...t.computeInstanceId===void 0?{}:{computeInstanceId:t.computeInstanceId}}],params:t,verify:n}):this.createRequired(e,t,n)}createBatchAhead(e,t,n){return this.supportsBatch?this.enqueueAhead({kind:`batch`,events:e,params:t,verify:n}):this.createBatchRequired(e,t,n)}enqueueAhead(e){return new Promise((t,n)=>{let r={...e,resolve:t,reject:n};if(this.pendingPositions+=r.events.length,this.openGroup&&Cr(this.openGroup)+r.events.length<=16&&wr(this.openGroup)+wr([r])<=524288){this.openGroup.push(r);return}let i=[r];this.serialize(0,()=>this.sendGroup(i)).catch(()=>{}),this.openGroup=i})}async sendGroup(e){this.openGroup===e&&(this.openGroup=void 0);let t=e.reduce((e,t)=>e+t.events.length,0);try{let t=[];for(let n of e)try{this.assertMayWrite(n.events.map(({event:e})=>e)),t.push(n)}catch(e){n.reject(e)}if(t.length===0)return;let n=t[0];if(t.length===1&&n.kind===`single`){try{n.resolve(await this.sendSingle(n.events[0].event,n.params,!0,n.verify))}catch(e){n.reject(e)}return}if(t.length===1&&n.events.length===1){await this.sendBatchOfOne(n);return}let r=t.flatMap(e=>e.events),i=t.some(e=>e.params.resolveData===`all`)?`all`:void 0,a=this.knownMaxSlot,o=this.sendPosition(n.params.eventCount),s;try{s=await this.world.events.createBatch.call(this.world.events,this.runId,r,{...o,...n.params.requestId===void 0?{}:{requestId:n.params.requestId},...i===void 0?{}:{resolveData:i},...this.fenceParams()})}catch(e){let n=this.stop(e,!0);for(let e of t)e.reject(n);return}this.noteComplete(o,s,s.results.map(e=>e.error===void 0?e.event:void 0));let c=s.results.map(e=>e.error===void 0&&Tr(e.event.eventId,a)),l=s.results.filter((e,t)=>e.error===void 0&&!c[t]).length;for(let e of s.results)e.error===void 0&&this.noteSlot(e.event.eventId);this.advance(s.allocated??r.length-l);let u=0,d;for(let[e,n]of t.entries()){let t=n.events.length,i=s.results.slice(u,u+t).map((e,t)=>{let n=r[u+t]?.event;return e.error===void 0&&n?{...e,event:Er(e.event,n,c[u+t]===!0)}:e});u+=t;for(let e of i)e.error===void 0&&this.accepted(e.event);if(d!==void 0){n.reject(d);continue}let a=e===0?{...s.events===void 0?{}:{events:s.events},...s.hasMore?{hasMore:!0}:{}}:{};try{let e;if(n.kind===`single`){let t=i[0];if(!t||t.error!==void 0)throw new Dn(`A run-ahead ${n.events[0]?.event.eventType} was refused`+(t?` (${t.status}: ${t.message})`:``),{status:t?.status});e={event:t.event,...a}}else e={results:i,...a,allocated:t};n.verify(e),n.resolve(e)}catch(e){d=this.stop(e,!0),n.reject(d)}}}finally{this.pendingPositions-=t}}async sendBatchOfOne(e){let t=e.events[0],n=e.params,r;try{let e=await this.sendSingle(t.event,{...n.eventCount===void 0?{}:{eventCount:n.eventCount},...n.requestId===void 0?{}:{requestId:n.requestId},...t.occurredAt===void 0?{}:{occurredAt:t.occurredAt},...t.computeInstanceId===void 0?{}:{computeInstanceId:t.computeInstanceId}},!1);r={results:e.event?[{status:200,event:e.event}]:[],...e.events===void 0?{}:{events:e.events},...e.hasMore?{hasMore:!0}:{},allocated:e.allocated??1}}catch(t){if(this.stopped||!yr(t)){e.reject(t);return}let n=t.status;r={results:[{status:typeof n==`number`?n:400,error:t.name??`refused`,message:t.message}],allocated:0}}try{e.verify(r),e.resolve(r)}catch(t){e.reject(this.stop(t,!0))}}writeBatch(e,t,n,r){let i=this.world.events.createBatch;return i?this.serialize(e.length,async()=>{this.assertMayWrite(e.map(({event:e})=>e));let a=this.knownMaxSlot,o=this.sendPosition(t?.eventCount);try{let n=await i.call(this.world.events,this.runId,e,{...t,...o,...this.fenceParams()});this.noteComplete(o,n,n.results.map(e=>e.error===void 0?e.event:void 0));let s=n.results.map(e=>e.error===void 0&&Tr(e.event.eventId,a)),c=n.results.filter((e,t)=>e.error===void 0&&!s[t]).length;for(let e of n.results)e.error===void 0&&this.noteSlot(e.event.eventId);this.advance(n.allocated??e.length-c);let l={...n,results:n.results.map((t,n)=>{let r=e[n]?.event;return t.error===void 0&&r?{...t,event:Er(t.event,r,s[n]===!0)}:t})};for(let e of l.results)e.error===void 0&&this.accepted(e.event);if(r)try{r(l)}catch(e){throw this.stop(e,!0)}return l}catch(e){throw this.stop(e,n)}}):Promise.reject(Error(`InBandWriter.createBatch: the World has no createBatch`))}fenceParams(){if(this.expected===void 0)throw new En(`InBandWriter for run "${this.runId}" wrote before adopting a log snapshot`);return{inBand:!0,expectedSeqInBand:this.expected}}advance(e){this.expected!==void 0&&(this.expected+=e)}allocatedBy(e,t){let n=0;for(let r of e)(!r||Tr(r.eventId,t))&&n++,r&&this.noteSlot(r.eventId);return n}noteSlot(e){let t=H(e);t!==null&&t>this.knownMaxSlot&&(this.knownMaxSlot=t)}sendPosition(e){let t=e??this.loadedSlot;return t===void 0?{}:{eventCount:Math.max(t,this.completeThrough)}}noteComplete(e,t,n){if(e.eventCount!==void 0&&!t.hasMore)for(let e of n){let t=e?H(e.eventId):null;t!==null&&t>this.completeThrough&&(this.completeThrough=t)}}stop(e,t=!1){return!t&&!_n.is(e)&&yr(e)?e:(this.stopped||(this.stopped=!0,this.stoppedBy=e),_n.is(e)?new _r(e):e)}pendingPositions=0;serialize(e,t){this.openGroup=void 0,this.pendingPositions+=e;let n=()=>{this.pendingPositions-=e},r=async()=>{try{return await t()}finally{n()}},i=this.tail.then(r,r);return this.tail=i.catch(()=>{}),i}};function Cr(e){return e.reduce((e,t)=>e+t.events.length,0)}function wr(e){let t=0;for(let n of e)for(let e of n.events)t+=gr(e.event);return t}function Tr(e,t){let n=H(e);return n===null||n>t}function Er(e,t,n){if(e.eventType!==t.eventType)return e;let r=t.eventData;if(!r)return e;let i=e.eventData??{};return{...e,eventData:n?{...i,...r}:{...r,...i}}}const Dr=5e3;function Or(e=process.env){let t=e.WORKFLOW_ORCHESTRATOR_READ_TIMEOUT_MS;if(t===void 0||t===``)return Dr;let n=Number(t);return Number.isFinite(n)&&n>=0?n:Dr}const kr=Symbol(`timed out`);async function Ar(e,t){let{timeoutMs:n,label:r,runId:i}=t;if(n<=0)return e(void 0);let a=Math.max(1,t.attempts??3);for(let t=1;;t++){let o=n*2**(t-1),s=new AbortController,c,l=new Promise(e=>{c=setTimeout(()=>e(kr),o)}),u=e(s.signal),d;try{d=await Promise.race([u,l])}finally{clearTimeout(c)}if(d!==kr)return d;let f=new Dn(`${r} did not answer within ${o}ms (attempt ${t} of ${a})`,{code:`TIMEOUT`});if(s.abort(f),u.catch(()=>void 0),V.warn(`Event log read timed out`,{workflowRunId:i,read:r,timeoutMs:o,attempt:t,attempts:a}),t>=a)throw f}}const jr=2e3;function Mr(e=process.env){let t=e.WORKFLOW_ORCHESTRATOR_POLL_INTERVAL_MS;if(t===void 0||t===``)return jr;let n=Number(t);return Number.isFinite(n)&&n>=0?n:jr}const Nr=1e4;function Pr(e=process.env){let t=e.WORKFLOW_ORCHESTRATOR_FEED_POLL_INTERVAL_MS;if(t===void 0||t===``)return Nr;let n=Number(t);return Number.isFinite(n)&&n>=0?n:Nr}const Fr=3e4,Ir=5e3;function Lr(e=process.env){let t=e.WORKFLOW_ORCHESTRATOR_LINGER_MS;if(t===void 0||t===``)return Fr;let n=Number(t);return Number.isFinite(n)&&n>=0?n:Fr}function Rr(e=process.env){let t=Lr(e),n=e.WORKFLOW_ORCHESTRATOR_HOOK_LINGER_MS;if(n===void 0||n===``)return Math.min(Ir,t);let r=Number(n);return Math.min(Number.isFinite(r)&&r>=0?r:Ir,t)}function zr(e,t=process.env){return e===`step`?Lr(t):e===`hook`?Rr(t):0}var Br=class{world;runId;nextSlot;unsubscribe;timer;polling=!1;stopped=!1;cursor;pending=new Map;feedLive=!1;currentIntervalMs;timerDueAtMs;constructor(e,t,n){this.world=e,this.runId=t,this.nextSlot=n.afterSlot+1,this.cursor=n.cursor,this.pollIntervalMs=n.pollIntervalMs,this.feedPollIntervalMs=Math.max(n.feedPollIntervalMs??0,n.pollIntervalMs),this.currentIntervalMs=n.pollIntervalMs,this.onEvents=n.onEvents,this.onFeedDown=n.onFeedDown}get isLive(){return this.feedLive&&!this.stopped}get nextPollIntervalMs(){return this.currentIntervalMs}pollIntervalMs;feedPollIntervalMs;onEvents;onFeedDown;start(){let e=this.world.events.subscribe;if(e){this.feedLive=!0;try{this.unsubscribe=e.call(this.world.events,this.runId,this.nextSlot-1,e=>this.offer([e],`push`),{onError:e=>{let t=this.feedLive;this.feedLive=!1,this.resetInterval(),V.debug(`Live event feed stopped; polling only`,{workflowRunId:this.runId,error:e instanceof Error?e.message:String(e)}),t&&this.feedDown()}})}catch(e){let t=this.feedLive;this.feedLive=!1,V.debug(`Live event feed unavailable; polling only`,{workflowRunId:this.runId,error:e instanceof Error?e.message:String(e)}),t&&this.feedDown()}}this.feedLive&&(this.currentIntervalMs=this.feedPollIntervalMs),this.schedulePoll()}feedDown(){this.stopped||this.onFeedDown?.()}stop(){this.stopped=!0,this.feedLive=!1,this.unsubscribe?.(),this.unsubscribe=void 0,this.timer&&clearTimeout(this.timer),this.timer=void 0,this.timerDueAtMs=void 0}async pollNow(){if(this.polling||this.stopped)return;this.polling=!0;let e=this.feedLive,t=!1,n=0;try{let t=!0;for(;t&&!this.stopped;){let r=this.cursor??void 0,i=await Ar(e=>this.world.events.list({runId:this.runId,pagination:{sortOrder:`asc`,cursor:r},resolveData:on,specVersion:9,...e?{signal:e}:{}}),{timeoutMs:Or(),attempts:1,label:`Live event feed poll`,runId:this.runId});this.cursor=i.cursor??this.cursor,t=i.hasMore;let a=this.offer(i.data,`poll`);n+=a,a>0&&(e=!1)}}catch(n){e=!1,t=!0,V.debug(`Live event feed poll failed`,{workflowRunId:this.runId,error:n instanceof Error?n.message:String(n)})}finally{this.polling=!1}this.currentIntervalMs=e&&this.feedLive&&this.pending.size===0?Math.min(this.currentIntervalMs*2,this.feedPollIntervalMs*2):!this.feedLive&&!t&&n===0&&this.pending.size===0?Math.min(Math.max(this.currentIntervalMs,this.pollIntervalMs)*2,Math.max(this.pollIntervalMs,1e4)):this.pollIntervalMs}schedulePoll(e=this.currentIntervalMs){this.stopped||this.pollIntervalMs<=0||(this.timerDueAtMs=Date.now()+e,this.timer=setTimeout(async()=>{this.timer=void 0,this.timerDueAtMs=void 0,await this.pollNow(),this.schedulePoll()},e),this.timer.unref?.())}noteActivity(){this.stopped||this.feedLive||this.resetInterval()}resetInterval(){this.currentIntervalMs=this.pollIntervalMs,this.timer===void 0||this.timerDueAtMs===void 0||this.timerDueAtMs<=Date.now()+this.pollIntervalMs||(clearTimeout(this.timer),this.schedulePoll(this.pollIntervalMs))}offer(e,t){if(this.stopped)return 0;for(let t of e){let e=H(t.eventId);e===null||e<this.nextSlot||this.pending.set(e,t)}let n=[],r=this.pending.get(this.nextSlot);for(;r!==void 0;)n.push(r),this.pending.delete(this.nextSlot),this.nextSlot++,r=this.pending.get(this.nextSlot);return t===`push`&&this.pending.size>0&&this.resetInterval(),n.length>0&&this.onEvents(n),n.length}};const Vr=(e,t)=>e.eventId<t.eventId?-1:+(e.eventId>t.eventId);var Hr=class{events;ids=new Set;slots=new Set;unslotted;max;denseThrough=1;sorted=!0;trackedLength=0;trackedTail;constructor(e){this.events=e;let t;for(let n of e)t!==void 0&&n.eventId<t&&(this.sorted=!1),t=n.eventId,this.track(n);this.advanceWatermark(),this.trackedLength=e.length,this.trackedTail=e[e.length-1]}covers(e){return e===this.events&&e.length===this.trackedLength&&e[e.length-1]===this.trackedTail}has(e){return this.ids.has(e)}maxSlot(){return this.unslotted!==void 0&&Ke(this.unslotted),this.max}maxSlotExcept(e){this.unslotted!==void 0&&Ke(this.unslotted);let t=this.events;if(this.sorted){for(let n=t.length-1;n>=0;n--){let r=t[n];if(!e(r))return Ke(r.eventId)}return}let n;for(let r of t){if(e(r))continue;let t=Ke(r.eventId);(n===void 0||t>n)&&(n=t)}return n}slotGap(){if(this.unslotted!==void 0&&Ke(this.unslotted),!(this.max===void 0||this.denseThrough>=this.max))return tn(this.events)}merge(e){if(e.length===0)return 0;let t=[];for(let n of e)this.ids.has(n.eventId)||(this.track(n),t.push(n));if(t.length===0)return 0;let n=this.events,r=n.length>0?n[n.length-1].eventId:``,i=this.sorted;if(i)for(let e of t){if(e.eventId<r){i=!1;break}r=e.eventId}if(i)for(let e of t)n.push(e);else if(this.sorted&&t.length<=32)for(let e of t)Ur(n,e);else{for(let e of t)n.push(e);n.sort(Vr),this.sorted=!0}return this.advanceWatermark(),this.trackedLength=n.length,this.trackedTail=n[n.length-1],t.length}track(e){this.ids.add(e.eventId);let t=H(e.eventId);t===null?this.unslotted??=e.eventId:(this.slots.add(t),(this.max===void 0||t>this.max)&&(this.max=t))}advanceWatermark(){for(;this.slots.has(this.denseThrough+1);)this.denseThrough++}};function Ur(e,t){let n=0,r=e.length;for(;n<r;){let i=n+r>>>1;e[i].eventId<t.eventId?n=i+1:r=i}e.splice(n,0,t)}var Wr=class extends Error{reason;constructor(e){super(`Run-ahead stopped: ${e}`),this.reason=e,this.name=`RunAheadStopError`}static is(e){return e instanceof Error&&e.name===`RunAheadStopError`}};function Gr(e,t,n){if(n(e))return;let r=e.correlationId;switch(e.eventType){case`hook_received`:case`hook_disposed`:case`hook_conflict`:return r!==void 0&&t.sensitiveHookIds.has(r)?`${e.eventType} for a hook the workflow may be waiting on`:void 0;case`step_started`:case`step_completed`:case`step_failed`:case`step_retrying`:return r!==void 0&&t.selfStepIds.has(r)?void 0:`${e.eventType} of a step this delivery does not run`;case`wait_completed`:return`wait_completed written by another writer`;default:return}}function Kr(e,t){switch(e.eventType){case`hook_received`:case`hook_disposed`:case`hook_conflict`:return e.correlationId!==void 0&&!t.has(e.correlationId);case`attr_set`:case`noop`:return!0;default:return!1}}function qr(e){let t=new Set;for(let n of e.hookItems)n.disposed||(Ot(n)||e.observedHookIds===void 0||e.observedHookIds.has(n.correlationId))&&t.add(n.correlationId);return{sensitiveHookIds:t,selfStepIds:e.selfStepIds}}const Jr=ln(`@workflow/core//runAheadDisabledWorlds`,1,()=>({worlds:new WeakSet}));function Yr(e){return Jr.worlds.has(e)}function Xr(e){Jr.worlds.add(e)}function Zr(e){return(t(e)?.maxRetries??3)>0}function Qr(e,t){return`Step "${e}" exceeded max retries (${t} ${n(`retry`,`retries`,t)})`}async function $r(e){let t=Qr(e.stepName,e.maxRetries);we.error(`Step exceeded max retries`,{workflowRunId:e.workflowRunId,stepName:e.stepName,stepId:e.stepId,attempt:e.attempt,maxRetries:e.maxRetries});try{return{type:`failed`,result:await e.createEvent({eventType:`step_failed`,specVersion:9,correlationId:e.stepId,eventData:{stepName:e.stepName,attempt:e.attempt,error:await M(new hn(t),e.workflowRunId,e.encryptionKey,[],globalThis,(e.runSpecVersion??0)>=5)}})}}catch(e){if(Q.is(e))return{type:`gone`};throw e}}async function ei(e){let t=ti(e.stepName,e.deliveries,e.maxDeliveries),n={workflowRunId:e.workflowRunId,stepName:e.stepName,stepId:e.stepId,deliveries:e.deliveries,maxDeliveries:e.maxDeliveries,errorCode:yn.MAX_DELIVERIES_EXCEEDED};we.error(`Step message exceeded max deliveries without starting`,n);try{return{type:`failed`,result:await e.createEvent({eventType:`step_failed`,specVersion:9,correlationId:e.stepId,eventData:{stepName:e.stepName,attempt:e.attempt,error:await M(new hn(t),e.workflowRunId,e.encryptionKey,[],globalThis,(e.runSpecVersion??0)>=5)}})}}catch(e){if(Q.is(e))return{type:`gone`};throw we.error(`Failed to write step_failed for a step message past max deliveries; the queue redelivers it`,{...n,errorName:e instanceof Error?e.name:`UnknownError`,errorMessage:e instanceof Error?e.message:String(e)}),e}}function ti(e,t,n){return`Step "${e}" failed with ${yn.MAX_DELIVERIES_EXCEEDED}: its queue message was delivered ${t} times (more than ${n}) without the step starting`}async function ni(e){let{world:i,workflowRunId:o,workflowName:s,workflowStartedAt:p,stepId:h,stepName:g,attempt:_}=e,ee=!!process.env.VERCEL_URL,te=(e.runSpecVersion??0)>=5,re=e.createEvent,S={computeInstanceId:lt,...e.requestId?{requestId:e.requestId}:{},...e.stepCreatedAt!==void 0&&e.attempt===1&&e.started===void 0?{stepCreatedAt:e.stepCreatedAt}:{}},C=`step.execute ${y(g)}`;return k(C,{},async y=>{y?.setAttributes({...Ie(g),...pe(s),...d(o),...Ne(h),...j(_)});let C=X(i,o),T=t(g);if(!T||typeof T!=`function`){let t=`Step "${g}" is not registered in the current deployment. This usually indicates a build or bundling issue that caused the step to not be included in the deployment.`;V.error(`Step function not registered, failing step`,{workflowRunId:o,stepName:g,stepId:h});try{e.runReadyBarrier&&await e.runReadyBarrier,e.startAfter&&await e.startAfter;let n=await re({eventType:`step_failed`,specVersion:9,correlationId:h,eventData:{stepName:g,attempt:_,error:await M(new hn(t),o,await C(),[],globalThis,te)}},e.terminalEventParams);return y?.setAttributes({...a(`failed`),...ge(!0)}),{type:`failed`,result:n}}catch(e){if(Q.is(e))return{type:`gone`};throw e}}let E=T.maxRetries??3;if(y?.setAttributes({...de(E)}),_>E+1)return await $r({createEvent:re,workflowRunId:o,stepId:h,stepName:g,attempt:_,maxRetries:E,encryptionKey:e.encryptionKey??await C(),runSpecVersion:e.runSpecVersion});let D=e.started?.postSentAtMs,ie=e.started?.completedAtMs,O,oe={eventType:`step_started`,specVersion:9,correlationId:h,eventData:{stepName:g,attempt:_}},se=e=>{if(Cn.is(e)){let t=Math.max(1,typeof e.retryAfter==`number`?e.retryAfter:1);return V.info(`Throttled on step_started, deferring`,{retryAfterSeconds:t}),{type:`throttled`,timeoutSeconds:t}}if(wn.is(e))return{type:`throttled`,timeoutSeconds:Math.max(1,e.retryAfter??1)};if(Q.is(e))return V.info(`Workflow run "${o}" has already completed, skipping step "${h}": ${e.message}`),{type:`gone`}};if(e.startRefusal!==void 0){let t=se(e.startRefusal);if(t)return t}let le=e.forceOptimisticStart===!0&&e.started===void 0&&!qt()&&Zr(g);y?.setAttributes(be(e.started?`batch_preclaimed`:le?`optimistic`:`awaited`));let ue;if(e.started)O=e.started.startedAt;else if(le)ue=Promise.all([e.runReadyBarrier,e.startAfter]).then(async([,e])=>{e?(D=e.postSentAtMs,ie=e.completedAtMs):(D=Date.now(),await re(oe,S),ie=Date.now())}).then(()=>({ok:!0}),e=>({ok:!1,err:e})),O=new Date;else try{e.runReadyBarrier&&await e.runReadyBarrier;let t=e.startAfter?await e.startAfter:void 0;if(t)D=t.postSentAtMs,ie=t.completedAtMs,O=t.startedAt;else{D=Date.now();let e=await re(oe,S);ie=Date.now(),O=e.event?.createdAt??new Date}}catch(e){let t=se(e);if(t)return t;throw e}let N=async()=>{if(!ue)return;let t=await ue;if(t.ok){let t=e.latencyTracking?.rsfsAnchorMs;B&&B.rsfs===void 0&&t!==void 0&&D!==void 0&&(B.rsfs=Math.max(0,D-t),y?.setAttributes(u(B.rsfs)));return}let n=se(t.err);if(!n)throw t.err;return n};y?.setAttributes({...a(`running`)});let F,I=[],L=[],xe=[],z=!0,B;e.beforeBody?.();try{let t=e.encryptionKey??await C(),n=e.stateContext??ke(e.input),r=await k(`step.hydrate`,{},async r=>{let i=Date.now(),a=await ve(e.input,o,t,L,globalThis,{},e.workflowDeploymentId,xe,le?e.runReadyBarrier:void 0,n);n=ke(a)??n;let s=Date.now()-i;return r?.setAttributes({...R(n),...Ae(a.args.length),...m(s)}),a});if(dt(r)){let{message:e,hint:t}=P(`step arguments`,void 0);throw new Sn(e,{hint:t})}let a=r.args,c=r.thisVal??null,l=un(ee?`https://${process.env.VERCEL_URL}`:`http://localhost:${await tt()??3e3}`),d,ne=!1,x=Date.now();B=ht({tracking:e.latencyTracking,stepCodeStartedAtMs:x,attempt:_,lazyStepStart:!1,optimisticStart:le,preclaimedStart:e.started!==void 0,stepStartPostSentAtMs:D}),B&&y?.setAttributes({...B.ttfs===void 0?{}:v(B.ttfs),...B.stso===void 0?{}:ye(B.stso),...B.rsfs===void 0?{}:u(B.rsfs),...B.finalSchedulingReplay===void 0?{}:ce(B.finalSchedulingReplay),...Re(B.optimizations??[])});let re=()=>{let t=e.resumeTracking;if(!t||t.reported)return;let n=Mt({tracking:t,attempt:_,stepClaimStartedAtMs:D,stepClaimCompletedAtMs:ie,stepCodeStartedAtMs:Date.now()});n&&(t.reported=!0,y?.setAttributes(n))},S=`ok`,oe=performance.now();try{F=await k(`step.execute`,{},async()=>await ae.run({stepMetadata:{stepName:g,stepId:h,stepStartedAt:new Date(+(e.firstStartedAt??O)),attempt:_,maxAttempts:E+1},workflowMetadata:{workflowName:s,workflowRunId:o,workflowStartedAt:new Date(+p),url:l,features:{encryption:!!t}},workflowDeploymentId:e.workflowDeploymentId,rootRunId:e.rootRunId,ops:L,preCompletionOps:I,streamStates:xe,closureVars:r.closureVars,encryptionKey:t,runReadyBarrier:e.runReadyBarrier,runSpecVersion:e.runSpecVersion},()=>(re(),i.telemetry?.recordStepExecution?.(h),T.apply(c,a))))}catch(e){S=`error`,d=e,ne=!0}finally{Ce(performance.now()-oe,S)}let se=Date.now()-x;if(A(...a,c,r.closureVars),ne)throw await pt(xe).catch(e=>{V.warn(`Failed to drain released streams after step error`,{workflowRunId:o,stepId:h,error:e instanceof Error?e.message:String(e)})}),d;if(y?.setAttributes({...w(se)}),F=await k(`step.dehydrate`,{},async r=>{let i=Date.now(),a=me(n),s=await he(F,o,t,L,globalThis,!1,!1,te,le?e.runReadyBarrier:void 0,L,!0,n),c=Date.now()-i;return r?.setAttributes({...fe(n,a),...f(c),...b(typeof s)}),s}),L.length>0){let e=Promise.all(L);fn(e,e=>{V.warn(`Background flush of step stream ops failed`,{workflowRunId:o,stepId:h,error:e instanceof Error?e.message:String(e)})}),z=!1;let t=Promise.race([e.then(()=>{z=!0},e=>{if(Et(e))z=!0;else throw e}),new Promise(e=>setTimeout(e,500))]);t.catch(()=>{}),await pt(xe),await t}I.length>0&&await Promise.all(I).catch(()=>{})}catch(t){if(r.is(t))throw t;I.length>0&&await Promise.all(I).catch(()=>{});let i=Rt(t),s=await K(i),u=s.stack||zt(i)||``;i instanceof Error&&y?.recordException?.(i);let d=hn.is(i);if(y?.setAttributes({..._e(Lt(i)),...Se(s.message),...l(Lt(i)),...Le(d?`fatal`:xn.is(i)?`retryable`:`transient`),...ne(!d)}),Q.is(t))return we.warn(`Workflow run gone, skipping step`,{workflowRunId:o,stepId:h,during:`body`,message:t.message,status:t.status}),{type:`gone`};let f=await N();if(f)return f;let p=async(t,n)=>{try{let r=await re({eventType:`step_failed`,specVersion:9,correlationId:h,eventData:{stepName:g,attempt:_,error:await M(t,o,await C(),[],globalThis,te),...B}},{...e.terminalEventParams,afterStepBody:!0});return y?.setAttributes({...a(`failed`),...n}),{type:`failed`,result:r}}catch(e){if(Q.is(e))return{type:`gone`};throw e}};if(d)return we.error(`Encountered FatalError while executing step, bubbling up to parent workflow`,{workflowRunId:o,stepName:g,errorStack:u}),On.isNativeError(i)&&u&&U(i,u),p(i,ge(!0));y?.setAttributes({...j(_),...de(E)});let m=e=>{let n=new hn(e);return n.cause=t,u&&(n.stack=u),n};if(_>=E+1)return we.error(`Max retries reached, bubbling error to parent workflow`,{workflowRunId:o,stepName:g,attempt:_,retryCount:_-1,errorStack:u}),p(m(`Step "${g}" failed after ${E} ${n(`retry`,`retries`,E)}: ${s.message}`),c(!0));let v=xn.is(t)?new Date(t.retryAfter):new Date(Date.now()+1e3);if(e.retryOutlivesMessage?.(v.getTime()))return we.error(`Step retry would outlive its queue message, failing the step`,{workflowRunId:o,stepName:g,attempt:_,retryAt:v.toISOString()}),p(m(`Step "${g}" could not be retried: its next attempt at ${v.toISOString()} is past the retention of its queue message: ${s.message}`),c(!0));xn.is(t)?we.info(`Encountered RetryableError, step will be retried`,{workflowRunId:o,stepName:g,attempt:_,message:t.message}):we.info(`Encountered Error, step will be retried`,{workflowRunId:o,stepName:g,attempt:_,errorStack:u}),On.isNativeError(t)&&u&&U(t,u);let ee;try{ee=await re({eventType:`step_retrying`,specVersion:9,correlationId:h,eventData:{stepName:g,attempt:_,error:await M(t,o,await C(),[],globalThis,te),retryAfter:v}})}catch(e){if(Q.is(e))return{type:`gone`};throw e}let b=Math.max(1,Math.ceil((v.getTime()-Date.now())/1e3));return y?.setAttributes({...Fe(b),...x(!0)}),{type:`retry`,timeoutSeconds:b,retryAt:v,result:ee}}let Te=await N();if(Te)return Te;let Ee;try{Ee=await re({eventType:`step_completed`,specVersion:9,correlationId:h,eventData:{stepName:g,workflowName:s,result:F,...B}},e.terminalEventParams)}catch(e){if(Q.is(e))return we.warn(`Workflow run gone, skipping step`,{workflowRunId:o,stepId:h,during:`outcome`,message:e.message,status:e.status}),{type:`gone`};throw e}return y?.setAttributes({...a(`completed`),...b(typeof F)}),L.length>0&&we.debug(`Step has pending ops`,{workflowRunId:o,stepName:g,opsCount:L.length}),{type:`completed`,hasPendingOps:!z,result:Ee}})}function ri(e){return e.deliveryCount!==1||(e.stepAttempt??1)>1||e.stepResent===!0}function ii(e){return{action:`run`,attempt:e??1}}function ai(e,t){if(e?.eventType!==`step_retrying`)return;let n=e.eventData?.retryAfter,r=n?new Date(n).getTime():NaN;if(!(!Number.isFinite(r)||r<=t))return{action:`redeliver`,timeoutSeconds:Math.max(1,Math.ceil((r-t)/1e3)),reason:`retry-after`}}function oi(e){return e.deliveryCount!==1||(e.stepAttempt??1)>1}function si(e){let{events:t,stepId:n,maxRetries:r,nowMs:i}=e,a=0,o,s,c;for(let e of t){if(Ge(e.eventType))return{action:`ack`,reason:`run-terminal`};if(e.correlationId===n)switch(e.eventType){case`step_completed`:case`step_failed`:return{action:`ack`,reason:`step-terminal`};case`step_started`:a++,o??=new Date(e.createdAt),s=e;break;case`step_retrying`:c=e,s=e}}if(s!==void 0&&s===c){let e=c.eventType===`step_retrying`?c.eventData.retryAfter:void 0,t=e?new Date(e).getTime():void 0;if(t!==void 0&&t>i)return{action:`redeliver`,timeoutSeconds:Math.max(1,Math.ceil((t-i)/1e3)),reason:`retry-after`}}let l=a+1;return l>r+1?{action:`fail`,attempt:l,reason:`max-retries`}:o?{action:`run`,attempt:l,firstStartedAt:o}:{action:`run`,attempt:l}}const ci=qe;function li(e){let{events:t,stepId:n,nowMs:r}=e,i=r-(e.windowMs??ci),a,o=e=>{Number.isFinite(e)&&(a===void 0||e>a)&&(a=e)};for(let e of t)if(e.correlationId===n)switch(e.eventType){case`step_created`:case`step_started`:o(new Date(e.createdAt).getTime());break;case`step_retrying`:{o(new Date(e.createdAt).getTime());let t=e.eventData.retryAfter;t&&o(new Date(t).getTime());break}}return a===void 0||a<i}function ui(e){return e>0?604800:86400}function di(e){let{messageCreatedAt:t,retentionSeconds:n,retryAtMs:r}=e;return t?r>t.getTime()+(n-1800)*1e3:!1}function fi(e,t,n,r=`warn`){return vt(e,t,n,()=>({type:`throttled`,timeoutSeconds:1}),r)}async function pi(e){let{world:n,runId:r,workflowName:i,payload:a,meta:o,span:s}=e,{stepId:c,stepName:l}=a,u=await yi(e);if(u===`terminal`)return;let d={...e,specVersion:u.specVersion};if(s?.setAttributes(Te(a.runContext?`run_context`:`runs_get`)),!await e.guardDeployment({runId:r,deploymentId:u.deploymentId,specVersion:u.specVersion}))return;let f=t(l)?.maxRetries??3,{log:p,decision:m,pastCap:h,logRead:g}=await mi(e,f);if(h)return gi({ctx:e,wakeCtx:d,attempt:h.attempt,deliveries:h.deliveries,maxDeliveries:h.maxDeliveries,runSpecVersion:u.specVersion});s?.setAttributes({...Ne(c),...Ie(l),...z(m.action),...Me(g),...`reason`in m?N(m.reason):{},...m.action===`redeliver`?F(m.timeoutSeconds):{}}),V.debug(`Step delivery decision`,{workflowRunId:r,stepId:c,deliveryCount:o.deliveryCount,decision:m.action,...`reason`in m?{reason:m.reason}:{}});let _=(t,i)=>n.events.create(r,t,{...i,inBand:!1,...e.requestId?{requestId:e.requestId}:{}}),v=X(n,r);switch(m.action){case`ack`:m.reason===`step-terminal`&&await vi(d);return;case`redeliver`:return{timeoutSeconds:m.timeoutSeconds};case`fail`:(await $r({createEvent:_,workflowRunId:r,stepId:c,stepName:l,attempt:m.attempt,maxRetries:f,encryptionKey:await v(),runSpecVersion:u.specVersion})).type!==`gone`&&await vi(d);return}let ee=await xi(e,p),y=bi(e,p),te=ui(f),b=await fi(r,c,()=>ni({world:n,createEvent:_,workflowRunId:r,workflowDeploymentId:u.deploymentId,workflowName:i,workflowStartedAt:u.startedAt??Date.now(),rootRunId:u.rootRunId??r,requestId:e.requestId,stepId:c,stepName:l,runSpecVersion:u.specVersion,attempt:m.attempt,...m.firstStartedAt?{firstStartedAt:m.firstStartedAt}:{},input:ee,...y===void 0?{}:{stepCreatedAt:y},forceOptimisticStart:p===void 0&&Y(),retryOutlivesMessage:e=>di({messageCreatedAt:o.createdAt,retentionSeconds:te,retryAtMs:e}),...e.resumeTracking?{resumeTracking:e.resumeTracking}:{}}));switch(b.type){case`gone`:return;case`throttled`:return{timeoutSeconds:b.timeoutSeconds};case`retry`:return await vi(d),{timeoutSeconds:b.timeoutSeconds};case`completed`:case`failed`:await vi(d);return}}async function mi(e,t){let{runId:n,payload:r,meta:i}=e,{stepId:a,stepName:o}=r,s=Zt(),c=i.attempt,l=c!==void 0&&c>s;if(l&&_i({runId:n,stepId:a,stepName:o,attempt:c,maxDeliveries:s}),!l&&!ri({deliveryCount:i.deliveryCount,stepAttempt:r.stepAttempt,stepResent:r.stepResent}))return{log:void 0,decision:ii(r.stepAttempt),logRead:`none`};if(oi({deliveryCount:i.deliveryCount,stepAttempt:r.stepAttempt})){let t=await hi(e);if(t)return{log:void 0,decision:t,logRead:`step_tail`}}let u=(await nn(n,void 0,{specVersion:9})).events,d=Date.now(),f=si({events:u,stepId:a,maxRetries:t,nowMs:d});return l&&f.action===`run`&&li({events:u,stepId:a,nowMs:d})?{log:u,decision:f,pastCap:{attempt:f.attempt,deliveries:c,maxDeliveries:s},logRead:`full_log`}:{log:u,decision:f,logRead:`full_log`}}async function hi(e){let{world:t,runId:n,payload:r}=e;try{return ai((await t.events.listByCorrelationId({correlationId:r.stepId,runId:n,pagination:{sortOrder:`desc`,limit:1},resolveData:`none`})).data[0],Date.now())}catch(e){V.debug(`Pending-retry read failed; reading the full log`,{workflowRunId:n,stepId:r.stepId,error:e instanceof Error?e.message:String(e)});return}}async function gi(e){let{ctx:t,wakeCtx:n}=e,{world:r,runId:i,span:a}=t,{stepId:o,stepName:s}=t.payload;a?.setAttributes({...Ne(o),...Ie(s),...z(`fail`),...N(`max-deliveries`)}),(await ei({createEvent:(e,n)=>r.events.create(i,e,{...n,inBand:!1,...t.requestId?{requestId:t.requestId}:{}}),workflowRunId:i,stepId:o,stepName:s,attempt:e.attempt,deliveries:e.deliveries,maxDeliveries:e.maxDeliveries,encryptionKey:await X(r,i)(),runSpecVersion:e.runSpecVersion})).type!==`gone`&&await vi(n)}function _i(e){let t=e.attempt-e.maxDeliveries;t&t-1||V.warn(`Step message delivered past max deliveries`,{workflowRunId:e.runId,stepId:e.stepId,stepName:e.stepName,attempt:e.attempt,maxDeliveries:e.maxDeliveries})}async function vi(e){await Jt(e.world,sn(e.workflowName,e.namespace),{runId:e.runId,traceCarrier:await e.nextTraceCarrier(),requestedAt:new Date},{specVersion:e.specVersion})}async function yi(e){if(e.payload.runContext)return e.payload.runContext;let t=e.prefetchedRun??await e.world.runs.get(e.runId,{resolveData:`none`});return t.status===`running`?{deploymentId:t.deploymentId,specVersion:t.specVersion??1,...t.startedAt?{startedAt:+t.startedAt}:{},rootRunId:Yt(t.attributes,e.runId)}:(V.debug(`Run already finished, skipping background step`,{workflowRunId:e.runId,status:t.status}),`terminal`)}function bi(e,t){if(e.payload.stepCreatedAt!==void 0)return e.payload.stepCreatedAt;let n=t?.find(t=>t.correlationId===e.payload.stepId&&t.eventType===`step_created`),r=n?new Date(n.createdAt).getTime():void 0;return r!==void 0&&Number.isFinite(r)?r:void 0}async function xi(e,t){if(e.payload.stepInput)return e.payload.stepInput.input;let n=e.payload.stepCreatedEventId;if(n===void 0&&(n=(t??(await nn(e.runId,void 0,{specVersion:9})).events).find(t=>t.correlationId===e.payload.stepId&&In(t)!==void 0)?.eventId),n===void 0)throw Error(`Step "${e.payload.stepId}" of run "${e.runId}" has no creation event`);let r=await e.world.events.get(e.runId,n,{resolveData:`all`,specVersion:9}),i=r.eventType===`step_created`||r.eventType===`step_started`&&In(r)!==void 0?r.eventData?.input:void 0;if(i===void 0)throw Error(`Event "${n}" of run "${e.runId}" is not the creation of "${e.payload.stepId}"`);return i}function Si(e){let{run:n,step:r,traceCarrier:i,delaySeconds:a,hookResumeTiming:o}=e,s=(n.specVersion??0)>=3&&r.input instanceof Uint8Array&&r.input.byteLength<=131072;return{message:{runId:n.runId,stepId:r.correlationId,stepName:r.stepName,traceCarrier:i,requestedAt:new Date,runContext:Ut(n),...r.stepCreatedEventId?{stepCreatedEventId:r.stepCreatedEventId}:{},...Hn(r),...s?{stepInput:{input:r.input}}:{},...r.stepAttempt!==void 0&&r.stepAttempt>1?{stepAttempt:r.stepAttempt}:{},...r.resent?{stepResent:!0}:{},...o?{hookResumeTiming:o}:{}},opts:{idempotencyKey:rn(r.correlationId,r.stepName),retentionSeconds:ui(t(r.stepName)?.maxRetries??3),...a!==void 0&&a>0?{delaySeconds:a}:{}}}}async function Ci(e,t,n,r,i){if(n.length===0)return;let a=n.map(r),o=[];for(let r=0;r<n.length;r+=16){let s=r+16;o.push(Vt(e,t,a.slice(r,s)).then(()=>i?.(n.slice(r,s))))}let s=(await Promise.allSettled(o)).find(e=>e.status===`rejected`);if(s)throw s.reason}async function wi({suspension:e,world:t,run:n,span:r,requestId:i,eventLog:a,replayRecoveryReporter:s,forceClaimVictimWakes:c,writeEvent:l,terminalDrain:u}){let d=n.runId,f=dn(t,d,a?.events,{alreadyWoken:c}),p=s??ut.inert(),m=(e,n)=>p.withEventCreate(n,n=>l?l(e,n):t.events.create(d,e,n)),h=async(e,t)=>{if(!a)return m(e,t);let n=a,r=await m(e,{...t,...Kt(n.events)});if(typeof t?.sinceCursor==`string`)return n.cursor===t.sinceCursor&&r.events!==void 0&&r.hasMore!==!0&&(Z(n.events,r.events),n.cursor=r.cursor??n.cursor),r;let i=en(n.events,r);return i.truncated?V.debug(`Dropped a truncated skipped-slot report`,{workflowRunId:d,eventType:e.eventType,eventId:r.event?.eventId,offered:i.offered}):i.added>0&&V.debug(`Suspension write skipped occupied slots`,{workflowRunId:d,eventType:e.eventType,eventId:r.event?.eventId,reported:i.added}),r},g=e.items.filter(e=>e.type===`step`),_=e.items.filter(e=>e.type===`hook`&&!(u&&e.isSystem&&!e.hasCreatedEvent&&!e.abortRequested)),v=e.items.filter(e=>e.type===`wait`),ee=e.items.filter(e=>e.type===`attribute`),y=_.filter(e=>!e.hasCreatedEvent),te=await Ct({suspension:e,world:t,run:n,runId:d,requestId:i,allHookItems:_,hooksNeedingCreation:y,eventLog:a,forceClaimVictimWakes:c,createGuarded:h,eventSpecVersion:9,terminalDrain:u}),{dehydrateInput:b,blockers:ne,hookConflictCorrelationIds:x,awaitedHookCorrelationIds:re,hookOp:S}=te,C=0,w=new Set(g.filter(e=>!e.hasCreatedEvent).map(e=>e.correlationId)),E=[];S&&E.push(S);for(let e of g)w.has(e.correlationId)&&E.push((async()=>{let t;try{t=await b({args:e.args,closureVars:e.closureVars,thisVal:e.thisVal},{source:`step_input`,correlationId:e.correlationId})}catch(e){throw e}try{await h({eventType:`step_created`,specVersion:9,correlationId:e.correlationId,eventData:{stepName:e.stepName,workflowName:n.workflowName,input:t,inline:!1}},{requestId:i})}catch(t){if(mn.is(t)||Q.is(t))V.info(`Step not recorded by the drain, continuing`,{workflowRunId:d,correlationId:e.correlationId,message:t.message});else throw t}})());for(let e of v)e.hasCreatedEvent||E.push((async()=>{try{await h({eventType:`wait_created`,specVersion:9,correlationId:e.correlationId,eventData:{resumeAt:e.resumeAt}},{requestId:i})}catch(t){if(mn.is(t)||Q.is(t))V.info(`Wait not recorded by the drain, continuing`,{workflowRunId:d,correlationId:e.correlationId,message:t.message});else throw t}})());for(let e of ee)E.push((async()=>{try{await h({eventType:`attr_set`,specVersion:9,correlationId:e.correlationId,eventData:{changes:e.changes,writer:{type:`workflow`},...e.allowReservedAttributes?{allowReservedAttributes:!0}:{}}},{requestId:i})}catch(t){if(mn.is(t))V.info(`Workflow attribute event already exists, continuing`,{workflowRunId:d,correlationId:e.correlationId,message:t.message});else if(Tt(t)){let e=new hn(`setAttributes failed World validation: ${t instanceof Error?t.message:String(t)}`);throw e.cause=t,e}else throw t}})());let D=Promise.allSettled(E.filter(e=>e!==S)).then(()=>Date.now());try{await Dt(E)}finally{await f}let ie=te.hookGroupsWindow();if(ie?.endMs!==void 0){let e=Math.max(ie.startMs,await D);C+=Math.max(0,ie.endMs-e)}return r?.setAttributes({...o(`workflow_suspended`),...T(g.length),...Oe(y.length),...De(v.length)}),{hookConflictCorrelationIds:x,awaitedHookCorrelationIds:re,hookCreationMs:C,serializationBlockerCount:ne.count,serializationBlockers:ne.sample}}function Ti(e,t){return async(n,r)=>{await wi({suspension:n,world:e,run:r,writeEvent:t,terminalDrain:!0})}}function Ei(e){let{resumeAtMs:t,nowMs:n,afterHopAtMs:r}=e,i=mt()*1e3,a=t-n,o=a<=i?t:t-(Math.ceil(a/i)-1)*i;return r!==void 0&&(o=Math.max(o,Math.min(t,r+i))),o}function Di(e){let{correlationId:t,resumeAtMs:n,seconds:r,nowMs:i,attempt:a=0,afterHopAtMs:o}=e,s=mt(),c=Ei({resumeAtMs:n,nowMs:i,afterHopAtMs:o}),l=c<n;return{delaySeconds:Math.min(s,l?Math.max(1,Math.ceil((c-i)/1e3)):r),hopAtMs:c,idempotencyKey:Oi({correlationId:t,resumeAtMs:n,hopAtMs:c,attempt:a}),waitContinuation:{correlationId:t,attempt:a,...l?{resumeAtMs:n,hopAtMs:c}:{}}}}function Oi(e){let{correlationId:t,resumeAtMs:n,hopAtMs:r,attempt:i=0}=e;return`wait:${t}:${n}:${r}${i>0?`:a${i}`:``}`}function ki(e){return e.mayHoldCoalescedTimer&&!e.intermediate&&e.attempt===0}function Ai(e){let{correlationId:t,resumeAtMs:n,nowMs:r}=e;return`wait:${t}:${n}:s${Math.floor(r/1e3)}`}const ji=ln(`@workflow/core//sentNearDueTimerKeys`,1,()=>({keys:new Set}));async function Mi(e,t){let{keys:n}=ji;if(n.has(e))return!1;n.add(e);try{await t()}catch(t){throw n.delete(e),t}for(;n.size>1e4;){let e=n.values().next().value;if(e===void 0)break;n.delete(e)}return!0}function Ni(e){return e.catch(()=>{}),e}function Pi(e,t){return{eventId:Ue(1),runId:e,eventType:`run_created`,specVersion:t.specVersion??9,createdAt:new Date(et(e)??Date.now()),eventData:{deploymentId:t.deploymentId,workflowName:t.workflowName,input:t.input,...t.executionContext?{executionContext:t.executionContext}:{},...t.attributes?{attributes:t.attributes}:{}}}}function Fi(e){return e?{startedAt:new Date(e.event.createdAt),postSentAtMs:e.postSentAtMs,completedAtMs:e.completedAtMs}:void 0}async function Ii(e){let t={handoff:!1},n=await Li(e,t);return(t.exit!==void 0||t.handoff)&&(e.span?.setAttributes({...t.exit===void 0?{}:p(t.exit.split(`:`,1)[0]??t.exit),...S(t.handoff)}),V.debug(`Spec 9 delivery ended early`,{workflowRunId:e.message.runId,exit:t.exit,handoff:t.handoff,deliveryCount:e.metadata.deliveryCount,attempt:e.metadata.attempt,messageId:e.metadata.messageId,requestId:e.requestId})),t.handoff&&n===void 0?{timeoutSeconds:0}:n}async function Li(n,r){let{workflowCode:a,namespace:c,metadata:u,world:d,span:f,runLogger:p,workflowName:m,requestId:v,nextTraceCarrier:y,replayBudget:b,prefetchedRun:ne,runSpecVersion:x}=n,{resumeTracking:S}=n,{runId:w,stepId:T,stepName:ae,deploymentMismatchRetryCount:ce,runInput:k,hookInput:A,stepInput:de,stepAttempt:fe,stepResent:j,stepCreatedEventId:pe,stepCreatedAt:M,runContext:me,hookResumeTiming:N,waitContinuation:P,completeWaits:he,recovery:F}=n.message,ge=new Set(he??[]),_e=u.messageId,ve=u.deliveryCount===void 0?void 0:Math.min(u.deliveryCount,u.attempt),ye=u.deliveryCount!==1,L=F===!0&&!T,be=Gn({deliveryCount:u.deliveryCount,recovery:L}),R=qn({runId:w,messageId:_e,invocationStartedAt:u.invocationStartedAt}),z={sent:0,tooOld:0},Se=()=>f?.setAttributes({...I(z.sent),...Pe(z.tooOld),...L?le(!0):{}}),Ce=e=>{if(!be)return new Set;let t=Wn({events:e,deliveryCount:u.deliveryCount,nowMs:Date.now(),recovery:L,exclude:{has:e=>R.sent.has(e)||R.tooOld.has(e)}});for(let e of t.tooOld)R.tooOld.add(e);return z.tooOld+=t.tooOld.length,t.tooOld.length>0&&V.info(`Not re-sending step messages whose last send is past the re-send age bound`,{workflowRunId:w,correlationIds:t.tooOld.slice(0,10),count:t.tooOld.length}),R.swept=!0,Se(),new Set(t.resend)},we=e=>{R.sent.add(e),z.sent++,Se()},Te=u.invocationStartedAt??Date.now(),De=await Ze(d,Te),Oe=0,ke=new Set,Ae=[],je=ut.inert(),Me=0,Ne,Fe,Ie=await ue(e=>{if(e&&!Pt(e)&&!q(e.executionContext))return Fe!==e.workflowName&&(Fe=e.workflowName,Ne=rt(a,e.workflowName),Ne.catch(()=>{})),Ne}),Le=e(()=>{let e=cn(d,w);return e.catch(()=>{}),e}),Re,Ve=e=>{if(e&&!Pt(e))return Re||=new E(Le.value),Re},Ge=e=>{if(He(e)&&`eventData`in e&&e.eventData){let t=e.eventData;Ve(t),Ie(t)}Re?.prepareEvent(e)},Ke=new Map,qe=new Set,tt=new Map,dt=new Map,pt=new Set,mt=new Set,ht=e=>{let t=e.correlationId;if(!t)return;let n=In(e);if(n&&!dt.has(t)&&dt.set(t,e.eventId),e.eventType===`step_created`&&n&&!n.inline)Ke.set(t,{correlationId:t,stepName:n.stepName,stepCreatedEventId:e.eventId,stepCreatedAt:new Date(e.createdAt),input:e.eventData.input});else if(e.eventType===`step_retrying`){let n=e.eventData;if(n.stepName===void 0)return;Ke.set(t,{correlationId:t,stepName:n.stepName,stepAttempt:(n.attempt??1)+1,...n.retryAfter===void 0?{}:{retryAfter:new Date(n.retryAfter)}})}else e.eventType===`step_completed`||e.eventType===`step_failed`?Ke.delete(t):e.eventType===`wait_created`?tt.set(t,e):e.eventType===`wait_completed`&&(tt.delete(t),mt.add(t))},vt=e=>{Ke.delete(e),qe.add(e)},Ct=()=>{let e=new Sr(d,w);return e.onAccepted=ht,e},G=Ct(),Tt,Et,Dt=Bt()&&k!==void 0&&_t(k)&&u.attempt===1&&(u.deliveryCount??1)===1&&!T&&!A&&!P;f?.setAttributes(_(Dt));let Ot,Mt,Rt,Vt,Ut=Dt&&!qt(),Kt=async()=>{await Ot?.catch(()=>{})},J,Zt,Y=e=>(Zt?.covers(e)||(Zt=new Hr(e)),Zt),en=()=>{if(!J)return{};let e=Y(J.events),t=X.size===0&&tn.size===0?e.maxSlot():e.maxSlotExcept(e=>{if(tn.has(e))return!0;let t=H(e.eventId);return t!==null&&X.has(t)});return t===void 0?{}:{eventCount:t}},tn=new Set,rn=[],X=new Set,Z=!1,ln=!1,un=new Set,dn=0,fn=e=>{let t=Rt;if(t&&t!==e?(Rt=void 0,fn(t)):t&&(Rt=void 0),!J||!e.event)return;if(Z){rn.push(e);return}if(e.hasMore){ln=!0;return}let n=e.event,r=(e.events??[]).filter(e=>e.eventId!==n.eventId),i=Math.max(Y(J.events).maxSlot()??0,$t(r)??0),a=H(n.eventId);if(a!==null&&a>i+1)ln=!0;else{a!==null&&un.add(a);for(let e of r)Ge(e);Ge(n),Y(J.events).merge([...r,n])}},_n=e=>{for(let t of e.events??[])Ge(t);return e.event&&Ge(e.event),e},xn=async(e,t)=>{let n=await G.create(e,t?.eventCount===void 0?{...en(),...t}:t);return fn(n),n},Sn=async(e,t)=>je.withEventCreate({...en(),resolveData:on,...t},t=>xn(e,t)),Cn=async()=>{let e=await G.exclusive(async()=>{let e=await nn(w,void 0,{specVersion:9});return G.adoptSnapshot(br(w,e)),e});for(let t of e.events)Ge(t);return ln=!1,J={events:e.events,cursor:e.cursor},J},wn=async()=>{if(ln=!1,!J||J.cursor===null)return Cn();let e=J.cursor,t=await Ar(t=>nn(w,e,{signal:t,specVersion:9}),{timeoutMs:Or(),label:`Incremental event log read`,runId:w});for(let e of t.events)Ge(e);return Y(J.events).merge(t.events),J.cursor=t.cursor??J.cursor,J},$,jn=st(void 0),Hn=-1,Un,Kn,Jn=0,Xn=async e=>{let t=W(e);return t?(Ot&&await Ot,await at({world:d,workflowRun:$,runId:w,workflowName:m,requestId:v,err:e,errorCode:t,logMessage:`Fatal runtime error during workflow setup`}),!0):!1},nr=async()=>({runId:w,traceCarrier:await y(),requestedAt:new Date}),ar=async(e,t,n)=>{let i=t!==void 0&&t>0;!i&&e===void 0?(await Et?.(),r.handoff=!0):await Jt(d,sn(m,c),{...await nr(),...e},{specVersion:x,...i?{delaySeconds:t}:{},...n===void 0?{}:{idempotencyKey:n}})},ur=async(e,n,r,i)=>{let{outcome:a,spanAttributes:o}=await At({world:d,run:e,workflowName:m,requestId:v,retryCount:ce,beforeStop:r,writeEvent:i,isDeploymentUnavailableError:d.isDeploymentUnavailableError,reenqueue:async({deploymentId:e,specVersion:r,deploymentMismatchRetryCount:i,delaySeconds:a})=>{let o=await n();await Jt(d,sn(m,c),{...o,deploymentMismatchRetryCount:i},{deploymentId:e,specVersion:r??x,delaySeconds:a,...o.stepId!==void 0&&o.stepName!==void 0?{retentionSeconds:ui(t(o.stepName)?.maxRetries??3)}:{}})}});return o&&f?.setAttributes(o),a},dr=P?.resumeAtMs;if(P&&dr!==void 0){let e=ne;try{e??=await d.runs.get(w,{resolveData:`none`})}catch(e){if(!Tn.is(e))throw e}if(!e||We(e.status))return;let t=Date.now(),n=Di({correlationId:P.correlationId,resumeAtMs:dr,seconds:Math.max(0,Math.ceil((dr-t)/1e3)),nowMs:t,attempt:P.attempt,afterHopAtMs:P.hopAtMs});V.debug(`Wait timer hop; sending the next hop`,{workflowRunId:w,correlationId:P.correlationId,delaySeconds:n.delaySeconds,intermediate:n.waitContinuation.resumeAtMs!==void 0}),f?.setAttributes(B(!0)),await ar({waitContinuation:n.waitContinuation},n.delaySeconds,n.idempotencyKey);return}if(T&&ae){let e=S;S=void 0;try{return await pi({world:d,runId:w,workflowName:m,namespace:c,requestId:v,payload:{stepId:T,stepName:ae,stepAttempt:fe,stepResent:j,stepInput:de,stepCreatedEventId:pe,stepCreatedAt:M,runContext:me},prefetchedRun:ne,meta:u,resumeTracking:e,span:f,nextTraceCarrier:y,guardDeployment:async e=>await ur(e,async()=>({...await nr(),stepId:T,stepName:ae,...fe?{stepAttempt:fe}:{},...j?{stepResent:j}:{},...de?{stepInput:de}:{},...pe?{stepCreatedEventId:pe}:{},...M===void 0?{}:{stepCreatedAt:M},...me?{runContext:me}:{},...N?{hookResumeTiming:N}:{}}))===`continue`})}catch(e){let t=W(e);if(!t)throw e;await at({world:d,workflowRun:$,runId:w,workflowName:m,requestId:v,err:e,errorCode:t,logMessage:`Fatal error while preparing background workflow step`});return}}if((!be||R.swept)&&!k&&!A&&!P&&ge.size===0&&Nn(d,w)){let e=(await d.events.list({runId:w,pagination:{sortOrder:`desc`,limit:1},resolveData:`none`,specVersion:9})).data[0]?.eventId,t=e===void 0?void 0:H(e)??void 0;if(Fn({world:d,runId:w,tailSlot:t,nowMs:Date.now()})){f?.setAttributes(B(!0)),V.debug(`Nothing new since the last consumed position; acknowledging without a replay`,{workflowRunId:w,tailSlot:t});return}}for(;;)try{let e=await hr();return sr(w),e}catch(e){let t=Vt?Vt.error:e;if(_r.is(t)||G.isSuperseded){Pn(d,w),V.info(`Orchestrator write refused by the in-band fence; sending the messages its own writes owe and redelivering the message`,{workflowRunId:w,loopIteration:Oe,unsentStepMessages:Ke.size,expectedSeqInBand:G.expectedSeqInBand}),f?.setAttributes(C(!0));let e=or(w);if(cr(e)){let t=G.stopCause;V.warn(`Orchestrator writes of this run keep being refused by the in-band fence`,{workflowRunId:w,consecutiveRefusals:e,deliveryCount:ve,expectedSeqInBand:G.expectedSeqInBand,refusalSeq:t?.seq,refusalSeqInBand:t?.seqInBand}),f?.setAttributes(ze(e))}return r.exit=`superseded:${t?.message?.slice(0,200)}`,await Tt?.(),r.handoff=!1,{timeoutSeconds:1}}if(!Vt&&(Wr.is(t)||Wr.is(G.stopCause))){Pn(d,w),await G.idle();let e=Wr.is(t)?t.reason:G.stopCause.reason;if(await Tt?.(),Me>=1){V.info(`Run-ahead stopped again after a restart in place; handing the run to the next delivery`,{workflowRunId:w,reason:e,runAheadRestarts:Me}),r.exit=`run-ahead-stop-handoff:${e}`,r.handoff=!0;return}Me++,V.info(`Run-ahead stopped before writing from a speculative state; continuing in place from a fresh load`,{workflowRunId:w,reason:e,runAheadRestarts:Me}),r.exit=`run-ahead-restart:${e}`,fr();continue}if(Vt){if(St(t,k,w,f))return;if(mn.is(t)||Q.is(t)){V.info(`Run already finished during setup, skipping`,{workflowRunId:w,message:t.message});return}if(Ot=void 0,await Xn(t))return}throw t}function fr(){G=Ct(),J=void 0,tn.clear(),X.clear(),rn.length=0,Z=!1,ln=!1,dn=0,Dt=!1,Ut=!1,Rt=void 0,Mt=void 0,Ot=void 0,Tt=void 0,Et=void 0}function pr(){return{eventType:`run_started`,specVersion:k?.specVersion??9,...k?{eventData:{input:k.input,deploymentId:k.deploymentId,workflowName:k.workflowName,executionContext:k.executionContext,attributes:k.attributes,allowReservedAttributes:k.allowReservedAttributes,dynamicWorkflowCode:k.dynamicWorkflowCode,dynamicWorkflowCodeRef:k.dynamicWorkflowCodeRef,encryptionPublicKey:k.encryptionPublicKey,startHook:k.startHook}}:{}}}function mr(e){G.adoptSnapshot({seq:1,seqInBand:1}),J={events:[Pi(w,e)],cursor:null},f?.addEvent(`workflow.run_started.create.start`,{"workflow.run_started.skip_preload":!0});let t=G.createRequired(pr(),{requestId:v,skipPreload:!0,resolveData:on});Mt=t,Ot=t.then(e=>{Rt=e;let t=st(e.maxEvents);t!==void 0&&(jn=t)},e=>{throw Vt={error:e},e}),Ot.catch(()=>{});let n=new Date;return{runId:w,status:`running`,deploymentId:e.deploymentId,workflowName:e.workflowName,specVersion:e.specVersion,executionContext:e.executionContext,input:e.input,...e.dynamicWorkflowCode?{dynamicWorkflowCode:e.dynamicWorkflowCode}:{},attributes:e.attributes??{},startedAt:n,createdAt:n,updatedAt:n}}async function hr(){let e;if(Dt&&k){e=mr(k);try{Ie(k),Ve(k);for(let e of J?.events??[])Ge(e)}catch(e){if(!await Xn(e))throw e;return}if(Kn=+e.startedAt,S&&(S.setupSource=`run_started`),await ur(e,nr,Kt,xn)!==`continue`)return}else{let[t,r]=await Promise.allSettled([Cn(),ne??d.runs.get(w,{resolveData:`none`})]);if(e=r.status===`fulfilled`?r.value:void 0,!e){if(!k)throw r.status===`rejected`?r.reason:new En(`Workflow run "${w}" not found`);J={events:[],cursor:null},G.hasSnapshot||G.adoptSnapshot(xr)}else if(t.status===`rejected`){if($??=e,await Xn(t.reason))return;throw t.reason}if(e&&We(e.status)){V.info(`Workflow already completed or failed, skipping`,{workflowRunId:w,status:e.status});return}if(e&&await $e({world:d,message:n.message,metadata:u,run:e,singleOrchestrator:!0})||(kn(J,`The event log is loaded before setup`),e&&await ur(e,async()=>({...await nr(),...A?{hookInput:A}:{},...N?{hookResumeTiming:N}:{}}),void 0,xn)!==`continue`))return;if(J.events.some(e=>e.eventType===`run_started`)){try{gt(k,e??{runId:w},f,`run_load`)}catch(e){if(!await Xn(e))throw e;return}S&&(S.setupSource=`event_load`)}else{try{Ie(k),Ve(k),f?.addEvent(`workflow.run_started.create.start`,{"workflow.run_started.skip_preload":!1});let t=await Sn(pr(),{requestId:v});gt(k,t.run??{runId:w},f),e=t.run??e,jn=st(t.maxEvents),Kn=Date.now(),S&&(S.setupSource=`run_started`)}catch(e){if(St(e,k,w,f))return;if(mn.is(e)||Q.is(e)){V.info(`Run already finished during setup, skipping`,{workflowRunId:w,message:e.message});return}if(!await Xn(e))throw e;return}await Cn()}}kn(e,`Workflow run must be loaded before replay`),kn(J,`The event log is loaded before replay`),Un=J.events.every(e=>e.eventType===`run_created`||e.eventType===`run_started`||e.eventType===`attr_set`||Je(e));let i=J.events.find(He),l=i&&`eventData`in i?i.eventData?.input:void 0,g;try{g=l===void 0?Dt&&k?k.input:(await d.runs.get(w,{resolveData:`all`})).input:l}catch(e){if(!await Xn(e))throw e;return}let _=J.events.find(e=>e.eventType===`run_started`);$={...e,input:g,status:`running`,output:void 0,error:void 0,completedAt:void 0,startedAt:e.startedAt??_?.createdAt??new Date},Hn=+$.startedAt,Ie($);let te=$;if(Tt=()=>Cr(te),Et=yr,f?.setAttributes({...o(`running`),...s(Hn)}),A&&!J.events.some(e=>e.eventType===`hook_received`&&e.resumeId===A.resumeId)){let e;try{e=new Date(Be(A.resumeId))}catch{e=void 0}try{await Sn({eventType:`hook_received`,specVersion:9,correlationId:A.hookId,eventData:{token:A.token,payload:A.payload}},{requestId:v,occurredAt:e,resumeId:A.resumeId,resumePayloadDigest:A.payloadDigest}),f?.setAttributes(ee(!0))}catch(e){if(gn.is(e)||Q.is(e))return;throw e}await wn()}let x;try{x=await bt(a,$,()=>Le.value,d,async()=>{})}catch(e){if(!await Xn(e))throw e;return}let C=x.code,T=x.dynamicWorkflow;T&&(f?.setAttributes({...Ee(!0),...ie(T.sourceHash)}),p.info(`Executing stored dynamic workflow code`,{sourceHash:T.sourceHash}));let E=T&&!Pt($)?yt(C,$.workflowName):void 0;if(Pt($)){let{runWorkflowWithQuickJS:e}=await import(`./_eve-core-quickjs-entrypoint-stub-qIV0OaFz.js`);try{let t=await e({workflowCode:C,workflowName:m,workflowRun:$,preloadedEvents:J.events,preloadedEventsComplete:!0,preloadedCursor:J.cursor,runInput:k,parentSpan:f,maxEventsLimit:jn,namespace:c,nextTraceCarrier:y,waitContinuation:P,deliveryAttempt:ve,armsNearDueWaits:ye,ownerMessageId:_e,stepResends:Ce,onStepResent:we,recovery:L,inlineDeadlineMs:Te+De,continueInNextDelivery:()=>(r.exit=`quickjs-continue`,ar()),requestId:v,writer:G,runAheadDepth:Yr(d)||Me>0?0:Qt(),onStepMessageSent:vt,onWaitTimerSent:e=>pt.add(e),completedWaits:mt,...ge.size>0?{wakeUpWaits:ge}:{},...Mt&&Ot?{turbo:{runStarted:Mt,runReadyBarrier:Ot,optimistic:Ut}}:{}});t?.timeoutSeconds!==void 0&&await ar(void 0,t.timeoutSeconds);return}catch(e){if(_r.is(e)||Vt||O(e)||an(e)||Wr.is(e)||Wr.is(G.stopCause))throw e;return await vr(e,C)}}let D=null,ae=new Set,oe=new Map,se=new Set,ce=new Map,le=(e,t)=>{if(!se.has(e))return!1;let n=ce.get(e);if(n===void 0)return!0;let r=t?.eventData?.attempt;return typeof r==`number`&&r<=n},ue=()=>[...se].filter(e=>le(e)),de=e=>{let t=H(e.eventId);return t!==null&&un.has(t)||Dt&&(e.eventType===`run_created`||e.eventType===`run_started`)||e.eventType.startsWith(`step_`)&&e.correlationId!==void 0&&le(e.correlationId,e)?!0:J?.events.some(t=>t.eventId===e.eventId)??!1},fe=[],j=new Set,pe=new Set,M,me=e=>{let t=e.then(()=>{},e=>{M??=e,Se()});j.add(t),t.then(()=>j.delete(t))},he,F=[],I=[],be,xe,R=!1,z=!1,B,Se=()=>{z=!0;let e=B;B=void 0,e?.()},Ne=()=>{if(J){if(Rt&&fn(Rt),I.length>0){let e=I.splice(0).filter(e=>{let t=H(e.eventId);if(t!==null&&G.observeSlot(t),zt(e,`live feed`),t!==null&&X.has(t)){let n=U.get(t);return n&&(n.event.eventType!==e.eventType||n.event.correlationId!==e.correlationId)&&Ft(`feed`),!1}return!Z});for(let t of e)Ge(t);Y(J.events).merge(e)}if(F.length>0){let e=F.splice(0);e.sort((e,t)=>(H(e.event?.eventId??``)??0)-(H(t.event?.eventId??``)??0));for(let t of e)fn(t)}}},Pe=async()=>{if(z){z=!1;return}let e=J?Vn(J.events):{},t=e.nextTimerAtMs===void 0?void 0:Math.max(0,e.nextTimerAtMs-Date.now()),n;await new Promise(e=>{B=e,t!==void 0&&(n=setTimeout(e,t))}),n&&clearTimeout(n),B=void 0,z=!1},Fe=()=>{if(be||!J)return;be=new Br(d,w,{afterSlot:Y(J.events).maxSlot()??0,cursor:J.cursor,pollIntervalMs:Mr(),feedPollIntervalMs:Pr(),onEvents:e=>{I.push(...e),Se()},onFeedDown:Se}),be.start();let e=be;xe=G.addCommitListener(()=>e.noteActivity())},ze=async()=>{for(;oe.size>0;)await Promise.allSettled([...oe.values()]);for(;j.size>0;)await Promise.allSettled([...j]);if(await Zt(),xe?.(),xe=void 0,be?.stop(),be=void 0,M!==void 0)throw M},Ze=e=>e.some(e=>{let t=H(e.eventId);return t!==null&&t>dn&&!un.has(t)&&!X.has(t)&&e.eventType!==`noop`}),nt=Yr(d)||Me>0?0:Qt(),rt=()=>new Set([...U.values()].flatMap(e=>(e.event.eventType===`step_completed`||e.event.eventType===`step_failed`)&&e.event.correlationId?[e.event.correlationId]:[])),at=(e=[])=>{if(Z||W!==void 0||G.isStopped)return!1;let t=rt();for(let n of e)t.add(n);return t.size<=nt},U=new Map,W,ht=new Map,_t=new Map,Ct=new Set,At,Nt=e=>{ht.set(e,(ht.get(e)??0)+1),K.contextsMax=Math.max(K.contextsMax,ht.size);for(let t of e.sensitiveHookIds)Ct.add(t);let t=!1;return()=>{if(t)return;t=!0;let n=(ht.get(e)??0)-1;n>0?ht.set(e,n):ht.delete(e)}},K={runAhead:0,drained:0,depthCap:0,failureStops:0,hazardStops:0,repairs:0,repairsByCause:{feed:0,outcome:0,creation:0},repairMs:0,repairsRetained:0,repairReads:0,contextsMax:0},Ft=e=>{Z||(Z=!0,K.repairs++,K.repairsByCause[e]++,Lt())},q={inert:0,observedHook:0,unknownHook:0,abortSignal:0,systemHook:0,externalStep:0,waitDue:0},Lt=()=>{f?.setAttributes({"workflow.out_of_band.inert_boundaries":q.inert,"workflow.out_of_band.observed_hook_boundaries":q.observedHook,"workflow.out_of_band.unknown_hook_boundaries":q.unknownHook,"workflow.out_of_band.abort_signal_boundaries":q.abortSignal,"workflow.out_of_band.system_hook_boundaries":q.systemHook,"workflow.out_of_band.external_step_boundaries":q.externalStep,"workflow.out_of_band.wait_due_boundaries":q.waitDue,"workflow.run_ahead.depth":nt,"workflow.run_ahead.boundaries":K.runAhead,"workflow.run_ahead.drained_boundaries":K.drained,"workflow.run_ahead.depth_cap_steps":K.depthCap,"workflow.run_ahead.failure_stops":K.failureStops,"workflow.run_ahead.hazard_stops":K.hazardStops,"workflow.run_ahead.repairs":K.repairs,"workflow.run_ahead.repairs.feed":K.repairsByCause.feed,"workflow.run_ahead.repairs.outcome":K.repairsByCause.outcome,"workflow.run_ahead.repairs.creation":K.repairsByCause.creation,"workflow.run_ahead.repair_ms":K.repairMs,"workflow.run_ahead.repairs_retained":K.repairsRetained,"workflow.run_ahead.repair_reads":K.repairReads,"workflow.run_ahead.contexts_max":K.contextsMax})};function zt(e,t){if(U.size===0)return;let n=[...ht.keys()],r=Gr(e,{sensitiveHookIds:{has:e=>n.some(t=>t.sensitiveHookIds.has(e))},selfStepIds:{has:e=>le(e)||!ce.has(e)&&n.some(t=>t.selfStepIds.has(e))}},e=>Jt(e)||e.eventType.startsWith(`step_`)&&e.correlationId!==void 0&&le(e.correlationId,e));if(!r)return;K.hazardStops++,Lt(),p.error(`Run-ahead stopped: an event that could change the workflow landed below a speculative write`,{possibleLogCorruption:!0,reason:r,source:t,eventType:e.eventType,eventId:e.eventId,correlationId:e.correlationId,speculativeSlots:[...X]});let i=new Wr(r);G.stopDecisions(i,qt),W??=i,Se()}let Bt=new Set;function qt(e){return e.every(e=>{if(e.eventType!==`step_completed`&&e.eventType!==`step_failed`&&e.eventType!==`step_retrying`)return!1;let t=e.correlationId;if(t===void 0)return!1;if(Bt.has(t))return!0;let n=e=>e?.eventType===`step_started`&&e.correlationId===t&&!tn.has(e);return(J?.events.some(n)??!1)||F.some(e=>n(e.event))||rn.some(e=>n(e.event))})}function Jt(e){let t=H(e.eventId);if(t!==null&&X.has(t)){let n=U.get(t)?.event;return n!==void 0&&n.eventType===e.eventType&&n.correlationId===e.correlationId}return t!==null&&un.has(t)?!0:J?.events.some(t=>t.eventId===e.eventId)??!1}async function Zt(){for(;U.size>0;)await Promise.allSettled([...U.values()].map(e=>e.settled))}async function $t(){if(await Zt(),W!==void 0)throw W;return G.assertActive(),ht.clear(),Z?`repair`:`clean`}async function nn(){let e=Date.now();if(await G.idle(),await Zt(),Z=!1,X.clear(),kn(J,`The event log is loaded to repair run-ahead`),tn.size>0)for(let e=J.events.length-1;e>=0;e--)tn.has(J.events[e])&&J.events.splice(e,1);tn.clear();let t=[...rn.splice(0),...F.splice(0)],n=!0;for(let e of t){if(e.hasMore){n=!1;continue}let t=[...e.events??[],...e.event?[e.event]:[]];for(let e of t)Ge(e);if(e.event){let t=H(e.event.eventId);t!==null&&un.add(t)}Y(J.events).merge(t)}let r=!n||Y(J.events).slotGap()!==void 0;if(r&&(K.repairReads++,await wn()),D){let e=new Set(Ct);At={aliases:new Map(_t),admitBelow:t=>Kr(t,e)}}V.debug(`Run-ahead repaired`,{workflowRunId:w,writes:t.length,readLog:r,rebased:At!==void 0}),_t.clear(),Ct.clear(),K.repairMs+=Date.now()-e,Lt()}function cn(e,t,n){let r=new Date,i=G.predictNextSlot(),a={...e,runId:w,eventId:Ue(i),createdAt:r};X.add(i),tn.add(a);let o=Nt(n),s=G.createAhead(e,{...t,...en(),resolveData:on,occurredAt:r},e=>{let t=e.event;for(let t of e.events??[])zt(t,`skipped-slot report`);if(!t||+new Date(t.createdAt)!=+r)throw Xr(d),new Wr(`the World does not record an in-band write at its occurredAt`);H(t.eventId)!==i&&(_t.set(a.eventId,t.eventId),Ft(`outcome`))}).then(e=>{o(),X.delete(i),U.delete(i),Z?rn.push(e):(tn.delete(a),F.push(e)),Se()},e=>{o(),U.delete(i),W===void 0&&(K.failureStops++,Lt()),W??=e,Se()});return U.set(i,{event:a,settled:s}),{event:a}}function Tn(e,t){kn(J,`The event log is loaded to run ahead`);let n=new Date,r=G.predictNextSlot(),i=e.map((e,t)=>({...e,runId:w,eventId:Ue(r+t),createdAt:n})),a=Nt(t),o=Date.now(),s=t=>{for(let e of t.events??[])zt(e,`skipped-slot report`);t.results.forEach((t,a)=>{if(t.error===void 0&&t.event.eventType===`step_started`&&t.event.correlationId&&Bt.add(t.event.correlationId),t.error!==void 0)throw new Wr(`a speculative ${e[a]?.eventType} was refused (${t.status}: ${t.message})`);if(+new Date(t.event.createdAt)!=+n)throw Xr(d),new Wr(`the World does not record an in-band write at its occurredAt`);if(H(t.event.eventId)!==r+a){let e=i[a];e&&_t.set(e.eventId,t.event.eventId),Ft(`creation`)}})},c=G.createBatchAhead(e.map(e=>({event:e,occurredAt:n,...e.eventType===`step_started`?{computeInstanceId:lt}:{}})),{...en(),...v?{requestId:v}:{}},s).then(e=>{a(),i.forEach((e,t)=>{X.delete(r+t),U.delete(r+t)});{let t=[],n=!0;for(let r of e.results)r.error===void 0&&(t.push({event:r.event,...n?{events:e.events,hasMore:e.hasMore}:{}}),n=!1);if(Z)rn.push(...t);else{for(let e of i)tn.delete(e);F.push(...t)}}Se()},e=>{a(),i.forEach((e,t)=>{U.delete(r+t)}),W===void 0&&(K.failureStops++,Lt()),W??=e,Se()}),l=new Map;return i.forEach((e,t)=>{X.add(r+t),tn.add(e),U.set(r+t,{event:e,settled:c}),Ge(e),e.eventType===`step_started`&&e.correlationId&&l.set(e.correlationId,{event:e,postSentAtMs:o,completedAtMs:o})}),Y(J.events).merge(i),l}let On=Te+De,Nn=rr(),Fn=async e=>{if(!d.events.subscribe||!J)return!1;let t=zr(Rn(J.events,e));if(t<=0)return!1;let n=Math.min(Date.now()+t,On-Nn);if(n<=Date.now())return!1;if(Fe(),!be?.isLive)return V.debug(`Not lingering: live event feed is down`,{workflowRunId:w}),!1;let r=Date.now();b.pause();try{for(;;){let e=n-Date.now();if(e<=0)break;let t;if(await Promise.race([Pe(),new Promise(n=>{t=setTimeout(n,e)})]),clearTimeout(t),B=void 0,I.some(e=>!de(e))||Bn(J.events,Date.now(),ge).length>0)return V.debug(`Lingering delivery resumed`,{workflowRunId:w,lingeredMs:Date.now()-r}),!0;if(!be?.isLive)return V.debug(`Lingering delivery ended: live event feed went down`,{workflowRunId:w,lingeredMs:Date.now()-r}),!1}}finally{b.resume()}return V.debug(`Lingering delivery found no new work`,{workflowRunId:w,lingeredMs:Date.now()-r}),!1};try{for(;;){if(Oe++,kn(J,`The event log is loaded in the loop`),b.isExhausted()){await ct({runId:w,workflowName:m,requestId:v,attempt:u.attempt,limitMs:b.configuredLimitMs,slotSnapshot:en(),runSpecVersion:e.specVersion,writeEvent:(e,t)=>xn(e,t)});return}if(Date.now()>=On){V.info(`Invocation deadline reached, handing the run to the next delivery`,{workflowRunId:w,loopIteration:Oe,elapsedMs:Date.now()-Te}),r.exit=`deadline`,await ar();return}let t=0;try{if(Z){if(await Zt(),W!==void 0)throw W;await nn()}if(Ne(),ln&&await wn(),kn(J,`The event log is loaded in the loop`),Qe(J.events,w)){Pn(d,w);return}let e=Bn(J.events,Date.now(),ge);if(e.length>0)for(let t of $n({openWaits:zn(J.events),completing:e.map(e=>e.correlationId)}))pt.has(t.correlationId)||await Sr(t);for(let t of e){ge.delete(t.correlationId);let e=await Sn({eventType:`wait_completed`,specVersion:9,correlationId:t.correlationId,eventData:{resumeAt:t.resumeAt}},{requestId:v});An(Y(J.events),_n(e)).type===`reload`&&(D=null,await Cn())}if(kn(J,`The event log is loaded in the loop`),e.length>0&&await dr(J.events,`other-chains`),U.size>0&&Y(J.events).slotGap()!==void 0&&(await $t()===`repair`&&await nn(),await G.idle(),Ne()),Y(J.events).slotGap()!==void 0){let e=await Ht(w,{events:J.events,cursor:J.cursor},{specVersion:9});if(e.log.events!==J.events&&(D=null),J={events:e.log.events,cursor:e.log.cursor},e.gap!==void 0)throw new pn(`Event log for run ${w} has a hole at slot ${e.gap.firstMissingSlot}: ${e.gap.missingCount} of the ${e.gap.maxSlot} slots up to the log's maximum hold no event.`)}if(Qe(J.events,w)){Pn(d,w);return}if(jn!==void 0){let e=J.events.reduce((e,t)=>Je(t)?e:e+1,0);if(e>=jn)throw new vn(e,jn);ft({runId:w,workflowName:m,eventCount:e,limit:jn,isQuickJS:!1})}V.debug(`Starting workflow execution`,{workflowRunId:w,loopIteration:Oe,eventCount:J.events.length,executionMode:D?`retained`:`replay`}),t=Date.now(),S&&(S.replayStartedAtMs??=t);let n=Ve($);kn(n,`Node workflow replay requires payload preparation`);let r=n.prewarm($,J.events);dn=Y(J.events).maxSlot()??0;let i=At;At=void 0;let a=D?await ot(D,J.events,i):{type:`replay`};i&&a.type!==`replay`&&(K.repairsRetained++,Lt());let s=D!==null&&a.type!==`replay`;if(a.type===`replay`){D=null;let e=Ie($);kn(e||E,`Node workflow replay requires compiled scripts`),a=await it({workflowCode:C,workflowRun:$,events:J.events,encryptionKey:await Le.value,replayPayloadCache:n,...e??E?{compiledWorkflowScripts:await(e??E)}:{},worldCapabilities:d.capabilities,drainPendingQueue:Ti(d,(e,t)=>xn(e,t)),startHook:re({events:J.events,workflowRun:$,runInput:k})})}if(await r,a.type===`completed`){je.activate();let e;try{e=await Sn({eventType:`run_completed`,specVersion:9,eventData:{output:a.output}},{requestId:v})}catch(e){if(mn.is(e)||Q.is(e)){V.info(`Tried completing workflow run, but run has already finished.`,{workflowRunId:w,message:e.message});return}throw e}Pn(d,w);let t=e.run?.status;if(t!==void 0&&t!==`completed`){V.info(`Run reached another terminal state first; not dispatching completion hooks`,{workflowRunId:w,status:t});return}await It(d,e.run??$??w,m),f?.setAttributes({...o(`completed`)});return}je.activate();let c=a.suspension;D=a.session,S&&c.stepCount>0&&(S.nextStepEncounteredAtMs??=Date.now());let l=h(c.stepCount,c.hookCount,c.waitCount);l&&V.debug(l);let u=await Wn(c,$,J,Date.now()-t,s);if(u.type===`return`)return u.result;if(u.type===`reload-full`){if(await Zt(),W!==void 0)throw W;Z?await nn():(D=null,await Cn())}else u.type===`reload`?(u.retainSession||(D=null),await wn()):u.retainSession||(D=null)}catch(e){if(_r.is(e)||G.isSuperseded||Vt||Wr.is(e)||Wr.is(G.stopCause)||W!==void 0)throw e;if(O(e)||an(e))throw p.warn(`Transient world error during replay; redelivering via queue instead of failing the run`,{errorName:e instanceof Error?e.name:`UnknownError`,errorMessage:e instanceof Error?e.message:String(e),deliveryAttempt:u.attempt}),e;if(bn.is(e)){let t=wr(e);if(t.type===`fail`)return await vr(t.error,C,t.divergenceCount,t.logFields);if(await Zt(),W!==void 0)throw W;Z&&await nn(),D=null,At=void 0,await Cn();continue}return t>0&&je.activate(),await vr(e,C)}}}finally{await ze()}async function Wn(e,t,n,i,a){let o=(t.specVersion??0)>=5,s=e.attributeCount>0,c=n.events.slice(),l=e.items.filter(e=>e.type!==`step`&&e.type!==`wait`),p=e.items.some(e=>e.type===`hook`&&!e.hasCreatedEvent&&e.hasConflictAwaiter===!0);if(W!==void 0)throw W;G.assertActive();let m=Ln(c).filter(e=>e.runnableInline&&!se.has(e.correlationId)),h=!p&&ir({nowMs:Date.now(),deadlineMs:On,marginMs:Nn}),g=h?Math.max(0,Xt()-m.length-oe.size):0,_=e.items.flatMap(e=>e.type===`step`&&!e.hasCreatedEvent?[e.correlationId]:[]),ee=new Set([...ue(),...m.map(e=>e.correlationId),..._.slice(0,g)]),y=h&&(m.length>0||g>0&&_.length>0),te=On+Wt(),b=jt({items:e.items,observedHookIds:e.observedHookIds,selfExecutedStepIds:ee,waitDue:zn(c).some(e=>e.resumeAtMs<=te)||e.items.some(e=>e.type===`wait`&&+new Date(e.resumeAt)<=te)}),ne;if(y&&(b.inert?q.inert++:(b.observedHookCount>0&&q.observedHook++,b.unknownHookCount>0&&q.unknownHook++,b.abortSignalHookCount>0&&q.abortSignal++,b.systemHookCount>0&&q.systemHook++,b.externalStepCount>0&&q.externalStep++,b.waitDue&&q.waitDue++),nt>0&&b.inert?(K.runAhead++,ne=qr({observation:b,hookItems:e.items.flatMap(e=>e.type===`hook`?[e]:[]),observedHookIds:e.observedHookIds,selfStepIds:ee})):nt>0&&K.drained++,Lt()),!b.inert&&(U.size>0||Z)){if(await $t()===`repair`)return await nn(),{type:`continue`,retainSession:!1};if(Ne(),J&&Ze(J.events))return{type:`continue`,retainSession:!0}}let x;if(l.length>0)try{x=await wi({suspension:Object.assign(Object.create(Object.getPrototypeOf(e)),e,{items:l,steps:l}),world:d,run:t,span:f,requestId:v,eventLog:n,replayRecoveryReporter:je,forceClaimVictimWakes:ke,writeEvent:(e,t)=>xn(e,t)})}catch(e){if(_r.is(e)||!hn.is(e))throw e;return{type:`return`,result:await vr(e,C)}}if(x&&x.hookConflictCorrelationIds.length>0){let e=x.hookConflictCorrelationIds.filter(e=>!ae.has(e));if(e.length>0){for(let t of e)ae.add(t);return{type:`continue`,retainSession:!0}}return r.exit=`hook-conflict`,await ar(),{type:`return`,result:void 0}}if(s)return{type:`reload`,retainSession:!0};if(x&&x.awaitedHookCorrelationIds.length>0){let e=x.awaitedHookCorrelationIds.filter(e=>!ae.has(e));if(e.length>0){for(let t of e)ae.add(t);return{type:`continue`,retainSession:!0}}}let re=Ln(c),T=re.filter(e=>e.runnableInline&&!se.has(e.correlationId)),E=!p&&ir({nowMs:Date.now(),deadlineMs:On,marginMs:Nn}),D=E?Math.max(0,Xt()-T.length-oe.size):0;Ut&&e.items.some(e=>e.type!==`step`&&e.type!==`attribute`)&&(Ut=!1);let ie=!1,O=await lr({suspension:e,run:t,writer:G,onCommitted:e=>{ie?F.push(e):fn(e)},eventCount:()=>en().eventCount,encryptionKey:await Le.value,compression:o,creatorMessageId:_e,inlineSlots:D,requestId:v}),ce=O.steps.every(e=>Zr(e.stepName)),le=Ut&&E&&ce&&O.steps.length>0&&O.failedCount===0&&O.waitCount===0&&O.steps.every(e=>e.inline),k=O.steps.filter(e=>e.inline),A=!le&&Ut&&E&&O.failedCount===0&&O.waitCount===0&&k.length>0&&k.length<O.steps.length&&k.every(e=>Zr(e.stepName)),de=e=>e.createdSteps.flatMap(e=>e.inline?[]:[{correlationId:e.correlationId,stepName:e.stepName,stepCreatedEventId:e.event?.eventId,...e.event?{stepCreatedAt:new Date(e.event.createdAt)}:{},input:e.input}]),N,P,he;if(ne!==void 0&&E&&ce&&G.supportsBatch&&O.steps.length>0&&O.failedCount===0&&O.waitCount===0&&O.steps.every(e=>e.inline)&&O.events.length<=16&&O.events.reduce((e,t)=>e+gr(t),0)<=524288&&at(O.steps.slice(1).map(e=>e.correlationId))&&ne){let e=Tn(O.events,ne);N={createdSteps:[],failedStepCorrelationIds:new Set,createdWaits:[],serializationBlockerCount:O.serializationBlockerCount,serializationBlockers:O.serializationBlockers},P=O.steps.map(t=>{let n=e.get(t.correlationId);return n?{...t,started:n}:t})}else if(le){ie=!0,he=O.commit().then(e=>{if(e.createdSteps.length<O.steps.length)throw new Dn(`A step_created of an inline step started ahead of its commit was not committed`,{status:503});return new Map(e.createdSteps.map(e=>[e.correlationId,e]))}),he.catch(()=>{});let e=he.then(()=>{},()=>{});j.add(e),e.then(()=>j.delete(e)),N={createdSteps:[],failedStepCorrelationIds:new Set,createdWaits:[],serializationBlockerCount:O.serializationBlockerCount,serializationBlockers:O.serializationBlockers},P=O.steps}else if(A){ie=!0;let e=O.commitInChunks(e=>me(sr(t,de(e))));pe.add(e.queued),e.queued.then(()=>pe.delete(e.queued)),me(e.first.then(e=>sr(t,de(e)))),me(e.rest),he=e.first.then(e=>{let t=new Map(e.createdSteps.flatMap(e=>e.inline?[[e.correlationId,e]]:[]));if(k.some(e=>!t.has(e.correlationId)))throw new Dn(`A step_started of an inline step started ahead of its commit was not committed`,{status:503});return t}),he.catch(()=>{}),N={createdSteps:[],failedStepCorrelationIds:new Set,createdWaits:[],serializationBlockerCount:O.serializationBlockerCount,serializationBlockers:O.serializationBlockers},P=k}else if(G.supportsBatch&&O.events.length>16&&O.failedCount===0&&O.waitCount===0){let e=O.commitInChunks(e=>me(sr(t,de(e))));pe.add(e.queued),e.queued.then(()=>pe.delete(e.queued)),N=await e.first,ie=!0,P=N.createdSteps.filter(e=>e.inline),me(e.rest)}else await fr(O.events),N=await O.commit(),P=N.createdSteps.filter(e=>e.inline);if(N.failedStepCorrelationIds.size>0)return{type:`reload`,retainSession:!1};let ge=N.serializationBlockerCount+(x?.serializationBlockerCount??0),I=kt({suspension:e,serializationBlockerCount:ge,invocationContinuation:!0}),ve=I.retain;I.retain||V.debug(`Retained VM not kept`,{workflowRunId:w,workflowVmRetentionReason:I.reason,...ge>0?Ye([...N.serializationBlockers,...x?.serializationBlockers??[]].slice(0,5),ge):{}});let ye=Ce(c),L=[];for(let e of N.createdSteps)e.inline||L.push({correlationId:e.correlationId,stepName:e.stepName,stepCreatedEventId:e.event?.eventId,...e.event?{stepCreatedAt:new Date(e.event.createdAt)}:{},input:e.input});for(let e of re)ye.has(e.correlationId)&&(qe.has(e.correlationId)||(we(e.correlationId),L.push({correlationId:e.correlationId,stepName:e.stepName,resent:!0,stepCreatedEventId:e.createdEventId,...e.createdAt?{stepCreatedAt:e.createdAt}:{},...e.inline||e.starts>0?{stepAttempt:e.starts+1}:{}})));let be=E&&(P.length>0||T.length>0),xe;!be&&L.length>0&&(xe=Xe(S),xe&&(S=void 0));let R=[];if(E){for(let e of P){let t=Fi(e.started),n=he;R.push({correlationId:e.correlationId,stepName:e.stepName,input:e.input,attempt:1,...t?{started:t}:{},...e.startRefusal?{startRefusal:e.startRefusal}:{},...n?{startAfter:Ni(n.then(t=>{let n=t.get(e.correlationId);if(n?.startRefusal)throw n.startRefusal;return Fi(n?.started)}))}:{}})}for(let e of T){e.starts>0&&V.debug(`Re-running an open inline step`,{workflowRunId:w,correlationId:e.correlationId,starts:e.starts,messageId:u.messageId,deliveryCount:u.deliveryCount,attempt:u.attempt,requestId:v,loopIteration:Oe});let t=c.find(t=>t.eventId===e.createdEventId),n=t?.eventType===`step_created`||t?.eventType===`step_started`?t.eventData?.input:void 0;R.push({correlationId:e.correlationId,stepName:e.stepName,createdEventId:e.createdEventId,...n===void 0?{}:{input:n},attempt:e.starts+1,...e.firstStartedAt?{firstStartedAt:e.firstStartedAt}:{}})}}let z=sr(t,L,void 0,xe);if(R.length>0&&L.length>0?me(z):await z,R.length>0){let n=wt({events:c,invocationStartedClean:Un===!0,runCreatedAtMs:et(w)??(Dt?void 0:+t.createdAt),runStartedReceivedAtMs:Kn,replayMs:i,preStepBlockingMs:Jn,preStepBlockingBeforeAttrMs:void 0,suspensionHasWaits:e.waitCount>0,suspensionCreatedHooks:e.hookCount>0,turbo:Dt,retained:a});Jn+=x?.hookCreationMs??0;let r=await Gn(t,R,n,ne);return r.type===`continue`?{type:`continue`,retainSession:ve}:r}if(oe.size>0||fe.length>0){let e=await qn(t);return e.type===`continue`?{type:`continue`,retainSession:ve}:e}for(;j.size>0;)await Promise.allSettled([...j]);if(M!==void 0)throw M;Ne();let B=N.createdSteps.length>0||N.createdWaits.length>0||x!==void 0&&l.length>0;if(U.size>0||Z){if(await $t()===`repair`)return await nn(),{type:`continue`,retainSession:!1};Ne()}return B&&await wn(),kn(J,`The event log is loaded on suspend`),J.events.some(e=>{let t=H(e.eventId);return t!==null&&t>dn&&!un.has(t)&&e.eventType!==`noop`})?{type:`continue`,retainSession:!1}:await Fn(e.observedHookIds)?{type:`continue`,retainSession:ve}:(await br(J.events),await dr(J.events),Mn(d,w,{slot:Y(J.events).maxSlot()??0,...Vn(J.events)}),{type:`return`,result:void 0})}async function Gn(e,n,r,i){kn(J,`The event log is loaded for inline steps`);let a=Ut||i!==void 0;Fe();let o=S;S=void 0;let s=await Le.value,c=!0;for(let l of n){if(se.has(l.correlationId))continue;se.add(l.correlationId);let n=c;c=!1;let u=(async()=>{let c=l.input??await or(l.createdEventId);return fi(w,l.correlationId,()=>ni({stateContext:Re?.stateContext,world:d,createEvent:async(e,t)=>{if(e.eventType===`step_retrying`&&ce.set(l.correlationId,e.eventData.attempt??l.attempt),e.eventType===`step_completed`||e.eventType===`step_failed`||e.eventType===`step_retrying`)for(;pe.size>0;)await Promise.all([...pe]);if(i&&(e.eventType===`step_completed`||e.eventType===`step_failed`)){if(!at([l.correlationId]))for(K.depthCap++,Lt();!at([l.correlationId])&&!Z&&W===void 0&&!G.isStopped&&U.size>0;)await Promise.race([...U.values()].map(e=>e.settled));if(at([l.correlationId]))return cn(e,t,i)}let n=await G.create(Yn(e,_e),{...t,...en(),resolveData:on});return F.push(n),n},workflowRunId:w,workflowDeploymentId:e.deploymentId,workflowName:m,workflowStartedAt:Hn,rootRunId:Yt(e.attributes,w),requestId:v,stepId:l.correlationId,stepName:l.stepName,encryptionKey:s,runSpecVersion:e.specVersion,attempt:l.attempt,...l.firstStartedAt?{firstStartedAt:l.firstStartedAt}:{},input:c,...l.started?{started:l.started}:{},...l.startRefusal?{startRefusal:l.startRefusal}:{},forceOptimisticStart:a&&l.attempt===1,...Ot?{runReadyBarrier:Ot}:{},...l.startAfter?{startAfter:l.startAfter}:{},beforeBody:()=>G.assertActive(),retryOutlivesMessage:e=>di({messageCreatedAt:new Date,retentionSeconds:ui(t(l.stepName)?.maxRetries??3),retryAtMs:e}),...o?{resumeTracking:o}:{},...n&&r?{latencyTracking:r}:{}}),`debug`)})().then(e=>{fe.push({spec:l,outcome:{status:`fulfilled`,value:e}})},e=>{fe.push({spec:l,outcome:{status:`rejected`,reason:e}})});oe.set(l.correlationId,u.finally(()=>{oe.delete(l.correlationId),Se()}))}return qn(e)}async function qn(e){J&&await dr(J.events),b.pause();try{for(;await Pe(),!(fe.length>0||W!==void 0||I.some(e=>!de(e))||J&&Bn(J.events,Date.now()).length>0||oe.size===0););for(;j.size>0;)await Promise.allSettled([...j]);if(M!==void 0)throw M}finally{b.resume()}if(Ne(),W!==void 0)throw W;let t=fe.splice(0),n=t.flatMap(e=>e.outcome.status===`rejected`?[e.outcome.reason]:[]);if(n.length>0)throw n.find(e=>_r.is(e))??n[0];let i=!1;for(let n of t){let t=n.spec,r=n.outcome.value;if(r.type===`gone`)return Pn(d,w),{type:`return`,result:void 0};r.type===`throttled`?he=Math.max(he??0,r.timeoutSeconds):r.type===`retry`?(ce.has(t.correlationId)||ce.set(t.correlationId,t.attempt),await sr(e,[{correlationId:t.correlationId,stepName:t.stepName,stepAttempt:t.attempt+1,...t.createdEventId?{stepCreatedEventId:t.createdEventId}:{},...t.input?{input:t.input}:{}}],r.timeoutSeconds)):(r.type===`completed`&&r.hasPendingOps&&(R=!0),kn(J,`The event log is loaded after inline steps`),(Z||An(Y(J.events),_n(r.result)).type===`reload`)&&(i=!0))}return he===void 0?R&&oe.size===0?(r.exit=`pending-stream-ops`,await ar(),{type:`return`,result:void 0}):i?{type:`reload-full`}:{type:`continue`,retainSession:!0}:oe.size>0?qn(e):{type:`return`,result:{timeoutSeconds:he}}}async function or(e){if(e===void 0)throw new En(`An inline step has neither an input nor a creation event`);let t=await d.events.get(w,e,{resolveData:`all`,specVersion:9}),n=t.eventType===`step_created`||t.eventType===`step_started`&&In(t)!==void 0?t.eventData?.input:void 0;if(n===void 0)throw new En(`Event "${e}" is not a step's creation`);return n}async function sr(e,t,n,r){if(t.length===0)return;let i=await y();await Ci(d,sn(m,c),t,(t,a)=>Si({run:e,step:t,traceCarrier:i,delaySeconds:n,...a===0&&r?{hookResumeTiming:r}:{}}));for(let e of t)vt(e.correlationId)}function cr(e){if(L)return zn(e);let t=P?.correlationId,n=Zn({events:e,messageId:_e,completedWaits:mt,timerFor:t,redelivery:ve!==1});return zn(e).filter(e=>Qn({wait:e.event,correlationId:e.correlationId,timerFor:t,ownedChains:n}))}async function dr(e,t=`all`){let n=cr(e).filter(e=>t===`all`||e.event!==void 0&&tr(e.event)!==_e);for(let e of er(n,_e,P?.correlationId))pt.has(e.correlationId)||await Sr(e)}async function fr(e){let t=Date.now(),n=e.flatMap(e=>{if(e.eventType!==`wait_created`||!e.correlationId)return[];let n=+new Date(e.eventData.resumeAt);return n>t?[{correlationId:e.correlationId,resumeAtMs:n}]:[]});if(n.length===0)return;let r=zn(hr()).filter(e=>tr(e.event)===_e);for(let e of er([...r,...n],_e,void 0))`event`in e||pt.has(e.correlationId)||await Sr(e)}function hr(){return[...J?.events??[],...[...tt.values()].filter(e=>!J?.events.some(t=>t.eventId===e.eventId))]}async function yr(){if(tt.size===0)return;let e=zn([...J?.events??[],...[...tt.values()].filter(e=>!J?.events.some(t=>t.eventId===e.eventId))]).filter(e=>(tr(e.event)??_e)===_e);for(let t of er(e,_e,void 0))tt.has(t.correlationId)&&!pt.has(t.correlationId)&&await Sr(t)}async function br(e){if(!ye)return;let t=Date.now()+xt()*1e3;for(let n of zn(e))n.resumeAtMs>t||pt.has(n.correlationId)||await Sr(n,{nearDue:!0})}async function Sr(e,t={}){pt.add(e.correlationId);let n=Date.now(),r=P?.correlationId===e.correlationId?P.attempt+1:0,i=Di({correlationId:e.correlationId,resumeAtMs:e.resumeAtMs,seconds:Math.max(0,Math.ceil((e.resumeAtMs-n)/1e3)),nowMs:n,attempt:r});try{let a=e=>ar({waitContinuation:i.waitContinuation},i.delaySeconds,e);if(t.nearDue||ki({mayHoldCoalescedTimer:ye,intermediate:i.waitContinuation.resumeAtMs!==void 0,attempt:r})){let t=Ai({correlationId:e.correlationId,resumeAtMs:e.resumeAtMs,nowMs:n});await Mi(t,()=>a(t))}else await a(i.idempotencyKey)}catch(t){throw pt.delete(e.correlationId),t}}async function Cr(e){let t=new Map(Ke);if(J){let e=Ce(J.events);for(let n of Ln(J.events)){let r=n.correlationId;!e.has(r)||t.has(r)||qe.has(r)||(we(r),t.set(r,{correlationId:r,stepName:n.stepName,resent:!0,stepCreatedEventId:n.createdEventId,...n.createdAt?{stepCreatedAt:n.createdAt}:{},...n.inline||n.starts>0?{stepAttempt:n.starts+1}:{}}))}}let n=Date.now(),r=[];for(let{retryAfter:i,...a}of t.values()){let t={...a,stepCreatedEventId:a.stepCreatedEventId??dt.get(a.correlationId)??J?.events.find(e=>e.correlationId===a.correlationId&&In(e)!==void 0)?.eventId},o=i===void 0?0:Math.max(0,Math.ceil((+i-n)/1e3));o>0?await sr(e,[t],o):r.push(t)}await sr(e,r),await dr([...J?.events??[],...[...tt.values()].filter(e=>!J?.events.some(t=>t.eventId===e.eventId))])}function wr(e){let t=Ae.at(-1),n=Ae.length>0;Ae.push(e.eventId);let r=Ae.length,i=Gt(),a=Ae.slice(-(i+1)),o={errorCode:yn.REPLAY_DIVERGENCE,divergenceEventId:e.eventId,priorDivergenceEventId:t,divergenceEventIds:a,divergenceCount:r,maxRecoveryReplays:i,loopIteration:Oe,deliveryAttempt:u.attempt,eventLogLength:J?.events.length,eventLogLastEventId:J?.events.at(-1)?.eventId,isRecoveryReplay:n,hasHookInput:A!==void 0,hasWaitContinuation:P!==void 0};return r<=i?(p.warn(`Workflow replay diverged; replaying again from a fresh load before declaring the event log corrupted`,{...o,errorMessage:e.message}),je=new ut(r),{type:`recover`}):{type:`fail`,divergenceCount:r,logFields:o,error:new pn(`Workflow replay diverged ${r} times after ${i} recovery replays; latest divergent event was ${e.eventId}; divergent event ids: ${a.join(`, `)}. Last divergence: ${e.message}`,{cause:e})}}}async function vr(e,t,n,r={}){e instanceof Error&&f?.recordException?.(e);let a=await K(e),s=a.name||Lt(e),c=a.message,u=a.stack||zt(e);if(u){let e=oe(m)?.moduleSpecifier||m;u=nt(u,e,t)}let p=g(e);V.error(`Error while running workflow`,{...r,workflowRunId:w,errorCode:p,errorName:s,errorMessage:c,errorStack:u,errorCause:Nt(e)||void 0}),On.isNativeError(e)&&u&&U(e,u);let h,_,ee;try{h=await Le.value,_=await xe(e,w,h,globalThis,($?.specVersion??0)>=5),ee=await Sn({eventType:`run_failed`,specVersion:9,eventData:{error:_,errorCode:p}},{requestId:v,...n===void 0?{}:{replayDivergenceCount:n}})}catch(e){if(mn.is(e)||Q.is(e)){V.info(`Tried failing workflow run, but run has already finished.`,{workflowRunId:w,message:e instanceof Error?e.message:String(e)});return}if(D(e)){V.error(`Fatal world contract error while recording workflow failure`,{workflowRunId:w,errorCode:yn.WORLD_CONTRACT_ERROR,error:e instanceof Error?e.message:String(e)});return}throw e}Pn(d,w);let y=ee?.run?.status;(y===void 0||y===`failed`)&&(await Ft(d,ee?.run??$??w,m,_,h,p),f?.setAttributes({...o(`failed`),...se(p),...i(s),...te(c),...l(s)}))}}const Ri={countsTowardMaxDeliveries:e=>e.stepId===void 0,async writeMaxDeliveriesFailure(e,t,n,r){let i=await nn(t,void 0,{specVersion:9}),a=new Sr(e,t);a.adoptSnapshot(br(t,i));try{return{run:(await a.create({eventType:`run_failed`,specVersion:9,eventData:n},{requestId:r,...Kt(i.events)}))?.run}}catch(e){if(_r.is(e))return`superseded`;throw e}},runDelivery:Ii};export{Ri as spec9Orchestrator};
|