eve 0.47.7 → 0.49.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +35 -0
- package/dist/src/channel/channel-address.js +1 -1
- package/dist/src/channel/delivery-metadata.d.ts +1 -0
- package/dist/src/channel/delivery-metadata.js +1 -1
- package/dist/src/channel/types.d.ts +20 -8
- package/dist/src/chunks/{use-eve-agent-Dg5S44kG.js → use-eve-agent-BZnOzAVd.js} +25 -5
- package/dist/src/chunks/{use-eve-agent-B5zw1dwj.js → use-eve-agent-Bgp6INfi.js} +25 -5
- package/dist/src/cli/commands/init.js +1 -1
- package/dist/src/cli/commands/integration-connect.d.ts +2 -1
- package/dist/src/cli/commands/integration-connect.js +1 -1
- package/dist/src/cli/commands/register-integration-commands.d.ts +3 -1
- package/dist/src/cli/commands/register-integration-commands.js +1 -1
- package/dist/src/cli/commands/registry-metadata.d.ts +30 -0
- package/dist/src/cli/commands/registry-metadata.js +1 -1
- package/dist/src/cli/commands/registry-package.d.ts +6 -0
- package/dist/src/cli/commands/registry-package.js +1 -1
- package/dist/src/cli/commands/registry-pnpm-build-policy-flow.d.ts +30 -0
- package/dist/src/cli/commands/registry-pnpm-build-policy-flow.js +1 -0
- package/dist/src/cli/commands/registry-pnpm-build-policy.d.ts +12 -0
- package/dist/src/cli/commands/registry-pnpm-build-policy.js +6 -0
- package/dist/src/cli/commands/registry-recovery.d.ts +4 -0
- package/dist/src/cli/commands/registry-recovery.js +1 -1
- package/dist/src/cli/commands/registry.d.ts +1 -1
- package/dist/src/cli/commands/registry.js +1 -1
- package/dist/src/cli/dev/command-options.d.ts +2 -0
- package/dist/src/cli/dev/run-interactive-ui.js +1 -1
- package/dist/src/cli/dev/tui/blocks.js +1 -1
- package/dist/src/cli/dev/tui/prompt-command-handler.js +1 -1
- package/dist/src/cli/dev/tui/registry-result-message.d.ts +17 -0
- package/dist/src/cli/dev/tui/registry-result-message.js +3 -0
- package/dist/src/cli/dev/tui/runner.d.ts +11 -4
- package/dist/src/cli/dev/tui/runner.js +1 -1
- package/dist/src/cli/dev/tui/setup-commands.d.ts +9 -3
- package/dist/src/cli/dev/tui/setup-commands.js +2 -3
- package/dist/src/cli/dev/tui/setup-flow.d.ts +15 -5
- package/dist/src/cli/dev/tui/setup-panel.d.ts +6 -1
- package/dist/src/cli/dev/tui/setup-panel.js +4 -4
- package/dist/src/cli/dev/tui/setup-selection-input.d.ts +1 -0
- package/dist/src/cli/dev/tui/setup-selection-input.js +1 -1
- package/dist/src/cli/dev/tui/terminal-renderer.js +12 -12
- package/dist/src/cli/dev/tui/tui-prompter.js +1 -1
- package/dist/src/cli/dev/tui/tui.d.ts +3 -4
- package/dist/src/cli/dev/tui/tui.js +1 -1
- package/dist/src/cli/run.js +2 -2
- package/dist/src/client/agent-info-schema.d.ts +1 -0
- package/dist/src/client/agent-info-schema.js +1 -1
- package/dist/src/client/open-stream.d.ts +1 -0
- package/dist/src/client/open-stream.js +1 -1
- package/dist/src/client/session.js +1 -1
- package/dist/src/compiled/.vendor-stamp.json +7 -6
- package/dist/src/compiled/@opentelemetry/api/index.d.ts +6 -0
- package/dist/src/compiled/@workflow/builders/LICENSE.md +201 -0
- package/dist/src/compiled/@workflow/builders/index.d.ts +62 -0
- package/dist/src/compiled/@workflow/builders/index.js +1 -0
- package/dist/src/compiled/@workflow/core/attribute-changes.d.ts +2 -4
- package/dist/src/compiled/@workflow/core/capabilities.d.ts +10 -9
- package/dist/src/compiled/@workflow/core/capture-stack.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/class-serialization.d.ts +8 -8
- package/dist/src/compiled/@workflow/core/context-violation-error.d.ts +5 -5
- package/dist/src/compiled/@workflow/core/create-hook.d.ts +2 -2
- package/dist/src/compiled/@workflow/core/describe-error.d.ts +7 -7
- package/dist/src/compiled/@workflow/core/encryption.d.ts +5 -5
- package/dist/src/compiled/@workflow/core/events-consumer.d.ts +49 -14
- package/dist/src/compiled/@workflow/core/flushable-stream.d.ts +4 -4
- package/dist/src/compiled/@workflow/core/global.d.ts +4 -2
- package/dist/src/compiled/@workflow/core/index.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/index.js +2 -2
- package/dist/src/compiled/@workflow/core/log-format.d.ts +2 -2
- package/dist/src/compiled/@workflow/core/private.d.ts +40 -78
- package/dist/src/compiled/@workflow/core/private.js +1 -1
- package/dist/src/compiled/@workflow/core/replay-payload-cache.d.ts +13 -17
- package/dist/src/compiled/@workflow/core/runtime/compute-instance.d.ts +4 -3
- package/dist/src/compiled/@workflow/core/runtime/constants.d.ts +27 -27
- package/dist/src/compiled/@workflow/core/runtime/count-step-started-events.d.ts +7 -7
- package/dist/src/compiled/@workflow/core/runtime/deployment-guard.d.ts +7 -7
- package/dist/src/compiled/@workflow/core/runtime/get-port-lazy.d.ts +2 -2
- package/dist/src/compiled/@workflow/core/runtime/get-world-lazy.d.ts +2 -2
- package/dist/src/compiled/@workflow/core/runtime/helpers.d.ts +30 -49
- package/dist/src/compiled/@workflow/core/runtime/quickjs-entrypoint.d.ts +21 -10
- package/dist/src/compiled/@workflow/core/runtime/quickjs-runtime.d.ts +31 -15
- package/dist/src/compiled/@workflow/core/runtime/quickjs-serde.d.ts +10 -10
- package/dist/src/compiled/@workflow/core/runtime/replay-budget.d.ts +4 -4
- package/dist/src/compiled/@workflow/core/runtime/replay-recovery-reporter.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/runtime/resume-hook.d.ts +20 -12
- package/dist/src/compiled/@workflow/core/runtime/resume-latency.d.ts +37 -30
- package/dist/src/compiled/@workflow/core/runtime/run-id-time.d.ts +2 -2
- package/dist/src/compiled/@workflow/core/runtime/run.d.ts +22 -5
- package/dist/src/compiled/@workflow/core/runtime/runs.d.ts +4 -4
- package/dist/src/compiled/@workflow/core/runtime/start.d.ts +3 -3
- package/dist/src/compiled/@workflow/core/runtime/step-executor.d.ts +14 -14
- package/dist/src/compiled/@workflow/core/runtime/step-latency.d.ts +42 -25
- package/dist/src/compiled/@workflow/core/runtime/step-ownership.d.ts +6 -6
- package/dist/src/compiled/@workflow/core/runtime/step-single-flight.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/runtime/suspension-handler.d.ts +38 -24
- package/dist/src/compiled/@workflow/core/runtime/unserializable-step.d.ts +34 -0
- package/dist/src/compiled/@workflow/core/runtime/vm-mode.d.ts +2 -2
- package/dist/src/compiled/@workflow/core/runtime/wait-continuation.d.ts +31 -9
- package/dist/src/compiled/@workflow/core/runtime/wait-until.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/runtime/world-compatibility.d.ts +20 -9
- package/dist/src/compiled/@workflow/core/runtime/world-init.d.ts +5 -5
- package/dist/src/compiled/@workflow/core/runtime.js +3 -3
- package/dist/src/compiled/@workflow/core/sealed-box.d.ts +7 -7
- package/dist/src/compiled/@workflow/core/serialization/codec-devalue-vm.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/serialization/codec-devalue.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/serialization/codec.d.ts +4 -4
- package/dist/src/compiled/@workflow/core/serialization/compression.d.ts +12 -11
- package/dist/src/compiled/@workflow/core/serialization/encryption.d.ts +7 -7
- package/dist/src/compiled/@workflow/core/serialization/format.d.ts +6 -6
- package/dist/src/compiled/@workflow/core/serialization/hardened.d.ts +23 -22
- package/dist/src/compiled/@workflow/core/serialization/index.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/serialization/reducers/class-vm.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/serialization/reducers/step-function-vm.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/serialization/types.d.ts +5 -5
- package/dist/src/compiled/@workflow/core/serialization/workflow-vm.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/serialization-format.d.ts +11 -11
- package/dist/src/compiled/@workflow/core/serialization.d.ts +18 -19
- package/dist/src/compiled/@workflow/core/source-map.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/step/context-storage.d.ts +5 -5
- package/dist/src/compiled/@workflow/core/step/writable-stream.d.ts +3 -3
- package/dist/src/compiled/@workflow/core/symbols.d.ts +2 -2
- package/dist/src/compiled/@workflow/core/telemetry/semantic-conventions.d.ts +71 -20
- package/dist/src/compiled/@workflow/core/telemetry.d.ts +15 -3
- package/dist/src/compiled/@workflow/core/version.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/vm/script-cache.d.ts +9 -11
- package/dist/src/compiled/@workflow/core/workflow/abort-controller.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/workflow/set-attributes.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/workflow/world-init-stub.d.ts +1 -1
- package/dist/src/compiled/@workflow/core/workflow.js +1 -1
- package/dist/src/compiled/@workflow/errors/index.d.ts +18 -18
- package/dist/src/compiled/@workflow/errors/index.js +1 -1
- package/dist/src/compiled/@workflow/world/analytics.d.ts +3 -2
- package/dist/src/compiled/@workflow/world/attributes-validation.d.ts +28 -0
- package/dist/src/compiled/@workflow/world/attributes.d.ts +8 -107
- package/dist/src/compiled/@workflow/world/env-config.d.ts +5 -5
- package/dist/src/compiled/@workflow/world/event-metadata.d.ts +132 -0
- package/dist/src/compiled/@workflow/world/events.d.ts +42 -96
- package/dist/src/compiled/@workflow/world/hooks.d.ts +12 -11
- package/dist/src/compiled/@workflow/world/index.d.ts +3 -3
- package/dist/src/compiled/@workflow/world/interfaces.d.ts +94 -39
- package/dist/src/compiled/@workflow/world/queue.d.ts +29 -22
- package/dist/src/compiled/@workflow/world/runs.d.ts +20 -0
- package/dist/src/compiled/@workflow/world/slot-identity.d.ts +3 -3
- package/dist/src/compiled/@workflow/world/spec-version.d.ts +82 -15
- package/dist/src/compiled/@workflow/world/ulid.d.ts +2 -2
- package/dist/src/compiled/@workflow/world-local/index.js +5 -5
- package/dist/src/compiled/@workflow/world-vercel/index.js +12 -12
- package/dist/src/compiled/_chunks/workflow/{attribute-changes-DXbpwBdw.js → attribute-changes-BwAadFfB.js} +3 -3
- package/dist/src/compiled/_chunks/workflow/debug-log-CVPstO1D.js +1 -0
- package/dist/src/compiled/_chunks/workflow/dist-CgbVZs5l.js +40 -0
- package/dist/src/compiled/_chunks/workflow/dist-DjojkP5e.js +3 -0
- package/dist/src/compiled/_chunks/workflow/frames-CZ9eHShe.js +3 -0
- package/dist/src/compiled/_chunks/workflow/global-singleton-BNinwFrL.js +1 -0
- package/dist/src/compiled/_chunks/workflow/private-CZFMABEf.js +1 -0
- package/dist/src/compiled/_chunks/workflow/resume-hook-BToMtPbH.js +1 -0
- package/dist/src/compiled/_chunks/workflow/run-DzyAoGh4.js +1 -0
- package/dist/src/compiled/_chunks/workflow/sleep-3_A5uOp-.js +1 -0
- package/dist/src/compiled/_chunks/workflow/undici-DfxNX5og.js +95 -0
- package/dist/src/compiled/_chunks/workflow/wait-until-BtySPYD0.js +15 -0
- package/dist/src/compiled/_chunks/workflow/ws-transport-PnVVxT0R.js +1 -0
- package/dist/src/compiler/extension-compatibility.d.ts +2 -2
- package/dist/src/compiler/extension-compatibility.js +1 -1
- package/dist/src/compiler/manifest.d.ts +2 -2
- package/dist/src/compiler/manifest.js +1 -1
- package/dist/src/compiler/normalize-tool.js +1 -1
- package/dist/src/context/keys.d.ts +3 -8
- package/dist/src/eve-channel/index.js +1 -1
- package/dist/src/eve-channel/types.d.ts +7 -7
- package/dist/src/execution/accepted-delivery-deployment.d.ts +7 -0
- package/dist/src/execution/accepted-delivery-deployment.js +1 -0
- package/dist/src/execution/agent-handle-dispatch.js +1 -1
- package/dist/src/execution/cancel-descendant-turns-step.d.ts +4 -1
- package/dist/src/execution/cancel-descendant-turns-step.js +1 -1
- package/dist/src/execution/continuation-conflict-step.d.ts +10 -0
- package/dist/src/execution/continuation-conflict-step.js +1 -0
- package/dist/src/execution/delegated-parent-notification.js +1 -1
- package/dist/src/execution/delegation-tool.js +1 -1
- package/dist/src/execution/dispatch-runtime-actions-shared.d.ts +14 -31
- package/dist/src/execution/dispatch-runtime-actions-shared.js +1 -1
- package/dist/src/execution/dispatch-runtime-actions-start.d.ts +33 -0
- package/dist/src/execution/dispatch-runtime-actions-start.js +1 -0
- package/dist/src/execution/dispatch-runtime-actions-step.js +1 -1
- package/dist/src/execution/dispatch-turn-step.js +1 -1
- package/dist/src/execution/durable-session-migrations/turn-workflow-v1-to-v2.d.ts +2 -0
- package/dist/src/execution/durable-session-migrations/turn-workflow-v1-to-v2.js +1 -0
- package/dist/src/execution/durable-session-migrations/turn-workflow.d.ts +25 -3
- package/dist/src/execution/durable-session-migrations/turn-workflow.js +1 -1
- package/dist/src/execution/dynamic-connections.js +1 -1
- package/dist/src/execution/eve-workflow-attributes.js +1 -1
- package/dist/src/execution/finalize-terminal-session.d.ts +17 -0
- package/dist/src/execution/finalize-terminal-session.js +1 -0
- package/dist/src/execution/inline-turn.d.ts +29 -0
- package/dist/src/execution/inline-turn.js +1 -0
- package/dist/src/execution/next-driver-action.d.ts +9 -4
- package/dist/src/execution/node-step.js +1 -1
- package/dist/src/execution/parked-delivery-wait.js +1 -1
- package/dist/src/execution/pending-turn-state.d.ts +1 -0
- package/dist/src/execution/pending-turn-state.js +1 -1
- package/dist/src/execution/proxied-deliver-step.js +1 -1
- package/dist/src/execution/remote-agent-dispatch.d.ts +2 -0
- package/dist/src/execution/remote-agent-dispatch.js +1 -1
- package/dist/src/execution/runtime-errors.d.ts +0 -12
- package/dist/src/execution/runtime-errors.js +1 -1
- package/dist/src/execution/session-command-token.d.ts +2 -0
- package/dist/src/execution/session-command-token.js +1 -1
- package/dist/src/execution/session-timeout-steps.js +1 -1
- package/dist/src/execution/settle-cancelled-turn-step.js +1 -1
- package/dist/src/execution/stable-workflow-names.d.ts +12 -0
- package/dist/src/execution/stable-workflow-names.js +1 -0
- package/dist/src/execution/subagent-event-proxy-step.d.ts +3 -0
- package/dist/src/execution/subagent-event-proxy-step.js +1 -1
- package/dist/src/execution/subagent-hitl-proxy.d.ts +2 -1
- package/dist/src/execution/subagent-hitl-proxy.js +1 -1
- package/dist/src/execution/subagent-start-local.js +1 -1
- package/dist/src/execution/subagent-start-remote.d.ts +2 -0
- package/dist/src/execution/subagent-start-remote.js +1 -1
- package/dist/src/execution/tasks/child/steps.d.ts +2 -0
- package/dist/src/execution/tasks/child/steps.js +1 -1
- package/dist/src/execution/tasks/child/workflow.js +1 -1
- package/dist/src/execution/tasks/parent/dispatch-task-step.js +1 -1
- package/dist/src/execution/tasks/parent/dispatch.js +1 -1
- package/dist/src/execution/tasks/parent/hitl-proxy-steps.js +1 -1
- package/dist/src/execution/tasks/parent/run-parent.js +1 -1
- package/dist/src/execution/tasks/parent/tool-execution.js +1 -1
- package/dist/src/execution/terminal-session-completion-step.js +1 -1
- package/dist/src/execution/terminal-session-event.d.ts +13 -0
- package/dist/src/execution/terminal-session-event.js +1 -0
- package/dist/src/execution/terminal-session-failure-step.d.ts +1 -0
- package/dist/src/execution/terminal-session-failure-step.js +1 -1
- package/dist/src/execution/tool-run/answer.d.ts +3 -0
- package/dist/src/execution/tool-run/answer.js +1 -0
- package/dist/src/execution/tool-run/background.d.ts +14 -0
- package/dist/src/execution/tool-run/background.js +1 -0
- package/dist/src/execution/tool-run/cancel.d.ts +7 -0
- package/dist/src/execution/tool-run/cancel.js +1 -0
- package/dist/src/execution/tool-run/dispatch.d.ts +24 -0
- package/dist/src/execution/tool-run/dispatch.js +1 -0
- package/dist/src/execution/tool-run/emit-run-report-step.d.ts +7 -0
- package/dist/src/execution/tool-run/emit-run-report-step.js +1 -0
- package/dist/src/execution/tool-run/messages.d.ts +70 -0
- package/dist/src/execution/tool-run/messages.js +1 -0
- package/dist/src/execution/tool-run/owner-channels.d.ts +29 -0
- package/dist/src/execution/tool-run/owner-channels.js +1 -0
- package/dist/src/execution/tool-run/owner-inbox.d.ts +11 -0
- package/dist/src/execution/tool-run/owner-inbox.js +1 -0
- package/dist/src/execution/tool-run/owner.d.ts +13 -0
- package/dist/src/execution/tool-run/owner.js +1 -0
- package/dist/src/execution/tool-run/resume-hook-step.d.ts +4 -0
- package/dist/src/execution/tool-run/resume-hook-step.js +1 -0
- package/dist/src/execution/tool-run/run-control.d.ts +18 -0
- package/dist/src/execution/tool-run/run-control.js +1 -0
- package/dist/src/execution/tool-run/start.d.ts +11 -0
- package/dist/src/execution/tool-run/start.js +1 -0
- package/dist/src/execution/tool-run/types.d.ts +21 -0
- package/dist/src/execution/tool-run/types.js +1 -0
- package/dist/src/execution/tool-run/workflow.d.ts +9 -0
- package/dist/src/execution/tool-run/workflow.js +1 -0
- package/dist/src/execution/tools/subagent/local.js +1 -1
- package/dist/src/execution/turn-cancellation-control.d.ts +2 -0
- package/dist/src/execution/turn-cancellation-control.js +1 -1
- package/dist/src/execution/turn-control-receiver.js +1 -1
- package/dist/src/execution/turn-dispatch.d.ts +4 -2
- package/dist/src/execution/turn-dispatch.js +1 -1
- package/dist/src/execution/turn-execution-cursor.js +1 -1
- package/dist/src/execution/turn-workflow.js +1 -1
- package/dist/src/execution/wire/session-inbox-contract.d.ts +2 -2
- package/dist/src/execution/wire/session-inbox-contract.js +1 -1
- package/dist/src/execution/wire/session-inbox-encoder.d.ts +6 -2
- package/dist/src/execution/wire/session-inbox-encoder.js +1 -1
- package/dist/src/execution/wire/session-inbox-resume.js +1 -1
- package/dist/src/execution/wire/session-inbox-wire.js +1 -1
- package/dist/src/execution/wire/session-inbox-wire.v1.js +1 -1
- package/dist/src/execution/wire/session-inbox-wire.v2-migration.d.ts +0 -2
- package/dist/src/execution/wire/session-inbox-wire.v2-migration.js +1 -1
- package/dist/src/execution/wire/session-inbox-wire.v2.migration.d.ts +3 -0
- package/dist/src/execution/wire/session-inbox-wire.v2.migration.js +1 -0
- package/dist/src/execution/wire/session-inbox-wire.v3.d.ts +480 -0
- package/dist/src/execution/wire/session-inbox-wire.v3.js +1 -0
- package/dist/src/execution/wire/session-inbox-wire.v3.migration.d.ts +3 -0
- package/dist/src/execution/wire/session-inbox-wire.v3.migration.js +1 -0
- package/dist/src/execution/workflow-entry-finalization.js +1 -1
- package/dist/src/execution/workflow-entry.d.ts +5 -1
- package/dist/src/execution/workflow-entry.js +1 -1
- package/dist/src/execution/workflow-registry.d.ts +5 -0
- package/dist/src/execution/workflow-registry.js +1 -0
- package/dist/src/execution/workflow-runtime.d.ts +17 -19
- package/dist/src/execution/workflow-runtime.js +1 -1
- package/dist/src/execution/workflow-steps.js +1 -1
- package/dist/src/execution/workflow-webhook-route.d.ts +4 -0
- package/dist/src/execution/workflow-webhook-route.js +1 -0
- package/dist/src/harness/attachment-staging.js +1 -1
- package/dist/src/harness/emission.js +1 -1
- package/dist/src/harness/proxy-input-requests.d.ts +10 -0
- package/dist/src/harness/proxy-input-requests.js +1 -1
- package/dist/src/harness/runtime-actions.d.ts +2 -0
- package/dist/src/harness/runtime-actions.js +1 -1
- package/dist/src/harness/session-limit-enforcement.js +1 -1
- package/dist/src/harness/tool-loop.js +2 -2
- package/dist/src/harness/tool-runs.d.ts +21 -0
- package/dist/src/harness/tool-runs.js +1 -0
- package/dist/src/harness/tools.js +1 -1
- package/dist/src/instrumentation/content-policy.d.ts +3 -1
- package/dist/src/instrumentation/content-policy.js +1 -1
- package/dist/src/instrumentation/runtime.d.ts +2 -2
- package/dist/src/instrumentation/runtime.js +1 -1
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/internal/attachments/errors.d.ts +3 -0
- package/dist/src/internal/authored-module-loader.d.ts +7 -1
- package/dist/src/internal/authored-module-loader.js +3 -3
- package/dist/src/internal/authored-package-boundary.js +1 -1
- package/dist/src/internal/authored-runtime-modules.d.ts +2 -0
- package/dist/src/internal/authored-runtime-modules.js +1 -1
- package/dist/src/internal/nitro/development-generation.d.ts +2 -0
- package/dist/src/internal/nitro/development-generation.js +1 -1
- package/dist/src/internal/nitro/host/create-application-nitro.js +1 -1
- package/dist/src/internal/nitro/host/dev-host-fingerprint.js +1 -1
- package/dist/src/internal/nitro/routes/agent-info/build-agent-info-response.js +1 -1
- package/dist/src/internal/nitro/routes/channel-dispatch.js +1 -1
- package/dist/src/internal/workflow/development-world-client.js +1 -1
- package/dist/src/internal/workflow-bundle/authored-workflow-directives.d.ts +17 -0
- package/dist/src/internal/workflow-bundle/authored-workflow-directives.js +1 -0
- package/dist/src/internal/workflow-bundle/authored-workflow-modules.d.ts +19 -0
- package/dist/src/internal/workflow-bundle/authored-workflow-modules.js +1 -0
- package/dist/src/internal/workflow-bundle/builder-support.d.ts +17 -2
- package/dist/src/internal/workflow-bundle/builder-support.js +4 -3
- package/dist/src/internal/workflow-bundle/builder.d.ts +2 -2
- package/dist/src/internal/workflow-bundle/builder.js +2 -2
- package/dist/src/internal/workflow-bundle/dynamic-capability-transform-plugin.d.ts +2 -0
- package/dist/src/internal/workflow-bundle/dynamic-capability-transform-plugin.js +1 -1
- package/dist/src/internal/workflow-bundle/dynamic-tool-ast-references.d.ts +3 -0
- package/dist/src/internal/workflow-bundle/dynamic-tool-transform.d.ts +1 -1
- package/dist/src/internal/workflow-bundle/dynamic-tool-transform.js +1 -1
- package/dist/src/internal/workflow-bundle/workflow-builders.d.ts +6 -2
- package/dist/src/internal/workflow-bundle/workflow-builders.js +1 -1
- package/dist/src/internal/workflow-bundle/workflow-core-shim.d.ts +3 -0
- package/dist/src/internal/workflow-bundle/workflow-core-shim.js +1 -1
- package/dist/src/internal/workflow-bundle/workflow-directive-ast.d.ts +7 -0
- package/dist/src/internal/workflow-bundle/workflow-directive-ast.js +1 -0
- package/dist/src/internal/workflow-bundle/workflow-transformer.d.ts +15 -1
- package/dist/src/internal/workflow-bundle/workflow-transformer.js +4 -4
- package/dist/src/packages/eve-catalog/src/index.js +1 -1
- package/dist/src/protocol/baggage.d.ts +6 -0
- package/dist/src/protocol/baggage.js +1 -0
- package/dist/src/public/channels/slack/attachments.js +1 -1
- package/dist/src/public/channels/slack/slackChannel.d.ts +7 -1
- package/dist/src/public/channels/slack/slackChannel.js +1 -1
- package/dist/src/public/channels/teams/attachments.d.ts +2 -2
- package/dist/src/public/channels/teams/attachments.js +1 -1
- package/dist/src/public/channels/teams/teamsChannel.js +1 -1
- package/dist/src/public/channels/telegram/attachments.js +1 -1
- package/dist/src/public/definitions/remote-agent.d.ts +6 -3
- package/dist/src/public/workflow/index.d.ts +3 -0
- package/dist/src/public/workflow/index.js +1 -0
- package/dist/src/public/workflow-modules.d.js +1 -0
- package/dist/src/public/workflow-modules.d.ts +11 -0
- package/dist/src/runtime/actions/keys.js +1 -1
- package/dist/src/runtime/tools/registry.js +1 -1
- package/dist/src/setup/connection-connector.d.ts +4 -2
- package/dist/src/setup/connection-connector.js +2 -2
- package/dist/src/setup/flows/login.js +1 -1
- package/dist/src/setup/flows/model.js +1 -1
- package/dist/src/setup/flows/provider.d.ts +5 -0
- package/dist/src/setup/flows/provider.js +4 -4
- package/dist/src/setup/flows/registry-session.d.ts +24 -7
- package/dist/src/setup/flows/registry-session.js +1 -1
- package/dist/src/setup/flows/registry.d.ts +35 -29
- package/dist/src/setup/flows/registry.js +2 -1
- package/dist/src/setup/integrations/web/setup.d.ts +0 -2
- package/dist/src/setup/integrations/web/setup.js +1 -1
- package/dist/src/setup/prompter.d.ts +24 -4
- package/dist/src/setup/prompter.js +1 -1
- package/dist/src/setup/scaffold/connections/catalog.js +1 -1
- package/dist/src/setup/scaffold/create/project.js +2 -2
- package/dist/src/setup/vercel-project.js +0 -0
- package/dist/src/shared/dispatch-action.d.ts +6 -0
- package/dist/src/shared/forwarded-trace-policy.d.ts +28 -0
- package/dist/src/shared/forwarded-trace-policy.js +1 -0
- package/dist/src/shared/instrumentation-decision.d.ts +3 -0
- package/dist/src/shared/instrumentation-decision.js +1 -1
- package/dist/src/svelte/index.js +1 -1
- package/dist/src/svelte/use-eve-agent.js +1 -1
- package/dist/src/tools/behavior.d.ts +6 -0
- package/dist/src/tools/definition.d.ts +39 -3
- package/dist/src/tracing/agent-otel-provider.js +2 -2
- package/dist/src/tracing/agent-otel-session-context.js +1 -1
- package/dist/src/tracing/agent-trace-context-store.d.ts +1 -1
- package/dist/src/tracing/agent-trace-context-store.js +1 -1
- package/dist/src/tracing/otel-declaration.d.ts +5 -3
- package/dist/src/tracing/otel-registration.d.ts +1 -1
- package/dist/src/tracing/otel-registration.js +1 -1
- package/dist/src/vue/index.js +1 -1
- package/dist/src/vue/use-eve-agent.js +1 -1
- package/docs/channels/custom.mdx +6 -0
- package/docs/channels/eve.mdx +14 -6
- package/docs/channels/mcp.mdx +4 -1
- package/docs/channels/teams.mdx +6 -1
- package/docs/concepts/sessions-runs-and-streaming.md +4 -2
- package/docs/guides/auth-and-route-protection.md +5 -1
- package/docs/guides/client/messages.mdx +6 -0
- package/docs/guides/dev-tui.md +30 -18
- package/docs/guides/instrumentation.md +1 -1
- package/docs/guides/remote-agents.md +25 -0
- package/docs/install-integrations.mdx +2 -0
- package/docs/instructions.mdx +1 -1
- package/docs/memory/custom-provider.md +214 -0
- package/docs/memory/file.md +129 -0
- package/docs/memory/meta.json +5 -0
- package/docs/memory/overview.mdx +282 -0
- package/docs/patterns/multi-tenant-memory.md +12 -20
- package/docs/reference/cli.md +2 -2
- package/docs/tools/meta.json +1 -1
- package/docs/tools/overview.mdx +7 -0
- package/docs/tools/workflows.mdx +288 -0
- package/package.json +18 -7
- package/dist/src/compiled/_chunks/workflow/dist-CqvWKNQv.js +0 -3
- package/dist/src/compiled/_chunks/workflow/dist-Dk0aQqFO.js +0 -40
- package/dist/src/compiled/_chunks/workflow/dist-DpYyXbJv.js +0 -1
- package/dist/src/compiled/_chunks/workflow/env-config-L94XftKz.js +0 -1
- package/dist/src/compiled/_chunks/workflow/frames-Dl2Hcma4.js +0 -3
- package/dist/src/compiled/_chunks/workflow/private-CuQ4HTFC.js +0 -1
- package/dist/src/compiled/_chunks/workflow/resume-hook-E-Nkx8q_.js +0 -1
- package/dist/src/compiled/_chunks/workflow/run-cIeex2KF.js +0 -1
- package/dist/src/compiled/_chunks/workflow/sleep-CxFsdxB_.js +0 -1
- package/dist/src/compiled/_chunks/workflow/spec-version-DBUVfF_R.js +0 -1
- package/dist/src/compiled/_chunks/workflow/undici-DznrXKcM.js +0 -95
- package/dist/src/compiled/_chunks/workflow/wait-until-BZHmJCAW.js +0 -15
- package/dist/src/compiled/_chunks/workflow/ws-transport-Ct6yyRWZ.js +0 -1
- package/dist/src/internal/authored-directive-prologue.d.ts +0 -4
- package/dist/src/internal/authored-directive-prologue.js +0 -1
- package/docs/memory.md +0 -408
|
@@ -6,7 +6,7 @@ export declare function getMaxQueueDeliveries(): number;
|
|
|
6
6
|
/**
|
|
7
7
|
* Default maximum time allowed for the *replay* portion of a single workflow
|
|
8
8
|
* handler invocation (in ms). This budget only covers deterministic-replay
|
|
9
|
-
* and workflow-VM execution between step boundaries
|
|
9
|
+
* and workflow-VM execution between step boundaries. Inline step bodies
|
|
10
10
|
* (`"use step"` functions invoked via `executeStep`) do NOT count against
|
|
11
11
|
* it. Step bodies are bounded separately by the platform's function
|
|
12
12
|
* `maxDuration` (e.g. 800s on Vercel Pro Fluid) and `NO_INLINE_REPLAY_AFTER_MS`.
|
|
@@ -17,7 +17,7 @@ export declare function getMaxQueueDeliveries(): number;
|
|
|
17
17
|
* `RUN_ERROR_CODES.REPLAY_TIMEOUT`.
|
|
18
18
|
*
|
|
19
19
|
* Note that on Vercel Hobby (standard functions), the platform `maxDuration`
|
|
20
|
-
* is 60s
|
|
20
|
+
* is 60s, well below this budget, so the platform SIGTERM will fire first
|
|
21
21
|
* and the queue will re-deliver until the visibility window expires. With
|
|
22
22
|
* Fluid Compute on Hobby the per-function ceiling rises to 300s, still
|
|
23
23
|
* under the default budget.
|
|
@@ -39,13 +39,13 @@ export declare const MAX_REPLAY_TIMEOUT_MS = 780000;
|
|
|
39
39
|
*
|
|
40
40
|
* Reads `process.env.WORKFLOW_REPLAY_TIMEOUT_MS` lazily so tests and
|
|
41
41
|
* deployments can override per invocation. Invalid / out-of-range values
|
|
42
|
-
* fall back to a safe value (no throw
|
|
42
|
+
* fall back to a safe value (no throw: the env var is an escape hatch,
|
|
43
43
|
* not a hard requirement) and emit a one-time warning so misconfiguration
|
|
44
44
|
* is observable.
|
|
45
45
|
*/
|
|
46
46
|
export declare function getReplayTimeoutMs(): number;
|
|
47
47
|
/**
|
|
48
|
-
* Reset the warn-once cache. Test-only
|
|
48
|
+
* Reset the warn-once cache. Test-only: exported so unit tests can
|
|
49
49
|
* exercise the warn path repeatedly without sharing state.
|
|
50
50
|
*
|
|
51
51
|
* @internal
|
|
@@ -60,8 +60,8 @@ export declare function getReplayTimeoutMaxRetries(): number;
|
|
|
60
60
|
/**
|
|
61
61
|
* Default maximum number of steps the owned-inline path runs inline (in
|
|
62
62
|
* parallel) per suspension. The rest are queued to background handlers. Each
|
|
63
|
-
* inline step is created lazily
|
|
64
|
-
* `step_started` that `executeStep` sends
|
|
63
|
+
* inline step is created lazily (its `step_created` is folded into the
|
|
64
|
+
* `step_started` that `executeStep` sends), so inlining N steps saves N queue
|
|
65
65
|
* round-trips for a `Promise.all`-style fan-out. `1` reproduces the
|
|
66
66
|
* single-inline-step behavior exactly (useful kill-switch).
|
|
67
67
|
*
|
|
@@ -81,7 +81,7 @@ export declare const MAX_MAX_INLINE_STEPS = 16;
|
|
|
81
81
|
*
|
|
82
82
|
* Reads `process.env.WORKFLOW_MAX_INLINE_STEPS` lazily so tests and
|
|
83
83
|
* deployments can override per invocation. Invalid / out-of-range values fall
|
|
84
|
-
* back to a safe value (no throw
|
|
84
|
+
* back to a safe value (no throw: the env var is an escape hatch) and emit a
|
|
85
85
|
* one-time warning so misconfiguration is observable.
|
|
86
86
|
*/
|
|
87
87
|
export declare function getMaxInlineSteps(): number;
|
|
@@ -97,8 +97,7 @@ export declare function getMaxInlineSteps(): number;
|
|
|
97
97
|
* messages on its fast inline path instead of paying an S3 store+fetch
|
|
98
98
|
* double-hop for bytes that already live in the event log. Above this size
|
|
99
99
|
* the dispatch falls back to the sequential path (`step_created` write, then
|
|
100
|
-
* a payload-less queue message).
|
|
101
|
-
* on the resilient hook resume path.
|
|
100
|
+
* a payload-less queue message).
|
|
102
101
|
*/
|
|
103
102
|
export declare const MAX_RESILIENT_STEP_INPUT_BYTES: number;
|
|
104
103
|
/**
|
|
@@ -107,12 +106,13 @@ export declare const MAX_RESILIENT_STEP_INPUT_BYTES: number;
|
|
|
107
106
|
* step-execution queue publish, carrying the serialized step input in the
|
|
108
107
|
* queue message (`stepInput`) so the consumer can idempotently re-ensure the
|
|
109
108
|
* event if the direct write failed transiently. Mirrors the resilient start
|
|
110
|
-
* (`runInput`) and
|
|
109
|
+
* (`runInput`) pattern (and the legacy lazy hook resume's `hookInput`, which
|
|
110
|
+
* current producers no longer send).
|
|
111
111
|
*
|
|
112
112
|
* **Off by default.** Enable via `WORKFLOW_RESILIENT_STEP_DISPATCH=1`.
|
|
113
113
|
*
|
|
114
114
|
* The queue publish races the create's verdict, and a create can come back
|
|
115
|
-
* refused
|
|
115
|
+
* refused: as a duplicate this replay should stop pursuing, or as a stale
|
|
116
116
|
* write on a World that refuses rather than reports. Either way the message
|
|
117
117
|
* carrying the payload is already out, so the consumer can materialize a step
|
|
118
118
|
* whose create was refused, and nothing orders the verdict before the
|
|
@@ -127,11 +127,11 @@ export declare function isResilientStepDispatchEnabled(): boolean;
|
|
|
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
129
|
* (specVersion >= 6) AND the suspension carries no attribute/hook writes and
|
|
130
|
-
* no resilient step dispatch
|
|
130
|
+
* no resilient step dispatch. Everything else keeps the single-event path
|
|
131
131
|
* byte-for-byte.
|
|
132
132
|
*
|
|
133
133
|
* Reads `process.env.WORKFLOW_BATCH_TRANSITIONS` lazily. Default **ON**;
|
|
134
|
-
* disabled only by an explicit `'0'` / `'false'` (case-insensitive)
|
|
134
|
+
* disabled only by an explicit `'0'` / `'false'` (case-insensitive), the
|
|
135
135
|
* operator escape hatch that restores the exact prior one-write-per-event
|
|
136
136
|
* path, mirroring `WORKFLOW_TURBO`'s kill-switch shape.
|
|
137
137
|
*/
|
|
@@ -141,10 +141,10 @@ export declare function isBatchTransitionsEnabled(): boolean;
|
|
|
141
141
|
* Mirrors the server's transaction budgets with a comfortable margin: each
|
|
142
142
|
* fan-out event costs 2 transaction items server-side (entity + event row)
|
|
143
143
|
* against the 100-item DynamoDB cap, and inline payloads count against a
|
|
144
|
-
* 768 KB byte budget
|
|
145
|
-
* than this
|
|
144
|
+
* 768 KB byte budget, so 32 events stays well under both, and a fan-out larger
|
|
145
|
+
* than this commits in successive batches (split batches lose
|
|
146
146
|
* cross-batch atomicity, which is exactly today's per-event-write crash
|
|
147
|
-
* surface
|
|
147
|
+
* surface, and every batch still converges on retry via per-event 409s).
|
|
148
148
|
*/
|
|
149
149
|
export declare const MAX_BATCH_FANOUT_EVENTS = 32;
|
|
150
150
|
/**
|
|
@@ -155,7 +155,7 @@ export declare const MAX_BATCH_FANOUT_EVENTS = 32;
|
|
|
155
155
|
*
|
|
156
156
|
* Reads `process.env.WORKFLOW_MAX_EVENTS_OVERRIDE` lazily so tests and
|
|
157
157
|
* deployments can override per invocation. Invalid values fall back to unset
|
|
158
|
-
* (no throw
|
|
158
|
+
* (no throw: the env var is an escape hatch) and emit a one-time warning.
|
|
159
159
|
*/
|
|
160
160
|
export declare function getMaxEventsOverride(): number | undefined;
|
|
161
161
|
/**
|
|
@@ -165,7 +165,7 @@ export declare function getMaxEventsOverride(): number | undefined;
|
|
|
165
165
|
* `step_started` only before the terminal write.
|
|
166
166
|
*
|
|
167
167
|
* This can run a step body more than once when handlers race for the same
|
|
168
|
-
* step's create-claim
|
|
168
|
+
* step's create-claim: both run the body before one wins. That is unsafe for
|
|
169
169
|
* steps with non-idempotent side effects; in particular, two concurrent runs
|
|
170
170
|
* of a step that writes to the workflow stream (e.g. an AI agent streaming
|
|
171
171
|
* tokens) can interleave and corrupt the stream data. So the optimization is
|
|
@@ -190,7 +190,7 @@ export declare function isOptimisticInlineStartExplicitlyDisabled(): boolean;
|
|
|
190
190
|
* the first invocation* of a run (detected by the entrypoint via `runInput`
|
|
191
191
|
* presence + `metadata.attempt === 1`): it backgrounds the `run_started` event
|
|
192
192
|
* creation, skips the initial event-log load (nothing has been written yet),
|
|
193
|
-
* and forces optimistic inline step start for that invocation
|
|
193
|
+
* and forces optimistic inline step start for that invocation, independent of
|
|
194
194
|
* `WORKFLOW_OPTIMISTIC_INLINE_START`.
|
|
195
195
|
*
|
|
196
196
|
* Forcing optimistic start is safe here because the first delivery has no
|
|
@@ -208,7 +208,7 @@ export declare function isTurboEnabled(): boolean;
|
|
|
208
208
|
* enabled (default ON). When on, the engine hydrates a VM with the
|
|
209
209
|
* workflow bundle once per function instance, snapshots it, and starts
|
|
210
210
|
* every invocation by restoring the snapshot instead of re-evaluating
|
|
211
|
-
* the bundle
|
|
211
|
+
* the bundle, skipping the dominant share of VM startup (measured
|
|
212
212
|
* ~77ms → ~3ms to first suspension for a 1.3MB bundle). Bundles whose
|
|
213
213
|
* module scope consumes randomness, reads the clock, or replaces a
|
|
214
214
|
* serialization intrinsic are detected at hydrate time and
|
|
@@ -233,12 +233,12 @@ export declare function isVmRetentionEnabled(): boolean;
|
|
|
233
233
|
* Whether inline step ownership is enabled (default ON). When on, the lazy
|
|
234
234
|
* `step_started` that creates an inline step records the owning queue
|
|
235
235
|
* message ID, and wake replays that observe an actively-owned step enqueue a
|
|
236
|
-
* *delayed backstop* message instead of immediately requeueing it
|
|
236
|
+
* *delayed backstop* message instead of immediately requeueing it, fixing
|
|
237
237
|
* duplicate inline step execution when a hook/wait wakes a run mid-step
|
|
238
238
|
* (vercel/workflow#2780).
|
|
239
239
|
*
|
|
240
240
|
* `WORKFLOW_INLINE_OWNERSHIP=0` (or `false`) is the kill switch: dispatch
|
|
241
|
-
* reverts to the unconditional immediate requeue. Stamping is unaffected
|
|
241
|
+
* reverts to the unconditional immediate requeue. Stamping is unaffected:
|
|
242
242
|
* the recorded ownerMessageId is inert data when the switch is off.
|
|
243
243
|
*/
|
|
244
244
|
export declare function isInlineOwnershipEnabled(): boolean;
|
|
@@ -250,16 +250,16 @@ export declare function isInlineOwnershipEnabled(): boolean;
|
|
|
250
250
|
* immediately; past it, they enqueue immediately (today's behavior).
|
|
251
251
|
*
|
|
252
252
|
* Why a fixed 860 and not a value derived from the function's `maxDuration`:
|
|
253
|
-
* neither runtime nor build time can see the resolved value
|
|
253
|
+
* neither runtime nor build time can see the resolved value: builders emit
|
|
254
254
|
* `maxDuration: 'max'`, which the platform resolves per-plan at deploy, and
|
|
255
255
|
* no env var or request-context deadline API exposes the result. The bound
|
|
256
256
|
* comes from a platform rule instead: durations above 800s require explicit
|
|
257
257
|
* per-function numeric config, so a builder-emitted `'max'` resolves to at
|
|
258
|
-
* most 800s
|
|
258
|
+
* most 800s, and 860s therefore dominates any workflow route's invocation
|
|
259
259
|
* lifetime plus scheduling slack. Revisit when that ceiling moves (the
|
|
260
260
|
* 30-minute duration beta becoming reachable via `'max'` would invalidate
|
|
261
261
|
* the bound). Worlds without an invocation kill bound (world-local,
|
|
262
|
-
* self-hosted) get no death proof from any constant
|
|
262
|
+
* self-hosted) get no death proof from any constant. There the in-process
|
|
263
263
|
* single-flight layer (step-single-flight.ts) is what makes a backstop
|
|
264
264
|
* firing mid-step harmless.
|
|
265
265
|
*
|
|
@@ -272,13 +272,13 @@ export declare function isInlineOwnershipEnabled(): boolean;
|
|
|
272
272
|
export declare const INLINE_OWNERSHIP_LEASE_SECONDS = 860;
|
|
273
273
|
/**
|
|
274
274
|
* Upper bound for the lease env override. 900s is the queue's maximum
|
|
275
|
-
* per-message delay (SQS cap)
|
|
275
|
+
* per-message delay (SQS cap). A longer lease would need delay chaining
|
|
276
276
|
* like long waits use; clamp instead so one delayed message always suffices.
|
|
277
277
|
*/
|
|
278
278
|
export declare const MAX_INLINE_OWNERSHIP_LEASE_SECONDS = 900;
|
|
279
279
|
/**
|
|
280
280
|
* Effective inline-ownership lease. Override via
|
|
281
|
-
* `WORKFLOW_INLINE_OWNERSHIP_LEASE_SECONDS
|
|
281
|
+
* `WORKFLOW_INLINE_OWNERSHIP_LEASE_SECONDS`, e.g. raise it on self-hosted
|
|
282
282
|
* multi-instance worlds with long-running steps to widen the window in which
|
|
283
283
|
* a live owner is protected from a concurrent backstop execution.
|
|
284
284
|
*/
|
|
@@ -2,16 +2,16 @@ import type { Event } from '#compiled/@workflow/world/index.js';
|
|
|
2
2
|
/**
|
|
3
3
|
* Scope for {@link countStepStartedEvents}:
|
|
4
4
|
* - `{ type: 'ownedBy', messageId }` counts only starts whose
|
|
5
|
-
* `eventData.ownerMessageId` matches
|
|
5
|
+
* `eventData.ownerMessageId` matches, i.e. attempts performed by that
|
|
6
6
|
* owning queue message (inline lazy starts and owned-recovery re-stamps).
|
|
7
7
|
* - `{ type: 'totalAttempts' }` estimates the step's genuine attempt total
|
|
8
|
-
* across its whole lifecycle: unstamped (bare) starts
|
|
9
|
-
* queue-dispatched background deliveries write
|
|
8
|
+
* across its whole lifecycle: unstamped (bare) starts, which only real
|
|
9
|
+
* queue-dispatched background deliveries write, plus the starts of the
|
|
10
10
|
* single most-started owner. A genuine lifecycle has at most one inline
|
|
11
11
|
* owner phase (ownership is claimed atomically at step creation and
|
|
12
12
|
* lapses permanently at `step_retrying` or on any bare start), so taking
|
|
13
13
|
* the max over owners counts that phase's real attempts while invocations
|
|
14
|
-
* racing on the same batch
|
|
14
|
+
* racing on the same batch, which stamp their own one-off message IDs,
|
|
15
15
|
* contribute at most their single largest count instead of accumulating.
|
|
16
16
|
*/
|
|
17
17
|
export type StepStartScope = {
|
|
@@ -29,7 +29,7 @@ export type StepStartScope = {
|
|
|
29
29
|
* Concurrent invocations racing on the same pending batch (stale replays,
|
|
30
30
|
* wake replays, a step message dispatched by a replay that lost the
|
|
31
31
|
* create-claim race, ...) can each write a `step_started` for the same
|
|
32
|
-
* logical attempt
|
|
32
|
+
* logical attempt. Worlds without an atomic start guard (world-local) let
|
|
33
33
|
* all of them through. Counting those duplicates as "attempts" made the
|
|
34
34
|
* maxRetries ceiling fire on healthy runs and fail them with a false
|
|
35
35
|
* "exceeded max retries" (see workflow#3069).
|
|
@@ -37,11 +37,11 @@ export type StepStartScope = {
|
|
|
37
37
|
* Callers therefore scope the count to the starts their ceiling is actually
|
|
38
38
|
* about via `scope`:
|
|
39
39
|
* - the inline owned-recovery ceiling counts only THIS message's starts
|
|
40
|
-
* (`ownedBy`)
|
|
40
|
+
* (`ownedBy`): each real (re)delivery of the owning message stamps its
|
|
41
41
|
* `ownerMessageId` on the start it writes, while racing invocations stamp
|
|
42
42
|
* their own IDs (or none), so they no longer inflate the count;
|
|
43
43
|
* - the background-step ceiling counts the lifecycle attempt total
|
|
44
|
-
* (`totalAttempts`: bare starts plus the largest single owner's starts)
|
|
44
|
+
* (`totalAttempts`: bare starts plus the largest single owner's starts),
|
|
45
45
|
* so a step that exhausted part of its budget under inline ownership
|
|
46
46
|
* before transitioning to queued/bare retries still trips the combined
|
|
47
47
|
* ceiling, while racers' one-off stamped duplicates don't accumulate, and
|
|
@@ -11,7 +11,7 @@ export type DeploymentAffinityOutcome =
|
|
|
11
11
|
/** Misrouted and out of budget (or unroutable); `run_failed` recorded. */
|
|
12
12
|
| 'failed';
|
|
13
13
|
/**
|
|
14
|
-
* `spanAttributes` is present only on a misrouted delivery
|
|
14
|
+
* `spanAttributes` is present only on a misrouted delivery: mismatches are
|
|
15
15
|
* rare, so the presence of `workflow.deployment.pinned_id` on a span *is* the
|
|
16
16
|
* signal that one happened, and `recovered` separates the ones a re-route fixed
|
|
17
17
|
* from the ones that kept misrouting.
|
|
@@ -22,7 +22,7 @@ export interface DeploymentAffinityResult {
|
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
24
|
* Arguments handed to a call site's re-enqueue closure. The guard owns the
|
|
25
|
-
* policy
|
|
25
|
+
* policy (counting, backoff, logging, telemetry, escalation) and the call
|
|
26
26
|
* site owns only the shape of the message it needs to put back on the queue.
|
|
27
27
|
*/
|
|
28
28
|
export interface ReenqueueArgs {
|
|
@@ -42,9 +42,9 @@ export interface ReenqueueArgs {
|
|
|
42
42
|
* Guards deployment affinity: a run may only execute on the deployment it is
|
|
43
43
|
* pinned to.
|
|
44
44
|
*
|
|
45
|
-
* A run's `deploymentId` is fixed when it starts
|
|
45
|
+
* A run's `deploymentId` is fixed when it starts: the deployment that called
|
|
46
46
|
* `start()`, or whatever `start({ deploymentId })` resolved to (an explicit id
|
|
47
|
-
* or `'latest'`)
|
|
47
|
+
* or `'latest'`). No replay or step execution may happen anywhere else:
|
|
48
48
|
* the bundles here may not match the run's persisted history, and any step
|
|
49
49
|
* dispatched from here derives the per-run encryption key from the wrong
|
|
50
50
|
* deployment's master key, which surfaces as a `RuntimeDecryptionError` the
|
|
@@ -58,8 +58,8 @@ export interface ReenqueueArgs {
|
|
|
58
58
|
* spent, mirroring how a replay divergence gets bounded recovery replays before
|
|
59
59
|
* being recorded as a corrupted event log.
|
|
60
60
|
*
|
|
61
|
-
* Callers must pass a run entity they already have in hand
|
|
62
|
-
* loads the run for other reasons
|
|
61
|
+
* Callers must pass a run entity they already have in hand (every call site
|
|
62
|
+
* loads the run for other reasons), so the guard costs no extra round trip.
|
|
63
63
|
* (`world.getDeploymentId()` reads the ambient deployment id, e.g.
|
|
64
64
|
* `VERCEL_DEPLOYMENT_ID`, and does not call the backend either.)
|
|
65
65
|
*
|
|
@@ -92,7 +92,7 @@ export declare function guardDeploymentAffinity({ world, run, requestId, retryCo
|
|
|
92
92
|
* Ordering barrier awaited once a mismatch is confirmed, before either
|
|
93
93
|
* stopping action. Under turbo the `run_started` write is backgrounded, and
|
|
94
94
|
* both outcomes hand the run off (to a `run_failed` here, or to the pinned
|
|
95
|
-
* deployment's own `run_started`)
|
|
95
|
+
* deployment's own `run_started`), so that write must have landed first.
|
|
96
96
|
*/
|
|
97
97
|
beforeStop?: () => Promise<void>;
|
|
98
98
|
}): Promise<DeploymentAffinityResult>;
|
|
@@ -10,9 +10,9 @@ export declare function getPortLazy(): Promise<number | undefined>;
|
|
|
10
10
|
/**
|
|
11
11
|
* Resets the per-process port cache. Intended for tests; not used on the hot
|
|
12
12
|
* path. Callers must let any in-flight lookup settle (await the pending
|
|
13
|
-
* `getPortLazy()` call) before resetting: clearing `
|
|
13
|
+
* `getPortLazy()` call) before resetting: clearing `portState.inFlight` here does not
|
|
14
14
|
* cancel an already-scheduled resolution, so a late `.then` could otherwise
|
|
15
|
-
* repopulate `
|
|
15
|
+
* repopulate `portState.cachedPort` after the reset and bleed into the next test.
|
|
16
16
|
*/
|
|
17
17
|
export declare function resetPortCacheForTesting(): void;
|
|
18
18
|
/**
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
*
|
|
10
10
|
* Resolution order, in priority:
|
|
11
11
|
*
|
|
12
|
-
* 1. `globalThis[WorldCacheKey]
|
|
12
|
+
* 1. `globalThis[WorldCacheKey]`: populated by a successful prior
|
|
13
13
|
* `getWorld()` call. This is the steady-state hot path.
|
|
14
|
-
* 2. `globalThis[GetWorldFnKey]
|
|
14
|
+
* 2. `globalThis[GetWorldFnKey]`: populated by the module-load side
|
|
15
15
|
* effect at the bottom of `./world.ts`. Fires on every server bundle
|
|
16
16
|
* that reaches this file via `workflow` or `workflow/api` (which import
|
|
17
17
|
* `./world-init.ts` for its side effect; see that file for the full
|
|
@@ -20,7 +20,7 @@ export interface HealthCheckResult {
|
|
|
20
20
|
/**
|
|
21
21
|
* `@workflow/core` version of the responding deployment, used for
|
|
22
22
|
* capability detection (see `getRunCapabilities`). Omitted when the
|
|
23
|
-
* responding deployment did not provide the field as a string
|
|
23
|
+
* responding deployment did not provide the field as a string:
|
|
24
24
|
* for example, an older `@workflow/core` that predates this field,
|
|
25
25
|
* or a non-JSON plain-text health response.
|
|
26
26
|
*/
|
|
@@ -35,15 +35,15 @@ export interface HealthCheckResult {
|
|
|
35
35
|
*/
|
|
36
36
|
encryptionPublicKey?: string;
|
|
37
37
|
/**
|
|
38
|
-
* The responding deployment's `HOOK_RESUME_INPUT_VERSION
|
|
39
|
-
* version at which the *consumer* (queue-message target)
|
|
38
|
+
* The responding deployment's `HOOK_RESUME_INPUT_VERSION`: the protocol
|
|
39
|
+
* version at which the *consumer* (queue-message target) materializes the
|
|
40
40
|
* `hook_received` event from `hookInput` on replay. A cross-deployment
|
|
41
41
|
* `start()` stamps the *target's* value (not the caller's) into the new
|
|
42
|
-
* run's `executionContext.hookResumeInputVersion
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
* responding deployment predates this field
|
|
46
|
-
*
|
|
42
|
+
* run's `executionContext.hookResumeInputVersion`. Current producers write
|
|
43
|
+
* the event durably before publishing the wake and do not read the marker;
|
|
44
|
+
* OLDER producers still gate their lazy path on it, so it keeps being
|
|
45
|
+
* stamped. Omitted when the responding deployment predates this field,
|
|
46
|
+
* which fails that gate closed.
|
|
47
47
|
*/
|
|
48
48
|
hookResumeInputVersion?: number;
|
|
49
49
|
}
|
|
@@ -75,7 +75,7 @@ export interface HealthCheckOptions {
|
|
|
75
75
|
* Queue namespace of the target deployment (e.g. `'eve'` for topics like
|
|
76
76
|
* `__eve_wkf_workflow_*`). Falls back to `WORKFLOW_QUEUE_NAMESPACE` in the
|
|
77
77
|
* calling process. Cross-context callers (e.g. the observability
|
|
78
|
-
* dashboard) must pass the target deployment's namespace explicitly
|
|
78
|
+
* dashboard) must pass the target deployment's namespace explicitly:
|
|
79
79
|
* the env fallback resolves in the caller's process, and a message
|
|
80
80
|
* published to a mismatched topic has no consumer, so the check would
|
|
81
81
|
* always time out.
|
|
@@ -93,7 +93,7 @@ export declare function healthCheck(world: World, options?: HealthCheckOptions):
|
|
|
93
93
|
* re-sorted. Every append source is already in canonical order relative to the
|
|
94
94
|
* tail (a cursor-delimited page, or a write-response delta), so receipt order is
|
|
95
95
|
* the order to keep, and re-sorting here would only cost a pass over the log.
|
|
96
|
-
* Nothing downstream may assume the tail is the newest event
|
|
96
|
+
* Nothing downstream may assume the tail is the newest event. See
|
|
97
97
|
* {@link maxEventSlot}.
|
|
98
98
|
*/
|
|
99
99
|
export declare function appendUniqueEvents(target: Event[], events: readonly Event[], targetIds?: Set<string>): void;
|
|
@@ -104,7 +104,7 @@ export declare function appendUniqueEvents(target: Event[], events: readonly Eve
|
|
|
104
104
|
*
|
|
105
105
|
* `preloadedEvents` is loaded `sortOrder: 'asc'` and is never re-sorted
|
|
106
106
|
* client-side, so a `hook_received` spliced in by the lazy-resume consumer must
|
|
107
|
-
* land in `eventId` order
|
|
107
|
+
* land in `eventId` order: a plain `push` would place a late-committing
|
|
108
108
|
* earlier event after events that sort before it, corrupting replay.
|
|
109
109
|
*
|
|
110
110
|
* Lexicographic string order is the log's order: a slot id is a fixed-width
|
|
@@ -190,7 +190,7 @@ export interface SkippedSlotReport {
|
|
|
190
190
|
* would raise the log's highest position past a position whose event is
|
|
191
191
|
* missing. Later writes read that maximum to say what they have seen, so each
|
|
192
192
|
* would claim a position it never saw, and the World only reports the span a
|
|
193
|
-
* write skips
|
|
193
|
+
* write skips: it would never send the missing one. Dropping costs one more
|
|
194
194
|
* round of the same events on the next write and keeps the log a prefix of the
|
|
195
195
|
* truth, which the note above {@link mergeReportedEvents} explains is always an
|
|
196
196
|
* available answer.
|
|
@@ -265,7 +265,7 @@ export declare function findEventSlotGap(events: readonly Event[]): EventSlotGap
|
|
|
265
265
|
*
|
|
266
266
|
* A hole can be transient. The World allocates a slot inside the insert that
|
|
267
267
|
* occupies it, so two concurrent writers can collide, one retry past the other,
|
|
268
|
-
* and the higher slot commit first
|
|
268
|
+
* and the higher slot commit first, leaving a window in which the lower one is
|
|
269
269
|
* genuinely absent from a strongly-consistent read and fills in a moment later.
|
|
270
270
|
* The window is one commit wide, so a short backoff clears it; anything that
|
|
271
271
|
* survives all three re-reads is a position no write will ever occupy.
|
|
@@ -276,7 +276,7 @@ export declare const SLOT_GAP_RECHECK_ATTEMPTS = 3;
|
|
|
276
276
|
* out, and return the settled log alongside the hole that survived.
|
|
277
277
|
*
|
|
278
278
|
* Reads are strongly consistent, so a hole is not an artifact of *when* the log
|
|
279
|
-
* was read
|
|
279
|
+
* was read, but it can be an artifact of a write that had not committed yet
|
|
280
280
|
* (see {@link SLOT_GAP_RECHECK_ATTEMPTS}). Distinguishing the two costs a
|
|
281
281
|
* re-read, which is only ever paid by a replay that already found a hole.
|
|
282
282
|
*
|
|
@@ -295,7 +295,7 @@ export declare function settleEventSlotGap(runId: string, loaded: LoadedEventLog
|
|
|
295
295
|
* One integer says it because the World keeps its positions dense: a writer
|
|
296
296
|
* that names slot N is claiming to hold every event from 1 to N and nothing
|
|
297
297
|
* above. The World answers by numbering the write above whatever the log has
|
|
298
|
-
* actually reached and handing back the events on the slots in between
|
|
298
|
+
* actually reached and handing back the events on the slots in between: the
|
|
299
299
|
* ones this writer decided without.
|
|
300
300
|
*
|
|
301
301
|
* Density is the World's invariant, not a claim about this particular read. A
|
|
@@ -326,14 +326,14 @@ export declare function slotSnapshotParams(events: readonly Event[]): SlotSnapsh
|
|
|
326
326
|
* The events a rejecting World attached to a `PreconditionFailedError`, when it
|
|
327
327
|
* returned the ones the client's snapshot was missing inline.
|
|
328
328
|
*
|
|
329
|
-
* Returns `null` for anything else
|
|
329
|
+
* Returns `null` for anything else: no details, a World that did not implement
|
|
330
330
|
* this, or a payload that does not narrow cleanly. Callers fall back to
|
|
331
331
|
* reloading the event log, which is always correct; this is untrusted-shaped
|
|
332
332
|
* data on a failure path, so nothing here is repaired.
|
|
333
333
|
*
|
|
334
334
|
* `runId` is the caller's run. Every event must belong to it: the delta is
|
|
335
335
|
* merged straight into the replay's log, and one foreign event there is a
|
|
336
|
-
* corrupt log rather than a corrected one
|
|
336
|
+
* corrupt log rather than a corrected one: the replay would consume a
|
|
337
337
|
* correlation id for an event that does not exist on this run.
|
|
338
338
|
*/
|
|
339
339
|
export declare function preconditionEventDelta(error: unknown, runId: string): {
|
|
@@ -349,19 +349,19 @@ export type EventCreator = (data: CreateEventRequest, params?: CreateEventParams
|
|
|
349
349
|
export declare function withHealthCheck(handler: (req: Request) => Promise<Response>, worldSpecVersion?: number): (req: Request) => Promise<Response>;
|
|
350
350
|
/**
|
|
351
351
|
* Idempotency key for a step's background-dispatch queue message, scoped to
|
|
352
|
-
* the step's IDENTITY
|
|
352
|
+
* the step's IDENTITY, correlation id plus (hashed) step name, rather than
|
|
353
353
|
* the bare correlation id.
|
|
354
354
|
*
|
|
355
355
|
* The scoping matters for resilient step dispatch under the precondition
|
|
356
356
|
* guard: a guard-rejected `step_created` leaves its (revoked) step message in
|
|
357
357
|
* flight, and the corrected replay may re-derive the same correlation id for
|
|
358
358
|
* a DIFFERENT step. Under a bare-correlationId key the corrected replay's
|
|
359
|
-
* dispatch would silently dedupe against the revoked in-flight message
|
|
359
|
+
* dispatch would silently dedupe against the revoked in-flight message,
|
|
360
360
|
* which then resolves `skipped` against the re-created entity (the server's
|
|
361
|
-
* stepName fence rejects its bare start)
|
|
361
|
+
* stepName fence rejects its bare start), and the legitimate step would
|
|
362
362
|
* never be executed. Scoping by step name keeps every dedup property that
|
|
363
363
|
* matters (crash recovery re-dispatch, concurrent handlers, the delayed
|
|
364
|
-
* retry sharing the suspension re-dispatch's key
|
|
364
|
+
* retry sharing the suspension re-dispatch's key: all name the same step)
|
|
365
365
|
* while letting the corrected schedule's dispatch through.
|
|
366
366
|
*
|
|
367
367
|
* Every producer of a step-dispatch (or step-retry) message must use this
|
|
@@ -382,34 +382,15 @@ export declare function getQueueOverhead(message: {
|
|
|
382
382
|
[k: string]: number;
|
|
383
383
|
} | undefined;
|
|
384
384
|
/**
|
|
385
|
-
*
|
|
386
|
-
*
|
|
387
|
-
*
|
|
388
|
-
*
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
*
|
|
393
|
-
*
|
|
394
|
-
* The resolved value is deliberately the *full* capability — the symmetric AES
|
|
395
|
-
* key plus the run's X25519 keypair — not just a `CryptoKey`. A run reading
|
|
396
|
-
* its own event log can encounter sealed (`encp`) payloads that another run
|
|
397
|
-
* wrote to it (a cross-deployment hook resumption, say), and opening those
|
|
398
|
-
* needs the keypair. Resolving only the symmetric key would leave those
|
|
399
|
-
* payloads unopenable and wedge the run.
|
|
400
|
-
*
|
|
401
|
-
* Used by step / workflow handlers to defer the (potentially expensive)
|
|
402
|
-
* key fetch until the first code path that actually needs it — typically
|
|
403
|
-
* input hydration on the success path, or error dehydration on a failure
|
|
404
|
-
* path. Both paths can race-call the accessor without triggering duplicate
|
|
405
|
-
* fetches.
|
|
406
|
-
*
|
|
407
|
-
* Errors thrown by `getEncryptionKeyForRun` propagate to every caller
|
|
408
|
-
* (the cached promise rejects). This is intentional: when encryption is
|
|
409
|
-
* configured, we never want to silently fall back to plaintext
|
|
410
|
-
* serialization. A propagated error in an event-emission path leaves the
|
|
411
|
-
* outer try/catch to log and surface the issue; the queue's redelivery
|
|
412
|
-
* semantics will retry the key fetch on the next attempt.
|
|
385
|
+
* Resolve the run's full payload-encryption capability. This includes the
|
|
386
|
+
* symmetric key and X25519 keypair needed to open cross-run sealed payloads.
|
|
387
|
+
* Missing world support or key material resolves to `undefined`; lookup and
|
|
388
|
+
* derivation failures propagate rather than silently falling back to plaintext.
|
|
389
|
+
*/
|
|
390
|
+
export declare function resolveRunEncryptionKey(world: World, runOrId: WorkflowRun | string, context?: Record<string, unknown>): Promise<PayloadKey | undefined>;
|
|
391
|
+
/**
|
|
392
|
+
* Return a lazy, memoized accessor around {@link resolveRunEncryptionKey}.
|
|
393
|
+
* Concurrent callers share the same promise, including its rejection.
|
|
413
394
|
*/
|
|
414
395
|
export declare function memoizeEncryptionKey(world: World, runOrId: WorkflowRun | string): () => Promise<PayloadKey | undefined>;
|
|
415
396
|
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* QuickJS VM integration with the Workflow DevKit.
|
|
2
|
+
* QuickJS WebAssembly (WASM) VM integration with the Workflow DevKit.
|
|
3
3
|
*
|
|
4
4
|
* This module provides the entry point for running workflows in the
|
|
5
|
-
* QuickJS
|
|
6
|
-
* implement the same event-replay execution model
|
|
5
|
+
* QuickJS VM engine instead of the `node:vm` engine. Both engines
|
|
6
|
+
* implement the same event-replay execution model, where every invocation:
|
|
7
7
|
*
|
|
8
8
|
* 1. Loads the full event log for the run
|
|
9
9
|
* 2. Runs the workflow function from the top in a fresh QuickJS VM,
|
|
@@ -16,7 +16,7 @@ import type { Span } from '#compiled/@opentelemetry/api/index.js';
|
|
|
16
16
|
import { type Event, type RunInput, type WorkflowRun } from '#compiled/@workflow/world/index.js';
|
|
17
17
|
/**
|
|
18
18
|
* Returns true when the supplied preloaded events indicate this is the
|
|
19
|
-
* first workflow handler invocation for the run
|
|
19
|
+
* first workflow handler invocation for the run, i.e. the log contains
|
|
20
20
|
* nothing beyond `run_created` / `run_started`. In that case the
|
|
21
21
|
* preloaded events ARE the complete event log and the `events.list`
|
|
22
22
|
* round-trips can be skipped entirely.
|
|
@@ -38,12 +38,12 @@ export declare function isFirstInvocation(preloadedEvents: readonly Event[] | un
|
|
|
38
38
|
* This replaces the `node:vm` replay path (runWorkflow + EventsConsumer)
|
|
39
39
|
* with a QuickJS VM invocation that performs the same full event replay.
|
|
40
40
|
*
|
|
41
|
-
* KNOWN GAP
|
|
41
|
+
* KNOWN GAP (slot snapshot): unlike the node:vm path, no event write in
|
|
42
42
|
* this file carries {@link CreateEventParams.eventCount}, so a World never
|
|
43
43
|
* learns which events the writer had not seen and never reports them back.
|
|
44
44
|
* The engine currently relies on per-(runId, correlationId) event
|
|
45
45
|
* uniqueness (EntityConflictError dedup) alone. This is a deliberate
|
|
46
|
-
* simplification while the engine is experimental
|
|
46
|
+
* simplification while the engine is experimental: wiring the snapshot is
|
|
47
47
|
* tracked follow-up work; anyone adding new write paths here should not
|
|
48
48
|
* assume parity with the node engine on this axis.
|
|
49
49
|
*/
|
|
@@ -54,8 +54,8 @@ export declare function runWorkflowWithQuickJS(params: {
|
|
|
54
54
|
/**
|
|
55
55
|
* Events returned inline by `events.create('run_started', ...)` or by
|
|
56
56
|
* the lazy hook fast path's `hook_received` preload. When they indicate
|
|
57
|
-
* a first invocation
|
|
58
|
-
* are the complete log
|
|
57
|
+
* a first invocation, or when `preloadedEventsComplete` attests they
|
|
58
|
+
* are the complete log, they are used as the event log instead of
|
|
59
59
|
* fetching via `events.list`, matching the node:vm engine's fast path.
|
|
60
60
|
*/
|
|
61
61
|
preloadedEvents?: Event[];
|
|
@@ -106,8 +106,8 @@ export declare function runWorkflowWithQuickJS(params: {
|
|
|
106
106
|
/**
|
|
107
107
|
* Queue namespace resolved at route registration (runtime.ts). Must be
|
|
108
108
|
* threaded into every message publish: the builders bake the namespace
|
|
109
|
-
* into generated routes, so consumers listen on `__<ns>_wkf_workflow_
|
|
110
|
-
*
|
|
109
|
+
* into generated routes, so consumers listen on `__<ns>_wkf_workflow_*`.
|
|
110
|
+
* A publish without it lands on `__wkf_workflow_*` and is never
|
|
111
111
|
* picked up.
|
|
112
112
|
*/
|
|
113
113
|
namespace?: string;
|
|
@@ -119,6 +119,17 @@ export declare function runWorkflowWithQuickJS(params: {
|
|
|
119
119
|
* invocations to each other and fragment the run view on async queues.
|
|
120
120
|
*/
|
|
121
121
|
nextTraceCarrier?: () => Promise<Record<string, string>>;
|
|
122
|
+
/**
|
|
123
|
+
* The wait this invocation is the delayed continuation for, if it is one
|
|
124
|
+
* (`WorkflowInvokePayload.waitContinuation`). Read only to decide the next
|
|
125
|
+
* continuation's idempotency key: a continuation that finds its own wait
|
|
126
|
+
* still pending has spent its key, so the re-arm has to advance the attempt
|
|
127
|
+
* or the world's dedupe window drops it and the wait loses its only timer.
|
|
128
|
+
*/
|
|
129
|
+
waitContinuation?: {
|
|
130
|
+
correlationId: string;
|
|
131
|
+
attempt: number;
|
|
132
|
+
};
|
|
122
133
|
}): Promise<{
|
|
123
134
|
timeoutSeconds?: number;
|
|
124
135
|
} | void>;
|