agentic-qe 3.3.3 → 3.3.5

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 (553) hide show
  1. package/.claude/agents/v3/README.md +100 -0
  2. package/.claude/agents/v3/qe-accessibility-auditor.md +112 -11
  3. package/.claude/agents/v3/qe-bdd-generator.md +40 -0
  4. package/.claude/agents/v3/qe-coverage-specialist.md +39 -0
  5. package/.claude/agents/v3/qe-defect-predictor.md +36 -0
  6. package/.claude/agents/v3/qe-gap-detector.md +39 -0
  7. package/.claude/agents/v3/qe-pattern-learner.md +31 -0
  8. package/.claude/agents/v3/qe-product-factors-assessor.md +34 -0
  9. package/.claude/agents/v3/qe-quality-criteria-recommender.md +32 -0
  10. package/.claude/agents/v3/qe-quality-gate.md +39 -0
  11. package/.claude/agents/v3/qe-queen-coordinator.md +332 -166
  12. package/.claude/agents/v3/qe-requirements-validator.md +37 -0
  13. package/.claude/agents/v3/qe-risk-assessor.md +33 -0
  14. package/.claude/agents/v3/qe-tdd-specialist.md +33 -0
  15. package/.claude/agents/v3/qe-test-architect.md +36 -0
  16. package/.claude/helpers/statusline-v3.cjs +38 -42
  17. package/.claude/skills/README.md +30 -104
  18. package/.claude/skills/a11y-ally/SKILL.md +1658 -0
  19. package/.claude/skills/qcsd-ideation-swarm/SKILL.md +1750 -0
  20. package/.claude/skills/skills-manifest.json +78 -8
  21. package/README.md +18 -4
  22. package/package.json +1 -1
  23. package/scripts/cloud-db-config.json +10 -5
  24. package/scripts/demo-warmup.sh +45 -0
  25. package/scripts/fetch-content.js +460 -0
  26. package/scripts/merge-v3-to-root.sql +48 -0
  27. package/v3/CHANGELOG.md +166 -0
  28. package/v3/README.md +11 -6
  29. package/v3/assets/agents/v3/README.md +100 -0
  30. package/v3/assets/agents/v3/qe-accessibility-auditor.md +112 -11
  31. package/v3/assets/agents/v3/qe-bdd-generator.md +40 -0
  32. package/v3/assets/agents/v3/qe-coverage-specialist.md +39 -0
  33. package/v3/assets/agents/v3/qe-defect-predictor.md +36 -0
  34. package/v3/assets/agents/v3/qe-gap-detector.md +39 -0
  35. package/v3/assets/agents/v3/qe-pattern-learner.md +31 -0
  36. package/v3/assets/agents/v3/qe-product-factors-assessor.md +34 -0
  37. package/v3/assets/agents/v3/qe-quality-criteria-recommender.md +32 -0
  38. package/v3/assets/agents/v3/qe-quality-gate.md +39 -0
  39. package/v3/assets/agents/v3/qe-queen-coordinator.md +332 -166
  40. package/v3/assets/agents/v3/qe-requirements-validator.md +37 -0
  41. package/v3/assets/agents/v3/qe-risk-assessor.md +33 -0
  42. package/v3/assets/agents/v3/qe-tdd-specialist.md +33 -0
  43. package/v3/assets/agents/v3/qe-test-architect.md +36 -0
  44. package/v3/assets/hooks/cross-phase-memory.yaml +253 -0
  45. package/v3/assets/skills/a11y-ally/SKILL.md +1658 -0
  46. package/v3/assets/skills/qcsd-ideation-swarm/SKILL.md +1750 -0
  47. package/v3/assets/skills/skills-manifest.json +753 -0
  48. package/v3/dist/adapters/claude-flow/model-router-bridge.d.ts.map +1 -1
  49. package/v3/dist/adapters/claude-flow/model-router-bridge.js +6 -4
  50. package/v3/dist/adapters/claude-flow/model-router-bridge.js.map +1 -1
  51. package/v3/dist/adapters/claude-flow/pretrain-bridge.d.ts.map +1 -1
  52. package/v3/dist/adapters/claude-flow/pretrain-bridge.js +13 -8
  53. package/v3/dist/adapters/claude-flow/pretrain-bridge.js.map +1 -1
  54. package/v3/dist/adapters/claude-flow/trajectory-bridge.d.ts.map +1 -1
  55. package/v3/dist/adapters/claude-flow/trajectory-bridge.js +9 -6
  56. package/v3/dist/adapters/claude-flow/trajectory-bridge.js.map +1 -1
  57. package/v3/dist/benchmarks/performance-benchmarks.d.ts.map +1 -1
  58. package/v3/dist/benchmarks/performance-benchmarks.js +5 -3
  59. package/v3/dist/benchmarks/performance-benchmarks.js.map +1 -1
  60. package/v3/dist/cli/bundle.js +27646 -23204
  61. package/v3/dist/cli/commands/hooks.d.ts.map +1 -1
  62. package/v3/dist/cli/commands/hooks.js +288 -0
  63. package/v3/dist/cli/commands/hooks.js.map +1 -1
  64. package/v3/dist/cli/commands/sync.d.ts.map +1 -1
  65. package/v3/dist/cli/commands/sync.js +0 -6
  66. package/v3/dist/cli/commands/sync.js.map +1 -1
  67. package/v3/dist/cli/handlers/init-handler.d.ts.map +1 -1
  68. package/v3/dist/cli/handlers/init-handler.js +11 -0
  69. package/v3/dist/cli/handlers/init-handler.js.map +1 -1
  70. package/v3/dist/cli/index.js +14 -2
  71. package/v3/dist/cli/index.js.map +1 -1
  72. package/v3/dist/cli/scheduler/persistent-scheduler.d.ts.map +1 -1
  73. package/v3/dist/cli/scheduler/persistent-scheduler.js +3 -2
  74. package/v3/dist/cli/scheduler/persistent-scheduler.js.map +1 -1
  75. package/v3/dist/cli/wizards/test-wizard.d.ts.map +1 -1
  76. package/v3/dist/cli/wizards/test-wizard.js +6 -4
  77. package/v3/dist/cli/wizards/test-wizard.js.map +1 -1
  78. package/v3/dist/coordination/consensus/providers/claude-provider.js +1 -1
  79. package/v3/dist/coordination/consensus/providers/gemini-provider.js +1 -1
  80. package/v3/dist/coordination/consensus/providers/native-learning-provider.d.ts.map +1 -1
  81. package/v3/dist/coordination/consensus/providers/native-learning-provider.js +10 -8
  82. package/v3/dist/coordination/consensus/providers/native-learning-provider.js.map +1 -1
  83. package/v3/dist/coordination/consensus/providers/ollama-provider.d.ts.map +1 -1
  84. package/v3/dist/coordination/consensus/providers/ollama-provider.js +5 -4
  85. package/v3/dist/coordination/consensus/providers/ollama-provider.js.map +1 -1
  86. package/v3/dist/coordination/consensus/providers/openai-provider.d.ts.map +1 -1
  87. package/v3/dist/coordination/consensus/providers/openai-provider.js +5 -4
  88. package/v3/dist/coordination/consensus/providers/openai-provider.js.map +1 -1
  89. package/v3/dist/coordination/constants.d.ts +198 -0
  90. package/v3/dist/coordination/constants.d.ts.map +1 -0
  91. package/v3/dist/coordination/constants.js +210 -0
  92. package/v3/dist/coordination/constants.js.map +1 -0
  93. package/v3/dist/coordination/mincut/dream-integration.d.ts.map +1 -1
  94. package/v3/dist/coordination/mincut/dream-integration.js +5 -1
  95. package/v3/dist/coordination/mincut/dream-integration.js.map +1 -1
  96. package/v3/dist/coordination/queen-coordinator.d.ts +9 -1
  97. package/v3/dist/coordination/queen-coordinator.d.ts.map +1 -1
  98. package/v3/dist/coordination/queen-coordinator.js +49 -9
  99. package/v3/dist/coordination/queen-coordinator.js.map +1 -1
  100. package/v3/dist/coordination/task-executor.d.ts.map +1 -1
  101. package/v3/dist/coordination/task-executor.js +7 -8
  102. package/v3/dist/coordination/task-executor.js.map +1 -1
  103. package/v3/dist/coordination/workflow-orchestrator.d.ts.map +1 -1
  104. package/v3/dist/coordination/workflow-orchestrator.js +261 -0
  105. package/v3/dist/coordination/workflow-orchestrator.js.map +1 -1
  106. package/v3/dist/domains/chaos-resilience/plugin.d.ts +14 -3
  107. package/v3/dist/domains/chaos-resilience/plugin.d.ts.map +1 -1
  108. package/v3/dist/domains/chaos-resilience/plugin.js +96 -0
  109. package/v3/dist/domains/chaos-resilience/plugin.js.map +1 -1
  110. package/v3/dist/domains/chaos-resilience/services/performance-profiler.d.ts.map +1 -1
  111. package/v3/dist/domains/chaos-resilience/services/performance-profiler.js +12 -8
  112. package/v3/dist/domains/chaos-resilience/services/performance-profiler.js.map +1 -1
  113. package/v3/dist/domains/code-intelligence/plugin.d.ts +13 -3
  114. package/v3/dist/domains/code-intelligence/plugin.d.ts.map +1 -1
  115. package/v3/dist/domains/code-intelligence/plugin.js +85 -0
  116. package/v3/dist/domains/code-intelligence/plugin.js.map +1 -1
  117. package/v3/dist/domains/code-intelligence/services/product-factors-bridge.d.ts.map +1 -1
  118. package/v3/dist/domains/code-intelligence/services/product-factors-bridge.js +3 -2
  119. package/v3/dist/domains/code-intelligence/services/product-factors-bridge.js.map +1 -1
  120. package/v3/dist/domains/constants.d.ts +481 -0
  121. package/v3/dist/domains/constants.d.ts.map +1 -0
  122. package/v3/dist/domains/constants.js +503 -0
  123. package/v3/dist/domains/constants.js.map +1 -0
  124. package/v3/dist/domains/contract-testing/plugin.d.ts +6 -1
  125. package/v3/dist/domains/contract-testing/plugin.d.ts.map +1 -1
  126. package/v3/dist/domains/contract-testing/plugin.js +80 -1
  127. package/v3/dist/domains/contract-testing/plugin.js.map +1 -1
  128. package/v3/dist/domains/contract-testing/services/contract-validator.d.ts.map +1 -1
  129. package/v3/dist/domains/contract-testing/services/contract-validator.js +5 -4
  130. package/v3/dist/domains/contract-testing/services/contract-validator.js.map +1 -1
  131. package/v3/dist/domains/coverage-analysis/services/hnsw-index.d.ts.map +1 -1
  132. package/v3/dist/domains/coverage-analysis/services/hnsw-index.js +1 -0
  133. package/v3/dist/domains/coverage-analysis/services/hnsw-index.js.map +1 -1
  134. package/v3/dist/domains/defect-intelligence/coordinator.d.ts +2 -2
  135. package/v3/dist/domains/defect-intelligence/coordinator.d.ts.map +1 -1
  136. package/v3/dist/domains/defect-intelligence/coordinator.js.map +1 -1
  137. package/v3/dist/domains/defect-intelligence/plugin.d.ts +6 -1
  138. package/v3/dist/domains/defect-intelligence/plugin.d.ts.map +1 -1
  139. package/v3/dist/domains/defect-intelligence/plugin.js +101 -0
  140. package/v3/dist/domains/defect-intelligence/plugin.js.map +1 -1
  141. package/v3/dist/domains/defect-intelligence/services/defect-predictor.d.ts.map +1 -1
  142. package/v3/dist/domains/defect-intelligence/services/defect-predictor.js +3 -2
  143. package/v3/dist/domains/defect-intelligence/services/defect-predictor.js.map +1 -1
  144. package/v3/dist/domains/domain-interface.d.ts.map +1 -1
  145. package/v3/dist/domains/domain-interface.js +24 -9
  146. package/v3/dist/domains/domain-interface.js.map +1 -1
  147. package/v3/dist/domains/learning-optimization/plugin.d.ts +2 -1
  148. package/v3/dist/domains/learning-optimization/plugin.d.ts.map +1 -1
  149. package/v3/dist/domains/learning-optimization/plugin.js +49 -0
  150. package/v3/dist/domains/learning-optimization/plugin.js.map +1 -1
  151. package/v3/dist/domains/quality-assessment/coordinator.d.ts +90 -1
  152. package/v3/dist/domains/quality-assessment/coordinator.d.ts.map +1 -1
  153. package/v3/dist/domains/quality-assessment/coordinator.js +310 -0
  154. package/v3/dist/domains/quality-assessment/coordinator.js.map +1 -1
  155. package/v3/dist/domains/requirements-validation/index.d.ts +1 -0
  156. package/v3/dist/domains/requirements-validation/index.d.ts.map +1 -1
  157. package/v3/dist/domains/requirements-validation/index.js +2 -0
  158. package/v3/dist/domains/requirements-validation/index.js.map +1 -1
  159. package/v3/dist/domains/requirements-validation/plugin.d.ts +13 -1
  160. package/v3/dist/domains/requirements-validation/plugin.d.ts.map +1 -1
  161. package/v3/dist/domains/requirements-validation/plugin.js +94 -0
  162. package/v3/dist/domains/requirements-validation/plugin.js.map +1 -1
  163. package/v3/dist/domains/requirements-validation/qcsd-ideation-plugin.d.ts +245 -0
  164. package/v3/dist/domains/requirements-validation/qcsd-ideation-plugin.d.ts.map +1 -0
  165. package/v3/dist/domains/requirements-validation/qcsd-ideation-plugin.js +1143 -0
  166. package/v3/dist/domains/requirements-validation/qcsd-ideation-plugin.js.map +1 -0
  167. package/v3/dist/domains/requirements-validation/services/product-factors-assessment/code-intelligence/codebase-analyzer.d.ts.map +1 -1
  168. package/v3/dist/domains/requirements-validation/services/product-factors-assessment/code-intelligence/codebase-analyzer.js +3 -2
  169. package/v3/dist/domains/requirements-validation/services/product-factors-assessment/code-intelligence/codebase-analyzer.js.map +1 -1
  170. package/v3/dist/domains/security-compliance/plugin.d.ts +3 -2
  171. package/v3/dist/domains/security-compliance/plugin.d.ts.map +1 -1
  172. package/v3/dist/domains/security-compliance/plugin.js +64 -0
  173. package/v3/dist/domains/security-compliance/plugin.js.map +1 -1
  174. package/v3/dist/domains/security-compliance/services/scanners/dast-auth-testing.d.ts +25 -0
  175. package/v3/dist/domains/security-compliance/services/scanners/dast-auth-testing.d.ts.map +1 -0
  176. package/v3/dist/domains/security-compliance/services/scanners/dast-auth-testing.js +160 -0
  177. package/v3/dist/domains/security-compliance/services/scanners/dast-auth-testing.js.map +1 -0
  178. package/v3/dist/domains/security-compliance/services/scanners/dast-helpers.d.ts +48 -0
  179. package/v3/dist/domains/security-compliance/services/scanners/dast-helpers.d.ts.map +1 -0
  180. package/v3/dist/domains/security-compliance/services/scanners/dast-helpers.js +385 -0
  181. package/v3/dist/domains/security-compliance/services/scanners/dast-helpers.js.map +1 -0
  182. package/v3/dist/domains/security-compliance/services/scanners/dast-injection-testing.d.ts +20 -0
  183. package/v3/dist/domains/security-compliance/services/scanners/dast-injection-testing.d.ts.map +1 -0
  184. package/v3/dist/domains/security-compliance/services/scanners/dast-injection-testing.js +99 -0
  185. package/v3/dist/domains/security-compliance/services/scanners/dast-injection-testing.js.map +1 -0
  186. package/v3/dist/domains/security-compliance/services/scanners/dast-scanner.d.ts +62 -0
  187. package/v3/dist/domains/security-compliance/services/scanners/dast-scanner.d.ts.map +1 -0
  188. package/v3/dist/domains/security-compliance/services/scanners/dast-scanner.js +329 -0
  189. package/v3/dist/domains/security-compliance/services/scanners/dast-scanner.js.map +1 -0
  190. package/v3/dist/domains/security-compliance/services/scanners/dependency-scanner.d.ts +46 -0
  191. package/v3/dist/domains/security-compliance/services/scanners/dependency-scanner.d.ts.map +1 -0
  192. package/v3/dist/domains/security-compliance/services/scanners/dependency-scanner.js +180 -0
  193. package/v3/dist/domains/security-compliance/services/scanners/dependency-scanner.js.map +1 -0
  194. package/v3/dist/domains/security-compliance/services/scanners/index.d.ts +14 -0
  195. package/v3/dist/domains/security-compliance/services/scanners/index.d.ts.map +1 -0
  196. package/v3/dist/domains/security-compliance/services/scanners/index.js +16 -0
  197. package/v3/dist/domains/security-compliance/services/scanners/index.js.map +1 -0
  198. package/v3/dist/domains/security-compliance/services/scanners/sast-scanner.d.ts +92 -0
  199. package/v3/dist/domains/security-compliance/services/scanners/sast-scanner.d.ts.map +1 -0
  200. package/v3/dist/domains/security-compliance/services/scanners/sast-scanner.js +440 -0
  201. package/v3/dist/domains/security-compliance/services/scanners/sast-scanner.js.map +1 -0
  202. package/v3/dist/domains/security-compliance/services/scanners/scanner-orchestrator.d.ts +78 -0
  203. package/v3/dist/domains/security-compliance/services/scanners/scanner-orchestrator.d.ts.map +1 -0
  204. package/v3/dist/domains/security-compliance/services/scanners/scanner-orchestrator.js +179 -0
  205. package/v3/dist/domains/security-compliance/services/scanners/scanner-orchestrator.js.map +1 -0
  206. package/v3/dist/domains/security-compliance/services/scanners/scanner-types.d.ts +91 -0
  207. package/v3/dist/domains/security-compliance/services/scanners/scanner-types.d.ts.map +1 -0
  208. package/v3/dist/domains/security-compliance/services/scanners/scanner-types.js +15 -0
  209. package/v3/dist/domains/security-compliance/services/scanners/scanner-types.js.map +1 -0
  210. package/v3/dist/domains/security-compliance/services/scanners/security-patterns.d.ts +16 -0
  211. package/v3/dist/domains/security-compliance/services/scanners/security-patterns.d.ts.map +1 -0
  212. package/v3/dist/domains/security-compliance/services/scanners/security-patterns.js +507 -0
  213. package/v3/dist/domains/security-compliance/services/scanners/security-patterns.js.map +1 -0
  214. package/v3/dist/domains/security-compliance/services/security-auditor.d.ts.map +1 -1
  215. package/v3/dist/domains/security-compliance/services/security-auditor.js +2 -1
  216. package/v3/dist/domains/security-compliance/services/security-auditor.js.map +1 -1
  217. package/v3/dist/domains/security-compliance/services/security-scanner.d.ts +20 -213
  218. package/v3/dist/domains/security-compliance/services/security-scanner.d.ts.map +1 -1
  219. package/v3/dist/domains/security-compliance/services/security-scanner.js +37 -2013
  220. package/v3/dist/domains/security-compliance/services/security-scanner.js.map +1 -1
  221. package/v3/dist/domains/security-compliance/services/semgrep-integration.d.ts.map +1 -1
  222. package/v3/dist/domains/security-compliance/services/semgrep-integration.js +7 -6
  223. package/v3/dist/domains/security-compliance/services/semgrep-integration.js.map +1 -1
  224. package/v3/dist/domains/test-execution/services/auth-state-manager.d.ts.map +1 -1
  225. package/v3/dist/domains/test-execution/services/auth-state-manager.js +6 -4
  226. package/v3/dist/domains/test-execution/services/auth-state-manager.js.map +1 -1
  227. package/v3/dist/domains/test-execution/services/e2e/assertion-handlers.d.ts +55 -0
  228. package/v3/dist/domains/test-execution/services/e2e/assertion-handlers.d.ts.map +1 -0
  229. package/v3/dist/domains/test-execution/services/e2e/assertion-handlers.js +407 -0
  230. package/v3/dist/domains/test-execution/services/e2e/assertion-handlers.js.map +1 -0
  231. package/v3/dist/domains/test-execution/services/e2e/browser-orchestrator.d.ts +122 -0
  232. package/v3/dist/domains/test-execution/services/e2e/browser-orchestrator.d.ts.map +1 -0
  233. package/v3/dist/domains/test-execution/services/e2e/browser-orchestrator.js +325 -0
  234. package/v3/dist/domains/test-execution/services/e2e/browser-orchestrator.js.map +1 -0
  235. package/v3/dist/domains/test-execution/services/e2e/e2e-coordinator.d.ts +97 -0
  236. package/v3/dist/domains/test-execution/services/e2e/e2e-coordinator.d.ts.map +1 -0
  237. package/v3/dist/domains/test-execution/services/e2e/e2e-coordinator.js +297 -0
  238. package/v3/dist/domains/test-execution/services/e2e/e2e-coordinator.js.map +1 -0
  239. package/v3/dist/domains/test-execution/services/e2e/index.d.ts +22 -0
  240. package/v3/dist/domains/test-execution/services/e2e/index.d.ts.map +1 -0
  241. package/v3/dist/domains/test-execution/services/e2e/index.js +52 -0
  242. package/v3/dist/domains/test-execution/services/e2e/index.js.map +1 -0
  243. package/v3/dist/domains/test-execution/services/e2e/result-collector.d.ts +51 -0
  244. package/v3/dist/domains/test-execution/services/e2e/result-collector.d.ts.map +1 -0
  245. package/v3/dist/domains/test-execution/services/e2e/result-collector.js +133 -0
  246. package/v3/dist/domains/test-execution/services/e2e/result-collector.js.map +1 -0
  247. package/v3/dist/domains/test-execution/services/e2e/step-executors.d.ts +48 -0
  248. package/v3/dist/domains/test-execution/services/e2e/step-executors.d.ts.map +1 -0
  249. package/v3/dist/domains/test-execution/services/e2e/step-executors.js +422 -0
  250. package/v3/dist/domains/test-execution/services/e2e/step-executors.js.map +1 -0
  251. package/v3/dist/domains/test-execution/services/e2e/step-retry-handler.d.ts +49 -0
  252. package/v3/dist/domains/test-execution/services/e2e/step-retry-handler.d.ts.map +1 -0
  253. package/v3/dist/domains/test-execution/services/e2e/step-retry-handler.js +146 -0
  254. package/v3/dist/domains/test-execution/services/e2e/step-retry-handler.js.map +1 -0
  255. package/v3/dist/domains/test-execution/services/e2e/types.d.ts +138 -0
  256. package/v3/dist/domains/test-execution/services/e2e/types.d.ts.map +1 -0
  257. package/v3/dist/domains/test-execution/services/e2e/types.js +65 -0
  258. package/v3/dist/domains/test-execution/services/e2e/types.js.map +1 -0
  259. package/v3/dist/domains/test-execution/services/e2e/wait-condition-handler.d.ts +33 -0
  260. package/v3/dist/domains/test-execution/services/e2e/wait-condition-handler.d.ts.map +1 -0
  261. package/v3/dist/domains/test-execution/services/e2e/wait-condition-handler.js +114 -0
  262. package/v3/dist/domains/test-execution/services/e2e/wait-condition-handler.js.map +1 -0
  263. package/v3/dist/domains/test-execution/services/e2e-runner.d.ts +18 -392
  264. package/v3/dist/domains/test-execution/services/e2e-runner.d.ts.map +1 -1
  265. package/v3/dist/domains/test-execution/services/e2e-runner.js +25 -1757
  266. package/v3/dist/domains/test-execution/services/e2e-runner.js.map +1 -1
  267. package/v3/dist/domains/test-execution/services/flaky-detector.d.ts.map +1 -1
  268. package/v3/dist/domains/test-execution/services/flaky-detector.js +12 -9
  269. package/v3/dist/domains/test-execution/services/flaky-detector.js.map +1 -1
  270. package/v3/dist/domains/test-execution/services/retry-handler.d.ts.map +1 -1
  271. package/v3/dist/domains/test-execution/services/retry-handler.js +7 -5
  272. package/v3/dist/domains/test-execution/services/retry-handler.js.map +1 -1
  273. package/v3/dist/domains/test-execution/services/test-executor.d.ts.map +1 -1
  274. package/v3/dist/domains/test-execution/services/test-executor.js +4 -3
  275. package/v3/dist/domains/test-execution/services/test-executor.js.map +1 -1
  276. package/v3/dist/domains/visual-accessibility/coordinator.d.ts +70 -0
  277. package/v3/dist/domains/visual-accessibility/coordinator.d.ts.map +1 -1
  278. package/v3/dist/domains/visual-accessibility/coordinator.js +172 -0
  279. package/v3/dist/domains/visual-accessibility/coordinator.js.map +1 -1
  280. package/v3/dist/domains/visual-accessibility/plugin.d.ts +2 -1
  281. package/v3/dist/domains/visual-accessibility/plugin.d.ts.map +1 -1
  282. package/v3/dist/domains/visual-accessibility/plugin.js +63 -0
  283. package/v3/dist/domains/visual-accessibility/plugin.js.map +1 -1
  284. package/v3/dist/domains/visual-accessibility/services/accessibility-tester.d.ts.map +1 -1
  285. package/v3/dist/domains/visual-accessibility/services/accessibility-tester.js +3 -2
  286. package/v3/dist/domains/visual-accessibility/services/accessibility-tester.js.map +1 -1
  287. package/v3/dist/domains/visual-accessibility/services/browser-security-scanner.d.ts.map +1 -1
  288. package/v3/dist/domains/visual-accessibility/services/browser-security-scanner.js +22 -12
  289. package/v3/dist/domains/visual-accessibility/services/browser-security-scanner.js.map +1 -1
  290. package/v3/dist/domains/visual-accessibility/services/viewport-capture.d.ts.map +1 -1
  291. package/v3/dist/domains/visual-accessibility/services/viewport-capture.js +3 -2
  292. package/v3/dist/domains/visual-accessibility/services/viewport-capture.js.map +1 -1
  293. package/v3/dist/domains/visual-accessibility/services/visual-regression.d.ts.map +1 -1
  294. package/v3/dist/domains/visual-accessibility/services/visual-regression.js +3 -2
  295. package/v3/dist/domains/visual-accessibility/services/visual-regression.js.map +1 -1
  296. package/v3/dist/hooks/cross-phase-hooks.d.ts +42 -0
  297. package/v3/dist/hooks/cross-phase-hooks.d.ts.map +1 -0
  298. package/v3/dist/hooks/cross-phase-hooks.js +338 -0
  299. package/v3/dist/hooks/cross-phase-hooks.js.map +1 -0
  300. package/v3/dist/hooks/index.d.ts +9 -0
  301. package/v3/dist/hooks/index.d.ts.map +1 -0
  302. package/v3/dist/hooks/index.js +9 -0
  303. package/v3/dist/hooks/index.js.map +1 -0
  304. package/v3/dist/init/agents-installer.d.ts.map +1 -1
  305. package/v3/dist/init/agents-installer.js +6 -4
  306. package/v3/dist/init/agents-installer.js.map +1 -1
  307. package/v3/dist/init/enhancements/claude-flow-adapter.d.ts.map +1 -1
  308. package/v3/dist/init/enhancements/claude-flow-adapter.js +15 -9
  309. package/v3/dist/init/enhancements/claude-flow-adapter.js.map +1 -1
  310. package/v3/dist/init/enhancements/detector.js +6 -4
  311. package/v3/dist/init/enhancements/detector.js.map +1 -1
  312. package/v3/dist/init/init-wizard.d.ts +5 -0
  313. package/v3/dist/init/init-wizard.d.ts.map +1 -1
  314. package/v3/dist/init/init-wizard.js +77 -14
  315. package/v3/dist/init/init-wizard.js.map +1 -1
  316. package/v3/dist/init/migration/data-migrator.d.ts.map +1 -1
  317. package/v3/dist/init/migration/data-migrator.js +6 -4
  318. package/v3/dist/init/migration/data-migrator.js.map +1 -1
  319. package/v3/dist/init/phases/02-analysis.js +2 -2
  320. package/v3/dist/init/phases/02-analysis.js.map +1 -1
  321. package/v3/dist/init/phases/04-database.d.ts.map +1 -1
  322. package/v3/dist/init/phases/04-database.js +0 -1
  323. package/v3/dist/init/phases/04-database.js.map +1 -1
  324. package/v3/dist/init/phases/05-learning.js +1 -1
  325. package/v3/dist/init/phases/05-learning.js.map +1 -1
  326. package/v3/dist/init/phases/11-claude-md.d.ts.map +1 -1
  327. package/v3/dist/init/phases/11-claude-md.js +25 -0
  328. package/v3/dist/init/phases/11-claude-md.js.map +1 -1
  329. package/v3/dist/init/phases/12-verification.d.ts.map +1 -1
  330. package/v3/dist/init/phases/12-verification.js +2 -1
  331. package/v3/dist/init/phases/12-verification.js.map +1 -1
  332. package/v3/dist/init/project-analyzer.d.ts.map +1 -1
  333. package/v3/dist/init/project-analyzer.js +12 -8
  334. package/v3/dist/init/project-analyzer.js.map +1 -1
  335. package/v3/dist/init/skills-installer.d.ts.map +1 -1
  336. package/v3/dist/init/skills-installer.js +6 -4
  337. package/v3/dist/init/skills-installer.js.map +1 -1
  338. package/v3/dist/init/token-bootstrap.d.ts.map +1 -1
  339. package/v3/dist/init/token-bootstrap.js +2 -1
  340. package/v3/dist/init/token-bootstrap.js.map +1 -1
  341. package/v3/dist/integrations/agent-booster-wasm/index.d.ts.map +1 -1
  342. package/v3/dist/integrations/agent-booster-wasm/index.js +8 -4
  343. package/v3/dist/integrations/agent-booster-wasm/index.js.map +1 -1
  344. package/v3/dist/integrations/agentic-flow/model-router/signal-collector.d.ts.map +1 -1
  345. package/v3/dist/integrations/agentic-flow/model-router/signal-collector.js +3 -2
  346. package/v3/dist/integrations/agentic-flow/model-router/signal-collector.js.map +1 -1
  347. package/v3/dist/integrations/agentic-flow/reasoning-bank/experience-replay.d.ts.map +1 -1
  348. package/v3/dist/integrations/agentic-flow/reasoning-bank/experience-replay.js.map +1 -1
  349. package/v3/dist/integrations/agentic-flow/reasoning-bank/trajectory-tracker.d.ts.map +1 -1
  350. package/v3/dist/integrations/agentic-flow/reasoning-bank/trajectory-tracker.js.map +1 -1
  351. package/v3/dist/integrations/browser/agent-browser/client.d.ts.map +1 -1
  352. package/v3/dist/integrations/browser/agent-browser/client.js +9 -6
  353. package/v3/dist/integrations/browser/agent-browser/client.js.map +1 -1
  354. package/v3/dist/integrations/browser/agent-browser/command-executor.d.ts.map +1 -1
  355. package/v3/dist/integrations/browser/agent-browser/command-executor.js +3 -2
  356. package/v3/dist/integrations/browser/agent-browser/command-executor.js.map +1 -1
  357. package/v3/dist/integrations/browser/index.d.ts +1 -0
  358. package/v3/dist/integrations/browser/index.d.ts.map +1 -1
  359. package/v3/dist/integrations/browser/index.js +6 -0
  360. package/v3/dist/integrations/browser/index.js.map +1 -1
  361. package/v3/dist/integrations/browser/web-content-fetcher.d.ts +154 -0
  362. package/v3/dist/integrations/browser/web-content-fetcher.d.ts.map +1 -0
  363. package/v3/dist/integrations/browser/web-content-fetcher.js +529 -0
  364. package/v3/dist/integrations/browser/web-content-fetcher.js.map +1 -0
  365. package/v3/dist/integrations/coherence/threshold-tuner.d.ts.map +1 -1
  366. package/v3/dist/integrations/coherence/threshold-tuner.js +3 -2
  367. package/v3/dist/integrations/coherence/threshold-tuner.js.map +1 -1
  368. package/v3/dist/integrations/coherence/wasm-loader.d.ts.map +1 -1
  369. package/v3/dist/integrations/coherence/wasm-loader.js +3 -2
  370. package/v3/dist/integrations/coherence/wasm-loader.js.map +1 -1
  371. package/v3/dist/integrations/n8n/agent-factory.d.ts.map +1 -1
  372. package/v3/dist/integrations/n8n/agent-factory.js +6 -4
  373. package/v3/dist/integrations/n8n/agent-factory.js.map +1 -1
  374. package/v3/dist/integrations/rl-suite/persistence/q-value-store.d.ts.map +1 -1
  375. package/v3/dist/integrations/rl-suite/persistence/q-value-store.js.map +1 -1
  376. package/v3/dist/integrations/ruvector/interfaces.js +1 -1
  377. package/v3/dist/integrations/ruvector/interfaces.js.map +1 -1
  378. package/v3/dist/integrations/ruvector/sona-persistence.d.ts.map +1 -1
  379. package/v3/dist/integrations/ruvector/sona-persistence.js +6 -4
  380. package/v3/dist/integrations/ruvector/sona-persistence.js.map +1 -1
  381. package/v3/dist/integrations/vibium/client.d.ts.map +1 -1
  382. package/v3/dist/integrations/vibium/client.js +3 -2
  383. package/v3/dist/integrations/vibium/client.js.map +1 -1
  384. package/v3/dist/kernel/agent-coordinator.d.ts +1 -1
  385. package/v3/dist/kernel/agent-coordinator.d.ts.map +1 -1
  386. package/v3/dist/kernel/agent-coordinator.js +4 -4
  387. package/v3/dist/kernel/agent-coordinator.js.map +1 -1
  388. package/v3/dist/kernel/constants.d.ts +155 -0
  389. package/v3/dist/kernel/constants.d.ts.map +1 -0
  390. package/v3/dist/kernel/constants.js +169 -0
  391. package/v3/dist/kernel/constants.js.map +1 -0
  392. package/v3/dist/kernel/event-bus.d.ts +8 -0
  393. package/v3/dist/kernel/event-bus.d.ts.map +1 -1
  394. package/v3/dist/kernel/event-bus.js +79 -17
  395. package/v3/dist/kernel/event-bus.js.map +1 -1
  396. package/v3/dist/kernel/hybrid-backend.d.ts.map +1 -1
  397. package/v3/dist/kernel/hybrid-backend.js +4 -3
  398. package/v3/dist/kernel/hybrid-backend.js.map +1 -1
  399. package/v3/dist/kernel/index.d.ts +1 -1
  400. package/v3/dist/kernel/index.d.ts.map +1 -1
  401. package/v3/dist/kernel/index.js +3 -1
  402. package/v3/dist/kernel/index.js.map +1 -1
  403. package/v3/dist/kernel/kernel.d.ts.map +1 -1
  404. package/v3/dist/kernel/kernel.js +3 -2
  405. package/v3/dist/kernel/kernel.js.map +1 -1
  406. package/v3/dist/kernel/memory-backend.d.ts.map +1 -1
  407. package/v3/dist/kernel/memory-backend.js +4 -3
  408. package/v3/dist/kernel/memory-backend.js.map +1 -1
  409. package/v3/dist/kernel/unified-memory.d.ts +26 -0
  410. package/v3/dist/kernel/unified-memory.d.ts.map +1 -1
  411. package/v3/dist/kernel/unified-memory.js +68 -13
  412. package/v3/dist/kernel/unified-memory.js.map +1 -1
  413. package/v3/dist/kernel/unified-persistence.js +3 -2
  414. package/v3/dist/kernel/unified-persistence.js.map +1 -1
  415. package/v3/dist/learning/aqe-learning-engine.d.ts.map +1 -1
  416. package/v3/dist/learning/aqe-learning-engine.js +12 -8
  417. package/v3/dist/learning/aqe-learning-engine.js.map +1 -1
  418. package/v3/dist/learning/dream/index.d.ts +1 -1
  419. package/v3/dist/learning/dream/index.d.ts.map +1 -1
  420. package/v3/dist/learning/dream/index.js +3 -1
  421. package/v3/dist/learning/dream/index.js.map +1 -1
  422. package/v3/dist/learning/dream/spreading-activation.d.ts +41 -0
  423. package/v3/dist/learning/dream/spreading-activation.d.ts.map +1 -1
  424. package/v3/dist/learning/dream/spreading-activation.js +79 -0
  425. package/v3/dist/learning/dream/spreading-activation.js.map +1 -1
  426. package/v3/dist/learning/pattern-store.d.ts.map +1 -1
  427. package/v3/dist/learning/pattern-store.js +16 -6
  428. package/v3/dist/learning/pattern-store.js.map +1 -1
  429. package/v3/dist/learning/qe-unified-memory.js +1 -1
  430. package/v3/dist/learning/qe-unified-memory.js.map +1 -1
  431. package/v3/dist/learning/real-embeddings.d.ts.map +1 -1
  432. package/v3/dist/learning/real-embeddings.js +7 -1
  433. package/v3/dist/learning/real-embeddings.js.map +1 -1
  434. package/v3/dist/learning/real-qe-reasoning-bank.js +2 -2
  435. package/v3/dist/learning/real-qe-reasoning-bank.js.map +1 -1
  436. package/v3/dist/learning/sqlite-persistence.d.ts +2 -2
  437. package/v3/dist/learning/sqlite-persistence.d.ts.map +1 -1
  438. package/v3/dist/learning/sqlite-persistence.js +1 -1
  439. package/v3/dist/learning/sqlite-persistence.js.map +1 -1
  440. package/v3/dist/learning/v2-to-v3-migration.d.ts +2 -2
  441. package/v3/dist/learning/v2-to-v3-migration.d.ts.map +1 -1
  442. package/v3/dist/learning/v2-to-v3-migration.js +2 -2
  443. package/v3/dist/learning/v2-to-v3-migration.js.map +1 -1
  444. package/v3/dist/logging/console-logger.d.ts +96 -0
  445. package/v3/dist/logging/console-logger.d.ts.map +1 -0
  446. package/v3/dist/logging/console-logger.js +247 -0
  447. package/v3/dist/logging/console-logger.js.map +1 -0
  448. package/v3/dist/logging/index.d.ts +42 -0
  449. package/v3/dist/logging/index.d.ts.map +1 -0
  450. package/v3/dist/logging/index.js +39 -0
  451. package/v3/dist/logging/index.js.map +1 -0
  452. package/v3/dist/logging/logger-factory.d.ts +145 -0
  453. package/v3/dist/logging/logger-factory.d.ts.map +1 -0
  454. package/v3/dist/logging/logger-factory.js +218 -0
  455. package/v3/dist/logging/logger-factory.js.map +1 -0
  456. package/v3/dist/logging/logger.d.ts +89 -0
  457. package/v3/dist/logging/logger.d.ts.map +1 -0
  458. package/v3/dist/logging/logger.js +74 -0
  459. package/v3/dist/logging/logger.js.map +1 -0
  460. package/v3/dist/mcp/bundle.js +11385 -7526
  461. package/v3/dist/mcp/handlers/agent-handlers.js +2 -2
  462. package/v3/dist/mcp/handlers/agent-handlers.js.map +1 -1
  463. package/v3/dist/mcp/handlers/core-handlers.d.ts +2 -0
  464. package/v3/dist/mcp/handlers/core-handlers.d.ts.map +1 -1
  465. package/v3/dist/mcp/handlers/core-handlers.js +33 -0
  466. package/v3/dist/mcp/handlers/core-handlers.js.map +1 -1
  467. package/v3/dist/mcp/handlers/cross-phase-handlers.d.ts +110 -0
  468. package/v3/dist/mcp/handlers/cross-phase-handlers.d.ts.map +1 -0
  469. package/v3/dist/mcp/handlers/cross-phase-handlers.js +216 -0
  470. package/v3/dist/mcp/handlers/cross-phase-handlers.js.map +1 -0
  471. package/v3/dist/mcp/handlers/domain-handler-configs.d.ts +151 -0
  472. package/v3/dist/mcp/handlers/domain-handler-configs.d.ts.map +1 -0
  473. package/v3/dist/mcp/handlers/domain-handler-configs.js +486 -0
  474. package/v3/dist/mcp/handlers/domain-handler-configs.js.map +1 -0
  475. package/v3/dist/mcp/handlers/domain-handlers.d.ts +174 -120
  476. package/v3/dist/mcp/handlers/domain-handlers.d.ts.map +1 -1
  477. package/v3/dist/mcp/handlers/domain-handlers.js +178 -1049
  478. package/v3/dist/mcp/handlers/domain-handlers.js.map +1 -1
  479. package/v3/dist/mcp/handlers/handler-factory.d.ts +182 -0
  480. package/v3/dist/mcp/handlers/handler-factory.d.ts.map +1 -0
  481. package/v3/dist/mcp/handlers/handler-factory.js +327 -0
  482. package/v3/dist/mcp/handlers/handler-factory.js.map +1 -0
  483. package/v3/dist/mcp/handlers/index.d.ts +1 -0
  484. package/v3/dist/mcp/handlers/index.d.ts.map +1 -1
  485. package/v3/dist/mcp/handlers/index.js +2 -0
  486. package/v3/dist/mcp/handlers/index.js.map +1 -1
  487. package/v3/dist/mcp/handlers/task-handlers.d.ts +1 -0
  488. package/v3/dist/mcp/handlers/task-handlers.d.ts.map +1 -1
  489. package/v3/dist/mcp/handlers/task-handlers.js +91 -7
  490. package/v3/dist/mcp/handlers/task-handlers.js.map +1 -1
  491. package/v3/dist/mcp/server.d.ts.map +1 -1
  492. package/v3/dist/mcp/server.js +107 -1
  493. package/v3/dist/mcp/server.js.map +1 -1
  494. package/v3/dist/mcp/types.d.ts +5 -3
  495. package/v3/dist/mcp/types.d.ts.map +1 -1
  496. package/v3/dist/memory/cross-phase-memory.d.ts +55 -0
  497. package/v3/dist/memory/cross-phase-memory.d.ts.map +1 -0
  498. package/v3/dist/memory/cross-phase-memory.js +265 -0
  499. package/v3/dist/memory/cross-phase-memory.js.map +1 -0
  500. package/v3/dist/memory/index.d.ts +9 -0
  501. package/v3/dist/memory/index.d.ts.map +1 -0
  502. package/v3/dist/memory/index.js +9 -0
  503. package/v3/dist/memory/index.js.map +1 -0
  504. package/v3/dist/shared/io/file-reader.d.ts.map +1 -1
  505. package/v3/dist/shared/io/file-reader.js +3 -2
  506. package/v3/dist/shared/io/file-reader.js.map +1 -1
  507. package/v3/dist/shared/utils/binary-insert.d.ts +85 -0
  508. package/v3/dist/shared/utils/binary-insert.d.ts.map +1 -0
  509. package/v3/dist/shared/utils/binary-insert.js +122 -0
  510. package/v3/dist/shared/utils/binary-insert.js.map +1 -0
  511. package/v3/dist/shared/utils/index.d.ts +1 -0
  512. package/v3/dist/shared/utils/index.d.ts.map +1 -1
  513. package/v3/dist/shared/utils/index.js +1 -0
  514. package/v3/dist/shared/utils/index.js.map +1 -1
  515. package/v3/dist/strange-loop/belief-reconciler.d.ts.map +1 -1
  516. package/v3/dist/strange-loop/belief-reconciler.js +3 -2
  517. package/v3/dist/strange-loop/belief-reconciler.js.map +1 -1
  518. package/v3/dist/sync/claude-flow-bridge.d.ts +1 -1
  519. package/v3/dist/sync/claude-flow-bridge.d.ts.map +1 -1
  520. package/v3/dist/sync/claude-flow-bridge.js +7 -5
  521. package/v3/dist/sync/claude-flow-bridge.js.map +1 -1
  522. package/v3/dist/sync/cloud/postgres-writer.d.ts.map +1 -1
  523. package/v3/dist/sync/cloud/postgres-writer.js +0 -1
  524. package/v3/dist/sync/cloud/postgres-writer.js.map +1 -1
  525. package/v3/dist/sync/interfaces.d.ts +6 -0
  526. package/v3/dist/sync/interfaces.d.ts.map +1 -1
  527. package/v3/dist/sync/interfaces.js +34 -47
  528. package/v3/dist/sync/interfaces.js.map +1 -1
  529. package/v3/dist/sync/readers/sqlite-reader.d.ts +1 -1
  530. package/v3/dist/sync/readers/sqlite-reader.d.ts.map +1 -1
  531. package/v3/dist/sync/readers/sqlite-reader.js +4 -3
  532. package/v3/dist/sync/readers/sqlite-reader.js.map +1 -1
  533. package/v3/dist/test-scheduling/flaky-tracking/flaky-tracker.d.ts.map +1 -1
  534. package/v3/dist/test-scheduling/flaky-tracking/flaky-tracker.js +3 -2
  535. package/v3/dist/test-scheduling/flaky-tracking/flaky-tracker.js.map +1 -1
  536. package/v3/dist/test-scheduling/git-aware/test-selector.d.ts.map +1 -1
  537. package/v3/dist/test-scheduling/git-aware/test-selector.js +3 -2
  538. package/v3/dist/test-scheduling/git-aware/test-selector.js.map +1 -1
  539. package/v3/dist/types/cross-phase-signals.d.ts +119 -0
  540. package/v3/dist/types/cross-phase-signals.d.ts.map +1 -0
  541. package/v3/dist/types/cross-phase-signals.js +33 -0
  542. package/v3/dist/types/cross-phase-signals.js.map +1 -0
  543. package/v3/dist/types/index.d.ts +9 -0
  544. package/v3/dist/types/index.d.ts.map +1 -0
  545. package/v3/dist/types/index.js +9 -0
  546. package/v3/dist/types/index.js.map +1 -0
  547. package/v3/dist/workers/worker-manager.d.ts.map +1 -1
  548. package/v3/dist/workers/worker-manager.js +3 -2
  549. package/v3/dist/workers/worker-manager.js.map +1 -1
  550. package/v3/dist/workflows/browser/workflow-loader.d.ts +3 -3
  551. package/v3/dist/workflows/browser/workflow-loader.d.ts.map +1 -1
  552. package/v3/dist/workflows/browser/workflow-loader.js.map +1 -1
  553. package/v3/package.json +4 -1
