@workflow/core 5.0.0-beta.44 → 5.0.0-beta.46
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/attribute-changes.d.ts +3 -5
- package/dist/attribute-changes.d.ts.map +1 -1
- package/dist/attribute-changes.js +2 -2
- package/dist/capabilities.d.ts +2 -2
- package/dist/capabilities.js +4 -4
- package/dist/events-consumer.d.ts +1 -1
- package/dist/events-consumer.d.ts.map +1 -1
- package/dist/events-consumer.js +3 -2
- package/dist/flushable-stream.js +2 -2
- package/dist/global.d.ts +3 -1
- package/dist/global.d.ts.map +1 -1
- package/dist/global.js +8 -5
- package/dist/private.d.ts +9 -7
- package/dist/private.d.ts.map +1 -1
- package/dist/private.js +11 -1
- package/dist/runtime/helpers.d.ts +3 -3
- package/dist/runtime/helpers.js +1 -1
- package/dist/runtime/quickjs-entrypoint.d.ts.map +1 -1
- package/dist/runtime/quickjs-entrypoint.js +8 -1
- package/dist/runtime/quickjs-runtime.js +7 -1
- package/dist/runtime/resume-hook.d.ts +27 -12
- package/dist/runtime/resume-hook.d.ts.map +1 -1
- package/dist/runtime/resume-hook.js +182 -182
- package/dist/runtime/resume-latency.d.ts +16 -6
- package/dist/runtime/resume-latency.d.ts.map +1 -1
- package/dist/runtime/resume-latency.js +4 -2
- package/dist/runtime/run.d.ts +1 -1
- package/dist/runtime/run.d.ts.map +1 -1
- package/dist/runtime/run.js +3 -2
- package/dist/runtime/start.js +3 -3
- package/dist/runtime/step-latency.d.ts +31 -14
- package/dist/runtime/step-latency.d.ts.map +1 -1
- package/dist/runtime/step-latency.js +19 -13
- package/dist/runtime/suspension-handler.d.ts +9 -7
- package/dist/runtime/suspension-handler.d.ts.map +1 -1
- package/dist/runtime/suspension-handler.js +41 -41
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +133 -66
- package/dist/serialization/hardened.d.ts +5 -4
- package/dist/serialization/hardened.d.ts.map +1 -1
- package/dist/serialization/hardened.js +7 -1
- package/dist/serialization-format.js +2 -2
- package/dist/serialization.d.ts +5 -6
- package/dist/serialization.d.ts.map +1 -1
- package/dist/serialization.js +19 -12
- package/dist/step.d.ts.map +1 -1
- package/dist/step.js +3 -11
- package/dist/telemetry/semantic-conventions.d.ts +14 -5
- package/dist/telemetry/semantic-conventions.d.ts.map +1 -1
- package/dist/telemetry/semantic-conventions.js +13 -4
- package/dist/version.d.ts +1 -1
- package/dist/version.js +2 -2
- package/dist/workflow/attribute-dispatcher.d.ts.map +1 -1
- package/dist/workflow/attribute-dispatcher.js +3 -6
- package/dist/workflow/hook.d.ts.map +1 -1
- package/dist/workflow/hook.js +6 -15
- package/dist/workflow.js +7 -8
- package/package.json +4 -4
|
@@ -15,18 +15,13 @@ export declare function getHookByToken(token: string): Promise<Hook>;
|
|
|
15
15
|
* The result of {@link resumeHook}: a {@link Hook} augmented with an optional
|
|
16
16
|
* resilience signal.
|
|
17
17
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* `resilientResume: true`.
|
|
26
|
-
*
|
|
27
|
-
* On the happy path (the direct write landed) and on the sequential fallback
|
|
28
|
-
* path, the flag is absent (`undefined`). Callers that don't care about the
|
|
29
|
-
* distinction can treat the result as a plain {@link Hook}.
|
|
18
|
+
* `resilientResume` is retained for source compatibility and is never set. It
|
|
19
|
+
* signalled a resume whose direct `hook_received` write had failed while the
|
|
20
|
+
* queue dispatch succeeded, back when the lazy path raced the two. The lazy
|
|
21
|
+
* path no longer writes the event at all (the queue consumer materializes it
|
|
22
|
+
* from `hookInput`), so there is no longer a distinction to report, and the
|
|
23
|
+
* sequential path never set the flag either. Treat the result as a plain
|
|
24
|
+
* {@link Hook}.
|
|
30
25
|
*/
|
|
31
26
|
export type ResumedHook = Hook & {
|
|
32
27
|
resilientResume?: boolean;
|
|
@@ -61,6 +56,26 @@ export type ResumedHook = Hook & {
|
|
|
61
56
|
* ```
|
|
62
57
|
*/
|
|
63
58
|
export declare function resumeHook<T = any>(tokenOrHook: string | Hook, payload: T, encryptionKeyOverride?: PayloadKey): Promise<ResumedHook>;
|
|
59
|
+
/**
|
|
60
|
+
* {@link resumeHook} with the `hook_received` event written BEFORE this
|
|
61
|
+
* resolves, for the one caller that needs the resume to be durable at that
|
|
62
|
+
* instant rather than merely dispatched.
|
|
63
|
+
*
|
|
64
|
+
* The lazy path leaves the write to the queue consumer, so a normal
|
|
65
|
+
* `resumeHook()` resolves while the event is still in flight. That is fine for
|
|
66
|
+
* an external resume, whose caller has nothing racing it. It is NOT fine for a
|
|
67
|
+
* resume the runtime itself issues as a barrier: a step that aborts a shared
|
|
68
|
+
* `AbortController` resumes the hook that records the abort in the event log,
|
|
69
|
+
* and that write has to land before the step completes, or the workflow
|
|
70
|
+
* continuation `step_completed` enqueues can dispatch the next step with a
|
|
71
|
+
* stale, non-aborted signal (see `reviveAbortController` in serialization.ts).
|
|
72
|
+
*
|
|
73
|
+
* Forcing the eager write costs the round trip the lazy path removes, which is
|
|
74
|
+
* the right trade here: this is an internal ordering barrier, not the
|
|
75
|
+
* latency-sensitive external resume the optimization targets. The resume span
|
|
76
|
+
* reports `resume_fallback_reason: durable_required`.
|
|
77
|
+
*/
|
|
78
|
+
export declare function resumeHookDurable<T = any>(tokenOrHook: string | Hook, payload: T, encryptionKeyOverride?: PayloadKey): Promise<ResumedHook>;
|
|
64
79
|
/**
|
|
65
80
|
* Resumes a webhook by sending a {@link https://developer.mozilla.org/en-US/docs/Web/API/Request | Request}
|
|
66
81
|
* object to a hook identified by its token.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resume-hook.d.ts","sourceRoot":"","sources":["../../src/runtime/resume-hook.ts"],"names":[],"mappings":"AAOA,OAAO,EAGL,KAAK,IAAI,EAUV,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"resume-hook.d.ts","sourceRoot":"","sources":["../../src/runtime/resume-hook.ts"],"names":[],"mappings":"AAOA,OAAO,EAGL,KAAK,IAAI,EAUV,MAAM,iBAAiB,CAAC;AAOzB,OAAO,EAGL,KAAK,UAAU,EAGhB,MAAM,qBAAqB,CAAC;AA0J7B;;;;;;;;;GASG;AACH,wBAAsB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAGjE;AAED;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG;IAAE,eAAe,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAE/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAsB,UAAU,CAAC,CAAC,GAAG,GAAG,EACtC,WAAW,EAAE,MAAM,GAAG,IAAI,EAC1B,OAAO,EAAE,CAAC,EACV,qBAAqB,CAAC,EAAE,UAAU,GACjC,OAAO,CAAC,WAAW,CAAC,CAoBtB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,iBAAiB,CAAC,CAAC,GAAG,GAAG,EAC7C,WAAW,EAAE,MAAM,GAAG,IAAI,EAC1B,OAAO,EAAE,CAAC,EACV,qBAAqB,CAAC,EAAE,UAAU,GACjC,OAAO,CAAC,WAAW,CAAC,CAStB;AA+ZD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAsB,aAAa,CACjC,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,OAAO,GACf,OAAO,CAAC,QAAQ,CAAC,CA4EnB"}
|