Open-source Grok Bot alternative with a virtual machine that bots can use
TypeScript ai-agentsclaude-codecodexcomputer-usedockerelectrongrokgrok-botgrok-bot-alternativeself-hostedtypescript
test: exercise dotted ambient Codex names with a valid tool scope
Afloat6fe4366c0b17
diff --git a/server/drivers/codex-mcp-names.test.ts b/server/drivers/codex-mcp-names.test.tsindex 0dff21fa13..ceac216e56 100644--- a/server/drivers/codex-mcp-names.test.ts+++ b/server/drivers/codex-mcp-names.test.ts@@ -126,9 +126,4 @@ describe("Codex literal MCP override keys", () => {]);expect(codexMcpDisableArgs(new Set())).toEqual([]);});-- it.each(["notes.prod", "notes prod", 'notes"prod'])("gives %s a safe and unoccupied CLI mount name", (name) => {- expect(mountedMcpServerName(name, new Set())).toBe("notes_prod");- expect(mountedMcpServerName(name, new Set(["notes_prod", "notes_prod_openmausbot"]))).toBe("notes_prod_openmausbot2");- });});diff --git a/server/drivers/codex-mcp-names.ts b/server/drivers/codex-mcp-names.tsindex 7b931d6057..22e9a819e1 100644--- a/server/drivers/codex-mcp-names.ts+++ b/server/drivers/codex-mcp-names.ts@@ -81,9 +81,8 @@ export function codexConfigRunsServer(config: CodexConfigMcp, name: string, serv}export function mountedMcpServerName(name: string, taken: ReadonlySet<string>): string {- const safeName = name.replace(/[^A-Za-z0-9_-]/g, "_") || "mcp";- if (!taken.has(safeName)) return safeName;- let candidate = `${safeName}_openmausbot`;- for (let i = 2; taken.has(candidate); i++) candidate = `${safeName}_openmausbot${i}`;+ if (!taken.has(name)) return name;+ let candidate = `${name}_openmausbot`;+ for (let i = 2; taken.has(candidate); i++) candidate = `${name}_openmausbot${i}`;return candidate;}diff --git a/server/drivers/codex.test.ts b/server/drivers/codex.test.tsindex 8f304df550..57253ad82f 100644--- a/server/drivers/codex.test.ts+++ b/server/drivers/codex.test.ts@@ -304,10 +304,10 @@ describe("CodexDriver turns (fake app-server)", () => {await create({ environment: { HOME: scratch, CODEX_HOME: join(scratch, ".codex"), FAKE_CODEX_MCP_OVERRIDES: "1" } });await instance.adapter.sendTurn({threadId: "scope-literal-name", text: "Fixture",- toolScope: { allow: ["native:*", "mcp:agents:*", "mcp:notes.prod:read"] },+ toolScope: { allow: ["native:*", "mcp:agents:*", "mcp:notes:read"] },integrations: {agents: { command: "node", args: ["agents.js"], env: {} },- custom: { "notes.prod": { type: "http", url: "https://example.test/private", headers: {} } },+ custom: { notes: { type: "http", url: "https://example.test/private", headers: {} } },},});await recorder.until((event) => event.type === "turn.completed");@@ -317,7 +317,7 @@ describe("CodexDriver turns (fake app-server)", () => {expect(seen.argv).not.toContain("mcp_servers.notes.prod.enabled=false");expect(seen.argv.indexOf(table)).toBeLessThan(seen.argv.findIndex((arg: string) => arg.startsWith("mcp_servers.agents.command=")));const selected = seen.calls.find((call: { method: string }) => call.method === "thread/start").params.config.mcp_servers;- expect(Object.keys(selected)).toEqual(["agents", "notes_prod"]);+ expect(Object.keys(selected)).toEqual(["agents", "notes"]);expect(seen.calls.filter((call: { method: string }) => call.method === "turn/start")).toHaveLength(1);});