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