@workflow/core 5.0.0-beta.5 → 5.0.0-beta.51
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 +5 -0
- package/dist/attribute-changes.d.ts +5 -0
- package/dist/attribute-changes.d.ts.map +1 -0
- package/dist/attribute-changes.js +25 -0
- package/dist/capabilities.d.ts +35 -2
- package/dist/capabilities.d.ts.map +1 -1
- package/dist/capabilities.js +74 -5
- package/dist/capture-stack.d.ts +1 -1
- package/dist/capture-stack.js +2 -2
- package/dist/class-serialization.d.ts +32 -0
- package/dist/class-serialization.d.ts.map +1 -1
- package/dist/class-serialization.js +37 -1
- package/dist/classify-error.d.ts +19 -3
- package/dist/classify-error.d.ts.map +1 -1
- package/dist/classify-error.js +98 -6
- package/dist/context-violation-error.d.ts +5 -5
- package/dist/context-violation-error.d.ts.map +1 -1
- package/dist/context-violation-error.js +8 -6
- package/dist/create-hook.d.ts +72 -7
- package/dist/create-hook.d.ts.map +1 -1
- package/dist/create-hook.js +1 -1
- package/dist/define-hook.js +2 -2
- package/dist/describe-error.d.ts +7 -7
- package/dist/describe-error.d.ts.map +1 -1
- package/dist/describe-error.js +97 -12
- package/dist/encryption.d.ts +38 -4
- package/dist/encryption.d.ts.map +1 -1
- package/dist/encryption.js +96 -14
- package/dist/events-consumer.d.ts +297 -0
- package/dist/events-consumer.d.ts.map +1 -1
- package/dist/events-consumer.js +673 -42
- package/dist/flushable-stream.d.ts +97 -1
- package/dist/flushable-stream.d.ts.map +1 -1
- package/dist/flushable-stream.js +291 -11
- package/dist/global.d.ts +36 -2
- package/dist/global.d.ts.map +1 -1
- package/dist/global.js +21 -6
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/log-format.d.ts +2 -2
- package/dist/log-format.js +19 -12
- package/dist/logger.d.ts +1 -0
- package/dist/logger.d.ts.map +1 -1
- package/dist/logger.js +10 -6
- package/dist/private.d.ts +226 -9
- package/dist/private.d.ts.map +1 -1
- package/dist/private.js +626 -7
- package/dist/replay-divergence.d.ts +25 -0
- package/dist/replay-divergence.d.ts.map +1 -0
- package/dist/replay-divergence.js +61 -0
- package/dist/replay-payload-cache.d.ts +64 -0
- package/dist/replay-payload-cache.d.ts.map +1 -0
- package/dist/replay-payload-cache.js +158 -0
- package/dist/runtime/compute-instance.d.ts +13 -0
- package/dist/runtime/compute-instance.d.ts.map +1 -0
- package/dist/runtime/compute-instance.js +14 -0
- package/dist/runtime/constants.d.ts +315 -0
- package/dist/runtime/constants.d.ts.map +1 -1
- package/dist/runtime/constants.js +502 -16
- package/dist/runtime/count-step-started-events.d.ts +52 -0
- package/dist/runtime/count-step-started-events.d.ts.map +1 -0
- package/dist/runtime/count-step-started-events.js +72 -0
- package/dist/runtime/deployment-guard.d.ts +99 -0
- package/dist/runtime/deployment-guard.d.ts.map +1 -0
- package/dist/runtime/deployment-guard.js +154 -0
- package/dist/runtime/get-port-lazy.d.ts +15 -0
- package/dist/runtime/get-port-lazy.d.ts.map +1 -1
- package/dist/runtime/get-port-lazy.js +75 -6
- package/dist/runtime/get-world-lazy.d.ts +5 -14
- package/dist/runtime/get-world-lazy.d.ts.map +1 -1
- package/dist/runtime/get-world-lazy.js +19 -29
- package/dist/runtime/helpers.d.ts +415 -29
- package/dist/runtime/helpers.d.ts.map +1 -1
- package/dist/runtime/helpers.js +686 -57
- package/dist/runtime/quickjs-assets.generated.d.ts +14 -0
- package/dist/runtime/quickjs-assets.generated.d.ts.map +1 -0
- package/dist/runtime/quickjs-assets.generated.js +30 -0
- package/dist/runtime/quickjs-entrypoint.d.ts +158 -0
- package/dist/runtime/quickjs-entrypoint.d.ts.map +1 -0
- package/dist/runtime/quickjs-entrypoint.js +1863 -0
- package/dist/runtime/quickjs-log-view.d.ts +129 -0
- package/dist/runtime/quickjs-log-view.d.ts.map +1 -0
- package/dist/runtime/quickjs-log-view.js +229 -0
- package/dist/runtime/quickjs-runtime.d.ts +244 -0
- package/dist/runtime/quickjs-runtime.d.ts.map +1 -0
- package/dist/runtime/quickjs-runtime.js +2427 -0
- package/dist/runtime/quickjs-serde.d.ts +107 -0
- package/dist/runtime/quickjs-serde.d.ts.map +1 -0
- package/dist/runtime/quickjs-serde.js +2159 -0
- package/dist/runtime/replay-budget.d.ts +97 -0
- package/dist/runtime/replay-budget.d.ts.map +1 -0
- package/dist/runtime/replay-budget.js +139 -0
- package/dist/runtime/replay-recovery-reporter.d.ts +36 -0
- package/dist/runtime/replay-recovery-reporter.d.ts.map +1 -0
- package/dist/runtime/replay-recovery-reporter.js +64 -0
- package/dist/runtime/resume-hook.d.ts +91 -8
- package/dist/runtime/resume-hook.d.ts.map +1 -1
- package/dist/runtime/resume-hook.js +512 -89
- package/dist/runtime/resume-latency.d.ts +150 -0
- package/dist/runtime/resume-latency.d.ts.map +1 -0
- package/dist/runtime/resume-latency.js +155 -0
- package/dist/runtime/run-id-time.d.ts +19 -0
- package/dist/runtime/run-id-time.d.ts.map +1 -0
- package/dist/runtime/run-id-time.js +42 -0
- package/dist/runtime/run.d.ts +72 -7
- package/dist/runtime/run.d.ts.map +1 -1
- package/dist/runtime/run.js +280 -53
- package/dist/runtime/runs.d.ts +54 -3
- package/dist/runtime/runs.d.ts.map +1 -1
- package/dist/runtime/runs.js +126 -16
- package/dist/runtime/start.d.ts +101 -2
- package/dist/runtime/start.d.ts.map +1 -1
- package/dist/runtime/start.js +352 -61
- package/dist/runtime/step-executor.d.ts +186 -5
- package/dist/runtime/step-executor.d.ts.map +1 -1
- package/dist/runtime/step-executor.js +768 -130
- package/dist/runtime/step-latency.d.ts +220 -0
- package/dist/runtime/step-latency.d.ts.map +1 -0
- package/dist/runtime/step-latency.js +215 -0
- package/dist/runtime/step-ownership.d.ts +72 -0
- package/dist/runtime/step-ownership.d.ts.map +1 -0
- package/dist/runtime/step-ownership.js +114 -0
- package/dist/runtime/step-single-flight.d.ts +12 -0
- package/dist/runtime/step-single-flight.d.ts.map +1 -0
- package/dist/runtime/step-single-flight.js +75 -0
- package/dist/runtime/suspension-handler.d.ts +247 -7
- package/dist/runtime/suspension-handler.d.ts.map +1 -1
- package/dist/runtime/suspension-handler.js +1304 -125
- package/dist/runtime/unserializable-step.d.ts +34 -0
- package/dist/runtime/unserializable-step.d.ts.map +1 -0
- package/dist/runtime/unserializable-step.js +52 -0
- package/dist/runtime/vm-mode.d.ts +44 -0
- package/dist/runtime/vm-mode.d.ts.map +1 -0
- package/dist/runtime/vm-mode.js +62 -0
- package/dist/runtime/vm-serde-bundle.generated.d.ts +14 -0
- package/dist/runtime/vm-serde-bundle.generated.d.ts.map +1 -0
- package/dist/runtime/vm-serde-bundle.generated.js +16 -0
- package/dist/runtime/wait-continuation.d.ts +106 -0
- package/dist/runtime/wait-continuation.d.ts.map +1 -0
- package/dist/runtime/wait-continuation.js +136 -0
- package/dist/runtime/wait-until.d.ts +18 -0
- package/dist/runtime/wait-until.d.ts.map +1 -0
- package/dist/runtime/wait-until.js +42 -0
- package/dist/runtime/world-compatibility.d.ts +32 -0
- package/dist/runtime/world-compatibility.d.ts.map +1 -0
- package/dist/runtime/world-compatibility.js +44 -0
- package/dist/runtime/world-init.d.ts +17 -42
- package/dist/runtime/world-init.d.ts.map +1 -1
- package/dist/runtime/world-init.js +18 -43
- package/dist/runtime/world.d.ts +14 -2
- package/dist/runtime/world.d.ts.map +1 -1
- package/dist/runtime/world.js +75 -19
- package/dist/runtime.d.ts +10 -6
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +3911 -489
- package/dist/sealed-box.d.ts +167 -0
- package/dist/sealed-box.d.ts.map +1 -0
- package/dist/sealed-box.js +571 -0
- package/dist/serialization/client.d.ts +3 -3
- package/dist/serialization/client.d.ts.map +1 -1
- package/dist/serialization/client.js +8 -4
- package/dist/serialization/codec-devalue-vm.d.ts +16 -0
- package/dist/serialization/codec-devalue-vm.d.ts.map +1 -0
- package/dist/serialization/codec-devalue-vm.js +148 -0
- package/dist/serialization/codec-devalue.d.ts +1 -1
- package/dist/serialization/codec-devalue.d.ts.map +1 -1
- package/dist/serialization/codec-devalue.js +24 -6
- package/dist/serialization/codec.d.ts +37 -2
- package/dist/serialization/codec.d.ts.map +1 -1
- package/dist/serialization/codec.js +2 -2
- package/dist/serialization/compression.d.ts +105 -0
- package/dist/serialization/compression.d.ts.map +1 -0
- package/dist/serialization/compression.js +261 -0
- package/dist/serialization/encryption.d.ts +119 -17
- package/dist/serialization/encryption.d.ts.map +1 -1
- package/dist/serialization/encryption.js +152 -17
- package/dist/serialization/errors.d.ts +13 -0
- package/dist/serialization/errors.d.ts.map +1 -1
- package/dist/serialization/errors.js +20 -2
- package/dist/serialization/format.d.ts +6 -6
- package/dist/serialization/format.js +7 -7
- package/dist/serialization/hardened.d.ts +156 -0
- package/dist/serialization/hardened.d.ts.map +1 -0
- package/dist/serialization/hardened.js +538 -0
- package/dist/serialization/index.d.ts +10 -8
- package/dist/serialization/index.d.ts.map +1 -1
- package/dist/serialization/index.js +10 -8
- package/dist/serialization/reducers/class-vm.d.ts +20 -0
- package/dist/serialization/reducers/class-vm.d.ts.map +1 -0
- package/dist/serialization/reducers/class-vm.js +77 -0
- package/dist/serialization/reducers/class.d.ts.map +1 -1
- package/dist/serialization/reducers/class.js +11 -6
- package/dist/serialization/reducers/common-vm.d.ts +15 -0
- package/dist/serialization/reducers/common-vm.d.ts.map +1 -0
- package/dist/serialization/reducers/common-vm.js +616 -0
- package/dist/serialization/reducers/common.d.ts +1 -1
- package/dist/serialization/reducers/common.d.ts.map +1 -1
- package/dist/serialization/reducers/common.js +202 -62
- package/dist/serialization/reducers/step-function-vm.d.ts +44 -0
- package/dist/serialization/reducers/step-function-vm.d.ts.map +1 -0
- package/dist/serialization/reducers/step-function-vm.js +97 -0
- package/dist/serialization/reducers/step-function.d.ts.map +1 -1
- package/dist/serialization/reducers/step-function.js +25 -9
- package/dist/serialization/step.d.ts +4 -4
- package/dist/serialization/step.d.ts.map +1 -1
- package/dist/serialization/step.js +9 -5
- package/dist/serialization/types.d.ts +80 -1
- package/dist/serialization/types.d.ts.map +1 -1
- package/dist/serialization/types.js +15 -1
- package/dist/serialization/workflow-vm.d.ts +29 -0
- package/dist/serialization/workflow-vm.d.ts.map +1 -0
- package/dist/serialization/workflow-vm.js +74 -0
- package/dist/serialization-format.d.ts +64 -8
- package/dist/serialization-format.d.ts.map +1 -1
- package/dist/serialization-format.js +225 -73
- package/dist/serialization.d.ts +262 -34
- package/dist/serialization.d.ts.map +1 -1
- package/dist/serialization.js +1885 -277
- package/dist/set-attributes.d.ts +13 -0
- package/dist/set-attributes.d.ts.map +1 -0
- package/dist/set-attributes.js +60 -0
- package/dist/source-map.d.ts +25 -0
- package/dist/source-map.d.ts.map +1 -1
- package/dist/source-map.js +154 -10
- package/dist/step/context-storage.d.ts +63 -2
- package/dist/step/context-storage.d.ts.map +1 -1
- package/dist/step/context-storage.js +7 -5
- package/dist/step/writable-stream.d.ts +3 -3
- package/dist/step/writable-stream.d.ts.map +1 -1
- package/dist/step/writable-stream.js +80 -13
- package/dist/step.d.ts.map +1 -1
- package/dist/step.js +148 -27
- package/dist/symbols.d.ts +50 -0
- package/dist/symbols.d.ts.map +1 -1
- package/dist/symbols.js +51 -1
- package/dist/telemetry/semantic-conventions.d.ts +433 -2
- package/dist/telemetry/semantic-conventions.d.ts.map +1 -1
- package/dist/telemetry/semantic-conventions.js +319 -3
- package/dist/telemetry.d.ts +91 -0
- package/dist/telemetry.d.ts.map +1 -1
- package/dist/telemetry.js +244 -17
- package/dist/test-support/orchestrator-context.d.ts +25 -0
- package/dist/test-support/orchestrator-context.d.ts.map +1 -0
- package/dist/test-support/orchestrator-context.js +107 -0
- package/dist/types.d.ts +6 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +23 -1
- package/dist/util.d.ts +0 -5
- package/dist/util.d.ts.map +1 -1
- package/dist/util.js +1 -15
- package/dist/version.d.ts +1 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +2 -2
- package/dist/vm/index.d.ts.map +1 -1
- package/dist/vm/index.js +84 -14
- package/dist/vm/script-cache.d.ts +26 -0
- package/dist/vm/script-cache.d.ts.map +1 -0
- package/dist/vm/script-cache.js +131 -0
- package/dist/vm/uint8array-base64.js +1 -1
- package/dist/workflow/abort-controller.d.ts +2 -2
- package/dist/workflow/abort-controller.d.ts.map +1 -1
- package/dist/workflow/abort-controller.js +88 -21
- package/dist/workflow/attribute-dispatcher.d.ts +6 -0
- package/dist/workflow/attribute-dispatcher.d.ts.map +1 -0
- package/dist/workflow/attribute-dispatcher.js +45 -0
- package/dist/workflow/create-hook.d.ts.map +1 -1
- package/dist/workflow/create-hook.js +24 -3
- package/dist/workflow/get-workflow-metadata.js +2 -2
- package/dist/workflow/hook.d.ts.map +1 -1
- package/dist/workflow/hook.js +304 -47
- package/dist/workflow/index.d.ts +1 -0
- package/dist/workflow/index.d.ts.map +1 -1
- package/dist/workflow/index.js +2 -1
- package/dist/workflow/set-attributes.d.ts +68 -0
- package/dist/workflow/set-attributes.d.ts.map +1 -0
- package/dist/workflow/set-attributes.js +60 -0
- package/dist/workflow/sleep.d.ts.map +1 -1
- package/dist/workflow/sleep.js +58 -12
- package/dist/workflow/world-init-stub.d.ts +3 -3
- package/dist/workflow/world-init-stub.js +4 -4
- package/dist/workflow.d.ts +95 -3
- package/dist/workflow.d.ts.map +1 -1
- package/dist/workflow.js +900 -561
- package/docs/api-reference/create-hook.mdx +89 -10
- package/docs/api-reference/create-webhook.mdx +16 -15
- package/docs/api-reference/define-hook.mdx +35 -33
- package/docs/api-reference/fatal-error.mdx +30 -8
- package/docs/api-reference/fetch.mdx +14 -10
- package/docs/api-reference/get-step-metadata.mdx +2 -2
- package/docs/api-reference/get-workflow-metadata.mdx +3 -3
- package/docs/api-reference/get-writable.mdx +7 -7
- package/docs/api-reference/index.mdx +4 -1
- package/docs/api-reference/retryable-error.mdx +1 -1
- package/docs/api-reference/set-attributes.mdx +61 -0
- package/docs/api-reference/sleep.mdx +4 -4
- package/docs/foundations/cancellation.mdx +31 -32
- package/docs/foundations/errors-and-retries.mdx +42 -11
- package/docs/foundations/hooks.mdx +64 -35
- package/docs/foundations/idempotency.mdx +244 -12
- package/docs/foundations/index.mdx +1 -23
- package/docs/foundations/meta.json +2 -1
- package/docs/foundations/serialization.mdx +21 -22
- package/docs/foundations/starting-workflows.mdx +106 -30
- package/docs/foundations/streaming.mdx +108 -60
- package/docs/foundations/versioning.mdx +263 -0
- package/docs/foundations/workflows-and-steps.mdx +9 -9
- package/docs/how-it-works/cancellation.mdx +63 -63
- package/docs/how-it-works/code-transform.mdx +83 -67
- package/docs/how-it-works/encryption.mdx +30 -26
- package/docs/how-it-works/event-sourcing.mdx +125 -34
- package/docs/how-it-works/framework-integrations.mdx +96 -337
- package/docs/how-it-works/understanding-directives.mdx +22 -22
- package/package.json +24 -15
- package/dist/runtime/step-handler.d.ts +0 -2
- package/dist/runtime/step-handler.d.ts.map +0 -1
- package/dist/runtime/step-handler.js +0 -776
|
@@ -9,48 +9,38 @@
|
|
|
9
9
|
*
|
|
10
10
|
* Resolution order, in priority:
|
|
11
11
|
*
|
|
12
|
-
* 1. `globalThis[WorldCacheKey]
|
|
12
|
+
* 1. `globalThis[WorldCacheKey]`: populated by a successful prior
|
|
13
13
|
* `getWorld()` call. This is the steady-state hot path.
|
|
14
|
-
* 2. `globalThis[GetWorldFnKey]
|
|
14
|
+
* 2. `globalThis[GetWorldFnKey]`: populated by the module-load side
|
|
15
15
|
* effect at the bottom of `./world.ts`. Fires on every server bundle
|
|
16
|
-
* that reaches this file via `workflow/api` (which
|
|
16
|
+
* that reaches this file via `workflow` or `workflow/api` (which import
|
|
17
17
|
* `./world-init.ts` for its side effect; see that file for the full
|
|
18
|
-
* rationale). This is the cold-start path for routes that consume
|
|
19
|
-
*
|
|
20
|
-
* 3. Dynamic `import('./world.js')` — last-resort fallback for
|
|
21
|
-
* environments where neither (1) nor (2) is available (CJS test
|
|
22
|
-
* runners, scripts that import deeply into `@workflow/core` without
|
|
23
|
-
* going through `workflow/api`, future bundlers we haven't validated).
|
|
24
|
-
* The specifier is built at runtime so esbuild can't trace it into
|
|
25
|
-
* step bundles. Note: this branch is unreliable in webpack-bundled
|
|
26
|
-
* routes because webpack inlines this module into the route file and
|
|
27
|
-
* the relative path resolves against the bundle location — paths (1)
|
|
28
|
-
* and (2) cover those cases instead.
|
|
18
|
+
* rationale). This is the cold-start path for routes that consume host
|
|
19
|
+
* helpers without any prior workflow run.
|
|
29
20
|
*/
|
|
21
|
+
import { assertWorldSupportsRuntimeProtocol } from './world-compatibility.js';
|
|
30
22
|
const WorldCacheKey = Symbol.for('@workflow/world//cache');
|
|
31
23
|
const WorldCachePromiseKey = Symbol.for('@workflow/world//cachePromise');
|
|
32
24
|
const GetWorldFnKey = Symbol.for('@workflow/world//getWorldFn');
|
|
33
25
|
export async function getWorldLazy() {
|
|
34
26
|
const g = globalThis;
|
|
35
|
-
if (g[WorldCacheKey])
|
|
27
|
+
if (g[WorldCacheKey]) {
|
|
28
|
+
assertWorldSupportsRuntimeProtocol(g[WorldCacheKey]);
|
|
36
29
|
return g[WorldCacheKey];
|
|
30
|
+
}
|
|
37
31
|
if (g[WorldCachePromiseKey]) {
|
|
38
32
|
g[WorldCacheKey] = await g[WorldCachePromiseKey];
|
|
33
|
+
assertWorldSupportsRuntimeProtocol(g[WorldCacheKey]);
|
|
39
34
|
return g[WorldCacheKey];
|
|
40
35
|
}
|
|
41
|
-
//
|
|
42
|
-
// getWorld on globalThis at module load.
|
|
43
|
-
// import fallback, which doesn't survive Next.js inlining get-world-lazy
|
|
44
|
-
// into a route bundle (the relative './world.js' resolves against the
|
|
45
|
-
// bundled location, where no sibling world.js exists).
|
|
36
|
+
// world-init statically imports world.ts in host bundles, which registers
|
|
37
|
+
// getWorld on globalThis at module load.
|
|
46
38
|
const getWorldFn = g[GetWorldFnKey];
|
|
47
|
-
if (getWorldFn)
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
const { getWorld } = await import(worldPath);
|
|
54
|
-
return getWorld();
|
|
39
|
+
if (getWorldFn) {
|
|
40
|
+
const world = await getWorldFn();
|
|
41
|
+
assertWorldSupportsRuntimeProtocol(world);
|
|
42
|
+
return world;
|
|
43
|
+
}
|
|
44
|
+
throw new Error('Workflow world runtime was not initialized. Import from the host workflow entrypoints (`workflow`, `workflow/api`, or `workflow/runtime`) so @workflow/core/runtime/world-init can register getWorld before getWorldLazy() is used.');
|
|
55
45
|
}
|
|
56
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
46
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0LXdvcmxkLWxhenkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvcnVudGltZS9nZXQtd29ybGQtbGF6eS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7Ozs7Ozs7OztHQW1CRztBQUdILE9BQU8sRUFBRSxrQ0FBa0MsRUFBRSxNQUFNLDBCQUEwQixDQUFDO0FBRTlFLE1BQU0sYUFBYSxHQUFHLE1BQU0sQ0FBQyxHQUFHLENBQUMsd0JBQXdCLENBQUMsQ0FBQztBQUMzRCxNQUFNLG9CQUFvQixHQUFHLE1BQU0sQ0FBQyxHQUFHLENBQUMsK0JBQStCLENBQUMsQ0FBQztBQUN6RSxNQUFNLGFBQWEsR0FBRyxNQUFNLENBQUMsR0FBRyxDQUFDLDZCQUE2QixDQUFDLENBQUM7QUFRaEUsTUFBTSxDQUFDLEtBQUssVUFBVSxZQUFZO0lBQ2hDLE1BQU0sQ0FBQyxHQUFHLFVBQThCLENBQUM7SUFDekMsSUFBSSxDQUFDLENBQUMsYUFBYSxDQUFDLEVBQUUsQ0FBQztRQUNyQixrQ0FBa0MsQ0FBQyxDQUFDLENBQUMsYUFBYSxDQUFDLENBQUMsQ0FBQztRQUN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1lUHJvdG9jb2woZ1tXb3JsZENhY2hlS2V5XSk7XG4gICAgcmV0dXJuIGdbV29ybGRDYWNoZUtleV07XG4gIH1cbiAgLy8gd29ybGQtaW5pdCBzdGF0aWNhbGx5IGltcG9ydHMgd29ybGQudHMgaW4gaG9zdCBidW5kbGVzLCB3aGljaCByZWdpc3RlcnNcbiAgLy8gZ2V0V29ybGQgb24gZ2xvYmFsVGhpcyBhdCBtb2R1bGUgbG9hZC5cbiAgY29uc3QgZ2V0V29ybGRGbiA9IGdbR2V0V29ybGRGbktleV07XG4gIGlmIChnZXRXb3JsZEZuKSB7XG4gICAgY29uc3Qgd29ybGQgPSBhd2FpdCBnZXRXb3JsZEZuKCk7XG4gICAgYXNzZXJ0V29ybGRTdXBwb3J0c1J1bnRpbWVQcm90b2NvbCh3b3JsZCk7XG4gICAgcmV0dXJuIHdvcmxkO1xuICB9XG4gIHRocm93IG5ldyBFcnJvcihcbiAgICAnV29ya2Zsb3cgd29ybGQgcnVudGltZSB3YXMgbm90IGluaXRpYWxpemVkLiBJbXBvcnQgZnJvbSB0aGUgaG9zdCB3b3JrZmxvdyBlbnRyeXBvaW50cyAoYHdvcmtmbG93YCwgYHdvcmtmbG93L2FwaWAsIG9yIGB3b3JrZmxvdy9ydW50aW1lYCkgc28gQHdvcmtmbG93L2NvcmUvcnVudGltZS93b3JsZC1pbml0IGNhbiByZWdpc3RlciBnZXRXb3JsZCBiZWZvcmUgZ2V0V29ybGRMYXp5KCkgaXMgdXNlZC4nXG4gICk7XG59XG4iXX0=
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { Event, HealthCheckPayload, ValidQueueName, WorkflowRun, World } from '@workflow/world';
|
|
2
|
-
import { type
|
|
1
|
+
import type { CreateEventParams, CreateEventRequest, Event, EventResult, HealthCheckPayload, RunDispatchContext, ValidQueueName, WorkflowRun, World } from '@workflow/world';
|
|
2
|
+
import { type PayloadKey } from '../serialization/encryption.js';
|
|
3
3
|
/**
|
|
4
4
|
* Validates a workflow name and returns the corresponding queue name.
|
|
5
5
|
* Ensures the workflow name only contains safe characters before
|
|
6
6
|
* interpolating it into the queue name string.
|
|
7
7
|
*/
|
|
8
|
-
export declare function getWorkflowQueueName(workflowName: string): ValidQueueName;
|
|
8
|
+
export declare function getWorkflowQueueName(workflowName: string, namespace?: string): ValidQueueName;
|
|
9
9
|
/**
|
|
10
10
|
* Result of a health check operation.
|
|
11
11
|
*/
|
|
@@ -17,6 +17,35 @@ export interface HealthCheckResult {
|
|
|
17
17
|
latencyMs?: number;
|
|
18
18
|
/** Spec version of the responding deployment */
|
|
19
19
|
specVersion?: number;
|
|
20
|
+
/**
|
|
21
|
+
* `@workflow/core` version of the responding deployment, used for
|
|
22
|
+
* capability detection (see `getRunCapabilities`). Omitted when the
|
|
23
|
+
* responding deployment did not provide the field as a string:
|
|
24
|
+
* for example, an older `@workflow/core` that predates this field,
|
|
25
|
+
* or a non-JSON plain-text health response.
|
|
26
|
+
*/
|
|
27
|
+
workflowCoreVersion?: string;
|
|
28
|
+
/**
|
|
29
|
+
* The target run's X25519 public key (base64), returned only when the probe
|
|
30
|
+
* carried a `runId` and the responding deployment has encryption enabled.
|
|
31
|
+
*
|
|
32
|
+
* Lets a cross-deployment `start()` seal the workflow arguments using a
|
|
33
|
+
* response it was already waiting on, instead of making a separate
|
|
34
|
+
* key-lookup request.
|
|
35
|
+
*/
|
|
36
|
+
encryptionPublicKey?: string;
|
|
37
|
+
/**
|
|
38
|
+
* The responding deployment's `HOOK_RESUME_INPUT_VERSION`: the protocol
|
|
39
|
+
* version at which the *consumer* (queue-message target) materializes the
|
|
40
|
+
* `hook_received` event from `hookInput` on replay. A cross-deployment
|
|
41
|
+
* `start()` stamps the *target's* value (not the caller's) into the new
|
|
42
|
+
* run's `executionContext.hookResumeInputVersion`. Current producers write
|
|
43
|
+
* the event durably before publishing the wake and do not read the marker;
|
|
44
|
+
* OLDER producers still gate their lazy path on it, so it keeps being
|
|
45
|
+
* stamped. Omitted when the responding deployment predates this field,
|
|
46
|
+
* which fails that gate closed.
|
|
47
|
+
*/
|
|
48
|
+
hookResumeInputVersion?: number;
|
|
20
49
|
}
|
|
21
50
|
/**
|
|
22
51
|
* Checks if the given message is a health check payload.
|
|
@@ -28,17 +57,62 @@ export declare function parseHealthCheckPayload(message: unknown): HealthCheckPa
|
|
|
28
57
|
* The caller can listen to this stream to get the health check response.
|
|
29
58
|
*
|
|
30
59
|
* @param healthCheck - The parsed health check payload
|
|
31
|
-
* @param endpoint - Which endpoint is responding ('workflow' or 'step')
|
|
32
60
|
*/
|
|
33
|
-
export declare function handleHealthCheckMessage(healthCheck: HealthCheckPayload,
|
|
34
|
-
export type HealthCheckEndpoint = 'workflow' | 'step';
|
|
61
|
+
export declare function handleHealthCheckMessage(healthCheck: HealthCheckPayload, worldSpecVersion?: number): Promise<void>;
|
|
35
62
|
export interface HealthCheckOptions {
|
|
36
63
|
/** Timeout in milliseconds to wait for health check response. Default: 30000 (30s) */
|
|
37
64
|
timeout?: number;
|
|
38
65
|
/** Deployment ID to send the health check to. Falls back to process.env.VERCEL_DEPLOYMENT_ID. */
|
|
39
66
|
deploymentId?: string;
|
|
67
|
+
/**
|
|
68
|
+
* The run id the caller is about to create. When set, the responding
|
|
69
|
+
* deployment derives that run's public key locally and returns it as
|
|
70
|
+
* `encryptionPublicKey`, letting a cross-deployment `start()` seal the
|
|
71
|
+
* workflow arguments without a separate key lookup.
|
|
72
|
+
*/
|
|
73
|
+
runId?: string;
|
|
74
|
+
/**
|
|
75
|
+
* Queue namespace of the target deployment (e.g. `'eve'` for topics like
|
|
76
|
+
* `__eve_wkf_workflow_*`). Falls back to `WORKFLOW_QUEUE_NAMESPACE` in the
|
|
77
|
+
* calling process. Cross-context callers (e.g. the observability
|
|
78
|
+
* dashboard) must pass the target deployment's namespace explicitly:
|
|
79
|
+
* the env fallback resolves in the caller's process, and a message
|
|
80
|
+
* published to a mismatched topic has no consumer, so the check would
|
|
81
|
+
* always time out.
|
|
82
|
+
*/
|
|
83
|
+
namespace?: string;
|
|
40
84
|
}
|
|
41
|
-
export declare function healthCheck(world: World,
|
|
85
|
+
export declare function healthCheck(world: World, options?: HealthCheckOptions): Promise<HealthCheckResult>;
|
|
86
|
+
/**
|
|
87
|
+
* Appends events whose IDs are not already present in `target`.
|
|
88
|
+
*
|
|
89
|
+
* Pass the IDs currently present in `target` when appending repeatedly to the
|
|
90
|
+
* same array. The set is updated alongside `target`.
|
|
91
|
+
*
|
|
92
|
+
* Events are appended in the order the World returned them, and are not
|
|
93
|
+
* re-sorted. Every append source is already in canonical order relative to the
|
|
94
|
+
* tail (a cursor-delimited page, or a write-response delta), so receipt order is
|
|
95
|
+
* the order to keep, and re-sorting here would only cost a pass over the log.
|
|
96
|
+
* Nothing downstream may assume the tail is the newest event. See
|
|
97
|
+
* {@link maxEventSlot}.
|
|
98
|
+
*/
|
|
99
|
+
export declare function appendUniqueEvents(target: Event[], events: readonly Event[], targetIds?: Set<string>): void;
|
|
100
|
+
/**
|
|
101
|
+
* Inserts `event` into `target` at the position that keeps `target` ordered by
|
|
102
|
+
* ascending `eventId`, or no-ops if an event with the same `eventId` is already
|
|
103
|
+
* present (idempotent).
|
|
104
|
+
*
|
|
105
|
+
* `preloadedEvents` is loaded `sortOrder: 'asc'` and is never re-sorted
|
|
106
|
+
* client-side, so a `hook_received` spliced in by the lazy-resume consumer must
|
|
107
|
+
* land in `eventId` order: a plain `push` would place a late-committing
|
|
108
|
+
* earlier event after events that sort before it, corrupting replay.
|
|
109
|
+
*
|
|
110
|
+
* Lexicographic string order is the log's order: a slot id is a fixed-width
|
|
111
|
+
* zero-padded position, so comparing the strings compares the positions. This
|
|
112
|
+
* needs no parse of its own for that reason, and the comparison is exact rather
|
|
113
|
+
* than a reconstruction.
|
|
114
|
+
*/
|
|
115
|
+
export declare function insertEventByEventId(target: Event[], event: Event): void;
|
|
42
116
|
/**
|
|
43
117
|
* Loads workflow run events by iterating through all pages of paginated
|
|
44
118
|
* results. Events are returned in chronological (ascending) order for
|
|
@@ -50,19 +124,342 @@ export declare function healthCheck(world: World, endpoint: HealthCheckEndpoint,
|
|
|
50
124
|
* The returned cursor can be passed back in on a subsequent call for
|
|
51
125
|
* incremental loading.
|
|
52
126
|
*/
|
|
53
|
-
export declare function loadWorkflowRunEvents(runId: string, afterCursor?: string): Promise<
|
|
127
|
+
export declare function loadWorkflowRunEvents(runId: string, afterCursor?: string): Promise<LoadedEventLog>;
|
|
128
|
+
/**
|
|
129
|
+
* The runtime's loaded event-log snapshot: the events replayed so far and the
|
|
130
|
+
* cursor positioned after them. Handed to helpers that derive the precondition
|
|
131
|
+
* snapshot from it; they do not mutate it.
|
|
132
|
+
*/
|
|
133
|
+
export interface LoadedEventLog {
|
|
54
134
|
events: Event[];
|
|
55
135
|
cursor: string | null;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Extend a loaded log with a page that continues it — a listed page, or the
|
|
139
|
+
* inline delta a write handed back — and move its read position with it.
|
|
140
|
+
*
|
|
141
|
+
* The cursor is only advanced when the page carries one, so a source with no
|
|
142
|
+
* position of its own (a skipped-slot report) cannot walk the read position
|
|
143
|
+
* past events it did not carry. Appending does not re-sort; see
|
|
144
|
+
* {@link appendUniqueEvents} for why receipt order is the order to keep.
|
|
145
|
+
*/
|
|
146
|
+
export declare function appendEventLog(log: LoadedEventLog, appended: {
|
|
147
|
+
events: readonly Event[];
|
|
148
|
+
cursor?: string | null;
|
|
149
|
+
}): void;
|
|
150
|
+
/**
|
|
151
|
+
* Whether a replay refuses to run over a log with a hole in it (see
|
|
152
|
+
* {@link findEventSlotGap}). **On by default**; set
|
|
153
|
+
* `WORKFLOW_SLOT_GAP_CHECK=0` to replay across holes instead.
|
|
154
|
+
*
|
|
155
|
+
* A World that allocates a position at the moment it commits leaves no hole
|
|
156
|
+
* behind when a write fails, so density is a property the log has by
|
|
157
|
+
* construction rather than one this check maintains. What the check is for is
|
|
158
|
+
* the reads and the Worlds where that does not hold, and by the time it runs
|
|
159
|
+
* the benign explanations are spent: a position missing because a concurrent
|
|
160
|
+
* commit is not visible yet clears on a re-read, which is what
|
|
161
|
+
* {@link settleEventSlotGap} does first.
|
|
162
|
+
*
|
|
163
|
+
* What is left is a hole that persists, and its two causes are
|
|
164
|
+
* indistinguishable from the log. Either a World allocated the position outside
|
|
165
|
+
* the commit and lost the write, in which case nothing happened there and
|
|
166
|
+
* replaying past it is correct, or an event that did happen is missing, in
|
|
167
|
+
* which case replaying past it decides a branch on absence and produces a wrong
|
|
168
|
+
* result with nothing to show for it. Failing is the recoverable side of that
|
|
169
|
+
* trade, and this is the way back out if a fleet turns out to carry holes of
|
|
170
|
+
* the first kind.
|
|
171
|
+
*/
|
|
172
|
+
export declare function isSlotGapCheckEnabled(): boolean;
|
|
173
|
+
/**
|
|
174
|
+
* Merge the events a bump-and-report write handed back into the log it was
|
|
175
|
+
* derived from, and answer how many of them were new.
|
|
176
|
+
*
|
|
177
|
+
* Unlike {@link appendUniqueEvents}, this re-sorts. The reported events occupy
|
|
178
|
+
* slots *below* the write that reported them, so appending them would put them
|
|
179
|
+
* after events they precede. Sorting by id restores the World's canonical order
|
|
180
|
+
* rather than guessing at it: a slot id is that order, written down.
|
|
181
|
+
*/
|
|
182
|
+
export declare function mergeReportedEvents(target: Event[], events: readonly Event[]): number;
|
|
183
|
+
/** What {@link absorbSkippedSlotReport} did with a write's report. */
|
|
184
|
+
export interface SkippedSlotReport {
|
|
185
|
+
/** How many of the reported events were new to the log. Zero if dropped. */
|
|
186
|
+
added: number;
|
|
187
|
+
/** How many events the report offered, whether or not they were taken. */
|
|
188
|
+
offered: number;
|
|
189
|
+
/** The report was truncated, so it was dropped whole instead of merged. */
|
|
190
|
+
truncated: boolean;
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Apply a write's skipped-slot report to the log it was derived from, deciding
|
|
194
|
+
* whether the report may be taken at all.
|
|
195
|
+
*
|
|
196
|
+
* Every replay-context write can come back carrying the events on the slots it
|
|
197
|
+
* skipped over, and every caller wants the same thing from them: fold them in
|
|
198
|
+
* so the writes that follow name a position above them, and so the replay
|
|
199
|
+
* resuming from this log sees them without a reload.
|
|
200
|
+
*
|
|
201
|
+
* The one policy is that a **truncated report is dropped whole**. It covers a
|
|
202
|
+
* span of positions but carries only some of the events on them, so merging it
|
|
203
|
+
* would raise the log's highest position past a position whose event is
|
|
204
|
+
* missing. Later writes read that maximum to say what they have seen, so each
|
|
205
|
+
* would claim a position it never saw, and the World only reports the span a
|
|
206
|
+
* write skips: it would never send the missing one. Dropping costs one more
|
|
207
|
+
* round of the same events on the next write and keeps the log a prefix of the
|
|
208
|
+
* truth, which the note above {@link mergeReportedEvents} explains is always an
|
|
209
|
+
* available answer.
|
|
210
|
+
*
|
|
211
|
+
* Callers that log do so from the returned counts; the decision is not theirs
|
|
212
|
+
* to re-derive.
|
|
213
|
+
*/
|
|
214
|
+
export declare function absorbSkippedSlotReport(target: Event[], result: {
|
|
215
|
+
events?: readonly Event[];
|
|
216
|
+
hasMore?: boolean;
|
|
217
|
+
}): SkippedSlotReport;
|
|
218
|
+
/**
|
|
219
|
+
* The highest slot the loaded log occupies, or `undefined` for an empty log.
|
|
220
|
+
*
|
|
221
|
+
* The maximum, not the count, and the two are not interchangeable even though
|
|
222
|
+
* a healthy log makes them equal. A World hands a position to the insert that
|
|
223
|
+
* occupies it, so a write that never lands leaves no hole behind and the log
|
|
224
|
+
* stays dense. What the count cannot survive is a *partial* read: a log
|
|
225
|
+
* assembled from a truncated report, or read while a concurrent write is
|
|
226
|
+
* committing, holds fewer events than its highest position. Counting those
|
|
227
|
+
* would make the next write claim to have seen less than it has, so the World
|
|
228
|
+
* would report the same events back to it on every attempt.
|
|
229
|
+
*
|
|
230
|
+
* A hole below the maximum is therefore a property of the read, not of the log,
|
|
231
|
+
* which is what lets {@link settleEventSlotGap} re-read instead of giving up.
|
|
232
|
+
*
|
|
233
|
+
* @throws if any event id carries no slot. Every World the runtime replays
|
|
234
|
+
* against numbers events by slot, so an id that does not is a broken log rather
|
|
235
|
+
* than an older one, and a maximum derived by skipping it would understate the
|
|
236
|
+
* log to every write that reads it.
|
|
237
|
+
*/
|
|
238
|
+
export declare function maxEventSlot(events: readonly Event[]): number | undefined;
|
|
239
|
+
/** A position the log skips over, described well enough to name in an error. */
|
|
240
|
+
export interface EventSlotGap {
|
|
241
|
+
/** The lowest slot below the log's maximum that no event occupies. */
|
|
242
|
+
firstMissingSlot: number;
|
|
243
|
+
/** How many slots below the maximum no event occupies. */
|
|
244
|
+
missingCount: number;
|
|
245
|
+
/** The highest slot the log occupies. */
|
|
246
|
+
maxSlot: number;
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* The hole in a loaded log, or `undefined` when there is none to find.
|
|
250
|
+
*
|
|
251
|
+
* The World allocates every position, so a log that holds `n` events below slot
|
|
252
|
+
* `n` is missing one. That matters before a replay
|
|
253
|
+
* and nowhere else: the replay reads the log as the complete record of what has
|
|
254
|
+
* happened, and an absent position is indistinguishable from an event that
|
|
255
|
+
* never occurred. The branch it would have decided gets decided the other way,
|
|
256
|
+
* and the run diverges quietly rather than failing.
|
|
257
|
+
*
|
|
258
|
+
* Order-independent, unlike the equivalent audit the World runs over a page it
|
|
259
|
+
* just read. A loaded log is assembled from listed pages plus whatever a
|
|
260
|
+
* bump-and-report write handed back, and while {@link mergeReportedEvents}
|
|
261
|
+
* restores id order, a check that can fail a healthy run should not depend on
|
|
262
|
+
* that having happened.
|
|
263
|
+
*
|
|
264
|
+
* The first slot is never counted. It belongs to `run_created`, which `start()`
|
|
265
|
+
* posts concurrently with the queue send, so a log read in that window
|
|
266
|
+
* legitimately begins at the second slot and fills in on its own. Every replay
|
|
267
|
+
* that races a run's own start would otherwise report a hole.
|
|
268
|
+
*
|
|
269
|
+
* Returns `undefined` for an empty log, which has no density to check.
|
|
270
|
+
*
|
|
271
|
+
* @throws if any event id carries no slot, for the reason {@link maxEventSlot}
|
|
272
|
+
* gives.
|
|
273
|
+
*/
|
|
274
|
+
export declare function findEventSlotGap(events: readonly Event[]): EventSlotGap | undefined;
|
|
275
|
+
/**
|
|
276
|
+
* How many times a detected hole is re-read before the log is taken at its
|
|
277
|
+
* word, and the backoff before each re-read (doubling per attempt).
|
|
278
|
+
*
|
|
279
|
+
* A hole can be transient. The World allocates a slot inside the insert that
|
|
280
|
+
* occupies it, so two concurrent writers can collide, one retry past the other,
|
|
281
|
+
* and the higher slot commit first, leaving a window in which the lower one is
|
|
282
|
+
* genuinely absent from a strongly-consistent read and fills in a moment later.
|
|
283
|
+
* The window is one commit wide, so a short backoff clears it; anything that
|
|
284
|
+
* survives all three re-reads is a position no write will ever occupy.
|
|
285
|
+
*/
|
|
286
|
+
export declare const SLOT_GAP_RECHECK_ATTEMPTS = 3;
|
|
287
|
+
/**
|
|
288
|
+
* Re-read a log that looks holey until the hole fills in or the re-reads run
|
|
289
|
+
* out, and return the settled log alongside the hole that survived.
|
|
290
|
+
*
|
|
291
|
+
* Reads are strongly consistent, so a hole is not an artifact of *when* the log
|
|
292
|
+
* was read, but it can be an artifact of a write that had not committed yet
|
|
293
|
+
* (see {@link SLOT_GAP_RECHECK_ATTEMPTS}). Distinguishing the two costs a
|
|
294
|
+
* re-read, which is only ever paid by a replay that already found a hole.
|
|
295
|
+
*
|
|
296
|
+
* The reload is full rather than incremental: the missing position is below the
|
|
297
|
+
* log's maximum, so a cursor-anchored read starts past it and can never see it
|
|
298
|
+
* arrive.
|
|
299
|
+
*/
|
|
300
|
+
export declare function settleEventSlotGap(runId: string, loaded: LoadedEventLog): Promise<{
|
|
301
|
+
log: LoadedEventLog;
|
|
302
|
+
gap: EventSlotGap | undefined;
|
|
56
303
|
}>;
|
|
304
|
+
/**
|
|
305
|
+
* How much of its run's log a replay-context event creation had loaded when it
|
|
306
|
+
* decided to write, as the highest slot that log occupies.
|
|
307
|
+
*
|
|
308
|
+
* One integer says it because the World keeps its positions dense: a writer
|
|
309
|
+
* that names slot N is claiming to hold every event from 1 to N and nothing
|
|
310
|
+
* above. The World answers by numbering the write above whatever the log has
|
|
311
|
+
* actually reached and handing back the events on the slots in between: the
|
|
312
|
+
* ones this writer decided without.
|
|
313
|
+
*
|
|
314
|
+
* Density is the World's invariant, not a claim about this particular read. A
|
|
315
|
+
* reader that is short of a position it holds no event for names a lower N,
|
|
316
|
+
* which understates what it has seen and only costs it a wider report. Naming
|
|
317
|
+
* a position it cannot account for is the direction that is unsafe, which is
|
|
318
|
+
* why {@link slotSnapshotParams} takes the maximum rather than the count.
|
|
319
|
+
*
|
|
320
|
+
* Its own object rather than a bare number so a call site cannot half-send it,
|
|
321
|
+
* and so the empty case spreads to nothing.
|
|
322
|
+
*/
|
|
323
|
+
export interface SlotSnapshotParams {
|
|
324
|
+
eventCount?: number;
|
|
325
|
+
}
|
|
326
|
+
/**
|
|
327
|
+
* Build the slot snapshot to attach to a replay-context event creation.
|
|
328
|
+
*
|
|
329
|
+
* Empty for an empty log, which is the state a `run_created` write is issued
|
|
330
|
+
* from: there is no position held yet to name.
|
|
331
|
+
*
|
|
332
|
+
* ## Who names a position
|
|
333
|
+
*
|
|
334
|
+
* A World can hand events back on a write's success response through two
|
|
335
|
+
* params (`CreateEventParams` in `@workflow/world`): `eventCount`, which is
|
|
336
|
+
* answered with the events on the positions the write skipped over (the
|
|
337
|
+
* skipped-slot report), and `sinceCursor`, which is answered with everything
|
|
338
|
+
* after that cursor (the inline delta). Both exist to save the writer a
|
|
339
|
+
* reload. So the rule for which writes send them is not about the event type;
|
|
340
|
+
* it is about whether **the process that writes holds a loaded log it will
|
|
341
|
+
* keep deciding from**, its own next writes or the replay it resumes. A writer
|
|
342
|
+
* with no log has nothing to merge a page into, and whoever decides next is a
|
|
343
|
+
* fresh replay that loads the log anyway.
|
|
344
|
+
*
|
|
345
|
+
* Three gates, all of which must pass for a page to come back:
|
|
346
|
+
*
|
|
347
|
+
* 1. The writer names a position. Only the replay loop's `createEvent` seam
|
|
348
|
+
* (runtime.ts) and the suspension handler's `createGuarded` do; the QuickJS
|
|
349
|
+
* engine's `createEvent` (quickjs-entrypoint.ts) follows the same rule. Raw
|
|
350
|
+
* `world.events.create` calls send nothing.
|
|
351
|
+
* 2. The World reads a page for that event type. A World may decline for types
|
|
352
|
+
* whose writer never holds a log (step executor writes, run-terminal
|
|
353
|
+
* writes), whatever the client sent.
|
|
354
|
+
* 3. There is something to hand back: the report only when the write landed
|
|
355
|
+
* more than one position above `eventCount`; the delta always.
|
|
356
|
+
*
|
|
357
|
+
* | Event | Writer | Sends | Why |
|
|
358
|
+
* |---|---|---|---|
|
|
359
|
+
* | `run_created` | `start()` | nothing | no log exists yet |
|
|
360
|
+
* | `run_started` | replay loop, first write of a delivery | `eventCount` when a log is loaded; no cursor, the `run_started` preload owns the response fields | the preload already returns the full log |
|
|
361
|
+
* | `step_created`, `wait_created`, `hook_disposed`, `attr_set` | suspension handler (`createGuarded`) | `eventCount` | the handler keeps writing from, and resumes replay from, this log |
|
|
362
|
+
* | `step_created` | queue-consumer re-ensure (raw) | nothing | runs from a queue message, no log |
|
|
363
|
+
* | `hook_created` | suspension handler (node), `dispatchPendingOps` (QuickJS) | `eventCount` + `sinceCursor` (only when the suspension creates exactly one hook) | the delta is how an already-received hook resolves without a re-invocation; two creates against one cursor would give two deltas of which only the first could be taken |
|
|
364
|
+
* | `hook_received` | replay loop lazy resume; handler in-suspension resume | `eventCount` (preload owns the cursor fields) | both replay from the log right after |
|
|
365
|
+
* | `hook_received` | webhook / `resumeHook` (raw) | nothing | out-of-band, enqueues a delivery that loads the log |
|
|
366
|
+
* | `wait_completed` | replay loop timer path | `eventCount` | the loop keeps replaying from the log |
|
|
367
|
+
* | `wait_completed` | `runs.*` out-of-band (raw) | nothing | no log |
|
|
368
|
+
* | `step_started`, `step_retrying` | step executor | nothing | no log; the next decision is a replay that reloads or receives the delta below |
|
|
369
|
+
* | `step_completed`, `step_failed` | step executor | `sinceCursor` only, outside turbo, single inline step | this is where the inline execution loop gets its log back; in turbo or from a queued delivery a fresh replay loads it anyway |
|
|
370
|
+
* | `step_failed` | suspension handler, unserializable input | `eventCount` | the handler holds a log; rare, and follows a `step_created` that drew the page |
|
|
371
|
+
* | `attr_set` | `setAttributes()` API (raw) | nothing | out-of-band |
|
|
372
|
+
* | `run_completed`, `run_failed`, `run_cancelled` | replay loop, replay budget, `runs.cancel` | `eventCount` where the node loop's seam stamps it (the QuickJS engine sends nothing); never `sinceCursor` (`deltaRequestCursor` excludes terminal types) | terminal: nothing replays the log afterwards, so a World reads no page for them |
|
|
373
|
+
*
|
|
374
|
+
* Batched writes (`events.createBatch`) are outside all of this: a batch carries
|
|
375
|
+
* no per-event position and gets no page. The user-facing version of this table
|
|
376
|
+
* is in `docs/content/docs/v5/how-it-works/event-sourcing.mdx`; keep the two in
|
|
377
|
+
* step.
|
|
378
|
+
*
|
|
379
|
+
* The maximum rather than the length, for the reason {@link maxEventSlot}
|
|
380
|
+
* gives: a partially-read log holds fewer events than its highest position, and
|
|
381
|
+
* counting those would make the write claim to have seen less than it has, so
|
|
382
|
+
* the World would report the same events back on every attempt.
|
|
383
|
+
*/
|
|
384
|
+
export declare function slotSnapshotParams(events: readonly Event[]): SlotSnapshotParams;
|
|
385
|
+
/**
|
|
386
|
+
* The events a rejecting World attached to a `PreconditionFailedError`, when it
|
|
387
|
+
* returned the ones the client's snapshot was missing inline.
|
|
388
|
+
*
|
|
389
|
+
* Returns `null` for anything else: no details, a World that did not implement
|
|
390
|
+
* this, or a payload that does not narrow cleanly. Callers fall back to
|
|
391
|
+
* reloading the event log, which is always correct; this is untrusted-shaped
|
|
392
|
+
* data on a failure path, so nothing here is repaired.
|
|
393
|
+
*
|
|
394
|
+
* `runId` is the caller's run. Every event must belong to it: the delta is
|
|
395
|
+
* merged straight into the replay's log, and one foreign event there is a
|
|
396
|
+
* corrupt log rather than a corrected one: the replay would consume a
|
|
397
|
+
* correlation id for an event that does not exist on this run.
|
|
398
|
+
*/
|
|
399
|
+
export declare function preconditionEventDelta(error: unknown, runId: string): {
|
|
400
|
+
events: Event[];
|
|
401
|
+
cursor: string | null;
|
|
402
|
+
} | null;
|
|
403
|
+
/** Creates one event on a bound run, carrying replay-recovery telemetry. */
|
|
404
|
+
export type EventCreator = (data: CreateEventRequest, params?: CreateEventParams) => Promise<EventResult>;
|
|
57
405
|
/**
|
|
58
406
|
* Wraps a request/response handler and adds a health check "mode"
|
|
59
407
|
* based on the presence of a `__health` query parameter.
|
|
60
408
|
*/
|
|
61
409
|
export declare function withHealthCheck(handler: (req: Request) => Promise<Response>, worldSpecVersion?: number): (req: Request) => Promise<Response>;
|
|
410
|
+
/**
|
|
411
|
+
* The lineage root of a loaded run: its `$rootRunId` attribute, or its own id
|
|
412
|
+
* when it is itself a root.
|
|
413
|
+
*/
|
|
414
|
+
export declare function rootRunIdFrom(attributes: Record<string, string> | undefined, runId: string): string;
|
|
415
|
+
/**
|
|
416
|
+
* The immutable run identity a step-execution message carries so its consumer
|
|
417
|
+
* can start the step without a blocking `runs.get` — see
|
|
418
|
+
* `RunDispatchContextSchema` in @workflow/world. Built at dispatch time from
|
|
419
|
+
* the run row the producer already holds.
|
|
420
|
+
*/
|
|
421
|
+
export declare function runDispatchContext(run: Pick<WorkflowRun, 'runId' | 'deploymentId' | 'specVersion' | 'startedAt' | 'attributes'>): RunDispatchContext;
|
|
422
|
+
/**
|
|
423
|
+
* Idempotency key for a step's background-dispatch queue message, scoped to
|
|
424
|
+
* the step's IDENTITY, correlation id plus (hashed) step name, rather than
|
|
425
|
+
* the bare correlation id.
|
|
426
|
+
*
|
|
427
|
+
* The scoping matters for resilient step dispatch under the precondition
|
|
428
|
+
* guard: a guard-rejected `step_created` leaves its (revoked) step message in
|
|
429
|
+
* flight, and the corrected replay may re-derive the same correlation id for
|
|
430
|
+
* a DIFFERENT step. Under a bare-correlationId key the corrected replay's
|
|
431
|
+
* dispatch would silently dedupe against the revoked in-flight message,
|
|
432
|
+
* which then resolves `skipped` against the re-created entity (the server's
|
|
433
|
+
* stepName fence rejects its bare start), and the legitimate step would
|
|
434
|
+
* never be executed. Scoping by step name keeps every dedup property that
|
|
435
|
+
* matters (crash recovery re-dispatch, concurrent handlers, the delayed
|
|
436
|
+
* retry sharing the suspension re-dispatch's key: all name the same step)
|
|
437
|
+
* while letting the corrected schedule's dispatch through.
|
|
438
|
+
*
|
|
439
|
+
* Every producer of a step-dispatch (or step-retry) message must use this
|
|
440
|
+
* key. Cross-version mixing is not a concern: queue messages are pinned to
|
|
441
|
+
* the deployment that produced them, so one run never sees two key schemes.
|
|
442
|
+
*/
|
|
443
|
+
export declare function stepDispatchIdempotencyKey(correlationId: string, stepName: string): string;
|
|
62
444
|
/**
|
|
63
445
|
* Queues a message to the specified queue with tracing.
|
|
64
446
|
*/
|
|
65
447
|
export declare function queueMessage(world: World, ...args: Parameters<typeof world.queue>): Promise<void>;
|
|
448
|
+
/**
|
|
449
|
+
* Publishes several messages to one logical queue, using the World's batch
|
|
450
|
+
* send when it has one and falling back to concurrent single sends when it
|
|
451
|
+
* does not.
|
|
452
|
+
*
|
|
453
|
+
* Rejects if ANY message failed to publish, because every caller so far wants
|
|
454
|
+
* all-or-nothing: the recovery is to fail the delivery and let redelivery
|
|
455
|
+
* republish the whole set, deduped by the per-message `idempotencyKey`. That
|
|
456
|
+
* means a partial batch can leave some messages already out — which is
|
|
457
|
+
* exactly why the keys are required rather than advisory.
|
|
458
|
+
*/
|
|
459
|
+
export declare function queueMessages(world: World, queueName: Parameters<typeof world.queue>[0], messages: readonly {
|
|
460
|
+
message: Parameters<typeof world.queue>[1];
|
|
461
|
+
opts?: Parameters<typeof world.queue>[2];
|
|
462
|
+
}[]): Promise<void>;
|
|
66
463
|
/**
|
|
67
464
|
* Calculates the queue overhead time in milliseconds for a given message.
|
|
68
465
|
*/
|
|
@@ -72,26 +469,15 @@ export declare function getQueueOverhead(message: {
|
|
|
72
469
|
[k: string]: number;
|
|
73
470
|
} | undefined;
|
|
74
471
|
/**
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
* key fetch until the first code path that actually needs it — typically
|
|
85
|
-
* input hydration on the success path, or error dehydration on a failure
|
|
86
|
-
* path. Both paths can race-call the accessor without triggering duplicate
|
|
87
|
-
* fetches.
|
|
88
|
-
*
|
|
89
|
-
* Errors thrown by `getEncryptionKeyForRun` propagate to every caller
|
|
90
|
-
* (the cached promise rejects). This is intentional: when encryption is
|
|
91
|
-
* configured, we never want to silently fall back to plaintext
|
|
92
|
-
* serialization. A propagated error in an event-emission path leaves the
|
|
93
|
-
* outer try/catch to log and surface the issue; the queue's redelivery
|
|
94
|
-
* semantics will retry the key fetch on the next attempt.
|
|
472
|
+
* Resolve the run's full payload-encryption capability. This includes the
|
|
473
|
+
* symmetric key and X25519 keypair needed to open cross-run sealed payloads.
|
|
474
|
+
* Missing world support or key material resolves to `undefined`; lookup and
|
|
475
|
+
* derivation failures propagate rather than silently falling back to plaintext.
|
|
476
|
+
*/
|
|
477
|
+
export declare function resolveRunEncryptionKey(world: World, runOrId: WorkflowRun | string, context?: Record<string, unknown>): Promise<PayloadKey | undefined>;
|
|
478
|
+
/**
|
|
479
|
+
* Return a lazy, memoized accessor around {@link resolveRunEncryptionKey}.
|
|
480
|
+
* Concurrent callers share the same promise, including its rejection.
|
|
95
481
|
*/
|
|
96
|
-
export declare function memoizeEncryptionKey(world: World, runOrId: WorkflowRun | string): () => Promise<
|
|
482
|
+
export declare function memoizeEncryptionKey(world: World, runOrId: WorkflowRun | string): () => Promise<PayloadKey | undefined>;
|
|
97
483
|
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/runtime/helpers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/runtime/helpers.ts"],"names":[],"mappings":"AAKA,OAA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