From 8c2016b4e765aed801db00f62b56ee44a7c39481 Mon Sep 17 00:00:00 2001 From: hermes-agent Date: Sat, 14 Nov 2026 21:43:10 +0100 Subject: [PATCH] romm-mcp: apply the delete-tools patch in postPatch --- packages/romm-mcp/package.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/romm-mcp/package.nix b/packages/romm-mcp/package.nix index 03f7cd8..b00ad51 100644 --- a/packages/romm-mcp/package.nix +++ b/packages/romm-mcp/package.nix @@ -28,6 +28,15 @@ buildNpmPackage rec { # working endpoint. Upstream publishes no sources in the npm tarball, so this patches # the compiled dist/ directly; drop it once upstream restores runScan(). patch -p1 < ${./romm-mcp-scan.patch} + + # RomM 5.x only deletes the file when POST /api/roms/delete carries delete_from_fs[]; + # 1.0.5 exposes no delete tool at all (client.deleteRoms sends roms[] alone and no + # tool calls it), so a cleanup from MCP was impossible. This patch adds + # romm_delete_rom (row + file, delete_from_fs on by default) and + # romm_delete_rom_file (drop one duplicate of a multi-file ROM). Both are pure + # insertions guarded by confirm_delete, and both were exercised against RomM 5.4.1: + # dist-only again, so drop the patch when upstream ships the tools. + patch -p1 < ${./romm-mcp-delete.patch} ''; # dist/*.js (tsc output) ships inside the npm tarball, so there is nothing to