mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-29 10:02:04 +00:00
ACP: cover operator admin mutating actions
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user