eve 0.67.1 → 0.67.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 +10 -0
- package/dist/src/channel/channel-address.d.ts +2 -2
- package/dist/src/channel/compiled-channel.d.ts +3 -2
- package/dist/src/channel/cross-channel-receive.d.ts +1 -18
- package/dist/src/channel/cross-channel-receive.js +1 -1
- package/dist/src/channel/forwarded-principal.d.ts +3 -2
- package/dist/src/channel/resolve-text.d.ts +2 -1
- package/dist/src/channel/schedule.d.ts +2 -2
- package/dist/src/channel/session-callback.d.ts +2 -1
- package/dist/src/channel/types.d.ts +0 -7
- package/dist/src/cli/acp/command.d.ts +2 -1
- package/dist/src/cli/agent-command.d.ts +2 -1
- package/dist/src/cli/agent-detection.d.ts +0 -1
- package/dist/src/cli/agent-detection.js +1 -1
- package/dist/src/cli/application-command.d.ts +2 -1
- package/dist/src/cli/application-root.d.ts +3 -6
- package/dist/src/cli/application-root.js +1 -1
- package/dist/src/cli/commands/init-target.d.ts +1 -1
- package/dist/src/cli/commands/init-telemetry.d.ts +2 -1
- package/dist/src/cli/commands/registry-declared-setups.d.ts +2 -1
- package/dist/src/cli/commands/registry-install-transaction.d.ts +0 -13
- package/dist/src/cli/commands/registry-install-transaction.js +1 -1
- package/dist/src/cli/commands/registry-pnpm-build-policy-flow.d.ts +1 -1
- package/dist/src/cli/commands/registry-presentation.d.ts +0 -1
- package/dist/src/cli/commands/registry-presentation.js +1 -1
- package/dist/src/cli/commands/registry-project.d.ts +2 -1
- package/dist/src/cli/commands/registry.d.ts +0 -4
- package/dist/src/cli/commands/registry.js +1 -1
- package/dist/src/cli/commands/setup-headless.d.ts +2 -1
- package/dist/src/cli/commands/vercel-non-interactive.d.ts +2 -1
- package/dist/src/cli/dev/diagnostic-dump.d.ts +0 -2
- package/dist/src/cli/dev/diagnostic-dump.js +1 -1
- package/dist/src/cli/dev/diagnostic-sink.d.ts +3 -2
- package/dist/src/cli/dev/tui/agent-header.d.ts +2 -1
- package/dist/src/cli/dev/tui/argument-typeahead.d.ts +2 -1
- package/dist/src/cli/dev/tui/dev-rebuild-status.d.ts +2 -1
- package/dist/src/cli/dev/tui/diagnostic-presentation.d.ts +2 -1
- package/dist/src/cli/dev/tui/errors.d.ts +2 -7
- package/dist/src/cli/dev/tui/errors.js +1 -1
- package/dist/src/cli/dev/tui/flow-drawer.d.ts +2 -1
- package/dist/src/cli/dev/tui/line-editor.d.ts +1 -1
- package/dist/src/cli/dev/tui/mcp-connection-status.d.ts +2 -1
- package/dist/src/cli/dev/tui/message-queue.d.ts +4 -3
- package/dist/src/cli/dev/tui/prompt-command-handler.d.ts +2 -1
- package/dist/src/cli/dev/tui/provider-picker.d.ts +3 -2
- package/dist/src/cli/dev/tui/question-panel.d.ts +2 -1
- package/dist/src/cli/dev/tui/registry-result-message.d.ts +3 -4
- package/dist/src/cli/dev/tui/registry-result-message.js +1 -1
- package/dist/src/cli/dev/tui/remote-connection-probe.d.ts +3 -2
- package/dist/src/cli/dev/tui/setup-panel.d.ts +2 -2
- package/dist/src/cli/dev/tui/setup-selection-input.d.ts +2 -2
- package/dist/src/cli/dev/tui/status-line.d.ts +2 -1
- package/dist/src/cli/dev/tui/stream-format.d.ts +3 -2
- package/dist/src/cli/dev/tui/terminal-renderer.d.ts +3 -2
- package/dist/src/cli/dev/tui/theme.d.ts +1 -1
- package/dist/src/cli/dev/tui/tool-block-groups.d.ts +3 -2
- package/dist/src/cli/dev/tui/tool-presentation.d.ts +2 -1
- package/dist/src/cli/dev/tui/traces/trace-content.d.ts +0 -9
- package/dist/src/cli/dev/tui/traces/trace-content.js +1 -1
- package/dist/src/cli/dev/tui/traces/trace-view.d.ts +3 -2
- package/dist/src/cli/dev/tui/traces/trace-viewer-session.d.ts +2 -1
- package/dist/src/cli/dev/tui/traces/trace-viewer-state.d.ts +2 -3
- package/dist/src/cli/dev/tui/traces/trace-viewer-state.js +1 -1
- package/dist/src/cli/dev/ui-options.d.ts +3 -2
- package/dist/src/cli/dev/url-target.d.ts +2 -1
- package/dist/src/cli/invoke/command.d.ts +0 -11
- package/dist/src/cli/invoke/command.js +1 -1
- package/dist/src/cli/invoke/result.d.ts +1 -1
- package/dist/src/cli/telemetry/index.d.ts +0 -6
- package/dist/src/cli/telemetry/preference.d.ts +2 -1
- package/dist/src/cli/ui/alt-screen.d.ts +3 -2
- package/dist/src/cli/ui/live-region.d.ts +3 -2
- package/dist/src/cli/ui/output.d.ts +1 -1
- package/dist/src/client/eve-agent-store-helpers.d.ts +0 -1
- package/dist/src/client/eve-agent-store-helpers.js +1 -1
- package/dist/src/client/message-action-parts.d.ts +2 -1
- package/dist/src/client/session-utils.d.ts +3 -2
- package/dist/src/compiled/.vendor-stamp.json +6 -6
- package/dist/src/compiled/@workflow/core/index.js +2 -2
- package/dist/src/compiled/@workflow/core/private.js +1 -1
- package/dist/src/compiled/@workflow/core/runtime/constants.d.ts +4 -3
- package/dist/src/compiled/@workflow/core/runtime/helpers.d.ts +23 -0
- package/dist/src/compiled/@workflow/core/runtime/helpers.js +1 -1
- package/dist/src/compiled/@workflow/core/runtime/hook-wake.d.ts +69 -36
- package/dist/src/compiled/@workflow/core/runtime/lifecycle-hooks.d.ts +25 -22
- package/dist/src/compiled/@workflow/core/runtime/run-spec-version.d.ts +16 -0
- package/dist/src/compiled/@workflow/core/runtime/start.d.ts +59 -1
- package/dist/src/compiled/@workflow/core/runtime/step-latency.d.ts +3 -2
- package/dist/src/compiled/@workflow/core/runtime/suspension-handler.d.ts +34 -12
- package/dist/src/compiled/@workflow/core/runtime.js +4 -4
- package/dist/src/compiled/@workflow/core/serialization.d.ts +7 -2
- package/dist/src/compiled/@workflow/core/serialization.js +1 -1
- package/dist/src/compiled/@workflow/core/telemetry/semantic-conventions.d.ts +29 -0
- package/dist/src/compiled/@workflow/core/types.d.ts +1 -0
- package/dist/src/compiled/@workflow/core/version.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/workflow.js +1 -1
- package/dist/src/compiled/@workflow/errors/index.d.ts +13 -0
- package/dist/src/compiled/@workflow/errors/index.js +1 -1
- package/dist/src/compiled/@workflow/world/events.d.ts +14 -4
- package/dist/src/compiled/@workflow/world/index.d.ts +2 -2
- package/dist/src/compiled/@workflow/world/interfaces.d.ts +2 -1
- package/dist/src/compiled/@workflow/world/shared.d.ts +24 -0
- package/dist/src/compiled/@workflow/world/spec-version.d.ts +23 -0
- package/dist/src/compiled/@workflow/world-local/index.js +5 -5
- package/dist/src/compiled/@workflow/world-vercel/index.js +16 -16
- package/dist/src/compiled/_chunks/workflow/{attribute-changes-DzJovO_f.js → attribute-changes-D721NpZv.js} +3 -3
- package/dist/src/compiled/_chunks/workflow/{dist-BQSf8Hax.js → dist-BUFGAKRb.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/dist-CaNNONeg.js +3 -0
- package/dist/src/compiled/_chunks/workflow/{frames-qKc30rjg.js → frames-Dr9fHWdo.js} +2 -2
- package/dist/src/compiled/_chunks/workflow/{global-BQnKzRXo.js → global-DKbOgrts.js} +1 -1
- package/dist/src/compiled/_chunks/workflow/helpers-DkKxg_yn.js +1 -0
- package/dist/src/compiled/_chunks/workflow/logger-D4GJNTk4.js +14 -0
- package/dist/src/compiled/_chunks/workflow/resume-hook-uTW-jBYz.js +1 -0
- package/dist/src/compiled/_chunks/workflow/run-5DmiMN9b.js +1 -0
- package/dist/src/compiled/_chunks/workflow/serialization-CNIYl1D3.js +3 -0
- package/dist/src/compiled/_chunks/workflow/sleep-DFKgN7UG.js +1 -0
- package/dist/src/compiled/_chunks/workflow/wait-until-3_1djUuL.js +1 -0
- package/dist/src/compiled/_chunks/workflow/{ws-transport-BrsMYqJg.js → ws-transport--rYOVIaf.js} +1 -1
- package/dist/src/compiler/artifacts.d.ts +4 -27
- package/dist/src/compiler/artifacts.js +1 -1
- package/dist/src/compiler/compile-agent.d.ts +2 -1
- package/dist/src/compiler/compile-agent.js +1 -1
- package/dist/src/compiler/diagnostics.d.ts +0 -11
- package/dist/src/compiler/diagnostics.js +1 -1
- package/dist/src/compiler/manifest.d.ts +0 -4
- package/dist/src/compiler/module-map.d.ts +1 -5
- package/dist/src/compiler/module-map.js +1 -1
- package/dist/src/compiler/normalize-agent-config.js +1 -1
- package/dist/src/compiler/normalize-connection.d.ts +2 -1
- package/dist/src/compiler/normalize-instructions.d.ts +2 -6
- package/dist/src/compiler/normalize-instructions.js +1 -1
- package/dist/src/compiler/normalize-manifest-helpers.d.ts +0 -1
- package/dist/src/compiler/normalize-manifest-helpers.js +1 -1
- package/dist/src/compiler/normalize-manifest.js +1 -1
- package/dist/src/compiler/normalize-skill.d.ts +2 -1
- package/dist/src/compiler/project-sources.d.ts +0 -14
- package/dist/src/compiler/project-sources.js +1 -1
- package/dist/src/compiler/resolve-workspace-subagent.js +1 -1
- package/dist/src/compiler/source-graph.d.ts +1 -2
- package/dist/src/compiler/source-graph.js +1 -1
- package/dist/src/context/build-base-tool-context.d.ts +2 -1
- package/dist/src/context/dynamic-tool-lifecycle.d.ts +0 -4
- package/dist/src/context/dynamic-tool-lifecycle.js +1 -1
- package/dist/src/context/dynamic-tool-metadata.d.ts +0 -1
- package/dist/src/context/dynamic-tool-metadata.js +1 -1
- package/dist/src/context/memory-lifecycle.d.ts +0 -8
- package/dist/src/context/memory-lifecycle.js +1 -1
- package/dist/src/discover/connections.d.ts +0 -15
- package/dist/src/discover/connections.js +1 -1
- package/dist/src/discover/diagnostics.d.ts +0 -8
- package/dist/src/discover/diagnostics.js +1 -1
- package/dist/src/discover/discover-agent.js +1 -1
- package/dist/src/discover/discover-subagent.d.ts +0 -1
- package/dist/src/discover/discover-subagent.js +1 -1
- package/dist/src/discover/extensions.d.ts +3 -10
- package/dist/src/discover/extensions.js +1 -1
- package/dist/src/discover/filesystem.d.ts +5 -9
- package/dist/src/discover/filesystem.js +1 -1
- package/dist/src/discover/grammar.d.ts +0 -46
- package/dist/src/discover/grammar.js +1 -1
- package/dist/src/discover/manifest.d.ts +5 -4
- package/dist/src/discover/memory.d.ts +0 -1
- package/dist/src/discover/memory.js +1 -1
- package/dist/src/discover/named-source-directory.js +1 -1
- package/dist/src/discover/project-source.d.ts +2 -1
- package/dist/src/discover/project.js +1 -1
- package/dist/src/discover/sandbox.js +1 -1
- package/dist/src/discover/skills.d.ts +0 -4
- package/dist/src/discover/skills.js +1 -1
- package/dist/src/evals/cli/eval-client.d.ts +2 -1
- package/dist/src/evals/judge.d.ts +2 -1
- package/dist/src/evals/runner/execute-task.d.ts +1 -1
- package/dist/src/evals/types.d.ts +1 -1
- package/dist/src/eve-channel/support.d.ts +1 -3
- package/dist/src/eve-channel/support.js +1 -1
- package/dist/src/execution/dynamic-workflow/schema.d.ts +2 -1
- package/dist/src/execution/dynamic-workflow/tool.js +1 -1
- package/dist/src/execution/effective-agent-config.d.ts +2 -1
- package/dist/src/execution/eve-workflow-attributes.d.ts +3 -5
- package/dist/src/execution/eve-workflow-attributes.js +1 -1
- package/dist/src/execution/history-view.d.ts +2 -1
- package/dist/src/execution/node-step.d.ts +3 -2
- package/dist/src/execution/sandbox/active-handles.d.ts +2 -4
- package/dist/src/execution/sandbox/active-handles.js +1 -1
- package/dist/src/execution/sandbox/bash.d.ts +2 -1
- package/dist/src/execution/sandbox/bindings/docker.js +1 -1
- package/dist/src/execution/sandbox/bindings/immutable-resources.d.ts +0 -6
- package/dist/src/execution/sandbox/bindings/immutable-resources.js +1 -1
- package/dist/src/execution/sandbox/bindings/local-provider-utils.d.ts +3 -2
- package/dist/src/execution/sandbox/bindings/microsandbox-lifecycle.d.ts +0 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-lifecycle.js +1 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-network.d.ts +1 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-options.d.ts +0 -3
- package/dist/src/execution/sandbox/bindings/microsandbox-options.js +1 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-templates.d.ts +0 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-templates.js +1 -1
- package/dist/src/execution/sandbox/bindings/vercel.d.ts +1 -1
- package/dist/src/execution/sandbox/dockerfile.d.ts +0 -1
- package/dist/src/execution/sandbox/dockerfile.js +1 -1
- package/dist/src/execution/sandbox/ensure.d.ts +2 -1
- package/dist/src/execution/sandbox/ensure.js +1 -1
- package/dist/src/execution/sandbox/prewarm.d.ts +1 -18
- package/dist/src/execution/sandbox/prewarm.js +1 -1
- package/dist/src/execution/sandbox/require-sandbox.d.ts +0 -11
- package/dist/src/execution/sandbox/require-sandbox.js +1 -1
- package/dist/src/execution/sandbox/truncate-output.d.ts +2 -5
- package/dist/src/execution/sandbox/truncate-output.js +2 -2
- package/dist/src/execution/session/admission.d.ts +3 -2
- package/dist/src/execution/session/event-sink.d.ts +2 -1
- package/dist/src/execution/session/finalization.d.ts +2 -1
- package/dist/src/execution/session/handoff.d.ts +3 -2
- package/dist/src/execution/session/route-selected-delivery.d.ts +2 -1
- package/dist/src/execution/session/timeout-control.d.ts +2 -1
- package/dist/src/execution/session-activity.d.ts +0 -3
- package/dist/src/execution/session-activity.js +1 -1
- package/dist/src/execution/session-inbox/protocol.d.ts +2 -1
- package/dist/src/execution/session.d.ts +3 -2
- package/dist/src/execution/stable-workflow-names.d.ts +0 -6
- package/dist/src/execution/stable-workflow-names.js +1 -1
- package/dist/src/execution/tools/agent-router-workflow.js +1 -1
- package/dist/src/execution/tools/ask-question-workflow.js +1 -1
- package/dist/src/execution/tools/connection-search.js +1 -1
- package/dist/src/execution/tools/sleep-workflow.js +1 -1
- package/dist/src/execution/tools/subagent/invoke-preparation.d.ts +2 -1
- package/dist/src/execution/tools/subagent/task-agent-requests.d.ts +4 -3
- package/dist/src/execution/tools/workflow/background.d.ts +2 -6
- package/dist/src/execution/tools/workflow/background.js +1 -1
- package/dist/src/execution/tools/workflow/owner-channels.d.ts +1 -1
- package/dist/src/execution/tools/workflow/workflow-owner-background.d.ts +2 -1
- package/dist/src/execution/web-fetch/execute.d.ts +2 -2
- package/dist/src/execution/web-fetch/request.d.ts +2 -1
- package/dist/src/extensions/code/extension/lib/computer-use-driver-source.d.ts +0 -2
- package/dist/src/extensions/code/extension/lib/computer-use-driver-source.js +57 -57
- package/dist/src/extensions/code/extension/lib/computer-use.d.ts +1 -1
- package/dist/src/extensions/code/extension/lib/generated-paths.d.ts +2 -1
- package/dist/src/extensions/code/extension/lib/grep-search.d.ts +5 -5
- package/dist/src/extensions/code/extension/lib/grep-search.js +2 -2
- package/dist/src/extensions/code/extension/lib/guidelines.d.ts +2 -1
- package/dist/src/extensions/code/extension/lib/patch.d.ts +3 -2
- package/dist/src/extensions/code/extension/lib/prwatch-github.d.ts +1 -2
- package/dist/src/extensions/code/extension/lib/prwatch-github.js +1 -1
- package/dist/src/extensions/code/extension/lib/prwatch-registry.d.ts +2 -1
- package/dist/src/framework/host-inventory.d.ts +3 -2
- package/dist/src/harness/approval-candidates.d.ts +4 -3
- package/dist/src/harness/approval-delivery-coordinator.d.ts +2 -1
- package/dist/src/harness/compaction-prompt.d.ts +2 -1
- package/dist/src/harness/coordination.d.ts +0 -4
- package/dist/src/harness/coordination.js +1 -1
- package/dist/src/harness/input-requests.d.ts +1 -10
- package/dist/src/harness/input-requests.js +1 -1
- package/dist/src/harness/pending-input-batches.d.ts +0 -5
- package/dist/src/harness/pending-input-batches.js +1 -1
- package/dist/src/harness/provider-tools.d.ts +2 -1
- package/dist/src/harness/session-limit-continuation.d.ts +0 -4
- package/dist/src/harness/session-limit-continuation.js +1 -1
- package/dist/src/harness/session-usage-limits.d.ts +2 -1
- package/dist/src/harness/tool-loop.js +1 -1
- package/dist/src/harness/tool-model-output.d.ts +2 -1
- package/dist/src/harness/turn-client-context.d.ts +2 -1
- package/dist/src/instrumentation/state.d.ts +2 -2
- package/dist/src/internal/agent-name.d.ts +0 -2
- package/dist/src/internal/agent-name.js +1 -1
- package/dist/src/internal/application/build-profile.d.ts +2 -2
- package/dist/src/internal/application/dev-environment.d.ts +2 -8
- package/dist/src/internal/application/dev-environment.js +1 -1
- package/dist/src/internal/application/output-publication.d.ts +1 -1
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/internal/application/paths.d.ts +0 -5
- package/dist/src/internal/application/paths.js +1 -1
- package/dist/src/internal/application/tsconfig-dependencies.d.ts +0 -16
- package/dist/src/internal/application/tsconfig-dependencies.js +1 -1
- package/dist/src/internal/authored-definition/schema-backed.js +1 -1
- package/dist/src/internal/authored-definition/source-identity.d.ts +1 -1
- package/dist/src/internal/authored-module-map-loader.js +1 -1
- package/dist/src/internal/bundler/extension-scope-plugin.d.ts +2 -1
- package/dist/src/internal/bundler/nitro-rolldown.d.ts +0 -11
- package/dist/src/internal/bundler/nitro-rolldown.js +1 -1
- package/dist/src/internal/eve-project-root.d.ts +0 -3
- package/dist/src/internal/eve-project-root.js +1 -1
- package/dist/src/internal/external-resources-snapshot.d.ts +1 -1
- package/dist/src/internal/external-resources.d.ts +0 -1
- package/dist/src/internal/external-resources.js +1 -1
- package/dist/src/internal/helpers/markdown.js +1 -1
- package/dist/src/internal/invocation/metadata.d.ts +1 -1
- package/dist/src/internal/materialized-authored-modules.d.ts +2 -1
- package/dist/src/internal/mcp/protected-resource.d.ts +2 -1
- package/dist/src/internal/mcp/streamable-http-server.d.ts +4 -5
- package/dist/src/internal/mcp/streamable-http-server.js +1 -1
- package/dist/src/internal/model-catalog.d.ts +2 -1
- package/dist/src/internal/nitro/dev-runtime-artifacts.d.ts +0 -4
- package/dist/src/internal/nitro/dev-runtime-artifacts.js +1 -1
- package/dist/src/internal/nitro/dev-runtime-source-snapshot.d.ts +0 -1
- package/dist/src/internal/nitro/dev-runtime-source-snapshot.js +1 -1
- package/dist/src/internal/nitro/development-generation.d.ts +0 -1
- package/dist/src/internal/nitro/development-generation.js +1 -1
- package/dist/src/internal/nitro/host/channel-routes.d.ts +1 -1
- package/dist/src/internal/nitro/host/dev-authored-rebuild-coordinator.d.ts +2 -1
- package/dist/src/internal/nitro/host/dev-host-candidate.d.ts +2 -1
- package/dist/src/internal/nitro/host/drained-nitro-dev-server.d.ts +1 -1
- package/dist/src/internal/nitro/host/extension-capability-requirements.js +1 -1
- package/dist/src/internal/nitro/host/schedule-task-routes.d.ts +1 -1
- package/dist/src/internal/nitro/host/workspace-extensions.js +1 -1
- package/dist/src/internal/nitro/routes/channel-request-instrumentation.d.ts +2 -1
- package/dist/src/internal/nitro/routes/channel-route-context.d.ts +1 -1
- package/dist/src/internal/nitro/routes/runtime-stack.d.ts +2 -1
- package/dist/src/internal/resolve-model-endpoint-status.d.ts +2 -1
- package/dist/src/internal/vercel/assemble-eve-services.d.ts +3 -2
- package/dist/src/internal/vercel/eve-service-contribution.d.ts +2 -3
- package/dist/src/internal/vercel/eve-service-contribution.js +1 -1
- package/dist/src/internal/vercel/project-link.d.ts +2 -1
- package/dist/src/internal/vercel/project-link.js +1 -1
- package/dist/src/internal/workflow/development-world-codec.d.ts +2 -1
- package/dist/src/internal/workflow/world-compatibility.d.ts +2 -1
- package/dist/src/internal/workflow-bundle/builder-support.d.ts +0 -9
- package/dist/src/internal/workflow-bundle/builder-support.js +2 -3
- package/dist/src/internal/workflow-bundle/dynamic-tool-transform.d.ts +0 -1
- package/dist/src/internal/workflow-bundle/dynamic-tool-transform.js +1 -1
- package/dist/src/protocol/activity.d.ts +3 -3
- package/dist/src/protocol/activity.js +1 -1
- package/dist/src/protocol/baggage.d.ts +2 -2
- package/dist/src/protocol/cancel-turn.d.ts +0 -2
- package/dist/src/protocol/event-dedupe.d.ts +2 -1
- package/dist/src/protocol/event-id.d.ts +0 -6
- package/dist/src/protocol/event-id.js +1 -1
- package/dist/src/protocol/traceparent.d.ts +2 -1
- package/dist/src/public/channels/chat-sdk/audience.d.ts +2 -4
- package/dist/src/public/channels/chat-sdk/audience.js +1 -1
- package/dist/src/public/channels/discord/discordChannel.d.ts +1 -1
- package/dist/src/public/channels/github/api.d.ts +2 -12
- package/dist/src/public/channels/github/api.js +1 -1
- package/dist/src/public/channels/github/auth.d.ts +0 -9
- package/dist/src/public/channels/github/auth.js +1 -1
- package/dist/src/public/channels/github/binding.d.ts +3 -2
- package/dist/src/public/channels/github/checkout.d.ts +3 -3
- package/dist/src/public/channels/github/defaults.d.ts +3 -2
- package/dist/src/public/channels/github/githubChannel.d.ts +1 -1
- package/dist/src/public/channels/github/limits.d.ts +0 -2
- package/dist/src/public/channels/github/limits.js +2 -2
- package/dist/src/public/channels/github/pr-context.d.ts +2 -3
- package/dist/src/public/channels/github/pr-context.js +1 -1
- package/dist/src/public/channels/github/state.d.ts +2 -1
- package/dist/src/public/channels/github/verify.d.ts +2 -1
- package/dist/src/public/channels/linear/defaults.d.ts +2 -1
- package/dist/src/public/channels/linear/inbound-images.d.ts +2 -1
- package/dist/src/public/channels/slack/app-manifest.d.ts +3 -4
- package/dist/src/public/channels/slack/app-manifest.js +1 -1
- package/dist/src/public/channels/slack/inbound.d.ts +2 -1
- package/dist/src/public/channels/slack/model-context.d.ts +0 -18
- package/dist/src/public/channels/slack/model-context.js +1 -1
- package/dist/src/public/channels/slack/privacy.d.ts +2 -1
- package/dist/src/public/channels/slack/verify.d.ts +1 -1
- package/dist/src/public/channels/teams/teamsChannel.d.ts +1 -1
- package/dist/src/public/channels/telegram/audience.d.ts +2 -3
- package/dist/src/public/channels/telegram/audience.js +1 -1
- package/dist/src/public/channels/telegram/telegramChannel.d.ts +1 -1
- package/dist/src/public/channels/twilio/defaults.d.ts +0 -7
- package/dist/src/public/channels/twilio/defaults.js +1 -1
- package/dist/src/public/channels/twilio/routing.d.ts +2 -1
- package/dist/src/public/channels/twilio/twilioChannel.d.ts +1 -1
- package/dist/src/public/definitions/channel.d.ts +1 -1
- package/dist/src/public/index.js +1 -1
- package/dist/src/public/memory/file/provider.js +1 -1
- package/dist/src/public/models/openai/chatgpt/model.d.ts +2 -1
- package/dist/src/public/models/openai/chatgpt/token-broker.d.ts +1 -1
- package/dist/src/public/nuxt/dev-server.d.ts +3 -2
- package/dist/src/public/skills/index.js +1 -1
- package/dist/src/public/sveltekit/dev-server.d.ts +3 -2
- package/dist/src/public/tools/index.js +1 -1
- package/dist/src/runtime/compiled-artifacts-source.d.ts +0 -4
- package/dist/src/runtime/compiled-artifacts-source.js +1 -1
- package/dist/src/runtime/connections/instance-identity.d.ts +0 -3
- package/dist/src/runtime/connections/instance-identity.js +1 -1
- package/dist/src/runtime/connections/mcp-tracing.d.ts +1 -6
- package/dist/src/runtime/connections/mcp-tracing.js +1 -1
- package/dist/src/runtime/connections/openapi-client.d.ts +1 -1
- package/dist/src/runtime/connections/scoped-authorization.d.ts +0 -9
- package/dist/src/runtime/connections/scoped-authorization.js +1 -1
- package/dist/src/runtime/hooks/registry.d.ts +0 -7
- package/dist/src/runtime/hooks/registry.js +1 -1
- package/dist/src/runtime/loaders/artifact-paths.d.ts +2 -1
- package/dist/src/runtime/loaders/bundled-artifacts.d.ts +0 -1
- package/dist/src/runtime/loaders/bundled-artifacts.js +1 -1
- package/dist/src/runtime/resolve-agent.d.ts +2 -2
- package/dist/src/runtime/resolve-agent.js +1 -1
- package/dist/src/runtime/resolve-dynamic-tool.d.ts +0 -16
- package/dist/src/runtime/resolve-dynamic-tool.js +1 -1
- package/dist/src/runtime/sandbox/prepared-artifacts.d.ts +1 -2
- package/dist/src/runtime/sandbox/prepared-artifacts.js +1 -1
- package/dist/src/runtime/schedules/register.d.ts +0 -4
- package/dist/src/runtime/schedules/register.js +1 -1
- package/dist/src/self-modification/credentials.d.ts +1 -4
- package/dist/src/self-modification/credentials.js +1 -1
- package/dist/src/self-modification/filesystem.d.ts +0 -1
- package/dist/src/self-modification/filesystem.js +1 -1
- package/dist/src/self-modification/git-workspace.d.ts +0 -3
- package/dist/src/self-modification/git-workspace.js +1 -1
- package/dist/src/self-modification/github-publisher.d.ts +2 -1
- package/dist/src/self-modification/migration.d.ts +0 -1
- package/dist/src/self-modification/migration.js +1 -1
- package/dist/src/self-modification/mode.d.ts +2 -1
- package/dist/src/self-modification/proposal.d.ts +0 -2
- package/dist/src/self-modification/proposal.js +2 -2
- package/dist/src/self-modification/setup.js +1 -1
- package/dist/src/services/dev-client/agent-info-probe.d.ts +2 -1
- package/dist/src/services/dev-client/request-headers.d.ts +1 -1
- package/dist/src/setup/ai-gateway-api-key.d.ts +2 -1
- package/dist/src/setup/append-env.d.ts +3 -2
- package/dist/src/setup/ask.d.ts +3 -3
- package/dist/src/setup/boxes/apply-ai-gateway-credential.d.ts +2 -1
- package/dist/src/setup/boxes/deploy-project.d.ts +4 -3
- package/dist/src/setup/boxes/link-project.d.ts +2 -1
- package/dist/src/setup/boxes/resolve-provisioning.d.ts +2 -1
- package/dist/src/setup/boxes/select-model.d.ts +0 -1
- package/dist/src/setup/boxes/select-model.js +1 -1
- package/dist/src/setup/cli/option-row.d.ts +1 -1
- package/dist/src/setup/cli/prompt-ui.d.ts +0 -10
- package/dist/src/setup/cli/prompt-ui.js +1 -1
- package/dist/src/setup/cli/rail-log.d.ts +0 -2
- package/dist/src/setup/cli/rail-log.js +2 -2
- package/dist/src/setup/connect-provisioning.d.ts +2 -1
- package/dist/src/setup/connection-connector.d.ts +2 -1
- package/dist/src/setup/flows/link.d.ts +2 -1
- package/dist/src/setup/flows/model-login.d.ts +1 -1
- package/dist/src/setup/flows/model-source-change.js +1 -1
- package/dist/src/setup/flows/registry-session.d.ts +3 -2
- package/dist/src/setup/integrations/discord/api.d.ts +2 -1
- package/dist/src/setup/integrations/discord/connect.d.ts +3 -3
- package/dist/src/setup/integrations/discord/connect.js +1 -1
- package/dist/src/setup/integrations/discord/setup.d.ts +2 -1
- package/dist/src/setup/integrations/file-memory/vercel.d.ts +1 -1
- package/dist/src/setup/integrations/github/connect.d.ts +3 -3
- package/dist/src/setup/integrations/github/connect.js +1 -1
- package/dist/src/setup/integrations/github/setup.d.ts +1 -1
- package/dist/src/setup/integrations/linear/connect.d.ts +2 -2
- package/dist/src/setup/integrations/linear/connect.js +1 -1
- package/dist/src/setup/integrations/linear/setup.d.ts +1 -1
- package/dist/src/setup/integrations/linq/connect.d.ts +3 -4
- package/dist/src/setup/integrations/linq/connect.js +1 -1
- package/dist/src/setup/integrations/linq/management.d.ts +2 -1
- package/dist/src/setup/integrations/linq/setup.d.ts +1 -9
- package/dist/src/setup/integrations/linq/setup.js +1 -1
- package/dist/src/setup/integrations/photon/connect.d.ts +5 -7
- package/dist/src/setup/integrations/photon/connect.js +1 -1
- package/dist/src/setup/integrations/photon/management.d.ts +5 -4
- package/dist/src/setup/integrations/photon/setup-flow.d.ts +2 -1
- package/dist/src/setup/integrations/registry.d.ts +0 -2
- package/dist/src/setup/integrations/registry.js +1 -1
- package/dist/src/setup/integrations/runner.d.ts +3 -2
- package/dist/src/setup/integrations/shared/scaffold.d.ts +2 -1
- package/dist/src/setup/integrations/shared/vercel-project.d.ts +2 -1
- package/dist/src/setup/integrations/shopify/setup.d.ts +2 -1
- package/dist/src/setup/integrations/teams/connect.d.ts +3 -3
- package/dist/src/setup/integrations/teams/connect.js +1 -1
- package/dist/src/setup/integrations/teams/setup.d.ts +2 -1
- package/dist/src/setup/integrations/web/setup.d.ts +2 -1
- package/dist/src/setup/primitives/pm/process-result.d.ts +2 -1
- package/dist/src/setup/primitives/pm/shared.d.ts +2 -1
- package/dist/src/setup/primitives/process-output.d.ts +2 -1
- package/dist/src/setup/quit-guard.d.ts +3 -2
- package/dist/src/setup/scaffold/create/add-to-project.d.ts +2 -1
- package/dist/src/setup/scaffold/create/project.js +1 -1
- package/dist/src/setup/scaffold/files.d.ts +2 -1
- package/dist/src/setup/scaffold/update/channels.d.ts +0 -1
- package/dist/src/setup/scaffold/workspace-glob.d.ts +0 -1
- package/dist/src/setup/scaffold/workspace-glob.js +1 -1
- package/dist/src/setup/scaffold/workspace-root.d.ts +2 -1
- package/dist/src/setup/slack-connect-create.d.ts +1 -1
- package/dist/src/setup/slack-connect-lifecycle.d.ts +5 -5
- package/dist/src/setup/slack-connect.d.ts +0 -4
- package/dist/src/setup/slack-connect.js +1 -1
- package/dist/src/setup/slackbot.d.ts +3 -3
- package/dist/src/setup/slackbot.js +1 -1
- package/dist/src/setup/vercel-project-api.d.ts +1 -1
- package/dist/src/setup/vercel-project.d.ts +3 -18
- package/dist/src/setup/vercel-project.js +0 -0
- package/dist/src/shared/action-types.d.ts +1 -58
- package/dist/src/shared/action-types.js +1 -1
- package/dist/src/shared/agent-definition.d.ts +0 -3
- package/dist/src/shared/agent-turn-outcome.d.ts +1 -3
- package/dist/src/shared/agent-turn-outcome.js +1 -1
- package/dist/src/shared/chatgpt-model.d.ts +0 -1
- package/dist/src/shared/chatgpt-model.js +1 -1
- package/dist/src/shared/conversation-context.d.ts +2 -1
- package/dist/src/shared/extension-package-contract.d.ts +2 -1
- package/dist/src/shared/forwarded-trace-policy.d.ts +3 -2
- package/dist/src/shared/gateway-service-tier.d.ts +2 -1
- package/dist/src/shared/memory-state.d.ts +0 -8
- package/dist/src/shared/memory-state.js +1 -1
- package/dist/src/shared/sandbox-environment.d.ts +0 -1
- package/dist/src/shared/sandbox-environment.js +1 -1
- package/dist/src/shared/skill-package.d.ts +0 -5
- package/dist/src/shared/skill-package.js +1 -1
- package/dist/src/shared/token-usage.d.ts +0 -7
- package/dist/src/shared/token-usage.js +1 -1
- package/dist/src/shared/ulid.d.ts +2 -8
- package/dist/src/shared/ulid.js +1 -1
- package/dist/src/shared/vercel-project.d.ts +2 -1
- package/dist/src/shared/vercel-services.d.ts +2 -2
- package/dist/src/shared/workflow-sandbox.d.ts +0 -7
- package/dist/src/source-change/agent-config-ast.d.ts +2 -1
- package/dist/src/source-change/agent-config-string-path.d.ts +2 -2
- package/dist/src/source-change/apply-agent-model-settings.d.ts +2 -1
- package/dist/src/source-change/apply-model-selection.d.ts +2 -1
- package/dist/src/source-change/static-source-change.d.ts +4 -3
- package/dist/src/subagents/invocation.d.ts +1 -1
- package/dist/src/subagents/tool.d.ts +2 -1
- package/dist/src/tools/definition.d.ts +0 -3
- package/dist/src/tools/durable-callbacks.d.ts +1 -2
- package/dist/src/tools/durable-callbacks.js +1 -1
- package/dist/src/tools/framework/agent.js +1 -1
- package/dist/src/tools/framework/task-cancel.d.ts +1 -1
- package/dist/src/tools/native-definition.d.ts +2 -1
- package/dist/src/tracing/agent-action-instrumentation.d.ts +2 -1
- package/dist/src/tracing/agent-memory-instrumentation.d.ts +2 -1
- package/dist/src/tracing/agent-otel-provider.d.ts +2 -1
- package/dist/src/tracing/agent-span-id-generator.d.ts +0 -1
- package/dist/src/tracing/agent-span-id-generator.js +1 -1
- package/dist/src/tracing/agent-tool-instrumentation.d.ts +2 -1
- package/dist/src/tracing/agent-tool-span-context.d.ts +3 -2
- package/dist/src/tracing/agent-trace-state.d.ts +0 -24
- package/dist/src/tracing/agent-trace-state.js +1 -1
- package/dist/src/tracing/batch-span-processor.d.ts +2 -1
- package/dist/src/tracing/local-trace-analysis.d.ts +4 -3
- package/dist/src/tracing/local-trace-discovery-index.d.ts +0 -2
- package/dist/src/tracing/local-trace-discovery-index.js +1 -1
- package/dist/src/tracing/local-trace-query.d.ts +2 -1
- package/dist/src/tracing/local-trace-retention.d.ts +4 -4
- package/dist/src/tracing/telemetry-budget.d.ts +0 -1
- package/dist/src/tracing/telemetry-budget.js +1 -1
- package/package.json +8 -8
- package/dist/src/cli/commands/channel-add-conflicts.d.ts +0 -21
- package/dist/src/cli/commands/channel-add-conflicts.js +0 -1
- package/dist/src/cli/commands/registry-search-presentation.d.ts +0 -16
- package/dist/src/cli/commands/registry-search-presentation.js +0 -6
- package/dist/src/compiled/_chunks/workflow/dist-BfMqXLK3.js +0 -3
- package/dist/src/compiled/_chunks/workflow/helpers-CNMO7zB1.js +0 -1
- package/dist/src/compiled/_chunks/workflow/logger-BCEj9caG.js +0 -14
- package/dist/src/compiled/_chunks/workflow/resume-hook-QS_cMwHn.js +0 -1
- package/dist/src/compiled/_chunks/workflow/run-CA5wWV2S.js +0 -1
- package/dist/src/compiled/_chunks/workflow/serialization-CJ265vSe.js +0 -3
- package/dist/src/compiled/_chunks/workflow/sleep-CBn94Ayv.js +0 -1
- package/dist/src/compiled/_chunks/workflow/wait-until-Bo2U6ON9.js +0 -1
- package/dist/src/compiler/compile-from-memory.d.ts +0 -44
- package/dist/src/compiler/compile-from-memory.js +0 -1
- package/dist/src/execution/connection-auth-tool-result.d.ts +0 -2
- package/dist/src/execution/connection-auth-tool-result.js +0 -1
- package/dist/src/internal/process/pnpm.d.ts +0 -28
- package/dist/src/internal/process/pnpm.js +0 -1
- package/dist/src/public/channels/slack/api-encoding.d.ts +0 -5
- package/dist/src/public/channels/slack/api-encoding.js +0 -1
- package/dist/src/public/definitions/instrumentation.d.ts +0 -1
- package/dist/src/public/definitions/instrumentation.js +0 -1
- package/dist/src/public/models/openai/chatgpt/unsigned-jwt.d.ts +0 -5
- package/dist/src/public/models/openai/chatgpt/unsigned-jwt.js +0 -1
- package/dist/src/sandbox/backends/probes.d.ts +0 -7
- package/dist/src/sandbox/backends/probes.js +0 -1
- package/dist/src/setup/channel-add-conflicts.d.ts +0 -28
- package/dist/src/setup/channel-add-conflicts.js +0 -1
- package/dist/src/setup/primitives/run-pnpm.d.ts +0 -1
- package/dist/src/setup/primitives/run-pnpm.js +0 -1
- package/dist/src/shared/dispatch-action.d.ts +0 -30
- package/dist/src/shared/dispatch-action.js +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type { AuthorizationRequiredStreamEvent, MessageStreamEvent, TurnFailureStreamEvent, UnstampedMessageStreamEvent } from "#protocol/message.js";
|
|
2
2
|
import type { InputRequest } from "#shared/input.js";
|
|
3
3
|
/** A connection authorization challenge that remains unresolved at a turn boundary. */
|
|
4
|
-
|
|
4
|
+
interface PendingAuthorization {
|
|
5
5
|
readonly authorization?: AuthorizationRequiredStreamEvent["data"]["authorization"];
|
|
6
6
|
readonly description: string;
|
|
7
7
|
readonly name: string;
|
|
8
8
|
readonly webhookUrl?: string;
|
|
9
9
|
}
|
|
10
10
|
/** Canonical projection of the lifecycle state represented by one turn's events. */
|
|
11
|
-
|
|
11
|
+
interface TurnEventSummary {
|
|
12
12
|
readonly boundary: UnstampedMessageStreamEvent | undefined;
|
|
13
13
|
readonly failure: TurnFailureStreamEvent | undefined;
|
|
14
14
|
readonly inputRequests: readonly InputRequest[];
|
|
@@ -21,3 +21,4 @@ export declare function summarizeTurnEvents(events: readonly UnstampedMessageStr
|
|
|
21
21
|
/** Collects one segment of an event stream through its current-turn boundary. */
|
|
22
22
|
export declare function collectTurnEvents(stream: AsyncIterable<UnstampedMessageStreamEvent>): Promise<readonly UnstampedMessageStreamEvent[]>;
|
|
23
23
|
export declare function updatePendingAuthorizations(pending: Set<string>, event: MessageStreamEvent): void;
|
|
24
|
+
export {};
|
|
@@ -47,16 +47,16 @@
|
|
|
47
47
|
"@vercel/otel": "2.1.3",
|
|
48
48
|
"@vercel/sandbox": "3.3.0",
|
|
49
49
|
"@vercel/sdk": "1.28.8",
|
|
50
|
-
"@workflow/core": "5.0.0-beta.
|
|
51
|
-
"@workflow/errors": "5.0.0-beta.
|
|
50
|
+
"@workflow/core": "5.0.0-beta.57",
|
|
51
|
+
"@workflow/errors": "5.0.0-beta.24",
|
|
52
52
|
"@workflow/serde": "5.0.0-beta.2",
|
|
53
|
-
"@workflow/world": "5.0.0-beta.
|
|
54
|
-
"@workflow/world-local": "5.0.0-beta.
|
|
55
|
-
"@workflow/world-vercel": "5.0.0-beta.
|
|
53
|
+
"@workflow/world": "5.0.0-beta.39",
|
|
54
|
+
"@workflow/world-local": "5.0.0-beta.48",
|
|
55
|
+
"@workflow/world-vercel": "5.0.0-beta.52",
|
|
56
56
|
"zod": "4.5.4",
|
|
57
57
|
"zod-validation-error": "5.0.0"
|
|
58
58
|
},
|
|
59
|
-
"scriptHash": "
|
|
59
|
+
"scriptHash": "1e89a7356b687014be1b3dd2000b50976522132468554b4609c30d6182915242",
|
|
60
60
|
"toolVersions": {
|
|
61
61
|
"rolldown": "1.2.9",
|
|
62
62
|
"typescript": "7.0.2"
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../../_chunks/workflow/dist-
|
|
2
|
-
`)}`)}return await S(t,r.value)}}}async function D(e,
|
|
1
|
+
import"../../_chunks/workflow/dist-BUFGAKRb.js";import{Fn as e,Kn as t,Zn as n}from"../../_chunks/workflow/logger-D4GJNTk4.js";import{d as r,i}from"../../_chunks/workflow/dist-CaNNONeg.js";import{G as a,W as o,b as s,ct as c,i as l,it as u,lt as d,nt as f,rt as p,st as m,tt as h,ut as g,w as _}from"../../_chunks/workflow/serialization-CNIYl1D3.js";import{a as v,i as y,r as b,t as x}from"../../_chunks/workflow/attribute-changes-D721NpZv.js";import{n as S}from"../../_chunks/workflow/resume-hook-uTW-jBYz.js";import{t as C}from"../../_chunks/workflow/sleep-DFKgN7UG.js";function w(e){y(`createHook()`,`https://workflow-sdk.dev/docs/api-reference/workflow/create-hook`,w)}function T(e){y(`createWebhook()`,`https://workflow-sdk.dev/docs/api-reference/workflow/create-webhook`,T)}function E({schema:e}={}){function t(e){y(`defineHook().create()`,`https://workflow-sdk.dev/docs/api-reference/workflow/define-hook`,t)}return{create:t,async resume(t,n){if(!e?.[`~standard`])return await S(t,n);let r=e[`~standard`].validate(n);if(r instanceof Promise&&(r=await r),r.issues){let e=r.issues.map(e=>{let t=e.path?.map(e=>String(typeof e==`object`&&e?e.key:e)).join(`.`);return t?` at "${t}": ${e.message}`:` ${e.message}`});throw Error(`Hook payload did not match the defined schema:\n${e.join(`
|
|
2
|
+
`)}`)}return await S(t,r.value)}}}async function D(e,t={}){let r=a.getStore(),o=r?.workflowMetadata?.workflowRunId;if(!o)throw new i(`setAttributes() must be called from a 'use workflow' or 'use step' function. Calling it from plain host code is not supported.`);let s={type:`step`,stepId:r.stepMetadata.stepId,attempt:r.stepMetadata.attempt},c=x(e,t,s);if(c.length!==0){if(r.runReadyBarrier)try{await r.runReadyBarrier}catch{}await(await n()).events.create(o,{eventType:`attr_set`,specVersion:8,eventData:{changes:c,writer:s,...t.allowReservedAttributes===!0?{allowReservedAttributes:!0}:{}}})}}function O(){let e=a.getStore();return e||b(`getStepMetadata()`,`https://workflow-sdk.dev/docs/api-reference/workflow/get-step-metadata`,O),e.stepMetadata}function k(){let e=a.getStore();return e||v(`getWorkflowMetadata()`,`https://workflow-sdk.dev/docs/api-reference/workflow/get-workflow-metadata`,k),e.workflowMetadata}function A(n={}){let r=a.getStore();r||v(`getWritable()`,`https://workflow-sdk.dev/docs/api-reference/workflow/get-writable`,A);let{namespace:i}=n,y=r.workflowMetadata.workflowRunId,b=o(y,i);r.writables??=new Map;let x=r.writables,S=x.get(b);if(S)return S.writable;let C=h();C.deferReleaseSettlement=r.streamStates!==void 0;let w=_(s(globalThis,r.ops,y,r.encryptionKey,!0,r.runReadyBarrier),r.encryptionKey),T=new l(y,b,r.runReadyBarrier);r.streamStates??=[],r.streamStates.push(C),r.ops.push(C.promise),f(w.readable,T,C).catch(()=>{});let E=u(w.writable,C);return p(E,C),Object.defineProperty(E,m,{value:b,writable:!1}),Object.defineProperty(E,g,{value:y,writable:!1}),r.workflowDeploymentId&&Object.defineProperty(E,c,{value:r.workflowDeploymentId,writable:!1}),e(r.encryptionKey)&&Object.defineProperty(E,d,{value:t(r.encryptionKey.keyPair.publicKey),writable:!1}),x.set(b,{writable:E,state:C}),E}export{i as FatalError,r as RetryableError,w as createHook,T as createWebhook,E as defineHook,O as getStepMetadata,k as getWorkflowMetadata,A as getWritable,D as setAttributes,C as sleep};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as e}from"../../_chunks/workflow/dist-
|
|
1
|
+
import{A as e}from"../../_chunks/workflow/dist-CaNNONeg.js";import{i as t,n}from"../../_chunks/workflow/global-DKbOgrts.js";const r=Symbol.for(`@workflow/core//registeredSteps`),i=globalThis,a=i[r]??=new Map,o=new Set([`__builtin_response_array_buffer`,`__builtin_response_json`,`__builtin_response_text`]);function s(e){let t=e.split(`//`);if(t.length!==3||t[0]!==`step`)return[];let n=t[1],r=t[2],i=new Set,a=e=>{e!==n&&i.add(e)};if(n.startsWith(`./workflows/`)){let e=n.slice(2);a(`./example/${e}`),a(`./src/${e}`)}else if(n.startsWith(`./example/workflows/`)){let e=n.slice(10);a(`./${e}`),a(`./src/${e}`)}else if(n.startsWith(`./src/workflows/`)){let e=n.slice(6);a(`./${e}`),a(`./example/${e}`)}return Array.from(i,e=>`step//${e}//${r}`)}function c(e){if(o.has(e)){for(let[t,n]of a.entries())if(t.endsWith(`//${e}`))return n}}function l(e,t){a.set(e,t),t.stepId=e}function u(e){let t=a.get(e);if(t)return t;for(let t of s(e)){let e=a.get(t);if(e)return e}let n=c(e);if(n)return n}const d={hook:[`hook`,`wait`,`step`],wait:[`hook`,`step`],step:[`wait`,`hook`,`step`]};function f(e,t,n,r){return n>=t||!d[e].includes(r.kind)?!1:!(e===`step`&&!r.armed)}function p(e,t,n,r){let i=r.get(t);if(i!==void 0)return i;let a=m(e,t,n,r);return r.set(t,a),a}function m(e,t,n,r){if(!n.armed)return!1;for(let[i,a]of e)if(f(n.kind,t,i,a)&&!p(e,i,a,r))return!1;return!0}function h(){return process.env.WORKFLOW_LOG_ORDER_DRAWS!==`0`}function g(e){return e===0&&typeof setImmediate==`function`?new Promise(e=>setImmediate(e)):new Promise(t=>setTimeout(t,e))}async function _(e,t){for(;;){let n=e.mintCount??0,r=e.pendingDeliveries;if(await g(await e.promiseQueue.then(()=>!1,()=>!0)?50:0),(e.mintCount??0)!==n||r!==0||e.pendingDeliveries!==0)continue;let i=!1;for(let[n,r]of e.pendingDeliveryBarriers??[])if(n<t&&r.armed){i=!0;break}if(!i)return}}async function v(e,t,n){if(t===void 0||!e.pendingDeliveryBarriers)return;let r=e.pendingDeliveryBarriers,i=[];for(let[e,a]of r)f(n,t,e,a)&&i.push(a.released);if(i.length>0&&await Promise.all(i),h()){await _(e,t);return}i.length>0&&await new Promise(e=>setTimeout(e,0))}function y(n,r,i,a){let o=!1,s=()=>!o&&(o=!0,n.advanceClock?.(a.deliveredAt),!0),c=n.pendingDeliveryBarriers;if(!c||r===void 0)return{markDelivered:()=>{s()},arm:()=>{}};let l=a=>{if(c.has(r))throw new e(`Delivery barrier already registered at event index ${r}`);let{promise:o,resolve:s}=t(),l={kind:i,released:o,armed:a,retired:!1,retire:()=>{l.retired||(l.retired=!0,c.get(r)===l&&c.delete(r),s())}};return c.set(r,l),x(n),l},u=l(a.armed??!0);return{markDelivered:()=>{s()&&u.retire()},arm:()=>{if(!o){if(u.retired){u=l(!0);return}if(c.get(r)!==u)throw new e(`Delivery barrier lost ownership of event index ${r}`);u.armed=!0}}}}const b=new WeakSet;function x(e){let t=e.pendingDeliveryBarriers;if(!t||b.has(e))return;b.add(e);let n=()=>{setTimeout(i,0)},r=()=>{setTimeout(i,50)},i=()=>{if(t.size===0){b.delete(e);return}if(!S(e)){e.promiseQueue.then(n,r);return}for(;t.size>0&&S(e);){let e,n;for(let[r,i]of t)(e===void 0||r<e)&&(e=r,n=i);n?.retire()}setTimeout(i,0)};setTimeout(i,0)}function S(e){return e.pendingDeliveries===0&&!C(e)}function C(e){let t=e.pendingDeliveryBarriers;if(!t||t.size===0)return!1;let n=new Map;for(let[e,r]of t)if(p(t,e,r,n))return!0;return!1}function w(e){return e.pendingDeliveries===0&&(!e.pendingDeliveryBarriers||e.pendingDeliveryBarriers.size===0)}function T(e,t){let n=()=>{w(e)?t():e.promiseQueue.then(()=>{setTimeout(n,0)})};setTimeout(n,0)}function E(e){let t=e.suspensionGeneration;T(e,()=>{t===e.suspensionGeneration&&e.onWorkflowError(new n(e.invocationsQueue,e.globalThis))})}export{v as awaitEarlierDeliveries,u as getStepFunction,C as hasParkedCommittedDelivery,w as isDeliveryIdle,y as registerDeliveryBarrier,l as registerStepFunction,T as scheduleWhenIdle,E as scheduleWorkflowSuspension};
|
|
@@ -126,9 +126,10 @@ export declare function isResilientStepDispatchEnabled(): boolean;
|
|
|
126
126
|
* `world.events.createBatch` call (one durable write, per-event outcomes)
|
|
127
127
|
* instead of one write per event. Only engages when the World implements the
|
|
128
128
|
* optional `events.createBatch` AND the run is on slot identity
|
|
129
|
-
* (specVersion >= 6) AND the suspension carries no attribute
|
|
130
|
-
*
|
|
131
|
-
*
|
|
129
|
+
* (specVersion >= 6) AND the suspension carries no attribute writes and no
|
|
130
|
+
* resilient step dispatch. Hook writes in the same suspension go through the
|
|
131
|
+
* single-event path concurrently with the batch. Everything else keeps the
|
|
132
|
+
* single-event path byte-for-byte.
|
|
132
133
|
*
|
|
133
134
|
* Reads `process.env.WORKFLOW_BATCH_TRANSITIONS` lazily. Default **ON**;
|
|
134
135
|
* disabled only by an explicit `'0'` / `'false'` (case-insensitive), the
|
|
@@ -46,6 +46,14 @@ export interface HealthCheckResult {
|
|
|
46
46
|
* which fails that gate closed.
|
|
47
47
|
*/
|
|
48
48
|
hookResumeInputVersion?: number;
|
|
49
|
+
/**
|
|
50
|
+
* The format the responding deployment answered in, set whenever it
|
|
51
|
+
* answered: `'text'` for the plain-text reply of deployments that predate
|
|
52
|
+
* the versioned JSON response (spec 3), `'json'` otherwise. A JSON reply
|
|
53
|
+
* proves the responder runs spec 3 or later even when its `specVersion`
|
|
54
|
+
* field is missing or malformed.
|
|
55
|
+
*/
|
|
56
|
+
format?: 'json' | 'text';
|
|
49
57
|
}
|
|
50
58
|
/**
|
|
51
59
|
* Checks if the given message is a health check payload.
|
|
@@ -113,6 +121,21 @@ export declare function appendUniqueEvents(target: Event[], events: readonly Eve
|
|
|
113
121
|
* than a reconstruction.
|
|
114
122
|
*/
|
|
115
123
|
export declare function insertEventByEventId(target: Event[], event: Event): void;
|
|
124
|
+
/**
|
|
125
|
+
* How replay reads the event log. Replay recomputes every step's arguments by
|
|
126
|
+
* re-running workflow code and never reads the recorded ones (a step reads its
|
|
127
|
+
* input from the step entity), so replay reads let the World leave them out.
|
|
128
|
+
* For a workflow passing growing state into its steps, they are the part of
|
|
129
|
+
* the log that grows quadratically.
|
|
130
|
+
*/
|
|
131
|
+
export declare const REPLAY_RESOLVE_DATA: "skip-step-inputs";
|
|
132
|
+
/**
|
|
133
|
+
* Params for a write whose inline delta (`sinceCursor`) is folded into a
|
|
134
|
+
* replay log: that delta is read the way replay reads the log. The created
|
|
135
|
+
* event and `step` entity are unaffected, so a write that asks for no delta
|
|
136
|
+
* is left exactly as it was.
|
|
137
|
+
*/
|
|
138
|
+
export declare function withReplayDelta(params: CreateEventParams | undefined): CreateEventParams | undefined;
|
|
116
139
|
/**
|
|
117
140
|
* Loads workflow run events by iterating through all pages of paginated
|
|
118
141
|
* results. Events are returned in chronological (ascending) order for
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as e,
|
|
1
|
+
import{C as e,D as t,E as n,O as r,S as i,T as a,_ as o,a as s,b as c,c as l,d as u,f as d,g as f,h as p,i as m,l as h,m as g,n as _,o as v,p as y,r as b,s as x,t as S,u as C,v as w,w as T,x as E,y as D}from"../../../_chunks/workflow/helpers-DkKxg_yn.js";export{S as REPLAY_RESOLVE_DATA,_ as SLOT_GAP_RECHECK_ATTEMPTS,b as absorbSkippedSlotReport,m as appendEventLog,s as appendUniqueEvents,v as findEventSlotGap,x as getQueueOverhead,l as getWorkflowQueueName,h as handleHealthCheckMessage,C as healthCheck,u as insertEventByEventId,d as isSlotGapCheckEnabled,y as loadWorkflowRunEvents,g as maxEventSlot,p as memoizeEncryptionKey,f as mergeReportedEvents,o as parseHealthCheckPayload,w as preconditionEventDelta,D as queueMessage,c as queueMessages,E as resolveRunEncryptionKey,i as rootRunIdFrom,e as runDispatchContext,T as settleEventSlotGap,a as slotSnapshotParams,n as stepDispatchIdempotencyKey,t as withHealthCheck,r as withReplayDelta};
|
|
@@ -33,9 +33,11 @@ export declare function publishHookWakeWithRetry(publish: () => Promise<unknown>
|
|
|
33
33
|
* Same durability contract as `resumeHook()`'s wake: the row is durable
|
|
34
34
|
* before this runs, the publish is retried on transport-shaped failures, and
|
|
35
35
|
* a publish that still fails is logged rather than failing the claimer —
|
|
36
|
-
* nothing of the claimer's is wrong,
|
|
37
|
-
*
|
|
38
|
-
*
|
|
36
|
+
* nothing of the claimer's is wrong, every later replay of the claimer inside
|
|
37
|
+
* the republish window tries again ({@link forcedCreationsOwingWake}), and
|
|
38
|
+
* the victim reads the row on its next invocation for any reason. The
|
|
39
|
+
* idempotency key is the claimer's hook id, so those republishes collapse
|
|
40
|
+
* into one wake.
|
|
39
41
|
*
|
|
40
42
|
* Skipped when the victim is the claimer itself (a run taking over its own
|
|
41
43
|
* earlier hook is already running) and when the World recorded no
|
|
@@ -44,46 +46,77 @@ export declare function publishHookWakeWithRetry(publish: () => Promise<unknown>
|
|
|
44
46
|
*/
|
|
45
47
|
export declare function publishForceClaimVictimWake(world: World, claimerRunId: string, hook: Pick<Hook, 'hookId' | 'claimedFrom'>): Promise<'published' | 'skipped' | 'failed'>;
|
|
46
48
|
/**
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
+
* How long after a forced `hook_created` a replay of the claimer keeps
|
|
50
|
+
* republishing its victim's wake: 24 hours, measured from the row's
|
|
51
|
+
* `createdAt`.
|
|
52
|
+
*
|
|
53
|
+
* The bound has to outlast every redelivery of the invocation that journaled
|
|
54
|
+
* the creation, because that redelivery is the replay that must repay a wake
|
|
55
|
+
* the invocation died before publishing. A queue message is retained for 24
|
|
56
|
+
* hours from its send and the creation is written after the send, so any such
|
|
57
|
+
* redelivery arrives within 24 hours of the creation. The same 24 hours is the
|
|
58
|
+
* Vercel queue's idempotency window (`min(retention, 24h)`), so every
|
|
59
|
+
* republish inside it collapses, under `hook-force-claim-<hookId>`, into the
|
|
60
|
+
* one wake that was (or now is) delivered. Past it a republish would be a
|
|
61
|
+
* genuinely new message, which is what the bound saves. world-postgres
|
|
62
|
+
* remembers a completed key in-process to the same effect; world-local
|
|
63
|
+
* dedupes a key only while its message is in flight, so there a republish can
|
|
64
|
+
* deliver the victim one more replay, which reads nothing new.
|
|
65
|
+
*/
|
|
66
|
+
export declare const FORCE_CLAIM_WAKE_REPUBLISH_WINDOW_MS: number;
|
|
67
|
+
/**
|
|
68
|
+
* The forced hook creations whose victim wake this run may still owe: every
|
|
69
|
+
* forced `hook_created` (one carrying `forceClaimedFrom`) in the log whose
|
|
70
|
+
* `createdAt` is within {@link FORCE_CLAIM_WAKE_REPUBLISH_WINDOW_MS} of
|
|
71
|
+
* `nowMs`.
|
|
49
72
|
*
|
|
50
73
|
* A forced creation is followed by a wake of the run it took the token from.
|
|
51
74
|
* If the invocation died between the two, the creation is in the log and the
|
|
52
|
-
* victim was never told; the row itself is the durable record of that debt
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
* ends the republishing.
|
|
75
|
+
* victim was never told; the row itself is the durable record of that debt,
|
|
76
|
+
* and nothing records that the wake went out. So the replay does not try to
|
|
77
|
+
* infer it: it republishes for every recent forced creation, and the hook's
|
|
78
|
+
* idempotency key collapses a wake that did go out (a duplicate that slips
|
|
79
|
+
* past a World's dedupe is one harmless replay of the victim).
|
|
58
80
|
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
* token from A, died before waking A, and was
|
|
67
|
-
* wake
|
|
68
|
-
* `hook_disposed` (a `dispose()` in its code) IS its progress and still ends
|
|
69
|
-
* the debt, but a row another run put here does not. Both engines call this
|
|
70
|
-
* on the log they loaded for the invocation, before writing anything.
|
|
81
|
+
* The rule reads nothing written after the creation, which is what makes it
|
|
82
|
+
* sound. Any row can land between the creation and the wake: a step, wait,
|
|
83
|
+
* attribute or other hook row the same suspension writes concurrently
|
|
84
|
+
* (neither engine holds those for the wake), a step or wait terminal from
|
|
85
|
+
* another invocation, a delivery's `hook_received`, a sealed-log `noop`, or a
|
|
86
|
+
* later claimer's `hook_disposed{forceClaimedBy}` taking the token from this
|
|
87
|
+
* run. None of them says the wake was published. The last is the chain case:
|
|
88
|
+
* this run took the token from A, died before waking A, and was taken from by
|
|
89
|
+
* C; C's wake of this run is the invocation that repays A's.
|
|
71
90
|
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
* leave that row last and hide the debt.
|
|
91
|
+
* The time is the row's `createdAt`, never one decoded from its event id (a
|
|
92
|
+
* slot-numbered id carries none). Under slot identity it is the writer's
|
|
93
|
+
* client clock, clamped by the World to at most an hour ahead of its own, so
|
|
94
|
+
* skew moves the window's edge by at most that much; a creation dated ahead of
|
|
95
|
+
* `nowMs` counts as recent, and one whose time cannot be read is treated as
|
|
96
|
+
* recent too, erring toward a wake rather than a stranded victim.
|
|
79
97
|
*/
|
|
80
|
-
export declare function
|
|
98
|
+
export declare function forcedCreationsOwingWake(events: readonly Event[] | undefined, nowMs?: number): (Event & {
|
|
81
99
|
eventType: 'hook_created';
|
|
82
|
-
})
|
|
100
|
+
})[];
|
|
83
101
|
/**
|
|
84
|
-
* Republish the
|
|
85
|
-
* the node:vm suspension handler and the QuickJS entrypoint so the
|
|
86
|
-
* cannot drift on the durability contract.
|
|
102
|
+
* Republish the wakes {@link forcedCreationsOwingWake} says may be owed.
|
|
103
|
+
* Shared by the node:vm suspension handler and the QuickJS entrypoint so the
|
|
104
|
+
* two engines cannot drift on the durability contract.
|
|
105
|
+
*
|
|
106
|
+
* `alreadyWoken` is the invocation's record of the hooks whose victim wake it
|
|
107
|
+
* has already published or attempted, the forced creations it made itself
|
|
108
|
+
* included: an engine that replays more than once per invocation passes the
|
|
109
|
+
* same set every time, so each hook costs one send per invocation. Hooks this
|
|
110
|
+
* call publishes are added to it.
|
|
111
|
+
*
|
|
112
|
+
* Self-claims and victims with no recorded `workflowName` are skipped
|
|
113
|
+
* silently: the creating invocation already logged the latter, and a replay
|
|
114
|
+
* repeating it would say nothing new. Never rejects; a publish that fails
|
|
115
|
+
* after its retries is logged, and the next replay inside the window tries
|
|
116
|
+
* again.
|
|
87
117
|
*/
|
|
88
|
-
export declare function
|
|
118
|
+
export declare function republishOwedForceClaimVictimWakes(world: World, runId: string, events: readonly Event[] | undefined, options?: {
|
|
119
|
+
alreadyWoken?: Set<string>;
|
|
120
|
+
nowMs?: number;
|
|
121
|
+
}): Promise<void>;
|
|
89
122
|
//# sourceMappingURL=hook-wake.d.ts.map
|
|
@@ -1,40 +1,39 @@
|
|
|
1
1
|
import { WorkflowRunFailedError } from '#compiled/@workflow/errors/index.js';
|
|
2
2
|
import type { PayloadKey } from '../serialization/encryption.js';
|
|
3
3
|
import { Run } from './run.js';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
interface RunHookParams {
|
|
5
|
+
/**
|
|
6
|
+
* The machine-readable workflow identifier, such as
|
|
7
|
+
* `workflow//./src/workflows/order//processOrder`, available without a read.
|
|
8
|
+
* Unlike this string, `run.workflowName` is a Promise that fetches metadata.
|
|
9
|
+
*/
|
|
10
10
|
workflowName: string;
|
|
11
11
|
/**
|
|
12
|
-
* The
|
|
12
|
+
* The transitioned run. The instance hydrates lazily, so reading
|
|
13
13
|
* `run.returnValue` (or any other accessor) fetches from the backend only
|
|
14
14
|
* when the handler actually uses it.
|
|
15
15
|
*/
|
|
16
16
|
run: Run<unknown>;
|
|
17
17
|
}
|
|
18
|
+
/** Parameters passed to an {@link WorkflowLifecycleHooks.onRunCompleted} handler. */
|
|
19
|
+
export interface RunCompletedHookParams extends RunHookParams {
|
|
20
|
+
}
|
|
18
21
|
/**
|
|
19
22
|
* Parameters passed to an {@link WorkflowLifecycleHooks.onRunFailed}
|
|
20
23
|
* handler.
|
|
21
24
|
*/
|
|
22
|
-
export interface RunFailedHookParams {
|
|
23
|
-
/** The workflow name, available without fetching the run. */
|
|
24
|
-
workflowName: string;
|
|
25
|
-
/**
|
|
26
|
-
* The failed run. The instance hydrates lazily, so accessors fetch from
|
|
27
|
-
* the backend only when the handler actually uses them.
|
|
28
|
-
*/
|
|
29
|
-
run: Run<unknown>;
|
|
25
|
+
export interface RunFailedHookParams extends RunHookParams {
|
|
30
26
|
/**
|
|
31
|
-
* The failure
|
|
32
|
-
*
|
|
33
|
-
*
|
|
27
|
+
* The persisted failure hydrated for reporting. Unlike `run.returnValue`,
|
|
28
|
+
* readable streams load only when consumed and abort signals reflect their
|
|
29
|
+
* persisted state without live subscriptions. Writable streams retain their
|
|
30
|
+
* normal forwarding setup.
|
|
31
|
+
*
|
|
32
|
+
* This `WorkflowRunFailedError` has an `errorCode` carrying the failure
|
|
33
|
+
* classification (e.g. `USER_ERROR`, `RUNTIME_ERROR`). Its `cause` is
|
|
34
34
|
* the hydrated persisted value (registered Error subclass identity preserved).
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
* Error, matching `run.returnValue`'s fallback.
|
|
35
|
+
* If hydration fails, `cause` is a generic Error, matching
|
|
36
|
+
* `run.returnValue`'s fallback.
|
|
38
37
|
*/
|
|
39
38
|
error: WorkflowRunFailedError;
|
|
40
39
|
}
|
|
@@ -65,11 +64,14 @@ export interface WorkflowLifecycleHooks {
|
|
|
65
64
|
* CLI or dashboard) do not fire handlers in the app.
|
|
66
65
|
* - Handlers are fire-and-forget: they cannot delay or change the run's
|
|
67
66
|
* outcome, and a throwing handler is logged and swallowed. On Vercel,
|
|
68
|
-
* `waitUntil` keeps the invocation alive
|
|
67
|
+
* `waitUntil` keeps the invocation alive for handlers and background stream
|
|
68
|
+
* operations from the hydrated failure. On other hosts handlers run
|
|
69
69
|
* detached, and freezing serverless hosts may not let them finish.
|
|
70
70
|
* - Reporting is best effort: callbacks are not retried if the invocation
|
|
71
71
|
* dies before they finish. Use the event log as the system of record.
|
|
72
72
|
* - Multiple registrations are allowed; handlers run in registration order.
|
|
73
|
+
* Registrations are not deduplicated. Unregister the previous hooks before
|
|
74
|
+
* registering again during hot reload or module re-evaluation.
|
|
73
75
|
*
|
|
74
76
|
* @returns A function that unregisters these hooks.
|
|
75
77
|
*/
|
|
@@ -87,4 +89,5 @@ export declare function dispatchRunCompletedHooks(runId: string, workflowName: s
|
|
|
87
89
|
* @param errorCode - The classification written to the event's `errorCode`.
|
|
88
90
|
*/
|
|
89
91
|
export declare function dispatchRunFailedHooks(runId: string, workflowName: string, error: unknown, encryptionKey: PayloadKey | undefined, errorCode: string): void;
|
|
92
|
+
export {};
|
|
90
93
|
//# sourceMappingURL=lifecycle-hooks.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The spec version to stamp on an event written to a run by a process that may
|
|
3
|
+
* not be the one executing it: the run's own version when it is lower than this
|
|
4
|
+
* SDK's.
|
|
5
|
+
*
|
|
6
|
+
* The runtime executing a run reads every event in its log, and one built
|
|
7
|
+
* against a lower spec version (an older deployment, or another SDK) rejects an
|
|
8
|
+
* event stamped above what it supports. The Python SDK rejects the run's whole
|
|
9
|
+
* event log over a single such event. Capped at this SDK's version too, since
|
|
10
|
+
* that is the newest format this SDK can write.
|
|
11
|
+
*
|
|
12
|
+
* `whenUnknown` is used for a run with no recorded version. It defaults to this
|
|
13
|
+
* SDK's; callers that treat such a run as legacy pass `SPEC_VERSION_LEGACY`.
|
|
14
|
+
*/
|
|
15
|
+
export declare function specVersionForRunWrite(runSpecVersion: number | undefined, whenUnknown?: number): number;
|
|
16
|
+
//# sourceMappingURL=run-spec-version.d.ts.map
|
|
@@ -1,5 +1,53 @@
|
|
|
1
1
|
import type { RunRetention, World } from '#compiled/@workflow/world/index.js';
|
|
2
|
+
import { type HealthCheckResult } from './helpers.js';
|
|
2
3
|
import { Run } from './run.js';
|
|
4
|
+
/**
|
|
5
|
+
* Where a run's stamped spec version came from, recorded on the `start()`
|
|
6
|
+
* span so "why is this run on spec N?" is answerable without reading code.
|
|
7
|
+
*/
|
|
8
|
+
export type SpecVersionSource = 'same-deployment' | 'explicit' | 'probe' | 'probe-unversioned' | 'probe-malformed' | 'probe-miss' | 'no-probe-channel';
|
|
9
|
+
/**
|
|
10
|
+
* The spec version to stamp on a run that another deployment will execute.
|
|
11
|
+
*
|
|
12
|
+
* A run's spec version is a promise about the runtime that reads and writes
|
|
13
|
+
* its event log, and for a cross-deployment start that is the target, not
|
|
14
|
+
* this caller. The capability probe runs inside the target and reports the
|
|
15
|
+
* version the target itself mints (which already honours the target's own
|
|
16
|
+
* `WORKFLOW_SEALED_LOG` switch), so that is the answer, capped at what this
|
|
17
|
+
* caller's World mints: the caller writes `run_created` and the arguments,
|
|
18
|
+
* and must never stamp a version it could not have written itself.
|
|
19
|
+
*
|
|
20
|
+
* When the target does not report a usable version:
|
|
21
|
+
*
|
|
22
|
+
* - a plain-text reply predates the versioned JSON health response, which
|
|
23
|
+
* arrived with spec 3 (CBOR queue transport), so it is stamped as
|
|
24
|
+
* event-sourced: such a target cannot read a CBOR `runInput`.
|
|
25
|
+
* - a JSON reply without a usable `specVersion` still proves the target is
|
|
26
|
+
* at spec 3 or later, so it is stamped with CBOR queue transport rather
|
|
27
|
+
* than losing it (and resilient start with it) to a malformed field.
|
|
28
|
+
* - a probe that times out, or no probe channel at all, is a guess.
|
|
29
|
+
* `SPEC_VERSION_SUPPORTS_SLOT_IDENTITY` is the lowest version a v5 runtime
|
|
30
|
+
* can execute on the Vercel World (it requires slot event ids), so it is
|
|
31
|
+
* the only floor that keeps same-major targets working. It is NOT safe for
|
|
32
|
+
* an older-major target such as `stable` (spec 3): that target rejects the
|
|
33
|
+
* run when it picks it up. No single floor serves both, which is why the
|
|
34
|
+
* probe budget is generous; the miss is logged and recorded on the span.
|
|
35
|
+
*
|
|
36
|
+
* Once executors attest their version on `run_started` and the backend
|
|
37
|
+
* raises a run to it (vercel/workflow#4366, vercel/workflow-server#1044), a
|
|
38
|
+
* v5 target heals an under-stamped run, and this miss floor may drop, but
|
|
39
|
+
* only once the raise is enabled on the whole server fleet AND every v5
|
|
40
|
+
* target a caller can reach attests its version (a published beta that does
|
|
41
|
+
* not would be stamped below slot identity and fail). Even then a floor
|
|
42
|
+
* below `SPEC_VERSION_SUPPORTS_ATTRIBUTES` would refuse `attributes` on every
|
|
43
|
+
* miss. Tracked in vercel/workflow#4401.
|
|
44
|
+
*
|
|
45
|
+
* Exported for tests.
|
|
46
|
+
*/
|
|
47
|
+
export declare function resolveCrossDeploymentSpecVersion(probe: Pick<HealthCheckResult, 'healthy' | 'specVersion' | 'format'> | undefined, callerSpecVersion: number): {
|
|
48
|
+
specVersion: number;
|
|
49
|
+
source: SpecVersionSource;
|
|
50
|
+
};
|
|
3
51
|
/**
|
|
4
52
|
* Reset the `deploymentId: 'latest'` no-op warn-once guard. Test-only,
|
|
5
53
|
* exported so unit tests can exercise the warn path across `start()` calls.
|
|
@@ -7,6 +55,12 @@ import { Run } from './run.js';
|
|
|
7
55
|
* @internal
|
|
8
56
|
*/
|
|
9
57
|
export declare function _resetLatestNoOpWarnForTests(): void;
|
|
58
|
+
/**
|
|
59
|
+
* Reset the cross-deployment probe-miss warn-once guard. Test-only.
|
|
60
|
+
*
|
|
61
|
+
* @internal
|
|
62
|
+
*/
|
|
63
|
+
export declare function _resetProbeMissWarnForTests(): void;
|
|
10
64
|
export interface StartOptionsBase {
|
|
11
65
|
/**
|
|
12
66
|
* The world to use for the workflow run creation,
|
|
@@ -14,7 +68,11 @@ export interface StartOptionsBase {
|
|
|
14
68
|
*/
|
|
15
69
|
world?: World;
|
|
16
70
|
/**
|
|
17
|
-
* The spec version to use for the workflow run. Defaults to the
|
|
71
|
+
* The spec version to use for the workflow run. Defaults to the spec
|
|
72
|
+
* version of the deployment that will execute the run: the configured
|
|
73
|
+
* World's for a same-deployment start, and for a cross-deployment start
|
|
74
|
+
* (`deploymentId` naming another deployment) the version the target
|
|
75
|
+
* reports on its capability probe, capped at the configured World's.
|
|
18
76
|
*/
|
|
19
77
|
specVersion?: number;
|
|
20
78
|
/**
|
|
@@ -160,8 +160,9 @@ export declare function computeStepLatencyTracking(params: {
|
|
|
160
160
|
/** See {@link StepLatencyTracking.preStepBlockingMs}. */
|
|
161
161
|
preStepBlockingMs: number;
|
|
162
162
|
/**
|
|
163
|
-
* The accumulator's value as of the suspension that wrote the
|
|
164
|
-
* attr_set (
|
|
163
|
+
* The accumulator's value as of the start of the suspension that wrote the
|
|
164
|
+
* run's first attr_set (that suspension's hook writes run alongside its attr
|
|
165
|
+
* writes, so the hook time it reports falls after the attr commit). When the
|
|
165
166
|
* measurement ends at the attr write, only hook time from before that
|
|
166
167
|
* point may be subtracted; later hook writes fall outside the measured
|
|
167
168
|
* window. Undefined when no attr suspension happened in this invocation
|
|
@@ -84,6 +84,15 @@ export interface SuspensionHandlerParams {
|
|
|
84
84
|
* keep the everything-durable-at-return behavior.
|
|
85
85
|
*/
|
|
86
86
|
allowDeferredBatchWork?: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* The invocation's record of hooks whose force-claim victim wake it has
|
|
89
|
+
* already published or attempted, whether as the forced creation's own wake
|
|
90
|
+
* or as a replay's republish (see `republishOwedForceClaimVictimWakes`). The
|
|
91
|
+
* caller passes one set for the whole invocation so a run that suspends more
|
|
92
|
+
* than once per invocation sends each hook's wake once, not once per
|
|
93
|
+
* suspension. Omitted, every suspension republishes on its own.
|
|
94
|
+
*/
|
|
95
|
+
forceClaimVictimWakes?: Set<string>;
|
|
87
96
|
}
|
|
88
97
|
/**
|
|
89
98
|
* Result of handling a suspension. Returns pending step items so the caller
|
|
@@ -200,9 +209,13 @@ export interface SuspensionHandlerResult {
|
|
|
200
209
|
};
|
|
201
210
|
/**
|
|
202
211
|
* Whether a hook create committed a `hook_conflict` — the token was already
|
|
203
|
-
* claimed, so this run's hook was never created
|
|
204
|
-
*
|
|
205
|
-
*
|
|
212
|
+
* claimed, so this run's hook was never created. The caller answers it by
|
|
213
|
+
* advancing the workflow over the committed event before it dispatches or
|
|
214
|
+
* runs the steps this suspension scheduled. Those steps were written
|
|
215
|
+
* alongside the hook create, not after it, so their `step_created` events
|
|
216
|
+
* (and, on the batched path, their step messages and any pre-claimed inline
|
|
217
|
+
* pairs in {@link inlineClaims}) may already be out: work the workflow
|
|
218
|
+
* started concurrently with the hook is not held back by its conflict.
|
|
206
219
|
*/
|
|
207
220
|
hasHookConflict: boolean;
|
|
208
221
|
/** Whether a `hook.getConflict()` awaiter needs the workflow to continue immediately */
|
|
@@ -243,7 +256,8 @@ export interface SuspensionHandlerResult {
|
|
|
243
256
|
* folded in (see `hookDeltaCursor` below), and nothing else in this
|
|
244
257
|
* suspension wrote an event. False whenever a read is needed first: no
|
|
245
258
|
* delta was asked for or returned, it was truncated, or a step / wait /
|
|
246
|
-
* attribute / abort write
|
|
259
|
+
* attribute / abort write (single or batched) also committed and may not be
|
|
260
|
+
* in it.
|
|
247
261
|
*
|
|
248
262
|
* Indifferent to which event the create committed: the delta is the slice
|
|
249
263
|
* of the log after the caller's cursor either way, so it carries a
|
|
@@ -261,10 +275,12 @@ export interface SuspensionHandlerResult {
|
|
|
261
275
|
*/
|
|
262
276
|
hasHookEvents: boolean;
|
|
263
277
|
/**
|
|
264
|
-
* Wall-clock ms spent
|
|
265
|
-
* (0 when it created none)
|
|
266
|
-
*
|
|
267
|
-
*
|
|
278
|
+
* Wall-clock ms this suspension spent blocked on nothing but committing its
|
|
279
|
+
* `hook_created` events (0 when it created none): the stretch the hook
|
|
280
|
+
* writes outlasted every other write, since until then the suspension was
|
|
281
|
+
* waiting on those too. The caller accumulates this across iterations and
|
|
282
|
+
* subtracts it from the TTFS latency measurement, so time spent durably
|
|
283
|
+
* creating the user's hooks doesn't count as runtime overhead.
|
|
268
284
|
*/
|
|
269
285
|
hookCreationMs: number;
|
|
270
286
|
/** Exact number of workflow-code executions observed during serialization. */
|
|
@@ -281,9 +297,15 @@ export interface SuspensionSerializationBlocker extends GuestCodeExecution {
|
|
|
281
297
|
* Creates events for all operations but does NOT queue step messages; returns the pending
|
|
282
298
|
* steps so the caller can decide which to execute inline vs queue to background.
|
|
283
299
|
*
|
|
284
|
-
*
|
|
285
|
-
*
|
|
286
|
-
*
|
|
300
|
+
* Every write is issued concurrently: hook creations and disposals (in code
|
|
301
|
+
* order per token, then abort deliveries), step and wait events (batched where
|
|
302
|
+
* the World supports it), and attribute events.
|
|
303
|
+
*
|
|
304
|
+
* Hooks are not written ahead of the steps created alongside them. A step
|
|
305
|
+
* started in the same suspension as a hook can therefore run before that hook
|
|
306
|
+
* is registered; a workflow that needs the hook registered first (say, a step
|
|
307
|
+
* that hands the token to something that resumes it at once) awaits
|
|
308
|
+
* `hook.getConflict()` before calling the step.
|
|
287
309
|
*/
|
|
288
|
-
export declare function handleSuspension({ suspension, world, run, span, requestId, eventLog, runReadyBarrier, replayRecoveryReporter, stepDispatch, ownerMessageId, allowDeferredBatchWork, }: SuspensionHandlerParams): Promise<SuspensionHandlerResult>;
|
|
310
|
+
export declare function handleSuspension({ suspension, world, run, span, requestId, eventLog, runReadyBarrier, replayRecoveryReporter, stepDispatch, ownerMessageId, allowDeferredBatchWork, forceClaimVictimWakes, }: SuspensionHandlerParams): Promise<SuspensionHandlerResult>;
|
|
289
311
|
//# sourceMappingURL=suspension-handler.d.ts.map
|