Skip to content
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/rivetkit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@
"@bare-ts/lib": "~0.3.0",
"@hono/standard-validator": "^0.1.3",
"@hono/zod-openapi": "^0.19.10",
"@rivetkit/engine-runner": "https://pkg.pr.new/rivet-dev/engine/@rivetkit/engine-runner@16cf6cc",
"@rivetkit/engine-runner": "https://pkg.pr.new/rivet-dev/engine/@rivetkit/engine-runner@76c2e031",
"@rivetkit/fast-json-patch": "^3.1.2",
"cbor-x": "^1.6.0",
"hono": "^4.7.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/rivetkit/src/drivers/default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export function chooseDefaultDriver(runConfig: RunConfig): DriverConfig {

if (runConfig.runnerKind === "serverless" && !runConfig.endpoint) {
throw new UserError(
"Cannot use 'serverless' runnerKind without the 'endpoint' config set. This condition should not happen, since the endpoint should be configured by default by Rivet when using serverless runners.",
"Cannot use 'serverless' runnerKind without the 'endpoint' config set.",
);
}

Expand Down
12 changes: 10 additions & 2 deletions packages/rivetkit/src/drivers/engine/actor-driver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,14 @@ export class EngineActorDriver implements ActorDriver {
this.#managerDriver = managerDriver;
this.#inlineClient = inlineClient;
this.#config = config;

// HACK: Override inspector token (which are likely to be
// removed later on) with token from x-rivet-token header
const token = runConfig.token ?? config.token;
if (token && runConfig.inspector && runConfig.inspector.enabled) {
runConfig.inspector.token = () => token;
}

this.#actorRouter = createActorRouter(
runConfig,
this,
Expand All @@ -90,7 +98,7 @@ export class EngineActorDriver implements ActorDriver {
const runnerConfig: RunnerConfig = {
version: this.#version,
endpoint: config.endpoint,
token: runConfig.token ?? config.token,
token,
pegboardEndpoint: config.pegboardEndpoint,
namespace: runConfig.namespace ?? config.namespace,
totalSlots: runConfig.totalSlots ?? config.totalSlots,
Expand Down Expand Up @@ -413,7 +421,7 @@ export class EngineActorDriver implements ActorDriver {
// Runner id should be set if the runner started
const payload = this.#runner.getServerlessInitPacket();
invariant(payload, "runnerId not set");
stream.writeSSE({ data: payload });
await stream.writeSSE({ data: payload });

return this.#runnerStopped.promise;
});
Expand Down
Loading
Loading