From ab26295ef5c57cb356e92eb5513ac732aa737e5b Mon Sep 17 00:00:00 2001 From: wenning Date: Wed, 4 Mar 2026 14:12:19 +0800 Subject: [PATCH] =?UTF-8?q?mcp=E6=89=93=E5=BC=80=E6=97=B6=E5=80=99,=20?= =?UTF-8?q?=E9=A2=9D=E5=A4=96=E6=B7=BB=E5=8A=A0--force=E5=8F=82=E6=95=B0?= =?UTF-8?q?=20=E4=BF=AE=E5=A4=8Dreadme=20typo:=20"openclaw=20plugin=20inst?= =?UTF-8?q?all"=20->=20"openclaw=20plugins=20install"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- src/runner.test.ts | 1 + src/runner.ts | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8880011..09f5178 100644 --- a/README.md +++ b/README.md @@ -134,7 +134,7 @@ Add the plugin source path to `plugins.load.paths` in `~/.openclaw/openclaw.json ```bash npm ci && npm run build && npm pack -openclaw plugin install cursor-agent-0.1.0.tgz +openclaw plugins install cursor-agent-0.1.0.tgz ``` ### 4. Configure diff --git a/src/runner.test.ts b/src/runner.test.ts index c75a58f..76d5def 100644 --- a/src/runner.test.ts +++ b/src/runner.test.ts @@ -247,6 +247,7 @@ describe("runCursorAgent", () => { const args = spawnMock.mock.calls[0]![1] as string[]; expect(args).toContain("--approve-mcps"); + expect(args).toContain("--force"); }); it("includes --model when model is specified", async () => { diff --git a/src/runner.ts b/src/runner.ts index 1cae91f..ed47845 100644 --- a/src/runner.ts +++ b/src/runner.ts @@ -31,7 +31,7 @@ function buildCommand(opts: RunOptions): { cmd: string; args: string[] } { } if (opts.enableMcp) { - agentArgs.push("--approve-mcps"); + agentArgs.push("--approve-mcps", "--force"); } if (opts.model) { agentArgs.push("--model", opts.model); @@ -52,7 +52,7 @@ function buildCommand(opts: RunOptions): { cmd: string; args: string[] } { } else if (opts.mode !== "agent") { parts.push("--mode", opts.mode); } - if (opts.enableMcp) parts.push("--approve-mcps"); + if (opts.enableMcp) parts.push("--approve-mcps", "--force"); if (opts.model) parts.push("--model", `'${opts.model}'`); parts.push(`'${escaped}'`);