rivetkit 2.3.0-rc.5 → 2.3.0-rc.6
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 +21 -18
- package/dist/browser/client.js +735 -170
- package/dist/browser/client.js.map +1 -1
- package/dist/browser/inspector/client.js +1 -1
- package/dist/browser/inspector/client.js.map +1 -1
- package/dist/tsup/actor/errors.cjs +4 -2
- package/dist/tsup/actor/errors.cjs.map +1 -1
- package/dist/tsup/actor/errors.d.cts +1 -74
- package/dist/tsup/actor/errors.d.ts +1 -74
- package/dist/tsup/actor/errors.js +3 -1
- package/dist/tsup/agent-os/index.cjs +1 -1
- package/dist/tsup/agent-os/index.cjs.map +1 -1
- package/dist/tsup/agent-os/index.d.cts +18 -7
- package/dist/tsup/agent-os/index.d.ts +18 -7
- package/dist/tsup/agent-os/index.js +1 -1
- package/dist/tsup/agent-os/index.js.map +1 -1
- package/dist/tsup/{chunk-2GANBXVP.cjs → chunk-2G64KSZQ.cjs} +10 -10
- package/dist/tsup/{chunk-2GANBXVP.cjs.map → chunk-2G64KSZQ.cjs.map} +1 -1
- package/dist/tsup/{chunk-N2DQSJIW.js → chunk-6S25NVAP.js} +13 -46
- package/dist/tsup/chunk-6S25NVAP.js.map +1 -0
- package/dist/tsup/{chunk-NATOT3ET.js → chunk-CAF6JDJE.js} +4 -4
- package/dist/tsup/{chunk-PGYEMIOE.js → chunk-DEO7MMWQ.js} +2 -2
- package/dist/tsup/{chunk-SULB574D.js → chunk-EMO6E3PJ.js} +3 -3
- package/dist/tsup/{chunk-FTZIZ3JG.cjs → chunk-ENK7C66G.cjs} +838 -236
- package/dist/tsup/chunk-ENK7C66G.cjs.map +1 -0
- package/dist/tsup/{chunk-JY73X7VU.js → chunk-FLODVLYW.js} +690 -88
- package/dist/tsup/chunk-FLODVLYW.js.map +1 -0
- package/dist/tsup/{chunk-OVJX4IFY.cjs → chunk-HTR4YLNT.cjs} +4 -4
- package/dist/tsup/{chunk-OVJX4IFY.cjs.map → chunk-HTR4YLNT.cjs.map} +1 -1
- package/dist/tsup/{chunk-LELRJK66.cjs → chunk-JALSAX7Z.cjs} +3 -3
- package/dist/tsup/{chunk-LELRJK66.cjs.map → chunk-JALSAX7Z.cjs.map} +1 -1
- package/dist/tsup/{chunk-JRCZDHXT.cjs → chunk-K5BA2LEO.cjs} +19 -52
- package/dist/tsup/chunk-K5BA2LEO.cjs.map +1 -0
- package/dist/tsup/{chunk-K34B3OVG.js → chunk-KIWH5H3K.js} +30 -9
- package/dist/tsup/chunk-KIWH5H3K.js.map +1 -0
- package/dist/tsup/{chunk-NW2J4SOL.cjs → chunk-LIXXFXVR.cjs} +5 -5
- package/dist/tsup/{chunk-NW2J4SOL.cjs.map → chunk-LIXXFXVR.cjs.map} +1 -1
- package/dist/tsup/{chunk-HR547GVH.cjs → chunk-M5C7YNI5.cjs} +8 -8
- package/dist/tsup/{chunk-HR547GVH.cjs.map → chunk-M5C7YNI5.cjs.map} +1 -1
- package/dist/tsup/{chunk-V3QNBJ7N.cjs → chunk-QAZLM4WT.cjs} +31 -10
- package/dist/tsup/chunk-QAZLM4WT.cjs.map +1 -0
- package/dist/tsup/{chunk-LDTT6WKJ.js → chunk-RTC2AZGB.js} +2 -2
- package/dist/tsup/{chunk-UXTP4EBU.js → chunk-ZI5QJMKO.js} +2 -2
- 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-CvQUtDp9.d.ts → config-0Ta55UV0.d.ts} +10 -9
- package/dist/tsup/{config-C-a9vrke.d.cts → config-Ca8dN4cS.d.cts} +10 -9
- package/dist/tsup/{context-A7R0bsZL.d.ts → context-B_IWbWne.d.ts} +1 -1
- package/dist/tsup/{context-CA3r-pf2.d.cts → context-CUrQ9MHc.d.cts} +1 -1
- package/dist/tsup/inspector/mod.cjs +6 -6
- package/dist/tsup/inspector/mod.js +5 -5
- package/dist/tsup/mod.cjs +252 -207
- 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 +183 -138
- 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-DVekpm4I.d.cts +103 -0
- package/dist/tsup/utils-DVekpm4I.d.ts +103 -0
- package/dist/tsup/utils.cjs +3 -3
- package/dist/tsup/utils.d.cts +1 -1
- package/dist/tsup/utils.d.ts +1 -1
- 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 +8 -8
- package/src/actor/errors.ts +53 -7
- package/src/client/actor-conn.ts +52 -29
- package/src/client/actor-handle.ts +57 -23
- package/src/client/errors.ts +2 -1
- package/src/client/raw-utils.ts +2 -4
- package/src/client/utils.ts +32 -3
- package/src/common/actor-router-consts.ts +4 -0
- package/src/common/bare/generated/client-protocol/v4.ts +599 -0
- package/src/common/client-protocol-versioned.ts +125 -18
- package/src/common/client-protocol-zod.ts +7 -0
- package/src/common/client-protocol.ts +1 -1
- package/src/common/database/native-database.test.ts +35 -0
- package/src/common/database/native-database.ts +8 -4
- package/src/common/router.ts +38 -8
- package/src/common/utils.ts +9 -52
- package/src/drivers/engine/actor-driver.ts +18 -17
- package/src/registry/config/index.ts +3 -5
- package/src/registry/index.ts +156 -19
- package/src/registry/napi-runtime.ts +44 -6
- package/src/registry/native.ts +5 -152
- package/src/registry/runtime.ts +16 -5
- package/src/registry/wasm-runtime.ts +22 -2
- package/dist/tsup/chunk-FTZIZ3JG.cjs.map +0 -1
- package/dist/tsup/chunk-JRCZDHXT.cjs.map +0 -1
- package/dist/tsup/chunk-JY73X7VU.js.map +0 -1
- package/dist/tsup/chunk-K34B3OVG.js.map +0 -1
- package/dist/tsup/chunk-N2DQSJIW.js.map +0 -1
- package/dist/tsup/chunk-V3QNBJ7N.cjs.map +0 -1
- package/dist/tsup/utils-fwx3o3K9.d.cts +0 -18
- package/dist/tsup/utils-fwx3o3K9.d.ts +0 -18
- /package/dist/tsup/{chunk-NATOT3ET.js.map → chunk-CAF6JDJE.js.map} +0 -0
- /package/dist/tsup/{chunk-PGYEMIOE.js.map → chunk-DEO7MMWQ.js.map} +0 -0
- /package/dist/tsup/{chunk-SULB574D.js.map → chunk-EMO6E3PJ.js.map} +0 -0
- /package/dist/tsup/{chunk-LDTT6WKJ.js.map → chunk-RTC2AZGB.js.map} +0 -0
- /package/dist/tsup/{chunk-UXTP4EBU.js.map → chunk-ZI5QJMKO.js.map} +0 -0
package/dist/browser/client.d.ts
CHANGED
|
@@ -190,6 +190,7 @@ interface DeconstructedError {
|
|
|
190
190
|
code: string;
|
|
191
191
|
message: string;
|
|
192
192
|
metadata?: unknown;
|
|
193
|
+
actor?: ActorSpecifier;
|
|
193
194
|
}
|
|
194
195
|
|
|
195
196
|
interface RivetErrorOptions extends ErrorOptions {
|
|
@@ -199,6 +200,14 @@ interface RivetErrorOptions extends ErrorOptions {
|
|
|
199
200
|
metadata?: unknown;
|
|
200
201
|
/** Explicit HTTP status override for router responses. */
|
|
201
202
|
statusCode?: number;
|
|
203
|
+
/** Actor context associated with this error. */
|
|
204
|
+
actor?: ActorSpecifier;
|
|
205
|
+
}
|
|
206
|
+
/** Identifies the actor that was handling work when an error was produced. */
|
|
207
|
+
interface ActorSpecifier {
|
|
208
|
+
actorId: string;
|
|
209
|
+
generation: number;
|
|
210
|
+
key?: string;
|
|
202
211
|
}
|
|
203
212
|
interface UserErrorOptions extends ErrorOptions {
|
|
204
213
|
/**
|
|
@@ -217,6 +226,7 @@ declare class RivetError extends Error {
|
|
|
217
226
|
public: boolean;
|
|
218
227
|
metadata?: unknown;
|
|
219
228
|
statusCode: number;
|
|
229
|
+
actor?: ActorSpecifier;
|
|
220
230
|
readonly group: string;
|
|
221
231
|
readonly code: string;
|
|
222
232
|
static isRivetError(error: unknown): error is RivetError | DeconstructedError;
|
|
@@ -1396,11 +1406,7 @@ declare const RegistryConfigSchema: z$2.ZodPipe<z$2.ZodObject<{
|
|
|
1396
1406
|
}>>, z$2.ZodTransform<"auto" | "native" | "wasm", "auto" | "native" | "wasm" | undefined>>;
|
|
1397
1407
|
wasm: z$2.ZodDefault<z$2.ZodOptional<z$2.ZodObject<{
|
|
1398
1408
|
bindings: z$2.ZodOptional<z$2.ZodCustom<typeof _rivetkit_rivetkit_wasm, typeof _rivetkit_rivetkit_wasm>>;
|
|
1399
|
-
initInput: z$2.ZodOptional<z$2.ZodCustom<
|
|
1400
|
-
module_or_path: _rivetkit_rivetkit_wasm.InitInput | Promise<_rivetkit_rivetkit_wasm.InitInput>;
|
|
1401
|
-
} | _rivetkit_rivetkit_wasm.InitInput | Promise<_rivetkit_rivetkit_wasm.InitInput> | undefined, {
|
|
1402
|
-
module_or_path: _rivetkit_rivetkit_wasm.InitInput | Promise<_rivetkit_rivetkit_wasm.InitInput>;
|
|
1403
|
-
} | _rivetkit_rivetkit_wasm.InitInput | Promise<_rivetkit_rivetkit_wasm.InitInput> | undefined>>;
|
|
1409
|
+
initInput: z$2.ZodOptional<z$2.ZodCustom<any, any>>;
|
|
1404
1410
|
}, z$2.core.$strip>>>;
|
|
1405
1411
|
sqlite: z$2.ZodPipe<z$2.ZodOptional<z$2.ZodUnion<readonly [z$2.ZodEnum<{
|
|
1406
1412
|
local: "local";
|
|
@@ -1461,7 +1467,7 @@ declare const RegistryConfigSchema: z$2.ZodPipe<z$2.ZodObject<{
|
|
|
1461
1467
|
envoyKey: z$2.ZodOptional<z$2.ZodString>;
|
|
1462
1468
|
}, z$2.core.$strip>>>;
|
|
1463
1469
|
shutdown: z$2.ZodDefault<z$2.ZodOptional<z$2.ZodObject<{
|
|
1464
|
-
gracePeriodMs: z$2.
|
|
1470
|
+
gracePeriodMs: z$2.ZodOptional<z$2.ZodNumber>;
|
|
1465
1471
|
disableSignalHandlers: z$2.ZodDefault<z$2.ZodOptional<z$2.ZodBoolean>>;
|
|
1466
1472
|
}, z$2.core.$strip>>>;
|
|
1467
1473
|
}, z$2.core.$strip>, z$2.ZodTransform<{
|
|
@@ -1491,9 +1497,7 @@ declare const RegistryConfigSchema: z$2.ZodPipe<z$2.ZodObject<{
|
|
|
1491
1497
|
runtime: "auto" | "native" | "wasm";
|
|
1492
1498
|
wasm: {
|
|
1493
1499
|
bindings?: typeof _rivetkit_rivetkit_wasm | undefined;
|
|
1494
|
-
initInput?:
|
|
1495
|
-
module_or_path: _rivetkit_rivetkit_wasm.InitInput | Promise<_rivetkit_rivetkit_wasm.InitInput>;
|
|
1496
|
-
} | _rivetkit_rivetkit_wasm.InitInput | Promise<_rivetkit_rivetkit_wasm.InitInput> | undefined;
|
|
1500
|
+
initInput?: any;
|
|
1497
1501
|
};
|
|
1498
1502
|
noWelcome: boolean;
|
|
1499
1503
|
logging: {
|
|
@@ -1512,8 +1516,8 @@ declare const RegistryConfigSchema: z$2.ZodPipe<z$2.ZodObject<{
|
|
|
1512
1516
|
envoyKey?: string | undefined;
|
|
1513
1517
|
};
|
|
1514
1518
|
shutdown: {
|
|
1515
|
-
gracePeriodMs: number;
|
|
1516
1519
|
disableSignalHandlers: boolean;
|
|
1520
|
+
gracePeriodMs?: number | undefined;
|
|
1517
1521
|
};
|
|
1518
1522
|
staticDir?: string | undefined;
|
|
1519
1523
|
httpHost?: string | undefined;
|
|
@@ -1538,9 +1542,7 @@ declare const RegistryConfigSchema: z$2.ZodPipe<z$2.ZodObject<{
|
|
|
1538
1542
|
runtime: "auto" | "native" | "wasm";
|
|
1539
1543
|
wasm: {
|
|
1540
1544
|
bindings?: typeof _rivetkit_rivetkit_wasm | undefined;
|
|
1541
|
-
initInput?:
|
|
1542
|
-
module_or_path: _rivetkit_rivetkit_wasm.InitInput | Promise<_rivetkit_rivetkit_wasm.InitInput>;
|
|
1543
|
-
} | _rivetkit_rivetkit_wasm.InitInput | Promise<_rivetkit_rivetkit_wasm.InitInput> | undefined;
|
|
1545
|
+
initInput?: any;
|
|
1544
1546
|
};
|
|
1545
1547
|
sqlite: {
|
|
1546
1548
|
backend: "local" | "remote";
|
|
@@ -1571,8 +1573,8 @@ declare const RegistryConfigSchema: z$2.ZodPipe<z$2.ZodObject<{
|
|
|
1571
1573
|
envoyKey?: string | undefined;
|
|
1572
1574
|
};
|
|
1573
1575
|
shutdown: {
|
|
1574
|
-
gracePeriodMs: number;
|
|
1575
1576
|
disableSignalHandlers: boolean;
|
|
1577
|
+
gracePeriodMs?: number | undefined;
|
|
1576
1578
|
};
|
|
1577
1579
|
staticDir?: string | undefined;
|
|
1578
1580
|
httpHost?: string | undefined;
|
|
@@ -1596,12 +1598,14 @@ type FetchHandler = (request: Request, ...args: any) => Response | Promise<Respo
|
|
|
1596
1598
|
interface ServerlessHandler {
|
|
1597
1599
|
fetch: FetchHandler;
|
|
1598
1600
|
}
|
|
1599
|
-
interface
|
|
1600
|
-
|
|
1601
|
-
|
|
1601
|
+
interface RegistryRoutes {
|
|
1602
|
+
health(): Promise<Response>;
|
|
1603
|
+
metadata(): Promise<Response>;
|
|
1604
|
+
prometheusMetrics(request?: Request): Promise<Response>;
|
|
1602
1605
|
}
|
|
1603
1606
|
declare class Registry<A extends RegistryActors> {
|
|
1604
1607
|
#private;
|
|
1608
|
+
readonly routes: RegistryRoutes;
|
|
1605
1609
|
get config(): RegistryConfigInput<A>;
|
|
1606
1610
|
parseConfig(): RegistryConfig;
|
|
1607
1611
|
constructor(config: RegistryConfigInput<A>);
|
|
@@ -1625,7 +1629,6 @@ declare class Registry<A extends RegistryActors> {
|
|
|
1625
1629
|
* ```
|
|
1626
1630
|
*/
|
|
1627
1631
|
serve(): ServerlessHandler;
|
|
1628
|
-
diagnostics(): Promise<RegistryDiagnostics>;
|
|
1629
1632
|
startEnvoy(): void;
|
|
1630
1633
|
/**
|
|
1631
1634
|
* Starts the actor envoy for standalone server deployments.
|