agentic-qe 3.3.0 → 3.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (367) hide show
  1. package/README.md +6 -2
  2. package/package.json +6 -1
  3. package/v3/CHANGELOG.md +88 -0
  4. package/v3/dist/cli/bundle.js +18794 -15534
  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/task-executor.js +2 -2
  130. package/v3/dist/coordination/task-executor.js.map +1 -1
  131. package/v3/dist/domains/chaos-resilience/plugin.js +2 -2
  132. package/v3/dist/domains/chaos-resilience/plugin.js.map +1 -1
  133. package/v3/dist/domains/code-intelligence/plugin.js +2 -2
  134. package/v3/dist/domains/code-intelligence/plugin.js.map +1 -1
  135. package/v3/dist/domains/contract-testing/plugin.js +2 -2
  136. package/v3/dist/domains/contract-testing/plugin.js.map +1 -1
  137. package/v3/dist/domains/coverage-analysis/plugin.d.ts.map +1 -1
  138. package/v3/dist/domains/coverage-analysis/plugin.js +2 -1
  139. package/v3/dist/domains/coverage-analysis/plugin.js.map +1 -1
  140. package/v3/dist/domains/defect-intelligence/plugin.js +2 -2
  141. package/v3/dist/domains/defect-intelligence/plugin.js.map +1 -1
  142. package/v3/dist/domains/domain-interface.d.ts.map +1 -1
  143. package/v3/dist/domains/domain-interface.js +3 -1
  144. package/v3/dist/domains/domain-interface.js.map +1 -1
  145. package/v3/dist/domains/learning-optimization/plugin.js +2 -2
  146. package/v3/dist/domains/learning-optimization/plugin.js.map +1 -1
  147. package/v3/dist/domains/quality-assessment/plugin.js +2 -2
  148. package/v3/dist/domains/quality-assessment/plugin.js.map +1 -1
  149. package/v3/dist/domains/requirements-validation/plugin.js +2 -2
  150. package/v3/dist/domains/requirements-validation/plugin.js.map +1 -1
  151. package/v3/dist/domains/security-compliance/plugin.js +2 -2
  152. package/v3/dist/domains/security-compliance/plugin.js.map +1 -1
  153. package/v3/dist/domains/test-execution/index.d.ts +2 -1
  154. package/v3/dist/domains/test-execution/index.d.ts.map +1 -1
  155. package/v3/dist/domains/test-execution/index.js +0 -2
  156. package/v3/dist/domains/test-execution/index.js.map +1 -1
  157. package/v3/dist/domains/test-execution/interfaces.d.ts +222 -25
  158. package/v3/dist/domains/test-execution/interfaces.d.ts.map +1 -1
  159. package/v3/dist/domains/test-execution/interfaces.js +130 -3
  160. package/v3/dist/domains/test-execution/interfaces.js.map +1 -1
  161. package/v3/dist/domains/test-execution/plugin.d.ts.map +1 -1
  162. package/v3/dist/domains/test-execution/plugin.js +2 -1
  163. package/v3/dist/domains/test-execution/plugin.js.map +1 -1
  164. package/v3/dist/domains/test-execution/test-prioritization-types.d.ts +5 -172
  165. package/v3/dist/domains/test-execution/test-prioritization-types.d.ts.map +1 -1
  166. package/v3/dist/domains/test-execution/test-prioritization-types.js +6 -129
  167. package/v3/dist/domains/test-execution/test-prioritization-types.js.map +1 -1
  168. package/v3/dist/domains/test-execution/types/index.d.ts +7 -3
  169. package/v3/dist/domains/test-execution/types/index.d.ts.map +1 -1
  170. package/v3/dist/domains/test-execution/types/index.js +7 -17
  171. package/v3/dist/domains/test-execution/types/index.js.map +1 -1
  172. package/v3/dist/domains/test-generation/coordinator.d.ts +1 -1
  173. package/v3/dist/domains/test-generation/coordinator.d.ts.map +1 -1
  174. package/v3/dist/domains/test-generation/coordinator.js +3 -3
  175. package/v3/dist/domains/test-generation/coordinator.js.map +1 -1
  176. package/v3/dist/domains/test-generation/factories/index.d.ts +8 -0
  177. package/v3/dist/domains/test-generation/factories/index.d.ts.map +1 -0
  178. package/v3/dist/domains/test-generation/factories/index.js +8 -0
  179. package/v3/dist/domains/test-generation/factories/index.js.map +1 -0
  180. package/v3/dist/domains/test-generation/factories/test-generator-factory.d.ts +108 -0
  181. package/v3/dist/domains/test-generation/factories/test-generator-factory.d.ts.map +1 -0
  182. package/v3/dist/domains/test-generation/factories/test-generator-factory.js +158 -0
  183. package/v3/dist/domains/test-generation/factories/test-generator-factory.js.map +1 -0
  184. package/v3/dist/domains/test-generation/generators/base-test-generator.d.ts +79 -0
  185. package/v3/dist/domains/test-generation/generators/base-test-generator.d.ts.map +1 -0
  186. package/v3/dist/domains/test-generation/generators/base-test-generator.js +252 -0
  187. package/v3/dist/domains/test-generation/generators/base-test-generator.js.map +1 -0
  188. package/v3/dist/domains/test-generation/generators/index.d.ts +11 -0
  189. package/v3/dist/domains/test-generation/generators/index.d.ts.map +1 -0
  190. package/v3/dist/domains/test-generation/generators/index.js +13 -0
  191. package/v3/dist/domains/test-generation/generators/index.js.map +1 -0
  192. package/v3/dist/domains/test-generation/generators/jest-vitest-generator.d.ts +77 -0
  193. package/v3/dist/domains/test-generation/generators/jest-vitest-generator.d.ts.map +1 -0
  194. package/v3/dist/domains/test-generation/generators/jest-vitest-generator.js +365 -0
  195. package/v3/dist/domains/test-generation/generators/jest-vitest-generator.js.map +1 -0
  196. package/v3/dist/domains/test-generation/generators/mocha-generator.d.ts +56 -0
  197. package/v3/dist/domains/test-generation/generators/mocha-generator.d.ts.map +1 -0
  198. package/v3/dist/domains/test-generation/generators/mocha-generator.js +197 -0
  199. package/v3/dist/domains/test-generation/generators/mocha-generator.js.map +1 -0
  200. package/v3/dist/domains/test-generation/generators/pytest-generator.d.ts +66 -0
  201. package/v3/dist/domains/test-generation/generators/pytest-generator.d.ts.map +1 -0
  202. package/v3/dist/domains/test-generation/generators/pytest-generator.js +240 -0
  203. package/v3/dist/domains/test-generation/generators/pytest-generator.js.map +1 -0
  204. package/v3/dist/domains/test-generation/index.d.ts +2 -2
  205. package/v3/dist/domains/test-generation/index.d.ts.map +1 -1
  206. package/v3/dist/domains/test-generation/index.js +3 -3
  207. package/v3/dist/domains/test-generation/index.js.map +1 -1
  208. package/v3/dist/domains/test-generation/interfaces/index.d.ts +9 -0
  209. package/v3/dist/domains/test-generation/interfaces/index.d.ts.map +1 -0
  210. package/v3/dist/domains/test-generation/interfaces/index.js +9 -0
  211. package/v3/dist/domains/test-generation/interfaces/index.js.map +1 -0
  212. package/v3/dist/domains/test-generation/interfaces/test-generator.interface.d.ts +166 -0
  213. package/v3/dist/domains/test-generation/interfaces/test-generator.interface.d.ts.map +1 -0
  214. package/v3/dist/domains/test-generation/interfaces/test-generator.interface.js +8 -0
  215. package/v3/dist/domains/test-generation/interfaces/test-generator.interface.js.map +1 -0
  216. package/v3/dist/domains/test-generation/interfaces.d.ts +163 -24
  217. package/v3/dist/domains/test-generation/interfaces.d.ts.map +1 -1
  218. package/v3/dist/domains/test-generation/interfaces.js +2 -2
  219. package/v3/dist/domains/test-generation/plugin.d.ts.map +1 -1
  220. package/v3/dist/domains/test-generation/plugin.js +6 -5
  221. package/v3/dist/domains/test-generation/plugin.js.map +1 -1
  222. package/v3/dist/domains/test-generation/{coherence-gate.d.ts → services/coherence-gate-service.d.ts} +4 -4
  223. package/v3/dist/domains/test-generation/services/coherence-gate-service.d.ts.map +1 -0
  224. package/v3/dist/domains/test-generation/{coherence-gate.js → services/coherence-gate-service.js} +2 -2
  225. package/v3/dist/domains/test-generation/services/coherence-gate-service.js.map +1 -0
  226. package/v3/dist/domains/test-generation/services/index.d.ts +8 -2
  227. package/v3/dist/domains/test-generation/services/index.d.ts.map +1 -1
  228. package/v3/dist/domains/test-generation/services/index.js +10 -3
  229. package/v3/dist/domains/test-generation/services/index.js.map +1 -1
  230. package/v3/dist/domains/test-generation/services/property-test-generator.d.ts +34 -0
  231. package/v3/dist/domains/test-generation/services/property-test-generator.d.ts.map +1 -0
  232. package/v3/dist/domains/test-generation/services/property-test-generator.js +306 -0
  233. package/v3/dist/domains/test-generation/services/property-test-generator.js.map +1 -0
  234. package/v3/dist/domains/test-generation/services/tdd-generator.d.ts +33 -0
  235. package/v3/dist/domains/test-generation/services/tdd-generator.d.ts.map +1 -0
  236. package/v3/dist/domains/test-generation/services/tdd-generator.js +342 -0
  237. package/v3/dist/domains/test-generation/services/tdd-generator.js.map +1 -0
  238. package/v3/dist/domains/test-generation/services/test-data-generator.d.ts +34 -0
  239. package/v3/dist/domains/test-generation/services/test-data-generator.d.ts.map +1 -0
  240. package/v3/dist/domains/test-generation/services/test-data-generator.js +245 -0
  241. package/v3/dist/domains/test-generation/services/test-data-generator.js.map +1 -0
  242. package/v3/dist/domains/test-generation/services/test-generator.d.ts +51 -160
  243. package/v3/dist/domains/test-generation/services/test-generator.d.ts.map +1 -1
  244. package/v3/dist/domains/test-generation/services/test-generator.js +101 -1858
  245. package/v3/dist/domains/test-generation/services/test-generator.js.map +1 -1
  246. package/v3/dist/domains/visual-accessibility/plugin.js +2 -2
  247. package/v3/dist/domains/visual-accessibility/plugin.js.map +1 -1
  248. package/v3/dist/init/phases/12-verification.d.ts +23 -0
  249. package/v3/dist/init/phases/12-verification.d.ts.map +1 -1
  250. package/v3/dist/init/phases/12-verification.js +185 -2
  251. package/v3/dist/init/phases/12-verification.js.map +1 -1
  252. package/v3/dist/integrations/agentic-flow/model-router/complexity-analyzer.d.ts +24 -62
  253. package/v3/dist/integrations/agentic-flow/model-router/complexity-analyzer.d.ts.map +1 -1
  254. package/v3/dist/integrations/agentic-flow/model-router/complexity-analyzer.js +45 -497
  255. package/v3/dist/integrations/agentic-flow/model-router/complexity-analyzer.js.map +1 -1
  256. package/v3/dist/integrations/agentic-flow/model-router/router.js +2 -2
  257. package/v3/dist/integrations/agentic-flow/model-router/router.js.map +1 -1
  258. package/v3/dist/integrations/agentic-flow/model-router/score-calculator.d.ts +98 -0
  259. package/v3/dist/integrations/agentic-flow/model-router/score-calculator.d.ts.map +1 -0
  260. package/v3/dist/integrations/agentic-flow/model-router/score-calculator.js +197 -0
  261. package/v3/dist/integrations/agentic-flow/model-router/score-calculator.js.map +1 -0
  262. package/v3/dist/integrations/agentic-flow/model-router/signal-collector.d.ts +102 -0
  263. package/v3/dist/integrations/agentic-flow/model-router/signal-collector.d.ts.map +1 -0
  264. package/v3/dist/integrations/agentic-flow/model-router/signal-collector.js +372 -0
  265. package/v3/dist/integrations/agentic-flow/model-router/signal-collector.js.map +1 -0
  266. package/v3/dist/integrations/agentic-flow/model-router/tier-recommender.d.ts +64 -0
  267. package/v3/dist/integrations/agentic-flow/model-router/tier-recommender.d.ts.map +1 -0
  268. package/v3/dist/integrations/agentic-flow/model-router/tier-recommender.js +120 -0
  269. package/v3/dist/integrations/agentic-flow/model-router/tier-recommender.js.map +1 -0
  270. package/v3/dist/integrations/coherence/coherence-service.d.ts.map +1 -1
  271. package/v3/dist/integrations/coherence/coherence-service.js +87 -30
  272. package/v3/dist/integrations/coherence/coherence-service.js.map +1 -1
  273. package/v3/dist/integrations/coherence/engines/spectral-adapter.d.ts.map +1 -1
  274. package/v3/dist/integrations/coherence/engines/spectral-adapter.js +124 -35
  275. package/v3/dist/integrations/coherence/engines/spectral-adapter.js.map +1 -1
  276. package/v3/dist/learning/memory-auditor.d.ts.map +1 -1
  277. package/v3/dist/learning/memory-auditor.js +3 -1
  278. package/v3/dist/learning/memory-auditor.js.map +1 -1
  279. package/v3/dist/mcp/bundle.js +2475 -1463
  280. package/v3/dist/mcp/security/cve-prevention.d.ts +31 -134
  281. package/v3/dist/mcp/security/cve-prevention.d.ts.map +1 -1
  282. package/v3/dist/mcp/security/cve-prevention.js +37 -562
  283. package/v3/dist/mcp/security/cve-prevention.js.map +1 -1
  284. package/v3/dist/mcp/security/index.d.ts +5 -1
  285. package/v3/dist/mcp/security/index.d.ts.map +1 -1
  286. package/v3/dist/mcp/security/validators/command-validator.d.ts +41 -0
  287. package/v3/dist/mcp/security/validators/command-validator.d.ts.map +1 -0
  288. package/v3/dist/mcp/security/validators/command-validator.js +123 -0
  289. package/v3/dist/mcp/security/validators/command-validator.js.map +1 -0
  290. package/v3/dist/mcp/security/validators/crypto-validator.d.ts +40 -0
  291. package/v3/dist/mcp/security/validators/crypto-validator.d.ts.map +1 -0
  292. package/v3/dist/mcp/security/validators/crypto-validator.js +72 -0
  293. package/v3/dist/mcp/security/validators/crypto-validator.js.map +1 -0
  294. package/v3/dist/mcp/security/validators/index.d.ts +12 -0
  295. package/v3/dist/mcp/security/validators/index.d.ts.map +1 -0
  296. package/v3/dist/mcp/security/validators/index.js +22 -0
  297. package/v3/dist/mcp/security/validators/index.js.map +1 -0
  298. package/v3/dist/mcp/security/validators/input-sanitizer.d.ts +56 -0
  299. package/v3/dist/mcp/security/validators/input-sanitizer.d.ts.map +1 -0
  300. package/v3/dist/mcp/security/validators/input-sanitizer.js +157 -0
  301. package/v3/dist/mcp/security/validators/input-sanitizer.js.map +1 -0
  302. package/v3/dist/mcp/security/validators/interfaces.d.ts +164 -0
  303. package/v3/dist/mcp/security/validators/interfaces.d.ts.map +1 -0
  304. package/v3/dist/mcp/security/validators/interfaces.js +6 -0
  305. package/v3/dist/mcp/security/validators/interfaces.js.map +1 -0
  306. package/v3/dist/mcp/security/validators/path-traversal-validator.d.ts +50 -0
  307. package/v3/dist/mcp/security/validators/path-traversal-validator.d.ts.map +1 -0
  308. package/v3/dist/mcp/security/validators/path-traversal-validator.js +242 -0
  309. package/v3/dist/mcp/security/validators/path-traversal-validator.js.map +1 -0
  310. package/v3/dist/mcp/security/validators/regex-safety-validator.d.ts +50 -0
  311. package/v3/dist/mcp/security/validators/regex-safety-validator.d.ts.map +1 -0
  312. package/v3/dist/mcp/security/validators/regex-safety-validator.js +183 -0
  313. package/v3/dist/mcp/security/validators/regex-safety-validator.js.map +1 -0
  314. package/v3/dist/mcp/security/validators/validation-orchestrator.d.ts +66 -0
  315. package/v3/dist/mcp/security/validators/validation-orchestrator.d.ts.map +1 -0
  316. package/v3/dist/mcp/security/validators/validation-orchestrator.js +146 -0
  317. package/v3/dist/mcp/security/validators/validation-orchestrator.js.map +1 -0
  318. package/v3/dist/mcp/server.d.ts.map +1 -1
  319. package/v3/dist/mcp/server.js +1 -0
  320. package/v3/dist/mcp/server.js.map +1 -1
  321. package/v3/dist/mcp/tool-registry.d.ts +3 -1
  322. package/v3/dist/mcp/tool-registry.d.ts.map +1 -1
  323. package/v3/dist/mcp/tool-registry.js +155 -2
  324. package/v3/dist/mcp/tool-registry.js.map +1 -1
  325. package/v3/dist/mcp/tools/test-generation/generate.d.ts +1 -0
  326. package/v3/dist/mcp/tools/test-generation/generate.d.ts.map +1 -1
  327. package/v3/dist/mcp/tools/test-generation/generate.js +3 -2
  328. package/v3/dist/mcp/tools/test-generation/generate.js.map +1 -1
  329. package/v3/dist/sync/cloud/index.d.ts +8 -0
  330. package/v3/dist/sync/cloud/index.d.ts.map +1 -0
  331. package/v3/dist/sync/cloud/index.js +8 -0
  332. package/v3/dist/sync/cloud/index.js.map +1 -0
  333. package/v3/dist/sync/cloud/postgres-writer.d.ts +88 -0
  334. package/v3/dist/sync/cloud/postgres-writer.d.ts.map +1 -0
  335. package/v3/dist/sync/cloud/postgres-writer.js +319 -0
  336. package/v3/dist/sync/cloud/postgres-writer.js.map +1 -0
  337. package/v3/dist/sync/cloud/tunnel-manager.d.ts +75 -0
  338. package/v3/dist/sync/cloud/tunnel-manager.d.ts.map +1 -0
  339. package/v3/dist/sync/cloud/tunnel-manager.js +221 -0
  340. package/v3/dist/sync/cloud/tunnel-manager.js.map +1 -0
  341. package/v3/dist/sync/index.d.ts +35 -0
  342. package/v3/dist/sync/index.d.ts.map +1 -0
  343. package/v3/dist/sync/index.js +35 -0
  344. package/v3/dist/sync/index.js.map +1 -0
  345. package/v3/dist/sync/interfaces.d.ts +245 -0
  346. package/v3/dist/sync/interfaces.d.ts.map +1 -0
  347. package/v3/dist/sync/interfaces.js +160 -0
  348. package/v3/dist/sync/interfaces.js.map +1 -0
  349. package/v3/dist/sync/readers/index.d.ts +8 -0
  350. package/v3/dist/sync/readers/index.d.ts.map +1 -0
  351. package/v3/dist/sync/readers/index.js +8 -0
  352. package/v3/dist/sync/readers/index.js.map +1 -0
  353. package/v3/dist/sync/readers/json-reader.d.ts +95 -0
  354. package/v3/dist/sync/readers/json-reader.d.ts.map +1 -0
  355. package/v3/dist/sync/readers/json-reader.js +306 -0
  356. package/v3/dist/sync/readers/json-reader.js.map +1 -0
  357. package/v3/dist/sync/readers/sqlite-reader.d.ts +88 -0
  358. package/v3/dist/sync/readers/sqlite-reader.d.ts.map +1 -0
  359. package/v3/dist/sync/readers/sqlite-reader.js +255 -0
  360. package/v3/dist/sync/readers/sqlite-reader.js.map +1 -0
  361. package/v3/dist/sync/sync-agent.d.ts +116 -0
  362. package/v3/dist/sync/sync-agent.d.ts.map +1 -0
  363. package/v3/dist/sync/sync-agent.js +416 -0
  364. package/v3/dist/sync/sync-agent.js.map +1 -0
  365. package/v3/package.json +13 -2
  366. package/v3/dist/domains/test-generation/coherence-gate.d.ts.map +0 -1
  367. package/v3/dist/domains/test-generation/coherence-gate.js.map +0 -1
