@fluidgrids/workflows 2026.1027.0 → 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.
Files changed (168) hide show
  1. package/README.md +170 -18
  2. package/dist/activation-BBh1p82z.d.cts +57 -0
  3. package/dist/activation-DnhG7SmF.d.ts +57 -0
  4. package/dist/assemble-BLqQ8lSu.d.cts +39 -0
  5. package/dist/assemble-DWgaXHd-.d.ts +39 -0
  6. package/dist/chunk-2DP2Y6EU.cjs +832 -0
  7. package/dist/chunk-2J6TF7YI.cjs +86 -0
  8. package/dist/chunk-3FOTFQ3J.js +1622 -0
  9. package/dist/chunk-4LYSEANA.js +199 -0
  10. package/dist/{chunk-KUTMY2IO.cjs → chunk-57MSZ24T.cjs} +162 -98
  11. package/dist/{chunk-BWSLWF2E.js → chunk-5HDSBTBX.js} +99 -32
  12. package/dist/chunk-623FVQSN.cjs +251 -0
  13. package/dist/{chunk-4DPEGDPW.js → chunk-6FSHT5IL.js} +4 -4
  14. package/dist/{chunk-REV7ZOA4.js → chunk-7AAZGVKD.js} +1 -35
  15. package/dist/chunk-7NQ37GZU.js +73 -0
  16. package/dist/chunk-ABFZWYHT.js +612 -0
  17. package/dist/{chunk-SS4LT2IP.js → chunk-BD7ZPG53.js} +5 -10
  18. package/dist/chunk-BO6OVILK.js +79 -0
  19. package/dist/chunk-C5OLWZ42.js +245 -0
  20. package/dist/chunk-CBL5JSCC.cjs +75 -0
  21. package/dist/{chunk-LSKSBVL4.cjs → chunk-CPDK3K5N.cjs} +6 -6
  22. package/dist/chunk-CSNWNFKU.cjs +1635 -0
  23. package/dist/chunk-DJYMDLV5.js +227 -0
  24. package/dist/{chunk-X4HKU3MX.js → chunk-E2VK7J2C.js} +3 -1
  25. package/dist/chunk-FMSW2HDF.cjs +267 -0
  26. package/dist/chunk-FQIHX7YI.cjs +80 -0
  27. package/dist/chunk-FR7KYWRO.cjs +41 -0
  28. package/dist/{chunk-AU3YW7FZ.cjs → chunk-GBQ33SIZ.cjs} +46 -51
  29. package/dist/{chunk-RRQ5HOBF.cjs → chunk-GVTZMA5C.cjs} +4 -4
  30. package/dist/chunk-H7KEVW2M.js +816 -0
  31. package/dist/chunk-HR3BN4C4.cjs +27 -0
  32. package/dist/chunk-IISBRUWJ.js +13 -0
  33. package/dist/chunk-JD2VQIDZ.cjs +15 -0
  34. package/dist/{chunk-PL73GJR4.js → chunk-JZ4TOOLN.js} +1 -1
  35. package/dist/chunk-L24YIZY7.cjs +207 -0
  36. package/dist/chunk-LNUQE6D6.js +39 -0
  37. package/dist/{chunk-BYJ7QTLY.cjs → chunk-NEIUQASE.cjs} +13 -13
  38. package/dist/chunk-P6TA5EZT.cjs +634 -0
  39. package/dist/chunk-PDHLTDZB.js +72 -0
  40. package/dist/chunk-PMCM2OH4.js +46 -0
  41. package/dist/chunk-PZCVF76Q.cjs +868 -0
  42. package/dist/{chunk-GO34UHSY.js → chunk-QAN5MZEM.js} +3 -3
  43. package/dist/{chunk-27HASETB.cjs → chunk-QKZL3ONM.cjs} +3 -1
  44. package/dist/chunk-SAENRNBJ.cjs +52 -0
  45. package/dist/{chunk-LMX35GNQ.js → chunk-SMCANK3F.js} +5 -4
  46. package/dist/{chunk-IZQNUNSU.cjs → chunk-SX2PNKKT.cjs} +18 -17
  47. package/dist/{chunk-LRM6JXJA.cjs → chunk-TBDXTV22.cjs} +0 -37
  48. package/dist/chunk-VOKMAAJP.js +848 -0
  49. package/dist/chunk-XB53G2DK.js +25 -0
  50. package/dist/chunk-Z2Y65YOY.cjs +7 -0
  51. package/dist/codegen/index.cjs +9 -7
  52. package/dist/codegen/index.d.cts +2 -2
  53. package/dist/codegen/index.d.ts +2 -2
  54. package/dist/codegen/index.js +6 -5
  55. package/dist/file-BOoHZgoQ.d.cts +1557 -0
  56. package/dist/file-yuPCFU5b.d.ts +1557 -0
  57. package/dist/history/index.cjs +287 -0
  58. package/dist/history/index.d.cts +157 -0
  59. package/dist/history/index.d.ts +157 -0
  60. package/dist/history/index.js +5 -0
  61. package/dist/index.cjs +134 -36
  62. package/dist/index.d.cts +137 -9
  63. package/dist/index.d.ts +137 -9
  64. package/dist/index.js +8 -3
  65. package/dist/ir/index.cjs +161 -165
  66. package/dist/ir/index.d.cts +32 -12
  67. package/dist/ir/index.d.ts +32 -12
  68. package/dist/ir/index.js +54 -61
  69. package/dist/lower-BuSvAFqi.d.cts +129 -0
  70. package/dist/lower-C_Qv_34S.d.ts +129 -0
  71. package/dist/lower-types-nofRXw9c.d.cts +15 -0
  72. package/dist/lower-types-nofRXw9c.d.ts +15 -0
  73. package/dist/{manifest-Duf-gHdO.d.cts → manifest-0OLw0i7k.d.cts} +1 -1
  74. package/dist/{manifest-Bp9ZJlav.d.ts → manifest-C8N6HDYl.d.ts} +1 -1
  75. package/dist/node-evaluator-CJNP4GHX.js +12 -0
  76. package/dist/node-evaluator-DMKPKUWA.cjs +22 -0
  77. package/dist/quickjs/index.cjs +256 -78
  78. package/dist/quickjs/index.d.cts +48 -7
  79. package/dist/quickjs/index.d.ts +48 -7
  80. package/dist/quickjs/index.js +254 -79
  81. package/dist/roundtrip/index.cjs +404 -129
  82. package/dist/roundtrip/index.d.cts +43 -8
  83. package/dist/roundtrip/index.d.ts +43 -8
  84. package/dist/roundtrip/index.js +260 -19
  85. package/dist/runtime/index.cjs +90 -0
  86. package/dist/runtime/index.d.cts +297 -0
  87. package/dist/runtime/index.d.ts +297 -0
  88. package/dist/runtime/index.js +8 -0
  89. package/dist/testing/index.cjs +1057 -0
  90. package/dist/testing/index.d.cts +305 -0
  91. package/dist/testing/index.d.ts +305 -0
  92. package/dist/testing/index.js +1037 -0
  93. package/dist/{types-Dr2Fn1Ax.d.ts → types-BGoPzgcl.d.cts} +1 -1
  94. package/dist/{types-Dr2Fn1Ax.d.cts → types-BGoPzgcl.d.ts} +1 -1
  95. package/dist/types-CpBBjaGX.d.cts +380 -0
  96. package/dist/types-DV-HX_Gt.d.ts +380 -0
  97. package/dist/{assemble-DMOuaxRI.d.ts → workflow-Bpr3vnA_.d.ts} +60 -162
  98. package/dist/workflow-C2a05WUJ.d.ts +444 -0
  99. package/dist/{assemble-BJo9TECS.d.cts → workflow-FXUkpIBc.d.cts} +60 -162
  100. package/dist/workflow-J-yYixny.d.cts +444 -0
  101. package/fixtures/README.md +128 -0
  102. package/fixtures/histories/activity-failure-fails-run.history.json +163 -0
  103. package/fixtures/histories/activity-retry-then-success.history.json +147 -0
  104. package/fixtures/histories/cancel-activity-abandon.history.json +126 -0
  105. package/fixtures/histories/cancel-activity-compensate.history.json +307 -0
  106. package/fixtures/histories/cancel-concurrent-non-cancellable.history.json +234 -0
  107. package/fixtures/histories/cancel-concurrent-scope-timeout.history.json +184 -0
  108. package/fixtures/histories/cancel-condition-after-cancel.history.json +200 -0
  109. package/fixtures/histories/cancel-during-timer.history.json +123 -0
  110. package/fixtures/histories/cancel-saga-compensations.history.json +325 -0
  111. package/fixtures/histories/cancel-scope-timeout.history.json +148 -0
  112. package/fixtures/histories/child-abandon-outlives-parent.history.json +191 -0
  113. package/fixtures/histories/child-cancel-default.history.json +234 -0
  114. package/fixtures/histories/child-cancel-request.history.json +206 -0
  115. package/fixtures/histories/child-durable-child-side.history.json +124 -0
  116. package/fixtures/histories/child-durable-result.history.json +163 -0
  117. package/fixtures/histories/child-failure-caught.history.json +166 -0
  118. package/fixtures/histories/child-graph-by-key.history.json +138 -0
  119. package/fixtures/histories/child-terminated-by-parent-close.history.json +85 -0
  120. package/fixtures/histories/continue-as-new-first-run.history.json +146 -0
  121. package/fixtures/histories/continue-as-new-history-limit.history.json +489 -0
  122. package/fixtures/histories/continue-as-new-last-run.history.json +147 -0
  123. package/fixtures/histories/continue-as-new-suggested.history.json +352 -0
  124. package/fixtures/histories/details-and-context.history.json +176 -0
  125. package/fixtures/histories/deterministic-values.history.json +128 -0
  126. package/fixtures/histories/engine-builtins.history.json +172 -0
  127. package/fixtures/histories/gather-activities.history.json +291 -0
  128. package/fixtures/histories/gather-all-settled.history.json +219 -0
  129. package/fixtures/histories/gather-mixed.history.json +281 -0
  130. package/fixtures/histories/input-during-running-task.history.json +111 -0
  131. package/fixtures/histories/nondeterminism-reordered.history.json +218 -0
  132. package/fixtures/histories/patched-deprecated.history.json +271 -0
  133. package/fixtures/histories/patched-new-run.history.json +270 -0
  134. package/fixtures/histories/patched-old-history.history.json +190 -0
  135. package/fixtures/histories/race-activity-wins.history.json +152 -0
  136. package/fixtures/histories/race-signal-beats-child.history.json +161 -0
  137. package/fixtures/histories/race-timeout-wins.history.json +118 -0
  138. package/fixtures/histories/side-effect-recorded.history.json +153 -0
  139. package/fixtures/histories/signal-buffered-at-start.history.json +157 -0
  140. package/fixtures/histories/signal-default-handler.history.json +187 -0
  141. package/fixtures/histories/signal-handler.history.json +191 -0
  142. package/fixtures/histories/signal-parent-child-side.history.json +132 -0
  143. package/fixtures/histories/signal-parent.history.json +202 -0
  144. package/fixtures/histories/signal-run-delivered.history.json +128 -0
  145. package/fixtures/histories/signal-run-undelivered.history.json +134 -0
  146. package/fixtures/histories/signal-wait.history.json +111 -0
  147. package/fixtures/histories/task-failure-code-error.history.json +137 -0
  148. package/fixtures/histories/task-failure-then-transient-attempt.history.json +140 -0
  149. package/fixtures/histories/timer-condition-met.history.json +201 -0
  150. package/fixtures/histories/timer-condition-timeout.history.json +118 -0
  151. package/fixtures/histories/timer-sleep-once.history.json +118 -0
  152. package/fixtures/histories/timer-sleep-sequence.history.json +210 -0
  153. package/fixtures/histories/update-accepted-completed.history.json +149 -0
  154. package/fixtures/histories/update-with-start-rejected-validation.history.json +91 -0
  155. package/package.json +85 -20
  156. package/schema/history-file.schema.json +2544 -0
  157. package/schema/ir-v2.schema.json +16 -0
  158. package/schema/run-event.schema.json +2374 -0
  159. package/schema/workflow-command.schema.json +1095 -0
  160. package/schema/workflow-task.schema.json +3560 -0
  161. package/dist/chunk-265J2FCH.cjs +0 -33
  162. package/dist/chunk-LUXCXFOE.cjs +0 -269
  163. package/dist/chunk-S34NJE3A.js +0 -262
  164. package/dist/chunk-SRQRLWOS.js +0 -31
  165. package/dist/lower-DcOY8ux0.d.cts +0 -49
  166. package/dist/lower-Dw5grNrI.d.ts +0 -49
  167. package/dist/node-evaluator-2GTUZVPK.cjs +0 -17
  168. package/dist/node-evaluator-RMYEWCXZ.js +0 -8
