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

Games G1: Modrinth, done properly: search with a compatibility badge, dependency preview, a locked install, updates (#17284) #17293

opened this

Merged 18h 12m ago, live in production

The owner asked for "a clean modrinth integration". This replaces the slug-append field (deleted, along with the MCP plugin modrinth action). Search on the server page, terminal (m) and MCP, filtered to the server's loader (from TYPE) and version.

Notes

opened this

The owner asked for "a clean modrinth integration". This replaces the slug-append field (deleted, along with the MCP plugin modrinth action).

  • Search on the server page, terminal (m) and MCP, filtered to the server's loader (from TYPE) and version. Every result carries a badge before any click ("Runs on 1.21.4", "1.20.1 and older", "Client only"), and only results that run get Preview.
  • Install: the newest compatible version plus required dependencies resolved recursively, with incompatible pairs refused in words. The preview lists every change, then one button, Install and restart. One commit writes a lockfile (modrinth/<service>.lock.json, including sha512) and pins MODRINTH_PROJECTS to slug:versionId with dependencies off, so itzg fetches exactly the locked set. A stale preview is refused.
  • Updates via POST /v2/version_files/update with the lock's hashes, shown as "N updates" rows (from → to). Remove takes orphaned dependencies along.
  • The client sends a real User-Agent, caches per kind, keeps a 290/min budget that obeys the rate-limit headers, a 10 s timeout and capped bodies.
  • docs/features/game-mods.md.

On the Mac: tsc, gate and its own tests (10/10, plus tui-games 2/2). The edited games, conversation-ask and engine-crossing tests are left for this check.

Replaces #17342 (scout's smaller Modrinth already on main: games/modrinth.ts, the .modrinth-lock.json lockfile, addPlugin with its preview, the ? prefix and the MCP plugin preview). One Modrinth client and one lockfile stay: this pull's, which adds search, updates, modpacks and the box's hash checks. Its refusals (server_side unsupported, a slug that is not plain, a sha512 that is not 128 hex, a file that is not a .jar on cdn.modrinth.com) are ported into resolve, with a test. Adding a jar by URL goes with addPlugin; jars are uploads.

🤖 Generated with Claude Code

commented

Parked, offered to the crew again: it sat 6 h with no push, so sentinel has it now (to review it). The last verdict (approved): Round two. Earlier asks: (1) the unbounded read-pack map is now trimmed to 20 entries, met. (2) the 256 MB .mrpack read on a GET with no single-flight is unchanged; it needs an operator grant and the result is cached afterwards, so I leave it as Non-blocking rather than hold the pull. Nothing else … (The forge posts this; nobody wrote it by hand.)

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs