create-merlin-brain 2.1.2 → 2.1.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/bin/install.cjs CHANGED
@@ -453,6 +453,16 @@ function cleanupLegacy() {
453
453
  }
454
454
  }
455
455
 
456
+ // ═══════════════════════════════════════════════════════════════
457
+ // KILL OLD MCP PROCESSES (stale merlin-mcp from before package merge)
458
+ // ═══════════════════════════════════════════════════════════════
459
+ try {
460
+ const { execSync } = require('child_process');
461
+ execSync('pkill -f "merlin-mcp" 2>/dev/null || true', { stdio: 'ignore' });
462
+ execSync('pkill -f "create-merlin-brain.*serve" 2>/dev/null || true', { stdio: 'ignore' });
463
+ cleaned.push('Killed stale MCP processes');
464
+ } catch (e) { /* ignore - pkill may not exist on all systems */ }
465
+
456
466
  // ═══════════════════════════════════════════════════════════════
457
467
  // RESET MERLIN CONFIG (clear saved repo selection for fresh auto-detect)
458
468
  // ═══════════════════════════════════════════════════════════════
@@ -716,6 +726,25 @@ async function install() {
716
726
  fs.writeFileSync(desktopConfigPath, JSON.stringify(desktopConfig, null, 2));
717
727
  logSuccess('Merlin Sights configured for Claude Desktop');
718
728
  }
729
+
730
+ // Also update ~/.claude/claude_desktop_config.json (Claude Code may read from here too)
731
+ const claudeDirDesktopConfig = path.join(CLAUDE_DIR, 'claude_desktop_config.json');
732
+ let claudeDirConfig = {};
733
+ if (fs.existsSync(claudeDirDesktopConfig)) {
734
+ try {
735
+ claudeDirConfig = JSON.parse(fs.readFileSync(claudeDirDesktopConfig, 'utf8'));
736
+ } catch (e) {
737
+ claudeDirConfig = {};
738
+ }
739
+ }
740
+ claudeDirConfig.mcpServers = claudeDirConfig.mcpServers || {};
741
+ claudeDirConfig.mcpServers.merlin = {
742
+ command: 'npx',
743
+ args: ['create-merlin-brain@latest', 'serve'],
744
+ env: { MERLIN_API_KEY: apiKey }
745
+ };
746
+ fs.writeFileSync(claudeDirDesktopConfig, JSON.stringify(claudeDirConfig, null, 2));
747
+ logSuccess('Merlin Sights configured for ~/.claude/claude_desktop_config.json');
719
748
  } else {
720
749
  logWarn('Skipped Merlin Sights (you can configure it later)');
721
750
  }
@@ -2,5 +2,5 @@
2
2
  * Merlin Brain Version
3
3
  * Single source of truth for version number
4
4
  */
5
- export declare const VERSION = "2.1.2";
5
+ export declare const VERSION = "2.1.4";
6
6
  //# sourceMappingURL=version.d.ts.map
@@ -2,5 +2,5 @@
2
2
  * Merlin Brain Version
3
3
  * Single source of truth for version number
4
4
  */
5
- export const VERSION = '2.1.2';
5
+ export const VERSION = '2.1.4';
6
6
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-merlin-brain",
3
- "version": "2.1.2",
3
+ "version": "2.1.4",
4
4
  "description": "Merlin - The Ultimate AI Brain for Claude Code. Installs workflows, agents, and Sights MCP server.",
5
5
  "type": "module",
6
6
  "main": "./dist/server/index.js",