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,316 @@
1
+ /**
2
+ * RuVector Agent WASM Integration
3
+ *
4
+ * Wraps @ruvector/rvagent-wasm for sandboxed AI agent execution.
5
+ * Provides WasmAgent lifecycle, gallery templates, RVF container building,
6
+ * and MCP server bridge — all running in WASM without OS access.
7
+ *
8
+ * Published API (v0.1.0): WasmAgent, WasmGallery, WasmMcpServer,
9
+ * WasmRvfBuilder, JsModelProvider, initSync.
10
+ *
11
+ * @module @claude-flow/cli/ruvector/agent-wasm
12
+ */
13
+ import { readFileSync } from 'node:fs';
14
+ import { createRequire } from 'node:module';
15
+ // ── WASM Module Detection & Init ─────────────────────────────
16
+ let _wasmReady = false;
17
+ /**
18
+ * Check if @ruvector/rvagent-wasm is installed and loadable.
19
+ */
20
+ export async function isAgentWasmAvailable() {
21
+ try {
22
+ const mod = await import('@ruvector/rvagent-wasm');
23
+ return typeof mod.WasmAgent === 'function';
24
+ }
25
+ catch {
26
+ return false;
27
+ }
28
+ }
29
+ /**
30
+ * Initialize the WASM module for Node.js. Safe to call multiple times.
31
+ * Uses initSync with file-loaded WASM bytes (browser fetch doesn't work in Node).
32
+ */
33
+ export async function initAgentWasm() {
34
+ if (_wasmReady)
35
+ return;
36
+ try {
37
+ const mod = await import('@ruvector/rvagent-wasm');
38
+ // In Node.js, load WASM bytes from disk and use initSync
39
+ const require_ = createRequire(import.meta.url);
40
+ const wasmPath = require_.resolve('@ruvector/rvagent-wasm/rvagent_wasm_bg.wasm');
41
+ const wasmBytes = readFileSync(wasmPath);
42
+ mod.initSync(wasmBytes);
43
+ _wasmReady = true;
44
+ }
45
+ catch (err) {
46
+ throw new Error(`Failed to initialize @ruvector/rvagent-wasm: ${err}`);
47
+ }
48
+ }
49
+ // ── Agent Registry ───────────────────────────────────────────
50
+ const agents = new Map();
51
+ let nextId = 1;
52
+ function generateId() {
53
+ return `wasm-agent-${nextId++}-${Date.now().toString(36)}`;
54
+ }
55
+ // ── Agent Lifecycle ──────────────────────────────────────────
56
+ /**
57
+ * Create a new sandboxed WASM agent.
58
+ */
59
+ export async function createWasmAgent(config = {}) {
60
+ await initAgentWasm();
61
+ const mod = await import('@ruvector/rvagent-wasm');
62
+ const configJson = JSON.stringify({
63
+ model: config.model ?? 'anthropic:claude-sonnet-4-20250514',
64
+ instructions: config.instructions ?? 'You are a helpful coding assistant.',
65
+ max_turns: config.maxTurns ?? 50,
66
+ });
67
+ const agent = new mod.WasmAgent(configJson);
68
+ const id = generateId();
69
+ const info = {
70
+ id,
71
+ state: 'idle',
72
+ config,
73
+ model: agent.model(),
74
+ turnCount: agent.turn_count(),
75
+ fileCount: agent.file_count(),
76
+ isStopped: agent.is_stopped(),
77
+ createdAt: new Date().toISOString(),
78
+ };
79
+ agents.set(id, { agent, info });
80
+ return info;
81
+ }
82
+ /**
83
+ * Send a prompt to a WASM agent. Requires a model provider to be set.
84
+ */
85
+ export async function promptWasmAgent(agentId, input) {
86
+ const entry = agents.get(agentId);
87
+ if (!entry)
88
+ throw new Error(`WASM agent not found: ${agentId}`);
89
+ entry.info.state = 'running';
90
+ try {
91
+ const result = await entry.agent.prompt(input);
92
+ entry.info.state = 'idle';
93
+ syncAgentInfo(entry);
94
+ return result;
95
+ }
96
+ catch (err) {
97
+ entry.info.state = 'error';
98
+ throw err;
99
+ }
100
+ }
101
+ /**
102
+ * Execute a tool directly on a WASM agent's sandbox.
103
+ * Tool format: {tool: 'write_file', path: '...', content: '...'} (flat, snake_case).
104
+ * Available tools: read_file, write_file, edit_file, write_todos, list_files.
105
+ */
106
+ const VALID_WASM_TOOLS = ['read_file', 'write_file', 'edit_file', 'write_todos', 'list_files'];
107
+ export async function executeWasmTool(agentId, toolCall) {
108
+ const entry = agents.get(agentId);
109
+ if (!entry)
110
+ throw new Error(`WASM agent not found: ${agentId}`);
111
+ // Validate tool name to prevent WASM panics on unknown tools
112
+ const toolName = toolCall.tool;
113
+ if (toolName && !VALID_WASM_TOOLS.includes(toolName)) {
114
+ return { success: false, output: `Unknown tool: ${toolName}. Available: ${VALID_WASM_TOOLS.join(', ')}` };
115
+ }
116
+ const result = await entry.agent.execute_tool(JSON.stringify(toolCall));
117
+ syncAgentInfo(entry);
118
+ return result;
119
+ }
120
+ function syncAgentInfo(entry) {
121
+ try {
122
+ entry.info.turnCount = entry.agent.turn_count();
123
+ entry.info.fileCount = entry.agent.file_count();
124
+ entry.info.isStopped = entry.agent.is_stopped();
125
+ }
126
+ catch { /* best-effort */ }
127
+ }
128
+ /**
129
+ * Get agent info.
130
+ */
131
+ export function getWasmAgent(agentId) {
132
+ const entry = agents.get(agentId);
133
+ if (!entry)
134
+ return null;
135
+ syncAgentInfo(entry);
136
+ return entry.info;
137
+ }
138
+ /**
139
+ * List all active WASM agents.
140
+ */
141
+ export function listWasmAgents() {
142
+ return Array.from(agents.values()).map(e => {
143
+ syncAgentInfo(e);
144
+ return e.info;
145
+ });
146
+ }
147
+ /**
148
+ * Terminate a WASM agent and free resources.
149
+ */
150
+ export function terminateWasmAgent(agentId) {
151
+ const entry = agents.get(agentId);
152
+ if (!entry)
153
+ return false;
154
+ try {
155
+ entry.agent.free();
156
+ }
157
+ catch { /* already freed */ }
158
+ agents.delete(agentId);
159
+ return true;
160
+ }
161
+ /**
162
+ * Get agent state (messages, turn count, etc.)
163
+ */
164
+ export function getWasmAgentState(agentId) {
165
+ const entry = agents.get(agentId);
166
+ if (!entry)
167
+ throw new Error(`WASM agent not found: ${agentId}`);
168
+ return entry.agent.get_state();
169
+ }
170
+ /**
171
+ * Get agent tools list.
172
+ */
173
+ export function getWasmAgentTools(agentId) {
174
+ const entry = agents.get(agentId);
175
+ if (!entry)
176
+ throw new Error(`WASM agent not found: ${agentId}`);
177
+ return entry.agent.get_tools();
178
+ }
179
+ /**
180
+ * Get agent todos.
181
+ */
182
+ export function getWasmAgentTodos(agentId) {
183
+ const entry = agents.get(agentId);
184
+ if (!entry)
185
+ throw new Error(`WASM agent not found: ${agentId}`);
186
+ return entry.agent.get_todos();
187
+ }
188
+ /**
189
+ * Export the full agent state as JSON (for persistence).
190
+ */
191
+ export function exportWasmState(agentId) {
192
+ const entry = agents.get(agentId);
193
+ if (!entry)
194
+ throw new Error(`WASM agent not found: ${agentId}`);
195
+ return JSON.stringify({
196
+ agentState: entry.agent.get_state(),
197
+ tools: entry.agent.get_tools(),
198
+ todos: entry.agent.get_todos(),
199
+ info: entry.info,
200
+ });
201
+ }
202
+ // ── MCP Server Bridge ────────────────────────────────────────
203
+ /**
204
+ * Create a WASM-based MCP server for an agent.
205
+ * Returns a handler function for JSON-RPC requests.
206
+ *
207
+ * Note: WasmMcpServer may have stability issues in v0.1.0 for
208
+ * certain agent configurations. Use with a fully configured agent.
209
+ */
210
+ export async function createWasmMcpServer(agentId) {
211
+ const entry = agents.get(agentId);
212
+ if (!entry)
213
+ throw new Error(`WASM agent not found: ${agentId}`);
214
+ const mod = await import('@ruvector/rvagent-wasm');
215
+ const server = new mod.WasmMcpServer(entry.agent);
216
+ return (jsonRpc) => server.handle_request(jsonRpc);
217
+ }
218
+ // ── Gallery Templates ────────────────────────────────────────
219
+ let _gallery = null;
220
+ async function getGallery() {
221
+ if (_gallery)
222
+ return _gallery;
223
+ await initAgentWasm();
224
+ const mod = await import('@ruvector/rvagent-wasm');
225
+ _gallery = new mod.WasmGallery();
226
+ return _gallery;
227
+ }
228
+ /**
229
+ * List all available gallery templates.
230
+ * Returns objects directly (Gallery.list() returns parsed objects in v0.1.0).
231
+ */
232
+ export async function listGalleryTemplates() {
233
+ const gallery = await getGallery();
234
+ return gallery.list();
235
+ }
236
+ /**
237
+ * Get gallery template count.
238
+ */
239
+ export async function getGalleryCount() {
240
+ const gallery = await getGallery();
241
+ return gallery.count();
242
+ }
243
+ /**
244
+ * Get gallery categories with counts.
245
+ */
246
+ export async function getGalleryCategories() {
247
+ const gallery = await getGallery();
248
+ return gallery.getCategories();
249
+ }
250
+ /**
251
+ * Search gallery templates by query. Returns results with relevance scores.
252
+ */
253
+ export async function searchGalleryTemplates(query) {
254
+ const gallery = await getGallery();
255
+ return gallery.search(query);
256
+ }
257
+ /**
258
+ * Get a gallery template by id.
259
+ * Wraps in try/catch because WasmGallery.get() panics on unknown IDs in v0.1.0.
260
+ */
261
+ export async function getGalleryTemplate(id) {
262
+ const gallery = await getGallery();
263
+ try {
264
+ return gallery.get(id) ?? null;
265
+ }
266
+ catch {
267
+ return null;
268
+ }
269
+ }
270
+ /**
271
+ * Create an agent from a gallery template.
272
+ */
273
+ export async function createAgentFromTemplate(templateId) {
274
+ const template = await getGalleryTemplate(templateId);
275
+ if (!template)
276
+ throw new Error(`Gallery template not found: ${templateId}`);
277
+ const systemPrompt = template.prompts?.[0]?.system_prompt;
278
+ return createWasmAgent({
279
+ instructions: systemPrompt ?? `You are a ${template.name}.`,
280
+ model: undefined, // Use default
281
+ });
282
+ }
283
+ // ── RVF Container Operations ─────────────────────────────────
284
+ /**
285
+ * Build an RVF container with prompts, tools, and skills.
286
+ * Uses the high-level RVF builder API (addPrompt, addTool, addSkill).
287
+ */
288
+ export async function buildRvfContainer(opts) {
289
+ await initAgentWasm();
290
+ const mod = await import('@ruvector/rvagent-wasm');
291
+ const builder = new mod.WasmRvfBuilder();
292
+ for (const p of opts.prompts ?? []) {
293
+ builder.addPrompt(JSON.stringify(p));
294
+ }
295
+ for (const t of opts.tools ?? []) {
296
+ builder.addTool(JSON.stringify(t));
297
+ }
298
+ for (const s of opts.skills ?? []) {
299
+ builder.addSkill(JSON.stringify(s));
300
+ }
301
+ return builder.build();
302
+ }
303
+ /**
304
+ * Build an RVF container from a gallery template.
305
+ */
306
+ export async function buildRvfFromTemplate(templateId) {
307
+ const template = await getGalleryTemplate(templateId);
308
+ if (!template)
309
+ throw new Error(`Gallery template not found: ${templateId}`);
310
+ return buildRvfContainer({
311
+ prompts: template.prompts,
312
+ tools: template.tools,
313
+ skills: template.skills,
314
+ });
315
+ }
316
+ //# sourceMappingURL=agent-wasm.js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CAAC;IAEzC,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,OAAO,IAAI,EAAE,EAAE,CAAC;QACnC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;IACvC,CAAC;IACD,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,KAAK,IAAI,EAAE,EAAE,CAAC;QACjC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;IACrC,CAAC;IACD,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,MAAM,IAAI,EAAE,EAAE,CAAC;QAClC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;IACtC,CAAC;IAED,OAAO,OAAO,CAAC,KAAK,EAAE,CAAC;AACzB,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,UAAkB;IAC3D,MAAM,QAAQ,GAAG,MAAM,kBAAkB,CAAC,UAAU,CAAC,CAAC;IACtD,IAAI,CAAC,QAAQ;QAAE,MAAM,IAAI,KAAK,CAAC,+BAA+B,UAAU,EAAE,CAAC,CAAC;IAE5E,OAAO,iBAAiB,CAAC;QACvB,OAAO,EAAE,QAAQ,CAAC,OAAO;QACzB,KAAK,EAAE,QAAQ,CAAC,KAAK;QACrB,MAAM,EAAE,QAAQ,CAAC,MAAM;KACxB,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,67 @@
1
+ /**
2
+ * AST Analyzer for Code Analysis
3
+ *
4
+ * Analyzes Abstract Syntax Trees for code understanding
5
+ * and intelligent routing decisions.
6
+ *
7
+ * @module ast-analyzer
8
+ */
9
+ export interface ASTAnalyzerConfig {
10
+ maxFileSize: number;
11
+ languages: string[];
12
+ includeComments: boolean;
13
+ extractTypes: boolean;
14
+ maxDepth: number;
15
+ }
16
+ export interface ASTNode {
17
+ type: string;
18
+ name: string;
19
+ startLine: number;
20
+ endLine: number;
21
+ children: ASTNode[];
22
+ metadata?: Record<string, unknown>;
23
+ }
24
+ export interface ASTAnalysis {
25
+ filePath: string;
26
+ language: string;
27
+ root: ASTNode;
28
+ functions: ASTNode[];
29
+ classes: ASTNode[];
30
+ imports: string[];
31
+ exports: string[];
32
+ complexity: {
33
+ cyclomatic: number;
34
+ cognitive: number;
35
+ loc: number;
36
+ commentDensity: number;
37
+ };
38
+ timestamp: number;
39
+ durationMs: number;
40
+ }
41
+ export declare class ASTAnalyzer {
42
+ private config;
43
+ private ruvectorEngine;
44
+ private useNative;
45
+ private analysisCache;
46
+ constructor(config?: Partial<ASTAnalyzerConfig>);
47
+ initialize(): Promise<void>;
48
+ analyze(code: string, filePath?: string): ASTAnalysis;
49
+ getFunctionAtLine(analysis: ASTAnalysis, line: number): ASTNode | null;
50
+ getClassAtLine(analysis: ASTAnalysis, line: number): ASTNode | null;
51
+ getSymbols(analysis: ASTAnalysis): string[];
52
+ getStats(): Record<string, number>;
53
+ clearCache(): void;
54
+ private getCacheKey;
55
+ private detectLanguage;
56
+ private parseAST;
57
+ private matchFunction;
58
+ private matchClass;
59
+ private findBlockEnd;
60
+ private extractFunctions;
61
+ private extractClasses;
62
+ private extractImports;
63
+ private extractExports;
64
+ private calculateComplexity;
65
+ }
66
+ export declare function createASTAnalyzer(config?: Partial<ASTAnalyzerConfig>): ASTAnalyzer;
67
+ //# sourceMappingURL=ast-analyzer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ast-analyzer.d.ts","sourceRoot":"","sources":["../../../src/ruvector/ast-analyzer.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,eAAe,EAAE,OAAO,CAAC;IACzB,YAAY,EAAE,OAAO,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,W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,WAAW,GAAG,MAAM,EAAE;IAO3C,QAAQ,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAIlC,UAAU,IAAI,IAAI;IAElB,OAAO,CAAC,WAAW;IAWnB,OAAO,CAAC,cAAc;IAStB,OAAO,CAAC,QAAQ;IA6BhB,OAAO,CAAC,aAAa;IAqBrB,OAAO,CAAC,UAAU;IAelB,OAAO,CAAC,YAAY;IAcpB,OAAO,CAAC,gBAAgB;IAUxB,OAAO,CAAC,cAAc;IAUtB,OAAO,CAAC,cAAc;IAmBtB,OAAO,CAAC,cAAc;IAetB,OAAO,CAAC,mBAAmB;CAoB5B;AAED,wBAAgB,iBAAiB,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,GAAG,WAAW,CAElF"}
@@ -0,0 +1,277 @@
1
+ /**
2
+ * AST Analyzer for Code Analysis
3
+ *
4
+ * Analyzes Abstract Syntax Trees for code understanding
5
+ * and intelligent routing decisions.
6
+ *
7
+ * @module ast-analyzer
8
+ */
9
+ const DEFAULT_CONFIG = {
10
+ maxFileSize: 1024 * 1024,
11
+ languages: ['typescript', 'javascript', 'python', 'rust', 'go'],
12
+ includeComments: true,
13
+ extractTypes: true,
14
+ maxDepth: 20,
15
+ };
16
+ const LANGUAGE_PATTERNS = {
17
+ typescript: [/\.tsx?$/, /^import\s+.*from\s+['"]/, /:\s*(string|number|boolean|void)/],
18
+ javascript: [/\.jsx?$/, /^(const|let|var)\s+\w+\s*=/, /module\.exports/],
19
+ python: [/\.py$/, /^(def|class|import|from)\s+/, /^#!/],
20
+ rust: [/\.rs$/, /^(fn|struct|impl|use)\s+/, /^(pub\s+)?mod\s+/],
21
+ go: [/\.go$/, /^package\s+/, /^func\s+/],
22
+ };
23
+ export class ASTAnalyzer {
24
+ config;
25
+ ruvectorEngine = null;
26
+ useNative = false;
27
+ analysisCache = new Map();
28
+ constructor(config = {}) {
29
+ this.config = { ...DEFAULT_CONFIG, ...config };
30
+ }
31
+ async initialize() {
32
+ try {
33
+ // @ruvector/ast is optional - gracefully fallback if not installed
34
+ const ruvector = await import('@ruvector/ast').catch(() => null);
35
+ if (ruvector) {
36
+ this.ruvectorEngine = ruvector.createASTAnalyzer?.(this.config);
37
+ this.useNative = !!this.ruvectorEngine;
38
+ }
39
+ }
40
+ catch {
41
+ this.useNative = false;
42
+ }
43
+ }
44
+ analyze(code, filePath = 'unknown') {
45
+ const startTime = performance.now();
46
+ if (code.length > this.config.maxFileSize) {
47
+ throw new Error(`File too large: ${code.length} bytes exceeds ${this.config.maxFileSize}`);
48
+ }
49
+ const cacheKey = this.getCacheKey(code, filePath);
50
+ const cached = this.analysisCache.get(cacheKey);
51
+ if (cached)
52
+ return cached;
53
+ const language = this.detectLanguage(code, filePath);
54
+ const root = this.parseAST(code, language);
55
+ const functions = this.extractFunctions(root);
56
+ const classes = this.extractClasses(root);
57
+ const imports = this.extractImports(code, language);
58
+ const exports = this.extractExports(code, language);
59
+ const complexity = this.calculateComplexity(code, root);
60
+ const durationMs = performance.now() - startTime;
61
+ const analysis = {
62
+ filePath, language, root, functions, classes, imports, exports,
63
+ complexity, timestamp: Date.now(), durationMs,
64
+ };
65
+ this.analysisCache.set(cacheKey, analysis);
66
+ return analysis;
67
+ }
68
+ getFunctionAtLine(analysis, line) {
69
+ for (const func of analysis.functions) {
70
+ if (line >= func.startLine && line <= func.endLine)
71
+ return func;
72
+ }
73
+ return null;
74
+ }
75
+ getClassAtLine(analysis, line) {
76
+ for (const cls of analysis.classes) {
77
+ if (line >= cls.startLine && line <= cls.endLine)
78
+ return cls;
79
+ }
80
+ return null;
81
+ }
82
+ getSymbols(analysis) {
83
+ const symbols = [];
84
+ for (const func of analysis.functions)
85
+ symbols.push(func.name);
86
+ for (const cls of analysis.classes)
87
+ symbols.push(cls.name);
88
+ return symbols;
89
+ }
90
+ getStats() {
91
+ return { cacheSize: this.analysisCache.size, useNative: this.useNative ? 1 : 0 };
92
+ }
93
+ clearCache() { this.analysisCache.clear(); }
94
+ getCacheKey(code, filePath) {
95
+ let hash = 0;
96
+ const str = filePath + code.substring(0, 1000);
97
+ for (let i = 0; i < str.length; i++) {
98
+ const char = str.charCodeAt(i);
99
+ hash = ((hash << 5) - hash) + char;
100
+ hash = hash & hash;
101
+ }
102
+ return `ast_${hash}_${code.length}`;
103
+ }
104
+ detectLanguage(code, filePath) {
105
+ for (const [lang, patterns] of Object.entries(LANGUAGE_PATTERNS)) {
106
+ for (const pattern of patterns) {
107
+ if (pattern.test(filePath) || pattern.test(code))
108
+ return lang;
109
+ }
110
+ }
111
+ return 'unknown';
112
+ }
113
+ parseAST(code, language) {
114
+ const lines = code.split('\n');
115
+ const root = { type: 'program', name: 'root', startLine: 1, endLine: lines.length, children: [] };
116
+ for (let i = 0; i < lines.length; i++) {
117
+ const line = lines[i];
118
+ const lineNum = i + 1;
119
+ const funcMatch = this.matchFunction(line, language);
120
+ if (funcMatch) {
121
+ const funcNode = {
122
+ type: 'function', name: funcMatch.name, startLine: lineNum,
123
+ endLine: lineNum + this.findBlockEnd(lines, i), children: [],
124
+ metadata: { params: funcMatch.params },
125
+ };
126
+ root.children.push(funcNode);
127
+ continue;
128
+ }
129
+ const classMatch = this.matchClass(line, language);
130
+ if (classMatch) {
131
+ const classNode = {
132
+ type: 'class', name: classMatch.name, startLine: lineNum,
133
+ endLine: lineNum + this.findBlockEnd(lines, i), children: [],
134
+ metadata: { extends: classMatch.extends },
135
+ };
136
+ root.children.push(classNode);
137
+ }
138
+ }
139
+ return root;
140
+ }
141
+ matchFunction(line, language) {
142
+ const patterns = {
143
+ typescript: /(?:export\s+)?(?:async\s+)?function\s+(\w+)\s*\(([^)]*)\)/,
144
+ javascript: /(?:export\s+)?(?:async\s+)?function\s+(\w+)\s*\(([^)]*)\)/,
145
+ python: /def\s+(\w+)\s*\(([^)]*)\)/,
146
+ rust: /(?:pub\s+)?(?:async\s+)?fn\s+(\w+)\s*\(([^)]*)\)/,
147
+ go: /func\s+(?:\([^)]*\)\s+)?(\w+)\s*\(([^)]*)\)/,
148
+ };
149
+ const pattern = patterns[language];
150
+ if (!pattern)
151
+ return null;
152
+ const match = line.match(pattern);
153
+ if (match)
154
+ return { name: match[1], params: match[2] || '' };
155
+ const arrowMatch = line.match(/(?:const|let|var)\s+(\w+)\s*=\s*(?:async\s+)?\([^)]*\)\s*=>/);
156
+ if (arrowMatch)
157
+ return { name: arrowMatch[1], params: '' };
158
+ const methodMatch = line.match(/^\s*(?:async\s+)?(\w+)\s*\([^)]*\)\s*(?::\s*\w+)?\s*\{/);
159
+ if (methodMatch && methodMatch[1] !== 'if' && methodMatch[1] !== 'while' && methodMatch[1] !== 'for') {
160
+ return { name: methodMatch[1], params: '' };
161
+ }
162
+ return null;
163
+ }
164
+ matchClass(line, language) {
165
+ const patterns = {
166
+ typescript: /(?:export\s+)?class\s+(\w+)(?:\s+extends\s+(\w+))?/,
167
+ javascript: /(?:export\s+)?class\s+(\w+)(?:\s+extends\s+(\w+))?/,
168
+ python: /class\s+(\w+)(?:\((\w+)\))?/,
169
+ rust: /(?:pub\s+)?struct\s+(\w+)/,
170
+ go: /type\s+(\w+)\s+struct/,
171
+ };
172
+ const pattern = patterns[language];
173
+ if (!pattern)
174
+ return null;
175
+ const match = line.match(pattern);
176
+ if (match)
177
+ return { name: match[1], extends: match[2] };
178
+ return null;
179
+ }
180
+ findBlockEnd(lines, startIdx) {
181
+ let depth = 0;
182
+ let inBlock = false;
183
+ for (let i = startIdx; i < lines.length; i++) {
184
+ const line = lines[i];
185
+ const opens = (line.match(/[\{]/g) || []).length;
186
+ const closes = (line.match(/[\}]/g) || []).length;
187
+ if (opens > 0)
188
+ inBlock = true;
189
+ depth += opens - closes;
190
+ if (inBlock && depth <= 0)
191
+ return i - startIdx;
192
+ }
193
+ return Math.min(50, lines.length - startIdx);
194
+ }
195
+ extractFunctions(root) {
196
+ const functions = [];
197
+ const visit = (node) => {
198
+ if (node.type === 'function')
199
+ functions.push(node);
200
+ for (const child of node.children)
201
+ visit(child);
202
+ };
203
+ visit(root);
204
+ return functions;
205
+ }
206
+ extractClasses(root) {
207
+ const classes = [];
208
+ const visit = (node) => {
209
+ if (node.type === 'class')
210
+ classes.push(node);
211
+ for (const child of node.children)
212
+ visit(child);
213
+ };
214
+ visit(root);
215
+ return classes;
216
+ }
217
+ extractImports(code, language) {
218
+ const imports = [];
219
+ const lines = code.split('\n');
220
+ const patterns = {
221
+ typescript: /import\s+(?:.*\s+from\s+)?['"]([^'"]+)['"]/,
222
+ javascript: /(?:import\s+.*from\s+|require\s*\(\s*)['"]([^'"]+)['"]/,
223
+ python: /(?:from\s+(\S+)\s+import|import\s+(\S+))/,
224
+ rust: /use\s+(\S+)/,
225
+ go: /import\s+(?:\(\s*)?["']([^"']+)["']/,
226
+ };
227
+ const pattern = patterns[language];
228
+ if (!pattern)
229
+ return imports;
230
+ for (const line of lines) {
231
+ const match = line.match(pattern);
232
+ if (match)
233
+ imports.push(match[1] || match[2]);
234
+ }
235
+ return imports;
236
+ }
237
+ extractExports(code, language) {
238
+ const exports = [];
239
+ const lines = code.split('\n');
240
+ for (const line of lines) {
241
+ const exportMatch = line.match(/export\s+(?:default\s+)?(?:const|let|var|function|class|interface|type|enum)\s+(\w+)/);
242
+ if (exportMatch)
243
+ exports.push(exportMatch[1]);
244
+ const namedExportMatch = line.match(/export\s*\{\s*([^}]+)\s*\}/);
245
+ if (namedExportMatch) {
246
+ const names = namedExportMatch[1].split(',').map(n => n.trim().split(/\s+as\s+/)[0]);
247
+ exports.push(...names);
248
+ }
249
+ }
250
+ return exports;
251
+ }
252
+ calculateComplexity(code, root) {
253
+ const lines = code.split('\n');
254
+ const nonEmptyLines = lines.filter(l => l.trim().length > 0);
255
+ const commentLines = lines.filter(l => /^\s*(\/\/|\/\*|\*|#)/.test(l));
256
+ const decisionPoints = (code.match(/\b(if|else|for|while|switch|case|catch|&&|\|\||\?)\b/g) || []).length;
257
+ const cyclomatic = decisionPoints + 1;
258
+ let cognitive = 0;
259
+ let nestingLevel = 0;
260
+ for (const line of lines) {
261
+ const opens = (line.match(/[\{]/g) || []).length;
262
+ const closes = (line.match(/[\}]/g) || []).length;
263
+ if (/\b(if|for|while|switch)\b/.test(line))
264
+ cognitive += 1 + nestingLevel;
265
+ nestingLevel += opens - closes;
266
+ nestingLevel = Math.max(0, nestingLevel);
267
+ }
268
+ return {
269
+ cyclomatic, cognitive, loc: nonEmptyLines.length,
270
+ commentDensity: lines.length > 0 ? commentLines.length / lines.length : 0,
271
+ };
272
+ }
273
+ }
274
+ export function createASTAnalyzer(config) {
275
+ return new ASTAnalyzer(config);
276
+ }
277
+ //# sourceMappingURL=ast-analyzer.js.map