agentic-qe 3.15.13 → 3.15.14

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 (409) hide show
  1. package/.claude/helpers/brain-checkpoint.cjs +124 -5
  2. package/.claude/skills/skills-manifest.json +1 -1
  3. package/CHANGELOG.md +78 -0
  4. package/assets/skills/skills-manifest.json +1 -1
  5. package/dist/cli/bundle.js +6 -6
  6. package/dist/cli/chunks/adapter-23KA2YW7.js +2 -0
  7. package/dist/cli/chunks/{agent-booster-wasm-6RRQWMNE.js → agent-booster-wasm-2DLAEZK6.js} +2 -2
  8. package/dist/cli/chunks/{agent-handler-AOH6TV7W.js → agent-handler-P3IY7XEE.js} +2 -2
  9. package/dist/cli/chunks/{agent-memory-branch-2P54SF5N.js → agent-memory-branch-WWKC2H3G.js} +2 -2
  10. package/dist/cli/chunks/aqe-learning-engine-MUICAXW5.js +2 -0
  11. package/dist/cli/chunks/{arena-X6MOGQHA.js → arena-4BMFF6BS.js} +4 -4
  12. package/dist/cli/chunks/{arena-NSVFCAF5.js → arena-EIV5OALF.js} +2 -2
  13. package/dist/cli/chunks/{audit-27DJLQNM.js → audit-DNTI453H.js} +3 -3
  14. package/dist/cli/chunks/base-XPWGYDKD.js +2 -0
  15. package/dist/cli/chunks/{better-sqlite3-BU5GXILS.js → better-sqlite3-TQBQGNC6.js} +2 -2
  16. package/dist/cli/chunks/brain-handler-HY57CNAO.js +95 -0
  17. package/dist/cli/chunks/{branch-enumerator-5CLULOCU.js → branch-enumerator-THPMZPHQ.js} +2 -2
  18. package/dist/cli/chunks/{browser-R4DMU3LN.js → browser-O6JJOZCK.js} +2 -2
  19. package/dist/cli/chunks/browser-workflow-UMQVBVGK.js +2 -0
  20. package/dist/cli/chunks/{chunk-VU5TBX2V.js → chunk-2HPNGK7A.js} +2 -2
  21. package/dist/cli/chunks/{chunk-5FKWCZNF.js → chunk-2IJO3657.js} +2 -2
  22. package/dist/cli/chunks/{chunk-K3TLLJMX.js → chunk-2QLE6NDW.js} +1 -1
  23. package/dist/cli/chunks/{chunk-J2ZIFFM6.js → chunk-2UZBLC5H.js} +2 -2
  24. package/dist/cli/chunks/{chunk-HD7YIFOI.js → chunk-2W5MQDHM.js} +2 -2
  25. package/dist/cli/chunks/{chunk-F3YS57NF.js → chunk-3FITMWWJ.js} +2 -2
  26. package/dist/cli/chunks/{chunk-K4CZA77U.js → chunk-3TF27MG5.js} +2 -2
  27. package/dist/cli/chunks/{chunk-BLSLEVDI.js → chunk-3XACRXBY.js} +2 -2
  28. package/dist/cli/chunks/{chunk-A64JFBWI.js → chunk-43XHGWYH.js} +2 -2
  29. package/dist/cli/chunks/{chunk-42J34YG4.js → chunk-4RPBODN5.js} +2 -2
  30. package/dist/cli/chunks/{chunk-W26B7ERY.js → chunk-4T7XV5KQ.js} +1 -1
  31. package/dist/cli/chunks/{chunk-SSU73QAX.js → chunk-4WLIOPHX.js} +2 -2
  32. package/dist/cli/chunks/{chunk-P7A4NKTZ.js → chunk-52KOPIMI.js} +2 -2
  33. package/dist/cli/chunks/{chunk-HQZGPJYG.js → chunk-56NSE3LJ.js} +2 -2
  34. package/dist/cli/chunks/{chunk-AQSVJNEH.js → chunk-57DRT6UA.js} +2 -2
  35. package/dist/cli/chunks/{chunk-M6AAGIG7.js → chunk-57FX3GP6.js} +1 -1
  36. package/dist/cli/chunks/{chunk-O6FGXMHD.js → chunk-5PLBQZ5J.js} +1 -1
  37. package/dist/cli/chunks/{chunk-ASQYASNV.js → chunk-5Y7UFHJD.js} +1 -1
  38. package/dist/cli/chunks/{chunk-5VMAV6T6.js → chunk-5Z4MO2F3.js} +1 -1
  39. package/dist/cli/chunks/chunk-65EE2EST.js +8 -0
  40. package/dist/cli/chunks/{chunk-7CMTY45A.js → chunk-6NIGSY5L.js} +2 -2
  41. package/dist/cli/chunks/chunk-6O63ZTVX.js +3 -0
  42. package/dist/cli/chunks/{chunk-FZ76G4QJ.js → chunk-6OI5SK7M.js} +1 -1
  43. package/dist/cli/chunks/{chunk-5ZGM3RMH.js → chunk-6P4Q4RTC.js} +1 -1
  44. package/dist/cli/chunks/{chunk-LUZNKJE6.js → chunk-7724KXM2.js} +3 -3
  45. package/dist/cli/chunks/{chunk-XPRVF4YE.js → chunk-7MISCSL5.js} +2 -2
  46. package/dist/cli/chunks/{chunk-TCBBNUBP.js → chunk-7MUO4DEH.js} +3 -3
  47. package/dist/cli/chunks/{chunk-NT4DBXSX.js → chunk-7QUSNBAA.js} +2 -2
  48. package/dist/cli/chunks/{chunk-TWDW32W2.js → chunk-7SQTLUEN.js} +2 -2
  49. package/dist/cli/chunks/{chunk-QPNG5ZN2.js → chunk-7T6L3LFN.js} +2 -2
  50. package/dist/cli/chunks/{chunk-E56B6IDX.js → chunk-7TH4PJSU.js} +2 -2
  51. package/dist/cli/chunks/{chunk-LZYQHVD4.js → chunk-7Y3LXH57.js} +2 -2
  52. package/dist/cli/chunks/{chunk-YQFLQE53.js → chunk-A2T56XVL.js} +2 -2
  53. package/dist/cli/chunks/{chunk-KV4T4MXK.js → chunk-AJVLVF7V.js} +2 -2
  54. package/dist/cli/chunks/{chunk-VTDFVFST.js → chunk-ARRBXCII.js} +2 -2
  55. package/dist/cli/chunks/{chunk-G6WDYBLQ.js → chunk-AYLEH2UF.js} +1 -1
  56. package/dist/cli/chunks/{chunk-526QYFJU.js → chunk-BBYJBZHG.js} +2 -2
  57. package/dist/cli/chunks/{chunk-CM4LSLKR.js → chunk-BM3EJLMV.js} +2 -2
  58. package/dist/cli/chunks/{chunk-DVGRPK7A.js → chunk-BNG4J3CE.js} +2 -2
  59. package/dist/cli/chunks/{chunk-BK577VL7.js → chunk-BPDAQB3F.js} +2 -2
  60. package/dist/cli/chunks/{chunk-C6JTLKG7.js → chunk-BQJ7CV53.js} +9 -9
  61. package/dist/cli/chunks/{chunk-GB6HBNH2.js → chunk-C3OIBFAA.js} +2 -2
  62. package/dist/cli/chunks/{chunk-RF7HWBHN.js → chunk-CAZM63TP.js} +2 -2
  63. package/dist/cli/chunks/{chunk-KWYH3FI4.js → chunk-CIINJHOX.js} +1 -1
  64. package/dist/cli/chunks/{chunk-ARJW4I2O.js → chunk-CPPYZYXC.js} +2 -2
  65. package/dist/cli/chunks/{chunk-CRWPZT74.js → chunk-D3ZZ2NLL.js} +2 -2
  66. package/dist/cli/chunks/{chunk-Q3UDLV5Z.js → chunk-D5GB5PUU.js} +1 -1
  67. package/dist/cli/chunks/{chunk-7PLIEBY7.js → chunk-DLTB5KCR.js} +2 -2
  68. package/dist/cli/chunks/{chunk-YZWBNBTW.js → chunk-DRLSJJIC.js} +2 -2
  69. package/dist/cli/chunks/{chunk-BEGR4D6N.js → chunk-DSQESXL4.js} +2 -2
  70. package/dist/cli/chunks/{chunk-72ASBE35.js → chunk-E2JLAW3U.js} +3 -3
  71. package/dist/cli/chunks/{chunk-MAMQA43L.js → chunk-E3QIQMMN.js} +1 -1
  72. package/dist/cli/chunks/{chunk-WOCGL4QP.js → chunk-E7OR6V3V.js} +2 -2
  73. package/dist/cli/chunks/{chunk-MVVB7C2E.js → chunk-E7QTWGPI.js} +156 -156
  74. package/dist/cli/chunks/{chunk-JQGMW45H.js → chunk-EC65UZ77.js} +1 -1
  75. package/dist/cli/chunks/{chunk-YXRASAPI.js → chunk-EIEEST4T.js} +2 -2
  76. package/dist/cli/chunks/{chunk-AL6FBH3E.js → chunk-FHPNWHY7.js} +2 -2
  77. package/dist/cli/chunks/{chunk-C7JM7CD3.js → chunk-FJOIBZUB.js} +2 -2
  78. package/dist/cli/chunks/{chunk-LL7LDPXS.js → chunk-FTYRPEJS.js} +1 -1
  79. package/dist/cli/chunks/{chunk-MFW5HSG4.js → chunk-G7HGUQAE.js} +2 -2
  80. package/dist/cli/chunks/{chunk-WQL7WCIZ.js → chunk-GY4P7KAI.js} +1 -1
  81. package/dist/cli/chunks/{chunk-3YNLWPBF.js → chunk-H3C5FJRH.js} +2 -2
  82. package/dist/cli/chunks/{chunk-W3INMZZ6.js → chunk-H4LYXLAT.js} +1 -1
  83. package/dist/cli/chunks/{chunk-W3PPFHI5.js → chunk-HAYKLXCT.js} +52 -50
  84. package/dist/cli/chunks/{chunk-XNBOGCF3.js → chunk-HEDGFKC5.js} +2 -2
  85. package/dist/cli/chunks/{chunk-SYV2V3PL.js → chunk-HHBF2BZC.js} +4 -4
  86. package/dist/cli/chunks/{chunk-75RDHBAX.js → chunk-HSDWPQQY.js} +3 -3
  87. package/dist/cli/chunks/{chunk-6KATY3KS.js → chunk-HTVGHHX2.js} +2 -2
  88. package/dist/cli/chunks/{chunk-VRVMIPTM.js → chunk-HV43NX4A.js} +2 -2
  89. package/dist/cli/chunks/{chunk-RFNW2LGD.js → chunk-IDBA5GK2.js} +2 -2
  90. package/dist/cli/chunks/{chunk-DNDL7SOS.js → chunk-INGXD5IX.js} +2 -2
  91. package/dist/cli/chunks/{chunk-IJUHSJ2U.js → chunk-IQRPR4KB.js} +2 -2
  92. package/dist/cli/chunks/{chunk-UOC3O6RP.js → chunk-IRPNEXOU.js} +2 -2
  93. package/dist/cli/chunks/{chunk-KDVZND5Q.js → chunk-J35JWDJE.js} +1 -1
  94. package/dist/cli/chunks/{chunk-CV77DMDQ.js → chunk-J6ASX536.js} +2 -2
  95. package/dist/cli/chunks/{chunk-7YTGHGK4.js → chunk-JAOCHPYX.js} +2 -2
  96. package/dist/cli/chunks/{chunk-HZ5NXFXH.js → chunk-JB7R77SH.js} +2 -2
  97. package/dist/cli/chunks/{chunk-PB6J6HAA.js → chunk-JI67T6Q2.js} +2 -2
  98. package/dist/cli/chunks/{chunk-E7CLYGS7.js → chunk-JJHLGGPP.js} +1 -1
  99. package/dist/cli/chunks/{chunk-3Y7TJFHU.js → chunk-JK6PMLQQ.js} +2 -2
  100. package/dist/cli/chunks/{chunk-CCMKSHAT.js → chunk-JO26SG47.js} +2 -2
  101. package/dist/cli/chunks/{chunk-NU3W5WFT.js → chunk-JSSU4RIK.js} +2 -2
  102. package/dist/cli/chunks/{chunk-756CGMEH.js → chunk-K2SMP4OD.js} +1 -1
  103. package/dist/cli/chunks/{chunk-OCAEXYFA.js → chunk-K7GFYFBO.js} +2 -2
  104. package/dist/cli/chunks/{chunk-VRHRBAEM.js → chunk-K7RT6ITZ.js} +1 -1
  105. package/dist/cli/chunks/{chunk-LFJALJOA.js → chunk-KJ5A54ZH.js} +2 -2
  106. package/dist/cli/chunks/{chunk-3Y2ROSCL.js → chunk-L5VSLPMW.js} +2 -2
  107. package/dist/cli/chunks/{chunk-WKGTGOYS.js → chunk-L752CNG3.js} +3 -3
  108. package/dist/cli/chunks/{chunk-IC3TQEOA.js → chunk-L7PC675Y.js} +1 -1
  109. package/dist/cli/chunks/{chunk-TOQWL2ZF.js → chunk-LTGQJYYO.js} +2 -2
  110. package/dist/cli/chunks/{chunk-SVLQRAMF.js → chunk-M2TG7VDK.js} +1 -1
  111. package/dist/cli/chunks/{chunk-X7N2JF2X.js → chunk-M5JEA6ZY.js} +2 -2
  112. package/dist/cli/chunks/{chunk-GHM6MQNK.js → chunk-MB4UKUBV.js} +2 -2
  113. package/dist/cli/chunks/{chunk-R7SYRCRP.js → chunk-MKYOE7NE.js} +1 -1
  114. package/dist/cli/chunks/{chunk-3AN5TNGD.js → chunk-MQXWG55U.js} +3 -3
  115. package/dist/cli/chunks/{chunk-3QZEGE67.js → chunk-MR2OPUSA.js} +1 -1
  116. package/dist/cli/chunks/{chunk-6Z7PRBSG.js → chunk-N736GLWZ.js} +2 -2
  117. package/dist/cli/chunks/{chunk-PIDQVU3L.js → chunk-NHEG2DLN.js} +2 -2
  118. package/dist/cli/chunks/chunk-NKOLILT7.js +86 -0
  119. package/dist/cli/chunks/{chunk-UXZSUMEA.js → chunk-NPCXGX7N.js} +2 -2
  120. package/dist/cli/chunks/{chunk-XEAEYC6Y.js → chunk-NZQYJCO6.js} +1 -1
  121. package/dist/cli/chunks/{chunk-G77ERMUD.js → chunk-O2AAYJUV.js} +1 -1
  122. package/dist/cli/chunks/{chunk-H4GG2NLO.js → chunk-O32BFQV4.js} +2 -2
  123. package/dist/cli/chunks/{chunk-3LJ7LQMV.js → chunk-O3ERGUXH.js} +1 -1
  124. package/dist/cli/chunks/{chunk-QDEJ4CI2.js → chunk-O5CEL447.js} +2 -2
  125. package/dist/cli/chunks/{chunk-W2QWSQVE.js → chunk-O756AOUX.js} +2 -2
  126. package/dist/cli/chunks/{chunk-PSFSPGUD.js → chunk-OCN53CCK.js} +2 -2
  127. package/dist/cli/chunks/{chunk-KCW47QR5.js → chunk-OGEIHS76.js} +1 -1
  128. package/dist/cli/chunks/{chunk-3RZV5DGO.js → chunk-OLUOVNUF.js} +2 -2
  129. package/dist/cli/chunks/{chunk-KADFXPPN.js → chunk-P2TPH3TC.js} +2 -2
  130. package/dist/cli/chunks/{chunk-7NA7JXNB.js → chunk-PCQZIAXB.js} +2 -2
  131. package/dist/cli/chunks/{chunk-HOAJUIBQ.js → chunk-PGN4TARY.js} +2 -2
  132. package/dist/cli/chunks/{chunk-KB56CPU4.js → chunk-PNRPVQGI.js} +2 -2
  133. package/dist/cli/chunks/{chunk-CE7B5LU7.js → chunk-PWQWKYBG.js} +1 -1
  134. package/dist/cli/chunks/{chunk-DLD7RUZ4.js → chunk-QNQE3EOH.js} +2 -2
  135. package/dist/cli/chunks/chunk-QP2HLKTS.js +2 -0
  136. package/dist/cli/chunks/{chunk-H4H2YSFH.js → chunk-QP6GL3O5.js} +1 -1
  137. package/dist/cli/chunks/{chunk-LWR3FV3Y.js → chunk-QUZ745UQ.js} +2 -2
  138. package/dist/cli/chunks/{chunk-X2Z7F4EU.js → chunk-R5RRWLRI.js} +2 -2
  139. package/dist/cli/chunks/{chunk-NURIILUB.js → chunk-RE6JTSDM.js} +1 -1
  140. package/dist/cli/chunks/{chunk-YSZ5OE3Z.js → chunk-TOJF3ZG4.js} +2 -2
  141. package/dist/cli/chunks/{chunk-7JUC2MVZ.js → chunk-TSP6SU5V.js} +2 -2
  142. package/dist/cli/chunks/{chunk-NW7IBHJA.js → chunk-TW6Z6W4X.js} +4 -4
  143. package/dist/cli/chunks/{chunk-UDQSYWVF.js → chunk-TWOV3I3A.js} +1 -1
  144. package/dist/cli/chunks/chunk-U4TML2VD.js +3 -0
  145. package/dist/cli/chunks/{chunk-WO274FRI.js → chunk-U6IOQKCT.js} +2 -2
  146. package/dist/cli/chunks/{chunk-KDNJ4F3P.js → chunk-UDSB3XCG.js} +2 -2
  147. package/dist/cli/chunks/{chunk-SG3NX7QE.js → chunk-UFP7SN5V.js} +2 -2
  148. package/dist/cli/chunks/{chunk-UTRV7T2N.js → chunk-UMHFTQTR.js} +2 -2
  149. package/dist/cli/chunks/{chunk-4OVC4RIL.js → chunk-UNYTHZDZ.js} +1 -1
  150. package/dist/cli/chunks/{chunk-32ZMWEP3.js → chunk-UPWLMIDY.js} +2 -2
  151. package/dist/cli/chunks/{chunk-T3PGQFDI.js → chunk-USAKCGHC.js} +2 -2
  152. package/dist/cli/chunks/{chunk-2G7TVT6W.js → chunk-V3MGY76S.js} +2 -2
  153. package/dist/cli/chunks/{chunk-ZAKQLAHT.js → chunk-V6SE2ZU2.js} +1 -1
  154. package/dist/cli/chunks/{chunk-SE4VNN4I.js → chunk-VCVRZD4Y.js} +3 -3
  155. package/dist/cli/chunks/{chunk-PHP5UBT4.js → chunk-VG32EEUG.js} +2 -2
  156. package/dist/cli/chunks/{chunk-YZEXYO4W.js → chunk-VGZOPQQY.js} +1 -1
  157. package/dist/cli/chunks/{chunk-OFACHK5O.js → chunk-VJBJRFUO.js} +2 -2
  158. package/dist/cli/chunks/{chunk-NZ3GUMB2.js → chunk-WBC6WB32.js} +2 -2
  159. package/dist/cli/chunks/{chunk-GHY6Z6KO.js → chunk-WCM6WE7G.js} +3 -3
  160. package/dist/cli/chunks/{chunk-NZD4DPSU.js → chunk-WCPSR4MJ.js} +2 -2
  161. package/dist/cli/chunks/{chunk-I3C7JOXC.js → chunk-WKI46WWN.js} +2 -2
  162. package/dist/cli/chunks/{chunk-5K26BEYB.js → chunk-WM2QRIRD.js} +2 -2
  163. package/dist/cli/chunks/{chunk-U2FUXDDJ.js → chunk-WRC3HLUY.js} +3 -3
  164. package/dist/cli/chunks/{chunk-GII6UM3F.js → chunk-WUGXXNK4.js} +1 -1
  165. package/dist/cli/chunks/{chunk-JGZ722G3.js → chunk-WZQADC5R.js} +2 -2
  166. package/dist/cli/chunks/{chunk-GU5HNCWI.js → chunk-X6NJOT3V.js} +1 -1
  167. package/dist/cli/chunks/{chunk-DFUASIKA.js → chunk-X6Q2N5S5.js} +2 -2
  168. package/dist/cli/chunks/{chunk-G2Q66Z23.js → chunk-X7CUI7KH.js} +2 -2
  169. package/dist/cli/chunks/{chunk-5MDERQH3.js → chunk-XMCSKYDE.js} +1 -1
  170. package/dist/cli/chunks/{chunk-VTOBUZL6.js → chunk-XN3KCKAM.js} +2 -2
  171. package/dist/cli/chunks/{chunk-KUAKV3IW.js → chunk-XSPMLJCQ.js} +1 -1
  172. package/dist/cli/chunks/{chunk-YBQH2VOP.js → chunk-XTZGAG6P.js} +2 -2
  173. package/dist/cli/chunks/{chunk-MGZ5FJUW.js → chunk-YE54T2NQ.js} +2 -2
  174. package/dist/cli/chunks/{chunk-BTVEYBW2.js → chunk-YEFTK4HD.js} +2 -2
  175. package/dist/cli/chunks/{chunk-CT6SAVXQ.js → chunk-YGC5QKQ4.js} +2 -2
  176. package/dist/cli/chunks/{chunk-TWJTK4CC.js → chunk-YGOSSVY5.js} +2 -2
  177. package/dist/cli/chunks/chunk-YKQWIXUY.js +2 -0
  178. package/dist/cli/chunks/{chunk-TSQC2KKZ.js → chunk-Z2S7DNFP.js} +2 -2
  179. package/dist/cli/chunks/{chunk-JRRXCODW.js → chunk-Z54G2YOL.js} +2 -2
  180. package/dist/cli/chunks/{chunk-EXGMJFAT.js → chunk-ZJGFQK27.js} +1 -1
  181. package/dist/cli/chunks/{chunk-WNQS4WTS.js → chunk-ZUE524JL.js} +2 -2
  182. package/dist/cli/chunks/{ci-ENOASTYB.js → ci-UMA2SMNW.js} +2 -2
  183. package/dist/cli/chunks/{ci-config-B26OXHQM.js → ci-config-UQSILJFQ.js} +2 -2
  184. package/dist/cli/chunks/{ci-output-JTCLLNOQ.js → ci-output-U6YZLLKH.js} +2 -2
  185. package/dist/cli/chunks/{circuit-breaker-23JMFNM5.js → circuit-breaker-ATYQP6X2.js} +2 -2
  186. package/dist/cli/chunks/{claude-flow-setup-ON6L462G.js → claude-flow-setup-6YHFD7AN.js} +2 -2
  187. package/dist/cli/chunks/client-E43GWLQH.js +2 -0
  188. package/dist/cli/chunks/{cline-installer-OWQ4D2FQ.js → cline-installer-EPE7IOZE.js} +2 -2
  189. package/dist/cli/chunks/{code-2ZRL7SEU.js → code-NUEJ4XYO.js} +3 -3
  190. package/dist/cli/chunks/{code-index-extractor-JXSQVM67.js → code-index-extractor-D4DBT6OL.js} +2 -2
  191. package/dist/cli/chunks/{codex-installer-7LXZYBSQ.js → codex-installer-633SM4LR.js} +2 -2
  192. package/dist/cli/chunks/{completions-C2LR623C.js → completions-WUKVIW3L.js} +2 -2
  193. package/dist/cli/chunks/{complexity-analyzer-TGQLHCYJ.js → complexity-analyzer-F73ACR5H.js} +2 -2
  194. package/dist/cli/chunks/{continuedev-installer-RUGD24D2.js → continuedev-installer-QH42TKMS.js} +2 -2
  195. package/dist/cli/chunks/{copilot-installer-ZLFVLEJP.js → copilot-installer-Y3XC7BTT.js} +2 -2
  196. package/dist/cli/chunks/core-handlers-R5A3SQDY.js +2 -0
  197. package/dist/cli/chunks/{cost-tracker-RT4QL745.js → cost-tracker-57QPV7E3.js} +2 -2
  198. package/dist/cli/chunks/coverage-IBCHMBCR.js +51 -0
  199. package/dist/cli/chunks/cross-domain-router-LLYVPZF6.js +2 -0
  200. package/dist/cli/chunks/{cursor-installer-LJKLNFF6.js → cursor-installer-F4UYQHIN.js} +2 -2
  201. package/dist/cli/chunks/{daemon-FBH3IRYN.js → daemon-BYYPIJ7G.js} +4 -4
  202. package/dist/cli/chunks/{daemon-BMDXCQT5.js → daemon-XR4Q6YZF.js} +3 -3
  203. package/dist/cli/chunks/{dag-attention-scheduler-JGDED55I.js → dag-attention-scheduler-ZR5ZD3TW.js} +2 -2
  204. package/dist/cli/chunks/{detect-SZIHIVCJ.js → detect-GEGYURLL.js} +2 -2
  205. package/dist/cli/chunks/{dist-node-FV3KWXQ6.js → dist-node-JU3KT2JO.js} +2 -2
  206. package/dist/cli/chunks/{domain-handler-GI5JWQOV.js → domain-handler-7QI3FJGE.js} +2 -2
  207. package/dist/cli/chunks/{domain-plugins-BUWY36TL.js → domain-plugins-O2YRM2PD.js} +2 -2
  208. package/dist/cli/chunks/{domain-transfer-GCY7W5DA.js → domain-transfer-7J3S2OS6.js} +2 -2
  209. package/dist/cli/chunks/dream-6C4NURSE.js +2 -0
  210. package/dist/cli/chunks/{embed-and-insert-pattern-GPRR3ZGD.js → embed-and-insert-pattern-URES5Q6J.js} +2 -2
  211. package/dist/cli/chunks/{eval-XPB3IGAP.js → eval-RVMCIUOR.js} +2 -2
  212. package/dist/cli/chunks/{experience-capture-middleware-2E554UB3.js → experience-capture-middleware-SYJQSBKE.js} +3 -3
  213. package/dist/cli/chunks/{fast-paths-ZSMWZPUC.js → fast-paths-QUKPKWKZ.js} +2 -2
  214. package/dist/cli/chunks/{feature-flags-N7EOGE5P.js → feature-flags-5JCSKL2P.js} +2 -2
  215. package/dist/cli/chunks/{feature-flags-GIWVDVVC.js → feature-flags-K7JXNKJI.js} +2 -2
  216. package/dist/cli/chunks/file-discovery-J5IE5KP7.js +2 -0
  217. package/dist/cli/chunks/{fleet-HCHDOUCX.js → fleet-II4Q6HXK.js} +3 -3
  218. package/dist/cli/chunks/{gnn-wrapper-CZNCNXXZ.js → gnn-wrapper-M7VO2EMS.js} +2 -2
  219. package/dist/cli/chunks/{heartbeat-handler-6YUIF2YQ.js → heartbeat-handler-ND5CY26N.js} +4 -4
  220. package/dist/cli/chunks/heartbeat-scheduler-FC5PBTMN.js +2 -0
  221. package/dist/cli/chunks/hnsw-adapter-47UIVOBG.js +2 -0
  222. package/dist/cli/chunks/hnsw-index-3AKVLOZQ.js +2 -0
  223. package/dist/cli/chunks/{hnsw-legacy-bridge-J3M3IK24.js → hnsw-legacy-bridge-N3AUUUU7.js} +2 -2
  224. package/dist/cli/chunks/{hnswlib-node-ULGTGDZW.js → hnswlib-node-NZY3E5EN.js} +2 -2
  225. package/dist/cli/chunks/{hooks-C4BUGYUQ.js → hooks-QVJDTII5.js} +10 -10
  226. package/dist/cli/chunks/hybrid-backend-YAOSNX47.js +2 -0
  227. package/dist/cli/chunks/{hypergraph-engine-WINGVMPG.js → hypergraph-engine-ZRY6MTDV.js} +2 -2
  228. package/dist/cli/chunks/{hypergraph-handler-GADMWKAU.js → hypergraph-handler-56DO4XZQ.js} +3 -3
  229. package/dist/cli/chunks/impact-analyzer-4FMJXM4M.js +2 -0
  230. package/dist/cli/chunks/{init-guard-K2T4QWAO.js → init-guard-DTF4EVUY.js} +2 -2
  231. package/dist/cli/chunks/{init-handler-PCZTDZYI.js → init-handler-M6CNQHMX.js} +6 -6
  232. package/dist/cli/chunks/init-wizard-RTLCRWDT.js +2 -0
  233. package/dist/cli/chunks/kernel-2OWIGGGT.js +2 -0
  234. package/dist/cli/chunks/{kilocode-installer-XENXNEIU.js → kilocode-installer-IJN7XKBH.js} +2 -2
  235. package/dist/cli/chunks/{kiro-installer-3PG2TJ67.js → kiro-installer-UKKPGPDC.js} +2 -2
  236. package/dist/cli/chunks/knowledge-graph-25XXKDJN.js +2 -0
  237. package/dist/cli/chunks/learning-W2HETWQ4.js +131 -0
  238. package/dist/cli/chunks/{llm-router-RKVDEWU2.js → llm-router-Y546K4VX.js} +4 -4
  239. package/dist/cli/chunks/llm-router-service-G3EIN4UB.js +2 -0
  240. package/dist/cli/chunks/{load-ITHC564X.js → load-MKAB2AXE.js} +2 -2
  241. package/dist/cli/chunks/load-test-D6QYNIVT.js +2 -0
  242. package/dist/cli/chunks/{mcp-TCL5UW3N.js → mcp-AZKUS6K3.js} +2 -2
  243. package/dist/cli/chunks/{memory-BKDAY2N2.js → memory-ZDOQN2KU.js} +5 -5
  244. package/dist/cli/chunks/memory-backend-LDFFZMEQ.js +2 -0
  245. package/dist/cli/chunks/{memory-handlers-WN4FXFOA.js → memory-handlers-3SQVY7FE.js} +2 -2
  246. package/dist/cli/chunks/{multi-model-executor-VHAT7ZPF.js → multi-model-executor-WWVXDHG4.js} +2 -2
  247. package/dist/cli/chunks/{opencode-installer-E3VM3EEY.js → opencode-installer-YUJNXXWS.js} +2 -2
  248. package/dist/cli/chunks/{orchestrator-BMQ6X762.js → orchestrator-Z6PWPLRE.js} +109 -25
  249. package/dist/cli/chunks/pattern-null-store-KDVRM7PW.js +2 -0
  250. package/dist/cli/chunks/{pattern-usage-recorder-GOOR2BV5.js → pattern-usage-recorder-TPWPX32U.js} +2 -2
  251. package/dist/cli/chunks/{pipeline-5NSFQQIX.js → pipeline-4BBGTE4M.js} +2 -2
  252. package/dist/cli/chunks/{platform-SQM34J5G.js → platform-5GSHXCV5.js} +2 -2
  253. package/dist/cli/chunks/{plugin-UQJZRMZG.js → plugin-OFDVF5HS.js} +2 -2
  254. package/dist/cli/chunks/{prime-radiant-advanced-wasm-WMDJOL4S.js → prime-radiant-advanced-wasm-NC6MUYGJ.js} +2 -2
  255. package/dist/cli/chunks/project-root-DDGBWDP6.js +2 -0
  256. package/dist/cli/chunks/protocol-executor-KBOLLCWA.js +2 -0
  257. package/dist/cli/chunks/{protocol-handler-OBDCVY6X.js → protocol-handler-MPOAAEPA.js} +2 -2
  258. package/dist/cli/chunks/{prove-XDC7I4XT.js → prove-CDKMAIVM.js} +2 -2
  259. package/dist/cli/chunks/qe-reasoning-bank-GRXBT7FC.js +2 -0
  260. package/dist/cli/chunks/{quality-L4GQ6WX4.js → quality-ZH4F7R7R.js} +2 -2
  261. package/dist/cli/chunks/{quality-gate-MJG66LKN.js → quality-gate-IDRMW6OE.js} +3 -3
  262. package/dist/cli/chunks/queen-coordinator-L2QWMJ5Q.js +2 -0
  263. package/dist/cli/chunks/{real-embeddings-HW4G2LWL.js → real-embeddings-I2UVNNB3.js} +2 -2
  264. package/dist/cli/chunks/{ref-validation-FC7JOJ2C.js → ref-validation-Z5GCGVXK.js} +2 -2
  265. package/dist/cli/chunks/{roocode-installer-KWS4CEIC.js → roocode-installer-IZ2S7PH2.js} +2 -2
  266. package/dist/cli/chunks/router-FT5WJPUH.js +2 -0
  267. package/dist/cli/chunks/routing-feedback-EO2MKOUX.js +2 -0
  268. package/dist/cli/chunks/{routing-handler-QF4WVB2S.js → routing-handler-NAX35VUW.js} +2 -2
  269. package/dist/cli/chunks/{ruvector-commands-2MTCOUK6.js → ruvector-commands-5YW2SOFF.js} +2 -2
  270. package/dist/cli/chunks/rvf-dual-writer-WHBFQJVU.js +2 -0
  271. package/dist/cli/chunks/rvf-migration-adapter-YT3APF2I.js +2 -0
  272. package/dist/cli/chunks/{rvf-migration-coordinator-BREJCXWN.js → rvf-migration-coordinator-VUIZHTVG.js} +2 -2
  273. package/dist/cli/chunks/rvf-native-adapter-37PUFKQD.js +2 -0
  274. package/dist/cli/chunks/{rvf-store-integrity-KKC6HOJD.js → rvf-store-integrity-IPGCAT6C.js} +2 -2
  275. package/dist/cli/chunks/safe-db-TDZKUOZJ.js +2 -0
  276. package/dist/cli/chunks/schedule-CRKTRY2A.js +2 -0
  277. package/dist/cli/chunks/scheduler-6ZBDVQWN.js +2 -0
  278. package/dist/cli/chunks/{security-OSAE7VAP.js → security-3IH4BO5Z.js} +3 -3
  279. package/dist/cli/chunks/{shared-rvf-adapter-COUOS665.js → shared-rvf-adapter-ABY7PAY2.js} +2 -2
  280. package/dist/cli/chunks/{shared-rvf-dual-writer-YXMPZKQE.js → shared-rvf-dual-writer-6KENLN2W.js} +2 -2
  281. package/dist/cli/chunks/sqlite-persistence-FFJQAIKW.js +2 -0
  282. package/dist/cli/chunks/{standalone-memory-E6JBMOIL.js → standalone-memory-RLFAUGOW.js} +2 -2
  283. package/dist/cli/chunks/{status-handler-AFTCIYIX.js → status-handler-FCOZBPE5.js} +2 -2
  284. package/dist/cli/chunks/{structural-health-2FROCEI4.js → structural-health-4RDA5UUM.js} +2 -2
  285. package/dist/cli/chunks/{sync-VAYTOWDC.js → sync-54LUAUTK.js} +2 -2
  286. package/dist/cli/chunks/{sync-YIQYOFGW.js → sync-KGEEXXCC.js} +2 -2
  287. package/dist/cli/chunks/{task-handler-KVQHDEX3.js → task-handler-K3OXHYKU.js} +2 -2
  288. package/dist/cli/chunks/{task-handlers-MVVECQA6.js → task-handlers-6H7L2UT4.js} +3 -3
  289. package/dist/cli/chunks/{test-5JSVTOMY.js → test-S7IG6EIX.js} +4 -4
  290. package/dist/cli/chunks/test-runner-process-OTQDAJLN.js +2 -0
  291. package/dist/cli/chunks/{test-scheduling-HBOHVLI3.js → test-scheduling-7XYXI4L2.js} +3 -3
  292. package/dist/cli/chunks/{token-bootstrap-5VEPTPFA.js → token-bootstrap-3QMABE45.js} +2 -2
  293. package/dist/cli/chunks/{token-usage-TBJHDLY6.js → token-usage-Y2YTPOFE.js} +2 -2
  294. package/dist/cli/chunks/{transformers-VAWYMHMZ.js → transformers-UCJ3HHHC.js} +2 -2
  295. package/dist/cli/chunks/tree-sitter-wasm-parser-D6JTTHTP.js +2 -0
  296. package/dist/cli/chunks/{types-R5SDZU2E.js → types-6CMFPETH.js} +2 -2
  297. package/dist/cli/chunks/unified-memory-QARWQKJ2.js +2 -0
  298. package/dist/cli/chunks/unified-memory-hnsw-LHY3DXCP.js +2 -0
  299. package/dist/cli/chunks/unified-persistence-WEYYGLHM.js +2 -0
  300. package/dist/cli/chunks/{upgrade-K5PIHXRB.js → upgrade-K25DN6WU.js} +2 -2
  301. package/dist/cli/chunks/{validate-RPTS7RYJ.js → validate-T4V3TBY3.js} +2 -2
  302. package/dist/cli/chunks/{validate-swarm-B2ZL556X.js → validate-swarm-XSRC576T.js} +2 -2
  303. package/dist/cli/chunks/visual-security-O4ALMCXQ.js +2 -0
  304. package/dist/cli/chunks/{web-tree-sitter-K4DUJC32.js → web-tree-sitter-YOZXHRTN.js} +2 -2
  305. package/dist/cli/chunks/{windsurf-installer-OK2AJN35.js → windsurf-installer-ITPU2IYL.js} +2 -2
  306. package/dist/cli/chunks/witness-chain-B3YW5NMS.js +2 -0
  307. package/dist/cli/chunks/witness-chain-PIYR72HJ.js +2 -0
  308. package/dist/cli/chunks/{witness-chain-repair-L6Y5RFXR.js → witness-chain-repair-YUG7E3UX.js} +2 -2
  309. package/dist/cli/chunks/{witness-chain-verifier-N4CW7FZX.js → witness-chain-verifier-DTDSVKOG.js} +2 -2
  310. package/dist/cli/chunks/{witness-key-manager-TDNPS3WD.js → witness-key-manager-EWACWGAW.js} +2 -2
  311. package/dist/cli/chunks/{workflow-XRZA3YCY.js → workflow-ZIQ4FV42.js} +4 -4
  312. package/dist/cli/chunks/workflow-orchestrator-3ZN2BCGY.js +2 -0
  313. package/dist/cli/chunks/{wrappers-5JIFWKN6.js → wrappers-PW2O27LL.js} +2 -2
  314. package/dist/cli/commands/coverage.js +6 -0
  315. package/dist/cli/commands/learning-prune.d.ts +14 -0
  316. package/dist/cli/commands/learning-prune.js +105 -0
  317. package/dist/cli/commands/learning.js +9 -0
  318. package/dist/cli/handlers/brain-handler.js +12 -1
  319. package/dist/cli/utils/coverage-verdict.js +14 -3
  320. package/dist/context/compaction/index.d.ts +7 -0
  321. package/dist/context/compaction/index.js +30 -6
  322. package/dist/coordination/handlers/coverage-evidence.d.ts +19 -0
  323. package/dist/coordination/handlers/coverage-evidence.js +31 -2
  324. package/dist/coordination/handlers/coverage-handlers.js +5 -1
  325. package/dist/coordination/handlers/coverage-target.js +8 -1
  326. package/dist/coordination/handlers/quality-handlers.js +9 -1
  327. package/dist/coordination/result-saver-adapters.js +1 -0
  328. package/dist/coordination/result-saver.js +9 -5
  329. package/dist/domains/chaos-resilience/services/chaos-engineer.d.ts +1 -0
  330. package/dist/domains/chaos-resilience/services/chaos-engineer.js +23 -45
  331. package/dist/domains/coverage-analysis/collected-metrics.d.ts +22 -6
  332. package/dist/domains/coverage-analysis/collected-metrics.js +37 -12
  333. package/dist/domains/coverage-analysis/services/coverage-analyzer.js +2 -0
  334. package/dist/domains/defect-intelligence/services/defect-predictor.js +3 -6
  335. package/dist/domains/quality-assessment/coverage-report-event.d.ts +8 -0
  336. package/dist/domains/quality-assessment/coverage-report-event.js +22 -1
  337. package/dist/domains/quality-assessment/interfaces.d.ts +6 -0
  338. package/dist/domains/quality-assessment/services/quality-analyzer.d.ts +4 -0
  339. package/dist/domains/quality-assessment/services/quality-analyzer.js +63 -17
  340. package/dist/domains/test-execution/interfaces.d.ts +5 -0
  341. package/dist/domains/test-execution/services/test-executor.js +6 -0
  342. package/dist/init/phases/07-hooks.js +90 -6
  343. package/dist/integrations/ruvector/brain-rvf-exporter.d.ts +25 -0
  344. package/dist/integrations/ruvector/brain-rvf-exporter.js +154 -61
  345. package/dist/learning/dream/dream-engine.d.ts +24 -1
  346. package/dist/learning/dream/dream-engine.js +57 -6
  347. package/dist/learning/learning-retention.d.ts +103 -0
  348. package/dist/learning/learning-retention.js +213 -0
  349. package/dist/mcp/bundle.js +494 -489
  350. package/dist/mcp/handlers/domain-handler-configs.d.ts +9 -1
  351. package/dist/mcp/handlers/domain-handler-configs.js +24 -14
  352. package/dist/mcp/protocol-server.js +1 -1
  353. package/dist/mcp/tools/chaos-resilience/inject.d.ts +3 -4
  354. package/dist/mcp/tools/chaos-resilience/inject.js +11 -81
  355. package/dist/mcp/tools/learning-optimization/dream.d.ts +8 -0
  356. package/dist/mcp/tools/learning-optimization/dream.js +4 -0
  357. package/package.json +1 -1
  358. package/dist/cli/chunks/adapter-KCQDVYY2.js +0 -2
  359. package/dist/cli/chunks/aqe-learning-engine-SAQOHSGN.js +0 -2
  360. package/dist/cli/chunks/base-WCACU3FN.js +0 -2
  361. package/dist/cli/chunks/brain-handler-GTQNHHZS.js +0 -94
  362. package/dist/cli/chunks/browser-workflow-G6IASEAP.js +0 -2
  363. package/dist/cli/chunks/chunk-K65CGKLD.js +0 -8
  364. package/dist/cli/chunks/chunk-MB46UBGY.js +0 -3
  365. package/dist/cli/chunks/chunk-N4CYAKOX.js +0 -79
  366. package/dist/cli/chunks/chunk-PT4FMJPQ.js +0 -3
  367. package/dist/cli/chunks/chunk-S5AZCIZS.js +0 -2
  368. package/dist/cli/chunks/chunk-UT2VZ33P.js +0 -2
  369. package/dist/cli/chunks/client-TV3V2YZ5.js +0 -2
  370. package/dist/cli/chunks/core-handlers-PZT4OLWR.js +0 -2
  371. package/dist/cli/chunks/coverage-NV3C4IMM.js +0 -50
  372. package/dist/cli/chunks/cross-domain-router-QOFCZ7G4.js +0 -2
  373. package/dist/cli/chunks/dream-TRFBGDSQ.js +0 -2
  374. package/dist/cli/chunks/file-discovery-WCKGMSPZ.js +0 -2
  375. package/dist/cli/chunks/heartbeat-scheduler-P44A2OX3.js +0 -2
  376. package/dist/cli/chunks/hnsw-adapter-ZJQIQJKC.js +0 -2
  377. package/dist/cli/chunks/hnsw-index-HMG2GH3Z.js +0 -2
  378. package/dist/cli/chunks/hybrid-backend-B7M74PZG.js +0 -2
  379. package/dist/cli/chunks/impact-analyzer-PZYOVKQO.js +0 -2
  380. package/dist/cli/chunks/init-wizard-TZDJQK3U.js +0 -2
  381. package/dist/cli/chunks/kernel-Y6RRIOKW.js +0 -2
  382. package/dist/cli/chunks/knowledge-graph-BVD5Z66M.js +0 -2
  383. package/dist/cli/chunks/learning-6KDH7FK4.js +0 -122
  384. package/dist/cli/chunks/llm-router-service-KHCAMSUU.js +0 -2
  385. package/dist/cli/chunks/load-test-RUF7DZA5.js +0 -2
  386. package/dist/cli/chunks/memory-backend-7ZLFOVGG.js +0 -2
  387. package/dist/cli/chunks/pattern-null-store-RY6CVYHP.js +0 -2
  388. package/dist/cli/chunks/project-root-IO5KRNGL.js +0 -2
  389. package/dist/cli/chunks/protocol-executor-U2CUDWDE.js +0 -2
  390. package/dist/cli/chunks/qe-reasoning-bank-DQSSX2IP.js +0 -2
  391. package/dist/cli/chunks/queen-coordinator-6FN4BZIX.js +0 -2
  392. package/dist/cli/chunks/router-YUO3I7RU.js +0 -2
  393. package/dist/cli/chunks/routing-feedback-36SLQGJE.js +0 -2
  394. package/dist/cli/chunks/rvf-dual-writer-FRYZH3WZ.js +0 -2
  395. package/dist/cli/chunks/rvf-migration-adapter-XXNITL5I.js +0 -2
  396. package/dist/cli/chunks/rvf-native-adapter-D2WWKJIV.js +0 -2
  397. package/dist/cli/chunks/safe-db-4RRIGRXD.js +0 -2
  398. package/dist/cli/chunks/schedule-25RTO4DQ.js +0 -2
  399. package/dist/cli/chunks/scheduler-BPIOJZ5P.js +0 -2
  400. package/dist/cli/chunks/sqlite-persistence-EDF47DDX.js +0 -2
  401. package/dist/cli/chunks/test-runner-process-LEPF2OSS.js +0 -2
  402. package/dist/cli/chunks/tree-sitter-wasm-parser-TSZTCMFV.js +0 -2
  403. package/dist/cli/chunks/unified-memory-TLGSSLMI.js +0 -2
  404. package/dist/cli/chunks/unified-memory-hnsw-MSUR7ZOO.js +0 -2
  405. package/dist/cli/chunks/unified-persistence-VFFOTWK7.js +0 -2
  406. package/dist/cli/chunks/visual-security-6Q44XNLB.js +0 -2
  407. package/dist/cli/chunks/witness-chain-KDOMXDQX.js +0 -2
  408. package/dist/cli/chunks/witness-chain-N3OY2RMH.js +0 -2
  409. package/dist/cli/chunks/workflow-orchestrator-CVNNT2RJ.js +0 -2
