@lostgradient/weft 0.23.1 → 0.24.1
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/README.md +72 -4
- package/dist/cli/codegen-emit-dedup.d.ts +81 -0
- package/dist/cli/codegen-emit-dedup.js +45 -0
- package/dist/cli/codegen-emit-registry.d.ts +90 -0
- package/dist/cli/codegen-emit-registry.js +50 -0
- package/dist/cli/codegen-emit.d.ts +26 -39
- package/dist/cli/codegen-emit.js +4 -27
- package/dist/cli/codegen-validate.d.ts +49 -0
- package/dist/cli/codegen-validate.js +186 -0
- package/dist/cli/codegen.js +6 -87
- package/dist/cli/conformance.js +5 -2
- package/dist/cli/generated/operation-catalog.snapshot.json +381 -3
- package/dist/cli/generated/operation-client.generated.d.ts +350 -10
- package/dist/cli/generated/operation-client.generated.js +14 -0
- package/dist/cli/output.js +1 -1
- package/dist/cli/parse-schedule-arguments.js +15 -3
- package/dist/cli/schedule.js +2 -1
- package/dist/cli/storage-factory.js +2 -0
- package/dist/cli/types.d.ts +2 -1
- package/dist/cli/workflow-commands.js +2 -0
- package/dist/cli-main.js +1 -1
- package/dist/client/http-client-requests.js +6 -9
- package/dist/client/start-body.js +1 -0
- package/dist/core/application-payload-digest.d.ts +42 -0
- package/dist/core/application-payload-digest.js +76 -0
- package/dist/core/application-primitive-abort.d.ts +50 -0
- package/dist/core/application-primitive-abort.js +40 -0
- package/dist/core/application-primitive-attempt-registry.d.ts +74 -0
- package/dist/core/application-primitive-attempt-registry.js +73 -0
- package/dist/core/application-primitive-codec.d.ts +36 -0
- package/dist/core/application-primitive-codec.js +56 -0
- package/dist/core/application-primitive-commit.d.ts +67 -0
- package/dist/core/application-primitive-commit.js +66 -0
- package/dist/core/application-primitive-guards.d.ts +62 -0
- package/dist/core/application-primitive-guards.js +89 -0
- package/dist/core/application-primitive-payload.d.ts +29 -0
- package/dist/core/application-primitive-payload.js +65 -0
- package/dist/core/application-primitive-timing.d.ts +18 -0
- package/dist/core/application-primitive-timing.js +22 -0
- package/dist/core/atomic-state.js +2 -0
- package/dist/core/catalog/codec.d.ts +40 -0
- package/dist/core/catalog/codec.js +45 -0
- package/dist/core/catalog/errors.d.ts +104 -0
- package/dist/core/catalog/errors.js +41 -0
- package/dist/core/catalog/index.d.ts +25 -0
- package/dist/core/catalog/index.js +22 -0
- package/dist/core/catalog/reference-counts.d.ts +120 -0
- package/dist/core/catalog/reference-counts.js +28 -0
- package/dist/core/catalog/removal.d.ts +105 -0
- package/dist/core/catalog/removal.js +30 -0
- package/dist/core/catalog/storage-io.d.ts +101 -0
- package/dist/core/catalog/storage-io.js +106 -0
- package/dist/core/catalog/types.d.ts +108 -0
- package/dist/core/catalog/types.js +0 -0
- package/dist/core/catalog/workflow-catalog.d.ts +165 -0
- package/dist/core/catalog/workflow-catalog.js +198 -0
- package/dist/core/compare-codepoint.d.ts +13 -0
- package/dist/core/compare-codepoint.js +7 -0
- package/dist/core/compression.js +2 -0
- package/dist/core/context/attributes.d.ts +1 -1
- package/dist/core/context/durable-operations.d.ts +2 -2
- package/dist/core/context/index.js +5 -3
- package/dist/core/context/state-namespace.d.ts +1 -1
- package/dist/core/contract/build.d.ts +64 -0
- package/dist/core/contract/build.js +99 -0
- package/dist/core/contract/compatibility.d.ts +187 -0
- package/dist/core/contract/compatibility.js +37 -0
- package/dist/core/contract/failure.d.ts +64 -0
- package/dist/core/contract/failure.js +4 -0
- package/dist/core/contract/hash.d.ts +92 -0
- package/dist/core/contract/hash.js +34 -0
- package/dist/core/contract/index.d.ts +21 -0
- package/dist/core/contract/index.js +22 -0
- package/dist/core/contract/limits.d.ts +74 -0
- package/dist/core/contract/limits.js +1 -0
- package/dist/core/contract/manifest-parse-schema.d.ts +37 -0
- package/dist/core/contract/manifest-parse-schema.js +106 -0
- package/dist/core/contract/manifest-parse.d.ts +76 -0
- package/dist/core/contract/manifest-parse.js +189 -0
- package/dist/core/contract/manifest.d.ts +56 -0
- package/dist/core/contract/manifest.js +31 -0
- package/dist/core/contract/normalize.d.ts +97 -0
- package/dist/core/contract/normalize.js +127 -0
- package/dist/core/contract/revision.d.ts +29 -0
- package/dist/core/contract/revision.js +5 -0
- package/dist/core/contract/types.d.ts +274 -0
- package/dist/core/contract/types.js +1 -0
- package/dist/core/engine/activity-resolution.js +17 -17
- package/dist/core/engine/bulk-operations-purge.js +14 -20
- package/dist/core/engine/bulk-operations-retry.d.ts +9 -0
- package/dist/core/engine/bulk-operations-retry.js +177 -0
- package/dist/core/engine/bulk-operations-shared.d.ts +18 -0
- package/dist/core/engine/bulk-operations-shared.js +14 -0
- package/dist/core/engine/bulk-operations.js +8 -167
- package/dist/core/engine/callback-creators-bundles.js +4 -2
- package/dist/core/engine/callback-creators-core.js +9 -1
- package/dist/core/engine/callback-creators-schedule.js +2 -2
- package/dist/core/engine/catalog-activation.d.ts +40 -0
- package/dist/core/engine/catalog-activation.js +17 -0
- package/dist/core/engine/catalog-events.d.ts +36 -0
- package/dist/core/engine/catalog-events.js +15 -0
- package/dist/core/engine/catalog-readiness.d.ts +49 -0
- package/dist/core/engine/catalog-readiness.js +61 -0
- package/dist/core/engine/catalog-removal.d.ts +236 -0
- package/dist/core/engine/catalog-removal.js +123 -0
- package/dist/core/engine/catalog-tombstone-recovery.d.ts +56 -0
- package/dist/core/engine/catalog-tombstone-recovery.js +39 -0
- package/dist/core/engine/constraints.js +5 -1
- package/dist/core/engine/construction.d.ts +2 -2
- package/dist/core/engine/construction.js +4 -2
- package/dist/core/engine/decode-revision.d.ts +32 -0
- package/dist/core/engine/decode-revision.js +9 -0
- package/dist/core/engine/disposal.d.ts +6 -2
- package/dist/core/engine/disposal.js +26 -3
- package/dist/core/engine/dynamic-source-errors.d.ts +81 -0
- package/dist/core/engine/dynamic-source-errors.js +25 -0
- package/dist/core/engine/dynamic-source-execution.d.ts +173 -0
- package/dist/core/engine/dynamic-source-execution.js +108 -0
- package/dist/core/engine/engine-internal-types.d.ts +16 -0
- package/dist/core/engine/engine-workflows-namespace.d.ts +140 -0
- package/dist/core/engine/engine-workflows-namespace.js +51 -0
- package/dist/core/engine/finalizer-metadata.d.ts +22 -0
- package/dist/core/engine/finalizer-metadata.js +12 -0
- package/dist/core/engine/handle-result.js +2 -0
- package/dist/core/engine/index.d.ts +91 -0
- package/dist/core/engine/index.js +78 -6
- package/dist/core/engine/inline-launch-queue.js +1 -1
- package/dist/core/engine/internals.d.ts +54 -15
- package/dist/core/engine/internals.js +6 -0
- package/dist/core/engine/lifecycle/checkpoint-launch.d.ts +29 -0
- package/dist/core/engine/lifecycle/checkpoint-launch.js +75 -0
- package/dist/core/engine/lifecycle/delayed-start-registration.d.ts +30 -0
- package/dist/core/engine/lifecycle/delayed-start-registration.js +11 -0
- package/dist/core/engine/lifecycle/fork-helpers.d.ts +33 -1
- package/dist/core/engine/lifecycle/fork-helpers.js +3 -1
- package/dist/core/engine/lifecycle/recovery-revision-groups.d.ts +75 -0
- package/dist/core/engine/lifecycle/recovery-revision-groups.js +64 -0
- package/dist/core/engine/lifecycle/resume-generation-guard.d.ts +58 -0
- package/dist/core/engine/lifecycle/resume-generation-guard.js +11 -0
- package/dist/core/engine/lifecycle/resume.js +18 -9
- package/dist/core/engine/lifecycle/shared.d.ts +43 -0
- package/dist/core/engine/lifecycle/standalone-claim-acquire.d.ts +12 -0
- package/dist/core/engine/lifecycle/standalone-claim-acquire.js +6 -0
- package/dist/core/engine/lifecycle/start-commit-errors.d.ts +12 -0
- package/dist/core/engine/lifecycle/start-commit-errors.js +6 -0
- package/dist/core/engine/lifecycle/start-commit.d.ts +22 -7
- package/dist/core/engine/lifecycle/start-commit.js +49 -15
- package/dist/core/engine/lifecycle/start-exec.d.ts +18 -2
- package/dist/core/engine/lifecycle/start-exec.js +7 -5
- package/dist/core/engine/lifecycle/start-or-signal-create.js +1 -3
- package/dist/core/engine/lifecycle/start-or-signal.js +1 -1
- package/dist/core/engine/lifecycle/start-precondition-attribution.d.ts +49 -0
- package/dist/core/engine/lifecycle/start-precondition-attribution.js +13 -0
- package/dist/core/engine/lifecycle/start-revision-resolution.d.ts +34 -0
- package/dist/core/engine/lifecycle/start-revision-resolution.js +11 -0
- package/dist/core/engine/lifecycle/start-state.d.ts +16 -0
- package/dist/core/engine/lifecycle/start-state.js +60 -0
- package/dist/core/engine/lifecycle/start-terminal-conflict-purge.d.ts +66 -3
- package/dist/core/engine/lifecycle/start-terminal-conflict-purge.js +13 -3
- package/dist/core/engine/lifecycle/start.d.ts +16 -6
- package/dist/core/engine/lifecycle/start.js +39 -66
- package/dist/core/engine/lifecycle/transition.d.ts +3 -4
- package/dist/core/engine/lifecycle/transition.js +30 -80
- package/dist/core/engine/lifecycle.d.ts +4 -2
- package/dist/core/engine/lifecycle.js +6 -6
- package/dist/core/engine/listing.js +15 -1
- package/dist/core/engine/memo-durable-activity.js +4 -1
- package/dist/core/engine/nonterminal-revision-count.d.ts +25 -0
- package/dist/core/engine/nonterminal-revision-count.js +16 -0
- package/dist/core/engine/operations-time.d.ts +5 -23
- package/dist/core/engine/operations-time.js +13 -11
- package/dist/core/engine/ownership-bootstrap.d.ts +1 -1
- package/dist/core/engine/pinned-schedule-revision-count.d.ts +26 -0
- package/dist/core/engine/pinned-schedule-revision-count.js +19 -0
- package/dist/core/engine/pinned-schedule-revision.d.ts +76 -0
- package/dist/core/engine/pinned-schedule-revision.js +53 -0
- package/dist/core/engine/registration.d.ts +106 -0
- package/dist/core/engine/registration.js +28 -7
- package/dist/core/engine/retention.js +9 -2
- package/dist/core/engine/revision-errors.d.ts +71 -0
- package/dist/core/engine/revision-errors.js +13 -0
- package/dist/core/engine/schedule-revision-fire.d.ts +17 -0
- package/dist/core/engine/schedule-revision-fire.js +3 -0
- package/dist/core/engine/schedule-run.js +2 -1
- package/dist/core/engine/schedules.d.ts +2 -1
- package/dist/core/engine/schedules.js +28 -9
- package/dist/core/engine/source-diagnostics.d.ts +76 -0
- package/dist/core/engine/source-diagnostics.js +105 -0
- package/dist/core/engine/source-registration.d.ts +42 -0
- package/dist/core/engine/source-registration.js +38 -0
- package/dist/core/engine/source-resolution.d.ts +101 -0
- package/dist/core/engine/source-resolution.js +154 -0
- package/dist/core/engine/source-runtime-state.d.ts +92 -0
- package/dist/core/engine/source-runtime-state.js +36 -0
- package/dist/core/engine/storage-io.d.ts +19 -2
- package/dist/core/engine/storage-io.js +21 -2
- package/dist/core/engine/termination/finalizer-registration.d.ts +18 -0
- package/dist/core/engine/termination/finalizer-registration.js +21 -0
- package/dist/core/engine/termination/finalizer.d.ts +16 -19
- package/dist/core/engine/termination/finalizer.js +3 -3
- package/dist/core/engine/time-operation-callbacks.d.ts +32 -0
- package/dist/core/engine/time-operation-callbacks.js +0 -0
- package/dist/core/engine/validation/schedule-cadence.d.ts +16 -0
- package/dist/core/engine/validation/schedule-cadence.js +20 -0
- package/dist/core/engine/validation/schedule-options.d.ts +4 -1
- package/dist/core/engine/validation/schedule-options.js +14 -0
- package/dist/core/engine/validation/schedule-revision.d.ts +24 -0
- package/dist/core/engine/validation/schedule-revision.js +21 -0
- package/dist/core/engine/validation/schedule-warnings.d.ts +11 -0
- package/dist/core/engine/validation/schedule-warnings.js +5 -0
- package/dist/core/engine/validation/schedule.d.ts +4 -3
- package/dist/core/engine/validation/schedule.js +15 -26
- package/dist/core/engine/validation.js +5 -2
- package/dist/core/engine/workflow-claim-reclaim-target.d.ts +1 -1
- package/dist/core/engine/workflow-claim-reclaim-target.js +16 -2
- package/dist/core/engine/workflow-retention-deadline.d.ts +16 -0
- package/dist/core/engine/workflow-retention-deadline.js +33 -0
- package/dist/core/events/catalog-events.d.ts +117 -0
- package/dist/core/events/catalog-events.js +62 -0
- package/dist/core/events/event-map.d.ts +11 -0
- package/dist/core/events/index.d.ts +2 -0
- package/dist/core/events/index.js +2 -0
- package/dist/core/events/workflow-source-events.d.ts +102 -0
- package/dist/core/events/workflow-source-events.js +57 -0
- package/dist/core/execution-strategy.d.ts +7 -0
- package/dist/core/inline-execution-strategy.context-options.d.ts +1 -1
- package/dist/core/inline-execution-strategy.js +1 -1
- package/dist/core/mailbox-admission.d.ts +26 -0
- package/dist/core/mailbox-admission.js +130 -0
- package/dist/core/mailbox-claims.d.ts +251 -0
- package/dist/core/mailbox-claims.js +0 -0
- package/dist/core/mailbox-codec.d.ts +32 -0
- package/dist/core/mailbox-codec.js +221 -0
- package/dist/core/mailbox-contract.d.ts +290 -0
- package/dist/core/mailbox-contract.js +0 -0
- package/dist/core/mailbox-delivery.d.ts +37 -0
- package/dist/core/mailbox-delivery.js +193 -0
- package/dist/core/mailbox-guards.d.ts +78 -0
- package/dist/core/mailbox-guards.js +58 -0
- package/dist/core/mailbox-index-codec.d.ts +41 -0
- package/dist/core/mailbox-index-codec.js +71 -0
- package/dist/core/mailbox-internals.d.ts +156 -0
- package/dist/core/mailbox-internals.js +154 -0
- package/dist/core/mailbox-maintenance.d.ts +29 -0
- package/dist/core/mailbox-maintenance.js +196 -0
- package/dist/core/mailbox-settlement.d.ts +69 -0
- package/dist/core/mailbox-settlement.js +206 -0
- package/dist/core/mailbox-storage.d.ts +117 -0
- package/dist/core/mailbox-storage.js +115 -0
- package/dist/core/mailbox-transition-helpers.d.ts +70 -0
- package/dist/core/mailbox-transition-helpers.js +43 -0
- package/dist/core/mailbox-transitions-recovery.d.ts +28 -0
- package/dist/core/mailbox-transitions-recovery.js +64 -0
- package/dist/core/mailbox-transitions.d.ts +138 -0
- package/dist/core/mailbox-transitions.js +180 -0
- package/dist/core/mailbox-types.d.ts +406 -0
- package/dist/core/mailbox-types.js +16 -0
- package/dist/core/mailbox-validation.d.ts +65 -0
- package/dist/core/mailbox-validation.js +73 -0
- package/dist/core/mailbox-waits.d.ts +50 -0
- package/dist/core/mailbox-waits.js +97 -0
- package/dist/core/mailbox.d.ts +163 -0
- package/dist/core/mailbox.js +211 -0
- package/dist/core/outbox-claims.d.ts +307 -0
- package/dist/core/outbox-claims.js +0 -0
- package/dist/core/outbox-codec.d.ts +24 -0
- package/dist/core/outbox-codec.js +257 -0
- package/dist/core/outbox-contract.d.ts +346 -0
- package/dist/core/outbox-contract.js +0 -0
- package/dist/core/outbox-delivery.d.ts +34 -0
- package/dist/core/outbox-delivery.js +149 -0
- package/dist/core/outbox-drain.d.ts +29 -0
- package/dist/core/outbox-drain.js +158 -0
- package/dist/core/outbox-enqueue.d.ts +24 -0
- package/dist/core/outbox-enqueue.js +115 -0
- package/dist/core/outbox-guards.d.ts +76 -0
- package/dist/core/outbox-guards.js +60 -0
- package/dist/core/outbox-index-codec.d.ts +33 -0
- package/dist/core/outbox-index-codec.js +71 -0
- package/dist/core/outbox-internals.d.ts +99 -0
- package/dist/core/outbox-internals.js +159 -0
- package/dist/core/outbox-listing.d.ts +12 -0
- package/dist/core/outbox-listing.js +38 -0
- package/dist/core/outbox-maintenance.d.ts +28 -0
- package/dist/core/outbox-maintenance.js +191 -0
- package/dist/core/outbox-operations.d.ts +18 -0
- package/dist/core/outbox-operations.js +46 -0
- package/dist/core/outbox-runner.d.ts +30 -0
- package/dist/core/outbox-runner.js +217 -0
- package/dist/core/outbox-settlement.d.ts +57 -0
- package/dist/core/outbox-settlement.js +183 -0
- package/dist/core/outbox-storage.d.ts +107 -0
- package/dist/core/outbox-storage.js +127 -0
- package/dist/core/outbox-transition-helpers.d.ts +83 -0
- package/dist/core/outbox-transition-helpers.js +63 -0
- package/dist/core/outbox-transitions-recovery.d.ts +30 -0
- package/dist/core/outbox-transitions-recovery.js +42 -0
- package/dist/core/outbox-transitions.d.ts +145 -0
- package/dist/core/outbox-transitions.js +236 -0
- package/dist/core/outbox-types.d.ts +400 -0
- package/dist/core/outbox-types.js +20 -0
- package/dist/core/outbox-validation.d.ts +101 -0
- package/dist/core/outbox-validation.js +127 -0
- package/dist/core/outbox-waits.d.ts +39 -0
- package/dist/core/outbox-waits.js +88 -0
- package/dist/core/outbox.d.ts +156 -0
- package/dist/core/outbox.js +234 -0
- package/dist/core/registry-limits.d.ts +49 -0
- package/dist/core/registry-limits.js +10 -0
- package/dist/core/registry-schema-conversion.d.ts +20 -0
- package/dist/core/registry-schema-conversion.js +22 -0
- package/dist/core/registry-snapshot.d.ts +91 -42
- package/dist/core/registry-snapshot.js +39 -77
- package/dist/core/registry-workflow-contract-draft.d.ts +32 -0
- package/dist/core/registry-workflow-contract-draft.js +28 -0
- package/dist/core/registry-workflow-manifest.d.ts +122 -0
- package/dist/core/registry-workflow-manifest.js +92 -0
- package/dist/core/source/errors.d.ts +55 -0
- package/dist/core/source/errors.js +13 -0
- package/dist/core/source/index.d.ts +19 -0
- package/dist/core/source/index.js +4 -0
- package/dist/core/source/resolvers.d.ts +45 -0
- package/dist/core/source/resolvers.js +9 -0
- package/dist/core/source/types.d.ts +211 -0
- package/dist/core/source/types.js +0 -0
- package/dist/core/source/validate.d.ts +91 -0
- package/dist/core/source/validate.js +62 -0
- package/dist/core/source/workflow-source.d.ts +43 -0
- package/dist/core/source/workflow-source.js +16 -0
- package/dist/core/types/checkpoint.d.ts +14 -0
- package/dist/core/types/schedules.d.ts +52 -1
- package/dist/core/types/state.d.ts +16 -0
- package/dist/core/types/workflow-registries.d.ts +7 -0
- package/dist/core/types/workflow-registry.d.ts +12 -0
- package/dist/core/versioning.js +2 -0
- package/dist/core/weft-error.d.ts +1 -1
- package/dist/core/weft-error.js +12 -1
- package/dist/core/worker-execution-strategy.d.ts +1 -0
- package/dist/core/worker-execution-strategy.js +13 -1
- package/dist/core/worker-fault-handling.d.ts +10 -0
- package/dist/core/worker-fault-handling.js +1 -0
- package/dist/core/worker-inbound-message.d.ts +1 -0
- package/dist/core/worker-inbound-message.js +1 -0
- package/dist/core/worker-protocol-guard.js +4 -0
- package/dist/core/worker-protocol.d.ts +7 -0
- package/dist/core/worker-protocol.js +2 -1
- package/dist/core/worker-turn-watchdog.d.ts +8 -1
- package/dist/core/worker-turn-watchdog.js +3 -2
- package/dist/diagnostics/format.js +5 -0
- package/dist/diagnostics/types.d.ts +24 -0
- package/dist/diagnostics/version-check.js +8 -2
- package/dist/http.js +2 -2
- package/dist/index.d.ts +25 -4
- package/dist/index.js +57 -0
- package/dist/indexeddb.js +1 -1
- package/dist/json-schema.js +3 -3
- package/dist/mcp/resources.js +2 -0
- package/dist/runtime/portable.d.ts +9 -1
- package/dist/server/fault-to-json-rpc.js +4 -1
- package/dist/server/handler/auth-context-principal.js +4 -0
- package/dist/server/index.d.ts +11 -0
- package/dist/server/json-rpc-http.js +2 -0
- package/dist/server/json-rpc-websocket.js +6 -4
- package/dist/server/operation-catalog/index.d.ts +1 -1
- package/dist/server/operation-catalog/pipeline-helpers.js +2 -0
- package/dist/server/operation-catalog/types.d.ts +17 -0
- package/dist/server/operation-fault.d.ts +5 -0
- package/dist/server/operation-fault.js +4 -1
- package/dist/server/operations/activate-workflow-revision.d.ts +30 -0
- package/dist/server/operations/activate-workflow-revision.js +69 -0
- package/dist/server/operations/create-schedule.d.ts +2 -0
- package/dist/server/operations/create-schedule.js +10 -6
- package/dist/server/operations/fleet-events-subscription.js +1 -1
- package/dist/server/operations/fork-workflow.js +1 -1
- package/dist/server/operations/get-active-workflow-revision.d.ts +32 -0
- package/dist/server/operations/get-active-workflow-revision.js +46 -0
- package/dist/server/operations/get-catalog-diagnostics.d.ts +113 -0
- package/dist/server/operations/get-catalog-diagnostics.js +65 -0
- package/dist/server/operations/get-registry.js +17 -4
- package/dist/server/operations/get-task-detail-schema.d.ts +8 -0
- package/dist/server/operations/get-task-detail-schema.js +1 -0
- package/dist/server/operations/get-task-detail.d.ts +8 -0
- package/dist/server/operations/get-task-detail.js +1 -0
- package/dist/server/operations/get-task-diagnostics.d.ts +4 -4
- package/dist/server/operations/get-workflow-revision.d.ts +25 -0
- package/dist/server/operations/get-workflow-revision.js +50 -0
- package/dist/server/operations/install-workflow-revision.d.ts +27 -0
- package/dist/server/operations/install-workflow-revision.js +46 -0
- package/dist/server/operations/list-workflow-revisions.d.ts +20 -0
- package/dist/server/operations/list-workflow-revisions.js +40 -0
- package/dist/server/operations/preload-workflow-revision.d.ts +28 -0
- package/dist/server/operations/preload-workflow-revision.js +60 -0
- package/dist/server/operations/schedule-faults.d.ts +1 -0
- package/dist/server/operations/schedule-faults.js +32 -4
- package/dist/server/operations/schedule-rest-body.d.ts +1 -0
- package/dist/server/operations/schedule-rest-body.js +2 -1
- package/dist/server/operations/start-or-signal-workflow.js +1 -1
- package/dist/server/operations/start-workflow.js +1 -1
- package/dist/server/operations/static-registrations.js +42 -0
- package/dist/server/operations/storage.js +2 -2
- package/dist/server/operations/submit-review-decision.js +1 -1
- package/dist/server/operations/update-schedule.d.ts +2 -0
- package/dist/server/operations/update-schedule.js +4 -2
- package/dist/server/operations/workflow-catalog-operation-helpers.d.ts +59 -0
- package/dist/server/operations/workflow-catalog-operation-helpers.js +162 -0
- package/dist/server/runtime/task-dispatch-envelope.d.ts +14 -0
- package/dist/server/runtime/task-dispatch-envelope.js +32 -0
- package/dist/server/runtime/task-dispatch-revision.d.ts +29 -0
- package/dist/server/runtime/task-dispatch-revision.js +13 -0
- package/dist/server/runtime/task-dispatch.js +12 -37
- package/dist/server/runtime/task-ledger-recovery.js +1 -1
- package/dist/server/runtime/task-ledger-runtime.d.ts +14 -2
- package/dist/server/runtime/task-ledger-runtime.js +5 -3
- package/dist/server/runtime/task-polling.js +9 -3
- package/dist/server/runtime/task-reconciliation.js +2 -1
- package/dist/server/runtime/websocket-upgrade.js +2 -0
- package/dist/server/runtime/websocket-worker.js +9 -0
- package/dist/server/task-ledger-codec.d.ts +9 -0
- package/dist/server/task-ledger-codec.js +4 -1
- package/dist/server/task-ledger-transition-helpers.js +1 -0
- package/dist/server/task-ledger-types.d.ts +9 -0
- package/dist/server/task-ledger.d.ts +1 -1
- package/dist/server/task-ledger.js +2 -1
- package/dist/server/task-queue-types.d.ts +2 -0
- package/dist/storage/bun-sql.js +51 -6
- package/dist/storage/catalog-keys.d.ts +64 -0
- package/dist/storage/catalog-keys.js +8 -0
- package/dist/storage/compressed-storage.js +1 -1
- package/dist/storage/derived-operations.js +1 -1
- package/dist/storage/index.d.ts +28 -1
- package/dist/storage/interface.d.ts +28 -1
- package/dist/storage/interface.js +1 -1
- package/dist/storage/key-encoding.d.ts +15 -0
- package/dist/storage/key-encoding.js +3 -0
- package/dist/storage/key-prefixes.d.ts +1 -1
- package/dist/storage/key-prefixes.js +16 -0
- package/dist/storage/lmdb.d.ts +54 -1
- package/dist/storage/lmdb.js +1 -1
- package/dist/storage/mailbox-keys.d.ts +80 -0
- package/dist/storage/mailbox-keys.js +14 -0
- package/dist/storage/memory.js +1 -1
- package/dist/storage/neon.js +2 -2
- package/dist/storage/node-sqlite-loader.d.ts +1 -1
- package/dist/storage/node-sqlite.js +51 -6
- package/dist/storage/outbox-keys.d.ts +77 -0
- package/dist/storage/outbox-keys.js +14 -0
- package/dist/storage/postgres.js +2 -2
- package/dist/storage/resolve.js +1 -1
- package/dist/storage/scoped-storage.js +1 -1
- package/dist/storage/storage-configuration.d.ts +6 -0
- package/dist/storage/testing.js +1 -1
- package/dist/storage/turso.js +2 -2
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/web-extension.js +1 -1
- package/dist/worker/manifest/registry-contract-builder.d.ts +21 -3
- package/dist/worker/manifest/registry-contract-builder.js +40 -31
- package/dist/worker/protocol-messages.d.ts +17 -0
- package/dist/worker/protocol-schemas.d.ts +32 -0
- package/dist/worker/protocol-schemas.js +7 -3
- package/dist/worker/protocol-task-result.js +35 -3
- package/dist/worker/protocol.js +1 -1
- package/dist/worker/registry/types.d.ts +2 -0
- package/dist/worker/registry.d.ts +1 -1
- package/dist/worker/registry.js +3 -1
- package/dist/workers/workflow-runner.d.ts +9 -0
- package/dist/workers/workflow-runner.js +9 -2
- package/dist/workers/workflow-worker-entry.js +9 -4
- package/package.json +2 -2
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import {
|
|
3
|
+
parseWorkflowRevisionManifest
|
|
4
|
+
} from "../core/contract/index.js";
|
|
5
|
+
import { MAX_CONTRACT_IDENTIFIER_BYTES } from "../core/contract/limits.js";
|
|
6
|
+
import { MAX_REGISTRY_WORKFLOW_COUNT } from "../core/registry-limits.js";
|
|
7
|
+
import { REGISTRY_VERSION } from "../core/registry-snapshot.js";
|
|
8
|
+
import { isRecord } from "../worker/manifest/is-record.js";
|
|
9
|
+
import { utf8ByteLength } from "../worker/manifest/utf8.js";
|
|
10
|
+
const jsonSchema = z.union([z.boolean(), z.record(z.string(), z.unknown())]), activityEntrySchema = z.object({
|
|
11
|
+
inputSchema: jsonSchema.optional(),
|
|
12
|
+
outputSchema: jsonSchema.optional(),
|
|
13
|
+
queue: z.string(),
|
|
14
|
+
description: z.string().optional()
|
|
15
|
+
}).passthrough(), objectValue = z.unknown().refine((value) => typeof value === "object" && value !== null && !Array.isArray(value), {
|
|
16
|
+
message: "expected an object"
|
|
17
|
+
}), registryEnvelopeSchema = z.object({
|
|
18
|
+
registryVersion: z.literal(REGISTRY_VERSION),
|
|
19
|
+
generatedAt: z.string(),
|
|
20
|
+
workflows: z.array(objectValue),
|
|
21
|
+
activeRevisions: objectValue,
|
|
22
|
+
activities: z.record(z.string(), activityEntrySchema)
|
|
23
|
+
}).passthrough();
|
|
24
|
+
function normalizeRootSchema(schema) {
|
|
25
|
+
if (schema === void 0)
|
|
26
|
+
return;
|
|
27
|
+
if (typeof schema === "boolean")
|
|
28
|
+
return {};
|
|
29
|
+
return schema;
|
|
30
|
+
}
|
|
31
|
+
function projectActivities(raw) {
|
|
32
|
+
const projected = Object.create(null);
|
|
33
|
+
for (const [name, entry] of Object.entries(raw)) {
|
|
34
|
+
const projection = { queue: entry.queue }, input = normalizeRootSchema(entry.inputSchema), output = normalizeRootSchema(entry.outputSchema);
|
|
35
|
+
if (input !== void 0)
|
|
36
|
+
projection.inputSchema = input;
|
|
37
|
+
if (output !== void 0)
|
|
38
|
+
projection.outputSchema = output;
|
|
39
|
+
if (entry.description !== void 0)
|
|
40
|
+
projection.description = entry.description;
|
|
41
|
+
projected[name] = projection;
|
|
42
|
+
}
|
|
43
|
+
return projected;
|
|
44
|
+
}
|
|
45
|
+
function formatZodError(error) {
|
|
46
|
+
return error.issues.map((issue) => {
|
|
47
|
+
return `${issue.path.length === 0 ? "<root>" : issue.path.join(".")}: ${issue.message}`;
|
|
48
|
+
}).join("; ");
|
|
49
|
+
}
|
|
50
|
+
function readActiveRevisions(value) {
|
|
51
|
+
if (!isRecord(value))
|
|
52
|
+
return {
|
|
53
|
+
ok: !1,
|
|
54
|
+
error: "codegen: invalid registry snapshot: activeRevisions must be an object"
|
|
55
|
+
};
|
|
56
|
+
let entryCount = 0;
|
|
57
|
+
for (const name in value) {
|
|
58
|
+
entryCount += 1;
|
|
59
|
+
if (entryCount > MAX_REGISTRY_WORKFLOW_COUNT)
|
|
60
|
+
return {
|
|
61
|
+
ok: !1,
|
|
62
|
+
error: `codegen: invalid registry snapshot: activeRevisions has more than ${MAX_REGISTRY_WORKFLOW_COUNT} entries`
|
|
63
|
+
};
|
|
64
|
+
if (utf8ByteLength(name) > MAX_CONTRACT_IDENTIFIER_BYTES)
|
|
65
|
+
return {
|
|
66
|
+
ok: !1,
|
|
67
|
+
error: `codegen: invalid registry snapshot: activeRevisions key ${JSON.stringify(name)} exceeds the maximum identifier length of ${MAX_CONTRACT_IDENTIFIER_BYTES} bytes`
|
|
68
|
+
};
|
|
69
|
+
const revision = value[name];
|
|
70
|
+
if (typeof revision !== "string")
|
|
71
|
+
return {
|
|
72
|
+
ok: !1,
|
|
73
|
+
error: `codegen: invalid registry snapshot: activeRevisions[${JSON.stringify(name)}] must be a string`
|
|
74
|
+
};
|
|
75
|
+
if (utf8ByteLength(revision) > MAX_CONTRACT_IDENTIFIER_BYTES)
|
|
76
|
+
return {
|
|
77
|
+
ok: !1,
|
|
78
|
+
error: `codegen: invalid registry snapshot: activeRevisions[${JSON.stringify(name)}] exceeds the maximum identifier length of ${MAX_CONTRACT_IDENTIFIER_BYTES} bytes`
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
return { ok: !0, value };
|
|
82
|
+
}
|
|
83
|
+
async function parseAllManifests(workflowsRaw) {
|
|
84
|
+
const manifests = [];
|
|
85
|
+
for (const [index, raw] of workflowsRaw.entries()) {
|
|
86
|
+
const parsed = await parseWorkflowRevisionManifest(raw);
|
|
87
|
+
if (!parsed.ok) {
|
|
88
|
+
const location = parsed.path === void 0 ? "" : ` at ${parsed.path}`;
|
|
89
|
+
return {
|
|
90
|
+
ok: !1,
|
|
91
|
+
error: `codegen: invalid registry snapshot: workflows[${index}] (${parsed.reason}${location}): ${parsed.message}`
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
manifests.push(parsed.manifest);
|
|
95
|
+
}
|
|
96
|
+
return { ok: !0, value: manifests };
|
|
97
|
+
}
|
|
98
|
+
function indexManifestsByIdentity(manifests) {
|
|
99
|
+
const byName = new Map;
|
|
100
|
+
for (const manifest of manifests) {
|
|
101
|
+
let byRevision = byName.get(manifest.name);
|
|
102
|
+
if (byRevision === void 0) {
|
|
103
|
+
byRevision = new Map;
|
|
104
|
+
byName.set(manifest.name, byRevision);
|
|
105
|
+
}
|
|
106
|
+
if (byRevision.has(manifest.revision))
|
|
107
|
+
return {
|
|
108
|
+
ok: !1,
|
|
109
|
+
error: `codegen: invalid registry snapshot: workflows contains more than one manifest for name ${JSON.stringify(manifest.name)}, revision ${JSON.stringify(manifest.revision)}`
|
|
110
|
+
};
|
|
111
|
+
byRevision.set(manifest.revision, manifest);
|
|
112
|
+
}
|
|
113
|
+
return { ok: !0, value: byName };
|
|
114
|
+
}
|
|
115
|
+
function toCodegenWorkflowEntry(manifest) {
|
|
116
|
+
const entry = {
|
|
117
|
+
revision: manifest.revision,
|
|
118
|
+
workflowVersion: manifest.workflowVersion
|
|
119
|
+
};
|
|
120
|
+
if (manifest.contract.inputSchema !== void 0)
|
|
121
|
+
entry.inputSchema = manifest.contract.inputSchema;
|
|
122
|
+
if (manifest.contract.outputSchema !== void 0)
|
|
123
|
+
entry.outputSchema = manifest.contract.outputSchema;
|
|
124
|
+
if (manifest.contract.description !== void 0)
|
|
125
|
+
entry.description = manifest.contract.description;
|
|
126
|
+
if (manifest.contract.tags !== void 0 && manifest.contract.tags.length > 0)
|
|
127
|
+
entry.tags = manifest.contract.tags;
|
|
128
|
+
return entry;
|
|
129
|
+
}
|
|
130
|
+
async function resolveActiveWorkflowEntries(workflowsRaw, activeRevisions) {
|
|
131
|
+
const parsed = await parseAllManifests(workflowsRaw);
|
|
132
|
+
if (!parsed.ok)
|
|
133
|
+
return parsed;
|
|
134
|
+
const indexed = indexManifestsByIdentity(parsed.value);
|
|
135
|
+
if (!indexed.ok)
|
|
136
|
+
return indexed;
|
|
137
|
+
const byName = indexed.value, projected = Object.create(null);
|
|
138
|
+
for (const [name, revision] of Object.entries(activeRevisions)) {
|
|
139
|
+
const manifest = byName.get(name)?.get(revision);
|
|
140
|
+
if (manifest === void 0)
|
|
141
|
+
continue;
|
|
142
|
+
projected[name] = toCodegenWorkflowEntry(manifest);
|
|
143
|
+
}
|
|
144
|
+
return { ok: !0, value: projected };
|
|
145
|
+
}
|
|
146
|
+
function checkRawWorkflowsCount(value) {
|
|
147
|
+
const rawWorkflows = value !== null && typeof value === "object" ? value.workflows : void 0;
|
|
148
|
+
if (Array.isArray(rawWorkflows) && rawWorkflows.length > MAX_REGISTRY_WORKFLOW_COUNT)
|
|
149
|
+
return {
|
|
150
|
+
ok: !1,
|
|
151
|
+
error: `codegen: invalid registry snapshot: workflows has ${rawWorkflows.length} entries, exceeding the maximum of ${MAX_REGISTRY_WORKFLOW_COUNT}`
|
|
152
|
+
};
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
export async function validateRegistrySnapshot(value) {
|
|
156
|
+
if (value !== null && typeof value === "object" && "registryVersion" in value) {
|
|
157
|
+
const { registryVersion: actual } = value;
|
|
158
|
+
if (actual !== REGISTRY_VERSION)
|
|
159
|
+
return {
|
|
160
|
+
ok: !1,
|
|
161
|
+
error: `codegen: registryVersion ${String(actual)} is not supported (expected ${REGISTRY_VERSION}); upgrade or regenerate the snapshot`
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
const oversizedWorkflows = checkRawWorkflowsCount(value);
|
|
165
|
+
if (oversizedWorkflows !== void 0)
|
|
166
|
+
return oversizedWorkflows;
|
|
167
|
+
const parsed = registryEnvelopeSchema.safeParse(value);
|
|
168
|
+
if (!parsed.success)
|
|
169
|
+
return {
|
|
170
|
+
ok: !1,
|
|
171
|
+
error: `codegen: invalid registry snapshot: ${formatZodError(parsed.error)}`
|
|
172
|
+
};
|
|
173
|
+
const activeRevisions = readActiveRevisions(parsed.data.activeRevisions);
|
|
174
|
+
if (!activeRevisions.ok)
|
|
175
|
+
return activeRevisions;
|
|
176
|
+
const workflows = await resolveActiveWorkflowEntries(parsed.data.workflows, activeRevisions.value);
|
|
177
|
+
if (!workflows.ok)
|
|
178
|
+
return workflows;
|
|
179
|
+
return {
|
|
180
|
+
ok: !0,
|
|
181
|
+
value: {
|
|
182
|
+
workflows: workflows.value,
|
|
183
|
+
activities: projectActivities(parsed.data.activities)
|
|
184
|
+
}
|
|
185
|
+
};
|
|
186
|
+
}
|
package/dist/cli/codegen.js
CHANGED
|
@@ -1,37 +1,19 @@
|
|
|
1
1
|
import { promises as fs } from "node:fs";
|
|
2
2
|
import { basename, dirname } from "node:path";
|
|
3
|
-
import { z } from "zod";
|
|
4
3
|
import { ConnectionConfigurationError, resolveConnection } from "../connection.js";
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
} from "../core/registry-snapshot.js";
|
|
8
|
-
import { CodegenEmitError, emitRegistryDeclaration } from "./codegen-emit.js";
|
|
9
|
-
const jsonSchema = z.union([z.boolean(), z.record(z.string(), z.unknown())]), workflowEntrySchema = z.object({
|
|
10
|
-
inputSchema: jsonSchema.optional(),
|
|
11
|
-
outputSchema: jsonSchema.optional(),
|
|
12
|
-
description: z.string().optional(),
|
|
13
|
-
tags: z.array(z.string()).optional()
|
|
14
|
-
}).passthrough(), activityEntrySchema = z.object({
|
|
15
|
-
inputSchema: jsonSchema.optional(),
|
|
16
|
-
outputSchema: jsonSchema.optional(),
|
|
17
|
-
queue: z.string(),
|
|
18
|
-
description: z.string().optional()
|
|
19
|
-
}).passthrough(), registrySnapshotSchema = z.object({
|
|
20
|
-
registryVersion: z.literal(REGISTRY_VERSION),
|
|
21
|
-
workflows: z.record(z.string(), workflowEntrySchema),
|
|
22
|
-
activities: z.record(z.string(), activityEntrySchema)
|
|
23
|
-
}).passthrough();
|
|
4
|
+
import { CodegenEmitError, emitRegistryDeclaration } from "./codegen-emit-registry.js";
|
|
5
|
+
import { validateRegistrySnapshot } from "./codegen-validate.js";
|
|
24
6
|
export async function executeCodegen(options) {
|
|
25
7
|
const snapshotResult = await loadSnapshot(options);
|
|
26
8
|
if (!snapshotResult.ok)
|
|
27
9
|
return formatFailure(snapshotResult.error, options);
|
|
28
|
-
const validation =
|
|
10
|
+
const validation = await validateRegistrySnapshot(snapshotResult.value);
|
|
29
11
|
if (!validation.ok)
|
|
30
12
|
return formatFailure(validation.error, options);
|
|
31
|
-
const
|
|
13
|
+
const { workflows, activities } = validation.value;
|
|
32
14
|
let content;
|
|
33
15
|
try {
|
|
34
|
-
content = emitRegistryDeclaration(
|
|
16
|
+
content = emitRegistryDeclaration(workflows);
|
|
35
17
|
} catch (error) {
|
|
36
18
|
if (error instanceof CodegenEmitError)
|
|
37
19
|
return formatFailure(`codegen: ${error.message}`, options);
|
|
@@ -41,7 +23,7 @@ export async function executeCodegen(options) {
|
|
|
41
23
|
const writeResult = await writeOutput(options.out, content);
|
|
42
24
|
if (!writeResult.ok)
|
|
43
25
|
return formatFailure(writeResult.error, options);
|
|
44
|
-
const workflowCount = Object.keys(
|
|
26
|
+
const workflowCount = Object.keys(workflows).length, activityCount = Object.keys(activities).length;
|
|
45
27
|
return formatSuccess(options, writeResult.action, workflowCount, activityCount);
|
|
46
28
|
}
|
|
47
29
|
function formatFailure(message, options) {
|
|
@@ -166,69 +148,6 @@ async function loadSnapshotFromServer(serverUrl, token, timeoutMs) {
|
|
|
166
148
|
}
|
|
167
149
|
return parseRegistryResponse(response, resolvedUrl);
|
|
168
150
|
}
|
|
169
|
-
function validateSnapshot(value) {
|
|
170
|
-
if (value !== null && typeof value === "object" && "registryVersion" in value) {
|
|
171
|
-
const { registryVersion: actual } = value;
|
|
172
|
-
if (actual !== REGISTRY_VERSION)
|
|
173
|
-
return {
|
|
174
|
-
ok: !1,
|
|
175
|
-
error: `codegen: registryVersion ${String(actual)} is not supported (expected ${REGISTRY_VERSION}); upgrade or regenerate the snapshot`
|
|
176
|
-
};
|
|
177
|
-
}
|
|
178
|
-
const parsed = registrySnapshotSchema.safeParse(value);
|
|
179
|
-
if (!parsed.success)
|
|
180
|
-
return {
|
|
181
|
-
ok: !1,
|
|
182
|
-
error: `codegen: invalid registry snapshot: ${formatZodError(parsed.error)}`
|
|
183
|
-
};
|
|
184
|
-
return { ok: !0, value: {
|
|
185
|
-
registryVersion: parsed.data.registryVersion,
|
|
186
|
-
workflows: projectWorkflows(parsed.data.workflows),
|
|
187
|
-
activities: projectActivities(parsed.data.activities)
|
|
188
|
-
} };
|
|
189
|
-
}
|
|
190
|
-
function normalizeRootSchema(schema) {
|
|
191
|
-
if (schema === void 0)
|
|
192
|
-
return;
|
|
193
|
-
if (typeof schema === "boolean")
|
|
194
|
-
return {};
|
|
195
|
-
return schema;
|
|
196
|
-
}
|
|
197
|
-
function projectWorkflows(raw) {
|
|
198
|
-
const projected = Object.create(null);
|
|
199
|
-
for (const [name, entry] of Object.entries(raw)) {
|
|
200
|
-
const projection = {}, input = normalizeRootSchema(entry.inputSchema), output = normalizeRootSchema(entry.outputSchema);
|
|
201
|
-
if (input !== void 0)
|
|
202
|
-
projection.inputSchema = input;
|
|
203
|
-
if (output !== void 0)
|
|
204
|
-
projection.outputSchema = output;
|
|
205
|
-
if (entry.description !== void 0)
|
|
206
|
-
projection.description = entry.description;
|
|
207
|
-
if (entry.tags !== void 0)
|
|
208
|
-
projection.tags = entry.tags;
|
|
209
|
-
projected[name] = projection;
|
|
210
|
-
}
|
|
211
|
-
return projected;
|
|
212
|
-
}
|
|
213
|
-
function projectActivities(raw) {
|
|
214
|
-
const projected = Object.create(null);
|
|
215
|
-
for (const [name, entry] of Object.entries(raw)) {
|
|
216
|
-
const projection = { queue: entry.queue }, input = normalizeRootSchema(entry.inputSchema), output = normalizeRootSchema(entry.outputSchema);
|
|
217
|
-
if (input !== void 0)
|
|
218
|
-
projection.inputSchema = input;
|
|
219
|
-
if (output !== void 0)
|
|
220
|
-
projection.outputSchema = output;
|
|
221
|
-
if (entry.description !== void 0)
|
|
222
|
-
projection.description = entry.description;
|
|
223
|
-
projected[name] = projection;
|
|
224
|
-
}
|
|
225
|
-
return projected;
|
|
226
|
-
}
|
|
227
|
-
function formatZodError(error) {
|
|
228
|
-
return error.issues.map((issue) => {
|
|
229
|
-
return `${issue.path.length === 0 ? "<root>" : issue.path.join(".")}: ${issue.message}`;
|
|
230
|
-
}).join("; ");
|
|
231
|
-
}
|
|
232
151
|
async function writeOutput(outPath, content) {
|
|
233
152
|
const parent = dirname(outPath);
|
|
234
153
|
try {
|
package/dist/cli/conformance.js
CHANGED
|
@@ -119,14 +119,15 @@ async function readResolvedStatus(storage, operationId) {
|
|
|
119
119
|
async function waitForResolvedStatus(storage, operationId, status, timeoutMs) {
|
|
120
120
|
await waitForCondition(async () => await readResolvedStatus(storage, operationId) === status, timeoutMs, `${operationId} to resolve as ${status}`);
|
|
121
121
|
}
|
|
122
|
-
async function dispatchAndWait(server, storage, operationId, activityName, input, expectedStatus, timeoutMs) {
|
|
122
|
+
async function dispatchAndWait(server, storage, operationId, activityName, input, expectedStatus, timeoutMs, workflowRevision) {
|
|
123
123
|
if (!await server.dispatchTask({
|
|
124
124
|
operationId,
|
|
125
125
|
activityName,
|
|
126
126
|
workflowType: "conformance",
|
|
127
127
|
input,
|
|
128
128
|
queue: CONFORMANCE_QUEUE,
|
|
129
|
-
visibilityTimeout: Math.max(500, timeoutMs)
|
|
129
|
+
visibilityTimeout: Math.max(500, timeoutMs),
|
|
130
|
+
...workflowRevision !== void 0 && { workflowRevision }
|
|
130
131
|
}))
|
|
131
132
|
throw Error(`Could not dispatch ${operationId}`);
|
|
132
133
|
await waitForResolvedStatus(storage, operationId, expectedStatus, timeoutMs);
|
|
@@ -184,6 +185,8 @@ async function runConformanceChecks(command, timeoutMs) {
|
|
|
184
185
|
await waitForWorkerIdle(server, replacementWorkerId, timeoutMs);
|
|
185
186
|
await waitForResolvedStatus(storage, reconnectOperationId, "completed", timeoutMs);
|
|
186
187
|
checks.push(createCheck("reconnect", !0, "in-flight task completed after reconnect"));
|
|
188
|
+
await dispatchAndWait(server, storage, "conformance-revision-echo", "conformance.echo", { ok: !0 }, "completed", timeoutMs, "conformance-revision-1");
|
|
189
|
+
checks.push(createCheck("revision echo", !0, "workflowRevision echoed and accepted"));
|
|
187
190
|
const shutdownWorkerId = server.registry.getWorker(replacementWorkerId)?.id;
|
|
188
191
|
if (shutdownWorkerId === void 0)
|
|
189
192
|
throw Error("No worker available for graceful shutdown check");
|