rivetkit 2.0.38 → 2.0.39
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/tsup/{chunk-6WLJW57U.cjs → chunk-7E3RWMR6.cjs} +161 -115
- package/dist/tsup/chunk-7E3RWMR6.cjs.map +1 -0
- package/dist/tsup/{chunk-FA6FGAEC.js → chunk-BQ36VTSB.js} +74 -28
- package/dist/tsup/chunk-BQ36VTSB.js.map +1 -0
- package/dist/tsup/{chunk-GFKZZG2A.cjs → chunk-C64FV764.cjs} +3 -3
- package/dist/tsup/{chunk-GFKZZG2A.cjs.map → chunk-C64FV764.cjs.map} +1 -1
- package/dist/tsup/{chunk-4U45T5KW.js → chunk-CDK6DRO2.js} +2 -2
- package/dist/tsup/{chunk-4U45T5KW.js.map → chunk-CDK6DRO2.js.map} +1 -1
- package/dist/tsup/{chunk-IRTVRBJA.cjs → chunk-DY4H3ASE.cjs} +50 -46
- package/dist/tsup/chunk-DY4H3ASE.cjs.map +1 -0
- package/dist/tsup/{chunk-IWXMFQDT.cjs → chunk-KMYFL3OL.cjs} +264 -77
- package/dist/tsup/chunk-KMYFL3OL.cjs.map +1 -0
- package/dist/tsup/{chunk-FZQHTGQX.cjs → chunk-MZPYVTVG.cjs} +9 -9
- package/dist/tsup/{chunk-FZQHTGQX.cjs.map → chunk-MZPYVTVG.cjs.map} +1 -1
- package/dist/tsup/{chunk-K2RNF2ZR.js → chunk-OJZRCEIA.js} +5 -5
- package/dist/tsup/{chunk-WIZ4JGP6.js → chunk-PHCD25XO.js} +2 -2
- package/dist/tsup/{chunk-MIOU6BF3.js → chunk-PVKUXMOA.js} +209 -22
- package/dist/tsup/chunk-PVKUXMOA.js.map +1 -0
- package/dist/tsup/{chunk-UUEZVDRL.js → chunk-T7IPDBWH.js} +8 -4
- package/dist/tsup/{chunk-UUEZVDRL.js.map → chunk-T7IPDBWH.js.map} +1 -1
- package/dist/tsup/{chunk-LULP6HM2.cjs → chunk-UAX5E3EU.cjs} +311 -288
- package/dist/tsup/chunk-UAX5E3EU.cjs.map +1 -0
- package/dist/tsup/{chunk-O433HWWG.cjs → chunk-X72X7I7T.cjs} +2 -2
- package/dist/tsup/{chunk-O433HWWG.cjs.map → chunk-X72X7I7T.cjs.map} +1 -1
- package/dist/tsup/{chunk-EEL32AJM.js → chunk-XU74APB4.js} +72 -49
- package/dist/tsup/chunk-XU74APB4.js.map +1 -0
- package/dist/tsup/client/mod.cjs +5 -5
- package/dist/tsup/client/mod.d.cts +3 -3
- package/dist/tsup/client/mod.d.ts +3 -3
- package/dist/tsup/client/mod.js +4 -4
- package/dist/tsup/common/log.cjs +2 -2
- package/dist/tsup/common/log.js +1 -1
- package/dist/tsup/common/websocket.cjs +3 -3
- package/dist/tsup/common/websocket.js +2 -2
- package/dist/tsup/{config-CwJCQyP1.d.cts → config-BuBlMs6C.d.cts} +72 -5
- package/dist/tsup/{config-CbIHPGKl.d.ts → config-CBwo4ooA.d.ts} +72 -5
- package/dist/tsup/{driver-Lw_oORox.d.cts → driver-CPXmh8f8.d.cts} +1 -1
- package/dist/tsup/{driver-CMN823Lc.d.ts → driver-DxWa6HUO.d.ts} +1 -1
- package/dist/tsup/driver-helpers/mod.cjs +3 -3
- package/dist/tsup/driver-helpers/mod.d.cts +2 -2
- package/dist/tsup/driver-helpers/mod.d.ts +2 -2
- package/dist/tsup/driver-helpers/mod.js +2 -2
- package/dist/tsup/driver-test-suite/mod.cjs +81 -35
- package/dist/tsup/driver-test-suite/mod.cjs.map +1 -1
- package/dist/tsup/driver-test-suite/mod.d.cts +2 -2
- package/dist/tsup/driver-test-suite/mod.d.ts +2 -2
- package/dist/tsup/driver-test-suite/mod.js +407 -361
- package/dist/tsup/driver-test-suite/mod.js.map +1 -1
- package/dist/tsup/{kv-CTM8sCvx.d.cts → keys-Chhy4ylv.d.cts} +1 -0
- package/dist/tsup/{kv-CTM8sCvx.d.ts → keys-Chhy4ylv.d.ts} +1 -0
- package/dist/tsup/mod.cjs +9 -7
- package/dist/tsup/mod.cjs.map +1 -1
- package/dist/tsup/mod.d.cts +5 -5
- package/dist/tsup/mod.d.ts +5 -5
- package/dist/tsup/mod.js +8 -6
- package/dist/tsup/test/mod.cjs +7 -7
- package/dist/tsup/test/mod.d.cts +1 -1
- package/dist/tsup/test/mod.d.ts +1 -1
- package/dist/tsup/test/mod.js +6 -6
- package/dist/tsup/utils.cjs +2 -2
- package/dist/tsup/utils.js +1 -1
- package/package.json +2 -2
- package/src/actor/config.ts +183 -34
- package/src/actor/contexts/base/actor.ts +12 -0
- package/src/actor/instance/connection-manager.ts +1 -1
- package/src/actor/instance/keys.ts +29 -0
- package/src/actor/instance/kv.ts +240 -14
- package/src/actor/instance/mod.ts +5 -4
- package/src/actor/instance/state-manager.ts +1 -1
- package/src/actor/mod.ts +2 -1
- package/src/actor/router-websocket-endpoints.ts +2 -1
- package/src/client/actor-handle.ts +13 -3
- package/src/client/mod.ts +1 -1
- package/src/driver-helpers/utils.ts +1 -1
- package/src/driver-test-suite/mod.ts +3 -0
- package/src/driver-test-suite/test-inline-client-driver.ts +3 -0
- package/src/driver-test-suite/tests/actor-kv.ts +44 -0
- package/src/driver-test-suite/utils.ts +4 -0
- package/src/drivers/engine/actor-driver.ts +3 -3
- package/src/drivers/file-system/manager.ts +5 -0
- package/src/manager/driver.ts +7 -0
- package/src/remote-manager-driver/actor-http-client.ts +5 -3
- package/src/remote-manager-driver/actor-websocket-client.ts +18 -7
- package/src/remote-manager-driver/mod.ts +10 -0
- package/dist/tsup/chunk-6WLJW57U.cjs.map +0 -1
- package/dist/tsup/chunk-EEL32AJM.js.map +0 -1
- package/dist/tsup/chunk-FA6FGAEC.js.map +0 -1
- package/dist/tsup/chunk-IRTVRBJA.cjs.map +0 -1
- package/dist/tsup/chunk-IWXMFQDT.cjs.map +0 -1
- package/dist/tsup/chunk-LULP6HM2.cjs.map +0 -1
- package/dist/tsup/chunk-MIOU6BF3.js.map +0 -1
- /package/dist/tsup/{chunk-K2RNF2ZR.js.map → chunk-OJZRCEIA.js.map} +0 -0
- /package/dist/tsup/{chunk-WIZ4JGP6.js.map → chunk-PHCD25XO.js.map} +0 -0
package/dist/tsup/client/mod.cjs
CHANGED
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
13
|
-
require('../chunk-
|
|
12
|
+
var _chunkUAX5E3EUcjs = require('../chunk-UAX5E3EU.cjs');
|
|
13
|
+
require('../chunk-C64FV764.cjs');
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _chunkKMYFL3OLcjs = require('../chunk-KMYFL3OL.cjs');
|
|
17
17
|
require('../chunk-KDFWJKMJ.cjs');
|
|
18
|
-
require('../chunk-
|
|
18
|
+
require('../chunk-X72X7I7T.cjs');
|
|
19
19
|
require('../chunk-SNAUKDDK.cjs');
|
|
20
20
|
require('../chunk-GBENOENJ.cjs');
|
|
21
21
|
|
|
@@ -30,5 +30,5 @@ require('../chunk-GBENOENJ.cjs');
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
exports.ActorClientError =
|
|
33
|
+
exports.ActorClientError = _chunkUAX5E3EUcjs.ActorClientError; exports.ActorConnDisposed = _chunkUAX5E3EUcjs.ActorConnDisposed; exports.ActorConnRaw = _chunkUAX5E3EUcjs.ActorConnRaw; exports.ActorDefinition = _chunkUAX5E3EUcjs.ActorDefinition; exports.ActorError = _chunkUAX5E3EUcjs.ActorError; exports.ActorHandleRaw = _chunkUAX5E3EUcjs.ActorHandleRaw; exports.InternalError = _chunkUAX5E3EUcjs.InternalError; exports.KV_KEYS = _chunkKMYFL3OLcjs.KEYS; exports.MalformedResponseMessage = _chunkUAX5E3EUcjs.MalformedResponseMessage; exports.ManagerError = _chunkUAX5E3EUcjs.ManagerError; exports.createClient = _chunkUAX5E3EUcjs.createClient;
|
|
34
34
|
//# sourceMappingURL=mod.cjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
export { K as KV_KEYS } from '../
|
|
1
|
+
import { aa as Registry, C as Client } from '../config-BuBlMs6C.cjs';
|
|
2
|
+
export { aC as ActorAccessor, at as ActorActionFunction, am as ActorClientError, au as ActorConn, an as ActorConnDisposed, az as ActorConnRaw, av as ActorConnStatus, f as ActorDefinition, ao as ActorError, aA as ActorHandle, aB as ActorHandleRaw, l as AnyActorDefinition, aD as ClientRaw, aw as ConnectionStateCallback, aE as CreateOptions, as as CreateRequest, E as Encoding, ax as EventUnsubscribe, aF as ExtractActorsFromRegistry, aG as ExtractRegistryFromClient, aH as GetOptions, aI as GetWithIdOptions, ap as InternalError, aq as MalformedResponseMessage, ar as ManagerError, aJ as QueryOptions, aK as Region, ay as StatusChangeCallback } from '../config-BuBlMs6C.cjs';
|
|
3
|
+
export { K as KV_KEYS } from '../keys-Chhy4ylv.cjs';
|
|
4
4
|
import z from 'zod';
|
|
5
5
|
import { GetUpgradeWebSocket } from '../utils.cjs';
|
|
6
6
|
import '@rivetkit/virtual-websocket';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
export { K as KV_KEYS } from '../
|
|
1
|
+
import { aa as Registry, C as Client } from '../config-CBwo4ooA.js';
|
|
2
|
+
export { aC as ActorAccessor, at as ActorActionFunction, am as ActorClientError, au as ActorConn, an as ActorConnDisposed, az as ActorConnRaw, av as ActorConnStatus, f as ActorDefinition, ao as ActorError, aA as ActorHandle, aB as ActorHandleRaw, l as AnyActorDefinition, aD as ClientRaw, aw as ConnectionStateCallback, aE as CreateOptions, as as CreateRequest, E as Encoding, ax as EventUnsubscribe, aF as ExtractActorsFromRegistry, aG as ExtractRegistryFromClient, aH as GetOptions, aI as GetWithIdOptions, ap as InternalError, aq as MalformedResponseMessage, ar as ManagerError, aJ as QueryOptions, aK as Region, ay as StatusChangeCallback } from '../config-CBwo4ooA.js';
|
|
3
|
+
export { K as KV_KEYS } from '../keys-Chhy4ylv.js';
|
|
4
4
|
import z from 'zod';
|
|
5
5
|
import { GetUpgradeWebSocket } from '../utils.js';
|
|
6
6
|
import '@rivetkit/virtual-websocket';
|
package/dist/tsup/client/mod.js
CHANGED
|
@@ -9,13 +9,13 @@ import {
|
|
|
9
9
|
MalformedResponseMessage,
|
|
10
10
|
ManagerError,
|
|
11
11
|
createClient
|
|
12
|
-
} from "../chunk-
|
|
13
|
-
import "../chunk-
|
|
12
|
+
} from "../chunk-XU74APB4.js";
|
|
13
|
+
import "../chunk-PHCD25XO.js";
|
|
14
14
|
import {
|
|
15
15
|
KEYS
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-PVKUXMOA.js";
|
|
17
17
|
import "../chunk-E6ZE2YEA.js";
|
|
18
|
-
import "../chunk-
|
|
18
|
+
import "../chunk-CDK6DRO2.js";
|
|
19
19
|
import "../chunk-2YHR67M4.js";
|
|
20
20
|
export {
|
|
21
21
|
ActorClientError,
|
package/dist/tsup/common/log.cjs
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkX72X7I7Tcjs = require('../chunk-X72X7I7T.cjs');
|
|
10
10
|
require('../chunk-SNAUKDDK.cjs');
|
|
11
11
|
require('../chunk-GBENOENJ.cjs');
|
|
12
12
|
|
|
@@ -17,5 +17,5 @@ require('../chunk-GBENOENJ.cjs');
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
exports.LogLevelSchema =
|
|
20
|
+
exports.LogLevelSchema = _chunkX72X7I7Tcjs.LogLevelSchema; exports.configureBaseLogger = _chunkX72X7I7Tcjs.configureBaseLogger; exports.configureDefaultLogger = _chunkX72X7I7Tcjs.configureDefaultLogger; exports.getBaseLogger = _chunkX72X7I7Tcjs.getBaseLogger; exports.getIncludeTarget = _chunkX72X7I7Tcjs.getIncludeTarget; exports.getLogger = _chunkX72X7I7Tcjs.getLogger; exports.getPinoLevel = _chunkX72X7I7Tcjs.getPinoLevel;
|
|
21
21
|
//# sourceMappingURL=log.cjs.map
|
package/dist/tsup/common/log.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var _chunkC64FV764cjs = require('../chunk-C64FV764.cjs');
|
|
4
|
+
require('../chunk-X72X7I7T.cjs');
|
|
5
5
|
require('../chunk-SNAUKDDK.cjs');
|
|
6
6
|
require('../chunk-GBENOENJ.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
exports.importWebSocket =
|
|
9
|
+
exports.importWebSocket = _chunkC64FV764cjs.importWebSocket;
|
|
10
10
|
//# sourceMappingURL=websocket.cjs.map
|
|
@@ -39,6 +39,12 @@ interface ManagerDriver {
|
|
|
39
39
|
openWebSocket(path: string, actorId: string, encoding: Encoding, params: unknown): Promise<UniversalWebSocket>;
|
|
40
40
|
proxyRequest(c: Context, actorRequest: Request, actorId: string): Promise<Response>;
|
|
41
41
|
proxyWebSocket(c: Context, path: string, actorId: string, encoding: Encoding, params: unknown): Promise<Response>;
|
|
42
|
+
/**
|
|
43
|
+
* Build a public gateway URL for a specific actor.
|
|
44
|
+
*
|
|
45
|
+
* This lives on the driver because the base endpoint varies by runtime.
|
|
46
|
+
*/
|
|
47
|
+
buildGatewayUrl(actorId: string): Promise<string>;
|
|
42
48
|
displayInformation(): ManagerDisplayInformation;
|
|
43
49
|
extraStartupLog?: () => Record<string, unknown>;
|
|
44
50
|
modifyManagerRouter?: (config: RegistryConfig, router: Hono) => void;
|
|
@@ -962,13 +968,15 @@ declare class ActorHandleRaw {
|
|
|
962
968
|
*/
|
|
963
969
|
websocket(path?: string, protocols?: string | string[]): Promise<WebSocket>;
|
|
964
970
|
/**
|
|
965
|
-
* Resolves the actor to get its unique actor ID
|
|
966
|
-
*
|
|
967
|
-
* @returns {Promise<string>} - A promise that resolves to the actor's ID
|
|
971
|
+
* Resolves the actor to get its unique actor ID.
|
|
968
972
|
*/
|
|
969
973
|
resolve({ signal }?: {
|
|
970
974
|
signal?: AbortSignal;
|
|
971
975
|
}): Promise<string>;
|
|
976
|
+
/**
|
|
977
|
+
* Returns the raw URL for routing traffic to the actor.
|
|
978
|
+
*/
|
|
979
|
+
getGatewayUrl(): Promise<string>;
|
|
972
980
|
}
|
|
973
981
|
/**
|
|
974
982
|
* Stateless handle to a actor. Allows calling actor's remote procedure calls with inferred types
|
|
@@ -1232,6 +1240,61 @@ declare class ActorInspector {
|
|
|
1232
1240
|
executeAction(name: string, params: ArrayBuffer): Promise<ArrayBuffer>;
|
|
1233
1241
|
}
|
|
1234
1242
|
|
|
1243
|
+
/**
|
|
1244
|
+
* User-facing KV storage interface exposed on ActorContext.
|
|
1245
|
+
*/
|
|
1246
|
+
type KvValueType = "text" | "arrayBuffer" | "binary";
|
|
1247
|
+
type KvKeyType = "text" | "binary";
|
|
1248
|
+
type KvKey = Uint8Array | string;
|
|
1249
|
+
type KvValueTypeMap = {
|
|
1250
|
+
text: string;
|
|
1251
|
+
arrayBuffer: ArrayBuffer;
|
|
1252
|
+
binary: Uint8Array;
|
|
1253
|
+
};
|
|
1254
|
+
type KvKeyTypeMap = {
|
|
1255
|
+
text: string;
|
|
1256
|
+
binary: Uint8Array;
|
|
1257
|
+
};
|
|
1258
|
+
type KvValueOptions<T extends KvValueType = "text"> = {
|
|
1259
|
+
type?: T;
|
|
1260
|
+
};
|
|
1261
|
+
type KvListOptions<T extends KvValueType = "text", K extends KvKeyType = "text"> = KvValueOptions<T> & {
|
|
1262
|
+
keyType?: K;
|
|
1263
|
+
};
|
|
1264
|
+
declare class ActorKv {
|
|
1265
|
+
#private;
|
|
1266
|
+
constructor(driver: ActorDriver, actorId: string);
|
|
1267
|
+
/**
|
|
1268
|
+
* Get a single value by key.
|
|
1269
|
+
*/
|
|
1270
|
+
get<T extends KvValueType = "text">(key: KvKey, options?: KvValueOptions<T>): Promise<KvValueTypeMap[T] | null>;
|
|
1271
|
+
/**
|
|
1272
|
+
* Get multiple values by keys.
|
|
1273
|
+
*/
|
|
1274
|
+
getBatch<T extends KvValueType = "text">(keys: KvKey[], options?: KvValueOptions<T>): Promise<(KvValueTypeMap[T] | null)[]>;
|
|
1275
|
+
/**
|
|
1276
|
+
* Put a single key-value pair.
|
|
1277
|
+
*/
|
|
1278
|
+
put<T extends KvValueType = KvValueType>(key: KvKey, value: KvValueTypeMap[T], options?: KvValueOptions<T>): Promise<void>;
|
|
1279
|
+
/**
|
|
1280
|
+
* Put multiple key-value pairs.
|
|
1281
|
+
*/
|
|
1282
|
+
putBatch<T extends KvValueType = KvValueType>(entries: [KvKey, KvValueTypeMap[T]][], options?: KvValueOptions<T>): Promise<void>;
|
|
1283
|
+
/**
|
|
1284
|
+
* Delete a single key.
|
|
1285
|
+
*/
|
|
1286
|
+
delete(key: KvKey): Promise<void>;
|
|
1287
|
+
/**
|
|
1288
|
+
* Delete multiple keys.
|
|
1289
|
+
*/
|
|
1290
|
+
deleteBatch(keys: KvKey[]): Promise<void>;
|
|
1291
|
+
/**
|
|
1292
|
+
* List all keys with a given prefix.
|
|
1293
|
+
* Returns key-value pairs where keys have the user prefix removed.
|
|
1294
|
+
*/
|
|
1295
|
+
list<T extends KvValueType = "text", K extends KvKeyType = "text">(prefix: KvKeyTypeMap[K], options?: KvListOptions<T, K>): Promise<[KvKeyTypeMap[K], KvValueTypeMap[T]][]>;
|
|
1296
|
+
}
|
|
1297
|
+
|
|
1235
1298
|
declare class Schedule {
|
|
1236
1299
|
#private;
|
|
1237
1300
|
constructor(actor: AnyActorInstance);
|
|
@@ -1245,6 +1308,10 @@ declare class Schedule {
|
|
|
1245
1308
|
declare class ActorContext<TState, TConnParams, TConnState, TVars, TInput, TDatabase extends AnyDatabaseProvider> {
|
|
1246
1309
|
#private;
|
|
1247
1310
|
constructor(actor: ActorInstance<TState, TConnParams, TConnState, TVars, TInput, TDatabase>);
|
|
1311
|
+
/**
|
|
1312
|
+
* Gets the KV storage interface.
|
|
1313
|
+
*/
|
|
1314
|
+
get kv(): ActorKv;
|
|
1248
1315
|
/**
|
|
1249
1316
|
* Get the actor state
|
|
1250
1317
|
*
|
|
@@ -2101,7 +2168,7 @@ interface BaseActorConfig<TState, TConnParams, TConnState, TVars, TInput, TDatab
|
|
|
2101
2168
|
* @param opts Additional options including the original HTTP upgrade request
|
|
2102
2169
|
*/
|
|
2103
2170
|
onWebSocket?: (c: WebSocketContext<TState, TConnParams, TConnState, TVars, TInput, TDatabase>, websocket: UniversalWebSocket) => void | Promise<void>;
|
|
2104
|
-
actions
|
|
2171
|
+
actions?: TActions;
|
|
2105
2172
|
}
|
|
2106
2173
|
type ActorDatabaseConfig<TDatabase extends AnyDatabaseProvider> = {
|
|
2107
2174
|
/**
|
|
@@ -2166,4 +2233,4 @@ declare const DocActorConfigSchema: z.ZodObject<{
|
|
|
2166
2233
|
}, z.core.$strip>>;
|
|
2167
2234
|
}, z.core.$strip>;
|
|
2168
2235
|
|
|
2169
|
-
export {
|
|
2236
|
+
export { StateChangeContext as $, type ActorDriver as A, ActionContext as B, type Client as C, DocActorOptionsSchema as D, type Encoding as E, type ActionContextOf as F, BeforeActionResponseContext as G, type BeforeActionResponseContextOf as H, BeforeConnectContext as I, type BeforeConnectContextOf as J, ConnectContext as K, type ConnectContextOf as L, CreateContext as M, type CreateContextOf as N, CreateConnStateContext as O, type CreateConnStateContextOf as P, CreateVarsContext as Q, type RegistryConfig as R, type CreateVarsContextOf as S, DestroyContext as T, type DestroyContextOf as U, DisconnectContext as V, type DisconnectContextOf as W, RequestContext as X, type RequestContextOf as Y, SleepContext as Z, type SleepContextOf as _, type AnyConn as a, type StateChangeContextOf as a0, WakeContext as a1, type WakeContextOf as a2, WebSocketContext as a3, type WebSocketContextOf as a4, type RegistryActors as a5, RegistryConfigSchema as a6, type FetchHandler as a7, type ServerlessHandler as a8, type LegacyStartServerOutput as a9, type ActorHandle as aA, ActorHandleRaw as aB, type ActorAccessor as aC, ClientRaw as aD, type CreateOptions as aE, type ExtractActorsFromRegistry as aF, type ExtractRegistryFromClient as aG, type GetOptions as aH, type GetWithIdOptions as aI, type QueryOptions as aJ, type Region as aK, type ManagerDriver as aL, ActorInstance as aM, type ActorOutput as aN, type CreateInput as aO, type GetForIdInput as aP, type GetOrCreateWithKeyInput as aQ, type GetWithKeyInput as aR, type ListActorsInput as aS, type ManagerDisplayInformation as aT, type ManagerDriverBuilder as aU, type ActorDriverBuilder as aV, Registry as aa, setup as ab, ActorsSchema as ac, TestConfigSchema as ad, type TestConfig as ae, type RegistryConfigInput as af, buildActorNames as ag, DocInspectorConfigSchema as ah, DocConfigureRunnerPoolSchema as ai, DocServerlessConfigSchema as aj, DocRunnerConfigSchema as ak, DocRegistryConfigSchema as al, ActorClientError as am, ActorConnDisposed as an, ActorError as ao, InternalError as ap, MalformedResponseMessage as aq, ManagerError as ar, type CreateRequest as as, type ActorActionFunction as at, type ActorConn as au, type ActorConnStatus as av, type ConnectionStateCallback as aw, type EventUnsubscribe as ax, type StatusChangeCallback as ay, ActorConnRaw as az, type AnyActorInstance as b, type AnyDatabaseProvider as c, type Actions as d, type ActorConfigInput as e, ActorDefinition as f, type AnyClient as g, createClientWithDriver as h, type ActorQuery as i, type ActorKey as j, Conn as k, type AnyActorDefinition as l, lookupInRegistry as m, ActorKv as n, type ActorTypes as o, ActorConfigSchema as p, type AuthIntent as q, type ActorConfig as r, DocActorConfigSchema as s, test as t, ActorContext as u, type ActorContextOf as v, ConnContext as w, type ConnContextOf as x, ConnInitContext as y, type ConnInitContextOf as z };
|
|
@@ -39,6 +39,12 @@ interface ManagerDriver {
|
|
|
39
39
|
openWebSocket(path: string, actorId: string, encoding: Encoding, params: unknown): Promise<UniversalWebSocket>;
|
|
40
40
|
proxyRequest(c: Context, actorRequest: Request, actorId: string): Promise<Response>;
|
|
41
41
|
proxyWebSocket(c: Context, path: string, actorId: string, encoding: Encoding, params: unknown): Promise<Response>;
|
|
42
|
+
/**
|
|
43
|
+
* Build a public gateway URL for a specific actor.
|
|
44
|
+
*
|
|
45
|
+
* This lives on the driver because the base endpoint varies by runtime.
|
|
46
|
+
*/
|
|
47
|
+
buildGatewayUrl(actorId: string): Promise<string>;
|
|
42
48
|
displayInformation(): ManagerDisplayInformation;
|
|
43
49
|
extraStartupLog?: () => Record<string, unknown>;
|
|
44
50
|
modifyManagerRouter?: (config: RegistryConfig, router: Hono) => void;
|
|
@@ -962,13 +968,15 @@ declare class ActorHandleRaw {
|
|
|
962
968
|
*/
|
|
963
969
|
websocket(path?: string, protocols?: string | string[]): Promise<WebSocket>;
|
|
964
970
|
/**
|
|
965
|
-
* Resolves the actor to get its unique actor ID
|
|
966
|
-
*
|
|
967
|
-
* @returns {Promise<string>} - A promise that resolves to the actor's ID
|
|
971
|
+
* Resolves the actor to get its unique actor ID.
|
|
968
972
|
*/
|
|
969
973
|
resolve({ signal }?: {
|
|
970
974
|
signal?: AbortSignal;
|
|
971
975
|
}): Promise<string>;
|
|
976
|
+
/**
|
|
977
|
+
* Returns the raw URL for routing traffic to the actor.
|
|
978
|
+
*/
|
|
979
|
+
getGatewayUrl(): Promise<string>;
|
|
972
980
|
}
|
|
973
981
|
/**
|
|
974
982
|
* Stateless handle to a actor. Allows calling actor's remote procedure calls with inferred types
|
|
@@ -1232,6 +1240,61 @@ declare class ActorInspector {
|
|
|
1232
1240
|
executeAction(name: string, params: ArrayBuffer): Promise<ArrayBuffer>;
|
|
1233
1241
|
}
|
|
1234
1242
|
|
|
1243
|
+
/**
|
|
1244
|
+
* User-facing KV storage interface exposed on ActorContext.
|
|
1245
|
+
*/
|
|
1246
|
+
type KvValueType = "text" | "arrayBuffer" | "binary";
|
|
1247
|
+
type KvKeyType = "text" | "binary";
|
|
1248
|
+
type KvKey = Uint8Array | string;
|
|
1249
|
+
type KvValueTypeMap = {
|
|
1250
|
+
text: string;
|
|
1251
|
+
arrayBuffer: ArrayBuffer;
|
|
1252
|
+
binary: Uint8Array;
|
|
1253
|
+
};
|
|
1254
|
+
type KvKeyTypeMap = {
|
|
1255
|
+
text: string;
|
|
1256
|
+
binary: Uint8Array;
|
|
1257
|
+
};
|
|
1258
|
+
type KvValueOptions<T extends KvValueType = "text"> = {
|
|
1259
|
+
type?: T;
|
|
1260
|
+
};
|
|
1261
|
+
type KvListOptions<T extends KvValueType = "text", K extends KvKeyType = "text"> = KvValueOptions<T> & {
|
|
1262
|
+
keyType?: K;
|
|
1263
|
+
};
|
|
1264
|
+
declare class ActorKv {
|
|
1265
|
+
#private;
|
|
1266
|
+
constructor(driver: ActorDriver, actorId: string);
|
|
1267
|
+
/**
|
|
1268
|
+
* Get a single value by key.
|
|
1269
|
+
*/
|
|
1270
|
+
get<T extends KvValueType = "text">(key: KvKey, options?: KvValueOptions<T>): Promise<KvValueTypeMap[T] | null>;
|
|
1271
|
+
/**
|
|
1272
|
+
* Get multiple values by keys.
|
|
1273
|
+
*/
|
|
1274
|
+
getBatch<T extends KvValueType = "text">(keys: KvKey[], options?: KvValueOptions<T>): Promise<(KvValueTypeMap[T] | null)[]>;
|
|
1275
|
+
/**
|
|
1276
|
+
* Put a single key-value pair.
|
|
1277
|
+
*/
|
|
1278
|
+
put<T extends KvValueType = KvValueType>(key: KvKey, value: KvValueTypeMap[T], options?: KvValueOptions<T>): Promise<void>;
|
|
1279
|
+
/**
|
|
1280
|
+
* Put multiple key-value pairs.
|
|
1281
|
+
*/
|
|
1282
|
+
putBatch<T extends KvValueType = KvValueType>(entries: [KvKey, KvValueTypeMap[T]][], options?: KvValueOptions<T>): Promise<void>;
|
|
1283
|
+
/**
|
|
1284
|
+
* Delete a single key.
|
|
1285
|
+
*/
|
|
1286
|
+
delete(key: KvKey): Promise<void>;
|
|
1287
|
+
/**
|
|
1288
|
+
* Delete multiple keys.
|
|
1289
|
+
*/
|
|
1290
|
+
deleteBatch(keys: KvKey[]): Promise<void>;
|
|
1291
|
+
/**
|
|
1292
|
+
* List all keys with a given prefix.
|
|
1293
|
+
* Returns key-value pairs where keys have the user prefix removed.
|
|
1294
|
+
*/
|
|
1295
|
+
list<T extends KvValueType = "text", K extends KvKeyType = "text">(prefix: KvKeyTypeMap[K], options?: KvListOptions<T, K>): Promise<[KvKeyTypeMap[K], KvValueTypeMap[T]][]>;
|
|
1296
|
+
}
|
|
1297
|
+
|
|
1235
1298
|
declare class Schedule {
|
|
1236
1299
|
#private;
|
|
1237
1300
|
constructor(actor: AnyActorInstance);
|
|
@@ -1245,6 +1308,10 @@ declare class Schedule {
|
|
|
1245
1308
|
declare class ActorContext<TState, TConnParams, TConnState, TVars, TInput, TDatabase extends AnyDatabaseProvider> {
|
|
1246
1309
|
#private;
|
|
1247
1310
|
constructor(actor: ActorInstance<TState, TConnParams, TConnState, TVars, TInput, TDatabase>);
|
|
1311
|
+
/**
|
|
1312
|
+
* Gets the KV storage interface.
|
|
1313
|
+
*/
|
|
1314
|
+
get kv(): ActorKv;
|
|
1248
1315
|
/**
|
|
1249
1316
|
* Get the actor state
|
|
1250
1317
|
*
|
|
@@ -2101,7 +2168,7 @@ interface BaseActorConfig<TState, TConnParams, TConnState, TVars, TInput, TDatab
|
|
|
2101
2168
|
* @param opts Additional options including the original HTTP upgrade request
|
|
2102
2169
|
*/
|
|
2103
2170
|
onWebSocket?: (c: WebSocketContext<TState, TConnParams, TConnState, TVars, TInput, TDatabase>, websocket: UniversalWebSocket) => void | Promise<void>;
|
|
2104
|
-
actions
|
|
2171
|
+
actions?: TActions;
|
|
2105
2172
|
}
|
|
2106
2173
|
type ActorDatabaseConfig<TDatabase extends AnyDatabaseProvider> = {
|
|
2107
2174
|
/**
|
|
@@ -2166,4 +2233,4 @@ declare const DocActorConfigSchema: z.ZodObject<{
|
|
|
2166
2233
|
}, z.core.$strip>>;
|
|
2167
2234
|
}, z.core.$strip>;
|
|
2168
2235
|
|
|
2169
|
-
export {
|
|
2236
|
+
export { StateChangeContext as $, type ActorDriver as A, ActionContext as B, type Client as C, DocActorOptionsSchema as D, type Encoding as E, type ActionContextOf as F, BeforeActionResponseContext as G, type BeforeActionResponseContextOf as H, BeforeConnectContext as I, type BeforeConnectContextOf as J, ConnectContext as K, type ConnectContextOf as L, CreateContext as M, type CreateContextOf as N, CreateConnStateContext as O, type CreateConnStateContextOf as P, CreateVarsContext as Q, type RegistryConfig as R, type CreateVarsContextOf as S, DestroyContext as T, type DestroyContextOf as U, DisconnectContext as V, type DisconnectContextOf as W, RequestContext as X, type RequestContextOf as Y, SleepContext as Z, type SleepContextOf as _, type AnyConn as a, type StateChangeContextOf as a0, WakeContext as a1, type WakeContextOf as a2, WebSocketContext as a3, type WebSocketContextOf as a4, type RegistryActors as a5, RegistryConfigSchema as a6, type FetchHandler as a7, type ServerlessHandler as a8, type LegacyStartServerOutput as a9, type ActorHandle as aA, ActorHandleRaw as aB, type ActorAccessor as aC, ClientRaw as aD, type CreateOptions as aE, type ExtractActorsFromRegistry as aF, type ExtractRegistryFromClient as aG, type GetOptions as aH, type GetWithIdOptions as aI, type QueryOptions as aJ, type Region as aK, type ManagerDriver as aL, ActorInstance as aM, type ActorOutput as aN, type CreateInput as aO, type GetForIdInput as aP, type GetOrCreateWithKeyInput as aQ, type GetWithKeyInput as aR, type ListActorsInput as aS, type ManagerDisplayInformation as aT, type ManagerDriverBuilder as aU, type ActorDriverBuilder as aV, Registry as aa, setup as ab, ActorsSchema as ac, TestConfigSchema as ad, type TestConfig as ae, type RegistryConfigInput as af, buildActorNames as ag, DocInspectorConfigSchema as ah, DocConfigureRunnerPoolSchema as ai, DocServerlessConfigSchema as aj, DocRunnerConfigSchema as ak, DocRegistryConfigSchema as al, ActorClientError as am, ActorConnDisposed as an, ActorError as ao, InternalError as ap, MalformedResponseMessage as aq, ManagerError as ar, type CreateRequest as as, type ActorActionFunction as at, type ActorConn as au, type ActorConnStatus as av, type ConnectionStateCallback as aw, type EventUnsubscribe as ax, type StatusChangeCallback as ay, ActorConnRaw as az, type AnyActorInstance as b, type AnyDatabaseProvider as c, type Actions as d, type ActorConfigInput as e, ActorDefinition as f, type AnyClient as g, createClientWithDriver as h, type ActorQuery as i, type ActorKey as j, Conn as k, type AnyActorDefinition as l, lookupInRegistry as m, ActorKv as n, type ActorTypes as o, ActorConfigSchema as p, type AuthIntent as q, type ActorConfig as r, DocActorConfigSchema as s, test as t, ActorContext as u, type ActorContextOf as v, ConnContext as w, type ConnContextOf as x, ConnInitContext as y, type ConnInitContextOf as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import { aU as ManagerDriverBuilder, aV as ActorDriverBuilder } from './config-BuBlMs6C.cjs';
|
|
3
3
|
|
|
4
4
|
declare const DriverConfigSchema: z.ZodObject<{
|
|
5
5
|
name: z.ZodString;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import { aU as ManagerDriverBuilder, aV as ActorDriverBuilder } from './config-CBwo4ooA.js';
|
|
3
3
|
|
|
4
4
|
declare const DriverConfigSchema: z.ZodObject<{
|
|
5
5
|
name: z.ZodString;
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _chunkKMYFL3OLcjs = require('../chunk-KMYFL3OL.cjs');
|
|
21
21
|
require('../chunk-KDFWJKMJ.cjs');
|
|
22
|
-
require('../chunk-
|
|
22
|
+
require('../chunk-X72X7I7T.cjs');
|
|
23
23
|
require('../chunk-SNAUKDDK.cjs');
|
|
24
24
|
require('../chunk-GBENOENJ.cjs');
|
|
25
25
|
|
|
@@ -41,5 +41,5 @@ require('../chunk-GBENOENJ.cjs');
|
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
|
|
44
|
-
exports.ALLOWED_PUBLIC_HEADERS =
|
|
44
|
+
exports.ALLOWED_PUBLIC_HEADERS = _chunkKMYFL3OLcjs.ALLOWED_PUBLIC_HEADERS; exports.HEADER_ACTOR_ID = _chunkKMYFL3OLcjs.HEADER_ACTOR_ID; exports.HEADER_ACTOR_QUERY = _chunkKMYFL3OLcjs.HEADER_ACTOR_QUERY; exports.HEADER_CONN_PARAMS = _chunkKMYFL3OLcjs.HEADER_CONN_PARAMS; exports.HEADER_ENCODING = _chunkKMYFL3OLcjs.HEADER_ENCODING; exports.HEADER_RIVET_ACTOR = _chunkKMYFL3OLcjs.HEADER_RIVET_ACTOR; exports.HEADER_RIVET_TARGET = _chunkKMYFL3OLcjs.HEADER_RIVET_TARGET; exports.PATH_CONNECT = _chunkKMYFL3OLcjs.PATH_CONNECT; exports.PATH_WEBSOCKET_BASE = _chunkKMYFL3OLcjs.PATH_WEBSOCKET_BASE; exports.PATH_WEBSOCKET_PREFIX = _chunkKMYFL3OLcjs.PATH_WEBSOCKET_PREFIX; exports.WS_PROTOCOL_ACTOR = _chunkKMYFL3OLcjs.WS_PROTOCOL_ACTOR; exports.WS_PROTOCOL_CONN_PARAMS = _chunkKMYFL3OLcjs.WS_PROTOCOL_CONN_PARAMS; exports.WS_PROTOCOL_ENCODING = _chunkKMYFL3OLcjs.WS_PROTOCOL_ENCODING; exports.WS_PROTOCOL_PATH = _chunkKMYFL3OLcjs.WS_TEST_PROTOCOL_PATH; exports.WS_PROTOCOL_STANDARD = _chunkKMYFL3OLcjs.WS_PROTOCOL_STANDARD; exports.WS_PROTOCOL_TARGET = _chunkKMYFL3OLcjs.WS_PROTOCOL_TARGET; exports.buildManagerRouter = _chunkKMYFL3OLcjs.buildManagerRouter; exports.getInitialActorKvState = _chunkKMYFL3OLcjs.getInitialActorKvState;
|
|
45
45
|
//# sourceMappingURL=mod.cjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R as RegistryConfig,
|
|
2
|
-
export { A as ActorDriver,
|
|
1
|
+
import { R as RegistryConfig, aL as ManagerDriver } from '../config-BuBlMs6C.cjs';
|
|
2
|
+
export { A as ActorDriver, aM as ActorInstance, aN as ActorOutput, b as AnyActorInstance, aO as CreateInput, aP as GetForIdInput, aQ as GetOrCreateWithKeyInput, aR as GetWithKeyInput, aS as ListActorsInput, aT as ManagerDisplayInformation } from '../config-BuBlMs6C.cjs';
|
|
3
3
|
export { A as ALLOWED_PUBLIC_HEADERS, H as HEADER_ACTOR_ID, b as HEADER_ACTOR_QUERY, c as HEADER_CONN_PARAMS, d as HEADER_ENCODING, e as HEADER_RIVET_ACTOR, f as HEADER_RIVET_TARGET, P as PATH_CONNECT, g as PATH_WEBSOCKET_BASE, a as PATH_WEBSOCKET_PREFIX, W as WS_PROTOCOL_ACTOR, h as WS_PROTOCOL_CONN_PARAMS, i as WS_PROTOCOL_ENCODING, l as WS_PROTOCOL_PATH, j as WS_PROTOCOL_STANDARD, k as WS_PROTOCOL_TARGET } from '../actor-router-consts-DzI2szci.cjs';
|
|
4
4
|
import * as _hono_zod_openapi from '@hono/zod-openapi';
|
|
5
5
|
import { Hono } from 'hono';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R as RegistryConfig,
|
|
2
|
-
export { A as ActorDriver,
|
|
1
|
+
import { R as RegistryConfig, aL as ManagerDriver } from '../config-CBwo4ooA.js';
|
|
2
|
+
export { A as ActorDriver, aM as ActorInstance, aN as ActorOutput, b as AnyActorInstance, aO as CreateInput, aP as GetForIdInput, aQ as GetOrCreateWithKeyInput, aR as GetWithKeyInput, aS as ListActorsInput, aT as ManagerDisplayInformation } from '../config-CBwo4ooA.js';
|
|
3
3
|
export { A as ALLOWED_PUBLIC_HEADERS, H as HEADER_ACTOR_ID, b as HEADER_ACTOR_QUERY, c as HEADER_CONN_PARAMS, d as HEADER_ENCODING, e as HEADER_RIVET_ACTOR, f as HEADER_RIVET_TARGET, P as PATH_CONNECT, g as PATH_WEBSOCKET_BASE, a as PATH_WEBSOCKET_PREFIX, W as WS_PROTOCOL_ACTOR, h as WS_PROTOCOL_CONN_PARAMS, i as WS_PROTOCOL_ENCODING, l as WS_PROTOCOL_PATH, j as WS_PROTOCOL_STANDARD, k as WS_PROTOCOL_TARGET } from '../actor-router-consts-DzI2szci.js';
|
|
4
4
|
import * as _hono_zod_openapi from '@hono/zod-openapi';
|
|
5
5
|
import { Hono } from 'hono';
|
|
@@ -17,9 +17,9 @@ import {
|
|
|
17
17
|
WS_TEST_PROTOCOL_PATH,
|
|
18
18
|
buildManagerRouter,
|
|
19
19
|
getInitialActorKvState
|
|
20
|
-
} from "../chunk-
|
|
20
|
+
} from "../chunk-PVKUXMOA.js";
|
|
21
21
|
import "../chunk-E6ZE2YEA.js";
|
|
22
|
-
import "../chunk-
|
|
22
|
+
import "../chunk-CDK6DRO2.js";
|
|
23
23
|
import "../chunk-2YHR67M4.js";
|
|
24
24
|
export {
|
|
25
25
|
ALLOWED_PUBLIC_HEADERS,
|