rivetkit 2.3.11-rc.9 → 2.3.11

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 (152) hide show
  1. package/dist/browser/client.d.ts +96 -14
  2. package/dist/browser/client.js +12 -2
  3. package/dist/browser/client.js.map +1 -1
  4. package/dist/browser/inspector/client.d.ts +139 -139
  5. package/dist/browser/inspector/client.js +12 -2
  6. package/dist/browser/inspector/client.js.map +1 -1
  7. package/dist/tsup/agent-os/index.cjs +146 -76
  8. package/dist/tsup/agent-os/index.cjs.map +1 -1
  9. package/dist/tsup/agent-os/index.d.cts +83 -9
  10. package/dist/tsup/agent-os/index.d.ts +83 -9
  11. package/dist/tsup/agent-os/index.js +146 -76
  12. package/dist/tsup/agent-os/index.js.map +1 -1
  13. package/dist/tsup/{chunk-HOZ3ZLZ2.js → chunk-3ZR542SK.js} +6 -6
  14. package/dist/tsup/chunk-3ZR542SK.js.map +1 -0
  15. package/dist/tsup/{chunk-HNHLBM3Y.cjs → chunk-4KGXFC6M.cjs} +42 -5
  16. package/dist/tsup/chunk-4KGXFC6M.cjs.map +1 -0
  17. package/dist/tsup/chunk-5UYWLCRO.js +14 -0
  18. package/dist/tsup/chunk-5UYWLCRO.js.map +1 -0
  19. package/dist/tsup/{chunk-QWLJCP3X.js → chunk-6W5VGLFT.js} +42 -5
  20. package/dist/tsup/chunk-6W5VGLFT.js.map +1 -0
  21. package/dist/tsup/chunk-6WYATRS4.js +243 -0
  22. package/dist/tsup/chunk-6WYATRS4.js.map +1 -0
  23. package/dist/tsup/chunk-B3W74FBB.cjs +14 -0
  24. package/dist/tsup/chunk-B3W74FBB.cjs.map +1 -0
  25. package/dist/tsup/{chunk-XOOESJY7.js → chunk-FWROC5LA.js} +2 -2
  26. package/dist/tsup/{chunk-V5CVATRU.cjs → chunk-GLIPKKEC.cjs} +7 -7
  27. package/dist/tsup/{chunk-V5CVATRU.cjs.map → chunk-GLIPKKEC.cjs.map} +1 -1
  28. package/dist/tsup/{chunk-T5XVTVQY.cjs → chunk-GN2EUMEW.cjs} +3 -3
  29. package/dist/tsup/{chunk-T5XVTVQY.cjs.map → chunk-GN2EUMEW.cjs.map} +1 -1
  30. package/dist/tsup/{chunk-T56IZ42M.cjs → chunk-GU7ML3KE.cjs} +13 -3
  31. package/dist/tsup/chunk-GU7ML3KE.cjs.map +1 -0
  32. package/dist/tsup/{chunk-IOLZ3ONU.js → chunk-JQ2AZ5FN.js} +3 -3
  33. package/dist/tsup/{chunk-7AFZMFPQ.js → chunk-JTHHCZCZ.js} +10 -1
  34. package/dist/tsup/chunk-JTHHCZCZ.js.map +1 -0
  35. package/dist/tsup/{chunk-UEULFXUI.cjs → chunk-KVFIONKQ.cjs} +11 -2
  36. package/dist/tsup/chunk-KVFIONKQ.cjs.map +1 -0
  37. package/dist/tsup/chunk-LWQFXGKS.cjs +243 -0
  38. package/dist/tsup/chunk-LWQFXGKS.cjs.map +1 -0
  39. package/dist/tsup/{chunk-QVCO6DTZ.js → chunk-MO2SSUOR.js} +8 -7
  40. package/dist/tsup/chunk-MO2SSUOR.js.map +1 -0
  41. package/dist/tsup/{chunk-LZ4TSBIP.js → chunk-OUENKQHB.js} +13 -3
  42. package/dist/tsup/chunk-OUENKQHB.js.map +1 -0
  43. package/dist/tsup/{chunk-6SBPWTXJ.cjs → chunk-PUZY2XCD.cjs} +10 -9
  44. package/dist/tsup/chunk-PUZY2XCD.cjs.map +1 -0
  45. package/dist/tsup/{chunk-C5TORAVP.js → chunk-QFJ24MBU.js} +27 -2
  46. package/dist/tsup/{chunk-C5TORAVP.js.map → chunk-QFJ24MBU.js.map} +1 -1
  47. package/dist/tsup/{chunk-BZWKY6WO.cjs → chunk-RXXDNJXB.cjs} +140 -140
  48. package/dist/tsup/{chunk-BZWKY6WO.cjs.map → chunk-RXXDNJXB.cjs.map} +1 -1
  49. package/dist/tsup/{chunk-IMRDHZM2.cjs → chunk-VBJQIBXI.cjs} +30 -5
  50. package/dist/tsup/chunk-VBJQIBXI.cjs.map +1 -0
  51. package/dist/tsup/client/mod.cjs +6 -6
  52. package/dist/tsup/client/mod.d.cts +4 -3
  53. package/dist/tsup/client/mod.d.ts +4 -3
  54. package/dist/tsup/client/mod.js +5 -5
  55. package/dist/tsup/common/log.cjs +2 -2
  56. package/dist/tsup/common/log.js +1 -1
  57. package/dist/tsup/common/websocket.cjs +3 -3
  58. package/dist/tsup/common/websocket.js +2 -2
  59. package/dist/tsup/{config-CZcjyT5B.d.ts → config-C4OSv0QP.d.ts} +92 -7
  60. package/dist/tsup/{config-rGWrumlO.d.cts → config-DTGoWdkG.d.cts} +92 -7
  61. package/dist/tsup/{config-BxOimoGX.d.cts → config-ey2I2zz5.d.cts} +46 -6
  62. package/dist/tsup/{config-BxOimoGX.d.ts → config-ey2I2zz5.d.ts} +46 -6
  63. package/dist/tsup/{context-B8W8E8nW.d.cts → context-C6cvDNyk.d.cts} +2 -2
  64. package/dist/tsup/{context-_UrDZhEh.d.ts → context-CMygeBxS.d.ts} +2 -2
  65. package/dist/tsup/db/drizzle.cjs +18 -10
  66. package/dist/tsup/db/drizzle.cjs.map +1 -1
  67. package/dist/tsup/db/drizzle.d.cts +5 -6
  68. package/dist/tsup/db/drizzle.d.ts +5 -6
  69. package/dist/tsup/db/drizzle.js +13 -5
  70. package/dist/tsup/db/drizzle.js.map +1 -1
  71. package/dist/tsup/db/mod.cjs +5 -175
  72. package/dist/tsup/db/mod.cjs.map +1 -1
  73. package/dist/tsup/db/mod.d.cts +11 -4
  74. package/dist/tsup/db/mod.d.ts +11 -4
  75. package/dist/tsup/db/mod.js +4 -174
  76. package/dist/tsup/db/mod.js.map +1 -1
  77. package/dist/tsup/dynamic/mod.cjs +2 -2
  78. package/dist/tsup/dynamic/mod.d.cts +3 -2
  79. package/dist/tsup/dynamic/mod.d.ts +3 -2
  80. package/dist/tsup/dynamic/mod.js +1 -1
  81. package/dist/tsup/inspector/mod.cjs +5 -4
  82. package/dist/tsup/inspector/mod.cjs.map +1 -1
  83. package/dist/tsup/inspector/mod.d.cts +12 -146
  84. package/dist/tsup/inspector/mod.d.ts +12 -146
  85. package/dist/tsup/inspector/mod.js +4 -3
  86. package/dist/tsup/inspector/mod.js.map +1 -1
  87. package/dist/tsup/inspector/workflow.cjs +21 -0
  88. package/dist/tsup/inspector/workflow.cjs.map +1 -0
  89. package/dist/tsup/inspector/workflow.d.cts +144 -0
  90. package/dist/tsup/inspector/workflow.d.ts +144 -0
  91. package/dist/tsup/inspector/workflow.js +21 -0
  92. package/dist/tsup/inspector/workflow.js.map +1 -0
  93. package/dist/tsup/inspector-tab/mod.cjs +2 -2
  94. package/dist/tsup/inspector-tab/mod.d.cts +4 -3
  95. package/dist/tsup/inspector-tab/mod.d.ts +4 -3
  96. package/dist/tsup/inspector-tab/mod.js +1 -1
  97. package/dist/tsup/mod.cjs +743 -247
  98. package/dist/tsup/mod.cjs.map +1 -1
  99. package/dist/tsup/mod.d.cts +6 -5
  100. package/dist/tsup/mod.d.ts +6 -5
  101. package/dist/tsup/mod.js +670 -174
  102. package/dist/tsup/mod.js.map +1 -1
  103. package/dist/tsup/test/mod.cjs +7 -7
  104. package/dist/tsup/test/mod.d.cts +3 -2
  105. package/dist/tsup/test/mod.d.ts +3 -2
  106. package/dist/tsup/test/mod.js +5 -5
  107. package/dist/tsup/unstable/migrations.d.cts +1 -1
  108. package/dist/tsup/unstable/migrations.d.ts +1 -1
  109. package/dist/tsup/utils.cjs +2 -2
  110. package/dist/tsup/utils.js +1 -1
  111. package/dist/tsup/workflow/mod.cjs +89 -95
  112. package/dist/tsup/workflow/mod.cjs.map +1 -1
  113. package/dist/tsup/workflow/mod.d.cts +5 -4
  114. package/dist/tsup/workflow/mod.d.ts +5 -4
  115. package/dist/tsup/workflow/mod.js +86 -92
  116. package/dist/tsup/workflow/mod.js.map +1 -1
  117. package/package.json +19 -9
  118. package/src/actor/config.test.ts +65 -1
  119. package/src/actor/config.ts +169 -5
  120. package/src/actor/mod.ts +10 -1
  121. package/src/client/actor-common.ts +5 -14
  122. package/src/common/database/config.ts +50 -3
  123. package/src/common/database/mod.test.ts +142 -4
  124. package/src/common/database/mod.ts +210 -98
  125. package/src/common/database/native-database.ts +42 -3
  126. package/src/common/database/shared.ts +9 -0
  127. package/src/db/drizzle.test.ts +8 -1
  128. package/src/db/drizzle.ts +15 -4
  129. package/src/db/mod.ts +3 -0
  130. package/src/inspector/workflow.ts +61 -0
  131. package/src/registry/napi-runtime.ts +69 -1
  132. package/src/registry/native.ts +474 -161
  133. package/src/registry/run-handler-coordinator.test.ts +252 -0
  134. package/src/registry/run-handler-coordinator.ts +219 -0
  135. package/src/registry/runtime.ts +34 -1
  136. package/src/registry/wasm-runtime.ts +122 -17
  137. package/src/utils/node.ts +44 -28
  138. package/src/workflow/driver.ts +56 -58
  139. package/src/workflow/inspector.ts +10 -15
  140. package/src/workflow/mod.ts +48 -70
  141. package/dist/tsup/chunk-6SBPWTXJ.cjs.map +0 -1
  142. package/dist/tsup/chunk-7AFZMFPQ.js.map +0 -1
  143. package/dist/tsup/chunk-HNHLBM3Y.cjs.map +0 -1
  144. package/dist/tsup/chunk-HOZ3ZLZ2.js.map +0 -1
  145. package/dist/tsup/chunk-IMRDHZM2.cjs.map +0 -1
  146. package/dist/tsup/chunk-LZ4TSBIP.js.map +0 -1
  147. package/dist/tsup/chunk-QVCO6DTZ.js.map +0 -1
  148. package/dist/tsup/chunk-QWLJCP3X.js.map +0 -1
  149. package/dist/tsup/chunk-T56IZ42M.cjs.map +0 -1
  150. package/dist/tsup/chunk-UEULFXUI.cjs.map +0 -1
  151. /package/dist/tsup/{chunk-XOOESJY7.js.map → chunk-FWROC5LA.js.map} +0 -0
  152. /package/dist/tsup/{chunk-IOLZ3ONU.js.map → chunk-JQ2AZ5FN.js.map} +0 -0
