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,422 @@
1
+ /**
2
+ * Agentic QE v3 - Step Executors
3
+ *
4
+ * Individual step execution logic for each E2E step type.
5
+ * Supports both agent-browser and Vibium browser clients.
6
+ * Assertion logic is delegated to assertion-handlers.ts.
7
+ *
8
+ * @module test-execution/services/e2e/step-executors
9
+ */
10
+ import { isNavigateStep, isClickStep, isTypeStep, isWaitStep, isAssertStep, isScreenshotStep, isA11yCheckStep, } from '../../types';
11
+ import { E2ERunnerError, AssertionError } from './types';
12
+ import { isAgentBrowserClient, isVibiumClient, toElementTarget, toVibiumScreenshotResult, toVibiumAccessibilityResult, } from './browser-orchestrator';
13
+ import { createAssertionHandlers } from './assertion-handlers';
14
+ import { createWaitConditionHandler } from './wait-condition-handler';
15
+ // ============================================================================
16
+ // Step Executor Class
17
+ // ============================================================================
18
+ /**
19
+ * Step Executors
20
+ *
21
+ * Handles execution of individual E2E test steps.
22
+ * Delegates to appropriate methods based on step type and browser client.
23
+ */
24
+ export class StepExecutors {
25
+ config;
26
+ orchestrator;
27
+ assertionHandlers;
28
+ waitConditionHandler;
29
+ log;
30
+ constructor(config, orchestrator, logger) {
31
+ this.config = config;
32
+ this.orchestrator = orchestrator;
33
+ this.assertionHandlers = createAssertionHandlers(orchestrator, logger);
34
+ this.waitConditionHandler = createWaitConditionHandler(orchestrator);
35
+ this.log = logger;
36
+ }
37
+ /**
38
+ * Execute a single step based on its type
39
+ */
40
+ async executeStep(step, context) {
41
+ const client = this.orchestrator.getClient();
42
+ if (isNavigateStep(step)) {
43
+ return this.executeNavigateStep(step, client, context);
44
+ }
45
+ else if (isClickStep(step)) {
46
+ return this.executeClickStep(step, client, context);
47
+ }
48
+ else if (isTypeStep(step)) {
49
+ return this.executeTypeStep(step, client, context);
50
+ }
51
+ else if (isWaitStep(step)) {
52
+ return this.executeWaitStep(step, client, context);
53
+ }
54
+ else if (isAssertStep(step)) {
55
+ return this.executeAssertStep(step, client, context);
56
+ }
57
+ else if (isScreenshotStep(step)) {
58
+ return this.executeScreenshotStep(step, client, context);
59
+ }
60
+ else if (isA11yCheckStep(step)) {
61
+ return this.executeA11yCheckStep(step, client, context);
62
+ }
63
+ const unknownStep = step;
64
+ throw new E2ERunnerError(`Unknown step type: ${unknownStep.type}`, 'UNKNOWN_STEP_TYPE', unknownStep.id);
65
+ }
66
+ /**
67
+ * Refresh snapshot after actions (agent-browser only)
68
+ */
69
+ async refreshSnapshotIfNeeded(context) {
70
+ if (context.useAgentBrowser) {
71
+ context.currentSnapshot = await this.orchestrator.refreshSnapshot();
72
+ }
73
+ }
74
+ // ==========================================================================
75
+ // Navigate Step
76
+ // ==========================================================================
77
+ async executeNavigateStep(step, client, context) {
78
+ const url = this.resolveUrl(step.target, context.baseUrl);
79
+ if (!isVibiumClient(client)) {
80
+ const browserClient = client;
81
+ const result = await browserClient.navigate(url);
82
+ if (!result.success) {
83
+ throw result.error;
84
+ }
85
+ await this.refreshSnapshotIfNeeded(context);
86
+ return {
87
+ data: {
88
+ url: result.value.url,
89
+ title: result.value.title,
90
+ },
91
+ };
92
+ }
93
+ const vibiumClient = client;
94
+ const result = await vibiumClient.navigate({
95
+ url,
96
+ waitUntil: step.options?.waitUntil ?? 'load',
97
+ timeout: step.timeout ?? this.config.defaultStepTimeout,
98
+ });
99
+ if (!result.success) {
100
+ throw result.error;
101
+ }
102
+ return {
103
+ data: {
104
+ url: result.value.url,
105
+ title: result.value.title,
106
+ },
107
+ };
108
+ }
109
+ // ==========================================================================
110
+ // Click Step
111
+ // ==========================================================================
112
+ async executeClickStep(step, client, context) {
113
+ if (!isVibiumClient(client)) {
114
+ const browserClient = client;
115
+ const target = toElementTarget(step.target);
116
+ if (context.useAgentBrowser && isAgentBrowserClient(browserClient)) {
117
+ const waitResult = await browserClient.waitForElement(target, step.timeout);
118
+ if (!waitResult.success) {
119
+ throw waitResult.error;
120
+ }
121
+ }
122
+ const result = await browserClient.click(target);
123
+ if (!result.success) {
124
+ throw result.error;
125
+ }
126
+ await this.refreshSnapshotIfNeeded(context);
127
+ if (step.options?.waitForNavigation && isAgentBrowserClient(browserClient)) {
128
+ await browserClient.waitForNetworkIdle(step.timeout);
129
+ }
130
+ return { data: {} };
131
+ }
132
+ const vibiumClient = client;
133
+ if (step.options?.scrollIntoView) {
134
+ await this.orchestrator.scrollIntoView(step.target);
135
+ }
136
+ if (step.options?.hoverFirst) {
137
+ const findResult = await vibiumClient.findElement({ selector: step.target });
138
+ if (!findResult.success) {
139
+ throw findResult.error;
140
+ }
141
+ }
142
+ const result = await vibiumClient.click({
143
+ selector: step.target,
144
+ button: step.options?.button,
145
+ clickCount: step.options?.clickCount,
146
+ delay: step.options?.delay,
147
+ position: step.options?.position,
148
+ modifiers: step.options?.modifiers,
149
+ force: step.options?.force,
150
+ timeout: step.timeout ?? this.config.defaultStepTimeout,
151
+ });
152
+ if (!result.success) {
153
+ throw result.error;
154
+ }
155
+ if (step.options?.waitForNavigation) {
156
+ await this.delay(500);
157
+ const pageInfo = await vibiumClient.getPageInfo();
158
+ if (pageInfo.success) {
159
+ return {
160
+ data: {
161
+ url: pageInfo.value.url,
162
+ },
163
+ };
164
+ }
165
+ }
166
+ return {
167
+ data: {
168
+ elementText: result.value.element?.textContent,
169
+ },
170
+ };
171
+ }
172
+ // ==========================================================================
173
+ // Type Step
174
+ // ==========================================================================
175
+ async executeTypeStep(step, client, context) {
176
+ if (!isVibiumClient(client)) {
177
+ const browserClient = client;
178
+ const target = toElementTarget(step.target);
179
+ if (context.useAgentBrowser && isAgentBrowserClient(browserClient)) {
180
+ const waitResult = await browserClient.waitForElement(target, step.timeout);
181
+ if (!waitResult.success) {
182
+ throw waitResult.error;
183
+ }
184
+ }
185
+ const result = await browserClient.fill(target, step.value);
186
+ if (!result.success) {
187
+ throw result.error;
188
+ }
189
+ await this.refreshSnapshotIfNeeded(context);
190
+ return {
191
+ data: {
192
+ elementText: step.options?.sensitive ? '[MASKED]' : step.value,
193
+ },
194
+ };
195
+ }
196
+ const vibiumClient = client;
197
+ const result = await vibiumClient.type({
198
+ selector: step.target,
199
+ text: step.value,
200
+ delay: step.options?.delay,
201
+ clear: step.options?.clear,
202
+ pressEnter: step.options?.pressEnter,
203
+ timeout: step.timeout ?? this.config.defaultStepTimeout,
204
+ });
205
+ if (!result.success) {
206
+ throw result.error;
207
+ }
208
+ return {
209
+ data: {
210
+ elementText: step.options?.sensitive ? '[MASKED]' : step.value,
211
+ },
212
+ };
213
+ }
214
+ // ==========================================================================
215
+ // Wait Step
216
+ // ==========================================================================
217
+ async executeWaitStep(step, client, context) {
218
+ const timeout = step.timeout ?? this.config.defaultStepTimeout;
219
+ const pollingInterval = step.options.pollingInterval ?? this.config.pollingInterval;
220
+ if (!isVibiumClient(client) && isAgentBrowserClient(client)) {
221
+ const browserClient = client;
222
+ let waitResult;
223
+ switch (step.options.condition) {
224
+ case 'element-visible':
225
+ case 'element-hidden':
226
+ if (step.target) {
227
+ waitResult = await browserClient.waitForElement(toElementTarget(step.target), timeout);
228
+ }
229
+ break;
230
+ case 'element-text':
231
+ if (step.options.expectedText) {
232
+ waitResult = await browserClient.waitForText(step.options.expectedText, timeout);
233
+ }
234
+ break;
235
+ case 'url-match':
236
+ if (step.options.urlPattern) {
237
+ const pattern = typeof step.options.urlPattern === 'string'
238
+ ? step.options.urlPattern
239
+ : step.options.urlPattern.source;
240
+ waitResult = await browserClient.waitForUrl(pattern, timeout);
241
+ }
242
+ break;
243
+ case 'network-idle':
244
+ case 'page-loaded':
245
+ case 'dom-loaded':
246
+ waitResult = await browserClient.waitForNetworkIdle(timeout);
247
+ break;
248
+ default:
249
+ break;
250
+ }
251
+ if (waitResult && !waitResult.success) {
252
+ throw waitResult.error;
253
+ }
254
+ context.currentSnapshot = await this.orchestrator.refreshSnapshot();
255
+ return { data: {} };
256
+ }
257
+ if (!isVibiumClient(client)) {
258
+ await this.delay(pollingInterval);
259
+ return { data: {} };
260
+ }
261
+ const waitData = await this.waitConditionHandler.waitForCondition(step.options.condition, client, step, timeout, pollingInterval);
262
+ return { data: waitData };
263
+ }
264
+ // ==========================================================================
265
+ // Assert Step
266
+ // ==========================================================================
267
+ async executeAssertStep(step, client, context) {
268
+ if (!isVibiumClient(client)) {
269
+ const browserClient = client;
270
+ const assertResult = await this.assertionHandlers.performUnifiedAssertion(step.options.assertion, browserClient, step, context);
271
+ return {
272
+ data: {
273
+ actualValue: assertResult.actual,
274
+ expectedValue: assertResult.expected,
275
+ },
276
+ };
277
+ }
278
+ const vibiumClient = client;
279
+ const assertResult = await this.assertionHandlers.performVibiumAssertion(step.options.assertion, vibiumClient, step);
280
+ return {
281
+ data: {
282
+ actualValue: assertResult.actual,
283
+ expectedValue: assertResult.expected,
284
+ },
285
+ };
286
+ }
287
+ // ==========================================================================
288
+ // Screenshot Step
289
+ // ==========================================================================
290
+ async executeScreenshotStep(step, client, _context) {
291
+ if (!isVibiumClient(client)) {
292
+ const browserClient = client;
293
+ const result = await browserClient.screenshot({
294
+ path: step.target,
295
+ fullPage: step.options?.fullPage,
296
+ });
297
+ if (!result.success) {
298
+ throw result.error;
299
+ }
300
+ const screenshotResult = toVibiumScreenshotResult(result.value);
301
+ return {
302
+ screenshot: screenshotResult,
303
+ data: {
304
+ url: result.value.path,
305
+ },
306
+ };
307
+ }
308
+ const vibiumClient = client;
309
+ const result = await vibiumClient.screenshot({
310
+ selector: step.target,
311
+ fullPage: step.options?.fullPage,
312
+ format: step.options?.format,
313
+ quality: step.options?.quality,
314
+ omitBackground: step.options?.omitBackground,
315
+ });
316
+ if (!result.success) {
317
+ throw result.error;
318
+ }
319
+ return {
320
+ screenshot: result.value,
321
+ data: {
322
+ url: result.value.path,
323
+ },
324
+ };
325
+ }
326
+ // ==========================================================================
327
+ // Accessibility Check Step
328
+ // ==========================================================================
329
+ async executeA11yCheckStep(step, client, _context) {
330
+ if (!isVibiumClient(client)) {
331
+ const browserClient = client;
332
+ const axeScript = `
333
+ (async () => {
334
+ if (!window.axe) {
335
+ const script = document.createElement('script');
336
+ script.src = 'https://cdnjs.cloudflare.com/ajax/libs/axe-core/4.7.2/axe.min.js';
337
+ document.head.appendChild(script);
338
+ await new Promise(resolve => script.onload = resolve);
339
+ }
340
+ const results = await axe.run(${step.target ? `'${step.target}'` : 'document'}, {
341
+ runOnly: ${JSON.stringify(step.options?.tags ?? ['wcag2a', 'wcag2aa'])},
342
+ });
343
+ return JSON.stringify(results);
344
+ })()
345
+ `;
346
+ const evalResult = await browserClient.evaluate(axeScript);
347
+ if (!evalResult.success) {
348
+ throw evalResult.error;
349
+ }
350
+ const axeResults = JSON.parse(evalResult.value);
351
+ const a11yResult = toVibiumAccessibilityResult(axeResults);
352
+ if (step.options?.failOnSeverity) {
353
+ const severityOrder = {
354
+ critical: 0,
355
+ high: 1,
356
+ medium: 2,
357
+ low: 3,
358
+ info: 4,
359
+ };
360
+ const threshold = severityOrder[step.options.failOnSeverity];
361
+ const violationsOverThreshold = axeResults.violations.filter((v) => severityOrder[v.impact] <= threshold);
362
+ if (violationsOverThreshold.length > 0) {
363
+ throw new AssertionError(`Accessibility violations found: ${violationsOverThreshold.length} at or above ${step.options.failOnSeverity}`, step.id, 0, violationsOverThreshold.length);
364
+ }
365
+ }
366
+ return { accessibilityResult: a11yResult };
367
+ }
368
+ const vibiumClient = client;
369
+ const result = await vibiumClient.checkAccessibility({
370
+ selector: step.target,
371
+ wcagLevel: step.options?.wcagLevel ?? 'AA',
372
+ rules: step.options?.rules
373
+ ? {
374
+ include: step.options.tags,
375
+ exclude: step.options.context?.exclude,
376
+ }
377
+ : undefined,
378
+ });
379
+ if (!result.success) {
380
+ throw result.error;
381
+ }
382
+ const a11yResult = result.value;
383
+ if (step.options?.failOnSeverity) {
384
+ const severityOrder = {
385
+ critical: 0,
386
+ high: 1,
387
+ medium: 2,
388
+ low: 3,
389
+ info: 4,
390
+ };
391
+ const threshold = severityOrder[step.options.failOnSeverity];
392
+ const violations = a11yResult.violations.filter((v) => severityOrder[v.impact] <= threshold);
393
+ if (violations.length > 0) {
394
+ throw new AssertionError(`Accessibility violations found: ${violations.length} violations at or above ${step.options.failOnSeverity} severity`, step.id, 0, violations.length);
395
+ }
396
+ }
397
+ if (step.options?.maxViolations !== undefined &&
398
+ a11yResult.violations.length > step.options.maxViolations) {
399
+ throw new AssertionError(`Too many accessibility violations: ${a11yResult.violations.length} (max: ${step.options.maxViolations})`, step.id, step.options.maxViolations, a11yResult.violations.length);
400
+ }
401
+ return { accessibilityResult: a11yResult };
402
+ }
403
+ // ==========================================================================
404
+ // Utility Methods
405
+ // ==========================================================================
406
+ resolveUrl(url, baseUrl) {
407
+ if (url.startsWith('http://') || url.startsWith('https://')) {
408
+ return url;
409
+ }
410
+ return new URL(url, baseUrl).toString();
411
+ }
412
+ delay(ms) {
413
+ return new Promise((resolve) => setTimeout(resolve, ms));
414
+ }
415
+ }
416
+ /**
417
+ * Create step executors instance
418
+ */
419
+ export function createStepExecutors(config, orchestrator, logger) {
420
+ return new StepExecutors(config, orchestrator, logger);
421
+ }
422
+ //# sourceMappingURL=step-executors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"step-executors.js","sourceRoot":"","sources":["../../../../../src/domains/test-execution/services/e2e/step-executors.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAWL,cAAc,EACd,WAAW,EACX,UAAU,EACV,UAAU,EACV,YAAY,EACZ,gBAAgB,EAChB,eAAe,GAChB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACzD,OAAO,EACL,oBAAoB,EACpB,cAAc,EACd,eAAe,EACf,wBAAwB,EACxB,2BAA2B,GAE5B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAqB,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAClF,OAAO,EAAwB,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AAE5F,+EAA+E;AAC/E,sBAAsB;AACtB,+EAA+E;AAE/E;;;;;GAKG;AACH,MAAM,OAAO,aAAa;IACP,MAAM,CAAkB;IACxB,YAAY,CAAsB;IAClC,iBAAiB,CAAoB;IACrC,oBAAoB,CAAuB;IAC3C,GAAG,CAA4B;IAEhD,YACE,MAAuB,EACvB,YAAiC,EACjC,MAAiC;QAEjC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,iBAAiB,GAAG,uBAAuB,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;QACvE,IAAI,CA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EG;AACH,MAAM,UAAU,mBAAmB,CACjC,MAAuB,EACvB,YAAiC,EACjC,MAAiC;IAEjC,OAAO,IAAI,aAAa,CAAC,MAAM,EAAE,YAAY,EAAE,MAAM,CAAC,CAAC;AACzD,CAAC"}
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Agentic QE v3 - Step Retry Handler
3
+ *
4
+ * Handles retry logic for individual E2E test steps.
5
+ * Provides timeout wrapping and retry orchestration.
6
+ *
7
+ * @module test-execution/services/e2e/step-retry-handler
8
+ */
9
+ import type { E2EStep, E2EStepResult } from '../../types';
10
+ import type { StepExecutionContext, E2ERunnerConfig } from './types';
11
+ import { StepExecutors } from './step-executors';
12
+ /**
13
+ * Step Retry Handler
14
+ *
15
+ * Orchestrates step execution with retry logic, timeout handling,
16
+ * and conditional execution evaluation.
17
+ */
18
+ export declare class StepRetryHandler {
19
+ private readonly config;
20
+ private readonly stepExecutors;
21
+ private readonly log;
22
+ constructor(config: E2ERunnerConfig, stepExecutors: StepExecutors, logger: (message: string) => void);
23
+ /**
24
+ * Execute a step with retry logic
25
+ */
26
+ executeStepWithRetry(step: E2EStep, context: StepExecutionContext): Promise<E2EStepResult>;
27
+ /**
28
+ * Execute step with conditional check
29
+ */
30
+ private executeStepInternal;
31
+ /**
32
+ * Evaluate conditional expression
33
+ * Uses safe expression evaluator to prevent code injection (CVE fix)
34
+ */
35
+ private evaluateCondition;
36
+ /**
37
+ * Wrap promise with timeout
38
+ */
39
+ private withTimeout;
40
+ /**
41
+ * Delay execution
42
+ */
43
+ private delay;
44
+ }
45
+ /**
46
+ * Create step retry handler instance
47
+ */
48
+ export declare function createStepRetryHandler(config: E2ERunnerConfig, stepExecutors: StepExecutors, logger: (message: string) => void): StepRetryHandler;
49
+ //# sourceMappingURL=step-retry-handler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"step-retry-handler.d.ts","sourceRoot":"","sources":["../../../../../src/domains/test-execution/services/e2e/step-retry-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,KAAK,EAAE,oBAAoB,EAAqB,eAAe,EAAE,MAAM,SAAS,CAAC;AAGxF,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAMjD;;;;;GAKG;AACH,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAkB;IACzC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAgB;IAC9C,OAAO,CAAC,QAAQ,CAAC,GAAG,CAA4B;gBAG9C,MAAM,EAAE,eAAe,EACvB,aAAa,EAAE,aAAa,EAC5B,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI;IAOnC;;OAEG;IACG,oBAAoB,CACxB,IAAI,EAAE,OAAO,EACb,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,aAAa,CAAC;IAsEzB;;OAEG;YACW,mBAAmB;IAejC;;;OAGG;IACH,OAAO,CAAC,iBAAiB;IAQzB;;OAEG;YACW,WAAW;IAkBzB;;OAEG;IACH,OAAO,CAAC,KAAK;CAGd;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,eAAe,EACvB,aAAa,EAAE,aAAa,EAC5B,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,GAChC,gBAAgB,CAElB"}
@@ -0,0 +1,146 @@
1
+ /**
2
+ * Agentic QE v3 - Step Retry Handler
3
+ *
4
+ * Handles retry logic for individual E2E test steps.
5
+ * Provides timeout wrapping and retry orchestration.
6
+ *
7
+ * @module test-execution/services/e2e/step-retry-handler
8
+ */
9
+ import { E2ERunnerError, StepTimeoutError } from './types';
10
+ import { safeEvaluateBoolean } from '../../../../shared/utils/safe-expression-evaluator.js';
11
+ // ============================================================================
12
+ // Step Retry Handler Class
13
+ // ============================================================================
14
+ /**
15
+ * Step Retry Handler
16
+ *
17
+ * Orchestrates step execution with retry logic, timeout handling,
18
+ * and conditional execution evaluation.
19
+ */
20
+ export class StepRetryHandler {
21
+ config;
22
+ stepExecutors;
23
+ log;
24
+ constructor(config, stepExecutors, logger) {
25
+ this.config = config;
26
+ this.stepExecutors = stepExecutors;
27
+ this.log = logger;
28
+ }
29
+ /**
30
+ * Execute a step with retry logic
31
+ */
32
+ async executeStepWithRetry(step, context) {
33
+ const maxAttempts = (step.retries ?? this.config.defaultRetries) + 1;
34
+ const timeout = step.timeout ?? this.config.defaultStepTimeout;
35
+ let lastError;
36
+ let totalDurationMs = 0;
37
+ for (let attempt = 1; attempt <= maxAttempts; attempt++) {
38
+ const startedAt = new Date();
39
+ try {
40
+ const result = await this.withTimeout(this.executeStepInternal(step, context), timeout, step.id);
41
+ const completedAt = new Date();
42
+ const durationMs = completedAt.getTime() - startedAt.getTime();
43
+ totalDurationMs += durationMs;
44
+ return {
45
+ stepId: step.id,
46
+ stepType: step.type,
47
+ success: true,
48
+ durationMs,
49
+ data: result.data,
50
+ screenshot: result.screenshot,
51
+ accessibilityResult: result.accessibilityResult,
52
+ startedAt,
53
+ completedAt,
54
+ retryInfo: attempt > 1
55
+ ? {
56
+ attempts: attempt,
57
+ totalDurationMs,
58
+ }
59
+ : undefined,
60
+ };
61
+ }
62
+ catch (error) {
63
+ lastError = error instanceof Error ? error : new Error(String(error));
64
+ totalDurationMs += Date.now() - startedAt.getTime();
65
+ if (attempt < maxAttempts) {
66
+ this.log(`Step "${step.id}" failed (attempt ${attempt}/${maxAttempts}), retrying...`);
67
+ await this.delay(this.config.retryDelay);
68
+ }
69
+ }
70
+ }
71
+ // All retries exhausted
72
+ const completedAt = new Date();
73
+ return {
74
+ stepId: step.id,
75
+ stepType: step.type,
76
+ success: false,
77
+ durationMs: totalDurationMs,
78
+ error: {
79
+ message: lastError?.message ?? 'Unknown error',
80
+ code: lastError instanceof E2ERunnerError ? lastError.code : 'UNKNOWN',
81
+ stack: lastError?.stack,
82
+ },
83
+ startedAt: new Date(completedAt.getTime() - totalDurationMs),
84
+ completedAt,
85
+ retryInfo: {
86
+ attempts: maxAttempts,
87
+ totalDurationMs,
88
+ },
89
+ };
90
+ }
91
+ /**
92
+ * Execute step with conditional check
93
+ */
94
+ async executeStepInternal(step, context) {
95
+ // Check conditional execution
96
+ if (step.condition) {
97
+ const shouldExecute = this.evaluateCondition(step.condition, context);
98
+ if (!shouldExecute) {
99
+ return { data: {} };
100
+ }
101
+ }
102
+ return this.stepExecutors.executeStep(step, context);
103
+ }
104
+ /**
105
+ * Evaluate conditional expression
106
+ * Uses safe expression evaluator to prevent code injection (CVE fix)
107
+ */
108
+ evaluateCondition(condition, context) {
109
+ const evalContext = {
110
+ ...context.variables,
111
+ };
112
+ return safeEvaluateBoolean(condition, evalContext, true);
113
+ }
114
+ /**
115
+ * Wrap promise with timeout
116
+ */
117
+ async withTimeout(promise, timeout, stepId) {
118
+ return new Promise((resolve, reject) => {
119
+ const timer = setTimeout(() => {
120
+ reject(new StepTimeoutError(stepId, timeout));
121
+ }, timeout);
122
+ promise
123
+ .then((result) => {
124
+ clearTimeout(timer);
125
+ resolve(result);
126
+ })
127
+ .catch((error) => {
128
+ clearTimeout(timer);
129
+ reject(error);
130
+ });
131
+ });
132
+ }
133
+ /**
134
+ * Delay execution
135
+ */
136
+ delay(ms) {
137
+ return new Promise((resolve) => setTimeout(resolve, ms));
138
+ }
139
+ }
140
+ /**
141
+ * Create step retry handler instance
142
+ */
143
+ export function createStepRetryHandler(config, stepExecutors, logger) {
144
+ return new StepRetryHandler(config, stepExecutors, logger);
145
+ }
146
+ //# sourceMappingURL=step-retry-handler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"step-retry-handler.js","sourceRoot":"","sources":["../../../../../src/domains/test-execution/services/e2e/step-retry-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAC3D,OAAO,EAAE,mB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