@fluidgrids/workflows 2026.1028.2 → 2026.1030.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 (154) hide show
  1. package/README.md +181 -11
  2. package/dist/{activation-BBh1p82z.d.cts → activation-DqUfpHzk.d.cts} +1 -1
  3. package/dist/{activation-DnhG7SmF.d.ts → activation-xpx1oWuo.d.ts} +1 -1
  4. package/dist/{chunk-VRHHBPT6.js → chunk-2D3MYIIF.js} +1212 -128
  5. package/dist/chunk-3U2NU7YC.cjs +124 -0
  6. package/dist/{chunk-NEIUQASE.cjs → chunk-4QKB4ARC.cjs} +3 -3
  7. package/dist/{chunk-GBQ33SIZ.cjs → chunk-54FLQNUM.cjs} +12 -1
  8. package/dist/chunk-5HIVIV53.js +330 -0
  9. package/dist/chunk-5MFVJM76.js +1222 -0
  10. package/dist/{chunk-JD2VQIDZ.cjs → chunk-672KMMBK.cjs} +2 -2
  11. package/dist/{chunk-C5OLWZ42.js → chunk-6A2FGSUS.js} +22 -14
  12. package/dist/{chunk-XKJA7KX3.js → chunk-6OLN6BMB.js} +52 -3
  13. package/dist/{chunk-6FSHT5IL.js → chunk-7EZIANC7.js} +1 -1
  14. package/dist/{chunk-2J6TF7YI.cjs → chunk-A5SXCA62.cjs} +10 -3
  15. package/dist/{chunk-BO6OVILK.js → chunk-AC6ZEXVR.js} +10 -4
  16. package/dist/{chunk-ABFZWYHT.js → chunk-AE5Q6ZAJ.js} +315 -50
  17. package/dist/chunk-C4F5KJTI.js +293 -0
  18. package/dist/{chunk-IISBRUWJ.js → chunk-G5H32GIG.js} +1 -1
  19. package/dist/chunk-GEQDGUGB.cjs +2719 -0
  20. package/dist/{chunk-XHXIDVEC.js → chunk-HCM7ZC7Q.js} +1 -1
  21. package/dist/chunk-HMZUGSMU.cjs +1554 -0
  22. package/dist/{chunk-SAOBPYYJ.cjs → chunk-IQPXHQQQ.cjs} +8 -4
  23. package/dist/{chunk-P6TA5EZT.cjs → chunk-ISOIA7NV.cjs} +335 -58
  24. package/dist/chunk-JSC75O5C.cjs +167 -0
  25. package/dist/chunk-M272AHEX.js +25 -0
  26. package/dist/{chunk-BD7ZPG53.js → chunk-NWQ5WRLE.js} +10 -2
  27. package/dist/chunk-ODZ2IAR2.cjs +1247 -0
  28. package/dist/chunk-Q4MWQNJK.cjs +28 -0
  29. package/dist/{chunk-HWJZVOG7.js → chunk-SR7TR5KX.js} +6 -2
  30. package/dist/{chunk-FEW3JBYA.cjs → chunk-TCTE7DX5.cjs} +3 -3
  31. package/dist/{chunk-623FVQSN.cjs → chunk-TYF56RGB.cjs} +123 -0
  32. package/dist/chunk-VA4OFR72.cjs +324 -0
  33. package/dist/chunk-VU5S5A7V.js +150 -0
  34. package/dist/chunk-YEHR4NNE.js +1522 -0
  35. package/dist/{chunk-FMSW2HDF.cjs → chunk-ZCGKGDCL.cjs} +23 -15
  36. package/dist/codegen/index.d.cts +2 -2
  37. package/dist/codegen/index.d.ts +2 -2
  38. package/dist/collect-6NIEufHd.d.ts +103 -0
  39. package/dist/collect-CcTCKqx6.d.cts +103 -0
  40. package/dist/{file-BOoHZgoQ.d.cts → file-BxYpwjRQ.d.cts} +1007 -21
  41. package/dist/{file-yuPCFU5b.d.ts → file-CFdPQJI9.d.ts} +1007 -21
  42. package/dist/history/index.cjs +375 -86
  43. package/dist/history/index.d.cts +590 -12
  44. package/dist/history/index.d.ts +590 -12
  45. package/dist/history/index.js +50 -4
  46. package/dist/index.cjs +156 -50
  47. package/dist/index.d.cts +38 -58
  48. package/dist/index.d.ts +38 -58
  49. package/dist/index.js +6 -4
  50. package/dist/interceptors-CNcr2dlk.d.ts +159 -0
  51. package/dist/interceptors-CqkNZVfI.d.cts +159 -0
  52. package/dist/ir/index.cjs +362 -38
  53. package/dist/ir/index.d.cts +282 -7
  54. package/dist/ir/index.d.ts +282 -7
  55. package/dist/ir/index.js +329 -23
  56. package/dist/{lower-BzmUz0sq.d.cts → lower-BtRfIW2A.d.cts} +56 -8
  57. package/dist/{lower-_-iT4HYs.d.ts → lower-CpsMFOFX.d.ts} +56 -8
  58. package/dist/{manifest-C8N6HDYl.d.ts → manifest-D-I_twys.d.ts} +1 -1
  59. package/dist/{manifest-0OLw0i7k.d.cts → manifest-DahBQVM8.d.cts} +1 -1
  60. package/dist/node-evaluator-DGQDPSPI.cjs +24 -0
  61. package/dist/node-evaluator-LEEVD7H7.js +14 -0
  62. package/dist/payload-fields-BVRQn2yH.d.cts +122 -0
  63. package/dist/payload-fields-oOBWxDiG.d.ts +122 -0
  64. package/dist/quickjs/index.cjs +28 -27
  65. package/dist/quickjs/index.d.cts +6 -6
  66. package/dist/quickjs/index.d.ts +6 -6
  67. package/dist/quickjs/index.js +10 -9
  68. package/dist/roundtrip/index.cjs +259 -51
  69. package/dist/roundtrip/index.d.cts +100 -9
  70. package/dist/roundtrip/index.d.ts +100 -9
  71. package/dist/roundtrip/index.js +177 -11
  72. package/dist/runtime/index.cjs +21 -20
  73. package/dist/runtime/index.d.cts +184 -15
  74. package/dist/runtime/index.d.ts +184 -15
  75. package/dist/runtime/index.js +8 -7
  76. package/dist/testing/index.cjs +1122 -115
  77. package/dist/testing/index.d.cts +294 -13
  78. package/dist/testing/index.d.ts +294 -13
  79. package/dist/testing/index.js +1086 -84
  80. package/dist/{types-DV-HX_Gt.d.ts → types-Bv2i4cBX.d.cts} +244 -33
  81. package/dist/{types-CpBBjaGX.d.cts → types-DGx-b9eq.d.ts} +244 -33
  82. package/dist/{types-BGoPzgcl.d.ts → types-V7jEEUaL.d.cts} +20 -1
  83. package/dist/{types-BGoPzgcl.d.cts → types-V7jEEUaL.d.ts} +20 -1
  84. package/dist/{workflow-Bpr3vnA_.d.ts → workflow-B18OeF7g.d.ts} +2 -2
  85. package/dist/workflow-BGnv8SS6.d.ts +803 -0
  86. package/dist/{workflow-FXUkpIBc.d.cts → workflow-BJPFv3cp.d.cts} +2 -2
  87. package/dist/workflow-DS32Gtws.d.cts +803 -0
  88. package/fixtures/histories/activity-options-updated.history.json +159 -0
  89. package/fixtures/histories/activity-paused-unpaused.history.json +160 -0
  90. package/fixtures/histories/auto-upgrade-patched.history.json +276 -0
  91. package/fixtures/histories/benign-failure.history.json +146 -0
  92. package/fixtures/histories/cancel-activity-try-cancel.history.json +150 -0
  93. package/fixtures/histories/child-cancel-wait-requested.history.json +217 -0
  94. package/fixtures/histories/child-options-roundtrip.history.json +192 -0
  95. package/fixtures/histories/codec-opaque.history.json +229 -0
  96. package/fixtures/histories/continue-as-new-last-result.history.json +86 -0
  97. package/fixtures/histories/continue-as-new-options.history.json +99 -0
  98. package/fixtures/histories/continue-as-new-r1-long-task-queue.history.json +78 -0
  99. package/fixtures/histories/continue-as-new-r1-retry-options.history.json +83 -0
  100. package/fixtures/histories/dynamic-workflow.history.json +150 -0
  101. package/fixtures/histories/execution-timeout-chain.history.json +98 -0
  102. package/fixtures/histories/external-cancel-resolved.history.json +123 -0
  103. package/fixtures/histories/external-cancel-unknown-target.history.json +127 -0
  104. package/fixtures/histories/failure-error-types-fails-run.history.json +144 -0
  105. package/fixtures/histories/handler-drain-warn.history.json +222 -0
  106. package/fixtures/histories/heartbeat-details-on-retry.history.json +145 -0
  107. package/fixtures/histories/interceptor-headers.history.json +339 -0
  108. package/fixtures/histories/local-activity-abandoned-at-completion.history.json +73 -0
  109. package/fixtures/histories/local-activity-cancelled-in-scope.history.json +118 -0
  110. package/fixtures/histories/local-activity-completed.history.json +157 -0
  111. package/fixtures/histories/local-activity-failed.history.json +93 -0
  112. package/fixtures/histories/local-activity-retry-in-task.history.json +88 -0
  113. package/fixtures/histories/query-custom.history.json +213 -0
  114. package/fixtures/histories/query-default-handler.history.json +120 -0
  115. package/fixtures/histories/reset-forked-reapplied-signals.history.json +239 -0
  116. package/fixtures/histories/reset-reapplied-update-admitted.history.json +228 -0
  117. package/fixtures/histories/run-retry-last-failure.history.json +90 -0
  118. package/fixtures/histories/run-timeout.history.json +159 -0
  119. package/fixtures/histories/schedule-to-start-timeout.history.json +132 -0
  120. package/fixtures/histories/search-attributes-upserted.history.json +177 -0
  121. package/fixtures/histories/start-delay-signal-ends-delay.history.json +155 -0
  122. package/fixtures/histories/typeerror-task-retry-100.history.json +137 -0
  123. package/fixtures/histories/update-accepted-completed.history.json +45 -30
  124. package/fixtures/histories/update-default-handler.history.json +246 -0
  125. package/fixtures/histories/update-handler-awaits-activity.history.json +196 -0
  126. package/fixtures/histories/update-not-handled.history.json +138 -0
  127. package/fixtures/histories/update-rejected-no-event.history.json +190 -0
  128. package/fixtures/histories/update-with-start-admitted.history.json +150 -0
  129. package/fixtures/histories/user-activity-cancel.history.json +149 -0
  130. package/fixtures/histories/user-activity-retry.history.json +143 -0
  131. package/fixtures/histories/user-activity.history.json +149 -0
  132. package/package.json +1 -1
  133. package/schema/bridge-v2.schema.json +1062 -0
  134. package/schema/history-file.schema.json +538 -83
  135. package/schema/ir-v2.schema.json +290 -0
  136. package/schema/payload-fields.json +162 -0
  137. package/schema/run-event.schema.json +503 -82
  138. package/schema/workflow-command.schema.json +372 -69
  139. package/schema/workflow-task.schema.json +924 -171
  140. package/dist/assemble-BLqQ8lSu.d.cts +0 -39
  141. package/dist/assemble-DWgaXHd-.d.ts +0 -39
  142. package/dist/chunk-DHTLALBL.cjs +0 -80
  143. package/dist/chunk-DJYMDLV5.js +0 -227
  144. package/dist/chunk-I5LR3D2K.js +0 -869
  145. package/dist/chunk-M4BBAERY.cjs +0 -1635
  146. package/dist/chunk-N23SKIG4.js +0 -73
  147. package/dist/chunk-PZCVF76Q.cjs +0 -868
  148. package/dist/chunk-QQ6ULXHI.cjs +0 -885
  149. package/dist/chunk-UK3WM7YZ.cjs +0 -75
  150. package/dist/chunk-VOKMAAJP.js +0 -848
  151. package/dist/node-evaluator-4MSDKWOG.cjs +0 -22
  152. package/dist/node-evaluator-SX4LEYQC.js +0 -12
  153. package/dist/workflow-C2a05WUJ.d.ts +0 -444
  154. package/dist/workflow-J-yYixny.d.cts +0 -444
