@workflow/core 5.0.0-beta.42 → 5.0.0-beta.44
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/dist/capabilities.d.ts +4 -4
- package/dist/capabilities.js +5 -5
- package/dist/capture-stack.d.ts +1 -1
- package/dist/capture-stack.js +2 -2
- package/dist/class-serialization.d.ts +8 -8
- package/dist/class-serialization.js +9 -9
- package/dist/classify-error.js +5 -5
- 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 +5 -5
- package/dist/create-hook.d.ts +10 -6
- 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.js +8 -8
- package/dist/encryption.d.ts +5 -5
- package/dist/encryption.js +7 -7
- package/dist/events-consumer.d.ts +19 -7
- package/dist/events-consumer.d.ts.map +1 -1
- package/dist/events-consumer.js +33 -12
- package/dist/flushable-stream.d.ts +4 -4
- package/dist/flushable-stream.js +12 -12
- package/dist/global.d.ts +1 -1
- package/dist/global.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/log-format.d.ts +2 -2
- package/dist/log-format.js +5 -5
- package/dist/logger.js +4 -4
- package/dist/private.d.ts +39 -64
- package/dist/private.d.ts.map +1 -1
- package/dist/private.js +294 -48
- package/dist/replay-payload-cache.d.ts +1 -1
- package/dist/replay-payload-cache.js +4 -4
- package/dist/runtime/compute-instance.d.ts +4 -3
- package/dist/runtime/compute-instance.d.ts.map +1 -1
- package/dist/runtime/compute-instance.js +5 -4
- package/dist/runtime/constants.d.ts +46 -19
- package/dist/runtime/constants.d.ts.map +1 -1
- package/dist/runtime/constants.js +76 -38
- package/dist/runtime/count-step-started-events.d.ts +7 -7
- package/dist/runtime/count-step-started-events.js +4 -4
- package/dist/runtime/deployment-guard.d.ts +7 -7
- package/dist/runtime/deployment-guard.js +8 -8
- package/dist/runtime/get-port-lazy.d.ts +2 -2
- package/dist/runtime/get-port-lazy.d.ts.map +1 -1
- package/dist/runtime/get-port-lazy.js +37 -30
- package/dist/runtime/get-world-lazy.d.ts +2 -2
- package/dist/runtime/get-world-lazy.js +3 -3
- package/dist/runtime/helpers.d.ts +18 -18
- package/dist/runtime/helpers.js +27 -27
- package/dist/runtime/quickjs-entrypoint.d.ts +23 -10
- package/dist/runtime/quickjs-entrypoint.d.ts.map +1 -1
- package/dist/runtime/quickjs-entrypoint.js +200 -81
- package/dist/runtime/quickjs-runtime.d.ts +31 -15
- package/dist/runtime/quickjs-runtime.d.ts.map +1 -1
- package/dist/runtime/quickjs-runtime.js +126 -77
- package/dist/runtime/quickjs-serde.d.ts +10 -10
- package/dist/runtime/quickjs-serde.js +20 -20
- package/dist/runtime/replay-budget.d.ts +4 -4
- package/dist/runtime/replay-budget.js +5 -5
- package/dist/runtime/replay-recovery-reporter.d.ts +1 -1
- package/dist/runtime/replay-recovery-reporter.js +2 -2
- package/dist/runtime/resume-hook.d.ts +2 -2
- package/dist/runtime/resume-hook.js +27 -27
- package/dist/runtime/resume-latency.d.ts +25 -25
- package/dist/runtime/resume-latency.d.ts.map +1 -1
- package/dist/runtime/resume-latency.js +4 -4
- package/dist/runtime/run-id-time.d.ts +2 -2
- package/dist/runtime/run-id-time.js +5 -5
- package/dist/runtime/run.d.ts +21 -4
- package/dist/runtime/run.d.ts.map +1 -1
- package/dist/runtime/run.js +154 -35
- package/dist/runtime/runs.d.ts +4 -4
- package/dist/runtime/runs.js +2 -2
- package/dist/runtime/start.d.ts +3 -3
- package/dist/runtime/start.d.ts.map +1 -1
- package/dist/runtime/start.js +27 -23
- package/dist/runtime/step-executor.d.ts +59 -11
- package/dist/runtime/step-executor.d.ts.map +1 -1
- package/dist/runtime/step-executor.js +116 -42
- package/dist/runtime/step-latency.d.ts +20 -14
- package/dist/runtime/step-latency.d.ts.map +1 -1
- package/dist/runtime/step-latency.js +13 -11
- package/dist/runtime/step-ownership.d.ts +6 -6
- package/dist/runtime/step-ownership.js +8 -8
- package/dist/runtime/step-single-flight.d.ts +1 -1
- package/dist/runtime/step-single-flight.d.ts.map +1 -1
- package/dist/runtime/step-single-flight.js +17 -11
- package/dist/runtime/suspension-handler.d.ts +99 -7
- package/dist/runtime/suspension-handler.d.ts.map +1 -1
- package/dist/runtime/suspension-handler.js +678 -57
- 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 +1 -1
- package/dist/runtime/vm-mode.js +2 -2
- package/dist/runtime/wait-continuation.d.ts +31 -9
- package/dist/runtime/wait-continuation.d.ts.map +1 -1
- package/dist/runtime/wait-continuation.js +44 -13
- package/dist/runtime/wait-until.d.ts +1 -1
- package/dist/runtime/wait-until.js +2 -2
- package/dist/runtime/world-compatibility.d.ts +20 -9
- package/dist/runtime/world-compatibility.d.ts.map +1 -1
- package/dist/runtime/world-compatibility.js +24 -13
- package/dist/runtime/world-init.d.ts +5 -5
- package/dist/runtime/world-init.js +6 -6
- package/dist/runtime/world.d.ts.map +1 -1
- package/dist/runtime/world.js +13 -3
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +417 -213
- package/dist/sealed-box.d.ts +7 -7
- package/dist/sealed-box.js +15 -15
- package/dist/serialization/client.js +2 -2
- package/dist/serialization/codec-devalue-vm.d.ts +1 -1
- package/dist/serialization/codec-devalue-vm.js +4 -4
- package/dist/serialization/codec-devalue.d.ts +1 -1
- package/dist/serialization/codec-devalue.js +2 -2
- package/dist/serialization/codec.d.ts +4 -4
- package/dist/serialization/codec.js +2 -2
- package/dist/serialization/compression.d.ts +12 -11
- package/dist/serialization/compression.d.ts.map +1 -1
- package/dist/serialization/compression.js +16 -15
- package/dist/serialization/encryption.d.ts +7 -7
- package/dist/serialization/encryption.d.ts.map +1 -1
- package/dist/serialization/encryption.js +8 -8
- package/dist/serialization/errors.js +2 -2
- package/dist/serialization/format.d.ts +6 -6
- package/dist/serialization/format.js +7 -7
- package/dist/serialization/hardened.d.ts +18 -18
- package/dist/serialization/hardened.d.ts.map +1 -1
- package/dist/serialization/hardened.js +41 -32
- package/dist/serialization/index.d.ts +1 -1
- package/dist/serialization/index.js +2 -2
- package/dist/serialization/reducers/class-vm.d.ts +1 -1
- package/dist/serialization/reducers/class-vm.js +2 -2
- package/dist/serialization/reducers/class.js +2 -2
- package/dist/serialization/reducers/common-vm.js +12 -12
- package/dist/serialization/reducers/common.js +12 -12
- package/dist/serialization/reducers/step-function-vm.d.ts +1 -1
- package/dist/serialization/reducers/step-function-vm.js +2 -2
- package/dist/serialization/reducers/step-function.js +2 -2
- package/dist/serialization/step.js +2 -2
- package/dist/serialization/types.d.ts +5 -5
- package/dist/serialization/types.js +2 -2
- package/dist/serialization/workflow-vm.d.ts +1 -1
- package/dist/serialization/workflow-vm.d.ts.map +1 -1
- package/dist/serialization/workflow-vm.js +13 -10
- package/dist/serialization-format.d.ts +11 -11
- package/dist/serialization-format.d.ts.map +1 -1
- package/dist/serialization-format.js +29 -23
- package/dist/serialization.d.ts +20 -12
- package/dist/serialization.d.ts.map +1 -1
- package/dist/serialization.js +141 -99
- package/dist/set-attributes.js +2 -2
- package/dist/source-map.d.ts +1 -1
- package/dist/source-map.d.ts.map +1 -1
- package/dist/source-map.js +18 -12
- package/dist/step/context-storage.d.ts +5 -5
- package/dist/step/context-storage.js +1 -1
- package/dist/step/writable-stream.d.ts +3 -3
- package/dist/step/writable-stream.js +7 -7
- package/dist/step.js +12 -12
- package/dist/symbols.d.ts +2 -2
- package/dist/symbols.js +3 -3
- package/dist/telemetry/semantic-conventions.d.ts +21 -13
- package/dist/telemetry/semantic-conventions.d.ts.map +1 -1
- package/dist/telemetry/semantic-conventions.js +21 -15
- package/dist/telemetry.d.ts +9 -3
- package/dist/telemetry.d.ts.map +1 -1
- package/dist/telemetry.js +40 -10
- package/dist/test-support/orchestrator-context.d.ts.map +1 -1
- package/dist/test-support/orchestrator-context.js +12 -2
- package/dist/version.d.ts +1 -1
- package/dist/version.js +2 -2
- package/dist/vm/index.js +4 -4
- package/dist/vm/script-cache.d.ts.map +1 -1
- package/dist/vm/script-cache.js +23 -17
- package/dist/vm/uint8array-base64.js +1 -1
- package/dist/workflow/abort-controller.d.ts +1 -1
- package/dist/workflow/abort-controller.js +12 -12
- package/dist/workflow/create-hook.js +3 -3
- package/dist/workflow/get-workflow-metadata.js +2 -2
- package/dist/workflow/hook.js +18 -18
- package/dist/workflow/set-attributes.d.ts +1 -1
- package/dist/workflow/set-attributes.js +2 -2
- package/dist/workflow/sleep.js +2 -2
- package/dist/workflow/world-init-stub.d.ts +1 -1
- package/dist/workflow/world-init-stub.js +2 -2
- package/dist/workflow.d.ts +2 -2
- package/dist/workflow.js +36 -14
- package/docs/api-reference/create-hook.mdx +15 -15
- package/docs/api-reference/create-webhook.mdx +15 -15
- package/docs/api-reference/define-hook.mdx +10 -10
- package/docs/api-reference/fatal-error.mdx +2 -2
- package/docs/api-reference/fetch.mdx +7 -7
- 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 +1 -1
- package/docs/api-reference/retryable-error.mdx +1 -1
- package/docs/api-reference/set-attributes.mdx +2 -2
- package/docs/api-reference/sleep.mdx +3 -3
- package/docs/foundations/cancellation.mdx +31 -31
- package/docs/foundations/errors-and-retries.mdx +42 -11
- package/docs/foundations/hooks.mdx +37 -37
- package/docs/foundations/idempotency.mdx +9 -9
- package/docs/foundations/serialization.mdx +21 -22
- package/docs/foundations/starting-workflows.mdx +36 -37
- package/docs/foundations/streaming.mdx +68 -39
- package/docs/foundations/versioning.mdx +3 -3
- package/docs/foundations/workflows-and-steps.mdx +9 -9
- package/docs/how-it-works/cancellation.mdx +62 -62
- package/docs/how-it-works/code-transform.mdx +66 -54
- package/docs/how-it-works/encryption.mdx +25 -21
- package/docs/how-it-works/event-sourcing.mdx +84 -28
- package/docs/how-it-works/framework-integrations.mdx +12 -12
- package/docs/how-it-works/understanding-directives.mdx +21 -21
- package/package.json +7 -7
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* host code operating on `JSValueHandle`s, using devalue 5.9's pluggable
|
|
7
7
|
* operations (quickjs-wasi's host-side introspection primitives underneath).
|
|
8
8
|
* The serde bundle previously evaluated inside the VM is gone: guest values
|
|
9
|
-
* are read and built through handles, so no serializer code lives in
|
|
10
|
-
* can be tampered with from
|
|
9
|
+
* are read and built through handles, so no serializer code lives in (or
|
|
10
|
+
* can be tampered with from) the guest realm.
|
|
11
11
|
*
|
|
12
12
|
* Side-effect discipline mirrors the node:vm engine's hardened codec
|
|
13
13
|
* (serialization/hardened.ts):
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* `Symbol.toStringTag`;
|
|
18
18
|
* - extraction goes through intrinsics captured at boot (before any user
|
|
19
19
|
* code runs) invoked with explicit receivers, or through own-property
|
|
20
|
-
* descriptor reads
|
|
20
|
+
* descriptor reads, so patched prototypes and inherited accessors never
|
|
21
21
|
* run;
|
|
22
22
|
* - the only guest code serialization can execute is the same code the
|
|
23
23
|
* previous in-VM codec executed by contract: a class's static
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
* versa).
|
|
31
31
|
*
|
|
32
32
|
* Hybrid value space: reducers return host shapes (plain objects, strings,
|
|
33
|
-
* numbers) whose leaves may be guest handles
|
|
33
|
+
* numbers) whose leaves may be guest handles, exactly how the node:vm
|
|
34
34
|
* codec mixes host shapes with sandbox-realm leaves. Every stringify
|
|
35
35
|
* operation therefore dispatches on `JSValueHandle` and falls back to
|
|
36
36
|
* devalue's default host operations for host values. Parse operations
|
|
@@ -42,7 +42,7 @@ import { JSValueHandle, type QuickJS } from 'quickjs-wasi';
|
|
|
42
42
|
* bootstrap and BEFORE any user code. The returned handle owns the
|
|
43
43
|
* container; on the baseline-snapshot path its raw box pointer
|
|
44
44
|
* (`handle.ptr`) is recorded next to the snapshot and re-adopted per
|
|
45
|
-
* restored VM via {@link adoptSerdeRoot}
|
|
45
|
+
* restored VM via {@link adoptSerdeRoot}. Do NOT dispose the handle
|
|
46
46
|
* before the snapshot is taken (the box must stay live in the memory
|
|
47
47
|
* image).
|
|
48
48
|
*/
|
|
@@ -51,14 +51,14 @@ export declare function captureSerdeRoot(vm: QuickJS): JSValueHandle;
|
|
|
51
51
|
* Re-create the capture-root handle in a VM restored from a snapshot
|
|
52
52
|
* taken while the exported root was alive, via quickjs-wasi's
|
|
53
53
|
* snapshot-portable handle tokens (`importHandle` duplicates the
|
|
54
|
-
* underlying value
|
|
54
|
+
* underlying value: the returned handle is independently owned and the
|
|
55
55
|
* serde disposes it per restored VM). No guest code executes.
|
|
56
56
|
*/
|
|
57
57
|
export declare function adoptSerdeRoot(vm: QuickJS, token: number): JSValueHandle;
|
|
58
58
|
/**
|
|
59
59
|
* Export the capture root as a snapshot-portable token to record next to
|
|
60
60
|
* the baseline snapshot. The root handle must stay undisposed until the
|
|
61
|
-
* snapshot is taken (its box
|
|
61
|
+
* snapshot is taken (its box, and the reference it holds, must be part
|
|
62
62
|
* of the memory image).
|
|
63
63
|
*/
|
|
64
64
|
export declare function exportSerdeRoot(vm: QuickJS, root: JSValueHandle): number;
|
|
@@ -70,7 +70,7 @@ export interface QuickJSSerde {
|
|
|
70
70
|
/**
|
|
71
71
|
* The reducer names this codec applies, in registration order. Exposed
|
|
72
72
|
* so tests can assert exhaustiveness against the shared value-space
|
|
73
|
-
* codec (codec-devalue-vm)
|
|
73
|
+
* codec (codec-devalue-vm): a reducer added there but not here would
|
|
74
74
|
* otherwise silently round-trip values as plain objects.
|
|
75
75
|
*/
|
|
76
76
|
reducerKeys: readonly string[];
|
|
@@ -78,7 +78,7 @@ export interface QuickJSSerde {
|
|
|
78
78
|
reviverKeys: readonly string[];
|
|
79
79
|
/**
|
|
80
80
|
* Install `globalThis.process = { env: Object.freeze({...}) }` in the
|
|
81
|
-
* VM through handles and boot-captured intrinsics only
|
|
81
|
+
* VM through handles and boot-captured intrinsics only: no guest
|
|
82
82
|
* source is evaluated, so a module-scope wrapper around JSON.parse /
|
|
83
83
|
* Object.freeze cannot observe the injection. This matters on the
|
|
84
84
|
* baseline-snapshot path, where env injection happens after user code
|
|
@@ -98,7 +98,7 @@ export declare function createQuickJSSerde(vm: QuickJS,
|
|
|
98
98
|
* Pre-captured serde root (baseline-snapshot path): the container
|
|
99
99
|
* `captureSerdeRoot` created BEFORE user code, re-adopted from the
|
|
100
100
|
* restored memory image via `adoptSerdeRoot`. When omitted, the root
|
|
101
|
-
* is captured now
|
|
101
|
+
* is captured now; callers must guarantee no user code has run yet.
|
|
102
102
|
* Either way, initialization below performs only plain-data property
|
|
103
103
|
* reads and C-level classId reads on the container: NO guest code
|
|
104
104
|
* executes here, so nothing user-patchable can observe or perturb it.
|