@@ -1,13 +1,144 @@
1
1
  import * as vbare from 'vbare';
2
2
  import * as bare from '@rivetkit/bare-ts';
3
3
 
4
+ type u32 = number;
5
+ type u64 = bigint;
6
+ type WorkflowCbor = ArrayBuffer;
7
+ type WorkflowNameIndex = u32;
8
+ type WorkflowLoopIterationMarker = {
9
+ readonly loop: WorkflowNameIndex;
10
+ readonly iteration: u32;
11
+ };
12
+ type WorkflowPathSegment = {
13
+ readonly tag: "WorkflowNameIndex";
14
+ readonly val: WorkflowNameIndex;
15
+ } | {
16
+ readonly tag: "WorkflowLoopIterationMarker";
17
+ readonly val: WorkflowLoopIterationMarker;
18
+ };
19
+ type WorkflowLocation = readonly WorkflowPathSegment[];
20
+ declare enum WorkflowEntryStatus {
21
+ PENDING = "PENDING",
22
+ RUNNING = "RUNNING",
23
+ COMPLETED = "COMPLETED",
24
+ FAILED = "FAILED",
25
+ EXHAUSTED = "EXHAUSTED"
26
+ }
27
+ declare enum WorkflowSleepState {
28
+ PENDING = "PENDING",
29
+ COMPLETED = "COMPLETED",
30
+ INTERRUPTED = "INTERRUPTED"
31
+ }
32
+ declare enum WorkflowBranchStatusType {
33
+ PENDING = "PENDING",
34
+ RUNNING = "RUNNING",
35
+ COMPLETED = "COMPLETED",
36
+ FAILED = "FAILED",
37
+ CANCELLED = "CANCELLED"
38
+ }
39
+ type WorkflowStepEntry = {
40
+ readonly output: WorkflowCbor | null;
41
+ readonly error: string | null;
42
+ };
43
+ type WorkflowLoopEntry = {
44
+ readonly state: WorkflowCbor;
45
+ readonly iteration: u32;
46
+ readonly output: WorkflowCbor | null;
47
+ };
48
+ type WorkflowSleepEntry = {
49
+ readonly deadline: u64;
50
+ readonly state: WorkflowSleepState;
51
+ };
52
+ type WorkflowMessageEntry = {
53
+ readonly name: string;
54
+ readonly messageData: WorkflowCbor;
55
+ };
56
+ type WorkflowRollbackCheckpointEntry = {
57
+ readonly name: string;
58
+ };
59
+ type WorkflowBranchStatus = {
60
+ readonly status: WorkflowBranchStatusType;
61
+ readonly output: WorkflowCbor | null;
62
+ readonly error: string | null;
63
+ };
64
+ type WorkflowJoinEntry = {
65
+ readonly branches: ReadonlyMap<string, WorkflowBranchStatus>;
66
+ };
67
+ type WorkflowRaceEntry = {
68
+ readonly winner: string | null;
69
+ readonly branches: ReadonlyMap<string, WorkflowBranchStatus>;
70
+ };
71
+ type WorkflowRemovedEntry = {
72
+ readonly originalType: string;
73
+ readonly originalName: string | null;
74
+ };
75
+ type WorkflowVersionCheckEntry = {
76
+ readonly resolved: u32;
77
+ readonly latest: u32;
78
+ };
79
+ type WorkflowEntryKind = {
80
+ readonly tag: "WorkflowStepEntry";
81
+ readonly val: WorkflowStepEntry;
82
+ } | {
83
+ readonly tag: "WorkflowLoopEntry";
84
+ readonly val: WorkflowLoopEntry;
85
+ } | {
86
+ readonly tag: "WorkflowSleepEntry";
87
+ readonly val: WorkflowSleepEntry;
88
+ } | {
89
+ readonly tag: "WorkflowMessageEntry";
90
+ readonly val: WorkflowMessageEntry;
91
+ } | {
92
+ readonly tag: "WorkflowRollbackCheckpointEntry";
93
+ readonly val: WorkflowRollbackCheckpointEntry;
94
+ } | {
95
+ readonly tag: "WorkflowJoinEntry";
96
+ readonly val: WorkflowJoinEntry;
97
+ } | {
98
+ readonly tag: "WorkflowRaceEntry";
99
+ readonly val: WorkflowRaceEntry;
100
+ } | {
101
+ readonly tag: "WorkflowRemovedEntry";
102
+ readonly val: WorkflowRemovedEntry;
103
+ } | {
104
+ readonly tag: "WorkflowVersionCheckEntry";
105
+ readonly val: WorkflowVersionCheckEntry;
106
+ };
107
+ type WorkflowEntry = {
108
+ readonly id: string;
109
+ readonly location: WorkflowLocation;
110
+ readonly kind: WorkflowEntryKind;
111
+ };
112
+ type WorkflowEntryMetadata = {
113
+ readonly status: WorkflowEntryStatus;
114
+ readonly error: string | null;
115
+ readonly attempts: u32;
116
+ readonly lastAttemptAt: u64;
117
+ readonly createdAt: u64;
118
+ readonly completedAt: u64 | null;
119
+ readonly rollbackCompletedAt: u64 | null;
120
+ readonly rollbackError: string | null;
121
+ };
122
+ type WorkflowHistory$1 = {
123
+ readonly nameRegistry: readonly string[];
124
+ readonly entries: readonly WorkflowEntry[];
125
+ readonly entryMetadata: ReadonlyMap<string, WorkflowEntryMetadata>;
126
+ };
127
+
128
+ declare const workflowHistoryBare: unique symbol;
129
+ type WorkflowHistoryBytes = ArrayBuffer & {
130
+ readonly [workflowHistoryBare]: true;
131
+ };
132
+ declare function encodeWorkflowHistoryTransport(history: WorkflowHistory$1): WorkflowHistoryBytes;
133
+ declare function decodeWorkflowHistoryTransport(data: ArrayBuffer | ArrayBufferView): WorkflowHistory$1;
134
+
4
135
  type uint = bigint;