@@ -0,0 +1,503 @@
1
+ /**
2
+ * Domain Module Constants
3
+ *
4
+ * Centralizes all magic numbers used across domain coordinators and services.
5
+ * Each domain may have its own specific constants file, but common constants
6
+ * shared across domains are defined here.
7
+ *
8
+ * @see ADR-051: LLM-Powered Analysis
9
+ */
10
+ // ============================================================================
11
+ // Test Execution Constants
12
+ // ============================================================================
13
+ export const TEST_EXECUTION_CONSTANTS = {
14
+ /**
15
+ * Default timeout for test execution in milliseconds.
16
+ * 60 seconds covers most test suites.
17
+ */
18
+ DEFAULT_TEST_TIMEOUT_MS: 60000, // 1 minute
19
+ /**
20
+ * Default timeout for individual test files.
21
+ * 30 seconds per file is reasonable.
22
+ */
23
+ DEFAULT_FILE_TIMEOUT_MS: 30000, // 30 seconds
24
+ /**
25
+ * Default viewport width for E2E tests.
26
+ */
27
+ DEFAULT_VIEWPORT_WIDTH: 1280,
28
+ /**
29
+ * Default viewport height for E2E tests.
30
+ */
31
+ DEFAULT_VIEWPORT_HEIGHT: 720,
32
+ /**
33
+ * Maximum number of test results to retain.
34
+ */
35
+ MAX_RESULTS: 1000,
36
+ /**
37
+ * Retention period for test results.
38
+ * 24 hours of history.
39
+ */
40
+ RESULT_RETENTION_MS: 86400000, // 24 hours
41
+ /**
42
+ * Maximum number of tests to track for flaky detection.
43
+ */
44
+ MAX_TESTS_TRACKED: 10000,
45
+ /**
46
+ * Maximum execution history entries per test.
47
+ */
48
+ MAX_EXECUTION_HISTORY: 100,
49
+ /**
50
+ * Cache TTL for flaky analysis results.
51
+ * 1 hour prevents stale analysis.
52
+ */
53
+ ANALYSIS_CACHE_TTL_MS: 3600000, // 1 hour
54
+ /**
55
+ * Maximum number of retry history entries.
56
+ */
57
+ MAX_RETRY_HISTORY: 50,
58
+ /**
59
+ * Maximum actions to record in user flow.
60
+ */
61
+ MAX_ACTIONS_PER_RECORDING: 1000,
62
+ /**
63
+ * Maximum recording duration.
64
+ * 30 minutes prevents runaway recordings.
65
+ */
66
+ MAX_RECORDING_DURATION_MS: 30 * 60 * 1000, // 30 minutes
67
+ /**
68
+ * Maximum workers for parallel test execution.
69
+ */
70
+ MAX_WORKERS: 32,
71
+ };
72
+ // ============================================================================
73
+ // E2E Testing Constants
74
+ // ============================================================================
75
+ export const E2E_CONSTANTS = {
76
+ /**
77
+ * Default step timeout for E2E tests.
78
+ * 30 seconds per step is reasonable.
79
+ */
80
+ DEFAULT_STEP_TIMEOUT_MS: 30000,
81
+ /**
82
+ * Default retry delay between step attempts.
83
+ */
84
+ RETRY_DELAY_MS: 1000,
85
+ /**
86
+ * Default maximum retries per step.
87
+ */
88
+ DEFAULT_MAX_RETRIES: 3,
89
+ /**
90
+ * Polling interval for element detection.
91
+ */
92
+ POLLING_INTERVAL_MS: 100,
93
+ /**
94
+ * Short timeout for element detection.
95
+ */
96
+ ELEMENT_DETECTION_TIMEOUT_MS: 1000,
97
+ /**
98
+ * Delay after interactions for stability.
99
+ */
100
+ POST_INTERACTION_DELAY_MS: 500,
101
+ /**
102
+ * Default wait time in generated tests.
103
+ */
104
+ DEFAULT_WAIT_MS: 1000,
105
+ /**
106
+ * Accessibility check timeout (longer due to analysis).
107
+ */
108
+ ACCESSIBILITY_TIMEOUT_MS: 60000,
109
+ /**
110
+ * Screenshot quality percentage.
111
+ */
112
+ SCREENSHOT_QUALITY: 80,
113
+ /**
114
+ * Type debounce delay for input fields.
115
+ */
116
+ TYPE_DEBOUNCE_MS: 300,
117
+ };
118
+ // ============================================================================
119
+ // Retry Handler Constants
120
+ // ============================================================================
121
+ export const RETRY_CONSTANTS = {
122
+ /**
123
+ * Base delay for exponential backoff.
124
+ */
125
+ BASE_DELAY_MS: 1000,
126
+ /**
127
+ * Maximum delay cap for exponential backoff.
128
+ */
129
+ MAX_DELAY_MS: 30000,
130
+ /**
131
+ * Default flaky rate simulation.
132
+ * 30% of tests are flaky in simulation mode.
133
+ */
134
+ DEFAULT_FLAKY_RATE: 0.3,
135
+ /**
136
+ * Default pass rate for flaky tests.
137
+ * 70% chance of passing on retry.
138
+ */
139
+ DEFAULT_FLAKY_PASS_RATE: 0.7,
140
+ /**
141
+ * Default retry pass rate variation.
142
+ * +/- 10% variation.
143
+ */
144
+ RETRY_PASS_RATE_VARIATION: 0.1,
145
+ /**
146
+ * Grace period before sending SIGKILL after SIGTERM.
147
+ */
148
+ SIGKILL_GRACE_PERIOD_MS: 1000,
149
+ };
150
+ // ============================================================================
151
+ // Contract Testing Constants
152
+ // ============================================================================
153
+ export const CONTRACT_CONSTANTS = {
154
+ /**
155
+ * Default contract validation timeout.
156
+ */
157
+ DEFAULT_TIMEOUT_MS: 60000, // 1 minute
158
+ /**
159
+ * Short timeout for quick operations.
160
+ */
161
+ QUICK_TIMEOUT_MS: 10000,
162
+ /**
163
+ * Maximum cached contract validations.
164
+ */
165
+ MAX_CACHED_VALIDATIONS: 1000,
166
+ /**
167
+ * Cache TTL for validation results.
168
+ * 1 hour prevents stale validations.
169
+ */
170
+ CACHE_TTL_MS: 3600000, // 1 hour
171
+ /**
172
+ * TTL for stored contracts.
173
+ * 24 hours of retention.
174
+ */
175
+ CONTRACT_TTL_SECONDS: 86400, // 24 hours
176
+ /**
177
+ * TTL for API compatibility migrations.
178
+ * 90 days of retention.
179
+ */
180
+ MIGRATION_TTL_SECONDS: 86400 * 90, // 90 days
181
+ /**
182
+ * Maximum recursion depth for schema validation.
183
+ */
184
+ MAX_RECURSION_DEPTH: 10,
185
+ /**
186
+ * Maximum schema depth for complex contracts.
187
+ */
188
+ MAX_SCHEMA_DEPTH: 20,
189
+ /**
190
+ * Maximum migration steps to generate.
191
+ */
192
+ MAX_MIGRATION_STEPS: 50,
193
+ /**
194
+ * Default search limit for contract queries.
195
+ */
196
+ DEFAULT_SEARCH_LIMIT: 100,
197
+ /**
198
+ * Threshold for high-impact breaking changes.
199
+ */
200
+ HIGH_IMPACT_THRESHOLD: 5,
201
+ /**
202
+ * Threshold for triggering major version bump.
203
+ */
204
+ BREAKING_CHANGE_THRESHOLD: 10,
205
+ /**
206
+ * Default provider load assumption.
207
+ * 50% represents moderate load.
208
+ */
209
+ DEFAULT_PROVIDER_LOAD: 50,
210
+ /**
211
+ * High provider load threshold.
212
+ * Above 80% indicates stress.
213
+ */
214
+ HIGH_PROVIDER_LOAD_THRESHOLD: 80,
215
+ };
216
+ // ============================================================================
217
+ // Quality Assessment Constants
218
+ // ============================================================================
219
+ export const QUALITY_CONSTANTS = {
220
+ /**
221
+ * Minimum passing rate for quality gate.
222
+ * Below 95% triggers warnings.
223
+ */
224
+ PASSING_RATE_WARNING_THRESHOLD: 95,
225
+ /**
226
+ * Critical passing rate threshold.
227
+ * Below 80% is high severity.
228
+ */
229
+ PASSING_RATE_CRITICAL_THRESHOLD: 80,
230
+ /**
231
+ * Minimum coverage for deployment readiness.
232
+ */
233
+ MIN_COVERAGE_FOR_DEPLOY: 80,
234
+ /**
235
+ * Perfect passing rate for deployment.
236
+ */
237
+ PERFECT_PASSING_RATE: 100,
238
+ /**
239
+ * Quality metric retention period.
240
+ * 7 days of history.
241
+ */
242
+ METRIC_TTL_SECONDS: 86400 * 7, // 7 days
243
+ /**
244
+ * Standard metric retention period.
245
+ * 24 hours of detailed data.
246
+ */
247
+ STANDARD_METRIC_TTL_SECONDS: 86400, // 24 hours
248
+ /**
249
+ * Maximum vulnerability impact on score.
250
+ * High vulns capped at 30% impact.
251
+ */
252
+ MAX_HIGH_VULN_IMPACT: 0.3,
253
+ /**
254
+ * Medium vulnerability impact divisor.
255
+ * Medium vulns have 1/20th impact.
256
+ */
257
+ MEDIUM_VULN_IMPACT: 0.1,
258
+ /**
259
+ * Maximum duplication percentage before penalty.
260
+ * Above 20% indicates excessive duplication.
261
+ */
262
+ MAX_DUPLICATION_PERCENT: 20,
263
+ };
264
+ // ============================================================================
265
+ // Security Compliance Constants
266
+ // ============================================================================
267
+ export const SECURITY_CONSTANTS = {
268
+ /**
269
+ * Starting score for security assessment.
270
+ */
271
+ BASE_SECURITY_SCORE: 100,
272
+ /**
273
+ * Target compliance score.
274
+ */
275
+ TARGET_COMPLIANCE_SCORE: 100,
276
+ /**
277
+ * HTTP OK status code.
278
+ */
279
+ HTTP_OK: 200,
280
+ /**
281
+ * HTTP Created status code.
282
+ */
283
+ HTTP_CREATED: 201,
284
+ /**
285
+ * HTTP Unauthorized status code.
286
+ */
287
+ HTTP_UNAUTHORIZED: 401,
288
+ /**
289
+ * HTTP Forbidden status code.
290
+ */
291
+ HTTP_FORBIDDEN: 403,
292
+ /**
293
+ * HTTP Too Many Requests status code.
294
+ */
295
+ HTTP_TOO_MANY_REQUESTS: 429,
296
+ };
297
+ // ============================================================================
298
+ // Visual Accessibility Constants
299
+ // ============================================================================
300
+ export const VISUAL_CONSTANTS = {
301
+ /**
302
+ * Mobile viewport width threshold.
303
+ */
304
+ MOBILE_WIDTH_THRESHOLD: 480,
305
+ /**
306
+ * Small mobile viewport width.
307
+ */
308
+ SMALL_MOBILE_WIDTH: 320,
309
+ /**
310
+ * Tablet viewport width threshold.
311
+ */
312
+ TABLET_WIDTH_THRESHOLD: 768,
313
+ /**
314
+ * Desktop viewport width threshold.
315
+ */
316
+ DESKTOP_WIDTH_THRESHOLD: 1024,
317
+ /**
318
+ * Large desktop viewport width threshold.
319
+ */
320
+ LARGE_DESKTOP_WIDTH_THRESHOLD: 1440,
321
+ /**
322
+ * Starting score for visual tests.
323
+ */
324
+ BASE_VISUAL_SCORE: 100,
325
+ /**
326
+ * Base load time estimate.
327
+ * 800ms baseline for page loads.
328
+ */
329
+ BASE_LOAD_TIME_MS: 800,
330
+ /**
331
+ * Additional load time for long URLs.
332
+ */
333
+ LONG_URL_LOAD_PENALTY_MS: 200,
334
+ /**
335
+ * Additional load time for query parameters.
336
+ */
337
+ QUERY_PARAM_LOAD_PENALTY_MS: 150,
338
+ /**
339
+ * Additional load time for complex pages.
340
+ */
341
+ COMPLEX_PAGE_LOAD_PENALTY_MS: 300,
342
+ /**
343
+ * Load time reduction for API endpoints.
344
+ */
345
+ API_LOAD_BONUS_MS: 200,
346
+ /**
347
+ * Load time reduction for mobile viewports.
348
+ */
349
+ MOBILE_LOAD_BONUS_MS: 100,
350
+ /**
351
+ * Default axe-core timeout.
352
+ */
353
+ AXE_DEFAULT_TIMEOUT_MS: 10000,
354
+ /**
355
+ * Extended axe-core timeout for complex pages.
356
+ */
357
+ AXE_EXTENDED_TIMEOUT_MS: 30000,
358
+ /**
359
+ * Retry delay for visual operations.
360
+ */
361
+ VISUAL_RETRY_DELAY_MS: 200,
362
+ /**
363
+ * Render time variance range.
364
+ */
365
+ RENDER_TIME_VARIANCE_MS: 1000,
366
+ /**
367
+ * Load time variance range.
368
+ */
369
+ LOAD_TIME_VARIANCE_MS: 2000,
370
+ };
371
+ // ============================================================================
372
+ // Chaos Resilience Constants
373
+ // ============================================================================
374
+ export const CHAOS_CONSTANTS = {
375
+ /**
376
+ * Default chunk size for file operations.
377
+ * 1MB chunks for memory testing.
378
+ */
379
+ CHUNK_SIZE_BYTES: 1024 * 1024, // 1MB
380
+ /**
381
+ * Default spike interval for load testing.
382
+ * 30 seconds between spikes.
383
+ */
384
+ SPIKE_INTERVAL_MS: 30000,
385
+ /**
386
+ * Duration of load spikes.
387
+ * 5 seconds of elevated load.
388
+ */
389
+ SPIKE_DURATION_MS: 5000,
390
+ };
391
+ // ============================================================================
392
+ // Test Prioritization Constants
393
+ // ============================================================================
394
+ export const PRIORITIZATION_CONSTANTS = {
395
+ /**
396
+ * Weight for failure probability in prioritization.
397
+ */
398
+ FAILURE_PROBABILITY_WEIGHT: 30,
399
+ /**
400
+ * Weight for flakiness in prioritization.
401
+ */
402
+ FLAKINESS_WEIGHT: 15,
403
+ /**
404
+ * Weight for complexity in prioritization.
405
+ */
406
+ COMPLEXITY_WEIGHT: 10,
407
+ /**
408
+ * Weight for coverage gap in prioritization.
409
+ */
410
+ COVERAGE_GAP_WEIGHT: 20,
411
+ /**
412
+ * Weight for criticality in prioritization.
413
+ */
414
+ CRITICALITY_WEIGHT: 15,
415
+ /**
416
+ * Critical priority score threshold.
417
+ */
418
+ CRITICAL_THRESHOLD: 60,
419
+ /**
420
+ * High priority score threshold.
421
+ */
422
+ HIGH_THRESHOLD: 45,
423
+ /**
424
+ * Standard priority score threshold.
425
+ */
426
+ STANDARD_THRESHOLD: 30,
427
+ /**
428
+ * Low priority score threshold.
429
+ */
430
+ LOW_THRESHOLD: 15,
431
+ /**
432
+ * Priority score mapping.
433
+ */
434
+ PRIORITY_SCORES: {
435
+ critical: 100,
436
+ high: 75,
437
+ standard: 50,
438
+ low: 25,
439
+ },
440
+ /**
441
+ * Recent history window for analysis.
442
+ */
443
+ RECENT_HISTORY_SIZE: 10,
444
+ /**
445
+ * Sample confidence baseline.
446
+ * Confidence reaches 1.0 at 20 samples.
447
+ */
448
+ SAMPLE_CONFIDENCE_BASELINE: 20,
449
+ };
450
+ // ============================================================================
451
+ // Risk Assessment Constants
452
+ // ============================================================================
453
+ export const RISK_CONSTANTS = {
454
+ /**
455
+ * Maximum test duration for scoring.
456
+ * 1 minute as baseline.
457
+ */
458
+ MAX_DURATION_MS: 60000,
459
+ /**
460
+ * Maximum test age for scoring.
461
+ * 1 week as baseline.
462
+ */
463
+ MAX_AGE_MS: 7 * 24 * 60 * 60 * 1000, // 1 week
464
+ /**
465
+ * One year in days for age calculations.
466
+ */
467
+ DAYS_IN_YEAR: 365,
468
+ /**
469
+ * Maximum dependency count for complexity scoring.
470
+ */
471
+ MAX_DEPENDENCY_COUNT: 10,
472
+ };
473
+ // ============================================================================
474
+ // LLM Analysis Constants (ADR-051)
475
+ // ============================================================================
476
+ export const LLM_ANALYSIS_CONSTANTS = {
477
+ /**
478
+ * Maximum tokens for LLM responses.
479
+ */
480
+ MAX_TOKENS: 2048,
481
+ /**
482
+ * Truncation length for error messages.
483
+ */
484
+ ERROR_TRUNCATION_LENGTH: 200,
485
+ /**
486
+ * Truncation length for stdout/stderr.
487
+ */
488
+ OUTPUT_TRUNCATION_LENGTH: 500,
489
+ /**
490
+ * Truncation length for detailed output.
491
+ */
492
+ DETAILED_OUTPUT_TRUNCATION_LENGTH: 1000,
493
+ /**
494
+ * Model tier mapping.
495
+ */
496
+ MODEL_TIERS: {
497
+ 1: 'claude-3-haiku-20240307',
498
+ 2: 'claude-sonnet-4-20250514',
499
+ 3: 'claude-sonnet-4-20250514',
500
+ 4: 'claude-opus-4-20250514',
501
+ },
502
+ };
503
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/domains/constants.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,UAAU,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,SAAS;IAE9C;;OAEG;IACH,YAAY,EAAE,GAAG;IAEjB;;OAEG;IACH,oBAAoB,EAAE,EAAE;CAChB,CAAC;AAEX,+EAA+E;AAC/E,mCAAmC;AACnC,+EAA+E;AAE/E,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC;;OAEG;IACH,UAAU,EAAE,IAAI;IAEhB;;OAEG;IACH,uBAAuB,EAAE,GAAG;IAE5B;;OAEG;IACH,wBAAwB,EAAE,GAAG;IAE7B;;OAEG;IACH,iCAAiC,EAAE,IAAI;IAEvC;;OAEG;IACH,WAAW,EAAE;QACX,CAAC,EAAE,yBAAyB;QAC5B,CAAC,EAAE,0BAA0B;QAC7B,CAAC,EAAE,0BAA0B;QAC7B,CAAC,EAAE,wBAAwB;KACnB;CACF,CAAC"}
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import { DomainName, DomainEvent, Result } from '../../shared/types/index.js';
6
6
  import type { EventBus, MemoryBackend, AgentCoordinator } from '../../kernel/interfaces.js';
