getmy-ruflo 3.5.43

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 (732) hide show
  1. package/bin/ruflo.js +29 -0
  2. package/package.json +50 -0
  3. package/v3/@claude-flow/cli/bin/cli.js +156 -0
  4. package/v3/@claude-flow/cli/bin/mcp-server.js +199 -0
  5. package/v3/@claude-flow/cli/bin/mcp-sse-server.js +596 -0
  6. package/v3/@claude-flow/cli/bin/preinstall.cjs +2 -0
  7. package/v3/@claude-flow/cli/dist/src/appliance/gguf-engine.d.ts +91 -0
  8. package/v3/@claude-flow/cli/dist/src/appliance/gguf-engine.d.ts.map +1 -0
  9. package/v3/@claude-flow/cli/dist/src/appliance/gguf-engine.js +425 -0
  10. package/v3/@claude-flow/cli/dist/src/appliance/gguf-engine.js.map +1 -0
  11. package/v3/@claude-flow/cli/dist/src/appliance/ruvllm-bridge.d.ts +102 -0
  12. package/v3/@claude-flow/cli/dist/src/appliance/ruvllm-bridge.d.ts.map +1 -0
  13. package/v3/@claude-flow/cli/dist/src/appliance/ruvllm-bridge.js +292 -0
  14. package/v3/@claude-flow/cli/dist/src/appliance/ruvllm-bridge.js.map +1 -0
  15. package/v3/@claude-flow/cli/dist/src/appliance/rvfa-builder.d.ts +44 -0
  16. package/v3/@claude-flow/cli/dist/src/appliance/rvfa-builder.d.ts.map +1 -0
  17. package/v3/@claude-flow/cli/dist/src/appliance/rvfa-builder.js +329 -0
  18. package/v3/@claude-flow/cli/dist/src/appliance/rvfa-builder.js.map +1 -0
  19. package/v3/@claude-flow/cli/dist/src/appliance/rvfa-distribution.d.ts +97 -0
  20. package/v3/@claude-flow/cli/dist/src/appliance/rvfa-distribution.d.ts.map +1 -0
  21. package/v3/@claude-flow/cli/dist/src/appliance/rvfa-distribution.js +370 -0
  22. package/v3/@claude-flow/cli/dist/src/appliance/rvfa-distribution.js.map +1 -0
  23. package/v3/@claude-flow/cli/dist/src/appliance/rvfa-format.d.ts +111 -0
  24. package/v3/@claude-flow/cli/dist/src/appliance/rvfa-format.d.ts.map +1 -0
  25. package/v3/@claude-flow/cli/dist/src/appliance/rvfa-format.js +393 -0
  26. package/v3/@claude-flow/cli/dist/src/appliance/rvfa-format.js.map +1 -0
  27. package/v3/@claude-flow/cli/dist/src/appliance/rvfa-runner.d.ts +69 -0
  28. package/v3/@claude-flow/cli/dist/src/appliance/rvfa-runner.d.ts.map +1 -0
  29. package/v3/@claude-flow/cli/dist/src/appliance/rvfa-runner.js +237 -0
  30. package/v3/@claude-flow/cli/dist/src/appliance/rvfa-runner.js.map +1 -0
  31. package/v3/@claude-flow/cli/dist/src/appliance/rvfa-signing.d.ts +123 -0
  32. package/v3/@claude-flow/cli/dist/src/appliance/rvfa-signing.d.ts.map +1 -0
  33. package/v3/@claude-flow/cli/dist/src/appliance/rvfa-signing.js +347 -0
  34. package/v3/@claude-flow/cli/dist/src/appliance/rvfa-signing.js.map +1 -0
  35. package/v3/@claude-flow/cli/dist/src/benchmarks/pretrain/index.d.ts +58 -0
  36. package/v3/@claude-flow/cli/dist/src/benchmarks/pretrain/index.d.ts.map +1 -0
  37. package/v3/@claude-flow/cli/dist/src/benchmarks/pretrain/index.js +404 -0
  38. package/v3/@claude-flow/cli/dist/src/benchmarks/pretrain/index.js.map +1 -0
  39. package/v3/@claude-flow/cli/dist/src/commands/agent.d.ts +8 -0
  40. package/v3/@claude-flow/cli/dist/src/commands/agent.d.ts.map +1 -0
  41. package/v3/@claude-flow/cli/dist/src/commands/agent.js +919 -0
  42. package/v3/@claude-flow/cli/dist/src/commands/agent.js.map +1 -0
  43. package/v3/@claude-flow/cli/dist/src/commands/analyze.d.ts +19 -0
  44. package/v3/@claude-flow/cli/dist/src/commands/analyze.d.ts.map +1 -0
  45. package/v3/@claude-flow/cli/dist/src/commands/analyze.js +1823 -0
  46. package/v3/@claude-flow/cli/dist/src/commands/analyze.js.map +1 -0
  47. package/v3/@claude-flow/cli/dist/src/commands/appliance-advanced.d.ts +9 -0
  48. package/v3/@claude-flow/cli/dist/src/commands/appliance-advanced.d.ts.map +1 -0
  49. package/v3/@claude-flow/cli/dist/src/commands/appliance-advanced.js +215 -0
  50. package/v3/@claude-flow/cli/dist/src/commands/appliance-advanced.js.map +1 -0
  51. package/v3/@claude-flow/cli/dist/src/commands/appliance.d.ts +8 -0
  52. package/v3/@claude-flow/cli/dist/src/commands/appliance.d.ts.map +1 -0
  53. package/v3/@claude-flow/cli/dist/src/commands/appliance.js +406 -0
  54. package/v3/@claude-flow/cli/dist/src/commands/appliance.js.map +1 -0
  55. package/v3/@claude-flow/cli/dist/src/commands/benchmark.d.ts +10 -0
  56. package/v3/@claude-flow/cli/dist/src/commands/benchmark.d.ts.map +1 -0
  57. package/v3/@claude-flow/cli/dist/src/commands/benchmark.js +459 -0
  58. package/v3/@claude-flow/cli/dist/src/commands/benchmark.js.map +1 -0
  59. package/v3/@claude-flow/cli/dist/src/commands/claims.d.ts +10 -0
  60. package/v3/@claude-flow/cli/dist/src/commands/claims.d.ts.map +1 -0
  61. package/v3/@claude-flow/cli/dist/src/commands/claims.js +373 -0
  62. package/v3/@claude-flow/cli/dist/src/commands/claims.js.map +1 -0
  63. package/v3/@claude-flow/cli/dist/src/commands/cleanup.d.ts +13 -0
  64. package/v3/@claude-flow/cli/dist/src/commands/cleanup.d.ts.map +1 -0
  65. package/v3/@claude-flow/cli/dist/src/commands/cleanup.js +218 -0
  66. package/v3/@claude-flow/cli/dist/src/commands/cleanup.js.map +1 -0
  67. package/v3/@claude-flow/cli/dist/src/commands/completions.d.ts +10 -0
  68. package/v3/@claude-flow/cli/dist/src/commands/completions.d.ts.map +1 -0
  69. package/v3/@claude-flow/cli/dist/src/commands/completions.js +539 -0
  70. package/v3/@claude-flow/cli/dist/src/commands/completions.js.map +1 -0
  71. package/v3/@claude-flow/cli/dist/src/commands/config.d.ts +8 -0
  72. package/v3/@claude-flow/cli/dist/src/commands/config.d.ts.map +1 -0
  73. package/v3/@claude-flow/cli/dist/src/commands/config.js +406 -0
  74. package/v3/@claude-flow/cli/dist/src/commands/config.js.map +1 -0
  75. package/v3/@claude-flow/cli/dist/src/commands/daemon.d.ts +8 -0
  76. package/v3/@claude-flow/cli/dist/src/commands/daemon.d.ts.map +1 -0
  77. package/v3/@claude-flow/cli/dist/src/commands/daemon.js +656 -0
  78. package/v3/@claude-flow/cli/dist/src/commands/daemon.js.map +1 -0
  79. package/v3/@claude-flow/cli/dist/src/commands/deployment.d.ts +10 -0
  80. package/v3/@claude-flow/cli/dist/src/commands/deployment.d.ts.map +1 -0
  81. package/v3/@claude-flow/cli/dist/src/commands/deployment.js +289 -0
  82. package/v3/@claude-flow/cli/dist/src/commands/deployment.js.map +1 -0
  83. package/v3/@claude-flow/cli/dist/src/commands/doctor.d.ts +10 -0
  84. package/v3/@claude-flow/cli/dist/src/commands/doctor.d.ts.map +1 -0
  85. package/v3/@claude-flow/cli/dist/src/commands/doctor.js +619 -0
  86. package/v3/@claude-flow/cli/dist/src/commands/doctor.js.map +1 -0
  87. package/v3/@claude-flow/cli/dist/src/commands/embeddings.d.ts +18 -0
  88. package/v3/@claude-flow/cli/dist/src/commands/embeddings.d.ts.map +1 -0
  89. package/v3/@claude-flow/cli/dist/src/commands/embeddings.js +1576 -0
  90. package/v3/@claude-flow/cli/dist/src/commands/embeddings.js.map +1 -0
  91. package/v3/@claude-flow/cli/dist/src/commands/guidance.d.ts +8 -0
  92. package/v3/@claude-flow/cli/dist/src/commands/guidance.d.ts.map +1 -0
  93. package/v3/@claude-flow/cli/dist/src/commands/guidance.js +560 -0
  94. package/v3/@claude-flow/cli/dist/src/commands/guidance.js.map +1 -0
  95. package/v3/@claude-flow/cli/dist/src/commands/hive-mind.d.ts +11 -0
  96. package/v3/@claude-flow/cli/dist/src/commands/hive-mind.d.ts.map +1 -0
  97. package/v3/@claude-flow/cli/dist/src/commands/hive-mind.js +1230 -0
  98. package/v3/@claude-flow/cli/dist/src/commands/hive-mind.js.map +1 -0
  99. package/v3/@claude-flow/cli/dist/src/commands/hooks.d.ts +8 -0
  100. package/v3/@claude-flow/cli/dist/src/commands/hooks.d.ts.map +1 -0
  101. package/v3/@claude-flow/cli/dist/src/commands/hooks.js +4441 -0
  102. package/v3/@claude-flow/cli/dist/src/commands/hooks.js.map +1 -0
  103. package/v3/@claude-flow/cli/dist/src/commands/index.d.ts +115 -0
  104. package/v3/@claude-flow/cli/dist/src/commands/index.d.ts.map +1 -0
  105. package/v3/@claude-flow/cli/dist/src/commands/index.js +377 -0
  106. package/v3/@claude-flow/cli/dist/src/commands/index.js.map +1 -0
  107. package/v3/@claude-flow/cli/dist/src/commands/init.d.ts +8 -0
  108. package/v3/@claude-flow/cli/dist/src/commands/init.d.ts.map +1 -0
  109. package/v3/@claude-flow/cli/dist/src/commands/init.js +969 -0
  110. package/v3/@claude-flow/cli/dist/src/commands/init.js.map +1 -0
  111. package/v3/@claude-flow/cli/dist/src/commands/issues.d.ts +21 -0
  112. package/v3/@claude-flow/cli/dist/src/commands/issues.d.ts.map +1 -0
  113. package/v3/@claude-flow/cli/dist/src/commands/issues.js +567 -0
  114. package/v3/@claude-flow/cli/dist/src/commands/issues.js.map +1 -0
  115. package/v3/@claude-flow/cli/dist/src/commands/mcp.d.ts +11 -0
  116. package/v3/@claude-flow/cli/dist/src/commands/mcp.d.ts.map +1 -0
  117. package/v3/@claude-flow/cli/dist/src/commands/mcp.js +779 -0
  118. package/v3/@claude-flow/cli/dist/src/commands/mcp.js.map +1 -0
  119. package/v3/@claude-flow/cli/dist/src/commands/memory.d.ts +8 -0
  120. package/v3/@claude-flow/cli/dist/src/commands/memory.d.ts.map +1 -0
  121. package/v3/@claude-flow/cli/dist/src/commands/memory.js +1292 -0
  122. package/v3/@claude-flow/cli/dist/src/commands/memory.js.map +1 -0
  123. package/v3/@claude-flow/cli/dist/src/commands/migrate.d.ts +8 -0
  124. package/v3/@claude-flow/cli/dist/src/commands/migrate.d.ts.map +1 -0
  125. package/v3/@claude-flow/cli/dist/src/commands/migrate.js +410 -0
  126. package/v3/@claude-flow/cli/dist/src/commands/migrate.js.map +1 -0
  127. package/v3/@claude-flow/cli/dist/src/commands/neural.d.ts +10 -0
  128. package/v3/@claude-flow/cli/dist/src/commands/neural.d.ts.map +1 -0
  129. package/v3/@claude-flow/cli/dist/src/commands/neural.js +1454 -0
  130. package/v3/@claude-flow/cli/dist/src/commands/neural.js.map +1 -0
  131. package/v3/@claude-flow/cli/dist/src/commands/performance.d.ts +10 -0
  132. package/v3/@claude-flow/cli/dist/src/commands/performance.d.ts.map +1 -0
  133. package/v3/@claude-flow/cli/dist/src/commands/performance.js +579 -0
  134. package/v3/@claude-flow/cli/dist/src/commands/performance.js.map +1 -0
  135. package/v3/@claude-flow/cli/dist/src/commands/plugins.d.ts +11 -0
  136. package/v3/@claude-flow/cli/dist/src/commands/plugins.d.ts.map +1 -0
  137. package/v3/@claude-flow/cli/dist/src/commands/plugins.js +820 -0
  138. package/v3/@claude-flow/cli/dist/src/commands/plugins.js.map +1 -0
  139. package/v3/@claude-flow/cli/dist/src/commands/process.d.ts +10 -0
  140. package/v3/@claude-flow/cli/dist/src/commands/process.d.ts.map +1 -0
  141. package/v3/@claude-flow/cli/dist/src/commands/process.js +641 -0
  142. package/v3/@claude-flow/cli/dist/src/commands/process.js.map +1 -0
  143. package/v3/@claude-flow/cli/dist/src/commands/progress.d.ts +11 -0
  144. package/v3/@claude-flow/cli/dist/src/commands/progress.d.ts.map +1 -0
  145. package/v3/@claude-flow/cli/dist/src/commands/progress.js +259 -0
  146. package/v3/@claude-flow/cli/dist/src/commands/progress.js.map +1 -0
  147. package/v3/@claude-flow/cli/dist/src/commands/providers.d.ts +10 -0
  148. package/v3/@claude-flow/cli/dist/src/commands/providers.d.ts.map +1 -0
  149. package/v3/@claude-flow/cli/dist/src/commands/providers.js +232 -0
  150. package/v3/@claude-flow/cli/dist/src/commands/providers.js.map +1 -0
  151. package/v3/@claude-flow/cli/dist/src/commands/route.d.ts +16 -0
  152. package/v3/@claude-flow/cli/dist/src/commands/route.d.ts.map +1 -0
  153. package/v3/@claude-flow/cli/dist/src/commands/route.js +813 -0
  154. package/v3/@claude-flow/cli/dist/src/commands/route.js.map +1 -0
  155. package/v3/@claude-flow/cli/dist/src/commands/ruvector/backup.d.ts +11 -0
  156. package/v3/@claude-flow/cli/dist/src/commands/ruvector/backup.d.ts.map +1 -0
  157. package/v3/@claude-flow/cli/dist/src/commands/ruvector/backup.js +746 -0
  158. package/v3/@claude-flow/cli/dist/src/commands/ruvector/backup.js.map +1 -0
  159. package/v3/@claude-flow/cli/dist/src/commands/ruvector/benchmark.d.ts +11 -0
  160. package/v3/@claude-flow/cli/dist/src/commands/ruvector/benchmark.d.ts.map +1 -0
  161. package/v3/@claude-flow/cli/dist/src/commands/ruvector/benchmark.js +480 -0
  162. package/v3/@claude-flow/cli/dist/src/commands/ruvector/benchmark.js.map +1 -0
  163. package/v3/@claude-flow/cli/dist/src/commands/ruvector/import.d.ts +18 -0
  164. package/v3/@claude-flow/cli/dist/src/commands/ruvector/import.d.ts.map +1 -0
  165. package/v3/@claude-flow/cli/dist/src/commands/ruvector/import.js +349 -0
  166. package/v3/@claude-flow/cli/dist/src/commands/ruvector/import.js.map +1 -0
  167. package/v3/@claude-flow/cli/dist/src/commands/ruvector/index.d.ts +29 -0
  168. package/v3/@claude-flow/cli/dist/src/commands/ruvector/index.d.ts.map +1 -0
  169. package/v3/@claude-flow/cli/dist/src/commands/ruvector/index.js +129 -0
  170. package/v3/@claude-flow/cli/dist/src/commands/ruvector/index.js.map +1 -0
  171. package/v3/@claude-flow/cli/dist/src/commands/ruvector/init.d.ts +11 -0
  172. package/v3/@claude-flow/cli/dist/src/commands/ruvector/init.d.ts.map +1 -0
  173. package/v3/@claude-flow/cli/dist/src/commands/ruvector/init.js +431 -0
  174. package/v3/@claude-flow/cli/dist/src/commands/ruvector/init.js.map +1 -0
  175. package/v3/@claude-flow/cli/dist/src/commands/ruvector/migrate.d.ts +11 -0
  176. package/v3/@claude-flow/cli/dist/src/commands/ruvector/migrate.d.ts.map +1 -0
  177. package/v3/@claude-flow/cli/dist/src/commands/ruvector/migrate.js +481 -0
  178. package/v3/@claude-flow/cli/dist/src/commands/ruvector/migrate.js.map +1 -0
  179. package/v3/@claude-flow/cli/dist/src/commands/ruvector/optimize.d.ts +11 -0
  180. package/v3/@claude-flow/cli/dist/src/commands/ruvector/optimize.d.ts.map +1 -0
  181. package/v3/@claude-flow/cli/dist/src/commands/ruvector/optimize.js +503 -0
  182. package/v3/@claude-flow/cli/dist/src/commands/ruvector/optimize.js.map +1 -0
  183. package/v3/@claude-flow/cli/dist/src/commands/ruvector/setup.d.ts +18 -0
  184. package/v3/@claude-flow/cli/dist/src/commands/ruvector/setup.d.ts.map +1 -0
  185. package/v3/@claude-flow/cli/dist/src/commands/ruvector/setup.js +765 -0
  186. package/v3/@claude-flow/cli/dist/src/commands/ruvector/setup.js.map +1 -0
  187. package/v3/@claude-flow/cli/dist/src/commands/ruvector/status.d.ts +11 -0
  188. package/v3/@claude-flow/cli/dist/src/commands/ruvector/status.d.ts.map +1 -0
  189. package/v3/@claude-flow/cli/dist/src/commands/ruvector/status.js +456 -0
  190. package/v3/@claude-flow/cli/dist/src/commands/ruvector/status.js.map +1 -0
  191. package/v3/@claude-flow/cli/dist/src/commands/security.d.ts +10 -0
  192. package/v3/@claude-flow/cli/dist/src/commands/security.d.ts.map +1 -0
  193. package/v3/@claude-flow/cli/dist/src/commands/security.js +606 -0
  194. package/v3/@claude-flow/cli/dist/src/commands/security.js.map +1 -0
  195. package/v3/@claude-flow/cli/dist/src/commands/session.d.ts +8 -0
  196. package/v3/@claude-flow/cli/dist/src/commands/session.d.ts.map +1 -0
  197. package/v3/@claude-flow/cli/dist/src/commands/session.js +750 -0
  198. package/v3/@claude-flow/cli/dist/src/commands/session.js.map +1 -0
  199. package/v3/@claude-flow/cli/dist/src/commands/start.d.ts +8 -0
  200. package/v3/@claude-flow/cli/dist/src/commands/start.d.ts.map +1 -0
  201. package/v3/@claude-flow/cli/dist/src/commands/start.js +418 -0
  202. package/v3/@claude-flow/cli/dist/src/commands/start.js.map +1 -0
  203. package/v3/@claude-flow/cli/dist/src/commands/status.d.ts +8 -0
  204. package/v3/@claude-flow/cli/dist/src/commands/status.d.ts.map +1 -0
  205. package/v3/@claude-flow/cli/dist/src/commands/status.js +591 -0
  206. package/v3/@claude-flow/cli/dist/src/commands/status.js.map +1 -0
  207. package/v3/@claude-flow/cli/dist/src/commands/swarm.d.ts +8 -0
  208. package/v3/@claude-flow/cli/dist/src/commands/swarm.d.ts.map +1 -0
  209. package/v3/@claude-flow/cli/dist/src/commands/swarm.js +748 -0
  210. package/v3/@claude-flow/cli/dist/src/commands/swarm.js.map +1 -0
  211. package/v3/@claude-flow/cli/dist/src/commands/task.d.ts +8 -0
  212. package/v3/@claude-flow/cli/dist/src/commands/task.d.ts.map +1 -0
  213. package/v3/@claude-flow/cli/dist/src/commands/task.js +671 -0
  214. package/v3/@claude-flow/cli/dist/src/commands/task.js.map +1 -0
  215. package/v3/@claude-flow/cli/dist/src/commands/transfer-store.d.ts +13 -0
  216. package/v3/@claude-flow/cli/dist/src/commands/transfer-store.d.ts.map +1 -0
  217. package/v3/@claude-flow/cli/dist/src/commands/transfer-store.js +428 -0
  218. package/v3/@claude-flow/cli/dist/src/commands/transfer-store.js.map +1 -0
  219. package/v3/@claude-flow/cli/dist/src/commands/update.d.ts +8 -0
  220. package/v3/@claude-flow/cli/dist/src/commands/update.d.ts.map +1 -0
  221. package/v3/@claude-flow/cli/dist/src/commands/update.js +276 -0
  222. package/v3/@claude-flow/cli/dist/src/commands/update.js.map +1 -0
  223. package/v3/@claude-flow/cli/dist/src/commands/workflow.d.ts +8 -0
  224. package/v3/@claude-flow/cli/dist/src/commands/workflow.d.ts.map +1 -0
  225. package/v3/@claude-flow/cli/dist/src/commands/workflow.js +617 -0
  226. package/v3/@claude-flow/cli/dist/src/commands/workflow.js.map +1 -0
  227. package/v3/@claude-flow/cli/dist/src/config-adapter.d.ts +15 -0
  228. package/v3/@claude-flow/cli/dist/src/config-adapter.d.ts.map +1 -0
  229. package/v3/@claude-flow/cli/dist/src/config-adapter.js +186 -0
  230. package/v3/@claude-flow/cli/dist/src/config-adapter.js.map +1 -0
  231. package/v3/@claude-flow/cli/dist/src/index.d.ts +76 -0
  232. package/v3/@claude-flow/cli/dist/src/index.d.ts.map +1 -0
  233. package/v3/@claude-flow/cli/dist/src/index.js +472 -0
  234. package/v3/@claude-flow/cli/dist/src/index.js.map +1 -0
  235. package/v3/@claude-flow/cli/dist/src/infrastructure/in-memory-repositories.d.ts +68 -0
  236. package/v3/@claude-flow/cli/dist/src/infrastructure/in-memory-repositories.d.ts.map +1 -0
  237. package/v3/@claude-flow/cli/dist/src/infrastructure/in-memory-repositories.js +264 -0
  238. package/v3/@claude-flow/cli/dist/src/infrastructure/in-memory-repositories.js.map +1 -0
  239. package/v3/@claude-flow/cli/dist/src/init/claudemd-generator.d.ts +25 -0
  240. package/v3/@claude-flow/cli/dist/src/init/claudemd-generator.d.ts.map +1 -0
  241. package/v3/@claude-flow/cli/dist/src/init/claudemd-generator.js +486 -0
  242. package/v3/@claude-flow/cli/dist/src/init/claudemd-generator.js.map +1 -0
  243. package/v3/@claude-flow/cli/dist/src/init/executor.d.ts +41 -0
  244. package/v3/@claude-flow/cli/dist/src/init/executor.d.ts.map +1 -0
  245. package/v3/@claude-flow/cli/dist/src/init/executor.js +1738 -0
  246. package/v3/@claude-flow/cli/dist/src/init/executor.js.map +1 -0
  247. package/v3/@claude-flow/cli/dist/src/init/helpers-generator.d.ts +60 -0
  248. package/v3/@claude-flow/cli/dist/src/init/helpers-generator.d.ts.map +1 -0
  249. package/v3/@claude-flow/cli/dist/src/init/helpers-generator.js +1181 -0
  250. package/v3/@claude-flow/cli/dist/src/init/helpers-generator.js.map +1 -0
  251. package/v3/@claude-flow/cli/dist/src/init/index.d.ts +13 -0
  252. package/v3/@claude-flow/cli/dist/src/init/index.d.ts.map +1 -0
  253. package/v3/@claude-flow/cli/dist/src/init/index.js +15 -0
  254. package/v3/@claude-flow/cli/dist/src/init/index.js.map +1 -0
  255. package/v3/@claude-flow/cli/dist/src/init/mcp-generator.d.ts +26 -0
  256. package/v3/@claude-flow/cli/dist/src/init/mcp-generator.d.ts.map +1 -0
  257. package/v3/@claude-flow/cli/dist/src/init/mcp-generator.js +116 -0
  258. package/v3/@claude-flow/cli/dist/src/init/mcp-generator.js.map +1 -0
  259. package/v3/@claude-flow/cli/dist/src/init/settings-generator.d.ts +14 -0
  260. package/v3/@claude-flow/cli/dist/src/init/settings-generator.d.ts.map +1 -0
  261. package/v3/@claude-flow/cli/dist/src/init/settings-generator.js +403 -0
  262. package/v3/@claude-flow/cli/dist/src/init/settings-generator.js.map +1 -0
  263. package/v3/@claude-flow/cli/dist/src/init/statusline-generator.d.ts +28 -0
  264. package/v3/@claude-flow/cli/dist/src/init/statusline-generator.d.ts.map +1 -0
  265. package/v3/@claude-flow/cli/dist/src/init/statusline-generator.js +833 -0
  266. package/v3/@claude-flow/cli/dist/src/init/statusline-generator.js.map +1 -0
  267. package/v3/@claude-flow/cli/dist/src/init/types.d.ts +295 -0
  268. package/v3/@claude-flow/cli/dist/src/init/types.d.ts.map +1 -0
  269. package/v3/@claude-flow/cli/dist/src/init/types.js +263 -0
  270. package/v3/@claude-flow/cli/dist/src/init/types.js.map +1 -0
  271. package/v3/@claude-flow/cli/dist/src/mcp-client.d.ts +98 -0
  272. package/v3/@claude-flow/cli/dist/src/mcp-client.d.ts.map +1 -0
  273. package/v3/@claude-flow/cli/dist/src/mcp-client.js +278 -0
  274. package/v3/@claude-flow/cli/dist/src/mcp-client.js.map +1 -0
  275. package/v3/@claude-flow/cli/dist/src/mcp-server.d.ts +161 -0
  276. package/v3/@claude-flow/cli/dist/src/mcp-server.d.ts.map +1 -0
  277. package/v3/@claude-flow/cli/dist/src/mcp-server.js +627 -0
  278. package/v3/@claude-flow/cli/dist/src/mcp-server.js.map +1 -0
  279. package/v3/@claude-flow/cli/dist/src/mcp-tools/agent-tools.d.ts +49 -0
  280. package/v3/@claude-flow/cli/dist/src/mcp-tools/agent-tools.d.ts.map +1 -0
  281. package/v3/@claude-flow/cli/dist/src/mcp-tools/agent-tools.js +622 -0
  282. package/v3/@claude-flow/cli/dist/src/mcp-tools/agent-tools.js.map +1 -0
  283. package/v3/@claude-flow/cli/dist/src/mcp-tools/agentdb-tools.d.ts +30 -0
  284. package/v3/@claude-flow/cli/dist/src/mcp-tools/agentdb-tools.d.ts.map +1 -0
  285. package/v3/@claude-flow/cli/dist/src/mcp-tools/agentdb-tools.js +557 -0
  286. package/v3/@claude-flow/cli/dist/src/mcp-tools/agentdb-tools.js.map +1 -0
  287. package/v3/@claude-flow/cli/dist/src/mcp-tools/analyze-tools.d.ts +38 -0
  288. package/v3/@claude-flow/cli/dist/src/mcp-tools/analyze-tools.d.ts.map +1 -0
  289. package/v3/@claude-flow/cli/dist/src/mcp-tools/analyze-tools.js +317 -0
  290. package/v3/@claude-flow/cli/dist/src/mcp-tools/analyze-tools.js.map +1 -0
  291. package/v3/@claude-flow/cli/dist/src/mcp-tools/auto-install.d.ts +83 -0
  292. package/v3/@claude-flow/cli/dist/src/mcp-tools/auto-install.d.ts.map +1 -0
  293. package/v3/@claude-flow/cli/dist/src/mcp-tools/auto-install.js +131 -0
  294. package/v3/@claude-flow/cli/dist/src/mcp-tools/auto-install.js.map +1 -0
  295. package/v3/@claude-flow/cli/dist/src/mcp-tools/browser-tools.d.ts +10 -0
  296. package/v3/@claude-flow/cli/dist/src/mcp-tools/browser-tools.d.ts.map +1 -0
  297. package/v3/@claude-flow/cli/dist/src/mcp-tools/browser-tools.js +639 -0
  298. package/v3/@claude-flow/cli/dist/src/mcp-tools/browser-tools.js.map +1 -0
  299. package/v3/@claude-flow/cli/dist/src/mcp-tools/claims-tools.d.ts +12 -0
  300. package/v3/@claude-flow/cli/dist/src/mcp-tools/claims-tools.d.ts.map +1 -0
  301. package/v3/@claude-flow/cli/dist/src/mcp-tools/claims-tools.js +732 -0
  302. package/v3/@claude-flow/cli/dist/src/mcp-tools/claims-tools.js.map +1 -0
  303. package/v3/@claude-flow/cli/dist/src/mcp-tools/config-tools.d.ts +8 -0
  304. package/v3/@claude-flow/cli/dist/src/mcp-tools/config-tools.d.ts.map +1 -0
  305. package/v3/@claude-flow/cli/dist/src/mcp-tools/config-tools.js +352 -0
  306. package/v3/@claude-flow/cli/dist/src/mcp-tools/config-tools.js.map +1 -0
  307. package/v3/@claude-flow/cli/dist/src/mcp-tools/coordination-tools.d.ts +13 -0
  308. package/v3/@claude-flow/cli/dist/src/mcp-tools/coordination-tools.d.ts.map +1 -0
  309. package/v3/@claude-flow/cli/dist/src/mcp-tools/coordination-tools.js +827 -0
  310. package/v3/@claude-flow/cli/dist/src/mcp-tools/coordination-tools.js.map +1 -0
  311. package/v3/@claude-flow/cli/dist/src/mcp-tools/daa-tools.d.ts +13 -0
  312. package/v3/@claude-flow/cli/dist/src/mcp-tools/daa-tools.d.ts.map +1 -0
  313. package/v3/@claude-flow/cli/dist/src/mcp-tools/daa-tools.js +426 -0
  314. package/v3/@claude-flow/cli/dist/src/mcp-tools/daa-tools.js.map +1 -0
  315. package/v3/@claude-flow/cli/dist/src/mcp-tools/dev-tools.d.ts +11 -0
  316. package/v3/@claude-flow/cli/dist/src/mcp-tools/dev-tools.d.ts.map +1 -0
  317. package/v3/@claude-flow/cli/dist/src/mcp-tools/dev-tools.js +713 -0
  318. package/v3/@claude-flow/cli/dist/src/mcp-tools/dev-tools.js.map +1 -0
  319. package/v3/@claude-flow/cli/dist/src/mcp-tools/embeddings-tools.d.ts +9 -0
  320. package/v3/@claude-flow/cli/dist/src/mcp-tools/embeddings-tools.d.ts.map +1 -0
  321. package/v3/@claude-flow/cli/dist/src/mcp-tools/embeddings-tools.js +782 -0
  322. package/v3/@claude-flow/cli/dist/src/mcp-tools/embeddings-tools.js.map +1 -0
  323. package/v3/@claude-flow/cli/dist/src/mcp-tools/github-tools.d.ts +13 -0
  324. package/v3/@claude-flow/cli/dist/src/mcp-tools/github-tools.d.ts.map +1 -0
  325. package/v3/@claude-flow/cli/dist/src/mcp-tools/github-tools.js +373 -0
  326. package/v3/@claude-flow/cli/dist/src/mcp-tools/github-tools.js.map +1 -0
  327. package/v3/@claude-flow/cli/dist/src/mcp-tools/hive-mind-tools.d.ts +8 -0
  328. package/v3/@claude-flow/cli/dist/src/mcp-tools/hive-mind-tools.d.ts.map +1 -0
  329. package/v3/@claude-flow/cli/dist/src/mcp-tools/hive-mind-tools.js +811 -0
  330. package/v3/@claude-flow/cli/dist/src/mcp-tools/hive-mind-tools.js.map +1 -0
  331. package/v3/@claude-flow/cli/dist/src/mcp-tools/hooks-tools.d.ts +44 -0
  332. package/v3/@claude-flow/cli/dist/src/mcp-tools/hooks-tools.d.ts.map +1 -0
  333. package/v3/@claude-flow/cli/dist/src/mcp-tools/hooks-tools.js +3112 -0
  334. package/v3/@claude-flow/cli/dist/src/mcp-tools/hooks-tools.js.map +1 -0
  335. package/v3/@claude-flow/cli/dist/src/mcp-tools/index.d.ts +29 -0
  336. package/v3/@claude-flow/cli/dist/src/mcp-tools/index.d.ts.map +1 -0
  337. package/v3/@claude-flow/cli/dist/src/mcp-tools/index.js +28 -0
  338. package/v3/@claude-flow/cli/dist/src/mcp-tools/index.js.map +1 -0
  339. package/v3/@claude-flow/cli/dist/src/mcp-tools/infrastructure-tools.d.ts +10 -0
  340. package/v3/@claude-flow/cli/dist/src/mcp-tools/infrastructure-tools.d.ts.map +1 -0
  341. package/v3/@claude-flow/cli/dist/src/mcp-tools/infrastructure-tools.js +547 -0
  342. package/v3/@claude-flow/cli/dist/src/mcp-tools/infrastructure-tools.js.map +1 -0
  343. package/v3/@claude-flow/cli/dist/src/mcp-tools/memory-tools.d.ts +14 -0
  344. package/v3/@claude-flow/cli/dist/src/mcp-tools/memory-tools.d.ts.map +1 -0
  345. package/v3/@claude-flow/cli/dist/src/mcp-tools/memory-tools.js +512 -0
  346. package/v3/@claude-flow/cli/dist/src/mcp-tools/memory-tools.js.map +1 -0
  347. package/v3/@claude-flow/cli/dist/src/mcp-tools/neural-tools.d.ts +16 -0
  348. package/v3/@claude-flow/cli/dist/src/mcp-tools/neural-tools.d.ts.map +1 -0
  349. package/v3/@claude-flow/cli/dist/src/mcp-tools/neural-tools.js +461 -0
  350. package/v3/@claude-flow/cli/dist/src/mcp-tools/neural-tools.js.map +1 -0
  351. package/v3/@claude-flow/cli/dist/src/mcp-tools/performance-tools.d.ts +16 -0
  352. package/v3/@claude-flow/cli/dist/src/mcp-tools/performance-tools.d.ts.map +1 -0
  353. package/v3/@claude-flow/cli/dist/src/mcp-tools/performance-tools.js +534 -0
  354. package/v3/@claude-flow/cli/dist/src/mcp-tools/performance-tools.js.map +1 -0
  355. package/v3/@claude-flow/cli/dist/src/mcp-tools/plugin-tools.d.ts +19 -0
  356. package/v3/@claude-flow/cli/dist/src/mcp-tools/plugin-tools.d.ts.map +1 -0
  357. package/v3/@claude-flow/cli/dist/src/mcp-tools/plugin-tools.js +135 -0
  358. package/v3/@claude-flow/cli/dist/src/mcp-tools/plugin-tools.js.map +1 -0
  359. package/v3/@claude-flow/cli/dist/src/mcp-tools/process-manager-tools.d.ts +9 -0
  360. package/v3/@claude-flow/cli/dist/src/mcp-tools/process-manager-tools.d.ts.map +1 -0
  361. package/v3/@claude-flow/cli/dist/src/mcp-tools/process-manager-tools.js +516 -0
  362. package/v3/@claude-flow/cli/dist/src/mcp-tools/process-manager-tools.js.map +1 -0
  363. package/v3/@claude-flow/cli/dist/src/mcp-tools/progress-tools.d.ts +14 -0
  364. package/v3/@claude-flow/cli/dist/src/mcp-tools/progress-tools.d.ts.map +1 -0
  365. package/v3/@claude-flow/cli/dist/src/mcp-tools/progress-tools.js +348 -0
  366. package/v3/@claude-flow/cli/dist/src/mcp-tools/progress-tools.js.map +1 -0
  367. package/v3/@claude-flow/cli/dist/src/mcp-tools/refactor-tools.d.ts +10 -0
  368. package/v3/@claude-flow/cli/dist/src/mcp-tools/refactor-tools.d.ts.map +1 -0
  369. package/v3/@claude-flow/cli/dist/src/mcp-tools/refactor-tools.js +471 -0
  370. package/v3/@claude-flow/cli/dist/src/mcp-tools/refactor-tools.js.map +1 -0
  371. package/v3/@claude-flow/cli/dist/src/mcp-tools/ruvllm-tools.d.ts +9 -0
  372. package/v3/@claude-flow/cli/dist/src/mcp-tools/ruvllm-tools.d.ts.map +1 -0
  373. package/v3/@claude-flow/cli/dist/src/mcp-tools/ruvllm-tools.js +283 -0
  374. package/v3/@claude-flow/cli/dist/src/mcp-tools/ruvllm-tools.js.map +1 -0
  375. package/v3/@claude-flow/cli/dist/src/mcp-tools/security-tools.d.ts +18 -0
  376. package/v3/@claude-flow/cli/dist/src/mcp-tools/security-tools.d.ts.map +1 -0
  377. package/v3/@claude-flow/cli/dist/src/mcp-tools/security-tools.js +434 -0
  378. package/v3/@claude-flow/cli/dist/src/mcp-tools/security-tools.js.map +1 -0
  379. package/v3/@claude-flow/cli/dist/src/mcp-tools/session-tools.d.ts +8 -0
  380. package/v3/@claude-flow/cli/dist/src/mcp-tools/session-tools.d.ts.map +1 -0
  381. package/v3/@claude-flow/cli/dist/src/mcp-tools/session-tools.js +315 -0
  382. package/v3/@claude-flow/cli/dist/src/mcp-tools/session-tools.js.map +1 -0
  383. package/v3/@claude-flow/cli/dist/src/mcp-tools/skill-dispatch-tools.d.ts +17 -0
  384. package/v3/@claude-flow/cli/dist/src/mcp-tools/skill-dispatch-tools.d.ts.map +1 -0
  385. package/v3/@claude-flow/cli/dist/src/mcp-tools/skill-dispatch-tools.js +384 -0
  386. package/v3/@claude-flow/cli/dist/src/mcp-tools/skill-dispatch-tools.js.map +1 -0
  387. package/v3/@claude-flow/cli/dist/src/mcp-tools/skills-tools.d.ts +14 -0
  388. package/v3/@claude-flow/cli/dist/src/mcp-tools/skills-tools.d.ts.map +1 -0
  389. package/v3/@claude-flow/cli/dist/src/mcp-tools/skills-tools.js +295 -0
  390. package/v3/@claude-flow/cli/dist/src/mcp-tools/skills-tools.js.map +1 -0
  391. package/v3/@claude-flow/cli/dist/src/mcp-tools/swarm-tools.d.ts +9 -0
  392. package/v3/@claude-flow/cli/dist/src/mcp-tools/swarm-tools.d.ts.map +1 -0
  393. package/v3/@claude-flow/cli/dist/src/mcp-tools/swarm-tools.js +321 -0
  394. package/v3/@claude-flow/cli/dist/src/mcp-tools/swarm-tools.js.map +1 -0
  395. package/v3/@claude-flow/cli/dist/src/mcp-tools/system-tools.d.ts +13 -0
  396. package/v3/@claude-flow/cli/dist/src/mcp-tools/system-tools.d.ts.map +1 -0
  397. package/v3/@claude-flow/cli/dist/src/mcp-tools/system-tools.js +417 -0
  398. package/v3/@claude-flow/cli/dist/src/mcp-tools/system-tools.js.map +1 -0
  399. package/v3/@claude-flow/cli/dist/src/mcp-tools/task-tools.d.ts +8 -0
  400. package/v3/@claude-flow/cli/dist/src/mcp-tools/task-tools.d.ts.map +1 -0
  401. package/v3/@claude-flow/cli/dist/src/mcp-tools/task-tools.js +404 -0
  402. package/v3/@claude-flow/cli/dist/src/mcp-tools/task-tools.js.map +1 -0
  403. package/v3/@claude-flow/cli/dist/src/mcp-tools/terminal-tools.d.ts +15 -0
  404. package/v3/@claude-flow/cli/dist/src/mcp-tools/terminal-tools.d.ts.map +1 -0
  405. package/v3/@claude-flow/cli/dist/src/mcp-tools/terminal-tools.js +339 -0
  406. package/v3/@claude-flow/cli/dist/src/mcp-tools/terminal-tools.js.map +1 -0
  407. package/v3/@claude-flow/cli/dist/src/mcp-tools/transfer-tools.d.ts +14 -0
  408. package/v3/@claude-flow/cli/dist/src/mcp-tools/transfer-tools.d.ts.map +1 -0
  409. package/v3/@claude-flow/cli/dist/src/mcp-tools/transfer-tools.js +396 -0
  410. package/v3/@claude-flow/cli/dist/src/mcp-tools/transfer-tools.js.map +1 -0
  411. package/v3/@claude-flow/cli/dist/src/mcp-tools/types.d.ts +31 -0
  412. package/v3/@claude-flow/cli/dist/src/mcp-tools/types.d.ts.map +1 -0
  413. package/v3/@claude-flow/cli/dist/src/mcp-tools/types.js +7 -0
  414. package/v3/@claude-flow/cli/dist/src/mcp-tools/types.js.map +1 -0
  415. package/v3/@claude-flow/cli/dist/src/mcp-tools/wasm-agent-tools.d.ts +9 -0
  416. package/v3/@claude-flow/cli/dist/src/mcp-tools/wasm-agent-tools.d.ts.map +1 -0
  417. package/v3/@claude-flow/cli/dist/src/mcp-tools/wasm-agent-tools.js +230 -0
  418. package/v3/@claude-flow/cli/dist/src/mcp-tools/wasm-agent-tools.js.map +1 -0
  419. package/v3/@claude-flow/cli/dist/src/mcp-tools/workflow-tools.d.ts +8 -0
  420. package/v3/@claude-flow/cli/dist/src/mcp-tools/workflow-tools.d.ts.map +1 -0
  421. package/v3/@claude-flow/cli/dist/src/mcp-tools/workflow-tools.js +572 -0
  422. package/v3/@claude-flow/cli/dist/src/mcp-tools/workflow-tools.js.map +1 -0
  423. package/v3/@claude-flow/cli/dist/src/memory/ewc-consolidation.d.ts +295 -0
  424. package/v3/@claude-flow/cli/dist/src/memory/ewc-consolidation.d.ts.map +1 -0
  425. package/v3/@claude-flow/cli/dist/src/memory/ewc-consolidation.js +601 -0
  426. package/v3/@claude-flow/cli/dist/src/memory/ewc-consolidation.js.map +1 -0
  427. package/v3/@claude-flow/cli/dist/src/memory/intelligence.d.ts +338 -0
  428. package/v3/@claude-flow/cli/dist/src/memory/intelligence.d.ts.map +1 -0
  429. package/v3/@claude-flow/cli/dist/src/memory/intelligence.js +1023 -0
  430. package/v3/@claude-flow/cli/dist/src/memory/intelligence.js.map +1 -0
  431. package/v3/@claude-flow/cli/dist/src/memory/memory-bridge.d.ts +407 -0
  432. package/v3/@claude-flow/cli/dist/src/memory/memory-bridge.d.ts.map +1 -0
  433. package/v3/@claude-flow/cli/dist/src/memory/memory-bridge.js +1494 -0
  434. package/v3/@claude-flow/cli/dist/src/memory/memory-bridge.js.map +1 -0
  435. package/v3/@claude-flow/cli/dist/src/memory/memory-initializer.d.ts +434 -0
  436. package/v3/@claude-flow/cli/dist/src/memory/memory-initializer.d.ts.map +1 -0
  437. package/v3/@claude-flow/cli/dist/src/memory/memory-initializer.js +2243 -0
  438. package/v3/@claude-flow/cli/dist/src/memory/memory-initializer.js.map +1 -0
  439. package/v3/@claude-flow/cli/dist/src/memory/sona-optimizer.d.ts +227 -0
  440. package/v3/@claude-flow/cli/dist/src/memory/sona-optimizer.d.ts.map +1 -0
  441. package/v3/@claude-flow/cli/dist/src/memory/sona-optimizer.js +633 -0
  442. package/v3/@claude-flow/cli/dist/src/memory/sona-optimizer.js.map +1 -0
  443. package/v3/@claude-flow/cli/dist/src/output.d.ts +133 -0
  444. package/v3/@claude-flow/cli/dist/src/output.d.ts.map +1 -0
  445. package/v3/@claude-flow/cli/dist/src/output.js +514 -0
  446. package/v3/@claude-flow/cli/dist/src/output.js.map +1 -0
  447. package/v3/@claude-flow/cli/dist/src/parser.d.ts +51 -0
  448. package/v3/@claude-flow/cli/dist/src/parser.d.ts.map +1 -0
  449. package/v3/@claude-flow/cli/dist/src/parser.js +423 -0
  450. package/v3/@claude-flow/cli/dist/src/parser.js.map +1 -0
  451. package/v3/@claude-flow/cli/dist/src/plugins/manager.d.ts +133 -0
  452. package/v3/@claude-flow/cli/dist/src/plugins/manager.d.ts.map +1 -0
  453. package/v3/@claude-flow/cli/dist/src/plugins/manager.js +400 -0
  454. package/v3/@claude-flow/cli/dist/src/plugins/manager.js.map +1 -0
  455. package/v3/@claude-flow/cli/dist/src/plugins/store/discovery.d.ts +88 -0
  456. package/v3/@claude-flow/cli/dist/src/plugins/store/discovery.d.ts.map +1 -0
  457. package/v3/@claude-flow/cli/dist/src/plugins/store/discovery.js +1147 -0
  458. package/v3/@claude-flow/cli/dist/src/plugins/store/discovery.js.map +1 -0
  459. package/v3/@claude-flow/cli/dist/src/plugins/store/index.d.ts +76 -0
  460. package/v3/@claude-flow/cli/dist/src/plugins/store/index.d.ts.map +1 -0
  461. package/v3/@claude-flow/cli/dist/src/plugins/store/index.js +141 -0
  462. package/v3/@claude-flow/cli/dist/src/plugins/store/index.js.map +1 -0
  463. package/v3/@claude-flow/cli/dist/src/plugins/store/search.d.ts +46 -0
  464. package/v3/@claude-flow/cli/dist/src/plugins/store/search.d.ts.map +1 -0
  465. package/v3/@claude-flow/cli/dist/src/plugins/store/search.js +230 -0
  466. package/v3/@claude-flow/cli/dist/src/plugins/store/search.js.map +1 -0
  467. package/v3/@claude-flow/cli/dist/src/plugins/store/types.d.ts +274 -0
  468. package/v3/@claude-flow/cli/dist/src/plugins/store/types.d.ts.map +1 -0
  469. package/v3/@claude-flow/cli/dist/src/plugins/store/types.js +7 -0
  470. package/v3/@claude-flow/cli/dist/src/plugins/store/types.js.map +1 -0
  471. package/v3/@claude-flow/cli/dist/src/plugins/tests/demo-plugin-store.d.ts +7 -0
  472. package/v3/@claude-flow/cli/dist/src/plugins/tests/demo-plugin-store.d.ts.map +1 -0
  473. package/v3/@claude-flow/cli/dist/src/plugins/tests/demo-plugin-store.js +126 -0
  474. package/v3/@claude-flow/cli/dist/src/plugins/tests/demo-plugin-store.js.map +1 -0
  475. package/v3/@claude-flow/cli/dist/src/plugins/tests/standalone-test.d.ts +12 -0
  476. package/v3/@claude-flow/cli/dist/src/plugins/tests/standalone-test.d.ts.map +1 -0
  477. package/v3/@claude-flow/cli/dist/src/plugins/tests/standalone-test.js +188 -0
  478. package/v3/@claude-flow/cli/dist/src/plugins/tests/standalone-test.js.map +1 -0
  479. package/v3/@claude-flow/cli/dist/src/plugins/tests/test-plugin-store.d.ts +7 -0
  480. package/v3/@claude-flow/cli/dist/src/plugins/tests/test-plugin-store.d.ts.map +1 -0
  481. package/v3/@claude-flow/cli/dist/src/plugins/tests/test-plugin-store.js +206 -0
  482. package/v3/@claude-flow/cli/dist/src/plugins/tests/test-plugin-store.js.map +1 -0
  483. package/v3/@claude-flow/cli/dist/src/process-supervisor.d.ts +41 -0
  484. package/v3/@claude-flow/cli/dist/src/process-supervisor.d.ts.map +1 -0
  485. package/v3/@claude-flow/cli/dist/src/process-supervisor.js +214 -0
  486. package/v3/@claude-flow/cli/dist/src/process-supervisor.js.map +1 -0
  487. package/v3/@claude-flow/cli/dist/src/production/circuit-breaker.d.ts +101 -0
  488. package/v3/@claude-flow/cli/dist/src/production/circuit-breaker.d.ts.map +1 -0
  489. package/v3/@claude-flow/cli/dist/src/production/circuit-breaker.js +241 -0
  490. package/v3/@claude-flow/cli/dist/src/production/circuit-breaker.js.map +1 -0
  491. package/v3/@claude-flow/cli/dist/src/production/error-handler.d.ts +92 -0
  492. package/v3/@claude-flow/cli/dist/src/production/error-handler.d.ts.map +1 -0
  493. package/v3/@claude-flow/cli/dist/src/production/error-handler.js +299 -0
  494. package/v3/@claude-flow/cli/dist/src/production/error-handler.js.map +1 -0
  495. package/v3/@claude-flow/cli/dist/src/production/index.d.ts +23 -0
  496. package/v3/@claude-flow/cli/dist/src/production/index.d.ts.map +1 -0
  497. package/v3/@claude-flow/cli/dist/src/production/index.js +18 -0
  498. package/v3/@claude-flow/cli/dist/src/production/index.js.map +1 -0
  499. package/v3/@claude-flow/cli/dist/src/production/monitoring.d.ts +161 -0
  500. package/v3/@claude-flow/cli/dist/src/production/monitoring.d.ts.map +1 -0
  501. package/v3/@claude-flow/cli/dist/src/production/monitoring.js +356 -0
  502. package/v3/@claude-flow/cli/dist/src/production/monitoring.js.map +1 -0
  503. package/v3/@claude-flow/cli/dist/src/production/rate-limiter.d.ts +80 -0
  504. package/v3/@claude-flow/cli/dist/src/production/rate-limiter.d.ts.map +1 -0
  505. package/v3/@claude-flow/cli/dist/src/production/rate-limiter.js +201 -0
  506. package/v3/@claude-flow/cli/dist/src/production/rate-limiter.js.map +1 -0
  507. package/v3/@claude-flow/cli/dist/src/production/retry.d.ts +48 -0
  508. package/v3/@claude-flow/cli/dist/src/production/retry.d.ts.map +1 -0
  509. package/v3/@claude-flow/cli/dist/src/production/retry.js +179 -0
  510. package/v3/@claude-flow/cli/dist/src/production/retry.js.map +1 -0
  511. package/v3/@claude-flow/cli/dist/src/prompt.d.ts +44 -0
  512. package/v3/@claude-flow/cli/dist/src/prompt.d.ts.map +1 -0
  513. package/v3/@claude-flow/cli/dist/src/prompt.js +501 -0
  514. package/v3/@claude-flow/cli/dist/src/prompt.js.map +1 -0
  515. package/v3/@claude-flow/cli/dist/src/runtime/headless.d.ts +60 -0
  516. package/v3/@claude-flow/cli/dist/src/runtime/headless.d.ts.map +1 -0
  517. package/v3/@claude-flow/cli/dist/src/runtime/headless.js +284 -0
  518. package/v3/@claude-flow/cli/dist/src/runtime/headless.js.map +1 -0
  519. package/v3/@claude-flow/cli/dist/src/ruvector/agent-wasm.d.ts +182 -0
  520. package/v3/@claude-flow/cli/dist/src/ruvector/agent-wasm.d.ts.map +1 -0
  521. package/v3/@claude-flow/cli/dist/src/ruvector/agent-wasm.js +316 -0
  522. package/v3/@claude-flow/cli/dist/src/ruvector/agent-wasm.js.map +1 -0
  523. package/v3/@claude-flow/cli/dist/src/ruvector/ast-analyzer.d.ts +67 -0
  524. package/v3/@claude-flow/cli/dist/src/ruvector/ast-analyzer.d.ts.map +1 -0
  525. package/v3/@claude-flow/cli/dist/src/ruvector/ast-analyzer.js +277 -0
  526. package/v3/@claude-flow/cli/dist/src/ruvector/ast-analyzer.js.map +1 -0
  527. package/v3/@claude-flow/cli/dist/src/ruvector/coverage-router.d.ts +160 -0
  528. package/v3/@claude-flow/cli/dist/src/ruvector/coverage-router.d.ts.map +1 -0
  529. package/v3/@claude-flow/cli/dist/src/ruvector/coverage-router.js +529 -0
  530. package/v3/@claude-flow/cli/dist/src/ruvector/coverage-router.js.map +1 -0
  531. package/v3/@claude-flow/cli/dist/src/ruvector/coverage-tools.d.ts +33 -0
  532. package/v3/@claude-flow/cli/dist/src/ruvector/coverage-tools.d.ts.map +1 -0
  533. package/v3/@claude-flow/cli/dist/src/ruvector/coverage-tools.js +157 -0
  534. package/v3/@claude-flow/cli/dist/src/ruvector/coverage-tools.js.map +1 -0
  535. package/v3/@claude-flow/cli/dist/src/ruvector/diff-classifier.d.ts +175 -0
  536. package/v3/@claude-flow/cli/dist/src/ruvector/diff-classifier.d.ts.map +1 -0
  537. package/v3/@claude-flow/cli/dist/src/ruvector/diff-classifier.js +698 -0
  538. package/v3/@claude-flow/cli/dist/src/ruvector/diff-classifier.js.map +1 -0
  539. package/v3/@claude-flow/cli/dist/src/ruvector/enhanced-model-router.d.ts +146 -0
  540. package/v3/@claude-flow/cli/dist/src/ruvector/enhanced-model-router.d.ts.map +1 -0
  541. package/v3/@claude-flow/cli/dist/src/ruvector/enhanced-model-router.js +529 -0
  542. package/v3/@claude-flow/cli/dist/src/ruvector/enhanced-model-router.js.map +1 -0
  543. package/v3/@claude-flow/cli/dist/src/ruvector/flash-attention.d.ts +195 -0
  544. package/v3/@claude-flow/cli/dist/src/ruvector/flash-attention.d.ts.map +1 -0
  545. package/v3/@claude-flow/cli/dist/src/ruvector/flash-attention.js +643 -0
  546. package/v3/@claude-flow/cli/dist/src/ruvector/flash-attention.js.map +1 -0
  547. package/v3/@claude-flow/cli/dist/src/ruvector/graph-analyzer.d.ts +187 -0
  548. package/v3/@claude-flow/cli/dist/src/ruvector/graph-analyzer.d.ts.map +1 -0
  549. package/v3/@claude-flow/cli/dist/src/ruvector/graph-analyzer.js +929 -0
  550. package/v3/@claude-flow/cli/dist/src/ruvector/graph-analyzer.js.map +1 -0
  551. package/v3/@claude-flow/cli/dist/src/ruvector/index.d.ts +40 -0
  552. package/v3/@claude-flow/cli/dist/src/ruvector/index.d.ts.map +1 -0
  553. package/v3/@claude-flow/cli/dist/src/ruvector/index.js +76 -0
  554. package/v3/@claude-flow/cli/dist/src/ruvector/index.js.map +1 -0
  555. package/v3/@claude-flow/cli/dist/src/ruvector/lora-adapter.d.ts +218 -0
  556. package/v3/@claude-flow/cli/dist/src/ruvector/lora-adapter.d.ts.map +1 -0
  557. package/v3/@claude-flow/cli/dist/src/ruvector/lora-adapter.js +455 -0
  558. package/v3/@claude-flow/cli/dist/src/ruvector/lora-adapter.js.map +1 -0
  559. package/v3/@claude-flow/cli/dist/src/ruvector/model-router.d.ts +220 -0
  560. package/v3/@claude-flow/cli/dist/src/ruvector/model-router.d.ts.map +1 -0
  561. package/v3/@claude-flow/cli/dist/src/ruvector/model-router.js +488 -0
  562. package/v3/@claude-flow/cli/dist/src/ruvector/model-router.js.map +1 -0
  563. package/v3/@claude-flow/cli/dist/src/ruvector/moe-router.d.ts +206 -0
  564. package/v3/@claude-flow/cli/dist/src/ruvector/moe-router.d.ts.map +1 -0
  565. package/v3/@claude-flow/cli/dist/src/ruvector/moe-router.js +626 -0
  566. package/v3/@claude-flow/cli/dist/src/ruvector/moe-router.js.map +1 -0
  567. package/v3/@claude-flow/cli/dist/src/ruvector/q-learning-router.d.ts +211 -0
  568. package/v3/@claude-flow/cli/dist/src/ruvector/q-learning-router.d.ts.map +1 -0
  569. package/v3/@claude-flow/cli/dist/src/ruvector/q-learning-router.js +681 -0
  570. package/v3/@claude-flow/cli/dist/src/ruvector/q-learning-router.js.map +1 -0
  571. package/v3/@claude-flow/cli/dist/src/ruvector/ruvllm-wasm.d.ts +179 -0
  572. package/v3/@claude-flow/cli/dist/src/ruvector/ruvllm-wasm.d.ts.map +1 -0
  573. package/v3/@claude-flow/cli/dist/src/ruvector/ruvllm-wasm.js +363 -0
  574. package/v3/@claude-flow/cli/dist/src/ruvector/ruvllm-wasm.js.map +1 -0
  575. package/v3/@claude-flow/cli/dist/src/ruvector/semantic-router.d.ts +77 -0
  576. package/v3/@claude-flow/cli/dist/src/ruvector/semantic-router.d.ts.map +1 -0
  577. package/v3/@claude-flow/cli/dist/src/ruvector/semantic-router.js +178 -0
  578. package/v3/@claude-flow/cli/dist/src/ruvector/semantic-router.js.map +1 -0
  579. package/v3/@claude-flow/cli/dist/src/ruvector/vector-db.d.ts +69 -0
  580. package/v3/@claude-flow/cli/dist/src/ruvector/vector-db.d.ts.map +1 -0
  581. package/v3/@claude-flow/cli/dist/src/ruvector/vector-db.js +243 -0
  582. package/v3/@claude-flow/cli/dist/src/ruvector/vector-db.js.map +1 -0
  583. package/v3/@claude-flow/cli/dist/src/services/agentic-flow-bridge.d.ts +54 -0
  584. package/v3/@claude-flow/cli/dist/src/services/agentic-flow-bridge.d.ts.map +1 -0
  585. package/v3/@claude-flow/cli/dist/src/services/agentic-flow-bridge.js +100 -0
  586. package/v3/@claude-flow/cli/dist/src/services/agentic-flow-bridge.js.map +1 -0
  587. package/v3/@claude-flow/cli/dist/src/services/claim-service.d.ts +204 -0
  588. package/v3/@claude-flow/cli/dist/src/services/claim-service.d.ts.map +1 -0
  589. package/v3/@claude-flow/cli/dist/src/services/claim-service.js +818 -0
  590. package/v3/@claude-flow/cli/dist/src/services/claim-service.js.map +1 -0
  591. package/v3/@claude-flow/cli/dist/src/services/container-worker-pool.d.ts +197 -0
  592. package/v3/@claude-flow/cli/dist/src/services/container-worker-pool.d.ts.map +1 -0
  593. package/v3/@claude-flow/cli/dist/src/services/container-worker-pool.js +583 -0
  594. package/v3/@claude-flow/cli/dist/src/services/container-worker-pool.js.map +1 -0
  595. package/v3/@claude-flow/cli/dist/src/services/headless-worker-executor.d.ts +304 -0
  596. package/v3/@claude-flow/cli/dist/src/services/headless-worker-executor.d.ts.map +1 -0
  597. package/v3/@claude-flow/cli/dist/src/services/headless-worker-executor.js +1011 -0
  598. package/v3/@claude-flow/cli/dist/src/services/headless-worker-executor.js.map +1 -0
  599. package/v3/@claude-flow/cli/dist/src/services/index.d.ts +13 -0
  600. package/v3/@claude-flow/cli/dist/src/services/index.d.ts.map +1 -0
  601. package/v3/@claude-flow/cli/dist/src/services/index.js +11 -0
  602. package/v3/@claude-flow/cli/dist/src/services/index.js.map +1 -0
  603. package/v3/@claude-flow/cli/dist/src/services/registry-api.d.ts +58 -0
  604. package/v3/@claude-flow/cli/dist/src/services/registry-api.d.ts.map +1 -0
  605. package/v3/@claude-flow/cli/dist/src/services/registry-api.js +146 -0
  606. package/v3/@claude-flow/cli/dist/src/services/registry-api.js.map +1 -0
  607. package/v3/@claude-flow/cli/dist/src/services/ruvector-training.d.ts +222 -0
  608. package/v3/@claude-flow/cli/dist/src/services/ruvector-training.d.ts.map +1 -0
  609. package/v3/@claude-flow/cli/dist/src/services/ruvector-training.js +688 -0
  610. package/v3/@claude-flow/cli/dist/src/services/ruvector-training.js.map +1 -0
  611. package/v3/@claude-flow/cli/dist/src/services/worker-daemon.d.ts +237 -0
  612. package/v3/@claude-flow/cli/dist/src/services/worker-daemon.d.ts.map +1 -0
  613. package/v3/@claude-flow/cli/dist/src/services/worker-daemon.js +959 -0
  614. package/v3/@claude-flow/cli/dist/src/services/worker-daemon.js.map +1 -0
  615. package/v3/@claude-flow/cli/dist/src/services/worker-queue.d.ts +194 -0
  616. package/v3/@claude-flow/cli/dist/src/services/worker-queue.d.ts.map +1 -0
  617. package/v3/@claude-flow/cli/dist/src/services/worker-queue.js +513 -0
  618. package/v3/@claude-flow/cli/dist/src/services/worker-queue.js.map +1 -0
  619. package/v3/@claude-flow/cli/dist/src/suggest.d.ts +53 -0
  620. package/v3/@claude-flow/cli/dist/src/suggest.d.ts.map +1 -0
  621. package/v3/@claude-flow/cli/dist/src/suggest.js +200 -0
  622. package/v3/@claude-flow/cli/dist/src/suggest.js.map +1 -0
  623. package/v3/@claude-flow/cli/dist/src/transfer/anonymization/index.d.ts +25 -0
  624. package/v3/@claude-flow/cli/dist/src/transfer/anonymization/index.d.ts.map +1 -0
  625. package/v3/@claude-flow/cli/dist/src/transfer/anonymization/index.js +175 -0
  626. package/v3/@claude-flow/cli/dist/src/transfer/anonymization/index.js.map +1 -0
  627. package/v3/@claude-flow/cli/dist/src/transfer/deploy-seraphine.d.ts +13 -0
  628. package/v3/@claude-flow/cli/dist/src/transfer/deploy-seraphine.d.ts.map +1 -0
  629. package/v3/@claude-flow/cli/dist/src/transfer/deploy-seraphine.js +205 -0
  630. package/v3/@claude-flow/cli/dist/src/transfer/deploy-seraphine.js.map +1 -0
  631. package/v3/@claude-flow/cli/dist/src/transfer/export.d.ts +25 -0
  632. package/v3/@claude-flow/cli/dist/src/transfer/export.d.ts.map +1 -0
  633. package/v3/@claude-flow/cli/dist/src/transfer/export.js +113 -0
  634. package/v3/@claude-flow/cli/dist/src/transfer/export.js.map +1 -0
  635. package/v3/@claude-flow/cli/dist/src/transfer/index.d.ts +12 -0
  636. package/v3/@claude-flow/cli/dist/src/transfer/index.d.ts.map +1 -0
  637. package/v3/@claude-flow/cli/dist/src/transfer/index.js +31 -0
  638. package/v3/@claude-flow/cli/dist/src/transfer/index.js.map +1 -0
  639. package/v3/@claude-flow/cli/dist/src/transfer/ipfs/client.d.ts +109 -0
  640. package/v3/@claude-flow/cli/dist/src/transfer/ipfs/client.d.ts.map +1 -0
  641. package/v3/@claude-flow/cli/dist/src/transfer/ipfs/client.js +307 -0
  642. package/v3/@claude-flow/cli/dist/src/transfer/ipfs/client.js.map +1 -0
  643. package/v3/@claude-flow/cli/dist/src/transfer/ipfs/upload.d.ts +95 -0
  644. package/v3/@claude-flow/cli/dist/src/transfer/ipfs/upload.d.ts.map +1 -0
  645. package/v3/@claude-flow/cli/dist/src/transfer/ipfs/upload.js +411 -0
  646. package/v3/@claude-flow/cli/dist/src/transfer/ipfs/upload.js.map +1 -0
  647. package/v3/@claude-flow/cli/dist/src/transfer/models/seraphine.d.ts +72 -0
  648. package/v3/@claude-flow/cli/dist/src/transfer/models/seraphine.d.ts.map +1 -0
  649. package/v3/@claude-flow/cli/dist/src/transfer/models/seraphine.js +373 -0
  650. package/v3/@claude-flow/cli/dist/src/transfer/models/seraphine.js.map +1 -0
  651. package/v3/@claude-flow/cli/dist/src/transfer/serialization/cfp.d.ts +49 -0
  652. package/v3/@claude-flow/cli/dist/src/transfer/serialization/cfp.d.ts.map +1 -0
  653. package/v3/@claude-flow/cli/dist/src/transfer/serialization/cfp.js +183 -0
  654. package/v3/@claude-flow/cli/dist/src/transfer/serialization/cfp.js.map +1 -0
  655. package/v3/@claude-flow/cli/dist/src/transfer/storage/gcs.d.ts +82 -0
  656. package/v3/@claude-flow/cli/dist/src/transfer/storage/gcs.d.ts.map +1 -0
  657. package/v3/@claude-flow/cli/dist/src/transfer/storage/gcs.js +272 -0
  658. package/v3/@claude-flow/cli/dist/src/transfer/storage/gcs.js.map +1 -0
  659. package/v3/@claude-flow/cli/dist/src/transfer/storage/index.d.ts +6 -0
  660. package/v3/@claude-flow/cli/dist/src/transfer/storage/index.d.ts.map +1 -0
  661. package/v3/@claude-flow/cli/dist/src/transfer/storage/index.js +6 -0
  662. package/v3/@claude-flow/cli/dist/src/transfer/storage/index.js.map +1 -0
  663. package/v3/@claude-flow/cli/dist/src/transfer/store/discovery.d.ts +84 -0
  664. package/v3/@claude-flow/cli/dist/src/transfer/store/discovery.d.ts.map +1 -0
  665. package/v3/@claude-flow/cli/dist/src/transfer/store/discovery.js +382 -0
  666. package/v3/@claude-flow/cli/dist/src/transfer/store/discovery.js.map +1 -0
  667. package/v3/@claude-flow/cli/dist/src/transfer/store/download.d.ts +70 -0
  668. package/v3/@claude-flow/cli/dist/src/transfer/store/download.d.ts.map +1 -0
  669. package/v3/@claude-flow/cli/dist/src/transfer/store/download.js +334 -0
  670. package/v3/@claude-flow/cli/dist/src/transfer/store/download.js.map +1 -0
  671. package/v3/@claude-flow/cli/dist/src/transfer/store/index.d.ts +84 -0
  672. package/v3/@claude-flow/cli/dist/src/transfer/store/index.d.ts.map +1 -0
  673. package/v3/@claude-flow/cli/dist/src/transfer/store/index.js +153 -0
  674. package/v3/@claude-flow/cli/dist/src/transfer/store/index.js.map +1 -0
  675. package/v3/@claude-flow/cli/dist/src/transfer/store/publish.d.ts +76 -0
  676. package/v3/@claude-flow/cli/dist/src/transfer/store/publish.d.ts.map +1 -0
  677. package/v3/@claude-flow/cli/dist/src/transfer/store/publish.js +294 -0
  678. package/v3/@claude-flow/cli/dist/src/transfer/store/publish.js.map +1 -0
  679. package/v3/@claude-flow/cli/dist/src/transfer/store/registry.d.ts +58 -0
  680. package/v3/@claude-flow/cli/dist/src/transfer/store/registry.d.ts.map +1 -0
  681. package/v3/@claude-flow/cli/dist/src/transfer/store/registry.js +285 -0
  682. package/v3/@claude-flow/cli/dist/src/transfer/store/registry.js.map +1 -0
  683. package/v3/@claude-flow/cli/dist/src/transfer/store/search.d.ts +54 -0
  684. package/v3/@claude-flow/cli/dist/src/transfer/store/search.d.ts.map +1 -0
  685. package/v3/@claude-flow/cli/dist/src/transfer/store/search.js +232 -0
  686. package/v3/@claude-flow/cli/dist/src/transfer/store/search.js.map +1 -0
  687. package/v3/@claude-flow/cli/dist/src/transfer/store/tests/standalone-test.d.ts +12 -0
  688. package/v3/@claude-flow/cli/dist/src/transfer/store/tests/standalone-test.d.ts.map +1 -0
  689. package/v3/@claude-flow/cli/dist/src/transfer/store/tests/standalone-test.js +190 -0
  690. package/v3/@claude-flow/cli/dist/src/transfer/store/tests/standalone-test.js.map +1 -0
  691. package/v3/@claude-flow/cli/dist/src/transfer/store/types.d.ts +193 -0
  692. package/v3/@claude-flow/cli/dist/src/transfer/store/types.d.ts.map +1 -0
  693. package/v3/@claude-flow/cli/dist/src/transfer/store/types.js +6 -0
  694. package/v3/@claude-flow/cli/dist/src/transfer/store/types.js.map +1 -0
  695. package/v3/@claude-flow/cli/dist/src/transfer/test-seraphine.d.ts +6 -0
  696. package/v3/@claude-flow/cli/dist/src/transfer/test-seraphine.d.ts.map +1 -0
  697. package/v3/@claude-flow/cli/dist/src/transfer/test-seraphine.js +105 -0
  698. package/v3/@claude-flow/cli/dist/src/transfer/test-seraphine.js.map +1 -0
  699. package/v3/@claude-flow/cli/dist/src/transfer/tests/test-store.d.ts +7 -0
  700. package/v3/@claude-flow/cli/dist/src/transfer/tests/test-store.d.ts.map +1 -0
  701. package/v3/@claude-flow/cli/dist/src/transfer/tests/test-store.js +214 -0
  702. package/v3/@claude-flow/cli/dist/src/transfer/tests/test-store.js.map +1 -0
  703. package/v3/@claude-flow/cli/dist/src/transfer/types.d.ts +245 -0
  704. package/v3/@claude-flow/cli/dist/src/transfer/types.d.ts.map +1 -0
  705. package/v3/@claude-flow/cli/dist/src/transfer/types.js +6 -0
  706. package/v3/@claude-flow/cli/dist/src/transfer/types.js.map +1 -0
  707. package/v3/@claude-flow/cli/dist/src/types.d.ts +198 -0
  708. package/v3/@claude-flow/cli/dist/src/types.d.ts.map +1 -0
  709. package/v3/@claude-flow/cli/dist/src/types.js +38 -0
  710. package/v3/@claude-flow/cli/dist/src/types.js.map +1 -0
  711. package/v3/@claude-flow/cli/dist/src/update/checker.d.ts +34 -0
  712. package/v3/@claude-flow/cli/dist/src/update/checker.d.ts.map +1 -0
  713. package/v3/@claude-flow/cli/dist/src/update/checker.js +190 -0
  714. package/v3/@claude-flow/cli/dist/src/update/checker.js.map +1 -0
  715. package/v3/@claude-flow/cli/dist/src/update/executor.d.ts +32 -0
  716. package/v3/@claude-flow/cli/dist/src/update/executor.d.ts.map +1 -0
  717. package/v3/@claude-flow/cli/dist/src/update/executor.js +181 -0
  718. package/v3/@claude-flow/cli/dist/src/update/executor.js.map +1 -0
  719. package/v3/@claude-flow/cli/dist/src/update/index.d.ts +33 -0
  720. package/v3/@claude-flow/cli/dist/src/update/index.d.ts.map +1 -0
  721. package/v3/@claude-flow/cli/dist/src/update/index.js +64 -0
  722. package/v3/@claude-flow/cli/dist/src/update/index.js.map +1 -0
  723. package/v3/@claude-flow/cli/dist/src/update/rate-limiter.d.ts +20 -0
  724. package/v3/@claude-flow/cli/dist/src/update/rate-limiter.d.ts.map +1 -0
  725. package/v3/@claude-flow/cli/dist/src/update/rate-limiter.js +96 -0
  726. package/v3/@claude-flow/cli/dist/src/update/rate-limiter.js.map +1 -0
  727. package/v3/@claude-flow/cli/dist/src/update/validator.d.ts +17 -0
  728. package/v3/@claude-flow/cli/dist/src/update/validator.d.ts.map +1 -0
  729. package/v3/@claude-flow/cli/dist/src/update/validator.js +123 -0
  730. package/v3/@claude-flow/cli/dist/src/update/validator.js.map +1 -0
  731. package/v3/@claude-flow/cli/dist/tsconfig.tsbuildinfo +1 -0
  732. package/v3/@claude-flow/cli/package.json +109 -0
@@ -0,0 +1,827 @@
1
+ /**
2
+ * Coordination MCP Tools for CLI
3
+ *
4
+ * V2 Compatibility - Swarm coordination and orchestration tools
5
+ *
6
+ * ⚠️ IMPORTANT: These tools provide LOCAL STATE MANAGEMENT.
7
+ * - Topology/consensus state is tracked locally
8
+ * - No actual distributed coordination
9
+ * - Useful for single-machine workflow orchestration
10
+ */
11
+ import { existsSync, readFileSync, writeFileSync, mkdirSync } from 'node:fs';
12
+ import { join } from 'node:path';
13
+ import { exec, spawn } from 'node:child_process';
14
+ // Storage paths
15
+ const STORAGE_DIR = '.claude-flow';
16
+ const COORD_DIR = 'coordination';
17
+ const COORD_FILE = 'store.json';
18
+ function getCoordDir() {
19
+ return join(process.cwd(), STORAGE_DIR, COORD_DIR);
20
+ }
21
+ function getCoordPath() {
22
+ return join(getCoordDir(), COORD_FILE);
23
+ }
24
+ function ensureCoordDir() {
25
+ const dir = getCoordDir();
26
+ if (!existsSync(dir)) {
27
+ mkdirSync(dir, { recursive: true });
28
+ }
29
+ }
30
+ function loadCoordStore() {
31
+ try {
32
+ const path = getCoordPath();
33
+ if (existsSync(path)) {
34
+ return JSON.parse(readFileSync(path, 'utf-8'));
35
+ }
36
+ }
37
+ catch {
38
+ // Return default store
39
+ }
40
+ return {
41
+ topology: {
42
+ type: 'hierarchical',
43
+ maxNodes: 15,
44
+ redundancy: 2,
45
+ consensusAlgorithm: 'raft',
46
+ },
47
+ loadBalance: {
48
+ algorithm: 'adaptive',
49
+ weights: {},
50
+ healthCheck: true,
51
+ },
52
+ sync: {
53
+ lastSync: new Date().toISOString(),
54
+ syncCount: 0,
55
+ conflicts: 0,
56
+ pendingChanges: 0,
57
+ },
58
+ nodes: {},
59
+ version: '3.0.0',
60
+ };
61
+ }
62
+ function saveCoordStore(store) {
63
+ ensureCoordDir();
64
+ writeFileSync(getCoordPath(), JSON.stringify(store, null, 2), 'utf-8');
65
+ }
66
+ export const coordinationTools = [
67
+ {
68
+ name: 'coordination_topology',
69
+ description: 'Configure swarm topology',
70
+ category: 'coordination',
71
+ inputSchema: {
72
+ type: 'object',
73
+ properties: {
74
+ action: { type: 'string', enum: ['get', 'set', 'optimize'], description: 'Action to perform' },
75
+ type: { type: 'string', enum: ['mesh', 'hierarchical', 'ring', 'star', 'hybrid', 'hierarchical-mesh'], description: 'Topology type' },
76
+ maxNodes: { type: 'number', description: 'Maximum nodes' },
77
+ redundancy: { type: 'number', description: 'Redundancy level' },
78
+ consensusAlgorithm: { type: 'string', enum: ['raft', 'byzantine', 'gossip', 'crdt'], description: 'Consensus algorithm' },
79
+ },
80
+ },
81
+ handler: async (input) => {
82
+ const store = loadCoordStore();
83
+ const action = input.action || 'get';
84
+ if (action === 'get') {
85
+ return {
86
+ success: true,
87
+ topology: store.topology,
88
+ nodes: Object.keys(store.nodes).length,
89
+ status: 'active',
90
+ };
91
+ }
92
+ if (action === 'set') {
93
+ if (input.type)
94
+ store.topology.type = input.type;
95
+ if (input.maxNodes)
96
+ store.topology.maxNodes = input.maxNodes;
97
+ if (input.redundancy)
98
+ store.topology.redundancy = input.redundancy;
99
+ if (input.consensusAlgorithm)
100
+ store.topology.consensusAlgorithm = input.consensusAlgorithm;
101
+ saveCoordStore(store);
102
+ return {
103
+ success: true,
104
+ action: 'updated',
105
+ topology: store.topology,
106
+ };
107
+ }
108
+ if (action === 'optimize') {
109
+ // Analyze current state and suggest optimal topology
110
+ const nodeCount = Object.keys(store.nodes).length;
111
+ let recommended = 'hierarchical';
112
+ if (nodeCount <= 5) {
113
+ recommended = 'mesh';
114
+ }
115
+ else if (nodeCount <= 15) {
116
+ recommended = 'hierarchical';
117
+ }
118
+ else {
119
+ recommended = 'hybrid';
120
+ }
121
+ return {
122
+ success: true,
123
+ action: 'optimize',
124
+ current: store.topology.type,
125
+ recommended,
126
+ reason: nodeCount <= 5
127
+ ? 'Small cluster benefits from full mesh connectivity'
128
+ : nodeCount <= 15
129
+ ? 'Medium cluster works well with hierarchical coordination'
130
+ : 'Large cluster needs hybrid approach for scalability',
131
+ };
132
+ }
133
+ return { success: false, error: 'Unknown action' };
134
+ },
135
+ },
136
+ {
137
+ name: 'coordination_load_balance',
138
+ description: 'Configure load balancing',
139
+ category: 'coordination',
140
+ inputSchema: {
141
+ type: 'object',
142
+ properties: {
143
+ action: { type: 'string', enum: ['get', 'set', 'distribute'], description: 'Action to perform' },
144
+ algorithm: { type: 'string', enum: ['round-robin', 'least-connections', 'weighted', 'adaptive'], description: 'Algorithm' },
145
+ weights: { type: 'object', description: 'Node weights' },
146
+ task: { type: 'string', description: 'Task to distribute' },
147
+ },
148
+ },
149
+ handler: async (input) => {
150
+ const store = loadCoordStore();
151
+ const action = input.action || 'get';
152
+ if (action === 'get') {
153
+ const nodes = Object.values(store.nodes);
154
+ const avgLoad = nodes.length > 0
155
+ ? nodes.reduce((sum, n) => sum + n.load, 0) / nodes.length
156
+ : 0;
157
+ return {
158
+ success: true,
159
+ loadBalance: store.loadBalance,
160
+ metrics: {
161
+ nodeCount: nodes.length,
162
+ avgLoad,
163
+ maxLoad: nodes.length > 0 ? Math.max(...nodes.map(n => n.load)) : 0,
164
+ minLoad: nodes.length > 0 ? Math.min(...nodes.map(n => n.load)) : 0,
165
+ },
166
+ };
167
+ }
168
+ if (action === 'set') {
169
+ if (input.algorithm)
170
+ store.loadBalance.algorithm = input.algorithm;
171
+ if (input.weights)
172
+ store.loadBalance.weights = input.weights;
173
+ saveCoordStore(store);
174
+ return {
175
+ success: true,
176
+ action: 'updated',
177
+ loadBalance: store.loadBalance,
178
+ };
179
+ }
180
+ if (action === 'distribute') {
181
+ const task = input.task;
182
+ const nodes = Object.values(store.nodes).filter(n => n.status === 'active');
183
+ if (nodes.length === 0) {
184
+ return { success: false, error: 'No active nodes available' };
185
+ }
186
+ // Select node based on algorithm
187
+ let selectedNode;
188
+ const algorithm = store.loadBalance.algorithm;
189
+ if (algorithm === 'least-connections' || algorithm === 'adaptive') {
190
+ selectedNode = nodes.reduce((min, n) => n.load < min.load ? n : min);
191
+ }
192
+ else if (algorithm === 'weighted') {
193
+ const weights = store.loadBalance.weights;
194
+ selectedNode = nodes.reduce((max, n) => (weights[n.id] || 1) > (weights[max.id] || 1) ? n : max);
195
+ }
196
+ else {
197
+ // Round robin - just pick first active
198
+ selectedNode = nodes[0];
199
+ }
200
+ // Update load
201
+ selectedNode.load += 1;
202
+ saveCoordStore(store);
203
+ return {
204
+ success: true,
205
+ action: 'distributed',
206
+ task,
207
+ assignedTo: selectedNode.id,
208
+ algorithm,
209
+ nodeLoad: selectedNode.load,
210
+ };
211
+ }
212
+ return { success: false, error: 'Unknown action' };
213
+ },
214
+ },
215
+ {
216
+ name: 'coordination_sync',
217
+ description: 'Synchronize state across nodes',
218
+ category: 'coordination',
219
+ inputSchema: {
220
+ type: 'object',
221
+ properties: {
222
+ action: { type: 'string', enum: ['status', 'trigger', 'resolve'], description: 'Action to perform' },
223
+ force: { type: 'boolean', description: 'Force synchronization' },
224
+ conflictResolution: { type: 'string', enum: ['latest', 'merge', 'manual'], description: 'Conflict resolution strategy' },
225
+ },
226
+ },
227
+ handler: async (input) => {
228
+ const store = loadCoordStore();
229
+ const action = input.action || 'status';
230
+ if (action === 'status') {
231
+ const timeSinceSync = Date.now() - new Date(store.sync.lastSync).getTime();
232
+ return {
233
+ success: true,
234
+ sync: store.sync,
235
+ timeSinceSync: `${Math.floor(timeSinceSync / 1000)}s`,
236
+ status: store.sync.conflicts > 0 ? 'conflicts' : store.sync.pendingChanges > 0 ? 'pending' : 'synced',
237
+ };
238
+ }
239
+ if (action === 'trigger') {
240
+ store.sync.syncCount++;
241
+ store.sync.lastSync = new Date().toISOString();
242
+ store.sync.pendingChanges = 0;
243
+ // Simulate sync
244
+ await new Promise(resolve => setTimeout(resolve, 50));
245
+ saveCoordStore(store);
246
+ return {
247
+ success: true,
248
+ action: 'synchronized',
249
+ syncCount: store.sync.syncCount,
250
+ syncedAt: store.sync.lastSync,
251
+ nodesSync: Object.keys(store.nodes).length,
252
+ };
253
+ }
254
+ if (action === 'resolve') {
255
+ const strategy = input.conflictResolution || 'latest';
256
+ if (store.sync.conflicts > 0) {
257
+ const resolved = store.sync.conflicts;
258
+ store.sync.conflicts = 0;
259
+ saveCoordStore(store);
260
+ return {
261
+ success: true,
262
+ action: 'resolved',
263
+ strategy,
264
+ conflictsResolved: resolved,
265
+ };
266
+ }
267
+ return {
268
+ success: true,
269
+ action: 'resolve',
270
+ message: 'No conflicts to resolve',
271
+ };
272
+ }
273
+ return { success: false, error: 'Unknown action' };
274
+ },
275
+ },
276
+ {
277
+ name: 'coordination_node',
278
+ description: 'Manage coordination nodes',
279
+ category: 'coordination',
280
+ inputSchema: {
281
+ type: 'object',
282
+ properties: {
283
+ action: { type: 'string', enum: ['list', 'add', 'remove', 'heartbeat'], description: 'Action to perform' },
284
+ nodeId: { type: 'string', description: 'Node ID' },
285
+ status: { type: 'string', description: 'Node status' },
286
+ },
287
+ },
288
+ handler: async (input) => {
289
+ const store = loadCoordStore();
290
+ const action = input.action || 'list';
291
+ if (action === 'list') {
292
+ const nodes = Object.values(store.nodes);
293
+ return {
294
+ success: true,
295
+ nodes: nodes.map(n => ({
296
+ id: n.id,
297
+ status: n.status,
298
+ load: n.load,
299
+ lastHeartbeat: n.lastHeartbeat,
300
+ })),
301
+ total: nodes.length,
302
+ active: nodes.filter(n => n.status === 'active').length,
303
+ };
304
+ }
305
+ if (action === 'add') {
306
+ const nodeId = input.nodeId || `node-${Date.now()}`;
307
+ store.nodes[nodeId] = {
308
+ id: nodeId,
309
+ status: 'active',
310
+ load: 0,
311
+ lastHeartbeat: new Date().toISOString(),
312
+ };
313
+ saveCoordStore(store);
314
+ return {
315
+ success: true,
316
+ action: 'added',
317
+ nodeId,
318
+ totalNodes: Object.keys(store.nodes).length,
319
+ };
320
+ }
321
+ if (action === 'remove') {
322
+ const nodeId = input.nodeId;
323
+ if (!store.nodes[nodeId]) {
324
+ return { success: false, error: 'Node not found' };
325
+ }
326
+ delete store.nodes[nodeId];
327
+ saveCoordStore(store);
328
+ return {
329
+ success: true,
330
+ action: 'removed',
331
+ nodeId,
332
+ totalNodes: Object.keys(store.nodes).length,
333
+ };
334
+ }
335
+ if (action === 'heartbeat') {
336
+ const nodeId = input.nodeId;
337
+ if (store.nodes[nodeId]) {
338
+ store.nodes[nodeId].lastHeartbeat = new Date().toISOString();
339
+ store.nodes[nodeId].status = 'active';
340
+ saveCoordStore(store);
341
+ }
342
+ return {
343
+ success: true,
344
+ action: 'heartbeat',
345
+ nodeId,
346
+ timestamp: new Date().toISOString(),
347
+ };
348
+ }
349
+ return { success: false, error: 'Unknown action' };
350
+ },
351
+ },
352
+ {
353
+ name: 'coordination_consensus',
354
+ description: 'Manage consensus protocol with BFT, Raft, or Quorum strategies',
355
+ category: 'coordination',
356
+ inputSchema: {
357
+ type: 'object',
358
+ properties: {
359
+ action: { type: 'string', enum: ['status', 'propose', 'vote', 'commit'], description: 'Action to perform' },
360
+ proposal: { type: 'object', description: 'Proposal data (for propose)' },
361
+ proposalId: { type: 'string', description: 'Proposal ID (for vote/commit/status)' },
362
+ vote: { type: 'string', enum: ['accept', 'reject'], description: 'Vote' },
363
+ voterId: { type: 'string', description: 'Voter node ID' },
364
+ strategy: { type: 'string', enum: ['bft', 'raft', 'quorum'], description: 'Consensus strategy (default: raft)' },
365
+ quorumPreset: { type: 'string', enum: ['unanimous', 'majority', 'supermajority'], description: 'Quorum threshold preset (default: majority)' },
366
+ term: { type: 'number', description: 'Term number (for raft strategy)' },
367
+ },
368
+ },
369
+ handler: async (input) => {
370
+ const store = loadCoordStore();
371
+ const action = input.action || 'status';
372
+ const strategy = input.strategy || 'raft';
373
+ const nodeCount = Object.keys(store.nodes).length || 1;
374
+ // Initialize consensus storage in the coordination store if missing
375
+ if (!store.consensus) {
376
+ store.consensus = { pending: [], history: [] };
377
+ }
378
+ const consensus = store.consensus;
379
+ function calcRequired(strat, total, preset) {
380
+ if (total <= 0)
381
+ return 1;
382
+ if (strat === 'bft')
383
+ return Math.floor((total * 2) / 3) + 1;
384
+ if (strat === 'quorum') {
385
+ if (preset === 'unanimous')
386
+ return total;
387
+ if (preset === 'supermajority')
388
+ return Math.floor((total * 2) / 3) + 1;
389
+ }
390
+ return Math.floor(total / 2) + 1;
391
+ }
392
+ if (action === 'status') {
393
+ if (input.proposalId) {
394
+ // Status for specific proposal
395
+ const p = consensus.pending.find(x => x.proposalId === input.proposalId);
396
+ if (p) {
397
+ const votesFor = Object.values(p.votes).filter(v => v).length;
398
+ const votesAgainst = Object.values(p.votes).filter(v => !v).length;
399
+ return {
400
+ success: true,
401
+ proposalId: p.proposalId,
402
+ strategy: p.strategy,
403
+ status: p.status,
404
+ votesFor,
405
+ votesAgainst,
406
+ required: calcRequired(p.strategy, nodeCount, p.quorumPreset),
407
+ totalNodes: nodeCount,
408
+ resolved: false,
409
+ };
410
+ }
411
+ const h = consensus.history.find(x => x.proposalId === input.proposalId);
412
+ if (h)
413
+ return { success: true, ...h, resolved: true, historical: true };
414
+ return { success: false, error: 'Proposal not found' };
415
+ }
416
+ const quorum = calcRequired(strategy, nodeCount);
417
+ return {
418
+ success: true,
419
+ algorithm: store.topology.consensusAlgorithm,
420
+ strategy,
421
+ nodes: nodeCount,
422
+ quorum,
423
+ pendingProposals: consensus.pending.length,
424
+ resolvedProposals: consensus.history.length,
425
+ status: nodeCount >= quorum ? 'operational' : 'degraded',
426
+ };
427
+ }
428
+ if (action === 'propose') {
429
+ const proposalId = `proposal-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
430
+ const quorumPreset = input.quorumPreset || 'majority';
431
+ const term = input.term || 1;
432
+ const required = calcRequired(strategy, nodeCount, quorumPreset);
433
+ // Raft: one pending proposal per term
434
+ if (strategy === 'raft') {
435
+ const existing = consensus.pending.find(p => p.strategy === 'raft' && p.term === term);
436
+ if (existing) {
437
+ return {
438
+ success: false,
439
+ error: `Raft term ${term} already has pending proposal: ${existing.proposalId}`,
440
+ existingProposalId: existing.proposalId,
441
+ };
442
+ }
443
+ }
444
+ consensus.pending.push({
445
+ proposalId,
446
+ type: 'coordination',
447
+ proposal: input.proposal,
448
+ proposedBy: input.voterId || 'system',
449
+ proposedAt: new Date().toISOString(),
450
+ votes: {},
451
+ status: 'pending',
452
+ strategy,
453
+ term: strategy === 'raft' ? term : undefined,
454
+ quorumPreset: strategy === 'quorum' ? quorumPreset : undefined,
455
+ byzantineVoters: strategy === 'bft' ? [] : undefined,
456
+ });
457
+ saveCoordStore(store);
458
+ return {
459
+ success: true,
460
+ action: 'proposed',
461
+ proposalId,
462
+ proposal: input.proposal,
463
+ strategy,
464
+ status: 'pending',
465
+ required,
466
+ totalNodes: nodeCount,
467
+ term: strategy === 'raft' ? term : undefined,
468
+ };
469
+ }
470
+ if (action === 'vote') {
471
+ const p = consensus.pending.find(x => x.proposalId === input.proposalId);
472
+ if (!p)
473
+ return { success: false, error: 'Proposal not found or already resolved' };
474
+ const voterId = input.voterId;
475
+ if (!voterId)
476
+ return { success: false, error: 'voterId is required' };
477
+ const voteValue = input.vote === 'accept';
478
+ const pStrategy = p.strategy || 'raft';
479
+ const required = calcRequired(pStrategy, nodeCount, p.quorumPreset);
480
+ // Double-vote prevention
481
+ if (voterId in p.votes) {
482
+ if (pStrategy === 'bft' && p.votes[voterId] !== voteValue) {
483
+ if (!p.byzantineVoters)
484
+ p.byzantineVoters = [];
485
+ if (!p.byzantineVoters.includes(voterId))
486
+ p.byzantineVoters.push(voterId);
487
+ delete p.votes[voterId];
488
+ saveCoordStore(store);
489
+ return {
490
+ success: false,
491
+ byzantineDetected: true,
492
+ message: `Byzantine behavior: voter ${voterId} attempted conflicting vote. Vote invalidated.`,
493
+ byzantineVoters: p.byzantineVoters,
494
+ };
495
+ }
496
+ return { success: false, error: `Voter ${voterId} has already voted on this proposal` };
497
+ }
498
+ // BFT cross-proposal conflict check
499
+ if (pStrategy === 'bft') {
500
+ for (const other of consensus.pending) {
501
+ if (other.proposalId === p.proposalId)
502
+ continue;
503
+ if (voterId in other.votes && other.votes[voterId] !== voteValue) {
504
+ if (!p.byzantineVoters)
505
+ p.byzantineVoters = [];
506
+ if (!p.byzantineVoters.includes(voterId))
507
+ p.byzantineVoters.push(voterId);
508
+ saveCoordStore(store);
509
+ return {
510
+ success: false,
511
+ byzantineDetected: true,
512
+ message: `Byzantine behavior: voter ${voterId} cast conflicting votes across proposals.`,
513
+ byzantineVoters: p.byzantineVoters,
514
+ };
515
+ }
516
+ }
517
+ }
518
+ p.votes[voterId] = voteValue;
519
+ const votesFor = Object.values(p.votes).filter(v => v).length;
520
+ const votesAgainst = Object.values(p.votes).filter(v => !v).length;
521
+ // Resolution check
522
+ let resolved = false;
523
+ let result;
524
+ if (votesFor >= required) {
525
+ resolved = true;
526
+ result = 'approved';
527
+ }
528
+ else if (votesAgainst >= required) {
529
+ resolved = true;
530
+ result = 'rejected';
531
+ }
532
+ else if (pStrategy === 'quorum' && p.quorumPreset === 'unanimous' && votesAgainst > 0) {
533
+ resolved = true;
534
+ result = 'rejected';
535
+ }
536
+ if (resolved && result) {
537
+ p.status = result;
538
+ consensus.history.push({
539
+ proposalId: p.proposalId,
540
+ result,
541
+ votes: { for: votesFor, against: votesAgainst },
542
+ decidedAt: new Date().toISOString(),
543
+ strategy: pStrategy,
544
+ term: p.term,
545
+ byzantineDetected: p.byzantineVoters?.length ? p.byzantineVoters : undefined,
546
+ });
547
+ consensus.pending = consensus.pending.filter(x => x.proposalId !== p.proposalId);
548
+ }
549
+ saveCoordStore(store);
550
+ return {
551
+ success: true,
552
+ action: 'voted',
553
+ proposalId: p.proposalId,
554
+ voterId,
555
+ vote: input.vote,
556
+ strategy: pStrategy,
557
+ votesFor,
558
+ votesAgainst,
559
+ required,
560
+ totalNodes: nodeCount,
561
+ resolved,
562
+ result: resolved ? result : undefined,
563
+ status: p.status,
564
+ };
565
+ }
566
+ if (action === 'commit') {
567
+ // Commit is a no-op confirmation for already-resolved proposals
568
+ if (input.proposalId) {
569
+ const h = consensus.history.find(x => x.proposalId === input.proposalId);
570
+ if (h) {
571
+ return {
572
+ success: true,
573
+ action: 'committed',
574
+ proposalId: input.proposalId,
575
+ result: h.result,
576
+ committedAt: new Date().toISOString(),
577
+ };
578
+ }
579
+ return { success: false, error: 'Proposal not found in resolved history. Vote must reach quorum first.' };
580
+ }
581
+ return { success: false, error: 'proposalId is required for commit' };
582
+ }
583
+ return { success: false, error: 'Unknown action' };
584
+ },
585
+ },
586
+ {
587
+ name: 'coordination_orchestrate',
588
+ description: 'Orchestrate a task locally on this machine. Can dispatch a skill (e.g., "/pr-monitor"), run a Claude prompt via "claude -p", or execute a shell command. The queen handles execution and returns results. For long-running tasks, set background: true to get an orchestration ID you can check later with coordination_orchestrate_status.',
589
+ category: 'coordination',
590
+ inputSchema: {
591
+ type: 'object',
592
+ properties: {
593
+ task: { type: 'string', description: 'Task description or prompt to execute' },
594
+ skill: { type: 'string', description: 'Skill/slash-command to run (e.g., "/pr-monitor", "/commit"). Dispatches via claude -p.' },
595
+ command: { type: 'string', description: 'Raw shell command to execute instead of Claude dispatch' },
596
+ workingDir: { type: 'string', description: 'Working directory for execution' },
597
+ background: { type: 'boolean', description: 'Run in background and return immediately with an orchestration ID' },
598
+ timeout: { type: 'number', description: 'Timeout in ms (default: 120000 for foreground, 600000 for background)' },
599
+ strategy: { type: 'string', enum: ['parallel', 'sequential', 'pipeline', 'broadcast'], description: 'Orchestration strategy (for multi-task coordination)' },
600
+ agents: { type: 'array', items: { type: 'string' }, description: 'Agent IDs to coordinate (metadata)' },
601
+ },
602
+ required: ['task'],
603
+ },
604
+ handler: async (input) => {
605
+ const store = loadCoordStore();
606
+ const task = input.task;
607
+ const skill = input.skill;
608
+ const rawCommand = input.command;
609
+ const workingDir = input.workingDir || process.cwd();
610
+ const background = input.background || false;
611
+ const strategy = input.strategy || 'parallel';
612
+ const agents = input.agents || [];
613
+ const defaultTimeout = background ? 600000 : 120000;
614
+ const timeoutMs = Math.min(input.timeout || defaultTimeout, 600000);
615
+ const orchestrationId = `orch-${Date.now()}-${Math.random().toString(36).slice(2, 6)}`;
616
+ // Determine what command to actually run
617
+ let execCmd;
618
+ if (rawCommand) {
619
+ execCmd = rawCommand;
620
+ }
621
+ else if (skill) {
622
+ // Dispatch skill via claude -p
623
+ const skillPrompt = `${skill} ${task}`.trim();
624
+ execCmd = `claude --dangerously-skip-permissions -p "${skillPrompt.replace(/"/g, '\\"')}"`;
625
+ }
626
+ else {
627
+ // General task — send to claude -p
628
+ execCmd = `claude --dangerously-skip-permissions -p "${task.replace(/"/g, '\\"')}"`;
629
+ }
630
+ // Store orchestration record
631
+ const orchRecord = {
632
+ id: orchestrationId,
633
+ task,
634
+ skill: skill || null,
635
+ command: execCmd,
636
+ strategy,
637
+ agents,
638
+ workingDir,
639
+ status: 'running',
640
+ startedAt: new Date().toISOString(),
641
+ completedAt: null,
642
+ output: null,
643
+ exitCode: null,
644
+ error: null,
645
+ };
646
+ // Persist orchestration state
647
+ const orchDir = join(getCoordDir(), 'orchestrations');
648
+ if (!existsSync(orchDir)) {
649
+ mkdirSync(orchDir, { recursive: true });
650
+ }
651
+ writeFileSync(join(orchDir, `${orchestrationId}.json`), JSON.stringify(orchRecord, null, 2), 'utf-8');
652
+ if (background) {
653
+ // Background execution — spawn and return immediately
654
+ const child = spawn(process.platform === 'win32' ? 'cmd.exe' : '/bin/bash', process.platform === 'win32' ? ['/c', execCmd] : ['-c', execCmd], {
655
+ cwd: workingDir,
656
+ detached: true,
657
+ stdio: ['ignore', 'pipe', 'pipe'],
658
+ env: process.env,
659
+ windowsHide: true,
660
+ });
661
+ let stdout = '';
662
+ let stderr = '';
663
+ child.stdout?.on('data', (data) => { stdout += data.toString(); });
664
+ child.stderr?.on('data', (data) => { stderr += data.toString(); });
665
+ child.on('close', (code) => {
666
+ orchRecord.status = code === 0 ? 'completed' : 'failed';
667
+ orchRecord.completedAt = new Date().toISOString();
668
+ orchRecord.exitCode = code ?? 1;
669
+ let output = stdout;
670
+ if (stderr)
671
+ output += (output ? '\n' : '') + stderr;
672
+ if (output.length > 100000)
673
+ output = output.slice(0, 100000) + '\n... [truncated]';
674
+ orchRecord.output = output;
675
+ try {
676
+ writeFileSync(join(orchDir, `${orchestrationId}.json`), JSON.stringify(orchRecord, null, 2), 'utf-8');
677
+ }
678
+ catch { /* best effort */ }
679
+ });
680
+ child.unref();
681
+ return {
682
+ success: true,
683
+ orchestrationId,
684
+ task,
685
+ skill: skill || null,
686
+ status: 'running',
687
+ background: true,
688
+ startedAt: orchRecord.startedAt,
689
+ topology: store.topology.type,
690
+ hint: `Use coordination_orchestrate_status with orchestrationId "${orchestrationId}" to check progress.`,
691
+ };
692
+ }
693
+ // Foreground execution — wait for result
694
+ try {
695
+ const result = await new Promise((resolve) => {
696
+ exec(execCmd, {
697
+ cwd: workingDir,
698
+ timeout: timeoutMs,
699
+ maxBuffer: 10 * 1024 * 1024,
700
+ shell: process.platform === 'win32' ? 'cmd.exe' : '/bin/bash',
701
+ env: process.env,
702
+ windowsHide: true,
703
+ }, (error, stdout, stderr) => {
704
+ resolve({
705
+ stdout: stdout || '',
706
+ stderr: stderr || '',
707
+ exitCode: error ? 1 : 0,
708
+ });
709
+ });
710
+ });
711
+ let output = result.stdout;
712
+ if (result.stderr)
713
+ output += (output ? '\n' : '') + result.stderr;
714
+ if (output.length > 100000)
715
+ output = output.slice(0, 100000) + '\n... [truncated]';
716
+ orchRecord.status = result.exitCode === 0 ? 'completed' : 'failed';
717
+ orchRecord.completedAt = new Date().toISOString();
718
+ orchRecord.exitCode = result.exitCode;
719
+ orchRecord.output = output;
720
+ writeFileSync(join(orchDir, `${orchestrationId}.json`), JSON.stringify(orchRecord, null, 2), 'utf-8');
721
+ return {
722
+ success: result.exitCode === 0,
723
+ orchestrationId,
724
+ task,
725
+ skill: skill || null,
726
+ status: orchRecord.status,
727
+ output,
728
+ exitCode: result.exitCode,
729
+ startedAt: orchRecord.startedAt,
730
+ completedAt: orchRecord.completedAt,
731
+ topology: store.topology.type,
732
+ };
733
+ }
734
+ catch (error) {
735
+ const errorMsg = error instanceof Error ? error.message : String(error);
736
+ orchRecord.status = 'failed';
737
+ orchRecord.completedAt = new Date().toISOString();
738
+ orchRecord.error = errorMsg;
739
+ writeFileSync(join(orchDir, `${orchestrationId}.json`), JSON.stringify(orchRecord, null, 2), 'utf-8');
740
+ return {
741
+ success: false,
742
+ orchestrationId,
743
+ task,
744
+ error: errorMsg,
745
+ status: 'failed',
746
+ };
747
+ }
748
+ },
749
+ },
750
+ {
751
+ name: 'coordination_orchestrate_status',
752
+ description: 'Check the status of a background orchestration. Returns output if completed.',
753
+ category: 'coordination',
754
+ inputSchema: {
755
+ type: 'object',
756
+ properties: {
757
+ orchestrationId: { type: 'string', description: 'Orchestration ID from coordination_orchestrate' },
758
+ },
759
+ required: ['orchestrationId'],
760
+ },
761
+ handler: async (input) => {
762
+ const orchId = input.orchestrationId;
763
+ const orchFile = join(getCoordDir(), 'orchestrations', `${orchId}.json`);
764
+ if (!existsSync(orchFile)) {
765
+ return { success: false, error: `Orchestration ${orchId} not found` };
766
+ }
767
+ try {
768
+ const record = JSON.parse(readFileSync(orchFile, 'utf-8'));
769
+ return {
770
+ success: true,
771
+ ...record,
772
+ };
773
+ }
774
+ catch {
775
+ return { success: false, error: 'Failed to read orchestration state' };
776
+ }
777
+ },
778
+ },
779
+ {
780
+ name: 'coordination_metrics',
781
+ description: 'Get coordination metrics',
782
+ category: 'coordination',
783
+ inputSchema: {
784
+ type: 'object',
785
+ properties: {
786
+ metric: { type: 'string', enum: ['all', 'latency', 'throughput', 'availability'], description: 'Metric type' },
787
+ timeRange: { type: 'string', description: 'Time range' },
788
+ },
789
+ },
790
+ handler: async (input) => {
791
+ const store = loadCoordStore();
792
+ const metric = input.metric || 'all';
793
+ const nodes = Object.values(store.nodes);
794
+ const activeNodes = nodes.filter(n => n.status === 'active');
795
+ const metrics = {
796
+ latency: {
797
+ avg: 25 + Math.random() * 20,
798
+ p50: 20 + Math.random() * 15,
799
+ p95: 50 + Math.random() * 30,
800
+ p99: 100 + Math.random() * 50,
801
+ unit: 'ms',
802
+ },
803
+ throughput: {
804
+ current: Math.floor(Math.random() * 1000) + 500,
805
+ peak: Math.floor(Math.random() * 2000) + 1000,
806
+ avg: Math.floor(Math.random() * 800) + 400,
807
+ unit: 'ops/s',
808
+ },
809
+ availability: {
810
+ uptime: 99.9 + Math.random() * 0.09,
811
+ activeNodes: activeNodes.length,
812
+ totalNodes: nodes.length,
813
+ syncStatus: store.sync.conflicts === 0 ? 'healthy' : 'conflicts',
814
+ },
815
+ };
816
+ if (metric === 'all') {
817
+ return { success: true, metrics };
818
+ }
819
+ return {
820
+ success: true,
821
+ metric,
822
+ data: metrics[metric],
823
+ };
824
+ },
825
+ },
826
+ ];
827
+ //# sourceMappingURL=coordination-tools.js.map