claude-flow-novice 2.0.3 → 2.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (272) hide show
  1. package/dist/src/cli/commands/guidance.js +487 -668
  2. package/dist/src/cli/commands/index-validate.js +18 -29
  3. package/dist/src/cli/commands/mcp-troubleshoot.js +230 -282
  4. package/dist/src/cli/commands/neural-goal-init.js +92 -125
  5. package/dist/src/cli/commands/swarm-exec.js +317 -393
  6. package/dist/src/cli/commands/swarm.js +1 -1
  7. package/dist/src/cli/commands/validate-framework.js +983 -1100
  8. package/dist/src/cli/commands/validate.js +144 -223
  9. package/dist/src/cli/simple-commands/__tests__/agent.test.js +265 -277
  10. package/dist/src/cli/simple-commands/__tests__/memory.test.js +6 -7
  11. package/dist/src/cli/simple-commands/__tests__/swarm.test.js +373 -356
  12. package/dist/src/cli/simple-commands/__tests__/task.test.js +6 -7
  13. package/dist/src/cli/simple-commands/agent.js +157 -193
  14. package/dist/src/cli/simple-commands/analysis.js +336 -446
  15. package/dist/src/cli/simple-commands/automation-executor.js +1095 -1339
  16. package/dist/src/cli/simple-commands/automation.js +481 -469
  17. package/dist/src/cli/simple-commands/batch-manager.js +261 -313
  18. package/dist/src/cli/simple-commands/claude-telemetry.js +241 -267
  19. package/dist/src/cli/simple-commands/claude-track.js +68 -90
  20. package/dist/src/cli/simple-commands/concurrent-display.js +266 -320
  21. package/dist/src/cli/simple-commands/config.js +245 -290
  22. package/dist/src/cli/simple-commands/coordination.js +182 -234
  23. package/dist/src/cli/simple-commands/enhanced-ui-views.js +812 -615
  24. package/dist/src/cli/simple-commands/enhanced-webui-complete.js +922 -981
  25. package/dist/src/cli/simple-commands/fix-hook-variables.js +274 -294
  26. package/dist/src/cli/simple-commands/github/gh-coordinator.js +378 -457
  27. package/dist/src/cli/simple-commands/github/github-api.js +535 -574
  28. package/dist/src/cli/simple-commands/github/init.js +276 -303
  29. package/dist/src/cli/simple-commands/github.js +222 -247
  30. package/dist/src/cli/simple-commands/goal.js +51 -63
  31. package/dist/src/cli/simple-commands/hive-mind/auto-save-middleware.js +208 -278
  32. package/dist/src/cli/simple-commands/hive-mind/communication.js +601 -696
  33. package/dist/src/cli/simple-commands/hive-mind/core.js +907 -979
  34. package/dist/src/cli/simple-commands/hive-mind/db-optimizer.js +406 -655
  35. package/dist/src/cli/simple-commands/hive-mind/mcp-wrapper.js +1125 -1245
  36. package/dist/src/cli/simple-commands/hive-mind/memory.js +854 -1090
  37. package/dist/src/cli/simple-commands/hive-mind/performance-optimizer.js +459 -574
  38. package/dist/src/cli/simple-commands/hive-mind/performance-test.js +263 -347
  39. package/dist/src/cli/simple-commands/hive-mind/queen.js +727 -768
  40. package/dist/src/cli/simple-commands/hive-mind/session-manager.js +745 -1049
  41. package/dist/src/cli/simple-commands/hive-mind-optimize.js +227 -283
  42. package/dist/src/cli/simple-commands/hive-mind-wizard.js +174 -217
  43. package/dist/src/cli/simple-commands/hive-mind.js +1842 -2283
  44. package/dist/src/cli/simple-commands/hive.js +90 -79
  45. package/dist/src/cli/simple-commands/hook-safety.js +431 -521
  46. package/dist/src/cli/simple-commands/hooks/session-start-soul.js +203 -254
  47. package/dist/src/cli/simple-commands/hooks.js +1064 -1204
  48. package/dist/src/cli/simple-commands/init/agent-copier.js +294 -319
  49. package/dist/src/cli/simple-commands/init/batch-init.js +496 -562
  50. package/dist/src/cli/simple-commands/init/claude-commands/claude-flow-commands.js +13 -19
  51. package/dist/src/cli/simple-commands/init/claude-commands/optimized-claude-flow-commands.js +13 -19
  52. package/dist/src/cli/simple-commands/init/claude-commands/optimized-slash-commands.js +61 -88
  53. package/dist/src/cli/simple-commands/init/claude-commands/optimized-sparc-commands.js +125 -150
  54. package/dist/src/cli/simple-commands/init/claude-commands/slash-commands.js +42 -49
  55. package/dist/src/cli/simple-commands/init/claude-commands/sparc-commands.js +43 -61
  56. package/dist/src/cli/simple-commands/init/copy-revised-templates.js +141 -147
  57. package/dist/src/cli/simple-commands/init/executable-wrapper.js +31 -44
  58. package/dist/src/cli/simple-commands/init/gitignore-updater.js +64 -90
  59. package/dist/src/cli/simple-commands/init/help.js +104 -107
  60. package/dist/src/cli/simple-commands/init/hive-mind-init.js +509 -528
  61. package/dist/src/cli/simple-commands/init/index.js +1510 -1759
  62. package/dist/src/cli/simple-commands/init/performance-monitor.js +234 -317
  63. package/dist/src/cli/simple-commands/init/rollback/backup-manager.js +441 -504
  64. package/dist/src/cli/simple-commands/init/rollback/index.js +289 -364
  65. package/dist/src/cli/simple-commands/init/rollback/recovery-manager.js +652 -728
  66. package/dist/src/cli/simple-commands/init/rollback/rollback-executor.js +416 -481
  67. package/dist/src/cli/simple-commands/init/rollback/state-tracker.js +369 -448
  68. package/dist/src/cli/simple-commands/init/sparc/roo-readme.js +1 -2
  69. package/dist/src/cli/simple-commands/init/sparc/roomodes-config.js +122 -99
  70. package/dist/src/cli/simple-commands/init/sparc/workflows.js +32 -37
  71. package/dist/src/cli/simple-commands/init/sparc-structure.js +55 -62
  72. package/dist/src/cli/simple-commands/init/template-copier.js +421 -533
  73. package/dist/src/cli/simple-commands/init/templates/coordination-md.js +3 -6
  74. package/dist/src/cli/simple-commands/init/templates/enhanced-templates.js +344 -318
  75. package/dist/src/cli/simple-commands/init/templates/github-safe-enhanced.js +173 -218
  76. package/dist/src/cli/simple-commands/init/templates/github-safe.js +65 -75
  77. package/dist/src/cli/simple-commands/init/templates/memory-bank-md.js +3 -6
  78. package/dist/src/cli/simple-commands/init/templates/readme-files.js +2 -4
  79. package/dist/src/cli/simple-commands/init/templates/safe-hook-patterns.js +187 -230
  80. package/dist/src/cli/simple-commands/init/templates/sparc-modes.js +53 -80
  81. package/dist/src/cli/simple-commands/init/templates/verification-claude-md.js +101 -85
  82. package/dist/src/cli/simple-commands/init/validation/config-validator.js +283 -330
  83. package/dist/src/cli/simple-commands/init/validation/health-checker.js +495 -561
  84. package/dist/src/cli/simple-commands/init/validation/index.js +302 -358
  85. package/dist/src/cli/simple-commands/init/validation/mode-validator.js +308 -359
  86. package/dist/src/cli/simple-commands/init/validation/post-init-validator.js +389 -366
  87. package/dist/src/cli/simple-commands/init/validation/pre-init-validator.js +270 -268
  88. package/dist/src/cli/simple-commands/init/validation/test-runner.js +427 -447
  89. package/dist/src/cli/simple-commands/init.js +1 -2
  90. package/dist/src/cli/simple-commands/mcp-health.js +131 -158
  91. package/dist/src/cli/simple-commands/mcp-integration-layer.js +533 -634
  92. package/dist/src/cli/simple-commands/mcp.js +345 -400
  93. package/dist/src/cli/simple-commands/memory-consolidation.js +426 -537
  94. package/dist/src/cli/simple-commands/memory.js +247 -311
  95. package/dist/src/cli/simple-commands/migrate-hooks.js +39 -46
  96. package/dist/src/cli/simple-commands/monitor.js +294 -363
  97. package/dist/src/cli/simple-commands/neural.js +51 -65
  98. package/dist/src/cli/simple-commands/pair-autofix-only.js +538 -662
  99. package/dist/src/cli/simple-commands/pair-basic.js +528 -656
  100. package/dist/src/cli/simple-commands/pair-old.js +430 -543
  101. package/dist/src/cli/simple-commands/pair-working.js +615 -751
  102. package/dist/src/cli/simple-commands/pair.js +615 -751
  103. package/dist/src/cli/simple-commands/performance-hooks.js +83 -111
  104. package/dist/src/cli/simple-commands/performance-metrics.js +348 -433
  105. package/dist/src/cli/simple-commands/process-ui-enhanced.js +708 -787
  106. package/dist/src/cli/simple-commands/process-ui.js +230 -254
  107. package/dist/src/cli/simple-commands/realtime-update-system.js +525 -611
  108. package/dist/src/cli/simple-commands/sparc/architecture.js +1704 -1530
  109. package/dist/src/cli/simple-commands/sparc/commands.js +438 -516
  110. package/dist/src/cli/simple-commands/sparc/completion.js +1224 -1481
  111. package/dist/src/cli/simple-commands/sparc/coordinator.js +913 -978
  112. package/dist/src/cli/simple-commands/sparc/index.js +241 -298
  113. package/dist/src/cli/simple-commands/sparc/phase-base.js +314 -390
  114. package/dist/src/cli/simple-commands/sparc/pseudocode.js +965 -869
  115. package/dist/src/cli/simple-commands/sparc/refinement.js +980 -1273
  116. package/dist/src/cli/simple-commands/sparc/specification.js +559 -645
  117. package/dist/src/cli/simple-commands/sparc-modes/architect.js +1 -1
  118. package/dist/src/cli/simple-commands/sparc-modes/ask.js +1 -1
  119. package/dist/src/cli/simple-commands/sparc-modes/code.js +1 -1
  120. package/dist/src/cli/simple-commands/sparc-modes/debug.js +1 -1
  121. package/dist/src/cli/simple-commands/sparc-modes/devops.js +1 -1
  122. package/dist/src/cli/simple-commands/sparc-modes/docs-writer.js +1 -1
  123. package/dist/src/cli/simple-commands/sparc-modes/generic.js +1 -1
  124. package/dist/src/cli/simple-commands/sparc-modes/index.js +47 -55
  125. package/dist/src/cli/simple-commands/sparc-modes/integration.js +1 -1
  126. package/dist/src/cli/simple-commands/sparc-modes/mcp.js +1 -1
  127. package/dist/src/cli/simple-commands/sparc-modes/monitoring.js +1 -1
  128. package/dist/src/cli/simple-commands/sparc-modes/optimization.js +1 -1
  129. package/dist/src/cli/simple-commands/sparc-modes/security-review.js +1 -1
  130. package/dist/src/cli/simple-commands/sparc-modes/sparc-orchestrator.js +1 -1
  131. package/dist/src/cli/simple-commands/sparc-modes/spec-pseudocode.js +1 -1
  132. package/dist/src/cli/simple-commands/sparc-modes/supabase-admin.js +1 -1
  133. package/dist/src/cli/simple-commands/sparc-modes/swarm.js +101 -87
  134. package/dist/src/cli/simple-commands/sparc-modes/tdd.js +1 -1
  135. package/dist/src/cli/simple-commands/sparc-modes/tutorial.js +1 -1
  136. package/dist/src/cli/simple-commands/sparc.js +465 -493
  137. package/dist/src/cli/simple-commands/start-ui.js +108 -132
  138. package/dist/src/cli/simple-commands/start-wrapper.js +240 -268
  139. package/dist/src/cli/simple-commands/start.js +1 -1
  140. package/dist/src/cli/simple-commands/status.js +254 -275
  141. package/dist/src/cli/simple-commands/stream-chain-clean.js +128 -171
  142. package/dist/src/cli/simple-commands/stream-chain-fixed.js +61 -82
  143. package/dist/src/cli/simple-commands/stream-chain-real.js +267 -331
  144. package/dist/src/cli/simple-commands/stream-chain-working.js +211 -263
  145. package/dist/src/cli/simple-commands/stream-chain.js +260 -318
  146. package/dist/src/cli/simple-commands/stream-processor.js +290 -315
  147. package/dist/src/cli/simple-commands/swarm-executor.js +189 -222
  148. package/dist/src/cli/simple-commands/swarm-metrics-integration.js +208 -300
  149. package/dist/src/cli/simple-commands/swarm-ui.js +623 -703
  150. package/dist/src/cli/simple-commands/swarm-webui-integration.js +258 -286
  151. package/dist/src/cli/simple-commands/swarm.js +887 -1082
  152. package/dist/src/cli/simple-commands/task.js +161 -206
  153. package/dist/src/cli/simple-commands/timestamp-fix.js +59 -89
  154. package/dist/src/cli/simple-commands/token-tracker.js +258 -316
  155. package/dist/src/cli/simple-commands/tool-execution-framework.js +433 -519
  156. package/dist/src/cli/simple-commands/train-and-stream.js +275 -331
  157. package/dist/src/cli/simple-commands/training-pipeline.js +619 -725
  158. package/dist/src/cli/simple-commands/training.js +170 -227
  159. package/dist/src/cli/simple-commands/verification-hooks.js +261 -284
  160. package/dist/src/cli/simple-commands/verification-integration.js +389 -417
  161. package/dist/src/cli/simple-commands/verification-training-integration.js +486 -606
  162. package/dist/src/cli/simple-commands/verification.js +493 -513
  163. package/dist/src/cli/simple-commands/web-server.js +766 -836
  164. package/dist/src/cli/simple-commands/webui-validator.js +106 -124
  165. package/dist/src/coordination/event-bus/demo-wasm-integration.js +212 -251
  166. package/dist/src/coordination/event-bus/qe-event-bus.js +608 -748
  167. package/dist/src/coordination/event-bus/qe-event-bus.test.js +379 -454
  168. package/dist/src/coordination/iteration-tracker.js +363 -454
  169. package/dist/src/enterprise/analytics-manager.js +1135 -0
  170. package/dist/src/enterprise/audit-manager.js +1115 -0
  171. package/dist/src/enterprise/cloud-manager.js +891 -0
  172. package/dist/src/enterprise/deployment-manager.js +966 -0
  173. package/dist/src/enterprise/index.js +6 -0
  174. package/dist/src/enterprise/project-manager.js +584 -0
  175. package/dist/src/enterprise/security-manager.js +991 -0
  176. package/dist/src/index.js +1 -1
  177. package/dist/src/mcp/DEPRECATED.js +46 -60
  178. package/dist/src/mcp/fixes/mcp-error-fixes.js +115 -134
  179. package/dist/src/mcp/implementations/agent-tracker.js +114 -128
  180. package/dist/src/mcp/implementations/daa-tools.js +292 -350
  181. package/dist/src/mcp/implementations/workflow-tools.js +329 -361
  182. package/dist/src/mcp/mcp-config-manager.js +1183 -1331
  183. package/dist/src/mcp/mcp-server-novice-simplified.js +11 -17
  184. package/dist/src/mcp/mcp-server-novice.js +11 -17
  185. package/dist/src/mcp/mcp-server-sdk.js +11 -17
  186. package/dist/src/mcp/mcp-server.js +1620 -1484
  187. package/dist/src/mcp/ruv-swarm-wrapper.js +209 -239
  188. package/dist/src/memory/advanced-serializer.js +609 -589
  189. package/dist/src/memory/enhanced-examples.js +220 -305
  190. package/dist/src/memory/enhanced-memory.js +295 -336
  191. package/dist/src/memory/enhanced-session-serializer.js +408 -492
  192. package/dist/src/memory/fallback-memory-system.js +900 -1021
  193. package/dist/src/memory/fallback-store.js +93 -131
  194. package/dist/src/memory/high-performance-serialization.js +592 -730
  195. package/dist/src/memory/in-memory-store.js +161 -213
  196. package/dist/src/memory/index.js +123 -157
  197. package/dist/src/memory/lock-free-structures.js +578 -764
  198. package/dist/src/memory/memory-mapped-persistence.js +585 -766
  199. package/dist/src/memory/memory-pressure-manager.js +569 -707
  200. package/dist/src/memory/migration.js +358 -445
  201. package/dist/src/memory/shared-memory.js +641 -768
  202. package/dist/src/memory/sqlite-store.js +245 -325
  203. package/dist/src/memory/sqlite-wrapper.js +122 -151
  204. package/dist/src/memory/swarm-memory.js +470 -603
  205. package/dist/src/memory/test-example.js +126 -134
  206. package/dist/src/memory/ultra-fast-memory-store.js +622 -821
  207. package/dist/src/memory/unified-memory-manager.js +356 -437
  208. package/dist/src/migration/index.js +92 -0
  209. package/dist/src/migration/logger.js +121 -0
  210. package/dist/src/migration/migration-analyzer.js +268 -0
  211. package/dist/src/migration/migration-runner.js +522 -0
  212. package/dist/src/migration/migration-validator.js +285 -0
  213. package/dist/src/migration/progress-reporter.js +150 -0
  214. package/dist/src/migration/rollback-manager.js +321 -0
  215. package/dist/src/migration/tests/migration-system.test.js +7 -0
  216. package/dist/src/migration/types.js +3 -0
  217. package/dist/src/swarm/CodeRefactoringSwarm.js +777 -952
  218. package/dist/src/swarm/__tests__/integration.test.js +227 -0
  219. package/dist/src/swarm/__tests__/prompt-copier.test.js +344 -0
  220. package/dist/src/swarm/advanced-orchestrator.js +1095 -0
  221. package/dist/src/swarm/claude-code-interface.js +961 -0
  222. package/dist/src/swarm/claude-flow-executor.js +229 -0
  223. package/dist/src/swarm/consensus-coordinator.js +475 -0
  224. package/dist/src/swarm/coordinator.js +2993 -0
  225. package/dist/src/swarm/direct-executor.js +1180 -0
  226. package/dist/src/swarm/error-recovery/advanced-error-detection.js +691 -0
  227. package/dist/src/swarm/error-recovery/automated-recovery-workflows.js +998 -0
  228. package/dist/src/swarm/error-recovery/error-recovery-coordinator.js +1197 -0
  229. package/dist/src/swarm/error-recovery/recovery-monitoring.js +772 -0
  230. package/dist/src/swarm/error-recovery/resilience-architecture.js +714 -0
  231. package/dist/src/swarm/error-recovery/self-healing-mechanisms.js +1319 -0
  232. package/dist/src/swarm/error-recovery/test-error-recovery-effectiveness.js +808 -0
  233. package/dist/src/swarm/executor-v2.js +322 -0
  234. package/dist/src/swarm/executor.js +815 -0
  235. package/dist/src/swarm/hive-mind-integration.js +703 -0
  236. package/dist/src/swarm/index.js +41 -0
  237. package/dist/src/swarm/json-output-aggregator.js +267 -0
  238. package/dist/src/swarm/large-scale-coordinator.js +542 -0
  239. package/dist/src/swarm/mcp-integration-wrapper.js +628 -0
  240. package/dist/src/swarm/memory.js +1117 -0
  241. package/dist/src/swarm/optimizations/__tests__/optimization.test.js +348 -0
  242. package/dist/src/swarm/optimizations/async-file-manager.js +285 -0
  243. package/dist/src/swarm/optimizations/circular-buffer.js +162 -0
  244. package/dist/src/swarm/optimizations/connection-pool.js +244 -0
  245. package/dist/src/swarm/optimizations/index.js +28 -0
  246. package/dist/src/swarm/optimizations/optimized-executor.js +320 -0
  247. package/dist/src/swarm/optimizations/ttl-map.js +234 -0
  248. package/dist/src/swarm/prompt-cli.js +200 -0
  249. package/dist/src/swarm/prompt-copier-enhanced.js +202 -0
  250. package/dist/src/swarm/prompt-copier.js +381 -0
  251. package/dist/src/swarm/prompt-manager.js +295 -0
  252. package/dist/src/swarm/prompt-utils.js +310 -0
  253. package/dist/src/swarm/result-aggregator.js +718 -0
  254. package/dist/src/swarm/sparc-executor.js +1568 -0
  255. package/dist/src/swarm/strategies/auto.js +758 -0
  256. package/dist/src/swarm/strategies/base.js +128 -0
  257. package/dist/src/swarm/strategies/research.js +914 -0
  258. package/dist/src/swarm/strategies/strategy-metrics-patch.js +2 -0
  259. package/dist/src/swarm/types.js +52 -0
  260. package/dist/src/swarm/workers/copy-worker.js +56 -0
  261. package/dist/src/utils/__tests__/github-cli-safety-wrapper.test.js +332 -400
  262. package/dist/src/utils/github-cli-safe.js +56 -64
  263. package/dist/src/utils/github-cli-safety-wrapper.js +451 -546
  264. package/dist/src/utils/npx-isolated-cache.js +104 -119
  265. package/dist/src/utils/preference-manager.js +622 -652
  266. package/dist/src/utils/timezone-utils.js +86 -105
  267. package/dist/src/validators/epic-config-schema.js +214 -0
  268. package/dist/src/validators/index.js +10 -0
  269. package/dist/src/validators/swarm-init-validator.js +259 -0
  270. package/dist/src/validators/todowrite-batching-validator.js +215 -0
  271. package/dist/src/validators/todowrite-integration.js +187 -0
  272. package/package.json +2 -2
