Open-source Grok Bot alternative with a virtual machine that bots can use
TypeScript ai-agentsclaude-codecodexcomputer-usedockerelectrongrokgrok-botgrok-bot-alternativeself-hostedtypescript
Merge remote-tracking branch 'gh/train/nov30-r2' into train/nov30-final
milind-sonie18f4e453dfc
diff --cc server/index.tsindex 61c9b32f27,4919de301f..f7952e4db4--- a/server/index.ts+++ b/server/index.ts@@@ -12270,10 -12274,10 +12270,10 @@@ function liveSignedIn(auth: RequestAuthfunction liveCallTitle(botId: string, threadId: string, excerpt: string): Promise<string | null> | null {const bot = store.projectBotForTask(botId, threadId);if (!bot) return null;- const gate = threadTitleGate(bot);+ const gate = threadTitleGate(bot, true);return gate.ok ? generateThreadTitle(gate.instance, excerpt, "call") : null;}- const liveWiring = liveSessionWiring({ codex: () => localLiveCodex(cfg, DESKTOP_MANAGED && !CLOUD_HOME && !HOSTED_WORKSPACE), bot: liveBotFor, history: liveHistoryFor, cloudHome: Boolean(CLOUD_HOME), othersOnLoopback: adminActivityRecording, saveAgent: (agent) => { saveConfig({ live: agent }); Object.assign(cfg, loadConfig()); }, language: appLanguage, fishAgentLanguage: () => cfg.live?.fishAgentLanguage });+ const liveWiring = liveSessionWiring({ codex: () => localLiveCodex(cfg, DESKTOP_MANAGED && !CLOUD_HOME && !HOSTED_WORKSPACE), bot: liveBotFor, history: liveHistoryFor, cloudHome: Boolean(CLOUD_HOME), othersOnLoopback: adminActivityRecording, saveAgent: (agent) => { saveConfig({ live: agent }); Object.assign(cfg, loadConfig()); }, language: appLanguage, fishAgentLanguage: () => cfg.live?.fishAgentLanguage, historyLimits: () => cfg.live });const liveCalls = new LiveCallController({store,send: async ({ auth, botId, threadId, text, callId }) => {diff --cc server/routes/bot-patch.test.tsindex 3780da6b5f,d59dc2350a..e6ce69eafd--- a/server/routes/bot-patch.test.ts+++ b/server/routes/bot-patch.test.ts@@@ -343,23 -342,21 +343,38 @@@ describe("PATCH /api/bots/:id toolsOff"});});+describe("PATCH /api/bots/:id localVm", () => {+ it("stores keepDesktopRunning, clears it with null, and refuses a malformed value", async () => {+ const { store, bot, patch } = fixture();+ expect((await patch(bot.id, { localVm: { keepDesktopRunning: true } })).status).toBe(200);+ expect(store.bot(bot.id)?.localVm).toEqual({ keepDesktopRunning: true });+ const other = store.createBot({ name: "Echo" });+ expect(store.bot(other.id)?.localVm).toBeUndefined();+ expect((await patch(bot.id, { localVm: { keepDesktopRunning: false } })).status).toBe(200);+ expect(store.bot(bot.id)?.localVm).toEqual({ keepDesktopRunning: false });+ expect((await patch(bot.id, { localVm: null })).status).toBe(200);+ expect(store.bot(bot.id)?.localVm).toBeUndefined();+ const refused = await patch(bot.id, { localVm: { keepDesktopRunning: "yes" } });+ expect(refused.status).toBe(400);+ expect(refused.body.error).toBe("localVm must be { keepDesktopRunning?: boolean }");+ });+});++ describe("PATCH /api/bots/:id voicePlaybackRate", () => {+ it("saves a supported per-bot speed, rejects unsupported speeds, and clears back to workspace", async () => {+ const { store, bot, patch } = fixture();+ const saved = await patch(bot.id, { voicePlaybackRate: 1.5 });+ expect(saved.status).toBe(200);+ expect(saved.body.bot.voicePlaybackRate).toBe(1.5);+ expect(store.bot(bot.id)?.voicePlaybackRate).toBe(1.5);++ expect((await patch(bot.id, { voicePlaybackRate: 1.1 })).status).toBe(400);+ expect(store.bot(bot.id)?.voicePlaybackRate).toBe(1.5);+ expect((await patch(bot.id, { voicePlaybackRate: null })).status).toBe(200);+ expect(store.bot(bot.id)?.voicePlaybackRate).toBeUndefined();+ });+ });+describe("PATCH /api/bots/:id liveVoice", () => {it.each(["nuri", "juni", "flitz", "brise", "sillage", "nira", "harema", "shida", "noeul"])("saves %s as the bot's Live call voice", async (liveVoice) => {const { store, bot, patch } = fixture();diff --cc src/components/keys/KeysPage.tsxindex 47d218bd3a,600cf64bbc..7eac365233--- a/src/components/keys/KeysPage.tsx+++ b/src/components/keys/KeysPage.tsx@@@ -8,8 -8,8 +8,9 @@@ import { t } from "@/lib/i18n"import { BoatOfferPanel } from "../BoatOffer";import { LiveProviderSettings } from "../LiveProviderSettings";import { VoiceEveryReplySetting } from "../VoiceEveryReplySetting";+ import { VoicePlaybackRateSetting } from "../VoicePlaybackRateSetting";import { VoiceHearingSetting } from "../VoiceHearingSetting";+import { BuiltInCustomHeaders } from "../OpenAiCompatCustomHeaders";import { BuiltInReplyWait, LmStudioServer, OtherOpenAiCompatServers } from "../OpenAiCompatServers";import { OllamaServer } from "../OllamaServer";import { KEY_CATALOG, KEY_SECTIONS, keyHidden, keyMatches, savedState, type KeyEntry, type KeyId, type KeySectionId } from "./key-catalog";