@fluidgrids/workflows 2026.1027.1 → 2026.1028.1
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 +144 -13
- package/dist/activation-BBh1p82z.d.cts +57 -0
- package/dist/activation-DnhG7SmF.d.ts +57 -0
- package/dist/assemble-BLqQ8lSu.d.cts +39 -0
- package/dist/assemble-DWgaXHd-.d.ts +39 -0
- package/dist/chunk-2DP2Y6EU.cjs +832 -0
- package/dist/chunk-2J6TF7YI.cjs +86 -0
- package/dist/chunk-3FOTFQ3J.js +1622 -0
- package/dist/chunk-4LYSEANA.js +199 -0
- package/dist/{chunk-TQF7MYEN.cjs → chunk-57MSZ24T.cjs} +134 -96
- package/dist/{chunk-EEAIM35V.js → chunk-5HDSBTBX.js} +64 -23
- package/dist/chunk-623FVQSN.cjs +251 -0
- package/dist/{chunk-W32BSO3M.js → chunk-6FSHT5IL.js} +2 -2
- package/dist/{chunk-E3APHA6O.cjs → chunk-7AAZGVKD.js} +1 -64
- package/dist/chunk-7NQ37GZU.js +73 -0
- package/dist/chunk-ABFZWYHT.js +612 -0
- package/dist/{chunk-6U446SKY.js → chunk-BD7ZPG53.js} +2 -2
- package/dist/chunk-BO6OVILK.js +79 -0
- package/dist/chunk-C5OLWZ42.js +245 -0
- package/dist/chunk-CBL5JSCC.cjs +75 -0
- package/dist/{chunk-OSPTJCDI.cjs → chunk-CPDK3K5N.cjs} +6 -6
- package/dist/chunk-CSNWNFKU.cjs +1635 -0
- package/dist/chunk-DJYMDLV5.js +227 -0
- package/dist/{chunk-IHKXLG6I.js → chunk-E2VK7J2C.js} +1 -1
- package/dist/chunk-FMSW2HDF.cjs +267 -0
- package/dist/chunk-FQIHX7YI.cjs +80 -0
- package/dist/chunk-FR7KYWRO.cjs +41 -0
- package/dist/{chunk-7YR7DI7B.cjs → chunk-GBQ33SIZ.cjs} +44 -44
- package/dist/{chunk-6AIAC2FP.cjs → chunk-GVTZMA5C.cjs} +4 -4
- package/dist/chunk-H7KEVW2M.js +816 -0
- package/dist/{chunk-3M34AUIY.cjs → chunk-HR3BN4C4.cjs} +3 -3
- package/dist/chunk-IISBRUWJ.js +13 -0
- package/dist/chunk-JD2VQIDZ.cjs +15 -0
- package/dist/{chunk-UB2BHU2M.js → chunk-JZ4TOOLN.js} +1 -1
- package/dist/chunk-L24YIZY7.cjs +207 -0
- package/dist/chunk-LNUQE6D6.js +39 -0
- package/dist/{chunk-TWOYB4Y7.cjs → chunk-NEIUQASE.cjs} +13 -13
- package/dist/chunk-P6TA5EZT.cjs +634 -0
- package/dist/chunk-PDHLTDZB.js +72 -0
- package/dist/chunk-PMCM2OH4.js +46 -0
- package/dist/chunk-PZCVF76Q.cjs +868 -0
- package/dist/{chunk-6BEW4QD6.js → chunk-QAN5MZEM.js} +1 -1
- package/dist/{chunk-CSYBNN3V.cjs → chunk-QKZL3ONM.cjs} +2 -2
- package/dist/chunk-SAENRNBJ.cjs +52 -0
- package/dist/{chunk-XBIID5DY.js → chunk-SMCANK3F.js} +5 -4
- package/dist/{chunk-UWQWD7BP.cjs → chunk-SX2PNKKT.cjs} +18 -17
- package/dist/{chunk-UJNHTS6D.js → chunk-TBDXTV22.cjs} +8 -45
- package/dist/chunk-VOKMAAJP.js +848 -0
- package/dist/{chunk-5AW745OG.js → chunk-XB53G2DK.js} +1 -1
- package/dist/chunk-Z2Y65YOY.cjs +7 -0
- package/dist/codegen/index.cjs +9 -7
- package/dist/codegen/index.d.cts +2 -2
- package/dist/codegen/index.d.ts +2 -2
- package/dist/codegen/index.js +6 -5
- package/dist/file-BOoHZgoQ.d.cts +1557 -0
- package/dist/file-yuPCFU5b.d.ts +1557 -0
- package/dist/history/index.cjs +287 -0
- package/dist/history/index.d.cts +157 -0
- package/dist/history/index.d.ts +157 -0
- package/dist/history/index.js +5 -0
- package/dist/index.cjs +134 -36
- package/dist/index.d.cts +137 -9
- package/dist/index.d.ts +137 -9
- package/dist/index.js +8 -3
- package/dist/ir/index.cjs +152 -158
- package/dist/ir/index.d.cts +14 -4
- package/dist/ir/index.d.ts +14 -4
- package/dist/ir/index.js +41 -50
- package/dist/lower-BuSvAFqi.d.cts +129 -0
- package/dist/lower-C_Qv_34S.d.ts +129 -0
- package/dist/lower-types-nofRXw9c.d.cts +15 -0
- package/dist/lower-types-nofRXw9c.d.ts +15 -0
- package/dist/{manifest-Duf-gHdO.d.cts → manifest-0OLw0i7k.d.cts} +1 -1
- package/dist/{manifest-Bp9ZJlav.d.ts → manifest-C8N6HDYl.d.ts} +1 -1
- package/dist/node-evaluator-CJNP4GHX.js +12 -0
- package/dist/node-evaluator-DMKPKUWA.cjs +22 -0
- package/dist/quickjs/index.cjs +236 -12
- package/dist/quickjs/index.d.cts +46 -5
- package/dist/quickjs/index.d.ts +46 -5
- package/dist/quickjs/index.js +230 -9
- package/dist/roundtrip/index.cjs +333 -131
- package/dist/roundtrip/index.d.cts +39 -7
- package/dist/roundtrip/index.d.ts +39 -7
- package/dist/roundtrip/index.js +185 -13
- package/dist/runtime/index.cjs +90 -0
- package/dist/runtime/index.d.cts +297 -0
- package/dist/runtime/index.d.ts +297 -0
- package/dist/runtime/index.js +8 -0
- package/dist/testing/index.cjs +1057 -0
- package/dist/testing/index.d.cts +305 -0
- package/dist/testing/index.d.ts +305 -0
- package/dist/testing/index.js +1037 -0
- package/dist/{types-Dr2Fn1Ax.d.ts → types-BGoPzgcl.d.cts} +1 -1
- package/dist/{types-Dr2Fn1Ax.d.cts → types-BGoPzgcl.d.ts} +1 -1
- package/dist/types-CpBBjaGX.d.cts +380 -0
- package/dist/types-DV-HX_Gt.d.ts +380 -0
- package/dist/{assemble-CrpUyd_3.d.ts → workflow-Bpr3vnA_.d.ts} +40 -160
- package/dist/workflow-C2a05WUJ.d.ts +444 -0
- package/dist/{assemble-DEf3znGD.d.cts → workflow-FXUkpIBc.d.cts} +40 -160
- package/dist/workflow-J-yYixny.d.cts +444 -0
- package/fixtures/README.md +128 -0
- package/fixtures/histories/activity-failure-fails-run.history.json +163 -0
- package/fixtures/histories/activity-retry-then-success.history.json +147 -0
- package/fixtures/histories/cancel-activity-abandon.history.json +126 -0
- package/fixtures/histories/cancel-activity-compensate.history.json +307 -0
- package/fixtures/histories/cancel-concurrent-non-cancellable.history.json +234 -0
- package/fixtures/histories/cancel-concurrent-scope-timeout.history.json +184 -0
- package/fixtures/histories/cancel-condition-after-cancel.history.json +200 -0
- package/fixtures/histories/cancel-during-timer.history.json +123 -0
- package/fixtures/histories/cancel-saga-compensations.history.json +325 -0
- package/fixtures/histories/cancel-scope-timeout.history.json +148 -0
- package/fixtures/histories/child-abandon-outlives-parent.history.json +191 -0
- package/fixtures/histories/child-cancel-default.history.json +234 -0
- package/fixtures/histories/child-cancel-request.history.json +206 -0
- package/fixtures/histories/child-durable-child-side.history.json +124 -0
- package/fixtures/histories/child-durable-result.history.json +163 -0
- package/fixtures/histories/child-failure-caught.history.json +166 -0
- package/fixtures/histories/child-graph-by-key.history.json +138 -0
- package/fixtures/histories/child-terminated-by-parent-close.history.json +85 -0
- package/fixtures/histories/continue-as-new-first-run.history.json +146 -0
- package/fixtures/histories/continue-as-new-history-limit.history.json +489 -0
- package/fixtures/histories/continue-as-new-last-run.history.json +147 -0
- package/fixtures/histories/continue-as-new-suggested.history.json +352 -0
- package/fixtures/histories/details-and-context.history.json +176 -0
- package/fixtures/histories/deterministic-values.history.json +128 -0
- package/fixtures/histories/engine-builtins.history.json +172 -0
- package/fixtures/histories/gather-activities.history.json +291 -0
- package/fixtures/histories/gather-all-settled.history.json +219 -0
- package/fixtures/histories/gather-mixed.history.json +281 -0
- package/fixtures/histories/input-during-running-task.history.json +111 -0
- package/fixtures/histories/nondeterminism-reordered.history.json +218 -0
- package/fixtures/histories/patched-deprecated.history.json +271 -0
- package/fixtures/histories/patched-new-run.history.json +270 -0
- package/fixtures/histories/patched-old-history.history.json +190 -0
- package/fixtures/histories/race-activity-wins.history.json +152 -0
- package/fixtures/histories/race-signal-beats-child.history.json +161 -0
- package/fixtures/histories/race-timeout-wins.history.json +118 -0
- package/fixtures/histories/side-effect-recorded.history.json +153 -0
- package/fixtures/histories/signal-buffered-at-start.history.json +157 -0
- package/fixtures/histories/signal-default-handler.history.json +187 -0
- package/fixtures/histories/signal-handler.history.json +191 -0
- package/fixtures/histories/signal-parent-child-side.history.json +132 -0
- package/fixtures/histories/signal-parent.history.json +202 -0
- package/fixtures/histories/signal-run-delivered.history.json +128 -0
- package/fixtures/histories/signal-run-undelivered.history.json +134 -0
- package/fixtures/histories/signal-wait.history.json +111 -0
- package/fixtures/histories/task-failure-code-error.history.json +137 -0
- package/fixtures/histories/task-failure-then-transient-attempt.history.json +140 -0
- package/fixtures/histories/timer-condition-met.history.json +201 -0
- package/fixtures/histories/timer-condition-timeout.history.json +118 -0
- package/fixtures/histories/timer-sleep-once.history.json +118 -0
- package/fixtures/histories/timer-sleep-sequence.history.json +210 -0
- package/fixtures/histories/update-accepted-completed.history.json +149 -0
- package/fixtures/histories/update-with-start-rejected-validation.history.json +91 -0
- package/package.json +44 -5
- package/schema/history-file.schema.json +2544 -0
- package/schema/ir-v2.schema.json +16 -0
- package/schema/run-event.schema.json +2374 -0
- package/schema/workflow-command.schema.json +1095 -0
- package/schema/workflow-task.schema.json +3560 -0
- package/dist/chunk-MBBKGD7K.js +0 -440
- package/dist/chunk-Y7NWR3WH.cjs +0 -450
- package/dist/lower-CXggJTIo.d.ts +0 -67
- package/dist/lower-DAzvsJCo.d.cts +0 -67
- package/dist/node-evaluator-CH3XCJND.cjs +0 -17
- package/dist/node-evaluator-TULXA3WE.js +0 -8
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkPZCVF76Q_cjs = require('../chunk-PZCVF76Q.cjs');
|
|
4
|
+
require('../chunk-SAENRNBJ.cjs');
|
|
5
|
+
var chunkP6TA5EZT_cjs = require('../chunk-P6TA5EZT.cjs');
|
|
6
|
+
var chunk623FVQSN_cjs = require('../chunk-623FVQSN.cjs');
|
|
7
|
+
var chunk2J6TF7YI_cjs = require('../chunk-2J6TF7YI.cjs');
|
|
8
|
+
require('../chunk-Z2Y65YOY.cjs');
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
Object.defineProperty(exports, "HISTORY_FILE_FORMAT", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () { return chunkPZCVF76Q_cjs.HISTORY_FILE_FORMAT; }
|
|
15
|
+
});
|
|
16
|
+
Object.defineProperty(exports, "HISTORY_FILE_SCHEMA", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () { return chunkPZCVF76Q_cjs.HISTORY_FILE_SCHEMA; }
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(exports, "HISTORY_FILE_SCHEMA_ID", {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function () { return chunkPZCVF76Q_cjs.HISTORY_FILE_SCHEMA_ID; }
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "HISTORY_SCHEMA_FILES", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () { return chunkPZCVF76Q_cjs.HISTORY_SCHEMA_FILES; }
|
|
27
|
+
});
|
|
28
|
+
Object.defineProperty(exports, "HistoryFileError", {
|
|
29
|
+
enumerable: true,
|
|
30
|
+
get: function () { return chunkPZCVF76Q_cjs.HistoryFileError; }
|
|
31
|
+
});
|
|
32
|
+
Object.defineProperty(exports, "RUN_EVENT_SCHEMA", {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () { return chunkPZCVF76Q_cjs.RUN_EVENT_SCHEMA; }
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(exports, "RUN_EVENT_SCHEMA_ID", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () { return chunkPZCVF76Q_cjs.RUN_EVENT_SCHEMA_ID; }
|
|
39
|
+
});
|
|
40
|
+
Object.defineProperty(exports, "WORKFLOW_COMMAND_SCHEMA", {
|
|
41
|
+
enumerable: true,
|
|
42
|
+
get: function () { return chunkPZCVF76Q_cjs.WORKFLOW_COMMAND_SCHEMA; }
|
|
43
|
+
});
|
|
44
|
+
Object.defineProperty(exports, "WORKFLOW_COMMAND_SCHEMA_ID", {
|
|
45
|
+
enumerable: true,
|
|
46
|
+
get: function () { return chunkPZCVF76Q_cjs.WORKFLOW_COMMAND_SCHEMA_ID; }
|
|
47
|
+
});
|
|
48
|
+
Object.defineProperty(exports, "WORKFLOW_TASK_SCHEMA", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function () { return chunkPZCVF76Q_cjs.WORKFLOW_TASK_SCHEMA; }
|
|
51
|
+
});
|
|
52
|
+
Object.defineProperty(exports, "WORKFLOW_TASK_SCHEMA_ID", {
|
|
53
|
+
enumerable: true,
|
|
54
|
+
get: function () { return chunkPZCVF76Q_cjs.WORKFLOW_TASK_SCHEMA_ID; }
|
|
55
|
+
});
|
|
56
|
+
Object.defineProperty(exports, "compilePayloadValidator", {
|
|
57
|
+
enumerable: true,
|
|
58
|
+
get: function () { return chunkPZCVF76Q_cjs.compilePayloadValidator; }
|
|
59
|
+
});
|
|
60
|
+
Object.defineProperty(exports, "createHistoryFile", {
|
|
61
|
+
enumerable: true,
|
|
62
|
+
get: function () { return chunkPZCVF76Q_cjs.createHistoryFile; }
|
|
63
|
+
});
|
|
64
|
+
Object.defineProperty(exports, "parseHistoryFile", {
|
|
65
|
+
enumerable: true,
|
|
66
|
+
get: function () { return chunkPZCVF76Q_cjs.parseHistoryFile; }
|
|
67
|
+
});
|
|
68
|
+
Object.defineProperty(exports, "serializeHistoryFile", {
|
|
69
|
+
enumerable: true,
|
|
70
|
+
get: function () { return chunkPZCVF76Q_cjs.serializeHistoryFile; }
|
|
71
|
+
});
|
|
72
|
+
Object.defineProperty(exports, "validateCommand", {
|
|
73
|
+
enumerable: true,
|
|
74
|
+
get: function () { return chunkPZCVF76Q_cjs.validateCommand; }
|
|
75
|
+
});
|
|
76
|
+
Object.defineProperty(exports, "validateCommands", {
|
|
77
|
+
enumerable: true,
|
|
78
|
+
get: function () { return chunkPZCVF76Q_cjs.validateCommands; }
|
|
79
|
+
});
|
|
80
|
+
Object.defineProperty(exports, "validateHistory", {
|
|
81
|
+
enumerable: true,
|
|
82
|
+
get: function () { return chunkPZCVF76Q_cjs.validateHistory; }
|
|
83
|
+
});
|
|
84
|
+
Object.defineProperty(exports, "validateHistoryFile", {
|
|
85
|
+
enumerable: true,
|
|
86
|
+
get: function () { return chunkPZCVF76Q_cjs.validateHistoryFile; }
|
|
87
|
+
});
|
|
88
|
+
Object.defineProperty(exports, "CHILD_DEFAULT_CANCELLATION_TYPE", {
|
|
89
|
+
enumerable: true,
|
|
90
|
+
get: function () { return chunkP6TA5EZT_cjs.CHILD_DEFAULT_CANCELLATION_TYPE; }
|
|
91
|
+
});
|
|
92
|
+
Object.defineProperty(exports, "CHILD_DEFAULT_PARENT_CLOSE_POLICY", {
|
|
93
|
+
enumerable: true,
|
|
94
|
+
get: function () { return chunkP6TA5EZT_cjs.CHILD_DEFAULT_PARENT_CLOSE_POLICY; }
|
|
95
|
+
});
|
|
96
|
+
Object.defineProperty(exports, "DEFAULT_ACTIVITY_RETRY", {
|
|
97
|
+
enumerable: true,
|
|
98
|
+
get: function () { return chunkP6TA5EZT_cjs.DEFAULT_ACTIVITY_RETRY; }
|
|
99
|
+
});
|
|
100
|
+
Object.defineProperty(exports, "HistoryStateError", {
|
|
101
|
+
enumerable: true,
|
|
102
|
+
get: function () { return chunkP6TA5EZT_cjs.HistoryStateError; }
|
|
103
|
+
});
|
|
104
|
+
Object.defineProperty(exports, "applyEvent", {
|
|
105
|
+
enumerable: true,
|
|
106
|
+
get: function () { return chunkP6TA5EZT_cjs.applyEvent; }
|
|
107
|
+
});
|
|
108
|
+
Object.defineProperty(exports, "codeWorkflowParentClosePolicy", {
|
|
109
|
+
enumerable: true,
|
|
110
|
+
get: function () { return chunkP6TA5EZT_cjs.codeWorkflowParentClosePolicy; }
|
|
111
|
+
});
|
|
112
|
+
Object.defineProperty(exports, "computeRetryDelay", {
|
|
113
|
+
enumerable: true,
|
|
114
|
+
get: function () { return chunkP6TA5EZT_cjs.computeRetryDelay; }
|
|
115
|
+
});
|
|
116
|
+
Object.defineProperty(exports, "eventsForCommands", {
|
|
117
|
+
enumerable: true,
|
|
118
|
+
get: function () { return chunkP6TA5EZT_cjs.eventsForCommands; }
|
|
119
|
+
});
|
|
120
|
+
Object.defineProperty(exports, "explicitRetryPolicy", {
|
|
121
|
+
enumerable: true,
|
|
122
|
+
get: function () { return chunkP6TA5EZT_cjs.explicitRetryPolicy; }
|
|
123
|
+
});
|
|
124
|
+
Object.defineProperty(exports, "hasUnprocessedInput", {
|
|
125
|
+
enumerable: true,
|
|
126
|
+
get: function () { return chunkP6TA5EZT_cjs.hasUnprocessedInput; }
|
|
127
|
+
});
|
|
128
|
+
Object.defineProperty(exports, "initialRunState", {
|
|
129
|
+
enumerable: true,
|
|
130
|
+
get: function () { return chunkP6TA5EZT_cjs.initialRunState; }
|
|
131
|
+
});
|
|
132
|
+
Object.defineProperty(exports, "isActivityOpen", {
|
|
133
|
+
enumerable: true,
|
|
134
|
+
get: function () { return chunkP6TA5EZT_cjs.isActivityOpen; }
|
|
135
|
+
});
|
|
136
|
+
Object.defineProperty(exports, "isChildOpen", {
|
|
137
|
+
enumerable: true,
|
|
138
|
+
get: function () { return chunkP6TA5EZT_cjs.isChildOpen; }
|
|
139
|
+
});
|
|
140
|
+
Object.defineProperty(exports, "isCommandEnabled", {
|
|
141
|
+
enumerable: true,
|
|
142
|
+
get: function () { return chunkP6TA5EZT_cjs.isCommandEnabled; }
|
|
143
|
+
});
|
|
144
|
+
Object.defineProperty(exports, "isWorkflowCommandEnabled", {
|
|
145
|
+
enumerable: true,
|
|
146
|
+
get: function () { return chunkP6TA5EZT_cjs.isWorkflowCommandEnabled; }
|
|
147
|
+
});
|
|
148
|
+
Object.defineProperty(exports, "pendingCounts", {
|
|
149
|
+
enumerable: true,
|
|
150
|
+
get: function () { return chunkP6TA5EZT_cjs.pendingCounts; }
|
|
151
|
+
});
|
|
152
|
+
Object.defineProperty(exports, "projectRunState", {
|
|
153
|
+
enumerable: true,
|
|
154
|
+
get: function () { return chunkP6TA5EZT_cjs.projectRunState; }
|
|
155
|
+
});
|
|
156
|
+
Object.defineProperty(exports, "splitActivations", {
|
|
157
|
+
enumerable: true,
|
|
158
|
+
get: function () { return chunkP6TA5EZT_cjs.splitActivations; }
|
|
159
|
+
});
|
|
160
|
+
Object.defineProperty(exports, "taskCompletedEvents", {
|
|
161
|
+
enumerable: true,
|
|
162
|
+
get: function () { return chunkP6TA5EZT_cjs.taskCompletedEvents; }
|
|
163
|
+
});
|
|
164
|
+
Object.defineProperty(exports, "unseenInputs", {
|
|
165
|
+
enumerable: true,
|
|
166
|
+
get: function () { return chunkP6TA5EZT_cjs.unseenInputs; }
|
|
167
|
+
});
|
|
168
|
+
Object.defineProperty(exports, "utf8Bytes", {
|
|
169
|
+
enumerable: true,
|
|
170
|
+
get: function () { return chunkP6TA5EZT_cjs.utf8Bytes; }
|
|
171
|
+
});
|
|
172
|
+
Object.defineProperty(exports, "ACTIVITY_CANCELLATION_TYPES", {
|
|
173
|
+
enumerable: true,
|
|
174
|
+
get: function () { return chunk623FVQSN_cjs.ACTIVITY_CANCELLATION_TYPES; }
|
|
175
|
+
});
|
|
176
|
+
Object.defineProperty(exports, "BUILT_IN_QUERIES", {
|
|
177
|
+
enumerable: true,
|
|
178
|
+
get: function () { return chunk623FVQSN_cjs.BUILT_IN_QUERIES; }
|
|
179
|
+
});
|
|
180
|
+
Object.defineProperty(exports, "CHILD_CANCELLATION_TYPES", {
|
|
181
|
+
enumerable: true,
|
|
182
|
+
get: function () { return chunk623FVQSN_cjs.CHILD_CANCELLATION_TYPES; }
|
|
183
|
+
});
|
|
184
|
+
Object.defineProperty(exports, "COMMAND_EVENTS", {
|
|
185
|
+
enumerable: true,
|
|
186
|
+
get: function () { return chunk623FVQSN_cjs.COMMAND_EVENTS; }
|
|
187
|
+
});
|
|
188
|
+
Object.defineProperty(exports, "COMMAND_EVENT_TYPES", {
|
|
189
|
+
enumerable: true,
|
|
190
|
+
get: function () { return chunk623FVQSN_cjs.COMMAND_EVENT_TYPES; }
|
|
191
|
+
});
|
|
192
|
+
Object.defineProperty(exports, "COMMAND_TYPES", {
|
|
193
|
+
enumerable: true,
|
|
194
|
+
get: function () { return chunk623FVQSN_cjs.COMMAND_TYPES; }
|
|
195
|
+
});
|
|
196
|
+
Object.defineProperty(exports, "CONTINUE_AS_NEW_SUGGESTED_RATIO", {
|
|
197
|
+
enumerable: true,
|
|
198
|
+
get: function () { return chunk623FVQSN_cjs.CONTINUE_AS_NEW_SUGGESTED_RATIO; }
|
|
199
|
+
});
|
|
200
|
+
Object.defineProperty(exports, "DEFAULT_HISTORY_LIMIT", {
|
|
201
|
+
enumerable: true,
|
|
202
|
+
get: function () { return chunk623FVQSN_cjs.DEFAULT_HISTORY_LIMIT; }
|
|
203
|
+
});
|
|
204
|
+
Object.defineProperty(exports, "ERROR_TYPES", {
|
|
205
|
+
enumerable: true,
|
|
206
|
+
get: function () { return chunk623FVQSN_cjs.ERROR_TYPES; }
|
|
207
|
+
});
|
|
208
|
+
Object.defineProperty(exports, "EVENT_TYPES", {
|
|
209
|
+
enumerable: true,
|
|
210
|
+
get: function () { return chunk623FVQSN_cjs.EVENT_TYPES; }
|
|
211
|
+
});
|
|
212
|
+
Object.defineProperty(exports, "EXECUTION_KINDS", {
|
|
213
|
+
enumerable: true,
|
|
214
|
+
get: function () { return chunk623FVQSN_cjs.EXECUTION_KINDS; }
|
|
215
|
+
});
|
|
216
|
+
Object.defineProperty(exports, "HISTORY_LIMIT_EXCEEDED_RATIO", {
|
|
217
|
+
enumerable: true,
|
|
218
|
+
get: function () { return chunk623FVQSN_cjs.HISTORY_LIMIT_EXCEEDED_RATIO; }
|
|
219
|
+
});
|
|
220
|
+
Object.defineProperty(exports, "HISTORY_PROTOCOL", {
|
|
221
|
+
enumerable: true,
|
|
222
|
+
get: function () { return chunk623FVQSN_cjs.HISTORY_PROTOCOL; }
|
|
223
|
+
});
|
|
224
|
+
Object.defineProperty(exports, "INPUT_EVENTS", {
|
|
225
|
+
enumerable: true,
|
|
226
|
+
get: function () { return chunk623FVQSN_cjs.INPUT_EVENTS; }
|
|
227
|
+
});
|
|
228
|
+
Object.defineProperty(exports, "PARENT_CLOSE_POLICIES", {
|
|
229
|
+
enumerable: true,
|
|
230
|
+
get: function () { return chunk623FVQSN_cjs.PARENT_CLOSE_POLICIES; }
|
|
231
|
+
});
|
|
232
|
+
Object.defineProperty(exports, "PHASE_B_CORE_COMMANDS", {
|
|
233
|
+
enumerable: true,
|
|
234
|
+
get: function () { return chunk623FVQSN_cjs.PHASE_B_CORE_COMMANDS; }
|
|
235
|
+
});
|
|
236
|
+
Object.defineProperty(exports, "PHASE_B_PARITY_COMMANDS", {
|
|
237
|
+
enumerable: true,
|
|
238
|
+
get: function () { return chunk623FVQSN_cjs.PHASE_B_PARITY_COMMANDS; }
|
|
239
|
+
});
|
|
240
|
+
Object.defineProperty(exports, "PHASE_C_COMMANDS", {
|
|
241
|
+
enumerable: true,
|
|
242
|
+
get: function () { return chunk623FVQSN_cjs.PHASE_C_COMMANDS; }
|
|
243
|
+
});
|
|
244
|
+
Object.defineProperty(exports, "TASK_FAILURE_CAUSES", {
|
|
245
|
+
enumerable: true,
|
|
246
|
+
get: function () { return chunk623FVQSN_cjs.TASK_FAILURE_CAUSES; }
|
|
247
|
+
});
|
|
248
|
+
Object.defineProperty(exports, "TERMINAL_COMMANDS", {
|
|
249
|
+
enumerable: true,
|
|
250
|
+
get: function () { return chunk623FVQSN_cjs.TERMINAL_COMMANDS; }
|
|
251
|
+
});
|
|
252
|
+
Object.defineProperty(exports, "TERMINAL_EVENTS", {
|
|
253
|
+
enumerable: true,
|
|
254
|
+
get: function () { return chunk623FVQSN_cjs.TERMINAL_EVENTS; }
|
|
255
|
+
});
|
|
256
|
+
Object.defineProperty(exports, "isCommandEvent", {
|
|
257
|
+
enumerable: true,
|
|
258
|
+
get: function () { return chunk623FVQSN_cjs.isCommandEvent; }
|
|
259
|
+
});
|
|
260
|
+
Object.defineProperty(exports, "isInputEvent", {
|
|
261
|
+
enumerable: true,
|
|
262
|
+
get: function () { return chunk623FVQSN_cjs.isInputEvent; }
|
|
263
|
+
});
|
|
264
|
+
Object.defineProperty(exports, "ACTIVITY_INTERNAL_ALLOWLIST", {
|
|
265
|
+
enumerable: true,
|
|
266
|
+
get: function () { return chunk2J6TF7YI_cjs.ACTIVITY_INTERNAL_ALLOWLIST; }
|
|
267
|
+
});
|
|
268
|
+
Object.defineProperty(exports, "ACTIVITY_NODE_ALLOWLIST", {
|
|
269
|
+
enumerable: true,
|
|
270
|
+
get: function () { return chunk2J6TF7YI_cjs.ACTIVITY_NODE_ALLOWLIST; }
|
|
271
|
+
});
|
|
272
|
+
Object.defineProperty(exports, "ACTIVITY_NODE_DENYLIST", {
|
|
273
|
+
enumerable: true,
|
|
274
|
+
get: function () { return chunk2J6TF7YI_cjs.ACTIVITY_NODE_DENYLIST; }
|
|
275
|
+
});
|
|
276
|
+
Object.defineProperty(exports, "ActivityNodeTypeNotAllowedError", {
|
|
277
|
+
enumerable: true,
|
|
278
|
+
get: function () { return chunk2J6TF7YI_cjs.ActivityNodeTypeNotAllowedError; }
|
|
279
|
+
});
|
|
280
|
+
Object.defineProperty(exports, "assertActivityNodeType", {
|
|
281
|
+
enumerable: true,
|
|
282
|
+
get: function () { return chunk2J6TF7YI_cjs.assertActivityNodeType; }
|
|
283
|
+
});
|
|
284
|
+
Object.defineProperty(exports, "isActivityNodeTypeAllowed", {
|
|
285
|
+
enumerable: true,
|
|
286
|
+
get: function () { return chunk2J6TF7YI_cjs.isActivityNodeTypeAllowed; }
|
|
287
|
+
});
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { W as WorkflowCommand, a as WorkflowTaskFailureCause, R as RetryPolicy, F as Failure, C as ChildCancellationType, P as ParentClosePolicy } from '../types-CpBBjaGX.cjs';
|
|
2
|
+
export { A as ACTIVITY_CANCELLATION_TYPES, b as AcceptUpdateCommand, c as ActivityCancellationType, B as BUILT_IN_QUERIES, d as BuiltInQueryName, e as CHILD_CANCELLATION_TYPES, f as COMMAND_EVENTS, g as COMMAND_EVENT_TYPES, h as COMMAND_TYPES, i as CONTINUE_AS_NEW_SUGGESTED_RATIO, j as CancelTimerCommand, k as CancelWorkflowCommand, l as ChildRunOptions, m as CommandType, n as CompleteUpdateCommand, o as CompleteWorkflowCommand, p as ContinueAsNewCommand, D as DEFAULT_HISTORY_LIMIT, E as ERROR_TYPES, q as EVENT_TYPES, r as EXECUTION_KINDS, s as ExecutionKind, t as FailWorkflowCommand, u as FailureSource, H as HISTORY_LIMIT_EXCEEDED_RATIO, v as HISTORY_PROTOCOL, w as Headers, x as HistoryLimit, I as INPUT_EVENTS, L as LocalActivityRequest, y as PARENT_CLOSE_POLICIES, z as PHASE_B_CORE_COMMANDS, G as PHASE_B_PARITY_COMMANDS, J as PHASE_C_COMMANDS, K as RecordLocalActivityCommand, M as RecordMarkerCommand, N as RecordSideEffectCommand, O as RejectUpdateCommand, Q as RequestCancelActivityCommand, S as RequestCancelExternalRunCommand, T as RunEventDraft, U as RunEventRecord, V as RunEventType, X as RunTarget, Y as ScheduleActivityCommand, Z as SignalRunCommand, _ as StartChildRunCommand, $ as StartTimerCommand, a0 as TASK_FAILURE_CAUSES, a1 as TERMINAL_COMMANDS, a2 as TERMINAL_EVENTS, a3 as TaskLogLine, a4 as UpsertContextCommand, a5 as UpsertSearchAttributesCommand, a6 as WorkflowInfoSnapshot, a7 as WorkflowTaskRequest, a8 as WorkflowTaskResult, a9 as isCommandEvent, aa as isInputEvent } from '../types-CpBBjaGX.cjs';
|
|
3
|
+
import { H as HistoryIssue } from '../file-BOoHZgoQ.cjs';
|
|
4
|
+
export { A as ActivityState, a as ActivityStatus, C as ChildState, b as ChildStatus, E as EventsForCommandsContext, c as EventsForCommandsResult, d as ExternalState, e as HISTORY_FILE_FORMAT, f as HISTORY_FILE_SCHEMA, g as HISTORY_FILE_SCHEMA_ID, h as HISTORY_SCHEMA_FILES, i as HistoryFile, j as HistoryFileError, k as HistoryStateError, R as RUN_EVENT_SCHEMA, l as RUN_EVENT_SCHEMA_ID, m as RunState, n as RunStatus, T as TimerState, W as WORKFLOW_COMMAND_SCHEMA, o as WORKFLOW_COMMAND_SCHEMA_ID, p as WORKFLOW_TASK_SCHEMA, q as WORKFLOW_TASK_SCHEMA_ID, r as applyEvent, s as createHistoryFile, t as eventsForCommands, u as hasUnprocessedInput, v as initialRunState, w as isActivityOpen, x as isChildOpen, y as isCommandEnabled, z as isWorkflowCommandEnabled, B as parseHistoryFile, D as pendingCounts, F as projectRunState, G as serializeHistoryFile, I as taskCompletedEvents, J as utf8Bytes } from '../file-BOoHZgoQ.cjs';
|
|
5
|
+
export { A as Activation, s as splitActivations, u as unseenInputs } from '../activation-BBh1p82z.cjs';
|
|
6
|
+
import '../types-BGoPzgcl.cjs';
|
|
7
|
+
|
|
8
|
+
type CommandValidation = {
|
|
9
|
+
ok: true;
|
|
10
|
+
commands: WorkflowCommand[];
|
|
11
|
+
} | {
|
|
12
|
+
ok: false;
|
|
13
|
+
cause: WorkflowTaskFailureCause;
|
|
14
|
+
issues: HistoryIssue[];
|
|
15
|
+
};
|
|
16
|
+
interface ValidateCommandsOptions {
|
|
17
|
+
/**
|
|
18
|
+
* Which commands are enabled. `core` (default) is the Phase B core set,
|
|
19
|
+
* `parity` adds the parity commands. Phase C commands are always refused.
|
|
20
|
+
*/
|
|
21
|
+
enabled?: 'core' | 'parity';
|
|
22
|
+
/** Largest batch. Default 1000 (the workers' limit). */
|
|
23
|
+
maxCommands?: number;
|
|
24
|
+
}
|
|
25
|
+
/** Validate one command against `workflow-command.schema.json`. */
|
|
26
|
+
declare function validateCommand(command: unknown, index?: number): {
|
|
27
|
+
ok: true;
|
|
28
|
+
command: WorkflowCommand;
|
|
29
|
+
} | {
|
|
30
|
+
ok: false;
|
|
31
|
+
issues: HistoryIssue[];
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Validate a command batch: each command's shape, the phase it belongs to,
|
|
35
|
+
* unique ids within the batch, the activity allow-list, and at most one
|
|
36
|
+
* terminal command, last.
|
|
37
|
+
*/
|
|
38
|
+
declare function validateCommands(commands: unknown, options?: ValidateCommandsOptions): CommandValidation;
|
|
39
|
+
/** Validate history events against `run-event.schema.json` and the gapless `seq` rule. */
|
|
40
|
+
declare function validateHistory(events: unknown): {
|
|
41
|
+
ok: boolean;
|
|
42
|
+
issues: HistoryIssue[];
|
|
43
|
+
};
|
|
44
|
+
/** Validate a history file against `history-file.schema.json`. */
|
|
45
|
+
declare function validateHistoryFile(value: unknown): {
|
|
46
|
+
ok: boolean;
|
|
47
|
+
issues: HistoryIssue[];
|
|
48
|
+
};
|
|
49
|
+
/** A compiled validator for a workflow's input, output, signal or update payload schema. */
|
|
50
|
+
type PayloadValidator = (value: unknown) => {
|
|
51
|
+
ok: true;
|
|
52
|
+
} | {
|
|
53
|
+
ok: false;
|
|
54
|
+
errors: string[];
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Compile a JSON Schema (from a workflow `interface`) into a validator. The
|
|
58
|
+
* service uses it for start input and signal payloads.
|
|
59
|
+
*/
|
|
60
|
+
declare function compilePayloadValidator(schema: Record<string, unknown>): PayloadValidator;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Durable activity retries (spec 04 §6, 11 §2.25): one function the service's
|
|
64
|
+
* due sweep, the test environment and the conformance suite share, so a retry
|
|
65
|
+
* decision never differs between them.
|
|
66
|
+
*
|
|
67
|
+
* The backoff math is the graph engine's (`applyNodeErrorConfig`):
|
|
68
|
+
* `min(retryDelay * backoffMultiplier^(attempt - 1), maxDelay)`. What differs
|
|
69
|
+
* from graph nodes is the default policy (Temporal's: 1 s, x2, at most 100 s,
|
|
70
|
+
* unlimited attempts) and timeouts: a start-to-close or heartbeat timeout is
|
|
71
|
+
* retried like any other failure, while schedule-to-start and
|
|
72
|
+
* schedule-to-close timeouts never are.
|
|
73
|
+
*/
|
|
74
|
+
|
|
75
|
+
/** The policy the SDK writes into `SCHEDULE_ACTIVITY` when the code gives none. */
|
|
76
|
+
declare const DEFAULT_ACTIVITY_RETRY: Readonly<RetryPolicy>;
|
|
77
|
+
type RetryDecision = {
|
|
78
|
+
retry: true;
|
|
79
|
+
delayMs: number;
|
|
80
|
+
} | {
|
|
81
|
+
retry: false;
|
|
82
|
+
reason: 'nonRetryable' | 'finalTimeout' | 'typeDenied' | 'errorTypeNotListed' | 'maxRetries';
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* Whether attempt `attempt` (1-based, the attempt that just failed) is retried,
|
|
86
|
+
* and after how long. `failure.nextRetryDelayMs` overrides the computed delay
|
|
87
|
+
* for this retry only.
|
|
88
|
+
*/
|
|
89
|
+
declare function computeRetryDelay(policy: RetryPolicy, attempt: number, failure?: Failure): RetryDecision;
|
|
90
|
+
/** A copy of `policy` with the defaults filled in, as the SDK writes it into a command. */
|
|
91
|
+
declare function explicitRetryPolicy(policy: Partial<RetryPolicy> | undefined): RetryPolicy;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* The activity allow-list (C-ALLOW): which node types `ctx.run` may schedule.
|
|
95
|
+
* Enforced in three places: here (SDK validation and the runtime), the service
|
|
96
|
+
* at `SCHEDULE_ACTIVITY`, and the worker's `assertActivityNodeType`.
|
|
97
|
+
*
|
|
98
|
+
* External store and registry nodes are allowed; their args are passed as
|
|
99
|
+
* variables, never template-evaluated. Of the built-in nodes only four may run
|
|
100
|
+
* as activities, each executed with `literalParameters: true`. Triggers, `end`
|
|
101
|
+
* and every routing or parking node are refused.
|
|
102
|
+
*/
|
|
103
|
+
/** Built-in node types that may run as activities. */
|
|
104
|
+
declare const ACTIVITY_INTERNAL_ALLOWLIST: ReadonlySet<string>;
|
|
105
|
+
/**
|
|
106
|
+
* Built-in node types refused by name (the rule refuses every other built-in
|
|
107
|
+
* type as well; this list names the ones the plan calls out, for messages).
|
|
108
|
+
*/
|
|
109
|
+
declare const ACTIVITY_NODE_DENYLIST: ReadonlySet<string>;
|
|
110
|
+
/** The allow-list as one exported object (`ACTIVITY_NODE_ALLOWLIST`). */
|
|
111
|
+
declare const ACTIVITY_NODE_ALLOWLIST: {
|
|
112
|
+
readonly internal: ReadonlySet<string>;
|
|
113
|
+
readonly refused: ReadonlySet<string>;
|
|
114
|
+
/** Non-built-in node types (store and registry nodes) are allowed. */
|
|
115
|
+
readonly external: "allowed";
|
|
116
|
+
};
|
|
117
|
+
/** True when `nodeType` may run as a durable activity. */
|
|
118
|
+
declare function isActivityNodeTypeAllowed(nodeType: string): boolean;
|
|
119
|
+
/** Raised by {@link assertActivityNodeType}. Non-retryable, error type `VALIDATION`. */
|
|
120
|
+
declare class ActivityNodeTypeNotAllowedError extends Error {
|
|
121
|
+
readonly nodeType: string;
|
|
122
|
+
readonly code = "durable.activityTypeNotAllowed";
|
|
123
|
+
readonly errorType = "VALIDATION";
|
|
124
|
+
readonly nonRetryable = true;
|
|
125
|
+
constructor(nodeType: string);
|
|
126
|
+
}
|
|
127
|
+
/** Throw {@link ActivityNodeTypeNotAllowedError} unless `nodeType` may run as an activity. */
|
|
128
|
+
declare function assertActivityNodeType(nodeType: string): void;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Defaults the service, the workers and the SDK must apply the same way.
|
|
132
|
+
*/
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* The parent-close policy of an `internal:code-workflow` child (DB13): an
|
|
136
|
+
* explicit `parentClosePolicy` wins; otherwise `ABANDON` when the node does
|
|
137
|
+
* not wait for the child (`waitForCompletion: false`), so a fire-and-forget
|
|
138
|
+
* child outlives its parent, and `TERMINATE` when it waits (the default).
|
|
139
|
+
*/
|
|
140
|
+
declare function codeWorkflowParentClosePolicy(state: {
|
|
141
|
+
parentClosePolicy?: unknown;
|
|
142
|
+
waitForCompletion?: unknown;
|
|
143
|
+
}): ParentClosePolicy;
|
|
144
|
+
/** The default parent-close policy of `ctx.child` (`TERMINATE`) and `ctx.startChild` (`ABANDON`) (DB13). */
|
|
145
|
+
declare const CHILD_DEFAULT_PARENT_CLOSE_POLICY: Readonly<{
|
|
146
|
+
child: ParentClosePolicy;
|
|
147
|
+
startChild: ParentClosePolicy;
|
|
148
|
+
}>;
|
|
149
|
+
/**
|
|
150
|
+
* The cancellation type of a child whose options omit it (spec 11 §2.5): the
|
|
151
|
+
* parent asks the child to cancel (`REQUEST_CANCEL_EXTERNAL_RUN` with a
|
|
152
|
+
* `{ childId }` target, a core command) and its awaitable rejects when the
|
|
153
|
+
* child has ended. The command options are not rewritten with the default.
|
|
154
|
+
*/
|
|
155
|
+
declare const CHILD_DEFAULT_CANCELLATION_TYPE: ChildCancellationType;
|
|
156
|
+
|
|
157
|
+
export { ACTIVITY_INTERNAL_ALLOWLIST, ACTIVITY_NODE_ALLOWLIST, ACTIVITY_NODE_DENYLIST, ActivityNodeTypeNotAllowedError, CHILD_DEFAULT_CANCELLATION_TYPE, CHILD_DEFAULT_PARENT_CLOSE_POLICY, ChildCancellationType, type CommandValidation, DEFAULT_ACTIVITY_RETRY, Failure, HistoryIssue, ParentClosePolicy, type PayloadValidator, type RetryDecision, RetryPolicy, type ValidateCommandsOptions, WorkflowCommand, WorkflowTaskFailureCause, assertActivityNodeType, codeWorkflowParentClosePolicy, compilePayloadValidator, computeRetryDelay, explicitRetryPolicy, isActivityNodeTypeAllowed, validateCommand, validateCommands, validateHistory, validateHistoryFile };
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { W as WorkflowCommand, a as WorkflowTaskFailureCause, R as RetryPolicy, F as Failure, C as ChildCancellationType, P as ParentClosePolicy } from '../types-DV-HX_Gt.js';
|
|
2
|
+
export { A as ACTIVITY_CANCELLATION_TYPES, b as AcceptUpdateCommand, c as ActivityCancellationType, B as BUILT_IN_QUERIES, d as BuiltInQueryName, e as CHILD_CANCELLATION_TYPES, f as COMMAND_EVENTS, g as COMMAND_EVENT_TYPES, h as COMMAND_TYPES, i as CONTINUE_AS_NEW_SUGGESTED_RATIO, j as CancelTimerCommand, k as CancelWorkflowCommand, l as ChildRunOptions, m as CommandType, n as CompleteUpdateCommand, o as CompleteWorkflowCommand, p as ContinueAsNewCommand, D as DEFAULT_HISTORY_LIMIT, E as ERROR_TYPES, q as EVENT_TYPES, r as EXECUTION_KINDS, s as ExecutionKind, t as FailWorkflowCommand, u as FailureSource, H as HISTORY_LIMIT_EXCEEDED_RATIO, v as HISTORY_PROTOCOL, w as Headers, x as HistoryLimit, I as INPUT_EVENTS, L as LocalActivityRequest, y as PARENT_CLOSE_POLICIES, z as PHASE_B_CORE_COMMANDS, G as PHASE_B_PARITY_COMMANDS, J as PHASE_C_COMMANDS, K as RecordLocalActivityCommand, M as RecordMarkerCommand, N as RecordSideEffectCommand, O as RejectUpdateCommand, Q as RequestCancelActivityCommand, S as RequestCancelExternalRunCommand, T as RunEventDraft, U as RunEventRecord, V as RunEventType, X as RunTarget, Y as ScheduleActivityCommand, Z as SignalRunCommand, _ as StartChildRunCommand, $ as StartTimerCommand, a0 as TASK_FAILURE_CAUSES, a1 as TERMINAL_COMMANDS, a2 as TERMINAL_EVENTS, a3 as TaskLogLine, a4 as UpsertContextCommand, a5 as UpsertSearchAttributesCommand, a6 as WorkflowInfoSnapshot, a7 as WorkflowTaskRequest, a8 as WorkflowTaskResult, a9 as isCommandEvent, aa as isInputEvent } from '../types-DV-HX_Gt.js';
|
|
3
|
+
import { H as HistoryIssue } from '../file-yuPCFU5b.js';
|
|
4
|
+
export { A as ActivityState, a as ActivityStatus, C as ChildState, b as ChildStatus, E as EventsForCommandsContext, c as EventsForCommandsResult, d as ExternalState, e as HISTORY_FILE_FORMAT, f as HISTORY_FILE_SCHEMA, g as HISTORY_FILE_SCHEMA_ID, h as HISTORY_SCHEMA_FILES, i as HistoryFile, j as HistoryFileError, k as HistoryStateError, R as RUN_EVENT_SCHEMA, l as RUN_EVENT_SCHEMA_ID, m as RunState, n as RunStatus, T as TimerState, W as WORKFLOW_COMMAND_SCHEMA, o as WORKFLOW_COMMAND_SCHEMA_ID, p as WORKFLOW_TASK_SCHEMA, q as WORKFLOW_TASK_SCHEMA_ID, r as applyEvent, s as createHistoryFile, t as eventsForCommands, u as hasUnprocessedInput, v as initialRunState, w as isActivityOpen, x as isChildOpen, y as isCommandEnabled, z as isWorkflowCommandEnabled, B as parseHistoryFile, D as pendingCounts, F as projectRunState, G as serializeHistoryFile, I as taskCompletedEvents, J as utf8Bytes } from '../file-yuPCFU5b.js';
|
|
5
|
+
export { A as Activation, s as splitActivations, u as unseenInputs } from '../activation-DnhG7SmF.js';
|
|
6
|
+
import '../types-BGoPzgcl.js';
|
|
7
|
+
|
|
8
|
+
type CommandValidation = {
|
|
9
|
+
ok: true;
|
|
10
|
+
commands: WorkflowCommand[];
|
|
11
|
+
} | {
|
|
12
|
+
ok: false;
|
|
13
|
+
cause: WorkflowTaskFailureCause;
|
|
14
|
+
issues: HistoryIssue[];
|
|
15
|
+
};
|
|
16
|
+
interface ValidateCommandsOptions {
|
|
17
|
+
/**
|
|
18
|
+
* Which commands are enabled. `core` (default) is the Phase B core set,
|
|
19
|
+
* `parity` adds the parity commands. Phase C commands are always refused.
|
|
20
|
+
*/
|
|
21
|
+
enabled?: 'core' | 'parity';
|
|
22
|
+
/** Largest batch. Default 1000 (the workers' limit). */
|
|
23
|
+
maxCommands?: number;
|
|
24
|
+
}
|
|
25
|
+
/** Validate one command against `workflow-command.schema.json`. */
|
|
26
|
+
declare function validateCommand(command: unknown, index?: number): {
|
|
27
|
+
ok: true;
|
|
28
|
+
command: WorkflowCommand;
|
|
29
|
+
} | {
|
|
30
|
+
ok: false;
|
|
31
|
+
issues: HistoryIssue[];
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Validate a command batch: each command's shape, the phase it belongs to,
|
|
35
|
+
* unique ids within the batch, the activity allow-list, and at most one
|
|
36
|
+
* terminal command, last.
|
|
37
|
+
*/
|
|
38
|
+
declare function validateCommands(commands: unknown, options?: ValidateCommandsOptions): CommandValidation;
|
|
39
|
+
/** Validate history events against `run-event.schema.json` and the gapless `seq` rule. */
|
|
40
|
+
declare function validateHistory(events: unknown): {
|
|
41
|
+
ok: boolean;
|
|
42
|
+
issues: HistoryIssue[];
|
|
43
|
+
};
|
|
44
|
+
/** Validate a history file against `history-file.schema.json`. */
|
|
45
|
+
declare function validateHistoryFile(value: unknown): {
|
|
46
|
+
ok: boolean;
|
|
47
|
+
issues: HistoryIssue[];
|
|
48
|
+
};
|
|
49
|
+
/** A compiled validator for a workflow's input, output, signal or update payload schema. */
|
|
50
|
+
type PayloadValidator = (value: unknown) => {
|
|
51
|
+
ok: true;
|
|
52
|
+
} | {
|
|
53
|
+
ok: false;
|
|
54
|
+
errors: string[];
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Compile a JSON Schema (from a workflow `interface`) into a validator. The
|
|
58
|
+
* service uses it for start input and signal payloads.
|
|
59
|
+
*/
|
|
60
|
+
declare function compilePayloadValidator(schema: Record<string, unknown>): PayloadValidator;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Durable activity retries (spec 04 §6, 11 §2.25): one function the service's
|
|
64
|
+
* due sweep, the test environment and the conformance suite share, so a retry
|
|
65
|
+
* decision never differs between them.
|
|
66
|
+
*
|
|
67
|
+
* The backoff math is the graph engine's (`applyNodeErrorConfig`):
|
|
68
|
+
* `min(retryDelay * backoffMultiplier^(attempt - 1), maxDelay)`. What differs
|
|
69
|
+
* from graph nodes is the default policy (Temporal's: 1 s, x2, at most 100 s,
|
|
70
|
+
* unlimited attempts) and timeouts: a start-to-close or heartbeat timeout is
|
|
71
|
+
* retried like any other failure, while schedule-to-start and
|
|
72
|
+
* schedule-to-close timeouts never are.
|
|
73
|
+
*/
|
|
74
|
+
|
|
75
|
+
/** The policy the SDK writes into `SCHEDULE_ACTIVITY` when the code gives none. */
|
|
76
|
+
declare const DEFAULT_ACTIVITY_RETRY: Readonly<RetryPolicy>;
|
|
77
|
+
type RetryDecision = {
|
|
78
|
+
retry: true;
|
|
79
|
+
delayMs: number;
|
|
80
|
+
} | {
|
|
81
|
+
retry: false;
|
|
82
|
+
reason: 'nonRetryable' | 'finalTimeout' | 'typeDenied' | 'errorTypeNotListed' | 'maxRetries';
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* Whether attempt `attempt` (1-based, the attempt that just failed) is retried,
|
|
86
|
+
* and after how long. `failure.nextRetryDelayMs` overrides the computed delay
|
|
87
|
+
* for this retry only.
|
|
88
|
+
*/
|
|
89
|
+
declare function computeRetryDelay(policy: RetryPolicy, attempt: number, failure?: Failure): RetryDecision;
|
|
90
|
+
/** A copy of `policy` with the defaults filled in, as the SDK writes it into a command. */
|
|
91
|
+
declare function explicitRetryPolicy(policy: Partial<RetryPolicy> | undefined): RetryPolicy;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* The activity allow-list (C-ALLOW): which node types `ctx.run` may schedule.
|
|
95
|
+
* Enforced in three places: here (SDK validation and the runtime), the service
|
|
96
|
+
* at `SCHEDULE_ACTIVITY`, and the worker's `assertActivityNodeType`.
|
|
97
|
+
*
|
|
98
|
+
* External store and registry nodes are allowed; their args are passed as
|
|
99
|
+
* variables, never template-evaluated. Of the built-in nodes only four may run
|
|
100
|
+
* as activities, each executed with `literalParameters: true`. Triggers, `end`
|
|
101
|
+
* and every routing or parking node are refused.
|
|
102
|
+
*/
|
|
103
|
+
/** Built-in node types that may run as activities. */
|
|
104
|
+
declare const ACTIVITY_INTERNAL_ALLOWLIST: ReadonlySet<string>;
|
|
105
|
+
/**
|
|
106
|
+
* Built-in node types refused by name (the rule refuses every other built-in
|
|
107
|
+
* type as well; this list names the ones the plan calls out, for messages).
|
|
108
|
+
*/
|
|
109
|
+
declare const ACTIVITY_NODE_DENYLIST: ReadonlySet<string>;
|
|
110
|
+
/** The allow-list as one exported object (`ACTIVITY_NODE_ALLOWLIST`). */
|
|
111
|
+
declare const ACTIVITY_NODE_ALLOWLIST: {
|
|
112
|
+
readonly internal: ReadonlySet<string>;
|
|
113
|
+
readonly refused: ReadonlySet<string>;
|
|
114
|
+
/** Non-built-in node types (store and registry nodes) are allowed. */
|
|
115
|
+
readonly external: "allowed";
|
|
116
|
+
};
|
|
117
|
+
/** True when `nodeType` may run as a durable activity. */
|
|
118
|
+
declare function isActivityNodeTypeAllowed(nodeType: string): boolean;
|
|
119
|
+
/** Raised by {@link assertActivityNodeType}. Non-retryable, error type `VALIDATION`. */
|
|
120
|
+
declare class ActivityNodeTypeNotAllowedError extends Error {
|
|
121
|
+
readonly nodeType: string;
|
|
122
|
+
readonly code = "durable.activityTypeNotAllowed";
|
|
123
|
+
readonly errorType = "VALIDATION";
|
|
124
|
+
readonly nonRetryable = true;
|
|
125
|
+
constructor(nodeType: string);
|
|
126
|
+
}
|
|
127
|
+
/** Throw {@link ActivityNodeTypeNotAllowedError} unless `nodeType` may run as an activity. */
|
|
128
|
+
declare function assertActivityNodeType(nodeType: string): void;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Defaults the service, the workers and the SDK must apply the same way.
|
|
132
|
+
*/
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* The parent-close policy of an `internal:code-workflow` child (DB13): an
|
|
136
|
+
* explicit `parentClosePolicy` wins; otherwise `ABANDON` when the node does
|
|
137
|
+
* not wait for the child (`waitForCompletion: false`), so a fire-and-forget
|
|
138
|
+
* child outlives its parent, and `TERMINATE` when it waits (the default).
|
|
139
|
+
*/
|
|
140
|
+
declare function codeWorkflowParentClosePolicy(state: {
|
|
141
|
+
parentClosePolicy?: unknown;
|
|
142
|
+
waitForCompletion?: unknown;
|
|
143
|
+
}): ParentClosePolicy;
|
|
144
|
+
/** The default parent-close policy of `ctx.child` (`TERMINATE`) and `ctx.startChild` (`ABANDON`) (DB13). */
|
|
145
|
+
declare const CHILD_DEFAULT_PARENT_CLOSE_POLICY: Readonly<{
|
|
146
|
+
child: ParentClosePolicy;
|
|
147
|
+
startChild: ParentClosePolicy;
|
|
148
|
+
}>;
|
|
149
|
+
/**
|
|
150
|
+
* The cancellation type of a child whose options omit it (spec 11 §2.5): the
|
|
151
|
+
* parent asks the child to cancel (`REQUEST_CANCEL_EXTERNAL_RUN` with a
|
|
152
|
+
* `{ childId }` target, a core command) and its awaitable rejects when the
|
|
153
|
+
* child has ended. The command options are not rewritten with the default.
|
|
154
|
+
*/
|
|
155
|
+
declare const CHILD_DEFAULT_CANCELLATION_TYPE: ChildCancellationType;
|
|
156
|
+
|
|
157
|
+
export { ACTIVITY_INTERNAL_ALLOWLIST, ACTIVITY_NODE_ALLOWLIST, ACTIVITY_NODE_DENYLIST, ActivityNodeTypeNotAllowedError, CHILD_DEFAULT_CANCELLATION_TYPE, CHILD_DEFAULT_PARENT_CLOSE_POLICY, ChildCancellationType, type CommandValidation, DEFAULT_ACTIVITY_RETRY, Failure, HistoryIssue, ParentClosePolicy, type PayloadValidator, type RetryDecision, RetryPolicy, type ValidateCommandsOptions, WorkflowCommand, WorkflowTaskFailureCause, assertActivityNodeType, codeWorkflowParentClosePolicy, compilePayloadValidator, computeRetryDelay, explicitRetryPolicy, isActivityNodeTypeAllowed, validateCommand, validateCommands, validateHistory, validateHistoryFile };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { HISTORY_FILE_FORMAT, HISTORY_FILE_SCHEMA, HISTORY_FILE_SCHEMA_ID, HISTORY_SCHEMA_FILES, HistoryFileError, RUN_EVENT_SCHEMA, RUN_EVENT_SCHEMA_ID, WORKFLOW_COMMAND_SCHEMA, WORKFLOW_COMMAND_SCHEMA_ID, WORKFLOW_TASK_SCHEMA, WORKFLOW_TASK_SCHEMA_ID, compilePayloadValidator, createHistoryFile, parseHistoryFile, serializeHistoryFile, validateCommand, validateCommands, validateHistory, validateHistoryFile } from '../chunk-VOKMAAJP.js';
|
|
2
|
+
import '../chunk-PMCM2OH4.js';
|
|
3
|
+
export { CHILD_DEFAULT_CANCELLATION_TYPE, CHILD_DEFAULT_PARENT_CLOSE_POLICY, DEFAULT_ACTIVITY_RETRY, HistoryStateError, applyEvent, codeWorkflowParentClosePolicy, computeRetryDelay, eventsForCommands, explicitRetryPolicy, hasUnprocessedInput, initialRunState, isActivityOpen, isChildOpen, isCommandEnabled, isWorkflowCommandEnabled, pendingCounts, projectRunState, splitActivations, taskCompletedEvents, unseenInputs, utf8Bytes } from '../chunk-ABFZWYHT.js';
|
|
4
|
+
export { ACTIVITY_CANCELLATION_TYPES, BUILT_IN_QUERIES, CHILD_CANCELLATION_TYPES, COMMAND_EVENTS, COMMAND_EVENT_TYPES, COMMAND_TYPES, CONTINUE_AS_NEW_SUGGESTED_RATIO, DEFAULT_HISTORY_LIMIT, ERROR_TYPES, EVENT_TYPES, EXECUTION_KINDS, HISTORY_LIMIT_EXCEEDED_RATIO, HISTORY_PROTOCOL, INPUT_EVENTS, PARENT_CLOSE_POLICIES, PHASE_B_CORE_COMMANDS, PHASE_B_PARITY_COMMANDS, PHASE_C_COMMANDS, TASK_FAILURE_CAUSES, TERMINAL_COMMANDS, TERMINAL_EVENTS, isCommandEvent, isInputEvent } from '../chunk-DJYMDLV5.js';
|
|
5
|
+
export { ACTIVITY_INTERNAL_ALLOWLIST, ACTIVITY_NODE_ALLOWLIST, ACTIVITY_NODE_DENYLIST, ActivityNodeTypeNotAllowedError, assertActivityNodeType, isActivityNodeTypeAllowed } from '../chunk-BO6OVILK.js';
|