Skip to content
This repository was archived by the owner on Oct 22, 2025. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/cloudflare-workers/tests/driver-tests.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ runDriverTests({
return {
endpoint: `http://localhost:${port}/rivet`,
namespace: "default",
runnerName: "rivetkit",
runnerName: "default",
async cleanup() {
// Shut down wrangler process
wranglerProcess.kill();
Expand Down
2 changes: 1 addition & 1 deletion packages/rivetkit/src/client/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const ClientConfigSchema = z.object({
/** Name of the runner. This is used to group together runners in to different pools. */
runnerName: z
.string()
.default(() => getEnvUniversal("RIVET_RUNNER") ?? "rivetkit"),
.default(() => getEnvUniversal("RIVET_RUNNER") ?? "default"),

encoding: EncodingSchema.default("bare"),

Expand Down
2 changes: 1 addition & 1 deletion packages/rivetkit/src/driver-test-suite/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ export async function createTestRuntime(
return {
endpoint: serverEndpoint,
namespace: "default",
runnerName: "rivetkit",
runnerName: "default",
cleanup,
};
}
Expand Down
20 changes: 10 additions & 10 deletions packages/rivetkit/src/manager/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ function addServerlessRoutes(
if (!parseResult.success) {
throw new InvalidRequest(
parseResult.error.issues[0]?.message ??
"invalid serverless start headers",
"invalid serverless start headers",
);
}
const { endpoint, token, totalSlots, runnerName, namespace } =
Expand Down Expand Up @@ -274,9 +274,9 @@ function addManagerRoutes(

const actorIdsParsed = actor_ids
? actor_ids
.split(",")
.map((id) => id.trim())
.filter((id) => id.length > 0)
.split(",")
.map((id) => id.trim())
.filter((id) => id.length > 0)
: undefined;

const actors: ActorOutput[] = [];
Expand Down Expand Up @@ -321,7 +321,7 @@ function addManagerRoutes(
}

return c.json<ActorsListResponse>({
actors: actors.map(createApiActor),
actors: actors.map(actor => createApiActor(actor, runConfig.runnerName)),
});
});
}
Expand Down Expand Up @@ -355,7 +355,7 @@ function addManagerRoutes(

if (existingActor) {
return c.json<ActorsGetOrCreateResponse>({
actor: createApiActor(existingActor),
actor: createApiActor(existingActor, runConfig.runnerName),
created: false,
});
}
Expand All @@ -372,7 +372,7 @@ function addManagerRoutes(
});

return c.json<ActorsGetOrCreateResponse>({
actor: createApiActor(newActor),
actor: createApiActor(newActor, runConfig.runnerName),
created: true,
});
});
Expand Down Expand Up @@ -410,7 +410,7 @@ function addManagerRoutes(
});

// Transform ActorOutput to match ActorSchema
const actor = createApiActor(actorOutput);
const actor = createApiActor(actorOutput, runConfig.runnerName);

return c.json<ActorsCreateResponse>({ actor });
});
Expand Down Expand Up @@ -655,13 +655,13 @@ function addManagerRoutes(
);
}

function createApiActor(actor: ActorOutput): ApiActor {
function createApiActor(actor: ActorOutput, runnerName: string = "default"): ApiActor {
return {
actor_id: actor.actorId,
name: actor.name,
key: serializeActorKey(actor.key),
namespace_id: "default", // Assert default namespace
runner_name_selector: "rivetkit", // Assert rivetkit runner
runner_name_selector: runnerName,
create_ts: Date.now(),
connectable_ts: null,
destroy_ts: null,
Expand Down
Loading