moflo 4.6.1 → 4.6.2

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "moflo",
3
- "version": "4.6.1",
3
+ "version": "4.6.2",
4
4
  "description": "MoFlo — AI agent orchestration for Claude Code. Forked from ruflo/claude-flow with patches applied to source, plus feature-level orchestration.",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -1,29 +1,17 @@
1
1
  /**
2
2
  * MCP Configuration Generator
3
3
  * Creates .mcp.json for Claude Code MCP server integration
4
- * Handles cross-platform compatibility (Windows requires cmd /c wrapper)
4
+ *
5
+ * Note: Claude Code spawns MCP servers as child processes using the
6
+ * command/args from .mcp.json. On all platforms (including Windows),
7
+ * using `npx` directly works correctly. The previous `cmd /c` wrapper
8
+ * on Windows caused MCP servers to fail to start.
5
9
  */
6
10
  /**
7
- * Check if running on Windows
8
- */
9
- function isWindows() {
10
- return process.platform === 'win32';
11
- }
12
- /**
13
- * Generate platform-specific MCP server entry
14
- * - Windows: uses 'cmd /c npx' directly
15
- * - Unix: uses 'npx' directly (simple, reliable)
11
+ * Generate MCP server entry
12
+ * Uses `npx` directly on all platforms.
16
13
  */
17
14
  function createMCPServerEntry(npxArgs, env, additionalProps = {}) {
18
- if (isWindows()) {
19
- return {
20
- command: 'cmd',
21
- args: ['/c', 'npx', '-y', ...npxArgs],
22
- env,
23
- ...additionalProps,
24
- };
25
- }
26
- // Unix: direct npx invocation — simple and reliable
27
15
  return {
28
16
  command: 'npx',
29
17
  args: ['-y', ...npxArgs],
@@ -74,27 +62,14 @@ export function generateMCPJson(options) {
74
62
  export function generateMCPCommands(options) {
75
63
  const commands = [];
76
64
  const config = options.mcp;
77
- if (isWindows()) {
78
- if (config.claudeFlow) {
79
- commands.push('claude mcp add claude-flow -- cmd /c npx -y @claude-flow/cli@latest mcp start');
80
- }
81
- if (config.ruvSwarm) {
82
- commands.push('claude mcp add ruv-swarm -- cmd /c npx -y ruv-swarm mcp start');
83
- }
84
- if (config.flowNexus) {
85
- commands.push('claude mcp add flow-nexus -- cmd /c npx -y flow-nexus@latest mcp start');
86
- }
65
+ if (config.claudeFlow) {
66
+ commands.push('claude mcp add claude-flow -- npx -y @claude-flow/cli@latest mcp start');
87
67
  }
88
- else {
89
- if (config.claudeFlow) {
90
- commands.push("claude mcp add claude-flow -- npx -y @claude-flow/cli@latest mcp start");
91
- }
92
- if (config.ruvSwarm) {
93
- commands.push("claude mcp add ruv-swarm -- npx -y ruv-swarm mcp start");
94
- }
95
- if (config.flowNexus) {
96
- commands.push("claude mcp add flow-nexus -- npx -y flow-nexus@latest mcp start");
97
- }
68
+ if (config.ruvSwarm) {
69
+ commands.push('claude mcp add ruv-swarm -- npx -y ruv-swarm mcp start');
70
+ }
71
+ if (config.flowNexus) {
72
+ commands.push('claude mcp add flow-nexus -- npx -y flow-nexus@latest mcp start');
98
73
  }
99
74
  return commands;
100
75
  }
@@ -102,15 +77,12 @@ export function generateMCPCommands(options) {
102
77
  * Get platform-specific setup instructions
103
78
  */
104
79
  export function getPlatformInstructions() {
105
- if (isWindows()) {
106
- return {
107
- platform: 'Windows',
108
- note: 'MCP configuration uses cmd /c wrapper for npx compatibility.',
109
- };
110
- }
80
+ const platform = process.platform === 'win32'
81
+ ? 'Windows'
82
+ : process.platform === 'darwin' ? 'macOS' : 'Linux';
111
83
  return {
112
- platform: process.platform === 'darwin' ? 'macOS' : 'Linux',
84
+ platform,
113
85
  note: 'MCP configuration uses npx directly.',
114
86
  };
115
87
  }
116
- //# sourceMappingURL=mcp-generator.js.map
88
+ //# sourceMappingURL=mcp-generator.js.map