From ee100f00c300ccd7b0b49b3028903461c772d401 Mon Sep 17 00:00:00 2001 From: leemour Date: Wed, 18 Nov 2026 00:35:13 +0100 Subject: [PATCH] docs(kit): a new CLI's README says that over MCP ask does not ask NEED-2731 B keeps ask as the default for the api group's deletes. Over MCP nobody answers it, so the agent runs them. A CLI with an api group now says so beside the MCP setup, says each write is kept in runs list, and gives the two commands that stop it for a profile: config set permissions.api readonly, or permissions.api. deny. Both were run on a CLI made with new --spec openapi. Co-Authored-By: Claude Opus 5.5 --- changes/docs-mcp-ask-runs.md | 5 +++++ kit/src/new.ts | 10 ++++++++++ kit/test/preset.test.ts | 10 ++++++++++ 3 files changed, 25 insertions(+) create mode 100644 changes/docs-mcp-ask-runs.md diff --git a/changes/docs-mcp-ask-runs.md b/changes/docs-mcp-ask-runs.md new file mode 100644 index 0000000..475aa5f --- /dev/null +++ b/changes/docs-mcp-ask-runs.md @@ -0,0 +1,5 @@ +### Added + +- **A new CLI's README says that over MCP `ask` does not ask.** A CLI with an api group gets one paragraph beside + the MCP setup: the agent runs the API's writes and deletes, each one is kept in `runs list`, and + `config set permissions.api readonly` or `permissions.api. deny` stops them for a profile. diff --git a/kit/src/new.ts b/kit/src/new.ts index 18299c8..0edbf03 100644 --- a/kit/src/new.ts +++ b/kit/src/new.ts @@ -598,6 +598,16 @@ export const cliReadme = (names: Names, facts: ReadmeFacts): string => { `until you review its permissions and pass \`--allow-writes\`. \`${cli} personal mcp config\` prints the setup for`, "any other MCP client.", "", + ...(facts.api + ? [ + // NEED-2731 B: `ask` stays the default for the api group's deletes; over MCP nobody answers it, so say so. + "Over MCP nobody is there to answer `ask`, so the agent runs the API's writes and deletes without asking. Each", + `one is kept as a run in \`${cli} personal runs list\`. To stop that, make the profile read-only with`, + `\`${cli} personal config set permissions.api readonly\`, or refuse one operation with`, + `\`${cli} personal config set permissions.api. deny\`. \`${cli} api list\` names the operations.`, + "", + ] + : []), "## What it can do", "", "[docs/commands.md](docs/commands.md) lists every command, and `--help` after any of them shows its flags.", diff --git a/kit/test/preset.test.ts b/kit/test/preset.test.ts index c117746..944feee 100644 --- a/kit/test/preset.test.ts +++ b/kit/test/preset.test.ts @@ -97,6 +97,16 @@ describe("the new CLI's README", () => { expect(existsSync(join(dir, `docs/${page}.md`))).toBe(true) } for (const block of readme.match(/```sh\n[\s\S]*?```/g) ?? []) expect(block).not.toMatch(/<[a-z]/) + expect(readme).not.toContain("permissions.api") + }) + + it("says that over MCP ask runs the api group's writes, and how to stop them, when the CLI has one", async () => { + const { dir } = await makeGeneric({ owner: "example", spec: "openapi" }) + + const readme = read(dir, "README.md") + expect(readme).toContain("Over MCP nobody is there to answer `ask`, so the agent runs the API's writes and deletes") + expect(readme).toContain("`acme personal config set permissions.api readonly`") + expect(readme).toContain("`acme personal config set permissions.api. deny`") }) })