@@ -37,7 +37,7 @@
37
37
  },
38
38
  "replay": {
39
39
  "type": "boolean",
40
- "description": "False for histories that use Phase C features (updates); they are parsed and projected but not replayed."
40
+ "description": "False for histories that are parsed and projected but not replayed (written by hand for a feature the recording runtime did not have)."
41
41
  },
42
42
  "info": {
43
43
  "$ref": "#/$defs/info"
@@ -205,6 +205,7 @@
205
205
  "workflowKey",
206
206
  "workflowId"
207
207
  ],
208
+ "description": "The open run of a workflow id, following its continue-as-new chain; firstRunId pins the chain (R2).",
208
209
  "properties": {
209
210
  "workflowKey": {
210
211
  "type": "string",
@@ -215,12 +216,82 @@
215
216
  "type": "string",
216
217
  "minLength": 1,
217
218
  "maxLength": 256
219
+ },
220
+ "firstRunId": {
221
+ "type": "string",
222
+ "minLength": 1,
223
+ "maxLength": 256
218
224
  }
219
225
  },
220
226
  "additionalProperties": false
221
227
  }
222
228
  ]
223
229
  },
230
+ "runRetryPolicy": {
231
+ "type": "object",
232
+ "required": [
233
+ "initialDelayMs"
234
+ ],
235
+ "description": "Run-level retry (11 §2.17), in milliseconds. maxAttempts counts every attempt; absent means unlimited, bounded by the execution timeout.",
236
+ "properties": {
237
+ "maxAttempts": {
238
+ "type": "integer",
239
+ "minimum": 1
240
+ },
241
+ "initialDelayMs": {
242
+ "type": "integer",
243
+ "minimum": 0
244
+ },
245
+ "backoffMultiplier": {
246
+ "type": "number",
247
+ "minimum": 1
248
+ },
249
+ "maxDelayMs": {
250
+ "type": "integer",
251
+ "minimum": 0
252
+ },
253
+ "retryOnErrorTypes": {
254
+ "type": "array",
255
+ "items": {
256
+ "enum": [
257
+ "TIMEOUT",
258
+ "TRANSIENT",
259
+ "DEPENDENCY",
260
+ "AUTHORIZATION",
261
+ "VALIDATION",
262
+ "PERMANENT",
263
+ "UNKNOWN"
264
+ ]
265
+ }
266
+ },
267
+ "nonRetryableErrorTypes": {
268
+ "type": "array",
269
+ "items": {
270
+ "type": "string"
271
+ }
272
+ }
273
+ },
274
+ "additionalProperties": false
275
+ },
276
+ "timeouts": {
277
+ "type": "object",
278
+ "description": "The three workflow timeouts (11 §2.20), in milliseconds.",
279
+ "properties": {
280
+ "executionTimeout": {
281
+ "type": "integer",
282
+ "minimum": 0
283
+ },
284
+ "runTimeout": {
285
+ "type": "integer",
286
+ "minimum": 0
287
+ },
288
+ "workflowTaskTimeout": {
289
+ "type": "integer",
290
+ "minimum": 0
291
+ }
292
+ },
293
+ "additionalProperties": false
294
+ },
224
295
  "childOptions": {
225
296
  "type": "object",
226
297
  "required": [
@@ -282,14 +353,119 @@
282
353
  "startDelay": {
283
354
  "type": "integer",
284
355
  "minimum": 0
356
+ },
357
+ "retry": {
358
+ "$ref": "#/$defs/runRetryPolicy"
359
+ },
360
+ "versioningBehavior": {
361
+ "enum": [
362
+ "PINNED",
363
+ "AUTO_UPGRADE"
364
+ ]
365
+ },
366
+ "idReusePolicy": {
367
+ "enum": [
368
+ "ALLOW_DUPLICATE",
369
+ "ALLOW_DUPLICATE_FAILED_ONLY",
370
+ "REJECT_DUPLICATE"
371
+ ]
372
+ },
373
+ "idConflictPolicy": {
374
+ "enum": [
375
+ "FAIL",
376
+ "USE_EXISTING",
377
+ "TERMINATE_EXISTING"
378
+ ]
379
+ },
380
+ "fairnessKey": {
381
+ "type": "string",
382
+ "minLength": 1,
383
+ "maxLength": 255,
384
+ "description": "Phase C: the fairness key of the task (11 §2.11); default the workspace id."
385
+ },
386
+ "fairnessWeight": {
387
+ "type": "number",
388
+ "minimum": 0.1,
389
+ "maximum": 10,
390
+ "description": "Phase C: the weight of the fairness key, 0.1 to 10 (default 1)."
285
391
  }
286
392
  }
287
393
  },