@@ -1,421 +1,366 @@
1
1
  // mcp.js - MCP server management commands
2
- import { printSuccess, printError, printWarning } from '../utils.js';
3
-
2
+ import { printSuccess } from "../utils.js";
4
3
  export async function mcpCommand(subArgs, flags) {
5
- const mcpCmd = subArgs[0];
6
-
7
- switch (mcpCmd) {
8
- case 'status':
9
- await showMcpStatus(subArgs, flags);
10
- break;
11
-
12
- case 'start':
13
- await startMcpServer(subArgs, flags);
14
- break;
15
-
16
- case 'stop':
17
- await stopMcpServer(subArgs, flags);
18
- break;
19
-
20
- case 'tools':
21
- await listMcpTools(subArgs, flags);
22
- break;
23
-
24
- case 'auth':
25
- await manageMcpAuth(subArgs, flags);
26
- break;
27
-
28
- case 'config':
29
- await showMcpConfig(subArgs, flags);
30
- break;
31
-
32
- default:
33
- showMcpHelp();
34
- }
4
+ const mcpCmd = subArgs[0];
5
+ switch(mcpCmd){
6
+ case 'status':
7
+ await showMcpStatus(subArgs, flags);
8
+ break;
9
+ case 'start':
10
+ await startMcpServer(subArgs, flags);
11
+ break;
12
+ case 'stop':
13
+ await stopMcpServer(subArgs, flags);
14
+ break;
15
+ case 'tools':
16
+ await listMcpTools(subArgs, flags);
17
+ break;
18
+ case 'auth':
19
+ await manageMcpAuth(subArgs, flags);
20
+ break;
21
+ case 'config':
22
+ await showMcpConfig(subArgs, flags);
23
+ break;
24
+ default:
25
+ showMcpHelp();
26
+ }
35
27
  }
36
-
37
28
  async function showMcpStatus(subArgs, flags) {
38
- printSuccess('MCP Server Status:');
39
- console.log('🌐 Status: Stopped (orchestrator not running)');
40
- console.log('šŸ”§ Configuration: Default settings');
41
- console.log('šŸ”Œ Connections: 0 active');
42
- console.log('šŸ“” Tools: Ready to load');
43
- console.log('šŸ” Authentication: Not configured');
29
+ printSuccess('MCP Server Status:');
30
+ console.log('🌐 Status: Stopped (orchestrator not running)');
31
+ console.log('šŸ”§ Configuration: Default settings');
32
+ console.log('šŸ”Œ Connections: 0 active');
33
+ console.log('šŸ“” Tools: Ready to load');
34
+ console.log('šŸ” Authentication: Not configured');
44
35
  }
45
-
46
36
  async function startMcpServer(subArgs, flags) {
47
- const autoOrchestrator = subArgs.includes('--auto-orchestrator') || flags.autoOrchestrator;
48
- const daemon = subArgs.includes('--daemon') || flags.daemon;
49
- const stdio = subArgs.includes('--stdio') || flags.stdio || true; // Default to stdio mode
50
-
51
- if (stdio) {
52
- // Start MCP server in stdio mode (like ruv-swarm)
53
- printSuccess('Starting Claude Flow MCP server in stdio mode...');
54
-
55
- if (autoOrchestrator) {
56
- console.log('šŸš€ Auto-starting orchestrator...');
57
- console.log('🧠 Neural network capabilities: ENABLED');
58
- console.log('šŸ”§ WASM SIMD optimization: ACTIVE');
59
- console.log('šŸ“Š Performance monitoring: ENABLED');
60
- console.log('šŸ Swarm coordination: READY');
61
- }
62
-
63
- // Import and start the MCP server
64
- try {
65
- const { fileURLToPath } = await import('url');
66
- const path = await import('path');
67
- const { spawn } = await import('child_process');
68
-
69
- const __filename = fileURLToPath(import.meta.url);
70
- const __dirname = path.dirname(__filename);
71
- // Use the SDK-based MCP server from dist directory
72
- const mcpServerPath = path.join(__dirname, '../../mcp/mcp-server-sdk.js');
73
-
74
- // Check if the file exists, and log the path for debugging
75
- const fs = await import('fs');
76
- if (!fs.existsSync(mcpServerPath)) {
77
- console.error(`MCP server file not found at: ${mcpServerPath}`);
78
- console.error(`Current directory: ${process.cwd()}`);
79
- console.error(`Script directory: ${__dirname}`);
80
- throw new Error(`MCP server file not found: ${mcpServerPath}`);
81
- }
82
-
83
- // Start the MCP server process
84
- const serverProcess = spawn('node', [mcpServerPath], {
85
- stdio: 'inherit',
86
- env: {
87
- ...process.env,
88
- CLAUDE_FLOW_AUTO_ORCHESTRATOR: autoOrchestrator ? 'true' : 'false',
89
- CLAUDE_FLOW_NEURAL_ENABLED: 'true',
90
- CLAUDE_FLOW_WASM_ENABLED: 'true',
91
- },
92
- });
93
-
94
- serverProcess.on('exit', (code) => {
95
- if (code !== 0) {
96
- console.error(`MCP server exited with code ${code}`);
37
+ const autoOrchestrator = subArgs.includes('--auto-orchestrator') || flags.autoOrchestrator;
38
+ const daemon = subArgs.includes('--daemon') || flags.daemon;
39
+ const stdio = subArgs.includes('--stdio') || flags.stdio || true; // Default to stdio mode
40
+ if (stdio) {
41
+ // Start MCP server in stdio mode (like ruv-swarm)
42
+ printSuccess('Starting Claude Flow MCP server in stdio mode...');
43
+ if (autoOrchestrator) {
44
+ console.log('šŸš€ Auto-starting orchestrator...');
45
+ console.log('🧠 Neural network capabilities: ENABLED');
46
+ console.log('šŸ”§ WASM SIMD optimization: ACTIVE');
47
+ console.log('šŸ“Š Performance monitoring: ENABLED');
48
+ console.log('šŸ Swarm coordination: READY');
97
49
  }
98
- });
99
-
100
- // Keep the process alive
101
- await new Promise(() => {}); // Never resolves, keeps server running
102
- } catch (error) {
103
- console.error('Failed to start MCP server:', error.message);
104
-
105
- // Fallback to status display
106
- console.log('šŸš€ MCP server would start with:');
107
- console.log(' Protocol: stdio');
108
- console.log(' Tools: 87 Claude-Flow integration tools');
109
- console.log(' Orchestrator: ' + (autoOrchestrator ? 'AUTO-STARTED' : 'Manual'));
110
- console.log(' Mode: ' + (daemon ? 'DAEMON' : 'Interactive'));
50
+ // Import and start the MCP server
51
+ try {
52
+ const { fileURLToPath } = await import("url");
53
+ const path = await import("path");
54
+ const { spawn } = await import("child_process");
55
+ const __filename = fileURLToPath(import.meta.url);
56
+ const __dirname = path.dirname(__filename);
57
+ // Use the SDK-based MCP server from dist directory
58
+ const mcpServerPath = path.join(__dirname, '../../mcp/mcp-server-sdk.js');
59
+ // Check if the file exists, and log the path for debugging
60
+ const fs = await import("fs");
61
+ if (!fs.existsSync(mcpServerPath)) {
62
+ console.error(`MCP server file not found at: ${mcpServerPath}`);
63
+ console.error(`Current directory: ${process.cwd()}`);
64
+ console.error(`Script directory: ${__dirname}`);
65
+ throw new Error(`MCP server file not found: ${mcpServerPath}`);
66
+ }
67
+ // Start the MCP server process
68
+ const serverProcess = spawn('node', [
69
+ mcpServerPath
70
+ ], {
71
+ stdio: 'inherit',
72
+ env: {
73
+ ...process.env,
74
+ CLAUDE_FLOW_AUTO_ORCHESTRATOR: autoOrchestrator ? 'true' : 'false',
75
+ CLAUDE_FLOW_NEURAL_ENABLED: 'true',
76
+ CLAUDE_FLOW_WASM_ENABLED: 'true'
77
+ }
78
+ });
79
+ serverProcess.on('exit', (code)=>{
80
+ if (code !== 0) {
81
+ console.error(`MCP server exited with code ${code}`);
82
+ }
83
+ });
84
+ // Keep the process alive
85
+ await new Promise(()=>{}); // Never resolves, keeps server running
86
+ } catch (error) {
87
+ console.error('Failed to start MCP server:', error.message);
88
+ // Fallback to status display
89
+ console.log('šŸš€ MCP server would start with:');
90
+ console.log(' Protocol: stdio');
91
+ console.log(' Tools: 87 Claude-Flow integration tools');
92
+ console.log(' Orchestrator: ' + (autoOrchestrator ? 'AUTO-STARTED' : 'Manual'));
93
+ console.log(' Mode: ' + (daemon ? 'DAEMON' : 'Interactive'));
94
+ }
95
+ } else {
96
+ // HTTP mode (for future implementation)
97
+ const port = getFlag(subArgs, '--port') || flags.port || 3000;
98
+ const host = getFlag(subArgs, '--host') || flags.host || 'localhost';
99
+ printSuccess(`Starting Claude Flow MCP server on ${host}:${port}...`);
100
+ console.log('šŸš€ HTTP mode not yet implemented, use --stdio for full functionality');
111
101
  }
112
- } else {
113
- // HTTP mode (for future implementation)
114
- const port = getFlag(subArgs, '--port') || flags.port || 3000;
115
- const host = getFlag(subArgs, '--host') || flags.host || 'localhost';
116
-
117
- printSuccess(`Starting Claude Flow MCP server on ${host}:${port}...`);
118
- console.log('šŸš€ HTTP mode not yet implemented, use --stdio for full functionality');
119
- }
120
102
  }
121
-
122
103
  async function stopMcpServer(subArgs, flags) {
123
- printSuccess('Stopping MCP server...');
124
- console.log('šŸ›‘ Server would be gracefully shut down');
125
- console.log('šŸ“ Active connections would be closed');
126
- console.log('šŸ’¾ State would be persisted');
104
+ printSuccess('Stopping MCP server...');
105
+ console.log('šŸ›‘ Server would be gracefully shut down');
106
+ console.log('šŸ“ Active connections would be closed');
107
+ console.log('šŸ’¾ State would be persisted');
127
108
  }
128
-
129
109
  async function listMcpTools(subArgs, flags) {
130
- const verbose = subArgs.includes('--verbose') || subArgs.includes('-v') || flags.verbose;
131
- const category = getFlag(subArgs, '--category') || flags.category;
132
-
133
- printSuccess('Claude-Flow MCP Tools & Resources (87 total):');
134
-
135
- if (!category || category === 'swarm') {
136
- console.log('\nšŸ SWARM COORDINATION (12 tools):');
137
- console.log(' • swarm_init Initialize swarm with topology');
138
- console.log(' • agent_spawn Create specialized AI agents');
139
- console.log(' • task_orchestrate Orchestrate complex workflows');
140
- console.log(' • swarm_status Monitor swarm health/performance');
141
- console.log(' • agent_list List active agents & capabilities');
142
- console.log(' • agent_metrics Agent performance metrics');
143
- console.log(' • swarm_monitor Real-time swarm monitoring');
144
- console.log(' • topology_optimize Auto-optimize swarm topology');
145
- console.log(' • load_balance Distribute tasks efficiently');
146
- console.log(' • coordination_sync Sync agent coordination');
147
- console.log(' • swarm_scale Auto-scale agent count');
148
- console.log(' • swarm_destroy Gracefully shutdown swarm');
149
- }
150
-
151
- if (!category || category === 'neural') {
152
- console.log('\n🧠 NEURAL NETWORKS & AI (15 tools):');
153
- console.log(' • neural_status Check neural network status');
154
- console.log(' • neural_train Train neural patterns');
155
- console.log(' • neural_patterns Analyze cognitive patterns');
156
- console.log(' • neural_predict Make AI predictions');
157
- console.log(' • model_load Load pre-trained models');
158
- console.log(' • model_save Save trained models');
159
- console.log(' • wasm_optimize WASM SIMD optimization');
160
- console.log(' • inference_run Run neural inference');
161
- console.log(' • pattern_recognize Pattern recognition');
162
- console.log(' • cognitive_analyze Cognitive behavior analysis');
163
- console.log(' • learning_adapt Adaptive learning');
164
- console.log(' • neural_compress Compress neural models');
165
- console.log(' • ensemble_create Create model ensembles');
166
- console.log(' • transfer_learn Transfer learning');
167
- console.log(' • neural_explain AI explainability');
168
- }
169
-
170
- if (!category || category === 'memory') {
171
- console.log('\nšŸ’¾ MEMORY & PERSISTENCE (12 tools):');
172
- console.log(' • memory_usage Store/retrieve persistent data');
173
- console.log(' • memory_search Search memory with patterns');
174
- console.log(' • memory_persist Cross-session persistence');
175
- console.log(' • memory_namespace Namespace management');
176
- console.log(' • memory_backup Backup memory stores');
177
- console.log(' • memory_restore Restore from backups');
178
- console.log(' • memory_compress Compress memory data');
179
- console.log(' • memory_sync Sync across instances');
180
- console.log(' • cache_manage Manage coordination cache');
181
- console.log(' • state_snapshot Create state snapshots');
182
- console.log(' • context_restore Restore execution context');
183
- console.log(' • memory_analytics Analyze memory usage');
184
- }
185
-
186
- if (!category || category === 'analysis') {
187
- console.log('\nšŸ“Š ANALYSIS & MONITORING (13 tools):');
188
- console.log(' • task_status Check task execution status');
189
- console.log(' • task_results Get task completion results');
190
- console.log(' • benchmark_run Performance benchmarks');
191
- console.log(' • bottleneck_analyze Identify bottlenecks');
192
- console.log(' • performance_report Generate performance reports');
193
- console.log(' • token_usage Analyze token consumption');
194
- console.log(' • metrics_collect Collect system metrics');
195
- console.log(' • trend_analysis Analyze performance trends');
196
- console.log(' • cost_analysis Cost and resource analysis');
197
- console.log(' • quality_assess Quality assessment');
198
- console.log(' • error_analysis Error pattern analysis');
199
- console.log(' • usage_stats Usage statistics');
200
- console.log(' • health_check System health monitoring');
201
- }
202
-
203
- if (!category || category === 'workflow') {
204
- console.log('\nšŸ”§ WORKFLOW & AUTOMATION (11 tools):');
205
- console.log(' • workflow_create Create custom workflows');
206
- console.log(' • workflow_execute Execute predefined workflows');
207
- console.log(' • workflow_export Export workflow definitions');
208
- console.log(' • sparc_mode Run SPARC development modes');
209
- console.log(' • automation_setup Setup automation rules');
210
- console.log(' • pipeline_create Create CI/CD pipelines');
211
- console.log(' • scheduler_manage Manage task scheduling');
212
- console.log(' • trigger_setup Setup event triggers');
213
- console.log(' • workflow_template Manage workflow templates');
214
- console.log(' • batch_process Batch processing');
215
- console.log(' • parallel_execute Execute tasks in parallel');
216
- }
217
-
218
- if (!category || category === 'github') {
219
- console.log('\nšŸ™ GITHUB INTEGRATION (8 tools):');
220
- console.log(' • github_repo_analyze Repository analysis');
221
- console.log(' • github_pr_manage Pull request management');
222
- console.log(' • github_issue_track Issue tracking & triage');
223
- console.log(' • github_release_coord Release coordination');
224
- console.log(' • github_workflow_auto Workflow automation');
225
- console.log(' • github_code_review Automated code review');
226
- console.log(' • github_sync_coord Multi-repo sync coordination');
227
- console.log(' • github_metrics Repository metrics');
228
- }
229
-
230
- if (!category || category === 'daa') {
231
- console.log('\nšŸ¤– DAA (Dynamic Agent Architecture) (8 tools):');
232
- console.log(' • daa_agent_create Create dynamic agents');
233
- console.log(' • daa_capability_match Match capabilities to tasks');
234
- console.log(' • daa_resource_alloc Resource allocation');
235
- console.log(' • daa_lifecycle_manage Agent lifecycle management');
236
- console.log(' • daa_communication Inter-agent communication');
237
- console.log(' • daa_consensus Consensus mechanisms');
238
- console.log(' • daa_fault_tolerance Fault tolerance & recovery');
239
- console.log(' • daa_optimization Performance optimization');
240
- }
241
-
242
- if (!category || category === 'system') {
243
- console.log('\nāš™ļø SYSTEM & UTILITIES (8 tools):');
244
- console.log(' • terminal_execute Execute terminal commands');
245
- console.log(' • config_manage Configuration management');
246
- console.log(' • features_detect Feature detection');
247
- console.log(' • security_scan Security scanning');
248
- console.log(' • backup_create Create system backups');
249
- console.log(' • restore_system System restoration');
250
- console.log(' • log_analysis Log analysis & insights');
251
- console.log(' • diagnostic_run System diagnostics');
252
- }
253
-
254
- if (verbose) {
255
- console.log('\nšŸ“‹ DETAILED TOOL INFORMATION:');
256
- console.log(' šŸ”„ HIGH-PRIORITY TOOLS:');
257
- console.log(
258
- ' swarm_init: Initialize coordination with 4 topologies (hierarchical, mesh, ring, star)',
259
- );
260
- console.log(
261
- ' agent_spawn: 8 agent types (researcher, coder, analyst, architect, tester, coordinator, reviewer, optimizer)',
262
- );
263
- console.log(' neural_train: Train 27 neural models with WASM SIMD acceleration');
264
- console.log(
265
- ' memory_usage: 5 operations (store, retrieve, list, delete, search) with TTL & namespacing',
266
- );
267
- console.log(' performance_report: Real-time metrics with 24h/7d/30d timeframes');
268
-
269
- console.log('\n ⚔ PERFORMANCE FEATURES:');
270
- console.log(' • 2.8-4.4x speed improvement with parallel execution');
271
- console.log(' • 32.3% token reduction through optimization');
272
- console.log(' • 84.8% SWE-Bench solve rate with swarm coordination');
273
- console.log(' • WASM neural processing with SIMD optimization');
274
- console.log(' • Cross-session memory persistence');
275
-
276
- console.log('\n šŸ”— INTEGRATION CAPABILITIES:');
277
- console.log(' • Full ruv-swarm feature parity (rebranded)');
278
- console.log(' • Claude Code native tool integration');
279
- console.log(' • GitHub Actions workflow automation');
280
- console.log(' • SPARC methodology with 17 modes');
281
- console.log(' • MCP protocol compatibility');
282
- }
283
-
284
- console.log('\nšŸ“” Status: 87 tools & resources available when server is running');
285
- console.log('šŸŽÆ Categories: swarm, neural, memory, analysis, workflow, github, daa, system');
286
- console.log('šŸ”— Compatibility: ruv-swarm + DAA + Claude-Flow unified platform');
287
- console.log('\nšŸ’” Usage: claude-flow-novice mcp tools --category=<category> --verbose');
110
+ const verbose = subArgs.includes('--verbose') || subArgs.includes('-v') || flags.verbose;
111
+ const category = getFlag(subArgs, '--category') || flags.category;
112
+ printSuccess('Claude-Flow MCP Tools & Resources (87 total):');
113
+ if (!category || category === 'swarm') {
114
+ console.log('\nšŸ SWARM COORDINATION (12 tools):');
115
+ console.log(' • swarm_init Initialize swarm with topology');
116
+ console.log(' • agent_spawn Create specialized AI agents');
117
+ console.log(' • task_orchestrate Orchestrate complex workflows');
118
+ console.log(' • swarm_status Monitor swarm health/performance');
119
+ console.log(' • agent_list List active agents & capabilities');
120
+ console.log(' • agent_metrics Agent performance metrics');
121
+ console.log(' • swarm_monitor Real-time swarm monitoring');
122
+ console.log(' • topology_optimize Auto-optimize swarm topology');
123
+ console.log(' • load_balance Distribute tasks efficiently');
124
+ console.log(' • coordination_sync Sync agent coordination');
125
+ console.log(' • swarm_scale Auto-scale agent count');
126
+ console.log(' • swarm_destroy Gracefully shutdown swarm');
127
+ }
128
+ if (!category || category === 'neural') {
129
+ console.log('\n🧠 NEURAL NETWORKS & AI (15 tools):');
130
+ console.log(' • neural_status Check neural network status');
131
+ console.log(' • neural_train Train neural patterns');
132
+ console.log(' • neural_patterns Analyze cognitive patterns');
133
+ console.log(' • neural_predict Make AI predictions');
134
+ console.log(' • model_load Load pre-trained models');
135
+ console.log(' • model_save Save trained models');
136
+ console.log(' • wasm_optimize WASM SIMD optimization');
137
+ console.log(' • inference_run Run neural inference');
138
+ console.log(' • pattern_recognize Pattern recognition');
139
+ console.log(' • cognitive_analyze Cognitive behavior analysis');
140
+ console.log(' • learning_adapt Adaptive learning');
141
+ console.log(' • neural_compress Compress neural models');
142
+ console.log(' • ensemble_create Create model ensembles');
143
+ console.log(' • transfer_learn Transfer learning');
144
+ console.log(' • neural_explain AI explainability');
145
+ }
146
+ if (!category || category === 'memory') {
147
+ console.log('\nšŸ’¾ MEMORY & PERSISTENCE (12 tools):');
148
+ console.log(' • memory_usage Store/retrieve persistent data');
149
+ console.log(' • memory_search Search memory with patterns');
150
+ console.log(' • memory_persist Cross-session persistence');
151
+ console.log(' • memory_namespace Namespace management');
152
+ console.log(' • memory_backup Backup memory stores');
153
+ console.log(' • memory_restore Restore from backups');
154
+ console.log(' • memory_compress Compress memory data');
155
+ console.log(' • memory_sync Sync across instances');
156
+ console.log(' • cache_manage Manage coordination cache');
157
+ console.log(' • state_snapshot Create state snapshots');
158
+ console.log(' • context_restore Restore execution context');
159
+ console.log(' • memory_analytics Analyze memory usage');
160
+ }
161
+ if (!category || category === 'analysis') {
162
+ console.log('\nšŸ“Š ANALYSIS & MONITORING (13 tools):');
163
+ console.log(' • task_status Check task execution status');
164
+ console.log(' • task_results Get task completion results');
165
+ console.log(' • benchmark_run Performance benchmarks');
166
+ console.log(' • bottleneck_analyze Identify bottlenecks');
167
+ console.log(' • performance_report Generate performance reports');
168
+ console.log(' • token_usage Analyze token consumption');
169
+ console.log(' • metrics_collect Collect system metrics');
170
+ console.log(' • trend_analysis Analyze performance trends');
171
+ console.log(' • cost_analysis Cost and resource analysis');
172
+ console.log(' • quality_assess Quality assessment');
173
+ console.log(' • error_analysis Error pattern analysis');
174
+ console.log(' • usage_stats Usage statistics');
175
+ console.log(' • health_check System health monitoring');
176
+ }
177
+ if (!category || category === 'workflow') {
178
+ console.log('\nšŸ”§ WORKFLOW & AUTOMATION (11 tools):');
179
+ console.log(' • workflow_create Create custom workflows');
180
+ console.log(' • workflow_execute Execute predefined workflows');
181
+ console.log(' • workflow_export Export workflow definitions');
182
+ console.log(' • sparc_mode Run SPARC development modes');
183
+ console.log(' • automation_setup Setup automation rules');
184
+ console.log(' • pipeline_create Create CI/CD pipelines');
185
+ console.log(' • scheduler_manage Manage task scheduling');
186
+ console.log(' • trigger_setup Setup event triggers');
187
+ console.log(' • workflow_template Manage workflow templates');
188
+ console.log(' • batch_process Batch processing');
189
+ console.log(' • parallel_execute Execute tasks in parallel');
190
+ }
191
+ if (!category || category === 'github') {
192
+ console.log('\nšŸ™ GITHUB INTEGRATION (8 tools):');
193
+ console.log(' • github_repo_analyze Repository analysis');
194
+ console.log(' • github_pr_manage Pull request management');
195
+ console.log(' • github_issue_track Issue tracking & triage');
196
+ console.log(' • github_release_coord Release coordination');
197
+ console.log(' • github_workflow_auto Workflow automation');
198
+ console.log(' • github_code_review Automated code review');
199
+ console.log(' • github_sync_coord Multi-repo sync coordination');
200
+ console.log(' • github_metrics Repository metrics');
201
+ }
202
+ if (!category || category === 'daa') {
203
+ console.log('\nšŸ¤– DAA (Dynamic Agent Architecture) (8 tools):');
204
+ console.log(' • daa_agent_create Create dynamic agents');
205
+ console.log(' • daa_capability_match Match capabilities to tasks');
206
+ console.log(' • daa_resource_alloc Resource allocation');
207
+ console.log(' • daa_lifecycle_manage Agent lifecycle management');
208
+ console.log(' • daa_communication Inter-agent communication');
209
+ console.log(' • daa_consensus Consensus mechanisms');
210
+ console.log(' • daa_fault_tolerance Fault tolerance & recovery');
211
+ console.log(' • daa_optimization Performance optimization');
212
+ }
213
+ if (!category || category === 'system') {
214
+ console.log('\nāš™ļø SYSTEM & UTILITIES (8 tools):');
215
+ console.log(' • terminal_execute Execute terminal commands');
216
+ console.log(' • config_manage Configuration management');
217
+ console.log(' • features_detect Feature detection');
218
+ console.log(' • security_scan Security scanning');
219
+ console.log(' • backup_create Create system backups');
220
+ console.log(' • restore_system System restoration');
221
+ console.log(' • log_analysis Log analysis & insights');
222
+ console.log(' • diagnostic_run System diagnostics');
223
+ }
224
+ if (verbose) {
225
+ console.log('\nšŸ“‹ DETAILED TOOL INFORMATION:');
226
+ console.log(' šŸ”„ HIGH-PRIORITY TOOLS:');
227
+ console.log(' swarm_init: Initialize coordination with 4 topologies (hierarchical, mesh, ring, star)');
228
+ console.log(' agent_spawn: 8 agent types (researcher, coder, analyst, architect, tester, coordinator, reviewer, optimizer)');
229
+ console.log(' neural_train: Train 27 neural models with WASM SIMD acceleration');
230
+ console.log(' memory_usage: 5 operations (store, retrieve, list, delete, search) with TTL & namespacing');
231
+ console.log(' performance_report: Real-time metrics with 24h/7d/30d timeframes');
232
+ console.log('\n ⚔ PERFORMANCE FEATURES:');
233
+ console.log(' • 2.8-4.4x speed improvement with parallel execution');
234
+ console.log(' • 32.3% token reduction through optimization');
235
+ console.log(' • 84.8% SWE-Bench solve rate with swarm coordination');
236
+ console.log(' • WASM neural processing with SIMD optimization');
237
+ console.log(' • Cross-session memory persistence');
238
+ console.log('\n šŸ”— INTEGRATION CAPABILITIES:');
239
+ console.log(' • Full ruv-swarm feature parity (rebranded)');
240
+ console.log(' • Claude Code native tool integration');
241
+ console.log(' • GitHub Actions workflow automation');
242
+ console.log(' • SPARC methodology with 17 modes');
243
+ console.log(' • MCP protocol compatibility');
244
+ }
245
+ console.log('\nšŸ“” Status: 87 tools & resources available when server is running');
246
+ console.log('šŸŽÆ Categories: swarm, neural, memory, analysis, workflow, github, daa, system');
247
+ console.log('šŸ”— Compatibility: ruv-swarm + DAA + Claude-Flow unified platform');
248
+ console.log('\nšŸ’” Usage: claude-flow-novice mcp tools --category=<category> --verbose');
288
249
  }
289
-
290
250
  async function manageMcpAuth(subArgs, flags) {
291
- const authCmd = subArgs[1];
292
-
293
- switch (authCmd) {
294
- case 'setup':
295
- printSuccess('Setting up MCP authentication...');
296
- console.log('šŸ” Authentication configuration:');
297
- console.log(' Type: API Key based');
298
- console.log(' Scope: Claude-Flow tools');
299
- console.log(' Security: TLS encrypted');
300
- break;
301
-
302
- case 'status':
303
- printSuccess('MCP Authentication Status:');
304
- console.log('šŸ” Status: Not configured');
305
- console.log('šŸ”‘ API Keys: 0 active');
306
- console.log('šŸ›”ļø Security: Default settings');
307
- break;
308
-
309
- case 'rotate':
310
- printSuccess('Rotating MCP authentication keys...');
311
- console.log('šŸ”„ New API keys would be generated');
312
- console.log('ā™»ļø Old keys would be deprecated gracefully');
313
- break;
314
-
315
- default:
316
- console.log('Auth commands: setup, status, rotate');
317
- console.log('Examples:');
318
- console.log(' claude-flow-novice mcp auth setup');
319
- console.log(' claude-flow-novice mcp auth status');
320
- }
251
+ const authCmd = subArgs[1];
252
+ switch(authCmd){
253
+ case 'setup':
254
+ printSuccess('Setting up MCP authentication...');
255
+ console.log('šŸ” Authentication configuration:');
256
+ console.log(' Type: API Key based');
257
+ console.log(' Scope: Claude-Flow tools');
258
+ console.log(' Security: TLS encrypted');
259
+ break;
260
+ case 'status':
261
+ printSuccess('MCP Authentication Status:');
262
+ console.log('šŸ” Status: Not configured');
263
+ console.log('šŸ”‘ API Keys: 0 active');
264
+ console.log('šŸ›”ļø Security: Default settings');
265
+ break;
266
+ case 'rotate':
267
+ printSuccess('Rotating MCP authentication keys...');
268
+ console.log('šŸ”„ New API keys would be generated');
269
+ console.log('ā™»ļø Old keys would be deprecated gracefully');
270
+ break;
271
+ default:
272
+ console.log('Auth commands: setup, status, rotate');
273
+ console.log('Examples:');
274
+ console.log(' claude-flow-novice mcp auth setup');
275
+ console.log(' claude-flow-novice mcp auth status');
276
+ }
321
277
  }
322
-
323
278
  async function showMcpConfig(subArgs, flags) {
324
- printSuccess('Claude-Flow MCP Server Configuration:');
325
- console.log('\nšŸ“‹ Server Settings:');
326
- console.log(' Host: localhost');
327
- console.log(' Port: 3000');
328
- console.log(' Protocol: HTTP/STDIO');
329
- console.log(' Timeout: 30000ms');
330
- console.log(' Auto-Orchestrator: Enabled');
331
-
332
- console.log('\nšŸ”§ Tool Configuration:');
333
- console.log(' Available Tools: 87 total');
334
- console.log(' Categories: 8 (swarm, neural, memory, analysis, workflow, github, daa, system)');
335
- console.log(' Authentication: API Key + OAuth');
336
- console.log(' Rate Limiting: 1000 req/min');
337
- console.log(' WASM Support: Enabled with SIMD');
338
-
339
- console.log('\n🧠 Neural Network Settings:');
340
- console.log(' Models: 27 pre-trained models available');
341
- console.log(' Training: Real-time adaptive learning');
342
- console.log(' Inference: WASM optimized');
343
- console.log(' Pattern Recognition: Enabled');
344
-
345
- console.log('\nšŸ Swarm Configuration:');
346
- console.log(' Max Agents: 10 per swarm');
347
- console.log(' Topologies: hierarchical, mesh, ring, star');
348
- console.log(' Coordination: Real-time with hooks');
349
- console.log(' Memory: Cross-session persistence');
350
-
351
- console.log('\nšŸ” Security Settings:');
352
- console.log(' TLS: Enabled in production');
353
- console.log(' CORS: Configured for Claude Code');
354
- console.log(' API Key Rotation: 30 days');
355
- console.log(' Audit Logging: Enabled');
356
-
357
- console.log('\nšŸ”— Integration Settings:');
358
- console.log(' ruv-swarm Compatibility: 100%');
359
- console.log(' DAA Integration: Enabled');
360
- console.log(' GitHub Actions: Connected');
361
- console.log(' SPARC Modes: 17 available');
362
-
363
- console.log('\nšŸ“ Configuration Files:');
364
- console.log(' Main Config: ./mcp_config/claude-flow.json');
365
- console.log(' Neural Models: ./models/');
366
- console.log(' Memory Store: ./memory/');
367
- console.log(' Logs: ./logs/mcp/');
279
+ printSuccess('Claude-Flow MCP Server Configuration:');
280
+ console.log('\nšŸ“‹ Server Settings:');
281
+ console.log(' Host: localhost');
282
+ console.log(' Port: 3000');
283
+ console.log(' Protocol: HTTP/STDIO');
284
+ console.log(' Timeout: 30000ms');
285
+ console.log(' Auto-Orchestrator: Enabled');
286
+ console.log('\nšŸ”§ Tool Configuration:');
287
+ console.log(' Available Tools: 87 total');
288
+ console.log(' Categories: 8 (swarm, neural, memory, analysis, workflow, github, daa, system)');
289
+ console.log(' Authentication: API Key + OAuth');
290
+ console.log(' Rate Limiting: 1000 req/min');
291
+ console.log(' WASM Support: Enabled with SIMD');
292
+ console.log('\n🧠 Neural Network Settings:');
293
+ console.log(' Models: 27 pre-trained models available');
294
+ console.log(' Training: Real-time adaptive learning');
295
+ console.log(' Inference: WASM optimized');
296
+ console.log(' Pattern Recognition: Enabled');
297
+ console.log('\nšŸ Swarm Configuration:');
298
+ console.log(' Max Agents: 10 per swarm');
299
+ console.log(' Topologies: hierarchical, mesh, ring, star');
300
+ console.log(' Coordination: Real-time with hooks');
301
+ console.log(' Memory: Cross-session persistence');
302
+ console.log('\nšŸ” Security Settings:');
303
+ console.log(' TLS: Enabled in production');
304
+ console.log(' CORS: Configured for Claude Code');
305
+ console.log(' API Key Rotation: 30 days');
306
+ console.log(' Audit Logging: Enabled');
307
+ console.log('\nšŸ”— Integration Settings:');
308
+ console.log(' ruv-swarm Compatibility: 100%');
309
+ console.log(' DAA Integration: Enabled');
310
+ console.log(' GitHub Actions: Connected');
311
+ console.log(' SPARC Modes: 17 available');
312
+ console.log('\nšŸ“ Configuration Files:');
313
+ console.log(' Main Config: ./mcp_config/claude-flow.json');
314
+ console.log(' Neural Models: ./models/');
315
+ console.log(' Memory Store: ./memory/');
316
+ console.log(' Logs: ./logs/mcp/');
368
317
  }
369
-
370
318
  function getFlag(args, flagName) {
371
- const index = args.indexOf(flagName);
372
- return index !== -1 && index + 1 < args.length ? args[index + 1] : null;
319
+ const index = args.indexOf(flagName);
320
+ return index !== -1 && index + 1 < args.length ? args[index + 1] : null;
373
321
  }
374
-
375
322
  function showMcpHelp() {
376
- console.log('šŸ”§ Claude-Flow MCP Server Commands:');
377
- console.log();
378
- console.log('COMMANDS:');
379
- console.log(' status Show MCP server status');
380
- console.log(' start [options] Start MCP server with orchestrator');
381
- console.log(' stop Stop MCP server gracefully');
382
- console.log(' tools [options] List available tools & resources');
383
- console.log(' auth <setup|status|rotate> Manage authentication');
384
- console.log(' config Show comprehensive configuration');
385
- console.log();
386
- console.log('START OPTIONS:');
387
- console.log(' --port <port> Server port (default: 3000)');
388
- console.log(' --host <host> Server host (default: localhost)');
389
- console.log(' --auto-orchestrator Auto-start orchestrator with neural/WASM');
390
- console.log(' --daemon Run in background daemon mode');
391
- console.log(' --enable-neural Enable neural network features');
392
- console.log(' --enable-wasm Enable WASM SIMD optimization');
393
- console.log();
394
- console.log('TOOLS OPTIONS:');
395
- console.log(
396
- ' --category <cat> Filter by category (swarm, neural, memory, etc.)',
397
- );
398
- console.log(' --verbose, -v Show detailed tool information');
399
- console.log(' --examples Show usage examples');
400
- console.log();
401
- console.log('CATEGORIES:');
402
- console.log(' swarm šŸ Swarm coordination (12 tools)');
403
- console.log(' neural 🧠 Neural networks & AI (15 tools)');
404
- console.log(' memory šŸ’¾ Memory & persistence (12 tools)');
405
- console.log(' analysis šŸ“Š Analysis & monitoring (13 tools)');
406
- console.log(' workflow šŸ”§ Workflow & automation (11 tools)');
407
- console.log(' github šŸ™ GitHub integration (8 tools)');
408
- console.log(' daa šŸ¤– Dynamic Agent Architecture (8 tools)');
409
- console.log(' system āš™ļø System & utilities (8 tools)');
410
- console.log();
411
- console.log('EXAMPLES:');
412
- console.log(' claude-flow-novice mcp status');
413
- console.log(' claude-flow-novice mcp start --auto-orchestrator --daemon');
414
- console.log(' claude-flow-novice mcp tools --category=neural --verbose');
415
- console.log(' claude-flow-novice mcp tools --category=swarm');
416
- console.log(' claude-flow-novice mcp config');
417
- console.log(' claude-flow-novice mcp auth setup');
418
- console.log();
419
- console.log('šŸŽÆ Total: 87 tools & resources available');
420
- console.log('šŸ”— Full ruv-swarm + DAA + Claude-Flow integration');
323
+ console.log('šŸ”§ Claude-Flow MCP Server Commands:');
324
+ console.log();
325
+ console.log('COMMANDS:');
326
+ console.log(' status Show MCP server status');
327
+ console.log(' start [options] Start MCP server with orchestrator');
328
+ console.log(' stop Stop MCP server gracefully');
329
+ console.log(' tools [options] List available tools & resources');
330
+ console.log(' auth <setup|status|rotate> Manage authentication');
331
+ console.log(' config Show comprehensive configuration');
332
+ console.log();
333
+ console.log('START OPTIONS:');
334
+ console.log(' --port <port> Server port (default: 3000)');
335
+ console.log(' --host <host> Server host (default: localhost)');
336
+ console.log(' --auto-orchestrator Auto-start orchestrator with neural/WASM');
337
+ console.log(' --daemon Run in background daemon mode');
338
+ console.log(' --enable-neural Enable neural network features');
339
+ console.log(' --enable-wasm Enable WASM SIMD optimization');
340
+ console.log();
341
+ console.log('TOOLS OPTIONS:');
342
+ console.log(' --category <cat> Filter by category (swarm, neural, memory, etc.)');
343
+ console.log(' --verbose, -v Show detailed tool information');
344
+ console.log(' --examples Show usage examples');
345
+ console.log();
346
+ console.log('CATEGORIES:');
347
+ console.log(' swarm šŸ Swarm coordination (12 tools)');
348
+ console.log(' neural 🧠 Neural networks & AI (15 tools)');
349
+ console.log(' memory šŸ’¾ Memory & persistence (12 tools)');
350
+ console.log(' analysis šŸ“Š Analysis & monitoring (13 tools)');
351
+ console.log(' workflow šŸ”§ Workflow & automation (11 tools)');
352
+ console.log(' github šŸ™ GitHub integration (8 tools)');
353
+ console.log(' daa šŸ¤– Dynamic Agent Architecture (8 tools)');
354
+ console.log(' system āš™ļø System & utilities (8 tools)');
355
+ console.log();
356
+ console.log('EXAMPLES:');
357
+ console.log(' claude-flow-novice mcp status');
358
+ console.log(' claude-flow-novice mcp start --auto-orchestrator --daemon');
359
+ console.log(' claude-flow-novice mcp tools --category=neural --verbose');
360
+ console.log(' claude-flow-novice mcp tools --category=swarm');
361
+ console.log(' claude-flow-novice mcp config');
362
+ console.log(' claude-flow-novice mcp auth setup');
363
+ console.log();
364
+ console.log('šŸŽÆ Total: 87 tools & resources available');
365
+ console.log('šŸ”— Full ruv-swarm + DAA + Claude-Flow integration');
421
366
  }