Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

train: a Full Vibe bot keeps answering when Vibe's ask agent is switched off

milind-sonibd97a0fbd846
diff --git a/server/drivers/acp/mistral-vibe-approval-mode.test.ts b/server/drivers/acp/mistral-vibe-approval-mode.test.ts
index 01a3ae4bb6..b886916359 100644
--- a/server/drivers/acp/mistral-vibe-approval-mode.test.ts
+++ b/server/drivers/acp/mistral-vibe-approval-mode.test.ts
@@ -89,6 +89,13 @@ describe("Mistral Vibe approval mode", () => {
expect(recorder!.events.some((event) => event.type === "runtime.error" && event.message.includes('"ask" mode'))).toBe(true);
});
+ it("keeps Vibe's own agent on Full when Vibe does not offer ask, so a Full bot still answers", async () => {
+ await create({ FAKE_ACP_SESSION_MODES: "accept-edits,auto-approve" });
+ await expect(turn("full")).resolves.toMatchObject({ ok: true });
+ expect(methods()).not.toContain("session/set_mode");
+ expect(methods()).toContain("session/prompt");
+ });
+
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 });
diff --git a/server/drivers/acp/mistral-vibe.ts b/server/drivers/acp/mistral-vibe.ts
index 054d3bcaf9..72885368a2 100644
--- a/server/drivers/acp/mistral-vibe.ts
+++ b/server/drivers/acp/mistral-vibe.ts
@@ -203,10 +203,12 @@ export const mistralVibeSupport: AcpSupport = {
// without a permission request; "auto-approve" also runs shell commands without one. Every level OMB offers for
// 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 }) {
+ async configureSession({ request, sessionId, sessionModes, config, turn }) {
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.
+ // Full approves everything anyway, so there Vibe keeps its own agent and the turn goes on as it did before.
if (sessionModes && !sessionModes.availableModes.some((mode) => mode.id === modeId)) {
+ if (config.fullAuto || turn.approvalMode === "full") return;
throw new Error(`Mistral Vibe does not offer its "ask" mode; enable the "ask" agent in Vibe's config.toml`);
}
try {