394
+ "legacyCanRetryPolicy": {
395
+ "type": "object",
396
+ "required": [
397
+ "retryDelay"
398
+ ],
399
+ "description": "The R1 activity-shaped CONTINUE_AS_NEW retry: whatever explicitRetryPolicy wrote from a Partial<RetryPolicy>, so numbers carry no integer or minimum constraint. It never had a meaning, and the service ignores it.",
400
+ "properties": {
401
+ "maxRetries": {
402
+ "type": "number"
403
+ },
404
+ "retryDelay": {
405
+ "type": "number"
406
+ },
407
+ "backoffMultiplier": {
408
+ "type": "number"
409
+ },
410
+ "maxDelay": {
411
+ "type": "number"
412
+ },
413
+ "retryOnErrorTypes": {
414
+ "type": "array",
415
+ "items": {
416
+ "type": "string"
417
+ }
418
+ },
419
+ "nonRetryableErrorTypes": {
420
+ "type": "array",
421
+ "items": {
422
+ "type": "string"
423
+ }
424
+ }
425
+ },
426
+ "additionalProperties": false
427
+ },
428
+ "canOptions": {
429
+ "type": "object",
430
+ "description": "Options of a CONTINUE_AS_NEW command (C-SCHEMA, frozen in R2). retry is the R2 run-retry policy of the new run, or the R1 activity shape (retryDelay, maxRetries, maxDelay) that R1 bundles wrote and R2 bundles still write for that shape: it never had a meaning, and the service ignores it instead of reading it as a run-retry policy.",
431
+ "properties": {
432
+ "taskQueue": {
433
+ "type": "string",
434
+ "minLength": 1,
435
+ "maxLength": 256
436
+ },
437
+ "retry": {
438
+ "oneOf": [
439
+ {
440
+ "$ref": "#/$defs/runRetryPolicy"
441
+ },
442
+ {
443
+ "$ref": "#/$defs/legacyCanRetryPolicy"
444
+ }
445
+ ]
446
+ },
447
+ "workflowTaskTimeout": {
448
+ "type": "integer",
449
+ "minimum": 0
450
+ },
451
+ "context": {
452
+ "type": "object"
453
+ },
454
+ "versioningBehavior": {
455
+ "enum": [
456
+ "PINNED",
457
+ "AUTO_UPGRADE"
458
+ ]
459
+ }
460
+ },
461
+ "additionalProperties": false
462
+ },
288
463
  "headers": {
289
464
  "type": "object",
290
465
  "additionalProperties": {
291
466
  "type": "string"
292
- }
467
+ },
468
+ "description": "Interceptor headers (11 §2.10): string values; a user activity carries at most 16 KiB of JSON (checked by validateCommands)."
293
469
  },
294
470
  "payload_WORKFLOW_STARTED": {
295
471
  "type": "object",
@@ -391,6 +567,54 @@
391
567
  "type": "string",
392
568
  "minLength": 1,
393
569
  "maxLength": 256
570
+ },
571
+ "startDelayMs": {
572
+ "type": "integer",
573
+ "minimum": 0,
574
+ "description": "R2: the start delay of a delayed run (11 §2.23); the first task waits for it."
575
+ },
576
+ "runAttempt": {
577
+ "type": "integer",
578
+ "minimum": 1,
579
+ "description": "R2: the run-level retry attempt (11 §2.17), 1-based."
580
+ },
581
+ "businessId": {
582
+ "type": "string",
583
+ "description": "R2: the workflow id (11 §2.1), stored as WorkflowRun.businessId."
584
+ },
585
+ "workflowId": {
586
+ "type": "string",
587
+ "description": "R2: the same value as businessId."
588
+ },
589
+ "timeouts": {
590
+ "$ref": "#/$defs/timeouts"
591
+ },
592
+ "retry": {
593
+ "$ref": "#/$defs/runRetryPolicy"
594
+ },
595
+ "priority": {
596
+ "type": "integer",
597
+ "minimum": 1,
598
+ "maximum": 5
599
+ },
600
+ "headers": {
601
+ "$ref": "#/$defs/headers"
602
+ },
603
+ "searchAttributes": {
604
+ "type": "object",
605
+ "description": "Phase C: the search attributes the start set (11 §2.8)."
606
+ },
607
+ "fairnessKey": {
608
+ "type": "string",
609
+ "minLength": 1,
610
+ "maxLength": 255,
611
+ "description": "Phase C: the fairness key of the task (11 §2.11); default the workspace id."
612
+ },
613
+ "fairnessWeight": {
614
+ "type": "number",
615
+ "minimum": 0.1,
616
+ "maximum": 10,
617
+ "description": "Phase C: the weight of the fairness key, 0.1 to 10 (default 1)."
394
618
  }
395
619
  }
396
620
  },
@@ -441,6 +665,9 @@
441
665
  "type": "integer",
442
666
  "minimum": 1,
443
667
  "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."
668
+ },
669
+ "version": {
670
+ "description": "R2: the workflow version whose bundle served the task (it differs from WORKFLOW_STARTED.version after an AUTO_UPGRADE or a versioning override)."
444
671
  }
445
672
  }
446
673
  },
@@ -525,85 +752,193 @@
525
752
  }
526
753
  },
527
754
  "payload_ACTIVITY_SCHEDULED": {
528
- "type": "object",
529
- "required": [
530
- "activityId",
531
- "kind",
532
- "nodeType",
533
- "operation",
534
- "args",
535
- "retry"
536
- ],
537
- "properties": {
538
- "headers": {
539
- "$ref": "#/$defs/headers"
540
- },
541
- "activityId": {
542
- "type": "string",
543
- "minLength": 1,
544
- "maxLength": 256
545
- },
546
- "kind": {
547
- "const": "node"
548
- },
549
- "nodeType": {
550
- "type": "string",
551
- "minLength": 1,
552
- "maxLength": 256
553
- },
554
- "nodeVersion": {
555
- "type": "string"
556
- },
557
- "operation": {
558
- "type": "string",
559
- "minLength": 1,
560
- "maxLength": 256
561
- },
562
- "args": {},
563
- "connection": {
564
- "type": "string",
565
- "minLength": 1,
566
- "maxLength": 256
567
- },
568
- "retry": {
569
- "$ref": "#/$defs/retryPolicy"
570
- },
571
- "startToCloseTimeout": {
572
- "type": "integer",
573
- "minimum": 0
574
- },
575
- "scheduleToCloseTimeout": {
576
- "type": "integer",
577
- "minimum": 0
578
- },
579
- "scheduleToStartTimeout": {
580
- "type": "integer",
581
- "minimum": 0
582
- },
583
- "heartbeatTimeout": {
584
- "type": "integer",
585
- "minimum": 0
586
- },
587
- "cancellationType": {
588
- "enum": [
589
- "WAIT_CANCELLATION_COMPLETED",
590
- "TRY_CANCEL",
591
- "ABANDON"
592
- ]
593
- },
594
- "priority": {
595
- "type": "integer",
596
- "minimum": 1,
597
- "maximum": 5
598
- },
599
- "summary": {
600
- "type": "string",
601
- "maxLength": 200
755
+ "description": "The SCHEDULE_ACTIVITY command as the service accepted it: kind node, or kind user (Phase C) with activityName, taskQueue, fairness, connections and headers.",
756
+ "oneOf": [
757
+ {
758
+ "type": "object",
759
+ "required": [
760
+ "activityId",
761
+ "kind",
762
+ "nodeType",
763
+ "operation",
764
+ "args",
765
+ "retry"
766
+ ],
767
+ "properties": {
768
+ "activityId": {
769
+ "type": "string",
770
+ "minLength": 1,
771
+ "maxLength": 256
772
+ },
773
+ "args": {},
774
+ "retry": {
775
+ "$ref": "#/$defs/retryPolicy"
776
+ },
777
+ "startToCloseTimeout": {
778
+ "type": "integer",
779
+ "minimum": 0
780
+ },
781
+ "scheduleToCloseTimeout": {
782
+ "type": "integer",
783
+ "minimum": 0
784
+ },
785
+ "scheduleToStartTimeout": {
786
+ "type": "integer",
787
+ "minimum": 0
788
+ },
789
+ "heartbeatTimeout": {
790
+ "type": "integer",
791
+ "minimum": 0
792
+ },
793
+ "cancellationType": {
794
+ "enum": [
795
+ "WAIT_CANCELLATION_COMPLETED",
796
+ "TRY_CANCEL",
797
+ "ABANDON"
798
+ ]
799
+ },
800
+ "priority": {
801
+ "type": "integer",
802
+ "minimum": 1,
803
+ "maximum": 5
804
+ },
805
+ "summary": {
806
+ "type": "string",
807
+ "maxLength": 200
808
+ },
809
+ "fairnessKey": {
810
+ "type": "string",
811
+ "minLength": 1,
812
+ "maxLength": 255,
813
+ "description": "Phase C: the fairness key of the task (11 §2.11); default the workspace id."
814
+ },
815
+ "fairnessWeight": {
816
+ "type": "number",
817
+ "minimum": 0.1,
818
+ "maximum": 10,
819
+ "description": "Phase C: the weight of the fairness key, 0.1 to 10 (default 1)."
820
+ },
821
+ "kind": {
822
+ "const": "node"
823
+ },
824
+ "nodeType": {
825
+ "type": "string",
826
+ "minLength": 1,
827
+ "maxLength": 256
828
+ },
829
+ "nodeVersion": {
830
+ "type": "string"
831
+ },
832
+ "operation": {
833
+ "type": "string",
834
+ "minLength": 1,
835
+ "maxLength": 256
836
+ },
837
+ "connection": {
838
+ "type": "string",
839
+ "minLength": 1,
840
+ "maxLength": 256
841
+ },
842
+ "runOn": {
843
+ "type": "string"
844
+ },
845
+ "headers": {
846
+ "$ref": "#/$defs/headers"
847
+ }
848
+ }
602
849
  },
603
- "runOn": {
604
- "type": "string"
850
+ {
851
+ "type": "object",
852
+ "required": [
853
+ "activityId",
854
+ "kind",
855
+ "activityName",
856
+ "taskQueue",
857
+ "args",
858
+ "retry"
859
+ ],
860
+ "properties": {
861
+ "activityId": {
862
+ "type": "string",
863
+ "minLength": 1,
864
+ "maxLength": 256
865
+ },
866
+ "args": {},
867
+ "retry": {
868
+ "$ref": "#/$defs/retryPolicy"
869
+ },
870
+ "startToCloseTimeout": {
871
+ "type": "integer",
872
+ "minimum": 0
873
+ },
874
+ "scheduleToCloseTimeout": {
875
+ "type": "integer",
876
+ "minimum": 0
877
+ },
878
+ "scheduleToStartTimeout": {
879
+ "type": "integer",
880
+ "minimum": 0
881
+ },
882
+ "heartbeatTimeout": {
883
+ "type": "integer",
884
+ "minimum": 0
885
+ },
886
+ "cancellationType": {
887
+ "enum": [
888
+ "WAIT_CANCELLATION_COMPLETED",
889
+ "TRY_CANCEL",
890
+ "ABANDON"
891
+ ]
892
+ },
893
+ "priority": {
894
+ "type": "integer",
895
+ "minimum": 1,
896
+ "maximum": 5
897
+ },
898
+ "summary": {
899
+ "type": "string",
900
+ "maxLength": 200
901
+ },
902
+ "fairnessKey": {
903
+ "type": "string",
904
+ "minLength": 1,
905
+ "maxLength": 255,
906
+ "description": "Phase C: the fairness key of the task (11 §2.11); default the workspace id."
907
+ },
908
+ "fairnessWeight": {
909
+ "type": "number",
910
+ "minimum": 0.1,
911
+ "maximum": 10,
912
+ "description": "Phase C: the weight of the fairness key, 0.1 to 10 (default 1)."
913
+ },
914
+ "kind": {
915
+ "const": "user"
916
+ },
917
+ "activityName": {
918
+ "type": "string",
919
+ "pattern": "^[A-Za-z_][A-Za-z0-9_.-]{0,127}$"
920
+ },
921
+ "taskQueue": {
922
+ "type": "string",
923
+ "pattern": "^[a-z0-9][a-z0-9-]{0,62}$"
924
+ },
925
+ "connections": {
926
+ "type": "array",
927
+ "maxItems": 16,
928
+ "uniqueItems": true,
929
+ "items": {
930
+ "type": "string",
931
+ "minLength": 1,
932
+ "maxLength": 256
933
+ },
934
+ "description": "Connection names the worker may resolve for each started attempt (H2: declared by the definition and on the worker token allow-list)."
935
+ },
936
+ "headers": {
937
+ "$ref": "#/$defs/headers"
938
+ }
939
+ }
605
940
  }
606
- }
941
+ ]
607
942
  },
608
943
  "payload_ACTIVITY_STARTED": {
609
944
  "type": "object",
@@ -865,6 +1200,9 @@
865
1200
  "actor": {},
866
1201
  "idempotencyKey": {
867
1202
  "type": "string"
1203
+ },
1204
+ "headers": {
1205
+ "$ref": "#/$defs/headers"
868
1206
  }
869
1207
  }
870
1208
  },
@@ -885,7 +1223,10 @@
885
1223
  "minLength": 1,
886
1224
  "maxLength": 256
887
1225
  },
