@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,153 @@
1
+ {
2
+ "format": "fluidgrids.history",
3
+ "formatVersion": 1,
4
+ "name": "side-effect-recorded",
5
+ "description": "sideEffect() records its value once (SIDE_EFFECT_RECORDED s1).",
6
+ "source": "src/side-effects.ts",
7
+ "info": {
8
+ "workspaceId": "test-workspace",
9
+ "taskQueue": "managed",
10
+ "attempt": 1,
11
+ "startedAt": "2026-01-01T00:00:00.000Z",
12
+ "runStartedAt": "2026-01-01T00:00:00.000Z",
13
+ "runId": "run-1"
14
+ },
15
+ "nowMs": 1767225600000,
16
+ "workflowFn": "sideEffect",
17
+ "events": [
18
+ {
19
+ "seq": 1,
20
+ "type": "WORKFLOW_STARTED",
21
+ "payload": {
22
+ "workflowFn": "sideEffect",
23
+ "input": null,
24
+ "taskQueue": "managed",
25
+ "randomnessSeed": "run-1"
26
+ },
27
+ "createdAt": "2026-01-01T00:00:00.000Z"
28
+ },
29
+ {
30
+ "seq": 2,
31
+ "type": "WORKFLOW_TASK_SCHEDULED",
32
+ "payload": {
33
+ "taskId": "run-1-task-1"
34
+ },
35
+ "createdAt": "2026-01-01T00:00:00.000Z"
36
+ },
37
+ {
38
+ "seq": 3,
39
+ "type": "WORKFLOW_TASK_STARTED",
40
+ "payload": {
41
+ "taskId": "run-1-task-1",
42
+ "attempt": 1
43
+ },
44
+ "createdAt": "2026-01-01T00:00:00.000Z"
45
+ },
46
+ {
47
+ "seq": 4,
48
+ "type": "WORKFLOW_TASK_COMPLETED",
49
+ "payload": {
50
+ "taskId": "run-1-task-1"
51
+ },
52
+ "createdAt": "2026-01-01T00:00:00.000Z",
53
+ "taskId": "run-1-task-1"
54
+ },
55
+ {
56
+ "seq": 5,
57
+ "type": "SIDE_EFFECT_RECORDED",
58
+ "payload": {
59
+ "sideEffectId": "s1",
60
+ "value": {
61
+ "ticket": "T-1001"
62
+ }
63
+ },
64
+ "createdAt": "2026-01-01T00:00:00.000Z",
65
+ "taskId": "run-1-task-1"
66
+ },
67
+ {
68
+ "seq": 6,
69
+ "type": "ACTIVITY_SCHEDULED",
70
+ "payload": {
71
+ "activityId": "a1",
72
+ "kind": "node",
73
+ "nodeType": "internal:http",
74
+ "operation": "execute",
75
+ "args": {
76
+ "url": "https://example.test/tickets/T-1001"
77
+ },
78
+ "retry": {
79
+ "retryDelay": 1000,
80
+ "backoffMultiplier": 2,
81
+ "maxDelay": 100000
82
+ }
83
+ },
84
+ "createdAt": "2026-01-01T00:00:00.000Z",
85
+ "taskId": "run-1-task-1"
86
+ },
87
+ {
88
+ "seq": 7,
89
+ "type": "ACTIVITY_STARTED",
90
+ "payload": {
91
+ "activityId": "a1",
92
+ "attempt": 1
93
+ },
94
+ "createdAt": "2026-01-01T00:00:00.000Z"
95
+ },
96
+ {
97
+ "seq": 8,
98
+ "type": "ACTIVITY_COMPLETED",
99
+ "payload": {
100
+ "activityId": "a1",
101
+ "attempt": 1,
102
+ "result": {
103
+ "status": 200,
104
+ "url": "https://example.test/tickets/T-1001"
105
+ }
106
+ },
107
+ "createdAt": "2026-01-01T00:00:00.000Z"
108
+ },
109
+ {
110
+ "seq": 9,
111
+ "type": "WORKFLOW_TASK_SCHEDULED",
112
+ "payload": {
113
+ "taskId": "run-1-task-2"
114
+ },
115
+ "createdAt": "2026-01-01T00:00:00.000Z"
116
+ },
117
+ {
118
+ "seq": 10,
119
+ "type": "WORKFLOW_TASK_STARTED",
120
+ "payload": {
121
+ "taskId": "run-1-task-2",
122
+ "attempt": 1
123
+ },
124
+ "createdAt": "2026-01-01T00:00:00.000Z"
125
+ },
126
+ {
127
+ "seq": 11,
128
+ "type": "WORKFLOW_TASK_COMPLETED",
129
+ "payload": {
130
+ "taskId": "run-1-task-2"
131
+ },
132
+ "createdAt": "2026-01-01T00:00:00.000Z",
133
+ "taskId": "run-1-task-2"
134
+ },
135
+ {
136
+ "seq": 12,
137
+ "type": "WORKFLOW_COMPLETED",
138
+ "payload": {
139
+ "output": {
140
+ "ticket": "T-1001"
141
+ }
142
+ },
143
+ "createdAt": "2026-01-01T00:00:00.000Z",
144
+ "taskId": "run-1-task-2"
145
+ }
146
+ ],
147
+ "expected": {
148
+ "protocol": 1,
149
+ "outcome": "commands",
150
+ "commands": [],
151
+ "logs": []
152
+ }
153
+ }
@@ -0,0 +1,157 @@
1
+ {
2
+ "format": "fluidgrids.history",
3
+ "formatVersion": 1,
4
+ "name": "signal-buffered-at-start",
5
+ "description": "Signal-with-start: SIGNAL_RECEIVED right after WORKFLOW_STARTED is buffered until the code waits for it.",
6
+ "source": "src/signals.ts",
7
+ "info": {
8
+ "workspaceId": "test-workspace",
9
+ "taskQueue": "managed",
10
+ "attempt": 1,
11
+ "startedAt": "2026-01-01T00:00:00.000Z",
12
+ "runStartedAt": "2026-01-01T00:00:00.000Z",
13
+ "runId": "run-1"
14
+ },
15
+ "nowMs": 1767225600000,
16
+ "workflowFn": "bufferedSignal",
17
+ "events": [
18
+ {
19
+ "seq": 1,
20
+ "type": "WORKFLOW_STARTED",
21
+ "payload": {
22
+ "workflowFn": "bufferedSignal",
23
+ "input": null,
24
+ "taskQueue": "managed",
25
+ "randomnessSeed": "run-1"
26
+ },
27
+ "createdAt": "2026-01-01T00:00:00.000Z"
28
+ },
29
+ {
30
+ "seq": 2,
31
+ "type": "WORKFLOW_TASK_SCHEDULED",
32
+ "payload": {
33
+ "taskId": "run-1-task-1"
34
+ },
35
+ "createdAt": "2026-01-01T00:00:00.000Z"
36
+ },
37
+ {
38
+ "seq": 3,
39
+ "type": "SIGNAL_RECEIVED",
40
+ "payload": {
41
+ "name": "approve",
42
+ "payload": {
43
+ "by": "ben"
44
+ },
45
+ "receivedAt": "2026-01-01T00:00:00.000Z"
46
+ },
47
+ "createdAt": "2026-01-01T00:00:00.000Z"
48
+ },
49
+ {
50
+ "seq": 4,
51
+ "type": "WORKFLOW_TASK_STARTED",
52
+ "payload": {
53
+ "taskId": "run-1-task-1",
54
+ "attempt": 1
55
+ },
56
+ "createdAt": "2026-01-01T00:00:00.000Z"
57
+ },
58
+ {
59
+ "seq": 5,
60
+ "type": "WORKFLOW_TASK_COMPLETED",
61
+ "payload": {
62
+ "taskId": "run-1-task-1"
63
+ },
64
+ "createdAt": "2026-01-01T00:00:00.000Z",
65
+ "taskId": "run-1-task-1"
66
+ },
67
+ {
68
+ "seq": 6,
69
+ "type": "ACTIVITY_SCHEDULED",
70
+ "payload": {
71
+ "activityId": "a1",
72
+ "kind": "node",
73
+ "nodeType": "internal:http",
74
+ "operation": "execute",
75
+ "args": {
76
+ "url": "https://example.test/a"
77
+ },
78
+ "retry": {
79
+ "retryDelay": 1000,
80
+ "backoffMultiplier": 2,
81
+ "maxDelay": 100000
82
+ }
83
+ },
84
+ "createdAt": "2026-01-01T00:00:00.000Z",
85
+ "taskId": "run-1-task-1"
86
+ },
87
+ {
88
+ "seq": 7,
89
+ "type": "ACTIVITY_STARTED",
90
+ "payload": {
91
+ "activityId": "a1",
92
+ "attempt": 1
93
+ },
94
+ "createdAt": "2026-01-01T00:00:00.000Z"
95
+ },
96
+ {
97
+ "seq": 8,
98
+ "type": "ACTIVITY_COMPLETED",
99
+ "payload": {
100
+ "activityId": "a1",
101
+ "attempt": 1,
102
+ "result": {
103
+ "status": 200,
104
+ "url": "https://example.test/a"
105
+ }
106
+ },
107
+ "createdAt": "2026-01-01T00:00:00.000Z"
108
+ },
109
+ {
110
+ "seq": 9,
111
+ "type": "WORKFLOW_TASK_SCHEDULED",
112
+ "payload": {
113
+ "taskId": "run-1-task-2"
114
+ },
115
+ "createdAt": "2026-01-01T00:00:00.000Z"
116
+ },
117
+ {
118
+ "seq": 10,
119
+ "type": "WORKFLOW_TASK_STARTED",
120
+ "payload": {
121
+ "taskId": "run-1-task-2",
122
+ "attempt": 1
123
+ },
124
+ "createdAt": "2026-01-01T00:00:00.000Z"
125
+ },
126
+ {
127
+ "seq": 11,
128
+ "type": "WORKFLOW_TASK_COMPLETED",
129
+ "payload": {
130
+ "taskId": "run-1-task-2"
131
+ },
132
+ "createdAt": "2026-01-01T00:00:00.000Z",
133
+ "taskId": "run-1-task-2"
134
+ },
135
+ {
136
+ "seq": 12,
137
+ "type": "WORKFLOW_COMPLETED",
138
+ "payload": {
139
+ "output": {
140
+ "fetched": {
141
+ "status": 200,
142
+ "url": "https://example.test/a"
143
+ },
144
+ "approvedBy": "ben"
145
+ }
146
+ },
147
+ "createdAt": "2026-01-01T00:00:00.000Z",
148
+ "taskId": "run-1-task-2"
149
+ }
150
+ ],
151
+ "expected": {
152
+ "protocol": 1,
153
+ "outcome": "commands",
154
+ "commands": [],
155
+ "logs": []
156
+ }
157
+ }
@@ -0,0 +1,187 @@
1
+ {
2
+ "format": "fluidgrids.history",
3
+ "formatVersion": 1,
4
+ "name": "signal-default-handler",
5
+ "description": "Undeclared signal names go to setDefaultSignalHandler; \"done\" has a waiter.",
6
+ "source": "src/signals.ts",
7
+ "info": {
8
+ "workspaceId": "test-workspace",
9
+ "taskQueue": "managed",
10
+ "attempt": 1,
11
+ "startedAt": "2026-01-01T00:00:00.000Z",
12
+ "runStartedAt": "2026-01-01T00:00:00.000Z",
13
+ "runId": "run-1"
14
+ },
15
+ "nowMs": 1767225600000,
16
+ "workflowFn": "defaultHandler",
17
+ "events": [
18
+ {
19
+ "seq": 1,
20
+ "type": "WORKFLOW_STARTED",
21
+ "payload": {
22
+ "workflowFn": "defaultHandler",
23
+ "input": null,
24
+ "taskQueue": "managed",
25
+ "randomnessSeed": "run-1"
26
+ },
27
+ "createdAt": "2026-01-01T00:00:00.000Z"
28
+ },
29
+ {
30
+ "seq": 2,
31
+ "type": "WORKFLOW_TASK_SCHEDULED",
32
+ "payload": {
33
+ "taskId": "run-1-task-1"
34
+ },
35
+ "createdAt": "2026-01-01T00:00:00.000Z"
36
+ },
37
+ {
38
+ "seq": 3,
39
+ "type": "WORKFLOW_TASK_STARTED",
40
+ "payload": {
41
+ "taskId": "run-1-task-1",
42
+ "attempt": 1
43
+ },
44
+ "createdAt": "2026-01-01T00:00:00.000Z"
45
+ },
46
+ {
47
+ "seq": 4,
48
+ "type": "WORKFLOW_TASK_COMPLETED",
49
+ "payload": {
50
+ "taskId": "run-1-task-1"
51
+ },
52
+ "createdAt": "2026-01-01T00:00:00.000Z",
53
+ "taskId": "run-1-task-1"
54
+ },
55
+ {
56
+ "seq": 5,
57
+ "type": "SIGNAL_RECEIVED",
58
+ "payload": {
59
+ "name": "alpha",
60
+ "payload": null,
61
+ "receivedAt": "2026-01-01T00:00:00.000Z"
62
+ },
63
+ "createdAt": "2026-01-01T00:00:00.000Z"
64
+ },
65
+ {
66
+ "seq": 6,
67
+ "type": "WORKFLOW_TASK_SCHEDULED",
68
+ "payload": {
69
+ "taskId": "run-1-task-2"
70
+ },
71
+ "createdAt": "2026-01-01T00:00:00.000Z"
72
+ },
73
+ {
74
+ "seq": 7,
75
+ "type": "WORKFLOW_TASK_STARTED",
76
+ "payload": {
77
+ "taskId": "run-1-task-2",
78
+ "attempt": 1
79
+ },
80
+ "createdAt": "2026-01-01T00:00:00.000Z"
81
+ },
82
+ {
83
+ "seq": 8,
84
+ "type": "WORKFLOW_TASK_COMPLETED",
85
+ "payload": {
86
+ "taskId": "run-1-task-2"
87
+ },
88
+ "createdAt": "2026-01-01T00:00:00.000Z",
89
+ "taskId": "run-1-task-2"
90
+ },
91
+ {
92
+ "seq": 9,
93
+ "type": "SIGNAL_RECEIVED",
94
+ "payload": {
95
+ "name": "beta",
96
+ "payload": null,
97
+ "receivedAt": "2026-01-01T00:00:00.000Z"
98
+ },
99
+ "createdAt": "2026-01-01T00:00:00.000Z"
100
+ },
101
+ {
102
+ "seq": 10,
103
+ "type": "WORKFLOW_TASK_SCHEDULED",
104
+ "payload": {
105
+ "taskId": "run-1-task-3"
106
+ },
107
+ "createdAt": "2026-01-01T00:00:00.000Z"
108
+ },
109
+ {
110
+ "seq": 11,
111
+ "type": "WORKFLOW_TASK_STARTED",
112
+ "payload": {
113
+ "taskId": "run-1-task-3",
114
+ "attempt": 1
115
+ },
116
+ "createdAt": "2026-01-01T00:00:00.000Z"
117
+ },
118
+ {
119
+ "seq": 12,
120
+ "type": "WORKFLOW_TASK_COMPLETED",
121
+ "payload": {
122
+ "taskId": "run-1-task-3"
123
+ },
124
+ "createdAt": "2026-01-01T00:00:00.000Z",
125
+ "taskId": "run-1-task-3"
126
+ },
127
+ {
128
+ "seq": 13,
129
+ "type": "SIGNAL_RECEIVED",
130
+ "payload": {
131
+ "name": "done",
132
+ "payload": {
133
+ "total": 2
134
+ },
135
+ "receivedAt": "2026-01-01T00:00:00.000Z"
136
+ },
137
+ "createdAt": "2026-01-01T00:00:00.000Z"
138
+ },
139
+ {
140
+ "seq": 14,
141
+ "type": "WORKFLOW_TASK_SCHEDULED",
142
+ "payload": {
143
+ "taskId": "run-1-task-4"
144
+ },
145
+ "createdAt": "2026-01-01T00:00:00.000Z"
146
+ },
147
+ {
148
+ "seq": 15,
149
+ "type": "WORKFLOW_TASK_STARTED",
150
+ "payload": {
151
+ "taskId": "run-1-task-4",
152
+ "attempt": 1
153
+ },
154
+ "createdAt": "2026-01-01T00:00:00.000Z"
155
+ },
156
+ {
157
+ "seq": 16,
158
+ "type": "WORKFLOW_TASK_COMPLETED",
159
+ "payload": {
160
+ "taskId": "run-1-task-4"
161
+ },
162
+ "createdAt": "2026-01-01T00:00:00.000Z",
163
+ "taskId": "run-1-task-4"
164
+ },
165
+ {
166
+ "seq": 17,
167
+ "type": "WORKFLOW_COMPLETED",
168
+ "payload": {
169
+ "output": {
170
+ "seen": [
171
+ "alpha",
172
+ "beta"
173
+ ],
174
+ "total": 2
175
+ }
176
+ },
177
+ "createdAt": "2026-01-01T00:00:00.000Z",
178
+ "taskId": "run-1-task-4"
179
+ }
180
+ ],
181
+ "expected": {
182
+ "protocol": 1,
183
+ "outcome": "commands",
184
+ "commands": [],
185
+ "logs": []
186
+ }
187
+ }
@@ -0,0 +1,191 @@
1
+ {
2
+ "format": "fluidgrids.history",
3
+ "formatVersion": 1,
4
+ "name": "signal-handler",
5
+ "description": "onSignal() handles three signals delivered at different times.",
6
+ "source": "src/signals.ts",
7
+ "info": {
8
+ "workspaceId": "test-workspace",
9
+ "taskQueue": "managed",
10
+ "attempt": 1,
11
+ "startedAt": "2026-01-01T00:00:00.000Z",
12
+ "runStartedAt": "2026-01-01T00:00:00.000Z",
13
+ "runId": "run-1"
14
+ },
15
+ "nowMs": 1767225720000,
16
+ "workflowFn": "signalHandler",
17
+ "events": [
18
+ {
19
+ "seq": 1,
20
+ "type": "WORKFLOW_STARTED",
21
+ "payload": {
22
+ "workflowFn": "signalHandler",
23
+ "input": null,
24
+ "taskQueue": "managed",
25
+ "randomnessSeed": "run-1"
26
+ },
27
+ "createdAt": "2026-01-01T00:00:00.000Z"
28
+ },
29
+ {
30
+ "seq": 2,
31
+ "type": "WORKFLOW_TASK_SCHEDULED",
32
+ "payload": {
33
+ "taskId": "run-1-task-1"
34
+ },
35
+ "createdAt": "2026-01-01T00:00:00.000Z"
36
+ },
37
+ {
38
+ "seq": 3,
39
+ "type": "WORKFLOW_TASK_STARTED",
40
+ "payload": {
41
+ "taskId": "run-1-task-1",
42
+ "attempt": 1
43
+ },
44
+ "createdAt": "2026-01-01T00:00:00.000Z"
45
+ },
46
+ {
47
+ "seq": 4,
48
+ "type": "WORKFLOW_TASK_COMPLETED",
49
+ "payload": {
50
+ "taskId": "run-1-task-1"
51
+ },
52
+ "createdAt": "2026-01-01T00:00:00.000Z",
53
+ "taskId": "run-1-task-1"
54
+ },
55
+ {
56
+ "seq": 5,
57
+ "type": "SIGNAL_RECEIVED",
58
+ "payload": {
59
+ "name": "add",
60
+ "payload": {
61
+ "item": "one"
62
+ },
63
+ "receivedAt": "2026-01-01T00:00:00.000Z"
64
+ },
65
+ "createdAt": "2026-01-01T00:00:00.000Z"
66
+ },
67
+ {
68
+ "seq": 6,
69
+ "type": "WORKFLOW_TASK_SCHEDULED",
70
+ "payload": {
71
+ "taskId": "run-1-task-2"
72
+ },
73
+ "createdAt": "2026-01-01T00:00:00.000Z"
74
+ },
75
+ {
76
+ "seq": 7,
77
+ "type": "WORKFLOW_TASK_STARTED",
78
+ "payload": {
79
+ "taskId": "run-1-task-2",
80
+ "attempt": 1
81
+ },
82
+ "createdAt": "2026-01-01T00:00:00.000Z"
83
+ },
84
+ {
85
+ "seq": 8,
86
+ "type": "WORKFLOW_TASK_COMPLETED",
87
+ "payload": {
88
+ "taskId": "run-1-task-2"
89
+ },
90
+ "createdAt": "2026-01-01T00:00:00.000Z",
91
+ "taskId": "run-1-task-2"
92
+ },
93
+ {
94
+ "seq": 9,
95
+ "type": "SIGNAL_RECEIVED",
96
+ "payload": {
97
+ "name": "add",
98
+ "payload": {
99
+ "item": "two"
100
+ },
101
+ "receivedAt": "2026-01-01T00:01:00.000Z"
102
+ },
103
+ "createdAt": "2026-01-01T00:01:00.000Z"
104
+ },
105
+ {
106
+ "seq": 10,
107
+ "type": "WORKFLOW_TASK_SCHEDULED",
108
+ "payload": {
109
+ "taskId": "run-1-task-3"
110
+ },
111
+ "createdAt": "2026-01-01T00:01:00.000Z"
112
+ },
113
+ {
114
+ "seq": 11,
115
+ "type": "WORKFLOW_TASK_STARTED",
116
+ "payload": {
117
+ "taskId": "run-1-task-3",
118
+ "attempt": 1
119
+ },
120
+ "createdAt": "2026-01-01T00:01:00.000Z"
121
+ },
122
+ {
123
+ "seq": 12,
124
+ "type": "WORKFLOW_TASK_COMPLETED",
125
+ "payload": {
126
+ "taskId": "run-1-task-3"
127
+ },
128
+ "createdAt": "2026-01-01T00:01:00.000Z",
129
+ "taskId": "run-1-task-3"
130
+ },
131
+ {
132
+ "seq": 13,
133
+ "type": "SIGNAL_RECEIVED",
134
+ "payload": {
135
+ "name": "add",
136
+ "payload": {
137
+ "item": "three"
138
+ },
139
+ "receivedAt": "2026-01-01T00:02:00.000Z"
140
+ },
141
+ "createdAt": "2026-01-01T00:02:00.000Z"
142
+ },
143
+ {
144
+ "seq": 14,
145
+ "type": "WORKFLOW_TASK_SCHEDULED",
146
+ "payload": {
147
+ "taskId": "run-1-task-4"
148
+ },
149
+ "createdAt": "2026-01-01T00:02:00.000Z"
150
+ },
151
+ {
152
+ "seq": 15,
153
+ "type": "WORKFLOW_TASK_STARTED",
154
+ "payload": {
155
+ "taskId": "run-1-task-4",
156
+ "attempt": 1
157
+ },
158
+ "createdAt": "2026-01-01T00:02:00.000Z"
159
+ },
160
+ {
161
+ "seq": 16,
162
+ "type": "WORKFLOW_TASK_COMPLETED",
163
+ "payload": {
164
+ "taskId": "run-1-task-4"
165
+ },
166
+ "createdAt": "2026-01-01T00:02:00.000Z",
167
+ "taskId": "run-1-task-4"
168
+ },
169
+ {
170
+ "seq": 17,
171
+ "type": "WORKFLOW_COMPLETED",
172
+ "payload": {
173
+ "output": {
174
+ "items": [
175
+ "one",
176
+ "two",
177
+ "three"
178
+ ]
179
+ }
180
+ },
181
+ "createdAt": "2026-01-01T00:02:00.000Z",
182
+ "taskId": "run-1-task-4"
183
+ }
184
+ ],
185
+ "expected": {
186
+ "protocol": 1,
187
+ "outcome": "commands",
188
+ "commands": [],
189
+ "logs": []
190
+ }
191
+ }