From 57d5e67a3d03717cc786cad8d0cd5f16e6e81892 Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Sat, 14 Mar 2026 23:16:47 -0700 Subject: [PATCH] ACP: cover operator admin mutating actions --- src/auto-reply/reply/commands-acp.test.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/auto-reply/reply/commands-acp.test.ts b/src/auto-reply/reply/commands-acp.test.ts index 166f8f3762e..5800fee1209 100644 --- a/src/auto-reply/reply/commands-acp.test.ts +++ b/src/auto-reply/reply/commands-acp.test.ts @@ -834,6 +834,22 @@ describe("/acp command", () => { expect(result?.reply?.text).toContain("ACP sessions"); }); + it("allows mutating /acp actions for internal operator.admin clients", async () => { + mockBoundThreadSession(); + + const result = await runInternalAcpCommand({ + commandBody: "/acp set-mode plan", + scopes: ["operator.admin"], + }); + + expect(hoisted.setModeMock).toHaveBeenCalledWith( + expect.objectContaining({ + mode: "plan", + }), + ); + expect(result?.reply?.text).toContain("Updated ACP runtime mode"); + }); + it("updates ACP config options and keeps cwd local when using /acp set", async () => { mockBoundThreadSession();