888
- "args": {}
1226
+ "args": {},
1227
+ "headers": {
1228
+ "$ref": "#/$defs/headers"
1229
+ }
889
1230
  }
890
1231
  },
891
1232
  "payload_UPDATE_ACCEPTED": {
@@ -905,7 +1246,10 @@
905
1246
  "minLength": 1,
906
1247
  "maxLength": 256
907
1248
  },
908
- "args": {}
1249
+ "args": {},
1250
+ "headers": {
1251
+ "$ref": "#/$defs/headers"
1252
+ }
909
1253
  }
910
1254
  },
911
1255
  "payload_UPDATE_COMPLETED": {
@@ -963,6 +1307,9 @@
963
1307
  "GRAPH",
964
1308
  "DURABLE_FN"
965
1309
  ]
1310
+ },
1311
+ "headers": {
1312
+ "$ref": "#/$defs/headers"
966
1313
  }
967
1314
  }
968
1315
  },
@@ -1217,6 +1564,19 @@
1217
1564
  "attempts": {
1218
1565
  "type": "integer",
1219
1566
  "minimum": 1
1567
+ },
1568
+ "nodeType": {
1569
+ "type": "string",
1570
+ "minLength": 1,
1571
+ "maxLength": 256
1572
+ },
1573
+ "operation": {
1574
+ "type": "string",
1575
+ "minLength": 1,
1576
+ "maxLength": 256
1577
+ },
1578
+ "summary": {
1579
+ "type": "string"
1220
1580
  }