@@ -1,2 +1,2 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.13");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.15.14");process.exit(0)}
2
2
  var l=["ECONNREFUSED","ETIMEOUT","ENOMEM","ENOSPC"];var s={successRate:.1,failureRate:1,viabilityThreshold:.3,rehabilitationThreshold:10,maxQuarantineDurationMs:6048e5,domainOverrides:{"security-compliance":{successRate:.05,failureRate:1,viabilityThreshold:.5},"test-generation":{successRate:.15,failureRate:1,viabilityThreshold:.2},"quality-assessment":{successRate:.1,failureRate:1,viabilityThreshold:.4}}},a=class{config;_witnessChain=null;set witnessChain(e){this._witnessChain=e}constructor(e={}){this.config={...s,...e,domainOverrides:{...s.domainOverrides,...e.domainOverrides}}}computeConfidenceUpdate(e,r,i){let{successRate:u,failureRate:o}=this.getConfigForDomain(i),n=r==="success"?u:-o;if(r==="failure")try{this._witnessChain?.append("HEBBIAN_PENALTY",{previousConfidence:e,delta:n,domain:i},"asymmetric-learning")}catch{}return c(e+n,0,1)}shouldQuarantine(e,r){let{viabilityThreshold:i}=this.getConfigForDomain(r);return{shouldQuarantine:e<i,confidence:e,viabilityThreshold:i,domain:r}}classifyFailure(e){if(e.infrastructureHealthy===!1||e.durationMs!==void 0&&e.durationMs>3e4)return"infrastructure";if(e.errorMessage){let r=e.errorMessage.toUpperCase();for(let i of l)if(r.includes(i))return"infrastructure"}return e.failureCategory==="infrastructure"?"infrastructure":(e.failureCategory==="pattern","pattern")}checkRehabilitation(e,r){let i=this.config.rehabilitationThreshold;return{canRehabilitate:e>=i,consecutiveSuccesses:e,requiredSuccesses:i,domain:r}}getConfigForDomain(e){return e&&this.config.domainOverrides?.[e]?this.config.domainOverrides[e]:{successRate:this.config.successRate,failureRate:this.config.failureRate,viabilityThreshold:this.config.viabilityThreshold}}getAsymmetryRatio(e){let{successRate:r,failureRate:i}=this.getConfigForDomain(e);return r===0?1/0:i/r}};function c(t,e,r){return t<e?e:t>r?r:t}export{a};
