claude-flow 2.7.6 → 2.7.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/CHANGELOG.md CHANGED
@@ -5,6 +5,52 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [2.7.8] - 2025-10-24
9
+
10
+ > **šŸ› Critical Bug Fix**: MCP Server Stdio Mode - FULLY FIXED stdout corruption (Issue #835)
11
+
12
+ ### Summary
13
+ This release COMPLETELY resolves the MCP stdio mode stdout corruption issue. The server now outputs ONLY clean JSON-RPC messages on stdout, with all diagnostic logs going to stderr as required by the MCP protocol specification.
14
+
15
+ ### šŸ› Bug Fixes
16
+
17
+ #### **Complete Stdio Mode Fix** - Issue #835
18
+ - **Fixed remaining stdout pollution sources**:
19
+ 1. Removed startup message that appeared before spawning MCP server
20
+ 2. Changed `console.log()` to `console.error()` in initialization error handlers
21
+ 3. Fixed object output by stringifying JSON in server startup logs
22
+
23
+ - **Files Changed**:
24
+ - `src/cli/simple-commands/mcp.js` - Removed all output before server spawn
25
+ - `src/mcp/mcp-server.js` - Fixed initialization logs and stringified JSON output
26
+
27
+ ### āœ… Verification
28
+ - **Local testing**: āœ… stdout contains ONLY JSON-RPC, stderr contains all logs
29
+ - **Clean protocol stream**: āœ… No console messages pollute stdout
30
+ - **Docker test ready**: Ready for clean environment verification
31
+
32
+ ### šŸ“ Technical Details
33
+ ```bash
34
+ # Before v2.7.8 - stdout was corrupted:
35
+ $ npx claude-flow@2.7.7 mcp start
36
+ āœ… Starting Claude Flow MCP server... # <- ON STDOUT (BAD!)
37
+ {"jsonrpc":"2.0",...}
38
+
39
+ # After v2.7.8 - stdout is clean:
40
+ $ npx claude-flow@2.7.8 mcp start
41
+ {"jsonrpc":"2.0",...} # <- ONLY JSON-RPC (GOOD!)
42
+ # All startup messages go to stderr
43
+ ```
44
+
45
+ ## [2.7.7] - 2025-10-24
46
+
47
+ > **šŸ› Critical Bug Fix**: MCP Server Stdio Mode - Fixed stdout corruption + Updated version banner
48
+
49
+ ### Changes
50
+ - Updated version banner to reflect v2.7.6 changes
51
+ - Added Docker test script for stdio mode verification
52
+ - Published with correct build artifacts
53
+
8
54
  ## [2.7.6] - 2025-10-24
9
55
 
10
56
  > **šŸ› Critical Bug Fix**: MCP Server Stdio Mode - Fixed stdout corruption in stdio mode (build artifacts)
package/bin/claude-flow CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/bin/sh
2
2
  # Claude-Flow Smart Dispatcher - Detects and uses the best available runtime
3
3
 
4
- VERSION="2.7.6"
4
+ VERSION="2.7.8"
5
5
 
6
6
  # Determine the correct path based on how the script is invoked
7
7
  if [ -L "$0" ]; then
@@ -24,6 +24,9 @@ export class HelpFormatter {
24
24
  if (info.examples && info.examples.length > 0) {
25
25
  sections.push(this.formatSection('EXAMPLES', info.examples));
26
26
  }
27
+ if (info.details) {
28
+ sections.push('\n' + info.details);
29
+ }
27
30
  if (info.commands && info.commands.length > 0) {
28
31
  sections.push(`Run '${info.name} <command> --help' for more information on a command.`);
29
32
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/cli/help-formatter.ts"],"sourcesContent":["/**\n * Standardized CLI Help Formatter\n * Follows Unix/Linux conventions for help output\n */\n\nexport interface CommandInfo {\n name: string;\n description: string;\n usage?: string;\n commands?: CommandItem[];\n options?: OptionItem[];\n examples?: string[];\n globalOptions?: OptionItem[];\n}\n\nexport interface CommandItem {\n name: string;\n description: string;\n aliases?: string[];\n}\n\nexport interface OptionItem {\n flags: string;\n description: string;\n defaultValue?: string;\n validValues?: string[];\n}\n\nexport class HelpFormatter {\n private static readonly INDENT = ' ';\n private static readonly COLUMN_GAP = 2;\n private static readonly MIN_DESCRIPTION_COLUMN = 25;\n\n /**\n * Format main command help\n */\n static formatHelp(info: CommandInfo): string {\n const sections: string[] = [];\n\n // NAME section\n sections.push(this.formatSection('NAME', [`${info.name} - ${info.description}`]));\n\n // SYNOPSIS section\n if (info.usage) {\n sections.push(this.formatSection('SYNOPSIS', [info.usage]));\n }\n\n // COMMANDS section\n if (info.commands && info.commands.length > 0) {\n sections.push(this.formatSection('COMMANDS', this.formatCommands(info.commands)));\n }\n\n // OPTIONS section\n if (info.options && info.options.length > 0) {\n sections.push(this.formatSection('OPTIONS', this.formatOptions(info.options)));\n }\n\n // GLOBAL OPTIONS section\n if (info.globalOptions && info.globalOptions.length > 0) {\n sections.push(this.formatSection('GLOBAL OPTIONS', this.formatOptions(info.globalOptions)));\n }\n\n // EXAMPLES section\n if (info.examples && info.examples.length > 0) {\n sections.push(this.formatSection('EXAMPLES', info.examples));\n }\n\n // Footer\n if (info.commands && info.commands.length > 0) {\n sections.push(`Run '${info.name} <command> --help' for more information on a command.`);\n }\n\n return sections.join('\\n\\n');\n }\n\n /**\n * Format error message with usage hint\n */\n static formatError(error: string, command: string, usage?: string): string {\n const lines: string[] = [`Error: ${error}`, ''];\n\n if (usage) {\n lines.push(`Usage: ${usage}`);\n }\n\n lines.push(`Try '${command} --help' for more information.`);\n\n return lines.join('\\n');\n }\n\n /**\n * Format validation error with valid options\n */\n static formatValidationError(\n value: string,\n paramName: string,\n validOptions: string[],\n command: string,\n ): string {\n return this.formatError(\n `'${value}' is not a valid ${paramName}. Valid options are: ${validOptions.join(', ')}.`,\n command,\n );\n }\n\n private static formatSection(title: string, content: string[]): string {\n return `${title}\\n${content.map((line) => `${this.INDENT}${line}`).join('\\n')}`;\n }\n\n private static formatCommands(commands: CommandItem[]): string[] {\n const maxNameLength = Math.max(\n this.MIN_DESCRIPTION_COLUMN,\n ...commands.map((cmd) => {\n const nameLength = cmd.name.length;\n const aliasLength = cmd.aliases ? ` (${cmd.aliases.join(', ')})`.length : 0;\n return nameLength + aliasLength;\n }),\n );\n\n return commands.map((cmd) => {\n let name = cmd.name;\n if (cmd.aliases && cmd.aliases.length > 0) {\n name += ` (${cmd.aliases.join(', ')})`;\n }\n const padding = ' '.repeat(maxNameLength - name.length + this.COLUMN_GAP);\n return `${name}${padding}${cmd.description}`;\n });\n }\n\n private static formatOptions(options: OptionItem[]): string[] {\n const maxFlagsLength = Math.max(\n this.MIN_DESCRIPTION_COLUMN,\n ...options.map((opt) => opt.flags.length),\n );\n\n return options.map((opt) => {\n const padding = ' '.repeat(maxFlagsLength - opt.flags.length + this.COLUMN_GAP);\n let description = opt.description;\n\n // Add default value\n if (opt.defaultValue !== undefined) {\n description += ` [default: ${opt.defaultValue}]`;\n }\n\n // Add valid values on next line if present\n if (opt.validValues && opt.validValues.length > 0) {\n const validValuesLine =\n ' '.repeat(maxFlagsLength + this.COLUMN_GAP) + `Valid: ${opt.validValues.join(', ')}`;\n return `${opt.flags}${padding}${description}\\n${this.INDENT}${validValuesLine}`;\n }\n\n return `${opt.flags}${padding}${description}`;\n });\n }\n\n /**\n * Strip ANSI color codes and emojis from text\n */\n static stripFormatting(text: string): string {\n // Remove ANSI color codes\n text = text.replace(/\\x1b\\[[0-9;]*m/g, '');\n\n // Remove common emojis used in the CLI\n const emojiPattern =\n /[\\u{1F300}-\\u{1F9FF}]|[\\u{2600}-\\u{27BF}]|[\\u{1F000}-\\u{1F6FF}]|[\\u{1F680}-\\u{1F6FF}]/gu;\n text = text.replace(emojiPattern, '').trim();\n\n // Remove multiple spaces\n text = text.replace(/\\s+/g, ' ');\n\n return text;\n }\n}\n"],"names":["HelpFormatter","INDENT","COLUMN_GAP","MIN_DESCRIPTION_COLUMN","formatHelp","info","sections","push","formatSection","name","description","usage","commands","length","formatCommands","options","formatOptions","globalOptions","examples","join","formatError","error","command","lines","formatValidationError","value","paramName","validOptions","title","content","map","line","maxNameLength","Math","max","cmd","nameLength","aliasLength","aliases","padding","repeat","maxFlagsLength","opt","flags","defaultValue","undefined","validValues","validValuesLine","stripFormatting","text","replace","emojiPattern","trim"],"mappings":"AA4BA,OAAO,MAAMA;IACX,OAAw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ACC,cAAc,IAAIC,IAAI;QAG1CH,OAAOA,KAAKC,OAAO,CAAC,QAAQ;QAE5B,OAAOD;IACT;AACF"}
1
+ {"version":3,"sources":["../../../src/cli/help-formatter.js"],"sourcesContent":["/**\n * Standardized CLI Help Formatter\n * Follows Unix/Linux conventions for help output\n */\n\nexport class HelpFormatter {\n static INDENT = ' ';\n static COLUMN_GAP = 2;\n static MIN_DESCRIPTION_COLUMN = 25;\n\n /**\n * Format main command help\n */\n static formatHelp(info) {\n const sections = [];\n\n // NAME section\n sections.push(this.formatSection('NAME', [`${info.name} - ${info.description}`]));\n\n // SYNOPSIS section\n if (info.usage) {\n sections.push(this.formatSection('SYNOPSIS', [info.usage]));\n }\n\n // COMMANDS section\n if (info.commands && info.commands.length > 0) {\n sections.push(this.formatSection('COMMANDS', this.formatCommands(info.commands)));\n }\n\n // OPTIONS section\n if (info.options && info.options.length > 0) {\n sections.push(this.formatSection('OPTIONS', this.formatOptions(info.options)));\n }\n\n // GLOBAL OPTIONS section\n if (info.globalOptions && info.globalOptions.length > 0) {\n sections.push(this.formatSection('GLOBAL OPTIONS', this.formatOptions(info.globalOptions)));\n }\n\n // EXAMPLES section\n if (info.examples && info.examples.length > 0) {\n sections.push(this.formatSection('EXAMPLES', info.examples));\n }\n\n // DETAILS section (additional information)\n if (info.details) {\n sections.push('\\n' + info.details);\n }\n\n // Footer\n if (info.commands && info.commands.length > 0) {\n sections.push(`Run '${info.name} <command> --help' for more information on a command.`);\n }\n\n return sections.join('\\n\\n');\n }\n\n /**\n * Format error message with usage hint\n */\n static formatError(error, command, usage) {\n const lines = [`Error: ${error}`, ''];\n\n if (usage) {\n lines.push(`Usage: ${usage}`);\n }\n\n lines.push(`Try '${command} --help' for more information.`);\n\n return lines.join('\\n');\n }\n\n /**\n * Format validation error with valid options\n */\n static formatValidationError(value, paramName, validOptions, command) {\n return this.formatError(\n `'${value}' is not a valid ${paramName}. Valid options are: ${validOptions.join(', ')}.`,\n command,\n );\n }\n\n static formatSection(title, content) {\n return `${title}\\n${content.map((line) => `${this.INDENT}${line}`).join('\\n')}`;\n }\n\n static formatCommands(commands) {\n const maxNameLength = Math.max(\n this.MIN_DESCRIPTION_COLUMN,\n ...commands.map((cmd) => {\n const nameLength = cmd.name.length;\n const aliasLength = cmd.aliases ? ` (${cmd.aliases.join(', ')})`.length : 0;\n return nameLength + aliasLength;\n }),\n );\n\n return commands.map((cmd) => {\n let name = cmd.name;\n if (cmd.aliases && cmd.aliases.length > 0) {\n name += ` (${cmd.aliases.join(', ')})`;\n }\n const padding = ' '.repeat(maxNameLength - name.length + this.COLUMN_GAP);\n return `${name}${padding}${cmd.description}`;\n });\n }\n\n static formatOptions(options) {\n const maxFlagsLength = Math.max(\n this.MIN_DESCRIPTION_COLUMN,\n ...options.map((opt) => opt.flags.length),\n );\n\n return options.map((opt) => {\n const padding = ' '.repeat(maxFlagsLength - opt.flags.length + this.COLUMN_GAP);\n let description = opt.description;\n\n // Add default value\n if (opt.defaultValue !== undefined) {\n description += ` [default: ${opt.defaultValue}]`;\n }\n\n // Add valid values on next line if present\n if (opt.validValues && opt.validValues.length > 0) {\n const validValuesLine =\n ' '.repeat(maxFlagsLength + this.COLUMN_GAP) + `Valid: ${opt.validValues.join(', ')}`;\n return `${opt.flags}${padding}${description}\\n${this.INDENT}${validValuesLine}`;\n }\n\n return `${opt.flags}${padding}${description}`;\n });\n }\n\n /**\n * Strip ANSI color codes and emojis from text\n */\n static stripFormatting(text) {\n // Remove ANSI color codes\n text = text.replace(/\\x1b\\[[0-9;]*m/g, '');\n\n // Remove common emojis used in the CLI\n const emojiPattern =\n /[\\u{1F300}-\\u{1F9FF}]|[\\u{2600}-\\u{27BF}]|[\\u{1F000}-\\u{1F6FF}]|[\\u{1F680}-\\u{1F6FF}]/gu;\n text = text.replace(emojiPattern, '').trim();\n\n // Remove multiple spaces\n text = text.replace(/\\s+/g, ' ');\n\n return text;\n }\n}\n"],"names":["HelpFormatter","INDENT","COLUMN_GAP","MIN_DESCRIPTION_COLUMN","formatHelp","info","sections","push","formatSection","name","description","usage","commands","length","formatCommands","options","formatOptions","globalOptions","examples","details","join","formatError","error","command","lines","formatValidationError","value","paramName","validOptions","title","content","map","line","maxNameLength","Math","max","cmd","nameLength","aliasLength","aliases","padding","repeat","maxFlagsLength","opt","flags","defaultValue","undefined","validValues","validValuesLine","stripFormatting","text","replace","emojiPattern","trim"],"mappings":"AAKA,OAAO,MAAMA;IACX,OAAOC,SAAS,OAAO;IACvB,OAAOC,aAAa,EAAE;IACtB,OAAOC,yBAAyB,GAAG;IAKnC,OAAOC,WAAWC,IAAI,EAAE;QACtB,MAAMC,WAAW,EAAE;QAGnBA,SAASC,IAAI,CAAC,IAAI,CAACC,aAAa,CAAC,QAAQ;YAAC,GAAGH,KAAKI,IAAI,CAAC,GAAG,EAAEJ,KAAKK,WAAW,EAAE;SAAC;QAG/E,IAAIL,KAAKM,KAAK,EAAE;YACdL,SAASC,IAAI,CAAC,IAAI,CAACC,aAAa,CAAC,YAAY;gBAACH,KAAKM,KAAK;aAAC;QAC3D;QAGA,IAAIN,KAAKO,QAAQ,IAAIP,KAAKO,QAAQ,CAACC,MAAM,GAAG,GAAG;YAC7CP,SAASC,IAAI,CAAC,IAAI,CAACC,aAAa,CAAC,YAAY,IAAI,CAACM,cAAc,CAACT,KAAKO,QAAQ;QAChF;QAGA,IAAIP,KAAKU,OAAO,IAAIV,KAAKU,OAAO,CAACF,MAAM,GAAG,GAAG;YAC3CP,SAASC,IAAI,CAAC,IAAI,CAACC,aAAa,CAAC,WAAW,IAAI,CAACQ,aAAa,CAACX,KAAKU,OAAO;QAC7E;QAGA,IAAIV,KAAKY,aAAa,IAAIZ,KAAKY,aAAa,CAACJ,MAAM,GAAG,GAAG;YACvDP,SAASC,IAAI,CAAC,IAAI,CAACC,aAAa,CAAC,kBAAkB,IAAI,CAACQ,aAAa,CAACX,KAAKY,aAAa;QAC1F;QAGA,IAAIZ,KAAKa,QAAQ,IAAIb,KAAKa,QAAQ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AAO,EAAEyC,IAAII,WAAW,CAAC3B,IAAI,CAAC,OAAO;gBACvF,OAAO,GAAGuB,IAAIC,KAAK,GAAGJ,UAAU9B,YAAY,EAAE,EAAE,IAAI,CAACT,MAAM,GAAG+C,iBAAiB;YACjF;YAEA,OAAO,GAAGL,IAAIC,KAAK,GAAGJ,UAAU9B,aAAa;QAC/C;IACF;IAKA,OAAOuC,gBAAgBC,IAAI,EAAE;QAE3BA,OAAOA,KAAKC,OAAO,CAAC,mBAAmB;QAGvC,MAAMC,eACJ;QACFF,OAAOA,KAAKC,OAAO,CAACC,cAAc,IAAIC,IAAI;QAG1CH,OAAOA,KAAKC,OAAO,CAAC,QAAQ;QAE5B,OAAOD;IACT;AACF"}
@@ -4,15 +4,15 @@ export { VERSION };
4
4
  export const MAIN_HELP = `
5
5
  🌊 Claude-Flow v${VERSION} - Enterprise-Grade AI Agent Orchestration Platform
6
6
 
7
- šŸš€ v2.5.0-alpha.130 - SDK Integration & Performance Breakthrough
8
-
9
- šŸ”„ NEW IN v2.5.0-alpha.130:
10
- ⚔ 10-20x Faster Agent Spawning - Parallel agent execution with session forking
11
- šŸŽ® Real-Time Query Control - Pause, resume, terminate queries mid-execution
12
- šŸ”„ Dynamic Model Switching - Change Claude models during execution (cost optimization)
13
- šŸ” Dynamic Permissions - Change permission modes on-the-fly
14
- šŸ“Š 90 MCP Tools - 87 existing + 3 new Phase 4 tools
15
- šŸš„ 500-2000x Potential Speedup - Combined performance stack (In-Process + Parallel + Hooks)
7
+ šŸš€ v2.7.6 - MCP Stdio Fix & Production Ready
8
+
9
+ šŸ”„ NEW IN v2.7.6:
10
+ āœ… MCP Server Stdio Mode Fixed - Clean JSON-RPC protocol on stdout (#835)
11
+ šŸ”§ Smart Logging Helpers - Auto-route output based on mode (stdio vs HTTP)
12
+ šŸ› Protocol Corruption Resolved - Now compatible with standard MCP clients
13
+ šŸ“¦ AgentDB Integration - 150x faster vector search with persistent memory
14
+ 🧠 ReasoningBank Support - Self-learning with trajectory tracking
15
+ šŸŽÆ Backward Compatible - HTTP mode unchanged, stdio mode now works correctly
16
16
 
17
17
  šŸŽÆ ENTERPRISE FEATURES:
18
18
  • Complete ruv-swarm integration with 90+ MCP tools
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/cli/help-text.js"],"sourcesContent":["/**\n * Help text templates for Claude Flow CLI\n * Provides clear, actionable command documentation\n */\n\nimport { HelpFormatter } from './help-formatter.js';\nimport { VERSION } from '../core/version.js';\n\nexport { VERSION };\n\nexport const MAIN_HELP = `\n🌊 Claude-Flow v${VERSION} - Enterprise-Grade AI Agent Orchestration Platform\n\nšŸš€ v2.5.0-alpha.130 - SDK Integration & Performance Breakthrough\n\nšŸ”„ NEW IN v2.5.0-alpha.130:\n ⚔ 10-20x Faster Agent Spawning - Parallel agent execution with session forking\n šŸŽ® Real-Time Query Control - Pause, resume, terminate queries mid-execution\n šŸ”„ Dynamic Model Switching - Change Claude models during execution (cost optimization)\n šŸ” Dynamic Permissions - Change permission modes on-the-fly\n šŸ“Š 90 MCP Tools - 87 existing + 3 new Phase 4 tools\n šŸš„ 500-2000x Potential Speedup - Combined performance stack (In-Process + Parallel + Hooks)\n\nšŸŽÆ ENTERPRISE FEATURES:\n • Complete ruv-swarm integration with 90+ MCP tools\n • Flow Nexus cloud platform with distributed sandboxes\n • Claude Code SDK integration for maximum performance\n • Production-ready infrastructure with enterprise reliability\n\nUSAGE:\n npx claude-flow <command> [options] # Run latest alpha version\n npx claude-flow <command> --help # Get detailed help for any command\n npx claude-flow --help # Show this help\n \n # After local install:\n claude-flow <command> [options]\n claude-flow <command> --help # Get detailed help for any command\n\nšŸš€ QUICK START:\n # First time setup (creates CLAUDE.md & .claude/commands)\n npx claude-flow init\n \n # 🌐 FLOW NEXUS CLOUD (NEW!):\n mcp__flow-nexus__user_register # Register for cloud features\n mcp__flow-nexus__user_login # Login to access sandboxes & neural networks\n mcp__flow-nexus__sandbox_create # Create cloud execution environments\n \n # šŸ HIVE MIND QUICK START:\n claude-flow hive-mind wizard # Interactive setup wizard\n claude-flow hive-mind spawn \"objective\" # Create intelligent swarm\n claude-flow hive-mind spawn \"Build API\" --claude # Open Claude Code CLI\n \n # After setup, use without npx:\n claude-flow start --swarm # Start with swarm intelligence\n claude-flow swarm \"build REST API\" # Deploy multi-agent workflow\n claude-flow swarm \"create service\" --claude # Open Claude Code CLI with swarm\n\nšŸ HIVE MIND COMMANDS (NEW!):\n hive-mind wizard šŸŽÆ Interactive setup wizard (RECOMMENDED)\n hive-mind init Initialize Hive Mind system with SQLite\n hive-mind spawn <task> Create intelligent swarm with objective\n hive-mind status View active swarms and performance metrics\n hive-mind metrics Advanced performance analytics\n\nšŸ“‹ CORE COMMANDS:\n init Initialize Claude Flow v2.0.0 (creates CLAUDE.md & .claude/commands)\n --monitoring enables token usage tracking\n start [--swarm] Start orchestration system\n swarm <objective> Multi-agent swarm coordination\n agent <action> Agent management (spawn, list, terminate)\n • agent booster Ultra-fast code editing (352x faster, $0 cost)\n - edit <file> Edit single file with local WASM processing\n - batch <pattern> Batch edit multiple files (1000 files in 1 sec)\n - benchmark Validate 352x speed claim with tests\n • agent memory ReasoningBank learning memory (46% faster, 88% success)\n - init Initialize ReasoningBank database\n - status Show memory statistics\n - list List stored memories\n sparc <mode> SPARC development modes (13 available)\n memory <action> ReasoningBank persistent memory system\n proxy <action> OpenRouter proxy server (85-98% cost savings)\n - start Start proxy server\n - status Check proxy status\n - config Configuration guide\n github <mode> GitHub workflow automation (6 modes)\n status System status and health\n \nšŸ” VERIFICATION COMMANDS (NEW!):\n verify <subcommand> Truth verification system (0.95 threshold)\n truth View truth scores and reliability metrics\n pair [--start] Collaborative development with real-time verification\n \nšŸ“‹ SWARM INTELLIGENCE COMMANDS:\n training <command> Neural pattern learning & model updates (3 commands)\n coordination <command> Swarm & agent orchestration (3 commands)\n analysis <command> Performance & token usage analytics (real tracking!)\n automation <command> Intelligent agent & workflow management (3 commands)\n hooks <command> Lifecycle event management (5 commands)\n migrate-hooks Migrate settings.json to Claude Code 1.0.51+ format\n monitoring <command> Real-time system monitoring (3 commands)\n optimization <command> Performance & topology optimization (3 commands)\n \nšŸ“‹ ADDITIONAL COMMANDS:\n task <action> Task and workflow management\n config <action> System configuration\n mcp <action> MCP server management\n batch <action> Batch operations\n stream-chain <workflow> Stream-JSON chaining for multi-agent pipelines\n\nšŸ”„ NEW MCP TOOLS (v2.5.0-alpha.130):\n Available via Claude Code after installing:\n claude mcp add claude-flow npx claude-flow@alpha mcp start\n\n mcp__claude-flow__agents_spawn_parallel Spawn agents in parallel (10-20x faster)\n • Spawn multiple agents concurrently\n • 10-20x speedup vs sequential spawning\n • Example: 3 agents in 150ms instead of 2250ms\n\n mcp__claude-flow__query_control Control running queries in real-time\n • Actions: pause, resume, terminate\n • Change model mid-execution (Sonnet → Haiku for cost savings)\n • Change permissions dynamically\n • Execute commands in query context\n\n mcp__claude-flow__query_list List active queries with status\n • View all running queries\n • Monitor query status and performance\n • Filter by active or include history\n\nšŸ” GET HELP:\n npx claude-flow --help Show this help\n npx claude-flow <command> --help Detailed command help\n\nšŸŽÆ RECOMMENDED FOR NEW USERS:\n npx claude-flow hive-mind wizard # Start here! Interactive guided setup\n npx claude-flow init # Initialize Claude Flow\n npx claude-flow help hive-mind # Learn about Hive Mind features\n npx claude-flow swarm \"Build API\" --claude # Quick start with Claude Code CLI\n\nšŸ“š Documentation: https://github.com/ruvnet/claude-flow\nšŸ Hive Mind Guide: https://github.com/ruvnet/claude-flow/tree/main/docs/hive-mind\nšŸ ruv-swarm: https://github.com/ruvnet/ruv-FANN/tree/main/ruv-swarm\nšŸ’¬ Discord Community: https://discord.agentics.org\n\nšŸ’– Created by rUv with love: https://github.com/ruvnet\n`;\n\nexport const COMMAND_HELP = {\n verify: `\nšŸ” VERIFY COMMAND - Truth Verification System\n\nUSAGE:\n claude-flow verify <subcommand> [options]\n\nDESCRIPTION:\n Enforce truth and accuracy in multi-agent operations with a 0.95 threshold.\n \"Truth is enforced, not assumed\" - every agent claim is verified.\n\nSUBCOMMANDS:\n init <mode> Initialize verification system\n Modes: strict (0.95), moderate (0.85), development (0.75)\n verify <task> Run verification on specific task or agent\n status Show verification system status and metrics\n rollback Trigger manual rollback to last good state\n\nOPTIONS:\n --threshold <n> Custom accuracy threshold (0.0-1.0)\n --agent <type> Specify agent type for verification\n --auto-rollback Enable automatic rollback on failures\n --verbose Detailed verification output\n --json Output in JSON format\n\nEXAMPLES:\n claude-flow verify init strict # Production mode\n claude-flow verify verify task-123 --agent coder\n claude-flow verify status --recent 10\n claude-flow verify rollback --checkpoint last\n`,\n truth: `\nšŸ“Š TRUTH COMMAND - Truth Score Analytics\n\nUSAGE:\n claude-flow truth [options]\n\nDESCRIPTION:\n View and analyze truth scores, reliability metrics, and verification history.\n Provides insights into agent accuracy and system reliability.\n\nOPTIONS:\n --report Generate detailed truth score report\n --analyze Analyze failure patterns and trends\n --agent <type> Filter by specific agent type\n --taskId <id> Check specific task truth score\n --threshold <n> Filter scores below threshold\n --json Output in JSON format\n --export <file> Export report to file\n\nEXAMPLES:\n claude-flow truth # Show current scores\n claude-flow truth --report # Detailed report\n claude-flow truth --analyze # Pattern analysis\n claude-flow truth --agent coder --detailed\n claude-flow truth --json | jq .averageScore\n`,\n pair: `\nšŸ‘„ PAIR COMMAND - Collaborative Development Mode\n\nUSAGE:\n claude-flow pair [options]\n\nDESCRIPTION:\n Real-time collaborative development with AI verification.\n Continuous validation with instant feedback and auto-rollback.\n\nOPTIONS:\n --start Start new pair programming session\n --mode <type> Set verification mode:\n strict (0.95), standard (0.85), development (0.75)\n --threshold <n> Custom accuracy threshold (0.0-1.0)\n --verify Enable real-time verification\n --monitor Show real-time metrics dashboard\n --auto-rollback Enable automatic rollback on failures\n --summary View session summary\n --export <file> Export session metrics\n\nEXAMPLES:\n claude-flow pair --start # Start session\n claude-flow pair --start --mode strict # Production pairing\n claude-flow pair --threshold 0.90 # Custom threshold\n claude-flow pair --summary # View session stats\n claude-flow pair --monitor --verify # Real-time monitoring\n`,\n swarm: `\n🧠 SWARM COMMAND - Multi-Agent AI Coordination\n\nUSAGE:\n claude-flow swarm <objective> [options]\n\nDESCRIPTION:\n Deploy intelligent multi-agent swarms to accomplish complex objectives.\n Agents work in parallel with neural optimization and real-time coordination.\n\nOPTIONS:\n --strategy <type> Execution strategy: research, development, analysis,\n testing, optimization, maintenance\n --mode <type> Coordination mode: centralized, distributed,\n hierarchical, mesh, hybrid\n --max-agents <n> Maximum number of agents (default: 5)\n --parallel Enable parallel execution (2.8-4.4x speed improvement)\n --monitor Real-time swarm monitoring\n --background Run in background with progress tracking\n --claude Open Claude Code CLI\n --executor Use built-in executor instead of Claude Code\n --analysis Enable analysis/read-only mode (no code changes)\n --read-only Enable read-only mode (alias for --analysis)\n\nEXAMPLES:\n claude-flow swarm \"Build a REST API with authentication\"\n claude-flow swarm \"Research cloud architecture patterns\" --strategy research\n claude-flow swarm \"Optimize database queries\" --max-agents 3 --parallel\n claude-flow swarm \"Develop feature X\" --strategy development --monitor\n claude-flow swarm \"Build API\" --claude # Open Claude Code CLI\n claude-flow swarm \"Create service\" --executor # Use built-in executor\n claude-flow swarm \"Analyze codebase for security issues\" --analysis\n claude-flow swarm \"Review architecture patterns\" --read-only --strategy research\n\nAGENT TYPES:\n researcher Research with web access and data analysis\n coder Code development with neural patterns\n analyst Performance analysis and optimization\n architect System design with enterprise patterns\n tester Comprehensive testing with automation\n coordinator Multi-agent orchestration\n\nANALYSIS MODE:\n When using --analysis or --read-only flags, the swarm operates in a safe\n read-only mode that prevents all code modifications. Perfect for:\n \n • Code reviews and security audits\n • Architecture analysis and documentation\n • Performance bottleneck identification\n • Technical debt assessment\n • Dependency mapping and analysis\n • \"What-if\" scenario exploration\n \n In analysis mode, agents can only read files, search codebases, and\n generate reports - no Write, Edit, or system-modifying operations.\n`,\n\n github: `\nšŸ™ GITHUB COMMAND - Workflow Automation\n\nUSAGE:\n claude-flow github <mode> <objective> [options]\n\nDESCRIPTION:\n Automate GitHub workflows with 6 specialized AI-powered modes.\n Each mode handles specific aspects of repository management.\n\nMODES:\n init Initialize GitHub-enhanced checkpoint system (NEW!)\n gh-coordinator GitHub workflow orchestration and CI/CD\n pr-manager Pull request management with reviews\n issue-tracker Issue management and project coordination\n release-manager Release coordination and deployment\n repo-architect Repository structure optimization\n sync-coordinator Multi-package synchronization\n\nOPTIONS:\n --auto-approve Automatically approve safe changes\n --dry-run Preview changes without applying\n --verbose Detailed operation logging\n --config <file> Custom configuration file\n\nEXAMPLES:\n claude-flow github init # Initialize GitHub checkpoint hooks\n claude-flow github pr-manager \"create feature PR with tests\"\n claude-flow github gh-coordinator \"setup CI/CD pipeline\" --auto-approve\n claude-flow github release-manager \"prepare v2.0.0 release\"\n claude-flow github repo-architect \"optimize monorepo structure\"\n claude-flow github issue-tracker \"analyze and label issues\"\n claude-flow github sync-coordinator \"sync versions across packages\"\n`,\n\n agent: `\nšŸ¤– AGENT COMMAND - AI Agent Management\n\nUSAGE:\n claude-flow agent <action> [options]\n\nACTIONS:\n spawn <type> Create new AI agent\n list List all active agents\n terminate <id> Terminate specific agent\n info <id> Show agent details\n hierarchy Manage agent hierarchies\n ecosystem View agent ecosystem\n\nOPTIONS:\n --name <name> Custom agent name\n --verbose Detailed output\n --json JSON output format\n\nAGENT TYPES:\n researcher Research and data analysis\n coder Code generation and refactoring\n analyst Performance and security analysis\n architect System design and architecture\n tester Test creation and execution\n coordinator Task coordination\n reviewer Code and design review\n optimizer Performance optimization\n\nEXAMPLES:\n claude-flow agent spawn researcher --name \"DataBot\"\n claude-flow agent list --verbose\n claude-flow agent terminate agent-123\n claude-flow agent hierarchy create enterprise\n claude-flow agent ecosystem status\n`,\n\n memory: `\nšŸ’¾ MEMORY COMMAND - Persistent Memory Management\n\nUSAGE:\n claude-flow memory <action> [options]\n\nACTIONS:\n store <key> <value> Store data in memory\n get <key> Retrieve stored data\n query <search> Search memory contents\n list List all stored items\n delete <key> Delete specific entry\n stats Memory usage statistics\n export <file> Export memory to file\n import <file> Import memory from file\n cleanup Clean old entries\n\nOPTIONS:\n --namespace <ns> Use specific namespace\n --format <type> Output format (json, table)\n --verbose Detailed output\n\nEXAMPLES:\n claude-flow memory store architecture \"microservices pattern\"\n claude-flow memory get architecture\n claude-flow memory query \"API design\"\n claude-flow memory stats\n claude-flow memory export backup.json\n claude-flow memory cleanup --older-than 30d\n`,\n\n sparc: `\nšŸš€ SPARC COMMAND - Development Mode Operations\n\nUSAGE:\n claude-flow sparc [mode] [objective]\n claude-flow sparc <action>\n\nDESCRIPTION:\n SPARC provides 17 specialized development modes for different workflows.\n Each mode optimizes AI assistance for specific tasks.\n\nMODES:\n architect System architecture and design\n code Code generation and implementation\n tdd Test-driven development workflow\n debug Debugging and troubleshooting\n security Security analysis and fixes\n refactor Code refactoring and optimization\n docs Documentation generation\n review Code review and quality checks\n data Data modeling and analysis\n api API design and implementation\n ui UI/UX development\n ops DevOps and infrastructure\n ml Machine learning workflows\n blockchain Blockchain development\n mobile Mobile app development\n game Game development\n iot IoT system development\n\nACTIONS:\n modes List all available modes\n info <mode> Show mode details\n run <mode> Run specific mode\n\nEXAMPLES:\n claude-flow sparc \"design authentication system\" # Auto-select mode\n claude-flow sparc architect \"design microservices\" # Use architect mode\n claude-flow sparc tdd \"user registration feature\" # TDD workflow\n claude-flow sparc modes # List all modes\n claude-flow sparc info security # Mode details\n`,\n\n init: `\nšŸŽÆ INIT COMMAND - Initialize Claude Flow Environment\n\nUSAGE:\n claude-flow init [options]\n\nDESCRIPTION:\n Initialize Claude Flow v2.0.0 in your project with full MCP integration.\n By default creates standard setup with local Git checkpoints.\n \n TWO INITIALIZATION MODES:\n • claude-flow init Standard init with local Git checkpoints\n • claude-flow github init GitHub-enhanced with automatic releases (NEW!)\n\nOPTIONS:\n --force Overwrite existing configuration\n --dry-run Preview what will be created\n --basic Use basic initialization (pre-v2.0.0)\n --sparc SPARC enterprise setup with additional features\n --minimal Minimal setup without examples\n --template <t> Use specific project template\n\nWHAT claude-flow init CREATES (DEFAULT):\n šŸ“„ CLAUDE.md AI-readable project instructions & context\n šŸ“ .claude/ Enterprise configuration directory containing:\n └── commands/ Custom commands and automation scripts\n └── settings.json Advanced configuration and hooks\n └── hooks/ Pre/post operation automation\n šŸ“‹ .roomodes 17 specialized SPARC development modes\n \n CLAUDE.md CONTENTS:\n • Project overview and objectives\n • Technology stack and architecture\n • Development guidelines and patterns\n • AI-specific instructions for better assistance\n • Integration with ruv-swarm MCP tools\n \n .claude/commands INCLUDES:\n • Custom project-specific commands\n • Automated workflow scripts\n • Integration hooks for Claude Code\n • Team collaboration tools\n \n Features enabled:\n • ruv-swarm integration with 27 MCP tools\n • Neural network processing with WASM\n • Multi-agent coordination topologies\n • Cross-session memory persistence\n • GitHub workflow automation\n • Performance monitoring\n • Enterprise security features\n\nEXAMPLES:\n npx claude-flow init # Standard init with local checkpoints\n npx claude-flow github init # GitHub-enhanced init with releases\n claude-flow init --force # Overwrite existing configuration\n claude-flow github init --force # Force GitHub mode (overwrite)\n claude-flow init --dry-run # Preview what will be created\n claude-flow init --monitoring # Initialize with token tracking\n claude-flow init --sparc # SPARC enterprise setup\n claude-flow init --minimal # Basic setup only\n`,\n\n start: `\nšŸš€ START COMMAND - Start Orchestration System\n\nUSAGE:\n claude-flow start [options]\n\nDESCRIPTION:\n Start the Claude Flow orchestration system with optional swarm intelligence.\n\nOPTIONS:\n --swarm Enable swarm intelligence features\n --daemon Run as background daemon\n --port <port> MCP server port (default: 3000)\n --verbose Detailed logging\n --config <file> Custom configuration file\n\nEXAMPLES:\n claude-flow start # Basic start\n claude-flow start --swarm # Start with swarm features\n claude-flow start --daemon # Background daemon\n claude-flow start --port 8080 # Custom MCP port\n claude-flow start --config prod.json # Production config\n`,\n\n status: `\nšŸ“Š STATUS COMMAND - System Status\n\nUSAGE:\n claude-flow status [options]\n\nDESCRIPTION:\n Show comprehensive system status including agents, tasks, and resources.\n\nOPTIONS:\n --verbose Detailed system information\n --json JSON output format\n --watch Live updates\n --interval <ms> Update interval (with --watch)\n\nOUTPUT INCLUDES:\n • Orchestrator status\n • Active agents and their state\n • Task queue and progress\n • Memory usage statistics\n • MCP server status\n • System resources\n • Performance metrics\n\nEXAMPLES:\n claude-flow status # Basic status\n claude-flow status --verbose # Detailed information\n claude-flow status --json # Machine-readable format\n claude-flow status --watch # Live monitoring\n`,\n\n training: `\n🧠 TRAINING COMMAND - Neural Pattern Learning & Model Updates\n\nUSAGE:\n claude-flow training <command> [options]\n\nDESCRIPTION:\n Train neural patterns from operations, learn from outcomes, and update agent models \n with real ruv-swarm integration for continuous learning and optimization.\n\nCOMMANDS:\n neural-train Train neural patterns from operations data\n pattern-learn Learn from specific operation outcomes \n model-update Update agent models with new insights\n\nNEURAL TRAIN OPTIONS:\n --data <source> Training data source (default: recent)\n Options: recent, historical, custom, swarm-<id>\n --model <name> Target model (default: general-predictor)\n Options: task-predictor, agent-selector, performance-optimizer\n --epochs <n> Training epochs (default: 50)\n\nPATTERN LEARN OPTIONS:\n --operation <op> Operation type to learn from\n --outcome <result> Operation outcome (success/failure/partial)\n\nMODEL UPDATE OPTIONS:\n --agent-type <type> Agent type to update (coordinator, coder, researcher, etc.)\n --operation-result <res> Result from operation execution\n\nEXAMPLES:\n claude-flow training neural-train --data recent --model task-predictor\n claude-flow training pattern-learn --operation \"file-creation\" --outcome \"success\"\n claude-flow training model-update --agent-type coordinator --operation-result \"efficient\"\n claude-flow training neural-train --data \"swarm-123\" --epochs 100 --model \"coordinator-predictor\"\n\nšŸŽÆ Neural training improves:\n • Task selection accuracy\n • Agent performance prediction \n • Coordination efficiency\n • Error prevention patterns\n`,\n\n coordination: `\nšŸ COORDINATION COMMAND - Swarm & Agent Orchestration\n\nUSAGE:\n claude-flow coordination <command> [options]\n\nDESCRIPTION:\n Initialize swarms, spawn coordinated agents, and orchestrate task execution \n across agents with real ruv-swarm MCP integration for optimal performance.\n\nCOMMANDS:\n swarm-init Initialize swarm coordination infrastructure\n agent-spawn Spawn and coordinate new agents\n task-orchestrate Orchestrate task execution across agents\n\nSWARM-INIT OPTIONS:\n --swarm-id <id> Swarm identifier (auto-generated if not provided)\n --topology <type> Coordination topology (default: hierarchical)\n Options: hierarchical, mesh, ring, star, hybrid\n --max-agents <n> Maximum number of agents (default: 5)\n --strategy <strategy> Coordination strategy (default: balanced)\n\nAGENT-SPAWN OPTIONS:\n --type <type> Agent type (default: general)\n Options: coordinator, coder, developer, researcher, analyst, analyzer, \n tester, architect, reviewer, optimizer, general\n --name <name> Custom agent name (auto-generated if not provided)\n --swarm-id <id> Target swarm for agent coordination\n --capabilities <cap> Custom capabilities specification\n\nTASK-ORCHESTRATE OPTIONS:\n --task <description> Task description (required)\n --swarm-id <id> Target swarm for task execution\n --strategy <strategy> Coordination strategy (default: adaptive)\n Options: adaptive, parallel, sequential, hierarchical\n --share-results Enable result sharing across swarm\n\nEXAMPLES:\n claude-flow coordination swarm-init --topology hierarchical --max-agents 8\n claude-flow coordination agent-spawn --type developer --name \"api-dev\" --swarm-id swarm-123\n claude-flow coordination task-orchestrate --task \"Build REST API\" --strategy parallel --share-results\n claude-flow coordination swarm-init --topology mesh --max-agents 12\n\nšŸŽÆ Coordination enables:\n • Intelligent task distribution\n • Agent synchronization\n • Shared memory coordination\n • Performance optimization\n • Fault tolerance\n`,\n\n analysis: `\nšŸ“Š ANALYSIS COMMAND - Performance & Usage Analytics\n\nUSAGE:\n claude-flow analysis <command> [options]\n\nDESCRIPTION:\n Detect performance bottlenecks, generate comprehensive reports, and analyze \n token consumption using real ruv-swarm analytics for system optimization.\n\nCOMMANDS:\n bottleneck-detect Detect performance bottlenecks in the system\n performance-report Generate comprehensive performance reports\n token-usage Analyze token consumption and costs\n\nBOTTLENECK DETECT OPTIONS:\n --scope <scope> Analysis scope (default: system)\n Options: system, swarm, agent, task, memory\n --target <target> Specific target to analyze (default: all)\n Examples: agent-id, swarm-id, task-type\n\nPERFORMANCE REPORT OPTIONS:\n --timeframe <time> Report timeframe (default: 24h)\n Options: 1h, 6h, 24h, 7d, 30d\n --format <format> Report format (default: summary)\n Options: summary, detailed, json, csv\n\nTOKEN USAGE OPTIONS:\n --agent <agent> Filter by agent type or ID (default: all)\n --breakdown Include detailed breakdown by agent type\n --cost-analysis Include cost projections and optimization\n\nEXAMPLES:\n claude-flow analysis bottleneck-detect --scope system\n claude-flow analysis bottleneck-detect --scope agent --target coordinator-1\n claude-flow analysis performance-report --timeframe 7d --format detailed\n claude-flow analysis token-usage --breakdown --cost-analysis\n claude-flow analysis bottleneck-detect --scope swarm --target swarm-123\n\nšŸŽÆ Analysis helps with:\n • Performance optimization\n • Cost management\n • Resource allocation\n • Bottleneck identification\n • Trend analysis\n`,\n\n automation: `\nšŸ¤– AUTOMATION COMMAND - Intelligent Agent & Workflow Management\n\nUSAGE:\n claude-flow automation <command> [options]\n\nDESCRIPTION:\n Automatically spawn optimal agents, intelligently manage workflows, and select \n optimal configurations with real ruv-swarm intelligence for maximum efficiency.\n\nCOMMANDS:\n auto-agent Automatically spawn optimal agents based on task complexity\n smart-spawn Intelligently spawn agents based on specific requirements\n workflow-select Select and configure optimal workflows for project types\n\nAUTO-AGENT OPTIONS:\n --task-complexity <level> Task complexity level (default: medium)\n Options: low, medium, high, enterprise\n --swarm-id <id> Target swarm ID for agent spawning\n\nSMART-SPAWN OPTIONS:\n --requirement <req> Specific requirement description\n Examples: \"web-development\", \"data-analysis\", \"enterprise-api\"\n --max-agents <n> Maximum number of agents to spawn (default: 10)\n\nWORKFLOW-SELECT OPTIONS:\n --project-type <type> Project type (default: general)\n Options: web-app, api, data-analysis, enterprise, general\n --priority <priority> Optimization priority (default: balanced)\n Options: speed, quality, cost, balanced\n\nEXAMPLES:\n claude-flow automation auto-agent --task-complexity enterprise --swarm-id swarm-123\n claude-flow automation smart-spawn --requirement \"web-development\" --max-agents 8\n claude-flow automation workflow-select --project-type api --priority speed\n claude-flow automation auto-agent --task-complexity low\n\nšŸŽÆ Automation benefits:\n • Optimal resource allocation\n • Intelligent agent selection\n • Workflow optimization\n • Reduced manual configuration\n • Performance-based scaling\n`,\n\n hooks: `\nšŸ”— HOOKS COMMAND - Lifecycle Event Management\n\nUSAGE:\n claude-flow hooks <command> [options]\n\nDESCRIPTION:\n Execute lifecycle hooks before and after tasks, edits, and sessions with \n real ruv-swarm integration for automated preparation, tracking, and cleanup.\n\nCOMMANDS:\n pre-task Execute before task begins (preparation & setup)\n post-task Execute after task completion (analysis & cleanup)\n pre-edit Execute before file modifications (backup & validation)\n post-edit Execute after file modifications (tracking & coordination)\n session-end Execute at session termination (cleanup & export)\n\nPRE-TASK OPTIONS:\n --description <desc> Task description\n --task-id <id> Task identifier\n --agent-id <id> Executing agent identifier\n --auto-spawn-agents Auto-spawn agents for task (default: true)\n\nPOST-TASK OPTIONS:\n --task-id <id> Task identifier\n --analyze-performance Generate performance analysis\n --generate-insights Create AI-powered insights\n\nPRE-EDIT OPTIONS:\n --file <path> Target file path\n --operation <type> Edit operation type (edit, create, delete)\n\nPOST-EDIT OPTIONS:\n --file <path> Modified file path\n --memory-key <key> Coordination memory key for storing edit info\n\nSESSION-END OPTIONS:\n --export-metrics Export session performance metrics\n --swarm-id <id> Swarm identifier for coordination cleanup\n --generate-summary Create comprehensive session summary\n\nEXAMPLES:\n claude-flow hooks pre-task --description \"Build API\" --task-id task-123 --agent-id agent-456\n claude-flow hooks post-task --task-id task-123 --analyze-performance --generate-insights\n claude-flow hooks pre-edit --file \"src/api.js\" --operation edit\n claude-flow hooks post-edit --file \"src/api.js\" --memory-key \"swarm/123/edits/timestamp\"\n claude-flow hooks session-end --export-metrics --generate-summary --swarm-id swarm-123\n\nšŸŽÆ Hooks enable:\n • Automated preparation & cleanup\n • Performance tracking\n • Coordination synchronization\n • Error prevention\n • Insight generation\n`,\n};\n\nexport function getCommandHelp(command) {\n // Return legacy format for now - to be updated\n return COMMAND_HELP[command] || `Help not available for command: ${command}`;\n}\n\nexport function getStandardizedCommandHelp(command) {\n const commandConfigs = {\n agent: {\n name: 'claude-flow agent',\n description: 'Manage agents with agentic-flow integration (66+ agents, ultra-fast editing, ReasoningBank memory)',\n usage: 'claude-flow agent <action> [options]',\n commands: [\n { name: 'run <agent> \"<task>\"', description: 'Execute agent with multi-provider (NEW)' },\n { name: 'agents', description: 'List all 66+ agentic-flow agents (NEW)' },\n { name: 'booster edit <file>', description: 'Ultra-fast editing - 352x faster (NEW)' },\n { name: 'booster batch <pattern>', description: 'Batch edit multiple files (NEW)' },\n { name: 'memory init', description: 'Initialize ReasoningBank learning memory - 46% faster execution (NEW)' },\n { name: 'memory status', description: 'Show ReasoningBank status and statistics (NEW)' },\n { name: 'memory list', description: 'List stored ReasoningBank memories (NEW)' },\n { name: 'config wizard', description: 'Interactive setup wizard (NEW)' },\n { name: 'mcp start', description: 'Start MCP server (NEW)' },\n { name: 'spawn', description: 'Create internal agent' },\n { name: 'list', description: 'List active internal agents' },\n { name: 'info', description: 'Show agent details' },\n { name: 'terminate', description: 'Stop an agent' },\n { name: 'hierarchy', description: 'Manage agent hierarchies' },\n { name: 'ecosystem', description: 'View agent ecosystem' },\n ],\n options: [\n {\n flags: '--type <type>',\n description: 'Agent type',\n validValues: [\n 'coordinator',\n 'researcher',\n 'coder',\n 'analyst',\n 'architect',\n 'tester',\n 'reviewer',\n 'optimizer',\n ],\n },\n {\n flags: '--name <name>',\n description: 'Agent name',\n },\n {\n flags: '--verbose',\n description: 'Detailed output',\n },\n {\n flags: '--json',\n description: 'Output in JSON format',\n },\n {\n flags: '--help',\n description: 'Show this help message',\n },\n ],\n examples: [\n 'claude-flow agent spawn researcher --name \"Research Bot\"',\n 'claude-flow agent list --json',\n 'claude-flow agent terminate agent-123',\n 'claude-flow agent info agent-456 --verbose',\n ],\n },\n sparc: {\n name: 'claude-flow sparc',\n description: 'Execute SPARC development modes',\n usage: 'claude-flow sparc <mode> [task] [options]',\n commands: [\n { name: 'spec', description: 'Specification mode - Requirements analysis' },\n { name: 'architect', description: 'Architecture mode - System design' },\n { name: 'tdd', description: 'Test-driven development mode' },\n { name: 'integration', description: 'Integration mode - Component connection' },\n { name: 'refactor', description: 'Refactoring mode - Code improvement' },\n { name: 'modes', description: 'List all available SPARC modes' },\n ],\n options: [\n {\n flags: '--file <path>',\n description: 'Input/output file path',\n },\n {\n flags: '--format <type>',\n description: 'Output format',\n validValues: ['markdown', 'json', 'yaml'],\n },\n {\n flags: '--verbose',\n description: 'Detailed output',\n },\n {\n flags: '--help',\n description: 'Show this help message',\n },\n ],\n examples: [\n 'claude-flow sparc spec \"User authentication system\"',\n 'claude-flow sparc tdd \"Payment processing module\"',\n 'claude-flow sparc architect \"Microservices architecture\"',\n 'claude-flow sparc modes',\n ],\n },\n memory: {\n name: 'claude-flow memory',\n description: 'Manage persistent memory operations',\n usage: 'claude-flow memory <action> [key] [value] [options]',\n commands: [\n { name: 'store', description: 'Store data in memory' },\n { name: 'query', description: 'Search memory by pattern' },\n { name: 'list', description: 'List memory namespaces' },\n { name: 'export', description: 'Export memory to file' },\n { name: 'import', description: 'Import memory from file' },\n { name: 'clear', description: 'Clear memory namespace' },\n ],\n options: [\n {\n flags: '--namespace <name>',\n description: 'Memory namespace',\n defaultValue: 'default',\n },\n {\n flags: '--ttl <seconds>',\n description: 'Time to live in seconds',\n },\n {\n flags: '--format <type>',\n description: 'Export format',\n validValues: ['json', 'yaml'],\n },\n {\n flags: '--help',\n description: 'Show this help message',\n },\n ],\n examples: [\n 'claude-flow memory store \"api_design\" \"REST endpoints specification\"',\n 'claude-flow memory query \"authentication\"',\n 'claude-flow memory export backup.json',\n 'claude-flow memory list --namespace project',\n ],\n },\n };\n\n const config = commandConfigs[command];\n if (!config) {\n return HelpFormatter.formatError(\n `Unknown command: ${command}`,\n 'claude-flow',\n 'claude-flow <command> --help',\n );\n }\n\n return HelpFormatter.formatHelp(config);\n}\n\nexport function getMainHelp(plain = false) {\n // Return the vibrant, emoji-rich version by default\n if (!plain) {\n return MAIN_HELP;\n }\n\n // Return plain standardized format when requested\n const helpInfo = {\n name: 'claude-flow',\n description: 'Advanced AI agent orchestration system',\n usage: `claude-flow <command> [<args>] [options]\n claude-flow <command> --help\n claude-flow --version`,\n commands: [\n {\n name: 'hive-mind',\n description: 'Manage hive mind swarm intelligence',\n aliases: ['hm'],\n },\n {\n name: 'init',\n description: 'Initialize Claude Flow configuration',\n },\n {\n name: 'start',\n description: 'Start orchestration system',\n },\n {\n name: 'swarm',\n description: 'Execute multi-agent swarm coordination',\n },\n {\n name: 'agent',\n description: 'Manage individual agents',\n },\n {\n name: 'sparc',\n description: 'Execute SPARC development modes',\n },\n {\n name: 'memory',\n description: 'Manage persistent memory operations',\n },\n {\n name: 'github',\n description: 'Automate GitHub workflows',\n },\n {\n name: 'status',\n description: 'Show system status and health',\n },\n {\n name: 'config',\n description: 'Manage configuration settings',\n },\n {\n name: 'session',\n description: 'Manage sessions and state persistence',\n },\n {\n name: 'terminal',\n description: 'Terminal pool management',\n },\n {\n name: 'workflow',\n description: 'Manage automated workflows',\n },\n {\n name: 'training',\n description: 'Neural pattern training',\n },\n {\n name: 'coordination',\n description: 'Swarm coordination commands',\n },\n {\n name: 'help',\n description: 'Show help information',\n },\n ],\n globalOptions: [\n {\n flags: '--config <path>',\n description: 'Configuration file path',\n defaultValue: '.claude/config.json',\n },\n {\n flags: '--verbose',\n description: 'Enable verbose output',\n },\n {\n flags: '--quiet',\n description: 'Suppress non-error output',\n },\n {\n flags: '--json',\n description: 'Output in JSON format',\n },\n {\n flags: '--plain',\n description: 'Show plain help without emojis',\n },\n {\n flags: '--help',\n description: 'Show help information',\n },\n {\n flags: '--version',\n description: 'Show version information',\n },\n ],\n examples: [\n 'npx claude-flow init',\n 'claude-flow hive-mind wizard',\n 'claude-flow swarm \"Build REST API\"',\n 'claude-flow agent spawn researcher --name \"Research Bot\"',\n 'claude-flow status --json',\n 'claude-flow memory query \"API design\"',\n ],\n };\n\n return HelpFormatter.formatHelp(helpInfo);\n}\n"],"names":["HelpFormatter","VERSION","MAIN_HELP","COMMAND_HELP","verify","truth","pair","swarm","github","agent","memory","sparc","init","start","status","training","coordination","analysis","automation","hooks","getCommandHelp","command","getStandardizedCommandHelp","commandConfigs","name","description","usage","commands","options","flags","validValues","examples","defaultValue","config","formatError","formatHelp","getMainHelp","plain","helpInfo","aliases","globalOptions"],"mappings":"AAKA,SAASA,aAAa,QAAQ,sBAAsB;AACpD,SAASC,OAAO,QAAQ,qBAAqB;AAE7C,SAASA,OAAO,GAAG;AAEnB,OAAO,MAAMC,YAAY,CAAC;gBACV,EAAED,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsI1B,CAAC,CAAC;AAEF,OAAO,MAAME,eAAe;IAC1BC,QAAQ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BX,CAAC;IACCC,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;AAyBV,CAAC;IACCC,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BT,CAAC;IACCC,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuDV,CAAC;IAECC,QAAQ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCX,CAAC;IAECC,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCV,CAAC;IAECC,QAAQ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BX,CAAC;IAECC,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCV,CAAC;IAECC,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6DT,CAAC;IAECC,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;AAsBV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a;YACf;YACA;gBACED,MAAM;gBACNC,aAAa;YACf;YACA;gBACED,MAAM;gBACNC,aAAa;YACf;YACA;gBACED,MAAM;gBACNC,aAAa;YACf;YACA;gBACED,MAAM;gBACNC,aAAa;YACf;YACA;gBACED,MAAM;gBACNC,aAAa;YACf;SACD;QACDe,eAAe;YACb;gBACEX,OAAO;gBACPJ,aAAa;gBACbO,cAAc;YAChB;YACA;gBACEH,OAAO;gBACPJ,aAAa;YACf;YACA;gBACEI,OAAO;gBACPJ,aAAa;YACf;YACA;gBACEI,OAAO;gBACPJ,aAAa;YACf;YACA;gBACEI,OAAO;gBACPJ,aAAa;YACf;YACA;gBACEI,OAAO;gBACPJ,aAAa;YACf;YACA;gBACEI,OAAO;gBACPJ,aAAa;YACf;SACD;QACDM,UAAU;YACR;YACA;YACA;YACA;YACA;YACA;SACD;IACH;IAEA,OAAO/B,cAAcmC,UAAU,CAACG;AAClC"}
1
+ {"version":3,"sources":["../../../src/cli/help-text.js"],"sourcesContent":["/**\n * Help text templates for Claude Flow CLI\n * Provides clear, actionable command documentation\n */\n\nimport { HelpFormatter } from './help-formatter.js';\nimport { VERSION } from '../core/version.js';\n\nexport { VERSION };\n\nexport const MAIN_HELP = `\n🌊 Claude-Flow v${VERSION} - Enterprise-Grade AI Agent Orchestration Platform\n\nšŸš€ v2.7.6 - MCP Stdio Fix & Production Ready\n\nšŸ”„ NEW IN v2.7.6:\n āœ… MCP Server Stdio Mode Fixed - Clean JSON-RPC protocol on stdout (#835)\n šŸ”§ Smart Logging Helpers - Auto-route output based on mode (stdio vs HTTP)\n šŸ› Protocol Corruption Resolved - Now compatible with standard MCP clients\n šŸ“¦ AgentDB Integration - 150x faster vector search with persistent memory\n 🧠 ReasoningBank Support - Self-learning with trajectory tracking\n šŸŽÆ Backward Compatible - HTTP mode unchanged, stdio mode now works correctly\n\nšŸŽÆ ENTERPRISE FEATURES:\n • Complete ruv-swarm integration with 90+ MCP tools\n • Flow Nexus cloud platform with distributed sandboxes\n • Claude Code SDK integration for maximum performance\n • Production-ready infrastructure with enterprise reliability\n\nUSAGE:\n npx claude-flow <command> [options] # Run latest alpha version\n npx claude-flow <command> --help # Get detailed help for any command\n npx claude-flow --help # Show this help\n \n # After local install:\n claude-flow <command> [options]\n claude-flow <command> --help # Get detailed help for any command\n\nšŸš€ QUICK START:\n # First time setup (creates CLAUDE.md & .claude/commands)\n npx claude-flow init\n \n # 🌐 FLOW NEXUS CLOUD (NEW!):\n mcp__flow-nexus__user_register # Register for cloud features\n mcp__flow-nexus__user_login # Login to access sandboxes & neural networks\n mcp__flow-nexus__sandbox_create # Create cloud execution environments\n \n # šŸ HIVE MIND QUICK START:\n claude-flow hive-mind wizard # Interactive setup wizard\n claude-flow hive-mind spawn \"objective\" # Create intelligent swarm\n claude-flow hive-mind spawn \"Build API\" --claude # Open Claude Code CLI\n \n # After setup, use without npx:\n claude-flow start --swarm # Start with swarm intelligence\n claude-flow swarm \"build REST API\" # Deploy multi-agent workflow\n claude-flow swarm \"create service\" --claude # Open Claude Code CLI with swarm\n\nšŸ HIVE MIND COMMANDS (NEW!):\n hive-mind wizard šŸŽÆ Interactive setup wizard (RECOMMENDED)\n hive-mind init Initialize Hive Mind system with SQLite\n hive-mind spawn <task> Create intelligent swarm with objective\n hive-mind status View active swarms and performance metrics\n hive-mind metrics Advanced performance analytics\n\nšŸ“‹ CORE COMMANDS:\n init Initialize Claude Flow v2.0.0 (creates CLAUDE.md & .claude/commands)\n --monitoring enables token usage tracking\n start [--swarm] Start orchestration system\n swarm <objective> Multi-agent swarm coordination\n agent <action> Agent management (spawn, list, terminate)\n • agent booster Ultra-fast code editing (352x faster, $0 cost)\n - edit <file> Edit single file with local WASM processing\n - batch <pattern> Batch edit multiple files (1000 files in 1 sec)\n - benchmark Validate 352x speed claim with tests\n • agent memory ReasoningBank learning memory (46% faster, 88% success)\n - init Initialize ReasoningBank database\n - status Show memory statistics\n - list List stored memories\n sparc <mode> SPARC development modes (13 available)\n memory <action> ReasoningBank persistent memory system\n proxy <action> OpenRouter proxy server (85-98% cost savings)\n - start Start proxy server\n - status Check proxy status\n - config Configuration guide\n github <mode> GitHub workflow automation (6 modes)\n status System status and health\n \nšŸ” VERIFICATION COMMANDS (NEW!):\n verify <subcommand> Truth verification system (0.95 threshold)\n truth View truth scores and reliability metrics\n pair [--start] Collaborative development with real-time verification\n \nšŸ“‹ SWARM INTELLIGENCE COMMANDS:\n training <command> Neural pattern learning & model updates (3 commands)\n coordination <command> Swarm & agent orchestration (3 commands)\n analysis <command> Performance & token usage analytics (real tracking!)\n automation <command> Intelligent agent & workflow management (3 commands)\n hooks <command> Lifecycle event management (5 commands)\n migrate-hooks Migrate settings.json to Claude Code 1.0.51+ format\n monitoring <command> Real-time system monitoring (3 commands)\n optimization <command> Performance & topology optimization (3 commands)\n \nšŸ“‹ ADDITIONAL COMMANDS:\n task <action> Task and workflow management\n config <action> System configuration\n mcp <action> MCP server management\n batch <action> Batch operations\n stream-chain <workflow> Stream-JSON chaining for multi-agent pipelines\n\nšŸ”„ NEW MCP TOOLS (v2.5.0-alpha.130):\n Available via Claude Code after installing:\n claude mcp add claude-flow npx claude-flow@alpha mcp start\n\n mcp__claude-flow__agents_spawn_parallel Spawn agents in parallel (10-20x faster)\n • Spawn multiple agents concurrently\n • 10-20x speedup vs sequential spawning\n • Example: 3 agents in 150ms instead of 2250ms\n\n mcp__claude-flow__query_control Control running queries in real-time\n • Actions: pause, resume, terminate\n • Change model mid-execution (Sonnet → Haiku for cost savings)\n • Change permissions dynamically\n • Execute commands in query context\n\n mcp__claude-flow__query_list List active queries with status\n • View all running queries\n • Monitor query status and performance\n • Filter by active or include history\n\nšŸ” GET HELP:\n npx claude-flow --help Show this help\n npx claude-flow <command> --help Detailed command help\n\nšŸŽÆ RECOMMENDED FOR NEW USERS:\n npx claude-flow hive-mind wizard # Start here! Interactive guided setup\n npx claude-flow init # Initialize Claude Flow\n npx claude-flow help hive-mind # Learn about Hive Mind features\n npx claude-flow swarm \"Build API\" --claude # Quick start with Claude Code CLI\n\nšŸ“š Documentation: https://github.com/ruvnet/claude-flow\nšŸ Hive Mind Guide: https://github.com/ruvnet/claude-flow/tree/main/docs/hive-mind\nšŸ ruv-swarm: https://github.com/ruvnet/ruv-FANN/tree/main/ruv-swarm\nšŸ’¬ Discord Community: https://discord.agentics.org\n\nšŸ’– Created by rUv with love: https://github.com/ruvnet\n`;\n\nexport const COMMAND_HELP = {\n verify: `\nšŸ” VERIFY COMMAND - Truth Verification System\n\nUSAGE:\n claude-flow verify <subcommand> [options]\n\nDESCRIPTION:\n Enforce truth and accuracy in multi-agent operations with a 0.95 threshold.\n \"Truth is enforced, not assumed\" - every agent claim is verified.\n\nSUBCOMMANDS:\n init <mode> Initialize verification system\n Modes: strict (0.95), moderate (0.85), development (0.75)\n verify <task> Run verification on specific task or agent\n status Show verification system status and metrics\n rollback Trigger manual rollback to last good state\n\nOPTIONS:\n --threshold <n> Custom accuracy threshold (0.0-1.0)\n --agent <type> Specify agent type for verification\n --auto-rollback Enable automatic rollback on failures\n --verbose Detailed verification output\n --json Output in JSON format\n\nEXAMPLES:\n claude-flow verify init strict # Production mode\n claude-flow verify verify task-123 --agent coder\n claude-flow verify status --recent 10\n claude-flow verify rollback --checkpoint last\n`,\n truth: `\nšŸ“Š TRUTH COMMAND - Truth Score Analytics\n\nUSAGE:\n claude-flow truth [options]\n\nDESCRIPTION:\n View and analyze truth scores, reliability metrics, and verification history.\n Provides insights into agent accuracy and system reliability.\n\nOPTIONS:\n --report Generate detailed truth score report\n --analyze Analyze failure patterns and trends\n --agent <type> Filter by specific agent type\n --taskId <id> Check specific task truth score\n --threshold <n> Filter scores below threshold\n --json Output in JSON format\n --export <file> Export report to file\n\nEXAMPLES:\n claude-flow truth # Show current scores\n claude-flow truth --report # Detailed report\n claude-flow truth --analyze # Pattern analysis\n claude-flow truth --agent coder --detailed\n claude-flow truth --json | jq .averageScore\n`,\n pair: `\nšŸ‘„ PAIR COMMAND - Collaborative Development Mode\n\nUSAGE:\n claude-flow pair [options]\n\nDESCRIPTION:\n Real-time collaborative development with AI verification.\n Continuous validation with instant feedback and auto-rollback.\n\nOPTIONS:\n --start Start new pair programming session\n --mode <type> Set verification mode:\n strict (0.95), standard (0.85), development (0.75)\n --threshold <n> Custom accuracy threshold (0.0-1.0)\n --verify Enable real-time verification\n --monitor Show real-time metrics dashboard\n --auto-rollback Enable automatic rollback on failures\n --summary View session summary\n --export <file> Export session metrics\n\nEXAMPLES:\n claude-flow pair --start # Start session\n claude-flow pair --start --mode strict # Production pairing\n claude-flow pair --threshold 0.90 # Custom threshold\n claude-flow pair --summary # View session stats\n claude-flow pair --monitor --verify # Real-time monitoring\n`,\n swarm: `\n🧠 SWARM COMMAND - Multi-Agent AI Coordination\n\nUSAGE:\n claude-flow swarm <objective> [options]\n\nDESCRIPTION:\n Deploy intelligent multi-agent swarms to accomplish complex objectives.\n Agents work in parallel with neural optimization and real-time coordination.\n\nOPTIONS:\n --strategy <type> Execution strategy: research, development, analysis,\n testing, optimization, maintenance\n --mode <type> Coordination mode: centralized, distributed,\n hierarchical, mesh, hybrid\n --max-agents <n> Maximum number of agents (default: 5)\n --parallel Enable parallel execution (2.8-4.4x speed improvement)\n --monitor Real-time swarm monitoring\n --background Run in background with progress tracking\n --claude Open Claude Code CLI\n --executor Use built-in executor instead of Claude Code\n --analysis Enable analysis/read-only mode (no code changes)\n --read-only Enable read-only mode (alias for --analysis)\n\nEXAMPLES:\n claude-flow swarm \"Build a REST API with authentication\"\n claude-flow swarm \"Research cloud architecture patterns\" --strategy research\n claude-flow swarm \"Optimize database queries\" --max-agents 3 --parallel\n claude-flow swarm \"Develop feature X\" --strategy development --monitor\n claude-flow swarm \"Build API\" --claude # Open Claude Code CLI\n claude-flow swarm \"Create service\" --executor # Use built-in executor\n claude-flow swarm \"Analyze codebase for security issues\" --analysis\n claude-flow swarm \"Review architecture patterns\" --read-only --strategy research\n\nAGENT TYPES:\n researcher Research with web access and data analysis\n coder Code development with neural patterns\n analyst Performance analysis and optimization\n architect System design with enterprise patterns\n tester Comprehensive testing with automation\n coordinator Multi-agent orchestration\n\nANALYSIS MODE:\n When using --analysis or --read-only flags, the swarm operates in a safe\n read-only mode that prevents all code modifications. Perfect for:\n \n • Code reviews and security audits\n • Architecture analysis and documentation\n • Performance bottleneck identification\n • Technical debt assessment\n • Dependency mapping and analysis\n • \"What-if\" scenario exploration\n \n In analysis mode, agents can only read files, search codebases, and\n generate reports - no Write, Edit, or system-modifying operations.\n`,\n\n github: `\nšŸ™ GITHUB COMMAND - Workflow Automation\n\nUSAGE:\n claude-flow github <mode> <objective> [options]\n\nDESCRIPTION:\n Automate GitHub workflows with 6 specialized AI-powered modes.\n Each mode handles specific aspects of repository management.\n\nMODES:\n init Initialize GitHub-enhanced checkpoint system (NEW!)\n gh-coordinator GitHub workflow orchestration and CI/CD\n pr-manager Pull request management with reviews\n issue-tracker Issue management and project coordination\n release-manager Release coordination and deployment\n repo-architect Repository structure optimization\n sync-coordinator Multi-package synchronization\n\nOPTIONS:\n --auto-approve Automatically approve safe changes\n --dry-run Preview changes without applying\n --verbose Detailed operation logging\n --config <file> Custom configuration file\n\nEXAMPLES:\n claude-flow github init # Initialize GitHub checkpoint hooks\n claude-flow github pr-manager \"create feature PR with tests\"\n claude-flow github gh-coordinator \"setup CI/CD pipeline\" --auto-approve\n claude-flow github release-manager \"prepare v2.0.0 release\"\n claude-flow github repo-architect \"optimize monorepo structure\"\n claude-flow github issue-tracker \"analyze and label issues\"\n claude-flow github sync-coordinator \"sync versions across packages\"\n`,\n\n agent: `\nšŸ¤– AGENT COMMAND - AI Agent Management\n\nUSAGE:\n claude-flow agent <action> [options]\n\nACTIONS:\n spawn <type> Create new AI agent\n list List all active agents\n terminate <id> Terminate specific agent\n info <id> Show agent details\n hierarchy Manage agent hierarchies\n ecosystem View agent ecosystem\n\nOPTIONS:\n --name <name> Custom agent name\n --verbose Detailed output\n --json JSON output format\n\nAGENT TYPES:\n researcher Research and data analysis\n coder Code generation and refactoring\n analyst Performance and security analysis\n architect System design and architecture\n tester Test creation and execution\n coordinator Task coordination\n reviewer Code and design review\n optimizer Performance optimization\n\nEXAMPLES:\n claude-flow agent spawn researcher --name \"DataBot\"\n claude-flow agent list --verbose\n claude-flow agent terminate agent-123\n claude-flow agent hierarchy create enterprise\n claude-flow agent ecosystem status\n`,\n\n memory: `\nšŸ’¾ MEMORY COMMAND - Persistent Memory Management\n\nUSAGE:\n claude-flow memory <action> [options]\n\nACTIONS:\n store <key> <value> Store data in memory\n get <key> Retrieve stored data\n query <search> Search memory contents\n list List all stored items\n delete <key> Delete specific entry\n stats Memory usage statistics\n export <file> Export memory to file\n import <file> Import memory from file\n cleanup Clean old entries\n\nOPTIONS:\n --namespace <ns> Use specific namespace\n --format <type> Output format (json, table)\n --verbose Detailed output\n\nEXAMPLES:\n claude-flow memory store architecture \"microservices pattern\"\n claude-flow memory get architecture\n claude-flow memory query \"API design\"\n claude-flow memory stats\n claude-flow memory export backup.json\n claude-flow memory cleanup --older-than 30d\n`,\n\n sparc: `\nšŸš€ SPARC COMMAND - Development Mode Operations\n\nUSAGE:\n claude-flow sparc [mode] [objective]\n claude-flow sparc <action>\n\nDESCRIPTION:\n SPARC provides 17 specialized development modes for different workflows.\n Each mode optimizes AI assistance for specific tasks.\n\nMODES:\n architect System architecture and design\n code Code generation and implementation\n tdd Test-driven development workflow\n debug Debugging and troubleshooting\n security Security analysis and fixes\n refactor Code refactoring and optimization\n docs Documentation generation\n review Code review and quality checks\n data Data modeling and analysis\n api API design and implementation\n ui UI/UX development\n ops DevOps and infrastructure\n ml Machine learning workflows\n blockchain Blockchain development\n mobile Mobile app development\n game Game development\n iot IoT system development\n\nACTIONS:\n modes List all available modes\n info <mode> Show mode details\n run <mode> Run specific mode\n\nEXAMPLES:\n claude-flow sparc \"design authentication system\" # Auto-select mode\n claude-flow sparc architect \"design microservices\" # Use architect mode\n claude-flow sparc tdd \"user registration feature\" # TDD workflow\n claude-flow sparc modes # List all modes\n claude-flow sparc info security # Mode details\n`,\n\n init: `\nšŸŽÆ INIT COMMAND - Initialize Claude Flow Environment\n\nUSAGE:\n claude-flow init [options]\n\nDESCRIPTION:\n Initialize Claude Flow v2.0.0 in your project with full MCP integration.\n By default creates standard setup with local Git checkpoints.\n \n TWO INITIALIZATION MODES:\n • claude-flow init Standard init with local Git checkpoints\n • claude-flow github init GitHub-enhanced with automatic releases (NEW!)\n\nOPTIONS:\n --force Overwrite existing configuration\n --dry-run Preview what will be created\n --basic Use basic initialization (pre-v2.0.0)\n --sparc SPARC enterprise setup with additional features\n --minimal Minimal setup without examples\n --template <t> Use specific project template\n\nWHAT claude-flow init CREATES (DEFAULT):\n šŸ“„ CLAUDE.md AI-readable project instructions & context\n šŸ“ .claude/ Enterprise configuration directory containing:\n └── commands/ Custom commands and automation scripts\n └── settings.json Advanced configuration and hooks\n └── hooks/ Pre/post operation automation\n šŸ“‹ .roomodes 17 specialized SPARC development modes\n \n CLAUDE.md CONTENTS:\n • Project overview and objectives\n • Technology stack and architecture\n • Development guidelines and patterns\n • AI-specific instructions for better assistance\n • Integration with ruv-swarm MCP tools\n \n .claude/commands INCLUDES:\n • Custom project-specific commands\n • Automated workflow scripts\n • Integration hooks for Claude Code\n • Team collaboration tools\n \n Features enabled:\n • ruv-swarm integration with 27 MCP tools\n • Neural network processing with WASM\n • Multi-agent coordination topologies\n • Cross-session memory persistence\n • GitHub workflow automation\n • Performance monitoring\n • Enterprise security features\n\nEXAMPLES:\n npx claude-flow init # Standard init with local checkpoints\n npx claude-flow github init # GitHub-enhanced init with releases\n claude-flow init --force # Overwrite existing configuration\n claude-flow github init --force # Force GitHub mode (overwrite)\n claude-flow init --dry-run # Preview what will be created\n claude-flow init --monitoring # Initialize with token tracking\n claude-flow init --sparc # SPARC enterprise setup\n claude-flow init --minimal # Basic setup only\n`,\n\n start: `\nšŸš€ START COMMAND - Start Orchestration System\n\nUSAGE:\n claude-flow start [options]\n\nDESCRIPTION:\n Start the Claude Flow orchestration system with optional swarm intelligence.\n\nOPTIONS:\n --swarm Enable swarm intelligence features\n --daemon Run as background daemon\n --port <port> MCP server port (default: 3000)\n --verbose Detailed logging\n --config <file> Custom configuration file\n\nEXAMPLES:\n claude-flow start # Basic start\n claude-flow start --swarm # Start with swarm features\n claude-flow start --daemon # Background daemon\n claude-flow start --port 8080 # Custom MCP port\n claude-flow start --config prod.json # Production config\n`,\n\n status: `\nšŸ“Š STATUS COMMAND - System Status\n\nUSAGE:\n claude-flow status [options]\n\nDESCRIPTION:\n Show comprehensive system status including agents, tasks, and resources.\n\nOPTIONS:\n --verbose Detailed system information\n --json JSON output format\n --watch Live updates\n --interval <ms> Update interval (with --watch)\n\nOUTPUT INCLUDES:\n • Orchestrator status\n • Active agents and their state\n • Task queue and progress\n • Memory usage statistics\n • MCP server status\n • System resources\n • Performance metrics\n\nEXAMPLES:\n claude-flow status # Basic status\n claude-flow status --verbose # Detailed information\n claude-flow status --json # Machine-readable format\n claude-flow status --watch # Live monitoring\n`,\n\n training: `\n🧠 TRAINING COMMAND - Neural Pattern Learning & Model Updates\n\nUSAGE:\n claude-flow training <command> [options]\n\nDESCRIPTION:\n Train neural patterns from operations, learn from outcomes, and update agent models \n with real ruv-swarm integration for continuous learning and optimization.\n\nCOMMANDS:\n neural-train Train neural patterns from operations data\n pattern-learn Learn from specific operation outcomes \n model-update Update agent models with new insights\n\nNEURAL TRAIN OPTIONS:\n --data <source> Training data source (default: recent)\n Options: recent, historical, custom, swarm-<id>\n --model <name> Target model (default: general-predictor)\n Options: task-predictor, agent-selector, performance-optimizer\n --epochs <n> Training epochs (default: 50)\n\nPATTERN LEARN OPTIONS:\n --operation <op> Operation type to learn from\n --outcome <result> Operation outcome (success/failure/partial)\n\nMODEL UPDATE OPTIONS:\n --agent-type <type> Agent type to update (coordinator, coder, researcher, etc.)\n --operation-result <res> Result from operation execution\n\nEXAMPLES:\n claude-flow training neural-train --data recent --model task-predictor\n claude-flow training pattern-learn --operation \"file-creation\" --outcome \"success\"\n claude-flow training model-update --agent-type coordinator --operation-result \"efficient\"\n claude-flow training neural-train --data \"swarm-123\" --epochs 100 --model \"coordinator-predictor\"\n\nšŸŽÆ Neural training improves:\n • Task selection accuracy\n • Agent performance prediction \n • Coordination efficiency\n • Error prevention patterns\n`,\n\n coordination: `\nšŸ COORDINATION COMMAND - Swarm & Agent Orchestration\n\nUSAGE:\n claude-flow coordination <command> [options]\n\nDESCRIPTION:\n Initialize swarms, spawn coordinated agents, and orchestrate task execution \n across agents with real ruv-swarm MCP integration for optimal performance.\n\nCOMMANDS:\n swarm-init Initialize swarm coordination infrastructure\n agent-spawn Spawn and coordinate new agents\n task-orchestrate Orchestrate task execution across agents\n\nSWARM-INIT OPTIONS:\n --swarm-id <id> Swarm identifier (auto-generated if not provided)\n --topology <type> Coordination topology (default: hierarchical)\n Options: hierarchical, mesh, ring, star, hybrid\n --max-agents <n> Maximum number of agents (default: 5)\n --strategy <strategy> Coordination strategy (default: balanced)\n\nAGENT-SPAWN OPTIONS:\n --type <type> Agent type (default: general)\n Options: coordinator, coder, developer, researcher, analyst, analyzer, \n tester, architect, reviewer, optimizer, general\n --name <name> Custom agent name (auto-generated if not provided)\n --swarm-id <id> Target swarm for agent coordination\n --capabilities <cap> Custom capabilities specification\n\nTASK-ORCHESTRATE OPTIONS:\n --task <description> Task description (required)\n --swarm-id <id> Target swarm for task execution\n --strategy <strategy> Coordination strategy (default: adaptive)\n Options: adaptive, parallel, sequential, hierarchical\n --share-results Enable result sharing across swarm\n\nEXAMPLES:\n claude-flow coordination swarm-init --topology hierarchical --max-agents 8\n claude-flow coordination agent-spawn --type developer --name \"api-dev\" --swarm-id swarm-123\n claude-flow coordination task-orchestrate --task \"Build REST API\" --strategy parallel --share-results\n claude-flow coordination swarm-init --topology mesh --max-agents 12\n\nšŸŽÆ Coordination enables:\n • Intelligent task distribution\n • Agent synchronization\n • Shared memory coordination\n • Performance optimization\n • Fault tolerance\n`,\n\n analysis: `\nšŸ“Š ANALYSIS COMMAND - Performance & Usage Analytics\n\nUSAGE:\n claude-flow analysis <command> [options]\n\nDESCRIPTION:\n Detect performance bottlenecks, generate comprehensive reports, and analyze \n token consumption using real ruv-swarm analytics for system optimization.\n\nCOMMANDS:\n bottleneck-detect Detect performance bottlenecks in the system\n performance-report Generate comprehensive performance reports\n token-usage Analyze token consumption and costs\n\nBOTTLENECK DETECT OPTIONS:\n --scope <scope> Analysis scope (default: system)\n Options: system, swarm, agent, task, memory\n --target <target> Specific target to analyze (default: all)\n Examples: agent-id, swarm-id, task-type\n\nPERFORMANCE REPORT OPTIONS:\n --timeframe <time> Report timeframe (default: 24h)\n Options: 1h, 6h, 24h, 7d, 30d\n --format <format> Report format (default: summary)\n Options: summary, detailed, json, csv\n\nTOKEN USAGE OPTIONS:\n --agent <agent> Filter by agent type or ID (default: all)\n --breakdown Include detailed breakdown by agent type\n --cost-analysis Include cost projections and optimization\n\nEXAMPLES:\n claude-flow analysis bottleneck-detect --scope system\n claude-flow analysis bottleneck-detect --scope agent --target coordinator-1\n claude-flow analysis performance-report --timeframe 7d --format detailed\n claude-flow analysis token-usage --breakdown --cost-analysis\n claude-flow analysis bottleneck-detect --scope swarm --target swarm-123\n\nšŸŽÆ Analysis helps with:\n • Performance optimization\n • Cost management\n • Resource allocation\n • Bottleneck identification\n • Trend analysis\n`,\n\n automation: `\nšŸ¤– AUTOMATION COMMAND - Intelligent Agent & Workflow Management\n\nUSAGE:\n claude-flow automation <command> [options]\n\nDESCRIPTION:\n Automatically spawn optimal agents, intelligently manage workflows, and select \n optimal configurations with real ruv-swarm intelligence for maximum efficiency.\n\nCOMMANDS:\n auto-agent Automatically spawn optimal agents based on task complexity\n smart-spawn Intelligently spawn agents based on specific requirements\n workflow-select Select and configure optimal workflows for project types\n\nAUTO-AGENT OPTIONS:\n --task-complexity <level> Task complexity level (default: medium)\n Options: low, medium, high, enterprise\n --swarm-id <id> Target swarm ID for agent spawning\n\nSMART-SPAWN OPTIONS:\n --requirement <req> Specific requirement description\n Examples: \"web-development\", \"data-analysis\", \"enterprise-api\"\n --max-agents <n> Maximum number of agents to spawn (default: 10)\n\nWORKFLOW-SELECT OPTIONS:\n --project-type <type> Project type (default: general)\n Options: web-app, api, data-analysis, enterprise, general\n --priority <priority> Optimization priority (default: balanced)\n Options: speed, quality, cost, balanced\n\nEXAMPLES:\n claude-flow automation auto-agent --task-complexity enterprise --swarm-id swarm-123\n claude-flow automation smart-spawn --requirement \"web-development\" --max-agents 8\n claude-flow automation workflow-select --project-type api --priority speed\n claude-flow automation auto-agent --task-complexity low\n\nšŸŽÆ Automation benefits:\n • Optimal resource allocation\n • Intelligent agent selection\n • Workflow optimization\n • Reduced manual configuration\n • Performance-based scaling\n`,\n\n hooks: `\nšŸ”— HOOKS COMMAND - Lifecycle Event Management\n\nUSAGE:\n claude-flow hooks <command> [options]\n\nDESCRIPTION:\n Execute lifecycle hooks before and after tasks, edits, and sessions with \n real ruv-swarm integration for automated preparation, tracking, and cleanup.\n\nCOMMANDS:\n pre-task Execute before task begins (preparation & setup)\n post-task Execute after task completion (analysis & cleanup)\n pre-edit Execute before file modifications (backup & validation)\n post-edit Execute after file modifications (tracking & coordination)\n session-end Execute at session termination (cleanup & export)\n\nPRE-TASK OPTIONS:\n --description <desc> Task description\n --task-id <id> Task identifier\n --agent-id <id> Executing agent identifier\n --auto-spawn-agents Auto-spawn agents for task (default: true)\n\nPOST-TASK OPTIONS:\n --task-id <id> Task identifier\n --analyze-performance Generate performance analysis\n --generate-insights Create AI-powered insights\n\nPRE-EDIT OPTIONS:\n --file <path> Target file path\n --operation <type> Edit operation type (edit, create, delete)\n\nPOST-EDIT OPTIONS:\n --file <path> Modified file path\n --memory-key <key> Coordination memory key for storing edit info\n\nSESSION-END OPTIONS:\n --export-metrics Export session performance metrics\n --swarm-id <id> Swarm identifier for coordination cleanup\n --generate-summary Create comprehensive session summary\n\nEXAMPLES:\n claude-flow hooks pre-task --description \"Build API\" --task-id task-123 --agent-id agent-456\n claude-flow hooks post-task --task-id task-123 --analyze-performance --generate-insights\n claude-flow hooks pre-edit --file \"src/api.js\" --operation edit\n claude-flow hooks post-edit --file \"src/api.js\" --memory-key \"swarm/123/edits/timestamp\"\n claude-flow hooks session-end --export-metrics --generate-summary --swarm-id swarm-123\n\nšŸŽÆ Hooks enable:\n • Automated preparation & cleanup\n • Performance tracking\n • Coordination synchronization\n • Error prevention\n • Insight generation\n`,\n};\n\nexport function getCommandHelp(command) {\n // Return legacy format for now - to be updated\n return COMMAND_HELP[command] || `Help not available for command: ${command}`;\n}\n\nexport function getStandardizedCommandHelp(command) {\n const commandConfigs = {\n agent: {\n name: 'claude-flow agent',\n description: 'Manage agents with agentic-flow integration (66+ agents, ultra-fast editing, ReasoningBank memory)',\n usage: 'claude-flow agent <action> [options]',\n commands: [\n { name: 'run <agent> \"<task>\"', description: 'Execute agent with multi-provider (NEW)' },\n { name: 'agents', description: 'List all 66+ agentic-flow agents (NEW)' },\n { name: 'booster edit <file>', description: 'Ultra-fast editing - 352x faster (NEW)' },\n { name: 'booster batch <pattern>', description: 'Batch edit multiple files (NEW)' },\n { name: 'memory init', description: 'Initialize ReasoningBank learning memory - 46% faster execution (NEW)' },\n { name: 'memory status', description: 'Show ReasoningBank status and statistics (NEW)' },\n { name: 'memory list', description: 'List stored ReasoningBank memories (NEW)' },\n { name: 'config wizard', description: 'Interactive setup wizard (NEW)' },\n { name: 'mcp start', description: 'Start MCP server (NEW)' },\n { name: 'spawn', description: 'Create internal agent' },\n { name: 'list', description: 'List active internal agents' },\n { name: 'info', description: 'Show agent details' },\n { name: 'terminate', description: 'Stop an agent' },\n { name: 'hierarchy', description: 'Manage agent hierarchies' },\n { name: 'ecosystem', description: 'View agent ecosystem' },\n ],\n options: [\n {\n flags: '--type <type>',\n description: 'Agent type',\n validValues: [\n 'coordinator',\n 'researcher',\n 'coder',\n 'analyst',\n 'architect',\n 'tester',\n 'reviewer',\n 'optimizer',\n ],\n },\n {\n flags: '--name <name>',\n description: 'Agent name',\n },\n {\n flags: '--verbose',\n description: 'Detailed output',\n },\n {\n flags: '--json',\n description: 'Output in JSON format',\n },\n {\n flags: '--help',\n description: 'Show this help message',\n },\n ],\n examples: [\n 'claude-flow agent spawn researcher --name \"Research Bot\"',\n 'claude-flow agent list --json',\n 'claude-flow agent terminate agent-123',\n 'claude-flow agent info agent-456 --verbose',\n ],\n },\n sparc: {\n name: 'claude-flow sparc',\n description: 'Execute SPARC development modes',\n usage: 'claude-flow sparc <mode> [task] [options]',\n commands: [\n { name: 'spec', description: 'Specification mode - Requirements analysis' },\n { name: 'architect', description: 'Architecture mode - System design' },\n { name: 'tdd', description: 'Test-driven development mode' },\n { name: 'integration', description: 'Integration mode - Component connection' },\n { name: 'refactor', description: 'Refactoring mode - Code improvement' },\n { name: 'modes', description: 'List all available SPARC modes' },\n ],\n options: [\n {\n flags: '--file <path>',\n description: 'Input/output file path',\n },\n {\n flags: '--format <type>',\n description: 'Output format',\n validValues: ['markdown', 'json', 'yaml'],\n },\n {\n flags: '--verbose',\n description: 'Detailed output',\n },\n {\n flags: '--help',\n description: 'Show this help message',\n },\n ],\n examples: [\n 'claude-flow sparc spec \"User authentication system\"',\n 'claude-flow sparc tdd \"Payment processing module\"',\n 'claude-flow sparc architect \"Microservices architecture\"',\n 'claude-flow sparc modes',\n ],\n },\n memory: {\n name: 'claude-flow memory',\n description: 'Manage persistent memory operations',\n usage: 'claude-flow memory <action> [key] [value] [options]',\n commands: [\n { name: 'store', description: 'Store data in memory' },\n { name: 'query', description: 'Search memory by pattern' },\n { name: 'list', description: 'List memory namespaces' },\n { name: 'export', description: 'Export memory to file' },\n { name: 'import', description: 'Import memory from file' },\n { name: 'clear', description: 'Clear memory namespace' },\n ],\n options: [\n {\n flags: '--namespace <name>',\n description: 'Memory namespace',\n defaultValue: 'default',\n },\n {\n flags: '--ttl <seconds>',\n description: 'Time to live in seconds',\n },\n {\n flags: '--format <type>',\n description: 'Export format',\n validValues: ['json', 'yaml'],\n },\n {\n flags: '--help',\n description: 'Show this help message',\n },\n ],\n examples: [\n 'claude-flow memory store \"api_design\" \"REST endpoints specification\"',\n 'claude-flow memory query \"authentication\"',\n 'claude-flow memory export backup.json',\n 'claude-flow memory list --namespace project',\n ],\n },\n };\n\n const config = commandConfigs[command];\n if (!config) {\n return HelpFormatter.formatError(\n `Unknown command: ${command}`,\n 'claude-flow',\n 'claude-flow <command> --help',\n );\n }\n\n return HelpFormatter.formatHelp(config);\n}\n\nexport function getMainHelp(plain = false) {\n // Return the vibrant, emoji-rich version by default\n if (!plain) {\n return MAIN_HELP;\n }\n\n // Return plain standardized format when requested\n const helpInfo = {\n name: 'claude-flow',\n description: 'Advanced AI agent orchestration system',\n usage: `claude-flow <command> [<args>] [options]\n claude-flow <command> --help\n claude-flow --version`,\n commands: [\n {\n name: 'hive-mind',\n description: 'Manage hive mind swarm intelligence',\n aliases: ['hm'],\n },\n {\n name: 'init',\n description: 'Initialize Claude Flow configuration',\n },\n {\n name: 'start',\n description: 'Start orchestration system',\n },\n {\n name: 'swarm',\n description: 'Execute multi-agent swarm coordination',\n },\n {\n name: 'agent',\n description: 'Manage individual agents',\n },\n {\n name: 'sparc',\n description: 'Execute SPARC development modes',\n },\n {\n name: 'memory',\n description: 'Manage persistent memory operations',\n },\n {\n name: 'github',\n description: 'Automate GitHub workflows',\n },\n {\n name: 'status',\n description: 'Show system status and health',\n },\n {\n name: 'config',\n description: 'Manage configuration settings',\n },\n {\n name: 'session',\n description: 'Manage sessions and state persistence',\n },\n {\n name: 'terminal',\n description: 'Terminal pool management',\n },\n {\n name: 'workflow',\n description: 'Manage automated workflows',\n },\n {\n name: 'training',\n description: 'Neural pattern training',\n },\n {\n name: 'coordination',\n description: 'Swarm coordination commands',\n },\n {\n name: 'help',\n description: 'Show help information',\n },\n ],\n globalOptions: [\n {\n flags: '--config <path>',\n description: 'Configuration file path',\n defaultValue: '.claude/config.json',\n },\n {\n flags: '--verbose',\n description: 'Enable verbose output',\n },\n {\n flags: '--quiet',\n description: 'Suppress non-error output',\n },\n {\n flags: '--json',\n description: 'Output in JSON format',\n },\n {\n flags: '--plain',\n description: 'Show plain help without emojis',\n },\n {\n flags: '--help',\n description: 'Show help information',\n },\n {\n flags: '--version',\n description: 'Show version information',\n },\n ],\n examples: [\n 'npx claude-flow init',\n 'claude-flow hive-mind wizard',\n 'claude-flow swarm \"Build REST API\"',\n 'claude-flow agent spawn researcher --name \"Research Bot\"',\n 'claude-flow status --json',\n 'claude-flow memory query \"API design\"',\n ],\n };\n\n return HelpFormatter.formatHelp(helpInfo);\n}\n"],"names":["HelpFormatter","VERSION","MAIN_HELP","COMMAND_HELP","verify","truth","pair","swarm","github","agent","memory","sparc","init","start","status","training","coordination","analysis","automation","hooks","getCommandHelp","command","getStandardizedCommandHelp","commandConfigs","name","description","usage","commands","options","flags","validValues","examples","defaultValue","config","formatError","formatHelp","getMainHelp","plain","helpInfo","aliases","globalOptions"],"mappings":"AAKA,SAASA,aAAa,QAAQ,sBAAsB;AACpD,SAASC,OAAO,QAAQ,qBAAqB;AAE7C,SAASA,OAAO,GAAG;AAEnB,OAAO,MAAMC,YAAY,CAAC;gBACV,EAAED,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsI1B,CAAC,CAAC;AAEF,OAAO,MAAME,eAAe;IAC1BC,QAAQ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BX,CAAC;IACCC,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;AAyBV,CAAC;IACCC,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BT,CAAC;IACCC,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuDV,CAAC;IAECC,QAAQ,CAAC;;;;;;;;;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AAU;YACR;gBACEH,MAAM;gBACNC,aAAa;gBACbc,SAAS;oBAAC;iBAAK;YACjB;YACA;gBACEf,MAAM;gBACNC,aAAa;YACf;YACA;gBACED,MAAM;gBACNC,aAAa;YACf;YACA;gBACED,MAAM;gBACNC,aAAa;YACf;YACA;gBACED,MAAM;gBACNC,aAAa;YACf;YACA;gBACED,MAAM;gBACNC,aAAa;YACf;YACA;gBACED,MAAM;gBACNC,aAAa;YACf;YACA;gBACED,MAAM;gBACNC,aAAa;YACf;YACA;gBACED,MAAM;gBACNC,aAAa;YACf;YACA;gBACED,MAAM;gBACNC,aAAa;YACf;YACA;gBACED,MAAM;gBACNC,aAAa;YACf;YACA;gBACED,MAAM;gBACNC,aAAa;YACf;YACA;gBACED,MAAM;gBACNC,aAAa;YACf;YACA;gBACED,MAAM;gBACNC,aAAa;YACf;YACA;gBACED,MAAM;gBACNC,aAAa;YACf;YACA;gBACED,MAAM;gBACNC,aAAa;YACf;SACD;QACDe,eAAe;YACb;gBACEX,OAAO;gBACPJ,aAAa;gBACbO,cAAc;YAChB;YACA;gBACEH,OAAO;gBACPJ,aAAa;YACf;YACA;gBACEI,OAAO;gBACPJ,aAAa;YACf;YACA;gBACEI,OAAO;gBACPJ,aAAa;YACf;YACA;gBACEI,OAAO;gBACPJ,aAAa;YACf;YACA;gBACEI,OAAO;gBACPJ,aAAa;YACf;YACA;gBACEI,OAAO;gBACPJ,aAAa;YACf;SACD;QACDM,UAAU;YACR;YACA;YACA;YACA;YACA;YACA;SACD;IACH;IAEA,OAAO/B,cAAcmC,UAAU,CAACG;AAClC"}
@@ -43,14 +43,6 @@ async function startMcpServer(subArgs, flags) {
43
43
  const stdio = subArgs.includes('--stdio') || flags.stdio || true;
44
44
  isStdioMode = stdio;
45
45
  if (stdio) {
46
- success('Starting Claude Flow MCP server in stdio mode...');
47
- if (autoOrchestrator) {
48
- log('šŸš€ Auto-starting orchestrator...');
49
- log('🧠 Neural network capabilities: ENABLED');
50
- log('šŸ”§ WASM SIMD optimization: ACTIVE');
51
- log('šŸ“Š Performance monitoring: ENABLED');
52
- log('šŸ Swarm coordination: READY');
53
- }
54
46
  try {
55
47
  const { fileURLToPath } = await import('url');
56
48
  const path = await import('path');
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/cli/simple-commands/mcp.js"],"sourcesContent":["// mcp.js - MCP server management commands\nimport { printSuccess, printError, printWarning } from '../utils.js';\n\n// Module-level state to track stdio mode\nlet isStdioMode = false;\n\n// Smart logging helpers that respect stdio mode\n// In stdio mode: route to stderr to keep stdout clean for JSON-RPC\n// In HTTP mode: route to stdout for normal behavior\nconst log = (...args) => (isStdioMode ? console.error(...args) : console.log(...args));\nconst success = (msg) => (isStdioMode ? console.error(`āœ… ${msg}`) : printSuccess(msg));\nconst error = (msg) => (isStdioMode ? console.error(`āŒ ${msg}`) : printError(msg));\nconst warning = (msg) => (isStdioMode ? console.error(`āš ļø ${msg}`) : printWarning(msg));\n\nexport async function mcpCommand(subArgs, flags) {\n const mcpCmd = subArgs[0];\n\n switch (mcpCmd) {\n case 'status':\n await showMcpStatus(subArgs, flags);\n break;\n\n case 'start':\n await startMcpServer(subArgs, flags);\n break;\n\n case 'stop':\n await stopMcpServer(subArgs, flags);\n break;\n\n case 'tools':\n await listMcpTools(subArgs, flags);\n break;\n\n case 'auth':\n await manageMcpAuth(subArgs, flags);\n break;\n\n case 'config':\n await showMcpConfig(subArgs, flags);\n break;\n\n default:\n showMcpHelp();\n }\n}\n\nasync function showMcpStatus(subArgs, flags) {\n success('MCP Server Status:');\n log('🌐 Status: Stopped (orchestrator not running)');\n log('šŸ”§ Configuration: Default settings');\n log('šŸ”Œ Connections: 0 active');\n log('šŸ“” Tools: Ready to load');\n log('šŸ” Authentication: Not configured');\n}\n\nasync function startMcpServer(subArgs, flags) {\n const autoOrchestrator = subArgs.includes('--auto-orchestrator') || flags.autoOrchestrator;\n const daemon = subArgs.includes('--daemon') || flags.daemon;\n const stdio = subArgs.includes('--stdio') || flags.stdio || true; // Default to stdio mode\n\n // Set module-level stdio flag for all helper functions\n isStdioMode = stdio;\n\n if (stdio) {\n // Start MCP server in stdio mode (like ruv-swarm)\n success('Starting Claude Flow MCP server in stdio mode...');\n\n if (autoOrchestrator) {\n log('šŸš€ Auto-starting orchestrator...');\n log('🧠 Neural network capabilities: ENABLED');\n log('šŸ”§ WASM SIMD optimization: ACTIVE');\n log('šŸ“Š Performance monitoring: ENABLED');\n log('šŸ Swarm coordination: READY');\n }\n\n // Import and start the MCP server\n try {\n const { fileURLToPath } = await import('url');\n const path = await import('path');\n const { spawn } = await import('child_process');\n\n const __filename = fileURLToPath(import.meta.url);\n const __dirname = path.dirname(__filename);\n // TODO: Switch to new TypeScript server (server-standalone.js) after fixing import resolution\n // For now, using old mcp-server.js for local testing\n // Phase 4 tools will be available after NPM publish\n const mcpServerPath = path.join(__dirname, '../../mcp/mcp-server.js');\n\n // Check if the file exists, and log the path for debugging\n const fs = await import('fs');\n if (!fs.existsSync(mcpServerPath)) {\n error(`MCP server file not found at: ${mcpServerPath}`);\n error(`Current directory: ${process.cwd()}`);\n error(`Script directory: ${__dirname}`);\n throw new Error(`MCP server file not found: ${mcpServerPath}`);\n }\n\n // Start the MCP server process\n const serverProcess = spawn('node', [mcpServerPath], {\n stdio: 'inherit',\n env: {\n ...process.env,\n CLAUDE_FLOW_AUTO_ORCHESTRATOR: autoOrchestrator ? 'true' : 'false',\n CLAUDE_FLOW_NEURAL_ENABLED: 'true',\n CLAUDE_FLOW_WASM_ENABLED: 'true',\n },\n });\n\n serverProcess.on('exit', (code) => {\n if (code !== 0) {\n error(`MCP server exited with code ${code}`);\n }\n });\n\n // Keep the process alive\n await new Promise(() => {}); // Never resolves, keeps server running\n } catch (err) {\n error('Failed to start MCP server: ' + err.message);\n\n // Fallback to status display\n log('šŸš€ MCP server would start with:');\n log(' Protocol: stdio');\n log(' Tools: 87 Claude-Flow integration tools');\n log(' Orchestrator: ' + (autoOrchestrator ? 'AUTO-STARTED' : 'Manual'));\n log(' Mode: ' + (daemon ? 'DAEMON' : 'Interactive'));\n }\n } else {\n // HTTP mode (for future implementation)\n const port = getFlag(subArgs, '--port') || flags.port || 3000;\n const host = getFlag(subArgs, '--host') || flags.host || 'localhost';\n\n success(`Starting Claude Flow MCP server on ${host}:${port}...`);\n log('šŸš€ HTTP mode not yet implemented, use --stdio for full functionality');\n }\n}\n\nasync function stopMcpServer(subArgs, flags) {\n success('Stopping MCP server...');\n log('šŸ›‘ Server would be gracefully shut down');\n log('šŸ“ Active connections would be closed');\n log('šŸ’¾ State would be persisted');\n}\n\nasync function listMcpTools(subArgs, flags) {\n const verbose = subArgs.includes('--verbose') || subArgs.includes('-v') || flags.verbose;\n const category = getFlag(subArgs, '--category') || flags.category;\n\n success('Claude-Flow MCP Tools & Resources (87 total):');\n\n if (!category || category === 'swarm') {\n log('\\nšŸ SWARM COORDINATION (12 tools):');\n log(' • swarm_init Initialize swarm with topology');\n log(' • agent_spawn Create specialized AI agents');\n log(' • task_orchestrate Orchestrate complex workflows');\n log(' • swarm_status Monitor swarm health/performance');\n log(' • agent_list List active agents & capabilities');\n log(' • agent_metrics Agent performance metrics');\n log(' • swarm_monitor Real-time swarm monitoring');\n log(' • topology_optimize Auto-optimize swarm topology');\n log(' • load_balance Distribute tasks efficiently');\n log(' • coordination_sync Sync agent coordination');\n log(' • swarm_scale Auto-scale agent count');\n log(' • swarm_destroy Gracefully shutdown swarm');\n }\n\n if (!category || category === 'neural') {\n log('\\n🧠 NEURAL NETWORKS & AI (15 tools):');\n log(' • neural_status Check neural network status');\n log(' • neural_train Train neural patterns');\n log(' • neural_patterns Analyze cognitive patterns');\n log(' • neural_predict Make AI predictions');\n log(' • model_load Load pre-trained models');\n log(' • model_save Save trained models');\n log(' • wasm_optimize WASM SIMD optimization');\n log(' • inference_run Run neural inference');\n log(' • pattern_recognize Pattern recognition');\n log(' • cognitive_analyze Cognitive behavior analysis');\n log(' • learning_adapt Adaptive learning');\n log(' • neural_compress Compress neural models');\n log(' • ensemble_create Create model ensembles');\n log(' • transfer_learn Transfer learning');\n log(' • neural_explain AI explainability');\n }\n\n if (!category || category === 'memory') {\n log('\\nšŸ’¾ MEMORY & PERSISTENCE (12 tools):');\n log(' • memory_usage Store/retrieve persistent data');\n log(' • memory_search Search memory with patterns');\n log(' • memory_persist Cross-session persistence');\n log(' • memory_namespace Namespace management');\n log(' • memory_backup Backup memory stores');\n log(' • memory_restore Restore from backups');\n log(' • memory_compress Compress memory data');\n log(' • memory_sync Sync across instances');\n log(' • cache_manage Manage coordination cache');\n log(' • state_snapshot Create state snapshots');\n log(' • context_restore Restore execution context');\n log(' • memory_analytics Analyze memory usage');\n }\n\n if (!category || category === 'analysis') {\n log('\\nšŸ“Š ANALYSIS & MONITORING (13 tools):');\n log(' • task_status Check task execution status');\n log(' • task_results Get task completion results');\n log(' • benchmark_run Performance benchmarks');\n log(' • bottleneck_analyze Identify bottlenecks');\n log(' • performance_report Generate performance reports');\n log(' • token_usage Analyze token consumption');\n log(' • metrics_collect Collect system metrics');\n log(' • trend_analysis Analyze performance trends');\n log(' • cost_analysis Cost and resource analysis');\n log(' • quality_assess Quality assessment');\n log(' • error_analysis Error pattern analysis');\n log(' • usage_stats Usage statistics');\n log(' • health_check System health monitoring');\n }\n\n if (!category || category === 'workflow') {\n log('\\nšŸ”§ WORKFLOW & AUTOMATION (11 tools):');\n log(' • workflow_create Create custom workflows');\n log(' • workflow_execute Execute predefined workflows');\n log(' • workflow_export Export workflow definitions');\n log(' • sparc_mode Run SPARC development modes');\n log(' • automation_setup Setup automation rules');\n log(' • pipeline_create Create CI/CD pipelines');\n log(' • scheduler_manage Manage task scheduling');\n log(' • trigger_setup Setup event triggers');\n log(' • workflow_template Manage workflow templates');\n log(' • batch_process Batch processing');\n log(' • parallel_execute Execute tasks in parallel');\n }\n\n if (!category || category === 'github') {\n log('\\nšŸ™ GITHUB INTEGRATION (8 tools):');\n log(' • github_repo_analyze Repository analysis');\n log(' • github_pr_manage Pull request management');\n log(' • github_issue_track Issue tracking & triage');\n log(' • github_release_coord Release coordination');\n log(' • github_workflow_auto Workflow automation');\n log(' • github_code_review Automated code review');\n log(' • github_sync_coord Multi-repo sync coordination');\n log(' • github_metrics Repository metrics');\n }\n\n if (!category || category === 'daa') {\n log('\\nšŸ¤– DAA (Dynamic Agent Architecture) (8 tools):');\n log(' • daa_agent_create Create dynamic agents');\n log(' • daa_capability_match Match capabilities to tasks');\n log(' • daa_resource_alloc Resource allocation');\n log(' • daa_lifecycle_manage Agent lifecycle management');\n log(' • daa_communication Inter-agent communication');\n log(' • daa_consensus Consensus mechanisms');\n log(' • daa_fault_tolerance Fault tolerance & recovery');\n log(' • daa_optimization Performance optimization');\n }\n\n if (!category || category === 'system') {\n log('\\nāš™ļø SYSTEM & UTILITIES (8 tools):');\n log(' • terminal_execute Execute terminal commands');\n log(' • config_manage Configuration management');\n log(' • features_detect Feature detection');\n log(' • security_scan Security scanning');\n log(' • backup_create Create system backups');\n log(' • restore_system System restoration');\n log(' • log_analysis Log analysis & insights');\n log(' • diagnostic_run System diagnostics');\n }\n\n if (verbose) {\n log('\\nšŸ“‹ DETAILED TOOL INFORMATION:');\n log(' šŸ”„ HIGH-PRIORITY TOOLS:');\n log(\n ' swarm_init: Initialize coordination with 4 topologies (hierarchical, mesh, ring, star)',\n );\n log(\n ' agent_spawn: 8 agent types (researcher, coder, analyst, architect, tester, coordinator, reviewer, optimizer)',\n );\n log(' neural_train: Train 27 neural models with WASM SIMD acceleration');\n log(\n ' memory_usage: 5 operations (store, retrieve, list, delete, search) with TTL & namespacing',\n );\n log(' performance_report: Real-time metrics with 24h/7d/30d timeframes');\n\n log('\\n ⚔ PERFORMANCE FEATURES:');\n log(' • 2.8-4.4x speed improvement with parallel execution');\n log(' • 32.3% token reduction through optimization');\n log(' • 84.8% SWE-Bench solve rate with swarm coordination');\n log(' • WASM neural processing with SIMD optimization');\n log(' • Cross-session memory persistence');\n\n log('\\n šŸ”— INTEGRATION CAPABILITIES:');\n log(' • Full ruv-swarm feature parity (rebranded)');\n log(' • Claude Code native tool integration');\n log(' • GitHub Actions workflow automation');\n log(' • SPARC methodology with 17 modes');\n log(' • MCP protocol compatibility');\n }\n\n log('\\nšŸ“” Status: 87 tools & resources available when server is running');\n log('šŸŽÆ Categories: swarm, neural, memory, analysis, workflow, github, daa, system');\n log('šŸ”— Compatibility: ruv-swarm + DAA + Claude-Flow unified platform');\n log('\\nšŸ’” Usage: claude-flow mcp tools --category=<category> --verbose');\n}\n\nasync function manageMcpAuth(subArgs, flags) {\n const authCmd = subArgs[1];\n\n switch (authCmd) {\n case 'setup':\n success('Setting up MCP authentication...');\n log('šŸ” Authentication configuration:');\n log(' Type: API Key based');\n log(' Scope: Claude-Flow tools');\n log(' Security: TLS encrypted');\n break;\n\n case 'status':\n success('MCP Authentication Status:');\n log('šŸ” Status: Not configured');\n log('šŸ”‘ API Keys: 0 active');\n log('šŸ›”ļø Security: Default settings');\n break;\n\n case 'rotate':\n success('Rotating MCP authentication keys...');\n log('šŸ”„ New API keys would be generated');\n log('ā™»ļø Old keys would be deprecated gracefully');\n break;\n\n default:\n log('Auth commands: setup, status, rotate');\n log('Examples:');\n log(' claude-flow mcp auth setup');\n log(' claude-flow mcp auth status');\n }\n}\n\nasync function showMcpConfig(subArgs, flags) {\n success('Claude-Flow MCP Server Configuration:');\n log('\\nšŸ“‹ Server Settings:');\n log(' Host: localhost');\n log(' Port: 3000');\n log(' Protocol: HTTP/STDIO');\n log(' Timeout: 30000ms');\n log(' Auto-Orchestrator: Enabled');\n\n log('\\nšŸ”§ Tool Configuration:');\n log(' Available Tools: 87 total');\n log(' Categories: 8 (swarm, neural, memory, analysis, workflow, github, daa, system)');\n log(' Authentication: API Key + OAuth');\n log(' Rate Limiting: 1000 req/min');\n log(' WASM Support: Enabled with SIMD');\n\n log('\\n🧠 Neural Network Settings:');\n log(' Models: 27 pre-trained models available');\n log(' Training: Real-time adaptive learning');\n log(' Inference: WASM optimized');\n log(' Pattern Recognition: Enabled');\n\n log('\\nšŸ Swarm Configuration:');\n log(' Max Agents: 10 per swarm');\n log(' Topologies: hierarchical, mesh, ring, star');\n log(' Coordination: Real-time with hooks');\n log(' Memory: Cross-session persistence');\n\n log('\\nšŸ” Security Settings:');\n log(' TLS: Enabled in production');\n log(' CORS: Configured for Claude Code');\n log(' API Key Rotation: 30 days');\n log(' Audit Logging: Enabled');\n\n log('\\nšŸ”— Integration Settings:');\n log(' ruv-swarm Compatibility: 100%');\n log(' DAA Integration: Enabled');\n log(' GitHub Actions: Connected');\n log(' SPARC Modes: 17 available');\n\n log('\\nšŸ“ Configuration Files:');\n log(' Main Config: ./mcp_config/claude-flow.json');\n log(' Neural Models: ./models/');\n log(' Memory Store: ./memory/');\n log(' Logs: ./logs/mcp/');\n}\n\nfunction getFlag(args, flagName) {\n const index = args.indexOf(flagName);\n return index !== -1 && index + 1 < args.length ? args[index + 1] : null;\n}\n\nfunction showMcpHelp() {\n log('šŸ”§ Claude-Flow MCP Server Commands:');\n log();\n log('COMMANDS:');\n log(' status Show MCP server status');\n log(' start [options] Start MCP server with orchestrator');\n log(' stop Stop MCP server gracefully');\n log(' tools [options] List available tools & resources');\n log(' auth <setup|status|rotate> Manage authentication');\n log(' config Show comprehensive configuration');\n log();\n log('START OPTIONS:');\n log(' --port <port> Server port (default: 3000)');\n log(' --host <host> Server host (default: localhost)');\n log(' --auto-orchestrator Auto-start orchestrator with neural/WASM');\n log(' --daemon Run in background daemon mode');\n log(' --enable-neural Enable neural network features');\n log(' --enable-wasm Enable WASM SIMD optimization');\n log();\n log('TOOLS OPTIONS:');\n log(' --category <cat> Filter by category (swarm, neural, memory, etc.)');\n log(' --verbose, -v Show detailed tool information');\n log(' --examples Show usage examples');\n log();\n log('CATEGORIES:');\n log(' swarm šŸ Swarm coordination (12 tools)');\n log(' neural 🧠 Neural networks & AI (15 tools)');\n log(' memory šŸ’¾ Memory & persistence (12 tools)');\n log(' analysis šŸ“Š Analysis & monitoring (13 tools)');\n log(' workflow šŸ”§ Workflow & automation (11 tools)');\n log(' github šŸ™ GitHub integration (8 tools)');\n log(' daa šŸ¤– Dynamic Agent Architecture (8 tools)');\n log(' system āš™ļø System & utilities (8 tools)');\n log();\n log('EXAMPLES:');\n log(' claude-flow mcp status');\n log(' claude-flow mcp start --auto-orchestrator --daemon');\n log(' claude-flow mcp tools --category=neural --verbose');\n log(' claude-flow mcp tools --category=swarm');\n log(' claude-flow mcp config');\n log(' claude-flow mcp auth setup');\n log();\n log('šŸŽÆ Total: 87 tools & resources available');\n log('šŸ”— Full ruv-swarm + DAA + Claude-Flow integration');\n}\n"],"names":["printSuccess","printError","printWarning","isStdioMode","log","args","console","error","success","msg","warning","mcpCommand","subArgs","flags","mcpCmd","showMcpStatus","startMcpServer","stopMcpServer","listMcpTools","manageMcpAuth","showMcpConfig","showMcpHelp","autoOrchestrator","includes","daemon","stdio","fileURLToPath","path","spawn","__filename","url","__dirname","dirname","mcpServerPath","join","fs","existsSync","process","cwd","Error","serverProcess","env","CLAUDE_FLOW_AUTO_ORCHESTRATOR","CLAUDE_FLOW_NEURAL_ENABLED","CLAUDE_FLOW_WASM_ENABLED","on","code","Promise","err","message","port","getFlag","host","verbose","category","authCmd","flagName","index","indexOf","length"],"mappings":"AACA,SAASA,YAAY,EAAEC,UAAU,EAAEC,YAAY,QAAQ,cAAc;AAGrE,IAAIC,cAAc;AAKlB,MAAMC,MAAM,CAAC,GAAGC,OAAUF,cAAcG,QAAQC,KAAK,IAAIF,QAAQC,QAAQF,GAAG,IAAIC;AAChF,MAAMG,UAAU,CAACC,MAASN,cAAcG,QAAQC,KAAK,CAAC,CAAC,EAAE,EAAEE,KAAK,IAAIT,aAAaS;AACjF,MAAMF,QAAQ,CAACE,MAASN,cAAcG,QAAQC,KAAK,CAAC,CAAC,EAAE,EAAEE,KAAK,IAAIR,WAAWQ;AAC7E,MAAMC,UAAU,CAACD,MAASN,cAAcG,QAAQC,KAAK,CAAC,CAAC,IAAI,EAAEE,KAAK,IAA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,IAAI;IACJA,IAAI;IACJA,IAAI;IACJA,IAAI;IAEJA,IAAI;IACJA,IAAI;IACJA,IAAI;IACJA,IAAI;IACJA,IAAI;IAEJA,IAAI;IACJA,IAAI;IACJA,IAAI;IACJA,IAAI;IACJA,IAAI;IAEJA,IAAI;IACJA,IAAI;IACJA,IAAI;IACJA,IAAI;IACJA,IAAI;IAEJA,IAAI;IACJA,IAAI;IACJA,IAAI;IACJA,IAAI;IACJA,IAAI;IAEJA,IAAI;IACJA,IAAI;IACJA,IAAI;IACJA,IAAI;IACJA,IAAI;AACN;AAEA,SAAS+C,QAAQ9C,IAAI,EAAEmD,QAAQ;IAC7B,MAAMC,QAAQpD,KAAKqD,OAAO,CAACF;IAC3B,OAAOC,UAAU,CAAC,KAAKA,QAAQ,IAAIpD,KAAKsD,MAAM,GAAGtD,IAAI,CAACoD,QAAQ,EAAE,GAAG;AACrE;AAEA,SAASpC;IACPjB,IAAI;IACJA;IACAA,IAAI;IACJA,IAAI;IACJA,IAAI;IACJA,IAAI;IACJA,IAAI;IACJA,IAAI;IACJA,IAAI;IACJA;IACAA,IAAI;IACJA,IAAI;IACJA,IAAI;IACJA,IAAI;IACJA,IAAI;IACJA,IAAI;IACJA,IAAI;IACJA;IACAA,IAAI;IACJA,IAAI;IACJA,IAAI;IACJA,IAAI;IACJA;IACAA,IAAI;IACJA,IAAI;IACJA,IAAI;IACJA,IAAI;IACJA,IAAI;IACJA,IAAI;IACJA,IAAI;IACJA,IAAI;IACJA,IAAI;IACJA;IACAA,IAAI;IACJA,IAAI;IACJA,IAAI;IACJA,IAAI;IACJA,IAAI;IACJA,IAAI;IACJA,IAAI;IACJA;IACAA,IAAI;IACJA,IAAI;AACN"}
1
+ {"version":3,"sources":["../../../../src/cli/simple-commands/mcp.js"],"sourcesContent":["// mcp.js - MCP server management commands\nimport { printSuccess, printError, printWarning } from '../utils.js';\n\n// Module-level state to track stdio mode\nlet isStdioMode = false;\n\n// Smart logging helpers that respect stdio mode\n// In stdio mode: route to stderr to keep stdout clean for JSON-RPC\n// In HTTP mode: route to stdout for normal behavior\nconst log = (...args) => (isStdioMode ? console.error(...args) : console.log(...args));\nconst success = (msg) => (isStdioMode ? console.error(`āœ… ${msg}`) : printSuccess(msg));\nconst error = (msg) => (isStdioMode ? console.error(`āŒ ${msg}`) : printError(msg));\nconst warning = (msg) => (isStdioMode ? console.error(`āš ļø ${msg}`) : printWarning(msg));\n\nexport async function mcpCommand(subArgs, flags) {\n const mcpCmd = subArgs[0];\n\n switch (mcpCmd) {\n case 'status':\n await showMcpStatus(subArgs, flags);\n break;\n\n case 'start':\n await startMcpServer(subArgs, flags);\n break;\n\n case 'stop':\n await stopMcpServer(subArgs, flags);\n break;\n\n case 'tools':\n await listMcpTools(subArgs, flags);\n break;\n\n case 'auth':\n await manageMcpAuth(subArgs, flags);\n break;\n\n case 'config':\n await showMcpConfig(subArgs, flags);\n break;\n\n default:\n showMcpHelp();\n }\n}\n\nasync function showMcpStatus(subArgs, flags) {\n success('MCP Server Status:');\n log('🌐 Status: Stopped (orchestrator not running)');\n log('šŸ”§ Configuration: Default settings');\n log('šŸ”Œ Connections: 0 active');\n log('šŸ“” Tools: Ready to load');\n log('šŸ” Authentication: Not configured');\n}\n\nasync function startMcpServer(subArgs, flags) {\n const autoOrchestrator = subArgs.includes('--auto-orchestrator') || flags.autoOrchestrator;\n const daemon = subArgs.includes('--daemon') || flags.daemon;\n const stdio = subArgs.includes('--stdio') || flags.stdio || true; // Default to stdio mode\n\n // Set module-level stdio flag for all helper functions\n isStdioMode = stdio;\n\n if (stdio) {\n // In stdio mode, don't output ANY messages before spawning the server\n // The MCP server will handle all output (stderr for logs, stdout for JSON-RPC)\n // Any output here would corrupt the JSON-RPC protocol stream\n\n // Import and start the MCP server\n try {\n const { fileURLToPath } = await import('url');\n const path = await import('path');\n const { spawn } = await import('child_process');\n\n const __filename = fileURLToPath(import.meta.url);\n const __dirname = path.dirname(__filename);\n // TODO: Switch to new TypeScript server (server-standalone.js) after fixing import resolution\n // For now, using old mcp-server.js for local testing\n // Phase 4 tools will be available after NPM publish\n const mcpServerPath = path.join(__dirname, '../../mcp/mcp-server.js');\n\n // Check if the file exists, and log the path for debugging\n const fs = await import('fs');\n if (!fs.existsSync(mcpServerPath)) {\n error(`MCP server file not found at: ${mcpServerPath}`);\n error(`Current directory: ${process.cwd()}`);\n error(`Script directory: ${__dirname}`);\n throw new Error(`MCP server file not found: ${mcpServerPath}`);\n }\n\n // Start the MCP server process\n const serverProcess = spawn('node', [mcpServerPath], {\n stdio: 'inherit',\n env: {\n ...process.env,\n CLAUDE_FLOW_AUTO_ORCHESTRATOR: autoOrchestrator ? 'true' : 'false',\n CLAUDE_FLOW_NEURAL_ENABLED: 'true',\n CLAUDE_FLOW_WASM_ENABLED: 'true',\n },\n });\n\n serverProcess.on('exit', (code) => {\n if (code !== 0) {\n error(`MCP server exited with code ${code}`);\n }\n });\n\n // Keep the process alive\n await new Promise(() => {}); // Never resolves, keeps server running\n } catch (err) {\n error('Failed to start MCP server: ' + err.message);\n\n // Fallback to status display\n log('šŸš€ MCP server would start with:');\n log(' Protocol: stdio');\n log(' Tools: 87 Claude-Flow integration tools');\n log(' Orchestrator: ' + (autoOrchestrator ? 'AUTO-STARTED' : 'Manual'));\n log(' Mode: ' + (daemon ? 'DAEMON' : 'Interactive'));\n }\n } else {\n // HTTP mode (for future implementation)\n const port = getFlag(subArgs, '--port') || flags.port || 3000;\n const host = getFlag(subArgs, '--host') || flags.host || 'localhost';\n\n success(`Starting Claude Flow MCP server on ${host}:${port}...`);\n log('šŸš€ HTTP mode not yet implemented, use --stdio for full functionality');\n }\n}\n\nasync function stopMcpServer(subArgs, flags) {\n success('Stopping MCP server...');\n log('šŸ›‘ Server would be gracefully shut down');\n log('šŸ“ Active connections would be closed');\n log('šŸ’¾ State would be persisted');\n}\n\nasync function listMcpTools(subArgs, flags) {\n const verbose = subArgs.includes('--verbose') || subArgs.includes('-v') || flags.verbose;\n const category = getFlag(subArgs, '--category') || flags.category;\n\n success('Claude-Flow MCP Tools & Resources (87 total):');\n\n if (!category || category === 'swarm') {\n log('\\nšŸ SWARM COORDINATION (12 tools):');\n log(' • swarm_init Initialize swarm with topology');\n log(' • agent_spawn Create specialized AI agents');\n log(' • task_orchestrate Orchestrate complex workflows');\n log(' • swarm_status Monitor swarm health/performance');\n log(' • agent_list List active agents & capabilities');\n log(' • agent_metrics Agent performance metrics');\n log(' • swarm_monitor Real-time swarm monitoring');\n log(' • topology_optimize Auto-optimize swarm topology');\n log(' • load_balance Distribute tasks efficiently');\n log(' • coordination_sync Sync agent coordination');\n log(' • swarm_scale Auto-scale agent count');\n log(' • swarm_destroy Gracefully shutdown swarm');\n }\n\n if (!category || category === 'neural') {\n log('\\n🧠 NEURAL NETWORKS & AI (15 tools):');\n log(' • neural_status Check neural network status');\n log(' • neural_train Train neural patterns');\n log(' • neural_patterns Analyze cognitive patterns');\n log(' • neural_predict Make AI predictions');\n log(' • model_load Load pre-trained models');\n log(' • model_save Save trained models');\n log(' • wasm_optimize WASM SIMD optimization');\n log(' • inference_run Run neural inference');\n log(' • pattern_recognize Pattern recognition');\n log(' • cognitive_analyze Cognitive behavior analysis');\n log(' • learning_adapt Adaptive learning');\n log(' • neural_compress Compress neural models');\n log(' • ensemble_create Create model ensembles');\n log(' • transfer_learn Transfer learning');\n log(' • neural_explain AI explainability');\n }\n\n if (!category || category === 'memory') {\n log('\\nšŸ’¾ MEMORY & PERSISTENCE (12 tools):');\n log(' • memory_usage Store/retrieve persistent data');\n log(' • memory_search Search memory with patterns');\n log(' • memory_persist Cross-session persistence');\n log(' • memory_namespace Namespace management');\n log(' • memory_backup Backup memory stores');\n log(' • memory_restore Restore from backups');\n log(' • memory_compress Compress memory data');\n log(' • memory_sync Sync across instances');\n log(' • cache_manage Manage coordination cache');\n log(' • state_snapshot Create state snapshots');\n log(' • context_restore Restore execution context');\n log(' • memory_analytics Analyze memory usage');\n }\n\n if (!category || category === 'analysis') {\n log('\\nšŸ“Š ANALYSIS & MONITORING (13 tools):');\n log(' • task_status Check task execution status');\n log(' • task_results Get task completion results');\n log(' • benchmark_run Performance benchmarks');\n log(' • bottleneck_analyze Identify bottlenecks');\n log(' • performance_report Generate performance reports');\n log(' • token_usage Analyze token consumption');\n log(' • metrics_collect Collect system metrics');\n log(' • trend_analysis Analyze performance trends');\n log(' • cost_analysis Cost and resource analysis');\n log(' • quality_assess Quality assessment');\n log(' • error_analysis Error pattern analysis');\n log(' • usage_stats Usage statistics');\n log(' • health_check System health monitoring');\n }\n\n if (!category || category === 'workflow') {\n log('\\nšŸ”§ WORKFLOW & AUTOMATION (11 tools):');\n log(' • workflow_create Create custom workflows');\n log(' • workflow_execute Execute predefined workflows');\n log(' • workflow_export Export workflow definitions');\n log(' • sparc_mode Run SPARC development modes');\n log(' • automation_setup Setup automation rules');\n log(' • pipeline_create Create CI/CD pipelines');\n log(' • scheduler_manage Manage task scheduling');\n log(' • trigger_setup Setup event triggers');\n log(' • workflow_template Manage workflow templates');\n log(' • batch_process Batch processing');\n log(' • parallel_execute Execute tasks in parallel');\n }\n\n if (!category || category === 'github') {\n log('\\nšŸ™ GITHUB INTEGRATION (8 tools):');\n log(' • github_repo_analyze Repository analysis');\n log(' • github_pr_manage Pull request management');\n log(' • github_issue_track Issue tracking & triage');\n log(' • github_release_coord Release coordination');\n log(' • github_workflow_auto Workflow automation');\n log(' • github_code_review Automated code review');\n log(' • github_sync_coord Multi-repo sync coordination');\n log(' • github_metrics Repository metrics');\n }\n\n if (!category || category === 'daa') {\n log('\\nšŸ¤– DAA (Dynamic Agent Architecture) (8 tools):');\n log(' • daa_agent_create Create dynamic agents');\n log(' • daa_capability_match Match capabilities to tasks');\n log(' • daa_resource_alloc Resource allocation');\n log(' • daa_lifecycle_manage Agent lifecycle management');\n log(' • daa_communication Inter-agent communication');\n log(' • daa_consensus Consensus mechanisms');\n log(' • daa_fault_tolerance Fault tolerance & recovery');\n log(' • daa_optimization Performance optimization');\n }\n\n if (!category || category === 'system') {\n log('\\nāš™ļø SYSTEM & UTILITIES (8 tools):');\n log(' • terminal_execute Execute terminal commands');\n log(' • config_manage Configuration management');\n log(' • features_detect Feature detection');\n log(' • security_scan Security scanning');\n log(' • backup_create Create system backups');\n log(' • restore_system System restoration');\n log(' • log_analysis Log analysis & insights');\n log(' • diagnostic_run System diagnostics');\n }\n\n if (verbose) {\n log('\\nšŸ“‹ DETAILED TOOL INFORMATION:');\n log(' šŸ”„ HIGH-PRIORITY TOOLS:');\n log(\n ' swarm_init: Initialize coordination with 4 topologies (hierarchical, mesh, ring, star)',\n );\n log(\n ' agent_spawn: 8 agent types (researcher, coder, analyst, architect, tester, coordinator, reviewer, optimizer)',\n );\n log(' neural_train: Train 27 neural models with WASM SIMD acceleration');\n log(\n ' memory_usage: 5 operations (store, retrieve, list, delete, search) with TTL & namespacing',\n );\n log(' performance_report: Real-time metrics with 24h/7d/30d timeframes');\n\n log('\\n ⚔ PERFORMANCE FEATURES:');\n log(' • 2.8-4.4x speed improvement with parallel execution');\n log(' • 32.3% token reduction through optimization');\n log(' • 84.8% SWE-Bench solve rate with swarm coordination');\n log(' • WASM neural processing with SIMD optimization');\n log(' • Cross-session memory persistence');\n\n log('\\n šŸ”— INTEGRATION CAPABILITIES:');\n log(' • Full ruv-swarm feature parity (rebranded)');\n log(' • Claude Code native tool integration');\n log(' • GitHub Actions workflow automation');\n log(' • SPARC methodology with 17 modes');\n log(' • MCP protocol compatibility');\n }\n\n log('\\nšŸ“” Status: 87 tools & resources available when server is running');\n log('šŸŽÆ Categories: swarm, neural, memory, analysis, workflow, github, daa, system');\n log('šŸ”— Compatibility: ruv-swarm + DAA + Claude-Flow unified platform');\n log('\\nšŸ’” Usage: claude-flow mcp tools --category=<category> --verbose');\n}\n\nasync function manageMcpAuth(subArgs, flags) {\n const authCmd = subArgs[1];\n\n switch (authCmd) {\n case 'setup':\n success('Setting up MCP authentication...');\n log('šŸ” Authentication configuration:');\n log(' Type: API Key based');\n log(' Scope: Claude-Flow tools');\n log(' Security: TLS encrypted');\n break;\n\n case 'status':\n success('MCP Authentication Status:');\n log('šŸ” Status: Not configured');\n log('šŸ”‘ API Keys: 0 active');\n log('šŸ›”ļø Security: Default settings');\n break;\n\n case 'rotate':\n success('Rotating MCP authentication keys...');\n log('šŸ”„ New API keys would be generated');\n log('ā™»ļø Old keys would be deprecated gracefully');\n break;\n\n default:\n log('Auth commands: setup, status, rotate');\n log('Examples:');\n log(' claude-flow mcp auth setup');\n log(' claude-flow mcp auth status');\n }\n}\n\nasync function showMcpConfig(subArgs, flags) {\n success('Claude-Flow MCP Server Configuration:');\n log('\\nšŸ“‹ Server Settings:');\n log(' Host: localhost');\n log(' Port: 3000');\n log(' Protocol: HTTP/STDIO');\n log(' Timeout: 30000ms');\n log(' Auto-Orchestrator: Enabled');\n\n log('\\nšŸ”§ Tool Configuration:');\n log(' Available Tools: 87 total');\n log(' Categories: 8 (swarm, neural, memory, analysis, workflow, github, daa, system)');\n log(' Authentication: API Key + OAuth');\n log(' Rate Limiting: 1000 req/min');\n log(' WASM Support: Enabled with SIMD');\n\n log('\\n🧠 Neural Network Settings:');\n log(' Models: 27 pre-trained models available');\n log(' Training: Real-time adaptive learning');\n log(' Inference: WASM optimized');\n log(' Pattern Recognition: Enabled');\n\n log('\\nšŸ Swarm Configuration:');\n log(' Max Agents: 10 per swarm');\n log(' Topologies: hierarchical, mesh, ring, star');\n log(' Coordination: Real-time with hooks');\n log(' Memory: Cross-session persistence');\n\n log('\\nšŸ” Security Settings:');\n log(' TLS: Enabled in production');\n log(' CORS: Configured for Claude Code');\n log(' API Key Rotation: 30 days');\n log(' Audit Logging: Enabled');\n\n log('\\nšŸ”— Integration Settings:');\n log(' ruv-swarm Compatibility: 100%');\n log(' DAA Integration: Enabled');\n log(' GitHub Actions: Connected');\n log(' SPARC Modes: 17 available');\n\n log('\\nšŸ“ Configuration Files:');\n log(' Main Config: ./mcp_config/claude-flow.json');\n log(' Neural Models: ./models/');\n log(' Memory Store: ./memory/');\n log(' Logs: ./logs/mcp/');\n}\n\nfunction getFlag(args, flagName) {\n const index = args.indexOf(flagName);\n return index !== -1 && index + 1 < args.length ? args[index + 1] : null;\n}\n\nfunction showMcpHelp() {\n log('šŸ”§ Claude-Flow MCP Server Commands:');\n log();\n log('COMMANDS:');\n log(' status Show MCP server status');\n log(' start [options] Start MCP server with orchestrator');\n log(' stop Stop MCP server gracefully');\n log(' tools [options] List available tools & resources');\n log(' auth <setup|status|rotate> Manage authentication');\n log(' config Show comprehensive configuration');\n log();\n log('START OPTIONS:');\n log(' --port <port> Server port (default: 3000)');\n log(' --host <host> Server host (default: localhost)');\n log(' --auto-orchestrator Auto-start orchestrator with neural/WASM');\n log(' --daemon Run in background daemon mode');\n log(' --enable-neural Enable neural network features');\n log(' --enable-wasm Enable WASM SIMD optimization');\n log();\n log('TOOLS OPTIONS:');\n log(' --category <cat> Filter by category (swarm, neural, memory, etc.)');\n log(' --verbose, -v Show detailed tool information');\n log(' --examples Show usage examples');\n log();\n log('CATEGORIES:');\n log(' swarm šŸ Swarm coordination (12 tools)');\n log(' neural 🧠 Neural networks & AI (15 tools)');\n log(' memory šŸ’¾ Memory & persistence (12 tools)');\n log(' analysis šŸ“Š Analysis & monitoring (13 tools)');\n log(' workflow šŸ”§ Workflow & automation (11 tools)');\n log(' github šŸ™ GitHub integration (8 tools)');\n log(' daa šŸ¤– Dynamic Agent Architecture (8 tools)');\n log(' system āš™ļø System & utilities (8 tools)');\n log();\n log('EXAMPLES:');\n log(' claude-flow mcp status');\n log(' claude-flow mcp start --auto-orchestrator --daemon');\n log(' claude-flow mcp tools --category=neural --verbose');\n log(' claude-flow mcp tools --category=swarm');\n log(' claude-flow mcp config');\n log(' claude-flow mcp auth setup');\n log();\n log('šŸŽÆ Total: 87 tools & resources available');\n log('šŸ”— Full ruv-swarm + DAA + Claude-Flow integration');\n}\n"],"names":["printSuccess","printError","printWarning","isStdioMode","log","args","console","error","success","msg","warning","mcpCommand","subArgs","flags","mcpCmd","showMcpStatus","startMcpServer","stopMcpServer","listMcpTools","manageMcpAuth","showMcpConfig","showMcpHelp","autoOrchestrator","includes","daemon","stdio","fileURLToPath","path","spawn","__filename","url","__dirname","dirname","mcpServerPath","join","fs","existsSync","process","cwd","Error","serverProcess","env","CLAUDE_FLOW_AUTO_ORCHESTRATOR","CLAUDE_FLOW_NEURAL_ENABLED","CLAUDE_FLOW_WASM_ENABLED","on","code","Promise","err","message","port","getFlag","host","verbose","category","authCmd","flagName","index","indexOf","length"],"mappings":"AACA,SAASA,YAAY,EAAEC,UAAU,EAAEC,YAAY,QAAQ,cAAc;AAGrE,IAAIC,cAAc;AAKlB,MAAMC,MAAM,CAAC,GAAGC,OAAUF,cAAcG,QAAQC,KAAK,IAAIF,QAAQC,QAAQF,GAAG,IAAIC;AAChF,MAAMG,UAAU,CAACC,MAASN,cAAcG,QAAQC,KAAK,CAAC,CAAC,EAAE,EAAEE,KAAK,IAAIT,aAAaS;AACjF,MAAMF,QAAQ,CAACE,MAASN,cAAcG,QAAQC,KAAK,CAAC,CAAC,EAAE,EAAEE,KAAK,IAAIR,WAAWQ;AAC7E,MAAMC,UAAU,CAACD,MAASN,cAAcG,QAAQC,KAAK,CAAC,CAAC,IAAI,EAAEE,KAAK,IAAIP,aAAaO;AAEnF,OAAO,eAAeE,WAAWC,OAAO,EAAEC,KAAK;IAC7C,MAAMC,SAASF,OAAO,CAAC,EAAE;IAEzB,OAAQE;QACN,KAAK;YACH,MAAMC,cAAcH,SAASC;YAC7B;QAEF,KAAK;YACH,MAAMG,eAAeJ,SAASC;YAC9B;QAEF,KAAK;YACH,MAAMI,cAAcL,SAASC;YAC7B;QAEF,KAAK;YACH,MAAMK,aAAaN,SAASC;YAC5B;QAEF,KAAK;YACH,MAAMM,cAAcP,SAASC;YAC7B;QAEF,KAAK;YACH,MAAMO,cAAcR,SAASC;YAC7B;QAEF;YACEQ;IACJ;AACF;AAEA,eAAeN,cAAcH,OAAO,EAAEC,KAAK;IACzCL,QAAQ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EA,SAASpC;IACPjB,IAAI;IACJA;IACAA,IAAI;IACJA,IAAI;IACJA,IAAI;IACJA,IAAI;IACJA,IAAI;IACJA,IAAI;IACJA,IAAI;IACJA;IACAA,IAAI;IACJA,IAAI;IACJA,IAAI;IACJA,IAAI;IACJA,IAAI;IACJA,IAAI;IACJA,IAAI;IACJA;IACAA,IAAI;IACJA,IAAI;IACJA,IAAI;IACJA,IAAI;IACJA;IACAA,IAAI;IACJA,IAAI;IACJA,IAAI;IACJA,IAAI;IACJA,IAAI;IACJA,IAAI;IACJA,IAAI;IACJA,IAAI;IACJA,IAAI;IACJA;IACAA,IAAI;IACJA,IAAI;IACJA,IAAI;IACJA,IAAI;IACJA,IAAI;IACJA,IAAI;IACJA,IAAI;IACJA;IACAA,IAAI;IACJA,IAAI;AACN"}
@@ -12,7 +12,7 @@ try {
12
12
  BUILD_DATE = new Date().toISOString().split('T')[0];
13
13
  } catch (error) {
14
14
  console.warn('Warning: Could not read version from package.json, using fallback');
15
- VERSION = '2.0.0-alpha.91';
15
+ VERSION = '2.0.0-alpha.101';
16
16
  BUILD_DATE = new Date().toISOString().split('T')[0];
17
17
  }
18
18
  export { VERSION, BUILD_DATE };
@@ -23,4 +23,4 @@ export function displayVersion() {
23
23
  console.log(getVersionString());
24
24
  }
25
25
 
26
- //# sourceMappingURL=version.js.mapp
26
+ //# sourceMappingURL=version.js.map
@@ -6,21 +6,21 @@ await import('./implementations/agent-tracker.js').catch(()=>{
6
6
  try {
7
7
  require('./implementations/agent-tracker');
8
8
  } catch (e) {
9
- console.log('Agent tracker not loaded');
9
+ console.error('Agent tracker not loaded');
10
10
  }
11
11
  });
12
12
  await import('./implementations/daa-tools.js').catch(()=>{
13
13
  try {
14
14
  require('./implementations/daa-tools');
15
15
  } catch (e) {
16
- console.log('DAA manager not loaded');
16
+ console.error('DAA manager not loaded');
17
17
  }
18
18
  });
19
19
  await import('./implementations/workflow-tools.js').catch(()=>{
20
20
  try {
21
21
  require('./implementations/workflow-tools');
22
22
  } catch (e) {
23
- console.log('Workflow tools not loaded');
23
+ console.error('Workflow tools not loaded');
24
24
  }
25
25
  });
26
26
  const __filename = fileURLToPath(import.meta.url);
@@ -3066,7 +3066,7 @@ let ClaudeFlowMCPServer = class ClaudeFlowMCPServer {
3066
3066
  async function startMCPServer() {
3067
3067
  const server = new ClaudeFlowMCPServer();
3068
3068
  console.error(`[${new Date().toISOString()}] INFO [claude-flow-mcp] (${server.sessionId}) Claude-Flow MCP server starting in stdio mode`);
3069
- console.error({
3069
+ console.error(JSON.stringify({
3070
3070
  arch: process.arch,
3071
3071
  mode: 'mcp-stdio',
3072
3072
  nodeVersion: process.version,
@@ -3075,7 +3075,7 @@ async function startMCPServer() {
3075
3075
  protocol: 'stdio',
3076
3076
  sessionId: server.sessionId,
3077
3077
  version: server.version
3078
- });
3078
+ }));
3079
3079
  console.log(JSON.stringify({
3080
3080
  jsonrpc: '2.0',
3081
3081
  method: 'server.initialized',