Open-source Grok Bot alternative with a virtual machine that bots can use
TypeScript ai-agentsclaude-codecodexcomputer-usedockerelectrongrokgrok-botgrok-bot-alternativeself-hostedtypescript
Keep the task on the computer only when the bot already saw the site signed in there
Bugfixer 263ce6e2ecddc
diff --git a/server/surface.test.ts b/server/surface.test.tsindex e192e102c6..3be61642e3 100644--- a/server/surface.test.ts+++ b/server/surface.test.ts@@ -204,12 +204,13 @@ describe("surfacePrompt", () => {expect(text).toMatch(/say which surface — the Browser tab or the cloud computer/);});- it("tells the bot to check the computer for a signed-in site before asking for a sign-in in the Browser tab", () => {+ it("keeps a task on the computer where the bot already saw the site signed in, without a check that would start it", () => {for (const computer of ["vm", "cloud"] as const) {const text = surfacePrompt({ computer, browser: true });const label = computer === "vm" ? "the Local VM" : "the cloud computer";expect(text).toContain(`The built-in browser and ${label} may not share sign-ins.`);- expect(text).toContain(`Unless the user asked for the Browser tab, check whether the site is already signed in on ${label} with the account the task needs before asking them to sign in again in the Browser tab; if it is, do the task there and keep it there. If you cannot check ${label}, ask for the sign-in in the Browser tab.`);+ expect(text).toContain(`If you already saw the site signed in on ${label} with the account this task needs, keep the task on ${label} instead of asking the user to sign in again in the Browser tab, unless they asked for the Browser tab.`);+ expect(text).not.toMatch(/check whether the site is already signed in/);}expect(surfacePrompt({ computer: "vm", browser: false })).not.toContain("share sign-ins");expect(surfacePrompt({ computer: null, browser: true })).not.toContain("share sign-ins");diff --git a/server/surface.ts b/server/surface.tsindex 2e27a4b98d..0438254d94 100644--- a/server/surface.ts+++ b/server/surface.ts@@ -228,7 +228,7 @@ export function surfacePrompt(// The two browsers usually share no cookies: "Web tasks → the built-in browser" alone sent a bot whose site was// signed in on the computer to a signed-out tab, where it asked the person to sign in again.text =- ` Two surfaces are mounted this turn: the built-in browser (the browser server's browser_navigate, browser_snapshot, browser_click, browser_fill and friends) and ${computer} (the computer server's tools). Web tasks → the built-in browser. Desktop apps, files and shell → ${computer} tools. Pick one surface for a task and stay on it; if you need the user to sign in, say which surface — the Browser tab or ${computer}. The built-in browser and ${computer} may not share sign-ins. Unless the user asked for the Browser tab, check whether the site is already signed in on ${computer} with the account the task needs before asking them to sign in again in the Browser tab; if it is, do the task there and keep it there. If you cannot check ${computer}, ask for the sign-in in the Browser tab.`;+ ` Two surfaces are mounted this turn: the built-in browser (the browser server's browser_navigate, browser_snapshot, browser_click, browser_fill and friends) and ${computer} (the computer server's tools). Web tasks → the built-in browser. Desktop apps, files and shell → ${computer} tools. Pick one surface for a task and stay on it; if you need the user to sign in, say which surface — the Browser tab or ${computer}. The built-in browser and ${computer} may not share sign-ins. If you already saw the site signed in on ${computer} with the account this task needs, keep the task on ${computer} instead of asking the user to sign in again in the Browser tab, unless they asked for the Browser tab.`;} else if (computer) {text =` Everything you do on screen happens on ${computer}, web pages included, through its own browser; there is no separate built-in browser this turn. If you need the user to sign in, tell them it is on ${computer}.`;