agentic-qe 3.3.0 → 3.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (416) hide show
  1. package/README.md +6 -2
  2. package/package.json +6 -1
  3. package/v3/CHANGELOG.md +134 -0
  4. package/v3/dist/cli/bundle.js +29332 -22739
  5. package/v3/dist/cli/command-registry.d.ts +55 -0
  6. package/v3/dist/cli/command-registry.d.ts.map +1 -0
  7. package/v3/dist/cli/command-registry.js +103 -0
  8. package/v3/dist/cli/command-registry.js.map +1 -0
  9. package/v3/dist/cli/commands/code.d.ts +9 -0
  10. package/v3/dist/cli/commands/code.d.ts.map +1 -0
  11. package/v3/dist/cli/commands/code.js +254 -0
  12. package/v3/dist/cli/commands/code.js.map +1 -0
  13. package/v3/dist/cli/commands/completions.d.ts +8 -0
  14. package/v3/dist/cli/commands/completions.d.ts.map +1 -0
  15. package/v3/dist/cli/commands/completions.js +99 -0
  16. package/v3/dist/cli/commands/completions.js.map +1 -0
  17. package/v3/dist/cli/commands/coverage.d.ts +9 -0
  18. package/v3/dist/cli/commands/coverage.d.ts.map +1 -0
  19. package/v3/dist/cli/commands/coverage.js +208 -0
  20. package/v3/dist/cli/commands/coverage.js.map +1 -0
  21. package/v3/dist/cli/commands/fleet.d.ts +11 -0
  22. package/v3/dist/cli/commands/fleet.d.ts.map +1 -0
  23. package/v3/dist/cli/commands/fleet.js +338 -0
  24. package/v3/dist/cli/commands/fleet.js.map +1 -0
  25. package/v3/dist/cli/commands/migrate.d.ts +9 -0
  26. package/v3/dist/cli/commands/migrate.d.ts.map +1 -0
  27. package/v3/dist/cli/commands/migrate.js +566 -0
  28. package/v3/dist/cli/commands/migrate.js.map +1 -0
  29. package/v3/dist/cli/commands/quality.d.ts +9 -0
  30. package/v3/dist/cli/commands/quality.d.ts.map +1 -0
  31. package/v3/dist/cli/commands/quality.js +40 -0
  32. package/v3/dist/cli/commands/quality.js.map +1 -0
  33. package/v3/dist/cli/commands/security.d.ts +9 -0
  34. package/v3/dist/cli/commands/security.d.ts.map +1 -0
  35. package/v3/dist/cli/commands/security.js +124 -0
  36. package/v3/dist/cli/commands/security.js.map +1 -0
  37. package/v3/dist/cli/commands/sync.d.ts +19 -0
  38. package/v3/dist/cli/commands/sync.d.ts.map +1 -0
  39. package/v3/dist/cli/commands/sync.js +283 -0
  40. package/v3/dist/cli/commands/sync.js.map +1 -0
  41. package/v3/dist/cli/commands/test.d.ts +9 -0
  42. package/v3/dist/cli/commands/test.d.ts.map +1 -0
  43. package/v3/dist/cli/commands/test.js +166 -0
  44. package/v3/dist/cli/commands/test.js.map +1 -0
  45. package/v3/dist/cli/handlers/agent-handler.d.ts +20 -0
  46. package/v3/dist/cli/handlers/agent-handler.d.ts.map +1 -0
  47. package/v3/dist/cli/handlers/agent-handler.js +158 -0
  48. package/v3/dist/cli/handlers/agent-handler.js.map +1 -0
  49. package/v3/dist/cli/handlers/domain-handler.d.ts +20 -0
  50. package/v3/dist/cli/handlers/domain-handler.d.ts.map +1 -0
  51. package/v3/dist/cli/handlers/domain-handler.js +115 -0
  52. package/v3/dist/cli/handlers/domain-handler.js.map +1 -0
  53. package/v3/dist/cli/handlers/index.d.ts +13 -0
  54. package/v3/dist/cli/handlers/index.d.ts.map +1 -0
  55. package/v3/dist/cli/handlers/index.js +15 -0
  56. package/v3/dist/cli/handlers/index.js.map +1 -0
  57. package/v3/dist/cli/handlers/init-handler.d.ts +38 -0
  58. package/v3/dist/cli/handlers/init-handler.d.ts.map +1 -0
  59. package/v3/dist/cli/handlers/init-handler.js +288 -0
  60. package/v3/dist/cli/handlers/init-handler.js.map +1 -0
  61. package/v3/dist/cli/handlers/interfaces.d.ts +104 -0
  62. package/v3/dist/cli/handlers/interfaces.d.ts.map +1 -0
  63. package/v3/dist/cli/handlers/interfaces.js +109 -0
  64. package/v3/dist/cli/handlers/interfaces.js.map +1 -0
  65. package/v3/dist/cli/handlers/protocol-handler.d.ts +19 -0
  66. package/v3/dist/cli/handlers/protocol-handler.d.ts.map +1 -0
  67. package/v3/dist/cli/handlers/protocol-handler.js +79 -0
  68. package/v3/dist/cli/handlers/protocol-handler.js.map +1 -0
  69. package/v3/dist/cli/handlers/status-handler.d.ts +30 -0
  70. package/v3/dist/cli/handlers/status-handler.d.ts.map +1 -0
  71. package/v3/dist/cli/handlers/status-handler.js +218 -0
  72. package/v3/dist/cli/handlers/status-handler.js.map +1 -0
  73. package/v3/dist/cli/handlers/task-handler.d.ts +22 -0
  74. package/v3/dist/cli/handlers/task-handler.d.ts.map +1 -0
  75. package/v3/dist/cli/handlers/task-handler.js +271 -0
  76. package/v3/dist/cli/handlers/task-handler.js.map +1 -0
  77. package/v3/dist/cli/index.d.ts +4 -0
  78. package/v3/dist/cli/index.d.ts.map +1 -1
  79. package/v3/dist/cli/index.js +48 -2677
  80. package/v3/dist/cli/index.js.map +1 -1
  81. package/v3/dist/cli/wizards/core/index.d.ts +11 -0
  82. package/v3/dist/cli/wizards/core/index.d.ts.map +1 -0
  83. package/v3/dist/cli/wizards/core/index.js +15 -0
  84. package/v3/dist/cli/wizards/core/index.js.map +1 -0
  85. package/v3/dist/cli/wizards/core/wizard-base.d.ts +87 -0
  86. package/v3/dist/cli/wizards/core/wizard-base.d.ts.map +1 -0
  87. package/v3/dist/cli/wizards/core/wizard-base.js +120 -0
  88. package/v3/dist/cli/wizards/core/wizard-base.js.map +1 -0
  89. package/v3/dist/cli/wizards/core/wizard-command.d.ts +182 -0
  90. package/v3/dist/cli/wizards/core/wizard-command.d.ts.map +1 -0
  91. package/v3/dist/cli/wizards/core/wizard-command.js +45 -0
  92. package/v3/dist/cli/wizards/core/wizard-command.js.map +1 -0
  93. package/v3/dist/cli/wizards/core/wizard-step.d.ts +109 -0
  94. package/v3/dist/cli/wizards/core/wizard-step.d.ts.map +1 -0
  95. package/v3/dist/cli/wizards/core/wizard-step.js +384 -0
  96. package/v3/dist/cli/wizards/core/wizard-step.js.map +1 -0
  97. package/v3/dist/cli/wizards/core/wizard-utils.d.ts +117 -0
  98. package/v3/dist/cli/wizards/core/wizard-utils.d.ts.map +1 -0
  99. package/v3/dist/cli/wizards/core/wizard-utils.js +291 -0
  100. package/v3/dist/cli/wizards/core/wizard-utils.js.map +1 -0
  101. package/v3/dist/cli/wizards/coverage-wizard.d.ts +13 -68
  102. package/v3/dist/cli/wizards/coverage-wizard.d.ts.map +1 -1
  103. package/v3/dist/cli/wizards/coverage-wizard.js +127 -391
  104. package/v3/dist/cli/wizards/coverage-wizard.js.map +1 -1
  105. package/v3/dist/cli/wizards/fleet-wizard.d.ts +13 -64
  106. package/v3/dist/cli/wizards/fleet-wizard.d.ts.map +1 -1
  107. package/v3/dist/cli/wizards/fleet-wizard.js +150 -363
  108. package/v3/dist/cli/wizards/fleet-wizard.js.map +1 -1
  109. package/v3/dist/cli/wizards/index.d.ts +2 -0
  110. package/v3/dist/cli/wizards/index.d.ts.map +1 -1
  111. package/v3/dist/cli/wizards/index.js +3 -0
  112. package/v3/dist/cli/wizards/index.js.map +1 -1
  113. package/v3/dist/cli/wizards/security-wizard.d.ts +13 -64
  114. package/v3/dist/cli/wizards/security-wizard.d.ts.map +1 -1
  115. package/v3/dist/cli/wizards/security-wizard.js +152 -395
  116. package/v3/dist/cli/wizards/security-wizard.js.map +1 -1
  117. package/v3/dist/cli/wizards/test-wizard.d.ts +13 -77
  118. package/v3/dist/cli/wizards/test-wizard.d.ts.map +1 -1
  119. package/v3/dist/cli/wizards/test-wizard.js +196 -328
  120. package/v3/dist/cli/wizards/test-wizard.js.map +1 -1
  121. package/v3/dist/coordination/mincut/mincut-health-monitor.d.ts +3 -0
  122. package/v3/dist/coordination/mincut/mincut-health-monitor.d.ts.map +1 -1
  123. package/v3/dist/coordination/mincut/mincut-health-monitor.js +6 -2
  124. package/v3/dist/coordination/mincut/mincut-health-monitor.js.map +1 -1
  125. package/v3/dist/coordination/mincut/queen-integration.d.ts +3 -0
  126. package/v3/dist/coordination/mincut/queen-integration.d.ts.map +1 -1
  127. package/v3/dist/coordination/mincut/queen-integration.js +6 -1
  128. package/v3/dist/coordination/mincut/queen-integration.js.map +1 -1
  129. package/v3/dist/coordination/queen-coordinator.d.ts +13 -1
  130. package/v3/dist/coordination/queen-coordinator.d.ts.map +1 -1
  131. package/v3/dist/coordination/queen-coordinator.js +91 -3
  132. package/v3/dist/coordination/queen-coordinator.js.map +1 -1
  133. package/v3/dist/coordination/task-executor.js +2 -2
  134. package/v3/dist/coordination/task-executor.js.map +1 -1
  135. package/v3/dist/domains/chaos-resilience/plugin.js +2 -2
  136. package/v3/dist/domains/chaos-resilience/plugin.js.map +1 -1
  137. package/v3/dist/domains/code-intelligence/plugin.js +2 -2
  138. package/v3/dist/domains/code-intelligence/plugin.js.map +1 -1
  139. package/v3/dist/domains/contract-testing/plugin.js +2 -2
  140. package/v3/dist/domains/contract-testing/plugin.js.map +1 -1
  141. package/v3/dist/domains/coverage-analysis/plugin.d.ts +6 -1
  142. package/v3/dist/domains/coverage-analysis/plugin.d.ts.map +1 -1
  143. package/v3/dist/domains/coverage-analysis/plugin.js +75 -1
  144. package/v3/dist/domains/coverage-analysis/plugin.js.map +1 -1
  145. package/v3/dist/domains/defect-intelligence/plugin.js +2 -2
  146. package/v3/dist/domains/defect-intelligence/plugin.js.map +1 -1
  147. package/v3/dist/domains/domain-interface.d.ts +39 -2
  148. package/v3/dist/domains/domain-interface.d.ts.map +1 -1
  149. package/v3/dist/domains/domain-interface.js +102 -1
  150. package/v3/dist/domains/domain-interface.js.map +1 -1
  151. package/v3/dist/domains/learning-optimization/coordinator.d.ts +83 -0
  152. package/v3/dist/domains/learning-optimization/coordinator.d.ts.map +1 -1
  153. package/v3/dist/domains/learning-optimization/coordinator.js +174 -0
  154. package/v3/dist/domains/learning-optimization/coordinator.js.map +1 -1
  155. package/v3/dist/domains/learning-optimization/interfaces.d.ts +14 -0
  156. package/v3/dist/domains/learning-optimization/interfaces.d.ts.map +1 -1
  157. package/v3/dist/domains/learning-optimization/plugin.js +2 -2
  158. package/v3/dist/domains/learning-optimization/plugin.js.map +1 -1
  159. package/v3/dist/domains/quality-assessment/coordinator.d.ts +23 -0
  160. package/v3/dist/domains/quality-assessment/coordinator.d.ts.map +1 -1
  161. package/v3/dist/domains/quality-assessment/coordinator.js +139 -1
  162. package/v3/dist/domains/quality-assessment/coordinator.js.map +1 -1
  163. package/v3/dist/domains/quality-assessment/plugin.d.ts +6 -1
  164. package/v3/dist/domains/quality-assessment/plugin.d.ts.map +1 -1
  165. package/v3/dist/domains/quality-assessment/plugin.js +69 -2
  166. package/v3/dist/domains/quality-assessment/plugin.js.map +1 -1
  167. package/v3/dist/domains/requirements-validation/plugin.js +2 -2
  168. package/v3/dist/domains/requirements-validation/plugin.js.map +1 -1
  169. package/v3/dist/domains/security-compliance/plugin.js +2 -2
  170. package/v3/dist/domains/security-compliance/plugin.js.map +1 -1
  171. package/v3/dist/domains/test-execution/index.d.ts +2 -1
  172. package/v3/dist/domains/test-execution/index.d.ts.map +1 -1
  173. package/v3/dist/domains/test-execution/index.js +0 -2
  174. package/v3/dist/domains/test-execution/index.js.map +1 -1
  175. package/v3/dist/domains/test-execution/interfaces.d.ts +222 -25
  176. package/v3/dist/domains/test-execution/interfaces.d.ts.map +1 -1
  177. package/v3/dist/domains/test-execution/interfaces.js +130 -3
  178. package/v3/dist/domains/test-execution/interfaces.js.map +1 -1
  179. package/v3/dist/domains/test-execution/plugin.d.ts +6 -1
  180. package/v3/dist/domains/test-execution/plugin.d.ts.map +1 -1
  181. package/v3/dist/domains/test-execution/plugin.js +79 -1
  182. package/v3/dist/domains/test-execution/plugin.js.map +1 -1
  183. package/v3/dist/domains/test-execution/test-prioritization-types.d.ts +5 -172
  184. package/v3/dist/domains/test-execution/test-prioritization-types.d.ts.map +1 -1
  185. package/v3/dist/domains/test-execution/test-prioritization-types.js +6 -129
  186. package/v3/dist/domains/test-execution/test-prioritization-types.js.map +1 -1
  187. package/v3/dist/domains/test-execution/types/index.d.ts +7 -3
  188. package/v3/dist/domains/test-execution/types/index.d.ts.map +1 -1
  189. package/v3/dist/domains/test-execution/types/index.js +7 -17
  190. package/v3/dist/domains/test-execution/types/index.js.map +1 -1
  191. package/v3/dist/domains/test-generation/coordinator.d.ts +41 -1
  192. package/v3/dist/domains/test-generation/coordinator.d.ts.map +1 -1
  193. package/v3/dist/domains/test-generation/coordinator.js +187 -4
  194. package/v3/dist/domains/test-generation/coordinator.js.map +1 -1
  195. package/v3/dist/domains/test-generation/factories/index.d.ts +8 -0
  196. package/v3/dist/domains/test-generation/factories/index.d.ts.map +1 -0
  197. package/v3/dist/domains/test-generation/factories/index.js +8 -0
  198. package/v3/dist/domains/test-generation/factories/index.js.map +1 -0
  199. package/v3/dist/domains/test-generation/factories/test-generator-factory.d.ts +108 -0
  200. package/v3/dist/domains/test-generation/factories/test-generator-factory.d.ts.map +1 -0
  201. package/v3/dist/domains/test-generation/factories/test-generator-factory.js +158 -0
  202. package/v3/dist/domains/test-generation/factories/test-generator-factory.js.map +1 -0
  203. package/v3/dist/domains/test-generation/generators/base-test-generator.d.ts +79 -0
  204. package/v3/dist/domains/test-generation/generators/base-test-generator.d.ts.map +1 -0
  205. package/v3/dist/domains/test-generation/generators/base-test-generator.js +252 -0
  206. package/v3/dist/domains/test-generation/generators/base-test-generator.js.map +1 -0
  207. package/v3/dist/domains/test-generation/generators/index.d.ts +11 -0
  208. package/v3/dist/domains/test-generation/generators/index.d.ts.map +1 -0
  209. package/v3/dist/domains/test-generation/generators/index.js +13 -0
  210. package/v3/dist/domains/test-generation/generators/index.js.map +1 -0
  211. package/v3/dist/domains/test-generation/generators/jest-vitest-generator.d.ts +77 -0
  212. package/v3/dist/domains/test-generation/generators/jest-vitest-generator.d.ts.map +1 -0
  213. package/v3/dist/domains/test-generation/generators/jest-vitest-generator.js +365 -0
  214. package/v3/dist/domains/test-generation/generators/jest-vitest-generator.js.map +1 -0
  215. package/v3/dist/domains/test-generation/generators/mocha-generator.d.ts +56 -0
  216. package/v3/dist/domains/test-generation/generators/mocha-generator.d.ts.map +1 -0
  217. package/v3/dist/domains/test-generation/generators/mocha-generator.js +197 -0
  218. package/v3/dist/domains/test-generation/generators/mocha-generator.js.map +1 -0
  219. package/v3/dist/domains/test-generation/generators/pytest-generator.d.ts +66 -0
  220. package/v3/dist/domains/test-generation/generators/pytest-generator.d.ts.map +1 -0
  221. package/v3/dist/domains/test-generation/generators/pytest-generator.js +240 -0
  222. package/v3/dist/domains/test-generation/generators/pytest-generator.js.map +1 -0
  223. package/v3/dist/domains/test-generation/index.d.ts +2 -2
  224. package/v3/dist/domains/test-generation/index.d.ts.map +1 -1
  225. package/v3/dist/domains/test-generation/index.js +3 -3
  226. package/v3/dist/domains/test-generation/index.js.map +1 -1
  227. package/v3/dist/domains/test-generation/interfaces/index.d.ts +9 -0
  228. package/v3/dist/domains/test-generation/interfaces/index.d.ts.map +1 -0
  229. package/v3/dist/domains/test-generation/interfaces/index.js +9 -0
  230. package/v3/dist/domains/test-generation/interfaces/index.js.map +1 -0
  231. package/v3/dist/domains/test-generation/interfaces/test-generator.interface.d.ts +166 -0
  232. package/v3/dist/domains/test-generation/interfaces/test-generator.interface.d.ts.map +1 -0
  233. package/v3/dist/domains/test-generation/interfaces/test-generator.interface.js +8 -0
  234. package/v3/dist/domains/test-generation/interfaces/test-generator.interface.js.map +1 -0
  235. package/v3/dist/domains/test-generation/interfaces.d.ts +163 -24
  236. package/v3/dist/domains/test-generation/interfaces.d.ts.map +1 -1
  237. package/v3/dist/domains/test-generation/interfaces.js +2 -2
  238. package/v3/dist/domains/test-generation/plugin.d.ts +6 -1
  239. package/v3/dist/domains/test-generation/plugin.d.ts.map +1 -1
  240. package/v3/dist/domains/test-generation/plugin.js +90 -5
  241. package/v3/dist/domains/test-generation/plugin.js.map +1 -1
  242. package/v3/dist/domains/test-generation/{coherence-gate.d.ts → services/coherence-gate-service.d.ts} +4 -4
  243. package/v3/dist/domains/test-generation/services/coherence-gate-service.d.ts.map +1 -0
  244. package/v3/dist/domains/test-generation/{coherence-gate.js → services/coherence-gate-service.js} +2 -2
  245. package/v3/dist/domains/test-generation/services/coherence-gate-service.js.map +1 -0
  246. package/v3/dist/domains/test-generation/services/index.d.ts +8 -2
  247. package/v3/dist/domains/test-generation/services/index.d.ts.map +1 -1
  248. package/v3/dist/domains/test-generation/services/index.js +10 -3
  249. package/v3/dist/domains/test-generation/services/index.js.map +1 -1
  250. package/v3/dist/domains/test-generation/services/property-test-generator.d.ts +34 -0
  251. package/v3/dist/domains/test-generation/services/property-test-generator.d.ts.map +1 -0
  252. package/v3/dist/domains/test-generation/services/property-test-generator.js +306 -0
  253. package/v3/dist/domains/test-generation/services/property-test-generator.js.map +1 -0
  254. package/v3/dist/domains/test-generation/services/tdd-generator.d.ts +33 -0
  255. package/v3/dist/domains/test-generation/services/tdd-generator.d.ts.map +1 -0
  256. package/v3/dist/domains/test-generation/services/tdd-generator.js +342 -0
  257. package/v3/dist/domains/test-generation/services/tdd-generator.js.map +1 -0
  258. package/v3/dist/domains/test-generation/services/test-data-generator.d.ts +34 -0
  259. package/v3/dist/domains/test-generation/services/test-data-generator.d.ts.map +1 -0
  260. package/v3/dist/domains/test-generation/services/test-data-generator.js +245 -0
  261. package/v3/dist/domains/test-generation/services/test-data-generator.js.map +1 -0
  262. package/v3/dist/domains/test-generation/services/test-generator.d.ts +51 -160
  263. package/v3/dist/domains/test-generation/services/test-generator.d.ts.map +1 -1
  264. package/v3/dist/domains/test-generation/services/test-generator.js +101 -1858
  265. package/v3/dist/domains/test-generation/services/test-generator.js.map +1 -1
  266. package/v3/dist/domains/visual-accessibility/plugin.js +2 -2
  267. package/v3/dist/domains/visual-accessibility/plugin.js.map +1 -1
  268. package/v3/dist/init/phases/12-verification.d.ts +23 -0
  269. package/v3/dist/init/phases/12-verification.d.ts.map +1 -1
  270. package/v3/dist/init/phases/12-verification.js +185 -2
  271. package/v3/dist/init/phases/12-verification.js.map +1 -1
  272. package/v3/dist/integrations/agentic-flow/model-router/complexity-analyzer.d.ts +24 -62
  273. package/v3/dist/integrations/agentic-flow/model-router/complexity-analyzer.d.ts.map +1 -1
  274. package/v3/dist/integrations/agentic-flow/model-router/complexity-analyzer.js +45 -497
  275. package/v3/dist/integrations/agentic-flow/model-router/complexity-analyzer.js.map +1 -1
  276. package/v3/dist/integrations/agentic-flow/model-router/router.js +2 -2
  277. package/v3/dist/integrations/agentic-flow/model-router/router.js.map +1 -1
  278. package/v3/dist/integrations/agentic-flow/model-router/score-calculator.d.ts +98 -0
  279. package/v3/dist/integrations/agentic-flow/model-router/score-calculator.d.ts.map +1 -0
  280. package/v3/dist/integrations/agentic-flow/model-router/score-calculator.js +197 -0
  281. package/v3/dist/integrations/agentic-flow/model-router/score-calculator.js.map +1 -0
  282. package/v3/dist/integrations/agentic-flow/model-router/signal-collector.d.ts +102 -0
  283. package/v3/dist/integrations/agentic-flow/model-router/signal-collector.d.ts.map +1 -0
  284. package/v3/dist/integrations/agentic-flow/model-router/signal-collector.js +372 -0
  285. package/v3/dist/integrations/agentic-flow/model-router/signal-collector.js.map +1 -0
  286. package/v3/dist/integrations/agentic-flow/model-router/tier-recommender.d.ts +64 -0
  287. package/v3/dist/integrations/agentic-flow/model-router/tier-recommender.d.ts.map +1 -0
  288. package/v3/dist/integrations/agentic-flow/model-router/tier-recommender.js +120 -0
  289. package/v3/dist/integrations/agentic-flow/model-router/tier-recommender.js.map +1 -0
  290. package/v3/dist/integrations/coherence/coherence-service.d.ts.map +1 -1
  291. package/v3/dist/integrations/coherence/coherence-service.js +87 -30
  292. package/v3/dist/integrations/coherence/coherence-service.js.map +1 -1
  293. package/v3/dist/integrations/coherence/engines/spectral-adapter.d.ts.map +1 -1
  294. package/v3/dist/integrations/coherence/engines/spectral-adapter.js +124 -35
  295. package/v3/dist/integrations/coherence/engines/spectral-adapter.js.map +1 -1
  296. package/v3/dist/kernel/interfaces.d.ts +54 -1
  297. package/v3/dist/kernel/interfaces.d.ts.map +1 -1
  298. package/v3/dist/learning/dream/dream-scheduler.d.ts +302 -0
  299. package/v3/dist/learning/dream/dream-scheduler.d.ts.map +1 -0
  300. package/v3/dist/learning/dream/dream-scheduler.js +551 -0
  301. package/v3/dist/learning/dream/dream-scheduler.js.map +1 -0
  302. package/v3/dist/learning/dream/index.d.ts +1 -0
  303. package/v3/dist/learning/dream/index.d.ts.map +1 -1
  304. package/v3/dist/learning/dream/index.js +4 -0
  305. package/v3/dist/learning/dream/index.js.map +1 -1
  306. package/v3/dist/learning/memory-auditor.d.ts.map +1 -1
  307. package/v3/dist/learning/memory-auditor.js +3 -1
  308. package/v3/dist/learning/memory-auditor.js.map +1 -1
  309. package/v3/dist/mcp/bundle.js +30870 -23598
  310. package/v3/dist/mcp/handlers/core-handlers.d.ts.map +1 -1
  311. package/v3/dist/mcp/handlers/core-handlers.js +16 -2
  312. package/v3/dist/mcp/handlers/core-handlers.js.map +1 -1
  313. package/v3/dist/mcp/handlers/task-handlers.d.ts +1 -0
  314. package/v3/dist/mcp/handlers/task-handlers.d.ts.map +1 -1
  315. package/v3/dist/mcp/handlers/task-handlers.js +46 -12
  316. package/v3/dist/mcp/handlers/task-handlers.js.map +1 -1
  317. package/v3/dist/mcp/security/cve-prevention.d.ts +31 -134
  318. package/v3/dist/mcp/security/cve-prevention.d.ts.map +1 -1
  319. package/v3/dist/mcp/security/cve-prevention.js +37 -562
  320. package/v3/dist/mcp/security/cve-prevention.js.map +1 -1
  321. package/v3/dist/mcp/security/index.d.ts +5 -1
  322. package/v3/dist/mcp/security/index.d.ts.map +1 -1
  323. package/v3/dist/mcp/security/validators/command-validator.d.ts +41 -0
  324. package/v3/dist/mcp/security/validators/command-validator.d.ts.map +1 -0
  325. package/v3/dist/mcp/security/validators/command-validator.js +123 -0
  326. package/v3/dist/mcp/security/validators/command-validator.js.map +1 -0
  327. package/v3/dist/mcp/security/validators/crypto-validator.d.ts +40 -0
  328. package/v3/dist/mcp/security/validators/crypto-validator.d.ts.map +1 -0
  329. package/v3/dist/mcp/security/validators/crypto-validator.js +72 -0
  330. package/v3/dist/mcp/security/validators/crypto-validator.js.map +1 -0
  331. package/v3/dist/mcp/security/validators/index.d.ts +12 -0
  332. package/v3/dist/mcp/security/validators/index.d.ts.map +1 -0
  333. package/v3/dist/mcp/security/validators/index.js +22 -0
  334. package/v3/dist/mcp/security/validators/index.js.map +1 -0
  335. package/v3/dist/mcp/security/validators/input-sanitizer.d.ts +56 -0
  336. package/v3/dist/mcp/security/validators/input-sanitizer.d.ts.map +1 -0
  337. package/v3/dist/mcp/security/validators/input-sanitizer.js +157 -0
  338. package/v3/dist/mcp/security/validators/input-sanitizer.js.map +1 -0
  339. package/v3/dist/mcp/security/validators/interfaces.d.ts +164 -0
  340. package/v3/dist/mcp/security/validators/interfaces.d.ts.map +1 -0
  341. package/v3/dist/mcp/security/validators/interfaces.js +6 -0
  342. package/v3/dist/mcp/security/validators/interfaces.js.map +1 -0
  343. package/v3/dist/mcp/security/validators/path-traversal-validator.d.ts +50 -0
  344. package/v3/dist/mcp/security/validators/path-traversal-validator.d.ts.map +1 -0
  345. package/v3/dist/mcp/security/validators/path-traversal-validator.js +242 -0
  346. package/v3/dist/mcp/security/validators/path-traversal-validator.js.map +1 -0
  347. package/v3/dist/mcp/security/validators/regex-safety-validator.d.ts +50 -0
  348. package/v3/dist/mcp/security/validators/regex-safety-validator.d.ts.map +1 -0
  349. package/v3/dist/mcp/security/validators/regex-safety-validator.js +183 -0
  350. package/v3/dist/mcp/security/validators/regex-safety-validator.js.map +1 -0
  351. package/v3/dist/mcp/security/validators/validation-orchestrator.d.ts +66 -0
  352. package/v3/dist/mcp/security/validators/validation-orchestrator.d.ts.map +1 -0
  353. package/v3/dist/mcp/security/validators/validation-orchestrator.js +146 -0
  354. package/v3/dist/mcp/security/validators/validation-orchestrator.js.map +1 -0
  355. package/v3/dist/mcp/server.d.ts.map +1 -1
  356. package/v3/dist/mcp/server.js +1 -0
  357. package/v3/dist/mcp/server.js.map +1 -1
  358. package/v3/dist/mcp/services/reasoning-bank-service.d.ts +87 -13
  359. package/v3/dist/mcp/services/reasoning-bank-service.d.ts.map +1 -1
  360. package/v3/dist/mcp/services/reasoning-bank-service.js +291 -31
  361. package/v3/dist/mcp/services/reasoning-bank-service.js.map +1 -1
  362. package/v3/dist/mcp/tool-registry.d.ts +3 -1
  363. package/v3/dist/mcp/tool-registry.d.ts.map +1 -1
  364. package/v3/dist/mcp/tool-registry.js +155 -2
  365. package/v3/dist/mcp/tool-registry.js.map +1 -1
  366. package/v3/dist/mcp/tools/test-generation/generate.d.ts +1 -0
  367. package/v3/dist/mcp/tools/test-generation/generate.d.ts.map +1 -1
  368. package/v3/dist/mcp/tools/test-generation/generate.js +3 -2
  369. package/v3/dist/mcp/tools/test-generation/generate.js.map +1 -1
  370. package/v3/dist/routing/qe-agent-registry.d.ts +27 -0
  371. package/v3/dist/routing/qe-agent-registry.d.ts.map +1 -1
  372. package/v3/dist/routing/qe-agent-registry.js +96 -0
  373. package/v3/dist/routing/qe-agent-registry.js.map +1 -1
  374. package/v3/dist/shared/events/domain-events.d.ts +27 -0
  375. package/v3/dist/shared/events/domain-events.d.ts.map +1 -1
  376. package/v3/dist/shared/events/domain-events.js +1 -0
  377. package/v3/dist/shared/events/domain-events.js.map +1 -1
  378. package/v3/dist/sync/cloud/index.d.ts +8 -0
  379. package/v3/dist/sync/cloud/index.d.ts.map +1 -0
  380. package/v3/dist/sync/cloud/index.js +8 -0
  381. package/v3/dist/sync/cloud/index.js.map +1 -0
  382. package/v3/dist/sync/cloud/postgres-writer.d.ts +88 -0
  383. package/v3/dist/sync/cloud/postgres-writer.d.ts.map +1 -0
  384. package/v3/dist/sync/cloud/postgres-writer.js +319 -0
  385. package/v3/dist/sync/cloud/postgres-writer.js.map +1 -0
  386. package/v3/dist/sync/cloud/tunnel-manager.d.ts +75 -0
  387. package/v3/dist/sync/cloud/tunnel-manager.d.ts.map +1 -0
  388. package/v3/dist/sync/cloud/tunnel-manager.js +221 -0
  389. package/v3/dist/sync/cloud/tunnel-manager.js.map +1 -0
  390. package/v3/dist/sync/index.d.ts +35 -0
  391. package/v3/dist/sync/index.d.ts.map +1 -0
  392. package/v3/dist/sync/index.js +35 -0
  393. package/v3/dist/sync/index.js.map +1 -0
  394. package/v3/dist/sync/interfaces.d.ts +245 -0
  395. package/v3/dist/sync/interfaces.d.ts.map +1 -0
  396. package/v3/dist/sync/interfaces.js +160 -0
  397. package/v3/dist/sync/interfaces.js.map +1 -0
  398. package/v3/dist/sync/readers/index.d.ts +8 -0
  399. package/v3/dist/sync/readers/index.d.ts.map +1 -0
  400. package/v3/dist/sync/readers/index.js +8 -0
  401. package/v3/dist/sync/readers/index.js.map +1 -0
  402. package/v3/dist/sync/readers/json-reader.d.ts +95 -0
  403. package/v3/dist/sync/readers/json-reader.d.ts.map +1 -0
  404. package/v3/dist/sync/readers/json-reader.js +306 -0
  405. package/v3/dist/sync/readers/json-reader.js.map +1 -0
  406. package/v3/dist/sync/readers/sqlite-reader.d.ts +88 -0
  407. package/v3/dist/sync/readers/sqlite-reader.d.ts.map +1 -0
  408. package/v3/dist/sync/readers/sqlite-reader.js +255 -0
  409. package/v3/dist/sync/readers/sqlite-reader.js.map +1 -0
  410. package/v3/dist/sync/sync-agent.d.ts +116 -0
  411. package/v3/dist/sync/sync-agent.d.ts.map +1 -0
  412. package/v3/dist/sync/sync-agent.js +416 -0
  413. package/v3/dist/sync/sync-agent.js.map +1 -0
  414. package/v3/package.json +13 -2
  415. package/v3/dist/domains/test-generation/coherence-gate.d.ts.map +0 -1
  416. package/v3/dist/domains/test-generation/coherence-gate.js.map +0 -1
