agentic-qe 3.10.5 → 3.10.7

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 (566) hide show
  1. package/.claude/agents/v3/qe-accessibility-auditor.md +8 -0
  2. package/.claude/agents/v3/qe-bdd-generator.md +8 -0
  3. package/.claude/agents/v3/qe-chaos-engineer.md +8 -0
  4. package/.claude/agents/v3/qe-code-complexity.md +8 -0
  5. package/.claude/agents/v3/qe-code-intelligence.md +8 -0
  6. package/.claude/agents/v3/qe-contract-validator.md +8 -0
  7. package/.claude/agents/v3/qe-coverage-specialist.md +8 -0
  8. package/.claude/agents/v3/qe-defect-predictor.md +8 -0
  9. package/.claude/agents/v3/qe-dependency-mapper.md +8 -0
  10. package/.claude/agents/v3/qe-deployment-advisor.md +8 -0
  11. package/.claude/agents/v3/qe-devils-advocate.md +8 -0
  12. package/.claude/agents/v3/qe-flaky-hunter.md +8 -0
  13. package/.claude/agents/v3/qe-fleet-commander.md +8 -0
  14. package/.claude/agents/v3/qe-gap-detector.md +8 -0
  15. package/.claude/agents/v3/qe-graphql-tester.md +8 -0
  16. package/.claude/agents/v3/qe-impact-analyzer.md +8 -0
  17. package/.claude/agents/v3/qe-integration-tester.md +8 -0
  18. package/.claude/agents/v3/qe-kg-builder.md +8 -0
  19. package/.claude/agents/v3/qe-learning-coordinator.md +8 -0
  20. package/.claude/agents/v3/qe-load-tester.md +8 -0
  21. package/.claude/agents/v3/qe-message-broker-tester.md +8 -0
  22. package/.claude/agents/v3/qe-metrics-optimizer.md +8 -0
  23. package/.claude/agents/v3/qe-middleware-validator.md +8 -0
  24. package/.claude/agents/v3/qe-mutation-tester.md +8 -0
  25. package/.claude/agents/v3/qe-odata-contract-tester.md +8 -0
  26. package/.claude/agents/v3/qe-parallel-executor.md +8 -0
  27. package/.claude/agents/v3/qe-pattern-learner.md +8 -0
  28. package/.claude/agents/v3/qe-pentest-validator.md +8 -0
  29. package/.claude/agents/v3/qe-performance-tester.md +8 -0
  30. package/.claude/agents/v3/qe-product-factors-assessor.md +8 -0
  31. package/.claude/agents/v3/qe-property-tester.md +8 -0
  32. package/.claude/agents/v3/qe-quality-criteria-recommender.md +8 -0
  33. package/.claude/agents/v3/qe-quality-gate.md +8 -0
  34. package/.claude/agents/v3/qe-qx-partner.md +8 -0
  35. package/.claude/agents/v3/qe-regression-analyzer.md +8 -0
  36. package/.claude/agents/v3/qe-requirements-validator.md +8 -0
  37. package/.claude/agents/v3/qe-responsive-tester.md +8 -0
  38. package/.claude/agents/v3/qe-retry-handler.md +8 -0
  39. package/.claude/agents/v3/qe-risk-assessor.md +8 -0
  40. package/.claude/agents/v3/qe-root-cause-analyzer.md +8 -0
  41. package/.claude/agents/v3/qe-sap-idoc-tester.md +8 -0
  42. package/.claude/agents/v3/qe-sap-rfc-tester.md +8 -0
  43. package/.claude/agents/v3/qe-security-auditor.md +8 -0
  44. package/.claude/agents/v3/qe-security-scanner.md +8 -0
  45. package/.claude/agents/v3/qe-soap-tester.md +8 -0
  46. package/.claude/agents/v3/qe-sod-analyzer.md +8 -0
  47. package/.claude/agents/v3/qe-tdd-specialist.md +8 -0
  48. package/.claude/agents/v3/qe-test-architect.md +8 -0
  49. package/.claude/agents/v3/qe-test-idea-rewriter.md +8 -0
  50. package/.claude/agents/v3/qe-transfer-specialist.md +8 -0
  51. package/.claude/agents/v3/qe-visual-tester.md +8 -0
  52. package/.claude/hooks/aqe-hook.cjs +38 -2
  53. package/.claude/skills/.validation/examples/chaos-engineering-output.example.json +1 -1
  54. package/.claude/skills/.validation/examples/performance-testing-output.example.json +1 -1
  55. package/.claude/skills/.validation/examples/security-testing-output.example.json +1 -1
  56. package/.claude/skills/.validation/examples/testability-scoring-output.example.json +1 -1
  57. package/.claude/skills/.validation/schemas/skill-eval.schema.json +2 -4
  58. package/.claude/skills/.validation/schemas/skill-frontmatter.schema.json +1 -1
  59. package/.claude/skills/.validation/schemas/skill-output.template.json +1 -1
  60. package/.claude/skills/.validation/templates/eval.template.yaml +3 -3
  61. package/.claude/skills/.validation/templates/security-testing-eval.template.yaml +3 -2
  62. package/.claude/skills/.validation/templates/skill-frontmatter.example.yaml +2 -2
  63. package/.claude/skills/a11y-ally/evals/a11y-ally.yaml +2 -2
  64. package/.claude/skills/accessibility-testing/evals/accessibility-testing.yaml +2 -3
  65. package/.claude/skills/api-testing-patterns/evals/api-testing-patterns.yaml +2 -3
  66. package/.claude/skills/chaos-engineering-resilience/evals/chaos-engineering-resilience.yaml +3 -3
  67. package/.claude/skills/cicd-pipeline-qe-orchestrator/evals/cicd-pipeline-qe-orchestrator.yaml +2 -2
  68. package/.claude/skills/compatibility-testing/evals/compatibility-testing.yaml +2 -2
  69. package/.claude/skills/compliance-testing/evals/compliance-testing.yaml +2 -3
  70. package/.claude/skills/contract-testing/evals/contract-testing.yaml +2 -3
  71. package/.claude/skills/database-testing/evals/database-testing.yaml +2 -3
  72. package/.claude/skills/enterprise-integration-testing/evals/enterprise-integration-testing.yaml +2 -2
  73. package/.claude/skills/localization-testing/evals/localization-testing.yaml +2 -2
  74. package/.claude/skills/middleware-testing-patterns/evals/middleware-testing-patterns.yaml +2 -2
  75. package/.claude/skills/mobile-testing/evals/mobile-testing.yaml +2 -2
  76. package/.claude/skills/mutation-testing/evals/mutation-testing.yaml +2 -3
  77. package/.claude/skills/mutation-testing/test-data/sample-output.json +1 -1
  78. package/.claude/skills/n8n-expression-testing/evals/n8n-expression-testing.yaml +2 -2
  79. package/.claude/skills/n8n-integration-testing-patterns/evals/n8n-integration-testing-patterns.yaml +2 -2
  80. package/.claude/skills/n8n-security-testing/evals/n8n-security-testing.yaml +3 -2
  81. package/.claude/skills/n8n-trigger-testing-strategies/evals/n8n-trigger-testing-strategies.yaml +2 -2
  82. package/.claude/skills/n8n-workflow-testing-fundamentals/evals/n8n-workflow-testing-fundamentals.yaml +2 -2
  83. package/.claude/skills/observability-testing-patterns/evals/observability-testing-patterns.yaml +2 -2
  84. package/.claude/skills/pentest-validation/evals/pentest-validation.yaml +3 -3
  85. package/.claude/skills/performance-testing/evals/performance-testing.yaml +2 -3
  86. package/.claude/skills/qcsd-cicd-swarm/evals/qcsd-cicd-swarm.yaml +2 -2
  87. package/.claude/skills/qcsd-development-swarm/evals/qcsd-development-swarm.yaml +2 -2
  88. package/.claude/skills/qcsd-ideation-swarm/evals/qcsd-ideation-swarm.yaml +2 -2
  89. package/.claude/skills/qcsd-production-swarm/evals/qcsd-production-swarm.yaml +2 -2
  90. package/.claude/skills/qcsd-refinement-swarm/evals/qcsd-refinement-swarm.yaml +2 -2
  91. package/.claude/skills/qe-browser/evals/qe-browser.yaml +2 -2
  92. package/.claude/skills/qe-chaos-resilience/evals/qe-chaos-resilience.yaml +3 -2
  93. package/.claude/skills/qe-code-intelligence/evals/qe-code-intelligence.yaml +2 -2
  94. package/.claude/skills/qe-coverage-analysis/evals/qe-coverage-analysis.yaml +2 -2
  95. package/.claude/skills/qe-defect-intelligence/evals/qe-defect-intelligence.yaml +3 -2
  96. package/.claude/skills/qe-learning-optimization/evals/qe-learning-optimization.yaml +4 -4
  97. package/.claude/skills/qe-quality-assessment/evals/qe-quality-assessment.yaml +2 -2
  98. package/.claude/skills/qe-requirements-validation/evals/qe-requirements-validation.yaml +2 -2
  99. package/.claude/skills/qe-test-execution/evals/qe-test-execution.yaml +2 -2
  100. package/.claude/skills/qe-test-generation/evals/qe-test-generation.yaml +2 -2
  101. package/.claude/skills/qe-visual-accessibility/evals/qe-visual-accessibility.yaml +2 -2
  102. package/.claude/skills/quality-metrics/evals/quality-metrics.yaml +2 -2
  103. package/.claude/skills/regression-testing/evals/regression-testing.yaml +2 -2
  104. package/.claude/skills/risk-based-testing/evals/risk-based-testing.yaml +2 -2
  105. package/.claude/skills/security-testing/evals/security-testing.yaml +3 -3
  106. package/.claude/skills/security-visual-testing/evals/security-visual-testing.yaml +3 -2
  107. package/.claude/skills/shift-left-testing/evals/shift-left-testing.yaml +2 -2
  108. package/.claude/skills/shift-right-testing/evals/shift-right-testing.yaml +2 -2
  109. package/.claude/skills/skills-manifest.json +1 -1
  110. package/.claude/skills/test-automation-strategy/evals/test-automation-strategy.yaml +2 -2
  111. package/.claude/skills/test-data-management/evals/test-data-management.yaml +2 -2
  112. package/.claude/skills/test-design-techniques/evals/test-design-techniques.yaml +2 -2
  113. package/.claude/skills/test-reporting-analytics/evals/test-reporting-analytics.yaml +2 -2
  114. package/.claude/skills/testability-scoring/evals/testability-scoring.yaml +2 -3
  115. package/.claude/skills/validation-pipeline/evals/validation-pipeline.yaml +2 -2
  116. package/.claude/skills/verification-quality/evals/verification-quality.yaml +2 -2
  117. package/.claude/skills/visual-testing-advanced/evals/visual-testing-advanced.yaml +2 -2
  118. package/.claude/skills/wms-testing-patterns/evals/wms-testing-patterns.yaml +2 -1
  119. package/CHANGELOG.md +9053 -8934
  120. package/assets/agents/v3/qe-accessibility-auditor.md +8 -0
  121. package/assets/agents/v3/qe-bdd-generator.md +8 -0
  122. package/assets/agents/v3/qe-chaos-engineer.md +8 -0
  123. package/assets/agents/v3/qe-code-complexity.md +8 -0
  124. package/assets/agents/v3/qe-code-intelligence.md +8 -0
  125. package/assets/agents/v3/qe-contract-validator.md +8 -0
  126. package/assets/agents/v3/qe-coverage-specialist.md +8 -0
  127. package/assets/agents/v3/qe-defect-predictor.md +8 -0
  128. package/assets/agents/v3/qe-dependency-mapper.md +8 -0
  129. package/assets/agents/v3/qe-deployment-advisor.md +8 -0
  130. package/assets/agents/v3/qe-devils-advocate.md +8 -0
  131. package/assets/agents/v3/qe-flaky-hunter.md +8 -0
  132. package/assets/agents/v3/qe-fleet-commander.md +8 -0
  133. package/assets/agents/v3/qe-gap-detector.md +8 -0
  134. package/assets/agents/v3/qe-graphql-tester.md +8 -0
  135. package/assets/agents/v3/qe-impact-analyzer.md +8 -0
  136. package/assets/agents/v3/qe-integration-tester.md +8 -0
  137. package/assets/agents/v3/qe-kg-builder.md +8 -0
  138. package/assets/agents/v3/qe-learning-coordinator.md +8 -0
  139. package/assets/agents/v3/qe-load-tester.md +8 -0
  140. package/assets/agents/v3/qe-message-broker-tester.md +8 -0
  141. package/assets/agents/v3/qe-metrics-optimizer.md +8 -0
  142. package/assets/agents/v3/qe-middleware-validator.md +8 -0
  143. package/assets/agents/v3/qe-mutation-tester.md +8 -0
  144. package/assets/agents/v3/qe-odata-contract-tester.md +8 -0
  145. package/assets/agents/v3/qe-parallel-executor.md +8 -0
  146. package/assets/agents/v3/qe-pattern-learner.md +8 -0
  147. package/assets/agents/v3/qe-pentest-validator.md +8 -0
  148. package/assets/agents/v3/qe-performance-tester.md +8 -0
  149. package/assets/agents/v3/qe-product-factors-assessor.md +8 -0
  150. package/assets/agents/v3/qe-property-tester.md +8 -0
  151. package/assets/agents/v3/qe-quality-criteria-recommender.md +8 -0
  152. package/assets/agents/v3/qe-quality-gate.md +8 -0
  153. package/assets/agents/v3/qe-qx-partner.md +8 -0
  154. package/assets/agents/v3/qe-regression-analyzer.md +8 -0
  155. package/assets/agents/v3/qe-requirements-validator.md +8 -0
  156. package/assets/agents/v3/qe-responsive-tester.md +8 -0
  157. package/assets/agents/v3/qe-retry-handler.md +8 -0
  158. package/assets/agents/v3/qe-risk-assessor.md +8 -0
  159. package/assets/agents/v3/qe-root-cause-analyzer.md +8 -0
  160. package/assets/agents/v3/qe-sap-idoc-tester.md +8 -0
  161. package/assets/agents/v3/qe-sap-rfc-tester.md +8 -0
  162. package/assets/agents/v3/qe-security-auditor.md +8 -0
  163. package/assets/agents/v3/qe-security-scanner.md +8 -0
  164. package/assets/agents/v3/qe-soap-tester.md +8 -0
  165. package/assets/agents/v3/qe-sod-analyzer.md +8 -0
  166. package/assets/agents/v3/qe-tdd-specialist.md +8 -0
  167. package/assets/agents/v3/qe-test-architect.md +8 -0
  168. package/assets/agents/v3/qe-test-idea-rewriter.md +8 -0
  169. package/assets/agents/v3/qe-transfer-specialist.md +8 -0
  170. package/assets/agents/v3/qe-visual-tester.md +8 -0
  171. package/assets/skills/.validation/examples/chaos-engineering-output.example.json +1 -1
  172. package/assets/skills/.validation/examples/performance-testing-output.example.json +1 -1
  173. package/assets/skills/.validation/examples/security-testing-output.example.json +1 -1
  174. package/assets/skills/.validation/examples/testability-scoring-output.example.json +1 -1
  175. package/assets/skills/.validation/schemas/skill-eval.schema.json +2 -4
  176. package/assets/skills/.validation/schemas/skill-frontmatter.schema.json +1 -1
  177. package/assets/skills/.validation/schemas/skill-output.template.json +1 -1
  178. package/assets/skills/.validation/templates/eval.template.yaml +3 -3
  179. package/assets/skills/.validation/templates/security-testing-eval.template.yaml +3 -2
  180. package/assets/skills/.validation/templates/skill-frontmatter.example.yaml +2 -2
  181. package/assets/skills/a11y-ally/evals/a11y-ally.yaml +2 -2
  182. package/assets/skills/accessibility-testing/evals/accessibility-testing.yaml +2 -3
  183. package/assets/skills/api-testing-patterns/evals/api-testing-patterns.yaml +2 -3
  184. package/assets/skills/chaos-engineering-resilience/evals/chaos-engineering-resilience.yaml +3 -3
  185. package/assets/skills/cicd-pipeline-qe-orchestrator/evals/cicd-pipeline-qe-orchestrator.yaml +2 -2
  186. package/assets/skills/compatibility-testing/evals/compatibility-testing.yaml +2 -2
  187. package/assets/skills/compliance-testing/evals/compliance-testing.yaml +2 -3
  188. package/assets/skills/contract-testing/evals/contract-testing.yaml +2 -3
  189. package/assets/skills/database-testing/evals/database-testing.yaml +2 -3
  190. package/assets/skills/enterprise-integration-testing/evals/enterprise-integration-testing.yaml +2 -2
  191. package/assets/skills/localization-testing/evals/localization-testing.yaml +2 -2
  192. package/assets/skills/middleware-testing-patterns/evals/middleware-testing-patterns.yaml +2 -2
  193. package/assets/skills/mobile-testing/evals/mobile-testing.yaml +2 -2
  194. package/assets/skills/mutation-testing/evals/mutation-testing.yaml +2 -3
  195. package/assets/skills/mutation-testing/test-data/sample-output.json +1 -1
  196. package/assets/skills/n8n-expression-testing/evals/n8n-expression-testing.yaml +2 -2
  197. package/assets/skills/n8n-integration-testing-patterns/evals/n8n-integration-testing-patterns.yaml +2 -2
  198. package/assets/skills/n8n-security-testing/evals/n8n-security-testing.yaml +3 -2
  199. package/assets/skills/n8n-trigger-testing-strategies/evals/n8n-trigger-testing-strategies.yaml +2 -2
  200. package/assets/skills/n8n-workflow-testing-fundamentals/evals/n8n-workflow-testing-fundamentals.yaml +2 -2
  201. package/assets/skills/observability-testing-patterns/evals/observability-testing-patterns.yaml +2 -2
  202. package/assets/skills/pentest-validation/evals/pentest-validation.yaml +3 -3
  203. package/assets/skills/performance-testing/evals/performance-testing.yaml +2 -3
  204. package/assets/skills/qcsd-cicd-swarm/evals/qcsd-cicd-swarm.yaml +2 -2
  205. package/assets/skills/qcsd-development-swarm/evals/qcsd-development-swarm.yaml +2 -2
  206. package/assets/skills/qcsd-ideation-swarm/evals/qcsd-ideation-swarm.yaml +2 -2
  207. package/assets/skills/qcsd-production-swarm/evals/qcsd-production-swarm.yaml +2 -2
  208. package/assets/skills/qcsd-refinement-swarm/evals/qcsd-refinement-swarm.yaml +2 -2
  209. package/assets/skills/qe-browser/evals/qe-browser.yaml +2 -2
  210. package/assets/skills/qe-chaos-resilience/evals/qe-chaos-resilience.yaml +3 -2
  211. package/assets/skills/qe-code-intelligence/evals/qe-code-intelligence.yaml +2 -2
  212. package/assets/skills/qe-coverage-analysis/evals/qe-coverage-analysis.yaml +2 -2
  213. package/assets/skills/qe-defect-intelligence/evals/qe-defect-intelligence.yaml +3 -2
  214. package/assets/skills/qe-learning-optimization/evals/qe-learning-optimization.yaml +4 -4
  215. package/assets/skills/qe-quality-assessment/evals/qe-quality-assessment.yaml +2 -2
  216. package/assets/skills/qe-requirements-validation/evals/qe-requirements-validation.yaml +2 -2
  217. package/assets/skills/qe-test-execution/evals/qe-test-execution.yaml +2 -2
  218. package/assets/skills/qe-test-generation/evals/qe-test-generation.yaml +2 -2
  219. package/assets/skills/qe-visual-accessibility/evals/qe-visual-accessibility.yaml +2 -2
  220. package/assets/skills/quality-metrics/evals/quality-metrics.yaml +2 -2
  221. package/assets/skills/regression-testing/evals/regression-testing.yaml +2 -2
  222. package/assets/skills/risk-based-testing/evals/risk-based-testing.yaml +2 -2
  223. package/assets/skills/security-testing/evals/security-testing.yaml +3 -3
  224. package/assets/skills/security-visual-testing/evals/security-visual-testing.yaml +3 -2
  225. package/assets/skills/shift-left-testing/evals/shift-left-testing.yaml +2 -2
  226. package/assets/skills/shift-right-testing/evals/shift-right-testing.yaml +2 -2
  227. package/assets/skills/test-automation-strategy/evals/test-automation-strategy.yaml +2 -2
  228. package/assets/skills/test-data-management/evals/test-data-management.yaml +2 -2
  229. package/assets/skills/test-design-techniques/evals/test-design-techniques.yaml +2 -2
  230. package/assets/skills/test-reporting-analytics/evals/test-reporting-analytics.yaml +2 -2
  231. package/assets/skills/testability-scoring/evals/testability-scoring.yaml +2 -3
  232. package/assets/skills/validation-pipeline/evals/validation-pipeline.yaml +2 -2
  233. package/assets/skills/verification-quality/evals/verification-quality.yaml +2 -2
  234. package/assets/skills/visual-testing-advanced/evals/visual-testing-advanced.yaml +2 -2
  235. package/assets/skills/wms-testing-patterns/evals/wms-testing-patterns.yaml +2 -1
  236. package/dist/cli/bundle.js +5 -5
  237. package/dist/cli/chunks/adapter-TTIBYXH2.js +2 -0
  238. package/dist/cli/chunks/{agent-booster-wasm-3BC5LIEB.js → agent-booster-wasm-6I3JMU2M.js} +2 -2
  239. package/dist/cli/chunks/{agent-handler-QLXWVZZF.js → agent-handler-XWI7YM6R.js} +2 -2
  240. package/dist/cli/chunks/{agent-memory-branch-3U5PDYW7.js → agent-memory-branch-QFZKQN2L.js} +2 -2
  241. package/dist/cli/chunks/aqe-learning-engine-CTV5OLSN.js +2 -0
  242. package/dist/cli/chunks/{arena-BMJQK4RD.js → arena-5HNPVTBZ.js} +4 -4
  243. package/dist/cli/chunks/{arena-XENAGV4I.js → arena-P4IUBKZP.js} +2 -2
  244. package/dist/cli/chunks/audit-PBSH25VZ.js +3 -0
  245. package/dist/cli/chunks/base-ISNCJZ7A.js +2 -0
  246. package/dist/cli/chunks/{hnswlib-node-P6HSEFLW.js → better-sqlite3-F262IAGH.js} +2 -2
  247. package/dist/cli/chunks/{brain-handler-PHSWG5PR.js → brain-handler-EVYRCKXI.js} +3 -3
  248. package/dist/cli/chunks/{branch-enumerator-LNSYT34I.js → branch-enumerator-SUDGYJQJ.js} +2 -2
  249. package/dist/cli/chunks/{browser-M5BVQMBI.js → browser-4UKMW2RE.js} +2 -2
  250. package/dist/cli/chunks/browser-workflow-OD32QTTI.js +2 -0
  251. package/dist/cli/chunks/{chunk-VC256KH2.js → chunk-222ZQTL5.js} +2 -2
  252. package/dist/cli/chunks/{chunk-SK6YRNXI.js → chunk-262F3EMN.js} +2 -2
  253. package/dist/cli/chunks/{chunk-Q6BKJZTG.js → chunk-2J4ZUUU5.js} +2 -2
  254. package/dist/cli/chunks/{chunk-VKWDMOR4.js → chunk-2JWFS2K2.js} +2 -2
  255. package/dist/cli/chunks/{chunk-IRS4HKAR.js → chunk-2MLISLRR.js} +1 -1
  256. package/dist/cli/chunks/{chunk-J533CJUN.js → chunk-32E2OPIE.js} +3 -3
  257. package/dist/cli/chunks/{chunk-RFNEEDPQ.js → chunk-34NT5NBZ.js} +2 -2
  258. package/dist/cli/chunks/{chunk-X4B3R3ZZ.js → chunk-3IJS52OS.js} +2 -2
  259. package/dist/cli/chunks/{chunk-TMTLWSSA.js → chunk-3O4Q4GAX.js} +1 -1
  260. package/dist/cli/chunks/{chunk-RLU7764Y.js → chunk-3W6QASVB.js} +2 -2
  261. package/dist/cli/chunks/{chunk-4K7T6AKM.js → chunk-3XEL7XCA.js} +1 -1
  262. package/dist/cli/chunks/chunk-4I6FK67T.js +12 -0
  263. package/dist/cli/chunks/{chunk-YEO2Z3UX.js → chunk-4MJQJQLY.js} +2 -2
  264. package/dist/cli/chunks/{chunk-2UQWVF4P.js → chunk-4RGV6Z2H.js} +2 -2
  265. package/dist/cli/chunks/{chunk-PGNQR2VM.js → chunk-4W5QWFU4.js} +1 -1
  266. package/dist/cli/chunks/{chunk-2RLRPKCG.js → chunk-5QMIVHFT.js} +2 -2
  267. package/dist/cli/chunks/{chunk-SXQIH2QA.js → chunk-64BSODHA.js} +2 -2
  268. package/dist/cli/chunks/{chunk-S7FGTHFE.js → chunk-6A2HRMTD.js} +2 -2
  269. package/dist/cli/chunks/{chunk-RZ7D5SHS.js → chunk-6F5KPT6U.js} +1 -1
  270. package/dist/cli/chunks/{chunk-7DU35D4M.js → chunk-6OLPKIYU.js} +1 -1
  271. package/dist/cli/chunks/{chunk-HKJ3LG3N.js → chunk-6QBD64W3.js} +2 -2
  272. package/dist/cli/chunks/{chunk-MGCW5FWH.js → chunk-6RG7ZJ2H.js} +2 -2
  273. package/dist/cli/chunks/{chunk-O5OOUMBB.js → chunk-76JYG426.js} +2 -2
  274. package/dist/cli/chunks/{chunk-75MP7JMV.js → chunk-76SUEI7S.js} +1 -1
  275. package/dist/cli/chunks/{chunk-ZTC64OJE.js → chunk-7NK2H7H5.js} +2 -2
  276. package/dist/cli/chunks/{chunk-OATHXZYW.js → chunk-AKL5A3IZ.js} +1 -1
  277. package/dist/cli/chunks/{chunk-IOE6LDPF.js → chunk-AKSCYNFH.js} +2 -2
  278. package/dist/cli/chunks/{chunk-FNJZBIR3.js → chunk-AW3LGLC3.js} +2 -2
  279. package/dist/cli/chunks/{chunk-3WOQY6UL.js → chunk-AY4IEMRI.js} +2 -2
  280. package/dist/cli/chunks/{chunk-ZT7JSFGT.js → chunk-B5ZJV7GZ.js} +2 -2
  281. package/dist/cli/chunks/{chunk-IIFCTJOF.js → chunk-BLFZFKT6.js} +2 -2
  282. package/dist/cli/chunks/{chunk-G6FP3S3G.js → chunk-BPC6X6VR.js} +2 -2
  283. package/dist/cli/chunks/{chunk-24A7KD3D.js → chunk-BRYYQQUV.js} +1 -1
  284. package/dist/cli/chunks/{chunk-CUAM34RQ.js → chunk-BU2I77YW.js} +3 -3
  285. package/dist/cli/chunks/{chunk-UOIT5JZ6.js → chunk-C5CY5NSW.js} +2 -2
  286. package/dist/cli/chunks/{chunk-WFZUKXV5.js → chunk-CGBEI7UH.js} +2 -2
  287. package/dist/cli/chunks/{chunk-2Z7HIT5I.js → chunk-CJTDQJ7E.js} +1 -1
  288. package/dist/cli/chunks/{chunk-4FTO3TPH.js → chunk-CW7JQVXV.js} +2 -2
  289. package/dist/cli/chunks/chunk-DF7V6X3N.js +2 -0
  290. package/dist/cli/chunks/{chunk-JY7T2AQQ.js → chunk-DPT37UHR.js} +4 -4
  291. package/dist/cli/chunks/{chunk-D3Q4443B.js → chunk-DU7Y54JI.js} +1 -1
  292. package/dist/cli/chunks/{chunk-MJRYHHOG.js → chunk-DYNO72WD.js} +2 -2
  293. package/dist/cli/chunks/{chunk-TISBFSDJ.js → chunk-DYSRMAZP.js} +1 -1
  294. package/dist/cli/chunks/{chunk-ZS4BGJJV.js → chunk-EWNJK2BU.js} +1 -1
  295. package/dist/cli/chunks/chunk-F5RZSNHI.js +20 -0
  296. package/dist/cli/chunks/{chunk-HRORJ352.js → chunk-FK4JHBG4.js} +2 -2
  297. package/dist/cli/chunks/{chunk-VWN66V7U.js → chunk-FQBNPSV2.js} +2 -2
  298. package/dist/cli/chunks/{chunk-YZFNPTGN.js → chunk-FWLXK6AH.js} +2 -2
  299. package/dist/cli/chunks/{chunk-IVKSZNMI.js → chunk-G7ISGLKP.js} +1 -1
  300. package/dist/cli/chunks/{chunk-MWPFUBXS.js → chunk-GUDOOOO6.js} +1 -1
  301. package/dist/cli/chunks/{chunk-GDUGW6FZ.js → chunk-HARYQMWN.js} +2 -2
  302. package/dist/cli/chunks/{chunk-R573V37S.js → chunk-HBWAMCVB.js} +17 -17
  303. package/dist/cli/chunks/{chunk-GKG6IQP6.js → chunk-HDLF6LGO.js} +3 -3
  304. package/dist/cli/chunks/{chunk-XI6ZZMX7.js → chunk-HELQ7CXL.js} +1 -1
  305. package/dist/cli/chunks/{chunk-ZCYKWEAM.js → chunk-HI4DA7Z3.js} +2 -2
  306. package/dist/cli/chunks/{chunk-FPWA73N6.js → chunk-I64BLAFS.js} +2 -2
  307. package/dist/cli/chunks/chunk-I7M574IO.js +14 -0
  308. package/dist/cli/chunks/{chunk-BSRCL6RU.js → chunk-INI3AGF5.js} +2 -2
  309. package/dist/cli/chunks/{chunk-FW3C4LWU.js → chunk-ISLI6D4K.js} +2 -2
  310. package/dist/cli/chunks/{chunk-HPKYIK7R.js → chunk-IXAABYGS.js} +2 -2
  311. package/dist/cli/chunks/{chunk-5D7GLMT3.js → chunk-IYZWEYWJ.js} +1 -1
  312. package/dist/cli/chunks/{chunk-CTG3GJIM.js → chunk-J5ETX2DG.js} +2 -2
  313. package/dist/cli/chunks/chunk-JJELOEIY.js +65 -0
  314. package/dist/cli/chunks/{chunk-UTORITJT.js → chunk-JNQVPTOM.js} +2 -2
  315. package/dist/cli/chunks/{chunk-G5UIGH4C.js → chunk-JNXPRDNV.js} +3 -3
  316. package/dist/cli/chunks/{chunk-DIJ74M7V.js → chunk-K6A3AWUI.js} +1 -1
  317. package/dist/cli/chunks/{chunk-RUQV3BTV.js → chunk-K6IU2MV4.js} +1 -1
  318. package/dist/cli/chunks/{chunk-NKW7VOZV.js → chunk-KXENXRZE.js} +1 -1
  319. package/dist/cli/chunks/{chunk-CS3UB2OL.js → chunk-L2ZSYIDA.js} +1 -1
  320. package/dist/cli/chunks/{chunk-NGSA53GC.js → chunk-L3EQQMFI.js} +2 -2
  321. package/dist/cli/chunks/{chunk-ZG3DSWUA.js → chunk-L5UUUSSB.js} +1 -1
  322. package/dist/cli/chunks/{chunk-A7HGS7FW.js → chunk-L6NB4UHR.js} +2 -2
  323. package/dist/cli/chunks/{chunk-VESYE5YO.js → chunk-LEZ2MGHM.js} +3 -3
  324. package/dist/cli/chunks/{chunk-66LOFIBP.js → chunk-LFSQSLNP.js} +2 -2
  325. package/dist/cli/chunks/{chunk-WFZ4DRIC.js → chunk-LHZYTNOQ.js} +2 -2
  326. package/dist/cli/chunks/{chunk-IT7CEHAJ.js → chunk-LJHCPN4E.js} +2 -2
  327. package/dist/cli/chunks/{chunk-S7HQOGVD.js → chunk-LRRQEAP5.js} +1 -1
  328. package/dist/cli/chunks/{chunk-OJNG6ZXG.js → chunk-LSHUPEQQ.js} +2 -2
  329. package/dist/cli/chunks/{chunk-DBR4TQPK.js → chunk-LUZH2IZY.js} +2 -2
  330. package/dist/cli/chunks/{chunk-PYBVFG6T.js → chunk-M7SO5KNJ.js} +2 -2
  331. package/dist/cli/chunks/{chunk-A3BDPU5F.js → chunk-MDVJVY4C.js} +4 -4
  332. package/dist/cli/chunks/{chunk-JPOEI7CJ.js → chunk-MK73CCKO.js} +2 -2
  333. package/dist/cli/chunks/{chunk-FE3FGMNB.js → chunk-MMR23KAO.js} +2 -2
  334. package/dist/cli/chunks/{chunk-CUY2EUSQ.js → chunk-MOI74MMX.js} +2 -2
  335. package/dist/cli/chunks/{chunk-RONMVGCT.js → chunk-MRLGQX7Y.js} +2 -2
  336. package/dist/cli/chunks/{chunk-RFVZMNYX.js → chunk-MWRKNBSY.js} +2 -2
  337. package/dist/cli/chunks/{chunk-TMD6IC6D.js → chunk-NKYMHEHY.js} +2 -2
  338. package/dist/cli/chunks/{chunk-YZD4VIE5.js → chunk-O4B6FFC5.js} +1 -1
  339. package/dist/cli/chunks/{chunk-IUKERFLT.js → chunk-OAXDI4XM.js} +1 -1
  340. package/dist/cli/chunks/{chunk-3BGGNHHZ.js → chunk-OMDV6GFP.js} +1 -1
  341. package/dist/cli/chunks/{chunk-B4F5EPNR.js → chunk-OPLLH67G.js} +1 -1
  342. package/dist/cli/chunks/{chunk-HHEHGERJ.js → chunk-OSETFZVE.js} +2 -2
  343. package/dist/cli/chunks/{chunk-MRXKIXVV.js → chunk-OW4LJ5HE.js} +2 -2
  344. package/dist/cli/chunks/{chunk-3KGUP2SD.js → chunk-PY3HWJRJ.js} +2 -2
  345. package/dist/cli/chunks/{chunk-56RA6YPN.js → chunk-QBVFONWU.js} +2 -2
  346. package/dist/cli/chunks/{chunk-DJQYZ4RZ.js → chunk-QBVS4CXM.js} +1 -1
  347. package/dist/cli/chunks/{chunk-IWRORKD7.js → chunk-QDBFB4XD.js} +2 -2
  348. package/dist/cli/chunks/{chunk-AZCKTAUI.js → chunk-QLVZEEPR.js} +2 -2
  349. package/dist/cli/chunks/{chunk-FLYFNNSN.js → chunk-QMGNYRR5.js} +3 -3
  350. package/dist/cli/chunks/{chunk-AVQD7KEN.js → chunk-R2B6EQQF.js} +2 -2
  351. package/dist/cli/chunks/{chunk-7JZCEQFR.js → chunk-R7KIC6TL.js} +1 -1
  352. package/dist/cli/chunks/{chunk-ZUBJBAUD.js → chunk-RJBCIN2G.js} +2 -2
  353. package/dist/cli/chunks/{chunk-BB7MEGXD.js → chunk-RLXCFURS.js} +2 -2
  354. package/dist/cli/chunks/{chunk-4Z7XH4JE.js → chunk-S423UHYM.js} +2 -2
  355. package/dist/cli/chunks/{chunk-VB7DZVCI.js → chunk-S4NNQE4L.js} +1 -1
  356. package/dist/cli/chunks/{chunk-DWLGFYXV.js → chunk-S7FNTWFM.js} +3 -3
  357. package/dist/cli/chunks/{chunk-QAW6RVAR.js → chunk-SFW6IDMR.js} +10 -10
  358. package/dist/cli/chunks/{chunk-W7KGHW4T.js → chunk-SG6O3PXZ.js} +2 -2
  359. package/dist/cli/chunks/{chunk-HNYSBE5J.js → chunk-SLASYVNX.js} +2 -2
  360. package/dist/cli/chunks/{chunk-RCAIOTIF.js → chunk-TIUC5LRA.js} +2 -2
  361. package/dist/cli/chunks/{chunk-GTVXVYKE.js → chunk-TTLAWPEN.js} +2 -2
  362. package/dist/cli/chunks/{chunk-6SAU7GXO.js → chunk-TXXRBNOB.js} +1 -1
  363. package/dist/cli/chunks/{chunk-G4GX6YKX.js → chunk-TY7XPI6R.js} +2 -2
  364. package/dist/cli/chunks/{chunk-D7NKRCIL.js → chunk-U7EGKKN3.js} +2 -2
  365. package/dist/cli/chunks/{chunk-3JWV4GE6.js → chunk-UPDPD43T.js} +2 -2
  366. package/dist/cli/chunks/{chunk-253TDTPH.js → chunk-UURGDFGU.js} +1 -1
  367. package/dist/cli/chunks/{chunk-PPM5D7LH.js → chunk-UVUVWA4B.js} +1 -1
  368. package/dist/cli/chunks/{chunk-DN65ILSI.js → chunk-V3KNHI5B.js} +2 -2
  369. package/dist/cli/chunks/{chunk-K5KKZWED.js → chunk-V7WBNB2S.js} +2 -2
  370. package/dist/cli/chunks/{chunk-N2TJXGHG.js → chunk-VPBXVZWE.js} +1 -1
  371. package/dist/cli/chunks/{chunk-54IPDQIZ.js → chunk-WCXQA24H.js} +8 -8
  372. package/dist/cli/chunks/{chunk-MEN3UW7W.js → chunk-X3HRJV65.js} +1 -1
  373. package/dist/cli/chunks/{chunk-D4WDJ4ZF.js → chunk-X6OJFP7G.js} +2 -2
  374. package/dist/cli/chunks/{chunk-MFQIJ3HV.js → chunk-XCYPVJ34.js} +2 -2
  375. package/dist/cli/chunks/{chunk-GMU7P5O3.js → chunk-XK7P7OXO.js} +2 -2
  376. package/dist/cli/chunks/{chunk-S73KENCH.js → chunk-XWPUCPYW.js} +2 -2
  377. package/dist/cli/chunks/{chunk-RR55MLD4.js → chunk-YB4GXJJG.js} +1 -1
  378. package/dist/cli/chunks/{chunk-QTDZS4U6.js → chunk-YBM4LUSF.js} +2 -2
  379. package/dist/cli/chunks/{chunk-MIMJVKJJ.js → chunk-YLXUF5KW.js} +3 -3
  380. package/dist/cli/chunks/{chunk-AMBIOEMO.js → chunk-YMBPKBKG.js} +1 -1
  381. package/dist/cli/chunks/{chunk-KIMJPTHD.js → chunk-Z44VJC5U.js} +2 -2
  382. package/dist/cli/chunks/{ci-M2BSQBLL.js → ci-OO42YBET.js} +2 -2
  383. package/dist/cli/chunks/{ci-output-Z4TMK6GZ.js → ci-output-YXMTEX7Q.js} +2 -2
  384. package/dist/cli/chunks/{circuit-breaker-E3G4GGWB.js → circuit-breaker-EHA4N643.js} +2 -2
  385. package/dist/cli/chunks/{claude-flow-setup-MASRQU54.js → claude-flow-setup-E6G6SLYI.js} +2 -2
  386. package/dist/cli/chunks/client-N4FQ6SMD.js +2 -0
  387. package/dist/cli/chunks/{cline-installer-P3BWAKQA.js → cline-installer-6JPWD64G.js} +2 -2
  388. package/dist/cli/chunks/{code-7HY5HQAV.js → code-Q3U6XDOO.js} +2 -2
  389. package/dist/cli/chunks/{code-index-extractor-MBVKLOEU.js → code-index-extractor-BK2DC4MO.js} +2 -2
  390. package/dist/cli/chunks/{codex-installer-WZ6QO2PH.js → codex-installer-DA3GBMLN.js} +2 -2
  391. package/dist/cli/chunks/{completions-TOJC2UFP.js → completions-TZ5F33TA.js} +2 -2
  392. package/dist/cli/chunks/{complexity-analyzer-QYVDIAAW.js → complexity-analyzer-N7U4V7ID.js} +2 -2
  393. package/dist/cli/chunks/{continuedev-installer-J72CV7P4.js → continuedev-installer-DDDJGW26.js} +2 -2
  394. package/dist/cli/chunks/{copilot-installer-ACDA3GEA.js → copilot-installer-JVFCE6GT.js} +2 -2
  395. package/dist/cli/chunks/core-handlers-SFD5HCA3.js +2 -0
  396. package/dist/cli/chunks/{cost-tracker-BAYQJELE.js → cost-tracker-ZTIDLUFW.js} +2 -2
  397. package/dist/cli/chunks/{coverage-QD3XJV6W.js → coverage-6G7T7TRQ.js} +3 -3
  398. package/dist/cli/chunks/cross-domain-router-7HGRUNLT.js +2 -0
  399. package/dist/cli/chunks/{cursor-installer-SPGZ4TQM.js → cursor-installer-JFNYGSDD.js} +2 -2
  400. package/dist/cli/chunks/{daemon-3EVOL2UH.js → daemon-5A4GD6XA.js} +3 -3
  401. package/dist/cli/chunks/{daemon-N4JKD5SO.js → daemon-KTXGJJRI.js} +4 -4
  402. package/dist/cli/chunks/{dag-attention-scheduler-3BVLL3L5.js → dag-attention-scheduler-4CUEQZD6.js} +2 -2
  403. package/dist/cli/chunks/{detect-SWACKB45.js → detect-I32JUSUE.js} +2 -2
  404. package/dist/cli/chunks/{dist-node-LU4E7PI6.js → dist-node-7ITNV6QS.js} +2 -2
  405. package/dist/cli/chunks/{domain-handler-5AKKAC43.js → domain-handler-LIFCXSZ4.js} +2 -2
  406. package/dist/cli/chunks/{domain-transfer-LB6H7RPX.js → domain-transfer-67UWLHSK.js} +2 -2
  407. package/dist/cli/chunks/dream-HPGD5TLD.js +2 -0
  408. package/dist/cli/chunks/{embed-and-insert-pattern-7RBA5NDK.js → embed-and-insert-pattern-4WC5RUD6.js} +2 -2
  409. package/dist/cli/chunks/{eval-ZZFPRENX.js → eval-DLS2UAQ2.js} +3 -3
  410. package/dist/cli/chunks/{experience-capture-middleware-HRO3EGIW.js → experience-capture-middleware-VG5E6OJA.js} +3 -3
  411. package/dist/cli/chunks/{fast-paths-IRRNQBTY.js → fast-paths-262IVHDN.js} +2 -2
  412. package/dist/cli/chunks/{feature-flags-W54ABAUA.js → feature-flags-JJ3FHZGD.js} +2 -2
  413. package/dist/cli/chunks/{feature-flags-R5N5IWI2.js → feature-flags-L3K7DBN3.js} +2 -2
  414. package/dist/cli/chunks/{file-discovery-6CIDLVID.js → file-discovery-Q3PBKVUW.js} +2 -2
  415. package/dist/cli/chunks/{fleet-YTFN64WE.js → fleet-LQ5S2YHG.js} +3 -3
  416. package/dist/cli/chunks/{gnn-wrapper-RXMPLMV2.js → gnn-wrapper-I33Z537H.js} +2 -2
  417. package/dist/cli/chunks/{heartbeat-handler-HQQWEEQQ.js → heartbeat-handler-RYIRAGZ7.js} +4 -4
  418. package/dist/cli/chunks/heartbeat-scheduler-O6TI5E4P.js +2 -0
  419. package/dist/cli/chunks/hnsw-adapter-TOVTN23J.js +2 -0
  420. package/dist/cli/chunks/hnsw-index-KCZ75V7K.js +2 -0
  421. package/dist/cli/chunks/{hnsw-legacy-bridge-GPZIKYFD.js → hnsw-legacy-bridge-SSENBBPR.js} +2 -2
  422. package/dist/cli/chunks/{better-sqlite3-6AGIBSVE.js → hnswlib-node-ILDTCGLZ.js} +2 -2
  423. package/dist/cli/chunks/{hooks-AYLAGFOK.js → hooks-LR5KQMN5.js} +10 -10
  424. package/dist/cli/chunks/hybrid-router-4JEPC4JZ.js +2 -0
  425. package/dist/cli/chunks/{hypergraph-engine-56FMXI3T.js → hypergraph-engine-NDZA2DKP.js} +2 -2
  426. package/dist/cli/chunks/{hypergraph-handler-APEVT5IE.js → hypergraph-handler-ADMWVHBT.js} +3 -3
  427. package/dist/cli/chunks/impact-analyzer-3MHIU3SE.js +2 -0
  428. package/dist/cli/chunks/{init-handler-5DWF4REQ.js → init-handler-MGCYDX62.js} +6 -6
  429. package/dist/cli/chunks/init-wizard-ERBO5JNA.js +2 -0
  430. package/dist/cli/chunks/kernel-XJPIIWET.js +2 -0
  431. package/dist/cli/chunks/{kilocode-installer-XKAUA5VA.js → kilocode-installer-DQVWZUKP.js} +2 -2
  432. package/dist/cli/chunks/{kiro-installer-NI2KIYJE.js → kiro-installer-TINLYZ22.js} +2 -2
  433. package/dist/cli/chunks/knowledge-graph-NTJEG6ZE.js +2 -0
  434. package/dist/cli/chunks/{learning-ZIUMUNXZ.js → learning-KBT3S5WW.js} +3 -3
  435. package/dist/cli/chunks/{llm-router-IL52EF2V.js → llm-router-2MX5LUAB.js} +4 -4
  436. package/dist/cli/chunks/llm-router-service-4T66BGB5.js +2 -0
  437. package/dist/cli/chunks/{load-B5LFYD6O.js → load-IQWTGMLZ.js} +2 -2
  438. package/dist/cli/chunks/load-test-PM674TSK.js +2 -0
  439. package/dist/cli/chunks/{mcp-K6GZLWBC.js → mcp-GCTTJUBZ.js} +2 -2
  440. package/dist/cli/chunks/{memory-NCQRVSN6.js → memory-XQVPI4UT.js} +5 -5
  441. package/dist/cli/chunks/memory-backend-53NQ5CG7.js +2 -0
  442. package/dist/cli/chunks/memory-handlers-XD7MSFUN.js +2 -0
  443. package/dist/cli/chunks/{multi-model-executor-R4LBSJWK.js → multi-model-executor-JC63UCWG.js} +2 -2
  444. package/dist/cli/chunks/{opencode-installer-I6CBR3PV.js → opencode-installer-6VJGEBIU.js} +2 -2
  445. package/dist/cli/chunks/{orchestrator-5FXUCES6.js → orchestrator-B75QWJUF.js} +5 -5
  446. package/dist/cli/chunks/pattern-null-store-IF2RG2ON.js +2 -0
  447. package/dist/cli/chunks/{pipeline-GDKCTXJH.js → pipeline-TCBQ2UTZ.js} +2 -2
  448. package/dist/cli/chunks/{platform-ZFY3F4T3.js → platform-T43AYI3Z.js} +2 -2
  449. package/dist/cli/chunks/{plugin-HQMEN3OS.js → plugin-MSI3ZU3Z.js} +2 -2
  450. package/dist/cli/chunks/{prime-radiant-advanced-wasm-LSJGF4CV.js → prime-radiant-advanced-wasm-V62CWI6M.js} +2 -2
  451. package/dist/cli/chunks/protocol-executor-7AS75ZWT.js +2 -0
  452. package/dist/cli/chunks/{protocol-handler-BMDNIGPP.js → protocol-handler-OH2INET2.js} +2 -2
  453. package/dist/cli/chunks/{prove-ABVGAG4Z.js → prove-6PTMXMUL.js} +2 -2
  454. package/dist/cli/chunks/provider-manager-AU2C4AET.js +2 -0
  455. package/dist/cli/chunks/qe-reasoning-bank-WATQRCFO.js +2 -0
  456. package/dist/cli/chunks/{quality-ENJXPNP5.js → quality-PLNQN5GU.js} +2 -2
  457. package/dist/cli/chunks/queen-coordinator-IOCC4VQH.js +2 -0
  458. package/dist/cli/chunks/{real-embeddings-W3GNAEJO.js → real-embeddings-OW4OKR77.js} +2 -2
  459. package/dist/cli/chunks/{roocode-installer-4FJNQ7PU.js → roocode-installer-C32LCYAJ.js} +2 -2
  460. package/dist/cli/chunks/router-SCJMX6WA.js +2 -0
  461. package/dist/cli/chunks/routing-feedback-RWC7F553.js +2 -0
  462. package/dist/cli/chunks/{routing-handler-GFS5FA4F.js → routing-handler-CKFXXPMI.js} +2 -2
  463. package/dist/cli/chunks/{ruvector-commands-GBMYNJKN.js → ruvector-commands-GERRPTJL.js} +2 -2
  464. package/dist/cli/chunks/{rvf-dual-writer-STUAQT6U.js → rvf-dual-writer-5FAB2QPA.js} +2 -2
  465. package/dist/cli/chunks/{rvf-migration-adapter-LO6DBNJH.js → rvf-migration-adapter-46COKWYB.js} +2 -2
  466. package/dist/cli/chunks/{rvf-migration-coordinator-I5AD4VJ2.js → rvf-migration-coordinator-AJVRWSNC.js} +2 -2
  467. package/dist/cli/chunks/rvf-native-adapter-W2RT6PTO.js +2 -0
  468. package/dist/cli/chunks/safe-db-HO2LCAO3.js +2 -0
  469. package/dist/cli/chunks/schedule-XENCR4MR.js +2 -0
  470. package/dist/cli/chunks/scheduler-WKZ3O2SS.js +2 -0
  471. package/dist/cli/chunks/{security-X3WCA5K5.js → security-Q622IVRB.js} +3 -3
  472. package/dist/cli/chunks/{shared-rvf-adapter-Z4FSPWNP.js → shared-rvf-adapter-EST24R3R.js} +2 -2
  473. package/dist/cli/chunks/{shared-rvf-dual-writer-QOPOIRIC.js → shared-rvf-dual-writer-CP6EXKBT.js} +2 -2
  474. package/dist/cli/chunks/sqlite-persistence-IN6BOSCX.js +2 -0
  475. package/dist/cli/chunks/{status-handler-B2B5QBVK.js → status-handler-LLRQB4E2.js} +2 -2
  476. package/dist/cli/chunks/{structural-health-KT47LBVH.js → structural-health-BUFWTNN2.js} +2 -2
  477. package/dist/cli/chunks/{sync-VWD6OOUR.js → sync-JDG4SNT5.js} +2 -2
  478. package/dist/cli/chunks/sync-RDL2RUOV.js +2 -0
  479. package/dist/cli/chunks/{task-handler-X5JT5YBF.js → task-handler-KPP6ZXA6.js} +2 -2
  480. package/dist/cli/chunks/{task-handlers-IW4GQDW4.js → task-handlers-MRK2BQWI.js} +3 -3
  481. package/dist/cli/chunks/{test-MBZSUASD.js → test-7NYFTHRY.js} +4 -4
  482. package/dist/cli/chunks/{test-scheduling-E5KHKRZS.js → test-scheduling-LGPKDMWD.js} +3 -3
  483. package/dist/cli/chunks/token-bootstrap-H5JHB7TD.js +2 -0
  484. package/dist/cli/chunks/{token-usage-ECJSPOQB.js → token-usage-TWPDS5U3.js} +2 -2
  485. package/dist/cli/chunks/{transformers-UZJAQ7OZ.js → transformers-GRNPPUHM.js} +2 -2
  486. package/dist/cli/chunks/{tree-sitter-wasm-parser-H6BU2E5R.js → tree-sitter-wasm-parser-DOH5F6TO.js} +2 -2
  487. package/dist/cli/chunks/{types-PM7NT3MH.js → types-NYV3YKE3.js} +2 -2
  488. package/dist/cli/chunks/unified-memory-6MXOYRXZ.js +2 -0
  489. package/dist/cli/chunks/unified-memory-hnsw-HY3JJD5Z.js +2 -0
  490. package/dist/cli/chunks/unified-persistence-LKQNQYRY.js +2 -0
  491. package/dist/cli/chunks/{upgrade-FS2XYC2P.js → upgrade-GDJMRYAT.js} +2 -2
  492. package/dist/cli/chunks/{validate-4Y2BNN3A.js → validate-SIRFOPPM.js} +2 -2
  493. package/dist/cli/chunks/{validate-swarm-Z7QXZSUE.js → validate-swarm-XGMJYR6X.js} +2 -2
  494. package/dist/cli/chunks/{vibium-VZ6L3O2G.js → vibium-NP6ENRKV.js} +2 -2
  495. package/dist/cli/chunks/visual-security-7TBWICHP.js +2 -0
  496. package/dist/cli/chunks/{web-tree-sitter-H7P37W5U.js → web-tree-sitter-YDBWPYZD.js} +2 -2
  497. package/dist/cli/chunks/{windsurf-installer-IB2VHSZS.js → windsurf-installer-MFI6EAPH.js} +2 -2
  498. package/dist/cli/chunks/witness-chain-24SVOWQL.js +2 -0
  499. package/dist/cli/chunks/{witness-chain-C4DISYJN.js → witness-chain-YHLBWQQ3.js} +2 -2
  500. package/dist/cli/chunks/{workflow-IGM7KVIO.js → workflow-TA6RY7R5.js} +4 -4
  501. package/dist/cli/chunks/workflow-orchestrator-XBDXCTLY.js +2 -0
  502. package/dist/cli/chunks/wrappers-DS77IK4H.js +2 -0
  503. package/dist/cli/commands/eval.js +2 -2
  504. package/dist/kernel/unified-memory-schemas.d.ts +3 -2
  505. package/dist/kernel/unified-memory-schemas.js +3 -2
  506. package/dist/kernel/unified-memory.js +3 -1
  507. package/dist/learning/aqe-learning-engine.js +32 -0
  508. package/dist/learning/experience-capture.d.ts +8 -0
  509. package/dist/learning/experience-capture.js +30 -0
  510. package/dist/learning/pattern-null-store.d.ts +32 -0
  511. package/dist/learning/pattern-null-store.js +77 -0
  512. package/dist/learning/pattern-store.d.ts +10 -0
  513. package/dist/learning/pattern-store.js +23 -0
  514. package/dist/mcp/bundle.js +377 -347
  515. package/dist/mcp/handlers/validation-pipeline-handler.d.ts +19 -0
  516. package/dist/mcp/handlers/validation-pipeline-handler.js +10 -0
  517. package/dist/migrations/20260611_add_pattern_nulls_table.d.ts +26 -0
  518. package/dist/migrations/20260611_add_pattern_nulls_table.js +63 -0
  519. package/dist/validation/pipeline.d.ts +25 -0
  520. package/dist/validation/pipeline.js +28 -5
  521. package/dist/validation/steps/requirements.js +5 -0
  522. package/package.json +3 -2
  523. package/dist/cli/chunks/adapter-XZVL3DHO.js +0 -2
  524. package/dist/cli/chunks/aqe-learning-engine-YIL25K6W.js +0 -2
  525. package/dist/cli/chunks/audit-WPIRUJNZ.js +0 -3
  526. package/dist/cli/chunks/base-YCYV23Q3.js +0 -2
  527. package/dist/cli/chunks/browser-workflow-ALCOCRA2.js +0 -2
  528. package/dist/cli/chunks/chunk-EIL7FQC4.js +0 -65
  529. package/dist/cli/chunks/chunk-RLZDXQNM.js +0 -2
  530. package/dist/cli/chunks/chunk-W5C7R2LS.js +0 -12
  531. package/dist/cli/chunks/client-RPB6RYVY.js +0 -2
  532. package/dist/cli/chunks/core-handlers-QFJT5NX6.js +0 -2
  533. package/dist/cli/chunks/cross-domain-router-5GJ7WZKX.js +0 -2
  534. package/dist/cli/chunks/dream-C6VNLTON.js +0 -2
  535. package/dist/cli/chunks/heartbeat-scheduler-4SBO27BG.js +0 -2
  536. package/dist/cli/chunks/hnsw-adapter-W7G6VNXW.js +0 -2
  537. package/dist/cli/chunks/hnsw-index-LENA5QML.js +0 -2
  538. package/dist/cli/chunks/hybrid-router-IXHIC45P.js +0 -2
  539. package/dist/cli/chunks/impact-analyzer-DKGVMYU6.js +0 -2
  540. package/dist/cli/chunks/init-wizard-BBY3LY3F.js +0 -2
  541. package/dist/cli/chunks/kernel-7CUW7G62.js +0 -2
  542. package/dist/cli/chunks/knowledge-graph-Q5CP47IP.js +0 -2
  543. package/dist/cli/chunks/llm-router-service-MTXCX7TO.js +0 -2
  544. package/dist/cli/chunks/load-test-YBWXASBO.js +0 -2
  545. package/dist/cli/chunks/memory-backend-52LANEA3.js +0 -2
  546. package/dist/cli/chunks/memory-handlers-KFW3HYAP.js +0 -2
  547. package/dist/cli/chunks/protocol-executor-TRYUS77M.js +0 -2
  548. package/dist/cli/chunks/provider-manager-6XQQN7FX.js +0 -2
  549. package/dist/cli/chunks/qe-reasoning-bank-3IUPE4DJ.js +0 -2
  550. package/dist/cli/chunks/queen-coordinator-VWPH4XPX.js +0 -2
  551. package/dist/cli/chunks/router-OIB6ODHA.js +0 -2
  552. package/dist/cli/chunks/routing-feedback-EKYPCZYG.js +0 -2
  553. package/dist/cli/chunks/rvf-native-adapter-7RXP2Q4Q.js +0 -2
  554. package/dist/cli/chunks/safe-db-MNKFEPBX.js +0 -2
  555. package/dist/cli/chunks/schedule-AJXABVXX.js +0 -2
  556. package/dist/cli/chunks/scheduler-LDWYHIAW.js +0 -2
  557. package/dist/cli/chunks/sqlite-persistence-A6GKDMOJ.js +0 -2
  558. package/dist/cli/chunks/sync-CKID22IW.js +0 -2
  559. package/dist/cli/chunks/token-bootstrap-TIDPJ5IG.js +0 -2
  560. package/dist/cli/chunks/unified-memory-27QJHABO.js +0 -2
  561. package/dist/cli/chunks/unified-memory-hnsw-76VUXR4H.js +0 -2
  562. package/dist/cli/chunks/unified-persistence-QRCGDEXH.js +0 -2
  563. package/dist/cli/chunks/visual-security-KB27O7BE.js +0 -2
  564. package/dist/cli/chunks/witness-chain-EYPXHRDV.js +0 -2
  565. package/dist/cli/chunks/workflow-orchestrator-6AQZ3USU.js +0 -2
  566. package/dist/cli/chunks/wrappers-PQXC263L.js +0 -2
