claude-flow 2.7.0 → 2.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1135) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/README.md +83 -22
  3. package/bin/claude-flow +1 -1
  4. package/dist/src/cli/commands/memory.js +64 -1
  5. package/dist/src/cli/commands/memory.js.map +1 -1
  6. package/dist/src/cli/help-formatter.js +3 -5
  7. package/dist/src/cli/help-formatter.js.map +1 -1
  8. package/dist/src/cli/simple-cli.js +104 -0
  9. package/dist/src/cli/simple-cli.js.map +1 -1
  10. package/dist/src/cli/validation-helper.js.map +1 -1
  11. package/dist/src/core/version.js +1 -1
  12. package/dist/src/core/version.js.map +1 -1
  13. package/dist/src/mcp/mcp-server.js +261 -3
  14. package/dist/src/mcp/mcp-server.js.map +1 -1
  15. package/dist/src/memory/agentdb-adapter.js +214 -0
  16. package/dist/src/memory/agentdb-adapter.js.map +1 -0
  17. package/dist/src/memory/backends/agentdb.js +234 -0
  18. package/dist/src/memory/backends/agentdb.js.map +1 -0
  19. package/dist/src/memory/index.js +11 -2
  20. package/dist/src/memory/index.js.map +1 -1
  21. package/dist/src/memory/migration/legacy-bridge.js +222 -0
  22. package/dist/src/memory/migration/legacy-bridge.js.map +1 -0
  23. package/dist/src/memory/swarm-memory.js +421 -340
  24. package/dist/src/memory/swarm-memory.js.map +1 -1
  25. package/dist/src/utils/metrics-reader.js +41 -29
  26. package/dist/src/utils/metrics-reader.js.map +1 -1
  27. package/docs/.claude-flow/metrics/performance.json +80 -2
  28. package/docs/.claude-flow/metrics/task-metrics.json +3 -3
  29. package/docs/INDEX.md +37 -12
  30. package/docs/README.md +92 -4
  31. package/docs/agentdb/AGENT3_FINAL_REPORT.md +643 -0
  32. package/docs/agentdb/AGENT3_SUMMARY.md +354 -0
  33. package/docs/agentdb/AGENTDB_INTEGRATION_PLAN.md +1258 -0
  34. package/docs/agentdb/BACKWARD_COMPATIBILITY_GUARANTEE.md +421 -0
  35. package/docs/agentdb/OPTIMIZATION_REPORT.md +360 -0
  36. package/docs/agentdb/PRODUCTION_READINESS.md +499 -0
  37. package/docs/agentdb/PUBLISHING_CHECKLIST.md +364 -0
  38. package/docs/agentdb/README.md +58 -0
  39. package/docs/agentdb/SWARM_COORDINATION.md +393 -0
  40. package/docs/agentdb/SWARM_IMPLEMENTATION_COMPLETE.md +538 -0
  41. package/docs/agentdb/agentdb-integration-summary.md +331 -0
  42. package/docs/agentdb/benchmarks/baseline-report.json +75 -0
  43. package/docs/development/AGENT1_COMPLETION_REPORT.md +466 -0
  44. package/docs/development/README.md +22 -0
  45. package/docs/fixes/PATTERN_FIX_CONFIRMATION.md +513 -0
  46. package/docs/fixes/PATTERN_PERSISTENCE_FIX.md +328 -0
  47. package/docs/fixes/README.md +33 -0
  48. package/docs/guides/README.md +29 -0
  49. package/docs/{skills-tutorial.md → guides/skills-tutorial.md} +2 -2
  50. package/docs/integrations/agentic-flow/INTEGRATION-TEST-v1.7.1.md +419 -0
  51. package/docs/integrations/agentic-flow/MIGRATION_v1.7.0.md +381 -0
  52. package/docs/integrations/agentic-flow/README.md +229 -0
  53. package/docs/integrations/agentic-flow/RELEASE-v1.7.0.md +348 -0
  54. package/docs/integrations/agentic-flow/RELEASE-v1.7.1.md +547 -0
  55. package/docs/integrations/agentic-flow/VERIFICATION-v1.7.4.md +556 -0
  56. package/docs/performance/README.md +31 -0
  57. package/docs/releases/ALPHA_TAG_UPDATE.md +150 -0
  58. package/docs/releases/README.md +25 -0
  59. package/docs/{RELEASE-NOTES-v2.7.0-alpha.10.md → releases/v2.7.0-alpha.10/RELEASE-NOTES-v2.7.0-alpha.10.md} +1 -1
  60. package/docs/releases/v2.7.1/RELEASE_SUMMARY_v2.7.1.md +340 -0
  61. package/docs/releases/v2.7.1/RELEASE_v2.7.1.md +244 -0
  62. package/docs/validation/DOCKER_VERIFICATION_REPORT.md +371 -0
  63. package/docs/validation/README.md +25 -0
  64. package/docs/validation/REGRESSION_ANALYSIS_v2.7.1.md +357 -0
  65. package/package.json +4 -3
  66. package/scripts/fix-agentdb-imports.sh +18 -0
  67. package/scripts/run-docker-regression.sh +101 -0
  68. package/scripts/verify-agentdb-integration.sh +220 -0
  69. package/src/cli/commands/memory.ts +95 -1
  70. package/src/mcp/mcp-server.js +302 -2
  71. package/src/memory/README-AGENTDB.md +366 -0
  72. package/src/memory/agentdb-adapter.js +373 -0
  73. package/src/memory/backends/agentdb.js +360 -0
  74. package/src/memory/index.js +32 -3
  75. package/src/memory/migration/legacy-bridge.js +330 -0
  76. package/dist/agents/agent-loader.d.ts +0 -103
  77. package/dist/agents/agent-loader.d.ts.map +0 -1
  78. package/dist/agents/agent-loader.js +0 -220
  79. package/dist/agents/agent-loader.js.map +0 -1
  80. package/dist/agents/agent-manager.d.ts +0 -191
  81. package/dist/agents/agent-manager.d.ts.map +0 -1
  82. package/dist/agents/agent-manager.js +0 -1405
  83. package/dist/agents/agent-manager.js.map +0 -1
  84. package/dist/api/claude-api-errors.d.ts +0 -115
  85. package/dist/api/claude-api-errors.d.ts.map +0 -1
  86. package/dist/api/claude-api-errors.js +0 -198
  87. package/dist/api/claude-api-errors.js.map +0 -1
  88. package/dist/api/claude-client.d.ts +0 -197
  89. package/dist/api/claude-client.d.ts.map +0 -1
  90. package/dist/api/claude-client.js +0 -525
  91. package/dist/api/claude-client.js.map +0 -1
  92. package/dist/cli/cli-core.d.ts +0 -52
  93. package/dist/cli/cli-core.d.ts.map +0 -1
  94. package/dist/cli/cli-core.js +0 -264
  95. package/dist/cli/cli-core.js.map +0 -1
  96. package/dist/cli/command-registry.d.ts +0 -10
  97. package/dist/cli/command-registry.d.ts.map +0 -1
  98. package/dist/cli/command-registry.js +0 -1126
  99. package/dist/cli/command-registry.js.map +0 -1
  100. package/dist/cli/commander-fix.d.ts +0 -4
  101. package/dist/cli/commander-fix.d.ts.map +0 -1
  102. package/dist/cli/commander-fix.js +0 -6
  103. package/dist/cli/commander-fix.js.map +0 -1
  104. package/dist/cli/commands/agent.d.ts +0 -6
  105. package/dist/cli/commands/agent.d.ts.map +0 -1
  106. package/dist/cli/commands/agent.js +0 -382
  107. package/dist/cli/commands/agent.js.map +0 -1
  108. package/dist/cli/commands/config.d.ts +0 -4
  109. package/dist/cli/commands/config.d.ts.map +0 -1
  110. package/dist/cli/commands/config.js +0 -88
  111. package/dist/cli/commands/config.js.map +0 -1
  112. package/dist/cli/commands/enterprise.d.ts +0 -3
  113. package/dist/cli/commands/enterprise.d.ts.map +0 -1
  114. package/dist/cli/commands/enterprise.js +0 -1506
  115. package/dist/cli/commands/enterprise.js.map +0 -1
  116. package/dist/cli/commands/help.d.ts +0 -6
  117. package/dist/cli/commands/help.d.ts.map +0 -1
  118. package/dist/cli/commands/help.js +0 -936
  119. package/dist/cli/commands/help.js.map +0 -1
  120. package/dist/cli/commands/hive-mind/index.d.ts +0 -18
  121. package/dist/cli/commands/hive-mind/index.d.ts.map +0 -1
  122. package/dist/cli/commands/hive-mind/index.js +0 -30
  123. package/dist/cli/commands/hive-mind/index.js.map +0 -1
  124. package/dist/cli/commands/hive-mind/init.d.ts +0 -9
  125. package/dist/cli/commands/hive-mind/init.d.ts.map +0 -1
  126. package/dist/cli/commands/hive-mind/init.js +0 -68
  127. package/dist/cli/commands/hive-mind/init.js.map +0 -1
  128. package/dist/cli/commands/hive-mind/pause.d.ts +0 -8
  129. package/dist/cli/commands/hive-mind/pause.d.ts.map +0 -1
  130. package/dist/cli/commands/hive-mind/pause.js +0 -81
  131. package/dist/cli/commands/hive-mind/pause.js.map +0 -1
  132. package/dist/cli/commands/hive-mind/ps.d.ts +0 -8
  133. package/dist/cli/commands/hive-mind/ps.d.ts.map +0 -1
  134. package/dist/cli/commands/hive-mind/ps.js +0 -120
  135. package/dist/cli/commands/hive-mind/ps.js.map +0 -1
  136. package/dist/cli/commands/hive-mind/resume.d.ts +0 -8
  137. package/dist/cli/commands/hive-mind/resume.d.ts.map +0 -1
  138. package/dist/cli/commands/hive-mind/resume.js +0 -62
  139. package/dist/cli/commands/hive-mind/resume.js.map +0 -1
  140. package/dist/cli/commands/hive-mind/spawn.d.ts +0 -9
  141. package/dist/cli/commands/hive-mind/spawn.d.ts.map +0 -1
  142. package/dist/cli/commands/hive-mind/spawn.js +0 -174
  143. package/dist/cli/commands/hive-mind/spawn.js.map +0 -1
  144. package/dist/cli/commands/hive-mind/status.d.ts +0 -9
  145. package/dist/cli/commands/hive-mind/status.d.ts.map +0 -1
  146. package/dist/cli/commands/hive-mind/status.js +0 -204
  147. package/dist/cli/commands/hive-mind/status.js.map +0 -1
  148. package/dist/cli/commands/hive-mind/stop.d.ts +0 -8
  149. package/dist/cli/commands/hive-mind/stop.d.ts.map +0 -1
  150. package/dist/cli/commands/hive-mind/stop.js +0 -125
  151. package/dist/cli/commands/hive-mind/stop.js.map +0 -1
  152. package/dist/cli/commands/hive-mind/task.d.ts +0 -9
  153. package/dist/cli/commands/hive-mind/task.d.ts.map +0 -1
  154. package/dist/cli/commands/hive-mind/task.js +0 -294
  155. package/dist/cli/commands/hive-mind/task.js.map +0 -1
  156. package/dist/cli/commands/hive-mind/wizard.d.ts +0 -9
  157. package/dist/cli/commands/hive-mind/wizard.d.ts.map +0 -1
  158. package/dist/cli/commands/hive-mind/wizard.js +0 -531
  159. package/dist/cli/commands/hive-mind/wizard.js.map +0 -1
  160. package/dist/cli/commands/hive.d.ts +0 -6
  161. package/dist/cli/commands/hive.d.ts.map +0 -1
  162. package/dist/cli/commands/hive.js +0 -409
  163. package/dist/cli/commands/hive.js.map +0 -1
  164. package/dist/cli/commands/index.d.ts +0 -3
  165. package/dist/cli/commands/index.d.ts.map +0 -1
  166. package/dist/cli/commands/index.js +0 -2624
  167. package/dist/cli/commands/index.js.map +0 -1
  168. package/dist/cli/commands/mcp.d.ts +0 -5
  169. package/dist/cli/commands/mcp.d.ts.map +0 -1
  170. package/dist/cli/commands/mcp.js +0 -169
  171. package/dist/cli/commands/mcp.js.map +0 -1
  172. package/dist/cli/commands/memory.d.ts +0 -26
  173. package/dist/cli/commands/memory.d.ts.map +0 -1
  174. package/dist/cli/commands/memory.js +0 -225
  175. package/dist/cli/commands/memory.js.map +0 -1
  176. package/dist/cli/commands/migrate.d.ts +0 -5
  177. package/dist/cli/commands/migrate.d.ts.map +0 -1
  178. package/dist/cli/commands/migrate.js +0 -139
  179. package/dist/cli/commands/migrate.js.map +0 -1
  180. package/dist/cli/commands/monitor.d.ts +0 -5
  181. package/dist/cli/commands/monitor.d.ts.map +0 -1
  182. package/dist/cli/commands/monitor.js +0 -493
  183. package/dist/cli/commands/monitor.js.map +0 -1
  184. package/dist/cli/commands/session.d.ts +0 -5
  185. package/dist/cli/commands/session.d.ts.map +0 -1
  186. package/dist/cli/commands/session.js +0 -548
  187. package/dist/cli/commands/session.js.map +0 -1
  188. package/dist/cli/commands/sparc.d.ts +0 -3
  189. package/dist/cli/commands/sparc.d.ts.map +0 -1
  190. package/dist/cli/commands/sparc.js +0 -472
  191. package/dist/cli/commands/sparc.js.map +0 -1
  192. package/dist/cli/commands/start/event-emitter.d.ts +0 -13
  193. package/dist/cli/commands/start/event-emitter.d.ts.map +0 -1
  194. package/dist/cli/commands/start/event-emitter.js +0 -35
  195. package/dist/cli/commands/start/event-emitter.js.map +0 -1
  196. package/dist/cli/commands/start/index.d.ts +0 -10
  197. package/dist/cli/commands/start/index.d.ts.map +0 -1
  198. package/dist/cli/commands/start/index.js +0 -9
  199. package/dist/cli/commands/start/index.js.map +0 -1
  200. package/dist/cli/commands/start/process-manager.d.ts +0 -31
  201. package/dist/cli/commands/start/process-manager.d.ts.map +0 -1
  202. package/dist/cli/commands/start/process-manager.js +0 -283
  203. package/dist/cli/commands/start/process-manager.js.map +0 -1
  204. package/dist/cli/commands/start/process-ui-simple.d.ts +0 -29
  205. package/dist/cli/commands/start/process-ui-simple.d.ts.map +0 -1
  206. package/dist/cli/commands/start/process-ui-simple.js +0 -334
  207. package/dist/cli/commands/start/process-ui-simple.js.map +0 -1
  208. package/dist/cli/commands/start/process-ui.d.ts +0 -5
  209. package/dist/cli/commands/start/process-ui.d.ts.map +0 -1
  210. package/dist/cli/commands/start/process-ui.js +0 -5
  211. package/dist/cli/commands/start/process-ui.js.map +0 -1
  212. package/dist/cli/commands/start/start-command.d.ts +0 -2
  213. package/dist/cli/commands/start/start-command.d.ts.map +0 -1
  214. package/dist/cli/commands/start/start-command.js +0 -462
  215. package/dist/cli/commands/start/start-command.js.map +0 -1
  216. package/dist/cli/commands/start/system-monitor.d.ts +0 -25
  217. package/dist/cli/commands/start/system-monitor.d.ts.map +0 -1
  218. package/dist/cli/commands/start/system-monitor.js +0 -265
  219. package/dist/cli/commands/start/system-monitor.js.map +0 -1
  220. package/dist/cli/commands/start/types.d.ts +0 -64
  221. package/dist/cli/commands/start/types.d.ts.map +0 -1
  222. package/dist/cli/commands/start/types.js +0 -22
  223. package/dist/cli/commands/start/types.js.map +0 -1
  224. package/dist/cli/commands/start.d.ts +0 -6
  225. package/dist/cli/commands/start.d.ts.map +0 -1
  226. package/dist/cli/commands/start.js +0 -6
  227. package/dist/cli/commands/start.js.map +0 -1
  228. package/dist/cli/commands/status.d.ts +0 -2
  229. package/dist/cli/commands/status.d.ts.map +0 -1
  230. package/dist/cli/commands/status.js +0 -304
  231. package/dist/cli/commands/status.js.map +0 -1
  232. package/dist/cli/commands/swarm.d.ts +0 -6
  233. package/dist/cli/commands/swarm.d.ts.map +0 -1
  234. package/dist/cli/commands/swarm.js +0 -465
  235. package/dist/cli/commands/swarm.js.map +0 -1
  236. package/dist/cli/commands/task.d.ts +0 -2
  237. package/dist/cli/commands/task.d.ts.map +0 -1
  238. package/dist/cli/commands/task.js +0 -75
  239. package/dist/cli/commands/task.js.map +0 -1
  240. package/dist/cli/commands/workflow.d.ts +0 -2
  241. package/dist/cli/commands/workflow.d.ts.map +0 -1
  242. package/dist/cli/commands/workflow.js +0 -624
  243. package/dist/cli/commands/workflow.js.map +0 -1
  244. package/dist/cli/completion.d.ts +0 -19
  245. package/dist/cli/completion.d.ts.map +0 -1
  246. package/dist/cli/completion.js +0 -545
  247. package/dist/cli/completion.js.map +0 -1
  248. package/dist/cli/formatter.d.ts +0 -69
  249. package/dist/cli/formatter.d.ts.map +0 -1
  250. package/dist/cli/formatter.js +0 -277
  251. package/dist/cli/formatter.js.map +0 -1
  252. package/dist/cli/help-formatter.d.ts +0 -49
  253. package/dist/cli/help-formatter.d.ts.map +0 -1
  254. package/dist/cli/help-formatter.js +0 -108
  255. package/dist/cli/help-formatter.js.map +0 -1
  256. package/dist/cli/help-text.d.ts +0 -25
  257. package/dist/cli/help-text.d.ts.map +0 -1
  258. package/dist/cli/help-text.js +0 -1051
  259. package/dist/cli/help-text.js.map +0 -1
  260. package/dist/cli/index-remote.d.ts +0 -7
  261. package/dist/cli/index-remote.d.ts.map +0 -1
  262. package/dist/cli/index-remote.js +0 -125
  263. package/dist/cli/index-remote.js.map +0 -1
  264. package/dist/cli/index.d.ts +0 -7
  265. package/dist/cli/index.d.ts.map +0 -1
  266. package/dist/cli/index.js +0 -189
  267. package/dist/cli/index.js.map +0 -1
  268. package/dist/cli/node-compat.d.ts +0 -81
  269. package/dist/cli/node-compat.d.ts.map +0 -1
  270. package/dist/cli/node-compat.js +0 -229
  271. package/dist/cli/node-compat.js.map +0 -1
  272. package/dist/cli/repl.d.ts +0 -5
  273. package/dist/cli/repl.d.ts.map +0 -1
  274. package/dist/cli/repl.js +0 -949
  275. package/dist/cli/repl.js.map +0 -1
  276. package/dist/cli/runtime-detector.d.ts +0 -128
  277. package/dist/cli/runtime-detector.d.ts.map +0 -1
  278. package/dist/cli/runtime-detector.js +0 -267
  279. package/dist/cli/runtime-detector.js.map +0 -1
  280. package/dist/cli/simple-cli.d.ts +0 -7
  281. package/dist/cli/simple-cli.d.ts.map +0 -1
  282. package/dist/cli/simple-cli.js +0 -3085
  283. package/dist/cli/simple-cli.js.map +0 -1
  284. package/dist/cli/simple-commands/agent.d.ts +0 -6
  285. package/dist/cli/simple-commands/agent.d.ts.map +0 -1
  286. package/dist/cli/simple-commands/agent.js +0 -128
  287. package/dist/cli/simple-commands/agent.js.map +0 -1
  288. package/dist/cli/simple-commands/analysis.d.ts +0 -2
  289. package/dist/cli/simple-commands/analysis.d.ts.map +0 -1
  290. package/dist/cli/simple-commands/analysis.js +0 -473
  291. package/dist/cli/simple-commands/analysis.js.map +0 -1
  292. package/dist/cli/simple-commands/automation-executor.d.ts +0 -188
  293. package/dist/cli/simple-commands/automation-executor.d.ts.map +0 -1
  294. package/dist/cli/simple-commands/automation-executor.js +0 -1383
  295. package/dist/cli/simple-commands/automation-executor.js.map +0 -1
  296. package/dist/cli/simple-commands/automation.d.ts +0 -2
  297. package/dist/cli/simple-commands/automation.d.ts.map +0 -1
  298. package/dist/cli/simple-commands/automation.js +0 -531
  299. package/dist/cli/simple-commands/automation.js.map +0 -1
  300. package/dist/cli/simple-commands/batch-manager.d.ts +0 -2
  301. package/dist/cli/simple-commands/batch-manager.d.ts.map +0 -1
  302. package/dist/cli/simple-commands/batch-manager.js +0 -290
  303. package/dist/cli/simple-commands/batch-manager.js.map +0 -1
  304. package/dist/cli/simple-commands/claude-telemetry.d.ts +0 -14
  305. package/dist/cli/simple-commands/claude-telemetry.d.ts.map +0 -1
  306. package/dist/cli/simple-commands/claude-telemetry.js +0 -263
  307. package/dist/cli/simple-commands/claude-telemetry.js.map +0 -1
  308. package/dist/cli/simple-commands/config.d.ts +0 -6
  309. package/dist/cli/simple-commands/config.d.ts.map +0 -1
  310. package/dist/cli/simple-commands/config.js +0 -116
  311. package/dist/cli/simple-commands/config.js.map +0 -1
  312. package/dist/cli/simple-commands/coordination.d.ts +0 -2
  313. package/dist/cli/simple-commands/coordination.d.ts.map +0 -1
  314. package/dist/cli/simple-commands/coordination.js +0 -249
  315. package/dist/cli/simple-commands/coordination.js.map +0 -1
  316. package/dist/cli/simple-commands/env-template.d.ts +0 -42
  317. package/dist/cli/simple-commands/env-template.d.ts.map +0 -1
  318. package/dist/cli/simple-commands/env-template.js +0 -183
  319. package/dist/cli/simple-commands/env-template.js.map +0 -1
  320. package/dist/cli/simple-commands/fix-hook-variables.d.ts +0 -16
  321. package/dist/cli/simple-commands/fix-hook-variables.d.ts.map +0 -1
  322. package/dist/cli/simple-commands/fix-hook-variables.js +0 -320
  323. package/dist/cli/simple-commands/fix-hook-variables.js.map +0 -1
  324. package/dist/cli/simple-commands/github/init.d.ts +0 -6
  325. package/dist/cli/simple-commands/github/init.d.ts.map +0 -1
  326. package/dist/cli/simple-commands/github/init.js +0 -506
  327. package/dist/cli/simple-commands/github/init.js.map +0 -1
  328. package/dist/cli/simple-commands/github.d.ts +0 -3
  329. package/dist/cli/simple-commands/github.d.ts.map +0 -1
  330. package/dist/cli/simple-commands/github.js +0 -356
  331. package/dist/cli/simple-commands/github.js.map +0 -1
  332. package/dist/cli/simple-commands/goal.d.ts +0 -3
  333. package/dist/cli/simple-commands/goal.d.ts.map +0 -1
  334. package/dist/cli/simple-commands/goal.js +0 -136
  335. package/dist/cli/simple-commands/goal.js.map +0 -1
  336. package/dist/cli/simple-commands/hive-mind/auto-save-middleware.d.ts +0 -68
  337. package/dist/cli/simple-commands/hive-mind/auto-save-middleware.d.ts.map +0 -1
  338. package/dist/cli/simple-commands/hive-mind/auto-save-middleware.js +0 -264
  339. package/dist/cli/simple-commands/hive-mind/auto-save-middleware.js.map +0 -1
  340. package/dist/cli/simple-commands/hive-mind/communication.d.ts +0 -176
  341. package/dist/cli/simple-commands/hive-mind/communication.d.ts.map +0 -1
  342. package/dist/cli/simple-commands/hive-mind/communication.js +0 -611
  343. package/dist/cli/simple-commands/hive-mind/communication.js.map +0 -1
  344. package/dist/cli/simple-commands/hive-mind/core.d.ts +0 -306
  345. package/dist/cli/simple-commands/hive-mind/core.d.ts.map +0 -1
  346. package/dist/cli/simple-commands/hive-mind/core.js +0 -839
  347. package/dist/cli/simple-commands/hive-mind/core.js.map +0 -1
  348. package/dist/cli/simple-commands/hive-mind/db-optimizer.d.ts +0 -32
  349. package/dist/cli/simple-commands/hive-mind/db-optimizer.d.ts.map +0 -1
  350. package/dist/cli/simple-commands/hive-mind/db-optimizer.js +0 -702
  351. package/dist/cli/simple-commands/hive-mind/db-optimizer.js.map +0 -1
  352. package/dist/cli/simple-commands/hive-mind/mcp-wrapper.d.ts +0 -270
  353. package/dist/cli/simple-commands/hive-mind/mcp-wrapper.d.ts.map +0 -1
  354. package/dist/cli/simple-commands/hive-mind/mcp-wrapper.js +0 -1211
  355. package/dist/cli/simple-commands/hive-mind/mcp-wrapper.js.map +0 -1
  356. package/dist/cli/simple-commands/hive-mind/memory.d.ts +0 -334
  357. package/dist/cli/simple-commands/hive-mind/memory.d.ts.map +0 -1
  358. package/dist/cli/simple-commands/hive-mind/memory.js +0 -1068
  359. package/dist/cli/simple-commands/hive-mind/memory.js.map +0 -1
  360. package/dist/cli/simple-commands/hive-mind/metrics-reader.js +0 -274
  361. package/dist/cli/simple-commands/hive-mind/metrics-reader.js.map +0 -1
  362. package/dist/cli/simple-commands/hive-mind/performance-optimizer.d.ts +0 -256
  363. package/dist/cli/simple-commands/hive-mind/performance-optimizer.d.ts.map +0 -1
  364. package/dist/cli/simple-commands/hive-mind/performance-optimizer.js +0 -520
  365. package/dist/cli/simple-commands/hive-mind/performance-optimizer.js.map +0 -1
  366. package/dist/cli/simple-commands/hive-mind/queen.d.ts +0 -235
  367. package/dist/cli/simple-commands/hive-mind/queen.d.ts.map +0 -1
  368. package/dist/cli/simple-commands/hive-mind/queen.js +0 -697
  369. package/dist/cli/simple-commands/hive-mind/queen.js.map +0 -1
  370. package/dist/cli/simple-commands/hive-mind/session-manager.d.ts +0 -140
  371. package/dist/cli/simple-commands/hive-mind/session-manager.d.ts.map +0 -1
  372. package/dist/cli/simple-commands/hive-mind/session-manager.js +0 -1000
  373. package/dist/cli/simple-commands/hive-mind/session-manager.js.map +0 -1
  374. package/dist/cli/simple-commands/hive-mind-optimize.d.ts +0 -6
  375. package/dist/cli/simple-commands/hive-mind-optimize.d.ts.map +0 -1
  376. package/dist/cli/simple-commands/hive-mind-optimize.js +0 -317
  377. package/dist/cli/simple-commands/hive-mind-optimize.js.map +0 -1
  378. package/dist/cli/simple-commands/hive-mind.d.ts +0 -22
  379. package/dist/cli/simple-commands/hive-mind.d.ts.map +0 -1
  380. package/dist/cli/simple-commands/hive-mind.js +0 -2722
  381. package/dist/cli/simple-commands/hive-mind.js.map +0 -1
  382. package/dist/cli/simple-commands/hook-safety.d.ts +0 -177
  383. package/dist/cli/simple-commands/hook-safety.d.ts.map +0 -1
  384. package/dist/cli/simple-commands/hook-safety.js +0 -590
  385. package/dist/cli/simple-commands/hook-safety.js.map +0 -1
  386. package/dist/cli/simple-commands/hooks.d.ts +0 -3
  387. package/dist/cli/simple-commands/hooks.d.ts.map +0 -1
  388. package/dist/cli/simple-commands/hooks.js +0 -1298
  389. package/dist/cli/simple-commands/hooks.js.map +0 -1
  390. package/dist/cli/simple-commands/init/agent-copier.d.ts +0 -65
  391. package/dist/cli/simple-commands/init/agent-copier.d.ts.map +0 -1
  392. package/dist/cli/simple-commands/init/agent-copier.js +0 -320
  393. package/dist/cli/simple-commands/init/agent-copier.js.map +0 -1
  394. package/dist/cli/simple-commands/init/batch-init.d.ts +0 -137
  395. package/dist/cli/simple-commands/init/batch-init.d.ts.map +0 -1
  396. package/dist/cli/simple-commands/init/batch-init.js +0 -558
  397. package/dist/cli/simple-commands/init/batch-init.js.map +0 -1
  398. package/dist/cli/simple-commands/init/claude-commands/claude-flow-commands.d.ts +0 -2
  399. package/dist/cli/simple-commands/init/claude-commands/claude-flow-commands.d.ts.map +0 -1
  400. package/dist/cli/simple-commands/init/claude-commands/claude-flow-commands.js +0 -433
  401. package/dist/cli/simple-commands/init/claude-commands/claude-flow-commands.js.map +0 -1
  402. package/dist/cli/simple-commands/init/claude-commands/optimized-claude-flow-commands.d.ts +0 -2
  403. package/dist/cli/simple-commands/init/claude-commands/optimized-claude-flow-commands.d.ts.map +0 -1
  404. package/dist/cli/simple-commands/init/claude-commands/optimized-claude-flow-commands.js +0 -871
  405. package/dist/cli/simple-commands/init/claude-commands/optimized-claude-flow-commands.js.map +0 -1
  406. package/dist/cli/simple-commands/init/claude-commands/optimized-slash-commands.d.ts +0 -2
  407. package/dist/cli/simple-commands/init/claude-commands/optimized-slash-commands.d.ts.map +0 -1
  408. package/dist/cli/simple-commands/init/claude-commands/optimized-slash-commands.js +0 -332
  409. package/dist/cli/simple-commands/init/claude-commands/optimized-slash-commands.js.map +0 -1
  410. package/dist/cli/simple-commands/init/claude-commands/optimized-sparc-commands.d.ts +0 -3
  411. package/dist/cli/simple-commands/init/claude-commands/optimized-sparc-commands.d.ts.map +0 -1
  412. package/dist/cli/simple-commands/init/claude-commands/optimized-sparc-commands.js +0 -488
  413. package/dist/cli/simple-commands/init/claude-commands/optimized-sparc-commands.js.map +0 -1
  414. package/dist/cli/simple-commands/init/claude-commands/slash-commands.d.ts +0 -2
  415. package/dist/cli/simple-commands/init/claude-commands/slash-commands.d.ts.map +0 -1
  416. package/dist/cli/simple-commands/init/claude-commands/slash-commands.js +0 -51
  417. package/dist/cli/simple-commands/init/claude-commands/slash-commands.js.map +0 -1
  418. package/dist/cli/simple-commands/init/claude-commands/sparc-commands.d.ts +0 -3
  419. package/dist/cli/simple-commands/init/claude-commands/sparc-commands.d.ts.map +0 -1
  420. package/dist/cli/simple-commands/init/claude-commands/sparc-commands.js +0 -288
  421. package/dist/cli/simple-commands/init/claude-commands/sparc-commands.js.map +0 -1
  422. package/dist/cli/simple-commands/init/copy-revised-templates.d.ts +0 -29
  423. package/dist/cli/simple-commands/init/copy-revised-templates.d.ts.map +0 -1
  424. package/dist/cli/simple-commands/init/copy-revised-templates.js +0 -166
  425. package/dist/cli/simple-commands/init/copy-revised-templates.js.map +0 -1
  426. package/dist/cli/simple-commands/init/executable-wrapper.d.ts +0 -2
  427. package/dist/cli/simple-commands/init/executable-wrapper.d.ts.map +0 -1
  428. package/dist/cli/simple-commands/init/executable-wrapper.js +0 -116
  429. package/dist/cli/simple-commands/init/executable-wrapper.js.map +0 -1
  430. package/dist/cli/simple-commands/init/gitignore-updater.d.ts +0 -23
  431. package/dist/cli/simple-commands/init/gitignore-updater.d.ts.map +0 -1
  432. package/dist/cli/simple-commands/init/gitignore-updater.js +0 -128
  433. package/dist/cli/simple-commands/init/gitignore-updater.js.map +0 -1
  434. package/dist/cli/simple-commands/init/help.d.ts +0 -2
  435. package/dist/cli/simple-commands/init/help.d.ts.map +0 -1
  436. package/dist/cli/simple-commands/init/help.js +0 -131
  437. package/dist/cli/simple-commands/init/help.js.map +0 -1
  438. package/dist/cli/simple-commands/init/hive-mind-init.d.ts +0 -152
  439. package/dist/cli/simple-commands/init/hive-mind-init.d.ts.map +0 -1
  440. package/dist/cli/simple-commands/init/hive-mind-init.js +0 -699
  441. package/dist/cli/simple-commands/init/hive-mind-init.js.map +0 -1
  442. package/dist/cli/simple-commands/init/index.d.ts +0 -2
  443. package/dist/cli/simple-commands/init/index.d.ts.map +0 -1
  444. package/dist/cli/simple-commands/init/index.js +0 -1784
  445. package/dist/cli/simple-commands/init/index.js.map +0 -1
  446. package/dist/cli/simple-commands/init/performance-monitor.d.ts +0 -73
  447. package/dist/cli/simple-commands/init/performance-monitor.d.ts.map +0 -1
  448. package/dist/cli/simple-commands/init/performance-monitor.js +0 -277
  449. package/dist/cli/simple-commands/init/performance-monitor.js.map +0 -1
  450. package/dist/cli/simple-commands/init/rollback/backup-manager.d.ts +0 -95
  451. package/dist/cli/simple-commands/init/rollback/backup-manager.d.ts.map +0 -1
  452. package/dist/cli/simple-commands/init/rollback/backup-manager.js +0 -486
  453. package/dist/cli/simple-commands/init/rollback/backup-manager.js.map +0 -1
  454. package/dist/cli/simple-commands/init/rollback/index.d.ts +0 -114
  455. package/dist/cli/simple-commands/init/rollback/index.d.ts.map +0 -1
  456. package/dist/cli/simple-commands/init/rollback/index.js +0 -353
  457. package/dist/cli/simple-commands/init/rollback/index.js.map +0 -1
  458. package/dist/cli/simple-commands/init/rollback/recovery-manager.d.ts +0 -161
  459. package/dist/cli/simple-commands/init/rollback/recovery-manager.d.ts.map +0 -1
  460. package/dist/cli/simple-commands/init/rollback/recovery-manager.js +0 -686
  461. package/dist/cli/simple-commands/init/rollback/recovery-manager.js.map +0 -1
  462. package/dist/cli/simple-commands/init/rollback/rollback-executor.d.ts +0 -112
  463. package/dist/cli/simple-commands/init/rollback/rollback-executor.d.ts.map +0 -1
  464. package/dist/cli/simple-commands/init/rollback/rollback-executor.js +0 -480
  465. package/dist/cli/simple-commands/init/rollback/rollback-executor.js.map +0 -1
  466. package/dist/cli/simple-commands/init/rollback/state-tracker.d.ts +0 -121
  467. package/dist/cli/simple-commands/init/rollback/state-tracker.d.ts.map +0 -1
  468. package/dist/cli/simple-commands/init/rollback/state-tracker.js +0 -432
  469. package/dist/cli/simple-commands/init/rollback/state-tracker.js.map +0 -1
  470. package/dist/cli/simple-commands/init/skills-copier.d.ts +0 -41
  471. package/dist/cli/simple-commands/init/skills-copier.d.ts.map +0 -1
  472. package/dist/cli/simple-commands/init/skills-copier.js +0 -192
  473. package/dist/cli/simple-commands/init/skills-copier.js.map +0 -1
  474. package/dist/cli/simple-commands/init/sparc/roo-readme.d.ts +0 -2
  475. package/dist/cli/simple-commands/init/sparc/roo-readme.d.ts.map +0 -1
  476. package/dist/cli/simple-commands/init/sparc/roo-readme.js +0 -61
  477. package/dist/cli/simple-commands/init/sparc/roo-readme.js.map +0 -1
  478. package/dist/cli/simple-commands/init/sparc/roomodes-config.d.ts +0 -2
  479. package/dist/cli/simple-commands/init/sparc/roomodes-config.d.ts.map +0 -1
  480. package/dist/cli/simple-commands/init/sparc/roomodes-config.js +0 -80
  481. package/dist/cli/simple-commands/init/sparc/roomodes-config.js.map +0 -1
  482. package/dist/cli/simple-commands/init/sparc/workflows.d.ts +0 -2
  483. package/dist/cli/simple-commands/init/sparc/workflows.d.ts.map +0 -1
  484. package/dist/cli/simple-commands/init/sparc/workflows.js +0 -36
  485. package/dist/cli/simple-commands/init/sparc/workflows.js.map +0 -1
  486. package/dist/cli/simple-commands/init/sparc-structure.d.ts +0 -2
  487. package/dist/cli/simple-commands/init/sparc-structure.d.ts.map +0 -1
  488. package/dist/cli/simple-commands/init/sparc-structure.js +0 -63
  489. package/dist/cli/simple-commands/init/sparc-structure.js.map +0 -1
  490. package/dist/cli/simple-commands/init/template-copier.d.ts +0 -27
  491. package/dist/cli/simple-commands/init/template-copier.d.ts.map +0 -1
  492. package/dist/cli/simple-commands/init/template-copier.js +0 -538
  493. package/dist/cli/simple-commands/init/template-copier.js.map +0 -1
  494. package/dist/cli/simple-commands/init/templates/claude-md.d.ts +0 -6
  495. package/dist/cli/simple-commands/init/templates/claude-md.d.ts.map +0 -1
  496. package/dist/cli/simple-commands/init/templates/claude-md.js +0 -1097
  497. package/dist/cli/simple-commands/init/templates/claude-md.js.map +0 -1
  498. package/dist/cli/simple-commands/init/templates/coordination-md.d.ts +0 -4
  499. package/dist/cli/simple-commands/init/templates/coordination-md.d.ts.map +0 -1
  500. package/dist/cli/simple-commands/init/templates/coordination-md.js +0 -338
  501. package/dist/cli/simple-commands/init/templates/coordination-md.js.map +0 -1
  502. package/dist/cli/simple-commands/init/templates/enhanced-templates.d.ts +0 -21
  503. package/dist/cli/simple-commands/init/templates/enhanced-templates.d.ts.map +0 -1
  504. package/dist/cli/simple-commands/init/templates/enhanced-templates.js +0 -2304
  505. package/dist/cli/simple-commands/init/templates/enhanced-templates.js.map +0 -1
  506. package/dist/cli/simple-commands/init/templates/memory-bank-md.d.ts +0 -4
  507. package/dist/cli/simple-commands/init/templates/memory-bank-md.d.ts.map +0 -1
  508. package/dist/cli/simple-commands/init/templates/memory-bank-md.js +0 -257
  509. package/dist/cli/simple-commands/init/templates/memory-bank-md.js.map +0 -1
  510. package/dist/cli/simple-commands/init/templates/readme-files.d.ts +0 -3
  511. package/dist/cli/simple-commands/init/templates/readme-files.d.ts.map +0 -1
  512. package/dist/cli/simple-commands/init/templates/readme-files.js +0 -71
  513. package/dist/cli/simple-commands/init/templates/readme-files.js.map +0 -1
  514. package/dist/cli/simple-commands/init/templates/sparc-modes.d.ts +0 -30
  515. package/dist/cli/simple-commands/init/templates/sparc-modes.d.ts.map +0 -1
  516. package/dist/cli/simple-commands/init/templates/sparc-modes.js +0 -1375
  517. package/dist/cli/simple-commands/init/templates/sparc-modes.js.map +0 -1
  518. package/dist/cli/simple-commands/init/templates/verification-claude-md.d.ts +0 -3
  519. package/dist/cli/simple-commands/init/templates/verification-claude-md.d.ts.map +0 -1
  520. package/dist/cli/simple-commands/init/templates/verification-claude-md.js +0 -432
  521. package/dist/cli/simple-commands/init/templates/verification-claude-md.js.map +0 -1
  522. package/dist/cli/simple-commands/init/validation/config-validator.d.ts +0 -63
  523. package/dist/cli/simple-commands/init/validation/config-validator.d.ts.map +0 -1
  524. package/dist/cli/simple-commands/init/validation/config-validator.js +0 -308
  525. package/dist/cli/simple-commands/init/validation/config-validator.js.map +0 -1
  526. package/dist/cli/simple-commands/init/validation/health-checker.d.ts +0 -117
  527. package/dist/cli/simple-commands/init/validation/health-checker.d.ts.map +0 -1
  528. package/dist/cli/simple-commands/init/validation/health-checker.js +0 -539
  529. package/dist/cli/simple-commands/init/validation/health-checker.js.map +0 -1
  530. package/dist/cli/simple-commands/init/validation/index.d.ts +0 -55
  531. package/dist/cli/simple-commands/init/validation/index.d.ts.map +0 -1
  532. package/dist/cli/simple-commands/init/validation/index.js +0 -347
  533. package/dist/cli/simple-commands/init/validation/index.js.map +0 -1
  534. package/dist/cli/simple-commands/init/validation/mode-validator.d.ts +0 -76
  535. package/dist/cli/simple-commands/init/validation/mode-validator.d.ts.map +0 -1
  536. package/dist/cli/simple-commands/init/validation/mode-validator.js +0 -343
  537. package/dist/cli/simple-commands/init/validation/mode-validator.js.map +0 -1
  538. package/dist/cli/simple-commands/init/validation/post-init-validator.d.ts +0 -62
  539. package/dist/cli/simple-commands/init/validation/post-init-validator.d.ts.map +0 -1
  540. package/dist/cli/simple-commands/init/validation/post-init-validator.js +0 -349
  541. package/dist/cli/simple-commands/init/validation/post-init-validator.js.map +0 -1
  542. package/dist/cli/simple-commands/init/validation/pre-init-validator.d.ts +0 -86
  543. package/dist/cli/simple-commands/init/validation/pre-init-validator.d.ts.map +0 -1
  544. package/dist/cli/simple-commands/init/validation/pre-init-validator.js +0 -260
  545. package/dist/cli/simple-commands/init/validation/pre-init-validator.js.map +0 -1
  546. package/dist/cli/simple-commands/inject-memory-protocol.d.ts +0 -34
  547. package/dist/cli/simple-commands/inject-memory-protocol.d.ts.map +0 -1
  548. package/dist/cli/simple-commands/inject-memory-protocol.js +0 -229
  549. package/dist/cli/simple-commands/inject-memory-protocol.js.map +0 -1
  550. package/dist/cli/simple-commands/mcp.d.ts +0 -2
  551. package/dist/cli/simple-commands/mcp.d.ts.map +0 -1
  552. package/dist/cli/simple-commands/mcp.js +0 -369
  553. package/dist/cli/simple-commands/mcp.js.map +0 -1
  554. package/dist/cli/simple-commands/memory-consolidation.d.ts +0 -73
  555. package/dist/cli/simple-commands/memory-consolidation.d.ts.map +0 -1
  556. package/dist/cli/simple-commands/memory-consolidation.js +0 -537
  557. package/dist/cli/simple-commands/memory-consolidation.js.map +0 -1
  558. package/dist/cli/simple-commands/memory.d.ts +0 -2
  559. package/dist/cli/simple-commands/memory.d.ts.map +0 -1
  560. package/dist/cli/simple-commands/memory.js +0 -778
  561. package/dist/cli/simple-commands/memory.js.map +0 -1
  562. package/dist/cli/simple-commands/migrate-hooks.d.ts +0 -10
  563. package/dist/cli/simple-commands/migrate-hooks.d.ts.map +0 -1
  564. package/dist/cli/simple-commands/migrate-hooks.js +0 -57
  565. package/dist/cli/simple-commands/migrate-hooks.js.map +0 -1
  566. package/dist/cli/simple-commands/monitor.d.ts +0 -3
  567. package/dist/cli/simple-commands/monitor.d.ts.map +0 -1
  568. package/dist/cli/simple-commands/monitor.js +0 -366
  569. package/dist/cli/simple-commands/monitor.js.map +0 -1
  570. package/dist/cli/simple-commands/neural.d.ts +0 -3
  571. package/dist/cli/simple-commands/neural.d.ts.map +0 -1
  572. package/dist/cli/simple-commands/neural.js +0 -137
  573. package/dist/cli/simple-commands/neural.js.map +0 -1
  574. package/dist/cli/simple-commands/pair.d.ts +0 -3
  575. package/dist/cli/simple-commands/pair.d.ts.map +0 -1
  576. package/dist/cli/simple-commands/pair.js +0 -735
  577. package/dist/cli/simple-commands/pair.js.map +0 -1
  578. package/dist/cli/simple-commands/performance-hooks.d.ts +0 -20
  579. package/dist/cli/simple-commands/performance-hooks.d.ts.map +0 -1
  580. package/dist/cli/simple-commands/performance-hooks.js +0 -127
  581. package/dist/cli/simple-commands/performance-hooks.js.map +0 -1
  582. package/dist/cli/simple-commands/performance-metrics.d.ts +0 -153
  583. package/dist/cli/simple-commands/performance-metrics.d.ts.map +0 -1
  584. package/dist/cli/simple-commands/performance-metrics.js +0 -759
  585. package/dist/cli/simple-commands/performance-metrics.js.map +0 -1
  586. package/dist/cli/simple-commands/process-ui-enhanced.d.ts +0 -55
  587. package/dist/cli/simple-commands/process-ui-enhanced.d.ts.map +0 -1
  588. package/dist/cli/simple-commands/process-ui-enhanced.js +0 -680
  589. package/dist/cli/simple-commands/process-ui-enhanced.js.map +0 -1
  590. package/dist/cli/simple-commands/proxy.d.ts +0 -5
  591. package/dist/cli/simple-commands/proxy.d.ts.map +0 -1
  592. package/dist/cli/simple-commands/proxy.js +0 -346
  593. package/dist/cli/simple-commands/proxy.js.map +0 -1
  594. package/dist/cli/simple-commands/sparc-modes/architect.d.ts +0 -2
  595. package/dist/cli/simple-commands/sparc-modes/architect.d.ts.map +0 -1
  596. package/dist/cli/simple-commands/sparc-modes/architect.js +0 -126
  597. package/dist/cli/simple-commands/sparc-modes/architect.js.map +0 -1
  598. package/dist/cli/simple-commands/sparc-modes/ask.d.ts +0 -2
  599. package/dist/cli/simple-commands/sparc-modes/ask.d.ts.map +0 -1
  600. package/dist/cli/simple-commands/sparc-modes/ask.js +0 -127
  601. package/dist/cli/simple-commands/sparc-modes/ask.js.map +0 -1
  602. package/dist/cli/simple-commands/sparc-modes/code.d.ts +0 -2
  603. package/dist/cli/simple-commands/sparc-modes/code.d.ts.map +0 -1
  604. package/dist/cli/simple-commands/sparc-modes/code.js +0 -149
  605. package/dist/cli/simple-commands/sparc-modes/code.js.map +0 -1
  606. package/dist/cli/simple-commands/sparc-modes/debug.d.ts +0 -2
  607. package/dist/cli/simple-commands/sparc-modes/debug.d.ts.map +0 -1
  608. package/dist/cli/simple-commands/sparc-modes/debug.js +0 -113
  609. package/dist/cli/simple-commands/sparc-modes/debug.js.map +0 -1
  610. package/dist/cli/simple-commands/sparc-modes/devops.d.ts +0 -2
  611. package/dist/cli/simple-commands/sparc-modes/devops.d.ts.map +0 -1
  612. package/dist/cli/simple-commands/sparc-modes/devops.js +0 -138
  613. package/dist/cli/simple-commands/sparc-modes/devops.js.map +0 -1
  614. package/dist/cli/simple-commands/sparc-modes/docs-writer.d.ts +0 -2
  615. package/dist/cli/simple-commands/sparc-modes/docs-writer.d.ts.map +0 -1
  616. package/dist/cli/simple-commands/sparc-modes/docs-writer.js +0 -39
  617. package/dist/cli/simple-commands/sparc-modes/docs-writer.js.map +0 -1
  618. package/dist/cli/simple-commands/sparc-modes/generic.d.ts +0 -2
  619. package/dist/cli/simple-commands/sparc-modes/generic.d.ts.map +0 -1
  620. package/dist/cli/simple-commands/sparc-modes/generic.js +0 -35
  621. package/dist/cli/simple-commands/sparc-modes/generic.js.map +0 -1
  622. package/dist/cli/simple-commands/sparc-modes/index.d.ts +0 -17
  623. package/dist/cli/simple-commands/sparc-modes/index.d.ts.map +0 -1
  624. package/dist/cli/simple-commands/sparc-modes/index.js +0 -196
  625. package/dist/cli/simple-commands/sparc-modes/index.js.map +0 -1
  626. package/dist/cli/simple-commands/sparc-modes/integration.d.ts +0 -2
  627. package/dist/cli/simple-commands/sparc-modes/integration.d.ts.map +0 -1
  628. package/dist/cli/simple-commands/sparc-modes/integration.js +0 -56
  629. package/dist/cli/simple-commands/sparc-modes/integration.js.map +0 -1
  630. package/dist/cli/simple-commands/sparc-modes/mcp.d.ts +0 -2
  631. package/dist/cli/simple-commands/sparc-modes/mcp.d.ts.map +0 -1
  632. package/dist/cli/simple-commands/sparc-modes/mcp.js +0 -39
  633. package/dist/cli/simple-commands/sparc-modes/mcp.js.map +0 -1
  634. package/dist/cli/simple-commands/sparc-modes/monitoring.d.ts +0 -2
  635. package/dist/cli/simple-commands/sparc-modes/monitoring.d.ts.map +0 -1
  636. package/dist/cli/simple-commands/sparc-modes/monitoring.js +0 -39
  637. package/dist/cli/simple-commands/sparc-modes/monitoring.js.map +0 -1
  638. package/dist/cli/simple-commands/sparc-modes/optimization.d.ts +0 -2
  639. package/dist/cli/simple-commands/sparc-modes/optimization.d.ts.map +0 -1
  640. package/dist/cli/simple-commands/sparc-modes/optimization.js +0 -39
  641. package/dist/cli/simple-commands/sparc-modes/optimization.js.map +0 -1
  642. package/dist/cli/simple-commands/sparc-modes/security-review.d.ts +0 -2
  643. package/dist/cli/simple-commands/sparc-modes/security-review.d.ts.map +0 -1
  644. package/dist/cli/simple-commands/sparc-modes/security-review.js +0 -131
  645. package/dist/cli/simple-commands/sparc-modes/security-review.js.map +0 -1
  646. package/dist/cli/simple-commands/sparc-modes/sparc-orchestrator.d.ts +0 -2
  647. package/dist/cli/simple-commands/sparc-modes/sparc-orchestrator.d.ts.map +0 -1
  648. package/dist/cli/simple-commands/sparc-modes/sparc-orchestrator.js +0 -168
  649. package/dist/cli/simple-commands/sparc-modes/sparc-orchestrator.js.map +0 -1
  650. package/dist/cli/simple-commands/sparc-modes/spec-pseudocode.d.ts +0 -2
  651. package/dist/cli/simple-commands/sparc-modes/spec-pseudocode.d.ts.map +0 -1
  652. package/dist/cli/simple-commands/sparc-modes/spec-pseudocode.js +0 -39
  653. package/dist/cli/simple-commands/sparc-modes/spec-pseudocode.js.map +0 -1
  654. package/dist/cli/simple-commands/sparc-modes/supabase-admin.d.ts +0 -2
  655. package/dist/cli/simple-commands/sparc-modes/supabase-admin.d.ts.map +0 -1
  656. package/dist/cli/simple-commands/sparc-modes/supabase-admin.js +0 -150
  657. package/dist/cli/simple-commands/sparc-modes/supabase-admin.js.map +0 -1
  658. package/dist/cli/simple-commands/sparc-modes/swarm.d.ts +0 -81
  659. package/dist/cli/simple-commands/sparc-modes/swarm.d.ts.map +0 -1
  660. package/dist/cli/simple-commands/sparc-modes/swarm.js +0 -428
  661. package/dist/cli/simple-commands/sparc-modes/swarm.js.map +0 -1
  662. package/dist/cli/simple-commands/sparc-modes/tdd.d.ts +0 -2
  663. package/dist/cli/simple-commands/sparc-modes/tdd.d.ts.map +0 -1
  664. package/dist/cli/simple-commands/sparc-modes/tdd.js +0 -113
  665. package/dist/cli/simple-commands/sparc-modes/tdd.js.map +0 -1
  666. package/dist/cli/simple-commands/sparc-modes/tutorial.d.ts +0 -2
  667. package/dist/cli/simple-commands/sparc-modes/tutorial.d.ts.map +0 -1
  668. package/dist/cli/simple-commands/sparc-modes/tutorial.js +0 -278
  669. package/dist/cli/simple-commands/sparc-modes/tutorial.js.map +0 -1
  670. package/dist/cli/simple-commands/sparc.d.ts +0 -2
  671. package/dist/cli/simple-commands/sparc.d.ts.map +0 -1
  672. package/dist/cli/simple-commands/sparc.js +0 -477
  673. package/dist/cli/simple-commands/sparc.js.map +0 -1
  674. package/dist/cli/simple-commands/start-ui.d.ts +0 -2
  675. package/dist/cli/simple-commands/start-ui.d.ts.map +0 -1
  676. package/dist/cli/simple-commands/start-ui.js +0 -135
  677. package/dist/cli/simple-commands/start-ui.js.map +0 -1
  678. package/dist/cli/simple-commands/start-wrapper.d.ts +0 -2
  679. package/dist/cli/simple-commands/start-wrapper.d.ts.map +0 -1
  680. package/dist/cli/simple-commands/start-wrapper.js +0 -264
  681. package/dist/cli/simple-commands/start-wrapper.js.map +0 -1
  682. package/dist/cli/simple-commands/start.d.ts +0 -2
  683. package/dist/cli/simple-commands/start.d.ts.map +0 -1
  684. package/dist/cli/simple-commands/start.js +0 -3
  685. package/dist/cli/simple-commands/start.js.map +0 -1
  686. package/dist/cli/simple-commands/status.d.ts +0 -2
  687. package/dist/cli/simple-commands/status.d.ts.map +0 -1
  688. package/dist/cli/simple-commands/status.js +0 -292
  689. package/dist/cli/simple-commands/status.js.map +0 -1
  690. package/dist/cli/simple-commands/stream-chain.d.ts +0 -7
  691. package/dist/cli/simple-commands/stream-chain.d.ts.map +0 -1
  692. package/dist/cli/simple-commands/stream-chain.js +0 -433
  693. package/dist/cli/simple-commands/stream-chain.js.map +0 -1
  694. package/dist/cli/simple-commands/stream-processor.d.ts +0 -32
  695. package/dist/cli/simple-commands/stream-processor.d.ts.map +0 -1
  696. package/dist/cli/simple-commands/stream-processor.js +0 -318
  697. package/dist/cli/simple-commands/stream-processor.js.map +0 -1
  698. package/dist/cli/simple-commands/swarm-executor.d.ts +0 -68
  699. package/dist/cli/simple-commands/swarm-executor.d.ts.map +0 -1
  700. package/dist/cli/simple-commands/swarm-executor.js +0 -218
  701. package/dist/cli/simple-commands/swarm-executor.js.map +0 -1
  702. package/dist/cli/simple-commands/swarm-metrics-integration.d.ts +0 -69
  703. package/dist/cli/simple-commands/swarm-metrics-integration.d.ts.map +0 -1
  704. package/dist/cli/simple-commands/swarm-metrics-integration.js +0 -294
  705. package/dist/cli/simple-commands/swarm-metrics-integration.js.map +0 -1
  706. package/dist/cli/simple-commands/swarm-webui-integration.d.ts +0 -68
  707. package/dist/cli/simple-commands/swarm-webui-integration.d.ts.map +0 -1
  708. package/dist/cli/simple-commands/swarm-webui-integration.js +0 -265
  709. package/dist/cli/simple-commands/swarm-webui-integration.js.map +0 -1
  710. package/dist/cli/simple-commands/swarm.d.ts +0 -2
  711. package/dist/cli/simple-commands/swarm.d.ts.map +0 -1
  712. package/dist/cli/simple-commands/swarm.js +0 -2104
  713. package/dist/cli/simple-commands/swarm.js.map +0 -1
  714. package/dist/cli/simple-commands/task.d.ts +0 -2
  715. package/dist/cli/simple-commands/task.d.ts.map +0 -1
  716. package/dist/cli/simple-commands/task.js +0 -250
  717. package/dist/cli/simple-commands/task.js.map +0 -1
  718. package/dist/cli/simple-commands/token-tracker.d.ts +0 -73
  719. package/dist/cli/simple-commands/token-tracker.d.ts.map +0 -1
  720. package/dist/cli/simple-commands/token-tracker.js +0 -319
  721. package/dist/cli/simple-commands/token-tracker.js.map +0 -1
  722. package/dist/cli/simple-commands/training-pipeline.d.ts +0 -166
  723. package/dist/cli/simple-commands/training-pipeline.d.ts.map +0 -1
  724. package/dist/cli/simple-commands/training-pipeline.js +0 -760
  725. package/dist/cli/simple-commands/training-pipeline.js.map +0 -1
  726. package/dist/cli/simple-commands/training.d.ts +0 -2
  727. package/dist/cli/simple-commands/training.d.ts.map +0 -1
  728. package/dist/cli/simple-commands/training.js +0 -240
  729. package/dist/cli/simple-commands/training.js.map +0 -1
  730. package/dist/cli/simple-commands/verification-training-integration.d.ts +0 -181
  731. package/dist/cli/simple-commands/verification-training-integration.d.ts.map +0 -1
  732. package/dist/cli/simple-commands/verification-training-integration.js +0 -561
  733. package/dist/cli/simple-commands/verification-training-integration.js.map +0 -1
  734. package/dist/cli/simple-commands/verification.d.ts +0 -10
  735. package/dist/cli/simple-commands/verification.d.ts.map +0 -1
  736. package/dist/cli/simple-commands/verification.js +0 -476
  737. package/dist/cli/simple-commands/verification.js.map +0 -1
  738. package/dist/cli/simple-commands/web-server.d.ts +0 -152
  739. package/dist/cli/simple-commands/web-server.d.ts.map +0 -1
  740. package/dist/cli/simple-commands/web-server.js +0 -816
  741. package/dist/cli/simple-commands/web-server.js.map +0 -1
  742. package/dist/cli/utils/interactive-detector.d.ts +0 -25
  743. package/dist/cli/utils/interactive-detector.d.ts.map +0 -1
  744. package/dist/cli/utils/interactive-detector.js +0 -129
  745. package/dist/cli/utils/interactive-detector.js.map +0 -1
  746. package/dist/cli/utils/safe-interactive.d.ts +0 -30
  747. package/dist/cli/utils/safe-interactive.d.ts.map +0 -1
  748. package/dist/cli/utils/safe-interactive.js +0 -134
  749. package/dist/cli/utils/safe-interactive.js.map +0 -1
  750. package/dist/cli/utils.d.ts +0 -75
  751. package/dist/cli/utils.d.ts.map +0 -1
  752. package/dist/cli/utils.js +0 -567
  753. package/dist/cli/utils.js.map +0 -1
  754. package/dist/config/config-manager.d.ts +0 -212
  755. package/dist/config/config-manager.d.ts.map +0 -1
  756. package/dist/config/config-manager.js +0 -550
  757. package/dist/config/config-manager.js.map +0 -1
  758. package/dist/constants/agent-types.d.ts +0 -57
  759. package/dist/constants/agent-types.d.ts.map +0 -1
  760. package/dist/constants/agent-types.js +0 -57
  761. package/dist/constants/agent-types.js.map +0 -1
  762. package/dist/coordination/advanced-scheduler.d.ts +0 -121
  763. package/dist/coordination/advanced-scheduler.d.ts.map +0 -1
  764. package/dist/coordination/advanced-scheduler.js +0 -382
  765. package/dist/coordination/advanced-scheduler.js.map +0 -1
  766. package/dist/coordination/background-executor.d.ts +0 -69
  767. package/dist/coordination/background-executor.d.ts.map +0 -1
  768. package/dist/coordination/background-executor.js +0 -363
  769. package/dist/coordination/background-executor.js.map +0 -1
  770. package/dist/coordination/circuit-breaker.d.ts +0 -124
  771. package/dist/coordination/circuit-breaker.d.ts.map +0 -1
  772. package/dist/coordination/circuit-breaker.js +0 -301
  773. package/dist/coordination/circuit-breaker.js.map +0 -1
  774. package/dist/coordination/conflict-resolution.d.ts +0 -133
  775. package/dist/coordination/conflict-resolution.d.ts.map +0 -1
  776. package/dist/coordination/conflict-resolution.js +0 -360
  777. package/dist/coordination/conflict-resolution.js.map +0 -1
  778. package/dist/coordination/dependency-graph.d.ts +0 -78
  779. package/dist/coordination/dependency-graph.d.ts.map +0 -1
  780. package/dist/coordination/dependency-graph.js +0 -387
  781. package/dist/coordination/dependency-graph.js.map +0 -1
  782. package/dist/coordination/manager.d.ts +0 -66
  783. package/dist/coordination/manager.d.ts.map +0 -1
  784. package/dist/coordination/manager.js +0 -354
  785. package/dist/coordination/manager.js.map +0 -1
  786. package/dist/coordination/messaging.d.ts +0 -37
  787. package/dist/coordination/messaging.d.ts.map +0 -1
  788. package/dist/coordination/messaging.js +0 -219
  789. package/dist/coordination/messaging.js.map +0 -1
  790. package/dist/coordination/metrics.d.ts +0 -153
  791. package/dist/coordination/metrics.d.ts.map +0 -1
  792. package/dist/coordination/metrics.js +0 -436
  793. package/dist/coordination/metrics.js.map +0 -1
  794. package/dist/coordination/resources.d.ts +0 -36
  795. package/dist/coordination/resources.d.ts.map +0 -1
  796. package/dist/coordination/resources.js +0 -254
  797. package/dist/coordination/resources.js.map +0 -1
  798. package/dist/coordination/scheduler.d.ts +0 -48
  799. package/dist/coordination/scheduler.d.ts.map +0 -1
  800. package/dist/coordination/scheduler.js +0 -308
  801. package/dist/coordination/scheduler.js.map +0 -1
  802. package/dist/coordination/swarm-coordinator.d.ts +0 -116
  803. package/dist/coordination/swarm-coordinator.d.ts.map +0 -1
  804. package/dist/coordination/swarm-coordinator.js +0 -563
  805. package/dist/coordination/swarm-coordinator.js.map +0 -1
  806. package/dist/coordination/swarm-monitor.d.ts +0 -101
  807. package/dist/coordination/swarm-monitor.d.ts.map +0 -1
  808. package/dist/coordination/swarm-monitor.js +0 -340
  809. package/dist/coordination/swarm-monitor.js.map +0 -1
  810. package/dist/coordination/work-stealing.d.ts +0 -44
  811. package/dist/coordination/work-stealing.d.ts.map +0 -1
  812. package/dist/coordination/work-stealing.js +0 -158
  813. package/dist/coordination/work-stealing.js.map +0 -1
  814. package/dist/core/config.d.ts +0 -243
  815. package/dist/core/config.d.ts.map +0 -1
  816. package/dist/core/config.js +0 -1125
  817. package/dist/core/config.js.map +0 -1
  818. package/dist/core/event-bus.d.ts +0 -63
  819. package/dist/core/event-bus.d.ts.map +0 -1
  820. package/dist/core/event-bus.js +0 -153
  821. package/dist/core/event-bus.js.map +0 -1
  822. package/dist/core/json-persistence.d.ts +0 -55
  823. package/dist/core/json-persistence.d.ts.map +0 -1
  824. package/dist/core/json-persistence.js +0 -111
  825. package/dist/core/json-persistence.js.map +0 -1
  826. package/dist/core/logger.d.ts +0 -62
  827. package/dist/core/logger.d.ts.map +0 -1
  828. package/dist/core/logger.js +0 -252
  829. package/dist/core/logger.js.map +0 -1
  830. package/dist/core/orchestrator-fixed.d.ts +0 -81
  831. package/dist/core/orchestrator-fixed.d.ts.map +0 -1
  832. package/dist/core/orchestrator-fixed.js +0 -213
  833. package/dist/core/orchestrator-fixed.js.map +0 -1
  834. package/dist/core/orchestrator.d.ts +0 -141
  835. package/dist/core/orchestrator.d.ts.map +0 -1
  836. package/dist/core/orchestrator.js +0 -1166
  837. package/dist/core/orchestrator.js.map +0 -1
  838. package/dist/core/version.d.ts +0 -10
  839. package/dist/core/version.d.ts.map +0 -1
  840. package/dist/core/version.js +0 -36
  841. package/dist/core/version.js.map +0 -1
  842. package/dist/enterprise/analytics-manager.d.ts +0 -489
  843. package/dist/enterprise/analytics-manager.d.ts.map +0 -1
  844. package/dist/enterprise/analytics-manager.js +0 -956
  845. package/dist/enterprise/analytics-manager.js.map +0 -1
  846. package/dist/enterprise/audit-manager.d.ts +0 -459
  847. package/dist/enterprise/audit-manager.d.ts.map +0 -1
  848. package/dist/enterprise/audit-manager.js +0 -1014
  849. package/dist/enterprise/audit-manager.js.map +0 -1
  850. package/dist/enterprise/cloud-manager.d.ts +0 -435
  851. package/dist/enterprise/cloud-manager.d.ts.map +0 -1
  852. package/dist/enterprise/cloud-manager.js +0 -789
  853. package/dist/enterprise/cloud-manager.js.map +0 -1
  854. package/dist/enterprise/deployment-manager.d.ts +0 -328
  855. package/dist/enterprise/deployment-manager.d.ts.map +0 -1
  856. package/dist/enterprise/deployment-manager.js +0 -830
  857. package/dist/enterprise/deployment-manager.js.map +0 -1
  858. package/dist/enterprise/project-manager.d.ts +0 -228
  859. package/dist/enterprise/project-manager.d.ts.map +0 -1
  860. package/dist/enterprise/project-manager.js +0 -537
  861. package/dist/enterprise/project-manager.js.map +0 -1
  862. package/dist/enterprise/security-manager.d.ts +0 -422
  863. package/dist/enterprise/security-manager.d.ts.map +0 -1
  864. package/dist/enterprise/security-manager.js +0 -910
  865. package/dist/enterprise/security-manager.js.map +0 -1
  866. package/dist/execution/agent-executor.d.ts +0 -80
  867. package/dist/execution/agent-executor.d.ts.map +0 -1
  868. package/dist/execution/agent-executor.js +0 -220
  869. package/dist/execution/agent-executor.js.map +0 -1
  870. package/dist/execution/provider-manager.d.ts +0 -65
  871. package/dist/execution/provider-manager.d.ts.map +0 -1
  872. package/dist/execution/provider-manager.js +0 -144
  873. package/dist/execution/provider-manager.js.map +0 -1
  874. package/dist/hive-mind/core/Agent.d.ts +0 -137
  875. package/dist/hive-mind/core/Agent.d.ts.map +0 -1
  876. package/dist/hive-mind/core/Agent.js +0 -567
  877. package/dist/hive-mind/core/Agent.js.map +0 -1
  878. package/dist/hive-mind/core/Communication.d.ts +0 -116
  879. package/dist/hive-mind/core/Communication.d.ts.map +0 -1
  880. package/dist/hive-mind/core/Communication.js +0 -407
  881. package/dist/hive-mind/core/Communication.js.map +0 -1
  882. package/dist/hive-mind/core/DatabaseManager.d.ts +0 -99
  883. package/dist/hive-mind/core/DatabaseManager.d.ts.map +0 -1
  884. package/dist/hive-mind/core/DatabaseManager.js +0 -648
  885. package/dist/hive-mind/core/DatabaseManager.js.map +0 -1
  886. package/dist/hive-mind/core/HiveMind.d.ts +0 -90
  887. package/dist/hive-mind/core/HiveMind.d.ts.map +0 -1
  888. package/dist/hive-mind/core/HiveMind.js +0 -455
  889. package/dist/hive-mind/core/HiveMind.js.map +0 -1
  890. package/dist/hive-mind/core/Memory.d.ts +0 -235
  891. package/dist/hive-mind/core/Memory.d.ts.map +0 -1
  892. package/dist/hive-mind/core/Memory.js +0 -1192
  893. package/dist/hive-mind/core/Memory.js.map +0 -1
  894. package/dist/hive-mind/core/Queen.d.ts +0 -115
  895. package/dist/hive-mind/core/Queen.d.ts.map +0 -1
  896. package/dist/hive-mind/core/Queen.js +0 -649
  897. package/dist/hive-mind/core/Queen.js.map +0 -1
  898. package/dist/hive-mind/integration/ConsensusEngine.d.ts +0 -117
  899. package/dist/hive-mind/integration/ConsensusEngine.d.ts.map +0 -1
  900. package/dist/hive-mind/integration/ConsensusEngine.js +0 -478
  901. package/dist/hive-mind/integration/ConsensusEngine.js.map +0 -1
  902. package/dist/hive-mind/integration/MCPToolWrapper.d.ts +0 -172
  903. package/dist/hive-mind/integration/MCPToolWrapper.d.ts.map +0 -1
  904. package/dist/hive-mind/integration/MCPToolWrapper.js +0 -217
  905. package/dist/hive-mind/integration/MCPToolWrapper.js.map +0 -1
  906. package/dist/hive-mind/integration/SwarmOrchestrator.d.ts +0 -172
  907. package/dist/hive-mind/integration/SwarmOrchestrator.d.ts.map +0 -1
  908. package/dist/hive-mind/integration/SwarmOrchestrator.js +0 -748
  909. package/dist/hive-mind/integration/SwarmOrchestrator.js.map +0 -1
  910. package/dist/hive-mind/types.d.ts +0 -314
  911. package/dist/hive-mind/types.d.ts.map +0 -1
  912. package/dist/hive-mind/types.js +0 -7
  913. package/dist/hive-mind/types.js.map +0 -1
  914. package/dist/mcp/auth.d.ts +0 -80
  915. package/dist/mcp/auth.d.ts.map +0 -1
  916. package/dist/mcp/auth.js +0 -350
  917. package/dist/mcp/auth.js.map +0 -1
  918. package/dist/mcp/claude-flow-tools.d.ts +0 -13
  919. package/dist/mcp/claude-flow-tools.d.ts.map +0 -1
  920. package/dist/mcp/claude-flow-tools.js +0 -1398
  921. package/dist/mcp/claude-flow-tools.js.map +0 -1
  922. package/dist/mcp/load-balancer.d.ts +0 -88
  923. package/dist/mcp/load-balancer.d.ts.map +0 -1
  924. package/dist/mcp/load-balancer.js +0 -393
  925. package/dist/mcp/load-balancer.js.map +0 -1
  926. package/dist/mcp/router.d.ts +0 -54
  927. package/dist/mcp/router.d.ts.map +0 -1
  928. package/dist/mcp/router.js +0 -204
  929. package/dist/mcp/router.js.map +0 -1
  930. package/dist/mcp/ruv-swarm-tools.d.ts +0 -58
  931. package/dist/mcp/ruv-swarm-tools.d.ts.map +0 -1
  932. package/dist/mcp/ruv-swarm-tools.js +0 -568
  933. package/dist/mcp/ruv-swarm-tools.js.map +0 -1
  934. package/dist/mcp/server.d.ts +0 -75
  935. package/dist/mcp/server.d.ts.map +0 -1
  936. package/dist/mcp/server.js +0 -538
  937. package/dist/mcp/server.js.map +0 -1
  938. package/dist/mcp/session-manager.d.ts +0 -60
  939. package/dist/mcp/session-manager.d.ts.map +0 -1
  940. package/dist/mcp/session-manager.js +0 -323
  941. package/dist/mcp/session-manager.js.map +0 -1
  942. package/dist/mcp/swarm-tools.d.ts +0 -87
  943. package/dist/mcp/swarm-tools.d.ts.map +0 -1
  944. package/dist/mcp/swarm-tools.js +0 -731
  945. package/dist/mcp/swarm-tools.js.map +0 -1
  946. package/dist/mcp/tools.d.ts +0 -145
  947. package/dist/mcp/tools.d.ts.map +0 -1
  948. package/dist/mcp/tools.js +0 -434
  949. package/dist/mcp/tools.js.map +0 -1
  950. package/dist/mcp/transports/base.d.ts +0 -22
  951. package/dist/mcp/transports/base.d.ts.map +0 -1
  952. package/dist/mcp/transports/base.js +0 -5
  953. package/dist/mcp/transports/base.js.map +0 -1
  954. package/dist/mcp/transports/http.d.ts +0 -48
  955. package/dist/mcp/transports/http.d.ts.map +0 -1
  956. package/dist/mcp/transports/http.js +0 -400
  957. package/dist/mcp/transports/http.js.map +0 -1
  958. package/dist/mcp/transports/stdio.d.ts +0 -37
  959. package/dist/mcp/transports/stdio.d.ts.map +0 -1
  960. package/dist/mcp/transports/stdio.js +0 -206
  961. package/dist/mcp/transports/stdio.js.map +0 -1
  962. package/dist/memory/advanced-serializer.d.ts +0 -159
  963. package/dist/memory/advanced-serializer.d.ts.map +0 -1
  964. package/dist/memory/advanced-serializer.js +0 -564
  965. package/dist/memory/advanced-serializer.js.map +0 -1
  966. package/dist/memory/backends/base.d.ts +0 -21
  967. package/dist/memory/backends/base.d.ts.map +0 -1
  968. package/dist/memory/backends/base.js +0 -5
  969. package/dist/memory/backends/base.js.map +0 -1
  970. package/dist/memory/backends/markdown.d.ts +0 -35
  971. package/dist/memory/backends/markdown.d.ts.map +0 -1
  972. package/dist/memory/backends/markdown.js +0 -223
  973. package/dist/memory/backends/markdown.js.map +0 -1
  974. package/dist/memory/backends/sqlite.d.ts +0 -33
  975. package/dist/memory/backends/sqlite.d.ts.map +0 -1
  976. package/dist/memory/backends/sqlite.js +0 -291
  977. package/dist/memory/backends/sqlite.js.map +0 -1
  978. package/dist/memory/cache.d.ts +0 -65
  979. package/dist/memory/cache.d.ts.map +0 -1
  980. package/dist/memory/cache.js +0 -188
  981. package/dist/memory/cache.js.map +0 -1
  982. package/dist/memory/distributed-memory.d.ts +0 -188
  983. package/dist/memory/distributed-memory.d.ts.map +0 -1
  984. package/dist/memory/distributed-memory.js +0 -710
  985. package/dist/memory/distributed-memory.js.map +0 -1
  986. package/dist/memory/enhanced-session-serializer.d.ts +0 -115
  987. package/dist/memory/enhanced-session-serializer.d.ts.map +0 -1
  988. package/dist/memory/enhanced-session-serializer.js +0 -478
  989. package/dist/memory/enhanced-session-serializer.js.map +0 -1
  990. package/dist/memory/fallback-store.d.ts +0 -28
  991. package/dist/memory/fallback-store.d.ts.map +0 -1
  992. package/dist/memory/fallback-store.js +0 -101
  993. package/dist/memory/fallback-store.js.map +0 -1
  994. package/dist/memory/in-memory-store.d.ts +0 -37
  995. package/dist/memory/in-memory-store.d.ts.map +0 -1
  996. package/dist/memory/in-memory-store.js +0 -174
  997. package/dist/memory/in-memory-store.js.map +0 -1
  998. package/dist/memory/indexer.d.ts +0 -52
  999. package/dist/memory/indexer.d.ts.map +0 -1
  1000. package/dist/memory/indexer.js +0 -191
  1001. package/dist/memory/indexer.js.map +0 -1
  1002. package/dist/memory/manager.d.ts +0 -58
  1003. package/dist/memory/manager.d.ts.map +0 -1
  1004. package/dist/memory/manager.js +0 -423
  1005. package/dist/memory/manager.js.map +0 -1
  1006. package/dist/memory/sqlite-store.d.ts +0 -34
  1007. package/dist/memory/sqlite-store.d.ts.map +0 -1
  1008. package/dist/memory/sqlite-store.js +0 -268
  1009. package/dist/memory/sqlite-store.js.map +0 -1
  1010. package/dist/memory/sqlite-wrapper.d.ts +0 -38
  1011. package/dist/memory/sqlite-wrapper.d.ts.map +0 -1
  1012. package/dist/memory/sqlite-wrapper.js +0 -152
  1013. package/dist/memory/sqlite-wrapper.js.map +0 -1
  1014. package/dist/memory/swarm-memory.d.ts +0 -91
  1015. package/dist/memory/swarm-memory.d.ts.map +0 -1
  1016. package/dist/memory/swarm-memory.js +0 -454
  1017. package/dist/memory/swarm-memory.js.map +0 -1
  1018. package/dist/memory/unified-memory-manager.d.ts +0 -116
  1019. package/dist/memory/unified-memory-manager.d.ts.map +0 -1
  1020. package/dist/memory/unified-memory-manager.js +0 -397
  1021. package/dist/memory/unified-memory-manager.js.map +0 -1
  1022. package/dist/migration/logger.d.ts +0 -26
  1023. package/dist/migration/logger.d.ts.map +0 -1
  1024. package/dist/migration/logger.js +0 -145
  1025. package/dist/migration/logger.js.map +0 -1
  1026. package/dist/migration/migration-analyzer.d.ts +0 -18
  1027. package/dist/migration/migration-analyzer.d.ts.map +0 -1
  1028. package/dist/migration/migration-analyzer.js +0 -284
  1029. package/dist/migration/migration-analyzer.js.map +0 -1
  1030. package/dist/migration/migration-runner.d.ts +0 -26
  1031. package/dist/migration/migration-runner.d.ts.map +0 -1
  1032. package/dist/migration/migration-runner.js +0 -505
  1033. package/dist/migration/migration-runner.js.map +0 -1
  1034. package/dist/migration/migration-validator.d.ts +0 -17
  1035. package/dist/migration/migration-validator.d.ts.map +0 -1
  1036. package/dist/migration/migration-validator.js +0 -309
  1037. package/dist/migration/migration-validator.js.map +0 -1
  1038. package/dist/migration/progress-reporter.d.ts +0 -28
  1039. package/dist/migration/progress-reporter.d.ts.map +0 -1
  1040. package/dist/migration/progress-reporter.js +0 -163
  1041. package/dist/migration/progress-reporter.js.map +0 -1
  1042. package/dist/migration/rollback-manager.d.ts +0 -24
  1043. package/dist/migration/rollback-manager.d.ts.map +0 -1
  1044. package/dist/migration/rollback-manager.js +0 -351
  1045. package/dist/migration/rollback-manager.js.map +0 -1
  1046. package/dist/migration/types.d.ts +0 -103
  1047. package/dist/migration/types.d.ts.map +0 -1
  1048. package/dist/migration/types.js +0 -6
  1049. package/dist/migration/types.js.map +0 -1
  1050. package/dist/reasoningbank/reasoningbank-adapter.d.ts +0 -93
  1051. package/dist/reasoningbank/reasoningbank-adapter.d.ts.map +0 -1
  1052. package/dist/reasoningbank/reasoningbank-adapter.js +0 -365
  1053. package/dist/reasoningbank/reasoningbank-adapter.js.map +0 -1
  1054. package/dist/sdk/query-control.d.ts +0 -131
  1055. package/dist/sdk/query-control.d.ts.map +0 -1
  1056. package/dist/sdk/query-control.js +0 -363
  1057. package/dist/sdk/query-control.js.map +0 -1
  1058. package/dist/sdk/session-forking.d.ts +0 -109
  1059. package/dist/sdk/session-forking.d.ts.map +0 -1
  1060. package/dist/sdk/session-forking.js +0 -275
  1061. package/dist/sdk/session-forking.js.map +0 -1
  1062. package/dist/swarm/types.d.ts +0 -578
  1063. package/dist/swarm/types.d.ts.map +0 -1
  1064. package/dist/swarm/types.js +0 -54
  1065. package/dist/swarm/types.js.map +0 -1
  1066. package/dist/terminal/adapters/base.d.ts +0 -40
  1067. package/dist/terminal/adapters/base.d.ts.map +0 -1
  1068. package/dist/terminal/adapters/base.js +0 -5
  1069. package/dist/terminal/adapters/base.js.map +0 -1
  1070. package/dist/terminal/adapters/native.d.ts +0 -19
  1071. package/dist/terminal/adapters/native.d.ts.map +0 -1
  1072. package/dist/terminal/adapters/native.js +0 -414
  1073. package/dist/terminal/adapters/native.js.map +0 -1
  1074. package/dist/terminal/adapters/vscode.d.ts +0 -23
  1075. package/dist/terminal/adapters/vscode.d.ts.map +0 -1
  1076. package/dist/terminal/adapters/vscode.js +0 -267
  1077. package/dist/terminal/adapters/vscode.js.map +0 -1
  1078. package/dist/terminal/manager.d.ts +0 -59
  1079. package/dist/terminal/manager.d.ts.map +0 -1
  1080. package/dist/terminal/manager.js +0 -235
  1081. package/dist/terminal/manager.js.map +0 -1
  1082. package/dist/terminal/pool.d.ts +0 -32
  1083. package/dist/terminal/pool.d.ts.map +0 -1
  1084. package/dist/terminal/pool.js +0 -208
  1085. package/dist/terminal/pool.js.map +0 -1
  1086. package/dist/terminal/session.d.ts +0 -41
  1087. package/dist/terminal/session.d.ts.map +0 -1
  1088. package/dist/terminal/session.js +0 -210
  1089. package/dist/terminal/session.js.map +0 -1
  1090. package/dist/utils/error-handler.d.ts +0 -14
  1091. package/dist/utils/error-handler.d.ts.map +0 -1
  1092. package/dist/utils/error-handler.js +0 -29
  1093. package/dist/utils/error-handler.js.map +0 -1
  1094. package/dist/utils/errors.d.ts +0 -121
  1095. package/dist/utils/errors.d.ts.map +0 -1
  1096. package/dist/utils/errors.js +0 -194
  1097. package/dist/utils/errors.js.map +0 -1
  1098. package/dist/utils/formatters.d.ts +0 -15
  1099. package/dist/utils/formatters.d.ts.map +0 -1
  1100. package/dist/utils/formatters.js +0 -75
  1101. package/dist/utils/formatters.js.map +0 -1
  1102. package/dist/utils/helpers.d.ts +0 -134
  1103. package/dist/utils/helpers.d.ts.map +0 -1
  1104. package/dist/utils/helpers.js +0 -444
  1105. package/dist/utils/helpers.js.map +0 -1
  1106. package/dist/utils/key-redactor.d.ts +0 -46
  1107. package/dist/utils/key-redactor.d.ts.map +0 -1
  1108. package/dist/utils/key-redactor.js +0 -153
  1109. package/dist/utils/key-redactor.js.map +0 -1
  1110. package/dist/utils/metrics-reader.d.ts +0 -67
  1111. package/dist/utils/metrics-reader.d.ts.map +0 -1
  1112. package/dist/utils/metrics-reader.js +0 -201
  1113. package/dist/utils/metrics-reader.js.map +0 -1
  1114. package/dist/utils/npx-isolated-cache.d.ts +0 -17
  1115. package/dist/utils/npx-isolated-cache.d.ts.map +0 -1
  1116. package/dist/utils/npx-isolated-cache.js +0 -140
  1117. package/dist/utils/npx-isolated-cache.js.map +0 -1
  1118. package/dist/utils/project-root.d.ts +0 -35
  1119. package/dist/utils/project-root.d.ts.map +0 -1
  1120. package/dist/utils/project-root.js +0 -115
  1121. package/dist/utils/project-root.js.map +0 -1
  1122. package/dist/utils/type-guards.d.ts +0 -117
  1123. package/dist/utils/type-guards.d.ts.map +0 -1
  1124. package/dist/utils/type-guards.js +0 -166
  1125. package/dist/utils/type-guards.js.map +0 -1
  1126. package/dist/utils/types.d.ts +0 -568
  1127. package/dist/utils/types.d.ts.map +0 -1
  1128. package/dist/utils/types.js +0 -37
  1129. package/dist/utils/types.js.map +0 -1
  1130. /package/docs/{COMMANDS_TO_SKILLS_MIGRATION.md → development/COMMANDS_TO_SKILLS_MIGRATION.md} +0 -0
  1131. /package/docs/{FINAL_INIT_STRUCTURE.md → development/FINAL_INIT_STRUCTURE.md} +0 -0
  1132. /package/docs/{CLI-MEMORY-COMMANDS-WORKING.md → fixes/CLI-MEMORY-COMMANDS-WORKING.md} +0 -0
  1133. /package/docs/{PERFORMANCE-JSON-IMPROVEMENTS.md → performance/PERFORMANCE-JSON-IMPROVEMENTS.md} +0 -0
  1134. /package/docs/{PERFORMANCE-METRICS-GUIDE.md → performance/PERFORMANCE-METRICS-GUIDE.md} +0 -0
  1135. /package/docs/{RELEASE-NOTES-v2.7.0-alpha.9.md → releases/v2.7.0-alpha.9/RELEASE-NOTES-v2.7.0-alpha.9.md} +0 -0