@@ -0,0 +1,288 @@
1
+ /**
2
+ * Agentic QE v3 - Init Command Handler
3
+ *
4
+ * Handles the 'aqe init' command for system initialization.
5
+ */
6
+ import chalk from 'chalk';
7
+ import { QEKernelImpl } from '../../kernel/kernel.js';
8
+ import { ALL_DOMAINS } from '../../shared/types/index.js';
9
+ import { CrossDomainEventRouter } from '../../coordination/cross-domain-router.js';
10
+ import { DefaultProtocolExecutor } from '../../coordination/protocol-executor.js';
11
+ import { WorkflowOrchestrator } from '../../coordination/workflow-orchestrator.js';
12
+ import { createQueenCoordinator } from '../../coordination/queen-coordinator.js';
13
+ import { InitOrchestrator } from '../../init/init-wizard.js';
14
+ import { createModularInitOrchestrator, } from '../../init/orchestrator.js';
15
+ import { setupClaudeFlowIntegration } from '../commands/claude-flow-setup.js';
16
+ // ============================================================================
17
+ // Init Handler
18
+ // ============================================================================
19
+ export class InitHandler {
20
+ name = 'init';
21
+ description = 'Initialize the AQE v3 system';
22
+ cleanupAndExit;
23
+ constructor(cleanupAndExit) {
24
+ this.cleanupAndExit = cleanupAndExit;
25
+ }
26
+ register(program, context) {
27
+ program
28
+ .command('init')
29
+ .description(this.description)
30
+ .option('-d, --domains <domains>', 'Comma-separated list of domains to enable', 'all')
31
+ .option('-m, --max-agents <number>', 'Maximum concurrent agents', '15')
32
+ .option('--memory <backend>', 'Memory backend (sqlite|agentdb|hybrid)', 'hybrid')
33
+ .option('--lazy', 'Enable lazy loading of domains')
34
+ .option('--wizard', 'Run interactive setup wizard')
35
+ .option('--auto', 'Auto-configure based on project analysis')
36
+ .option('--minimal', 'Minimal configuration (skip optional features)')
37
+ .option('--skip-patterns', 'Skip loading pre-trained patterns')
38
+ .option('--with-n8n', 'Install n8n workflow testing agents and skills')
39
+ .option('--auto-migrate', 'Automatically migrate from v2 if detected')
40
+ .option('--with-claude-flow', 'Force Claude Flow integration setup')
41
+ .option('--skip-claude-flow', 'Skip Claude Flow integration')
42
+ .option('--modular', 'Use new modular init system (default for --auto)')
43
+ .action(async (options) => {
44
+ await this.execute(options, context);
45
+ });
46
+ }
47
+ async execute(options, context) {
48
+ try {
49
+ // --auto-migrate implies --auto (must use orchestrator for migration)
50
+ if (options.autoMigrate && !options.auto && !options.wizard) {
51
+ options.auto = true;
52
+ }
53
+ // Check if wizard mode requested
54
+ if (options.wizard || options.auto) {
55
+ console.log(chalk.blue('\n Agentic QE v3 Initialization\n'));
56
+ // Use modular orchestrator for --auto or --modular
57
+ if (options.auto || options.modular) {
58
+ await this.runModularInit(options, context);
59
+ return;
60
+ }
61
+ // Legacy wizard mode using InitOrchestrator
62
+ await this.runLegacyWizard(options, context);
63
+ return;
64
+ }
65
+ // Standard init without wizard
66
+ await this.runStandardInit(options, context);
67
+ }
68
+ catch (error) {
69
+ console.error(chalk.red('\n Failed to initialize:'), error);
70
+ await this.cleanupAndExit(1);
71
+ }
72
+ }
73
+ async runModularInit(options, context) {
74
+ const orchestrator = createModularInitOrchestrator({
75
+ projectRoot: process.cwd(),
76
+ autoMode: options.auto,
77
+ minimal: options.minimal,
78
+ skipPatterns: options.skipPatterns,
79
+ withN8n: options.withN8n,
80
+ autoMigrate: options.autoMigrate,
81
+ });
82
+ console.log(chalk.white(' Analyzing project...\n'));
83
+ const result = await orchestrator.initialize();
84
+ // Display step results
85
+ for (const step of result.steps) {
86
+ const statusIcon = step.status === 'success' ? '*' : step.status === 'error' ? 'x' : '!';
87
+ const statusColor = step.status === 'success' ? chalk.green : step.status === 'error' ? chalk.red : chalk.yellow;
88
+ console.log(statusColor(` ${statusIcon} ${step.step} (${step.durationMs}ms)`));
89
+ }
90
+ console.log('');
91
+ // Claude Flow integration (after base init)
92
+ let cfResult;
93
+ if (!options.skipClaudeFlow && (options.withClaudeFlow || result.success)) {
94
+ try {
95
+ cfResult = await setupClaudeFlowIntegration({
96
+ projectRoot: process.cwd(),
97
+ force: options.withClaudeFlow,
98
+ });
99
+ if (cfResult.available) {
100
+ console.log(chalk.green(' * Claude Flow integration enabled'));
101
+ if (cfResult.features.trajectories) {
102
+ console.log(chalk.gray(' - SONA trajectory tracking'));
103
+ }
104
+ if (cfResult.features.modelRouting) {
105
+ console.log(chalk.gray(' - 3-tier model routing (haiku/sonnet/opus)'));
106
+ }
107
+ if (cfResult.features.pretrain) {
108
+ console.log(chalk.gray(' - Codebase pretrain analysis'));
109
+ }
110
+ console.log('');
111
+ }
112
+ }
113
+ catch {
114
+ // Claude Flow not available - continue without it
115
+ }
116
+ }
117
+ if (result.success) {
118
+ console.log(chalk.green(' AQE v3 initialized successfully!\n'));
119
+ // Show summary
120
+ console.log(chalk.blue(' Summary:'));
121
+ console.log(chalk.gray(` - Patterns loaded: ${result.summary.patternsLoaded}`));
122
+ console.log(chalk.gray(` - Skills installed: ${result.summary.skillsInstalled}`));
123
+ console.log(chalk.gray(` - Agents installed: ${result.summary.agentsInstalled}`));
124
+ console.log(chalk.gray(` - Hooks configured: ${result.summary.hooksConfigured ? 'Yes' : 'No'}`));
125
+ console.log(chalk.gray(` - Workers started: ${result.summary.workersStarted}`));
126
+ console.log(chalk.gray(` - Claude Flow: ${cfResult?.available ? 'Enabled' : 'Standalone mode'}`));
127
+ console.log(chalk.gray(` - Total time: ${result.totalDurationMs}ms\n`));
128
+ console.log(chalk.white('Next steps:'));
129
+ console.log(chalk.gray(' 1. Add MCP: claude mcp add aqe -- aqe-mcp'));
130
+ console.log(chalk.gray(' 2. Run tests: aqe test <path>'));
131
+ console.log(chalk.gray(' 3. Check status: aqe status\n'));
132
+ }
133
+ else {
134
+ console.log(chalk.red(' Initialization failed. Check errors above.\n'));
135
+ await this.cleanupAndExit(1);
136
+ }
137
+ await this.cleanupAndExit(0);
138
+ }
139
+ async runLegacyWizard(options, context) {
140
+ const orchestratorOptions = {
141
+ projectRoot: process.cwd(),
142
+ autoMode: options.auto,
143
+ minimal: options.minimal,
144
+ skipPatterns: options.skipPatterns,
145
+ withN8n: options.withN8n,
146
+ autoMigrate: options.autoMigrate,
147
+ };
148
+ const orchestrator = new InitOrchestrator(orchestratorOptions);
149
+ if (options.wizard) {
150
+ // Show wizard steps
151
+ console.log(chalk.white(' Setup Wizard Steps:\n'));
152
+ const steps = orchestrator.getWizardSteps();
153
+ for (let i = 0; i < steps.length; i++) {
154
+ console.log(chalk.gray(` ${i + 1}. ${steps[i].title}`));
155
+ console.log(chalk.gray(` ${steps[i].description}\n`));
156
+ }
157
+ }
158
+ console.log(chalk.white(' Analyzing project...\n'));
159
+ const result = await orchestrator.initialize();
160
+ // Display step results
161
+ for (const step of result.steps) {
162
+ const statusIcon = step.status === 'success' ? '*' : step.status === 'error' ? 'x' : '!';
163
+ const statusColor = step.status === 'success' ? chalk.green : step.status === 'error' ? chalk.red : chalk.yellow;
164
+ console.log(statusColor(` ${statusIcon} ${step.step} (${step.durationMs}ms)`));
165
+ }
166
+ console.log('');
167
+ if (result.success) {
168
+ console.log(chalk.green(' AQE v3 initialized successfully!\n'));
169
+ // Show summary
170
+ console.log(chalk.blue(' Summary:'));
171
+ console.log(chalk.gray(` - Patterns loaded: ${result.summary.patternsLoaded}`));
172
+ console.log(chalk.gray(` - Hooks configured: ${result.summary.hooksConfigured ? 'Yes' : 'No'}`));
173
+ console.log(chalk.gray(` - Workers started: ${result.summary.workersStarted}`));
174
+ if (result.summary.n8nInstalled) {
175
+ console.log(chalk.gray(` - N8n agents: ${result.summary.n8nInstalled.agents}`));
176
+ console.log(chalk.gray(` - N8n skills: ${result.summary.n8nInstalled.skills}`));
177
+ }
178
+ console.log(chalk.gray(` - Total time: ${result.totalDurationMs}ms\n`));
179
+ console.log(chalk.white('Next steps:'));
180
+ console.log(chalk.gray(' 1. Add MCP: claude mcp add aqe -- aqe-mcp'));
181
+ console.log(chalk.gray(' 2. Run tests: aqe test <path>'));
182
+ console.log(chalk.gray(' 3. Check status: aqe status\n'));
183
+ }
184
+ else {
185
+ console.log(chalk.red(' Initialization failed. Check errors above.\n'));
186
+ await this.cleanupAndExit(1);
187
+ }
188
+ await this.cleanupAndExit(0);
189
+ }
190
+ async runStandardInit(options, context) {
191
+ console.log(chalk.blue('\n Initializing Agentic QE v3...\n'));
192
+ // Determine enabled domains
193
+ const enabledDomains = options.domains === 'all'
194
+ ? [...ALL_DOMAINS]
195
+ : options.domains.split(',').filter((d) => ALL_DOMAINS.includes(d));
196
+ console.log(chalk.gray(` Domains: ${enabledDomains.length}`));
197
+ console.log(chalk.gray(` Max Agents: ${options.maxAgents}`));
198
+ console.log(chalk.gray(` Memory: ${options.memory}`));
199
+ console.log(chalk.gray(` Lazy Loading: ${options.lazy ? 'enabled' : 'disabled'}\n`));
200
+ // Create kernel
201
+ context.kernel = new QEKernelImpl({
202
+ maxConcurrentAgents: parseInt(options.maxAgents, 10),
203
+ memoryBackend: options.memory,
204
+ hnswEnabled: true,
205
+ lazyLoading: options.lazy || false,
206
+ enabledDomains,
207
+ });
208
+ await context.kernel.initialize();
209
+ console.log(chalk.green(' * Kernel initialized'));
210
+ // Create cross-domain router
211
+ context.router = new CrossDomainEventRouter(context.kernel.eventBus);
212
+ await context.router.initialize();
213
+ console.log(chalk.green(' * Cross-domain router initialized'));
214
+ // Create protocol executor
215
+ const getDomainAPI = (domain) => {
216
+ return context.kernel.getDomainAPI(domain);
217
+ };
218
+ const protocolExecutor = new DefaultProtocolExecutor(context.kernel.eventBus, context.kernel.memory, getDomainAPI);
219
+ console.log(chalk.green(' * Protocol executor initialized'));
220
+ // Create workflow orchestrator
221
+ context.workflowOrchestrator = new WorkflowOrchestrator(context.kernel.eventBus, context.kernel.memory, context.kernel.coordinator);
222
+ await context.workflowOrchestrator.initialize();
223
+ // Register domain workflow actions (Issue #206)
224
+ this.registerDomainWorkflowActions(context.kernel, context.workflowOrchestrator);
225
+ console.log(chalk.green(' * Workflow orchestrator initialized'));
226
+ // Create Queen Coordinator
227
+ context.queen = createQueenCoordinator(context.kernel, context.router, protocolExecutor, undefined);
228
+ await context.queen.initialize();
229
+ console.log(chalk.green(' * Queen Coordinator initialized'));
230
+ context.initialized = true;
231
+ console.log(chalk.green('\n AQE v3 initialized successfully!\n'));
232
+ // Show enabled domains
233
+ console.log(chalk.blue(' Enabled Domains:'));
234
+ for (const domain of enabledDomains) {
235
+ console.log(chalk.gray(` - ${domain}`));
236
+ }
237
+ console.log('');
238
+ await this.cleanupAndExit(0);
239
+ }
240
+ registerDomainWorkflowActions(kernel, orchestrator) {
241
+ // Register visual-accessibility domain actions
242
+ const visualAccessibilityAPI = kernel.getDomainAPI('visual-accessibility');
243
+ if (visualAccessibilityAPI?.registerWorkflowActions) {
244
+ try {
245
+ visualAccessibilityAPI.registerWorkflowActions(orchestrator);
246
+ }
247
+ catch (error) {
248
+ // Log but don't fail - domain may not be enabled
249
+ console.error(chalk.yellow(` ! Could not register visual-accessibility workflow actions: ${error instanceof Error ? error.message : String(error)}`));
250
+ }
251
+ }
252
+ }
253
+ getHelp() {
254
+ return `
255
+ Initialize the AQE v3 system with various configuration options.
256
+
257
+ Usage:
258
+ aqe init [options]
259
+
260
+ Options:
261
+ -d, --domains <domains> Comma-separated list of domains to enable (default: all)
262
+ -m, --max-agents <number> Maximum concurrent agents (default: 15)
263
+ --memory <backend> Memory backend: sqlite, agentdb, or hybrid (default: hybrid)
264
+ --lazy Enable lazy loading of domains
265
+ --wizard Run interactive setup wizard
266
+ --auto Auto-configure based on project analysis
267
+ --minimal Minimal configuration (skip optional features)
268
+ --skip-patterns Skip loading pre-trained patterns
269
+ --with-n8n Install n8n workflow testing agents and skills
270
+ --auto-migrate Automatically migrate from v2 if detected
271
+ --with-claude-flow Force Claude Flow integration setup
272
+ --skip-claude-flow Skip Claude Flow integration
273
+ --modular Use new modular init system
274
+
275
+ Examples:
276
+ aqe init --auto # Auto-configure based on project
277
+ aqe init --wizard # Run interactive wizard
278
+ aqe init --domains test-generation,coverage-analysis
279
+ `;
280
+ }
281
+ }
282
+ // ============================================================================
283
+ // Factory
284
+ // ============================================================================
285
+ export function createInitHandler(cleanupAndExit) {
286
+ return new InitHandler(cleanupAndExit);
287
+ }
288
+ //# sourceMappingURL=init-handler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init-handler.js","sourceRoot":"","sources":["../../../src/cli/handlers/init-handler.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAc,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC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v3 - Command Handler Interfaces
3
+ *
4
+ * Defines the common interfaces for all CLI command handlers.
5
+ * Part of the CLI modularization refactoring.
6
+ */
7
+ import { Command } from 'commander';
8
+ import { QEKernel } from '../../kernel/interfaces.js';
9
+ import { QueenCoordinator } from '../../coordination/queen-coordinator.js';
10
+ import { CrossDomainEventRouter } from '../../coordination/cross-domain-router.js';
11
+ import { WorkflowOrchestrator } from '../../coordination/workflow-orchestrator.js';
12
+ import type { PersistentScheduler } from '../scheduler/index.js';
13
+ export interface ScheduledWorkflow {
14
+ id: string;
15
+ workflowId: string;
16
+ pipelinePath: string;
17
+ schedule: string;
18
+ scheduleDescription: string;
19
+ nextRun: Date;
20
+ enabled: boolean;
21
+ createdAt: Date;
22
+ lastRun?: Date;
23
+ }
24
+ /**
25
+ * Shared CLI context that command handlers can access
26
+ */
27
+ export interface CLIContext {
28
+ kernel: QEKernel | null;
29
+ queen: QueenCoordinator | null;
30
+ router: CrossDomainEventRouter | null;
31
+ workflowOrchestrator: WorkflowOrchestrator | null;
32
+ scheduledWorkflows: Map<string, ScheduledWorkflow>;
33
+ persistentScheduler: PersistentScheduler | null;
34
+ initialized: boolean;
35
+ }
36
+ /**
37
+ * Command options common to many handlers
38
+ */
39
+ export interface CommonOptions {
40
+ verbose?: boolean;
41
+ json?: boolean;
42
+ progress?: boolean;
43
+ }
44
+ /**
45
+ * Interface for all command handlers
46
+ */
47
+ export interface ICommandHandler {
48
+ /** Unique command name */
49
+ readonly name: string;
50
+ /** Command description shown in help */
51
+ readonly description: string;
52
+ /** Aliases for the command (e.g., 't' for 'task') */
53
+ readonly aliases?: string[];
54
+ /**
55
+ * Register the command with the Commander program
56
+ * @param program The Commander program or parent command
57
+ * @param context Shared CLI context
58
+ */
59
+ register(program: Command, context: CLIContext): void;
60
+ /**
61
+ * Get help text for this command
62
+ */
63
+ getHelp(): string;
64
+ }
65
+ /**
66
+ * Interface for command handlers that require initialization
67
+ */
68
+ export interface IInitializableHandler extends ICommandHandler {
69
+ /**
70
+ * Initialize handler-specific state
71
+ */
72
+ initialize(context: CLIContext): Promise<void>;
73
+ /**
74
+ * Cleanup handler-specific state
75
+ */
76
+ dispose(): Promise<void>;
77
+ }
78
+ /**
79
+ * Get status color based on status string
80
+ */
81
+ export declare function getStatusColor(status: string): string;
82
+ /**
83
+ * Format duration in human-readable format
84
+ */
85
+ export declare function formatDuration(ms: number): string;
86
+ /**
87
+ * Format uptime in human-readable format
88
+ */
89
+ export declare function formatUptime(ms: number): string;
90
+ /**
91
+ * Get color function based on percentage value
92
+ */
93
+ export declare function getColorForPercent(percent: number): (str: string) => string;
94
+ /**
95
+ * Walk directory recursively to find files
96
+ */
97
+ export declare function walkDirectory(dir: string, options?: {
98
+ extensions?: string[];
99
+ exclude?: string[];
100
+ maxDepth?: number;
101
+ includeTests?: boolean;
102
+ }): Promise<string[]>;
103
+ export type { Command };
104
+ //# sourceMappingURL=interfaces.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/interfaces.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAC3E,OAAO,EAAE,sBAAsB,EAAE,MAAM,2CAA2C,CAAC;AACnF,OAAO,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AACnF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAGjE,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,OAAO,EAAE,IAAI,CAAC;IACd,OAAO,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AAM,GAAG,MAAM,CAiBrD;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAKjD;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAK/C;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAI3E;AAED;;GAEG;AACH,wBAAsB,aAAa,CACjC,GAAG,EAAE,MAAM,EACX,OAAO,GAAE;IACP,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,OAAO,CAAC;CACnB,GACL,OAAO,CAAC,MAAM,EAAE,CAAC,CAoDnB;AAMD,YAAY,EAAE,OAAO,EAAE,CAAC"}
@@ -0,0 +1,109 @@
1
+ /**
2
+ * Agentic QE v3 - Command Handler Interfaces
3
+ *
4
+ * Defines the common interfaces for all CLI command handlers.
5
+ * Part of the CLI modularization refactoring.
6
+ */
7
+ import chalk from 'chalk';
8
+ // ============================================================================
9
+ // Helper Functions for Handlers
10
+ // ============================================================================
11
+ /**
12
+ * Get status color based on status string
13
+ */
14
+ export function getStatusColor(status) {
15
+ switch (status) {
16
+ case 'healthy':
17
+ case 'completed':
18
+ return chalk.green(status);
19
+ case 'idle':
20
+ // Issue #205 fix: 'idle' is normal - show in cyan (neutral/ready)
21
+ return chalk.cyan(status);
22
+ case 'degraded':
23
+ case 'running':
24
+ return chalk.yellow(status);
25
+ case 'unhealthy':
26
+ case 'failed':
27
+ return chalk.red(status);
28
+ default:
29
+ return chalk.gray(status);
30
+ }
31
+ }
32
+ /**
33
+ * Format duration in human-readable format
34
+ */
35
+ export function formatDuration(ms) {
36
+ if (ms < 1000)
37
+ return `${ms}ms`;
38
+ if (ms < 60000)
39
+ return `${(ms / 1000).toFixed(1)}s`;
40
+ if (ms < 3600000)
41
+ return `${(ms / 60000).toFixed(1)}m`;
42
+ return `${(ms / 3600000).toFixed(1)}h`;
43
+ }
44
+ /**
45
+ * Format uptime in human-readable format
46
+ */
47
+ export function formatUptime(ms) {
48
+ const hours = Math.floor(ms / 3600000);
49
+ const minutes = Math.floor((ms % 3600000) / 60000);
50
+ const seconds = Math.floor((ms % 60000) / 1000);
51
+ return `${hours}h ${minutes}m ${seconds}s`;
52
+ }
53
+ /**
54
+ * Get color function based on percentage value
55
+ */
56
+ export function getColorForPercent(percent) {
57
+ if (percent >= 80)
58
+ return chalk.green;
59
+ if (percent >= 50)
60
+ return chalk.yellow;
61
+ return chalk.red;
62
+ }
63
+ /**
64
+ * Walk directory recursively to find files
65
+ */
66
+ export async function walkDirectory(dir, options = {}) {
67
+ const fs = await import('fs');
68
+ const path = await import('path');
69
+ const { extensions = ['.ts'], exclude = ['node_modules', 'dist'], maxDepth = 4, includeTests = false, } = options;
70
+ const walkDir = (currentDir, depth) => {
71
+ if (depth > maxDepth)
72
+ return [];
73
+ const result = [];
74
+ let items;
75
+ try {
76
+ items = fs.readdirSync(currentDir);
77
+ }
78
+ catch {
79
+ return [];
80
+ }
81
+ for (const item of items) {
82
+ if (exclude.includes(item))
83
+ continue;
84
+ if (!includeTests && (item === 'tests' || item.includes('.test.') || item.includes('.spec.')))
85
+ continue;
86
+ const fullPath = path.join(currentDir, item);
87
+ let stat;
88
+ try {
89
+ stat = fs.statSync(fullPath);
90
+ }
91
+ catch {
92
+ continue;
93
+ }
94
+ if (stat.isDirectory()) {
95
+ result.push(...walkDir(fullPath, depth + 1));
96
+ }
97
+ else {
98
+ const hasValidExtension = extensions.some(ext => item.endsWith(ext));
99
+ const isDeclarationFile = item.endsWith('.d.ts');
100
+ if (hasValidExtension && !isDeclarationFile) {
101
+ result.push(fullPath);
102
+ }
103
+ }
104
+ }
105
+ return result;
106
+ };
107
+ return walkDir(dir, 0);
108
+ }
109
+ //# sourceMappingURL=interfaces.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/cli/handlers/interfaces.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,MAAM,OAAO,CAAC;AA2F1B,+EAA+E;AAC/E,gCAAgC;AAChC,+EAA+E;AAE/E;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,MAAc;IAC3C,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,SAAS,CAAC;QACf,KAAK,WAAW;YACd,OAAO,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAC7B,KAAK,MAAM;YACT,kEAAkE;YAClE,OAAO,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC5B,KAAK,UAAU,CAAC;QAChB,KAAK,SAAS;YACZ,OAAO,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAC9B,KAAK,WAAW,CAAC;QACjB,KAAK,QAAQ;YACX,OAAO,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QAC3B;YACE,OAAO,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC9B,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,EAAU;IACvC,IAAI,EAAE,GAAG,IAAI;QAAE,OAAO,GAAG,EAAE,IAAI,CAAC;IAChC,IAAI,EAAE,GAAG,KAAK;QAAE,OAAO,GAAG,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC;IACpD,IAAI,EAAE,GAAG,OAAO;QAAE,OAAO,GAAG,CAAC,EAAE,GAAG,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC;IACvD,OAAO,GAAG,CAAC,EAAE,GAAG,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC;AACzC,CAAC;AAED;;GAEG;AAC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**
2
+ * Agentic QE v3 - Protocol Command Handler
3
+ *
4
+ * Handles the 'aqe protocol' command group for protocol execution.
5
+ */
6
+ import { Command } from 'commander';
7
+ import { ICommandHandler, CLIContext } from './interfaces.js';
8
+ export declare class ProtocolHandler implements ICommandHandler {
9
+ readonly name = "protocol";
10
+ readonly description = "Execute coordination protocols";
11
+ private cleanupAndExit;
12
+ private ensureInitialized;
13
+ constructor(cleanupAndExit: (code: number) => Promise<never>, ensureInitialized: () => Promise<boolean>);
14
+ register(program: Command, context: CLIContext): void;
15
+ private executeRun;
16
+ getHelp(): string;
17
+ }
18
+ export declare function createProtocolHandler(cleanupAndExit: (code: number) => Promise<never>, ensureInitialized: () => Promise<boolean>): ProtocolHandler;
19
+ //# sourceMappingURL=protocol-handler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"protocol-handler.d.ts","sourceRoot":"","sources":["../../../src/cli/handlers/protocol-handler.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EACL,eAAe,EACf,UAAU,EACX,MAAM,iBAAiB,CAAC;AAOzB,qBAAa,eAAgB,YAAW,eAAe;IACrD,QAAQ,CAAC,IAAI,cAAc;IAC3B,QAAQ,CAAC,WAAW,oCAAoC;IAExD,OAAO,CAAC,cAAc,CAAmC;IACzD,OAAO,CAAC,iBAAiB,CAAyB;gBAGhD,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,KAAK,CAAC,EAChD,iBAAiB,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC;IAM3C,QAAQ,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,GAAG,IAAI;YAevC,UAAU;IAyBxB,OAAO,IAAI,MAAM;CAkBlB;AAcD,wBAAgB,qBAAqB,CACnC,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,KAAK,CAAC,EAChD,iBAAiB,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,GACxC,eAAe,CAEjB"}
@@ -0,0 +1,79 @@
1
+ /**
2
+ * Agentic QE v3 - Protocol Command Handler
3
+ *
4
+ * Handles the 'aqe protocol' command group for protocol execution.
5
+ */
6
+ import chalk from 'chalk';
7
+ import { parseJsonOption } from '../helpers/safe-json.js';
8
+ // ============================================================================
9
+ // Protocol Handler
10
+ // ============================================================================
11
+ export class ProtocolHandler {
12
+ name = 'protocol';
13
+ description = 'Execute coordination protocols';
14
+ cleanupAndExit;
15
+ ensureInitialized;
16
+ constructor(cleanupAndExit, ensureInitialized) {
17
+ this.cleanupAndExit = cleanupAndExit;
18
+ this.ensureInitialized = ensureInitialized;
19
+ }
20
+ register(program, context) {
21
+ const protocolCmd = program
22
+ .command('protocol')
23
+ .description(this.description);
24
+ // protocol run
25
+ protocolCmd
26
+ .command('run <protocolId>')
27
+ .description('Execute a protocol')
28
+ .option('--params <json>', 'Protocol parameters as JSON', '{}')
29
+ .action(async (protocolId, options) => {
30
+ await this.executeRun(protocolId, options, context);
31
+ });
32
+ }
33
+ async executeRun(protocolId, options, context) {
34
+ if (!await this.ensureInitialized())
35
+ return;
36
+ try {
37
+ const params = parseJsonOption(options.params, 'params');
38
+ console.log(chalk.blue(`\n Executing protocol: ${protocolId}\n`));
39
+ const result = await context.queen.executeProtocol(protocolId, params);
40
+ if (result.success) {
41
+ console.log(chalk.green(` Protocol execution started`));
42
+ console.log(chalk.cyan(` Execution ID: ${result.value}`));
43
+ }
44
+ else {
45
+ console.log(chalk.red(` Failed to execute protocol: ${result.error.message}`));
46
+ }
47
+ console.log('');
48
+ }
49
+ catch (error) {
50
+ console.error(chalk.red('\n Failed to execute protocol:'), error);
51
+ await this.cleanupAndExit(1);
52
+ }
53
+ }
54
+ getHelp() {
55
+ return `
56
+ Execute coordination protocols.
57
+
58
+ Usage:
59
+ aqe protocol <command> [options]
60
+
61
+ Commands:
62
+ run <protocolId> Execute a protocol
63
+
64
+ Options:
65
+ --params <json> Protocol parameters as JSON (default: {})
66
+
67
+ Examples:
68
+ aqe protocol run cross-domain-sync
69
+ aqe protocol run data-validation --params '{"strict": true}'
70
+ `;
71
+ }
72
+ }
73
+ // ============================================================================
74
+ // Factory
75
+ // ============================================================================
76
+ export function createProtocolHandler(cleanupAndExit, ensureInitialized) {
77
+ return new ProtocolHandler(cleanupAndExit, ensureInitialized);
78
+ }
79
+ //# sourceMappingURL=protocol-handler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"protocol-handler.js","sourceRoot":"","sources":["../../../src/cli/handlers/protocol-handler.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,+EAA+E;AAC/E,mBAAmB;AACnB,+EAA+E;AAE/E,MAAM,OAAO,eAAe;IACjB,IAAI,GAAG,UAAU,CAAC;IAClB,WAAW,GAAG,gCAAgC,CAAC;IAEhD,cAAc,CAAmC;IACjD,iBAAiB,CAAyB;IAElD,YACE,cAAgD,EAChD,iBAAyC;QAEzC,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QACrC,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;IAC7C,CAAC;IAED,QAAQ,CAAC,OAAgB,EAAE,OAAmB;QAC5C,MAAM,WAAW,GAAG,OAAO;aACxB,OAAO,CAAC,UAAU,CAAC;aACnB,WAAW,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAEjC,eAAe;QACf,WAAW;aACR,OAAO,CAAC,kBAAkB,CAAC;aAC3B,WAAW,CAAC,oBAAoB,CAAC;aACjC,MAAM,CAAC,iBAAiB,EAAE,6BAA6B,EAAE,IAAI,CAAC;aAC9D,MAAM,CAAC,KAAK,EAAE,UAAkB,EAAE,OAAO,EAAE,EAAE;YAC5C,MAAM,IAAI,CAAC,UAAU,CAAC,UAAU,EAAE,OAAO,EAAE,OAAO,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