Open-source Grok Bot alternative with a virtual machine that bots can use
TypeScript ai-agentsclaude-codecodexcomputer-usedockerelectrongrokgrok-botgrok-bot-alternativeself-hostedtypescript
A Claude bot at its usage limit carries on with any backup that has its tools
milind-soni214e2ff5c8b5
diff --git a/server/automatic-recovery.test.ts b/server/automatic-recovery.test.tsindex b380abb254..d202304c34 100644--- a/server/automatic-recovery.test.ts+++ b/server/automatic-recovery.test.ts@@ -12,6 +12,14 @@ describe("automatic recovery capabilities", () => {expect(recoveryCapabilityError(engine, { ...engine, capabilities: { ...engine.capabilities, [key]: false } })).toMatch(/tools and attachments/);}});+ it("lets a limited Claude bot carry on with an engine that has every tool but a USB phone", () => {+ const claude = { driverKind: "claudeAgent", capabilities: { sessionModelSwitch: "in-session" as const, agentsMcp: true, customMcp: true,+ computerMcp: true, composioMcp: true, phoneMcp: true, browserMcp: true, dataMcp: true, highlevelMcp: true, deviceMcp: true, images: true } };+ const { phoneMcp: _phone, ...rest } = claude.capabilities;+ const opencode = { driverKind: "opencodeAgent", capabilities: { ...rest, sessionModelSwitch: "unsupported" as const, localComputerMcp: true } };+ expect(recoveryCapabilityError(claude, opencode)).toBeUndefined();+ expect(recoveryCapabilityError(claude, { ...opencode, capabilities: { ...opencode.capabilities, browserMcp: false } })).toMatch(/tools and attachments/);+ });it("does not silently move work to a file-less engine", () => {expect(recoveryCapabilityError(engine, { ...engine, driverKind: "openai-compat" })).toMatch(/same workspace/);});diff --git a/server/automatic-recovery.ts b/server/automatic-recovery.tsindex 0de8798e5b..ff26a5ac30 100644--- a/server/automatic-recovery.ts+++ b/server/automatic-recovery.ts@@ -12,13 +12,15 @@ export function startupBackups(bot: { fallback?: Backup[] }, recovery?: { enablereturn recovery?.enabled && recovery.backup ? [recovery.backup] : [];}-/** An automatic switch must not strand the task without its tools or move its filesystem to another machine. */+/** An automatic switch must not strand the task without its tools or move its filesystem to another machine. A USB+ * phone is not one of those tools: only Codex and Pi drive one, Claude offers it on every desktop, and no Cloud has a+ * USB port, so counting it left a limited Claude bot with no backup but those two. */export function recoveryCapabilityError(from: Engine, to: Engine): string | undefined {if (supportsWorkspaceFiles(from.driverKind) !== supportsWorkspaceFiles(to.driverKind)) {return "The backup cannot use the same workspace.";}const tools = ["agentsMcp", "computerMcp", "composioMcp", "dataMcp", "highlevelMcp", "deviceMcp",- "phoneMcp", "browserMcp", "localComputerMcp", "customMcp", "images"] as const;+ "browserMcp", "localComputerMcp", "customMcp", "images"] as const;if (tools.some(key => from.capabilities[key] === true && to.capabilities[key] !== true)) {return "The backup does not support all of this AI's tools and attachments.";}