@@ -1,3085 +0,0 @@
1
- #!/usr/bin/env -S deno run --allow-all
2
- /**
3
- * Simple CLI wrapper for Claude-Flow (JavaScript version)
4
- * This version avoids TypeScript issues in node_modules
5
- */
6
- import { promises as fs } from 'node:fs';
7
- import { executeCommand, hasCommand, showCommandHelp, listCommands, } from './command-registry.js';
8
- import { parseFlags } from './utils.js';
9
- import { VERSION } from '../core/version.js';
10
- function printHelp() {
11
- console.log(`
12
- 🌊 Claude-Flow v${VERSION} - Enterprise-Grade AI Agent Orchestration Platform
13
-
14
- 🎯 NEW IN v2.6.0: Multi-Provider Execution Engine with Agentic-Flow Integration
15
- • 66+ specialized agents with multi-provider support (Anthropic, OpenRouter, ONNX, Gemini)
16
- • 99% cost savings with OpenRouter, 352x faster local edits with Agent Booster
17
- • Complete backwards compatibility with existing features
18
-
19
- 🎯 ENTERPRISE FEATURES: Complete ruv-swarm integration with 27 MCP tools, neural networking, and production-ready infrastructure
20
-
21
- USAGE:
22
- claude-flow <command> [options]
23
-
24
- 🚀 INSTALLATION & ENTERPRISE SETUP:
25
- npx claude-flow@2.0.0 init --sparc # Enterprise SPARC + ruv-swarm integration
26
-
27
- The --sparc flag creates:
28
- • Complete ruv-swarm integration with 27 MCP tools
29
- • Neural network processing with WASM optimization
30
- • Multi-agent coordination (hierarchical, mesh, ring, star topologies)
31
- • Cross-session memory and persistent learning
32
- • GitHub workflow automation (6 specialized modes)
33
- • Production-ready Docker infrastructure
34
- • Enterprise security and compliance features
35
-
36
- 🧠 SWARM INTELLIGENCE COMMANDS (v2.0.0):
37
- swarm "objective" [--strategy] [--mode] [--max-agents N] [--parallel] [--monitor]
38
- --strategy: research, development, analysis, testing, optimization, maintenance
39
- --mode: centralized, distributed, hierarchical, mesh, hybrid
40
- --parallel: Enable parallel execution (2.8-4.4x speed improvement)
41
- --monitor: Real-time swarm monitoring and performance tracking
42
-
43
- 🐙 GITHUB WORKFLOW AUTOMATION (v2.0.0):
44
- github gh-coordinator # GitHub workflow orchestration and coordination
45
- github pr-manager # Pull request management with multi-reviewer coordination
46
- github issue-tracker # Issue management and project coordination
47
- github release-manager # Release coordination and deployment pipelines
48
- github repo-architect # Repository structure optimization
49
- github sync-coordinator # Multi-package synchronization and version alignment
50
-
51
- 🏗️ CORE ENTERPRISE COMMANDS:
52
- init [--sparc] # Initialize with enterprise environment + ruv-swarm
53
- start [--ui] [--swarm] # Start orchestration with swarm intelligence
54
- spawn <type> [--name] # Create AI agent with swarm coordination
55
- agent <subcommand> # 🆕 Multi-provider agent execution + management
56
- sparc <subcommand> # 17 SPARC modes with neural enhancement
57
- memory <subcommand> # Cross-session persistent memory with neural learning
58
- config <subcommand> # 🆕 Provider configuration management
59
- status # Comprehensive system status with performance metrics
60
-
61
- 🤖 NEURAL AGENT TYPES (ruv-swarm Integration):
62
- researcher # Research with web access and data analysis
63
- coder # Code development with neural patterns
64
- analyst # Performance analysis and optimization
65
- architect # System design with enterprise patterns
66
- tester # Comprehensive testing with automation
67
- coordinator # Multi-agent orchestration and workflow management
68
- reviewer # Code review with security and quality checks
69
- optimizer # Performance optimization and bottleneck analysis
70
-
71
- 🎮 ENTERPRISE QUICK START:
72
- # Initialize enterprise environment
73
- npx claude-flow@2.6.0-alpha.1 init --sparc
74
-
75
- # 🆕 Execute agents with multi-provider support
76
- ./claude-flow agent run coder "Build REST API with auth" --provider anthropic
77
- ./claude-flow agent run researcher "Research React 19" --provider openrouter # 99% cost savings
78
- ./claude-flow agent agents # List all 66+ available agents
79
-
80
- # Start enterprise orchestration with swarm intelligence
81
- ./claude-flow start --ui --swarm
82
-
83
- # Deploy intelligent multi-agent development workflow
84
- ./claude-flow swarm "build enterprise API" --strategy development --parallel --monitor
85
-
86
- # GitHub workflow automation
87
- ./claude-flow github pr-manager "coordinate release with automated testing"
88
-
89
- # Neural memory management
90
- ./claude-flow memory store "architecture" "microservices with API gateway pattern"
91
-
92
- # Real-time system monitoring
93
- ./claude-flow status --verbose
94
-
95
- 🏢 ENTERPRISE COMMAND CATEGORIES:
96
- Core Intelligence: swarm, agent, sparc, memory, neural
97
- GitHub Automation: github (6 specialized modes)
98
- Development: init, start, status, config, workflow
99
- Infrastructure: mcp, terminal, session, docker
100
- Enterprise: project, deploy, cloud, security, analytics, audit
101
-
102
- 🧠 NEURAL NETWORK FEATURES (v2.0.0):
103
- • WASM-powered cognitive patterns with SIMD optimization
104
- • 27 MCP tools for comprehensive workflow automation
105
- • Cross-session learning and adaptation
106
- • Real-time performance monitoring (sub-10ms response times)
107
- • 32.3% token usage reduction through intelligent coordination
108
- • Self-healing workflows with automatic error recovery
109
-
110
- 📊 ENTERPRISE PERFORMANCE METRICS:
111
- • 84.8% SWE-Bench solve rate through coordinated intelligence
112
- • 2.8-4.4x speed improvement with parallel execution
113
- • 60% Docker build performance improvement
114
- • 100% test success rate with comprehensive validation
115
- • Sub-10ms MCP response times
116
-
117
- 🔗 INTEGRATION & COMPATIBILITY:
118
- • Node.js 20+ optimization for enterprise environments
119
- • Complete Claude Code integration with enhanced capabilities
120
- • Multi-platform support (Windows, macOS, Linux)
121
- • Enterprise security with access control and audit logging
122
- • Cross-package synchronization and dependency management
123
-
124
- GET DETAILED HELP:
125
- claude-flow help <command> # Command-specific enterprise documentation
126
- claude-flow <command> --help # Alternative help syntax
127
-
128
- Examples:
129
- claude-flow help swarm # Swarm intelligence coordination
130
- claude-flow help github # GitHub workflow automation
131
- claude-flow help neural # Neural network processing
132
- claude-flow help enterprise # Enterprise features and compliance
133
-
134
- COMMON OPTIONS:
135
- --verbose, -v Enable detailed output with performance metrics
136
- --help Show command help with enterprise features
137
- --config <path> Use custom enterprise configuration
138
- --parallel Enable parallel execution (default for swarms)
139
- --monitor Real-time monitoring and performance tracking
140
-
141
- 📚 Documentation: https://github.com/ruvnet/claude-code-flow
142
- 🐝 ruv-swarm: https://github.com/ruvnet/ruv-FANN/tree/main/ruv-swarm
143
-
144
- 🚀 Enterprise-Grade AI Agent Orchestration - Built with ❤️ by rUv for the Claude community
145
- `);
146
- }
147
- function printVersion() {
148
- console.log(`Claude-Flow v${VERSION}`);
149
- }
150
- function printError(message) {
151
- console.error(`❌ Error: ${message}`);
152
- }
153
- function printSuccess(message) {
154
- console.log(`✅ ${message}`);
155
- }
156
- function printWarning(message) {
157
- console.warn(`⚠️ Warning: ${message}`);
158
- }
159
- function showHelpWithCommands() {
160
- printHelp();
161
- console.log('\nRegistered Commands:');
162
- const commands = listCommands();
163
- for (const command of commands) {
164
- console.log(` ${command.name.padEnd(12)} ${command.description}`);
165
- }
166
- console.log('\nUse "claude-flow help <command>" for detailed usage information');
167
- }
168
- async function main() {
169
- const args = Deno.args;
170
- if (args.length === 0) {
171
- printHelp();
172
- return;
173
- }
174
- const command = args[0];
175
- const { flags, args: parsedArgs } = parseFlags(args.slice(1));
176
- // Handle special commands first
177
- switch (command) {
178
- case 'version':
179
- case '--version':
180
- case '-v':
181
- printVersion();
182
- return;
183
- case 'help':
184
- case '--help':
185
- case '-h':
186
- if (parsedArgs.length > 0) {
187
- showCommandHelp(parsedArgs[0]);
188
- }
189
- else {
190
- showHelpWithCommands();
191
- }
192
- return;
193
- }
194
- // Check if this is a registered modular command
195
- if (hasCommand(command)) {
196
- try {
197
- await executeCommand(command, parsedArgs, flags);
198
- return;
199
- }
200
- catch (err) {
201
- printError(err.message);
202
- return;
203
- }
204
- }
205
- // Legacy command handling (to be refactored)
206
- const subArgs = parsedArgs; // Use parsed args for legacy commands
207
- switch (command) {
208
- case 'status':
209
- printSuccess('Claude-Flow System Status:');
210
- console.log('🟡 Status: Not Running (orchestrator not started)');
211
- console.log('🤖 Agents: 0 active');
212
- console.log('📋 Tasks: 0 in queue');
213
- console.log('💾 Memory: Ready');
214
- console.log('🖥️ Terminal Pool: Ready');
215
- console.log('🌐 MCP Server: Stopped');
216
- break;
217
- case 'monitor':
218
- printSuccess('Starting system monitor...');
219
- console.log('📊 Real-time monitoring would display here');
220
- break;
221
- case 'spawn':
222
- // Convenience alias for agent spawn
223
- const spawnType = subArgs[0] || 'general';
224
- const spawnName = flags.name || `agent-${Date.now()}`;
225
- printSuccess(`Spawning ${spawnType} agent: ${spawnName}`);
226
- console.log('🤖 Agent would be created with the following configuration:');
227
- console.log(` Type: ${spawnType}`);
228
- console.log(` Name: ${spawnName}`);
229
- console.log(' Capabilities: Research, Analysis, Code Generation');
230
- console.log(' Status: Ready');
231
- console.log('\n📋 Note: Full agent spawning requires orchestrator to be running');
232
- break;
233
- case 'terminal':
234
- const terminalCmd = subArgs[0];
235
- switch (terminalCmd) {
236
- case 'pool':
237
- const poolCmd = subArgs[1];
238
- const detailed = subArgs.includes('--detailed') || subArgs.includes('-d');
239
- if (poolCmd === 'status') {
240
- printSuccess('Terminal Pool Status:');
241
- console.log('🖥️ Status: Ready');
242
- console.log('📊 Pool Size: 10 (default)');
243
- console.log('🟢 Active Terminals: 0');
244
- console.log('⏸️ Idle Terminals: 0');
245
- console.log('📈 Total Created: 0');
246
- if (detailed) {
247
- console.log('\n📋 Detailed Information:');
248
- console.log(' Configuration:');
249
- console.log(' • Max Pool Size: 10');
250
- console.log(' • Idle Timeout: 5 minutes');
251
- console.log(' • Shell: /bin/bash');
252
- console.log(' • Working Directory: ' + process.cwd());
253
- console.log(' Performance:');
254
- console.log(' • Average Response Time: N/A');
255
- console.log(' • Terminal Creation Time: N/A');
256
- console.log(' • Memory Usage: N/A');
257
- console.log(' Health:');
258
- console.log(' • Pool Health: Healthy');
259
- console.log(' • Last Health Check: Just now');
260
- }
261
- }
262
- else if (poolCmd === 'list') {
263
- printSuccess('Terminal Pool Sessions:');
264
- console.log('📋 No active terminal sessions');
265
- }
266
- else if (poolCmd === 'create') {
267
- printSuccess('Creating new terminal session...');
268
- console.log('🆔 Terminal ID: term-' + Date.now());
269
- console.log('🖥️ Status: Created');
270
- console.log('🐚 Shell: /bin/bash');
271
- }
272
- else if (poolCmd === 'terminate') {
273
- const termId = subArgs[2];
274
- if (termId) {
275
- printSuccess(`Terminating terminal: ${termId}`);
276
- console.log('✅ Terminal terminated successfully');
277
- }
278
- else {
279
- printError('Usage: terminal pool terminate <terminal-id>');
280
- }
281
- }
282
- else if (poolCmd === 'stats') {
283
- // Pool statistics command
284
- printSuccess('Terminal Pool Statistics:');
285
- console.log('📊 Utilization: 0%');
286
- console.log('⚡ Performance Metrics:');
287
- console.log(' • Average Command Time: N/A');
288
- console.log(' • Total Commands: 0');
289
- console.log(' • Failed Commands: 0');
290
- console.log('♻️ Recycling Stats:');
291
- console.log(' • Terminals Recycled: 0');
292
- console.log(' • Average Lifetime: N/A');
293
- }
294
- else {
295
- console.log('Terminal pool commands: status, list, create, terminate, stats');
296
- console.log('Options: --detailed, -d');
297
- }
298
- break;
299
- case 'create':
300
- // Advanced terminal creation
301
- const nameIndex = subArgs.indexOf('--name');
302
- const shellIndex = subArgs.indexOf('--shell');
303
- const wdIndex = subArgs.indexOf('--working-directory');
304
- const envIndex = subArgs.indexOf('--env');
305
- const persistentIndex = subArgs.indexOf('--persistent');
306
- const terminalConfig = {
307
- name: nameIndex >= 0 ? subArgs[nameIndex + 1] : 'terminal-' + Date.now(),
308
- shell: shellIndex >= 0 ? subArgs[shellIndex + 1] : 'bash',
309
- workingDirectory: wdIndex >= 0 ? subArgs[wdIndex + 1] : process.cwd(),
310
- env: envIndex >= 0 ? subArgs[envIndex + 1] : '',
311
- persistent: persistentIndex >= 0,
312
- };
313
- printSuccess('Creating terminal session...');
314
- console.log(`🆔 Terminal ID: ${terminalConfig.name}`);
315
- console.log(`🐚 Shell: ${terminalConfig.shell}`);
316
- console.log(`📁 Working Directory: ${terminalConfig.workingDirectory}`);
317
- if (terminalConfig.env) {
318
- console.log(`🔧 Environment: ${terminalConfig.env}`);
319
- }
320
- if (terminalConfig.persistent) {
321
- console.log('💾 Persistent: Yes');
322
- }
323
- break;
324
- case 'execute':
325
- case 'exec':
326
- const execCmd = subArgs.slice(1).join(' ');
327
- const sessionFlag = subArgs.indexOf('--session');
328
- const timeoutFlag = subArgs.indexOf('--timeout');
329
- const backgroundFlag = subArgs.includes('--background');
330
- if (execCmd && sessionFlag < 0) {
331
- printSuccess(`Executing command: ${execCmd}`);
332
- console.log('🖥️ Command would execute in terminal pool');
333
- console.log('📝 Output would appear here');
334
- if (backgroundFlag) {
335
- console.log('🔄 Running in background');
336
- }
337
- }
338
- else if (sessionFlag >= 0) {
339
- const sessionId = subArgs[sessionFlag + 1];
340
- const cmdStart = subArgs.indexOf('"');
341
- const cmdEnd = subArgs.lastIndexOf('"');
342
- const command = cmdStart >= 0 && cmdEnd > cmdStart
343
- ? subArgs
344
- .slice(cmdStart, cmdEnd + 1)
345
- .join(' ')
346
- .slice(1, -1)
347
- : 'echo "No command"';
348
- printSuccess(`Executing in session ${sessionId}: ${command}`);
349
- if (timeoutFlag >= 0) {
350
- console.log(`⏱️ Timeout: ${subArgs[timeoutFlag + 1]}`);
351
- }
352
- }
353
- else {
354
- printError('Usage: terminal execute <command> [--session <id>] [--timeout <duration>]');
355
- }
356
- break;
357
- case 'batch-exec':
358
- // Batch command execution
359
- const batchSession = subArgs.find((arg) => !arg.startsWith('--'));
360
- const commandsFlag = subArgs.indexOf('--commands');
361
- const fileFlag = subArgs.indexOf('--file');
362
- if (commandsFlag >= 0) {
363
- const commands = subArgs[commandsFlag + 1].split(',');
364
- printSuccess(`Executing ${commands.length} commands in sequence`);
365
- commands.forEach((cmd, i) => {
366
- console.log(` ${i + 1}. ${cmd}`);
367
- });
368
- }
369
- else if (fileFlag >= 0) {
370
- printSuccess(`Executing commands from file: ${subArgs[fileFlag + 1]}`);
371
- }
372
- else {
373
- console.log('Usage: terminal batch-exec --commands "cmd1,cmd2,cmd3" [--session <id>]');
374
- }
375
- break;
376
- case 'list':
377
- // List all terminal sessions
378
- const listDetailed = subArgs.includes('--detailed');
379
- printSuccess('Active Terminal Sessions:');
380
- console.log('📋 No active terminal sessions');
381
- if (listDetailed) {
382
- console.log('\nSystem Information:');
383
- console.log(' • Total Sessions Created: 0');
384
- console.log(' • Sessions Recycled: 0');
385
- console.log(' • Average Session Lifetime: N/A');
386
- }
387
- break;
388
- case 'info':
389
- // Get terminal info
390
- const infoSessionId = subArgs[1];
391
- if (infoSessionId) {
392
- printSuccess(`Terminal Information: ${infoSessionId}`);
393
- console.log('🆔 Session ID: ' + infoSessionId);
394
- console.log('📍 Status: Not found');
395
- console.log('🐚 Shell: N/A');
396
- console.log('📁 Working Directory: N/A');
397
- console.log('⏱️ Created: N/A');
398
- console.log('📊 Commands Executed: 0');
399
- }
400
- else {
401
- printError('Usage: terminal info <session-id>');
402
- }
403
- break;
404
- case 'attach':
405
- // Attach to terminal
406
- const attachId = subArgs[1];
407
- if (attachId) {
408
- printSuccess(`Attaching to terminal: ${attachId}`);
409
- console.log('🔗 Would enter interactive mode');
410
- console.log('💡 Press Ctrl+D to detach');
411
- }
412
- else {
413
- printError('Usage: terminal attach <session-id>');
414
- }
415
- break;
416
- case 'detach':
417
- // Detach from terminal
418
- const detachId = subArgs[1];
419
- if (detachId) {
420
- printSuccess(`Detaching from terminal: ${detachId}`);
421
- console.log('✅ Session continues running in background');
422
- }
423
- else {
424
- printError('Usage: terminal detach <session-id>');
425
- }
426
- break;
427
- case 'terminate':
428
- // Terminate terminal
429
- const terminateId = subArgs[1];
430
- const graceful = subArgs.includes('--graceful');
431
- if (terminateId) {
432
- printSuccess(`Terminating terminal: ${terminateId}`);
433
- if (graceful) {
434
- console.log('🕐 Graceful shutdown initiated');
435
- }
436
- console.log('✅ Terminal terminated');
437
- }
438
- else {
439
- printError('Usage: terminal terminate <session-id> [--graceful]');
440
- }
441
- break;
442
- case 'cleanup':
443
- // Cleanup idle terminals
444
- const idleTime = subArgs.find((arg) => arg.includes('--idle-longer-than'));
445
- printSuccess('Cleaning up idle terminals...');
446
- console.log('🧹 Scanning for idle sessions');
447
- if (idleTime) {
448
- console.log(`⏱️ Idle threshold: ${idleTime.split('=')[1] || '30m'}`);
449
- }
450
- console.log('✅ Cleanup complete: 0 terminals removed');
451
- break;
452
- case 'monitor':
453
- // Monitor terminal
454
- const monitorId = subArgs[1];
455
- if (monitorId) {
456
- printSuccess(`Monitoring terminal: ${monitorId}`);
457
- console.log('📊 Real-time metrics would display here');
458
- console.log(' • CPU: 0%');
459
- console.log(' • Memory: 0MB');
460
- console.log(' • I/O: 0 ops/s');
461
- }
462
- else {
463
- printError('Usage: terminal monitor <session-id>');
464
- }
465
- break;
466
- case 'record':
467
- // Record terminal session
468
- const recordId = subArgs[1];
469
- const outputFlag = subArgs.indexOf('--output');
470
- if (recordId && outputFlag >= 0) {
471
- printSuccess(`Recording terminal session: ${recordId}`);
472
- console.log(`📹 Output file: ${subArgs[outputFlag + 1]}`);
473
- console.log('🔴 Recording started');
474
- }
475
- else {
476
- printError('Usage: terminal record <session-id> --output <file>');
477
- }
478
- break;
479
- case 'replay':
480
- // Replay terminal session
481
- const replayFile = subArgs[1];
482
- if (replayFile) {
483
- printSuccess(`Replaying session from: ${replayFile}`);
484
- console.log('▶️ Playback would start here');
485
- console.log('⏸️ Controls: space=pause, arrows=seek, q=quit');
486
- }
487
- else {
488
- printError('Usage: terminal replay <recording-file>');
489
- }
490
- break;
491
- case 'share':
492
- // Share terminal session
493
- const shareId = subArgs[1];
494
- const accessLevel = subArgs.find((arg) => arg.includes('--access-level'));
495
- if (shareId) {
496
- printSuccess(`Sharing terminal session: ${shareId}`);
497
- console.log(`🔗 Share URL: https://claude-flow.local/terminal/${shareId}/view`);
498
- console.log(`🔐 Access: ${accessLevel ? accessLevel.split('=')[1] : 'read-only'}`);
499
- console.log('⏱️ Expires in: 2 hours');
500
- }
501
- else {
502
- printError('Usage: terminal share <session-id> [--access-level read|write]');
503
- }
504
- break;
505
- case 'multi-config':
506
- // Multi-terminal configuration
507
- const multiCmd = subArgs[1];
508
- if (multiCmd === 'create') {
509
- const configName = subArgs.find((arg) => !arg.startsWith('--'));
510
- printSuccess(`Creating multi-terminal configuration: ${configName || 'default'}`);
511
- console.log('📋 Configuration template created');
512
- }
513
- else {
514
- console.log('Usage: terminal multi-config create --name <name> --config <file>');
515
- }
516
- break;
517
- case 'multi-launch':
518
- // Launch multi-terminal environment
519
- const envName = subArgs[1];
520
- if (envName) {
521
- printSuccess(`Launching multi-terminal environment: ${envName}`);
522
- console.log('🚀 Starting terminals in dependency order...');
523
- console.log(' 1. database - Starting...');
524
- console.log(' 2. backend-api - Waiting for database...');
525
- console.log(' 3. frontend-app - Waiting for backend...');
526
- console.log('✅ All terminals launched successfully');
527
- }
528
- else {
529
- printError('Usage: terminal multi-launch <environment-name>');
530
- }
531
- break;
532
- case 'batch-create':
533
- // Batch create terminals
534
- const configFile = subArgs.find((arg) => arg.includes('--config'));
535
- printSuccess('Creating multiple terminal sessions...');
536
- if (configFile) {
537
- console.log(`📄 Loading config from: ${configFile.split('=')[1]}`);
538
- }
539
- console.log('✅ Created 3 terminal sessions');
540
- break;
541
- case 'session':
542
- // Legacy session command handling
543
- const sessionCmd = subArgs[1];
544
- if (sessionCmd === 'list') {
545
- printSuccess('Terminal Sessions:');
546
- console.log('📋 No active sessions');
547
- }
548
- else if (sessionCmd === 'info') {
549
- const sessionId = subArgs[2];
550
- if (sessionId) {
551
- printSuccess(`Session Info: ${sessionId}`);
552
- console.log('🆔 Session ID: ' + sessionId);
553
- console.log('📍 Status: Not found');
554
- }
555
- else {
556
- printError('Usage: terminal session info <session-id>');
557
- }
558
- }
559
- else {
560
- console.log('Terminal session commands: list, info');
561
- }
562
- break;
563
- default:
564
- console.log('Terminal commands:');
565
- console.log(' Basic:');
566
- console.log(' pool - Manage terminal pool (status, list, create, terminate)');
567
- console.log(' create - Create new terminal with options');
568
- console.log(' execute - Execute command in terminal');
569
- console.log(' list - List all active terminals');
570
- console.log(' info - Get terminal information');
571
- console.log(' Session Control:');
572
- console.log(' attach - Attach to terminal session');
573
- console.log(' detach - Detach from terminal');
574
- console.log(' terminate - Terminate terminal session');
575
- console.log(' cleanup - Clean up idle terminals');
576
- console.log(' Advanced:');
577
- console.log(' batch-exec - Execute multiple commands');
578
- console.log(' monitor - Monitor terminal metrics');
579
- console.log(' record - Record terminal session');
580
- console.log(' replay - Replay recorded session');
581
- console.log(' share - Share terminal session');
582
- console.log(' Multi-Terminal:');
583
- console.log(' multi-config - Create multi-terminal config');
584
- console.log(' multi-launch - Launch terminal environment');
585
- console.log(' batch-create - Create multiple terminals');
586
- console.log('\nExamples:');
587
- console.log(' terminal pool status --detailed');
588
- console.log(' terminal create --name "dev" --shell bash --persistent');
589
- console.log(' terminal execute "npm test" --session dev --timeout 5m');
590
- console.log(' terminal batch-exec --commands "cd /app,npm install,npm start"');
591
- console.log(' terminal monitor dev --metrics cpu,memory');
592
- }
593
- break;
594
- case 'session':
595
- printSuccess('Terminal session manager ready');
596
- console.log('🖥️ Session operations would be handled here');
597
- break;
598
- case 'workflow':
599
- const workflowFile = subArgs[0];
600
- if (workflowFile) {
601
- printSuccess(`Executing workflow: ${workflowFile}`);
602
- console.log('🔄 Workflow execution would start here');
603
- }
604
- else {
605
- printError('Please specify a workflow file');
606
- }
607
- break;
608
- case 'repl':
609
- printSuccess('Starting interactive REPL mode...');
610
- await startRepl();
611
- break;
612
- case 'project':
613
- const projectCmd = subArgs[0];
614
- switch (projectCmd) {
615
- case 'create':
616
- const projectName = subArgs[1];
617
- if (!projectName) {
618
- printError('Usage: project create <name> [options]');
619
- break;
620
- }
621
- const isolationFlag = subArgs.indexOf('--isolation');
622
- const resourceQuotaFlag = subArgs.indexOf('--resource-quota');
623
- const securityProfileFlag = subArgs.indexOf('--security-profile');
624
- const templateFlag = subArgs.indexOf('--template');
625
- printSuccess(`Creating project: ${projectName}`);
626
- console.log('🏗️ Project Configuration:');
627
- console.log(` Name: ${projectName}`);
628
- console.log(` Isolation: ${isolationFlag >= 0 ? subArgs[isolationFlag + 1] : 'standard'}`);
629
- if (resourceQuotaFlag >= 0) {
630
- console.log(` Resource Quota: ${subArgs[resourceQuotaFlag + 1]}`);
631
- }
632
- console.log(` Security Profile: ${securityProfileFlag >= 0 ? subArgs[securityProfileFlag + 1] : 'default'}`);
633
- if (templateFlag >= 0) {
634
- console.log(` Template: ${subArgs[templateFlag + 1]}`);
635
- }
636
- // Create project directory structure
637
- console.log('\n📁 Creating project structure:');
638
- console.log(` ✓ Created /projects/${projectName}/`);
639
- console.log(` ✓ Created /projects/${projectName}/agents/`);
640
- console.log(` ✓ Created /projects/${projectName}/workflows/`);
641
- console.log(` ✓ Created /projects/${projectName}/config/`);
642
- console.log(` ✓ Created /projects/${projectName}/data/`);
643
- console.log(` ✓ Created project-config.json`);
644
- console.log('\n✅ Project created successfully!');
645
- break;
646
- case 'switch':
647
- const switchProject = subArgs[1];
648
- if (!switchProject) {
649
- printError('Usage: project switch <name>');
650
- break;
651
- }
652
- printSuccess(`Switching to project: ${switchProject}`);
653
- console.log('🔄 Loading project context...');
654
- console.log(' ✓ Project configuration loaded');
655
- console.log(' ✓ Agent states restored');
656
- console.log(' ✓ Workflow history loaded');
657
- console.log(`\n📍 Active project: ${switchProject}`);
658
- break;
659
- case 'list':
660
- const showActive = subArgs.includes('--active');
661
- const withStats = subArgs.includes('--with-stats');
662
- printSuccess('Available projects:');
663
- const projects = [
664
- { name: 'microservices-platform', status: 'active', agents: 12, tasks: 45 },
665
- { name: 'ai-research', status: 'idle', agents: 3, tasks: 8 },
666
- { name: 'frontend-apps', status: 'archived', agents: 0, tasks: 0 },
667
- ];
668
- projects.forEach((project) => {
669
- if (showActive && project.status !== 'active')
670
- return;
671
- console.log(`\n📦 ${project.name}`);
672
- console.log(` Status: ${project.status}`);
673
- if (withStats) {
674
- console.log(` Active Agents: ${project.agents}`);
675
- console.log(` Pending Tasks: ${project.tasks}`);
676
- }
677
- });
678
- break;
679
- case 'config':
680
- const configAction = subArgs[1];
681
- const configProject = subArgs[2];
682
- if (configAction === 'set' && configProject) {
683
- const configKey = subArgs[3];
684
- const configValue = subArgs.slice(4).join(' ');
685
- printSuccess(`Updating project configuration: ${configProject}`);
686
- console.log(` Setting: ${configKey} = ${configValue}`);
687
- console.log('✅ Configuration updated');
688
- }
689
- else if (configAction === 'get' && configProject) {
690
- const configKey = subArgs[3];
691
- console.log(`Project: ${configProject}`);
692
- console.log(`${configKey}: (configuration value)`);
693
- }
694
- else {
695
- console.log('Usage: project config set <project> <key> <value>');
696
- console.log(' project config get <project> <key>');
697
- }
698
- break;
699
- case 'monitor':
700
- const monitorProject = subArgs[1];
701
- if (!monitorProject) {
702
- printError('Usage: project monitor <name> [options]');
703
- break;
704
- }
705
- printSuccess(`Monitoring project: ${monitorProject}`);
706
- console.log('\n📊 Real-time Metrics:');
707
- console.log(' Resource Usage:');
708
- console.log(' • CPU: 45%');
709
- console.log(' • Memory: 2.3GB / 4GB');
710
- console.log(' • Storage: 8.5GB / 20GB');
711
- console.log(' • Network: 23Mbps / 100Mbps');
712
- console.log(' Agent Performance:');
713
- console.log(' • Active Agents: 8');
714
- console.log(' • Average Response Time: 234ms');
715
- console.log(' • Task Success Rate: 94%');
716
- console.log(' Costs:');
717
- console.log(' • Today: $124.50');
718
- console.log(' • This Month: $2,845.00');
719
- break;
720
- case 'backup':
721
- const backupProject = subArgs[1];
722
- if (!backupProject) {
723
- printError('Usage: project backup <name> [options]');
724
- break;
725
- }
726
- const includeData = subArgs.includes('--include-data');
727
- const includeConfig = subArgs.includes('--include-config');
728
- const includeHistory = subArgs.includes('--include-history');
729
- const outputFlag = subArgs.indexOf('--output');
730
- printSuccess(`Creating backup for project: ${backupProject}`);
731
- console.log('🗄️ Backup Configuration:');
732
- console.log(` Include Data: ${includeData ? 'Yes' : 'No'}`);
733
- console.log(` Include Config: ${includeConfig ? 'Yes' : 'No'}`);
734
- console.log(` Include History: ${includeHistory ? 'Yes' : 'No'}`);
735
- console.log('\n📦 Creating backup...');
736
- console.log(' ✓ Collecting project data');
737
- console.log(' ✓ Compressing files');
738
- console.log(' ✓ Encrypting backup');
739
- const outputFile = outputFlag >= 0
740
- ? subArgs[outputFlag + 1]
741
- : `${backupProject}-backup-${Date.now()}.tar.gz`;
742
- console.log(`\n✅ Backup created: ${outputFile}`);
743
- console.log(' Size: 145MB');
744
- console.log(' Checksum: sha256:abcd1234...');
745
- break;
746
- case 'share':
747
- const shareFrom = subArgs[1];
748
- const shareTo = subArgs[2];
749
- if (!shareFrom || !shareTo) {
750
- printError('Usage: project share <from-project> <to-project> [options]');
751
- break;
752
- }
753
- const agentsFlag = subArgs.indexOf('--agents');
754
- const permissionsFlag = subArgs.indexOf('--permissions');
755
- const durationFlag = subArgs.indexOf('--duration');
756
- printSuccess(`Sharing resources from ${shareFrom} to ${shareTo}`);
757
- if (agentsFlag >= 0) {
758
- console.log(` Agents: ${subArgs[agentsFlag + 1]}`);
759
- }
760
- if (permissionsFlag >= 0) {
761
- console.log(` Permissions: ${subArgs[permissionsFlag + 1]}`);
762
- }
763
- if (durationFlag >= 0) {
764
- console.log(` Duration: ${subArgs[durationFlag + 1]}`);
765
- }
766
- console.log('\n✅ Resource sharing configured');
767
- break;
768
- case 'federation':
769
- const fedCmd = subArgs[1];
770
- if (fedCmd === 'create') {
771
- const fedName = subArgs[2];
772
- const projectsFlag = subArgs.indexOf('--projects');
773
- if (!fedName) {
774
- printError('Usage: project federation create <name> --projects <project-list>');
775
- break;
776
- }
777
- printSuccess(`Creating federation: ${fedName}`);
778
- if (projectsFlag >= 0) {
779
- console.log(` Projects: ${subArgs[projectsFlag + 1]}`);
780
- }
781
- console.log(' Coordination Model: hierarchical');
782
- console.log(' Shared Resources: knowledge-base, artifact-registry');
783
- console.log('\n✅ Federation created successfully');
784
- }
785
- else if (fedCmd === 'list') {
786
- printSuccess('Active federations:');
787
- console.log('\n🏢 development-ecosystem');
788
- console.log(' Projects: backend-services, frontend-apps, infrastructure');
789
- console.log(' Coordinator: infrastructure');
790
- console.log(' Status: Active');
791
- }
792
- else {
793
- console.log('Federation commands: create, list, workflow');
794
- }
795
- break;
796
- default:
797
- console.log('Project commands:');
798
- console.log(' create - Create new project with isolation');
799
- console.log(' switch - Switch active project context');
800
- console.log(' list - List all projects');
801
- console.log(' config - Get/set project configuration');
802
- console.log(' monitor - Monitor project resources and performance');
803
- console.log(' backup - Create project backup');
804
- console.log(' share - Share resources between projects');
805
- console.log(' federation - Manage project federations');
806
- console.log('\nExamples:');
807
- console.log(' project create "microservices" --isolation strict --resource-quota "agents:15,memory:4GB"');
808
- console.log(' project switch "microservices"');
809
- console.log(' project monitor "microservices" --real-time');
810
- }
811
- break;
812
- case 'cloud':
813
- const cloudCmd = subArgs[0];
814
- const cloudProvider = subArgs[1];
815
- switch (cloudCmd) {
816
- case 'aws':
817
- switch (cloudProvider) {
818
- case 'deploy':
819
- const awsServices = subArgs.indexOf('--services');
820
- const awsRegions = subArgs.indexOf('--regions');
821
- const awsHA = subArgs.includes('--ha-configuration');
822
- const awsCostOpt = subArgs.includes('--cost-optimization');
823
- printSuccess('Deploying Claude-Flow to AWS');
824
- console.log('☁️ AWS Deployment Configuration:');
825
- if (awsServices >= 0) {
826
- console.log(` Services: ${subArgs[awsServices + 1]}`);
827
- }
828
- if (awsRegions >= 0) {
829
- console.log(` Regions: ${subArgs[awsRegions + 1]}`);
830
- }
831
- console.log(` High Availability: ${awsHA ? 'Enabled' : 'Disabled'}`);
832
- console.log(` Cost Optimization: ${awsCostOpt ? 'Enabled' : 'Disabled'}`);
833
- console.log('\n🚀 Deployment Progress:');
834
- console.log(' ✓ Creating ECS cluster');
835
- console.log(' ✓ Setting up Lambda functions');
836
- console.log(' ✓ Configuring RDS database');
837
- console.log(' ✓ Setting up S3 buckets');
838
- console.log(' ✓ Configuring CloudWatch monitoring');
839
- console.log(' ✓ Setting up load balancers');
840
- console.log('\n✅ AWS deployment completed successfully');
841
- console.log(' Cluster ARN: arn:aws:ecs:us-east-1:123456789012:cluster/claude-flow');
842
- console.log(' API Gateway: https://api.aws.claude-flow.com');
843
- console.log(' Monitoring: https://console.aws.amazon.com/cloudwatch');
844
- break;
845
- case 'configure':
846
- printSuccess('Configuring AWS integration');
847
- console.log('🔧 AWS Configuration:');
848
- console.log(' ✓ IAM roles and policies');
849
- console.log(' ✓ VPC and security groups');
850
- console.log(' ✓ Auto-scaling policies');
851
- console.log(' ✓ Backup and disaster recovery');
852
- console.log(' ✓ Cost monitoring and alerts');
853
- break;
854
- case 'status':
855
- printSuccess('AWS Infrastructure Status');
856
- console.log('\n🏗️ Infrastructure Health:');
857
- console.log(' ECS Cluster: 3/3 instances healthy');
858
- console.log(' Lambda Functions: 12/12 active');
859
- console.log(' RDS Database: Available (Multi-AZ)');
860
- console.log(' S3 Buckets: 5 buckets, 2.3TB stored');
861
- console.log(' CloudWatch: 47 metrics, 0 alarms');
862
- console.log('\n💰 Cost Summary (This Month):');
863
- console.log(' Compute (ECS/Lambda): $1,245.50');
864
- console.log(' Storage (S3/EBS): $342.25');
865
- console.log(' Network: $87.30');
866
- console.log(' Total: $1,675.05');
867
- break;
868
- default:
869
- console.log('AWS commands: deploy, configure, status');
870
- }
871
- break;
872
- case 'azure':
873
- switch (cloudProvider) {
874
- case 'deploy':
875
- const azureServices = subArgs.indexOf('--services');
876
- const azureRegions = subArgs.indexOf('--regions');
877
- const azureIntegration = subArgs.includes('--integration-with-aws');
878
- printSuccess('Deploying Claude-Flow to Azure');
879
- console.log('☁️ Azure Deployment Configuration:');
880
- if (azureServices >= 0) {
881
- console.log(` Services: ${subArgs[azureServices + 1]}`);
882
- }
883
- if (azureRegions >= 0) {
884
- console.log(` Regions: ${subArgs[azureRegions + 1]}`);
885
- }
886
- console.log(` AWS Integration: ${azureIntegration ? 'Enabled' : 'Disabled'}`);
887
- console.log('\n🚀 Deployment Progress:');
888
- console.log(' ✓ Creating AKS cluster');
889
- console.log(' ✓ Setting up Azure Functions');
890
- console.log(' ✓ Configuring Cosmos DB');
891
- console.log(' ✓ Setting up Blob Storage');
892
- console.log(' ✓ Configuring Azure Monitor');
893
- console.log(' ✓ Setting up Application Gateway');
894
- console.log('\n✅ Azure deployment completed successfully');
895
- console.log(' Resource Group: claude-flow-production');
896
- console.log(' API Gateway: https://api.azure.claude-flow.com');
897
- console.log(' Monitoring: https://portal.azure.com');
898
- break;
899
- case 'configure':
900
- printSuccess('Configuring Azure integration');
901
- console.log('🔧 Azure Configuration:');
902
- console.log(' ✓ Service principals and RBAC');
903
- console.log(' ✓ Virtual networks and NSGs');
904
- console.log(' ✓ Auto-scaling rules');
905
- console.log(' ✓ Backup and site recovery');
906
- console.log(' ✓ Cost management and budgets');
907
- break;
908
- case 'status':
909
- printSuccess('Azure Infrastructure Status');
910
- console.log('\n🏗️ Infrastructure Health:');
911
- console.log(' AKS Cluster: 3/3 nodes ready');
912
- console.log(' Azure Functions: 8/8 active');
913
- console.log(' Cosmos DB: Available (Global)');
914
- console.log(' Blob Storage: 3 containers, 1.8TB stored');
915
- console.log(' Azure Monitor: 35 metrics, 0 alerts');
916
- console.log('\n💰 Cost Summary (This Month):');
917
- console.log(' Compute (AKS/Functions): $985.40');
918
- console.log(' Storage (Blob/Cosmos): $267.85');
919
- console.log(' Network: $63.20');
920
- console.log(' Total: $1,316.45');
921
- break;
922
- default:
923
- console.log('Azure commands: deploy, configure, status');
924
- }
925
- break;
926
- case 'gcp':
927
- switch (cloudProvider) {
928
- case 'deploy':
929
- const gcpServices = subArgs.indexOf('--services');
930
- const gcpRegions = subArgs.indexOf('--regions');
931
- const multiCloud = subArgs.includes('--multi-cloud-networking');
932
- printSuccess('Deploying Claude-Flow to Google Cloud');
933
- console.log('☁️ GCP Deployment Configuration:');
934
- if (gcpServices >= 0) {
935
- console.log(` Services: ${subArgs[gcpServices + 1]}`);
936
- }
937
- if (gcpRegions >= 0) {
938
- console.log(` Regions: ${subArgs[gcpRegions + 1]}`);
939
- }
940
- console.log(` Multi-Cloud Networking: ${multiCloud ? 'Enabled' : 'Disabled'}`);
941
- console.log('\n🚀 Deployment Progress:');
942
- console.log(' ✓ Creating GKE cluster');
943
- console.log(' ✓ Setting up Cloud Functions');
944
- console.log(' ✓ Configuring Cloud SQL');
945
- console.log(' ✓ Setting up Cloud Storage');
946
- console.log(' ✓ Configuring Cloud Monitoring');
947
- console.log(' ✓ Setting up Cloud Load Balancing');
948
- console.log('\n✅ GCP deployment completed successfully');
949
- console.log(' Project ID: claude-flow-production');
950
- console.log(' API Gateway: https://api.gcp.claude-flow.com');
951
- console.log(' Monitoring: https://console.cloud.google.com');
952
- break;
953
- case 'configure':
954
- printSuccess('Configuring GCP integration');
955
- console.log('🔧 GCP Configuration:');
956
- console.log(' ✓ Service accounts and IAM');
957
- console.log(' ✓ VPC networks and firewall rules');
958
- console.log(' ✓ Auto-scaling policies');
959
- console.log(' ✓ Backup and disaster recovery');
960
- console.log(' ✓ Budget alerts and cost optimization');
961
- break;
962
- case 'status':
963
- printSuccess('GCP Infrastructure Status');
964
- console.log('\n🏗️ Infrastructure Health:');
965
- console.log(' GKE Cluster: 3/3 nodes ready');
966
- console.log(' Cloud Functions: 10/10 active');
967
- console.log(' Cloud SQL: Available (HA)');
968
- console.log(' Cloud Storage: 4 buckets, 2.1TB stored');
969
- console.log(' Cloud Monitoring: 42 metrics, 0 incidents');
970
- console.log('\n💰 Cost Summary (This Month):');
971
- console.log(' Compute (GKE/Functions): $1,125.30');
972
- console.log(' Storage (Cloud Storage/SQL): $298.75');
973
- console.log(' Network: $71.45');
974
- console.log(' Total: $1,495.50');
975
- break;
976
- default:
977
- console.log('GCP commands: deploy, configure, status');
978
- }
979
- break;
980
- case 'multi-cloud':
981
- const multiCloudCmd = subArgs[1];
982
- switch (multiCloudCmd) {
983
- case 'deploy':
984
- printSuccess('Deploying multi-cloud Claude-Flow architecture');
985
- console.log('🌐 Multi-Cloud Deployment:');
986
- console.log(' Primary: AWS (us-east-1)');
987
- console.log(' Secondary: Azure (eastus)');
988
- console.log(' Tertiary: GCP (us-central1)');
989
- console.log('\n🔗 Cross-Cloud Networking:');
990
- console.log(' ✓ VPN connections established');
991
- console.log(' ✓ DNS and load balancing configured');
992
- console.log(' ✓ Data replication setup');
993
- console.log(' ✓ Unified monitoring deployed');
994
- console.log('\n✅ Multi-cloud deployment completed');
995
- console.log(' Global endpoint: https://global.claude-flow.com');
996
- console.log(' Failover time: < 30 seconds');
997
- console.log(' Data consistency: Eventually consistent');
998
- break;
999
- case 'status':
1000
- printSuccess('Multi-Cloud Infrastructure Status');
1001
- console.log('\n🌐 Global Infrastructure:');
1002
- console.log(' AWS (Primary): 🟢 Healthy');
1003
- console.log(' Azure (Secondary): 🟢 Healthy');
1004
- console.log(' GCP (Tertiary): 🟢 Healthy');
1005
- console.log('\n📊 Traffic Distribution:');
1006
- console.log(' AWS: 45% (2,341 req/min)');
1007
- console.log(' Azure: 35% (1,823 req/min)');
1008
- console.log(' GCP: 20% (1,042 req/min)');
1009
- console.log('\n💰 Total Cost (This Month): $4,487.00');
1010
- break;
1011
- case 'failover':
1012
- const failoverTarget = subArgs[2];
1013
- if (!failoverTarget) {
1014
- printError('Usage: cloud multi-cloud failover <target-cloud>');
1015
- break;
1016
- }
1017
- printWarning(`Initiating failover to ${failoverTarget}`);
1018
- console.log('🔄 Failover Process:');
1019
- console.log(' ✓ Health check failed on primary');
1020
- console.log(' ✓ Traffic routing to secondary');
1021
- console.log(' ✓ Database replication verified');
1022
- console.log(' ✓ DNS updates propagated');
1023
- console.log(`\n✅ Failover to ${failoverTarget} completed in 23 seconds`);
1024
- break;
1025
- default:
1026
- console.log('Multi-cloud commands: deploy, status, failover');
1027
- }
1028
- break;
1029
- case 'kubernetes':
1030
- const k8sCmd = subArgs[1];
1031
- switch (k8sCmd) {
1032
- case 'deploy':
1033
- printSuccess('Deploying Claude-Flow to Kubernetes');
1034
- console.log('⚙️ Kubernetes Deployment:');
1035
- console.log(' Namespace: claude-flow');
1036
- console.log(' Replicas: 3');
1037
- console.log(' Resources: 1Gi memory, 500m CPU per pod');
1038
- console.log('\n📦 Deploying Components:');
1039
- console.log(' ✓ Orchestrator deployment');
1040
- console.log(' ✓ MCP server deployment');
1041
- console.log(' ✓ Memory bank deployment');
1042
- console.log(' ✓ Load balancer service');
1043
- console.log(' ✓ Ingress controller');
1044
- console.log(' ✓ ConfigMaps and Secrets');
1045
- console.log('\n✅ Kubernetes deployment completed');
1046
- console.log(' Pods: 3/3 running');
1047
- console.log(' Service: claude-flow-orchestrator-service');
1048
- console.log(' Ingress: https://k8s.claude-flow.com');
1049
- break;
1050
- case 'scale':
1051
- const replicas = subArgs[2] || '5';
1052
- printSuccess(`Scaling Claude-Flow to ${replicas} replicas`);
1053
- console.log('📈 Scaling Progress:');
1054
- console.log(` Current replicas: 3`);
1055
- console.log(` Target replicas: ${replicas}`);
1056
- console.log(' ✓ Updating deployment');
1057
- console.log(' ✓ Rolling update in progress');
1058
- console.log(` ✓ Scaled to ${replicas} replicas successfully`);
1059
- break;
1060
- case 'status':
1061
- printSuccess('Kubernetes Cluster Status');
1062
- console.log('\n⚙️ Cluster Information:');
1063
- console.log(' Namespace: claude-flow');
1064
- console.log(' Deployments: 3/3 ready');
1065
- console.log(' Pods: 3/3 running');
1066
- console.log(' Services: 2 active');
1067
- console.log(' ConfigMaps: 2');
1068
- console.log(' Secrets: 1');
1069
- console.log('\n📊 Resource Usage:');
1070
- console.log(' CPU: 1.2/3.0 cores (40%)');
1071
- console.log(' Memory: 2.1/3.0 GB (70%)');
1072
- console.log(' Storage: 8.5/50 GB (17%)');
1073
- break;
1074
- default:
1075
- console.log('Kubernetes commands: deploy, scale, status');
1076
- }
1077
- break;
1078
- default:
1079
- console.log('Cloud commands:');
1080
- console.log(' aws - Amazon Web Services integration');
1081
- console.log(' azure - Microsoft Azure integration');
1082
- console.log(' gcp - Google Cloud Platform integration');
1083
- console.log(' multi-cloud - Multi-cloud deployment and management');
1084
- console.log(' kubernetes - Kubernetes deployment and management');
1085
- console.log('\nExamples:');
1086
- console.log(' cloud aws deploy --services "ecs,lambda,rds" --regions "us-east-1,us-west-2"');
1087
- console.log(' cloud azure deploy --services "aks,functions,cosmos-db"');
1088
- console.log(' cloud gcp deploy --services "gke,cloud-functions,cloud-sql"');
1089
- console.log(' cloud multi-cloud deploy');
1090
- console.log(' cloud kubernetes deploy');
1091
- }
1092
- break;
1093
- case 'claude':
1094
- const claudeCmd = subArgs[0];
1095
- switch (claudeCmd) {
1096
- case 'spawn':
1097
- // Extract task description and flags
1098
- let taskEndIndex = subArgs.length;
1099
- for (let i = 1; i < subArgs.length; i++) {
1100
- if (subArgs[i].startsWith('-')) {
1101
- taskEndIndex = i;
1102
- break;
1103
- }
1104
- }
1105
- const task = subArgs.slice(1, taskEndIndex).join(' ');
1106
- if (!task) {
1107
- printError('Usage: claude spawn <task description> [options]');
1108
- break;
1109
- }
1110
- // Parse flags
1111
- const flags = {};
1112
- for (let i = taskEndIndex; i < subArgs.length; i++) {
1113
- const arg = subArgs[i];
1114
- if (arg === '--tools' || arg === '-t') {
1115
- flags.tools = subArgs[++i];
1116
- }
1117
- else if (arg === '--no-permissions') {
1118
- flags.noPermissions = true;
1119
- }
1120
- else if (arg === '--config' || arg === '-c') {
1121
- flags.config = subArgs[++i];
1122
- }
1123
- else if (arg === '--mode' || arg === '-m') {
1124
- flags.mode = subArgs[++i];
1125
- }
1126
- else if (arg === '--parallel') {
1127
- flags.parallel = true;
1128
- }
1129
- else if (arg === '--research') {
1130
- flags.research = true;
1131
- }
1132
- else if (arg === '--coverage') {
1133
- flags.coverage = parseInt(subArgs[++i]);
1134
- }
1135
- else if (arg === '--commit') {
1136
- flags.commit = subArgs[++i];
1137
- }
1138
- else if (arg === '--verbose' || arg === '-v') {
1139
- flags.verbose = true;
1140
- }
1141
- else if (arg === '--dry-run' || arg === '-d') {
1142
- flags.dryRun = true;
1143
- }
1144
- }
1145
- // Build tools list
1146
- let tools = flags.tools || 'View,Edit,Replace,GlobTool,GrepTool,LS,Bash';
1147
- if (flags.parallel) {
1148
- tools += ',BatchTool,dispatch_agent';
1149
- }
1150
- if (flags.research) {
1151
- tools += ',WebFetchTool';
1152
- }
1153
- const instanceId = `claude-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
1154
- if (flags.dryRun) {
1155
- printWarning('DRY RUN - Would execute:');
1156
- console.log(`Command: claude "<enhanced task with guidance>" --allowedTools ${tools}`);
1157
- console.log(`Instance ID: ${instanceId}`);
1158
- console.log(`Task: ${task}`);
1159
- console.log(`Tools: ${tools}`);
1160
- console.log(`Mode: ${flags.mode || 'full'}`);
1161
- console.log(`Coverage: ${flags.coverage || 80}%`);
1162
- console.log(`Commit: ${flags.commit || 'phase'}`);
1163
- console.log(`\nEnhanced Features:`);
1164
- console.log(` - Memory Bank enabled via: npx claude-flow memory commands`);
1165
- console.log(` - Coordination ${flags.parallel ? 'enabled' : 'disabled'}`);
1166
- console.log(` - Access Claude-Flow features through Bash tool`);
1167
- }
1168
- else {
1169
- printSuccess(`Spawning Claude instance: ${instanceId}`);
1170
- console.log(`📝 Original Task: ${task}`);
1171
- console.log(`🔧 Tools: ${tools}`);
1172
- console.log(`⚙️ Mode: ${flags.mode || 'full'}`);
1173
- console.log(`📊 Coverage: ${flags.coverage || 80}%`);
1174
- console.log(`💾 Commit: ${flags.commit || 'phase'}`);
1175
- console.log(`✨ Enhanced with Claude-Flow guidance for memory and coordination`);
1176
- console.log('');
1177
- console.log('📋 Task will be enhanced with:');
1178
- console.log(' - Memory Bank instructions (store/retrieve)');
1179
- console.log(' - Coordination capabilities (swarm management)');
1180
- console.log(' - Best practices for multi-agent workflows');
1181
- console.log('');
1182
- // Build the actual claude command with enhanced guidance
1183
- let enhancedTask = `# Task Assignment
1184
-
1185
- ## Your Primary Task
1186
- ${task}
1187
-
1188
- ## Development Environment
1189
-
1190
- You are working in a development environment with advanced orchestration capabilities available if needed.
1191
-
1192
- ### Project Context
1193
- - Working Directory: ${process.cwd()}
1194
- - Instance ID: ${instanceId}
1195
- - Development Mode: ${flags.mode || 'full'}
1196
- ${flags.coverage ? `- Test Coverage Target: ${flags.coverage}%` : ''}
1197
- ${flags.commit ? `- Git Commit Strategy: ${flags.commit}` : ''}
1198
- ${flags.config ? `- MCP Config: ${flags.config}` : ''}
1199
-
1200
- ### Available Tools
1201
- - You have access to these tools: ${tools}
1202
- ${flags.tools ? `- Custom tools specified: ${flags.tools}` : ''}
1203
-
1204
- ### Optional Orchestration Features
1205
-
1206
- If this task requires complex coordination, memory persistence, or multi-agent collaboration, you can use the claude-flow system:
1207
-
1208
- 1. **Persistent Memory** (if needed for your task)
1209
- - Store project data: \`npx claude-flow memory store <key> "<value>"\`
1210
- - Retrieve stored data: \`npx claude-flow memory query <key>\`
1211
- - Export/Import memory: \`npx claude-flow memory export/import <file>\`
1212
-
1213
- 2. **Task Coordination** (if working on complex multi-part tasks)
1214
- - Check task status: \`npx claude-flow status\`
1215
- - Monitor progress: \`npx claude-flow monitor\`
1216
- - List active tasks: \`npx claude-flow task list\`
1217
-
1218
- 3. **Multi-Agent Collaboration** (if task benefits from parallelization)
1219
- - Spawn specialized agents: \`npx claude-flow agent spawn <type> --name <name>\`
1220
- - Create subtasks: \`npx claude-flow task create <type> "<description>"\`
1221
- - Coordinate work: \`npx claude-flow task assign <task-id> <agent-id>\``;
1222
- if (flags.parallel) {
1223
- enhancedTask += `
1224
-
1225
- **Parallel Execution Enabled**: The orchestration system can help coordinate parallel work if needed.`;
1226
- }
1227
- if (flags.research) {
1228
- enhancedTask += `
1229
-
1230
- **Research Mode**: Web research tools are available for information gathering.`;
1231
- }
1232
- enhancedTask += `
1233
-
1234
- ### Task Execution Guidelines
1235
-
1236
- 1. **Focus on Your Primary Objective**:
1237
- - Understand the specific requirements of the task
1238
- - Plan your approach based on the project's needs
1239
- - Use appropriate tools and practices for the technology stack
1240
- ${flags.mode === 'backend-only' ? ' - Focus on backend implementation' : ''}
1241
- ${flags.mode === 'frontend-only' ? ' - Focus on frontend implementation' : ''}
1242
- ${flags.mode === 'api-only' ? ' - Focus on API design and implementation' : ''}
1243
-
1244
- 2. **Development Best Practices**:
1245
- - Write clean, maintainable code following project conventions
1246
- - Include appropriate tests and documentation
1247
- - Use version control effectively
1248
- ${flags.coverage ? ` - Ensure test coverage meets ${flags.coverage}% target` : ''}
1249
- ${flags.commit === 'phase' ? ' - Commit changes after completing major phases' : ''}
1250
- ${flags.commit === 'feature' ? ' - Commit changes after each feature is complete' : ''}
1251
- ${flags.commit === 'manual' ? ' - Only commit when explicitly requested' : ''}
1252
-
1253
- 3. **Leverage Orchestration When Beneficial**:
1254
- - For complex tasks requiring persistent state, use the memory bank
1255
- - For multi-part projects, use task coordination features
1256
- - For parallelizable work, consider multi-agent approaches
1257
- ${flags.parallel ? ' - Parallel capabilities are enabled for this task' : ''}
1258
- ${flags.research ? ' - Research tools are available if needed' : ''}
1259
- ${flags.noPermissions ? ' - Running with --no-permissions mode' : ''}
1260
- ${flags.verbose ? ' - Verbose mode enabled for detailed output' : ''}
1261
-
1262
- ## Getting Started
1263
-
1264
- Begin working on your task. The orchestration features are available as tools to help you be more effective, but your primary focus should be on delivering the requested functionality.
1265
-
1266
- ### Quick Reference (if using orchestration features)
1267
-
1268
- \`\`\`bash
1269
- # Example: Storing project-specific data
1270
- Bash("npx claude-flow memory store project_config '{\\"name\\": \\"my-app\\", \\"version\\": \\"1.0.0\\"}'")
1271
-
1272
- # Example: Checking for previous work
1273
- Bash("npx claude-flow memory query previous_implementation")
1274
-
1275
- # Example: Creating subtasks for complex projects
1276
- Bash("npx claude-flow task create frontend 'Build React components'")
1277
- Bash("npx claude-flow task create backend 'Implement API endpoints'")
1278
- \`\`\`
1279
-
1280
- Remember: These are optional tools. Use them when they add value to your development process.
1281
-
1282
- ## Development Mode: ${flags.mode || 'full'}
1283
- ${flags.mode === 'backend-only' ? `Focus on server-side implementation, APIs, and business logic.` : ''}
1284
- ${flags.mode === 'frontend-only' ? `Focus on client-side implementation, UI/UX, and user interactions.` : ''}
1285
- ${flags.mode === 'api-only' ? `Focus on API design, documentation, and endpoint implementation.` : ''}
1286
- ${flags.mode === 'full' || !flags.mode ? `Full-stack development covering all aspects of the application.` : ''}
1287
-
1288
- `;
1289
- const claudeArgs = [enhancedTask];
1290
- claudeArgs.push('--allowedTools', tools);
1291
- // DEBUG: Log what we're about to pass
1292
- console.log('\n🔍 DEBUG - Command Construction:');
1293
- console.log(`First arg length: ${claudeArgs[0].length} chars`);
1294
- console.log(`First 100 chars: ${claudeArgs[0].substring(0, 100)}...`);
1295
- console.log(`Args count: ${claudeArgs.length}`);
1296
- if (flags.noPermissions) {
1297
- claudeArgs.push('--dangerously-skip-permissions');
1298
- }
1299
- if (flags.config) {
1300
- claudeArgs.push('--mcp-config', flags.config);
1301
- }
1302
- if (flags.verbose) {
1303
- claudeArgs.push('--verbose');
1304
- }
1305
- // Execute the actual claude command
1306
- try {
1307
- // Debug: Log the actual command being executed
1308
- if (flags.verbose) {
1309
- console.log('Debug - Executing command:');
1310
- console.log(`claude ${claudeArgs.map((arg) => (arg.includes(' ') || arg.includes('\n') ? `"${arg}"` : arg)).join(' ')}`);
1311
- }
1312
- const command = new Deno.Command('claude', {
1313
- args: claudeArgs,
1314
- env: {
1315
- ...Deno.env.toObject(),
1316
- CLAUDE_INSTANCE_ID: instanceId,
1317
- CLAUDE_FLOW_MODE: flags.mode || 'full',
1318
- CLAUDE_FLOW_COVERAGE: (flags.coverage || 80).toString(),
1319
- CLAUDE_FLOW_COMMIT: flags.commit || 'phase',
1320
- // Add claude-flow specific features
1321
- CLAUDE_FLOW_MEMORY_ENABLED: 'true',
1322
- CLAUDE_FLOW_MEMORY_NAMESPACE: 'default',
1323
- CLAUDE_FLOW_COORDINATION_ENABLED: flags.parallel ? 'true' : 'false',
1324
- CLAUDE_FLOW_FEATURES: 'memory,coordination,swarm',
1325
- },
1326
- stdin: 'inherit',
1327
- stdout: 'inherit',
1328
- stderr: 'inherit',
1329
- });
1330
- const child = command.spawn();
1331
- const status = await child.status;
1332
- if (status.success) {
1333
- printSuccess(`Claude instance ${instanceId} completed successfully`);
1334
- }
1335
- else {
1336
- printError(`Claude instance ${instanceId} exited with code ${status.code}`);
1337
- }
1338
- }
1339
- catch (err) {
1340
- printError(`Failed to spawn Claude: ${err.message}`);
1341
- console.log('Make sure you have the Claude CLI installed.');
1342
- }
1343
- }
1344
- break;
1345
- case 'batch':
1346
- const workflowFile = subArgs[1];
1347
- if (!workflowFile) {
1348
- printError('Usage: claude batch <workflow-file>');
1349
- break;
1350
- }
1351
- printSuccess(`Loading workflow: ${workflowFile}`);
1352
- console.log('📋 Batch execution would process workflow file');
1353
- break;
1354
- default:
1355
- console.log('Claude commands: spawn, batch');
1356
- console.log('\nExamples:');
1357
- console.log(' claude-flow claude spawn "implement user authentication" --research --parallel');
1358
- console.log(' claude-flow claude spawn "fix bug in payment system" --no-permissions');
1359
- console.log(' claude-flow claude batch workflow.json --dry-run');
1360
- }
1361
- break;
1362
- case 'deploy':
1363
- const deployCmd = subArgs[0];
1364
- switch (deployCmd) {
1365
- case 'ha-cluster':
1366
- const nodes = subArgs.find((arg) => arg.includes('--nodes'));
1367
- const regions = subArgs.find((arg) => arg.includes('--regions'));
1368
- const replicationFactor = subArgs.find((arg) => arg.includes('--replication-factor'));
1369
- printSuccess('Deploying High Availability Cluster...');
1370
- console.log('🏗️ HA Configuration:');
1371
- console.log(` Nodes: ${nodes ? nodes.split('=')[1] : '3'}`);
1372
- console.log(` Regions: ${regions ? regions.split('=')[1] : 'us-east-1,us-west-2,eu-west-1'}`);
1373
- console.log(` Replication Factor: ${replicationFactor ? replicationFactor.split('=')[1] : '2'}`);
1374
- console.log(' Load Balancer: nginx');
1375
- console.log(' Health Checks: comprehensive');
1376
- console.log('\n🚀 Deployment Progress:');
1377
- console.log(' ✓ Provisioning nodes in us-east-1');
1378
- console.log(' ✓ Provisioning nodes in us-west-2');
1379
- console.log(' ✓ Provisioning nodes in eu-west-1');
1380
- console.log(' ✓ Configuring load balancer');
1381
- console.log(' ✓ Setting up health checks');
1382
- console.log(' ✓ Establishing replication');
1383
- console.log('\n✅ HA cluster deployed successfully!');
1384
- console.log(' Cluster endpoint: https://claude-flow-ha.example.com');
1385
- break;
1386
- case 'scaling':
1387
- const scalingAction = subArgs[1];
1388
- if (scalingAction === 'configure') {
1389
- printSuccess('Configuring Auto-Scaling...');
1390
- console.log('📈 Scaling Configuration:');
1391
- console.log(' Min Instances: 2');
1392
- console.log(' Max Instances: 50');
1393
- console.log(' Scale Up Threshold: CPU:70%, Memory:80%');
1394
- console.log(' Scale Down Threshold: CPU:30%, Memory:40%');
1395
- console.log(' Cool-down Periods: Up:300s, Down:600s');
1396
- console.log('\n✅ Auto-scaling configured');
1397
- }
1398
- else if (scalingAction === 'predictive') {
1399
- printSuccess('Enabling Predictive Scaling...');
1400
- console.log('🔮 Predictive Configuration:');
1401
- console.log(' Forecast Horizon: 1 hour');
1402
- console.log(' Learning Period: 7 days');
1403
- console.log(' Confidence Threshold: 0.8');
1404
- console.log(' ML Model: LSTM-based forecasting');
1405
- console.log('\n✅ Predictive scaling enabled');
1406
- }
1407
- else {
1408
- console.log('Scaling commands: configure, predictive, status');
1409
- }
1410
- break;
1411
- case 'security':
1412
- const securityAction = subArgs[1];
1413
- if (securityAction === 'harden') {
1414
- printSuccess('Applying Security Hardening...');
1415
- console.log('🔒 Security Configuration:');
1416
- console.log(' Profile: enterprise');
1417
- console.log(' Encryption: all-traffic, at-rest');
1418
- console.log(' Authentication: multi-factor');
1419
- console.log(' Authorization: RBAC');
1420
- console.log(' Audit Logging: comprehensive');
1421
- console.log(' Compliance: SOC2, GDPR, HIPAA');
1422
- console.log('\n🛡️ Applying security measures:');
1423
- console.log(' ✓ Enabling encryption at rest');
1424
- console.log(' ✓ Configuring TLS 1.3 minimum');
1425
- console.log(' ✓ Setting up MFA requirements');
1426
- console.log(' ✓ Implementing RBAC policies');
1427
- console.log(' ✓ Enabling audit logging');
1428
- console.log(' ✓ Applying compliance controls');
1429
- console.log('\n✅ Security hardening complete');
1430
- }
1431
- else if (securityAction === 'monitor') {
1432
- printSuccess('Security Monitoring Active');
1433
- console.log('🔍 Real-time Security Status:');
1434
- console.log(' Threat Level: Low');
1435
- console.log(' Active Sessions: 42');
1436
- console.log(' Failed Auth Attempts: 3 (last 24h)');
1437
- console.log(' Anomalies Detected: 0');
1438
- console.log(' Compliance Status: ✅ Compliant');
1439
- }
1440
- else {
1441
- console.log('Security commands: harden, policy, rbac, monitor');
1442
- }
1443
- break;
1444
- case 'kubernetes':
1445
- case 'k8s':
1446
- printSuccess('Deploying to Kubernetes...');
1447
- console.log('☸️ Kubernetes Deployment:');
1448
- console.log(' Namespace: claude-flow');
1449
- console.log(' Replicas: 3');
1450
- console.log(' Image: claude-flow/orchestrator:latest');
1451
- console.log(' Service Type: LoadBalancer');
1452
- console.log('\n📦 Creating resources:');
1453
- console.log(' ✓ Created namespace/claude-flow');
1454
- console.log(' ✓ Created deployment/claude-flow-orchestrator');
1455
- console.log(' ✓ Created service/claude-flow-orchestrator-service');
1456
- console.log(' ✓ Created configmap/claude-flow-config');
1457
- console.log(' ✓ Created secret/claude-flow-secrets');
1458
- console.log('\n✅ Kubernetes deployment complete');
1459
- console.log(' Service endpoint: http://a1b2c3d4.elb.amazonaws.com');
1460
- break;
1461
- default:
1462
- console.log('Deploy commands:');
1463
- console.log(' ha-cluster - Deploy high availability cluster');
1464
- console.log(' scaling - Configure auto-scaling');
1465
- console.log(' security - Security hardening and monitoring');
1466
- console.log(' kubernetes - Deploy to Kubernetes cluster');
1467
- console.log('\nExamples:');
1468
- console.log(' deploy ha-cluster --nodes=3 --regions="us-east-1,us-west-2"');
1469
- console.log(' deploy scaling configure --min=2 --max=50');
1470
- console.log(' deploy security harden --profile enterprise');
1471
- }
1472
- break;
1473
- case 'analytics':
1474
- const analyticsCmd = subArgs[0];
1475
- switch (analyticsCmd) {
1476
- case 'performance':
1477
- printSuccess('Performance Analytics Report');
1478
- console.log('\n📊 System Performance (Last 30 Days):');
1479
- console.log(' Agent Productivity:');
1480
- console.log(' • Tasks Completed: 12,847');
1481
- console.log(' • Average Task Time: 3.4 minutes');
1482
- console.log(' • Success Rate: 94.2%');
1483
- console.log(' Resource Efficiency:');
1484
- console.log(' • CPU Utilization: 67% average');
1485
- console.log(' • Memory Usage: 2.8GB average');
1486
- console.log(' • Cost per Task: $0.024');
1487
- console.log(' Trends:');
1488
- console.log(' • Performance: ↑ 12% improvement');
1489
- console.log(' • Efficiency: ↑ 8% improvement');
1490
- console.log(' • Costs: ↓ 15% reduction');
1491
- break;
1492
- case 'business-impact':
1493
- printSuccess('Business Impact Analysis');
1494
- console.log('\n💼 Business Metrics:');
1495
- console.log(' Productivity Gains:');
1496
- console.log(' • Development Velocity: +45%');
1497
- console.log(' • Time to Market: -30%');
1498
- console.log(' • Defect Rate: -62%');
1499
- console.log(' Cost Savings:');
1500
- console.log(' • Monthly Savings: $24,500');
1501
- console.log(' • ROI: 312%');
1502
- console.log(' • Payback Period: 3.2 months');
1503
- console.log(' Quality Improvements:');
1504
- console.log(' • Code Coverage: 92%');
1505
- console.log(' • Customer Satisfaction: +18%');
1506
- break;
1507
- case 'cost':
1508
- const costCmd = subArgs[1];
1509
- if (costCmd === 'analyze') {
1510
- printSuccess('Cost Analysis Report');
1511
- console.log('\n💰 Cost Breakdown:');
1512
- console.log(' By Project:');
1513
- console.log(' • microservices-platform: $8,234 (41%)');
1514
- console.log(' • ai-research: $5,123 (26%)');
1515
- console.log(' • frontend-apps: $3,456 (17%)');
1516
- console.log(' • other: $3,187 (16%)');
1517
- console.log(' By Resource:');
1518
- console.log(' • Compute: $12,450 (62%)');
1519
- console.log(' • Storage: $4,230 (21%)');
1520
- console.log(' • Network: $2,120 (11%)');
1521
- console.log(' • Other: $1,200 (6%)');
1522
- console.log(' Optimization Opportunities:');
1523
- console.log(' • Use spot instances: Save $3,200/month');
1524
- console.log(' • Optimize storage: Save $800/month');
1525
- console.log(' • Schedule off-peak: Save $1,500/month');
1526
- }
1527
- else {
1528
- console.log('Cost commands: analyze, optimize, budget');
1529
- }
1530
- break;
1531
- default:
1532
- console.log('Analytics commands:');
1533
- console.log(' performance - System performance analytics');
1534
- console.log(' business-impact - Business impact analysis');
1535
- console.log(' cost - Cost analysis and optimization');
1536
- console.log(' capacity - Capacity planning');
1537
- console.log('\nExamples:');
1538
- console.log(' analytics performance --time-range 30d');
1539
- console.log(' analytics cost analyze --granularity project');
1540
- }
1541
- break;
1542
- case 'security':
1543
- const securityCmd = subArgs[0];
1544
- switch (securityCmd) {
1545
- case 'status':
1546
- printSuccess('Enterprise Security Status');
1547
- console.log('\n🔐 Authentication:');
1548
- console.log(' Method: Token-based (JWT)');
1549
- console.log(' MFA: Enabled (TOTP, SMS, Hardware Keys)');
1550
- console.log(' Sessions: 42 active');
1551
- console.log(' Session Timeout: 4 hours');
1552
- console.log('\n🛡️ Authorization:');
1553
- console.log(' Model: Role-Based Access Control (RBAC)');
1554
- console.log(' Roles: 5 defined (admin, developer, operator, auditor, viewer)');
1555
- console.log(' Permissions: 47 granular permissions');
1556
- console.log(' Policy Engine: Active');
1557
- console.log('\n🚦 Rate Limiting:');
1558
- console.log(' Global Limit: 1000 req/min');
1559
- console.log(' Per-User Limit: 100 req/min');
1560
- console.log(' Burst Capacity: 200 requests');
1561
- console.log(' Current Usage: 245 req/min (24.5%)');
1562
- console.log('\n⚡ Circuit Breakers:');
1563
- console.log(' Total Breakers: 12');
1564
- console.log(' Status: 10 closed, 1 half-open, 1 open');
1565
- console.log(' Last Triggered: api-gateway (2 minutes ago)');
1566
- console.log('\n📝 Audit Logging:');
1567
- console.log(' Status: Active');
1568
- console.log(' Storage: Encrypted S3 bucket');
1569
- console.log(' Retention: 7 years');
1570
- console.log(' Events Today: 48,234');
1571
- console.log(' Compliance: SOC2, GDPR, HIPAA compliant');
1572
- break;
1573
- case 'auth':
1574
- const authAction = subArgs[1];
1575
- if (authAction === 'configure') {
1576
- printSuccess('Configuring Authentication...');
1577
- console.log('🔐 Authentication Configuration:');
1578
- console.log(' Method: JWT with RS256');
1579
- console.log(' Token Expiry: 4 hours');
1580
- console.log(' Refresh Token: 30 days');
1581
- console.log(' MFA Required: Yes');
1582
- console.log(' Password Policy:');
1583
- console.log(' • Minimum length: 12 characters');
1584
- console.log(' • Complexity: Upper, lower, numbers, symbols');
1585
- console.log(' • History: Last 12 passwords');
1586
- console.log(' • Expiry: 90 days');
1587
- console.log('\n✅ Authentication configured');
1588
- }
1589
- else if (authAction === 'sessions') {
1590
- printSuccess('Active Sessions:');
1591
- console.log('\n🔑 Current Sessions:');
1592
- console.log('┌─────────────────┬──────────┬──────────────┬─────────────┬───────────┐');
1593
- console.log('│ User │ Role │ IP Address │ Login Time │ MFA │');
1594
- console.log('├─────────────────┼──────────┼──────────────┼─────────────┼───────────┤');
1595
- console.log('│ alice@corp.com │ admin │ 10.0.1.45 │ 2h ago │ Hardware │');
1596
- console.log('│ bob@corp.com │ developer│ 10.0.2.123 │ 45m ago │ TOTP │');
1597
- console.log('│ charlie@corp.com│ operator │ 10.0.1.200 │ 1h ago │ SMS │');
1598
- console.log('└─────────────────┴──────────┴──────────────┴─────────────┴───────────┘');
1599
- }
1600
- else if (authAction === 'mfa') {
1601
- printSuccess('Multi-Factor Authentication Status:');
1602
- console.log(' Enforcement: Required for all users');
1603
- console.log(' Methods Available:');
1604
- console.log(' • TOTP (Time-based One-Time Password)');
1605
- console.log(' • SMS (Text message)');
1606
- console.log(' • Hardware Keys (FIDO2/WebAuthn)');
1607
- console.log(' • Backup Codes');
1608
- console.log(' Users with MFA: 98% (147/150)');
1609
- }
1610
- else {
1611
- console.log('Auth commands: configure, sessions, mfa, tokens');
1612
- }
1613
- break;
1614
- case 'rbac':
1615
- const rbacAction = subArgs[1];
1616
- if (rbacAction === 'roles') {
1617
- printSuccess('RBAC Roles:');
1618
- console.log('\n👥 Defined Roles:');
1619
- console.log('\n📛 admin (3 users)');
1620
- console.log(' Permissions: * (all permissions)');
1621
- console.log(' Conditions: MFA required, IP restriction');
1622
- console.log('\n📛 developer (45 users)');
1623
- console.log(' Permissions:');
1624
- console.log(' • projects:read,write');
1625
- console.log(' • agents:spawn,monitor');
1626
- console.log(' • tasks:create,monitor');
1627
- console.log(' Conditions: Time window 06:00-22:00');
1628
- console.log('\n📛 operator (12 users)');
1629
- console.log(' Permissions:');
1630
- console.log(' • system:monitor');
1631
- console.log(' • agents:list,info');
1632
- console.log(' • tasks:list,status');
1633
- console.log('\n📛 auditor (5 users)');
1634
- console.log(' Permissions:');
1635
- console.log(' • audit:read');
1636
- console.log(' • system:logs');
1637
- console.log(' • reports:generate');
1638
- console.log('\n📛 viewer (85 users)');
1639
- console.log(' Permissions:');
1640
- console.log(' • *:read (read-only access)');
1641
- }
1642
- else if (rbacAction === 'assign') {
1643
- const user = subArgs[2];
1644
- const role = subArgs[3];
1645
- if (user && role) {
1646
- printSuccess(`Assigning role ${role} to user ${user}`);
1647
- console.log('✅ Role assignment complete');
1648
- console.log(' Effective immediately');
1649
- console.log(' Audit log entry created');
1650
- }
1651
- else {
1652
- printError('Usage: security rbac assign <user> <role>');
1653
- }
1654
- }
1655
- else {
1656
- console.log('RBAC commands: roles, permissions, assign, revoke');
1657
- }
1658
- break;
1659
- case 'rate-limit':
1660
- const rateLimitAction = subArgs[1];
1661
- if (rateLimitAction === 'status') {
1662
- printSuccess('Rate Limiting Status:');
1663
- console.log('\n📊 Current Limits:');
1664
- console.log(' Global:');
1665
- console.log(' • Limit: 1000 requests/minute');
1666
- console.log(' • Current: 245 requests/minute (24.5%)');
1667
- console.log(' • Available: 755 requests');
1668
- console.log(' Per-User:');
1669
- console.log(' • Default: 100 requests/minute');
1670
- console.log(' • Premium: 500 requests/minute');
1671
- console.log(' Per-Endpoint:');
1672
- console.log(' • /api/agents/spawn: 10/minute');
1673
- console.log(' • /api/tasks/create: 50/minute');
1674
- console.log(' • /api/memory/query: 200/minute');
1675
- console.log('\n🚨 Recent Violations:');
1676
- console.log(' • user123: 2 violations (15 min ago)');
1677
- console.log(' • api-client-7: 1 violation (1 hour ago)');
1678
- }
1679
- else if (rateLimitAction === 'configure') {
1680
- printSuccess('Configuring Rate Limits...');
1681
- console.log(' Global limit: 1000 req/min');
1682
- console.log(' Burst capacity: 200 requests');
1683
- console.log(' Cooldown period: 60 seconds');
1684
- console.log(' Headers: X-RateLimit-* enabled');
1685
- console.log('\n✅ Rate limiting configured');
1686
- }
1687
- else {
1688
- console.log('Rate limit commands: status, configure, reset');
1689
- }
1690
- break;
1691
- case 'circuit-breaker':
1692
- const cbAction = subArgs[1];
1693
- if (cbAction === 'status') {
1694
- printSuccess('Circuit Breaker Status:');
1695
- console.log('\n⚡ Active Circuit Breakers:');
1696
- console.log('┌──────────────────┬─────────┬──────────┬───────────┬─────────────┐');
1697
- console.log('│ Service │ State │ Failures │ Successes │ Last Change │');
1698
- console.log('├──────────────────┼─────────┼──────────┼───────────┼─────────────┤');
1699
- console.log('│ api-gateway │ OPEN │ 15 │ 0 │ 2m ago │');
1700
- console.log('│ auth-service │ CLOSED │ 0 │ 1,234 │ 1h ago │');
1701
- console.log('│ memory-service │ CLOSED │ 1 │ 5,678 │ 3h ago │');
1702
- console.log('│ agent-manager │ HALF │ 3 │ 45 │ 5m ago │');
1703
- console.log('└──────────────────┴─────────┴──────────┴───────────┴─────────────┘');
1704
- console.log('\n📈 Configuration:');
1705
- console.log(' Failure Threshold: 10 failures');
1706
- console.log(' Success Threshold: 5 successes');
1707
- console.log(' Timeout: 60 seconds');
1708
- console.log(' Half-Open Requests: 3 max');
1709
- }
1710
- else if (cbAction === 'reset') {
1711
- const service = subArgs[2];
1712
- if (service) {
1713
- printSuccess(`Resetting circuit breaker: ${service}`);
1714
- console.log('✅ Circuit breaker reset to CLOSED state');
1715
- }
1716
- else {
1717
- console.log('All circuit breakers reset');
1718
- }
1719
- }
1720
- else {
1721
- console.log('Circuit breaker commands: status, reset, configure');
1722
- }
1723
- break;
1724
- case 'audit':
1725
- const auditAction = subArgs[1];
1726
- if (auditAction === 'status') {
1727
- printSuccess('Audit Logging Status:');
1728
- console.log(' Status: Active');
1729
- console.log(' Storage Backend: AWS S3 (encrypted)');
1730
- console.log(' Retention Period: 7 years');
1731
- console.log(' Compliance: SOC2, GDPR, HIPAA');
1732
- console.log('\n📊 Statistics (Last 24h):');
1733
- console.log(' Total Events: 48,234');
1734
- console.log(' Authentication: 1,234');
1735
- console.log(' Authorization: 15,678');
1736
- console.log(' Data Access: 23,456');
1737
- console.log(' Configuration Changes: 89');
1738
- console.log(' Security Events: 12');
1739
- }
1740
- else if (auditAction === 'search') {
1741
- const query = subArgs.slice(2).join(' ');
1742
- printSuccess(`Searching audit logs: "${query || 'recent'}"`);
1743
- console.log('\n📋 Recent Audit Events:');
1744
- console.log('2024-01-10 14:23:45 | AUTH_SUCCESS | alice@corp.com | Login from 10.0.1.45');
1745
- console.log('2024-01-10 14:24:12 | PERMISSION_GRANTED | alice@corp.com | agents.spawn');
1746
- console.log('2024-01-10 14:24:13 | AGENT_CREATED | alice@corp.com | agent-12345');
1747
- console.log('2024-01-10 14:25:01 | CONFIG_CHANGED | bob@corp.com | terminal.poolSize: 10->20');
1748
- console.log('2024-01-10 14:26:30 | PERMISSION_DENIED | charlie@corp.com | admin.users.delete');
1749
- }
1750
- else if (auditAction === 'export') {
1751
- printSuccess('Exporting audit logs...');
1752
- console.log(' Time range: Last 30 days');
1753
- console.log(' Format: JSON (encrypted)');
1754
- console.log(' Destination: audit-export-20240110.json.enc');
1755
- console.log('\n✅ Export complete: 145,234 events');
1756
- }
1757
- else {
1758
- console.log('Audit commands: status, search, export, configure');
1759
- }
1760
- break;
1761
- case 'compliance':
1762
- printSuccess('Compliance Status:');
1763
- console.log('\n🏛️ Active Compliance Frameworks:');
1764
- console.log('\n✅ SOC2 Type II');
1765
- console.log(' Last Audit: 2023-10-15');
1766
- console.log(' Next Audit: 2024-04-15');
1767
- console.log(' Status: Compliant');
1768
- console.log(' Controls: 89/89 passing');
1769
- console.log('\n✅ GDPR (General Data Protection Regulation)');
1770
- console.log(' Data Protection Officer: Jane Smith');
1771
- console.log(' Privacy Impact Assessments: 12 completed');
1772
- console.log(' Data Subject Requests: 3 pending, 45 completed');
1773
- console.log(' Status: Compliant');
1774
- console.log('\n✅ HIPAA (Health Insurance Portability Act)');
1775
- console.log(' BAA Agreements: 5 active');
1776
- console.log(' PHI Encryption: AES-256 at rest, TLS 1.3 in transit');
1777
- console.log(' Access Controls: Implemented');
1778
- console.log(' Status: Compliant');
1779
- console.log('\n📋 Required Actions:');
1780
- console.log(' • Complete Q1 security training (Due: Jan 31)');
1781
- console.log(' • Update data retention policies (Due: Feb 15)');
1782
- break;
1783
- case 'test':
1784
- printSuccess('Running Security Test Suite...');
1785
- console.log('\n🧪 Security Tests:');
1786
- console.log(' ✅ Authentication: Token validation working');
1787
- console.log(' ✅ Authorization: RBAC policies enforced');
1788
- console.log(' ✅ Rate Limiting: Limits properly enforced');
1789
- console.log(' ✅ Circuit Breakers: Failing services isolated');
1790
- console.log(' ✅ Audit Logging: All events captured');
1791
- console.log(' ✅ Encryption: TLS 1.3 verified');
1792
- console.log(' ✅ Session Management: Timeouts working');
1793
- console.log(' ⚠️ MFA Bypass: 3 users without MFA');
1794
- console.log('\n📊 Security Score: 94/100');
1795
- console.log(' Recommendations:');
1796
- console.log(' • Enforce MFA for all users');
1797
- console.log(' • Update TLS certificates (expire in 45 days)');
1798
- console.log(' • Review inactive user accounts');
1799
- break;
1800
- default:
1801
- console.log('Security commands:');
1802
- console.log(' status - Show security status overview');
1803
- console.log(' auth - Authentication management');
1804
- console.log(' rbac - Role-based access control');
1805
- console.log(' rate-limit - Rate limiting configuration');
1806
- console.log(' circuit-breaker - Circuit breaker management');
1807
- console.log(' audit - Audit log management');
1808
- console.log(' compliance - Compliance status');
1809
- console.log(' test - Run security tests');
1810
- console.log('\nExamples:');
1811
- console.log(' security auth configure');
1812
- console.log(' security rbac assign user@example.com developer');
1813
- console.log(' security audit search "failed login"');
1814
- console.log(' security circuit-breaker reset api-gateway');
1815
- }
1816
- break;
1817
- case 'backup':
1818
- const backupCmd = subArgs[0];
1819
- switch (backupCmd) {
1820
- case 'configure':
1821
- printSuccess('Configuring Backup Strategy...');
1822
- console.log('🗄️ Backup Configuration:');
1823
- console.log(' Strategy: 3-2-1 (3 copies, 2 media, 1 offsite)');
1824
- console.log(' Locations:');
1825
- console.log(' • Primary: AWS S3 (us-east-1)');
1826
- console.log(' • Secondary: Azure Blob (eastus)');
1827
- console.log(' • Tertiary: Local NAS');
1828
- console.log(' Schedule:');
1829
- console.log(' • Full: Weekly (Sunday 2 AM)');
1830
- console.log(' • Incremental: Every 6 hours');
1831
- console.log(' • Differential: Daily (2 AM)');
1832
- console.log(' Encryption: AES-256');
1833
- console.log(' Compression: LZ4');
1834
- console.log(' Verification: Automatic');
1835
- console.log('\n✅ Backup strategy configured');
1836
- break;
1837
- case 'dr':
1838
- const drAction = subArgs[1];
1839
- if (drAction === 'configure') {
1840
- printSuccess('Configuring Disaster Recovery...');
1841
- console.log('🚨 DR Configuration:');
1842
- console.log(' RPO (Recovery Point Objective): 1 hour');
1843
- console.log(' RTO (Recovery Time Objective): 15 minutes');
1844
- console.log(' Replication: Real-time to secondary region');
1845
- console.log(' Failover: Automatic with manual override');
1846
- console.log(' Testing: Monthly DR drills');
1847
- console.log('\n✅ Disaster recovery configured');
1848
- }
1849
- else if (drAction === 'test') {
1850
- printSuccess('Running DR Test...');
1851
- console.log('🧪 DR Test Progress:');
1852
- console.log(' ✓ Initiating failover simulation');
1853
- console.log(' ✓ Switching to DR site');
1854
- console.log(' ✓ Verifying data integrity');
1855
- console.log(' ✓ Testing application functionality');
1856
- console.log(' ✓ Measuring RTO: 12 minutes');
1857
- console.log(' ✓ Failing back to primary');
1858
- console.log('\n✅ DR test completed successfully');
1859
- }
1860
- else {
1861
- console.log('DR commands: configure, test, status');
1862
- }
1863
- break;
1864
- case 'restore':
1865
- const restorePoint = subArgs[1];
1866
- if (!restorePoint) {
1867
- printError('Usage: backup restore <backup-id|timestamp>');
1868
- break;
1869
- }
1870
- printSuccess(`Restoring from backup: ${restorePoint}`);
1871
- console.log('🔄 Restore Progress:');
1872
- console.log(' ✓ Located backup in S3');
1873
- console.log(' ✓ Verifying backup integrity');
1874
- console.log(' ✓ Downloading backup data');
1875
- console.log(' ✓ Decrypting backup');
1876
- console.log(' ✓ Restoring application data');
1877
- console.log(' ✓ Restoring configuration');
1878
- console.log(' ✓ Verifying restored data');
1879
- console.log('\n✅ Restore completed successfully');
1880
- break;
1881
- default:
1882
- console.log('Backup commands:');
1883
- console.log(' configure - Configure backup strategy');
1884
- console.log(' dr - Disaster recovery management');
1885
- console.log(' restore - Restore from backup');
1886
- console.log(' list - List available backups');
1887
- console.log('\nExamples:');
1888
- console.log(' backup configure --strategy 3-2-1');
1889
- console.log(' backup dr test');
1890
- console.log(' backup restore "backup-20240110-023000"');
1891
- }
1892
- break;
1893
- default:
1894
- printError(`Unknown command: ${command}`);
1895
- console.log('Run "claude-flow help" for available commands');
1896
- // Suggest similar commands
1897
- const commonCommands = [
1898
- 'agent',
1899
- 'task',
1900
- 'spawn',
1901
- 'init',
1902
- 'start',
1903
- 'status',
1904
- 'memory',
1905
- 'sparc',
1906
- 'help',
1907
- ];
1908
- const suggestions = commonCommands.filter((cmd) => cmd.startsWith(command.toLowerCase()) || cmd.includes(command.toLowerCase()));
1909
- if (suggestions.length > 0) {
1910
- console.log('\nDid you mean:');
1911
- suggestions.forEach((cmd) => console.log(` claude-flow ${cmd}`));
1912
- }
1913
- process.exit(1);
1914
- }
1915
- }
1916
- // REPL Implementation
1917
- async function startRepl() {
1918
- console.log('🧠 Claude-Flow Interactive Shell v' + VERSION);
1919
- console.log('Type "help" for available commands, "exit" to quit\n');
1920
- const replState = {
1921
- history: [],
1922
- historyIndex: -1,
1923
- currentSession: null,
1924
- context: {
1925
- agents: [],
1926
- tasks: [],
1927
- terminals: [],
1928
- memory: {},
1929
- },
1930
- };
1931
- // REPL command handlers
1932
- const replCommands = {
1933
- help: () => {
1934
- console.log(`
1935
- 📚 Available REPL Commands:
1936
-
1937
- System:
1938
- status - Show system status
1939
- config [key] - Show configuration (or specific key)
1940
- clear - Clear the screen
1941
- history - Show command history
1942
- exit/quit - Exit REPL mode
1943
-
1944
- Agents:
1945
- agent spawn <type> [name] - Spawn new agent
1946
- agent list - List active agents
1947
- agent info <id> - Show agent details
1948
- agent terminate <id> - Terminate agent
1949
-
1950
- Tasks:
1951
- task create <type> <desc> - Create new task
1952
- task list - List active tasks
1953
- task assign <task> <agent> - Assign task to agent
1954
- task status <id> - Show task status
1955
-
1956
- Memory:
1957
- memory store <key> <value> - Store data in memory
1958
- memory get <key> - Retrieve data from memory
1959
- memory list - List all memory keys
1960
- memory clear - Clear all memory
1961
-
1962
- Terminal:
1963
- terminal create [name] - Create terminal session
1964
- terminal list - List terminals
1965
- terminal exec <cmd> - Execute command
1966
- terminal attach <id> - Attach to terminal
1967
-
1968
- Shortcuts:
1969
- !<command> - Execute shell command
1970
- /<search> - Search command history
1971
- ↑/↓ - Navigate command history
1972
- `);
1973
- },
1974
- status: () => {
1975
- console.log('🟢 Claude-Flow Status:');
1976
- console.log(` Agents: ${replState.context.agents.length} active`);
1977
- console.log(` Tasks: ${replState.context.tasks.length} in queue`);
1978
- console.log(` Terminals: ${replState.context.terminals.length} active`);
1979
- console.log(` Memory Keys: ${Object.keys(replState.context.memory).length}`);
1980
- },
1981
- clear: () => {
1982
- console.clear();
1983
- console.log('🧠 Claude-Flow Interactive Shell v' + VERSION);
1984
- },
1985
- history: () => {
1986
- console.log('📜 Command History:');
1987
- replState.history.forEach((cmd, i) => {
1988
- console.log(` ${i + 1}: ${cmd}`);
1989
- });
1990
- },
1991
- config: async (key) => {
1992
- try {
1993
- const config = JSON.parse(await fs.readFile('claude-flow.config.json', 'utf-8'));
1994
- if (key) {
1995
- const keys = key.split('.');
1996
- let value = config;
1997
- for (const k of keys) {
1998
- value = value[k];
1999
- }
2000
- console.log(`${key}: ${JSON.stringify(value, null, 2)}`);
2001
- }
2002
- else {
2003
- console.log(JSON.stringify(config, null, 2));
2004
- }
2005
- }
2006
- catch {
2007
- console.log('No configuration file found. Using defaults.');
2008
- }
2009
- },
2010
- };
2011
- // Process REPL commands
2012
- async function processReplCommand(input) {
2013
- const trimmed = input.trim();
2014
- if (!trimmed)
2015
- return true;
2016
- // Add to history
2017
- replState.history.push(trimmed);
2018
- replState.historyIndex = replState.history.length;
2019
- // Handle special commands
2020
- if (trimmed === 'exit' || trimmed === 'quit') {
2021
- console.log('👋 Exiting Claude-Flow REPL...');
2022
- return false;
2023
- }
2024
- // Handle shell commands
2025
- if (trimmed.startsWith('!')) {
2026
- const shellCmd = trimmed.substring(1);
2027
- try {
2028
- const command = new Deno.Command('sh', {
2029
- args: ['-c', shellCmd],
2030
- stdout: 'piped',
2031
- stderr: 'piped',
2032
- });
2033
- const { stdout, stderr } = await command.output();
2034
- if (stdout.length > 0) {
2035
- console.log(new TextDecoder().decode(stdout));
2036
- }
2037
- if (stderr.length > 0) {
2038
- console.error(new TextDecoder().decode(stderr));
2039
- }
2040
- }
2041
- catch (err) {
2042
- console.error(`Shell error: ${err.message}`);
2043
- }
2044
- return true;
2045
- }
2046
- // Handle search
2047
- if (trimmed.startsWith('/')) {
2048
- const search = trimmed.substring(1);
2049
- const matches = replState.history.filter((cmd) => cmd.includes(search));
2050
- if (matches.length > 0) {
2051
- console.log('🔍 Search results:');
2052
- matches.forEach((cmd) => console.log(` ${cmd}`));
2053
- }
2054
- else {
2055
- console.log('No matches found');
2056
- }
2057
- return true;
2058
- }
2059
- // Parse command and arguments
2060
- const parts = trimmed.split(' ');
2061
- const command = parts[0];
2062
- const args = parts.slice(1);
2063
- // Handle built-in REPL commands
2064
- if (command in replCommands) {
2065
- await replCommands[command](...args);
2066
- return true;
2067
- }
2068
- // Handle multi-word commands
2069
- if (command === 'agent') {
2070
- await handleAgentCommand(args, replState);
2071
- }
2072
- else if (command === 'task') {
2073
- await handleTaskCommand(args, replState);
2074
- }
2075
- else if (command === 'memory') {
2076
- await handleMemoryCommand(args, replState);
2077
- }
2078
- else if (command === 'terminal') {
2079
- await handleTerminalCommand(args, replState);
2080
- }
2081
- else {
2082
- console.log(`Unknown command: ${command}. Type "help" for available commands.`);
2083
- }
2084
- return true;
2085
- }
2086
- // Agent command handler
2087
- async function handleAgentCommand(args, state) {
2088
- const subCmd = args[0];
2089
- switch (subCmd) {
2090
- case 'spawn':
2091
- const type = args[1] || 'researcher';
2092
- const name = args[2] || `agent-${Date.now()}`;
2093
- const agent = {
2094
- id: `agent-${Date.now()}`,
2095
- type,
2096
- name,
2097
- status: 'active',
2098
- created: new Date().toISOString(),
2099
- };
2100
- state.context.agents.push(agent);
2101
- printSuccess(`Spawned ${type} agent: ${name} (${agent.id})`);
2102
- break;
2103
- case 'list':
2104
- if (state.context.agents.length === 0) {
2105
- console.log('No active agents');
2106
- }
2107
- else {
2108
- console.log('Active agents:');
2109
- state.context.agents.forEach((agent) => {
2110
- console.log(` ${agent.id} - ${agent.name} (${agent.type}) - ${agent.status}`);
2111
- });
2112
- }
2113
- break;
2114
- case 'info':
2115
- const agentId = args[1];
2116
- const foundAgent = state.context.agents.find((a) => a.id === agentId || a.name === agentId);
2117
- if (foundAgent) {
2118
- console.log(`Agent: ${foundAgent.name}`);
2119
- console.log(` ID: ${foundAgent.id}`);
2120
- console.log(` Type: ${foundAgent.type}`);
2121
- console.log(` Status: ${foundAgent.status}`);
2122
- console.log(` Created: ${foundAgent.created}`);
2123
- }
2124
- else {
2125
- printError(`Agent not found: ${agentId}`);
2126
- }
2127
- break;
2128
- case 'terminate':
2129
- const termId = args[1];
2130
- const index = state.context.agents.findIndex((a) => a.id === termId || a.name === termId);
2131
- if (index >= 0) {
2132
- const removed = state.context.agents.splice(index, 1)[0];
2133
- printSuccess(`Terminated agent: ${removed.name}`);
2134
- }
2135
- else {
2136
- printError(`Agent not found: ${termId}`);
2137
- }
2138
- break;
2139
- default:
2140
- console.log('Agent commands: spawn, list, info, terminate');
2141
- }
2142
- }
2143
- // Task command handler
2144
- async function handleTaskCommand(args, state) {
2145
- const subCmd = args[0];
2146
- switch (subCmd) {
2147
- case 'create':
2148
- const type = args[1] || 'general';
2149
- const description = args.slice(2).join(' ') || 'No description';
2150
- const task = {
2151
- id: `task-${Date.now()}`,
2152
- type,
2153
- description,
2154
- status: 'pending',
2155
- created: new Date().toISOString(),
2156
- };
2157
- state.context.tasks.push(task);
2158
- printSuccess(`Created task: ${task.id}`);
2159
- console.log(` Type: ${type}`);
2160
- console.log(` Description: ${description}`);
2161
- break;
2162
- case 'list':
2163
- if (state.context.tasks.length === 0) {
2164
- console.log('No active tasks');
2165
- }
2166
- else {
2167
- console.log('Active tasks:');
2168
- state.context.tasks.forEach((task) => {
2169
- console.log(` ${task.id} - ${task.type} - ${task.status}`);
2170
- console.log(` ${task.description}`);
2171
- });
2172
- }
2173
- break;
2174
- case 'assign':
2175
- const taskId = args[1];
2176
- const assignAgentId = args[2];
2177
- const foundTask = state.context.tasks.find((t) => t.id === taskId);
2178
- const assignAgent = state.context.agents.find((a) => a.id === assignAgentId || a.name === assignAgentId);
2179
- if (foundTask && assignAgent) {
2180
- foundTask.assignedTo = assignAgent.id;
2181
- foundTask.status = 'assigned';
2182
- printSuccess(`Assigned task ${taskId} to agent ${assignAgent.name}`);
2183
- }
2184
- else {
2185
- printError('Task or agent not found');
2186
- }
2187
- break;
2188
- case 'status':
2189
- const statusId = args[1];
2190
- const statusTask = state.context.tasks.find((t) => t.id === statusId);
2191
- if (statusTask) {
2192
- console.log(`Task: ${statusTask.id}`);
2193
- console.log(` Type: ${statusTask.type}`);
2194
- console.log(` Status: ${statusTask.status}`);
2195
- console.log(` Description: ${statusTask.description}`);
2196
- if (statusTask.assignedTo) {
2197
- console.log(` Assigned to: ${statusTask.assignedTo}`);
2198
- }
2199
- console.log(` Created: ${statusTask.created}`);
2200
- }
2201
- else {
2202
- printError(`Task not found: ${statusId}`);
2203
- }
2204
- break;
2205
- default:
2206
- console.log('Task commands: create, list, assign, status');
2207
- }
2208
- }
2209
- // Memory command handler
2210
- async function handleMemoryCommand(args, state) {
2211
- const subCmd = args[0];
2212
- switch (subCmd) {
2213
- case 'store':
2214
- const key = args[1];
2215
- const value = args.slice(2).join(' ');
2216
- if (key && value) {
2217
- state.context.memory[key] = value;
2218
- printSuccess(`Stored: ${key} = ${value}`);
2219
- }
2220
- else {
2221
- printError('Usage: memory store <key> <value>');
2222
- }
2223
- break;
2224
- case 'get':
2225
- const getKey = args[1];
2226
- if (getKey && state.context.memory[getKey]) {
2227
- console.log(`${getKey}: ${state.context.memory[getKey]}`);
2228
- }
2229
- else {
2230
- console.log(`Key not found: ${getKey}`);
2231
- }
2232
- break;
2233
- case 'list':
2234
- const keys = Object.keys(state.context.memory);
2235
- if (keys.length === 0) {
2236
- console.log('No data in memory');
2237
- }
2238
- else {
2239
- console.log('Memory keys:');
2240
- keys.forEach((key) => {
2241
- console.log(` ${key}: ${state.context.memory[key]}`);
2242
- });
2243
- }
2244
- break;
2245
- case 'clear':
2246
- state.context.memory = {};
2247
- printSuccess('Memory cleared');
2248
- break;
2249
- default:
2250
- console.log('Memory commands: store, get, list, clear');
2251
- }
2252
- }
2253
- // Terminal command handler
2254
- async function handleTerminalCommand(args, state) {
2255
- const subCmd = args[0];
2256
- switch (subCmd) {
2257
- case 'create':
2258
- const name = args[1] || `term-${Date.now()}`;
2259
- const terminal = {
2260
- id: name,
2261
- status: 'active',
2262
- created: new Date().toISOString(),
2263
- };
2264
- state.context.terminals.push(terminal);
2265
- printSuccess(`Created terminal: ${name}`);
2266
- break;
2267
- case 'list':
2268
- if (state.context.terminals.length === 0) {
2269
- console.log('No active terminals');
2270
- }
2271
- else {
2272
- console.log('Active terminals:');
2273
- state.context.terminals.forEach((term) => {
2274
- console.log(` ${term.id} - ${term.status}`);
2275
- });
2276
- }
2277
- break;
2278
- case 'exec':
2279
- const cmd = args.slice(1).join(' ');
2280
- if (cmd) {
2281
- console.log(`Executing: ${cmd}`);
2282
- console.log('(Command execution simulated in REPL)');
2283
- }
2284
- else {
2285
- printError('Usage: terminal exec <command>');
2286
- }
2287
- break;
2288
- case 'attach':
2289
- const attachId = args[1];
2290
- if (attachId) {
2291
- state.currentSession = attachId;
2292
- console.log(`Attached to terminal: ${attachId}`);
2293
- console.log('(Type "terminal detach" to detach)');
2294
- }
2295
- else {
2296
- printError('Usage: terminal attach <id>');
2297
- }
2298
- break;
2299
- case 'detach':
2300
- if (state.currentSession) {
2301
- console.log(`Detached from terminal: ${state.currentSession}`);
2302
- state.currentSession = null;
2303
- }
2304
- else {
2305
- console.log('Not attached to any terminal');
2306
- }
2307
- break;
2308
- default:
2309
- console.log('Terminal commands: create, list, exec, attach, detach');
2310
- }
2311
- }
2312
- // Main REPL loop
2313
- const decoder = new TextDecoder();
2314
- const encoder = new TextEncoder();
2315
- while (true) {
2316
- // Show prompt
2317
- const prompt = replState.currentSession
2318
- ? `claude-flow:${replState.currentSession}> `
2319
- : 'claude-flow> ';
2320
- await Deno.stdout.write(encoder.encode(prompt));
2321
- // Read input
2322
- const buf = new Uint8Array(1024);
2323
- const n = await Deno.stdin.read(buf);
2324
- if (n === null)
2325
- break;
2326
- const input = decoder.decode(buf.subarray(0, n)).trim();
2327
- // Process command
2328
- const shouldContinue = await processReplCommand(input);
2329
- if (!shouldContinue)
2330
- break;
2331
- }
2332
- }
2333
- // Helper functions for init command
2334
- function createMinimalClaudeMd() {
2335
- return `# Claude Code Integration
2336
-
2337
- This file provides guidance to Claude when working with this codebase.
2338
-
2339
- ## Project Overview
2340
- [Describe your project here]
2341
-
2342
- ## Key Conventions
2343
- - Code style guidelines
2344
- - Naming conventions
2345
- - Architecture patterns
2346
-
2347
- ## Important Notes
2348
- - Special considerations
2349
- - Areas to be careful with
2350
- `;
2351
- }
2352
- function createFullClaudeMd() {
2353
- return `# Claude Code Integration Guide
2354
-
2355
- This document provides comprehensive guidance to Claude when working with this codebase.
2356
-
2357
- ## Project Overview
2358
- [Provide a detailed description of your project, its purpose, and main features]
2359
-
2360
- ## Architecture
2361
- [Describe the overall architecture, main components, and how they interact]
2362
-
2363
- ## Code Conventions
2364
- - **Naming**: [Describe naming conventions for files, functions, variables, etc.]
2365
- - **Style**: [Code formatting preferences, linting rules]
2366
- - **Patterns**: [Design patterns used in the project]
2367
- - **Testing**: [Testing approach and requirements]
2368
-
2369
- ## Directory Structure
2370
- \`\`\`
2371
- project/
2372
- ├── src/ # Source code
2373
- ├── tests/ # Test files
2374
- ├── docs/ # Documentation
2375
- └── ... # Other directories
2376
- \`\`\`
2377
-
2378
- ## Development Workflow
2379
- 1. [Step-by-step development process]
2380
- 2. [How to run tests]
2381
- 3. [How to build/deploy]
2382
-
2383
- ## Important Considerations
2384
- - [Security considerations]
2385
- - [Performance requirements]
2386
- - [Compatibility requirements]
2387
-
2388
- ## Common Tasks
2389
- - **Add a new feature**: [Instructions]
2390
- - **Fix a bug**: [Process]
2391
- - **Update documentation**: [Guidelines]
2392
-
2393
- ## Dependencies
2394
- [List key dependencies and their purposes]
2395
-
2396
- ## Troubleshooting
2397
- [Common issues and solutions]
2398
- `;
2399
- }
2400
- function createMinimalMemoryBankMd() {
2401
- return `# Memory Bank
2402
-
2403
- Session memory and context storage.
2404
-
2405
- ## Current Session
2406
- - Started: ${new Date().toISOString()}
2407
- - Context: [Current work context]
2408
-
2409
- ## Key Information
2410
- - [Important facts to remember]
2411
-
2412
- ## Progress Log
2413
- - [Track progress here]
2414
- `;
2415
- }
2416
- function createFullMemoryBankMd() {
2417
- return `# Memory Bank
2418
-
2419
- This file serves as persistent memory storage for Claude across sessions.
2420
-
2421
- ## Session Information
2422
- - **Current Session**: Started ${new Date().toISOString()}
2423
- - **Project Phase**: [Development/Testing/Production]
2424
- - **Active Tasks**: [List current tasks]
2425
-
2426
- ## Project Context
2427
- ### Technical Stack
2428
- - Languages: [List languages used]
2429
- - Frameworks: [List frameworks]
2430
- - Tools: [Development tools]
2431
-
2432
- ### Architecture Decisions
2433
- - [Record key architectural decisions]
2434
- - [Rationale for technology choices]
2435
-
2436
- ## Important Information
2437
- ### API Keys and Secrets
2438
- - [Never store actual secrets here, just references]
2439
-
2440
- ### External Services
2441
- - [List integrated services]
2442
- - [Configuration requirements]
2443
-
2444
- ### Database Schema
2445
- - [Current schema version]
2446
- - [Recent migrations]
2447
-
2448
- ## Progress Tracking
2449
- ### Completed Tasks
2450
- - [x] [Completed task 1]
2451
- - [x] [Completed task 2]
2452
-
2453
- ### In Progress
2454
- - [ ] [Current task 1]
2455
- - [ ] [Current task 2]
2456
-
2457
- ### Upcoming
2458
- - [ ] [Future task 1]
2459
- - [ ] [Future task 2]
2460
-
2461
- ## Code Patterns
2462
- ### Established Patterns
2463
- \`\`\`javascript
2464
- // Example pattern
2465
- \`\`\`
2466
-
2467
- ### Anti-patterns to Avoid
2468
- - [List anti-patterns]
2469
-
2470
- ## Meeting Notes
2471
- ### [Date]
2472
- - Participants: [Names]
2473
- - Decisions: [Key decisions]
2474
- - Action items: [Tasks assigned]
2475
-
2476
- ## Debugging History
2477
- ### Issue: [Issue name]
2478
- - **Date**: [Date]
2479
- - **Symptoms**: [What was observed]
2480
- - **Root Cause**: [What caused it]
2481
- - **Solution**: [How it was fixed]
2482
-
2483
- ## Performance Metrics
2484
- - [Baseline metrics]
2485
- - [Optimization goals]
2486
-
2487
- ## Documentation Links
2488
- - [API Documentation]: [URL]
2489
- - [Design Documents]: [URL]
2490
- - [Issue Tracker]: [URL]
2491
- `;
2492
- }
2493
- function createMinimalCoordinationMd() {
2494
- return `# Coordination
2495
-
2496
- Task and workflow coordination.
2497
-
2498
- ## Active Tasks
2499
- 1. [Current task]
2500
-
2501
- ## Workflow
2502
- - [ ] Step 1
2503
- - [ ] Step 2
2504
-
2505
- ## Resources
2506
- - [Available resources]
2507
- `;
2508
- }
2509
- function createFullCoordinationMd() {
2510
- return `# Coordination Center
2511
-
2512
- Central coordination for multi-agent collaboration and task management.
2513
-
2514
- ## Active Agents
2515
- | Agent ID | Type | Status | Assigned Tasks | Last Active |
2516
- |----------|------|--------|----------------|-------------|
2517
- | [ID] | [Type] | [Status] | [Tasks] | [Timestamp] |
2518
-
2519
- ## Task Queue
2520
- ### High Priority
2521
- 1. **[Task Name]**
2522
- - Description: [What needs to be done]
2523
- - Assigned to: [Agent ID]
2524
- - Dependencies: [Other tasks]
2525
- - Deadline: [Date/Time]
2526
-
2527
- ### Medium Priority
2528
- 1. [Task details]
2529
-
2530
- ### Low Priority
2531
- 1. [Task details]
2532
-
2533
- ## Workflow Definitions
2534
- ### [Workflow Name]
2535
- \`\`\`yaml
2536
- name: [Workflow Name]
2537
- description: [What this workflow does]
2538
- steps:
2539
- - name: [Step 1]
2540
- agent: [Agent type]
2541
- action: [What to do]
2542
- - name: [Step 2]
2543
- agent: [Agent type]
2544
- action: [What to do]
2545
- depends_on: [Step 1]
2546
- \`\`\`
2547
-
2548
- ## Resource Allocation
2549
- ### Computational Resources
2550
- - CPU: [Usage/Limits]
2551
- - Memory: [Usage/Limits]
2552
- - Storage: [Usage/Limits]
2553
-
2554
- ### External Resources
2555
- - API Rate Limits: [Service: limit]
2556
- - Database Connections: [Current/Max]
2557
-
2558
- ## Communication Channels
2559
- ### Inter-Agent Messages
2560
- - [Agent A → Agent B]: [Message type]
2561
-
2562
- ### External Communications
2563
- - Webhooks: [Configured webhooks]
2564
- - Notifications: [Notification settings]
2565
-
2566
- ## Synchronization Points
2567
- - [Sync Point 1]: [Description]
2568
- - [Sync Point 2]: [Description]
2569
-
2570
- ## Conflict Resolution
2571
- ### Strategy
2572
- - [How conflicts are resolved]
2573
-
2574
- ### Recent Conflicts
2575
- - [Date]: [Conflict description] → [Resolution]
2576
-
2577
- ## Performance Metrics
2578
- ### Task Completion
2579
- - Average time: [Time]
2580
- - Success rate: [Percentage]
2581
-
2582
- ### Agent Efficiency
2583
- - [Agent Type]: [Metrics]
2584
-
2585
- ## Scheduled Maintenance
2586
- - [Date/Time]: [What will be done]
2587
-
2588
- ## Emergency Procedures
2589
- ### System Overload
2590
- 1. [Step 1]
2591
- 2. [Step 2]
2592
-
2593
- ### Agent Failure
2594
- 1. [Recovery procedure]
2595
- `;
2596
- }
2597
- function createAgentsReadme() {
2598
- return `# Agents Directory
2599
-
2600
- This directory stores agent-specific memory and state information.
2601
-
2602
- ## Structure
2603
- Each agent gets its own subdirectory named by agent ID:
2604
- - \`agent-001/\`: First agent's memory
2605
- - \`agent-002/\`: Second agent's memory
2606
- - etc.
2607
-
2608
- ## Files per Agent
2609
- - \`profile.json\`: Agent configuration and capabilities
2610
- - \`memory.md\`: Agent's working memory
2611
- - \`tasks.json\`: Assigned tasks and their status
2612
- - \`metrics.json\`: Performance metrics
2613
-
2614
- ## Usage
2615
- Files in this directory are automatically managed by the Claude-Flow system.
2616
- `;
2617
- }
2618
- function createSessionsReadme() {
2619
- return `# Sessions Directory
2620
-
2621
- This directory stores session-specific information and terminal states.
2622
-
2623
- ## Structure
2624
- Each session gets a unique directory:
2625
- - \`session-[timestamp]/\`: Session data
2626
- - \`metadata.json\`: Session metadata
2627
- - \`terminal.log\`: Terminal output
2628
- - \`commands.history\`: Command history
2629
- - \`state.json\`: Session state snapshot
2630
-
2631
- ## Retention Policy
2632
- Sessions are retained for 30 days by default, then archived or deleted based on configuration.
2633
-
2634
- ## Usage
2635
- The Claude-Flow system automatically manages session files. Do not modify these files manually.
2636
- `;
2637
- }
2638
- // Helper function to create SPARC structure manually
2639
- async function createSparcStructureManually() {
2640
- try {
2641
- // Create .roo directory structure
2642
- const rooDirectories = [
2643
- '.roo',
2644
- '.roo/templates',
2645
- '.roo/workflows',
2646
- '.roo/modes',
2647
- '.roo/configs',
2648
- ];
2649
- for (const dir of rooDirectories) {
2650
- try {
2651
- await Deno.mkdir(dir, { recursive: true });
2652
- console.log(` ✓ Created ${dir}/`);
2653
- }
2654
- catch (err) {
2655
- if (!(err instanceof Deno.errors.AlreadyExists)) {
2656
- throw err;
2657
- }
2658
- }
2659
- }
2660
- // Create .roomodes file (copy from existing if available, or create basic version)
2661
- let roomodesContent;
2662
- try {
2663
- // Check if .roomodes already exists and read it
2664
- roomodesContent = await fs.readFile('.roomodes');
2665
- console.log(' ✓ Using existing .roomodes configuration');
2666
- }
2667
- catch {
2668
- // Create basic .roomodes configuration
2669
- roomodesContent = createBasicRoomodesConfig();
2670
- await fs.writeFile('.roomodes', roomodesContent);
2671
- console.log(' ✓ Created .roomodes configuration');
2672
- }
2673
- // Create basic workflow templates
2674
- const basicWorkflow = createBasicSparcWorkflow();
2675
- await fs.writeFile('.roo/workflows/basic-tdd.json', basicWorkflow);
2676
- console.log(' ✓ Created .roo/workflows/basic-tdd.json');
2677
- // Create README for .roo directory
2678
- const rooReadme = createRooReadme();
2679
- await fs.writeFile('.roo/README.md', rooReadme);
2680
- console.log(' ✓ Created .roo/README.md');
2681
- console.log(' ✅ Basic SPARC structure created successfully');
2682
- }
2683
- catch (err) {
2684
- console.log(` ❌ Failed to create SPARC structure: ${err.message}`);
2685
- }
2686
- }
2687
- function createBasicRoomodesConfig() {
2688
- return JSON.stringify({
2689
- customModes: [
2690
- {
2691
- slug: 'architect',
2692
- name: '🏗️ Architect',
2693
- roleDefinition: 'You design scalable, secure, and modular architectures based on functional specs and user needs. You define responsibilities across services, APIs, and components.',
2694
- customInstructions: 'Create architecture mermaid diagrams, data flows, and integration points. Ensure no part of the design includes secrets or hardcoded env values. Emphasize modular boundaries and maintain extensibility.',
2695
- groups: ['read', 'edit'],
2696
- source: 'project',
2697
- },
2698
- {
2699
- slug: 'code',
2700
- name: '🧠 Auto-Coder',
2701
- roleDefinition: 'You write clean, efficient, modular code based on pseudocode and architecture. You use configuration for environments and break large components into maintainable files.',
2702
- customInstructions: 'Write modular code using clean architecture principles. Never hardcode secrets or environment values. Split code into files < 500 lines. Use config files or environment abstractions. Use \\`new_task\\` for subtasks and finish with \\`attempt_completion\\`.',
2703
- groups: ['read', 'edit', 'browser', 'mcp', 'command'],
2704
- source: 'project',
2705
- },
2706
- {
2707
- slug: 'tdd',
2708
- name: '🧪 Tester (TDD)',
2709
- roleDefinition: 'You implement Test-Driven Development (TDD, London School), writing tests first and refactoring after minimal implementation passes.',
2710
- customInstructions: 'Write failing tests first. Implement only enough code to pass. Refactor after green. Ensure tests do not hardcode secrets. Keep files < 500 lines.',
2711
- groups: ['read', 'edit', 'browser', 'mcp', 'command'],
2712
- source: 'project',
2713
- },
2714
- {
2715
- slug: 'spec-pseudocode',
2716
- name: '📋 Specification Writer',
2717
- roleDefinition: 'You capture full project context—functional requirements, edge cases, constraints—and translate that into modular pseudocode with TDD anchors.',
2718
- customInstructions: 'Write pseudocode as a series of md files with phase_number_name.md and flow logic that includes clear structure for future coding and testing. Split complex logic across modules.',
2719
- groups: ['read', 'edit'],
2720
- source: 'project',
2721
- },
2722
- {
2723
- slug: 'integration',
2724
- name: '🔗 System Integrator',
2725
- roleDefinition: 'You merge the outputs of all modes into a working, tested, production-ready system. You ensure consistency, cohesion, and modularity.',
2726
- customInstructions: 'Verify interface compatibility, shared modules, and env config standards. Split integration logic across domains as needed. Use \\`new_task\\` for preflight testing.',
2727
- groups: ['read', 'edit', 'browser', 'mcp', 'command'],
2728
- source: 'project',
2729
- },
2730
- {
2731
- slug: 'debug',
2732
- name: '🪲 Debugger',
2733
- roleDefinition: 'You troubleshoot runtime bugs, logic errors, or integration failures by tracing, inspecting, and analyzing behavior.',
2734
- customInstructions: 'Use logs, traces, and stack analysis to isolate bugs. Avoid changing env configuration directly. Keep fixes modular.',
2735
- groups: ['read', 'edit', 'browser', 'mcp', 'command'],
2736
- source: 'project',
2737
- },
2738
- ],
2739
- }, null, 2);
2740
- }
2741
- function createBasicSparcWorkflow() {
2742
- return JSON.stringify({
2743
- name: 'Basic TDD Workflow',
2744
- description: 'A simple SPARC-based TDD workflow for development',
2745
- sequential: true,
2746
- steps: [
2747
- {
2748
- mode: 'spec-pseudocode',
2749
- description: 'Create detailed specifications and pseudocode',
2750
- phase: 'specification',
2751
- },
2752
- {
2753
- mode: 'tdd',
2754
- description: 'Write failing tests (Red phase)',
2755
- phase: 'red',
2756
- },
2757
- {
2758
- mode: 'code',
2759
- description: 'Implement minimal code to pass tests (Green phase)',
2760
- phase: 'green',
2761
- },
2762
- {
2763
- mode: 'tdd',
2764
- description: 'Refactor and optimize (Refactor phase)',
2765
- phase: 'refactor',
2766
- },
2767
- {
2768
- mode: 'integration',
2769
- description: 'Integrate and verify complete solution',
2770
- phase: 'integration',
2771
- },
2772
- ],
2773
- }, null, 2);
2774
- }
2775
- function createRooReadme() {
2776
- return `# .roo Directory - SPARC Development Environment
2777
-
2778
- This directory contains the SPARC (Specification, Pseudocode, Architecture, Refinement, Completion) development environment configuration and templates.
2779
-
2780
- ## Directory Structure
2781
-
2782
- \`\`\`
2783
- .roo/
2784
- ├── README.md # This file
2785
- ├── templates/ # Template files for common patterns
2786
- ├── workflows/ # Predefined SPARC workflows
2787
- │ └── basic-tdd.json # Basic TDD workflow
2788
- ├── modes/ # Custom mode definitions (optional)
2789
- └── configs/ # Configuration files
2790
- \`\`\`
2791
-
2792
- ## SPARC Methodology
2793
-
2794
- SPARC is a systematic approach to software development:
2795
-
2796
- 1. **Specification**: Define clear requirements and constraints
2797
- 2. **Pseudocode**: Create detailed logic flows and algorithms
2798
- 3. **Architecture**: Design system structure and components
2799
- 4. **Refinement**: Implement, test, and optimize using TDD
2800
- 5. **Completion**: Integrate, document, and validate
2801
-
2802
- ## Usage with Claude-Flow
2803
-
2804
- Use the claude-flow SPARC commands to leverage this environment:
2805
-
2806
- \`\`\`bash
2807
- # List available modes
2808
- claude-flow sparc modes
2809
-
2810
- # Run specific mode
2811
- claude-flow sparc run code "implement user authentication"
2812
-
2813
- # Execute full TDD workflow
2814
- claude-flow sparc tdd "payment processing system"
2815
-
2816
- # Use custom workflow
2817
- claude-flow sparc workflow .roo/workflows/basic-tdd.json
2818
- \`\`\`
2819
-
2820
- ## Configuration
2821
-
2822
- The main configuration is in \`.roomodes\` at the project root. This directory provides additional templates and workflows to support the SPARC development process.
2823
-
2824
- ## Customization
2825
-
2826
- You can customize this environment by:
2827
- - Adding new workflow templates to \`workflows/\`
2828
- - Creating mode-specific templates in \`templates/\`
2829
- - Adding project-specific configurations in \`configs/\`
2830
-
2831
- For more information, see: https://github.com/ruvnet/claude-code-flow/docs/sparc.md
2832
- `;
2833
- }
2834
- function createSparcClaudeMd() {
2835
- return `# Claude Code Configuration - SPARC Development Environment
2836
-
2837
- ## Project Overview
2838
- This project uses the SPARC (Specification, Pseudocode, Architecture, Refinement, Completion) methodology for systematic Test-Driven Development with AI assistance through Claude-Flow orchestration.
2839
-
2840
- ## SPARC Development Commands
2841
-
2842
- ### Core SPARC Commands
2843
- - \`npx claude-flow sparc modes\`: List all available SPARC development modes
2844
- - \`npx claude-flow sparc run <mode> "<task>"\`: Execute specific SPARC mode for a task
2845
- - \`npx claude-flow sparc tdd "<feature>"\`: Run complete TDD workflow using SPARC methodology
2846
- - \`npx claude-flow sparc info <mode>\`: Get detailed information about a specific mode
2847
-
2848
- ### Standard Build Commands
2849
- - \`npm run build\`: Build the project
2850
- - \`npm run test\`: Run the test suite
2851
- - \`npm run lint\`: Run linter and format checks
2852
- - \`npm run typecheck\`: Run TypeScript type checking
2853
-
2854
- ## SPARC Methodology Workflow
2855
-
2856
- ### 1. Specification Phase
2857
- \`\`\`bash
2858
- # Create detailed specifications and requirements
2859
- npx claude-flow sparc run spec-pseudocode "Define user authentication requirements"
2860
- \`\`\`
2861
- - Define clear functional requirements
2862
- - Document edge cases and constraints
2863
- - Create user stories and acceptance criteria
2864
- - Establish non-functional requirements
2865
-
2866
- ### 2. Pseudocode Phase
2867
- \`\`\`bash
2868
- # Develop algorithmic logic and data flows
2869
- npx claude-flow sparc run spec-pseudocode "Create authentication flow pseudocode"
2870
- \`\`\`
2871
- - Break down complex logic into steps
2872
- - Define data structures and interfaces
2873
- - Plan error handling and edge cases
2874
- - Create modular, testable components
2875
-
2876
- ### 3. Architecture Phase
2877
- \`\`\`bash
2878
- # Design system architecture and component structure
2879
- npx claude-flow sparc run architect "Design authentication service architecture"
2880
- \`\`\`
2881
- - Create system diagrams and component relationships
2882
- - Define API contracts and interfaces
2883
- - Plan database schemas and data flows
2884
- - Establish security and scalability patterns
2885
-
2886
- ### 4. Refinement Phase (TDD Implementation)
2887
- \`\`\`bash
2888
- # Execute Test-Driven Development cycle
2889
- npx claude-flow sparc tdd "implement user authentication system"
2890
- \`\`\`
2891
-
2892
- **TDD Cycle:**
2893
- 1. **Red**: Write failing tests first
2894
- 2. **Green**: Implement minimal code to pass tests
2895
- 3. **Refactor**: Optimize and clean up code
2896
- 4. **Repeat**: Continue until feature is complete
2897
-
2898
- ### 5. Completion Phase
2899
- \`\`\`bash
2900
- # Integration, documentation, and validation
2901
- npx claude-flow sparc run integration "integrate authentication with user management"
2902
- \`\`\`
2903
- - Integrate all components
2904
- - Perform end-to-end testing
2905
- - Create comprehensive documentation
2906
- - Validate against original requirements
2907
-
2908
- ## SPARC Mode Reference
2909
-
2910
- ### Development Modes
2911
- - **\`architect\`**: System design and architecture planning
2912
- - **\`code\`**: Clean, modular code implementation
2913
- - **\`tdd\`**: Test-driven development and testing
2914
- - **\`spec-pseudocode\`**: Requirements and algorithmic planning
2915
- - **\`integration\`**: System integration and coordination
2916
-
2917
- ### Quality Assurance Modes
2918
- - **\`debug\`**: Troubleshooting and bug resolution
2919
- - **\`security-review\`**: Security analysis and vulnerability assessment
2920
- - **\`refinement-optimization-mode\`**: Performance optimization and refactoring
2921
-
2922
- ### Support Modes
2923
- - **\`docs-writer\`**: Documentation creation and maintenance
2924
- - **\`devops\`**: Deployment and infrastructure management
2925
- - **\`mcp\`**: External service integration
2926
-
2927
- ## Code Style and Best Practices
2928
-
2929
- ### SPARC Development Principles
2930
- - **Modular Design**: Keep files under 500 lines, break into logical components
2931
- - **Environment Safety**: Never hardcode secrets or environment-specific values
2932
- - **Test-First**: Always write tests before implementation (Red-Green-Refactor)
2933
- - **Clean Architecture**: Separate concerns, use dependency injection
2934
- - **Documentation**: Maintain clear, up-to-date documentation
2935
-
2936
- ### Coding Standards
2937
- - Use TypeScript for type safety and better tooling
2938
- - Follow consistent naming conventions (camelCase for variables, PascalCase for classes)
2939
- - Implement proper error handling and logging
2940
- - Use async/await for asynchronous operations
2941
- - Prefer composition over inheritance
2942
-
2943
- ### Memory and State Management
2944
- - Use claude-flow memory system for persistent state across sessions
2945
- - Store progress and findings using namespaced keys
2946
- - Query previous work before starting new tasks
2947
- - Export/import memory for backup and sharing
2948
-
2949
- ## SPARC Memory Integration
2950
-
2951
- ### Memory Commands for SPARC Development
2952
- \`\`\`bash
2953
- # Store project specifications
2954
- npx claude-flow memory store spec_auth "User authentication requirements and constraints"
2955
-
2956
- # Store architectural decisions
2957
- npx claude-flow memory store arch_decisions "Database schema and API design choices"
2958
-
2959
- # Store test results and coverage
2960
- npx claude-flow memory store test_coverage "Authentication module: 95% coverage, all tests passing"
2961
-
2962
- # Query previous work
2963
- npx claude-flow memory query auth_implementation
2964
-
2965
- # Export project memory
2966
- npx claude-flow memory export project_backup.json
2967
- \`\`\`
2968
-
2969
- ### Memory Namespaces
2970
- - **\`spec\`**: Requirements and specifications
2971
- - **\`arch\`**: Architecture and design decisions
2972
- - **\`impl\`**: Implementation notes and code patterns
2973
- - **\`test\`**: Test results and coverage reports
2974
- - **\`debug\`**: Bug reports and resolution notes
2975
-
2976
- ## Workflow Examples
2977
-
2978
- ### Feature Development Workflow
2979
- \`\`\`bash
2980
- # 1. Start with specification
2981
- npx claude-flow sparc run spec-pseudocode "User profile management feature"
2982
-
2983
- # 2. Design architecture
2984
- npx claude-flow sparc run architect "Profile service architecture with data validation"
2985
-
2986
- # 3. Implement with TDD
2987
- npx claude-flow sparc tdd "user profile CRUD operations"
2988
-
2989
- # 4. Security review
2990
- npx claude-flow sparc run security-review "profile data access and validation"
2991
-
2992
- # 5. Integration testing
2993
- npx claude-flow sparc run integration "profile service with authentication system"
2994
-
2995
- # 6. Documentation
2996
- npx claude-flow sparc run docs-writer "profile service API documentation"
2997
- \`\`\`
2998
-
2999
- ### Bug Fix Workflow
3000
- \`\`\`bash
3001
- # 1. Debug and analyze
3002
- npx claude-flow sparc run debug "authentication token expiration issue"
3003
-
3004
- # 2. Write regression tests
3005
- npx claude-flow sparc run tdd "token refresh mechanism tests"
3006
-
3007
- # 3. Implement fix
3008
- npx claude-flow sparc run code "fix token refresh in authentication service"
3009
-
3010
- # 4. Security review
3011
- npx claude-flow sparc run security-review "token handling security implications"
3012
- \`\`\`
3013
-
3014
- ## Configuration Files
3015
-
3016
- ### SPARC Configuration
3017
- - **\`.roomodes\`**: SPARC mode definitions and configurations
3018
- - **\`.roo/\`**: Templates, workflows, and mode-specific rules
3019
-
3020
- ### Claude-Flow Configuration
3021
- - **\`memory/\`**: Persistent memory and session data
3022
- - **\`coordination/\`**: Multi-agent coordination settings
3023
-
3024
- ## Git Workflow Integration
3025
-
3026
- ### Commit Strategy with SPARC
3027
- - **Specification commits**: After completing requirements analysis
3028
- - **Architecture commits**: After design phase completion
3029
- - **TDD commits**: After each Red-Green-Refactor cycle
3030
- - **Integration commits**: After successful component integration
3031
- - **Documentation commits**: After completing documentation updates
3032
-
3033
- ### Branch Strategy
3034
- - **\`feature/sparc-<feature-name>\`**: Feature development with SPARC methodology
3035
- - **\`hotfix/sparc-<issue>\`**: Bug fixes using SPARC debugging workflow
3036
- - **\`refactor/sparc-<component>\`**: Refactoring using optimization mode
3037
-
3038
- ## Troubleshooting
3039
-
3040
- ### Common SPARC Issues
3041
- - **Mode not found**: Check \`.roomodes\` file exists and is valid JSON
3042
- - **Memory persistence**: Ensure \`memory/\` directory has write permissions
3043
- - **Tool access**: Verify required tools are available for the selected mode
3044
- - **Namespace conflicts**: Use unique memory namespaces for different features
3045
-
3046
- ### Debug Commands
3047
- \`\`\`bash
3048
- # Check SPARC configuration
3049
- npx claude-flow sparc modes
3050
-
3051
- # Verify memory system
3052
- npx claude-flow memory stats
3053
-
3054
- # Check system status
3055
- npx claude-flow status
3056
-
3057
- # View detailed mode information
3058
- npx claude-flow sparc info <mode-name>
3059
- \`\`\`
3060
-
3061
- ## Project Architecture
3062
-
3063
- This SPARC-enabled project follows a systematic development approach:
3064
- - **Clear separation of concerns** through modular design
3065
- - **Test-driven development** ensuring reliability and maintainability
3066
- - **Iterative refinement** for continuous improvement
3067
- - **Comprehensive documentation** for team collaboration
3068
- - **AI-assisted development** through specialized SPARC modes
3069
-
3070
- ## Important Notes
3071
-
3072
- - Always run tests before committing (\`npm run test\`)
3073
- - Use SPARC memory system to maintain context across sessions
3074
- - Follow the Red-Green-Refactor cycle during TDD phases
3075
- - Document architectural decisions in memory for future reference
3076
- - Regular security reviews for any authentication or data handling code
3077
-
3078
- For more information about SPARC methodology, see: https://github.com/ruvnet/claude-code-flow/docs/sparc.md
3079
- `;
3080
- }
3081
- // Run main if executed directly
3082
- if (import.meta.url === `file://${process.argv[1]}`) {
3083
- await main();
3084
- }
3085
- //# sourceMappingURL=simple-cli.js.map