7
- import { BaseDomainPlugin } from '../domain-interface.js';
7
+ import { BaseDomainPlugin, TaskHandler } from '../domain-interface.js';
8
8
  import { FilePath } from '../../shared/value-objects/index.js';
9
9
  import type { ApiContract, ProviderVerificationReport, PreReleaseReport, ValidationReport, SchemaValidationResult, OpenAPIValidationResult, CompatibilityReport, BreakingChange, MigrationGuide, SchemaDefinition, GraphQLValidationResult, SchemaComparisonResult, IContractValidationService, IApiCompatibilityService, ISchemaValidationService } from './interfaces.js';
10
10
  import { ContractTestingCoordinator, CoordinatorConfig, WorkflowStatus } from './coordinator.js';
@@ -56,6 +56,10 @@ export interface ContractTestingExtendedAPI extends ContractTestingAPI {
56
56
  getSchemaValidator(): ISchemaValidationService;
57
57
  /** Get active workflows */
58
58
  getActiveWorkflows(): WorkflowStatus[];
59
+ /** Check compatibility (alias for isBackwardCompatible) */
60
+ checkCompatibility(oldContract: ApiContract, newContract: ApiContract): Promise<Result<boolean>>;
61
+ /** Generate contract (alias for inferSchema) */
62
+ generateContract(samples: unknown[]): Promise<Result<SchemaDefinition>>;
59
63
  }
