ACP: cover operator admin mutating actions

This commit is contained in:
Vincent Koc 2026-03-14 23:16:47 -07:00
parent 23fad21403
commit 57d5e67a3d
1 changed files with 16 additions and 0 deletions

View File

@ -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();