@@ -1,5 +1,5 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.13");process.exit(0)}
2
- import{s as g}from"./chunk-WKGTGOYS.js";var m={0:"sqlite-only",1:"hybrid",2:"dual-write-sqlite-primary",3:"dual-write-rvf-primary",4:"rvf-primary"},b=class{config;db=null;rvfStore=null;totalWrites=0;totalReads=0;rvfWriteFailures=0;rvfReadFailures=0;fallbacksUsed=0;sqliteLatencies=[];rvfLatencies=[];sqliteWriteLatencies=[];rvfWriteLatencies=[];constructor(e){this.config={rvfPath:".agentic-qe/patterns.rvf",dimensions:384,enableFallback:!0,...e}}setSqliteDb(e){this.db=e}setRvfStore(e){this.rvfStore=e}get stage(){return this.config.stage}setStage(e){this.config={...this.config,stage:e}}write(e,t){this.totalWrites++;let r={sqliteSuccess:!1,rvfSuccess:!1,stage:this.config.stage,fallbackUsed:!1},n=this.db?this.db.prepare("PRAGMA table_info('qe_pattern_embeddings')").all().some(s=>s.name==="space_id"):!1,c=g()?.spaceId??this.config.embeddingSpaceId;if(!n||!c)return r;let o=this.config.stage<4,i=this.config.stage>=2;if(o&&this.db){let s=performance.now();try{let a=Buffer.from(t instanceof Float32Array?t.buffer:new Float32Array(t).buffer);n?this.db.prepare(`
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.15.14");process.exit(0)}
2
+ import{s as g}from"./chunk-L752CNG3.js";var m={0:"sqlite-only",1:"hybrid",2:"dual-write-sqlite-primary",3:"dual-write-rvf-primary",4:"rvf-primary"},b=class{config;db=null;rvfStore=null;totalWrites=0;totalReads=0;rvfWriteFailures=0;rvfReadFailures=0;fallbacksUsed=0;sqliteLatencies=[];rvfLatencies=[];sqliteWriteLatencies=[];rvfWriteLatencies=[];constructor(e){this.config={rvfPath:".agentic-qe/patterns.rvf",dimensions:384,enableFallback:!0,...e}}setSqliteDb(e){this.db=e}setRvfStore(e){this.rvfStore=e}get stage(){return this.config.stage}setStage(e){this.config={...this.config,stage:e}}write(e,t){this.totalWrites++;let r={sqliteSuccess:!1,rvfSuccess:!1,stage:this.config.stage,fallbackUsed:!1},n=this.db?this.db.prepare("PRAGMA table_info('qe_pattern_embeddings')").all().some(s=>s.name==="space_id"):!1,c=g()?.spaceId??this.config.embeddingSpaceId;if(!n||!c)return r;let o=this.config.stage<4,i=this.config.stage>=2;if(o&&this.db){let s=performance.now();try{let a=Buffer.from(t instanceof Float32Array?t.buffer:new Float32Array(t).buffer);n?this.db.prepare(`
3
3
  INSERT INTO qe_pattern_embeddings (pattern_id, embedding, dimension, model, space_id, created_at)
4
4
  VALUES (?, ?, ?, 'all-MiniLM-L6-v2', ?, datetime('now'))
5
5
  ON CONFLICT(pattern_id) DO UPDATE SET
@@ -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.15.14");process.exit(0)}
2
+ import{d as a,e as m}from"./chunk-43XHGWYH.js";var o=n=>typeof n=="number"&&Number.isFinite(n)&&n>=0&&n<=100,l=n=>n===null||o(n);function f(n){if(!n||typeof n!="object")return null;let e=n;if(e.measured!==!0||!o(e.line)||!l(e.statement)||!l(e.branch)||!l(e.function))return null;let r=typeof e.files=="number"&&Number.isInteger(e.files)&&e.files>=0?e.files:null;return r===null?null:{line:e.line,branch:e.branch,function:e.function,statement:e.statement,files:r,measured:!0,...e.runStatus==="passed"||e.runStatus==="failed"?{runStatus:e.runStatus}:{}}}function b(n){if(!n||typeof n!="object")return null;let e=n;if(e.measured!==!0||!o(e.line))return null;let r=t=>o(t)?t:null,u=c(e.lines,e.line);return{line:e.line,branch:r(e.branch),function:r(e.function),statement:r(e.statement),measured:!0,...u?{lines:u}:{}}}function c(n,e){if(!n||typeof n!="object")return;let{covered:r,total:u}=n;if(!Number.isSafeInteger(r)||!Number.isSafeInteger(u))return;let t=r,i=u;if(!(i<=0||t<0||t>i||Math.abs(t/i*100-e)>.01))return{covered:t,total:i}}m();var s=class extends Error{constructor(e,r){super(`git ${e.join(" ")} timed out after ${Math.max(0,r)}ms`),this.name="GitTimeoutError"}};async function g(n,e){if(e.timeout<=0)throw new s(n,e.timeout);try{return await a("git",n,{cwd:e.cwd,timeout:e.timeout,maxBuffer:e.maxBuffer,env:{...process.env,GIT_TERMINAL_PROMPT:"0"}})}catch(r){throw r.code==="ETIMEDOUT"?new s(n,e.timeout):r}}export{f as a,b,s as c,g as d};
@@ -1,2 +1,2 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.13");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.15.14");process.exit(0)}
2
2
  var N="ffffffff-ffff-ffff-ffff-ffffffffffff";var _="00000000-0000-0000-0000-000000000000";var y=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;function k(r){return typeof r=="string"&&y.test(r)}var u=k;function q(r){if(!u(r))throw TypeError("Invalid UUID");let n;return Uint8Array.of((n=parseInt(r.slice(0,8),16))>>>24,n>>>16&255,n>>>8&255,n&255,(n=parseInt(r.slice(9,13),16))>>>8,n&255,(n=parseInt(r.slice(14,18),16))>>>8,n&255,(n=parseInt(r.slice(19,23),16))>>>8,n&255,(n=parseInt(r.slice(24,36),16))/1099511627776&255,n/4294967296&255,n>>>24&255,n>>>16&255,n>>>8&255,n&255)}var c=q;var x=[];for(let r=0;r<256;++r)x.push((r+256).toString(16).slice(1));function l(r,n=0){return(x[r[n+0]]+x[r[n+1]]+x[r[n+2]]+x[r[n+3]]+"-"+x[r[n+4]]+x[r[n+5]]+"-"+x[r[n+6]]+x[r[n+7]]+"-"+x[r[n+8]]+x[r[n+9]]+"-"+x[r[n+10]]+x[r[n+11]]+x[r[n+12]]+x[r[n+13]]+x[r[n+14]]+x[r[n+15]]).toLowerCase()}function C(r,n=0){let f=l(r,n);if(!u(f))throw TypeError("Stringified UUID is invalid");return f}var H=C;var v=new Uint8Array(16);function m(){return crypto.getRandomValues(v)}var g={};function X(r,n,f){let e,o=r?._v6??!1;if(r){let t=Object.keys(r);t.length===1&&t[0]==="_v6"&&(r=void 0)}if(r)e=E(r.random??r.rng?.()??m(),r.msecs,r.nsecs,r.clockseq,r.node,n,f);else{let t=Date.now(),i=m();j(g,t,i),e=E(i,g.msecs,g.nsecs,o?void 0:g.clockseq,o?void 0:g.node,n,f)}return n??l(e)}function j(r,n,f){return r.msecs??=-1/0,r.nsecs??=0,n===r.msecs?(r.nsecs++,r.nsecs>=1e4&&(r.node=void 0,r.nsecs=0)):n>r.msecs?r.nsecs=0:n<r.msecs&&(r.node=void 0),r.node||(r.node=f.slice(10,16),r.node[0]|=1,r.clockseq=(f[8]<<8|f[9])&16383),r.msecs=n,r}function E(r,n,f,e,o,t,i=0){if(r.length<16)throw new Error("Random bytes length must be >= 16");if(!t)t=new Uint8Array(16),i=0;else if(i<0||i+16>t.length)throw new RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`);n??=Date.now(),f??=0,e??=(r[8]<<8|r[9])&16383,o??=r.slice(10,16),n+=122192928e5;let d=((n&268435455)*1e4+f)%4294967296;t[i++]=d>>>24&255,t[i++]=d>>>16&255,t[i++]=d>>>8&255,t[i++]=d&255;let a=n/4294967296*1e4&268435455;t[i++]=a>>>8&255,t[i++]=a&255,t[i++]=a>>>24&15|16,t[i++]=a>>>16&255,t[i++]=e>>>8|128,t[i++]=e&255;for(let p=0;p<6;++p)t[i++]=o[p];return t}var D=X;function U(r){let n=typeof r=="string"?c(r):r,f=G(n);return typeof r=="string"?l(f):f}function G(r){return Uint8Array.of((r[6]&15)<<4|r[7]>>4&15,(r[7]&15)<<4|(r[4]&240)>>4,(r[4]&15)<<4|(r[5]&240)>>4,(r[5]&15)<<4|(r[0]&240)>>4,(r[0]&15)<<4|(r[1]&240)>>4,(r[1]&15)<<4|(r[2]&240)>>4,96|r[2]&15,r[3],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15])}import{createHash as K}from"node:crypto";function M(r){return Array.isArray(r)?r=Buffer.from(r):typeof r=="string"&&(r=Buffer.from(r,"utf8")),K("md5").update(r).digest()}var T=M;function O(r){r=unescape(encodeURIComponent(r));let n=new Uint8Array(r.length);for(let f=0;f<r.length;++f)n[f]=r.charCodeAt(f);return n}var w="6ba7b810-9dad-11d1-80b4-00c04fd430c8",I="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function h(r,n,f,e,o,t){let i=typeof f=="string"?O(f):f,d=typeof e=="string"?c(e):e;if(typeof e=="string"&&(e=c(e)),e?.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let a=new Uint8Array(16+i.length);if(a.set(d),a.set(i,d.length),a=n(a),a[6]=a[6]&15|r,a[8]=a[8]&63|128,o){if(t??=0,t<0||t+16>o.length)throw new RangeError(`UUID byte range ${t}:${t+15} is out of buffer bounds`);for(let p=0;p<16;++p)o[t+p]=a[p];return o}return l(a)}function S(r,n,f,e){return h(48,T,r,n,f,e)}S.DNS=w;S.URL=I;var z=S;function F(r,n,f){return!n&&!r&&crypto.randomUUID?crypto.randomUUID():J(r,n,f)}function J(r,n,f){r=r||{};let e=r.random??r.rng?.()??m();if(e.length<16)throw new Error("Random bytes length must be >= 16");if(e[6]=e[6]&15|64,e[8]=e[8]&63|128,n){if(f=f||0,f<0||f+16>n.length)throw new RangeError(`UUID byte range ${f}:${f+15} is out of buffer bounds`);for(let o=0;o<16;++o)n[f+o]=e[o];return n}return l(e)}var P=F;import{createHash as Q}from"node:crypto";function W(r){return Array.isArray(r)?r=Buffer.from(r):typeof r=="string"&&(r=Buffer.from(r,"utf8")),Q("sha1").update(r).digest()}var V=W;function R(r,n,f,e){return h(80,V,r,n,f,e)}R.DNS=w;R.URL=I;var Y=R;function Z(r,n,f){r??={},f??=0;let e=D({...r,_v6:!0},new Uint8Array(16));if(e=U(e),n){if(f<0||f+16>n.length)throw new RangeError(`UUID byte range ${f}:${f+15} is out of buffer bounds`);for(let o=0;o<16;o++)n[f+o]=e[o];return n}return l(e)}var s=Z;function $(r){let n=typeof r=="string"?c(r):r,f=b(n);return typeof r=="string"?l(f):f}function b(r){return Uint8Array.of((r[3]&15)<<4|r[4]>>4&15,(r[4]&15)<<4|(r[5]&240)>>4,(r[5]&15)<<4|r[6]&15,r[7],(r[1]&15)<<4|(r[2]&240)>>4,(r[2]&15)<<4|(r[3]&240)>>4,16|(r[0]&240)>>4,(r[0]&15)<<4|(r[1]&240)>>4,r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15])}var A={};function B(r,n,f){let e;if(r)e=L(r.random??r.rng?.()??m(),r.msecs,r.seq,n,f);else{let o=Date.now(),t=m();r0(A,o,t),e=L(t,A.msecs,A.seq,n,f)}return n??l(e)}function r0(r,n,f){return r.msecs??=-1/0,r.seq??=0,n>r.msecs?(r.seq=f[6]<<23|f[7]<<16|f[8]<<8|f[9],r.msecs=n):(r.seq=r.seq+1|0,r.seq===0&&r.msecs++),r}function L(r,n,f,e,o=0){if(r.length<16)throw new Error("Random bytes length must be >= 16");if(!e)e=new Uint8Array(16),o=0;else if(o<0||o+16>e.length)throw new RangeError(`UUID byte range ${o}:${o+15} is out of buffer bounds`);return n??=Date.now(),f??=r[6]*127<<24|r[7]<<16|r[8]<<8|r[9],e[o++]=n/1099511627776&255,e[o++]=n/4294967296&255,e[o++]=n/16777216&255,e[o++]=n/65536&255,e[o++]=n/256&255,e[o++]=n&255,e[o++]=112|f>>>28&15,e[o++]=f>>>20&255,e[o++]=128|f>>>14&63,e[o++]=f>>>6&255,e[o++]=f<<2&255|r[10]&3,e[o++]=r[11],e[o++]=r[12],e[o++]=r[13],e[o++]=r[14],e[o++]=r[15],e}var n0=B;function f0(r){if(!u(r))throw TypeError("Invalid UUID");return parseInt(r.slice(14,15),16)}var e0=f0;export{N as a,_ as b,u as c,c as d,H as e,D as f,U as g,z as h,P as i,Y as j,s as k,$ as l,n0 as m,e0 as n};
@@ -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.15.13");process.exit(0)}
2
- import{a as c,e as h}from"./chunk-TWDW32W2.js";import{a as l,d}from"./chunk-DVGRPK7A.js";d();h();var u=class{store=new Map;vectors=new Map;cleanupInterval;async initialize(){this.cleanupInterval=setInterval(()=>this.cleanup(),c.CLEANUP_INTERVAL_MS),this.cleanupInterval.unref&&this.cleanupInterval.unref()}async dispose(){this.cleanupInterval&&clearInterval(this.cleanupInterval),this.store.clear(),this.vectors.clear()}async set(t,r,e){let s={value:r,namespace:e?.namespace??"default",createdAt:Date.now()};e?.ttl&&(s.expiresAt=Date.now()+e.ttl*c.TTL_MULTIPLIER_MS);let n=this.buildKey(t,e?.namespace);this.store.set(n,s)}async get(t,r){let e=this.buildKey(t,r?.namespace),s=this.store.get(e);if(s){if(s.expiresAt&&Date.now()>s.expiresAt){this.store.delete(e);return}return s.value}}async delete(t,r){let e=this.buildKey(t,r?.namespace);return this.store.delete(e)}async has(t,r){return await this.get(t,r)!==void 0}async search(t,r=c.DEFAULT_SEARCH_LIMIT,e){let s=t.replace(/[.+^${}()|[\]\\]/g,"\\$&"),n=new RegExp(`^${s.replace(/\*/g,".*").replace(/\?/g,".")}$`,"su"),i=[],o=e?.namespace?`${e.namespace}:`:void 0;for(let a of this.store.keys()){if(o&&!a.startsWith(o))continue;let p=o?a.slice(o.length):a;if(n.test(p)&&(i.push(a),i.length>=r))break}return i}async vectorSearch(t,r,e){let s=[];for(let[n,i]of this.vectors.entries()){if(e&&!n.startsWith(e))continue;let o=l(t,i.embedding);s.push({key:n,score:o,metadata:i.metadata})}return s.sort((n,i)=>i.score-n.score).slice(0,r)}getVectorSearchProvenance(){return{backend:"in-memory",indexType:"flat",approximate:!1,estimatedRecall:1}}async storeVector(t,r,e){this.vectors.set(t,{embedding:r,metadata:e})}buildKey(t,r){return r?`${r}:${t}`:t}cleanup(){let t=Date.now();for(let[r,e]of this.store.entries())e.expiresAt&&t>e.expiresAt&&this.store.delete(r)}getStats(){return{entries:this.store.size,vectors:this.vectors.size}}async clear(t){if(t){let r=`${t}:`;for(let e of this.store.keys())e.startsWith(r)&&this.store.delete(e)}else this.store.clear()}async count(t){let r=0,e=`${t}:`;for(let s of this.store.keys())if(s.startsWith(e)){let n=this.store.get(s);n&&(!n.expiresAt||Date.now()<=n.expiresAt)&&r++}return r}async hasCodeIntelligenceIndex(){return await this.count("code-intelligence:kg")>0}};export{u as a};
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.14");process.exit(0)}
2
+ import{a as c,e as h}from"./chunk-7SQTLUEN.js";import{a as l,d}from"./chunk-BNG4J3CE.js";d();h();var u=class{store=new Map;vectors=new Map;cleanupInterval;async initialize(){this.cleanupInterval=setInterval(()=>this.cleanup(),c.CLEANUP_INTERVAL_MS),this.cleanupInterval.unref&&this.cleanupInterval.unref()}async dispose(){this.cleanupInterval&&clearInterval(this.cleanupInterval),this.store.clear(),this.vectors.clear()}async set(t,r,e){let s={value:r,namespace:e?.namespace??"default",createdAt:Date.now()};e?.ttl&&(s.expiresAt=Date.now()+e.ttl*c.TTL_MULTIPLIER_MS);let n=this.buildKey(t,e?.namespace);this.store.set(n,s)}async get(t,r){let e=this.buildKey(t,r?.namespace),s=this.store.get(e);if(s){if(s.expiresAt&&Date.now()>s.expiresAt){this.store.delete(e);return}return s.value}}async delete(t,r){let e=this.buildKey(t,r?.namespace);return this.store.delete(e)}async has(t,r){return await this.get(t,r)!==void 0}async search(t,r=c.DEFAULT_SEARCH_LIMIT,e){let s=t.replace(/[.+^${}()|[\]\\]/g,"\\$&"),n=new RegExp(`^${s.replace(/\*/g,".*").replace(/\?/g,".")}$`,"su"),i=[],o=e?.namespace?`${e.namespace}:`:void 0;for(let a of this.store.keys()){if(o&&!a.startsWith(o))continue;let p=o?a.slice(o.length):a;if(n.test(p)&&(i.push(a),i.length>=r))break}return i}async vectorSearch(t,r,e){let s=[];for(let[n,i]of this.vectors.entries()){if(e&&!n.startsWith(e))continue;let o=l(t,i.embedding);s.push({key:n,score:o,metadata:i.metadata})}return s.sort((n,i)=>i.score-n.score).slice(0,r)}getVectorSearchProvenance(){return{backend:"in-memory",indexType:"flat",approximate:!1,estimatedRecall:1}}async storeVector(t,r,e){this.vectors.set(t,{embedding:r,metadata:e})}buildKey(t,r){return r?`${r}:${t}`:t}cleanup(){let t=Date.now();for(let[r,e]of this.store.entries())e.expiresAt&&t>e.expiresAt&&this.store.delete(r)}getStats(){return{entries:this.store.size,vectors:this.vectors.size}}async clear(t){if(t){let r=`${t}:`;for(let e of this.store.keys())e.startsWith(r)&&this.store.delete(e)}else this.store.clear()}async count(t){let r=0,e=`${t}:`;for(let s of this.store.keys())if(s.startsWith(e)){let n=this.store.get(s);n&&(!n.expiresAt||Date.now()<=n.expiresAt)&&r++}return r}async hasCodeIntelligenceIndex(){return await this.count("code-intelligence:kg")>0}};export{u as a};
@@ -1,2 +1,2 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.13");process.exit(0)}
2
- import{i as t}from"./chunk-H4H2YSFH.js";function g(e,n,r,a){return{id:t(),type:e,timestamp:new Date,source:n,correlationId:a,payload:r}}var i={TestGenerated:"test-generation.TestGenerated",TestSuiteCreated:"test-generation.TestSuiteCreated",PatternLearned:"test-generation.PatternLearned",GenerationFailed:"test-generation.GenerationFailed"},o={TestRunStarted:"test-execution.TestRunStarted",TestRunCompleted:"test-execution.TestRunCompleted",FlakyTestDetected:"test-execution.FlakyTestDetected",RetryTriggered:"test-execution.RetryTriggered"};function y(e){return!!e&&typeof e=="object"&&e.measured===!0}var s={CoverageReportCreated:"coverage-analysis.CoverageReportCreated",CoverageGapDetected:"coverage-analysis.CoverageGapDetected",RiskZoneIdentified:"coverage-analysis.RiskZoneIdentified"},d={QualityGateEvaluated:"quality-assessment.QualityGateEvaluated",DeploymentApproved:"quality-assessment.DeploymentApproved",DeploymentBlocked:"quality-assessment.DeploymentBlocked"},l={DefectPredicted:"defect-intelligence.DefectPredicted",RootCauseIdentified:"defect-intelligence.RootCauseIdentified",RegressionRiskAnalyzed:"defect-intelligence.RegressionRiskAnalyzed"},c={KnowledgeGraphUpdated:"code-intelligence.KnowledgeGraphUpdated",ImpactAnalysisCompleted:"code-intelligence.ImpactAnalysisCompleted",SemanticSearchCompleted:"code-intelligence.SemanticSearchCompleted",C4DiagramsGenerated:"code-intelligence.C4DiagramsGenerated"},m={VulnerabilityDetected:"security-compliance.VulnerabilityDetected",ComplianceValidated:"security-compliance.ComplianceValidated",SecurityAuditCompleted:"security-compliance.SecurityAuditCompleted"},p={PatternConsolidated:"learning-optimization.PatternConsolidated",TransferCompleted:"learning-optimization.TransferCompleted",OptimizationApplied:"learning-optimization.OptimizationApplied",DreamCycleCompleted:"learning-optimization.dream.completed"},b={...i,...o,...s,...d,...l,...c,...m,...p};export{g as a,i as b,o as c,y as d,s as e,d as f,l as g,c as h,m as i,p as j};
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.15.14");process.exit(0)}
2
+ import{i as t}from"./chunk-QP6GL3O5.js";function g(e,n,r,a){return{id:t(),type:e,timestamp:new Date,source:n,correlationId:a,payload:r}}var i={TestGenerated:"test-generation.TestGenerated",TestSuiteCreated:"test-generation.TestSuiteCreated",PatternLearned:"test-generation.PatternLearned",GenerationFailed:"test-generation.GenerationFailed"},o={TestRunStarted:"test-execution.TestRunStarted",TestRunCompleted:"test-execution.TestRunCompleted",FlakyTestDetected:"test-execution.FlakyTestDetected",RetryTriggered:"test-execution.RetryTriggered"};function y(e){return!!e&&typeof e=="object"&&e.measured===!0}var s={CoverageReportCreated:"coverage-analysis.CoverageReportCreated",CoverageGapDetected:"coverage-analysis.CoverageGapDetected",RiskZoneIdentified:"coverage-analysis.RiskZoneIdentified"},d={QualityGateEvaluated:"quality-assessment.QualityGateEvaluated",DeploymentApproved:"quality-assessment.DeploymentApproved",DeploymentBlocked:"quality-assessment.DeploymentBlocked"},l={DefectPredicted:"defect-intelligence.DefectPredicted",RootCauseIdentified:"defect-intelligence.RootCauseIdentified",RegressionRiskAnalyzed:"defect-intelligence.RegressionRiskAnalyzed"},c={KnowledgeGraphUpdated:"code-intelligence.KnowledgeGraphUpdated",ImpactAnalysisCompleted:"code-intelligence.ImpactAnalysisCompleted",SemanticSearchCompleted:"code-intelligence.SemanticSearchCompleted",C4DiagramsGenerated:"code-intelligence.C4DiagramsGenerated"},m={VulnerabilityDetected:"security-compliance.VulnerabilityDetected",ComplianceValidated:"security-compliance.ComplianceValidated",SecurityAuditCompleted:"security-compliance.SecurityAuditCompleted"},p={PatternConsolidated:"learning-optimization.PatternConsolidated",TransferCompleted:"learning-optimization.TransferCompleted",OptimizationApplied:"learning-optimization.OptimizationApplied",DreamCycleCompleted:"learning-optimization.dream.completed"},b={...i,...o,...s,...d,...l,...c,...m,...p};export{g as a,i as b,o as c,y as d,s as e,d as f,l as g,c as h,m as i,p as j};
@@ -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.15.13");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.15.14");process.exit(0)}
2
2
  var t=["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"];function i(e){return typeof e=="string"&&t.includes(e)}function o(e){return{success:!0,value:e}}function a(e){return{success:!1,error:e}}var n=["p0","p1","p2","p3"];function s(e){return typeof e=="string"&&n.includes(e)}function l(e){return`Invalid priority: ${e===""?"(empty)":String(e)}. Valid priorities: ${n.join(", ")}`}export{t as a,i as b,o as c,a as d,s as e,l as f};
@@ -1,2 +1,2 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.13");process.exit(0)}
2
- import{a as r,h as n}from"./chunk-SSU73QAX.js";var a={claude:"metered-api","claude-code":"subscription",codex:"subscription",openai:"metered-api",openrouter:"metered-api",gemini:"metered-api","azure-openai":"metered-api",bedrock:"metered-api",cognitum:"metered-capped",ollama:"local"};function o(e){return r(e)?a[e]:void 0}function p(e){return e.billingMode??o(e.type)??"metered-api"}function c(e){return o(e)??"metered-api"}function g(e,t){switch(t){case"metered-api":return`\u26A0\uFE0F LLM provider "${e}" bills a pay-per-token API key (not your Claude subscription) and has no server-side spend cap. Set a budget with --max-budget-usd / AQE_MAX_BUDGET_USD, or use AQE_LLM_PROVIDER=claude-code to run on your Claude Code subscription instead.`;case"metered-capped":return`\u2139\uFE0F LLM provider "${e}" bills per-token but enforces a server-side hard spend cap; it will pause at the cap rather than overspend.`;case"subscription":{let i=n(e);if(i){let d=i.detail?`declared by ${i.detail}`:`declared by ${i.source==="config"?"config":"the registering caller"}`;return`\u2139\uFE0F LLM provider "${e}" is an external provider that reports subscription billing (${d}) \u2014 AQE does not verify this. It draws on that host's own plan, not on your Claude Code or ChatGPT subscription.`}return`\u2139\uFE0F LLM provider "${e}" runs on your ${e==="codex"?"ChatGPT":"Claude Code"} subscription (shared plan usage). Worst case is hitting your plan's rate limit and pausing \u2014 no per-token API charges.`}case"local":return}}export{p as a,c as b,g as c};
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.14");process.exit(0)}
2
+ import{a as r,h as n}from"./chunk-4WLIOPHX.js";var a={claude:"metered-api","claude-code":"subscription",codex:"subscription",openai:"metered-api",openrouter:"metered-api",gemini:"metered-api","azure-openai":"metered-api",bedrock:"metered-api",cognitum:"metered-capped",ollama:"local"};function o(e){return r(e)?a[e]:void 0}function p(e){return e.billingMode??o(e.type)??"metered-api"}function c(e){return o(e)??"metered-api"}function g(e,t){switch(t){case"metered-api":return`\u26A0\uFE0F LLM provider "${e}" bills a pay-per-token API key (not your Claude subscription) and has no server-side spend cap. Set a budget with --max-budget-usd / AQE_MAX_BUDGET_USD, or use AQE_LLM_PROVIDER=claude-code to run on your Claude Code subscription instead.`;case"metered-capped":return`\u2139\uFE0F LLM provider "${e}" bills per-token but enforces a server-side hard spend cap; it will pause at the cap rather than overspend.`;case"subscription":{let i=n(e);if(i){let d=i.detail?`declared by ${i.detail}`:`declared by ${i.source==="config"?"config":"the registering caller"}`;return`\u2139\uFE0F LLM provider "${e}" is an external provider that reports subscription billing (${d}) \u2014 AQE does not verify this. It draws on that host's own plan, not on your Claude Code or ChatGPT subscription.`}return`\u2139\uFE0F LLM provider "${e}" runs on your ${e==="codex"?"ChatGPT":"Claude Code"} subscription (shared plan usage). Worst case is hitting your plan's rate limit and pausing \u2014 no per-token API charges.`}case"local":return}}export{p as a,c as b,g 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.15.13");process.exit(0)}
2
- import{a as n}from"./chunk-6KATY3KS.js";import{a as i}from"./chunk-LWR3FV3Y.js";import{a as o,e as d}from"./chunk-TWDW32W2.js";import{existsSync as m,statSync as s}from"node:fs";import{extname as l,join as c}from"node:path";d();var _=o.CLEANUP_INTERVAL_MS,y=".agentic-qe/memory.db";async function p(t,r=!0){let e;switch(t.type){case"memory":e=new i;break;case"sqlite":e=new n({sqlite:t.sqlite,enableFallback:!0});break;case"agentdb":e=new n({sqlite:{path:t.agentdb?.path??y},enableFallback:!0});break;case"hybrid":e=new n(t.hybrid);break;default:throw new Error(`Unknown memory backend type: ${t.type}`)}return r&&await e.initialize(),{backend:e,type:t.type,initialized:r}}async function P(t=!0){let r=process.env.AQE_MEMORY_BACKEND??"memory",e=process.env.AQE_MEMORY_PATH,a=e?e===":memory:"?e:m(e)?s(e).isDirectory()?c(e,"memory.db"):e:/\.(db|sqlite|sqlite3)$/i.test(l(e))?e:c(e,"memory.db"):y;return p({type:r,sqlite:{path:a,walMode:!0},agentdb:{path:a},hybrid:{enableFallback:!0,sqlite:{path:a}}},t)}export{p as a,P as b};
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.14");process.exit(0)}
2
+ import{a as n}from"./chunk-HTVGHHX2.js";import{a as i}from"./chunk-QUZ745UQ.js";import{a as o,e as d}from"./chunk-7SQTLUEN.js";import{existsSync as m,statSync as s}from"node:fs";import{extname as l,join as c}from"node:path";d();var _=o.CLEANUP_INTERVAL_MS,y=".agentic-qe/memory.db";async function p(t,r=!0){let e;switch(t.type){case"memory":e=new i;break;case"sqlite":e=new n({sqlite:t.sqlite,enableFallback:!0});break;case"agentdb":e=new n({sqlite:{path:t.agentdb?.path??y},enableFallback:!0});break;case"hybrid":e=new n(t.hybrid);break;default:throw new Error(`Unknown memory backend type: ${t.type}`)}return r&&await e.initialize(),{backend:e,type:t.type,initialized:r}}async function P(t=!0){let r=process.env.AQE_MEMORY_BACKEND??"memory",e=process.env.AQE_MEMORY_PATH,a=e?e===":memory:"?e:m(e)?s(e).isDirectory()?c(e,"memory.db"):e:/\.(db|sqlite|sqlite3)$/i.test(l(e))?e:c(e,"memory.db"):y;return p({type:r,sqlite:{path:a,walMode:!0},agentdb:{path:a},hybrid:{enableFallback:!0,sqlite:{path:a}}},t)}export{p as a,P as b};
@@ -1,5 +1,5 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.13");process.exit(0)}
2
- import{b as R,c as D,d as O,e as x,g as j,h as L,i as $,j as N,k as M,l as Q,m as U,n as z,o as F,p as W}from"./chunk-OFACHK5O.js";import{b as v,d as P}from"./chunk-VTOBUZL6.js";import{a as T,b as q,c as ie,d as _,e as le}from"./chunk-DNDL7SOS.js";import{a as h,e as A}from"./chunk-3Y2ROSCL.js";P();import{existsSync as y,mkdirSync as G,writeFileSync as b,readFileSync as C,copyFileSync as ce}from"fs";import{join as p,dirname as ue}from"path";async function V(t,e){if(!e.hooks.claudeCode)return!1;let r=p(t,".claude");y(r)||G(r,{recursive:!0});let n=p(r,"settings.json"),s={};if(y(n))try{let m=C(n,"utf-8");s=v(m)}catch{s={}}let o={PreToolUse:[{matcher:"^(Write|Edit|MultiEdit)$",hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" guard --file "$TOOL_INPUT_file_path" --json',timeout:3,continueOnError:!0}]},{matcher:"^(Write|Edit|MultiEdit)$",hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" pre-edit --file "$TOOL_INPUT_file_path" --json',timeout:5,continueOnError:!0}]},{matcher:"^Bash$",hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" pre-command --command "$TOOL_INPUT_command" --json',timeout:3,continueOnError:!0}]},{matcher:"^Task$",hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" pre-task --description "$TOOL_INPUT_prompt" --json',timeout:5,continueOnError:!0}]}],PostToolUse:[{matcher:"^(Write|Edit|MultiEdit)$",hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" post-edit --file "$TOOL_INPUT_file_path" --success --json',timeout:5,continueOnError:!0}]},{matcher:"^Bash$",hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" post-command --command "$TOOL_INPUT_command" --success true --json',timeout:5,continueOnError:!0}]},{matcher:"^Task$",hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" post-task --task-id "$TOOL_RESULT_agent_id" --agent "$TOOL_INPUT_subagent_type" --success true --description "$TOOL_INPUT_prompt" --json',timeout:5,continueOnError:!0}]}],UserPromptSubmit:[{hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" route --json',timeout:5,continueOnError:!0}]}],SessionStart:[{hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" session-start --session-id "$SESSION_ID" --json',timeout:10,continueOnError:!0}]}],Stop:[{hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" session-end --save-state --json',timeout:5,continueOnError:!0}]},{hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" post-route --success true --json',timeout:5,continueOnError:!0}]}]},u=s.hooks||{};s.hooks=j(u,o);let l=s.env;s.env=L(l,$(e));let d=M(e,t);N(s,d);let a=s.enabledMcpjsonServers||[];return a=a.filter(m=>m!=="aqe"),a.includes("agentic-qe")||a.push("agentic-qe"),s.enabledMcpjsonServers=a,x(n),b(n,JSON.stringify(s,null,2),"utf-8"),await de(t),!0}async function de(t){let e=p(t,".claude","hooks");y(e)||G(e,{recursive:!0});let r=p(e,"cross-phase-memory.yaml");if(y(r))return;let n=[p(ue(import.meta.url.replace("file://","")),"..","..","assets","hooks","cross-phase-memory.yaml"),p(process.cwd(),"assets","hooks","cross-phase-memory.yaml"),p(process.cwd(),"v3","assets","hooks","cross-phase-memory.yaml")];for(let o of n)try{if(y(o)){ce(o,r),console.log(" \u2713 Cross-phase memory hooks installed");return}}catch{}b(r,`# Cross-Phase Memory Hooks Configuration
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.14");process.exit(0)}
2
+ import{b as R,c as D,d as O,e as x,g as j,h as L,i as $,j as N,k as M,l as Q,m as U,n as z,o as F,p as W}from"./chunk-VJBJRFUO.js";import{b as v,d as P}from"./chunk-XN3KCKAM.js";import{a as T,b as q,c as ie,d as _,e as le}from"./chunk-INGXD5IX.js";import{a as h,e as A}from"./chunk-L5VSLPMW.js";P();import{existsSync as y,mkdirSync as G,writeFileSync as b,readFileSync as C,copyFileSync as ce}from"fs";import{join as p,dirname as ue}from"path";async function V(t,e){if(!e.hooks.claudeCode)return!1;let r=p(t,".claude");y(r)||G(r,{recursive:!0});let n=p(r,"settings.json"),s={};if(y(n))try{let m=C(n,"utf-8");s=v(m)}catch{s={}}let o={PreToolUse:[{matcher:"^(Write|Edit|MultiEdit)$",hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" guard --file "$TOOL_INPUT_file_path" --json',timeout:3,continueOnError:!0}]},{matcher:"^(Write|Edit|MultiEdit)$",hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" pre-edit --file "$TOOL_INPUT_file_path" --json',timeout:5,continueOnError:!0}]},{matcher:"^Bash$",hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" pre-command --command "$TOOL_INPUT_command" --json',timeout:3,continueOnError:!0}]},{matcher:"^Task$",hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" pre-task --description "$TOOL_INPUT_prompt" --json',timeout:5,continueOnError:!0}]}],PostToolUse:[{matcher:"^(Write|Edit|MultiEdit)$",hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" post-edit --file "$TOOL_INPUT_file_path" --success --json',timeout:5,continueOnError:!0}]},{matcher:"^Bash$",hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" post-command --command "$TOOL_INPUT_command" --success true --json',timeout:5,continueOnError:!0}]},{matcher:"^Task$",hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" post-task --task-id "$TOOL_RESULT_agent_id" --agent "$TOOL_INPUT_subagent_type" --success true --description "$TOOL_INPUT_prompt" --json',timeout:5,continueOnError:!0}]}],UserPromptSubmit:[{hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" route --json',timeout:5,continueOnError:!0}]}],SessionStart:[{hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" session-start --session-id "$SESSION_ID" --json',timeout:10,continueOnError:!0}]}],Stop:[{hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" session-end --save-state --json',timeout:5,continueOnError:!0}]},{hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" post-route --success true --json',timeout:5,continueOnError:!0}]}]},u=s.hooks||{};s.hooks=j(u,o);let l=s.env;s.env=L(l,$(e));let d=M(e,t);N(s,d);let a=s.enabledMcpjsonServers||[];return a=a.filter(m=>m!=="aqe"),a.includes("agentic-qe")||a.push("agentic-qe"),s.enabledMcpjsonServers=a,x(n),b(n,JSON.stringify(s,null,2),"utf-8"),await de(t),!0}async function de(t){let e=p(t,".claude","hooks");y(e)||G(e,{recursive:!0});let r=p(e,"cross-phase-memory.yaml");if(y(r))return;let n=[p(ue(import.meta.url.replace("file://","")),"..","..","assets","hooks","cross-phase-memory.yaml"),p(process.cwd(),"assets","hooks","cross-phase-memory.yaml"),p(process.cwd(),"v3","assets","hooks","cross-phase-memory.yaml")];for(let o of n)try{if(y(o)){ce(o,r),console.log(" \u2713 Cross-phase memory hooks installed");return}}catch{}b(r,`# Cross-Phase Memory Hooks Configuration
3
3
  # Generated by aqe init
4
4
  # See: https://github.com/anthropics/agentic-qe/docs/cross-phase-memory.md
5
5
 
@@ -276,7 +276,7 @@ aqe init --auto
276
276
  `).run("aqe_version",JSON.stringify(e),o),s.prepare(`
277
277
  INSERT OR REPLACE INTO kv_store (key, namespace, value, created_at)
278
278
  VALUES (?, '_system', ?, ?)
279
- `).run("init_timestamp",JSON.stringify(new Date().toISOString()),o),s.close(),console.log(` \u2713 Version ${e} written to memory.db`),!0}catch(o){return s.close(),console.warn(` \u26A0 Could not write version: ${h(o)}`),!1}}catch(n){return console.warn(` \u26A0 Could not open memory.db: ${h(n)}`),!1}}async function X(t){let e=null;try{e=(await import("./better-sqlite3-BU5GXILS.js")).default}catch{throw new Error(`SQLite persistence REQUIRED but better-sqlite3 is not installed.
279
+ `).run("init_timestamp",JSON.stringify(new Date().toISOString()),o),s.close(),console.log(` \u2713 Version ${e} written to memory.db`),!0}catch(o){return s.close(),console.warn(` \u26A0 Could not write version: ${h(o)}`),!1}}catch(n){return console.warn(` \u26A0 Could not open memory.db: ${h(n)}`),!1}}async function X(t){let e=null;try{e=(await import("./better-sqlite3-TQBQGNC6.js")).default}catch{throw new Error(`SQLite persistence REQUIRED but better-sqlite3 is not installed.
280
280
  Install it with: npm install better-sqlite3
281
281
  If you see native compilation errors, ensure build tools are installed:
282
282
  - macOS: xcode-select --install
@@ -302,7 +302,7 @@ Database path: ${n}
302
302
  Ensure the directory is writable and has sufficient disk space.`)}}async function K(t){let e=i(t,".agentic-qe","memory.db");if(!f(e))return!1;try{let r=_(e),n=r.prepare(`
303
303
  SELECT COUNT(*) as count FROM kv_store
304
304
  WHERE namespace = 'code-intelligence:kg'
305
- `).get();return r.close(),n.count>0}catch{return!1}}async function Y(t){try{let{KnowledgeGraphService:e}=await import("./knowledge-graph-BVD5Z66M.js"),{InMemoryBackend:r}=await import("./memory-backend-7ZLFOVGG.js"),n=new r;await n.initialize();let s=new e(n,{namespace:"code-intelligence:kg",enableVectorEmbeddings:!0,projectRoot:t}),{glob:o}=await import("tinyglobby"),u=await o(["**/*.ts","**/*.tsx","**/*.js","**/*.jsx","**/*.py"],{cwd:t,ignore:["node_modules/**","dist/**","coverage/**",".agentic-qe/**"],expandDirectories:!1}),l=await s.index({paths:u.map(d=>i(t,d)),incremental:!1,includeTests:!0});return s.destroy(),l.success?{status:"indexed",entries:l.value.nodesCreated+l.value.edgesCreated}:{status:"error",entries:0}}catch(e){return console.warn("Code intelligence scan warning:",h(e)),{status:"skipped",entries:0}}}async function Z(t){let e=i(t,".agentic-qe","memory.db");try{let r=_(e),n=r.prepare(`
305
+ `).get();return r.close(),n.count>0}catch{return!1}}async function Y(t){try{let{KnowledgeGraphService:e}=await import("./knowledge-graph-25XXKDJN.js"),{InMemoryBackend:r}=await import("./memory-backend-LDFFZMEQ.js"),n=new r;await n.initialize();let s=new e(n,{namespace:"code-intelligence:kg",enableVectorEmbeddings:!0,projectRoot:t}),{glob:o}=await import("tinyglobby"),u=await o(["**/*.ts","**/*.tsx","**/*.js","**/*.jsx","**/*.py"],{cwd:t,ignore:["node_modules/**","dist/**","coverage/**",".agentic-qe/**"],expandDirectories:!1}),l=await s.index({paths:u.map(d=>i(t,d)),incremental:!1,includeTests:!0});return s.destroy(),l.success?{status:"indexed",entries:l.value.nodesCreated+l.value.edgesCreated}:{status:"error",entries:0}}catch(e){return console.warn("Code intelligence scan warning:",h(e)),{status:"skipped",entries:0}}}async function Z(t){let e=i(t,".agentic-qe","memory.db");try{let r=_(e),n=r.prepare(`
306
306
  SELECT COUNT(*) as count FROM kv_store
307
307
  WHERE namespace LIKE 'code-intelligence:kg%'
308
308
  `).get();return r.close(),n.count}catch{return 0}}async function ee(t,e,r){if(!e.learning.enabled)return 0;let n=i(t,".agentic-qe","data");f(n)||k(n,{recursive:!0});let s=i(n,"hnsw");f(s)||k(s,{recursive:!0});let o=i(n,"learning-config.json"),u={embeddingModel:e.learning.embeddingModel,hnswConfig:e.learning.hnswConfig,qualityThreshold:e.learning.qualityThreshold,promotionThreshold:e.learning.promotionThreshold,databasePath:i(n,"memory.db"),hnswIndexPath:i(s,"index.bin"),initialized:new Date().toISOString()};E(o,JSON.stringify(u,null,2),"utf-8");let l=0;if(e.learning.pretrainedPatterns&&r){let d=r,a=new Map;for(let g of d.patterns){let c=g.domain||"general";a.has(c)||a.set(c,[]),a.get(c).push(g)}let m=i(n,"pretrained-index.json"),S={version:d.version,totalPatterns:d.statistics.totalPatterns,domains:Array.from(a.entries()).map(([g,c])=>({name:g,patternCount:c.length})),loadedAt:new Date().toISOString()};E(m,JSON.stringify(S,null,2),"utf-8");for(let[g,c]of a){let w=i(n,"patterns",g);f(w)||k(w,{recursive:!0});let oe=i(w,"patterns.json");E(oe,JSON.stringify(c,null,2),"utf-8"),l+=c.length}return l}return 0}async function te(t,e){if(!e.workers.daemonAutoStart||e.workers.enabled.length===0)return 0;let r=i(t,".agentic-qe","workers");f(r)||k(r,{recursive:!0});let n={},s={"pattern-consolidator":6e4,"coverage-gap-scanner":3e5,"flaky-test-detector":6e5,"routing-accuracy-monitor":12e4};for(let a of e.workers.enabled)n[a]={name:a,enabled:!0,interval:e.workers.intervals[a]||s[a]||6e4,lastRun:null,status:"pending"};let o=i(r,"registry.json"),u={version:e.version,maxConcurrent:e.workers.maxConcurrent,workers:n,createdAt:new Date().toISOString(),daemonPid:null};E(o,JSON.stringify(u,null,2),"utf-8");for(let a of e.workers.enabled){let m=i(r,`${a}.json`),S={name:a,enabled:!0,interval:e.workers.intervals[a]||s[a]||6e4,projectRoot:t,dataDir:i(t,".agentic-qe","data"),createdAt:new Date().toISOString()};E(m,JSON.stringify(S,null,2),"utf-8")}let l=i(r,"start-daemon.cjs");return E(l,`#!/usr/bin/env node
@@ -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.15.13");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.15.14");process.exit(0)}
2
2
  var n=class{constructor(t){this.capacity=t;this.buffer=new Array(t)}capacity;buffer;head=0;tail=0;count=0;push(t){this.buffer[this.tail]=t,this.tail=(this.tail+1)%this.capacity,this.count<this.capacity?this.count++:this.head=(this.head+1)%this.capacity}toArray(){let t=[];for(let e=0;e<this.count;e++){let i=(this.head+e)%this.capacity;t.push(this.buffer[i])}return t}get length(){return this.count}get size(){return this.count}clear(){this.buffer=new Array(this.capacity),this.head=0,this.tail=0,this.count=0}last(t){let e=[],i=Math.max(0,this.count-t);for(let s=i;s<this.count;s++){let r=(this.head+s)%this.capacity;e.push(this.buffer[r])}return e}percentile(t){if(this.count===0)return;let e=this.toArray().sort((s,r)=>Number(s)-Number(r)),i=Math.floor(t/100*(e.length-1));return e[i]}reduce(t,e){let i=e;for(let s=0;s<this.count;s++){let r=(this.head+s)%this.capacity;i=t(i,this.buffer[r])}return i}average(){return this.count===0?0:this.reduce((e,i)=>e+i,0)/this.count}};export{n as a};
