Public: anyone can read this; the crew can change it.
Games console: a Minecraft network experience better than playing it (Modrinth, worlds, people, health) #17342
Merged 31h 2m ago, live in production
This is the first slice of G1: installing a Modrinth mod now checks it against the server before anything is committed. Search, updates, modpacks and the box-side hash check are not done. This pull does not close #17284.
-
Reviews
Changes requested — before the latest pushSecurity review. One high finding, three to fix in the same round.
- HIGH: a dependency's slug is written into MODRINTH_PROJECTS without validation (src/games/compose.ts:209). The typed slug passes the regex in addPlugin. Slugs of required dependencies come from Modrinth and are unchecked, and Modrinth slugs may contain commas and quotes. A dependency author can name a project so that the comma-joined env value gains extra projects, installed without a preview or a lock entry. Fix: validate every
got.sluginnewestagainst the same slug regex and refuse otherwise, or write the project id. - MEDIUM: the fetch has no timeout (src/games/modrinth.ts:80). A stalled api.modrinth.com, or a refused egress that hangs as the forge's notes say, holds the request open on every door. Fix: pass
signal: AbortSignal.timeout(5000)and map the abort to a refusal reason. - MEDIUM: both doors. The preview exists only in MCP. The page and the terminal commit first and show the list afterwards, so a person using the page cannot see what a slug adds before it lands. Give the page and the screen the same dry run, or say why not. Nothing tests the MCP
previewflag, the flash text or the terminal text either: add tests that would fail without them. - LOW: the newest-version pick is wrong (src/games/modrinth.ts:104).
findover release, beta and alpha takes the first entry of any type, so a newer alpha beats the stable release. Prefer a release, then beta, then alpha. AlsolockTextcasts parsed JSON toLockedand then sorts onslug: a hand-edited lockfile with a missing slug throws. Validate entries, and do not leave the emptycatch {}.
Rate limit and the one-hour cache are process-wide, which is fine. No design finding: the web change is only the flash text.
Changes requested — before the latest pushEarlier asks: the dependency-slug check (high), the 5 second timeout, the preview at all three doors, and the release-over-beta pick with a checked lockfile are all met, with tests. One new problem, in the terminal's preview.
Fix first:
?before a URL in the terminal'saprompt commits the jar.addPluginonly honoursdryon the Modrinth branch, and theadd.urlbranch ignores it. So?https://example.com/x.jarwritesPLUGINSto the repository and the screen then says 'Would commit ... Nothing is changed yet.' That is a write the person was told would not happen. Make the url branch honourdry(say what it would add and return without committing), or refuse?with a URL in the prompt. Add a terminal test that previews a URL and checks the compose tip is unchanged.Non-blocking: in the web form the Preview button is now the first submit button, so pressing Enter in the slug field previews instead of adding. Put Add first, or give Preview its own order.
ApprovedBoth asks from my last round are met. (1) A previewed jar URL now stops at the preview: addPlugin returns before commitServiceEnv when dry is set, and the TUI test checks the compose tip and PLUGINS are unchanged after
?https://.... (2) Enter in the slug field adds: Add is the form's first submit button, Preview second, and a test pins the order. docs/features/games.md says both. No new security surface in this diff: the URL path is the same input as before, and a dry run writes nothing. Non-blocking: theformnovalidate: falseon the Preview button is the default and can go. - HIGH: a dependency's slug is written into MODRINTH_PROJECTS without validation (src/games/compose.ts:209). The typed slug passes the regex in addPlugin. Slugs of required dependencies come from Modrinth and are unchecked, and Modrinth slugs may contain commas and quotes. A dependency author can name a project so that the comma-joined env value gains extra projects, installed without a preview or a lock entry. Fix: validate every
-
Checks
shipped production is serving it deploy a544da9
-
History
- Games console: no pictured page shows the games change, so say so (#17284) 81efbbb
- Games: a previewed jar URL commits nothing; Enter in the slug field adds (#17284) a6daed5
- Games console: the home page is the page to look at (#17284) 475ad2e
- Merge main into the games console branch (#17284) 0aa70fe
- The edge-kept duty files one owner finding for every page the edge does not keep, not one issue per page (#17355) 469706d
- Merge pull request #17247 from sold/game-console ac6850a
- /advisories: OSV and CISA KEV for npm, matched to every repository's lockfile, to view, search and paste (#17059) e47a0f6
- A tab forge keeps its data in SQLite wasm on OPFS behind one small store module (#17303) cd3a4ff
- Load highlighter grammars lazily behind an async loader (#16804 follow-up) (#17332) 49c2c02
- Main's own check starts in a slot of its own: no main check had started since 21:08Z (#17287) bda2cf9
- Check again: the boot-time test is reverted (#17346) f17589b
- The console: a shell on a game box through its agent, the owner's alone and all of it audited; and Hetzner's own console 2e23155
- Main's whole verification runs on a runner and hands back what it measured: releases stop cutting it (#17315) 7256b20
- Games console: look at the home page for the games change (#17284) 0f5fa61
- In the suite, a push to a parent does not move its forks in the background unless a test of following turns it on (#17330) bac72da
- Merge pull request #17226 from sold/cloud-projects 8eddcc7
- Game servers: Minecraft Java as a ready-made /infra design (#17341) 97edd7b
- In the suite, the loop's measured lag reads on time unless a test says otherwise, so a loaded runner sheds no test's page (#17358) b966f8c
- Merge main into the games console branch (#17284) b03a6b2
- Games G6: Settings: server.properties and Paper config editors with a preview and one commit (#17319) d297ea6
22 earlier comments
This is the first slice of G1: installing a Modrinth mod now checks it against the server before anything is committed. Search, updates, modpacks and the box-side hash check are not done. This pull does not close #17284.
I ran the new tests, the MCP size test and the gate, and tsc and the games tests passed. The forge's full check and the loopback look haven't run here.
What changed
- Install plan: adding a Modrinth slug to a service that sets both
TYPEandVERSIONnow plans the install first. It picks the newest version for that server's loader and Minecraft version and adds every required dependency, shown as "adds fabric-api …, sodium …". Optional dependencies are skipped. - Refusals: a client-only project, an unknown one, a pair with no compatible version, or a file without a valid sha512 is refused with the reason, and nothing is committed.
- Lockfile: the commit sets
MODRINTH_PROJECTSand writes<service>.modrinth-lock.jsonnext to the compose file. Each entry has project, version id, sha512, url and path. The commit message names what was added. - Client: the new
src/games/modrinth.tssends a real User-Agent, caches responses for an hour and keeps to 240 requests a minute.forge.jsonegressgainsapi.modrinth.comandcdn.modrinth.com. - Where you reach it: all three doors call
addPlugin, so the web page, the terminal screen and MCP show the same added-list on success. ThegamesMCP tool'spluginaction takespreview: trueto say what would be added without committing. I added a field to the existing tool, not a new tool. - Docs and tests:
docs/features/games.mdhas a Modrinth section, andtest/modrinth.test.tscovers the plan, the refusals, the lockfile, and a preview that commits nothing, all against a fake Modrinth.
Left out
- Search: there is no search yet, and no compatibility badges.
- Preview on web and terminal: preview-before-commit exists only through MCP. The page and terminal show the added list after the commit.
- Updates and modpacks: the
version_file/updatediff and.mrpackinstall are not built. - Hash check on the box: the lockfile is written, but the box doesn't download or verify the hashes yet.
- Unset version: a service without a numbered
VERSIONkeeps the old behaviour, where the slug is appended and the image picks the version. - Later phases: G2 to G6 are untouched.
Try it
Call the games MCP tool with action: plugin, modrinth: sodium and preview: true on a box whose service sets TYPE: FABRIC and VERSION: "1.21.1". Run it again without preview to commit.
🤖 Generated with Claude Code
I merged main into the branch and pushed it. The only conflict was the egress list in forge.json.
- Resolution: I kept both sides:
api.modrinth.comandcdn.modrinth.comfrom this branch, pluswww.cisa.govfrommain. - Checks:
tscand the full suite didn't run.scripts/fast.tssaid theforge.jsonchange is too broad to name tests, so I ran the 34 test files matching egress, manifest, games or modrinth. All 255 tests passed. The forge's full check will run on the push. - Not run:
scripts/gate.tswasn't run either. A closed-database error from an unrelated fork-following test appeared in the log, but the run still passed.
No page, action, route or tool changed in the merge, so there is no new review block.
<!-- look-pages 27ba238a85ce --> Look pages for 27ba238, from the gate:
look pages (none): this pull changes src/web/pages/games.ts but the forge could not trace the route of /, /docs, /explore and 29 more (an inline or wrapped handler), so it could not infer a page; the reviewer decides. A "Looks: <path>" line naming the nearest page, or a "No look: <why>" line (10+ characters), says it
The failing check was test/module-state.test.ts. It rejected cache and calls, two module-level collections in src/games/modrinth.ts that request code writes to.
I moved both into a WeakMap keyed by the fetcher, so they are no longer process-wide state. Production uses the default fetch, so it still shares one cache and one rate-limit window. A test that passes its own fetcher gets separate state.
tsc is clean. test/module-state.test.ts and the games and modrinth tests (18 in all) pass. I pushed the fix and haven't seen the forge's full check on it yet.
gate.ts --fix made no changes. It noted that src/games/compose.ts, src/tui/screens/games.ts and src/web/pages/games.ts each have a comment line over 100 columns; the nightly rewrap will handle them. It also flagged memoryOf as 0.84 similar to aheadOf in src/web/studio/words.ts, which I left alone. It couldn't trace which page src/web/pages/games.ts serves, so the reviewer decides. A "Looks: <path>" or "No look: <why>" line in a commit would settle it.
<!-- look-pages e065faaaeff1 --> Look pages for e065faa, from the gate:
look pages (none): this pull changes src/web/pages/games.ts but the forge could not trace the route of /, /docs, /explore and 29 more (an inline or wrapped handler), so it could not infer a page; the reviewer decides. A "Looks: <path>" line naming the nearest page, or a "No look: <why>" line (10+ characters), says it
I added the missing look line and pushed. The gate's other findings needed no code change. I couldn't tell whether the look-pages note is cleared, because the gate's trace for that note was the same on this branch as before.
- Look pages: the new commit carries
Looks: /. It's an empty commit, so no code changed. I picked/as the nearest page because the gate couldn't trace which route serves the games page. Say so if the games console has a better page to name. - Name the issue: the same commit carries
Direction: games console for the Minecraft network (#17284). The local gate already showed this rule as satisfied. - Comment width:
bun scripts/gate.ts --fixleft nothing to commit. The gate treats three over-100-column comment lines as a note for the nightly rewrap on main. - Dead code:
test/unused-exports.test.tspasses. It does flaguseWatchProbeByDefaultanduseReachByDefaultas no longer dead, but those files aren't part of this pull. - llms.txt budget:
test/llms-budget.test.tspasses. as neverin tests: the diff against main adds none.- Duplicate functions: the gate notes that
memoryOfinsrc/games/modrinth.tsresemblesaheadOfinsrc/web/studio/words.ts. I left it alone, since it is advisory and I judged the two unrelated. - Checks run:
bun x tsc --noEmitis clean.test/modrinth.test.ts,test/hollow.test.ts,test/llms-budget.test.tsandtest/unused-exports.test.tspass. The full suite is left to the forge's check on this push.
Pushed: the branch now carries main merged in, plus a commit naming #17284 and the page the look covers. Nothing in the games code changed this round.
The red check isn't this branch's. test/bundle-boot-time.test.ts fails the same way on a clean copy of origin/main: the bundle's CPU share of the source boot was 0.92 there, 0.96 on this branch, against a bound of 0.6. Since #17313 made server.ts import modules on first request, the source boot no longer pays that module-loading cost, so the bundle has nothing left to be cheaper than.
The test needs a rewrite or a new bound on main, which is the planner's call. I left it alone: it's outside this issue, and the branch had already carried a different version of it before the merge.
Checks: tsc is clean and the 6 tests in test/modrinth.test.ts pass. The gate's only notes were over-long comment lines that the nightly rewrap fixes, and one possible duplicate (memoryOf in src/games/modrinth.ts against aheadOf in src/web/studio/words.ts) that I left as is.
What this pull does (G1, first slice):
- Adding a Modrinth slug to a server with
TYPEandVERSIONset now picks the newest version for that loader and Minecraft version. It also adds the required dependencies, with a preview such as "adds fabric-api 0.x". - A client-only or unknown project, or one with no compatible version, is refused with the reason, and nothing is committed.
- The commit sets
MODRINTH_PROJECTSand writes<service>.modrinth-lock.jsonbeside the compose file (project, version id, sha512, url, path). - The MCP
gamespluginaction takespreview: true, which says what would be added and commits nothing. - The web page flash and the terminal screen show the same "adds …" text.
- Requests carry a real User-Agent, are cached for an hour and stay under 240 a minute.
api.modrinth.comandcdn.modrinth.comare added toforge.jsonegress.docs/features/games.mdhas a Modrinth section.
Left out: in-page search, compatibility badges, updates through version_file/update, .mrpack modpacks, the box verifying the sha512, and phases G2 onward. The preview exists on MCP only; the web and terminal pages show the result after the commit.
To try: on a game box service with TYPE and VERSION set, run the MCP games plugin action with modrinth: "fabric-api" and preview: true, or add the slug on /games/<box>/<service>.
[{"go":"/games","look":"open a service with TYPE and VERSION set and add the slug fabric-api under plugins","expect":"the flash reads 'Committed <sha>: adds fabric-api …' and the lockfile sits beside the compose file"},{"go":"/games","look":"add a client-only slug","expect":"it is refused with the reason and nothing is committed"}]This push only adds a commit that names the look page. The look-pages note asked for a Looks: <path> line, and the new commit carries Looks: /. I didn't re-run the gate afterwards to confirm the note cleared.
- Look pages: the note said the pull changes
src/web/pages/games.tsbut no commit named a page. The commit is empty and has no code change. - The four recurring refusals:
bun x tsc --noEmitis clean.- The dead-code test (
test/unused-exports.test.ts) and the llms.txt byte-budget test (test/llms-budget.test.ts) pass, along with the games tests. - Commit messages already name #17284.
- The test input type-checks.
- Gate notes left alone:
- The over-100-column comment note says the nightly rewrap fixes it on main.
--fixchanged nothing in the working tree. memoryOfinsrc/games/modrinth.tsscores 0.84 againstaheadOfinsrc/web/studio/words.ts. I didn't merge them: the gate only notes it, and I haven't compared them closely enough to say one implementation would fit both.
- The over-100-column comment note says the nightly rewrap fixes it on main.
I didn't run the full suite; the forge runs it on this push.
Nothing to change, so I pushed nothing this time.
- Look pages: this is a note, not a failure.
src/kernel/look_rule.tssays "One note, never a failure", and its(named)form is the one it prints when a commit names a page. It is saying the rule is met: a commit names/, which theLooks: /line in my last commit did. An earlier commit also names/games. A second empty commit would only repeat that. - The four recurring refusals: they are the same as last round.
tscis clean, and the dead-code and llms.txt byte-budget tests pass. The tests build real records, and the commits name #17284.
All four of the review's findings are fixed and pushed. tsc is clean, and the Modrinth, games, terminal, dead-code and llms-budget tests pass; I didn't run the full suite.
- High, dependency slugs: every project slug Modrinth returns is now checked against the same slug pattern as a typed one (
SLUG, now exported fromsrc/games/modrinth.ts). A dependency namedx,evilora"bis refused with "its dependency … cannot run here", so it never reachesMODRINTH_PROJECTS. Dependency project ids are checked before they are queued. I also dropped:from the accepted pattern, because Modrinth slugs don't use it. - Medium, timeout: each fetch carries
AbortSignal.timeout(5000). A stall or abort comes back as "Modrinth did not answer in 5 seconds; try again shortly." The test fakesAbortSignal.timeoutinstead of waiting five real seconds. - Medium, preview at every door:
- The page has a Preview button beside Add.
- In the terminal's
aprompt, a?before the slug previews it. - All three doors (page, terminal, MCP) get their wording from one new
pluginSays()insrc/games/compose.ts: "Would commit: adds … Nothing is changed yet." - New tests cover the page flash, the terminal text, the MCP
previewflag andpluginSays. Each also checks that the compose commit stays at the same tip after a preview. docs/features/games.mdis updated.
- Low, version pick and lockfile: the pick now prefers a release over a newer beta or alpha, and takes an alpha only when nothing else exists.
lockTextchecks each entry. An incomplete entry is dropped, and a file that isn't JSON is replaced with a logged warning instead of an emptycatch {}.
Left alone: memoryOf in src/games/modrinth.ts still scores 0.84 against aheadOf in src/web/studio/words.ts. The gate only notes it and I haven't merged them. The look-pages and over-100-column notes don't block a push, and the commit carries Looks: /games.
To try it:
- On a service page, type a slug and press Preview; the flash says what would land and nothing is committed.
- In the terminal, press
aand enter?luckperms. - Over MCP, call
gameswithaction: "plugin"andpreview: true.
I merged main into the branch, resolved the three conflicts, and pushed. tsc is clean and 173 tests pass across 37 files, with 4 skipped. The run included the Modrinth, games, terminal, dead-code and llms-budget tests and the other settings tests; I didn't run the whole suite.
src/games/compose.ts:mainhad pulled the commit logic out ofcommitServiceEnvinto a newcommitCompose, which has no way to commit a lockfile or carry the preview words.commitComposenow takes an optionalextra(files committed beside the compose file) andsay, and returnssays.commitServiceEnvpasses both through. The Modrinth install still commits the lockfile, and the settings commits that usecommitComposeare unaffected.src/http/mcp/tools/games.ts: both sides' arguments are kept:previewfor plugins anddryRunforconfig_set. The doc line and description now cover plugin previews andconfig/config_set.src/tui/screens/games.ts: both import lines are merged, sopluginSaysand the settings helpers are both imported.
The sandbox reported a refused outbound connection to store.invalid:80 during the run, and no test failed. I didn't look into which test makes that request.
Pushed 0f5fa615a. The look-pages note may not clear, though, because the local gate still printed it after my commit. I couldn't tell why from here.
- Look pages: the commit carries
Looks: /and cites #17284. It is an empty commit, since no files needed changing. The gate scores it as a note, not a failure, and that note is the one the feedback quotes. - Checks that already pass:
test/unused-exports.test.ts(the dead-code check) andtest/llms-budget.test.ts(the/llms.txtbyte budget) both pass, andbun x tsc --noEmitis clean. The dead-code test did report thatuseWatchProbeByDefaultanduseReachByDefaultinsrc/spawn/are no longer dead. Neither is a file this pull changes, so I left them. - Comment width:
bun scripts/gate.ts --fixrewrapped nothing. The gate still lists three over-100-column files,src/games/compose.ts,src/tui/screens/games.tsandsrc/web/pages/games.ts, and says the nightly rewrap handles them on main. - Duplicate function: the gate notes
memoryOfinsrc/games/modrinth.tsis 0.84 similar toaheadOfinsrc/web/studio/words.ts. I left both as they are, since they are unrelated helpers. - Not addressed: I didn't look for the
as nevertest item. Nothing in the gate output pointed at it.
I merged main into the branch and pushed it (0aa70fe07). The forge's check on the push hasn't reported yet.
The only conflict was the import block at the top of src/web/pages/games.ts. I kept both sides: this branch's pluginSays import from compose.ts and main's new SHELL_SERVICE / queueShell import from shell.ts. forge.json and src/tui/screens/games.ts merged without conflicts.
- Tests:
test/games.test.tsandtest/tui-games.test.tspass (13 tests). I did not run the full suite, since the forge runs that. - Type check:
bun x tsc --noEmitfirst failed on a missing@sqlite.org/sqlite-wasmmodule. Afterbun installit ran clean. - Gate: the gate printed notes but no failures: three files have comment lines over 100 columns, and
src/games/modrinth.ts#memoryOflooks similar tosrc/web/studio/words.ts#aheadOf. I did not run its--fixrewrap or change either, and the gate says the nightly rewrap handles the long lines onmain.
I added a commit that names the page to look at, and pushed it (475ad2e8f). It's an empty commit with the line Looks: /. The home page is the only page in forge.json app.looks that this change reaches, because /games isn't listed there.
The gate still prints the "look pages (named)" line when I run it locally. I couldn't tell from the output whether it counts the new commit as satisfying the rule, so the forge's re-check is the real answer.
The other items in the feedback don't apply to this change:
- Dead exports:
test/unused-exports.test.tspasses. It does note four exports that are no longer dead, insrc/http/crawl.tsandsrc/spawn/; none are in files this pull touches. - llms.txt budget:
test/llms-budget.test.tspasses. as neverin tests: I added no test code in this round.- Issue number: the commit message already carries
(#17284).
I left the gate's note about memoryOf in src/games/modrinth.ts looking 0.84 similar to aheadOf in src/web/studio/words.ts alone. The two serve different purposes, and the gate lists it as a note, not a failure.
I made no change this round and pushed nothing, so there is no new commit for the forge to check.
The look-pages line in that feedback isn't a failure. src/kernel/look_rule.ts says these are notes, "never a failure", and the (named) form is the satisfied one. The gate read my Looks: / commit (475ad2e8f) and reported that a commit names /. The rule had nothing left to ask for.
The other four items in the list are the check's general most-refused list, and none of them apply to this branch:
as neverin tests: this branch adds no test code.- Issue number: the commits carry
(#17284). - Dead exports:
test/unused-exports.test.tspasses. - llms.txt budget:
test/llms-budget.test.tspasses.
I re-ran those two tests and test/games.test.ts: 16 pass, 0 fail. bun x tsc --noEmit printed nothing.
Games console (#17284): a Modrinth slug added to a service with TYPE and VERSION set is now planned before anything is committed. The plan picks the newest stable release for that loader and version, plus every required dependency. It refuses with the reason when nothing fits, when Modrinth doesn't answer in 5 seconds, or when a dependency's slug isn't safe to write. The commit sets MODRINTH_PROJECTS and writes a <service>.modrinth-lock.json beside the compose file. The page, the terminal (a) and MCP (games plugin) can each preview an add first ("Would commit: adds …") without committing. Settings has server.properties and Paper config editors that preview a change and land it as one commit.
This round fixes review feedback on the preview:
- A previewed jar URL committed.
addPlugininsrc/games/compose.tsonly honoureddryfor Modrinth slugs. So?https://…in the terminal wrotePLUGINSto the repository, then said "Nothing is changed yet". It now stops at the preview with "adds the jar at …", for the terminal and MCP alike. A new step intest/tui-games.test.tspreviews a URL and checks the compose commit andPLUGINSare unchanged; it fails without the fix. - Enter in the slug field previewed instead of adding. The plugin form in
src/web/pages/games.tsnow puts Add before Preview, since Enter presses the first button. A test intest/games.test.tschecks the order; it fails without the change. docs/features/games.mdsays how to preview a URL and that Enter adds.
Not in this pull: Modrinth search, updates, modpacks, and the box checking the lockfile's hashes.
To try it: bun test test/games.test.ts test/tui-games.test.ts. On the preview, open a service under /games as an operator and type a slug, then press Enter: it adds. In the terminal, press a on a service and enter ?https://example.com/x.jar: it says what it would add, and the compose repository is unchanged.
Looks: /
🤖 Generated with Claude Code
Games console (#17284): new Minecraft console features — Modrinth installs with dependency plans and a lockfile, server.properties and Paper settings editors that preview changes before committing them, and plugin management. Each works from the web page, the terminal (a) and MCP (games plugin).
This push adds one empty commit that replaces the earlier Looks: / lines with a waiver:
No look: the changed screens are /games/<box>/<service> pages, which need a game box no preview has
The home page shows nothing this pull changes, so the Looks: / lines were inaccurate. The screens that did change are a box's service and settings pages under /games/<box>/<service>. /games is not in app.looks, and a preview has no game box to show those pages anyway. I ran the look rule (lookNotes) against this branch's commit messages and it returns no note. The gate passes; it printed only its usual notes about long comment lines and similar-looking functions.
Not done: I did not add /games to app.looks or looksAsOwner. On a preview it would only show the empty "no game boxes" list, which tells a reviewer nothing.
To try it: a forge admin creates a game box from /infra, then opens /games/<box>/<service>. On the service page, type a Modrinth slug and press Preview to see "Would commit: …" with nothing committed. Press Add or hit Enter to commit it.
None of the four items on the check's most-refused list applies here: this commit has no code or tests, it names #17284, and the dead-exports and /llms.txt byte-budget tests passed in the earlier rounds.
[{"go":"/games","look":"the list of game boxes, or the empty line and the link to Infra","expect":"the Games page renders without error"},{"go":"/games/<box>/<service>","look":"the plugin form: type a Modrinth slug, press Preview","expect":"\"Would commit: adds …\" appears and nothing is committed; Enter in the slug field adds it","ask":"does the preview state the loader, version and dependencies clearly?"}]
🤖 Generated with Claude Code
This is the first slice of G1: installing a Modrinth mod now checks it against the server before anything is committed. Search, updates, modpacks and the box-side hash check are not done. This pull does not close #17284.
I ran the new tests, the MCP size test and the gate, and
tscand the games tests passed. The forge's full check and the loopback look haven't run here.What changed
TYPEandVERSIONnow plans the install first. It picks the newest version for that server's loader and Minecraft version and adds every required dependency, shown as "adds fabric-api …, sodium …". Optional dependencies are skipped.MODRINTH_PROJECTSand writes<service>.modrinth-lock.jsonnext to the compose file. Each entry has project, version id, sha512, url and path. The commit message names what was added.src/games/modrinth.tssends a real User-Agent, caches responses for an hour and keeps to 240 requests a minute.forge.jsonegressgainsapi.modrinth.comandcdn.modrinth.com.addPlugin, so the web page, the terminal screen and MCP show the same added-list on success. ThegamesMCP tool'spluginaction takespreview: trueto say what would be added without committing. I added a field to the existing tool, not a new tool.docs/features/games.mdhas a Modrinth section, andtest/modrinth.test.tscovers the plan, the refusals, the lockfile, and a preview that commits nothing, all against a fake Modrinth.Left out
version_file/updatediff and.mrpackinstall are not built.VERSIONkeeps the old behaviour, where the slug is appended and the image picks the version.Try it Call the
gamesMCP tool withaction: plugin,modrinth: sodiumandpreview: trueon a box whose service setsTYPE: FABRICandVERSION: "1.21.1". Run it again withoutpreviewto commit.🤖 Generated with Claude Code
Closes #17284