@@ -1,2 +1,2 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.5");process.exit(0)}
2
- import{a as u,c as v,d as p}from"./chunk-4FTO3TPH.js";import{b as l}from"./chunk-ZUBJBAUD.js";import{a}from"./chunk-JPOEI7CJ.js";var P=["ollama","onnx","gemini","openrouter","openai","claude","azure-openai","bedrock"];async function x(e={}){if(e.providerManager){let d=v({projectRoot:e.projectRoot,override:e.override,env:e.env}),f=new a(e.providerManager,d);return await f.initialize(),{router:f,resolvedConfig:d,enabledProviders:y(d)}}if(!p({projectRoot:e.projectRoot,env:e.env}))return null;let r=v({projectRoot:e.projectRoot,override:e.override,env:e.env}),o=g(r,e.env??process.env);if(o.length===0)return null;let{primary:n,fallbacks:t}=R(r,o),i={primary:n,fallbacks:t,providers:m(r,o),loadBalancing:"round-robin",global:{enableCostTracking:!0,enableMetrics:!0}},c=new l(i),s=new a(c,r);return await s.initialize(),{router:s,resolvedConfig:r,enabledProviders:o}}function g(e,r=process.env){let o=u(r),n=[],t=i=>{n.includes(i)||!e.providers?.[i]?.enabled||o.has(i)&&n.push(i)};t(e.defaultProvider);for(let i of e.fallbackChain?.entries??[])t(i.provider);for(let i of P)t(i);return n}function y(e){let r=new Set([e.defaultProvider]);for(let o of e.fallbackChain?.entries??[])r.add(o.provider);return Array.from(r)}function R(e,r){if(r.length===0)throw new Error("pickPrimaryAndFallbacks: no enabled providers");let o=r.includes(e.defaultProvider)?e.defaultProvider:r[0],n=r.filter(t=>t!==o);return{primary:o,fallbacks:n}}function m(e,r){let o={};for(let n of r){let t=e.providers?.[n];t&&(o[n]=t)}return o}export{x as a,g as b,R as c};
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.7");process.exit(0)}
2
+ import{a as u,c as v,d as p}from"./chunk-CW7JQVXV.js";import{b as l}from"./chunk-RJBCIN2G.js";import{a}from"./chunk-MK73CCKO.js";var P=["ollama","onnx","gemini","openrouter","openai","claude","azure-openai","bedrock"];async function x(e={}){if(e.providerManager){let d=v({projectRoot:e.projectRoot,override:e.override,env:e.env}),f=new a(e.providerManager,d);return await f.initialize(),{router:f,resolvedConfig:d,enabledProviders:y(d)}}if(!p({projectRoot:e.projectRoot,env:e.env}))return null;let r=v({projectRoot:e.projectRoot,override:e.override,env:e.env}),o=g(r,e.env??process.env);if(o.length===0)return null;let{primary:n,fallbacks:t}=R(r,o),i={primary:n,fallbacks:t,providers:m(r,o),loadBalancing:"round-robin",global:{enableCostTracking:!0,enableMetrics:!0}},c=new l(i),s=new a(c,r);return await s.initialize(),{router:s,resolvedConfig:r,enabledProviders:o}}function g(e,r=process.env){let o=u(r),n=[],t=i=>{n.includes(i)||!e.providers?.[i]?.enabled||o.has(i)&&n.push(i)};t(e.defaultProvider);for(let i of e.fallbackChain?.entries??[])t(i.provider);for(let i of P)t(i);return n}function y(e){let r=new Set([e.defaultProvider]);for(let o of e.fallbackChain?.entries??[])r.add(o.provider);return Array.from(r)}function R(e,r){if(r.length===0)throw new Error("pickPrimaryAndFallbacks: no enabled providers");let o=r.includes(e.defaultProvider)?e.defaultProvider:r[0],n=r.filter(t=>t!==o);return{primary:o,fallbacks:n}}function m(e,r){let o={};for(let n of r){let t=e.providers?.[n];t&&(o[n]=t)}return o}export{x as a,g as b,R as c};
@@ -1,2 +1,2 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.5");process.exit(0)}
2
- import{a as h}from"./chunk-RLZDXQNM.js";import{c as m}from"./chunk-VC256KH2.js";h();var g=m.create("regret-tracker"),l=50,R=.9,d=1.1;function f(o,t){let e=o.length;if(e<2)return 0;let n=0,r=0,i=0,a=0;for(let s=0;s<e;s++)n+=o[s],r+=t[s],i+=o[s]*t[s],a+=o[s]*o[s];let u=e*a-n*n;return Math.abs(u)<1e-10?0:(e*i-n*r)/u}var c=class{domains=new Map;alertCallbacks=[];alerts=[];maxAlerts;recentWindow;constructor(t){this.maxAlerts=t?.maxAlerts??100,this.recentWindow=t?.recentWindow??20}recordDecision(t,e,n){let r=this.getOrCreateDomainState(t),i=Math.max(0,n-e);if(r.cumulativeRegret+=i,r.decisionCount++,r.points.push({decisionCount:r.decisionCount,cumulativeRegret:r.cumulativeRegret,timestamp:Date.now()}),r.decisionCount>=l){let a=this.classifyGrowthRate(r.points);r.lastGrowthRate!=="insufficient_data"&&a!==r.lastGrowthRate&&this.emitAlert(t,r.lastGrowthRate,a),r.lastGrowthRate=a}}getCumulativeRegret(t){return this.domains.get(t)?.cumulativeRegret??0}getRegretCurve(t){let e=this.domains.get(t);return e?[...e.points]:[]}getRegretGrowthRate(t){let e=this.domains.get(t);return e?this.classifyGrowthRate(e.points):"insufficient_data"}detectStagnation(t){let e=this.getRegretGrowthRate(t);return e==="linear"||e==="superlinear"}getHealthSummary(){let t=[];for(let[e,n]of this.domains){let r=this.classifyGrowthRate(n.points),i=this.computeLogLogSlope(n.points),a=this.computeRecentAvgRegret(n);t.push({domain:e,totalDecisions:n.decisionCount,cumulativeRegret:n.cumulativeRegret,growthRate:r,stagnating:r==="linear"||r==="superlinear",slope:i,recentAvgRegret:a})}return t.sort((e,n)=>e.domain.localeCompare(n.domain)),t}onAlert(t){this.alertCallbacks.push(t)}getAlerts(){return[...this.alerts]}getTrackedDomains(){return[...this.domains.keys()].sort()}getTotalDecisions(){let t=0;for(let e of this.domains.values())t+=e.decisionCount;return t}reset(t){t?this.domains.delete(t):(this.domains.clear(),this.alerts=[])}getOrCreateDomainState(t){let e=this.domains.get(t);return e||(e={points:[],cumulativeRegret:0,decisionCount:0,lastGrowthRate:"insufficient_data"},this.domains.set(t,e)),e}classifyGrowthRate(t){if(t.length<l)return"insufficient_data";let e=this.computeLogLogSlope(t);return e===void 0?"insufficient_data":e<R?"sublinear":e<=d?"linear":"superlinear"}computeLogLogSlope(t){if(t.length<l)return;let e=t.filter(i=>i.cumulativeRegret>0&&i.decisionCount>0);if(e.length<2)return;let n=e.map(i=>Math.log(i.decisionCount)),r=e.map(i=>Math.log(i.cumulativeRegret));return f(n,r)}computeRecentAvgRegret(t){if(t.points.length<2)return 0;let e=Math.min(this.recentWindow,t.points.length),n=t.points.slice(-e),r=n[0],i=n[n.length-1],a=i.cumulativeRegret-r.cumulativeRegret,u=i.decisionCount-r.decisionCount;return u<=0?0:a/u}emitAlert(t,e,n){let r={domain:t,previousRate:e,newRate:n,timestamp:Date.now(),message:`Domain "${t}" regret growth changed from ${e} to ${n}`};this.alerts.push(r),this.alerts.length>this.maxAlerts&&this.alerts.shift(),g.info("Regret growth rate transition",{domain:t,previousRate:e,newRate:n});for(let i of this.alertCallbacks)try{i(r)}catch(a){g.error("Alert callback error",a instanceof Error?a:void 0)}}};function b(o){return new c(o)}export{b as a};
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.7");process.exit(0)}
2
+ import{a as h}from"./chunk-DF7V6X3N.js";import{c as m}from"./chunk-222ZQTL5.js";h();var g=m.create("regret-tracker"),l=50,R=.9,d=1.1;function f(o,t){let e=o.length;if(e<2)return 0;let n=0,r=0,i=0,a=0;for(let s=0;s<e;s++)n+=o[s],r+=t[s],i+=o[s]*t[s],a+=o[s]*o[s];let u=e*a-n*n;return Math.abs(u)<1e-10?0:(e*i-n*r)/u}var c=class{domains=new Map;alertCallbacks=[];alerts=[];maxAlerts;recentWindow;constructor(t){this.maxAlerts=t?.maxAlerts??100,this.recentWindow=t?.recentWindow??20}recordDecision(t,e,n){let r=this.getOrCreateDomainState(t),i=Math.max(0,n-e);if(r.cumulativeRegret+=i,r.decisionCount++,r.points.push({decisionCount:r.decisionCount,cumulativeRegret:r.cumulativeRegret,timestamp:Date.now()}),r.decisionCount>=l){let a=this.classifyGrowthRate(r.points);r.lastGrowthRate!=="insufficient_data"&&a!==r.lastGrowthRate&&this.emitAlert(t,r.lastGrowthRate,a),r.lastGrowthRate=a}}getCumulativeRegret(t){return this.domains.get(t)?.cumulativeRegret??0}getRegretCurve(t){let e=this.domains.get(t);return e?[...e.points]:[]}getRegretGrowthRate(t){let e=this.domains.get(t);return e?this.classifyGrowthRate(e.points):"insufficient_data"}detectStagnation(t){let e=this.getRegretGrowthRate(t);return e==="linear"||e==="superlinear"}getHealthSummary(){let t=[];for(let[e,n]of this.domains){let r=this.classifyGrowthRate(n.points),i=this.computeLogLogSlope(n.points),a=this.computeRecentAvgRegret(n);t.push({domain:e,totalDecisions:n.decisionCount,cumulativeRegret:n.cumulativeRegret,growthRate:r,stagnating:r==="linear"||r==="superlinear",slope:i,recentAvgRegret:a})}return t.sort((e,n)=>e.domain.localeCompare(n.domain)),t}onAlert(t){this.alertCallbacks.push(t)}getAlerts(){return[...this.alerts]}getTrackedDomains(){return[...this.domains.keys()].sort()}getTotalDecisions(){let t=0;for(let e of this.domains.values())t+=e.decisionCount;return t}reset(t){t?this.domains.delete(t):(this.domains.clear(),this.alerts=[])}getOrCreateDomainState(t){let e=this.domains.get(t);return e||(e={points:[],cumulativeRegret:0,decisionCount:0,lastGrowthRate:"insufficient_data"},this.domains.set(t,e)),e}classifyGrowthRate(t){if(t.length<l)return"insufficient_data";let e=this.computeLogLogSlope(t);return e===void 0?"insufficient_data":e<R?"sublinear":e<=d?"linear":"superlinear"}computeLogLogSlope(t){if(t.length<l)return;let e=t.filter(i=>i.cumulativeRegret>0&&i.decisionCount>0);if(e.length<2)return;let n=e.map(i=>Math.log(i.decisionCount)),r=e.map(i=>Math.log(i.cumulativeRegret));return f(n,r)}computeRecentAvgRegret(t){if(t.points.length<2)return 0;let e=Math.min(this.recentWindow,t.points.length),n=t.points.slice(-e),r=n[0],i=n[n.length-1],a=i.cumulativeRegret-r.cumulativeRegret,u=i.decisionCount-r.decisionCount;return u<=0?0:a/u}emitAlert(t,e,n){let r={domain:t,previousRate:e,newRate:n,timestamp:Date.now(),message:`Domain "${t}" regret growth changed from ${e} to ${n}`};this.alerts.push(r),this.alerts.length>this.maxAlerts&&this.alerts.shift(),g.info("Regret growth rate transition",{domain:t,previousRate:e,newRate:n});for(let i of this.alertCallbacks)try{i(r)}catch(a){g.error("Alert callback error",a instanceof Error?a:void 0)}}};function b(o){return new c(o)}export{b as a};
@@ -1,2 +1,2 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.5");process.exit(0)}
2
- import{j as m}from"./chunk-GMU7P5O3.js";import{a as l,c as d}from"./chunk-S73KENCH.js";d();var c=class extends m{config={name:"qe/tests/load",description:"Run agent load tests to validate fleet scalability. Supports light, medium, and heavy workload profiles. Uses mock agents by default (safe); set mockMode=false to test with real fleet agents (requires fleet_init). Reports bottlenecks and pass/fail criteria.",domain:"test-execution",schema:this.buildSchema(),timeout:3e5};buildSchema(){return{type:"object",properties:{targetAgents:{type:"number",description:"Target number of concurrent agents to simulate",default:10,minimum:1,maximum:200},profile:{type:"string",description:"Workload profile: light, medium, or heavy",enum:["light","medium","heavy"],default:"medium"},durationMs:{type:"number",description:"Test duration in milliseconds",default:3e4,minimum:5e3,maximum:3e5},mockMode:{type:"boolean",description:"Use mock agents (true, default) or real fleet agents (false, requires fleet_init)",default:!0}}}}async execute(t,u){try{let{createAgentLoadTester:r}=await import("./load-B5LFYD6O.js"),a=t.profile||"medium",o=t.targetAgents||10,i=t.durationMs||3e4,n=t.mockMode!==!1,s=await r({maxAgents:o,workloadProfile:a,mockMode:n}).runTest(o,i),e=s.bottlenecks;return{success:!0,data:{testId:u.requestId,profile:a,targetAgents:o,duration:s.duration,mockMode:n,passed:s.success,bottleneckCount:e?.bottlenecks?.length??0,report:{overallSeverity:e?.overallSeverity??"none",hasCritical:e?.hasCritical??!1,checksPerformed:e?.summary?.totalChecks??0,bottlenecksDetected:e?.summary?.detected??0},summary:`Load test (${a}, ${n?"mock":"real"}): ${o} agents, ${i}ms \u2014 ${s.success?"PASSED":"FAILED"}`+(e?.hasCritical?" [CRITICAL BOTTLENECKS]":"")}}}catch(r){return{success:!1,error:l(r)}}}};export{c as a};
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.7");process.exit(0)}
2
+ import{j as m}from"./chunk-XK7P7OXO.js";import{a as l,c as d}from"./chunk-XWPUCPYW.js";d();var c=class extends m{config={name:"qe/tests/load",description:"Run agent load tests to validate fleet scalability. Supports light, medium, and heavy workload profiles. Uses mock agents by default (safe); set mockMode=false to test with real fleet agents (requires fleet_init). Reports bottlenecks and pass/fail criteria.",domain:"test-execution",schema:this.buildSchema(),timeout:3e5};buildSchema(){return{type:"object",properties:{targetAgents:{type:"number",description:"Target number of concurrent agents to simulate",default:10,minimum:1,maximum:200},profile:{type:"string",description:"Workload profile: light, medium, or heavy",enum:["light","medium","heavy"],default:"medium"},durationMs:{type:"number",description:"Test duration in milliseconds",default:3e4,minimum:5e3,maximum:3e5},mockMode:{type:"boolean",description:"Use mock agents (true, default) or real fleet agents (false, requires fleet_init)",default:!0}}}}async execute(t,u){try{let{createAgentLoadTester:r}=await import("./load-IQWTGMLZ.js"),a=t.profile||"medium",o=t.targetAgents||10,i=t.durationMs||3e4,n=t.mockMode!==!1,s=await r({maxAgents:o,workloadProfile:a,mockMode:n}).runTest(o,i),e=s.bottlenecks;return{success:!0,data:{testId:u.requestId,profile:a,targetAgents:o,duration:s.duration,mockMode:n,passed:s.success,bottleneckCount:e?.bottlenecks?.length??0,report:{overallSeverity:e?.overallSeverity??"none",hasCritical:e?.hasCritical??!1,checksPerformed:e?.summary?.totalChecks??0,bottlenecksDetected:e?.summary?.detected??0},summary:`Load test (${a}, ${n?"mock":"real"}): ${o} agents, ${i}ms \u2014 ${s.success?"PASSED":"FAILED"}`+(e?.hasCritical?" [CRITICAL BOTTLENECKS]":"")}}}catch(r){return{success:!1,error:l(r)}}}};export{c as a};
@@ -1,2 +1,2 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.5");process.exit(0)}
2
- import{j as p}from"./chunk-GMU7P5O3.js";import{a as f,c as R}from"./chunk-S73KENCH.js";R();var u=class extends p{config={name:"qe/workflows/browser-load",description:"Load, validate, and prepare browser automation workflows from inline YAML or built-in templates. Returns the resolved workflow with steps and variable bindings, ready for browser execution. Templates: login-flow, form-validation, visual-regression, oauth-flow, etc.",domain:"test-execution",schema:this.buildSchema()};buildSchema(){return{type:"object",properties:{workflowYaml:{type:"string",description:"Inline YAML workflow definition. Mutually exclusive with templateName."},templateName:{type:"string",description:"Built-in template name to load.",enum:["login-flow","oauth-flow","scraping-workflow","visual-regression","form-validation","navigation-flow","api-integration","performance-audit","accessibility-audit"]},variables:{type:"object",description:'Runtime variable overrides (e.g., { "baseUrl": "https://example.com" })'}}}}async execute(r,C){try{let{WorkflowLoader:n,WORKFLOW_TEMPLATES:g,WORKFLOW_DESCRIPTIONS:v,interpolateVariables:b}=await import("./browser-M5BVQMBI.js"),{parse:k}=await import("yaml"),d=new n,l=[...g],y=v;if(!r.workflowYaml&&!r.templateName)return{success:!0,data:{workflowName:"none",description:"No workflow specified. Use templateName or workflowYaml.",source:"none",templateUsed:null,steps:[],variables:{defined:[],provided:{}},validation:{valid:!0,errors:[],warnings:[]},availableTemplates:l,summary:`Available templates: ${l.join(", ")}`}};let e,i,t=null;r.workflowYaml?(i="inline-yaml",e=k(r.workflowYaml)):(i="template",t=r.templateName,e=await d.load(r.templateName));let a=await d.validate(e),w=(e.steps??[]).map(o=>{let s=o.config;if(r.variables){let c={};for(let[h,m]of Object.entries(s))c[h]=typeof m=="string"?b(m,r.variables):m;s=c}return{name:o.name,action:o.action,config:s,optional:o.optional??!1,assertionCount:o.assertions?.length??0}});return{success:!0,data:{workflowName:e.name||t||"custom",description:e.description||t&&y[t]||"",source:i,templateUsed:t,steps:w,variables:{defined:(e.variables??[]).map(o=>({name:o.name,type:o.type,required:o.required,hasDefault:o.default!==void 0})),provided:r.variables||{}},validation:{valid:a.valid,errors:a.errors,warnings:a.warnings},availableTemplates:l,summary:a.valid?`Workflow "${e.name}" loaded (${i}): ${w.length} steps, ${(e.variables??[]).length} variables`:`Workflow "${e.name}" has validation errors: ${a.errors.join("; ")}`}}}catch(n){return{success:!1,error:f(n)}}}};export{u as a};
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.7");process.exit(0)}
2
+ import{j as p}from"./chunk-XK7P7OXO.js";import{a as f,c as R}from"./chunk-XWPUCPYW.js";R();var u=class extends p{config={name:"qe/workflows/browser-load",description:"Load, validate, and prepare browser automation workflows from inline YAML or built-in templates. Returns the resolved workflow with steps and variable bindings, ready for browser execution. Templates: login-flow, form-validation, visual-regression, oauth-flow, etc.",domain:"test-execution",schema:this.buildSchema()};buildSchema(){return{type:"object",properties:{workflowYaml:{type:"string",description:"Inline YAML workflow definition. Mutually exclusive with templateName."},templateName:{type:"string",description:"Built-in template name to load.",enum:["login-flow","oauth-flow","scraping-workflow","visual-regression","form-validation","navigation-flow","api-integration","performance-audit","accessibility-audit"]},variables:{type:"object",description:'Runtime variable overrides (e.g., { "baseUrl": "https://example.com" })'}}}}async execute(r,C){try{let{WorkflowLoader:n,WORKFLOW_TEMPLATES:g,WORKFLOW_DESCRIPTIONS:v,interpolateVariables:b}=await import("./browser-4UKMW2RE.js"),{parse:k}=await import("yaml"),d=new n,l=[...g],y=v;if(!r.workflowYaml&&!r.templateName)return{success:!0,data:{workflowName:"none",description:"No workflow specified. Use templateName or workflowYaml.",source:"none",templateUsed:null,steps:[],variables:{defined:[],provided:{}},validation:{valid:!0,errors:[],warnings:[]},availableTemplates:l,summary:`Available templates: ${l.join(", ")}`}};let e,i,t=null;r.workflowYaml?(i="inline-yaml",e=k(r.workflowYaml)):(i="template",t=r.templateName,e=await d.load(r.templateName));let a=await d.validate(e),w=(e.steps??[]).map(o=>{let s=o.config;if(r.variables){let c={};for(let[h,m]of Object.entries(s))c[h]=typeof m=="string"?b(m,r.variables):m;s=c}return{name:o.name,action:o.action,config:s,optional:o.optional??!1,assertionCount:o.assertions?.length??0}});return{success:!0,data:{workflowName:e.name||t||"custom",description:e.description||t&&y[t]||"",source:i,templateUsed:t,steps:w,variables:{defined:(e.variables??[]).map(o=>({name:o.name,type:o.type,required:o.required,hasDefault:o.default!==void 0})),provided:r.variables||{}},validation:{valid:a.valid,errors:a.errors,warnings:a.warnings},availableTemplates:l,summary:a.valid?`Workflow "${e.name}" loaded (${i}): ${w.length} steps, ${(e.variables??[]).length} variables`:`Workflow "${e.name}" has validation errors: ${a.errors.join("; ")}`}}}catch(n){return{success:!1,error:f(n)}}}};export{u as a};
@@ -1,2 +1,2 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.5");process.exit(0)}
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.7");process.exit(0)}
2
2
  var h=class{executionHistory=[];learnedDurations=new Map;runCount=0;lastPrunedCount=0;learningRate;maxHistorySize;constructor(t){this.learningRate=t?.learningRate??.3,this.maxHistorySize=t?.maxHistorySize??1e4}buildTestDAG(t){let e=new Map,n=new Map;for(let i of t){let s=this.applyLearnedDuration(i);e.set(s.id,s),n.set(s.id,[])}for(let i of t)for(let s of i.dependencies){if(!e.has(s))throw new Error(`Test '${i.id}' depends on '${s}' which does not exist in the test set`);n.get(s).push(i.id)}let o=this.computeCriticalPath(e,n),a=this.computeParallelGroups(e,n);return{nodes:e,edges:n,criticalPath:o,parallelGroups:a}}findCriticalPath(t){return t.criticalPath.map(e=>t.nodes.get(e)).filter(e=>e!==void 0)}findParallelBranches(t){return t.parallelGroups.map(e=>e.map(n=>t.nodes.get(n)).filter(n=>n!==void 0))}pruneByMinCut(t,e){let n=this.sumDurations(t.nodes);if(n<=e)return this.lastPrunedCount=0,t;let o=this.computeAttentionScores(t),a=Array.from(o.entries()).sort((r,l)=>r[1]-l[1]),i=new Set(t.criticalPath),s=new Set,c=n;for(let[r]of a){if(c<=e)break;if(i.has(r)||(t.edges.get(r)??[]).some(p=>!s.has(p)))continue;let d=t.nodes.get(r);d&&(s.add(r),c-=d.estimatedDuration)}this.lastPrunedCount=s.size;let u=Array.from(t.nodes.values()).filter(r=>!s.has(r.id));return this.buildTestDAG(u)}schedule(t){if(t.length===0)return{phases:[],totalEstimatedTime:0,criticalPathTime:0,parallelism:0};let e=this.buildTestDAG(t),o=this.findParallelBranches(e).map(u=>({tests:u,canRunInParallel:u.length>1})),a=this.computeCriticalPathDuration(e),i=this.sumDurations(e.nodes),s=o.reduce((u,r)=>r.canRunInParallel?u+Math.max(...r.tests.map(l=>l.estimatedDuration)):u+r.tests.reduce((l,d)=>l+d.estimatedDuration,0),0),c=s>0?i/s:1;return this.runCount++,{phases:o,totalEstimatedTime:s,criticalPathTime:a,parallelism:c}}getOptimizationStats(){return{totalTests:0,criticalPathLength:0,parallelGroupCount:0,prunedTests:this.lastPrunedCount,estimatedTimeSaved:0,historicalRuns:this.runCount,usingNativeBackend:!1}}recordExecution(t,e,n){this.executionHistory.push({testId:t,actualDuration:e,result:n,timestamp:Date.now()}),this.executionHistory.length>this.maxHistorySize&&(this.executionHistory=this.executionHistory.slice(-this.maxHistorySize));let o=this.learnedDurations.get(t);o!==void 0?this.learnedDurations.set(t,o*(1-this.learningRate)+e*this.learningRate):this.learnedDurations.set(t,e)}getLearnedDuration(t){return this.learnedDurations.get(t)}isNativeBackendAvailable(){return!1}computeCriticalPath(t,e){let n=this.topologicalSort(t,e);if(n.length===0)return[];let o=new Map,a=new Map;for(let r of n)o.set(r,t.get(r).estimatedDuration),a.set(r,null);for(let r of n){let l=o.get(r);for(let d of e.get(r)??[]){let p=t.get(d);if(!p)continue;let g=l+p.estimatedDuration;g>(o.get(d)??0)&&(o.set(d,g),a.set(d,r))}}let i=0,s=null;for(let[r,l]of o)l>i&&(i=l,s=r);if(!s)return[];let c=[],u=s;for(;u!==null;)c.unshift(u),u=a.get(u)??null;return c}computeCriticalPathDuration(t){return t.criticalPath.reduce((e,n)=>e+(t.nodes.get(n)?.estimatedDuration??0),0)}computeParallelGroups(t,e){let n=this.topologicalSort(t,e);if(n.length===0)return[];let o=new Map;for(let[u,r]of t)o.set(u,new Set(r.dependencies));let a=new Map;for(let u of n){let r=-1;for(let l of o.get(u)??new Set){let d=a.get(l);d!==void 0&&d>r&&(r=d)}a.set(u,r+1)}let i=new Map;for(let u of n){let r=a.get(u)??0;i.has(r)||i.set(r,[]),i.get(r).push(u)}let s=Math.max(...Array.from(i.keys()),-1),c=[];for(let u=0;u<=s;u++){let r=i.get(u);r&&r.length>0&&c.push(r)}return c}computeAttentionScores(t){let e=new Map,n=this.countTransitiveDependents(t);for(let[o,a]of t.nodes){let i=a.lastResult==="fail"?2:1,s=n.get(o)??0;e.set(o,a.priority*i*(1+s))}return e}countTransitiveDependents(t){let e=new Map,n=new Map,o=a=>{if(n.has(a))return n.get(a);let i=new Set;for(let s of t.edges.get(a)??[]){i.add(s);for(let c of o(s))i.add(c)}return n.set(a,i),i};for(let a of t.nodes.keys())e.set(a,o(a).size);return e}topologicalSort(t,e){let n=new Map;for(let i of t.keys())n.set(i,0);for(let i of e.values())for(let s of i)n.has(s)&&n.set(s,(n.get(s)??0)+1);let o=[];for(let[i,s]of n)s===0&&o.push(i);let a=[];for(;o.length>0;){let i=o.shift();a.push(i);for(let s of e.get(i)??[]){let c=(n.get(s)??0)-1;n.set(s,c),c===0&&o.push(s)}}if(a.length!==t.size)throw new Error(`Cycle detected in test DAG: sorted ${a.length} of ${t.size} nodes`);return a}applyLearnedDuration(t){let e=this.learnedDurations.get(t.id);return e!==void 0?{...t,estimatedDuration:Math.round(e)}:t}sumDurations(t){let e=0;for(let n of t.values())e+=n.estimatedDuration;return e}};function m(f){return new h(f)}export{h as a,m as b};
@@ -1,5 +1,5 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.5");process.exit(0)}
2
- import{a as X}from"./chunk-EIL7FQC4.js";import{a as D,b as _,c as $,d as I}from"./chunk-IUKERFLT.js";import{c as K,d as Y,e as J,f as Z}from"./chunk-VWN66V7U.js";import{b as C,f as G,i as U}from"./chunk-RZ7D5SHS.js";import{g as R}from"./chunk-G4GX6YKX.js";import{e as H}from"./chunk-RFNEEDPQ.js";import{i as j,m as de}from"./chunk-R573V37S.js";import{a as z}from"./chunk-RLZDXQNM.js";import{c as T}from"./chunk-VC256KH2.js";import{b as k,c as A}from"./chunk-IRS4HKAR.js";import{a as h,b as V,c as W}from"./chunk-S73KENCH.js";import{S as pe,b as B}from"./chunk-O5OOUMBB.js";z();W();var N={enableLearning:!0,enableGuidance:!0,enableRouting:!0,embeddingDimension:384,useONNXEmbeddings:!0,maxRoutingCandidates:10,routingWeights:{similarity:.3,performance:.4,capabilities:.3},coherenceThreshold:.4};var q=[{patternType:"test-template",name:"AAA Unit Test",description:"Arrange-Act-Assert pattern for clear, maintainable unit tests",template:{type:"code",content:`describe('{{className}}', () => {
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.7");process.exit(0)}
2
+ import{a as D,b as _,c as $,d as I}from"./chunk-OAXDI4XM.js";import{a as X}from"./chunk-JJELOEIY.js";import{c as K,d as Y,e as J,f as Z}from"./chunk-FQBNPSV2.js";import{b as C,f as G,i as U}from"./chunk-6F5KPT6U.js";import{g as R}from"./chunk-TY7XPI6R.js";import{e as H}from"./chunk-34NT5NBZ.js";import{i as j,m as de}from"./chunk-HBWAMCVB.js";import{a as z}from"./chunk-DF7V6X3N.js";import{c as T}from"./chunk-222ZQTL5.js";import{b as k,c as A}from"./chunk-2MLISLRR.js";import{a as h,b as V,c as W}from"./chunk-XWPUCPYW.js";import{S as pe,b as B}from"./chunk-76JYG426.js";z();W();var N={enableLearning:!0,enableGuidance:!0,enableRouting:!0,embeddingDimension:384,useONNXEmbeddings:!0,maxRoutingCandidates:10,routingWeights:{similarity:.3,performance:.4,capabilities:.3},coherenceThreshold:.4};var q=[{patternType:"test-template",name:"AAA Unit Test",description:"Arrange-Act-Assert pattern for clear, maintainable unit tests",template:{type:"code",content:`describe('{{className}}', () => {
3
3
  describe('{{methodName}}', () => {
4
4
  it('should {{expectedBehavior}}', {{async}} () => {
5
5
  // Arrange
@@ -317,4 +317,4 @@ On promotion:
317
317
  AND agent_id = 'aqe-hook-router'
318
318
  AND state_key = ?
319
319
  AND action_key = ?
320
- `);return s=>{try{let a=o.get(e,s);return a?{qValue:a.q_value,visits:a.visits}:void 0}catch{return}}}catch{return()=>{}}}getGuidance(e,r){return D(e)}generateContext(e,r){return I(e,r||{})}checkAntiPatterns(e,r){return $(e,r)}async embed(e){if(this.config.useONNXEmbeddings)try{let{computeRealEmbedding:r}=await import("./real-embeddings-W3GNAEJO.js"),t=await r(e);return t.length!==this.config.embeddingDimension?oe(t,this.config.embeddingDimension):t}catch(r){let{isUsingEndpoint:t}=await import("./real-embeddings-W3GNAEJO.js");if(t())throw r;process.env.DEBUG&&f.warn("ONNX embeddings unavailable, using hash fallback",{error:h(r)})}return se(e,this.config.embeddingDimension)}async getStats(){this.initialized||await this.initialize();let e=await this.patternStore.getStats(),r={};for(let a of U)r[a]=e.byDomain[a]||0;let t=this.stats.routingRequests,i=this.stats.routingRequests>0?this.stats.totalRoutingConfidence/this.stats.routingRequests:0,o=this.stats.learningOutcomes,s=this.stats.learningOutcomes>0?this.stats.successfulOutcomes/this.stats.learningOutcomes:0;if(t===0||o===0)try{let a=this.getSqliteStore().getAggregateOutcomeStats();t===0&&a.routingRequests>0&&(t=a.routingRequests,i=a.avgRoutingConfidence),o===0&&a.learningOutcomes>0&&(o=a.learningOutcomes,s=a.learningOutcomes>0?a.successfulOutcomes/a.learningOutcomes:a.avgPatternSuccessRate)}catch{}return{totalPatterns:e.totalPatterns,byDomain:r,routingRequests:t,avgRoutingConfidence:i,learningOutcomes:o,patternSuccessRate:s,patternStoreStats:e}}async dispose(){if(await this.patternStore.dispose(),this.sqliteStore&&(this.sqliteStore.close(),this.sqliteStore=null),this.rvfDualWriter){try{this.rvfDualWriter.close()}catch{}this.rvfDualWriter=null}this.initialized=!1}};function pt(n,e,r,t){return new L(n,e,r,t)}export{N as a,q as b,x as c,ne as d,Q as e,M as f,L as g,pt as h};
320
+ `);return s=>{try{let a=o.get(e,s);return a?{qValue:a.q_value,visits:a.visits}:void 0}catch{return}}}catch{return()=>{}}}getGuidance(e,r){return D(e)}generateContext(e,r){return I(e,r||{})}checkAntiPatterns(e,r){return $(e,r)}async embed(e){if(this.config.useONNXEmbeddings)try{let{computeRealEmbedding:r}=await import("./real-embeddings-OW4OKR77.js"),t=await r(e);return t.length!==this.config.embeddingDimension?oe(t,this.config.embeddingDimension):t}catch(r){let{isUsingEndpoint:t}=await import("./real-embeddings-OW4OKR77.js");if(t())throw r;process.env.DEBUG&&f.warn("ONNX embeddings unavailable, using hash fallback",{error:h(r)})}return se(e,this.config.embeddingDimension)}async getStats(){this.initialized||await this.initialize();let e=await this.patternStore.getStats(),r={};for(let a of U)r[a]=e.byDomain[a]||0;let t=this.stats.routingRequests,i=this.stats.routingRequests>0?this.stats.totalRoutingConfidence/this.stats.routingRequests:0,o=this.stats.learningOutcomes,s=this.stats.learningOutcomes>0?this.stats.successfulOutcomes/this.stats.learningOutcomes:0;if(t===0||o===0)try{let a=this.getSqliteStore().getAggregateOutcomeStats();t===0&&a.routingRequests>0&&(t=a.routingRequests,i=a.avgRoutingConfidence),o===0&&a.learningOutcomes>0&&(o=a.learningOutcomes,s=a.learningOutcomes>0?a.successfulOutcomes/a.learningOutcomes:a.avgPatternSuccessRate)}catch{}return{totalPatterns:e.totalPatterns,byDomain:r,routingRequests:t,avgRoutingConfidence:i,learningOutcomes:o,patternSuccessRate:s,patternStoreStats:e}}async dispose(){if(await this.patternStore.dispose(),this.sqliteStore&&(this.sqliteStore.close(),this.sqliteStore=null),this.rvfDualWriter){try{this.rvfDualWriter.close()}catch{}this.rvfDualWriter=null}this.initialized=!1}};function pt(n,e,r,t){return new L(n,e,r,t)}export{N as a,q as b,x as c,ne as d,Q as e,M as f,L as g,pt as h};
@@ -1,5 +1,5 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.5");process.exit(0)}
2
- import{a as v}from"./chunk-RLZDXQNM.js";import{c as l}from"./chunk-VC256KH2.js";import{S as R,b as g}from"./chunk-O5OOUMBB.js";v();R();import{createHash as m,randomUUID as f}from"crypto";var a=l.create("witness-chain"),p=class{logLikelihoodRatio=0;upperBound;lowerBound;observations=0;constructor(t=.05,e=.05){this.upperBound=Math.log(1/t),this.lowerBound=Math.log(e)}addWeightedEvidence(t,e){return this.logLikelihoodRatio+=t?e:-e,this.observations++,this.logLikelihoodRatio>=this.upperBound?"PASS":this.logLikelihoodRatio<=this.lowerBound?"FAIL":"INCONCLUSIVE"}addEvidence(t){return this.addWeightedEvidence(t,.5)}getRatio(){return this.logLikelihoodRatio}getObservations(){return this.observations}getBounds(){return{upper:this.upperBound,lower:this.lowerBound}}reset(){this.logLikelihoodRatio=0,this.observations=0}},c="0".repeat(64),h=class{receipts=[];lastHash=c;sprtAccumulators=new Map;appendWitness(t){let e=f(),i=Date.now(),s=this.receipts.length,n=this.lastHash+JSON.stringify(t)+i,o=m("sha256").update(n).digest("hex"),u={id:e,timestamp:i,previousHash:this.lastHash,hash:o,decision:t,chainIndex:s};return this.receipts.push(u),this.lastHash=o,this.updateSPRT(t),a.debug("Witness appended",{chainIndex:s,type:t.type,decision:t.decision,hash:o.slice(0,16)+"..."}),u}verifyChain(){if(this.receipts.length===0)return{valid:!0,length:0,brokenAt:-1,message:"Chain is empty (valid)",lastHash:c};let t=c;for(let e=0;e<this.receipts.length;e++){let i=this.receipts[e];if(i.previousHash!==t)return{valid:!1,length:this.receipts.length,brokenAt:e,message:`Chain broken at index ${e}: previousHash mismatch`,lastHash:this.lastHash};let s=i.previousHash+JSON.stringify(i.decision)+i.timestamp,n=m("sha256").update(s).digest("hex");if(i.hash!==n)return{valid:!1,length:this.receipts.length,brokenAt:e,message:`Chain broken at index ${e}: hash mismatch (tamper detected)`,lastHash:this.lastHash};t=i.hash}return{valid:!0,length:this.receipts.length,brokenAt:-1,message:`Chain valid (${this.receipts.length} receipts)`,lastHash:this.lastHash}}getChain(t){return t!==void 0&&t>0?[...this.receipts.slice(-t)]:[...this.receipts]}getChainLength(){return this.receipts.length}getLastHash(){return this.lastHash}exportChain(){let t={version:"1.0.0",exportedAt:Date.now(),length:this.receipts.length,receipts:this.receipts};return JSON.stringify(t,null,2)}importChain(t){try{let e=JSON.parse(t);if(!e||e.version!=="1.0.0"||!Array.isArray(e.receipts))return a.warn("Import failed: invalid format"),!1;let i=this.receipts,s=this.lastHash;this.receipts=e.receipts,this.lastHash=e.receipts.length>0?e.receipts[e.receipts.length-1].hash:c;let n=this.verifyChain();return n.valid?(a.info("Chain imported successfully",{length:e.receipts.length}),!0):(this.receipts=i,this.lastHash=s,a.warn("Import failed: chain integrity check failed",{message:n.message}),!1)}catch(e){return a.warn("Import failed: parse error",{error:e instanceof Error?e.message:String(e)}),!1}}getSPRT(t,e,i){return this.sprtAccumulators.has(t)||this.sprtAccumulators.set(t,new p(e,i)),this.sprtAccumulators.get(t)}getReceipt(t){return this.receipts[t]}updateSPRT(t){let e=t.decision==="PASS"||t.decision==="PERMIT";this.getSPRT(t.type).addEvidence(e)}},d=class extends h{persistence;constructor(t){super(),this.persistence=t;let e=t.loadAllReceipts();if(e.length>0){let i={version:"1.0.0",exportedAt:Date.now(),length:e.length,receipts:e};this.importChain(JSON.stringify(i))?a.info("Witness chain restored from SQLite",{receipts:e.length}):a.warn("Failed to restore witness chain from SQLite \u2014 starting fresh")}}appendWitness(t){let e=super.appendWitness(t);try{this.persistence.insertReceipt(e)}catch(i){a.warn("Failed to persist witness receipt to SQLite",{chainIndex:e.chainIndex,error:i instanceof Error?i.message:String(i)})}return e}};function C(r){r.exec(`
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.7");process.exit(0)}
2
+ import{a as v}from"./chunk-DF7V6X3N.js";import{c as l}from"./chunk-222ZQTL5.js";import{S as R,b as g}from"./chunk-76JYG426.js";v();R();import{createHash as m,randomUUID as f}from"crypto";var a=l.create("witness-chain"),p=class{logLikelihoodRatio=0;upperBound;lowerBound;observations=0;constructor(t=.05,e=.05){this.upperBound=Math.log(1/t),this.lowerBound=Math.log(e)}addWeightedEvidence(t,e){return this.logLikelihoodRatio+=t?e:-e,this.observations++,this.logLikelihoodRatio>=this.upperBound?"PASS":this.logLikelihoodRatio<=this.lowerBound?"FAIL":"INCONCLUSIVE"}addEvidence(t){return this.addWeightedEvidence(t,.5)}getRatio(){return this.logLikelihoodRatio}getObservations(){return this.observations}getBounds(){return{upper:this.upperBound,lower:this.lowerBound}}reset(){this.logLikelihoodRatio=0,this.observations=0}},c="0".repeat(64),h=class{receipts=[];lastHash=c;sprtAccumulators=new Map;appendWitness(t){let e=f(),i=Date.now(),s=this.receipts.length,n=this.lastHash+JSON.stringify(t)+i,o=m("sha256").update(n).digest("hex"),u={id:e,timestamp:i,previousHash:this.lastHash,hash:o,decision:t,chainIndex:s};return this.receipts.push(u),this.lastHash=o,this.updateSPRT(t),a.debug("Witness appended",{chainIndex:s,type:t.type,decision:t.decision,hash:o.slice(0,16)+"..."}),u}verifyChain(){if(this.receipts.length===0)return{valid:!0,length:0,brokenAt:-1,message:"Chain is empty (valid)",lastHash:c};let t=c;for(let e=0;e<this.receipts.length;e++){let i=this.receipts[e];if(i.previousHash!==t)return{valid:!1,length:this.receipts.length,brokenAt:e,message:`Chain broken at index ${e}: previousHash mismatch`,lastHash:this.lastHash};let s=i.previousHash+JSON.stringify(i.decision)+i.timestamp,n=m("sha256").update(s).digest("hex");if(i.hash!==n)return{valid:!1,length:this.receipts.length,brokenAt:e,message:`Chain broken at index ${e}: hash mismatch (tamper detected)`,lastHash:this.lastHash};t=i.hash}return{valid:!0,length:this.receipts.length,brokenAt:-1,message:`Chain valid (${this.receipts.length} receipts)`,lastHash:this.lastHash}}getChain(t){return t!==void 0&&t>0?[...this.receipts.slice(-t)]:[...this.receipts]}getChainLength(){return this.receipts.length}getLastHash(){return this.lastHash}exportChain(){let t={version:"1.0.0",exportedAt:Date.now(),length:this.receipts.length,receipts:this.receipts};return JSON.stringify(t,null,2)}importChain(t){try{let e=JSON.parse(t);if(!e||e.version!=="1.0.0"||!Array.isArray(e.receipts))return a.warn("Import failed: invalid format"),!1;let i=this.receipts,s=this.lastHash;this.receipts=e.receipts,this.lastHash=e.receipts.length>0?e.receipts[e.receipts.length-1].hash:c;let n=this.verifyChain();return n.valid?(a.info("Chain imported successfully",{length:e.receipts.length}),!0):(this.receipts=i,this.lastHash=s,a.warn("Import failed: chain integrity check failed",{message:n.message}),!1)}catch(e){return a.warn("Import failed: parse error",{error:e instanceof Error?e.message:String(e)}),!1}}getSPRT(t,e,i){return this.sprtAccumulators.has(t)||this.sprtAccumulators.set(t,new p(e,i)),this.sprtAccumulators.get(t)}getReceipt(t){return this.receipts[t]}updateSPRT(t){let e=t.decision==="PASS"||t.decision==="PERMIT";this.getSPRT(t.type).addEvidence(e)}},d=class extends h{persistence;constructor(t){super(),this.persistence=t;let e=t.loadAllReceipts();if(e.length>0){let i={version:"1.0.0",exportedAt:Date.now(),length:e.length,receipts:e};this.importChain(JSON.stringify(i))?a.info("Witness chain restored from SQLite",{receipts:e.length}):a.warn("Failed to restore witness chain from SQLite \u2014 starting fresh")}}appendWitness(t){let e=super.appendWitness(t);try{this.persistence.insertReceipt(e)}catch(i){a.warn("Failed to persist witness receipt to SQLite",{chainIndex:e.chainIndex,error:i instanceof Error?i.message:String(i)})}return e}};function C(r){r.exec(`
3
3
  CREATE TABLE IF NOT EXISTS witness_chain_receipts (
4
4
  id TEXT PRIMARY KEY,
5
5
  chain_index INTEGER NOT NULL,
@@ -1,2 +1,2 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.5");process.exit(0)}
2
- import{d as l,j as i}from"./chunk-GMU7P5O3.js";import{a as r,c as g}from"./chunk-S73KENCH.js";g();var c=class extends i{config={name:"qe/tests/schedule",description:"Schedule and execute tests using phase-based pipeline with git-aware selection and flaky tracking. Runs tests in phases (unit, integration, e2e), selects affected tests from git changes, and tracks flaky tests.",domain:"test-execution",schema:this.buildSchema()};buildSchema(){return{type:"object",properties:{cwd:{type:"string",description:"Working directory for test execution (defaults to project root)"},gitRef:{type:"string",description:'Git ref to compare for affected test selection (e.g., "main", "HEAD~3")'},useGitAware:{type:"boolean",description:"Enable git-aware test selection to only run affected tests",default:!0},trackFlaky:{type:"boolean",description:"Enable flaky test tracking and quarantine",default:!0}}}}async execute(s,o){try{let{runTestPipeline:n}=await import("./test-scheduling-E5KHKRZS.js"),d=await l(o),t=await n({cwd:s.cwd||process.cwd(),memory:d,baseRef:s.gitRef,flakyHistoryPath:s.trackFlaky!==!1?".agentic-qe/flaky-history.json":void 0,runAllTests:s.useGitAware===!1}),u=t.phaseResults.reduce((e,a)=>e+a.totalTests,0),f=t.phaseResults.reduce((e,a)=>e+a.passed,0),p=t.phaseResults.reduce((e,a)=>e+a.failed,0);return{success:!0,data:{pipelineId:o.requestId,phases:t.phaseResults.map(e=>({phaseId:e.phaseId,phaseName:e.phaseName,totalTests:e.totalTests,passed:e.passed,failed:e.failed,passRate:e.passRate,durationMs:e.durationMs})),gitAware:{enabled:!t.ranAllTests,selectedTests:t.selectedTests.length,gitRef:s.gitRef},flakyTracking:{enabled:s.trackFlaky!==!1},totalDuration:t.totalDurationMs,ranAllTests:t.ranAllTests,summary:`Executed ${t.phaseResults.length} phases, ${u} tests (${f} passed, ${p} failed) in ${t.totalDurationMs}ms`}}}catch(n){return{success:!1,error:r(n)}}}};export{c as a};
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.7");process.exit(0)}
2
+ import{d as l,j as i}from"./chunk-XK7P7OXO.js";import{a as r,c as g}from"./chunk-XWPUCPYW.js";g();var c=class extends i{config={name:"qe/tests/schedule",description:"Schedule and execute tests using phase-based pipeline with git-aware selection and flaky tracking. Runs tests in phases (unit, integration, e2e), selects affected tests from git changes, and tracks flaky tests.",domain:"test-execution",schema:this.buildSchema()};buildSchema(){return{type:"object",properties:{cwd:{type:"string",description:"Working directory for test execution (defaults to project root)"},gitRef:{type:"string",description:'Git ref to compare for affected test selection (e.g., "main", "HEAD~3")'},useGitAware:{type:"boolean",description:"Enable git-aware test selection to only run affected tests",default:!0},trackFlaky:{type:"boolean",description:"Enable flaky test tracking and quarantine",default:!0}}}}async execute(s,o){try{let{runTestPipeline:n}=await import("./test-scheduling-LGPKDMWD.js"),d=await l(o),t=await n({cwd:s.cwd||process.cwd(),memory:d,baseRef:s.gitRef,flakyHistoryPath:s.trackFlaky!==!1?".agentic-qe/flaky-history.json":void 0,runAllTests:s.useGitAware===!1}),u=t.phaseResults.reduce((e,a)=>e+a.totalTests,0),f=t.phaseResults.reduce((e,a)=>e+a.passed,0),p=t.phaseResults.reduce((e,a)=>e+a.failed,0);return{success:!0,data:{pipelineId:o.requestId,phases:t.phaseResults.map(e=>({phaseId:e.phaseId,phaseName:e.phaseName,totalTests:e.totalTests,passed:e.passed,failed:e.failed,passRate:e.passRate,durationMs:e.durationMs})),gitAware:{enabled:!t.ranAllTests,selectedTests:t.selectedTests.length,gitRef:s.gitRef},flakyTracking:{enabled:s.trackFlaky!==!1},totalDuration:t.totalDurationMs,ranAllTests:t.ranAllTests,summary:`Executed ${t.phaseResults.length} phases, ${u} tests (${f} passed, ${p} failed) in ${t.totalDurationMs}ms`}}}catch(n){return{success:!1,error:r(n)}}}};export{c as a};
@@ -1,2 +1,2 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.5");process.exit(0)}
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.7");process.exit(0)}
2
2
  var i=class{s0;s1;s2;s3;constructor(s){this.s0=this.splitmix32(s),this.s1=this.splitmix32(this.s0),this.s2=this.splitmix32(this.s1),this.s3=this.splitmix32(this.s2)}splitmix32(s){return s=s+2654435769|0,s=Math.imul(s^s>>>16,2246822507),s=Math.imul(s^s>>>13,3266489909),(s^s>>>16)>>>0}next(){let s=this.s3,t=this.s0;return this.s3=this.s2,this.s2=this.s1,this.s1=t,t^=t<<11,t^=t>>>8,this.s0=t^s^s>>>19,this.s0>>>0}nextFloat(){return this.next()/4294967296}nextGaussian(){let s=this.nextFloat()||1e-10,t=this.nextFloat();return Math.sqrt(-2*Math.log(s))*Math.cos(2*Math.PI*t)}};export{i as a};
@@ -1,3 +1,3 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.5");process.exit(0)}
2
- import{a,b as u}from"./chunk-MEN3UW7W.js";import{m as P}from"./chunk-R573V37S.js";import{b as p}from"./chunk-D7NKRCIL.js";P();import*as i from"fs";import*as d from"path";var v="llm-config.json",f={claude:["ANTHROPIC_API_KEY","CLAUDE_API_KEY"],openai:["OPENAI_API_KEY"],ollama:[],openrouter:["OPENROUTER_API_KEY"],gemini:["GOOGLE_AI_API_KEY","GEMINI_API_KEY","GOOGLE_API_KEY"],"azure-openai":["AZURE_OPENAI_API_KEY"],bedrock:["AWS_ACCESS_KEY_ID"],onnx:[]},R=new Set(["claude","openai","ollama","openrouter","gemini","azure-openai","bedrock"]);function E(e){let r=e??p();return d.join(r,".agentic-qe",v)}function _(e=process.env){let r=new Set;for(let n of a){if(!R.has(n))continue;let o=f[n];if(o.length===0){r.add(n);continue}o.some(t=>(e[t]??"").trim().length>0)&&r.add(n)}return r}function g(e){let r=E(e);if(!i.existsSync(r))return{};let n=i.readFileSync(r,"utf8");if(!n.trim())return{};let o=JSON.parse(n);if(typeof o!="object"||o===null)throw new Error(`Invalid ${v}: expected object, got ${typeof o}`);return o}function C(e,r){let n=E(r),o=d.dirname(n);i.existsSync(o)||i.mkdirSync(o,{recursive:!0});let t=y(e),s=JSON.stringify(t,null,2)+`
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.7");process.exit(0)}
2
+ import{a,b as u}from"./chunk-X3HRJV65.js";import{m as P}from"./chunk-HBWAMCVB.js";import{b as p}from"./chunk-U7EGKKN3.js";P();import*as i from"fs";import*as d from"path";var v="llm-config.json",f={claude:["ANTHROPIC_API_KEY","CLAUDE_API_KEY"],openai:["OPENAI_API_KEY"],ollama:[],openrouter:["OPENROUTER_API_KEY"],gemini:["GOOGLE_AI_API_KEY","GEMINI_API_KEY","GOOGLE_API_KEY"],"azure-openai":["AZURE_OPENAI_API_KEY"],bedrock:["AWS_ACCESS_KEY_ID"],onnx:[]},R=new Set(["claude","openai","ollama","openrouter","gemini","azure-openai","bedrock"]);function E(e){let r=e??p();return d.join(r,".agentic-qe",v)}function _(e=process.env){let r=new Set;for(let n of a){if(!R.has(n))continue;let o=f[n];if(o.length===0){r.add(n);continue}o.some(t=>(e[t]??"").trim().length>0)&&r.add(n)}return r}function g(e){let r=E(e);if(!i.existsSync(r))return{};let n=i.readFileSync(r,"utf8");if(!n.trim())return{};let o=JSON.parse(n);if(typeof o!="object"||o===null)throw new Error(`Invalid ${v}: expected object, got ${typeof o}`);return o}function C(e,r){let n=E(r),o=d.dirname(n);i.existsSync(o)||i.mkdirSync(o,{recursive:!0});let t=y(e),s=JSON.stringify(t,null,2)+`
3
3
  `,c=n+".tmp-"+process.pid;i.writeFileSync(c,s,{encoding:"utf8",mode:384}),i.renameSync(c,n)}function y(e){if(!e.providers)return JSON.parse(JSON.stringify(e));let r=JSON.parse(JSON.stringify(e)),n=[];if(r.providers)for(let o of Object.keys(r.providers)){let t=r.providers[o];t&&"apiKey"in t&&t.apiKey&&(delete t.apiKey,n.push(o))}return n.length>0&&console.warn(`[router-config] Refused to persist apiKey for: ${n.join(", ")}. API keys belong in environment variables (e.g. ANTHROPIC_API_KEY, GEMINI_API_KEY, OPENAI_API_KEY, OPENROUTER_API_KEY), NOT in .agentic-qe/llm-config.json which may be checked into source control.`),r}function l(e,r){let n={...e,...r,providers:{...e.providers??{}}};if(r.providers)for(let[o,t]of Object.entries(r.providers)){if(!t)continue;let s=o;n.providers[s]={...e.providers?.[s]??{},...t}}return n}function m(e,r=process.env){let n=_(r),o={...e,providers:{...e.providers??{}}};for(let t of n){if(f[t].length===0)continue;let c=o.providers[t]??{enabled:!1};c.enabled||(o.providers[t]={...c,enabled:!0})}return o}function A(e={}){let r=g(e.projectRoot),n=l(u,r),o=m(n,e.env);return e.override?l(o,e.override):o}function S(e={}){let r=e.env??process.env;for(let o of a){let t=f[o];if(t.length!==0&&t.some(s=>(r[s]??"").trim().length>0))return!0}let n=g(e.projectRoot);if(n.providers){for(let o of Object.values(n.providers))if(o?.enabled)return!0}return!1}export{_ as a,C as b,A as c,S as d};
@@ -0,0 +1,2 @@
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.7");process.exit(0)}
2
+ import{a as e,b as g,e as r}from"./chunk-222ZQTL5.js";import{c as o}from"./chunk-LRRQEAP5.js";var L=o(()=>{"use strict";e();g();r()});export{L as a};
@@ -1,5 +1,5 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.5");process.exit(0)}
2
- import{b as q,c as R,d as D,f as O,g as j,h as x,i as $,j as L,k as N}from"./chunk-3JWV4GE6.js";import{b as v,d as P}from"./chunk-56RA6YPN.js";import{a as k,c as T}from"./chunk-S73KENCH.js";import{a as _,b as ee}from"./chunk-KIMJPTHD.js";P();import{existsSync as E,mkdirSync as Q,writeFileSync as S,readFileSync as I,copyFileSync as te}from"fs";import{join as g,dirname as ne}from"path";async function M(t,e){if(!e.hooks.claudeCode)return!1;let n=g(t,".claude");E(n)||Q(n,{recursive:!0});let r=g(n,"settings.json"),s={};if(E(r))try{let u=I(r,"utf-8");s=v(u)}catch{s={}}let i={PreToolUse:[{matcher:"^(Write|Edit|MultiEdit)$",hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" guard --file "$TOOL_INPUT_file_path" --json',timeout:3e3,continueOnError:!0}]},{matcher:"^(Write|Edit|MultiEdit)$",hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" pre-edit --file "$TOOL_INPUT_file_path" --json',timeout:5e3,continueOnError:!0}]},{matcher:"^Bash$",hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" pre-command --command "$TOOL_INPUT_command" --json',timeout:3e3,continueOnError:!0}]},{matcher:"^Task$",hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" pre-task --description "$TOOL_INPUT_prompt" --json',timeout:5e3,continueOnError:!0}]}],PostToolUse:[{matcher:"^(Write|Edit|MultiEdit)$",hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" post-edit --file "$TOOL_INPUT_file_path" --success --json',timeout:5e3,continueOnError:!0}]},{matcher:"^Bash$",hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" post-command --command "$TOOL_INPUT_command" --success true --json',timeout:5e3,continueOnError:!0}]},{matcher:"^Task$",hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" post-task --task-id "$TOOL_RESULT_agent_id" --agent "$TOOL_INPUT_subagent_type" --success true --description "$TOOL_INPUT_prompt" --json',timeout:5e3,continueOnError:!0}]}],UserPromptSubmit:[{hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" route --json',timeout:5e3,continueOnError:!0}]}],SessionStart:[{hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" session-start --session-id "$SESSION_ID" --json',timeout:1e4,continueOnError:!0}]}],Stop:[{hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" session-end --save-state --json',timeout:5e3,continueOnError:!0}]},{hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" post-route --success true --json',timeout:5e3,continueOnError:!0}]}]},p=s.hooks||{};s.hooks=O(p,i);let c=s.env||{};s.env={...c,...j(e)};let m=x(e,t);for(let[u,h]of Object.entries(m))if(u==="_aqePermissions"){let d=s.permissions||{},l=d.allow||[],y=h,C=[...new Set([...l,...y])];s.permissions={...d,allow:C}}else s[u]=h;let a=s.enabledMcpjsonServers||[];return a=a.filter(u=>u!=="aqe"),a.includes("agentic-qe")||a.push("agentic-qe"),s.enabledMcpjsonServers=a,S(r,JSON.stringify(s,null,2),"utf-8"),await re(t),!0}async function re(t){let e=g(t,".claude","hooks");E(e)||Q(e,{recursive:!0});let n=g(e,"cross-phase-memory.yaml");if(E(n))return;let r=[g(ne(import.meta.url.replace("file://","")),"..","..","assets","hooks","cross-phase-memory.yaml"),g(process.cwd(),"assets","hooks","cross-phase-memory.yaml"),g(process.cwd(),"v3","assets","hooks","cross-phase-memory.yaml")];for(let i of r)try{if(E(i)){te(i,n),console.log(" \u2713 Cross-phase memory hooks installed");return}}catch{}S(n,`# Cross-Phase Memory Hooks Configuration
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.7");process.exit(0)}
2
+ import{b as q,c as R,d as D,f as O,g as j,h as x,i as $,j as L,k as N}from"./chunk-UPDPD43T.js";import{b as v,d as P}from"./chunk-QBVFONWU.js";import{a as k,c as T}from"./chunk-XWPUCPYW.js";import{a as _,b as ee}from"./chunk-Z44VJC5U.js";P();import{existsSync as E,mkdirSync as Q,writeFileSync as S,readFileSync as I,copyFileSync as te}from"fs";import{join as g,dirname as ne}from"path";async function M(t,e){if(!e.hooks.claudeCode)return!1;let n=g(t,".claude");E(n)||Q(n,{recursive:!0});let r=g(n,"settings.json"),s={};if(E(r))try{let u=I(r,"utf-8");s=v(u)}catch{s={}}let i={PreToolUse:[{matcher:"^(Write|Edit|MultiEdit)$",hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" guard --file "$TOOL_INPUT_file_path" --json',timeout:3e3,continueOnError:!0}]},{matcher:"^(Write|Edit|MultiEdit)$",hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" pre-edit --file "$TOOL_INPUT_file_path" --json',timeout:5e3,continueOnError:!0}]},{matcher:"^Bash$",hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" pre-command --command "$TOOL_INPUT_command" --json',timeout:3e3,continueOnError:!0}]},{matcher:"^Task$",hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" pre-task --description "$TOOL_INPUT_prompt" --json',timeout:5e3,continueOnError:!0}]}],PostToolUse:[{matcher:"^(Write|Edit|MultiEdit)$",hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" post-edit --file "$TOOL_INPUT_file_path" --success --json',timeout:5e3,continueOnError:!0}]},{matcher:"^Bash$",hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" post-command --command "$TOOL_INPUT_command" --success true --json',timeout:5e3,continueOnError:!0}]},{matcher:"^Task$",hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" post-task --task-id "$TOOL_RESULT_agent_id" --agent "$TOOL_INPUT_subagent_type" --success true --description "$TOOL_INPUT_prompt" --json',timeout:5e3,continueOnError:!0}]}],UserPromptSubmit:[{hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" route --json',timeout:5e3,continueOnError:!0}]}],SessionStart:[{hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" session-start --session-id "$SESSION_ID" --json',timeout:1e4,continueOnError:!0}]}],Stop:[{hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" session-end --save-state --json',timeout:5e3,continueOnError:!0}]},{hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" post-route --success true --json',timeout:5e3,continueOnError:!0}]}]},p=s.hooks||{};s.hooks=O(p,i);let c=s.env||{};s.env={...c,...j(e)};let m=x(e,t);for(let[u,h]of Object.entries(m))if(u==="_aqePermissions"){let d=s.permissions||{},l=d.allow||[],y=h,C=[...new Set([...l,...y])];s.permissions={...d,allow:C}}else s[u]=h;let a=s.enabledMcpjsonServers||[];return a=a.filter(u=>u!=="aqe"),a.includes("agentic-qe")||a.push("agentic-qe"),s.enabledMcpjsonServers=a,S(r,JSON.stringify(s,null,2),"utf-8"),await re(t),!0}async function re(t){let e=g(t,".claude","hooks");E(e)||Q(e,{recursive:!0});let n=g(e,"cross-phase-memory.yaml");if(E(n))return;let r=[g(ne(import.meta.url.replace("file://","")),"..","..","assets","hooks","cross-phase-memory.yaml"),g(process.cwd(),"assets","hooks","cross-phase-memory.yaml"),g(process.cwd(),"v3","assets","hooks","cross-phase-memory.yaml")];for(let i of r)try{if(E(i)){te(i,n),console.log(" \u2713 Cross-phase memory hooks installed");return}}catch{}S(n,`# Cross-Phase Memory Hooks Configuration
3
3
  # Generated by aqe init
4
4
  # See: https://github.com/anthropics/agentic-qe/docs/cross-phase-memory.md
5
5
 
@@ -276,7 +276,7 @@ aqe init --auto
276
276
  `).run("aqe_version",JSON.stringify(e),i),s.prepare(`
277
277
  INSERT OR REPLACE INTO kv_store (key, namespace, value, created_at)
278
278
  VALUES (?, '_system', ?, ?)
279
- `).run("init_timestamp",JSON.stringify(new Date().toISOString()),i),s.close(),console.log(` \u2713 Version ${e} written to memory.db`),!0}catch(i){return s.close(),console.warn(` \u26A0 Could not write version: ${k(i)}`),!1}}catch(r){return console.warn(` \u26A0 Could not open memory.db: ${k(r)}`),!1}}async function W(t){let e=null;try{e=(await import("./better-sqlite3-6AGIBSVE.js")).default}catch{throw new Error(`SQLite persistence REQUIRED but better-sqlite3 is not installed.
279
+ `).run("init_timestamp",JSON.stringify(new Date().toISOString()),i),s.close(),console.log(` \u2713 Version ${e} written to memory.db`),!0}catch(i){return s.close(),console.warn(` \u26A0 Could not write version: ${k(i)}`),!1}}catch(r){return console.warn(` \u26A0 Could not open memory.db: ${k(r)}`),!1}}async function W(t){let e=null;try{e=(await import("./better-sqlite3-F262IAGH.js")).default}catch{throw new Error(`SQLite persistence REQUIRED but better-sqlite3 is not installed.
280
280
  Install it with: npm install better-sqlite3
281
281
  If you see native compilation errors, ensure build tools are installed:
282
282
  - macOS: xcode-select --install
@@ -302,7 +302,7 @@ Database path: ${r}
302
302
  Ensure the directory is writable and has sufficient disk space.`)}}async function G(t){let e=o(t,".agentic-qe","memory.db");if(!f(e))return!1;try{let n=_(e),r=n.prepare(`
303
303
  SELECT COUNT(*) as count FROM kv_store
304
304
  WHERE namespace = 'code-intelligence:kg'
305
- `).get();return n.close(),r.count>0}catch{return!1}}async function V(t){try{let{KnowledgeGraphService:e}=await import("./knowledge-graph-Q5CP47IP.js"),{InMemoryBackend:n}=await import("./memory-backend-52LANEA3.js"),r=new n;await r.initialize();let s=new e(r,{namespace:"code-intelligence:kg",enableVectorEmbeddings:!0}),p=await(await import("fast-glob")).default(["**/*.ts","**/*.tsx","**/*.js","**/*.jsx","**/*.py"],{cwd:t,ignore:["node_modules/**","dist/**","coverage/**",".agentic-qe/**"]}),c=await s.index({paths:p.map(m=>o(t,m)),incremental:!1,includeTests:!0});return s.destroy(),c.success?{status:"indexed",entries:c.value.nodesCreated+c.value.edgesCreated}:{status:"error",entries:0}}catch(e){return console.warn("Code intelligence scan warning:",k(e)),{status:"skipped",entries:0}}}async function J(t){let e=o(t,".agentic-qe","memory.db");try{let n=_(e),r=n.prepare(`
305
+ `).get();return n.close(),r.count>0}catch{return!1}}async function V(t){try{let{KnowledgeGraphService:e}=await import("./knowledge-graph-NTJEG6ZE.js"),{InMemoryBackend:n}=await import("./memory-backend-53NQ5CG7.js"),r=new n;await r.initialize();let s=new e(r,{namespace:"code-intelligence:kg",enableVectorEmbeddings:!0}),p=await(await import("fast-glob")).default(["**/*.ts","**/*.tsx","**/*.js","**/*.jsx","**/*.py"],{cwd:t,ignore:["node_modules/**","dist/**","coverage/**",".agentic-qe/**"]}),c=await s.index({paths:p.map(m=>o(t,m)),incremental:!1,includeTests:!0});return s.destroy(),c.success?{status:"indexed",entries:c.value.nodesCreated+c.value.edgesCreated}:{status:"error",entries:0}}catch(e){return console.warn("Code intelligence scan warning:",k(e)),{status:"skipped",entries:0}}}async function J(t){let e=o(t,".agentic-qe","memory.db");try{let n=_(e),r=n.prepare(`
306
306
  SELECT COUNT(*) as count FROM kv_store
307
307
  WHERE namespace LIKE 'code-intelligence:kg%'
308
308
  `).get();return n.close(),r.count}catch{return 0}}async function B(t,e,n){if(!e.learning.enabled)return 0;let r=o(t,".agentic-qe","data");f(r)||w(r,{recursive:!0});let s=o(r,"hnsw");f(s)||w(s,{recursive:!0});let i=o(r,"learning-config.json"),p={embeddingModel:e.learning.embeddingModel,hnswConfig:e.learning.hnswConfig,qualityThreshold:e.learning.qualityThreshold,promotionThreshold:e.learning.promotionThreshold,databasePath:o(r,"memory.db"),hnswIndexPath:o(s,"index.bin"),initialized:new Date().toISOString()};b(i,JSON.stringify(p,null,2),"utf-8");let c=0;if(e.learning.pretrainedPatterns&&n){let m=n,a=new Map;for(let d of m.patterns){let l=d.domain||"general";a.has(l)||a.set(l,[]),a.get(l).push(d)}let u=o(r,"pretrained-index.json"),h={version:m.version,totalPatterns:m.statistics.totalPatterns,domains:Array.from(a.entries()).map(([d,l])=>({name:d,patternCount:l.length})),loadedAt:new Date().toISOString()};b(u,JSON.stringify(h,null,2),"utf-8");for(let[d,l]of a){let y=o(r,"patterns",d);f(y)||w(y,{recursive:!0});let C=o(y,"patterns.json");b(C,JSON.stringify(l,null,2),"utf-8"),c+=l.length}return c}return 0}async function H(t,e){if(!e.workers.daemonAutoStart||e.workers.enabled.length===0)return 0;let n=o(t,".agentic-qe","workers");f(n)||w(n,{recursive:!0});let r={},s={"pattern-consolidator":6e4,"coverage-gap-scanner":3e5,"flaky-test-detector":6e5,"routing-accuracy-monitor":12e4};for(let a of e.workers.enabled)r[a]={name:a,enabled:!0,interval:e.workers.intervals[a]||s[a]||6e4,lastRun:null,status:"pending"};let i=o(n,"registry.json"),p={version:e.version,maxConcurrent:e.workers.maxConcurrent,workers:r,createdAt:new Date().toISOString(),daemonPid:null};b(i,JSON.stringify(p,null,2),"utf-8");for(let a of e.workers.enabled){let u=o(n,`${a}.json`),h={name:a,enabled:!0,interval:e.workers.intervals[a]||s[a]||6e4,projectRoot:t,dataDir:o(t,".agentic-qe","data"),createdAt:new Date().toISOString()};b(u,JSON.stringify(h,null,2),"utf-8")}let c=o(n,"start-daemon.cjs");return b(c,`#!/usr/bin/env node
@@ -1,4 +1,4 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.5");process.exit(0)}
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.7");process.exit(0)}
2
2
  import*as o from"fs";import*as l from"path";var m=class{cacheDir;keepVersions;constructor(e={}){this.cacheDir=e.cacheDir??l.join(process.cwd(),".agentic-qe","plugins"),this.keepVersions=e.keepVersions??2}has(e,t){let s=this.versionDir(e,t);return o.existsSync(s)&&o.existsSync(l.join(s,"qe-plugin.json"))}get(e,t){if(!this.has(e,t))return;let s=this.versionDir(e,t),i=o.readFileSync(l.join(s,"qe-plugin.json"),"utf-8"),r=JSON.parse(i),c=o.statSync(s);return{manifest:r,path:s,cachedAt:c.birthtime.toISOString()}}store(e,t){let s=this.versionDir(e.name,e.version);return o.existsSync(s)||(o.mkdirSync(s,{recursive:!0}),this.copyDir(t,s),o.writeFileSync(l.join(s,"qe-plugin.json"),JSON.stringify(e,null,2)),this.pruneOldVersions(e.name)),s}remove(e,t){let s=this.versionDir(e,t);return o.existsSync(s)?(o.rmSync(s,{recursive:!0,force:!0}),!0):!1}listVersions(e){let t=l.join(this.cacheDir,e);if(!o.existsSync(t))return[];let s=[],i=o.readdirSync(t);for(let r of i){let c=l.join(t,r),h=l.join(c,"qe-plugin.json");if(o.existsSync(h))try{let a=o.readFileSync(h,"utf-8"),f=JSON.parse(a),u=o.statSync(c);s.push({manifest:f,path:c,cachedAt:u.birthtime.toISOString()})}catch{}}return s}listAll(){if(!o.existsSync(this.cacheDir))return[];let e=[],t=o.readdirSync(this.cacheDir);for(let s of t){let i=this.listVersions(s);i.length>0&&(i.sort((r,c)=>c.manifest.version.localeCompare(r.manifest.version)),e.push(i[0]))}return e}versionDir(e,t){return l.join(this.cacheDir,e,t)}pruneOldVersions(e){let t=this.listVersions(e);if(t.length<=this.keepVersions)return;t.sort((i,r)=>i.cachedAt.localeCompare(r.cachedAt));let s=t.slice(0,t.length-this.keepVersions);for(let i of s)o.rmSync(i.path,{recursive:!0,force:!0})}copyDir(e,t){if(!o.existsSync(e))return;let s=o.readdirSync(e,{withFileTypes:!0});for(let i of s){let r=l.join(e,i.name),c=l.join(t,i.name);if(i.isDirectory()){if(i.name===".git"||i.name==="node_modules")continue;o.mkdirSync(c,{recursive:!0}),this.copyDir(r,c)}else o.copyFileSync(r,c)}}};var R=/^[a-z][a-z0-9-]*$/,S=/^\d+\.\d+\.\d+(-[a-zA-Z0-9.]+)?$/,j=["aqe-core-","agentic-qe-core-"];function E(n){let e=[],t=[];if(!n||typeof n!="object")return{valid:!1,errors:["Manifest must be a non-null object"],warnings:[]};let s=n;if(!s.name||typeof s.name!="string"?e.push("name is required and must be a string"):D(s.name,e,t),!s.version||typeof s.version!="string"?e.push("version is required and must be a string"):S.test(s.version)||e.push(`version "${s.version}" is not valid semver (expected: major.minor.patch)`),!s.description||typeof s.description!="string"?e.push("description is required and must be a string"):s.description.length>500&&t.push("description exceeds 500 characters"),(!s.author||typeof s.author!="string")&&e.push("author is required and must be a string"),!Array.isArray(s.domains)||s.domains.length===0)e.push("domains is required and must be a non-empty array");else for(let i of s.domains)if(typeof i!="string"){e.push("Each domain must be a string");break}if(!s.entryPoint||typeof s.entryPoint!="string"?e.push("entryPoint is required and must be a string"):V(s.entryPoint,e),s.dependencies!==void 0)if(typeof s.dependencies!="object"||s.dependencies===null||Array.isArray(s.dependencies))e.push("dependencies must be an object mapping plugin names to semver ranges");else for(let[i,r]of Object.entries(s.dependencies))typeof r!="string"&&e.push(`Dependency "${i}" must have a string version range`);if(s.hooks!==void 0)if(typeof s.hooks!="object"||s.hooks===null||Array.isArray(s.hooks))e.push("hooks must be an object mapping event names to handler paths");else for(let[,i]of Object.entries(s.hooks)){if(typeof i!="string"){e.push("Hook handler paths must be strings");break}i.includes("..")&&e.push(`Hook handler path "${i}" must not contain ".." (path traversal)`)}if(s.minAqeVersion!==void 0&&(typeof s.minAqeVersion!="string"||!S.test(s.minAqeVersion))&&t.push("minAqeVersion should be valid semver"),s.permissions!==void 0){if(!Array.isArray(s.permissions))e.push("permissions must be an array of strings");else for(let i of s.permissions)if(typeof i!="string"){e.push("Each permission must be a string");break}}return{valid:e.length===0,errors:e,warnings:t}}function b(n){let e=typeof n=="string"?JSON.parse(n):n,t=E(e);if(!t.valid)throw new Error(`Invalid plugin manifest:
3
3
  - ${t.errors.join(`
4
4
  - `)}`);return e}function D(n,e,t){n.length>64&&e.push("name must be 64 characters or fewer"),R.test(n)||e.push("name must be lowercase alphanumeric with hyphens, starting with a letter"),/[^\x00-\x7F]/.test(n)&&e.push("name must contain only ASCII characters");for(let s of j)n.startsWith(s)&&e.push(`name cannot start with reserved prefix "${s}"`);["plugin","test","tool"].includes(n)&&t.push(`name "${n}" is very generic \u2014 consider a more descriptive name`)}function V(n,e){n.includes("..")&&e.push('entryPoint must not contain ".." (path traversal)'),(n.startsWith("/")||n.startsWith("\\"))&&e.push("entryPoint must be a relative path"),!n.endsWith(".js")&&!n.endsWith(".ts")&&!n.endsWith(".mjs")&&e.push("entryPoint must end in .js, .ts, or .mjs")}var y=class{resolve(e){let t=new Map;for(let a of e)t.set(a.name,a);let s=[],i=new Set,r=new Set,c=new Map,h=(a,f)=>{if(i.has(a))return;if(r.has(a)){let g=[...f.slice(f.indexOf(a)),a];throw new Error(`Dependency cycle detected: ${g.join(" -> ")}`)}let u=t.get(a);if(!u)return;r.add(a);let k=Object.keys(u.dependencies??{}),P=[];for(let g of k)t.has(g)?h(g,[...f,a]):P.push(g);P.length>0&&c.set(a,P),r.delete(a),i.add(a),s.push(u)};for(let a of e)h(a.name,[]);return{ordered:s.map((a,f)=>({manifest:a,order:f})),missing:c}}canLoad(e,t){let i=Object.keys(e.dependencies??{}).filter(r=>!t.has(r));return{canLoad:i.length===0,missingDeps:i}}};var N=["aqe-core-","agentic-qe-core-","agentic-qe-internal-"],M=new Set(["aqe","agentic-qe","ruflo","claude-flow"]),_=["..","~","/etc/","/proc/","/dev/","node_modules/"];function A(n){let e=[];return $(n.name,e),q(n.entryPoint,e),C(n.hooks,e),I(n.permissions,e),{safe:e.length===0,violations:e}}function $(n,e){/[^\x20-\x7E]/.test(n)&&e.push(`Plugin name "${n}" contains non-ASCII characters`),M.has(n.toLowerCase())&&e.push(`Plugin name "${n}" is a reserved name`);for(let s of N)n.toLowerCase().startsWith(s)&&e.push(`Plugin name "${n}" uses reserved prefix "${s}"`);let t=n.toLowerCase().replace(/[0o]/g,"o").replace(/[1il]/g,"l").replace(/[-_]/g,"");M.has(t)&&e.push(`Plugin name "${n}" is visually similar to a reserved name`)}function q(n,e){w(n,"entryPoint",e),(n.startsWith("/")||n.startsWith("\\"))&&e.push("entryPoint must be a relative path, not absolute")}function C(n,e){if(n)for(let[t,s]of Object.entries(n))w(s,`hook[${t}]`,e)}function w(n,e,t){for(let s of _)n.includes(s)&&t.push(`${e} contains dangerous path pattern "${s}"`);n.includes("\0")&&t.push(`${e} contains null byte (path injection attempt)`)}function I(n,e){if(!n)return;let t=["fs:write-root","net:arbitrary","exec:shell"];for(let s of n)t.includes(s)&&e.push(`Plugin requests dangerous permission: ${s}`)}import*as p from"fs";import*as d from"path";var v=class{type="local";async resolve(e){let t=d.resolve(e),s=d.join(t,"qe-plugin.json");if(!p.existsSync(s))throw new Error(`No qe-plugin.json found at ${s}`);let i=p.readFileSync(s,"utf-8");return b(i)}async getPluginPath(e){let t=d.resolve(e);if(!p.existsSync(t))throw new Error(`Plugin directory does not exist: ${t}`);return t}};var x=class{cache;resolver;sources=new Map;constructor(e={}){this.cache=e.cache??new m,this.resolver=new y;let t=new v;if(this.sources.set("local",t),e.sources)for(let s of e.sources)this.sources.set(s.type,s)}async install(e,t="local"){if(process.env.AQE_PLUGINS_DISABLED==="true")return{success:!1,errors:["Plugin loading is disabled (AQE_PLUGINS_DISABLED=true)"],securityViolations:[]};let s=[],i=this.sources.get(t);if(!i)return{success:!1,errors:[`Unknown source type: ${t}. Available: ${[...this.sources.keys()].join(", ")}`],securityViolations:[]};let r;try{r=await i.resolve(e)}catch(u){return{success:!1,errors:[`Failed to resolve plugin: ${u instanceof Error?u.message:String(u)}`],securityViolations:[]}}let c=E(r);if(!c.valid)return{success:!1,manifest:r,errors:c.errors,securityViolations:[]};let h=A(r);if(!h.safe)return{success:!1,manifest:r,errors:["Plugin failed security checks"],securityViolations:h.violations};if(this.cache.has(r.name,r.version)){let u=this.cache.get(r.name,r.version);return{success:!0,manifest:r,cachePath:u.path,errors:[],securityViolations:[]}}let a;try{a=await i.getPluginPath(e)}catch(u){return{success:!1,manifest:r,errors:[`Failed to get plugin path: ${u instanceof Error?u.message:String(u)}`],securityViolations:[]}}let f=this.cache.store(r,a);return{success:!0,manifest:r,cachePath:f,errors:s,securityViolations:[]}}remove(e,t){if(t)return this.cache.remove(e,t);let s=this.cache.listVersions(e),i=!1;for(let r of s)this.cache.remove(e,r.manifest.version)&&(i=!0);return i}list(){return this.cache.listAll().map(t=>({name:t.manifest.name,version:t.manifest.version,description:t.manifest.description,domains:t.manifest.domains,source:"cached",cachePath:t.path}))}resolveLoadOrder(){let e=this.cache.listAll();return this.resolver.resolve(e.map(t=>t.manifest))}registerSource(e){this.sources.set(e.type,e)}};export{b as a,m as b,x as c};
@@ -1,2 +1,2 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.5");process.exit(0)}
2
- import{c as t}from"./chunk-S7HQOGVD.js";import{randomInt as o}from"node:crypto";function a(){return Math.random()}function m(n,e){return o(n,e)}function c(n,e){return n+Math.random()*(e-n)}var r=t(()=>{"use strict"});export{a,m as b,c,r as d};
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.7");process.exit(0)}
2
+ import{c as t}from"./chunk-LRRQEAP5.js";import{randomInt as o}from"node:crypto";function a(){return Math.random()}function m(n,e){return o(n,e)}function c(n,e){return n+Math.random()*(e-n)}var r=t(()=>{"use strict"});export{a,m as b,c,r as d};
@@ -1,3 +1,3 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.5");process.exit(0)}
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.7");process.exit(0)}
2
2
  import a from"chalk";import{existsSync as m,statSync as S}from"fs";import{join as p,relative as P}from"path";var l=class{static prompt(t,e){return new Promise(r=>{t.question(e,s=>{r(s)})})}static printStepHeader(t,e,r){console.log(""),console.log(a.cyan(`Step ${t}: ${e}`)),r&&console.log(a.gray(r)),console.log("")}static printWizardHeader(t,e){console.log(""),console.log(a.blue("========================================")),console.log(a.blue.bold(` ${t}`)),console.log(a.blue("========================================")),e&&console.log(a.gray(e)),console.log(a.gray("Press Ctrl+C to cancel at any time")),console.log("")}static printSummaryHeader(){console.log(""),console.log(a.blue("========================================")),console.log(a.blue.bold(" Configuration Summary")),console.log(a.blue("========================================")),console.log("")}static printSummaryField(t,e,r){let s=r?.indent??" ",i=r?.maxItems??5,c=r?.formatValue??(o=>a.cyan(o));if(Array.isArray(e))e.length===0?console.log(a.white(`${s}${t}: ${a.gray("(none)")}`)):e.length<=i?console.log(a.white(`${s}${t}: ${c(e.join(", "))}`)):(console.log(a.white(`${s}${t}:`)),e.slice(0,i).forEach(o=>{console.log(a.gray(`${s} - ${o}`))}),console.log(a.gray(`${s} ... and ${e.length-i} more`)));else{let o=t.padEnd(16);console.log(a.white(`${s}${o}${c(e)}`))}}static printDerivedSettings(t,e=" "){console.log(""),console.log(a.gray(`${e}Derived settings:`));for(let[r,s]of Object.entries(t))console.log(a.gray(`${e} ${r}: ${s}`));console.log("")}};var h=class u{static getSourceDirectories(t){let e=[],r=["src","lib","app","packages","api"];for(let s of r){let i=p(t,s);m(i)&&S(i).isDirectory()&&e.push(s)}return e}static getCoverageTargets(t){let e=u.getSourceDirectories(t),r=["coverage","coverage/lcov.info","coverage/coverage-final.json",".nyc_output"];for(let s of r){let i=p(t,s);m(i)&&e.push(s)}return e}static getSecurityTargets(t){let e=u.getSourceDirectories(t),r=["package.json","package-lock.json","yarn.lock","pnpm-lock.yaml",".env",".env.example","docker-compose.yml","Dockerfile"];for(let s of r){let i=p(t,s);m(i)&&e.push(s)}return e}static getTestSourceFiles(t){let e=[],r=["src","lib","app","packages"];for(let s of r){let i=p(t,s);m(i)&&S(i).isDirectory()&&(e.push(`${s}/**/*.ts`),e.push(s))}return m(p(t,"src"))&&(e.push("src/services/**/*.ts"),e.push("src/utils/**/*.ts"),e.push("src/components/**/*.tsx")),e}static checkPatternsExist(t){return[p(t,".agentic-qe","patterns"),p(t,".agentic-qe","memory.db"),p(t,".aqe","patterns"),p(t,"data","patterns")].some(r=>m(r))}},f=class{static relativePath(t,e){return P(e,t)||"."}static yesNo(t){return t?"Yes":"No"}static enabledDisabled(t){return t?"Enabled":"Disabled"}static percentage(t){return`${t}%`}static truncatedList(t,e=5){return t.length===0?"(none)":t.length<=e?t.join(", "):`${t.slice(0,e).join(", ")}... and ${t.length-e} more`}};import n from"chalk";import{existsSync as w}from"fs";import{resolve as I}from"path";var d=class{constructor(t){this.defaultValue=t}defaultValue;description;getDefaultValue(){return this.defaultValue}success(t){return{value:t,continue:!0}}cancelled(){return{value:this.defaultValue,continue:!1}}error(t){return{value:this.defaultValue,continue:!1,error:t}}};var y=class extends d{id;stepNumber;title;description;options;validValues;constructor(t){super(t.defaultValue),this.id=t.id,this.stepNumber=t.stepNumber,this.title=t.title,this.description=t.description,this.options=t.options,this.validValues=t.validValues}async execute(t){if(t.nonInteractive)return this.success(this.defaultValue);l.printStepHeader(this.stepNumber,this.title,this.description),this.options.forEach(i=>{let c=[];i.isRecommended?c.push(n.green(" (recommended)")):(i.isDefault||i.value===this.defaultValue)&&c.push(n.green(" (default)")),console.log(n.white(` ${i.key}. ${i.label||i.value}${c.join("")}`)),i.description&&console.log(n.gray(` ${i.description}`))}),console.log("");let r=(await l.prompt(t.rl,`Select ${this.title.toLowerCase()} [${n.gray(String(this.defaultValue))}]: `)).trim();if(!r)return this.success(this.defaultValue);let s=parseInt(r,10);return s>=1&&s<=this.options.length?this.success(this.options[s-1].value):this.validValues.includes(r)?this.success(r):(console.log(n.yellow(` Invalid input, using default: ${this.defaultValue}`)),this.success(this.defaultValue))}},b=class extends d{id;stepNumber;title;description;options;validValues;instructions;allowEmpty;constructor(t){super(t.defaultValue),this.id=t.id,this.stepNumber=t.stepNumber,this.title=t.title,this.description=t.description,this.options=t.options,this.validValues=t.validValues,this.instructions=t.instructions,this.allowEmpty=t.allowEmpty??!1}async execute(t){if(t.nonInteractive)return this.success(this.defaultValue);l.printStepHeader(this.stepNumber,this.title,this.description),this.instructions&&(console.log(n.gray(this.instructions)),console.log("")),this.options.forEach(o=>{let N=o.isDefaultSelected||this.defaultValue.includes(o.value)?n.green(" *"):"";console.log(n.white(` ${o.key}. ${o.label||o.value}${N}`)),o.description&&console.log(n.gray(` ${o.description}`))}),console.log(""),console.log(n.gray(" * = included in default selection")),console.log("");let e=this.defaultValue.join(","),s=(await l.prompt(t.rl,`Select options [${n.gray(e)}]: `)).trim();if(!s)return this.success(this.defaultValue);let i=s.split(",").map(o=>o.trim().toLowerCase()).filter(o=>o.length>0),c=[];for(let o of i){let g=parseInt(o,10);g>=1&&g<=this.options.length?c.push(this.options[g-1].value):this.validValues.includes(o)&&c.push(o)}return c.length===0?this.allowEmpty?this.success([]):(console.log(n.yellow(` Invalid input, using default: ${e}`)),this.success(this.defaultValue)):this.success([...new Set(c)])}},v=class extends d{id;stepNumber;title;description;additionalInfo;constructor(t){super(t.defaultValue),this.id=t.id,this.stepNumber=t.stepNumber,this.title=t.title,this.description=t.description,this.additionalInfo=t.additionalInfo}async execute(t){if(t.nonInteractive)return this.success(this.defaultValue);l.printStepHeader(this.stepNumber,this.title,this.description),this.additionalInfo&&(console.log(n.gray(this.additionalInfo)),console.log(""));let e=this.defaultValue?"Y/n":"y/N",s=(await l.prompt(t.rl,`${this.title}? [${n.gray(e)}]: `)).trim().toLowerCase();return s===""?this.success(this.defaultValue):s==="n"||s==="no"?this.success(!1):s==="y"||s==="yes"?this.success(!0):this.success(this.defaultValue)}},x=class extends d{id;stepNumber;title;description;presets;min;max;constructor(t){super(t.defaultValue),this.id=t.id,this.stepNumber=t.stepNumber,this.title=t.title,this.description=t.description,this.presets=t.presets,this.min=t.min,this.max=t.max}async execute(t){if(t.nonInteractive)return this.success(this.defaultValue);l.printStepHeader(this.stepNumber,this.title,this.description),this.presets&&this.presets.length>0&&(this.presets.forEach(i=>{let c=i.value===this.defaultValue?n.green(" (default)"):"";console.log(n.gray(` ${i.key}. ${i.label}${c}`))}),this.min!==void 0&&this.max!==void 0&&console.log(n.gray(` Or enter a custom number (${this.min}-${this.max})`)),console.log(""));let r=(await l.prompt(t.rl,`${this.title} [${n.gray(String(this.defaultValue))}]: `)).trim();if(!r)return this.success(this.defaultValue);let s=parseInt(r,10);if(this.presets){let i=s;if(i>=1&&i<=this.presets.length)return this.success(this.presets[i-1].value)}return isNaN(s)?(console.log(n.yellow(` Invalid input, using default: ${this.defaultValue}`)),this.success(this.defaultValue)):this.min!==void 0&&s<this.min?(console.log(n.yellow(` Value too low, using minimum: ${this.min}`)),this.success(this.min)):this.max!==void 0&&s>this.max?(console.log(n.yellow(` Value too high, using maximum: ${this.max}`)),this.success(this.max)):this.success(s)}},C=class extends d{id;stepNumber;title;description;examples;suggestionsProvider;validatePath;constructor(t){super(t.defaultValue),this.id=t.id,this.stepNumber=t.stepNumber,this.title=t.title,this.description=t.description,this.examples=t.examples,this.suggestionsProvider=t.suggestionsProvider,this.validatePath=t.validatePath??!0}async execute(t){if(t.nonInteractive){let i=I(t.cwd,this.defaultValue);return this.success(w(i)?i:t.cwd)}if(l.printStepHeader(this.stepNumber,this.title,this.description),this.examples&&(console.log(n.gray(`Examples: ${this.examples}`)),console.log("")),this.suggestionsProvider){let i=this.suggestionsProvider(t.cwd);i.length>0&&(console.log(n.yellow("Detected directories:")),i.slice(0,5).forEach((c,o)=>{console.log(n.gray(` ${o+1}. ${c}`))}),console.log(""))}let r=(await l.prompt(t.rl,`${this.title} [${n.gray(this.defaultValue)}]: `)).trim()||this.defaultValue,s=I(t.cwd,r);return this.validatePath&&!w(s)?(console.log(n.yellow(` Warning: '${r}' does not exist, using current directory.`)),this.success(t.cwd)):this.success(s)}};var T=class extends d{id;stepNumber;title;description;constructor(t){super({}),this.id=t.id,this.stepNumber=t.stepNumber,this.title=t.title,this.description=t.description}async execute(t){if(t.nonInteractive)return this.success({});l.printStepHeader(this.stepNumber,this.title,this.description);let e=await l.prompt(t.rl,`Include patterns [${n.gray("e.g., src/**/*.ts")}]: `),r=await l.prompt(t.rl,`Exclude patterns [${n.gray("e.g., **/*.test.ts,dist/**")}]: `),s={};return e.trim()&&(s.include=e.split(",").map(i=>i.trim()).filter(i=>i.length>0)),r.trim()&&(s.exclude=r.split(",").map(i=>i.trim()).filter(i=>i.length>0)),this.success(s)}};import{createInterface as R}from"readline";import $ from"chalk";var V=class{options;cwd;constructor(t){this.options=t,this.cwd=process.cwd()}async run(){if(this.isNonInteractive())return this.getDefaults();let t=R({input:process.stdin,output:process.stdout});try{this.printHeader();let e={},r=this.getCommands();for(let c of r){let o={rl:t,cwd:this.cwd,results:e,nonInteractive:!1},g=await c.execute(o);if(!g.continue)return this.getCancelled();e[c.id]=g.value}let s=this.buildResult(e);return this.printSummary(s),await this.promptConfirmation(t)?s:this.getCancelled()}finally{t.close()}}printHeader(){l.printWizardHeader(this.getTitle(),this.getSubtitle())}async promptConfirmation(t){console.log("");let r=(await l.prompt(t,`${$.green(this.getConfirmationPrompt())} [${$.gray("Y/n")}]: `)).trim().toLowerCase();return r==="n"||r==="no"?(console.log($.yellow(`
3
3
  Wizard cancelled.`)),!1):!0}};export{l as a,h as b,f as c,y as d,b as e,v as f,x as g,C as h,T as i,V as j};
@@ -1,3 +1,3 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.5");process.exit(0)}
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.7");process.exit(0)}
2
2
  import{readFileSync as R,existsSync as v,readdirSync as y}from"fs";import{join as S}from"path";var M=100*1024,b=/mcp__([a-z][a-z0-9-]*)__([a-z][a-z0-9_]*)/g,x=/^```/;function w(e,r){let n=e.length>M?e.slice(0,M):e,o=[],i=n.split(`
3
3
  `),a=!1;for(let s=0;s<i.length;s++){let p=i[s];if(x.test(p.trim())){a=!a;continue}let l,c=new RegExp(b.source,"g");for(;(l=c.exec(p))!==null;){let t=l[1],g=l[2],f=l[0],d=a?"code-block":"prose",u=d==="prose"?.9:.5;o.push({toolName:f,serverName:t,actionName:g,confidence:u,context:d,lineNumber:s+1})}}return o}function E(e){let r=new Map;for(let n of e)r.has(n.serverName)||r.set(n.serverName,[]),r.get(n.serverName).push(n);return r}function N(e){let r=[],n=[S(e,".claude","mcp.json"),S(e,".mcp.json")],o=process.env.HOME||process.env.USERPROFILE||"";o&&n.push(S(o,".claude","mcp.json"));for(let i of n)if(v(i))try{let a=R(i,"utf-8"),s=JSON.parse(a);s.mcpServers&&typeof s.mcpServers=="object"&&r.push(...Object.keys(s.mcpServers))}catch{}return[...new Set(r)]}function h(e,r,n){if(!v(e))return{agentName:r,references:[],requiredServers:[],availableServers:n,missingServers:[],warnings:[`Agent file not found: ${e}`],allSatisfied:!0};let o;try{o=R(e,"utf-8")}catch{return{agentName:r,references:[],requiredServers:[],availableServers:n,missingServers:[],warnings:[`Failed to read agent file: ${e}`],allSatisfied:!0}}let i=w(o,r),a=E(i),s=[...a.keys()],p=new Set(n),l=s.filter(t=>!p.has(t)),c=[];for(let t of l){let g=a.get(t)||[],f=Math.max(...g.map(m=>m.confidence)),d=g.length,u=[...new Set(g.map(m=>m.context))].join(", ");c.push(`[advisory] Agent "${r}" references MCP server "${t}" (${d} tool ref${d>1?"s":""}, confidence: ${f}, context: ${u}) but server is not configured. Agent may have reduced capabilities.`)}return{agentName:r,references:i,requiredServers:s,availableServers:n,missingServers:l,warnings:c,allSatisfied:l.length===0}}function C(e,r){let n=Date.now(),o=[],i=[],a=N(r);if(!v(e))return{agents:[],totalServersReferenced:0,globalMissingServers:[],agentsWithMissingDeps:[],warnings:[`Agents directory not found: ${e}`],durationMs:Date.now()-n};try{let c=y(e);for(let g of c){if(!g.endsWith(".md"))continue;let f=g.replace(".md",""),d=S(e,g),u=h(d,f,a);o.push(u),i.push(...u.warnings)}let t=S(e,"subagents");if(v(t)){let g=y(t);for(let f of g){if(!f.endsWith(".md"))continue;let d=f.replace(".md",""),u=S(t,f),m=h(u,d,a);o.push(m),i.push(...m.warnings)}}}catch(c){i.push(`Error scanning agents directory: ${c.message}`)}let s=new Set,p=new Set,l=[];for(let c of o){for(let t of c.requiredServers)s.add(t);for(let t of c.missingServers)p.add(t);c.missingServers.length>0&&l.push(c.agentName)}return{agents:o,totalServersReferenced:s.size,globalMissingServers:[...p],agentsWithMissingDeps:l,warnings:i,durationMs:Date.now()-n}}export{N as a,C as b};
@@ -0,0 +1,20 @@
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.7");process.exit(0)}
2
+ import{c as e}from"./chunk-LRRQEAP5.js";function r(t){t.exec(n)}var n,a=e(()=>{"use strict";n=`
3
+ -- Negative pattern records (ADR-110 kept nulls)
4
+ CREATE TABLE IF NOT EXISTS qe_pattern_nulls (
5
+ id TEXT PRIMARY KEY,
6
+ pattern_id TEXT NOT NULL REFERENCES qe_patterns(id),
7
+ context_fingerprint TEXT NOT NULL,
8
+ failure_mode TEXT NOT NULL,
9
+ trajectory_ref TEXT,
10
+ evidence_class TEXT NOT NULL DEFAULT 'EXECUTED'
11
+ CHECK (evidence_class IN ('EXECUTED','STATIC','INFERRED','CONJECTURE')),
12
+ consolidated_count INTEGER NOT NULL DEFAULT 1,
13
+ created_at TEXT DEFAULT (datetime('now')),
14
+ updated_at TEXT DEFAULT (datetime('now')),
15
+ UNIQUE (pattern_id, context_fingerprint)
16
+ );
17
+
18
+ CREATE INDEX IF NOT EXISTS idx_pattern_nulls_pattern ON qe_pattern_nulls(pattern_id);
19
+ CREATE INDEX IF NOT EXISTS idx_pattern_nulls_context ON qe_pattern_nulls(context_fingerprint);
20
+ `});export{n as a,r as b,a as c};
@@ -1,2 +1,2 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.5");process.exit(0)}
2
- import{a as n}from"./chunk-K5KKZWED.js";import{a as o}from"./chunk-HHEHGERJ.js";import{a,e as c}from"./chunk-RONMVGCT.js";c();var M=a.CLEANUP_INTERVAL_MS,y=".agentic-qe/memory.db";async function d(r,t=!0){let e;switch(r.type){case"memory":e=new o;break;case"sqlite":e=new n({sqlite:r.sqlite,enableFallback:!0});break;case"agentdb":e=new n({sqlite:{path:r.agentdb?.path??y},enableFallback:!0});break;case"hybrid":e=new n(r.hybrid);break;default:throw new Error(`Unknown memory backend type: ${r.type}`)}return t&&await e.initialize(),{backend:e,type:r.type,initialized:t}}async function u(r=!0){let t=process.env.AQE_MEMORY_BACKEND??"memory",e=process.env.AQE_MEMORY_PATH??".agentic-qe",i={type:t,sqlite:{path:`${e}/memory.db`,walMode:!0},agentdb:{path:`${e}/memory.db`},hybrid:{enableFallback:!0,sqlite:{path:`${e}/memory.db`}}};return d(i,r)}export{d as a,u as b};
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.7");process.exit(0)}
2
+ import{a as n}from"./chunk-V7WBNB2S.js";import{a as o}from"./chunk-OSETFZVE.js";import{a,e as c}from"./chunk-MRLGQX7Y.js";c();var M=a.CLEANUP_INTERVAL_MS,y=".agentic-qe/memory.db";async function d(r,t=!0){let e;switch(r.type){case"memory":e=new o;break;case"sqlite":e=new n({sqlite:r.sqlite,enableFallback:!0});break;case"agentdb":e=new n({sqlite:{path:r.agentdb?.path??y},enableFallback:!0});break;case"hybrid":e=new n(r.hybrid);break;default:throw new Error(`Unknown memory backend type: ${r.type}`)}return t&&await e.initialize(),{backend:e,type:r.type,initialized:t}}async function u(r=!0){let t=process.env.AQE_MEMORY_BACKEND??"memory",e=process.env.AQE_MEMORY_PATH??".agentic-qe",i={type:t,sqlite:{path:`${e}/memory.db`,walMode:!0},agentdb:{path:`${e}/memory.db`},hybrid:{enableFallback:!0,sqlite:{path:`${e}/memory.db`}}};return d(i,r)}export{d as a,u as b};
@@ -1,2 +1,2 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.5");process.exit(0)}
2
- import{b as y,d as p}from"./chunk-RUQV3BTV.js";import{i as h}from"./chunk-7DU35D4M.js";var f={healthyThreshold:3,warningThreshold:2,checkIntervalMs:5e3,maxHistoryEntries:100,alertsEnabled:!0,alertCooldownMs:6e4,selfHealingEnabled:!1,maxHealingActionsPerMinute:5};var g=class{calculator;config;eventBus;persistence;graph;history=[];alerts=new Map;lastAlertTime=new Map;monitoringInterval=null;isMonitoring=!1;constructor(e,t={},r,i){this.graph=e,this.config={...f,...t},this.calculator=p(),this.eventBus=r,this.persistence=i}start(){this.isMonitoring||(this.isMonitoring=!0,this.monitoringInterval=setInterval(()=>this.checkHealth(),this.config.checkIntervalMs),this.checkHealth())}stop(){this.monitoringInterval&&(clearInterval(this.monitoringInterval),this.monitoringInterval=null),this.isMonitoring=!1}updateGraph(e){this.graph=e,this.isMonitoring&&this.checkHealth()}isEmptyTopology(){return this.graph.getVerticesByType("agent").length===0}checkHealth(){let e=this.calculator.getMinCutValue(this.graph),t=this.calculator.findWeakVertices(this.graph),r=this.isEmptyTopology()?"idle":this.determineStatus(e),i=this.calculateTrend();return this.recordHistory(e),this.isEmptyTopology()||this.checkAlertConditions(e,t,r),this.persistence&&t.length>0&&this.persistence.saveWeakVertices(t).catch(n=>console.warn("[MinCutHealthMonitor] Failed to persist weak vertices:",n)),this.emitEvent("mincut.updated",e,{status:r,weakVertexCount:t.length}),{status:r,minCutValue:e,healthyThreshold:this.config.healthyThreshold,warningThreshold:this.config.warningThreshold,weakVertexCount:t.length,topWeakVertices:t.slice(0,5),trend:i,history:this.history.slice(-20),lastUpdated:new Date}}getHealth(){let e=this.calculator.getMinCutValue(this.graph),t=this.calculator.findWeakVertices(this.graph);return{status:this.isEmptyTopology()?"idle":this.determineStatus(e),minCutValue:e,healthyThreshold:this.config.healthyThreshold,warningThreshold:this.config.warningThreshold,weakVertexCount:t.length,topWeakVertices:t.slice(0,5),trend:this.calculateTrend(),history:this.history.slice(-20),lastUpdated:new Date}}getMinCutValue(){return this.calculator.getMinCutValue(this.graph)}getWeakVertices(){return this.calculator.findWeakVertices(this.graph)}isCritical(){return this.calculator.getMinCutValue(this.graph)<this.config.warningThreshold}isHealthy(){return this.calculator.getMinCutValue(this.graph)>=this.config.healthyThreshold}getActiveAlerts(){return Array.from(this.alerts.values()).filter(e=>!e.acknowledged).sort((e,t)=>{let r={critical:0,high:1,medium:2,low:3,info:4};return r[e.severity]-r[t.severity]})}getAllAlerts(){return Array.from(this.alerts.values())}acknowledgeAlert(e){let t=this.alerts.get(e);return t?(t.acknowledged=!0,!0):!1}clearAcknowledgedAlerts(){let e=[];for(let[t,r]of this.alerts)r.acknowledged&&e.push(t);for(let t of e)this.alerts.delete(t);return e.length}getHistory(){return[...this.history]}getTrend(){return this.calculateTrend()}getStats(e=6e4){let t=Date.now()-e,r=this.history.filter(n=>n.timestamp.getTime()>t);if(r.length===0){let n=this.calculator.getMinCutValue(this.graph);return{min:n,max:n,average:n,count:0}}let i=r.map(n=>n.value);return{min:Math.min(...i),max:Math.max(...i),average:i.reduce((n,a)=>n+a,0)/i.length,count:r.length}}updateConfig(e){Object.assign(this.config,e),e.checkIntervalMs&&this.isMonitoring&&(this.stop(),this.start())}getConfig(){return{...this.config}}determineStatus(e){return e>=this.config.healthyThreshold?"healthy":e>=this.config.warningThreshold?"warning":"critical"}calculateTrend(){if(this.history.length<3)return"stable";let e=this.history.slice(-5),t=e[0].value,i=e[e.length-1].value-t,a=e.reduce((o,c)=>o+c.value,0)/e.length*.1;return i>a?"improving":i<-a?"degrading":"stable"}recordHistory(e){let t={timestamp:new Date,value:e,vertexCount:this.graph.vertexCount,edgeCount:this.graph.edgeCount};for(this.history.push(t);this.history.length>this.config.maxHistoryEntries;)this.history.shift()}checkAlertConditions(e,t,r){if(!this.config.alertsEnabled)return;let i=Date.now();r==="critical"?this.maybeGenerateAlert("critical-threshold","critical",`MinCut value (${e.toFixed(2)}) is below critical threshold (${this.config.warningThreshold})`,e,this.config.warningThreshold,t):r==="warning"&&this.maybeGenerateAlert("warning-threshold","high",`MinCut value (${e.toFixed(2)}) is below healthy threshold (${this.config.healthyThreshold})`,e,this.config.healthyThreshold,t);let n=t.filter(o=>o.weightedDegree===0);n.length>0&&this.maybeGenerateAlert("isolated-vertices","high",`${n.length} isolated vertex(es) detected`,e,0,n);let a=t.filter(o=>o.riskScore>.8);a.length>0&&this.maybeGenerateAlert("critical-vertices","medium",`${a.length} critical vertex(es) with high risk score`,e,0,a)}maybeGenerateAlert(e,t,r,i,n,a){let o=Date.now(),c=this.lastAlertTime.get(e)||0;if(o-c<this.config.alertCooldownMs)return;let s={id:h(),severity:t,message:r,minCutValue:i,threshold:n,affectedVertices:a.map(l=>l.vertexId),timestamp:new Date,acknowledged:!1,remediations:a.flatMap(l=>l.suggestions).slice(0,5)};this.alerts.set(s.id,s),this.persistence&&this.persistence.saveAlert(s).catch(l=>console.warn("[MinCutHealthMonitor] Failed to persist alert:",l)),this.lastAlertTime.set(e,o),this.emitEvent("mincut.alert.generated",i,{alert:s})}emitEvent(e,t,r){if(!this.eventBus)return;let i={id:h(),type:e,source:"coordination",timestamp:new Date,correlationId:h(),payload:{minCutValue:t,...r}};this.eventBus.publish(i).catch(n=>{console.error("Failed to publish MinCut event:",n)})}};function v(m,e,t,r){return new g(m,e,t,r)}var d=null,u=null;function C(){return d||(d=y()),d}function P(){return u||(u=v(C())),u}function B(){return d!==null}function F(){return u!==null}export{f as a,v as b,C as c,P as d,B as e,F as f};
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.7");process.exit(0)}
2
+ import{b as y,d as p}from"./chunk-K6IU2MV4.js";import{i as h}from"./chunk-6OLPKIYU.js";var f={healthyThreshold:3,warningThreshold:2,checkIntervalMs:5e3,maxHistoryEntries:100,alertsEnabled:!0,alertCooldownMs:6e4,selfHealingEnabled:!1,maxHealingActionsPerMinute:5};var g=class{calculator;config;eventBus;persistence;graph;history=[];alerts=new Map;lastAlertTime=new Map;monitoringInterval=null;isMonitoring=!1;constructor(e,t={},r,i){this.graph=e,this.config={...f,...t},this.calculator=p(),this.eventBus=r,this.persistence=i}start(){this.isMonitoring||(this.isMonitoring=!0,this.monitoringInterval=setInterval(()=>this.checkHealth(),this.config.checkIntervalMs),this.checkHealth())}stop(){this.monitoringInterval&&(clearInterval(this.monitoringInterval),this.monitoringInterval=null),this.isMonitoring=!1}updateGraph(e){this.graph=e,this.isMonitoring&&this.checkHealth()}isEmptyTopology(){return this.graph.getVerticesByType("agent").length===0}checkHealth(){let e=this.calculator.getMinCutValue(this.graph),t=this.calculator.findWeakVertices(this.graph),r=this.isEmptyTopology()?"idle":this.determineStatus(e),i=this.calculateTrend();return this.recordHistory(e),this.isEmptyTopology()||this.checkAlertConditions(e,t,r),this.persistence&&t.length>0&&this.persistence.saveWeakVertices(t).catch(n=>console.warn("[MinCutHealthMonitor] Failed to persist weak vertices:",n)),this.emitEvent("mincut.updated",e,{status:r,weakVertexCount:t.length}),{status:r,minCutValue:e,healthyThreshold:this.config.healthyThreshold,warningThreshold:this.config.warningThreshold,weakVertexCount:t.length,topWeakVertices:t.slice(0,5),trend:i,history:this.history.slice(-20),lastUpdated:new Date}}getHealth(){let e=this.calculator.getMinCutValue(this.graph),t=this.calculator.findWeakVertices(this.graph);return{status:this.isEmptyTopology()?"idle":this.determineStatus(e),minCutValue:e,healthyThreshold:this.config.healthyThreshold,warningThreshold:this.config.warningThreshold,weakVertexCount:t.length,topWeakVertices:t.slice(0,5),trend:this.calculateTrend(),history:this.history.slice(-20),lastUpdated:new Date}}getMinCutValue(){return this.calculator.getMinCutValue(this.graph)}getWeakVertices(){return this.calculator.findWeakVertices(this.graph)}isCritical(){return this.calculator.getMinCutValue(this.graph)<this.config.warningThreshold}isHealthy(){return this.calculator.getMinCutValue(this.graph)>=this.config.healthyThreshold}getActiveAlerts(){return Array.from(this.alerts.values()).filter(e=>!e.acknowledged).sort((e,t)=>{let r={critical:0,high:1,medium:2,low:3,info:4};return r[e.severity]-r[t.severity]})}getAllAlerts(){return Array.from(this.alerts.values())}acknowledgeAlert(e){let t=this.alerts.get(e);return t?(t.acknowledged=!0,!0):!1}clearAcknowledgedAlerts(){let e=[];for(let[t,r]of this.alerts)r.acknowledged&&e.push(t);for(let t of e)this.alerts.delete(t);return e.length}getHistory(){return[...this.history]}getTrend(){return this.calculateTrend()}getStats(e=6e4){let t=Date.now()-e,r=this.history.filter(n=>n.timestamp.getTime()>t);if(r.length===0){let n=this.calculator.getMinCutValue(this.graph);return{min:n,max:n,average:n,count:0}}let i=r.map(n=>n.value);return{min:Math.min(...i),max:Math.max(...i),average:i.reduce((n,a)=>n+a,0)/i.length,count:r.length}}updateConfig(e){Object.assign(this.config,e),e.checkIntervalMs&&this.isMonitoring&&(this.stop(),this.start())}getConfig(){return{...this.config}}determineStatus(e){return e>=this.config.healthyThreshold?"healthy":e>=this.config.warningThreshold?"warning":"critical"}calculateTrend(){if(this.history.length<3)return"stable";let e=this.history.slice(-5),t=e[0].value,i=e[e.length-1].value-t,a=e.reduce((o,c)=>o+c.value,0)/e.length*.1;return i>a?"improving":i<-a?"degrading":"stable"}recordHistory(e){let t={timestamp:new Date,value:e,vertexCount:this.graph.vertexCount,edgeCount:this.graph.edgeCount};for(this.history.push(t);this.history.length>this.config.maxHistoryEntries;)this.history.shift()}checkAlertConditions(e,t,r){if(!this.config.alertsEnabled)return;let i=Date.now();r==="critical"?this.maybeGenerateAlert("critical-threshold","critical",`MinCut value (${e.toFixed(2)}) is below critical threshold (${this.config.warningThreshold})`,e,this.config.warningThreshold,t):r==="warning"&&this.maybeGenerateAlert("warning-threshold","high",`MinCut value (${e.toFixed(2)}) is below healthy threshold (${this.config.healthyThreshold})`,e,this.config.healthyThreshold,t);let n=t.filter(o=>o.weightedDegree===0);n.length>0&&this.maybeGenerateAlert("isolated-vertices","high",`${n.length} isolated vertex(es) detected`,e,0,n);let a=t.filter(o=>o.riskScore>.8);a.length>0&&this.maybeGenerateAlert("critical-vertices","medium",`${a.length} critical vertex(es) with high risk score`,e,0,a)}maybeGenerateAlert(e,t,r,i,n,a){let o=Date.now(),c=this.lastAlertTime.get(e)||0;if(o-c<this.config.alertCooldownMs)return;let s={id:h(),severity:t,message:r,minCutValue:i,threshold:n,affectedVertices:a.map(l=>l.vertexId),timestamp:new Date,acknowledged:!1,remediations:a.flatMap(l=>l.suggestions).slice(0,5)};this.alerts.set(s.id,s),this.persistence&&this.persistence.saveAlert(s).catch(l=>console.warn("[MinCutHealthMonitor] Failed to persist alert:",l)),this.lastAlertTime.set(e,o),this.emitEvent("mincut.alert.generated",i,{alert:s})}emitEvent(e,t,r){if(!this.eventBus)return;let i={id:h(),type:e,source:"coordination",timestamp:new Date,correlationId:h(),payload:{minCutValue:t,...r}};this.eventBus.publish(i).catch(n=>{console.error("Failed to publish MinCut event:",n)})}};function v(m,e,t,r){return new g(m,e,t,r)}var d=null,u=null;function C(){return d||(d=y()),d}function P(){return u||(u=v(C())),u}function B(){return d!==null}function F(){return u!==null}export{f as a,v as b,C as c,P as d,B as e,F as f};
@@ -1,2 +1,2 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.5");process.exit(0)}
2
- import{j as d}from"./chunk-GMU7P5O3.js";import{a as u,c as g}from"./chunk-S73KENCH.js";g();var m=[{type:"email",pattern:/[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/g,mask:n=>n[0]+"***@"+n.split("@")[1]},{type:"ssn",pattern:/\b\d{3}-\d{2}-\d{4}\b/g,mask:()=>"***-**-****"},{type:"credit-card",pattern:/\b(?:\d[ -]*?){13,19}\b/g,mask:n=>"****-****-****-"+n.replace(/\D/g,"").slice(-4)},{type:"phone",pattern:/\b(?:\+?1[-.\s]?)?(?:\(?\d{3}\)?[-.\s]?)?\d{3}[-.\s]?\d{4}\b/g,mask:n=>n.slice(0,3)+"***"+n.slice(-2)},{type:"api-key",pattern:/(?:key|token|api_key|apikey|secret|password|passwd|auth)=([A-Za-z0-9_\-]{16,})/gi,mask:()=>"***REDACTED***"}],y=class extends d{config={name:"qe/security/url-validate",description:"Validate URL security: checks for XSS/injection patterns, unsafe protocols, and scans URL query parameters for PII exposure (emails, SSNs, credit cards, API keys).",domain:"security-compliance",schema:this.buildSchema()};buildSchema(){return{type:"object",properties:{url:{type:"string",description:"URL to validate for security threats and PII exposure"},enablePII:{type:"boolean",description:"Enable PII exposure scanning in URL and query parameters",default:!0}},required:["url"]}}async execute(s,r){try{let e=this.validateURLSecurity(s.url),t=s.enablePII!==!1?this.scanForPII(s.url):{scanned:!1,found:!1,types:[],details:[]},c=e.issues.length+(t.found?t.types.length:0)===0?`URL passed all checks (security: clean, PII: ${t.scanned?"none found":"not scanned"})`:`URL has ${e.issues.length} security issue(s)${t.found?` and ${t.types.length} PII type(s) exposed in URL`:""}`;return{success:!0,data:{url:s.url,urlSecurity:e,piiExposure:t,summary:c}}}catch(e){return{success:!1,error:u(e)}}}validateURLSecurity(s){let r=[],e="none";try{let t=new URL(s);["http:","https:"].includes(t.protocol)||(r.push({type:"unsafe-protocol",description:`Protocol ${t.protocol} is not allowed`,severity:"high"}),e="high");let o=[/<script/i,/javascript:/i,/on\w+=/i,/data:text\/html/i];for(let i of o)if(i.test(s)){r.push({type:"xss",description:"Potential XSS pattern detected in URL",severity:"critical"}),e="critical";break}let c=[/'.*or.*'/i,/union.*select/i,/drop.*table/i,/;\s*--/i];for(let i of c)if(i.test(s)){r.push({type:"sql-injection",description:"Potential SQL injection pattern detected in URL",severity:"critical"}),e="critical";break}/\.\.[/\\]/.test(s)&&(r.push({type:"path-traversal",description:"Potential path traversal pattern (../) detected",severity:"high"}),e!=="critical"&&(e="high"));let a=["redirect","url","next","return","returnUrl","goto"];for(let i of a){let l=t.searchParams.get(i);l&&/^https?:\/\//.test(l)&&(r.push({type:"open-redirect",description:`Query parameter "${i}" contains an external URL \u2014 potential open redirect`,severity:"medium"}),e==="none"&&(e="medium"))}}catch{r.push({type:"invalid-url",description:"URL could not be parsed",severity:"critical"}),e="critical"}return{valid:r.length===0,riskLevel:e,issues:r}}scanForPII(s){let r=[],e=new Set,t;try{t=decodeURIComponent(s)}catch{t=s}let o="",c="";try{let a=new URL(t);o=a.search,c=a.pathname}catch{o=t}for(let{type:a,pattern:i,mask:l}of m){i.lastIndex=0;let p;for(;(p=i.exec(t))!==null;){e.add(a);let h=o.includes(p[0])?"query-parameter":c.includes(p[0])?"path":"url";r.push({type:a,location:h,masked:l(p[0])})}}return{scanned:!0,found:e.size>0,types:Array.from(e),details:r}}};export{y as a};
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.7");process.exit(0)}
2
+ import{j as d}from"./chunk-XK7P7OXO.js";import{a as u,c as g}from"./chunk-XWPUCPYW.js";g();var m=[{type:"email",pattern:/[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/g,mask:n=>n[0]+"***@"+n.split("@")[1]},{type:"ssn",pattern:/\b\d{3}-\d{2}-\d{4}\b/g,mask:()=>"***-**-****"},{type:"credit-card",pattern:/\b(?:\d[ -]*?){13,19}\b/g,mask:n=>"****-****-****-"+n.replace(/\D/g,"").slice(-4)},{type:"phone",pattern:/\b(?:\+?1[-.\s]?)?(?:\(?\d{3}\)?[-.\s]?)?\d{3}[-.\s]?\d{4}\b/g,mask:n=>n.slice(0,3)+"***"+n.slice(-2)},{type:"api-key",pattern:/(?:key|token|api_key|apikey|secret|password|passwd|auth)=([A-Za-z0-9_\-]{16,})/gi,mask:()=>"***REDACTED***"}],y=class extends d{config={name:"qe/security/url-validate",description:"Validate URL security: checks for XSS/injection patterns, unsafe protocols, and scans URL query parameters for PII exposure (emails, SSNs, credit cards, API keys).",domain:"security-compliance",schema:this.buildSchema()};buildSchema(){return{type:"object",properties:{url:{type:"string",description:"URL to validate for security threats and PII exposure"},enablePII:{type:"boolean",description:"Enable PII exposure scanning in URL and query parameters",default:!0}},required:["url"]}}async execute(s,r){try{let e=this.validateURLSecurity(s.url),t=s.enablePII!==!1?this.scanForPII(s.url):{scanned:!1,found:!1,types:[],details:[]},c=e.issues.length+(t.found?t.types.length:0)===0?`URL passed all checks (security: clean, PII: ${t.scanned?"none found":"not scanned"})`:`URL has ${e.issues.length} security issue(s)${t.found?` and ${t.types.length} PII type(s) exposed in URL`:""}`;return{success:!0,data:{url:s.url,urlSecurity:e,piiExposure:t,summary:c}}}catch(e){return{success:!1,error:u(e)}}}validateURLSecurity(s){let r=[],e="none";try{let t=new URL(s);["http:","https:"].includes(t.protocol)||(r.push({type:"unsafe-protocol",description:`Protocol ${t.protocol} is not allowed`,severity:"high"}),e="high");let o=[/<script/i,/javascript:/i,/on\w+=/i,/data:text\/html/i];for(let i of o)if(i.test(s)){r.push({type:"xss",description:"Potential XSS pattern detected in URL",severity:"critical"}),e="critical";break}let c=[/'.*or.*'/i,/union.*select/i,/drop.*table/i,/;\s*--/i];for(let i of c)if(i.test(s)){r.push({type:"sql-injection",description:"Potential SQL injection pattern detected in URL",severity:"critical"}),e="critical";break}/\.\.[/\\]/.test(s)&&(r.push({type:"path-traversal",description:"Potential path traversal pattern (../) detected",severity:"high"}),e!=="critical"&&(e="high"));let a=["redirect","url","next","return","returnUrl","goto"];for(let i of a){let l=t.searchParams.get(i);l&&/^https?:\/\//.test(l)&&(r.push({type:"open-redirect",description:`Query parameter "${i}" contains an external URL \u2014 potential open redirect`,severity:"medium"}),e==="none"&&(e="medium"))}}catch{r.push({type:"invalid-url",description:"URL could not be parsed",severity:"critical"}),e="critical"}return{valid:r.length===0,riskLevel:e,issues:r}}scanForPII(s){let r=[],e=new Set,t;try{t=decodeURIComponent(s)}catch{t=s}let o="",c="";try{let a=new URL(t);o=a.search,c=a.pathname}catch{o=t}for(let{type:a,pattern:i,mask:l}of m){i.lastIndex=0;let p;for(;(p=i.exec(t))!==null;){e.add(a);let h=o.includes(p[0])?"query-parameter":c.includes(p[0])?"path":"url";r.push({type:a,location:h,masked:l(p[0])})}}return{scanned:!0,found:e.size>0,types:Array.from(e),details:r}}};export{y as a};
@@ -1,2 +1,2 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.5");process.exit(0)}
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.7");process.exit(0)}
2
2
  var i=class r{constructor(e){this._value=e;if(!e||e.trim()==="")throw new Error("FilePath cannot be empty")}_value;get value(){return this._value}get extension(){let e=this._value.split(".");return e.length>1?e[e.length-1]:""}get directory(){let e=this._value.lastIndexOf("/");return e>0?this._value.substring(0,e):""}get filename(){let e=this._value.lastIndexOf("/");return e>=0?this._value.substring(e+1):this._value}equals(e){return this._value===e._value}static create(e){return new r(e)}};var s=class r{constructor(e){this._value=e;if(e<0||e>1)throw new Error("RiskScore must be between 0 and 1")}_value;get value(){return this._value}get percentage(){return this._value*100}get level(){return this._value>=.8?"critical":this._value>=.6?"high":this._value>=.3?"medium":"low"}isHigherThan(e){return this._value>e._value}equals(e){return this._value===e._value}static create(e){return new r(e)}static fromPercentage(e){return new r(e/100)}},u=class r{constructor(e,t){this._start=e;this._end=t;if(e>t)throw new Error("Start date cannot be after end date")}_start;_end;get start(){return this._start}get end(){return this._end}get durationMs(){return this._end.getTime()-this._start.getTime()}get durationSeconds(){return this.durationMs/1e3}contains(e){return e>=this._start&&e<=this._end}overlaps(e){return this._start<=e._end&&e._start<=this._end}equals(e){return this._start.getTime()===e._start.getTime()&&this._end.getTime()===e._end.getTime()}static create(e,t){return new r(e,t)}static lastNDays(e){let t=new Date,n=new Date(t.getTime()-e*24*60*60*1e3);return new r(n,t)}},o=class r{constructor(e,t,n,a){this._major=e;this._minor=t;this._patch=n;this._prerelease=a}_major;_minor;_patch;_prerelease;get major(){return this._major}get minor(){return this._minor}get patch(){return this._patch}get prerelease(){return this._prerelease}toString(){let e=`${this._major}.${this._minor}.${this._patch}`;return this._prerelease?`${e}-${this._prerelease}`:e}isNewerThan(e){return this._major!==e._major?this._major>e._major:this._minor!==e._minor?this._minor>e._minor:this._patch>e._patch}equals(e){return this._major===e._major&&this._minor===e._minor&&this._patch===e._patch&&this._prerelease===e._prerelease}static create(e,t,n,a){return new r(e,t,n,a)}static parse(e){let t=e.match(/^(\d+)\.(\d+)\.(\d+)(?:-(.+))?$/);if(!t)throw new Error(`Invalid version format: ${e}`);return new r(parseInt(t[1]),parseInt(t[2]),parseInt(t[3]),t[4])}};export{i as a,s as b,u as c,o as d};
@@ -1,2 +1,2 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.5");process.exit(0)}
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.7");process.exit(0)}
2
2
  import{randomUUID as v}from"crypto";var m={"claude-opus-4-7":{input:5,output:25,provider:"claude"},"claude-sonnet-4-6":{input:3,output:15,provider:"claude"},"claude-haiku-4-5-20251001":{input:1,output:5,provider:"claude"},"claude-opus-4-5-20251101":{input:15,output:75,provider:"claude"},"claude-sonnet-4-20250514":{input:3,output:15,provider:"claude"},"claude-3-5-haiku-20241022":{input:1,output:5,provider:"claude"},"claude-3-opus-20240229":{input:15,output:75,provider:"claude"},"claude-3-sonnet-20240229":{input:3,output:15,provider:"claude"},"claude-3-haiku-20240307":{input:.25,output:1.25,provider:"claude"},"gpt-4o":{input:5,output:15,provider:"openai"},"gpt-4o-mini":{input:.15,output:.6,provider:"openai"},"gpt-4-turbo":{input:10,output:30,provider:"openai"},"gpt-4":{input:30,output:60,provider:"openai"},"gpt-3.5-turbo":{input:.5,output:1.5,provider:"openai"},llama3:{input:0,output:0,provider:"ollama"},"llama3.1":{input:0,output:0,provider:"ollama"},codellama:{input:0,output:0,provider:"ollama"},mistral:{input:0,output:0,provider:"ollama"},mixtral:{input:0,output:0,provider:"ollama"},phi3:{input:0,output:0,provider:"ollama"},qwen2:{input:0,output:0,provider:"ollama"},"anthropic/claude-3.5-sonnet":{input:3,output:15,provider:"openrouter"},"anthropic/claude-3.5-sonnet:beta":{input:3,output:15,provider:"openrouter"},"anthropic/claude-3-opus":{input:15,output:75,provider:"openrouter"},"anthropic/claude-3-sonnet":{input:3,output:15,provider:"openrouter"},"anthropic/claude-3-haiku":{input:.25,output:1.25,provider:"openrouter"},"openai/gpt-4o":{input:5,output:15,provider:"openrouter"},"openai/gpt-4o-mini":{input:.15,output:.6,provider:"openrouter"},"openai/gpt-4-turbo":{input:10,output:30,provider:"openrouter"},"openai/gpt-3.5-turbo":{input:.5,output:1.5,provider:"openrouter"},"google/gemini-pro":{input:.125,output:.375,provider:"openrouter"},"google/gemini-pro-1.5":{input:3.5,output:10.5,provider:"openrouter"},"meta-llama/llama-3.1-70b-instruct":{input:.59,output:.79,provider:"openrouter"},"meta-llama/llama-3.1-8b-instruct":{input:.06,output:.06,provider:"openrouter"},"mistralai/mistral-large":{input:2,output:6,provider:"openrouter"},"mistralai/mixtral-8x7b-instruct":{input:.24,output:.24,provider:"openrouter"},"mistralai/mistral-7b-instruct":{input:.06,output:.06,provider:"openrouter"},"anthropic.claude-opus-4-5-v1:0":{input:15,output:75,provider:"bedrock"},"anthropic.claude-opus-4-v1:0":{input:15,output:75,provider:"bedrock"},"anthropic.claude-sonnet-4-5-v2:0":{input:3,output:15,provider:"bedrock"},"anthropic.claude-sonnet-4-v1:0":{input:3,output:15,provider:"bedrock"},"anthropic.claude-3-5-haiku-v1:0":{input:1,output:5,provider:"bedrock"},"anthropic.claude-3-opus-20240229-v1:0":{input:15,output:75,provider:"bedrock"},"anthropic.claude-3-sonnet-20240229-v1:0":{input:3,output:15,provider:"bedrock"},"anthropic.claude-3-haiku-20240307-v1:0":{input:.25,output:1.25,provider:"bedrock"},"anthropic.claude-3-5-sonnet-20241022-v2:0":{input:3,output:15,provider:"bedrock"},"azure/gpt-4o":{input:5,output:15,provider:"azure-openai"},"azure/gpt-4o-mini":{input:.15,output:.6,provider:"azure-openai"},"azure/gpt-4-turbo":{input:10,output:30,provider:"azure-openai"},"azure/gpt-4":{input:30,output:60,provider:"azure-openai"},"azure/gpt-35-turbo":{input:.5,output:1.5,provider:"azure-openai"},"azure/text-embedding-ada-002":{input:.1,output:0,provider:"azure-openai"},"azure/text-embedding-3-small":{input:.02,output:0,provider:"azure-openai"},"azure/text-embedding-3-large":{input:.13,output:0,provider:"azure-openai"},"gemini-pro":{input:.5,output:1.5,provider:"gemini"},"gemini-1.0-pro":{input:.5,output:1.5,provider:"gemini"},"gemini-1.5-pro":{input:3.5,output:10.5,provider:"gemini"},"gemini-1.5-pro-latest":{input:3.5,output:10.5,provider:"gemini"},"gemini-1.5-flash":{input:.075,output:.3,provider:"gemini"},"gemini-1.5-flash-latest":{input:.075,output:.3,provider:"gemini"},"gemini-2.0-flash-exp":{input:.075,output:.3,provider:"gemini"},"gemini-ultra":{input:7,output:21,provider:"gemini"},"gemini-1.0-ultra":{input:7,output:21,provider:"gemini"},"text-embedding-004":{input:.025,output:0,provider:"gemini"}},d=class c{records=[];alerts=[];maxRecords;alertCheckInterval;constructor(t=1e4){this.maxRecords=t}static calculateCost(t,r){let e=m[t];if(!e)return{inputCost:0,outputCost:0,totalCost:0,currency:"USD"};let i=r.promptTokens/1e6*e.input+(r.cacheReadTokens??0)/1e6*e.input*.1+(r.cacheCreationTokens??0)/1e6*e.input*1.25,o=r.completionTokens/1e6*e.output;return{inputCost:i,outputCost:o,totalCost:i+o,currency:"USD"}}static getCostPerToken(t){let r=m[t];return r?{input:r.input/1e6,output:r.output/1e6}:{input:0,output:0}}recordUsage(t,r,e,i,o){let n=c.calculateCost(r,e),p={timestamp:new Date,provider:t,model:r,usage:e,cost:n,requestId:i,metadata:o};return this.records.push(p),this.records.length>this.maxRecords&&(this.records=this.records.slice(-this.maxRecords)),this.checkAlerts(),n}getSummary(t){let r=new Date,e=this.getPeriodStart(r,t),i=r,o=this.records.filter(a=>a.timestamp>=e&&a.timestamp<=i),n={claude:0,openai:0,ollama:0,openrouter:0,bedrock:0,"azure-openai":0,gemini:0},p={},u=0,l=0;for(let a of o)u+=a.cost.totalCost,l+=a.usage.totalTokens,n[a.provider]+=a.cost.totalCost,p[a.model]=(p[a.model]||0)+a.cost.totalCost;return{period:t,periodStart:e,periodEnd:i,totalCost:u,byProvider:n,byModel:p,totalTokens:l,totalRequests:o.length}}getCurrentCost(t){return this.getSummary(t).totalCost}getTotalTokens(t){return this.getSummary(t).totalTokens}getUsageByProvider(t,r="all"){let e=this.getPeriodStart(new Date,r),i=this.records.filter(u=>u.provider===t&&u.timestamp>=e),o={},n=0,p=0;for(let u of i)n+=u.cost.totalCost,p+=u.usage.totalTokens,o[u.model]||(o[u.model]={cost:0,tokens:0,requests:0}),o[u.model].cost+=u.cost.totalCost,o[u.model].tokens+=u.usage.totalTokens,o[u.model].requests+=1;return{totalCost:n,totalTokens:p,totalRequests:i.length,models:o}}addAlert(t,r,e){let i=`alert-${Date.now()}-${v().slice(0,12)}`;return this.alerts.push({threshold:t,period:r,onThreshold:e,active:!0}),this.alertCheckInterval||(this.alertCheckInterval=setInterval(()=>this.checkAlerts(),6e4)),i}removeAlert(t){return t>=0&&t<this.alerts.length?(this.alerts.splice(t,1),this.alerts.length===0&&this.alertCheckInterval&&(clearInterval(this.alertCheckInterval),this.alertCheckInterval=void 0),!0):!1}getRecords(){return[...this.records]}importRecords(t){for(let r of t)r.timestamp=new Date(r.timestamp),this.records.push(r);this.records.length>this.maxRecords&&(this.records=this.records.slice(-this.maxRecords))}clear(){this.records=[]}getRecentRequests(t=10){return this.records.slice(-t)}estimateCost(t,r,e){return c.calculateCost(t,{promptTokens:r,completionTokens:e,totalTokens:r+e})}wouldExceedLimit(t,r,e,i,o){let n=this.getCurrentCost(o),p=this.estimateCost(t,r,e);return n+p.totalCost>i}dispose(){this.alertCheckInterval&&(clearInterval(this.alertCheckInterval),this.alertCheckInterval=void 0)}getPeriodStart(t,r){let e=new Date(t);switch(r){case"minute":e.setSeconds(0,0),e.setMinutes(e.getMinutes()-1);break;case"hour":e.setMinutes(0,0,0),e.setHours(e.getHours()-1);break;case"day":e.setHours(0,0,0,0);break;case"week":e.setHours(0,0,0,0),e.setDate(e.getDate()-7);break;case"month":e.setHours(0,0,0,0),e.setDate(1);break;case"all":return new Date(0)}return e}checkAlerts(){for(let t of this.alerts){if(!t.active)continue;let r=this.getSummary(t.period);if(r.totalCost>=t.threshold){t.active=!1;try{t.onThreshold(r)}catch(e){console.error("Cost alert callback error:",e)}}}}},s;function h(){return s||(s=new d),s}function b(){s&&(s.dispose(),s=void 0)}export{m as a,d as b,h as c,b as d};
@@ -1,2 +1,2 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.5");process.exit(0)}
2
- import{a as g}from"./chunk-FE3FGMNB.js";import{b as p,c}from"./chunk-IRS4HKAR.js";import{a as x,b as f,c as w}from"./chunk-S73KENCH.js";import{i as v}from"./chunk-7DU35D4M.js";w();var l={ProtocolStarted:"coordination.ProtocolStarted",ProtocolCompleted:"coordination.ProtocolCompleted",ProtocolFailed:"coordination.ProtocolFailed",ProtocolCancelled:"coordination.ProtocolCancelled",ActionStarted:"coordination.ActionStarted",ActionCompleted:"coordination.ActionCompleted",ActionFailed:"coordination.ActionFailed"},E=class{constructor(e,t,o){this.eventBus=e;this.memory=t;this.getDomainAPI=o}eventBus;memory;getDomainAPI;protocols=new Map;executions=new Map;scheduledProtocols=new Map;schedulerRunning=!1;registerProtocol(e){this.protocols.set(e.id,e),e.schedule.type==="event"&&e.enabled&&this.setupEventTriggers(e),(e.schedule.type==="cron"||e.schedule.type==="interval")&&e.enabled&&this.scheduleProtocol(e)}unregisterProtocol(e){if(!this.protocols.get(e))return!1;let o=this.scheduledProtocols.get(e);return o?.intervalId&&clearInterval(o.intervalId),this.scheduledProtocols.delete(e),this.protocols.delete(e),!0}getProtocol(e){return this.protocols.get(e)}listProtocols(){return Array.from(this.protocols.values())}async execute(e,t){let o=this.protocols.get(e);return o?o.enabled?this.executeProtocol(o,t):c(new Error(`Protocol is disabled: ${e}`)):c(new Error(`Protocol not found: ${e}`))}async executeOnEvent(e,t){let o=this.protocols.get(e);return o?o.enabled?this.executeProtocol(o,void 0,t):c(new Error(`Protocol is disabled: ${e}`)):c(new Error(`Protocol not found: ${e}`))}getExecution(e){let t=this.executions.get(e);if(t)return this.toImmutableExecution(t.execution)}listActiveExecutions(){return Array.from(this.executions.values()).filter(e=>e.execution.status==="running"||e.execution.status==="paused").map(e=>this.toImmutableExecution(e.execution))}async cancelExecution(e){let t=this.executions.get(e);return t?t.execution.status!=="running"&&t.execution.status!=="paused"?c(new Error(`Cannot cancel execution in status: ${t.execution.status}`)):(t.cancelled=!0,t.execution.status="cancelled",t.execution.completedAt=new Date,await this.publishEvent(l.ProtocolCancelled,{executionId:e,protocolId:t.protocol.id}),p(void 0)):c(new Error(`Execution not found: ${e}`))}async pauseExecution(e){let t=this.executions.get(e);return t?t.execution.status!=="running"?c(new Error(`Cannot pause execution in status: ${t.execution.status}`)):(t.paused=!0,t.execution.status="paused",p(void 0)):c(new Error(`Execution not found: ${e}`))}async resumeExecution(e){let t=this.executions.get(e);return t?t.execution.status!=="paused"?c(new Error(`Cannot resume execution in status: ${t.execution.status}`)):(t.paused=!1,t.execution.status="running",p(void 0)):c(new Error(`Execution not found: ${e}`))}startScheduler(){if(!this.schedulerRunning){this.schedulerRunning=!0;for(let e of this.protocols.values())e.enabled&&(e.schedule.type==="interval"||e.schedule.type==="cron")&&this.scheduleProtocol(e)}}stopScheduler(){this.schedulerRunning=!1;for(let e of this.scheduledProtocols.values())e.intervalId&&(clearInterval(e.intervalId),e.intervalId=void 0)}async dispose(){this.stopScheduler(),this.protocols.clear(),this.executions.clear(),this.scheduledProtocols.clear()}async executeProtocol(e,t,o){let r=v(),a=o?.correlationId??r,n={executionId:r,protocolId:e.id,status:"running",participants:[...e.participants],results:new Map,startedAt:new Date,correlationId:a,triggeredBy:o},u={execution:n,protocol:e,params:t,actionResults:new Map,cancelled:!1,paused:!1};this.executions.set(r,u),await this.publishEvent(l.ProtocolStarted,{executionId:r,protocolId:e.id,participants:e.participants},a);try{await this.executeActions(u);let i=Array.from(u.actionResults.values()).some(s=>s.status==="failed");return u.cancelled?n.status="cancelled":i?(n.status="failed",await this.publishEvent(l.ProtocolFailed,{executionId:r,protocolId:e.id,failedActions:Array.from(u.actionResults.values()).filter(s=>s.status==="failed").map(s=>s.actionId)},a)):(n.status="completed",await this.publishEvent(l.ProtocolCompleted,{executionId:r,protocolId:e.id,duration:Date.now()-n.startedAt.getTime()},a)),n.completedAt=new Date,n.results=u.actionResults,await this.storeExecutionHistory(n),p(this.toImmutableExecution(n))}catch(i){return n.status="failed",n.completedAt=new Date,await this.publishEvent(l.ProtocolFailed,{executionId:r,protocolId:e.id,error:x(i)},a),c(f(i))}}async executeActions(e){let{protocol:t,actionResults:o}=e,r=new Set(t.actions.map(n=>n.id)),a=new Set;for(;r.size>0&&!e.cancelled;){for(;e.paused&&!e.cancelled;)await this.sleep(100);if(e.cancelled)break;let n=t.actions.filter(i=>r.has(i.id)&&this.dependenciesSatisfied(i,a));if(n.length===0&&r.size>0)throw new Error(`Deadlock detected: actions ${Array.from(r).join(", ")} cannot proceed`);let u=await Promise.allSettled(n.map(i=>this.executeAction(i,e)));for(let i=0;i<n.length;i++){let s=n[i],d=u[i],m;d.status==="fulfilled"?m=d.value:m={actionId:s.id,status:"failed",error:d.reason instanceof Error?d.reason.message:String(d.reason)},o.set(s.id,m),r.delete(s.id),m.status==="completed"&&a.add(s.id)}}for(let n of r)o.set(n,{actionId:n,status:e.cancelled?"cancelled":"skipped"})}async executeAction(e,t){let o=new Date;await this.publishEvent(l.ActionStarted,{executionId:t.execution.executionId,actionId:e.id,actionName:e.name,targetDomain:e.targetDomain},t.execution.correlationId);let r=0,a=e.retry?.maxAttempts??1,n;for(;r<a;){r++;try{let i=this.getDomainAPI(e.targetDomain);if(!i)throw new Error(`Domain API not available: ${e.targetDomain}`);let s=i[e.method];if(typeof s!="function")throw new Error(`Method ${e.method} not found on domain ${e.targetDomain}`);let d={...e.params,...t.params},m=await this.executeWithTimeout(s.bind(i)(d),e.timeout??3e4),h=new Date;return await this.publishEvent(l.ActionCompleted,{executionId:t.execution.executionId,actionId:e.id,duration:h.getTime()-o.getTime()},t.execution.correlationId),{actionId:e.id,status:"completed",startedAt:o,completedAt:h,duration:h.getTime()-o.getTime(),result:m,retryAttempts:r>1?r-1:void 0}}catch(i){if(n=f(i),r<a&&e.retry){let s=e.retry.backoffMs*Math.pow(e.retry.backoffMultiplier??2,r-1);await this.sleep(s)}}}let u=new Date;return await this.publishEvent(l.ActionFailed,{executionId:t.execution.executionId,actionId:e.id,error:n?.message??"Unknown error",attempts:r},t.execution.correlationId),{actionId:e.id,status:"failed",startedAt:o,completedAt:u,duration:u.getTime()-o.getTime(),error:n?.message??"Unknown error",retryAttempts:r>1?r-1:void 0}}dependenciesSatisfied(e,t){return!e.dependsOn||e.dependsOn.length===0?!0:e.dependsOn.every(o=>t.has(o))}async executeWithTimeout(e,t){return Promise.race([e,new Promise((o,r)=>setTimeout(()=>r(new Error("Action timeout")),t))])}setupEventTriggers(e){if(e.schedule.type==="event")for(let t of e.schedule.triggerEvents)this.eventBus.subscribe(t,async o=>{await this.executeOnEvent(e.id,o)})}scheduleProtocol(e){if(e.schedule.type==="interval"){let t={protocolId:e.id,schedule:e.schedule};t.intervalId=setInterval(async()=>{this.schedulerRunning&&await this.execute(e.id)},e.schedule.intervalMs),this.scheduledProtocols.set(e.id,t)}}async storeExecutionHistory(e){let t=`protocol-execution:${e.executionId}`;await this.memory.set(t,{...e,results:Object.fromEntries(e.results)},{namespace:"coordination",ttl:864e5})}toImmutableExecution(e){return{executionId:e.executionId,protocolId:e.protocolId,status:e.status,participants:[...e.participants],results:new Map(e.results),startedAt:e.startedAt,completedAt:e.completedAt,correlationId:e.correlationId,triggeredBy:e.triggeredBy}}async publishEvent(e,t,o){let r=g(e,"learning-optimization",t,o);await this.eventBus.publish(r)}sleep(e){return new Promise(t=>setTimeout(t,e))}};function S(P,e,t){return new E(P,e,t)}export{E as a,S as b};
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.10.7");process.exit(0)}
2
+ import{a as g}from"./chunk-MMR23KAO.js";import{b as p,c}from"./chunk-2MLISLRR.js";import{a as x,b as f,c as w}from"./chunk-XWPUCPYW.js";import{i as v}from"./chunk-6OLPKIYU.js";w();var l={ProtocolStarted:"coordination.ProtocolStarted",ProtocolCompleted:"coordination.ProtocolCompleted",ProtocolFailed:"coordination.ProtocolFailed",ProtocolCancelled:"coordination.ProtocolCancelled",ActionStarted:"coordination.ActionStarted",ActionCompleted:"coordination.ActionCompleted",ActionFailed:"coordination.ActionFailed"},E=class{constructor(e,t,o){this.eventBus=e;this.memory=t;this.getDomainAPI=o}eventBus;memory;getDomainAPI;protocols=new Map;executions=new Map;scheduledProtocols=new Map;schedulerRunning=!1;registerProtocol(e){this.protocols.set(e.id,e),e.schedule.type==="event"&&e.enabled&&this.setupEventTriggers(e),(e.schedule.type==="cron"||e.schedule.type==="interval")&&e.enabled&&this.scheduleProtocol(e)}unregisterProtocol(e){if(!this.protocols.get(e))return!1;let o=this.scheduledProtocols.get(e);return o?.intervalId&&clearInterval(o.intervalId),this.scheduledProtocols.delete(e),this.protocols.delete(e),!0}getProtocol(e){return this.protocols.get(e)}listProtocols(){return Array.from(this.protocols.values())}async execute(e,t){let o=this.protocols.get(e);return o?o.enabled?this.executeProtocol(o,t):c(new Error(`Protocol is disabled: ${e}`)):c(new Error(`Protocol not found: ${e}`))}async executeOnEvent(e,t){let o=this.protocols.get(e);return o?o.enabled?this.executeProtocol(o,void 0,t):c(new Error(`Protocol is disabled: ${e}`)):c(new Error(`Protocol not found: ${e}`))}getExecution(e){let t=this.executions.get(e);if(t)return this.toImmutableExecution(t.execution)}listActiveExecutions(){return Array.from(this.executions.values()).filter(e=>e.execution.status==="running"||e.execution.status==="paused").map(e=>this.toImmutableExecution(e.execution))}async cancelExecution(e){let t=this.executions.get(e);return t?t.execution.status!=="running"&&t.execution.status!=="paused"?c(new Error(`Cannot cancel execution in status: ${t.execution.status}`)):(t.cancelled=!0,t.execution.status="cancelled",t.execution.completedAt=new Date,await this.publishEvent(l.ProtocolCancelled,{executionId:e,protocolId:t.protocol.id}),p(void 0)):c(new Error(`Execution not found: ${e}`))}async pauseExecution(e){let t=this.executions.get(e);return t?t.execution.status!=="running"?c(new Error(`Cannot pause execution in status: ${t.execution.status}`)):(t.paused=!0,t.execution.status="paused",p(void 0)):c(new Error(`Execution not found: ${e}`))}async resumeExecution(e){let t=this.executions.get(e);return t?t.execution.status!=="paused"?c(new Error(`Cannot resume execution in status: ${t.execution.status}`)):(t.paused=!1,t.execution.status="running",p(void 0)):c(new Error(`Execution not found: ${e}`))}startScheduler(){if(!this.schedulerRunning){this.schedulerRunning=!0;for(let e of this.protocols.values())e.enabled&&(e.schedule.type==="interval"||e.schedule.type==="cron")&&this.scheduleProtocol(e)}}stopScheduler(){this.schedulerRunning=!1;for(let e of this.scheduledProtocols.values())e.intervalId&&(clearInterval(e.intervalId),e.intervalId=void 0)}async dispose(){this.stopScheduler(),this.protocols.clear(),this.executions.clear(),this.scheduledProtocols.clear()}async executeProtocol(e,t,o){let r=v(),a=o?.correlationId??r,n={executionId:r,protocolId:e.id,status:"running",participants:[...e.participants],results:new Map,startedAt:new Date,correlationId:a,triggeredBy:o},u={execution:n,protocol:e,params:t,actionResults:new Map,cancelled:!1,paused:!1};this.executions.set(r,u),await this.publishEvent(l.ProtocolStarted,{executionId:r,protocolId:e.id,participants:e.participants},a);try{await this.executeActions(u);let i=Array.from(u.actionResults.values()).some(s=>s.status==="failed");return u.cancelled?n.status="cancelled":i?(n.status="failed",await this.publishEvent(l.ProtocolFailed,{executionId:r,protocolId:e.id,failedActions:Array.from(u.actionResults.values()).filter(s=>s.status==="failed").map(s=>s.actionId)},a)):(n.status="completed",await this.publishEvent(l.ProtocolCompleted,{executionId:r,protocolId:e.id,duration:Date.now()-n.startedAt.getTime()},a)),n.completedAt=new Date,n.results=u.actionResults,await this.storeExecutionHistory(n),p(this.toImmutableExecution(n))}catch(i){return n.status="failed",n.completedAt=new Date,await this.publishEvent(l.ProtocolFailed,{executionId:r,protocolId:e.id,error:x(i)},a),c(f(i))}}async executeActions(e){let{protocol:t,actionResults:o}=e,r=new Set(t.actions.map(n=>n.id)),a=new Set;for(;r.size>0&&!e.cancelled;){for(;e.paused&&!e.cancelled;)await this.sleep(100);if(e.cancelled)break;let n=t.actions.filter(i=>r.has(i.id)&&this.dependenciesSatisfied(i,a));if(n.length===0&&r.size>0)throw new Error(`Deadlock detected: actions ${Array.from(r).join(", ")} cannot proceed`);let u=await Promise.allSettled(n.map(i=>this.executeAction(i,e)));for(let i=0;i<n.length;i++){let s=n[i],d=u[i],m;d.status==="fulfilled"?m=d.value:m={actionId:s.id,status:"failed",error:d.reason instanceof Error?d.reason.message:String(d.reason)},o.set(s.id,m),r.delete(s.id),m.status==="completed"&&a.add(s.id)}}for(let n of r)o.set(n,{actionId:n,status:e.cancelled?"cancelled":"skipped"})}async executeAction(e,t){let o=new Date;await this.publishEvent(l.ActionStarted,{executionId:t.execution.executionId,actionId:e.id,actionName:e.name,targetDomain:e.targetDomain},t.execution.correlationId);let r=0,a=e.retry?.maxAttempts??1,n;for(;r<a;){r++;try{let i=this.getDomainAPI(e.targetDomain);if(!i)throw new Error(`Domain API not available: ${e.targetDomain}`);let s=i[e.method];if(typeof s!="function")throw new Error(`Method ${e.method} not found on domain ${e.targetDomain}`);let d={...e.params,...t.params},m=await this.executeWithTimeout(s.bind(i)(d),e.timeout??3e4),h=new Date;return await this.publishEvent(l.ActionCompleted,{executionId:t.execution.executionId,actionId:e.id,duration:h.getTime()-o.getTime()},t.execution.correlationId),{actionId:e.id,status:"completed",startedAt:o,completedAt:h,duration:h.getTime()-o.getTime(),result:m,retryAttempts:r>1?r-1:void 0}}catch(i){if(n=f(i),r<a&&e.retry){let s=e.retry.backoffMs*Math.pow(e.retry.backoffMultiplier??2,r-1);await this.sleep(s)}}}let u=new Date;return await this.publishEvent(l.ActionFailed,{executionId:t.execution.executionId,actionId:e.id,error:n?.message??"Unknown error",attempts:r},t.execution.correlationId),{actionId:e.id,status:"failed",startedAt:o,completedAt:u,duration:u.getTime()-o.getTime(),error:n?.message??"Unknown error",retryAttempts:r>1?r-1:void 0}}dependenciesSatisfied(e,t){return!e.dependsOn||e.dependsOn.length===0?!0:e.dependsOn.every(o=>t.has(o))}async executeWithTimeout(e,t){return Promise.race([e,new Promise((o,r)=>setTimeout(()=>r(new Error("Action timeout")),t))])}setupEventTriggers(e){if(e.schedule.type==="event")for(let t of e.schedule.triggerEvents)this.eventBus.subscribe(t,async o=>{await this.executeOnEvent(e.id,o)})}scheduleProtocol(e){if(e.schedule.type==="interval"){let t={protocolId:e.id,schedule:e.schedule};t.intervalId=setInterval(async()=>{this.schedulerRunning&&await this.execute(e.id)},e.schedule.intervalMs),this.scheduledProtocols.set(e.id,t)}}async storeExecutionHistory(e){let t=`protocol-execution:${e.executionId}`;await this.memory.set(t,{...e,results:Object.fromEntries(e.results)},{namespace:"coordination",ttl:864e5})}toImmutableExecution(e){return{executionId:e.executionId,protocolId:e.protocolId,status:e.status,participants:[...e.participants],results:new Map(e.results),startedAt:e.startedAt,completedAt:e.completedAt,correlationId:e.correlationId,triggeredBy:e.triggeredBy}}async publishEvent(e,t,o){let r=g(e,"learning-optimization",t,o);await this.eventBus.publish(r)}sleep(e){return new Promise(t=>setTimeout(t,e))}};function S(P,e,t){return new E(P,e,t)}export{E as a,S as b};