Open-source Grok Bot alternative with a virtual machine that bots can use
TypeScript ai-agentsclaude-codecodexcomputer-usedockerelectrongrokgrok-botgrok-bot-alternativeself-hostedtypescript
Sign-in: name ChatGPT's own Settings so the menu-path guard reads it as ChatGPT's
milind-soni5aea9c95e315
diff --git a/server/drivers/codex-device-auth.ts b/server/drivers/codex-device-auth.tsindex 38e3bf0d34..87c2b9c32c 100644--- a/server/drivers/codex-device-auth.ts+++ b/server/drivers/codex-device-auth.ts@@ -15,12 +15,12 @@ function loginFailure(output: string): string {return "This server's Codex CLI needs updating for browser sign-in. Run npm install -g @openai/codex@latest on the server, then try again.";}if (/device.{0,40}(disabled|not enabled|not allowed)|enable.{0,40}device/i.test(output)) {- return "OpenAI did not allow device code sign-in. Turn it on in ChatGPT → Settings → Security (your ChatGPT admin may need to), then try again.";+ return "OpenAI did not allow device code sign-in. Turn it on in ChatGPT Settings → Security (your ChatGPT admin may need to), then try again.";}if (/expired|expiration|timed out/i.test(output)) {return "The ChatGPT sign-in code expired. Start sign-in again for a new code.";}- return "ChatGPT sign-in did not finish. If OpenAI said device code sign-in isn't allowed, turn it on in ChatGPT → Settings → Security (your ChatGPT admin may need to), then try again.";+ return "ChatGPT sign-in did not finish. If OpenAI said device code sign-in isn't allowed, turn it on in ChatGPT Settings → Security (your ChatGPT admin may need to), then try again.";}/** `loginFailure` as a fixed code: an expired code, device sign-in refused by the account's settings, else the command ended. */diff --git a/src/components/DeviceSignIn.interaction.test.ts b/src/components/DeviceSignIn.interaction.test.tsindex cc8e154a75..033483a06a 100644--- a/src/components/DeviceSignIn.interaction.test.ts+++ b/src/components/DeviceSignIn.interaction.test.ts@@ -58,7 +58,7 @@ beforeEach(() => {afterEach(() => { vi.unstubAllGlobals(); vi.useRealTimers(); });it("shows where to turn on device code sign-in before a code is asked for", () => {- expect(render().some((node) => node.type === "p" && text(node).includes("turn it on in ChatGPT → Settings → Security"))).toBe(true);+ expect(render().some((node) => node.type === "p" && text(node).includes("turn it on in ChatGPT Settings → Security"))).toBe(true);});it("says the sign-in was interrupted when the server no longer has it, and Try again starts a fresh one", async () => {@@ -82,7 +82,7 @@ it("says the sign-in was interrupted when the poll hears the server's interrupte});it("shows OpenAI's refusal as the server words it, with Try again and the setting to turn on", async () => {- const refused = "OpenAI did not allow device code sign-in. Turn it on in ChatGPT → Settings → Security (your ChatGPT admin may need to), then try again.";+ const refused = "OpenAI did not allow device code sign-in. Turn it on in ChatGPT Settings → Security (your ChatGPT admin may need to), then try again.";fixture.api.mockResolvedValueOnce({ auth: waiting });await startAndPoll(() => Promise.resolve({ auth: { phase: "failed", flowId: "flow-one", authorizationUrl: null, expiresAt: null, message: refused } }));expect(fixture.values[AUTH]).toMatchObject({ phase: "failed", message: refused });diff --git a/src/components/DeviceSignIn.test.ts b/src/components/DeviceSignIn.test.tsindex d4d69f6cce..78c92f9cef 100644--- a/src/components/DeviceSignIn.test.ts+++ b/src/components/DeviceSignIn.test.ts@@ -28,7 +28,7 @@ describe("Codex device sign-in UI", () => {it("says how to turn on device code sign-in as step 1, before the code", () => {const html = render(waiting);- const step = html.indexOf("1. If OpenAI says device code sign-in isn't allowed, turn it on in ChatGPT → Settings → Security");+ const step = html.indexOf("1. If OpenAI says device code sign-in isn't allowed, turn it on in ChatGPT Settings → Security");expect(step).toBeGreaterThan(-1);expect(html).toContain("your ChatGPT admin may need to");expect(html.indexOf("2. Enter this one-time code on OpenAI's sign-in page")).toBeGreaterThan(step);diff --git a/src/locales/en.json b/src/locales/en.jsonindex b5311c311f..d2cbed0dfb 100644--- a/src/locales/en.json+++ b/src/locales/en.json@@ -6370,7 +6370,7 @@"engineSetup.device.waiting": "Waiting for you to finish signing in…","engineSetup.device.expires": "Code expires at {time}","engineSetup.device.security": "Only enter a code you requested here. This signs Codex in for your bots and uses your account's limits. Your password stays with OpenAI, and the sign-in stays where your bots run.",- "engineSetup.device.enableNote": "If OpenAI says device code sign-in isn't allowed, turn it on in ChatGPT → Settings → Security (your ChatGPT admin may need to), then try again.",+ "engineSetup.device.enableNote": "If OpenAI says device code sign-in isn't allowed, turn it on in ChatGPT Settings → Security (your ChatGPT admin may need to), then try again.","engineSetup.device.connected": "ChatGPT connected. Your models are being refreshed.","engineSetup.device.connectedAccount": "ChatGPT connected","engineSetup.device.cancel": "Cancel sign-in",