@temelj/workflow 0.0.0-alpha.3 → 0.0.0-alpha.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/README.md +394 -2
- package/dist/attributes.d.mts +11 -9
- package/dist/attributes.mjs +23 -5
- package/dist/bundle.d.mts +5 -23
- package/dist/bundle.mjs +2 -18
- package/dist/client/create.d.mts +26 -23
- package/dist/client/create.mjs +26 -32
- package/dist/client/facades.d.mts +12 -18
- package/dist/client/facades.mjs +102 -93
- package/dist/client/mod.mjs +1 -2
- package/dist/client/run-handle.d.mts +17 -54
- package/dist/client/run-handle.mjs +35 -105
- package/dist/client/worker-options.d.mts +8 -8
- package/dist/client/worker-options.mjs +11 -11
- package/dist/cloudflare/cloudflare.d.mts +4 -5
- package/dist/cloudflare/codec.d.mts +28 -13
- package/dist/cloudflare/codec.mjs +40 -17
- package/dist/cloudflare/entrypoint.d.mts +3 -4
- package/dist/cloudflare/entrypoint.mjs +4 -3
- package/dist/cloudflare/execution.d.mts +3 -4
- package/dist/cloudflare/execution.mjs +20 -13
- package/dist/cloudflare/host.d.mts +6 -7
- package/dist/cloudflare/host.mjs +7 -6
- package/dist/cloudflare/mod.d.mts +4 -4
- package/dist/cloudflare/mod.mjs +2 -2
- package/dist/cloudflare/name.d.mts +3 -4
- package/dist/cloudflare/name.mjs +3 -3
- package/dist/cloudflare/registry.d.mts +3 -23
- package/dist/cloudflare/registry.mjs +2 -20
- package/dist/cloudflare/runtime.d.mts +11 -18
- package/dist/cloudflare/runtime.mjs +52 -73
- package/dist/cloudflare/step.d.mts +6 -6
- package/dist/cloudflare/step.mjs +69 -57
- package/dist/cloudflare/types.d.mts +17 -36
- package/dist/collection.d.mts +8 -11
- package/dist/collection.mjs +10 -14
- package/dist/compiled-function.d.mts +14 -19
- package/dist/compiled-function.mjs +12 -24
- package/dist/compiled.d.mts +4 -0
- package/dist/compiled.mjs +4 -0
- package/dist/compiler/ast.d.mts +26 -0
- package/dist/{vite → compiler}/ast.mjs +24 -16
- package/dist/{vite → compiler}/error.d.mts +4 -6
- package/dist/{vite → compiler}/error.mjs +14 -16
- package/dist/compiler/manifest.d.mts +6 -0
- package/dist/{vite → compiler}/manifest.mjs +9 -7
- package/dist/compiler/plugin.d.mts +7 -0
- package/dist/{vite → compiler}/plugin.mjs +45 -46
- package/dist/compiler/safety.d.mts +12 -0
- package/dist/{vite → compiler}/safety.mjs +5 -11
- package/dist/{vite → compiler}/source-edit.d.mts +3 -4
- package/dist/{vite → compiler}/source-edit.mjs +1 -1
- package/dist/{vite → compiler}/source-map.d.mts +4 -3
- package/dist/{vite → compiler}/source-map.mjs +3 -3
- package/dist/compiler/source.d.mts +7 -0
- package/dist/{vite → compiler}/source.mjs +1 -1
- package/dist/compiler/transform.d.mts +12 -0
- package/dist/{vite → compiler}/transform.mjs +37 -38
- package/dist/definition.d.mts +17 -25
- package/dist/definition.mjs +19 -35
- package/dist/engine/child-workflow.d.mts +5 -9
- package/dist/engine/child-workflow.mjs +46 -67
- package/dist/engine/command-identity.d.mts +5 -6
- package/dist/engine/command-identity.mjs +9 -5
- package/dist/engine/context.d.mts +17 -0
- package/dist/engine/create.d.mts +36 -94
- package/dist/engine/create.mjs +55 -260
- package/dist/engine/deterministic.d.mts +6 -11
- package/dist/engine/deterministic.mjs +47 -68
- package/dist/engine/durable-command.d.mts +5 -5
- package/dist/engine/durable-command.mjs +2 -2
- package/dist/engine/execution-service.d.mts +20 -24
- package/dist/engine/execution-service.mjs +54 -52
- package/dist/engine/hooks.d.mts +17 -39
- package/dist/engine/hooks.mjs +73 -94
- package/dist/engine/inspection.d.mts +23 -15
- package/dist/engine/inspection.mjs +55 -29
- package/dist/engine/lifecycle.d.mts +6 -12
- package/dist/engine/lifecycle.mjs +5 -5
- package/dist/engine/lock-replay.d.mts +8 -15
- package/dist/engine/lock-replay.mjs +12 -25
- package/dist/engine/lock.d.mts +10 -15
- package/dist/engine/lock.mjs +65 -51
- package/dist/engine/message.d.mts +14 -34
- package/dist/engine/message.mjs +94 -127
- package/dist/engine/observation.d.mts +9 -11
- package/dist/engine/observation.mjs +18 -27
- package/dist/engine/replay.d.mts +18 -19
- package/dist/engine/replay.mjs +32 -56
- package/dist/engine/resume.d.mts +16 -0
- package/dist/engine/resume.mjs +24 -0
- package/dist/engine/retry.d.mts +15 -19
- package/dist/engine/retry.mjs +17 -17
- package/dist/engine/run-data.d.mts +4 -8
- package/dist/engine/run-data.mjs +24 -22
- package/dist/engine/run-service.d.mts +24 -33
- package/dist/engine/run-service.mjs +125 -93
- package/dist/engine/run-utils.d.mts +11 -13
- package/dist/engine/run-utils.mjs +23 -46
- package/dist/engine/schedule.d.mts +8 -22
- package/dist/engine/schedule.mjs +37 -34
- package/dist/engine/serialization.d.mts +9 -6
- package/dist/engine/serialization.mjs +30 -21
- package/dist/engine/signals.d.mts +23 -0
- package/dist/engine/signals.mjs +41 -0
- package/dist/engine/start.d.mts +18 -0
- package/dist/engine/start.mjs +88 -0
- package/dist/engine/state.d.mts +37 -67
- package/dist/engine/state.mjs +119 -280
- package/dist/engine/step-api.d.mts +5 -8
- package/dist/engine/step-api.mjs +16 -16
- package/dist/engine/stream-reader.d.mts +12 -0
- package/dist/engine/stream-reader.mjs +154 -0
- package/dist/engine/stream.d.mts +9 -54
- package/dist/engine/stream.mjs +54 -196
- package/dist/engine/summary/recovery.d.mts +35 -0
- package/dist/engine/summary/recovery.mjs +363 -0
- package/dist/engine/summary/runs.d.mts +43 -0
- package/dist/engine/summary/runs.mjs +294 -0
- package/dist/engine/summary/step-attempts.d.mts +5 -10
- package/dist/engine/summary/step-attempts.mjs +157 -36
- package/dist/engine/summary/tally.d.mts +44 -0
- package/dist/engine/summary/tally.mjs +142 -0
- package/dist/engine/task.d.mts +4 -5
- package/dist/engine/task.mjs +40 -48
- package/dist/errors/base.d.mts +17 -77
- package/dist/errors/base.mjs +26 -327
- package/dist/errors/capability.d.mts +3 -6
- package/dist/errors/capability.mjs +4 -8
- package/dist/errors/codes.d.mts +116 -0
- package/dist/{types/error-code.mjs → errors/codes.mjs} +2 -17
- package/dist/errors/definition.d.mts +3 -17
- package/dist/errors/definition.mjs +5 -42
- package/dist/errors/failures.d.mts +17 -51
- package/dist/errors/failures.mjs +35 -102
- package/dist/errors/hook.d.mts +5 -9
- package/dist/errors/hook.mjs +4 -16
- package/dist/errors/implementation.d.mts +3 -6
- package/dist/errors/implementation.mjs +7 -12
- package/dist/errors/lock.d.mts +7 -20
- package/dist/errors/lock.mjs +8 -44
- package/dist/errors/message.d.mts +14 -59
- package/dist/errors/message.mjs +13 -39
- package/dist/errors/mod.d.mts +4 -5
- package/dist/errors/mod.mjs +5 -7
- package/dist/errors/records.d.mts +10 -4
- package/dist/errors/records.mjs +256 -256
- package/dist/errors/run.d.mts +27 -68
- package/dist/errors/run.mjs +31 -85
- package/dist/errors/schedule.d.mts +7 -18
- package/dist/errors/schedule.mjs +7 -39
- package/dist/errors/step.d.mts +12 -45
- package/dist/errors/step.mjs +13 -34
- package/dist/errors/stream.d.mts +8 -16
- package/dist/errors/stream.mjs +7 -41
- package/dist/esbuild.d.mts +6 -4
- package/dist/esbuild.mjs +2 -1
- package/dist/events/descriptors.d.mts +12 -241
- package/dist/events/descriptors.mjs +12 -5
- package/dist/history/projection.d.mts +4 -6
- package/dist/history/projection.mjs +22 -26
- package/dist/history/replay-projection.d.mts +44 -48
- package/dist/history/replay-projection.mjs +41 -50
- package/dist/history/{mod.d.mts → replay.d.mts} +16 -21
- package/dist/history/{mod.mjs → replay.mjs} +21 -25
- package/dist/history/sequencer.d.mts +10 -11
- package/dist/history/sequencer.mjs +11 -7
- package/dist/history/step-attempts.d.mts +4 -7
- package/dist/history/step-attempts.mjs +8 -9
- package/dist/history/timeline.d.mts +4 -13
- package/dist/history/timeline.mjs +46 -265
- package/dist/history/validator.d.mts +5 -7
- package/dist/history/validator.mjs +9 -24
- package/dist/hook-token.d.mts +7 -0
- package/dist/hook-token.mjs +32 -0
- package/dist/ids.d.mts +8 -0
- package/dist/ids.mjs +21 -0
- package/dist/message-options.d.mts +11 -5
- package/dist/message-options.mjs +9 -7
- package/dist/mod.d.mts +32 -36
- package/dist/mod.mjs +9 -13
- package/dist/otel/metrics.d.mts +31 -0
- package/dist/otel/metrics.mjs +60 -0
- package/dist/otel/mod.d.mts +3 -0
- package/dist/otel/mod.mjs +3 -0
- package/dist/otel/spans.d.mts +24 -0
- package/dist/otel/spans.mjs +218 -0
- package/dist/otel/support.d.mts +15 -8
- package/dist/otel/support.mjs +18 -40
- package/dist/{otel.d.mts → otel/telemetry.d.mts} +5 -6
- package/dist/otel/telemetry.mjs +305 -0
- package/dist/pagination.d.mts +6 -12
- package/dist/pagination.mjs +10 -14
- package/dist/registry.d.mts +8 -5
- package/dist/registry.mjs +19 -10
- package/dist/rolldown.d.mts +6 -4
- package/dist/rolldown.mjs +2 -1
- package/dist/rollup.d.mts +6 -4
- package/dist/rollup.mjs +2 -1
- package/dist/rspack.d.mts +6 -4
- package/dist/rspack.mjs +2 -1
- package/dist/run-status.d.mts +29 -0
- package/dist/run-status.mjs +42 -0
- package/dist/schema/common.d.mts +22 -0
- package/dist/schema/common.mjs +54 -0
- package/dist/schema/error.d.mts +17 -0
- package/dist/schema/error.mjs +39 -0
- package/dist/schema/events.d.mts +446 -0
- package/dist/schema/events.mjs +235 -0
- package/dist/schema/pagination.d.mts +5 -0
- package/dist/schema/pagination.mjs +11 -0
- package/dist/schema/persisted-value.d.mts +8 -0
- package/dist/schema/persisted-value.mjs +94 -0
- package/dist/schema/run.d.mts +51 -0
- package/dist/schema/run.mjs +88 -0
- package/dist/schema/store.d.mts +94 -0
- package/dist/schema/store.mjs +116 -0
- package/dist/step-definition.d.mts +4 -9
- package/dist/step-definition.mjs +2 -2
- package/dist/store/capabilities.d.mts +8 -9
- package/dist/store/capabilities.mjs +7 -7
- package/dist/store/cleanup.d.mts +9 -14
- package/dist/store/cleanup.mjs +86 -85
- package/dist/store/create.d.mts +28 -29
- package/dist/store/create.mjs +10 -11
- package/dist/store/events.d.mts +48 -0
- package/dist/store/events.mjs +263 -0
- package/dist/store/indexes.d.mts +25 -0
- package/dist/store/indexes.mjs +282 -0
- package/dist/store/instrumentation.d.mts +2 -3
- package/dist/store/instrumentation.mjs +30 -30
- package/dist/store/lock.d.mts +4 -5
- package/dist/store/lock.mjs +5 -7
- package/dist/store/materialization.d.mts +10 -17
- package/dist/store/materialization.mjs +39 -33
- package/dist/store/mod.d.mts +3 -3
- package/dist/store/mod.mjs +2 -2
- package/dist/store/query.d.mts +13 -17
- package/dist/store/query.mjs +13 -13
- package/dist/store/run.d.mts +25 -34
- package/dist/store/run.mjs +67 -108
- package/dist/store/schedule.d.mts +6 -8
- package/dist/store/schedule.mjs +11 -11
- package/dist/store/step-attempt.d.mts +9 -12
- package/dist/store/step-attempt.mjs +9 -9
- package/dist/store/storage-value.d.mts +3 -3
- package/dist/store/storage-value.mjs +17 -1
- package/dist/store/validation.d.mts +17 -20
- package/dist/store/validation.mjs +30 -33
- package/dist/store-keys.d.mts +35 -47
- package/dist/store-keys.mjs +9 -17
- package/dist/telemetry.d.mts +16 -16
- package/dist/telemetry.mjs +3 -3
- package/dist/temporal.d.mts +11 -16
- package/dist/temporal.mjs +8 -9
- package/dist/timer.d.mts +12 -10
- package/dist/timer.mjs +11 -3
- package/dist/types/cleanup.d.mts +13 -50
- package/dist/types/cleanup.mjs +1 -22
- package/dist/types/client.d.mts +101 -162
- package/dist/types/{vite.d.mts → compiler.d.mts} +17 -24
- package/dist/types/compiler.mjs +1 -0
- package/dist/types/definition.d.mts +22 -34
- package/dist/types/engine-options.d.mts +10 -17
- package/dist/types/engine.d.mts +15 -274
- package/dist/types/error.d.mts +15 -217
- package/dist/types/error.mjs +1 -48
- package/dist/types/events.d.mts +59 -2730
- package/dist/types/events.mjs +1 -283
- package/dist/types/hook.d.mts +27 -85
- package/dist/types/hook.mjs +1 -66
- package/dist/types/ids.d.mts +9 -0
- package/dist/types/ids.mjs +1 -0
- package/dist/types/lock.d.mts +8 -26
- package/dist/types/lock.mjs +1 -18
- package/dist/types/message.d.mts +29 -43
- package/dist/types/observation.d.mts +43 -58
- package/dist/types/pagination.d.mts +6 -22
- package/dist/types/pagination.mjs +1 -13
- package/dist/types/result.d.mts +11 -43
- package/dist/types/retry.d.mts +7 -14
- package/dist/types/run-list.d.mts +9 -11
- package/dist/types/run-options.d.mts +25 -32
- package/dist/types/run.d.mts +35 -315
- package/dist/types/run.mjs +1 -207
- package/dist/types/runtime.d.mts +33 -145
- package/dist/types/runtime.mjs +1 -21
- package/dist/types/schedule.d.mts +13 -72
- package/dist/types/schedule.mjs +1 -48
- package/dist/types/step-attempts.d.mts +65 -261
- package/dist/types/step-attempts.mjs +1 -43
- package/dist/types/step.d.mts +66 -77
- package/dist/types/step.mjs +1 -5
- package/dist/types/store.d.mts +50 -182
- package/dist/types/stream.d.mts +19 -40
- package/dist/types/summary.d.mts +174 -278
- package/dist/types/telemetry.d.mts +23 -28
- package/dist/types/telemetry.mjs +1 -9
- package/dist/types/timeline.d.mts +46 -233
- package/dist/types/worker.d.mts +22 -29
- package/dist/values.d.mts +15 -0
- package/dist/values.mjs +57 -0
- package/dist/vite.d.mts +5 -6
- package/dist/vite.mjs +3 -4
- package/dist/webpack.d.mts +6 -4
- package/dist/webpack.mjs +2 -1
- package/dist/worker/error.d.mts +2 -9
- package/dist/worker/error.mjs +20 -32
- package/dist/worker/missing-implementation.d.mts +19 -0
- package/dist/worker/missing-implementation.mjs +62 -0
- package/dist/worker/worker.d.mts +18 -0
- package/dist/{worker.mjs → worker/worker.mjs} +64 -118
- package/package.json +28 -47
- package/dist/engine/execution-api.d.mts +0 -29
- package/dist/engine/execution-api.mjs +0 -33
- package/dist/engine/inspection-api.d.mts +0 -34
- package/dist/engine/inspection-api.mjs +0 -78
- package/dist/engine/mod.d.mts +0 -4
- package/dist/engine/mod.mjs +0 -2
- package/dist/engine/recovery.d.mts +0 -26
- package/dist/engine/recovery.mjs +0 -92
- package/dist/engine/retry-policy.d.mts +0 -4
- package/dist/engine/retry-policy.mjs +0 -4
- package/dist/engine/start-api.d.mts +0 -30
- package/dist/engine/start-api.mjs +0 -99
- package/dist/engine/summary/active-events.d.mts +0 -34
- package/dist/engine/summary/active-events.mjs +0 -69
- package/dist/engine/summary/child-workflow-runs.d.mts +0 -24
- package/dist/engine/summary/child-workflow-runs.mjs +0 -138
- package/dist/engine/summary/child-workflow-waits.d.mts +0 -21
- package/dist/engine/summary/child-workflow-waits.mjs +0 -67
- package/dist/engine/summary/recovery-child-workflow-waits.d.mts +0 -11
- package/dist/engine/summary/recovery-child-workflow-waits.mjs +0 -89
- package/dist/engine/summary/recovery-due-runs.d.mts +0 -16
- package/dist/engine/summary/recovery-due-runs.mjs +0 -52
- package/dist/engine/summary/recovery-failed-runs.d.mts +0 -14
- package/dist/engine/summary/recovery-failed-runs.mjs +0 -33
- package/dist/engine/summary/recovery-lease-runs.d.mts +0 -16
- package/dist/engine/summary/recovery-lease-runs.mjs +0 -69
- package/dist/engine/summary/recovery-locks.d.mts +0 -18
- package/dist/engine/summary/recovery-locks.mjs +0 -100
- package/dist/engine/summary/recovery-message-waits.d.mts +0 -11
- package/dist/engine/summary/recovery-message-waits.mjs +0 -74
- package/dist/engine/summary/recovery-retry-runs.d.mts +0 -17
- package/dist/engine/summary/recovery-retry-runs.mjs +0 -65
- package/dist/engine/summary/recovery-run-timestamps.d.mts +0 -13
- package/dist/engine/summary/recovery-run-timestamps.mjs +0 -18
- package/dist/engine/summary/recovery-runs.d.mts +0 -23
- package/dist/engine/summary/recovery-runs.mjs +0 -54
- package/dist/engine/summary/recovery-schedules.d.mts +0 -10
- package/dist/engine/summary/recovery-schedules.mjs +0 -46
- package/dist/engine/summary/recovery-sleep-waits.d.mts +0 -10
- package/dist/engine/summary/recovery-sleep-waits.mjs +0 -53
- package/dist/engine/summary/recovery-waits.d.mts +0 -21
- package/dist/engine/summary/recovery-waits.mjs +0 -29
- package/dist/engine/summary/run-availability.d.mts +0 -13
- package/dist/engine/summary/run-availability.mjs +0 -37
- package/dist/engine/summary/run-cleanup.d.mts +0 -14
- package/dist/engine/summary/run-cleanup.mjs +0 -44
- package/dist/engine/summary/run-failure.d.mts +0 -14
- package/dist/engine/summary/run-failure.mjs +0 -62
- package/dist/engine/summary/run-hooks.d.mts +0 -14
- package/dist/engine/summary/run-hooks.mjs +0 -63
- package/dist/engine/summary/run-lease.d.mts +0 -11
- package/dist/engine/summary/run-lease.mjs +0 -64
- package/dist/engine/summary/run-message-waits.d.mts +0 -15
- package/dist/engine/summary/run-message-waits.mjs +0 -62
- package/dist/engine/summary/run-metrics.d.mts +0 -31
- package/dist/engine/summary/run-metrics.mjs +0 -93
- package/dist/engine/summary/run-retry.d.mts +0 -9
- package/dist/engine/summary/run-retry.mjs +0 -69
- package/dist/engine/summary/run-sleeps.d.mts +0 -15
- package/dist/engine/summary/run-sleeps.mjs +0 -61
- package/dist/engine/summary/run-state.d.mts +0 -26
- package/dist/engine/summary/run-state.mjs +0 -48
- package/dist/engine/summary/run-status.d.mts +0 -16
- package/dist/engine/summary/run-status.mjs +0 -35
- package/dist/engine/summary/run-streams.d.mts +0 -14
- package/dist/engine/summary/run-streams.mjs +0 -46
- package/dist/engine/summary/run-transition.d.mts +0 -9
- package/dist/engine/summary/run-transition.mjs +0 -39
- package/dist/engine/summary/run-workflow.d.mts +0 -9
- package/dist/engine/summary/run-workflow.mjs +0 -47
- package/dist/engine/summary/step-attempt-active-child-workflows.d.mts +0 -13
- package/dist/engine/summary/step-attempt-active-child-workflows.mjs +0 -55
- package/dist/engine/summary/step-attempt-active-fields.d.mts +0 -23
- package/dist/engine/summary/step-attempt-active-fields.mjs +0 -14
- package/dist/engine/summary/step-attempt-active-message-waits.d.mts +0 -12
- package/dist/engine/summary/step-attempt-active-message-waits.mjs +0 -47
- package/dist/engine/summary/step-attempt-active-sleeps.d.mts +0 -19
- package/dist/engine/summary/step-attempt-active-sleeps.mjs +0 -44
- package/dist/engine/summary/step-attempt-buckets.d.mts +0 -22
- package/dist/engine/summary/step-attempt-buckets.mjs +0 -152
- package/dist/engine/summary/step-attempt-failure.d.mts +0 -12
- package/dist/engine/summary/step-attempt-failure.mjs +0 -61
- package/dist/engine/summary/step-attempt-lifecycle.d.mts +0 -13
- package/dist/engine/summary/step-attempt-lifecycle.mjs +0 -19
- package/dist/engine/summary.d.mts +0 -32
- package/dist/engine/summary.mjs +0 -37
- package/dist/errors/details.d.mts +0 -13
- package/dist/errors/details.mjs +0 -66
- package/dist/errors/record-view.d.mts +0 -11
- package/dist/errors/record-view.mjs +0 -24
- package/dist/errors/runtime.d.mts +0 -12
- package/dist/errors/runtime.mjs +0 -24
- package/dist/events/mod.d.mts +0 -3
- package/dist/events/mod.mjs +0 -2
- package/dist/history/attempt-key.d.mts +0 -6
- package/dist/history/attempt-key.mjs +0 -7
- package/dist/inspection/mod.d.mts +0 -5
- package/dist/inspection/mod.mjs +0 -3
- package/dist/otel.mjs +0 -590
- package/dist/runtime.d.mts +0 -35
- package/dist/runtime.mjs +0 -198
- package/dist/store/append-projection.d.mts +0 -15
- package/dist/store/append-projection.mjs +0 -26
- package/dist/store/compaction.d.mts +0 -5
- package/dist/store/compaction.mjs +0 -8
- package/dist/store/event-append-project.d.mts +0 -15
- package/dist/store/event-append-project.mjs +0 -77
- package/dist/store/event-append.d.mts +0 -37
- package/dist/store/event-append.mjs +0 -80
- package/dist/store/event-history.d.mts +0 -22
- package/dist/store/event-history.mjs +0 -75
- package/dist/store/event.d.mts +0 -10
- package/dist/store/event.mjs +0 -28
- package/dist/store/idempotency.d.mts +0 -10
- package/dist/store/idempotency.mjs +0 -167
- package/dist/store/message-index.d.mts +0 -21
- package/dist/store/message-index.mjs +0 -122
- package/dist/store/revision.d.mts +0 -4
- package/dist/store/revision.mjs +0 -7
- package/dist/store/schema.d.mts +0 -14
- package/dist/store/schema.mjs +0 -17
- package/dist/types/common.d.mts +0 -20
- package/dist/types/common.mjs +0 -16
- package/dist/types/error-code.d.mts +0 -256
- package/dist/types/message-id.d.mts +0 -7
- package/dist/types/message-id.mjs +0 -5
- package/dist/types/run-id.d.mts +0 -7
- package/dist/types/run-id.mjs +0 -5
- package/dist/types/step-id.d.mts +0 -7
- package/dist/types/step-id.mjs +0 -5
- package/dist/types/stream-id.d.mts +0 -7
- package/dist/types/stream-id.mjs +0 -5
- package/dist/types/worker-id.d.mts +0 -7
- package/dist/types/worker-id.mjs +0 -5
- package/dist/utility.d.mts +0 -49
- package/dist/utility.mjs +0 -122
- package/dist/vite/ast.d.mts +0 -23
- package/dist/vite/generated-name.d.mts +0 -7
- package/dist/vite/generated-name.mjs +0 -9
- package/dist/vite/manifest.d.mts +0 -7
- package/dist/vite/plugin.d.mts +0 -7
- package/dist/vite/safety.d.mts +0 -12
- package/dist/vite/source.d.mts +0 -7
- package/dist/vite/transform.d.mts +0 -7
- package/dist/webhook.d.mts +0 -16
- package/dist/webhook.mjs +0 -17
- package/dist/worker.d.mts +0 -19
- /package/dist/{types/vite.mjs → engine/context.mjs} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { WorkflowStateError } from "../errors/base.mjs";
|
|
2
2
|
import { WorkflowReplayDivergenceError } from "../errors/failures.mjs";
|
|
3
3
|
import "../errors/mod.mjs";
|
|
4
|
-
import { getEventDescriptor, getWorkflowEventStepAttempt, isWorkflowTerminalStepAttemptEvent } from "../events/descriptors.mjs";
|
|
5
|
-
import {
|
|
4
|
+
import { eventFieldsMatch, getEventDescriptor, getWorkflowEventStepAttempt, isWorkflowTerminalStepAttemptEvent } from "../events/descriptors.mjs";
|
|
5
|
+
import { isRecordedStepEvent, workflowRecordedStepEventType } from "./sequencer.mjs";
|
|
6
6
|
//#region src/history/validator.ts
|
|
7
7
|
function workflowStartedEventMatchesTerminalEvent(started, terminal) {
|
|
8
8
|
const descriptor = getEventDescriptor(terminal.kind);
|
|
@@ -20,10 +20,7 @@ function requireWorkflowTerminalEventsHaveStartedEvents(events) {
|
|
|
20
20
|
if (isStaleMessageWaitTerminalBeforeLaterStart(events, event)) continue;
|
|
21
21
|
const stepId = terminalStepEventId(event);
|
|
22
22
|
const type = terminalStepEventStepType(event);
|
|
23
|
-
WorkflowReplayDivergenceError.
|
|
24
|
-
expectedStepId: stepId,
|
|
25
|
-
actualStepId: stepId
|
|
26
|
-
});
|
|
23
|
+
WorkflowReplayDivergenceError.atStep(stepId, `recorded ${type} step ${stepId} has a terminal event without a started event`);
|
|
27
24
|
}
|
|
28
25
|
}
|
|
29
26
|
function requireWorkflowTerminalEventsAreUnique(events) {
|
|
@@ -38,16 +35,13 @@ function requireWorkflowTerminalEventsAreUnique(events) {
|
|
|
38
35
|
}
|
|
39
36
|
const stepId = terminalStepEventId(event);
|
|
40
37
|
const type = terminalStepEventStepType(event);
|
|
41
|
-
WorkflowReplayDivergenceError.
|
|
42
|
-
expectedStepId: stepId,
|
|
43
|
-
actualStepId: stepId
|
|
44
|
-
});
|
|
38
|
+
WorkflowReplayDivergenceError.atStep(stepId, `recorded ${type} step ${stepId} has multiple terminal events for attempt ${getTerminalStepEventAttempt(event)}`);
|
|
45
39
|
}
|
|
46
40
|
}
|
|
47
41
|
function requireWorkflowStartedEventsAreUnique(events) {
|
|
48
42
|
const started = /* @__PURE__ */ new Map();
|
|
49
43
|
for (const event of events) {
|
|
50
|
-
if (!
|
|
44
|
+
if (!isRecordedStepEvent(event)) continue;
|
|
51
45
|
const key = startedStepAttemptIdentityKey(event);
|
|
52
46
|
if (key === void 0) continue;
|
|
53
47
|
if (started.get(key) === void 0) {
|
|
@@ -55,24 +49,15 @@ function requireWorkflowStartedEventsAreUnique(events) {
|
|
|
55
49
|
continue;
|
|
56
50
|
}
|
|
57
51
|
const type = workflowRecordedStepEventType(event);
|
|
58
|
-
WorkflowReplayDivergenceError.
|
|
59
|
-
expectedStepId: event.stepId,
|
|
60
|
-
actualStepId: event.stepId
|
|
61
|
-
});
|
|
52
|
+
WorkflowReplayDivergenceError.atStep(event.stepId, `recorded ${type} step ${event.stepId} has multiple started events for attempt ${getWorkflowEventStepAttempt(event)}`);
|
|
62
53
|
}
|
|
63
54
|
}
|
|
64
55
|
function isValidRecordedAttempt(attempt) {
|
|
65
|
-
return
|
|
56
|
+
return attempt !== void 0 && Number.isSafeInteger(attempt) && attempt > 0;
|
|
66
57
|
}
|
|
67
58
|
function recordedAttemptFieldsMatch(started, terminal, fields = []) {
|
|
68
59
|
if (!fields.includes("attempt")) return true;
|
|
69
|
-
return isValidRecordedAttempt(started.attempt) && isValidRecordedAttempt(terminal.attempt);
|
|
70
|
-
}
|
|
71
|
-
function eventFieldsMatch(left, right, fields = []) {
|
|
72
|
-
return fields.every((field) => getEventField(left, field) === getEventField(right, field));
|
|
73
|
-
}
|
|
74
|
-
function getEventField(event, field) {
|
|
75
|
-
return Reflect.get(event, field);
|
|
60
|
+
return "attempt" in started && isValidRecordedAttempt(started.attempt) && "attempt" in terminal && isValidRecordedAttempt(terminal.attempt);
|
|
76
61
|
}
|
|
77
62
|
function terminalStepEventId(event) {
|
|
78
63
|
if (isWorkflowTerminalStepAttemptEvent(event)) return event.stepId;
|
|
@@ -107,4 +92,4 @@ function isStaleMessageWaitTerminalBeforeLaterStart(events, event) {
|
|
|
107
92
|
return events.slice(terminalIndex + 1).some((started) => started.kind === "message_wait_started" && started.stepId === event.stepId && started.stepName === event.stepName && started.messageId === event.messageId);
|
|
108
93
|
}
|
|
109
94
|
//#endregion
|
|
110
|
-
export { requireWorkflowStartedEventsAreUnique, requireWorkflowTerminalEventsAreUnique, requireWorkflowTerminalEventsHaveStartedEvents,
|
|
95
|
+
export { requireWorkflowStartedEventsAreUnique, requireWorkflowTerminalEventsAreUnique, requireWorkflowTerminalEventsHaveStartedEvents, workflowStartedEventMatchesTerminalEvent };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HookTokenPayload } from "./types/hook.mjs";
|
|
2
|
+
//#region src/hook-token.d.ts
|
|
3
|
+
export declare const WORKFLOW_HOOK_TOKEN_PREFIX = "temelj-hook:";
|
|
4
|
+
export declare const WORKFLOW_HOOK_TOKEN_VERSION = "v1";
|
|
5
|
+
/** Decodes a hook or webhook token without resuming it, and throws WorkflowHookError when invalid. */
|
|
6
|
+
export declare function parseHookToken(token: string): HookTokenPayload;
|
|
7
|
+
//#endregion
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { idSchema, nonBlankStringSchema } from "./schema/common.mjs";
|
|
2
|
+
import { WorkflowHookError } from "./errors/hook.mjs";
|
|
3
|
+
import "./errors/mod.mjs";
|
|
4
|
+
import { persistedValueSchema } from "./schema/persisted-value.mjs";
|
|
5
|
+
import { ss } from "@temelj/standard-schema";
|
|
6
|
+
import { decodeBase64UrlString } from "@temelj/string";
|
|
7
|
+
//#region src/hook-token.ts
|
|
8
|
+
const WORKFLOW_HOOK_TOKEN_PREFIX = "temelj-hook:";
|
|
9
|
+
const WORKFLOW_HOOK_TOKEN_VERSION = "v1";
|
|
10
|
+
const hookTokenPayloadSchema = ss.object({
|
|
11
|
+
runId: idSchema,
|
|
12
|
+
name: nonBlankStringSchema,
|
|
13
|
+
messageId: idSchema,
|
|
14
|
+
kind: ss.picklist(["hook", "webhook"]),
|
|
15
|
+
metadata: ss.optional(persistedValueSchema)
|
|
16
|
+
});
|
|
17
|
+
/** Decodes a hook or webhook token without resuming it, and throws WorkflowHookError when invalid. */
|
|
18
|
+
function parseHookToken(token) {
|
|
19
|
+
const versionPrefix = `${WORKFLOW_HOOK_TOKEN_PREFIX}v1:`;
|
|
20
|
+
if (!token.startsWith(versionPrefix)) WorkflowHookError.tokenInvalid();
|
|
21
|
+
let payload;
|
|
22
|
+
try {
|
|
23
|
+
payload = JSON.parse(decodeBase64UrlString(token.slice(versionPrefix.length)));
|
|
24
|
+
} catch {
|
|
25
|
+
WorkflowHookError.tokenInvalid();
|
|
26
|
+
}
|
|
27
|
+
const hook = ss.safeParseSync(hookTokenPayloadSchema, payload);
|
|
28
|
+
if (!hook.success) WorkflowHookError.tokenInvalid();
|
|
29
|
+
return hook.value;
|
|
30
|
+
}
|
|
31
|
+
//#endregion
|
|
32
|
+
export { WORKFLOW_HOOK_TOKEN_PREFIX, WORKFLOW_HOOK_TOKEN_VERSION, parseHookToken };
|
package/dist/ids.d.mts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { WorkerId } from "./types/ids.mjs";
|
|
2
|
+
import { RecordedIdContext } from "./types/engine-options.mjs";
|
|
3
|
+
//#region src/ids.d.ts
|
|
4
|
+
/** Creates a default worker identifier using the current time and a random suffix. */
|
|
5
|
+
export declare function createDefaultWorkerId(): WorkerId;
|
|
6
|
+
export declare function createDefaultRunIdFactory(now?: () => Temporal.Instant): () => string;
|
|
7
|
+
export declare function createDefaultRecordedIdFactory(createRunId: () => string): (context: RecordedIdContext) => string;
|
|
8
|
+
//#endregion
|
package/dist/ids.mjs
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
//#region src/ids.ts
|
|
2
|
+
/** Converts arbitrary command ID text into a stable segment safe for recorded IDs. */
|
|
3
|
+
function sanitizeRecordedIdPart(value) {
|
|
4
|
+
const sanitized = value.replaceAll(/[^a-zA-Z0-9_-]/g, "_");
|
|
5
|
+
return sanitized === "" ? "run" : sanitized;
|
|
6
|
+
}
|
|
7
|
+
/** Creates a default worker identifier using the current time and a random suffix. */
|
|
8
|
+
function createDefaultWorkerId() {
|
|
9
|
+
return `worker_${Temporal.Now.instant().epochMilliseconds.toString(36)}_${Math.random().toString(36).slice(2)}`;
|
|
10
|
+
}
|
|
11
|
+
function createDefaultRunIdFactory(now = Temporal.Now.instant) {
|
|
12
|
+
return () => `run_${now().epochMilliseconds.toString(36)}_${randomIdPart()}`;
|
|
13
|
+
}
|
|
14
|
+
function createDefaultRecordedIdFactory(createRunId) {
|
|
15
|
+
return (context) => `wf_${sanitizeRecordedIdPart(context.runId)}_${createRunId()}`;
|
|
16
|
+
}
|
|
17
|
+
function randomIdPart() {
|
|
18
|
+
return Math.random().toString(36).slice(2);
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
export { createDefaultRecordedIdFactory, createDefaultRunIdFactory, createDefaultWorkerId };
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
import { BroadcastMessageChannelOptions, BroadcastMessageInput, BroadcastMessageOptions, MessageChannel, SendMessageChannelOptions, SendMessageInput, SendMessageOptions,
|
|
1
|
+
import { BroadcastMessageChannelOptions, BroadcastMessageInput, BroadcastMessageOptions, MessageChannel, SendMessageChannelOptions, SendMessageInput, SendMessageOptions, WaitForMessageOptions } from "./types/message.mjs";
|
|
2
|
+
import { StepMessageApi } from "./types/step.mjs";
|
|
2
3
|
import { Schema } from "@temelj/standard-schema";
|
|
4
|
+
import { StorageValue } from "@temelj/storage";
|
|
3
5
|
//#region src/message-options.d.ts
|
|
4
|
-
declare function resolveSendMessageInput<TPayload,
|
|
5
|
-
declare function resolveBroadcastMessageInput<TPayload,
|
|
6
|
-
|
|
6
|
+
export declare function resolveSendMessageInput<TPayload, TRawPayload>(messageInput: SendMessageInput | MessageChannel<TPayload, TRawPayload>, channelOptions: SendMessageChannelOptions<TRawPayload> | undefined): Promise<SendMessageOptions>;
|
|
7
|
+
export declare function resolveBroadcastMessageInput<TPayload, TRawPayload>(messageInput: BroadcastMessageInput | MessageChannel<TPayload, TRawPayload>, channelOptions: BroadcastMessageChannelOptions<TRawPayload> | undefined): Promise<BroadcastMessageOptions>;
|
|
8
|
+
interface MessageWaitExecutor {
|
|
9
|
+
<TPayload>(options: WaitForMessageOptions<Schema<unknown, TPayload> | undefined>): Promise<TPayload | StorageValue | undefined>;
|
|
10
|
+
}
|
|
11
|
+
/** Dispatches raw and schema-validated waits without erasing the schema output type. */
|
|
12
|
+
export declare function createMessageWait(execute: MessageWaitExecutor): StepMessageApi["wait"];
|
|
7
13
|
//#endregion
|
|
8
|
-
export {
|
|
14
|
+
export {};
|
package/dist/message-options.mjs
CHANGED
|
@@ -9,17 +9,19 @@ async function resolveBroadcastMessageInput(messageInput, channelOptions) {
|
|
|
9
9
|
if ("messageId" in messageInput) return messageInput;
|
|
10
10
|
if ("channel" in messageInput) return {
|
|
11
11
|
...await resolveMessageChannelSend(messageInput.channel, messageInput),
|
|
12
|
-
|
|
12
|
+
target: messageInput.target
|
|
13
13
|
};
|
|
14
14
|
return {
|
|
15
15
|
...await resolveMessageChannelSend(messageInput, channelOptions),
|
|
16
|
-
|
|
16
|
+
target: channelOptions?.target
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
/** Dispatches raw and schema-validated waits without erasing the schema output type. */
|
|
20
|
+
function createMessageWait(execute) {
|
|
21
|
+
async function wait(input, options) {
|
|
22
|
+
return await execute("messageId" in input ? input : resolveMessageChannelWait(input, options));
|
|
23
|
+
}
|
|
24
|
+
return wait;
|
|
23
25
|
}
|
|
24
26
|
//#endregion
|
|
25
|
-
export { resolveBroadcastMessageInput, resolveSendMessageInput
|
|
27
|
+
export { createMessageWait, resolveBroadcastMessageInput, resolveSendMessageInput };
|
package/dist/mod.d.mts
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { WorkflowErrorCode
|
|
2
|
-
import { MessageId } from "./types/
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { Cursor,
|
|
7
|
-
import { ListSchedulesOptions, ListSchedulesPageOptions, ScheduleCatchUpPolicy, ScheduleConfig, ScheduleId, ScheduleOverlapPolicy, ScheduleRecord, ScheduleStatus, TickSchedulesOptions, TickSchedulesResult
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
1
|
+
import { WorkflowErrorCode } from "./errors/codes.mjs";
|
|
2
|
+
import { MessageId, RunId, StepId, StreamId, StreamIdOrName, WorkerId } from "./types/ids.mjs";
|
|
3
|
+
import { RetryableErrorOptions, WorkflowErrorOptions, WorkflowErrorRecord } from "./types/error.mjs";
|
|
4
|
+
import { CleanupMarkerRecord, CleanupMode, CleanupRunResult, CleanupRunsOptions, CleanupRunsResult, CleanupStatusFilter, RetentionPolicyOptions } from "./types/cleanup.mjs";
|
|
5
|
+
import { CreateHookOptions, CreateWebhookOptions, Hook, HookInspection, HookInspectionStatus, HookKind, HookTokenPayload, ResumeHookOptions, StepHookCreateApi, Webhook } from "./types/hook.mjs";
|
|
6
|
+
import { Cursor, PageOptions, WorkflowPage } from "./types/pagination.mjs";
|
|
7
|
+
import { ListSchedulesOptions, ListSchedulesPageOptions, ScheduleCatchUpPolicy, ScheduleConfig, ScheduleId, ScheduleOverlapPolicy, ScheduleRecord, ScheduleStatus, TickSchedulesOptions, TickSchedulesResult } from "./types/schedule.mjs";
|
|
8
|
+
import { MissingImplementationRetryConfig, RetryConfig } from "./types/retry.mjs";
|
|
9
|
+
import { DefinitionConfig, DefinitionTypes, InputFromSchema, RawInputFromSchema, RegistryLike, RunContext, StartTarget, WorkflowContext, WorkflowDefinition, WorkflowHandler, WorkflowImplementation } from "./types/definition.mjs";
|
|
10
|
+
import { AcquireLockOptions, LockRecord, ReleaseLockOptions, ReleaseStaleLockOptions, StepAcquireLockOptions, StepReleaseLockOptions } from "./types/lock.mjs";
|
|
11
|
+
import { ListRunsOptions, ListRunsPageOptions, ListStepAttemptsPageOptions } from "./types/run-list.mjs";
|
|
12
|
+
import { BroadcastMessageChannelObject, BroadcastMessageChannelOptions, BroadcastMessageInput, BroadcastMessageOptions, BroadcastMessageResult, MessageChannel, MessageChannelConfig, MessageSender, SendMessageChannelObject, SendMessageChannelOptions, SendMessageInput, SendMessageOptions, WaitForMessageChannelOptions, WaitForMessageOptions } from "./types/message.mjs";
|
|
13
|
+
import { CreateStreamOptions, FollowStreamOptions, ReadStreamOptions, Stream, StreamChunk, StreamChunkUpdate, StreamInfo, StreamState, StreamStatus, StreamTerminalUpdate, StreamUpdate, StreamUpdateKind, WaitStreamOptions } from "./types/stream.mjs";
|
|
14
|
+
import { ChildWorkflowCancellationPolicy, DeterministicApi, StepApi, StepDefinition, StepDefinitionHandler, StepDefinitionTypes, StepHookApi, StepLockApi, StepMessageApi, StepMetadata, StepRunConfig, StepRunDataApi, StepRunWorkflowOptions, StepStartWorkflowOptions, StepStreamApi, StepTaskApi, StepWorkflowApi, WorkflowStepContext } from "./types/step.mjs";
|
|
15
|
+
import { NextLock, NextRun, NextSchedule, NextSleep, NextStep, RecoveryChildWorkflowWaitSummary, RecoveryDueSummary, RecoveryFailedSummary, RecoveryLeaseSummary, RecoveryLockSummary, RecoveryMessageWaitSummary, RecoveryRetrySummary, RecoveryScheduleSummary, RecoverySleepWaitSummary, RecoverySummary, RecoveryWaitSummary, RunChildWorkflowSummary, RunCleanupSummary, RunFailureErrorSummary, RunFailureSummary, RunHookSummary, RunLeaseSummary, RunMessageSummary, RunRetryReasonCounts, RunRetrySummary, RunSleepSummary, RunStatusCounts, RunStreamSummary, RunSummary, RunTransitionReasonCounts, RunTransitionSummary, RunWaitSummary, RunWorkflowCount, TerminalRunStatusCounts } from "./types/summary.mjs";
|
|
16
|
+
import { ActiveChildWorkflowSummary, ActiveMessageWaitSummary, ActiveSleepSummary, ListStepAttemptsOptions, NextAttempt, NextAttemptSleep, StepAttemptFailureErrorSummary, StepAttemptFailureSummary, StepAttemptKindAttemptKeys, StepAttemptKindStepIds, StepAttemptRecord, StepAttemptStatus, StepAttemptStatusAttemptKeys, StepAttemptStatusStepIds, StepAttemptSummary } from "./types/step-attempts.mjs";
|
|
17
|
+
import { ChildWorkflowStartedObservationEvent, CleanupObservationEvent, DurableEventObservationEvent, MessageObservationEvent, ObservationEventArgs, ObservationEventHandler, ObservationEventMap, ObservationEventPattern, ResumeObservationEvent, ScheduleRunCreatedObservationEvent, ScheduleTickObservationEvent, StepAttemptObservationEvent, StreamObservationEvent, WorkerOperationObservationEvent } from "./types/observation.mjs";
|
|
18
|
+
import { CompletedResult, ExecutionResult, ExecutionResultKind, FailedResult, ResultOptions, WaitingResult } from "./types/result.mjs";
|
|
19
|
+
import { RunTelemetryContext, RunTelemetryResultContext, StepTelemetryContext, StepTelemetryResultContext, StorageTelemetryContext, StorageTelemetryOperation, Telemetry, TelemetryContext, TelemetryEngine } from "./types/telemetry.mjs";
|
|
20
|
+
import { AttributePatch, MaterializedStepType, RunAttributes, RunLinks, RunRecord, RunRetryReason, RunStatus, RunTransitionReason, StepType, TerminalRunStatus, WorkflowAttributeValue, WorkflowLifecycleCallback, WorkflowLifecycleEvent } from "./types/run.mjs";
|
|
21
|
+
import { AttributesSetEvent, ChildWorkflowCompletedEvent, ChildWorkflowEventKind, ChildWorkflowFailedEvent, ChildWorkflowStartedEvent, DataEventKind, DeterministicEventKind, DeterministicValueRecordedEvent, EventKind, EventRecord, MessageEventKind, MessageSendCompletedEvent, MessageSendFailedEvent, MessageSendStartedEvent, MessageSentEvent, MessageWaitCompletedEvent, MessageWaitFailedEvent, MessageWaitSource, MessageWaitStartedEvent, MetadataSetEvent, RunEventKind, SleepCompletedEvent, SleepEventKind, SleepStartedEvent, StepCompletedEvent, StepEventKind, StepFailedEvent, StepStartedEvent, StreamChunkEvent, StreamClosedEvent, StreamEventKind, StreamFailedEvent, StreamStartedEvent } from "./types/events.mjs";
|
|
22
|
+
import { WorkflowBundle, defineWorkflowBundle } from "./bundle.mjs";
|
|
23
|
+
import { WakeDueRunsOptions, WorkerLeaseOptions, WorkerRunFilterOptions, WorkerRunOptions, WorkerRunResult, WorkflowWorker } from "./types/worker.mjs";
|
|
24
|
+
import { CreateWorkflowEngineOptions, DeterministicBytesContext, ExecutionLimits, RecordedIdContext } from "./types/engine-options.mjs";
|
|
25
|
+
import { BatchStartItem, MarkRunPermanentlyFailedOptions, ReleaseStaleLeaseOptions, RerunOptions, RescheduleRunOptions, RetryFailedRunOptions, RunArguments, RunParentOptions, ScheduleNextOptions, StartOptions, VersionResolver } from "./types/run-options.mjs";
|
|
26
|
+
import { getWorkflowFunctionDefinition, getWorkflowStepFunctionDefinition, registerWorkflowFunctions } from "./compiled-function.mjs";
|
|
27
|
+
import { RunHandle, RuntimeRunsApi, WorkflowRuntime } from "./types/runtime.mjs";
|
|
28
|
+
import { Timeline, TimelineEntry } from "./types/timeline.mjs";
|
|
29
|
+
import { ClientAdminApi, ClientHooksApi, ClientLocksApi, ClientMessagesApi, ClientProcessRunOptions, ClientRunsApi, ClientSchedulesApi, ClientStreamsApi, ClientWorkerOptions, ClientWorkersApi, CompiledWorkflowFunction, RunStreamsApi, WorkflowClient, WorkflowRunHandle } from "./types/client.mjs";
|
|
30
30
|
import { CreateWorkflowClientOptions, createWorkflowClient } from "./client/create.mjs";
|
|
31
31
|
import "./client/mod.mjs";
|
|
32
32
|
import { defineMessageChannel, defineWorkflow, implementWorkflow } from "./definition.mjs";
|
|
@@ -39,15 +39,11 @@ import { WorkflowImplementationNotFoundError } from "./errors/implementation.mjs
|
|
|
39
39
|
import { WorkflowLockError, WorkflowLockStateError } from "./errors/lock.mjs";
|
|
40
40
|
import { WorkflowHookDisposedError, WorkflowMessageDeliveryError, WorkflowMessageIdempotencyConflictError, WorkflowMessageWaitTimeoutError } from "./errors/message.mjs";
|
|
41
41
|
import { WorkflowChildWorkflowTimeoutError, WorkflowResultTimeoutError, WorkflowRunCanceledError, WorkflowRunCancellationError, WorkflowRunDeadlineExceededError, WorkflowRunInvalidError, WorkflowRunMismatchError, WorkflowRunNotFoundError, WorkflowRunParentError, WorkflowRunTransitionError } from "./errors/run.mjs";
|
|
42
|
-
import { WorkflowRuntimeError } from "./errors/runtime.mjs";
|
|
43
42
|
import { WorkflowScheduleAlreadyExistsError, WorkflowScheduleError } from "./errors/schedule.mjs";
|
|
44
43
|
import { WorkflowStepAttemptLimitError, WorkflowStepExecutionError, WorkflowStepRetryLimitError, WorkflowStepTimeoutError } from "./errors/step.mjs";
|
|
45
44
|
import { WorkflowStreamError, WorkflowStreamNotFoundError } from "./errors/stream.mjs";
|
|
46
|
-
import {
|
|
45
|
+
import { matchesWorkflowError } from "./errors/records.mjs";
|
|
47
46
|
import "./errors/mod.mjs";
|
|
48
|
-
import { attachWorkflowDefinition, attachWorkflowStepDefinition, callWorkflowStepFunction, getCompiledWorkflowDefinition, getCompiledWorkflowStepDefinition, getWorkflowFunctionDefinition, getWorkflowStepFunctionDefinition, registerWorkflowFunctions, runWorkflowFunction } from "./compiled-function.mjs";
|
|
49
|
-
import { CreateWorkflowRuntimeOptions, WorkflowRuntimeLocksApi, WorkflowRuntimeRunsApi, WorkflowRuntimeSchedulesApi, parseWorkflowRuntime, workflowRuntimeSchema } from "./types/runtime.mjs";
|
|
50
|
-
import { WorkflowRuntime, createWorkflowRuntime, getWorkflowRuntimeRun, startWorkflowRuntimeRun } from "./runtime.mjs";
|
|
51
47
|
import { defineWorkflowStep } from "./step-definition.mjs";
|
|
52
|
-
import {
|
|
53
|
-
export { type AcquireLockOptions, type AttributesSetEvent, type BroadcastMessageChannelObject, type BroadcastMessageChannelOptions, type BroadcastMessageInput, type BroadcastMessageOptions, type BroadcastMessageResult, type ChildWorkflowCompletedEvent, type ChildWorkflowEventKind, type ChildWorkflowFailedEvent, type ChildWorkflowStartedEvent, type ChildWorkflowStartedObservationEvent, type CleanupMarkerRecord, type CleanupMode, type CleanupObservationEvent, type CleanupRunResult, type CleanupRunsOptions, type CleanupRunsResult, type CleanupStatusFilter, type CompiledWorkflowFunction, type CompletedResult, type CreateHookOptions, type CreateStreamOptions, type CreateWebhookOptions, type CreateWorkflowClientOptions, type CreateWorkflowEngineOptions, type CreateWorkflowRuntimeOptions, type CreateWorkflowWorkerOptions, type Cursor, type CursorKeyPart, type CursorPayload, type DataEventKind, type DeterministicEventKind, type DeterministicValueRecordedEvent, type DurableEventObservationEvent, type EventDescriptor, type EventDescriptorCategory, type EventDescriptorStepAttempt, type EventKind, type EventRecord, type ExecutionResult, type ExecutionResultBase, type ExecutionResultKind, type FailedResult, type FollowStreamOptions, type HandleOperations, type Hook, type HookCreator, type HookInspection, type HookInspectionStatus, type HookKind, type HookToken, type HookTokenPayload, type ListSchedulesOptions, type ListSchedulesPageOptions, type LockRecord, type MessageChannel, type MessageChannelConfig, type MessageChannelKeyArgs, type MessageChannelTypes, type MessageEventKind, type MessageId, type MessageObservationEvent, type MessageSendCompletedEvent, type MessageSendFailedEvent, type MessageSendStartedEvent, type MessageSentEvent, type MessageSentPayload, type MessageWaitCompletedEvent, type MessageWaitFailedEvent, type MessageWaitSource, type MessageWaitStartedEvent, type MetadataSetEvent, type ObservationEmitter, type ObservationEventHandler, type ObservationEventMap, type ObservationEventPattern, type ObservationUnsubscribe, type PageDirection, type PageOptions, type ParsedWorkflowHookToken, type ParsedWorkflowWebhookToken, type ReadStreamOptions, type ReadStreamPageOptions, type Registry, type RegistryLike, type ReleaseLockOptions, type ReleaseStaleLockOptions, type ResultOptions, type ResumeHookOptions, type ResumeObservationEvent, type ResumeWebhookOptions, type RetentionPolicyOptions, type RunId, type RunObservationEvent, type RunTelemetryContext, type RunTelemetryResultContext, type ScheduleCatchUpPolicy, type ScheduleConfig, type ScheduleId, type ScheduleNextOptions, type ScheduleOverlapPolicy, type ScheduleRecord, type ScheduleRunCreatedObservationEvent, type ScheduleStatus, type ScheduleTickObservationEvent, type SendMessageChannelObject, type SendMessageChannelOptions, type SendMessageInput, type SendMessageOptions, type SleepCompletedEvent, type SleepEventKind, type SleepStartedEvent, type StepAttemptObservationEvent, type StepId, type StepTelemetryContext, type StepTelemetryResultContext, type StorageTelemetryContext, type StorageTelemetryOperation, type Stream, type StreamChunk, type StreamChunkEvent, type StreamChunkUpdate, type StreamClosedEvent, type StreamEventKind, type StreamFailedError, type StreamFailedEvent, type StreamInfo, type StreamObservationEvent, type StreamPage, type StreamStartedEvent, type StreamState, type StreamStatus, type StreamTerminalUpdate, type StreamUpdate, type StreamUpdateBase, type StreamUpdateKind, type Telemetry, type TelemetryContext, type TelemetryEngine, type TickSchedulesOptions, type TickSchedulesResult, type Timeline, type TimelineAttributesEntry, type TimelineChildWorkflowEntry, type TimelineChildWorkflowStatus, type TimelineDeterministicEntry, type TimelineEntry, type TimelineEntryKind, type TimelineEntryRecord, type TimelineMessageEntry, type TimelineMessageStatus, type TimelineMetadataEntry, type TimelineRecordedStatus, type TimelineSetStatus, type TimelineSleepEntry, type TimelineSleepStatus, type TimelineStepEntry, type TimelineStepStatus, type TimelineStreamEntry, type TimelineStreamStatus, type TimelineWorkflowEntry, type TimelineWorkflowStatus, type WORKFLOW_ATTRIBUTE_MAX_COUNT, type WORKFLOW_ATTRIBUTE_MAX_KEY_LENGTH, type WORKFLOW_ATTRIBUTE_MAX_VALUE_BYTES, type WORKFLOW_ATTRIBUTE_RESERVED_PREFIX, type WaitForMessageChannelObject, type WaitForMessageChannelOptions, type WaitForMessageInput, type WaitForMessageOptions, type WaitStreamOptions, type WaitingResult, type Webhook, type WebhookCreator, WebhookResumer, type WorkerOperationObservationEvent, type WorkflowActiveChildWorkflowSummary, type WorkflowActiveMessageWaitSummary, type WorkflowAttributePatch, type WorkflowAttributeValue, type WorkflowBatchStartItem, WorkflowBundle, WorkflowBundleEntry, WorkflowCapabilityError, type WorkflowChildWorkflowCancellationPolicy, WorkflowChildWorkflowTimeoutError, type WorkflowClient, type WorkflowClientAdminApi, type WorkflowClientHooksApi, type WorkflowClientLocksApi, type WorkflowClientMessagesApi, type WorkflowClientProcessRunOptions, type WorkflowClientRunsApi, type WorkflowClientSchedulesApi, type WorkflowClientStreamsApi, type WorkflowClientWorkerOptions, type WorkflowClientWorkersApi, type WorkflowContext, type WorkflowDefinition, type WorkflowDefinitionConfig, WorkflowDefinitionError, type WorkflowDefinitionTypes, type WorkflowDeterministicApi, type WorkflowDeterministicBytesContext, type WorkflowDeterministicValueContext, WorkflowDurationError, type WorkflowEngineSerializationLimits, WorkflowError, WorkflowErrorCode, type WorkflowErrorCode as WorkflowErrorCodeType, type WorkflowErrorOptions, type WorkflowErrorRecord, type WorkflowEvent, type WorkflowExecutionLimits, type WorkflowHandle, type WorkflowHandler, WorkflowHookDisposedError, WorkflowHookError, type WorkflowImplementation, WorkflowImplementationNotFoundError, type WorkflowInputFromSchema, type WorkflowLifecycleCallback, type WorkflowLifecycleEvent, type WorkflowListRunsOptions, type WorkflowListRunsPageOptions, type WorkflowListStepAttemptsOptions, type WorkflowListStepAttemptsPageOptions, WorkflowLockError, WorkflowLockStateError, type WorkflowMarkRunPermanentlyFailedOptions, type WorkflowMaterializedStepType, WorkflowMessageDeliveryError, WorkflowMessageError, WorkflowMessageIdempotencyConflictError, WorkflowMessageWaitTimeoutError, type WorkflowMissingImplementationRetryConfig, WorkflowNonRetryableError, type WorkflowNonRetryableErrorOptions, WorkflowOptionsError, type WorkflowPage, WorkflowPermanentFailureError, type WorkflowRawInputFromSchema, type WorkflowRecordedIdContext, type WorkflowRecoveryChildWorkflowWaitSummary, type WorkflowRecoveryDueSummary, type WorkflowRecoveryFailedSummary, type WorkflowRecoveryLeaseSummary, type WorkflowRecoveryLockSummary, type WorkflowRecoveryMessageWaitSummary, type WorkflowRecoveryMissingImplementationSummary, type WorkflowRecoveryRetrySummary, type WorkflowRecoveryScheduleSummary, type WorkflowRecoverySleepWaitSummary, type WorkflowRecoverySummary, type WorkflowRecoverySummaryOptions, type WorkflowRecoveryWaitSummary, type WorkflowReleaseStaleLeaseOptions, WorkflowReplayDivergenceError, type WorkflowRerunOptions, type WorkflowRescheduleRunOptions, WorkflowResultTimeoutError, type WorkflowRetryConfig, type WorkflowRetryFailedRunOptions, WorkflowRetryableError, type WorkflowRetryableErrorOptions, type WorkflowRunArguments, type WorkflowRunAttributes, WorkflowRunCanceledError, WorkflowRunCancellationError, type WorkflowRunChildWorkflowSummary, type WorkflowRunCleanupSummary, type WorkflowRunContext, WorkflowRunDeadlineExceededError, WorkflowRunError, type WorkflowRunEvent, type WorkflowRunEventKind, type WorkflowRunFailureErrorSummary, type WorkflowRunFailureSummary, type WorkflowRunHandle, type WorkflowRunHookSummary, WorkflowRunInvalidError, type WorkflowRunLeaseSummary, type WorkflowRunMessageSummary, WorkflowRunMismatchError, WorkflowRunNotFoundError, WorkflowRunParentError, type WorkflowRunParentOptions, type WorkflowRunRecord, type WorkflowRunRetryReason, type WorkflowRunRetryReasonCounts, type WorkflowRunRetrySummary, type WorkflowRunSleepSummary, type WorkflowRunStatus, type WorkflowRunStatusCounts, type WorkflowRunStatusRunIds, type WorkflowRunStreamSummary, type WorkflowRunSummary, type WorkflowRunSummaryOptions, WorkflowRunTransitionError, type WorkflowRunTransitionReason, type WorkflowRunTransitionReasonCounts, type WorkflowRunTransitionReasonRunIds, type WorkflowRunTransitionSummary, type WorkflowRunWorkflowCount, type WorkflowRunWorkflowName, type WorkflowRunWorkflowSummary, type WorkflowRunWorkflowVersion, type WorkflowRunnable, WorkflowRuntime, WorkflowRuntimeError, type WorkflowRuntimeLocksApi, type WorkflowRuntimeRunsApi, type WorkflowRuntimeSchedulesApi, WorkflowScheduleAlreadyExistsError, WorkflowScheduleError, WorkflowSerializationError, type WorkflowStartOptions, type WorkflowStartTarget, WorkflowStateError, type WorkflowStepAcquireLockOptions, type WorkflowStepApi, type WorkflowStepAttemptFailureErrorSummary, type WorkflowStepAttemptFailureSummary, type WorkflowStepAttemptKindAttemptKeys, type WorkflowStepAttemptKindCounts, type WorkflowStepAttemptKindStepIds, WorkflowStepAttemptLimitError, type WorkflowStepAttemptRecord, type WorkflowStepAttemptStatus, type WorkflowStepAttemptStatusAttemptKeys, type WorkflowStepAttemptStatusCounts, type WorkflowStepAttemptStatusStepIds, type WorkflowStepAttemptSummary, type WorkflowStepCompletedEvent, type WorkflowStepContext, type WorkflowStepDefinition, type WorkflowStepDefinitionHandler, type WorkflowStepDefinitionTypes, type WorkflowStepDeterministicApi, WorkflowStepError, type WorkflowStepEventKind, WorkflowStepExecutionError, type WorkflowStepFailedEvent, type WorkflowStepHookApi, type WorkflowStepHookCreateApi, type WorkflowStepIdentity, type WorkflowStepLockApi, type WorkflowStepMessageApi, type WorkflowStepMetadata, type WorkflowStepReleaseLockOptions, type WorkflowStepRetryConfig, WorkflowStepRetryLimitError, type WorkflowStepRunConfig, type WorkflowStepRunDataApi, type WorkflowStepRunWorkflowOptions, type WorkflowStepStartWorkflowOptions, type WorkflowStepStartedEvent, type WorkflowStepStreamApi, type WorkflowStepTaskApi, WorkflowStepTimeoutError, type WorkflowStepType, type WorkflowStepWorkflowApi, WorkflowStreamError, WorkflowStreamNotFoundError, type WorkflowTerminalRunStatus, type WorkflowTerminalRunStatusCounts, type WorkflowTerminalRunStatusRunIds, type WorkflowValueIssue, type WorkflowVersionResolver, type WorkflowWakeDueRunsOptions, type WorkflowWorker, type WorkflowWorkerLeaseOptions, type WorkflowWorkerRunFilterOptions, type WorkflowWorkerRunOptions, type WorkflowWorkerRunResult, attachWorkflowDefinition, attachWorkflowStepDefinition, callWorkflowStepFunction, createWorkflowBundleRegistry, createWorkflowClient, createWorkflowRuntime, defineMessageChannel, defineWorkflow, defineWorkflowBundle, defineWorkflowStep, getCompiledWorkflowDefinition, getCompiledWorkflowStepDefinition, getWorkflowFunctionDefinition, getWorkflowRuntimeRun, getWorkflowStepFunctionDefinition, implementWorkflow, parseWebhookToken, parseWorkflowRuntime, type persistedValueIssue, registerWorkflowFunctions, resumeWebhook, runWorkflowFunction, type scheduleIdSchema, startWorkflowRuntimeRun, type workflowAttributeKeySchema, type workflowAttributePatchSchema, type workflowAttributePrimitiveValueSchema, type workflowAttributeValueSchema, type workflowAttributesSetEventSchema, type workflowChildWorkflowCancellationPolicySchema, type workflowChildWorkflowCompletedEventSchema, type workflowChildWorkflowEventKindSchema, type workflowChildWorkflowFailedEventSchema, type workflowChildWorkflowStartedEventSchema, type workflowCleanupMarkerRecordSchema, type workflowCleanupModeSchema, type workflowCompletedEventSchema, type workflowCursorKeyPartSchema, type workflowCursorPayloadSchema, type workflowCursorSchema, type workflowDataEventKindSchema, type workflowDeterministicEventKindSchema, type workflowDeterministicValueRecordedEventSchema, workflowErrorCodeSchema, workflowErrorRecordSchema, workflowErrorRecordView, type workflowEventKindSchema, type workflowEventRecordListSchema, type workflowEventRecordSchema, type workflowFailedEventSchema, type workflowLockRecordSchema, type workflowMaterializedStepTypeSchema, type workflowMessageEventKindSchema, type workflowMessageSendCompletedEventSchema, type workflowMessageSendFailedEventSchema, type workflowMessageSendStartedEventSchema, type workflowMessageSentEventSchema, type workflowMessageWaitCompletedEventSchema, type workflowMessageWaitFailedEventSchema, type workflowMessageWaitSourceSchema, type workflowMessageWaitStartedEventSchema, type workflowMessageWaiterStepIdsSchema, type workflowMetadataSetEventSchema, type workflowPageDirectionSchema, type workflowPersistedValueSchema, type workflowRunAttributesSchema, type workflowRunEventKindSchema, type workflowRunRecordSchema, type workflowRunRetryReasonSchema, type workflowRunStatusSchema, type workflowRunTransitionReasonSchema, workflowRuntimeSchema, type workflowScheduleCatchUpPolicySchema, type workflowScheduleOverlapPolicySchema, type workflowSchedulePositiveDurationSchema, type workflowScheduleRecordSchema, type workflowScheduleStatusSchema, type workflowSleepCompletedEventSchema, type workflowSleepEventKindSchema, type workflowSleepStartedEventSchema, type workflowStartedEventSchema, type workflowStepAttemptRecordSchema, type workflowStepAttemptStatusSchema, type workflowStepCompletedEventSchema, type workflowStepEventKindSchema, type workflowStepFailedEventSchema, type workflowStepStartedEventSchema, type workflowStepTypeSchema, type workflowStreamChunkEventSchema, type workflowStreamClosedEventSchema, type workflowStreamEventKindSchema, type workflowStreamFailedEventSchema, type workflowStreamStartedEventSchema, type workflowTelemetryContextSchema, type workflowTerminalRunStatusSchema };
|
|
48
|
+
import { parseHookToken } from "./hook-token.mjs";
|
|
49
|
+
export { type AcquireLockOptions, type ActiveChildWorkflowSummary, type ActiveMessageWaitSummary, type ActiveSleepSummary, type AttributePatch, type AttributesSetEvent, type BatchStartItem, type BroadcastMessageChannelObject, type BroadcastMessageChannelOptions, type BroadcastMessageInput, type BroadcastMessageOptions, type BroadcastMessageResult, type ChildWorkflowCancellationPolicy, type ChildWorkflowCompletedEvent, type ChildWorkflowEventKind, type ChildWorkflowFailedEvent, type ChildWorkflowStartedEvent, type ChildWorkflowStartedObservationEvent, type CleanupMarkerRecord, type CleanupMode, type CleanupObservationEvent, type CleanupRunResult, type CleanupRunsOptions, type CleanupRunsResult, type CleanupStatusFilter, type ClientAdminApi, type ClientHooksApi, type ClientLocksApi, type ClientMessagesApi, type ClientProcessRunOptions, type ClientRunsApi, type ClientSchedulesApi, type ClientStreamsApi, type ClientWorkerOptions, type ClientWorkersApi, type CompiledWorkflowFunction, type CompletedResult, type CreateHookOptions, type CreateStreamOptions, type CreateWebhookOptions, type CreateWorkflowClientOptions, type CreateWorkflowEngineOptions, type Cursor, type DataEventKind, type DefinitionConfig, type DefinitionTypes, type DeterministicApi, type DeterministicBytesContext, type DeterministicEventKind, type DeterministicValueRecordedEvent, type DurableEventObservationEvent, type EventKind, type EventRecord, type ExecutionLimits, type ExecutionResult, type ExecutionResultKind, type FailedResult, type FollowStreamOptions, type Hook, type HookInspection, type HookInspectionStatus, type HookKind, type HookTokenPayload, type InputFromSchema, type ListRunsOptions, type ListRunsPageOptions, type ListSchedulesOptions, type ListSchedulesPageOptions, type ListStepAttemptsOptions, type ListStepAttemptsPageOptions, type LockRecord, type MarkRunPermanentlyFailedOptions, type MaterializedStepType, type MessageChannel, type MessageChannelConfig, type MessageEventKind, type MessageId, type MessageObservationEvent, type MessageSendCompletedEvent, type MessageSendFailedEvent, type MessageSendStartedEvent, type MessageSender, type MessageSentEvent, type MessageWaitCompletedEvent, type MessageWaitFailedEvent, type MessageWaitSource, type MessageWaitStartedEvent, type MetadataSetEvent, type MissingImplementationRetryConfig, type NextAttempt, type NextAttemptSleep, type NextLock, type NextRun, type NextSchedule, type NextSleep, type NextStep, type ObservationEventArgs, type ObservationEventHandler, type ObservationEventMap, type ObservationEventPattern, type PageOptions, type RawInputFromSchema, type ReadStreamOptions, type RecordedIdContext, type RecoveryChildWorkflowWaitSummary, type RecoveryDueSummary, type RecoveryFailedSummary, type RecoveryLeaseSummary, type RecoveryLockSummary, type RecoveryMessageWaitSummary, type RecoveryRetrySummary, type RecoveryScheduleSummary, type RecoverySleepWaitSummary, type RecoverySummary, type RecoveryWaitSummary, type RegistryLike, type ReleaseLockOptions, type ReleaseStaleLeaseOptions, type ReleaseStaleLockOptions, type RerunOptions, type RescheduleRunOptions, type ResultOptions, type ResumeHookOptions, type ResumeObservationEvent, type RetentionPolicyOptions, type RetryConfig, type RetryFailedRunOptions, type RetryableErrorOptions, type RunArguments, type RunAttributes, type RunChildWorkflowSummary, type RunCleanupSummary, type RunContext, type RunEventKind, type RunFailureErrorSummary, type RunFailureSummary, type RunHandle, type RunHookSummary, type RunId, type RunLeaseSummary, type RunLinks, type RunMessageSummary, type RunParentOptions, type RunRecord, type RunRetryReason, type RunRetryReasonCounts, type RunRetrySummary, type RunSleepSummary, type RunStatus, type RunStatusCounts, type RunStreamSummary, type RunStreamsApi, type RunSummary, type RunTelemetryContext, type RunTelemetryResultContext, type RunTransitionReason, type RunTransitionReasonCounts, type RunTransitionSummary, type RunWaitSummary, type RunWorkflowCount, type RuntimeRunsApi, type ScheduleCatchUpPolicy, type ScheduleConfig, type ScheduleId, type ScheduleNextOptions, type ScheduleOverlapPolicy, type ScheduleRecord, type ScheduleRunCreatedObservationEvent, type ScheduleStatus, type ScheduleTickObservationEvent, type SendMessageChannelObject, type SendMessageChannelOptions, type SendMessageInput, type SendMessageOptions, type SleepCompletedEvent, type SleepEventKind, type SleepStartedEvent, type StartOptions, type StartTarget, type StepAcquireLockOptions, type StepApi, type StepAttemptFailureErrorSummary, type StepAttemptFailureSummary, type StepAttemptKindAttemptKeys, type StepAttemptKindStepIds, type StepAttemptObservationEvent, type StepAttemptRecord, type StepAttemptStatus, type StepAttemptStatusAttemptKeys, type StepAttemptStatusStepIds, type StepAttemptSummary, type StepCompletedEvent, type StepDefinition, type StepDefinitionHandler, type StepDefinitionTypes, type StepEventKind, type StepFailedEvent, type StepHookApi, type StepHookCreateApi, type StepId, type StepLockApi, type StepMessageApi, type StepMetadata, type StepReleaseLockOptions, type StepRunConfig, type StepRunDataApi, type StepRunWorkflowOptions, type StepStartWorkflowOptions, type StepStartedEvent, type StepStreamApi, type StepTaskApi, type StepTelemetryContext, type StepTelemetryResultContext, type StepType, type StepWorkflowApi, type StorageTelemetryContext, type StorageTelemetryOperation, type Stream, type StreamChunk, type StreamChunkEvent, type StreamChunkUpdate, type StreamClosedEvent, type StreamEventKind, type StreamFailedEvent, type StreamId, type StreamIdOrName, type StreamInfo, type StreamObservationEvent, type StreamStartedEvent, type StreamState, type StreamStatus, type StreamTerminalUpdate, type StreamUpdate, type StreamUpdateKind, type Telemetry, type TelemetryContext, type TelemetryEngine, type TerminalRunStatus, type TerminalRunStatusCounts, type TickSchedulesOptions, type TickSchedulesResult, type Timeline, type TimelineEntry, type VersionResolver, type WaitForMessageChannelOptions, type WaitForMessageOptions, type WaitStreamOptions, type WaitingResult, type WakeDueRunsOptions, type Webhook, type WorkerId, type WorkerLeaseOptions, type WorkerOperationObservationEvent, type WorkerRunFilterOptions, type WorkerRunOptions, type WorkerRunResult, type WorkflowAttributeValue, WorkflowBundle, WorkflowCapabilityError, WorkflowChildWorkflowTimeoutError, type WorkflowClient, type WorkflowContext, type WorkflowDefinition, WorkflowDefinitionError, WorkflowDurationError, WorkflowError, WorkflowErrorCode, type WorkflowErrorOptions, type WorkflowErrorRecord, type WorkflowHandler, WorkflowHookDisposedError, WorkflowHookError, type WorkflowImplementation, WorkflowImplementationNotFoundError, type WorkflowLifecycleCallback, type WorkflowLifecycleEvent, WorkflowLockError, WorkflowLockStateError, WorkflowMessageDeliveryError, WorkflowMessageError, WorkflowMessageIdempotencyConflictError, WorkflowMessageWaitTimeoutError, WorkflowNonRetryableError, WorkflowOptionsError, type WorkflowPage, WorkflowPermanentFailureError, WorkflowReplayDivergenceError, WorkflowResultTimeoutError, WorkflowRetryableError, WorkflowRunCanceledError, WorkflowRunCancellationError, WorkflowRunDeadlineExceededError, WorkflowRunError, type WorkflowRunHandle, WorkflowRunInvalidError, WorkflowRunMismatchError, WorkflowRunNotFoundError, WorkflowRunParentError, WorkflowRunTransitionError, type WorkflowRuntime, WorkflowScheduleAlreadyExistsError, WorkflowScheduleError, WorkflowSerializationError, WorkflowStateError, WorkflowStepAttemptLimitError, type WorkflowStepContext, WorkflowStepError, WorkflowStepExecutionError, WorkflowStepRetryLimitError, WorkflowStepTimeoutError, WorkflowStreamError, WorkflowStreamNotFoundError, type WorkflowWorker, createWorkflowClient, defineMessageChannel, defineWorkflow, defineWorkflowBundle, defineWorkflowStep, getWorkflowFunctionDefinition, getWorkflowStepFunctionDefinition, implementWorkflow, matchesWorkflowError, parseHookToken, registerWorkflowFunctions };
|
package/dist/mod.mjs
CHANGED
|
@@ -1,27 +1,23 @@
|
|
|
1
|
-
import { WorkflowErrorCode
|
|
1
|
+
import { WorkflowErrorCode } from "./errors/codes.mjs";
|
|
2
2
|
import { WorkflowError, WorkflowMessageError, WorkflowOptionsError, WorkflowRunError, WorkflowStateError, WorkflowStepError } from "./errors/base.mjs";
|
|
3
|
-
import { workflowErrorRecordView } from "./errors/record-view.mjs";
|
|
4
|
-
import { WorkflowDurationError, WorkflowNonRetryableError, WorkflowPermanentFailureError, WorkflowReplayDivergenceError, WorkflowRetryableError, WorkflowSerializationError } from "./errors/failures.mjs";
|
|
5
|
-
import { WorkflowChildWorkflowTimeoutError, WorkflowResultTimeoutError, WorkflowRunCanceledError, WorkflowRunCancellationError, WorkflowRunDeadlineExceededError, WorkflowRunInvalidError, WorkflowRunMismatchError, WorkflowRunNotFoundError, WorkflowRunParentError, WorkflowRunTransitionError } from "./errors/run.mjs";
|
|
6
|
-
import { workflowErrorRecordSchema } from "./types/error.mjs";
|
|
7
3
|
import { WorkflowCapabilityError } from "./errors/capability.mjs";
|
|
8
4
|
import { WorkflowDefinitionError } from "./errors/definition.mjs";
|
|
5
|
+
import { WorkflowDurationError, WorkflowNonRetryableError, WorkflowPermanentFailureError, WorkflowReplayDivergenceError, WorkflowRetryableError, WorkflowSerializationError } from "./errors/failures.mjs";
|
|
9
6
|
import { WorkflowHookError } from "./errors/hook.mjs";
|
|
10
7
|
import { WorkflowImplementationNotFoundError } from "./errors/implementation.mjs";
|
|
11
8
|
import { WorkflowLockError, WorkflowLockStateError } from "./errors/lock.mjs";
|
|
12
9
|
import { WorkflowHookDisposedError, WorkflowMessageDeliveryError, WorkflowMessageIdempotencyConflictError, WorkflowMessageWaitTimeoutError } from "./errors/message.mjs";
|
|
13
|
-
import {
|
|
10
|
+
import { WorkflowChildWorkflowTimeoutError, WorkflowResultTimeoutError, WorkflowRunCanceledError, WorkflowRunCancellationError, WorkflowRunDeadlineExceededError, WorkflowRunInvalidError, WorkflowRunMismatchError, WorkflowRunNotFoundError, WorkflowRunParentError, WorkflowRunTransitionError } from "./errors/run.mjs";
|
|
14
11
|
import { WorkflowScheduleAlreadyExistsError, WorkflowScheduleError } from "./errors/schedule.mjs";
|
|
15
12
|
import { WorkflowStepAttemptLimitError, WorkflowStepExecutionError, WorkflowStepRetryLimitError, WorkflowStepTimeoutError } from "./errors/step.mjs";
|
|
16
13
|
import { WorkflowStreamError, WorkflowStreamNotFoundError } from "./errors/stream.mjs";
|
|
14
|
+
import { matchesWorkflowError } from "./errors/records.mjs";
|
|
17
15
|
import "./errors/mod.mjs";
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
16
|
+
import { getWorkflowFunctionDefinition, getWorkflowStepFunctionDefinition, registerWorkflowFunctions } from "./compiled-function.mjs";
|
|
17
|
+
import { defineWorkflowBundle } from "./bundle.mjs";
|
|
20
18
|
import { defineMessageChannel, defineWorkflow, implementWorkflow } from "./definition.mjs";
|
|
19
|
+
import { defineWorkflowStep } from "./step-definition.mjs";
|
|
20
|
+
import { parseHookToken } from "./hook-token.mjs";
|
|
21
21
|
import { createWorkflowClient } from "./client/create.mjs";
|
|
22
22
|
import "./client/mod.mjs";
|
|
23
|
-
|
|
24
|
-
import { WorkflowRuntime, createWorkflowRuntime, getWorkflowRuntimeRun, startWorkflowRuntimeRun } from "./runtime.mjs";
|
|
25
|
-
import { defineWorkflowStep } from "./step-definition.mjs";
|
|
26
|
-
import { parseWebhookToken, resumeWebhook } from "./webhook.mjs";
|
|
27
|
-
export { WorkflowCapabilityError, WorkflowChildWorkflowTimeoutError, WorkflowDefinitionError, WorkflowDurationError, WorkflowError, WorkflowErrorCode, WorkflowHookDisposedError, WorkflowHookError, WorkflowImplementationNotFoundError, WorkflowLockError, WorkflowLockStateError, WorkflowMessageDeliveryError, WorkflowMessageError, WorkflowMessageIdempotencyConflictError, WorkflowMessageWaitTimeoutError, WorkflowNonRetryableError, WorkflowOptionsError, WorkflowPermanentFailureError, WorkflowReplayDivergenceError, WorkflowResultTimeoutError, WorkflowRetryableError, WorkflowRunCanceledError, WorkflowRunCancellationError, WorkflowRunDeadlineExceededError, WorkflowRunError, WorkflowRunInvalidError, WorkflowRunMismatchError, WorkflowRunNotFoundError, WorkflowRunParentError, WorkflowRunTransitionError, WorkflowRuntime, WorkflowRuntimeError, WorkflowScheduleAlreadyExistsError, WorkflowScheduleError, WorkflowSerializationError, WorkflowStateError, WorkflowStepAttemptLimitError, WorkflowStepError, WorkflowStepExecutionError, WorkflowStepRetryLimitError, WorkflowStepTimeoutError, WorkflowStreamError, WorkflowStreamNotFoundError, attachWorkflowDefinition, attachWorkflowStepDefinition, callWorkflowStepFunction, createWorkflowBundleRegistry, createWorkflowClient, createWorkflowRuntime, defineMessageChannel, defineWorkflow, defineWorkflowBundle, defineWorkflowStep, getCompiledWorkflowDefinition, getCompiledWorkflowStepDefinition, getWorkflowFunctionDefinition, getWorkflowRuntimeRun, getWorkflowStepFunctionDefinition, implementWorkflow, parseWebhookToken, parseWorkflowRuntime, registerWorkflowFunctions, resumeWebhook, runWorkflowFunction, startWorkflowRuntimeRun, workflowErrorCodeSchema, workflowErrorRecordSchema, workflowErrorRecordView, workflowRuntimeSchema };
|
|
23
|
+
export { WorkflowCapabilityError, WorkflowChildWorkflowTimeoutError, WorkflowDefinitionError, WorkflowDurationError, WorkflowError, WorkflowErrorCode, WorkflowHookDisposedError, WorkflowHookError, WorkflowImplementationNotFoundError, WorkflowLockError, WorkflowLockStateError, WorkflowMessageDeliveryError, WorkflowMessageError, WorkflowMessageIdempotencyConflictError, WorkflowMessageWaitTimeoutError, WorkflowNonRetryableError, WorkflowOptionsError, WorkflowPermanentFailureError, WorkflowReplayDivergenceError, WorkflowResultTimeoutError, WorkflowRetryableError, WorkflowRunCanceledError, WorkflowRunCancellationError, WorkflowRunDeadlineExceededError, WorkflowRunError, WorkflowRunInvalidError, WorkflowRunMismatchError, WorkflowRunNotFoundError, WorkflowRunParentError, WorkflowRunTransitionError, WorkflowScheduleAlreadyExistsError, WorkflowScheduleError, WorkflowSerializationError, WorkflowStateError, WorkflowStepAttemptLimitError, WorkflowStepError, WorkflowStepExecutionError, WorkflowStepRetryLimitError, WorkflowStepTimeoutError, WorkflowStreamError, WorkflowStreamNotFoundError, createWorkflowClient, defineMessageChannel, defineWorkflow, defineWorkflowBundle, defineWorkflowStep, getWorkflowFunctionDefinition, getWorkflowStepFunctionDefinition, implementWorkflow, matchesWorkflowError, parseHookToken, registerWorkflowFunctions };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Meter } from "@opentelemetry/api";
|
|
2
|
+
//#region src/otel/metrics.d.ts
|
|
3
|
+
export type Instruments = ReturnType<typeof createInstruments>;
|
|
4
|
+
/** The counters and histograms the OpenTelemetry adapter records. */
|
|
5
|
+
export declare function createInstruments(meter: Meter): {
|
|
6
|
+
runTransitions: import("@opentelemetry/api").Counter<import("@opentelemetry/api").Attributes>;
|
|
7
|
+
runDuration: import("@opentelemetry/api").Histogram<import("@opentelemetry/api").Attributes>;
|
|
8
|
+
eventsAppended: import("@opentelemetry/api").Counter<import("@opentelemetry/api").Attributes>;
|
|
9
|
+
stepAttempts: import("@opentelemetry/api").Counter<import("@opentelemetry/api").Attributes>;
|
|
10
|
+
stepDuration: import("@opentelemetry/api").Histogram<import("@opentelemetry/api").Attributes>;
|
|
11
|
+
messagesSent: import("@opentelemetry/api").Counter<import("@opentelemetry/api").Attributes>;
|
|
12
|
+
messageWaitLatency: import("@opentelemetry/api").Histogram<import("@opentelemetry/api").Attributes>;
|
|
13
|
+
hooksResumed: import("@opentelemetry/api").Counter<import("@opentelemetry/api").Attributes>;
|
|
14
|
+
hookResumeLatency: import("@opentelemetry/api").Histogram<import("@opentelemetry/api").Attributes>;
|
|
15
|
+
streamUpdates: import("@opentelemetry/api").Counter<import("@opentelemetry/api").Attributes>;
|
|
16
|
+
cleanupDeletedRuns: import("@opentelemetry/api").Counter<import("@opentelemetry/api").Attributes>;
|
|
17
|
+
workerClaims: import("@opentelemetry/api").Counter<import("@opentelemetry/api").Attributes>;
|
|
18
|
+
workerClaimFailures: import("@opentelemetry/api").Counter<import("@opentelemetry/api").Attributes>;
|
|
19
|
+
workerHeartbeatFailures: import("@opentelemetry/api").Counter<import("@opentelemetry/api").Attributes>;
|
|
20
|
+
workerLeaseExtensions: import("@opentelemetry/api").Counter<import("@opentelemetry/api").Attributes>;
|
|
21
|
+
workerLeaseReleases: import("@opentelemetry/api").Counter<import("@opentelemetry/api").Attributes>;
|
|
22
|
+
pendingToClaimedLatency: import("@opentelemetry/api").Histogram<import("@opentelemetry/api").Attributes>;
|
|
23
|
+
waitingToResumedLatency: import("@opentelemetry/api").Histogram<import("@opentelemetry/api").Attributes>;
|
|
24
|
+
retryScheduled: import("@opentelemetry/api").Counter<import("@opentelemetry/api").Attributes>;
|
|
25
|
+
retryExhausted: import("@opentelemetry/api").Counter<import("@opentelemetry/api").Attributes>;
|
|
26
|
+
retryDelay: import("@opentelemetry/api").Histogram<import("@opentelemetry/api").Attributes>;
|
|
27
|
+
scheduleDueToRunCreatedLatency: import("@opentelemetry/api").Histogram<import("@opentelemetry/api").Attributes>;
|
|
28
|
+
storageOperationDuration: import("@opentelemetry/api").Histogram<import("@opentelemetry/api").Attributes>;
|
|
29
|
+
storageOperationErrors: import("@opentelemetry/api").Counter<import("@opentelemetry/api").Attributes>;
|
|
30
|
+
};
|
|
31
|
+
//#endregion
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { WORKFLOW_METRIC_NAMES } from "../telemetry.mjs";
|
|
2
|
+
//#region src/otel/metrics.ts
|
|
3
|
+
/** The counters and histograms the OpenTelemetry adapter records. */
|
|
4
|
+
function createInstruments(meter) {
|
|
5
|
+
return {
|
|
6
|
+
runTransitions: meter.createCounter(WORKFLOW_METRIC_NAMES.runTransitions, { description: "Count of workflow run transitions." }),
|
|
7
|
+
runDuration: meter.createHistogram(WORKFLOW_METRIC_NAMES.runDuration, {
|
|
8
|
+
description: "Workflow run duration in milliseconds.",
|
|
9
|
+
unit: "ms"
|
|
10
|
+
}),
|
|
11
|
+
eventsAppended: meter.createCounter(WORKFLOW_METRIC_NAMES.eventsAppended, { description: "Count of durable workflow events appended." }),
|
|
12
|
+
stepAttempts: meter.createCounter(WORKFLOW_METRIC_NAMES.stepAttempts, { description: "Count of workflow step attempt updates." }),
|
|
13
|
+
stepDuration: meter.createHistogram(WORKFLOW_METRIC_NAMES.stepDuration, {
|
|
14
|
+
description: "Workflow step attempt duration in milliseconds.",
|
|
15
|
+
unit: "ms"
|
|
16
|
+
}),
|
|
17
|
+
messagesSent: meter.createCounter(WORKFLOW_METRIC_NAMES.messagesSent, { description: "Count of workflow messages sent." }),
|
|
18
|
+
messageWaitLatency: meter.createHistogram(WORKFLOW_METRIC_NAMES.messageWaitLatency, {
|
|
19
|
+
description: "Latency from workflow message wait creation to message receipt.",
|
|
20
|
+
unit: "ms"
|
|
21
|
+
}),
|
|
22
|
+
hooksResumed: meter.createCounter(WORKFLOW_METRIC_NAMES.hooksResumed, { description: "Count of workflow hooks resumed." }),
|
|
23
|
+
hookResumeLatency: meter.createHistogram(WORKFLOW_METRIC_NAMES.hookResumeLatency, {
|
|
24
|
+
description: "Latency from workflow hook wait creation to hook resume message receipt.",
|
|
25
|
+
unit: "ms"
|
|
26
|
+
}),
|
|
27
|
+
streamUpdates: meter.createCounter(WORKFLOW_METRIC_NAMES.streamUpdates, { description: "Count of workflow stream updates." }),
|
|
28
|
+
cleanupDeletedRuns: meter.createCounter(WORKFLOW_METRIC_NAMES.cleanupDeletedRuns, { description: "Count of workflow runs deleted by cleanup or retention operations." }),
|
|
29
|
+
workerClaims: meter.createCounter(WORKFLOW_METRIC_NAMES.workerClaims, { description: "Count of workflow run claims by workers." }),
|
|
30
|
+
workerClaimFailures: meter.createCounter(WORKFLOW_METRIC_NAMES.workerClaimFailures, { description: "Count of failed targeted workflow run claims by workers." }),
|
|
31
|
+
workerHeartbeatFailures: meter.createCounter(WORKFLOW_METRIC_NAMES.workerHeartbeatFailures, { description: "Count of failed workflow worker heartbeat lease extensions." }),
|
|
32
|
+
workerLeaseExtensions: meter.createCounter(WORKFLOW_METRIC_NAMES.workerLeaseExtensions, { description: "Count of workflow run lease extension attempts." }),
|
|
33
|
+
workerLeaseReleases: meter.createCounter(WORKFLOW_METRIC_NAMES.workerLeaseReleases, { description: "Count of workflow run lease releases." }),
|
|
34
|
+
pendingToClaimedLatency: meter.createHistogram(WORKFLOW_METRIC_NAMES.pendingToClaimedLatency, {
|
|
35
|
+
description: "Latency from workflow availability to worker claim in milliseconds.",
|
|
36
|
+
unit: "ms"
|
|
37
|
+
}),
|
|
38
|
+
waitingToResumedLatency: meter.createHistogram(WORKFLOW_METRIC_NAMES.runWaitingToResumedLatency, {
|
|
39
|
+
description: "Latency from workflow waiting state to resumed execution in milliseconds.",
|
|
40
|
+
unit: "ms"
|
|
41
|
+
}),
|
|
42
|
+
retryScheduled: meter.createCounter(WORKFLOW_METRIC_NAMES.retryScheduled, { description: "Count of workflow retries scheduled." }),
|
|
43
|
+
retryExhausted: meter.createCounter(WORKFLOW_METRIC_NAMES.retryExhausted, { description: "Count of workflow retries exhausted into permanent failure." }),
|
|
44
|
+
retryDelay: meter.createHistogram(WORKFLOW_METRIC_NAMES.retryDelay, {
|
|
45
|
+
description: "Delay until a scheduled workflow retry in milliseconds.",
|
|
46
|
+
unit: "ms"
|
|
47
|
+
}),
|
|
48
|
+
scheduleDueToRunCreatedLatency: meter.createHistogram(WORKFLOW_METRIC_NAMES.scheduleDueToRunCreatedLatency, {
|
|
49
|
+
description: "Latency from recurring schedule fire time to scheduled run creation.",
|
|
50
|
+
unit: "ms"
|
|
51
|
+
}),
|
|
52
|
+
storageOperationDuration: meter.createHistogram(WORKFLOW_METRIC_NAMES.storageOperationDuration, {
|
|
53
|
+
description: "Workflow storage/backend operation duration in milliseconds.",
|
|
54
|
+
unit: "ms"
|
|
55
|
+
}),
|
|
56
|
+
storageOperationErrors: meter.createCounter(WORKFLOW_METRIC_NAMES.storageOperationErrors, { description: "Count of workflow storage/backend operation failures." })
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
//#endregion
|
|
60
|
+
export { createInstruments };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { OpenTelemetryWorkflowTelemetryOptions, createOpenTelemetryTelemetry } from "./telemetry.mjs";
|
|
2
|
+
import { WORKFLOW_ATTRIBUTES, WORKFLOW_INSTRUMENTATION_NAME, WORKFLOW_INSTRUMENTATION_VERSION, WORKFLOW_MESSAGING_ATTRIBUTES, WORKFLOW_METRIC_NAMES, WORKFLOW_SPAN_NAMES, WORKFLOW_SYSTEM } from "../telemetry.mjs";
|
|
3
|
+
export { type OpenTelemetryWorkflowTelemetryOptions, WORKFLOW_ATTRIBUTES, WORKFLOW_INSTRUMENTATION_NAME, WORKFLOW_INSTRUMENTATION_VERSION, WORKFLOW_MESSAGING_ATTRIBUTES, WORKFLOW_METRIC_NAMES, WORKFLOW_SPAN_NAMES, WORKFLOW_SYSTEM, createOpenTelemetryTelemetry };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { WORKFLOW_ATTRIBUTES, WORKFLOW_INSTRUMENTATION_NAME, WORKFLOW_INSTRUMENTATION_VERSION, WORKFLOW_MESSAGING_ATTRIBUTES, WORKFLOW_METRIC_NAMES, WORKFLOW_SPAN_NAMES, WORKFLOW_SYSTEM } from "../telemetry.mjs";
|
|
2
|
+
import { createOpenTelemetryTelemetry } from "./telemetry.mjs";
|
|
3
|
+
export { WORKFLOW_ATTRIBUTES, WORKFLOW_INSTRUMENTATION_NAME, WORKFLOW_INSTRUMENTATION_VERSION, WORKFLOW_MESSAGING_ATTRIBUTES, WORKFLOW_METRIC_NAMES, WORKFLOW_SPAN_NAMES, WORKFLOW_SYSTEM, createOpenTelemetryTelemetry };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ChildWorkflowStartedObservationEvent, CleanupObservationEvent, DurableEventObservationEvent, MessageObservationEvent, ResumeObservationEvent, ScheduleRunCreatedObservationEvent, ScheduleTickObservationEvent, StreamObservationEvent, WorkerOperationObservationEvent } from "../types/observation.mjs";
|
|
2
|
+
import { MessageWaitCompletedEvent, MessageWaitStartedEvent } from "../types/events.mjs";
|
|
3
|
+
import { History } from "../history/replay.mjs";
|
|
4
|
+
import { Instruments } from "./metrics.mjs";
|
|
5
|
+
import { Attributes, Tracer } from "@opentelemetry/api";
|
|
6
|
+
//#region src/otel/spans.d.ts
|
|
7
|
+
/** Records the spans for durable events, messages, hooks, schedules, workers, and streams. */
|
|
8
|
+
export declare class SpanRecorder {
|
|
9
|
+
#private;
|
|
10
|
+
constructor(tracer: Tracer, metrics: Instruments, attributes: (attributes: Attributes) => Attributes);
|
|
11
|
+
recordDurableEventLatency(event: DurableEventObservationEvent, history: History): void;
|
|
12
|
+
recordDurableSleepSpan(event: DurableEventObservationEvent, history: History): void;
|
|
13
|
+
recordChildWorkflowOperationSpan(event: DurableEventObservationEvent, history: History): void;
|
|
14
|
+
recordChildWorkflowStartedSpan(event: ChildWorkflowStartedObservationEvent): void;
|
|
15
|
+
recordMessageSentSpan(event: MessageObservationEvent): void;
|
|
16
|
+
recordHookResumeSpan(kind: "hook" | "webhook", event: ResumeObservationEvent): void;
|
|
17
|
+
recordScheduleRunCreatedSpan(event: ScheduleRunCreatedObservationEvent): void;
|
|
18
|
+
recordScheduleTickSpan(event: ScheduleTickObservationEvent): void;
|
|
19
|
+
recordWorkerOperationSpan(event: WorkerOperationObservationEvent): void;
|
|
20
|
+
recordCleanupOperationSpan(source: "cleanup" | "retention", event: CleanupObservationEvent): void;
|
|
21
|
+
recordStreamOperationSpan(event: StreamObservationEvent): void;
|
|
22
|
+
recordMessageWaitSpan(completed: MessageWaitCompletedEvent, started: MessageWaitStartedEvent, history: History): void;
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|