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 #5436
MCP now has a mirrornow tool that does what the Backups page's "bring level" button does, for a forge admin. The new test, test/mcp.test.ts, test/mcp-docs.test.ts, test/mcp-size.test.ts and test/mcp-repo-labels.test.ts all pass, and bun x tsc --noEmit is clean. I did not run the rest of the suite.
stopped parked by the crew deploy 36111d5
MCP now has a mirror_now tool that does what the Backups page's "bring level" button does, for a forge admin. The new test, test/mcp.test.ts, test/mcp-docs.test.ts, test/mcp-size.test.ts and test/mcp-repo-labels.test.ts all pass, and bun x tsc --noEmit is clean. I did not run the rest of the suite.
- The tool:
mirror_nowtakes no arguments and callssnapshotsOf(ctx.app)?.mirrorNow()insrc/http/mcp.ts. It answers{ level, newest?, error?, says }, andsaysuses the page's four sentences: no mirror, source unreadable, level, not level. It is marked as a write and listed only for admins. A non-admin gets the usual "no such tool" error, as with the other admin-only tools. - Docs and tests:
docs/MCP.mdhas one new row, andtest/mcp.test.ts's expected tool list includes the new name.test/mcp-mirror-now.test.tscovers the three cases: no mirror answers the page's sentence, a non-admin is refused, and a local destination with a mirror reports level. - Size cap: the new tool pushed
tools/list133 bytes over the 37,000-byte headroom intest/mcp-size.test.ts. I did not raise the cap. I shortened the description ofmirror_nowand trimmed the descriptions offlow,access,asks,asks_act,issue,quotasandpropose_to_parent_forge. Only wording changed, and I kept thesignupphrases the existing test checks. - Not done: it needs only an admin account, not an admin-scope token, since the page asks no more. Unlike the Backups page, it does not take a form or a same-origin check, because MCP calls are authenticated by bearer token.
Parked by the crew: the check failed ("previews of idle pulls sleep > a pull touched an hour ago keeps its preview; one idle past the age loses its process, and its page says so") and the decider saw no point in another try
MCP now has a
mirror_nowtool that does what the Backups page's "bring level" button does, for a forge admin. The new test,test/mcp.test.ts,test/mcp-docs.test.ts,test/mcp-size.test.tsandtest/mcp-repo-labels.test.tsall pass, andbun x tsc --noEmitis clean. I did not run the rest of the suite.mirror_nowtakes no arguments and callssnapshotsOf(ctx.app)?.mirrorNow()insrc/http/mcp.ts. It answers{ level, newest?, error?, says }, andsaysuses the page's four sentences: no mirror, source unreadable, level, not level. It is marked as a write and listed only for admins. A non-admin gets the usual "no such tool" error, as with the other admin-only tools.docs/MCP.mdhas one new row, andtest/mcp.test.ts's expected tool list includes the new name.test/mcp-mirror-now.test.tscovers the three cases: no mirror answers the page's sentence, a non-admin is refused, and a local destination with a mirror reports level.tools/list133 bytes over the 37,000-byte headroom intest/mcp-size.test.ts. I did not raise the cap. I shortened the description ofmirror_nowand trimmed the descriptions offlow,access,asks,asks_act,issue,quotasandpropose_to_parent_forge. Only wording changed, and I kept thesignupphrases the existing test checks.Closes #5423