@@ -0,0 +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.15.14");process.exit(0)}
2
+ import{a as y,b as C}from"./chunk-KJ5A54ZH.js";import{b as h}from"./chunk-N736GLWZ.js";import{f as g,g as v,l as f,m as b,n as p,p as d}from"./chunk-65EE2EST.js";import D from"chalk";var E=3,R="instrumented-report",T="static-estimation";async function x(e,r=n=>console.log(n)){let n=await f(e);if(n.status==="target-missing")return{kind:"no-data",reason:"target-missing",message:d("target-missing",e,null)};if(n.status==="evaluated"){let{evaluation:a,projectRoot:t}=n;if(a.status==="measured"){let{files:u,evidence:i}=a;return{kind:"data",data:{files:u,summary:y(u),instrumented:!0,...i.unmeasuredFiles.length>0?{unmeasuredFiles:i.unmeasuredFiles}:{}},projectRoot:t,evidence:i}}return{kind:"no-data",reason:a.reason,message:d(a.reason,e,t)}}let s=h(n.target,{includeTests:!1});return s.length===0?{kind:"no-sources"}:(r(D.gray(` Analyzing ${s.length} files...
3
+ `)),{kind:"data",data:C(s,n.projectRoot),projectRoot:n.projectRoot})}function w(e){return{branch:e.files.some(r=>r.branches.total>0),function:e.files.some(r=>r.functions.total>0),statement:e.files.some(r=>r.statements.total>0)}}var F=e=>e==="target-missing"||e==="unreadable-report";function N(){return"UNMEASURED: no coverage report exists for this project, so these figures are a STATIC ESTIMATE derived from source shape \u2014 not measured coverage. No threshold verdict is given and nothing is stored as evidence. Run your tests with coverage first (e.g. `npm test -- --coverage`) and re-run."}async function O(e,r,n,s){let a=await x(r,s);if(a.kind==="no-sources")return a;if(a.kind==="no-data")return F(a.reason)?{kind:"error",reason:a.reason,message:a.message}:{kind:"unmeasured",reason:a.reason,message:a.message};let t=a.data,u=t.instrumented,i=await e.analyze({coverageData:t,threshold:n,includeFileDetails:!0,measured:u,...a.projectRoot?{projectRoot:a.projectRoot}:{}});if(!i.success||!i.value)return{kind:"analysis-failed",message:i.error?.message||"Coverage analysis failed"};let o=i.value;if(!u)return{kind:"estimate",data:t,summary:{...o.summary},message:N()};let l=w(t),c=b(o.summary,n,l),m=g(a.evidence,a.projectRoot??r),k={...c,meetsThreshold:c.meetsThreshold&&m.length===0};return{kind:"measured",data:t,collected:l,verdict:k,insufficientEvidence:m,...a.evidence?{evidence:a.evidence}:{},summary:{...o.summary,branch:l.branch?o.summary.branch:null,function:l.function?o.summary.function:null,statement:l.statement?o.summary.statement:null},recommendations:p(o.recommendations??[],c,n,l)}}function U(e,r){switch(e.kind){case"measured":{if(e.insufficientEvidence.length>0)return E;let{overall:n,meetsThreshold:s}=e.verdict;return s?n<r+5?2:0:1}case"estimate":case"unmeasured":return E;case"no-sources":return 0;default:return 1}}function j(e,r){if(e.length===0&&r.length===0)return{};let n=e.length>0?`INSUFFICIENT EVIDENCE: ${e.join("; ")}`:"";return r.length===0?{warning:n}:{warning:[n&&n.replace(/\.?$/,"."),...r].filter(Boolean).join(" ")}}function _(e,r,n){let s={line:null,branch:null,function:null,statement:null};switch(e.kind){case"measured":return{summary:e.summary,meetsThreshold:e.verdict.meetsThreshold,threshold:r,recommendations:e.recommendations,measured:!0,estimated:!1,coverageMethod:R,branchDataCollected:e.collected.branch,functionDataCollected:e.collected.function,statementDataCollected:e.collected.statement,...e.data.unmeasuredFiles?.length?{unmeasuredFiles:e.data.unmeasuredFiles}:{},...e.evidence?{evidenceStatus:e.evidence.status}:{},...e.evidence?.stale?{staleReport:e.evidence.stale}:{},...e.evidence?.conflictingFiles?{conflictingFiles:e.evidence.conflictingFiles}:{},...e.evidence?.excludedEntries?{excludedReportEntries:e.evidence.excludedEntries}:{},...j(e.insufficientEvidence,v(e.evidence))};case"estimate":return{summary:e.summary,meetsThreshold:null,threshold:r,measured:!1,estimated:!0,unmeasured:!0,coverageMethod:T,reason:"no-coverage-report",target:n,warning:e.message};case"unmeasured":case"error":return{summary:s,meetsThreshold:null,threshold:r,measured:!1,unmeasured:e.kind==="unmeasured",reason:e.reason,target:n,warning:e.message};case"analysis-failed":return{summary:s,meetsThreshold:null,threshold:r,measured:!1,target:n,error:e.message};case"no-sources":return{summary:s,meetsThreshold:null,threshold:r,measured:!1,target:n,warning:"No source files found"}}}export{E as a,x as b,O as c,U as d,_ as e};
@@ -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.15.13");process.exit(0)}
2
- import{b as t,d as o}from"./chunk-ZAKQLAHT.js";var L={};o(L,{DotProductAttention:()=>d,FlashAttention:()=>u,HyperbolicAttention:()=>f,LinearAttention:()=>h,MoEAttention:()=>_,MultiHeadAttention:()=>A,RuvectorLayer:()=>a,SonaEngine:()=>b,TensorCompress:()=>c,default:()=>n,differentiableSearch:()=>l,getCompressionLevel:()=>p,hierarchicalForward:()=>s,init:()=>m,pipeline:()=>q});import{createRequire as r}from"module";var i,e,n,a,c,l,s,p,m,u,d,A,f,h,_,b,q,g=t(()=>{i=r(import.meta.url),e=i("better-sqlite3"),n=e,{RuvectorLayer:a,TensorCompress:c,differentiableSearch:l,hierarchicalForward:s,getCompressionLevel:p,init:m,FlashAttention:u,DotProductAttention:d,MultiHeadAttention:A,HyperbolicAttention:f,LinearAttention:h,MoEAttention:_,SonaEngine:b,pipeline:q}=e||{}});export{n as a,a as b,c,l as d,s as e,p as f,m as g,u as h,d as i,A as j,f as k,h as l,_ as m,b as n,q as o,L as p,g as q};
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.15.14");process.exit(0)}
2
+ import{b as t,d as o}from"./chunk-V6SE2ZU2.js";var L={};o(L,{DotProductAttention:()=>d,FlashAttention:()=>u,HyperbolicAttention:()=>f,LinearAttention:()=>h,MoEAttention:()=>_,MultiHeadAttention:()=>A,RuvectorLayer:()=>a,SonaEngine:()=>b,TensorCompress:()=>c,default:()=>n,differentiableSearch:()=>l,getCompressionLevel:()=>p,hierarchicalForward:()=>s,init:()=>m,pipeline:()=>q});import{createRequire as r}from"module";var i,e,n,a,c,l,s,p,m,u,d,A,f,h,_,b,q,g=t(()=>{i=r(import.meta.url),e=i("better-sqlite3"),n=e,{RuvectorLayer:a,TensorCompress:c,differentiableSearch:l,hierarchicalForward:s,getCompressionLevel:p,init:m,FlashAttention:u,DotProductAttention:d,MultiHeadAttention:A,HyperbolicAttention:f,LinearAttention:h,MoEAttention:_,SonaEngine:b,pipeline:q}=e||{}});export{n as a,a as b,c,l as d,s as e,p as f,m as g,u as h,d as i,A as j,f as k,h as l,_ as m,b as n,q as o,L as p,g as q};
@@ -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.15.13");process.exit(0)}
2
- import{b as i}from"./chunk-ZAKQLAHT.js";function d(){return Object.create(null)}function o(e,n){return Object.hasOwn(e,n)?e[n]:void 0}function u(e,n,t){Object.defineProperty(e,n,{value:t,writable:!0,enumerable:!0,configurable:!0})}function s(e,n,t=1){let r=(o(e,n)??0)+t;return u(e,n,r),r}var c=i(()=>{"use strict"});export{d as a,o as b,u as c,s as d,c as e};
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.15.14");process.exit(0)}
2
+ import{b as i}from"./chunk-V6SE2ZU2.js";function d(){return Object.create(null)}function o(e,n){return Object.hasOwn(e,n)?e[n]:void 0}function u(e,n,t){Object.defineProperty(e,n,{value:t,writable:!0,enumerable:!0,configurable:!0})}function s(e,n,t=1){let r=(o(e,n)??0)+t;return u(e,n,r),r}var c=i(()=>{"use strict"});export{d as a,o as b,u as c,s as d,c as e};
@@ -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.15.13");process.exit(0)}
2
- import{a as l}from"./chunk-UDQSYWVF.js";import{i as a}from"./chunk-H4H2YSFH.js";import{a as m}from"./chunk-NURIILUB.js";var u=class{constructor(t,e){this.eventBus=t;this.maxHistorySize=e?.maxHistorySize??1e4,this.eventHistory=new l(this.maxHistorySize),this.correlationTimeout=e?.correlationTimeout??6e4,this.maxEventsPerCorrelation=e?.maxEventsPerCorrelation??100}eventBus;subscriptions=new Map;correlations=new Map;eventHistory;routes=[];domainSubscriptions=new Map;maxHistorySize;correlationTimeout;maxEventsPerCorrelation;initialized=!1;async initialize(){if(!this.initialized){for(let t of m){let e=this.eventBus.subscribeToChannel(t,async i=>{await this.handleIncomingEvent(i)});this.domainSubscriptions.set(t,e)}this.eventBus.subscribe("*",async t=>{m.includes(t.source)||await this.handleIncomingEvent(t)}),this.initialized=!0}}subscribeToDoamin(t,e){let i=`sub_domain_${a()}`;return this.subscriptions.set(i,{id:i,type:"domain",filter:t,handler:e,active:!0}),i}subscribeToEventType(t,e){let i=`sub_type_${a()}`;return this.subscriptions.set(i,{id:i,type:"eventType",filter:t,handler:e,active:!0}),i}unsubscribe(t){let e=this.subscriptions.get(t);return e?(e.active=!1,this.subscriptions.delete(t),!0):!1}async route(t){this.addToHistory(t),t.correlationId&&this.trackCorrelation(t);let i=this.findMatchingSubscriptions(t).map(async o=>{try{await o.handler(t)}catch(n){console.error(`Error in subscription handler ${o.id}:`,n instanceof Error?n.message:n)}}),r=await this.applyRoutes(t);await Promise.allSettled([...i,...r])}getCorrelation(t){let e=this.correlations.get(t);if(e)return{correlationId:e.correlationId,events:[...e.events],domains:new Set(e.domains),startedAt:e.startedAt,lastEventAt:e.lastEventAt,complete:e.complete}}trackCorrelation(t){if(!t.correlationId)return;let e=this.correlations.get(t.correlationId);e||(e={correlationId:t.correlationId,events:[],domains:new Set,startedAt:t.timestamp,lastEventAt:t.timestamp,complete:!1,timeout:null},this.correlations.set(t.correlationId,e)),e.events.length<this.maxEventsPerCorrelation&&(e.events.push(t),e.domains.add(t.source),e.lastEventAt=t.timestamp),e.timeout&&clearTimeout(e.timeout),e.timeout=setTimeout(()=>{e.complete=!0,e.timeout=null},this.correlationTimeout)}aggregate(t,e){let i=this.eventHistory.toArray().filter(s=>s.timestamp>=t&&s.timestamp<=e),r=new Map,o=new Map;for(let s of i)r.set(s.type,(r.get(s.type)??0)+1),o.set(s.source,(o.get(s.source)??0)+1);let n={totalEvents:i.length,uniqueEventTypes:r.size,uniqueDomains:o.size,eventsPerSecond:i.length>0?i.length/((e.getTime()-t.getTime())/1e3):0};return{id:a(),windowStart:t,windowEnd:e,events:i,countByType:r,countByDomain:o,metrics:n}}getHistory(t){let e=this.eventHistory.toArray();return t&&(t.eventTypes?.length&&(e=e.filter(i=>t.eventTypes.includes(i.type))),t.domains?.length&&(e=e.filter(i=>t.domains.includes(i.source))),t.fromTimestamp&&(e=e.filter(i=>i.timestamp>=t.fromTimestamp)),t.toTimestamp&&(e=e.filter(i=>i.timestamp<=t.toTimestamp)),t.limit&&(e=e.slice(-t.limit))),e}addRoute(t){let e=t.priority??0,i=this.routes.findIndex(r=>(r.priority??0)<e);i===-1?this.routes.push(t):this.routes.splice(i,0,t)}removeRoute(t,e){let i=this.routes.findIndex(r=>r.eventPattern===t&&(e===void 0||r.source===e));return i!==-1?(this.routes.splice(i,1),!0):!1}async dispose(){this.subscriptions.clear();for(let t of this.domainSubscriptions.values())t.unsubscribe();this.domainSubscriptions.clear();for(let t of this.correlations.values())t.timeout&&clearTimeout(t.timeout);this.correlations.clear(),this.eventHistory.clear(),this.initialized=!1}async handleIncomingEvent(t){await this.route(t)}findMatchingSubscriptions(t){let e=[];for(let i of this.subscriptions.values())i.active&&(i.type==="domain"&&i.filter===t.source||i.type==="eventType"&&this.matchEventType(t.type,i.filter))&&e.push(i);return e}matchEventType(t,e){if(e==="*")return!0;let i=e.replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*");return new RegExp(`^${i}$`).test(t)}async applyRoutes(t){let e=[];for(let i of this.routes){if(!(i.source==="*"||i.source===t.source||Array.isArray(i.source)&&i.source.includes(t.source))||!this.matchEventType(t.type,i.eventPattern)||i.filter&&!i.filter(t))continue;let o=i.transform?i.transform(t):t;for(let n of i.targets)n!==t.source&&e.push(this.eventBus.publish({...o,id:a(),correlationId:t.correlationId??t.id}))}return e}addToHistory(t){this.eventHistory.push(t)}};function y(c,t){return new u(c,t)}export{u as a,y as b};
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.14");process.exit(0)}
2
+ import{a as l}from"./chunk-TWOV3I3A.js";import{i as a}from"./chunk-QP6GL3O5.js";import{a as m}from"./chunk-RE6JTSDM.js";var u=class{constructor(t,e){this.eventBus=t;this.maxHistorySize=e?.maxHistorySize??1e4,this.eventHistory=new l(this.maxHistorySize),this.correlationTimeout=e?.correlationTimeout??6e4,this.maxEventsPerCorrelation=e?.maxEventsPerCorrelation??100}eventBus;subscriptions=new Map;correlations=new Map;eventHistory;routes=[];domainSubscriptions=new Map;maxHistorySize;correlationTimeout;maxEventsPerCorrelation;initialized=!1;async initialize(){if(!this.initialized){for(let t of m){let e=this.eventBus.subscribeToChannel(t,async i=>{await this.handleIncomingEvent(i)});this.domainSubscriptions.set(t,e)}this.eventBus.subscribe("*",async t=>{m.includes(t.source)||await this.handleIncomingEvent(t)}),this.initialized=!0}}subscribeToDoamin(t,e){let i=`sub_domain_${a()}`;return this.subscriptions.set(i,{id:i,type:"domain",filter:t,handler:e,active:!0}),i}subscribeToEventType(t,e){let i=`sub_type_${a()}`;return this.subscriptions.set(i,{id:i,type:"eventType",filter:t,handler:e,active:!0}),i}unsubscribe(t){let e=this.subscriptions.get(t);return e?(e.active=!1,this.subscriptions.delete(t),!0):!1}async route(t){this.addToHistory(t),t.correlationId&&this.trackCorrelation(t);let i=this.findMatchingSubscriptions(t).map(async o=>{try{await o.handler(t)}catch(n){console.error(`Error in subscription handler ${o.id}:`,n instanceof Error?n.message:n)}}),r=await this.applyRoutes(t);await Promise.allSettled([...i,...r])}getCorrelation(t){let e=this.correlations.get(t);if(e)return{correlationId:e.correlationId,events:[...e.events],domains:new Set(e.domains),startedAt:e.startedAt,lastEventAt:e.lastEventAt,complete:e.complete}}trackCorrelation(t){if(!t.correlationId)return;let e=this.correlations.get(t.correlationId);e||(e={correlationId:t.correlationId,events:[],domains:new Set,startedAt:t.timestamp,lastEventAt:t.timestamp,complete:!1,timeout:null},this.correlations.set(t.correlationId,e)),e.events.length<this.maxEventsPerCorrelation&&(e.events.push(t),e.domains.add(t.source),e.lastEventAt=t.timestamp),e.timeout&&clearTimeout(e.timeout),e.timeout=setTimeout(()=>{e.complete=!0,e.timeout=null},this.correlationTimeout)}aggregate(t,e){let i=this.eventHistory.toArray().filter(s=>s.timestamp>=t&&s.timestamp<=e),r=new Map,o=new Map;for(let s of i)r.set(s.type,(r.get(s.type)??0)+1),o.set(s.source,(o.get(s.source)??0)+1);let n={totalEvents:i.length,uniqueEventTypes:r.size,uniqueDomains:o.size,eventsPerSecond:i.length>0?i.length/((e.getTime()-t.getTime())/1e3):0};return{id:a(),windowStart:t,windowEnd:e,events:i,countByType:r,countByDomain:o,metrics:n}}getHistory(t){let e=this.eventHistory.toArray();return t&&(t.eventTypes?.length&&(e=e.filter(i=>t.eventTypes.includes(i.type))),t.domains?.length&&(e=e.filter(i=>t.domains.includes(i.source))),t.fromTimestamp&&(e=e.filter(i=>i.timestamp>=t.fromTimestamp)),t.toTimestamp&&(e=e.filter(i=>i.timestamp<=t.toTimestamp)),t.limit&&(e=e.slice(-t.limit))),e}addRoute(t){let e=t.priority??0,i=this.routes.findIndex(r=>(r.priority??0)<e);i===-1?this.routes.push(t):this.routes.splice(i,0,t)}removeRoute(t,e){let i=this.routes.findIndex(r=>r.eventPattern===t&&(e===void 0||r.source===e));return i!==-1?(this.routes.splice(i,1),!0):!1}async dispose(){this.subscriptions.clear();for(let t of this.domainSubscriptions.values())t.unsubscribe();this.domainSubscriptions.clear();for(let t of this.correlations.values())t.timeout&&clearTimeout(t.timeout);this.correlations.clear(),this.eventHistory.clear(),this.initialized=!1}async handleIncomingEvent(t){await this.route(t)}findMatchingSubscriptions(t){let e=[];for(let i of this.subscriptions.values())i.active&&(i.type==="domain"&&i.filter===t.source||i.type==="eventType"&&this.matchEventType(t.type,i.filter))&&e.push(i);return e}matchEventType(t,e){if(e==="*")return!0;let i=e.replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*");return new RegExp(`^${i}$`).test(t)}async applyRoutes(t){let e=[];for(let i of this.routes){if(!(i.source==="*"||i.source===t.source||Array.isArray(i.source)&&i.source.includes(t.source))||!this.matchEventType(t.type,i.eventPattern)||i.filter&&!i.filter(t))continue;let o=i.transform?i.transform(t):t;for(let n of i.targets)n!==t.source&&e.push(this.eventBus.publish({...o,id:a(),correlationId:t.correlationId??t.id}))}return e}addToHistory(t){this.eventHistory.push(t)}};function y(c,t){return new u(c,t)}export{u as a,y as b};
@@ -1,5 +1,5 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.13");process.exit(0)}
2
- import{b as i,c}from"./chunk-JRRXCODW.js";import{i as l}from"./chunk-H4H2YSFH.js";c();var u=.15,d=.03,p=.25,s=class{constructor(t){this.db=t;i(t)}db;recordNull(t){this.db.prepare(`
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.15.14");process.exit(0)}
2
+ import{b as i,c}from"./chunk-Z54G2YOL.js";import{i as l}from"./chunk-QP6GL3O5.js";c();var u=.15,d=.03,p=.25,s=class{constructor(t){this.db=t;i(t)}db;recordNull(t){this.db.prepare(`
3
3
  INSERT INTO qe_pattern_nulls (id, pattern_id, context_fingerprint, failure_mode, trajectory_ref, evidence_class)
4
4
  VALUES (?, ?, ?, ?, ?, ?)
5
5
  ON CONFLICT(pattern_id, context_fingerprint) DO UPDATE SET
@@ -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.15.13");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.15.14");process.exit(0)}
2
2
  function l(s,e){let t=s.prepare("SELECT confidence, usage_count, successful_uses FROM qe_patterns WHERE id = ?").get(e.patternId);if(!t)return{updated:!1};let u=e.success?1:0,n=t.usage_count+1,a=t.successful_uses+u,c=a/n,r=Math.min(1,n/100),o=t.confidence*.3+r*.2+c*.5,i=s.prepare(`
3
3
  INSERT INTO qe_pattern_usage (pattern_id, success, metrics_json, feedback)
4
4
  VALUES (?, ?, ?, ?)
@@ -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.15.13");process.exit(0)}
2
- import{b as d,d as c}from"./chunk-VTOBUZL6.js";import{a as l,e as g}from"./chunk-3Y2ROSCL.js";g();c();import{existsSync as y,readFileSync as p}from"node:fs";import{join as o,dirname as u}from"node:path";import{fileURLToPath as m}from"node:url";var i=class extends Error{constructor(t,n,r){super(t);this.code=n;this.cause=r;this.name="PatternLoaderError"}code;cause},s=class a{static instance=null;config;patterns;isLoading=!1;constructor(e={}){this.config={basePath:e.basePath??this.getDefaultBasePath(),throwOnMissing:e.throwOnMissing??!1,validatePatterns:e.validatePatterns??!0},this.patterns={index:null,booster:null,router:null,embedding:null,reasoning:null,loadedAt:null,errors:[]}}static getInstance(e){return a.instance||(a.instance=new a(e)),a.instance}static resetInstance(){a.instance=null}getDefaultBasePath(){try{let e=import.meta.url,t=m(e),n=u(t),r=o(n,"..","..","..");return o(r,"assets","patterns")}catch{return o(process.cwd(),"assets","patterns")}}async loadPatterns(){if(!this.isLoading){this.isLoading=!0,this.patterns.errors=[];try{this.patterns.index=this.loadJsonFile("index.json");let[e,t,n,r]=await Promise.all([Promise.resolve(this.loadJsonFile("adr-051-booster-patterns.json")),Promise.resolve(this.loadJsonFile("adr-051-router-patterns.json")),Promise.resolve(this.loadJsonFile("adr-051-embedding-patterns.json")),Promise.resolve(this.loadJsonFile("adr-051-reasoning-patterns.json"))]);this.patterns.booster=e,this.patterns.router=t,this.patterns.embedding=n,this.patterns.reasoning=r,this.patterns.loadedAt=new Date,this.config.validatePatterns&&this.validateLoadedPatterns()}finally{this.isLoading=!1}}}loadJsonFile(e){let t=o(this.config.basePath,e);try{if(!y(t)){let r=`Pattern file not found: ${t}`;if(this.patterns.errors.push(r),this.config.throwOnMissing)throw new i(r,"FILE_NOT_FOUND");return null}let n=p(t,"utf-8");return d(n)}catch(n){if(n instanceof i)throw n;let r=`Failed to load pattern file ${e}: ${l(n)}`;if(this.patterns.errors.push(r),this.config.throwOnMissing)throw new i(r,"PARSE_ERROR",n instanceof Error?n:void 0);return null}}validateLoadedPatterns(){this.patterns.booster&&(Array.isArray(this.patterns.booster.patterns)||this.patterns.errors.push("Booster patterns file missing patterns array")),this.patterns.router&&(Array.isArray(this.patterns.router.patterns)||this.patterns.errors.push("Router patterns file missing patterns array")),this.patterns.embedding&&(Array.isArray(this.patterns.embedding.patterns)||this.patterns.errors.push("Embedding patterns file missing patterns array")),this.patterns.reasoning&&(Array.isArray(this.patterns.reasoning.patterns)||this.patterns.errors.push("Reasoning patterns file missing patterns array"))}async ensureLoaded(){this.patterns.loadedAt||await this.loadPatterns()}async getIndex(){return await this.ensureLoaded(),this.patterns.index}async getBoosterPatterns(){return await this.ensureLoaded(),this.patterns.booster}async getRouterPatterns(){return await this.ensureLoaded(),this.patterns.router}async getEmbeddingPatterns(){return await this.ensureLoaded(),this.patterns.embedding}async getReasoningPatterns(){return await this.ensureLoaded(),this.patterns.reasoning}async getBoosterPatternByKey(e){let t=await this.getBoosterPatterns();return t?t.patterns.find(r=>r.key===e)??null:null}async getRouterPatternByKey(e){let t=await this.getRouterPatterns();return t?t.patterns.find(r=>r.key===e)??null:null}async getEmbeddingPatternByKey(e){let t=await this.getEmbeddingPatterns();return t?t.patterns.find(r=>r.key===e)??null:null}async getReasoningPatternByKey(e){let t=await this.getReasoningPatterns();return t?t.patterns.find(r=>r.key===e)??null:null}async getEligibleBoosterTransforms(){let e=await this.getBoosterPatternByKey("booster-transform-eligibility");return e?e.eligibility_criteria.simple_transforms:[]}async getTierHierarchy(){let e=await this.getRouterPatternByKey("router-5tier-complexity");return e?e.tier_hierarchy:null}async getQualityGateThresholds(){let e=await this.getReasoningPatternByKey("reasoning-pattern-quality-gates");return e?e.gate_thresholds:null}isLoaded(){return this.patterns.loadedAt!==null}getLoadedAt(){return this.patterns.loadedAt}getErrors(){return[...this.patterns.errors]}async getStatistics(){let e=await this.getIndex();return e?e.pattern_statistics:null}async reload(){this.patterns={index:null,booster:null,router:null,embedding:null,reasoning:null,loadedAt:null,errors:[]},await this.loadPatterns()}async getAllPatterns(){return await this.ensureLoaded(),{...this.patterns}}};function x(){return s.getInstance()}export{x as a};
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.14");process.exit(0)}
2
+ import{b as d,d as c}from"./chunk-XN3KCKAM.js";import{a as l,e as g}from"./chunk-L5VSLPMW.js";g();c();import{existsSync as y,readFileSync as p}from"node:fs";import{join as o,dirname as u}from"node:path";import{fileURLToPath as m}from"node:url";var i=class extends Error{constructor(t,n,r){super(t);this.code=n;this.cause=r;this.name="PatternLoaderError"}code;cause},s=class a{static instance=null;config;patterns;isLoading=!1;constructor(e={}){this.config={basePath:e.basePath??this.getDefaultBasePath(),throwOnMissing:e.throwOnMissing??!1,validatePatterns:e.validatePatterns??!0},this.patterns={index:null,booster:null,router:null,embedding:null,reasoning:null,loadedAt:null,errors:[]}}static getInstance(e){return a.instance||(a.instance=new a(e)),a.instance}static resetInstance(){a.instance=null}getDefaultBasePath(){try{let e=import.meta.url,t=m(e),n=u(t),r=o(n,"..","..","..");return o(r,"assets","patterns")}catch{return o(process.cwd(),"assets","patterns")}}async loadPatterns(){if(!this.isLoading){this.isLoading=!0,this.patterns.errors=[];try{this.patterns.index=this.loadJsonFile("index.json");let[e,t,n,r]=await Promise.all([Promise.resolve(this.loadJsonFile("adr-051-booster-patterns.json")),Promise.resolve(this.loadJsonFile("adr-051-router-patterns.json")),Promise.resolve(this.loadJsonFile("adr-051-embedding-patterns.json")),Promise.resolve(this.loadJsonFile("adr-051-reasoning-patterns.json"))]);this.patterns.booster=e,this.patterns.router=t,this.patterns.embedding=n,this.patterns.reasoning=r,this.patterns.loadedAt=new Date,this.config.validatePatterns&&this.validateLoadedPatterns()}finally{this.isLoading=!1}}}loadJsonFile(e){let t=o(this.config.basePath,e);try{if(!y(t)){let r=`Pattern file not found: ${t}`;if(this.patterns.errors.push(r),this.config.throwOnMissing)throw new i(r,"FILE_NOT_FOUND");return null}let n=p(t,"utf-8");return d(n)}catch(n){if(n instanceof i)throw n;let r=`Failed to load pattern file ${e}: ${l(n)}`;if(this.patterns.errors.push(r),this.config.throwOnMissing)throw new i(r,"PARSE_ERROR",n instanceof Error?n:void 0);return null}}validateLoadedPatterns(){this.patterns.booster&&(Array.isArray(this.patterns.booster.patterns)||this.patterns.errors.push("Booster patterns file missing patterns array")),this.patterns.router&&(Array.isArray(this.patterns.router.patterns)||this.patterns.errors.push("Router patterns file missing patterns array")),this.patterns.embedding&&(Array.isArray(this.patterns.embedding.patterns)||this.patterns.errors.push("Embedding patterns file missing patterns array")),this.patterns.reasoning&&(Array.isArray(this.patterns.reasoning.patterns)||this.patterns.errors.push("Reasoning patterns file missing patterns array"))}async ensureLoaded(){this.patterns.loadedAt||await this.loadPatterns()}async getIndex(){return await this.ensureLoaded(),this.patterns.index}async getBoosterPatterns(){return await this.ensureLoaded(),this.patterns.booster}async getRouterPatterns(){return await this.ensureLoaded(),this.patterns.router}async getEmbeddingPatterns(){return await this.ensureLoaded(),this.patterns.embedding}async getReasoningPatterns(){return await this.ensureLoaded(),this.patterns.reasoning}async getBoosterPatternByKey(e){let t=await this.getBoosterPatterns();return t?t.patterns.find(r=>r.key===e)??null:null}async getRouterPatternByKey(e){let t=await this.getRouterPatterns();return t?t.patterns.find(r=>r.key===e)??null:null}async getEmbeddingPatternByKey(e){let t=await this.getEmbeddingPatterns();return t?t.patterns.find(r=>r.key===e)??null:null}async getReasoningPatternByKey(e){let t=await this.getReasoningPatterns();return t?t.patterns.find(r=>r.key===e)??null:null}async getEligibleBoosterTransforms(){let e=await this.getBoosterPatternByKey("booster-transform-eligibility");return e?e.eligibility_criteria.simple_transforms:[]}async getTierHierarchy(){let e=await this.getRouterPatternByKey("router-5tier-complexity");return e?e.tier_hierarchy:null}async getQualityGateThresholds(){let e=await this.getReasoningPatternByKey("reasoning-pattern-quality-gates");return e?e.gate_thresholds:null}isLoaded(){return this.patterns.loadedAt!==null}getLoadedAt(){return this.patterns.loadedAt}getErrors(){return[...this.patterns.errors]}async getStatistics(){let e=await this.getIndex();return e?e.pattern_statistics:null}async reload(){this.patterns={index:null,booster:null,router:null,embedding:null,reasoning:null,loadedAt:null,errors:[]},await this.loadPatterns()}async getAllPatterns(){return await this.ensureLoaded(),{...this.patterns}}};function x(){return s.getInstance()}export{x as a};
@@ -1,2 +1,2 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.13");process.exit(0)}
2
- import{o as c,r as d,t as f,v as h}from"./chunk-3Y7TJFHU.js";import{a as r,e as u}from"./chunk-TWDW32W2.js";import{a as s,c as o,d as g}from"./chunk-TOQWL2ZF.js";import{a,e as m}from"./chunk-3Y2ROSCL.js";m();h();u();g();var P={dbPath:c.dbPath,walMode:!0,mmapSize:r.MMAP_SIZE_BYTES,cacheSize:r.CACHE_SIZE_KB,busyTimeout:r.BUSY_TIMEOUT_MS},t=class e{static instance=null;static instancePromise=null;unifiedMemory=null;config;initialized=!1;initPromise=null;constructor(i){this.config={...P,...i}}static getInstance(i){return e.instance||(e.instance=new e(i)),e.instance}static async getInstanceAsync(i){return e.instance?.initialized?e.instance:(e.instancePromise||(e.instancePromise=(async()=>{let n=e.getInstance(i);return await n.initialize(),n})()),e.instancePromise)}static resetInstance(){e.instance&&(e.instance.close(),e.instance=null),e.instancePromise=null,f()}async initialize(){if(!this.initialized)return this.initPromise||(this.initPromise=this._doInitialize()),this.initPromise}async _doInitialize(){if(!this.initialized)try{let i={dbPath:this.config.dbPath,walMode:this.config.walMode,busyTimeout:this.config.busyTimeout,mmapSize:this.config.mmapSize,cacheSize:this.config.cacheSize};this.unifiedMemory=d(i),await this.unifiedMemory.initialize(),this.initialized=!0,console.log(`[UnifiedPersistence] Initialized via UnifiedMemoryManager: ${this.config.dbPath}`)}catch(i){throw this.initPromise=null,new Error(`Failed to initialize UnifiedPersistenceManager: ${a(i)}`)}}getDatabase(){if(!this.unifiedMemory||!this.initialized)throw new Error("UnifiedPersistenceManager not initialized");return this.unifiedMemory.getDatabase()}isInitialized(){return this.initialized}getDbPath(){return this.config.dbPath}prepare(i,n){if(!this.unifiedMemory)throw new Error("Database not initialized");return this.unifiedMemory.prepare(i,n)}transaction(i){if(!this.unifiedMemory)throw new Error("Database not initialized");return this.unifiedMemory.transaction(i)}getStats(){if(!this.unifiedMemory)throw new Error("Database not initialized");let i=this.unifiedMemory.getStats();return{tables:i.tables,fileSize:i.fileSize,walSize:i.walSize}}vacuum(){this.getDatabase().exec("VACUUM")}checkpoint(){this.getDatabase().pragma("wal_checkpoint(TRUNCATE)")}close(){this.initialized=!1,console.log("[UnifiedPersistence] Facade closed")}};function p(e){return t.getInstance(e)}async function E(e){let i=p(e);return await i.initialize(),i}function I(){t.resetInstance()}var l=!1;function M(){if(l)return;l=!0;let e=()=>{try{let n=t.instance;n&&n.close()}catch(n){console.debug("[UnifiedPersistence] Cleanup error:",n instanceof Error?n.message:n)}};process.on("beforeExit",e),s(e);let i=n=>{o(n)||(e(),process.exit(0))};process.on("SIGINT",i),process.on("SIGTERM",i)}M();export{P as a,t as b,p as c,E as d,I as e};
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.15.14");process.exit(0)}
2
+ import{o as c,r as d,t as f,v as h}from"./chunk-JK6PMLQQ.js";import{a as r,e as u}from"./chunk-7SQTLUEN.js";import{a as s,c as o,d as g}from"./chunk-LTGQJYYO.js";import{a,e as m}from"./chunk-L5VSLPMW.js";m();h();u();g();var P={dbPath:c.dbPath,walMode:!0,mmapSize:r.MMAP_SIZE_BYTES,cacheSize:r.CACHE_SIZE_KB,busyTimeout:r.BUSY_TIMEOUT_MS},t=class e{static instance=null;static instancePromise=null;unifiedMemory=null;config;initialized=!1;initPromise=null;constructor(i){this.config={...P,...i}}static getInstance(i){return e.instance||(e.instance=new e(i)),e.instance}static async getInstanceAsync(i){return e.instance?.initialized?e.instance:(e.instancePromise||(e.instancePromise=(async()=>{let n=e.getInstance(i);return await n.initialize(),n})()),e.instancePromise)}static resetInstance(){e.instance&&(e.instance.close(),e.instance=null),e.instancePromise=null,f()}async initialize(){if(!this.initialized)return this.initPromise||(this.initPromise=this._doInitialize()),this.initPromise}async _doInitialize(){if(!this.initialized)try{let i={dbPath:this.config.dbPath,walMode:this.config.walMode,busyTimeout:this.config.busyTimeout,mmapSize:this.config.mmapSize,cacheSize:this.config.cacheSize};this.unifiedMemory=d(i),await this.unifiedMemory.initialize(),this.initialized=!0,console.log(`[UnifiedPersistence] Initialized via UnifiedMemoryManager: ${this.config.dbPath}`)}catch(i){throw this.initPromise=null,new Error(`Failed to initialize UnifiedPersistenceManager: ${a(i)}`)}}getDatabase(){if(!this.unifiedMemory||!this.initialized)throw new Error("UnifiedPersistenceManager not initialized");return this.unifiedMemory.getDatabase()}isInitialized(){return this.initialized}getDbPath(){return this.config.dbPath}prepare(i,n){if(!this.unifiedMemory)throw new Error("Database not initialized");return this.unifiedMemory.prepare(i,n)}transaction(i){if(!this.unifiedMemory)throw new Error("Database not initialized");return this.unifiedMemory.transaction(i)}getStats(){if(!this.unifiedMemory)throw new Error("Database not initialized");let i=this.unifiedMemory.getStats();return{tables:i.tables,fileSize:i.fileSize,walSize:i.walSize}}vacuum(){this.getDatabase().exec("VACUUM")}checkpoint(){this.getDatabase().pragma("wal_checkpoint(TRUNCATE)")}close(){this.initialized=!1,console.log("[UnifiedPersistence] Facade closed")}};function p(e){return t.getInstance(e)}async function E(e){let i=p(e);return await i.initialize(),i}function I(){t.resetInstance()}var l=!1;function M(){if(l)return;l=!0;let e=()=>{try{let n=t.instance;n&&n.close()}catch(n){console.debug("[UnifiedPersistence] Cleanup error:",n instanceof Error?n.message:n)}};process.on("beforeExit",e),s(e);let i=n=>{o(n)||(e(),process.exit(0))};process.on("SIGINT",i),process.on("SIGTERM",i)}M();export{P as a,t as b,p as c,E as d,I as e};
@@ -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.15.13");process.exit(0)}
2
- import{a as F,d as C}from"./chunk-S5AZCIZS.js";import{a as E}from"./chunk-JQGMW45H.js";import{a as O,b as P,c as x,e as J}from"./chunk-KDNJ4F3P.js";import{b as W,d as B}from"./chunk-J2ZIFFM6.js";var Q=new Set(["false","0","off","no"]),K=new Set([...Q,"disabled","disable","none","never"]),V=30,G=36500;function pe(l=process.env){let e=l.AQE_WORKERS_ENABLED;return e===void 0?!0:!Q.has(e.trim().toLowerCase())}function ge(l=process.env){let e=l.AQE_DISABLED_WORKERS;if(!e)return[];let t=e.split(",").map(i=>i.trim().toLowerCase()).filter(i=>i.length>0);return Array.from(new Set(t))}function fe(l=process.env){let e=l.AQE_DREAM_INSIGHTS_RETENTION_DAYS;if(e===void 0||e.trim()==="")return{retentionDays:V};let t=e.trim().toLowerCase();if(K.has(t))return{retentionDays:null};if(/^\d+$/.test(t)){let i=Number(t);if(i>=1&&i<=G)return{retentionDays:i}}return{retentionDays:null,warning:`Invalid AQE_DREAM_INSIGHTS_RETENTION_DAYS=${JSON.stringify(e)}; expected a whole number of days (1-${G}), 0 or "off". The dream_insights retention sweep is off until this is fixed; nothing is deleted.`}}var I="quality-daemon",R=class{constructor(e){this.backend=e}backend;async get(e,t){return this.backend.kvGet(e,t?.namespace??I)}async set(e,t){await this.backend.kvSet(e,t,I)}async search(e,t,i){return this.backend.kvSearch(e,i?.namespace??I,t)}};import{cpus as ce,freemem as de,totalmem as he,loadavg as me}from"os";var p=class{queues={now:[],next:[],later:[]};_maxSize;constructor(e=1e3){this._maxSize=e}enqueue(e){return this.size>=this._maxSize&&(this.pruneExpired(),this.size>=this._maxSize)?!1:(this.queues[e.priority].push(e),!0)}dequeue(){let e=Date.now();for(let t of["now","next","later"]){let i=this.queues[t];for(;i.length>0;){let r=i.shift();if(!(r.ttlMs&&e-r.createdAt>r.ttlMs))return r}}}peek(){let e=Date.now();for(let t of["now","next","later"]){let i=this.queues[t];for(let r of i)if(!r.ttlMs||e-r.createdAt<=r.ttlMs)return r}}drainPriority(e){let t=this.queues[e].splice(0),i=Date.now();return t.filter(r=>!r.ttlMs||i-r.createdAt<=r.ttlMs)}pruneExpired(){let e=0,t=Date.now();for(let i of["now","next","later"]){let r=this.queues[i].length;this.queues[i]=this.queues[i].filter(o=>!o.ttlMs||t-o.createdAt<=o.ttlMs),e+=r-this.queues[i].length}return e}get size(){return this.queues.now.length+this.queues.next.length+this.queues.later.length}get depths(){return{now:this.queues.now.length,next:this.queues.next.length,later:this.queues.later.length}}get isEmpty(){return this.size===0}clear(){this.queues.now=[],this.queues.next=[],this.queues.later=[]}};import{watch as Y}from"fs";import{resolve as $,join as X}from"path";import{existsSync as Z,readFileSync as ee}from"fs";var M=1e4,te={repoRoot:process.cwd(),debounceMs:500,maxChangedFiles:200,pollIntervalMs:5e3},g=class{constructor(e,t){this.queue=e;this.options={...te,...t}}queue;watcher;pollTimer;options;lastKnownHeads=new Map;debounceTimer;_running=!1;_polling=!1;get running(){return this._running}async start(){if(this._running)return;let e=$(this.options.repoRoot,".git","refs","heads");if(!Z(e))throw new Error(`Git refs directory not found: ${e}`);await this.snapshotHeads(),process.platform==="darwin"||process.platform==="win32"?this.watcher=Y(e,{recursive:!0},(i,r)=>{r&&this.handleRefChange(r)}):(this.pollTimer=setInterval(()=>{this.poll().catch(i=>{console.debug("[GitWatcher] Poll error:",i)})},this.options.pollIntervalMs),this.pollTimer.unref?.()),this._running=!0}stop(){this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=void 0),this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=void 0),this.watcher&&(this.watcher.close(),this.watcher=void 0),this._running=!1}async poll(){if(this._polling)return[];this._polling=!0;let e=[];try{let t=await C(["for-each-ref","--format=%(refname:short) %(objectname:short)","refs/heads/"],{cwd:this.options.repoRoot,timeout:M});for(let i of t.trim().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.15.14");process.exit(0)}
2
+ import{a as F,d as C}from"./chunk-QP2HLKTS.js";import{a as E}from"./chunk-EC65UZ77.js";import{a as O,b as P,c as x,e as J}from"./chunk-UDSB3XCG.js";import{b as W,d as B}from"./chunk-2UZBLC5H.js";var Q=new Set(["false","0","off","no"]),K=new Set([...Q,"disabled","disable","none","never"]),V=30,G=36500;function pe(l=process.env){let e=l.AQE_WORKERS_ENABLED;return e===void 0?!0:!Q.has(e.trim().toLowerCase())}function ge(l=process.env){let e=l.AQE_DISABLED_WORKERS;if(!e)return[];let t=e.split(",").map(i=>i.trim().toLowerCase()).filter(i=>i.length>0);return Array.from(new Set(t))}function fe(l=process.env){let e=l.AQE_DREAM_INSIGHTS_RETENTION_DAYS;if(e===void 0||e.trim()==="")return{retentionDays:V};let t=e.trim().toLowerCase();if(K.has(t))return{retentionDays:null};if(/^\d+$/.test(t)){let i=Number(t);if(i>=1&&i<=G)return{retentionDays:i}}return{retentionDays:null,warning:`Invalid AQE_DREAM_INSIGHTS_RETENTION_DAYS=${JSON.stringify(e)}; expected a whole number of days (1-${G}), 0 or "off". The dream_insights retention sweep is off until this is fixed; nothing is deleted.`}}var I="quality-daemon",R=class{constructor(e){this.backend=e}backend;async get(e,t){return this.backend.kvGet(e,t?.namespace??I)}async set(e,t){await this.backend.kvSet(e,t,I)}async search(e,t,i){return this.backend.kvSearch(e,i?.namespace??I,t)}};import{cpus as ce,freemem as de,totalmem as he,loadavg as me}from"os";var p=class{queues={now:[],next:[],later:[]};_maxSize;constructor(e=1e3){this._maxSize=e}enqueue(e){return this.size>=this._maxSize&&(this.pruneExpired(),this.size>=this._maxSize)?!1:(this.queues[e.priority].push(e),!0)}dequeue(){let e=Date.now();for(let t of["now","next","later"]){let i=this.queues[t];for(;i.length>0;){let r=i.shift();if(!(r.ttlMs&&e-r.createdAt>r.ttlMs))return r}}}peek(){let e=Date.now();for(let t of["now","next","later"]){let i=this.queues[t];for(let r of i)if(!r.ttlMs||e-r.createdAt<=r.ttlMs)return r}}drainPriority(e){let t=this.queues[e].splice(0),i=Date.now();return t.filter(r=>!r.ttlMs||i-r.createdAt<=r.ttlMs)}pruneExpired(){let e=0,t=Date.now();for(let i of["now","next","later"]){let r=this.queues[i].length;this.queues[i]=this.queues[i].filter(o=>!o.ttlMs||t-o.createdAt<=o.ttlMs),e+=r-this.queues[i].length}return e}get size(){return this.queues.now.length+this.queues.next.length+this.queues.later.length}get depths(){return{now:this.queues.now.length,next:this.queues.next.length,later:this.queues.later.length}}get isEmpty(){return this.size===0}clear(){this.queues.now=[],this.queues.next=[],this.queues.later=[]}};import{watch as Y}from"fs";import{resolve as $,join as X}from"path";import{existsSync as Z,readFileSync as ee}from"fs";var M=1e4,te={repoRoot:process.cwd(),debounceMs:500,maxChangedFiles:200,pollIntervalMs:5e3},g=class{constructor(e,t){this.queue=e;this.options={...te,...t}}queue;watcher;pollTimer;options;lastKnownHeads=new Map;debounceTimer;_running=!1;_polling=!1;get running(){return this._running}async start(){if(this._running)return;let e=$(this.options.repoRoot,".git","refs","heads");if(!Z(e))throw new Error(`Git refs directory not found: ${e}`);await this.snapshotHeads(),process.platform==="darwin"||process.platform==="win32"?this.watcher=Y(e,{recursive:!0},(i,r)=>{r&&this.handleRefChange(r)}):(this.pollTimer=setInterval(()=>{this.poll().catch(i=>{console.debug("[GitWatcher] Poll error:",i)})},this.options.pollIntervalMs),this.pollTimer.unref?.()),this._running=!0}stop(){this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=void 0),this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=void 0),this.watcher&&(this.watcher.close(),this.watcher=void 0),this._running=!1}async poll(){if(this._polling)return[];this._polling=!0;let e=[];try{let t=await C(["for-each-ref","--format=%(refname:short) %(objectname:short)","refs/heads/"],{cwd:this.options.repoRoot,timeout:M});for(let i of t.trim().split(`
3
3
  `)){if(!i)continue;let[r,o]=i.split(" "),n=this.lastKnownHeads.get(r);n&&n!==o&&(e.push(r),await this.enqueueCommitAnalysis(r,o)),this.lastKnownHeads.set(r,o)}}catch{}finally{this._polling=!1}return e}handleRefChange(e){this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>{this.processRefChange(e).catch(t=>{console.debug("[GitWatcher] Error processing ref change:",t)})},this.options.debounceMs)}async processRefChange(e){let t=e.replace(/\\/g,"/"),i=$(this.options.repoRoot,".git","refs","heads"),r=X(i,e),o;try{o=ee(r,"utf-8").trim()}catch{return}this.lastKnownHeads.get(t)!==o&&(this.lastKnownHeads.set(t,o),await this.enqueueCommitAnalysis(t,o))}async enqueueCommitAnalysis(e,t){if(E(t,"commit hash"))return;let i=[];try{i=(await C(["diff-tree","--no-commit-id","--name-only","-r",t],{cwd:this.options.repoRoot,timeout:M})).trim().split(`
4
4
  `).filter(Boolean).slice(0,this.options.maxChangedFiles)}catch{}let r={type:"git_commit",branch:e,commitHash:t,changedFiles:i},o={id:`git-${t}-${Date.now()}`,priority:"next",payload:r,createdAt:Date.now(),source:"git-watcher",ttlMs:300*1e3};this.queue.enqueue(o)}async snapshotHeads(){try{let e=await C(["for-each-ref","--format=%(refname:short) %(objectname:short)","refs/heads/"],{cwd:this.options.repoRoot,timeout:M});for(let t of e.trim().split(`
5
5
  `)){if(!t)continue;let[i,r]=t.split(" ");this.lastKnownHeads.set(i,r)}}catch{}}};function A(l,e){return l===null||e===null?0:l-e}var ie={regressionThreshold:2,gapThreshold:60,memoryPrefix:"quality-daemon:coverage"},f=class{constructor(e,t){this.queue=e;this.options={...ie,...t}}queue;options;async analyze(e,t,i){let r=await t.get(`${this.options.memoryPrefix}:snapshot`);if(await t.set(`${this.options.memoryPrefix}:snapshot`,e),!r)return{regressionDetected:!1,overallDelta:{line:0,branch:0,function:0,statement:0},affectedFiles:[],newGaps:[]};let o=r,n={line:e.overall.line-o.overall.line,branch:A(e.overall.branch,o.overall.branch??null),function:A(e.overall.function,o.overall.function??null),statement:A(e.overall.statement,o.overall.statement??null)},s=n.line<-this.options.regressionThreshold||(n.branch??0)<-this.options.regressionThreshold,a=i??Object.keys(e.files),c=[],d=[];for(let h of a){let u=e.files[h],m=o.files[h];if(!u)continue;let q=m?u.line-m.line:0,N=m?u.branch-m.branch:0,T=m?u.uncoveredLines.filter(_=>!m.uncoveredLines.includes(_)):u.uncoveredLines;if((q!==0||N!==0||T.length>0)&&c.push({file:h,lineDelta:q,branchDelta:N,newUncoveredLines:T}),u.line<this.options.gapThreshold){let _=this.computeRiskScore(u,T.length);d.push({file:h,uncoveredLines:u.uncoveredLines,currentCoverage:u.line,riskScore:_})}}return(s||d.length>0)&&this.enqueueTestSuggestion(e,o,d),await t.set(`${this.options.memoryPrefix}:delta`,{timestamp:Date.now(),overallDelta:n,regressionDetected:s,affectedFileCount:c.length,gapCount:d.length}),{regressionDetected:s,overallDelta:n,affectedFiles:c,newGaps:d}}async buildSnapshot(e){let t=await e.get("coverage:latest"),i=F(t);if(i)return{timestamp:Date.now(),overall:{line:i.line,branch:i.branch,function:i.function,statement:i.statement},files:t&&typeof t.files=="object"?t.files:{}}}computeRiskScore(e,t){let r=1-Math.min(100,Math.max(0,e.line))/100,o=Math.min(t/50,1);return Math.min(1,r*.6+o*.4)}enqueueTestSuggestion(e,t,i){let r={type:"coverage_delta",previousSnapshot:`snapshot-${t.timestamp}`,currentSnapshot:`snapshot-${e.timestamp}`},o={id:`coverage-delta-${Date.now()}`,priority:i.some(n=>n.riskScore>.8)?"now":"next",payload:r,createdAt:Date.now(),source:"coverage-delta",ttlMs:600*1e3};this.queue.enqueue(o)}};J();import{execFile as re}from"child_process";import{promisify as oe}from"util";var ne=oe(re),se={runsPerWorkflow:10,flakyThreshold:3,repo:""},y=class{constructor(e,t){this.queue=e;this.options={...se,...t}}queue;options;async check(){let e=await this.fetchRecentRuns(),t=this.groupByWorkflow(e),i=[],r=[],o=0;for(let[s,a]of Object.entries(t)){let c=a.filter(m=>m.conclusion==="failure").length,d=a.length>0?(a.length-c)/a.length*100:100,h=this.countConsecutiveFailures(a),u=a[0]?.conclusion??"unknown";u==="failure"&&o++,h>=this.options.flakyThreshold&&(r.push(s),this.enqueueFailureAlert(s,a[0])),i.push({name:s,recentRuns:a.length,failedRuns:c,successRate:Math.round(d*10)/10,lastConclusion:u,consecutiveFailures:h})}let n=this.calculateHealthScore(i);return{timestamp:Date.now(),workflows:i,failingWorkflows:o,flakyWorkflows:r,healthScore:n}}async fetchRecentRuns(){try{let e=["run","list","--limit",String(this.options.runsPerWorkflow*5),"--json","name,status,conclusion,headBranch,number,databaseId,createdAt"];this.options.repo&&e.push("--repo",this.options.repo);let{stdout:t}=await ne("gh",e,{timeout:15e3});return JSON.parse(t).map(r=>({name:r.name,status:r.status,conclusion:r.conclusion??"pending",headBranch:r.headBranch,runNumber:r.number,databaseId:r.databaseId,createdAt:r.createdAt}))}catch{return[]}}groupByWorkflow(e){let t=O();for(let i of e){let r=P(t,i.name);r||(r=[],x(t,i.name,r)),r.push(i)}for(let i of Object.keys(t))x(t,i,P(t,i).slice(0,this.options.runsPerWorkflow));return t}countConsecutiveFailures(e){let t=0;for(let i of e)if(i.conclusion==="failure")t++;else break;return t}calculateHealthScore(e){if(e.length===0)return 100;let t=e.reduce((i,r)=>i+r.successRate,0)/e.length;return Math.round(t)}enqueueFailureAlert(e,t){let i={type:"ci_failure",workflowName:e,runId:t.databaseId,conclusion:t.conclusion},r={id:`ci-failure-${e}-${Date.now()}`,priority:"now",payload:i,createdAt:Date.now(),source:"ci-monitor",ttlMs:1800*1e3};this.queue.enqueue(r)}};var ae={memoryPrefix:"quality-daemon:suggestions",maxSuggestions:100,minRiskScore:.3},v=class{options;constructor(e){this.options={...ae,...e}}async suggest(e,t,i){let r=[],o=e.filter(s=>s.riskScore>=this.options.minRiskScore);for(let s of o){let a=t.includes(s.file),c=this.determinePriority(s,a),d=this.determineTestType(s.file),h=this.estimateEffort(s);r.push({id:`suggestion-${Date.now()}-${r.length}`,file:s.file,uncoveredLines:s.uncoveredLines.slice(0,50),suggestedTestType:d,description:this.generateDescription(s,d),priority:c,estimatedEffort:h,createdAt:Date.now(),status:"pending"})}r.sort((s,a)=>{let c={high:0,medium:1,low:2};return c[s.priority]-c[a.priority]});let n=r.slice(0,this.options.maxSuggestions);return await this.storeSuggestions(n,i),n}async getPending(e){return(await e.get(`${this.options.memoryPrefix}:list`)??[]).filter(i=>i.status==="pending")}async updateStatus(e,t,i){let r=await i.get(`${this.options.memoryPrefix}:list`);if(!r)return!1;let o=r.findIndex(s=>s.id===e);if(o===-1)return!1;let n=r.map((s,a)=>a===o?{...s,status:t}:s);return await i.set(`${this.options.memoryPrefix}:list`,n),!0}determinePriority(e,t){return e.riskScore>.8?"high":t||e.riskScore>.5?"medium":"low"}determineTestType(e){return e.includes("/api/")||e.includes("/routes/")||e.includes("/handlers/")?"integration":e.includes("/e2e/")||e.includes("/pages/")||e.includes("/views/")?"e2e":"unit"}estimateEffort(e){return e.uncoveredLines.length<=10?"small":e.uncoveredLines.length<=50?"medium":"large"}generateDescription(e,t){let i=e.uncoveredLines.length,r=Math.round(e.currentCoverage);return`Add ${t} tests for ${e.file} (${i} uncovered lines, ${r}% coverage, risk ${(e.riskScore*100).toFixed(0)}%)`}async storeSuggestions(e,t){let o=[...(await t.get(`${this.options.memoryPrefix}:list`)??[]).filter(n=>n.status!=="pending"),...e].slice(-this.options.maxSuggestions);await t.set(`${this.options.memoryPrefix}:list`,o),await t.set(`${this.options.memoryPrefix}:count`,{pending:e.length,total:o.length,lastUpdated:Date.now()})}};var le={memoryPrefix:"quality-daemon:nightly",maxEntryAge:6048e5,nightlyHour:2},w=class{constructor(e,t){this.queue=e;this.options={...le,...t}}queue;options;lastRunDate;shouldRun(){let e=new Date,t=e.toISOString().split("T")[0];return this.lastRunDate===t?!1:e.getHours()>=this.options.nightlyHour}scheduleIfDue(){if(!this.shouldRun())return!1;let e={type:"nightly",tasks:["consolidate_patterns","prune_expired","generate_report"]},t={id:`nightly-${Date.now()}`,priority:"later",payload:e,createdAt:Date.now(),source:"nightly-consolidation",ttlMs:720*60*1e3};return this.queue.enqueue(t)}async execute(e,t){let i=Date.now(),r=new Date().toISOString().split("T")[0],o=await this.consolidatePatterns(e),n=await this.pruneExpired(e),s=this.generateReport(r,t);await e.set(`${this.options.memoryPrefix}:report:${r}`,s),this.lastRunDate=r;let a={timestamp:Date.now(),patternsConsolidated:o,entriesPruned:n,reportGenerated:!0,durationMs:Date.now()-i};return await e.set(`${this.options.memoryPrefix}:last-result`,a),a}async getLastResult(e){return e.get(`${this.options.memoryPrefix}:last-result`)}async consolidatePatterns(e){let t=await e.search("quality-daemon:*"),i=0;return await e.get("quality-daemon:suggestions:count")&&i++,await e.get("quality-daemon:coverage:delta")&&i++,i}async pruneExpired(e){let t=await e.search("quality-daemon:*"),i=0,r=Date.now();for(let o of t){if(o.endsWith(":snapshot")||o.endsWith(":list"))continue;let n=await e.get(o);n&&typeof n.timestamp=="number"&&r-n.timestamp>this.options.maxEntryAge&&(await e.set(o,{pruned:!0,prunedAt:r}),i++)}return i}generateReport(e,t){return{date:e,coverageHealth:t.coverageHealth??0,ciHealth:t.ciHealth??0,commitsAnalyzed:t.commitsAnalyzed??0,suggestionsGenerated:t.suggestionsGenerated??0,notificationsSent:t.notificationsSent??0,queueDepthAvg:t.queueDepthAvg??0,daemonUptime:t.uptimeSeconds??0}}};B();import{writeFileSync as H,mkdirSync as L,readdirSync as D,readFileSync as U,unlinkSync as z}from"fs";import{join as b}from"path";var ue={maxNotifications:200},k=class{notificationsDir;maxNotifications;webhookUrl;urlValidator;_sentCount=0;constructor(e){this.notificationsDir=e?.notificationsDir??W("notifications"),this.maxNotifications=e?.maxNotifications??ue.maxNotifications,this.webhookUrl=e?.webhookUrl,this.urlValidator=e?.urlValidator}get sentCount(){return this._sentCount}initialize(){L(this.notificationsDir,{recursive:!0})}async send(e){let t={...e,id:`notif-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,timestamp:Date.now(),read:!1};return this.writeToFile(t),this.webhookUrl&&await this.sendWebhook(t),this._sentCount++,this.pruneOldNotifications(),t}list(e){let t=e?.limit??50;try{let i=D(this.notificationsDir).filter(o=>o.endsWith(".json")).sort().reverse(),r=[];for(let o of i){if(r.length>=t)break;try{let n=U(b(this.notificationsDir,o),"utf-8"),s=JSON.parse(n);if(e?.unreadOnly&&s.read||e?.type&&s.type!==e.type)continue;r.push(s)}catch{}}return r}catch{return[]}}markRead(e){try{let t=D(this.notificationsDir).filter(n=>n.endsWith(`-${e}.json`));if(t.length===0)return!1;let i=b(this.notificationsDir,t[0]),o={...JSON.parse(U(i,"utf-8")),read:!0};return H(i,JSON.stringify(o,null,2)),!0}catch{return!1}}clear(){try{let e=D(this.notificationsDir).filter(t=>t.endsWith(".json"));for(let t of e)z(b(this.notificationsDir,t));return e.length}catch{return 0}}writeToFile(e){try{L(this.notificationsDir,{recursive:!0});let t=`${e.timestamp}-${e.id}.json`,i=b(this.notificationsDir,t);H(i,JSON.stringify(e,null,2))}catch(t){console.debug("[NotificationService] Failed to write notification:",t)}}async sendWebhook(e){if(this.webhookUrl){if(this.urlValidator&&!this.urlValidator(this.webhookUrl)){console.warn("[NotificationService] Webhook URL blocked by SSRF guard:",this.webhookUrl);return}try{let t=await fetch(this.webhookUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e),signal:AbortSignal.timeout(5e3)});t.ok||console.debug(`[NotificationService] Webhook returned ${t.status}`)}catch(t){console.debug("[NotificationService] Webhook delivery failed:",t)}}}pruneOldNotifications(){try{let e=D(this.notificationsDir).filter(i=>i.endsWith(".json")).sort();if(e.length<=this.maxNotifications)return;let t=e.slice(0,e.length-this.maxNotifications);for(let i of t)z(b(this.notificationsDir,i))}catch{}}};var S={tickIntervalMs:3e4,ciPollIntervalMs:5*6e4,coverageCheckIntervalMs:2*6e4,cpuThreshold:.7,memoryThreshold:.8},j=class{queue;gitWatcher;coverageDelta;ciMonitor;testSuggester;nightlyConsolidation;notificationService;tickTimer;_running=!1;_startedAt=0;_tickCount=0;_lastTickAt;_throttled=!1;_commitsAnalyzed=0;_suggestionsGenerated=0;_ciHealth=100;_coverageHealth=100;_lastCICheck;_lastCoverageCheck;_memory;config;constructor(e){this.config={tickIntervalMs:e?.tickIntervalMs??S.tickIntervalMs,ciPollIntervalMs:e?.ciPollIntervalMs??S.ciPollIntervalMs,coverageCheckIntervalMs:e?.coverageCheckIntervalMs??S.coverageCheckIntervalMs,cpuThreshold:e?.cpuThreshold??S.cpuThreshold,memoryThreshold:e?.memoryThreshold??S.memoryThreshold},this.queue=new p,this.gitWatcher=new g(this.queue,e?.git),this.coverageDelta=new f(this.queue,e?.coverage),this.ciMonitor=new y(this.queue,e?.ci),this.testSuggester=new v(e?.suggestions),this.nightlyConsolidation=new w(this.queue,e?.nightly),this.notificationService=new k(e?.notifications)}get running(){return this._running}async start(e){this._running||(this._memory=e,this._running=!0,this._startedAt=Date.now(),this.notificationService.initialize(),await this.gitWatcher.start().catch(t=>{console.debug("[QualityDaemon] Git watcher failed to start:",t)}),this.scheduleTick())}async stop(){this._running&&(this._running=!1,this.tickTimer&&(clearTimeout(this.tickTimer),this.tickTimer=void 0),this.gitWatcher.stop(),this._memory&&await this._memory.set("quality-daemon:state",{stoppedAt:Date.now(),tickCount:this._tickCount,commitsAnalyzed:this._commitsAnalyzed,suggestionsGenerated:this._suggestionsGenerated}))}getStatus(){return{running:this._running,uptimeSeconds:this._running?Math.floor((Date.now()-this._startedAt)/1e3):0,tickCount:this._tickCount,queueDepth:this.queue.depths,lastTickAt:this._lastTickAt,throttled:this._throttled,commitsAnalyzed:this._commitsAnalyzed,suggestionsGenerated:this._suggestionsGenerated,notificationsSent:this.notificationService.sentCount,ciHealth:this._ciHealth,coverageHealth:this._coverageHealth,lastCICheck:this._lastCICheck,lastCoverageCheck:this._lastCoverageCheck}}scheduleTick(){this._running&&(this.tickTimer=setTimeout(()=>this.tick(),this.config.tickIntervalMs),this.tickTimer.unref?.())}async tick(){if(!(!this._running||!this._memory)){if(this._tickCount++,this._lastTickAt=Date.now(),this._throttled=this.isResourceConstrained(),this._throttled){await this.processNowItems(this._memory),this.scheduleTick();return}await this.processQueue(this._memory),await this.runPeriodicChecks(this._memory),this.nightlyConsolidation.scheduleIfDue(),this.queue.pruneExpired(),this.scheduleTick()}}async processQueue(e){let t=0,i=10;for(;t<i&&!this.queue.isEmpty;){let r=this.queue.dequeue();if(!r)break;await this.handleQueueItem(r,e),t++}}async processNowItems(e){let t=this.queue.drainPriority("now");for(let i of t)await this.handleQueueItem(i,e)}async handleQueueItem(e,t){let i=e.payload;switch(i.type){case"git_commit":{this._commitsAnalyzed++;let r=await this.coverageDelta.buildSnapshot(t);if(r){let o=await this.coverageDelta.analyze(r,t,i.changedFiles);if(o.regressionDetected&&await this.notificationService.send({type:"coverage_drop",title:"Coverage Regression Detected",message:`Line coverage delta: ${o.overallDelta.line.toFixed(1)}% (${o.affectedFiles.length} files affected)`,severity:"high",metadata:{delta:o.overallDelta,commit:i.commitHash}}),o.newGaps.length>0){let n=await this.testSuggester.suggest(o.newGaps,i.changedFiles,t);this._suggestionsGenerated+=n.length,n.length>0&&await this.notificationService.send({type:"suggestion_available",title:"New Test Suggestions Available",message:`${n.length} test suggestions generated for uncovered code`,severity:"info",metadata:{count:n.length}})}}break}case"coverage_delta":{let r=await this.testSuggester.getPending(t);r.length>0&&await this.notificationService.send({type:"suggestion_available",title:"Test Suggestions Pending",message:`${r.length} test suggestions awaiting review`,severity:"info",metadata:{count:r.length}});break}case"gate_failure":await this.notificationService.send({type:"gate_failure",title:`Quality Gate Failed: ${i.gateName}`,message:`Score ${i.score} below threshold ${i.threshold}`,severity:"critical",metadata:{gate:i.gateName,score:i.score,threshold:i.threshold}});break;case"ci_failure":await this.notificationService.send({type:"ci_failure",title:`CI Failure: ${i.workflowName}`,message:`Workflow ${i.workflowName} run #${i.runId} concluded: ${i.conclusion}`,severity:"high",metadata:{workflow:i.workflowName,runId:i.runId}});break;case"nightly":{let r={coverageHealth:this._coverageHealth,ciHealth:this._ciHealth,commitsAnalyzed:this._commitsAnalyzed,suggestionsGenerated:this._suggestionsGenerated,notificationsSent:this.notificationService.sentCount,queueDepthAvg:this.queue.size,uptimeSeconds:Math.floor((Date.now()-this._startedAt)/1e3)};await this.nightlyConsolidation.execute(t,r);break}default:console.warn("[QualityDaemon] Unhandled payload type:",i.type)}}async runPeriodicChecks(e){let t=Date.now();if(!this._lastCICheck||t-this._lastCICheck>=this.config.ciPollIntervalMs)try{let i=await this.ciMonitor.check();this._ciHealth=i.healthScore,this._lastCICheck=t,i.flakyWorkflows.length>0&&await this.notificationService.send({type:"flaky_detected",title:"Flaky Workflows Detected",message:`${i.flakyWorkflows.length} workflows showing repeated failures: ${i.flakyWorkflows.join(", ")}`,severity:"medium",metadata:{workflows:i.flakyWorkflows}})}catch{}if(!this._lastCoverageCheck||t-this._lastCoverageCheck>=this.config.coverageCheckIntervalMs)try{let i=await this.coverageDelta.buildSnapshot(e);if(i){let r=[i.overall.line,i.overall.branch,i.overall.function,i.overall.statement].filter(o=>typeof o=="number");this._coverageHealth=Math.round(r.reduce((o,n)=>o+n,0)/r.length),this._lastCoverageCheck=t}}catch{}}isResourceConstrained(){if(1-de()/he()>this.config.memoryThreshold)return!0;let t=ce().length;return(t>0?me()[0]/t:0)>this.config.cpuThreshold}};export{pe as a,ge as b,fe as c,R as d,j as e};
@@ -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.15.13");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.15.14");process.exit(0)}
2
2
  var h=Object.create;var f=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var j=Object.getOwnPropertyNames;var k=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty;var m=(a=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(a,{get:(b,c)=>(typeof require<"u"?require:b)[c]}):a)(function(a){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});var n=(a,b,c)=>()=>{if(c)throw c[0];try{return a&&(b=a(a=0)),b}catch(d){throw c=[d],d}};var o=(a,b)=>()=>{try{return b||a((b={exports:{}}).exports,b),b.exports}catch(c){throw b=0,c}},p=(a,b)=>{for(var c in b)f(a,c,{get:b[c],enumerable:!0})},g=(a,b,c,d)=>{if(b&&typeof b=="object"||typeof b=="function")for(let e of j(b))!l.call(a,e)&&e!==c&&f(a,e,{get:()=>b[e],enumerable:!(d=i(b,e))||d.enumerable});return a};var q=(a,b,c)=>(c=a!=null?h(k(a)):{},g(b||!a||!a.__esModule?f(c,"default",{value:a,enumerable:!0}):c,a)),r=a=>g(f({},"__esModule",{value:!0}),a);export{m as a,n as b,o as c,p as d,q as e,r as f};