1221
1581
  }
1222
1582
  },
@@ -1239,6 +1599,19 @@
1239
1599
  "attempts": {
1240
1600
  "type": "integer",
1241
1601
  "minimum": 1
1602
+ },
1603
+ "nodeType": {
1604
+ "type": "string",
1605
+ "minLength": 1,
1606
+ "maxLength": 256
1607
+ },
1608
+ "operation": {
1609
+ "type": "string",
1610
+ "minLength": 1,
1611
+ "maxLength": 256
1612
+ },
1613
+ "summary": {
1614
+ "type": "string"
1242
1615
  }
1243
1616
  }
1244
1617
  },
@@ -1307,6 +1680,13 @@
1307
1680
  },
1308
1681
  "reason": {
1309
1682
  "type": "string"
1683
+ },
1684
+ "actor": {},
1685
+ "reapplySignals": {
1686
+ "type": "boolean"
1687
+ },
1688
+ "reapplyUpdates": {
1689
+ "type": "boolean"
1310
1690
  }
1311
1691
  }
1312
1692
  },
@@ -1316,7 +1696,44 @@
1316
1696
  "override"
1317
1697
  ],
1318
1698
  "properties": {
1319
- "override": {}
1699
+ "override": {
1700
+ "description": "The per-run override (11 §2.27): { behavior: PINNED, version } pins the run, { behavior: AUTO_UPGRADE } upgrades it, null removes the override.",
1701
+ "oneOf": [
1702
+ {
1703
+ "type": "null"
1704
+ },
1705
+ {
1706
+ "type": "object",
1707
+ "required": [
1708
+ "behavior",
1709
+ "version"
1710
+ ],
1711
+ "properties": {
1712
+ "behavior": {
1713
+ "const": "PINNED"
1714
+ },
1715
+ "version": {}
1716
+ },
1717
+ "additionalProperties": false
1718
+ },
1719
+ {
1720
+ "type": "object",
1721
+ "required": [
1722
+ "behavior"
1723
+ ],
1724
+ "properties": {
1725
+ "behavior": {
1726
+ "const": "AUTO_UPGRADE"
1727
+ }
1728
+ },
1729
+ "additionalProperties": false
1730
+ }
1731
+ ]
1732
+ },
1733
+ "actor": {},
1734
+ "reason": {
1735
+ "type": "string"
1736
+ }
1320
1737
  }
1321
1738
  },
1322
1739
  "payload_WORKFLOW_COMPLETED": {
@@ -1367,6 +1784,9 @@
1367
1784
  "WORKFLOW_RUN",
1368
1785
  "WORKFLOW_EXECUTION"
1369
1786
  ]
1787
+ },
1788
+ "failure": {
1789
+ "$ref": "#/$defs/failure"
1370
1790
  }
1371
1791
  }
1372
1792
  },
@@ -1379,7 +1799,8 @@
1379
1799
  "properties": {
1380
1800
  "input": {},
1381
1801
  "options": {
1382
- "type": "object"
1802
+ "type": "object",
1803
+ "description": "The CONTINUE_AS_NEW options as the service recorded them. New commands are checked against canOptions; histories recorded before R2 may hold any object the R1 contract accepted."
1383
1804
  },
1384
1805
  "newRunId": {
1385
1806
  "type": "string"
@@ -2453,10 +2874,17 @@
2453
2874
  "businessId": {
2454
2875
  "type": "string"
2455
2876
  },
2877
+ "workflowId": {
2878
+ "type": "string"
2879
+ },
2456
2880
  "attempt": {
2457
2881
  "type": "integer",
2458
2882
  "minimum": 1
2459
2883
  },
2884
+ "runAttempt": {
2885
+ "type": "integer",
2886
+ "minimum": 1
2887
+ },
2460
2888
  "taskQueue": {
2461
2889
  "type": "string"
2462
2890
  },
@@ -2537,6 +2965,33 @@
2537
2965
  },
2538
2966
  "context": {
2539
2967
  "type": "object"
2968
+ },
2969
+ "memo": {
2970
+ "type": "object"
2971
+ },
2972
+ "versioningBehavior": {
2973
+ "enum": [
2974
+ "PINNED",
2975
+ "AUTO_UPGRADE"
2976
+ ]
2977
+ },
2978
+ "retry": {
2979
+ "$ref": "#/$defs/runRetryPolicy"
2980
+ },
2981
+ "searchAttributes": {
2982
+ "type": "object"
2983
+ },
2984
+ "fairnessKey": {
2985
+ "type": "string",
2986
+ "minLength": 1,
2987
+ "maxLength": 255,
2988
+ "description": "Phase C: the fairness key of the task (11 §2.11); default the workspace id."
2989
+ },
2990
+ "fairnessWeight": {
2991
+ "type": "number",
2992
+ "minimum": 0.1,
2993
+ "maximum": 10,
2994
+ "description": "Phase C: the weight of the fairness key, 0.1 to 10 (default 1)."
2540
2995
  }
2541
2996
  }
2542
2997
  }