Open-source Grok Bot alternative with a virtual machine that bots can use
TypeScript ai-agentsclaude-codecodexcomputer-usedockerelectrongrokgrok-botgrok-bot-alternativeself-hostedtypescript
Mistral Vibe: select ask by exact id, not the generic ACP mode aliases
RGB-loopfc42144d7e68
diff --git a/server/drivers/acp/mistral-vibe-approval-mode.test.ts b/server/drivers/acp/mistral-vibe-approval-mode.test.tsindex a45bd5b3fe..01a3ae4bb6 100644--- a/server/drivers/acp/mistral-vibe-approval-mode.test.ts+++ b/server/drivers/acp/mistral-vibe-approval-mode.test.ts@@ -89,6 +89,19 @@ describe("Mistral Vibe approval mode", () => {expect(recorder!.events.some((event) => event.type === "runtime.error" && event.message.includes('"ask" mode'))).toBe(true);});+ it("sends ask, not a custom default agent, when Vibe advertises both", async () => {+ await create({ FAKE_ACP_SESSION_MODES: "default,ask,accept-edits" });+ await expect(turn("full")).resolves.toMatchObject({ ok: true });+ expect(setModes()).toEqual([{ sessionId: "fake-acp-session", modeId: "ask" }]);+ });++ it("fails the turn when Vibe advertises a default agent but no ask", async () => {+ await create({ FAKE_ACP_SESSION_MODES: "default,accept-edits,auto-approve" });+ await expect(turn("ask")).resolves.toMatchObject({ ok: false });+ expect(methods()).not.toContain("session/set_mode");+ expect(methods()).not.toContain("session/prompt");+ });+it.each([-32602, -32603])("rethrows a set_mode rejection with code %i", async (code) => {const request = async () => { throw Object.assign(new Error("refused"), { code }); };await expect(mistralVibeSupport.configureSession!({diff --git a/server/drivers/acp/mistral-vibe.ts b/server/drivers/acp/mistral-vibe.tsindex 90ac5d1dff..054d3bcaf9 100644--- a/server/drivers/acp/mistral-vibe.ts+++ b/server/drivers/acp/mistral-vibe.ts@@ -26,7 +26,6 @@ import { createAcpDriver, type AcpConfig, type AcpSupport } from "./core.ts";import { discoverAcpModels } from "./custom-model-catalog.ts";import { acpModelOption } from "./config-options.ts";import { MISTRAL_VIBE_STANDALONE } from "./mistral-vibe-release.ts";-import { selectAdvertisedMode } from "./session-modes.ts";/** The stock chat-capable models mistral.ai lists for Vibe (only some ship per version; a signed-in* session's own list replaces these on Refresh). The `mistral-medium-3.5` id is the CLI's current default. */@@ -202,11 +201,14 @@ export const mistralVibeSupport: AcpSupport = {// vibe-acp 3.1.2 opens every session in config.toml's `default_agent`: "accept-edits" unless set, which writes files// without a permission request; "auto-approve" also runs shell commands without one. Every level OMB offers for- // Vibe maps to "ask"; OMB answers the requests itself.- async configureSession({ request, sessionId, config, turn, sessionModes }) {- const modeId = sessionModes ? selectAdvertisedMode(sessionModes.availableModes, turn.approvalMode, config.fullAuto) : "ask";+ // Vibe maps to "ask" by exact id, not the generic ACP aliases: a custom Vibe agent named "default" can have any+ // policy. OMB answers the requests itself.+ async configureSession({ request, sessionId, sessionModes }) {+ const modeId = "ask";// vibe-acp 3.1.2 answers session/set_mode for a mode it does not offer (`disabled_agents`) with success and keeps its own.- if (!modeId) throw new Error(`Mistral Vibe does not offer its "ask" mode; enable the "ask" agent in Vibe's config.toml`);+ if (sessionModes && !sessionModes.availableModes.some((mode) => mode.id === modeId)) {+ throw new Error(`Mistral Vibe does not offer its "ask" mode; enable the "ask" agent in Vibe's config.toml`);+ }try {await request("session/set_mode", { sessionId, modeId });} catch (error) {