diff --git a/rivetkit-typescript/packages/rivetkit/src/client/actor-query.ts b/rivetkit-typescript/packages/rivetkit/src/client/actor-query.ts index 6d1e231945..a7c4efde34 100644 --- a/rivetkit-typescript/packages/rivetkit/src/client/actor-query.ts +++ b/rivetkit-typescript/packages/rivetkit/src/client/actor-query.ts @@ -43,6 +43,7 @@ export async function queryActor( key: query.getOrCreateForKey.key, input: query.getOrCreateForKey.input, region: query.getOrCreateForKey.region, + runner: query.getOrCreateForKey.runner, }); actorOutput = { actorId: getOrCreateOutput.actorId, @@ -54,6 +55,7 @@ export async function queryActor( key: query.create.key, input: query.create.input, region: query.create.region, + runner: query.create.runner, }); actorOutput = { actorId: createOutput.actorId, diff --git a/rivetkit-typescript/packages/rivetkit/src/client/client.ts b/rivetkit-typescript/packages/rivetkit/src/client/client.ts index 1bd32d4aab..5b3b627b56 100644 --- a/rivetkit-typescript/packages/rivetkit/src/client/client.ts +++ b/rivetkit-typescript/packages/rivetkit/src/client/client.ts @@ -112,6 +112,8 @@ export interface GetOrCreateOptions extends QueryOptions { createInRegion?: string; /** Input data to pass to the actor. */ createWithInput?: unknown; + /** Runner name to create the actor on. Overrides the client's default runner. */ + createOnRunner?: string; } /** @@ -124,6 +126,8 @@ export interface CreateOptions extends QueryOptions { region?: string; /** Input data to pass to the actor. */ input?: unknown; + /** Runner name to create the actor on. Overrides the client's default runner. */ + runner?: string; } /** @@ -270,6 +274,7 @@ export class ClientRaw { key: keyArray, input: opts?.createWithInput, region: opts?.createInRegion, + runner: opts?.createOnRunner, }, }; diff --git a/rivetkit-typescript/packages/rivetkit/src/manager/driver.ts b/rivetkit-typescript/packages/rivetkit/src/manager/driver.ts index 4be926c891..2e07add9c2 100644 --- a/rivetkit-typescript/packages/rivetkit/src/manager/driver.ts +++ b/rivetkit-typescript/packages/rivetkit/src/manager/driver.ts @@ -76,6 +76,7 @@ export interface GetOrCreateWithKeyInput { key: ActorKey; input?: unknown; region?: string; + runner?: string; } export interface CreateInput { @@ -84,6 +85,7 @@ export interface CreateInput { key: ActorKey; input?: unknown; region?: string; + runner?: string; } export interface ListActorsInput { diff --git a/rivetkit-typescript/packages/rivetkit/src/manager/protocol/query.ts b/rivetkit-typescript/packages/rivetkit/src/manager/protocol/query.ts index bd887b2b53..d5148d9f73 100644 --- a/rivetkit-typescript/packages/rivetkit/src/manager/protocol/query.ts +++ b/rivetkit-typescript/packages/rivetkit/src/manager/protocol/query.ts @@ -21,6 +21,7 @@ export const CreateRequestSchema = z.object({ key: ActorKeySchema, input: z.unknown().optional(), region: z.string().optional(), + runner: z.string().optional(), }); export const GetForKeyRequestSchema = z.object({ @@ -33,6 +34,7 @@ export const GetOrCreateRequestSchema = z.object({ key: ActorKeySchema, input: z.unknown().optional(), region: z.string().optional(), + runner: z.string().optional(), }); export const ActorQuerySchema = z.union([