{"draft":null,"from":22,"to":23,"files":[{"path":"client/src/mcp.ts","added":13,"removed":7,"diff":"--- a/client/src/mcp.ts\n+++ b/client/src/mcp.ts\n@@ -120,12 +120,15 @@\n \treturn rel === \"\" || (rel !== \"..\" && !rel.startsWith(`..${sep}`) && !isAbsolute(rel));\n }\n \n+/** The tool inputs that name files on this machine to read, comma-separated: each is confined like the folder. */\n+export const FILE_INPUTS = [\"attach\", \"clean\"] as const;\n+\n /**\n  * Where a tool call runs, and what it may read: its folder and\n- * every --attach file stay inside the folder the server started in. A relative\n- * path that climbs out (..), an absolute one elsewhere, or a link out is\n- * refused, so no tool reads a file outside the project. Answers the folder, or\n- * why the call is refused.\n+ * every file a FILE_INPUTS input names stay inside the folder the server\n+ * started in. A relative path that climbs out (..), an absolute one elsewhere,\n+ * or a link out is refused, so no tool reads a file outside the project.\n+ * Answers the folder, or why the call is refused.\n  */\n export function confineCall(\n \tstart: string,\n@@ -137,15 +140,18 @@\n \t\treturn {\n \t\t\trefused: `folder ${JSON.stringify(named)} is outside ${start}, the folder this server started in; tools run there or below`,\n \t\t};\n-\tif (typeof input.attach === \"string\")\n-\t\tfor (const p of input.attach\n+\tfor (const flag of FILE_INPUTS) {\n+\t\tconst value = input[flag];\n+\t\tif (typeof value !== \"string\") continue;\n+\t\tfor (const p of value\n \t\t\t.split(\",\")\n \t\t\t.map((x) => x.trim())\n \t\t\t.filter((x) => x !== \"\"))\n \t\t\tif (!inside(start, resolve(folder, p)))\n \t\t\t\treturn {\n-\t\t\t\t\trefused: `--attach ${p} is outside ${start}, the folder this server started in; a tool attaches files from there or below`,\n+\t\t\t\t\trefused: `--${flag} ${p} is outside ${start}, the folder this server started in; a tool reads files from there or below`,\n \t\t\t\t};\n+\t}\n \treturn { folder };\n }\n "}],"unmatched":[]}