diff --git a/src/commands/guided.ts b/src/commands/guided.ts index a9b7ceb..e9937b3 100644 --- a/src/commands/guided.ts +++ b/src/commands/guided.ts @@ -413,11 +413,16 @@ export function buildReviewLines( } } lines.push(pad("manifest.json", "hashes for every file above", "")); + // The manifest's MCP entries leave the machine too (names and sanitized + // URLs, never secrets), so the accounting names them — the drawing's + // "mcp servers recorded by name" line, restored. + const mcpNames = plan.manifest.mcpServers.map((server) => server.name); lines.push(""); lines.push( - `hooks: ${hooks.length > 0 ? hooks.join(", ") : "none"} | plugins: ${ - plugins.length > 0 ? plugins.join(", ") : "none" - } | ${excludedCount} excluded item${excludedCount === 1 ? "" : "s"} stayed behind`, + `hooks: ${hooks.length > 0 ? hooks.join(", ") : "none"} | plugins: ${plugins.length > 0 ? plugins.join(", ") : "none"}`, + ); + lines.push( + `mcp servers recorded by name: ${mcpNames.length > 0 ? mcpNames.join(", ") : "none"} | ${excludedCount} excluded item${excludedCount === 1 ? "" : "s"} stayed behind`, ); return lines; } diff --git a/test/guided.test.mjs b/test/guided.test.mjs index b899938..174eb00 100644 --- a/test/guided.test.mjs +++ b/test/guided.test.mjs @@ -424,7 +424,7 @@ test("the review tree aggregates skill dirs, names config keys, and accounts for entry("codex/config.toml", 'model = "gpt"\n'), entry("codex/skills/hermes/SKILL.md", "# h\n"), ], - manifest: {}, + manifest: { mcpServers: [{ name: "linear" }] }, skipped: [], secretFindings: [], diagnostics: [], @@ -437,7 +437,8 @@ test("the review tree aggregates skill dirs, names config keys, and accounts for assert.match(text, /config\.toml\s+model/); assert.match(text, /hermes\/\s+1 files/); assert.match(text, /manifest\.json\s+hashes for every file above/); - assert.match(text, /hooks: hooks\.PostToolUse \| plugins: none \| 5 excluded items stayed behind/); + assert.match(text, /hooks: hooks\.PostToolUse \| plugins: none/); + assert.match(text, /mcp servers recorded by name: linear \| 5 excluded items stayed behind/); }); test("the review tree never prints TOML values, section headers, or array elements", async () => { @@ -453,7 +454,7 @@ test("the review tree never prints TOML values, section headers, or array elemen ].join("\n"); const plan = { entries: [{ path: "codex/config.toml", content: Buffer.from(toml), executable: false }], - manifest: {}, + manifest: { mcpServers: [] }, skipped: [], secretFindings: [], diagnostics: [],