superclaude-kiro 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/installer.js +23 -7
package/package.json
CHANGED
package/src/installer.js
CHANGED
|
@@ -277,13 +277,29 @@ async function configureMcpServers() {
|
|
|
277
277
|
newServers = await fs.readJson(templatePath);
|
|
278
278
|
}
|
|
279
279
|
|
|
280
|
-
//
|
|
281
|
-
const
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
}
|
|
286
|
-
|
|
280
|
+
// Deep merge MCP servers - add autoApprove from template while preserving user settings
|
|
281
|
+
const mergedServers = {};
|
|
282
|
+
|
|
283
|
+
// Start with all servers from both configs
|
|
284
|
+
const allServerNames = new Set([
|
|
285
|
+
...Object.keys(newServers.mcpServers || {}),
|
|
286
|
+
...Object.keys(existingConfig.mcpServers || {})
|
|
287
|
+
]);
|
|
288
|
+
|
|
289
|
+
for (const serverName of allServerNames) {
|
|
290
|
+
const templateServer = newServers.mcpServers?.[serverName] || {};
|
|
291
|
+
const existingServer = existingConfig.mcpServers?.[serverName] || {};
|
|
292
|
+
|
|
293
|
+
// Deep merge: existing settings win, but add autoApprove from template if missing
|
|
294
|
+
mergedServers[serverName] = {
|
|
295
|
+
...templateServer,
|
|
296
|
+
...existingServer,
|
|
297
|
+
// Always use template's autoApprove (the whole point of this update)
|
|
298
|
+
...(templateServer.autoApprove ? { autoApprove: templateServer.autoApprove } : {})
|
|
299
|
+
};
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
const mergedConfig = { mcpServers: mergedServers };
|
|
287
303
|
|
|
288
304
|
await fs.ensureDir(path.join(KIRO_DIR, 'settings'));
|
|
289
305
|
await fs.writeJson(mcpPath, mergedConfig, { spaces: 2 });
|