@fluidgrids/workflows 2026.1029.1 → 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 (118) hide show
  1. package/README.md +112 -4
  2. package/dist/{activation-CESehfYi.d.cts → activation-DqUfpHzk.d.cts} +1 -1
  3. package/dist/{activation-BnVQMv9y.d.ts → activation-xpx1oWuo.d.ts} +1 -1
  4. package/dist/{chunk-MJ5TGYVG.js → chunk-2D3MYIIF.js} +969 -153
  5. package/dist/{chunk-2B37XAFQ.cjs → chunk-3U2NU7YC.cjs} +24 -11
  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-2DDULZFM.js → chunk-5HIVIV53.js} +86 -75
  9. package/dist/chunk-5MFVJM76.js +1222 -0
  10. package/dist/{chunk-EWYADREB.cjs → chunk-672KMMBK.cjs} +2 -2
  11. package/dist/{chunk-KXJDRQ6G.js → chunk-6A2FGSUS.js} +22 -2
  12. package/dist/{chunk-OIX4O6UR.js → chunk-6OLN6BMB.js} +16 -3
  13. package/dist/{chunk-6FSHT5IL.js → chunk-7EZIANC7.js} +1 -1
  14. package/dist/chunk-A5SXCA62.cjs +93 -0
  15. package/dist/chunk-AC6ZEXVR.js +85 -0
  16. package/dist/{chunk-FWBRQWRX.js → chunk-AE5Q6ZAJ.js} +167 -10
  17. package/dist/{chunk-7ILGCUI6.js → chunk-C4F5KJTI.js} +142 -3
  18. package/dist/{chunk-WXXNCHUY.js → chunk-G5H32GIG.js} +1 -1
  19. package/dist/{chunk-OMY3CKUZ.cjs → chunk-GEQDGUGB.cjs} +1042 -226
  20. package/dist/{chunk-25BKWR2O.js → chunk-HCM7ZC7Q.js} +1 -1
  21. package/dist/{chunk-I47EENR4.cjs → chunk-HMZUGSMU.cjs} +673 -156
  22. package/dist/{chunk-NXFBVDOI.cjs → chunk-IQPXHQQQ.cjs} +8 -4
  23. package/dist/{chunk-RUQIMTN5.cjs → chunk-ISOIA7NV.cjs} +178 -15
  24. package/dist/chunk-JSC75O5C.cjs +167 -0
  25. package/dist/{chunk-BD7ZPG53.js → chunk-NWQ5WRLE.js} +10 -2
  26. package/dist/chunk-ODZ2IAR2.cjs +1247 -0
  27. package/dist/{chunk-FQSJI5NV.js → chunk-SR7TR5KX.js} +6 -2
  28. package/dist/{chunk-OKX3FYIM.cjs → chunk-TCTE7DX5.cjs} +3 -3
  29. package/dist/{chunk-3FIDHONL.cjs → chunk-TYF56RGB.cjs} +99 -80
  30. package/dist/{chunk-J3PYFGKA.cjs → chunk-VA4OFR72.cjs} +162 -4
  31. package/dist/chunk-VU5S5A7V.js +150 -0
  32. package/dist/{chunk-A36CCOWS.js → chunk-YEHR4NNE.js} +633 -128
  33. package/dist/{chunk-ELL2RBML.cjs → chunk-ZCGKGDCL.cjs} +23 -1
  34. package/dist/codegen/index.d.cts +2 -2
  35. package/dist/codegen/index.d.ts +2 -2
  36. package/dist/{collect-BTHjQaSp.d.ts → collect-6NIEufHd.d.ts} +20 -3
  37. package/dist/{collect-CSyOg5XC.d.cts → collect-CcTCKqx6.d.cts} +20 -3
  38. package/dist/{file-cgL9l9l8.d.cts → file-BxYpwjRQ.d.cts} +250 -15
  39. package/dist/{file-olQudcx5.d.ts → file-CFdPQJI9.d.ts} +250 -15
  40. package/dist/history/index.cjs +283 -106
  41. package/dist/history/index.d.cts +549 -10
  42. package/dist/history/index.d.ts +549 -10
  43. package/dist/history/index.js +5 -4
  44. package/dist/index.cjs +146 -53
  45. package/dist/index.d.cts +38 -14
  46. package/dist/index.d.ts +38 -14
  47. package/dist/index.js +6 -5
  48. package/dist/interceptors-CNcr2dlk.d.ts +159 -0
  49. package/dist/interceptors-CqkNZVfI.d.cts +159 -0
  50. package/dist/ir/index.cjs +339 -36
  51. package/dist/ir/index.d.cts +244 -8
  52. package/dist/ir/index.d.ts +244 -8
  53. package/dist/ir/index.js +306 -21
  54. package/dist/{lower-3S6PsqjJ.d.cts → lower-BtRfIW2A.d.cts} +23 -9
  55. package/dist/{lower-DmZpQ8hJ.d.ts → lower-CpsMFOFX.d.ts} +23 -9
  56. package/dist/{manifest-BJjrQt77.d.ts → manifest-D-I_twys.d.ts} +1 -1
  57. package/dist/{manifest-gRI2Q5Fj.d.cts → manifest-DahBQVM8.d.cts} +1 -1
  58. package/dist/node-evaluator-DGQDPSPI.cjs +24 -0
  59. package/dist/node-evaluator-LEEVD7H7.js +14 -0
  60. package/dist/payload-fields-BVRQn2yH.d.cts +122 -0
  61. package/dist/payload-fields-oOBWxDiG.d.ts +122 -0
  62. package/dist/quickjs/index.cjs +27 -27
  63. package/dist/quickjs/index.d.cts +6 -6
  64. package/dist/quickjs/index.d.ts +6 -6
  65. package/dist/quickjs/index.js +9 -9
  66. package/dist/roundtrip/index.cjs +72 -66
  67. package/dist/roundtrip/index.d.cts +25 -11
  68. package/dist/roundtrip/index.d.ts +25 -11
  69. package/dist/roundtrip/index.js +13 -11
  70. package/dist/runtime/index.cjs +19 -19
  71. package/dist/runtime/index.d.cts +139 -12
  72. package/dist/runtime/index.d.ts +139 -12
  73. package/dist/runtime/index.js +6 -6
  74. package/dist/testing/index.cjs +688 -121
  75. package/dist/testing/index.d.cts +174 -10
  76. package/dist/testing/index.d.ts +174 -10
  77. package/dist/testing/index.js +646 -82
  78. package/dist/{types-CnIOinoz.d.ts → types-Bv2i4cBX.d.cts} +126 -23
  79. package/dist/{types-CQKOhPTa.d.cts → types-DGx-b9eq.d.ts} +126 -23
  80. package/dist/{types-Bb2wRnJ5.d.cts → types-V7jEEUaL.d.cts} +1 -1
  81. package/dist/{types-Bb2wRnJ5.d.ts → types-V7jEEUaL.d.ts} +1 -1
  82. package/dist/{workflow-8uRU9rhL.d.ts → workflow-B18OeF7g.d.ts} +2 -2
  83. package/dist/{workflow-DWTPHFbt.d.ts → workflow-BGnv8SS6.d.ts} +261 -14
  84. package/dist/{workflow-CZOXUlQ5.d.cts → workflow-BJPFv3cp.d.cts} +2 -2
  85. package/dist/{workflow-O6e64ZcG.d.cts → workflow-DS32Gtws.d.cts} +261 -14
  86. package/fixtures/histories/activity-options-updated.history.json +159 -0
  87. package/fixtures/histories/activity-paused-unpaused.history.json +160 -0
  88. package/fixtures/histories/codec-opaque.history.json +229 -0
  89. package/fixtures/histories/dynamic-workflow.history.json +150 -0
  90. package/fixtures/histories/interceptor-headers.history.json +339 -0
  91. package/fixtures/histories/query-custom.history.json +213 -0
  92. package/fixtures/histories/query-default-handler.history.json +120 -0
  93. package/fixtures/histories/reset-forked-reapplied-signals.history.json +239 -0
  94. package/fixtures/histories/reset-reapplied-update-admitted.history.json +228 -0
  95. package/fixtures/histories/search-attributes-upserted.history.json +177 -0
  96. package/fixtures/histories/update-accepted-completed.history.json +45 -30
  97. package/fixtures/histories/update-default-handler.history.json +246 -0
  98. package/fixtures/histories/update-handler-awaits-activity.history.json +196 -0
  99. package/fixtures/histories/update-not-handled.history.json +138 -0
  100. package/fixtures/histories/update-rejected-no-event.history.json +190 -0
  101. package/fixtures/histories/update-with-start-admitted.history.json +150 -0
  102. package/fixtures/histories/user-activity-cancel.history.json +149 -0
  103. package/fixtures/histories/user-activity-retry.history.json +143 -0
  104. package/fixtures/histories/user-activity.history.json +149 -0
  105. package/package.json +1 -1
  106. package/schema/bridge-v2.schema.json +1062 -0
  107. package/schema/history-file.schema.json +255 -81
  108. package/schema/ir-v2.schema.json +246 -1
  109. package/schema/payload-fields.json +162 -0
  110. package/schema/run-event.schema.json +239 -80
  111. package/schema/workflow-command.schema.json +210 -84
  112. package/schema/workflow-task.schema.json +532 -167
  113. package/dist/chunk-6QPOJZT6.cjs +0 -1180
  114. package/dist/chunk-A2OHX3UQ.js +0 -1156
  115. package/dist/chunk-PWIUEWC3.js +0 -81
  116. package/dist/chunk-YHBVMOMK.cjs +0 -87
  117. package/dist/node-evaluator-SOADN23V.js +0 -14
  118. package/dist/node-evaluator-YGDEXK4U.cjs +0 -24