5
136
  type State = ArrayBuffer;
6
137
  declare function readState(bc: bare.ByteCursor): State;
7
138
  declare function writeState(bc: bare.ByteCursor, x: State): void;
8
- type WorkflowHistory$1 = ArrayBuffer;
9
- declare function readWorkflowHistory(bc: bare.ByteCursor): WorkflowHistory$1;
10
- declare function writeWorkflowHistory(bc: bare.ByteCursor, x: WorkflowHistory$1): void;
139
+ type WorkflowHistory = ArrayBuffer;
140
+ declare function readWorkflowHistory(bc: bare.ByteCursor): WorkflowHistory;
141
+ declare function writeWorkflowHistory(bc: bare.ByteCursor, x: WorkflowHistory): void;
11
142
  type PatchStateRequest = {
12
143
  readonly state: ArrayBuffer;
13
144
  };
@@ -202,7 +333,7 @@ type Init = {
202
333
  readonly rpcs: readonly string[];
203
334
  readonly isDatabaseEnabled: boolean;
204
335
  readonly queueSize: uint;
205
- readonly workflowHistory: WorkflowHistory$1 | null;
336
+ readonly workflowHistory: WorkflowHistory | null;
206
337
  readonly isWorkflowEnabled: boolean;
207
338
  readonly tabConfig: readonly TabConfigEntry[];
208
339
  readonly schedules: readonly Schedule[];
@@ -257,14 +388,14 @@ declare function readQueueResponse(bc: bare.ByteCursor): QueueResponse;
257
388
  declare function writeQueueResponse(bc: bare.ByteCursor, x: QueueResponse): void;
258
389
  type WorkflowHistoryResponse = {
259
390
  readonly rid: uint;
260
- readonly history: WorkflowHistory$1 | null;
391
+ readonly history: WorkflowHistory | null;
261
392
  readonly isWorkflowEnabled: boolean;
262
393
  };
263
394
  declare function readWorkflowHistoryResponse(bc: bare.ByteCursor): WorkflowHistoryResponse;
264
395
  declare function writeWorkflowHistoryResponse(bc: bare.ByteCursor, x: WorkflowHistoryResponse): void;
265
396
  type WorkflowReplayResponse = {
266
397
  readonly rid: uint;
267
- readonly history: WorkflowHistory$1 | null;
398
+ readonly history: WorkflowHistory | null;
268
399
  readonly isWorkflowEnabled: boolean;
269
400
  };
270
401
  declare function readWorkflowReplayResponse(bc: bare.ByteCursor): WorkflowReplayResponse;
@@ -312,7 +443,7 @@ type QueueUpdated = {
312
443
  declare function readQueueUpdated(bc: bare.ByteCursor): QueueUpdated;
313
444
  declare function writeQueueUpdated(bc: bare.ByteCursor, x: QueueUpdated): void;
314
445
  type WorkflowHistoryUpdated = {
315
- readonly history: WorkflowHistory$1;
446
+ readonly history: WorkflowHistory;
316
447
  };
317
448
  declare function readWorkflowHistoryUpdated(bc: bare.ByteCursor): WorkflowHistoryUpdated;
318
449
  declare function writeWorkflowHistoryUpdated(bc: bare.ByteCursor, x: WorkflowHistoryUpdated): void;
@@ -408,139 +539,8 @@ declare function writeToClient(bc: bare.ByteCursor, x: ToClient): void;
408
539
  declare function encodeToClient(x: ToClient, config?: Partial<bare.Config>): Uint8Array;
409
540
  declare function decodeToClient(bytes: Uint8Array): ToClient;
410
541
 
411
- type u32 = number;
412
- type u64 = bigint;
413
- type WorkflowCbor = ArrayBuffer;
414
- type WorkflowNameIndex = u32;
415
- type WorkflowLoopIterationMarker = {
416
- readonly loop: WorkflowNameIndex;
417
- readonly iteration: u32;
418
- };
419
- type WorkflowPathSegment = {
420
- readonly tag: "WorkflowNameIndex";
421
- readonly val: WorkflowNameIndex;
422
- } | {
423
- readonly tag: "WorkflowLoopIterationMarker";
424
- readonly val: WorkflowLoopIterationMarker;
425
- };
426
- type WorkflowLocation = readonly WorkflowPathSegment[];
427
- declare enum WorkflowEntryStatus {
428
- PENDING = "PENDING",
429
- RUNNING = "RUNNING",
430
- COMPLETED = "COMPLETED",
431
- FAILED = "FAILED",
432
- EXHAUSTED = "EXHAUSTED"
433
- }
434
- declare enum WorkflowSleepState {
435
- PENDING = "PENDING",
436
- COMPLETED = "COMPLETED",
437
- INTERRUPTED = "INTERRUPTED"
438
- }
439
- declare enum WorkflowBranchStatusType {
440
- PENDING = "PENDING",
441
- RUNNING = "RUNNING",
442
- COMPLETED = "COMPLETED",
443
- FAILED = "FAILED",
444
- CANCELLED = "CANCELLED"
445
- }
446
- type WorkflowStepEntry = {
447
- readonly output: WorkflowCbor | null;
448
- readonly error: string | null;
449
- };
450
- type WorkflowLoopEntry = {
451
- readonly state: WorkflowCbor;
452
- readonly iteration: u32;
453
- readonly output: WorkflowCbor | null;
454
- };
455
- type WorkflowSleepEntry = {
456
- readonly deadline: u64;
457
- readonly state: WorkflowSleepState;
458
- };
459
- type WorkflowMessageEntry = {
460
- readonly name: string;
461
- readonly messageData: WorkflowCbor;
462
- };
463
- type WorkflowRollbackCheckpointEntry = {
464
- readonly name: string;
465
- };
466
- type WorkflowBranchStatus = {
467
- readonly status: WorkflowBranchStatusType;
468
- readonly output: WorkflowCbor | null;
469
- readonly error: string | null;
470
- };
471
- type WorkflowJoinEntry = {
472
- readonly branches: ReadonlyMap<string, WorkflowBranchStatus>;
473
- };
474
- type WorkflowRaceEntry = {
475
- readonly winner: string | null;
476
- readonly branches: ReadonlyMap<string, WorkflowBranchStatus>;
477
- };
478
- type WorkflowRemovedEntry = {
479
- readonly originalType: string;
480
- readonly originalName: string | null;
481
- };
482
- type WorkflowVersionCheckEntry = {
483
- readonly resolved: u32;
484
- readonly latest: u32;
485
- };
486
- type WorkflowEntryKind = {
487
- readonly tag: "WorkflowStepEntry";
488
- readonly val: WorkflowStepEntry;
489
- } | {
490
- readonly tag: "WorkflowLoopEntry";
491
- readonly val: WorkflowLoopEntry;
492
- } | {
493
- readonly tag: "WorkflowSleepEntry";
494
- readonly val: WorkflowSleepEntry;
495
- } | {
496
- readonly tag: "WorkflowMessageEntry";
497
- readonly val: WorkflowMessageEntry;
498
- } | {
499
- readonly tag: "WorkflowRollbackCheckpointEntry";
500
- readonly val: WorkflowRollbackCheckpointEntry;
501
- } | {
502
- readonly tag: "WorkflowJoinEntry";
503
- readonly val: WorkflowJoinEntry;
504
- } | {
505
- readonly tag: "WorkflowRaceEntry";
506
- readonly val: WorkflowRaceEntry;
507
- } | {
508
- readonly tag: "WorkflowRemovedEntry";
509
- readonly val: WorkflowRemovedEntry;
510
- } | {
511
- readonly tag: "WorkflowVersionCheckEntry";
512
- readonly val: WorkflowVersionCheckEntry;
513
- };
514
- type WorkflowEntry = {
515
- readonly id: string;
516
- readonly location: WorkflowLocation;
517
- readonly kind: WorkflowEntryKind;
518
- };
519
- type WorkflowEntryMetadata = {
520
- readonly status: WorkflowEntryStatus;
521
- readonly error: string | null;
522
- readonly attempts: u32;
523
- readonly lastAttemptAt: u64;
524
- readonly createdAt: u64;
525
- readonly completedAt: u64 | null;
526
- readonly rollbackCompletedAt: u64 | null;
527
- readonly rollbackError: string | null;
528
- };
529
- type WorkflowHistory = {
530
- readonly nameRegistry: readonly string[];
531
- readonly entries: readonly WorkflowEntry[];
532
- readonly entryMetadata: ReadonlyMap<string, WorkflowEntryMetadata>;
533
- };
534
-
535
- declare const workflowHistoryBare: unique symbol;
536
- type WorkflowHistoryBytes = ArrayBuffer & {
537
- readonly [workflowHistoryBare]: true;
538
- };
539
- declare function encodeWorkflowHistoryTransport(history: WorkflowHistory): WorkflowHistoryBytes;
540
- declare function decodeWorkflowHistoryTransport(data: ArrayBuffer | ArrayBufferView): WorkflowHistory;
541
-
542
542
  declare const CURRENT_VERSION = 6;
543
543
  declare const TO_SERVER_VERSIONED: vbare.VersionedDataHandler<ToServer>;
544
544
  declare const TO_CLIENT_VERSIONED: vbare.VersionedDataHandler<ToClient>;
545
545
 
546
- export { type ActionRequest, type ActionResponse, CURRENT_VERSION, type Connection, type ConnectionsRequest, type ConnectionsResponse, type ConnectionsUpdated, type DatabaseSchemaRequest, type DatabaseSchemaResponse, type DatabaseTableRowsRequest, type DatabaseTableRowsResponse, type Error, type Init, type PatchStateRequest, type QueueMessageSummary, type QueueRequest, type QueueResponse, type QueueStatus, type QueueUpdated, type RpcsListRequest, type RpcsListResponse, type Schedule, type ScheduleDeleteRequest, type ScheduleDeleteResponse, type ScheduleError, type ScheduleFire, type ScheduleHistoryRequest, type ScheduleHistoryResponse, type SchedulesRequest, type SchedulesResponse, type SchedulesUpdated, type State, type StateRequest, type StateResponse, type StateUpdated, TO_CLIENT_VERSIONED, TO_SERVER_VERSIONED, type TabConfigEntry, type ToClient, type ToClientBody, type ToServer, type ToServerBody, type TraceQueryRequest, type TraceQueryResponse, type WorkflowHistory as TransportWorkflowHistory, type WorkflowHistory$1 as WorkflowHistory, type WorkflowHistoryRequest, type WorkflowHistoryResponse, type WorkflowHistoryUpdated, type WorkflowReplayRequest, type WorkflowReplayResponse, decodeToClient, decodeToServer, decodeWorkflowHistoryTransport, encodeToClient, encodeToServer, encodeWorkflowHistoryTransport, readActionRequest, readActionResponse, readConnection, readConnectionsRequest, readConnectionsResponse, readConnectionsUpdated, readDatabaseSchemaRequest, readDatabaseSchemaResponse, readDatabaseTableRowsRequest, readDatabaseTableRowsResponse, readError, readInit, readPatchStateRequest, readQueueMessageSummary, readQueueRequest, readQueueResponse, readQueueStatus, readQueueUpdated, readRpcsListRequest, readRpcsListResponse, readSchedule, readScheduleDeleteRequest, readScheduleDeleteResponse, readScheduleError, readScheduleFire, readScheduleHistoryRequest, readScheduleHistoryResponse, readSchedulesRequest, readSchedulesResponse, readSchedulesUpdated, readState, readStateRequest, readStateResponse, readStateUpdated, readTabConfigEntry, readToClient, readToClientBody, readToServer, readToServerBody, readTraceQueryRequest, readTraceQueryResponse, readWorkflowHistory, readWorkflowHistoryRequest, readWorkflowHistoryResponse, readWorkflowHistoryUpdated, readWorkflowReplayRequest, readWorkflowReplayResponse, type uint, writeActionRequest, writeActionResponse, writeConnection, writeConnectionsRequest, writeConnectionsResponse, writeConnectionsUpdated, writeDatabaseSchemaRequest, writeDatabaseSchemaResponse, writeDatabaseTableRowsRequest, writeDatabaseTableRowsResponse, writeError, writeInit, writePatchStateRequest, writeQueueMessageSummary, writeQueueRequest, writeQueueResponse, writeQueueStatus, writeQueueUpdated, writeRpcsListRequest, writeRpcsListResponse, writeSchedule, writeScheduleDeleteRequest, writeScheduleDeleteResponse, writeScheduleError, writeScheduleFire, writeScheduleHistoryRequest, writeScheduleHistoryResponse, writeSchedulesRequest, writeSchedulesResponse, writeSchedulesUpdated, writeState, writeStateRequest, writeStateResponse, writeStateUpdated, writeTabConfigEntry, writeToClient, writeToClientBody, writeToServer, writeToServerBody, writeTraceQueryRequest, writeTraceQueryResponse, writeWorkflowHistory, writeWorkflowHistoryRequest, writeWorkflowHistoryResponse, writeWorkflowHistoryUpdated, writeWorkflowReplayRequest, writeWorkflowReplayResponse };
546
+ export { type ActionRequest, type ActionResponse, CURRENT_VERSION, type Connection, type ConnectionsRequest, type ConnectionsResponse, type ConnectionsUpdated, type DatabaseSchemaRequest, type DatabaseSchemaResponse, type DatabaseTableRowsRequest, type DatabaseTableRowsResponse, type Error, type Init, type PatchStateRequest, type QueueMessageSummary, type QueueRequest, type QueueResponse, type QueueStatus, type QueueUpdated, type RpcsListRequest, type RpcsListResponse, type Schedule, type ScheduleDeleteRequest, type ScheduleDeleteResponse, type ScheduleError, type ScheduleFire, type ScheduleHistoryRequest, type ScheduleHistoryResponse, type SchedulesRequest, type SchedulesResponse, type SchedulesUpdated, type State, type StateRequest, type StateResponse, type StateUpdated, TO_CLIENT_VERSIONED, TO_SERVER_VERSIONED, type TabConfigEntry, type ToClient, type ToClientBody, type ToServer, type ToServerBody, type TraceQueryRequest, type TraceQueryResponse, type WorkflowHistory$1 as TransportWorkflowHistory, type WorkflowHistory, type WorkflowHistoryRequest, type WorkflowHistoryResponse, type WorkflowHistoryUpdated, type WorkflowReplayRequest, type WorkflowReplayResponse, decodeToClient, decodeToServer, decodeWorkflowHistoryTransport, encodeToClient, encodeToServer, encodeWorkflowHistoryTransport, readActionRequest, readActionResponse, readConnection, readConnectionsRequest, readConnectionsResponse, readConnectionsUpdated, readDatabaseSchemaRequest, readDatabaseSchemaResponse, readDatabaseTableRowsRequest, readDatabaseTableRowsResponse, readError, readInit, readPatchStateRequest, readQueueMessageSummary, readQueueRequest, readQueueResponse, readQueueStatus, readQueueUpdated, readRpcsListRequest, readRpcsListResponse, readSchedule, readScheduleDeleteRequest, readScheduleDeleteResponse, readScheduleError, readScheduleFire, readScheduleHistoryRequest, readScheduleHistoryResponse, readSchedulesRequest, readSchedulesResponse, readSchedulesUpdated, readState, readStateRequest, readStateResponse, readStateUpdated, readTabConfigEntry, readToClient, readToClientBody, readToServer, readToServerBody, readTraceQueryRequest, readTraceQueryResponse, readWorkflowHistory, readWorkflowHistoryRequest, readWorkflowHistoryResponse, readWorkflowHistoryUpdated, readWorkflowReplayRequest, readWorkflowReplayResponse, type uint, writeActionRequest, writeActionResponse, writeConnection, writeConnectionsRequest, writeConnectionsResponse, writeConnectionsUpdated, writeDatabaseSchemaRequest, writeDatabaseSchemaResponse, writeDatabaseTableRowsRequest, writeDatabaseTableRowsResponse, writeError, writeInit, writePatchStateRequest, writeQueueMessageSummary, writeQueueRequest, writeQueueResponse, writeQueueStatus, writeQueueUpdated, writeRpcsListRequest, writeRpcsListResponse, writeSchedule, writeScheduleDeleteRequest, writeScheduleDeleteResponse, writeScheduleError, writeScheduleFire, writeScheduleHistoryRequest, writeScheduleHistoryResponse, writeSchedulesRequest, writeSchedulesResponse, writeSchedulesUpdated, writeState, writeStateRequest, writeStateResponse, writeStateUpdated, writeTabConfigEntry, writeToClient, writeToClientBody, writeToServer, writeToServerBody, writeTraceQueryRequest, writeTraceQueryResponse, writeWorkflowHistory, writeWorkflowHistoryRequest, writeWorkflowHistoryResponse, writeWorkflowHistoryUpdated, writeWorkflowReplayRequest, writeWorkflowReplayResponse };
@@ -4622,7 +4622,7 @@ function decodeWorkflowHistory(bytes) {
4622
4622
  // package.json
4623
4623
  var package_default = {
4624
4624
  name: "rivetkit",
4625
- version: "2.3.11-rc.9",
4625
+ version: "2.3.11",
4626
4626
  description: "Lightweight libraries for building stateful actors on edge platforms",
4627
4627
  license: "Apache-2.0",
4628
4628
  keywords: [
@@ -4758,6 +4758,16 @@ var package_default = {
4758
4758
  default: "./dist/tsup/inspector/mod.cjs"
4759
4759
  }
4760
4760
  },
4761
+ "./experimental/inspector/workflow": {
4762
+ import: {
4763
+ types: "./dist/tsup/inspector/workflow.d.ts",
4764
+ default: "./dist/tsup/inspector/workflow.js"
4765
+ },
4766
+ require: {
4767
+ types: "./dist/tsup/inspector/workflow.d.cts",
4768
+ default: "./dist/tsup/inspector/workflow.cjs"
4769
+ }
4770
+ },
4761
4771
  "./inspector-tab": {
4762
4772
  import: {
4763
4773
  types: "./dist/tsup/inspector-tab/mod.d.ts",
@@ -4803,7 +4813,7 @@ var package_default = {
4803
4813
  "./dist/tsup/chunk-*.cjs"
4804
4814
  ],
4805
4815
  scripts: {
4806
- build: "tsup src/mod.ts src/client/mod.ts src/common/log.ts src/common/websocket.ts src/actor/errors.ts src/utils.ts src/workflow/mod.ts src/test/mod.ts src/inspector/mod.ts src/inspector-tab/mod.ts src/db/mod.ts src/db/drizzle.ts src/dynamic/mod.ts src/unstable/migrations.ts && tsup src/agent-os/index.ts --no-clean --out-dir dist/tsup/agent-os",
4816
+ build: "tsup src/mod.ts src/client/mod.ts src/common/log.ts src/common/websocket.ts src/actor/errors.ts src/utils.ts src/workflow/mod.ts src/test/mod.ts src/inspector/mod.ts src/inspector/workflow.ts src/inspector-tab/mod.ts src/db/mod.ts src/db/drizzle.ts src/dynamic/mod.ts src/unstable/migrations.ts && tsup src/agent-os/index.ts --no-clean --out-dir dist/tsup/agent-os && node scripts/check-built-commonjs.mjs",
4807
4817
  "build:browser": "tsup --config tsup.browser.config.ts",
4808
4818
  "check-types": "tsc --noEmit",
4809
4819
  lint: "biome check . && pnpm run check:test-skips && pnpm run check:wait-for-comments",