60
64
  /**
61
65
  * Contract Testing Domain Plugin
@@ -76,6 +80,7 @@ export declare class ContractTestingPlugin extends BaseDomainPlugin {
76
80
  * Get the domain's public API
77
81
  */
78
82
  getAPI<T>(): T;
83
+ protected getTaskHandlers(): Map<string, TaskHandler>;
79
84
  protected onInitialize(): Promise<void>;
80
85
  protected onDispose(): Promise<void>;
81
86
  protected subscribeToEvents(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../src/domains/contract-testing/plugin.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAC9E,OAAO,KAAK,EACV,QAAQ,EACR,aAAa,EACb,gBAAgB,EACjB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAC/D,OAAO,KAAK,EACV,WAAW,EACX,0BAA0B,EAC1B,gBAAgB,EAChB,gBAAgB,EAChB,sBAAsB,EACtB,uBAAuB,EACvB,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,uBAAuB,EACvB,sBAAsB,EACtB,0BAA0B,EAC1B,wBAAwB,EACxB,wBAAwB,EACzB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,0BAA0B,EAC1B,iBAAiB,EACjB,cAAc,EACf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAEL,uBAAuB,EACxB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAEL,sBAAsB,EACvB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAEL,qBAAqB,EACtB,MAAM,gCAAgC,C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AAE,aAAa,EACrB,gBAAgB,EAAE,gBAAgB,EAClC,MAAM,CAAC,EAAE,2BAA2B,GACnC,qBAAqB,CAEvB"}
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../src/domains/contract-testing/plugin.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,EAAO,MAAM,6BAA6B,CAAC;AACnF,OAAO,KAAK,EACV,QAAQ,EACR,aAAa,EACb,gBAAgB,EACjB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACvE,OAAO,EAAE,QAAQ,EAAW,MAAM,qCAAqC,CAAC;AACxE,OAAO,KAAK,EACV,WAAW,EACX,0BAA0B,EAC1B,gBAAgB,EAChB,gBAAgB,EAChB,sBAAsB,EACtB,uBAAuB,EACvB,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,uBAAuB,EACvB,sBAAsB,EACtB,0BAA0B,EAC1B,wBAAwB,EACxB,wBAAwB,EACzB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,0BAA0B,EAC1B,iBAAiB,EACjB,cAAc,EACf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAEL,uBAAuB,EACxB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAEL,sBAAsB,EACvB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAEL,qBAAqB,EACtB,MAAM,gCAAgC,CAAC;AAExC;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,WAAW,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC;IACzC,iBAAiB,CAAC,EAAE,OAAO,CAAC,uBAAuB,CAAC,CAAC;IACrD,gBAAgB,CAAC,EAAE,OAAO,CAAC,sBAAsB,CAAC,CAAC;IACnD,eAAe,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC,CAAC;CAClD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EAAE,QAAQ,EAClB,MAAM,EAAE,aAAa,EACrB,gBAAgB,EAAE,gBAAgB,EAClC,MAAM,CAAC,EAAE,2BAA2B,GACnC,qBAAqB,CAEvB"}
@@ -2,8 +2,9 @@
2
2
  * Agentic QE v3 - Contract Testing Domain Plugin
3
3
  * Integrates the contract testing domain into the kernel
4
4
  */
5
+ import { err } from '../../shared/types/index.js';
5
6
  import { BaseDomainPlugin } from '../domain-interface.js';
6
- import { FilePath } from '../../shared/value-objects/index.js';
7
+ import { FilePath, Version } from '../../shared/value-objects/index.js';
7
8
  import { ContractTestingCoordinator, } from './coordinator.js';
8
9
  import { ContractValidatorService, } from './services/contract-validator.js';
9
10
  import { ApiCompatibilityService, } from './services/api-compatibility.js';
@@ -56,6 +57,7 @@ export class ContractTestingPlugin extends BaseDomainPlugin {
56
57
  // API Compatibility (service methods)
57
58
  compareVersions: this.compareVersions.bind(this),
58
59
  isBackwardCompatible: this.isBackwardCompatible.bind(this),
60
+ checkCompatibility: this.isBackwardCompatible.bind(this), // Alias for compatibility
59
61
  getBreakingChanges: this.getBreakingChanges.bind(this),
60
62
  generateMigrationGuide: this.generateMigrationGuide.bind(this),
61
63
  // Schema Validation (service methods)
@@ -63,6 +65,7 @@ export class ContractTestingPlugin extends BaseDomainPlugin {
63
65
  validateGraphQLSchema: this.validateGraphQLSchema.bind(this),
64
66
  compareSchemas: this.compareSchemas.bind(this),
65
67
  inferSchema: this.inferSchema.bind(this),
68
+ generateContract: this.inferSchema.bind(this), // Alias for contract generation
66
69
  // Internal access methods
67
70
  getCoordinator: () => this.coordinator,
68
71
  getContractValidator: () => this.contractValidator,
@@ -73,6 +76,82 @@ export class ContractTestingPlugin extends BaseDomainPlugin {
73
76
  return api;
74
77
  }
75
78
  // ============================================================================
79
+ // Task Handlers (Queen-Domain Integration)
80
+ // ============================================================================
81
+ getTaskHandlers() {
82
+ return new Map([
83
+ ['validate-contract', async (payload) => {
84
+ if (!this.contractValidator) {
85
+ return err(new Error('Contract validator not initialized'));
86
+ }
87
+ const contract = payload.contract;
88
+ if (!contract) {
89
+ return err(new Error('Invalid validate-contract payload: missing contract'));
90
+ }
91
+ return this.contractValidator.validateContract(contract);
92
+ }],
93
+ ['compare-versions', async (payload) => {
94
+ if (!this.apiCompatibility) {
95
+ return err(new Error('API compatibility service not initialized'));
96
+ }
97
+ // Support both contract objects and version strings
98
+ const oldVersion = payload.oldVersion;
99
+ const newVersion = payload.newVersion;
100
+ const oldContract = payload.oldContract;
101
+ const newContract = payload.newContract;
102
+ if (oldContract && newContract) {
103
+ return this.apiCompatibility.compareVersions(oldContract, newContract);
104
+ }
105
+ if (!oldVersion || !newVersion) {
106
+ return err(new Error('Invalid compare-versions payload: missing oldVersion or newVersion'));
107
+ }
108
+ // Version strings provided - compare them directly
109
+ // Return a comparison result based on semver comparison
110
+ try {
111
+ const parsedOld = Version.parse(oldVersion);
112
+ const parsedNew = Version.parse(newVersion);
113
+ const comparison = parsedNew.isNewerThan(parsedOld) ? 1 : parsedNew.equals(parsedOld) ? 0 : -1;
114
+ return { success: true, value: { oldVersion, newVersion, comparison } };
115
+ }
116
+ catch (error) {
117
+ return err(error instanceof Error ? error : new Error(String(error)));
118
+ }
119
+ }],
120
+ ['check-compatibility', async (payload) => {
121
+ if (!this.apiCompatibility) {
122
+ return err(new Error('API compatibility service not initialized'));
123
+ }
124
+ const provider = payload.provider;
125
+ const consumer = payload.consumer;
126
+ const contract = payload.contract;
127
+ const baselineContract = payload.baselineContract;
128
+ if (contract && baselineContract) {
129
+ return this.apiCompatibility.isBackwardCompatible(baselineContract, contract);
130
+ }
131
+ if (!provider || !consumer) {
132
+ return err(new Error('Invalid check-compatibility payload: missing provider or consumer'));
133
+ }
134
+ // For provider/consumer strings, return a placeholder compatibility check
135
+ // Real implementation would look up contracts by service name
136
+ return { success: true, value: { provider, consumer, compatible: true } };
137
+ }],
138
+ ['generate-contract', async (payload) => {
139
+ if (!this.schemaValidator) {
140
+ return err(new Error('Schema validator not initialized'));
141
+ }
142
+ const serviceSpec = payload.serviceSpec;
143
+ const samples = payload.samples;
144
+ if (samples && samples.length > 0) {
145
+ return this.schemaValidator.inferSchema(samples);
146
+ }
147
+ if (!serviceSpec) {
148
+ return err(new Error('Invalid generate-contract payload: missing serviceSpec'));
149
+ }
150
+ return this.schemaValidator.inferSchema([serviceSpec]);
151
+ }],
152
+ ]);
153
+ }
154
+ // ============================================================================
76
155
  // Lifecycle Methods
77
156
  // ============================================================================
78
157
  async onInitialize() {