rivetkit 0.0.0-pr.4879.d508104 → 0.0.0-pr.4880.c7bfbc5
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 +65 -13
- package/dist/browser/client.js +31 -11
- package/dist/browser/client.js.map +1 -1
- package/dist/browser/inspector/client.js +3 -1
- package/dist/browser/inspector/client.js.map +1 -1
- package/dist/tsup/actor/errors.cjs +2 -2
- package/dist/tsup/actor/errors.js +1 -1
- package/dist/tsup/agent-os/index.cjs +89 -126
- package/dist/tsup/agent-os/index.cjs.map +1 -1
- package/dist/tsup/agent-os/index.d.cts +69 -15
- package/dist/tsup/agent-os/index.d.ts +69 -15
- package/dist/tsup/agent-os/index.js +89 -126
- package/dist/tsup/agent-os/index.js.map +1 -1
- package/dist/tsup/{chunk-GDAWX5SD.cjs → chunk-253U7NX4.cjs} +3 -3
- package/dist/tsup/{chunk-GDAWX5SD.cjs.map → chunk-253U7NX4.cjs.map} +1 -1
- package/dist/tsup/{chunk-VLZ2M35B.cjs → chunk-2BOEAWLP.cjs} +10 -10
- package/dist/tsup/{chunk-VLZ2M35B.cjs.map → chunk-2BOEAWLP.cjs.map} +1 -1
- package/dist/tsup/{chunk-7RA2TOMX.js → chunk-3P3D4MPW.js} +2 -2
- package/dist/tsup/{chunk-QF7EPFRL.cjs → chunk-4VZACOTA.cjs} +25 -10
- package/dist/tsup/chunk-4VZACOTA.cjs.map +1 -0
- package/dist/tsup/{chunk-XRLQSIHP.cjs → chunk-53SV6NWA.cjs} +26 -16
- package/dist/tsup/chunk-53SV6NWA.cjs.map +1 -0
- package/dist/tsup/{chunk-KPOF47VJ.js → chunk-7EE77OGR.js} +21 -6
- package/dist/tsup/chunk-7EE77OGR.js.map +1 -0
- package/dist/tsup/{chunk-DCPOBLAB.cjs → chunk-DQDB74UY.cjs} +8 -8
- package/dist/tsup/{chunk-DCPOBLAB.cjs.map → chunk-DQDB74UY.cjs.map} +1 -1
- package/dist/tsup/{chunk-UKDAZZD2.js → chunk-HEYIO52E.js} +19 -9
- package/dist/tsup/chunk-HEYIO52E.js.map +1 -0
- package/dist/tsup/{chunk-5KAVURK2.cjs → chunk-JR4EOEOX.cjs} +168 -165
- package/dist/tsup/chunk-JR4EOEOX.cjs.map +1 -0
- package/dist/tsup/{chunk-ZGWSH7YV.js → chunk-K34B3OVG.js} +3 -63
- package/dist/tsup/chunk-K34B3OVG.js.map +1 -0
- package/dist/tsup/{chunk-AQ6APRTL.js → chunk-MZ22RK35.js} +3 -3
- package/dist/tsup/{chunk-CNRIDXXO.cjs → chunk-NZMJHPC5.cjs} +4 -4
- package/dist/tsup/{chunk-CNRIDXXO.cjs.map → chunk-NZMJHPC5.cjs.map} +1 -1
- package/dist/tsup/{chunk-WKM6X7AD.js → chunk-OIVPGYSL.js} +2 -2
- package/dist/tsup/{chunk-3ZMV5735.js → chunk-RV4X5B3Z.js} +8 -5
- package/dist/tsup/chunk-RV4X5B3Z.js.map +1 -0
- package/dist/tsup/{chunk-QWOZWDL4.js → chunk-SGRAZ6PO.js} +4 -4
- package/dist/tsup/{chunk-JTL6Y2UN.cjs → chunk-V3QNBJ7N.cjs} +3 -63
- package/dist/tsup/chunk-V3QNBJ7N.cjs.map +1 -0
- package/dist/tsup/client/mod.cjs +7 -7
- package/dist/tsup/client/mod.d.cts +4 -3
- package/dist/tsup/client/mod.d.ts +4 -3
- package/dist/tsup/client/mod.js +6 -6
- package/dist/tsup/common/log.cjs +3 -3
- package/dist/tsup/common/log.js +2 -2
- package/dist/tsup/common/websocket.cjs +4 -4
- package/dist/tsup/common/websocket.js +3 -3
- package/dist/tsup/{config-B3RIidaJ.d.ts → config-Ditotsl8.d.ts} +103 -5
- package/dist/tsup/{config-B9qUIHX4.d.ts → config-QGOjAb5S.d.cts} +7 -11
- package/dist/tsup/{config-B9qUIHX4.d.cts → config-QGOjAb5S.d.ts} +7 -11
- package/dist/tsup/{config-D6WxBYjV.d.cts → config-ctKnLh95.d.cts} +103 -5
- package/dist/tsup/{context-CNIZBIKl.d.ts → context-BQAsyraR.d.ts} +2 -2
- package/dist/tsup/{context-BxvHh9wi.d.cts → context-BpqKT1X1.d.cts} +2 -2
- package/dist/tsup/db/drizzle.cjs +98 -107
- package/dist/tsup/db/drizzle.cjs.map +1 -1
- package/dist/tsup/db/drizzle.d.cts +1 -1
- package/dist/tsup/db/drizzle.d.ts +1 -1
- package/dist/tsup/db/drizzle.js +98 -107
- package/dist/tsup/db/drizzle.js.map +1 -1
- package/dist/tsup/db/mod.cjs +52 -100
- package/dist/tsup/db/mod.cjs.map +1 -1
- package/dist/tsup/db/mod.d.cts +2 -2
- package/dist/tsup/db/mod.d.ts +2 -2
- package/dist/tsup/db/mod.js +52 -100
- package/dist/tsup/db/mod.js.map +1 -1
- package/dist/tsup/inspector/mod.cjs +6 -6
- package/dist/tsup/inspector/mod.js +5 -5
- package/dist/tsup/mod.cjs +1869 -538
- package/dist/tsup/mod.cjs.map +1 -1
- package/dist/tsup/mod.d.cts +5 -4
- package/dist/tsup/mod.d.ts +5 -4
- package/dist/tsup/mod.js +1811 -480
- package/dist/tsup/mod.js.map +1 -1
- package/dist/tsup/test/mod.cjs +10 -10
- package/dist/tsup/test/mod.d.cts +3 -2
- package/dist/tsup/test/mod.d.ts +3 -2
- package/dist/tsup/test/mod.js +6 -6
- package/dist/tsup/utils.cjs +3 -3
- package/dist/tsup/utils.js +2 -2
- package/dist/tsup/workflow/mod.cjs +9 -9
- package/dist/tsup/workflow/mod.d.cts +5 -4
- package/dist/tsup/workflow/mod.d.ts +5 -4
- package/dist/tsup/workflow/mod.js +5 -5
- package/package.json +9 -7
- package/src/actor/errors.ts +7 -85
- package/src/agent-os/actor/cron.ts +37 -2
- package/src/agent-os/types.ts +11 -0
- package/src/client/actor-conn.ts +8 -0
- package/src/common/database/config.ts +11 -6
- package/src/common/database/mod.test.ts +106 -0
- package/src/common/database/mod.ts +76 -125
- package/src/common/database/native-database.test.ts +211 -0
- package/src/common/database/native-database.ts +191 -58
- package/src/common/encoding.ts +24 -4
- package/src/common/utils.ts +8 -2
- package/src/db/drizzle.ts +105 -117
- package/src/engine-client/api-endpoints.ts +1 -0
- package/src/globals.d.ts +4 -0
- package/src/registry/config/index.ts +122 -6
- package/src/registry/config/serverless.ts +1 -0
- package/src/registry/index.ts +59 -48
- package/src/registry/napi-runtime.ts +759 -0
- package/src/registry/native.ts +779 -526
- package/src/registry/runtime.test.ts +79 -0
- package/src/registry/runtime.ts +592 -0
- package/src/registry/wasm-runtime.ts +886 -0
- package/src/serde.ts +6 -0
- package/src/serverless/configure.ts +1 -0
- package/src/utils/env-vars.ts +2 -0
- package/dist/tsup/chunk-3ZMV5735.js.map +0 -1
- package/dist/tsup/chunk-5KAVURK2.cjs.map +0 -1
- package/dist/tsup/chunk-JTL6Y2UN.cjs.map +0 -1
- package/dist/tsup/chunk-KPOF47VJ.js.map +0 -1
- package/dist/tsup/chunk-QF7EPFRL.cjs.map +0 -1
- package/dist/tsup/chunk-UKDAZZD2.js.map +0 -1
- package/dist/tsup/chunk-XRLQSIHP.cjs.map +0 -1
- package/dist/tsup/chunk-ZGWSH7YV.js.map +0 -1
- /package/dist/tsup/{chunk-7RA2TOMX.js.map → chunk-3P3D4MPW.js.map} +0 -0
- /package/dist/tsup/{chunk-AQ6APRTL.js.map → chunk-MZ22RK35.js.map} +0 -0
- /package/dist/tsup/{chunk-WKM6X7AD.js.map → chunk-OIVPGYSL.js.map} +0 -0
- /package/dist/tsup/{chunk-QWOZWDL4.js.map → chunk-SGRAZ6PO.js.map} +0 -0
package/dist/browser/client.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as _rivetkit_rivetkit_wasm from '@rivetkit/rivetkit-wasm';
|
|
1
2
|
import { z as z$2 } from 'zod';
|
|
2
3
|
import z$1, { z } from 'zod/v4';
|
|
3
4
|
import { UniversalWebSocket } from '@rivetkit/virtual-websocket';
|
|
@@ -6,21 +7,11 @@ import { StandardSchemaV1 } from '@standard-schema/spec';
|
|
|
6
7
|
import { ContentfulStatusCode } from 'hono/utils/http-status';
|
|
7
8
|
import { Logger } from 'pino';
|
|
8
9
|
|
|
9
|
-
interface SqliteVfsMetrics {
|
|
10
|
-
requestBuildNs: number;
|
|
11
|
-
serializeNs: number;
|
|
12
|
-
transportNs: number;
|
|
13
|
-
stateUpdateNs: number;
|
|
14
|
-
totalNs: number;
|
|
15
|
-
commitCount: number;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
10
|
type AnyDatabaseProvider = DatabaseProvider<any> | undefined;
|
|
19
11
|
interface ActorMetricsLike {
|
|
20
12
|
totalKvReads: number;
|
|
21
13
|
totalKvWrites: number;
|
|
22
14
|
trackSql(query: string, durationMs: number): void;
|
|
23
|
-
setSqliteVfsMetricsSource(source?: () => SqliteVfsMetrics | null): void;
|
|
24
15
|
}
|
|
25
16
|
type InferDatabaseClient<DBProvider extends AnyDatabaseProvider> = DBProvider extends DatabaseProvider<any> ? Awaited<ReturnType<DBProvider["createClient"]>> : never;
|
|
26
17
|
type SqliteBindings = unknown[] | Record<string, unknown>;
|
|
@@ -28,11 +19,17 @@ interface SqliteQueryResult {
|
|
|
28
19
|
columns: string[];
|
|
29
20
|
rows: unknown[][];
|
|
30
21
|
}
|
|
22
|
+
interface SqliteExecuteResult extends SqliteQueryResult {
|
|
23
|
+
changes: number;
|
|
24
|
+
lastInsertRowId?: number | null;
|
|
25
|
+
route: "read" | "write" | "writeFallback";
|
|
26
|
+
}
|
|
31
27
|
interface SqliteDatabase {
|
|
32
28
|
exec(sql: string, callback?: (row: unknown[], columns: string[]) => void): Promise<void>;
|
|
29
|
+
execute(sql: string, params?: SqliteBindings): Promise<SqliteExecuteResult>;
|
|
33
30
|
run(sql: string, params?: SqliteBindings): Promise<void>;
|
|
34
31
|
query(sql: string, params?: SqliteBindings): Promise<SqliteQueryResult>;
|
|
35
|
-
|
|
32
|
+
writeMode<T>(callback: () => Promise<T>): Promise<T>;
|
|
36
33
|
close(): Promise<void>;
|
|
37
34
|
}
|
|
38
35
|
/**
|
|
@@ -1342,10 +1339,40 @@ type RegistryActors = z$2.infer<typeof ActorsSchema>;
|
|
|
1342
1339
|
declare const RegistryConfigSchema: z$2.ZodPipe<z$2.ZodObject<{
|
|
1343
1340
|
use: z$2.ZodRecord<z$2.ZodString, z$2.ZodCustom<AnyActorDefinition, AnyActorDefinition>>;
|
|
1344
1341
|
test: z$2.ZodDefault<z$2.ZodOptional<z$2.ZodObject<{
|
|
1345
|
-
enabled: z$2.ZodBoolean
|
|
1342
|
+
enabled: z$2.ZodDefault<z$2.ZodOptional<z$2.ZodBoolean>>;
|
|
1343
|
+
sqliteBackend: z$2.ZodOptional<z$2.ZodEnum<{
|
|
1344
|
+
local: "local";
|
|
1345
|
+
remote: "remote";
|
|
1346
|
+
}>>;
|
|
1346
1347
|
}, z$2.core.$strip>>>;
|
|
1347
1348
|
maxIncomingMessageSize: z$2.ZodDefault<z$2.ZodOptional<z$2.ZodNumber>>;
|
|
1348
1349
|
maxOutgoingMessageSize: z$2.ZodDefault<z$2.ZodOptional<z$2.ZodNumber>>;
|
|
1350
|
+
runtime: z$2.ZodPipe<z$2.ZodOptional<z$2.ZodEnum<{
|
|
1351
|
+
auto: "auto";
|
|
1352
|
+
native: "native";
|
|
1353
|
+
wasm: "wasm";
|
|
1354
|
+
}>>, z$2.ZodTransform<"auto" | "native" | "wasm", "auto" | "native" | "wasm" | undefined>>;
|
|
1355
|
+
wasm: z$2.ZodDefault<z$2.ZodOptional<z$2.ZodObject<{
|
|
1356
|
+
bindings: z$2.ZodOptional<z$2.ZodCustom<typeof _rivetkit_rivetkit_wasm, typeof _rivetkit_rivetkit_wasm>>;
|
|
1357
|
+
initInput: z$2.ZodOptional<z$2.ZodCustom<{
|
|
1358
|
+
module_or_path: _rivetkit_rivetkit_wasm.InitInput | Promise<_rivetkit_rivetkit_wasm.InitInput>;
|
|
1359
|
+
} | _rivetkit_rivetkit_wasm.InitInput | Promise<_rivetkit_rivetkit_wasm.InitInput> | undefined, {
|
|
1360
|
+
module_or_path: _rivetkit_rivetkit_wasm.InitInput | Promise<_rivetkit_rivetkit_wasm.InitInput>;
|
|
1361
|
+
} | _rivetkit_rivetkit_wasm.InitInput | Promise<_rivetkit_rivetkit_wasm.InitInput> | undefined>>;
|
|
1362
|
+
}, z$2.core.$strip>>>;
|
|
1363
|
+
sqlite: z$2.ZodPipe<z$2.ZodOptional<z$2.ZodUnion<readonly [z$2.ZodEnum<{
|
|
1364
|
+
local: "local";
|
|
1365
|
+
remote: "remote";
|
|
1366
|
+
}>, z$2.ZodObject<{
|
|
1367
|
+
backend: z$2.ZodEnum<{
|
|
1368
|
+
local: "local";
|
|
1369
|
+
remote: "remote";
|
|
1370
|
+
}>;
|
|
1371
|
+
}, z$2.core.$strip>]>>, z$2.ZodTransform<{
|
|
1372
|
+
backend: "local" | "remote";
|
|
1373
|
+
} | undefined, "local" | "remote" | {
|
|
1374
|
+
backend: "local" | "remote";
|
|
1375
|
+
} | undefined>>;
|
|
1349
1376
|
noWelcome: z$2.ZodDefault<z$2.ZodOptional<z$2.ZodBoolean>>;
|
|
1350
1377
|
logging: z$2.ZodDefault<z$2.ZodOptional<z$2.ZodObject<{
|
|
1351
1378
|
baseLogger: z$2.ZodOptional<z$2.ZodCustom<Logger, Logger>>;
|
|
@@ -1374,6 +1401,7 @@ declare const RegistryConfigSchema: z$2.ZodPipe<z$2.ZodObject<{
|
|
|
1374
1401
|
url: z$2.ZodString;
|
|
1375
1402
|
headers: z$2.ZodOptional<z$2.ZodRecord<z$2.ZodString, z$2.ZodString>>;
|
|
1376
1403
|
requestLifespan: z$2.ZodOptional<z$2.ZodNumber>;
|
|
1404
|
+
drainGracePeriod: z$2.ZodOptional<z$2.ZodNumber>;
|
|
1377
1405
|
metadata: z$2.ZodOptional<z$2.ZodRecord<z$2.ZodString, z$2.ZodUnknown>>;
|
|
1378
1406
|
metadataPollInterval: z$2.ZodOptional<z$2.ZodNumber>;
|
|
1379
1407
|
drainOnVersionUpgrade: z$2.ZodOptional<z$2.ZodBoolean>;
|
|
@@ -1395,6 +1423,9 @@ declare const RegistryConfigSchema: z$2.ZodPipe<z$2.ZodObject<{
|
|
|
1395
1423
|
disableSignalHandlers: z$2.ZodDefault<z$2.ZodOptional<z$2.ZodBoolean>>;
|
|
1396
1424
|
}, z$2.core.$strip>>>;
|
|
1397
1425
|
}, z$2.core.$strip>, z$2.ZodTransform<{
|
|
1426
|
+
sqlite: {
|
|
1427
|
+
backend: "local" | "remote";
|
|
1428
|
+
} | undefined;
|
|
1398
1429
|
endpoint: string | undefined;
|
|
1399
1430
|
namespace: string;
|
|
1400
1431
|
token: string | undefined;
|
|
@@ -1411,9 +1442,17 @@ declare const RegistryConfigSchema: z$2.ZodPipe<z$2.ZodObject<{
|
|
|
1411
1442
|
use: Record<string, AnyActorDefinition>;
|
|
1412
1443
|
test: {
|
|
1413
1444
|
enabled: boolean;
|
|
1445
|
+
sqliteBackend?: "local" | "remote" | undefined;
|
|
1414
1446
|
};
|
|
1415
1447
|
maxIncomingMessageSize: number;
|
|
1416
1448
|
maxOutgoingMessageSize: number;
|
|
1449
|
+
runtime: "auto" | "native" | "wasm";
|
|
1450
|
+
wasm: {
|
|
1451
|
+
bindings?: typeof _rivetkit_rivetkit_wasm | undefined;
|
|
1452
|
+
initInput?: {
|
|
1453
|
+
module_or_path: _rivetkit_rivetkit_wasm.InitInput | Promise<_rivetkit_rivetkit_wasm.InitInput>;
|
|
1454
|
+
} | _rivetkit_rivetkit_wasm.InitInput | Promise<_rivetkit_rivetkit_wasm.InitInput> | undefined;
|
|
1455
|
+
};
|
|
1417
1456
|
noWelcome: boolean;
|
|
1418
1457
|
logging: {
|
|
1419
1458
|
baseLogger?: Logger | undefined;
|
|
@@ -1441,6 +1480,7 @@ declare const RegistryConfigSchema: z$2.ZodPipe<z$2.ZodObject<{
|
|
|
1441
1480
|
name?: string | undefined;
|
|
1442
1481
|
headers?: Record<string, string> | undefined;
|
|
1443
1482
|
requestLifespan?: number | undefined;
|
|
1483
|
+
drainGracePeriod?: number | undefined;
|
|
1444
1484
|
metadata?: Record<string, unknown> | undefined;
|
|
1445
1485
|
metadataPollInterval?: number | undefined;
|
|
1446
1486
|
drainOnVersionUpgrade?: boolean | undefined;
|
|
@@ -1449,9 +1489,20 @@ declare const RegistryConfigSchema: z$2.ZodPipe<z$2.ZodObject<{
|
|
|
1449
1489
|
use: Record<string, AnyActorDefinition>;
|
|
1450
1490
|
test: {
|
|
1451
1491
|
enabled: boolean;
|
|
1492
|
+
sqliteBackend?: "local" | "remote" | undefined;
|
|
1452
1493
|
};
|
|
1453
1494
|
maxIncomingMessageSize: number;
|
|
1454
1495
|
maxOutgoingMessageSize: number;
|
|
1496
|
+
runtime: "auto" | "native" | "wasm";
|
|
1497
|
+
wasm: {
|
|
1498
|
+
bindings?: typeof _rivetkit_rivetkit_wasm | undefined;
|
|
1499
|
+
initInput?: {
|
|
1500
|
+
module_or_path: _rivetkit_rivetkit_wasm.InitInput | Promise<_rivetkit_rivetkit_wasm.InitInput>;
|
|
1501
|
+
} | _rivetkit_rivetkit_wasm.InitInput | Promise<_rivetkit_rivetkit_wasm.InitInput> | undefined;
|
|
1502
|
+
};
|
|
1503
|
+
sqlite: {
|
|
1504
|
+
backend: "local" | "remote";
|
|
1505
|
+
} | undefined;
|
|
1455
1506
|
noWelcome: boolean;
|
|
1456
1507
|
logging: {
|
|
1457
1508
|
baseLogger?: Logger | undefined;
|
|
@@ -1488,6 +1539,7 @@ declare const RegistryConfigSchema: z$2.ZodPipe<z$2.ZodObject<{
|
|
|
1488
1539
|
name?: string | undefined;
|
|
1489
1540
|
headers?: Record<string, string> | undefined;
|
|
1490
1541
|
requestLifespan?: number | undefined;
|
|
1542
|
+
drainGracePeriod?: number | undefined;
|
|
1491
1543
|
metadata?: Record<string, unknown> | undefined;
|
|
1492
1544
|
metadataPollInterval?: number | undefined;
|
|
1493
1545
|
drainOnVersionUpgrade?: boolean | undefined;
|
|
@@ -1529,7 +1581,7 @@ declare class Registry<A extends RegistryActors> {
|
|
|
1529
1581
|
serve(): ServerlessHandler;
|
|
1530
1582
|
startEnvoy(): void;
|
|
1531
1583
|
/**
|
|
1532
|
-
* Starts the
|
|
1584
|
+
* Starts the actor envoy for standalone server deployments.
|
|
1533
1585
|
*
|
|
1534
1586
|
* @example
|
|
1535
1587
|
* ```ts
|
package/dist/browser/client.js
CHANGED
|
@@ -193,8 +193,14 @@ function deconstructError(error, logger4, extraLog, exposeInternalError = false)
|
|
|
193
193
|
function stringifyError(error) {
|
|
194
194
|
if (error instanceof Error) {
|
|
195
195
|
if (typeof process !== "undefined" && getLogErrorStack()) {
|
|
196
|
-
|
|
197
|
-
|
|
196
|
+
let stack;
|
|
197
|
+
try {
|
|
198
|
+
stack = error.stack;
|
|
199
|
+
} catch {
|
|
200
|
+
stack = void 0;
|
|
201
|
+
}
|
|
202
|
+
return `${error.name}: ${error.message}${stack ? `
|
|
203
|
+
${stack}` : ""}`;
|
|
198
204
|
} else {
|
|
199
205
|
return `${error.name}: ${error.message}`;
|
|
200
206
|
}
|
|
@@ -225,7 +231,7 @@ function noopNext() {
|
|
|
225
231
|
// package.json
|
|
226
232
|
var package_default = {
|
|
227
233
|
name: "rivetkit",
|
|
228
|
-
version: "0.0.0-pr.
|
|
234
|
+
version: "0.0.0-pr.4880.c7bfbc5",
|
|
229
235
|
description: "Lightweight libraries for building stateful actors on edge platforms",
|
|
230
236
|
license: "Apache-2.0",
|
|
231
237
|
keywords: [
|
|
@@ -386,6 +392,7 @@ var package_default = {
|
|
|
386
392
|
format: "biome format .",
|
|
387
393
|
"format:write": "biome format --write .",
|
|
388
394
|
test: "vitest run",
|
|
395
|
+
"test:platforms": "pnpm run build && RIVETKIT_INCLUDE_PLATFORM_TESTS=1 vitest run tests/platforms --passWithNoTests",
|
|
389
396
|
"test:watch": "vitest",
|
|
390
397
|
"dump-asyncapi": "tsx scripts/dump-asyncapi.ts",
|
|
391
398
|
"registry-config-schema-gen": "tsx scripts/registry-config-schema-gen.ts",
|
|
@@ -400,6 +407,7 @@ var package_default = {
|
|
|
400
407
|
"@rivetkit/engine-cli": "workspace:*",
|
|
401
408
|
"@rivetkit/engine-envoy-protocol": "workspace:*",
|
|
402
409
|
"@rivetkit/rivetkit-napi": "workspace:*",
|
|
410
|
+
"@rivetkit/rivetkit-wasm": "workspace:*",
|
|
403
411
|
"@rivetkit/traces": "workspace:*",
|
|
404
412
|
"@rivetkit/virtual-websocket": "workspace:*",
|
|
405
413
|
"@rivetkit/workflow-engine": "workspace:*",
|
|
@@ -521,13 +529,13 @@ function getLogger(name = "default") {
|
|
|
521
529
|
}
|
|
522
530
|
|
|
523
531
|
// src/utils.ts
|
|
524
|
-
var
|
|
532
|
+
var VERSION = package_default.version;
|
|
525
533
|
var _userAgent;
|
|
526
534
|
function httpUserAgent() {
|
|
527
535
|
if (_userAgent !== void 0) {
|
|
528
536
|
return _userAgent;
|
|
529
537
|
}
|
|
530
|
-
let userAgent = `RivetKit/${
|
|
538
|
+
let userAgent = `RivetKit/${VERSION}`;
|
|
531
539
|
const navigatorObj = typeof navigator !== "undefined" ? navigator : void 0;
|
|
532
540
|
if (navigatorObj?.userAgent) userAgent += ` ${navigatorObj.userAgent}`;
|
|
533
541
|
_userAgent = userAgent;
|
|
@@ -583,7 +591,7 @@ function combineUrlPath(endpoint, path, queryParams) {
|
|
|
583
591
|
var EXTRA_ERROR_LOG = {
|
|
584
592
|
issues: "https://github.com/rivet-dev/rivet/issues",
|
|
585
593
|
support: "https://rivet.dev/discord",
|
|
586
|
-
version:
|
|
594
|
+
version: VERSION
|
|
587
595
|
};
|
|
588
596
|
|
|
589
597
|
// src/devtools-loader/log.ts
|
|
@@ -592,7 +600,7 @@ function logger() {
|
|
|
592
600
|
}
|
|
593
601
|
|
|
594
602
|
// src/devtools-loader/index.ts
|
|
595
|
-
var DEFAULT_DEVTOOLS_URL = (version =
|
|
603
|
+
var DEFAULT_DEVTOOLS_URL = (version = VERSION) => `https://releases.rivet.dev/rivet/latest/devtools/mod.js?v=${version}`;
|
|
596
604
|
var scriptId = "rivetkit-devtools-script";
|
|
597
605
|
function injectDevtools(config) {
|
|
598
606
|
if (!window) {
|
|
@@ -792,7 +800,13 @@ function encodeJsonCompatValue(input) {
|
|
|
792
800
|
}
|
|
793
801
|
return input;
|
|
794
802
|
}
|
|
795
|
-
function reviveJsonCompatValue(input) {
|
|
803
|
+
function reviveJsonCompatValue(input, options = {}) {
|
|
804
|
+
if (typeof input === "bigint") {
|
|
805
|
+
if (options.coerceSafeIntegerBigInts && input >= BigInt(Number.MIN_SAFE_INTEGER) && input <= BigInt(Number.MAX_SAFE_INTEGER)) {
|
|
806
|
+
return Number(input);
|
|
807
|
+
}
|
|
808
|
+
return input;
|
|
809
|
+
}
|
|
796
810
|
if (Array.isArray(input)) {
|
|
797
811
|
if (input.length === 2 && typeof input[0] === "string" && input[0].startsWith("$")) {
|
|
798
812
|
if (input[0] === JSON_COMPAT_BIGINT) {
|
|
@@ -808,18 +822,21 @@ function reviveJsonCompatValue(input) {
|
|
|
808
822
|
return void 0;
|
|
809
823
|
}
|
|
810
824
|
if (input[0].startsWith("$$")) {
|
|
811
|
-
return [
|
|
825
|
+
return [
|
|
826
|
+
input[0].substring(1),
|
|
827
|
+
reviveJsonCompatValue(input[1], options)
|
|
828
|
+
];
|
|
812
829
|
}
|
|
813
830
|
throw new Error(
|
|
814
831
|
`Unknown JSON encoding type: ${input[0]}. This may indicate corrupted data or a version mismatch.`
|
|
815
832
|
);
|
|
816
833
|
}
|
|
817
|
-
return input.map((value) => reviveJsonCompatValue(value));
|
|
834
|
+
return input.map((value) => reviveJsonCompatValue(value, options));
|
|
818
835
|
}
|
|
819
836
|
if (isPlainObject(input)) {
|
|
820
837
|
const decoded = {};
|
|
821
838
|
for (const [key, value] of Object.entries(input)) {
|
|
822
|
-
decoded[key] = reviveJsonCompatValue(value);
|
|
839
|
+
decoded[key] = reviveJsonCompatValue(value, options);
|
|
823
840
|
}
|
|
824
841
|
return decoded;
|
|
825
842
|
}
|
|
@@ -4232,6 +4249,9 @@ var ActorConnRaw = class {
|
|
|
4232
4249
|
if (error instanceof RivetError && this.#shouldReconnectForStaleActor(error.group, error.code)) {
|
|
4233
4250
|
return true;
|
|
4234
4251
|
}
|
|
4252
|
+
if (error instanceof RivetError && error.group === "client" && error.code === "get_params_failed") {
|
|
4253
|
+
return true;
|
|
4254
|
+
}
|
|
4235
4255
|
return isRetryableLifecycleReconnectSignal(error);
|
|
4236
4256
|
}
|
|
4237
4257
|
#clearQueuedMessages() {
|