Open-source Grok Bot alternative with a virtual machine that bots can use
TypeScript ai-agentsclaude-codecodexcomputer-usedockerelectrongrokgrok-botgrok-bot-alternativeself-hostedtypescript
fix(#6450): accept vibe-acp's Windows file name in the --version probe
Santhi Prakash169cdef3e44a
diff --git a/server/cli-probe.test.ts b/server/cli-probe.test.tsindex dfb64c29bd..5bc9f9c042 100644--- a/server/cli-probe.test.ts+++ b/server/cli-probe.test.ts@@ -1,13 +1,22 @@import { expect, it, vi } from "vitest";import { testCliBinary } from "./cli-probe.ts";+import { MistralVibeAgentDriver } from "./drivers/acp/mistral-vibe.ts";import { OpenCodeDriver } from "./drivers/acp/opencode-go.ts";const FULL_PROCESS_TABLE_CLI = "omb-eagain-cli-for-this-test";+const PROBED_VERSIONS: Record<string, string> = {+ "omb-vibe-acp-exe": "vibe-acp.EXE 3.1.2\n",+ "omb-vibe-acp-upper": "VIBE-ACP.EXE 3.1.2\n",+ "omb-vibe-acp-other": "other-cli 1.0\n",+};+vi.mock("./procs.ts", async (importOriginal) => {const actual = await importOriginal<typeof import("./procs.ts")>();const execCli: typeof actual.execCli = (cli, args, opts, cb) => {+ const version = PROBED_VERSIONS[cli];+ if (version !== undefined) return cb(null, version);if (cli !== FULL_PROCESS_TABLE_CLI) return actual.execCli(cli, args, opts, cb);cb(Object.assign(new Error(`spawn ${cli} EAGAIN`), { code: "EAGAIN" }), "");};@@ -28,3 +37,16 @@ it("offers no install for a CLI that could not start because the machine is outexpect(result.message).toContain("There is no room to start another program (EAGAIN)");expect(result).not.toHaveProperty("install");});++it.each([+ ["omb-vibe-acp-exe", "vibe-acp.EXE 3.1.2"],+ ["omb-vibe-acp-upper", "VIBE-ACP.EXE 3.1.2"],+])("accepts %s answering --version as %s (Windows keeps the file name's extension and case)", async (cli, version) => {+ expect(await testCliBinary(cli, MistralVibeAgentDriver)).toEqual({ ok: true, version });+});++it("still rejects another program answering --version through vibe-acp's path", async () => {+ const result = await testCliBinary("omb-vibe-acp-other", MistralVibeAgentDriver);+ expect(result.ok).toBe(false);+ expect(result.message).toBe("`omb-vibe-acp-other` is not Mistral (Vibe)'s CLI: it answered --version as another program.");+});diff --git a/server/drivers/acp/mistral-vibe.ts b/server/drivers/acp/mistral-vibe.tsindex 14d5bf72df..7e5c4a8814 100644--- a/server/drivers/acp/mistral-vibe.ts+++ b/server/drivers/acp/mistral-vibe.ts@@ -138,7 +138,9 @@ export const mistralVibeSupport: AcpSupport = {displayName: "Mistral (Vibe)",models: MISTRAL_VIBE_MODELS,defaultCli: "vibe-acp",- cliVersion: /^vibe-acp /u,+ // On Windows the CLI prints its file name: PATHEXT resolves a bare `vibe-acp` to `vibe-acp.EXE`,+ // and the standalone build keeps the extension and case it was launched as.+ cliVersion: /^vibe-acp(?:\.exe)? /iu,nativeSource: "mistral-vibe.acp",images: true,loginNote: