claude-flow 2.0.0-alpha.61 → 2.0.0-alpha.62

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 (1395) hide show
  1. package/CHANGELOG.md +59 -1
  2. package/bin/claude-flow +1 -1
  3. package/dist/adapters/cliffy-node.d.ts.map +1 -1
  4. package/dist/adapters/cliffy-node.js +13 -7
  5. package/dist/adapters/cliffy-node.js.map +1 -1
  6. package/dist/agents/agent-manager.d.ts.map +1 -1
  7. package/dist/agents/agent-manager.js +77 -65
  8. package/dist/agents/agent-manager.js.map +1 -1
  9. package/dist/agents/agent-registry.d.ts.map +1 -1
  10. package/dist/agents/agent-registry.js +38 -30
  11. package/dist/agents/agent-registry.js.map +1 -1
  12. package/dist/api/claude-client.d.ts.map +1 -1
  13. package/dist/api/claude-client.js +22 -16
  14. package/dist/api/claude-client.js.map +1 -1
  15. package/dist/cli/agents/analyst.d.ts.map +1 -1
  16. package/dist/cli/agents/analyst.js +94 -114
  17. package/dist/cli/agents/analyst.js.map +1 -1
  18. package/dist/cli/agents/architect.d.ts.map +1 -1
  19. package/dist/cli/agents/architect.js +100 -114
  20. package/dist/cli/agents/architect.js.map +1 -1
  21. package/dist/cli/agents/base-agent.d.ts.map +1 -1
  22. package/dist/cli/agents/base-agent.js +27 -27
  23. package/dist/cli/agents/base-agent.js.map +1 -1
  24. package/dist/cli/agents/capabilities.d.ts.map +1 -1
  25. package/dist/cli/agents/capabilities.js +49 -51
  26. package/dist/cli/agents/capabilities.js.map +1 -1
  27. package/dist/cli/agents/coder.d.ts.map +1 -1
  28. package/dist/cli/agents/coder.js +92 -98
  29. package/dist/cli/agents/coder.js.map +1 -1
  30. package/dist/cli/agents/coordinator.d.ts.map +1 -1
  31. package/dist/cli/agents/coordinator.js +59 -64
  32. package/dist/cli/agents/coordinator.js.map +1 -1
  33. package/dist/cli/agents/hive-agents.d.ts.map +1 -1
  34. package/dist/cli/agents/hive-agents.js +22 -24
  35. package/dist/cli/agents/hive-agents.js.map +1 -1
  36. package/dist/cli/agents/index.d.ts.map +1 -1
  37. package/dist/cli/agents/index.js +17 -17
  38. package/dist/cli/agents/index.js.map +1 -1
  39. package/dist/cli/agents/researcher.d.ts.map +1 -1
  40. package/dist/cli/agents/researcher.js +41 -61
  41. package/dist/cli/agents/researcher.js.map +1 -1
  42. package/dist/cli/agents/tester.d.ts.map +1 -1
  43. package/dist/cli/agents/tester.js +78 -90
  44. package/dist/cli/agents/tester.js.map +1 -1
  45. package/dist/cli/cli-core.d.ts +4 -1
  46. package/dist/cli/cli-core.d.ts.map +1 -1
  47. package/dist/cli/cli-core.js +40 -39
  48. package/dist/cli/cli-core.js.map +1 -1
  49. package/dist/cli/command-registry.d.ts.map +1 -1
  50. package/dist/cli/command-registry.js +55 -64
  51. package/dist/cli/command-registry.js.map +1 -1
  52. package/dist/cli/commands/advanced-memory-commands.d.ts.map +1 -1
  53. package/dist/cli/commands/advanced-memory-commands.js +49 -40
  54. package/dist/cli/commands/advanced-memory-commands.js.map +1 -1
  55. package/dist/cli/commands/agent-simple.d.ts +3 -0
  56. package/dist/cli/commands/agent-simple.d.ts.map +1 -1
  57. package/dist/cli/commands/agent-simple.js +30 -27
  58. package/dist/cli/commands/agent-simple.js.map +1 -1
  59. package/dist/cli/commands/agent.d.ts.map +1 -1
  60. package/dist/cli/commands/agent.js +53 -40
  61. package/dist/cli/commands/agent.js.map +1 -1
  62. package/dist/cli/commands/claude-api.js +4 -4
  63. package/dist/cli/commands/claude-api.js.map +1 -1
  64. package/dist/cli/commands/claude.d.ts.map +1 -1
  65. package/dist/cli/commands/claude.js +2 -2
  66. package/dist/cli/commands/claude.js.map +1 -1
  67. package/dist/cli/commands/config-integration.d.ts +7 -1
  68. package/dist/cli/commands/config-integration.d.ts.map +1 -1
  69. package/dist/cli/commands/config-integration.js +18 -9
  70. package/dist/cli/commands/config-integration.js.map +1 -1
  71. package/dist/cli/commands/config.d.ts.map +1 -1
  72. package/dist/cli/commands/config.js +2 -3
  73. package/dist/cli/commands/config.js.map +1 -1
  74. package/dist/cli/commands/enterprise.d.ts.map +1 -1
  75. package/dist/cli/commands/enterprise.js +115 -95
  76. package/dist/cli/commands/enterprise.js.map +1 -1
  77. package/dist/cli/commands/help-new.js +49 -49
  78. package/dist/cli/commands/help-new.js.map +1 -1
  79. package/dist/cli/commands/help.d.ts.map +1 -1
  80. package/dist/cli/commands/help.js +122 -125
  81. package/dist/cli/commands/help.js.map +1 -1
  82. package/dist/cli/commands/hive-mind/index.d.ts +1 -1
  83. package/dist/cli/commands/hive-mind/index.d.ts.map +1 -1
  84. package/dist/cli/commands/hive-mind/index.js +1 -1
  85. package/dist/cli/commands/hive-mind/index.js.map +1 -1
  86. package/dist/cli/commands/hive-mind/init.d.ts.map +1 -1
  87. package/dist/cli/commands/hive-mind/init.js.map +1 -1
  88. package/dist/cli/commands/hive-mind/optimize-memory.d.ts.map +1 -1
  89. package/dist/cli/commands/hive-mind/optimize-memory.js +35 -26
  90. package/dist/cli/commands/hive-mind/optimize-memory.js.map +1 -1
  91. package/dist/cli/commands/hive-mind/pause.d.ts.map +1 -1
  92. package/dist/cli/commands/hive-mind/pause.js +8 -6
  93. package/dist/cli/commands/hive-mind/pause.js.map +1 -1
  94. package/dist/cli/commands/hive-mind/ps.d.ts.map +1 -1
  95. package/dist/cli/commands/hive-mind/ps.js +17 -12
  96. package/dist/cli/commands/hive-mind/ps.js.map +1 -1
  97. package/dist/cli/commands/hive-mind/resume.js +12 -10
  98. package/dist/cli/commands/hive-mind/resume.js.map +1 -1
  99. package/dist/cli/commands/hive-mind/spawn.d.ts.map +1 -1
  100. package/dist/cli/commands/hive-mind/spawn.js +20 -11
  101. package/dist/cli/commands/hive-mind/spawn.js.map +1 -1
  102. package/dist/cli/commands/hive-mind/status.js +17 -22
  103. package/dist/cli/commands/hive-mind/status.js.map +1 -1
  104. package/dist/cli/commands/hive-mind/stop.d.ts.map +1 -1
  105. package/dist/cli/commands/hive-mind/stop.js +23 -15
  106. package/dist/cli/commands/hive-mind/stop.js.map +1 -1
  107. package/dist/cli/commands/hive-mind/task.d.ts.map +1 -1
  108. package/dist/cli/commands/hive-mind/task.js +25 -19
  109. package/dist/cli/commands/hive-mind/task.js.map +1 -1
  110. package/dist/cli/commands/hive-mind/wizard.d.ts.map +1 -1
  111. package/dist/cli/commands/hive-mind/wizard.js +86 -68
  112. package/dist/cli/commands/hive-mind/wizard.js.map +1 -1
  113. package/dist/cli/commands/hive.js +73 -38
  114. package/dist/cli/commands/hive.js.map +1 -1
  115. package/dist/cli/commands/hook-validator.d.ts.map +1 -1
  116. package/dist/cli/commands/hook-validator.js +4 -2
  117. package/dist/cli/commands/hook-validator.js.map +1 -1
  118. package/dist/cli/commands/hook.d.ts.map +1 -1
  119. package/dist/cli/commands/hook.js +8 -8
  120. package/dist/cli/commands/hook.js.map +1 -1
  121. package/dist/cli/commands/index.d.ts +1 -1
  122. package/dist/cli/commands/index.d.ts.map +1 -1
  123. package/dist/cli/commands/index.js +850 -784
  124. package/dist/cli/commands/index.js.map +1 -1
  125. package/dist/cli/commands/mcp.d.ts.map +1 -1
  126. package/dist/cli/commands/mcp.js +8 -16
  127. package/dist/cli/commands/mcp.js.map +1 -1
  128. package/dist/cli/commands/memory.d.ts.map +1 -1
  129. package/dist/cli/commands/memory.js +8 -8
  130. package/dist/cli/commands/memory.js.map +1 -1
  131. package/dist/cli/commands/migrate.d.ts.map +1 -1
  132. package/dist/cli/commands/migrate.js +3 -3
  133. package/dist/cli/commands/migrate.js.map +1 -1
  134. package/dist/cli/commands/monitor.d.ts.map +1 -1
  135. package/dist/cli/commands/monitor.js +50 -34
  136. package/dist/cli/commands/monitor.js.map +1 -1
  137. package/dist/cli/commands/ruv-swarm.d.ts +7 -1
  138. package/dist/cli/commands/ruv-swarm.d.ts.map +1 -1
  139. package/dist/cli/commands/ruv-swarm.js +6 -6
  140. package/dist/cli/commands/ruv-swarm.js.map +1 -1
  141. package/dist/cli/commands/session.d.ts.map +1 -1
  142. package/dist/cli/commands/session.js +22 -17
  143. package/dist/cli/commands/session.js.map +1 -1
  144. package/dist/cli/commands/sparc.d.ts +1 -1
  145. package/dist/cli/commands/sparc.d.ts.map +1 -1
  146. package/dist/cli/commands/sparc.js +146 -126
  147. package/dist/cli/commands/sparc.js.map +1 -1
  148. package/dist/cli/commands/start/event-emitter.js +1 -1
  149. package/dist/cli/commands/start/event-emitter.js.map +1 -1
  150. package/dist/cli/commands/start/process-manager.d.ts.map +1 -1
  151. package/dist/cli/commands/start/process-manager.js +20 -18
  152. package/dist/cli/commands/start/process-manager.js.map +1 -1
  153. package/dist/cli/commands/start/process-ui-simple.d.ts +4 -0
  154. package/dist/cli/commands/start/process-ui-simple.d.ts.map +1 -1
  155. package/dist/cli/commands/start/process-ui-simple.js +2 -2
  156. package/dist/cli/commands/start/process-ui-simple.js.map +1 -1
  157. package/dist/cli/commands/start/start-command.d.ts.map +1 -1
  158. package/dist/cli/commands/start/start-command.js +27 -15
  159. package/dist/cli/commands/start/start-command.js.map +1 -1
  160. package/dist/cli/commands/start/system-monitor.d.ts +3 -0
  161. package/dist/cli/commands/start/system-monitor.d.ts.map +1 -1
  162. package/dist/cli/commands/start/system-monitor.js +16 -18
  163. package/dist/cli/commands/start/system-monitor.js.map +1 -1
  164. package/dist/cli/commands/status.d.ts.map +1 -1
  165. package/dist/cli/commands/status.js +28 -33
  166. package/dist/cli/commands/status.js.map +1 -1
  167. package/dist/cli/commands/swarm-spawn.d.ts.map +1 -1
  168. package/dist/cli/commands/swarm-spawn.js +1 -1
  169. package/dist/cli/commands/swarm-spawn.js.map +1 -1
  170. package/dist/cli/commands/swarm.d.ts +4 -1
  171. package/dist/cli/commands/swarm.d.ts.map +1 -1
  172. package/dist/cli/commands/swarm.js +23 -18
  173. package/dist/cli/commands/swarm.js.map +1 -1
  174. package/dist/cli/commands/task.d.ts.map +1 -1
  175. package/dist/cli/commands/task.js.map +1 -1
  176. package/dist/cli/commands/workflow.d.ts.map +1 -1
  177. package/dist/cli/commands/workflow.js +49 -45
  178. package/dist/cli/commands/workflow.js.map +1 -1
  179. package/dist/cli/completion.d.ts +3 -0
  180. package/dist/cli/completion.d.ts.map +1 -1
  181. package/dist/cli/completion.js +15 -5
  182. package/dist/cli/completion.js.map +1 -1
  183. package/dist/cli/formatter.d.ts +3 -0
  184. package/dist/cli/formatter.d.ts.map +1 -1
  185. package/dist/cli/formatter.js +3 -3
  186. package/dist/cli/formatter.js.map +1 -1
  187. package/dist/cli/help-formatter.d.ts.map +1 -1
  188. package/dist/cli/help-formatter.js +8 -14
  189. package/dist/cli/help-formatter.js.map +1 -1
  190. package/dist/cli/index-remote.d.ts +4 -0
  191. package/dist/cli/index-remote.d.ts.map +1 -1
  192. package/dist/cli/index-remote.js +1 -1
  193. package/dist/cli/index-remote.js.map +1 -1
  194. package/dist/cli/index.d.ts +1 -1
  195. package/dist/cli/index.d.ts.map +1 -1
  196. package/dist/cli/index.js +32 -34
  197. package/dist/cli/index.js.map +1 -1
  198. package/dist/cli/init/batch-tools.d.ts.map +1 -1
  199. package/dist/cli/init/batch-tools.js.map +1 -1
  200. package/dist/cli/init/claude-config.d.ts.map +1 -1
  201. package/dist/cli/init/claude-config.js +111 -106
  202. package/dist/cli/init/claude-config.js.map +1 -1
  203. package/dist/cli/init/directory-structure.d.ts.map +1 -1
  204. package/dist/cli/init/directory-structure.js +3 -3
  205. package/dist/cli/init/directory-structure.js.map +1 -1
  206. package/dist/cli/init/index.d.ts.map +1 -1
  207. package/dist/cli/init/index.js +1 -1
  208. package/dist/cli/init/index.js.map +1 -1
  209. package/dist/cli/init/sparc-environment.d.ts.map +1 -1
  210. package/dist/cli/init/sparc-environment.js +69 -69
  211. package/dist/cli/init/sparc-environment.js.map +1 -1
  212. package/dist/cli/init/swarm-commands.d.ts.map +1 -1
  213. package/dist/cli/init/swarm-commands.js +1 -1
  214. package/dist/cli/init/swarm-commands.js.map +1 -1
  215. package/dist/cli/main.d.ts +3 -0
  216. package/dist/cli/main.d.ts.map +1 -1
  217. package/dist/cli/main.js +6 -6
  218. package/dist/cli/main.js.map +1 -1
  219. package/dist/cli/node-compat.d.ts.map +1 -1
  220. package/dist/cli/node-compat.js +24 -18
  221. package/dist/cli/node-compat.js.map +1 -1
  222. package/dist/cli/node-repl.d.ts +4 -0
  223. package/dist/cli/node-repl.d.ts.map +1 -1
  224. package/dist/cli/node-repl.js +24 -30
  225. package/dist/cli/node-repl.js.map +1 -1
  226. package/dist/cli/repl.d.ts.map +1 -1
  227. package/dist/cli/repl.js +81 -70
  228. package/dist/cli/repl.js.map +1 -1
  229. package/dist/cli/runtime-detector.d.ts.map +1 -1
  230. package/dist/cli/runtime-detector.js +11 -7
  231. package/dist/cli/runtime-detector.js.map +1 -1
  232. package/dist/cli/simple-cli.d.ts +4 -0
  233. package/dist/cli/simple-cli.d.ts.map +1 -1
  234. package/dist/cli/simple-cli.js +109 -95
  235. package/dist/cli/simple-cli.js.map +1 -1
  236. package/dist/cli/simple-commands/analysis.d.ts.map +1 -1
  237. package/dist/cli/simple-commands/analysis.js +18 -11
  238. package/dist/cli/simple-commands/analysis.js.map +1 -1
  239. package/dist/cli/simple-commands/automation.js +32 -17
  240. package/dist/cli/simple-commands/automation.js.map +1 -1
  241. package/dist/cli/simple-commands/batch-manager.js +44 -39
  242. package/dist/cli/simple-commands/batch-manager.js.map +1 -1
  243. package/dist/cli/simple-commands/config.d.ts.map +1 -1
  244. package/dist/cli/simple-commands/config.js +22 -21
  245. package/dist/cli/simple-commands/config.js.map +1 -1
  246. package/dist/cli/simple-commands/coordination.d.ts.map +1 -1
  247. package/dist/cli/simple-commands/coordination.js +12 -12
  248. package/dist/cli/simple-commands/coordination.js.map +1 -1
  249. package/dist/cli/simple-commands/fix-hook-variables.d.ts.map +1 -1
  250. package/dist/cli/simple-commands/fix-hook-variables.js +36 -30
  251. package/dist/cli/simple-commands/fix-hook-variables.js.map +1 -1
  252. package/dist/cli/simple-commands/github.d.ts.map +1 -1
  253. package/dist/cli/simple-commands/github.js +15 -15
  254. package/dist/cli/simple-commands/github.js.map +1 -1
  255. package/dist/cli/simple-commands/hive-mind/auto-save-middleware.d.ts.map +1 -1
  256. package/dist/cli/simple-commands/hive-mind/auto-save-middleware.js +12 -10
  257. package/dist/cli/simple-commands/hive-mind/auto-save-middleware.js.map +1 -1
  258. package/dist/cli/simple-commands/hive-mind/communication.d.ts.map +1 -1
  259. package/dist/cli/simple-commands/hive-mind/communication.js +42 -45
  260. package/dist/cli/simple-commands/hive-mind/communication.js.map +1 -1
  261. package/dist/cli/simple-commands/hive-mind/core.d.ts.map +1 -1
  262. package/dist/cli/simple-commands/hive-mind/core.js +97 -89
  263. package/dist/cli/simple-commands/hive-mind/core.js.map +1 -1
  264. package/dist/cli/simple-commands/hive-mind/db-optimizer.d.ts.map +1 -1
  265. package/dist/cli/simple-commands/hive-mind/db-optimizer.js +114 -59
  266. package/dist/cli/simple-commands/hive-mind/db-optimizer.js.map +1 -1
  267. package/dist/cli/simple-commands/hive-mind/mcp-wrapper.d.ts.map +1 -1
  268. package/dist/cli/simple-commands/hive-mind/mcp-wrapper.js +182 -103
  269. package/dist/cli/simple-commands/hive-mind/mcp-wrapper.js.map +1 -1
  270. package/dist/cli/simple-commands/hive-mind/memory.d.ts.map +1 -1
  271. package/dist/cli/simple-commands/hive-mind/memory.js +105 -75
  272. package/dist/cli/simple-commands/hive-mind/memory.js.map +1 -1
  273. package/dist/cli/simple-commands/hive-mind/performance-optimizer.d.ts.map +1 -1
  274. package/dist/cli/simple-commands/hive-mind/performance-optimizer.js +45 -43
  275. package/dist/cli/simple-commands/hive-mind/performance-optimizer.js.map +1 -1
  276. package/dist/cli/simple-commands/hive-mind/queen.d.ts.map +1 -1
  277. package/dist/cli/simple-commands/hive-mind/queen.js +101 -88
  278. package/dist/cli/simple-commands/hive-mind/queen.js.map +1 -1
  279. package/dist/cli/simple-commands/hive-mind/session-manager.js +75 -53
  280. package/dist/cli/simple-commands/hive-mind/session-manager.js.map +1 -1
  281. package/dist/cli/simple-commands/hive-mind-optimize.js +18 -18
  282. package/dist/cli/simple-commands/hive-mind-optimize.js.map +1 -1
  283. package/dist/cli/simple-commands/hive-mind.d.ts.map +1 -1
  284. package/dist/cli/simple-commands/hive-mind.js +195 -135
  285. package/dist/cli/simple-commands/hive-mind.js.map +1 -1
  286. package/dist/cli/simple-commands/hook-safety.d.ts.map +1 -1
  287. package/dist/cli/simple-commands/hook-safety.js +19 -19
  288. package/dist/cli/simple-commands/hook-safety.js.map +1 -1
  289. package/dist/cli/simple-commands/hooks.d.ts.map +1 -1
  290. package/dist/cli/simple-commands/hooks.js +85 -71
  291. package/dist/cli/simple-commands/hooks.js.map +1 -1
  292. package/dist/cli/simple-commands/init/batch-init.d.ts.map +1 -1
  293. package/dist/cli/simple-commands/init/batch-init.js +62 -55
  294. package/dist/cli/simple-commands/init/batch-init.js.map +1 -1
  295. package/dist/cli/simple-commands/init/claude-commands/optimized-slash-commands.d.ts.map +1 -1
  296. package/dist/cli/simple-commands/init/claude-commands/optimized-slash-commands.js +2 -2
  297. package/dist/cli/simple-commands/init/claude-commands/optimized-slash-commands.js.map +1 -1
  298. package/dist/cli/simple-commands/init/claude-commands/optimized-sparc-commands.d.ts.map +1 -1
  299. package/dist/cli/simple-commands/init/claude-commands/optimized-sparc-commands.js +58 -50
  300. package/dist/cli/simple-commands/init/claude-commands/optimized-sparc-commands.js.map +1 -1
  301. package/dist/cli/simple-commands/init/claude-commands/slash-commands.d.ts.map +1 -1
  302. package/dist/cli/simple-commands/init/claude-commands/slash-commands.js.map +1 -1
  303. package/dist/cli/simple-commands/init/claude-commands/sparc-commands.d.ts.map +1 -1
  304. package/dist/cli/simple-commands/init/claude-commands/sparc-commands.js +34 -28
  305. package/dist/cli/simple-commands/init/claude-commands/sparc-commands.js.map +1 -1
  306. package/dist/cli/simple-commands/init/executable-wrapper.d.ts.map +1 -1
  307. package/dist/cli/simple-commands/init/executable-wrapper.js +7 -4
  308. package/dist/cli/simple-commands/init/executable-wrapper.js.map +1 -1
  309. package/dist/cli/simple-commands/init/gitignore-updater.d.ts.map +1 -1
  310. package/dist/cli/simple-commands/init/gitignore-updater.js +10 -9
  311. package/dist/cli/simple-commands/init/gitignore-updater.js.map +1 -1
  312. package/dist/cli/simple-commands/init/help.d.ts.map +1 -1
  313. package/dist/cli/simple-commands/init/help.js.map +1 -1
  314. package/dist/cli/simple-commands/init/index.d.ts.map +1 -1
  315. package/dist/cli/simple-commands/init/index.js +159 -103
  316. package/dist/cli/simple-commands/init/index.js.map +1 -1
  317. package/dist/cli/simple-commands/init/performance-monitor.d.ts.map +1 -1
  318. package/dist/cli/simple-commands/init/performance-monitor.js +17 -18
  319. package/dist/cli/simple-commands/init/performance-monitor.js.map +1 -1
  320. package/dist/cli/simple-commands/init/rollback/backup-manager.d.ts.map +1 -1
  321. package/dist/cli/simple-commands/init/rollback/backup-manager.js +19 -25
  322. package/dist/cli/simple-commands/init/rollback/backup-manager.js.map +1 -1
  323. package/dist/cli/simple-commands/init/rollback/index.d.ts.map +1 -1
  324. package/dist/cli/simple-commands/init/rollback/index.js +18 -15
  325. package/dist/cli/simple-commands/init/rollback/index.js.map +1 -1
  326. package/dist/cli/simple-commands/init/rollback/recovery-manager.d.ts.map +1 -1
  327. package/dist/cli/simple-commands/init/rollback/recovery-manager.js +49 -68
  328. package/dist/cli/simple-commands/init/rollback/recovery-manager.js.map +1 -1
  329. package/dist/cli/simple-commands/init/rollback/rollback-executor.d.ts.map +1 -1
  330. package/dist/cli/simple-commands/init/rollback/rollback-executor.js +16 -24
  331. package/dist/cli/simple-commands/init/rollback/rollback-executor.js.map +1 -1
  332. package/dist/cli/simple-commands/init/rollback/state-tracker.d.ts.map +1 -1
  333. package/dist/cli/simple-commands/init/rollback/state-tracker.js +25 -25
  334. package/dist/cli/simple-commands/init/rollback/state-tracker.js.map +1 -1
  335. package/dist/cli/simple-commands/init/sparc/roomodes-config.d.ts.map +1 -1
  336. package/dist/cli/simple-commands/init/sparc/roomodes-config.js +57 -57
  337. package/dist/cli/simple-commands/init/sparc/roomodes-config.js.map +1 -1
  338. package/dist/cli/simple-commands/init/sparc/workflows.d.ts.map +1 -1
  339. package/dist/cli/simple-commands/init/sparc/workflows.js +21 -21
  340. package/dist/cli/simple-commands/init/sparc/workflows.js.map +1 -1
  341. package/dist/cli/simple-commands/init/sparc-structure.d.ts.map +1 -1
  342. package/dist/cli/simple-commands/init/sparc-structure.js +1 -1
  343. package/dist/cli/simple-commands/init/sparc-structure.js.map +1 -1
  344. package/dist/cli/simple-commands/init/templates/enhanced-templates.d.ts.map +1 -1
  345. package/dist/cli/simple-commands/init/templates/enhanced-templates.js +69 -78
  346. package/dist/cli/simple-commands/init/templates/enhanced-templates.js.map +1 -1
  347. package/dist/cli/simple-commands/init/templates/sparc-modes.js +2 -2
  348. package/dist/cli/simple-commands/init/validation/config-validator.d.ts.map +1 -1
  349. package/dist/cli/simple-commands/init/validation/config-validator.js +12 -16
  350. package/dist/cli/simple-commands/init/validation/config-validator.js.map +1 -1
  351. package/dist/cli/simple-commands/init/validation/health-checker.d.ts.map +1 -1
  352. package/dist/cli/simple-commands/init/validation/health-checker.js +39 -41
  353. package/dist/cli/simple-commands/init/validation/health-checker.js.map +1 -1
  354. package/dist/cli/simple-commands/init/validation/index.d.ts.map +1 -1
  355. package/dist/cli/simple-commands/init/validation/index.js +8 -8
  356. package/dist/cli/simple-commands/init/validation/index.js.map +1 -1
  357. package/dist/cli/simple-commands/init/validation/mode-validator.d.ts.map +1 -1
  358. package/dist/cli/simple-commands/init/validation/mode-validator.js +12 -12
  359. package/dist/cli/simple-commands/init/validation/mode-validator.js.map +1 -1
  360. package/dist/cli/simple-commands/init/validation/post-init-validator.d.ts.map +1 -1
  361. package/dist/cli/simple-commands/init/validation/post-init-validator.js +13 -13
  362. package/dist/cli/simple-commands/init/validation/post-init-validator.js.map +1 -1
  363. package/dist/cli/simple-commands/init/validation/pre-init-validator.d.ts.map +1 -1
  364. package/dist/cli/simple-commands/init/validation/pre-init-validator.js +19 -24
  365. package/dist/cli/simple-commands/init/validation/pre-init-validator.js.map +1 -1
  366. package/dist/cli/simple-commands/mcp.js +2 -2
  367. package/dist/cli/simple-commands/mcp.js.map +1 -1
  368. package/dist/cli/simple-commands/memory.js +4 -4
  369. package/dist/cli/simple-commands/memory.js.map +1 -1
  370. package/dist/cli/simple-commands/migrate-hooks.d.ts.map +1 -1
  371. package/dist/cli/simple-commands/migrate-hooks.js +3 -3
  372. package/dist/cli/simple-commands/migrate-hooks.js.map +1 -1
  373. package/dist/cli/simple-commands/monitor.d.ts.map +1 -1
  374. package/dist/cli/simple-commands/monitor.js +34 -26
  375. package/dist/cli/simple-commands/monitor.js.map +1 -1
  376. package/dist/cli/simple-commands/process-ui-enhanced.d.ts.map +1 -1
  377. package/dist/cli/simple-commands/process-ui-enhanced.js +53 -39
  378. package/dist/cli/simple-commands/process-ui-enhanced.js.map +1 -1
  379. package/dist/cli/simple-commands/sparc-modes/index.js +11 -11
  380. package/dist/cli/simple-commands/sparc-modes/index.js.map +1 -1
  381. package/dist/cli/simple-commands/sparc-modes/swarm.js +50 -50
  382. package/dist/cli/simple-commands/sparc.d.ts.map +1 -1
  383. package/dist/cli/simple-commands/sparc.js +21 -11
  384. package/dist/cli/simple-commands/sparc.js.map +1 -1
  385. package/dist/cli/simple-commands/start-ui.d.ts.map +1 -1
  386. package/dist/cli/simple-commands/start-ui.js +5 -3
  387. package/dist/cli/simple-commands/start-ui.js.map +1 -1
  388. package/dist/cli/simple-commands/start-wrapper.d.ts.map +1 -1
  389. package/dist/cli/simple-commands/start-wrapper.js +1 -1
  390. package/dist/cli/simple-commands/start-wrapper.js.map +1 -1
  391. package/dist/cli/simple-commands/status.js +14 -14
  392. package/dist/cli/simple-commands/status.js.map +1 -1
  393. package/dist/cli/simple-commands/swarm-executor.d.ts.map +1 -1
  394. package/dist/cli/simple-commands/swarm-executor.js +19 -19
  395. package/dist/cli/simple-commands/swarm-executor.js.map +1 -1
  396. package/dist/cli/simple-commands/swarm-metrics-integration.d.ts.map +1 -1
  397. package/dist/cli/simple-commands/swarm-metrics-integration.js +30 -21
  398. package/dist/cli/simple-commands/swarm-metrics-integration.js.map +1 -1
  399. package/dist/cli/simple-commands/swarm-webui-integration.d.ts.map +1 -1
  400. package/dist/cli/simple-commands/swarm-webui-integration.js +30 -18
  401. package/dist/cli/simple-commands/swarm-webui-integration.js.map +1 -1
  402. package/dist/cli/simple-commands/swarm.d.ts.map +1 -1
  403. package/dist/cli/simple-commands/swarm.js +78 -67
  404. package/dist/cli/simple-commands/swarm.js.map +1 -1
  405. package/dist/cli/simple-commands/training.d.ts.map +1 -1
  406. package/dist/cli/simple-commands/training.js +7 -7
  407. package/dist/cli/simple-commands/training.js.map +1 -1
  408. package/dist/cli/simple-commands/web-server.d.ts.map +1 -1
  409. package/dist/cli/simple-commands/web-server.js +68 -66
  410. package/dist/cli/simple-commands/web-server.js.map +1 -1
  411. package/dist/cli/simple-mcp.d.ts.map +1 -1
  412. package/dist/cli/simple-mcp.js +2 -4
  413. package/dist/cli/simple-mcp.js.map +1 -1
  414. package/dist/cli/simple-orchestrator.d.ts +3 -0
  415. package/dist/cli/simple-orchestrator.d.ts.map +1 -1
  416. package/dist/cli/simple-orchestrator.js +36 -35
  417. package/dist/cli/simple-orchestrator.js.map +1 -1
  418. package/dist/cli/ui/compatible-ui.d.ts +4 -0
  419. package/dist/cli/ui/compatible-ui.d.ts.map +1 -1
  420. package/dist/cli/ui/compatible-ui.js +9 -8
  421. package/dist/cli/ui/compatible-ui.js.map +1 -1
  422. package/dist/cli/ui/fallback-handler.d.ts.map +1 -1
  423. package/dist/cli/ui/fallback-handler.js +4 -4
  424. package/dist/cli/ui/fallback-handler.js.map +1 -1
  425. package/dist/cli/ui/index.d.ts +2 -2
  426. package/dist/cli/ui/index.d.ts.map +1 -1
  427. package/dist/cli/ui/index.js +3 -3
  428. package/dist/cli/ui/index.js.map +1 -1
  429. package/dist/cli/utils/environment-detector.d.ts.map +1 -1
  430. package/dist/cli/utils/environment-detector.js +13 -11
  431. package/dist/cli/utils/environment-detector.js.map +1 -1
  432. package/dist/cli/utils/interactive-detector.d.ts.map +1 -1
  433. package/dist/cli/utils/interactive-detector.js +1 -1
  434. package/dist/cli/utils/interactive-detector.js.map +1 -1
  435. package/dist/cli/utils/prompt-defaults.d.ts.map +1 -1
  436. package/dist/cli/utils/prompt-defaults.js +6 -7
  437. package/dist/cli/utils/prompt-defaults.js.map +1 -1
  438. package/dist/cli/utils/safe-interactive.d.ts.map +1 -1
  439. package/dist/cli/utils/safe-interactive.js +7 -6
  440. package/dist/cli/utils/safe-interactive.js.map +1 -1
  441. package/dist/cli/utils.d.ts.map +1 -1
  442. package/dist/cli/utils.js +58 -50
  443. package/dist/cli/utils.js.map +1 -1
  444. package/dist/cli/validation-helper.d.ts.map +1 -1
  445. package/dist/cli/validation-helper.js.map +1 -1
  446. package/dist/communication/message-bus.d.ts.map +1 -1
  447. package/dist/communication/message-bus.js +80 -74
  448. package/dist/communication/message-bus.js.map +1 -1
  449. package/dist/config/config-manager.d.ts +3 -0
  450. package/dist/config/config-manager.d.ts.map +1 -1
  451. package/dist/config/config-manager.js +23 -6
  452. package/dist/config/config-manager.js.map +1 -1
  453. package/dist/config/ruv-swarm-config.d.ts +6 -0
  454. package/dist/config/ruv-swarm-config.d.ts.map +1 -1
  455. package/dist/config/ruv-swarm-config.js +37 -22
  456. package/dist/config/ruv-swarm-config.js.map +1 -1
  457. package/dist/config/ruv-swarm-integration.d.ts.map +1 -1
  458. package/dist/config/ruv-swarm-integration.js +21 -21
  459. package/dist/config/ruv-swarm-integration.js.map +1 -1
  460. package/dist/constants/agent-types.d.ts +4 -4
  461. package/dist/constants/agent-types.d.ts.map +1 -1
  462. package/dist/constants/agent-types.js +4 -4
  463. package/dist/constants/agent-types.js.map +1 -1
  464. package/dist/coordination/advanced-scheduler.d.ts.map +1 -1
  465. package/dist/coordination/advanced-scheduler.js +6 -10
  466. package/dist/coordination/advanced-scheduler.js.map +1 -1
  467. package/dist/coordination/advanced-task-executor.d.ts.map +1 -1
  468. package/dist/coordination/advanced-task-executor.js +33 -33
  469. package/dist/coordination/advanced-task-executor.js.map +1 -1
  470. package/dist/coordination/background-executor.d.ts.map +1 -1
  471. package/dist/coordination/background-executor.js +17 -16
  472. package/dist/coordination/background-executor.js.map +1 -1
  473. package/dist/coordination/circuit-breaker.d.ts.map +1 -1
  474. package/dist/coordination/circuit-breaker.js +3 -0
  475. package/dist/coordination/circuit-breaker.js.map +1 -1
  476. package/dist/coordination/conflict-resolution.d.ts.map +1 -1
  477. package/dist/coordination/conflict-resolution.js +10 -8
  478. package/dist/coordination/conflict-resolution.js.map +1 -1
  479. package/dist/coordination/dependency-graph.d.ts.map +1 -1
  480. package/dist/coordination/dependency-graph.js +4 -3
  481. package/dist/coordination/dependency-graph.js.map +1 -1
  482. package/dist/coordination/hive-orchestrator.d.ts.map +1 -1
  483. package/dist/coordination/hive-orchestrator.js +29 -25
  484. package/dist/coordination/hive-orchestrator.js.map +1 -1
  485. package/dist/coordination/hive-protocol.d.ts.map +1 -1
  486. package/dist/coordination/hive-protocol.js +22 -23
  487. package/dist/coordination/hive-protocol.js.map +1 -1
  488. package/dist/coordination/index.d.ts +1 -1
  489. package/dist/coordination/index.d.ts.map +1 -1
  490. package/dist/coordination/index.js +1 -1
  491. package/dist/coordination/index.js.map +1 -1
  492. package/dist/coordination/load-balancer.d.ts.map +1 -1
  493. package/dist/coordination/load-balancer.js +55 -56
  494. package/dist/coordination/load-balancer.js.map +1 -1
  495. package/dist/coordination/manager.d.ts.map +1 -1
  496. package/dist/coordination/manager.js +2 -8
  497. package/dist/coordination/manager.js.map +1 -1
  498. package/dist/coordination/messaging.d.ts.map +1 -1
  499. package/dist/coordination/messaging.js +4 -4
  500. package/dist/coordination/messaging.js.map +1 -1
  501. package/dist/coordination/metrics.d.ts.map +1 -1
  502. package/dist/coordination/metrics.js +11 -9
  503. package/dist/coordination/metrics.js.map +1 -1
  504. package/dist/coordination/resources.d.ts.map +1 -1
  505. package/dist/coordination/resources.js +10 -6
  506. package/dist/coordination/resources.js.map +1 -1
  507. package/dist/coordination/scheduler.d.ts.map +1 -1
  508. package/dist/coordination/scheduler.js +4 -4
  509. package/dist/coordination/scheduler.js.map +1 -1
  510. package/dist/coordination/swarm-coordinator.d.ts.map +1 -1
  511. package/dist/coordination/swarm-coordinator.js +32 -34
  512. package/dist/coordination/swarm-coordinator.js.map +1 -1
  513. package/dist/coordination/swarm-monitor.d.ts.map +1 -1
  514. package/dist/coordination/swarm-monitor.js +17 -17
  515. package/dist/coordination/swarm-monitor.js.map +1 -1
  516. package/dist/coordination/work-stealing.d.ts.map +1 -1
  517. package/dist/coordination/work-stealing.js +3 -0
  518. package/dist/coordination/work-stealing.js.map +1 -1
  519. package/dist/core/config.d.ts +4 -0
  520. package/dist/core/config.d.ts.map +1 -1
  521. package/dist/core/config.js +28 -31
  522. package/dist/core/config.js.map +1 -1
  523. package/dist/core/event-bus.d.ts +3 -0
  524. package/dist/core/event-bus.d.ts.map +1 -1
  525. package/dist/core/event-bus.js.map +1 -1
  526. package/dist/core/json-persistence.d.ts +3 -0
  527. package/dist/core/json-persistence.d.ts.map +1 -1
  528. package/dist/core/json-persistence.js +19 -23
  529. package/dist/core/json-persistence.js.map +1 -1
  530. package/dist/core/logger.d.ts +3 -0
  531. package/dist/core/logger.d.ts.map +1 -1
  532. package/dist/core/logger.js +2 -6
  533. package/dist/core/logger.js.map +1 -1
  534. package/dist/core/orchestrator-fixed.d.ts.map +1 -1
  535. package/dist/core/orchestrator-fixed.js +4 -1
  536. package/dist/core/orchestrator-fixed.js.map +1 -1
  537. package/dist/core/orchestrator.d.ts.map +1 -1
  538. package/dist/core/orchestrator.js +66 -33
  539. package/dist/core/orchestrator.js.map +1 -1
  540. package/dist/core/persistence.d.ts +3 -0
  541. package/dist/core/persistence.d.ts.map +1 -1
  542. package/dist/core/persistence.js +25 -19
  543. package/dist/core/persistence.js.map +1 -1
  544. package/dist/enterprise/analytics-manager.d.ts.map +1 -1
  545. package/dist/enterprise/analytics-manager.js +141 -134
  546. package/dist/enterprise/analytics-manager.js.map +1 -1
  547. package/dist/enterprise/audit-manager.d.ts.map +1 -1
  548. package/dist/enterprise/audit-manager.js +144 -122
  549. package/dist/enterprise/audit-manager.js.map +1 -1
  550. package/dist/enterprise/cloud-manager.d.ts.map +1 -1
  551. package/dist/enterprise/cloud-manager.js +104 -99
  552. package/dist/enterprise/cloud-manager.js.map +1 -1
  553. package/dist/enterprise/deployment-manager.d.ts.map +1 -1
  554. package/dist/enterprise/deployment-manager.js +104 -97
  555. package/dist/enterprise/deployment-manager.js.map +1 -1
  556. package/dist/enterprise/index.d.ts +6 -6
  557. package/dist/enterprise/index.d.ts.map +1 -1
  558. package/dist/enterprise/project-manager.d.ts.map +1 -1
  559. package/dist/enterprise/project-manager.js +74 -66
  560. package/dist/enterprise/project-manager.js.map +1 -1
  561. package/dist/enterprise/security-manager.d.ts.map +1 -1
  562. package/dist/enterprise/security-manager.js +137 -129
  563. package/dist/enterprise/security-manager.js.map +1 -1
  564. package/dist/hive-mind/core/Agent.d.ts.map +1 -1
  565. package/dist/hive-mind/core/Agent.js +36 -36
  566. package/dist/hive-mind/core/Agent.js.map +1 -1
  567. package/dist/hive-mind/core/Communication.d.ts.map +1 -1
  568. package/dist/hive-mind/core/Communication.js +17 -17
  569. package/dist/hive-mind/core/Communication.js.map +1 -1
  570. package/dist/hive-mind/core/DatabaseManager.d.ts.map +1 -1
  571. package/dist/hive-mind/core/DatabaseManager.js +104 -58
  572. package/dist/hive-mind/core/DatabaseManager.js.map +1 -1
  573. package/dist/hive-mind/core/HiveMind.d.ts.map +1 -1
  574. package/dist/hive-mind/core/HiveMind.js +35 -35
  575. package/dist/hive-mind/core/HiveMind.js.map +1 -1
  576. package/dist/hive-mind/core/Memory.d.ts.map +1 -1
  577. package/dist/hive-mind/core/Memory.js +78 -71
  578. package/dist/hive-mind/core/Memory.js.map +1 -1
  579. package/dist/hive-mind/core/MemoryMonitor.d.ts.map +1 -1
  580. package/dist/hive-mind/core/MemoryMonitor.js +38 -38
  581. package/dist/hive-mind/core/MemoryMonitor.js.map +1 -1
  582. package/dist/hive-mind/core/Queen.d.ts.map +1 -1
  583. package/dist/hive-mind/core/Queen.js +110 -47
  584. package/dist/hive-mind/core/Queen.js.map +1 -1
  585. package/dist/hive-mind/integration/ConsensusEngine.d.ts.map +1 -1
  586. package/dist/hive-mind/integration/ConsensusEngine.js +25 -23
  587. package/dist/hive-mind/integration/ConsensusEngine.js.map +1 -1
  588. package/dist/hive-mind/integration/MCPToolWrapper.d.ts.map +1 -1
  589. package/dist/hive-mind/integration/MCPToolWrapper.js.map +1 -1
  590. package/dist/hive-mind/integration/SwarmOrchestrator.d.ts.map +1 -1
  591. package/dist/hive-mind/integration/SwarmOrchestrator.js +60 -58
  592. package/dist/hive-mind/integration/SwarmOrchestrator.js.map +1 -1
  593. package/dist/hive-mind/types.d.ts.map +1 -1
  594. package/dist/integration/mock-components.d.ts.map +1 -1
  595. package/dist/integration/mock-components.js +21 -21
  596. package/dist/integration/mock-components.js.map +1 -1
  597. package/dist/integration/system-integration.d.ts.map +1 -1
  598. package/dist/integration/system-integration.js +13 -11
  599. package/dist/integration/system-integration.js.map +1 -1
  600. package/dist/mcp/auth.d.ts +1 -1
  601. package/dist/mcp/auth.d.ts.map +1 -1
  602. package/dist/mcp/auth.js +8 -1
  603. package/dist/mcp/auth.js.map +1 -1
  604. package/dist/mcp/claude-code-wrapper.d.ts.map +1 -1
  605. package/dist/mcp/claude-code-wrapper.js +169 -68
  606. package/dist/mcp/claude-code-wrapper.js.map +1 -1
  607. package/dist/mcp/claude-flow-tools.d.ts.map +1 -1
  608. package/dist/mcp/claude-flow-tools.js +42 -3
  609. package/dist/mcp/claude-flow-tools.js.map +1 -1
  610. package/dist/mcp/client.d.ts.map +1 -1
  611. package/dist/mcp/client.js.map +1 -1
  612. package/dist/mcp/index.d.ts +6 -6
  613. package/dist/mcp/index.d.ts.map +1 -1
  614. package/dist/mcp/index.js +9 -9
  615. package/dist/mcp/index.js.map +1 -1
  616. package/dist/mcp/integrate-wrapper.d.ts.map +1 -1
  617. package/dist/mcp/integrate-wrapper.js +5 -7
  618. package/dist/mcp/integrate-wrapper.js.map +1 -1
  619. package/dist/mcp/lifecycle-manager.d.ts.map +1 -1
  620. package/dist/mcp/lifecycle-manager.js +8 -7
  621. package/dist/mcp/lifecycle-manager.js.map +1 -1
  622. package/dist/mcp/load-balancer.d.ts.map +1 -1
  623. package/dist/mcp/load-balancer.js +5 -1
  624. package/dist/mcp/load-balancer.js.map +1 -1
  625. package/dist/mcp/orchestration-integration.d.ts.map +1 -1
  626. package/dist/mcp/orchestration-integration.js +22 -9
  627. package/dist/mcp/orchestration-integration.js.map +1 -1
  628. package/dist/mcp/performance-monitor.d.ts.map +1 -1
  629. package/dist/mcp/performance-monitor.js +22 -19
  630. package/dist/mcp/performance-monitor.js.map +1 -1
  631. package/dist/mcp/protocol-manager.d.ts.map +1 -1
  632. package/dist/mcp/protocol-manager.js +8 -19
  633. package/dist/mcp/protocol-manager.js.map +1 -1
  634. package/dist/mcp/recovery/connection-health-monitor.d.ts.map +1 -1
  635. package/dist/mcp/recovery/connection-health-monitor.js +5 -5
  636. package/dist/mcp/recovery/connection-health-monitor.js.map +1 -1
  637. package/dist/mcp/recovery/connection-state-manager.d.ts +4 -0
  638. package/dist/mcp/recovery/connection-state-manager.d.ts.map +1 -1
  639. package/dist/mcp/recovery/connection-state-manager.js +13 -13
  640. package/dist/mcp/recovery/connection-state-manager.js.map +1 -1
  641. package/dist/mcp/recovery/fallback-coordinator.d.ts.map +1 -1
  642. package/dist/mcp/recovery/fallback-coordinator.js +5 -5
  643. package/dist/mcp/recovery/fallback-coordinator.js.map +1 -1
  644. package/dist/mcp/recovery/index.d.ts +4 -4
  645. package/dist/mcp/recovery/index.d.ts.map +1 -1
  646. package/dist/mcp/recovery/index.js +4 -4
  647. package/dist/mcp/recovery/index.js.map +1 -1
  648. package/dist/mcp/recovery/reconnection-manager.d.ts.map +1 -1
  649. package/dist/mcp/recovery/reconnection-manager.js +1 -1
  650. package/dist/mcp/recovery/reconnection-manager.js.map +1 -1
  651. package/dist/mcp/recovery/recovery-manager.d.ts.map +1 -1
  652. package/dist/mcp/recovery/recovery-manager.js +2 -4
  653. package/dist/mcp/recovery/recovery-manager.js.map +1 -1
  654. package/dist/mcp/router.d.ts.map +1 -1
  655. package/dist/mcp/router.js +3 -0
  656. package/dist/mcp/router.js.map +1 -1
  657. package/dist/mcp/ruv-swarm-tools.d.ts.map +1 -1
  658. package/dist/mcp/ruv-swarm-tools.js +132 -102
  659. package/dist/mcp/ruv-swarm-tools.js.map +1 -1
  660. package/dist/mcp/server-with-wrapper.d.ts +3 -0
  661. package/dist/mcp/server-with-wrapper.d.ts.map +1 -1
  662. package/dist/mcp/server-with-wrapper.js +2 -3
  663. package/dist/mcp/server-with-wrapper.js.map +1 -1
  664. package/dist/mcp/server-wrapper-mode.d.ts +5 -0
  665. package/dist/mcp/server-wrapper-mode.d.ts.map +1 -1
  666. package/dist/mcp/server-wrapper-mode.js +2 -3
  667. package/dist/mcp/server-wrapper-mode.js.map +1 -1
  668. package/dist/mcp/server.d.ts.map +1 -1
  669. package/dist/mcp/server.js +12 -7
  670. package/dist/mcp/server.js.map +1 -1
  671. package/dist/mcp/session-manager.d.ts.map +1 -1
  672. package/dist/mcp/session-manager.js +4 -3
  673. package/dist/mcp/session-manager.js.map +1 -1
  674. package/dist/mcp/sparc-modes.d.ts.map +1 -1
  675. package/dist/mcp/sparc-modes.js +15 -15
  676. package/dist/mcp/sparc-modes.js.map +1 -1
  677. package/dist/mcp/swarm-tools.d.ts.map +1 -1
  678. package/dist/mcp/swarm-tools.js +100 -80
  679. package/dist/mcp/swarm-tools.js.map +1 -1
  680. package/dist/mcp/tools.d.ts.map +1 -1
  681. package/dist/mcp/tools.js +28 -12
  682. package/dist/mcp/tools.js.map +1 -1
  683. package/dist/mcp/transports/base.d.ts.map +1 -1
  684. package/dist/mcp/transports/base.js +3 -0
  685. package/dist/mcp/transports/base.js.map +1 -1
  686. package/dist/mcp/transports/http.d.ts +3 -0
  687. package/dist/mcp/transports/http.d.ts.map +1 -1
  688. package/dist/mcp/transports/http.js +3 -3
  689. package/dist/mcp/transports/http.js.map +1 -1
  690. package/dist/mcp/transports/stdio.d.ts +3 -0
  691. package/dist/mcp/transports/stdio.d.ts.map +1 -1
  692. package/dist/mcp/transports/stdio.js +3 -0
  693. package/dist/mcp/transports/stdio.js.map +1 -1
  694. package/dist/memory/advanced-memory-manager.d.ts.map +1 -1
  695. package/dist/memory/advanced-memory-manager.js +109 -100
  696. package/dist/memory/advanced-memory-manager.js.map +1 -1
  697. package/dist/memory/backends/base.d.ts.map +1 -1
  698. package/dist/memory/backends/base.js +3 -0
  699. package/dist/memory/backends/base.js.map +1 -1
  700. package/dist/memory/backends/markdown.d.ts +3 -0
  701. package/dist/memory/backends/markdown.d.ts.map +1 -1
  702. package/dist/memory/backends/markdown.js +8 -8
  703. package/dist/memory/backends/markdown.js.map +1 -1
  704. package/dist/memory/backends/sqlite.d.ts +3 -0
  705. package/dist/memory/backends/sqlite.d.ts.map +1 -1
  706. package/dist/memory/backends/sqlite.js +6 -2
  707. package/dist/memory/backends/sqlite.js.map +1 -1
  708. package/dist/memory/cache.d.ts.map +1 -1
  709. package/dist/memory/cache.js +5 -3
  710. package/dist/memory/cache.js.map +1 -1
  711. package/dist/memory/distributed-memory.d.ts.map +1 -1
  712. package/dist/memory/distributed-memory.js +27 -28
  713. package/dist/memory/distributed-memory.js.map +1 -1
  714. package/dist/memory/fallback-store.d.ts.map +1 -1
  715. package/dist/memory/fallback-store.js.map +1 -1
  716. package/dist/memory/in-memory-store.d.ts.map +1 -1
  717. package/dist/memory/in-memory-store.js +8 -8
  718. package/dist/memory/in-memory-store.js.map +1 -1
  719. package/dist/memory/indexer.d.ts.map +1 -1
  720. package/dist/memory/indexer.js +4 -1
  721. package/dist/memory/indexer.js.map +1 -1
  722. package/dist/memory/manager.d.ts.map +1 -1
  723. package/dist/memory/manager.js +17 -20
  724. package/dist/memory/manager.js.map +1 -1
  725. package/dist/memory/sqlite-store.js +12 -8
  726. package/dist/memory/sqlite-store.js.map +1 -1
  727. package/dist/memory/swarm-memory.d.ts.map +1 -1
  728. package/dist/memory/swarm-memory.js +37 -44
  729. package/dist/memory/swarm-memory.js.map +1 -1
  730. package/dist/migration/index.d.ts +4 -0
  731. package/dist/migration/index.d.ts.map +1 -1
  732. package/dist/migration/index.js +8 -8
  733. package/dist/migration/index.js.map +1 -1
  734. package/dist/migration/logger.d.ts.map +1 -1
  735. package/dist/migration/logger.js +5 -5
  736. package/dist/migration/logger.js.map +1 -1
  737. package/dist/migration/migration-analyzer.d.ts +3 -0
  738. package/dist/migration/migration-analyzer.d.ts.map +1 -1
  739. package/dist/migration/migration-analyzer.js +25 -20
  740. package/dist/migration/migration-analyzer.js.map +1 -1
  741. package/dist/migration/migration-runner.d.ts.map +1 -1
  742. package/dist/migration/migration-runner.js +35 -29
  743. package/dist/migration/migration-runner.js.map +1 -1
  744. package/dist/migration/migration-validator.d.ts +3 -0
  745. package/dist/migration/migration-validator.d.ts.map +1 -1
  746. package/dist/migration/migration-validator.js +22 -26
  747. package/dist/migration/migration-validator.js.map +1 -1
  748. package/dist/migration/progress-reporter.d.ts +3 -0
  749. package/dist/migration/progress-reporter.d.ts.map +1 -1
  750. package/dist/migration/progress-reporter.js +8 -8
  751. package/dist/migration/progress-reporter.js.map +1 -1
  752. package/dist/migration/rollback-manager.d.ts +3 -0
  753. package/dist/migration/rollback-manager.d.ts.map +1 -1
  754. package/dist/migration/rollback-manager.js +29 -26
  755. package/dist/migration/rollback-manager.js.map +1 -1
  756. package/dist/monitoring/diagnostics.d.ts.map +1 -1
  757. package/dist/monitoring/diagnostics.js +49 -37
  758. package/dist/monitoring/diagnostics.js.map +1 -1
  759. package/dist/monitoring/health-check.d.ts.map +1 -1
  760. package/dist/monitoring/health-check.js +24 -25
  761. package/dist/monitoring/health-check.js.map +1 -1
  762. package/dist/monitoring/real-time-monitor.d.ts.map +1 -1
  763. package/dist/monitoring/real-time-monitor.js +71 -58
  764. package/dist/monitoring/real-time-monitor.js.map +1 -1
  765. package/dist/resources/resource-manager.d.ts.map +1 -1
  766. package/dist/resources/resource-manager.js +96 -83
  767. package/dist/resources/resource-manager.js.map +1 -1
  768. package/dist/swarm/claude-flow-executor.d.ts.map +1 -1
  769. package/dist/swarm/claude-flow-executor.js +37 -31
  770. package/dist/swarm/claude-flow-executor.js.map +1 -1
  771. package/dist/swarm/coordinator.d.ts.map +1 -1
  772. package/dist/swarm/coordinator.js +330 -280
  773. package/dist/swarm/coordinator.js.map +1 -1
  774. package/dist/swarm/direct-executor.d.ts.map +1 -1
  775. package/dist/swarm/direct-executor.js +44 -37
  776. package/dist/swarm/direct-executor.js.map +1 -1
  777. package/dist/swarm/executor-v2.d.ts.map +1 -1
  778. package/dist/swarm/executor-v2.js +28 -27
  779. package/dist/swarm/executor-v2.js.map +1 -1
  780. package/dist/swarm/executor.d.ts +3 -0
  781. package/dist/swarm/executor.d.ts.map +1 -1
  782. package/dist/swarm/executor.js +58 -52
  783. package/dist/swarm/executor.js.map +1 -1
  784. package/dist/swarm/index.d.ts.map +1 -1
  785. package/dist/swarm/index.js +2 -2
  786. package/dist/swarm/index.js.map +1 -1
  787. package/dist/swarm/json-output-aggregator.d.ts.map +1 -1
  788. package/dist/swarm/json-output-aggregator.js +20 -19
  789. package/dist/swarm/json-output-aggregator.js.map +1 -1
  790. package/dist/swarm/memory.d.ts.map +1 -1
  791. package/dist/swarm/memory.js +67 -67
  792. package/dist/swarm/memory.js.map +1 -1
  793. package/dist/swarm/optimizations/async-file-manager.d.ts +4 -0
  794. package/dist/swarm/optimizations/async-file-manager.d.ts.map +1 -1
  795. package/dist/swarm/optimizations/async-file-manager.js +19 -23
  796. package/dist/swarm/optimizations/async-file-manager.js.map +1 -1
  797. package/dist/swarm/optimizations/circular-buffer.d.ts.map +1 -1
  798. package/dist/swarm/optimizations/circular-buffer.js +2 -4
  799. package/dist/swarm/optimizations/circular-buffer.js.map +1 -1
  800. package/dist/swarm/optimizations/connection-pool.d.ts.map +1 -1
  801. package/dist/swarm/optimizations/connection-pool.js +12 -13
  802. package/dist/swarm/optimizations/connection-pool.js.map +1 -1
  803. package/dist/swarm/optimizations/index.js +2 -2
  804. package/dist/swarm/optimizations/optimized-executor.d.ts.map +1 -1
  805. package/dist/swarm/optimizations/optimized-executor.js +23 -29
  806. package/dist/swarm/optimizations/optimized-executor.js.map +1 -1
  807. package/dist/swarm/optimizations/ttl-map.d.ts.map +1 -1
  808. package/dist/swarm/optimizations/ttl-map.js +4 -4
  809. package/dist/swarm/optimizations/ttl-map.js.map +1 -1
  810. package/dist/swarm/prompt-cli.d.ts.map +1 -1
  811. package/dist/swarm/prompt-cli.js +18 -13
  812. package/dist/swarm/prompt-cli.js.map +1 -1
  813. package/dist/swarm/prompt-copier-enhanced.d.ts.map +1 -1
  814. package/dist/swarm/prompt-copier-enhanced.js +12 -12
  815. package/dist/swarm/prompt-copier-enhanced.js.map +1 -1
  816. package/dist/swarm/prompt-copier.d.ts.map +1 -1
  817. package/dist/swarm/prompt-copier.js +15 -18
  818. package/dist/swarm/prompt-copier.js.map +1 -1
  819. package/dist/swarm/prompt-manager.d.ts.map +1 -1
  820. package/dist/swarm/prompt-manager.js +27 -21
  821. package/dist/swarm/prompt-manager.js.map +1 -1
  822. package/dist/swarm/prompt-utils.d.ts.map +1 -1
  823. package/dist/swarm/prompt-utils.js +34 -32
  824. package/dist/swarm/prompt-utils.js.map +1 -1
  825. package/dist/swarm/sparc-executor.d.ts.map +1 -1
  826. package/dist/swarm/sparc-executor.js +189 -123
  827. package/dist/swarm/sparc-executor.js.map +1 -1
  828. package/dist/swarm/strategies/auto.d.ts.map +1 -1
  829. package/dist/swarm/strategies/auto.js +105 -86
  830. package/dist/swarm/strategies/auto.js.map +1 -1
  831. package/dist/swarm/strategies/base.d.ts.map +1 -1
  832. package/dist/swarm/strategies/base.js +14 -11
  833. package/dist/swarm/strategies/base.js.map +1 -1
  834. package/dist/swarm/strategies/research.d.ts.map +1 -1
  835. package/dist/swarm/strategies/research.js +76 -71
  836. package/dist/swarm/strategies/research.js.map +1 -1
  837. package/dist/swarm/types.d.ts.map +1 -1
  838. package/dist/swarm/types.js +3 -0
  839. package/dist/swarm/types.js.map +1 -1
  840. package/dist/swarm/workers/copy-worker.js +4 -4
  841. package/dist/swarm/workers/copy-worker.js.map +1 -1
  842. package/dist/task/commands.d.ts.map +1 -1
  843. package/dist/task/commands.js +11 -7
  844. package/dist/task/commands.js.map +1 -1
  845. package/dist/task/coordination.d.ts.map +1 -1
  846. package/dist/task/coordination.js +75 -70
  847. package/dist/task/coordination.js.map +1 -1
  848. package/dist/task/engine.d.ts.map +1 -1
  849. package/dist/task/engine.js +34 -32
  850. package/dist/task/engine.js.map +1 -1
  851. package/dist/task/index.d.ts +3 -3
  852. package/dist/task/index.d.ts.map +1 -1
  853. package/dist/task/index.js +11 -11
  854. package/dist/task/index.js.map +1 -1
  855. package/dist/terminal/adapters/native.d.ts.map +1 -1
  856. package/dist/terminal/adapters/native.js +6 -6
  857. package/dist/terminal/adapters/native.js.map +1 -1
  858. package/dist/terminal/adapters/vscode.d.ts +3 -0
  859. package/dist/terminal/adapters/vscode.d.ts.map +1 -1
  860. package/dist/terminal/adapters/vscode.js +6 -4
  861. package/dist/terminal/adapters/vscode.js.map +1 -1
  862. package/dist/terminal/manager.d.ts.map +1 -1
  863. package/dist/terminal/manager.js +6 -8
  864. package/dist/terminal/manager.js.map +1 -1
  865. package/dist/terminal/pool.d.ts.map +1 -1
  866. package/dist/terminal/pool.js +3 -0
  867. package/dist/terminal/pool.js.map +1 -1
  868. package/dist/terminal/session.d.ts.map +1 -1
  869. package/dist/terminal/session.js +6 -2
  870. package/dist/terminal/session.js.map +1 -1
  871. package/dist/ui/hive-dashboard.d.ts.map +1 -1
  872. package/dist/ui/hive-dashboard.js +52 -33
  873. package/dist/ui/hive-dashboard.js.map +1 -1
  874. package/dist/utils/error-handler.d.ts.map +1 -1
  875. package/dist/utils/error-handler.js +1 -1
  876. package/dist/utils/error-handler.js.map +1 -1
  877. package/dist/utils/errors.d.ts.map +1 -1
  878. package/dist/utils/errors.js.map +1 -1
  879. package/dist/utils/helpers.d.ts +3 -0
  880. package/dist/utils/helpers.d.ts.map +1 -1
  881. package/dist/utils/helpers.js +5 -8
  882. package/dist/utils/helpers.js.map +1 -1
  883. package/dist/utils/npx-isolated-cache.js +3 -3
  884. package/dist/utils/npx-isolated-cache.js.map +1 -1
  885. package/dist/utils/paths.d.ts.map +1 -1
  886. package/dist/utils/paths.js +8 -4
  887. package/dist/utils/paths.js.map +1 -1
  888. package/dist/utils/type-guards.d.ts +1 -1
  889. package/dist/utils/type-guards.d.ts.map +1 -1
  890. package/dist/utils/type-guards.js +11 -10
  891. package/dist/utils/type-guards.js.map +1 -1
  892. package/package.json +7 -6
  893. package/src/adapters/cliffy-node.ts +27 -22
  894. package/src/agents/agent-manager.ts +145 -121
  895. package/src/agents/agent-registry.ts +77 -70
  896. package/src/api/claude-client.ts +59 -38
  897. package/src/api/routes/analysis.js +750 -735
  898. package/src/cli/__tests__/command-registry.test.js +42 -32
  899. package/src/cli/__tests__/simple-cli.test.js +42 -37
  900. package/src/cli/__tests__/utils.test.js +9 -9
  901. package/src/cli/agents/README.md +30 -4
  902. package/src/cli/agents/analyst.ts +161 -163
  903. package/src/cli/agents/architect.ts +126 -131
  904. package/src/cli/agents/base-agent.ts +48 -47
  905. package/src/cli/agents/capabilities.ts +87 -85
  906. package/src/cli/agents/coder.ts +127 -120
  907. package/src/cli/agents/coordinator.ts +72 -72
  908. package/src/cli/agents/hive-agents.ts +96 -70
  909. package/src/cli/agents/index.ts +70 -55
  910. package/src/cli/agents/researcher.ts +63 -74
  911. package/src/cli/agents/tester.ts +91 -98
  912. package/src/cli/cli-core.ts +56 -47
  913. package/src/cli/command-registry.js +82 -83
  914. package/src/cli/commands/advanced-memory-commands.ts +210 -142
  915. package/src/cli/commands/agent-simple.ts +146 -114
  916. package/src/cli/commands/agent.ts +119 -95
  917. package/src/cli/commands/claude-api.ts +19 -15
  918. package/src/cli/commands/claude.ts +96 -88
  919. package/src/cli/commands/config-integration.ts +120 -101
  920. package/src/cli/commands/config.ts +10 -8
  921. package/src/cli/commands/enterprise.ts +323 -187
  922. package/src/cli/commands/help-new.ts +57 -55
  923. package/src/cli/commands/help.ts +162 -159
  924. package/src/cli/commands/hive-mind/index.ts +3 -3
  925. package/src/cli/commands/hive-mind/init.ts +19 -12
  926. package/src/cli/commands/hive-mind/optimize-memory.ts +83 -53
  927. package/src/cli/commands/hive-mind/pause.ts +27 -25
  928. package/src/cli/commands/hive-mind/ps.ts +43 -37
  929. package/src/cli/commands/hive-mind/resume.ts +26 -26
  930. package/src/cli/commands/hive-mind/spawn.ts +37 -29
  931. package/src/cli/commands/hive-mind/status.ts +51 -51
  932. package/src/cli/commands/hive-mind/stop.ts +56 -51
  933. package/src/cli/commands/hive-mind/task.ts +65 -54
  934. package/src/cli/commands/hive-mind/wizard.ts +181 -167
  935. package/src/cli/commands/hive.ts +136 -96
  936. package/src/cli/commands/hook-types.ts +2 -2
  937. package/src/cli/commands/hook-validator.ts +8 -4
  938. package/src/cli/commands/hook.ts +44 -42
  939. package/src/cli/commands/index.ts +1162 -1031
  940. package/src/cli/commands/mcp.ts +105 -94
  941. package/src/cli/commands/memory.ts +24 -21
  942. package/src/cli/commands/migrate.ts +24 -24
  943. package/src/cli/commands/monitor.ts +123 -93
  944. package/src/cli/commands/ruv-swarm.ts +131 -122
  945. package/src/cli/commands/session.ts +60 -45
  946. package/src/cli/commands/sparc.ts +170 -139
  947. package/src/cli/commands/start/event-emitter.ts +2 -2
  948. package/src/cli/commands/start/index.ts +1 -1
  949. package/src/cli/commands/start/process-manager.ts +30 -47
  950. package/src/cli/commands/start/process-ui-simple.ts +60 -49
  951. package/src/cli/commands/start/process-ui.ts +1 -1
  952. package/src/cli/commands/start/start-command.ts +104 -75
  953. package/src/cli/commands/start/system-monitor.ts +35 -41
  954. package/src/cli/commands/start/types.ts +3 -3
  955. package/src/cli/commands/start.ts +1 -1
  956. package/src/cli/commands/status.ts +67 -67
  957. package/src/cli/commands/swarm-spawn.ts +21 -12
  958. package/src/cli/commands/swarm.ts +221 -150
  959. package/src/cli/commands/task.ts +55 -55
  960. package/src/cli/commands/workflow.ts +174 -157
  961. package/src/cli/completion.ts +34 -19
  962. package/src/cli/create-enhanced-task.js +49 -17
  963. package/src/cli/formatter.ts +38 -37
  964. package/src/cli/help-formatter.js +23 -33
  965. package/src/cli/help-formatter.ts +24 -34
  966. package/src/cli/help-text.js +69 -60
  967. package/src/cli/index-remote.ts +12 -9
  968. package/src/cli/index.ts +77 -67
  969. package/src/cli/init/batch-tools.ts +4 -5
  970. package/src/cli/init/claude-config.ts +125 -118
  971. package/src/cli/init/directory-structure.ts +10 -11
  972. package/src/cli/init/index.ts +13 -13
  973. package/src/cli/init/sparc-environment.ts +90 -74
  974. package/src/cli/init/swarm-commands.ts +5 -6
  975. package/src/cli/init/utils.ts +1 -1
  976. package/src/cli/main.ts +9 -10
  977. package/src/cli/node-compat.js +26 -19
  978. package/src/cli/node-repl.ts +104 -87
  979. package/src/cli/repl.ts +190 -158
  980. package/src/cli/runtime-detector.js +24 -19
  981. package/src/cli/simple-cli.js +460 -385
  982. package/src/cli/simple-cli.ts +426 -366
  983. package/src/cli/simple-commands/__tests__/agent.test.js +49 -55
  984. package/src/cli/simple-commands/__tests__/memory.test.js +4 -401
  985. package/src/cli/simple-commands/__tests__/swarm.test.js +49 -55
  986. package/src/cli/simple-commands/__tests__/task.test.js +4 -478
  987. package/src/cli/simple-commands/agent.js +27 -27
  988. package/src/cli/simple-commands/analysis.js +179 -161
  989. package/src/cli/simple-commands/automation.js +226 -205
  990. package/src/cli/simple-commands/batch-manager.js +98 -88
  991. package/src/cli/simple-commands/config.js +65 -60
  992. package/src/cli/simple-commands/coordination.js +197 -185
  993. package/src/cli/simple-commands/enhanced-ui-views.js +142 -115
  994. package/src/cli/simple-commands/enhanced-webui-complete.js +267 -167
  995. package/src/cli/simple-commands/fix-hook-variables.js +73 -67
  996. package/src/cli/simple-commands/github/gh-coordinator.js +63 -53
  997. package/src/cli/simple-commands/github/github-api.js +45 -47
  998. package/src/cli/simple-commands/github.js +33 -34
  999. package/src/cli/simple-commands/hive-mind/auto-save-middleware.js +44 -40
  1000. package/src/cli/simple-commands/hive-mind/communication.js +198 -185
  1001. package/src/cli/simple-commands/hive-mind/core.js +289 -304
  1002. package/src/cli/simple-commands/hive-mind/db-optimizer.js +278 -168
  1003. package/src/cli/simple-commands/hive-mind/mcp-wrapper.js +352 -258
  1004. package/src/cli/simple-commands/hive-mind/memory.js +356 -287
  1005. package/src/cli/simple-commands/hive-mind/performance-optimizer.js +88 -79
  1006. package/src/cli/simple-commands/hive-mind/performance-test.js +61 -49
  1007. package/src/cli/simple-commands/hive-mind/queen.js +223 -213
  1008. package/src/cli/simple-commands/hive-mind/session-manager.js +217 -157
  1009. package/src/cli/simple-commands/hive-mind-optimize.js +69 -65
  1010. package/src/cli/simple-commands/hive-mind-wizard.js +213 -211
  1011. package/src/cli/simple-commands/hive-mind.js +598 -432
  1012. package/src/cli/simple-commands/hive.js +12 -12
  1013. package/src/cli/simple-commands/hook-safety.js +114 -111
  1014. package/src/cli/simple-commands/hooks.js +1077 -1017
  1015. package/src/cli/simple-commands/init/README.md +8 -1
  1016. package/src/cli/simple-commands/init/VALIDATION_ROLLBACK.md +27 -1
  1017. package/src/cli/simple-commands/init/batch-init.js +105 -100
  1018. package/src/cli/simple-commands/init/claude-commands/claude-flow-commands.js +6 -6
  1019. package/src/cli/simple-commands/init/claude-commands/optimized-claude-flow-commands.js +6 -6
  1020. package/src/cli/simple-commands/init/claude-commands/optimized-slash-commands.js +20 -18
  1021. package/src/cli/simple-commands/init/claude-commands/optimized-sparc-commands.js +85 -71
  1022. package/src/cli/simple-commands/init/claude-commands/slash-commands.js +6 -7
  1023. package/src/cli/simple-commands/init/claude-commands/sparc-commands.js +42 -33
  1024. package/src/cli/simple-commands/init/executable-wrapper.js +13 -10
  1025. package/src/cli/simple-commands/init/gitignore-updater.js +22 -22
  1026. package/src/cli/simple-commands/init/help.js +4 -2
  1027. package/src/cli/simple-commands/init/index.js +405 -303
  1028. package/src/cli/simple-commands/init/performance-monitor.js +71 -64
  1029. package/src/cli/simple-commands/init/rollback/backup-manager.js +44 -64
  1030. package/src/cli/simple-commands/init/rollback/index.js +31 -39
  1031. package/src/cli/simple-commands/init/rollback/recovery-manager.js +71 -101
  1032. package/src/cli/simple-commands/init/rollback/rollback-executor.js +34 -53
  1033. package/src/cli/simple-commands/init/rollback/state-tracker.js +38 -49
  1034. package/src/cli/simple-commands/init/sparc/roo-readme.js +1 -1
  1035. package/src/cli/simple-commands/init/sparc/roomodes-config.js +99 -77
  1036. package/src/cli/simple-commands/init/sparc/workflows.js +37 -33
  1037. package/src/cli/simple-commands/init/sparc-structure.js +9 -10
  1038. package/src/cli/simple-commands/init/templates/CLAUDE.md +94 -26
  1039. package/src/cli/simple-commands/init/templates/claude-flow-universal +9 -7
  1040. package/src/cli/simple-commands/init/templates/claude-md.js +1 -1
  1041. package/src/cli/simple-commands/init/templates/commands/analysis/bottleneck-detect.md +15 -3
  1042. package/src/cli/simple-commands/init/templates/commands/automation/auto-agent.md +12 -2
  1043. package/src/cli/simple-commands/init/templates/commands/coordination/swarm-init.md +10 -1
  1044. package/src/cli/simple-commands/init/templates/commands/github/github-swarm.md +18 -5
  1045. package/src/cli/simple-commands/init/templates/commands/hooks/notification.md +12 -1
  1046. package/src/cli/simple-commands/init/templates/commands/hooks/post-command.md +12 -1
  1047. package/src/cli/simple-commands/init/templates/commands/hooks/post-edit.md +12 -1
  1048. package/src/cli/simple-commands/init/templates/commands/hooks/post-task.md +12 -1
  1049. package/src/cli/simple-commands/init/templates/commands/hooks/pre-command.md +12 -1
  1050. package/src/cli/simple-commands/init/templates/commands/hooks/pre-edit.md +12 -1
  1051. package/src/cli/simple-commands/init/templates/commands/hooks/pre-search.md +13 -6
  1052. package/src/cli/simple-commands/init/templates/commands/hooks/pre-task.md +12 -1
  1053. package/src/cli/simple-commands/init/templates/commands/hooks/session-end.md +12 -1
  1054. package/src/cli/simple-commands/init/templates/commands/hooks/session-restore.md +13 -5
  1055. package/src/cli/simple-commands/init/templates/commands/hooks/session-start.md +12 -1
  1056. package/src/cli/simple-commands/init/templates/coordination-md.js +1 -1
  1057. package/src/cli/simple-commands/init/templates/enhanced-templates.js +116 -113
  1058. package/src/cli/simple-commands/init/templates/memory-bank-md.js +1 -1
  1059. package/src/cli/simple-commands/init/templates/readme-files.js +1 -1
  1060. package/src/cli/simple-commands/init/templates/safe-hook-patterns.js +176 -127
  1061. package/src/cli/simple-commands/init/templates/settings.json +2 -5
  1062. package/src/cli/simple-commands/init/templates/sparc-modes.js +3 -3
  1063. package/src/cli/simple-commands/init/validation/config-validator.js +17 -28
  1064. package/src/cli/simple-commands/init/validation/health-checker.js +54 -62
  1065. package/src/cli/simple-commands/init/validation/index.js +18 -23
  1066. package/src/cli/simple-commands/init/validation/mode-validator.js +22 -32
  1067. package/src/cli/simple-commands/init/validation/post-init-validator.js +25 -26
  1068. package/src/cli/simple-commands/init/validation/pre-init-validator.js +32 -36
  1069. package/src/cli/simple-commands/init/validation/test-runner.js +55 -63
  1070. package/src/cli/simple-commands/init.js +1 -1
  1071. package/src/cli/simple-commands/mcp-integration-layer.js +179 -110
  1072. package/src/cli/simple-commands/mcp.js +55 -48
  1073. package/src/cli/simple-commands/memory.js +62 -56
  1074. package/src/cli/simple-commands/migrate-hooks.js +9 -10
  1075. package/src/cli/simple-commands/monitor.js +87 -67
  1076. package/src/cli/simple-commands/process-ui-enhanced.js +207 -155
  1077. package/src/cli/simple-commands/process-ui.js +65 -56
  1078. package/src/cli/simple-commands/realtime-update-system.js +136 -129
  1079. package/src/cli/simple-commands/sparc/architecture.js +352 -251
  1080. package/src/cli/simple-commands/sparc/commands.js +122 -94
  1081. package/src/cli/simple-commands/sparc/completion.js +274 -199
  1082. package/src/cli/simple-commands/sparc/coordinator.js +217 -169
  1083. package/src/cli/simple-commands/sparc/index.js +40 -36
  1084. package/src/cli/simple-commands/sparc/phase-base.js +72 -58
  1085. package/src/cli/simple-commands/sparc/pseudocode.js +275 -159
  1086. package/src/cli/simple-commands/sparc/refinement.js +306 -212
  1087. package/src/cli/simple-commands/sparc/specification.js +164 -94
  1088. package/src/cli/simple-commands/sparc-modes/architect.js +1 -1
  1089. package/src/cli/simple-commands/sparc-modes/ask.js +1 -1
  1090. package/src/cli/simple-commands/sparc-modes/code.js +1 -1
  1091. package/src/cli/simple-commands/sparc-modes/debug.js +1 -1
  1092. package/src/cli/simple-commands/sparc-modes/devops.js +1 -1
  1093. package/src/cli/simple-commands/sparc-modes/docs-writer.js +1 -1
  1094. package/src/cli/simple-commands/sparc-modes/generic.js +1 -1
  1095. package/src/cli/simple-commands/sparc-modes/index.js +15 -15
  1096. package/src/cli/simple-commands/sparc-modes/integration.js +1 -1
  1097. package/src/cli/simple-commands/sparc-modes/mcp.js +1 -1
  1098. package/src/cli/simple-commands/sparc-modes/monitoring.js +1 -1
  1099. package/src/cli/simple-commands/sparc-modes/optimization.js +1 -1
  1100. package/src/cli/simple-commands/sparc-modes/security-review.js +1 -1
  1101. package/src/cli/simple-commands/sparc-modes/sparc-orchestrator.js +1 -1
  1102. package/src/cli/simple-commands/sparc-modes/spec-pseudocode.js +1 -1
  1103. package/src/cli/simple-commands/sparc-modes/supabase-admin.js +1 -1
  1104. package/src/cli/simple-commands/sparc-modes/swarm.js +52 -52
  1105. package/src/cli/simple-commands/sparc-modes/tdd.js +1 -1
  1106. package/src/cli/simple-commands/sparc-modes/tutorial.js +1 -1
  1107. package/src/cli/simple-commands/sparc.js +87 -69
  1108. package/src/cli/simple-commands/start-ui.js +21 -20
  1109. package/src/cli/simple-commands/start-wrapper.js +29 -31
  1110. package/src/cli/simple-commands/start.js +1 -1
  1111. package/src/cli/simple-commands/status.js +53 -47
  1112. package/src/cli/simple-commands/swarm-executor.js +47 -57
  1113. package/src/cli/simple-commands/swarm-metrics-integration.js +119 -79
  1114. package/src/cli/simple-commands/swarm-ui.js +120 -118
  1115. package/src/cli/simple-commands/swarm-webui-integration.js +48 -27
  1116. package/src/cli/simple-commands/swarm.js +216 -181
  1117. package/src/cli/simple-commands/task.js +29 -29
  1118. package/src/cli/simple-commands/timestamp-fix.js +28 -25
  1119. package/src/cli/simple-commands/tool-execution-framework.js +115 -118
  1120. package/src/cli/simple-commands/training.js +219 -194
  1121. package/src/cli/simple-commands/web-server.js +118 -117
  1122. package/src/cli/simple-commands/webui-validator.js +4 -3
  1123. package/src/cli/simple-mcp.ts +14 -17
  1124. package/src/cli/simple-orchestrator.ts +113 -101
  1125. package/src/cli/swarm-standalone.js +20 -21
  1126. package/src/cli/ui/compatible-ui.ts +55 -44
  1127. package/src/cli/ui/fallback-handler.ts +19 -16
  1128. package/src/cli/ui/index.ts +14 -15
  1129. package/src/cli/utils/environment-detector.ts +75 -67
  1130. package/src/cli/utils/interactive-detector.js +17 -11
  1131. package/src/cli/utils/prompt-defaults.ts +32 -28
  1132. package/src/cli/utils/safe-interactive.js +21 -20
  1133. package/src/cli/utils.js +127 -110
  1134. package/src/cli/validation-helper.js +16 -21
  1135. package/src/cli/validation-helper.ts +21 -34
  1136. package/src/communication/message-bus.ts +137 -124
  1137. package/src/config/config-manager.ts +62 -30
  1138. package/src/config/ruv-swarm-config.ts +105 -86
  1139. package/src/config/ruv-swarm-integration.ts +38 -38
  1140. package/src/constants/agent-types.ts +9 -8
  1141. package/src/coordination/README.md +54 -31
  1142. package/src/coordination/advanced-scheduler.ts +23 -26
  1143. package/src/coordination/advanced-task-executor.ts +74 -68
  1144. package/src/coordination/background-executor.ts +33 -30
  1145. package/src/coordination/circuit-breaker.ts +26 -27
  1146. package/src/coordination/conflict-resolution.ts +18 -27
  1147. package/src/coordination/dependency-graph.ts +15 -18
  1148. package/src/coordination/hive-orchestrator.ts +111 -81
  1149. package/src/coordination/hive-protocol.ts +68 -77
  1150. package/src/coordination/index.ts +3 -7
  1151. package/src/coordination/load-balancer.ts +115 -105
  1152. package/src/coordination/manager.ts +38 -51
  1153. package/src/coordination/messaging.ts +19 -29
  1154. package/src/coordination/metrics.ts +57 -60
  1155. package/src/coordination/resources.ts +32 -37
  1156. package/src/coordination/scheduler.ts +29 -30
  1157. package/src/coordination/swarm-coordinator.ts +81 -70
  1158. package/src/coordination/swarm-monitor.ts +90 -69
  1159. package/src/coordination/work-stealing.ts +6 -13
  1160. package/src/core/config.ts +148 -143
  1161. package/src/core/event-bus.ts +5 -6
  1162. package/src/core/json-persistence.ts +27 -34
  1163. package/src/core/logger.ts +13 -16
  1164. package/src/core/orchestrator-fixed.ts +33 -32
  1165. package/src/core/orchestrator.ts +166 -159
  1166. package/src/core/persistence.ts +47 -36
  1167. package/src/enterprise/analytics-manager.ts +242 -233
  1168. package/src/enterprise/audit-manager.ts +238 -184
  1169. package/src/enterprise/cloud-manager.ts +167 -151
  1170. package/src/enterprise/deployment-manager.ts +223 -180
  1171. package/src/enterprise/index.ts +7 -7
  1172. package/src/enterprise/project-manager.ts +151 -133
  1173. package/src/enterprise/security-manager.ts +278 -223
  1174. package/src/hive-mind/core/Agent.ts +112 -109
  1175. package/src/hive-mind/core/Communication.ts +67 -69
  1176. package/src/hive-mind/core/DatabaseManager.ts +299 -166
  1177. package/src/hive-mind/core/HiveMind.ts +100 -96
  1178. package/src/hive-mind/core/Memory.ts +304 -295
  1179. package/src/hive-mind/core/MemoryMonitor.ts +46 -47
  1180. package/src/hive-mind/core/Queen.ts +187 -114
  1181. package/src/hive-mind/index.ts +2 -2
  1182. package/src/hive-mind/integration/ConsensusEngine.ts +88 -92
  1183. package/src/hive-mind/integration/MCPToolWrapper.ts +20 -72
  1184. package/src/hive-mind/integration/SwarmOrchestrator.ts +173 -165
  1185. package/src/hive-mind/types.ts +24 -12
  1186. package/src/integration/mock-components.ts +42 -30
  1187. package/src/integration/system-integration.ts +79 -78
  1188. package/src/integration/types.ts +7 -7
  1189. package/src/mcp/README.md +23 -4
  1190. package/src/mcp/auth.ts +25 -18
  1191. package/src/mcp/claude-code-wrapper.ts +257 -150
  1192. package/src/mcp/claude-flow-tools.ts +52 -13
  1193. package/src/mcp/client.ts +15 -13
  1194. package/src/mcp/index.ts +22 -27
  1195. package/src/mcp/integrate-wrapper.ts +18 -18
  1196. package/src/mcp/lifecycle-manager.ts +30 -27
  1197. package/src/mcp/load-balancer.ts +10 -11
  1198. package/src/mcp/mcp-server.js +662 -351
  1199. package/src/mcp/orchestration-integration.ts +32 -17
  1200. package/src/mcp/performance-monitor.ts +65 -51
  1201. package/src/mcp/protocol-manager.ts +36 -52
  1202. package/src/mcp/recovery/connection-health-monitor.ts +40 -35
  1203. package/src/mcp/recovery/connection-state-manager.ts +52 -50
  1204. package/src/mcp/recovery/fallback-coordinator.ts +24 -24
  1205. package/src/mcp/recovery/index.ts +23 -4
  1206. package/src/mcp/recovery/reconnection-manager.ts +14 -15
  1207. package/src/mcp/recovery/recovery-manager.ts +52 -68
  1208. package/src/mcp/router.ts +1 -2
  1209. package/src/mcp/ruv-swarm-tools.ts +167 -138
  1210. package/src/mcp/ruv-swarm-wrapper.js +31 -23
  1211. package/src/mcp/server-with-wrapper.ts +4 -5
  1212. package/src/mcp/server-wrapper-mode.ts +5 -6
  1213. package/src/mcp/server.ts +45 -40
  1214. package/src/mcp/session-manager.ts +8 -11
  1215. package/src/mcp/sparc-modes.ts +29 -28
  1216. package/src/mcp/swarm-tools.ts +131 -114
  1217. package/src/mcp/tests/mcp-integration.test.ts +49 -55
  1218. package/src/mcp/tools.ts +53 -38
  1219. package/src/mcp/transports/base.ts +4 -5
  1220. package/src/mcp/transports/http.ts +45 -42
  1221. package/src/mcp/transports/stdio.ts +9 -12
  1222. package/src/memory/README.md +37 -27
  1223. package/src/memory/advanced-memory-manager.ts +336 -279
  1224. package/src/memory/backends/base.ts +4 -5
  1225. package/src/memory/backends/markdown.ts +16 -22
  1226. package/src/memory/backends/sqlite.ts +19 -15
  1227. package/src/memory/cache.ts +18 -18
  1228. package/src/memory/distributed-memory.ts +84 -92
  1229. package/src/memory/enhanced-examples.js +68 -59
  1230. package/src/memory/enhanced-memory.js +99 -80
  1231. package/src/memory/fallback-store.js +16 -7
  1232. package/src/memory/in-memory-store.js +31 -27
  1233. package/src/memory/index.js +4 -4
  1234. package/src/memory/indexer.ts +6 -10
  1235. package/src/memory/manager.ts +45 -59
  1236. package/src/memory/migration.js +107 -90
  1237. package/src/memory/shared-memory.js +155 -157
  1238. package/src/memory/sqlite-store.js +76 -59
  1239. package/src/memory/swarm-memory.js +138 -131
  1240. package/src/memory/swarm-memory.ts +74 -75
  1241. package/src/memory/test-example.js +28 -30
  1242. package/src/migration/README.md +25 -9
  1243. package/src/migration/index.ts +13 -14
  1244. package/src/migration/logger.ts +9 -7
  1245. package/src/migration/migration-analyzer.ts +66 -52
  1246. package/src/migration/migration-manifest.json +2 -6
  1247. package/src/migration/migration-runner.ts +86 -63
  1248. package/src/migration/migration-validator.ts +93 -68
  1249. package/src/migration/package.json +1 -1
  1250. package/src/migration/progress-reporter.ts +25 -21
  1251. package/src/migration/rollback-manager.ts +79 -63
  1252. package/src/migration/tests/migration-system.test.ts +4 -491
  1253. package/src/migration/tsconfig.json +3 -10
  1254. package/src/migration/types.ts +1 -1
  1255. package/src/monitoring/diagnostics.ts +123 -97
  1256. package/src/monitoring/health-check.ts +45 -51
  1257. package/src/monitoring/real-time-monitor.ts +105 -92
  1258. package/src/resources/resource-manager.ts +205 -159
  1259. package/src/swarm/__tests__/integration.test.ts +59 -65
  1260. package/src/swarm/__tests__/prompt-copier.test.ts +27 -27
  1261. package/src/swarm/claude-flow-executor.ts +50 -49
  1262. package/src/swarm/coordinator.ts +727 -635
  1263. package/src/swarm/direct-executor.ts +80 -86
  1264. package/src/swarm/executor-v2.ts +81 -66
  1265. package/src/swarm/executor.ts +124 -124
  1266. package/src/swarm/index.ts +7 -8
  1267. package/src/swarm/json-output-aggregator.ts +56 -40
  1268. package/src/swarm/memory.ts +152 -147
  1269. package/src/swarm/optimizations/README.md +20 -12
  1270. package/src/swarm/optimizations/__tests__/optimization.test.ts +84 -87
  1271. package/src/swarm/optimizations/async-file-manager.ts +70 -80
  1272. package/src/swarm/optimizations/circular-buffer.ts +37 -37
  1273. package/src/swarm/optimizations/connection-pool.ts +64 -64
  1274. package/src/swarm/optimizations/index.ts +4 -4
  1275. package/src/swarm/optimizations/migration-guide.md +27 -16
  1276. package/src/swarm/optimizations/optimized-executor.ts +104 -114
  1277. package/src/swarm/optimizations/ttl-map.ts +66 -63
  1278. package/src/swarm/prompt-cli.ts +48 -42
  1279. package/src/swarm/prompt-copier-enhanced.ts +54 -55
  1280. package/src/swarm/prompt-copier.ts +59 -65
  1281. package/src/swarm/prompt-copying-README.md +49 -33
  1282. package/src/swarm/prompt-manager.ts +69 -63
  1283. package/src/swarm/prompt-utils.ts +71 -66
  1284. package/src/swarm/sparc-executor.ts +298 -225
  1285. package/src/swarm/strategies/auto.ts +367 -252
  1286. package/src/swarm/strategies/base.ts +24 -20
  1287. package/src/swarm/strategies/research.ts +144 -124
  1288. package/src/swarm/types.ts +340 -309
  1289. package/src/swarm/workers/copy-worker.ts +12 -13
  1290. package/src/task/README.md +99 -70
  1291. package/src/task/commands.ts +16 -8
  1292. package/src/task/coordination.ts +209 -162
  1293. package/src/task/engine.ts +81 -65
  1294. package/src/task/index.ts +28 -31
  1295. package/src/templates/claude-optimized/.claude/BATCHTOOLS_BEST_PRACTICES.md +479 -481
  1296. package/src/templates/claude-optimized/.claude/BATCHTOOLS_GUIDE.md +210 -188
  1297. package/src/templates/claude-optimized/.claude/MIGRATION_GUIDE.md +151 -105
  1298. package/src/templates/claude-optimized/.claude/PERFORMANCE_BENCHMARKS.md +102 -87
  1299. package/src/templates/claude-optimized/.claude/commands/claude-flow-help.md +18 -1
  1300. package/src/templates/claude-optimized/.claude/commands/claude-flow-memory.md +17 -1
  1301. package/src/templates/claude-optimized/.claude/commands/claude-flow-swarm.md +21 -1
  1302. package/src/templates/claude-optimized/.claude/commands/sparc/architect.md +11 -4
  1303. package/src/templates/claude-optimized/.claude/commands/sparc/ask.md +16 -10
  1304. package/src/templates/claude-optimized/.claude/commands/sparc/code.md +26 -7
  1305. package/src/templates/claude-optimized/.claude/commands/sparc/debug.md +14 -4
  1306. package/src/templates/claude-optimized/.claude/commands/sparc/devops.md +23 -10
  1307. package/src/templates/claude-optimized/.claude/commands/sparc/docs-writer.md +8 -4
  1308. package/src/templates/claude-optimized/.claude/commands/sparc/integration.md +43 -27
  1309. package/src/templates/claude-optimized/.claude/commands/sparc/mcp.md +15 -1
  1310. package/src/templates/claude-optimized/.claude/commands/sparc/post-deployment-monitoring-mode.md +45 -30
  1311. package/src/templates/claude-optimized/.claude/commands/sparc/refinement-optimization-mode.md +23 -13
  1312. package/src/templates/claude-optimized/.claude/commands/sparc/security-review.md +31 -17
  1313. package/src/templates/claude-optimized/.claude/commands/sparc/sparc.md +54 -47
  1314. package/src/templates/claude-optimized/.claude/commands/sparc/spec-pseudocode.md +27 -17
  1315. package/src/templates/claude-optimized/.claude/commands/sparc/supabase-admin.md +18 -4
  1316. package/src/templates/claude-optimized/.claude/commands/sparc/tdd.md +23 -9
  1317. package/src/templates/claude-optimized/.claude/commands/sparc/tutorial.md +22 -16
  1318. package/src/templates/claude-optimized/.claude/commands/sparc.md +20 -1
  1319. package/src/templates/claude-optimized/README.md +10 -1
  1320. package/src/templates/claude-optimized/SUMMARY.md +23 -1
  1321. package/src/templates/claude-optimized/deploy-to-project.js +22 -10
  1322. package/src/templates/claude-optimized/install-template.js +14 -10
  1323. package/src/templates/claude-optimized/manifest.json +1 -1
  1324. package/src/templates/claude-optimized/package.json +1 -1
  1325. package/src/templates/claude-optimized/template-manager.js +8 -8
  1326. package/src/templates/claude-optimized/validate-template.js +33 -23
  1327. package/src/terminal/adapters/base.ts +1 -1
  1328. package/src/terminal/adapters/native.ts +47 -47
  1329. package/src/terminal/adapters/vscode.ts +21 -28
  1330. package/src/terminal/manager.ts +27 -22
  1331. package/src/terminal/pool.ts +24 -27
  1332. package/src/terminal/session.ts +18 -18
  1333. package/src/terminal/vscode-bridge.ts +21 -21
  1334. package/src/tests/validation-consistency.test.ts +4 -4
  1335. package/src/types/cliffy.d.ts +11 -14
  1336. package/src/types/global.d.ts +1 -2
  1337. package/src/types/index.ts +2 -2
  1338. package/src/types/mcp.d.ts +11 -17
  1339. package/src/types/vscode.d.ts +18 -5
  1340. package/src/ui/console/README-analysis-tools.md +52 -2
  1341. package/src/ui/console/README.md +33 -1
  1342. package/src/ui/console/WORKFLOW_DESIGNER_README.md +81 -22
  1343. package/src/ui/console/analysis-tools.html +282 -261
  1344. package/src/ui/console/analytics.html +329 -326
  1345. package/src/ui/console/index.html +221 -209
  1346. package/src/ui/console/js/analysis-tools.js +815 -754
  1347. package/src/ui/console/js/command-handler.js +226 -196
  1348. package/src/ui/console/js/console.js +117 -119
  1349. package/src/ui/console/js/daa-tools.js +797 -787
  1350. package/src/ui/console/js/memory-interface.js +676 -638
  1351. package/src/ui/console/js/memory-test.js +49 -46
  1352. package/src/ui/console/js/memory-tools.js +181 -159
  1353. package/src/ui/console/js/settings.js +124 -103
  1354. package/src/ui/console/js/terminal-emulator.js +147 -130
  1355. package/src/ui/console/js/websocket-client.js +71 -71
  1356. package/src/ui/console/js/workflow-designer.js +1126 -1110
  1357. package/src/ui/console/neural-networks-demo.md +45 -16
  1358. package/src/ui/console/styles/analysis-tools.css +571 -561
  1359. package/src/ui/console/styles/console.css +16 -12
  1360. package/src/ui/console/styles/daa-tools.css +322 -319
  1361. package/src/ui/console/styles/responsive.css +71 -70
  1362. package/src/ui/console/styles/settings.css +12 -12
  1363. package/src/ui/console/styles/workflow-designer.css +628 -584
  1364. package/src/ui/console/test-neural-networks.js +59 -54
  1365. package/src/ui/console/test-neural.html +194 -196
  1366. package/src/ui/console/workflow-designer-demo.html +433 -424
  1367. package/src/ui/hive-dashboard.ts +74 -52
  1368. package/src/ui/web-ui/EnhancedProcessUI.js +570 -424
  1369. package/src/ui/web-ui/EnhancedWebUI.js +65 -65
  1370. package/src/ui/web-ui/README.md +16 -16
  1371. package/src/ui/web-ui/components/ComponentLibrary.js +173 -124
  1372. package/src/ui/web-ui/core/EventBus.js +27 -25
  1373. package/src/ui/web-ui/core/MCPIntegrationLayer.js +294 -108
  1374. package/src/ui/web-ui/core/StateManager.js +43 -46
  1375. package/src/ui/web-ui/core/UIManager.js +120 -70
  1376. package/src/ui/web-ui/core/ViewManager.js +16 -19
  1377. package/src/ui/web-ui/index.js +101 -48
  1378. package/src/ui/web-ui/neural-panel-test.js +109 -108
  1379. package/src/ui/web-ui/test-github-view.js +11 -12
  1380. package/src/ui/web-ui/test-neural-panel.html +219 -205
  1381. package/src/ui/web-ui/views/DAAView.js +88 -85
  1382. package/src/ui/web-ui/views/GitHubIntegrationTest.js +42 -42
  1383. package/src/ui/web-ui/views/GitHubIntegrationView.js +59 -53
  1384. package/src/ui/web-ui/views/NeuralNetworkView.js +20 -21
  1385. package/src/ui/web-ui/views/WorkflowAutomationView.js +31 -32
  1386. package/src/utils/error-handler.js +1 -1
  1387. package/src/utils/error-handler.ts +9 -5
  1388. package/src/utils/errors.ts +20 -18
  1389. package/src/utils/formatters.ts +6 -6
  1390. package/src/utils/helpers.ts +53 -55
  1391. package/src/utils/npx-isolated-cache.js +16 -16
  1392. package/src/utils/paths.ts +9 -6
  1393. package/src/utils/timezone-utils.js +16 -16
  1394. package/src/utils/type-guards.ts +37 -26
  1395. package/src/utils/types.ts +2 -2
@@ -12,8 +12,17 @@ import inquirer from 'inquirer';
12
12
  import chalk from 'chalk';
13
13
  import ora from 'ora';
14
14
  import { args, cwd, exit, writeTextFile, readTextFile, mkdirAsync } from '../node-compat.js';
15
- import { isInteractive, isRawModeSupported, warnNonInteractive, checkNonInteractiveAuth } from '../utils/interactive-detector.js';
16
- import { safeInteractive, nonInteractiveProgress, nonInteractiveSelect } from '../utils/safe-interactive.js';
15
+ import {
16
+ isInteractive,
17
+ isRawModeSupported,
18
+ warnNonInteractive,
19
+ checkNonInteractiveAuth,
20
+ } from '../utils/interactive-detector.js';
21
+ import {
22
+ safeInteractive,
23
+ nonInteractiveProgress,
24
+ nonInteractiveSelect,
25
+ } from '../utils/safe-interactive.js';
17
26
 
18
27
  // Import SQLite for persistence
19
28
  import Database from 'better-sqlite3';
@@ -111,18 +120,18 @@ ${chalk.blue('https://github.com/ruvnet/claude-flow/tree/main/docs/hive-mind')}
111
120
  */
112
121
  async function initHiveMind(flags) {
113
122
  const spinner = ora('Initializing Hive Mind system...').start();
114
-
123
+
115
124
  try {
116
125
  // Create hive mind directory structure
117
126
  const hiveMindDir = path.join(cwd(), '.hive-mind');
118
127
  if (!existsSync(hiveMindDir)) {
119
128
  mkdirSync(hiveMindDir, { recursive: true });
120
129
  }
121
-
130
+
122
131
  // Initialize SQLite database
123
132
  const dbPath = path.join(hiveMindDir, 'hive.db');
124
133
  const db = new Database(dbPath);
125
-
134
+
126
135
  // Create tables
127
136
  db.exec(`
128
137
  CREATE TABLE IF NOT EXISTS swarms (
@@ -189,9 +198,9 @@ async function initHiveMind(flags) {
189
198
  FOREIGN KEY (swarm_id) REFERENCES swarms(id)
190
199
  );
191
200
  `);
192
-
201
+
193
202
  db.close();
194
-
203
+
195
204
  // Create configuration file
196
205
  const config = {
197
206
  version: '2.0.0',
@@ -202,29 +211,29 @@ async function initHiveMind(flags) {
202
211
  consensusAlgorithm: 'majority',
203
212
  memorySize: 100,
204
213
  autoScale: true,
205
- encryption: false
214
+ encryption: false,
206
215
  },
207
216
  mcpTools: {
208
217
  enabled: true,
209
218
  parallel: true,
210
- timeout: 60000
211
- }
219
+ timeout: 60000,
220
+ },
212
221
  };
213
-
214
- await writeFile(
215
- path.join(hiveMindDir, 'config.json'),
216
- JSON.stringify(config, null, 2)
217
- );
218
-
222
+
223
+ await writeFile(path.join(hiveMindDir, 'config.json'), JSON.stringify(config, null, 2));
224
+
219
225
  spinner.succeed('Hive Mind system initialized successfully!');
220
-
226
+
221
227
  console.log('\n' + chalk.green('āœ“') + ' Created .hive-mind directory');
222
228
  console.log(chalk.green('āœ“') + ' Initialized SQLite database');
223
229
  console.log(chalk.green('āœ“') + ' Created configuration file');
224
230
  console.log('\n' + chalk.yellow('Next steps:'));
225
- console.log(' 1. Run ' + chalk.cyan('claude-flow hive-mind spawn') + ' to create your first swarm');
226
- console.log(' 2. Use ' + chalk.cyan('claude-flow hive-mind wizard') + ' for interactive setup');
227
-
231
+ console.log(
232
+ ' 1. Run ' + chalk.cyan('claude-flow hive-mind spawn') + ' to create your first swarm',
233
+ );
234
+ console.log(
235
+ ' 2. Use ' + chalk.cyan('claude-flow hive-mind wizard') + ' for interactive setup',
236
+ );
228
237
  } catch (error) {
229
238
  spinner.fail('Failed to initialize Hive Mind system');
230
239
  console.error(chalk.red('Error:'), error.message);
@@ -238,9 +247,9 @@ async function initHiveMind(flags) {
238
247
  // Wrapped wizard function that handles non-interactive environments
239
248
  const hiveMindWizard = safeInteractive(
240
249
  // Interactive version
241
- async function(flags = {}) {
250
+ async function (flags = {}) {
242
251
  console.log(chalk.yellow('\nšŸ§™ Hive Mind Interactive Wizard\n'));
243
-
252
+
244
253
  const { action } = await inquirer.prompt([
245
254
  {
246
255
  type: 'list',
@@ -253,11 +262,11 @@ const hiveMindWizard = safeInteractive(
253
262
  { name: 'šŸ¤ View consensus decisions', value: 'consensus' },
254
263
  { name: 'šŸ“ˆ Performance metrics', value: 'metrics' },
255
264
  { name: 'šŸ”§ Configure hive mind', value: 'config' },
256
- { name: 'āŒ Exit', value: 'exit' }
257
- ]
258
- }
265
+ { name: 'āŒ Exit', value: 'exit' },
266
+ ],
267
+ },
259
268
  ]);
260
-
269
+
261
270
  switch (action) {
262
271
  case 'spawn':
263
272
  await spawnSwarmWizard();
@@ -283,9 +292,9 @@ const hiveMindWizard = safeInteractive(
283
292
  }
284
293
  },
285
294
  // Non-interactive fallback
286
- async function(flags = {}) {
295
+ async function (flags = {}) {
287
296
  console.log(chalk.yellow('\nšŸ§™ Hive Mind - Non-Interactive Mode\n'));
288
-
297
+
289
298
  // Default to creating a swarm with sensible defaults
290
299
  console.log(chalk.cyan('Creating new swarm with default settings...'));
291
300
  console.log(chalk.gray('Use command-line flags to customize:'));
@@ -293,7 +302,7 @@ const hiveMindWizard = safeInteractive(
293
302
  console.log(chalk.gray(' --queen-type strategic Set queen type'));
294
303
  console.log(chalk.gray(' --max-workers 8 Set worker count'));
295
304
  console.log();
296
-
305
+
297
306
  const objective = flags.objective || 'General task coordination';
298
307
  const config = {
299
308
  name: flags.name || `swarm-${Date.now()}`,
@@ -301,9 +310,9 @@ const hiveMindWizard = safeInteractive(
301
310
  maxWorkers: parseInt(flags.maxWorkers || flags['max-workers'] || '8'),
302
311
  consensusAlgorithm: flags.consensus || 'majority',
303
312
  autoScale: flags.autoScale || flags['auto-scale'] || false,
304
- encryption: flags.encryption || false
313
+ encryption: flags.encryption || false,
305
314
  };
306
-
315
+
307
316
  await spawnSwarm([objective], {
308
317
  ...flags,
309
318
  name: config.name,
@@ -312,9 +321,9 @@ const hiveMindWizard = safeInteractive(
312
321
  consensusAlgorithm: config.consensusAlgorithm,
313
322
  autoScale: config.autoScale,
314
323
  encryption: config.encryption,
315
- nonInteractive: true
324
+ nonInteractive: true,
316
325
  });
317
- }
326
+ },
318
327
  );
319
328
 
320
329
  /**
@@ -326,13 +335,13 @@ async function spawnSwarmWizard() {
326
335
  type: 'input',
327
336
  name: 'objective',
328
337
  message: 'What is the swarm objective?',
329
- validate: input => input.trim().length > 0 || 'Please enter an objective'
338
+ validate: (input) => input.trim().length > 0 || 'Please enter an objective',
330
339
  },
331
340
  {
332
341
  type: 'input',
333
342
  name: 'name',
334
343
  message: 'Swarm name (optional):',
335
- default: answers => `swarm-${Date.now()}`
344
+ default: (answers) => `swarm-${Date.now()}`,
336
345
  },
337
346
  {
338
347
  type: 'list',
@@ -341,16 +350,16 @@ async function spawnSwarmWizard() {
341
350
  choices: [
342
351
  { name: 'Strategic - High-level planning and coordination', value: 'strategic' },
343
352
  { name: 'Tactical - Detailed task management', value: 'tactical' },
344
- { name: 'Adaptive - Learns and adapts strategies', value: 'adaptive' }
353
+ { name: 'Adaptive - Learns and adapts strategies', value: 'adaptive' },
345
354
  ],
346
- default: 'strategic'
355
+ default: 'strategic',
347
356
  },
348
357
  {
349
358
  type: 'number',
350
359
  name: 'maxWorkers',
351
360
  message: 'Maximum number of worker agents:',
352
361
  default: 8,
353
- validate: input => input > 0 && input <= 20 || 'Please enter a number between 1 and 20'
362
+ validate: (input) => (input > 0 && input <= 20) || 'Please enter a number between 1 and 20',
354
363
  },
355
364
  {
356
365
  type: 'checkbox',
@@ -364,8 +373,8 @@ async function spawnSwarmWizard() {
364
373
  { name: 'Architect', value: 'architect' },
365
374
  { name: 'Reviewer', value: 'reviewer' },
366
375
  { name: 'Optimizer', value: 'optimizer' },
367
- { name: 'Documenter', value: 'documenter' }
368
- ]
376
+ { name: 'Documenter', value: 'documenter' },
377
+ ],
369
378
  },
370
379
  {
371
380
  type: 'list',
@@ -374,24 +383,24 @@ async function spawnSwarmWizard() {
374
383
  choices: [
375
384
  { name: 'Majority - Simple majority voting', value: 'majority' },
376
385
  { name: 'Weighted - Expertise-weighted voting', value: 'weighted' },
377
- { name: 'Byzantine - Fault-tolerant consensus', value: 'byzantine' }
386
+ { name: 'Byzantine - Fault-tolerant consensus', value: 'byzantine' },
378
387
  ],
379
- default: 'majority'
388
+ default: 'majority',
380
389
  },
381
390
  {
382
391
  type: 'confirm',
383
392
  name: 'autoScale',
384
393
  message: 'Enable auto-scaling?',
385
- default: true
394
+ default: true,
386
395
  },
387
396
  {
388
397
  type: 'confirm',
389
398
  name: 'monitor',
390
399
  message: 'Launch monitoring dashboard?',
391
- default: true
392
- }
400
+ default: true,
401
+ },
393
402
  ]);
394
-
403
+
395
404
  // Spawn the swarm with collected parameters
396
405
  await spawnSwarm([answers.objective], {
397
406
  name: answers.name,
@@ -400,7 +409,7 @@ async function spawnSwarmWizard() {
400
409
  workerTypes: answers.workerTypes.join(','),
401
410
  consensus: answers.consensusAlgorithm,
402
411
  autoScale: answers.autoScale,
403
- monitor: answers.monitor
412
+ monitor: answers.monitor,
404
413
  });
405
414
  }
406
415
 
@@ -409,15 +418,15 @@ async function spawnSwarmWizard() {
409
418
  */
410
419
  async function spawnSwarm(args, flags) {
411
420
  const objective = args.join(' ').trim();
412
-
421
+
413
422
  if (!objective && !flags.wizard) {
414
423
  console.error(chalk.red('Error: Please provide an objective or use --wizard flag'));
415
424
  console.log('Example: claude-flow hive-mind spawn "Build REST API"');
416
425
  return;
417
426
  }
418
-
427
+
419
428
  const spinner = ora('Spawning Hive Mind swarm...').start();
420
-
429
+
421
430
  try {
422
431
  // Initialize hive mind core with error handling
423
432
  let hiveMind;
@@ -430,23 +439,23 @@ async function spawnSwarm(args, flags) {
430
439
  maxWorkers: flags.maxWorkers || 8,
431
440
  consensusAlgorithm: flags.consensus || 'majority',
432
441
  autoScale: flags.autoScale !== false,
433
- encryption: flags.encryption || false
442
+ encryption: flags.encryption || false,
434
443
  });
435
444
  } catch (error) {
436
445
  console.error('HiveMindCore initialization failed:', error);
437
446
  throw new Error(`Failed to initialize HiveMindCore: ${error.message}`);
438
447
  }
439
-
448
+
440
449
  spinner.text = 'Setting up database connection...';
441
450
  // Initialize database connection
442
451
  const dbDir = path.join(cwd(), '.hive-mind');
443
452
  const dbPath = path.join(dbDir, 'hive.db');
444
-
453
+
445
454
  // Ensure .hive-mind directory exists
446
455
  if (!existsSync(dbDir)) {
447
456
  mkdirSync(dbDir, { recursive: true });
448
457
  }
449
-
458
+
450
459
  // Check if database file exists and try to create a clean one if needed
451
460
  let db;
452
461
  try {
@@ -470,7 +479,7 @@ async function spawnSwarm(args, flags) {
470
479
  // Create new database
471
480
  db = new Database(dbPath);
472
481
  }
473
-
482
+
474
483
  // Initialize database schema if not exists
475
484
  spinner.text = 'Creating database schema...';
476
485
  try {
@@ -544,22 +553,24 @@ async function spawnSwarm(args, flags) {
544
553
  console.error('Database schema creation failed:', error);
545
554
  throw new Error(`Failed to create database schema: ${error.message}`);
546
555
  }
547
-
556
+
548
557
  // Create swarm record with safe ID generation
549
558
  spinner.text = 'Creating swarm record...';
550
559
  const timestamp = Date.now();
551
560
  const randomPart = Math.random().toString(36).substring(2, 11); // Use substring instead of substr
552
561
  const swarmId = `swarm-${timestamp}-${randomPart}`;
553
562
  try {
554
- db.prepare(`
563
+ db.prepare(
564
+ `
555
565
  INSERT INTO swarms (id, name, objective, queen_type)
556
566
  VALUES (?, ?, ?, ?)
557
- `).run(swarmId, hiveMind.config.name, objective, hiveMind.config.queenType);
567
+ `,
568
+ ).run(swarmId, hiveMind.config.name, objective, hiveMind.config.queenType);
558
569
  } catch (error) {
559
570
  console.error('Failed to create swarm record:', error);
560
571
  throw new Error(`Failed to create swarm record: ${error.message}`);
561
572
  }
562
-
573
+
563
574
  // Create session for this swarm
564
575
  spinner.text = 'Creating session tracking...';
565
576
  const sessionManager = new HiveMindSessionManager();
@@ -569,35 +580,35 @@ async function spawnSwarm(args, flags) {
569
580
  consensusAlgorithm: hiveMind.config.consensusAlgorithm,
570
581
  autoScale: hiveMind.config.autoScale,
571
582
  encryption: hiveMind.config.encryption,
572
- workerTypes: flags.workerTypes
583
+ workerTypes: flags.workerTypes,
573
584
  });
574
-
585
+
575
586
  spinner.text = 'Session tracking established...';
576
587
  sessionManager.close();
577
-
588
+
578
589
  // Initialize auto-save middleware
579
590
  const autoSave = createAutoSaveMiddleware(sessionId, {
580
591
  saveInterval: 30000, // Save every 30 seconds
581
- autoStart: true
592
+ autoStart: true,
582
593
  });
583
-
594
+
584
595
  // Track initial swarm creation
585
596
  autoSave.trackChange('swarm_created', {
586
597
  swarmId,
587
598
  swarmName: hiveMind.config.name,
588
599
  objective,
589
- workerCount: hiveMind.config.maxWorkers
600
+ workerCount: hiveMind.config.maxWorkers,
590
601
  });
591
-
602
+
592
603
  spinner.text = 'Initializing Queen coordinator...';
593
-
604
+
594
605
  // Initialize Queen
595
606
  const queen = new QueenCoordinator({
596
607
  swarmId,
597
608
  type: hiveMind.config.queenType,
598
- objective
609
+ objective,
599
610
  });
600
-
611
+
601
612
  // Spawn Queen agent
602
613
  const queenAgent = {
603
614
  id: `queen-${swarmId}`,
@@ -606,27 +617,29 @@ async function spawnSwarm(args, flags) {
606
617
  type: 'coordinator',
607
618
  role: 'queen',
608
619
  status: 'active',
609
- capabilities: JSON.stringify(['coordination', 'planning', 'decision-making'])
620
+ capabilities: JSON.stringify(['coordination', 'planning', 'decision-making']),
610
621
  };
611
-
612
- db.prepare(`
622
+
623
+ db.prepare(
624
+ `
613
625
  INSERT INTO agents (id, swarm_id, name, type, role, status, capabilities)
614
626
  VALUES (?, ?, ?, ?, ?, ?, ?)
615
- `).run(...Object.values(queenAgent));
616
-
627
+ `,
628
+ ).run(...Object.values(queenAgent));
629
+
617
630
  spinner.text = 'Spawning worker agents...';
618
-
631
+
619
632
  // Determine worker types
620
- const workerTypes = flags.workerTypes
621
- ? flags.workerTypes.split(',')
633
+ const workerTypes = flags.workerTypes
634
+ ? flags.workerTypes.split(',')
622
635
  : ['researcher', 'coder', 'analyst', 'tester'];
623
-
636
+
624
637
  // Spawn worker agents
625
638
  const workers = [];
626
639
  for (let i = 0; i < Math.min(workerTypes.length, hiveMind.config.maxWorkers); i++) {
627
640
  const workerType = workerTypes[i % workerTypes.length];
628
641
  const workerId = `worker-${swarmId}-${i}`;
629
-
642
+
630
643
  const worker = {
631
644
  id: workerId,
632
645
  swarmId,
@@ -634,49 +647,51 @@ async function spawnSwarm(args, flags) {
634
647
  type: workerType,
635
648
  role: 'worker',
636
649
  status: 'idle',
637
- capabilities: JSON.stringify(getAgentCapabilities(workerType))
650
+ capabilities: JSON.stringify(getAgentCapabilities(workerType)),
638
651
  };
639
-
652
+
640
653
  workers.push(worker);
641
-
642
- db.prepare(`
654
+
655
+ db.prepare(
656
+ `
643
657
  INSERT INTO agents (id, swarm_id, name, type, role, status, capabilities)
644
658
  VALUES (?, ?, ?, ?, ?, ?, ?)
645
- `).run(...Object.values(worker));
646
-
659
+ `,
660
+ ).run(...Object.values(worker));
661
+
647
662
  // Track agent spawning for auto-save
648
663
  autoSave.trackAgentActivity(workerId, 'spawned', {
649
664
  type: workerType,
650
- name: worker.name
665
+ name: worker.name,
651
666
  });
652
667
  }
653
-
668
+
654
669
  spinner.text = 'Initializing collective memory...';
655
-
670
+
656
671
  // Initialize collective memory
657
672
  const memory = new CollectiveMemory({
658
673
  swarmId,
659
- maxSize: flags.memorySize || 100
674
+ maxSize: flags.memorySize || 100,
660
675
  });
661
-
676
+
662
677
  // Store initial context
663
678
  memory.store('objective', objective, 'context');
664
679
  memory.store('queen_type', hiveMind.config.queenType, 'config');
665
680
  memory.store('worker_count', workers.length, 'metrics');
666
681
  memory.store('session_id', sessionId, 'system');
667
-
682
+
668
683
  spinner.text = 'Establishing communication channels...';
669
-
684
+
670
685
  // Initialize communication system
671
686
  const communication = new SwarmCommunication({
672
687
  swarmId,
673
- encryption: hiveMind.config.encryption
688
+ encryption: hiveMind.config.encryption,
674
689
  });
675
-
690
+
676
691
  db.close();
677
-
692
+
678
693
  spinner.succeed('Hive Mind swarm spawned successfully!');
679
-
694
+
680
695
  // Display swarm summary
681
696
  console.log('\n' + chalk.bold('šŸ Swarm Summary:'));
682
697
  console.log(chalk.gray('─'.repeat(50)));
@@ -690,32 +705,35 @@ async function spawnSwarm(args, flags) {
690
705
  console.log(chalk.cyan('Consensus:'), hiveMind.config.consensusAlgorithm);
691
706
  console.log(chalk.cyan('Auto-scaling:'), hiveMind.config.autoScale ? 'Enabled' : 'Disabled');
692
707
  console.log(chalk.gray('─'.repeat(50)));
693
-
708
+
694
709
  // Launch monitoring if requested
695
710
  if (flags.monitor) {
696
711
  console.log('\n' + chalk.yellow('Launching monitoring dashboard...'));
697
712
  // TODO: Implement monitoring dashboard
698
713
  }
699
-
714
+
700
715
  // Enhanced coordination instructions with MCP tools
701
716
  console.log('\n' + chalk.green('āœ“') + ' Swarm is ready for coordination');
702
717
  console.log(chalk.gray('Use "claude-flow hive-mind status" to view swarm activity'));
703
718
  console.log(chalk.gray('Session auto-save enabled - progress saved every 30 seconds'));
704
719
  console.log(chalk.blue('šŸ’” To pause:') + ' Press Ctrl+C to safely pause and resume later');
705
720
  console.log(chalk.blue('šŸ’” To resume:') + ' claude-flow hive-mind resume ' + sessionId);
706
-
721
+
707
722
  // Offer to spawn Claude Code instances with coordination instructions
708
723
  if (flags.claude || flags.spawn) {
709
724
  await spawnClaudeCodeInstances(swarmId, hiveMind.config.name, objective, workers, flags);
710
725
  } else {
711
- console.log('\n' + chalk.blue('šŸ’” Pro Tip:') + ' Add --claude to spawn coordinated Claude Code instances');
726
+ console.log(
727
+ '\n' +
728
+ chalk.blue('šŸ’” Pro Tip:') +
729
+ ' Add --claude to spawn coordinated Claude Code instances',
730
+ );
712
731
  console.log(chalk.gray(' claude-flow hive-mind spawn "objective" --claude'));
713
732
  }
714
-
715
733
  } catch (error) {
716
734
  spinner.fail('Failed to spawn Hive Mind swarm');
717
735
  console.error(chalk.red('Error:'), error.message);
718
-
736
+
719
737
  // If error contains "sha3", provide specific guidance
720
738
  if (error.message.includes('sha3') || error.message.includes('SHA3')) {
721
739
  console.error('\nšŸ” SHA3 Function Error Detected');
@@ -727,7 +745,7 @@ async function spawnSwarm(args, flags) {
727
745
  console.error('\n🚨 Detailed error:');
728
746
  console.error(error.stack || error.message);
729
747
  }
730
-
748
+
731
749
  exit(1);
732
750
  }
733
751
  }
@@ -744,9 +762,9 @@ function getAgentCapabilities(type) {
744
762
  architect: ['system-design', 'architecture', 'planning', 'documentation'],
745
763
  reviewer: ['code-review', 'quality-check', 'feedback', 'improvement'],
746
764
  optimizer: ['performance-tuning', 'optimization', 'profiling', 'enhancement'],
747
- documenter: ['documentation', 'explanation', 'tutorial-creation', 'knowledge-base']
765
+ documenter: ['documentation', 'explanation', 'tutorial-creation', 'knowledge-base'],
748
766
  };
749
-
767
+
750
768
  return capabilities[type] || ['general'];
751
769
  }
752
770
 
@@ -756,30 +774,34 @@ function getAgentCapabilities(type) {
756
774
  async function showStatus(flags) {
757
775
  try {
758
776
  const dbPath = path.join(cwd(), '.hive-mind', 'hive.db');
759
-
777
+
760
778
  if (!existsSync(dbPath)) {
761
779
  console.error(chalk.red('Error: Hive Mind not initialized'));
762
780
  console.log('Run "claude-flow hive-mind init" first');
763
781
  return;
764
782
  }
765
-
783
+
766
784
  const db = new Database(dbPath);
767
-
785
+
768
786
  // Get active swarms
769
- const swarms = db.prepare(`
787
+ const swarms = db
788
+ .prepare(
789
+ `
770
790
  SELECT * FROM swarms
771
791
  WHERE status = 'active'
772
792
  ORDER BY created_at DESC
773
- `).all();
774
-
793
+ `,
794
+ )
795
+ .all();
796
+
775
797
  if (swarms.length === 0) {
776
798
  console.log(chalk.gray('No active swarms found'));
777
799
  db.close();
778
800
  return;
779
801
  }
780
-
802
+
781
803
  console.log(chalk.bold('\nšŸ Active Hive Mind Swarms\n'));
782
-
804
+
783
805
  for (const swarm of swarms) {
784
806
  console.log(chalk.yellow('═'.repeat(60)));
785
807
  console.log(chalk.cyan('Swarm:'), swarm.name);
@@ -788,32 +810,38 @@ async function showStatus(flags) {
788
810
  console.log(chalk.cyan('Queen Type:'), swarm.queen_type);
789
811
  console.log(chalk.cyan('Status:'), chalk.green(swarm.status));
790
812
  console.log(chalk.cyan('Created:'), new Date(swarm.created_at).toLocaleString());
791
-
813
+
792
814
  // Get agents
793
- const agents = db.prepare(`
815
+ const agents = db
816
+ .prepare(
817
+ `
794
818
  SELECT * FROM agents
795
819
  WHERE swarm_id = ?
796
- `).all(swarm.id);
797
-
820
+ `,
821
+ )
822
+ .all(swarm.id);
823
+
798
824
  console.log('\n' + chalk.bold('Agents:'));
799
-
825
+
800
826
  // Group by role
801
- const queen = agents.find(a => a.role === 'queen');
802
- const workers = agents.filter(a => a.role === 'worker');
803
-
827
+ const queen = agents.find((a) => a.role === 'queen');
828
+ const workers = agents.filter((a) => a.role === 'worker');
829
+
804
830
  if (queen) {
805
831
  console.log(' ' + chalk.magenta('šŸ‘‘ Queen:'), queen.name, chalk.gray(`(${queen.status})`));
806
832
  }
807
-
833
+
808
834
  console.log(' ' + chalk.blue('šŸ Workers:'));
809
- workers.forEach(worker => {
810
- const statusColor = worker.status === 'active' ? 'green' :
811
- worker.status === 'busy' ? 'yellow' : 'gray';
835
+ workers.forEach((worker) => {
836
+ const statusColor =
837
+ worker.status === 'active' ? 'green' : worker.status === 'busy' ? 'yellow' : 'gray';
812
838
  console.log(` - ${worker.name} (${worker.type}) ${chalk[statusColor](worker.status)}`);
813
839
  });
814
-
840
+
815
841
  // Get task statistics
816
- const taskStats = db.prepare(`
842
+ const taskStats = db
843
+ .prepare(
844
+ `
817
845
  SELECT
818
846
  COUNT(*) as total,
819
847
  SUM(CASE WHEN status = 'completed' THEN 1 ELSE 0 END) as completed,
@@ -821,37 +849,46 @@ async function showStatus(flags) {
821
849
  SUM(CASE WHEN status = 'pending' THEN 1 ELSE 0 END) as pending
822
850
  FROM tasks
823
851
  WHERE swarm_id = ?
824
- `).get(swarm.id);
825
-
852
+ `,
853
+ )
854
+ .get(swarm.id);
855
+
826
856
  console.log('\n' + chalk.bold('Tasks:'));
827
857
  console.log(` Total: ${taskStats.total}`);
828
858
  console.log(` Completed: ${chalk.green(taskStats.completed)}`);
829
859
  console.log(` In Progress: ${chalk.yellow(taskStats.in_progress)}`);
830
860
  console.log(` Pending: ${chalk.gray(taskStats.pending)}`);
831
-
861
+
832
862
  // Get memory stats
833
- const memoryCount = db.prepare(`
863
+ const memoryCount = db
864
+ .prepare(
865
+ `
834
866
  SELECT COUNT(*) as count FROM collective_memory
835
867
  WHERE swarm_id = ?
836
- `).get(swarm.id);
837
-
868
+ `,
869
+ )
870
+ .get(swarm.id);
871
+
838
872
  console.log('\n' + chalk.bold('Collective Memory:'));
839
873
  console.log(` Entries: ${memoryCount.count}`);
840
-
874
+
841
875
  // Get consensus stats
842
- const consensusCount = db.prepare(`
876
+ const consensusCount = db
877
+ .prepare(
878
+ `
843
879
  SELECT COUNT(*) as count FROM consensus_decisions
844
880
  WHERE swarm_id = ?
845
- `).get(swarm.id);
846
-
881
+ `,
882
+ )
883
+ .get(swarm.id);
884
+
847
885
  console.log('\n' + chalk.bold('Consensus Decisions:'));
848
886
  console.log(` Total: ${consensusCount.count}`);
849
887
  }
850
-
888
+
851
889
  console.log(chalk.yellow('═'.repeat(60)) + '\n');
852
-
890
+
853
891
  db.close();
854
-
855
892
  } catch (error) {
856
893
  console.error(chalk.red('Error:'), error.message);
857
894
  exit(1);
@@ -865,24 +902,28 @@ async function showConsensus(flags) {
865
902
  try {
866
903
  const dbPath = path.join(cwd(), '.hive-mind', 'hive.db');
867
904
  const db = new Database(dbPath);
868
-
869
- const decisions = db.prepare(`
905
+
906
+ const decisions = db
907
+ .prepare(
908
+ `
870
909
  SELECT cd.*, s.name as swarm_name
871
910
  FROM consensus_decisions cd
872
911
  JOIN swarms s ON cd.swarm_id = s.id
873
912
  ORDER BY cd.created_at DESC
874
913
  LIMIT 20
875
- `).all();
876
-
914
+ `,
915
+ )
916
+ .all();
917
+
877
918
  if (decisions.length === 0) {
878
919
  console.log(chalk.gray('No consensus decisions found'));
879
920
  db.close();
880
921
  return;
881
922
  }
882
-
923
+
883
924
  console.log(chalk.bold('\nšŸ¤ Recent Consensus Decisions\n'));
884
-
885
- decisions.forEach(decision => {
925
+
926
+ decisions.forEach((decision) => {
886
927
  console.log(chalk.yellow('─'.repeat(50)));
887
928
  console.log(chalk.cyan('Swarm:'), decision.swarm_name);
888
929
  console.log(chalk.cyan('Topic:'), decision.topic);
@@ -890,35 +931,40 @@ async function showConsensus(flags) {
890
931
  console.log(chalk.cyan('Algorithm:'), decision.algorithm);
891
932
  console.log(chalk.cyan('Confidence:'), `${(decision.confidence * 100).toFixed(1)}%`);
892
933
  console.log(chalk.cyan('Time:'), new Date(decision.created_at).toLocaleString());
893
-
934
+
894
935
  if (decision.votes) {
895
936
  const votes = JSON.parse(decision.votes);
896
937
  console.log(chalk.cyan('Votes:'));
897
-
938
+
898
939
  // Handle vote summary format (for/against/abstain/details)
899
940
  if (votes.for !== undefined || votes.against !== undefined || votes.abstain !== undefined) {
900
941
  console.log(` - for: ${votes.for || 0}`);
901
942
  console.log(` - against: ${votes.against || 0}`);
902
943
  console.log(` - abstain: ${votes.abstain || 0}`);
903
-
944
+
904
945
  // Display vote details properly if they exist
905
946
  if (votes.details && Array.isArray(votes.details)) {
906
947
  console.log(' - details:');
907
948
  votes.details.forEach((detail, index) => {
908
949
  if (typeof detail === 'object') {
909
950
  // Extract available fields
910
- const agent = detail.agentId || detail.agent || detail.id || detail.name || `agent-${index + 1}`;
951
+ const agent =
952
+ detail.agentId ||
953
+ detail.agent ||
954
+ detail.id ||
955
+ detail.name ||
956
+ `agent-${index + 1}`;
911
957
  const vote = detail.vote || detail.choice || detail.decision || 'unknown';
912
958
  const reason = detail.reason || detail.justification || detail.rationale;
913
-
959
+
914
960
  // Build display string
915
961
  let displayString = ` ${index + 1}. Agent: ${agent}, Vote: ${vote}`;
916
-
962
+
917
963
  // Add reason if available
918
964
  if (reason && reason !== 'N/A' && reason !== '') {
919
965
  displayString += `, Reason: ${reason}`;
920
966
  }
921
-
967
+
922
968
  console.log(displayString);
923
969
  } else {
924
970
  console.log(` ${index + 1}. ${detail}`);
@@ -933,11 +979,10 @@ async function showConsensus(flags) {
933
979
  }
934
980
  }
935
981
  });
936
-
982
+
937
983
  console.log(chalk.yellow('─'.repeat(50)) + '\n');
938
-
984
+
939
985
  db.close();
940
-
941
986
  } catch (error) {
942
987
  console.error(chalk.red('Error:'), error.message);
943
988
  exit(1);
@@ -951,62 +996,87 @@ async function showMetrics(flags) {
951
996
  try {
952
997
  const dbPath = path.join(cwd(), '.hive-mind', 'hive.db');
953
998
  const db = new Database(dbPath);
954
-
999
+
955
1000
  // Get overall metrics
956
- const overallStats = db.prepare(`
1001
+ const overallStats = db
1002
+ .prepare(
1003
+ `
957
1004
  SELECT
958
1005
  (SELECT COUNT(*) FROM swarms) as total_swarms,
959
1006
  (SELECT COUNT(*) FROM agents) as total_agents,
960
1007
  (SELECT COUNT(*) FROM tasks) as total_tasks,
961
1008
  (SELECT COUNT(*) FROM tasks WHERE status = 'completed') as completed_tasks
962
- `).get();
963
-
1009
+ `,
1010
+ )
1011
+ .get();
1012
+
964
1013
  console.log(chalk.bold('\nšŸ“Š Hive Mind Performance Metrics\n'));
965
-
1014
+
966
1015
  // Get task status breakdown
967
- const taskBreakdown = db.prepare(`
1016
+ const taskBreakdown = db
1017
+ .prepare(
1018
+ `
968
1019
  SELECT
969
1020
  status,
970
1021
  COUNT(*) as count
971
1022
  FROM tasks
972
1023
  GROUP BY status
973
1024
  ORDER BY count DESC
974
- `).all();
1025
+ `,
1026
+ )
1027
+ .all();
975
1028
 
976
1029
  console.log(chalk.cyan('Overall Statistics:'));
977
1030
  console.log(` Total Swarms: ${overallStats.total_swarms}`);
978
1031
  console.log(` Total Agents: ${overallStats.total_agents}`);
979
1032
  console.log(` Total Tasks: ${overallStats.total_tasks}`);
980
1033
  console.log(` Completed Tasks: ${overallStats.completed_tasks}`);
981
- console.log(` Success Rate: ${overallStats.total_tasks > 0
982
- ? ((overallStats.completed_tasks / overallStats.total_tasks) * 100).toFixed(1) + '%'
983
- : 'N/A'}`);
984
-
1034
+ console.log(
1035
+ ` Success Rate: ${
1036
+ overallStats.total_tasks > 0
1037
+ ? ((overallStats.completed_tasks / overallStats.total_tasks) * 100).toFixed(1) + '%'
1038
+ : 'N/A'
1039
+ }`,
1040
+ );
1041
+
985
1042
  if (taskBreakdown.length > 0) {
986
1043
  console.log('\n' + chalk.cyan('Task Status Breakdown:'));
987
- taskBreakdown.forEach(status => {
988
- const percentage = overallStats.total_tasks > 0
989
- ? ((status.count / overallStats.total_tasks) * 100).toFixed(1)
990
- : '0';
991
- const statusColor =
992
- status.status === 'completed' ? 'green' :
993
- status.status === 'in_progress' ? 'yellow' :
994
- status.status === 'failed' ? 'red' : 'gray';
995
- console.log(` ${chalk[statusColor](status.status.charAt(0).toUpperCase() + status.status.slice(1))}: ${status.count} (${percentage}%)`);
1044
+ taskBreakdown.forEach((status) => {
1045
+ const percentage =
1046
+ overallStats.total_tasks > 0
1047
+ ? ((status.count / overallStats.total_tasks) * 100).toFixed(1)
1048
+ : '0';
1049
+ const statusColor =
1050
+ status.status === 'completed'
1051
+ ? 'green'
1052
+ : status.status === 'in_progress'
1053
+ ? 'yellow'
1054
+ : status.status === 'failed'
1055
+ ? 'red'
1056
+ : 'gray';
1057
+ console.log(
1058
+ ` ${chalk[statusColor](status.status.charAt(0).toUpperCase() + status.status.slice(1))}: ${status.count} (${percentage}%)`,
1059
+ );
996
1060
  });
997
1061
  }
998
-
1062
+
999
1063
  // Get agent performance (check for completed_at column)
1000
1064
  let agentPerf = [];
1001
1065
  try {
1002
1066
  // Check if completed_at exists
1003
- const hasCompletedAt = db.prepare(`
1067
+ const hasCompletedAt = db
1068
+ .prepare(
1069
+ `
1004
1070
  SELECT COUNT(*) as count FROM pragma_table_info('tasks')
1005
1071
  WHERE name = 'completed_at'
1006
- `).get();
1007
-
1072
+ `,
1073
+ )
1074
+ .get();
1075
+
1008
1076
  if (hasCompletedAt && hasCompletedAt.count > 0) {
1009
- agentPerf = db.prepare(`
1077
+ agentPerf = db
1078
+ .prepare(
1079
+ `
1010
1080
  SELECT
1011
1081
  a.name,
1012
1082
  a.type,
@@ -1021,10 +1091,14 @@ async function showMetrics(flags) {
1021
1091
  HAVING tasks_assigned > 0
1022
1092
  ORDER BY tasks_completed DESC
1023
1093
  LIMIT 10
1024
- `).all();
1094
+ `,
1095
+ )
1096
+ .all();
1025
1097
  } else {
1026
1098
  // Simpler query without completed_at
1027
- agentPerf = db.prepare(`
1099
+ agentPerf = db
1100
+ .prepare(
1101
+ `
1028
1102
  SELECT
1029
1103
  a.name,
1030
1104
  a.type,
@@ -1037,28 +1111,35 @@ async function showMetrics(flags) {
1037
1111
  HAVING tasks_assigned > 0
1038
1112
  ORDER BY tasks_completed DESC
1039
1113
  LIMIT 10
1040
- `).all();
1114
+ `,
1115
+ )
1116
+ .all();
1041
1117
  }
1042
1118
  } catch (error) {
1043
1119
  console.warn('Could not get agent performance:', error.message);
1044
1120
  }
1045
-
1121
+
1046
1122
  if (agentPerf.length > 0) {
1047
1123
  console.log('\n' + chalk.cyan('Top Performing Agents:'));
1048
1124
  agentPerf.forEach((agent, index) => {
1049
- const successRate = agent.tasks_assigned > 0
1050
- ? ((agent.tasks_completed / agent.tasks_assigned) * 100).toFixed(1)
1051
- : '0';
1125
+ const successRate =
1126
+ agent.tasks_assigned > 0
1127
+ ? ((agent.tasks_completed / agent.tasks_assigned) * 100).toFixed(1)
1128
+ : '0';
1052
1129
  console.log(` ${index + 1}. ${agent.name} (${agent.type})`);
1053
- console.log(` Tasks: ${agent.tasks_completed}/${agent.tasks_assigned} (${successRate}%)`);
1130
+ console.log(
1131
+ ` Tasks: ${agent.tasks_completed}/${agent.tasks_assigned} (${successRate}%)`,
1132
+ );
1054
1133
  if (agent.avg_completion_minutes) {
1055
1134
  console.log(` Avg Time: ${agent.avg_completion_minutes.toFixed(1)} minutes`);
1056
1135
  }
1057
1136
  });
1058
1137
  }
1059
-
1138
+
1060
1139
  // Get swarm performance
1061
- const swarmPerf = db.prepare(`
1140
+ const swarmPerf = db
1141
+ .prepare(
1142
+ `
1062
1143
  SELECT
1063
1144
  s.name,
1064
1145
  s.objective,
@@ -1071,55 +1152,76 @@ async function showMetrics(flags) {
1071
1152
  WHERE s.status = 'active'
1072
1153
  ORDER BY s.created_at DESC
1073
1154
  LIMIT 5
1074
- `).all();
1075
-
1155
+ `,
1156
+ )
1157
+ .all();
1158
+
1076
1159
  if (swarmPerf.length > 0) {
1077
1160
  console.log('\n' + chalk.cyan('Active Swarm Performance:'));
1078
- swarmPerf.forEach(swarm => {
1079
- const successRate = swarm.task_count > 0
1080
- ? ((swarm.completed_count / swarm.task_count) * 100).toFixed(1)
1081
- : '0';
1161
+ swarmPerf.forEach((swarm) => {
1162
+ const successRate =
1163
+ swarm.task_count > 0
1164
+ ? ((swarm.completed_count / swarm.task_count) * 100).toFixed(1)
1165
+ : '0';
1082
1166
  console.log(`\n ${chalk.yellow(swarm.name)}`);
1083
1167
  console.log(` Objective: ${swarm.objective.substring(0, 50)}...`);
1084
- console.log(` Agents: ${swarm.agent_count}, Tasks: ${swarm.completed_count}/${swarm.task_count} (${successRate}%)`);
1085
- console.log(` Memory: ${swarm.memory_entries} entries, Consensus: ${swarm.consensus_count} decisions`);
1168
+ console.log(
1169
+ ` Agents: ${swarm.agent_count}, Tasks: ${swarm.completed_count}/${swarm.task_count} (${successRate}%)`,
1170
+ );
1171
+ console.log(
1172
+ ` Memory: ${swarm.memory_entries} entries, Consensus: ${swarm.consensus_count} decisions`,
1173
+ );
1086
1174
  });
1087
1175
  }
1088
-
1176
+
1089
1177
  // Get performance insights
1090
1178
  let avgTaskTime = { avg_minutes: null };
1091
1179
  try {
1092
1180
  // Check if completed_at exists
1093
- const hasCompletedAt = db.prepare(`
1181
+ const hasCompletedAt = db
1182
+ .prepare(
1183
+ `
1094
1184
  SELECT COUNT(*) as count FROM pragma_table_info('tasks')
1095
1185
  WHERE name = 'completed_at'
1096
- `).get();
1097
-
1186
+ `,
1187
+ )
1188
+ .get();
1189
+
1098
1190
  if (hasCompletedAt && hasCompletedAt.count > 0) {
1099
- avgTaskTime = db.prepare(`
1191
+ avgTaskTime = db
1192
+ .prepare(
1193
+ `
1100
1194
  SELECT
1101
1195
  AVG(CASE WHEN completed_at IS NOT NULL
1102
1196
  THEN (julianday(completed_at) - julianday(created_at)) * 24 * 60
1103
1197
  ELSE NULL END) as avg_minutes
1104
1198
  FROM tasks
1105
1199
  WHERE status = 'completed'
1106
- `).get();
1200
+ `,
1201
+ )
1202
+ .get();
1107
1203
  }
1108
1204
  } catch (error) {
1109
1205
  console.warn('Could not calculate average task time:', error.message);
1110
1206
  }
1111
-
1207
+
1112
1208
  // Get agent type performance
1113
1209
  let agentTypePerf = [];
1114
1210
  try {
1115
1211
  // Check if completed_at exists
1116
- const hasCompletedAt = db.prepare(`
1212
+ const hasCompletedAt = db
1213
+ .prepare(
1214
+ `
1117
1215
  SELECT COUNT(*) as count FROM pragma_table_info('tasks')
1118
1216
  WHERE name = 'completed_at'
1119
- `).get();
1120
-
1217
+ `,
1218
+ )
1219
+ .get();
1220
+
1121
1221
  if (hasCompletedAt && hasCompletedAt.count > 0) {
1122
- agentTypePerf = db.prepare(`
1222
+ agentTypePerf = db
1223
+ .prepare(
1224
+ `
1123
1225
  SELECT
1124
1226
  a.type,
1125
1227
  COUNT(t.id) as total_tasks,
@@ -1132,10 +1234,14 @@ async function showMetrics(flags) {
1132
1234
  GROUP BY a.type
1133
1235
  HAVING total_tasks > 0
1134
1236
  ORDER BY completed_tasks DESC
1135
- `).all();
1237
+ `,
1238
+ )
1239
+ .all();
1136
1240
  } else {
1137
1241
  // Simpler query without completed_at
1138
- agentTypePerf = db.prepare(`
1242
+ agentTypePerf = db
1243
+ .prepare(
1244
+ `
1139
1245
  SELECT
1140
1246
  a.type,
1141
1247
  COUNT(t.id) as total_tasks,
@@ -1146,33 +1252,37 @@ async function showMetrics(flags) {
1146
1252
  GROUP BY a.type
1147
1253
  HAVING total_tasks > 0
1148
1254
  ORDER BY completed_tasks DESC
1149
- `).all();
1255
+ `,
1256
+ )
1257
+ .all();
1150
1258
  }
1151
1259
  } catch (error) {
1152
1260
  console.warn('Could not get agent type performance:', error.message);
1153
1261
  }
1154
-
1262
+
1155
1263
  if (avgTaskTime.avg_minutes) {
1156
1264
  console.log('\n' + chalk.cyan('Performance Insights:'));
1157
1265
  console.log(` Average Task Completion Time: ${avgTaskTime.avg_minutes.toFixed(1)} minutes`);
1158
-
1266
+
1159
1267
  if (agentTypePerf.length > 0) {
1160
1268
  console.log('\n' + chalk.cyan('Agent Type Performance:'));
1161
- agentTypePerf.forEach(type => {
1162
- const successRate = type.total_tasks > 0
1163
- ? ((type.completed_tasks / type.total_tasks) * 100).toFixed(1)
1164
- : '0';
1165
- console.log(` ${type.type.charAt(0).toUpperCase() + type.type.slice(1)}: ${type.completed_tasks}/${type.total_tasks} (${successRate}%)`);
1269
+ agentTypePerf.forEach((type) => {
1270
+ const successRate =
1271
+ type.total_tasks > 0
1272
+ ? ((type.completed_tasks / type.total_tasks) * 100).toFixed(1)
1273
+ : '0';
1274
+ console.log(
1275
+ ` ${type.type.charAt(0).toUpperCase() + type.type.slice(1)}: ${type.completed_tasks}/${type.total_tasks} (${successRate}%)`,
1276
+ );
1166
1277
  if (type.avg_completion_minutes) {
1167
1278
  console.log(` Average time: ${type.avg_completion_minutes.toFixed(1)} minutes`);
1168
1279
  }
1169
1280
  });
1170
1281
  }
1171
1282
  }
1172
-
1283
+
1173
1284
  console.log('\n');
1174
1285
  db.close();
1175
-
1176
1286
  } catch (error) {
1177
1287
  console.error(chalk.red('Error:'), error.message);
1178
1288
  exit(1);
@@ -1184,7 +1294,7 @@ async function showMetrics(flags) {
1184
1294
  */
1185
1295
  async function manageMemoryWizard() {
1186
1296
  console.log(chalk.blue('\n🧠 Collective Memory Management\n'));
1187
-
1297
+
1188
1298
  const { action } = await inquirer.prompt([
1189
1299
  {
1190
1300
  type: 'list',
@@ -1197,11 +1307,11 @@ async function manageMemoryWizard() {
1197
1307
  { name: 'šŸ“Š Memory statistics', value: 'stats' },
1198
1308
  { name: 'šŸ—‘ļø Clean old memories', value: 'clean' },
1199
1309
  { name: 'šŸ“¤ Export memory backup', value: 'export' },
1200
- { name: 'ā¬…ļø Back to main menu', value: 'back' }
1201
- ]
1202
- }
1310
+ { name: 'ā¬…ļø Back to main menu', value: 'back' },
1311
+ ],
1312
+ },
1203
1313
  ]);
1204
-
1314
+
1205
1315
  switch (action) {
1206
1316
  case 'list':
1207
1317
  await listMemories();
@@ -1225,17 +1335,17 @@ async function manageMemoryWizard() {
1225
1335
  await hiveMindWizard();
1226
1336
  return;
1227
1337
  }
1228
-
1338
+
1229
1339
  // Ask if user wants to continue
1230
1340
  const { continue: continueAction } = await inquirer.prompt([
1231
1341
  {
1232
1342
  type: 'confirm',
1233
1343
  name: 'continue',
1234
1344
  message: 'Would you like to perform another memory operation?',
1235
- default: true
1236
- }
1345
+ default: true,
1346
+ },
1237
1347
  ]);
1238
-
1348
+
1239
1349
  if (continueAction) {
1240
1350
  await manageMemoryWizard();
1241
1351
  }
@@ -1255,23 +1365,29 @@ async function configureWizard() {
1255
1365
  export async function hiveMindCommand(args, flags) {
1256
1366
  const subcommand = args[0];
1257
1367
  const subArgs = args.slice(1);
1258
-
1368
+
1259
1369
  // Handle help flags
1260
- if (!subcommand || subcommand === '--help' || subcommand === '-h' || subcommand === 'help' || flags.help) {
1370
+ if (
1371
+ !subcommand ||
1372
+ subcommand === '--help' ||
1373
+ subcommand === '-h' ||
1374
+ subcommand === 'help' ||
1375
+ flags.help
1376
+ ) {
1261
1377
  showHiveMindHelp();
1262
1378
  return;
1263
1379
  }
1264
-
1380
+
1265
1381
  // Warn about non-interactive environments for certain commands
1266
1382
  if ((subcommand === 'spawn' && (flags.claude || flags.spawn)) || subcommand === 'wizard') {
1267
1383
  warnNonInteractive('hive-mind ' + subcommand);
1268
1384
  }
1269
-
1385
+
1270
1386
  switch (subcommand) {
1271
1387
  case 'init':
1272
1388
  await initHiveMind(flags);
1273
1389
  break;
1274
-
1390
+
1275
1391
  case 'spawn':
1276
1392
  if (flags.wizard || subArgs.length === 0) {
1277
1393
  await spawnSwarmWizard();
@@ -1279,45 +1395,45 @@ export async function hiveMindCommand(args, flags) {
1279
1395
  await spawnSwarm(subArgs, flags);
1280
1396
  }
1281
1397
  break;
1282
-
1398
+
1283
1399
  case 'status':
1284
1400
  await showStatus(flags);
1285
1401
  break;
1286
-
1402
+
1287
1403
  case 'sessions':
1288
1404
  await showSessions(flags);
1289
1405
  break;
1290
-
1406
+
1291
1407
  case 'resume':
1292
1408
  await resumeSession(subArgs, flags);
1293
1409
  break;
1294
-
1410
+
1295
1411
  case 'stop':
1296
1412
  await stopSession(subArgs, flags);
1297
1413
  break;
1298
-
1414
+
1299
1415
  case 'consensus':
1300
1416
  await showConsensus(flags);
1301
1417
  break;
1302
-
1418
+
1303
1419
  case 'memory':
1304
1420
  await manageMemoryWizard();
1305
1421
  break;
1306
-
1422
+
1307
1423
  case 'metrics':
1308
1424
  await showMetrics(flags);
1309
1425
  break;
1310
-
1426
+
1311
1427
  case 'wizard':
1312
1428
  await hiveMindWizard(flags);
1313
1429
  break;
1314
-
1430
+
1315
1431
  case 'help':
1316
1432
  case '--help':
1317
1433
  case '-h':
1318
1434
  showHiveMindHelp();
1319
1435
  break;
1320
-
1436
+
1321
1437
  default:
1322
1438
  console.error(chalk.red(`Unknown subcommand: ${subcommand}`));
1323
1439
  console.log('Run "claude-flow hive-mind help" for usage information');
@@ -1331,11 +1447,11 @@ export async function hiveMindCommand(args, flags) {
1331
1447
  async function listMemories() {
1332
1448
  try {
1333
1449
  console.log(chalk.blue('\nšŸ“‹ Collective Memory Store\n'));
1334
-
1450
+
1335
1451
  // Use MCP wrapper to search for all memories (empty pattern matches all)
1336
1452
  const mcpWrapper = await getMcpWrapper();
1337
1453
  const searchResult = await mcpWrapper.searchMemory('hive-mind', '');
1338
-
1454
+
1339
1455
  // Handle different possible response structures
1340
1456
  let memories = [];
1341
1457
  if (searchResult && Array.isArray(searchResult.results)) {
@@ -1345,13 +1461,15 @@ async function listMemories() {
1345
1461
  } else if (searchResult && searchResult.data && Array.isArray(searchResult.data)) {
1346
1462
  memories = searchResult.data;
1347
1463
  }
1348
-
1464
+
1349
1465
  if (!memories || memories.length === 0) {
1350
1466
  console.log(chalk.yellow('No memories found in the collective store.'));
1351
- console.log(chalk.gray('Try storing some memories first using the "šŸ’¾ Store new memory" option.'));
1467
+ console.log(
1468
+ chalk.gray('Try storing some memories first using the "šŸ’¾ Store new memory" option.'),
1469
+ );
1352
1470
  return;
1353
1471
  }
1354
-
1472
+
1355
1473
  memories.forEach((memory, index) => {
1356
1474
  console.log(chalk.cyan(`${index + 1}. ${memory.key || `memory-${index}`}`));
1357
1475
  console.log(` Category: ${memory.type || 'general'}`);
@@ -1363,7 +1481,6 @@ async function listMemories() {
1363
1481
  }
1364
1482
  console.log('');
1365
1483
  });
1366
-
1367
1484
  } catch (error) {
1368
1485
  console.error(chalk.red('Error listing memories:'), error.message);
1369
1486
  console.log(chalk.gray('This might be because no memories have been stored yet.'));
@@ -1380,15 +1497,15 @@ async function searchMemories() {
1380
1497
  type: 'input',
1381
1498
  name: 'searchTerm',
1382
1499
  message: 'Enter search term:',
1383
- validate: input => input.length > 0
1384
- }
1500
+ validate: (input) => input.length > 0,
1501
+ },
1385
1502
  ]);
1386
-
1503
+
1387
1504
  console.log(chalk.blue(`\nšŸ” Searching for: "${searchTerm}"\n`));
1388
-
1505
+
1389
1506
  const mcpWrapper = await getMcpWrapper();
1390
1507
  const searchResult = await mcpWrapper.searchMemory('hive-mind', searchTerm);
1391
-
1508
+
1392
1509
  // Handle different possible response structures
1393
1510
  let memories = [];
1394
1511
  if (searchResult && Array.isArray(searchResult.results)) {
@@ -1398,12 +1515,12 @@ async function searchMemories() {
1398
1515
  } else if (searchResult && searchResult.data && Array.isArray(searchResult.data)) {
1399
1516
  memories = searchResult.data;
1400
1517
  }
1401
-
1518
+
1402
1519
  if (!memories || memories.length === 0) {
1403
1520
  console.log(chalk.yellow('No memories found matching your search.'));
1404
1521
  return;
1405
1522
  }
1406
-
1523
+
1407
1524
  memories.forEach((memory, index) => {
1408
1525
  console.log(chalk.green(`${index + 1}. ${memory.key || `result-${index}`}`));
1409
1526
  console.log(` Category: ${memory.type || 'general'}`);
@@ -1411,7 +1528,6 @@ async function searchMemories() {
1411
1528
  console.log(` Value: ${JSON.stringify(memory.value || memory, null, 2)}`);
1412
1529
  console.log('');
1413
1530
  });
1414
-
1415
1531
  } catch (error) {
1416
1532
  console.error(chalk.red('Error searching memories:'), error.message);
1417
1533
  }
@@ -1427,7 +1543,7 @@ async function storeMemoryWizard() {
1427
1543
  type: 'input',
1428
1544
  name: 'key',
1429
1545
  message: 'Memory key (identifier):',
1430
- validate: input => input.length > 0
1546
+ validate: (input) => input.length > 0,
1431
1547
  },
1432
1548
  {
1433
1549
  type: 'list',
@@ -1441,32 +1557,31 @@ async function storeMemoryWizard() {
1441
1557
  'coordination',
1442
1558
  'performance',
1443
1559
  'configuration',
1444
- 'general'
1445
- ]
1560
+ 'general',
1561
+ ],
1446
1562
  },
1447
1563
  {
1448
1564
  type: 'editor',
1449
1565
  name: 'value',
1450
- message: 'Memory content (JSON or text):'
1451
- }
1566
+ message: 'Memory content (JSON or text):',
1567
+ },
1452
1568
  ]);
1453
-
1569
+
1454
1570
  const mcpWrapper = await getMcpWrapper();
1455
1571
  let memoryValue;
1456
-
1572
+
1457
1573
  // Try to parse as JSON, fall back to string
1458
1574
  try {
1459
1575
  memoryValue = JSON.parse(answers.value);
1460
1576
  } catch {
1461
1577
  memoryValue = answers.value;
1462
1578
  }
1463
-
1579
+
1464
1580
  await mcpWrapper.storeMemory('hive-mind', answers.key, memoryValue, answers.category);
1465
-
1581
+
1466
1582
  console.log(chalk.green(`\nāœ… Memory stored successfully!`));
1467
1583
  console.log(`Key: ${answers.key}`);
1468
1584
  console.log(`Category: ${answers.category}`);
1469
-
1470
1585
  } catch (error) {
1471
1586
  console.error(chalk.red('Error storing memory:'), error.message);
1472
1587
  }
@@ -1478,12 +1593,12 @@ async function storeMemoryWizard() {
1478
1593
  async function showMemoryStats() {
1479
1594
  try {
1480
1595
  console.log(chalk.blue('\nšŸ“Š Memory Statistics\n'));
1481
-
1596
+
1482
1597
  const mcpWrapper = await getMcpWrapper();
1483
-
1598
+
1484
1599
  // Search for all memories with an empty pattern to get everything
1485
1600
  const searchResult = await mcpWrapper.searchMemory('hive-mind', '');
1486
-
1601
+
1487
1602
  // Handle different possible response structures
1488
1603
  let memories = [];
1489
1604
  if (searchResult && Array.isArray(searchResult.results)) {
@@ -1493,27 +1608,27 @@ async function showMemoryStats() {
1493
1608
  } else if (searchResult && searchResult.data && Array.isArray(searchResult.data)) {
1494
1609
  memories = searchResult.data;
1495
1610
  }
1496
-
1611
+
1497
1612
  if (!memories || memories.length === 0) {
1498
1613
  console.log(chalk.yellow('No memories found.'));
1499
1614
  console.log(chalk.gray('Use "Store new memory" to create your first memory.'));
1500
1615
  return;
1501
1616
  }
1502
-
1617
+
1503
1618
  // Calculate statistics
1504
1619
  const stats = {
1505
1620
  total: memories.length,
1506
1621
  categories: {},
1507
1622
  oldestDate: null,
1508
1623
  newestDate: null,
1509
- totalSize: 0
1624
+ totalSize: 0,
1510
1625
  };
1511
-
1512
- memories.forEach(memory => {
1626
+
1627
+ memories.forEach((memory) => {
1513
1628
  // Count by category
1514
1629
  const category = memory.category || memory.type || 'general';
1515
1630
  stats.categories[category] = (stats.categories[category] || 0) + 1;
1516
-
1631
+
1517
1632
  // Track dates
1518
1633
  const date = new Date(memory.timestamp || Date.now());
1519
1634
  if (!stats.oldestDate || date < stats.oldestDate) {
@@ -1522,21 +1637,22 @@ async function showMemoryStats() {
1522
1637
  if (!stats.newestDate || date > stats.newestDate) {
1523
1638
  stats.newestDate = date;
1524
1639
  }
1525
-
1640
+
1526
1641
  // Estimate size
1527
1642
  stats.totalSize += JSON.stringify(memory).length;
1528
1643
  });
1529
-
1644
+
1530
1645
  console.log(chalk.cyan('Total memories:'), stats.total);
1531
1646
  console.log(chalk.cyan('Estimated size:'), `${(stats.totalSize / 1024).toFixed(2)} KB`);
1532
- console.log(chalk.cyan('Date range:'),
1533
- `${stats.oldestDate?.toLocaleDateString()} - ${stats.newestDate?.toLocaleDateString()}`);
1534
-
1647
+ console.log(
1648
+ chalk.cyan('Date range:'),
1649
+ `${stats.oldestDate?.toLocaleDateString()} - ${stats.newestDate?.toLocaleDateString()}`,
1650
+ );
1651
+
1535
1652
  console.log(chalk.cyan('\nBy category:'));
1536
1653
  Object.entries(stats.categories).forEach(([category, count]) => {
1537
1654
  console.log(` ${category}: ${count}`);
1538
1655
  });
1539
-
1540
1656
  } catch (error) {
1541
1657
  console.error(chalk.red('Error getting memory stats:'), error.message);
1542
1658
  }
@@ -1553,29 +1669,29 @@ async function cleanMemories() {
1553
1669
  name: 'days',
1554
1670
  message: 'Remove memories older than how many days?',
1555
1671
  default: 30,
1556
- validate: input => input > 0
1557
- }
1672
+ validate: (input) => input > 0,
1673
+ },
1558
1674
  ]);
1559
-
1675
+
1560
1676
  const { confirm } = await inquirer.prompt([
1561
1677
  {
1562
1678
  type: 'confirm',
1563
1679
  name: 'confirm',
1564
1680
  message: `Are you sure you want to delete memories older than ${days} days?`,
1565
- default: false
1566
- }
1681
+ default: false,
1682
+ },
1567
1683
  ]);
1568
-
1684
+
1569
1685
  if (!confirm) {
1570
1686
  console.log(chalk.yellow('Operation cancelled.'));
1571
1687
  return;
1572
1688
  }
1573
-
1689
+
1574
1690
  const mcpWrapper = await getMcpWrapper();
1575
-
1691
+
1576
1692
  // Get all memories first
1577
1693
  const searchResult = await mcpWrapper.searchMemory('hive-mind', '');
1578
-
1694
+
1579
1695
  // Handle different possible response structures
1580
1696
  let memories = [];
1581
1697
  if (searchResult && Array.isArray(searchResult.results)) {
@@ -1585,25 +1701,24 @@ async function cleanMemories() {
1585
1701
  } else if (searchResult && searchResult.data && Array.isArray(searchResult.data)) {
1586
1702
  memories = searchResult.data;
1587
1703
  }
1588
-
1704
+
1589
1705
  const cutoffDate = new Date();
1590
1706
  cutoffDate.setDate(cutoffDate.getDate() - days);
1591
-
1707
+
1592
1708
  // Filter memories older than cutoff date
1593
- const oldMemories = memories.filter(memory => {
1709
+ const oldMemories = memories.filter((memory) => {
1594
1710
  const memoryDate = new Date(memory.timestamp || 0);
1595
1711
  return memoryDate < cutoffDate;
1596
1712
  });
1597
-
1713
+
1598
1714
  if (oldMemories.length === 0) {
1599
1715
  console.log(chalk.yellow('\nšŸŽ‰ No old memories found to clean.'));
1600
1716
  return;
1601
1717
  }
1602
-
1718
+
1603
1719
  console.log(chalk.green(`\nāœ… Found ${oldMemories.length} old memories to clean.`));
1604
1720
  console.log(chalk.gray('Note: Individual memory deletion not yet implemented in MCPWrapper.'));
1605
1721
  console.log(chalk.gray('Consider implementing batch deletion or memory lifecycle management.'));
1606
-
1607
1722
  } catch (error) {
1608
1723
  console.error(chalk.red('Error cleaning memories:'), error.message);
1609
1724
  }
@@ -1619,15 +1734,15 @@ async function exportMemoryBackup() {
1619
1734
  type: 'input',
1620
1735
  name: 'filename',
1621
1736
  message: 'Export filename:',
1622
- default: `hive-mind-memory-backup-${new Date().toISOString().split('T')[0]}.json`
1623
- }
1737
+ default: `hive-mind-memory-backup-${new Date().toISOString().split('T')[0]}.json`,
1738
+ },
1624
1739
  ]);
1625
-
1740
+
1626
1741
  const mcpWrapper = await getMcpWrapper();
1627
-
1742
+
1628
1743
  // Get all memories using search
1629
1744
  const searchResult = await mcpWrapper.searchMemory('hive-mind', '');
1630
-
1745
+
1631
1746
  // Handle different possible response structures
1632
1747
  let memories = [];
1633
1748
  if (searchResult && Array.isArray(searchResult.results)) {
@@ -1637,21 +1752,20 @@ async function exportMemoryBackup() {
1637
1752
  } else if (searchResult && searchResult.data && Array.isArray(searchResult.data)) {
1638
1753
  memories = searchResult.data;
1639
1754
  }
1640
-
1755
+
1641
1756
  const backup = {
1642
1757
  exportDate: new Date().toISOString(),
1643
1758
  version: '1.0',
1644
1759
  totalMemories: memories.length,
1645
1760
  namespace: 'hive-mind',
1646
- memories: memories
1761
+ memories: memories,
1647
1762
  };
1648
-
1763
+
1649
1764
  const fs = await import('fs');
1650
1765
  fs.writeFileSync(filename, JSON.stringify(backup, null, 2));
1651
-
1766
+
1652
1767
  console.log(chalk.green(`\nāœ… Memory backup exported to: ${filename}`));
1653
1768
  console.log(chalk.cyan(`Exported ${memories.length} memories`));
1654
-
1655
1769
  } catch (error) {
1656
1770
  console.error(chalk.red('Error exporting memory backup:'), error.message);
1657
1771
  }
@@ -1663,16 +1777,23 @@ async function exportMemoryBackup() {
1663
1777
  async function spawnClaudeCodeInstances(swarmId, swarmName, objective, workers, flags) {
1664
1778
  console.log('\n' + chalk.bold('šŸš€ Launching Claude Code with Hive Mind Coordination'));
1665
1779
  console.log(chalk.gray('─'.repeat(60)));
1666
-
1780
+
1667
1781
  const spinner = ora('Preparing Hive Mind coordination prompt...').start();
1668
-
1782
+
1669
1783
  try {
1670
1784
  // Generate comprehensive Hive Mind prompt
1671
1785
  const workerGroups = groupWorkersByType(workers);
1672
- const hiveMindPrompt = generateHiveMindPrompt(swarmId, swarmName, objective, workers, workerGroups, flags);
1673
-
1786
+ const hiveMindPrompt = generateHiveMindPrompt(
1787
+ swarmId,
1788
+ swarmName,
1789
+ objective,
1790
+ workers,
1791
+ workerGroups,
1792
+ flags,
1793
+ );
1794
+
1674
1795
  spinner.succeed('Hive Mind coordination prompt ready!');
1675
-
1796
+
1676
1797
  // Display coordination summary
1677
1798
  console.log('\n' + chalk.bold('🧠 Hive Mind Configuration'));
1678
1799
  console.log(chalk.gray('─'.repeat(60)));
@@ -1683,21 +1804,21 @@ async function spawnClaudeCodeInstances(swarmId, swarmName, objective, workers,
1683
1804
  console.log(chalk.cyan('Worker Types:'), Object.keys(workerGroups).join(', '));
1684
1805
  console.log(chalk.cyan('Consensus Algorithm:'), flags.consensus || 'majority');
1685
1806
  console.log(chalk.cyan('MCP Tools:'), 'Full Claude-Flow integration enabled');
1686
-
1807
+
1687
1808
  try {
1688
1809
  // ALWAYS save the prompt file first (fix for issue #330)
1689
1810
  // Ensure sessions directory exists
1690
1811
  const sessionsDir = path.join('.hive-mind', 'sessions');
1691
1812
  await mkdirAsync(sessionsDir, { recursive: true });
1692
-
1813
+
1693
1814
  const promptFile = path.join(sessionsDir, `hive-mind-prompt-${swarmId}.txt`);
1694
1815
  await writeFile(promptFile, hiveMindPrompt, 'utf8');
1695
1816
  console.log(chalk.green(`\nāœ“ Hive Mind prompt saved to: ${promptFile}`));
1696
-
1817
+
1697
1818
  // Check if claude command exists
1698
1819
  const { spawn: childSpawn, execSync } = await import('child_process');
1699
1820
  let claudeAvailable = false;
1700
-
1821
+
1701
1822
  try {
1702
1823
  execSync('which claude', { stdio: 'ignore' });
1703
1824
  claudeAvailable = true;
@@ -1706,40 +1827,43 @@ async function spawnClaudeCodeInstances(swarmId, swarmName, objective, workers,
1706
1827
  console.log(chalk.gray('Install it with: npm install -g @anthropic-ai/claude-code'));
1707
1828
  console.log(chalk.gray('\nFalling back to displaying instructions...'));
1708
1829
  }
1709
-
1710
-
1830
+
1711
1831
  if (claudeAvailable && !flags.dryRun) {
1712
1832
  // Pass the prompt directly as an argument to claude
1713
1833
  // Remove --print to allow interactive session
1714
1834
  const claudeArgs = [hiveMindPrompt];
1715
-
1835
+
1716
1836
  // Add auto-permission flag by default for hive-mind mode (unless explicitly disabled)
1717
1837
  if (flags['dangerously-skip-permissions'] !== false && !flags['no-auto-permissions']) {
1718
1838
  claudeArgs.push('--dangerously-skip-permissions');
1719
- console.log(chalk.yellow('šŸ”“ Using --dangerously-skip-permissions by default for seamless hive-mind execution'));
1839
+ console.log(
1840
+ chalk.yellow(
1841
+ 'šŸ”“ Using --dangerously-skip-permissions by default for seamless hive-mind execution',
1842
+ ),
1843
+ );
1720
1844
  }
1721
-
1845
+
1722
1846
  // Spawn claude with the prompt as the first argument
1723
1847
  // Use 'inherit' to allow interactive session
1724
1848
  const claudeProcess = childSpawn('claude', claudeArgs, {
1725
1849
  stdio: 'inherit',
1726
- shell: false
1850
+ shell: false,
1727
1851
  });
1728
-
1852
+
1729
1853
  // Handle stdout
1730
1854
  if (claudeProcess.stdout) {
1731
1855
  claudeProcess.stdout.on('data', (data) => {
1732
1856
  console.log(data.toString());
1733
1857
  });
1734
1858
  }
1735
-
1859
+
1736
1860
  // Handle stderr
1737
1861
  if (claudeProcess.stderr) {
1738
1862
  claudeProcess.stderr.on('data', (data) => {
1739
1863
  console.error(chalk.red(data.toString()));
1740
1864
  });
1741
1865
  }
1742
-
1866
+
1743
1867
  // Handle process exit
1744
1868
  claudeProcess.on('exit', (code) => {
1745
1869
  if (code === 0) {
@@ -1748,19 +1872,19 @@ async function spawnClaudeCodeInstances(swarmId, swarmName, objective, workers,
1748
1872
  console.log(chalk.red(`\nāœ— Claude Code exited with code ${code}`));
1749
1873
  }
1750
1874
  });
1751
-
1875
+
1752
1876
  console.log(chalk.green('\nāœ“ Claude Code launched with Hive Mind coordination'));
1753
1877
  console.log(chalk.blue(' The Queen coordinator will orchestrate all worker agents'));
1754
- console.log(chalk.blue(' Use MCP tools for collective intelligence and task distribution'));
1878
+ console.log(
1879
+ chalk.blue(' Use MCP tools for collective intelligence and task distribution'),
1880
+ );
1755
1881
  console.log(chalk.gray(` Prompt file saved at: ${promptFile}`));
1756
-
1757
1882
  } else if (flags.dryRun) {
1758
1883
  console.log(chalk.blue('\nDry run - would execute Claude Code with prompt:'));
1759
1884
  console.log(chalk.gray('Prompt length:'), hiveMindPrompt.length, 'characters');
1760
1885
  console.log(chalk.gray('\nFirst 500 characters of prompt:'));
1761
1886
  console.log(chalk.yellow(hiveMindPrompt.substring(0, 500) + '...'));
1762
1887
  console.log(chalk.gray(`\nFull prompt saved to: ${promptFile}`));
1763
-
1764
1888
  } else {
1765
1889
  // Claude not available - show instructions with already saved prompt
1766
1890
  console.log(chalk.yellow('\nšŸ“‹ Manual Execution Instructions:'));
@@ -1774,24 +1898,22 @@ async function spawnClaudeCodeInstances(swarmId, swarmName, objective, workers,
1774
1898
  console.log(chalk.gray('\n4. With auto-permissions:'));
1775
1899
  console.log(chalk.green(` claude --dangerously-skip-permissions < ${promptFile}`));
1776
1900
  }
1777
-
1778
1901
  } catch (error) {
1779
1902
  console.error(chalk.red('\nFailed to launch Claude Code:'), error.message);
1780
-
1903
+
1781
1904
  // Save prompt as fallback
1782
1905
  const promptFile = `hive-mind-prompt-${swarmId}-fallback.txt`;
1783
1906
  await writeFile(promptFile, hiveMindPrompt, 'utf8');
1784
1907
  console.log(chalk.green(`\nāœ“ Prompt saved to: ${promptFile}`));
1785
1908
  console.log(chalk.yellow('\nYou can run Claude Code manually with the saved prompt'));
1786
1909
  }
1787
-
1910
+
1788
1911
  console.log('\n' + chalk.bold('šŸ’” Pro Tips:'));
1789
1912
  console.log(chalk.gray('─'.repeat(30)));
1790
1913
  console.log('• Use --auto-spawn to launch instances automatically');
1791
1914
  console.log('• Add --verbose for detailed coordination context');
1792
1915
  console.log('• Monitor with: claude-flow hive-mind status');
1793
1916
  console.log('• Share memories: mcp__ruv-swarm__memory_usage');
1794
-
1795
1917
  } catch (error) {
1796
1918
  spinner.fail('Failed to prepare Claude Code coordination');
1797
1919
  console.error(chalk.red('Error:'), error.message);
@@ -1806,7 +1928,7 @@ function generateHiveMindPrompt(swarmId, swarmName, objective, workers, workerGr
1806
1928
  const workerTypes = Object.keys(workerGroups);
1807
1929
  const queenType = flags.queenType || 'strategic';
1808
1930
  const consensusAlgorithm = flags.consensus || 'majority';
1809
-
1931
+
1810
1932
  return `🧠 HIVE MIND COLLECTIVE INTELLIGENCE SYSTEM
1811
1933
  ═══════════════════════════════════════════════
1812
1934
 
@@ -1822,7 +1944,7 @@ HIVE MIND CONFIGURATION:
1822
1944
  ā° Initialized: ${currentTime}
1823
1945
 
1824
1946
  WORKER DISTRIBUTION:
1825
- ${workerTypes.map(type => `• ${type}: ${workerGroups[type].length} agents`).join('\n')}
1947
+ ${workerTypes.map((type) => `• ${type}: ${workerGroups[type].length} agents`).join('\n')}
1826
1948
 
1827
1949
  šŸ”§ AVAILABLE MCP TOOLS FOR HIVE MIND COORDINATION:
1828
1950
 
@@ -1862,7 +1984,7 @@ As the Queen coordinator, you must:
1862
1984
 
1863
1985
  1. **INITIALIZE THE HIVE** (Single BatchTool Message):
1864
1986
  [BatchTool]:
1865
- ${workerTypes.map(type => ` mcp__claude-flow__agent_spawn { "type": "${type}", "count": ${workerGroups[type].length} }`).join('\n')}
1987
+ ${workerTypes.map((type) => ` mcp__claude-flow__agent_spawn { "type": "${type}", "count": ${workerGroups[type].length} }`).join('\n')}
1866
1988
  mcp__claude-flow__memory_store { "key": "hive/objective", "value": "${objective}" }
1867
1989
  mcp__claude-flow__memory_store { "key": "hive/queen", "value": "${queenType}" }
1868
1990
  mcp__claude-flow__swarm_think { "topic": "initial_strategy" }
@@ -1875,21 +1997,33 @@ As the Queen coordinator, you must:
1875
1997
  - Coordinate strategy with swarm_think
1876
1998
 
1877
1999
  3. **QUEEN LEADERSHIP PATTERNS**:
1878
- ${queenType === 'strategic' ? `
2000
+ ${
2001
+ queenType === 'strategic'
2002
+ ? `
1879
2003
  - Focus on high-level planning and coordination
1880
2004
  - Delegate implementation details to workers
1881
2005
  - Monitor overall progress and adjust strategy
1882
- - Make executive decisions when consensus fails` : ''}
1883
- ${queenType === 'tactical' ? `
2006
+ - Make executive decisions when consensus fails`
2007
+ : ''
2008
+ }
2009
+ ${
2010
+ queenType === 'tactical'
2011
+ ? `
1884
2012
  - Manage detailed task breakdowns and assignments
1885
2013
  - Closely monitor worker progress and efficiency
1886
2014
  - Optimize resource allocation and load balancing
1887
- - Intervene directly when workers need guidance` : ''}
1888
- ${queenType === 'adaptive' ? `
2015
+ - Intervene directly when workers need guidance`
2016
+ : ''
2017
+ }
2018
+ ${
2019
+ queenType === 'adaptive'
2020
+ ? `
1889
2021
  - Learn from swarm performance and adapt strategies
1890
2022
  - Experiment with different coordination patterns
1891
2023
  - Use neural training to improve over time
1892
- - Balance between strategic and tactical approaches` : ''}
2024
+ - Balance between strategic and tactical approaches`
2025
+ : ''
2026
+ }
1893
2027
 
1894
2028
  4. **WORKER COORDINATION**:
1895
2029
  - Spawn workers based on task requirements
@@ -1967,24 +2101,24 @@ function generateCoordinationInstructions(swarmId, swarmName, objective, workers
1967
2101
  hiveMindEndpoint: 'ws://localhost:3000/hive-mind',
1968
2102
  mcpTools: [
1969
2103
  'mcp__ruv-swarm__memory_usage',
1970
- 'mcp__ruv-swarm__swarm_monitor',
2104
+ 'mcp__ruv-swarm__swarm_monitor',
1971
2105
  'mcp__ruv-swarm__task_orchestrate',
1972
2106
  'mcp__ruv-swarm__neural_train',
1973
2107
  'mcp__ruv-swarm__consensus_vote',
1974
2108
  'mcp__ruv-swarm__agent_spawn',
1975
- 'mcp__ruv-swarm__swarm_status'
2109
+ 'mcp__ruv-swarm__swarm_status',
1976
2110
  ],
1977
2111
  coordinationProtocol: {
1978
2112
  memoryNamespace: `hive-mind-${swarmId}`,
1979
2113
  consensusThreshold: 0.7,
1980
2114
  taskUpdateInterval: 30000,
1981
- healthCheckInterval: 60000
2115
+ healthCheckInterval: 60000,
1982
2116
  },
1983
- workerCapabilities: workers.map(w => ({
2117
+ workerCapabilities: workers.map((w) => ({
1984
2118
  id: w.id,
1985
2119
  type: w.type,
1986
- capabilities: JSON.parse(w.capabilities)
1987
- }))
2120
+ capabilities: JSON.parse(w.capabilities),
2121
+ })),
1988
2122
  };
1989
2123
  }
1990
2124
 
@@ -2004,7 +2138,14 @@ function groupWorkersByType(workers) {
2004
2138
  /**
2005
2139
  * Create Claude Code spawn command with coordination context
2006
2140
  */
2007
- function createClaudeCodeSpawnCommand(swarmId, swarmName, objective, workerType, typeWorkers, instructions) {
2141
+ function createClaudeCodeSpawnCommand(
2142
+ swarmId,
2143
+ swarmName,
2144
+ objective,
2145
+ workerType,
2146
+ typeWorkers,
2147
+ instructions,
2148
+ ) {
2008
2149
  const context = `You are a ${workerType} agent in the "${swarmName}" Hive Mind swarm.
2009
2150
 
2010
2151
  šŸŽÆ MISSION: ${objective}
@@ -2046,13 +2187,13 @@ ${getWorkerTypeInstructions(workerType)}
2046
2187
  Remember: You are part of a COLLECTIVE INTELLIGENCE. Your individual success depends on swarm coordination!`;
2047
2188
 
2048
2189
  const command = `claude code --context "${context.replace(/"/g, '\\"')}"`;
2049
-
2190
+
2050
2191
  return {
2051
2192
  title: `${workerType.toUpperCase()} Agent (${typeWorkers.length} instance${typeWorkers.length > 1 ? 's' : ''})`,
2052
2193
  command,
2053
2194
  context,
2054
2195
  workerType,
2055
- count: typeWorkers.length
2196
+ count: typeWorkers.length,
2056
2197
  };
2057
2198
  }
2058
2199
 
@@ -2066,43 +2207,46 @@ function getWorkerTypeInstructions(workerType) {
2066
2207
  - Validate source credibility and relevance
2067
2208
  - Synthesize insights from multiple sources
2068
2209
  - Share research methodology and results`,
2069
-
2210
+
2070
2211
  coder: `- Write clean, maintainable, well-documented code
2071
2212
  - Follow project conventions and best practices
2072
2213
  - Test implementations thoroughly
2073
2214
  - Document code changes and decisions
2074
2215
  - Review and optimize existing code`,
2075
-
2216
+
2076
2217
  analyst: `- Analyze data patterns and trends
2077
2218
  - Create comprehensive reports and visualizations
2078
2219
  - Identify key insights and recommendations
2079
2220
  - Validate analytical methodologies
2080
2221
  - Correlate findings across data sources`,
2081
-
2222
+
2082
2223
  tester: `- Design comprehensive test strategies
2083
2224
  - Execute functional, integration, and performance tests
2084
2225
  - Document test results and issues
2085
2226
  - Verify bug fixes and improvements
2086
2227
  - Ensure quality standards and coverage`,
2087
-
2228
+
2088
2229
  coordinator: `- Monitor overall progress and coordination
2089
2230
  - Facilitate communication between agents
2090
2231
  - Resolve conflicts and blockers
2091
2232
  - Optimize resource allocation
2092
2233
  - Ensure alignment with objectives`,
2093
-
2234
+
2094
2235
  architect: `- Design system architecture and components
2095
2236
  - Define technical standards and patterns
2096
2237
  - Create implementation guidelines
2097
2238
  - Review and approve design decisions
2098
- - Ensure scalability and maintainability`
2239
+ - Ensure scalability and maintainability`,
2099
2240
  };
2100
-
2101
- return instructions[workerType] || `- Execute tasks according to ${workerType} best practices
2241
+
2242
+ return (
2243
+ instructions[workerType] ||
2244
+ `- Execute tasks according to ${workerType} best practices
2102
2245
  - Collaborate effectively with team members
2103
2246
  - Document work and share insights
2104
2247
  - Maintain quality standards
2105
- - Contribute to collective objectives`;
2248
+ - Contribute to collective objectives`
2249
+ );
2106
2250
  }
2107
2251
 
2108
2252
  /**
@@ -2112,21 +2256,21 @@ async function showSessions(flags) {
2112
2256
  try {
2113
2257
  const sessionManager = new HiveMindSessionManager();
2114
2258
  const sessions = sessionManager.getActiveSessions();
2115
-
2259
+
2116
2260
  if (sessions.length === 0) {
2117
2261
  console.log(chalk.gray('No active or paused sessions found'));
2118
2262
  sessionManager.close();
2119
2263
  return;
2120
2264
  }
2121
-
2265
+
2122
2266
  console.log(chalk.bold('\nšŸ—‚ļø Hive Mind Sessions\n'));
2123
-
2267
+
2124
2268
  sessions.forEach((session, index) => {
2125
- const statusColor = session.status === 'active' ? 'green' :
2126
- session.status === 'paused' ? 'yellow' : 'gray';
2127
- const statusIcon = session.status === 'active' ? '🟢' :
2128
- session.status === 'paused' ? '🟔' : '⚫';
2129
-
2269
+ const statusColor =
2270
+ session.status === 'active' ? 'green' : session.status === 'paused' ? 'yellow' : 'gray';
2271
+ const statusIcon =
2272
+ session.status === 'active' ? '🟢' : session.status === 'paused' ? '🟔' : '⚫';
2273
+
2130
2274
  console.log(chalk.yellow('═'.repeat(60)));
2131
2275
  console.log(`${statusIcon} ${chalk.bold(session.swarm_name)}`);
2132
2276
  console.log(chalk.cyan('Session ID:'), session.id);
@@ -2135,29 +2279,30 @@ async function showSessions(flags) {
2135
2279
  console.log(chalk.cyan('Progress:'), `${session.completion_percentage}%`);
2136
2280
  console.log(chalk.cyan('Created:'), new Date(session.created_at).toLocaleString());
2137
2281
  console.log(chalk.cyan('Last Updated:'), new Date(session.updated_at).toLocaleString());
2138
-
2282
+
2139
2283
  if (session.paused_at) {
2140
2284
  console.log(chalk.cyan('Paused At:'), new Date(session.paused_at).toLocaleString());
2141
2285
  }
2142
-
2286
+
2143
2287
  console.log('\n' + chalk.bold('Progress:'));
2144
2288
  console.log(` Agents: ${session.agent_count || 0}`);
2145
2289
  console.log(` Tasks: ${session.completed_tasks || 0}/${session.task_count || 0}`);
2146
-
2290
+
2147
2291
  if (session.checkpoint_data) {
2148
2292
  console.log('\n' + chalk.bold('Last Checkpoint:'));
2149
- console.log(chalk.gray(JSON.stringify(session.checkpoint_data, null, 2).substring(0, 200) + '...'));
2293
+ console.log(
2294
+ chalk.gray(JSON.stringify(session.checkpoint_data, null, 2).substring(0, 200) + '...'),
2295
+ );
2150
2296
  }
2151
2297
  });
2152
-
2298
+
2153
2299
  console.log(chalk.yellow('═'.repeat(60)) + '\n');
2154
-
2300
+
2155
2301
  console.log(chalk.blue('šŸ’” Tips:'));
2156
2302
  console.log(' • Resume a session: claude-flow hive-mind resume <session-id>');
2157
2303
  console.log(' • View session details: claude-flow hive-mind status');
2158
-
2304
+
2159
2305
  sessionManager.close();
2160
-
2161
2306
  } catch (error) {
2162
2307
  console.error(chalk.red('Error:'), error.message);
2163
2308
  exit(1);
@@ -2169,41 +2314,41 @@ async function showSessions(flags) {
2169
2314
  */
2170
2315
  async function resumeSession(args, flags) {
2171
2316
  const sessionId = args[0];
2172
-
2317
+
2173
2318
  if (!sessionId) {
2174
2319
  console.error(chalk.red('Error: Please provide a session ID'));
2175
2320
  console.log('Usage: claude-flow hive-mind resume <session-id>');
2176
2321
  console.log('Run "claude-flow hive-mind sessions" to see available sessions');
2177
2322
  return;
2178
2323
  }
2179
-
2324
+
2180
2325
  const spinner = ora('Resuming Hive Mind session...').start();
2181
-
2326
+
2182
2327
  try {
2183
2328
  const sessionManager = new HiveMindSessionManager();
2184
-
2329
+
2185
2330
  // Get session details
2186
2331
  const session = sessionManager.getSession(sessionId);
2187
-
2332
+
2188
2333
  if (!session) {
2189
2334
  spinner.fail(`Session ${sessionId} not found`);
2190
2335
  console.log('\nRun "claude-flow hive-mind sessions" to see available sessions');
2191
2336
  sessionManager.close();
2192
2337
  return;
2193
2338
  }
2194
-
2339
+
2195
2340
  // Allow resuming any session regardless of status
2196
2341
  spinner.text = `Resuming session from status: ${session.status}...`;
2197
-
2342
+
2198
2343
  if (session.status === 'stopped') {
2199
2344
  spinner.text = 'Restarting stopped session with original configuration...';
2200
2345
  }
2201
-
2346
+
2202
2347
  // Resume the session
2203
2348
  const resumedSession = await sessionManager.resumeSession(sessionId);
2204
-
2349
+
2205
2350
  spinner.succeed('Session resumed successfully!');
2206
-
2351
+
2207
2352
  // Display session summary
2208
2353
  console.log('\n' + chalk.bold('šŸ“‹ Resumed Session Summary:'));
2209
2354
  console.log(chalk.gray('─'.repeat(50)));
@@ -2211,47 +2356,56 @@ async function resumeSession(args, flags) {
2211
2356
  console.log(chalk.cyan('Swarm Name:'), resumedSession.swarm_name);
2212
2357
  console.log(chalk.cyan('Objective:'), resumedSession.objective);
2213
2358
  console.log(chalk.cyan('Progress:'), `${resumedSession.statistics.completionPercentage}%`);
2214
- console.log(chalk.cyan('Active Agents:'), `${resumedSession.statistics.activeAgents}/${resumedSession.statistics.totalAgents}`);
2215
- console.log(chalk.cyan('Tasks:'), `${resumedSession.statistics.completedTasks}/${resumedSession.statistics.totalTasks} completed`);
2359
+ console.log(
2360
+ chalk.cyan('Active Agents:'),
2361
+ `${resumedSession.statistics.activeAgents}/${resumedSession.statistics.totalAgents}`,
2362
+ );
2363
+ console.log(
2364
+ chalk.cyan('Tasks:'),
2365
+ `${resumedSession.statistics.completedTasks}/${resumedSession.statistics.totalTasks} completed`,
2366
+ );
2216
2367
  console.log(chalk.gray('─'.repeat(50)));
2217
-
2368
+
2218
2369
  // Show task breakdown
2219
2370
  console.log('\n' + chalk.bold('šŸ“Š Task Status:'));
2220
2371
  console.log(` āœ… Completed: ${resumedSession.statistics.completedTasks}`);
2221
2372
  console.log(` šŸ”„ In Progress: ${resumedSession.statistics.inProgressTasks}`);
2222
2373
  console.log(` ā³ Pending: ${resumedSession.statistics.pendingTasks}`);
2223
-
2374
+
2224
2375
  // Show recent activity
2225
2376
  if (resumedSession.recentLogs && resumedSession.recentLogs.length > 0) {
2226
2377
  console.log('\n' + chalk.bold('šŸ“œ Recent Activity:'));
2227
- resumedSession.recentLogs.slice(0, 5).forEach(log => {
2378
+ resumedSession.recentLogs.slice(0, 5).forEach((log) => {
2228
2379
  const timestamp = new Date(log.timestamp).toLocaleTimeString();
2229
2380
  console.log(` [${timestamp}] ${log.message}`);
2230
2381
  });
2231
2382
  }
2232
-
2383
+
2233
2384
  // Restore checkpoint if available
2234
2385
  if (resumedSession.checkpoint_data) {
2235
2386
  console.log('\n' + chalk.bold('ā™»ļø Restoring from checkpoint...'));
2236
2387
  console.log(chalk.gray('Checkpoint data available for restoration'));
2237
2388
  }
2238
-
2389
+
2239
2390
  sessionManager.close();
2240
-
2391
+
2241
2392
  // Offer to spawn Claude Code with restored context
2242
2393
  if (flags.claude || flags.spawn) {
2243
2394
  console.log('\n' + chalk.yellow('šŸš€ Launching Claude Code with restored context...'));
2244
-
2395
+
2245
2396
  // Generate prompt with session context
2246
2397
  const restoredPrompt = generateRestoredSessionPrompt(resumedSession);
2247
-
2398
+
2248
2399
  // Launch Claude Code with restored context
2249
2400
  await launchClaudeWithContext(restoredPrompt, flags);
2250
2401
  } else {
2251
- console.log('\n' + chalk.blue('šŸ’” Pro Tip:') + ' Add --claude to spawn Claude Code with restored context');
2402
+ console.log(
2403
+ '\n' +
2404
+ chalk.blue('šŸ’” Pro Tip:') +
2405
+ ' Add --claude to spawn Claude Code with restored context',
2406
+ );
2252
2407
  console.log(chalk.gray(' claude-flow hive-mind resume ' + sessionId + ' --claude'));
2253
2408
  }
2254
-
2255
2409
  } catch (error) {
2256
2410
  spinner.fail('Failed to resume session');
2257
2411
  console.error(chalk.red('Error:'), error.message);
@@ -2264,48 +2418,52 @@ async function resumeSession(args, flags) {
2264
2418
  */
2265
2419
  async function stopSession(args, flags) {
2266
2420
  const sessionId = args[0];
2267
-
2421
+
2268
2422
  if (!sessionId) {
2269
2423
  console.error(chalk.red('Error: Please provide a session ID'));
2270
2424
  console.log('Usage: claude-flow hive-mind stop <session-id>');
2271
2425
  console.log('Run "claude-flow hive-mind sessions" to see available sessions');
2272
2426
  return;
2273
2427
  }
2274
-
2428
+
2275
2429
  const spinner = ora('Stopping Hive Mind session...').start();
2276
-
2430
+
2277
2431
  try {
2278
2432
  const sessionManager = new HiveMindSessionManager();
2279
-
2433
+
2280
2434
  // Get session details
2281
2435
  const session = sessionManager.getSession(sessionId);
2282
-
2436
+
2283
2437
  if (!session) {
2284
2438
  spinner.fail(`Session ${sessionId} not found`);
2285
2439
  console.log('\nRun "claude-flow hive-mind sessions" to see available sessions');
2286
2440
  sessionManager.close();
2287
2441
  return;
2288
2442
  }
2289
-
2443
+
2290
2444
  // Stop the session
2291
2445
  await sessionManager.stopSession(sessionId);
2292
-
2446
+
2293
2447
  spinner.succeed('Session stopped successfully!');
2294
-
2448
+
2295
2449
  // Display session summary
2296
2450
  console.log('\n' + chalk.bold('šŸ›‘ Stopped Session Summary:'));
2297
2451
  console.log(chalk.gray('─'.repeat(50)));
2298
2452
  console.log(chalk.cyan('Session ID:'), sessionId);
2299
2453
  console.log(chalk.cyan('Swarm Name:'), session.swarm_name || 'Unknown');
2300
2454
  console.log(chalk.cyan('Final Status:'), 'Stopped');
2301
- console.log(chalk.cyan('Active Agents:'), session.statistics ? session.statistics.activeAgents : 0);
2455
+ console.log(
2456
+ chalk.cyan('Active Agents:'),
2457
+ session.statistics ? session.statistics.activeAgents : 0,
2458
+ );
2302
2459
  console.log(chalk.gray('─'.repeat(50)));
2303
-
2460
+
2304
2461
  console.log('\n' + chalk.yellow('šŸ’” Session has been stopped and all processes cleaned up.'));
2305
- console.log(chalk.gray('To resume this session later, use: claude-flow hive-mind resume ' + sessionId));
2306
-
2462
+ console.log(
2463
+ chalk.gray('To resume this session later, use: claude-flow hive-mind resume ' + sessionId),
2464
+ );
2465
+
2307
2466
  sessionManager.close();
2308
-
2309
2467
  } catch (error) {
2310
2468
  spinner.fail('Failed to stop session');
2311
2469
  console.error(chalk.red('Error:'), error.message);
@@ -2317,9 +2475,11 @@ async function stopSession(args, flags) {
2317
2475
  * Generate prompt for restored session
2318
2476
  */
2319
2477
  function generateRestoredSessionPrompt(session) {
2320
- const activeAgents = session.agents.filter(a => a.status === 'active' || a.status === 'busy');
2321
- const pendingTasks = session.tasks.filter(t => t.status === 'pending' || t.status === 'in_progress');
2322
-
2478
+ const activeAgents = session.agents.filter((a) => a.status === 'active' || a.status === 'busy');
2479
+ const pendingTasks = session.tasks.filter(
2480
+ (t) => t.status === 'pending' || t.status === 'in_progress',
2481
+ );
2482
+
2323
2483
  return `šŸ”„ RESUMING HIVE MIND SESSION
2324
2484
  ═══════════════════════════════════
2325
2485
 
@@ -2340,17 +2500,23 @@ CURRENT STATUS:
2340
2500
  • Pending Tasks: ${pendingTasks.length}
2341
2501
 
2342
2502
  ACTIVE AGENTS:
2343
- ${activeAgents.map(agent => `• ${agent.name} (${agent.type}) - ${agent.status}`).join('\n')}
2503
+ ${activeAgents.map((agent) => `• ${agent.name} (${agent.type}) - ${agent.status}`).join('\n')}
2344
2504
 
2345
2505
  PENDING TASKS:
2346
- ${pendingTasks.slice(0, 10).map(task => `• [${task.priority}] ${task.description}`).join('\n')}
2506
+ ${pendingTasks
2507
+ .slice(0, 10)
2508
+ .map((task) => `• [${task.priority}] ${task.description}`)
2509
+ .join('\n')}
2347
2510
  ${pendingTasks.length > 10 ? `... and ${pendingTasks.length - 10} more tasks` : ''}
2348
2511
 
2349
2512
  CHECKPOINT DATA:
2350
2513
  ${session.checkpoint_data ? JSON.stringify(session.checkpoint_data, null, 2) : 'No checkpoint data available'}
2351
2514
 
2352
2515
  RECENT ACTIVITY:
2353
- ${session.recentLogs.slice(0, 10).map(log => `[${new Date(log.timestamp).toLocaleTimeString()}] ${log.message}`).join('\n')}
2516
+ ${session.recentLogs
2517
+ .slice(0, 10)
2518
+ .map((log) => `[${new Date(log.timestamp).toLocaleTimeString()}] ${log.message}`)
2519
+ .join('\n')}
2354
2520
 
2355
2521
  šŸŽÆ RESUMPTION PROTOCOL:
2356
2522
 
@@ -2381,10 +2547,10 @@ async function launchClaudeWithContext(prompt, flags) {
2381
2547
  const promptFile = `hive-mind-resume-${Date.now()}.txt`;
2382
2548
  await writeFile(promptFile, prompt);
2383
2549
  console.log(chalk.green(`\nāœ“ Session context saved to: ${promptFile}`));
2384
-
2550
+
2385
2551
  const { spawn: childSpawn, execSync } = await import('child_process');
2386
2552
  let claudeAvailable = false;
2387
-
2553
+
2388
2554
  try {
2389
2555
  execSync('which claude', { stdio: 'ignore' });
2390
2556
  claudeAvailable = true;
@@ -2394,34 +2560,34 @@ async function launchClaudeWithContext(prompt, flags) {
2394
2560
  console.log(chalk.gray(`Run with: claude < ${promptFile}`));
2395
2561
  return;
2396
2562
  }
2397
-
2563
+
2398
2564
  if (claudeAvailable && !flags.dryRun) {
2399
2565
  const claudeArgs = [prompt, '--print'];
2400
-
2566
+
2401
2567
  if (flags['dangerously-skip-permissions'] !== false && !flags['no-auto-permissions']) {
2402
2568
  claudeArgs.push('--dangerously-skip-permissions');
2403
2569
  }
2404
-
2570
+
2405
2571
  // Use 'pipe' instead of 'inherit' to prevent terminal conflicts
2406
2572
  const claudeProcess = childSpawn('claude', claudeArgs, {
2407
2573
  stdio: 'pipe',
2408
- shell: false
2574
+ shell: false,
2409
2575
  });
2410
-
2576
+
2411
2577
  // Handle stdout
2412
2578
  if (claudeProcess.stdout) {
2413
2579
  claudeProcess.stdout.on('data', (data) => {
2414
2580
  console.log(data.toString());
2415
2581
  });
2416
2582
  }
2417
-
2583
+
2418
2584
  // Handle stderr
2419
2585
  if (claudeProcess.stderr) {
2420
2586
  claudeProcess.stderr.on('data', (data) => {
2421
2587
  console.error(chalk.red(data.toString()));
2422
2588
  });
2423
2589
  }
2424
-
2590
+
2425
2591
  // Handle process exit
2426
2592
  claudeProcess.on('exit', (code) => {
2427
2593
  if (code === 0) {
@@ -2430,7 +2596,7 @@ async function launchClaudeWithContext(prompt, flags) {
2430
2596
  console.log(chalk.red(`\nāœ— Claude Code exited with code ${code}`));
2431
2597
  }
2432
2598
  });
2433
-
2599
+
2434
2600
  console.log(chalk.green('\nāœ“ Claude Code launched with restored session context'));
2435
2601
  console.log(chalk.gray(` Prompt file saved at: ${promptFile}`));
2436
2602
  }
@@ -2448,4 +2614,4 @@ async function getMcpWrapper() {
2448
2614
  }
2449
2615
 
2450
2616
  // Export for testing
2451
- export { showHiveMindHelp, initHiveMind, spawnSwarm, showStatus };
2617
+ export { showHiveMindHelp, initHiveMind, spawnSwarm, showStatus };