Skip to content

Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.

feat(sandbox): add durable Railway bot workspaces (#303)

usehoplite[bot]c7dbad44a976
diff --git a/.changeset/fluffy-lizards-switch.md b/.changeset/fluffy-lizards-switch.md
new file mode 100644
index 000000000..6488a3199
--- /dev/null
+++ b/.changeset/fluffy-lizards-switch.md
@@ -0,0 +1,11 @@
+---
+"akeru-bot": minor
+---
+
+Add Railway bot workspaces with durable identity reattachment and saved credentials. Railway VMs remain running while idle; previews require a CLI tunnel and automatic bot browser routing is unavailable.
+
+Deleting a bot leaves its Railway VM running; the Railway guide explains how to retire it.
+
+Preserve sandbox inheritance when editing bot settings. Keep same-chat turns in order while preparing attachments without blocking other chats.
+
+Interrupting a chat also cancels turns waiting for attachment preparation, while allowing new turns after the interrupt.
diff --git a/apps/server/package.json b/apps/server/package.json
index 3721a5701..7cf98e201 100644
--- a/apps/server/package.json
+++ b/apps/server/package.json
@@ -56,6 +56,7 @@
"node-pty": "^1.1.0",
"playwright-core": "1.60.0",
"pngjs": "7.0.0",
+ "railway": "3.11.0",
"yaml": "catalog:",
"zod": "^4.4.3"
},
diff --git a/apps/server/src/provider/AkeruSessionResources.test.ts b/apps/server/src/provider/AkeruSessionResources.test.ts
index d67299290..e379e50c8 100644
--- a/apps/server/src/provider/AkeruSessionResources.test.ts
+++ b/apps/server/src/provider/AkeruSessionResources.test.ts
@@ -13,6 +13,11 @@ import { computerRegistry } from "./computerRegistry.ts";
import { WorkspaceComputer } from "./workspaceComputer.ts";
import { CODEX_COMPUTER_USE_SERVER_ID } from "./CodexComputerUse.ts";
import { createBotBrowser } from "./botBrowser.ts";
+import {
+ botWorkspaceCredentialFingerprint,
+ botWorkspaceIdentity,
+ botWorkspaceResourceKey,
+} from "./botWorkspacePool.ts";
import {
type AkeruBotWorkspace,
type AkeruRemoteSession,
@@ -332,7 +337,7 @@ describe("AkeruSessionResources", () => {
await resources.shutdown();
});
- it.each(["local", "vercel", "e2b", "daytona", "upstash", "tenki"] as const)(
+ it.each(["local", "vercel", "e2b", "daytona", "upstash", "railway", "tenki"] as const)(
"acquires only usable connector browser attachments in %s workspaces",
async (botSandbox) => {
for (const transport of ["stdio", "url"] as const) {
@@ -362,16 +367,29 @@ describe("AkeruSessionResources", () => {
command: "connector",
};
try {
+ const requiresBrowser =
+ botSandbox !== "tenki" &&
+ (id === "builtin-executor" || id === "builtin-tinyfish") &&
+ (transport === "stdio" || botSandbox !== "local");
+ if (botSandbox === "railway" && requiresBrowser) {
+ await expect(
+ resources.acquire({
+ ...remoteInput,
+ botSandbox,
+ threadId: "connector",
+ mcpServers: [server, exaServer],
+ }),
+ ).rejects.toThrow("Railway CLI tunnel");
+ expect(acquireAttachment).not.toHaveBeenCalled();
+ expect(manager.init).not.toHaveBeenCalled();
+ continue;
+ }
await resources.acquire({
...remoteInput,
botSandbox,
threadId: "connector",
mcpServers: [server, exaServer],
});
- const requiresBrowser =
- botSandbox !== "tenki" &&
- (id === "builtin-executor" || id === "builtin-tinyfish") &&
- (transport === "stdio" || botSandbox !== "local");
expect(acquireAttachment).toHaveBeenCalledTimes(requiresBrowser ? 1 : 0);
expect(toMcpServerConfigs).toHaveBeenCalledWith(
[server, exaServer],
@@ -801,6 +819,106 @@ describe("AkeruSessionResources", () => {
expect(NodeFS.existsSync(identityFile)).toBe(false);
});
+ it("reattaches Railway after credential rotation and rejects browser connectors without touching the VM", async () => {
+ const directory = stateDir();
+ const destroy = vi.fn(async () => undefined);
+ const openSession = vi.fn(
+ async (providerId?: string): Promise<AkeruRemoteSession> => ({
+ providerId: providerId ?? "railway-vm",
+ inspect: async () => "running",
+ run: async () => ({ exitCode: 0, stdout: "", stderr: "" }),
+ browserEndpoint: async () => {
+ throw new Error("Railway CLI tunnel required");
+ },
+ wake: async () => undefined,
+ sleep: async () => undefined,
+ destroy,
+ }),
+ );
+ const makeRemoteWorkspace = vi.fn((input: Parameters<typeof createRemoteBotWorkspace>[0]) =>
+ createRemoteBotWorkspace({ ...input, openSession }),
+ );
+ const failedManager = mcpManager({ connected: true, toolCount: 0 });
+ failedManager.init.mockRejectedValueOnce(new Error("MCP init failed after rotation"));
+ const resources = new AkeruSessionResources({
+ stateDir: directory,
+ makeRemoteWorkspace,
+ makeMcpManager: () => failedManager as never,
+ toMcpServerConfigs: () => ({}),
+ });
+ const input = (token: string) => {
+ const sandboxEnvironment = {
+ RAILWAY_API_TOKEN: token,
+ RAILWAY_ENVIRONMENT_ID: "environment",
+ };
+ const workspaceResourceKey = botWorkspaceResourceKey({
+ sandbox: "railway",
+ resourceScope: "bot-one",
+ credentialFingerprint: botWorkspaceCredentialFingerprint(sandboxEnvironment),
+ });
+ return {
+ ...remoteInput,
+ botSandbox: "railway" as const,
+ sandboxEnvironment,
+ threadId: token,
+ workspaceResourceKey,
+ workspaceId: botWorkspaceIdentity(workspaceResourceKey),
+ mcpServers: [],
+ };
+ };
+ const first = input("old-token");
+ const second = input("new-token");
+ await resources.acquire(first);
+ await resources.acquire(second);
+ expect(openSession).toHaveBeenNthCalledWith(1, undefined);
+ expect(openSession).toHaveBeenNthCalledWith(2, "railway-vm");
+ await resources.release(second.threadId);
+ const identityFile = NodePath.join(
+ directory,
+ "bot-workspaces",
+ first.workspaceId,
+ "provider.json",
+ );
+ const identity = NodeFS.readFileSync(identityFile, "utf8");
+ await expect(
+ resources.acquire({
+ ...second,
+ threadId: "connector",
+ mcpServers: [
+ {
+ ...exaServer,
+ id: McpServerId.make("builtin-tinyfish"),
+ transport: "stdio",
+ command: "connector",
+ },
+ ],
+ }),
+ ).rejects.toThrow("Railway CLI tunnel");
+ expect(makeRemoteWorkspace).toHaveBeenCalledTimes(2);
+ expect(destroy).not.toHaveBeenCalled();
+ expect(NodeFS.readFileSync(identityFile, "utf8")).toBe(identity);
+ await expect(
+ resources.acquire({ ...input("another-token"), mcpServers: [exaServer] }),
+ ).rejects.toThrow("MCP init failed after rotation");
+ expect(destroy).not.toHaveBeenCalled();
+ expect(resources.getWorkspace(first.threadId)).toBeDefined();
+ expect(NodeFS.readFileSync(identityFile, "utf8")).toBe(identity);
+ await resources.shutdown();
+ const restarted = new AkeruSessionResources({
+ stateDir: directory,
+ makeRemoteWorkspace,
+ toMcpServerConfigs: () => ({}),
+ });
+ openSession.mockRejectedValueOnce(new Error("credentials revoked"));
+ await expect(restarted.acquire(input("revoked-token"))).rejects.toThrow(
+ "missing or unavailable",
+ );
+ expect(openSession).toHaveBeenLastCalledWith("railway-vm");
+ expect(NodeFS.readFileSync(identityFile, "utf8")).toBe(identity);
+ expect(destroy).not.toHaveBeenCalled();
+ await restarted.shutdown();
+ });
+
it("keeps the bot workspace separate from the user computer workspace", async () => {
const directory = stateDir();
const project = NodePath.join(directory, "project");
diff --git a/apps/server/src/provider/AkeruSessionResources.ts b/apps/server/src/provider/AkeruSessionResources.ts
index 9e122f860..b8292270d 100644
--- a/apps/server/src/provider/AkeruSessionResources.ts
+++ b/apps/server/src/provider/AkeruSessionResources.ts
@@ -126,6 +126,16 @@ export class AkeruSessionResources {
if (this.shuttingDown) {
return Promise.reject(new Error("Akeru session resources are shutting down."));
}
+ if (
+ input.botSandbox === "railway" &&
+ input.mcpServers.some((server) => mcpServerNeedsBrowserAttachment(server, true))
+ ) {
+ return Promise.reject(
+ new Error(
+ "Railway previews require a Railway CLI tunnel. Disable browser-dependent connectors before starting this bot; automatic browser routing is not supported.",
+ ),
+ );
+ }
const pending = this.acquisitions.get(input.threadId);
if (pending) return pending;
if (this.workspaceLeases.has(input.threadId)) {
@@ -370,7 +380,9 @@ export class AkeruSessionResources {
botWorkspace: workspaceLease.workspace.workspace,
};
} catch (cause) {
- await this.releaseOnce(key, { destroy: input.botSandbox !== "tenki" }).catch(() => undefined);
+ await this.releaseOnce(key, {
+ destroy: input.botSandbox !== "railway" && input.botSandbox !== "tenki",
+ }).catch(() => undefined);
throw cause;
}
}
diff --git a/apps/server/src/provider/Layers/AgentController.test.ts b/apps/server/src/provider/Layers/AgentController.test.ts
index b9f1e8582..56c56139f 100644
--- a/apps/server/src/provider/Layers/AgentController.test.ts
+++ b/apps/server/src/provider/Layers/AgentController.test.ts
@@ -3863,6 +3863,44 @@ describe("AgentControllerLive", () => {
);
});
+ it.effect("releases turn preparation when provider routing rejects a turn", () => {
+ const bridge = makeBridge();
+ const mastra = makeMastraHarness();
+ return provideController(
+ Effect.gen(function* () {
+ const controller = yield* AgentController;
+ yield* controller.resolveEngine({
+ threadId: openCodeGoThreadId,
+ engine: { provider: String(openCodeGoInstanceId), model: "gpt-5.6-luna" },
+ fallback: codexSelection,
+ mode: "default",
+ botConversation: true,
+ });
+ yield* controller.startSession(openCodeGoThreadId, {
+ threadId: openCodeGoThreadId,
+ provider: ProviderDriverKind.make("opencodeGo"),
+ providerInstanceId: openCodeGoInstanceId,
+ modelSelection: { instanceId: openCodeGoInstanceId, model: "gpt-5.6-luna" },
+ runtimeMode: "approval-required",
+ });
+
+ bridge.setInstanceEnabled(false);
+ const rejected = yield* Effect.exit(
+ controller.sendTurn({ threadId: openCodeGoThreadId, input: "Disabled" }),
+ );
+ assert.isTrue(Exit.isFailure(rejected));
+
+ bridge.setInstanceEnabled(true);
+ yield* controller.sendTurn({ threadId: openCodeGoThreadId, input: "Enabled again" });
+ yield* Effect.promise(() => mastra.waitForSendMessageCount(1));
+ mastra.finishSend();
+ expect(mastra.sendMessage).toHaveBeenCalledWith({ content: "Enabled again" });
+ }),
+ bridge.service,
+ mastra.factory,
+ );
+ });
+
it.effect("serializes queued turns while dispatch admission is pending", () => {
const bridge = makeBridge();
const mastra = makeMastraHarness();
@@ -6628,6 +6666,141 @@ describe("AgentControllerLive", () => {
},
);
+ it.effect("keeps same-thread turn order when an attachment waiter is interrupted", () => {
+ const bridge = makeBridge();
+ const mastra = makeMastraHarness();
+ let readStarted!: () => void;
+ const started = new Promise<void>((resolve) => {
+ readStarted = resolve;
+ });
+ let finishRead!: () => void;
+ const readGate = new Promise<void>((resolve) => {
+ finishRead = resolve;
+ });
+ const layer = makeLayer(bridge.service, mastra.factory, undefined, undefined, undefined, {
+ readAttachment: async () => {
+ readStarted();
+ await readGate;
+ return Buffer.from("image");
+ },
+ });
+ return Effect.gen(function* () {
+ const controller = yield* AgentController;
+ yield* resolveCodex(controller);
+ yield* controller.startSession(codexThreadId, {
+ threadId: codexThreadId,
+ provider: ProviderDriverKind.make("codex"),
+ providerInstanceId: codexInstanceId,
+ cwd: process.cwd(),
+ modelSelection: codexSelection,
+ runtimeMode: "full-access",
+ });
+ bridge.blockNextDispatchAdmission();
+ const first = yield* controller
+ .sendTurn({
+ threadId: codexThreadId,
+ input: "First",
+ attachments: [
+ {
+ type: "image",
+ id: "image-1",
+ name: "first.png",
+ mimeType: "image/png",
+ sizeBytes: 5,
+ },
+ ],
+ })
+ .pipe(Effect.forkChild({ startImmediately: true }));
+ yield* Effect.promise(() => started);
+ const second = yield* controller
+ .sendTurn({ threadId: codexThreadId, input: "Interrupted waiter" })
+ .pipe(Effect.forkChild({ startImmediately: true }));
+ yield* Fiber.interrupt(second);
+ const third = yield* controller
+ .sendTurn({ threadId: codexThreadId, input: "Third" })
+ .pipe(Effect.forkChild({ startImmediately: true }));
+ expect(mastra.sendMessage).not.toHaveBeenCalled();
+ finishRead();
+ yield* Effect.promise(bridge.waitForNextDispatchAdmission);
+ yield* Fiber.join(third);
+ bridge.releaseNextDispatchAdmission();
+ yield* Fiber.join(first);
+ yield* Effect.promise(() => mastra.waitForSendMessageCount(1));
+ mastra.finishSend();
+ yield* Effect.promise(() => mastra.waitForSendMessageCount(2));
+ mastra.finishSend();
+ expect(mastra.sendMessage).toHaveBeenNthCalledWith(
+ 1,
+ expect.objectContaining({ content: expect.stringContaining("First") }),
+ );
+ expect(mastra.sendMessage).toHaveBeenNthCalledWith(2, { content: "Third" });
+ }).pipe(Effect.provide(layer), Effect.orDie);
+ });
+
+ it.effect("interrupts turns waiting for attachment preparation", () => {
+ const bridge = makeBridge();
+ const mastra = makeMastraHarness();
+ let readStarted!: () => void;
+ const started = new Promise<void>((resolve) => {
+ readStarted = resolve;
+ });
+ let finishRead!: () => void;
+ const readGate = new Promise<void>((resolve) => {
+ finishRead = resolve;
+ });
+ const layer = makeLayer(bridge.service, mastra.factory, undefined, undefined, undefined, {
+ readAttachment: async () => {
+ readStarted();
+ await readGate;
+ return Buffer.from("image");
+ },
+ });
+ return Effect.gen(function* () {
+ const controller = yield* AgentController;
+ yield* resolveCodex(controller);
+ yield* controller.startSession(codexThreadId, {
+ threadId: codexThreadId,
+ provider: ProviderDriverKind.make("codex"),
+ providerInstanceId: codexInstanceId,
+ cwd: process.cwd(),
+ modelSelection: codexSelection,
+ runtimeMode: "full-access",
+ });
+ const first = yield* controller
+ .sendTurn({
+ threadId: codexThreadId,
+ input: "Preparing attachment",
+ attachments: [
+ {
+ type: "image",
+ id: "image-1",
+ name: "first.png",
+ mimeType: "image/png",
+ sizeBytes: 5,
+ },
+ ],
+ })
+ .pipe(Effect.result, Effect.forkChild({ startImmediately: true }));
+ yield* Effect.promise(() => started);
+ const second = yield* controller
+ .sendTurn({
+ threadId: codexThreadId,
+ input: "Waiting for preparation",
+ })
+ .pipe(Effect.result, Effect.forkChild({ startImmediately: true }));
+ yield* controller.interruptTurn({ threadId: codexThreadId });
+ // The stalled read stays unresolved: the interrupt alone must free the chat.
+ expect((yield* Fiber.join(first))._tag).toBe("Failure");
+ expect((yield* Fiber.join(second))._tag).toBe("Failure");
+ expect(mastra.sendMessage).not.toHaveBeenCalled();
+ yield* controller.sendTurn({ threadId: codexThreadId, input: "After interrupt" });
+ yield* Effect.promise(() => mastra.waitForSendMessageCount(1));
+ expect(mastra.sendMessage).toHaveBeenCalledWith({ content: "After interrupt" });
+ mastra.finishSend();
+ finishRead();
+ }).pipe(Effect.provide(layer), Effect.orDie);
+ });
+
it.effect("reads persisted image attachments for Mastra turns", () => {
const bridge = makeBridge();
const mastra = makeMastraHarness();
@@ -7512,6 +7685,68 @@ describe("AgentControllerLive", () => {
});
});
+ it.effect("preserves the Railway VM when an active session rotates credentials", () => {
+ const bridge = makeBridge();
+ const mastra = makeMastraHarness();
+ const destroy = vi.fn(async () => undefined);
+ const makeRemoteWorkspace = vi.fn(
+ async (_input: import("../botWorkspace.ts").CreateRemoteBotWorkspaceInput) => ({
+ id: "railway-vm",
+ provider: "railway" as const,
+ workspace: new Workspace({
+ filesystem: new LocalFilesystem({ basePath: process.cwd() }),
+ sandbox: new LocalSandbox({ workingDirectory: process.cwd() }),
+ }),
+ inspect: async () => "running" as const,
+ wake: async () => undefined,
+ sleep: async () => undefined,
+ destroy,
+ }),
+ );
+ const layer = makeAgentControllerLive({
+ makeMastraHarness: mastra.factory,
+ makeRemoteWorkspace,
+ }).pipe(
+ Layer.provide(
+ Layer.mergeAll(
+ Layer.succeed(LegacyProviderBridge, bridge.service),
+ Layer.succeed(BotUsageLedger, makeUsageLedger().service),
+ ServerConfig.layerTest(process.cwd(), { prefix: "akeru-railway-rotation-test-" }).pipe(
+ Layer.provide(NodeServices.layer),
+ ),
+ NodeServices.layer,
+ ),
+ ),
+ );
+ return Effect.gen(function* () {
+ const controller = yield* AgentController;
+ yield* resolveCodex(controller);
+ const input = {
+ threadId: codexThreadId,
+ provider: ProviderDriverKind.make("codex"),
+ providerInstanceId: codexInstanceId,
+ modelSelection: codexSelection,
+ runtimeMode: "full-access" as const,
+ botSandbox: "railway" as const,
+ };
+ for (const token of ["old", "new"]) {
+ yield* controller.startSession(codexThreadId, {
+ ...input,
+ botSandboxEnvironment: { RAILWAY_API_TOKEN: token, RAILWAY_ENVIRONMENT_ID: "env" },
+ });
+ }
+ expect(makeRemoteWorkspace).toHaveBeenCalledTimes(2);
+ expect(makeRemoteWorkspace.mock.calls[0]?.[0]).toEqual(
+ expect.objectContaining({
+ workspaceId: makeRemoteWorkspace.mock.calls[1]?.[0]?.workspaceId,
+ }),
+ );
+ expect(destroy).not.toHaveBeenCalled();
+ yield* controller.startSession(codexThreadId, { ...input, botSandbox: "upstash" });
+ expect(destroy).toHaveBeenCalledOnce();
+ }).pipe(Effect.provide(layer), Effect.orDie);
+ });
+
it.effect("reuses the remote workspace when only cwd changes", () => {
const bridge = makeBridge();
const mastra = makeMastraHarness();
diff --git a/apps/server/src/provider/Layers/AgentController.ts b/apps/server/src/provider/Layers/AgentController.ts
index f9615cc83..2d62dd962 100644
--- a/apps/server/src/provider/Layers/AgentController.ts
+++ b/apps/server/src/provider/Layers/AgentController.ts
@@ -56,6 +56,7 @@ import { HostProcessPlatform } from "@akeru/shared/hostProcess";
import { getModelSelectionStringOptionValue } from "@akeru/shared/model";
import * as Clock from "effect/Clock";
import * as DateTime from "effect/DateTime";
+import * as Deferred from "effect/Deferred";
import * as Duration from "effect/Duration";
import * as Effect from "effect/Effect";
import * as Layer from "effect/Layer";
@@ -284,6 +285,7 @@ interface PendingTurn {
interface ActiveSession {
startInput: Parameters<AgentControllerShape["startSession"]>[1];
readonly session: MastraSession;
+ readonly turnPreparation: Semaphore.Semaphore;
readonly provider: ProviderDriverKind;
readonly providerInstanceId: ProviderInstanceId;
cwd: string | undefined;
@@ -294,6 +296,8 @@ interface ActiveSession {
model: string;
status: ProviderSession["status"];
turnAdmissionGeneration: number;
+ /** Completes when the current admission generation ends, cancelling turns still preparing. */
+ turnPreparationCancelled: Deferred.Deferred<void>;
activeTurn: ActiveTurn | null;
admittingTurn: PendingTurn | null;
readonly pendingTurns: PendingTurn[];
@@ -2263,6 +2267,13 @@ const make = (options?: AgentControllerLiveOptions) =>
);
}
+ // Ends the current admission generation and cancels turns still preparing in it.
+ const endTurnAdmissionGeneration = (active: ActiveSession) => {
+ active.turnAdmissionGeneration += 1;
+ Deferred.doneUnsafe(active.turnPreparationCancelled, Effect.void);
+ active.turnPreparationCancelled = Deferred.makeUnsafe<void>();
+ };
+
const finishTurn = (
threadId: ThreadId,
active: ActiveSession,
@@ -3199,7 +3210,8 @@ const make = (options?: AgentControllerLiveOptions) =>
existing?.workspaceResourceKey ?? existingLegacy?.workspaceResourceKey;
yield* stopSessionWithResources(
{ threadId },
- previousWorkspaceResourceKey !== workspaceResourceKey,
+ previousWorkspaceResourceKey !== undefined &&
+ botWorkspaceIdentity(previousWorkspaceResourceKey) !== workspaceId,
);
}
if (delegatedAccess && !usesMastraCode(resolved.provider)) {
@@ -3560,8 +3572,10 @@ const make = (options?: AgentControllerLiveOptions) =>
const current = sessions.get(key);
if (current) handleControllerEvent(threadId, current, event);
});
+ const turnPreparation = yield* Semaphore.make(1);
return {
session,
+ turnPreparation,
startInput: input,
pendingDispatches: new Set<Promise<void>>(),
provider: resolved.provider,
@@ -3574,6 +3588,7 @@ const make = (options?: AgentControllerLiveOptions) =>
model: resolved.modelSelection.model,
status: "ready" as const,
turnAdmissionGeneration: 0,
+ turnPreparationCancelled: Deferred.makeUnsafe<void>(),
activeTurn: null,
admittingTurn: null,
pendingTurns: [],
@@ -3606,17 +3621,19 @@ const make = (options?: AgentControllerLiveOptions) =>
function* (input) {
const key = String(input.threadId);
const resolved = resolvedByThread.get(key);
- if (resolved && usesMastraCode(resolved.provider)) {
- const routing = yield* legacyProviderBridge.getInstanceInfo(resolved.providerInstanceId);
- if (!routing.enabled) {
- return yield* disabledProviderError(
- "AgentController.sendTurn",
+ const active = sessions.get(key);
+ if (!active) {
+ if (resolved && usesMastraCode(resolved.provider)) {
+ const routing = yield* legacyProviderBridge.getInstanceInfo(
resolved.providerInstanceId,
);
+ if (!routing.enabled) {
+ return yield* disabledProviderError(
+ "AgentController.sendTurn",
+ resolved.providerInstanceId,
+ );
+ }
}
- }
- const active = sessions.get(key);
- if (!active) {
if (
usesMastraCode(resolvedByThread.get(key)?.provider ?? ProviderDriverKind.make("codex"))
) {
@@ -3764,82 +3781,116 @@ const make = (options?: AgentControllerLiveOptions) =>
);
}
const turnAdmissionGeneration = active.turnAdmissionGeneration;
- if (input.timezone !== undefined) {
- active.configuredToolSession = {
- ...active.configuredToolSession,
- timezone: input.timezone,
- };
- if (!active.activeTurn && !active.admittingTurn && active.pendingTurns.length === 0) {
- active.toolSession = active.configuredToolSession;
- toolRuntime.registerSession(key, active.toolSession);
- }
- }
- const attachmentFiles = yield* Effect.forEach(
- input.attachments ?? [],
- (attachment) => {
- const path = resolveAttachmentPath({
- attachmentsDir: config.attachmentsDir,
- attachment,
- });
- if (path === null) {
- return Effect.fail(
- new AgentControllerRuntimeError({
- operation: "sendTurn.attachments",
- detail: `Attachment '${attachment.id}' has an invalid path.`,
- }),
+ const turnPreparationCancelled = active.turnPreparationCancelled;
+ const prepareTurn = active.turnPreparation.withPermit(
+ Effect.gen(function* () {
+ if (resolved && usesMastraCode(resolved.provider)) {
+ const routing = yield* legacyProviderBridge.getInstanceInfo(
+ resolved.providerInstanceId,
);
+ if (!routing.enabled) {
+ return yield* disabledProviderError(
+ "AgentController.sendTurn",
+ resolved.providerInstanceId,
+ );
+ }
}
- return Effect.tryPromise({
- try: async () => {
- const bytes = await (options?.readAttachment ?? NodeFS.promises.readFile)(path);
- return {
- file: {
- data: Buffer.from(bytes.buffer, bytes.byteOffset, bytes.byteLength).toString(
- "base64",
- ),
- mediaType: attachment.mimeType,
- filename: attachment.name,
+ if (input.timezone !== undefined) {
+ active.configuredToolSession = {
+ ...active.configuredToolSession,
+ timezone: input.timezone,
+ };
+ if (!active.activeTurn && !active.admittingTurn && active.pendingTurns.length === 0) {
+ active.toolSession = active.configuredToolSession;
+ toolRuntime.registerSession(key, active.toolSession);
+ }
+ }
+ const attachmentFiles = yield* Effect.forEach(
+ input.attachments ?? [],
+ (attachment) => {
+ const path = resolveAttachmentPath({
+ attachmentsDir: config.attachmentsDir,
+ attachment,
+ });
+ if (path === null) {
+ return Effect.fail(
+ new AgentControllerRuntimeError({
+ operation: "sendTurn.attachments",
+ detail: `Attachment '${attachment.id}' has an invalid path.`,
+ }),
+ );
+ }
+ return Effect.tryPromise({
+ try: async () => {
+ const bytes = await (options?.readAttachment ?? NodeFS.promises.readFile)(path);
+ return {
+ file: {
+ data: Buffer.from(
+ bytes.buffer,
+ bytes.byteOffset,
+ bytes.byteLength,
+ ).toString("base64"),
+ mediaType: attachment.mimeType,
+ filename: attachment.name,
+ },
+ pathLine: `[Attached ${attachment.type} "${attachment.name}" is saved at: ${path}]`,
+ };
},
- pathLine: `[Attached ${attachment.type} "${attachment.name}" is saved at: ${path}]`,
- };
+ catch: (cause) =>
+ new AgentControllerRuntimeError({
+ operation: "sendTurn.attachments",
+ detail: `Could not read attachment '${attachment.id}'.`,
+ cause,
+ }),
+ });
},
- catch: (cause) =>
+ { concurrency: 1 },
+ );
+ if (
+ sessions.get(key) !== active ||
+ active.status === "closed" ||
+ active.turnAdmissionGeneration !== turnAdmissionGeneration
+ ) {
+ return yield* new AgentControllerRuntimeError({
+ operation: "sendTurn",
+ detail: `Mastra session for thread '${input.threadId}' is not running.`,
+ });
+ }
+ const content = [input.input, ...attachmentFiles.map(({ pathLine }) => pathLine)]
+ .filter((part): part is string => typeof part === "string" && part.length > 0)
+ .join("\n\n");
+ const files = attachmentFiles.map(({ file }) => file);
+ const turnId = TurnId.make(`mastra-turn-${NodeCrypto.randomUUID()}`);
+ active.pendingTurns.push({
+ threadId: input.threadId,
+ turnId,
+ message: { content, ...(files.length > 0 ? { files } : {}) },
+ botUsage: input.botUsage,
+ toolSession: active.configuredToolSession,
+ memoryAccess: active.configuredMemoryAccess,
+ entityMemoryAccess: active.configuredEntityMemoryAccess,
+ reviewInput: input.input ?? "",
+ hiddenWake: input.hiddenWake === true,
+ delegationResults: input.delegationResults,
+ });
+ return turnId;
+ }),
+ );
+ // An interrupt must not wait for a stalled attachment read: abandon the
+ // preparation, release its permit, and fail turns still queued behind it.
+ const turnId = yield* Effect.raceFirst(
+ prepareTurn,
+ Deferred.await(turnPreparationCancelled).pipe(
+ Effect.andThen(
+ Effect.fail(
new AgentControllerRuntimeError({
- operation: "sendTurn.attachments",
- detail: `Could not read attachment '${attachment.id}'.`,
- cause,
+ operation: "sendTurn",
+ detail: `Mastra session for thread '${input.threadId}' is not running.`,
}),
- });
- },
- { concurrency: 1 },
+ ),
+ ),
+ ),
);
- if (
- sessions.get(key) !== active ||
- active.status === "closed" ||
- active.turnAdmissionGeneration !== turnAdmissionGeneration
- ) {
- return yield* new AgentControllerRuntimeError({
- operation: "sendTurn",
- detail: `Mastra session for thread '${input.threadId}' is not running.`,
- });
- }
- const content = [input.input, ...attachmentFiles.map(({ pathLine }) => pathLine)]
- .filter((part): part is string => typeof part === "string" && part.length > 0)
- .join("\n\n");
- const files = attachmentFiles.map(({ file }) => file);
- const turnId = TurnId.make(`mastra-turn-${NodeCrypto.randomUUID()}`);
- active.pendingTurns.push({
- threadId: input.threadId,
- turnId,
- message: { content, ...(files.length > 0 ? { files } : {}) },
- botUsage: input.botUsage,
- toolSession: active.configuredToolSession,
- memoryAccess: active.configuredMemoryAccess,
- entityMemoryAccess: active.configuredEntityMemoryAccess,
- reviewInput: input.input ?? "",
- hiddenWake: input.hiddenWake === true,
- delegationResults: input.delegationResults,
- });
if (!active.activeTurn && !active.admittingTurn) {
const nextTurn = active.pendingTurns.shift();
if (nextTurn) {
@@ -3886,7 +3937,7 @@ const make = (options?: AgentControllerLiveOptions) =>
),
);
}
- active.turnAdmissionGeneration += 1;
+ endTurnAdmissionGeneration(active);
active.pendingTurns.length = 0;
active.admittingTurn = null;
active.session.abort();
@@ -4265,7 +4316,7 @@ const make = (options?: AgentControllerLiveOptions) =>
}
return yield* legacyProviderBridge.stopSession(input);
}
- active.turnAdmissionGeneration += 1;
+ endTurnAdmissionGeneration(active);
active.pendingTurns.length = 0;
active.admittingTurn = null;
active.session.abort();
@@ -4438,7 +4489,7 @@ const make = (options?: AgentControllerLiveOptions) =>
yield* Effect.addFinalizer(() =>
Effect.gen(function* () {
for (const [threadId, active] of sessions) {
- active.turnAdmissionGeneration += 1;
+ endTurnAdmissionGeneration(active);
active.pendingTurns.length = 0;
active.admittingTurn = null;
active.session.abort();
diff --git a/apps/server/src/provider/botWorkspace.test.ts b/apps/server/src/provider/botWorkspace.test.ts
index 84e01e216..0f6091865 100644
--- a/apps/server/src/provider/botWorkspace.test.ts
+++ b/apps/server/src/provider/botWorkspace.test.ts
@@ -13,6 +13,8 @@ import {
e2b,
type AkeruRemoteSession,
isRemoteBotSandbox,
+ railway,
+ railwayWorkspaceState,
upstash,
upstashWorkspaceState,
vercel,
@@ -32,9 +34,104 @@ function remoteSession(providerId: string): AkeruRemoteSession {
}
describe("createBotWorkspace", () => {
+ it("creates and reattaches Railway identities with explicit credentials and cleans up", async () => {
+ const { Sandbox } = await import("railway");
+ const baseDir = NodeFS.mkdtempSync(NodePath.join(NodeOS.tmpdir(), "akeru-railway-"));
+ const identityFile = NodePath.join(baseDir, "identity.json");
+ const destroy = vi.fn(async () => undefined);
+ const sandbox = {
+ id: "railway-id",
+ status: "RUNNING",
+ refresh: vi.fn(async () => undefined),
+ destroy,
+ } as unknown as import("railway").Sandbox;
+ const create = vi.spyOn(Sandbox, "create").mockResolvedValue(sandbox);
+ const connect = vi.spyOn(Sandbox, "connect").mockResolvedValue(sandbox);
+ const input = {
+ threadId: "railway-thread",
+ workspaceId: "akeru-railway",
+ identityFile,
+ sandbox: "railway" as const,
+ environment: { RAILWAY_API_TOKEN: " token ", RAILWAY_ENVIRONMENT_ID: " env " },
+ };
+ try {
+ const first = await createRemoteBotWorkspace(input);
+ await first.wake();
+ await first.sleep();
+ expect(destroy).not.toHaveBeenCalled();
+ const second = await createRemoteBotWorkspace(input);
+ expect(second.providerId).toBe("railway-id");
+ expect(create).toHaveBeenCalledExactlyOnceWith({ token: "token", environmentId: "env" });
+ expect(connect).toHaveBeenCalledWith("railway-id", { token: "token", environmentId: "env" });
+ connect.mockRejectedValueOnce(new Error("unavailable"));
+ await expect(createRemoteBotWorkspace(input)).rejects.toThrow("missing or unavailable");
+ expect(create).toHaveBeenCalledTimes(1);
+ await second.wake();
+ await second.destroy();
+ expect(destroy).toHaveBeenCalledOnce();
+ expect(NodeFS.existsSync(identityFile)).toBe(false);
+ for (const environment of [{}, { RAILWAY_API_TOKEN: "token" }]) {
+ await expect(createRemoteBotWorkspace({ ...input, environment })).rejects.toThrow(
+ "Remote sandbox credential",
+ );
+ }
+ expect(create).toHaveBeenCalledTimes(1);
+ } finally {
+ create.mockRestore();
+ connect.mockRestore();
+ NodeFS.rmSync(baseDir, { recursive: true, force: true });
+ }
+ });
+
+ it("executes Railway commands and refuses automatic browser ingress", async () => {
+ const exec = vi.fn(
+ async (): Promise<{ exitCode: number | null; stdout: string; stderr: string }> => ({
+ exitCode: 7,
+ stdout: "output",
+ stderr: "error",
+ }),
+ );
+ const refresh = vi.fn(async () => undefined);
+ const sandbox = { id: "railway-id", status: "RUNNING", exec, refresh };
+ const session = railway(sandbox as unknown as import("railway").Sandbox);
+ expect(
+ await session.run("echo", ["it's private"], {
+ cwd: "/tmp",
+ env: { HELLO: "world" },
+ timeout: 1501,
+ }),
+ ).toEqual({ exitCode: 7, stdout: "output", stderr: "error" });
+ expect(exec).toHaveBeenCalledWith("'echo' 'it'\\''s private'", {
+ cwd: "/tmp",
+ env: { HELLO: "world" },
+ timeoutSec: 2,
+ });
+ await expect(session.browserEndpoint(9223)).rejects.toThrow("Railway CLI tunnel");
+ exec.mockResolvedValueOnce({ exitCode: null, stdout: "partial", stderr: "terminated" });
+ await expect(session.run("false", [])).resolves.toEqual({
+ exitCode: 1,
+ stdout: "partial",
+ stderr: "terminated",
+ });
+ await expect(session.inspect()).resolves.toBe("running");
+ sandbox.status = "DESTROYED";
+ await expect(session.wake()).rejects.toThrow("not running");
+ const { SandboxNotFoundError } = await import("railway");
+ refresh.mockRejectedValueOnce(
+ new SandboxNotFoundError({ id: "railway-id", environmentId: "env" }),
+ );
+ await expect(session.inspect()).resolves.toBe("missing");
+ refresh.mockRejectedValueOnce(new Error("unauthorized"));
+ await expect(session.inspect()).rejects.toThrow("unauthorized");
+ expect(railwayWorkspaceState("CREATING")).toBe("sleeping");
+ for (const status of ["DESTROYING", "DESTROYED", "FAILED"] as const) {
+ expect(railwayWorkspaceState(status)).toBe("missing");
+ }
+ });
+
it("classifies every managed provider", () => {
expect(isRemoteBotSandbox("local")).toBe(false);
- for (const sandbox of ["e2b", "daytona", "vercel", "upstash"] as const) {
+ for (const sandbox of ["e2b", "daytona", "vercel", "upstash", "railway"] as const) {
expect(isRemoteBotSandbox(sandbox)).toBe(true);
}
});
diff --git a/apps/server/src/provider/botWorkspace.ts b/apps/server/src/provider/botWorkspace.ts
index f38295950..77c5badb4 100644
--- a/apps/server/src/provider/botWorkspace.ts
+++ b/apps/server/src/provider/botWorkspace.ts
@@ -17,7 +17,14 @@ import { BotWorkspaceFilesystem } from "./botWorkspaceFilesystem.ts";
import { DaytonaComputer } from "./daytonaComputer.ts";
import { WorkspaceComputer } from "./workspaceComputer.ts";
-export const REMOTE_BOT_SANDBOXES = ["e2b", "daytona", "vercel", "upstash", "tenki"] as const;
+export const REMOTE_BOT_SANDBOXES = [
+ "e2b",
+ "daytona",
+ "vercel",
+ "upstash",
+ "railway",
+ "tenki",
+] as const;
export type RemoteBotSandbox = (typeof REMOTE_BOT_SANDBOXES)[number];
export type AkeruWorkspaceState = "running" | "sleeping" | "missing";
@@ -271,6 +278,58 @@ const quote = (value: string) => `'${value.replaceAll("'", `'\\''`)}'`;
const commandLine = (command: string, args: readonly string[]) =>
[command, ...args].map(quote).join(" ");
+function railwayCredentials(environment: Readonly<Record<string, string>>) {
+ return {
+ token: credential(environment, "RAILWAY_API_TOKEN"),
+ environmentId: credential(environment, "RAILWAY_ENVIRONMENT_ID"),
+ };
+}
+
+export function railway(sandbox: import("railway").Sandbox): AkeruRemoteSession {
+ const inspect = async (): Promise<AkeruWorkspaceState> => {
+ const { SandboxNotFoundError } = await import("railway");
+ try {
+ await sandbox.refresh();
+ } catch (cause) {
+ if (cause instanceof SandboxNotFoundError) return "missing";
+ throw cause;
+ }
+ return railwayWorkspaceState(sandbox.status);
+ };
+ return {
+ providerId: sandbox.id,
+ inspect,
+ run: async (command, args, options) => {
+ const result = await sandbox.exec(commandLine(command, args), {
+ ...(options?.cwd ? { cwd: options.cwd } : {}),
+ ...(options?.env ? { env: options.env } : {}),
+ ...(options?.timeout ? { timeoutSec: Math.ceil(options.timeout / 1000) } : {}),
+ });
+ return { exitCode: result.exitCode ?? 1, stdout: result.stdout, stderr: result.stderr };
+ },
+ browserEndpoint: async () => {
+ throw new Error(
+ "Railway previews require a Railway CLI tunnel. Automatic bot browser routing is not supported; private VM addresses are not browser endpoints.",
+ );
+ },
+ wake: async () => {
+ if ((await inspect()) !== "running")
+ throw new Error(`Railway workspace '${sandbox.id}' is not running.`);
+ },
+ // Railway has no pause/resume API; idle preserves the durable VM and its identity.
+ sleep: async () => undefined,
+ destroy: () => sandbox.destroy(),
+ };
+}
+
+export function railwayWorkspaceState(
+ status: import("railway").SandboxStatus,
+): AkeruWorkspaceState {
+ if (status === "RUNNING") return "running";
+ if (status === "CREATING") return "sleeping";
+ return "missing";
+}
+
function credential(environment: Readonly<Record<string, string>>, name: string): string {
const value = environment[name]?.trim();
if (!value) throw new Error(`Remote sandbox credential '${name}' is missing.`);
@@ -312,6 +371,10 @@ async function create(
environment,
);
}
+ if (provider === "railway") {
+ const { Sandbox } = await import("railway");
+ return railway(await Sandbox.create(railwayCredentials(environment)));
+ }
if (provider === "tenki") {
const { TenkiSandbox } = await import("@tenkicloud/sandbox");
const client = new TenkiSandbox({ apiKey: credential(environment, "TENKI_API_KEY") });
@@ -350,6 +413,12 @@ async function open(
environment,
);
}
+ if (provider === "railway") {
+ const { Sandbox } = await import("railway");
+ const session = railway(await Sandbox.connect(id, railwayCredentials(environment)));
+ await session.wake();
+ return session;
+ }
if (provider === "tenki") {
const { TenkiSandbox } = await import("@tenkicloud/sandbox");
const client = new TenkiSandbox({ apiKey: credential(environment, "TENKI_API_KEY") });
diff --git a/apps/server/src/provider/botWorkspacePool.test.ts b/apps/server/src/provider/botWorkspacePool.test.ts
index c299a8895..c99f0469f 100644
--- a/apps/server/src/provider/botWorkspacePool.test.ts
+++ b/apps/server/src/provider/botWorkspacePool.test.ts
@@ -11,6 +11,7 @@ import {
BotWorkspacePool,
botWorkspaceCredentialFingerprint,
botWorkspaceIdentity,
+ botWorkspaceResourceKey,
} from "./botWorkspacePool.ts";
const localWorkspace = () =>
@@ -33,6 +34,51 @@ function remoteWorkspace(overrides: Partial<AkeruBotWorkspace> = {}): AkeruBotWo
}
describe("BotWorkspacePool", () => {
+ effectIt.effect("never destroys a durable Railway VM on initial or subsequent wake failure", () =>
+ Effect.promise(async () => {
+ const pool = new BotWorkspacePool();
+ const destroy = vi.fn(async () => undefined);
+ const wake = vi.fn(async () => undefined);
+ const create = async () => ({
+ id: "shared-railway",
+ provider: "railway" as const,
+ workspace: localWorkspace(),
+ inspect: async () => "running" as const,
+ wake,
+ sleep: async () => undefined,
+ destroy,
+ });
+ const active = await pool.acquire("old-credentials", create);
+ wake.mockRejectedValueOnce(new Error("new credentials unavailable"));
+ await expect(pool.acquire("new-credentials", create)).rejects.toThrow(
+ "new credentials unavailable",
+ );
+ expect(destroy).not.toHaveBeenCalled();
+ await active.release();
+ wake.mockRejectedValueOnce(new Error("wake failed"));
+ await expect(pool.acquire("old-credentials", create)).rejects.toThrow("wake failed");
+ expect(destroy).not.toHaveBeenCalled();
+ }),
+ );
+
+ effectIt.effect(
+ "keeps Railway identities across credential changes without reusing credential-bound clients",
+ () =>
+ Effect.sync(() => {
+ const key = (token: string, scope = "bot-one") =>
+ botWorkspaceResourceKey({
+ resourceScope: scope,
+ sandbox: "railway",
+ credentialFingerprint: botWorkspaceCredentialFingerprint({ RAILWAY_API_TOKEN: token }),
+ });
+ expect(key("old")).not.toBe(key("new"));
+ expect(botWorkspaceIdentity(key("old"))).toBe(botWorkspaceIdentity(key("new")));
+ expect(botWorkspaceIdentity(key("old"))).not.toBe(
+ botWorkspaceIdentity(key("old", "bot-two")),
+ );
+ }),
+ );
+
effectIt.effect("derives workspace identities", () =>
Effect.sync(() => {
expect(
diff --git a/apps/server/src/provider/botWorkspacePool.ts b/apps/server/src/provider/botWorkspacePool.ts
index 71b722210..b773ea131 100644
--- a/apps/server/src/provider/botWorkspacePool.ts
+++ b/apps/server/src/provider/botWorkspacePool.ts
@@ -43,7 +43,9 @@ export function botWorkspaceCredentialFingerprint(
.digest("hex");
}
export function botWorkspaceIdentity(resourceKey: string): string {
- return `akeru-${NodeCrypto.createHash("sha256").update(resourceKey).digest("hex").slice(0, 24)}`;
+ // Credentials select a live client, not a new durable Railway VM.
+ const identityKey = resourceKey.replace(/^railway:[^:]*:/, "railway:");
+ return `akeru-${NodeCrypto.createHash("sha256").update(identityKey).digest("hex").slice(0, 24)}`;
}
export interface BotWorkspaceLease {
diff --git a/apps/server/src/serverSettings.test.ts b/apps/server/src/serverSettings.test.ts
index 3f2435027..d963aee44 100644
--- a/apps/server/src/serverSettings.test.ts
+++ b/apps/server/src/serverSettings.test.ts
@@ -1457,6 +1457,12 @@ it.layer(NodeServices.layer)("server settings", (it) => {
e2b: {
environment: [{ name: "E2B_API_KEY", value: "e2b-secret", sensitive: true }],
},
+ railway: {
+ environment: [
+ { name: "RAILWAY_API_TOKEN", value: "railway-secret", sensitive: true },
+ { name: "RAILWAY_ENVIRONMENT_ID", value: "environment-id", sensitive: false },
+ ],
+ },
tenki: {
environment: [{ name: "TENKI_API_KEY", value: "tenki-secret", sensitive: true }],
},
@@ -1465,9 +1471,12 @@ it.layer(NodeServices.layer)("server settings", (it) => {
});
assert.equal(next.sandbox.providers.e2b.environment[0]?.value, "e2b-secret");
+ assert.equal(next.sandbox.providers.railway.environment[0]?.value, "railway-secret");
+ assert.equal(next.sandbox.providers.railway.environment[1]?.value, "environment-id");
assert.equal(next.sandbox.providers.tenki.environment[0]?.value, "tenki-secret");
const raw = yield* fileSystem.readFileString(serverConfig.settingsPath);
assert.notInclude(raw, "e2b-secret");
+ assert.notInclude(raw, "railway-secret");
assert.notInclude(raw, "tenki-secret");
const clientSettings = ServerSettingsModule.redactServerSettingsForClient(next);
@@ -1475,6 +1484,14 @@ it.layer(NodeServices.layer)("server settings", (it) => {
value: "",
valueRedacted: true,
});
+ assert.deepInclude(clientSettings.sandbox.providers.railway.environment[0], {
+ value: "",
+ valueRedacted: true,
+ });
+ assert.deepInclude(clientSettings.sandbox.providers.railway.environment[1], {
+ value: "environment-id",
+ sensitive: false,
+ });
assert.deepInclude(clientSettings.sandbox.providers.tenki.environment[0], {
value: "",
valueRedacted: true,
@@ -1484,6 +1501,8 @@ it.layer(NodeServices.layer)("server settings", (it) => {
sandbox: clientSettings.sandbox,
});
assert.equal(roundTripped.sandbox.providers.e2b.environment[0]?.value, "e2b-secret");
+ assert.equal(roundTripped.sandbox.providers.railway.environment[0]?.value, "railway-secret");
+ assert.equal(roundTripped.sandbox.providers.railway.environment[1]?.value, "environment-id");
assert.equal(roundTripped.sandbox.providers.tenki.environment[0]?.value, "tenki-secret");
}).pipe(Effect.provide(makeServerSettingsLayer())),
);
diff --git a/apps/server/src/serverSettings.ts b/apps/server/src/serverSettings.ts
index 01dca82ad..0dee0ef5a 100644
--- a/apps/server/src/serverSettings.ts
+++ b/apps/server/src/serverSettings.ts
@@ -190,6 +190,7 @@ export function redactServerSettingsForClient(settings: ServerSettings): ServerS
daytona: redactSandboxProviderConnection(settings.sandbox.providers.daytona),
vercel: redactSandboxProviderConnection(settings.sandbox.providers.vercel),
upstash: redactSandboxProviderConnection(settings.sandbox.providers.upstash),
+ railway: redactSandboxProviderConnection(settings.sandbox.providers.railway),
tenki: redactSandboxProviderConnection(settings.sandbox.providers.tenki),
},
},
diff --git a/apps/server/src/telemetry/AnalyticsService.ts b/apps/server/src/telemetry/AnalyticsService.ts
index d42ba9c71..ce462a87d 100644
--- a/apps/server/src/telemetry/AnalyticsService.ts
+++ b/apps/server/src/telemetry/AnalyticsService.ts
@@ -178,7 +178,16 @@ export function normalizeProvider(value: string): UsageAnalyticsProvider {
return providerValues.has(value) ? (value as UsageAnalyticsProvider) : "other";
}
-const sandboxValues = new Set(["none", "local", "e2b", "daytona", "vercel", "upstash", "tenki"]);
+const sandboxValues = new Set([
+ "none",
+ "local",
+ "e2b",
+ "daytona",
+ "vercel",
+ "upstash",
+ "railway",
+ "tenki",
+]);
function normalizeSandbox(value: string): UsageSandboxProvider {
if (value === "other") return "other";
return sandboxValues.has(value) ? (value as UsageSandboxProvider) : "other";
diff --git a/apps/web/src/components/roster/BotSettingsPage.imageProvider.test.tsx b/apps/web/src/components/roster/BotSettingsPage.imageProvider.test.tsx
index 1d47baed6..fa9b88949 100644
--- a/apps/web/src/components/roster/BotSettingsPage.imageProvider.test.tsx
+++ b/apps/web/src/components/roster/BotSettingsPage.imageProvider.test.tsx
@@ -261,6 +261,58 @@ describe("bot settings image provider", () => {
expect(saveButton(tree).disabled).toBe(true);
});
+ it("preserves inheritance until Local is explicitly selected", async () => {
+ state.bots = [makeBot({ sandbox: null })];
+ let tree = renderForm();
+ expect(saveButton(tree).disabled).toBe(true);
+ const select = visitElements(
+ tree,
+ (element) =>
+ typeof element.props.onValueChange === "function" &&
+ visitElements(
+ element.props.children,
+ (child) => child.props["aria-label"] === "Sandbox provider",
+ ) !== null,
+ );
+ expect(select?.props.value).toBe("default");
+ (select!.props.onValueChange as (value: string) => void)("local");
+ tree = renderForm();
+ expect(saveButton(tree).disabled).toBe(false);
+ saveButton(tree).onClick();
+ await flushPromises();
+ expect(state.updateBot).toHaveBeenCalledWith(
+ expectedUpdate(state.bots[0]!, { sandbox: "local" }),
+ );
+ });
+
+ it("preserves an inherited sandbox while saving another field", async () => {
+ state.bots = [makeBot({ sandbox: null })];
+ imageSelect(renderForm()).onValueChange("grok");
+ saveButton(renderForm()).onClick();
+ await flushPromises();
+ expect(state.updateBot).toHaveBeenCalledWith(
+ expectedUpdate(state.bots[0]!, { imageProvider: "grok", sandbox: null }),
+ );
+ });
+
+ it("can restore the default sandbox from an explicit choice", async () => {
+ state.bots = [makeBot({ sandbox: "railway" })];
+ const tree = renderForm();
+ const select = visitElements(
+ tree,
+ (element) =>
+ typeof element.props.onValueChange === "function" &&
+ visitElements(
+ element.props.children,
+ (child) => child.props["aria-label"] === "Sandbox provider",
+ ) !== null,
+ );
+ (select!.props.onValueChange as (value: string) => void)("default");
+ saveButton(renderForm()).onClick();
+ await flushPromises();
+ expect(state.updateBot).toHaveBeenCalledWith(expectedUpdate(state.bots[0]!, { sandbox: null }));
+ });
+
it("keeps a removed saved provider visible while editing another field", async () => {
const missingId = ProviderInstanceId.make("removed_claude");
state.bots = [makeBot({ engine: { provider: missingId, model: "sonnet" } })];
diff --git a/apps/web/src/components/roster/BotSettingsPage.tsx b/apps/web/src/components/roster/BotSettingsPage.tsx
index 629b7297d..470c76433 100644
--- a/apps/web/src/components/roster/BotSettingsPage.tsx
+++ b/apps/web/src/components/roster/BotSettingsPage.tsx
@@ -501,7 +501,11 @@ function BotSettingsForm({
value={draft.sandbox}
onValueChange={(value) => {
if (value === null) return;
- if (!BOT_SANDBOX_OPTIONS.some((option) => option.value === value)) return;
+ if (
+ value !== "default" &&
+ !BOT_SANDBOX_OPTIONS.some((option) => option.value === value)
+ )
+ return;
draft.setSandbox(value as typeof draft.sandbox);
draft.markChanged();
}}
@@ -510,6 +514,7 @@ function BotSettingsForm({
<SelectValue>{botSandboxLabel(draft.sandbox, t)}</SelectValue>
</SelectTrigger>
<SelectPopup align="end" alignItemWithTrigger={false}>
+ <SelectItem value="default">{botSandboxLabel("default", t)}</SelectItem>
{BOT_SANDBOX_OPTIONS.map((option) => (
<SelectItem key={option.value} value={option.value}>
{botSandboxLabel(option.value, t)}
diff --git a/apps/web/src/components/roster/botSandbox.test.ts b/apps/web/src/components/roster/botSandbox.test.ts
index ad4cf8762..d7729e62e 100644
--- a/apps/web/src/components/roster/botSandbox.test.ts
+++ b/apps/web/src/components/roster/botSandbox.test.ts
@@ -9,8 +9,9 @@ import {
} from "./botSandbox";
describe("botSandbox", () => {
- it("treats a missing bot sandbox as local", () => {
- expect(botSandboxChoice(null)).toBe("local");
+ it("distinguishes an inherited sandbox from explicit Local", () => {
+ expect(botSandboxChoice(null)).toBe("default");
+ expect(botSandboxLabel("default")).toBe("Default sandbox");
expect(botSandboxChoice("local")).toBe("local");
expect(botSandboxChoice("vercel")).toBe("vercel");
});
@@ -34,6 +35,7 @@ describe("botSandbox", () => {
"daytona",
"vercel",
"upstash",
+ "railway",
"tenki",
]);
expect(botSandboxLabel("vercel")).toBe("Vercel Sandbox");
diff --git a/apps/web/src/components/roster/botSandbox.ts b/apps/web/src/components/roster/botSandbox.ts
index e59a074ea..b0cf08b2a 100644
--- a/apps/web/src/components/roster/botSandbox.ts
+++ b/apps/web/src/components/roster/botSandbox.ts
@@ -20,13 +20,14 @@ export const BOT_SANDBOX_OPTIONS = [
{ value: "daytona", label: "Daytona" },
{ value: "vercel", label: "Vercel Sandbox" },
{ value: "upstash", label: "Upstash Box" },
+ { value: "railway", label: "Railway" },
{ value: "tenki", label: "Tenki" },
] as const;
-export type BotSandboxChoice = (typeof BOT_SANDBOX_OPTIONS)[number]["value"];
+export type BotSandboxChoice = (typeof BOT_SANDBOX_OPTIONS)[number]["value"] | "default";
export function botSandboxChoice(sandbox: Bot["sandbox"]): BotSandboxChoice {
- return sandbox ?? "local";
+ return sandbox ?? "default";
}
/** "Local" is interface copy; the cloud sandbox labels are product names and stay as written. */
@@ -34,6 +35,7 @@ export function botSandboxLabel(
sandbox: BotSandboxChoice,
t: Translate = translateEnglish,
): string {
+ if (sandbox === "default") return t("Default sandbox");
const option = BOT_SANDBOX_OPTIONS.find((candidate) => candidate.value === sandbox);
return !option || option.value === "local" ? t("Local") : option.label;
}
@@ -42,5 +44,5 @@ export function resolveBotRuntimeMode(
sandbox: Bot["sandbox"],
localExecutionMode: LocalExecutionMode,
): RuntimeMode {
- return botSandboxChoice(sandbox) === "local" ? localExecutionMode : "full-access";
+ return sandbox === null || sandbox === "local" ? localExecutionMode : "full-access";
}
diff --git a/apps/web/src/components/roster/types.ts b/apps/web/src/components/roster/types.ts
index cae0a602e..7ff98c4ee 100644
--- a/apps/web/src/components/roster/types.ts
+++ b/apps/web/src/components/roster/types.ts
@@ -37,7 +37,7 @@ export interface Bot {
disabledMcpServerIds: readonly McpServerId[];
avatar: BotAvatar;
engine: BotEngine | null;
- sandbox: "local" | "e2b" | "daytona" | "vercel" | "upstash" | "tenki" | null;
+ sandbox: "local" | "e2b" | "daytona" | "vercel" | "upstash" | "railway" | "tenki" | null;
runtimeMode: "approval-required" | "auto-accept-edits" | "auto" | "full-access";
usageCap: { unit: "tokens"; limit: number } | null;
/** Personality baseline, 0 (chill) to 100 (professional). Absent on bots saved before the field existed. */
diff --git a/apps/web/src/components/roster/useBotProfileDraft.ts b/apps/web/src/components/roster/useBotProfileDraft.ts
index 019bcc494..a62d8d399 100644
--- a/apps/web/src/components/roster/useBotProfileDraft.ts
+++ b/apps/web/src/components/roster/useBotProfileDraft.ts
@@ -349,7 +349,7 @@ export function useBotProfileDraft(
description: normalizedDescription,
engine: nextEngine,
usageCap: resolvedUsageCap.value,
- sandbox,
+ sandbox: sandbox === "default" ? null : sandbox,
personalityTone,
voiceEnabled,
imageProvider,
diff --git a/apps/web/src/components/settings/SandboxSettingsPanel.logic.test.ts b/apps/web/src/components/settings/SandboxSettingsPanel.logic.test.ts
index 030229db1..b1955a210 100644
--- a/apps/web/src/components/settings/SandboxSettingsPanel.logic.test.ts
+++ b/apps/web/src/components/settings/SandboxSettingsPanel.logic.test.ts
@@ -2,6 +2,7 @@ import { DEFAULT_SERVER_SETTINGS } from "@akeru/contracts";
import { describe, expect, it } from "vite-plus/test";
import {
+ applyRailwayConnectionChange,
canSaveSandboxProviderConnection,
disconnectSandboxProvider,
isSandboxProviderConnected,
@@ -10,6 +11,55 @@ import {
} from "./SandboxSettingsPanel.logic";
describe("sandbox settings", () => {
+ it("applies pending Railway actions to the latest settings without reverting another client", () => {
+ const latest = {
+ ...saveSandboxProviderConnection({
+ settings: DEFAULT_SERVER_SETTINGS.sandbox,
+ provider: "e2b",
+ draft: { E2B_API_KEY: "new-e2b-key" },
+ }),
+ defaultProvider: "e2b" as const,
+ };
+ for (const change of [
+ { kind: "disconnect" },
+ { kind: "save", draft: { RAILWAY_API_TOKEN: "rotated", RAILWAY_ENVIRONMENT_ID: "env" } },
+ ] as const) {
+ const next = applyRailwayConnectionChange(latest, change);
+ expect(next.defaultProvider).toBe("e2b");
+ expect(next.providers.e2b).toEqual(latest.providers.e2b);
+ expect(next.providers.railway.environment).toEqual(
+ change.kind === "disconnect"
+ ? []
+ : [
+ { name: "RAILWAY_API_TOKEN", value: "rotated", sensitive: true },
+ { name: "RAILWAY_ENVIRONMENT_ID", value: "env", sensitive: false },
+ ],
+ );
+ }
+ });
+ it("requires Railway credentials and resets the default on disconnect", () => {
+ expect(
+ canSaveSandboxProviderConnection({
+ settings: DEFAULT_SERVER_SETTINGS.sandbox,
+ provider: "railway",
+ draft: { RAILWAY_API_TOKEN: "token" },
+ }),
+ ).toBe(false);
+ const connected = saveSandboxProviderConnection({
+ settings: DEFAULT_SERVER_SETTINGS.sandbox,
+ provider: "railway",
+ draft: { RAILWAY_API_TOKEN: " token ", RAILWAY_ENVIRONMENT_ID: " env " },
+ });
+ expect(isSandboxProviderConnected(connected, "railway")).toBe(true);
+ expect(selectableSandboxProviders(connected)).toEqual(["local", "railway"]);
+ const disconnected = disconnectSandboxProvider(
+ { ...connected, defaultProvider: "railway" },
+ "railway",
+ );
+ expect(disconnected.defaultProvider).toBe("local");
+ expect(isSandboxProviderConnected(disconnected, "railway")).toBe(false);
+ });
+
it("offers only local until a cloud provider is connected", () => {
expect(selectableSandboxProviders(DEFAULT_SERVER_SETTINGS.sandbox)).toEqual(["local"]);
});
diff --git a/apps/web/src/components/settings/SandboxSettingsPanel.logic.ts b/apps/web/src/components/settings/SandboxSettingsPanel.logic.ts
index bcf55f1f4..7f08d35c8 100644
--- a/apps/web/src/components/settings/SandboxSettingsPanel.logic.ts
+++ b/apps/web/src/components/settings/SandboxSettingsPanel.logic.ts
@@ -51,6 +51,16 @@ const SANDBOX_PROVIDER_DEFINITION_BY_ID: Readonly<
description: "Cloud workspaces managed by Upstash Box. Requires an API key.",
fields: [{ name: "UPSTASH_BOX_API_KEY", label: "API key", secret: true }],
},
+ railway: {
+ id: "railway",
+ label: "Railway",
+ description:
+ "Run bots in a durable Railway VM. Idle VMs keep running and can incur charges. Previews require a Railway CLI tunnel.",
+ fields: [
+ { name: "RAILWAY_API_TOKEN", label: "API token", secret: true },
+ { name: "RAILWAY_ENVIRONMENT_ID", label: "Environment ID", secret: false },
+ ],
+ },
tenki: {
id: "tenki",
label: "Tenki",
@@ -147,3 +157,16 @@ export function disconnectSandboxProvider(
providers: { ...settings.providers, [provider]: { environment: [] } },
};
}
+
+export type RailwayConnectionChange =
+ | { readonly kind: "disconnect" }
+ | { readonly kind: "save"; readonly draft: Readonly<Record<string, string>> };
+
+export function applyRailwayConnectionChange(
+ settings: SandboxSettings,
+ change: RailwayConnectionChange,
+) {
+ return change.kind === "disconnect"
+ ? disconnectSandboxProvider(settings, "railway")
+ : saveSandboxProviderConnection({ settings, provider: "railway", draft: change.draft });
+}
diff --git a/apps/web/src/components/settings/SandboxSettingsPanel.tsx b/apps/web/src/components/settings/SandboxSettingsPanel.tsx
index 6c2f1eeed..8dbaa4f9d 100644
--- a/apps/web/src/components/settings/SandboxSettingsPanel.tsx
+++ b/apps/web/src/components/settings/SandboxSettingsPanel.tsx
@@ -22,6 +22,8 @@ import { SettingsRow, SettingsSection } from "./settingsLayout";
import { searchableSetting } from "./settingsSearch";
import {
canSaveSandboxProviderConnection,
+ applyRailwayConnectionChange,
+ type RailwayConnectionChange,
type CloudSandboxProvider,
disconnectSandboxProvider,
isSandboxProviderConnected,
@@ -40,6 +42,7 @@ const SANDBOX_PROVIDER_LABELS: Readonly<Record<SandboxProvider, string>> = {
daytona: "Daytona",
vercel: "Vercel Sandbox",
upstash: "Upstash Box",
+ railway: "Railway",
tenki: "Tenki",
};
@@ -76,6 +79,7 @@ function EnvironmentSandboxSettingsPanel({
const [draft, setDraft] = useState<Readonly<Record<string, string>>>({});
const [saving, setSaving] = useState(false);
const [error, setError] = useState<string | null>(null);
+ const [railwayChange, setRailwayChange] = useState<RailwayConnectionChange | null>(null);
const persist = async (next: SandboxSettings) => {
setSaving(true);
@@ -109,6 +113,10 @@ function EnvironmentSandboxSettingsPanel({
provider: editingProvider,
draft,
});
+ if (editingProvider === "railway" && isSandboxProviderConnected(sandbox, "railway")) {
+ setRailwayChange({ kind: "save", draft: { ...draft } });
+ return;
+ }
if (await persist(next)) closeConnection();
};
@@ -150,7 +158,9 @@ function EnvironmentSandboxSettingsPanel({
/>
<SettingsRow
{...searchableSetting("sandbox-auto-idle", t)}
- description={t("Akeru pauses remote sandboxes when bots are idle.")}
+ description={t(
+ "Akeru pauses idle remote sandboxes when supported. Railway VMs keep running until cleanup.",
+ )}
control={<Switch checked disabled aria-label={t("Auto-idle")} />}
/>
</SettingsSection>
@@ -192,9 +202,10 @@ function EnvironmentSandboxSettingsPanel({
variant="ghost-muted"
aria-label={t("Disconnect {name}", { name: definition.label })}
disabled={saving}
- onClick={() =>
- void persist(disconnectSandboxProvider(sandbox, definition.id))
- }
+ onClick={() => {
+ if (definition.id === "railway") setRailwayChange({ kind: "disconnect" });
+ else void persist(disconnectSandboxProvider(sandbox, definition.id));
+ }}
>
{t("Disconnect")}
</Button>
@@ -206,7 +217,10 @@ function EnvironmentSandboxSettingsPanel({
})}
</SettingsSection>
- <Dialog open={editingProvider !== null} onOpenChange={(open) => !open && closeConnection()}>
+ <Dialog
+ open={editingProvider !== null && railwayChange === null}
+ onOpenChange={(open) => !open && closeConnection()}
+ >
<DialogPopup>
<DialogHeader>
<DialogTitle>
@@ -256,6 +270,53 @@ function EnvironmentSandboxSettingsPanel({
</DialogFooter>
</DialogPopup>
</Dialog>
+ <Dialog
+ open={railwayChange !== null}
+ onOpenChange={(open) => !open && !saving && setRailwayChange(null)}
+ >
+ <DialogPopup>
+ <DialogHeader>
+ <DialogTitle>{t("Retire Railway VMs before changing access")}</DialogTitle>
+ <DialogDescription>
+ {t(
+ "Changing or removing credentials does not stop or delete Railway VMs. They can keep accruing charges. Stop active bot sessions, then open your environment in the Railway dashboard and destroy any VMs you no longer need before removing access. If you are rotating a token, keep access to the same environment to reconnect to existing VMs. Akeru preserves saved VM identities and will not silently create replacements.",
+ )}
+ </DialogDescription>
+ </DialogHeader>
+ <a
+ href="https://railway.com/dashboard"
+ target="_blank"
+ rel="noreferrer"
+ className="text-sm underline"
+ >
+ {t("Open Railway dashboard")}
+ </a>
+ {error ? (
+ <p role="alert" className="text-sm text-destructive">
+ {error}
+ </p>
+ ) : null}
+ <DialogFooter>
+ <Button variant="outline" disabled={saving} onClick={() => setRailwayChange(null)}>
+ {t("Cancel")}
+ </Button>
+ <Button
+ disabled={saving}
+ onClick={async () => {
+ if (
+ railwayChange &&
+ (await persist(applyRailwayConnectionChange(sandbox, railwayChange)))
+ ) {
+ setRailwayChange(null);
+ closeConnection();
+ }
+ }}
+ >
+ {t("I have reviewed my VMs — continue")}
+ </Button>
+ </DialogFooter>
+ </DialogPopup>
+ </Dialog>
</>
);
}
diff --git a/docs/internals/railway-workspaces.md b/docs/internals/railway-workspaces.md
new file mode 100644
index 000000000..8d897eed9
--- /dev/null
+++ b/docs/internals/railway-workspaces.md
@@ -0,0 +1,17 @@
+# Railway workspace adapter
+
+`apps/server/src/provider/botWorkspace.ts` uses the official `railway` SDK. Creation and saved-ID reattachment receive explicit `RAILWAY_API_TOKEN` and `RAILWAY_ENVIRONMENT_ID` values from the environment's sandbox settings, not ambient process credentials. The token follows the existing secret-store and client-redaction path.
+
+The shared identity file persists the Railway sandbox ID. Reattachment uses `Sandbox.connect` and verifies live status; unavailable identities fail closed without creating a replacement. `refresh` maps running, creating, and terminal states to the existing workspace state model. Only `SandboxNotFoundError` is converted to missing; authorization and network failures propagate.
+
+Railway identity hashes exclude the credential fingerprint while pool keys retain it. Rotating credentials creates a fresh SDK client but reconnects to the same saved VM, including after a server restart. Changing environments or revoking access fails closed rather than abandoning the old identity and creating a second billable VM. Settings requires explicit acknowledgement of the Railway-dashboard retirement path before replacing or removing existing credentials; this is not automatic remote cleanup.
+
+Railway has no SDK pause/resume operation. Workspace-pool release is therefore nondestructive: sleep is a no-op, wake verifies the VM is running, and destroy deletes the VM before the shared wrapper removes its identity file. Disk checkpoints are a Railway capability, not a substitute for pause/resume: restoring one creates a different VM and cannot transparently preserve the saved identity. No checkpoint API is added to the common workspace contract.
+
+Commands use the existing shell quoting and map cwd, environment, and millisecond timeouts to SDK options. A null exit code is treated as failure, never successful execution.
+
+Browser endpoint resolution fails explicitly because Railway previews require CLI tunnels. Private network addresses must not be returned as client-accessible preview URLs. There is no automatic tunnel process or local/remote origin assumption in this adapter.
+
+Browser-dependent MCP connectors are rejected before a Railway workspace lease is acquired, so unsupported browser setup cannot invoke destructive acquisition-failure cleanup on a durable VM.
+
+Railway session-setup and workspace-wake failures never destroy the VM. Multiple credential-scoped clients may refer to one durable identity, so a failed new client must not invalidate another active session. Explicit workspace destruction remains destructive. The retirement confirmation stores only a Railway save/disconnect action and applies it to current settings, preserving unrelated changes received while the dialog is open.
diff --git a/docs/user/railway-sandboxes.md b/docs/user/railway-sandboxes.md
new file mode 100644
index 000000000..12497bc02
--- /dev/null
+++ b/docs/user/railway-sandboxes.md
@@ -0,0 +1,21 @@
+# Railway workspaces
+
+Connect Railway in Settings → Sandboxes with a Railway API token and environment ID, then select Railway for your bot's workspace. The environment must have Railway Sandboxes access.
+
+Railway workspaces are durable Linux VMs. Akeru saves the VM identity and reconnects to the same VM for later sessions. If that VM is deleted or unavailable, Akeru reports an error rather than silently replacing its files.
+
+Railway does not offer pause/resume through its SDK. An idle bot leaves its VM running, so resource charges can continue until the workspace is destroyed. Destroying the workspace deletes the VM and clears Akeru's saved identity.
+
+Before disconnecting Railway or changing access, stop active bot sessions and open your environment in the [Railway dashboard](https://railway.com/dashboard). Destroy any VMs you no longer need there. Disconnecting credentials in Akeru is not VM cleanup: VMs can continue accruing charges. Settings asks you to review these VMs before proceeding. When rotating a token, retain access to the same environment; Akeru reconnects to the saved VM with the new credentials. A different or inaccessible environment produces an error instead of silently creating a second VM.
+
+Deleting a bot does not delete its Railway VM, just as switching the bot to another sandbox does not. Before you delete a bot that has used Railway, stop its sessions and destroy its VM in the Railway dashboard if you no longer need it.
+
+## Networking and previews
+
+Railway supports private networking, but a private VM address is not a browser preview URL. Previews require a Railway CLI tunnel. Akeru does not automatically create these tunnels and cannot route its bot browser to a Railway workspace; browser requests report this limitation instead of returning an inaccessible address. Use Railway's CLI to establish a tunnel when you need to inspect a preview manually.
+
+Disable browser-dependent connectors before starting a Railway bot. Akeru rejects these connectors before opening the workspace, preserving the VM and its saved identity.
+
+Railway also supports disk checkpoints through its SDK. Akeru does not currently expose Railway checkpoint creation or restoration, and does not use checkpoints to simulate sleeping a VM.
+
+See the [official Railway SDK](https://github.com/railwayapp/railway-ts-sdk) and [sandbox capability comparison](https://sandbox-sdk.app/docs/providers).
diff --git a/docs/user/sandboxes.md b/docs/user/sandboxes.md
index a25b4b29c..f792362b4 100644
--- a/docs/user/sandboxes.md
+++ b/docs/user/sandboxes.md
@@ -1,6 +1,6 @@
# Configure sandboxes
-Open **Settings > Sandbox** to connect E2B, Daytona, Vercel Sandbox, Upstash Box, or Tenki. Local workspaces
+Open **Settings > Sandbox** to connect E2B, Daytona, Vercel Sandbox, Upstash Box, Tenki, or Railway. Local workspaces
need no credential and are always available.
Tenki runs coding agents in full Linux VMs and supports public previews, disk and memory snapshots,
@@ -24,9 +24,14 @@ so connect that service before you start the bot.
## Session behavior
-Akeru pauses remote sandboxes while bots are idle and reconnects to the saved provider workspace when
+Akeru pauses remote sandboxes other than Railway while bots are idle and reconnects to the saved provider workspace when
bot work resumes.
If a remote pause fails, Akeru keeps the workspace and retries the pause while it remains idle.
+Railway VMs remain running while idle and can continue accruing charges. Connect with a
+`RAILWAY_API_TOKEN` and `RAILWAY_ENVIRONMENT_ID`. Previews require a Railway CLI tunnel;
+Akeru cannot attach its sandbox browser. See [Railway workspaces](railway-sandboxes.md)
+for credential rotation and VM cleanup.
+
Changing a provider credential replaces active sessions that use the connection. A running session
cannot continue with the old credential.
diff --git a/packages/client-runtime/src/i18n/__snapshots__/coverage.test.ts.snap b/packages/client-runtime/src/i18n/__snapshots__/coverage.test.ts.snap
index 476832de8..6b57ce1db 100644
--- a/packages/client-runtime/src/i18n/__snapshots__/coverage.test.ts.snap
+++ b/packages/client-runtime/src/i18n/__snapshots__/coverage.test.ts.snap
@@ -2,7 +2,7 @@
exports[`discovered interface message coverage > covers static calls and finite label sources without translating identifiers 1`] = `
{
- "directMessageCount": 1848,
+ "directMessageCount": 1852,
"expressions": {
"apps/mobile/src/components/DictationControls.tsx": [
"announcements[status]);",
diff --git a/packages/client-runtime/src/i18n/index.ts b/packages/client-runtime/src/i18n/index.ts
index a5e158df7..e123893c1 100644
--- a/packages/client-runtime/src/i18n/index.ts
+++ b/packages/client-runtime/src/i18n/index.ts
@@ -11,6 +11,17 @@ export const availableLanguages = [
] as const;
export const englishCatalog = {
+ "Retire Railway VMs before changing access": "Retire Railway VMs before changing access",
+ "Open Railway dashboard": "Open Railway dashboard",
+ "I have reviewed my VMs — continue": "I have reviewed my VMs — continue",
+ "Changing or removing credentials does not stop or delete Railway VMs. They can keep accruing charges. Stop active bot sessions, then open your environment in the Railway dashboard and destroy any VMs you no longer need before removing access. If you are rotating a token, keep access to the same environment to reconnect to existing VMs. Akeru preserves saved VM identities and will not silently create replacements.":
+ "Changing or removing credentials does not stop or delete Railway VMs. They can keep accruing charges. Stop active bot sessions, then open your environment in the Railway dashboard and destroy any VMs you no longer need before removing access. If you are rotating a token, keep access to the same environment to reconnect to existing VMs. Akeru preserves saved VM identities and will not silently create replacements.",
+ "API token": "API token",
+ "Environment ID": "Environment ID",
+ "Run bots in a durable Railway VM. Idle VMs keep running and can incur charges. Previews require a Railway CLI tunnel.":
+ "Run bots in a durable Railway VM. Idle VMs keep running and can incur charges. Previews require a Railway CLI tunnel.",
+ "Akeru pauses idle remote sandboxes when supported. Railway VMs keep running until cleanup.":
+ "Akeru pauses idle remote sandboxes when supported. Railway VMs keep running until cleanup.",
"API key": "API key",
Actions: "Actions",
"Add Environment": "Add Environment",
diff --git a/packages/client-runtime/src/i18n/zh-CN.ts b/packages/client-runtime/src/i18n/zh-CN.ts
index ca8a5f9a4..50996415b 100644
--- a/packages/client-runtime/src/i18n/zh-CN.ts
+++ b/packages/client-runtime/src/i18n/zh-CN.ts
@@ -1,6 +1,17 @@
import type { TranslationCatalog } from "./index.ts";
export const zhCNCatalog: TranslationCatalog = {
+ "API token": "API 令牌",
+ "Environment ID": "环境 ID",
+ "Run bots in a durable Railway VM. Idle VMs keep running and can incur charges. Previews require a Railway CLI tunnel.":
+ "在持久化的 Railway 虚拟机中运行机器人。空闲虚拟机会继续运行并可能产生费用。预览需要 Railway CLI 隧道。",
+ "Akeru pauses idle remote sandboxes when supported. Railway VMs keep running until cleanup.":
+ "在支持的情况下,Akeru 会暂停空闲的远程沙箱。Railway 虚拟机会持续运行,直到被清理。",
+ "Retire Railway VMs before changing access": "更改访问权限前请清理 Railway 虚拟机",
+ "Open Railway dashboard": "打开 Railway 控制台",
+ "I have reviewed my VMs — continue": "我已检查虚拟机 — 继续",
+ "Changing or removing credentials does not stop or delete Railway VMs. They can keep accruing charges. Stop active bot sessions, then open your environment in the Railway dashboard and destroy any VMs you no longer need before removing access. If you are rotating a token, keep access to the same environment to reconnect to existing VMs. Akeru preserves saved VM identities and will not silently create replacements.":
+ "更改或移除凭据不会停止或删除 Railway 虚拟机,它们可能继续产生费用。请先停止活动的机器人会话,然后在 Railway 控制台中打开环境,并在移除访问权限前销毁不再需要的虚拟机。如果正在轮换令牌,请保留对同一环境的访问权限,以便重新连接现有虚拟机。Akeru 会保留已保存的虚拟机标识,不会自动创建替代虚拟机。",
"API key": "API 密钥",
Actions: "操作",
"Add Environment": "添加环境",
diff --git a/packages/client-runtime/src/state/computerViewer.ts b/packages/client-runtime/src/state/computerViewer.ts
index 46d28318b..847f9eeac 100644
--- a/packages/client-runtime/src/state/computerViewer.ts
+++ b/packages/client-runtime/src/state/computerViewer.ts
@@ -269,6 +269,7 @@ export const COMPUTER_SANDBOX_CAPABILITY: Readonly<
daytona: { graphical: true },
vercel: { graphical: false },
upstash: { graphical: false },
+ railway: { graphical: false },
tenki: { graphical: false },
};
diff --git a/packages/contracts/src/analytics.test.ts b/packages/contracts/src/analytics.test.ts
index 7a3a6b567..3cf180656 100644
--- a/packages/contracts/src/analytics.test.ts
+++ b/packages/contracts/src/analytics.test.ts
@@ -52,11 +52,18 @@ const rejects = (input: unknown) => expect(() => decodeUsage3hEvent(input)).toTh
describe("Usage3hEvent", () => {
it("accepts the fixed anonymous aggregate payload", () => {
expect(decodeUsage3hEvent(event)).toEqual(event);
- expect(USAGE_3H_COUNTER_KEYS).toHaveLength(95);
+ expect(USAGE_3H_COUNTER_KEYS).toHaveLength(96);
});
it("accepts current remote sandboxes and rejects the retired hosted sandbox", () => {
- for (const sandbox_provider of ["e2b", "daytona", "vercel", "upstash", "tenki"] as const) {
+ for (const sandbox_provider of [
+ "e2b",
+ "daytona",
+ "vercel",
+ "upstash",
+ "railway",
+ "tenki",
+ ] as const) {
expect(
decodeUsage3hEvent({
...event,
@@ -80,12 +87,15 @@ describe("Usage3hEvent", () => {
).toBe(0);
});
- it("defaults pre-Tenki queued counters without changing event identity", () => {
- const properties = Object.fromEntries(
- Object.entries(event.properties).filter(([key]) => key !== "sandbox_turns_tenki"),
- );
- expect(decodeUsage3hEvent({ ...event, properties })).toEqual(event);
- });
+ it.each(["sandbox_turns_tenki", "sandbox_turns_railway"])(
+ "defaults queued %s counters without changing event identity",
+ (counter) => {
+ const properties = Object.fromEntries(
+ Object.entries(event.properties).filter(([key]) => key !== counter),
+ );
+ expect(decodeUsage3hEvent({ ...event, properties })).toEqual(event);
+ },
+ );
it.each([-1, 1.5, USAGE_3H_COUNTER_MAX + 1, "1", null])(
"rejects invalid Tenki counter %s",
diff --git a/packages/contracts/src/analytics.ts b/packages/contracts/src/analytics.ts
index 09c26073e..c0501b3fe 100644
--- a/packages/contracts/src/analytics.ts
+++ b/packages/contracts/src/analytics.ts
@@ -33,6 +33,7 @@ export const USAGE_SANDBOX_IDS = [
"vercel",
"akeru_cloud",
"upstash",
+ "railway",
"tenki",
"other",
] as const;
@@ -169,6 +170,7 @@ export const UsageSandboxProvider = Schema.Literals([
"daytona",
"vercel",
"upstash",
+ "railway",
"tenki",
"mixed",
"other",
@@ -178,6 +180,7 @@ export type UsageSandboxProvider = typeof UsageSandboxProvider.Type;
const UsageCounters = Schema.Struct({
...Object.fromEntries(USAGE_3H_COUNTER_KEYS.map((key) => [key, UsageCounter])),
sandbox_turns_tenki: UsageCounter.pipe(Schema.withDecodingDefault(Effect.succeed(0))),
+ sandbox_turns_railway: UsageCounter.pipe(Schema.withDecodingDefault(Effect.succeed(0))),
new_installations: Schema.Int.check(Schema.isBetween({ minimum: 0, maximum: 1 })).pipe(
Schema.withDecodingDefault(Effect.succeed(0)),
),
diff --git a/packages/contracts/src/botConfig.test.ts b/packages/contracts/src/botConfig.test.ts
index 9b7568b8c..4d14d4ee3 100644
--- a/packages/contracts/src/botConfig.test.ts
+++ b/packages/contracts/src/botConfig.test.ts
@@ -41,7 +41,15 @@ describe("BotUsageCap", () => {
});
it("accepts cloud sandbox providers on bot events", () => {
- for (const sandbox of ["local", "e2b", "daytona", "vercel", "upstash", "tenki"] as const) {
+ for (const sandbox of [
+ "local",
+ "e2b",
+ "daytona",
+ "vercel",
+ "upstash",
+ "railway",
+ "tenki",
+ ] as const) {
expect(
decodeCreated({
botId: "bot-sandbox",
diff --git a/packages/contracts/src/orchestration.ts b/packages/contracts/src/orchestration.ts
index e4b9fc340..6e6f7e885 100644
--- a/packages/contracts/src/orchestration.ts
+++ b/packages/contracts/src/orchestration.ts
@@ -381,6 +381,7 @@ export const BotSandbox = Schema.Literals([
"daytona",
"vercel",
"upstash",
+ "railway",
"tenki",
]);
export type BotSandbox = typeof BotSandbox.Type;
diff --git a/packages/contracts/src/settings.test.ts b/packages/contracts/src/settings.test.ts
index e2d11d06b..784a1dc39 100644
--- a/packages/contracts/src/settings.test.ts
+++ b/packages/contracts/src/settings.test.ts
@@ -305,6 +305,7 @@ describe("ServerSettings sandbox providers", () => {
daytona: { environment: [] },
vercel: { environment: [] },
upstash: { environment: [] },
+ railway: { environment: [] },
tenki: { environment: [] },
},
});
diff --git a/packages/contracts/src/settings.ts b/packages/contracts/src/settings.ts
index 864a5f436..0b750f881 100644
--- a/packages/contracts/src/settings.ts
+++ b/packages/contracts/src/settings.ts
@@ -664,7 +664,14 @@ export const SandboxProvider = BotSandbox;
export type SandboxProvider = BotSandbox;
export type CloudSandboxProvider = Exclude<SandboxProvider, "local">;
-export const CLOUD_SANDBOX_PROVIDERS = ["e2b", "daytona", "vercel", "upstash", "tenki"] as const;
+export const CLOUD_SANDBOX_PROVIDERS = [
+ "e2b",
+ "daytona",
+ "vercel",
+ "upstash",
+ "railway",
+ "tenki",
+] as const;
export const SANDBOX_PROVIDER_CREDENTIALS = {
e2b: [{ name: "E2B_API_KEY", sensitive: true }],
daytona: [{ name: "DAYTONA_API_KEY", sensitive: true }],
@@ -674,6 +681,10 @@ export const SANDBOX_PROVIDER_CREDENTIALS = {
{ name: "VERCEL_PROJECT_ID", sensitive: false },
],
upstash: [{ name: "UPSTASH_BOX_API_KEY", sensitive: true }],
+ railway: [
+ { name: "RAILWAY_API_TOKEN", sensitive: true },
+ { name: "RAILWAY_ENVIRONMENT_ID", sensitive: false },
+ ],
tenki: [{ name: "TENKI_API_KEY", sensitive: true }],
} as const satisfies Readonly<
Record<
@@ -699,6 +710,7 @@ export const SandboxSettings = Schema.Struct({
daytona: SandboxProviderConnection,
vercel: SandboxProviderConnection,
upstash: SandboxProviderConnection,
+ railway: SandboxProviderConnection,
tenki: SandboxProviderConnection,
}).pipe(Schema.withDecodingDefault(Effect.succeed({}))),
}).pipe(Schema.withDecodingDefault(Effect.succeed({})));
@@ -1012,6 +1024,7 @@ const SandboxSettingsPatch = Schema.Struct({
daytona: Schema.optionalKey(SandboxProviderConnectionPatch),
vercel: Schema.optionalKey(SandboxProviderConnectionPatch),
upstash: Schema.optionalKey(SandboxProviderConnectionPatch),
+ railway: Schema.optionalKey(SandboxProviderConnectionPatch),
tenki: Schema.optionalKey(SandboxProviderConnectionPatch),
}),
),
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index e150609d0..25a4be036 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -111,7 +111,7 @@ importers:
version: 7.0.0-dev.20260604.1
vite-plus:
specifier: 'catalog:'
apps/desktop:
dependencies:
@@ -175,7 +175,7 @@ importers:
version: 4.3.0
vite-plus:
specifier: 'catalog:'
apps/marketing:
dependencies:
@@ -184,7 +184,7 @@ importers:
version: 0.3.0([email protected])
astro:
specifier: ^7.0.3
devDependencies:
'@astrojs/check':
specifier: ^0.9.7
@@ -553,6 +553,9 @@ importers:
pngjs:
specifier: 7.0.0
version: 7.0.0
+ railway:
+ specifier: 3.11.0
+ version: 3.11.0
yaml:
specifier: ^2.9.0
version: 2.9.0
@@ -592,7 +595,7 @@ importers:
version: link:../../packages/effect-codex-app-server
vite-plus:
specifier: 'catalog:'
apps/web:
dependencies:
@@ -752,13 +755,13 @@ importers:
version: 4.0.0-beta.103(patch_hash=a16b1e870d8c29e4a98b17cc4c638a4ff471753d8ca3487f78a22b759caf951b)([email protected](patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6))
'@rolldown/plugin-babel':
specifier: ^0.2.0
'@tailwindcss/vite':
specifier: ^4.0.0
'@tanstack/router-plugin':
specifier: ^1.161.0
'@types/babel__core':
specifier: ^7.20.5
version: 7.20.5
@@ -785,7 +788,7 @@ importers:
version: 0.3.0
'@vitejs/plugin-react':
specifier: ^6.0.0
babel-plugin-react-compiler:
specifier: 1.0.0
version: 1.0.0
@@ -806,10 +809,10 @@ importers:
version: 4.3.0
vite:
specifier: npm:@voidzero-dev/[email protected]
vite-plus:
specifier: 'catalog:'
infra/feedback:
dependencies:
@@ -818,7 +821,7 @@ importers:
version: link:../../packages/contracts
alchemy:
specifier: 2.0.0-beta.65
- version: 2.0.0-beta.65(e68f28a6469d89012c3f6d03370f8faf)
+ version: 2.0.0-beta.65(8a463698b208659c65413392553a4c43)
effect:
specifier: 4.0.0-beta.103
version: 4.0.0-beta.103(patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6)
@@ -834,7 +837,7 @@ importers:
version: 24.12.4
vite-plus:
specifier: 'catalog:'
oxlint-plugin-akeru:
dependencies:
@@ -853,7 +856,7 @@ importers:
version: 4.0.0-beta.103(patch_hash=a16b1e870d8c29e4a98b17cc4c638a4ff471753d8ca3487f78a22b759caf951b)([email protected](patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6))
vite-plus:
specifier: 'catalog:'
packages/client-runtime:
dependencies:
@@ -872,7 +875,7 @@ importers:
version: 4.0.0-beta.103(patch_hash=a16b1e870d8c29e4a98b17cc4c638a4ff471753d8ca3487f78a22b759caf951b)([email protected](patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6))
vite-plus:
specifier: 'catalog:'
packages/contracts:
dependencies:
@@ -885,7 +888,7 @@ importers:
version: 4.0.0-beta.103(patch_hash=a16b1e870d8c29e4a98b17cc4c638a4ff471753d8ca3487f78a22b759caf951b)([email protected](patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6))
vite-plus:
specifier: 'catalog:'
packages/effect-acp:
dependencies:
@@ -907,7 +910,7 @@ importers:
version: 24.12.4
vite-plus:
specifier: 'catalog:'
packages/effect-codex-app-server:
dependencies:
@@ -929,7 +932,7 @@ importers:
version: 24.12.4
vite-plus:
specifier: 'catalog:'
packages/shared:
dependencies:
@@ -954,7 +957,7 @@ importers:
version: 24.12.4
vite-plus:
specifier: 'catalog:'
packages/ssh:
dependencies:
@@ -979,7 +982,7 @@ importers:
version: 24.12.4
vite-plus:
specifier: 'catalog:'
packages/tailscale:
dependencies:
@@ -1001,7 +1004,7 @@ importers:
version: 24.12.4
vite-plus:
specifier: 'catalog:'
scripts:
dependencies:
@@ -1047,7 +1050,7 @@ importers:
version: 6.0.5
vite-plus:
specifier: 'catalog:'
packages:
@@ -3359,6 +3362,11 @@ packages:
'@modelcontextprotocol/sdk':
optional: true
+ '@graphql-typed-document-node/[email protected]':
+ resolution: {integrity: sha512-mB9oAsNCm9aM3/SOv4YtBMqZbYj10R7dkq8byBqxGY/ncFwhf2oQzMV+LCRlWoDSEBJ3COiR1yeDvMtsoOsuFQ==}
+ peerDependencies:
+ graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0
+
resolution: {integrity: sha512-k9Dj3DV/itK9D06Y8f190Qgop7/Ui+D0njFV3LHMPwPT75DpXLQohE9Wmz0QElrJnzsjB7KPWiKJbOl7IPDArQ==}
engines: {node: '>=12.10.0'}
@@ -11795,6 +11803,11 @@ packages:
resolution: {integrity: sha512-tQkJl2GRWh83ui2DiPTJz9wEiMN20syf+5oKfB03yYP7ioZcJwsIK8FjrtLwH1m7C7e+Tt2yYBlrOpdT+dyeIQ==}
+ resolution: {integrity: sha512-ehLFHCxV+gITWeBlIVaXulXaVRg4LCxqm0bq64iXSwYL1DESd0pUeLYMP/BMBhnZWeFFBYyJCREaq+Nka7Wgmw==}
+ engines: {node: '>=22'}
+ hasBin: true
+
resolution: {integrity: sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==}
engines: {node: '>= 0.6'}
@@ -12978,6 +12991,11 @@ packages:
resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==}
+ resolution: {integrity: sha512-Yiex1Ovn8z2xPpOWckIiysV1SSyRMY9BkLF++q0yKiDxCqRhosKfMg3janKkiLBwZ5c/YryloKwGZcrEmtwxKw==}
+ engines: {node: '>=18.0.0'}
+ hasBin: true
+
resolution: {integrity: sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==}
@@ -15810,14 +15828,14 @@ snapshots:
'@distilled.cloud/core': 0.30.2([email protected](patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6))
effect: 4.0.0-beta.103(patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6)
dependencies:
'@cloudflare/unenv-preset': 2.16.1([email protected])([email protected])
magic-string: 0.30.21
unenv: 2.0.0-rc.24
optionalDependencies:
rolldown: 1.1.5
transitivePeerDependencies:
- workerd
@@ -15831,13 +15849,13 @@ snapshots:
'@effect/platform-bun': 4.0.0-beta.103([email protected])([email protected](patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6))([email protected])
'@effect/platform-node': 4.0.0-beta.103([email protected])([email protected](patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6))([email protected])([email protected])
- '@distilled.cloud/[email protected](6093597ae904d08741e8e8ac3f08a6e5)':
+ '@distilled.cloud/[email protected](02213f3e14cc89c9c7e74c32cc3df084)':
dependencies:
'@distilled.cloud/cloudflare': 0.30.2([email protected](patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6))
'@distilled.cloud/cloudflare-runtime': 0.13.10(@distilled.cloud/[email protected]([email protected](patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6)))(@effect/[email protected]([email protected])([email protected](patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6))([email protected]))(@effect/[email protected]([email protected])([email protected](patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6))([email protected])([email protected]))([email protected](patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6))
effect: 4.0.0-beta.103(patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6)
optionalDependencies:
'@effect/platform-bun': 4.0.0-beta.103([email protected])([email protected](patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6))([email protected])
'@effect/platform-node': 4.0.0-beta.103([email protected])([email protected](patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6))([email protected])([email protected])
@@ -17003,6 +17021,10 @@ snapshots:
- supports-color
- utf-8-validate
+ '@graphql-typed-document-node/[email protected]([email protected])':
+ dependencies:
+ graphql: 16.14.1
+
dependencies:
'@grpc/proto-loader': 0.8.1
@@ -19469,7 +19491,7 @@ snapshots:
'@rolldown/[email protected]':
optional: true
dependencies:
'@babel/core': 7.29.7
picomatch: 4.0.4
@@ -19477,7 +19499,7 @@ snapshots:
optionalDependencies:
'@babel/plugin-transform-runtime': 7.29.7(@babel/[email protected])
'@babel/runtime': 7.29.7
'@rolldown/[email protected]':
optional: true
@@ -19959,12 +19981,12 @@ snapshots:
'@tailwindcss/oxide-win32-arm64-msvc': 4.3.0
'@tailwindcss/oxide-win32-x64-msvc': 4.3.0
dependencies:
'@tailwindcss/node': 4.3.0
'@tailwindcss/oxide': 4.3.0
tailwindcss: 4.3.0
'@tanstack/[email protected]': {}
@@ -20025,7 +20047,7 @@ snapshots:
transitivePeerDependencies:
- supports-color
dependencies:
'@babel/core': 7.29.7
'@babel/plugin-syntax-jsx': 7.29.7(@babel/[email protected])
@@ -20042,7 +20064,7 @@ snapshots:
zod: 4.4.3
optionalDependencies:
'@tanstack/react-router': 1.170.10([email protected]([email protected]))([email protected])
transitivePeerDependencies:
- supports-color
@@ -20523,36 +20545,36 @@ snapshots:
- bare-abort-controller
- react-native-b4a
dependencies:
'@rolldown/pluginutils': 1.0.1
optionalDependencies:
babel-plugin-react-compiler: 1.0.0
dependencies:
'@testing-library/dom': 10.4.1
'@testing-library/user-event': 14.6.1(@testing-library/[email protected])
transitivePeerDependencies:
- bufferutil
- msw
- utf-8-validate
- vite
dependencies:
'@blazediff/core': 1.9.1
'@vitest/utils': 4.1.9
magic-string: 0.30.21
pngjs: 7.0.0
sirv: 3.0.2
tinyrainbow: 3.1.0
transitivePeerDependencies:
- bufferutil
@@ -20569,14 +20591,14 @@ snapshots:
chai: 6.2.2
tinyrainbow: 3.1.0
dependencies:
'@vitest/spy': 4.1.9
estree-walker: 3.0.3
magic-string: 0.30.21
optionalDependencies:
msw: 2.12.11(@types/[email protected])([email protected])
'@vitest/[email protected]':
dependencies:
@@ -20604,7 +20626,7 @@ snapshots:
'@vladfrangu/[email protected]': {}
dependencies:
'@oxc-project/runtime': 0.138.0
'@oxc-project/types': 0.138.0
@@ -20616,6 +20638,7 @@ snapshots:
fsevents: 2.3.3
jiti: 2.7.0
terser: 5.48.0
+ tsx: 4.23.15
typescript: 6.0.3
unrun: 0.2.39
yaml: 2.9.0
@@ -20908,7 +20931,7 @@ snapshots:
json-schema-traverse: 1.0.0
require-from-string: 2.0.2
- [email protected](e68f28a6469d89012c3f6d03370f8faf):
+ [email protected](8a463698b208659c65413392553a4c43):
dependencies:
'@alchemy.run/node-utils': 0.0.5
'@aws-sdk/credential-providers': 3.1062.0
@@ -20916,9 +20939,9 @@ snapshots:
'@distilled.cloud/aws': 0.30.2([email protected](patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6))
'@distilled.cloud/axiom': 0.30.2([email protected](patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6))
'@distilled.cloud/cloudflare': 0.30.2([email protected](patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6))
'@distilled.cloud/cloudflare-runtime': 0.13.10(@distilled.cloud/[email protected]([email protected](patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6)))(@effect/[email protected]([email protected])([email protected](patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6))([email protected]))(@effect/[email protected]([email protected])([email protected](patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6))([email protected])([email protected]))([email protected](patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6))
- '@distilled.cloud/cloudflare-vite-plugin': 0.13.10(6093597ae904d08741e8e8ac3f08a6e5)
+ '@distilled.cloud/cloudflare-vite-plugin': 0.13.10(02213f3e14cc89c9c7e74c32cc3df084)
'@distilled.cloud/core': 0.30.2([email protected](patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6))
'@distilled.cloud/neon': 0.30.2([email protected](patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6))
'@distilled.cloud/planetscale': 0.30.2([email protected](patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6))
@@ -20954,7 +20977,7 @@ snapshots:
'@effect/sql-pg': 4.0.0-beta.103([email protected](patch_hash=af36b7948b6f9c56623074662b51dade5699880c1a7c71245de73e13c3185fb6))
drizzle-kit: 1.0.0-rc.4
drizzle-orm: 1.0.0-rc.4(364f9547bd74875ecdea197c1b3898c3)
transitivePeerDependencies:
- '@mongodb-js/zstd'
@@ -21123,7 +21146,7 @@ snapshots:
dependencies:
tslib: 2.8.1
dependencies:
'@astrojs/compiler-rs': 0.2.3(@emnapi/[email protected])(@emnapi/[email protected])
'@astrojs/internal-helpers': 0.10.0
@@ -21176,8 +21199,8 @@ snapshots:
unist-util-visit: 5.1.0
vfile: 6.0.3
xxhash-wasm: 1.1.0
yargs-parser: 22.0.0
zod: 4.4.3
@@ -26085,7 +26108,7 @@ snapshots:
dependencies:
tinypool: 2.1.0
optionalDependencies:
@@ -26108,7 +26131,7 @@ snapshots:
'@oxfmt/binding-win32-arm64-msvc': 0.57.0
'@oxfmt/binding-win32-ia32-msvc': 0.57.0
'@oxfmt/binding-win32-x64-msvc': 0.57.0
optionalDependencies:
@@ -26119,7 +26142,7 @@ snapshots:
'@oxlint-tsgolint/win32-arm64': 0.24.0
'@oxlint-tsgolint/win32-x64': 0.24.0
optionalDependencies:
'@oxlint/binding-android-arm-eabi': 1.72.0
'@oxlint/binding-android-arm64': 1.72.0
@@ -26141,7 +26164,7 @@ snapshots:
'@oxlint/binding-win32-ia32-msvc': 1.72.0
'@oxlint/binding-win32-x64-msvc': 1.72.0
oxlint-tsgolint: 0.24.0
@@ -26710,6 +26733,12 @@ snapshots:
+ dependencies:
+ '@graphql-typed-document-node/core': 3.2.0([email protected])
+ graphql: 16.14.1
+ tsx: 4.23.15
+
@@ -28350,6 +28379,12 @@ snapshots:
+ dependencies:
+ esbuild: 0.28.1
+ optionalDependencies:
+ fsevents: 2.3.3
+
dependencies:
safe-buffer: 5.2.1
@@ -28671,25 +28706,25 @@ snapshots:
'@types/unist': 3.0.3
vfile-message: 4.0.3
dependencies:
'@oxc-project/types': 0.138.0
'@oxlint/plugins': 1.68.0
'@vitest/expect': 4.1.9
'@vitest/pretty-format': 4.1.9
'@vitest/runner': 4.1.9
'@vitest/snapshot': 4.1.9
'@vitest/spy': 4.1.9
'@vitest/utils': 4.1.9
oxlint-tsgolint: 0.24.0
optionalDependencies:
'@voidzero-dev/vite-plus-darwin-arm64': 0.2.2
'@voidzero-dev/vite-plus-darwin-x64': 0.2.2
@@ -28729,7 +28764,7 @@ snapshots:
- utf-8-validate
- yaml
dependencies:
lightningcss: 1.33.0
picomatch: 4.0.7
@@ -28742,16 +28777,17 @@ snapshots:
fsevents: 2.3.3
jiti: 2.7.0
terser: 5.48.0
+ tsx: 4.23.15
yaml: 2.9.0
optionalDependencies:
dependencies:
'@vitest/expect': 4.1.9
'@vitest/pretty-format': 4.1.9
'@vitest/runner': 4.1.9
'@vitest/snapshot': 4.1.9
@@ -28768,12 +28804,12 @@ snapshots:
tinyexec: 1.2.4
tinyglobby: 0.2.17
tinyrainbow: 3.1.0
why-is-node-running: 2.3.0
optionalDependencies:
'@opentelemetry/api': 1.9.1
'@types/node': 24.12.4
transitivePeerDependencies:
- msw