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/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
"on-change": "^5.0.1",
"p-retry": "^6.2.1",
"zod": "^3.25.76",
"@rivetkit/engine-runner": "https://pkg.pr.new/rivet-gg/engine/@rivetkit/engine-runner@f8860f3"
"@rivetkit/engine-runner": "https://pkg.pr.new/rivet-gg/engine/@rivetkit/engine-runner@4b0f765"
},
"devDependencies": {
"@hono/node-server": "^1.18.2",
Expand Down
11 changes: 9 additions & 2 deletions packages/core/src/drivers/engine/actor-driver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import {
handleRawWebSocketHandler,
handleWebSocketConnect,
lookupInRegistry,
noopNext,
PATH_CONNECT_WEBSOCKET,
PATH_RAW_WEBSOCKET_PREFIX,
} from "@/mod";
Expand Down Expand Up @@ -85,7 +84,15 @@ export class EngineActorDriver implements ActorDriver {
totalSlots: config.totalSlots,
runnerName: config.runnerName,
runnerKey: config.runnerKey,
prepopulateActorNames: Object.keys(this.#registryConfig.use),
metadata: {
inspectorToken: this.#runConfig.studio.token(),
},
prepopulateActorNames: Object.fromEntries(
Object.keys(this.#registryConfig.use).map((name) => [
name,
{ metadata: {} },
]),
),
onConnected: () => {
if (hasDisconnected) {
logger().info("runner reconnected", {
Expand Down
8 changes: 6 additions & 2 deletions packages/core/src/drivers/engine/manager-driver.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import * as cbor from "cbor-x";
import type { Context as HonoContext } from "hono";
import type { WSContext } from "hono/ws";
import invariant from "invariant";
import { ActorAlreadyExists, InternalError } from "@/actor/errors";
import { ActorAlreadyExists } from "@/actor/errors";
import {
HEADER_AUTH_DATA,
HEADER_CONN_PARAMS,
HEADER_ENCODING,
HEADER_EXPOSE_INTERNAL_ERROR,
} from "@/actor/router-endpoints";
import { generateRandomString } from "@/actor/utils";
import { importWebSocket } from "@/common/websocket";
import type {
ActorOutput,
Expand Down Expand Up @@ -40,6 +40,10 @@ export class EngineManagerDriver implements ManagerDriver {
constructor(config: Config, runConfig: RunConfig) {
this.#config = config;
this.#runConfig = runConfig;
if (!this.#runConfig.studio.token()) {
const token = generateRandomString();
this.#runConfig.studio.token = () => token;
}
this.#importWebSocketPromise = importWebSocket();
}

Expand Down
50 changes: 28 additions & 22 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading