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
|
@@ -220,7 +220,7 @@ declare const RegistryConfigSchema: z.ZodPipe<z.ZodObject<{
|
|
|
220
220
|
envoyKey: z.ZodOptional<z.ZodString>;
|
|
221
221
|
}, z.core.$strip>>>;
|
|
222
222
|
shutdown: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
223
|
-
gracePeriodMs: z.
|
|
223
|
+
gracePeriodMs: z.ZodOptional<z.ZodNumber>;
|
|
224
224
|
disableSignalHandlers: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
225
225
|
}, z.core.$strip>>>;
|
|
226
226
|
}, z.core.$strip>, z.ZodTransform<{
|
|
@@ -269,8 +269,8 @@ declare const RegistryConfigSchema: z.ZodPipe<z.ZodObject<{
|
|
|
269
269
|
envoyKey?: string | undefined;
|
|
270
270
|
};
|
|
271
271
|
shutdown: {
|
|
272
|
-
gracePeriodMs: number;
|
|
273
272
|
disableSignalHandlers: boolean;
|
|
273
|
+
gracePeriodMs?: number | undefined;
|
|
274
274
|
};
|
|
275
275
|
staticDir?: string | undefined;
|
|
276
276
|
httpHost?: string | undefined;
|
|
@@ -326,8 +326,8 @@ declare const RegistryConfigSchema: z.ZodPipe<z.ZodObject<{
|
|
|
326
326
|
envoyKey?: string | undefined;
|
|
327
327
|
};
|
|
328
328
|
shutdown: {
|
|
329
|
-
gracePeriodMs: number;
|
|
330
329
|
disableSignalHandlers: boolean;
|
|
330
|
+
gracePeriodMs?: number | undefined;
|
|
331
331
|
};
|
|
332
332
|
staticDir?: string | undefined;
|
|
333
333
|
httpHost?: string | undefined;
|
|
@@ -454,6 +454,7 @@ interface DeconstructedError {
|
|
|
454
454
|
code: string;
|
|
455
455
|
message: string;
|
|
456
456
|
metadata?: unknown;
|
|
457
|
+
actor?: ActorSpecifier;
|
|
457
458
|
}
|
|
458
459
|
|
|
459
460
|
interface RivetErrorOptions extends ErrorOptions {
|
|
@@ -463,12 +464,21 @@ interface RivetErrorOptions extends ErrorOptions {
|
|
|
463
464
|
metadata?: unknown;
|
|
464
465
|
/** Explicit HTTP status override for router responses. */
|
|
465
466
|
statusCode?: number;
|
|
467
|
+
/** Actor context associated with this error. */
|
|
468
|
+
actor?: ActorSpecifier;
|
|
469
|
+
}
|
|
470
|
+
/** Identifies the actor that was handling work when an error was produced. */
|
|
471
|
+
interface ActorSpecifier {
|
|
472
|
+
actorId: string;
|
|
473
|
+
generation: number;
|
|
474
|
+
key?: string;
|
|
466
475
|
}
|
|
467
476
|
declare class RivetError extends Error {
|
|
468
477
|
__type: "RivetError";
|
|
469
478
|
public: boolean;
|
|
470
479
|
metadata?: unknown;
|
|
471
480
|
statusCode: number;
|
|
481
|
+
actor?: ActorSpecifier;
|
|
472
482
|
readonly group: string;
|
|
473
483
|
readonly code: string;
|
|
474
484
|
static isRivetError(error: unknown): error is RivetError | DeconstructedError;
|
|
@@ -563,12 +573,14 @@ type FetchHandler = (request: Request, ...args: any) => Response | Promise<Respo
|
|
|
563
573
|
interface ServerlessHandler {
|
|
564
574
|
fetch: FetchHandler;
|
|
565
575
|
}
|
|
566
|
-
interface
|
|
567
|
-
|
|
568
|
-
|
|
576
|
+
interface RegistryRoutes {
|
|
577
|
+
health(): Promise<Response>;
|
|
578
|
+
metadata(): Promise<Response>;
|
|
579
|
+
prometheusMetrics(request?: Request): Promise<Response>;
|
|
569
580
|
}
|
|
570
581
|
declare class Registry<A extends RegistryActors> {
|
|
571
582
|
#private;
|
|
583
|
+
readonly routes: RegistryRoutes;
|
|
572
584
|
get config(): RegistryConfigInput<A>;
|
|
573
585
|
parseConfig(): RegistryConfig;
|
|
574
586
|
constructor(config: RegistryConfigInput<A>);
|
|
@@ -592,7 +604,6 @@ declare class Registry<A extends RegistryActors> {
|
|
|
592
604
|
* ```
|
|
593
605
|
*/
|
|
594
606
|
serve(): ServerlessHandler;
|
|
595
|
-
diagnostics(): Promise<RegistryDiagnostics>;
|
|
596
607
|
startEnvoy(): void;
|
|
597
608
|
/**
|
|
598
609
|
* Starts the actor envoy for standalone server deployments.
|
|
@@ -220,7 +220,7 @@ declare const RegistryConfigSchema: z.ZodPipe<z.ZodObject<{
|
|
|
220
220
|
envoyKey: z.ZodOptional<z.ZodString>;
|
|
221
221
|
}, z.core.$strip>>>;
|
|
222
222
|
shutdown: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
223
|
-
gracePeriodMs: z.
|
|
223
|
+
gracePeriodMs: z.ZodOptional<z.ZodNumber>;
|
|
224
224
|
disableSignalHandlers: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
225
225
|
}, z.core.$strip>>>;
|
|
226
226
|
}, z.core.$strip>, z.ZodTransform<{
|
|
@@ -269,8 +269,8 @@ declare const RegistryConfigSchema: z.ZodPipe<z.ZodObject<{
|
|
|
269
269
|
envoyKey?: string | undefined;
|
|
270
270
|
};
|
|
271
271
|
shutdown: {
|
|
272
|
-
gracePeriodMs: number;
|
|
273
272
|
disableSignalHandlers: boolean;
|
|
273
|
+
gracePeriodMs?: number | undefined;
|
|
274
274
|
};
|
|
275
275
|
staticDir?: string | undefined;
|
|
276
276
|
httpHost?: string | undefined;
|
|
@@ -326,8 +326,8 @@ declare const RegistryConfigSchema: z.ZodPipe<z.ZodObject<{
|
|
|
326
326
|
envoyKey?: string | undefined;
|
|
327
327
|
};
|
|
328
328
|
shutdown: {
|
|
329
|
-
gracePeriodMs: number;
|
|
330
329
|
disableSignalHandlers: boolean;
|
|
330
|
+
gracePeriodMs?: number | undefined;
|
|
331
331
|
};
|
|
332
332
|
staticDir?: string | undefined;
|
|
333
333
|
httpHost?: string | undefined;
|
|
@@ -454,6 +454,7 @@ interface DeconstructedError {
|
|
|
454
454
|
code: string;
|
|
455
455
|
message: string;
|
|
456
456
|
metadata?: unknown;
|
|
457
|
+
actor?: ActorSpecifier;
|
|
457
458
|
}
|
|
458
459
|
|
|
459
460
|
interface RivetErrorOptions extends ErrorOptions {
|
|
@@ -463,12 +464,21 @@ interface RivetErrorOptions extends ErrorOptions {
|
|
|
463
464
|
metadata?: unknown;
|
|
464
465
|
/** Explicit HTTP status override for router responses. */
|
|
465
466
|
statusCode?: number;
|
|
467
|
+
/** Actor context associated with this error. */
|
|
468
|
+
actor?: ActorSpecifier;
|
|
469
|
+
}
|
|
470
|
+
/** Identifies the actor that was handling work when an error was produced. */
|
|
471
|
+
interface ActorSpecifier {
|
|
472
|
+
actorId: string;
|
|
473
|
+
generation: number;
|
|
474
|
+
key?: string;
|
|
466
475
|
}
|
|
467
476
|
declare class RivetError extends Error {
|
|
468
477
|
__type: "RivetError";
|
|
469
478
|
public: boolean;
|
|
470
479
|
metadata?: unknown;
|
|
471
480
|
statusCode: number;
|
|
481
|
+
actor?: ActorSpecifier;
|
|
472
482
|
readonly group: string;
|
|
473
483
|
readonly code: string;
|
|
474
484
|
static isRivetError(error: unknown): error is RivetError | DeconstructedError;
|
|
@@ -563,12 +573,14 @@ type FetchHandler = (request: Request, ...args: any) => Response | Promise<Respo
|
|
|
563
573
|
interface ServerlessHandler {
|
|
564
574
|
fetch: FetchHandler;
|
|
565
575
|
}
|
|
566
|
-
interface
|
|
567
|
-
|
|
568
|
-
|
|
576
|
+
interface RegistryRoutes {
|
|
577
|
+
health(): Promise<Response>;
|
|
578
|
+
metadata(): Promise<Response>;
|
|
579
|
+
prometheusMetrics(request?: Request): Promise<Response>;
|
|
569
580
|
}
|
|
570
581
|
declare class Registry<A extends RegistryActors> {
|
|
571
582
|
#private;
|
|
583
|
+
readonly routes: RegistryRoutes;
|
|
572
584
|
get config(): RegistryConfigInput<A>;
|
|
573
585
|
parseConfig(): RegistryConfig;
|
|
574
586
|
constructor(config: RegistryConfigInput<A>);
|
|
@@ -592,7 +604,6 @@ declare class Registry<A extends RegistryActors> {
|
|
|
592
604
|
* ```
|
|
593
605
|
*/
|
|
594
606
|
serve(): ServerlessHandler;
|
|
595
|
-
diagnostics(): Promise<RegistryDiagnostics>;
|
|
596
607
|
startEnvoy(): void;
|
|
597
608
|
/**
|
|
598
609
|
* Starts the actor envoy for standalone server deployments.
|
|
@@ -787,7 +787,7 @@ function isRivetErrorCode(error, group, code) {
|
|
|
787
787
|
// package.json
|
|
788
788
|
var package_default = {
|
|
789
789
|
name: "rivetkit",
|
|
790
|
-
version: "2.3.0-rc.
|
|
790
|
+
version: "2.3.0-rc.6",
|
|
791
791
|
description: "Lightweight libraries for building stateful actors on edge platforms",
|
|
792
792
|
license: "Apache-2.0",
|
|
793
793
|
keywords: [
|