Open-source Grok Bot alternative with a virtual machine that bots can use
TypeScript ai-agentsclaude-codecodexcomputer-usedockerelectrongrokgrok-botgrok-bot-alternativeself-hostedtypescript
Let each VPS bot pick a named server
Bugfixer 25a359d7d6b1a
diff --git a/apps/docs/content/docs/computers/byo-vps.mdx b/apps/docs/content/docs/computers/byo-vps.mdxindex dfc08b95f7..00d2e8f45e 100644--- a/apps/docs/content/docs/computers/byo-vps.mdx+++ b/apps/docs/content/docs/computers/byo-vps.mdx@@ -61,6 +61,16 @@ needed. In **Let it choose** (Auto), the per-bot**Start VPS automatically** switch permits creating or waking that container;leave it off to reuse only an already-ready VPS.+### More than one server++To keep bots on different servers, add each server under **Named servers** in+**App Settings → AI → Other services → Self-hosted VPS**: a name you choose and+its SSH config alias. A saved VPS bot then shows a server picker under+**Where … works**. Choose the default server, a named one, or **Other SSH+alias…** to type one that is not on the list, then press **Save**. A bot+cannot move while its computer still lives on the old server; remove that+computer first.+<Callout type="warn" title="Existing bots in 0.1.151 and 0.1.152">The Simple layout can hide this selector and show **Connect Boat first** evenwhen your SSH alias works. A connected alias alone does not change the bot’sdiff --git a/docs/byo-vps.md b/docs/byo-vps.mdindex d5b44ade01..ce1396d9c2 100644--- a/docs/byo-vps.md+++ b/docs/byo-vps.md@@ -102,6 +102,13 @@ that matters to that bot — provisioning, status checks, previews, screenshots,computer tools, and deletion cleanup. The Settings inventory spans every server in play and tags eachcomputer with the alias that holds it.+To pick servers from a list instead of typing aliases, add them under **Named servers** below the default alias+(Settings → AI → Other services → Self-hosted VPS): a name you choose plus its SSH config alias. Each saved VPS bot+then gets a server picker in Bot settings → Computer → Where … works: the default server, every named server, or+**Other SSH alias…** for one that is not on the list, then **Save**. The list is stored as `vpsServers` in `config.json`+(`[{ "name": "Home lab", "sshAlias": "home-lab" }]`); saving or removing an entry never moves a bot, and the+picker writes the same `vpsAlias` field. Only owner and admin sessions see the list.+A bot cannot be moved to another server while its computer still lives on the old one, and the default aliascannot change while any computer it manages still exists: remove the computer first from Settings → Local VM →Self-hosted VPS computers (or by hand: `docker -H ssh://old-server rm -f openmausbot-vps-<bot>-<hash>`). A serverdiff --git a/server/config.test.ts b/server/config.test.tsindex d0aefdb700..12cc042746 100644--- a/server/config.test.ts+++ b/server/config.test.ts@@ -530,6 +530,24 @@ describe("configuration boundaries", () => {expect(vpsSshAlias({ vps: { sshAlias: "-bad" } })).toBeNull();});+ it("keeps named VPS servers apart from the default and accepts only plain names and simple aliases", () => {+ const servers = [{ name: "Home lab", sshAlias: "home-lab" }, { name: "Office", sshAlias: "office.vps" }];+ expect(parseConfigPatch({ vpsServers: servers })).toEqual({ vpsServers: servers });+ expect(parseConfigPatch({ vpsServers: [{ name: " Home lab ", sshAlias: "home-lab" }] })).toEqual({ vpsServers: [{ name: "Home lab", sshAlias: "home-lab" }] });+ expect(() => parseConfigPatch({ vpsServers: [{ name: "Bad", sshAlias: "prod; reboot" }] })).toThrow("vpsServers");+ expect(() => parseConfigPatch({ vpsServers: [{ name: " ", sshAlias: "home-lab" }] })).toThrow("vpsServers");+ expect(() => parseConfigPatch({ vpsServers: [{ name: "Line\nbreak", sshAlias: "home-lab" }] })).toThrow("vpsServers");+ expect(() => parseConfigPatch({ vpsServers: [...servers, { name: "Again", sshAlias: "home-lab" }] })).toThrow("own SSH alias");+ expect(() => parseConfigPatch({ vpsServers: Array.from({ length: 21 }, (_, index) => ({ name: `S${index}`, sshAlias: `s${index}` })) })).toThrow("vpsServers");+ // A hand-edited bad entry is dropped on load, never the whole file.+ expect(parseStoredConfig({ vpsServers: [...servers, { name: "Bad", sshAlias: "-bad" }, "junk"] })).toEqual({ vpsServers: servers });+ expect(parseStoredConfig({ vpsServers: "home-lab" })).toEqual({});+ expect(parseStoredConfig({ vpsServers: Array.from({ length: 25 }, (_, index) => ({ name: `S${index}`, sshAlias: `s${index}` })) }).vpsServers).toHaveLength(20);+ expect(() => parseConfigPatch({ vpsServers: [{ name: "Lab\u202e", sshAlias: "home-lab" }] })).toThrow("vpsServers");+ expect(parseStoredConfig({ vpsServers: [...servers, { name: "Copy", sshAlias: "home-lab" }] })).toEqual({ vpsServers: servers });+ expect(parseStoredConfig({})).toEqual({});+ });+it("validates browserEngine.attachCdpUrl as a bare CDP port or an http(s)/ws(s) URL, and forwards it only when configured", () => {expect(parseStoredConfig({})).toEqual({});expect(browserEngineAttachCdpUrl({})).toBeNull();diff --git a/server/config.ts b/server/config.tsindex 41395a4310..dcbec96351 100644--- a/server/config.ts+++ b/server/config.ts@@ -10,6 +10,7 @@ import type { ImageGenerationConfig } from "../shared/image-generation.ts";import { imageGenConfigSchema, imageGenPatchSchema, keepKeysOutOfImageModels, type ImageGenCredentialPatch } from "./image-generation-config.ts";import { botAvatarUrlSchema } from "../shared/bot-avatar.ts";import { writeFileAtomic } from "./atomic.ts";+import { isValidSshAlias, normalizeVpsConfig, storedVpsServersSchema, vpsConfigSchema, vpsServersSchema, type VpsServer } from "./vps-config.ts";import { configBackupRefusal, configSaveRefusal, readConfigFile, writeConfigBackup } from "./config-backup.ts";import { defaultBotThreads, MAX_CONCURRENT_BOT_THREADS } from "./bot-thread-limits.ts";import { anthropicKeyEnv } from "./anthropic-key-env.ts";@@ -34,9 +35,9 @@ import { browserEngineConfigSchema, isValidCdpTarget, type BrowserEngineConfig }import { roomContextSettings } from "./room-context-settings.ts"; import { usageCapsSchema, type UsageCapsConfig } from "./usage-caps-config.ts";import { localVmConfigSchema } from "./local-vm-settings.ts";export * from "./local-vm-settings.ts";+export * from "./vps-config.ts";const optionalText = z.string().optional();-const SSH_ALIAS = /^[A-Za-z0-9][A-Za-z0-9_.-]{0,127}$/;const LEGACY_BROWSER_PROFILE_ID = /^[A-Za-z0-9_-]{1,40}$/;const BROWSER_PROFILE_ID = /^[a-z0-9_-]{1,40}$/;@@ -54,26 +55,6 @@ export const MAX_MCP_CALL_TIMEOUT_MINUTES = 60;export const MIN_THREAD_EVENT_LOG_BYTES = 256 * 1024;export const MAX_THREAD_EVENT_LOG_BYTES = 4 * 1024 * 1024 * 1024;-export function isValidSshAlias(value: unknown): value is string {- return typeof value === "string" && SSH_ALIAS.test(value);-}--export function normalizeVpsConfig(raw: unknown): { sshAlias?: string } {- if (raw === undefined || raw === null) return {};- if (!raw || typeof raw !== "object" || Array.isArray(raw)) {- throw new Error("vps must be an object containing an SSH config alias");- }- const alias = (raw as Record<string, unknown>).sshAlias;- if (alias === undefined || alias === "") return {};- if (!isValidSshAlias(alias)) {- throw new Error("vps.sshAlias must be a simple SSH config alias (letters, numbers, dot, dash, or underscore)");- }- return { sshAlias: alias };-}--const vpsConfigSchema = z.object({- sshAlias: z.string().refine((value) => value === "" || isValidSshAlias(value), { message: "must be a simple SSH config alias" }).optional(),-});const roomConfigSchema = z.object({turnTimeoutMinutes: z.number()@@ -364,6 +345,7 @@ const appConfigSchema = z.object({composio: z.object({ apiKey: optionalText, userId: optionalText, sessionId: optionalText }).optional(),box: z.object({ token: optionalText }).optional(),vps: vpsConfigSchema.optional(),+ vpsServers: vpsServersSchema.optional(),/** OpenCode key, plus `providerKeys` for its other providers by the env name OpenCode reads; both write-only and only for its child. */opencodeGo: z.object({ apiKey: optionalText, providerKeys: z.record(z.string(), z.string()).optional() }).optional(),/** `provider`: "elevenlabs" (default, `key`), "fish" (`fishKey`, `fishModel`), "system", "xai" (`xai.key`), "gemini" (`geminiKey`, `model`), "openai" (`openai.key`), "deepseek" (`deepseek.key`; it also hears dictation) or "chatterbox" (local; `baseUrl`, `model`). */@@ -418,6 +400,7 @@ const appConfigSchema = z.object({mcpServers: z.record(z.string(), z.unknown()).optional(),});const storedAppConfigSchema = appConfigSchema.extend(helperStoredShape).extend({+ vpsServers: storedVpsServersSchema,browserProfiles: storedBrowserProfilesSchema.optional(),/** Loose like mcpServers: a bad provider key is dropped later, never the whole file. */opencodeGo: z.object({@@ -472,6 +455,7 @@ export interface AppConfig extends HelperConfig {box?: { token?: string };/** A named host from the user's SSH config. Authentication stays with SSH. */vps?: { sshAlias?: string };+ vpsServers?: VpsServer[];opencodeGo?: { apiKey?: string; providerKeys?: Record<string, string> };tts?: { key?: string; fishKey?: string; geminiKey?: string; voice?: string; provider?: "elevenlabs" | "fish" | "system" | "chatterbox" | "xai" | "gemini" | "openai" | "deepseek"; baseUrl?: string; model?: string; fishModel?: FishTtsModel; everyReply?: boolean; hearWith?: "device" | "elevenlabs"; hearLanguage?: string };decider?: DeciderConfig;@@ -920,7 +904,8 @@ export function saveConfig(}keepImageModels();if (checkedPatch.vps !== undefined) disk.vps = normalizeVpsConfig(checkedPatch.vps);- for (const key of ["language", "computerName", "everyBotRules"] as const) if (checkedPatch[key] !== undefined) disk[key] = checkedPatch[key];+ // vpsServers is kept even when empty: the running config is updated by Object.assign, which cannot drop a key.+ for (const key of ["language", "computerName", "everyBotRules", "vpsServers"] as const) if (checkedPatch[key] !== undefined) disk[key] = checkedPatch[key];if (checkedPatch.customDomain !== undefined) disk.customDomain = checkedPatch.customDomain;if (checkedPatch.signIn !== undefined) disk.signIn = checkedPatch.signIn;// Replace the section so clearing a backup cannot revive the old selection.diff --git a/server/index.test.ts b/server/index.test.tsindex 3d8a00ca80..4b9b8b8524 100644--- a/server/index.test.ts+++ b/server/index.test.ts@@ -12435,9 +12435,15 @@ describe("harness HTTP API", () => {const saved = await api("PUT", "/api/config", { vps: { sshAlias: "production-vps" } });expect(saved.status).toBe(200);- expect(saved.body.vps).toEqual({ configured: true, sshAlias: "production-vps" });+ expect(saved.body.vps).toEqual({ configured: true, sshAlias: "production-vps", servers: [] });expect(JSON.stringify(saved.body)).not.toContain("privateKey");+ // Named servers are their own list: saving it leaves the default server alone.+ const named = await api("PUT", "/api/config", { vpsServers: [{ name: "Home lab", sshAlias: "home-lab" }] });+ expect(named.status, JSON.stringify(named.body)).toBe(200);+ expect(named.body.vps).toEqual({ configured: true, sshAlias: "production-vps", servers: [{ name: "Home lab", sshAlias: "home-lab" }] });+ expect((await api("PUT", "/api/config", { vpsServers: [{ name: "Bad", sshAlias: "prod; reboot" }] })).status).toBe(400);+const patched = await api("PATCH", `/api/bots/${bot.id}`, { cloudBackend: "vps" });expect(patched.status).toBe(200);expect(patched.body.bot.cloudBackend).toBe("vps");@@ -12471,7 +12477,7 @@ describe("harness HTTP API", () => {const memberStream = await openSse(`${BASE}/api/events`, { authorization: `Bearer ${memberToken}` });const ownerStream = await openSse(`${BASE}/api/events`);try {- expect((await asMember("GET", "/api/config")).body.vps).toEqual({ configured: true, sshAlias: "" });+ expect((await asMember("GET", "/api/config")).body.vps).toEqual({ configured: true, sshAlias: "", servers: [] });const listed = (await asMember("GET", "/api/bots?messages=0")).body.bots.find((candidate: any) => candidate.id === bot.id);expect(listed).toMatchObject({ id: bot.id, cloudBackend: "vps" });expect(listed).not.toHaveProperty("vpsAlias");@@ -12497,6 +12503,8 @@ describe("harness HTTP API", () => {expect(cleared.status, JSON.stringify(cleared.body)).toBe(200);expect(cleared.body.bot.vpsAlias).toBeUndefined();expect((await api("PATCH", "/api/config", { vps: { sshAlias: "" } })).status).toBe(200);+ const emptied = await api("PUT", "/api/config", { vpsServers: [] });+ expect(emptied.body.vps.servers).toEqual([]);});it("validates a Composio project key, creates a Session, and keeps externally stored secrets off disk", async () => {diff --git a/server/index.ts b/server/index.tsindex 596aea058e..8eefb28de1 100644--- a/server/index.ts+++ b/server/index.ts@@ -11633,7 +11633,7 @@ function configStatus() {configured: composio.configured(cfg), mode: composio.connectionMode(cfg),},box: { ...boat.describeBoatAccount(cfg), ...(boat.boatAccount(cfg)?.included ? {} : keyHint(cfg.box?.token)) },- vps: { configured: Boolean(vpsSshAlias(cfg)), sshAlias: vpsSshAlias(cfg) ?? "" },+ vps: { configured: Boolean(vpsSshAlias(cfg)), sshAlias: vpsSshAlias(cfg) ?? "", servers: cfg.vpsServers ?? [] },opencodeGo: { ...keyStatus(cfg.opencodeGo?.apiKey), providerKeys: Object.keys(openCodeProviderKeys(cfg)) },tts: tts.describeVoice(cfg),decider: describeDecider(cfg), helpers: describeHelpers(cfg),@@ -11701,7 +11701,7 @@ function configForAccess(status: ReturnType<typeof configStatus>, admin: boolean...withoutKeyHints(status),edition: { edition: status.edition.edition, features: status.edition.features },signIn: { admins: [], members: [] }, live: liveSettingsForClient(status.live), everyBotRules: undefined,- vps: { configured: status.vps.configured, sshAlias: "" },+ vps: { configured: status.vps.configured, sshAlias: "", servers: [] },opencodeGo: { configured: status.opencodeGo.configured, providerKeys: [] },...(CLOUD_TEAM ? { onboarding } : {}), profile: CLOUD_TEAM ? profile : { name: profile.name, email: "", ...(profile.avatarUrl ? { avatarUrl: profile.avatarUrl } : {}) },browserProfiles: status.browserProfiles.map((profile) => Object.fromEntries(Object.entries(profile).filter(([key]) => key !== "partitionId"))),diff --git a/server/remote-sessions.test.ts b/server/remote-sessions.test.tsindex fbdee4c803..eb0b3b846a 100644--- a/server/remote-sessions.test.ts+++ b/server/remote-sessions.test.ts@@ -128,6 +128,7 @@ beforeAll(async () => {instances: { fixture: { driver: "remote-session-test-shadow" } },profile: { name: "Security fixture", email: "[email protected]" },vps: { sshAlias: "fixture-private-host" },+ vpsServers: [{ name: "Fixture lab", sshAlias: "fixture-private-lab" }],browserProfiles: [{ id: "fixture", name: "Fixture browser", partitionId: "fixture-private-partition" }],}));child = spawn(process.execPath, [join(SERVER_DIR, "index.ts")], {@@ -511,7 +512,8 @@ describe("pairing", () => {expect(JSON.stringify(config)).not.toContain("last4");expect(config.opencodeGo).toEqual({ configured: false, providerKeys: [] });expect(config.profile).toEqual({ name: "Updated fixture", email: "" });- expect(config.vps).toEqual({ configured: true, sshAlias: "" });+ expect(config.vps).toEqual({ configured: true, sshAlias: "", servers: [] });+ expect(JSON.stringify(config)).not.toContain("fixture-private-lab");expect(config.browserProfiles).toEqual([{ id: "fixture", name: "Fixture browser" }]);}function expectAdminConfig(config: any) {@@ -519,7 +521,7 @@ describe("pairing", () => {expect(config.savedKeys.openaiLiveKey).toEqual({ configured: true, last4: "b2c3" });expect(config.opencodeGo).toEqual({ configured: false, providerKeys: ["VENICE_API_KEY"] });expect(config.profile).toEqual({ name: "Updated fixture", email: "[email protected]", aboutMe: "" });- expect(config.vps).toEqual({ configured: true, sshAlias: "fixture-private-host" });+ expect(config.vps).toEqual({ configured: true, sshAlias: "fixture-private-host", servers: [{ name: "Fixture lab", sshAlias: "fixture-private-lab" }] });expect(config.browserProfiles).toEqual([{ id: "fixture", name: "Fixture browser", partitionId: "fixture-private-partition" }]);}try {diff --git a/server/vps-config.ts b/server/vps-config.tsnew file mode 100644index 0000000000..ad24b91715--- /dev/null+++ b/server/vps-config.ts@@ -0,0 +1,43 @@+/** The self-hosted VPS settings: the default SSH alias (`vps`) and the named servers (`vpsServers`). */+import { z } from "zod";++const SSH_ALIAS = /^[A-Za-z0-9][A-Za-z0-9_.-]{0,127}$/;++export function isValidSshAlias(value: unknown): value is string {+ return typeof value === "string" && SSH_ALIAS.test(value);+}++export function normalizeVpsConfig(raw: unknown): { sshAlias?: string } {+ if (raw === undefined || raw === null) return {};+ if (!raw || typeof raw !== "object" || Array.isArray(raw)) {+ throw new Error("vps must be an object containing an SSH config alias");+ }+ const alias = (raw as Record<string, unknown>).sshAlias;+ if (alias === undefined || alias === "") return {};+ if (!isValidSshAlias(alias)) {+ throw new Error("vps.sshAlias must be a simple SSH config alias (letters, numbers, dot, dash, or underscore)");+ }+ return { sshAlias: alias };+}++export const vpsConfigSchema = z.object({+ sshAlias: z.string().refine((value) => value === "" || isValidSshAlias(value), { message: "must be a simple SSH config alias" }).optional(),+});+export const MAX_VPS_SERVERS = 20;+export interface VpsServer { name: string; sshAlias: string }+export const vpsServerSchema = z.object({+ name: z.string().trim().min(1).max(60).refine((value) => !/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]/u.test(value), { message: "must be plain text" }),+ sshAlias: z.string().refine(isValidSshAlias, { message: "must be a simple SSH config alias" }),+});+/** Named servers a bot can be put on; the default server stays in `vps`, so saving this list never moves a bot. */+export const vpsServersSchema = z.array(vpsServerSchema).max(MAX_VPS_SERVERS)+ .refine((servers) => new Set(servers.map((server) => server.sshAlias)).size === servers.length, { message: "each server needs its own SSH alias" });+/** Loose: a hand-edited bad or repeated entry is dropped, never the whole file. */+export const storedVpsServersSchema = z.unknown().optional().transform((servers) => {+ if (!Array.isArray(servers)) return undefined;+ const seen = new Set<string>();+ return servers.flatMap((server) => {+ const parsed = vpsServerSchema.safeParse(server);+ return parsed.success && !seen.has(parsed.data.sshAlias) && seen.add(parsed.data.sshAlias) ? [parsed.data] : [];+ }).slice(0, MAX_VPS_SERVERS);+});diff --git a/src/components/bot-settings/AccessSection.tsx b/src/components/bot-settings/AccessSection.tsxindex bff7ff6ec4..b9f3e99bec 100644--- a/src/components/bot-settings/AccessSection.tsx+++ b/src/components/bot-settings/AccessSection.tsx@@ -4,6 +4,7 @@ import { ChevronDown, ChevronRight, FolderOpen, Plus } from "lucide-react";import { api, type Bot } from "@/state/store";import { useBotEditor } from "./BotEditorContext";+import { VpsAliasField } from "./VpsAliasField";import { cn } from "@/lib/cn";import { t } from "@/lib/i18n";import type { LocaleKey } from "@/locales";@@ -35,7 +36,6 @@ import {} from "@/lib/connector-grants";import { inputCls } from "./field";import { openKeySettings } from "../keys/key-focus";-import { KeysLink } from "../keys/KeysLink";import type { ConnectorScope, ConnectorScopes } from "../../../shared/connector-scopes";import type { ConnectorAccount } from "@/lib/connector-status";import type { useBotSettingsDerived } from "./useBotSettingsDerived";@@ -558,70 +558,6 @@ export function cloudPreferenceShown(bot: Pick<Bot, "computer">, config: { cloudreturn (!bot.computer || bot.computer === "cloud") && !config?.cloudHome;}-/**- * A bot's own VPS server. PATCHed directly, not via updateBot: the server refuses- * a move while the bot's computer still lives on the old host.- */-export function VpsAliasField({ bot }: { bot: Bot }) {- const { request: api } = useBotEditor();- const state = useStoreSelector((s) => ({ config: s.config }), sameFields);- const defaultAlias = state.config?.vps?.sshAlias ?? "";- const [draft, setDraft] = useState<string | null>(null);- const [error, setError] = useState<string | null>(null);- // Set when the old server could not be reached: the move went ahead, and this says what may be left there.- const [notice, setNotice] = useState<string | null>(null);- const [saving, setSaving] = useState(false);- const save = async (alias: string | null) => {- setSaving(true);- setError(null);- setNotice(null);- try {- const saved = await api<{ notice?: string }>(`/api/bots/${bot.id}`, { method: "PATCH", body: JSON.stringify({ vpsAlias: alias }) });- setNotice(saved?.notice ?? null);- setDraft(null);- } catch (e) {- setError(e instanceof Error ? e.message : String(e));- } finally {- setSaving(false);- }- };- const value = draft ?? bot.vpsAlias ?? "";- return (- <div className="mt-3 rounded-lg bg-inset p-3">- <div className="text-[13px] text-ink">{t("botAccess.cloud.server")}</div>- <div className="mt-0.5 text-[12px] text-ink-secondary">- {defaultAlias- ? t("botAccess.cloud.serverDefault", { alias: defaultAlias })- : t("botAccess.cloud.serverNoDefault")} <KeysLink id="vps" />- </div>- <form- className="mt-2 flex items-center gap-2"- onSubmit={(e) => {- e.preventDefault();- void save(value.trim() || null);- }}- >- <input- className={cn(inputCls, "font-mono text-[13px]")}- placeholder={defaultAlias || t("botAccess.cloud.serverPlaceholder")}- value={value}- aria-label={t("botAccess.cloud.server")}- onChange={(e) => setDraft(e.target.value)}- />- <button- type="submit"- disabled={saving || draft === null}- className="shrink-0 rounded-lg bg-control px-3 py-2 text-[13px] text-ink hover:bg-raised-hover disabled:opacity-50"- >- {t("botAccess.cloud.serverSave")}- </button>- </form>- {error && <div className="mt-2 text-[12px] text-danger">{error}</div>}- {notice && <div role="status" className="mt-2 break-words text-[12px] text-ink-secondary">{notice}</div>}- </div>- );-}-export function CloudPreference({ bot, patch }: { bot: Bot; patch: ReturnType<typeof useBotSettingsDerived>["patch"] }) {const state = useStoreSelector((s) => ({ config: s.config }), sameFields);const { draft } = useBotEditor();diff --git a/src/components/bot-settings/VpsAliasField.dom.test.ts b/src/components/bot-settings/VpsAliasField.dom.test.tsnew file mode 100644index 0000000000..5de1535b8d--- /dev/null+++ b/src/components/bot-settings/VpsAliasField.dom.test.ts@@ -0,0 +1,102 @@+// @vitest-environment happy-dom+import { createElement } from "react";+import { flushSync } from "react-dom";+import { createRoot, type Root } from "react-dom/client";+import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";+import { setLocale } from "@/lib/i18n";+import type { Bot } from "@/state/store";++const fx = vi.hoisted(() => ({ config: null as unknown, request: vi.fn() }));+vi.mock("@/state/store-select", async (importOriginal) => (await import("@/testing/plain-store-select")).plainStoreSelect(await importOriginal()));+vi.mock("@/state/store", async (importOriginal) => {+ const original = await importOriginal<typeof import("@/state/store")>();+ return { ...original, useStore: () => ({ state: { ...original.initialState, config: fx.config }, dispatch: vi.fn() }) };+});+vi.mock("../DesktopCapabilities", () => ({ useDesktopCapabilities: () => ({ capabilities: {} }) }));++const { VpsAliasField } = await import("./VpsAliasField");+const { BotEditorContext } = await import("./BotEditorContext");++let host: HTMLDivElement;+let root: Root;+const bot = (vpsAlias?: string): Bot => ({+ id: "bot-1", threadId: "thread-1", name: "Scout", title: "Scout", description: "", notifications: false, color: "green", unread: false,+ modelSelection: { instanceId: "local", model: "test-model" }, messages: [], computer: "cloud", cloudBackend: "vps", ...(vpsAlias ? { vpsAlias } : {}),+});+const render = (value: Bot) => flushSync(() => root.render(createElement(BotEditorContext.Provider, { value: { request: fx.request } }, createElement(VpsAliasField, { bot: value }))));+const picker = () => host.querySelector<HTMLSelectElement>('select[aria-label="Choose this bot\'s server"]');+const aliasBox = () => host.querySelector<HTMLInputElement>('input[aria-label="Server (SSH alias)"]');+const choose = (value: string) => flushSync(() => {+ picker()!.value = value;+ picker()!.dispatchEvent(new Event("change", { bubbles: true }));+});+const submit = () => flushSync(() => picker()!.form!.requestSubmit());+const patched = () => fx.request.mock.calls.map(([path, init]) => [path, JSON.parse((init as RequestInit).body as string)]);++beforeEach(() => {+ setLocale("en");+ fx.request.mockReset();+ fx.request.mockResolvedValue({});+ fx.config = { vps: { configured: true, sshAlias: "production-vps", servers: [{ name: "Home lab", sshAlias: "home-lab" }, { name: "Office", sshAlias: "office-vps" }] } };+ host = document.createElement("div");+ document.body.append(host);+ root = createRoot(host);+});+afterEach(() => {+ flushSync(() => root.unmount());+ host.remove();+});++describe("a VPS bot's server picker", () => {+ it("lists the default and the named servers, and moves the bot only on Save", async () => {+ render(bot());+ expect([...picker()!.options].map((option) => option.text)).toEqual(["Default server (production-vps)", "Home lab (home-lab)", "Office (office-vps)", "Other SSH alias…"]);+ expect(picker()!.value).toBe("");+ expect(aliasBox()).toBeNull();+ choose("home-lab");+ await Promise.resolve();+ expect(fx.request).not.toHaveBeenCalled();+ expect(picker()!.value).toBe("home-lab");+ submit();+ await Promise.resolve();+ expect(patched()).toEqual([["/api/bots/bot-1", { vpsAlias: "home-lab" }]]);+ });++ it("does not list a named server that is the default again", () => {+ fx.config = { vps: { configured: true, sshAlias: "production-vps", servers: [{ name: "Prod", sshAlias: "production-vps" }, { name: "Office", sshAlias: "office-vps" }] } };+ render(bot());+ expect([...picker()!.options].map((option) => option.text)).toEqual(["Default server (production-vps)", "Office (office-vps)", "Other SSH alias…"]);+ });++ it("goes back to the default server as no alias of its own", async () => {+ render(bot("office-vps"));+ expect(picker()!.value).toBe("office-vps");+ choose("");+ submit();+ await Promise.resolve();+ expect(patched()).toEqual([["/api/bots/bot-1", { vpsAlias: null }]]);+ });++ it("keeps a typed alias that is not in the list, and opens the alias box for another", async () => {+ render(bot("custom-box"));+ expect(picker()!.value).toBe("custom-box");+ choose(" other");+ expect(fx.request).not.toHaveBeenCalled();+ const box = aliasBox()!;+ flushSync(() => {+ Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")!.set!.call(box, "lab-2");+ box.dispatchEvent(new Event("input", { bubbles: true }));+ });+ flushSync(() => box.form!.requestSubmit());+ await Promise.resolve();+ expect(patched()).toEqual([["/api/bots/bot-1", { vpsAlias: "lab-2" }]]);+ });++ it("stays a plain alias box when no servers are named", () => {+ fx.config = { vps: { configured: true, sshAlias: "production-vps" } };+ render(bot());+ expect(picker()).toBeNull();+ expect(aliasBox()!.placeholder).toBe("production-vps");+ expect(host.textContent).toContain("Leave empty to use production-vps");+ });+});diff --git a/src/components/bot-settings/VpsAliasField.tsx b/src/components/bot-settings/VpsAliasField.tsxnew file mode 100644index 0000000000..e316dd18b4--- /dev/null+++ b/src/components/bot-settings/VpsAliasField.tsx@@ -0,0 +1,109 @@+import { useState } from "react";+import { cn } from "@/lib/cn";+import { t } from "@/lib/i18n";+import type { Bot } from "@/state/store";+import { sameFields, useStoreSelector } from "@/state/store-select";+import { KeysLink } from "../keys/KeysLink";+import { Select } from "../Select";+import { useBotEditor } from "./BotEditorContext";+import { inputCls } from "./field";++/** The picker's last choice, which opens the alias field; no SSH alias can contain a space. */+const OTHER_ALIAS = " other";++/**+ * A bot's own VPS server: one of the named servers from Settings, or any SSH alias typed in.+ * PATCHed directly, not via updateBot: the server refuses a move while the bot's computer still lives on the old host.+ */+export function VpsAliasField({ bot }: { bot: Bot }) {+ const { request: api } = useBotEditor();+ const state = useStoreSelector((s) => ({ config: s.config }), sameFields);+ const defaultAlias = state.config?.vps?.sshAlias ?? "";+ // The default server is already the first choice; a named copy of it would only repeat it.+ const servers = (state.config?.vps?.servers ?? []).filter((server) => server.sshAlias !== defaultAlias);+ const [draft, setDraft] = useState<string | null>(null);+ const [typing, setTyping] = useState(false);+ const [error, setError] = useState<string | null>(null);+ // Set when the old server could not be reached: the move went ahead, and this says what may be left there.+ const [notice, setNotice] = useState<string | null>(null);+ const [saving, setSaving] = useState(false);+ const save = async (alias: string | null) => {+ setSaving(true);+ setError(null);+ setNotice(null);+ try {+ const saved = await api<{ notice?: string }>(`/api/bots/${bot.id}`, { method: "PATCH", body: JSON.stringify({ vpsAlias: alias }) });+ setNotice(saved?.notice ?? null);+ setDraft(null);+ setTyping(false);+ } catch (e) {+ setError(e instanceof Error ? e.message : String(e));+ } finally {+ setSaving(false);+ }+ };+ const current = bot.vpsAlias ?? "";+ const value = draft ?? current;+ // With no named servers the field stays as it was: one alias box.+ const picking = servers.length > 0;+ // A pick is only a draft until Save: moving a bot to another server is a real move, never a stray click.+ const pick = (picked: string) => {+ setError(null);+ setTyping(picked === OTHER_ALIAS);+ setDraft(picked === OTHER_ALIAS ? "" : picked === current ? null : picked);+ };+ return (+ <div className="mt-3 rounded-lg bg-inset p-3">+ <div className="text-[13px] text-ink">{t("botAccess.cloud.server")}</div>+ <div className="mt-0.5 text-[12px] text-ink-secondary">+ {picking+ ? t("botAccess.cloud.serverPickHint")+ : defaultAlias+ ? t("botAccess.cloud.serverDefault", { alias: defaultAlias })+ : t("botAccess.cloud.serverNoDefault")} <KeysLink id="vps" />+ </div>+ <form+ className="mt-2 flex items-center gap-2"+ onSubmit={(e) => {+ e.preventDefault();+ void save(value.trim() || null);+ }}+ >+ {picking && (+ <Select+ className="min-w-0 flex-1"+ aria-label={t("botAccess.cloud.serverPick")}+ value={typing ? OTHER_ALIAS : value}+ disabled={saving}+ onChange={(e) => pick(e.target.value)}+ >+ <option value="">{defaultAlias ? t("botAccess.cloud.serverPickDefault", { alias: defaultAlias }) : t("botAccess.cloud.serverPickNone")}</option>+ {servers.map((server) => (+ <option key={server.sshAlias} value={server.sshAlias}>{`${server.name} (${server.sshAlias})`}</option>+ ))}+ {current && !servers.some((server) => server.sshAlias === current) && <option value={current}>{current}</option>}+ <option value={OTHER_ALIAS}>{t("botAccess.cloud.serverPickOther")}</option>+ </Select>+ )}+ {(!picking || typing) && (+ <input+ className={cn(inputCls, "font-mono text-[13px]")}+ placeholder={defaultAlias || t("botAccess.cloud.serverPlaceholder")}+ value={value}+ aria-label={t("botAccess.cloud.server")}+ onChange={(e) => setDraft(e.target.value)}+ />+ )}+ <button+ type="submit"+ disabled={saving || draft === null || (typing && !value.trim())}+ className="shrink-0 rounded-lg bg-control px-3 py-2 text-[13px] text-ink hover:bg-raised-hover disabled:opacity-50"+ >+ {t("botAccess.cloud.serverSave")}+ </button>+ </form>+ {error && <div className="mt-2 text-[12px] text-danger">{error}</div>}+ {notice && <div role="status" className="mt-2 break-words text-[12px] text-ink-secondary">{notice}</div>}+ </div>+ );+}diff --git a/src/components/keys/KeyPanels.tsx b/src/components/keys/KeyPanels.tsxindex 0db35648ed..a2c87e4eaa 100644--- a/src/components/keys/KeyPanels.tsx+++ b/src/components/keys/KeyPanels.tsx@@ -1,6 +1,7 @@import { useEffect, useRef, useState } from "react";import { Loader2, TriangleAlert } from "lucide-react";import { api, useStore, type ConfigStatus } from "@/state/store";+import { useStoreDispatch, useStoreSelector } from "@/state/store-select";import { cn } from "@/lib/cn";import { t } from "@/lib/i18n";import { Switch } from "../SettingsPrimitives";@@ -207,6 +208,89 @@ export function VpsConnection() {</div>{notice && <div role="status" className="text-[12px] leading-4 text-ink-secondary">{notice}</div>}{error && <div role="alert" className="text-[12px] leading-4 text-danger">{error}</div>}+ <VpsServers />+ </div>+ );+}++const NO_SERVERS: { name: string; sshAlias: string }[] = [];++/** Named servers a bot can be put on from its own settings. Saving the list never moves a bot. */+function VpsServers() {+ const servers = useStoreSelector((s) => s.config?.vps?.servers ?? NO_SERVERS);+ const dispatch = useStoreDispatch();+ const [name, setName] = useState("");+ const [alias, setAlias] = useState("");+ const [saving, setSaving] = useState<string | null>(null);+ const [error, setError] = useState<string | null>(null);++ const put = (next: { name: string; sshAlias: string }[], busy: string) => {+ setSaving(busy);+ setError(null);+ return api("/api/config", { method: "PUT", body: JSON.stringify({ vpsServers: next }) })+ .then((status: ConfigStatus) => dispatch({ type: "configStatus", config: status }))+ .finally(() => setSaving(null));+ };+ const add = () => {+ if (saving || !name.trim() || !alias.trim()) return;+ put([...servers, { name: name.trim(), sshAlias: alias.trim() }], "")+ .then(() => { setName(""); setAlias(""); })+ .catch((e) => setError(e.message));+ };+ const remove = (target: string) => {+ if (saving) return;+ put(servers.filter((server) => server.sshAlias !== target), target).catch((e) => setError(e.message));+ };++ return (+ <div data-vps-servers className="mt-2 flex flex-col gap-2">+ <div className="text-[13px] text-ink">{t("keys.vps.servers.title")}</div>+ <p className="text-[12px] leading-4 text-ink-secondary">{t("keys.vps.servers.hint")}</p>+ {servers.map((server) => (+ <div key={server.sshAlias} data-vps-server={server.sshAlias} className="flex flex-wrap items-center gap-2">+ <span className={cn(KEY_FIELD, "block flex-1 truncate text-ink")}>+ {server.name} <span className="font-mono text-ink-secondary">{server.sshAlias}</span>+ </span>+ <button+ type="button"+ onClick={() => remove(server.sshAlias)}+ disabled={saving !== null}+ aria-label={t("keys.vps.servers.removeAria", { name: server.name })}+ className="ui-button shrink-0"+ >+ {saving === server.sshAlias ? <Loader2 size={13} className="animate-spin" aria-hidden="true" /> : t("keys.row.remove")}+ </button>+ </div>+ ))}+ <div className="flex flex-wrap items-center gap-2">+ <input+ type="text"+ value={name}+ onChange={(e) => { setError(null); setName(e.target.value); }}+ onKeyDown={(e) => e.key === "Enter" && add()}+ disabled={saving !== null}+ placeholder={t("keys.vps.servers.namePlaceholder")}+ aria-label={t("keys.vps.servers.name")}+ autoComplete="off"+ className={cn(KEY_FIELD, "w-auto min-w-[min(100%,10rem)] flex-1")}+ />+ <input+ type="text"+ value={alias}+ onChange={(e) => { setError(null); setAlias(e.target.value); }}+ onKeyDown={(e) => e.key === "Enter" && add()}+ disabled={saving !== null}+ placeholder="home-lab"+ aria-label={t("keys.vps.servers.alias")}+ autoComplete="off"+ spellCheck={false}+ className={cn(KEY_FIELD, "w-auto min-w-[min(100%,10rem)] flex-1 font-mono")}+ />+ <button type="button" onClick={add} disabled={saving !== null || !name.trim() || !alias.trim()} className="ui-button shrink-0">+ {saving === "" ? <Loader2 size={13} className="animate-spin" aria-hidden="true" /> : t("keys.vps.servers.add")}+ </button>+ </div>+ {error && <div role="alert" className="text-[12px] leading-4 text-danger">{error}</div>}</div>);}diff --git a/src/components/keys/KeysPage.dom.test.ts b/src/components/keys/KeysPage.dom.test.tsindex 02ee0641d5..61a890fb21 100644--- a/src/components/keys/KeysPage.dom.test.ts+++ b/src/components/keys/KeysPage.dom.test.ts@@ -553,4 +553,37 @@ describe("Self-hosted VPS alias", () => {expect(text).toContain("Any Linux machine with Docker that you reach over SSH works");expect(text).toContain("Tailscale name as the alias's HostName");});++ it("adds and removes named servers as one list, leaving the default alias alone", async () => {+ const { VpsConnection } = await import("./KeyPanels");+ setConfig({ ...fx.config, vps: { configured: true, sshAlias: "production-vps", servers: [{ name: "Office", sshAlias: "office-vps" }] } });+ fx.api.mockImplementation(async (_path: string, init: RequestInit) => {+ const { vpsServers } = JSON.parse(init.body as string);+ return { ...fx.config, vps: { configured: true, sshAlias: "production-vps", servers: vpsServers } };+ });+ render(() => createElement(VpsConnection, { key: "vps" }));+ const list = () => [...host.querySelectorAll<HTMLElement>("[data-vps-server]")].map((element) => element.dataset.vpsServer);+ expect(list()).toEqual(["office-vps"]);+ type(host.querySelector<HTMLInputElement>('input[aria-label="Server name"]')!, " Home lab ");+ type(host.querySelector<HTMLInputElement>('input[aria-label="Server SSH config alias"]')!, "home-lab");+ await answered(() => [...host.querySelectorAll("button")].find((button) => button.textContent === "Add")!.click());+ expect(fx.api).toHaveBeenLastCalledWith("/api/config", { method: "PUT", body: JSON.stringify({ vpsServers: [{ name: "Office", sshAlias: "office-vps" }, { name: "Home lab", sshAlias: "home-lab" }] }) });+ expect(list()).toEqual(["office-vps", "home-lab"]);+ expect(host.querySelector<HTMLInputElement>('input[aria-label="Server name"]')!.value).toBe("");+ await answered(() => host.querySelector<HTMLButtonElement>('button[aria-label="Remove Office"]')!.click());+ expect(fx.api).toHaveBeenLastCalledWith("/api/config", { method: "PUT", body: JSON.stringify({ vpsServers: [{ name: "Home lab", sshAlias: "home-lab" }] }) });+ expect(list()).toEqual(["home-lab"]);+ expect(host.querySelector<HTMLInputElement>('input[aria-label="Self-hosted VPS SSH config alias"]')!.value).toBe("production-vps");+ });++ it("shows why a named server was refused and keeps what was typed", async () => {+ const { VpsConnection } = await import("./KeyPanels");+ fx.api.mockRejectedValue(new Error("vpsServers: each server needs its own SSH alias"));+ render(() => createElement(VpsConnection, { key: "vps" }));+ type(host.querySelector<HTMLInputElement>('input[aria-label="Server name"]')!, "Lab");+ type(host.querySelector<HTMLInputElement>('input[aria-label="Server SSH config alias"]')!, "lab");+ await answered(() => [...host.querySelectorAll("button")].find((button) => button.textContent === "Add")!.click());+ expect(host.querySelector("[data-vps-servers] [role=alert]")!.textContent).toContain("own SSH alias");+ expect(host.querySelector<HTMLInputElement>('input[aria-label="Server name"]')!.value).toBe("Lab");+ });});diff --git a/src/locales/de.json b/src/locales/de.jsonindex 790d5e4d6c..b7177cbf07 100644--- a/src/locales/de.json+++ b/src/locales/de.json@@ -1470,6 +1470,13 @@"keys.vps.anyMachine": "Jeder Linux-Rechner mit Docker, den du per SSH erreichst, funktioniert, auch ein Computer in deinem Tailscale-Netzwerk: Trag seinen Tailscale-Namen als HostName des Alias ein.","keys.vps.aria": "SSH-Config-Alias des selbst gehosteten VPS","keys.vps.removeAlias": "Gespeicherten Alias entfernen",+ "keys.vps.servers.title": "Benannte Server",+ "keys.vps.servers.hint": "Füge weitere Server mit Namen hinzu. Jeder Bot kann dann in seinen eigenen Computer-Einstellungen einen davon wählen; der Alias oben bleibt der Standard.",+ "keys.vps.servers.name": "Servername",+ "keys.vps.servers.namePlaceholder": "Heimlabor",+ "keys.vps.servers.alias": "SSH-Config-Alias des Servers",+ "keys.vps.servers.add": "Hinzufügen",+ "keys.vps.servers.removeAria": "{name} entfernen","usage.title": "Nutzung","usage.bot.empty": "Für diesen Bot wurde noch keine Nutzung erfasst.","usage.bot.unpriced": "Dieser Anbieter meldet keinen Preis; Tokens werden gezählt.",@@ -4091,5 +4098,10 @@"geminiServer.key": "Gemini-API-Schlüssel","geminiServer.add": "Google AI Studio hinzufügen","inbox.settled.title": "Erledigt",- "inbox.settled.read": "Gelesen"+ "inbox.settled.read": "Gelesen",+ "botAccess.cloud.serverPick": "Server für diesen Bot wählen",+ "botAccess.cloud.serverPickHint": "Wähle einen benannten Server oder gib einen anderen SSH-Alias ein.",+ "botAccess.cloud.serverPickDefault": "Standardserver ({alias})",+ "botAccess.cloud.serverPickNone": "Kein Server gewählt",+ "botAccess.cloud.serverPickOther": "Anderer SSH-Alias …"}diff --git a/src/locales/en.json b/src/locales/en.jsonindex 865956e5a5..37b8e5e378 100644--- a/src/locales/en.json+++ b/src/locales/en.json@@ -4298,6 +4298,13 @@"keys.vps.anyMachine": "Any Linux machine with Docker that you reach over SSH works, including a computer on your Tailscale network: use its Tailscale name as the alias's HostName.","keys.vps.aria": "Self-hosted VPS SSH config alias","keys.vps.removeAlias": "Remove the saved alias",+ "keys.vps.servers.title": "Named servers",+ "keys.vps.servers.hint": "Add more servers by name. Each bot can then pick one in its own computer settings; the alias above stays the default.",+ "keys.vps.servers.name": "Server name",+ "keys.vps.servers.namePlaceholder": "Home lab",+ "keys.vps.servers.alias": "Server SSH config alias",+ "keys.vps.servers.add": "Add",+ "keys.vps.servers.removeAria": "Remove {name}","usage.title": "Usage","planUsage.title": "Plan usage","planUsage.subtitle": "Remaining allowance on each signed-in provider. 5-hour and weekly windows, when that plan has them.",@@ -7383,6 +7390,11 @@"botAccess.cloud.serverNoDefault": "No default server is set. Type an SSH alias from your SSH config, or set one in Settings → AI → Other services.","botAccess.cloud.serverPlaceholder": "my-vps","botAccess.cloud.serverSave": "Save",+ "botAccess.cloud.serverPick": "Choose this bot's server",+ "botAccess.cloud.serverPickHint": "Pick a named server, or type another SSH alias.",+ "botAccess.cloud.serverPickDefault": "Default server ({alias})",+ "botAccess.cloud.serverPickNone": "No server chosen",+ "botAccess.cloud.serverPickOther": "Other SSH alias…","screenLoad.failed": "This screen couldn’t load. Reload the window to open it.","screenLoad.reload": "Reload","data.loading": "Loading data…",diff --git a/src/locales/pt-br.json b/src/locales/pt-br.jsonindex 6eec155acb..ed70298656 100644--- a/src/locales/pt-br.json+++ b/src/locales/pt-br.json@@ -4091,6 +4091,13 @@"keys.vps.anyMachine": "Funciona qualquer máquina Linux com Docker que você acesse por SSH, inclusive um computador da sua rede Tailscale: use o nome dele no Tailscale como HostName do alias.","keys.vps.aria": "Apelido na configuração SSH do VPS próprio","keys.vps.removeAlias": "Remover o apelido salvo",+ "keys.vps.servers.title": "Servidores com nome",+ "keys.vps.servers.hint": "Adicione mais servidores com um nome. Cada bot pode escolher um deles nas próprias configurações de computador; o apelido acima continua sendo o padrão.",+ "keys.vps.servers.name": "Nome do servidor",+ "keys.vps.servers.namePlaceholder": "Laboratório em casa",+ "keys.vps.servers.alias": "Apelido do servidor na configuração SSH",+ "keys.vps.servers.add": "Adicionar",+ "keys.vps.servers.removeAria": "Remover {name}","usage.title": "Uso","planUsage.title": "Uso do plano","planUsage.subtitle": "Saldo restante em cada provedor em que você fez login. Períodos de 5 horas e semanais, quando disponíveis no plano.",@@ -7026,6 +7033,11 @@"botAccess.cloud.serverNoDefault": "Nenhum servidor padrão definido. Digite um apelido SSH da sua configuração SSH ou defina um em Configurações → IA → Outros serviços.","botAccess.cloud.serverPlaceholder": "my-vps","botAccess.cloud.serverSave": "Salvar",+ "botAccess.cloud.serverPick": "Escolher o servidor deste bot",+ "botAccess.cloud.serverPickHint": "Escolha um servidor com nome ou digite outro apelido SSH.",+ "botAccess.cloud.serverPickDefault": "Servidor padrão ({alias})",+ "botAccess.cloud.serverPickNone": "Nenhum servidor escolhido",+ "botAccess.cloud.serverPickOther": "Outro apelido SSH…","screenLoad.failed": "Esta tela não carregou. Recarregue a janela para abri-la.","screenLoad.reload": "Recarregar","data.loading": "Carregando dados…",diff --git a/src/locales/source-hashes.json b/src/locales/source-hashes.jsonindex 46a4e2ca4d..ff14b361ce 100644--- a/src/locales/source-hashes.json+++ b/src/locales/source-hashes.json@@ -4061,7 +4061,19 @@"decider.provider.line": "b74959fffc682f78c90fde2eb8e8d2c0a40eebac0d11000c8def7ae4db389462","computer.worksOnHintServer": "2c3302d501a67067774aedcacfff8d16a80ea8238e2f14d8af97e3fd593f690b","composer.dictation.hintKey": "ad34499eb8ecf3174898c031bb1e45b63f46045a1105be0bffafb82368323de9",- "server.teammates.noLongerWaiting": "49259fb62a6e8687efa6a6e69da294c81bd67a19c57687d0724ee4bdd5cc4645"+ "server.teammates.noLongerWaiting": "49259fb62a6e8687efa6a6e69da294c81bd67a19c57687d0724ee4bdd5cc4645",+ "keys.vps.servers.title": "974f60ef932fe181d2037ef79ebddb5c438444e612824616483e43d0db892faa",+ "keys.vps.servers.hint": "cd11a6b1a8e4dea8ce1454b85de2b1bb00787fbac9dcd7753f095a634c3567f9",+ "keys.vps.servers.name": "21babfed6c3829985b43ce0de25b2d582154b45a779a71da5ea204c9d8a3cd20",+ "keys.vps.servers.namePlaceholder": "e09a6ae22f0ceaeb4334fa7a74f17aef7865033ef862e87bed8fa69430d67723",+ "keys.vps.servers.alias": "f7d2bebcb1c01f94add52556a874d6555afa3edcd7fa844e4fdfae361445c99d",+ "keys.vps.servers.add": "9fd728c66c9a256b121472dabf32a34317aed01d8427d70ec830289cf23a7cc8",+ "keys.vps.servers.removeAria": "e6a3c4a1250a6ad3f10faa22333e5e50a6ba78e5b28a3b26f5743d9f8c7ede93",+ "botAccess.cloud.serverPick": "edec371af907e8c466525839736f03bc0f971164e6dc98ca8286440fe5dc30b9",+ "botAccess.cloud.serverPickHint": "98e8f8043da8f8c8fcc0887435867473afcc491d4fddac669c462e8ef67e8ce0",+ "botAccess.cloud.serverPickDefault": "04f8c8609c5369828f915006cf06a5d95398472014945bcab2d7a2ff000c0e7d",+ "botAccess.cloud.serverPickNone": "fbc0134f1d438a0781af95743d45cede059746ae89decf3e106d458f4257717f",+ "botAccess.cloud.serverPickOther": "15524e6a8d1c4bd7ec0549a8f3c866770872e76caa5428ff38925306276dca7b"},"es": {"whop.description": "1a07cf04ef17029448d3781415cbac16d54e66b821907a40d94e0e6349710e70",@@ -37269,7 +37281,19 @@"chat.notice.waitingPasswordElsewhere": "97cacd0a74d5204ef08cc8bc8e98a7510c0b4cc40e43a828e09c6ec945f868f2","chat.notice.waitingSignInElsewhere": "23128dfa673a206b5bdbebc2d7c667b294214c38b5c4d848f2efc7abfa40927b","chat.notice.waitingConnectElsewhere": "ea42fbcab6227c96875c990433e140b7dcec434b3431efe9edd4788925b596fb",- "chat.notice.waitingReviewElsewhere": "bacacf6c5c87a709dce2c839ac18a57a7f87bc7f52b4afa2ab161ffb8bca66c7"+ "chat.notice.waitingReviewElsewhere": "bacacf6c5c87a709dce2c839ac18a57a7f87bc7f52b4afa2ab161ffb8bca66c7",+ "keys.vps.servers.title": "974f60ef932fe181d2037ef79ebddb5c438444e612824616483e43d0db892faa",+ "keys.vps.servers.hint": "cd11a6b1a8e4dea8ce1454b85de2b1bb00787fbac9dcd7753f095a634c3567f9",+ "keys.vps.servers.name": "21babfed6c3829985b43ce0de25b2d582154b45a779a71da5ea204c9d8a3cd20",+ "keys.vps.servers.namePlaceholder": "e09a6ae22f0ceaeb4334fa7a74f17aef7865033ef862e87bed8fa69430d67723",+ "keys.vps.servers.alias": "f7d2bebcb1c01f94add52556a874d6555afa3edcd7fa844e4fdfae361445c99d",+ "keys.vps.servers.add": "9fd728c66c9a256b121472dabf32a34317aed01d8427d70ec830289cf23a7cc8",+ "keys.vps.servers.removeAria": "e6a3c4a1250a6ad3f10faa22333e5e50a6ba78e5b28a3b26f5743d9f8c7ede93",+ "botAccess.cloud.serverPick": "edec371af907e8c466525839736f03bc0f971164e6dc98ca8286440fe5dc30b9",+ "botAccess.cloud.serverPickHint": "98e8f8043da8f8c8fcc0887435867473afcc491d4fddac669c462e8ef67e8ce0",+ "botAccess.cloud.serverPickDefault": "04f8c8609c5369828f915006cf06a5d95398472014945bcab2d7a2ff000c0e7d",+ "botAccess.cloud.serverPickNone": "fbc0134f1d438a0781af95743d45cede059746ae89decf3e106d458f4257717f",+ "botAccess.cloud.serverPickOther": "15524e6a8d1c4bd7ec0549a8f3c866770872e76caa5428ff38925306276dca7b"},"zh": {"pro.fromPrice": "a48a04a457d60b08b54fc83e7a6c4584ffedb1e23621859084900c8521a3af7b",diff --git a/src/state/config-status.ts b/src/state/config-status.tsindex 0ab9ca5a7c..e245fc0937 100644--- a/src/state/config-status.ts+++ b/src/state/config-status.ts@@ -53,7 +53,8 @@ export interface ConfigStatus {composio: SavedKey & { mode?: "managed" | "self-hosted" | "unavailable" };/** `included`: cloud computers come with Cloud Pro, no key is saved. */box: SavedKey & { included?: boolean };- vps: { configured: boolean; sshAlias: string };+ /** `servers`: named servers for the per-bot picker; empty for client sessions, missing from an older server. */+ vps: { configured: boolean; sshAlias: string; servers?: { name: string; sshAlias: string }[] };rooms: { turnTimeoutMinutes: number };/** Per-call ceiling (minutes) for a bot's MCP tools. Absent from servers* older than the setting; read it with mcpCallTimeoutMinutes(). */