@@ -0,0 +1,138 @@
1
+ {
2
+ "format": "fluidgrids.history",
3
+ "formatVersion": 1,
4
+ "name": "update-not-handled",
5
+ "description": "An update with no handler is rejected at the end of its activation (UpdateNotHandled) and leaves no event; the run goes on.",
6
+ "source": "src/phase-c-updates.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": "addressBook",
17
+ "events": [
18
+ {
19
+ "seq": 1,
20
+ "type": "WORKFLOW_STARTED",
21
+ "payload": {
22
+ "workflowFn": "addressBook",
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": "WORKFLOW_TASK_SCHEDULED",
58
+ "payload": {
59
+ "taskId": "run-1-task-2"
60
+ },
61
+ "createdAt": "2026-01-01T00:00:00.000Z"
62
+ },
63
+ {
64
+ "seq": 6,
65
+ "type": "WORKFLOW_TASK_STARTED",
66
+ "payload": {
67
+ "taskId": "run-1-task-2",
68
+ "attempt": 1
69
+ },
70
+ "createdAt": "2026-01-01T00:00:00.000Z"
71
+ },
72
+ {
73
+ "seq": 7,
74
+ "type": "WORKFLOW_TASK_COMPLETED",
75
+ "payload": {
76
+ "taskId": "run-1-task-2"
77
+ },
78
+ "createdAt": "2026-01-01T00:00:00.000Z",
79
+ "taskId": "run-1-task-2"
80
+ },
81
+ {
82
+ "seq": 8,
83
+ "type": "SIGNAL_RECEIVED",
84
+ "payload": {
85
+ "name": "approve",
86
+ "payload": {
87
+ "by": "cy"
88
+ },
89
+ "receivedAt": "2026-01-01T00:00:00.000Z"
90
+ },
91
+ "createdAt": "2026-01-01T00:00:00.000Z"
92
+ },
93
+ {
94
+ "seq": 9,
95
+ "type": "WORKFLOW_TASK_SCHEDULED",
96
+ "payload": {
97
+ "taskId": "run-1-task-3"
98
+ },
99
+ "createdAt": "2026-01-01T00:00:00.000Z"
100
+ },
101
+ {
102
+ "seq": 10,
103
+ "type": "WORKFLOW_TASK_STARTED",
104
+ "payload": {
105
+ "taskId": "run-1-task-3",
106
+ "attempt": 1
107
+ },
108
+ "createdAt": "2026-01-01T00:00:00.000Z"
109
+ },
110
+ {
111
+ "seq": 11,
112
+ "type": "WORKFLOW_TASK_COMPLETED",
113
+ "payload": {
114
+ "taskId": "run-1-task-3"
115
+ },
116
+ "createdAt": "2026-01-01T00:00:00.000Z",
117
+ "taskId": "run-1-task-3"
118
+ },
119
+ {
120
+ "seq": 12,
121
+ "type": "WORKFLOW_COMPLETED",
122
+ "payload": {
123
+ "output": {
124
+ "approvedBy": "cy",
125
+ "address": ""
126
+ }
127
+ },
128
+ "createdAt": "2026-01-01T00:00:00.000Z",
129
+ "taskId": "run-1-task-3"
130
+ }
131
+ ],
132
+ "expected": {
133
+ "protocol": 1,
134
+ "outcome": "commands",
135
+ "commands": [],
136
+ "logs": []
137
+ }
138
+ }
@@ -0,0 +1,190 @@
1
+ {
2
+ "format": "fluidgrids.history",
3
+ "formatVersion": 1,
4
+ "name": "update-rejected-no-event",
5
+ "description": "The validator rejects an empty address: nothing is written to history (11 §2.39); the next update is accepted and completed.",
6
+ "source": "src/phase-c-updates.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": "addressBook",
17
+ "events": [
18
+ {
19
+ "seq": 1,
20
+ "type": "WORKFLOW_STARTED",
21
+ "payload": {
22
+ "workflowFn": "addressBook",
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": "WORKFLOW_TASK_SCHEDULED",
58
+ "payload": {
59
+ "taskId": "run-1-task-2"
60
+ },
61
+ "createdAt": "2026-01-01T00:00:00.000Z"
62
+ },
63
+ {
64
+ "seq": 6,
65
+ "type": "WORKFLOW_TASK_STARTED",
66
+ "payload": {
67
+ "taskId": "run-1-task-2",
68
+ "attempt": 1
69
+ },
70
+ "createdAt": "2026-01-01T00:00:00.000Z"
71
+ },
72
+ {
73
+ "seq": 7,
74
+ "type": "WORKFLOW_TASK_COMPLETED",
75
+ "payload": {
76
+ "taskId": "run-1-task-2"
77
+ },
78
+ "createdAt": "2026-01-01T00:00:00.000Z",
79
+ "taskId": "run-1-task-2"
80
+ },
81
+ {
82
+ "seq": 8,
83
+ "type": "WORKFLOW_TASK_SCHEDULED",
84
+ "payload": {
85
+ "taskId": "run-1-task-3"
86
+ },
87
+ "createdAt": "2026-01-01T00:00:00.000Z"
88
+ },
89
+ {
90
+ "seq": 9,
91
+ "type": "WORKFLOW_TASK_STARTED",
92
+ "payload": {
93
+ "taskId": "run-1-task-3",
94
+ "attempt": 1
95
+ },
96
+ "createdAt": "2026-01-01T00:00:00.000Z"
97
+ },
98
+ {
99
+ "seq": 10,
100
+ "type": "WORKFLOW_TASK_COMPLETED",
101
+ "payload": {
102
+ "taskId": "run-1-task-3"
103
+ },
104
+ "createdAt": "2026-01-01T00:00:00.000Z",
105
+ "taskId": "run-1-task-3"
106
+ },
107
+ {
108
+ "seq": 11,
109
+ "type": "UPDATE_ACCEPTED",
110
+ "payload": {
111
+ "updateId": "u2",
112
+ "name": "changeAddress",
113
+ "args": {
114
+ "address": "2 Side St"
115
+ }
116
+ },
117
+ "createdAt": "2026-01-01T00:00:00.000Z",
118
+ "taskId": "run-1-task-3"
119
+ },
120
+ {
121
+ "seq": 12,
122
+ "type": "UPDATE_COMPLETED",
123
+ "payload": {
124
+ "updateId": "u2",
125
+ "result": {
126
+ "accepted": true,
127
+ "address": "2 Side St"
128
+ }
129
+ },
130
+ "createdAt": "2026-01-01T00:00:00.000Z",
131
+ "taskId": "run-1-task-3"
132
+ },
133
+ {
134
+ "seq": 13,
135
+ "type": "SIGNAL_RECEIVED",
136
+ "payload": {
137
+ "name": "approve",
138
+ "payload": {
139
+ "by": "ana"
140
+ },
141
+ "receivedAt": "2026-01-01T00:00:00.000Z"
142
+ },
143
+ "createdAt": "2026-01-01T00:00:00.000Z"
144
+ },
145
+ {
146
+ "seq": 14,
147
+ "type": "WORKFLOW_TASK_SCHEDULED",
148
+ "payload": {
149
+ "taskId": "run-1-task-4"
150
+ },
151
+ "createdAt": "2026-01-01T00:00:00.000Z"
152
+ },
153
+ {
154
+ "seq": 15,
155
+ "type": "WORKFLOW_TASK_STARTED",
156
+ "payload": {
157
+ "taskId": "run-1-task-4",
158
+ "attempt": 1
159
+ },
160
+ "createdAt": "2026-01-01T00:00:00.000Z"
161
+ },
162
+ {
163
+ "seq": 16,
164
+ "type": "WORKFLOW_TASK_COMPLETED",
165
+ "payload": {
166
+ "taskId": "run-1-task-4"
167
+ },
168
+ "createdAt": "2026-01-01T00:00:00.000Z",
169
+ "taskId": "run-1-task-4"
170
+ },
171
+ {
172
+ "seq": 17,
173
+ "type": "WORKFLOW_COMPLETED",
174
+ "payload": {
175
+ "output": {
176
+ "approvedBy": "ana",
177
+ "address": "2 Side St"
178
+ }
179
+ },
180
+ "createdAt": "2026-01-01T00:00:00.000Z",
181
+ "taskId": "run-1-task-4"
182
+ }
183
+ ],
184
+ "expected": {
185
+ "protocol": 1,
186
+ "outcome": "commands",
187
+ "commands": [],
188
+ "logs": []
189
+ }
190
+ }
@@ -0,0 +1,150 @@
1
+ {
2
+ "format": "fluidgrids.history",
3
+ "formatVersion": 1,
4
+ "name": "update-with-start-admitted",
5
+ "description": "Update-with-start: UPDATE_ADMITTED right after WORKFLOW_STARTED is the first thing the function handles; its validator runs, then UPDATE_ACCEPTED and UPDATE_COMPLETED.",
6
+ "source": "src/phase-c-updates.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": "addressBook",
17
+ "events": [
18
+ {
19
+ "seq": 1,
20
+ "type": "WORKFLOW_STARTED",
21
+ "payload": {
22
+ "workflowFn": "addressBook",
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": "UPDATE_ADMITTED",
32
+ "payload": {
33
+ "updateId": "u1",
34
+ "name": "changeAddress",
35
+ "args": {
36
+ "address": "3 First St"
37
+ }
38
+ },
39
+ "createdAt": "2026-01-01T00:00:00.000Z"
40
+ },
41
+ {
42
+ "seq": 3,
43
+ "type": "WORKFLOW_TASK_SCHEDULED",
44
+ "payload": {
45
+ "taskId": "run-1-task-1"
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": "UPDATE_ACCEPTED",
70
+ "payload": {
71
+ "updateId": "u1",
72
+ "name": "changeAddress",
73
+ "args": {
74
+ "address": "3 First St"
75
+ }
76
+ },
77
+ "createdAt": "2026-01-01T00:00:00.000Z",
78
+ "taskId": "run-1-task-1"
79
+ },
80
+ {
81
+ "seq": 7,
82
+ "type": "UPDATE_COMPLETED",
83
+ "payload": {
84
+ "updateId": "u1",
85
+ "result": {
86
+ "accepted": true,
87
+ "address": "3 First St"
88
+ }
89
+ },
90
+ "createdAt": "2026-01-01T00:00:00.000Z",
91
+ "taskId": "run-1-task-1"
92
+ },
93
+ {
94
+ "seq": 8,
95
+ "type": "SIGNAL_RECEIVED",
96
+ "payload": {
97
+ "name": "approve",
98
+ "payload": {
99
+ "by": "bo"
100
+ },
101
+ "receivedAt": "2026-01-01T00:00:00.000Z"
102
+ },
103
+ "createdAt": "2026-01-01T00:00:00.000Z"
104
+ },
105
+ {
106
+ "seq": 9,
107
+ "type": "WORKFLOW_TASK_SCHEDULED",
108
+ "payload": {
109
+ "taskId": "run-1-task-2"
110
+ },
111
+ "createdAt": "2026-01-01T00:00:00.000Z"
112
+ },
113
+ {
114
+ "seq": 10,
115
+ "type": "WORKFLOW_TASK_STARTED",
116
+ "payload": {
117
+ "taskId": "run-1-task-2",
118
+ "attempt": 1
119
+ },
120
+ "createdAt": "2026-01-01T00:00:00.000Z"
121
+ },
122
+ {
123
+ "seq": 11,
124
+ "type": "WORKFLOW_TASK_COMPLETED",
125
+ "payload": {
126
+ "taskId": "run-1-task-2"
127
+ },
128
+ "createdAt": "2026-01-01T00:00:00.000Z",
129
+ "taskId": "run-1-task-2"
130
+ },
131
+ {
132
+ "seq": 12,
133
+ "type": "WORKFLOW_COMPLETED",
134
+ "payload": {
135
+ "output": {
136
+ "approvedBy": "bo",
137
+ "address": "3 First St"
138
+ }
139
+ },
140
+ "createdAt": "2026-01-01T00:00:00.000Z",
141
+ "taskId": "run-1-task-2"
142
+ }
143
+ ],
144
+ "expected": {
145
+ "protocol": 1,
146
+ "outcome": "commands",
147
+ "commands": [],
148
+ "logs": []
149
+ }
150
+ }
@@ -0,0 +1,149 @@
1
+ {
2
+ "format": "fluidgrids.history",
3
+ "formatVersion": 1,
4
+ "name": "user-activity-cancel",
5
+ "description": "A scope timeout cancels a user activity whose queue no worker polls: TRY_CANCEL records ACTIVITY_CANCEL_REQUESTED and rejects at once, and the workflow catches the cancellation and completes in the same task.",
6
+ "source": "src/phase-c-activities.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": 1767225660000,
16
+ "workflowFn": "userCancel",
17
+ "events": [
18
+ {
19
+ "seq": 1,
20
+ "type": "WORKFLOW_STARTED",
21
+ "payload": {
22
+ "workflowFn": "userCancel",
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": "TIMER_STARTED",
58
+ "payload": {
59
+ "timerId": "t1",
60
+ "durationMs": 60000,
61
+ "fireAt": "2026-01-01T00:01:00.000Z"
62
+ },
63
+ "createdAt": "2026-01-01T00:00:00.000Z",
64
+ "taskId": "run-1-task-1"
65
+ },
66
+ {
67
+ "seq": 6,
68
+ "type": "ACTIVITY_SCHEDULED",
69
+ "payload": {
70
+ "activityId": "a1",
71
+ "kind": "user",
72
+ "activityName": "billing.charge",
73
+ "taskQueue": "payments",
74
+ "args": {
75
+ "amount": 1
76
+ },
77
+ "retry": {
78
+ "retryDelay": 1000,
79
+ "backoffMultiplier": 2,
80
+ "maxDelay": 100000
81
+ },
82
+ "cancellationType": "TRY_CANCEL"
83
+ },
84
+ "createdAt": "2026-01-01T00:00:00.000Z",
85
+ "taskId": "run-1-task-1"
86
+ },
87
+ {
88
+ "seq": 7,
89
+ "type": "TIMER_FIRED",
90
+ "payload": {
91
+ "timerId": "t1"
92
+ },
93
+ "createdAt": "2026-01-01T00:01:00.000Z"
94
+ },
95
+ {
96
+ "seq": 8,
97
+ "type": "WORKFLOW_TASK_SCHEDULED",
98
+ "payload": {
99
+ "taskId": "run-1-task-2"
100
+ },
101
+ "createdAt": "2026-01-01T00:01:00.000Z"
102
+ },
103
+ {
104
+ "seq": 9,
105
+ "type": "WORKFLOW_TASK_STARTED",
106
+ "payload": {
107
+ "taskId": "run-1-task-2",
108
+ "attempt": 1
109
+ },
110
+ "createdAt": "2026-01-01T00:01:00.000Z"
111
+ },
112
+ {
113
+ "seq": 10,
114
+ "type": "WORKFLOW_TASK_COMPLETED",
115
+ "payload": {
116
+ "taskId": "run-1-task-2"
117
+ },
118
+ "createdAt": "2026-01-01T00:01:00.000Z",
119
+ "taskId": "run-1-task-2"
120
+ },
121
+ {
122
+ "seq": 11,
123
+ "type": "ACTIVITY_CANCEL_REQUESTED",
124
+ "payload": {
125
+ "activityId": "a1"
126
+ },
127
+ "createdAt": "2026-01-01T00:01:00.000Z",
128
+ "taskId": "run-1-task-2"
129
+ },
130
+ {
131
+ "seq": 12,
132
+ "type": "WORKFLOW_COMPLETED",
133
+ "payload": {
134
+ "output": {
135
+ "cancelled": true,
136
+ "activity": true
137
+ }
138
+ },
139
+ "createdAt": "2026-01-01T00:01:00.000Z",
140
+ "taskId": "run-1-task-2"
141
+ }
142
+ ],
143
+ "expected": {
144
+ "protocol": 1,
145
+ "outcome": "commands",
146
+ "commands": [],
147
+ "logs": []
148
+ }
149
+ }