@@ -0,0 +1,3560 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://docs.fluidgrids.ai/schemas/workflow-task.schema.json",
4
+ "title": "FluidGrids workflow task (runtime ABI protocol 1)",
5
+ "description": "globalThis.__fluidgridsRuntime: start(JSON of request); while (step() === \"more\") drain jobs; complete() returns JSON of result.",
6
+ "oneOf": [
7
+ {
8
+ "$ref": "#/$defs/request"
9
+ },
10
+ {
11
+ "$ref": "#/$defs/result"
12
+ }
13
+ ],
14
+ "$defs": {
15
+ "json": {
16
+ "description": "Any JSON value."
17
+ },
18
+ "failure": {
19
+ "type": "object",
20
+ "required": [
21
+ "errorType",
22
+ "message"
23
+ ],
24
+ "properties": {
25
+ "errorType": {
26
+ "enum": [
27
+ "TIMEOUT",
28
+ "TRANSIENT",
29
+ "DEPENDENCY",
30
+ "AUTHORIZATION",
31
+ "VALIDATION",
32
+ "PERMANENT",
33
+ "UNKNOWN"
34
+ ]
35
+ },
36
+ "message": {
37
+ "type": "string"
38
+ },
39
+ "type": {
40
+ "type": "string"
41
+ },
42
+ "details": {},
43
+ "nonRetryable": {
44
+ "type": "boolean"
45
+ },
46
+ "nextRetryDelayMs": {
47
+ "type": "integer",
48
+ "minimum": 0
49
+ },
50
+ "category": {
51
+ "const": "BENIGN"
52
+ },
53
+ "timeoutType": {
54
+ "type": "string"
55
+ },
56
+ "cause": {
57
+ "$ref": "#/$defs/failure"
58
+ },
59
+ "stackTrace": {
60
+ "type": "string"
61
+ },
62
+ "source": {
63
+ "type": "string"
64
+ }
65
+ },
66
+ "additionalProperties": false
67
+ },
68
+ "retryPolicy": {
69
+ "type": "object",
70
+ "required": [
71
+ "retryDelay"
72
+ ],
73
+ "description": "maxRetries absent means unlimited attempts, bounded by scheduleToCloseTimeout.",
74
+ "properties": {
75
+ "maxRetries": {
76
+ "type": "integer",
77
+ "minimum": 0
78
+ },
79
+ "retryDelay": {
80
+ "type": "integer",
81
+ "minimum": 0
82
+ },
83
+ "backoffMultiplier": {
84
+ "type": "number",
85
+ "minimum": 1
86
+ },
87
+ "maxDelay": {
88
+ "type": "integer",
89
+ "minimum": 0
90
+ },
91
+ "retryOnErrorTypes": {
92
+ "type": "array",
93
+ "items": {
94
+ "enum": [
95
+ "TIMEOUT",
96
+ "TRANSIENT",
97
+ "DEPENDENCY",
98
+ "AUTHORIZATION",
99
+ "VALIDATION",
100
+ "PERMANENT",
101
+ "UNKNOWN"
102
+ ]
103
+ }
104
+ },
105
+ "nonRetryableErrorTypes": {
106
+ "type": "array",
107
+ "items": {
108
+ "type": "string"
109
+ }
110
+ }
111
+ },
112
+ "additionalProperties": false
113
+ },
114
+ "runTarget": {
115
+ "oneOf": [
116
+ {
117
+ "type": "object",
118
+ "required": [
119
+ "runId"
120
+ ],
121
+ "properties": {
122
+ "runId": {
123
+ "type": "string",
124
+ "minLength": 1,
125
+ "maxLength": 256
126
+ }
127
+ },
128
+ "additionalProperties": false
129
+ },
130
+ {
131
+ "type": "object",
132
+ "required": [
133
+ "parent"
134
+ ],
135
+ "properties": {
136
+ "parent": {
137
+ "const": true
138
+ }
139
+ },
140
+ "additionalProperties": false
141
+ },
142
+ {
143
+ "type": "object",
144
+ "required": [
145
+ "childId"
146
+ ],
147
+ "properties": {
148
+ "childId": {
149
+ "type": "string",
150
+ "minLength": 1,
151
+ "maxLength": 256
152
+ }
153
+ },
154
+ "additionalProperties": false
155
+ },
156
+ {
157
+ "type": "object",
158
+ "required": [
159
+ "workflowKey",
160
+ "workflowId"
161
+ ],
162
+ "properties": {
163
+ "workflowKey": {
164
+ "type": "string",
165
+ "minLength": 1,
166
+ "maxLength": 256
167
+ },
168
+ "workflowId": {
169
+ "type": "string",
170
+ "minLength": 1,
171
+ "maxLength": 256
172
+ }
173
+ },
174
+ "additionalProperties": false
175
+ }
176
+ ]
177
+ },
178
+ "childOptions": {
179
+ "type": "object",
180
+ "required": [
181
+ "parentClosePolicy"
182
+ ],
183
+ "properties": {
184
+ "parentClosePolicy": {
185
+ "enum": [
186
+ "TERMINATE",
187
+ "ABANDON",
188
+ "REQUEST_CANCEL"
189
+ ]
190
+ },
191
+ "cancellationType": {
192
+ "enum": [
193
+ "WAIT_CANCELLATION_COMPLETED",
194
+ "WAIT_CANCELLATION_REQUESTED",
195
+ "TRY_CANCEL",
196
+ "ABANDON"
197
+ ]
198
+ },
199
+ "taskQueue": {
200
+ "type": "string",
201
+ "minLength": 1,
202
+ "maxLength": 256
203
+ },
204
+ "workflowId": {
205
+ "type": "string",
206
+ "minLength": 1,
207
+ "maxLength": 256
208
+ },
209
+ "priority": {
210
+ "type": "integer",
211
+ "minimum": 1,
212
+ "maximum": 5
213
+ },
214
+ "summary": {
215
+ "type": "string",
216
+ "maxLength": 200
217
+ },
218
+ "details": {
219
+ "type": "string"
220
+ },
221
+ "context": {
222
+ "type": "object"
223
+ },
224
+ "executionTimeout": {
225
+ "type": "integer",
226
+ "minimum": 0
227
+ },
228
+ "runTimeout": {
229
+ "type": "integer",
230
+ "minimum": 0
231
+ },
232
+ "workflowTaskTimeout": {
233
+ "type": "integer",
234
+ "minimum": 0
235
+ },
236
+ "startDelay": {
237
+ "type": "integer",
238
+ "minimum": 0
239
+ }
240
+ }
241
+ },
242
+ "headers": {
243
+ "type": "object",
244
+ "additionalProperties": {
245
+ "type": "string"
246
+ }
247
+ },
248
+ "payload_WORKFLOW_STARTED": {
249
+ "type": "object",
250
+ "required": [
251
+ "workflowFn",
252
+ "input"
253
+ ],
254
+ "properties": {
255
+ "workflowFn": {
256
+ "type": "string",
257
+ "minLength": 1,
258
+ "maxLength": 256
259
+ },
260
+ "input": {},
261
+ "workflowKey": {
262
+ "type": "string"
263
+ },
264
+ "version": {},
265
+ "buildId": {
266
+ "type": "string"
267
+ },
268
+ "taskQueue": {
269
+ "type": "string"
270
+ },
271
+ "parentRunId": {
272
+ "type": [
273
+ "string",
274
+ "null"
275
+ ]
276
+ },
277
+ "rootRunId": {
278
+ "type": [
279
+ "string",
280
+ "null"
281
+ ]
282
+ },
283
+ "firstRunId": {
284
+ "type": [
285
+ "string",
286
+ "null"
287
+ ]
288
+ },
289
+ "continuedFromRunId": {
290
+ "type": [
291
+ "string",
292
+ "null"
293
+ ]
294
+ },
295
+ "parentClosePolicy": {
296
+ "enum": [
297
+ "TERMINATE",
298
+ "ABANDON",
299
+ "REQUEST_CANCEL"
300
+ ]
301
+ },
302
+ "startDelay": {
303
+ "type": "integer",
304
+ "minimum": 0
305
+ },
306
+ "lastCompletionResult": {},
307
+ "lastFailure": {
308
+ "oneOf": [
309
+ {
310
+ "type": "null"
311
+ },
312
+ {
313
+ "$ref": "#/$defs/failure"
314
+ }
315
+ ]
316
+ },
317
+ "summary": {
318
+ "type": "string"
319
+ },
320
+ "details": {
321
+ "type": "string"
322
+ },
323
+ "context": {
324
+ "type": "object"
325
+ },
326
+ "executionTimeout": {
327
+ "type": "integer",
328
+ "minimum": 0
329
+ },
330
+ "runTimeout": {
331
+ "type": "integer",
332
+ "minimum": 0
333
+ },
334
+ "workflowTaskTimeout": {
335
+ "type": "integer",
336
+ "minimum": 0
337
+ },
338
+ "versioningBehavior": {
339
+ "enum": [
340
+ "PINNED",
341
+ "AUTO_UPGRADE"
342
+ ]
343
+ },
344
+ "randomnessSeed": {
345
+ "type": "string",
346
+ "minLength": 1,
347
+ "maxLength": 256
348
+ }
349
+ }
350
+ },
351
+ "payload_WORKFLOW_TASK_SCHEDULED": {
352
+ "type": "object",
353
+ "required": [
354
+ "taskId"
355
+ ],
356
+ "properties": {
357
+ "taskId": {
358
+ "type": "string",
359
+ "minLength": 1,
360
+ "maxLength": 256
361
+ },
362
+ "attempt": {
363
+ "type": "integer",
364
+ "minimum": 1
365
+ }
366
+ }
367
+ },
368
+ "payload_WORKFLOW_TASK_STARTED": {
369
+ "type": "object",
370
+ "required": [
371
+ "taskId",
372
+ "attempt"
373
+ ],
374
+ "properties": {
375
+ "taskId": {
376
+ "type": "string",
377
+ "minLength": 1,
378
+ "maxLength": 256
379
+ },
380
+ "attempt": {
381
+ "type": "integer",
382
+ "minimum": 1
383
+ },
384
+ "workerId": {
385
+ "type": "string"
386
+ },
387
+ "buildId": {
388
+ "type": "string"
389
+ },
390
+ "startedAt": {
391
+ "type": "string",
392
+ "description": "When the attempt started, if different from the event time (a transient attempt is recorded at completion). This is the clock the task saw: nowMs of its request."
393
+ },
394
+ "historyLength": {
395
+ "type": "integer",
396
+ "minimum": 1,
397
+ "description": "The history length the attempt was leased with (run.taskStartedSeq), when it is not this event's own seq. Required on the WORKFLOW_TASK_STARTED of a transient attempt: input events with a higher seq that precede this event arrived during the attempt and belong to the next activation."
398
+ }
399
+ }
400
+ },
401
+ "payload_WORKFLOW_TASK_COMPLETED": {
402
+ "type": "object",
403
+ "required": [
404
+ "taskId"
405
+ ],
406
+ "properties": {
407
+ "taskId": {
408
+ "type": "string",
409
+ "minLength": 1,
410
+ "maxLength": 256
411
+ },
412
+ "buildId": {
413
+ "type": "string"
414
+ },
415
+ "workerId": {
416
+ "type": "string"
417
+ }
418
+ }
419
+ },
420
+ "payload_WORKFLOW_TASK_FAILED": {
421
+ "type": "object",
422
+ "required": [
423
+ "taskId",
424
+ "attempt",
425
+ "cause"
426
+ ],
427
+ "properties": {
428
+ "taskId": {
429
+ "type": "string",
430
+ "minLength": 1,
431
+ "maxLength": 256
432
+ },
433
+ "attempt": {
434
+ "type": "integer",
435
+ "minimum": 1
436
+ },
437
+ "cause": {
438
+ "enum": [
439
+ "NON_DETERMINISM",
440
+ "TASK_TIMEOUT",
441
+ "ISOLATE_MEMORY",
442
+ "PROTOCOL_MISMATCH",
443
+ "BUNDLE_UNAVAILABLE",
444
+ "BUNDLE_INTEGRITY",
445
+ "WORKFLOW_CODE_ERROR",
446
+ "HISTORY_LIMIT",
447
+ "UNSUPPORTED_COMMAND",
448
+ "INVALID_REQUEST",
449
+ "INTERNAL"
450
+ ]
451
+ },
452
+ "message": {
453
+ "type": "string"
454
+ },
455
+ "stackTrace": {
456
+ "type": "string"
457
+ },
458
+ "buildId": {
459
+ "type": "string"
460
+ }
461
+ }
462
+ },
463
+ "payload_WORKFLOW_TASK_TIMED_OUT": {
464
+ "type": "object",
465
+ "required": [
466
+ "taskId",
467
+ "attempt"
468
+ ],
469
+ "properties": {
470
+ "taskId": {
471
+ "type": "string",
472
+ "minLength": 1,
473
+ "maxLength": 256
474
+ },
475
+ "attempt": {
476
+ "type": "integer",
477
+ "minimum": 1
478
+ }
479
+ }
480
+ },
481
+ "payload_ACTIVITY_SCHEDULED": {
482
+ "type": "object",
483
+ "required": [
484
+ "activityId",
485
+ "kind",
486
+ "nodeType",
487
+ "operation",
488
+ "args",
489
+ "retry"
490
+ ],
491
+ "properties": {
492
+ "headers": {
493
+ "$ref": "#/$defs/headers"
494
+ },
495
+ "activityId": {
496
+ "type": "string",
497
+ "minLength": 1,
498
+ "maxLength": 256
499
+ },
500
+ "kind": {
501
+ "const": "node"
502
+ },
503
+ "nodeType": {
504
+ "type": "string",
505
+ "minLength": 1,
506
+ "maxLength": 256
507
+ },
508
+ "nodeVersion": {
509
+ "type": "string"
510
+ },
511
+ "operation": {
512
+ "type": "string",
513
+ "minLength": 1,
514
+ "maxLength": 256
515
+ },
516
+ "args": {},
517
+ "connection": {
518
+ "type": "string",
519
+ "minLength": 1,
520
+ "maxLength": 256
521
+ },
522
+ "retry": {
523
+ "$ref": "#/$defs/retryPolicy"
524
+ },
525
+ "startToCloseTimeout": {
526
+ "type": "integer",
527
+ "minimum": 0
528
+ },
529
+ "scheduleToCloseTimeout": {
530
+ "type": "integer",
531
+ "minimum": 0
532
+ },
533
+ "scheduleToStartTimeout": {
534
+ "type": "integer",
535
+ "minimum": 0
536
+ },
537
+ "heartbeatTimeout": {
538
+ "type": "integer",
539
+ "minimum": 0
540
+ },
541
+ "cancellationType": {
542
+ "enum": [
543
+ "WAIT_CANCELLATION_COMPLETED",
544
+ "TRY_CANCEL",
545
+ "ABANDON"
546
+ ]
547
+ },
548
+ "priority": {
549
+ "type": "integer",
550
+ "minimum": 1,
551
+ "maximum": 5
552
+ },
553
+ "summary": {
554
+ "type": "string",
555
+ "maxLength": 200
556
+ },
557
+ "runOn": {
558
+ "type": "string"
559
+ }
560
+ }
561
+ },
562
+ "payload_ACTIVITY_STARTED": {
563
+ "type": "object",
564
+ "required": [
565
+ "activityId",
566
+ "attempt"
567
+ ],
568
+ "properties": {
569
+ "activityId": {
570
+ "type": "string",
571
+ "minLength": 1,
572
+ "maxLength": 256
573
+ },
574
+ "attempt": {
575
+ "type": "integer",
576
+ "minimum": 1
577
+ },
578
+ "workerId": {
579
+ "type": "string"
580
+ }
581
+ }
582
+ },
583
+ "payload_ACTIVITY_HEARTBEAT": {
584
+ "type": "object",
585
+ "required": [
586
+ "activityId"
587
+ ],
588
+ "properties": {
589
+ "activityId": {
590
+ "type": "string",
591
+ "minLength": 1,
592
+ "maxLength": 256
593
+ },
594
+ "details": {}
595
+ }
596
+ },
597
+ "payload_ACTIVITY_COMPLETED": {
598
+ "type": "object",
599
+ "required": [
600
+ "activityId",
601
+ "attempt"
602
+ ],
603
+ "properties": {
604
+ "activityId": {
605
+ "type": "string",
606
+ "minLength": 1,
607
+ "maxLength": 256
608
+ },
609
+ "attempt": {
610
+ "type": "integer",
611
+ "minimum": 1
612
+ },
613
+ "result": {}
614
+ }
615
+ },
616
+ "payload_ACTIVITY_FAILED": {
617
+ "type": "object",
618
+ "required": [
619
+ "activityId",
620
+ "attempt",
621
+ "failure"
622
+ ],
623
+ "properties": {
624
+ "activityId": {
625
+ "type": "string",
626
+ "minLength": 1,
627
+ "maxLength": 256
628
+ },
629
+ "attempt": {
630
+ "type": "integer",
631
+ "minimum": 1
632
+ },
633
+ "failure": {
634
+ "$ref": "#/$defs/failure"
635
+ }
636
+ }
637
+ },
638
+ "payload_ACTIVITY_TIMED_OUT": {
639
+ "type": "object",
640
+ "required": [
641
+ "activityId",
642
+ "attempt",
643
+ "timeoutType"
644
+ ],
645
+ "properties": {
646
+ "activityId": {
647
+ "type": "string",
648
+ "minLength": 1,
649
+ "maxLength": 256
650
+ },
651
+ "attempt": {
652
+ "type": "integer",
653
+ "minimum": 1
654
+ },
655
+ "timeoutType": {
656
+ "enum": [
657
+ "START_TO_CLOSE",
658
+ "SCHEDULE_TO_START",
659
+ "SCHEDULE_TO_CLOSE",
660
+ "HEARTBEAT"
661
+ ]
662
+ },
663
+ "failure": {
664
+ "$ref": "#/$defs/failure"
665
+ }
666
+ }
667
+ },
668
+ "payload_ACTIVITY_CANCEL_REQUESTED": {
669
+ "type": "object",
670
+ "required": [
671
+ "activityId"
672
+ ],
673
+ "properties": {
674
+ "activityId": {
675
+ "type": "string",
676
+ "minLength": 1,
677
+ "maxLength": 256
678
+ }
679
+ }
680
+ },
681
+ "payload_ACTIVITY_CANCELLED": {
682
+ "type": "object",
683
+ "required": [
684
+ "activityId"
685
+ ],
686
+ "properties": {
687
+ "activityId": {
688
+ "type": "string",
689
+ "minLength": 1,
690
+ "maxLength": 256
691
+ },
692
+ "details": {}
693
+ }
694
+ },
695
+ "payload_ACTIVITY_PAUSED": {
696
+ "type": "object",
697
+ "required": [
698
+ "activityId"
699
+ ],
700
+ "properties": {
701
+ "activityId": {
702
+ "type": "string",
703
+ "minLength": 1,
704
+ "maxLength": 256
705
+ },
706
+ "reason": {
707
+ "type": "string"
708
+ }
709
+ }
710
+ },
711
+ "payload_ACTIVITY_UNPAUSED": {
712
+ "type": "object",
713
+ "required": [
714
+ "activityId"
715
+ ],
716
+ "properties": {
717
+ "activityId": {
718
+ "type": "string",
719
+ "minLength": 1,
720
+ "maxLength": 256
721
+ }
722
+ }
723
+ },
724
+ "payload_ACTIVITY_RESET": {
725
+ "type": "object",
726
+ "required": [
727
+ "activityId"
728
+ ],
729
+ "properties": {
730
+ "activityId": {
731
+ "type": "string",
732
+ "minLength": 1,
733
+ "maxLength": 256
734
+ }
735
+ }
736
+ },
737
+ "payload_ACTIVITY_OPTIONS_UPDATED": {
738
+ "type": "object",
739
+ "required": [
740
+ "activityId"
741
+ ],
742
+ "properties": {
743
+ "activityId": {
744
+ "type": "string",
745
+ "minLength": 1,
746
+ "maxLength": 256
747
+ },
748
+ "options": {
749
+ "type": "object"
750
+ }
751
+ }
752
+ },
753
+ "payload_TIMER_STARTED": {
754
+ "type": "object",
755
+ "required": [
756
+ "timerId",
757
+ "durationMs",
758
+ "fireAt"
759
+ ],
760
+ "properties": {
761
+ "timerId": {
762
+ "type": "string",
763
+ "minLength": 1,
764
+ "maxLength": 256
765
+ },
766
+ "durationMs": {
767
+ "type": "integer",
768
+ "minimum": 1
769
+ },
770
+ "fireAt": {
771
+ "type": "string"
772
+ },
773
+ "summary": {
774
+ "type": "string"
775
+ }
776
+ }
777
+ },
778
+ "payload_TIMER_FIRED": {
779
+ "type": "object",
780
+ "required": [
781
+ "timerId"
782
+ ],
783
+ "properties": {
784
+ "timerId": {
785
+ "type": "string",
786
+ "minLength": 1,
787
+ "maxLength": 256
788
+ }
789
+ }
790
+ },
791
+ "payload_TIMER_CANCELLED": {
792
+ "type": "object",
793
+ "required": [
794
+ "timerId"
795
+ ],
796
+ "properties": {
797
+ "timerId": {
798
+ "type": "string",
799
+ "minLength": 1,
800
+ "maxLength": 256
801
+ }
802
+ }
803
+ },
804
+ "payload_SIGNAL_RECEIVED": {
805
+ "type": "object",
806
+ "required": [
807
+ "name"
808
+ ],
809
+ "properties": {
810
+ "name": {
811
+ "type": "string",
812
+ "minLength": 1,
813
+ "maxLength": 256
814
+ },
815
+ "payload": {},
816
+ "receivedAt": {
817
+ "type": "string"
818
+ },
819
+ "actor": {},
820
+ "idempotencyKey": {
821
+ "type": "string"
822
+ }
823
+ }
824
+ },
825
+ "payload_UPDATE_ADMITTED": {
826
+ "type": "object",
827
+ "required": [
828
+ "updateId",
829
+ "name"
830
+ ],
831
+ "properties": {
832
+ "updateId": {
833
+ "type": "string",
834
+ "minLength": 1,
835
+ "maxLength": 256
836
+ },
837
+ "name": {
838
+ "type": "string",
839
+ "minLength": 1,
840
+ "maxLength": 256
841
+ },
842
+ "args": {}
843
+ }
844
+ },
845
+ "payload_UPDATE_ACCEPTED": {
846
+ "type": "object",
847
+ "required": [
848
+ "updateId",
849
+ "name"
850
+ ],
851
+ "properties": {
852
+ "updateId": {
853
+ "type": "string",
854
+ "minLength": 1,
855
+ "maxLength": 256
856
+ },
857
+ "name": {
858
+ "type": "string",
859
+ "minLength": 1,
860
+ "maxLength": 256
861
+ },
862
+ "args": {}
863
+ }
864
+ },
865
+ "payload_UPDATE_COMPLETED": {
866
+ "type": "object",
867
+ "required": [
868
+ "updateId"
869
+ ],
870
+ "properties": {
871
+ "updateId": {
872
+ "type": "string",
873
+ "minLength": 1,
874
+ "maxLength": 256
875
+ },
876
+ "result": {},
877
+ "failure": {
878
+ "$ref": "#/$defs/failure"
879
+ }
880
+ }
881
+ },
882
+ "payload_CHILD_RUN_INITIATED": {
883
+ "type": "object",
884
+ "required": [
885
+ "childId",
886
+ "input",
887
+ "options"
888
+ ],
889
+ "properties": {
890
+ "childId": {
891
+ "type": "string",
892
+ "minLength": 1,
893
+ "maxLength": 256
894
+ },
895
+ "workflowKey": {
896
+ "type": "string",
897
+ "minLength": 1,
898
+ "maxLength": 256
899
+ },
900
+ "workflowFn": {
901
+ "type": "string",
902
+ "minLength": 1,
903
+ "maxLength": 256
904
+ },
905
+ "version": {
906
+ "type": "string"
907
+ },
908
+ "input": {},
909
+ "options": {
910
+ "$ref": "#/$defs/childOptions"
911
+ },
912
+ "childRunId": {
913
+ "type": "string"
914
+ },
915
+ "executionKind": {
916
+ "enum": [
917
+ "GRAPH",
918
+ "DURABLE_FN"
919
+ ]
920
+ }
921
+ }
922
+ },
923
+ "payload_CHILD_RUN_STARTED": {
924
+ "type": "object",
925
+ "required": [
926
+ "childId",
927
+ "childRunId"
928
+ ],
929
+ "properties": {
930
+ "childId": {
931
+ "type": "string",
932
+ "minLength": 1,
933
+ "maxLength": 256
934
+ },
935
+ "childRunId": {
936
+ "type": "string",
937
+ "minLength": 1,
938
+ "maxLength": 256
939
+ },
940
+ "executionKind": {
941
+ "enum": [
942
+ "GRAPH",
943
+ "DURABLE_FN"
944
+ ]
945
+ }
946
+ }
947
+ },
948
+ "payload_CHILD_RUN_COMPLETED": {
949
+ "type": "object",
950
+ "required": [
951
+ "childId"
952
+ ],
953
+ "properties": {
954
+ "childId": {
955
+ "type": "string",
956
+ "minLength": 1,
957
+ "maxLength": 256
958
+ },
959
+ "childRunId": {
960
+ "type": "string",
961
+ "minLength": 1,
962
+ "maxLength": 256
963
+ },
964
+ "result": {}
965
+ }
966
+ },
967
+ "payload_CHILD_RUN_FAILED": {
968
+ "type": "object",
969
+ "required": [
970
+ "childId",
971
+ "failure"
972
+ ],
973
+ "properties": {
974
+ "childId": {
975
+ "type": "string",
976
+ "minLength": 1,
977
+ "maxLength": 256
978
+ },
979
+ "childRunId": {
980
+ "type": "string",
981
+ "minLength": 1,
982
+ "maxLength": 256
983
+ },
984
+ "failure": {
985
+ "$ref": "#/$defs/failure"
986
+ }
987
+ }
988
+ },
989
+ "payload_CHILD_RUN_CANCELLED": {
990
+ "type": "object",
991
+ "required": [
992
+ "childId"
993
+ ],
994
+ "properties": {
995
+ "childId": {
996
+ "type": "string",
997
+ "minLength": 1,
998
+ "maxLength": 256
999
+ },
1000
+ "childRunId": {
1001
+ "type": "string",
1002
+ "minLength": 1,
1003
+ "maxLength": 256
1004
+ }
1005
+ }
1006
+ },
1007
+ "payload_CHILD_RUN_TERMINATED": {
1008
+ "type": "object",
1009
+ "required": [
1010
+ "childId"
1011
+ ],
1012
+ "properties": {
1013
+ "childId": {
1014
+ "type": "string",
1015
+ "minLength": 1,
1016
+ "maxLength": 256
1017
+ },
1018
+ "childRunId": {
1019
+ "type": "string",
1020
+ "minLength": 1,
1021
+ "maxLength": 256
1022
+ },
1023
+ "reason": {
1024
+ "type": "string"
1025
+ }
1026
+ }
1027
+ },
1028
+ "payload_CHILD_RUN_TIMED_OUT": {
1029
+ "type": "object",
1030
+ "required": [
1031
+ "childId"
1032
+ ],
1033
+ "properties": {
1034
+ "childId": {
1035
+ "type": "string",
1036
+ "minLength": 1,
1037
+ "maxLength": 256
1038
+ },
1039
+ "childRunId": {
1040
+ "type": "string",
1041
+ "minLength": 1,
1042
+ "maxLength": 256
1043
+ },
1044
+ "timeoutType": {
1045
+ "enum": [
1046
+ "WORKFLOW_RUN",
1047
+ "WORKFLOW_EXECUTION"
1048
+ ]
1049
+ }
1050
+ }
1051
+ },
1052
+ "payload_EXTERNAL_RUN_CANCEL_REQUESTED": {
1053
+ "type": "object",
1054
+ "required": [
1055
+ "externalId",
1056
+ "target"
1057
+ ],
1058
+ "properties": {
1059
+ "externalId": {
1060
+ "type": "string",
1061
+ "minLength": 1,
1062
+ "maxLength": 256
1063
+ },
1064
+ "target": {
1065
+ "$ref": "#/$defs/runTarget"
1066
+ }
1067
+ }
1068
+ },
1069
+ "payload_EXTERNAL_RUN_CANCEL_RESOLVED": {
1070
+ "type": "object",
1071
+ "required": [
1072
+ "externalId",
1073
+ "ok"
1074
+ ],
1075
+ "properties": {
1076
+ "externalId": {
1077
+ "type": "string",
1078
+ "minLength": 1,
1079
+ "maxLength": 256
1080
+ },
1081
+ "ok": {
1082
+ "type": "boolean"
1083
+ },
1084
+ "targetRunId": {
1085
+ "type": "string"
1086
+ },
1087
+ "failure": {
1088
+ "$ref": "#/$defs/failure"
1089
+ }
1090
+ }
1091
+ },
1092
+ "payload_EXTERNAL_RUN_SIGNALED": {
1093
+ "type": "object",
1094
+ "required": [
1095
+ "externalId"
1096
+ ],
1097
+ "description": "Two forms. Initiated (appended for the SIGNAL_RUN command): {externalId, target, name, payload}. Resolved (appended by the service after delivery, dedupeKey signal-out:<runId>:<externalId>): {externalId, resolved: true, ok, failure?, targetRunId?}.",
1098
+ "properties": {
1099
+ "externalId": {
1100
+ "type": "string",
1101
+ "minLength": 1,
1102
+ "maxLength": 256
1103
+ },
1104
+ "target": {
1105
+ "$ref": "#/$defs/runTarget"
1106
+ },
1107
+ "name": {
1108
+ "type": "string",
1109
+ "minLength": 1,
1110
+ "maxLength": 256
1111
+ },
1112
+ "payload": {},
1113
+ "resolved": {
1114
+ "const": true
1115
+ },
1116
+ "ok": {
1117
+ "type": "boolean"
1118
+ },
1119
+ "targetRunId": {
1120
+ "type": "string"
1121
+ },
1122
+ "failure": {
1123
+ "$ref": "#/$defs/failure"
1124
+ }
1125
+ },
1126
+ "if": {
1127
+ "required": [
1128
+ "resolved"
1129
+ ]
1130
+ },
1131
+ "then": {
1132
+ "required": [
1133
+ "ok"
1134
+ ]
1135
+ },
1136
+ "else": {
1137
+ "required": [
1138
+ "target",
1139
+ "name"
1140
+ ]
1141
+ }
1142
+ },
1143
+ "payload_SIDE_EFFECT_RECORDED": {
1144
+ "type": "object",
1145
+ "required": [
1146
+ "sideEffectId",
1147
+ "value"
1148
+ ],
1149
+ "properties": {
1150
+ "sideEffectId": {
1151
+ "type": "string",
1152
+ "minLength": 1,
1153
+ "maxLength": 256
1154
+ },
1155
+ "value": {}
1156
+ }
1157
+ },
1158
+ "payload_LOCAL_ACTIVITY_COMPLETED": {
1159
+ "type": "object",
1160
+ "required": [
1161
+ "localActivityId",
1162
+ "attempts"
1163
+ ],
1164
+ "properties": {
1165
+ "localActivityId": {
1166
+ "type": "string",
1167
+ "minLength": 1,
1168
+ "maxLength": 256
1169
+ },
1170
+ "result": {},
1171
+ "attempts": {
1172
+ "type": "integer",
1173
+ "minimum": 1
1174
+ }
1175
+ }
1176
+ },
1177
+ "payload_LOCAL_ACTIVITY_FAILED": {
1178
+ "type": "object",
1179
+ "required": [
1180
+ "localActivityId",
1181
+ "attempts",
1182
+ "failure"
1183
+ ],
1184
+ "properties": {
1185
+ "localActivityId": {
1186
+ "type": "string",
1187
+ "minLength": 1,
1188
+ "maxLength": 256
1189
+ },
1190
+ "failure": {
1191
+ "$ref": "#/$defs/failure"
1192
+ },
1193
+ "attempts": {
1194
+ "type": "integer",
1195
+ "minimum": 1
1196
+ }
1197
+ }
1198
+ },
1199
+ "payload_SEARCH_ATTRIBUTES_UPSERTED": {
1200
+ "type": "object",
1201
+ "required": [
1202
+ "attributes"
1203
+ ],
1204
+ "properties": {
1205
+ "attributes": {
1206
+ "type": "object"
1207
+ }
1208
+ }
1209
+ },
1210
+ "payload_CONTEXT_UPSERTED": {
1211
+ "type": "object",
1212
+ "required": [
1213
+ "entries"
1214
+ ],
1215
+ "properties": {
1216
+ "entries": {
1217
+ "type": "object"
1218
+ }
1219
+ }
1220
+ },
1221
+ "payload_MARKER_RECORDED": {
1222
+ "type": "object",
1223
+ "required": [
1224
+ "markerId",
1225
+ "data"
1226
+ ],
1227
+ "properties": {
1228
+ "markerId": {
1229
+ "type": "string",
1230
+ "minLength": 1,
1231
+ "maxLength": 256
1232
+ },
1233
+ "data": {}
1234
+ }
1235
+ },
1236
+ "payload_WORKFLOW_CANCEL_REQUESTED": {
1237
+ "type": "object",
1238
+ "required": [],
1239
+ "properties": {
1240
+ "actor": {},
1241
+ "reason": {
1242
+ "type": "string"
1243
+ }
1244
+ }
1245
+ },
1246
+ "payload_WORKFLOW_RESET": {
1247
+ "type": "object",
1248
+ "required": [
1249
+ "fromRunId",
1250
+ "toSeq"
1251
+ ],
1252
+ "properties": {
1253
+ "fromRunId": {
1254
+ "type": "string",
1255
+ "minLength": 1,
1256
+ "maxLength": 256
1257
+ },
1258
+ "toSeq": {
1259
+ "type": "integer",
1260
+ "minimum": 1
1261
+ },
1262
+ "reason": {
1263
+ "type": "string"
1264
+ }
1265
+ }
1266
+ },
1267
+ "payload_VERSIONING_OVERRIDE_SET": {
1268
+ "type": "object",
1269
+ "required": [
1270
+ "override"
1271
+ ],
1272
+ "properties": {
1273
+ "override": {}
1274
+ }
1275
+ },
1276
+ "payload_WORKFLOW_COMPLETED": {
1277
+ "type": "object",
1278
+ "required": [
1279
+ "output"
1280
+ ],
1281
+ "properties": {
1282
+ "output": {}
1283
+ }
1284
+ },
1285
+ "payload_WORKFLOW_FAILED": {
1286
+ "type": "object",
1287
+ "required": [
1288
+ "failure"
1289
+ ],
1290
+ "properties": {
1291
+ "failure": {
1292
+ "$ref": "#/$defs/failure"
1293
+ }
1294
+ }
1295
+ },
1296
+ "payload_WORKFLOW_CANCELLED": {
1297
+ "type": "object",
1298
+ "required": [],
1299
+ "properties": {
1300
+ "details": {}
1301
+ }
1302
+ },
1303
+ "payload_WORKFLOW_TERMINATED": {
1304
+ "type": "object",
1305
+ "required": [],
1306
+ "properties": {
1307
+ "reason": {
1308
+ "type": "string"
1309
+ },
1310
+ "actor": {}
1311
+ }
1312
+ },
1313
+ "payload_WORKFLOW_TIMED_OUT": {
1314
+ "type": "object",
1315
+ "required": [
1316
+ "timeoutType"
1317
+ ],
1318
+ "properties": {
1319
+ "timeoutType": {
1320
+ "enum": [
1321
+ "WORKFLOW_RUN",
1322
+ "WORKFLOW_EXECUTION"
1323
+ ]
1324
+ }
1325
+ }
1326
+ },
1327
+ "payload_WORKFLOW_CONTINUED_AS_NEW": {
1328
+ "type": "object",
1329
+ "required": [
1330
+ "input",
1331
+ "options"
1332
+ ],
1333
+ "properties": {
1334
+ "input": {},
1335
+ "options": {
1336
+ "type": "object"
1337
+ },
1338
+ "newRunId": {
1339
+ "type": "string"
1340
+ }
1341
+ }
1342
+ },
1343
+ "command_SCHEDULE_ACTIVITY": {
1344
+ "type": "object",
1345
+ "required": [
1346
+ "type",
1347
+ "activityId",
1348
+ "kind",
1349
+ "nodeType",
1350
+ "operation",
1351
+ "args",
1352
+ "retry"
1353
+ ],
1354
+ "properties": {
1355
+ "type": {
1356
+ "const": "SCHEDULE_ACTIVITY"
1357
+ },
1358
+ "headers": {
1359
+ "$ref": "#/$defs/headers"
1360
+ },
1361
+ "activityId": {
1362
+ "type": "string",
1363
+ "minLength": 1,
1364
+ "maxLength": 256
1365
+ },
1366
+ "kind": {
1367
+ "const": "node"
1368
+ },
1369
+ "nodeType": {
1370
+ "type": "string",
1371
+ "minLength": 1,
1372
+ "maxLength": 256
1373
+ },
1374
+ "nodeVersion": {
1375
+ "type": "string"
1376
+ },
1377
+ "operation": {
1378
+ "type": "string",
1379
+ "minLength": 1,
1380
+ "maxLength": 256
1381
+ },
1382
+ "args": {},
1383
+ "connection": {
1384
+ "type": "string",
1385
+ "minLength": 1,
1386
+ "maxLength": 256
1387
+ },
1388
+ "retry": {
1389
+ "$ref": "#/$defs/retryPolicy"
1390
+ },
1391
+ "startToCloseTimeout": {
1392
+ "type": "integer",
1393
+ "minimum": 0
1394
+ },
1395
+ "scheduleToCloseTimeout": {
1396
+ "type": "integer",
1397
+ "minimum": 0
1398
+ },
1399
+ "scheduleToStartTimeout": {
1400
+ "type": "integer",
1401
+ "minimum": 0
1402
+ },
1403
+ "heartbeatTimeout": {
1404
+ "type": "integer",
1405
+ "minimum": 0
1406
+ },
1407
+ "cancellationType": {
1408
+ "enum": [
1409
+ "WAIT_CANCELLATION_COMPLETED",
1410
+ "TRY_CANCEL",
1411
+ "ABANDON"
1412
+ ]
1413
+ },
1414
+ "priority": {
1415
+ "type": "integer",
1416
+ "minimum": 1,
1417
+ "maximum": 5
1418
+ },
1419
+ "summary": {
1420
+ "type": "string",
1421
+ "maxLength": 200
1422
+ },
1423
+ "runOn": {
1424
+ "type": "string"
1425
+ }
1426
+ },
1427
+ "additionalProperties": false
1428
+ },
1429
+ "command_REQUEST_CANCEL_ACTIVITY": {
1430
+ "type": "object",
1431
+ "required": [
1432
+ "type",
1433
+ "activityId"
1434
+ ],
1435
+ "properties": {
1436
+ "type": {
1437
+ "const": "REQUEST_CANCEL_ACTIVITY"
1438
+ },
1439
+ "headers": {
1440
+ "$ref": "#/$defs/headers"
1441
+ },
1442
+ "activityId": {
1443
+ "type": "string",
1444
+ "minLength": 1,
1445
+ "maxLength": 256
1446
+ }
1447
+ },
1448
+ "additionalProperties": false
1449
+ },
1450
+ "command_START_TIMER": {
1451
+ "type": "object",
1452
+ "required": [
1453
+ "type",
1454
+ "timerId",
1455
+ "durationMs"
1456
+ ],
1457
+ "properties": {
1458
+ "type": {
1459
+ "const": "START_TIMER"
1460
+ },
1461
+ "headers": {
1462
+ "$ref": "#/$defs/headers"
1463
+ },
1464
+ "timerId": {
1465
+ "type": "string",
1466
+ "minLength": 1,
1467
+ "maxLength": 256
1468
+ },
1469
+ "durationMs": {
1470
+ "type": "integer",
1471
+ "minimum": 1
1472
+ },
1473
+ "summary": {
1474
+ "type": "string",
1475
+ "maxLength": 200
1476
+ }
1477
+ },
1478
+ "additionalProperties": false
1479
+ },
1480
+ "command_CANCEL_TIMER": {
1481
+ "type": "object",
1482
+ "required": [
1483
+ "type",
1484
+ "timerId"
1485
+ ],
1486
+ "properties": {
1487
+ "type": {
1488
+ "const": "CANCEL_TIMER"
1489
+ },
1490
+ "headers": {
1491
+ "$ref": "#/$defs/headers"
1492
+ },
1493
+ "timerId": {
1494
+ "type": "string",
1495
+ "minLength": 1,
1496
+ "maxLength": 256
1497
+ }
1498
+ },
1499
+ "additionalProperties": false
1500
+ },
1501
+ "command_START_CHILD_RUN": {
1502
+ "type": "object",
1503
+ "required": [
1504
+ "type",
1505
+ "childId",
1506
+ "input",
1507
+ "options"
1508
+ ],
1509
+ "properties": {
1510
+ "type": {
1511
+ "const": "START_CHILD_RUN"
1512
+ },
1513
+ "headers": {
1514
+ "$ref": "#/$defs/headers"
1515
+ },
1516
+ "childId": {
1517
+ "type": "string",
1518
+ "minLength": 1,
1519
+ "maxLength": 256
1520
+ },
1521
+ "workflowKey": {
1522
+ "type": "string",
1523
+ "minLength": 1,
1524
+ "maxLength": 256
1525
+ },
1526
+ "workflowFn": {
1527
+ "type": "string",
1528
+ "minLength": 1,
1529
+ "maxLength": 256
1530
+ },
1531
+ "version": {
1532
+ "type": "string",
1533
+ "minLength": 1
1534
+ },
1535
+ "input": {},
1536
+ "options": {
1537
+ "$ref": "#/$defs/childOptions"
1538
+ }
1539
+ },
1540
+ "additionalProperties": false,
1541
+ "oneOf": [
1542
+ {
1543
+ "required": [
1544
+ "workflowKey"
1545
+ ]
1546
+ },
1547
+ {
1548
+ "required": [
1549
+ "workflowFn"
1550
+ ]
1551
+ }
1552
+ ]
1553
+ },
1554
+ "command_SIGNAL_RUN": {
1555
+ "type": "object",
1556
+ "required": [
1557
+ "type",
1558
+ "externalId",
1559
+ "target",
1560
+ "name",
1561
+ "payload"
1562
+ ],
1563
+ "properties": {
1564
+ "type": {
1565
+ "const": "SIGNAL_RUN"
1566
+ },
1567
+ "headers": {
1568
+ "$ref": "#/$defs/headers"
1569
+ },
1570
+ "externalId": {
1571
+ "type": "string",
1572
+ "minLength": 1,
1573
+ "maxLength": 256
1574
+ },
1575
+ "target": {
1576
+ "$ref": "#/$defs/runTarget"
1577
+ },
1578
+ "name": {
1579
+ "type": "string",
1580
+ "minLength": 1,
1581
+ "maxLength": 256
1582
+ },
1583
+ "payload": {}
1584
+ },
1585
+ "additionalProperties": false
1586
+ },
1587
+ "command_RECORD_SIDE_EFFECT": {
1588
+ "type": "object",
1589
+ "required": [
1590
+ "type",
1591
+ "sideEffectId",
1592
+ "value"
1593
+ ],
1594
+ "properties": {
1595
+ "type": {
1596
+ "const": "RECORD_SIDE_EFFECT"
1597
+ },
1598
+ "headers": {
1599
+ "$ref": "#/$defs/headers"
1600
+ },
1601
+ "sideEffectId": {
1602
+ "type": "string",
1603
+ "minLength": 1,
1604
+ "maxLength": 256
1605
+ },
1606
+ "value": {}
1607
+ },
1608
+ "additionalProperties": false
1609
+ },
1610
+ "command_RECORD_MARKER": {
1611
+ "type": "object",
1612
+ "required": [
1613
+ "type",
1614
+ "markerId",
1615
+ "data"
1616
+ ],
1617
+ "properties": {
1618
+ "type": {
1619
+ "const": "RECORD_MARKER"
1620
+ },
1621
+ "headers": {
1622
+ "$ref": "#/$defs/headers"
1623
+ },
1624
+ "markerId": {
1625
+ "type": "string",
1626
+ "minLength": 1,
1627
+ "maxLength": 256
1628
+ },
1629
+ "data": {}
1630
+ },
1631
+ "additionalProperties": false
1632
+ },
1633
+ "command_COMPLETE_WORKFLOW": {
1634
+ "type": "object",
1635
+ "required": [
1636
+ "type",
1637
+ "output"
1638
+ ],
1639
+ "properties": {
1640
+ "type": {
1641
+ "const": "COMPLETE_WORKFLOW"
1642
+ },
1643
+ "headers": {
1644
+ "$ref": "#/$defs/headers"
1645
+ },
1646
+ "output": {}
1647
+ },
1648
+ "additionalProperties": false
1649
+ },
1650
+ "command_FAIL_WORKFLOW": {
1651
+ "type": "object",
1652
+ "required": [
1653
+ "type",
1654
+ "failure"
1655
+ ],
1656
+ "properties": {
1657
+ "type": {
1658
+ "const": "FAIL_WORKFLOW"
1659
+ },
1660
+ "headers": {
1661
+ "$ref": "#/$defs/headers"
1662
+ },
1663
+ "failure": {
1664
+ "$ref": "#/$defs/failure"
1665
+ }
1666
+ },
1667
+ "additionalProperties": false
1668
+ },
1669
+ "command_CANCEL_WORKFLOW": {
1670
+ "type": "object",
1671
+ "required": [
1672
+ "type"
1673
+ ],
1674
+ "properties": {
1675
+ "type": {
1676
+ "const": "CANCEL_WORKFLOW"
1677
+ },
1678
+ "headers": {
1679
+ "$ref": "#/$defs/headers"
1680
+ }
1681
+ },
1682
+ "additionalProperties": false
1683
+ },
1684
+ "command_UPSERT_CONTEXT": {
1685
+ "type": "object",
1686
+ "required": [
1687
+ "type",
1688
+ "entries"
1689
+ ],
1690
+ "properties": {
1691
+ "type": {
1692
+ "const": "UPSERT_CONTEXT"
1693
+ },
1694
+ "headers": {
1695
+ "$ref": "#/$defs/headers"
1696
+ },
1697
+ "entries": {
1698
+ "type": "object"
1699
+ }
1700
+ },
1701
+ "additionalProperties": false
1702
+ },
1703
+ "command_RECORD_LOCAL_ACTIVITY": {
1704
+ "type": "object",
1705
+ "required": [
1706
+ "type",
1707
+ "localActivityId",
1708
+ "attempts"
1709
+ ],
1710
+ "properties": {
1711
+ "type": {
1712
+ "const": "RECORD_LOCAL_ACTIVITY"
1713
+ },
1714
+ "headers": {
1715
+ "$ref": "#/$defs/headers"
1716
+ },
1717
+ "localActivityId": {
1718
+ "type": "string",
1719
+ "minLength": 1,
1720
+ "maxLength": 256
1721
+ },
1722
+ "result": {},
1723
+ "failure": {
1724
+ "$ref": "#/$defs/failure"
1725
+ },
1726
+ "attempts": {
1727
+ "type": "integer",
1728
+ "minimum": 1
1729
+ }
1730
+ },
1731
+ "additionalProperties": false,
1732
+ "oneOf": [
1733
+ {
1734
+ "required": [
1735
+ "result"
1736
+ ]
1737
+ },
1738
+ {
1739
+ "required": [
1740
+ "failure"
1741
+ ]
1742
+ }
1743
+ ]
1744
+ },
1745
+ "command_CONTINUE_AS_NEW": {
1746
+ "type": "object",
1747
+ "required": [
1748
+ "type",
1749
+ "input",
1750
+ "options"
1751
+ ],
1752
+ "properties": {
1753
+ "type": {
1754
+ "const": "CONTINUE_AS_NEW"
1755
+ },
1756
+ "headers": {
1757
+ "$ref": "#/$defs/headers"
1758
+ },
1759
+ "input": {},
1760
+ "options": {
1761
+ "type": "object"
1762
+ }
1763
+ },
1764
+ "additionalProperties": false
1765
+ },
1766
+ "command_REQUEST_CANCEL_EXTERNAL_RUN": {
1767
+ "type": "object",
1768
+ "required": [
1769
+ "type",
1770
+ "externalId",
1771
+ "target"
1772
+ ],
1773
+ "properties": {
1774
+ "type": {
1775
+ "const": "REQUEST_CANCEL_EXTERNAL_RUN"
1776
+ },
1777
+ "headers": {
1778
+ "$ref": "#/$defs/headers"
1779
+ },
1780
+ "externalId": {
1781
+ "type": "string",
1782
+ "minLength": 1,
1783
+ "maxLength": 256
1784
+ },
1785
+ "target": {
1786
+ "$ref": "#/$defs/runTarget"
1787
+ }
1788
+ },
1789
+ "additionalProperties": false
1790
+ },
1791
+ "command_UPSERT_SEARCH_ATTRIBUTES": {
1792
+ "type": "object",
1793
+ "required": [
1794
+ "type",
1795
+ "attributes"
1796
+ ],
1797
+ "properties": {
1798
+ "type": {
1799
+ "const": "UPSERT_SEARCH_ATTRIBUTES"
1800
+ },
1801
+ "headers": {
1802
+ "$ref": "#/$defs/headers"
1803
+ },
1804
+ "attributes": {
1805
+ "type": "object"
1806
+ }
1807
+ },
1808
+ "additionalProperties": false
1809
+ },
1810
+ "command_ACCEPT_UPDATE": {
1811
+ "type": "object",
1812
+ "required": [
1813
+ "type",
1814
+ "updateId"
1815
+ ],
1816
+ "properties": {
1817
+ "type": {
1818
+ "const": "ACCEPT_UPDATE"
1819
+ },
1820
+ "headers": {
1821
+ "$ref": "#/$defs/headers"
1822
+ },
1823
+ "updateId": {
1824
+ "type": "string",
1825
+ "minLength": 1,
1826
+ "maxLength": 256
1827
+ }
1828
+ },
1829
+ "additionalProperties": false
1830
+ },
1831
+ "command_REJECT_UPDATE": {
1832
+ "type": "object",
1833
+ "required": [
1834
+ "type",
1835
+ "updateId",
1836
+ "failure"
1837
+ ],
1838
+ "properties": {
1839
+ "type": {
1840
+ "const": "REJECT_UPDATE"
1841
+ },
1842
+ "headers": {
1843
+ "$ref": "#/$defs/headers"
1844
+ },
1845
+ "updateId": {
1846
+ "type": "string",
1847
+ "minLength": 1,
1848
+ "maxLength": 256
1849
+ },
1850
+ "failure": {
1851
+ "$ref": "#/$defs/failure"
1852
+ }
1853
+ },
1854
+ "additionalProperties": false
1855
+ },
1856
+ "command_COMPLETE_UPDATE": {
1857
+ "type": "object",
1858
+ "required": [
1859
+ "type",
1860
+ "updateId"
1861
+ ],
1862
+ "properties": {
1863
+ "type": {
1864
+ "const": "COMPLETE_UPDATE"
1865
+ },
1866
+ "headers": {
1867
+ "$ref": "#/$defs/headers"
1868
+ },
1869
+ "updateId": {
1870
+ "type": "string",
1871
+ "minLength": 1,
1872
+ "maxLength": 256
1873
+ },
1874
+ "result": {},
1875
+ "failure": {
1876
+ "$ref": "#/$defs/failure"
1877
+ }
1878
+ },
1879
+ "additionalProperties": false
1880
+ },
1881
+ "event": {
1882
+ "type": "object",
1883
+ "required": [
1884
+ "seq",
1885
+ "type",
1886
+ "payload",
1887
+ "createdAt"
1888
+ ],
1889
+ "properties": {
1890
+ "seq": {
1891
+ "type": "integer",
1892
+ "minimum": 1
1893
+ },
1894
+ "type": {
1895
+ "enum": [
1896
+ "WORKFLOW_STARTED",
1897
+ "WORKFLOW_TASK_SCHEDULED",
1898
+ "WORKFLOW_TASK_STARTED",
1899
+ "WORKFLOW_TASK_COMPLETED",
1900
+ "WORKFLOW_TASK_FAILED",
1901
+ "WORKFLOW_TASK_TIMED_OUT",
1902
+ "ACTIVITY_SCHEDULED",
1903
+ "ACTIVITY_STARTED",
1904
+ "ACTIVITY_HEARTBEAT",
1905
+ "ACTIVITY_COMPLETED",
1906
+ "ACTIVITY_FAILED",
1907
+ "ACTIVITY_TIMED_OUT",
1908
+ "ACTIVITY_CANCEL_REQUESTED",
1909
+ "ACTIVITY_CANCELLED",
1910
+ "ACTIVITY_PAUSED",
1911
+ "ACTIVITY_UNPAUSED",
1912
+ "ACTIVITY_RESET",
1913
+ "ACTIVITY_OPTIONS_UPDATED",
1914
+ "TIMER_STARTED",
1915
+ "TIMER_FIRED",
1916
+ "TIMER_CANCELLED",
1917
+ "SIGNAL_RECEIVED",
1918
+ "UPDATE_ADMITTED",
1919
+ "UPDATE_ACCEPTED",
1920
+ "UPDATE_COMPLETED",
1921
+ "CHILD_RUN_INITIATED",
1922
+ "CHILD_RUN_STARTED",
1923
+ "CHILD_RUN_COMPLETED",
1924
+ "CHILD_RUN_FAILED",
1925
+ "CHILD_RUN_CANCELLED",
1926
+ "CHILD_RUN_TERMINATED",
1927
+ "CHILD_RUN_TIMED_OUT",
1928
+ "EXTERNAL_RUN_CANCEL_REQUESTED",
1929
+ "EXTERNAL_RUN_CANCEL_RESOLVED",
1930
+ "EXTERNAL_RUN_SIGNALED",
1931
+ "SIDE_EFFECT_RECORDED",
1932
+ "LOCAL_ACTIVITY_COMPLETED",
1933
+ "LOCAL_ACTIVITY_FAILED",
1934
+ "SEARCH_ATTRIBUTES_UPSERTED",
1935
+ "CONTEXT_UPSERTED",
1936
+ "MARKER_RECORDED",
1937
+ "WORKFLOW_CANCEL_REQUESTED",
1938
+ "WORKFLOW_RESET",
1939
+ "VERSIONING_OVERRIDE_SET",
1940
+ "WORKFLOW_COMPLETED",
1941
+ "WORKFLOW_FAILED",
1942
+ "WORKFLOW_CANCELLED",
1943
+ "WORKFLOW_TERMINATED",
1944
+ "WORKFLOW_TIMED_OUT",
1945
+ "WORKFLOW_CONTINUED_AS_NEW"
1946
+ ]
1947
+ },
1948
+ "taskId": {
1949
+ "type": [
1950
+ "string",
1951
+ "null"
1952
+ ]
1953
+ },
1954
+ "payload": {
1955
+ "type": "object"
1956
+ },
1957
+ "createdAt": {
1958
+ "type": "string",
1959
+ "minLength": 1
1960
+ },
1961
+ "dedupeKey": {
1962
+ "type": [
1963
+ "string",
1964
+ "null"
1965
+ ]
1966
+ }
1967
+ },
1968
+ "allOf": [
1969
+ {
1970
+ "if": {
1971
+ "properties": {
1972
+ "type": {
1973
+ "const": "WORKFLOW_STARTED"
1974
+ }
1975
+ },
1976
+ "required": [
1977
+ "type"
1978
+ ]
1979
+ },
1980
+ "then": {
1981
+ "properties": {
1982
+ "payload": {
1983
+ "$ref": "#/$defs/payload_WORKFLOW_STARTED"
1984
+ }
1985
+ }
1986
+ }
1987
+ },
1988
+ {
1989
+ "if": {
1990
+ "properties": {
1991
+ "type": {
1992
+ "const": "WORKFLOW_TASK_SCHEDULED"
1993
+ }
1994
+ },
1995
+ "required": [
1996
+ "type"
1997
+ ]
1998
+ },
1999
+ "then": {
2000
+ "properties": {
2001
+ "payload": {
2002
+ "$ref": "#/$defs/payload_WORKFLOW_TASK_SCHEDULED"
2003
+ }
2004
+ }
2005
+ }
2006
+ },
2007
+ {
2008
+ "if": {
2009
+ "properties": {
2010
+ "type": {
2011
+ "const": "WORKFLOW_TASK_STARTED"
2012
+ }
2013
+ },
2014
+ "required": [
2015
+ "type"
2016
+ ]
2017
+ },
2018
+ "then": {
2019
+ "properties": {
2020
+ "payload": {
2021
+ "$ref": "#/$defs/payload_WORKFLOW_TASK_STARTED"
2022
+ }
2023
+ }
2024
+ }
2025
+ },
2026
+ {
2027
+ "if": {
2028
+ "properties": {
2029
+ "type": {
2030
+ "const": "WORKFLOW_TASK_COMPLETED"
2031
+ }
2032
+ },
2033
+ "required": [
2034
+ "type"
2035
+ ]
2036
+ },
2037
+ "then": {
2038
+ "properties": {
2039
+ "payload": {
2040
+ "$ref": "#/$defs/payload_WORKFLOW_TASK_COMPLETED"
2041
+ }
2042
+ }
2043
+ }
2044
+ },
2045
+ {
2046
+ "if": {
2047
+ "properties": {
2048
+ "type": {
2049
+ "const": "WORKFLOW_TASK_FAILED"
2050
+ }
2051
+ },
2052
+ "required": [
2053
+ "type"
2054
+ ]
2055
+ },
2056
+ "then": {
2057
+ "properties": {
2058
+ "payload": {
2059
+ "$ref": "#/$defs/payload_WORKFLOW_TASK_FAILED"
2060
+ }
2061
+ }
2062
+ }
2063
+ },
2064
+ {
2065
+ "if": {
2066
+ "properties": {
2067
+ "type": {
2068
+ "const": "WORKFLOW_TASK_TIMED_OUT"
2069
+ }
2070
+ },
2071
+ "required": [
2072
+ "type"
2073
+ ]
2074
+ },
2075
+ "then": {
2076
+ "properties": {
2077
+ "payload": {
2078
+ "$ref": "#/$defs/payload_WORKFLOW_TASK_TIMED_OUT"
2079
+ }
2080
+ }
2081
+ }
2082
+ },
2083
+ {
2084
+ "if": {
2085
+ "properties": {
2086
+ "type": {
2087
+ "const": "ACTIVITY_SCHEDULED"
2088
+ }
2089
+ },
2090
+ "required": [
2091
+ "type"
2092
+ ]
2093
+ },
2094
+ "then": {
2095
+ "properties": {
2096
+ "payload": {
2097
+ "$ref": "#/$defs/payload_ACTIVITY_SCHEDULED"
2098
+ }
2099
+ }
2100
+ }
2101
+ },
2102
+ {
2103
+ "if": {
2104
+ "properties": {
2105
+ "type": {
2106
+ "const": "ACTIVITY_STARTED"
2107
+ }
2108
+ },
2109
+ "required": [
2110
+ "type"
2111
+ ]
2112
+ },
2113
+ "then": {
2114
+ "properties": {
2115
+ "payload": {
2116
+ "$ref": "#/$defs/payload_ACTIVITY_STARTED"
2117
+ }
2118
+ }
2119
+ }
2120
+ },
2121
+ {
2122
+ "if": {
2123
+ "properties": {
2124
+ "type": {
2125
+ "const": "ACTIVITY_HEARTBEAT"
2126
+ }
2127
+ },
2128
+ "required": [
2129
+ "type"
2130
+ ]
2131
+ },
2132
+ "then": {
2133
+ "properties": {
2134
+ "payload": {
2135
+ "$ref": "#/$defs/payload_ACTIVITY_HEARTBEAT"
2136
+ }
2137
+ }
2138
+ }
2139
+ },
2140
+ {
2141
+ "if": {
2142
+ "properties": {
2143
+ "type": {
2144
+ "const": "ACTIVITY_COMPLETED"
2145
+ }
2146
+ },
2147
+ "required": [
2148
+ "type"
2149
+ ]
2150
+ },
2151
+ "then": {
2152
+ "properties": {
2153
+ "payload": {
2154
+ "$ref": "#/$defs/payload_ACTIVITY_COMPLETED"
2155
+ }
2156
+ }
2157
+ }
2158
+ },
2159
+ {
2160
+ "if": {
2161
+ "properties": {
2162
+ "type": {
2163
+ "const": "ACTIVITY_FAILED"
2164
+ }
2165
+ },
2166
+ "required": [
2167
+ "type"
2168
+ ]
2169
+ },
2170
+ "then": {
2171
+ "properties": {
2172
+ "payload": {
2173
+ "$ref": "#/$defs/payload_ACTIVITY_FAILED"
2174
+ }
2175
+ }
2176
+ }
2177
+ },
2178
+ {
2179
+ "if": {
2180
+ "properties": {
2181
+ "type": {
2182
+ "const": "ACTIVITY_TIMED_OUT"
2183
+ }
2184
+ },
2185
+ "required": [
2186
+ "type"
2187
+ ]
2188
+ },
2189
+ "then": {
2190
+ "properties": {
2191
+ "payload": {
2192
+ "$ref": "#/$defs/payload_ACTIVITY_TIMED_OUT"
2193
+ }
2194
+ }
2195
+ }
2196
+ },
2197
+ {
2198
+ "if": {
2199
+ "properties": {
2200
+ "type": {
2201
+ "const": "ACTIVITY_CANCEL_REQUESTED"
2202
+ }
2203
+ },
2204
+ "required": [
2205
+ "type"
2206
+ ]
2207
+ },
2208
+ "then": {
2209
+ "properties": {
2210
+ "payload": {
2211
+ "$ref": "#/$defs/payload_ACTIVITY_CANCEL_REQUESTED"
2212
+ }
2213
+ }
2214
+ }
2215
+ },
2216
+ {
2217
+ "if": {
2218
+ "properties": {
2219
+ "type": {
2220
+ "const": "ACTIVITY_CANCELLED"
2221
+ }
2222
+ },
2223
+ "required": [
2224
+ "type"
2225
+ ]
2226
+ },
2227
+ "then": {
2228
+ "properties": {
2229
+ "payload": {
2230
+ "$ref": "#/$defs/payload_ACTIVITY_CANCELLED"
2231
+ }
2232
+ }
2233
+ }
2234
+ },
2235
+ {
2236
+ "if": {
2237
+ "properties": {
2238
+ "type": {
2239
+ "const": "ACTIVITY_PAUSED"
2240
+ }
2241
+ },
2242
+ "required": [
2243
+ "type"
2244
+ ]
2245
+ },
2246
+ "then": {
2247
+ "properties": {
2248
+ "payload": {
2249
+ "$ref": "#/$defs/payload_ACTIVITY_PAUSED"
2250
+ }
2251
+ }
2252
+ }
2253
+ },
2254
+ {
2255
+ "if": {
2256
+ "properties": {
2257
+ "type": {
2258
+ "const": "ACTIVITY_UNPAUSED"
2259
+ }
2260
+ },
2261
+ "required": [
2262
+ "type"
2263
+ ]
2264
+ },
2265
+ "then": {
2266
+ "properties": {
2267
+ "payload": {
2268
+ "$ref": "#/$defs/payload_ACTIVITY_UNPAUSED"
2269
+ }
2270
+ }
2271
+ }
2272
+ },
2273
+ {
2274
+ "if": {
2275
+ "properties": {
2276
+ "type": {
2277
+ "const": "ACTIVITY_RESET"
2278
+ }
2279
+ },
2280
+ "required": [
2281
+ "type"
2282
+ ]
2283
+ },
2284
+ "then": {
2285
+ "properties": {
2286
+ "payload": {
2287
+ "$ref": "#/$defs/payload_ACTIVITY_RESET"
2288
+ }
2289
+ }
2290
+ }
2291
+ },
2292
+ {
2293
+ "if": {
2294
+ "properties": {
2295
+ "type": {
2296
+ "const": "ACTIVITY_OPTIONS_UPDATED"
2297
+ }
2298
+ },
2299
+ "required": [
2300
+ "type"
2301
+ ]
2302
+ },
2303
+ "then": {
2304
+ "properties": {
2305
+ "payload": {
2306
+ "$ref": "#/$defs/payload_ACTIVITY_OPTIONS_UPDATED"
2307
+ }
2308
+ }
2309
+ }
2310
+ },
2311
+ {
2312
+ "if": {
2313
+ "properties": {
2314
+ "type": {
2315
+ "const": "TIMER_STARTED"
2316
+ }
2317
+ },
2318
+ "required": [
2319
+ "type"
2320
+ ]
2321
+ },
2322
+ "then": {
2323
+ "properties": {
2324
+ "payload": {
2325
+ "$ref": "#/$defs/payload_TIMER_STARTED"
2326
+ }
2327
+ }
2328
+ }
2329
+ },
2330
+ {
2331
+ "if": {
2332
+ "properties": {
2333
+ "type": {
2334
+ "const": "TIMER_FIRED"
2335
+ }
2336
+ },
2337
+ "required": [
2338
+ "type"
2339
+ ]
2340
+ },
2341
+ "then": {
2342
+ "properties": {
2343
+ "payload": {
2344
+ "$ref": "#/$defs/payload_TIMER_FIRED"
2345
+ }
2346
+ }
2347
+ }
2348
+ },
2349
+ {
2350
+ "if": {
2351
+ "properties": {
2352
+ "type": {
2353
+ "const": "TIMER_CANCELLED"
2354
+ }
2355
+ },
2356
+ "required": [
2357
+ "type"
2358
+ ]
2359
+ },
2360
+ "then": {
2361
+ "properties": {
2362
+ "payload": {
2363
+ "$ref": "#/$defs/payload_TIMER_CANCELLED"
2364
+ }
2365
+ }
2366
+ }
2367
+ },
2368
+ {
2369
+ "if": {
2370
+ "properties": {
2371
+ "type": {
2372
+ "const": "SIGNAL_RECEIVED"
2373
+ }
2374
+ },
2375
+ "required": [
2376
+ "type"
2377
+ ]
2378
+ },
2379
+ "then": {
2380
+ "properties": {
2381
+ "payload": {
2382
+ "$ref": "#/$defs/payload_SIGNAL_RECEIVED"
2383
+ }
2384
+ }
2385
+ }
2386
+ },
2387
+ {
2388
+ "if": {
2389
+ "properties": {
2390
+ "type": {
2391
+ "const": "UPDATE_ADMITTED"
2392
+ }
2393
+ },
2394
+ "required": [
2395
+ "type"
2396
+ ]
2397
+ },
2398
+ "then": {
2399
+ "properties": {
2400
+ "payload": {
2401
+ "$ref": "#/$defs/payload_UPDATE_ADMITTED"
2402
+ }
2403
+ }
2404
+ }
2405
+ },
2406
+ {
2407
+ "if": {
2408
+ "properties": {
2409
+ "type": {
2410
+ "const": "UPDATE_ACCEPTED"
2411
+ }
2412
+ },
2413
+ "required": [
2414
+ "type"
2415
+ ]
2416
+ },
2417
+ "then": {
2418
+ "properties": {
2419
+ "payload": {
2420
+ "$ref": "#/$defs/payload_UPDATE_ACCEPTED"
2421
+ }
2422
+ }
2423
+ }
2424
+ },
2425
+ {
2426
+ "if": {
2427
+ "properties": {
2428
+ "type": {
2429
+ "const": "UPDATE_COMPLETED"
2430
+ }
2431
+ },
2432
+ "required": [
2433
+ "type"
2434
+ ]
2435
+ },
2436
+ "then": {
2437
+ "properties": {
2438
+ "payload": {
2439
+ "$ref": "#/$defs/payload_UPDATE_COMPLETED"
2440
+ }
2441
+ }
2442
+ }
2443
+ },
2444
+ {
2445
+ "if": {
2446
+ "properties": {
2447
+ "type": {
2448
+ "const": "CHILD_RUN_INITIATED"
2449
+ }
2450
+ },
2451
+ "required": [
2452
+ "type"
2453
+ ]
2454
+ },
2455
+ "then": {
2456
+ "properties": {
2457
+ "payload": {
2458
+ "$ref": "#/$defs/payload_CHILD_RUN_INITIATED"
2459
+ }
2460
+ }
2461
+ }
2462
+ },
2463
+ {
2464
+ "if": {
2465
+ "properties": {
2466
+ "type": {
2467
+ "const": "CHILD_RUN_STARTED"
2468
+ }
2469
+ },
2470
+ "required": [
2471
+ "type"
2472
+ ]
2473
+ },
2474
+ "then": {
2475
+ "properties": {
2476
+ "payload": {
2477
+ "$ref": "#/$defs/payload_CHILD_RUN_STARTED"
2478
+ }
2479
+ }
2480
+ }
2481
+ },
2482
+ {
2483
+ "if": {
2484
+ "properties": {
2485
+ "type": {
2486
+ "const": "CHILD_RUN_COMPLETED"
2487
+ }
2488
+ },
2489
+ "required": [
2490
+ "type"
2491
+ ]
2492
+ },
2493
+ "then": {
2494
+ "properties": {
2495
+ "payload": {
2496
+ "$ref": "#/$defs/payload_CHILD_RUN_COMPLETED"
2497
+ }
2498
+ }
2499
+ }
2500
+ },
2501
+ {
2502
+ "if": {
2503
+ "properties": {
2504
+ "type": {
2505
+ "const": "CHILD_RUN_FAILED"
2506
+ }
2507
+ },
2508
+ "required": [
2509
+ "type"
2510
+ ]
2511
+ },
2512
+ "then": {
2513
+ "properties": {
2514
+ "payload": {
2515
+ "$ref": "#/$defs/payload_CHILD_RUN_FAILED"
2516
+ }
2517
+ }
2518
+ }
2519
+ },
2520
+ {
2521
+ "if": {
2522
+ "properties": {
2523
+ "type": {
2524
+ "const": "CHILD_RUN_CANCELLED"
2525
+ }
2526
+ },
2527
+ "required": [
2528
+ "type"
2529
+ ]
2530
+ },
2531
+ "then": {
2532
+ "properties": {
2533
+ "payload": {
2534
+ "$ref": "#/$defs/payload_CHILD_RUN_CANCELLED"
2535
+ }
2536
+ }
2537
+ }
2538
+ },
2539
+ {
2540
+ "if": {
2541
+ "properties": {
2542
+ "type": {
2543
+ "const": "CHILD_RUN_TERMINATED"
2544
+ }
2545
+ },
2546
+ "required": [
2547
+ "type"
2548
+ ]
2549
+ },
2550
+ "then": {
2551
+ "properties": {
2552
+ "payload": {
2553
+ "$ref": "#/$defs/payload_CHILD_RUN_TERMINATED"
2554
+ }
2555
+ }
2556
+ }
2557
+ },
2558
+ {
2559
+ "if": {
2560
+ "properties": {
2561
+ "type": {
2562
+ "const": "CHILD_RUN_TIMED_OUT"
2563
+ }
2564
+ },
2565
+ "required": [
2566
+ "type"
2567
+ ]
2568
+ },
2569
+ "then": {
2570
+ "properties": {
2571
+ "payload": {
2572
+ "$ref": "#/$defs/payload_CHILD_RUN_TIMED_OUT"
2573
+ }
2574
+ }
2575
+ }
2576
+ },
2577
+ {
2578
+ "if": {
2579
+ "properties": {
2580
+ "type": {
2581
+ "const": "EXTERNAL_RUN_CANCEL_REQUESTED"
2582
+ }
2583
+ },
2584
+ "required": [
2585
+ "type"
2586
+ ]
2587
+ },
2588
+ "then": {
2589
+ "properties": {
2590
+ "payload": {
2591
+ "$ref": "#/$defs/payload_EXTERNAL_RUN_CANCEL_REQUESTED"
2592
+ }
2593
+ }
2594
+ }
2595
+ },
2596
+ {
2597
+ "if": {
2598
+ "properties": {
2599
+ "type": {
2600
+ "const": "EXTERNAL_RUN_CANCEL_RESOLVED"
2601
+ }
2602
+ },
2603
+ "required": [
2604
+ "type"
2605
+ ]
2606
+ },
2607
+ "then": {
2608
+ "properties": {
2609
+ "payload": {
2610
+ "$ref": "#/$defs/payload_EXTERNAL_RUN_CANCEL_RESOLVED"
2611
+ }
2612
+ }
2613
+ }
2614
+ },
2615
+ {
2616
+ "if": {
2617
+ "properties": {
2618
+ "type": {
2619
+ "const": "EXTERNAL_RUN_SIGNALED"
2620
+ }
2621
+ },
2622
+ "required": [
2623
+ "type"
2624
+ ]
2625
+ },
2626
+ "then": {
2627
+ "properties": {
2628
+ "payload": {
2629
+ "$ref": "#/$defs/payload_EXTERNAL_RUN_SIGNALED"
2630
+ }
2631
+ }
2632
+ }
2633
+ },
2634
+ {
2635
+ "if": {
2636
+ "properties": {
2637
+ "type": {
2638
+ "const": "SIDE_EFFECT_RECORDED"
2639
+ }
2640
+ },
2641
+ "required": [
2642
+ "type"
2643
+ ]
2644
+ },
2645
+ "then": {
2646
+ "properties": {
2647
+ "payload": {
2648
+ "$ref": "#/$defs/payload_SIDE_EFFECT_RECORDED"
2649
+ }
2650
+ }
2651
+ }
2652
+ },
2653
+ {
2654
+ "if": {
2655
+ "properties": {
2656
+ "type": {
2657
+ "const": "LOCAL_ACTIVITY_COMPLETED"
2658
+ }
2659
+ },
2660
+ "required": [
2661
+ "type"
2662
+ ]
2663
+ },
2664
+ "then": {
2665
+ "properties": {
2666
+ "payload": {
2667
+ "$ref": "#/$defs/payload_LOCAL_ACTIVITY_COMPLETED"
2668
+ }
2669
+ }
2670
+ }
2671
+ },
2672
+ {
2673
+ "if": {
2674
+ "properties": {
2675
+ "type": {
2676
+ "const": "LOCAL_ACTIVITY_FAILED"
2677
+ }
2678
+ },
2679
+ "required": [
2680
+ "type"
2681
+ ]
2682
+ },
2683
+ "then": {
2684
+ "properties": {
2685
+ "payload": {
2686
+ "$ref": "#/$defs/payload_LOCAL_ACTIVITY_FAILED"
2687
+ }
2688
+ }
2689
+ }
2690
+ },
2691
+ {
2692
+ "if": {
2693
+ "properties": {
2694
+ "type": {
2695
+ "const": "SEARCH_ATTRIBUTES_UPSERTED"
2696
+ }
2697
+ },
2698
+ "required": [
2699
+ "type"
2700
+ ]
2701
+ },
2702
+ "then": {
2703
+ "properties": {
2704
+ "payload": {
2705
+ "$ref": "#/$defs/payload_SEARCH_ATTRIBUTES_UPSERTED"
2706
+ }
2707
+ }
2708
+ }
2709
+ },
2710
+ {
2711
+ "if": {
2712
+ "properties": {
2713
+ "type": {
2714
+ "const": "CONTEXT_UPSERTED"
2715
+ }
2716
+ },
2717
+ "required": [
2718
+ "type"
2719
+ ]
2720
+ },
2721
+ "then": {
2722
+ "properties": {
2723
+ "payload": {
2724
+ "$ref": "#/$defs/payload_CONTEXT_UPSERTED"
2725
+ }
2726
+ }
2727
+ }
2728
+ },
2729
+ {
2730
+ "if": {
2731
+ "properties": {
2732
+ "type": {
2733
+ "const": "MARKER_RECORDED"
2734
+ }
2735
+ },
2736
+ "required": [
2737
+ "type"
2738
+ ]
2739
+ },
2740
+ "then": {
2741
+ "properties": {
2742
+ "payload": {
2743
+ "$ref": "#/$defs/payload_MARKER_RECORDED"
2744
+ }
2745
+ }
2746
+ }
2747
+ },
2748
+ {
2749
+ "if": {
2750
+ "properties": {
2751
+ "type": {
2752
+ "const": "WORKFLOW_CANCEL_REQUESTED"
2753
+ }
2754
+ },
2755
+ "required": [
2756
+ "type"
2757
+ ]
2758
+ },
2759
+ "then": {
2760
+ "properties": {
2761
+ "payload": {
2762
+ "$ref": "#/$defs/payload_WORKFLOW_CANCEL_REQUESTED"
2763
+ }
2764
+ }
2765
+ }
2766
+ },
2767
+ {
2768
+ "if": {
2769
+ "properties": {
2770
+ "type": {
2771
+ "const": "WORKFLOW_RESET"
2772
+ }
2773
+ },
2774
+ "required": [
2775
+ "type"
2776
+ ]
2777
+ },
2778
+ "then": {
2779
+ "properties": {
2780
+ "payload": {
2781
+ "$ref": "#/$defs/payload_WORKFLOW_RESET"
2782
+ }
2783
+ }
2784
+ }
2785
+ },
2786
+ {
2787
+ "if": {
2788
+ "properties": {
2789
+ "type": {
2790
+ "const": "VERSIONING_OVERRIDE_SET"
2791
+ }
2792
+ },
2793
+ "required": [
2794
+ "type"
2795
+ ]
2796
+ },
2797
+ "then": {
2798
+ "properties": {
2799
+ "payload": {
2800
+ "$ref": "#/$defs/payload_VERSIONING_OVERRIDE_SET"
2801
+ }
2802
+ }
2803
+ }
2804
+ },
2805
+ {
2806
+ "if": {
2807
+ "properties": {
2808
+ "type": {
2809
+ "const": "WORKFLOW_COMPLETED"
2810
+ }
2811
+ },
2812
+ "required": [
2813
+ "type"
2814
+ ]
2815
+ },
2816
+ "then": {
2817
+ "properties": {
2818
+ "payload": {
2819
+ "$ref": "#/$defs/payload_WORKFLOW_COMPLETED"
2820
+ }
2821
+ }
2822
+ }
2823
+ },
2824
+ {
2825
+ "if": {
2826
+ "properties": {
2827
+ "type": {
2828
+ "const": "WORKFLOW_FAILED"
2829
+ }
2830
+ },
2831
+ "required": [
2832
+ "type"
2833
+ ]
2834
+ },
2835
+ "then": {
2836
+ "properties": {
2837
+ "payload": {
2838
+ "$ref": "#/$defs/payload_WORKFLOW_FAILED"
2839
+ }
2840
+ }
2841
+ }
2842
+ },
2843
+ {
2844
+ "if": {
2845
+ "properties": {
2846
+ "type": {
2847
+ "const": "WORKFLOW_CANCELLED"
2848
+ }
2849
+ },
2850
+ "required": [
2851
+ "type"
2852
+ ]
2853
+ },
2854
+ "then": {
2855
+ "properties": {
2856
+ "payload": {
2857
+ "$ref": "#/$defs/payload_WORKFLOW_CANCELLED"
2858
+ }
2859
+ }
2860
+ }
2861
+ },
2862
+ {
2863
+ "if": {
2864
+ "properties": {
2865
+ "type": {
2866
+ "const": "WORKFLOW_TERMINATED"
2867
+ }
2868
+ },
2869
+ "required": [
2870
+ "type"
2871
+ ]
2872
+ },
2873
+ "then": {
2874
+ "properties": {
2875
+ "payload": {
2876
+ "$ref": "#/$defs/payload_WORKFLOW_TERMINATED"
2877
+ }
2878
+ }
2879
+ }
2880
+ },
2881
+ {
2882
+ "if": {
2883
+ "properties": {
2884
+ "type": {
2885
+ "const": "WORKFLOW_TIMED_OUT"
2886
+ }
2887
+ },
2888
+ "required": [
2889
+ "type"
2890
+ ]
2891
+ },
2892
+ "then": {
2893
+ "properties": {
2894
+ "payload": {
2895
+ "$ref": "#/$defs/payload_WORKFLOW_TIMED_OUT"
2896
+ }
2897
+ }
2898
+ }
2899
+ },
2900
+ {
2901
+ "if": {
2902
+ "properties": {
2903
+ "type": {
2904
+ "const": "WORKFLOW_CONTINUED_AS_NEW"
2905
+ }
2906
+ },
2907
+ "required": [
2908
+ "type"
2909
+ ]
2910
+ },
2911
+ "then": {
2912
+ "properties": {
2913
+ "payload": {
2914
+ "$ref": "#/$defs/payload_WORKFLOW_CONTINUED_AS_NEW"
2915
+ }
2916
+ }
2917
+ }
2918
+ }
2919
+ ]
2920
+ },
2921
+ "command": {
2922
+ "type": "object",
2923
+ "required": [
2924
+ "type"
2925
+ ],
2926
+ "properties": {
2927
+ "type": {
2928
+ "enum": [
2929
+ "SCHEDULE_ACTIVITY",
2930
+ "REQUEST_CANCEL_ACTIVITY",
2931
+ "START_TIMER",
2932
+ "CANCEL_TIMER",
2933
+ "START_CHILD_RUN",
2934
+ "SIGNAL_RUN",
2935
+ "RECORD_SIDE_EFFECT",
2936
+ "RECORD_MARKER",
2937
+ "COMPLETE_WORKFLOW",
2938
+ "FAIL_WORKFLOW",
2939
+ "CANCEL_WORKFLOW",
2940
+ "UPSERT_CONTEXT",
2941
+ "RECORD_LOCAL_ACTIVITY",
2942
+ "CONTINUE_AS_NEW",
2943
+ "REQUEST_CANCEL_EXTERNAL_RUN",
2944
+ "UPSERT_SEARCH_ATTRIBUTES",
2945
+ "ACCEPT_UPDATE",
2946
+ "REJECT_UPDATE",
2947
+ "COMPLETE_UPDATE"
2948
+ ]
2949
+ }
2950
+ },
2951
+ "allOf": [
2952
+ {
2953
+ "if": {
2954
+ "properties": {
2955
+ "type": {
2956
+ "const": "SCHEDULE_ACTIVITY"
2957
+ }
2958
+ },
2959
+ "required": [
2960
+ "type"
2961
+ ]
2962
+ },
2963
+ "then": {
2964
+ "$ref": "#/$defs/command_SCHEDULE_ACTIVITY"
2965
+ }
2966
+ },
2967
+ {
2968
+ "if": {
2969
+ "properties": {
2970
+ "type": {
2971
+ "const": "REQUEST_CANCEL_ACTIVITY"
2972
+ }
2973
+ },
2974
+ "required": [
2975
+ "type"
2976
+ ]
2977
+ },
2978
+ "then": {
2979
+ "$ref": "#/$defs/command_REQUEST_CANCEL_ACTIVITY"
2980
+ }
2981
+ },
2982
+ {
2983
+ "if": {
2984
+ "properties": {
2985
+ "type": {
2986
+ "const": "START_TIMER"
2987
+ }
2988
+ },
2989
+ "required": [
2990
+ "type"
2991
+ ]
2992
+ },
2993
+ "then": {
2994
+ "$ref": "#/$defs/command_START_TIMER"
2995
+ }
2996
+ },
2997
+ {
2998
+ "if": {
2999
+ "properties": {
3000
+ "type": {
3001
+ "const": "CANCEL_TIMER"
3002
+ }
3003
+ },
3004
+ "required": [
3005
+ "type"
3006
+ ]
3007
+ },
3008
+ "then": {
3009
+ "$ref": "#/$defs/command_CANCEL_TIMER"
3010
+ }
3011
+ },
3012
+ {
3013
+ "if": {
3014
+ "properties": {
3015
+ "type": {
3016
+ "const": "START_CHILD_RUN"
3017
+ }
3018
+ },
3019
+ "required": [
3020
+ "type"
3021
+ ]
3022
+ },
3023
+ "then": {
3024
+ "$ref": "#/$defs/command_START_CHILD_RUN"
3025
+ }
3026
+ },
3027
+ {
3028
+ "if": {
3029
+ "properties": {
3030
+ "type": {
3031
+ "const": "SIGNAL_RUN"
3032
+ }
3033
+ },
3034
+ "required": [
3035
+ "type"
3036
+ ]
3037
+ },
3038
+ "then": {
3039
+ "$ref": "#/$defs/command_SIGNAL_RUN"
3040
+ }
3041
+ },
3042
+ {
3043
+ "if": {
3044
+ "properties": {
3045
+ "type": {
3046
+ "const": "RECORD_SIDE_EFFECT"
3047
+ }
3048
+ },
3049
+ "required": [
3050
+ "type"
3051
+ ]
3052
+ },
3053
+ "then": {
3054
+ "$ref": "#/$defs/command_RECORD_SIDE_EFFECT"
3055
+ }
3056
+ },
3057
+ {
3058
+ "if": {
3059
+ "properties": {
3060
+ "type": {
3061
+ "const": "RECORD_MARKER"
3062
+ }
3063
+ },
3064
+ "required": [
3065
+ "type"
3066
+ ]
3067
+ },
3068
+ "then": {
3069
+ "$ref": "#/$defs/command_RECORD_MARKER"
3070
+ }
3071
+ },
3072
+ {
3073
+ "if": {
3074
+ "properties": {
3075
+ "type": {
3076
+ "const": "COMPLETE_WORKFLOW"
3077
+ }
3078
+ },
3079
+ "required": [
3080
+ "type"
3081
+ ]
3082
+ },
3083
+ "then": {
3084
+ "$ref": "#/$defs/command_COMPLETE_WORKFLOW"
3085
+ }
3086
+ },
3087
+ {
3088
+ "if": {
3089
+ "properties": {
3090
+ "type": {
3091
+ "const": "FAIL_WORKFLOW"
3092
+ }
3093
+ },
3094
+ "required": [
3095
+ "type"
3096
+ ]
3097
+ },
3098
+ "then": {
3099
+ "$ref": "#/$defs/command_FAIL_WORKFLOW"
3100
+ }
3101
+ },
3102
+ {
3103
+ "if": {
3104
+ "properties": {
3105
+ "type": {
3106
+ "const": "CANCEL_WORKFLOW"
3107
+ }
3108
+ },
3109
+ "required": [
3110
+ "type"
3111
+ ]
3112
+ },
3113
+ "then": {
3114
+ "$ref": "#/$defs/command_CANCEL_WORKFLOW"
3115
+ }
3116
+ },
3117
+ {
3118
+ "if": {
3119
+ "properties": {
3120
+ "type": {
3121
+ "const": "UPSERT_CONTEXT"
3122
+ }
3123
+ },
3124
+ "required": [
3125
+ "type"
3126
+ ]
3127
+ },
3128
+ "then": {
3129
+ "$ref": "#/$defs/command_UPSERT_CONTEXT"
3130
+ }
3131
+ },
3132
+ {
3133
+ "if": {
3134
+ "properties": {
3135
+ "type": {
3136
+ "const": "RECORD_LOCAL_ACTIVITY"
3137
+ }
3138
+ },
3139
+ "required": [
3140
+ "type"
3141
+ ]
3142
+ },
3143
+ "then": {
3144
+ "$ref": "#/$defs/command_RECORD_LOCAL_ACTIVITY"
3145
+ }
3146
+ },
3147
+ {
3148
+ "if": {
3149
+ "properties": {
3150
+ "type": {
3151
+ "const": "CONTINUE_AS_NEW"
3152
+ }
3153
+ },
3154
+ "required": [
3155
+ "type"
3156
+ ]
3157
+ },
3158
+ "then": {
3159
+ "$ref": "#/$defs/command_CONTINUE_AS_NEW"
3160
+ }
3161
+ },
3162
+ {
3163
+ "if": {
3164
+ "properties": {
3165
+ "type": {
3166
+ "const": "REQUEST_CANCEL_EXTERNAL_RUN"
3167
+ }
3168
+ },
3169
+ "required": [
3170
+ "type"
3171
+ ]
3172
+ },
3173
+ "then": {
3174
+ "$ref": "#/$defs/command_REQUEST_CANCEL_EXTERNAL_RUN"
3175
+ }
3176
+ },
3177
+ {
3178
+ "if": {
3179
+ "properties": {
3180
+ "type": {
3181
+ "const": "UPSERT_SEARCH_ATTRIBUTES"
3182
+ }
3183
+ },
3184
+ "required": [
3185
+ "type"
3186
+ ]
3187
+ },
3188
+ "then": {
3189
+ "$ref": "#/$defs/command_UPSERT_SEARCH_ATTRIBUTES"
3190
+ }
3191
+ },
3192
+ {
3193
+ "if": {
3194
+ "properties": {
3195
+ "type": {
3196
+ "const": "ACCEPT_UPDATE"
3197
+ }
3198
+ },
3199
+ "required": [
3200
+ "type"
3201
+ ]
3202
+ },
3203
+ "then": {
3204
+ "$ref": "#/$defs/command_ACCEPT_UPDATE"
3205
+ }
3206
+ },
3207
+ {
3208
+ "if": {
3209
+ "properties": {
3210
+ "type": {
3211
+ "const": "REJECT_UPDATE"
3212
+ }
3213
+ },
3214
+ "required": [
3215
+ "type"
3216
+ ]
3217
+ },
3218
+ "then": {
3219
+ "$ref": "#/$defs/command_REJECT_UPDATE"
3220
+ }
3221
+ },
3222
+ {
3223
+ "if": {
3224
+ "properties": {
3225
+ "type": {
3226
+ "const": "COMPLETE_UPDATE"
3227
+ }
3228
+ },
3229
+ "required": [
3230
+ "type"
3231
+ ]
3232
+ },
3233
+ "then": {
3234
+ "$ref": "#/$defs/command_COMPLETE_UPDATE"
3235
+ }
3236
+ }
3237
+ ]
3238
+ },
3239
+ "info": {
3240
+ "type": "object",
3241
+ "required": [
3242
+ "runId",
3243
+ "workspaceId"
3244
+ ],
3245
+ "properties": {
3246
+ "runId": {
3247
+ "type": "string",
3248
+ "minLength": 1,
3249
+ "maxLength": 256
3250
+ },
3251
+ "workspaceId": {
3252
+ "type": "string",
3253
+ "minLength": 1,
3254
+ "maxLength": 256
3255
+ },
3256
+ "workflowKey": {
3257
+ "type": "string"
3258
+ },
3259
+ "version": {},
3260
+ "buildId": {
3261
+ "type": "string"
3262
+ },
3263
+ "businessId": {
3264
+ "type": "string"
3265
+ },
3266
+ "attempt": {
3267
+ "type": "integer",
3268
+ "minimum": 1
3269
+ },
3270
+ "taskQueue": {
3271
+ "type": "string"
3272
+ },
3273
+ "parentRunId": {
3274
+ "type": [
3275
+ "string",
3276
+ "null"
3277
+ ]
3278
+ },
3279
+ "rootRunId": {
3280
+ "type": [
3281
+ "string",
3282
+ "null"
3283
+ ]
3284
+ },
3285
+ "firstRunId": {
3286
+ "type": [
3287
+ "string",
3288
+ "null"
3289
+ ]
3290
+ },
3291
+ "continuedFromRunId": {
3292
+ "type": [
3293
+ "string",
3294
+ "null"
3295
+ ]
3296
+ },
3297
+ "lastResult": {},
3298
+ "lastFailure": {
3299
+ "oneOf": [
3300
+ {
3301
+ "type": "null"
3302
+ },
3303
+ {
3304
+ "$ref": "#/$defs/failure"
3305
+ }
3306
+ ]
3307
+ },
3308
+ "startedAt": {
3309
+ "type": "string"
3310
+ },
3311
+ "runStartedAt": {
3312
+ "type": "string"
3313
+ },
3314
+ "historyLimit": {
3315
+ "type": "object",
3316
+ "required": [
3317
+ "events",
3318
+ "bytes"
3319
+ ],
3320
+ "properties": {
3321
+ "events": {
3322
+ "type": "integer",
3323
+ "minimum": 1
3324
+ },
3325
+ "bytes": {
3326
+ "type": "integer",
3327
+ "minimum": 1
3328
+ }
3329
+ }
3330
+ },
3331
+ "timeouts": {
3332
+ "type": "object"
3333
+ },
3334
+ "headers": {
3335
+ "$ref": "#/$defs/headers"
3336
+ },
3337
+ "priority": {
3338
+ "type": "integer",
3339
+ "minimum": 1,
3340
+ "maximum": 5
3341
+ },
3342
+ "summary": {
3343
+ "type": "string"
3344
+ },
3345
+ "details": {
3346
+ "type": "string"
3347
+ },
3348
+ "context": {
3349
+ "type": "object"
3350
+ }
3351
+ }
3352
+ },
3353
+ "request": {
3354
+ "type": "object",
3355
+ "required": [
3356
+ "protocol",
3357
+ "kind",
3358
+ "workflowFn",
3359
+ "info",
3360
+ "history",
3361
+ "nowMs"
3362
+ ],
3363
+ "properties": {
3364
+ "protocol": {
3365
+ "const": 1
3366
+ },
3367
+ "kind": {
3368
+ "enum": [
3369
+ "task",
3370
+ "query",
3371
+ "verify"
3372
+ ]
3373
+ },
3374
+ "workflowFn": {
3375
+ "type": "string",
3376
+ "minLength": 1,
3377
+ "maxLength": 256
3378
+ },
3379
+ "info": {
3380
+ "$ref": "#/$defs/info"
3381
+ },
3382
+ "history": {
3383
+ "type": "array",
3384
+ "items": {
3385
+ "$ref": "#/$defs/event"
3386
+ }
3387
+ },
3388
+ "nowMs": {
3389
+ "type": "number"
3390
+ },
3391
+ "localActivityResults": {
3392
+ "type": "array",
3393
+ "items": {
3394
+ "type": "object",
3395
+ "required": [
3396
+ "localActivityId",
3397
+ "attempts"
3398
+ ],
3399
+ "properties": {
3400
+ "localActivityId": {
3401
+ "type": "string",
3402
+ "minLength": 1,
3403
+ "maxLength": 256
3404
+ },
3405
+ "result": {},
3406
+ "failure": {
3407
+ "$ref": "#/$defs/failure"
3408
+ },
3409
+ "attempts": {
3410
+ "type": "integer",
3411
+ "minimum": 1
3412
+ }
3413
+ }
3414
+ }
3415
+ },
3416
+ "queries": {
3417
+ "type": "array",
3418
+ "items": {
3419
+ "type": "object",
3420
+ "required": [
3421
+ "queryId",
3422
+ "name"
3423
+ ],
3424
+ "properties": {
3425
+ "queryId": {
3426
+ "type": "string",
3427
+ "minLength": 1,
3428
+ "maxLength": 256
3429
+ },
3430
+ "name": {
3431
+ "enum": [
3432
+ "__stack_trace",
3433
+ "__enhanced_stack_trace",
3434
+ "__metadata"
3435
+ ]
3436
+ },
3437
+ "args": {}
3438
+ }
3439
+ }
3440
+ }
3441
+ }
3442
+ },
3443
+ "result": {
3444
+ "type": "object",
3445
+ "required": [
3446
+ "protocol",
3447
+ "outcome",
3448
+ "commands",
3449
+ "logs"
3450
+ ],
3451
+ "properties": {
3452
+ "protocol": {
3453
+ "const": 1
3454
+ },
3455
+ "outcome": {
3456
+ "enum": [
3457
+ "commands",
3458
+ "failed",
3459
+ "localActivityRequested"
3460
+ ]
3461
+ },
3462
+ "commands": {
3463
+ "type": "array",
3464
+ "items": {
3465
+ "$ref": "#/$defs/command"
3466
+ }
3467
+ },
3468
+ "localActivityRequests": {
3469
+ "type": "array",
3470
+ "items": {
3471
+ "type": "object"
3472
+ }
3473
+ },
3474
+ "queryResults": {
3475
+ "type": "array",
3476
+ "items": {
3477
+ "type": "object",
3478
+ "required": [
3479
+ "queryId"
3480
+ ],
3481
+ "properties": {
3482
+ "queryId": {
3483
+ "type": "string",
3484
+ "minLength": 1,
3485
+ "maxLength": 256
3486
+ },
3487
+ "value": {},
3488
+ "error": {
3489
+ "type": "string"
3490
+ }
3491
+ }
3492
+ }
3493
+ },
3494
+ "failure": {
3495
+ "type": "object",
3496
+ "required": [
3497
+ "cause",
3498
+ "message"
3499
+ ],
3500
+ "properties": {
3501
+ "cause": {
3502
+ "enum": [
3503
+ "NON_DETERMINISM",
3504
+ "TASK_TIMEOUT",
3505
+ "ISOLATE_MEMORY",
3506
+ "PROTOCOL_MISMATCH",
3507
+ "BUNDLE_UNAVAILABLE",
3508
+ "BUNDLE_INTEGRITY",
3509
+ "WORKFLOW_CODE_ERROR",
3510
+ "HISTORY_LIMIT",
3511
+ "UNSUPPORTED_COMMAND",
3512
+ "INVALID_REQUEST",
3513
+ "INTERNAL"
3514
+ ]
3515
+ },
3516
+ "message": {
3517
+ "type": "string"
3518
+ },
3519
+ "stackTrace": {
3520
+ "type": "string"
3521
+ },
3522
+ "seq": {
3523
+ "type": "integer"
3524
+ },
3525
+ "errorType": {
3526
+ "type": "string"
3527
+ }
3528
+ }
3529
+ },
3530
+ "logs": {
3531
+ "type": "array",
3532
+ "items": {
3533
+ "type": "object",
3534
+ "required": [
3535
+ "level",
3536
+ "message"
3537
+ ],
3538
+ "properties": {
3539
+ "level": {
3540
+ "enum": [
3541
+ "debug",
3542
+ "info",
3543
+ "warn",
3544
+ "error"
3545
+ ]
3546
+ },
3547
+ "message": {
3548
+ "type": "string"
3549
+ },
3550
+ "data": {}
3551
+ }
3552
+ }
3553
+ },
3554
+ "stackTrace": {
3555
+ "type": "string"
3556
+ }
3557
+ }
3558
+ }
3559
+ }
3560
+ }