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

MCP `mirror_now`: bring the off-box mirror level now, as the Backups page's button does, for a forge admin #6302

shipped production is serving it opened this has it
opened this

Replaces #5423, tried twice. For: after a snapshot, the owner makes sure a copy left the machine from any harness. backupsMirrorNow (src/web/pages/backups.ts, snapshotsOf(ctx.app)?.mirrorNow()) has no MCP twin.

Done:

  • [ ] src/http/mcp/tools/mirror_now.ts, shaped like mirror_set.ts: no arguments, writes: true, adminOnly: true, needsAdminScope: true; it answers { level, newest?, error?, says }, says worded as the Backups page's flash for each case (no mirror; source unreadable; level; not level). src/http/mcp/tools/index.ts regenerated with bun scripts/mcp-tools.ts.
  • [ ] test/mcp-write-scope.test.ts: mirror_now: {} added to ADMIN_ARGS. This is why the second try went red: that test lists every admin-scope tool by name.
  • [ ] test/mcp-mirror-now.test.ts: with no mirror it answers the page's sentence; a non-admin is refused; with a local destination and mirror it reports level. Each case fails without the tool.
  • [ ] One row in docs/MCP.md.
  • [ ] Run the new test, test/mcp-write-scope.test.ts, test/mcp.test.ts, test/mcp-docs.test.ts and test/mcp-size.test.ts. The first try went red on the idle-previews test, which this does not touch: if it is red again, say so in the pull and do not chase it.

Files: src/http/mcp/tools/mirror_now.ts, src/http/mcp/tools/index.ts, test/mcp-write-scope.test.ts, test/mcp-mirror-now.test.ts, docs/MCP.md.

Risk: test/mcp-size.test.ts caps tools/list, so keep description to a few words, as mirror_set's is.

commented

Parked by the steward, 2026-10-26 (owner: "get us unclogged now then resume everything else"). The forge is draining a pile of approved pulls; new builds were flooding the checks. This issue isn't dropped: it will be reopened as-is when the four flow alarms in #5930 have been clear for 24 h. The list is kept in the steward's parked-2026-10-26 file.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs