agentic-qe 3.14.2 → 3.14.4

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 (760) hide show
  1. package/.claude/agents/v3/qe-coverage-specialist.md +1 -1
  2. package/.claude/agents/v3/qe-fleet-commander.md +1 -1
  3. package/.claude/agents/v3/qe-pentest-validator.md +1 -1
  4. package/.claude/agents/v3/qe-queen-coordinator.md +1 -1
  5. package/.claude/agents/v3/qe-risk-assessor.md +1 -1
  6. package/.claude/agents/v3/qe-root-cause-analyzer.md +1 -1
  7. package/.claude/agents/v3/qe-security-auditor.md +1 -1
  8. package/.claude/agents/v3/qe-test-architect.md +1 -1
  9. package/.claude/commands/aqe-costs.md +10 -10
  10. package/.claude/helpers/advisor-call.cjs +3 -3
  11. package/.claude/helpers/v3/advisor-call.cjs +3 -3
  12. package/.claude/skills/.validation/examples/chaos-engineering-output.example.json +1 -1
  13. package/.claude/skills/.validation/examples/performance-testing-output.example.json +1 -1
  14. package/.claude/skills/.validation/examples/security-testing-output.example.json +1 -1
  15. package/.claude/skills/.validation/examples/testability-scoring-output.example.json +1 -1
  16. package/.claude/skills/.validation/schemas/skill-eval.schema.json +4 -1
  17. package/.claude/skills/.validation/schemas/skill-frontmatter.schema.json +1 -1
  18. package/.claude/skills/.validation/schemas/skill-output.template.json +1 -1
  19. package/.claude/skills/.validation/templates/eval.template.yaml +1 -1
  20. package/.claude/skills/.validation/templates/security-testing-eval.template.yaml +1 -1
  21. package/.claude/skills/.validation/templates/skill-frontmatter.example.yaml +1 -1
  22. package/.claude/skills/.validation/test-data/sample-output.json +1 -1
  23. package/.claude/skills/a11y-ally/SKILL.md +1 -1
  24. package/.claude/skills/a11y-ally/evals/a11y-ally.yaml +1 -1
  25. package/.claude/skills/accessibility-testing/evals/accessibility-testing.yaml +1 -1
  26. package/.claude/skills/api-testing-patterns/evals/api-testing-patterns.yaml +1 -1
  27. package/.claude/skills/chaos-engineering-resilience/evals/chaos-engineering-resilience.yaml +1 -1
  28. package/.claude/skills/cicd-pipeline-qe-orchestrator/evals/cicd-pipeline-qe-orchestrator.yaml +1 -1
  29. package/.claude/skills/compatibility-testing/evals/compatibility-testing.yaml +1 -1
  30. package/.claude/skills/compliance-testing/evals/compliance-testing.yaml +1 -1
  31. package/.claude/skills/contract-testing/evals/contract-testing.yaml +1 -1
  32. package/.claude/skills/database-testing/evals/database-testing.yaml +1 -1
  33. package/.claude/skills/enterprise-integration-testing/evals/enterprise-integration-testing.yaml +1 -1
  34. package/.claude/skills/localization-testing/evals/localization-testing.yaml +1 -1
  35. package/.claude/skills/middleware-testing-patterns/evals/middleware-testing-patterns.yaml +1 -1
  36. package/.claude/skills/mobile-testing/evals/mobile-testing.yaml +1 -1
  37. package/.claude/skills/mutation-testing/evals/mutation-testing.yaml +1 -1
  38. package/.claude/skills/mutation-testing/test-data/sample-output.json +1 -1
  39. package/.claude/skills/n8n-expression-testing/evals/n8n-expression-testing.yaml +1 -1
  40. package/.claude/skills/n8n-integration-testing-patterns/evals/n8n-integration-testing-patterns.yaml +1 -1
  41. package/.claude/skills/n8n-security-testing/evals/n8n-security-testing.yaml +1 -1
  42. package/.claude/skills/n8n-trigger-testing-strategies/evals/n8n-trigger-testing-strategies.yaml +1 -1
  43. package/.claude/skills/n8n-workflow-testing-fundamentals/evals/n8n-workflow-testing-fundamentals.yaml +1 -1
  44. package/.claude/skills/observability-testing-patterns/evals/observability-testing-patterns.yaml +1 -1
  45. package/.claude/skills/pentest-validation/evals/pentest-validation.yaml +1 -1
  46. package/.claude/skills/performance-testing/evals/performance-testing.yaml +1 -1
  47. package/.claude/skills/qcsd-cicd-swarm/evals/qcsd-cicd-swarm.yaml +1 -1
  48. package/.claude/skills/qcsd-development-swarm/evals/qcsd-development-swarm.yaml +1 -1
  49. package/.claude/skills/qcsd-ideation-swarm/evals/qcsd-ideation-swarm.yaml +1 -1
  50. package/.claude/skills/qcsd-production-swarm/evals/qcsd-production-swarm.yaml +1 -1
  51. package/.claude/skills/qcsd-refinement-swarm/evals/qcsd-refinement-swarm.yaml +1 -1
  52. package/.claude/skills/qe-browser/evals/qe-browser.yaml +1 -1
  53. package/.claude/skills/qe-chaos-resilience/evals/qe-chaos-resilience.yaml +1 -1
  54. package/.claude/skills/qe-code-intelligence/evals/qe-code-intelligence.yaml +1 -1
  55. package/.claude/skills/qe-coverage-analysis/evals/qe-coverage-analysis.yaml +1 -1
  56. package/.claude/skills/qe-defect-intelligence/evals/qe-defect-intelligence.yaml +1 -1
  57. package/.claude/skills/qe-learning-optimization/evals/qe-learning-optimization.yaml +2 -2
  58. package/.claude/skills/qe-quality-assessment/evals/qe-quality-assessment.yaml +1 -1
  59. package/.claude/skills/qe-requirements-validation/evals/qe-requirements-validation.yaml +1 -1
  60. package/.claude/skills/qe-test-execution/evals/qe-test-execution.yaml +1 -1
  61. package/.claude/skills/qe-test-generation/evals/qe-test-generation.yaml +1 -1
  62. package/.claude/skills/qe-visual-accessibility/evals/qe-visual-accessibility.yaml +1 -1
  63. package/.claude/skills/quality-metrics/evals/quality-metrics.yaml +1 -1
  64. package/.claude/skills/regression-testing/evals/regression-testing.yaml +1 -1
  65. package/.claude/skills/risk-based-testing/evals/risk-based-testing.yaml +1 -1
  66. package/.claude/skills/security-testing/evals/security-testing.yaml +1 -1
  67. package/.claude/skills/security-visual-testing/evals/security-visual-testing.yaml +1 -1
  68. package/.claude/skills/shift-left-testing/evals/shift-left-testing.yaml +1 -1
  69. package/.claude/skills/shift-right-testing/evals/shift-right-testing.yaml +1 -1
  70. package/.claude/skills/skills-manifest.json +1 -1
  71. package/.claude/skills/test-automation-strategy/evals/test-automation-strategy.yaml +1 -1
  72. package/.claude/skills/test-data-management/evals/test-data-management.yaml +1 -1
  73. package/.claude/skills/test-design-techniques/evals/test-design-techniques.yaml +1 -1
  74. package/.claude/skills/test-reporting-analytics/evals/test-reporting-analytics.yaml +1 -1
  75. package/.claude/skills/testability-scoring/evals/testability-scoring.yaml +1 -1
  76. package/.claude/skills/validation-pipeline/evals/validation-pipeline.yaml +1 -1
  77. package/.claude/skills/verification-quality/evals/verification-quality.yaml +1 -1
  78. package/.claude/skills/visual-testing-advanced/evals/visual-testing-advanced.yaml +1 -1
  79. package/.claude/skills/wms-testing-patterns/evals/wms-testing-patterns.yaml +1 -1
  80. package/.opencode/agents/collective-intelligence-coordinator.yaml +1 -1
  81. package/.opencode/agents/ddd-domain-expert.yaml +1 -1
  82. package/.opencode/agents/memory-specialist.yaml +1 -1
  83. package/.opencode/agents/performance-engineer.yaml +1 -1
  84. package/.opencode/agents/qe-accessibility-auditor.yaml +1 -1
  85. package/.opencode/agents/qe-api-contract-validator.yaml +1 -1
  86. package/.opencode/agents/qe-bdd-generator.yaml +1 -1
  87. package/.opencode/agents/qe-chaos-engineer.yaml +1 -1
  88. package/.opencode/agents/qe-code-complexity.yaml +1 -1
  89. package/.opencode/agents/qe-code-intelligence.yaml +1 -1
  90. package/.opencode/agents/qe-coverage-analyzer.yaml +1 -1
  91. package/.opencode/agents/qe-defect-predictor.yaml +1 -1
  92. package/.opencode/agents/qe-dependency-mapper.yaml +1 -1
  93. package/.opencode/agents/qe-deployment-advisor.yaml +1 -1
  94. package/.opencode/agents/qe-devils-advocate.yaml +1 -1
  95. package/.opencode/agents/qe-flaky-hunter.yaml +1 -1
  96. package/.opencode/agents/qe-fleet-commander.yaml +1 -1
  97. package/.opencode/agents/qe-gap-detector.yaml +1 -1
  98. package/.opencode/agents/qe-graphql-tester.yaml +1 -1
  99. package/.opencode/agents/qe-impact-analyzer.yaml +1 -1
  100. package/.opencode/agents/qe-integration-architect.yaml +1 -1
  101. package/.opencode/agents/qe-integration-tester.yaml +1 -1
  102. package/.opencode/agents/qe-kg-builder.yaml +1 -1
  103. package/.opencode/agents/qe-learning-coordinator.yaml +1 -1
  104. package/.opencode/agents/qe-load-tester.yaml +1 -1
  105. package/.opencode/agents/qe-message-broker-tester.yaml +1 -1
  106. package/.opencode/agents/qe-metrics-optimizer.yaml +1 -1
  107. package/.opencode/agents/qe-middleware-validator.yaml +1 -1
  108. package/.opencode/agents/qe-mutation-tester.yaml +1 -1
  109. package/.opencode/agents/qe-odata-contract-tester.yaml +1 -1
  110. package/.opencode/agents/qe-parallel-executor.yaml +1 -1
  111. package/.opencode/agents/qe-pattern-learner.yaml +1 -1
  112. package/.opencode/agents/qe-pentest-validator.yaml +1 -1
  113. package/.opencode/agents/qe-performance-tester.yaml +1 -1
  114. package/.opencode/agents/qe-product-factors-assessor.yaml +1 -1
  115. package/.opencode/agents/qe-property-tester.yaml +1 -1
  116. package/.opencode/agents/qe-quality-criteria-recommender.yaml +1 -1
  117. package/.opencode/agents/qe-quality-gate.yaml +1 -1
  118. package/.opencode/agents/qe-queen-coordinator.yaml +1 -1
  119. package/.opencode/agents/qe-qx-partner.yaml +1 -1
  120. package/.opencode/agents/qe-regression-analyzer.yaml +1 -1
  121. package/.opencode/agents/qe-requirements-validator.yaml +1 -1
  122. package/.opencode/agents/qe-responsive-tester.yaml +1 -1
  123. package/.opencode/agents/qe-retry-handler.yaml +1 -1
  124. package/.opencode/agents/qe-risk-assessor.yaml +1 -1
  125. package/.opencode/agents/qe-root-cause-analyzer.yaml +1 -1
  126. package/.opencode/agents/qe-sap-idoc-tester.yaml +1 -1
  127. package/.opencode/agents/qe-sap-rfc-tester.yaml +1 -1
  128. package/.opencode/agents/qe-security-auditor.yaml +1 -1
  129. package/.opencode/agents/qe-security-scanner.yaml +1 -1
  130. package/.opencode/agents/qe-soap-tester.yaml +1 -1
  131. package/.opencode/agents/qe-sod-analyzer.yaml +1 -1
  132. package/.opencode/agents/qe-tdd-specialist.yaml +1 -1
  133. package/.opencode/agents/qe-test-generator.yaml +1 -1
  134. package/.opencode/agents/qe-test-idea-rewriter.yaml +1 -1
  135. package/.opencode/agents/qe-transfer-specialist.yaml +1 -1
  136. package/.opencode/agents/qe-visual-tester.yaml +1 -1
  137. package/.opencode/agents/security-architect.yaml +1 -1
  138. package/.opencode/agents/security-auditor.yaml +1 -1
  139. package/CHANGELOG.md +183 -0
  140. package/README.md +7 -2
  141. package/assets/agents/v3/helpers/advisor-call.cjs +3 -3
  142. package/assets/agents/v3/qe-coverage-specialist.md +1 -1
  143. package/assets/agents/v3/qe-fleet-commander.md +1 -1
  144. package/assets/agents/v3/qe-pentest-validator.md +1 -1
  145. package/assets/agents/v3/qe-queen-coordinator.md +1 -1
  146. package/assets/agents/v3/qe-risk-assessor.md +1 -1
  147. package/assets/agents/v3/qe-root-cause-analyzer.md +1 -1
  148. package/assets/agents/v3/qe-security-auditor.md +1 -1
  149. package/assets/agents/v3/qe-test-architect.md +1 -1
  150. package/assets/skills/.validation/examples/chaos-engineering-output.example.json +1 -1
  151. package/assets/skills/.validation/examples/performance-testing-output.example.json +1 -1
  152. package/assets/skills/.validation/examples/security-testing-output.example.json +1 -1
  153. package/assets/skills/.validation/examples/testability-scoring-output.example.json +1 -1
  154. package/assets/skills/.validation/schemas/skill-eval.schema.json +4 -1
  155. package/assets/skills/.validation/schemas/skill-frontmatter.schema.json +1 -1
  156. package/assets/skills/.validation/schemas/skill-output.template.json +1 -1
  157. package/assets/skills/.validation/templates/eval.template.yaml +1 -1
  158. package/assets/skills/.validation/templates/security-testing-eval.template.yaml +1 -1
  159. package/assets/skills/.validation/templates/skill-frontmatter.example.yaml +1 -1
  160. package/assets/skills/.validation/test-data/sample-output.json +1 -1
  161. package/assets/skills/a11y-ally/SKILL.md +1 -1
  162. package/assets/skills/a11y-ally/evals/a11y-ally.yaml +1 -1
  163. package/assets/skills/accessibility-testing/evals/accessibility-testing.yaml +1 -1
  164. package/assets/skills/api-testing-patterns/evals/api-testing-patterns.yaml +1 -1
  165. package/assets/skills/chaos-engineering-resilience/evals/chaos-engineering-resilience.yaml +1 -1
  166. package/assets/skills/cicd-pipeline-qe-orchestrator/evals/cicd-pipeline-qe-orchestrator.yaml +1 -1
  167. package/assets/skills/compatibility-testing/evals/compatibility-testing.yaml +1 -1
  168. package/assets/skills/compliance-testing/evals/compliance-testing.yaml +1 -1
  169. package/assets/skills/contract-testing/evals/contract-testing.yaml +1 -1
  170. package/assets/skills/database-testing/evals/database-testing.yaml +1 -1
  171. package/assets/skills/enterprise-integration-testing/evals/enterprise-integration-testing.yaml +1 -1
  172. package/assets/skills/localization-testing/evals/localization-testing.yaml +1 -1
  173. package/assets/skills/middleware-testing-patterns/evals/middleware-testing-patterns.yaml +1 -1
  174. package/assets/skills/mobile-testing/evals/mobile-testing.yaml +1 -1
  175. package/assets/skills/mutation-testing/evals/mutation-testing.yaml +1 -1
  176. package/assets/skills/mutation-testing/test-data/sample-output.json +1 -1
  177. package/assets/skills/n8n-expression-testing/evals/n8n-expression-testing.yaml +1 -1
  178. package/assets/skills/n8n-integration-testing-patterns/evals/n8n-integration-testing-patterns.yaml +1 -1
  179. package/assets/skills/n8n-security-testing/evals/n8n-security-testing.yaml +1 -1
  180. package/assets/skills/n8n-trigger-testing-strategies/evals/n8n-trigger-testing-strategies.yaml +1 -1
  181. package/assets/skills/n8n-workflow-testing-fundamentals/evals/n8n-workflow-testing-fundamentals.yaml +1 -1
  182. package/assets/skills/observability-testing-patterns/evals/observability-testing-patterns.yaml +1 -1
  183. package/assets/skills/pentest-validation/evals/pentest-validation.yaml +1 -1
  184. package/assets/skills/performance-testing/evals/performance-testing.yaml +1 -1
  185. package/assets/skills/qcsd-cicd-swarm/evals/qcsd-cicd-swarm.yaml +1 -1
  186. package/assets/skills/qcsd-development-swarm/evals/qcsd-development-swarm.yaml +1 -1
  187. package/assets/skills/qcsd-ideation-swarm/evals/qcsd-ideation-swarm.yaml +1 -1
  188. package/assets/skills/qcsd-production-swarm/evals/qcsd-production-swarm.yaml +1 -1
  189. package/assets/skills/qcsd-refinement-swarm/evals/qcsd-refinement-swarm.yaml +1 -1
  190. package/assets/skills/qe-browser/evals/qe-browser.yaml +1 -1
  191. package/assets/skills/qe-chaos-resilience/evals/qe-chaos-resilience.yaml +1 -1
  192. package/assets/skills/qe-code-intelligence/evals/qe-code-intelligence.yaml +1 -1
  193. package/assets/skills/qe-coverage-analysis/evals/qe-coverage-analysis.yaml +1 -1
  194. package/assets/skills/qe-defect-intelligence/evals/qe-defect-intelligence.yaml +1 -1
  195. package/assets/skills/qe-learning-optimization/evals/qe-learning-optimization.yaml +2 -2
  196. package/assets/skills/qe-quality-assessment/evals/qe-quality-assessment.yaml +1 -1
  197. package/assets/skills/qe-requirements-validation/evals/qe-requirements-validation.yaml +1 -1
  198. package/assets/skills/qe-test-execution/evals/qe-test-execution.yaml +1 -1
  199. package/assets/skills/qe-test-generation/evals/qe-test-generation.yaml +1 -1
  200. package/assets/skills/qe-visual-accessibility/evals/qe-visual-accessibility.yaml +1 -1
  201. package/assets/skills/quality-metrics/evals/quality-metrics.yaml +1 -1
  202. package/assets/skills/regression-testing/evals/regression-testing.yaml +1 -1
  203. package/assets/skills/risk-based-testing/evals/risk-based-testing.yaml +1 -1
  204. package/assets/skills/security-testing/evals/security-testing.yaml +1 -1
  205. package/assets/skills/security-visual-testing/evals/security-visual-testing.yaml +1 -1
  206. package/assets/skills/shift-left-testing/evals/shift-left-testing.yaml +1 -1
  207. package/assets/skills/shift-right-testing/evals/shift-right-testing.yaml +1 -1
  208. package/assets/skills/skills-manifest.json +1 -1
  209. package/assets/skills/test-automation-strategy/evals/test-automation-strategy.yaml +1 -1
  210. package/assets/skills/test-data-management/evals/test-data-management.yaml +1 -1
  211. package/assets/skills/test-design-techniques/evals/test-design-techniques.yaml +1 -1
  212. package/assets/skills/test-reporting-analytics/evals/test-reporting-analytics.yaml +1 -1
  213. package/assets/skills/testability-scoring/evals/testability-scoring.yaml +1 -1
  214. package/assets/skills/validation-pipeline/evals/validation-pipeline.yaml +1 -1
  215. package/assets/skills/verification-quality/evals/verification-quality.yaml +1 -1
  216. package/assets/skills/visual-testing-advanced/evals/visual-testing-advanced.yaml +1 -1
  217. package/assets/skills/wms-testing-patterns/evals/wms-testing-patterns.yaml +1 -1
  218. package/dist/cli/bundle.js +7 -7
  219. package/dist/cli/chunks/adapter-TNNNJRDG.js +2 -0
  220. package/dist/cli/chunks/{agent-booster-wasm-SD5N32MX.js → agent-booster-wasm-5PC7D2FW.js} +2 -2
  221. package/dist/cli/chunks/{agent-handler-OZRSJM7F.js → agent-handler-RDNTK4CA.js} +2 -2
  222. package/dist/cli/chunks/{agent-memory-branch-NYTRANRN.js → agent-memory-branch-NAAMBWIR.js} +2 -2
  223. package/dist/cli/chunks/aqe-learning-engine-5ZRMYJLB.js +2 -0
  224. package/dist/cli/chunks/{arena-EX3SC2DP.js → arena-HXTWJ5YY.js} +4 -4
  225. package/dist/cli/chunks/{arena-FOTVSRK4.js → arena-KXFHRWX4.js} +2 -2
  226. package/dist/cli/chunks/{audit-Q5GHSUQY.js → audit-YSGA7UWT.js} +3 -3
  227. package/dist/cli/chunks/base-KWZHOPSH.js +2 -0
  228. package/dist/cli/chunks/{better-sqlite3-S7M5R2HS.js → better-sqlite3-UICJZIDG.js} +2 -2
  229. package/dist/cli/chunks/brain-handler-ET6YAP4B.js +90 -0
  230. package/dist/cli/chunks/{branch-enumerator-RWAXTGEU.js → branch-enumerator-SS7UNVIA.js} +2 -2
  231. package/dist/cli/chunks/{browser-IGDESJGF.js → browser-77GI6KBE.js} +2 -2
  232. package/dist/cli/chunks/browser-workflow-2FZTKDUL.js +2 -0
  233. package/dist/cli/chunks/{chunk-U54OOA24.js → chunk-2JW3BCGG.js} +1 -1
  234. package/dist/cli/chunks/{chunk-LML5VTFK.js → chunk-33YYYWBQ.js} +1 -1
  235. package/dist/cli/chunks/{chunk-P64DMQ2C.js → chunk-34WO57CW.js} +1 -1
  236. package/dist/cli/chunks/{chunk-57TNBR2P.js → chunk-3QHGWY7T.js} +2 -2
  237. package/dist/cli/chunks/chunk-3TW5W5LX.js +2 -0
  238. package/dist/cli/chunks/{chunk-S4MR6RTE.js → chunk-3UPAMMCB.js} +1 -1
  239. package/dist/cli/chunks/{chunk-5WJUNRTY.js → chunk-3VOQRIQM.js} +2 -2
  240. package/dist/cli/chunks/{chunk-4RT7I7PI.js → chunk-3X3DJZJJ.js} +1 -1
  241. package/dist/cli/chunks/{chunk-RFNEHNJV.js → chunk-4MHXCAG2.js} +1 -1
  242. package/dist/cli/chunks/{chunk-PMUBG2RU.js → chunk-4OYFXLBK.js} +2 -2
  243. package/dist/cli/chunks/{chunk-W2FLULF4.js → chunk-55RWDRJD.js} +3 -3
  244. package/dist/cli/chunks/chunk-5R3QL7WN.js +14 -0
  245. package/dist/cli/chunks/{chunk-RHJVDCLV.js → chunk-5SJHQ2CO.js} +2 -2
  246. package/dist/cli/chunks/{chunk-HBTC4L53.js → chunk-5YPYDPBJ.js} +2 -2
  247. package/dist/cli/chunks/chunk-5Z6XZV7K.js +65 -0
  248. package/dist/cli/chunks/{chunk-6EHN7Q2Q.js → chunk-64PFWE2F.js} +2 -2
  249. package/dist/cli/chunks/{chunk-KFXZDQ5J.js → chunk-6CQN24ZK.js} +1 -1
  250. package/dist/cli/chunks/{chunk-WVY22NHZ.js → chunk-6J62K3SW.js} +2 -2
  251. package/dist/cli/chunks/{chunk-TLPL3EQY.js → chunk-6KJABXAR.js} +2 -2
  252. package/dist/cli/chunks/{chunk-PZKZY6PB.js → chunk-6QYNWR7U.js} +2 -2
  253. package/dist/cli/chunks/{chunk-A7N3YUDJ.js → chunk-6TPKK7LD.js} +2 -2
  254. package/dist/cli/chunks/{chunk-RYJHREYS.js → chunk-6UWGMOND.js} +2 -2
  255. package/dist/cli/chunks/{chunk-XPLSLHRB.js → chunk-6VRA2QGL.js} +1 -1
  256. package/dist/cli/chunks/{chunk-Q3JHS3UD.js → chunk-7D777LTF.js} +2 -2
  257. package/dist/cli/chunks/chunk-7ZIOFPL3.js +2 -0
  258. package/dist/cli/chunks/chunk-A4FYONNU.js +2 -0
  259. package/dist/cli/chunks/{chunk-7AFBNU6K.js → chunk-AIHDEEJO.js} +2 -2
  260. package/dist/cli/chunks/{chunk-L2F7FVIU.js → chunk-AUXFKCQL.js} +2 -2
  261. package/dist/cli/chunks/{chunk-67A6PEZM.js → chunk-AWWNB2T7.js} +2 -2
  262. package/dist/cli/chunks/{chunk-DVHWLAEO.js → chunk-BDESSCVR.js} +3 -3
  263. package/dist/cli/chunks/{chunk-JQ2ZD3WO.js → chunk-BFP7KO7P.js} +2 -2
  264. package/dist/cli/chunks/{chunk-N5ZRUOMR.js → chunk-BGE6FOLM.js} +2 -2
  265. package/dist/cli/chunks/{chunk-BWRHOIYC.js → chunk-BOARZKU3.js} +2 -2
  266. package/dist/cli/chunks/{chunk-CTCQOYBS.js → chunk-BOZZYWCR.js} +1 -1
  267. package/dist/cli/chunks/{chunk-NHHWLJQF.js → chunk-C2WU3533.js} +1 -1
  268. package/dist/cli/chunks/{chunk-5EHLGOWW.js → chunk-CDHQFHRP.js} +2 -2
  269. package/dist/cli/chunks/chunk-CDKG6EI7.js +16 -0
  270. package/dist/cli/chunks/{chunk-RGH3WGWD.js → chunk-CIKSHTEQ.js} +3 -3
  271. package/dist/cli/chunks/{chunk-K574FLVB.js → chunk-CIZ5JPDC.js} +2 -2
  272. package/dist/cli/chunks/{chunk-LWUJQGCS.js → chunk-CLTMDCSE.js} +2 -2
  273. package/dist/cli/chunks/{chunk-GHQ5PUOV.js → chunk-CNG6GQEZ.js} +2 -2
  274. package/dist/cli/chunks/{chunk-3C2K4YMS.js → chunk-CSU5NYOX.js} +3 -3
  275. package/dist/cli/chunks/chunk-CU46J64M.js +4 -0
  276. package/dist/cli/chunks/{chunk-EH5OCHAJ.js → chunk-CXQPR5MY.js} +1 -1
  277. package/dist/cli/chunks/chunk-DA5K5754.js +96 -0
  278. package/dist/cli/chunks/{chunk-FVGTINVR.js → chunk-DAEFDCJ4.js} +81 -65
  279. package/dist/cli/chunks/{chunk-MH73D5TN.js → chunk-DEYLEDJN.js} +2 -2
  280. package/dist/cli/chunks/{chunk-7FWP7CZY.js → chunk-DFZCKIGY.js} +3 -3
  281. package/dist/cli/chunks/{chunk-QXTW7XCS.js → chunk-DHJPWQBR.js} +2 -2
  282. package/dist/cli/chunks/{chunk-NAZVPZJS.js → chunk-DOTK76IJ.js} +2 -2
  283. package/dist/cli/chunks/{chunk-RCI64RIJ.js → chunk-DPFRKBOG.js} +2 -2
  284. package/dist/cli/chunks/{chunk-WMW47QMR.js → chunk-EDJ3O7RH.js} +2 -2
  285. package/dist/cli/chunks/{chunk-4K27ESCA.js → chunk-EKQ673SA.js} +1 -1
  286. package/dist/cli/chunks/chunk-F3SBRQC6.js +2 -0
  287. package/dist/cli/chunks/{chunk-4N44UJGI.js → chunk-FGYMFUE2.js} +2 -2
  288. package/dist/cli/chunks/chunk-FLYOJOKN.js +2 -0
  289. package/dist/cli/chunks/{chunk-W4OQYLYO.js → chunk-FRH6VAUS.js} +1 -1
  290. package/dist/cli/chunks/{chunk-VOYJJ3KA.js → chunk-FWGOHAAB.js} +2 -2
  291. package/dist/cli/chunks/{chunk-D4RCV4LY.js → chunk-G6T45OIC.js} +2 -2
  292. package/dist/cli/chunks/{chunk-2EHFEMRU.js → chunk-GPLQ6DOK.js} +2 -2
  293. package/dist/cli/chunks/{chunk-RVCWSAXI.js → chunk-HDSAM2RE.js} +2 -2
  294. package/dist/cli/chunks/chunk-HIVA55CJ.js +2 -0
  295. package/dist/cli/chunks/{chunk-6F4WHN7D.js → chunk-HIYXCDEP.js} +1 -1
  296. package/dist/cli/chunks/{chunk-NRR23SJV.js → chunk-HUWNIPZ5.js} +1 -1
  297. package/dist/cli/chunks/{chunk-4M6A3PVJ.js → chunk-HV2J7KKQ.js} +2 -2
  298. package/dist/cli/chunks/{chunk-CJHVOBJY.js → chunk-IFCLB7FJ.js} +1 -1
  299. package/dist/cli/chunks/{chunk-Q335R4MR.js → chunk-IPR4QP3H.js} +2 -2
  300. package/dist/cli/chunks/{chunk-HZMLNM2T.js → chunk-ISDMD6EU.js} +178 -175
  301. package/dist/cli/chunks/chunk-J6GNQS62.js +5 -0
  302. package/dist/cli/chunks/{chunk-3DFFFXXO.js → chunk-JBNEE5UH.js} +2 -2
  303. package/dist/cli/chunks/chunk-JZ3ORVZ3.js +54 -0
  304. package/dist/cli/chunks/{chunk-T4C56HBW.js → chunk-KCZR45PA.js} +2 -2
  305. package/dist/cli/chunks/chunk-KGT36Z42.js +14 -0
  306. package/dist/cli/chunks/{chunk-JIUF6NV6.js → chunk-KHFNNVJA.js} +2 -2
  307. package/dist/cli/chunks/{chunk-7SK6IMGZ.js → chunk-KPA7MZ6C.js} +2 -2
  308. package/dist/cli/chunks/{chunk-G2CLZVYI.js → chunk-KSKEF7LZ.js} +3 -3
  309. package/dist/cli/chunks/{chunk-6LMLN5R2.js → chunk-M2JBBZQB.js} +2 -2
  310. package/dist/cli/chunks/{chunk-UHTAI4ZB.js → chunk-M4WJKGVK.js} +1 -1
  311. package/dist/cli/chunks/{chunk-KZOBLLXW.js → chunk-M5QUBZY6.js} +2 -2
  312. package/dist/cli/chunks/{chunk-42WUDDUU.js → chunk-MCUJEZT6.js} +2 -2
  313. package/dist/cli/chunks/{chunk-ZFGND4QK.js → chunk-MDWCE7YW.js} +1 -1
  314. package/dist/cli/chunks/{chunk-TYVQNYXX.js → chunk-MEGDYJPV.js} +7 -7
  315. package/dist/cli/chunks/chunk-MIQTXNBG.js +4 -0
  316. package/dist/cli/chunks/{chunk-PFXX5Q32.js → chunk-MNW6QGNJ.js} +2 -2
  317. package/dist/cli/chunks/{chunk-IVGVOGIZ.js → chunk-MOBNBMFW.js} +1 -1
  318. package/dist/cli/chunks/{chunk-NWFIJNEB.js → chunk-MTZH7AHC.js} +1 -1
  319. package/dist/cli/chunks/chunk-MVNP7GIR.js +2 -0
  320. package/dist/cli/chunks/chunk-MVPCNSPY.js +2 -0
  321. package/dist/cli/chunks/chunk-NA7B2QYB.js +2 -0
  322. package/dist/cli/chunks/{chunk-E3Q7WNJD.js → chunk-NDPFGIMJ.js} +3 -3
  323. package/dist/cli/chunks/{chunk-GHUPID5E.js → chunk-NJBGXDQ7.js} +1 -1
  324. package/dist/cli/chunks/chunk-OBAP2TXZ.js +2 -0
  325. package/dist/cli/chunks/{chunk-OBCKP3G4.js → chunk-OCWWP5PL.js} +4 -4
  326. package/dist/cli/chunks/{chunk-CJCT452S.js → chunk-ODKLFVYC.js} +2 -2
  327. package/dist/cli/chunks/{chunk-YN6W2XIT.js → chunk-ONII3572.js} +4 -4
  328. package/dist/cli/chunks/{chunk-QW4LN5NK.js → chunk-OSLYSG3B.js} +2 -2
  329. package/dist/cli/chunks/{chunk-HZ6NEJMO.js → chunk-OULHKEVH.js} +2 -2
  330. package/dist/cli/chunks/{chunk-CG2MUD7U.js → chunk-PAWXJ73E.js} +1 -1
  331. package/dist/cli/chunks/chunk-PEPFCPES.js +2 -0
  332. package/dist/cli/chunks/{chunk-UIGEUEBT.js → chunk-PFR4G3DJ.js} +2 -2
  333. package/dist/cli/chunks/chunk-PO3IXGMQ.js +2 -0
  334. package/dist/cli/chunks/{chunk-6SZKLWZT.js → chunk-PZJOPURC.js} +5 -5
  335. package/dist/cli/chunks/{chunk-ARMZYHYL.js → chunk-Q5DO24IJ.js} +2 -2
  336. package/dist/cli/chunks/chunk-QGIU2WRL.js +2 -0
  337. package/dist/cli/chunks/{chunk-N3RN4QTC.js → chunk-R4VL6E65.js} +2 -2
  338. package/dist/cli/chunks/{chunk-MWQTACNA.js → chunk-R5NE6B2M.js} +2 -2
  339. package/dist/cli/chunks/{chunk-T46LOLW3.js → chunk-RJCYCLZV.js} +2 -2
  340. package/dist/cli/chunks/{chunk-CH2TQCV5.js → chunk-SGYJ4NFZ.js} +1 -1
  341. package/dist/cli/chunks/{chunk-NG2UVPTW.js → chunk-SRKETSFF.js} +1 -1
  342. package/dist/cli/chunks/{chunk-QFUX7ELG.js → chunk-STJCATGN.js} +2 -2
  343. package/dist/cli/chunks/{chunk-CIESXO73.js → chunk-STM3UDNO.js} +1 -1
  344. package/dist/cli/chunks/{chunk-C7AXRI7E.js → chunk-T6BVLVI5.js} +1 -1
  345. package/dist/cli/chunks/{chunk-HSJ5FQCF.js → chunk-TDZ53WO2.js} +2 -2
  346. package/dist/cli/chunks/{chunk-YF5OP6CR.js → chunk-TPGED2IF.js} +2 -2
  347. package/dist/cli/chunks/{chunk-2TG24LYQ.js → chunk-TSRSV3LD.js} +1 -1
  348. package/dist/cli/chunks/{chunk-6VKJAMZY.js → chunk-TT23RRB7.js} +1 -1
  349. package/dist/cli/chunks/{chunk-WXMSRBQF.js → chunk-TWAWHOP7.js} +2 -2
  350. package/dist/cli/chunks/{chunk-ZCDXJ27H.js → chunk-U5K45TFH.js} +1 -1
  351. package/dist/cli/chunks/{chunk-3WV4H33V.js → chunk-UDHKLT4C.js} +1 -1
  352. package/dist/cli/chunks/{chunk-VNAKBHJI.js → chunk-UEM7ZF5K.js} +2 -2
  353. package/dist/cli/chunks/{chunk-4ZUZDFAA.js → chunk-UGVHCMUN.js} +6 -6
  354. package/dist/cli/chunks/{chunk-NNOMDM4N.js → chunk-V3QLFNA2.js} +2 -2
  355. package/dist/cli/chunks/{chunk-S7N4BKI3.js → chunk-VD6QRULW.js} +2 -2
  356. package/dist/cli/chunks/{chunk-WBH4C4BG.js → chunk-VIHTL3U2.js} +2 -2
  357. package/dist/cli/chunks/chunk-W7BWUTVV.js +2 -0
  358. package/dist/cli/chunks/{chunk-IWFL6EFI.js → chunk-WLG5AJ4N.js} +2 -2
  359. package/dist/cli/chunks/{chunk-KEEBUVGV.js → chunk-XC7DYDSY.js} +8 -8
  360. package/dist/cli/chunks/{chunk-F2KRT2II.js → chunk-XJ7QNVI5.js} +3 -3
  361. package/dist/cli/chunks/chunk-XRT2WRMS.js +2 -0
  362. package/dist/cli/chunks/{chunk-ADK7DF3G.js → chunk-XRYF6JV7.js} +2 -2
  363. package/dist/cli/chunks/{chunk-PWEIDHT7.js → chunk-XWMZ6D6N.js} +2 -2
  364. package/dist/cli/chunks/{chunk-ICKLBATY.js → chunk-Y3MW3YBC.js} +2 -2
  365. package/dist/cli/chunks/chunk-YNXS6CGV.js +2 -0
  366. package/dist/cli/chunks/{chunk-PVHO6KLB.js → chunk-Z3RHREWF.js} +1 -1
  367. package/dist/cli/chunks/{chunk-EAJK25IS.js → chunk-ZBAKA4YB.js} +1 -1
  368. package/dist/cli/chunks/chunk-ZBJ4XOOV.js +180 -0
  369. package/dist/cli/chunks/chunk-ZBQY5GLF.js +11 -0
  370. package/dist/cli/chunks/{chunk-R5RNOLHI.js → chunk-ZJ26AQA5.js} +1 -1
  371. package/dist/cli/chunks/{chunk-KPFG4OIM.js → chunk-ZNEMGX5O.js} +1 -1
  372. package/dist/cli/chunks/{chunk-2H5YJ5ZK.js → chunk-ZNPKDCZR.js} +2 -2
  373. package/dist/cli/chunks/{chunk-DW6ZMNMR.js → chunk-ZZDIMOOV.js} +2 -2
  374. package/dist/cli/chunks/ci-464KPQNP.js +81 -0
  375. package/dist/cli/chunks/ci-output-I7FX2RSO.js +2 -0
  376. package/dist/cli/chunks/{circuit-breaker-4WST3QSA.js → circuit-breaker-3FW237WW.js} +2 -2
  377. package/dist/cli/chunks/{claude-flow-setup-KB4TKMYI.js → claude-flow-setup-6JKMBPGU.js} +2 -2
  378. package/dist/cli/chunks/client-7E4LM2WW.js +2 -0
  379. package/dist/cli/chunks/{cline-installer-W2ZHQ6WM.js → cline-installer-UWFHT6VY.js} +2 -2
  380. package/dist/cli/chunks/{code-TF2AVR5D.js → code-KQSUT3FS.js} +29 -29
  381. package/dist/cli/chunks/{code-index-extractor-RMDRUVQJ.js → code-index-extractor-PABBNUSC.js} +2 -2
  382. package/dist/cli/chunks/{codex-installer-VSTRHJHV.js → codex-installer-CQ24DTP5.js} +2 -2
  383. package/dist/cli/chunks/{completions-3Q37QVFR.js → completions-7RWHAUAR.js} +2 -2
  384. package/dist/cli/chunks/complexity-analyzer-XPOAF33E.js +2 -0
  385. package/dist/cli/chunks/{continuedev-installer-VTEXM455.js → continuedev-installer-V4F2FIZP.js} +2 -2
  386. package/dist/cli/chunks/{copilot-installer-AGY7DQUS.js → copilot-installer-JMICURQB.js} +2 -2
  387. package/dist/cli/chunks/core-handlers-IFG3757P.js +2 -0
  388. package/dist/cli/chunks/cost-tracker-5OFHEYFJ.js +2 -0
  389. package/dist/cli/chunks/{coverage-TT64IOS4.js → coverage-QKN57JDS.js} +3 -3
  390. package/dist/cli/chunks/cross-domain-router-EK7W4PGP.js +2 -0
  391. package/dist/cli/chunks/{cursor-installer-OVOJIOHN.js → cursor-installer-GBJ7YXSM.js} +2 -2
  392. package/dist/cli/chunks/{daemon-DMFZMXKA.js → daemon-GKP7CMEK.js} +3 -3
  393. package/dist/cli/chunks/{daemon-XCULEHWY.js → daemon-IAVSO6HK.js} +4 -4
  394. package/dist/cli/chunks/{dag-attention-scheduler-WW2RX4B5.js → dag-attention-scheduler-S225TCI7.js} +2 -2
  395. package/dist/cli/chunks/{detect-QNWIM232.js → detect-IUYH422U.js} +2 -2
  396. package/dist/cli/chunks/{dist-node-6GQIY3CG.js → dist-node-2YRE6A7C.js} +2 -2
  397. package/dist/cli/chunks/{domain-handler-6RJPDELX.js → domain-handler-PL2TZC6H.js} +2 -2
  398. package/dist/cli/chunks/domain-plugins-HCGLXKIT.js +2 -0
  399. package/dist/cli/chunks/{domain-transfer-WK524LBS.js → domain-transfer-KQJRUPXA.js} +2 -2
  400. package/dist/cli/chunks/dream-NFSCSLY7.js +2 -0
  401. package/dist/cli/chunks/{embed-and-insert-pattern-SO6GWJW7.js → embed-and-insert-pattern-ZPAG7235.js} +2 -2
  402. package/dist/cli/chunks/eval-WCK7KNFN.js +17 -0
  403. package/dist/cli/chunks/{experience-capture-middleware-BCCJ35OX.js → experience-capture-middleware-2MSQWSAR.js} +3 -3
  404. package/dist/cli/chunks/{fast-paths-CATDDBEU.js → fast-paths-VYOSIBKF.js} +2 -2
  405. package/dist/cli/chunks/{feature-flags-BUXNAORY.js → feature-flags-UJRHFBRX.js} +2 -2
  406. package/dist/cli/chunks/{feature-flags-KNNWWP5G.js → feature-flags-WCFUKHNQ.js} +2 -2
  407. package/dist/cli/chunks/{file-discovery-S4HF3O7D.js → file-discovery-JDGL4ZWS.js} +2 -2
  408. package/dist/cli/chunks/fleet-ROXVMZ2F.js +43 -0
  409. package/dist/cli/chunks/{gnn-wrapper-G7ABZUG7.js → gnn-wrapper-NIO4ZCO3.js} +2 -2
  410. package/dist/cli/chunks/{heartbeat-handler-UFMELIWT.js → heartbeat-handler-PI42WD3C.js} +4 -4
  411. package/dist/cli/chunks/heartbeat-scheduler-ZATCDJDK.js +2 -0
  412. package/dist/cli/chunks/hnsw-adapter-WXQABRCA.js +2 -0
  413. package/dist/cli/chunks/hnsw-index-TPSWLEA5.js +2 -0
  414. package/dist/cli/chunks/{hnsw-legacy-bridge-YIILSRXI.js → hnsw-legacy-bridge-YLC7SPK2.js} +2 -2
  415. package/dist/cli/chunks/{hnswlib-node-TSVRMXDH.js → hnswlib-node-LG6OS3B7.js} +2 -2
  416. package/dist/cli/chunks/{hooks-OHQPNK74.js → hooks-WVALP5GX.js} +10 -10
  417. package/dist/cli/chunks/{hypergraph-engine-LY7PJDSL.js → hypergraph-engine-GJEMW3EG.js} +2 -2
  418. package/dist/cli/chunks/{hypergraph-handler-YGDYZO6H.js → hypergraph-handler-BLF6LXEV.js} +3 -3
  419. package/dist/cli/chunks/impact-analyzer-HNIU45P5.js +2 -0
  420. package/dist/cli/chunks/{init-handler-MTK65LI3.js → init-handler-K25RWRYY.js} +6 -6
  421. package/dist/cli/chunks/init-wizard-JUIPBMHG.js +2 -0
  422. package/dist/cli/chunks/kernel-5BOZQ754.js +2 -0
  423. package/dist/cli/chunks/{kilocode-installer-3IICU4RS.js → kilocode-installer-BXN6WZ7G.js} +2 -2
  424. package/dist/cli/chunks/{kiro-installer-MXOVQYQA.js → kiro-installer-PM362DLN.js} +12 -12
  425. package/dist/cli/chunks/knowledge-graph-EWDAENWM.js +2 -0
  426. package/dist/cli/chunks/learning-CPERDDRG.js +122 -0
  427. package/dist/cli/chunks/llm-router-GOAV5FPI.js +37 -0
  428. package/dist/cli/chunks/llm-router-service-3YT7JGBS.js +2 -0
  429. package/dist/cli/chunks/{load-F4PVAMXQ.js → load-2BG6SHAK.js} +2 -2
  430. package/dist/cli/chunks/load-test-BP2CPLIV.js +2 -0
  431. package/dist/cli/chunks/{mcp-DUYJUEME.js → mcp-5TTB37DC.js} +2 -2
  432. package/dist/cli/chunks/{memory-XTTYORAS.js → memory-4NHBYT6S.js} +5 -5
  433. package/dist/cli/chunks/memory-backend-4PYQBPRM.js +2 -0
  434. package/dist/cli/chunks/memory-handlers-2B27NITS.js +2 -0
  435. package/dist/cli/chunks/multi-model-executor-KCWSGCDT.js +14 -0
  436. package/dist/cli/chunks/{opencode-installer-33ULBU2F.js → opencode-installer-ATZLLK74.js} +2 -2
  437. package/dist/cli/chunks/{orchestrator-34ZJEKTJ.js → orchestrator-RKB7XJRG.js} +19 -19
  438. package/dist/cli/chunks/pattern-null-store-OYOQOV2O.js +2 -0
  439. package/dist/cli/chunks/{pattern-usage-recorder-GZ2M3F2E.js → pattern-usage-recorder-7VE4XDAI.js} +2 -2
  440. package/dist/cli/chunks/pipeline-LQZSNDD2.js +19 -0
  441. package/dist/cli/chunks/{platform-VKJFJIAW.js → platform-OD5H5U6G.js} +2 -2
  442. package/dist/cli/chunks/{plugin-5C5UBQUQ.js → plugin-EJ6K2MGU.js} +2 -2
  443. package/dist/cli/chunks/{prime-radiant-advanced-wasm-KO2PQI3D.js → prime-radiant-advanced-wasm-OIHTKJMN.js} +2 -2
  444. package/dist/cli/chunks/protocol-executor-3ATJTXWG.js +2 -0
  445. package/dist/cli/chunks/{protocol-handler-ZF74NIKA.js → protocol-handler-NRBROAU7.js} +2 -2
  446. package/dist/cli/chunks/{prove-MO5TQQU4.js → prove-EJOGEGD3.js} +2 -2
  447. package/dist/cli/chunks/qe-reasoning-bank-LLMYZT4X.js +2 -0
  448. package/dist/cli/chunks/{quality-EYIN6AER.js → quality-E55UC73D.js} +2 -2
  449. package/dist/cli/chunks/{quality-gate-V6OQM57O.js → quality-gate-OIQATNT3.js} +3 -3
  450. package/dist/cli/chunks/queen-coordinator-RN7L6KG5.js +2 -0
  451. package/dist/cli/chunks/{real-embeddings-AR7TZX7U.js → real-embeddings-FPFFNOSZ.js} +2 -2
  452. package/dist/cli/chunks/ref-validation-OPO6J7OL.js +2 -0
  453. package/dist/cli/chunks/{roocode-installer-46E626VZ.js → roocode-installer-ODY5KRWU.js} +2 -2
  454. package/dist/cli/chunks/router-MDHITQ2V.js +2 -0
  455. package/dist/cli/chunks/routing-feedback-5XLNJ3Y3.js +2 -0
  456. package/dist/cli/chunks/{routing-handler-ZNRVW6QW.js → routing-handler-KQM6VWLC.js} +4 -4
  457. package/dist/cli/chunks/{ruvector-commands-4L2CQMWS.js → ruvector-commands-U2GVV6PF.js} +2 -2
  458. package/dist/cli/chunks/rvf-dual-writer-JBW4O3II.js +2 -0
  459. package/dist/cli/chunks/rvf-migration-adapter-BPPQL4XJ.js +2 -0
  460. package/dist/cli/chunks/{rvf-migration-coordinator-H4RVGBIA.js → rvf-migration-coordinator-V2GHCJKN.js} +2 -2
  461. package/dist/cli/chunks/rvf-native-adapter-S4562CG5.js +2 -0
  462. package/dist/cli/chunks/rvf-store-integrity-KMIHD3LP.js +2 -0
  463. package/dist/cli/chunks/safe-db-FIRHSXVF.js +2 -0
  464. package/dist/cli/chunks/schedule-RVXFB4HK.js +2 -0
  465. package/dist/cli/chunks/scheduler-IKKAMAOO.js +2 -0
  466. package/dist/cli/chunks/security-P5NM353C.js +13 -0
  467. package/dist/cli/chunks/{shared-rvf-adapter-M6NNIZ5W.js → shared-rvf-adapter-LVIUOO4S.js} +2 -2
  468. package/dist/cli/chunks/{shared-rvf-dual-writer-LHMFCYVE.js → shared-rvf-dual-writer-2CSG7C4W.js} +2 -2
  469. package/dist/cli/chunks/sqlite-persistence-SQ3HCUQ7.js +2 -0
  470. package/dist/cli/chunks/{status-handler-GMIOXQIE.js → status-handler-6TU6O37R.js} +2 -2
  471. package/dist/cli/chunks/{structural-health-YZXHVHM6.js → structural-health-KBIJSTXJ.js} +2 -2
  472. package/dist/cli/chunks/{sync-GMPCPV5L.js → sync-LNHI5SB7.js} +2 -2
  473. package/dist/cli/chunks/{sync-N56UQGCS.js → sync-UHOX6RJW.js} +2 -2
  474. package/dist/cli/chunks/task-handler-AVDHMLGI.js +49 -0
  475. package/dist/cli/chunks/task-handlers-KYK4VTRA.js +9 -0
  476. package/dist/cli/chunks/{test-GQNCKRSP.js → test-DHAAI3DU.js} +11 -11
  477. package/dist/cli/chunks/test-scheduling-XDBZ3QC2.js +15 -0
  478. package/dist/cli/chunks/{token-bootstrap-76SRNXGG.js → token-bootstrap-GUTTLPZX.js} +2 -2
  479. package/dist/cli/chunks/{token-usage-O7CZDP5Q.js → token-usage-Q2YG5YQN.js} +2 -2
  480. package/dist/cli/chunks/{transformers-LTU4LSSC.js → transformers-F5UQTQCY.js} +2 -2
  481. package/dist/cli/chunks/{tree-sitter-wasm-parser-NQSQCMBM.js → tree-sitter-wasm-parser-DEGOHS6F.js} +2 -2
  482. package/dist/cli/chunks/types-JQ7EQO5Q.js +2 -0
  483. package/dist/cli/chunks/unified-memory-CXHLHB5I.js +2 -0
  484. package/dist/cli/chunks/unified-memory-hnsw-I7WAE54M.js +2 -0
  485. package/dist/cli/chunks/unified-persistence-6CPF65WI.js +2 -0
  486. package/dist/cli/chunks/{upgrade-OQWRBZ3R.js → upgrade-TJRVGHGD.js} +2 -2
  487. package/dist/cli/chunks/{validate-TH5SRP3E.js → validate-BWPCVHBN.js} +2 -2
  488. package/dist/cli/chunks/{validate-swarm-UITL2JUS.js → validate-swarm-QVVKCQLP.js} +2 -2
  489. package/dist/cli/chunks/{vibium-O6PRAG4J.js → vibium-ZFATIWHO.js} +2 -2
  490. package/dist/cli/chunks/visual-security-GNPHME5H.js +2 -0
  491. package/dist/cli/chunks/{web-tree-sitter-XBFBY4OF.js → web-tree-sitter-KPLY7ONR.js} +2 -2
  492. package/dist/cli/chunks/{windsurf-installer-DVT5NRNY.js → windsurf-installer-H7XM7ISA.js} +2 -2
  493. package/dist/cli/chunks/{witness-chain-VRSH2F36.js → witness-chain-RRN6NDCH.js} +2 -2
  494. package/dist/cli/chunks/witness-chain-VT4UHHBR.js +2 -0
  495. package/dist/cli/chunks/{witness-key-manager-GFHRDKQ4.js → witness-key-manager-DFRL42GE.js} +2 -2
  496. package/dist/cli/chunks/workflow-2ZQO6WYI.js +51 -0
  497. package/dist/cli/chunks/workflow-orchestrator-DB3HIECD.js +2 -0
  498. package/dist/cli/chunks/{wrappers-5LLLT7GM.js → wrappers-SUS6XEJD.js} +2 -2
  499. package/dist/cli/commands/ci.js +54 -28
  500. package/dist/cli/commands/code.js +6 -0
  501. package/dist/cli/commands/eval.js +3 -2
  502. package/dist/cli/commands/fleet.js +35 -16
  503. package/dist/cli/commands/learning-snapshot.d.ts +38 -0
  504. package/dist/cli/commands/learning-snapshot.js +171 -0
  505. package/dist/cli/commands/learning.js +16 -64
  506. package/dist/cli/commands/llm-router.js +13 -12
  507. package/dist/cli/commands/pipeline.js +9 -0
  508. package/dist/cli/commands/security.js +167 -100
  509. package/dist/cli/commands/test.js +1 -0
  510. package/dist/cli/commands/workflow.js +9 -1
  511. package/dist/cli/handlers/task-handler.js +19 -9
  512. package/dist/cli/helpers/domain-plugins.d.ts +5 -0
  513. package/dist/cli/helpers/domain-plugins.js +11 -0
  514. package/dist/cli/index.js +17 -8
  515. package/dist/cli/utils/ci-config.d.ts +3 -0
  516. package/dist/cli/utils/ci-output.d.ts +17 -0
  517. package/dist/cli/utils/ci-output.js +34 -2
  518. package/dist/context/sources/git-source.d.ts +2 -0
  519. package/dist/context/sources/git-source.js +9 -2
  520. package/dist/coordination/cancelled-task-settlement.d.ts +11 -0
  521. package/dist/coordination/cancelled-task-settlement.js +15 -0
  522. package/dist/coordination/consensus/providers/claude-provider.d.ts +2 -2
  523. package/dist/coordination/consensus/providers/claude-provider.js +18 -25
  524. package/dist/coordination/consensus/providers/gemini-provider.d.ts +14 -4
  525. package/dist/coordination/consensus/providers/gemini-provider.js +39 -36
  526. package/dist/coordination/consensus/providers/ollama-provider.d.ts +8 -7
  527. package/dist/coordination/consensus/providers/ollama-provider.js +16 -18
  528. package/dist/coordination/consensus/providers/openai-provider.d.ts +14 -4
  529. package/dist/coordination/consensus/providers/openai-provider.js +36 -34
  530. package/dist/coordination/consensus/providers/openrouter-provider.d.ts +5 -5
  531. package/dist/coordination/consensus/providers/openrouter-provider.js +64 -37
  532. package/dist/coordination/handlers/handler-types.d.ts +3 -0
  533. package/dist/coordination/handlers/quality-handlers.js +10 -0
  534. package/dist/coordination/handlers/security-handlers.js +168 -72
  535. package/dist/coordination/handlers/test-execution-handlers.js +39 -43
  536. package/dist/coordination/interfaces.d.ts +2 -2
  537. package/dist/coordination/protocol-executor.js +68 -9
  538. package/dist/coordination/protocols/security-audit.d.ts +3 -0
  539. package/dist/coordination/protocols/security-audit.js +61 -39
  540. package/dist/coordination/queen-coordinator.js +10 -4
  541. package/dist/coordination/queen-event-handlers.js +17 -0
  542. package/dist/coordination/queen-task-management.js +25 -0
  543. package/dist/coordination/queen-types.d.ts +2 -0
  544. package/dist/coordination/result-saver.js +36 -5
  545. package/dist/coordination/task-executor.d.ts +3 -1
  546. package/dist/coordination/task-executor.js +8 -8
  547. package/dist/coordination/workflow-composition.d.ts +19 -0
  548. package/dist/coordination/workflow-composition.js +114 -0
  549. package/dist/coordination/workflow-orchestrator.d.ts +3 -2
  550. package/dist/coordination/workflow-orchestrator.js +219 -85
  551. package/dist/coordination/workflow-types.d.ts +30 -1
  552. package/dist/coordination/yaml-pipeline-loader.js +9 -5
  553. package/dist/domains/chaos-resilience/services/chaos-engineer.js +2 -7
  554. package/dist/domains/code-intelligence/services/knowledge-graph.js +2 -7
  555. package/dist/domains/code-intelligence/services/metric-collector/test-counter.js +9 -40
  556. package/dist/domains/constants.d.ts +1 -6
  557. package/dist/domains/constants.js +2 -6
  558. package/dist/domains/contract-testing/services/contract-validator.js +2 -7
  559. package/dist/domains/coverage-analysis/services/coverage-analyzer.js +2 -12
  560. package/dist/domains/coverage-analysis/services/gap-detector.js +2 -7
  561. package/dist/domains/defect-intelligence/services/defect-predictor.js +2 -12
  562. package/dist/domains/defect-intelligence/services/root-cause-analyzer.js +2 -7
  563. package/dist/domains/learning-optimization/services/learning-coordinator.js +2 -7
  564. package/dist/domains/quality-assessment/services/deployment-advisor.js +2 -7
  565. package/dist/domains/quality-assessment/services/quality-analyzer.js +2 -7
  566. package/dist/domains/requirements-validation/services/requirements-validator.js +2 -7
  567. package/dist/domains/security-compliance/interfaces.d.ts +5 -0
  568. package/dist/domains/security-compliance/interfaces.js +0 -6
  569. package/dist/domains/security-compliance/scan-discovery.d.ts +12 -0
  570. package/dist/domains/security-compliance/scan-discovery.js +105 -0
  571. package/dist/domains/security-compliance/scan-evidence.d.ts +57 -0
  572. package/dist/domains/security-compliance/scan-evidence.js +2 -0
  573. package/dist/domains/security-compliance/services/scanners/sast-scanner.d.ts +3 -2
  574. package/dist/domains/security-compliance/services/scanners/sast-scanner.js +112 -72
  575. package/dist/domains/security-compliance/services/semgrep-integration.d.ts +9 -2
  576. package/dist/domains/security-compliance/services/semgrep-integration.js +68 -20
  577. package/dist/domains/test-execution/services/flaky-detector.js +46 -5
  578. package/dist/domains/test-execution/services/retry-handler.js +38 -20
  579. package/dist/domains/test-execution/services/test-executor.js +84 -29
  580. package/dist/domains/test-generation/services/test-generator.js +2 -7
  581. package/dist/domains/visual-accessibility/services/visual-tester.js +2 -7
  582. package/dist/init/init-wizard-hooks.js +2 -2
  583. package/dist/init/init-wizard-steps.js +1 -1
  584. package/dist/init/kiro-installer.js +9 -8
  585. package/dist/init/opencode-installer.js +1 -1
  586. package/dist/init/phases/07-hooks.js +4 -2
  587. package/dist/init/phases/12-verification.js +1 -1
  588. package/dist/init/settings-merge.d.ts +10 -3
  589. package/dist/init/settings-merge.js +40 -9
  590. package/dist/integrations/agentic-flow/model-router/types.js +6 -8
  591. package/dist/integrations/agentic-flow/reasoning-bank/index.js +3 -20
  592. package/dist/integrations/coherence/engines/cohomology-adapter.js +100 -30
  593. package/dist/integrations/ruvector/brain-exporter.js +9 -15
  594. package/dist/integrations/ruvector/brain-rvf-exporter.js +17 -30
  595. package/dist/integrations/ruvector/brain-shared.d.ts +5 -1
  596. package/dist/integrations/ruvector/brain-shared.js +70 -4
  597. package/dist/integrations/ruvector/rvf-dual-writer.js +36 -15
  598. package/dist/integrations/ruvector/rvf-store-integrity.d.ts +14 -9
  599. package/dist/integrations/ruvector/rvf-store-integrity.js +39 -9
  600. package/dist/integrations/ruvector/shared-rvf-adapter.js +20 -23
  601. package/dist/kernel/memory-factory.js +14 -4
  602. package/dist/kernel/project-root.js +10 -8
  603. package/dist/kernel/unified-memory.js +1 -1
  604. package/dist/learning/local-judge-client.d.ts +6 -5
  605. package/dist/learning/local-judge-client.js +7 -6
  606. package/dist/learning/pattern-store.js +29 -11
  607. package/dist/mcp/bundle.js +548 -527
  608. package/dist/mcp/handlers/domain-handler-configs.d.ts +22 -1
  609. package/dist/mcp/handlers/domain-handler-configs.js +50 -19
  610. package/dist/mcp/handlers/domain-handlers.d.ts +7 -5
  611. package/dist/mcp/handlers/domain-handlers.js +7 -5
  612. package/dist/mcp/handlers/index.d.ts +1 -1
  613. package/dist/mcp/handlers/index.js +1 -1
  614. package/dist/mcp/handlers/pipeline-handlers.d.ts +31 -1
  615. package/dist/mcp/handlers/pipeline-handlers.js +63 -0
  616. package/dist/mcp/handlers/task-handlers.d.ts +1 -0
  617. package/dist/mcp/handlers/task-handlers.js +12 -4
  618. package/dist/mcp/protocol-server.d.ts +2 -0
  619. package/dist/mcp/protocol-server.js +112 -53
  620. package/dist/mcp/security/sampling-server.js +2 -1
  621. package/dist/mcp/tool-annotations.js +1 -1
  622. package/dist/mcp/tools/test-execution/schedule.js +7 -0
  623. package/dist/mcp/types.d.ts +10 -1
  624. package/dist/optimization/session-cache.d.ts +5 -0
  625. package/dist/optimization/session-cache.js +23 -0
  626. package/dist/routing/advisor/multi-model-executor.d.ts +4 -1
  627. package/dist/routing/advisor/multi-model-executor.js +8 -1
  628. package/dist/routing/free-tier/ladder.d.ts +2 -1
  629. package/dist/routing/free-tier/ladder.js +3 -2
  630. package/dist/routing/security/cyber-pin.d.ts +35 -11
  631. package/dist/routing/security/cyber-pin.js +76 -14
  632. package/dist/routing/value-score.js +1 -1
  633. package/dist/shared/git/index.d.ts +1 -0
  634. package/dist/shared/git/index.js +1 -0
  635. package/dist/shared/git/ref-validation.d.ts +20 -0
  636. package/dist/shared/git/ref-validation.js +43 -0
  637. package/dist/shared/llm/anthropic-params.d.ts +40 -0
  638. package/dist/shared/llm/anthropic-params.js +51 -0
  639. package/dist/shared/llm/cost-tracker.d.ts +15 -2
  640. package/dist/shared/llm/cost-tracker.js +62 -10
  641. package/dist/shared/llm/index.d.ts +2 -2
  642. package/dist/shared/llm/index.js +2 -2
  643. package/dist/shared/llm/interfaces.d.ts +1 -1
  644. package/dist/shared/llm/metrics/cost-metrics.js +5 -4
  645. package/dist/shared/llm/model-mapping.js +131 -0
  646. package/dist/shared/llm/model-registry.d.ts +37 -11
  647. package/dist/shared/llm/model-registry.js +393 -18
  648. package/dist/shared/llm/openai-params.d.ts +35 -0
  649. package/dist/shared/llm/openai-params.js +54 -0
  650. package/dist/shared/llm/provider-manager.js +4 -3
  651. package/dist/shared/llm/providers/azure-openai.d.ts +11 -0
  652. package/dist/shared/llm/providers/azure-openai.js +26 -15
  653. package/dist/shared/llm/providers/bedrock.js +11 -19
  654. package/dist/shared/llm/providers/claude.js +6 -29
  655. package/dist/shared/llm/providers/codex.js +4 -3
  656. package/dist/shared/llm/providers/gemini.d.ts +3 -2
  657. package/dist/shared/llm/providers/gemini.js +19 -10
  658. package/dist/shared/llm/providers/ollama.d.ts +2 -0
  659. package/dist/shared/llm/providers/ollama.js +30 -20
  660. package/dist/shared/llm/providers/openai.js +10 -17
  661. package/dist/shared/llm/providers/openrouter.d.ts +1 -1
  662. package/dist/shared/llm/providers/openrouter.js +57 -21
  663. package/dist/shared/llm/router/agent-router-config.js +33 -32
  664. package/dist/shared/llm/router/hybrid-router.d.ts +4 -0
  665. package/dist/shared/llm/router/hybrid-router.js +95 -35
  666. package/dist/shared/llm/router/routing-rules.js +9 -8
  667. package/dist/shared/llm/router/types.d.ts +9 -2
  668. package/dist/shared/llm/router/types.js +81 -13
  669. package/dist/shared/llm/translation/message-formatter.js +4 -23
  670. package/dist/shared/test-runner-verdict.d.ts +29 -0
  671. package/dist/shared/test-runner-verdict.js +43 -0
  672. package/dist/shared/vitest-json-report.d.ts +45 -0
  673. package/dist/shared/vitest-json-report.js +80 -0
  674. package/dist/test-scheduling/executors/vitest-executor.d.ts +7 -2
  675. package/dist/test-scheduling/executors/vitest-executor.js +174 -52
  676. package/dist/test-scheduling/git-aware/test-selector.js +3 -0
  677. package/dist/test-scheduling/phase-scheduler.d.ts +1 -0
  678. package/dist/test-scheduling/phase-scheduler.js +23 -1
  679. package/dist/validation/frontier-judge.d.ts +7 -4
  680. package/dist/validation/frontier-judge.js +11 -6
  681. package/package.json +6 -6
  682. package/dist/cli/chunks/adapter-OJF6LAJV.js +0 -2
  683. package/dist/cli/chunks/aqe-learning-engine-FGT474XB.js +0 -2
  684. package/dist/cli/chunks/base-HH765JFV.js +0 -2
  685. package/dist/cli/chunks/brain-handler-5FSA46R5.js +0 -90
  686. package/dist/cli/chunks/browser-workflow-NPM4FUPI.js +0 -2
  687. package/dist/cli/chunks/chunk-2LKAMMMI.js +0 -2
  688. package/dist/cli/chunks/chunk-4AKGBUYD.js +0 -4
  689. package/dist/cli/chunks/chunk-4MH22236.js +0 -2
  690. package/dist/cli/chunks/chunk-4PH7O5ZH.js +0 -2
  691. package/dist/cli/chunks/chunk-4UCMTYFQ.js +0 -65
  692. package/dist/cli/chunks/chunk-DRO5NJZA.js +0 -11
  693. package/dist/cli/chunks/chunk-FPHPP5TQ.js +0 -2
  694. package/dist/cli/chunks/chunk-FREF6Y4L.js +0 -14
  695. package/dist/cli/chunks/chunk-G6AV2HGY.js +0 -54
  696. package/dist/cli/chunks/chunk-GJAWEUIN.js +0 -16
  697. package/dist/cli/chunks/chunk-IUNMW454.js +0 -2
  698. package/dist/cli/chunks/chunk-JDXLCNKV.js +0 -2
  699. package/dist/cli/chunks/chunk-OC2CKU7I.js +0 -2
  700. package/dist/cli/chunks/chunk-OX6T26CD.js +0 -180
  701. package/dist/cli/chunks/chunk-PHHXHG2W.js +0 -2
  702. package/dist/cli/chunks/chunk-SEHCX4NH.js +0 -2
  703. package/dist/cli/chunks/chunk-TENYL5TI.js +0 -14
  704. package/dist/cli/chunks/chunk-U2AY57XZ.js +0 -5
  705. package/dist/cli/chunks/chunk-UYTWDS2R.js +0 -2
  706. package/dist/cli/chunks/chunk-VSYBMNIR.js +0 -2
  707. package/dist/cli/chunks/chunk-WBMRADQP.js +0 -81
  708. package/dist/cli/chunks/chunk-ZWRQ5VAU.js +0 -2
  709. package/dist/cli/chunks/chunk-ZYLSOBOR.js +0 -2
  710. package/dist/cli/chunks/ci-NTRH7PAW.js +0 -81
  711. package/dist/cli/chunks/ci-output-F57RSD35.js +0 -2
  712. package/dist/cli/chunks/client-GPZEC54E.js +0 -2
  713. package/dist/cli/chunks/complexity-analyzer-3FNFLACD.js +0 -2
  714. package/dist/cli/chunks/core-handlers-YMGHYIBR.js +0 -2
  715. package/dist/cli/chunks/cost-tracker-LTZAQBX7.js +0 -2
  716. package/dist/cli/chunks/cross-domain-router-ECBNTGYJ.js +0 -2
  717. package/dist/cli/chunks/dream-EHGKCFWH.js +0 -2
  718. package/dist/cli/chunks/eval-GL544IPO.js +0 -17
  719. package/dist/cli/chunks/fleet-DQVQQONW.js +0 -43
  720. package/dist/cli/chunks/heartbeat-scheduler-UFEL2CBW.js +0 -2
  721. package/dist/cli/chunks/hnsw-adapter-BLSD45CX.js +0 -2
  722. package/dist/cli/chunks/hnsw-index-A3RZODEN.js +0 -2
  723. package/dist/cli/chunks/impact-analyzer-OXHD3FOH.js +0 -2
  724. package/dist/cli/chunks/init-wizard-PKZL7QBU.js +0 -2
  725. package/dist/cli/chunks/kernel-XWPM72UJ.js +0 -2
  726. package/dist/cli/chunks/knowledge-graph-FRKR5XWI.js +0 -2
  727. package/dist/cli/chunks/learning-EV5LSOOM.js +0 -122
  728. package/dist/cli/chunks/llm-router-7LYDJUOT.js +0 -37
  729. package/dist/cli/chunks/llm-router-service-R7A5HHDM.js +0 -2
  730. package/dist/cli/chunks/load-test-5IKDWSYL.js +0 -2
  731. package/dist/cli/chunks/memory-backend-7VW5QCMO.js +0 -2
  732. package/dist/cli/chunks/memory-handlers-VZH3R2TQ.js +0 -2
  733. package/dist/cli/chunks/multi-model-executor-R6XCTMCF.js +0 -14
  734. package/dist/cli/chunks/pattern-null-store-BU6LCB2W.js +0 -2
  735. package/dist/cli/chunks/pipeline-SR5OTY45.js +0 -19
  736. package/dist/cli/chunks/protocol-executor-BSP5LWJN.js +0 -2
  737. package/dist/cli/chunks/qe-reasoning-bank-J2RC7P25.js +0 -2
  738. package/dist/cli/chunks/queen-coordinator-XI5AJV2V.js +0 -2
  739. package/dist/cli/chunks/router-VXQYYA3D.js +0 -2
  740. package/dist/cli/chunks/routing-feedback-HZQTASFF.js +0 -2
  741. package/dist/cli/chunks/rvf-dual-writer-BDTLLJER.js +0 -2
  742. package/dist/cli/chunks/rvf-migration-adapter-IB343MDN.js +0 -2
  743. package/dist/cli/chunks/rvf-native-adapter-Y7SN7LHU.js +0 -2
  744. package/dist/cli/chunks/rvf-store-integrity-OJGWWPLL.js +0 -2
  745. package/dist/cli/chunks/safe-db-2VTKKBJU.js +0 -2
  746. package/dist/cli/chunks/schedule-QJ4CFGJY.js +0 -2
  747. package/dist/cli/chunks/scheduler-2NHDQPC3.js +0 -2
  748. package/dist/cli/chunks/security-JF3BVNRO.js +0 -14
  749. package/dist/cli/chunks/sqlite-persistence-NVVAPZN3.js +0 -2
  750. package/dist/cli/chunks/task-handler-VTNRGAXP.js +0 -49
  751. package/dist/cli/chunks/task-handlers-FYSDH55N.js +0 -9
  752. package/dist/cli/chunks/test-scheduling-GPRXSIRP.js +0 -15
  753. package/dist/cli/chunks/types-OP6IWE6N.js +0 -2
  754. package/dist/cli/chunks/unified-memory-DSTIEDSH.js +0 -2
  755. package/dist/cli/chunks/unified-memory-hnsw-KBV3P4OS.js +0 -2
  756. package/dist/cli/chunks/unified-persistence-XKCOUBKY.js +0 -2
  757. package/dist/cli/chunks/visual-security-TTWSPZTZ.js +0 -2
  758. package/dist/cli/chunks/witness-chain-2KY73HPN.js +0 -2
  759. package/dist/cli/chunks/workflow-HAZ6YKOG.js +0 -51
  760. package/dist/cli/chunks/workflow-orchestrator-UK56AVOT.js +0 -2
@@ -1,13 +1,13 @@
1
1
  #!/usr/bin/env node
2
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.14.2");process.exit(0)}
3
- import{b as h}from"./chunks/chunk-P64DMQ2C.js";import{a as y}from"./chunks/chunk-CIESXO73.js";import{a as f,c as S}from"./chunks/chunk-D4RCV4LY.js";import"./chunks/chunk-6VKJAMZY.js";S();import{createRequire as I}from"node:module";import{Command as b}from"commander";import m from"chalk";function w(e,i,a,s){let l=e.command(i).description(a);if(s)for(let u of s)l.alias(u);return l.helpOption(!1),l.allowUnknownOption(!0),l.allowExcessArguments(!0),l}function C(e,i){let a=e.commands,s=a.indexOf(i);s>=0&&a.splice(s,1)}function o(e,i){let a=w(e,i.name,i.description,i.aliases);a.action(async()=>{try{let s=await i.factory();C(e,a),e.addCommand(s),await e.parseAsync(process.argv)}catch(s){console.error(`Failed to load command '${i.name}':`,s instanceof Error?s.message:s),process.exit(1)}})}function d(e,i,a,s,l,u){let g=w(e,i,a,u);g.action(async()=>{try{let p=await s();C(e,g),p.register(e,l),await e.parseAsync(process.argv)}catch(p){console.error(`Failed to load command '${i}':`,p instanceof Error?p.message:p),process.exit(1)}})}var D=["[UnifiedMemory]","[HybridBackend]","[UnifiedPersistence]","[PersistentSONAEngine]","[QueenGovernance]","[QueenCoordinator]","[Queen]","[QUEEN]","[DomainBreakerRegistry]","[RealEmbeddings]","[HNSWIndex]","[PatternStore]","[TestGenerationCoordinator]","[CodeIntelligence]","[ProductFactorsBridge]","[LearningOptimizationCoordinator]","[DreamEngine]","[DreamScheduler]","[SecurityCompliance]","[Providers]","[GNN]","[test-generation]","[test-execution]","[coverage-analysis]","[quality-assessment]","[defect-intelligence]","[requirements-validation]","[code-intelligence]","[security-compliance]","[contract-testing]","[visual-accessibility]","[chaos-resilience]","[learning-optimization]","[enterprise-integration]","[coordination]","[PatternLearnerService]","[RequirementsValidation]","[ParserRegistry]","[AdversarialDefense]","[ContinueGateIntegration]","[ContinueGate]","[SQLitePatternStore]","[TokenTracking]","[InfraHealing]","[ExperienceCapture]"],R=/^\[\d{2}:\d{2}:\d{2}\.\d{3}\]\s+\[/,q=console.log.bind(console);console.log=(...e)=>{let a=(typeof e[0]=="string"?e[0]:"").trimStart();if(D.some(s=>a.startsWith(s))||R.test(a)){process.stderr.write(e.map(String).join(" ")+`
4
- `);return}q(...e)};console.info=(...e)=>{process.stderr.write(e.map(String).join(" ")+`
5
- `)};var t={kernel:null,queen:null,router:null,workflowOrchestrator:null,scheduledWorkflows:new Map,persistentScheduler:null,initialized:!1};function k(e,i){let a=e.getDomainAPI("visual-accessibility");if(a?.registerWorkflowActions)try{a.registerWorkflowActions(i)}catch(l){console.error(m.yellow(` Warning: Could not register visual-accessibility workflow actions: ${f(l)}`))}let s=e.getDomainAPI("requirements-validation");if(s?.registerWorkflowActions)try{s.registerWorkflowActions(i)}catch(l){console.error(m.yellow(` Warning: Could not register requirements-validation workflow actions: ${f(l)}`))}}async function x(){let{QEKernelImpl:e}=await import("./chunks/kernel-XWPM72UJ.js"),{CrossDomainEventRouter:i}=await import("./chunks/cross-domain-router-ECBNTGYJ.js"),{DefaultProtocolExecutor:a}=await import("./chunks/protocol-executor-BSP5LWJN.js"),{WorkflowOrchestrator:s}=await import("./chunks/workflow-orchestrator-UK56AVOT.js"),{createQueenCoordinator:l}=await import("./chunks/queen-coordinator-XI5AJV2V.js"),{createPersistentScheduler:u}=await import("./chunks/scheduler-2NHDQPC3.js");t.kernel=new e({maxConcurrentAgents:15,memoryBackend:"sqlite",hnswEnabled:!0,lazyLoading:!0,enabledDomains:[...y],enableExperienceBridge:!1}),await t.kernel.initialize(),t.router=new i(t.kernel.eventBus),await t.router.initialize();let g=P=>t.kernel.getDomainAPI(P),p=new a(t.kernel.eventBus,t.kernel.memory,g);t.workflowOrchestrator=new s(t.kernel.eventBus,t.kernel.memory,t.kernel.coordinator),await t.workflowOrchestrator.initialize(),k(t.kernel,t.workflowOrchestrator),t.persistentScheduler=u(),t.queen=l(t.kernel,t.router,p,void 0),await t.queen.initialize();let{adoptExternalFleet:A}=await import("./chunks/core-handlers-YMGHYIBR.js");A({kernel:t.kernel,queen:t.queen,router:t.router,workflowOrchestrator:t.workflowOrchestrator}),t.initialized=!0}async function v(){if(t.initialized&&t.kernel&&t.queen)return!0;let e=await import("fs"),a=(await import("path")).resolve(".agentic-qe");return e.existsSync(a)?c():(console.error(m.red(`
2
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.14.4");process.exit(0)}
3
+ import{b as h}from"./chunks/chunk-34WO57CW.js";import{a as y}from"./chunks/chunk-STM3UDNO.js";import{a as f,c as b}from"./chunks/chunk-G6T45OIC.js";import"./chunks/chunk-TT23RRB7.js";b();import{createRequire as D}from"node:module";import{Command as R}from"commander";import m from"chalk";function w(e,a,s,i){let l=e.command(a).description(s);if(i)for(let u of i)l.alias(u);return l.helpOption(!1),l.allowUnknownOption(!0),l.allowExcessArguments(!0),l}function C(e,a){let s=e.commands,i=s.indexOf(a);i>=0&&s.splice(i,1)}function o(e,a){let s=w(e,a.name,a.description,a.aliases);s.action(async()=>{try{let i=await a.factory();C(e,s),e.addCommand(i),await e.parseAsync(process.argv)}catch(i){console.error(`Failed to load command '${a.name}':`,i instanceof Error?i.message:i),process.exit(1)}})}function d(e,a,s,i,l,u){let g=w(e,a,s,u);g.action(async()=>{try{let p=await i();C(e,g),p.register(e,l),await e.parseAsync(process.argv)}catch(p){console.error(`Failed to load command '${a}':`,p instanceof Error?p.message:p),process.exit(1)}})}var q=["[UnifiedMemory]","[HybridBackend]","[UnifiedPersistence]","[PersistentSONAEngine]","[QueenGovernance]","[QueenCoordinator]","[Queen]","[QUEEN]","[DomainBreakerRegistry]","[RealEmbeddings]","[HNSWIndex]","[PatternStore]","[TestGenerationCoordinator]","[CodeIntelligence]","[ProductFactorsBridge]","[LearningOptimizationCoordinator]","[DreamEngine]","[DreamScheduler]","[SecurityCompliance]","[Providers]","[GNN]","[test-generation]","[test-execution]","[coverage-analysis]","[quality-assessment]","[defect-intelligence]","[requirements-validation]","[code-intelligence]","[security-compliance]","[contract-testing]","[visual-accessibility]","[chaos-resilience]","[learning-optimization]","[enterprise-integration]","[coordination]","[PatternLearnerService]","[RequirementsValidation]","[ParserRegistry]","[AdversarialDefense]","[ContinueGateIntegration]","[ContinueGate]","[SQLitePatternStore]","[TokenTracking]","[InfraHealing]","[ExperienceCapture]"],x=/^\[\d{2}:\d{2}:\d{2}\.\d{3}\]\s+\[/,L=console.log.bind(console);console.log=(...e)=>{let s=(typeof e[0]=="string"?e[0]:"").trimStart();if(q.some(i=>s.startsWith(i))||x.test(s)){process.stderr.write(e.map(String).join(" ")+`
4
+ `);return}L(...e)};console.info=(...e)=>{process.stderr.write(e.map(String).join(" ")+`
5
+ `)};var t={kernel:null,queen:null,router:null,workflowOrchestrator:null,scheduledWorkflows:new Map,persistentScheduler:null,initialized:!1};function k(e,a){let s=e.getDomainAPI("visual-accessibility");if(s?.registerWorkflowActions)try{s.registerWorkflowActions(a)}catch(l){console.error(m.yellow(` Warning: Could not register visual-accessibility workflow actions: ${f(l)}`))}let i=e.getDomainAPI("requirements-validation");if(i?.registerWorkflowActions)try{i.registerWorkflowActions(a)}catch(l){console.error(m.yellow(` Warning: Could not register requirements-validation workflow actions: ${f(l)}`))}}async function z(){let{QEKernelImpl:e}=await import("./chunks/kernel-5BOZQ754.js"),{CrossDomainEventRouter:a}=await import("./chunks/cross-domain-router-EK7W4PGP.js"),{DefaultProtocolExecutor:s}=await import("./chunks/protocol-executor-3ATJTXWG.js"),{WorkflowOrchestrator:i}=await import("./chunks/workflow-orchestrator-DB3HIECD.js"),{createQueenCoordinator:l}=await import("./chunks/queen-coordinator-RN7L6KG5.js"),{createPersistentScheduler:u}=await import("./chunks/scheduler-IKKAMAOO.js"),{loadCLIDomainPlugins:g}=await import("./chunks/domain-plugins-HCGLXKIT.js");t.kernel=new e({maxConcurrentAgents:15,memoryBackend:"sqlite",hnswEnabled:!0,lazyLoading:!0,enabledDomains:[...y],enableExperienceBridge:!1}),await t.kernel.initialize();let p=await g(t.kernel.plugins);t.router=new a(t.kernel.eventBus),await t.router.initialize();let A=I=>t.kernel.getDomainAPI(I),P=new s(t.kernel.eventBus,t.kernel.memory,A);t.workflowOrchestrator=new i(t.kernel.eventBus,t.kernel.memory,t.kernel.coordinator),await t.workflowOrchestrator.initialize(),k(t.kernel,t.workflowOrchestrator),t.persistentScheduler=u(),t.queen=l(t.kernel,t.router,P,void 0,p),await t.queen.initialize();let{adoptExternalFleet:S}=await import("./chunks/core-handlers-IFG3757P.js");S({kernel:t.kernel,queen:t.queen,router:t.router,workflowOrchestrator:t.workflowOrchestrator}),t.initialized=!0}async function v(){if(t.initialized&&t.kernel&&t.queen)return!0;let e=await import("fs"),s=(await import("path")).resolve(".agentic-qe");return e.existsSync(s)?c():(console.error(m.red(`
6
6
  Error: AQE system not initialized in this directory.`)),console.log(m.yellow("Run `aqe init` first to set up this project.\n")),!1)}async function c(){if(t.initialized&&t.kernel&&t.queen)return!0;process.stderr.write(m.gray("Auto-initializing v3 system...")+`
7
- `);let e=3e4,i=new Promise((a,s)=>{setTimeout(()=>s(new Error("Initialization timeout after 30 seconds")),e)});try{return await Promise.race([x(),i]),process.stderr.write(m.green("System ready")+`
7
+ `);let e=3e4,a=new Promise((s,i)=>{setTimeout(()=>i(new Error("Initialization timeout after 30 seconds")),e)});try{return await Promise.race([z(),a]),process.stderr.write(m.green("System ready")+`
8
8
 
9
- `),!0}catch(a){return a.message.includes("timeout")?(console.error(m.red("Initialization timed out after 30 seconds.")),console.log(m.yellow("Try running `aqe init` manually."))):(console.error(m.red("Failed to auto-initialize:"),a),console.log(m.yellow("Try running `aqe init` manually."))),!1}}async function r(e=0){try{t.workflowOrchestrator&&t.workflowOrchestrator.dispose().catch(()=>{}),t.queen&&t.queen.dispose().catch(()=>{}),t.router&&t.router.dispose().catch(()=>{}),t.kernel&&t.kernel.dispose().catch(()=>{})}catch{}process.exit(e)}var n=new b,z=I(import.meta.url),W=z("../../package.json").version,E="3.14.2";n.name("aqe").description("Agentic QE - Domain-Driven Quality Engineering").version(E);d(n,"init","Initialize the AQE v3 system",()=>import("./chunks/init-handler-MTK65LI3.js").then(e=>e.createInitHandler(r)),t);d(n,"status","Show system status",()=>import("./chunks/status-handler-GMIOXQIE.js").then(e=>e.createStatusHandler(r,v)),t);d(n,"health","Check system health",()=>import("./chunks/status-handler-GMIOXQIE.js").then(e=>e.createHealthHandler(r,v)),t);d(n,"task","Manage QE tasks",()=>import("./chunks/task-handler-VTNRGAXP.js").then(e=>e.createTaskHandler(r,c)),t);d(n,"agent","Manage QE agents",()=>import("./chunks/agent-handler-OZRSJM7F.js").then(e=>e.createAgentHandler(r,c)),t);d(n,"domain","Domain operations",()=>import("./chunks/domain-handler-6RJPDELX.js").then(e=>e.createDomainHandler(r,c)),t);d(n,"protocol","Execute coordination protocols",()=>import("./chunks/protocol-handler-ZF74NIKA.js").then(e=>e.createProtocolHandler(r,c)),t);d(n,"brain","Export, import, and inspect QE brain state",()=>import("./chunks/brain-handler-5FSA46R5.js").then(e=>e.createBrainHandler(r,c)),t);d(n,"hypergraph","Query the code knowledge hypergraph",()=>import("./chunks/hypergraph-handler-YGDYZO6H.js").then(e=>e.createHypergraphHandler(r,c)),t,["hg"]);d(n,"heartbeat","Manage the token-free heartbeat scheduler",()=>import("./chunks/heartbeat-handler-UFMELIWT.js").then(e=>e.createHeartbeatHandler(r)),t);d(n,"routing","View routing performance, economics, and accuracy",()=>import("./chunks/routing-handler-ZNRVW6QW.js").then(e=>e.createRoutingHandler(r)),t);o(n,{name:"workflow",description:"Manage QE workflows and pipelines (ADR-041)",factory:()=>import("./chunks/workflow-HAZ6YKOG.js").then(e=>e.createWorkflowCommand(t,r,c))});o(n,{name:"test",description:"Test generation, execution, scheduling, and load testing",factory:()=>import("./chunks/test-GQNCKRSP.js").then(e=>e.createTestCommand(t,r,c))});o(n,{name:"coverage",description:"Coverage analysis shortcut",factory:()=>import("./chunks/coverage-TT64IOS4.js").then(e=>e.createCoverageCommand(t,r,c))});o(n,{name:"quality",description:"Quality assessment shortcut",factory:()=>import("./chunks/quality-EYIN6AER.js").then(e=>e.createQualityCommand(t,r,c))});o(n,{name:"quality-gate",description:"Two-gate, three-valued quality verdict against a pinned checklist (ADR-119)",factory:()=>import("./chunks/quality-gate-V6OQM57O.js").then(e=>e.createQualityGateCommand(t,r,c))});o(n,{name:"security",description:"Security scanning and URL validation",factory:()=>import("./chunks/security-JF3BVNRO.js").then(e=>e.createSecurityCommand(t,r,c))});o(n,{name:"arena",description:"Competitive test-strategy tournaments (ADR-104)",factory:()=>import("./chunks/arena-EX3SC2DP.js").then(e=>e.createArenaCommand(t,r,c))});o(n,{name:"code",description:"Code intelligence analysis",factory:()=>import("./chunks/code-TF2AVR5D.js").then(e=>e.createCodeCommand(t,r,c))});o(n,{name:"completions",description:"Generate shell completions for aqe",factory:()=>import("./chunks/completions-3Q37QVFR.js").then(e=>e.createCompletionsCommand(r))});o(n,{name:"upgrade",description:"Detect optional native bindings and recommend install / flag changes",factory:()=>import("./chunks/upgrade-OQWRBZ3R.js").then(e=>e.createUpgradeCommand(r))});o(n,{name:"fleet",description:"Fleet operations with multi-agent progress tracking",factory:()=>import("./chunks/fleet-DQVQQONW.js").then(e=>e.createFleetCommand(t,r,c,k))});o(n,{name:"validate",description:"Validation commands for skills and agents",factory:()=>import("./chunks/validate-swarm-UITL2JUS.js").then(e=>e.createValidateSwarmCommand(t,r,c))});o(n,{name:"skill",description:"Skill validation and reporting (ADR-056)",factory:()=>import("./chunks/validate-TH5SRP3E.js").then(e=>e.createValidateCommand(t,r,c))});o(n,{name:"eval",description:"Run skill evaluation suites in parallel",factory:()=>import("./chunks/eval-GL544IPO.js").then(e=>e.createEvalCommand())});o(n,{name:"ci",description:"CI/CD pipeline orchestration",factory:()=>import("./chunks/ci-NTRH7PAW.js").then(e=>e.createCICommand(t,r,c))});o(n,{name:"token-usage",description:"View and analyze token consumption metrics (ADR-042)",factory:()=>import("./chunks/token-usage-O7CZDP5Q.js").then(e=>e.createTokenUsageCommand())});o(n,{name:"llm",description:"LLM Router management (ADR-043)",factory:()=>import("./chunks/llm-router-7LYDJUOT.js").then(e=>e.createLLMRouterCommand())});o(n,{name:"sync",description:"Sync local learning data to cloud PostgreSQL",factory:()=>import("./chunks/sync-GMPCPV5L.js").then(e=>e.createSyncCommands())});o(n,{name:"hooks",description:"Self-learning QE hooks for pattern recognition and guidance",factory:()=>import("./chunks/hooks-OHQPNK74.js").then(e=>e.createHooksCommand())});o(n,{name:"learning",description:"AQE self-learning system management (standalone, no claude-flow required)",factory:()=>import("./chunks/learning-EV5LSOOM.js").then(e=>e.createLearningCommand())});o(n,{name:"memory",description:"Memory store, retrieve, search, and delete operations",factory:()=>import("./chunks/memory-XTTYORAS.js").then(e=>e.createMemoryCommand(t,r,c))});o(n,{name:"mcp",description:"Start the MCP protocol server for Claude Code integration",factory:()=>import("./chunks/mcp-DUYJUEME.js").then(e=>e.createMcpCommand())});o(n,{name:"platform",description:"Manage coding agent platform configurations",factory:()=>import("./chunks/platform-VKJFJIAW.js").then(e=>e.createPlatformCommand())});o(n,{name:"prove",description:"Generate a verifiable Proof-of-Quality attestation",factory:()=>import("./chunks/prove-MO5TQQU4.js").then(e=>e.createProveCommand(t,r,c))});o(n,{name:"ruvector",description:"RuVector integration management",factory:()=>import("./chunks/ruvector-commands-4L2CQMWS.js").then(e=>e.createRuVectorCommand())});o(n,{name:"audit",description:"Witness chain audit trail management",factory:()=>import("./chunks/audit-Q5GHSUQY.js").then(e=>e.createAuditCommand(t,r,c))});o(n,{name:"pipeline",description:"Manage YAML deterministic pipelines (Imp-9)",factory:()=>import("./chunks/pipeline-SR5OTY45.js").then(e=>e.createPipelineCommand(t,r,c))});o(n,{name:"plugin",description:"Manage external QE domain plugins",factory:()=>import("./chunks/plugin-5C5UBQUQ.js").then(e=>e.createPluginCommand())});o(n,{name:"daemon",description:"Manage the QE Quality Daemon",factory:()=>import("./chunks/daemon-DMFZMXKA.js").then(e=>e.createDaemonCommand())});process.on("SIGINT",async()=>{console.log(m.yellow(`
9
+ `),!0}catch(s){return s.message.includes("timeout")?(console.error(m.red("Initialization timed out after 30 seconds.")),console.log(m.yellow("Try running `aqe init` manually."))):(console.error(m.red("Failed to auto-initialize:"),s),console.log(m.yellow("Try running `aqe init` manually."))),!1}}async function r(e=0){try{t.workflowOrchestrator&&t.workflowOrchestrator.dispose().catch(()=>{}),t.queen&&t.queen.dispose().catch(()=>{}),t.router&&t.router.dispose().catch(()=>{}),t.kernel&&t.kernel.dispose().catch(()=>{})}catch{}process.exit(e)}var n=new R,Q=D(import.meta.url),G=Q("../../package.json").version,E="3.14.4";n.name("aqe").description("Agentic QE - Domain-Driven Quality Engineering").version(E);d(n,"init","Initialize the AQE v3 system",()=>import("./chunks/init-handler-K25RWRYY.js").then(e=>e.createInitHandler(r)),t);d(n,"status","Show system status",()=>import("./chunks/status-handler-6TU6O37R.js").then(e=>e.createStatusHandler(r,v)),t);d(n,"health","Check system health",()=>import("./chunks/status-handler-6TU6O37R.js").then(e=>e.createHealthHandler(r,v)),t);d(n,"task","Manage QE tasks",()=>import("./chunks/task-handler-AVDHMLGI.js").then(e=>e.createTaskHandler(r,c)),t);d(n,"agent","Manage QE agents",()=>import("./chunks/agent-handler-RDNTK4CA.js").then(e=>e.createAgentHandler(r,c)),t);d(n,"domain","Domain operations",()=>import("./chunks/domain-handler-PL2TZC6H.js").then(e=>e.createDomainHandler(r,c)),t);d(n,"protocol","Execute coordination protocols",()=>import("./chunks/protocol-handler-NRBROAU7.js").then(e=>e.createProtocolHandler(r,c)),t);d(n,"brain","Export, import, and inspect QE brain state",()=>import("./chunks/brain-handler-ET6YAP4B.js").then(e=>e.createBrainHandler(r,c)),t);d(n,"hypergraph","Query the code knowledge hypergraph",()=>import("./chunks/hypergraph-handler-BLF6LXEV.js").then(e=>e.createHypergraphHandler(r,c)),t,["hg"]);d(n,"heartbeat","Manage the token-free heartbeat scheduler",()=>import("./chunks/heartbeat-handler-PI42WD3C.js").then(e=>e.createHeartbeatHandler(r)),t);d(n,"routing","View routing performance, economics, and accuracy",()=>import("./chunks/routing-handler-KQM6VWLC.js").then(e=>e.createRoutingHandler(r)),t);o(n,{name:"workflow",description:"Manage QE workflows and pipelines (ADR-041)",factory:()=>import("./chunks/workflow-2ZQO6WYI.js").then(e=>e.createWorkflowCommand(t,r,c))});o(n,{name:"test",description:"Test generation, execution, scheduling, and load testing",factory:()=>import("./chunks/test-DHAAI3DU.js").then(e=>e.createTestCommand(t,r,c))});o(n,{name:"coverage",description:"Coverage analysis shortcut",factory:()=>import("./chunks/coverage-QKN57JDS.js").then(e=>e.createCoverageCommand(t,r,c))});o(n,{name:"quality",description:"Quality assessment shortcut",factory:()=>import("./chunks/quality-E55UC73D.js").then(e=>e.createQualityCommand(t,r,c))});o(n,{name:"quality-gate",description:"Two-gate, three-valued quality verdict against a pinned checklist (ADR-119)",factory:()=>import("./chunks/quality-gate-OIQATNT3.js").then(e=>e.createQualityGateCommand(t,r,c))});o(n,{name:"security",description:"Security scanning and URL validation",factory:()=>import("./chunks/security-P5NM353C.js").then(e=>e.createSecurityCommand(t,r,c))});o(n,{name:"arena",description:"Competitive test-strategy tournaments (ADR-104)",factory:()=>import("./chunks/arena-HXTWJ5YY.js").then(e=>e.createArenaCommand(t,r,c))});o(n,{name:"code",description:"Code intelligence analysis",factory:()=>import("./chunks/code-KQSUT3FS.js").then(e=>e.createCodeCommand(t,r,c))});o(n,{name:"completions",description:"Generate shell completions for aqe",factory:()=>import("./chunks/completions-7RWHAUAR.js").then(e=>e.createCompletionsCommand(r))});o(n,{name:"upgrade",description:"Detect optional native bindings and recommend install / flag changes",factory:()=>import("./chunks/upgrade-TJRVGHGD.js").then(e=>e.createUpgradeCommand(r))});o(n,{name:"fleet",description:"Fleet operations with multi-agent progress tracking",factory:()=>import("./chunks/fleet-ROXVMZ2F.js").then(e=>e.createFleetCommand(t,r,c,k))});o(n,{name:"validate",description:"Validation commands for skills and agents",factory:()=>import("./chunks/validate-swarm-QVVKCQLP.js").then(e=>e.createValidateSwarmCommand(t,r,c))});o(n,{name:"skill",description:"Skill validation and reporting (ADR-056)",factory:()=>import("./chunks/validate-BWPCVHBN.js").then(e=>e.createValidateCommand(t,r,c))});o(n,{name:"eval",description:"Run skill evaluation suites in parallel",factory:()=>import("./chunks/eval-WCK7KNFN.js").then(e=>e.createEvalCommand())});o(n,{name:"ci",description:"CI/CD pipeline orchestration",factory:()=>import("./chunks/ci-464KPQNP.js").then(e=>e.createCICommand(t,r,c))});o(n,{name:"token-usage",description:"View and analyze token consumption metrics (ADR-042)",factory:()=>import("./chunks/token-usage-Q2YG5YQN.js").then(e=>e.createTokenUsageCommand())});o(n,{name:"llm",description:"LLM Router management (ADR-043)",factory:()=>import("./chunks/llm-router-GOAV5FPI.js").then(e=>e.createLLMRouterCommand())});o(n,{name:"sync",description:"Sync local learning data to cloud PostgreSQL",factory:()=>import("./chunks/sync-LNHI5SB7.js").then(e=>e.createSyncCommands())});o(n,{name:"hooks",description:"Self-learning QE hooks for pattern recognition and guidance",factory:()=>import("./chunks/hooks-WVALP5GX.js").then(e=>e.createHooksCommand())});o(n,{name:"learning",description:"AQE self-learning system management (standalone, no claude-flow required)",factory:()=>import("./chunks/learning-CPERDDRG.js").then(e=>e.createLearningCommand())});o(n,{name:"memory",description:"Memory store, retrieve, search, and delete operations",factory:()=>import("./chunks/memory-4NHBYT6S.js").then(e=>e.createMemoryCommand(t,r,c))});o(n,{name:"mcp",description:"Start the MCP protocol server for Claude Code integration",factory:()=>import("./chunks/mcp-5TTB37DC.js").then(e=>e.createMcpCommand())});o(n,{name:"platform",description:"Manage coding agent platform configurations",factory:()=>import("./chunks/platform-OD5H5U6G.js").then(e=>e.createPlatformCommand())});o(n,{name:"prove",description:"Generate a verifiable Proof-of-Quality attestation",factory:()=>import("./chunks/prove-EJOGEGD3.js").then(e=>e.createProveCommand(t,r,c))});o(n,{name:"ruvector",description:"RuVector integration management",factory:()=>import("./chunks/ruvector-commands-U2GVV6PF.js").then(e=>e.createRuVectorCommand())});o(n,{name:"audit",description:"Witness chain audit trail management",factory:()=>import("./chunks/audit-YSGA7UWT.js").then(e=>e.createAuditCommand(t,r,c))});o(n,{name:"pipeline",description:"Manage YAML deterministic pipelines (Imp-9)",factory:()=>import("./chunks/pipeline-LQZSNDD2.js").then(e=>e.createPipelineCommand(t,r,c))});o(n,{name:"plugin",description:"Manage external QE domain plugins",factory:()=>import("./chunks/plugin-EJ6K2MGU.js").then(e=>e.createPluginCommand())});o(n,{name:"daemon",description:"Manage the QE Quality Daemon",factory:()=>import("./chunks/daemon-GKP7CMEK.js").then(e=>e.createDaemonCommand())});process.on("SIGINT",async()=>{console.log(m.yellow(`
10
10
 
11
11
  Shutting down...`)),console.log(m.green(`Shutdown complete
12
12
  `)),await r(0)});process.on("SIGTERM",async()=>{console.log(m.yellow(`
13
- Received SIGTERM, shutting down gracefully...`)),await r(0)});async function L(){let{isVersionFastPath:e}=await import("./chunks/fast-paths-CATDDBEU.js");e(process.argv)&&(console.log(E),process.exit(0));let{bootstrapTokenTracking:i}=await import("./chunks/token-bootstrap-76SRNXGG.js");await i({enableOptimization:!0,enablePersistence:!0,verbose:process.env.AQE_VERBOSE==="true"}),await n.parseAsync(),!h()&&await r(0)}L().catch(async e=>{console.error(m.red("Fatal error:"),e),await r(1)});
13
+ Received SIGTERM, shutting down gracefully...`)),await r(0)});async function O(){let{isVersionFastPath:e}=await import("./chunks/fast-paths-VYOSIBKF.js");e(process.argv)&&(console.log(E),process.exit(0));let a=process.argv.slice(2).filter(i=>i!=="--");if(!(a[0]==="learning"&&(a[1]==="backup"||a[1]==="restore"))){let{bootstrapTokenTracking:i}=await import("./chunks/token-bootstrap-GUTTLPZX.js");await i({enableOptimization:!0,enablePersistence:!0,verbose:process.env.AQE_VERBOSE==="true"})}await n.parseAsync(),!h()&&await r(0)}O().catch(async e=>{console.error(m.red("Fatal error:"),e),await r(1)});
@@ -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.14.4");process.exit(0)}
2
+ import{a,b,c}from"./chunk-XJ7QNVI5.js";import"./chunk-CLTMDCSE.js";import"./chunk-M4WJKGVK.js";import"./chunk-DHJPWQBR.js";import"./chunk-G6T45OIC.js";import"./chunk-TT23RRB7.js";export{a as AgentBoosterAdapter,b as createAgentBoosterAdapter,c as createAgentBoosterAdapterSync};
@@ -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.14.2");process.exit(0)}
2
- import{a as x}from"./chunk-PHHXHG2W.js";import{c as f}from"./chunk-ICKLBATY.js";import"./chunk-6VKJAMZY.js";x();import{createRequire as w}from"module";var S=f.create("agent-booster-wasm"),t={JavaScript:0,TypeScript:1,Python:2,Rust:3,Go:4,Java:5,C:6,Cpp:7},l={ExactReplace:0,FuzzyReplace:1,InsertAfter:2,InsertBefore:3,Append:4},v={0:"JavaScript",1:"TypeScript",2:"Python",3:"Rust",4:"Go",5:"Java",6:"C",7:"Cpp"},a=null,u=null,p=null;async function g(){if(a)return!0;if(p)return!1;try{if(a=w(import.meta.url)("./agent_booster_wasm.js"),!a)throw new Error("WASM module loaded but is null");return u=new a.AgentBoosterWasm,!0}catch(e){return p=e,console.warn("[AgentBoosterWASM] Failed to load WASM module:",e),!1}}function A(e){return{".js":t.JavaScript,".mjs":t.JavaScript,".cjs":t.JavaScript,".jsx":t.JavaScript,".ts":t.TypeScript,".tsx":t.TypeScript,".mts":t.TypeScript,".cts":t.TypeScript,".py":t.Python,".rs":t.Rust,".go":t.Go,".java":t.Java,".c":t.C,".h":t.C,".cpp":t.Cpp,".cc":t.Cpp,".cxx":t.Cpp,".hpp":t.Cpp}[e.toLowerCase()]??t.JavaScript}var M=[{name:"var-to-const",detect:(e,r)=>e.includes("var ")&&r.includes("const "),apply:(e,r)=>e.replace(/\bvar\s+/g,"const ")},{name:"var-to-let",detect:(e,r)=>e.includes("var ")&&r.includes("let "),apply:(e,r)=>e.replace(/\bvar\s+/g,"let ")},{name:"add-types-function",detect:(e,r)=>e.includes("function")&&!e.includes(":")&&r.includes(":"),apply:(e,r)=>r},{name:"async-wrapper",detect:(e,r)=>!e.includes("async")&&r.includes("async")&&r.includes("await"),apply:(e,r)=>r},{name:"try-catch-wrapper",detect:(e,r)=>!e.includes("try {")&&r.includes("try {"),apply:(e,r)=>r},{name:"null-check",detect:(e,r)=>!e.includes("if (!")&&!e.includes("if (!")&&(r.includes("if (!")||r.includes("?.")),apply:(e,r)=>r},{name:"test-assertion",detect:(e,r)=>e.includes("test(")&&!e.includes("expect(")&&r.includes("expect("),apply:(e,r)=>r}];function y(e,r){for(let n of M)if(n.detect(e,r))try{return{success:!0,code:n.apply(e,r),pattern:n.name}}catch(s){S.debug("Pattern transform failed, trying next",{pattern:n.name,error:s instanceof Error?s.message:String(s)});continue}return{success:!1,code:r}}async function b(e,r,n,s={}){let o=performance.now(),{confidenceThreshold:T=.5,allowFallback:d=!0}=s;if(!e.trim())return{success:!0,mergedCode:r,confidence:1,strategy:l.Append,syntaxValid:!0,source:"fallback",latencyMs:performance.now()-o};if(await g()&&u&&a)try{let c=a.WasmLanguage[v[n]],i=u.apply_edit(e,r,c);return{success:!0,mergedCode:i.merged_code,confidence:i.confidence,strategy:i.strategy,syntaxValid:i.syntax_valid,source:"wasm",latencyMs:performance.now()-o}}catch(c){let i=c;if(d){let m=y(e,r);if(m.success)return{success:!0,mergedCode:m.code,confidence:.7,strategy:l.FuzzyReplace,syntaxValid:!0,source:"pattern",latencyMs:performance.now()-o}}return{success:!1,mergedCode:r,confidence:0,strategy:l.Append,syntaxValid:!1,source:"fallback",latencyMs:performance.now()-o,error:i.message}}if(d){let c=y(e,r);return{success:c.success,mergedCode:c.code,confidence:c.success?.7:0,strategy:l.FuzzyReplace,syntaxValid:!0,source:"pattern",latencyMs:performance.now()-o}}return{success:!1,mergedCode:r,confidence:0,strategy:l.Append,syntaxValid:!1,source:"fallback",latencyMs:performance.now()-o,error:p?.message??"WASM not available"}}async function W(e,r={}){return Promise.all(e.map(({original:n,edit:s,language:o})=>b(n,s,o,r)))}async function C(){return g()}async function L(){return await g()&&a?a.AgentBoosterWasm.version():"unavailable"}async function R(){if(await g(),u&&a)try{u.apply_edit("function x() {}","function x() {}",a.WasmLanguage.JavaScript)}catch(e){console.debug("[AgentBoosterWASM] Warmup error:",e instanceof Error?e.message:e)}}var _={transform:b,batchTransform:W,isWasmAvailable:C,getVersion:L,warmup:R,Language:t,MergeStrategy:l,languageFromExtension:A};export{t as Language,l as MergeStrategy,W as batchTransform,_ as default,L as getVersion,C as isWasmAvailable,A as languageFromExtension,b as transform,R as warmup};
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.14.4");process.exit(0)}
2
+ import{a as x}from"./chunk-NA7B2QYB.js";import{c as f}from"./chunk-Y3MW3YBC.js";import"./chunk-TT23RRB7.js";x();import{createRequire as w}from"module";var S=f.create("agent-booster-wasm"),t={JavaScript:0,TypeScript:1,Python:2,Rust:3,Go:4,Java:5,C:6,Cpp:7},l={ExactReplace:0,FuzzyReplace:1,InsertAfter:2,InsertBefore:3,Append:4},v={0:"JavaScript",1:"TypeScript",2:"Python",3:"Rust",4:"Go",5:"Java",6:"C",7:"Cpp"},a=null,u=null,p=null;async function g(){if(a)return!0;if(p)return!1;try{if(a=w(import.meta.url)("./agent_booster_wasm.js"),!a)throw new Error("WASM module loaded but is null");return u=new a.AgentBoosterWasm,!0}catch(e){return p=e,console.warn("[AgentBoosterWASM] Failed to load WASM module:",e),!1}}function A(e){return{".js":t.JavaScript,".mjs":t.JavaScript,".cjs":t.JavaScript,".jsx":t.JavaScript,".ts":t.TypeScript,".tsx":t.TypeScript,".mts":t.TypeScript,".cts":t.TypeScript,".py":t.Python,".rs":t.Rust,".go":t.Go,".java":t.Java,".c":t.C,".h":t.C,".cpp":t.Cpp,".cc":t.Cpp,".cxx":t.Cpp,".hpp":t.Cpp}[e.toLowerCase()]??t.JavaScript}var M=[{name:"var-to-const",detect:(e,r)=>e.includes("var ")&&r.includes("const "),apply:(e,r)=>e.replace(/\bvar\s+/g,"const ")},{name:"var-to-let",detect:(e,r)=>e.includes("var ")&&r.includes("let "),apply:(e,r)=>e.replace(/\bvar\s+/g,"let ")},{name:"add-types-function",detect:(e,r)=>e.includes("function")&&!e.includes(":")&&r.includes(":"),apply:(e,r)=>r},{name:"async-wrapper",detect:(e,r)=>!e.includes("async")&&r.includes("async")&&r.includes("await"),apply:(e,r)=>r},{name:"try-catch-wrapper",detect:(e,r)=>!e.includes("try {")&&r.includes("try {"),apply:(e,r)=>r},{name:"null-check",detect:(e,r)=>!e.includes("if (!")&&!e.includes("if (!")&&(r.includes("if (!")||r.includes("?.")),apply:(e,r)=>r},{name:"test-assertion",detect:(e,r)=>e.includes("test(")&&!e.includes("expect(")&&r.includes("expect("),apply:(e,r)=>r}];function y(e,r){for(let n of M)if(n.detect(e,r))try{return{success:!0,code:n.apply(e,r),pattern:n.name}}catch(s){S.debug("Pattern transform failed, trying next",{pattern:n.name,error:s instanceof Error?s.message:String(s)});continue}return{success:!1,code:r}}async function b(e,r,n,s={}){let o=performance.now(),{confidenceThreshold:T=.5,allowFallback:d=!0}=s;if(!e.trim())return{success:!0,mergedCode:r,confidence:1,strategy:l.Append,syntaxValid:!0,source:"fallback",latencyMs:performance.now()-o};if(await g()&&u&&a)try{let c=a.WasmLanguage[v[n]],i=u.apply_edit(e,r,c);return{success:!0,mergedCode:i.merged_code,confidence:i.confidence,strategy:i.strategy,syntaxValid:i.syntax_valid,source:"wasm",latencyMs:performance.now()-o}}catch(c){let i=c;if(d){let m=y(e,r);if(m.success)return{success:!0,mergedCode:m.code,confidence:.7,strategy:l.FuzzyReplace,syntaxValid:!0,source:"pattern",latencyMs:performance.now()-o}}return{success:!1,mergedCode:r,confidence:0,strategy:l.Append,syntaxValid:!1,source:"fallback",latencyMs:performance.now()-o,error:i.message}}if(d){let c=y(e,r);return{success:c.success,mergedCode:c.code,confidence:c.success?.7:0,strategy:l.FuzzyReplace,syntaxValid:!0,source:"pattern",latencyMs:performance.now()-o}}return{success:!1,mergedCode:r,confidence:0,strategy:l.Append,syntaxValid:!1,source:"fallback",latencyMs:performance.now()-o,error:p?.message??"WASM not available"}}async function W(e,r={}){return Promise.all(e.map(({original:n,edit:s,language:o})=>b(n,s,o,r)))}async function C(){return g()}async function L(){return await g()&&a?a.AgentBoosterWasm.version():"unavailable"}async function R(){if(await g(),u&&a)try{u.apply_edit("function x() {}","function x() {}",a.WasmLanguage.JavaScript)}catch(e){console.debug("[AgentBoosterWASM] Warmup error:",e instanceof Error?e.message:e)}}var _={transform:b,batchTransform:W,isWasmAvailable:C,getVersion:L,warmup:R,Language:t,MergeStrategy:l,languageFromExtension:A};export{t as Language,l as MergeStrategy,W as batchTransform,_ as default,L as getVersion,C as isWasmAvailable,A as languageFromExtension,b as transform,R as warmup};
@@ -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.14.2");process.exit(0)}
2
- import{b as p}from"./chunk-RCI64RIJ.js";import{a as g}from"./chunk-4RT7I7PI.js";import"./chunk-QXTW7XCS.js";import"./chunk-6VKJAMZY.js";import s from"chalk";var l=class{name="agent";description="Manage QE agents";cleanupAndExit;ensureInitialized;constructor(n,t){this.cleanupAndExit=n,this.ensureInitialized=t}register(n,t){let a=n.command("agent").description(this.description);a.command("list").description("List all agents").option("-d, --domain <domain>","Filter by domain").option("-s, --status <status>","Filter by status").action(async e=>{await this.executeList(e,t)}),a.command("spawn <domain>").description("Spawn an agent in a domain").option("-t, --type <type>","Agent type","worker").option("-c, --capabilities <caps>","Comma-separated capabilities","general").option("--no-progress","Disable progress indicator").action(async(e,o)=>{await this.executeSpawn(e,o,t)})}async executeList(n,t){if(await this.ensureInitialized())try{let a=n.domain?t.queen.getAgentsByDomain(n.domain):t.queen.listAllAgents();if(n.status&&(a=a.filter(e=>e.status===n.status)),console.log(s.blue(`
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.14.4");process.exit(0)}
2
+ import{b as p}from"./chunk-DPFRKBOG.js";import{a as g}from"./chunk-3X3DJZJJ.js";import"./chunk-DHJPWQBR.js";import"./chunk-TT23RRB7.js";import s from"chalk";var l=class{name="agent";description="Manage QE agents";cleanupAndExit;ensureInitialized;constructor(n,t){this.cleanupAndExit=n,this.ensureInitialized=t}register(n,t){let a=n.command("agent").description(this.description);a.command("list").description("List all agents").option("-d, --domain <domain>","Filter by domain").option("-s, --status <status>","Filter by status").action(async e=>{await this.executeList(e,t)}),a.command("spawn <domain>").description("Spawn an agent in a domain").option("-t, --type <type>","Agent type","worker").option("-c, --capabilities <caps>","Comma-separated capabilities","general").option("--no-progress","Disable progress indicator").action(async(e,o)=>{await this.executeSpawn(e,o,t)})}async executeList(n,t){if(await this.ensureInitialized())try{let a=n.domain?t.queen.getAgentsByDomain(n.domain):t.queen.listAllAgents();if(n.status&&(a=a.filter(e=>e.status===n.status)),console.log(s.blue(`
3
3
  Agents (${a.length})
4
4
  `)),a.length===0)console.log(s.gray(" No agents found"));else{let e=new Map;for(let i of a)e.has(i.domain)||e.set(i.domain,[]),e.get(i.domain).push(i);let o=Array.from(e.entries());for(let[i,m]of o){console.log(s.cyan(` ${i}:`));for(let r of m)console.log(` ${r.id}`),console.log(` Type: ${r.type}`),console.log(` Status: ${g(r.status)}`),r.startedAt&&console.log(s.gray(` Started: ${r.startedAt.toISOString()}`));console.log("")}}}catch(a){console.error(s.red(`
5
5
  Failed to list agents:`),a),await this.cleanupAndExit(1)}}async executeSpawn(n,t,a){if(await this.ensureInitialized())try{let e=t.capabilities.split(",");console.log(s.blue(`
@@ -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.14.2");process.exit(0)}
2
- import"./chunk-6VKJAMZY.js";import{existsSync as i,mkdirSync as d,unlinkSync as s,readdirSync as p,statSync as f}from"fs";import{join as o,basename as l}from"path";var v={branchDir:".agentic-qe/branches",defaultStrategy:"child-wins",orphanMaxAgeMs:36e5},g=class{config;parentAdapter;activeBranches=new Map;witnessChain=null;constructor(t,e){this.parentAdapter=t,this.config={...v,...e}}setWitnessChain(t){this.witnessChain=t}createBranch(t){if(this.activeBranches.has(t))throw new Error(`Branch already exists for agent ${t}`);i(this.config.branchDir)||d(this.config.branchDir,{recursive:!0});let e=o(this.config.branchDir,`${t}.rvf`),r=this.parentAdapter.path(),n=this.parentAdapter.derive(e),a={agentId:t,childPath:e,parentPath:r,childAdapter:n,createdAt:Date.now(),ingestLog:[]};return this.activeBranches.set(t,a),a}recordIngest(t,e){let r=this.activeBranches.get(t);if(r)for(let n of e)r.ingestLog.push({id:n.id,vector:n.vector})}async mergeBranch(t,e){let r=e??this.config.defaultStrategy,n=performance.now(),a=0;if(r==="child-wins"&&t.ingestLog.length>0)try{a=this.parentAdapter.ingest(t.ingestLog).accepted}catch(c){console.warn(`[AgentMemoryBranch] Merge replay failed for ${t.agentId}:`,c)}return this.witnessChain?.append("BRANCH_MERGE",{agentId:t.agentId,strategy:r,vectorsMerged:a,branchPath:t.childPath},`agent-${t.agentId}`),this.cleanupBranchFile(t),this.activeBranches.delete(t.agentId),{vectorsMerged:a,strategy:r,durationMs:performance.now()-n}}discardBranch(t){this.witnessChain?.append("BRANCH_DISCARD",{agentId:t.agentId,action:"discard",branchPath:t.childPath},`agent-${t.agentId}`),this.cleanupBranchFile(t),this.activeBranches.delete(t.agentId)}getBranch(t){return this.activeBranches.get(t)}getActiveBranches(){return Array.from(this.activeBranches.values())}listBranchFiles(){return i(this.config.branchDir)?p(this.config.branchDir).filter(e=>e.endsWith(".rvf")).map(e=>{let r=o(this.config.branchDir,e),n=f(r);return{agentId:l(e,".rvf"),path:r,sizeBytes:n.size,modifiedAt:n.mtime}}):[]}cleanupOrphans(t){let e=t??this.config.orphanMaxAgeMs,r=Date.now(),n=0;for(let a of this.listBranchFiles())if(r-a.modifiedAt.getTime()>e&&!this.activeBranches.has(a.agentId))try{s(a.path);let h=`${a.path}.idmap.json`;i(h)&&s(h),n++}catch{}return n}cleanupBranchFile(t){try{t.childAdapter.close()}catch{}try{i(t.childPath)&&s(t.childPath);let e=`${t.childPath}.idmap.json`;i(e)&&s(e)}catch{}}};export{g as AgentMemoryBranch};
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.14.4");process.exit(0)}
2
+ import"./chunk-TT23RRB7.js";import{existsSync as i,mkdirSync as d,unlinkSync as s,readdirSync as p,statSync as f}from"fs";import{join as o,basename as l}from"path";var v={branchDir:".agentic-qe/branches",defaultStrategy:"child-wins",orphanMaxAgeMs:36e5},g=class{config;parentAdapter;activeBranches=new Map;witnessChain=null;constructor(t,e){this.parentAdapter=t,this.config={...v,...e}}setWitnessChain(t){this.witnessChain=t}createBranch(t){if(this.activeBranches.has(t))throw new Error(`Branch already exists for agent ${t}`);i(this.config.branchDir)||d(this.config.branchDir,{recursive:!0});let e=o(this.config.branchDir,`${t}.rvf`),r=this.parentAdapter.path(),n=this.parentAdapter.derive(e),a={agentId:t,childPath:e,parentPath:r,childAdapter:n,createdAt:Date.now(),ingestLog:[]};return this.activeBranches.set(t,a),a}recordIngest(t,e){let r=this.activeBranches.get(t);if(r)for(let n of e)r.ingestLog.push({id:n.id,vector:n.vector})}async mergeBranch(t,e){let r=e??this.config.defaultStrategy,n=performance.now(),a=0;if(r==="child-wins"&&t.ingestLog.length>0)try{a=this.parentAdapter.ingest(t.ingestLog).accepted}catch(c){console.warn(`[AgentMemoryBranch] Merge replay failed for ${t.agentId}:`,c)}return this.witnessChain?.append("BRANCH_MERGE",{agentId:t.agentId,strategy:r,vectorsMerged:a,branchPath:t.childPath},`agent-${t.agentId}`),this.cleanupBranchFile(t),this.activeBranches.delete(t.agentId),{vectorsMerged:a,strategy:r,durationMs:performance.now()-n}}discardBranch(t){this.witnessChain?.append("BRANCH_DISCARD",{agentId:t.agentId,action:"discard",branchPath:t.childPath},`agent-${t.agentId}`),this.cleanupBranchFile(t),this.activeBranches.delete(t.agentId)}getBranch(t){return this.activeBranches.get(t)}getActiveBranches(){return Array.from(this.activeBranches.values())}listBranchFiles(){return i(this.config.branchDir)?p(this.config.branchDir).filter(e=>e.endsWith(".rvf")).map(e=>{let r=o(this.config.branchDir,e),n=f(r);return{agentId:l(e,".rvf"),path:r,sizeBytes:n.size,modifiedAt:n.mtime}}):[]}cleanupOrphans(t){let e=t??this.config.orphanMaxAgeMs,r=Date.now(),n=0;for(let a of this.listBranchFiles())if(r-a.modifiedAt.getTime()>e&&!this.activeBranches.has(a.agentId))try{s(a.path);let h=`${a.path}.idmap.json`;i(h)&&s(h),n++}catch{}return n}cleanupBranchFile(t){try{t.childAdapter.close()}catch{}try{i(t.childPath)&&s(t.childPath);let e=`${t.childPath}.idmap.json`;i(e)&&s(e)}catch{}}};export{g as AgentMemoryBranch};
@@ -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.14.4");process.exit(0)}
2
+ import{a,b,c,d,e,f}from"./chunk-CSU5NYOX.js";import"./chunk-J6GNQS62.js";import"./chunk-CIKSHTEQ.js";import"./chunk-5Z6XZV7K.js";import"./chunk-IFCLB7FJ.js";import"./chunk-4OYFXLBK.js";import"./chunk-ZBAKA4YB.js";import"./chunk-T6BVLVI5.js";import"./chunk-ZJ26AQA5.js";import"./chunk-OBAP2TXZ.js";import"./chunk-IPR4QP3H.js";import"./chunk-DEYLEDJN.js";import"./chunk-TPGED2IF.js";import"./chunk-MNW6QGNJ.js";import"./chunk-MCUJEZT6.js";import"./chunk-NDPFGIMJ.js";import"./chunk-55RWDRJD.js";import"./chunk-R4VL6E65.js";import"./chunk-RJCYCLZV.js";import"./chunk-NA7B2QYB.js";import"./chunk-Y3MW3YBC.js";import"./chunk-PEPFCPES.js";import"./chunk-DHJPWQBR.js";import"./chunk-BOZZYWCR.js";import"./chunk-TDZ53WO2.js";import"./chunk-QGIU2WRL.js";import"./chunk-STM3UDNO.js";import"./chunk-G6T45OIC.js";import"./chunk-SRKETSFF.js";import"./chunk-BGE6FOLM.js";import"./chunk-5YPYDPBJ.js";import"./chunk-HDSAM2RE.js";import"./chunk-KCZR45PA.js";import"./chunk-BFP7KO7P.js";import"./chunk-ODKLFVYC.js";import"./chunk-VD6QRULW.js";import"./chunk-KHFNNVJA.js";import"./chunk-CNG6GQEZ.js";import"./chunk-TT23RRB7.js";export{b as AQELearningEngine,a as DEFAULT_ENGINE_CONFIG,c as DEFAULT_META_LEARNING_CONFIG,d as MetaLearningEngine,e as createAQELearningEngine,f as createDefaultLearningEngine};
@@ -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.14.2");process.exit(0)}
2
- import{a as c,c as f}from"./chunk-D4RCV4LY.js";import"./chunk-6VKJAMZY.js";f();import{Command as $}from"commander";import r from"chalk";function x(v,g,p){let m=new $("arena").description("Competitive test-strategy tournaments (ADR-104)").addHelpText("after",`
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.14.4");process.exit(0)}
2
+ import{a as c,c as f}from"./chunk-G6T45OIC.js";import"./chunk-TT23RRB7.js";f();import{Command as $}from"commander";import r from"chalk";function x(v,g,p){let m=new $("arena").description("Competitive test-strategy tournaments (ADR-104)").addHelpText("after",`
3
3
  Examples:
4
4
  # Run a 4-strategy tournament against the demo fixture (reproducible under --seed)
5
5
  aqe arena run --strategies 4 --target fixtures/arena-demo --seed 42
@@ -9,10 +9,10 @@ Examples:
9
9
 
10
10
  # List persisted runs
11
11
  aqe arena list
12
- `);return m.command("run").description("Run a seeded strategy tournament against an arena fixture").requiredOption("--target <dir>","Arena fixture directory (src/*.mjs + tests/*.test.mjs)").option("--strategies <n>","Number of strategies","4").option("--seed <n>","RNG seed (same seed = same tournament)","42").option("--max-mutants <n>","Mutant sample cap","24").option("--evolve <steps>","Hill-climb steps from the winner","0").option("--json","Output the full arena-result@1 envelope as JSON").action(async a=>{try{let{runArena:i}=await import("./arena-FOTVSRK4.js"),t=i({target:a.target,strategies:parseInt(a.strategies,10),seed:parseInt(a.seed,10),maxMutants:parseInt(a.maxMutants,10),evolveSteps:parseInt(a.evolve,10),log:a.json?()=>{}:e=>console.error(r.dim(` ${e}`))});try{let{getUnifiedMemory:e}=await import("./unified-memory-DSTIEDSH.js"),s=e();s.isInitialized()||await s.initialize(),s.getDatabase().prepare("INSERT OR REPLACE INTO kv_store (namespace, key, value) VALUES ('arena', ?, ?)").run(`run:${t.seed}:${t.target}`,JSON.stringify(t))}catch(e){console.error(r.dim(` note: run not persisted (${c(e)})`))}if(a.json){console.log(JSON.stringify(t,null,2));return}let d=new Map(t.strategies.map(e=>[e.id,e]));console.log(r.blue(`
12
+ `);return m.command("run").description("Run a seeded strategy tournament against an arena fixture").requiredOption("--target <dir>","Arena fixture directory (src/*.mjs + tests/*.test.mjs)").option("--strategies <n>","Number of strategies","4").option("--seed <n>","RNG seed (same seed = same tournament)","42").option("--max-mutants <n>","Mutant sample cap","24").option("--evolve <steps>","Hill-climb steps from the winner","0").option("--json","Output the full arena-result@1 envelope as JSON").action(async a=>{try{let{runArena:i}=await import("./arena-KXFHRWX4.js"),t=i({target:a.target,strategies:parseInt(a.strategies,10),seed:parseInt(a.seed,10),maxMutants:parseInt(a.maxMutants,10),evolveSteps:parseInt(a.evolve,10),log:a.json?()=>{}:e=>console.error(r.dim(` ${e}`))});try{let{getUnifiedMemory:e}=await import("./unified-memory-CXHLHB5I.js"),s=e();s.isInitialized()||await s.initialize(),s.getDatabase().prepare("INSERT OR REPLACE INTO kv_store (namespace, key, value) VALUES ('arena', ?, ?)").run(`run:${t.seed}:${t.target}`,JSON.stringify(t))}catch(e){console.error(r.dim(` note: run not persisted (${c(e)})`))}if(a.json){console.log(JSON.stringify(t,null,2));return}let d=new Map(t.strategies.map(e=>[e.id,e]));console.log(r.blue(`
13
13
  Arena: ${t.target} \xB7 seed ${t.seed} \xB7 ${t.mutantsTotal} mutants
14
14
  `)),console.log(" rank id kill-rate coverage cost fitness groups"),t.ranking.forEach((e,s)=>{let n=d.get(e),u=n.coveragePct===null?" n/a":`${n.coveragePct.toFixed(2)}%`.padStart(7);console.log(` ${String(s+1).padEnd(5)}${n.id.padEnd(5)}${(n.killRate*100).toFixed(1).padStart(6)}% ${u} ${n.suiteCostRatio.toFixed(2).padEnd(6)}${n.fitness.toFixed(4).padEnd(9)}${n.name}`+(n.baselinePassed?"":r.red(" [baseline FAILED]")))}),console.log(`
15
15
  competitive array (row beats column = 1):`);let o=t.strategies.map(e=>e.id);if(console.log(` ${o.map(e=>e.padEnd(4)).join("")}`),t.competitiveArray.forEach((e,s)=>{console.log(` ${o[s].padEnd(4)}${e.map(n=>String(n).padStart(2).padEnd(4)).join("")}`)}),t.evolution.length>0){console.log(`
16
16
  evolution:`);for(let e of t.evolution)console.log(` step ${e.step}: [${e.groups.join("+")}] fitness ${e.fitness.toFixed(4)} ${e.accepted?r.green("accepted"):"rejected"}`)}let l=d.get(t.ranking[0]);console.log(r.green(`
17
17
  winner: ${l.id} [${l.name}] \u2014 kill ${(l.killRate*100).toFixed(1)}%, fitness ${l.fitness.toFixed(4)}
18
- `))}catch(i){console.error(r.red(` \u2717 ${c(i)}`)),await g(1)}}),m.command("list").description("List persisted arena runs").option("--json","Output as JSON").action(async a=>{if(await p())try{let{getUnifiedMemory:i}=await import("./unified-memory-DSTIEDSH.js"),t=i();t.isInitialized()||await t.initialize();let d=t.getDatabase().prepare("SELECT key, value FROM kv_store WHERE namespace = 'arena' ORDER BY key").all();if(a.json){console.log(JSON.stringify(d.map(o=>({key:o.key,result:JSON.parse(o.value)})),null,2));return}if(d.length===0){console.log(r.yellow(" no persisted arena runs"));return}for(let o of d){let l=JSON.parse(o.value),e=l.strategies.find(s=>s.id===l.ranking[0]);console.log(` ${r.green(o.key)} \u2014 winner ${e?.id} [${e?.name}] fitness ${e?.fitness}`)}}catch(i){console.error(r.red(` \u2717 ${c(i)}`)),await g(1)}}),m}export{x as createArenaCommand};
18
+ `))}catch(i){console.error(r.red(` \u2717 ${c(i)}`)),await g(1)}}),m.command("list").description("List persisted arena runs").option("--json","Output as JSON").action(async a=>{if(await p())try{let{getUnifiedMemory:i}=await import("./unified-memory-CXHLHB5I.js"),t=i();t.isInitialized()||await t.initialize();let d=t.getDatabase().prepare("SELECT key, value FROM kv_store WHERE namespace = 'arena' ORDER BY key").all();if(a.json){console.log(JSON.stringify(d.map(o=>({key:o.key,result:JSON.parse(o.value)})),null,2));return}if(d.length===0){console.log(r.yellow(" no persisted arena runs"));return}for(let o of d){let l=JSON.parse(o.value),e=l.strategies.find(s=>s.id===l.ranking[0]);console.log(` ${r.green(o.key)} \u2014 winner ${e?.id} [${e?.name}] fitness ${e?.fitness}`)}}catch(i){console.error(r.red(` \u2717 ${c(i)}`)),await g(1)}}),m}export{x as createArenaCommand};
@@ -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.14.2");process.exit(0)}
2
- import"./chunk-6VKJAMZY.js";import*as K from"fs";import*as M from"path";function G(t){let r=t>>>0;return function(){r|=0,r=r+1831565813|0;let n=Math.imul(r^r>>>15,1|r);return n=n+Math.imul(n^n>>>7,61|n)^n,((n^n>>>14)>>>0)/4294967296}}function w(t,r){return Math.floor(t()*r)}var z=[["===","!=="],["!==","==="],["<=","<"],[">=",">"],["&&","||"],["||","&&"],["<","<="],[">",">="],["+","-"],["*","+"]];function H(t){let r=new Array(t.length).fill(!1),n=0,e="code";for(;n<t.length;){let s=t[n],i=t[n+1];e==="code"?(s==="'"?e="single":s==='"'?e="double":s==="`"?e="template":s==="/"&&i==="/"?e="line-comment":s==="/"&&i==="*"&&(e="block-comment"),e!=="code"&&(r[n]=!0)):(r[n]=!0,e==="single"&&s==="'"&&t[n-1]!=="\\"||e==="double"&&s==='"'&&t[n-1]!=="\\"||e==="template"&&s==="`"&&t[n-1]!=="\\"||e==="line-comment"&&s===`
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.14.4");process.exit(0)}
2
+ import"./chunk-TT23RRB7.js";import*as K from"fs";import*as M from"path";function G(t){let r=t>>>0;return function(){r|=0,r=r+1831565813|0;let n=Math.imul(r^r>>>15,1|r);return n=n+Math.imul(n^n>>>7,61|n)^n,((n^n>>>14)>>>0)/4294967296}}function w(t,r){return Math.floor(t()*r)}var z=[["===","!=="],["!==","==="],["<=","<"],[">=",">"],["&&","||"],["||","&&"],["<","<="],[">",">="],["+","-"],["*","+"]];function H(t){let r=new Array(t.length).fill(!1),n=0,e="code";for(;n<t.length;){let s=t[n],i=t[n+1];e==="code"?(s==="'"?e="single":s==='"'?e="double":s==="`"?e="template":s==="/"&&i==="/"?e="line-comment":s==="/"&&i==="*"&&(e="block-comment"),e!=="code"&&(r[n]=!0)):(r[n]=!0,e==="single"&&s==="'"&&t[n-1]!=="\\"||e==="double"&&s==='"'&&t[n-1]!=="\\"||e==="template"&&s==="`"&&t[n-1]!=="\\"||e==="line-comment"&&s===`
3
3
  `?e="code":e==="block-comment"&&s==="*"&&i==="/"&&(r[n+1]=!0,n++,e="code")),n++}return r}function E(t,r){let n=1;for(let e=0;e<r;e++)t[e]===`
4
4
  `&&n++;return n}function A(t,r){let n=H(t),e=new Array(t.length).fill(!1),s=[];for(let[i,c]of z){let a=t.indexOf(i);for(;a!==-1;){let u=a+i.length,y=e.slice(a,u).some(Boolean),h=n.slice(a,u).some(Boolean),v=i===">"&&t[a-1]==="=",S=(i==="<"||i===">")&&(t[u]==="="||t[a-1]==="<"||t[a-1]===">");if(!y&&!h&&!v&&!S){for(let d=a;d<u;d++)e[d]=!0;s.push({id:`${r}:${E(t,a)}:${a}:${i}->${c}`,index:a,from:i,to:c,line:E(t,a)})}a=t.indexOf(i,a+1)}}return s.sort((i,c)=>i.index-c.index)}function W(t,r){return t.slice(0,r.index)+r.to+t.slice(r.index+r.from.length)}import*as m from"fs";import*as f from"path";import*as L from"os";import{spawnSync as J}from"child_process";function I(t){let r=f.resolve(t),n=f.join(r,"src"),e=f.join(r,"tests");if(!m.existsSync(n)||!m.existsSync(e))throw new Error(`not an arena fixture (expected src/ and tests/): ${r}`);let s=m.readdirSync(n).filter(c=>c.endsWith(".mjs")).sort().map(c=>f.join("src",c)),i={};for(let c of m.readdirSync(e).filter(a=>a.endsWith(".test.mjs")).sort())i[c.replace(".test.mjs","")]=f.join("tests",c);if(s.length===0||Object.keys(i).length===0)throw new Error(`fixture has no src/*.mjs or tests/*.test.mjs: ${r}`);return{root:r,sourceFiles:s,testGroups:i}}function T(t,r){let n=m.mkdtempSync(f.join(r,"arena-ws-"));m.mkdirSync(f.join(n,"src"),{recursive:!0}),m.mkdirSync(f.join(n,"tests"),{recursive:!0});for(let e of t.layout.sourceFiles){let s=t.mutatedFile&&t.mutatedFile.relPath===e?t.mutatedFile.content:m.readFileSync(f.join(t.layout.root,e),"utf8");m.writeFileSync(f.join(n,e),s)}for(let e of t.groups){let s=t.layout.testGroups[e];m.copyFileSync(f.join(t.layout.root,s),f.join(n,s))}return n}function $(t,r={}){let n=["--test"];r.coverage&&n.push("--experimental-test-coverage");let e=m.readdirSync(f.join(t,"tests")).filter(u=>u.endsWith(".test.mjs")).sort().map(u=>f.join("tests",u));n.push(...e);let s=process.hrtime.bigint(),i=J(process.execPath,n,{cwd:t,timeout:r.timeoutMs??12e4,encoding:"utf8"}),c=Number(process.hrtime.bigint()-s)/1e6,a=null;if(r.coverage){let u=/all files\s*\|\s*([\d.]+)/.exec(i.stdout??"");a=u?Number(u[1]):null}return{ok:i.status===0,durationMs:Math.round(c),coveragePct:a}}function N(){return m.mkdtempSync(f.join(L.tmpdir(),"qe-arena-"))}function B(t){m.rmSync(t,{recursive:!0,force:!0})}var k={kill:.6,coverage:.3,runtimePenalty:.1};function Q(t,r,n){let e=[...t].sort(),s=new Set([e.join("+")]),i=[{id:"s1",name:`all(${e.join("+")})`,groups:e}],c=0;for(;i.length<r&&c++<200;){let a=e.filter(()=>n()<.5);if(a.length===0)continue;let u=a.join("+");s.has(u)||(s.add(u),i.push({id:`s${i.length+1}`,name:u,groups:a}))}return i}function C(t,r,n){let e=r===null?0:r/100,s=k.kill*t+k.coverage*e-k.runtimePenalty*n;return Math.round(s*1e4)/1e4}function D(t,r,n,e){let s=T({layout:t,groups:r.groups},e),i=$(s,{coverage:!0});if(!i.ok)return{baselinePassed:!1,killed:0,total:0,coveragePct:i.coveragePct,runtimeMs:i.durationMs};let c=0,a=0;for(let u of n)for(let y of u.mutants){a++;let h=T({layout:t,groups:r.groups,mutatedFile:{relPath:u.relPath,content:W(u.source,y)}},e);$(h).ok||c++}return{baselinePassed:!0,killed:c,total:a,coveragePct:i.coveragePct,runtimeMs:i.durationMs}}function rt(t){let r=t.seed??42,n=t.log??(()=>{}),e=G(r),s=I(t.target),i=N();try{let c=t.maxMutants??24,a=s.sourceFiles.map(l=>{let o=K.readFileSync(M.join(s.root,l),"utf8");return{relPath:l,source:o,mutants:A(o,l)}}),u=a.flatMap(l=>l.mutants.map(o=>({file:l.relPath,m:o})));if(u.length>c){let l=new Set;for(;l.size<c;)l.add(u[w(e,u.length)].m.id);for(let o of a)o.mutants=o.mutants.filter(p=>l.has(p.id));u=a.flatMap(o=>o.mutants.map(p=>({file:o.relPath,m:p})))}n(`mutants: ${u.length} (of ${a.reduce((l,o)=>l+A(o.source,o.relPath).length,0)} enumerated)`);let y=Q(Object.keys(s.testGroups),t.strategies??4,e),h={},v=y.map(l=>{n(`evaluating ${l.id} [${l.name}] ...`);let o=D(s,l,a,i);return h[l.id]=o.runtimeMs,{s:l,e:o}}),S=Object.keys(s.testGroups).length,d=v.map(({s:l,e:o})=>{let p=o.total>0?Math.round(o.killed/o.total*1e4)/1e4:0,g=Math.round(l.groups.length/S*1e4)/1e4;return{...l,baselinePassed:o.baselinePassed,mutantsKilled:o.killed,mutantsTotal:o.total,killRate:p,coveragePct:o.coveragePct,suiteCostRatio:g,fitness:o.baselinePassed?C(p,o.coveragePct,g):0}}),P=[...d].sort((l,o)=>o.fitness-l.fitness||l.id.localeCompare(o.id)).map(l=>l.id),U=d.map(l=>d.map(o=>l.fitness>o.fitness?1:l.fitness<o.fitness?-1:0)),j=[];if(t.evolveSteps&&t.evolveSteps>0){let l=Object.keys(s.testGroups).sort(),o=d.find(g=>g.id===P[0]).groups,p=d.find(g=>g.id===P[0]).fitness;for(let g=1;g<=t.evolveSteps;g++){let R=l[w(e,l.length)],b=o.includes(R)?o.filter(q=>q!==R):[...o,R].sort();if(b.length===0){j.push({step:g,groups:b,fitness:0,accepted:!1});continue}let x=D(s,{id:`evo${g}`,name:b.join("+"),groups:b},a,i),_=x.total>0?x.killed/x.total:0,F=x.baselinePassed?C(_,x.coveragePct,b.length/l.length):0,O=F>p;j.push({step:g,groups:b,fitness:F,accepted:O}),O&&(o=b,p=F)}}return{contract:"arena-result@1",seed:r,target:M.relative(process.cwd(),s.root)||".",weights:{...k},mutantsTotal:u.length,strategies:d,ranking:P,competitiveArray:U,evolution:j,informational:{runtimesMs:h}}}finally{B(i)}}export{Q as buildStrategies,rt as runArena};
@@ -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.14.2");process.exit(0)}
2
- import{d as f,e as g,f as m,g as y}from"./chunk-K574FLVB.js";import{o as L}from"./chunk-W2FLULF4.js";import"./chunk-N3RN4QTC.js";import"./chunk-T46LOLW3.js";import"./chunk-PHHXHG2W.js";import"./chunk-ICKLBATY.js";import{b as l}from"./chunk-JDXLCNKV.js";import"./chunk-QXTW7XCS.js";import"./chunk-D4RCV4LY.js";import"./chunk-N5ZRUOMR.js";import{p as E,q as w}from"./chunk-HBTC4L53.js";import"./chunk-RVCWSAXI.js";import"./chunk-T4C56HBW.js";import"./chunk-JQ2ZD3WO.js";import"./chunk-CJCT452S.js";import"./chunk-S7N4BKI3.js";import"./chunk-JIUF6NV6.js";import"./chunk-GHQ5PUOV.js";import{g as v}from"./chunk-6VKJAMZY.js";import{Command as x}from"commander";import c from"chalk";L();import{existsSync as p}from"node:fs";import b from"node:path";function C(n,i){let e=[];e.push(c.bold("Witness Chain Audit Verification")),e.push("");let t=i?c.green("ENABLED"):c.yellow("DISABLED");e.push(` Feature Flag: ${t}`),e.push(` Chain Length: ${n.length} receipts`);let r=n.valid?c.green("VALID"):c.red("BROKEN");return e.push(` Integrity: ${r}`),n.length>0&&e.push(` Last Hash: ${n.lastHash.slice(0,16)}...`),!n.valid&&n.brokenAt>=0&&(e.push(""),e.push(c.red(` Break detected at index ${n.brokenAt}`)),e.push(c.red(` ${n.message}`))),e.push(""),e.join(`
3
- `)}function V(){try{let n=l(),i=b.join(n,".agentic-qe","memory.db");if(!p(i))return null;let e=(w(),v(E)),t=new e(i),r=f(t),s=m(r);return t.close(),s}catch{return null}}async function O(n){let i=y(),t=(V()??g()).verifyChain(),r={featureEnabled:i,chainLength:t.length,integrity:t.valid,brokenAt:t.brokenAt,lastHash:t.lastHash,message:t.message};return n.format==="json"?console.log(JSON.stringify(r,null,2)):console.log(C(t,i)),r}async function j(n){let{WitnessChain:i,hashWith:e,serializeEntry:t}=await import("./witness-chain-2KY73HPN.js"),r=l(),s=b.join(r,".agentic-qe","memory.db"),a;if(!p(s))a={featureEnabled:!0,chainLength:0,integrity:!0,brokenAt:-1,lastHash:"",message:`No database found at ${s} \u2014 nothing to verify`};else{let{default:A}=await import("./better-sqlite3-S7M5R2HS.js"),h=new A(s,{readonly:!0});try{let d=new i(h);await d.initialize();let o=d.verify({includeArchive:!0,checkSignatures:!0}),u=h.prepare("SELECT * FROM witness_chain ORDER BY id DESC LIMIT 1").get(),k=u?e(u.hash_algo||"sha256",t(u)):"";a={featureEnabled:!0,chainLength:o.entriesChecked,integrity:o.valid,brokenAt:o.brokenAt??-1,lastHash:k,message:o.valid?`Audit chain verified: ${o.entriesChecked} entries checked, ${o.signatureFailures??0} signature failures`:`Audit chain BROKEN at id=${o.brokenAt} (${o.entriesChecked} entries checked before the break)`}}finally{h.close()}}return n.format==="json"?console.log(JSON.stringify(a,null,2)):console.log(C({valid:a.integrity,length:a.chainLength,brokenAt:a.brokenAt,lastHash:a.lastHash,message:a.message},a.featureEnabled)),a}function R(n,i,e){let t=new x("audit").description("Witness chain audit trail management");return t.command("verify").description("Verify witness chain integrity").option("-F, --format <format>","Output format (json|text)","text").option("-C, --chain <chain>","Which chain to verify: governance (29 decision receipts) or audit (full QE audit trail)","governance").action(async r=>{try{let s=r.format,a=r.chain==="audit"?await j({format:s}):await O({format:s});await i(a.integrity?0:1)}catch(s){console.error("Failed to verify witness chain:",s),await i(1)}}),t}export{R as createAuditCommand,C as formatVerificationText,j as handleAuditChainVerify,O as handleAuditVerify};
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.14.4");process.exit(0)}
2
+ import{d as f,e as g,f as m,g as y}from"./chunk-CIZ5JPDC.js";import{o as L}from"./chunk-55RWDRJD.js";import"./chunk-R4VL6E65.js";import"./chunk-RJCYCLZV.js";import"./chunk-NA7B2QYB.js";import"./chunk-Y3MW3YBC.js";import{b as l}from"./chunk-PEPFCPES.js";import"./chunk-DHJPWQBR.js";import"./chunk-G6T45OIC.js";import"./chunk-BGE6FOLM.js";import{p as E,q as w}from"./chunk-5YPYDPBJ.js";import"./chunk-HDSAM2RE.js";import"./chunk-KCZR45PA.js";import"./chunk-BFP7KO7P.js";import"./chunk-ODKLFVYC.js";import"./chunk-VD6QRULW.js";import"./chunk-KHFNNVJA.js";import"./chunk-CNG6GQEZ.js";import{g as v}from"./chunk-TT23RRB7.js";import{Command as x}from"commander";import c from"chalk";L();import{existsSync as p}from"node:fs";import b from"node:path";function C(n,i){let e=[];e.push(c.bold("Witness Chain Audit Verification")),e.push("");let t=i?c.green("ENABLED"):c.yellow("DISABLED");e.push(` Feature Flag: ${t}`),e.push(` Chain Length: ${n.length} receipts`);let r=n.valid?c.green("VALID"):c.red("BROKEN");return e.push(` Integrity: ${r}`),n.length>0&&e.push(` Last Hash: ${n.lastHash.slice(0,16)}...`),!n.valid&&n.brokenAt>=0&&(e.push(""),e.push(c.red(` Break detected at index ${n.brokenAt}`)),e.push(c.red(` ${n.message}`))),e.push(""),e.join(`
3
+ `)}function V(){try{let n=l(),i=b.join(n,".agentic-qe","memory.db");if(!p(i))return null;let e=(w(),v(E)),t=new e(i),r=f(t),s=m(r);return t.close(),s}catch{return null}}async function O(n){let i=y(),t=(V()??g()).verifyChain(),r={featureEnabled:i,chainLength:t.length,integrity:t.valid,brokenAt:t.brokenAt,lastHash:t.lastHash,message:t.message};return n.format==="json"?console.log(JSON.stringify(r,null,2)):console.log(C(t,i)),r}async function j(n){let{WitnessChain:i,hashWith:e,serializeEntry:t}=await import("./witness-chain-VT4UHHBR.js"),r=l(),s=b.join(r,".agentic-qe","memory.db"),a;if(!p(s))a={featureEnabled:!0,chainLength:0,integrity:!0,brokenAt:-1,lastHash:"",message:`No database found at ${s} \u2014 nothing to verify`};else{let{default:A}=await import("./better-sqlite3-UICJZIDG.js"),h=new A(s,{readonly:!0});try{let d=new i(h);await d.initialize();let o=d.verify({includeArchive:!0,checkSignatures:!0}),u=h.prepare("SELECT * FROM witness_chain ORDER BY id DESC LIMIT 1").get(),k=u?e(u.hash_algo||"sha256",t(u)):"";a={featureEnabled:!0,chainLength:o.entriesChecked,integrity:o.valid,brokenAt:o.brokenAt??-1,lastHash:k,message:o.valid?`Audit chain verified: ${o.entriesChecked} entries checked, ${o.signatureFailures??0} signature failures`:`Audit chain BROKEN at id=${o.brokenAt} (${o.entriesChecked} entries checked before the break)`}}finally{h.close()}}return n.format==="json"?console.log(JSON.stringify(a,null,2)):console.log(C({valid:a.integrity,length:a.chainLength,brokenAt:a.brokenAt,lastHash:a.lastHash,message:a.message},a.featureEnabled)),a}function R(n,i,e){let t=new x("audit").description("Witness chain audit trail management");return t.command("verify").description("Verify witness chain integrity").option("-F, --format <format>","Output format (json|text)","text").option("-C, --chain <chain>","Which chain to verify: governance (29 decision receipts) or audit (full QE audit trail)","governance").action(async r=>{try{let s=r.format,a=r.chain==="audit"?await j({format:s}):await O({format:s});await i(a.integrity?0:1)}catch(s){console.error("Failed to verify witness chain:",s),await i(1)}}),t}export{R as createAuditCommand,C as formatVerificationText,j as handleAuditChainVerify,O as handleAuditVerify};
@@ -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.14.4");process.exit(0)}
2
+ import{a,b,c,d,e,f,g,h,i,j,k,l}from"./chunk-W7BWUTVV.js";import"./chunk-6TPKK7LD.js";import"./chunk-55RWDRJD.js";import"./chunk-R4VL6E65.js";import"./chunk-RJCYCLZV.js";import"./chunk-NA7B2QYB.js";import"./chunk-Y3MW3YBC.js";import"./chunk-PEPFCPES.js";import"./chunk-DHJPWQBR.js";import"./chunk-G6T45OIC.js";import"./chunk-SRKETSFF.js";import"./chunk-AIHDEEJO.js";import"./chunk-BGE6FOLM.js";import"./chunk-5YPYDPBJ.js";import"./chunk-HDSAM2RE.js";import"./chunk-KCZR45PA.js";import"./chunk-BFP7KO7P.js";import"./chunk-ODKLFVYC.js";import"./chunk-VD6QRULW.js";import"./chunk-KHFNNVJA.js";import"./chunk-CNG6GQEZ.js";import"./chunk-TT23RRB7.js";export{l as MCPToolBase,k as defaultToolLogger,j as getKernel,i as getLLMRouter,e as getMemoryBackend,g as getSharedLLMRouter,c as getSharedMemoryBackend,a as isMemoryOnlyMode,b as registerRvfResetFn,h as resetSharedLLMRouter,d as resetSharedMemoryBackend,f as setSharedLLMRouter};
@@ -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.14.2");process.exit(0)}
2
- import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,q as p}from"./chunk-HBTC4L53.js";import"./chunk-6VKJAMZY.js";p();export{i as DotProductAttention,h as FlashAttention,k as HyperbolicAttention,l as LinearAttention,m as MoEAttention,j as MultiHeadAttention,b as RuvectorLayer,n as SonaEngine,c as TensorCompress,a as default,d as differentiableSearch,f as getCompressionLevel,e as hierarchicalForward,g as init,o as pipeline};
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.14.4");process.exit(0)}
2
+ import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,q as p}from"./chunk-5YPYDPBJ.js";import"./chunk-TT23RRB7.js";p();export{i as DotProductAttention,h as FlashAttention,k as HyperbolicAttention,l as LinearAttention,m as MoEAttention,j as MultiHeadAttention,b as RuvectorLayer,n as SonaEngine,c as TensorCompress,a as default,d as differentiableSearch,f as getCompressionLevel,e as hierarchicalForward,g as init,o as pipeline};
@@ -0,0 +1,90 @@
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.14.4");process.exit(0)}
2
+ import{a as L,b as K,c as z,d as x,e as oe,f as J,g as G,h as N,i as Re,j as ae,k as Q,l as Se,m as U,n as ie,o as xe,p as P,q as X,r as Y,s as Z,t as ee}from"./chunk-UGVHCMUN.js";import{h as ve}from"./chunk-DEYLEDJN.js";import{b as we}from"./chunk-TPGED2IF.js";import"./chunk-55RWDRJD.js";import"./chunk-R4VL6E65.js";import"./chunk-RJCYCLZV.js";import"./chunk-NA7B2QYB.js";import"./chunk-Y3MW3YBC.js";import"./chunk-PEPFCPES.js";import{b as A,d as re}from"./chunk-DHJPWQBR.js";import{a as be,b as he,c as H,d as V,f as Ye}from"./chunk-TDZ53WO2.js";import"./chunk-G6T45OIC.js";import{a as F,b as Xe}from"./chunk-BGE6FOLM.js";import"./chunk-5YPYDPBJ.js";import"./chunk-HDSAM2RE.js";import"./chunk-KCZR45PA.js";import"./chunk-BFP7KO7P.js";import"./chunk-ODKLFVYC.js";import"./chunk-VD6QRULW.js";import"./chunk-KHFNNVJA.js";import"./chunk-CNG6GQEZ.js";import"./chunk-TT23RRB7.js";import D from"path";import o from"chalk";Xe();re();import{existsSync as ne,mkdirSync as Ze,writeFileSync as en,readFileSync as se}from"fs";import{join as k,resolve as le}from"path";var nn={rl_q_values:"includeQValues",dream_insights:"includeDreamInsights",dream_cycles:"includeDreamInsights",witness_chain:"includeWitnessChain",vectors:"includeVectors"};function tn(e,n){let r=nn[e.tableName];return!(r&&n[r]===!1)}var rn=1e4;function on(e,n,r,t){if(!tn(n,r))return ie(k(t,n.fileName),[]),{count:0,rows:[]};let[a,i]=n.domainColumn?U(r.domains,n.domainColumn):[void 0,[]];if(r.domains&&r.domains.length>0&&!n.domainColumn){let s=r.domains.map(()=>"?").join(","),f=`manifest_id IN (SELECT id FROM learning_evidence_manifests WHERE task_family IN (${s}))`;["learning_evidence_segments","learning_segment_edges","learning_evidence_admissions"].includes(n.tableName)?(a=f,i=[...r.domains]):["pattern_manifest_lineage","pattern_segment_lineage"].includes(n.tableName)&&(a=`${f} AND pattern_id IN (SELECT id FROM qe_patterns WHERE qe_domain IN (${s}))`,i=[...r.domains,...r.domains])}if(ae(e,n.tableName,a,i)>=rn){let s=n.blobColumns,f=s&&s.length>0?p=>J(p,s):void 0;return{count:xe(k(t,n.fileName),Se(e,n.tableName,a,i),f)}}let l=Q(e,n.tableName,a,i);return n.blobColumns&&n.blobColumns.length>0&&(l=l.map(s=>J(s,n.blobColumns))),ie(k(t,n.fileName),l),{count:l.length,rows:l}}function Ce(e){let n=[];for(let r of x){let t=k(e,r.fileName);ne(t)?n.push(N(se(t,"utf-8"))):n.push(N(""))}return N(n.join(":"))}function _e(e,n,r="memory.db"){let t=le(n.outputPath);ne(t)||Ze(t,{recursive:!0});let a=0,i={},c=new Set;for(let m of x){let p=on(e,m,n,t);if(i[m.tableName]=p.count,a+=p.count,m.tableName==="qe_patterns"){if(p.rows)for(let g of p.rows)g.qe_domain&&c.add(g.qe_domain);else if(p.count>0){let[g,C]=m.domainColumn?U(n.domains,m.domainColumn):[void 0,[]],v=`SELECT DISTINCT qe_domain FROM qe_patterns ${g?`WHERE ${g} AND qe_domain IS NOT NULL`:"WHERE qe_domain IS NOT NULL"}`;try{let u=e.prepare(v).all(...C||[]);for(let h of u)c.add(h.qe_domain)}catch{}}}}let l=n.includeVectors!==!1?ae(e,"vectors"):0,s=Ce(t),f={version:"3.0",exportedAt:new Date().toISOString(),sourceDb:r,stats:{patternCount:i.qe_patterns||0,vectorCount:l,qValueCount:i.rl_q_values||0,dreamInsightCount:i.dream_insights||0,witnessChainLength:i.witness_chain||0,totalRecords:a},domains:[...c].sort(),checksum:s,tableRecordCounts:i};return en(k(t,"manifest.json"),JSON.stringify(f,null,2),"utf-8"),f}var an=new Set(["qe_patterns","rl_q_values","dream_insights","witness_chain"]);function sn(e){return e==="1.0"?x.filter(n=>an.has(n.tableName)):e==="3.0"?x:(console.warn(`[brain-import] Unknown manifest version '${e}'. Attempting full import \u2014 some files may be missing.`),x)}function Ee(e,n,r){let t=le(n),a=k(t,"manifest.json");if(!ne(a))throw new Error(`Manifest not found at ${a}`);let i=A(se(a,"utf-8")),c=Ce(t);if(c!==i.checksum)throw new Error(`Checksum mismatch: expected ${i.checksum}, got ${c}. The export may have been tampered with or corrupted.`);let l=sn(i.version),s=0,f=0,m=0,p=()=>{let g=new Map,C=new Map;for(let d of l){let v=k(t,d.fileName),u=P(v,A);d.blobColumns&&d.blobColumns.length>0&&(u=u.map(h=>G(h,d.blobColumns)));for(let h of u){let R=X(h,g),E;if(d.dedupColumns&&d.dedupColumns.length>0)E=Z(e,d.tableName,R,d.dedupColumns,d.preserveId);else{let $=L[d.tableName]||"id",B=z[d.tableName],O=K[d.tableName];E=Y(e,d.tableName,R,$,r.mergeStrategy,B,O,g,C,h.pattern_id)}s+=E.imported,f+=E.skipped,m+=E.conflicts}}};return ee(e,r.dryRun??!1,p),{imported:s,skipped:f,conflicts:m}}function Be(e){let n=le(e),r=k(n,"manifest.json");if(!ne(r))throw new Error(`Manifest not found at ${r}`);return A(se(r,"utf-8"))}Ye();import{existsSync as j,readdirSync as ln,renameSync as cn,statSync as dn,unlinkSync as ce,writeFileSync as fn}from"fs";import{basename as mn,dirname as un,join as pn,resolve as te}from"path";var Oe=["",".idmap.json",".manifest.json"],gn=[...Oe,".lock"];function Ie(e){for(let n of gn)try{let r=`${e}${n}`;j(r)&&ce(r)}catch{}}function yn(e){let n=un(e),r=`${mn(e)}.tmp.`,t;try{t=ln(n)}catch{return}for(let a of t){if(!a.startsWith(r))continue;let i=Number.parseInt(a.slice(r.length).split(".")[0],10);if(!(!Number.isInteger(i)||i<=0)&&!(i!==process.pid&&bn(i)))try{ce(pn(n,a))}catch{}}}function bn(e){try{return process.kill(e,0),!0}catch(n){return n.code==="EPERM"}}function Ae(e,n,r="memory.db"){if(!V())throw new Error("@ruvector/rvf-node is not available. Install it or use --format jsonl instead.");let t=te(n.outputPath),a=n.dimension??384,i=`${t}.tmp.${process.pid}`;yn(t),Ie(i);let c=be(i,a),l=!1;try{let s={},f=new Set,m=0;for(let y of x){let[S,w]=y.domainColumn?U(n.domains,y.domainColumn):[void 0,[]],_=Q(e,y.tableName,S,w);if(n.domains&&n.domains.length>0){let b=new Set((s.learning_evidence_manifests??[]).map(I=>I.id)),q=new Set((s.qe_patterns??[]).map(I=>I.id));["learning_evidence_segments","learning_segment_edges","learning_evidence_admissions"].includes(y.tableName)?_=_.filter(I=>b.has(I.manifest_id)):y.tableName==="pattern_manifest_lineage"?_=_.filter(I=>{let T=I;return b.has(T.manifest_id)&&q.has(T.pattern_id)}):y.tableName==="pattern_segment_lineage"&&(_=_.filter(I=>{let T=I;return b.has(T.manifest_id)&&q.has(T.pattern_id)}))}if(y.tableName==="qe_patterns")for(let b of _)b.qe_domain&&f.add(b.qe_domain);let M=oe[y.tableName];M&&M.length>0&&(_=_.map(b=>J(b,M))),s[y.tableName]=_,m+=_.length}let p=0,g=[];if(Re(e,"qe_pattern_embeddings")){let y=e.prepare("PRAGMA table_info('qe_pattern_embeddings')").all().some(w=>w.name==="space_id"),S=e.prepare(`SELECT pattern_id, embedding, dimension, ${y?"space_id":"NULL"} AS space_id
3
+ FROM qe_pattern_embeddings`).all();for(let w of S)w.embedding&&w.dimension===a&&w.space_id&&g.push({id:`pe:${w.pattern_id}`,vector:new Float32Array(w.embedding.buffer,w.embedding.byteOffset,a),metadata:{tableName:"qe_pattern_embeddings",spaceId:w.space_id}})}g.length>0&&(p=c.ingest(g).accepted);let C={version:"3.0",format:"rvf",exportedAt:new Date().toISOString(),sourceDb:r,domains:[...f].sort(),tables:s},d=JSON.stringify(C),v=N(d),u=Buffer.from(d);c.embedKernel(u);let h=n.sign?c.sign(u)??void 0:void 0,R=h?n.signerKeyId??"default":void 0,E=c.fileId(),$=E?{fileId:E,parentId:c.parentId(),lineageDepth:c.lineageDepth()}:void 0,B=c.status(),O={version:"3.0",format:"rvf",exportedAt:C.exportedAt,sourceDb:r,stats:{patternCount:(s.qe_patterns||[]).length,embeddingCount:p,qValueCount:(s.rl_q_values||[]).length,dreamInsightCount:(s.dream_insights||[]).length,witnessChainLength:(s.witness_chain||[]).length,totalRecords:m,tableCounts:Object.fromEntries(x.map(({tableName:y})=>[y,s[y]?.length??0]))},domains:C.domains,checksum:v,rvfStatus:{totalVectors:B.totalVectors,totalSegments:B.totalSegments,fileSizeBytes:B.fileSizeBytes},...h?{signature:h,signerKeyId:R}:{},...$?{lineage:$}:{}};if(h)try{c.freeze()}catch{}if(fn(`${i}.manifest.json`,JSON.stringify(O,null,2),"utf-8"),c.close(),l=!0,j(t)&&!n.allowOverwriteRicher){let y;try{y=W(t)}catch(S){if(hn(t)||!wn(S)){let w=S instanceof Error?S.message:String(S);throw new Error(`RVF_MIRROR_INSPECTION_AMBIGUOUS: the existing mirror is readable but its richness could not be established (${w}). Preserve/import it before retrying, or repeat with --force-overwrite-richer after preserving a backup.`)}}if(y){let S=y.stats.tableCounts,w=O.stats.tableCounts,_=x.map(({tableName:b})=>b).filter(b=>!S||!Number.isSafeInteger(S[b]));if(_.length>0)throw new Error(`RVF_MIRROR_INSPECTION_AMBIGUOUS: existing mirror lacks trustworthy counts for ${_.join(", ")}. Preserve/import it before retrying, or repeat with --force-overwrite-richer after preserving a backup.`);let M=x.map(({tableName:b})=>({tableName:b,existing:S[b],candidate:w[b]})).filter(({existing:b,candidate:q})=>b>q);if(M.length>0){let b=M.map(({tableName:q,existing:I,candidate:T})=>`${q} ${I} -> ${T}`).join(", ");throw new Error(`RVF_MIRROR_RICHER: refusing to replace richer mirrored tables: ${b}. Restore/import the mirror first, or repeat with --force-overwrite-richer after preserving a backup.`)}}}for(let y of[...Oe].reverse()){let S=`${i}${y}`,w=`${t}${y}`;j(S)?cn(S,w):j(w)&&ce(w)}return O}catch(s){if(!l)try{c.close()}catch{}throw Ie(i),s}}function hn(e){let n;try{return n=H(te(e)),!!n.extractKernel()?.image}catch{return!1}finally{try{n?.close()}catch{}}}function wn(e){let n=e instanceof Error?e.message:String(e);return/ManifestNotFound|InvalidMagic|ChecksumMismatch|CorruptStore/i.test(n)}var vn={patterns:"qe_patterns",qValues:"rl_q_values",dreamInsights:"dream_insights",witnessChain:"witness_chain"};function Ne(e,n,r){if(!V())throw new Error("@ruvector/rvf-node is not available. Install it or use JSONL format.");let t=te(n);if(!j(t))throw new Error(`RVF file not found: ${t}`);let a=r.dryRun?H(t):he(t);try{let i=a.verifyWitness();if(!i.valid&&(i.totalEntries>0||i.errors.length>0)){let d=i.errors.length>0?i.errors.join("; "):"unknown integrity error";throw new Error(`RVF witness verification failed: ${d}`)}let c=a.extractKernel();if(!c||!c.image)throw new Error("No brain data found in RVF file (missing kernel segment)");let l;try{l=JSON.parse(c.image.toString("utf-8"))}catch(d){throw new Error(`Failed to parse brain kernel data as JSON: ${d instanceof Error?d.message:d}`)}let s=0,f=0,m=0,p=0,g={};if(l.tables)Object.assign(g,l.tables);else for(let[d,v]of Object.entries(vn)){let u=l[d];Array.isArray(u)&&(g[v]=u)}let C=()=>{let d=new Map,v=new Map;for(let u of x){let h=g[u.tableName];if(!h||!Array.isArray(h))continue;let R=oe[u.tableName];R&&R.length>0&&(h=h.map(E=>G(E,R)));for(let E of h){let $=X(E,d),B;if(u.dedupColumns&&u.dedupColumns.length>0)B=Z(e,u.tableName,$,u.dedupColumns,u.preserveId);else{let O=L[u.tableName]||"id",y=z[u.tableName],S=K[u.tableName];B=Y(e,u.tableName,$,O,r.mergeStrategy,y,S,d,v,E.pattern_id)}if(B.imported)for(let O of R??[])$[O]instanceof Buffer&&p++;s+=B.imported,f+=B.skipped,m+=B.conflicts}}};if(ee(e,r.dryRun??!1,C),!r.dryRun&&m>0)try{a.compact()}catch{}return{imported:s,skipped:f,conflicts:m,embeddingsRestored:p}}finally{a.close()}}function W(e){if(!V())throw new Error("@ruvector/rvf-node is not available.");let n=te(e);if(!j(n))throw new Error(`RVF file not found: ${n}`);let r=H(n);try{let t=r.extractKernel();if(!t||!t.image)throw new Error("No brain data found in RVF file");let a=t.image.toString("utf-8"),i;try{i=JSON.parse(a)}catch(d){throw new Error(`Failed to parse brain kernel data as JSON: ${d instanceof Error?d.message:d}`)}let c=r.status(),l=dn(n).size,s=i.tables,f=s?s.qe_patterns?.length??0:i.patterns?.length??0,m=s?s.rl_q_values?.length??0:i.qValues?.length??0,p=s?s.dream_insights?.length??0:i.dreamInsights?.length??0,g=s?s.witness_chain?.length??0:i.witnessChain?.length??0,C=s&&typeof s=="object"&&!Array.isArray(s)?Object.fromEntries(Object.entries(s).filter(d=>Array.isArray(d[1])).map(([d,v])=>[d,v.length])):void 0;return{version:"3.0",format:"rvf",exportedAt:i.exportedAt??"unknown",sourceDb:i.sourceDb??"unknown",stats:{patternCount:f,embeddingCount:c.totalVectors,qValueCount:m,dreamInsightCount:p,witnessChainLength:g,...C?{tableCounts:C}:{}},domains:i.domains??[],checksum:N(a),rvfStatus:{totalVectors:c.totalVectors,totalSegments:c.totalSegments,fileSizeBytes:l}}}finally{r.close()}}function de(){return V()}re();import{existsSync as me,readFileSync as Rn,statSync as Sn}from"fs";import{join as fe,resolve as $e}from"path";function Me(e,n,r={}){let t=$e(e),a=$e(n),i=ke(t),c=ke(a),l=De(t,i),s=De(a,c),f=i==="jsonl"&&c==="jsonl",m=_n({pathA:t,pathB:a,manifestA:l,manifestB:s,recordLevel:f,tableFilter:r.tableFilter,maxIdsPerBucket:r.maxIdsPerBucket??500}),p=new Set(l.domains),g=new Set(s.domains),C=l.domains.filter(R=>!g.has(R)),d=s.domains.filter(R=>!p.has(R)),v=l.checksum===s.checksum,u=l.version===s.version,h=v&&u&&m.every(R=>R.delta===0&&(R.added?.length??0)===0&&(R.removed?.length??0)===0&&(R.changed?.length??0)===0);return{pathA:t,pathB:a,formatA:i,formatB:c,manifestA:l,manifestB:s,checksumMatch:v,versionMatch:u,identical:h,recordLevel:f,tableDiffs:m,domainsOnlyInA:C,domainsOnlyInB:d}}function ke(e){if(!me(e))throw new Error(`Path not found: ${e}`);if(e.endsWith(".rvf"))return"rvf";if(Sn(e).isFile())throw new Error(`Unsupported brain export: ${e} (expected a .rvf file or a JSONL directory)`);return"jsonl"}function De(e,n){return n==="rvf"?Cn(e):xn(e)}function xn(e){let n=fe(e,"manifest.json");if(!me(n))throw new Error(`Manifest not found at ${n}`);let r=A(Rn(n,"utf-8"));return qe(r,"jsonl")}function Cn(e){let n=W(e);return qe(n,"rvf")}function qe(e,n){return{format:n,version:e.version??"unknown",exportedAt:e.exportedAt??"unknown",sourceDb:e.sourceDb??"unknown",checksum:e.checksum??"",totalRecords:e.stats?.totalRecords??0,domains:e.domains??[],tableRecordCounts:e.tableRecordCounts??{}}}function _n(e){let n=e.tableFilter?x.filter(t=>t.tableName===e.tableFilter):x;if(e.tableFilter&&n.length===0)throw new Error(`Unknown table: ${e.tableFilter}`);let r=[];for(let t of n){let a=e.manifestA.tableRecordCounts[t.tableName]??0,i=e.manifestB.tableRecordCounts[t.tableName]??0,c=i-a,l,s,f;if(e.recordLevel&&En(t)){let m=Bn(fe(e.pathA,t.fileName),fe(e.pathB,t.fileName),t,e.maxIdsPerBucket);l=m.added,s=m.removed,f=m.changed}r.push({tableName:t.tableName,countA:a,countB:i,delta:c,...l!==void 0?{added:l}:{},...s!==void 0?{removed:s}:{},...f!==void 0?{changed:f}:{}})}return r}function En(e){return!0}function Bn(e,n,r,t){let a=Te(e,r),i=Te(n,r),c=[],l=[],s=[];for(let[f,m]of a){let p=i.get(f);if(p===void 0)l.length<t&&l.push(f);else if(p!==m){if(r.dedupColumns&&r.dedupColumns.length>0)continue;s.length<t&&s.push(f)}}for(let f of i.keys())a.has(f)||c.length<t&&c.push(f);return c.sort(),l.sort(),s.sort(),{added:c,removed:l,changed:s}}function Te(e,n){let r=new Map;if(!me(e))return r;let t=P(e,A);for(let a of t){let i=In(a,n);if(i===void 0)continue;let c=On(a);r.set(i,An(c))}return r}function In(e,n){if(n.dedupColumns&&n.dedupColumns.length>0){let a=[];for(let i of n.dedupColumns){let c=e[i];if(c==null)return;a.push(String(c))}return a.join("")}let r=L[n.tableName]??"id",t=e[r];if(t!=null)return String(t)}function On(e){let n=Object.keys(e).sort(),r={};for(let t of n)r[t]=e[t];return JSON.stringify(r)}function An(e){return N(e)}re();import{existsSync as ue,statSync as Nn}from"fs";import{join as Fe,resolve as $n}from"path";var kn=20,Dn="qe_patterns";function Le(e,n={}){let r=$n(e);qn(r);let t=n.table??Dn,a=x.find(u=>u.tableName===t);if(!a)throw new Error(`Unknown table: ${t}`);let i=Fe(r,a.fileName);if(!ue(i))throw new Error(`Table file not found: ${a.fileName} (expected in ${r}). Was this export generated with --format jsonl?`);let c=P(i,A),l=a.domainColumn,s=Math.max(1,n.limit??kn),f=n.query?n.query.toLowerCase():void 0,m=n.domains&&n.domains.length>0?new Set(n.domains):void 0,p=n.since,g=n.until,C=n.patternType,d=0,v=[];for(let u of c)Tn(u,{domainColumn:l,domains:m,patternType:C,since:p,until:g,queryLower:f})&&(d++,v.length<s&&v.push(Mn(u,a.tableName,l)));return{table:t,inputPath:r,totalScanned:c.length,totalMatched:d,limit:s,hits:v,truncated:d>s}}function Tn(e,n){if(n.domains){if(!n.domainColumn)return!1;let r=e[n.domainColumn];if(typeof r!="string"||!n.domains.has(r))return!1}if(n.patternType!==void 0&&e.pattern_type!==n.patternType)return!1;if(n.since!==void 0||n.until!==void 0){let r=Pe(e);if(r===void 0||n.since!==void 0&&r<n.since||n.until!==void 0&&r>n.until)return!1}if(n.queryLower!==void 0){let r=typeof e.name=="string"?e.name.toLowerCase():"",t=typeof e.description=="string"?e.description.toLowerCase():"";if(!r.includes(n.queryLower)&&!t.includes(n.queryLower))return!1}return!0}function Pe(e){for(let n of["updated_at","created_at","timestamp"]){let r=e[n];if(typeof r=="string"&&r.length>0)return r}}function Mn(e,n,r){let t=(typeof e.id=="string"||typeof e.id=="number"?String(e.id):void 0)??`${n}:?`,a={name:typeof e.name=="string"?e.name:void 0,description:typeof e.description=="string"?e.description:void 0,domain:r&&typeof e[r]=="string"?e[r]:void 0,patternType:typeof e.pattern_type=="string"?e.pattern_type:void 0,confidence:typeof e.confidence=="number"?e.confidence:void 0,updatedAt:Pe(e)};return{id:t,display:a,row:e}}function qn(e){if(!ue(e))throw new Error(`Path not found: ${e}`);if(Nn(e).isFile())throw e.endsWith(".rvf")?new Error("Brain search does not support RVF exports. Re-export with --format jsonl, or use `aqe brain info` for RVF summaries."):new Error(`Unsupported brain export: ${e} (expected a JSONL directory)`);let r=Fe(e,"manifest.json");if(!ue(r))throw new Error(`Manifest not found at ${r}. Is this a brain export directory?`)}function je(e,n){if(!e.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='qe_patterns'").get())return{created:0,skipped:0};e.exec(`
4
+ CREATE TEMP TABLE IF NOT EXISTS _covered_patterns (
5
+ pattern_id TEXT PRIMARY KEY
6
+ )
7
+ `),e.exec("DELETE FROM _covered_patterns"),e.exec(`
8
+ INSERT INTO _covered_patterns (pattern_id)
9
+ SELECT DISTINCT json_extract(action_data, '$.patternId')
10
+ FROM witness_chain
11
+ WHERE action_type = 'PATTERN_CREATE'
12
+ AND json_extract(action_data, '$.patternId') IS NOT NULL
13
+ `),e.exec(`
14
+ INSERT OR IGNORE INTO _covered_patterns (pattern_id)
15
+ SELECT DISTINCT json_extract(action_data, '$.pattern_id')
16
+ FROM witness_chain
17
+ WHERE action_type = 'PATTERN_CREATE'
18
+ AND json_extract(action_data, '$.pattern_id') IS NOT NULL
19
+ `);let t=e.prepare(`SELECT p.id, p.pattern_type, p.qe_domain, p.name, p.created_at
20
+ FROM qe_patterns p
21
+ LEFT JOIN _covered_patterns c ON p.id = c.pattern_id
22
+ WHERE c.pattern_id IS NULL
23
+ ORDER BY p.created_at ASC`).all(),i=e.prepare("SELECT COUNT(*) as count FROM qe_patterns").get().count-t.length,c=0;for(let l of t)n.append("PATTERN_CREATE",{patternId:l.id,patternType:l.pattern_type,qeDomain:l.qe_domain,name:l.name,originalCreatedAt:l.created_at,backfilled:!0},"system:backfill"),c++;return e.exec("DROP TABLE IF EXISTS _covered_patterns"),{created:c,skipped:i}}async function Ve(e,n){if(Fn(n.format)==="rvf"){let a=F(e,{readonly:!0});try{return Ae(a,{outputPath:n.outputPath,domains:n.domains,allowOverwriteRicher:n.allowOverwriteRicher},e)}finally{a.close()}}let t=F(e,{readonly:!0});try{return _e(t,n,e)}finally{t.close()}}async function Je(e,n,r){if(ze(n,r.format)==="rvf"){let i=F(e);try{return Ne(i,n,{mergeStrategy:r.mergeStrategy,dryRun:r.dryRun})}finally{i.close()}}let a=F(e);try{return Ee(a,n,r)}finally{a.close()}}async function Ue(e,n){return ze(e,n)==="rvf"?W(e):Be(e)}async function We(e,n,r={}){return Me(e,n,r)}async function He(e,n={}){return Le(e,n)}async function Ke(e){let n=F(e);try{let r=ve(n,we());return await r.initialize(),je(n,r)}finally{n.close()}}function Fn(e){if(e==="jsonl")return"jsonl";if(e==="rvf"){if(!de())throw new Error("RVF format requested but @ruvector/rvf-node is not available on this platform. Use --format jsonl instead.");return"rvf"}return de()?"rvf":"jsonl"}function ze(e,n){return n==="rvf"?"rvf":n==="jsonl"?"jsonl":e.endsWith(".rvf")?"rvf":"jsonl"}var ye=class{name="brain";description="Export, import, and inspect QE brain state";cleanupAndExit;ensureInitialized;constructor(n,r){this.cleanupAndExit=n,this.ensureInitialized=r}register(n,r){let t=n.command("brain").description(this.description);t.command("export").description("Export brain state to a portable directory").requiredOption("-o, --output <path>","Output directory path").option("--format <format>","Export format: rvf (default) or jsonl","rvf").option("--db <path>","Source database path").option("--force-overwrite-richer","Allow replacing an existing RVF with fewer patterns",!1).action(async a=>{await this.executeExport(a)}),t.command("import").description("Import brain state from an export directory").requiredOption("-i, --input <path>","Path to brain export directory").option("--strategy <strategy>","Merge strategy","skip-conflicts").option("--dry-run","Preview import without writing",!1).option("--db <path>","Target database path").action(async a=>{await this.executeImport(a)}),t.command("info").description("Show manifest info for a brain export").requiredOption("-i, --input <path>","Path to brain export directory").action(async a=>{await this.executeInfo(a)}),t.command("witness-backfill").description("Create witness chain entries for patterns that predate the witness chain").option("--db <path>","Database path").action(async a=>{await this.executeWitnessBackfill(a)}),t.command("diff").description("Compare two brain exports (JSONL directory or .rvf file)").argument("<a>","Path to first brain export").argument("<b>","Path to second brain export").option("--table <name>","Restrict comparison to a single table").option("--verbose","Show the IDs of added/removed/changed records",!1).option("--json","Emit the diff as JSON to stdout",!1).action(async(a,i,c)=>{await this.executeDiff(a,i,c)}),t.command("search").description("Search a JSONL brain export with filters").requiredOption("-i, --input <path>","Path to brain export directory (JSONL)").option("--table <name>","Table to search (default: qe_patterns)").option("--domain <name...>","Restrict to one or more domains").option("--pattern-type <type>","Restrict to a specific pattern_type (qe_patterns only)").option("--since <iso>","Include rows with timestamp \u2265 <iso>").option("--until <iso>","Include rows with timestamp \u2264 <iso>").option("-q, --query <text>","Substring match across name + description (case-insensitive)").option("-l, --limit <n>","Maximum results to return","20").option("--json","Emit results as JSON to stdout",!1).action(async a=>{await this.executeSearch(a)})}async executeExport(n){try{console.log(o.blue(`
24
+ Exporting brain state (format: ${n.format})...
25
+ `));let r=await pe(n.db),t=await Ve(r,{outputPath:D.resolve(n.output),format:n.format,allowOverwriteRicher:n.forceOverwriteRicher});if(console.log(o.green(" Export complete.")),console.log(` Format: ${o.cyan("format"in t?t.format??"jsonl":"jsonl")}`),console.log(` Patterns: ${o.cyan(t.stats.patternCount)}`),"embeddingCount"in t.stats?console.log(` Vectors: ${o.cyan(t.stats.embeddingCount)}`):"vectorCount"in t.stats&&console.log(` Vectors: ${o.cyan(t.stats.vectorCount)}`),"rvfStatus"in t){let a=t.rvfStatus;console.log(` RVF Size: ${o.cyan(Ge(a.fileSizeBytes))}`),console.log(` Segments: ${o.cyan(a.totalSegments)}`)}console.log(` Checksum: ${o.gray(t.checksum)}`),console.log(` Output: ${o.cyan(D.resolve(n.output))}`),console.log(""),await this.cleanupAndExit(0)}catch(r){console.error(o.red(`
26
+ Brain export failed:`),r),await this.cleanupAndExit(1)}}async executeImport(n){try{n.dryRun?console.log(o.yellow(`
27
+ Dry-run mode \u2014 no data will be written.
28
+ `)):console.log(o.blue(`
29
+ Importing brain state...
30
+ `));let r=await pe(n.db),t=await Je(r,D.resolve(n.input),{mergeStrategy:n.strategy,dryRun:n.dryRun});console.log(o.green(" Import complete.")),console.log(` Imported: ${o.cyan(t.imported)}`),console.log(` Skipped: ${o.yellow(t.skipped)}`),console.log(` Conflicts: ${o.red(t.conflicts)}`),"embeddingsRestored"in t&&console.log(` Embeddings: ${o.cyan(t.embeddingsRestored)}`),console.log(""),await this.cleanupAndExit(0)}catch(r){console.error(o.red(`
31
+ Brain import failed:`),r),await this.cleanupAndExit(1)}}async executeInfo(n){try{console.log(o.blue(`
32
+ Brain Export Info
33
+ `));let r=D.resolve(n.input),t=await Ue(r),a="format"in t?t.format??"jsonl":"jsonl";if(console.log(` Version: ${o.cyan(t.version)}`),console.log(` Format: ${o.cyan(a)}`),console.log(` Exported: ${o.cyan(t.exportedAt)}`),console.log(` Source DB: ${o.cyan(t.sourceDb)}`),console.log(o.blue(`
34
+ Learning Data:`)),console.log(` Patterns: ${o.cyan(t.stats.patternCount)}`),"qValueCount"in t.stats&&console.log(` Q-Values: ${o.cyan(t.stats.qValueCount)}`),"dreamInsightCount"in t.stats){let l=t.stats.dreamInsightCount,f=("tableRecordCounts"in t?t.tableRecordCounts:void 0)?.dream_cycles,m=f!==void 0?` (${f} cycles)`:"";console.log(` Dream Insights: ${o.cyan(l)}${o.gray(m)}`)}"witnessChainLength"in t.stats&&console.log(` Witness Chain: ${o.cyan(t.stats.witnessChainLength)} entries`),"embeddingCount"in t.stats?console.log(` Embeddings: ${o.cyan(t.stats.embeddingCount)}`):"vectorCount"in t.stats&&console.log(` Vectors: ${o.cyan(t.stats.vectorCount)}`);let i="tableRecordCounts"in t?t.tableRecordCounts:void 0;if(i){let l=Object.entries(i).filter(([s,f])=>f>0&&!["qe_patterns","rl_q_values","dream_insights","dream_cycles","witness_chain","vectors","qe_pattern_embeddings"].includes(s));if(l.length>0)for(let[s,f]of l){let p=`${s.replace(/_/g," ").replace(/\b\w/g,g=>g.toUpperCase())}:`.padEnd(15);console.log(` ${p}${o.cyan(f)}`)}}let c="totalRecords"in t.stats?t.stats.totalRecords:void 0;if(c!==void 0&&(console.log(o.blue(`
35
+ Summary:`)),console.log(` Total Records: ${o.cyan(c)}`)),"domains"in t&&Array.isArray(t.domains)&&t.domains.length>0&&(c||console.log(o.blue(`
36
+ Summary:`)),console.log(` Domains: ${o.cyan(t.domains.join(", "))}`)),"rvfStatus"in t){let l=t.rvfStatus;console.log(o.blue(`
37
+ RVF Details:`)),console.log(` File Size: ${o.cyan(Ge(l.fileSizeBytes))}`),console.log(` Vectors: ${o.cyan(l.totalVectors)}`),console.log(` Segments: ${o.cyan(l.totalSegments)}`)}if("lineage"in t){let l=t.lineage;l&&(console.log(o.blue(`
38
+ Lineage:`)),console.log(` File ID: ${o.cyan(l.fileId)}`),console.log(` Parent ID: ${o.cyan(l.parentId??"none (root)")}`),console.log(` Depth: ${o.cyan(l.lineageDepth)}`))}if("signature"in t){let l=t.signature,s=t.signerKeyId;console.log(o.blue(`
39
+ Signature:`)),l?(console.log(` Status: ${o.green("Signed")}`),console.log(` Key ID: ${o.cyan(s??"unknown")}`),console.log(` Signature: ${o.gray(l.slice(0,32)+"...")}`)):console.log(` Status: ${o.yellow("Unsigned")}`)}console.log(`
40
+ Checksum: ${o.gray(t.checksum)}`),console.log(""),await this.cleanupAndExit(0)}catch(r){console.error(o.red(`
41
+ Failed to read brain info:`),r),await this.cleanupAndExit(1)}}async executeDiff(n,r,t){try{let a=await We(D.resolve(n),D.resolve(r),{tableFilter:t.table});if(t.json){process.stdout.write(JSON.stringify(a,null,2)+`
42
+ `),await this.cleanupAndExit(a.identical?0:1);return}jn(a,t.verbose),await this.cleanupAndExit(a.identical?0:1)}catch(a){console.error(o.red(`
43
+ Brain diff failed:`),a),await this.cleanupAndExit(2)}}async executeSearch(n){try{let r=Ln(n.limit),t=Pn(n.domain),a=await He(D.resolve(n.input),{table:n.table,domains:t,patternType:n.patternType,since:n.since,until:n.until,query:n.query,limit:r});if(n.json){process.stdout.write(JSON.stringify(a,null,2)+`
44
+ `),await this.cleanupAndExit(a.totalMatched>0?0:3);return}Un(a),await this.cleanupAndExit(a.totalMatched>0?0:3)}catch(r){console.error(o.red(`
45
+ Brain search failed:`),r),await this.cleanupAndExit(2)}}async executeWitnessBackfill(n){try{console.log(o.blue(`
46
+ Running witness chain backfill...
47
+ `));let r=await pe(n.db),t=await Ke(r);console.log(o.green(" Backfill complete.")),console.log(` Created: ${o.cyan(t.created)} new witness entries`),console.log(` Skipped: ${o.cyan(t.skipped)} (already witnessed)`),console.log(""),await this.cleanupAndExit(0)}catch(r){console.error(o.red(`
48
+ Witness backfill failed:`),r),await this.cleanupAndExit(1)}}getHelp(){return`
49
+ Export, import, and inspect QE brain state.
50
+
51
+ Formats:
52
+ rvf \u2014 Single portable .rvf file (default, requires @ruvector/rvf-node)
53
+ jsonl \u2014 JSONL directory format (fallback when native not available)
54
+
55
+ Usage:
56
+ aqe brain export -o brain.rvf [--format rvf] [--db <path>]
57
+ aqe brain export -o ./brain-dir --format jsonl [--db <path>]
58
+ aqe brain import -i brain.rvf [--strategy skip-conflicts] [--dry-run] [--db <path>]
59
+ aqe brain info -i brain.rvf
60
+
61
+ Subcommands:
62
+ export Export brain state to a portable .rvf file or JSONL directory
63
+ import Import a brain export into the local database
64
+ info Show manifest metadata for an existing brain export
65
+ diff Compare two brain exports (manifest always; record-level for JSONL)
66
+ search Filtered search over a JSONL brain export
67
+
68
+ Examples:
69
+ aqe brain export -o .agentic-qe/brain.rvf
70
+ aqe brain export -o .agentic-qe/brain.rvf --format rvf
71
+ aqe brain export -o ./brain-export --format jsonl
72
+ aqe brain import -i .agentic-qe/brain.rvf --strategy latest-wins
73
+ aqe brain import -i .agentic-qe/brain.rvf --dry-run
74
+ aqe brain info -i .agentic-qe/brain.rvf
75
+ aqe brain diff ./brain-a ./brain-b --verbose
76
+ aqe brain search -i ./brain-export --query oauth --domain test-generation
77
+ aqe brain search -i ./brain-export --since 2026-03-01 --limit 50 --json
78
+ `}};async function pe(e){if(e)return e;let{findProjectRoot:n}=await import("./unified-memory-CXHLHB5I.js");return D.join(n(),".agentic-qe","memory.db")}function Ge(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function Ln(e){let n=Number.parseInt(e,10);return!Number.isFinite(n)||n<1?20:n}function Pn(e){if(e===void 0)return;let n=Array.isArray(e)?e:[e],r=[];for(let t of n)for(let a of t.split(",")){let i=a.trim();i&&r.push(i)}return r.length>0?r:void 0}function jn(e,n){console.log(o.blue(`
79
+ Brain Diff
80
+ `)),console.log(` A: ${o.cyan(e.pathA)} (${e.formatA})`),console.log(` B: ${o.cyan(e.pathB)} (${e.formatB})`),console.log(` Versions: ${o.cyan(e.manifestA.version)} \u2192 ${o.cyan(e.manifestB.version)}`+(e.versionMatch?o.gray(" (match)"):o.yellow(" (differ)"))),console.log(` Checksums: ${o.gray(e.manifestA.checksum.slice(0,12))}\u2026 \u2192 ${o.gray(e.manifestB.checksum.slice(0,12))}\u2026`+(e.checksumMatch?o.gray(" (match)"):o.yellow(" (differ)"))),console.log(` Exported: ${o.gray(e.manifestA.exportedAt)} \u2192 ${o.gray(e.manifestB.exportedAt)}`),console.log(` Records: ${o.cyan(e.manifestA.totalRecords)} \u2192 ${o.cyan(e.manifestB.totalRecords)} `+Qe(e.manifestB.totalRecords-e.manifestA.totalRecords)),(e.domainsOnlyInA.length>0||e.domainsOnlyInB.length>0)&&(console.log(o.blue(`
81
+ Domains:`)),e.domainsOnlyInA.length>0&&console.log(` Only in A: ${o.yellow(e.domainsOnlyInA.join(", "))}`),e.domainsOnlyInB.length>0&&console.log(` Only in B: ${o.yellow(e.domainsOnlyInB.join(", "))}`)),e.recordLevel||console.log(o.gray(`
82
+ Note: record-level diff is only available when both sides are JSONL exports.
83
+ Per-table counts shown below; re-export with --format jsonl for added/removed/changed IDs.`)),console.log(o.blue(`
84
+ Tables:`));let r=e.tableDiffs.filter(Vn);if(r.length===0)console.log(o.gray(" (no differences)"));else for(let t of r)console.log(` ${t.tableName.padEnd(28)} ${o.cyan(String(t.countA).padStart(7))} \u2192 ${o.cyan(String(t.countB).padStart(7))} ${Qe(t.delta)}`+Jn(t,n)),n&&(t.added&&t.added.length>0&&ge("added",t.added),t.removed&&t.removed.length>0&&ge("removed",t.removed),t.changed&&t.changed.length>0&&ge("changed",t.changed));console.log(""),e.identical?console.log(o.green(` Result: identical
85
+ `)):console.log(o.yellow(` Result: differences found
86
+ `))}function Vn(e){return!!(e.delta!==0||e.added&&e.added.length>0||e.removed&&e.removed.length>0||e.changed&&e.changed.length>0)}function Qe(e){return e===0?o.gray("(\xB10)"):e>0?o.green(`(+${e})`):o.red(`(${e})`)}function Jn(e,n){let r=[];return e.added&&e.added.length>0&&r.push(o.green(`+${e.added.length}`)),e.removed&&e.removed.length>0&&r.push(o.red(`-${e.removed.length}`)),e.changed&&e.changed.length>0&&r.push(o.yellow(`~${e.changed.length}`)),r.length===0?"":n?" "+r.join(" "):" "+o.gray("[")+r.join(" ")+o.gray("]")}function ge(e,n){let r=n.slice(0,10).join(", "),t=n.length>10?o.gray(` \u2026(+${n.length-10} more)`):"";console.log(` ${o.gray(e+":")} ${r}${t}`)}function Un(e){if(console.log(o.blue(`
87
+ Brain Search
88
+ `)),console.log(` Input: ${o.cyan(e.inputPath)}`),console.log(` Table: ${o.cyan(e.table)}`),console.log(` Scanned: ${o.cyan(e.totalScanned)} Matched: ${o.cyan(e.totalMatched)} Shown: ${o.cyan(e.hits.length)}`+(e.truncated?o.yellow(` (truncated to limit ${e.limit})`):"")),e.hits.length===0){console.log(o.yellow(`
89
+ No matching rows.
90
+ `));return}console.log("");for(let n of e.hits){let r=o.cyan(n.id)+(n.display.patternType?o.gray(` ${n.display.patternType}`):"")+(n.display.domain?o.gray(` [${n.display.domain}]`):"")+(n.display.confidence!==void 0?o.gray(` conf=${n.display.confidence.toFixed(2)}`):"");if(console.log(` ${r}`),n.display.name&&console.log(` ${o.bold(n.display.name)}`),n.display.description){let t=n.display.description.length>200?n.display.description.slice(0,200)+"\u2026":n.display.description;console.log(` ${o.gray(t)}`)}n.display.updatedAt&&console.log(` ${o.gray(n.display.updatedAt)}`),console.log("")}}function _t(e,n){return new ye(e,n)}export{ye as BrainHandler,_t as createBrainHandler};
@@ -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.14.2");process.exit(0)}
2
- import"./chunk-6VKJAMZY.js";var f=class{language;constructor(e="typescript"){this.language=e}enumerate(e,s){let r=[],n=e.split(`
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.14.4");process.exit(0)}
2
+ import"./chunk-TT23RRB7.js";var f=class{language;constructor(e="typescript"){this.language=e}enumerate(e,s){let r=[],n=e.split(`
3
3
  `),l=!1;for(let i=0;i<n.length;i++){let d=n[i],t=d.trim(),c=i+1,u=d.length-d.trimStart().length+1;if(l){t.includes("*/")&&(l=!1);continue}if(t.startsWith("/*")){l=!t.includes("*/");continue}if(t.startsWith("//"))continue;if(/^\s*if\s*\(/.test(d)&&(this.findMatchingElse(n,i)||r.push({file:s,line:c,column:u,language:this.language,construct:"if-without-else",triggerCondition:"when condition is false",currentHandling:"falls through \u2014 no else branch",suggestedGuard:"Add else branch or document why falsy path is safe",severity:"medium"})),/^\s*switch\s*\(/.test(d)){let a=this.extractBlock(n,i);if(a&&!a.includes("default:")&&!a.includes("default :")&&r.push({file:s,line:c,column:u,language:this.language,construct:"switch-no-default",triggerCondition:"when value matches no case",currentHandling:"falls through \u2014 no default case",suggestedGuard:"Add default case with error handling or exhaustive check",severity:"high"}),a){let g=a.match(/case\s+[^:]+:/g)||[],h=a.match(/\b(break|return|throw|continue)\b/g)||[];g.length>0&&h.length<g.length&&r.push({file:s,line:c,column:u,language:this.language,construct:"switch-missing-break",triggerCondition:"when case falls through to next case",currentHandling:"fall-through \u2014 may execute unintended cases",suggestedGuard:"Add break/return to each case or add explicit // falls through comment",severity:"medium"})}}if(/\bcatch\s*\(/.test(t)||/\bcatch\s*\{/.test(t)){let a=this.extractBlock(n,i);if(a!==null){let g=a.replace(/[{}]/g,"").trim();(g.length===0||/^\s*\/\//.test(g))&&r.push({file:s,line:c,column:u,language:this.language,construct:"try-empty-catch",triggerCondition:"when exception is thrown",currentHandling:"exception silently swallowed",suggestedGuard:"Log the error or rethrow with context",severity:"high"})}}if(/\btry\s*\{/.test(t)&&this.extractBlock(n,i)&&(n.slice(i,Math.min(i+30,n.length)).join(`
4
4
  `).includes("finally")||r.push({file:s,line:c,column:u,language:this.language,construct:"try-no-finally",triggerCondition:"when cleanup is needed regardless of success/failure",currentHandling:"no finally block \u2014 cleanup may be skipped on exception",suggestedGuard:"Add finally block for resource cleanup if applicable",severity:"low"})),t.includes("?.")){let a=t.match(/(\w+(?:\.\w+)*)\?\./g)||[];for(let g of a)if(!t.includes("??")&&!t.includes("|| ")&&!t.includes("if")){r.push({file:s,line:c,column:u,language:this.language,construct:"optional-chaining-null-path",triggerCondition:`when ${g.replace("?.","")} is null/undefined`,currentHandling:"returns undefined \u2014 may propagate",suggestedGuard:"Add ?? fallback or explicit null check",severity:"low"});break}}if(t.includes("??")&&!t.includes("?.")&&r.push({file:s,line:c,column:u,language:this.language,construct:"nullish-coalescing-fallback",triggerCondition:"when left side is null/undefined",currentHandling:"uses fallback value",suggestedGuard:"Verify fallback value is appropriate for all null cases",severity:"low"}),/\.\s*then\s*\(/.test(t)&&!t.includes(".catch")&&!t.includes("await")){let a=n.slice(i,Math.min(i+5,n.length)).join(" ");!a.includes(".catch")&&!a.includes("try")&&r.push({file:s,line:c,column:u,language:this.language,construct:"promise-no-catch",triggerCondition:"when promise rejects",currentHandling:"unhandled rejection \u2014 may crash process",suggestedGuard:"Add .catch() handler or use try/catch with await",severity:"high"})}let p=["map","filter","reduce","forEach","find","some","every","flatMap"];for(let a of p)if(new RegExp(`\\.${a}\\s*\\(`).test(t)){let h=n.slice(Math.max(0,i-3),i).join(" ");if(!h.includes(".length")&&!h.includes("if (")&&!h.includes("?.")){r.push({file:s,line:c,column:u,language:this.language,construct:"array-callback-empty",triggerCondition:`when array is empty before .${a}()`,currentHandling:a==="reduce"?"may throw without initial value":"returns empty result \u2014 may cause downstream issues",suggestedGuard:a==="reduce"?"Provide initial value or check array length":"Check array length or handle empty result",severity:a==="reduce"?"high":"low"});break}}/\|\|\s*['"`\d]/.test(t)&&!t.includes("??")&&r.push({file:s,line:c,column:u,language:this.language,construct:"logical-or-falsy",triggerCondition:'when left side is falsy (0, "", false, null, undefined)',currentHandling:'uses fallback \u2014 may unintentionally override 0, "", or false',suggestedGuard:"Use ?? instead of || if only null/undefined should trigger fallback",severity:"medium"}),/&&\s*\w+\s*\(/.test(t)&&!t.includes("if")&&!t.includes("while")&&r.push({file:s,line:c,column:u,language:this.language,construct:"logical-and-short-circuit",triggerCondition:"when left side is falsy \u2014 right side never executes",currentHandling:"short-circuits \u2014 function call skipped silently",suggestedGuard:"Use explicit if-statement for clarity when side effects matter",severity:"low"}),(t.match(/\?/g)||[]).length>=2&&t.includes(":")&&r.push({file:s,line:c,column:u,language:this.language,construct:"ternary-complex",triggerCondition:"when nested ternary conditions interact",currentHandling:"nested ternary \u2014 hard to read and maintain",suggestedGuard:"Refactor to if/else or switch for readability",severity:"medium"}),(/\btypeof\s+\w+\s*===?\s*['"]/.test(t)||/\binstanceof\b/.test(t))&&!t.includes("else")&&!this.findMatchingElse(n,i)&&r.push({file:s,line:c,column:u,language:this.language,construct:"type-guard-unhandled",triggerCondition:"when value does not match the guarded type",currentHandling:"unguarded type path \u2014 may cause runtime type errors",suggestedGuard:"Add else branch or exhaustive type checking",severity:"medium"})}return r}findMatchingElse(e,s){let r={depth:0};for(let n=s;n<Math.min(s+30,e.length);n++){let l=e[n];for(let i of l)i==="{"&&r.depth++,i==="}"&&r.depth--;if(r.depth===0&&n>s){if((e[n+1]?.trim()||"").startsWith("else")||e[n].trim().endsWith("else")||e[n].trim().endsWith("else {")||e[n].includes("} else"))return!0;break}}return!1}extractBlock(e,s){let r=0,n=!1,l=[];for(let i=s;i<Math.min(s+50,e.length);i++){let d=e[i];for(let t of d)t==="{"&&(r++,n=!0),t==="}"&&r--;if(n&&(l.push(d),r===0))return l.join(`
5
5
  `)}return null}};function y(o,e,s){let r=Date.now(),n=s||(e.endsWith(".ts")||e.endsWith(".tsx")?"typescript":"javascript"),i=new f(n).enumerate(o,e);return{file:e,language:n,branches:i,totalConstructs:i.length,unhandledCount:i.length,duration:Date.now()-r}}function b(o){let e=[];if(e.push(`# Branch Enumeration Report: ${o.file}`),e.push(""),e.push(`**Language**: ${o.language} | **Branches**: ${o.unhandledCount} | **Duration**: ${o.duration}ms`),e.push(""),o.branches.length===0)return e.push("No unhandled branches detected."),e.join(`
@@ -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.14.2");process.exit(0)}
2
- import{a as p}from"./chunk-3WV4H33V.js";import"./chunk-6VKJAMZY.js";import{readFile as m,readdir as k}from"fs/promises";import{join as c,basename as y,dirname as W}from"path";import{fileURLToPath as v}from"url";import{parse as d}from"yaml";var b=v(import.meta.url),E=W(b),l=class{templatesDir;cache=new Map;constructor(r){this.templatesDir=r||c(E,"templates")}async load(r){if(this.cache.has(r))return this.cache.get(r);try{let e=c(this.templatesDir,`${r}.yaml`),n=await m(e,"utf-8"),o=d(n),i=await this.validate(o);if(!i.valid)throw new Error(`Invalid workflow template ${r}:
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.14.4");process.exit(0)}
2
+ import{a as p}from"./chunk-UDHKLT4C.js";import"./chunk-TT23RRB7.js";import{readFile as m,readdir as k}from"fs/promises";import{join as c,basename as y,dirname as W}from"path";import{fileURLToPath as v}from"url";import{parse as d}from"yaml";var b=v(import.meta.url),E=W(b),l=class{templatesDir;cache=new Map;constructor(r){this.templatesDir=r||c(E,"templates")}async load(r){if(this.cache.has(r))return this.cache.get(r);try{let e=c(this.templatesDir,`${r}.yaml`),n=await m(e,"utf-8"),o=d(n),i=await this.validate(o);if(!i.valid)throw new Error(`Invalid workflow template ${r}:
3
3
  ${i.errors.join(`
4
4
  `)}`);return this.cache.set(r,o),o}catch(e){throw e.code==="ENOENT"?new Error(`Workflow template not found: ${r}`):e}}async list(){try{return(await k(this.templatesDir)).filter(e=>e.endsWith(".yaml")||e.endsWith(".yml")).map(e=>y(e,e.endsWith(".yaml")?".yaml":".yml")).sort()}catch(r){if(r.code==="ENOENT")return[];throw r}}async validate(r){let e=[],n=[];if(r.name||e.push("Workflow must have a name"),r.version||e.push("Workflow must have a version"),r.description||n.push("Workflow should have a description"),Array.isArray(r.variables)?r.variables.forEach((o,i)=>{o.name||e.push(`Variable at index ${i} must have a name`),o.type||e.push(`Variable ${o.name} must have a type`),o.required===void 0&&n.push(`Variable ${o.name} should specify if it's required`)}):e.push("Workflow must have a variables array"),!Array.isArray(r.steps))e.push("Workflow must have a steps array");else if(r.steps.length===0)e.push("Workflow must have at least one step");else{r.steps.forEach((t,s)=>{t.name||e.push(`Step at index ${s} must have a name`),t.action||e.push(`Step ${t.name||s} must have an action`),(!t.config||typeof t.config!="object")&&e.push(`Step ${t.name||s} must have a config object`),t.assertions&&Array.isArray(t.assertions)&&t.assertions.forEach((f,u)=>{f.condition||e.push(`Assertion ${u} in step ${t.name||s} must have a condition`),f.message||n.push(`Assertion ${u} in step ${t.name||s} should have a message`)})});let o=r.steps.map(t=>t.name),i=o.filter((t,s)=>o.indexOf(t)!==s);i.length>0&&e.push(`Duplicate step names found: ${i.join(", ")}`)}return{valid:e.length===0,errors:e,warnings:n}}async createContext(r,e){let n=await this.load(r),o=n.variables.filter(t=>t.required&&!(t.name in e)).map(t=>t.name);if(o.length>0)throw new Error(`Missing required variables: ${o.join(", ")}`);let i={};return n.variables.forEach(t=>{t.name in e?i[t.name]=e[t.name]:"default"in t&&(i[t.name]=t.default)}),{variables:i,results:new Map,metadata:{startTime:Date.now(),workflow:n.name,templateName:r}}}async getMetadata(r){try{let e=c(this.templatesDir,`${r}.yaml`),n=await m(e,"utf-8"),o=d(n);return{name:o.name,version:o.version,description:o.description}}catch(e){throw e.code==="ENOENT"?new Error(`Workflow template not found: ${r}`):e}}clearCache(){this.cache.clear()}async reload(r){return this.cache.delete(r),this.load(r)}},x=new l;function w(a,r){return a.replace(/\{\{([^}]+)\}\}/g,(e,n)=>{let i=n.trim().split("."),t=r;for(let s of i)if(t&&typeof t=="object"&&s in t)t=t[s];else return e;return t!=null?String(t):e})}function T(a,r){let e={...r.variables,result:r.results.get("__last_result__")},n=w(a,e);return p(n,e,!1)}var g=["login-flow","oauth-flow","scraping-workflow","visual-regression","form-validation","navigation-flow","api-integration","performance-audit","accessibility-audit"],A={"login-flow":"Authentication testing workflow for login forms with credential validation","oauth-flow":"OAuth2/OIDC authentication testing workflow with provider integration","scraping-workflow":"Data extraction workflow for web scraping with pagination and structured output","visual-regression":"Screenshot comparison workflow for visual regression testing across breakpoints","form-validation":"Input validation testing workflow for form fields with error handling","navigation-flow":"Multi-page navigation workflow for testing user journeys and state persistence","api-integration":"Browser-API hybrid testing workflow for validating frontend-backend integration","performance-audit":"Lighthouse-style performance audit workflow with Core Web Vitals","accessibility-audit":"WCAG 2.1 Level AA compliance audit workflow with automated accessibility testing"},h={authentication:["login-flow","oauth-flow"],testing:["form-validation","navigation-flow","api-integration"],quality:["visual-regression","performance-audit","accessibility-audit"],automation:["scraping-workflow"]};function _(a){return h[a]}function P(a){return g.includes(a)}function L(){return g.map(a=>{let r=Object.entries(h).find(([e,n])=>n.includes(a))?.[0]||"other";return{name:a,description:A[a],category:r}})}export{h as WORKFLOW_CATEGORIES,A as WORKFLOW_DESCRIPTIONS,g as WORKFLOW_TEMPLATES,l as WorkflowLoader,x as defaultWorkflowLoader,T as evaluateCondition,L as getAllWorkflowTemplates,_ as getWorkflowsByCategory,w as interpolateVariables,P as isValidWorkflowTemplate};
@@ -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.14.4");process.exit(0)}
2
+ import{a}from"./chunk-HV2J7KKQ.js";import"./chunk-W7BWUTVV.js";import"./chunk-6TPKK7LD.js";import"./chunk-55RWDRJD.js";import"./chunk-R4VL6E65.js";import"./chunk-RJCYCLZV.js";import"./chunk-NA7B2QYB.js";import"./chunk-Y3MW3YBC.js";import"./chunk-PEPFCPES.js";import"./chunk-DHJPWQBR.js";import"./chunk-G6T45OIC.js";import"./chunk-SRKETSFF.js";import"./chunk-AIHDEEJO.js";import"./chunk-BGE6FOLM.js";import"./chunk-5YPYDPBJ.js";import"./chunk-HDSAM2RE.js";import"./chunk-KCZR45PA.js";import"./chunk-BFP7KO7P.js";import"./chunk-ODKLFVYC.js";import"./chunk-VD6QRULW.js";import"./chunk-KHFNNVJA.js";import"./chunk-CNG6GQEZ.js";import"./chunk-TT23RRB7.js";export{a as BrowserWorkflowTool};
@@ -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.14.2");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.14.4");process.exit(0)}
2
2
  var i={copilot:{id:"copilot",name:"GitHub Copilot",configPath:".vscode/mcp.json",configFormat:"json",configKey:"servers",rulesPath:".github/copilot-instructions.md",rulesFormat:"markdown",supportsAutoApprove:!1,supportsCustomModes:!1,globalConfig:!1},cursor:{id:"cursor",name:"Cursor",configPath:".cursor/mcp.json",configFormat:"json",configKey:"mcpServers",rulesPath:".cursorrules",rulesFormat:"markdown",supportsAutoApprove:!1,supportsCustomModes:!1,globalConfig:!1},cline:{id:"cline",name:"Cline",configPath:".vscode/cline_mcp_settings.json",configFormat:"json",configKey:"mcpServers",rulesPath:".vscode/cline_custom_modes.json",rulesFormat:"json",supportsAutoApprove:!0,supportsCustomModes:!0,globalConfig:!1},kilocode:{id:"kilocode",name:"Kilo Code",configPath:".kilocode/mcp.json",configFormat:"json",configKey:"mcpServers",rulesPath:".kilocode/modes.json",rulesFormat:"json",supportsAutoApprove:!0,supportsCustomModes:!0,globalConfig:!1},roocode:{id:"roocode",name:"Roo Code",configPath:".roo/mcp.json",configFormat:"json",configKey:"mcpServers",rulesPath:".roo/modes.json",rulesFormat:"json",supportsAutoApprove:!0,supportsCustomModes:!0,globalConfig:!1},codex:{id:"codex",name:"OpenAI Codex CLI",configPath:".codex/config.toml",configFormat:"toml",configKey:"mcp_servers",rulesPath:"AGENTS.md",rulesFormat:"markdown",supportsAutoApprove:!1,supportsCustomModes:!1,globalConfig:!1},windsurf:{id:"windsurf",name:"Windsurf",configPath:".windsurf/mcp_config.json",configFormat:"json",configKey:"mcpServers",rulesPath:".windsurfrules",rulesFormat:"markdown",supportsAutoApprove:!1,supportsCustomModes:!1,globalConfig:!1},continuedev:{id:"continuedev",name:"Continue.dev",configPath:".continue/config.yaml",configFormat:"yaml",configKey:"mcpServers",rulesPath:".continue/rules/aqe-qe-standards.yaml",rulesFormat:"yaml",supportsAutoApprove:!1,supportsCustomModes:!1,globalConfig:!1}},l=["fleet_init","fleet_status","fleet_health","agent_list","agent_metrics","agent_status","team_list","team_health","task_list","task_status","test_generate_enhanced","coverage_analyze_sublinear","quality_assess","defect_predict","code_index","memory_store","memory_retrieve","memory_query","memory_usage","model_route","routing_metrics","aqe_health"];function u(t){return t?{AQE_MEMORY_BACKEND:"memory",AQE_V3_MODE:"true"}:{AQE_MEMORY_PATH:".agentic-qe/memory.db",AQE_V3_MODE:"true"}}function m(t,o){let e={command:"npx",args:["-y","agentic-qe@latest","mcp"],env:u(o)};return t&&(e.disabled=!1,e.alwaysAllow=l),e}function g(t,o){let e=m(t.supportsAutoApprove,o);if(t.id==="copilot"){let r={[t.configKey]:{"agentic-qe":{type:"stdio",...e}}};return JSON.stringify(r,null,2)+`
3
3
  `}let n={[t.configKey]:{"agentic-qe":e}};return JSON.stringify(n,null,2)+`
4
4
  `}function f(t){return`# Agentic QE MCP Server
@@ -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.14.2");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.14.4");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.14.2");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.14.4");process.exit(0)}
2
2
  var e=!1;function o(){e=!0;let r=!1;return()=>{r||(r=!0,e=!1)}}function t(){return e}export{o as a,t as b};