@@ -0,0 +1,77 @@
1
+ /**
2
+ * Agentic QE v3 - Jest/Vitest Test Generator
3
+ * Strategy implementation for Jest and Vitest test frameworks
4
+ *
5
+ * Generates test code using:
6
+ * - describe/it blocks
7
+ * - expect().toBe/toEqual/toBeDefined assertions
8
+ * - beforeEach/afterEach hooks
9
+ * - async/await support
10
+ *
11
+ * @module test-generation/generators
12
+ */
13
+ import { BaseTestGenerator } from './base-test-generator';
14
+ import type { TestFramework, TestType, FunctionInfo, ClassInfo, TestGenerationContext } from '../interfaces';
15
+ /**
16
+ * JestVitestGenerator - Test generator for Jest and Vitest frameworks
17
+ *
18
+ * Both frameworks share nearly identical APIs, so this single generator
19
+ * handles both by adjusting minor differences (e.g., vi vs jest mocking).
20
+ *
21
+ * @example
22
+ * ```typescript
23
+ * const generator = new JestVitestGenerator('vitest');
24
+ * const testCode = generator.generateTests({
25
+ * moduleName: 'userService',
26
+ * importPath: './user-service',
27
+ * testType: 'unit',
28
+ * patterns: [],
29
+ * analysis: { functions: [...], classes: [...] }
30
+ * });
31
+ * ```
32
+ */
33
+ export declare class JestVitestGenerator extends BaseTestGenerator {
34
+ readonly framework: TestFramework;
35
+ constructor(framework?: 'jest' | 'vitest');
36
+ /**
37
+ * Get the mock utility name (vi for vitest, jest for jest)
38
+ */
39
+ private get mockUtil();
40
+ /**
41
+ * Generate complete test file from analysis
42
+ */
43
+ generateTests(context: TestGenerationContext): string;
44
+ /**
45
+ * Generate tests for a standalone function
46
+ */
47
+ generateFunctionTests(fn: FunctionInfo, _testType: TestType): string;
48
+ /**
49
+ * Generate tests for a class
50
+ */
51
+ generateClassTests(cls: ClassInfo, testType: TestType): string;
52
+ /**
53
+ * Generate tests for a class method
54
+ */
55
+ private generateMethodTests;
56
+ /**
57
+ * Generate stub tests when no AST analysis is available
58
+ */
59
+ generateStubTests(context: TestGenerationContext): string;
60
+ /**
61
+ * Generate coverage-focused tests for specific lines
62
+ */
63
+ generateCoverageTests(moduleName: string, importPath: string, lines: number[]): string;
64
+ /**
65
+ * Generate basic operations test based on detected patterns
66
+ */
67
+ private generateBasicOpsTest;
68
+ /**
69
+ * Generate edge case test based on detected patterns
70
+ */
71
+ private generateEdgeCaseTest;
72
+ /**
73
+ * Generate error handling test based on detected patterns
74
+ */
75
+ private generateErrorHandlingTest;
76
+ }
77
+ //# sourceMappingURL=jest-vitest-generator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jest-vitest-generator.d.ts","sourceRoot":"","sources":["../../../../src/domains/test-generation/generators/jest-vitest-generator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EACV,aAAa,EACb,QAAQ,EACR,YAAY,EACZ,SAAS,EACT,qBAAqB,EAEtB,MAAM,eAAe,CAAC;AAEvB;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,mBAAoB,SAAQ,iBAAiB;IACxD,QAAQ,CAAC,SAAS,EAAE,aAAa,CAAC;gBAEtB,SAAS,GAAE,MAAM,GAAG,QAAmB;IAKnD;;OAEG;IACH,OAAO,KAAK,QAAQ,GAEnB;IAED;;OAEG;IACH,aAAa,CAAC,OAAO,EAAE,qBAAqB,GAAG,MAAM;IA+BrD;;OAEG;IACH,qBAAqB,CAAC,EAAE,EAAE,YAAY,EAAE,SAAS,EAAE,QAAQ,GAAG,MAAM;IAqBpE;;OAEG;IACH,kBAAkB,CAAC,GAAG,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,GAAG,MAAM;IAkC9D;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAoC3B;;OAEG;IACH,iBAAiB,CAAC,OAAO,EAAE,qBAAqB,GAAG,MAAM;IAwBzD;;OAEG;IACH,qBAAqB,CACnB,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,MAAM,EAAE,GACd,MAAM;IAoCT;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAmE5B;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAsD5B;;OAEG;IACH,OAAO,CAAC,yBAAyB;CAyDlC"}
@@ -0,0 +1,365 @@
1
+ /**
2
+ * Agentic QE v3 - Jest/Vitest Test Generator
3
+ * Strategy implementation for Jest and Vitest test frameworks
4
+ *
5
+ * Generates test code using:
6
+ * - describe/it blocks
7
+ * - expect().toBe/toEqual/toBeDefined assertions
8
+ * - beforeEach/afterEach hooks
9
+ * - async/await support
10
+ *
11
+ * @module test-generation/generators
12
+ */
13
+ import { BaseTestGenerator } from './base-test-generator';
14
+ /**
15
+ * JestVitestGenerator - Test generator for Jest and Vitest frameworks
16
+ *
17
+ * Both frameworks share nearly identical APIs, so this single generator
18
+ * handles both by adjusting minor differences (e.g., vi vs jest mocking).
19
+ *
20
+ * @example
21
+ * ```typescript
22
+ * const generator = new JestVitestGenerator('vitest');
23
+ * const testCode = generator.generateTests({
24
+ * moduleName: 'userService',
25
+ * importPath: './user-service',
26
+ * testType: 'unit',
27
+ * patterns: [],
28
+ * analysis: { functions: [...], classes: [...] }
29
+ * });
30
+ * ```
31
+ */
32
+ export class JestVitestGenerator extends BaseTestGenerator {
33
+ framework;
34
+ constructor(framework = 'vitest') {
35
+ super();
36
+ this.framework = framework;
37
+ }
38
+ /**
39
+ * Get the mock utility name (vi for vitest, jest for jest)
40
+ */
41
+ get mockUtil() {
42
+ return this.framework === 'vitest' ? 'vi' : 'jest';
43
+ }
44
+ /**
45
+ * Generate complete test file from analysis
46
+ */
47
+ generateTests(context) {
48
+ const { moduleName, importPath, testType, patterns, analysis } = context;
49
+ if (!analysis || (analysis.functions.length === 0 && analysis.classes.length === 0)) {
50
+ return this.generateStubTests(context);
51
+ }
52
+ const patternComment = this.generatePatternComment(patterns);
53
+ const exports = this.extractExports(analysis.functions, analysis.classes);
54
+ const importStatement = this.generateImportStatement(exports, importPath, moduleName);
55
+ const mockImport = this.framework === 'vitest' ? ', vi' : '';
56
+ let testCode = `${patternComment}import { describe, it, expect, beforeEach${mockImport} } from '${this.framework}';
57
+ ${importStatement}
58
+
59
+ `;
60
+ // Generate tests for each function
61
+ for (const fn of analysis.functions) {
62
+ testCode += this.generateFunctionTests(fn, testType);
63
+ }
64
+ // Generate tests for each class
65
+ for (const cls of analysis.classes) {
66
+ testCode += this.generateClassTests(cls, testType);
67
+ }
68
+ return testCode;
69
+ }
70
+ /**
71
+ * Generate tests for a standalone function
72
+ */
73
+ generateFunctionTests(fn, _testType) {
74
+ const testCases = this.generateTestCasesForFunction(fn);
75
+ let code = `describe('${fn.name}', () => {\n`;
76
+ for (const testCase of testCases) {
77
+ if (testCase.setup) {
78
+ code += ` ${testCase.setup}\n\n`;
79
+ }
80
+ const asyncPrefix = fn.isAsync ? 'async ' : '';
81
+ code += ` it('${testCase.description}', ${asyncPrefix}() => {\n`;
82
+ code += ` ${testCase.action}\n`;
83
+ code += ` ${testCase.assertion}\n`;
84
+ code += ` });\n\n`;
85
+ }
86
+ code += `});\n\n`;
87
+ return code;
88
+ }
89
+ /**
90
+ * Generate tests for a class
91
+ */
92
+ generateClassTests(cls, testType) {
93
+ let code = `describe('${cls.name}', () => {\n`;
94
+ code += ` let instance: ${cls.name};\n\n`;
95
+ // Setup with beforeEach
96
+ if (cls.hasConstructor && cls.constructorParams) {
97
+ const constructorArgs = cls.constructorParams
98
+ .map((p) => this.generateTestValue(p))
99
+ .join(', ');
100
+ code += ` beforeEach(() => {\n`;
101
+ code += ` instance = new ${cls.name}(${constructorArgs});\n`;
102
+ code += ` });\n\n`;
103
+ }
104
+ else {
105
+ code += ` beforeEach(() => {\n`;
106
+ code += ` instance = new ${cls.name}();\n`;
107
+ code += ` });\n\n`;
108
+ }
109
+ // Constructor test
110
+ code += ` it('should instantiate correctly', () => {\n`;
111
+ code += ` expect(instance).toBeInstanceOf(${cls.name});\n`;
112
+ code += ` });\n\n`;
113
+ // Generate tests for each public method
114
+ for (const method of cls.methods) {
115
+ if (!method.name.startsWith('_') && !method.name.startsWith('#')) {
116
+ code += this.generateMethodTests(method, cls.name, testType);
117
+ }
118
+ }
119
+ code += `});\n\n`;
120
+ return code;
121
+ }
122
+ /**
123
+ * Generate tests for a class method
124
+ */
125
+ generateMethodTests(method, _className, _testType) {
126
+ let code = ` describe('${method.name}', () => {\n`;
127
+ const validParams = method.parameters.map((p) => this.generateTestValue(p)).join(', ');
128
+ const methodCall = method.isAsync
129
+ ? `await instance.${method.name}(${validParams})`
130
+ : `instance.${method.name}(${validParams})`;
131
+ // Happy path test
132
+ const asyncPrefix = method.isAsync ? 'async ' : '';
133
+ code += ` it('should execute successfully', ${asyncPrefix}() => {\n`;
134
+ code += ` const result = ${methodCall};\n`;
135
+ code += ` expect(result).toBeDefined();\n`;
136
+ code += ` });\n`;
137
+ // Error handling tests for non-optional params
138
+ for (const param of method.parameters) {
139
+ if (!param.optional) {
140
+ const paramsWithUndefined = method.parameters
141
+ .map((p) => (p.name === param.name ? 'undefined as any' : this.generateTestValue(p)))
142
+ .join(', ');
143
+ code += `\n it('should handle invalid ${param.name}', () => {\n`;
144
+ code += ` expect(() => instance.${method.name}(${paramsWithUndefined})).toThrow();\n`;
145
+ code += ` });\n`;
146
+ }
147
+ }
148
+ code += ` });\n\n`;
149
+ return code;
150
+ }
151
+ /**
152
+ * Generate stub tests when no AST analysis is available
153
+ */
154
+ generateStubTests(context) {
155
+ const { moduleName, importPath, testType, patterns } = context;
156
+ const patternComment = this.generatePatternComment(patterns);
157
+ const basicOpsTest = this.generateBasicOpsTest(moduleName, patterns);
158
+ const edgeCaseTest = this.generateEdgeCaseTest(moduleName, patterns);
159
+ const errorHandlingTest = this.generateErrorHandlingTest(moduleName, patterns);
160
+ return `${patternComment}import { ${moduleName} } from '${importPath}';
161
+
162
+ describe('${moduleName}', () => {
163
+ describe('${testType} tests', () => {
164
+ it('should be defined', () => {
165
+ expect(${moduleName}).toBeDefined();
166
+ });
167
+
168
+ ${basicOpsTest}
169
+ ${edgeCaseTest}
170
+ ${errorHandlingTest}
171
+ });
172
+ });
173
+ `;
174
+ }
175
+ /**
176
+ * Generate coverage-focused tests for specific lines
177
+ */
178
+ generateCoverageTests(moduleName, importPath, lines) {
179
+ const funcName = this.camelCase(moduleName);
180
+ const lineRange = this.formatLineRange(lines);
181
+ return `// Coverage test for ${lineRange} in ${moduleName}
182
+ import { ${funcName} } from '${importPath}';
183
+
184
+ describe('${moduleName} coverage', () => {
185
+ describe('${lineRange}', () => {
186
+ it('should execute code path covering ${lineRange}', () => {
187
+ // Arrange: Set up test inputs to reach uncovered lines
188
+ const testInput = undefined; // Replace with appropriate input
189
+
190
+ // Act: Execute the code path
191
+ const result = ${funcName}(testInput);
192
+
193
+ // Assert: Verify the code was reached and behaves correctly
194
+ expect(result).toBeDefined();
195
+ });
196
+
197
+ it('should handle edge case for ${lineRange}', () => {
198
+ // Arrange: Set up edge case input
199
+ const edgeCaseInput = null;
200
+
201
+ // Act & Assert: Verify edge case handling
202
+ expect(() => ${funcName}(edgeCaseInput)).not.toThrow();
203
+ });
204
+ });
205
+ });
206
+ `;
207
+ }
208
+ // ============================================================================
209
+ // Pattern-Aware Stub Test Generators
210
+ // ============================================================================
211
+ /**
212
+ * Generate basic operations test based on detected patterns
213
+ */
214
+ generateBasicOpsTest(moduleName, patterns) {
215
+ const isService = patterns.some((p) => p.name.toLowerCase().includes('service') ||
216
+ p.name.toLowerCase().includes('repository'));
217
+ const isFactory = patterns.some((p) => p.name.toLowerCase().includes('factory'));
218
+ const hasAsyncPattern = patterns.some((p) => p.name.toLowerCase().includes('async') || p.name.toLowerCase().includes('promise'));
219
+ if (isService) {
220
+ return ` it('should handle basic operations', async () => {
221
+ // Service pattern: test core functionality
222
+ const instance = new ${moduleName}();
223
+ expect(instance).toBeInstanceOf(${moduleName});
224
+
225
+ // Verify service is properly initialized
226
+ const methods = Object.getOwnPropertyNames(Object.getPrototypeOf(instance))
227
+ .filter(m => m !== 'constructor');
228
+ expect(methods.length).toBeGreaterThan(0);
229
+ });`;
230
+ }
231
+ if (isFactory) {
232
+ return ` it('should handle basic operations', () => {
233
+ // Factory pattern: test object creation
234
+ const result = ${moduleName}.create ? ${moduleName}.create() : new ${moduleName}();
235
+ expect(result).toBeDefined();
236
+ expect(typeof result).not.toBe('undefined');
237
+ });`;
238
+ }
239
+ if (hasAsyncPattern) {
240
+ return ` it('should handle basic operations', async () => {
241
+ // Async pattern: test promise resolution
242
+ const instance = typeof ${moduleName} === 'function'
243
+ ? new ${moduleName}()
244
+ : ${moduleName};
245
+
246
+ // Verify async methods resolve properly
247
+ if (typeof instance.execute === 'function') {
248
+ await expect(instance.execute()).resolves.toBeDefined();
249
+ }
250
+ });`;
251
+ }
252
+ // Default implementation
253
+ return ` it('should handle basic operations', () => {
254
+ // Verify module exports expected interface
255
+ const moduleType = typeof ${moduleName};
256
+ expect(['function', 'object']).toContain(moduleType);
257
+
258
+ if (moduleType === 'function') {
259
+ // Class or function: verify instantiation
260
+ const instance = new ${moduleName}();
261
+ expect(instance).toBeDefined();
262
+ } else {
263
+ // Object module: verify properties exist
264
+ expect(Object.keys(${moduleName}).length).toBeGreaterThan(0);
265
+ }
266
+ });`;
267
+ }
268
+ /**
269
+ * Generate edge case test based on detected patterns
270
+ */
271
+ generateEdgeCaseTest(moduleName, patterns) {
272
+ const hasValidation = patterns.some((p) => p.name.toLowerCase().includes('validation') ||
273
+ p.name.toLowerCase().includes('validator'));
274
+ const hasCollection = patterns.some((p) => p.name.toLowerCase().includes('collection') ||
275
+ p.name.toLowerCase().includes('list'));
276
+ if (hasValidation) {
277
+ return ` it('should handle edge cases', () => {
278
+ // Validation pattern: test boundary conditions
279
+ const instance = new ${moduleName}();
280
+
281
+ // Test with empty values
282
+ if (typeof instance.validate === 'function') {
283
+ expect(() => instance.validate('')).toBeDefined();
284
+ expect(() => instance.validate(null)).toBeDefined();
285
+ }
286
+ });`;
287
+ }
288
+ if (hasCollection) {
289
+ return ` it('should handle edge cases', () => {
290
+ // Collection pattern: test empty and large datasets
291
+ const instance = new ${moduleName}();
292
+
293
+ // Empty collection should be handled gracefully
294
+ if (typeof instance.add === 'function') {
295
+ expect(() => instance.add(undefined)).toBeDefined();
296
+ }
297
+ if (typeof instance.get === 'function') {
298
+ expect(instance.get('nonexistent')).toBeUndefined();
299
+ }
300
+ });`;
301
+ }
302
+ // Default edge case test
303
+ return ` it('should handle edge cases', () => {
304
+ // Test null/undefined handling
305
+ const instance = typeof ${moduleName} === 'function'
306
+ ? new ${moduleName}()
307
+ : ${moduleName};
308
+
309
+ // Module should handle edge case inputs gracefully
310
+ expect(instance).toBeDefined();
311
+ expect(() => JSON.stringify(instance)).not.toThrow();
312
+ });`;
313
+ }
314
+ /**
315
+ * Generate error handling test based on detected patterns
316
+ */
317
+ generateErrorHandlingTest(moduleName, patterns) {
318
+ const hasErrorPattern = patterns.some((p) => p.name.toLowerCase().includes('error') ||
319
+ p.name.toLowerCase().includes('exception'));
320
+ const hasAsyncPattern = patterns.some((p) => p.name.toLowerCase().includes('async') || p.name.toLowerCase().includes('promise'));
321
+ if (hasAsyncPattern) {
322
+ return ` it('should handle error conditions', async () => {
323
+ // Async error handling: verify rejections are caught
324
+ const instance = typeof ${moduleName} === 'function'
325
+ ? new ${moduleName}()
326
+ : ${moduleName};
327
+
328
+ // Async operations should reject gracefully on invalid input
329
+ const asyncMethods = Object.getOwnPropertyNames(Object.getPrototypeOf(instance) || {})
330
+ .filter(m => m !== 'constructor');
331
+
332
+ // At minimum, module should be stable
333
+ expect(instance).toBeDefined();
334
+ });`;
335
+ }
336
+ if (hasErrorPattern) {
337
+ return ` it('should handle error conditions', () => {
338
+ // Error pattern: verify custom error types
339
+ try {
340
+ const instance = new ${moduleName}();
341
+ // Trigger error condition if possible
342
+ if (typeof instance.throwError === 'function') {
343
+ expect(() => instance.throwError()).toThrow();
344
+ }
345
+ } catch (error) {
346
+ expect(error).toBeInstanceOf(Error);
347
+ }
348
+ });`;
349
+ }
350
+ // Default error handling test
351
+ return ` it('should handle error conditions', () => {
352
+ // Verify error resilience
353
+ expect(() => {
354
+ const instance = typeof ${moduleName} === 'function'
355
+ ? new ${moduleName}()
356
+ : ${moduleName};
357
+ return instance;
358
+ }).not.toThrow();
359
+
360
+ // Module should not throw on inspection
361
+ expect(() => Object.keys(${moduleName})).not.toThrow();
362
+ });`;
363
+ }
364
+ }
365
+ //# sourceMappingURL=jest-vitest-generator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jest-vitest-generator.js","sourceRoot":"","sources":["../../../../src/domains/test-generation/generators/jest-vitest-generator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAU1D;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,OAAO,mBAAoB,SAAQ,iBAAiB;IAC/C,SAAS,CAAgB;IAElC,YAAY,YAA+B,QAAQ;QACjD,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;IAED;;OAEG;IACH,IAAY,QAAQ;QAClB,OAAO,IAAI,CAAC,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC;IACrD,CAAC;IAED;;OAEG;IACH,aAAa,CAAC,OAA8B;QAC1C,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC;QAEzE,IAAI,CAAC,QAAQ,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC,IAAI,QAAQ,CAAC,OAAO,CAAC,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AI,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC;YACtC,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,WAAW,CAAC,CAC7C,CAAC;QAEF,MAAM,eAAe,GAAG,QAAQ,CAAC,IAAI,CACnC,CAAC,CAAC,EAAE,EAAE,CACJ,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,CACrF,CAAC;QAEF,IAAI,eAAe,EAAE,CAAC;YACpB,OAAO;;gCAEmB,UAAU;gBAC1B,UAAU;YACd,UAAU;;;;;;;;QAQd,CAAC;QACL,CAAC;QAED,IAAI,eAAe,EAAE,CAAC;YACpB,OAAO;;;+BAGkB,UAAU;;;;;;;;QAQjC,CAAC;QACL,CAAC;QAED,8BAA8B;QAC9B,OAAO;;;kCAGuB,UAAU;kBAC1B,UAAU;cACd,UAAU;;;;;iCAKS,UAAU;QACnC,CAAC;IACP,CAAC;CACF"}
@@ -0,0 +1,56 @@
1
+ /**
2
+ * Agentic QE v3 - Mocha Test Generator
3
+ * Strategy implementation for Mocha test framework with Chai assertions
4
+ *
5
+ * Generates test code using:
6
+ * - describe/it blocks (Mocha)
7
+ * - expect().to.be/to.equal assertions (Chai)
8
+ * - function() {} style for this context
9
+ * - beforeEach/afterEach hooks
10
+ *
11
+ * @module test-generation/generators
12
+ */
13
+ import { BaseTestGenerator } from './base-test-generator';
14
+ import type { TestFramework, TestType, FunctionInfo, ClassInfo, TestGenerationContext } from '../interfaces';
15
+ /**
16
+ * MochaGenerator - Test generator for Mocha framework with Chai
17
+ *
18
+ * Uses traditional function() syntax to preserve Mocha's this context
19
+ * for features like this.timeout() and this.retries().
20
+ *
21
+ * @example
22
+ * ```typescript
23
+ * const generator = new MochaGenerator();
24
+ * const testCode = generator.generateTests({
25
+ * moduleName: 'userService',
26
+ * importPath: './user-service',
27
+ * testType: 'unit',
28
+ * patterns: [],
29
+ * analysis: { functions: [...], classes: [...] }
30
+ * });
31
+ * ```
32
+ */
33
+ export declare class MochaGenerator extends BaseTestGenerator {
34
+ readonly framework: TestFramework;
35
+ /**
36
+ * Generate complete test file from analysis
37
+ */
38
+ generateTests(context: TestGenerationContext): string;
39
+ /**
40
+ * Generate tests for a standalone function
41
+ */
42
+ generateFunctionTests(fn: FunctionInfo, _testType: TestType): string;
43
+ /**
44
+ * Generate tests for a class
45
+ */
46
+ generateClassTests(cls: ClassInfo, _testType: TestType): string;
47
+ /**
48
+ * Generate stub tests when no AST analysis is available
49
+ */
50
+ generateStubTests(context: TestGenerationContext): string;
51
+ /**
52
+ * Generate coverage-focused tests for specific lines
53
+ */
54
+ generateCoverageTests(moduleName: string, importPath: string, lines: number[]): string;
55
+ }
56
+ //# sourceMappingURL=mocha-generator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mocha-generator.d.ts","sourceRoot":"","sources":["../../../../src/domains/test-generation/generators/mocha-generator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EACV,aAAa,EACb,QAAQ,EACR,YAAY,EACZ,SAAS,EACT,qBAAqB,EAEtB,MAAM,eAAe,CAAC;AAEvB;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,cAAe,SAAQ,iBAAiB;IACnD,QAAQ,CAAC,SAAS,EAAE,aAAa,CAAW;IAE5C;;OAEG;IACH,aAAa,CAAC,OAAO,EAAE,qBAAqB,GAAG,MAAM;IA6BrD;;OAEG;IACH,qBAAqB,CAAC,EAAE,EAAE,YAAY,EAAE,SAAS,EAAE,QAAQ,GAAG,MAAM;IA2BpE;;OAEG;IACH,kBAAkB,CAAC,GAAG,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,GAAG,MAAM;IA2B/D;;OAEG;IACH,iBAAiB,CAAC,OAAO,EAAE,qBAAqB,GAAG,MAAM;IAwDzD;;OAEG;IACH,qBAAqB,CACnB,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,MAAM,EAAE,GACd,MAAM;CAgCV"}