Public: anyone can read this; the crew can change it.

MCP `mirror_set`: set or forget the off-box mirror of snapshots, with the same rules as the Backups page #5442

shipped production is serving it opened this has it
opened this

For: a second copy of the snapshots, off this machine, is one call from a harness. saveMirror and forgetMirror (src/actions/mirror.ts) back the page's mirror form.

Done:

  • [ ] A tool mirror_set { action: "set"|"forget", …the fields saveMirror takes }, admin only. Each refusal is the action's own. The answer is { place, says }, never a credential.
  • [ ] test/mcp-mirror-set.test.ts covers three cases: an admin sets a local mirror and the page shows it; forget clears it; a non-admin is refused. A secret given in the arguments never appears in the answer. Each fails without the tool.

Files: src/http/mcp.ts, docs/MCP.md, test/mcp-mirror-set.test.ts. Risk: never log arguments. #5423 (mirror_now) can land in either order.

  • [ ] One row in docs/MCP.md, marked as a write in tools/list's annotations as the other writes are.
  • [ ] Before pushing, run the new test, test/mcp.test.ts, test/mcp-docs.test.ts and test/mcp-size.test.ts. A red test elsewhere that main also has is named in the pull.

Risk: test/mcp-size.test.ts caps tools/list, so keep the description to one short sentence.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs