agentic-qe 3.2.3 → 3.3.0

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 (340) hide show
  1. package/.claude/agents/v3/qe-accessibility-auditor.md +90 -0
  2. package/README.md +43 -5
  3. package/package.json +3 -2
  4. package/scripts/cloud-db-config.json +37 -0
  5. package/scripts/cloud-db-connect.sh +37 -0
  6. package/scripts/cloud-db-tunnel.sh +23 -0
  7. package/v3/CHANGELOG.md +165 -0
  8. package/v3/README.md +59 -1
  9. package/v3/assets/agents/v3/qe-accessibility-auditor.md +90 -0
  10. package/v3/dist/adapters/claude-flow/index.d.ts +54 -0
  11. package/v3/dist/adapters/claude-flow/index.d.ts.map +1 -0
  12. package/v3/dist/adapters/claude-flow/index.js +79 -0
  13. package/v3/dist/adapters/claude-flow/index.js.map +1 -0
  14. package/v3/dist/adapters/claude-flow/model-router-bridge.d.ts +70 -0
  15. package/v3/dist/adapters/claude-flow/model-router-bridge.d.ts.map +1 -0
  16. package/v3/dist/adapters/claude-flow/model-router-bridge.js +203 -0
  17. package/v3/dist/adapters/claude-flow/model-router-bridge.js.map +1 -0
  18. package/v3/dist/adapters/claude-flow/pretrain-bridge.d.ts +73 -0
  19. package/v3/dist/adapters/claude-flow/pretrain-bridge.d.ts.map +1 -0
  20. package/v3/dist/adapters/claude-flow/pretrain-bridge.js +276 -0
  21. package/v3/dist/adapters/claude-flow/pretrain-bridge.js.map +1 -0
  22. package/v3/dist/adapters/claude-flow/trajectory-bridge.d.ts +70 -0
  23. package/v3/dist/adapters/claude-flow/trajectory-bridge.d.ts.map +1 -0
  24. package/v3/dist/adapters/claude-flow/trajectory-bridge.js +205 -0
  25. package/v3/dist/adapters/claude-flow/trajectory-bridge.js.map +1 -0
  26. package/v3/dist/adapters/claude-flow/types.d.ts +99 -0
  27. package/v3/dist/adapters/claude-flow/types.d.ts.map +1 -0
  28. package/v3/dist/adapters/claude-flow/types.js +6 -0
  29. package/v3/dist/adapters/claude-flow/types.js.map +1 -0
  30. package/v3/dist/causal-discovery/causal-graph.d.ts +80 -1
  31. package/v3/dist/causal-discovery/causal-graph.d.ts.map +1 -1
  32. package/v3/dist/causal-discovery/causal-graph.js +111 -1
  33. package/v3/dist/causal-discovery/causal-graph.js.map +1 -1
  34. package/v3/dist/cli/bundle.js +11612 -4929
  35. package/v3/dist/cli/commands/claude-flow-setup.d.ts +82 -0
  36. package/v3/dist/cli/commands/claude-flow-setup.d.ts.map +1 -0
  37. package/v3/dist/cli/commands/claude-flow-setup.js +334 -0
  38. package/v3/dist/cli/commands/claude-flow-setup.js.map +1 -0
  39. package/v3/dist/cli/commands/hooks.d.ts +2 -0
  40. package/v3/dist/cli/commands/hooks.d.ts.map +1 -1
  41. package/v3/dist/cli/commands/hooks.js +13 -2
  42. package/v3/dist/cli/commands/hooks.js.map +1 -1
  43. package/v3/dist/cli/commands/init.d.ts +19 -0
  44. package/v3/dist/cli/commands/init.d.ts.map +1 -0
  45. package/v3/dist/cli/commands/init.js +345 -0
  46. package/v3/dist/cli/commands/init.js.map +1 -0
  47. package/v3/dist/cli/index.js +110 -2
  48. package/v3/dist/cli/index.js.map +1 -1
  49. package/v3/dist/coordination/mincut/interfaces.d.ts +8 -2
  50. package/v3/dist/coordination/mincut/interfaces.d.ts.map +1 -1
  51. package/v3/dist/coordination/mincut/interfaces.js.map +1 -1
  52. package/v3/dist/coordination/mincut/mincut-health-monitor.d.ts +5 -0
  53. package/v3/dist/coordination/mincut/mincut-health-monitor.d.ts.map +1 -1
  54. package/v3/dist/coordination/mincut/mincut-health-monitor.js +22 -4
  55. package/v3/dist/coordination/mincut/mincut-health-monitor.js.map +1 -1
  56. package/v3/dist/coordination/mincut/queen-integration.d.ts +4 -0
  57. package/v3/dist/coordination/mincut/queen-integration.d.ts.map +1 -1
  58. package/v3/dist/coordination/mincut/queen-integration.js +14 -1
  59. package/v3/dist/coordination/mincut/queen-integration.js.map +1 -1
  60. package/v3/dist/coordination/queen-coordinator.d.ts +5 -0
  61. package/v3/dist/coordination/queen-coordinator.d.ts.map +1 -1
  62. package/v3/dist/coordination/queen-coordinator.js +45 -7
  63. package/v3/dist/coordination/queen-coordinator.js.map +1 -1
  64. package/v3/dist/domains/learning-optimization/coordinator.d.ts +5 -0
  65. package/v3/dist/domains/learning-optimization/coordinator.d.ts.map +1 -1
  66. package/v3/dist/domains/learning-optimization/coordinator.js +79 -0
  67. package/v3/dist/domains/learning-optimization/coordinator.js.map +1 -1
  68. package/v3/dist/domains/test-generation/coherence-gate.d.ts +245 -0
  69. package/v3/dist/domains/test-generation/coherence-gate.d.ts.map +1 -0
  70. package/v3/dist/domains/test-generation/coherence-gate.js +454 -0
  71. package/v3/dist/domains/test-generation/coherence-gate.js.map +1 -0
  72. package/v3/dist/domains/test-generation/coordinator.d.ts +32 -1
  73. package/v3/dist/domains/test-generation/coordinator.d.ts.map +1 -1
  74. package/v3/dist/domains/test-generation/coordinator.js +70 -1
  75. package/v3/dist/domains/test-generation/coordinator.js.map +1 -1
  76. package/v3/dist/domains/test-generation/index.d.ts +1 -0
  77. package/v3/dist/domains/test-generation/index.d.ts.map +1 -1
  78. package/v3/dist/domains/test-generation/index.js +4 -0
  79. package/v3/dist/domains/test-generation/index.js.map +1 -1
  80. package/v3/dist/domains/test-generation/services/index.d.ts +1 -0
  81. package/v3/dist/domains/test-generation/services/index.d.ts.map +1 -1
  82. package/v3/dist/domains/test-generation/services/index.js +2 -0
  83. package/v3/dist/domains/test-generation/services/index.js.map +1 -1
  84. package/v3/dist/domains/visual-accessibility/index.d.ts +2 -1
  85. package/v3/dist/domains/visual-accessibility/index.d.ts.map +1 -1
  86. package/v3/dist/domains/visual-accessibility/index.js +1 -0
  87. package/v3/dist/domains/visual-accessibility/index.js.map +1 -1
  88. package/v3/dist/domains/visual-accessibility/interfaces.d.ts +131 -0
  89. package/v3/dist/domains/visual-accessibility/interfaces.d.ts.map +1 -1
  90. package/v3/dist/domains/visual-accessibility/plugin.d.ts +26 -0
  91. package/v3/dist/domains/visual-accessibility/plugin.d.ts.map +1 -1
  92. package/v3/dist/domains/visual-accessibility/plugin.js +151 -0
  93. package/v3/dist/domains/visual-accessibility/plugin.js.map +1 -1
  94. package/v3/dist/domains/visual-accessibility/services/accessibility-tester.d.ts +42 -1
  95. package/v3/dist/domains/visual-accessibility/services/accessibility-tester.d.ts.map +1 -1
  96. package/v3/dist/domains/visual-accessibility/services/accessibility-tester.js +69 -0
  97. package/v3/dist/domains/visual-accessibility/services/accessibility-tester.js.map +1 -1
  98. package/v3/dist/domains/visual-accessibility/services/eu-compliance.d.ts +138 -0
  99. package/v3/dist/domains/visual-accessibility/services/eu-compliance.d.ts.map +1 -0
  100. package/v3/dist/domains/visual-accessibility/services/eu-compliance.js +830 -0
  101. package/v3/dist/domains/visual-accessibility/services/eu-compliance.js.map +1 -0
  102. package/v3/dist/domains/visual-accessibility/services/index.d.ts +1 -0
  103. package/v3/dist/domains/visual-accessibility/services/index.d.ts.map +1 -1
  104. package/v3/dist/domains/visual-accessibility/services/index.js +1 -0
  105. package/v3/dist/domains/visual-accessibility/services/index.js.map +1 -1
  106. package/v3/dist/init/enhancements/claude-flow-adapter.d.ts +84 -0
  107. package/v3/dist/init/enhancements/claude-flow-adapter.d.ts.map +1 -0
  108. package/v3/dist/init/enhancements/claude-flow-adapter.js +250 -0
  109. package/v3/dist/init/enhancements/claude-flow-adapter.js.map +1 -0
  110. package/v3/dist/init/enhancements/detector.d.ts +10 -0
  111. package/v3/dist/init/enhancements/detector.d.ts.map +1 -0
  112. package/v3/dist/init/enhancements/detector.js +87 -0
  113. package/v3/dist/init/enhancements/detector.js.map +1 -0
  114. package/v3/dist/init/enhancements/index.d.ts +13 -0
  115. package/v3/dist/init/enhancements/index.d.ts.map +1 -0
  116. package/v3/dist/init/enhancements/index.js +25 -0
  117. package/v3/dist/init/enhancements/index.js.map +1 -0
  118. package/v3/dist/init/enhancements/types.d.ts +93 -0
  119. package/v3/dist/init/enhancements/types.d.ts.map +1 -0
  120. package/v3/dist/init/enhancements/types.js +6 -0
  121. package/v3/dist/init/enhancements/types.js.map +1 -0
  122. package/v3/dist/init/index.d.ts +8 -0
  123. package/v3/dist/init/index.d.ts.map +1 -1
  124. package/v3/dist/init/index.js +4 -0
  125. package/v3/dist/init/index.js.map +1 -1
  126. package/v3/dist/init/migration/config-migrator.d.ts +31 -0
  127. package/v3/dist/init/migration/config-migrator.d.ts.map +1 -0
  128. package/v3/dist/init/migration/config-migrator.js +133 -0
  129. package/v3/dist/init/migration/config-migrator.js.map +1 -0
  130. package/v3/dist/init/migration/data-migrator.d.ts +72 -0
  131. package/v3/dist/init/migration/data-migrator.d.ts.map +1 -0
  132. package/v3/dist/init/migration/data-migrator.js +233 -0
  133. package/v3/dist/init/migration/data-migrator.js.map +1 -0
  134. package/v3/dist/init/migration/detector.d.ts +44 -0
  135. package/v3/dist/init/migration/detector.d.ts.map +1 -0
  136. package/v3/dist/init/migration/detector.js +106 -0
  137. package/v3/dist/init/migration/detector.js.map +1 -0
  138. package/v3/dist/init/migration/index.d.ts +8 -0
  139. package/v3/dist/init/migration/index.d.ts.map +1 -0
  140. package/v3/dist/init/migration/index.js +8 -0
  141. package/v3/dist/init/migration/index.js.map +1 -0
  142. package/v3/dist/init/orchestrator.d.ts +68 -0
  143. package/v3/dist/init/orchestrator.d.ts.map +1 -0
  144. package/v3/dist/init/orchestrator.js +239 -0
  145. package/v3/dist/init/orchestrator.js.map +1 -0
  146. package/v3/dist/init/phases/01-detection.d.ts +30 -0
  147. package/v3/dist/init/phases/01-detection.d.ts.map +1 -0
  148. package/v3/dist/init/phases/01-detection.js +143 -0
  149. package/v3/dist/init/phases/01-detection.js.map +1 -0
  150. package/v3/dist/init/phases/02-analysis.d.ts +18 -0
  151. package/v3/dist/init/phases/02-analysis.d.ts.map +1 -0
  152. package/v3/dist/init/phases/02-analysis.js +28 -0
  153. package/v3/dist/init/phases/02-analysis.js.map +1 -0
  154. package/v3/dist/init/phases/03-configuration.d.ts +26 -0
  155. package/v3/dist/init/phases/03-configuration.d.ts.map +1 -0
  156. package/v3/dist/init/phases/03-configuration.js +98 -0
  157. package/v3/dist/init/phases/03-configuration.js.map +1 -0
  158. package/v3/dist/init/phases/04-database.d.ts +22 -0
  159. package/v3/dist/init/phases/04-database.d.ts.map +1 -0
  160. package/v3/dist/init/phases/04-database.js +88 -0
  161. package/v3/dist/init/phases/04-database.js.map +1 -0
  162. package/v3/dist/init/phases/05-learning.d.ts +28 -0
  163. package/v3/dist/init/phases/05-learning.d.ts.map +1 -0
  164. package/v3/dist/init/phases/05-learning.js +98 -0
  165. package/v3/dist/init/phases/05-learning.js.map +1 -0
  166. package/v3/dist/init/phases/06-code-intelligence.d.ts +33 -0
  167. package/v3/dist/init/phases/06-code-intelligence.d.ts.map +1 -0
  168. package/v3/dist/init/phases/06-code-intelligence.js +115 -0
  169. package/v3/dist/init/phases/06-code-intelligence.js.map +1 -0
  170. package/v3/dist/init/phases/07-hooks.d.ts +27 -0
  171. package/v3/dist/init/phases/07-hooks.d.ts.map +1 -0
  172. package/v3/dist/init/phases/07-hooks.js +209 -0
  173. package/v3/dist/init/phases/07-hooks.js.map +1 -0
  174. package/v3/dist/init/phases/08-mcp.d.ts +22 -0
  175. package/v3/dist/init/phases/08-mcp.d.ts.map +1 -0
  176. package/v3/dist/init/phases/08-mcp.js +62 -0
  177. package/v3/dist/init/phases/08-mcp.js.map +1 -0
  178. package/v3/dist/init/phases/09-assets.d.ts +23 -0
  179. package/v3/dist/init/phases/09-assets.d.ts.map +1 -0
  180. package/v3/dist/init/phases/09-assets.js +82 -0
  181. package/v3/dist/init/phases/09-assets.js.map +1 -0
  182. package/v3/dist/init/phases/10-workers.d.ts +23 -0
  183. package/v3/dist/init/phases/10-workers.d.ts.map +1 -0
  184. package/v3/dist/init/phases/10-workers.js +111 -0
  185. package/v3/dist/init/phases/10-workers.js.map +1 -0
  186. package/v3/dist/init/phases/11-claude-md.d.ts +26 -0
  187. package/v3/dist/init/phases/11-claude-md.d.ts.map +1 -0
  188. package/v3/dist/init/phases/11-claude-md.js +121 -0
  189. package/v3/dist/init/phases/11-claude-md.js.map +1 -0
  190. package/v3/dist/init/phases/12-verification.d.ts +38 -0
  191. package/v3/dist/init/phases/12-verification.d.ts.map +1 -0
  192. package/v3/dist/init/phases/12-verification.js +187 -0
  193. package/v3/dist/init/phases/12-verification.js.map +1 -0
  194. package/v3/dist/init/phases/index.d.ts +46 -0
  195. package/v3/dist/init/phases/index.d.ts.map +1 -0
  196. package/v3/dist/init/phases/index.js +64 -0
  197. package/v3/dist/init/phases/index.js.map +1 -0
  198. package/v3/dist/init/phases/phase-interface.d.ts +193 -0
  199. package/v3/dist/init/phases/phase-interface.d.ts.map +1 -0
  200. package/v3/dist/init/phases/phase-interface.js +119 -0
  201. package/v3/dist/init/phases/phase-interface.js.map +1 -0
  202. package/v3/dist/integrations/coherence/coherence-service.d.ts +323 -0
  203. package/v3/dist/integrations/coherence/coherence-service.d.ts.map +1 -0
  204. package/v3/dist/integrations/coherence/coherence-service.js +799 -0
  205. package/v3/dist/integrations/coherence/coherence-service.js.map +1 -0
  206. package/v3/dist/integrations/coherence/engines/category-adapter.d.ts +170 -0
  207. package/v3/dist/integrations/coherence/engines/category-adapter.d.ts.map +1 -0
  208. package/v3/dist/integrations/coherence/engines/category-adapter.js +403 -0
  209. package/v3/dist/integrations/coherence/engines/category-adapter.js.map +1 -0
  210. package/v3/dist/integrations/coherence/engines/causal-adapter.d.ts +159 -0
  211. package/v3/dist/integrations/coherence/engines/causal-adapter.d.ts.map +1 -0
  212. package/v3/dist/integrations/coherence/engines/causal-adapter.js +348 -0
  213. package/v3/dist/integrations/coherence/engines/causal-adapter.js.map +1 -0
  214. package/v3/dist/integrations/coherence/engines/cohomology-adapter.d.ts +174 -0
  215. package/v3/dist/integrations/coherence/engines/cohomology-adapter.d.ts.map +1 -0
  216. package/v3/dist/integrations/coherence/engines/cohomology-adapter.js +401 -0
  217. package/v3/dist/integrations/coherence/engines/cohomology-adapter.js.map +1 -0
  218. package/v3/dist/integrations/coherence/engines/homotopy-adapter.d.ts +201 -0
  219. package/v3/dist/integrations/coherence/engines/homotopy-adapter.d.ts.map +1 -0
  220. package/v3/dist/integrations/coherence/engines/homotopy-adapter.js +324 -0
  221. package/v3/dist/integrations/coherence/engines/homotopy-adapter.js.map +1 -0
  222. package/v3/dist/integrations/coherence/engines/index.d.ts +20 -0
  223. package/v3/dist/integrations/coherence/engines/index.d.ts.map +1 -0
  224. package/v3/dist/integrations/coherence/engines/index.js +26 -0
  225. package/v3/dist/integrations/coherence/engines/index.js.map +1 -0
  226. package/v3/dist/integrations/coherence/engines/spectral-adapter.d.ts +193 -0
  227. package/v3/dist/integrations/coherence/engines/spectral-adapter.d.ts.map +1 -0
  228. package/v3/dist/integrations/coherence/engines/spectral-adapter.js +476 -0
  229. package/v3/dist/integrations/coherence/engines/spectral-adapter.js.map +1 -0
  230. package/v3/dist/integrations/coherence/engines/witness-adapter.d.ts +175 -0
  231. package/v3/dist/integrations/coherence/engines/witness-adapter.d.ts.map +1 -0
  232. package/v3/dist/integrations/coherence/engines/witness-adapter.js +377 -0
  233. package/v3/dist/integrations/coherence/engines/witness-adapter.js.map +1 -0
  234. package/v3/dist/integrations/coherence/index.d.ts +84 -0
  235. package/v3/dist/integrations/coherence/index.d.ts.map +1 -0
  236. package/v3/dist/integrations/coherence/index.js +114 -0
  237. package/v3/dist/integrations/coherence/index.js.map +1 -0
  238. package/v3/dist/integrations/coherence/threshold-tuner.d.ts +396 -0
  239. package/v3/dist/integrations/coherence/threshold-tuner.d.ts.map +1 -0
  240. package/v3/dist/integrations/coherence/threshold-tuner.js +538 -0
  241. package/v3/dist/integrations/coherence/threshold-tuner.js.map +1 -0
  242. package/v3/dist/integrations/coherence/types.d.ts +879 -0
  243. package/v3/dist/integrations/coherence/types.d.ts.map +1 -0
  244. package/v3/dist/integrations/coherence/types.js +134 -0
  245. package/v3/dist/integrations/coherence/types.js.map +1 -0
  246. package/v3/dist/integrations/coherence/wasm-loader.d.ts +351 -0
  247. package/v3/dist/integrations/coherence/wasm-loader.d.ts.map +1 -0
  248. package/v3/dist/integrations/coherence/wasm-loader.js +842 -0
  249. package/v3/dist/integrations/coherence/wasm-loader.js.map +1 -0
  250. package/v3/dist/integrations/embeddings/index/HNSWIndex.d.ts.map +1 -1
  251. package/v3/dist/integrations/embeddings/index/HNSWIndex.js +4 -1
  252. package/v3/dist/integrations/embeddings/index/HNSWIndex.js.map +1 -1
  253. package/v3/dist/kernel/interfaces.d.ts +8 -1
  254. package/v3/dist/kernel/interfaces.d.ts.map +1 -1
  255. package/v3/dist/learning/aqe-learning-engine.d.ts +272 -0
  256. package/v3/dist/learning/aqe-learning-engine.d.ts.map +1 -0
  257. package/v3/dist/learning/aqe-learning-engine.js +708 -0
  258. package/v3/dist/learning/aqe-learning-engine.js.map +1 -0
  259. package/v3/dist/learning/causal-verifier.d.ts +244 -0
  260. package/v3/dist/learning/causal-verifier.d.ts.map +1 -0
  261. package/v3/dist/learning/causal-verifier.js +300 -0
  262. package/v3/dist/learning/causal-verifier.js.map +1 -0
  263. package/v3/dist/learning/experience-capture.d.ts +266 -0
  264. package/v3/dist/learning/experience-capture.d.ts.map +1 -0
  265. package/v3/dist/learning/experience-capture.js +647 -0
  266. package/v3/dist/learning/experience-capture.js.map +1 -0
  267. package/v3/dist/learning/index.d.ts +8 -0
  268. package/v3/dist/learning/index.d.ts.map +1 -1
  269. package/v3/dist/learning/index.js +16 -0
  270. package/v3/dist/learning/index.js.map +1 -1
  271. package/v3/dist/learning/memory-auditor.d.ts +235 -0
  272. package/v3/dist/learning/memory-auditor.d.ts.map +1 -0
  273. package/v3/dist/learning/memory-auditor.js +478 -0
  274. package/v3/dist/learning/memory-auditor.js.map +1 -0
  275. package/v3/dist/learning/pattern-store.d.ts.map +1 -1
  276. package/v3/dist/learning/pattern-store.js +27 -6
  277. package/v3/dist/learning/pattern-store.js.map +1 -1
  278. package/v3/dist/learning/qe-patterns.d.ts +15 -1
  279. package/v3/dist/learning/qe-patterns.d.ts.map +1 -1
  280. package/v3/dist/learning/qe-patterns.js +26 -5
  281. package/v3/dist/learning/qe-patterns.js.map +1 -1
  282. package/v3/dist/learning/qe-reasoning-bank.d.ts +38 -2
  283. package/v3/dist/learning/qe-reasoning-bank.d.ts.map +1 -1
  284. package/v3/dist/learning/qe-reasoning-bank.js +86 -4
  285. package/v3/dist/learning/qe-reasoning-bank.js.map +1 -1
  286. package/v3/dist/learning/real-qe-reasoning-bank.d.ts +32 -2
  287. package/v3/dist/learning/real-qe-reasoning-bank.d.ts.map +1 -1
  288. package/v3/dist/learning/real-qe-reasoning-bank.js +61 -6
  289. package/v3/dist/learning/real-qe-reasoning-bank.js.map +1 -1
  290. package/v3/dist/mcp/bundle.js +6303 -266
  291. package/v3/dist/mcp/tools/coherence/audit.d.ts +107 -0
  292. package/v3/dist/mcp/tools/coherence/audit.d.ts.map +1 -0
  293. package/v3/dist/mcp/tools/coherence/audit.js +236 -0
  294. package/v3/dist/mcp/tools/coherence/audit.js.map +1 -0
  295. package/v3/dist/mcp/tools/coherence/check.d.ts +106 -0
  296. package/v3/dist/mcp/tools/coherence/check.d.ts.map +1 -0
  297. package/v3/dist/mcp/tools/coherence/check.js +205 -0
  298. package/v3/dist/mcp/tools/coherence/check.js.map +1 -0
  299. package/v3/dist/mcp/tools/coherence/collapse.d.ts +123 -0
  300. package/v3/dist/mcp/tools/coherence/collapse.d.ts.map +1 -0
  301. package/v3/dist/mcp/tools/coherence/collapse.js +279 -0
  302. package/v3/dist/mcp/tools/coherence/collapse.js.map +1 -0
  303. package/v3/dist/mcp/tools/coherence/consensus.d.ts +100 -0
  304. package/v3/dist/mcp/tools/coherence/consensus.d.ts.map +1 -0
  305. package/v3/dist/mcp/tools/coherence/consensus.js +201 -0
  306. package/v3/dist/mcp/tools/coherence/consensus.js.map +1 -0
  307. package/v3/dist/mcp/tools/coherence/index.d.ts +31 -0
  308. package/v3/dist/mcp/tools/coherence/index.d.ts.map +1 -0
  309. package/v3/dist/mcp/tools/coherence/index.js +42 -0
  310. package/v3/dist/mcp/tools/coherence/index.js.map +1 -0
  311. package/v3/dist/mcp/tools/index.d.ts +6 -1
  312. package/v3/dist/mcp/tools/index.d.ts.map +1 -1
  313. package/v3/dist/mcp/tools/index.js +9 -1
  314. package/v3/dist/mcp/tools/index.js.map +1 -1
  315. package/v3/dist/mcp/tools/mincut/index.d.ts +1 -1
  316. package/v3/dist/mcp/tools/mincut/index.d.ts.map +1 -1
  317. package/v3/dist/mcp/tools/mincut/index.js.map +1 -1
  318. package/v3/dist/mcp/tools/registry.d.ts +4 -0
  319. package/v3/dist/mcp/tools/registry.d.ts.map +1 -1
  320. package/v3/dist/mcp/tools/registry.js +5 -0
  321. package/v3/dist/mcp/tools/registry.js.map +1 -1
  322. package/v3/dist/mcp/types.d.ts +1 -1
  323. package/v3/dist/mcp/types.d.ts.map +1 -1
  324. package/v3/dist/strange-loop/belief-reconciler.d.ts +357 -0
  325. package/v3/dist/strange-loop/belief-reconciler.d.ts.map +1 -0
  326. package/v3/dist/strange-loop/belief-reconciler.js +696 -0
  327. package/v3/dist/strange-loop/belief-reconciler.js.map +1 -0
  328. package/v3/dist/strange-loop/index.d.ts +1 -0
  329. package/v3/dist/strange-loop/index.d.ts.map +1 -1
  330. package/v3/dist/strange-loop/index.js +2 -0
  331. package/v3/dist/strange-loop/index.js.map +1 -1
  332. package/v3/dist/strange-loop/strange-loop.d.ts +177 -5
  333. package/v3/dist/strange-loop/strange-loop.d.ts.map +1 -1
  334. package/v3/dist/strange-loop/strange-loop.js +452 -9
  335. package/v3/dist/strange-loop/strange-loop.js.map +1 -1
  336. package/v3/dist/strange-loop/types.d.ts +205 -1
  337. package/v3/dist/strange-loop/types.d.ts.map +1 -1
  338. package/v3/dist/strange-loop/types.js +5 -0
  339. package/v3/dist/strange-loop/types.js.map +1 -1
  340. package/v3/package.json +5 -1
@@ -0,0 +1,44 @@
1
+ /**
2
+ * V2 Detector
3
+ * Detects existing v2 AQE installations
4
+ */
5
+ /**
6
+ * V2 detection information
7
+ */
8
+ export interface V2DetectionInfo {
9
+ detected: boolean;
10
+ version: string | undefined;
11
+ paths: {
12
+ memoryDb: string | undefined;
13
+ configDir: string | undefined;
14
+ agentsDir: string | undefined;
15
+ };
16
+ assets: {
17
+ hasMemoryDb: boolean;
18
+ hasConfig: boolean;
19
+ hasAgents: boolean;
20
+ hasV2ConfigFiles: boolean;
21
+ hasV3ConfigYaml: boolean;
22
+ };
23
+ isV3Installation: boolean;
24
+ }
25
+ /**
26
+ * V2 Detector class
27
+ */
28
+ export declare class V2Detector {
29
+ private projectRoot;
30
+ constructor(projectRoot: string);
31
+ /**
32
+ * Detect v2 installation
33
+ */
34
+ detect(): Promise<V2DetectionInfo>;
35
+ /**
36
+ * Read version from memory.db
37
+ */
38
+ private readVersionFromDb;
39
+ }
40
+ /**
41
+ * Create V2 detector
42
+ */
43
+ export declare function createV2Detector(projectRoot: string): V2Detector;
44
+ //# sourceMappingURL=detector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"detector.d.ts","sourceRoot":"","sources":["../../../src/init/migration/detector.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,KAAK,EAAE;QACL,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;QAC7B,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;QAC9B,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;KAC/B,CAAC;IACF,MAAM,EAAE;QACN,WAAW,EAAE,OAAO,CAAC;QACrB,SAAS,EAAE,OAAO,CAAC;QACnB,SAAS,EAAE,OAAO,CAAC;QACnB,gBAAgB,EAAE,OAAO,CAAC;QAC1B,eAAe,EAAE,OAAO,CAAC;KAC1B,CAAC;IACF,gBAAgB,EAAE,OAAO,CAAC;CAC3B;AAED;;GAEG;AACH,qBAAa,UAAU;IACT,OAAO,CAAC,WAAW;gBAAX,WAAW,EAAE,MAAM;IAEvC;;OAEG;IACG,MAAM,IAAI,OAAO,CAAC,eAAe,CAAC;IAmDxC;;OAEG;IACH,OAAO,CAAC,iBAAiB;CAmC1B;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,UAAU,CAEhE"}
@@ -0,0 +1,106 @@
1
+ /**
2
+ * V2 Detector
3
+ * Detects existing v2 AQE installations
4
+ */
5
+ import { existsSync } from 'fs';
6
+ import { join } from 'path';
7
+ import { createRequire } from 'module';
8
+ const require = createRequire(import.meta.url);
9
+ /**
10
+ * V2 Detector class
11
+ */
12
+ export class V2Detector {
13
+ projectRoot;
14
+ constructor(projectRoot) {
15
+ this.projectRoot = projectRoot;
16
+ }
17
+ /**
18
+ * Detect v2 installation
19
+ */
20
+ async detect() {
21
+ const memoryDbPath = join(this.projectRoot, '.agentic-qe', 'memory.db');
22
+ const configDir = join(this.projectRoot, '.agentic-qe', 'config');
23
+ const agentsDir = join(this.projectRoot, '.claude', 'agents');
24
+ const v2ConfigFile = join(this.projectRoot, '.agentic-qe', 'config', 'learning.json');
25
+ const v3ConfigYaml = join(this.projectRoot, '.agentic-qe', 'config.yaml');
26
+ const hasMemoryDb = existsSync(memoryDbPath);
27
+ const hasConfig = existsSync(configDir);
28
+ const hasAgents = existsSync(agentsDir);
29
+ const hasV2ConfigFiles = existsSync(v2ConfigFile);
30
+ const hasV3ConfigYaml = existsSync(v3ConfigYaml);
31
+ // Read version from database
32
+ let version;
33
+ let isV3Installation = false;
34
+ if (hasMemoryDb) {
35
+ version = this.readVersionFromDb(memoryDbPath);
36
+ if (version) {
37
+ isV3Installation = version.startsWith('3.');
38
+ }
39
+ else {
40
+ version = '2.x.x';
41
+ }
42
+ }
43
+ // Determine if v2 detected
44
+ const detected = !isV3Installation && hasMemoryDb && (!version?.startsWith('3.') ||
45
+ (hasV2ConfigFiles && !hasV3ConfigYaml));
46
+ return {
47
+ detected,
48
+ version,
49
+ paths: {
50
+ memoryDb: hasMemoryDb ? memoryDbPath : undefined,
51
+ configDir: hasConfig ? configDir : undefined,
52
+ agentsDir: hasAgents ? agentsDir : undefined,
53
+ },
54
+ assets: {
55
+ hasMemoryDb,
56
+ hasConfig,
57
+ hasAgents,
58
+ hasV2ConfigFiles,
59
+ hasV3ConfigYaml,
60
+ },
61
+ isV3Installation,
62
+ };
63
+ }
64
+ /**
65
+ * Read version from memory.db
66
+ */
67
+ readVersionFromDb(dbPath) {
68
+ try {
69
+ const Database = require('better-sqlite3');
70
+ const db = new Database(dbPath, { readonly: true, fileMustExist: true });
71
+ try {
72
+ const tableExists = db.prepare(`
73
+ SELECT name FROM sqlite_master
74
+ WHERE type='table' AND name='kv_store'
75
+ `).get();
76
+ if (!tableExists) {
77
+ db.close();
78
+ return undefined;
79
+ }
80
+ const row = db.prepare(`
81
+ SELECT value FROM kv_store
82
+ WHERE key = 'aqe_version' AND namespace = '_system'
83
+ `).get();
84
+ db.close();
85
+ if (row) {
86
+ return JSON.parse(row.value);
87
+ }
88
+ return undefined;
89
+ }
90
+ catch {
91
+ db.close();
92
+ return undefined;
93
+ }
94
+ }
95
+ catch {
96
+ return undefined;
97
+ }
98
+ }
99
+ }
100
+ /**
101
+ * Create V2 detector
102
+ */
103
+ export function createV2Detector(projectRoot) {
104
+ return new V2Detector(projectRoot);
105
+ }
106
+ //# sourceMappingURL=detector.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"detector.js","sourceRoot":"","sources":["../../../src/init/migration/detector.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAgB,MAAM,IAAI,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAEvC,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,I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ACR,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAW,CAAC;gBACzC,CAAC;gBACD,OAAO,SAAS,CAAC;YACnB,CAAC;YAAC,MAAM,CAAC;gBACP,EAAE,CAAC,KAAK,EAAE,CAAC;gBACX,OAAO,SAAS,CAAC;YACnB,CAAC;QACH,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,SAAS,CAAC;QACnB,CAAC;IACH,CAAC;CACF;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,WAAmB;IAClD,OAAO,IAAI,UAAU,CAAC,WAAW,CAAC,CAAC;AACrC,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Migration Module Index
3
+ * Handles v2 to v3 migration
4
+ */
5
+ export { V2Detector, createV2Detector, type V2DetectionInfo } from './detector.js';
6
+ export { V2DataMigrator, createV2DataMigrator, type MigrationResult } from './data-migrator.js';
7
+ export { V2ConfigMigrator, createV2ConfigMigrator } from './config-migrator.js';
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/init/migration/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AACnF,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,KAAK,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAChG,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Migration Module Index
3
+ * Handles v2 to v3 migration
4
+ */
5
+ export { V2Detector, createV2Detector } from './detector.js';
6
+ export { V2DataMigrator, createV2DataMigrator } from './data-migrator.js';
7
+ export { V2ConfigMigrator, createV2ConfigMigrator } from './config-migrator.js';
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/init/migration/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAwB,MAAM,eAAe,CAAC;AACnF,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAwB,MAAM,oBAAoB,CAAC;AAChG,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,68 @@
1
+ /**
2
+ * Init Orchestrator - Thin Phase Runner
3
+ * ADR-025: Enhanced Init with Self-Configuration
4
+ *
5
+ * A lightweight orchestrator that runs init phases in sequence.
6
+ * This replaces the monolithic InitOrchestrator in init-wizard.ts.
7
+ */
8
+ import type { InitResult } from './types.js';
9
+ import { type InitPhase, type InitContext, type InitOptions } from './phases/index.js';
10
+ /**
11
+ * Orchestrator options
12
+ */
13
+ export interface OrchestratorOptions extends InitOptions {
14
+ /** Project root directory */
15
+ projectRoot: string;
16
+ /** Custom phases (overrides defaults) */
17
+ customPhases?: InitPhase[];
18
+ }
19
+ /**
20
+ * Thin Init Orchestrator
21
+ * Runs phases in sequence, collecting results
22
+ */
23
+ export declare class ModularInitOrchestrator {
24
+ private phases;
25
+ private context;
26
+ constructor(options: OrchestratorOptions);
27
+ /**
28
+ * Create init context
29
+ */
30
+ private createContext;
31
+ /**
32
+ * Run all phases and return result
33
+ */
34
+ initialize(): Promise<InitResult>;
35
+ /**
36
+ * Create success result
37
+ */
38
+ private createSuccessResult;
39
+ /**
40
+ * Create failure result
41
+ */
42
+ private createFailureResult;
43
+ /**
44
+ * Get phase by name
45
+ */
46
+ getPhase(name: string): InitPhase | undefined;
47
+ /**
48
+ * Get all phases
49
+ */
50
+ getPhases(): InitPhase[];
51
+ /**
52
+ * Get context (for testing)
53
+ */
54
+ getContext(): InitContext;
55
+ }
56
+ /**
57
+ * Factory function
58
+ */
59
+ export declare function createModularInitOrchestrator(options: OrchestratorOptions): ModularInitOrchestrator;
60
+ /**
61
+ * Quick initialization with auto-configuration
62
+ */
63
+ export declare function quickInitModular(projectRoot: string): Promise<InitResult>;
64
+ /**
65
+ * Format init result for display
66
+ */
67
+ export declare function formatInitResultModular(result: InitResult): string;
68
+ //# sourceMappingURL=orchestrator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"orchestrator.d.ts","sourceRoot":"","sources":["../../src/init/orchestrator.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAiB,UAAU,EAAkB,MAAM,YAAY,CAAC;AAE5E,OAAO,EAEL,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,WAAW,EAEjB,MAAM,mBAAmB,CAAC;AAE3B;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,WAAW;IACtD,6BAA6B;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,yCAAyC;IACzC,YAAY,CAAC,EAAE,SAAS,EAAE,CAAC;CAC5B;AAED;;;GAGG;AACH,qBAAa,uBAAuB;IAClC,OAAO,CAAC,MAAM,CAAc;IAC5B,OAAO,CAAC,OAAO,CAAc;gBAEjB,OAAO,EAAE,mBAAmB;IAKxC;;OAEG;IACH,OAAO,CAAC,aAAa;IA0BrB;;OAEG;IACG,UAAU,IAAI,OAAO,CAAC,UAAU,CAAC;IAqEvC;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAiC3B;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAsB3B;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS;IAI7C;;OAEG;IACH,SAAS,IAAI,SAAS,EAAE;IAIxB;;OAEG;IACH,UAAU,IAAI,WAAW;CAG1B;AAED;;GAEG;AACH,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,mBAAmB,GAAG,uBAAuB,CAEnG;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAM/E;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAyClE"}
@@ -0,0 +1,239 @@
1
+ /**
2
+ * Init Orchestrator - Thin Phase Runner
3
+ * ADR-025: Enhanced Init with Self-Configuration
4
+ *
5
+ * A lightweight orchestrator that runs init phases in sequence.
6
+ * This replaces the monolithic InitOrchestrator in init-wizard.ts.
7
+ */
8
+ import { createDefaultConfig } from './types.js';
9
+ import { getDefaultPhases, } from './phases/index.js';
10
+ /**
11
+ * Thin Init Orchestrator
12
+ * Runs phases in sequence, collecting results
13
+ */
14
+ export class ModularInitOrchestrator {
15
+ phases;
16
+ context;
17
+ constructor(options) {
18
+ this.context = this.createContext(options);
19
+ this.phases = options.customPhases ?? getDefaultPhases();
20
+ }
21
+ /**
22
+ * Create init context
23
+ */
24
+ createContext(options) {
25
+ return {
26
+ projectRoot: options.projectRoot,
27
+ options: {
28
+ autoMode: options.autoMode,
29
+ skipPatterns: options.skipPatterns,
30
+ minimal: options.minimal,
31
+ autoMigrate: options.autoMigrate,
32
+ withN8n: options.withN8n,
33
+ n8nApiConfig: options.n8nApiConfig,
34
+ wizardAnswers: options.wizardAnswers,
35
+ },
36
+ config: {},
37
+ enhancements: {
38
+ claudeFlow: false,
39
+ ruvector: false,
40
+ },
41
+ results: new Map(),
42
+ services: {
43
+ log: (msg) => console.log(msg),
44
+ warn: (msg) => console.warn(msg),
45
+ error: (msg) => console.error(msg),
46
+ },
47
+ };
48
+ }
49
+ /**
50
+ * Run all phases and return result
51
+ */
52
+ async initialize() {
53
+ const startTime = Date.now();
54
+ const steps = [];
55
+ try {
56
+ // Sort phases by order
57
+ const sortedPhases = [...this.phases].sort((a, b) => a.order - b.order);
58
+ // Run each phase
59
+ for (const phase of sortedPhases) {
60
+ // Check if phase should run
61
+ const shouldRun = await phase.shouldRun(this.context);
62
+ if (!shouldRun) {
63
+ continue;
64
+ }
65
+ // Log phase start
66
+ console.log(`\n📋 ${phase.description}...`);
67
+ // Execute phase
68
+ const result = await phase.execute(this.context);
69
+ // Store result
70
+ this.context.results.set(phase.name, result);
71
+ // Record step
72
+ steps.push({
73
+ step: phase.description,
74
+ status: result.success ? 'success' : 'error',
75
+ message: result.message || '',
76
+ durationMs: result.durationMs,
77
+ });
78
+ // Handle critical failure
79
+ if (!result.success && phase.critical) {
80
+ console.error(`\n❌ Critical phase failed: ${phase.name}`);
81
+ // Try rollback if available
82
+ if (phase.rollback) {
83
+ try {
84
+ await phase.rollback(this.context);
85
+ }
86
+ catch (rollbackError) {
87
+ console.error(`Rollback failed: ${rollbackError}`);
88
+ }
89
+ }
90
+ return this.createFailureResult(steps, startTime);
91
+ }
92
+ // Check for skip remaining
93
+ if (result.skipRemaining) {
94
+ break;
95
+ }
96
+ }
97
+ return this.createSuccessResult(steps, startTime);
98
+ }
99
+ catch (error) {
100
+ // Unexpected error
101
+ steps.push({
102
+ step: 'Initialization Failed',
103
+ status: 'error',
104
+ message: error instanceof Error ? error.message : String(error),
105
+ durationMs: 0,
106
+ });
107
+ return this.createFailureResult(steps, startTime);
108
+ }
109
+ }
110
+ /**
111
+ * Create success result
112
+ */
113
+ createSuccessResult(steps, startTime) {
114
+ const config = this.context.config;
115
+ // Extract summary from phase results
116
+ const learningResult = this.context.results.get('learning');
117
+ const codeIntelResult = this.context.results.get('code-intelligence');
118
+ const assetsResult = this.context.results.get('assets');
119
+ const hooksResult = this.context.results.get('hooks');
120
+ const mcpResult = this.context.results.get('mcp');
121
+ const claudeMdResult = this.context.results.get('claude-md');
122
+ const workersResult = this.context.results.get('workers');
123
+ return {
124
+ success: true,
125
+ config: config || createDefaultConfig('unknown', this.context.projectRoot),
126
+ steps,
127
+ summary: {
128
+ projectAnalyzed: this.context.results.has('analysis'),
129
+ configGenerated: this.context.results.has('configuration'),
130
+ codeIntelligenceIndexed: codeIntelResult?.data?.entries ?? 0,
131
+ patternsLoaded: learningResult?.data?.patternsLoaded ?? 0,
132
+ skillsInstalled: assetsResult?.data?.skillsInstalled ?? 0,
133
+ agentsInstalled: assetsResult?.data?.agentsInstalled ?? 0,
134
+ hooksConfigured: hooksResult?.data?.configured ?? false,
135
+ mcpConfigured: mcpResult?.data?.configured ?? false,
136
+ claudeMdGenerated: claudeMdResult?.data?.generated ?? false,
137
+ workersStarted: workersResult?.data?.workersConfigured ?? 0,
138
+ },
139
+ totalDurationMs: Date.now() - startTime,
140
+ timestamp: new Date(),
141
+ };
142
+ }
143
+ /**
144
+ * Create failure result
145
+ */
146
+ createFailureResult(steps, startTime) {
147
+ return {
148
+ success: false,
149
+ config: createDefaultConfig('unknown', this.context.projectRoot),
150
+ steps,
151
+ summary: {
152
+ projectAnalyzed: false,
153
+ configGenerated: false,
154
+ codeIntelligenceIndexed: 0,
155
+ patternsLoaded: 0,
156
+ skillsInstalled: 0,
157
+ agentsInstalled: 0,
158
+ hooksConfigured: false,
159
+ mcpConfigured: false,
160
+ claudeMdGenerated: false,
161
+ workersStarted: 0,
162
+ },
163
+ totalDurationMs: Date.now() - startTime,
164
+ timestamp: new Date(),
165
+ };
166
+ }
167
+ /**
168
+ * Get phase by name
169
+ */
170
+ getPhase(name) {
171
+ return this.phases.find(p => p.name === name);
172
+ }
173
+ /**
174
+ * Get all phases
175
+ */
176
+ getPhases() {
177
+ return [...this.phases];
178
+ }
179
+ /**
180
+ * Get context (for testing)
181
+ */
182
+ getContext() {
183
+ return this.context;
184
+ }
185
+ }
186
+ /**
187
+ * Factory function
188
+ */
189
+ export function createModularInitOrchestrator(options) {
190
+ return new ModularInitOrchestrator(options);
191
+ }
192
+ /**
193
+ * Quick initialization with auto-configuration
194
+ */
195
+ export async function quickInitModular(projectRoot) {
196
+ const orchestrator = createModularInitOrchestrator({
197
+ projectRoot,
198
+ autoMode: true,
199
+ });
200
+ return await orchestrator.initialize();
201
+ }
202
+ /**
203
+ * Format init result for display
204
+ */
205
+ export function formatInitResultModular(result) {
206
+ const lines = [];
207
+ lines.push('');
208
+ lines.push('┌─────────────────────────────────────────────────────────────┐');
209
+ lines.push('│ AQE v3 Initialization │');
210
+ lines.push('├─────────────────────────────────────────────────────────────┤');
211
+ // Steps
212
+ for (const step of result.steps) {
213
+ const icon = step.status === 'success' ? '✓' : step.status === 'error' ? '✗' : '○';
214
+ const stepName = step.step.substring(0, 48).padEnd(48);
215
+ lines.push(`│ ${icon} ${stepName} ${String(step.durationMs).padStart(4)}ms │`);
216
+ }
217
+ lines.push('├─────────────────────────────────────────────────────────────┤');
218
+ // Summary
219
+ lines.push(`│ Project: ${result.config.project.name.substring(0, 45).padEnd(45)} │`);
220
+ lines.push(`│ Type: ${result.config.project.type.padEnd(48)} │`);
221
+ lines.push(`│ Code Intel: ${String(result.summary.codeIntelligenceIndexed).padEnd(43)} │`);
222
+ lines.push(`│ Patterns: ${String(result.summary.patternsLoaded).padEnd(45)} │`);
223
+ lines.push(`│ Skills: ${String(result.summary.skillsInstalled).padEnd(47)} │`);
224
+ lines.push(`│ Agents: ${String(result.summary.agentsInstalled).padEnd(47)} │`);
225
+ lines.push(`│ Workers: ${String(result.summary.workersStarted).padEnd(46)} │`);
226
+ lines.push(`│ Hooks: ${result.summary.hooksConfigured ? 'Yes' : 'No'.padEnd(48)} │`);
227
+ lines.push(`│ MCP: ${result.summary.mcpConfigured ? 'Yes' : 'No'.padEnd(50)} │`);
228
+ lines.push(`│ CLAUDE.md: ${result.summary.claudeMdGenerated ? 'Yes' : 'No'.padEnd(44)} │`);
229
+ lines.push('├─────────────────────────────────────────────────────────────┤');
230
+ // Final status
231
+ const status = result.success
232
+ ? '✓ AQE v3 initialized successfully'
233
+ : '✗ Initialization failed';
234
+ lines.push(`│ ${status.padEnd(57)} │`);
235
+ lines.push('└─────────────────────────────────────────────────────────────┘');
236
+ lines.push('');
237
+ return lines.join('\n');
238
+ }
239
+ //# sourceMappingURL=orchestrator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"orchestrator.js","sourceRoot":"","sources":["../../src/init/orchestrator.ts"],"names":[],"mappings":"AAA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AAC,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;IAE5F,KAAK,CAAC,IAAI,CAAC,iEAAiE,CAAC,CAAC;IAE9E,eAAe;IACf,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO;QAC3B,CAAC,CAAC,mCAAmC;QACrC,CAAC,CAAC,yBAAyB,CAAC;IAC9B,KAAK,CAAC,IAAI,CAAC,MAAM,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;IAExC,KAAK,CAAC,IAAI,CAAC,iEAAiE,CAAC,CAAC;IAC9E,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAEf,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Phase 01: Detection
3
+ * Detects existing AQE v2 installation and v3 markers
4
+ */
5
+ import { BasePhase, type InitContext, type V2DetectionResult } from './phase-interface.js';
6
+ export interface DetectionResult {
7
+ v2Detected: boolean;
8
+ v3Detected: boolean;
9
+ freshInstall: boolean;
10
+ v2Detection?: V2DetectionResult;
11
+ }
12
+ /**
13
+ * Detection phase - checks for existing AQE installations
14
+ */
15
+ export declare class DetectionPhase extends BasePhase<DetectionResult> {
16
+ readonly name = "detection";
17
+ readonly description = "Detect existing installations";
18
+ readonly order = 10;
19
+ readonly critical = true;
20
+ protected run(context: InitContext): Promise<DetectionResult>;
21
+ /**
22
+ * Detect existing v2 AQE installation
23
+ */
24
+ private detectV2Installation;
25
+ /**
26
+ * Read AQE version from memory.db
27
+ */
28
+ private readVersionFromDb;
29
+ }
30
+ //# sourceMappingURL=01-detection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"01-detection.d.ts","sourceRoot":"","sources":["../../../src/init/phases/01-detection.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,EACL,SAAS,EACT,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACvB,MAAM,sBAAsB,CAAC;AAI9B,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,iBAAiB,CAAC;CACjC;AAED;;GAEG;AACH,qBAAa,cAAe,SAAQ,SAAS,CAAC,eAAe,CAAC;IAC5D,QAAQ,CAAC,IAAI,eAAe;IAC5B,QAAQ,CAAC,WAAW,mCAAmC;IACvD,QAAQ,CAAC,KAAK,MAAM;IACpB,QAAQ,CAAC,QAAQ,QAAQ;cAET,GAAG,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,eAAe,CAAC;IAsDnE;;OAEG;YACW,oBAAoB;IAgDlC;;OAEG;IACH,OAAO,CAAC,iBAAiB;CAmC1B"}