rivetkit 2.3.11-rc.2 → 2.3.11-rc.4
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 +17 -0
- package/dist/browser/client.js +20 -9
- 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/agent-os/index.cjs +1 -1
- package/dist/tsup/agent-os/index.cjs.map +1 -1
- package/dist/tsup/agent-os/index.d.cts +16 -0
- package/dist/tsup/agent-os/index.d.ts +16 -0
- package/dist/tsup/agent-os/index.js +1 -1
- package/dist/tsup/agent-os/index.js.map +1 -1
- package/dist/tsup/{chunk-3NPCXMJS.cjs → chunk-3BQTLF6T.cjs} +158 -147
- package/dist/tsup/chunk-3BQTLF6T.cjs.map +1 -0
- package/dist/tsup/{chunk-7TVKYMD3.cjs → chunk-3WCNDXDU.cjs} +4 -4
- package/dist/tsup/{chunk-7TVKYMD3.cjs.map → chunk-3WCNDXDU.cjs.map} +1 -1
- package/dist/tsup/{chunk-XR2KF2ZA.js → chunk-5KLTIO35.js} +25 -14
- package/dist/tsup/chunk-5KLTIO35.js.map +1 -0
- package/dist/tsup/{chunk-XWIXH7JF.js → chunk-7N4PSYCJ.js} +2 -2
- package/dist/tsup/{chunk-XWIXH7JF.js.map → chunk-7N4PSYCJ.js.map} +1 -1
- package/dist/tsup/{chunk-5SHK4JM5.cjs → chunk-DD4HSOMO.cjs} +2 -2
- package/dist/tsup/{chunk-5SHK4JM5.cjs.map → chunk-DD4HSOMO.cjs.map} +1 -1
- package/dist/tsup/{chunk-NRRWLN6D.cjs → chunk-G66RAENX.cjs} +3 -3
- package/dist/tsup/{chunk-NRRWLN6D.cjs.map → chunk-G66RAENX.cjs.map} +1 -1
- package/dist/tsup/{chunk-NLAW2MIM.js → chunk-I3OXZILZ.js} +2 -2
- package/dist/tsup/{chunk-J4RT6EFK.cjs → chunk-RRVTP46R.cjs} +9 -9
- package/dist/tsup/{chunk-J4RT6EFK.cjs.map → chunk-RRVTP46R.cjs.map} +1 -1
- package/dist/tsup/{chunk-RVJQMOAA.js → chunk-S26YGW4T.js} +2 -2
- package/dist/tsup/{chunk-75K5VACB.js → chunk-TP5MGPLS.js} +3 -3
- package/dist/tsup/{chunk-LPGJPAVY.cjs → chunk-VAG7L6N3.cjs} +7 -7
- package/dist/tsup/{chunk-LPGJPAVY.cjs.map → chunk-VAG7L6N3.cjs.map} +1 -1
- package/dist/tsup/{chunk-KHSNHG4G.js → chunk-ZI6TSSI4.js} +3 -3
- package/dist/tsup/client/mod.cjs +5 -5
- package/dist/tsup/client/mod.d.cts +2 -2
- package/dist/tsup/client/mod.d.ts +2 -2
- 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-BKAMOHez.d.ts → config-CZcjyT5B.d.ts} +17 -0
- package/dist/tsup/{config-Caocy3Z9.d.cts → config-rGWrumlO.d.cts} +17 -0
- package/dist/tsup/{context-D1_m5x1D.d.cts → context-B8W8E8nW.d.cts} +1 -1
- package/dist/tsup/{context-AfCExwbr.d.ts → context-_UrDZhEh.d.ts} +1 -1
- package/dist/tsup/db/drizzle.cjs +2 -2
- package/dist/tsup/db/drizzle.js +1 -1
- package/dist/tsup/db/mod.cjs +2 -2
- package/dist/tsup/db/mod.js +1 -1
- package/dist/tsup/dynamic/mod.d.cts +1 -1
- package/dist/tsup/dynamic/mod.d.ts +1 -1
- package/dist/tsup/inspector/mod.cjs +4 -4
- package/dist/tsup/inspector/mod.js +3 -3
- package/dist/tsup/inspector-tab/mod.d.cts +2 -2
- package/dist/tsup/inspector-tab/mod.d.ts +2 -2
- package/dist/tsup/mod.cjs +65 -65
- package/dist/tsup/mod.d.cts +3 -3
- package/dist/tsup/mod.d.ts +3 -3
- package/dist/tsup/mod.js +4 -4
- package/dist/tsup/test/mod.cjs +6 -6
- package/dist/tsup/test/mod.d.cts +1 -1
- package/dist/tsup/test/mod.d.ts +1 -1
- package/dist/tsup/test/mod.js +4 -4
- package/dist/tsup/utils.cjs +2 -2
- package/dist/tsup/utils.js +1 -1
- package/dist/tsup/workflow/mod.cjs +6 -6
- package/dist/tsup/workflow/mod.d.cts +3 -3
- package/dist/tsup/workflow/mod.d.ts +3 -3
- package/dist/tsup/workflow/mod.js +3 -3
- package/package.json +8 -8
- package/src/client/client.ts +11 -0
- package/src/client/query.ts +2 -0
- package/src/client/resolve-gateway-target.ts +2 -0
- package/src/engine-client/driver.ts +4 -0
- package/src/engine-client/mod.ts +13 -4
- package/dist/tsup/chunk-3NPCXMJS.cjs.map +0 -1
- package/dist/tsup/chunk-XR2KF2ZA.js.map +0 -1
- /package/dist/tsup/{chunk-NLAW2MIM.js.map → chunk-I3OXZILZ.js.map} +0 -0
- /package/dist/tsup/{chunk-RVJQMOAA.js.map → chunk-S26YGW4T.js.map} +0 -0
- /package/dist/tsup/{chunk-75K5VACB.js.map → chunk-TP5MGPLS.js.map} +0 -0
- /package/dist/tsup/{chunk-KHSNHG4G.js.map → chunk-ZI6TSSI4.js.map} +0 -0
package/dist/browser/client.d.ts
CHANGED
|
@@ -165,6 +165,7 @@ declare const CreateRequestSchema: z.ZodObject<{
|
|
|
165
165
|
key: z.ZodArray<z.ZodString>;
|
|
166
166
|
input: z.ZodOptional<z.ZodUnknown>;
|
|
167
167
|
region: z.ZodOptional<z.ZodString>;
|
|
168
|
+
poolName: z.ZodOptional<z.ZodString>;
|
|
168
169
|
}, z.core.$strip>;
|
|
169
170
|
declare const ActorQuerySchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
170
171
|
getForId: z.ZodObject<{
|
|
@@ -182,6 +183,7 @@ declare const ActorQuerySchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
182
183
|
key: z.ZodArray<z.ZodString>;
|
|
183
184
|
input: z.ZodOptional<z.ZodUnknown>;
|
|
184
185
|
region: z.ZodOptional<z.ZodString>;
|
|
186
|
+
poolName: z.ZodOptional<z.ZodString>;
|
|
185
187
|
}, z.core.$strip>;
|
|
186
188
|
}, z.core.$strip>, z.ZodObject<{
|
|
187
189
|
create: z.ZodObject<{
|
|
@@ -189,6 +191,7 @@ declare const ActorQuerySchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
189
191
|
key: z.ZodArray<z.ZodString>;
|
|
190
192
|
input: z.ZodOptional<z.ZodUnknown>;
|
|
191
193
|
region: z.ZodOptional<z.ZodString>;
|
|
194
|
+
poolName: z.ZodOptional<z.ZodString>;
|
|
192
195
|
}, z.core.$strip>;
|
|
193
196
|
}, z.core.$strip>]>;
|
|
194
197
|
type ActorQuery = z.infer<typeof ActorQuerySchema>;
|
|
@@ -342,6 +345,8 @@ interface GetOrCreateWithKeyInput {
|
|
|
342
345
|
input?: unknown;
|
|
343
346
|
region?: string;
|
|
344
347
|
crashPolicy?: CrashPolicy;
|
|
348
|
+
/** Overrides the client's configured pool name for this actor. */
|
|
349
|
+
poolName?: string;
|
|
345
350
|
}
|
|
346
351
|
interface CreateInput {
|
|
347
352
|
c?: Context | undefined;
|
|
@@ -350,6 +355,8 @@ interface CreateInput {
|
|
|
350
355
|
input?: unknown;
|
|
351
356
|
region?: string;
|
|
352
357
|
crashPolicy?: CrashPolicy;
|
|
358
|
+
/** Overrides the client's configured pool name for this actor. */
|
|
359
|
+
poolName?: string;
|
|
353
360
|
}
|
|
354
361
|
interface ListActorsInput {
|
|
355
362
|
c?: Context | undefined;
|
|
@@ -856,6 +863,11 @@ interface GetOrCreateOptions extends QueryOptions {
|
|
|
856
863
|
createInRegion?: string;
|
|
857
864
|
/** Input data to pass to the actor. */
|
|
858
865
|
createWithInput?: unknown;
|
|
866
|
+
/**
|
|
867
|
+
* Name of the envoy pool to select for this actor if it is created.
|
|
868
|
+
* Overrides the client's configured `poolName` for this call.
|
|
869
|
+
*/
|
|
870
|
+
poolName?: string;
|
|
859
871
|
}
|
|
860
872
|
/**
|
|
861
873
|
* Options for creating a actor.
|
|
@@ -867,6 +879,11 @@ interface CreateOptions extends QueryOptions {
|
|
|
867
879
|
region?: string;
|
|
868
880
|
/** Input data to pass to the actor. */
|
|
869
881
|
input?: unknown;
|
|
882
|
+
/**
|
|
883
|
+
* Name of the envoy pool to select for this actor.
|
|
884
|
+
* Overrides the client's configured `poolName` for this call.
|
|
885
|
+
*/
|
|
886
|
+
poolName?: string;
|
|
870
887
|
}
|
|
871
888
|
/**
|
|
872
889
|
* Represents a region to connect to.
|
package/dist/browser/client.js
CHANGED
|
@@ -194,7 +194,7 @@ function noopNext() {
|
|
|
194
194
|
// package.json
|
|
195
195
|
var package_default = {
|
|
196
196
|
name: "rivetkit",
|
|
197
|
-
version: "2.3.11-rc.
|
|
197
|
+
version: "2.3.11-rc.4",
|
|
198
198
|
description: "Lightweight libraries for building stateful actors on edge platforms",
|
|
199
199
|
license: "Apache-2.0",
|
|
200
200
|
keywords: [
|
|
@@ -4212,7 +4212,14 @@ var RemoteEngineControlClient = class {
|
|
|
4212
4212
|
}
|
|
4213
4213
|
async getOrCreateWithKey(input) {
|
|
4214
4214
|
await this.#metadataPromise;
|
|
4215
|
-
const {
|
|
4215
|
+
const {
|
|
4216
|
+
name,
|
|
4217
|
+
key,
|
|
4218
|
+
input: actorInput,
|
|
4219
|
+
region,
|
|
4220
|
+
crashPolicy,
|
|
4221
|
+
poolName
|
|
4222
|
+
} = input;
|
|
4216
4223
|
logger3().info({
|
|
4217
4224
|
msg: "getOrCreateWithKey: getting or creating actor via engine api",
|
|
4218
4225
|
name,
|
|
@@ -4222,7 +4229,7 @@ var RemoteEngineControlClient = class {
|
|
|
4222
4229
|
datacenter: region,
|
|
4223
4230
|
name,
|
|
4224
4231
|
key: serializeActorKey(key),
|
|
4225
|
-
runner_name_selector: this.#config.poolName,
|
|
4232
|
+
runner_name_selector: poolName ?? this.#config.poolName,
|
|
4226
4233
|
input: actorInput ? uint8ArrayToBase64(
|
|
4227
4234
|
encodeCborCompat(actorInput)
|
|
4228
4235
|
) : void 0,
|
|
@@ -4242,14 +4249,15 @@ var RemoteEngineControlClient = class {
|
|
|
4242
4249
|
key,
|
|
4243
4250
|
input,
|
|
4244
4251
|
region,
|
|
4245
|
-
crashPolicy
|
|
4252
|
+
crashPolicy,
|
|
4253
|
+
poolName
|
|
4246
4254
|
}) {
|
|
4247
4255
|
await this.#metadataPromise;
|
|
4248
4256
|
logger3().info({ msg: "creating actor via engine api", name, key });
|
|
4249
4257
|
const result = await createActor(this.#config, {
|
|
4250
4258
|
datacenter: region,
|
|
4251
4259
|
name,
|
|
4252
|
-
runner_name_selector: this.#config.poolName,
|
|
4260
|
+
runner_name_selector: poolName ?? this.#config.poolName,
|
|
4253
4261
|
key: serializeActorKey(key),
|
|
4254
4262
|
input: input ? uint8ArrayToBase64(encodeCborCompat(input)) : void 0,
|
|
4255
4263
|
crash_policy: crashPolicy ?? "sleep"
|
|
@@ -4385,7 +4393,7 @@ var RemoteEngineControlClient = class {
|
|
|
4385
4393
|
path,
|
|
4386
4394
|
this.#config.maxInputSize,
|
|
4387
4395
|
void 0,
|
|
4388
|
-
"getOrCreateForKey" in target ? this.#config.poolName : void 0,
|
|
4396
|
+
"getOrCreateForKey" in target ? target.getOrCreateForKey.poolName ?? this.#config.poolName : void 0,
|
|
4389
4397
|
options
|
|
4390
4398
|
);
|
|
4391
4399
|
}
|
|
@@ -5993,7 +6001,8 @@ async function resolveGatewayTarget(driver, target) {
|
|
|
5993
6001
|
name: target.getOrCreateForKey.name,
|
|
5994
6002
|
key: target.getOrCreateForKey.key,
|
|
5995
6003
|
input: target.getOrCreateForKey.input,
|
|
5996
|
-
region: target.getOrCreateForKey.region
|
|
6004
|
+
region: target.getOrCreateForKey.region,
|
|
6005
|
+
poolName: target.getOrCreateForKey.poolName
|
|
5997
6006
|
});
|
|
5998
6007
|
return output.actorId;
|
|
5999
6008
|
}
|
|
@@ -6002,7 +6011,8 @@ async function resolveGatewayTarget(driver, target) {
|
|
|
6002
6011
|
name: target.create.name,
|
|
6003
6012
|
key: target.create.key,
|
|
6004
6013
|
input: target.create.input,
|
|
6005
|
-
region: target.create.region
|
|
6014
|
+
region: target.create.region,
|
|
6015
|
+
poolName: target.create.poolName
|
|
6006
6016
|
});
|
|
6007
6017
|
return output.actorId;
|
|
6008
6018
|
}
|
|
@@ -6710,7 +6720,8 @@ var ClientRaw = class {
|
|
|
6710
6720
|
name,
|
|
6711
6721
|
key: keyArray,
|
|
6712
6722
|
input: opts?.createWithInput,
|
|
6713
|
-
region: opts?.createInRegion
|
|
6723
|
+
region: opts?.createInRegion,
|
|
6724
|
+
poolName: opts?.poolName
|
|
6714
6725
|
}
|
|
6715
6726
|
};
|
|
6716
6727
|
const handle = this.#createHandle(
|