rivetkit 0.0.0-pr.4885.b46ec4c → 0.0.0-pr.4931.7575e83
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 +131 -26
- package/dist/browser/client.js +272 -105
- 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 +93 -126
- package/dist/tsup/agent-os/index.cjs.map +1 -1
- package/dist/tsup/agent-os/index.d.cts +125 -27
- package/dist/tsup/agent-os/index.d.ts +125 -27
- package/dist/tsup/agent-os/index.js +93 -126
- package/dist/tsup/agent-os/index.js.map +1 -1
- package/dist/tsup/{chunk-6SHJB35F.cjs → chunk-2PRFBC5A.cjs} +10 -10
- package/dist/tsup/{chunk-6SHJB35F.cjs.map → chunk-2PRFBC5A.cjs.map} +1 -1
- package/dist/tsup/{chunk-N32ZRI2V.js → chunk-34PZVQCU.js} +2 -2
- package/dist/tsup/{chunk-ZA2RNQQY.cjs → chunk-A4HZ7ONJ.cjs} +4 -4
- package/dist/tsup/{chunk-ZA2RNQQY.cjs.map → chunk-A4HZ7ONJ.cjs.map} +1 -1
- package/dist/tsup/{chunk-IWVVXJAP.js → chunk-BC2XLNBT.js} +196 -46
- package/dist/tsup/chunk-BC2XLNBT.js.map +1 -0
- package/dist/tsup/{chunk-C3DC2FU3.js → chunk-IX4T24GY.js} +21 -6
- package/dist/tsup/chunk-IX4T24GY.js.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-ENLM65WB.cjs → chunk-LEZCVIH6.cjs} +356 -206
- package/dist/tsup/chunk-LEZCVIH6.cjs.map +1 -0
- package/dist/tsup/{chunk-DPMCOK4E.js → chunk-MDTTU66T.js} +2 -2
- package/dist/tsup/{chunk-GVODE3IL.cjs → chunk-OLEFUTNR.cjs} +25 -10
- package/dist/tsup/chunk-OLEFUTNR.cjs.map +1 -0
- package/dist/tsup/{chunk-V6P2YAO3.js → chunk-OWKTP6RN.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/{chunk-JFWV3SSB.js → chunk-VSG5FWRN.js} +3 -3
- package/dist/tsup/chunk-VSG5FWRN.js.map +1 -0
- package/dist/tsup/{chunk-3NU5Q2CM.js → chunk-WHGXVAZK.js} +19 -9
- package/dist/tsup/chunk-WHGXVAZK.js.map +1 -0
- package/dist/tsup/{chunk-5HWP5DWL.cjs → chunk-XCYKKKP3.cjs} +3 -3
- package/dist/tsup/{chunk-5HWP5DWL.cjs.map → chunk-XCYKKKP3.cjs.map} +1 -1
- package/dist/tsup/{chunk-BXBGVVVX.cjs → chunk-YXBHRFRX.cjs} +8 -8
- package/dist/tsup/{chunk-BXBGVVVX.cjs.map → chunk-YXBHRFRX.cjs.map} +1 -1
- package/dist/tsup/{chunk-SYASMKNO.cjs → chunk-YYWHZL7R.cjs} +26 -16
- package/dist/tsup/chunk-YYWHZL7R.cjs.map +1 -0
- package/dist/tsup/client/mod.cjs +7 -7
- package/dist/tsup/client/mod.d.cts +13 -3
- package/dist/tsup/client/mod.d.ts +13 -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-D6WxBYjV.d.cts → config-CAraoDmU.d.cts} +143 -17
- package/dist/tsup/{config-B3RIidaJ.d.ts → config-CZC6fclE.d.ts} +143 -17
- package/dist/tsup/{config-B9qUIHX4.d.ts → config-kxXbtrJU.d.cts} +25 -12
- package/dist/tsup/{config-B9qUIHX4.d.cts → config-kxXbtrJU.d.ts} +25 -12
- package/dist/tsup/{context-BxvHh9wi.d.cts → context-BZI7hjE6.d.cts} +2 -2
- package/dist/tsup/{context-CNIZBIKl.d.ts → context-DAOBk4cN.d.ts} +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 +56 -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 +56 -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 +1920 -536
- 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 +1862 -478
- 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-common.ts +33 -0
- package/src/client/actor-conn.ts +54 -1
- package/src/client/actor-handle.ts +58 -16
- package/src/client/client.ts +8 -4
- package/src/client/config.ts +8 -0
- package/src/client/mod.ts +9 -4
- package/src/client/raw-utils.ts +11 -2
- package/src/common/actor-router-consts.ts +4 -0
- package/src/common/database/config.ts +34 -5
- package/src/common/database/mod.test.ts +105 -0
- package/src/common/database/mod.ts +77 -125
- package/src/common/database/native-database.test.ts +198 -0
- package/src/common/database/native-database.ts +203 -58
- package/src/common/encoding.ts +24 -4
- package/src/common/utils.ts +8 -2
- package/src/db/drizzle.ts +105 -117
- package/src/db/mod.ts +1 -0
- package/src/engine-client/actor-http-client.ts +21 -2
- package/src/engine-client/actor-websocket-client.ts +24 -1
- package/src/engine-client/api-endpoints.ts +1 -0
- package/src/engine-client/driver.ts +10 -1
- package/src/engine-client/mod.ts +93 -17
- package/src/globals.d.ts +4 -0
- package/src/registry/config/index.ts +128 -8
- package/src/registry/config/serverless.ts +7 -1
- package/src/registry/index.ts +83 -48
- package/src/registry/napi-runtime.ts +766 -0
- package/src/registry/native.ts +804 -546
- package/src/registry/runtime.test.ts +50 -0
- package/src/registry/runtime.ts +579 -0
- package/src/registry/wasm-runtime.ts +890 -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-3NU5Q2CM.js.map +0 -1
- package/dist/tsup/chunk-C3DC2FU3.js.map +0 -1
- package/dist/tsup/chunk-ENLM65WB.cjs.map +0 -1
- package/dist/tsup/chunk-GVODE3IL.cjs.map +0 -1
- package/dist/tsup/chunk-IWVVXJAP.js.map +0 -1
- package/dist/tsup/chunk-JFWV3SSB.js.map +0 -1
- package/dist/tsup/chunk-JTL6Y2UN.cjs.map +0 -1
- package/dist/tsup/chunk-SYASMKNO.cjs.map +0 -1
- package/dist/tsup/chunk-ZGWSH7YV.js.map +0 -1
- /package/dist/tsup/{chunk-N32ZRI2V.js.map → chunk-34PZVQCU.js.map} +0 -0
- /package/dist/tsup/{chunk-DPMCOK4E.js.map → chunk-MDTTU66T.js.map} +0 -0
- /package/dist/tsup/{chunk-V6P2YAO3.js.map → chunk-OWKTP6RN.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,30 @@ 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
|
+
}
|
|
26
|
+
interface SqliteNativeMetrics {
|
|
27
|
+
requestBuildNs: number;
|
|
28
|
+
serializeNs: number;
|
|
29
|
+
transportNs: number;
|
|
30
|
+
stateUpdateNs: number;
|
|
31
|
+
totalNs: number;
|
|
32
|
+
commitCount: number;
|
|
33
|
+
pageCacheEntries: number;
|
|
34
|
+
pageCacheWeightedSize: number;
|
|
35
|
+
pageCacheCapacityPages: number;
|
|
36
|
+
writeBufferDirtyPages: number;
|
|
37
|
+
dbSizePages: number;
|
|
38
|
+
}
|
|
31
39
|
interface SqliteDatabase {
|
|
32
40
|
exec(sql: string, callback?: (row: unknown[], columns: string[]) => void): Promise<void>;
|
|
41
|
+
execute(sql: string, params?: SqliteBindings): Promise<SqliteExecuteResult>;
|
|
33
42
|
run(sql: string, params?: SqliteBindings): Promise<void>;
|
|
34
43
|
query(sql: string, params?: SqliteBindings): Promise<SqliteQueryResult>;
|
|
35
|
-
|
|
44
|
+
writeMode<T>(callback: () => Promise<T>): Promise<T>;
|
|
45
|
+
nativeMetrics?(): SqliteNativeMetrics | Promise<SqliteNativeMetrics | null> | null;
|
|
36
46
|
close(): Promise<void>;
|
|
37
47
|
}
|
|
38
48
|
/**
|
|
@@ -102,6 +112,10 @@ type RawAccess = {
|
|
|
102
112
|
* Executes a raw SQL query.
|
|
103
113
|
*/
|
|
104
114
|
execute: ExecuteFunction;
|
|
115
|
+
/**
|
|
116
|
+
* Returns native SQLite metrics when the active runtime supports them.
|
|
117
|
+
*/
|
|
118
|
+
nativeMetrics?: () => SqliteNativeMetrics | Promise<SqliteNativeMetrics | null> | null;
|
|
105
119
|
/**
|
|
106
120
|
* Closes the database connection and releases resources.
|
|
107
121
|
*/
|
|
@@ -260,17 +274,20 @@ type GetUpgradeWebSocket = () => UpgradeWebSocket;
|
|
|
260
274
|
type GatewayTarget = {
|
|
261
275
|
directId: string;
|
|
262
276
|
} | ActorQuery;
|
|
277
|
+
interface GatewayRequestOptions {
|
|
278
|
+
bypassConnectable?: boolean;
|
|
279
|
+
}
|
|
263
280
|
interface EngineControlClient {
|
|
264
281
|
getForId(input: GetForIdInput): Promise<ActorOutput | undefined>;
|
|
265
282
|
getWithKey(input: GetWithKeyInput): Promise<ActorOutput | undefined>;
|
|
266
283
|
getOrCreateWithKey(input: GetOrCreateWithKeyInput): Promise<ActorOutput>;
|
|
267
284
|
createActor(input: CreateInput): Promise<ActorOutput>;
|
|
268
285
|
listActors(input: ListActorsInput): Promise<ActorOutput[]>;
|
|
269
|
-
sendRequest(target: GatewayTarget, actorRequest: Request): Promise<Response>;
|
|
270
|
-
openWebSocket(path: string, target: GatewayTarget, encoding: Encoding, params: unknown): Promise<UniversalWebSocket>;
|
|
286
|
+
sendRequest(target: GatewayTarget, actorRequest: Request, options?: GatewayRequestOptions): Promise<Response>;
|
|
287
|
+
openWebSocket(path: string, target: GatewayTarget, encoding: Encoding, params: unknown, options?: GatewayRequestOptions): Promise<UniversalWebSocket>;
|
|
271
288
|
proxyRequest(c: Context, actorRequest: Request, actorId: string): Promise<Response>;
|
|
272
289
|
proxyWebSocket(c: Context, path: string, actorId: string, encoding: Encoding, params: unknown): Promise<Response>;
|
|
273
|
-
buildGatewayUrl(target: GatewayTarget): Promise<string>;
|
|
290
|
+
buildGatewayUrl(target: GatewayTarget, options?: GatewayRequestOptions): Promise<string>;
|
|
274
291
|
displayInformation(): RuntimeDisplayInformation;
|
|
275
292
|
extraStartupLog?: () => Record<string, unknown>;
|
|
276
293
|
modifyRuntimeRouter?: (config: RegistryConfig, router: Hono) => void;
|
|
@@ -358,6 +375,22 @@ interface QueueSendResult<TResponse = unknown> {
|
|
|
358
375
|
* @returns {Promise<Response>}
|
|
359
376
|
*/
|
|
360
377
|
type ActorActionFunction<Args extends Array<unknown> = unknown[], Response = unknown> = (...args: Args extends [unknown, ...infer Rest] ? Rest : Args) => Promise<Response>;
|
|
378
|
+
interface ActorGatewayOptions {
|
|
379
|
+
bypassConnectable?: boolean;
|
|
380
|
+
}
|
|
381
|
+
interface ActorActionOptions {
|
|
382
|
+
gateway?: ActorGatewayOptions;
|
|
383
|
+
signal?: AbortSignal;
|
|
384
|
+
}
|
|
385
|
+
interface ActorConnectOptions {
|
|
386
|
+
gateway?: ActorGatewayOptions;
|
|
387
|
+
}
|
|
388
|
+
interface ActorFetchInit extends RequestInit {
|
|
389
|
+
gateway?: ActorGatewayOptions;
|
|
390
|
+
}
|
|
391
|
+
interface ActorWebSocketOptions {
|
|
392
|
+
gateway?: ActorGatewayOptions;
|
|
393
|
+
}
|
|
361
394
|
/**
|
|
362
395
|
* Maps action methods from actor definition to typed function signatures.
|
|
363
396
|
*/
|
|
@@ -445,7 +478,7 @@ declare class ActorConnRaw {
|
|
|
445
478
|
*
|
|
446
479
|
* @protected
|
|
447
480
|
*/
|
|
448
|
-
constructor(client: ClientRaw, driver: EngineControlClient, params: unknown, getParams: (() => Promise<unknown>) | undefined, encoding: Encoding, actorResolutionState: ActorResolutionState);
|
|
481
|
+
constructor(client: ClientRaw, driver: EngineControlClient, params: unknown, getParams: (() => Promise<unknown>) | undefined, encoding: Encoding, actorResolutionState: ActorResolutionState, gatewayOptions?: ActorGatewayOptions);
|
|
449
482
|
send(name: string, body: unknown, options: QueueSendWaitOptions): Promise<QueueSendResult>;
|
|
450
483
|
send(name: string, body: unknown, options?: QueueSendNoWaitOptions): Promise<void>;
|
|
451
484
|
/**
|
|
@@ -510,6 +543,10 @@ declare class ActorConnRaw {
|
|
|
510
543
|
* @returns {boolean} - True if the connection is open, false otherwise.
|
|
511
544
|
*/
|
|
512
545
|
get isConnected(): boolean;
|
|
546
|
+
/**
|
|
547
|
+
* Resolves when this connection first reaches the connected state.
|
|
548
|
+
*/
|
|
549
|
+
get ready(): Promise<void>;
|
|
513
550
|
/**
|
|
514
551
|
* Subscribes to connection open events.
|
|
515
552
|
*
|
|
@@ -577,7 +614,7 @@ declare class ActorHandleRaw {
|
|
|
577
614
|
*
|
|
578
615
|
* @protected
|
|
579
616
|
*/
|
|
580
|
-
constructor(client: any, driver: EngineControlClient, params: unknown, getParams: (() => Promise<unknown>) | undefined, encoding: Encoding, actorResolutionState: ActorResolutionState);
|
|
617
|
+
constructor(client: any, driver: EngineControlClient, params: unknown, getParams: (() => Promise<unknown>) | undefined, encoding: Encoding, actorResolutionState: ActorResolutionState, gatewayOptions?: ActorGatewayOptions);
|
|
581
618
|
send(name: string, body: unknown, options: QueueSendWaitOptions): Promise<QueueSendResult>;
|
|
582
619
|
send(name: string, body: unknown, options?: QueueSendNoWaitOptions): Promise<void>;
|
|
583
620
|
/**
|
|
@@ -590,24 +627,23 @@ declare class ActorHandleRaw {
|
|
|
590
627
|
action<Args extends Array<unknown> = unknown[], Response = unknown>(opts: {
|
|
591
628
|
name: string;
|
|
592
629
|
args: Args;
|
|
593
|
-
|
|
594
|
-
}): Promise<Response>;
|
|
630
|
+
} & ActorActionOptions): Promise<Response>;
|
|
595
631
|
/**
|
|
596
632
|
* Establishes a persistent connection to the actor.
|
|
597
633
|
*
|
|
598
634
|
* @template AD The actor class that this connection is for.
|
|
599
635
|
* @returns {ActorConn<AD>} A connection to the actor.
|
|
600
636
|
*/
|
|
601
|
-
connect(params?: unknown): ActorConn<AnyActorDefinition>;
|
|
637
|
+
connect(params?: unknown, options?: ActorConnectOptions): ActorConn<AnyActorDefinition>;
|
|
602
638
|
/**
|
|
603
639
|
* Fetches a resource from this actor via the /request endpoint. This is a
|
|
604
640
|
* convenience wrapper around the raw HTTP API.
|
|
605
641
|
*/
|
|
606
|
-
fetch(input: string | URL | Request, init?:
|
|
642
|
+
fetch(input: string | URL | Request, init?: ActorFetchInit): Promise<Response>;
|
|
607
643
|
/**
|
|
608
644
|
* Opens a raw WebSocket connection to this actor.
|
|
609
645
|
*/
|
|
610
|
-
webSocket(path?: string, protocols?: string | string[]): Promise<any>;
|
|
646
|
+
webSocket(path?: string, protocols?: string | string[], options?: ActorWebSocketOptions): Promise<any>;
|
|
611
647
|
/**
|
|
612
648
|
* Resolves the actor to get its unique actor ID.
|
|
613
649
|
*/
|
|
@@ -635,7 +671,7 @@ declare class ActorHandleRaw {
|
|
|
635
671
|
* @see {@link ActorHandleRaw}
|
|
636
672
|
*/
|
|
637
673
|
type ActorHandle<AD extends AnyActorDefinition> = Omit<ActorHandleRaw, "connect" | "send"> & {
|
|
638
|
-
connect(params?: unknown): ActorConn<AD>;
|
|
674
|
+
connect(params?: unknown, options?: ActorConnectOptions): ActorConn<AD>;
|
|
639
675
|
resolve(): Promise<string>;
|
|
640
676
|
} & ActorDefinitionQueueSend<AD> & ActorDefinitionActions<AD>;
|
|
641
677
|
|
|
@@ -650,6 +686,9 @@ declare const ClientConfigSchema: z$1.ZodPipe<z$1.ZodObject<{
|
|
|
650
686
|
bare: "bare";
|
|
651
687
|
}>>;
|
|
652
688
|
headers: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>>;
|
|
689
|
+
gateway: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodObject<{
|
|
690
|
+
bypassConnectable: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodBoolean>>;
|
|
691
|
+
}, z$1.core.$strip>>>;
|
|
653
692
|
getUpgradeWebSocket: z$1.ZodOptional<z$1.ZodCustom<GetUpgradeWebSocket, GetUpgradeWebSocket>>;
|
|
654
693
|
disableMetadataLookup: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodBoolean>>;
|
|
655
694
|
maxInputSize: z$1.ZodDefault<z$1.ZodNumber>;
|
|
@@ -661,6 +700,9 @@ declare const ClientConfigSchema: z$1.ZodPipe<z$1.ZodObject<{
|
|
|
661
700
|
poolName: string;
|
|
662
701
|
encoding: "json" | "cbor" | "bare";
|
|
663
702
|
headers: Record<string, string>;
|
|
703
|
+
gateway: {
|
|
704
|
+
bypassConnectable: boolean;
|
|
705
|
+
};
|
|
664
706
|
disableMetadataLookup: boolean;
|
|
665
707
|
maxInputSize: number;
|
|
666
708
|
devtools: boolean;
|
|
@@ -672,6 +714,9 @@ declare const ClientConfigSchema: z$1.ZodPipe<z$1.ZodObject<{
|
|
|
672
714
|
poolName: string;
|
|
673
715
|
encoding: "json" | "cbor" | "bare";
|
|
674
716
|
headers: Record<string, string>;
|
|
717
|
+
gateway: {
|
|
718
|
+
bypassConnectable: boolean;
|
|
719
|
+
};
|
|
675
720
|
disableMetadataLookup: boolean;
|
|
676
721
|
maxInputSize: number;
|
|
677
722
|
devtools: boolean;
|
|
@@ -821,7 +866,7 @@ declare class ClientRaw {
|
|
|
821
866
|
/**
|
|
822
867
|
* Creates an instance of Client.
|
|
823
868
|
*/
|
|
824
|
-
constructor(driver: EngineControlClient, encoding: Encoding | undefined);
|
|
869
|
+
constructor(driver: EngineControlClient, encoding: Encoding | undefined, gatewayOptions?: ActorGatewayOptions);
|
|
825
870
|
/**
|
|
826
871
|
* Gets a stateless handle to a actor by its ID.
|
|
827
872
|
*
|
|
@@ -1342,10 +1387,40 @@ type RegistryActors = z$2.infer<typeof ActorsSchema>;
|
|
|
1342
1387
|
declare const RegistryConfigSchema: z$2.ZodPipe<z$2.ZodObject<{
|
|
1343
1388
|
use: z$2.ZodRecord<z$2.ZodString, z$2.ZodCustom<AnyActorDefinition, AnyActorDefinition>>;
|
|
1344
1389
|
test: z$2.ZodDefault<z$2.ZodOptional<z$2.ZodObject<{
|
|
1345
|
-
enabled: z$2.ZodBoolean
|
|
1390
|
+
enabled: z$2.ZodDefault<z$2.ZodOptional<z$2.ZodBoolean>>;
|
|
1391
|
+
sqliteBackend: z$2.ZodOptional<z$2.ZodEnum<{
|
|
1392
|
+
local: "local";
|
|
1393
|
+
remote: "remote";
|
|
1394
|
+
}>>;
|
|
1346
1395
|
}, z$2.core.$strip>>>;
|
|
1347
1396
|
maxIncomingMessageSize: z$2.ZodDefault<z$2.ZodOptional<z$2.ZodNumber>>;
|
|
1348
1397
|
maxOutgoingMessageSize: z$2.ZodDefault<z$2.ZodOptional<z$2.ZodNumber>>;
|
|
1398
|
+
runtime: z$2.ZodPipe<z$2.ZodOptional<z$2.ZodEnum<{
|
|
1399
|
+
auto: "auto";
|
|
1400
|
+
native: "native";
|
|
1401
|
+
wasm: "wasm";
|
|
1402
|
+
}>>, z$2.ZodTransform<"auto" | "native" | "wasm", "auto" | "native" | "wasm" | undefined>>;
|
|
1403
|
+
wasm: z$2.ZodDefault<z$2.ZodOptional<z$2.ZodObject<{
|
|
1404
|
+
bindings: z$2.ZodOptional<z$2.ZodCustom<typeof _rivetkit_rivetkit_wasm, typeof _rivetkit_rivetkit_wasm>>;
|
|
1405
|
+
initInput: z$2.ZodOptional<z$2.ZodCustom<{
|
|
1406
|
+
module_or_path: _rivetkit_rivetkit_wasm.InitInput | Promise<_rivetkit_rivetkit_wasm.InitInput>;
|
|
1407
|
+
} | _rivetkit_rivetkit_wasm.InitInput | Promise<_rivetkit_rivetkit_wasm.InitInput> | undefined, {
|
|
1408
|
+
module_or_path: _rivetkit_rivetkit_wasm.InitInput | Promise<_rivetkit_rivetkit_wasm.InitInput>;
|
|
1409
|
+
} | _rivetkit_rivetkit_wasm.InitInput | Promise<_rivetkit_rivetkit_wasm.InitInput> | undefined>>;
|
|
1410
|
+
}, z$2.core.$strip>>>;
|
|
1411
|
+
sqlite: z$2.ZodPipe<z$2.ZodOptional<z$2.ZodUnion<readonly [z$2.ZodEnum<{
|
|
1412
|
+
local: "local";
|
|
1413
|
+
remote: "remote";
|
|
1414
|
+
}>, z$2.ZodObject<{
|
|
1415
|
+
backend: z$2.ZodEnum<{
|
|
1416
|
+
local: "local";
|
|
1417
|
+
remote: "remote";
|
|
1418
|
+
}>;
|
|
1419
|
+
}, z$2.core.$strip>]>>, z$2.ZodTransform<{
|
|
1420
|
+
backend: "local" | "remote";
|
|
1421
|
+
} | undefined, "local" | "remote" | {
|
|
1422
|
+
backend: "local" | "remote";
|
|
1423
|
+
} | undefined>>;
|
|
1349
1424
|
noWelcome: z$2.ZodDefault<z$2.ZodOptional<z$2.ZodBoolean>>;
|
|
1350
1425
|
logging: z$2.ZodDefault<z$2.ZodOptional<z$2.ZodObject<{
|
|
1351
1426
|
baseLogger: z$2.ZodOptional<z$2.ZodCustom<Logger, Logger>>;
|
|
@@ -1374,6 +1449,7 @@ declare const RegistryConfigSchema: z$2.ZodPipe<z$2.ZodObject<{
|
|
|
1374
1449
|
url: z$2.ZodString;
|
|
1375
1450
|
headers: z$2.ZodOptional<z$2.ZodRecord<z$2.ZodString, z$2.ZodString>>;
|
|
1376
1451
|
requestLifespan: z$2.ZodOptional<z$2.ZodNumber>;
|
|
1452
|
+
drainGracePeriod: z$2.ZodOptional<z$2.ZodNumber>;
|
|
1377
1453
|
metadata: z$2.ZodOptional<z$2.ZodRecord<z$2.ZodString, z$2.ZodUnknown>>;
|
|
1378
1454
|
metadataPollInterval: z$2.ZodOptional<z$2.ZodNumber>;
|
|
1379
1455
|
drainOnVersionUpgrade: z$2.ZodOptional<z$2.ZodBoolean>;
|
|
@@ -1395,6 +1471,9 @@ declare const RegistryConfigSchema: z$2.ZodPipe<z$2.ZodObject<{
|
|
|
1395
1471
|
disableSignalHandlers: z$2.ZodDefault<z$2.ZodOptional<z$2.ZodBoolean>>;
|
|
1396
1472
|
}, z$2.core.$strip>>>;
|
|
1397
1473
|
}, z$2.core.$strip>, z$2.ZodTransform<{
|
|
1474
|
+
sqlite: {
|
|
1475
|
+
backend: "local" | "remote";
|
|
1476
|
+
} | undefined;
|
|
1398
1477
|
endpoint: string | undefined;
|
|
1399
1478
|
namespace: string;
|
|
1400
1479
|
token: string | undefined;
|
|
@@ -1411,9 +1490,17 @@ declare const RegistryConfigSchema: z$2.ZodPipe<z$2.ZodObject<{
|
|
|
1411
1490
|
use: Record<string, AnyActorDefinition>;
|
|
1412
1491
|
test: {
|
|
1413
1492
|
enabled: boolean;
|
|
1493
|
+
sqliteBackend?: "local" | "remote" | undefined;
|
|
1414
1494
|
};
|
|
1415
1495
|
maxIncomingMessageSize: number;
|
|
1416
1496
|
maxOutgoingMessageSize: number;
|
|
1497
|
+
runtime: "auto" | "native" | "wasm";
|
|
1498
|
+
wasm: {
|
|
1499
|
+
bindings?: typeof _rivetkit_rivetkit_wasm | undefined;
|
|
1500
|
+
initInput?: {
|
|
1501
|
+
module_or_path: _rivetkit_rivetkit_wasm.InitInput | Promise<_rivetkit_rivetkit_wasm.InitInput>;
|
|
1502
|
+
} | _rivetkit_rivetkit_wasm.InitInput | Promise<_rivetkit_rivetkit_wasm.InitInput> | undefined;
|
|
1503
|
+
};
|
|
1417
1504
|
noWelcome: boolean;
|
|
1418
1505
|
logging: {
|
|
1419
1506
|
baseLogger?: Logger | undefined;
|
|
@@ -1441,6 +1528,7 @@ declare const RegistryConfigSchema: z$2.ZodPipe<z$2.ZodObject<{
|
|
|
1441
1528
|
name?: string | undefined;
|
|
1442
1529
|
headers?: Record<string, string> | undefined;
|
|
1443
1530
|
requestLifespan?: number | undefined;
|
|
1531
|
+
drainGracePeriod?: number | undefined;
|
|
1444
1532
|
metadata?: Record<string, unknown> | undefined;
|
|
1445
1533
|
metadataPollInterval?: number | undefined;
|
|
1446
1534
|
drainOnVersionUpgrade?: boolean | undefined;
|
|
@@ -1449,9 +1537,20 @@ declare const RegistryConfigSchema: z$2.ZodPipe<z$2.ZodObject<{
|
|
|
1449
1537
|
use: Record<string, AnyActorDefinition>;
|
|
1450
1538
|
test: {
|
|
1451
1539
|
enabled: boolean;
|
|
1540
|
+
sqliteBackend?: "local" | "remote" | undefined;
|
|
1452
1541
|
};
|
|
1453
1542
|
maxIncomingMessageSize: number;
|
|
1454
1543
|
maxOutgoingMessageSize: number;
|
|
1544
|
+
runtime: "auto" | "native" | "wasm";
|
|
1545
|
+
wasm: {
|
|
1546
|
+
bindings?: typeof _rivetkit_rivetkit_wasm | undefined;
|
|
1547
|
+
initInput?: {
|
|
1548
|
+
module_or_path: _rivetkit_rivetkit_wasm.InitInput | Promise<_rivetkit_rivetkit_wasm.InitInput>;
|
|
1549
|
+
} | _rivetkit_rivetkit_wasm.InitInput | Promise<_rivetkit_rivetkit_wasm.InitInput> | undefined;
|
|
1550
|
+
};
|
|
1551
|
+
sqlite: {
|
|
1552
|
+
backend: "local" | "remote";
|
|
1553
|
+
} | undefined;
|
|
1455
1554
|
noWelcome: boolean;
|
|
1456
1555
|
logging: {
|
|
1457
1556
|
baseLogger?: Logger | undefined;
|
|
@@ -1488,6 +1587,7 @@ declare const RegistryConfigSchema: z$2.ZodPipe<z$2.ZodObject<{
|
|
|
1488
1587
|
name?: string | undefined;
|
|
1489
1588
|
headers?: Record<string, string> | undefined;
|
|
1490
1589
|
requestLifespan?: number | undefined;
|
|
1590
|
+
drainGracePeriod?: number | undefined;
|
|
1491
1591
|
metadata?: Record<string, unknown> | undefined;
|
|
1492
1592
|
metadataPollInterval?: number | undefined;
|
|
1493
1593
|
drainOnVersionUpgrade?: boolean | undefined;
|
|
@@ -1502,6 +1602,10 @@ type FetchHandler = (request: Request, ...args: any) => Response | Promise<Respo
|
|
|
1502
1602
|
interface ServerlessHandler {
|
|
1503
1603
|
fetch: FetchHandler;
|
|
1504
1604
|
}
|
|
1605
|
+
interface RegistryDiagnostics {
|
|
1606
|
+
mode: string;
|
|
1607
|
+
envoyActiveActorCount?: number | null;
|
|
1608
|
+
}
|
|
1505
1609
|
declare class Registry<A extends RegistryActors> {
|
|
1506
1610
|
#private;
|
|
1507
1611
|
get config(): RegistryConfigInput<A>;
|
|
@@ -1527,9 +1631,10 @@ declare class Registry<A extends RegistryActors> {
|
|
|
1527
1631
|
* ```
|
|
1528
1632
|
*/
|
|
1529
1633
|
serve(): ServerlessHandler;
|
|
1634
|
+
diagnostics(): Promise<RegistryDiagnostics>;
|
|
1530
1635
|
startEnvoy(): void;
|
|
1531
1636
|
/**
|
|
1532
|
-
* Starts the
|
|
1637
|
+
* Starts the actor envoy for standalone server deployments.
|
|
1533
1638
|
*
|
|
1534
1639
|
* @example
|
|
1535
1640
|
* ```ts
|
|
@@ -1545,4 +1650,4 @@ declare class Registry<A extends RegistryActors> {
|
|
|
1545
1650
|
*/
|
|
1546
1651
|
declare function createClient<A extends Registry<any>>(endpointOrConfig?: string | ClientConfigInput): Client<A>;
|
|
1547
1652
|
|
|
1548
|
-
export { type ActorAccessor, type ActorActionFunction, ActorClientError, type ActorConn, ActorConnDisposed, ActorConnRaw, type ActorConnStatus, ActorDefinition, RivetError as ActorError, type ActorHandle, ActorHandleRaw, type AnyActorDefinition, type Client, type ClientConfigInput, ClientRaw, type ConnectionStateCallback, type CreateOptions, type CreateRequest, type Encoding, type EventUnsubscribe, type ExtractActorsFromRegistry, type ExtractRegistryFromClient, type GetOptions, type GetWithIdOptions, MalformedResponseMessage, ManagerError, type QueryOptions, type Region, RivetError, type StatusChangeCallback, UserError, createClient };
|
|
1653
|
+
export { type ActorAccessor, type ActorActionFunction, type ActorActionOptions, ActorClientError, type ActorConn, ActorConnDisposed, ActorConnRaw, type ActorConnStatus, type ActorConnectOptions, ActorDefinition, RivetError as ActorError, type ActorGatewayOptions, type ActorHandle, ActorHandleRaw, type AnyActorDefinition, type Client, type ClientConfigInput, ClientRaw, type ConnectionStateCallback, type CreateOptions, type CreateRequest, type Encoding, type EventUnsubscribe, type ExtractActorsFromRegistry, type ExtractRegistryFromClient, type GetOptions, type GetWithIdOptions, MalformedResponseMessage, ManagerError, type QueryOptions, type Region, RivetError, type StatusChangeCallback, UserError, createClient };
|