Open-source Grok Bot alternative with a virtual machine that bots can use
TypeScript ai-agentsclaude-codecodexcomputer-usedockerelectrongrokgrok-botgrok-bot-alternativeself-hostedtypescript
Merge #5137: Tell bots the status of every computer they could use
milind-soni27346ed77d49
diff --cc server/system-prompt.test.tsindex e36e73ba2a,8950e53886..9b658e36e3--- a/server/system-prompt.test.ts+++ b/server/system-prompt.test.ts@@@ -382,18 -375,11 +382,23 @@@ describe("composioSystemPrompt", () =>});describe("cloudHomePrompt", () => {+ it("says the Cloud is off their network, whatever memory says, and sends ssh through the lent computer", () => {+ const lent = cloudHomePrompt(true, [], [{ name: "ASH-PC", platform: "win32" }]);+ expect(lent).toContain("This Cloud is not on their network");+ expect(lent).toContain("100.x.x.x, *.ts.net");+ expect(lent).toContain("even when your memory or notes give the address");+ expect(lent).toContain("run the command (ssh too) on their PC (ASH-PC) with shared_computer's run_command, and never from a shell here");+ expect(lent).toContain("without their SSH agent");+ const none = cloudHomePrompt(false, [], [{ name: "ASH-PC", platform: "win32" }]);+ expect(none).toContain("This Cloud is not on their network");+ expect(none).toContain("say so in one sentence");+ expect(none).not.toMatch(/run_command|shared_computer/u);+ });+ it("names every computer's status with the tools on, and says nothing about them without", () => {+ const known = [{ name: "ASH-MBP", platform: "darwin" as const, online: true, lent: true, lastSeenAt: 1 }, { name: "OFFICE-PC", platform: "win32" as const, online: false, lent: true, lastSeenAt: Date.UTC(2026, 9, 1, 8, 0) }];+ expect(cloudHomePrompt(true, [], known)).toContain("Their computers right now: ASH-MBP (Mac): online; OFFICE-PC (PC): offline since 2026-10-01 08:00 UTC.");+ expect(cloudHomePrompt(false, [], known)).not.toContain("Their computers right now");+ });it("says the bot runs in the cloud, offers what works there, and never asks for a place that cannot exist", () => {for (const tools of [true, false]) {const text = cloudHomePrompt(tools);diff --cc server/system-prompt.tsindex 62c8fa7245,954e4afd19..d5cad5281a--- a/server/system-prompt.ts+++ b/server/system-prompt.ts@@@ -185,10 -185,9 +185,10 @@@ export function cloudHomePrompt(sharedC? ` If it isn't online, or doesn't lend what you need (its apps and screen, its files, running commands), call ask_for_computer with what you want to do and why: it shows them one card with a one-tap Turn on, and you carry on once it's on. Don't explain the fix yourself, and never do it on their cloud computer or in the built-in browser instead unless they ask you to.`: ` If none is online, say so in one sentence: use its say field when it has one (it names the computer and when it was last online), otherwise ask them to open OpenMausBot on that ${device}, signed in to MausBot Cloud: it shares that ${device} with you by itself.`;return ` You run on ${CLOUD_HOME_PLACE}.` + (sharedComputerTools- ? ` If they ask for something on ${theirs}, check list_shared_computers: a computer they share with the Cloud is reachable through shared_computer, within the folders and apps it allows.${unavailable}${device === "computer" ? " Call it their computer: never assume it is a Mac." : ` It is a ${device}: call it that, never a Mac unless it is one.`}`+ ? ` If they ask for something on ${theirs}, check list_shared_computers: a computer they share with the Cloud is reachable through shared_computer, within the folders and apps it allows.${lentComputersLine(lent)}${unavailable}${device === "computer" ? " Call it their computer: never assume it is a Mac." : ` It is a ${device}: call it that, never a Mac unless it is one.`}`+ ` While that ${device} is away, each folder it lends that the Cloud keeps a copy of still works from that copy: list_shared_computers lists them under away_computers (copy null means a folder only on the ${device}), every read says how fresh the copy is, and a write to a folder lent with editing is saved here and reaches the ${device} when it's on (tell them so in a few words). A file or folder that isn't in the copy is only on the ${device}: say you'll get it when it's on.`: ` You cannot see or use ${theirs}, its screen or its files from here. If they ask for something on it, say so in one sentence.`)+ + offTheirNetwork(sharedComputerTools, theirs)+ (asks ? " For work that doesn't need their own computer, use what works here:" : " Offer what works here:")+ " the built-in browser and their cloud computer, a desktop in the cloud. Call it their cloud computer, as the app does. Never ask them to set up this computer or a Local VM; neither exists here."+ CLOUD_ENGINES_HERE