@smthrs/flow 0.0.0-stage → 1.0.0-rc.4
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 +160 -0
- package/LICENSE +21 -0
- package/README.md +210 -2
- package/THIRD_PARTY_NOTICES.md +52 -0
- package/dist/cjs/Action/Action.d.ts +250 -0
- package/dist/cjs/Action/Action.d.ts.map +1 -0
- package/dist/cjs/Action/Action.js +42 -0
- package/dist/cjs/Action/Action.js.map +7 -0
- package/dist/cjs/Action/AttemptTimedOut.d.ts +33 -0
- package/dist/cjs/Action/AttemptTimedOut.d.ts.map +1 -0
- package/dist/cjs/Action/AttemptTimedOut.js +51 -0
- package/dist/cjs/Action/AttemptTimedOut.js.map +7 -0
- package/dist/cjs/Action/BoundaryMode.d.ts +29 -0
- package/dist/cjs/Action/BoundaryMode.d.ts.map +1 -0
- package/dist/cjs/Action/BoundaryMode.js +36 -0
- package/dist/cjs/Action/BoundaryMode.js.map +7 -0
- package/dist/cjs/Action/CacheEnvironment.d.ts +158 -0
- package/dist/cjs/Action/CacheEnvironment.d.ts.map +1 -0
- package/dist/cjs/Action/CacheEnvironment.js +57 -0
- package/dist/cjs/Action/CacheEnvironment.js.map +7 -0
- package/dist/cjs/Action/ConcurrentKeylessDispatch.d.ts +34 -0
- package/dist/cjs/Action/ConcurrentKeylessDispatch.d.ts.map +1 -0
- package/dist/cjs/Action/ConcurrentKeylessDispatch.js +46 -0
- package/dist/cjs/Action/ConcurrentKeylessDispatch.js.map +7 -0
- package/dist/cjs/Action/Context.d.ts +131 -0
- package/dist/cjs/Action/Context.d.ts.map +1 -0
- package/dist/cjs/Action/Context.js +68 -0
- package/dist/cjs/Action/Context.js.map +7 -0
- package/dist/cjs/Action/DuplicateImplementation.d.ts +20 -0
- package/dist/cjs/Action/DuplicateImplementation.d.ts.map +1 -0
- package/dist/cjs/Action/DuplicateImplementation.js +46 -0
- package/dist/cjs/Action/DuplicateImplementation.js.map +7 -0
- package/dist/cjs/Action/FileBoundary.d.ts +59 -0
- package/dist/cjs/Action/FileBoundary.d.ts.map +1 -0
- package/dist/cjs/Action/FileBoundary.js +81 -0
- package/dist/cjs/Action/FileBoundary.js.map +7 -0
- package/dist/cjs/Action/FileInput.d.ts +28 -0
- package/dist/cjs/Action/FileInput.d.ts.map +1 -0
- package/dist/cjs/Action/FileInput.js +42 -0
- package/dist/cjs/Action/FileInput.js.map +7 -0
- package/dist/cjs/Action/Filegroup.d.ts +16 -0
- package/dist/cjs/Action/Filegroup.d.ts.map +1 -0
- package/dist/cjs/Action/Filegroup.js +27 -0
- package/dist/cjs/Action/Filegroup.js.map +7 -0
- package/dist/cjs/Action/Glob.d.ts +8 -0
- package/dist/cjs/Action/Glob.d.ts.map +1 -0
- package/dist/cjs/Action/Glob.js +28 -0
- package/dist/cjs/Action/Glob.js.map +7 -0
- package/dist/cjs/Action/ImplementationVersionMismatch.d.ts +26 -0
- package/dist/cjs/Action/ImplementationVersionMismatch.d.ts.map +1 -0
- package/dist/cjs/Action/ImplementationVersionMismatch.js +45 -0
- package/dist/cjs/Action/ImplementationVersionMismatch.js.map +7 -0
- package/dist/cjs/Action/Implementations.d.ts +114 -0
- package/dist/cjs/Action/Implementations.d.ts.map +1 -0
- package/dist/cjs/Action/Implementations.js +65 -0
- package/dist/cjs/Action/Implementations.js.map +7 -0
- package/dist/cjs/Action/InfraInterrupt.d.ts +26 -0
- package/dist/cjs/Action/InfraInterrupt.d.ts.map +1 -0
- package/dist/cjs/Action/InfraInterrupt.js +46 -0
- package/dist/cjs/Action/InfraInterrupt.js.map +7 -0
- package/dist/cjs/Action/InfraInterruptRetriesExhausted.d.ts +33 -0
- package/dist/cjs/Action/InfraInterruptRetriesExhausted.d.ts.map +1 -0
- package/dist/cjs/Action/InfraInterruptRetriesExhausted.js +54 -0
- package/dist/cjs/Action/InfraInterruptRetriesExhausted.js.map +7 -0
- package/dist/cjs/Action/IrreversibleRetryRequiresIdempotencyKey.d.ts +26 -0
- package/dist/cjs/Action/IrreversibleRetryRequiresIdempotencyKey.d.ts.map +1 -0
- package/dist/cjs/Action/IrreversibleRetryRequiresIdempotencyKey.js +47 -0
- package/dist/cjs/Action/IrreversibleRetryRequiresIdempotencyKey.js.map +7 -0
- package/dist/cjs/Action/StepIdentity.d.ts +153 -0
- package/dist/cjs/Action/StepIdentity.d.ts.map +1 -0
- package/dist/cjs/Action/StepIdentity.js +75 -0
- package/dist/cjs/Action/StepIdentity.js.map +7 -0
- package/dist/cjs/Action/TreeArtifact.d.ts +8 -0
- package/dist/cjs/Action/TreeArtifact.d.ts.map +1 -0
- package/dist/cjs/Action/TreeArtifact.js +25 -0
- package/dist/cjs/Action/TreeArtifact.js.map +7 -0
- package/dist/cjs/Action/TypeId.d.ts +8 -0
- package/dist/cjs/Action/TypeId.d.ts.map +1 -0
- package/dist/cjs/Action/TypeId.js +25 -0
- package/dist/cjs/Action/TypeId.js.map +7 -0
- package/dist/cjs/Action/UncanonicalIdempotencyKey.d.ts +32 -0
- package/dist/cjs/Action/UncanonicalIdempotencyKey.d.ts.map +1 -0
- package/dist/cjs/Action/UncanonicalIdempotencyKey.js +51 -0
- package/dist/cjs/Action/UncanonicalIdempotencyKey.js.map +7 -0
- package/dist/cjs/Action/idempotencyKey.d.ts +21 -0
- package/dist/cjs/Action/idempotencyKey.d.ts.map +1 -0
- package/dist/cjs/Action/idempotencyKey.js +59 -0
- package/dist/cjs/Action/idempotencyKey.js.map +7 -0
- package/dist/cjs/Action/index.d.ts +29 -0
- package/dist/cjs/Action/index.d.ts.map +1 -0
- package/dist/cjs/Action/index.js +60 -0
- package/dist/cjs/Action/index.js.map +7 -0
- package/dist/cjs/Action/make.d.ts +128 -0
- package/dist/cjs/Action/make.d.ts.map +1 -0
- package/dist/cjs/Action/make.js +373 -0
- package/dist/cjs/Action/make.js.map +7 -0
- package/dist/cjs/Action/raceAll.d.ts +21 -0
- package/dist/cjs/Action/raceAll.d.ts.map +1 -0
- package/dist/cjs/Action/raceAll.js +46 -0
- package/dist/cjs/Action/raceAll.js.map +7 -0
- package/dist/cjs/Action/retry.d.ts +19 -0
- package/dist/cjs/Action/retry.d.ts.map +1 -0
- package/dist/cjs/Action/retry.js +75 -0
- package/dist/cjs/Action/retry.js.map +7 -0
- package/dist/cjs/Deadline.d.ts +105 -0
- package/dist/cjs/Deadline.d.ts.map +1 -0
- package/dist/cjs/Deadline.js +104 -0
- package/dist/cjs/Deadline.js.map +7 -0
- package/dist/cjs/DurableClock.d.ts +61 -0
- package/dist/cjs/DurableClock.d.ts.map +1 -0
- package/dist/cjs/DurableClock.js +90 -0
- package/dist/cjs/DurableClock.js.map +7 -0
- package/dist/cjs/DurableDeferred.d.ts +311 -0
- package/dist/cjs/DurableDeferred.d.ts.map +1 -0
- package/dist/cjs/DurableDeferred.js +322 -0
- package/dist/cjs/DurableDeferred.js.map +7 -0
- package/dist/cjs/DurableQueue.d.ts +160 -0
- package/dist/cjs/DurableQueue.d.ts.map +1 -0
- package/dist/cjs/DurableQueue.js +229 -0
- package/dist/cjs/DurableQueue.js.map +7 -0
- package/dist/cjs/ExternalJob.d.ts +179 -0
- package/dist/cjs/ExternalJob.d.ts.map +1 -0
- package/dist/cjs/ExternalJob.js +338 -0
- package/dist/cjs/ExternalJob.js.map +7 -0
- package/dist/cjs/Fault.d.ts +131 -0
- package/dist/cjs/Fault.d.ts.map +1 -0
- package/dist/cjs/Fault.js +157 -0
- package/dist/cjs/Fault.js.map +7 -0
- package/dist/cjs/Flow/Annotations.d.ts +245 -0
- package/dist/cjs/Flow/Annotations.d.ts.map +1 -0
- package/dist/cjs/Flow/Annotations.js +72 -0
- package/dist/cjs/Flow/Annotations.js.map +7 -0
- package/dist/cjs/Flow/CapabilityCeiling.d.ts +21 -0
- package/dist/cjs/Flow/CapabilityCeiling.d.ts.map +1 -0
- package/dist/cjs/Flow/CapabilityCeiling.js +49 -0
- package/dist/cjs/Flow/CapabilityCeiling.js.map +7 -0
- package/dist/cjs/Flow/DeadlineExceeded.d.ts +33 -0
- package/dist/cjs/Flow/DeadlineExceeded.d.ts.map +1 -0
- package/dist/cjs/Flow/DeadlineExceeded.js +52 -0
- package/dist/cjs/Flow/DeadlineExceeded.js.map +7 -0
- package/dist/cjs/Flow/ExecutionIdRequired.d.ts +25 -0
- package/dist/cjs/Flow/ExecutionIdRequired.d.ts.map +1 -0
- package/dist/cjs/Flow/ExecutionIdRequired.js +46 -0
- package/dist/cjs/Flow/ExecutionIdRequired.js.map +7 -0
- package/dist/cjs/Flow/ExecutionIds.d.ts +80 -0
- package/dist/cjs/Flow/ExecutionIds.d.ts.map +1 -0
- package/dist/cjs/Flow/ExecutionIds.js +66 -0
- package/dist/cjs/Flow/ExecutionIds.js.map +7 -0
- package/dist/cjs/Flow/Flow.d.ts +422 -0
- package/dist/cjs/Flow/Flow.d.ts.map +1 -0
- package/dist/cjs/Flow/Flow.js +17 -0
- package/dist/cjs/Flow/Flow.js.map +7 -0
- package/dist/cjs/Flow/MaxRoundsExceeded.d.ts +35 -0
- package/dist/cjs/Flow/MaxRoundsExceeded.d.ts.map +1 -0
- package/dist/cjs/Flow/MaxRoundsExceeded.js +50 -0
- package/dist/cjs/Flow/MaxRoundsExceeded.js.map +7 -0
- package/dist/cjs/Flow/Outcome.d.ts +162 -0
- package/dist/cjs/Flow/Outcome.d.ts.map +1 -0
- package/dist/cjs/Flow/Outcome.js +80 -0
- package/dist/cjs/Flow/Outcome.js.map +7 -0
- package/dist/cjs/Flow/Result.d.ts +186 -0
- package/dist/cjs/Flow/Result.d.ts.map +1 -0
- package/dist/cjs/Flow/Result.js +159 -0
- package/dist/cjs/Flow/Result.js.map +7 -0
- package/dist/cjs/Flow/Runtime.d.ts +98 -0
- package/dist/cjs/Flow/Runtime.d.ts.map +1 -0
- package/dist/cjs/Flow/Runtime.js +160 -0
- package/dist/cjs/Flow/Runtime.js.map +7 -0
- package/dist/cjs/Flow/TypeId.d.ts +8 -0
- package/dist/cjs/Flow/TypeId.d.ts.map +1 -0
- package/dist/cjs/Flow/TypeId.js +25 -0
- package/dist/cjs/Flow/TypeId.js.map +7 -0
- package/dist/cjs/Flow/index.d.ts +17 -0
- package/dist/cjs/Flow/index.d.ts.map +1 -0
- package/dist/cjs/Flow/index.js +29 -0
- package/dist/cjs/Flow/index.js.map +7 -0
- package/dist/cjs/Flow/internal.d.ts +34 -0
- package/dist/cjs/Flow/internal.d.ts.map +1 -0
- package/dist/cjs/Flow/internal.js +187 -0
- package/dist/cjs/Flow/internal.js.map +7 -0
- package/dist/cjs/Flow/make.d.ts +134 -0
- package/dist/cjs/Flow/make.d.ts.map +1 -0
- package/dist/cjs/Flow/make.js +104 -0
- package/dist/cjs/Flow/make.js.map +7 -0
- package/dist/cjs/FlowRuntime/CancelRequestFailed.d.ts +55 -0
- package/dist/cjs/FlowRuntime/CancelRequestFailed.d.ts.map +1 -0
- package/dist/cjs/FlowRuntime/CancelRequestFailed.js +51 -0
- package/dist/cjs/FlowRuntime/CancelRequestFailed.js.map +7 -0
- package/dist/cjs/FlowRuntime/ExecutionIdentityConflict.d.ts +23 -0
- package/dist/cjs/FlowRuntime/ExecutionIdentityConflict.d.ts.map +1 -0
- package/dist/cjs/FlowRuntime/ExecutionIdentityConflict.js +55 -0
- package/dist/cjs/FlowRuntime/ExecutionIdentityConflict.js.map +7 -0
- package/dist/cjs/FlowRuntime/FlowCycleDetected.d.ts +28 -0
- package/dist/cjs/FlowRuntime/FlowCycleDetected.d.ts.map +1 -0
- package/dist/cjs/FlowRuntime/FlowCycleDetected.js +49 -0
- package/dist/cjs/FlowRuntime/FlowCycleDetected.js.map +7 -0
- package/dist/cjs/FlowRuntime/FlowExecutionNotFound.d.ts +38 -0
- package/dist/cjs/FlowRuntime/FlowExecutionNotFound.d.ts.map +1 -0
- package/dist/cjs/FlowRuntime/FlowExecutionNotFound.js +53 -0
- package/dist/cjs/FlowRuntime/FlowExecutionNotFound.js.map +7 -0
- package/dist/cjs/FlowRuntime/FlowInstance.d.ts +115 -0
- package/dist/cjs/FlowRuntime/FlowInstance.d.ts.map +1 -0
- package/dist/cjs/FlowRuntime/FlowInstance.js +37 -0
- package/dist/cjs/FlowRuntime/FlowInstance.js.map +7 -0
- package/dist/cjs/FlowRuntime/FlowRuntime.d.ts +198 -0
- package/dist/cjs/FlowRuntime/FlowRuntime.d.ts.map +1 -0
- package/dist/cjs/FlowRuntime/FlowRuntime.js +37 -0
- package/dist/cjs/FlowRuntime/FlowRuntime.js.map +7 -0
- package/dist/cjs/FlowRuntime/NodeRecord.d.ts +175 -0
- package/dist/cjs/FlowRuntime/NodeRecord.d.ts.map +1 -0
- package/dist/cjs/FlowRuntime/NodeRecord.js +17 -0
- package/dist/cjs/FlowRuntime/NodeRecord.js.map +7 -0
- package/dist/cjs/FlowRuntime/WaitingAnnotation.d.ts +69 -0
- package/dist/cjs/FlowRuntime/WaitingAnnotation.d.ts.map +1 -0
- package/dist/cjs/FlowRuntime/WaitingAnnotation.js +53 -0
- package/dist/cjs/FlowRuntime/WaitingAnnotation.js.map +7 -0
- package/dist/cjs/FlowRuntime/index.d.ts +14 -0
- package/dist/cjs/FlowRuntime/index.d.ts.map +1 -0
- package/dist/cjs/FlowRuntime/index.js +26 -0
- package/dist/cjs/FlowRuntime/index.js.map +7 -0
- package/dist/cjs/Graph.d.ts +325 -0
- package/dist/cjs/Graph.d.ts.map +1 -0
- package/dist/cjs/Graph.js +1021 -0
- package/dist/cjs/Graph.js.map +7 -0
- package/dist/cjs/HumanTask.d.ts +440 -0
- package/dist/cjs/HumanTask.d.ts.map +1 -0
- package/dist/cjs/HumanTask.js +413 -0
- package/dist/cjs/HumanTask.js.map +7 -0
- package/dist/cjs/Interpreter.d.ts +222 -0
- package/dist/cjs/Interpreter.d.ts.map +1 -0
- package/dist/cjs/Interpreter.js +888 -0
- package/dist/cjs/Interpreter.js.map +7 -0
- package/dist/cjs/Poll.d.ts +238 -0
- package/dist/cjs/Poll.d.ts.map +1 -0
- package/dist/cjs/Poll.js +150 -0
- package/dist/cjs/Poll.js.map +7 -0
- package/dist/cjs/RetryPolicy.d.ts +273 -0
- package/dist/cjs/RetryPolicy.d.ts.map +1 -0
- package/dist/cjs/RetryPolicy.js +251 -0
- package/dist/cjs/RetryPolicy.js.map +7 -0
- package/dist/cjs/Sleep.d.ts +98 -0
- package/dist/cjs/Sleep.d.ts.map +1 -0
- package/dist/cjs/Sleep.js +133 -0
- package/dist/cjs/Sleep.js.map +7 -0
- package/dist/cjs/Stall.d.ts +173 -0
- package/dist/cjs/Stall.d.ts.map +1 -0
- package/dist/cjs/Stall.js +92 -0
- package/dist/cjs/Stall.js.map +7 -0
- package/dist/cjs/WaitFor.d.ts +109 -0
- package/dist/cjs/WaitFor.d.ts.map +1 -0
- package/dist/cjs/WaitFor.js +117 -0
- package/dist/cjs/WaitFor.js.map +7 -0
- package/dist/cjs/index.d.ts +107 -0
- package/dist/cjs/index.d.ts.map +1 -0
- package/dist/cjs/index.js +69 -0
- package/dist/cjs/index.js.map +7 -0
- package/dist/cjs/internal/BoundedJson.d.ts +48 -0
- package/dist/cjs/internal/BoundedJson.d.ts.map +1 -0
- package/dist/cjs/internal/BoundedJson.js +96 -0
- package/dist/cjs/internal/BoundedJson.js.map +7 -0
- package/dist/cjs/internal/DeclarationSite.d.ts +135 -0
- package/dist/cjs/internal/DeclarationSite.d.ts.map +1 -0
- package/dist/cjs/internal/DeclarationSite.js +89 -0
- package/dist/cjs/internal/DeclarationSite.js.map +7 -0
- package/dist/cjs/internal/Declarations.d.ts +35 -0
- package/dist/cjs/internal/Declarations.d.ts.map +1 -0
- package/dist/cjs/internal/Declarations.js +50 -0
- package/dist/cjs/internal/Declarations.js.map +7 -0
- package/dist/cjs/internal/ExecutionMiddleware.d.ts +21 -0
- package/dist/cjs/internal/ExecutionMiddleware.d.ts.map +1 -0
- package/dist/cjs/internal/ExecutionMiddleware.js +39 -0
- package/dist/cjs/internal/ExecutionMiddleware.js.map +7 -0
- package/dist/cjs/internal/JsonSchemaSubset.d.ts +133 -0
- package/dist/cjs/internal/JsonSchemaSubset.d.ts.map +1 -0
- package/dist/cjs/internal/JsonSchemaSubset.js +229 -0
- package/dist/cjs/internal/JsonSchemaSubset.js.map +7 -0
- package/dist/cjs/internal/OutcomeMarker.d.ts +18 -0
- package/dist/cjs/internal/OutcomeMarker.d.ts.map +1 -0
- package/dist/cjs/internal/OutcomeMarker.js +27 -0
- package/dist/cjs/internal/OutcomeMarker.js.map +7 -0
- package/dist/cjs/package.json +1 -0
- package/dist/esm/Action/Action.d.ts +250 -0
- package/dist/esm/Action/Action.d.ts.map +1 -0
- package/dist/esm/Action/Action.js +30 -0
- package/dist/esm/Action/Action.js.map +1 -0
- package/dist/esm/Action/AttemptTimedOut.d.ts +33 -0
- package/dist/esm/Action/AttemptTimedOut.d.ts.map +1 -0
- package/dist/esm/Action/AttemptTimedOut.js +32 -0
- package/dist/esm/Action/AttemptTimedOut.js.map +1 -0
- package/dist/esm/Action/BoundaryMode.d.ts +29 -0
- package/dist/esm/Action/BoundaryMode.d.ts.map +1 -0
- package/dist/esm/Action/BoundaryMode.js +23 -0
- package/dist/esm/Action/BoundaryMode.js.map +1 -0
- package/dist/esm/Action/CacheEnvironment.d.ts +158 -0
- package/dist/esm/Action/CacheEnvironment.d.ts.map +1 -0
- package/dist/esm/Action/CacheEnvironment.js +130 -0
- package/dist/esm/Action/CacheEnvironment.js.map +1 -0
- package/dist/esm/Action/ConcurrentKeylessDispatch.d.ts +34 -0
- package/dist/esm/Action/ConcurrentKeylessDispatch.d.ts.map +1 -0
- package/dist/esm/Action/ConcurrentKeylessDispatch.js +33 -0
- package/dist/esm/Action/ConcurrentKeylessDispatch.js.map +1 -0
- package/dist/esm/Action/Context.d.ts +131 -0
- package/dist/esm/Action/Context.d.ts.map +1 -0
- package/dist/esm/Action/Context.js +99 -0
- package/dist/esm/Action/Context.js.map +1 -0
- package/dist/esm/Action/DuplicateImplementation.d.ts +20 -0
- package/dist/esm/Action/DuplicateImplementation.d.ts.map +1 -0
- package/dist/esm/Action/DuplicateImplementation.js +20 -0
- package/dist/esm/Action/DuplicateImplementation.js.map +1 -0
- package/dist/esm/Action/FileBoundary.d.ts +59 -0
- package/dist/esm/Action/FileBoundary.d.ts.map +1 -0
- package/dist/esm/Action/FileBoundary.js +60 -0
- package/dist/esm/Action/FileBoundary.js.map +1 -0
- package/dist/esm/Action/FileInput.d.ts +28 -0
- package/dist/esm/Action/FileInput.d.ts.map +1 -0
- package/dist/esm/Action/FileInput.js +32 -0
- package/dist/esm/Action/FileInput.js.map +1 -0
- package/dist/esm/Action/Filegroup.d.ts +16 -0
- package/dist/esm/Action/Filegroup.d.ts.map +1 -0
- package/dist/esm/Action/Filegroup.js +15 -0
- package/dist/esm/Action/Filegroup.js.map +1 -0
- package/dist/esm/Action/Glob.d.ts +8 -0
- package/dist/esm/Action/Glob.d.ts.map +1 -0
- package/dist/esm/Action/Glob.js +7 -0
- package/dist/esm/Action/Glob.js.map +1 -0
- package/dist/esm/Action/ImplementationVersionMismatch.d.ts +26 -0
- package/dist/esm/Action/ImplementationVersionMismatch.d.ts.map +1 -0
- package/dist/esm/Action/ImplementationVersionMismatch.js +24 -0
- package/dist/esm/Action/ImplementationVersionMismatch.js.map +1 -0
- package/dist/esm/Action/Implementations.d.ts +114 -0
- package/dist/esm/Action/Implementations.d.ts.map +1 -0
- package/dist/esm/Action/Implementations.js +94 -0
- package/dist/esm/Action/Implementations.js.map +1 -0
- package/dist/esm/Action/InfraInterrupt.d.ts +26 -0
- package/dist/esm/Action/InfraInterrupt.d.ts.map +1 -0
- package/dist/esm/Action/InfraInterrupt.js +25 -0
- package/dist/esm/Action/InfraInterrupt.js.map +1 -0
- package/dist/esm/Action/InfraInterruptRetriesExhausted.d.ts +33 -0
- package/dist/esm/Action/InfraInterruptRetriesExhausted.d.ts.map +1 -0
- package/dist/esm/Action/InfraInterruptRetriesExhausted.js +32 -0
- package/dist/esm/Action/InfraInterruptRetriesExhausted.js.map +1 -0
- package/dist/esm/Action/IrreversibleRetryRequiresIdempotencyKey.d.ts +26 -0
- package/dist/esm/Action/IrreversibleRetryRequiresIdempotencyKey.d.ts.map +1 -0
- package/dist/esm/Action/IrreversibleRetryRequiresIdempotencyKey.js +25 -0
- package/dist/esm/Action/IrreversibleRetryRequiresIdempotencyKey.js.map +1 -0
- package/dist/esm/Action/StepIdentity.d.ts +153 -0
- package/dist/esm/Action/StepIdentity.d.ts.map +1 -0
- package/dist/esm/Action/StepIdentity.js +139 -0
- package/dist/esm/Action/StepIdentity.js.map +1 -0
- package/dist/esm/Action/TreeArtifact.d.ts +8 -0
- package/dist/esm/Action/TreeArtifact.d.ts.map +1 -0
- package/dist/esm/Action/TreeArtifact.js +7 -0
- package/dist/esm/Action/TreeArtifact.js.map +1 -0
- package/dist/esm/Action/TypeId.d.ts +8 -0
- package/dist/esm/Action/TypeId.d.ts.map +1 -0
- package/dist/esm/Action/TypeId.js +9 -0
- package/dist/esm/Action/TypeId.js.map +1 -0
- package/dist/esm/Action/UncanonicalIdempotencyKey.d.ts +32 -0
- package/dist/esm/Action/UncanonicalIdempotencyKey.d.ts.map +1 -0
- package/dist/esm/Action/UncanonicalIdempotencyKey.js +31 -0
- package/dist/esm/Action/UncanonicalIdempotencyKey.js.map +1 -0
- package/dist/esm/Action/idempotencyKey.d.ts +21 -0
- package/dist/esm/Action/idempotencyKey.d.ts.map +1 -0
- package/dist/esm/Action/idempotencyKey.js +50 -0
- package/dist/esm/Action/idempotencyKey.js.map +1 -0
- package/dist/esm/Action/index.d.ts +29 -0
- package/dist/esm/Action/index.d.ts.map +1 -0
- package/dist/esm/Action/index.js +30 -0
- package/dist/esm/Action/index.js.map +1 -0
- package/dist/esm/Action/make.d.ts +128 -0
- package/dist/esm/Action/make.d.ts.map +1 -0
- package/dist/esm/Action/make.js +405 -0
- package/dist/esm/Action/make.js.map +1 -0
- package/dist/esm/Action/raceAll.d.ts +21 -0
- package/dist/esm/Action/raceAll.d.ts.map +1 -0
- package/dist/esm/Action/raceAll.js +20 -0
- package/dist/esm/Action/raceAll.js.map +1 -0
- package/dist/esm/Action/retry.d.ts +19 -0
- package/dist/esm/Action/retry.d.ts.map +1 -0
- package/dist/esm/Action/retry.js +72 -0
- package/dist/esm/Action/retry.js.map +1 -0
- package/dist/esm/Deadline.d.ts +105 -0
- package/dist/esm/Deadline.d.ts.map +1 -0
- package/dist/esm/Deadline.js +152 -0
- package/dist/esm/Deadline.js.map +1 -0
- package/dist/esm/DurableClock.d.ts +61 -0
- package/dist/esm/DurableClock.d.ts.map +1 -0
- package/dist/esm/DurableClock.js +75 -0
- package/dist/esm/DurableClock.js.map +1 -0
- package/dist/esm/DurableDeferred.d.ts +311 -0
- package/dist/esm/DurableDeferred.d.ts.map +1 -0
- package/dist/esm/DurableDeferred.js +357 -0
- package/dist/esm/DurableDeferred.js.map +1 -0
- package/dist/esm/DurableQueue.d.ts +160 -0
- package/dist/esm/DurableQueue.d.ts.map +1 -0
- package/dist/esm/DurableQueue.js +303 -0
- package/dist/esm/DurableQueue.js.map +1 -0
- package/dist/esm/ExternalJob.d.ts +179 -0
- package/dist/esm/ExternalJob.d.ts.map +1 -0
- package/dist/esm/ExternalJob.js +296 -0
- package/dist/esm/ExternalJob.js.map +1 -0
- package/dist/esm/Fault.d.ts +131 -0
- package/dist/esm/Fault.d.ts.map +1 -0
- package/dist/esm/Fault.js +198 -0
- package/dist/esm/Fault.js.map +1 -0
- package/dist/esm/Flow/Annotations.d.ts +245 -0
- package/dist/esm/Flow/Annotations.d.ts.map +1 -0
- package/dist/esm/Flow/Annotations.js +110 -0
- package/dist/esm/Flow/Annotations.js.map +1 -0
- package/dist/esm/Flow/CapabilityCeiling.d.ts +21 -0
- package/dist/esm/Flow/CapabilityCeiling.d.ts.map +1 -0
- package/dist/esm/Flow/CapabilityCeiling.js +27 -0
- package/dist/esm/Flow/CapabilityCeiling.js.map +1 -0
- package/dist/esm/Flow/DeadlineExceeded.d.ts +33 -0
- package/dist/esm/Flow/DeadlineExceeded.d.ts.map +1 -0
- package/dist/esm/Flow/DeadlineExceeded.js +34 -0
- package/dist/esm/Flow/DeadlineExceeded.js.map +1 -0
- package/dist/esm/Flow/ExecutionIdRequired.d.ts +25 -0
- package/dist/esm/Flow/ExecutionIdRequired.d.ts.map +1 -0
- package/dist/esm/Flow/ExecutionIdRequired.js +30 -0
- package/dist/esm/Flow/ExecutionIdRequired.js.map +1 -0
- package/dist/esm/Flow/ExecutionIds.d.ts +80 -0
- package/dist/esm/Flow/ExecutionIds.d.ts.map +1 -0
- package/dist/esm/Flow/ExecutionIds.js +91 -0
- package/dist/esm/Flow/ExecutionIds.js.map +1 -0
- package/dist/esm/Flow/Flow.d.ts +422 -0
- package/dist/esm/Flow/Flow.d.ts.map +1 -0
- package/dist/esm/Flow/Flow.js +3 -0
- package/dist/esm/Flow/Flow.js.map +1 -0
- package/dist/esm/Flow/MaxRoundsExceeded.d.ts +35 -0
- package/dist/esm/Flow/MaxRoundsExceeded.d.ts.map +1 -0
- package/dist/esm/Flow/MaxRoundsExceeded.js +34 -0
- package/dist/esm/Flow/MaxRoundsExceeded.js.map +1 -0
- package/dist/esm/Flow/Outcome.d.ts +162 -0
- package/dist/esm/Flow/Outcome.d.ts.map +1 -0
- package/dist/esm/Flow/Outcome.js +115 -0
- package/dist/esm/Flow/Outcome.js.map +1 -0
- package/dist/esm/Flow/Result.d.ts +186 -0
- package/dist/esm/Flow/Result.d.ts.map +1 -0
- package/dist/esm/Flow/Result.js +171 -0
- package/dist/esm/Flow/Result.js.map +1 -0
- package/dist/esm/Flow/Runtime.d.ts +98 -0
- package/dist/esm/Flow/Runtime.d.ts.map +1 -0
- package/dist/esm/Flow/Runtime.js +231 -0
- package/dist/esm/Flow/Runtime.js.map +1 -0
- package/dist/esm/Flow/TypeId.d.ts +8 -0
- package/dist/esm/Flow/TypeId.d.ts.map +1 -0
- package/dist/esm/Flow/TypeId.js +9 -0
- package/dist/esm/Flow/TypeId.js.map +1 -0
- package/dist/esm/Flow/index.d.ts +17 -0
- package/dist/esm/Flow/index.d.ts.map +1 -0
- package/dist/esm/Flow/index.js +18 -0
- package/dist/esm/Flow/index.js.map +1 -0
- package/dist/esm/Flow/internal.d.ts +34 -0
- package/dist/esm/Flow/internal.d.ts.map +1 -0
- package/dist/esm/Flow/internal.js +149 -0
- package/dist/esm/Flow/internal.js.map +1 -0
- package/dist/esm/Flow/make.d.ts +134 -0
- package/dist/esm/Flow/make.d.ts.map +1 -0
- package/dist/esm/Flow/make.js +106 -0
- package/dist/esm/Flow/make.js.map +1 -0
- package/dist/esm/FlowRuntime/CancelRequestFailed.d.ts +55 -0
- package/dist/esm/FlowRuntime/CancelRequestFailed.d.ts.map +1 -0
- package/dist/esm/FlowRuntime/CancelRequestFailed.js +53 -0
- package/dist/esm/FlowRuntime/CancelRequestFailed.js.map +1 -0
- package/dist/esm/FlowRuntime/ExecutionIdentityConflict.d.ts +23 -0
- package/dist/esm/FlowRuntime/ExecutionIdentityConflict.d.ts.map +1 -0
- package/dist/esm/FlowRuntime/ExecutionIdentityConflict.js +24 -0
- package/dist/esm/FlowRuntime/ExecutionIdentityConflict.js.map +1 -0
- package/dist/esm/FlowRuntime/FlowCycleDetected.d.ts +28 -0
- package/dist/esm/FlowRuntime/FlowCycleDetected.d.ts.map +1 -0
- package/dist/esm/FlowRuntime/FlowCycleDetected.js +35 -0
- package/dist/esm/FlowRuntime/FlowCycleDetected.js.map +1 -0
- package/dist/esm/FlowRuntime/FlowExecutionNotFound.d.ts +38 -0
- package/dist/esm/FlowRuntime/FlowExecutionNotFound.d.ts.map +1 -0
- package/dist/esm/FlowRuntime/FlowExecutionNotFound.js +40 -0
- package/dist/esm/FlowRuntime/FlowExecutionNotFound.js.map +1 -0
- package/dist/esm/FlowRuntime/FlowInstance.d.ts +115 -0
- package/dist/esm/FlowRuntime/FlowInstance.d.ts.map +1 -0
- package/dist/esm/FlowRuntime/FlowInstance.js +24 -0
- package/dist/esm/FlowRuntime/FlowInstance.js.map +1 -0
- package/dist/esm/FlowRuntime/FlowRuntime.d.ts +198 -0
- package/dist/esm/FlowRuntime/FlowRuntime.d.ts.map +1 -0
- package/dist/esm/FlowRuntime/FlowRuntime.js +34 -0
- package/dist/esm/FlowRuntime/FlowRuntime.js.map +1 -0
- package/dist/esm/FlowRuntime/NodeRecord.d.ts +175 -0
- package/dist/esm/FlowRuntime/NodeRecord.d.ts.map +1 -0
- package/dist/esm/FlowRuntime/NodeRecord.js +21 -0
- package/dist/esm/FlowRuntime/NodeRecord.js.map +1 -0
- package/dist/esm/FlowRuntime/WaitingAnnotation.d.ts +69 -0
- package/dist/esm/FlowRuntime/WaitingAnnotation.d.ts.map +1 -0
- package/dist/esm/FlowRuntime/WaitingAnnotation.js +53 -0
- package/dist/esm/FlowRuntime/WaitingAnnotation.js.map +1 -0
- package/dist/esm/FlowRuntime/index.d.ts +14 -0
- package/dist/esm/FlowRuntime/index.d.ts.map +1 -0
- package/dist/esm/FlowRuntime/index.js +15 -0
- package/dist/esm/FlowRuntime/index.js.map +1 -0
- package/dist/esm/Graph.d.ts +325 -0
- package/dist/esm/Graph.d.ts.map +1 -0
- package/dist/esm/Graph.js +1483 -0
- package/dist/esm/Graph.js.map +1 -0
- package/dist/esm/HumanTask.d.ts +440 -0
- package/dist/esm/HumanTask.d.ts.map +1 -0
- package/dist/esm/HumanTask.js +794 -0
- package/dist/esm/HumanTask.js.map +1 -0
- package/dist/esm/Interpreter.d.ts +222 -0
- package/dist/esm/Interpreter.d.ts.map +1 -0
- package/dist/esm/Interpreter.js +1269 -0
- package/dist/esm/Interpreter.js.map +1 -0
- package/dist/esm/Poll.d.ts +238 -0
- package/dist/esm/Poll.d.ts.map +1 -0
- package/dist/esm/Poll.js +282 -0
- package/dist/esm/Poll.js.map +1 -0
- package/dist/esm/RetryPolicy.d.ts +273 -0
- package/dist/esm/RetryPolicy.d.ts.map +1 -0
- package/dist/esm/RetryPolicy.js +429 -0
- package/dist/esm/RetryPolicy.js.map +1 -0
- package/dist/esm/Sleep.d.ts +98 -0
- package/dist/esm/Sleep.d.ts.map +1 -0
- package/dist/esm/Sleep.js +230 -0
- package/dist/esm/Sleep.js.map +1 -0
- package/dist/esm/Stall.d.ts +173 -0
- package/dist/esm/Stall.d.ts.map +1 -0
- package/dist/esm/Stall.js +138 -0
- package/dist/esm/Stall.js.map +1 -0
- package/dist/esm/WaitFor.d.ts +109 -0
- package/dist/esm/WaitFor.d.ts.map +1 -0
- package/dist/esm/WaitFor.js +184 -0
- package/dist/esm/WaitFor.js.map +1 -0
- package/dist/esm/index.d.ts +107 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +108 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/internal/BoundedJson.d.ts +48 -0
- package/dist/esm/internal/BoundedJson.d.ts.map +1 -0
- package/dist/esm/internal/BoundedJson.js +107 -0
- package/dist/esm/internal/BoundedJson.js.map +1 -0
- package/dist/esm/internal/DeclarationSite.d.ts +135 -0
- package/dist/esm/internal/DeclarationSite.d.ts.map +1 -0
- package/dist/esm/internal/DeclarationSite.js +196 -0
- package/dist/esm/internal/DeclarationSite.js.map +1 -0
- package/dist/esm/internal/Declarations.d.ts +35 -0
- package/dist/esm/internal/Declarations.d.ts.map +1 -0
- package/dist/esm/internal/Declarations.js +43 -0
- package/dist/esm/internal/Declarations.js.map +1 -0
- package/dist/esm/internal/ExecutionMiddleware.d.ts +21 -0
- package/dist/esm/internal/ExecutionMiddleware.d.ts.map +1 -0
- package/dist/esm/internal/ExecutionMiddleware.js +13 -0
- package/dist/esm/internal/ExecutionMiddleware.js.map +1 -0
- package/dist/esm/internal/JsonSchemaSubset.d.ts +133 -0
- package/dist/esm/internal/JsonSchemaSubset.d.ts.map +1 -0
- package/dist/esm/internal/JsonSchemaSubset.js +363 -0
- package/dist/esm/internal/JsonSchemaSubset.js.map +1 -0
- package/dist/esm/internal/OutcomeMarker.d.ts +18 -0
- package/dist/esm/internal/OutcomeMarker.d.ts.map +1 -0
- package/dist/esm/internal/OutcomeMarker.js +18 -0
- package/dist/esm/internal/OutcomeMarker.js.map +1 -0
- package/docs/README.md +150 -0
- package/docs/api.md +436 -0
- package/docs/concepts/bodies-and-plans.md +157 -0
- package/docs/concepts/execution-identity.md +142 -0
- package/docs/concepts/flows-and-actions.md +129 -0
- package/docs/concepts/suspension-and-replay.md +130 -0
- package/docs/concepts/the-runtime-port.md +110 -0
- package/docs/concepts/trampoline-rounds.md +151 -0
- package/docs/guides/ask-a-person.md +184 -0
- package/docs/guides/build-a-body.md +161 -0
- package/docs/guides/cancel-and-roll-back.md +112 -0
- package/docs/guides/implement-an-action.md +147 -0
- package/docs/guides/inspect-the-plan.md +154 -0
- package/docs/guides/poll-until-ready.md +167 -0
- package/docs/guides/queue-work-to-a-worker.md +122 -0
- package/docs/guides/retry-a-failing-action.md +243 -0
- package/docs/guides/reuse-a-recorded-result.md +122 -0
- package/docs/guides/run-a-child-flow.md +108 -0
- package/docs/guides/run-an-external-job.md +86 -0
- package/docs/guides/use-a-prompt.md +38 -0
- package/docs/guides/wait-for-a-deadline.md +141 -0
- package/docs/guides/wait-for-an-external-signal.md +151 -0
- package/docs/installation.md +82 -0
- package/docs/quickstart.md +155 -0
- package/docs/reference/flow.md +1831 -0
- package/docs/testing.md +157 -0
- package/docs/troubleshooting.md +286 -0
- package/package.json +327 -3
- package/src/Action/Action.ts +333 -0
- package/src/Action/AttemptTimedOut.ts +37 -0
- package/src/Action/BoundaryMode.ts +33 -0
- package/src/Action/CacheEnvironment.ts +170 -0
- package/src/Action/ConcurrentKeylessDispatch.ts +38 -0
- package/src/Action/Context.ts +156 -0
- package/src/Action/DuplicateImplementation.ts +24 -0
- package/src/Action/FileBoundary.ts +77 -0
- package/src/Action/FileInput.ts +42 -0
- package/src/Action/Filegroup.ts +16 -0
- package/src/Action/Glob.ts +8 -0
- package/src/Action/ImplementationVersionMismatch.ts +27 -0
- package/src/Action/Implementations.ts +149 -0
- package/src/Action/InfraInterrupt.ts +30 -0
- package/src/Action/InfraInterruptRetriesExhausted.ts +37 -0
- package/src/Action/IrreversibleRetryRequiresIdempotencyKey.ts +32 -0
- package/src/Action/StepIdentity.ts +219 -0
- package/src/Action/TreeArtifact.ts +8 -0
- package/src/Action/TypeId.ts +9 -0
- package/src/Action/UncanonicalIdempotencyKey.ts +36 -0
- package/src/Action/idempotencyKey.ts +67 -0
- package/src/Action/index.ts +31 -0
- package/src/Action/make.ts +657 -0
- package/src/Action/raceAll.ts +48 -0
- package/src/Action/retry.ts +92 -0
- package/src/Deadline.ts +185 -0
- package/src/DurableClock.ts +133 -0
- package/src/DurableDeferred.ts +753 -0
- package/src/DurableQueue.ts +519 -0
- package/src/ExternalJob.ts +432 -0
- package/src/Fault.ts +279 -0
- package/src/Flow/Annotations.ts +151 -0
- package/src/Flow/CapabilityCeiling.ts +37 -0
- package/src/Flow/DeadlineExceeded.ts +40 -0
- package/src/Flow/ExecutionIdRequired.ts +36 -0
- package/src/Flow/ExecutionIds.ts +133 -0
- package/src/Flow/Flow.ts +576 -0
- package/src/Flow/MaxRoundsExceeded.ts +39 -0
- package/src/Flow/Outcome.ts +179 -0
- package/src/Flow/Result.ts +284 -0
- package/src/Flow/Runtime.ts +309 -0
- package/src/Flow/TypeId.ts +9 -0
- package/src/Flow/index.ts +19 -0
- package/src/Flow/internal.ts +237 -0
- package/src/Flow/make.ts +279 -0
- package/src/FlowRuntime/CancelRequestFailed.ts +56 -0
- package/src/FlowRuntime/ExecutionIdentityConflict.ts +32 -0
- package/src/FlowRuntime/FlowCycleDetected.ts +41 -0
- package/src/FlowRuntime/FlowExecutionNotFound.ts +46 -0
- package/src/FlowRuntime/FlowInstance.ts +128 -0
- package/src/FlowRuntime/FlowRuntime.ts +333 -0
- package/src/FlowRuntime/NodeRecord.ts +183 -0
- package/src/FlowRuntime/WaitingAnnotation.ts +85 -0
- package/src/FlowRuntime/index.ts +17 -0
- package/src/Graph.ts +1862 -0
- package/src/HumanTask.ts +1003 -0
- package/src/Interpreter.ts +1593 -0
- package/src/Poll.ts +414 -0
- package/src/RetryPolicy.ts +550 -0
- package/src/Sleep.ts +267 -0
- package/src/Stall.ts +217 -0
- package/src/WaitFor.ts +228 -0
- package/src/index.ts +125 -0
- package/src/internal/BoundedJson.ts +109 -0
- package/src/internal/DeclarationSite.ts +214 -0
- package/src/internal/Declarations.ts +49 -0
- package/src/internal/ExecutionMiddleware.ts +29 -0
- package/src/internal/JsonSchemaSubset.ts +392 -0
- package/src/internal/OutcomeMarker.ts +19 -0
package/docs/testing.md
ADDED
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Testing"
|
|
3
|
+
description: "Assert a body's topology without an engine, run a flow on the in-memory engine, prove a step replayed, drive a suspension with a test clock, and pin step identity."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Flows are testable at three levels, and picking the right one keeps a test fast
|
|
7
|
+
and its failure legible.
|
|
8
|
+
|
|
9
|
+
| Level | Reach for it when | What you need |
|
|
10
|
+
| -------------- | ------------------------------------------------------------------------------- | -------------------------------------------------------------- |
|
|
11
|
+
| Topology | The assertion is about the plan: node ids, edges, which arm exists. | `Graph.build`. No engine, no crypto. |
|
|
12
|
+
| Interpretation | The assertion is about one drive: what settled, failed, or was skipped. | `Interpreter.interpret`, action layers, a runtime. |
|
|
13
|
+
| Execution | The assertion is about the durable lifecycle: replay, suspension, cancellation. | `FlowEngine.layerMemory` from [`@smthrs/engine`](/api/engine). |
|
|
14
|
+
|
|
15
|
+
## Assert a body's topology
|
|
16
|
+
|
|
17
|
+
Building a plan is pure, so a topology test needs nothing but the declarations:
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
import { expect, it } from "@effect/vitest"
|
|
21
|
+
import { Graph } from "@smthrs/flow"
|
|
22
|
+
|
|
23
|
+
it("plans both checks before the report", () => {
|
|
24
|
+
const graph = Graph.build(Gate, { target: "web" })
|
|
25
|
+
const ids = Graph.nodes(graph).map((node) => node.id)
|
|
26
|
+
|
|
27
|
+
expect(Graph.diagnostics(graph)).toEqual([])
|
|
28
|
+
expect(ids).toContain("root.lint")
|
|
29
|
+
})
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
This is the level to test a refusal at, too: a body that computes on a planned
|
|
33
|
+
value throws a `GraphBuildError` from `Graph.build`, with no run in sight.
|
|
34
|
+
|
|
35
|
+
## Run a flow in memory
|
|
36
|
+
|
|
37
|
+
`FlowEngine.layerMemory` implements the whole `FlowRuntime` port in the process.
|
|
38
|
+
The composition is the production one with the engine swapped:
|
|
39
|
+
|
|
40
|
+
```ts
|
|
41
|
+
import * as NodeCrypto from "@effect/platform-node/NodeCrypto"
|
|
42
|
+
import { FlowEngine } from "@smthrs/engine"
|
|
43
|
+
import { Action, Interpreter } from "@smthrs/flow"
|
|
44
|
+
import * as Effect from "effect/Effect"
|
|
45
|
+
import * as Layer from "effect/Layer"
|
|
46
|
+
|
|
47
|
+
const layer = Layer.mergeAll(
|
|
48
|
+
Greet.toLayer(({ name }) => Effect.succeed(`Hello, ${name}.`)),
|
|
49
|
+
Interpreter.layer(Greeting)
|
|
50
|
+
).pipe(
|
|
51
|
+
Layer.provideMerge(Action.layerImplementations),
|
|
52
|
+
Layer.provideMerge(FlowEngine.layerMemory),
|
|
53
|
+
Layer.provideMerge(NodeCrypto.layer)
|
|
54
|
+
)
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Use the real `NodeCrypto.layer` rather than a stub. Step identity is a digest,
|
|
58
|
+
and a fake digest tests a key derivation nobody ships.
|
|
59
|
+
|
|
60
|
+
## Prove a step did not run twice
|
|
61
|
+
|
|
62
|
+
Counting dispatches is the cheapest way to assert replay, and the counter lives
|
|
63
|
+
in the implementation rather than in the flow:
|
|
64
|
+
|
|
65
|
+
```ts
|
|
66
|
+
let calls = 0
|
|
67
|
+
|
|
68
|
+
const counted = Greet.toLayer(({ name }) =>
|
|
69
|
+
Effect.sync(() => {
|
|
70
|
+
calls += 1
|
|
71
|
+
return `Hello, ${name}.`
|
|
72
|
+
})
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
const countedLayer = Layer.mergeAll(counted, Interpreter.layer(Greeting)).pipe(
|
|
76
|
+
Layer.provideMerge(Action.layerImplementations),
|
|
77
|
+
Layer.provideMerge(FlowEngine.layerMemory),
|
|
78
|
+
Layer.provideMerge(NodeCrypto.layer)
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
it.effect("dispatches the action once across two drives", () =>
|
|
82
|
+
Effect.gen(function*() {
|
|
83
|
+
const run = Effect.orDie(Greeting.execute({ name: "Ada" }, { executionId: "greet-1" }))
|
|
84
|
+
yield* run
|
|
85
|
+
yield* run
|
|
86
|
+
|
|
87
|
+
expect(calls).toBe(1)
|
|
88
|
+
}).pipe(Effect.provide(countedLayer)))
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
A second, different implementation of one action tag dies with
|
|
92
|
+
`Action.DuplicateImplementation` unless it registers with
|
|
93
|
+
`toLayer(handler, { override: true })`. Closing the overriding scope restores
|
|
94
|
+
what it shadowed. `countedLayer` needs no flag because it builds its own
|
|
95
|
+
composition rather than overriding one.
|
|
96
|
+
|
|
97
|
+
## Drive a suspension
|
|
98
|
+
|
|
99
|
+
To test a parked run without waiting for its result, use
|
|
100
|
+
`execute(payload, { discard: true })`, `start(payload)`, or
|
|
101
|
+
`ensure(payload, { key })` to acknowledge admission. Test the wake by completing
|
|
102
|
+
the wait point and resuming:
|
|
103
|
+
|
|
104
|
+
```ts
|
|
105
|
+
import { DurableDeferred, WaitFor } from "@smthrs/flow"
|
|
106
|
+
|
|
107
|
+
const gate = WaitFor.deferred("ship")
|
|
108
|
+
|
|
109
|
+
it.effect("resumes when the wait point is completed", () =>
|
|
110
|
+
Effect.gen(function*() {
|
|
111
|
+
yield* Ship.execute({ build: "42" }, { executionId: "ship-1", discard: true })
|
|
112
|
+
|
|
113
|
+
const token = DurableDeferred.tokenFromExecutionId(gate, { flow: Ship, executionId: "ship-1" })
|
|
114
|
+
yield* DurableDeferred.succeed(gate, { token, value: { approved: true } })
|
|
115
|
+
yield* Ship.resume("ship-1")
|
|
116
|
+
|
|
117
|
+
expect(yield* Ship.poll("ship-1")).toMatchObject({ value: { _tag: "Complete" } })
|
|
118
|
+
}))
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
`discard: true` answers with the execution id instead of waiting for the result,
|
|
122
|
+
which is what you want for a run you intend to park. Ordinary `execute` follows
|
|
123
|
+
the run: with the default polling policy (no attempt or expiry bound), its caller
|
|
124
|
+
can stay pending while the run is suspended. A bounded `suspendedRetryPolicy`
|
|
125
|
+
can end that caller with a `SuspendedResumeGaveUp` defect without cancelling the
|
|
126
|
+
parked run.
|
|
127
|
+
|
|
128
|
+
For a timer, drive the clock rather than the wall. Effect's `TestClock` advances
|
|
129
|
+
a `Sleep.action` or a `DurableClock.sleep` deterministically, and a test that
|
|
130
|
+
sleeps for real is a test that is slow and flaky in the same commit.
|
|
131
|
+
|
|
132
|
+
## Pin the identity
|
|
133
|
+
|
|
134
|
+
Step identity is a wire format: it outlives a process and decides whether a
|
|
135
|
+
result is found or recomputed. Pin the derivations you depend on with literal
|
|
136
|
+
vectors, so a change to how a step is keyed is a red test rather than a silent
|
|
137
|
+
cache miss:
|
|
138
|
+
|
|
139
|
+
```ts
|
|
140
|
+
import { StepIdentity } from "@smthrs/flow"
|
|
141
|
+
|
|
142
|
+
it.effect("keys a dispatch the way it always has", () =>
|
|
143
|
+
Effect.gen(function*() {
|
|
144
|
+
const scope = yield* StepIdentity.allocationScope({ kind: "action", name: "payments/Charge" })
|
|
145
|
+
expect(scope).toBe("<the recorded digest>")
|
|
146
|
+
}))
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
The same discipline applies to a completion token, a derived execution id, and a
|
|
150
|
+
child execution id digest. Each one is read by a process that did not write it.
|
|
151
|
+
|
|
152
|
+
## Related pages
|
|
153
|
+
|
|
154
|
+
- [Inspect the plan a body builds](./guides/inspect-the-plan.md): the accessors a
|
|
155
|
+
topology test reads.
|
|
156
|
+
- [The runtime port](./concepts/the-runtime-port.md): what the in-memory engine
|
|
157
|
+
is standing in for.
|
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Troubleshooting"
|
|
3
|
+
description: "The refusals @smthrs/flow raises, sorted by the symptom you see: what caused each one and what to change."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Every entry here is a real refusal this package or the engine beneath it raises.
|
|
7
|
+
They are grouped by where you meet them: at compile time, while a plan is built,
|
|
8
|
+
while a run executes, and at declaration time.
|
|
9
|
+
|
|
10
|
+
## Compile time
|
|
11
|
+
|
|
12
|
+
### The type says `Action.Requirement<"...">`
|
|
13
|
+
|
|
14
|
+
**Symptom.** `Flow.execute` does not typecheck, and the requirement channel names
|
|
15
|
+
an action tag.
|
|
16
|
+
|
|
17
|
+
**Cause.** The body calls a declared action whose implementation the composition
|
|
18
|
+
does not provide. That is the requirement channel doing its job: planning is
|
|
19
|
+
requirement-free, and asking to run a plan is what makes the missing layer a
|
|
20
|
+
compile error.
|
|
21
|
+
|
|
22
|
+
**Fix.** Merge `TheAction.toLayer(...)` into the composition. If the action is a
|
|
23
|
+
system declaration such as `Sleep.action`, the compiler will not ask, but the run
|
|
24
|
+
still needs `Sleep.layer`.
|
|
25
|
+
|
|
26
|
+
## While the plan is built
|
|
27
|
+
|
|
28
|
+
### `GraphBuildError` with code `planned_value_computed`
|
|
29
|
+
|
|
30
|
+
**Symptom.** A throw naming a node and a property path, saying the value was
|
|
31
|
+
computed at plan time by `toString`, `valueOf`, `toJSON`, or `Symbol.toPrimitive`.
|
|
32
|
+
|
|
33
|
+
**Cause.** The body did arithmetic on, interpolated, or serialized a step result.
|
|
34
|
+
A body runs at plan time, so that value does not exist yet.
|
|
35
|
+
|
|
36
|
+
**Fix.** Compute with `Node.map`, decide with `Node.branch`, or pass the value
|
|
37
|
+
into a payload. Field access is allowed; it records a reference path.
|
|
38
|
+
|
|
39
|
+
### `GraphBuildError` with code `recursion_requires_boundary`
|
|
40
|
+
|
|
41
|
+
**Symptom.** A throw when a flow's body calls the flow itself with `.call()`.
|
|
42
|
+
|
|
43
|
+
**Cause.** Inline expansion splices the callee's body into the caller's plan, and
|
|
44
|
+
a self-call would never terminate.
|
|
45
|
+
|
|
46
|
+
**Fix.** Use `flow.to(payload)` for a loop, or `flow.child(payload)` for a nested
|
|
47
|
+
execution. See [Run a flow as a child execution](./guides/run-a-child-flow.md).
|
|
48
|
+
|
|
49
|
+
### `GraphBuildError` with code `placement_requires_boundary`
|
|
50
|
+
|
|
51
|
+
**Cause.** An inline callee declares a `Flow.Placement` the enclosing flow cannot
|
|
52
|
+
satisfy. Placement is a property of an execution.
|
|
53
|
+
|
|
54
|
+
**Fix.** Call the callee with `flow.child(payload)` so it gets its own execution.
|
|
55
|
+
|
|
56
|
+
### `GraphBuildError` with code `duplicate_node`
|
|
57
|
+
|
|
58
|
+
**Cause.** Two structural graph addresses resolved to one durable node id. A node
|
|
59
|
+
id is dispatch identity, so two nodes answering to one address would let a later
|
|
60
|
+
settlement overwrite an earlier one.
|
|
61
|
+
|
|
62
|
+
**Fix.** Give the colliding sites distinguishable addresses, usually by naming
|
|
63
|
+
`Node.all` members distinctly rather than reusing one key.
|
|
64
|
+
|
|
65
|
+
### `GraphBuildError` with code `graph_too_deep` or `payload_too_deep`
|
|
66
|
+
|
|
67
|
+
**Cause.** Topology or a payload nested past the build bound. The build walks
|
|
68
|
+
with an explicit stack and refuses at a bound rather than overflowing the native
|
|
69
|
+
stack without a typed error.
|
|
70
|
+
|
|
71
|
+
**Fix.** Split the topology with `.child()` boundaries or trampoline handoffs, or
|
|
72
|
+
flatten the payload.
|
|
73
|
+
|
|
74
|
+
## While a run executes
|
|
75
|
+
|
|
76
|
+
### `InterpreterError` with code `unresolved_action`
|
|
77
|
+
|
|
78
|
+
**Symptom.** A run refuses to start, naming a flow and a node.
|
|
79
|
+
|
|
80
|
+
**Cause.** An action the body names has no implementation the runtime can
|
|
81
|
+
resolve, in either of two ways. The layer is genuinely missing, or
|
|
82
|
+
`Action.layerImplementations` was merged **beside** the implementation layers
|
|
83
|
+
rather than provided **under** them, so an implementation had no table to file
|
|
84
|
+
itself in.
|
|
85
|
+
|
|
86
|
+
**Fix.**
|
|
87
|
+
|
|
88
|
+
```ts
|
|
89
|
+
Layer.mergeAll(TheAction.toLayer(run), Interpreter.layer(TheFlow)).pipe(
|
|
90
|
+
Layer.provideMerge(Action.layerImplementations)
|
|
91
|
+
)
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
This is also what a missing `Sleep.layer`, `WaitFor.layer`, `HumanTask.layer`, or
|
|
95
|
+
`Poll.layer` looks like, because those are system declarations the compiler never
|
|
96
|
+
asked you for.
|
|
97
|
+
|
|
98
|
+
### `InterpreterError` with code `unresolved_reference`
|
|
99
|
+
|
|
100
|
+
**Cause.** A payload reads a node this graph does not hold, usually a planned
|
|
101
|
+
value captured from a different build.
|
|
102
|
+
|
|
103
|
+
**Fix.** Build the reference inside the body that consumes it.
|
|
104
|
+
|
|
105
|
+
### `Flow.ExecutionIdRequired`, as a defect
|
|
106
|
+
|
|
107
|
+
**Symptom.** A run dies before it starts, naming the flow.
|
|
108
|
+
|
|
109
|
+
**Cause.** The opt-in derived source is installed and the payload has no canonical form: a non-finite
|
|
110
|
+
number, a lone surrogate, or a cycle. A served resume dies with it for a different reason: the
|
|
111
|
+
`ExecutionIdScope` on the `FlowProxyServer` layer returned `undefined` for the request.
|
|
112
|
+
|
|
113
|
+
**Fix.** Pass an explicit `executionId`, declare an `idempotencyKey` on the flow,
|
|
114
|
+
or use `Flow.layerExecutionIds(Flow.fresh)` for a new invocation. For intentional
|
|
115
|
+
payload identity, correct the payload so it can be canonicalized. For a served
|
|
116
|
+
resume, return a string from the scope for every resume.
|
|
117
|
+
|
|
118
|
+
### `Action.ConcurrentKeylessDispatch`
|
|
119
|
+
|
|
120
|
+
**Symptom.** A run refuses a dispatch, naming the action.
|
|
121
|
+
|
|
122
|
+
**Cause.** Two ordinal-keyed invocations of one allocation scope were in flight
|
|
123
|
+
at once, so fiber arrival order would have assigned their ordinals, step keys,
|
|
124
|
+
attempt rows, and recorded outcomes.
|
|
125
|
+
|
|
126
|
+
**Fix.** Declare an `idempotencyKey` that distinguishes the invocations. Distinct
|
|
127
|
+
keys are distinct scopes and overlap freely. A sealed action with a key is
|
|
128
|
+
exempt, because its key is a pure cache key rather than an ordinal.
|
|
129
|
+
|
|
130
|
+
### `Action.IrreversibleRetryRequiresIdempotencyKey`
|
|
131
|
+
|
|
132
|
+
**Cause.** An `irreversible` action was retried without a declared
|
|
133
|
+
`idempotencyKey`, so the engine cannot tell a second attempt from a second
|
|
134
|
+
charge.
|
|
135
|
+
|
|
136
|
+
**Fix.** Declare an `idempotencyKey`, or change the tier if the work really is
|
|
137
|
+
sealed or compensable.
|
|
138
|
+
|
|
139
|
+
### `Action.UncanonicalIdempotencyKey`
|
|
140
|
+
|
|
141
|
+
**Cause.** An object-form `idempotencyKey` carried a `Date`, an `undefined`, a
|
|
142
|
+
class instance, a `Redacted`, or similar material canonical serialization
|
|
143
|
+
rejects. The `path` field names where.
|
|
144
|
+
|
|
145
|
+
**Fix.** Encode the offending value yourself, for example as an ISO string or a
|
|
146
|
+
number, before putting it in the key. The failure is not retryable: the same
|
|
147
|
+
declaration derives it on every attempt, and the body never runs.
|
|
148
|
+
|
|
149
|
+
### `Flow.MaxRoundsExceeded`, as a defect in the result
|
|
150
|
+
|
|
151
|
+
**Cause.** A trampoline lineage opened one more round than its flow's `maxRounds`
|
|
152
|
+
allows. The bound is a budget, not loop detection.
|
|
153
|
+
|
|
154
|
+
**Fix.** Raise `maxRounds`, or fix the branch that never reaches `Flow.done`. The
|
|
155
|
+
failure is recorded in the execution result rather than raised as a typed
|
|
156
|
+
`execute` failure, so read it off the result.
|
|
157
|
+
|
|
158
|
+
### `Sleep.SleepRequestInvalid`
|
|
159
|
+
|
|
160
|
+
`missing_deadline` and `ambiguous_deadline` mean the payload named neither
|
|
161
|
+
`millis` nor `until`, or both. `invalid_deadline` means it named a number that is
|
|
162
|
+
not a length of time. It is a typed failure, so `Node.catch` can recover it.
|
|
163
|
+
|
|
164
|
+
### `WaitFor.WaitForRequestInvalid` with code `foreign_execution`
|
|
165
|
+
|
|
166
|
+
**Cause.** The wait names a token addressed to another flow or another execution.
|
|
167
|
+
A deferred result is recorded against the flow and execution that own it, so
|
|
168
|
+
awaiting a foreign token would park forever while the value it names was
|
|
169
|
+
recorded elsewhere.
|
|
170
|
+
|
|
171
|
+
**Fix.** Wait by `name` for a wait point of this execution, or resolve the token
|
|
172
|
+
from the execution that owns it.
|
|
173
|
+
|
|
174
|
+
### `DurableDeferred.TokenInvalid` with code `deferred_mismatch`
|
|
175
|
+
|
|
176
|
+
**Cause.** A completion was submitted through one deferred with a token naming a
|
|
177
|
+
different one.
|
|
178
|
+
|
|
179
|
+
**Fix.** Derive the token from the deferred you are completing.
|
|
180
|
+
`WaitFor.deferred(name)` and `HumanTask.deferred(name, attempt)` are the two
|
|
181
|
+
derivations that matter.
|
|
182
|
+
|
|
183
|
+
### `HumanTask.HumanAnswerInvalid` with code `answer_not_open`
|
|
184
|
+
|
|
185
|
+
**Cause.** The answer addressed an attempt the run is not parked on: a guessed
|
|
186
|
+
token, an attempt that was never opened, or a stale one from an earlier attempt.
|
|
187
|
+
|
|
188
|
+
**Fix.** Read the open attempt back from the engine's waiting row rather than
|
|
189
|
+
tracking it in your own process. The row carries the `approval` reason and the
|
|
190
|
+
token of the one attempt that is waiting.
|
|
191
|
+
|
|
192
|
+
### `Poll.PollExhausted`
|
|
193
|
+
|
|
194
|
+
**Cause.** The poll used its last attempt without a satisfied check, under
|
|
195
|
+
`onTimeout: "fail"`.
|
|
196
|
+
|
|
197
|
+
**Fix.** Catch it in the body if exhaustion is an outcome the caller expects,
|
|
198
|
+
raise `maxAttempts`, or declare `onTimeout: "return-last"` when the last reading
|
|
199
|
+
is good enough.
|
|
200
|
+
|
|
201
|
+
### Typed recovery after retries
|
|
202
|
+
|
|
203
|
+
Exhausted or expired action policies propagate the final declared failure.
|
|
204
|
+
Use `Node.catch` or ordinary Effect recovery for that error. A historical run
|
|
205
|
+
recorded before this change may still contain RetryAttemptsExhausted or
|
|
206
|
+
RetryPolicyExpired as its immutable outcome; restarting that same execution
|
|
207
|
+
does not rewrite history.
|
|
208
|
+
|
|
209
|
+
### `FlowRuntime.FlowExecutionNotFound`
|
|
210
|
+
|
|
211
|
+
**Cause.** `poll` or `resume` named an execution id the runtime never recorded.
|
|
212
|
+
This is different from a known execution that has not settled, which `poll`
|
|
213
|
+
answers as `Option.none`.
|
|
214
|
+
|
|
215
|
+
**Fix.** Check the id, and check that the caller and the run share a store. An
|
|
216
|
+
in-memory engine's records die with the process.
|
|
217
|
+
|
|
218
|
+
### `FlowRuntime.CancelRequestFailed`
|
|
219
|
+
|
|
220
|
+
`cancel_request_failed` means a durable runtime could not write the cancellation
|
|
221
|
+
record, so the execution is still running and you are seeing the storage failure
|
|
222
|
+
rather than a false success. `unsafe_interrupt_unsupported` means the durable
|
|
223
|
+
engine was asked for `interruptUnsafe`, which it does not implement.
|
|
224
|
+
|
|
225
|
+
### `FlowRuntime.FlowCycleDetected`
|
|
226
|
+
|
|
227
|
+
**Cause.** Executing a flow would close a cycle in the persisted parent-execution
|
|
228
|
+
chain. `path` holds the ordered execution ids from the cycle's target back to
|
|
229
|
+
itself.
|
|
230
|
+
|
|
231
|
+
**Fix.** Break the cycle, usually by turning the innermost call into a trampoline
|
|
232
|
+
handoff.
|
|
233
|
+
|
|
234
|
+
### A service is missing at run time
|
|
235
|
+
|
|
236
|
+
Two service requirements are often missed, because they are not action
|
|
237
|
+
implementations:
|
|
238
|
+
|
|
239
|
+
- **`Crypto`.** Every dispatch is recorded under a derived step identity, so even
|
|
240
|
+
the in-memory engine needs one. Provide `NodeCrypto.layer` from
|
|
241
|
+
`@effect/platform-node`, or a browser equivalent.
|
|
242
|
+
- **`FlowEngine.SnapshotBoundary`.** A `compensable` action needs one, and the
|
|
243
|
+
engine dies with `SnapshotBoundaryRequired` without it.
|
|
244
|
+
[`@smthrs/engine-store`](/api/engine-store) supplies an implementation.
|
|
245
|
+
|
|
246
|
+
### A recorded result is never reused across runs
|
|
247
|
+
|
|
248
|
+
**Cause.** Cross-run reuse needs three declarations, and missing any one of them
|
|
249
|
+
scopes the key to the run that produced it: the action's `idempotencyKey`, its
|
|
250
|
+
file boundary with `boundaryMode: "hard"`, and the composition's complete
|
|
251
|
+
`Action.CacheEnvironment`.
|
|
252
|
+
|
|
253
|
+
**Fix.** See [Reuse a recorded result](./guides/reuse-a-recorded-result.md). Note
|
|
254
|
+
that `metadata`, which carries the file boundary, is an option of the inline form
|
|
255
|
+
of `Action.make`.
|
|
256
|
+
|
|
257
|
+
### A changed schema did not re-key a call
|
|
258
|
+
|
|
259
|
+
**Cause.** A flow call's key material folds the declared schemas in as their JSON
|
|
260
|
+
Schema documents. Two schemas whose decoders disagree can serialize to the same
|
|
261
|
+
document, so changing only a codec's behavior does not re-key the call, and a
|
|
262
|
+
result recorded under the old codec is replayed under the new one. Effect codecs
|
|
263
|
+
are not serializable, so nothing can close this automatically.
|
|
264
|
+
|
|
265
|
+
**Fix.** Rename the declaration when a transformation changes and the call has to
|
|
266
|
+
be re-keyed.
|
|
267
|
+
|
|
268
|
+
## At declaration time
|
|
269
|
+
|
|
270
|
+
These throw from the constructor rather than failing a run, because invalid
|
|
271
|
+
static configuration is a programmer error.
|
|
272
|
+
|
|
273
|
+
| Throw | Raised by | Cause |
|
|
274
|
+
| ------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
275
|
+
| `RangeError` naming `maxRounds` | `Flow.make` | `maxRounds` is not a positive safe integer. |
|
|
276
|
+
| `RangeError` naming a numeric field | `RetryPolicy.make` | A bound is out of range. The message names the field. |
|
|
277
|
+
| `RangeError` naming `intervalMs` or `maxAttempts` | `Poll.make` | An interval that is not a finite non-negative length, a budget below one attempt, or a backoff that reaches an unarmable wait before the budget is spent. |
|
|
278
|
+
| `TypeError` naming `attempt` | `Poll.make` | The `input` fields declared the reserved `attempt` field, which `Poll` owns across rounds. |
|
|
279
|
+
| `RangeError` naming `concurrency` | `DurableQueue.makeWorker` and `DurableQueue.worker` | `concurrency` is not a positive safe integer. |
|
|
280
|
+
|
|
281
|
+
## Related pages
|
|
282
|
+
|
|
283
|
+
- [Inspect the plan a body builds](./guides/inspect-the-plan.md): read the
|
|
284
|
+
diagnostics before a run reports them.
|
|
285
|
+
- [API reference](./api.md): the complete surface, including every failure's
|
|
286
|
+
fields.
|