rivetkit 2.3.11-rc.8 → 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.
- package/dist/browser/client.d.ts +96 -14
- package/dist/browser/client.js +12 -2
- package/dist/browser/client.js.map +1 -1
- package/dist/browser/inspector/client.d.ts +139 -139
- package/dist/browser/inspector/client.js +12 -2
- package/dist/browser/inspector/client.js.map +1 -1
- package/dist/tsup/agent-os/index.cjs +146 -76
- package/dist/tsup/agent-os/index.cjs.map +1 -1
- package/dist/tsup/agent-os/index.d.cts +83 -9
- package/dist/tsup/agent-os/index.d.ts +83 -9
- package/dist/tsup/agent-os/index.js +146 -76
- package/dist/tsup/agent-os/index.js.map +1 -1
- package/dist/tsup/{chunk-JBQ63WSM.js → chunk-3ZR542SK.js} +4 -4
- package/dist/tsup/chunk-3ZR542SK.js.map +1 -0
- package/dist/tsup/{chunk-HNHLBM3Y.cjs → chunk-4KGXFC6M.cjs} +42 -5
- package/dist/tsup/chunk-4KGXFC6M.cjs.map +1 -0
- package/dist/tsup/chunk-5UYWLCRO.js +14 -0
- package/dist/tsup/chunk-5UYWLCRO.js.map +1 -0
- package/dist/tsup/{chunk-QWLJCP3X.js → chunk-6W5VGLFT.js} +42 -5
- package/dist/tsup/chunk-6W5VGLFT.js.map +1 -0
- package/dist/tsup/chunk-6WYATRS4.js +243 -0
- package/dist/tsup/chunk-6WYATRS4.js.map +1 -0
- package/dist/tsup/chunk-B3W74FBB.cjs +14 -0
- package/dist/tsup/chunk-B3W74FBB.cjs.map +1 -0
- package/dist/tsup/{chunk-V6ANE6JM.js → chunk-FWROC5LA.js} +2 -2
- package/dist/tsup/{chunk-ZVM35ICH.cjs → chunk-GLIPKKEC.cjs} +7 -7
- package/dist/tsup/{chunk-ZVM35ICH.cjs.map → chunk-GLIPKKEC.cjs.map} +1 -1
- package/dist/tsup/{chunk-CCUO5OKD.cjs → chunk-GN2EUMEW.cjs} +3 -3
- package/dist/tsup/{chunk-CCUO5OKD.cjs.map → chunk-GN2EUMEW.cjs.map} +1 -1
- package/dist/tsup/{chunk-2ROUKH7W.cjs → chunk-GU7ML3KE.cjs} +13 -3
- package/dist/tsup/chunk-GU7ML3KE.cjs.map +1 -0
- package/dist/tsup/{chunk-WRRB24UY.js → chunk-JQ2AZ5FN.js} +3 -3
- package/dist/tsup/{chunk-7AFZMFPQ.js → chunk-JTHHCZCZ.js} +10 -1
- package/dist/tsup/chunk-JTHHCZCZ.js.map +1 -0
- package/dist/tsup/{chunk-UEULFXUI.cjs → chunk-KVFIONKQ.cjs} +11 -2
- package/dist/tsup/chunk-KVFIONKQ.cjs.map +1 -0
- package/dist/tsup/chunk-LWQFXGKS.cjs +243 -0
- package/dist/tsup/chunk-LWQFXGKS.cjs.map +1 -0
- package/dist/tsup/{chunk-KVD6ZWNM.js → chunk-MO2SSUOR.js} +8 -7
- package/dist/tsup/chunk-MO2SSUOR.js.map +1 -0
- package/dist/tsup/{chunk-AGNBLCNJ.js → chunk-OUENKQHB.js} +13 -3
- package/dist/tsup/chunk-OUENKQHB.js.map +1 -0
- package/dist/tsup/{chunk-E6WB2BLO.cjs → chunk-PUZY2XCD.cjs} +10 -9
- package/dist/tsup/chunk-PUZY2XCD.cjs.map +1 -0
- package/dist/tsup/{chunk-4EDGOGCB.js → chunk-QFJ24MBU.js} +27 -2
- package/dist/tsup/{chunk-4EDGOGCB.js.map → chunk-QFJ24MBU.js.map} +1 -1
- package/dist/tsup/{chunk-A55CGZIV.cjs → chunk-RXXDNJXB.cjs} +140 -140
- package/dist/tsup/{chunk-A55CGZIV.cjs.map → chunk-RXXDNJXB.cjs.map} +1 -1
- package/dist/tsup/{chunk-N6MBTYGX.cjs → chunk-VBJQIBXI.cjs} +30 -5
- package/dist/tsup/chunk-VBJQIBXI.cjs.map +1 -0
- package/dist/tsup/client/mod.cjs +6 -6
- package/dist/tsup/client/mod.d.cts +4 -3
- package/dist/tsup/client/mod.d.ts +4 -3
- package/dist/tsup/client/mod.js +5 -5
- package/dist/tsup/common/log.cjs +2 -2
- package/dist/tsup/common/log.js +1 -1
- package/dist/tsup/common/websocket.cjs +3 -3
- package/dist/tsup/common/websocket.js +2 -2
- package/dist/tsup/{config-CZcjyT5B.d.ts → config-C4OSv0QP.d.ts} +92 -7
- package/dist/tsup/{config-rGWrumlO.d.cts → config-DTGoWdkG.d.cts} +92 -7
- package/dist/tsup/{config-BxOimoGX.d.cts → config-ey2I2zz5.d.cts} +46 -6
- package/dist/tsup/{config-BxOimoGX.d.ts → config-ey2I2zz5.d.ts} +46 -6
- package/dist/tsup/{context-B8W8E8nW.d.cts → context-C6cvDNyk.d.cts} +2 -2
- package/dist/tsup/{context-_UrDZhEh.d.ts → context-CMygeBxS.d.ts} +2 -2
- package/dist/tsup/db/drizzle.cjs +18 -10
- package/dist/tsup/db/drizzle.cjs.map +1 -1
- package/dist/tsup/db/drizzle.d.cts +5 -6
- package/dist/tsup/db/drizzle.d.ts +5 -6
- package/dist/tsup/db/drizzle.js +13 -5
- package/dist/tsup/db/drizzle.js.map +1 -1
- package/dist/tsup/db/mod.cjs +5 -175
- package/dist/tsup/db/mod.cjs.map +1 -1
- package/dist/tsup/db/mod.d.cts +11 -4
- package/dist/tsup/db/mod.d.ts +11 -4
- package/dist/tsup/db/mod.js +4 -174
- package/dist/tsup/db/mod.js.map +1 -1
- package/dist/tsup/dynamic/mod.cjs +2 -2
- package/dist/tsup/dynamic/mod.d.cts +3 -2
- package/dist/tsup/dynamic/mod.d.ts +3 -2
- package/dist/tsup/dynamic/mod.js +1 -1
- package/dist/tsup/inspector/mod.cjs +5 -4
- package/dist/tsup/inspector/mod.cjs.map +1 -1
- package/dist/tsup/inspector/mod.d.cts +12 -146
- package/dist/tsup/inspector/mod.d.ts +12 -146
- package/dist/tsup/inspector/mod.js +4 -3
- package/dist/tsup/inspector/mod.js.map +1 -1
- package/dist/tsup/inspector/workflow.cjs +21 -0
- package/dist/tsup/inspector/workflow.cjs.map +1 -0
- package/dist/tsup/inspector/workflow.d.cts +144 -0
- package/dist/tsup/inspector/workflow.d.ts +144 -0
- package/dist/tsup/inspector/workflow.js +21 -0
- package/dist/tsup/inspector/workflow.js.map +1 -0
- package/dist/tsup/inspector-tab/mod.cjs +2 -2
- package/dist/tsup/inspector-tab/mod.d.cts +4 -3
- package/dist/tsup/inspector-tab/mod.d.ts +4 -3
- package/dist/tsup/inspector-tab/mod.js +1 -1
- package/dist/tsup/mod.cjs +837 -243
- package/dist/tsup/mod.cjs.map +1 -1
- package/dist/tsup/mod.d.cts +6 -5
- package/dist/tsup/mod.d.ts +6 -5
- package/dist/tsup/mod.js +766 -172
- package/dist/tsup/mod.js.map +1 -1
- package/dist/tsup/test/mod.cjs +7 -7
- package/dist/tsup/test/mod.d.cts +3 -2
- package/dist/tsup/test/mod.d.ts +3 -2
- package/dist/tsup/test/mod.js +5 -5
- package/dist/tsup/unstable/migrations.d.cts +1 -1
- package/dist/tsup/unstable/migrations.d.ts +1 -1
- package/dist/tsup/utils.cjs +2 -2
- package/dist/tsup/utils.js +1 -1
- package/dist/tsup/workflow/mod.cjs +89 -95
- package/dist/tsup/workflow/mod.cjs.map +1 -1
- package/dist/tsup/workflow/mod.d.cts +5 -4
- package/dist/tsup/workflow/mod.d.ts +5 -4
- package/dist/tsup/workflow/mod.js +86 -92
- package/dist/tsup/workflow/mod.js.map +1 -1
- package/package.json +19 -9
- package/src/actor/config.test.ts +65 -1
- package/src/actor/config.ts +169 -5
- package/src/actor/mod.ts +10 -1
- package/src/client/actor-common.ts +5 -14
- package/src/common/database/config.ts +50 -3
- package/src/common/database/mod.test.ts +142 -4
- package/src/common/database/mod.ts +210 -98
- package/src/common/database/native-database.ts +42 -3
- package/src/common/database/shared.ts +9 -0
- package/src/db/drizzle.test.ts +8 -1
- package/src/db/drizzle.ts +15 -4
- package/src/db/mod.ts +3 -0
- package/src/inspector/workflow.ts +61 -0
- package/src/registry/napi-runtime.ts +69 -1
- package/src/registry/native.ts +505 -155
- package/src/registry/run-handler-coordinator.test.ts +252 -0
- package/src/registry/run-handler-coordinator.ts +219 -0
- package/src/registry/runtime.ts +34 -1
- package/src/registry/wasm-runtime.ts +122 -17
- package/src/registry/write-through-proxy.ts +101 -0
- package/src/utils/node.ts +44 -28
- package/src/workflow/driver.ts +56 -58
- package/src/workflow/inspector.ts +10 -15
- package/src/workflow/mod.ts +48 -70
- package/dist/tsup/chunk-2ROUKH7W.cjs.map +0 -1
- package/dist/tsup/chunk-7AFZMFPQ.js.map +0 -1
- package/dist/tsup/chunk-AGNBLCNJ.js.map +0 -1
- package/dist/tsup/chunk-E6WB2BLO.cjs.map +0 -1
- package/dist/tsup/chunk-HNHLBM3Y.cjs.map +0 -1
- package/dist/tsup/chunk-JBQ63WSM.js.map +0 -1
- package/dist/tsup/chunk-KVD6ZWNM.js.map +0 -1
- package/dist/tsup/chunk-N6MBTYGX.cjs.map +0 -1
- package/dist/tsup/chunk-QWLJCP3X.js.map +0 -1
- package/dist/tsup/chunk-UEULFXUI.cjs.map +0 -1
- /package/dist/tsup/{chunk-V6ANE6JM.js.map → chunk-FWROC5LA.js.map} +0 -0
- /package/dist/tsup/{chunk-WRRB24UY.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
|
|
9
|
-
declare function readWorkflowHistory(bc: bare.ByteCursor): WorkflowHistory
|
|
10
|
-
declare function writeWorkflowHistory(bc: bare.ByteCursor, x: WorkflowHistory
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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",
|