claude-flow 2.7.0 → 2.7.1

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 (1071) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/bin/claude-flow +1 -1
  3. package/dist/src/cli/simple-cli.js +104 -0
  4. package/dist/src/cli/simple-cli.js.map +1 -1
  5. package/dist/src/cli/simple-commands/config.js +115 -257
  6. package/dist/src/cli/simple-commands/config.js.map +1 -1
  7. package/dist/src/cli/validation-helper.js.map +1 -1
  8. package/dist/src/mcp/mcp-server.js +261 -3
  9. package/dist/src/mcp/mcp-server.js.map +1 -1
  10. package/dist/src/utils/key-redactor.js.map +1 -1
  11. package/dist/src/utils/metrics-reader.js +41 -29
  12. package/dist/src/utils/metrics-reader.js.map +1 -1
  13. package/docs/PATTERN_PERSISTENCE_FIX.md +328 -0
  14. package/docs/RELEASE_v2.7.1.md +244 -0
  15. package/docs/skills-tutorial.md +2 -2
  16. package/package.json +1 -1
  17. package/src/mcp/mcp-server.js +302 -2
  18. package/dist/agents/agent-loader.d.ts +0 -103
  19. package/dist/agents/agent-loader.d.ts.map +0 -1
  20. package/dist/agents/agent-loader.js +0 -220
  21. package/dist/agents/agent-loader.js.map +0 -1
  22. package/dist/agents/agent-manager.d.ts +0 -191
  23. package/dist/agents/agent-manager.d.ts.map +0 -1
  24. package/dist/agents/agent-manager.js +0 -1405
  25. package/dist/agents/agent-manager.js.map +0 -1
  26. package/dist/api/claude-api-errors.d.ts +0 -115
  27. package/dist/api/claude-api-errors.d.ts.map +0 -1
  28. package/dist/api/claude-api-errors.js +0 -198
  29. package/dist/api/claude-api-errors.js.map +0 -1
  30. package/dist/api/claude-client.d.ts +0 -197
  31. package/dist/api/claude-client.d.ts.map +0 -1
  32. package/dist/api/claude-client.js +0 -525
  33. package/dist/api/claude-client.js.map +0 -1
  34. package/dist/cli/cli-core.d.ts +0 -52
  35. package/dist/cli/cli-core.d.ts.map +0 -1
  36. package/dist/cli/cli-core.js +0 -264
  37. package/dist/cli/cli-core.js.map +0 -1
  38. package/dist/cli/command-registry.d.ts +0 -10
  39. package/dist/cli/command-registry.d.ts.map +0 -1
  40. package/dist/cli/command-registry.js +0 -1126
  41. package/dist/cli/command-registry.js.map +0 -1
  42. package/dist/cli/commander-fix.d.ts +0 -4
  43. package/dist/cli/commander-fix.d.ts.map +0 -1
  44. package/dist/cli/commander-fix.js +0 -6
  45. package/dist/cli/commander-fix.js.map +0 -1
  46. package/dist/cli/commands/agent.d.ts +0 -6
  47. package/dist/cli/commands/agent.d.ts.map +0 -1
  48. package/dist/cli/commands/agent.js +0 -382
  49. package/dist/cli/commands/agent.js.map +0 -1
  50. package/dist/cli/commands/config.d.ts +0 -4
  51. package/dist/cli/commands/config.d.ts.map +0 -1
  52. package/dist/cli/commands/config.js +0 -88
  53. package/dist/cli/commands/config.js.map +0 -1
  54. package/dist/cli/commands/enterprise.d.ts +0 -3
  55. package/dist/cli/commands/enterprise.d.ts.map +0 -1
  56. package/dist/cli/commands/enterprise.js +0 -1506
  57. package/dist/cli/commands/enterprise.js.map +0 -1
  58. package/dist/cli/commands/help.d.ts +0 -6
  59. package/dist/cli/commands/help.d.ts.map +0 -1
  60. package/dist/cli/commands/help.js +0 -936
  61. package/dist/cli/commands/help.js.map +0 -1
  62. package/dist/cli/commands/hive-mind/index.d.ts +0 -18
  63. package/dist/cli/commands/hive-mind/index.d.ts.map +0 -1
  64. package/dist/cli/commands/hive-mind/index.js +0 -30
  65. package/dist/cli/commands/hive-mind/index.js.map +0 -1
  66. package/dist/cli/commands/hive-mind/init.d.ts +0 -9
  67. package/dist/cli/commands/hive-mind/init.d.ts.map +0 -1
  68. package/dist/cli/commands/hive-mind/init.js +0 -68
  69. package/dist/cli/commands/hive-mind/init.js.map +0 -1
  70. package/dist/cli/commands/hive-mind/pause.d.ts +0 -8
  71. package/dist/cli/commands/hive-mind/pause.d.ts.map +0 -1
  72. package/dist/cli/commands/hive-mind/pause.js +0 -81
  73. package/dist/cli/commands/hive-mind/pause.js.map +0 -1
  74. package/dist/cli/commands/hive-mind/ps.d.ts +0 -8
  75. package/dist/cli/commands/hive-mind/ps.d.ts.map +0 -1
  76. package/dist/cli/commands/hive-mind/ps.js +0 -120
  77. package/dist/cli/commands/hive-mind/ps.js.map +0 -1
  78. package/dist/cli/commands/hive-mind/resume.d.ts +0 -8
  79. package/dist/cli/commands/hive-mind/resume.d.ts.map +0 -1
  80. package/dist/cli/commands/hive-mind/resume.js +0 -62
  81. package/dist/cli/commands/hive-mind/resume.js.map +0 -1
  82. package/dist/cli/commands/hive-mind/spawn.d.ts +0 -9
  83. package/dist/cli/commands/hive-mind/spawn.d.ts.map +0 -1
  84. package/dist/cli/commands/hive-mind/spawn.js +0 -174
  85. package/dist/cli/commands/hive-mind/spawn.js.map +0 -1
  86. package/dist/cli/commands/hive-mind/status.d.ts +0 -9
  87. package/dist/cli/commands/hive-mind/status.d.ts.map +0 -1
  88. package/dist/cli/commands/hive-mind/status.js +0 -204
  89. package/dist/cli/commands/hive-mind/status.js.map +0 -1
  90. package/dist/cli/commands/hive-mind/stop.d.ts +0 -8
  91. package/dist/cli/commands/hive-mind/stop.d.ts.map +0 -1
  92. package/dist/cli/commands/hive-mind/stop.js +0 -125
  93. package/dist/cli/commands/hive-mind/stop.js.map +0 -1
  94. package/dist/cli/commands/hive-mind/task.d.ts +0 -9
  95. package/dist/cli/commands/hive-mind/task.d.ts.map +0 -1
  96. package/dist/cli/commands/hive-mind/task.js +0 -294
  97. package/dist/cli/commands/hive-mind/task.js.map +0 -1
  98. package/dist/cli/commands/hive-mind/wizard.d.ts +0 -9
  99. package/dist/cli/commands/hive-mind/wizard.d.ts.map +0 -1
  100. package/dist/cli/commands/hive-mind/wizard.js +0 -531
  101. package/dist/cli/commands/hive-mind/wizard.js.map +0 -1
  102. package/dist/cli/commands/hive.d.ts +0 -6
  103. package/dist/cli/commands/hive.d.ts.map +0 -1
  104. package/dist/cli/commands/hive.js +0 -409
  105. package/dist/cli/commands/hive.js.map +0 -1
  106. package/dist/cli/commands/index.d.ts +0 -3
  107. package/dist/cli/commands/index.d.ts.map +0 -1
  108. package/dist/cli/commands/index.js +0 -2624
  109. package/dist/cli/commands/index.js.map +0 -1
  110. package/dist/cli/commands/mcp.d.ts +0 -5
  111. package/dist/cli/commands/mcp.d.ts.map +0 -1
  112. package/dist/cli/commands/mcp.js +0 -169
  113. package/dist/cli/commands/mcp.js.map +0 -1
  114. package/dist/cli/commands/memory.d.ts +0 -26
  115. package/dist/cli/commands/memory.d.ts.map +0 -1
  116. package/dist/cli/commands/memory.js +0 -225
  117. package/dist/cli/commands/memory.js.map +0 -1
  118. package/dist/cli/commands/migrate.d.ts +0 -5
  119. package/dist/cli/commands/migrate.d.ts.map +0 -1
  120. package/dist/cli/commands/migrate.js +0 -139
  121. package/dist/cli/commands/migrate.js.map +0 -1
  122. package/dist/cli/commands/monitor.d.ts +0 -5
  123. package/dist/cli/commands/monitor.d.ts.map +0 -1
  124. package/dist/cli/commands/monitor.js +0 -493
  125. package/dist/cli/commands/monitor.js.map +0 -1
  126. package/dist/cli/commands/session.d.ts +0 -5
  127. package/dist/cli/commands/session.d.ts.map +0 -1
  128. package/dist/cli/commands/session.js +0 -548
  129. package/dist/cli/commands/session.js.map +0 -1
  130. package/dist/cli/commands/sparc.d.ts +0 -3
  131. package/dist/cli/commands/sparc.d.ts.map +0 -1
  132. package/dist/cli/commands/sparc.js +0 -472
  133. package/dist/cli/commands/sparc.js.map +0 -1
  134. package/dist/cli/commands/start/event-emitter.d.ts +0 -13
  135. package/dist/cli/commands/start/event-emitter.d.ts.map +0 -1
  136. package/dist/cli/commands/start/event-emitter.js +0 -35
  137. package/dist/cli/commands/start/event-emitter.js.map +0 -1
  138. package/dist/cli/commands/start/index.d.ts +0 -10
  139. package/dist/cli/commands/start/index.d.ts.map +0 -1
  140. package/dist/cli/commands/start/index.js +0 -9
  141. package/dist/cli/commands/start/index.js.map +0 -1
  142. package/dist/cli/commands/start/process-manager.d.ts +0 -31
  143. package/dist/cli/commands/start/process-manager.d.ts.map +0 -1
  144. package/dist/cli/commands/start/process-manager.js +0 -283
  145. package/dist/cli/commands/start/process-manager.js.map +0 -1
  146. package/dist/cli/commands/start/process-ui-simple.d.ts +0 -29
  147. package/dist/cli/commands/start/process-ui-simple.d.ts.map +0 -1
  148. package/dist/cli/commands/start/process-ui-simple.js +0 -334
  149. package/dist/cli/commands/start/process-ui-simple.js.map +0 -1
  150. package/dist/cli/commands/start/process-ui.d.ts +0 -5
  151. package/dist/cli/commands/start/process-ui.d.ts.map +0 -1
  152. package/dist/cli/commands/start/process-ui.js +0 -5
  153. package/dist/cli/commands/start/process-ui.js.map +0 -1
  154. package/dist/cli/commands/start/start-command.d.ts +0 -2
  155. package/dist/cli/commands/start/start-command.d.ts.map +0 -1
  156. package/dist/cli/commands/start/start-command.js +0 -462
  157. package/dist/cli/commands/start/start-command.js.map +0 -1
  158. package/dist/cli/commands/start/system-monitor.d.ts +0 -25
  159. package/dist/cli/commands/start/system-monitor.d.ts.map +0 -1
  160. package/dist/cli/commands/start/system-monitor.js +0 -265
  161. package/dist/cli/commands/start/system-monitor.js.map +0 -1
  162. package/dist/cli/commands/start/types.d.ts +0 -64
  163. package/dist/cli/commands/start/types.d.ts.map +0 -1
  164. package/dist/cli/commands/start/types.js +0 -22
  165. package/dist/cli/commands/start/types.js.map +0 -1
  166. package/dist/cli/commands/start.d.ts +0 -6
  167. package/dist/cli/commands/start.d.ts.map +0 -1
  168. package/dist/cli/commands/start.js +0 -6
  169. package/dist/cli/commands/start.js.map +0 -1
  170. package/dist/cli/commands/status.d.ts +0 -2
  171. package/dist/cli/commands/status.d.ts.map +0 -1
  172. package/dist/cli/commands/status.js +0 -304
  173. package/dist/cli/commands/status.js.map +0 -1
  174. package/dist/cli/commands/swarm.d.ts +0 -6
  175. package/dist/cli/commands/swarm.d.ts.map +0 -1
  176. package/dist/cli/commands/swarm.js +0 -465
  177. package/dist/cli/commands/swarm.js.map +0 -1
  178. package/dist/cli/commands/task.d.ts +0 -2
  179. package/dist/cli/commands/task.d.ts.map +0 -1
  180. package/dist/cli/commands/task.js +0 -75
  181. package/dist/cli/commands/task.js.map +0 -1
  182. package/dist/cli/commands/workflow.d.ts +0 -2
  183. package/dist/cli/commands/workflow.d.ts.map +0 -1
  184. package/dist/cli/commands/workflow.js +0 -624
  185. package/dist/cli/commands/workflow.js.map +0 -1
  186. package/dist/cli/completion.d.ts +0 -19
  187. package/dist/cli/completion.d.ts.map +0 -1
  188. package/dist/cli/completion.js +0 -545
  189. package/dist/cli/completion.js.map +0 -1
  190. package/dist/cli/formatter.d.ts +0 -69
  191. package/dist/cli/formatter.d.ts.map +0 -1
  192. package/dist/cli/formatter.js +0 -277
  193. package/dist/cli/formatter.js.map +0 -1
  194. package/dist/cli/help-formatter.d.ts +0 -49
  195. package/dist/cli/help-formatter.d.ts.map +0 -1
  196. package/dist/cli/help-formatter.js +0 -108
  197. package/dist/cli/help-formatter.js.map +0 -1
  198. package/dist/cli/help-text.d.ts +0 -25
  199. package/dist/cli/help-text.d.ts.map +0 -1
  200. package/dist/cli/help-text.js +0 -1051
  201. package/dist/cli/help-text.js.map +0 -1
  202. package/dist/cli/index-remote.d.ts +0 -7
  203. package/dist/cli/index-remote.d.ts.map +0 -1
  204. package/dist/cli/index-remote.js +0 -125
  205. package/dist/cli/index-remote.js.map +0 -1
  206. package/dist/cli/index.d.ts +0 -7
  207. package/dist/cli/index.d.ts.map +0 -1
  208. package/dist/cli/index.js +0 -189
  209. package/dist/cli/index.js.map +0 -1
  210. package/dist/cli/node-compat.d.ts +0 -81
  211. package/dist/cli/node-compat.d.ts.map +0 -1
  212. package/dist/cli/node-compat.js +0 -229
  213. package/dist/cli/node-compat.js.map +0 -1
  214. package/dist/cli/repl.d.ts +0 -5
  215. package/dist/cli/repl.d.ts.map +0 -1
  216. package/dist/cli/repl.js +0 -949
  217. package/dist/cli/repl.js.map +0 -1
  218. package/dist/cli/runtime-detector.d.ts +0 -128
  219. package/dist/cli/runtime-detector.d.ts.map +0 -1
  220. package/dist/cli/runtime-detector.js +0 -267
  221. package/dist/cli/runtime-detector.js.map +0 -1
  222. package/dist/cli/simple-cli.d.ts +0 -7
  223. package/dist/cli/simple-cli.d.ts.map +0 -1
  224. package/dist/cli/simple-cli.js +0 -3085
  225. package/dist/cli/simple-cli.js.map +0 -1
  226. package/dist/cli/simple-commands/agent.d.ts +0 -6
  227. package/dist/cli/simple-commands/agent.d.ts.map +0 -1
  228. package/dist/cli/simple-commands/agent.js +0 -128
  229. package/dist/cli/simple-commands/agent.js.map +0 -1
  230. package/dist/cli/simple-commands/analysis.d.ts +0 -2
  231. package/dist/cli/simple-commands/analysis.d.ts.map +0 -1
  232. package/dist/cli/simple-commands/analysis.js +0 -473
  233. package/dist/cli/simple-commands/analysis.js.map +0 -1
  234. package/dist/cli/simple-commands/automation-executor.d.ts +0 -188
  235. package/dist/cli/simple-commands/automation-executor.d.ts.map +0 -1
  236. package/dist/cli/simple-commands/automation-executor.js +0 -1383
  237. package/dist/cli/simple-commands/automation-executor.js.map +0 -1
  238. package/dist/cli/simple-commands/automation.d.ts +0 -2
  239. package/dist/cli/simple-commands/automation.d.ts.map +0 -1
  240. package/dist/cli/simple-commands/automation.js +0 -531
  241. package/dist/cli/simple-commands/automation.js.map +0 -1
  242. package/dist/cli/simple-commands/batch-manager.d.ts +0 -2
  243. package/dist/cli/simple-commands/batch-manager.d.ts.map +0 -1
  244. package/dist/cli/simple-commands/batch-manager.js +0 -290
  245. package/dist/cli/simple-commands/batch-manager.js.map +0 -1
  246. package/dist/cli/simple-commands/claude-telemetry.d.ts +0 -14
  247. package/dist/cli/simple-commands/claude-telemetry.d.ts.map +0 -1
  248. package/dist/cli/simple-commands/claude-telemetry.js +0 -263
  249. package/dist/cli/simple-commands/claude-telemetry.js.map +0 -1
  250. package/dist/cli/simple-commands/config.d.ts +0 -6
  251. package/dist/cli/simple-commands/config.d.ts.map +0 -1
  252. package/dist/cli/simple-commands/config.js +0 -116
  253. package/dist/cli/simple-commands/config.js.map +0 -1
  254. package/dist/cli/simple-commands/coordination.d.ts +0 -2
  255. package/dist/cli/simple-commands/coordination.d.ts.map +0 -1
  256. package/dist/cli/simple-commands/coordination.js +0 -249
  257. package/dist/cli/simple-commands/coordination.js.map +0 -1
  258. package/dist/cli/simple-commands/env-template.d.ts +0 -42
  259. package/dist/cli/simple-commands/env-template.d.ts.map +0 -1
  260. package/dist/cli/simple-commands/env-template.js +0 -183
  261. package/dist/cli/simple-commands/env-template.js.map +0 -1
  262. package/dist/cli/simple-commands/fix-hook-variables.d.ts +0 -16
  263. package/dist/cli/simple-commands/fix-hook-variables.d.ts.map +0 -1
  264. package/dist/cli/simple-commands/fix-hook-variables.js +0 -320
  265. package/dist/cli/simple-commands/fix-hook-variables.js.map +0 -1
  266. package/dist/cli/simple-commands/github/init.d.ts +0 -6
  267. package/dist/cli/simple-commands/github/init.d.ts.map +0 -1
  268. package/dist/cli/simple-commands/github/init.js +0 -506
  269. package/dist/cli/simple-commands/github/init.js.map +0 -1
  270. package/dist/cli/simple-commands/github.d.ts +0 -3
  271. package/dist/cli/simple-commands/github.d.ts.map +0 -1
  272. package/dist/cli/simple-commands/github.js +0 -356
  273. package/dist/cli/simple-commands/github.js.map +0 -1
  274. package/dist/cli/simple-commands/goal.d.ts +0 -3
  275. package/dist/cli/simple-commands/goal.d.ts.map +0 -1
  276. package/dist/cli/simple-commands/goal.js +0 -136
  277. package/dist/cli/simple-commands/goal.js.map +0 -1
  278. package/dist/cli/simple-commands/hive-mind/auto-save-middleware.d.ts +0 -68
  279. package/dist/cli/simple-commands/hive-mind/auto-save-middleware.d.ts.map +0 -1
  280. package/dist/cli/simple-commands/hive-mind/auto-save-middleware.js +0 -264
  281. package/dist/cli/simple-commands/hive-mind/auto-save-middleware.js.map +0 -1
  282. package/dist/cli/simple-commands/hive-mind/communication.d.ts +0 -176
  283. package/dist/cli/simple-commands/hive-mind/communication.d.ts.map +0 -1
  284. package/dist/cli/simple-commands/hive-mind/communication.js +0 -611
  285. package/dist/cli/simple-commands/hive-mind/communication.js.map +0 -1
  286. package/dist/cli/simple-commands/hive-mind/core.d.ts +0 -306
  287. package/dist/cli/simple-commands/hive-mind/core.d.ts.map +0 -1
  288. package/dist/cli/simple-commands/hive-mind/core.js +0 -839
  289. package/dist/cli/simple-commands/hive-mind/core.js.map +0 -1
  290. package/dist/cli/simple-commands/hive-mind/db-optimizer.d.ts +0 -32
  291. package/dist/cli/simple-commands/hive-mind/db-optimizer.d.ts.map +0 -1
  292. package/dist/cli/simple-commands/hive-mind/db-optimizer.js +0 -702
  293. package/dist/cli/simple-commands/hive-mind/db-optimizer.js.map +0 -1
  294. package/dist/cli/simple-commands/hive-mind/mcp-wrapper.d.ts +0 -270
  295. package/dist/cli/simple-commands/hive-mind/mcp-wrapper.d.ts.map +0 -1
  296. package/dist/cli/simple-commands/hive-mind/mcp-wrapper.js +0 -1211
  297. package/dist/cli/simple-commands/hive-mind/mcp-wrapper.js.map +0 -1
  298. package/dist/cli/simple-commands/hive-mind/memory.d.ts +0 -334
  299. package/dist/cli/simple-commands/hive-mind/memory.d.ts.map +0 -1
  300. package/dist/cli/simple-commands/hive-mind/memory.js +0 -1068
  301. package/dist/cli/simple-commands/hive-mind/memory.js.map +0 -1
  302. package/dist/cli/simple-commands/hive-mind/metrics-reader.js +0 -274
  303. package/dist/cli/simple-commands/hive-mind/metrics-reader.js.map +0 -1
  304. package/dist/cli/simple-commands/hive-mind/performance-optimizer.d.ts +0 -256
  305. package/dist/cli/simple-commands/hive-mind/performance-optimizer.d.ts.map +0 -1
  306. package/dist/cli/simple-commands/hive-mind/performance-optimizer.js +0 -520
  307. package/dist/cli/simple-commands/hive-mind/performance-optimizer.js.map +0 -1
  308. package/dist/cli/simple-commands/hive-mind/queen.d.ts +0 -235
  309. package/dist/cli/simple-commands/hive-mind/queen.d.ts.map +0 -1
  310. package/dist/cli/simple-commands/hive-mind/queen.js +0 -697
  311. package/dist/cli/simple-commands/hive-mind/queen.js.map +0 -1
  312. package/dist/cli/simple-commands/hive-mind/session-manager.d.ts +0 -140
  313. package/dist/cli/simple-commands/hive-mind/session-manager.d.ts.map +0 -1
  314. package/dist/cli/simple-commands/hive-mind/session-manager.js +0 -1000
  315. package/dist/cli/simple-commands/hive-mind/session-manager.js.map +0 -1
  316. package/dist/cli/simple-commands/hive-mind-optimize.d.ts +0 -6
  317. package/dist/cli/simple-commands/hive-mind-optimize.d.ts.map +0 -1
  318. package/dist/cli/simple-commands/hive-mind-optimize.js +0 -317
  319. package/dist/cli/simple-commands/hive-mind-optimize.js.map +0 -1
  320. package/dist/cli/simple-commands/hive-mind.d.ts +0 -22
  321. package/dist/cli/simple-commands/hive-mind.d.ts.map +0 -1
  322. package/dist/cli/simple-commands/hive-mind.js +0 -2722
  323. package/dist/cli/simple-commands/hive-mind.js.map +0 -1
  324. package/dist/cli/simple-commands/hook-safety.d.ts +0 -177
  325. package/dist/cli/simple-commands/hook-safety.d.ts.map +0 -1
  326. package/dist/cli/simple-commands/hook-safety.js +0 -590
  327. package/dist/cli/simple-commands/hook-safety.js.map +0 -1
  328. package/dist/cli/simple-commands/hooks.d.ts +0 -3
  329. package/dist/cli/simple-commands/hooks.d.ts.map +0 -1
  330. package/dist/cli/simple-commands/hooks.js +0 -1298
  331. package/dist/cli/simple-commands/hooks.js.map +0 -1
  332. package/dist/cli/simple-commands/init/agent-copier.d.ts +0 -65
  333. package/dist/cli/simple-commands/init/agent-copier.d.ts.map +0 -1
  334. package/dist/cli/simple-commands/init/agent-copier.js +0 -320
  335. package/dist/cli/simple-commands/init/agent-copier.js.map +0 -1
  336. package/dist/cli/simple-commands/init/batch-init.d.ts +0 -137
  337. package/dist/cli/simple-commands/init/batch-init.d.ts.map +0 -1
  338. package/dist/cli/simple-commands/init/batch-init.js +0 -558
  339. package/dist/cli/simple-commands/init/batch-init.js.map +0 -1
  340. package/dist/cli/simple-commands/init/claude-commands/claude-flow-commands.d.ts +0 -2
  341. package/dist/cli/simple-commands/init/claude-commands/claude-flow-commands.d.ts.map +0 -1
  342. package/dist/cli/simple-commands/init/claude-commands/claude-flow-commands.js +0 -433
  343. package/dist/cli/simple-commands/init/claude-commands/claude-flow-commands.js.map +0 -1
  344. package/dist/cli/simple-commands/init/claude-commands/optimized-claude-flow-commands.d.ts +0 -2
  345. package/dist/cli/simple-commands/init/claude-commands/optimized-claude-flow-commands.d.ts.map +0 -1
  346. package/dist/cli/simple-commands/init/claude-commands/optimized-claude-flow-commands.js +0 -871
  347. package/dist/cli/simple-commands/init/claude-commands/optimized-claude-flow-commands.js.map +0 -1
  348. package/dist/cli/simple-commands/init/claude-commands/optimized-slash-commands.d.ts +0 -2
  349. package/dist/cli/simple-commands/init/claude-commands/optimized-slash-commands.d.ts.map +0 -1
  350. package/dist/cli/simple-commands/init/claude-commands/optimized-slash-commands.js +0 -332
  351. package/dist/cli/simple-commands/init/claude-commands/optimized-slash-commands.js.map +0 -1
  352. package/dist/cli/simple-commands/init/claude-commands/optimized-sparc-commands.d.ts +0 -3
  353. package/dist/cli/simple-commands/init/claude-commands/optimized-sparc-commands.d.ts.map +0 -1
  354. package/dist/cli/simple-commands/init/claude-commands/optimized-sparc-commands.js +0 -488
  355. package/dist/cli/simple-commands/init/claude-commands/optimized-sparc-commands.js.map +0 -1
  356. package/dist/cli/simple-commands/init/claude-commands/slash-commands.d.ts +0 -2
  357. package/dist/cli/simple-commands/init/claude-commands/slash-commands.d.ts.map +0 -1
  358. package/dist/cli/simple-commands/init/claude-commands/slash-commands.js +0 -51
  359. package/dist/cli/simple-commands/init/claude-commands/slash-commands.js.map +0 -1
  360. package/dist/cli/simple-commands/init/claude-commands/sparc-commands.d.ts +0 -3
  361. package/dist/cli/simple-commands/init/claude-commands/sparc-commands.d.ts.map +0 -1
  362. package/dist/cli/simple-commands/init/claude-commands/sparc-commands.js +0 -288
  363. package/dist/cli/simple-commands/init/claude-commands/sparc-commands.js.map +0 -1
  364. package/dist/cli/simple-commands/init/copy-revised-templates.d.ts +0 -29
  365. package/dist/cli/simple-commands/init/copy-revised-templates.d.ts.map +0 -1
  366. package/dist/cli/simple-commands/init/copy-revised-templates.js +0 -166
  367. package/dist/cli/simple-commands/init/copy-revised-templates.js.map +0 -1
  368. package/dist/cli/simple-commands/init/executable-wrapper.d.ts +0 -2
  369. package/dist/cli/simple-commands/init/executable-wrapper.d.ts.map +0 -1
  370. package/dist/cli/simple-commands/init/executable-wrapper.js +0 -116
  371. package/dist/cli/simple-commands/init/executable-wrapper.js.map +0 -1
  372. package/dist/cli/simple-commands/init/gitignore-updater.d.ts +0 -23
  373. package/dist/cli/simple-commands/init/gitignore-updater.d.ts.map +0 -1
  374. package/dist/cli/simple-commands/init/gitignore-updater.js +0 -128
  375. package/dist/cli/simple-commands/init/gitignore-updater.js.map +0 -1
  376. package/dist/cli/simple-commands/init/help.d.ts +0 -2
  377. package/dist/cli/simple-commands/init/help.d.ts.map +0 -1
  378. package/dist/cli/simple-commands/init/help.js +0 -131
  379. package/dist/cli/simple-commands/init/help.js.map +0 -1
  380. package/dist/cli/simple-commands/init/hive-mind-init.d.ts +0 -152
  381. package/dist/cli/simple-commands/init/hive-mind-init.d.ts.map +0 -1
  382. package/dist/cli/simple-commands/init/hive-mind-init.js +0 -699
  383. package/dist/cli/simple-commands/init/hive-mind-init.js.map +0 -1
  384. package/dist/cli/simple-commands/init/index.d.ts +0 -2
  385. package/dist/cli/simple-commands/init/index.d.ts.map +0 -1
  386. package/dist/cli/simple-commands/init/index.js +0 -1784
  387. package/dist/cli/simple-commands/init/index.js.map +0 -1
  388. package/dist/cli/simple-commands/init/performance-monitor.d.ts +0 -73
  389. package/dist/cli/simple-commands/init/performance-monitor.d.ts.map +0 -1
  390. package/dist/cli/simple-commands/init/performance-monitor.js +0 -277
  391. package/dist/cli/simple-commands/init/performance-monitor.js.map +0 -1
  392. package/dist/cli/simple-commands/init/rollback/backup-manager.d.ts +0 -95
  393. package/dist/cli/simple-commands/init/rollback/backup-manager.d.ts.map +0 -1
  394. package/dist/cli/simple-commands/init/rollback/backup-manager.js +0 -486
  395. package/dist/cli/simple-commands/init/rollback/backup-manager.js.map +0 -1
  396. package/dist/cli/simple-commands/init/rollback/index.d.ts +0 -114
  397. package/dist/cli/simple-commands/init/rollback/index.d.ts.map +0 -1
  398. package/dist/cli/simple-commands/init/rollback/index.js +0 -353
  399. package/dist/cli/simple-commands/init/rollback/index.js.map +0 -1
  400. package/dist/cli/simple-commands/init/rollback/recovery-manager.d.ts +0 -161
  401. package/dist/cli/simple-commands/init/rollback/recovery-manager.d.ts.map +0 -1
  402. package/dist/cli/simple-commands/init/rollback/recovery-manager.js +0 -686
  403. package/dist/cli/simple-commands/init/rollback/recovery-manager.js.map +0 -1
  404. package/dist/cli/simple-commands/init/rollback/rollback-executor.d.ts +0 -112
  405. package/dist/cli/simple-commands/init/rollback/rollback-executor.d.ts.map +0 -1
  406. package/dist/cli/simple-commands/init/rollback/rollback-executor.js +0 -480
  407. package/dist/cli/simple-commands/init/rollback/rollback-executor.js.map +0 -1
  408. package/dist/cli/simple-commands/init/rollback/state-tracker.d.ts +0 -121
  409. package/dist/cli/simple-commands/init/rollback/state-tracker.d.ts.map +0 -1
  410. package/dist/cli/simple-commands/init/rollback/state-tracker.js +0 -432
  411. package/dist/cli/simple-commands/init/rollback/state-tracker.js.map +0 -1
  412. package/dist/cli/simple-commands/init/skills-copier.d.ts +0 -41
  413. package/dist/cli/simple-commands/init/skills-copier.d.ts.map +0 -1
  414. package/dist/cli/simple-commands/init/skills-copier.js +0 -192
  415. package/dist/cli/simple-commands/init/skills-copier.js.map +0 -1
  416. package/dist/cli/simple-commands/init/sparc/roo-readme.d.ts +0 -2
  417. package/dist/cli/simple-commands/init/sparc/roo-readme.d.ts.map +0 -1
  418. package/dist/cli/simple-commands/init/sparc/roo-readme.js +0 -61
  419. package/dist/cli/simple-commands/init/sparc/roo-readme.js.map +0 -1
  420. package/dist/cli/simple-commands/init/sparc/roomodes-config.d.ts +0 -2
  421. package/dist/cli/simple-commands/init/sparc/roomodes-config.d.ts.map +0 -1
  422. package/dist/cli/simple-commands/init/sparc/roomodes-config.js +0 -80
  423. package/dist/cli/simple-commands/init/sparc/roomodes-config.js.map +0 -1
  424. package/dist/cli/simple-commands/init/sparc/workflows.d.ts +0 -2
  425. package/dist/cli/simple-commands/init/sparc/workflows.d.ts.map +0 -1
  426. package/dist/cli/simple-commands/init/sparc/workflows.js +0 -36
  427. package/dist/cli/simple-commands/init/sparc/workflows.js.map +0 -1
  428. package/dist/cli/simple-commands/init/sparc-structure.d.ts +0 -2
  429. package/dist/cli/simple-commands/init/sparc-structure.d.ts.map +0 -1
  430. package/dist/cli/simple-commands/init/sparc-structure.js +0 -63
  431. package/dist/cli/simple-commands/init/sparc-structure.js.map +0 -1
  432. package/dist/cli/simple-commands/init/template-copier.d.ts +0 -27
  433. package/dist/cli/simple-commands/init/template-copier.d.ts.map +0 -1
  434. package/dist/cli/simple-commands/init/template-copier.js +0 -538
  435. package/dist/cli/simple-commands/init/template-copier.js.map +0 -1
  436. package/dist/cli/simple-commands/init/templates/claude-md.d.ts +0 -6
  437. package/dist/cli/simple-commands/init/templates/claude-md.d.ts.map +0 -1
  438. package/dist/cli/simple-commands/init/templates/claude-md.js +0 -1097
  439. package/dist/cli/simple-commands/init/templates/claude-md.js.map +0 -1
  440. package/dist/cli/simple-commands/init/templates/coordination-md.d.ts +0 -4
  441. package/dist/cli/simple-commands/init/templates/coordination-md.d.ts.map +0 -1
  442. package/dist/cli/simple-commands/init/templates/coordination-md.js +0 -338
  443. package/dist/cli/simple-commands/init/templates/coordination-md.js.map +0 -1
  444. package/dist/cli/simple-commands/init/templates/enhanced-templates.d.ts +0 -21
  445. package/dist/cli/simple-commands/init/templates/enhanced-templates.d.ts.map +0 -1
  446. package/dist/cli/simple-commands/init/templates/enhanced-templates.js +0 -2304
  447. package/dist/cli/simple-commands/init/templates/enhanced-templates.js.map +0 -1
  448. package/dist/cli/simple-commands/init/templates/memory-bank-md.d.ts +0 -4
  449. package/dist/cli/simple-commands/init/templates/memory-bank-md.d.ts.map +0 -1
  450. package/dist/cli/simple-commands/init/templates/memory-bank-md.js +0 -257
  451. package/dist/cli/simple-commands/init/templates/memory-bank-md.js.map +0 -1
  452. package/dist/cli/simple-commands/init/templates/readme-files.d.ts +0 -3
  453. package/dist/cli/simple-commands/init/templates/readme-files.d.ts.map +0 -1
  454. package/dist/cli/simple-commands/init/templates/readme-files.js +0 -71
  455. package/dist/cli/simple-commands/init/templates/readme-files.js.map +0 -1
  456. package/dist/cli/simple-commands/init/templates/sparc-modes.d.ts +0 -30
  457. package/dist/cli/simple-commands/init/templates/sparc-modes.d.ts.map +0 -1
  458. package/dist/cli/simple-commands/init/templates/sparc-modes.js +0 -1375
  459. package/dist/cli/simple-commands/init/templates/sparc-modes.js.map +0 -1
  460. package/dist/cli/simple-commands/init/templates/verification-claude-md.d.ts +0 -3
  461. package/dist/cli/simple-commands/init/templates/verification-claude-md.d.ts.map +0 -1
  462. package/dist/cli/simple-commands/init/templates/verification-claude-md.js +0 -432
  463. package/dist/cli/simple-commands/init/templates/verification-claude-md.js.map +0 -1
  464. package/dist/cli/simple-commands/init/validation/config-validator.d.ts +0 -63
  465. package/dist/cli/simple-commands/init/validation/config-validator.d.ts.map +0 -1
  466. package/dist/cli/simple-commands/init/validation/config-validator.js +0 -308
  467. package/dist/cli/simple-commands/init/validation/config-validator.js.map +0 -1
  468. package/dist/cli/simple-commands/init/validation/health-checker.d.ts +0 -117
  469. package/dist/cli/simple-commands/init/validation/health-checker.d.ts.map +0 -1
  470. package/dist/cli/simple-commands/init/validation/health-checker.js +0 -539
  471. package/dist/cli/simple-commands/init/validation/health-checker.js.map +0 -1
  472. package/dist/cli/simple-commands/init/validation/index.d.ts +0 -55
  473. package/dist/cli/simple-commands/init/validation/index.d.ts.map +0 -1
  474. package/dist/cli/simple-commands/init/validation/index.js +0 -347
  475. package/dist/cli/simple-commands/init/validation/index.js.map +0 -1
  476. package/dist/cli/simple-commands/init/validation/mode-validator.d.ts +0 -76
  477. package/dist/cli/simple-commands/init/validation/mode-validator.d.ts.map +0 -1
  478. package/dist/cli/simple-commands/init/validation/mode-validator.js +0 -343
  479. package/dist/cli/simple-commands/init/validation/mode-validator.js.map +0 -1
  480. package/dist/cli/simple-commands/init/validation/post-init-validator.d.ts +0 -62
  481. package/dist/cli/simple-commands/init/validation/post-init-validator.d.ts.map +0 -1
  482. package/dist/cli/simple-commands/init/validation/post-init-validator.js +0 -349
  483. package/dist/cli/simple-commands/init/validation/post-init-validator.js.map +0 -1
  484. package/dist/cli/simple-commands/init/validation/pre-init-validator.d.ts +0 -86
  485. package/dist/cli/simple-commands/init/validation/pre-init-validator.d.ts.map +0 -1
  486. package/dist/cli/simple-commands/init/validation/pre-init-validator.js +0 -260
  487. package/dist/cli/simple-commands/init/validation/pre-init-validator.js.map +0 -1
  488. package/dist/cli/simple-commands/inject-memory-protocol.d.ts +0 -34
  489. package/dist/cli/simple-commands/inject-memory-protocol.d.ts.map +0 -1
  490. package/dist/cli/simple-commands/inject-memory-protocol.js +0 -229
  491. package/dist/cli/simple-commands/inject-memory-protocol.js.map +0 -1
  492. package/dist/cli/simple-commands/mcp.d.ts +0 -2
  493. package/dist/cli/simple-commands/mcp.d.ts.map +0 -1
  494. package/dist/cli/simple-commands/mcp.js +0 -369
  495. package/dist/cli/simple-commands/mcp.js.map +0 -1
  496. package/dist/cli/simple-commands/memory-consolidation.d.ts +0 -73
  497. package/dist/cli/simple-commands/memory-consolidation.d.ts.map +0 -1
  498. package/dist/cli/simple-commands/memory-consolidation.js +0 -537
  499. package/dist/cli/simple-commands/memory-consolidation.js.map +0 -1
  500. package/dist/cli/simple-commands/memory.d.ts +0 -2
  501. package/dist/cli/simple-commands/memory.d.ts.map +0 -1
  502. package/dist/cli/simple-commands/memory.js +0 -778
  503. package/dist/cli/simple-commands/memory.js.map +0 -1
  504. package/dist/cli/simple-commands/migrate-hooks.d.ts +0 -10
  505. package/dist/cli/simple-commands/migrate-hooks.d.ts.map +0 -1
  506. package/dist/cli/simple-commands/migrate-hooks.js +0 -57
  507. package/dist/cli/simple-commands/migrate-hooks.js.map +0 -1
  508. package/dist/cli/simple-commands/monitor.d.ts +0 -3
  509. package/dist/cli/simple-commands/monitor.d.ts.map +0 -1
  510. package/dist/cli/simple-commands/monitor.js +0 -366
  511. package/dist/cli/simple-commands/monitor.js.map +0 -1
  512. package/dist/cli/simple-commands/neural.d.ts +0 -3
  513. package/dist/cli/simple-commands/neural.d.ts.map +0 -1
  514. package/dist/cli/simple-commands/neural.js +0 -137
  515. package/dist/cli/simple-commands/neural.js.map +0 -1
  516. package/dist/cli/simple-commands/pair.d.ts +0 -3
  517. package/dist/cli/simple-commands/pair.d.ts.map +0 -1
  518. package/dist/cli/simple-commands/pair.js +0 -735
  519. package/dist/cli/simple-commands/pair.js.map +0 -1
  520. package/dist/cli/simple-commands/performance-hooks.d.ts +0 -20
  521. package/dist/cli/simple-commands/performance-hooks.d.ts.map +0 -1
  522. package/dist/cli/simple-commands/performance-hooks.js +0 -127
  523. package/dist/cli/simple-commands/performance-hooks.js.map +0 -1
  524. package/dist/cli/simple-commands/performance-metrics.d.ts +0 -153
  525. package/dist/cli/simple-commands/performance-metrics.d.ts.map +0 -1
  526. package/dist/cli/simple-commands/performance-metrics.js +0 -759
  527. package/dist/cli/simple-commands/performance-metrics.js.map +0 -1
  528. package/dist/cli/simple-commands/process-ui-enhanced.d.ts +0 -55
  529. package/dist/cli/simple-commands/process-ui-enhanced.d.ts.map +0 -1
  530. package/dist/cli/simple-commands/process-ui-enhanced.js +0 -680
  531. package/dist/cli/simple-commands/process-ui-enhanced.js.map +0 -1
  532. package/dist/cli/simple-commands/proxy.d.ts +0 -5
  533. package/dist/cli/simple-commands/proxy.d.ts.map +0 -1
  534. package/dist/cli/simple-commands/proxy.js +0 -346
  535. package/dist/cli/simple-commands/proxy.js.map +0 -1
  536. package/dist/cli/simple-commands/sparc-modes/architect.d.ts +0 -2
  537. package/dist/cli/simple-commands/sparc-modes/architect.d.ts.map +0 -1
  538. package/dist/cli/simple-commands/sparc-modes/architect.js +0 -126
  539. package/dist/cli/simple-commands/sparc-modes/architect.js.map +0 -1
  540. package/dist/cli/simple-commands/sparc-modes/ask.d.ts +0 -2
  541. package/dist/cli/simple-commands/sparc-modes/ask.d.ts.map +0 -1
  542. package/dist/cli/simple-commands/sparc-modes/ask.js +0 -127
  543. package/dist/cli/simple-commands/sparc-modes/ask.js.map +0 -1
  544. package/dist/cli/simple-commands/sparc-modes/code.d.ts +0 -2
  545. package/dist/cli/simple-commands/sparc-modes/code.d.ts.map +0 -1
  546. package/dist/cli/simple-commands/sparc-modes/code.js +0 -149
  547. package/dist/cli/simple-commands/sparc-modes/code.js.map +0 -1
  548. package/dist/cli/simple-commands/sparc-modes/debug.d.ts +0 -2
  549. package/dist/cli/simple-commands/sparc-modes/debug.d.ts.map +0 -1
  550. package/dist/cli/simple-commands/sparc-modes/debug.js +0 -113
  551. package/dist/cli/simple-commands/sparc-modes/debug.js.map +0 -1
  552. package/dist/cli/simple-commands/sparc-modes/devops.d.ts +0 -2
  553. package/dist/cli/simple-commands/sparc-modes/devops.d.ts.map +0 -1
  554. package/dist/cli/simple-commands/sparc-modes/devops.js +0 -138
  555. package/dist/cli/simple-commands/sparc-modes/devops.js.map +0 -1
  556. package/dist/cli/simple-commands/sparc-modes/docs-writer.d.ts +0 -2
  557. package/dist/cli/simple-commands/sparc-modes/docs-writer.d.ts.map +0 -1
  558. package/dist/cli/simple-commands/sparc-modes/docs-writer.js +0 -39
  559. package/dist/cli/simple-commands/sparc-modes/docs-writer.js.map +0 -1
  560. package/dist/cli/simple-commands/sparc-modes/generic.d.ts +0 -2
  561. package/dist/cli/simple-commands/sparc-modes/generic.d.ts.map +0 -1
  562. package/dist/cli/simple-commands/sparc-modes/generic.js +0 -35
  563. package/dist/cli/simple-commands/sparc-modes/generic.js.map +0 -1
  564. package/dist/cli/simple-commands/sparc-modes/index.d.ts +0 -17
  565. package/dist/cli/simple-commands/sparc-modes/index.d.ts.map +0 -1
  566. package/dist/cli/simple-commands/sparc-modes/index.js +0 -196
  567. package/dist/cli/simple-commands/sparc-modes/index.js.map +0 -1
  568. package/dist/cli/simple-commands/sparc-modes/integration.d.ts +0 -2
  569. package/dist/cli/simple-commands/sparc-modes/integration.d.ts.map +0 -1
  570. package/dist/cli/simple-commands/sparc-modes/integration.js +0 -56
  571. package/dist/cli/simple-commands/sparc-modes/integration.js.map +0 -1
  572. package/dist/cli/simple-commands/sparc-modes/mcp.d.ts +0 -2
  573. package/dist/cli/simple-commands/sparc-modes/mcp.d.ts.map +0 -1
  574. package/dist/cli/simple-commands/sparc-modes/mcp.js +0 -39
  575. package/dist/cli/simple-commands/sparc-modes/mcp.js.map +0 -1
  576. package/dist/cli/simple-commands/sparc-modes/monitoring.d.ts +0 -2
  577. package/dist/cli/simple-commands/sparc-modes/monitoring.d.ts.map +0 -1
  578. package/dist/cli/simple-commands/sparc-modes/monitoring.js +0 -39
  579. package/dist/cli/simple-commands/sparc-modes/monitoring.js.map +0 -1
  580. package/dist/cli/simple-commands/sparc-modes/optimization.d.ts +0 -2
  581. package/dist/cli/simple-commands/sparc-modes/optimization.d.ts.map +0 -1
  582. package/dist/cli/simple-commands/sparc-modes/optimization.js +0 -39
  583. package/dist/cli/simple-commands/sparc-modes/optimization.js.map +0 -1
  584. package/dist/cli/simple-commands/sparc-modes/security-review.d.ts +0 -2
  585. package/dist/cli/simple-commands/sparc-modes/security-review.d.ts.map +0 -1
  586. package/dist/cli/simple-commands/sparc-modes/security-review.js +0 -131
  587. package/dist/cli/simple-commands/sparc-modes/security-review.js.map +0 -1
  588. package/dist/cli/simple-commands/sparc-modes/sparc-orchestrator.d.ts +0 -2
  589. package/dist/cli/simple-commands/sparc-modes/sparc-orchestrator.d.ts.map +0 -1
  590. package/dist/cli/simple-commands/sparc-modes/sparc-orchestrator.js +0 -168
  591. package/dist/cli/simple-commands/sparc-modes/sparc-orchestrator.js.map +0 -1
  592. package/dist/cli/simple-commands/sparc-modes/spec-pseudocode.d.ts +0 -2
  593. package/dist/cli/simple-commands/sparc-modes/spec-pseudocode.d.ts.map +0 -1
  594. package/dist/cli/simple-commands/sparc-modes/spec-pseudocode.js +0 -39
  595. package/dist/cli/simple-commands/sparc-modes/spec-pseudocode.js.map +0 -1
  596. package/dist/cli/simple-commands/sparc-modes/supabase-admin.d.ts +0 -2
  597. package/dist/cli/simple-commands/sparc-modes/supabase-admin.d.ts.map +0 -1
  598. package/dist/cli/simple-commands/sparc-modes/supabase-admin.js +0 -150
  599. package/dist/cli/simple-commands/sparc-modes/supabase-admin.js.map +0 -1
  600. package/dist/cli/simple-commands/sparc-modes/swarm.d.ts +0 -81
  601. package/dist/cli/simple-commands/sparc-modes/swarm.d.ts.map +0 -1
  602. package/dist/cli/simple-commands/sparc-modes/swarm.js +0 -428
  603. package/dist/cli/simple-commands/sparc-modes/swarm.js.map +0 -1
  604. package/dist/cli/simple-commands/sparc-modes/tdd.d.ts +0 -2
  605. package/dist/cli/simple-commands/sparc-modes/tdd.d.ts.map +0 -1
  606. package/dist/cli/simple-commands/sparc-modes/tdd.js +0 -113
  607. package/dist/cli/simple-commands/sparc-modes/tdd.js.map +0 -1
  608. package/dist/cli/simple-commands/sparc-modes/tutorial.d.ts +0 -2
  609. package/dist/cli/simple-commands/sparc-modes/tutorial.d.ts.map +0 -1
  610. package/dist/cli/simple-commands/sparc-modes/tutorial.js +0 -278
  611. package/dist/cli/simple-commands/sparc-modes/tutorial.js.map +0 -1
  612. package/dist/cli/simple-commands/sparc.d.ts +0 -2
  613. package/dist/cli/simple-commands/sparc.d.ts.map +0 -1
  614. package/dist/cli/simple-commands/sparc.js +0 -477
  615. package/dist/cli/simple-commands/sparc.js.map +0 -1
  616. package/dist/cli/simple-commands/start-ui.d.ts +0 -2
  617. package/dist/cli/simple-commands/start-ui.d.ts.map +0 -1
  618. package/dist/cli/simple-commands/start-ui.js +0 -135
  619. package/dist/cli/simple-commands/start-ui.js.map +0 -1
  620. package/dist/cli/simple-commands/start-wrapper.d.ts +0 -2
  621. package/dist/cli/simple-commands/start-wrapper.d.ts.map +0 -1
  622. package/dist/cli/simple-commands/start-wrapper.js +0 -264
  623. package/dist/cli/simple-commands/start-wrapper.js.map +0 -1
  624. package/dist/cli/simple-commands/start.d.ts +0 -2
  625. package/dist/cli/simple-commands/start.d.ts.map +0 -1
  626. package/dist/cli/simple-commands/start.js +0 -3
  627. package/dist/cli/simple-commands/start.js.map +0 -1
  628. package/dist/cli/simple-commands/status.d.ts +0 -2
  629. package/dist/cli/simple-commands/status.d.ts.map +0 -1
  630. package/dist/cli/simple-commands/status.js +0 -292
  631. package/dist/cli/simple-commands/status.js.map +0 -1
  632. package/dist/cli/simple-commands/stream-chain.d.ts +0 -7
  633. package/dist/cli/simple-commands/stream-chain.d.ts.map +0 -1
  634. package/dist/cli/simple-commands/stream-chain.js +0 -433
  635. package/dist/cli/simple-commands/stream-chain.js.map +0 -1
  636. package/dist/cli/simple-commands/stream-processor.d.ts +0 -32
  637. package/dist/cli/simple-commands/stream-processor.d.ts.map +0 -1
  638. package/dist/cli/simple-commands/stream-processor.js +0 -318
  639. package/dist/cli/simple-commands/stream-processor.js.map +0 -1
  640. package/dist/cli/simple-commands/swarm-executor.d.ts +0 -68
  641. package/dist/cli/simple-commands/swarm-executor.d.ts.map +0 -1
  642. package/dist/cli/simple-commands/swarm-executor.js +0 -218
  643. package/dist/cli/simple-commands/swarm-executor.js.map +0 -1
  644. package/dist/cli/simple-commands/swarm-metrics-integration.d.ts +0 -69
  645. package/dist/cli/simple-commands/swarm-metrics-integration.d.ts.map +0 -1
  646. package/dist/cli/simple-commands/swarm-metrics-integration.js +0 -294
  647. package/dist/cli/simple-commands/swarm-metrics-integration.js.map +0 -1
  648. package/dist/cli/simple-commands/swarm-webui-integration.d.ts +0 -68
  649. package/dist/cli/simple-commands/swarm-webui-integration.d.ts.map +0 -1
  650. package/dist/cli/simple-commands/swarm-webui-integration.js +0 -265
  651. package/dist/cli/simple-commands/swarm-webui-integration.js.map +0 -1
  652. package/dist/cli/simple-commands/swarm.d.ts +0 -2
  653. package/dist/cli/simple-commands/swarm.d.ts.map +0 -1
  654. package/dist/cli/simple-commands/swarm.js +0 -2104
  655. package/dist/cli/simple-commands/swarm.js.map +0 -1
  656. package/dist/cli/simple-commands/task.d.ts +0 -2
  657. package/dist/cli/simple-commands/task.d.ts.map +0 -1
  658. package/dist/cli/simple-commands/task.js +0 -250
  659. package/dist/cli/simple-commands/task.js.map +0 -1
  660. package/dist/cli/simple-commands/token-tracker.d.ts +0 -73
  661. package/dist/cli/simple-commands/token-tracker.d.ts.map +0 -1
  662. package/dist/cli/simple-commands/token-tracker.js +0 -319
  663. package/dist/cli/simple-commands/token-tracker.js.map +0 -1
  664. package/dist/cli/simple-commands/training-pipeline.d.ts +0 -166
  665. package/dist/cli/simple-commands/training-pipeline.d.ts.map +0 -1
  666. package/dist/cli/simple-commands/training-pipeline.js +0 -760
  667. package/dist/cli/simple-commands/training-pipeline.js.map +0 -1
  668. package/dist/cli/simple-commands/training.d.ts +0 -2
  669. package/dist/cli/simple-commands/training.d.ts.map +0 -1
  670. package/dist/cli/simple-commands/training.js +0 -240
  671. package/dist/cli/simple-commands/training.js.map +0 -1
  672. package/dist/cli/simple-commands/verification-training-integration.d.ts +0 -181
  673. package/dist/cli/simple-commands/verification-training-integration.d.ts.map +0 -1
  674. package/dist/cli/simple-commands/verification-training-integration.js +0 -561
  675. package/dist/cli/simple-commands/verification-training-integration.js.map +0 -1
  676. package/dist/cli/simple-commands/verification.d.ts +0 -10
  677. package/dist/cli/simple-commands/verification.d.ts.map +0 -1
  678. package/dist/cli/simple-commands/verification.js +0 -476
  679. package/dist/cli/simple-commands/verification.js.map +0 -1
  680. package/dist/cli/simple-commands/web-server.d.ts +0 -152
  681. package/dist/cli/simple-commands/web-server.d.ts.map +0 -1
  682. package/dist/cli/simple-commands/web-server.js +0 -816
  683. package/dist/cli/simple-commands/web-server.js.map +0 -1
  684. package/dist/cli/utils/interactive-detector.d.ts +0 -25
  685. package/dist/cli/utils/interactive-detector.d.ts.map +0 -1
  686. package/dist/cli/utils/interactive-detector.js +0 -129
  687. package/dist/cli/utils/interactive-detector.js.map +0 -1
  688. package/dist/cli/utils/safe-interactive.d.ts +0 -30
  689. package/dist/cli/utils/safe-interactive.d.ts.map +0 -1
  690. package/dist/cli/utils/safe-interactive.js +0 -134
  691. package/dist/cli/utils/safe-interactive.js.map +0 -1
  692. package/dist/cli/utils.d.ts +0 -75
  693. package/dist/cli/utils.d.ts.map +0 -1
  694. package/dist/cli/utils.js +0 -567
  695. package/dist/cli/utils.js.map +0 -1
  696. package/dist/config/config-manager.d.ts +0 -212
  697. package/dist/config/config-manager.d.ts.map +0 -1
  698. package/dist/config/config-manager.js +0 -550
  699. package/dist/config/config-manager.js.map +0 -1
  700. package/dist/constants/agent-types.d.ts +0 -57
  701. package/dist/constants/agent-types.d.ts.map +0 -1
  702. package/dist/constants/agent-types.js +0 -57
  703. package/dist/constants/agent-types.js.map +0 -1
  704. package/dist/coordination/advanced-scheduler.d.ts +0 -121
  705. package/dist/coordination/advanced-scheduler.d.ts.map +0 -1
  706. package/dist/coordination/advanced-scheduler.js +0 -382
  707. package/dist/coordination/advanced-scheduler.js.map +0 -1
  708. package/dist/coordination/background-executor.d.ts +0 -69
  709. package/dist/coordination/background-executor.d.ts.map +0 -1
  710. package/dist/coordination/background-executor.js +0 -363
  711. package/dist/coordination/background-executor.js.map +0 -1
  712. package/dist/coordination/circuit-breaker.d.ts +0 -124
  713. package/dist/coordination/circuit-breaker.d.ts.map +0 -1
  714. package/dist/coordination/circuit-breaker.js +0 -301
  715. package/dist/coordination/circuit-breaker.js.map +0 -1
  716. package/dist/coordination/conflict-resolution.d.ts +0 -133
  717. package/dist/coordination/conflict-resolution.d.ts.map +0 -1
  718. package/dist/coordination/conflict-resolution.js +0 -360
  719. package/dist/coordination/conflict-resolution.js.map +0 -1
  720. package/dist/coordination/dependency-graph.d.ts +0 -78
  721. package/dist/coordination/dependency-graph.d.ts.map +0 -1
  722. package/dist/coordination/dependency-graph.js +0 -387
  723. package/dist/coordination/dependency-graph.js.map +0 -1
  724. package/dist/coordination/manager.d.ts +0 -66
  725. package/dist/coordination/manager.d.ts.map +0 -1
  726. package/dist/coordination/manager.js +0 -354
  727. package/dist/coordination/manager.js.map +0 -1
  728. package/dist/coordination/messaging.d.ts +0 -37
  729. package/dist/coordination/messaging.d.ts.map +0 -1
  730. package/dist/coordination/messaging.js +0 -219
  731. package/dist/coordination/messaging.js.map +0 -1
  732. package/dist/coordination/metrics.d.ts +0 -153
  733. package/dist/coordination/metrics.d.ts.map +0 -1
  734. package/dist/coordination/metrics.js +0 -436
  735. package/dist/coordination/metrics.js.map +0 -1
  736. package/dist/coordination/resources.d.ts +0 -36
  737. package/dist/coordination/resources.d.ts.map +0 -1
  738. package/dist/coordination/resources.js +0 -254
  739. package/dist/coordination/resources.js.map +0 -1
  740. package/dist/coordination/scheduler.d.ts +0 -48
  741. package/dist/coordination/scheduler.d.ts.map +0 -1
  742. package/dist/coordination/scheduler.js +0 -308
  743. package/dist/coordination/scheduler.js.map +0 -1
  744. package/dist/coordination/swarm-coordinator.d.ts +0 -116
  745. package/dist/coordination/swarm-coordinator.d.ts.map +0 -1
  746. package/dist/coordination/swarm-coordinator.js +0 -563
  747. package/dist/coordination/swarm-coordinator.js.map +0 -1
  748. package/dist/coordination/swarm-monitor.d.ts +0 -101
  749. package/dist/coordination/swarm-monitor.d.ts.map +0 -1
  750. package/dist/coordination/swarm-monitor.js +0 -340
  751. package/dist/coordination/swarm-monitor.js.map +0 -1
  752. package/dist/coordination/work-stealing.d.ts +0 -44
  753. package/dist/coordination/work-stealing.d.ts.map +0 -1
  754. package/dist/coordination/work-stealing.js +0 -158
  755. package/dist/coordination/work-stealing.js.map +0 -1
  756. package/dist/core/config.d.ts +0 -243
  757. package/dist/core/config.d.ts.map +0 -1
  758. package/dist/core/config.js +0 -1125
  759. package/dist/core/config.js.map +0 -1
  760. package/dist/core/event-bus.d.ts +0 -63
  761. package/dist/core/event-bus.d.ts.map +0 -1
  762. package/dist/core/event-bus.js +0 -153
  763. package/dist/core/event-bus.js.map +0 -1
  764. package/dist/core/json-persistence.d.ts +0 -55
  765. package/dist/core/json-persistence.d.ts.map +0 -1
  766. package/dist/core/json-persistence.js +0 -111
  767. package/dist/core/json-persistence.js.map +0 -1
  768. package/dist/core/logger.d.ts +0 -62
  769. package/dist/core/logger.d.ts.map +0 -1
  770. package/dist/core/logger.js +0 -252
  771. package/dist/core/logger.js.map +0 -1
  772. package/dist/core/orchestrator-fixed.d.ts +0 -81
  773. package/dist/core/orchestrator-fixed.d.ts.map +0 -1
  774. package/dist/core/orchestrator-fixed.js +0 -213
  775. package/dist/core/orchestrator-fixed.js.map +0 -1
  776. package/dist/core/orchestrator.d.ts +0 -141
  777. package/dist/core/orchestrator.d.ts.map +0 -1
  778. package/dist/core/orchestrator.js +0 -1166
  779. package/dist/core/orchestrator.js.map +0 -1
  780. package/dist/core/version.d.ts +0 -10
  781. package/dist/core/version.d.ts.map +0 -1
  782. package/dist/core/version.js +0 -36
  783. package/dist/core/version.js.map +0 -1
  784. package/dist/enterprise/analytics-manager.d.ts +0 -489
  785. package/dist/enterprise/analytics-manager.d.ts.map +0 -1
  786. package/dist/enterprise/analytics-manager.js +0 -956
  787. package/dist/enterprise/analytics-manager.js.map +0 -1
  788. package/dist/enterprise/audit-manager.d.ts +0 -459
  789. package/dist/enterprise/audit-manager.d.ts.map +0 -1
  790. package/dist/enterprise/audit-manager.js +0 -1014
  791. package/dist/enterprise/audit-manager.js.map +0 -1
  792. package/dist/enterprise/cloud-manager.d.ts +0 -435
  793. package/dist/enterprise/cloud-manager.d.ts.map +0 -1
  794. package/dist/enterprise/cloud-manager.js +0 -789
  795. package/dist/enterprise/cloud-manager.js.map +0 -1
  796. package/dist/enterprise/deployment-manager.d.ts +0 -328
  797. package/dist/enterprise/deployment-manager.d.ts.map +0 -1
  798. package/dist/enterprise/deployment-manager.js +0 -830
  799. package/dist/enterprise/deployment-manager.js.map +0 -1
  800. package/dist/enterprise/project-manager.d.ts +0 -228
  801. package/dist/enterprise/project-manager.d.ts.map +0 -1
  802. package/dist/enterprise/project-manager.js +0 -537
  803. package/dist/enterprise/project-manager.js.map +0 -1
  804. package/dist/enterprise/security-manager.d.ts +0 -422
  805. package/dist/enterprise/security-manager.d.ts.map +0 -1
  806. package/dist/enterprise/security-manager.js +0 -910
  807. package/dist/enterprise/security-manager.js.map +0 -1
  808. package/dist/execution/agent-executor.d.ts +0 -80
  809. package/dist/execution/agent-executor.d.ts.map +0 -1
  810. package/dist/execution/agent-executor.js +0 -220
  811. package/dist/execution/agent-executor.js.map +0 -1
  812. package/dist/execution/provider-manager.d.ts +0 -65
  813. package/dist/execution/provider-manager.d.ts.map +0 -1
  814. package/dist/execution/provider-manager.js +0 -144
  815. package/dist/execution/provider-manager.js.map +0 -1
  816. package/dist/hive-mind/core/Agent.d.ts +0 -137
  817. package/dist/hive-mind/core/Agent.d.ts.map +0 -1
  818. package/dist/hive-mind/core/Agent.js +0 -567
  819. package/dist/hive-mind/core/Agent.js.map +0 -1
  820. package/dist/hive-mind/core/Communication.d.ts +0 -116
  821. package/dist/hive-mind/core/Communication.d.ts.map +0 -1
  822. package/dist/hive-mind/core/Communication.js +0 -407
  823. package/dist/hive-mind/core/Communication.js.map +0 -1
  824. package/dist/hive-mind/core/DatabaseManager.d.ts +0 -99
  825. package/dist/hive-mind/core/DatabaseManager.d.ts.map +0 -1
  826. package/dist/hive-mind/core/DatabaseManager.js +0 -648
  827. package/dist/hive-mind/core/DatabaseManager.js.map +0 -1
  828. package/dist/hive-mind/core/HiveMind.d.ts +0 -90
  829. package/dist/hive-mind/core/HiveMind.d.ts.map +0 -1
  830. package/dist/hive-mind/core/HiveMind.js +0 -455
  831. package/dist/hive-mind/core/HiveMind.js.map +0 -1
  832. package/dist/hive-mind/core/Memory.d.ts +0 -235
  833. package/dist/hive-mind/core/Memory.d.ts.map +0 -1
  834. package/dist/hive-mind/core/Memory.js +0 -1192
  835. package/dist/hive-mind/core/Memory.js.map +0 -1
  836. package/dist/hive-mind/core/Queen.d.ts +0 -115
  837. package/dist/hive-mind/core/Queen.d.ts.map +0 -1
  838. package/dist/hive-mind/core/Queen.js +0 -649
  839. package/dist/hive-mind/core/Queen.js.map +0 -1
  840. package/dist/hive-mind/integration/ConsensusEngine.d.ts +0 -117
  841. package/dist/hive-mind/integration/ConsensusEngine.d.ts.map +0 -1
  842. package/dist/hive-mind/integration/ConsensusEngine.js +0 -478
  843. package/dist/hive-mind/integration/ConsensusEngine.js.map +0 -1
  844. package/dist/hive-mind/integration/MCPToolWrapper.d.ts +0 -172
  845. package/dist/hive-mind/integration/MCPToolWrapper.d.ts.map +0 -1
  846. package/dist/hive-mind/integration/MCPToolWrapper.js +0 -217
  847. package/dist/hive-mind/integration/MCPToolWrapper.js.map +0 -1
  848. package/dist/hive-mind/integration/SwarmOrchestrator.d.ts +0 -172
  849. package/dist/hive-mind/integration/SwarmOrchestrator.d.ts.map +0 -1
  850. package/dist/hive-mind/integration/SwarmOrchestrator.js +0 -748
  851. package/dist/hive-mind/integration/SwarmOrchestrator.js.map +0 -1
  852. package/dist/hive-mind/types.d.ts +0 -314
  853. package/dist/hive-mind/types.d.ts.map +0 -1
  854. package/dist/hive-mind/types.js +0 -7
  855. package/dist/hive-mind/types.js.map +0 -1
  856. package/dist/mcp/auth.d.ts +0 -80
  857. package/dist/mcp/auth.d.ts.map +0 -1
  858. package/dist/mcp/auth.js +0 -350
  859. package/dist/mcp/auth.js.map +0 -1
  860. package/dist/mcp/claude-flow-tools.d.ts +0 -13
  861. package/dist/mcp/claude-flow-tools.d.ts.map +0 -1
  862. package/dist/mcp/claude-flow-tools.js +0 -1398
  863. package/dist/mcp/claude-flow-tools.js.map +0 -1
  864. package/dist/mcp/load-balancer.d.ts +0 -88
  865. package/dist/mcp/load-balancer.d.ts.map +0 -1
  866. package/dist/mcp/load-balancer.js +0 -393
  867. package/dist/mcp/load-balancer.js.map +0 -1
  868. package/dist/mcp/router.d.ts +0 -54
  869. package/dist/mcp/router.d.ts.map +0 -1
  870. package/dist/mcp/router.js +0 -204
  871. package/dist/mcp/router.js.map +0 -1
  872. package/dist/mcp/ruv-swarm-tools.d.ts +0 -58
  873. package/dist/mcp/ruv-swarm-tools.d.ts.map +0 -1
  874. package/dist/mcp/ruv-swarm-tools.js +0 -568
  875. package/dist/mcp/ruv-swarm-tools.js.map +0 -1
  876. package/dist/mcp/server.d.ts +0 -75
  877. package/dist/mcp/server.d.ts.map +0 -1
  878. package/dist/mcp/server.js +0 -538
  879. package/dist/mcp/server.js.map +0 -1
  880. package/dist/mcp/session-manager.d.ts +0 -60
  881. package/dist/mcp/session-manager.d.ts.map +0 -1
  882. package/dist/mcp/session-manager.js +0 -323
  883. package/dist/mcp/session-manager.js.map +0 -1
  884. package/dist/mcp/swarm-tools.d.ts +0 -87
  885. package/dist/mcp/swarm-tools.d.ts.map +0 -1
  886. package/dist/mcp/swarm-tools.js +0 -731
  887. package/dist/mcp/swarm-tools.js.map +0 -1
  888. package/dist/mcp/tools.d.ts +0 -145
  889. package/dist/mcp/tools.d.ts.map +0 -1
  890. package/dist/mcp/tools.js +0 -434
  891. package/dist/mcp/tools.js.map +0 -1
  892. package/dist/mcp/transports/base.d.ts +0 -22
  893. package/dist/mcp/transports/base.d.ts.map +0 -1
  894. package/dist/mcp/transports/base.js +0 -5
  895. package/dist/mcp/transports/base.js.map +0 -1
  896. package/dist/mcp/transports/http.d.ts +0 -48
  897. package/dist/mcp/transports/http.d.ts.map +0 -1
  898. package/dist/mcp/transports/http.js +0 -400
  899. package/dist/mcp/transports/http.js.map +0 -1
  900. package/dist/mcp/transports/stdio.d.ts +0 -37
  901. package/dist/mcp/transports/stdio.d.ts.map +0 -1
  902. package/dist/mcp/transports/stdio.js +0 -206
  903. package/dist/mcp/transports/stdio.js.map +0 -1
  904. package/dist/memory/advanced-serializer.d.ts +0 -159
  905. package/dist/memory/advanced-serializer.d.ts.map +0 -1
  906. package/dist/memory/advanced-serializer.js +0 -564
  907. package/dist/memory/advanced-serializer.js.map +0 -1
  908. package/dist/memory/backends/base.d.ts +0 -21
  909. package/dist/memory/backends/base.d.ts.map +0 -1
  910. package/dist/memory/backends/base.js +0 -5
  911. package/dist/memory/backends/base.js.map +0 -1
  912. package/dist/memory/backends/markdown.d.ts +0 -35
  913. package/dist/memory/backends/markdown.d.ts.map +0 -1
  914. package/dist/memory/backends/markdown.js +0 -223
  915. package/dist/memory/backends/markdown.js.map +0 -1
  916. package/dist/memory/backends/sqlite.d.ts +0 -33
  917. package/dist/memory/backends/sqlite.d.ts.map +0 -1
  918. package/dist/memory/backends/sqlite.js +0 -291
  919. package/dist/memory/backends/sqlite.js.map +0 -1
  920. package/dist/memory/cache.d.ts +0 -65
  921. package/dist/memory/cache.d.ts.map +0 -1
  922. package/dist/memory/cache.js +0 -188
  923. package/dist/memory/cache.js.map +0 -1
  924. package/dist/memory/distributed-memory.d.ts +0 -188
  925. package/dist/memory/distributed-memory.d.ts.map +0 -1
  926. package/dist/memory/distributed-memory.js +0 -710
  927. package/dist/memory/distributed-memory.js.map +0 -1
  928. package/dist/memory/enhanced-session-serializer.d.ts +0 -115
  929. package/dist/memory/enhanced-session-serializer.d.ts.map +0 -1
  930. package/dist/memory/enhanced-session-serializer.js +0 -478
  931. package/dist/memory/enhanced-session-serializer.js.map +0 -1
  932. package/dist/memory/fallback-store.d.ts +0 -28
  933. package/dist/memory/fallback-store.d.ts.map +0 -1
  934. package/dist/memory/fallback-store.js +0 -101
  935. package/dist/memory/fallback-store.js.map +0 -1
  936. package/dist/memory/in-memory-store.d.ts +0 -37
  937. package/dist/memory/in-memory-store.d.ts.map +0 -1
  938. package/dist/memory/in-memory-store.js +0 -174
  939. package/dist/memory/in-memory-store.js.map +0 -1
  940. package/dist/memory/indexer.d.ts +0 -52
  941. package/dist/memory/indexer.d.ts.map +0 -1
  942. package/dist/memory/indexer.js +0 -191
  943. package/dist/memory/indexer.js.map +0 -1
  944. package/dist/memory/manager.d.ts +0 -58
  945. package/dist/memory/manager.d.ts.map +0 -1
  946. package/dist/memory/manager.js +0 -423
  947. package/dist/memory/manager.js.map +0 -1
  948. package/dist/memory/sqlite-store.d.ts +0 -34
  949. package/dist/memory/sqlite-store.d.ts.map +0 -1
  950. package/dist/memory/sqlite-store.js +0 -268
  951. package/dist/memory/sqlite-store.js.map +0 -1
  952. package/dist/memory/sqlite-wrapper.d.ts +0 -38
  953. package/dist/memory/sqlite-wrapper.d.ts.map +0 -1
  954. package/dist/memory/sqlite-wrapper.js +0 -152
  955. package/dist/memory/sqlite-wrapper.js.map +0 -1
  956. package/dist/memory/swarm-memory.d.ts +0 -91
  957. package/dist/memory/swarm-memory.d.ts.map +0 -1
  958. package/dist/memory/swarm-memory.js +0 -454
  959. package/dist/memory/swarm-memory.js.map +0 -1
  960. package/dist/memory/unified-memory-manager.d.ts +0 -116
  961. package/dist/memory/unified-memory-manager.d.ts.map +0 -1
  962. package/dist/memory/unified-memory-manager.js +0 -397
  963. package/dist/memory/unified-memory-manager.js.map +0 -1
  964. package/dist/migration/logger.d.ts +0 -26
  965. package/dist/migration/logger.d.ts.map +0 -1
  966. package/dist/migration/logger.js +0 -145
  967. package/dist/migration/logger.js.map +0 -1
  968. package/dist/migration/migration-analyzer.d.ts +0 -18
  969. package/dist/migration/migration-analyzer.d.ts.map +0 -1
  970. package/dist/migration/migration-analyzer.js +0 -284
  971. package/dist/migration/migration-analyzer.js.map +0 -1
  972. package/dist/migration/migration-runner.d.ts +0 -26
  973. package/dist/migration/migration-runner.d.ts.map +0 -1
  974. package/dist/migration/migration-runner.js +0 -505
  975. package/dist/migration/migration-runner.js.map +0 -1
  976. package/dist/migration/migration-validator.d.ts +0 -17
  977. package/dist/migration/migration-validator.d.ts.map +0 -1
  978. package/dist/migration/migration-validator.js +0 -309
  979. package/dist/migration/migration-validator.js.map +0 -1
  980. package/dist/migration/progress-reporter.d.ts +0 -28
  981. package/dist/migration/progress-reporter.d.ts.map +0 -1
  982. package/dist/migration/progress-reporter.js +0 -163
  983. package/dist/migration/progress-reporter.js.map +0 -1
  984. package/dist/migration/rollback-manager.d.ts +0 -24
  985. package/dist/migration/rollback-manager.d.ts.map +0 -1
  986. package/dist/migration/rollback-manager.js +0 -351
  987. package/dist/migration/rollback-manager.js.map +0 -1
  988. package/dist/migration/types.d.ts +0 -103
  989. package/dist/migration/types.d.ts.map +0 -1
  990. package/dist/migration/types.js +0 -6
  991. package/dist/migration/types.js.map +0 -1
  992. package/dist/reasoningbank/reasoningbank-adapter.d.ts +0 -93
  993. package/dist/reasoningbank/reasoningbank-adapter.d.ts.map +0 -1
  994. package/dist/reasoningbank/reasoningbank-adapter.js +0 -365
  995. package/dist/reasoningbank/reasoningbank-adapter.js.map +0 -1
  996. package/dist/sdk/query-control.d.ts +0 -131
  997. package/dist/sdk/query-control.d.ts.map +0 -1
  998. package/dist/sdk/query-control.js +0 -363
  999. package/dist/sdk/query-control.js.map +0 -1
  1000. package/dist/sdk/session-forking.d.ts +0 -109
  1001. package/dist/sdk/session-forking.d.ts.map +0 -1
  1002. package/dist/sdk/session-forking.js +0 -275
  1003. package/dist/sdk/session-forking.js.map +0 -1
  1004. package/dist/swarm/types.d.ts +0 -578
  1005. package/dist/swarm/types.d.ts.map +0 -1
  1006. package/dist/swarm/types.js +0 -54
  1007. package/dist/swarm/types.js.map +0 -1
  1008. package/dist/terminal/adapters/base.d.ts +0 -40
  1009. package/dist/terminal/adapters/base.d.ts.map +0 -1
  1010. package/dist/terminal/adapters/base.js +0 -5
  1011. package/dist/terminal/adapters/base.js.map +0 -1
  1012. package/dist/terminal/adapters/native.d.ts +0 -19
  1013. package/dist/terminal/adapters/native.d.ts.map +0 -1
  1014. package/dist/terminal/adapters/native.js +0 -414
  1015. package/dist/terminal/adapters/native.js.map +0 -1
  1016. package/dist/terminal/adapters/vscode.d.ts +0 -23
  1017. package/dist/terminal/adapters/vscode.d.ts.map +0 -1
  1018. package/dist/terminal/adapters/vscode.js +0 -267
  1019. package/dist/terminal/adapters/vscode.js.map +0 -1
  1020. package/dist/terminal/manager.d.ts +0 -59
  1021. package/dist/terminal/manager.d.ts.map +0 -1
  1022. package/dist/terminal/manager.js +0 -235
  1023. package/dist/terminal/manager.js.map +0 -1
  1024. package/dist/terminal/pool.d.ts +0 -32
  1025. package/dist/terminal/pool.d.ts.map +0 -1
  1026. package/dist/terminal/pool.js +0 -208
  1027. package/dist/terminal/pool.js.map +0 -1
  1028. package/dist/terminal/session.d.ts +0 -41
  1029. package/dist/terminal/session.d.ts.map +0 -1
  1030. package/dist/terminal/session.js +0 -210
  1031. package/dist/terminal/session.js.map +0 -1
  1032. package/dist/utils/error-handler.d.ts +0 -14
  1033. package/dist/utils/error-handler.d.ts.map +0 -1
  1034. package/dist/utils/error-handler.js +0 -29
  1035. package/dist/utils/error-handler.js.map +0 -1
  1036. package/dist/utils/errors.d.ts +0 -121
  1037. package/dist/utils/errors.d.ts.map +0 -1
  1038. package/dist/utils/errors.js +0 -194
  1039. package/dist/utils/errors.js.map +0 -1
  1040. package/dist/utils/formatters.d.ts +0 -15
  1041. package/dist/utils/formatters.d.ts.map +0 -1
  1042. package/dist/utils/formatters.js +0 -75
  1043. package/dist/utils/formatters.js.map +0 -1
  1044. package/dist/utils/helpers.d.ts +0 -134
  1045. package/dist/utils/helpers.d.ts.map +0 -1
  1046. package/dist/utils/helpers.js +0 -444
  1047. package/dist/utils/helpers.js.map +0 -1
  1048. package/dist/utils/key-redactor.d.ts +0 -46
  1049. package/dist/utils/key-redactor.d.ts.map +0 -1
  1050. package/dist/utils/key-redactor.js +0 -153
  1051. package/dist/utils/key-redactor.js.map +0 -1
  1052. package/dist/utils/metrics-reader.d.ts +0 -67
  1053. package/dist/utils/metrics-reader.d.ts.map +0 -1
  1054. package/dist/utils/metrics-reader.js +0 -201
  1055. package/dist/utils/metrics-reader.js.map +0 -1
  1056. package/dist/utils/npx-isolated-cache.d.ts +0 -17
  1057. package/dist/utils/npx-isolated-cache.d.ts.map +0 -1
  1058. package/dist/utils/npx-isolated-cache.js +0 -140
  1059. package/dist/utils/npx-isolated-cache.js.map +0 -1
  1060. package/dist/utils/project-root.d.ts +0 -35
  1061. package/dist/utils/project-root.d.ts.map +0 -1
  1062. package/dist/utils/project-root.js +0 -115
  1063. package/dist/utils/project-root.js.map +0 -1
  1064. package/dist/utils/type-guards.d.ts +0 -117
  1065. package/dist/utils/type-guards.d.ts.map +0 -1
  1066. package/dist/utils/type-guards.js +0 -166
  1067. package/dist/utils/type-guards.js.map +0 -1
  1068. package/dist/utils/types.d.ts +0 -568
  1069. package/dist/utils/types.d.ts.map +0 -1
  1070. package/dist/utils/types.js +0 -37
  1071. package/dist/utils/types.js.map +0 -1
@@ -1,2304 +0,0 @@
1
- // enhanced-templates.js - Generate Claude Flow v2.0.0 enhanced templates
2
- import { readFileSync } from 'fs';
3
- import { dirname, join } from 'path';
4
- import { fileURLToPath } from 'url';
5
- const __dirname = dirname(fileURLToPath(import.meta.url));
6
- // Load template files
7
- const loadTemplate = (filename) => {
8
- try {
9
- return readFileSync(join(__dirname, filename), 'utf8');
10
- }
11
- catch (error) {
12
- // Silently fall back to hardcoded templates if files not found
13
- // This handles npm packaging scenarios where template files may not be included
14
- return null;
15
- }
16
- };
17
- export function createEnhancedClaudeMd() {
18
- const template = loadTemplate('CLAUDE.md');
19
- if (!template) {
20
- // Fallback to hardcoded if template file not found
21
- return createEnhancedClaudeMdFallback();
22
- }
23
- return template;
24
- }
25
- export function createEnhancedSettingsJson() {
26
- const template = loadTemplate('settings.json');
27
- if (!template) {
28
- return createEnhancedSettingsJsonFallback();
29
- }
30
- return template;
31
- }
32
- export function createWrapperScript(type = 'unix') {
33
- // For unix, use the universal wrapper that works in both CommonJS and ES modules
34
- if (type === 'unix') {
35
- const universalTemplate = loadTemplate('claude-flow-universal');
36
- if (universalTemplate) {
37
- return universalTemplate;
38
- }
39
- }
40
- const filename = type === 'unix' ? 'claude-flow' : type === 'windows' ? 'claude-flow.bat' : 'claude-flow.ps1';
41
- const template = loadTemplate(filename);
42
- if (!template) {
43
- return createWrapperScriptFallback(type);
44
- }
45
- return template;
46
- }
47
- export function createCommandDoc(category, command) {
48
- const template = loadTemplate(`commands/${category}/${command}.md`);
49
- if (!template) {
50
- // Silently fall back to generated documentation
51
- return createCommandDocFallback(category, command);
52
- }
53
- return template;
54
- }
55
- // Generate command documentation fallbacks
56
- function createCommandDocFallback(category, command) {
57
- const docs = {
58
- analysis: {
59
- 'bottleneck-detect': `# bottleneck-detect
60
-
61
- Automatically detect performance bottlenecks in your swarm operations.
62
-
63
- ## Usage
64
- \`\`\`bash
65
- npx claude-flow analysis bottleneck-detect [options]
66
- \`\`\`
67
-
68
- ## Options
69
- - \`--swarm-id <id>\` - Target specific swarm
70
- - \`--threshold <ms>\` - Performance threshold (default: 1000ms)
71
- - \`--export <file>\` - Export results to file
72
-
73
- ## Examples
74
- \`\`\`bash
75
- # Detect bottlenecks in current swarm
76
- npx claude-flow analysis bottleneck-detect
77
-
78
- # Set custom threshold
79
- npx claude-flow analysis bottleneck-detect --threshold 500
80
-
81
- # Export results
82
- npx claude-flow analysis bottleneck-detect --export bottlenecks.json
83
- \`\`\`
84
- `,
85
- 'token-usage': `# token-usage
86
-
87
- Analyze token usage patterns and optimize for efficiency.
88
-
89
- ## Usage
90
- \`\`\`bash
91
- npx claude-flow analysis token-usage [options]
92
- \`\`\`
93
-
94
- ## Options
95
- - \`--period <time>\` - Analysis period (1h, 24h, 7d, 30d)
96
- - \`--by-agent\` - Break down by agent
97
- - \`--by-operation\` - Break down by operation type
98
-
99
- ## Examples
100
- \`\`\`bash
101
- # Last 24 hours token usage
102
- npx claude-flow analysis token-usage --period 24h
103
-
104
- # By agent breakdown
105
- npx claude-flow analysis token-usage --by-agent
106
-
107
- # Export detailed report
108
- npx claude-flow analysis token-usage --period 7d --export tokens.csv
109
- \`\`\`
110
- `,
111
- 'performance-report': `# performance-report
112
-
113
- Generate comprehensive performance reports for swarm operations.
114
-
115
- ## Usage
116
- \`\`\`bash
117
- npx claude-flow analysis performance-report [options]
118
- \`\`\`
119
-
120
- ## Options
121
- - \`--format <type>\` - Report format (json, html, markdown)
122
- - \`--include-metrics\` - Include detailed metrics
123
- - \`--compare <id>\` - Compare with previous swarm
124
-
125
- ## Examples
126
- \`\`\`bash
127
- # Generate HTML report
128
- npx claude-flow analysis performance-report --format html
129
-
130
- # Compare swarms
131
- npx claude-flow analysis performance-report --compare swarm-123
132
-
133
- # Full metrics report
134
- npx claude-flow analysis performance-report --include-metrics --format markdown
135
- \`\`\`
136
- `,
137
- },
138
- automation: {
139
- 'auto-agent': `# auto-agent
140
-
141
- Automatically assign agents based on task analysis.
142
-
143
- ## Usage
144
- \`\`\`bash
145
- npx claude-flow automation auto-agent [options]
146
- \`\`\`
147
-
148
- ## Options
149
- - \`--task <description>\` - Task to analyze
150
- - \`--max-agents <n>\` - Maximum agents to spawn
151
- - \`--strategy <type>\` - Assignment strategy
152
-
153
- ## Examples
154
- \`\`\`bash
155
- # Auto-assign for task
156
- npx claude-flow automation auto-agent --task "Build REST API"
157
-
158
- # Limit agents
159
- npx claude-flow automation auto-agent --task "Fix bugs" --max-agents 3
160
-
161
- # Use specific strategy
162
- npx claude-flow automation auto-agent --strategy specialized
163
- \`\`\`
164
- `,
165
- 'smart-spawn': `# smart-spawn
166
-
167
- Intelligently spawn agents based on workload analysis.
168
-
169
- ## Usage
170
- \`\`\`bash
171
- npx claude-flow automation smart-spawn [options]
172
- \`\`\`
173
-
174
- ## Options
175
- - \`--analyze\` - Analyze before spawning
176
- - \`--threshold <n>\` - Spawn threshold
177
- - \`--topology <type>\` - Preferred topology
178
-
179
- ## Examples
180
- \`\`\`bash
181
- # Smart spawn with analysis
182
- npx claude-flow automation smart-spawn --analyze
183
-
184
- # Set spawn threshold
185
- npx claude-flow automation smart-spawn --threshold 5
186
-
187
- # Force topology
188
- npx claude-flow automation smart-spawn --topology hierarchical
189
- \`\`\`
190
- `,
191
- 'workflow-select': `# workflow-select
192
-
193
- Automatically select optimal workflow based on task type.
194
-
195
- ## Usage
196
- \`\`\`bash
197
- npx claude-flow automation workflow-select [options]
198
- \`\`\`
199
-
200
- ## Options
201
- - \`--task <description>\` - Task description
202
- - \`--constraints <list>\` - Workflow constraints
203
- - \`--preview\` - Preview without executing
204
-
205
- ## Examples
206
- \`\`\`bash
207
- # Select workflow for task
208
- npx claude-flow automation workflow-select --task "Deploy to production"
209
-
210
- # With constraints
211
- npx claude-flow automation workflow-select --constraints "no-downtime,rollback"
212
-
213
- # Preview mode
214
- npx claude-flow automation workflow-select --task "Database migration" --preview
215
- \`\`\`
216
- `,
217
- },
218
- coordination: {
219
- 'swarm-init': `# swarm-init
220
-
221
- Initialize a new agent swarm with specified topology.
222
-
223
- ## Usage
224
- \`\`\`bash
225
- npx claude-flow swarm init [options]
226
- \`\`\`
227
-
228
- ## Options
229
- - \`--topology <type>\` - Swarm topology (mesh, hierarchical, ring, star)
230
- - \`--max-agents <n>\` - Maximum number of agents
231
- - \`--strategy <type>\` - Execution strategy (parallel, sequential, adaptive)
232
-
233
- ## Examples
234
- \`\`\`bash
235
- # Initialize hierarchical swarm
236
- npx claude-flow swarm init --topology hierarchical
237
-
238
- # With agent limit
239
- npx claude-flow swarm init --topology mesh --max-agents 8
240
-
241
- # Parallel execution
242
- npx claude-flow swarm init --strategy parallel
243
- \`\`\`
244
- `,
245
- 'agent-spawn': `# agent-spawn
246
-
247
- Spawn a new agent in the current swarm.
248
-
249
- ## Usage
250
- \`\`\`bash
251
- npx claude-flow agent spawn [options]
252
- \`\`\`
253
-
254
- ## Options
255
- - \`--type <type>\` - Agent type (coder, researcher, analyst, tester, coordinator)
256
- - \`--name <name>\` - Custom agent name
257
- - \`--skills <list>\` - Specific skills (comma-separated)
258
-
259
- ## Examples
260
- \`\`\`bash
261
- # Spawn coder agent
262
- npx claude-flow agent spawn --type coder
263
-
264
- # With custom name
265
- npx claude-flow agent spawn --type researcher --name "API Expert"
266
-
267
- # With specific skills
268
- npx claude-flow agent spawn --type coder --skills "python,fastapi,testing"
269
- \`\`\`
270
- `,
271
- 'task-orchestrate': `# task-orchestrate
272
-
273
- Orchestrate complex tasks across the swarm.
274
-
275
- ## Usage
276
- \`\`\`bash
277
- npx claude-flow task orchestrate [options]
278
- \`\`\`
279
-
280
- ## Options
281
- - \`--task <description>\` - Task description
282
- - \`--strategy <type>\` - Orchestration strategy
283
- - \`--priority <level>\` - Task priority (low, medium, high, critical)
284
-
285
- ## Examples
286
- \`\`\`bash
287
- # Orchestrate development task
288
- npx claude-flow task orchestrate --task "Implement user authentication"
289
-
290
- # High priority task
291
- npx claude-flow task orchestrate --task "Fix production bug" --priority critical
292
-
293
- # With specific strategy
294
- npx claude-flow task orchestrate --task "Refactor codebase" --strategy parallel
295
- \`\`\`
296
- `,
297
- },
298
- github: {
299
- 'github-swarm': `# github-swarm
300
-
301
- Create a specialized swarm for GitHub repository management.
302
-
303
- ## Usage
304
- \`\`\`bash
305
- npx claude-flow github swarm [options]
306
- \`\`\`
307
-
308
- ## Options
309
- - \`--repository <owner/repo>\` - Target repository
310
- - \`--agents <n>\` - Number of specialized agents
311
- - \`--focus <area>\` - Focus area (maintenance, features, security)
312
-
313
- ## Examples
314
- \`\`\`bash
315
- # Create GitHub swarm
316
- npx claude-flow github swarm --repository myorg/myrepo
317
-
318
- # With specific focus
319
- npx claude-flow github swarm --repository myorg/myrepo --focus security
320
-
321
- # Custom agent count
322
- npx claude-flow github swarm --repository myorg/myrepo --agents 6
323
- \`\`\`
324
- `,
325
- 'repo-analyze': `# repo-analyze
326
-
327
- Deep analysis of GitHub repository with AI insights.
328
-
329
- ## Usage
330
- \`\`\`bash
331
- npx claude-flow github repo-analyze [options]
332
- \`\`\`
333
-
334
- ## Options
335
- - \`--repository <owner/repo>\` - Repository to analyze
336
- - \`--deep\` - Enable deep analysis
337
- - \`--include <areas>\` - Include specific areas (issues, prs, code, commits)
338
-
339
- ## Examples
340
- \`\`\`bash
341
- # Basic analysis
342
- npx claude-flow github repo-analyze --repository myorg/myrepo
343
-
344
- # Deep analysis
345
- npx claude-flow github repo-analyze --repository myorg/myrepo --deep
346
-
347
- # Specific areas
348
- npx claude-flow github repo-analyze --repository myorg/myrepo --include issues,prs
349
- \`\`\`
350
- `,
351
- 'pr-enhance': `# pr-enhance
352
-
353
- AI-powered pull request enhancements.
354
-
355
- ## Usage
356
- \`\`\`bash
357
- npx claude-flow github pr-enhance [options]
358
- \`\`\`
359
-
360
- ## Options
361
- - \`--pr-number <n>\` - Pull request number
362
- - \`--add-tests\` - Add missing tests
363
- - \`--improve-docs\` - Improve documentation
364
- - \`--check-security\` - Security review
365
-
366
- ## Examples
367
- \`\`\`bash
368
- # Enhance PR
369
- npx claude-flow github pr-enhance --pr-number 123
370
-
371
- # Add tests
372
- npx claude-flow github pr-enhance --pr-number 123 --add-tests
373
-
374
- # Full enhancement
375
- npx claude-flow github pr-enhance --pr-number 123 --add-tests --improve-docs
376
- \`\`\`
377
- `,
378
- 'issue-triage': `# issue-triage
379
-
380
- Intelligent issue classification and triage.
381
-
382
- ## Usage
383
- \`\`\`bash
384
- npx claude-flow github issue-triage [options]
385
- \`\`\`
386
-
387
- ## Options
388
- - \`--repository <owner/repo>\` - Target repository
389
- - \`--auto-label\` - Automatically apply labels
390
- - \`--assign\` - Auto-assign to team members
391
-
392
- ## Examples
393
- \`\`\`bash
394
- # Triage issues
395
- npx claude-flow github issue-triage --repository myorg/myrepo
396
-
397
- # With auto-labeling
398
- npx claude-flow github issue-triage --repository myorg/myrepo --auto-label
399
-
400
- # Full automation
401
- npx claude-flow github issue-triage --repository myorg/myrepo --auto-label --assign
402
- \`\`\`
403
- `,
404
- 'code-review': `# code-review
405
-
406
- Automated code review with swarm intelligence.
407
-
408
- ## Usage
409
- \`\`\`bash
410
- npx claude-flow github code-review [options]
411
- \`\`\`
412
-
413
- ## Options
414
- - \`--pr-number <n>\` - Pull request to review
415
- - \`--focus <areas>\` - Review focus (security, performance, style)
416
- - \`--suggest-fixes\` - Suggest code fixes
417
-
418
- ## Examples
419
- \`\`\`bash
420
- # Review PR
421
- npx claude-flow github code-review --pr-number 456
422
-
423
- # Security focus
424
- npx claude-flow github code-review --pr-number 456 --focus security
425
-
426
- # With fix suggestions
427
- npx claude-flow github code-review --pr-number 456 --suggest-fixes
428
- \`\`\`
429
- `,
430
- },
431
- hooks: {
432
- 'pre-task': `# pre-task
433
-
434
- Hook executed before task execution.
435
-
436
- ## Usage
437
- \`\`\`bash
438
- npx claude-flow hook pre-task [options]
439
- \`\`\`
440
-
441
- ## Options
442
- - \`--description <text>\` - Task description
443
- - \`--auto-spawn-agents\` - Automatically spawn required agents
444
- - \`--load-context\` - Load previous context
445
-
446
- ## Examples
447
- \`\`\`bash
448
- # Basic pre-task hook
449
- npx claude-flow hook pre-task --description "Building API endpoints"
450
-
451
- # With auto-spawn
452
- npx claude-flow hook pre-task --description "Complex refactoring" --auto-spawn-agents
453
-
454
- # Load context
455
- npx claude-flow hook pre-task --description "Continue feature" --load-context
456
- \`\`\`
457
- `,
458
- 'post-task': `# post-task
459
-
460
- Hook executed after task completion.
461
-
462
- ## Usage
463
- \`\`\`bash
464
- npx claude-flow hook post-task [options]
465
- \`\`\`
466
-
467
- ## Options
468
- - \`--task-id <id>\` - Task identifier
469
- - \`--analyze-performance\` - Analyze task performance
470
- - \`--update-memory\` - Update swarm memory
471
-
472
- ## Examples
473
- \`\`\`bash
474
- # Basic post-task
475
- npx claude-flow hook post-task --task-id task-123
476
-
477
- # With performance analysis
478
- npx claude-flow hook post-task --task-id task-123 --analyze-performance
479
-
480
- # Update memory
481
- npx claude-flow hook post-task --task-id task-123 --update-memory
482
- \`\`\`
483
- `,
484
- 'pre-edit': `# pre-edit
485
-
486
- Hook executed before file edits.
487
-
488
- ## Usage
489
- \`\`\`bash
490
- npx claude-flow hook pre-edit [options]
491
- \`\`\`
492
-
493
- ## Options
494
- - \`--file <path>\` - File to be edited
495
- - \`--validate-syntax\` - Validate syntax before edit
496
- - \`--backup\` - Create backup
497
-
498
- ## Examples
499
- \`\`\`bash
500
- # Pre-edit hook
501
- npx claude-flow hook pre-edit --file src/api.js
502
-
503
- # With validation
504
- npx claude-flow hook pre-edit --file src/api.js --validate-syntax
505
-
506
- # Create backup
507
- npx claude-flow hook pre-edit --file src/api.js --backup
508
- \`\`\`
509
- `,
510
- 'post-edit': `# post-edit
511
-
512
- Hook executed after file edits.
513
-
514
- ## Usage
515
- \`\`\`bash
516
- npx claude-flow hook post-edit [options]
517
- \`\`\`
518
-
519
- ## Options
520
- - \`--file <path>\` - Edited file
521
- - \`--memory-key <key>\` - Memory storage key
522
- - \`--format\` - Auto-format code
523
-
524
- ## Examples
525
- \`\`\`bash
526
- # Post-edit hook
527
- npx claude-flow hook post-edit --file src/api.js
528
-
529
- # Store in memory
530
- npx claude-flow hook post-edit --file src/api.js --memory-key "api-changes"
531
-
532
- # With formatting
533
- npx claude-flow hook post-edit --file src/api.js --format
534
- \`\`\`
535
- `,
536
- 'session-end': `# session-end
537
-
538
- Hook executed at session end.
539
-
540
- ## Usage
541
- \`\`\`bash
542
- npx claude-flow hook session-end [options]
543
- \`\`\`
544
-
545
- ## Options
546
- - \`--export-metrics\` - Export session metrics
547
- - \`--generate-summary\` - Generate session summary
548
- - \`--persist-state\` - Save session state
549
-
550
- ## Examples
551
- \`\`\`bash
552
- # End session
553
- npx claude-flow hook session-end
554
-
555
- # Export metrics
556
- npx claude-flow hook session-end --export-metrics
557
-
558
- # Full closure
559
- npx claude-flow hook session-end --export-metrics --generate-summary --persist-state
560
- \`\`\`
561
- `,
562
- },
563
- memory: {
564
- 'memory-usage': `# memory-usage
565
-
566
- Manage persistent memory storage.
567
-
568
- ## Usage
569
- \`\`\`bash
570
- npx claude-flow memory usage [options]
571
- \`\`\`
572
-
573
- ## Options
574
- - \`--action <type>\` - Action (store, retrieve, list, clear)
575
- - \`--key <key>\` - Memory key
576
- - \`--value <data>\` - Data to store (JSON)
577
-
578
- ## Examples
579
- \`\`\`bash
580
- # Store memory
581
- npx claude-flow memory usage --action store --key "project-config" --value '{"api": "v2"}'
582
-
583
- # Retrieve memory
584
- npx claude-flow memory usage --action retrieve --key "project-config"
585
-
586
- # List all keys
587
- npx claude-flow memory usage --action list
588
- \`\`\`
589
- `,
590
- 'memory-persist': `# memory-persist
591
-
592
- Persist memory across sessions.
593
-
594
- ## Usage
595
- \`\`\`bash
596
- npx claude-flow memory persist [options]
597
- \`\`\`
598
-
599
- ## Options
600
- - \`--export <file>\` - Export to file
601
- - \`--import <file>\` - Import from file
602
- - \`--compress\` - Compress memory data
603
-
604
- ## Examples
605
- \`\`\`bash
606
- # Export memory
607
- npx claude-flow memory persist --export memory-backup.json
608
-
609
- # Import memory
610
- npx claude-flow memory persist --import memory-backup.json
611
-
612
- # Compressed export
613
- npx claude-flow memory persist --export memory.gz --compress
614
- \`\`\`
615
- `,
616
- 'memory-search': `# memory-search
617
-
618
- Search through stored memory.
619
-
620
- ## Usage
621
- \`\`\`bash
622
- npx claude-flow memory search [options]
623
- \`\`\`
624
-
625
- ## Options
626
- - \`--query <text>\` - Search query
627
- - \`--pattern <regex>\` - Pattern matching
628
- - \`--limit <n>\` - Result limit
629
-
630
- ## Examples
631
- \`\`\`bash
632
- # Search memory
633
- npx claude-flow memory search --query "authentication"
634
-
635
- # Pattern search
636
- npx claude-flow memory search --pattern "api-.*"
637
-
638
- # Limited results
639
- npx claude-flow memory search --query "config" --limit 10
640
- \`\`\`
641
- `,
642
- },
643
- monitoring: {
644
- 'swarm-monitor': `# swarm-monitor
645
-
646
- Real-time swarm monitoring.
647
-
648
- ## Usage
649
- \`\`\`bash
650
- npx claude-flow swarm monitor [options]
651
- \`\`\`
652
-
653
- ## Options
654
- - \`--interval <ms>\` - Update interval
655
- - \`--metrics\` - Show detailed metrics
656
- - \`--export\` - Export monitoring data
657
-
658
- ## Examples
659
- \`\`\`bash
660
- # Start monitoring
661
- npx claude-flow swarm monitor
662
-
663
- # Custom interval
664
- npx claude-flow swarm monitor --interval 5000
665
-
666
- # With metrics
667
- npx claude-flow swarm monitor --metrics
668
- \`\`\`
669
- `,
670
- 'agent-metrics': `# agent-metrics
671
-
672
- View agent performance metrics.
673
-
674
- ## Usage
675
- \`\`\`bash
676
- npx claude-flow agent metrics [options]
677
- \`\`\`
678
-
679
- ## Options
680
- - \`--agent-id <id>\` - Specific agent
681
- - \`--period <time>\` - Time period
682
- - \`--format <type>\` - Output format
683
-
684
- ## Examples
685
- \`\`\`bash
686
- # All agents metrics
687
- npx claude-flow agent metrics
688
-
689
- # Specific agent
690
- npx claude-flow agent metrics --agent-id agent-001
691
-
692
- # Last hour
693
- npx claude-flow agent metrics --period 1h
694
- \`\`\`
695
- `,
696
- 'real-time-view': `# real-time-view
697
-
698
- Real-time view of swarm activity.
699
-
700
- ## Usage
701
- \`\`\`bash
702
- npx claude-flow monitoring real-time-view [options]
703
- \`\`\`
704
-
705
- ## Options
706
- - \`--filter <type>\` - Filter view
707
- - \`--highlight <pattern>\` - Highlight pattern
708
- - \`--tail <n>\` - Show last N events
709
-
710
- ## Examples
711
- \`\`\`bash
712
- # Start real-time view
713
- npx claude-flow monitoring real-time-view
714
-
715
- # Filter errors
716
- npx claude-flow monitoring real-time-view --filter errors
717
-
718
- # Highlight pattern
719
- npx claude-flow monitoring real-time-view --highlight "API"
720
- \`\`\`
721
- `,
722
- },
723
- optimization: {
724
- 'topology-optimize': `# topology-optimize
725
-
726
- Optimize swarm topology for current workload.
727
-
728
- ## Usage
729
- \`\`\`bash
730
- npx claude-flow optimization topology-optimize [options]
731
- \`\`\`
732
-
733
- ## Options
734
- - \`--analyze-first\` - Analyze before optimizing
735
- - \`--target <metric>\` - Optimization target
736
- - \`--apply\` - Apply optimizations
737
-
738
- ## Examples
739
- \`\`\`bash
740
- # Analyze and suggest
741
- npx claude-flow optimization topology-optimize --analyze-first
742
-
743
- # Optimize for speed
744
- npx claude-flow optimization topology-optimize --target speed
745
-
746
- # Apply changes
747
- npx claude-flow optimization topology-optimize --target efficiency --apply
748
- \`\`\`
749
- `,
750
- 'parallel-execute': `# parallel-execute
751
-
752
- Execute tasks in parallel for maximum efficiency.
753
-
754
- ## Usage
755
- \`\`\`bash
756
- npx claude-flow optimization parallel-execute [options]
757
- \`\`\`
758
-
759
- ## Options
760
- - \`--tasks <file>\` - Task list file
761
- - \`--max-parallel <n>\` - Maximum parallel tasks
762
- - \`--strategy <type>\` - Execution strategy
763
-
764
- ## Examples
765
- \`\`\`bash
766
- # Execute task list
767
- npx claude-flow optimization parallel-execute --tasks tasks.json
768
-
769
- # Limit parallelism
770
- npx claude-flow optimization parallel-execute --tasks tasks.json --max-parallel 5
771
-
772
- # Custom strategy
773
- npx claude-flow optimization parallel-execute --strategy adaptive
774
- \`\`\`
775
- `,
776
- 'cache-manage': `# cache-manage
777
-
778
- Manage operation cache for performance.
779
-
780
- ## Usage
781
- \`\`\`bash
782
- npx claude-flow optimization cache-manage [options]
783
- \`\`\`
784
-
785
- ## Options
786
- - \`--action <type>\` - Action (view, clear, optimize)
787
- - \`--max-size <mb>\` - Maximum cache size
788
- - \`--ttl <seconds>\` - Time to live
789
-
790
- ## Examples
791
- \`\`\`bash
792
- # View cache stats
793
- npx claude-flow optimization cache-manage --action view
794
-
795
- # Clear cache
796
- npx claude-flow optimization cache-manage --action clear
797
-
798
- # Set limits
799
- npx claude-flow optimization cache-manage --max-size 100 --ttl 3600
800
- \`\`\`
801
- `,
802
- },
803
- training: {
804
- 'neural-train': `# neural-train
805
-
806
- Train neural patterns from operations.
807
-
808
- ## Usage
809
- \`\`\`bash
810
- npx claude-flow training neural-train [options]
811
- \`\`\`
812
-
813
- ## Options
814
- - \`--data <source>\` - Training data source
815
- - \`--model <name>\` - Target model
816
- - \`--epochs <n>\` - Training epochs
817
-
818
- ## Examples
819
- \`\`\`bash
820
- # Train from recent ops
821
- npx claude-flow training neural-train --data recent
822
-
823
- # Specific model
824
- npx claude-flow training neural-train --model task-predictor
825
-
826
- # Custom epochs
827
- npx claude-flow training neural-train --epochs 100
828
- \`\`\`
829
- `,
830
- 'pattern-learn': `# pattern-learn
831
-
832
- Learn patterns from successful operations.
833
-
834
- ## Usage
835
- \`\`\`bash
836
- npx claude-flow training pattern-learn [options]
837
- \`\`\`
838
-
839
- ## Options
840
- - \`--source <type>\` - Pattern source
841
- - \`--threshold <score>\` - Success threshold
842
- - \`--save <name>\` - Save pattern set
843
-
844
- ## Examples
845
- \`\`\`bash
846
- # Learn from all ops
847
- npx claude-flow training pattern-learn
848
-
849
- # High success only
850
- npx claude-flow training pattern-learn --threshold 0.9
851
-
852
- # Save patterns
853
- npx claude-flow training pattern-learn --save optimal-patterns
854
- \`\`\`
855
- `,
856
- 'model-update': `# model-update
857
-
858
- Update neural models with new data.
859
-
860
- ## Usage
861
- \`\`\`bash
862
- npx claude-flow training model-update [options]
863
- \`\`\`
864
-
865
- ## Options
866
- - \`--model <name>\` - Model to update
867
- - \`--incremental\` - Incremental update
868
- - \`--validate\` - Validate after update
869
-
870
- ## Examples
871
- \`\`\`bash
872
- # Update all models
873
- npx claude-flow training model-update
874
-
875
- # Specific model
876
- npx claude-flow training model-update --model agent-selector
877
-
878
- # Incremental with validation
879
- npx claude-flow training model-update --incremental --validate
880
- \`\`\`
881
- `,
882
- },
883
- workflows: {
884
- 'workflow-create': `# workflow-create
885
-
886
- Create reusable workflow templates.
887
-
888
- ## Usage
889
- \`\`\`bash
890
- npx claude-flow workflow create [options]
891
- \`\`\`
892
-
893
- ## Options
894
- - \`--name <name>\` - Workflow name
895
- - \`--from-history\` - Create from history
896
- - \`--interactive\` - Interactive creation
897
-
898
- ## Examples
899
- \`\`\`bash
900
- # Create workflow
901
- npx claude-flow workflow create --name "deploy-api"
902
-
903
- # From history
904
- npx claude-flow workflow create --name "test-suite" --from-history
905
-
906
- # Interactive mode
907
- npx claude-flow workflow create --interactive
908
- \`\`\`
909
- `,
910
- 'workflow-execute': `# workflow-execute
911
-
912
- Execute saved workflows.
913
-
914
- ## Usage
915
- \`\`\`bash
916
- npx claude-flow workflow execute [options]
917
- \`\`\`
918
-
919
- ## Options
920
- - \`--name <name>\` - Workflow name
921
- - \`--params <json>\` - Workflow parameters
922
- - \`--dry-run\` - Preview execution
923
-
924
- ## Examples
925
- \`\`\`bash
926
- # Execute workflow
927
- npx claude-flow workflow execute --name "deploy-api"
928
-
929
- # With parameters
930
- npx claude-flow workflow execute --name "test-suite" --params '{"env": "staging"}'
931
-
932
- # Dry run
933
- npx claude-flow workflow execute --name "deploy-api" --dry-run
934
- \`\`\`
935
- `,
936
- 'workflow-export': `# workflow-export
937
-
938
- Export workflows for sharing.
939
-
940
- ## Usage
941
- \`\`\`bash
942
- npx claude-flow workflow export [options]
943
- \`\`\`
944
-
945
- ## Options
946
- - \`--name <name>\` - Workflow to export
947
- - \`--format <type>\` - Export format
948
- - \`--include-history\` - Include execution history
949
-
950
- ## Examples
951
- \`\`\`bash
952
- # Export workflow
953
- npx claude-flow workflow export --name "deploy-api"
954
-
955
- # As YAML
956
- npx claude-flow workflow export --name "test-suite" --format yaml
957
-
958
- # With history
959
- npx claude-flow workflow export --name "deploy-api" --include-history
960
- \`\`\`
961
- `,
962
- },
963
- swarm: {
964
- 'swarm': `# swarm
965
-
966
- Main swarm orchestration command for Claude Flow.
967
-
968
- ## Usage
969
- \`\`\`bash
970
- npx claude-flow swarm <objective> [options]
971
- \`\`\`
972
-
973
- ## Options
974
- - \`--strategy <type>\` - Execution strategy (research, development, analysis, testing)
975
- - \`--mode <type>\` - Coordination mode (centralized, distributed, hierarchical, mesh)
976
- - \`--max-agents <n>\` - Maximum number of agents (default: 5)
977
- - \`--claude\` - Open Claude Code CLI with swarm prompt
978
- - \`--parallel\` - Enable parallel execution
979
-
980
- ## Examples
981
- \`\`\`bash
982
- # Basic swarm
983
- npx claude-flow swarm "Build REST API"
984
-
985
- # With strategy
986
- npx claude-flow swarm "Research AI patterns" --strategy research
987
-
988
- # Open in Claude Code
989
- npx claude-flow swarm "Build API" --claude
990
- \`\`\`
991
- `,
992
- 'swarm-init': `# swarm-init
993
-
994
- Initialize a new swarm with specified topology.
995
-
996
- ## Usage
997
- \`\`\`bash
998
- npx claude-flow swarm init [options]
999
- \`\`\`
1000
-
1001
- ## Options
1002
- - \`--topology <type>\` - Swarm topology (mesh, hierarchical, ring, star)
1003
- - \`--max-agents <n>\` - Maximum agents
1004
- - \`--strategy <type>\` - Distribution strategy
1005
-
1006
- ## Examples
1007
- \`\`\`bash
1008
- npx claude-flow swarm init --topology mesh
1009
- npx claude-flow swarm init --topology hierarchical --max-agents 8
1010
- \`\`\`
1011
- `,
1012
- 'swarm-spawn': `# swarm-spawn
1013
-
1014
- Spawn agents in the swarm.
1015
-
1016
- ## Usage
1017
- \`\`\`bash
1018
- npx claude-flow swarm spawn [options]
1019
- \`\`\`
1020
-
1021
- ## Options
1022
- - \`--type <type>\` - Agent type
1023
- - \`--count <n>\` - Number to spawn
1024
- - \`--capabilities <list>\` - Agent capabilities
1025
-
1026
- ## Examples
1027
- \`\`\`bash
1028
- npx claude-flow swarm spawn --type coder --count 3
1029
- npx claude-flow swarm spawn --type researcher --capabilities "web-search,analysis"
1030
- \`\`\`
1031
- `,
1032
- },
1033
- 'hive-mind': {
1034
- 'hive-mind': `# hive-mind
1035
-
1036
- Hive Mind collective intelligence system for advanced swarm coordination.
1037
-
1038
- ## Usage
1039
- \`\`\`bash
1040
- npx claude-flow hive-mind [subcommand] [options]
1041
- \`\`\`
1042
-
1043
- ## Subcommands
1044
- - \`init\` - Initialize hive mind system
1045
- - \`spawn\` - Spawn hive mind swarm
1046
- - \`status\` - Show hive mind status
1047
- - \`resume\` - Resume paused session
1048
- - \`stop\` - Stop running session
1049
-
1050
- ## Examples
1051
- \`\`\`bash
1052
- # Initialize hive mind
1053
- npx claude-flow hive-mind init
1054
-
1055
- # Spawn swarm
1056
- npx claude-flow hive-mind spawn "Build microservices"
1057
-
1058
- # Check status
1059
- npx claude-flow hive-mind status
1060
- \`\`\`
1061
- `,
1062
- 'hive-mind-init': `# hive-mind-init
1063
-
1064
- Initialize the Hive Mind collective intelligence system.
1065
-
1066
- ## Usage
1067
- \`\`\`bash
1068
- npx claude-flow hive-mind init [options]
1069
- \`\`\`
1070
-
1071
- ## Options
1072
- - \`--force\` - Force reinitialize
1073
- - \`--config <file>\` - Configuration file
1074
-
1075
- ## Examples
1076
- \`\`\`bash
1077
- npx claude-flow hive-mind init
1078
- npx claude-flow hive-mind init --force
1079
- \`\`\`
1080
- `,
1081
- 'hive-mind-spawn': `# hive-mind-spawn
1082
-
1083
- Spawn a Hive Mind swarm with queen-led coordination.
1084
-
1085
- ## Usage
1086
- \`\`\`bash
1087
- npx claude-flow hive-mind spawn <objective> [options]
1088
- \`\`\`
1089
-
1090
- ## Options
1091
- - \`--queen-type <type>\` - Queen type (strategic, tactical, adaptive)
1092
- - \`--max-workers <n>\` - Maximum worker agents
1093
- - \`--consensus <type>\` - Consensus algorithm
1094
- - \`--claude\` - Generate Claude Code spawn commands
1095
-
1096
- ## Examples
1097
- \`\`\`bash
1098
- npx claude-flow hive-mind spawn "Build API"
1099
- npx claude-flow hive-mind spawn "Research patterns" --queen-type adaptive
1100
- npx claude-flow hive-mind spawn "Build service" --claude
1101
- \`\`\`
1102
- `,
1103
- },
1104
- agents: {
1105
- 'agent-types': `# agent-types
1106
-
1107
- Complete guide to all 54 available agent types in Claude Flow.
1108
-
1109
- ## Core Development Agents
1110
- - \`coder\` - Implementation specialist
1111
- - \`reviewer\` - Code quality assurance
1112
- - \`tester\` - Test creation and validation
1113
- - \`planner\` - Strategic planning
1114
- - \`researcher\` - Information gathering
1115
-
1116
- ## Swarm Coordination Agents
1117
- - \`hierarchical-coordinator\` - Queen-led coordination
1118
- - \`mesh-coordinator\` - Peer-to-peer networks
1119
- - \`adaptive-coordinator\` - Dynamic topology
1120
-
1121
- ## Specialized Agents
1122
- - \`backend-dev\` - API development
1123
- - \`mobile-dev\` - React Native development
1124
- - \`ml-developer\` - Machine learning
1125
- - \`system-architect\` - High-level design
1126
-
1127
- For full list and details:
1128
- \`\`\`bash
1129
- npx claude-flow agents list
1130
- \`\`\`
1131
- `,
1132
- 'agent-capabilities': `# agent-capabilities
1133
-
1134
- Matrix of agent capabilities and their specializations.
1135
-
1136
- ## Capability Matrix
1137
-
1138
- | Agent Type | Primary Skills | Best For |
1139
- |------------|---------------|----------|
1140
- | coder | Implementation, debugging | Feature development |
1141
- | researcher | Analysis, synthesis | Requirements gathering |
1142
- | tester | Testing, validation | Quality assurance |
1143
- | architect | Design, planning | System architecture |
1144
-
1145
- ## Querying Capabilities
1146
- \`\`\`bash
1147
- # List all capabilities
1148
- npx claude-flow agents capabilities
1149
-
1150
- # For specific agent
1151
- npx claude-flow agents capabilities --type coder
1152
- \`\`\`
1153
- `,
1154
- 'agent-coordination': `# agent-coordination
1155
-
1156
- Coordination patterns for multi-agent collaboration.
1157
-
1158
- ## Coordination Patterns
1159
-
1160
- ### Hierarchical
1161
- Queen-led with worker specialization
1162
- \`\`\`bash
1163
- npx claude-flow swarm init --topology hierarchical
1164
- \`\`\`
1165
-
1166
- ### Mesh
1167
- Peer-to-peer collaboration
1168
- \`\`\`bash
1169
- npx claude-flow swarm init --topology mesh
1170
- \`\`\`
1171
-
1172
- ### Adaptive
1173
- Dynamic topology based on workload
1174
- \`\`\`bash
1175
- npx claude-flow swarm init --topology adaptive
1176
- \`\`\`
1177
-
1178
- ## Best Practices
1179
- - Use hierarchical for complex projects
1180
- - Use mesh for research tasks
1181
- - Use adaptive for unknown workloads
1182
- `,
1183
- 'agent-spawning': `# agent-spawning
1184
-
1185
- Guide to spawning agents with Claude Code's Task tool.
1186
-
1187
- ## Using Claude Code's Task Tool
1188
-
1189
- **CRITICAL**: Always use Claude Code's Task tool for actual agent execution:
1190
-
1191
- \`\`\`javascript
1192
- // Spawn ALL agents in ONE message
1193
- Task("Researcher", "Analyze requirements...", "researcher")
1194
- Task("Coder", "Implement features...", "coder")
1195
- Task("Tester", "Create tests...", "tester")
1196
- \`\`\`
1197
-
1198
- ## MCP Coordination Setup (Optional)
1199
-
1200
- MCP tools are ONLY for coordination:
1201
- \`\`\`javascript
1202
- mcp__claude-flow__swarm_init { topology: "mesh" }
1203
- mcp__claude-flow__agent_spawn { type: "researcher" }
1204
- \`\`\`
1205
-
1206
- ## Best Practices
1207
- 1. Always spawn agents concurrently
1208
- 2. Use Task tool for execution
1209
- 3. MCP only for coordination
1210
- 4. Batch all operations
1211
- `,
1212
- },
1213
- };
1214
- return (docs[category]?.[command] ||
1215
- `# ${command}\n\nCommand documentation for ${command} in category ${category}.\n\nUsage:\n\`\`\`bash\nnpx claude-flow ${category} ${command} [options]\n\`\`\`\n`);
1216
- }
1217
- // Command categories and their commands
1218
- export const COMMAND_STRUCTURE = {
1219
- analysis: ['bottleneck-detect', 'token-usage', 'performance-report'],
1220
- automation: ['auto-agent', 'smart-spawn', 'workflow-select'],
1221
- coordination: ['swarm-init', 'agent-spawn', 'task-orchestrate'],
1222
- github: ['github-swarm', 'repo-analyze', 'pr-enhance', 'issue-triage', 'code-review'],
1223
- hooks: ['pre-task', 'post-task', 'pre-edit', 'post-edit', 'session-end'],
1224
- memory: ['memory-usage', 'memory-persist', 'memory-search'],
1225
- monitoring: ['swarm-monitor', 'agent-metrics', 'real-time-view'],
1226
- optimization: ['topology-optimize', 'parallel-execute', 'cache-manage'],
1227
- training: ['neural-train', 'pattern-learn', 'model-update'],
1228
- workflows: ['workflow-create', 'workflow-execute', 'workflow-export'],
1229
- swarm: ['swarm', 'swarm-init', 'swarm-spawn', 'swarm-status', 'swarm-monitor', 'swarm-strategies', 'swarm-modes', 'swarm-background', 'swarm-analysis'],
1230
- 'hive-mind': ['hive-mind', 'hive-mind-init', 'hive-mind-spawn', 'hive-mind-status', 'hive-mind-resume', 'hive-mind-stop', 'hive-mind-sessions', 'hive-mind-consensus', 'hive-mind-memory', 'hive-mind-metrics', 'hive-mind-wizard'],
1231
- agents: ['agent-types', 'agent-capabilities', 'agent-coordination', 'agent-spawning'],
1232
- };
1233
- // Helper script content
1234
- export function createHelperScript(name) {
1235
- const scripts = {
1236
- 'setup-mcp.sh': `#!/bin/bash
1237
- # Setup MCP server for Claude Flow
1238
-
1239
- echo "🚀 Setting up Claude Flow MCP server..."
1240
-
1241
- # Check if claude command exists
1242
- if ! command -v claude &> /dev/null; then
1243
- echo "❌ Error: Claude Code CLI not found"
1244
- echo "Please install Claude Code first"
1245
- exit 1
1246
- fi
1247
-
1248
- # Add MCP server
1249
- echo "📦 Adding Claude Flow MCP server..."
1250
- claude mcp add claude-flow npx claude-flow mcp start
1251
-
1252
- echo "✅ MCP server setup complete!"
1253
- echo "🎯 You can now use mcp__claude-flow__ tools in Claude Code"
1254
- `,
1255
- 'quick-start.sh': `#!/bin/bash
1256
- # Quick start guide for Claude Flow
1257
-
1258
- echo "🚀 Claude Flow Quick Start"
1259
- echo "=========================="
1260
- echo ""
1261
- echo "1. Initialize a swarm:"
1262
- echo " npx claude-flow swarm init --topology hierarchical"
1263
- echo ""
1264
- echo "2. Spawn agents:"
1265
- echo " npx claude-flow agent spawn --type coder --name \"API Developer\""
1266
- echo ""
1267
- echo "3. Orchestrate tasks:"
1268
- echo " npx claude-flow task orchestrate --task \"Build REST API\""
1269
- echo ""
1270
- echo "4. Monitor progress:"
1271
- echo " npx claude-flow swarm monitor"
1272
- echo ""
1273
- echo "📚 For more examples, see .claude/commands/"
1274
- `,
1275
- 'github-setup.sh': `#!/bin/bash
1276
- # Setup GitHub integration for Claude Flow
1277
-
1278
- echo "🔗 Setting up GitHub integration..."
1279
-
1280
- # Check for gh CLI
1281
- if ! command -v gh &> /dev/null; then
1282
- echo "⚠️ GitHub CLI (gh) not found"
1283
- echo "Install from: https://cli.github.com/"
1284
- echo "Continuing without GitHub features..."
1285
- else
1286
- echo "✅ GitHub CLI found"
1287
-
1288
- # Check auth status
1289
- if gh auth status &> /dev/null; then
1290
- echo "✅ GitHub authentication active"
1291
- else
1292
- echo "⚠️ Not authenticated with GitHub"
1293
- echo "Run: gh auth login"
1294
- fi
1295
- fi
1296
-
1297
- echo ""
1298
- echo "📦 GitHub swarm commands available:"
1299
- echo " - npx claude-flow github swarm"
1300
- echo " - npx claude-flow repo analyze"
1301
- echo " - npx claude-flow pr enhance"
1302
- echo " - npx claude-flow issue triage"
1303
- `,
1304
- 'github-safe.js': `#!/usr/bin/env node
1305
-
1306
- /**
1307
- * Safe GitHub CLI Helper
1308
- * Prevents timeout issues when using gh commands with special characters
1309
- *
1310
- * Usage:
1311
- * ./github-safe.js issue comment 123 "Message with \`backticks\`"
1312
- * ./github-safe.js pr create --title "Title" --body "Complex body"
1313
- */
1314
-
1315
- import { execSync } from 'child_process';
1316
- import { writeFileSync, unlinkSync } from 'fs';
1317
- import { tmpdir } from 'os';
1318
- import { join } from 'path';
1319
- import { randomBytes } from 'crypto';
1320
-
1321
- const args = process.argv.slice(2);
1322
-
1323
- if (args.length < 2) {
1324
- console.log(\`
1325
- Safe GitHub CLI Helper
1326
-
1327
- Usage:
1328
- ./github-safe.js issue comment <number> <body>
1329
- ./github-safe.js pr comment <number> <body>
1330
- ./github-safe.js issue create --title <title> --body <body>
1331
- ./github-safe.js pr create --title <title> --body <body>
1332
-
1333
- This helper prevents timeout issues with special characters like:
1334
- - Backticks in code examples
1335
- - Command substitution \\$(...)
1336
- - Directory paths
1337
- - Special shell characters
1338
- \`);
1339
- process.exit(1);
1340
- }
1341
-
1342
- const [command, subcommand, ...restArgs] = args;
1343
-
1344
- // Handle commands that need body content
1345
- if ((command === 'issue' || command === 'pr') &&
1346
- (subcommand === 'comment' || subcommand === 'create')) {
1347
-
1348
- let bodyIndex = -1;
1349
- let body = '';
1350
-
1351
- if (subcommand === 'comment' && restArgs.length >= 2) {
1352
- // Simple format: github-safe.js issue comment 123 "body"
1353
- body = restArgs[1];
1354
- bodyIndex = 1;
1355
- } else {
1356
- // Flag format: --body "content"
1357
- bodyIndex = restArgs.indexOf('--body');
1358
- if (bodyIndex !== -1 && bodyIndex < restArgs.length - 1) {
1359
- body = restArgs[bodyIndex + 1];
1360
- }
1361
- }
1362
-
1363
- if (body) {
1364
- // Use temporary file for body content
1365
- const tmpFile = join(tmpdir(), \`gh-body-\${randomBytes(8).toString('hex')}.tmp\`);
1366
-
1367
- try {
1368
- writeFileSync(tmpFile, body, 'utf8');
1369
-
1370
- // Build new command with --body-file
1371
- const newArgs = [...restArgs];
1372
- if (subcommand === 'comment' && bodyIndex === 1) {
1373
- // Replace body with --body-file
1374
- newArgs[1] = '--body-file';
1375
- newArgs.push(tmpFile);
1376
- } else if (bodyIndex !== -1) {
1377
- // Replace --body with --body-file
1378
- newArgs[bodyIndex] = '--body-file';
1379
- newArgs[bodyIndex + 1] = tmpFile;
1380
- }
1381
-
1382
- // Execute safely
1383
- const ghCommand = \`gh \${command} \${subcommand} \${newArgs.join(' ')}\`;
1384
- console.log(\`Executing: \${ghCommand}\`);
1385
-
1386
- const result = execSync(ghCommand, {
1387
- stdio: 'inherit',
1388
- timeout: 30000 // 30 second timeout
1389
- });
1390
-
1391
- } catch (error) {
1392
- console.error('Error:', error.message);
1393
- process.exit(1);
1394
- } finally {
1395
- // Clean up
1396
- try {
1397
- unlinkSync(tmpFile);
1398
- } catch (e) {
1399
- // Ignore cleanup errors
1400
- }
1401
- }
1402
- } else {
1403
- // No body content, execute normally
1404
- execSync(\`gh \${args.join(' ')}\`, { stdio: 'inherit' });
1405
- }
1406
- } else {
1407
- // Other commands, execute normally
1408
- execSync(\`gh \${args.join(' ')}\`, { stdio: 'inherit' });
1409
- }
1410
- `,
1411
- 'checkpoint-hooks.sh': `#!/bin/bash
1412
- # Checkpoint hook functions for Claude settings.json
1413
-
1414
- # Function to handle pre-edit checkpoints
1415
- pre_edit_checkpoint() {
1416
- local tool_input="$1"
1417
- local file=$(echo "$tool_input" | jq -r '.file_path // empty')
1418
-
1419
- if [ -n "$file" ]; then
1420
- local checkpoint_branch="checkpoint/pre-edit-$(date +%Y%m%d-%H%M%S)"
1421
- local current_branch=$(git branch --show-current)
1422
-
1423
- # Create checkpoint
1424
- git add -A
1425
- git stash push -m "Pre-edit checkpoint for $file" >/dev/null 2>&1
1426
- git branch "$checkpoint_branch"
1427
-
1428
- # Store metadata
1429
- mkdir -p .claude/checkpoints
1430
- cat > ".claude/checkpoints/$(date +%s).json" <<EOF
1431
- {
1432
- "branch": "$checkpoint_branch",
1433
- "file": "$file",
1434
- "timestamp": "$(date -u +%Y-%m-%dT%H:%M:%SZ)",
1435
- "type": "pre-edit",
1436
- "original_branch": "$current_branch"
1437
- }
1438
- EOF
1439
-
1440
- # Restore working directory
1441
- git stash pop --quiet >/dev/null 2>&1 || true
1442
-
1443
- echo "✅ Created checkpoint: $checkpoint_branch for $file"
1444
- fi
1445
- }
1446
-
1447
- # Function to handle post-edit checkpoints
1448
- post_edit_checkpoint() {
1449
- local tool_input="$1"
1450
- local file=$(echo "$tool_input" | jq -r '.file_path // empty')
1451
-
1452
- if [ -n "$file" ] && [ -f "$file" ]; then
1453
- # Check if file was modified - first check if file is tracked
1454
- if ! git ls-files --error-unmatch "$file" >/dev/null 2>&1; then
1455
- # File is not tracked, add it first
1456
- git add "$file"
1457
- fi
1458
-
1459
- # Now check if there are changes
1460
- if git diff --cached --quiet "$file" 2>/dev/null && git diff --quiet "$file" 2>/dev/null; then
1461
- echo "ℹ️ No changes to checkpoint for $file"
1462
- else
1463
- local tag_name="checkpoint-$(date +%Y%m%d-%H%M%S)"
1464
- local current_branch=$(git branch --show-current)
1465
-
1466
- # Create commit
1467
- git add "$file"
1468
- if git commit -m "🔖 Checkpoint: Edit $file
1469
-
1470
- Automatic checkpoint created by Claude
1471
- - File: $file
1472
- - Branch: $current_branch
1473
- - Timestamp: $(date -u +%Y-%m-%dT%H:%M:%SZ)
1474
-
1475
- [Auto-checkpoint]" --quiet; then
1476
- # Create tag only if commit succeeded
1477
- git tag -a "$tag_name" -m "Checkpoint after editing $file"
1478
-
1479
- # Store metadata
1480
- mkdir -p .claude/checkpoints
1481
- local diff_stats=$(git diff HEAD~1 --stat | tr '\\n' ' ' | sed 's/"/\\\\"/g')
1482
- cat > ".claude/checkpoints/$(date +%s).json" <<EOF
1483
- {
1484
- "tag": "$tag_name",
1485
- "file": "$file",
1486
- "timestamp": "$(date -u +%Y-%m-%dT%H:%M:%SZ)",
1487
- "type": "post-edit",
1488
- "branch": "$current_branch",
1489
- "diff_summary": "$diff_stats"
1490
- }
1491
- EOF
1492
-
1493
- echo "✅ Created checkpoint: $tag_name for $file"
1494
- else
1495
- echo "ℹ️ No commit created (no changes or commit failed)"
1496
- fi
1497
- fi
1498
- fi
1499
- }
1500
-
1501
- # Function to handle task checkpoints
1502
- task_checkpoint() {
1503
- local user_prompt="$1"
1504
- local task=$(echo "$user_prompt" | head -c 100 | tr '\\n' ' ')
1505
-
1506
- if [ -n "$task" ]; then
1507
- local checkpoint_name="task-$(date +%Y%m%d-%H%M%S)"
1508
-
1509
- # Commit current state
1510
- git add -A
1511
- git commit -m "🔖 Task checkpoint: $task..." --quiet || true
1512
-
1513
- # No GitHub release in standard version
1514
-
1515
- # Store metadata
1516
- mkdir -p .claude/checkpoints
1517
- cat > ".claude/checkpoints/task-$(date +%s).json" <<EOF
1518
- {
1519
- "checkpoint": "$checkpoint_name",
1520
- "task": "$task",
1521
- "timestamp": "$(date -u +%Y-%m-%dT%H:%M:%SZ)",
1522
- "commit": "$(git rev-parse HEAD)"
1523
- }
1524
- EOF
1525
-
1526
- echo "✅ Created task checkpoint: $checkpoint_name"
1527
- fi
1528
- }
1529
-
1530
- # Function to handle session end
1531
- session_end_checkpoint() {
1532
- local session_id="session-$(date +%Y%m%d-%H%M%S)"
1533
- local summary_file=".claude/checkpoints/summary-$session_id.md"
1534
-
1535
- mkdir -p .claude/checkpoints
1536
-
1537
- # Create summary
1538
- cat > "$summary_file" <<EOF
1539
- # Session Summary - $(date +'%Y-%m-%d %H:%M:%S')
1540
-
1541
- ## Checkpoints Created
1542
- $(find .claude/checkpoints -name '*.json' -mtime -1 -exec basename {} \\; | sort)
1543
-
1544
- ## Files Modified
1545
- $(git diff --name-only $(git log --format=%H -n 1 --before="1 hour ago" 2>/dev/null) 2>/dev/null || echo "No files tracked")
1546
-
1547
- ## Recent Commits
1548
- $(git log --oneline -10 --grep="Checkpoint" || echo "No checkpoint commits")
1549
-
1550
- ## Rollback Instructions
1551
- To rollback to a specific checkpoint:
1552
- \\\`\\\`\\\`bash
1553
- # List all checkpoints
1554
- git tag -l 'checkpoint-*' | sort -r
1555
-
1556
- # Rollback to a checkpoint
1557
- git checkout checkpoint-YYYYMMDD-HHMMSS
1558
-
1559
- # Or reset to a checkpoint (destructive)
1560
- git reset --hard checkpoint-YYYYMMDD-HHMMSS
1561
- \\\`\\\`\\\`
1562
- EOF
1563
-
1564
- # Create final checkpoint
1565
- git add -A
1566
- git commit -m "🏁 Session end checkpoint: $session_id" --quiet || true
1567
- git tag -a "session-end-$session_id" -m "End of Claude session"
1568
-
1569
- echo "✅ Session summary saved to: $summary_file"
1570
- echo "📌 Final checkpoint: session-end-$session_id"
1571
- }
1572
-
1573
- # Main entry point
1574
- case "$1" in
1575
- pre-edit)
1576
- pre_edit_checkpoint "$2"
1577
- ;;
1578
- post-edit)
1579
- post_edit_checkpoint "$2"
1580
- ;;
1581
- task)
1582
- task_checkpoint "$2"
1583
- ;;
1584
- session-end)
1585
- session_end_checkpoint
1586
- ;;
1587
- *)
1588
- echo "Usage: $0 {pre-edit|post-edit|task|session-end} [input]"
1589
- exit 1
1590
- ;;
1591
- esac
1592
- `,
1593
- 'checkpoint-manager.sh': `#!/bin/bash
1594
- # Claude Checkpoint Manager
1595
- # Provides easy rollback and management of Claude Code checkpoints
1596
-
1597
- set -e
1598
-
1599
- # Colors
1600
- RED='\\033[0;31m'
1601
- GREEN='\\033[0;32m'
1602
- YELLOW='\\033[1;33m'
1603
- BLUE='\\033[0;34m'
1604
- NC='\\033[0m' # No Color
1605
-
1606
- # Configuration
1607
- CHECKPOINT_DIR=".claude/checkpoints"
1608
- BACKUP_DIR=".claude/backups"
1609
-
1610
- # Help function
1611
- show_help() {
1612
- cat << EOF
1613
- Claude Checkpoint Manager
1614
- ========================
1615
-
1616
- Usage: $0 <command> [options]
1617
-
1618
- Commands:
1619
- list List all checkpoints
1620
- show <id> Show details of a specific checkpoint
1621
- rollback <id> Rollback to a specific checkpoint
1622
- diff <id> Show diff since checkpoint
1623
- clean Clean old checkpoints (older than 7 days)
1624
- summary Show session summary
1625
-
1626
- Options:
1627
- --hard For rollback: use git reset --hard (destructive)
1628
- --soft For rollback: use git reset --soft (default)
1629
- --branch For rollback: create new branch from checkpoint
1630
-
1631
- Examples:
1632
- $0 list
1633
- $0 show checkpoint-20240130-143022
1634
- $0 rollback checkpoint-20240130-143022 --branch
1635
- $0 diff session-end-session-20240130-150000
1636
- EOF
1637
- }
1638
-
1639
- # List all checkpoints
1640
- function list_checkpoints() {
1641
- echo -e "\${BLUE}📋 Available Checkpoints:\${NC}"
1642
- echo ""
1643
-
1644
- # List checkpoint tags
1645
- echo -e "\${YELLOW}Git Tags:\${NC}"
1646
- local tags=$(git tag -l 'checkpoint-*' -l 'session-end-*' -l 'task-*' --sort=-creatordate | head -20)
1647
- if [ -n "$tags" ]; then
1648
- echo "$tags"
1649
- else
1650
- echo "No checkpoint tags found"
1651
- fi
1652
-
1653
- echo ""
1654
-
1655
- # List checkpoint branches
1656
- echo -e "\${YELLOW}Checkpoint Branches:\${NC}"
1657
- local branches=$(git branch -a | grep "checkpoint/" | sed 's/^[ *]*//')
1658
- if [ -n "$branches" ]; then
1659
- echo "$branches"
1660
- else
1661
- echo "No checkpoint branches found"
1662
- fi
1663
-
1664
- echo ""
1665
-
1666
- # List checkpoint files
1667
- if [ -d "$CHECKPOINT_DIR" ]; then
1668
- echo -e "\${YELLOW}Recent Checkpoint Files:\${NC}"
1669
- find "$CHECKPOINT_DIR" -name "*.json" -type f -printf "%T@ %p\\n" | \\
1670
- sort -rn | head -10 | cut -d' ' -f2- | xargs -I {} basename {}
1671
- fi
1672
- }
1673
-
1674
- # Show checkpoint details
1675
- function show_checkpoint() {
1676
- local checkpoint_id="$1"
1677
-
1678
- echo -e "\${BLUE}📍 Checkpoint Details: $checkpoint_id\${NC}"
1679
- echo ""
1680
-
1681
- # Check if it's a tag
1682
- if git tag -l "$checkpoint_id" | grep -q "$checkpoint_id"; then
1683
- echo -e "\${YELLOW}Type:\${NC} Git Tag"
1684
- echo -e "\${YELLOW}Commit:\${NC} $(git rev-list -n 1 "$checkpoint_id")"
1685
- echo -e "\${YELLOW}Date:\${NC} $(git log -1 --format=%ai "$checkpoint_id")"
1686
- echo -e "\${YELLOW}Message:\${NC}"
1687
- git log -1 --format=%B "$checkpoint_id" | sed 's/^/ /'
1688
- echo ""
1689
- echo -e "\${YELLOW}Files changed:\${NC}"
1690
- git diff-tree --no-commit-id --name-status -r "$checkpoint_id" | sed 's/^/ /'
1691
- # Check if it's a branch
1692
- elif git branch -a | grep -q "$checkpoint_id"; then
1693
- echo -e "\${YELLOW}Type:\${NC} Git Branch"
1694
- echo -e "\${YELLOW}Latest commit:\${NC}"
1695
- git log -1 --oneline "$checkpoint_id"
1696
- else
1697
- echo -e "\${RED}❌ Checkpoint not found: $checkpoint_id\${NC}"
1698
- exit 1
1699
- fi
1700
- }
1701
-
1702
- # Rollback to checkpoint
1703
- function rollback_checkpoint() {
1704
- local checkpoint_id="$1"
1705
- local mode="$2"
1706
-
1707
- echo -e "\${YELLOW}🔄 Rolling back to checkpoint: $checkpoint_id\${NC}"
1708
- echo ""
1709
-
1710
- # Verify checkpoint exists
1711
- if ! git tag -l "$checkpoint_id" | grep -q "$checkpoint_id" && \\
1712
- ! git branch -a | grep -q "$checkpoint_id"; then
1713
- echo -e "\${RED}❌ Checkpoint not found: $checkpoint_id\${NC}"
1714
- exit 1
1715
- fi
1716
-
1717
- # Create backup before rollback
1718
- local backup_name="backup-$(date +%Y%m%d-%H%M%S)"
1719
- echo "Creating backup: $backup_name"
1720
- git tag "$backup_name" -m "Backup before rollback to $checkpoint_id"
1721
-
1722
- case "$mode" in
1723
- "--hard")
1724
- echo -e "\${RED}⚠️ Performing hard reset (destructive)\${NC}"
1725
- git reset --hard "$checkpoint_id"
1726
- echo -e "\${GREEN}✅ Rolled back to $checkpoint_id (hard reset)\${NC}"
1727
- ;;
1728
- "--branch")
1729
- local branch_name="rollback-$checkpoint_id-$(date +%Y%m%d-%H%M%S)"
1730
- echo "Creating new branch: $branch_name"
1731
- git checkout -b "$branch_name" "$checkpoint_id"
1732
- echo -e "\${GREEN}✅ Created branch $branch_name from $checkpoint_id\${NC}"
1733
- ;;
1734
- "--stash"|*)
1735
- echo "Stashing current changes..."
1736
- git stash push -m "Stash before rollback to $checkpoint_id"
1737
- git reset --soft "$checkpoint_id"
1738
- echo -e "\${GREEN}✅ Rolled back to $checkpoint_id (soft reset)\${NC}"
1739
- echo "Your changes are stashed. Use 'git stash pop' to restore them."
1740
- ;;
1741
- esac
1742
- }
1743
-
1744
- # Show diff since checkpoint
1745
- function diff_checkpoint() {
1746
- local checkpoint_id="$1"
1747
-
1748
- echo -e "\${BLUE}📊 Changes since checkpoint: $checkpoint_id\${NC}"
1749
- echo ""
1750
-
1751
- if git tag -l "$checkpoint_id" | grep -q "$checkpoint_id"; then
1752
- git diff "$checkpoint_id"
1753
- elif git branch -a | grep -q "$checkpoint_id"; then
1754
- git diff "$checkpoint_id"
1755
- else
1756
- echo -e "\${RED}❌ Checkpoint not found: $checkpoint_id\${NC}"
1757
- exit 1
1758
- fi
1759
- }
1760
-
1761
- # Clean old checkpoints
1762
- function clean_checkpoints() {
1763
- local days=\${1:-7}
1764
-
1765
- echo -e "\${YELLOW}🧹 Cleaning checkpoints older than $days days...\${NC}"
1766
- echo ""
1767
-
1768
- # Clean old checkpoint files
1769
- if [ -d "$CHECKPOINT_DIR" ]; then
1770
- find "$CHECKPOINT_DIR" -name "*.json" -type f -mtime +$days -delete
1771
- echo "✅ Cleaned old checkpoint files"
1772
- fi
1773
-
1774
- # List old tags (but don't delete automatically)
1775
- echo ""
1776
- echo "Old checkpoint tags (manual deletion required):"
1777
- git tag -l 'checkpoint-*' --sort=-creatordate | tail -n +50 || echo "No old tags found"
1778
- }
1779
-
1780
- # Show session summary
1781
- function show_summary() {
1782
- echo -e "\${BLUE}📊 Session Summary\${NC}"
1783
- echo ""
1784
-
1785
- # Find most recent session summary
1786
- if [ -d "$CHECKPOINT_DIR" ]; then
1787
- local latest_summary=$(find "$CHECKPOINT_DIR" -name "summary-*.md" -type f -printf "%T@ %p\\n" | \\
1788
- sort -rn | head -1 | cut -d' ' -f2-)
1789
-
1790
- if [ -n "$latest_summary" ]; then
1791
- echo -e "\${YELLOW}Latest session summary:\${NC}"
1792
- cat "$latest_summary"
1793
- else
1794
- echo "No session summaries found"
1795
- fi
1796
- fi
1797
- }
1798
-
1799
- # Main command handling
1800
- case "$1" in
1801
- list)
1802
- list_checkpoints
1803
- ;;
1804
- show)
1805
- if [ -z "$2" ]; then
1806
- echo -e "\${RED}Error: Please specify a checkpoint ID\${NC}"
1807
- show_help
1808
- exit 1
1809
- fi
1810
- show_checkpoint "$2"
1811
- ;;
1812
- rollback)
1813
- if [ -z "$2" ]; then
1814
- echo -e "\${RED}Error: Please specify a checkpoint ID\${NC}"
1815
- show_help
1816
- exit 1
1817
- fi
1818
- rollback_checkpoint "$2" "$3"
1819
- ;;
1820
- diff)
1821
- if [ -z "$2" ]; then
1822
- echo -e "\${RED}Error: Please specify a checkpoint ID\${NC}"
1823
- show_help
1824
- exit 1
1825
- fi
1826
- diff_checkpoint "$2"
1827
- ;;
1828
- clean)
1829
- clean_checkpoints "$2"
1830
- ;;
1831
- summary)
1832
- show_summary
1833
- ;;
1834
- help|--help|-h)
1835
- show_help
1836
- ;;
1837
- *)
1838
- echo -e "\${RED}Error: Unknown command: $1\${NC}"
1839
- echo ""
1840
- show_help
1841
- exit 1
1842
- ;;
1843
- esac
1844
- `,
1845
- 'standard-checkpoint-hooks.sh': `#!/bin/bash
1846
- # Standard checkpoint hook functions for Claude settings.json (without GitHub features)
1847
-
1848
- # Function to handle pre-edit checkpoints
1849
- pre_edit_checkpoint() {
1850
- local tool_input="$1"
1851
- local file=$(echo "$tool_input" | jq -r '.file_path // empty')
1852
-
1853
- if [ -n "$file" ]; then
1854
- local checkpoint_branch="checkpoint/pre-edit-$(date +%Y%m%d-%H%M%S)"
1855
- local current_branch=$(git branch --show-current)
1856
-
1857
- # Create checkpoint
1858
- git add -A
1859
- git stash push -m "Pre-edit checkpoint for $file" >/dev/null 2>&1
1860
- git branch "$checkpoint_branch"
1861
-
1862
- # Store metadata
1863
- mkdir -p .claude/checkpoints
1864
- cat > ".claude/checkpoints/$(date +%s).json" <<EOF
1865
- {
1866
- "branch": "$checkpoint_branch",
1867
- "file": "$file",
1868
- "timestamp": "$(date -u +%Y-%m-%dT%H:%M:%SZ)",
1869
- "type": "pre-edit",
1870
- "original_branch": "$current_branch"
1871
- }
1872
- EOF
1873
-
1874
- # Restore working directory
1875
- git stash pop --quiet >/dev/null 2>&1 || true
1876
-
1877
- echo "✅ Created checkpoint: $checkpoint_branch for $file"
1878
- fi
1879
- }
1880
-
1881
- # Function to handle post-edit checkpoints
1882
- post_edit_checkpoint() {
1883
- local tool_input="$1"
1884
- local file=$(echo "$tool_input" | jq -r '.file_path // empty')
1885
-
1886
- if [ -n "$file" ] && [ -f "$file" ]; then
1887
- # Check if file was modified - first check if file is tracked
1888
- if ! git ls-files --error-unmatch "$file" >/dev/null 2>&1; then
1889
- # File is not tracked, add it first
1890
- git add "$file"
1891
- fi
1892
-
1893
- # Now check if there are changes
1894
- if git diff --cached --quiet "$file" 2>/dev/null && git diff --quiet "$file" 2>/dev/null; then
1895
- echo "ℹ️ No changes to checkpoint for $file"
1896
- else
1897
- local tag_name="checkpoint-$(date +%Y%m%d-%H%M%S)"
1898
- local current_branch=$(git branch --show-current)
1899
-
1900
- # Create commit
1901
- git add "$file"
1902
- if git commit -m "🔖 Checkpoint: Edit $file
1903
-
1904
- Automatic checkpoint created by Claude
1905
- - File: $file
1906
- - Branch: $current_branch
1907
- - Timestamp: $(date -u +%Y-%m-%dT%H:%M:%SZ)
1908
-
1909
- [Auto-checkpoint]" --quiet; then
1910
- # Create tag only if commit succeeded
1911
- git tag -a "$tag_name" -m "Checkpoint after editing $file"
1912
-
1913
- # Store metadata
1914
- mkdir -p .claude/checkpoints
1915
- local diff_stats=$(git diff HEAD~1 --stat | tr '\\n' ' ' | sed 's/"/\\"/g')
1916
- cat > ".claude/checkpoints/$(date +%s).json" <<EOF
1917
- {
1918
- "tag": "$tag_name",
1919
- "file": "$file",
1920
- "timestamp": "$(date -u +%Y-%m-%dT%H:%M:%SZ)",
1921
- "type": "post-edit",
1922
- "branch": "$current_branch",
1923
- "diff_summary": "$diff_stats"
1924
- }
1925
- EOF
1926
-
1927
- echo "✅ Created checkpoint: $tag_name for $file"
1928
- else
1929
- echo "ℹ️ No commit created (no changes or commit failed)"
1930
- fi
1931
- fi
1932
- fi
1933
- }
1934
-
1935
- # Function to handle task checkpoints
1936
- task_checkpoint() {
1937
- local user_prompt="$1"
1938
- local task=$(echo "$user_prompt" | head -c 100 | tr '\\n' ' ')
1939
-
1940
- if [ -n "$task" ]; then
1941
- local checkpoint_name="task-$(date +%Y%m%d-%H%M%S)"
1942
-
1943
- # Commit current state
1944
- git add -A
1945
- git commit -m "🔖 Task checkpoint: $task..." --quiet || true
1946
-
1947
- # Store metadata
1948
- mkdir -p .claude/checkpoints
1949
- cat > ".claude/checkpoints/task-$(date +%s).json" <<EOF
1950
- {
1951
- "checkpoint": "$checkpoint_name",
1952
- "task": "$task",
1953
- "timestamp": "$(date -u +%Y-%m-%dT%H:%M:%SZ)",
1954
- "commit": "$(git rev-parse HEAD)"
1955
- }
1956
- EOF
1957
-
1958
- echo "✅ Created task checkpoint: $checkpoint_name"
1959
- fi
1960
- }
1961
-
1962
- # Function to handle session end
1963
- session_end_checkpoint() {
1964
- local session_id="session-$(date +%Y%m%d-%H%M%S)"
1965
- local summary_file=".claude/checkpoints/summary-$session_id.md"
1966
-
1967
- mkdir -p .claude/checkpoints
1968
-
1969
- # Create summary
1970
- cat > "$summary_file" <<EOF
1971
- # Session Summary - $(date +'%Y-%m-%d %H:%M:%S')
1972
-
1973
- ## Checkpoints Created
1974
- $(find .claude/checkpoints -name '*.json' -mtime -1 -exec basename {} \\; | sort)
1975
-
1976
- ## Files Modified
1977
- $(git diff --name-only $(git log --format=%H -n 1 --before="1 hour ago" 2>/dev/null) 2>/dev/null || echo "No files tracked")
1978
-
1979
- ## Recent Commits
1980
- $(git log --oneline -10 --grep="Checkpoint" || echo "No checkpoint commits")
1981
-
1982
- ## Rollback Instructions
1983
- To rollback to a specific checkpoint:
1984
- \\\`\\\`\\\`bash
1985
- # List all checkpoints
1986
- git tag -l 'checkpoint-*' | sort -r
1987
-
1988
- # Rollback to a checkpoint
1989
- git checkout checkpoint-YYYYMMDD-HHMMSS
1990
-
1991
- # Or reset to a checkpoint (destructive)
1992
- git reset --hard checkpoint-YYYYMMDD-HHMMSS
1993
- \\\`\\\`\\\`
1994
- EOF
1995
-
1996
- # Create final checkpoint
1997
- git add -A
1998
- git commit -m "🏁 Session end checkpoint: $session_id" --quiet || true
1999
- git tag -a "session-end-$session_id" -m "End of Claude session"
2000
-
2001
- echo "✅ Session summary saved to: $summary_file"
2002
- echo "📌 Final checkpoint: session-end-$session_id"
2003
- }
2004
-
2005
- # Main entry point
2006
- case "$1" in
2007
- pre-edit)
2008
- pre_edit_checkpoint "$2"
2009
- ;;
2010
- post-edit)
2011
- post_edit_checkpoint "$2"
2012
- ;;
2013
- task)
2014
- task_checkpoint "$2"
2015
- ;;
2016
- session-end)
2017
- session_end_checkpoint
2018
- ;;
2019
- *)
2020
- echo "Usage: $0 {pre-edit|post-edit|task|session-end} [input]"
2021
- exit 1
2022
- ;;
2023
- esac
2024
- `,
2025
- };
2026
- return scripts[name] || '';
2027
- }
2028
- // Wrapper script fallbacks
2029
- function createWrapperScriptFallback(type) {
2030
- if (type === 'unix') {
2031
- // Return the universal ES module compatible wrapper
2032
- return `#!/usr/bin/env node
2033
-
2034
- /**
2035
- * Claude Flow CLI - Universal Wrapper
2036
- * Works in both CommonJS and ES Module projects
2037
- */
2038
-
2039
- // Use dynamic import to work in both CommonJS and ES modules
2040
- (async () => {
2041
- const { spawn } = await import('child_process');
2042
- const { resolve } = await import('path');
2043
- const { fileURLToPath } = await import('url');
2044
-
2045
- try {
2046
- // Try to use import.meta.url (ES modules)
2047
- const __filename = fileURLToPath(import.meta.url);
2048
- const __dirname = resolve(__filename, '..');
2049
- } catch {
2050
- // Fallback for CommonJS
2051
- }
2052
-
2053
- // Try multiple strategies to find claude-flow
2054
- const strategies = [
2055
- // 1. Local node_modules
2056
- async () => {
2057
- try {
2058
- const localPath = resolve(process.cwd(), 'node_modules/.bin/claude-flow');
2059
- const { existsSync } = await import('fs');
2060
- if (existsSync(localPath)) {
2061
- return spawn(localPath, process.argv.slice(2), { stdio: 'inherit' });
2062
- }
2063
- } catch {}
2064
- },
2065
-
2066
- // 2. Parent node_modules (monorepo)
2067
- async () => {
2068
- try {
2069
- const parentPath = resolve(process.cwd(), '../node_modules/.bin/claude-flow');
2070
- const { existsSync } = await import('fs');
2071
- if (existsSync(parentPath)) {
2072
- return spawn(parentPath, process.argv.slice(2), { stdio: 'inherit' });
2073
- }
2074
- } catch {}
2075
- },
2076
-
2077
- // 3. NPX with latest alpha version (prioritized over global)
2078
- async () => {
2079
- return spawn('npx', ['claude-flow@2.0.0-alpha.25', ...process.argv.slice(2)], { stdio: 'inherit' });
2080
- }
2081
- ];
2082
-
2083
- // Try each strategy
2084
- for (const strategy of strategies) {
2085
- try {
2086
- const child = await strategy();
2087
- if (child) {
2088
- child.on('exit', (code) => process.exit(code || 0));
2089
- child.on('error', (err) => {
2090
- if (err.code !== 'ENOENT') {
2091
- console.error('Error:', err);
2092
- process.exit(1);
2093
- }
2094
- });
2095
- return;
2096
- }
2097
- } catch {}
2098
- }
2099
-
2100
- console.error('Could not find claude-flow. Please install it with: npm install claude-flow');
2101
- process.exit(1);
2102
- })();`;
2103
- }
2104
- else if (type === 'windows') {
2105
- return `@echo off
2106
- rem Claude Flow wrapper script for Windows
2107
-
2108
- rem Check if package.json exists in current directory
2109
- if exist "%~dp0package.json" (
2110
- rem Local development mode
2111
- if exist "%~dp0src\\cli\\simple-cli.js" (
2112
- node "%~dp0src\\cli\\simple-cli.js" %*
2113
- ) else if exist "%~dp0dist\\cli.js" (
2114
- node "%~dp0dist\\cli.js" %*
2115
- ) else (
2116
- echo Error: Could not find Claude Flow CLI files
2117
- exit /b 1
2118
- )
2119
- ) else (
2120
- rem Production mode - use npx alpha
2121
- npx claude-flow@alpha %*
2122
- )`;
2123
- }
2124
- else if (type === 'powershell') {
2125
- return `# Claude Flow wrapper script for PowerShell
2126
-
2127
- $scriptPath = Split-Path -Parent $MyInvocation.MyCommand.Path
2128
-
2129
- if (Test-Path "$scriptPath\\package.json") {
2130
- # Local development mode
2131
- if (Test-Path "$scriptPath\\src\\cli\\simple-cli.js") {
2132
- & node "$scriptPath\\src\\cli\\simple-cli.js" $args
2133
- } elseif (Test-Path "$scriptPath\\dist\\cli.js") {
2134
- & node "$scriptPath\\dist\\cli.js" $args
2135
- } else {
2136
- Write-Error "Could not find Claude Flow CLI files"
2137
- exit 1
2138
- }
2139
- } else {
2140
- # Production mode - use npx alpha
2141
- & npx claude-flow@alpha $args
2142
- }`;
2143
- }
2144
- return '';
2145
- }
2146
- // Fallback functions for when templates can't be loaded
2147
- function createEnhancedClaudeMdFallback() {
2148
- // Read from the actual template file we created
2149
- try {
2150
- return readFileSync(join(__dirname, 'CLAUDE.md'), 'utf8');
2151
- }
2152
- catch (error) {
2153
- // If that fails, return a minimal version
2154
- return `# Claude Code Configuration for Claude Flow
2155
-
2156
- ## 🚀 IMPORTANT: Claude Flow AI-Driven Development
2157
-
2158
- ### Claude Code Handles:
2159
- - ✅ **ALL file operations** (Read, Write, Edit, MultiEdit)
2160
- - ✅ **ALL code generation** and development tasks
2161
- - ✅ **ALL bash commands** and system operations
2162
- - ✅ **ALL actual implementation** work
2163
- - ✅ **Project navigation** and code analysis
2164
-
2165
- ### Claude Flow MCP Tools Handle:
2166
- - 🧠 **Coordination only** - Orchestrating Claude Code's actions
2167
- - 💾 **Memory management** - Persistent state across sessions
2168
- - 🤖 **Neural features** - Cognitive patterns and learning
2169
- - 📊 **Performance tracking** - Monitoring and metrics
2170
- - 🐝 **Swarm orchestration** - Multi-agent coordination
2171
- - 🔗 **GitHub integration** - Advanced repository management
2172
-
2173
- ### ⚠️ Key Principle:
2174
- **MCP tools DO NOT create content or write code.** They coordinate and enhance Claude Code's native capabilities.
2175
-
2176
- ## Quick Start
2177
-
2178
- 1. Add MCP server: \`claude mcp add claude-flow npx claude-flow mcp start\`
2179
- 2. Initialize swarm: \`mcp__claude-flow__swarm_init { topology: "hierarchical" }\`
2180
- 3. Spawn agents: \`mcp__claude-flow__agent_spawn { type: "coder" }\`
2181
- 4. Orchestrate: \`mcp__claude-flow__task_orchestrate { task: "Build feature" }\`
2182
-
2183
- See full documentation in \`.claude/commands/\`
2184
- `;
2185
- }
2186
- }
2187
- function createEnhancedSettingsJsonFallback() {
2188
- return JSON.stringify({
2189
- env: {
2190
- CLAUDE_FLOW_AUTO_COMMIT: 'false',
2191
- CLAUDE_FLOW_AUTO_PUSH: 'false',
2192
- CLAUDE_FLOW_HOOKS_ENABLED: 'true',
2193
- CLAUDE_FLOW_TELEMETRY_ENABLED: 'true',
2194
- CLAUDE_FLOW_REMOTE_EXECUTION: 'true',
2195
- CLAUDE_FLOW_CHECKPOINTS_ENABLED: 'true',
2196
- },
2197
- permissions: {
2198
- allow: [
2199
- 'Bash(npx claude-flow:*)',
2200
- 'Bash(npm run lint)',
2201
- 'Bash(npm run test:*)',
2202
- 'Bash(npm test:*)',
2203
- 'Bash(git status)',
2204
- 'Bash(git diff:*)',
2205
- 'Bash(git log:*)',
2206
- 'Bash(git add:*)',
2207
- 'Bash(git commit:*)',
2208
- 'Bash(git push)',
2209
- 'Bash(git config:*)',
2210
- 'Bash(git tag:*)',
2211
- 'Bash(git branch:*)',
2212
- 'Bash(git checkout:*)',
2213
- 'Bash(git stash:*)',
2214
- 'Bash(node:*)',
2215
- 'Bash(which:*)',
2216
- 'Bash(pwd)',
2217
- 'Bash(ls:*)',
2218
- 'Bash(jq:*)',
2219
- ],
2220
- deny: ['Bash(rm -rf /)'],
2221
- },
2222
- enabledMcpjsonServers: ['claude-flow', 'ruv-swarm'],
2223
- hooks: {
2224
- PreToolUse: [
2225
- {
2226
- matcher: 'Bash',
2227
- hooks: [
2228
- {
2229
- type: 'command',
2230
- command: 'cat | jq -r \'.tool_input.command // ""\' | xargs -I {} npx claude-flow@alpha hooks pre-command --command "{}" --validate-safety true --prepare-resources true',
2231
- },
2232
- ],
2233
- },
2234
- {
2235
- matcher: 'Write|Edit|MultiEdit',
2236
- hooks: [
2237
- {
2238
- type: 'command',
2239
- command: 'cat | jq -r \'.tool_input.file_path // .tool_input.path // ""\' | xargs -I {} npx claude-flow@alpha hooks pre-edit --file "{}" --auto-assign-agents true --load-context true',
2240
- },
2241
- {
2242
- type: 'command',
2243
- command: './.claude/helpers/standard-checkpoint-hooks.sh pre-edit "{{tool_input}}"',
2244
- },
2245
- ],
2246
- },
2247
- ],
2248
- PostToolUse: [
2249
- {
2250
- matcher: 'Bash',
2251
- hooks: [
2252
- {
2253
- type: 'command',
2254
- command: 'cat | jq -r \'.tool_input.command // ""\' | xargs -I {} npx claude-flow@alpha hooks post-command --command "{}" --track-metrics true --store-results true',
2255
- },
2256
- ],
2257
- },
2258
- {
2259
- matcher: 'Write|Edit|MultiEdit',
2260
- hooks: [
2261
- {
2262
- type: 'command',
2263
- command: 'cat | jq -r \'.tool_input.file_path // .tool_input.path // ""\' | xargs -I {} npx claude-flow@alpha hooks post-edit --file "{}" --format true --update-memory true --train-neural true',
2264
- },
2265
- {
2266
- type: 'command',
2267
- command: './.claude/helpers/standard-checkpoint-hooks.sh post-edit "{{tool_input}}"',
2268
- },
2269
- ],
2270
- },
2271
- ],
2272
- UserPromptSubmit: [
2273
- {
2274
- hooks: [
2275
- {
2276
- type: 'command',
2277
- command: './.claude/helpers/standard-checkpoint-hooks.sh task "{{user_prompt}}"',
2278
- },
2279
- ],
2280
- },
2281
- ],
2282
- Stop: [
2283
- {
2284
- hooks: [
2285
- {
2286
- type: 'command',
2287
- command: '/usr/bin/env bash -c \'if command -v npx >/dev/null 2>&1; then npx claude-flow@alpha hooks session-end --generate-summary true --persist-state true --export-metrics true; else echo "⚠️ npx not available, skipping Claude Flow session-end hook"; fi\'',
2288
- },
2289
- {
2290
- type: 'command',
2291
- command: '/usr/bin/env bash -c \'if [ -f ./.claude/helpers/standard-checkpoint-hooks.sh ]; then ./.claude/helpers/standard-checkpoint-hooks.sh session-end; else echo "⚠️ Checkpoint hooks not found"; fi\'',
2292
- },
2293
- ],
2294
- },
2295
- ],
2296
- },
2297
- includeCoAuthoredBy: true,
2298
- statusLine: {
2299
- type: 'command',
2300
- command: '.claude/statusline-command.sh',
2301
- },
2302
- }, null, 2);
2303
- }
2304
- //# sourceMappingURL=enhanced-templates.js.map