create-merlin-brain 2.1.7 → 2.1.8

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
@@ -1,5 +1,29 @@
1
1
  #!/usr/bin/env node
2
2
 
3
+ // =============================================================================
4
+ // CRITICAL: Detect if this is being run as MCP server (with 'serve' argument)
5
+ // If so, hand off to the actual MCP server instead of running the installer.
6
+ // This prevents the installer from reading MCP protocol messages as user input!
7
+ // =============================================================================
8
+ const isServeMode = process.argv.includes('serve');
9
+
10
+ if (isServeMode) {
11
+ // Hand off to the MCP server using dynamic import (works in CommonJS with Node 14+)
12
+ import('../dist/server/index.js').catch((err) => {
13
+ console.error('Failed to start Merlin MCP server:', err.message);
14
+ process.exit(1);
15
+ });
16
+ // The import runs the server module which keeps the process alive.
17
+ // We don't need to do anything else here - the code below won't
18
+ // execute until the server exits (which it won't during normal operation).
19
+ }
20
+
21
+ // =============================================================================
22
+ // INSTALLER CODE BELOW - Only runs when NOT in serve mode
23
+ // =============================================================================
24
+
25
+ if (!isServeMode) {
26
+
3
27
  const fs = require('fs');
4
28
  const path = require('path');
5
29
  const os = require('os');
@@ -864,3 +888,5 @@ install().catch((err) => {
864
888
  console.error('Installation failed:', err);
865
889
  process.exit(1);
866
890
  });
891
+
892
+ } // End of if (!isServeMode)
@@ -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.7";
5
+ export declare const VERSION = "2.1.8";
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.7';
5
+ export const VERSION = '2.1.8';
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.7",
3
+ "version": "2.1.8",
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",