agentic-qe 3.15.12 → 3.15.13

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 (467) hide show
  1. package/.claude/skills/skills-manifest.json +1 -1
  2. package/CHANGELOG.md +118 -0
  3. package/assets/skills/skills-manifest.json +1 -1
  4. package/dist/cli/bundle.js +6 -6
  5. package/dist/cli/chunks/adapter-KCQDVYY2.js +2 -0
  6. package/dist/cli/chunks/{agent-booster-wasm-5VZCKTIJ.js → agent-booster-wasm-6RRQWMNE.js} +2 -2
  7. package/dist/cli/chunks/{agent-handler-K3C6CQCD.js → agent-handler-AOH6TV7W.js} +2 -2
  8. package/dist/cli/chunks/{agent-memory-branch-NVFQ25WS.js → agent-memory-branch-2P54SF5N.js} +2 -2
  9. package/dist/cli/chunks/aqe-learning-engine-SAQOHSGN.js +2 -0
  10. package/dist/cli/chunks/{arena-QGWIJADQ.js → arena-NSVFCAF5.js} +2 -2
  11. package/dist/cli/chunks/{arena-TSZVDSXS.js → arena-X6MOGQHA.js} +4 -4
  12. package/dist/cli/chunks/{audit-KIEE2SHJ.js → audit-27DJLQNM.js} +3 -3
  13. package/dist/cli/chunks/base-WCACU3FN.js +2 -0
  14. package/dist/cli/chunks/{better-sqlite3-BNB32NW3.js → better-sqlite3-BU5GXILS.js} +2 -2
  15. package/dist/cli/chunks/{brain-handler-MPC5SPYI.js → brain-handler-GTQNHHZS.js} +3 -3
  16. package/dist/cli/chunks/{branch-enumerator-LZ7UXKAY.js → branch-enumerator-5CLULOCU.js} +2 -2
  17. package/dist/cli/chunks/{browser-VDHAW4RK.js → browser-R4DMU3LN.js} +2 -2
  18. package/dist/cli/chunks/browser-workflow-G6IASEAP.js +2 -0
  19. package/dist/cli/chunks/{chunk-QUJJYTJH.js → chunk-2G7TVT6W.js} +2 -2
  20. package/dist/cli/chunks/{chunk-FAGKBOX2.js → chunk-32ZMWEP3.js} +2 -2
  21. package/dist/cli/chunks/{chunk-FNUFTWEO.js → chunk-3AN5TNGD.js} +3 -3
  22. package/dist/cli/chunks/{chunk-JOWUS2X5.js → chunk-3LJ7LQMV.js} +1 -1
  23. package/dist/cli/chunks/{chunk-O4QJMANM.js → chunk-3QZEGE67.js} +1 -1
  24. package/dist/cli/chunks/{chunk-ICKUINKD.js → chunk-3RZV5DGO.js} +2 -2
  25. package/dist/cli/chunks/{chunk-W4II6SIH.js → chunk-3Y2ROSCL.js} +2 -2
  26. package/dist/cli/chunks/{chunk-L7NGKANW.js → chunk-3Y7TJFHU.js} +2 -2
  27. package/dist/cli/chunks/{chunk-UUZZXHUF.js → chunk-3YNLWPBF.js} +2 -2
  28. package/dist/cli/chunks/{chunk-JR6CUKAI.js → chunk-42J34YG4.js} +2 -2
  29. package/dist/cli/chunks/{chunk-65TH6RPD.js → chunk-4OVC4RIL.js} +1 -1
  30. package/dist/cli/chunks/{chunk-DRCBRUGN.js → chunk-526QYFJU.js} +2 -2
  31. package/dist/cli/chunks/{chunk-MCPXNUDK.js → chunk-5FKWCZNF.js} +2 -2
  32. package/dist/cli/chunks/{chunk-NX4BCSOZ.js → chunk-5K26BEYB.js} +2 -2
  33. package/dist/cli/chunks/{chunk-MCPEC6OO.js → chunk-5MDERQH3.js} +1 -1
  34. package/dist/cli/chunks/{chunk-7JFDLL2F.js → chunk-5VMAV6T6.js} +1 -1
  35. package/dist/cli/chunks/{chunk-5TAEW5OV.js → chunk-5ZGM3RMH.js} +1 -1
  36. package/dist/cli/chunks/{chunk-SG2TX72G.js → chunk-6KATY3KS.js} +2 -2
  37. package/dist/cli/chunks/{chunk-KA5SHLMW.js → chunk-6Z7PRBSG.js} +2 -2
  38. package/dist/cli/chunks/{chunk-LFBA735S.js → chunk-72ASBE35.js} +3 -3
  39. package/dist/cli/chunks/{chunk-TOWOJGEI.js → chunk-756CGMEH.js} +1 -1
  40. package/dist/cli/chunks/{chunk-IVTQF55W.js → chunk-75RDHBAX.js} +3 -3
  41. package/dist/cli/chunks/{chunk-66PXR3NI.js → chunk-7CMTY45A.js} +2 -2
  42. package/dist/cli/chunks/{chunk-WLRU6ESI.js → chunk-7JUC2MVZ.js} +2 -2
  43. package/dist/cli/chunks/{chunk-SBHM5X2S.js → chunk-7NA7JXNB.js} +2 -2
  44. package/dist/cli/chunks/{chunk-HZBXJFGN.js → chunk-7PLIEBY7.js} +2 -2
  45. package/dist/cli/chunks/{chunk-2ASQRBK2.js → chunk-7YTGHGK4.js} +2 -2
  46. package/dist/cli/chunks/{chunk-SQVZ3TRU.js → chunk-A64JFBWI.js} +2 -2
  47. package/dist/cli/chunks/{chunk-2PPSS4JD.js → chunk-AL6FBH3E.js} +2 -2
  48. package/dist/cli/chunks/{chunk-3IU4LDZR.js → chunk-AQSVJNEH.js} +2 -2
  49. package/dist/cli/chunks/{chunk-C74M4WUI.js → chunk-ARJW4I2O.js} +2 -2
  50. package/dist/cli/chunks/{chunk-VF7FTD64.js → chunk-ASQYASNV.js} +1 -1
  51. package/dist/cli/chunks/{chunk-HLGFHHWV.js → chunk-BEGR4D6N.js} +2 -2
  52. package/dist/cli/chunks/{chunk-EN7GRVEQ.js → chunk-BK577VL7.js} +2 -2
  53. package/dist/cli/chunks/{chunk-KGA7VAI4.js → chunk-BLSLEVDI.js} +2 -2
  54. package/dist/cli/chunks/{chunk-HM3LSFTY.js → chunk-BTVEYBW2.js} +2 -2
  55. package/dist/cli/chunks/{chunk-J7Y7ZBIT.js → chunk-C6JTLKG7.js} +5 -5
  56. package/dist/cli/chunks/{chunk-PTBOLBM4.js → chunk-C7JM7CD3.js} +2 -2
  57. package/dist/cli/chunks/{chunk-IL7GQNNE.js → chunk-CCMKSHAT.js} +2 -2
  58. package/dist/cli/chunks/{chunk-23PQF7NN.js → chunk-CE7B5LU7.js} +1 -1
  59. package/dist/cli/chunks/{chunk-BMG2JLSQ.js → chunk-CM4LSLKR.js} +2 -2
  60. package/dist/cli/chunks/chunk-CRWPZT74.js +62 -0
  61. package/dist/cli/chunks/{chunk-4HWUECVD.js → chunk-CT6SAVXQ.js} +2 -2
  62. package/dist/cli/chunks/chunk-CV77DMDQ.js +2 -0
  63. package/dist/cli/chunks/{chunk-CU36D7TN.js → chunk-DFUASIKA.js} +2 -2
  64. package/dist/cli/chunks/{chunk-T4EN5VVK.js → chunk-DLD7RUZ4.js} +2 -2
  65. package/dist/cli/chunks/{chunk-IA55PFLG.js → chunk-DNDL7SOS.js} +2 -2
  66. package/dist/cli/chunks/{chunk-6QRI3JVE.js → chunk-DVGRPK7A.js} +2 -2
  67. package/dist/cli/chunks/{chunk-UREDS662.js → chunk-E56B6IDX.js} +2 -2
  68. package/dist/cli/chunks/{chunk-ZGROHCOW.js → chunk-E7CLYGS7.js} +1 -1
  69. package/dist/cli/chunks/{chunk-YNVEDFPQ.js → chunk-EXGMJFAT.js} +1 -1
  70. package/dist/cli/chunks/{chunk-JRYWLOBD.js → chunk-F3YS57NF.js} +2 -2
  71. package/dist/cli/chunks/{chunk-ZYOYR3UR.js → chunk-FZ76G4QJ.js} +1 -1
  72. package/dist/cli/chunks/{chunk-UIKQPO4Y.js → chunk-G2Q66Z23.js} +2 -2
  73. package/dist/cli/chunks/{chunk-5S4UIDFK.js → chunk-G6WDYBLQ.js} +1 -1
  74. package/dist/cli/chunks/{chunk-4SA7M34P.js → chunk-G77ERMUD.js} +1 -1
  75. package/dist/cli/chunks/{chunk-ADUAJIAU.js → chunk-GB6HBNH2.js} +2 -2
  76. package/dist/cli/chunks/{chunk-IETBWYHW.js → chunk-GHM6MQNK.js} +2 -2
  77. package/dist/cli/chunks/{chunk-QWG3SILX.js → chunk-GHY6Z6KO.js} +5 -5
  78. package/dist/cli/chunks/{chunk-AJEXPFAB.js → chunk-GII6UM3F.js} +1 -1
  79. package/dist/cli/chunks/{chunk-SDRJJUPO.js → chunk-GU5HNCWI.js} +1 -1
  80. package/dist/cli/chunks/{chunk-ULCW6IVQ.js → chunk-H4GG2NLO.js} +2 -2
  81. package/dist/cli/chunks/{chunk-7TA5MUPW.js → chunk-H4H2YSFH.js} +1 -1
  82. package/dist/cli/chunks/{chunk-5A66EGEW.js → chunk-HD7YIFOI.js} +2 -2
  83. package/dist/cli/chunks/{chunk-CDA5Z74H.js → chunk-HOAJUIBQ.js} +2 -2
  84. package/dist/cli/chunks/{chunk-4KUOYDY2.js → chunk-HQZGPJYG.js} +2 -2
  85. package/dist/cli/chunks/{chunk-G3AABG4Q.js → chunk-HZ5NXFXH.js} +2 -2
  86. package/dist/cli/chunks/{chunk-U6IXYQO4.js → chunk-I3C7JOXC.js} +2 -2
  87. package/dist/cli/chunks/{chunk-MAJXZYGK.js → chunk-IC3TQEOA.js} +1 -1
  88. package/dist/cli/chunks/{chunk-RYHG3I7J.js → chunk-IJUHSJ2U.js} +2 -2
  89. package/dist/cli/chunks/{chunk-DZGPUGUG.js → chunk-J2ZIFFM6.js} +2 -2
  90. package/dist/cli/chunks/{chunk-NA3F6FEO.js → chunk-JGZ722G3.js} +2 -2
  91. package/dist/cli/chunks/{chunk-PX5OPXY6.js → chunk-JQGMW45H.js} +1 -1
  92. package/dist/cli/chunks/{chunk-WGTEZT7G.js → chunk-JRRXCODW.js} +2 -2
  93. package/dist/cli/chunks/{chunk-4Y6OEBJZ.js → chunk-K3TLLJMX.js} +1 -1
  94. package/dist/cli/chunks/{chunk-RCOLPF3B.js → chunk-K4CZA77U.js} +2 -2
  95. package/dist/cli/chunks/{chunk-YIDAXOUX.js → chunk-K65CGKLD.js} +2 -2
  96. package/dist/cli/chunks/{chunk-5ADXFUMO.js → chunk-KADFXPPN.js} +2 -2
  97. package/dist/cli/chunks/{chunk-P5E26N2X.js → chunk-KB56CPU4.js} +2 -2
  98. package/dist/cli/chunks/{chunk-YLKIXEPP.js → chunk-KCW47QR5.js} +1 -1
  99. package/dist/cli/chunks/{chunk-SPC4RBLF.js → chunk-KDNJ4F3P.js} +2 -2
  100. package/dist/cli/chunks/{chunk-P7UFJ6DO.js → chunk-KDVZND5Q.js} +1 -1
  101. package/dist/cli/chunks/{chunk-TLRHAMX5.js → chunk-KUAKV3IW.js} +1 -1
  102. package/dist/cli/chunks/{chunk-ZROAMFX2.js → chunk-KV4T4MXK.js} +2 -2
  103. package/dist/cli/chunks/{chunk-UZED4YZ5.js → chunk-KWYH3FI4.js} +1 -1
  104. package/dist/cli/chunks/{chunk-33I2ZP6E.js → chunk-LFJALJOA.js} +2 -2
  105. package/dist/cli/chunks/{chunk-TXEUVUMO.js → chunk-LL7LDPXS.js} +1 -1
  106. package/dist/cli/chunks/{chunk-W5HQIYQU.js → chunk-LUZNKJE6.js} +3 -3
  107. package/dist/cli/chunks/{chunk-GKFV6CUD.js → chunk-LWR3FV3Y.js} +2 -2
  108. package/dist/cli/chunks/{chunk-TVA5GRIU.js → chunk-LZYQHVD4.js} +2 -2
  109. package/dist/cli/chunks/{chunk-2JYUA27M.js → chunk-M6AAGIG7.js} +1 -1
  110. package/dist/cli/chunks/{chunk-PT2NXS43.js → chunk-MAMQA43L.js} +1 -1
  111. package/dist/cli/chunks/chunk-MB46UBGY.js +3 -0
  112. package/dist/cli/chunks/{chunk-ZPVGX4DI.js → chunk-MFW5HSG4.js} +2 -2
  113. package/dist/cli/chunks/{chunk-47RMGDG4.js → chunk-MGZ5FJUW.js} +2 -2
  114. package/dist/cli/chunks/{chunk-G24SWTAX.js → chunk-MVVB7C2E.js} +410 -410
  115. package/dist/cli/chunks/{chunk-XZOYKB22.js → chunk-N4CYAKOX.js} +2 -2
  116. package/dist/cli/chunks/{chunk-QCPVUNN3.js → chunk-NT4DBXSX.js} +2 -2
  117. package/dist/cli/chunks/{chunk-3EWQN37E.js → chunk-NU3W5WFT.js} +2 -2
  118. package/dist/cli/chunks/{chunk-VZBC6DP7.js → chunk-NURIILUB.js} +1 -1
  119. package/dist/cli/chunks/{chunk-6E6HB4N4.js → chunk-NW7IBHJA.js} +4 -4
  120. package/dist/cli/chunks/{chunk-K3A3NWT3.js → chunk-NZ3GUMB2.js} +2 -2
  121. package/dist/cli/chunks/{chunk-GJKZ7UQO.js → chunk-NZD4DPSU.js} +2 -2
  122. package/dist/cli/chunks/{chunk-7QEUHNKO.js → chunk-O6FGXMHD.js} +1 -1
  123. package/dist/cli/chunks/{chunk-YVJEUX3I.js → chunk-OCAEXYFA.js} +2 -2
  124. package/dist/cli/chunks/{chunk-BOSMELJX.js → chunk-OFACHK5O.js} +2 -2
  125. package/dist/cli/chunks/{chunk-PGSJBXTD.js → chunk-P7A4NKTZ.js} +2 -2
  126. package/dist/cli/chunks/{chunk-HSA5IGGW.js → chunk-PB6J6HAA.js} +2 -2
  127. package/dist/cli/chunks/{chunk-TGMXUZZC.js → chunk-PHP5UBT4.js} +2 -2
  128. package/dist/cli/chunks/{chunk-NV74SICL.js → chunk-PIDQVU3L.js} +2 -2
  129. package/dist/cli/chunks/{chunk-TSOQ2QLT.js → chunk-PSFSPGUD.js} +2 -2
  130. package/dist/cli/chunks/{chunk-4A76VPU4.js → chunk-PT4FMJPQ.js} +2 -2
  131. package/dist/cli/chunks/{chunk-U7ZHDGXG.js → chunk-Q3UDLV5Z.js} +1 -1
  132. package/dist/cli/chunks/{chunk-BYRCB5JT.js → chunk-QDEJ4CI2.js} +2 -2
  133. package/dist/cli/chunks/{chunk-CA5UNWQF.js → chunk-QPNG5ZN2.js} +2 -2
  134. package/dist/cli/chunks/{chunk-W7H55PY4.js → chunk-R7SYRCRP.js} +1 -1
  135. package/dist/cli/chunks/{chunk-4LWMAAWK.js → chunk-RF7HWBHN.js} +2 -2
  136. package/dist/cli/chunks/{chunk-MMEALJ4D.js → chunk-RFNW2LGD.js} +2 -2
  137. package/dist/cli/chunks/{chunk-UCSK2RMI.js → chunk-S5AZCIZS.js} +2 -2
  138. package/dist/cli/chunks/{chunk-JW5PDJ5O.js → chunk-SE4VNN4I.js} +3 -3
  139. package/dist/cli/chunks/{chunk-URSTP3WI.js → chunk-SG3NX7QE.js} +2 -2
  140. package/dist/cli/chunks/{chunk-N7O3PF6Y.js → chunk-SSU73QAX.js} +2 -2
  141. package/dist/cli/chunks/{chunk-7DNR4KKR.js → chunk-SVLQRAMF.js} +1 -1
  142. package/dist/cli/chunks/{chunk-BC4T6SCV.js → chunk-SYV2V3PL.js} +4 -4
  143. package/dist/cli/chunks/{chunk-4CB3QPZM.js → chunk-T3PGQFDI.js} +2 -2
  144. package/dist/cli/chunks/{chunk-OHVYINGM.js → chunk-TCBBNUBP.js} +3 -3
  145. package/dist/cli/chunks/{chunk-YWWMNTBF.js → chunk-TOQWL2ZF.js} +2 -2
  146. package/dist/cli/chunks/{chunk-SITL5YZV.js → chunk-TSQC2KKZ.js} +2 -2
  147. package/dist/cli/chunks/{chunk-YUA6ZKKY.js → chunk-TWDW32W2.js} +2 -2
  148. package/dist/cli/chunks/{chunk-SUX5XB2Z.js → chunk-TWJTK4CC.js} +2 -2
  149. package/dist/cli/chunks/{chunk-32UTHIY5.js → chunk-U2FUXDDJ.js} +3 -3
  150. package/dist/cli/chunks/{chunk-ENGL7FIJ.js → chunk-UDQSYWVF.js} +1 -1
  151. package/dist/cli/chunks/{chunk-7OEFBWAG.js → chunk-UOC3O6RP.js} +2 -2
  152. package/dist/cli/chunks/chunk-UT2VZ33P.js +2 -0
  153. package/dist/cli/chunks/{chunk-MYF5CNGV.js → chunk-UTRV7T2N.js} +2 -2
  154. package/dist/cli/chunks/{chunk-KJDI5CHX.js → chunk-UXZSUMEA.js} +2 -2
  155. package/dist/cli/chunks/{chunk-DAUEK66C.js → chunk-VRHRBAEM.js} +1 -1
  156. package/dist/cli/chunks/{chunk-FZJCBSN4.js → chunk-VRVMIPTM.js} +2 -2
  157. package/dist/cli/chunks/{chunk-26672ISV.js → chunk-VTDFVFST.js} +2 -2
  158. package/dist/cli/chunks/{chunk-WTAUF6O4.js → chunk-VTOBUZL6.js} +2 -2
  159. package/dist/cli/chunks/{chunk-4PU5GTZW.js → chunk-VU5TBX2V.js} +2 -2
  160. package/dist/cli/chunks/{chunk-C3YOVASQ.js → chunk-W26B7ERY.js} +1 -1
  161. package/dist/cli/chunks/{chunk-CPIBIR3X.js → chunk-W2QWSQVE.js} +2 -2
  162. package/dist/cli/chunks/{chunk-L3PV7VXK.js → chunk-W3INMZZ6.js} +1 -1
  163. package/dist/cli/chunks/{chunk-5Z23ZMXZ.js → chunk-W3PPFHI5.js} +54 -54
  164. package/dist/cli/chunks/{chunk-NVRYELCY.js → chunk-WKGTGOYS.js} +3 -3
  165. package/dist/cli/chunks/{chunk-35NW676P.js → chunk-WNQS4WTS.js} +2 -2
  166. package/dist/cli/chunks/{chunk-O3IM4WRZ.js → chunk-WO274FRI.js} +2 -2
  167. package/dist/cli/chunks/{chunk-35MIUSXQ.js → chunk-WOCGL4QP.js} +2 -2
  168. package/dist/cli/chunks/{chunk-EF6OERRR.js → chunk-WQL7WCIZ.js} +1 -1
  169. package/dist/cli/chunks/{chunk-INZARYUD.js → chunk-X2Z7F4EU.js} +2 -2
  170. package/dist/cli/chunks/{chunk-2E2QO44T.js → chunk-X7N2JF2X.js} +2 -2
  171. package/dist/cli/chunks/{chunk-2IVE5AR3.js → chunk-XEAEYC6Y.js} +1 -1
  172. package/dist/cli/chunks/{chunk-IPA7K556.js → chunk-XNBOGCF3.js} +2 -2
  173. package/dist/cli/chunks/{chunk-A2JCRXTK.js → chunk-XPRVF4YE.js} +2 -2
  174. package/dist/cli/chunks/{chunk-VUR5THML.js → chunk-YBQH2VOP.js} +2 -2
  175. package/dist/cli/chunks/{chunk-A5Y7DAVQ.js → chunk-YQFLQE53.js} +2 -2
  176. package/dist/cli/chunks/{chunk-JGIJPDGD.js → chunk-YSZ5OE3Z.js} +2 -2
  177. package/dist/cli/chunks/{chunk-JNXK47OL.js → chunk-YXRASAPI.js} +2 -2
  178. package/dist/cli/chunks/{chunk-MYUMJ2ZI.js → chunk-YZEXYO4W.js} +1 -1
  179. package/dist/cli/chunks/{chunk-NNBQZR73.js → chunk-YZWBNBTW.js} +2 -2
  180. package/dist/cli/chunks/{chunk-WDEXOLK2.js → chunk-ZAKQLAHT.js} +1 -1
  181. package/dist/cli/chunks/{ci-BZNWW3I3.js → ci-ENOASTYB.js} +2 -2
  182. package/dist/cli/chunks/{ci-config-LOHNXOKV.js → ci-config-B26OXHQM.js} +2 -2
  183. package/dist/cli/chunks/{ci-output-LCOQBSJL.js → ci-output-JTCLLNOQ.js} +2 -2
  184. package/dist/cli/chunks/{circuit-breaker-7LRXTLFE.js → circuit-breaker-23JMFNM5.js} +2 -2
  185. package/dist/cli/chunks/{claude-flow-setup-HBU4VWC3.js → claude-flow-setup-ON6L462G.js} +2 -2
  186. package/dist/cli/chunks/client-TV3V2YZ5.js +2 -0
  187. package/dist/cli/chunks/{cline-installer-CO6MLH6X.js → cline-installer-OWQ4D2FQ.js} +2 -2
  188. package/dist/cli/chunks/{code-SIXBS6JM.js → code-2ZRL7SEU.js} +19 -18
  189. package/dist/cli/chunks/{code-index-extractor-GWJKZ2IQ.js → code-index-extractor-JXSQVM67.js} +2 -2
  190. package/dist/cli/chunks/{codex-installer-6NINVWXJ.js → codex-installer-7LXZYBSQ.js} +2 -2
  191. package/dist/cli/chunks/{completions-7VIX3GML.js → completions-C2LR623C.js} +2 -2
  192. package/dist/cli/chunks/{complexity-analyzer-FBQR6ZP2.js → complexity-analyzer-TGQLHCYJ.js} +2 -2
  193. package/dist/cli/chunks/{continuedev-installer-VA7RIXW5.js → continuedev-installer-RUGD24D2.js} +2 -2
  194. package/dist/cli/chunks/{copilot-installer-4QEBC4MU.js → copilot-installer-ZLFVLEJP.js} +2 -2
  195. package/dist/cli/chunks/core-handlers-PZT4OLWR.js +2 -0
  196. package/dist/cli/chunks/{cost-tracker-GRYKHPWL.js → cost-tracker-RT4QL745.js} +2 -2
  197. package/dist/cli/chunks/{coverage-USPMNKOU.js → coverage-NV3C4IMM.js} +3 -3
  198. package/dist/cli/chunks/cross-domain-router-QOFCZ7G4.js +2 -0
  199. package/dist/cli/chunks/{cursor-installer-ZXIPSZVH.js → cursor-installer-LJKLNFF6.js} +2 -2
  200. package/dist/cli/chunks/{daemon-D7F3RGI5.js → daemon-BMDXCQT5.js} +3 -3
  201. package/dist/cli/chunks/{daemon-N2VRHPSJ.js → daemon-FBH3IRYN.js} +4 -4
  202. package/dist/cli/chunks/{dag-attention-scheduler-NL6BA7BY.js → dag-attention-scheduler-JGDED55I.js} +2 -2
  203. package/dist/cli/chunks/{detect-XC2HCIIT.js → detect-SZIHIVCJ.js} +2 -2
  204. package/dist/cli/chunks/{dist-node-A3Y26MEI.js → dist-node-FV3KWXQ6.js} +2 -2
  205. package/dist/cli/chunks/{domain-handler-WV6SFXRB.js → domain-handler-GI5JWQOV.js} +2 -2
  206. package/dist/cli/chunks/{domain-plugins-KJIF6Z2B.js → domain-plugins-BUWY36TL.js} +2 -2
  207. package/dist/cli/chunks/domain-transfer-GCY7W5DA.js +2 -0
  208. package/dist/cli/chunks/dream-TRFBGDSQ.js +2 -0
  209. package/dist/cli/chunks/{embed-and-insert-pattern-PA3Y4KGO.js → embed-and-insert-pattern-GPRR3ZGD.js} +2 -2
  210. package/dist/cli/chunks/{eval-YGEZNUVE.js → eval-XPB3IGAP.js} +2 -2
  211. package/dist/cli/chunks/{experience-capture-middleware-D4T7NW6B.js → experience-capture-middleware-2E554UB3.js} +3 -3
  212. package/dist/cli/chunks/{fast-paths-6JYK7RYQ.js → fast-paths-ZSMWZPUC.js} +2 -2
  213. package/dist/cli/chunks/{feature-flags-RBH2GDSR.js → feature-flags-GIWVDVVC.js} +2 -2
  214. package/dist/cli/chunks/{feature-flags-DKXMDVPE.js → feature-flags-N7EOGE5P.js} +2 -2
  215. package/dist/cli/chunks/file-discovery-WCKGMSPZ.js +2 -0
  216. package/dist/cli/chunks/fleet-HCHDOUCX.js +44 -0
  217. package/dist/cli/chunks/{gnn-wrapper-MV54UC4C.js → gnn-wrapper-CZNCNXXZ.js} +2 -2
  218. package/dist/cli/chunks/{heartbeat-handler-7DKMVQQH.js → heartbeat-handler-6YUIF2YQ.js} +4 -4
  219. package/dist/cli/chunks/heartbeat-scheduler-P44A2OX3.js +2 -0
  220. package/dist/cli/chunks/hnsw-adapter-ZJQIQJKC.js +2 -0
  221. package/dist/cli/chunks/hnsw-index-HMG2GH3Z.js +2 -0
  222. package/dist/cli/chunks/{hnsw-legacy-bridge-6IWREDQC.js → hnsw-legacy-bridge-J3M3IK24.js} +2 -2
  223. package/dist/cli/chunks/{hnswlib-node-5BIESSCK.js → hnswlib-node-ULGTGDZW.js} +2 -2
  224. package/dist/cli/chunks/{hooks-3EETRM62.js → hooks-C4BUGYUQ.js} +10 -10
  225. package/dist/cli/chunks/hybrid-backend-B7M74PZG.js +2 -0
  226. package/dist/cli/chunks/{hypergraph-engine-RSWCB2D3.js → hypergraph-engine-WINGVMPG.js} +2 -2
  227. package/dist/cli/chunks/{hypergraph-handler-552LXKL3.js → hypergraph-handler-GADMWKAU.js} +3 -3
  228. package/dist/cli/chunks/impact-analyzer-PZYOVKQO.js +2 -0
  229. package/dist/cli/chunks/{init-guard-OTDBJ5HD.js → init-guard-K2T4QWAO.js} +2 -2
  230. package/dist/cli/chunks/{init-handler-3FK3TKEA.js → init-handler-PCZTDZYI.js} +6 -6
  231. package/dist/cli/chunks/init-wizard-TZDJQK3U.js +2 -0
  232. package/dist/cli/chunks/kernel-Y6RRIOKW.js +2 -0
  233. package/dist/cli/chunks/{kilocode-installer-KZ2O4LF3.js → kilocode-installer-XENXNEIU.js} +2 -2
  234. package/dist/cli/chunks/{kiro-installer-MLCCXRF7.js → kiro-installer-3PG2TJ67.js} +2 -2
  235. package/dist/cli/chunks/knowledge-graph-BVD5Z66M.js +2 -0
  236. package/dist/cli/chunks/{learning-QUCMBD77.js → learning-6KDH7FK4.js} +3 -3
  237. package/dist/cli/chunks/{llm-router-PDEV3UP2.js → llm-router-RKVDEWU2.js} +4 -4
  238. package/dist/cli/chunks/llm-router-service-KHCAMSUU.js +2 -0
  239. package/dist/cli/chunks/{load-XFVVLO7E.js → load-ITHC564X.js} +2 -2
  240. package/dist/cli/chunks/load-test-RUF7DZA5.js +2 -0
  241. package/dist/cli/chunks/{mcp-74G3CL2S.js → mcp-TCL5UW3N.js} +2 -2
  242. package/dist/cli/chunks/{memory-XIFM6JNX.js → memory-BKDAY2N2.js} +5 -5
  243. package/dist/cli/chunks/memory-backend-7ZLFOVGG.js +2 -0
  244. package/dist/cli/chunks/{memory-handlers-ZCKURV6S.js → memory-handlers-WN4FXFOA.js} +2 -2
  245. package/dist/cli/chunks/{multi-model-executor-7L4W3O2Q.js → multi-model-executor-VHAT7ZPF.js} +2 -2
  246. package/dist/cli/chunks/{opencode-installer-BPG422LF.js → opencode-installer-E3VM3EEY.js} +2 -2
  247. package/dist/cli/chunks/{orchestrator-OEAFLAEV.js → orchestrator-BMQ6X762.js} +5 -5
  248. package/dist/cli/chunks/pattern-null-store-RY6CVYHP.js +2 -0
  249. package/dist/cli/chunks/{pattern-usage-recorder-LOPNCULT.js → pattern-usage-recorder-GOOR2BV5.js} +2 -2
  250. package/dist/cli/chunks/{pipeline-VWTYUZB7.js → pipeline-5NSFQQIX.js} +2 -2
  251. package/dist/cli/chunks/{platform-WFJJ3X2E.js → platform-SQM34J5G.js} +2 -2
  252. package/dist/cli/chunks/{plugin-744TPUSG.js → plugin-UQJZRMZG.js} +2 -2
  253. package/dist/cli/chunks/{prime-radiant-advanced-wasm-BD5BLNDR.js → prime-radiant-advanced-wasm-WMDJOL4S.js} +2 -2
  254. package/dist/cli/chunks/project-root-IO5KRNGL.js +2 -0
  255. package/dist/cli/chunks/protocol-executor-U2CUDWDE.js +2 -0
  256. package/dist/cli/chunks/{protocol-handler-JIBILI74.js → protocol-handler-OBDCVY6X.js} +2 -2
  257. package/dist/cli/chunks/{prove-MNOL5FYW.js → prove-XDC7I4XT.js} +2 -2
  258. package/dist/cli/chunks/qe-reasoning-bank-DQSSX2IP.js +2 -0
  259. package/dist/cli/chunks/{quality-JEGBDGGX.js → quality-L4GQ6WX4.js} +2 -2
  260. package/dist/cli/chunks/{quality-gate-SYJ6ROMI.js → quality-gate-MJG66LKN.js} +3 -3
  261. package/dist/cli/chunks/queen-coordinator-6FN4BZIX.js +2 -0
  262. package/dist/cli/chunks/{real-embeddings-ZWXS5ZFV.js → real-embeddings-HW4G2LWL.js} +2 -2
  263. package/dist/cli/chunks/{ref-validation-RRHUFW2N.js → ref-validation-FC7JOJ2C.js} +2 -2
  264. package/dist/cli/chunks/{roocode-installer-XFO6JSVN.js → roocode-installer-KWS4CEIC.js} +2 -2
  265. package/dist/cli/chunks/router-YUO3I7RU.js +2 -0
  266. package/dist/cli/chunks/routing-feedback-36SLQGJE.js +2 -0
  267. package/dist/cli/chunks/{routing-handler-L2K3JASE.js → routing-handler-QF4WVB2S.js} +2 -2
  268. package/dist/cli/chunks/{ruvector-commands-A6CINHGM.js → ruvector-commands-2MTCOUK6.js} +2 -2
  269. package/dist/cli/chunks/rvf-dual-writer-FRYZH3WZ.js +2 -0
  270. package/dist/cli/chunks/rvf-migration-adapter-XXNITL5I.js +2 -0
  271. package/dist/cli/chunks/{rvf-migration-coordinator-T4RY7L53.js → rvf-migration-coordinator-BREJCXWN.js} +2 -2
  272. package/dist/cli/chunks/rvf-native-adapter-D2WWKJIV.js +2 -0
  273. package/dist/cli/chunks/{rvf-store-integrity-IR33TGQS.js → rvf-store-integrity-KKC6HOJD.js} +2 -2
  274. package/dist/cli/chunks/safe-db-4RRIGRXD.js +2 -0
  275. package/dist/cli/chunks/schedule-25RTO4DQ.js +2 -0
  276. package/dist/cli/chunks/scheduler-BPIOJZ5P.js +2 -0
  277. package/dist/cli/chunks/{security-Z5GDE2IH.js → security-OSAE7VAP.js} +3 -3
  278. package/dist/cli/chunks/{shared-rvf-adapter-SIZMEHPM.js → shared-rvf-adapter-COUOS665.js} +2 -2
  279. package/dist/cli/chunks/{shared-rvf-dual-writer-HLM65RDS.js → shared-rvf-dual-writer-YXMPZKQE.js} +2 -2
  280. package/dist/cli/chunks/sqlite-persistence-EDF47DDX.js +2 -0
  281. package/dist/cli/chunks/{standalone-memory-SKSZG7P5.js → standalone-memory-E6JBMOIL.js} +2 -2
  282. package/dist/cli/chunks/{status-handler-766YOOMJ.js → status-handler-AFTCIYIX.js} +2 -2
  283. package/dist/cli/chunks/{structural-health-M45FNOLT.js → structural-health-2FROCEI4.js} +2 -2
  284. package/dist/cli/chunks/{sync-B2U366I3.js → sync-VAYTOWDC.js} +2 -2
  285. package/dist/cli/chunks/{sync-6CJ24B5T.js → sync-YIQYOFGW.js} +2 -2
  286. package/dist/cli/chunks/task-handler-KVQHDEX3.js +62 -0
  287. package/dist/cli/chunks/task-handlers-MVVECQA6.js +9 -0
  288. package/dist/cli/chunks/{test-TODH7KRF.js → test-5JSVTOMY.js} +4 -4
  289. package/dist/cli/chunks/test-runner-process-LEPF2OSS.js +2 -0
  290. package/dist/cli/chunks/{test-scheduling-VMVMVRHT.js → test-scheduling-HBOHVLI3.js} +3 -3
  291. package/dist/cli/chunks/{token-bootstrap-XQW7BMCK.js → token-bootstrap-5VEPTPFA.js} +2 -2
  292. package/dist/cli/chunks/{token-usage-JCZEIRKO.js → token-usage-TBJHDLY6.js} +2 -2
  293. package/dist/cli/chunks/{transformers-U2ML3OHE.js → transformers-VAWYMHMZ.js} +2 -2
  294. package/dist/cli/chunks/tree-sitter-wasm-parser-TSZTCMFV.js +2 -0
  295. package/dist/cli/chunks/{types-GGEPCHP6.js → types-R5SDZU2E.js} +2 -2
  296. package/dist/cli/chunks/unified-memory-TLGSSLMI.js +2 -0
  297. package/dist/cli/chunks/unified-memory-hnsw-MSUR7ZOO.js +2 -0
  298. package/dist/cli/chunks/unified-persistence-VFFOTWK7.js +2 -0
  299. package/dist/cli/chunks/{upgrade-T5GRM7HS.js → upgrade-K5PIHXRB.js} +2 -2
  300. package/dist/cli/chunks/{validate-XMUJPLP3.js → validate-RPTS7RYJ.js} +2 -2
  301. package/dist/cli/chunks/{validate-swarm-KJLF7JEH.js → validate-swarm-B2ZL556X.js} +2 -2
  302. package/dist/cli/chunks/visual-security-6Q44XNLB.js +2 -0
  303. package/dist/cli/chunks/{web-tree-sitter-LOHVZ7G5.js → web-tree-sitter-K4DUJC32.js} +2 -2
  304. package/dist/cli/chunks/{windsurf-installer-33FBTXJU.js → windsurf-installer-OK2AJN35.js} +2 -2
  305. package/dist/cli/chunks/witness-chain-KDOMXDQX.js +2 -0
  306. package/dist/cli/chunks/witness-chain-N3OY2RMH.js +2 -0
  307. package/dist/cli/chunks/{witness-chain-repair-VWBO4NXE.js → witness-chain-repair-L6Y5RFXR.js} +2 -2
  308. package/dist/cli/chunks/{witness-chain-verifier-BHJ3ZAEK.js → witness-chain-verifier-N4CW7FZX.js} +2 -2
  309. package/dist/cli/chunks/{witness-key-manager-WNVPH2Z3.js → witness-key-manager-TDNPS3WD.js} +2 -2
  310. package/dist/cli/chunks/{workflow-6QR5MQTO.js → workflow-XRZA3YCY.js} +4 -4
  311. package/dist/cli/chunks/workflow-orchestrator-CVNNT2RJ.js +2 -0
  312. package/dist/cli/chunks/{wrappers-EHOL62TS.js → wrappers-5JIFWKN6.js} +2 -2
  313. package/dist/cli/commands/code.js +6 -0
  314. package/dist/cli/commands/fleet-run.d.ts +12 -0
  315. package/dist/cli/commands/fleet-run.js +175 -0
  316. package/dist/cli/commands/fleet.js +2 -117
  317. package/dist/cli/handlers/task-handler.d.ts +5 -0
  318. package/dist/cli/handlers/task-handler.js +20 -0
  319. package/dist/cli/utils/fleet-operation.d.ts +5 -2
  320. package/dist/cli/utils/fleet-operation.js +13 -2
  321. package/dist/cli/utils/fleet-result.d.ts +16 -2
  322. package/dist/cli/utils/fleet-result.js +26 -21
  323. package/dist/cli/utils/fleet-shard.d.ts +36 -0
  324. package/dist/cli/utils/fleet-shard.js +110 -0
  325. package/dist/coordination/handlers/code-intelligence-handlers.js +21 -1
  326. package/dist/coordination/handlers/handler-types.d.ts +2 -2
  327. package/dist/coordination/handlers/handler-utils.d.ts +6 -0
  328. package/dist/coordination/handlers/handler-utils.js +14 -4
  329. package/dist/coordination/handlers/misc-handlers.js +5 -2
  330. package/dist/coordination/handlers/quality-handlers.js +2 -2
  331. package/dist/coordination/handlers/security-handlers.js +12 -2
  332. package/dist/coordination/protocols/security-audit.js +11 -1
  333. package/dist/coordination/task-executor.js +7 -2
  334. package/dist/domains/code-intelligence/coordinator-gnn.d.ts +2 -16
  335. package/dist/domains/code-intelligence/coordinator-gnn.js +1 -62
  336. package/dist/domains/code-intelligence/coordinator.d.ts +12 -6
  337. package/dist/domains/code-intelligence/coordinator.js +24 -27
  338. package/dist/domains/code-intelligence/interfaces.d.ts +9 -0
  339. package/dist/domains/code-intelligence/services/semantic-analyzer.d.ts +43 -5
  340. package/dist/domains/code-intelligence/services/semantic-analyzer.js +134 -71
  341. package/dist/domains/coverage-analysis/collected-metrics.d.ts +10 -0
  342. package/dist/domains/coverage-analysis/collected-metrics.js +29 -0
  343. package/dist/domains/coverage-analysis/services/coverage-analyzer.js +11 -3
  344. package/dist/domains/coverage-analysis/services/coverage-parser.d.ts +2 -0
  345. package/dist/domains/coverage-analysis/services/coverage-parser.js +18 -2
  346. package/dist/domains/quality-assessment/coherence/gate-controller.js +16 -4
  347. package/dist/domains/quality-assessment/coherence/lambda-calculator.d.ts +8 -0
  348. package/dist/domains/quality-assessment/coherence/lambda-calculator.js +57 -14
  349. package/dist/domains/quality-assessment/coherence/types.d.ts +12 -7
  350. package/dist/domains/quality-assessment/coordinator-gate-evaluation.js +3 -1
  351. package/dist/domains/quality-assessment/coordinator-reports.d.ts +30 -10
  352. package/dist/domains/quality-assessment/coordinator-reports.js +93 -57
  353. package/dist/domains/quality-assessment/coordinator.d.ts +14 -40
  354. package/dist/domains/quality-assessment/coordinator.js +10 -4
  355. package/dist/domains/quality-assessment/interfaces.d.ts +2 -0
  356. package/dist/domains/quality-assessment/services/coherence-gate.js +15 -2
  357. package/dist/domains/quality-assessment/services/quality-gate.js +6 -4
  358. package/dist/domains/security-compliance/index.d.ts +1 -1
  359. package/dist/domains/security-compliance/interfaces.d.ts +46 -5
  360. package/dist/domains/security-compliance/services/scanners/dast-auth-testing.d.ts +3 -3
  361. package/dist/domains/security-compliance/services/scanners/dast-auth-testing.js +15 -14
  362. package/dist/domains/security-compliance/services/scanners/dast-helpers.d.ts +8 -9
  363. package/dist/domains/security-compliance/services/scanners/dast-helpers.js +19 -44
  364. package/dist/domains/security-compliance/services/scanners/dast-injection-testing.d.ts +3 -3
  365. package/dist/domains/security-compliance/services/scanners/dast-injection-testing.js +13 -9
  366. package/dist/domains/security-compliance/services/scanners/dast-requests.d.ts +54 -0
  367. package/dist/domains/security-compliance/services/scanners/dast-requests.js +125 -0
  368. package/dist/domains/security-compliance/services/scanners/dast-scanner.d.ts +5 -1
  369. package/dist/domains/security-compliance/services/scanners/dast-scanner.js +125 -155
  370. package/dist/domains/security-compliance/services/scanners/index.d.ts +1 -1
  371. package/dist/domains/security-compliance/services/scanners/index.js +1 -1
  372. package/dist/domains/security-compliance/services/scanners/scanner-types.d.ts +2 -2
  373. package/dist/domains/security-compliance/services/security-auditor-dast.js +183 -212
  374. package/dist/domains/security-compliance/services/security-auditor-reports.js +5 -1
  375. package/dist/domains/security-compliance/services/security-auditor.d.ts +11 -3
  376. package/dist/domains/security-compliance/services/security-auditor.js +106 -65
  377. package/dist/domains/test-execution/coordinator.d.ts +2 -1
  378. package/dist/domains/test-execution/coordinator.js +33 -27
  379. package/dist/domains/test-execution/interfaces.d.ts +5 -0
  380. package/dist/domains/test-execution/services/test-executor.d.ts +6 -0
  381. package/dist/domains/test-execution/services/test-executor.js +16 -4
  382. package/dist/domains/visual-accessibility/coordinator.js +34 -9
  383. package/dist/domains/visual-accessibility/interfaces.d.ts +27 -0
  384. package/dist/domains/visual-accessibility/plugin.js +5 -0
  385. package/dist/domains/visual-accessibility/services/accessibility-tester-heuristics.d.ts +13 -21
  386. package/dist/domains/visual-accessibility/services/accessibility-tester-heuristics.js +13 -297
  387. package/dist/domains/visual-accessibility/services/accessibility-tester.d.ts +13 -5
  388. package/dist/domains/visual-accessibility/services/accessibility-tester.js +96 -73
  389. package/dist/integrations/embeddings/index/HNSWIndex.js +8 -4
  390. package/dist/integrations/ruvector/transfer-coherence-stub.js +5 -10
  391. package/dist/mcp/bundle.js +480 -480
  392. package/dist/mcp/handlers/domain-handler-configs.d.ts +8 -0
  393. package/dist/mcp/handlers/domain-handler-configs.js +9 -2
  394. package/dist/mcp/handlers/handler-factory.js +3 -0
  395. package/dist/mcp/handlers/model-route-handlers.d.ts +107 -0
  396. package/dist/mcp/handlers/model-route-handlers.js +139 -0
  397. package/dist/mcp/handlers/orchestrate-routes.js +41 -3
  398. package/dist/mcp/handlers/task-handlers.d.ts +3 -251
  399. package/dist/mcp/handlers/task-handlers.js +6 -828
  400. package/dist/mcp/handlers/task-inference.d.ts +26 -0
  401. package/dist/mcp/handlers/task-inference.js +156 -0
  402. package/dist/mcp/handlers/task-learning-handlers.d.ts +92 -0
  403. package/dist/mcp/handlers/task-learning-handlers.js +230 -0
  404. package/dist/mcp/handlers/task-orchestrate-handler.d.ts +73 -0
  405. package/dist/mcp/handlers/task-orchestrate-handler.js +361 -0
  406. package/dist/mcp/protocol-server.js +12 -2
  407. package/dist/mcp/tools/code-intelligence/analyze.js +3 -6
  408. package/dist/mcp/tools/coverage-analysis/index.d.ts +4 -0
  409. package/dist/mcp/tools/coverage-analysis/index.js +8 -2
  410. package/dist/mcp/tools/visual-accessibility/index.d.ts +7 -0
  411. package/dist/mcp/tools/visual-accessibility/index.js +29 -13
  412. package/dist/shared/events/domain-events.d.ts +2 -0
  413. package/dist/shared/metrics/code-metrics.js +21 -3
  414. package/dist/shared/parsers/typescript-parser.d.ts +6 -0
  415. package/dist/shared/parsers/typescript-parser.js +13 -1
  416. package/package.json +1 -1
  417. package/dist/cli/chunks/adapter-HL7MOCQN.js +0 -2
  418. package/dist/cli/chunks/aqe-learning-engine-OZ2DXB4G.js +0 -2
  419. package/dist/cli/chunks/base-WIM7G3HC.js +0 -2
  420. package/dist/cli/chunks/browser-workflow-QRKCFVR3.js +0 -2
  421. package/dist/cli/chunks/chunk-QSGEBCDB.js +0 -62
  422. package/dist/cli/chunks/chunk-UJNGGFGX.js +0 -2
  423. package/dist/cli/chunks/chunk-VXVTFKRA.js +0 -2
  424. package/dist/cli/chunks/chunk-XCNSGSKV.js +0 -3
  425. package/dist/cli/chunks/client-4PNYDFYS.js +0 -2
  426. package/dist/cli/chunks/core-handlers-ODO6LUWQ.js +0 -2
  427. package/dist/cli/chunks/cross-domain-router-DT4MHJKK.js +0 -2
  428. package/dist/cli/chunks/domain-transfer-L3F6AES2.js +0 -2
  429. package/dist/cli/chunks/dream-QOB3JCOM.js +0 -2
  430. package/dist/cli/chunks/file-discovery-BN76S2PR.js +0 -2
  431. package/dist/cli/chunks/fleet-43YMXACN.js +0 -46
  432. package/dist/cli/chunks/heartbeat-scheduler-3NNP4WCP.js +0 -2
  433. package/dist/cli/chunks/hnsw-adapter-MZR7Y4WF.js +0 -2
  434. package/dist/cli/chunks/hnsw-index-HE4AX22U.js +0 -2
  435. package/dist/cli/chunks/hybrid-backend-IHUHB3Y2.js +0 -2
  436. package/dist/cli/chunks/impact-analyzer-FI6GI6PD.js +0 -2
  437. package/dist/cli/chunks/init-wizard-WLQKH5Y5.js +0 -2
  438. package/dist/cli/chunks/kernel-2WZOQEZS.js +0 -2
  439. package/dist/cli/chunks/knowledge-graph-G3LVKK6P.js +0 -2
  440. package/dist/cli/chunks/llm-router-service-MM75HKWJ.js +0 -2
  441. package/dist/cli/chunks/load-test-BEWEE44J.js +0 -2
  442. package/dist/cli/chunks/memory-backend-NYKBBKZR.js +0 -2
  443. package/dist/cli/chunks/pattern-null-store-QGPUIV6M.js +0 -2
  444. package/dist/cli/chunks/project-root-C7ELXZRK.js +0 -2
  445. package/dist/cli/chunks/protocol-executor-SUVE33BM.js +0 -2
  446. package/dist/cli/chunks/qe-reasoning-bank-YWZMMGJB.js +0 -2
  447. package/dist/cli/chunks/queen-coordinator-ZFAKXRN7.js +0 -2
  448. package/dist/cli/chunks/router-4FTAVYLJ.js +0 -2
  449. package/dist/cli/chunks/routing-feedback-IO2KOWMJ.js +0 -2
  450. package/dist/cli/chunks/rvf-dual-writer-KCIRNE7C.js +0 -2
  451. package/dist/cli/chunks/rvf-migration-adapter-MFC5WTJU.js +0 -2
  452. package/dist/cli/chunks/rvf-native-adapter-I3KWHE7X.js +0 -2
  453. package/dist/cli/chunks/safe-db-QXDZ6QY3.js +0 -2
  454. package/dist/cli/chunks/schedule-CZKD6RIY.js +0 -2
  455. package/dist/cli/chunks/scheduler-BLA3Q4CH.js +0 -2
  456. package/dist/cli/chunks/sqlite-persistence-XIUYDJC4.js +0 -2
  457. package/dist/cli/chunks/task-handler-P6IFLCKP.js +0 -62
  458. package/dist/cli/chunks/task-handlers-DPWMUKFC.js +0 -9
  459. package/dist/cli/chunks/test-runner-process-46IPK3GH.js +0 -2
  460. package/dist/cli/chunks/tree-sitter-wasm-parser-MOI2WWNJ.js +0 -2
  461. package/dist/cli/chunks/unified-memory-FL26RTV3.js +0 -2
  462. package/dist/cli/chunks/unified-memory-hnsw-E2BPTH3U.js +0 -2
  463. package/dist/cli/chunks/unified-persistence-5ZOUPKHF.js +0 -2
  464. package/dist/cli/chunks/visual-security-IJVPO5FA.js +0 -2
  465. package/dist/cli/chunks/witness-chain-5FAFCQKP.js +0 -2
  466. package/dist/cli/chunks/witness-chain-V2M32W5D.js +0 -2
  467. package/dist/cli/chunks/workflow-orchestrator-3JLF3IX7.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.12");process.exit(0)}
2
- import{a as n}from"./chunk-SG2TX72G.js";import{a as i}from"./chunk-GKFV6CUD.js";import{a as o,e as d}from"./chunk-YUA6ZKKY.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.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,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.12");process.exit(0)}
2
- import{b as p,d as w}from"./chunk-WTAUF6O4.js";import H,{MultiBar as O,Presets as k}from"cli-progress";import L from"ora";import o from"chalk";w();import{existsSync as y,readFileSync as C,writeFileSync as W,mkdirSync as V,unlinkSync as _}from"fs";import{join as f}from"path";import{homedir as x}from"os";var u={wizards:{enabled:!0,themes:["default","minimal","detailed"],defaultTheme:"default"},progress:{style:"multi-bar",updateIntervalMs:100,showETA:!0,colors:!0},completion:{maxSuggestions:10,historyWeight:.3,contextWeight:.7,fuzzyMatch:!0},streaming:{enabled:!0,bufferSize:100,updateIntervalMs:50}};function E(){return f(x(),".aqe")}function T(){return f(E(),"cli-config.json")}var g=null,d=0,S=5e3;function A(){return g?Date.now()-d<S:!1}function $(i){let e=[],t=i;if(typeof t.enabled!="boolean"&&t.enabled!==void 0&&e.push({path:"wizards.enabled",message:"must be a boolean"}),t.themes!==void 0)if(!Array.isArray(t.themes))e.push({path:"wizards.themes",message:"must be an array"});else{let r=["default","minimal","detailed"];for(let n of t.themes)r.includes(n)||e.push({path:"wizards.themes",message:`invalid theme: ${n}`})}return t.defaultTheme!==void 0&&(["default","minimal","detailed"].includes(t.defaultTheme)||e.push({path:"wizards.defaultTheme",message:`invalid theme: ${t.defaultTheme}`})),e}function P(i){let e=[],t=i;return t.style!==void 0&&(["multi-bar","single-bar","spinner"].includes(t.style)||e.push({path:"progress.style",message:`invalid style: ${t.style}`})),t.updateIntervalMs!==void 0&&(typeof t.updateIntervalMs!="number"||t.updateIntervalMs<10)&&e.push({path:"progress.updateIntervalMs",message:"must be a number >= 10"}),typeof t.showETA!="boolean"&&t.showETA!==void 0&&e.push({path:"progress.showETA",message:"must be a boolean"}),typeof t.colors!="boolean"&&t.colors!==void 0&&e.push({path:"progress.colors",message:"must be a boolean"}),e}function I(i){let e=[],t=i;return t.maxSuggestions!==void 0&&(typeof t.maxSuggestions!="number"||t.maxSuggestions<1)&&e.push({path:"completion.maxSuggestions",message:"must be a number >= 1"}),t.historyWeight!==void 0&&(typeof t.historyWeight!="number"||t.historyWeight<0||t.historyWeight>1)&&e.push({path:"completion.historyWeight",message:"must be a number between 0 and 1"}),t.contextWeight!==void 0&&(typeof t.contextWeight!="number"||t.contextWeight<0||t.contextWeight>1)&&e.push({path:"completion.contextWeight",message:"must be a number between 0 and 1"}),typeof t.fuzzyMatch!="boolean"&&t.fuzzyMatch!==void 0&&e.push({path:"completion.fuzzyMatch",message:"must be a boolean"}),e}function M(i){let e=[],t=i;return typeof t.enabled!="boolean"&&t.enabled!==void 0&&e.push({path:"streaming.enabled",message:"must be a boolean"}),t.bufferSize!==void 0&&(typeof t.bufferSize!="number"||t.bufferSize<1)&&e.push({path:"streaming.bufferSize",message:"must be a number >= 1"}),t.updateIntervalMs!==void 0&&(typeof t.updateIntervalMs!="number"||t.updateIntervalMs<10)&&e.push({path:"streaming.updateIntervalMs",message:"must be a number >= 10"}),e}function z(i){let e=[];if(typeof i!="object"||i===null)return{valid:!1,errors:[{path:"",message:"config must be an object"}]};let t=i;return t.wizards!==void 0&&(typeof t.wizards!="object"||t.wizards===null?e.push({path:"wizards",message:"must be an object"}):e.push(...$(t.wizards))),t.progress!==void 0&&(typeof t.progress!="object"||t.progress===null?e.push({path:"progress",message:"must be an object"}):e.push(...P(t.progress))),t.completion!==void 0&&(typeof t.completion!="object"||t.completion===null?e.push({path:"completion",message:"must be an object"}):e.push(...I(t.completion))),t.streaming!==void 0&&(typeof t.streaming!="object"||t.streaming===null?e.push({path:"streaming",message:"must be an object"}):e.push(...M(t.streaming))),{valid:e.length===0,errors:e}}var D=["__proto__","constructor","prototype"];function m(i,e){let t={...i};for(let r of Object.keys(e)){if(D.includes(r)){console.warn(`Security: Skipping forbidden key '${String(r)}' in configuration merge`);continue}let n=e[r],a=i[r];n!==void 0&&typeof n=="object"&&!Array.isArray(n)&&typeof a=="object"&&!Array.isArray(a)?t[r]=m(a,n):n!==void 0&&(t[r]=n)}return t}function F(){let i=T();if(!y(i))return{...u};try{let e=C(i,"utf-8"),t=p(e),r=z(t);return r.valid?m(u,t):(console.warn(`CLI config validation errors: ${r.errors.map(n=>`${n.path}: ${n.message}`).join(", ")}`),console.warn("Using default configuration"),{...u})}catch(e){return console.warn(`Failed to load CLI config: ${e instanceof Error?e.message:"Unknown error"}`),{...u}}}function c(){return A()||(g=F(),d=Date.now()),g}function B(){return process.stdout.isTTY===!0}function h(){let i=c();return process.env.NO_COLOR!==void 0?!1:process.env.FORCE_COLOR!==void 0?!0:i.progress.colors&&B()}var b=o.white("Fleet Progress".padEnd(30)),v=class{multiBar;agentBars=new Map;agentStates=new Map;fleetBar=null;startTime=Date.now();options;isActive=!1;constructor(e={}){let t=c(),r=h();this.options={title:"Fleet Progress",showEta:t.progress.showETA,showPercentage:!0,...e};let n=r?o.cyan("{bar}"):"{bar}",a=this.options.format||`{name} ${n} {percentage}% | {status} {etaText}`;this.multiBar=new O({clearOnComplete:!1,hideCursor:!0,format:a,barCompleteChar:"\u2588",barIncompleteChar:"\u2591",forceRedraw:!0,fps:Math.round(1e3/t.progress.updateIntervalMs)},k.shades_classic)}start(e){this.isActive=!0,this.startTime=Date.now(),console.log(o.blue(`
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.13");process.exit(0)}
2
+ import{b as p,d as w}from"./chunk-VTOBUZL6.js";import H,{MultiBar as O,Presets as k}from"cli-progress";import L from"ora";import o from"chalk";w();import{existsSync as y,readFileSync as C,writeFileSync as W,mkdirSync as V,unlinkSync as _}from"fs";import{join as f}from"path";import{homedir as x}from"os";var u={wizards:{enabled:!0,themes:["default","minimal","detailed"],defaultTheme:"default"},progress:{style:"multi-bar",updateIntervalMs:100,showETA:!0,colors:!0},completion:{maxSuggestions:10,historyWeight:.3,contextWeight:.7,fuzzyMatch:!0},streaming:{enabled:!0,bufferSize:100,updateIntervalMs:50}};function E(){return f(x(),".aqe")}function T(){return f(E(),"cli-config.json")}var g=null,d=0,S=5e3;function A(){return g?Date.now()-d<S:!1}function $(i){let e=[],t=i;if(typeof t.enabled!="boolean"&&t.enabled!==void 0&&e.push({path:"wizards.enabled",message:"must be a boolean"}),t.themes!==void 0)if(!Array.isArray(t.themes))e.push({path:"wizards.themes",message:"must be an array"});else{let r=["default","minimal","detailed"];for(let n of t.themes)r.includes(n)||e.push({path:"wizards.themes",message:`invalid theme: ${n}`})}return t.defaultTheme!==void 0&&(["default","minimal","detailed"].includes(t.defaultTheme)||e.push({path:"wizards.defaultTheme",message:`invalid theme: ${t.defaultTheme}`})),e}function P(i){let e=[],t=i;return t.style!==void 0&&(["multi-bar","single-bar","spinner"].includes(t.style)||e.push({path:"progress.style",message:`invalid style: ${t.style}`})),t.updateIntervalMs!==void 0&&(typeof t.updateIntervalMs!="number"||t.updateIntervalMs<10)&&e.push({path:"progress.updateIntervalMs",message:"must be a number >= 10"}),typeof t.showETA!="boolean"&&t.showETA!==void 0&&e.push({path:"progress.showETA",message:"must be a boolean"}),typeof t.colors!="boolean"&&t.colors!==void 0&&e.push({path:"progress.colors",message:"must be a boolean"}),e}function I(i){let e=[],t=i;return t.maxSuggestions!==void 0&&(typeof t.maxSuggestions!="number"||t.maxSuggestions<1)&&e.push({path:"completion.maxSuggestions",message:"must be a number >= 1"}),t.historyWeight!==void 0&&(typeof t.historyWeight!="number"||t.historyWeight<0||t.historyWeight>1)&&e.push({path:"completion.historyWeight",message:"must be a number between 0 and 1"}),t.contextWeight!==void 0&&(typeof t.contextWeight!="number"||t.contextWeight<0||t.contextWeight>1)&&e.push({path:"completion.contextWeight",message:"must be a number between 0 and 1"}),typeof t.fuzzyMatch!="boolean"&&t.fuzzyMatch!==void 0&&e.push({path:"completion.fuzzyMatch",message:"must be a boolean"}),e}function M(i){let e=[],t=i;return typeof t.enabled!="boolean"&&t.enabled!==void 0&&e.push({path:"streaming.enabled",message:"must be a boolean"}),t.bufferSize!==void 0&&(typeof t.bufferSize!="number"||t.bufferSize<1)&&e.push({path:"streaming.bufferSize",message:"must be a number >= 1"}),t.updateIntervalMs!==void 0&&(typeof t.updateIntervalMs!="number"||t.updateIntervalMs<10)&&e.push({path:"streaming.updateIntervalMs",message:"must be a number >= 10"}),e}function z(i){let e=[];if(typeof i!="object"||i===null)return{valid:!1,errors:[{path:"",message:"config must be an object"}]};let t=i;return t.wizards!==void 0&&(typeof t.wizards!="object"||t.wizards===null?e.push({path:"wizards",message:"must be an object"}):e.push(...$(t.wizards))),t.progress!==void 0&&(typeof t.progress!="object"||t.progress===null?e.push({path:"progress",message:"must be an object"}):e.push(...P(t.progress))),t.completion!==void 0&&(typeof t.completion!="object"||t.completion===null?e.push({path:"completion",message:"must be an object"}):e.push(...I(t.completion))),t.streaming!==void 0&&(typeof t.streaming!="object"||t.streaming===null?e.push({path:"streaming",message:"must be an object"}):e.push(...M(t.streaming))),{valid:e.length===0,errors:e}}var D=["__proto__","constructor","prototype"];function m(i,e){let t={...i};for(let r of Object.keys(e)){if(D.includes(r)){console.warn(`Security: Skipping forbidden key '${String(r)}' in configuration merge`);continue}let n=e[r],a=i[r];n!==void 0&&typeof n=="object"&&!Array.isArray(n)&&typeof a=="object"&&!Array.isArray(a)?t[r]=m(a,n):n!==void 0&&(t[r]=n)}return t}function F(){let i=T();if(!y(i))return{...u};try{let e=C(i,"utf-8"),t=p(e),r=z(t);return r.valid?m(u,t):(console.warn(`CLI config validation errors: ${r.errors.map(n=>`${n.path}: ${n.message}`).join(", ")}`),console.warn("Using default configuration"),{...u})}catch(e){return console.warn(`Failed to load CLI config: ${e instanceof Error?e.message:"Unknown error"}`),{...u}}}function c(){return A()||(g=F(),d=Date.now()),g}function B(){return process.stdout.isTTY===!0}function h(){let i=c();return process.env.NO_COLOR!==void 0?!1:process.env.FORCE_COLOR!==void 0?!0:i.progress.colors&&B()}var b=o.white("Fleet Progress".padEnd(30)),v=class{multiBar;agentBars=new Map;agentStates=new Map;fleetBar=null;startTime=Date.now();options;isActive=!1;constructor(e={}){let t=c(),r=h();this.options={title:"Fleet Progress",showEta:t.progress.showETA,showPercentage:!0,...e};let n=r?o.cyan("{bar}"):"{bar}",a=this.options.format||`{name} ${n} {percentage}% | {status} {etaText}`;this.multiBar=new O({clearOnComplete:!1,hideCursor:!0,format:a,barCompleteChar:"\u2588",barIncompleteChar:"\u2591",forceRedraw:!0,fps:Math.round(1e3/t.progress.updateIntervalMs)},k.shades_classic)}start(e){this.isActive=!0,this.startTime=Date.now(),console.log(o.blue(`
3
3
  ${this.options.title}
4
4
  `)),this.fleetBar=this.createBar(0,{name:b,status:"",etaText:""})}addAgent(e){if(!this.isActive)return;this.agentStates.set(e.id,e);let t=this.createBar(e.progress,{name:o.gray(this.truncateName(e.name,30).padEnd(30)),status:this.getStatusIcon(e.status),etaText:e.eta?this.formatEta(e.eta):""});this.agentBars.set(e.id,t),this.updateFleetProgress()}updateAgent(e,t,r){if(!this.isActive)return;let n=this.agentStates.get(e),a=this.agentBars.get(e);!n||!a||(n.progress=Math.min(100,Math.max(0,t)),r?.status&&(n.status=r.status),r?.message&&(n.message=r.message),r?.eta!==void 0&&(n.eta=r.eta),a.update(n.progress,{name:this.getAgentNameDisplay(n),status:this.getStatusIcon(n.status),etaText:n.eta?this.formatEta(n.eta):""}),this.updateFleetProgress())}completeAgent(e,t=!0){if(!this.isActive)return;let r=this.agentStates.get(e),n=this.agentBars.get(e);!r||!n||(r.status=t?"completed":"failed",r.progress=t?100:r.progress,n.update(r.progress,{name:this.getAgentNameDisplay(r),status:this.getStatusIcon(r.status),etaText:""}),this.updateFleetProgress())}stop(e={}){if(!this.isActive)return;this.isActive=!1,this.multiBar.stop();let t=Array.from(this.agentStates.values()).filter(s=>s.status==="completed").length,r=Array.from(this.agentStates.values()).filter(s=>s.status==="failed").length,n=this.agentStates.size,a=Date.now()-this.startTime;console.log(""),r===0&&e.verdictFailed?console.log(o.yellow(`All ${t}/${n} agents completed (${this.formatDuration(a)})`)):console.log(r===0?o.green(`All ${t}/${n} agents completed successfully (${this.formatDuration(a)})`):o.yellow(`${t}/${n} agents completed, ${r} failed (${this.formatDuration(a)})`)),console.log("")}updateFleetProgress(){if(!this.fleetBar)return;let e=Array.from(this.agentStates.values()),t=e.reduce((s,l)=>s+l.progress,0),r=e.length>0?Math.round(t/e.length):0,n=e.filter(s=>s.status==="completed").length,a=e.filter(s=>s.status==="running").length;this.fleetBar.update(r,{name:b,status:o.gray(`${n}/${e.length} complete, ${a} running`),etaText:this.options.showEta?this.estimateFleetEta(e):""})}createBar(e,t){let r=this.multiBar.create(100,e,t);return r.update(e,t),r}getAgentNameDisplay(e){let t=this.truncateName(e.name,26);switch(e.status){case"completed":return o.green(t.padEnd(30));case"failed":return o.red(t.padEnd(30));case"running":return o.yellow(t.padEnd(30));default:return o.gray(t.padEnd(30))}}getStatusIcon(e){switch(e){case"completed":return o.green("\u2713");case"failed":return o.red("\u2717");case"running":return o.yellow("\u25B6");default:return o.gray("\u25CB")}}truncateName(e,t){return e.length<=t?e:e.slice(0,t-3)+"..."}formatEta(e){return e<=0?"":e<1e3?`${e}ms`:e<6e4?`${Math.round(e/1e3)}s`:e<36e5?`${Math.round(e/6e4)}m`:`${Math.round(e/36e5)}h`}formatDuration(e){return e<1e3?`${e}ms`:e<6e4?`${(e/1e3).toFixed(1)}s`:e<36e5?`${(e/6e4).toFixed(1)}m`:`${(e/36e5).toFixed(1)}h`}estimateFleetEta(e){let t=e.filter(s=>s.status==="running"||s.status==="pending");if(t.length===0)return"";let r=t.map(s=>s.eta||0).filter(s=>s>0);if(r.length>0){let s=Math.max(...r);return o.gray(`ETA: ${this.formatEta(s)}`)}let n=Date.now()-this.startTime,a=t.reduce((s,l)=>s+l.progress,0)/t.length;if(a>0){let s=n/(a/100),l=Math.max(0,s-n);return o.gray(`ETA: ${this.formatEta(l)}`)}return""}};function Z(i){let e=Date.now(),t=L({text:i,color:"cyan"}).start(),r=setInterval(()=>{let a=((Date.now()-e)/1e3).toFixed(1);t.text=`${i} (${a}s)`},100);r.unref?.();let n=()=>{clearInterval(r)};return{spinner:t,stop:()=>{n(),t.stop()},succeed:a=>{n();let s=((Date.now()-e)/1e3).toFixed(1);t.succeed(a||`${i} (${s}s)`)},fail:a=>{n();let s=((Date.now()-e)/1e3).toFixed(1);t.fail(a||`${i} failed (${s}s)`)}}}export{v as a,Z as b};
@@ -1,2 +1,2 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.12");process.exit(0)}
2
- import{a as v,b as k}from"./chunk-BMG2JLSQ.js";import{r as g,v as P}from"./chunk-L7NGKANW.js";import{a as d,b as y,e as R}from"./chunk-W4II6SIH.js";R();import{randomUUID as M}from"crypto";var p=class{constructor(e){this.config=e}config;_status="idle";_lastResult;_lastRunAt;_nextRunAt;_totalExecutions=0;_successfulExecutions=0;_failedExecutions=0;_executionDurations=[];_recentResults=[];get status(){return this._status}get lastResult(){return this._lastResult}get lastRunAt(){return this._lastRunAt}get nextRunAt(){return this._nextRunAt}async initialize(){this._status="idle",this._nextRunAt=new Date(Date.now()+this.config.intervalMs)}async execute(e){let r=Date.now();this._status="running",this._lastRunAt=new Date,this._totalExecutions++;let n,t;for(let a=0;a<=this.config.retryCount;a++)try{if(e.signal.aborted)throw new Error("Worker execution aborted");t=await this.executeWithTimeout(()=>this.doExecute(e),this.config.timeoutMs,e.signal);break}catch(u){n=y(u),e.logger.warn(`Worker ${this.config.id} attempt ${a+1} failed: ${n.message}`),a<this.config.retryCount&&await this.delay(this.config.retryDelayMs)}let o=Date.now()-r;return t?(this._successfulExecutions++,this._lastResult=t):(this._failedExecutions++,t=this.createErrorResult(n,o),this._lastResult=t),this._executionDurations.push(o),this._executionDurations.length>100&&this._executionDurations.shift(),this._recentResults.push({timestamp:new Date,success:t.success,durationMs:o}),this._recentResults.length>5&&this._recentResults.shift(),this._nextRunAt=new Date(Date.now()+this.config.intervalMs),this._status=t.success?"idle":"error",await e.eventBus.publish({type:"worker.executed",workerId:this.config.id,timestamp:new Date,payload:{success:t.success,durationMs:o,findingsCount:t.findings.length,healthScore:t.metrics.healthScore}}),t}pause(){this._status!=="stopped"&&(this._status="paused")}resume(){this._status==="paused"&&(this._status="idle")}async stop(){this._status="stopped"}getHealth(){let e=this._executionDurations.length>0?this._executionDurations.reduce((n,t)=>n+t,0)/this._executionDurations.length:0,r=this._totalExecutions>0?this._successfulExecutions/this._totalExecutions:1;return{status:this._status,healthScore:Math.round(r*100),totalExecutions:this._totalExecutions,successfulExecutions:this._successfulExecutions,failedExecutions:this._failedExecutions,avgDurationMs:Math.round(e),recentResults:[...this._recentResults]}}async executeWithTimeout(e,r,n){return new Promise((t,o)=>{let a=setTimeout(()=>{o(new Error(`Worker execution timed out after ${r}ms`))},r),u=()=>{clearTimeout(a),o(new Error("Worker execution aborted"))};n.addEventListener("abort",u,{once:!0}),e().then(c=>{clearTimeout(a),n.removeEventListener("abort",u),t(c)}).catch(c=>{clearTimeout(a),n.removeEventListener("abort",u),o(c)})})}createErrorResult(e,r){return{workerId:this.config.id,timestamp:new Date,durationMs:r,success:!1,error:e.message,metrics:{itemsAnalyzed:0,issuesFound:0,healthScore:0,trend:"degrading",domainMetrics:{}},findings:[],recommendations:[]}}createResult(e,r,n,t){return{workerId:this.config.id,timestamp:new Date,durationMs:e,success:!0,metrics:r,findings:n,recommendations:t}}delay(e){return new Promise(r=>setTimeout(r,e))}generateId(){return`${Date.now()}-${M().slice(0,9)}`}};P();R();var W={id:"heartbeat-scheduler",name:"Heartbeat Scheduler",description:"Token-free maintenance: pattern promotion, stale detection, experience buffer monitoring",intervalMs:1800*1e3,priority:"normal",targetDomains:["learning-optimization"],enabled:!0,timeoutMs:6e4,retryCount:1,retryDelayMs:5e3},b=class extends p{lifecycleManager=null;dailyLogger;lastRunTimestamp=0;constructor(){super(W),this.dailyLogger=new k}async getLifecycleManager(){if(this.lifecycleManager)return this.lifecycleManager;try{let e=g();await e.initialize();let r=e.getDatabase();return this.lifecycleManager=v(r,{promotionRewardThreshold:.7,promotionMinOccurrences:2,promotionMinSuccessRate:.7,deprecationFailureThreshold:3,staleDaysThreshold:30,confidenceDecayRate:.01,minActiveConfidence:.3}),this.lifecycleManager}catch{return null}}getPendingExperienceCount(){try{return g().getDatabase().prepare("SELECT COUNT(*) as pending FROM qe_pattern_usage WHERE created_at > datetime('now', '-1 day')").get()?.pending??0}catch{return 0}}async doExecute(e){let r=Date.now();e.logger.info("Heartbeat scheduler running (token-free maintenance)");let n=[],t=[],o=await this.getLifecycleManager();if(!o)return e.logger.warn("Unified memory unavailable \u2014 returning zero-metric heartbeat"),this.createResult(Date.now()-r,{itemsAnalyzed:0,issuesFound:0,healthScore:50,trend:"stable",domainMetrics:{promoted:0,deprecated:0,decayed:0,stalePatterns:0,pendingExperiences:0,avgConfidence:0,avgSuccessRate:0}},[],[]);let a=0,u=0;try{let s=o.promoteEligiblePatterns();a=s.promoted,u=s.checked,a>0&&n.push({type:"heartbeat-promotion",severity:"info",domain:"learning-optimization",title:"Patterns Promoted",description:`${a} of ${u} short-term patterns promoted to long-term`})}catch(s){e.logger.warn("Pattern promotion failed",{error:d(s)})}let c=0,h=0;try{let s=o.deprecateStalePatterns();c=s.deprecated,h=s.checked,c>0&&n.push({type:"heartbeat-deprecation",severity:"low",domain:"learning-optimization",title:"Stale Patterns Deprecated",description:`${c} of ${h} patterns deprecated (stale, failed, or low confidence)`})}catch(s){e.logger.warn("Stale pattern detection failed",{error:d(s)})}let l=0;try{let s=this.lastRunTimestamp>0?(Date.now()-this.lastRunTimestamp)/864e5:1;l=o.applyConfidenceDecay(Math.min(s,7)).decayed}catch(s){e.logger.warn("Confidence decay failed",{error:d(s)})}let m=this.getPendingExperienceCount(),i={totalPatterns:0,activePatterns:0,deprecatedPatterns:0,promotedPatterns:0,shortTermPatterns:0,longTermPatterns:0,avgConfidence:0,avgSuccessRate:0,patternsNearDeprecation:0};try{i=o.getStats()}catch(s){e.logger.warn("Stats retrieval failed",{error:d(s)})}try{this.dailyLogger.log({timestamp:new Date,type:"pattern-promoted",summary:`Heartbeat: ${a} promoted, ${c} deprecated, ${l} decayed, ${m} pending exp, ${i.activePatterns} active patterns (avg conf: ${i.avgConfidence.toFixed(2)})`,details:{promoted:a,deprecated:c,decayed:l,pendingExperiences:m,totalPatterns:i.totalPatterns,activePatterns:i.activePatterns,avgConfidence:i.avgConfidence,avgSuccessRate:i.avgSuccessRate}}),this.dailyLogger.flush()}catch(s){e.logger.warn("Daily log write failed",{error:d(s)})}this.lastRunTimestamp=Date.now(),i.activePatterns>0&&i.patternsNearDeprecation/i.activePatterns>.5&&t.push({priority:"p2",domain:"learning-optimization",action:"Review At-Risk Patterns",description:`${i.patternsNearDeprecation} of ${i.activePatterns} active patterns are near deprecation. Manual review recommended.`,estimatedImpact:"medium",effort:"low",autoFixable:!1});let f=this.calculateHealthScore(i,a,c),D=this.determineTrend(a,c,i.activePatterns),_=Math.max(u,h),x=a+c+i.patternsNearDeprecation;return e.logger.info("Heartbeat complete",{promoted:a,deprecated:c,decayed:l,pendingExperiences:m,healthScore:f}),this.createResult(Date.now()-r,{itemsAnalyzed:_,issuesFound:x,healthScore:f,trend:D,domainMetrics:{promoted:a,deprecated:c,decayed:l,stalePatterns:i.patternsNearDeprecation,pendingExperiences:m,avgConfidence:Number(i.avgConfidence.toFixed(3)),avgSuccessRate:Number(i.avgSuccessRate.toFixed(3))}},n,t)}calculateHealthScore(e,r,n){let t=70;if(t+=Math.min(15,r*5),e.avgConfidence>0&&(t+=Math.round((e.avgConfidence-.5)*30)),e.activePatterns>0){let o=n/e.activePatterns;t-=Math.round(o*20)}return e.activePatterns>0&&e.patternsNearDeprecation/e.activePatterns>.5&&(t-=10),Math.max(0,Math.min(100,Math.round(t)))}determineTrend(e,r,n){return n===0?"stable":e>r?"improving":r>e&&r/n>.1?"degrading":"stable"}};export{p as a,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.13");process.exit(0)}
2
+ import{a as v,b as k}from"./chunk-CM4LSLKR.js";import{r as g,v as P}from"./chunk-3Y7TJFHU.js";import{a as d,b as y,e as R}from"./chunk-3Y2ROSCL.js";R();import{randomUUID as M}from"crypto";var p=class{constructor(e){this.config=e}config;_status="idle";_lastResult;_lastRunAt;_nextRunAt;_totalExecutions=0;_successfulExecutions=0;_failedExecutions=0;_executionDurations=[];_recentResults=[];get status(){return this._status}get lastResult(){return this._lastResult}get lastRunAt(){return this._lastRunAt}get nextRunAt(){return this._nextRunAt}async initialize(){this._status="idle",this._nextRunAt=new Date(Date.now()+this.config.intervalMs)}async execute(e){let r=Date.now();this._status="running",this._lastRunAt=new Date,this._totalExecutions++;let n,t;for(let a=0;a<=this.config.retryCount;a++)try{if(e.signal.aborted)throw new Error("Worker execution aborted");t=await this.executeWithTimeout(()=>this.doExecute(e),this.config.timeoutMs,e.signal);break}catch(u){n=y(u),e.logger.warn(`Worker ${this.config.id} attempt ${a+1} failed: ${n.message}`),a<this.config.retryCount&&await this.delay(this.config.retryDelayMs)}let o=Date.now()-r;return t?(this._successfulExecutions++,this._lastResult=t):(this._failedExecutions++,t=this.createErrorResult(n,o),this._lastResult=t),this._executionDurations.push(o),this._executionDurations.length>100&&this._executionDurations.shift(),this._recentResults.push({timestamp:new Date,success:t.success,durationMs:o}),this._recentResults.length>5&&this._recentResults.shift(),this._nextRunAt=new Date(Date.now()+this.config.intervalMs),this._status=t.success?"idle":"error",await e.eventBus.publish({type:"worker.executed",workerId:this.config.id,timestamp:new Date,payload:{success:t.success,durationMs:o,findingsCount:t.findings.length,healthScore:t.metrics.healthScore}}),t}pause(){this._status!=="stopped"&&(this._status="paused")}resume(){this._status==="paused"&&(this._status="idle")}async stop(){this._status="stopped"}getHealth(){let e=this._executionDurations.length>0?this._executionDurations.reduce((n,t)=>n+t,0)/this._executionDurations.length:0,r=this._totalExecutions>0?this._successfulExecutions/this._totalExecutions:1;return{status:this._status,healthScore:Math.round(r*100),totalExecutions:this._totalExecutions,successfulExecutions:this._successfulExecutions,failedExecutions:this._failedExecutions,avgDurationMs:Math.round(e),recentResults:[...this._recentResults]}}async executeWithTimeout(e,r,n){return new Promise((t,o)=>{let a=setTimeout(()=>{o(new Error(`Worker execution timed out after ${r}ms`))},r),u=()=>{clearTimeout(a),o(new Error("Worker execution aborted"))};n.addEventListener("abort",u,{once:!0}),e().then(c=>{clearTimeout(a),n.removeEventListener("abort",u),t(c)}).catch(c=>{clearTimeout(a),n.removeEventListener("abort",u),o(c)})})}createErrorResult(e,r){return{workerId:this.config.id,timestamp:new Date,durationMs:r,success:!1,error:e.message,metrics:{itemsAnalyzed:0,issuesFound:0,healthScore:0,trend:"degrading",domainMetrics:{}},findings:[],recommendations:[]}}createResult(e,r,n,t){return{workerId:this.config.id,timestamp:new Date,durationMs:e,success:!0,metrics:r,findings:n,recommendations:t}}delay(e){return new Promise(r=>setTimeout(r,e))}generateId(){return`${Date.now()}-${M().slice(0,9)}`}};P();R();var W={id:"heartbeat-scheduler",name:"Heartbeat Scheduler",description:"Token-free maintenance: pattern promotion, stale detection, experience buffer monitoring",intervalMs:1800*1e3,priority:"normal",targetDomains:["learning-optimization"],enabled:!0,timeoutMs:6e4,retryCount:1,retryDelayMs:5e3},b=class extends p{lifecycleManager=null;dailyLogger;lastRunTimestamp=0;constructor(){super(W),this.dailyLogger=new k}async getLifecycleManager(){if(this.lifecycleManager)return this.lifecycleManager;try{let e=g();await e.initialize();let r=e.getDatabase();return this.lifecycleManager=v(r,{promotionRewardThreshold:.7,promotionMinOccurrences:2,promotionMinSuccessRate:.7,deprecationFailureThreshold:3,staleDaysThreshold:30,confidenceDecayRate:.01,minActiveConfidence:.3}),this.lifecycleManager}catch{return null}}getPendingExperienceCount(){try{return g().getDatabase().prepare("SELECT COUNT(*) as pending FROM qe_pattern_usage WHERE created_at > datetime('now', '-1 day')").get()?.pending??0}catch{return 0}}async doExecute(e){let r=Date.now();e.logger.info("Heartbeat scheduler running (token-free maintenance)");let n=[],t=[],o=await this.getLifecycleManager();if(!o)return e.logger.warn("Unified memory unavailable \u2014 returning zero-metric heartbeat"),this.createResult(Date.now()-r,{itemsAnalyzed:0,issuesFound:0,healthScore:50,trend:"stable",domainMetrics:{promoted:0,deprecated:0,decayed:0,stalePatterns:0,pendingExperiences:0,avgConfidence:0,avgSuccessRate:0}},[],[]);let a=0,u=0;try{let s=o.promoteEligiblePatterns();a=s.promoted,u=s.checked,a>0&&n.push({type:"heartbeat-promotion",severity:"info",domain:"learning-optimization",title:"Patterns Promoted",description:`${a} of ${u} short-term patterns promoted to long-term`})}catch(s){e.logger.warn("Pattern promotion failed",{error:d(s)})}let c=0,h=0;try{let s=o.deprecateStalePatterns();c=s.deprecated,h=s.checked,c>0&&n.push({type:"heartbeat-deprecation",severity:"low",domain:"learning-optimization",title:"Stale Patterns Deprecated",description:`${c} of ${h} patterns deprecated (stale, failed, or low confidence)`})}catch(s){e.logger.warn("Stale pattern detection failed",{error:d(s)})}let l=0;try{let s=this.lastRunTimestamp>0?(Date.now()-this.lastRunTimestamp)/864e5:1;l=o.applyConfidenceDecay(Math.min(s,7)).decayed}catch(s){e.logger.warn("Confidence decay failed",{error:d(s)})}let m=this.getPendingExperienceCount(),i={totalPatterns:0,activePatterns:0,deprecatedPatterns:0,promotedPatterns:0,shortTermPatterns:0,longTermPatterns:0,avgConfidence:0,avgSuccessRate:0,patternsNearDeprecation:0};try{i=o.getStats()}catch(s){e.logger.warn("Stats retrieval failed",{error:d(s)})}try{this.dailyLogger.log({timestamp:new Date,type:"pattern-promoted",summary:`Heartbeat: ${a} promoted, ${c} deprecated, ${l} decayed, ${m} pending exp, ${i.activePatterns} active patterns (avg conf: ${i.avgConfidence.toFixed(2)})`,details:{promoted:a,deprecated:c,decayed:l,pendingExperiences:m,totalPatterns:i.totalPatterns,activePatterns:i.activePatterns,avgConfidence:i.avgConfidence,avgSuccessRate:i.avgSuccessRate}}),this.dailyLogger.flush()}catch(s){e.logger.warn("Daily log write failed",{error:d(s)})}this.lastRunTimestamp=Date.now(),i.activePatterns>0&&i.patternsNearDeprecation/i.activePatterns>.5&&t.push({priority:"p2",domain:"learning-optimization",action:"Review At-Risk Patterns",description:`${i.patternsNearDeprecation} of ${i.activePatterns} active patterns are near deprecation. Manual review recommended.`,estimatedImpact:"medium",effort:"low",autoFixable:!1});let f=this.calculateHealthScore(i,a,c),D=this.determineTrend(a,c,i.activePatterns),_=Math.max(u,h),x=a+c+i.patternsNearDeprecation;return e.logger.info("Heartbeat complete",{promoted:a,deprecated:c,decayed:l,pendingExperiences:m,healthScore:f}),this.createResult(Date.now()-r,{itemsAnalyzed:_,issuesFound:x,healthScore:f,trend:D,domainMetrics:{promoted:a,deprecated:c,decayed:l,stalePatterns:i.patternsNearDeprecation,pendingExperiences:m,avgConfidence:Number(i.avgConfidence.toFixed(3)),avgSuccessRate:Number(i.avgSuccessRate.toFixed(3))}},n,t)}calculateHealthScore(e,r,n){let t=70;if(t+=Math.min(15,r*5),e.avgConfidence>0&&(t+=Math.round((e.avgConfidence-.5)*30)),e.activePatterns>0){let o=n/e.activePatterns;t-=Math.round(o*20)}return e.activePatterns>0&&e.patternsNearDeprecation/e.activePatterns>.5&&(t-=10),Math.max(0,Math.min(100,Math.round(t)))}determineTrend(e,r,n){return n===0?"stable":e>r?"improving":r>e&&r/n>.1?"degrading":"stable"}};export{p as a,b};
@@ -1,2 +1,2 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.12");process.exit(0)}
2
- import{i as t,j as s,l as a,n as m}from"./chunk-PGSJBXTD.js";m();var p={0:{tier:0,name:"Agent Booster",description:"Mechanical code transforms via Rust/WASM",useCases:["var-to-const conversion","add-types","remove-console statements","promise-to-async","cjs-to-esm","func-to-arrow"],typicalLatencyMs:1,relativeCost:0,exampleModels:["agent-booster-wasm","agent-booster-typescript"],requiresNetwork:!1,complexityRange:[0,10]},1:{tier:1,name:"Haiku",description:"Fast, cost-effective for simple tasks",useCases:["Simple bug fixes","Code formatting","Documentation updates","Basic refactoring","Test generation (simple)"],typicalLatencyMs:500,relativeCost:1,exampleModels:[a[1],"gpt-4o-mini","gemini-flash"],requiresNetwork:!0,complexityRange:[10,35]},2:{tier:2,name:"Sonnet",description:"Balanced capability for complex reasoning",useCases:["Feature implementation","Complex refactoring","Security analysis","Performance optimization","Test generation (complex)"],typicalLatencyMs:3e3,relativeCost:2,exampleModels:[t,"gpt-4o","gemini-pro"],requiresNetwork:!0,complexityRange:[35,70]},3:{tier:3,name:"Sonnet Extended",description:"Extended context for multi-step workflows",useCases:["Multi-file refactoring","Workflow orchestration","Cross-domain coordination","Large codebase analysis"],typicalLatencyMs:7e3,relativeCost:3,exampleModels:[t],requiresNetwork:!0,complexityRange:[60,85]},4:{tier:4,name:"Opus",description:"Maximum capability for critical decisions",useCases:["Architecture design","Security audits","Complex algorithm design","Critical bug analysis","System-wide refactoring"],typicalLatencyMs:5e3,relativeCost:4,exampleModels:[s,"gpt-4-turbo"],requiresNetwork:!0,complexityRange:[75,100]}},c={enabled:!0,tierBudgets:{0:{tier:0,maxCostPerRequest:0,maxRequestsPerHour:1e4,maxRequestsPerDay:1e5,maxDailyCostUsd:0,enabled:!0},1:{tier:1,maxCostPerRequest:.01,maxRequestsPerHour:100,maxRequestsPerDay:1e3,maxDailyCostUsd:5,enabled:!0},2:{tier:2,maxCostPerRequest:.1,maxRequestsPerHour:50,maxRequestsPerDay:500,maxDailyCostUsd:20,enabled:!0},3:{tier:3,maxCostPerRequest:.5,maxRequestsPerHour:20,maxRequestsPerDay:100,maxDailyCostUsd:30,enabled:!0},4:{tier:4,maxCostPerRequest:2,maxRequestsPerHour:10,maxRequestsPerDay:50,maxDailyCostUsd:50,enabled:!0}},maxDailyCostUsd:100,warningThreshold:.8,onBudgetExceeded:"downgrade",onBudgetWarning:"warn",allowCriticalOverrides:!0},b={budgetConfig:c,enableAgentBooster:!0,agentBoosterThreshold:.7,enableAutoRouting:!0,complexityThresholds:{0:10,1:35,2:70,3:85,4:100},allowManualOverrides:!0,enableDecisionCache:!0,decisionCacheTtlMs:300*1e3,enableMetrics:!0,maxDecisionTimeMs:10,fallbackTier:2,tierModels:{0:"agent-booster",...a}},r=class extends Error{constructor(e,i,y){super(e);this.code=i;this.cause=y;this.name="ModelRouterError"}code;cause},l=class extends r{constructor(e,i,y){super(e,"BUDGET_EXCEEDED");this.tier=i;this.usage=y;this.name="BudgetExceededError"}tier;usage},d=class extends r{constructor(o,e){super(o,"COMPLEXITY_ANALYSIS_ERROR",e),this.name="ComplexityAnalysisError"}},u=class extends r{constructor(e,i){super(e,"ROUTING_TIMEOUT");this.timeoutMs=i;this.name="RoutingTimeoutError"}timeoutMs};export{p as a,c as b,b as c,r as d,l as e,d as f,u as g};
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,j as s,l as a,n as m}from"./chunk-P7A4NKTZ.js";m();var p={0:{tier:0,name:"Agent Booster",description:"Mechanical code transforms via Rust/WASM",useCases:["var-to-const conversion","add-types","remove-console statements","promise-to-async","cjs-to-esm","func-to-arrow"],typicalLatencyMs:1,relativeCost:0,exampleModels:["agent-booster-wasm","agent-booster-typescript"],requiresNetwork:!1,complexityRange:[0,10]},1:{tier:1,name:"Haiku",description:"Fast, cost-effective for simple tasks",useCases:["Simple bug fixes","Code formatting","Documentation updates","Basic refactoring","Test generation (simple)"],typicalLatencyMs:500,relativeCost:1,exampleModels:[a[1],"gpt-4o-mini","gemini-flash"],requiresNetwork:!0,complexityRange:[10,35]},2:{tier:2,name:"Sonnet",description:"Balanced capability for complex reasoning",useCases:["Feature implementation","Complex refactoring","Security analysis","Performance optimization","Test generation (complex)"],typicalLatencyMs:3e3,relativeCost:2,exampleModels:[t,"gpt-4o","gemini-pro"],requiresNetwork:!0,complexityRange:[35,70]},3:{tier:3,name:"Sonnet Extended",description:"Extended context for multi-step workflows",useCases:["Multi-file refactoring","Workflow orchestration","Cross-domain coordination","Large codebase analysis"],typicalLatencyMs:7e3,relativeCost:3,exampleModels:[t],requiresNetwork:!0,complexityRange:[60,85]},4:{tier:4,name:"Opus",description:"Maximum capability for critical decisions",useCases:["Architecture design","Security audits","Complex algorithm design","Critical bug analysis","System-wide refactoring"],typicalLatencyMs:5e3,relativeCost:4,exampleModels:[s,"gpt-4-turbo"],requiresNetwork:!0,complexityRange:[75,100]}},c={enabled:!0,tierBudgets:{0:{tier:0,maxCostPerRequest:0,maxRequestsPerHour:1e4,maxRequestsPerDay:1e5,maxDailyCostUsd:0,enabled:!0},1:{tier:1,maxCostPerRequest:.01,maxRequestsPerHour:100,maxRequestsPerDay:1e3,maxDailyCostUsd:5,enabled:!0},2:{tier:2,maxCostPerRequest:.1,maxRequestsPerHour:50,maxRequestsPerDay:500,maxDailyCostUsd:20,enabled:!0},3:{tier:3,maxCostPerRequest:.5,maxRequestsPerHour:20,maxRequestsPerDay:100,maxDailyCostUsd:30,enabled:!0},4:{tier:4,maxCostPerRequest:2,maxRequestsPerHour:10,maxRequestsPerDay:50,maxDailyCostUsd:50,enabled:!0}},maxDailyCostUsd:100,warningThreshold:.8,onBudgetExceeded:"downgrade",onBudgetWarning:"warn",allowCriticalOverrides:!0},b={budgetConfig:c,enableAgentBooster:!0,agentBoosterThreshold:.7,enableAutoRouting:!0,complexityThresholds:{0:10,1:35,2:70,3:85,4:100},allowManualOverrides:!0,enableDecisionCache:!0,decisionCacheTtlMs:300*1e3,enableMetrics:!0,maxDecisionTimeMs:10,fallbackTier:2,tierModels:{0:"agent-booster",...a}},r=class extends Error{constructor(e,i,y){super(e);this.code=i;this.cause=y;this.name="ModelRouterError"}code;cause},l=class extends r{constructor(e,i,y){super(e,"BUDGET_EXCEEDED");this.tier=i;this.usage=y;this.name="BudgetExceededError"}tier;usage},d=class extends r{constructor(o,e){super(o,"COMPLEXITY_ANALYSIS_ERROR",e),this.name="ComplexityAnalysisError"}},u=class extends r{constructor(e,i){super(e,"ROUTING_TIMEOUT");this.timeoutMs=i;this.name="RoutingTimeoutError"}timeoutMs};export{p as a,c as b,b as c,r as d,l as e,d as f,u as g};
@@ -1,3 +1,3 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.12");process.exit(0)}
2
- import{b as N}from"./chunk-WDEXOLK2.js";import{execFileSync as b,spawn as R}from"node:child_process";import{readdirSync as I,readFileSync as k}from"node:fs";function v(t){for(let s of I("/proc")){if(!/^\d+$/.test(s))continue;let o;try{o=k(`/proc/${s}/stat`,"utf8")}catch(a){if(["ENOENT","ESRCH"].includes(a.code??""))continue;throw a}let r=o.slice(o.lastIndexOf(")")+1).trim().split(/\s+/);if(r.length<3||!/^\d+$/.test(r[2]))throw new Error(`Invalid process stat for ${s}`);if(Number(r[2])===t&&r[0]!=="Z"&&r[0]!=="X")return!0}return!1}function J(t){let s=b("ps",["-axo","pgid=,stat="],{encoding:"utf8",timeout:1e3,maxBuffer:1048576});for(let o of s.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.13");process.exit(0)}
2
+ import{b as N}from"./chunk-ZAKQLAHT.js";import{execFileSync as b,spawn as R}from"node:child_process";import{readdirSync as I,readFileSync as k}from"node:fs";function v(t){for(let s of I("/proc")){if(!/^\d+$/.test(s))continue;let o;try{o=k(`/proc/${s}/stat`,"utf8")}catch(a){if(["ENOENT","ESRCH"].includes(a.code??""))continue;throw a}let r=o.slice(o.lastIndexOf(")")+1).trim().split(/\s+/);if(r.length<3||!/^\d+$/.test(r[2]))throw new Error(`Invalid process stat for ${s}`);if(Number(r[2])===t&&r[0]!=="Z"&&r[0]!=="X")return!0}return!1}function J(t){let s=b("ps",["-axo","pgid=,stat="],{encoding:"utf8",timeout:1e3,maxBuffer:1048576});for(let o of s.split(`
3
3
  `)){if(!o.trim())continue;let r=/^\s*(\d+)\s+([A-Z?])\S*\s*$/.exec(o);if(!r)throw new Error("Could not determine Darwin process group state");if(Number(r[1])===t&&r[2]!=="Z")return!0}return!1}function O(t){let s=t.pid;return process.platform==="win32"||s===void 0?()=>{}:(g.size===0&&process.once("exit",P),g.add(s),()=>{g.delete(s),g.size===0&&process.off("exit",P)})}function G(t){return new Promise((s,o)=>{let r=process.platform,a=r==="linux",p=process.platform!=="win32"&&t.pid!==void 0,E=process.platform==="win32"&&t.pid!==void 0,d,i=!1,m=!1,w=!1,u=!1,f=()=>{i||(i=!0,clearTimeout(d),t.off("close",S),s())},c=e=>{i||(i=!0,clearTimeout(d),t.off("close",S),o(e))},T=()=>{try{return process.kill(-t.pid,0),m&&a?v(t.pid):!0}catch(e){if(e.code==="ESRCH")return!1;if(r==="darwin"&&e.code==="EPERM")return J(t.pid);if(m&&a&&e.code==="EPERM")return v(t.pid);throw e}},x=e=>{try{return process.kill(-t.pid,e),!0}catch(n){if(n.code==="ESRCH")return!1;throw n}},S=()=>{w=!0;try{if(E){u&&f();return}(!p||!T())&&f()}catch(e){c(e)}};t.once("close",S);try{if(p){if(!x("SIGTERM")){f();return}d=setTimeout(()=>{try{if(!x("SIGKILL")){f();return}m=!0;let e=Date.now()+1e3,n=()=>{try{T()?Date.now()>=e?c(new Error(`Test runner group ${t.pid} survived SIGKILL.`)):d=setTimeout(n,20):f()}catch(l){c(l)}};n()}catch(e){c(e)}},1e3)}else if(E){let e=R("taskkill",["/PID",String(t.pid),"/T","/F"],{stdio:"ignore",windowsHide:!0,timeout:2e3});e.once("error",c),e.once("close",n=>{n!==0?c(new Error(`Test runner tree termination failed (taskkill exit ${n}).`)):(u=!0,w&&f())})}else{if(t.kill("SIGTERM"),i)return;d=setTimeout(()=>{t.kill("SIGKILL")},1e3)}}catch(e){c(e)}})}function M(t,s,o){let r=o.maxBuffer??L;return new Promise(a=>{let p="",E="",d,i,m,w=!1,u;try{u=R(t,[...s],{cwd:o.cwd,env:o.env??process.env,detached:process.platform!=="win32",stdio:["ignore","pipe","pipe"]})}catch(e){a({status:null,signal:null,stdout:p,stderr:E,error:e});return}let f=O(u),c=(e,n)=>{if(w)return;w=!0,clearTimeout(x),clearTimeout(m);let h={status:i?null:e,signal:i&&!n?"SIGTERM":n,stdout:p,stderr:E,error:d},y=()=>{f(),a(h)};i?i.then(y,y):y()},T=(e,n)=>{if(i)return;d=Object.assign(new Error(n),{code:e,syscall:`spawnSync ${t}`}),i=G(u);let l=()=>{u.stdout?.destroy(),u.stderr?.destroy()};i.then(l,l),m=setTimeout(l,$)},x=setTimeout(()=>T("ETIMEDOUT",`spawnSync ${t} ETIMEDOUT`),o.timeout),S=e=>n=>{if(i)return;let l=(e==="stdout"?p:E)+n,h=l.length>r?l.slice(0,r):l;e==="stdout"?p=h:E=h,l.length>r&&T("ENOBUFS",`spawnSync ${t} ENOBUFS`)};u.stdout?.setEncoding("utf8").on("data",S("stdout")),u.stderr?.setEncoding("utf8").on("data",S("stderr")),u.once("error",e=>{d??=e,u.pid===void 0&&c(null,null)}),u.once("close",(e,n)=>c(e,n))})}async function B(t,s,o){let r=await M(t,s,o);if(r.error)throw r.error;if(r.status!==0)throw Object.assign(new Error(`${t} exited with ${r.status??r.signal}: ${r.stderr.trim()}`),{status:r.status,stderr:r.stderr});return r.stdout}var g,P,L,$,C=N(()=>{g=new Set,P=()=>{for(let t of g)try{process.kill(-t,"SIGKILL")}catch{}};L=1024*1024,$=3e3});export{O as a,G as b,M as c,B 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.12");process.exit(0)}
2
- import{a as h}from"./chunk-UJNGGFGX.js";import{c as m}from"./chunk-ADUAJIAU.js";h();var g=m.create("regret-tracker"),l=50,R=.9,d=1.1;function f(o,t){let e=o.length;if(e<2)return 0;let n=0,r=0,i=0,a=0;for(let s=0;s<e;s++)n+=o[s],r+=t[s],i+=o[s]*t[s],a+=o[s]*o[s];let u=e*a-n*n;return Math.abs(u)<1e-10?0:(e*i-n*r)/u}var c=class{domains=new Map;alertCallbacks=[];alerts=[];maxAlerts;recentWindow;constructor(t){this.maxAlerts=t?.maxAlerts??100,this.recentWindow=t?.recentWindow??20}recordDecision(t,e,n){let r=this.getOrCreateDomainState(t),i=Math.max(0,n-e);if(r.cumulativeRegret+=i,r.decisionCount++,r.points.push({decisionCount:r.decisionCount,cumulativeRegret:r.cumulativeRegret,timestamp:Date.now()}),r.decisionCount>=l){let a=this.classifyGrowthRate(r.points);r.lastGrowthRate!=="insufficient_data"&&a!==r.lastGrowthRate&&this.emitAlert(t,r.lastGrowthRate,a),r.lastGrowthRate=a}}getCumulativeRegret(t){return this.domains.get(t)?.cumulativeRegret??0}getRegretCurve(t){let e=this.domains.get(t);return e?[...e.points]:[]}getRegretGrowthRate(t){let e=this.domains.get(t);return e?this.classifyGrowthRate(e.points):"insufficient_data"}detectStagnation(t){let e=this.getRegretGrowthRate(t);return e==="linear"||e==="superlinear"}getHealthSummary(){let t=[];for(let[e,n]of this.domains){let r=this.classifyGrowthRate(n.points),i=this.computeLogLogSlope(n.points),a=this.computeRecentAvgRegret(n);t.push({domain:e,totalDecisions:n.decisionCount,cumulativeRegret:n.cumulativeRegret,growthRate:r,stagnating:r==="linear"||r==="superlinear",slope:i,recentAvgRegret:a})}return t.sort((e,n)=>e.domain.localeCompare(n.domain)),t}onAlert(t){this.alertCallbacks.push(t)}getAlerts(){return[...this.alerts]}getTrackedDomains(){return[...this.domains.keys()].sort()}getTotalDecisions(){let t=0;for(let e of this.domains.values())t+=e.decisionCount;return t}reset(t){t?this.domains.delete(t):(this.domains.clear(),this.alerts=[])}getOrCreateDomainState(t){let e=this.domains.get(t);return e||(e={points:[],cumulativeRegret:0,decisionCount:0,lastGrowthRate:"insufficient_data"},this.domains.set(t,e)),e}classifyGrowthRate(t){if(t.length<l)return"insufficient_data";let e=this.computeLogLogSlope(t);return e===void 0?"insufficient_data":e<R?"sublinear":e<=d?"linear":"superlinear"}computeLogLogSlope(t){if(t.length<l)return;let e=t.filter(i=>i.cumulativeRegret>0&&i.decisionCount>0);if(e.length<2)return;let n=e.map(i=>Math.log(i.decisionCount)),r=e.map(i=>Math.log(i.cumulativeRegret));return f(n,r)}computeRecentAvgRegret(t){if(t.points.length<2)return 0;let e=Math.min(this.recentWindow,t.points.length),n=t.points.slice(-e),r=n[0],i=n[n.length-1],a=i.cumulativeRegret-r.cumulativeRegret,u=i.decisionCount-r.decisionCount;return u<=0?0:a/u}emitAlert(t,e,n){let r={domain:t,previousRate:e,newRate:n,timestamp:Date.now(),message:`Domain "${t}" regret growth changed from ${e} to ${n}`};this.alerts.push(r),this.alerts.length>this.maxAlerts&&this.alerts.shift(),g.info("Regret growth rate transition",{domain:t,previousRate:e,newRate:n});for(let i of this.alertCallbacks)try{i(r)}catch(a){g.error("Alert callback error",a instanceof Error?a:void 0)}}};function b(o){return new c(o)}export{b as a};
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.13");process.exit(0)}
2
+ import{a as h}from"./chunk-UT2VZ33P.js";import{c as m}from"./chunk-GB6HBNH2.js";h();var g=m.create("regret-tracker"),l=50,R=.9,d=1.1;function f(o,t){let e=o.length;if(e<2)return 0;let n=0,r=0,i=0,a=0;for(let s=0;s<e;s++)n+=o[s],r+=t[s],i+=o[s]*t[s],a+=o[s]*o[s];let u=e*a-n*n;return Math.abs(u)<1e-10?0:(e*i-n*r)/u}var c=class{domains=new Map;alertCallbacks=[];alerts=[];maxAlerts;recentWindow;constructor(t){this.maxAlerts=t?.maxAlerts??100,this.recentWindow=t?.recentWindow??20}recordDecision(t,e,n){let r=this.getOrCreateDomainState(t),i=Math.max(0,n-e);if(r.cumulativeRegret+=i,r.decisionCount++,r.points.push({decisionCount:r.decisionCount,cumulativeRegret:r.cumulativeRegret,timestamp:Date.now()}),r.decisionCount>=l){let a=this.classifyGrowthRate(r.points);r.lastGrowthRate!=="insufficient_data"&&a!==r.lastGrowthRate&&this.emitAlert(t,r.lastGrowthRate,a),r.lastGrowthRate=a}}getCumulativeRegret(t){return this.domains.get(t)?.cumulativeRegret??0}getRegretCurve(t){let e=this.domains.get(t);return e?[...e.points]:[]}getRegretGrowthRate(t){let e=this.domains.get(t);return e?this.classifyGrowthRate(e.points):"insufficient_data"}detectStagnation(t){let e=this.getRegretGrowthRate(t);return e==="linear"||e==="superlinear"}getHealthSummary(){let t=[];for(let[e,n]of this.domains){let r=this.classifyGrowthRate(n.points),i=this.computeLogLogSlope(n.points),a=this.computeRecentAvgRegret(n);t.push({domain:e,totalDecisions:n.decisionCount,cumulativeRegret:n.cumulativeRegret,growthRate:r,stagnating:r==="linear"||r==="superlinear",slope:i,recentAvgRegret:a})}return t.sort((e,n)=>e.domain.localeCompare(n.domain)),t}onAlert(t){this.alertCallbacks.push(t)}getAlerts(){return[...this.alerts]}getTrackedDomains(){return[...this.domains.keys()].sort()}getTotalDecisions(){let t=0;for(let e of this.domains.values())t+=e.decisionCount;return t}reset(t){t?this.domains.delete(t):(this.domains.clear(),this.alerts=[])}getOrCreateDomainState(t){let e=this.domains.get(t);return e||(e={points:[],cumulativeRegret:0,decisionCount:0,lastGrowthRate:"insufficient_data"},this.domains.set(t,e)),e}classifyGrowthRate(t){if(t.length<l)return"insufficient_data";let e=this.computeLogLogSlope(t);return e===void 0?"insufficient_data":e<R?"sublinear":e<=d?"linear":"superlinear"}computeLogLogSlope(t){if(t.length<l)return;let e=t.filter(i=>i.cumulativeRegret>0&&i.decisionCount>0);if(e.length<2)return;let n=e.map(i=>Math.log(i.decisionCount)),r=e.map(i=>Math.log(i.cumulativeRegret));return f(n,r)}computeRecentAvgRegret(t){if(t.points.length<2)return 0;let e=Math.min(this.recentWindow,t.points.length),n=t.points.slice(-e),r=n[0],i=n[n.length-1],a=i.cumulativeRegret-r.cumulativeRegret,u=i.decisionCount-r.decisionCount;return u<=0?0:a/u}emitAlert(t,e,n){let r={domain:t,previousRate:e,newRate:n,timestamp:Date.now(),message:`Domain "${t}" regret growth changed from ${e} to ${n}`};this.alerts.push(r),this.alerts.length>this.maxAlerts&&this.alerts.shift(),g.info("Regret growth rate transition",{domain:t,previousRate:e,newRate:n});for(let i of this.alertCallbacks)try{i(r)}catch(a){g.error("Alert callback error",a instanceof Error?a:void 0)}}};function b(o){return new c(o)}export{b as a};
@@ -1,2 +1,2 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.12");process.exit(0)}
2
- import{a as ae,b as oe}from"./chunk-YVJEUX3I.js";import{S as ie,i as D,p as $}from"./chunk-35MIUSXQ.js";import{b as g,d as ne,f as W}from"./chunk-WDEXOLK2.js";var I,E=g(()=>{"use strict";I={dimensions:384,M:16,efConstruction:200,efSearch:100,metric:"cosine"}});function se(){if(z)return A!==null;try{let i=(oe(),W(ae));if(A=i.differentiableSearch,P=i.init,P)try{P()}catch{}return z=!0,!0}catch{return z=!0,!1}}function j(i){let e=0;for(let r=0;r<i.length;r++)e+=i[r]*i[r];return Math.sqrt(e)}function ce(i,e,r,t){let n=r*t;if(n===0)return 0;let a=0,o=Math.min(i.length,e.length);for(let c=0;c<o;c++)a+=i[c]*e[c];return a/n}function q(i,e){let r=0,t=Math.min(i.length,e.length);for(let n=0;n<t;n++){let a=i[n]-e[n];r+=a*a}return Math.sqrt(r)}function le(i,e){if(i.length===e)return i;let r=new Float32Array(e);if(i.length>e){let t=i.length/e;for(let n=0;n<e;n++){let a=Math.floor(n*t),o=Math.floor((n+1)*t),c=0;for(let s=a;s<o;s++)c+=i[s];r[n]=c/(o-a)}}else for(let t=0;t<i.length;t++)r[t]=i[t];return r}var A,P,z,S,B=g(()=>{"use strict";E();A=null,P=null,z=!1;S=class{config;entries=[];idToIndex=new Map;hasRuvector=!1;loaded=!1;constructor(e){this.config={...I,...e}}ensureLoaded(){this.loaded||(this.hasRuvector=se(),this.loaded=!0)}normalizeVector(e){return e.length===this.config.dimensions?e:le(e,this.config.dimensions)}add(e,r,t){this.ensureLoaded();let n=this.normalizeVector(r),a=j(n);if(this.idToIndex.has(e)){let c=this.idToIndex.get(e);this.entries[c]={id:e,vector:n,norm:a,metadata:t};return}let o=this.entries.length;this.entries.push({id:e,vector:n,norm:a,metadata:t}),this.idToIndex.set(e,o)}search(e,r){if(this.ensureLoaded(),this.entries.length===0)return[];let t=this.normalizeVector(e),n=j(t),a=Math.min(r,this.entries.length),o=this.entries.length>0?this.entries[0].vector.length:0,c=t.length===o;if(this.config.metric==="cosine")return this.bruteForcSearch(t,n,a);if(this.hasRuvector&&c&&A)try{let s=this.entries.map(u=>u.vector),l=A(t,s,a,1).indices.map(u=>{let h=this.entries[u],m=-q(t,h.vector);return{id:h.id,score:m,metadata:h.metadata}});return l.sort((u,h)=>h.score-u.score),l}catch{}return this.bruteForcSearch(t,n,a)}bruteForcSearch(e,r,t){let n=[];for(let a of this.entries){let o;this.config.metric==="cosine"?o=ce(e,a.vector,r,a.norm):o=-q(e,a.vector),n.push({id:a.id,score:o,metadata:a.metadata})}return n.sort((a,o)=>o.score-a.score),n.slice(0,t)}remove(e){let r=this.idToIndex.get(e);if(r===void 0)return!1;let t=this.entries.length-1;if(r!==t){let n=this.entries[t];this.entries[r]=n,this.idToIndex.set(n.id,r)}return this.entries.pop(),this.idToIndex.delete(e),!0}size(){return this.entries.length}dimensions(){return this.config.dimensions}recall(){return this.hasRuvector,1}isRuvectorAvailable(){return this.ensureLoaded(),this.hasRuvector}getConfig(){return{...this.config}}clear(){this.entries=[],this.idToIndex.clear()}dispose(){this.clear()}}});import{createRequire as he}from"module";function de(){if(U){if(k)return k;throw new b(O??"Unknown load error")}U=!0;try{let i=ue("hnswlib-node");if(!i.HierarchicalNSW)throw new Error("hnswlib-node module missing HierarchicalNSW export");return k=i,k}catch(i){let e=i instanceof Error?i.message:String(i);throw O=e,new b(e)}}function me(i,e){if(i.length===e)return i;let r=new Float32Array(e);if(i.length>e){let t=i.length/e;for(let n=0;n<e;n++){let a=Math.floor(n*t),o=Math.floor((n+1)*t),c=0;for(let s=a;s<o;s++)c+=i[s];r[n]=c/(o-a)}}else for(let t=0;t<i.length;t++)r[t]=i[t];return r}function K(i){let e=new Array(i.length);for(let r=0;r<i.length;r++)e[r]=i[r];return e}var ue,b,k,U,O,J,w,Q=g(()=>{"use strict";E();ue=he(import.meta.url),b=class extends Error{constructor(e){super(`Native HNSW backend unavailable: ${e}`),this.name="NativeHnswUnavailableError"}},k=null,U=!1,O=null;J=1e4,w=class{config;nativeIndex=null;currentMaxElements=J;liveIds=new Set;metadataStore=new Map;_metrics={totalSearches:0,totalAdds:0,totalRemoves:0,avgSearchLatencyMs:0,maxSearchLatencyMs:0,lastSearchLatencyMs:0,fallbackSearchCount:0,bruteForceSearchCount:0,nativeSearchCount:0,fallbackRate:0,allSearchesBruteForce:!1};constructor(e){this.config={...I,...e},this.nativeIndex=this.createFreshIndex()}createFreshIndex(){let e=de(),r=this.config.metric==="euclidean"?"l2":"cosine";try{let t=new e.HierarchicalNSW(r,this.config.dimensions);return t.initIndex(this.currentMaxElements,this.config.M,this.config.efConstruction,100,!0),t.setEf(this.config.efSearch),t}catch(t){let n=t instanceof Error?t.message:String(t);throw new b(`HierarchicalNSW init failed: ${n}`)}}add(e,r,t){if(!this.nativeIndex)throw new Error("NativeHnswBackend has been disposed");let n=this.normalizeVector(r);if(!this.liveIds.has(e)&&this.liveIds.size>=this.currentMaxElements){let a=this.currentMaxElements*2;this.nativeIndex.resizeIndex(a),this.currentMaxElements=a}this.nativeIndex.addPoint(K(n),e,!0),this.liveIds.add(e),t?this.metadataStore.set(e,t):this.metadataStore.delete(e),this._metrics.totalAdds++}search(e,r){if(!this.nativeIndex)throw new Error("NativeHnswBackend has been disposed");if(this.liveIds.size===0||r<=0)return[];let t=performance.now(),n=this.normalizeVector(e),a=Math.min(r,this.liveIds.size),o=Math.min(this.liveIds.size,Math.max(a,this.config.efSearch)*2),c=this.nativeIndex.searchKnn(K(n),o),s=this.config.metric==="cosine",d=new Map;for(let h=0;h<c.neighbors.length;h++){let m=c.neighbors[h];if(!this.liveIds.has(m))continue;let x=c.distances[h],f=s?1-x:-x,G=d.get(m);(G===void 0||f>G.score)&&d.set(m,{id:m,score:f,metadata:this.metadataStore.get(m)})}let l=Array.from(d.values());l.sort((h,m)=>m.score-h.score),l.length>a&&(l.length=a);let u=performance.now()-t;return this.updateSearchMetrics(u),this._metrics.nativeSearchCount=this._metrics.totalSearches,u>50&&console.warn(`[NativeHNSW] search took ${u.toFixed(1)}ms (k=${r}, results=${l.length})`),l}remove(e){if(!this.nativeIndex||!this.liveIds.has(e))return!1;try{this.nativeIndex.markDelete(e)}catch{return!1}return this.liveIds.delete(e),this.metadataStore.delete(e),this._metrics.totalRemoves++,!0}size(){return this.liveIds.size}dimensions(){return this.config.dimensions}recall(){return .99}getMetrics(){return{...this._metrics}}get lastSearchLatencyMs(){return this._metrics.lastSearchLatencyMs}getConfig(){return{...this.config}}clear(){this.nativeIndex&&(this.liveIds.clear(),this.metadataStore.clear(),this.currentMaxElements=J,this.nativeIndex=this.createFreshIndex())}dispose(){this.liveIds.clear(),this.metadataStore.clear(),this.nativeIndex=null}isNativeAvailable(){return this.nativeIndex!==null}normalizeVector(e){return e.length===this.config.dimensions?e:me(e,this.config.dimensions)}updateSearchMetrics(e){this._metrics.totalSearches++,this._metrics.lastSearchLatencyMs=e,e>this._metrics.maxSearchLatencyMs&&(this._metrics.maxSearchLatencyMs=e);let r=this._metrics.totalSearches;this._metrics.avgSearchLatencyMs=this._metrics.avgSearchLatencyMs*((r-1)/r)+e/r}}});function X(i,e){let r=Array.from({length:e},()=>new Float64Array(e));for(let t=0;t<e;t++){let n=i[t].length;r[t][t]=n;for(let a of i[t])r[t][a]=-1}return r}function N(i,e){let r=e.length,t=new Float64Array(r);for(let n=0;n<r;n++){let a=i[n].length;t[n]=a*e[n];for(let o of i[n])t[n]-=e[o]}return t}function H(i){let e=0;for(let r=0;r<i.length;r++)e+=i[r]*i[r];return Math.sqrt(e)}function R(i){let e=H(i);if(e>0)for(let r=0;r<i.length;r++)i[r]/=e}function v(i,e){let r=0;for(let t=0;t<i.length;t++)r+=i[t]*e[t];for(let t=0;t<i.length;t++)i[t]-=r*e[t]}function y(i,e,r=100,t=1e-6){if(e<=1)return 0;if(e===2)return i[0].includes(1)?2:0;let n=new Float64Array(e).fill(1/Math.sqrt(e)),a=new Float64Array(e);for(let l=0;l<e;l++)a[l]=Math.random()-.5;v(a,n),R(a);let o=0;for(let l=0;l<30;l++){let u=N(i,a);if(v(u,n),o=H(u),o>0)for(let h=0;h<e;h++)a[h]=u[h]/o}if(o<t)return 0;let c=new Float64Array(e);for(let l=0;l<e;l++)c[l]=Math.random()-.5;v(c,n),R(c);let s=0;for(let l=0;l<r;l++){let u=N(i,c),h=new Float64Array(e);for(let f=0;f<e;f++)h[f]=o*c[f]-u[f];v(h,n);let m=H(h);if(m<t)break;let x=m;for(let f=0;f<e;f++)c[f]=h[f]/m;if(Math.abs(x-s)<t)break;s=x}let d=o-s;return Math.max(0,d)}function F(i,e,r=100,t=1e-6){return y(i,e,r,t)}function C(i,e,r=50,t){if(e<=1)return 0;let n=t??y(i,e);if(n<1e-10)return 1/0;let o=2*Math.max(...i.map(d=>d.length),1),s=2*(Math.log(o/n)/(o-n));return Math.max(0,s)}function M(i,e,r){let t=1-Math.exp(-i/.05),n=1-Math.exp(-e/.5),a=r===1/0?0:1/(1+r/5),o=.4*t+.3*n+.3*a;return Math.max(0,Math.min(1,o))}var _=g(()=>{"use strict"});var ee={};ne(ee,{ALERT_THRESHOLDS:()=>fe,DEFAULT_HNSW_HEALTH_CONFIG:()=>Y,HnswHealthMonitor:()=>L,_resetNativeLoader:()=>be,approximateFiedlerValue:()=>y,approximateSpectralGap:()=>F,buildAdjacencyFromIndex:()=>Z,buildLaplacian:()=>X,computeCoherenceScore:()=>M,createHnswHealthMonitor:()=>ge,deflateVector:()=>v,estimateEffectiveResistance:()=>C,laplacianMultiply:()=>N,normalizeInPlace:()=>R,vectorNorm:()=>H});function pe(){return V?T:(V=!0,T=null,null)}function be(){T=null,V=!1}function Z(i,e=16,r){let t=i.size();if(t===0)return{adjacency:[],nodeCount:0,adjacencySource:"approximate"};let n=Array.from({length:t},()=>[]),a=Math.min(e,t-1);if(a===0)return{adjacency:n,nodeCount:t,adjacencySource:"approximate"};if(r&&r.size>0){let o=Array.from(r.keys()).slice(0,t),c=new Map;for(let s=0;s<o.length;s++)c.set(o[s],s);for(let s=0;s<o.length;s++){let d=r.get(o[s]);if(!d)continue;let l=i.search(d,a+1);for(let u of l){if(u.id===o[s])continue;let h=c.get(u.id);h!==void 0&&(n[s].includes(h)||n[s].push(h),n[h].includes(s)||n[h].push(s))}}return{adjacency:n,nodeCount:t,adjacencySource:"actual-search"}}console.warn("[HnswHealthMonitor] No stored vectors provided \u2014 using approximate circular adjacency. Pass stored vectors for accurate health metrics.");for(let o=0;o<t;o++)for(let c=0;c<a;c++){let s=(o+c+1)%t;n[o].includes(s)||n[o].push(s),n[s].includes(o)||n[s].push(o)}return{adjacency:n,nodeCount:t,adjacencySource:"approximate"}}function ge(i){return new L(i)}var Y,fe,T,V,L,te=g(()=>{"use strict";_();_();Y={fiedlerThreshold:.01,spectralGapThreshold:.1,resistanceThreshold:10,coherenceThreshold:.3,maxPowerIterations:100,convergenceTolerance:1e-6,resistanceSampleSize:50,maxHistoryEntries:200,minIndexSize:3},fe={FragileIndex:.01,PoorExpansion:.1,HighResistance:10,LowCoherence:.3},T=null,V=!1;L=class{config;alerts=[];history=[];lastReport=null;useNative=!1;nativeChecked=!1;constructor(e){this.config={...Y,...e}}checkHealth(e){let r=performance.now(),t=e.size();if(t<this.config.minIndexSize)return this.createSmallIndexReport(t,performance.now()-r);this.nativeChecked||(this.nativeChecked=!0,this.useNative=pe()!==null);let{adjacency:n,nodeCount:a,adjacencySource:o}=Z(e),c=this.useNative?this.computeNativeMetrics(n):this.computeApproximateMetrics(n,a),s=this.generateAlerts(c);this.alerts.length=0,this.alerts.push(...s);let d=performance.now()-r,l={healthy:s.length===0,metrics:c,alerts:s,indexSize:t,usedNativeBackend:this.useNative,adjacencySource:o,checkDurationMs:d,checkedAt:new Date};return this.addHistoryPoint({coherenceScore:c.coherenceScore,fiedlerValue:c.fiedlerValue,indexSize:t,healthy:l.healthy,timestamp:l.checkedAt}),this.lastReport=l,l}getAlerts(){return[...this.alerts]}getMetricsHistory(e){let r=[...this.history];return e!==void 0&&e<r.length?r.slice(-e):r}isHealthy(){return this.lastReport===null?!0:this.lastReport.healthy}getLastReport(){return this.lastReport}clearHistory(){this.history.length=0,this.alerts.length=0,this.lastReport=null}computeNativeMetrics(e){let r=T,t=r.computeFiedlerValue(e),n=r.computeSpectralGap(e),a=r.computeEffectiveResistance(e),o=M(t,n,a);return{fiedlerValue:t,spectralGap:n,effectiveResistance:a,coherenceScore:o}}computeApproximateMetrics(e,r){let t=y(e,r,this.config.maxPowerIterations,this.config.convergenceTolerance),n=F(e,r,this.config.maxPowerIterations,this.config.convergenceTolerance),a=C(e,r,this.config.resistanceSampleSize,t),o=M(t,n,a);return{fiedlerValue:t,spectralGap:n,effectiveResistance:a,coherenceScore:o}}generateAlerts(e){let r=[],t=new Date;return e.fiedlerValue<this.config.fiedlerThreshold&&r.push({type:"FragileIndex",message:`Fiedler value ${e.fiedlerValue.toFixed(6)} is below threshold ${this.config.fiedlerThreshold}. The index graph has weak algebraic connectivity.`,value:e.fiedlerValue,threshold:this.config.fiedlerThreshold,timestamp:t}),e.spectralGap<this.config.spectralGapThreshold&&r.push({type:"PoorExpansion",message:`Spectral gap ${e.spectralGap.toFixed(6)} is below threshold ${this.config.spectralGapThreshold}. The index graph has poor expansion properties.`,value:e.spectralGap,threshold:this.config.spectralGapThreshold,timestamp:t}),e.effectiveResistance>this.config.resistanceThreshold&&r.push({type:"HighResistance",message:`Average effective resistance ${e.effectiveResistance.toFixed(4)} exceeds threshold ${this.config.resistanceThreshold}. Nodes are poorly connected.`,value:e.effectiveResistance,threshold:this.config.resistanceThreshold,timestamp:t}),e.coherenceScore<this.config.coherenceThreshold&&r.push({type:"LowCoherence",message:`Coherence score ${e.coherenceScore.toFixed(4)} is below threshold ${this.config.coherenceThreshold}. Overall index health is degraded.`,value:e.coherenceScore,threshold:this.config.coherenceThreshold,timestamp:t}),r}createSmallIndexReport(e,r){let t={fiedlerValue:e>0?1:0,spectralGap:e>0?1:0,effectiveResistance:e>0?.5:0,coherenceScore:e>0?1:0},n={healthy:!0,metrics:t,alerts:[],indexSize:e,usedNativeBackend:!1,adjacencySource:"approximate",checkDurationMs:r,checkedAt:new Date};return this.addHistoryPoint({coherenceScore:t.coherenceScore,fiedlerValue:t.fiedlerValue,indexSize:e,healthy:!0,timestamp:n.checkedAt}),this.lastReport=n,n}addHistoryPoint(e){this.history.push(e),this.history.length>this.config.maxHistoryEntries&&this.history.splice(0,this.history.length-this.config.maxHistoryEntries)}}});var ve,p,re,ye=g(()=>{B();Q();ie();ve={patterns:{dimensions:384,M:16,efConstruction:200,efSearch:100,metric:"cosine"},"qe-memory":{dimensions:384,M:16,efConstruction:200,efSearch:100,metric:"cosine"},learning:{dimensions:384,M:16,efConstruction:200,efSearch:50,metric:"cosine"},coverage:{dimensions:384,M:16,efConstruction:200,efSearch:100,metric:"cosine"}},p=new Map,re=class i{backend;_isNativeBackend;indexName;stringToNumericId=new Map;numericToStringId=new Map;nextAutoId=0;healthMonitor=null;healthMonitorLoaded=!1;operationsSinceLastCheck=0;healthCheckFrequency=100;lastHealthReport=null;constructor(e,r){this.indexName=e;let n={...ve[e]??{},...r},{backend:a,isNative:o}=i.createBackend(n);this.backend=a,this._isNativeBackend=o}add(e,r,t){this.backend.add(e,r,t),this.maybeRunHealthCheck()}search(e,r){let t=performance.now(),n=this.backend.search(e,r),a=performance.now()-t;return a>50&&console.warn(`[HNSW] search took ${a.toFixed(1)}ms (k=${r}, results=${n.length})`),this._lastSearchLatencyMs=a,n}_lastSearchLatencyMs=0;get lastSearchLatencyMs(){return this._lastSearchLatencyMs}remove(e){return this.backend.remove(e)}size(){return this.backend.size()}dimensions(){return this.backend.dimensions()}recall(){return this.backend.recall()}addByStringId(e,r){let t=this.stringToNumericId.get(e);t!==void 0?this.backend.remove(t):(t=this.nextAutoId++,this.stringToNumericId.set(e,t),this.numericToStringId.set(t,e)),this.backend.add(t,new Float32Array(r))}searchByArray(e,r){return this.backend.search(new Float32Array(e),r).map(n=>({id:this.numericToStringId.get(n.id)??String(n.id),score:n.score}))}removeByStringId(e){let r=this.stringToNumericId.get(e);if(r===void 0)return!1;let t=this.backend.remove(r);return t&&(this.stringToNumericId.delete(e),this.numericToStringId.delete(r)),t}clear(){this.backend.clear?.(),this.stringToNumericId.clear(),this.numericToStringId.clear(),this.nextAutoId=0}dispose(){try{this.backend.dispose?.()}catch{}this.stringToNumericId.clear(),this.numericToStringId.clear(),this.nextAutoId=0}isRuvectorAvailable(){return this.backend instanceof S?this.backend.isRuvectorAvailable():this.backend instanceof w?this.backend.isNativeAvailable():!1}isNativeBackend(){return this._isNativeBackend}getName(){return this.indexName}setHealthCheckFrequency(e){this.healthCheckFrequency=Math.max(1,e)}getHealthCheckFrequency(){return this.healthCheckFrequency}getLastHealthReport(){return this.lastHealthReport}getHealthMonitor(){return this.healthMonitor}maybeRunHealthCheck(){if($()&&(this.operationsSinceLastCheck++,!(this.operationsSinceLastCheck<this.healthCheckFrequency)&&(this.operationsSinceLastCheck=0,this.ensureHealthMonitor(),this.healthMonitor)))try{this.lastHealthReport=this.healthMonitor.checkHealth(this.backend),this.lastHealthReport.healthy||console.warn(`[HNSW-Health] Index "${this.indexName}" health check failed: ${this.lastHealthReport.alerts.length} alert(s). Coherence: ${this.lastHealthReport.metrics.coherenceScore.toFixed(3)}`)}catch(e){console.warn(`[HNSW-Health] Health check error for "${this.indexName}":`,e)}}ensureHealthMonitor(){if(!this.healthMonitorLoaded){this.healthMonitorLoaded=!0;try{let e=(te(),W(ee));this.healthMonitor=e.createHnswHealthMonitor()}catch(e){process.env.DEBUG&&console.debug("[HNSW-Health] Monitor module unavailable:",e instanceof Error?e.message:e),this.healthMonitor=null}}}static createBackend(e){if(D())try{return{backend:new w(e),isNative:!0}}catch(r){r instanceof b?console.info(`[HNSW] Native backend unavailable, falling back to JS: ${r.message}`):console.warn("[HNSW] Unexpected error creating native backend, falling back to JS:",r)}return{backend:new S(e),isNative:!1}}static create(e,r){let t=p.get(e);if(t instanceof i)return t;let n=new i(e,r);return p.set(e,n),n}static get(e){let r=p.get(e);return r instanceof i?r:void 0}static close(e){let r=p.get(e);r instanceof i&&r.dispose(),p.delete(e)}static closeAll(){for(let[e]of p)i.close(e);p.clear()}static listIndexes(){return Array.from(p.keys())}}});export{re as a,ye 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.13");process.exit(0)}
2
+ import{a as ae,b as oe}from"./chunk-OCAEXYFA.js";import{S as ie,i as D,p as $}from"./chunk-WOCGL4QP.js";import{b as g,d as ne,f as W}from"./chunk-ZAKQLAHT.js";var I,E=g(()=>{"use strict";I={dimensions:384,M:16,efConstruction:200,efSearch:100,metric:"cosine"}});function se(){if(z)return A!==null;try{let i=(oe(),W(ae));if(A=i.differentiableSearch,P=i.init,P)try{P()}catch{}return z=!0,!0}catch{return z=!0,!1}}function j(i){let e=0;for(let r=0;r<i.length;r++)e+=i[r]*i[r];return Math.sqrt(e)}function ce(i,e,r,t){let n=r*t;if(n===0)return 0;let a=0,o=Math.min(i.length,e.length);for(let c=0;c<o;c++)a+=i[c]*e[c];return a/n}function q(i,e){let r=0,t=Math.min(i.length,e.length);for(let n=0;n<t;n++){let a=i[n]-e[n];r+=a*a}return Math.sqrt(r)}function le(i,e){if(i.length===e)return i;let r=new Float32Array(e);if(i.length>e){let t=i.length/e;for(let n=0;n<e;n++){let a=Math.floor(n*t),o=Math.floor((n+1)*t),c=0;for(let s=a;s<o;s++)c+=i[s];r[n]=c/(o-a)}}else for(let t=0;t<i.length;t++)r[t]=i[t];return r}var A,P,z,S,B=g(()=>{"use strict";E();A=null,P=null,z=!1;S=class{config;entries=[];idToIndex=new Map;hasRuvector=!1;loaded=!1;constructor(e){this.config={...I,...e}}ensureLoaded(){this.loaded||(this.hasRuvector=se(),this.loaded=!0)}normalizeVector(e){return e.length===this.config.dimensions?e:le(e,this.config.dimensions)}add(e,r,t){this.ensureLoaded();let n=this.normalizeVector(r),a=j(n);if(this.idToIndex.has(e)){let c=this.idToIndex.get(e);this.entries[c]={id:e,vector:n,norm:a,metadata:t};return}let o=this.entries.length;this.entries.push({id:e,vector:n,norm:a,metadata:t}),this.idToIndex.set(e,o)}search(e,r){if(this.ensureLoaded(),this.entries.length===0)return[];let t=this.normalizeVector(e),n=j(t),a=Math.min(r,this.entries.length),o=this.entries.length>0?this.entries[0].vector.length:0,c=t.length===o;if(this.config.metric==="cosine")return this.bruteForcSearch(t,n,a);if(this.hasRuvector&&c&&A)try{let s=this.entries.map(u=>u.vector),l=A(t,s,a,1).indices.map(u=>{let h=this.entries[u],m=-q(t,h.vector);return{id:h.id,score:m,metadata:h.metadata}});return l.sort((u,h)=>h.score-u.score),l}catch{}return this.bruteForcSearch(t,n,a)}bruteForcSearch(e,r,t){let n=[];for(let a of this.entries){let o;this.config.metric==="cosine"?o=ce(e,a.vector,r,a.norm):o=-q(e,a.vector),n.push({id:a.id,score:o,metadata:a.metadata})}return n.sort((a,o)=>o.score-a.score),n.slice(0,t)}remove(e){let r=this.idToIndex.get(e);if(r===void 0)return!1;let t=this.entries.length-1;if(r!==t){let n=this.entries[t];this.entries[r]=n,this.idToIndex.set(n.id,r)}return this.entries.pop(),this.idToIndex.delete(e),!0}size(){return this.entries.length}dimensions(){return this.config.dimensions}recall(){return this.hasRuvector,1}isRuvectorAvailable(){return this.ensureLoaded(),this.hasRuvector}getConfig(){return{...this.config}}clear(){this.entries=[],this.idToIndex.clear()}dispose(){this.clear()}}});import{createRequire as he}from"module";function de(){if(U){if(k)return k;throw new b(O??"Unknown load error")}U=!0;try{let i=ue("hnswlib-node");if(!i.HierarchicalNSW)throw new Error("hnswlib-node module missing HierarchicalNSW export");return k=i,k}catch(i){let e=i instanceof Error?i.message:String(i);throw O=e,new b(e)}}function me(i,e){if(i.length===e)return i;let r=new Float32Array(e);if(i.length>e){let t=i.length/e;for(let n=0;n<e;n++){let a=Math.floor(n*t),o=Math.floor((n+1)*t),c=0;for(let s=a;s<o;s++)c+=i[s];r[n]=c/(o-a)}}else for(let t=0;t<i.length;t++)r[t]=i[t];return r}function K(i){let e=new Array(i.length);for(let r=0;r<i.length;r++)e[r]=i[r];return e}var ue,b,k,U,O,J,w,Q=g(()=>{"use strict";E();ue=he(import.meta.url),b=class extends Error{constructor(e){super(`Native HNSW backend unavailable: ${e}`),this.name="NativeHnswUnavailableError"}},k=null,U=!1,O=null;J=1e4,w=class{config;nativeIndex=null;currentMaxElements=J;liveIds=new Set;metadataStore=new Map;_metrics={totalSearches:0,totalAdds:0,totalRemoves:0,avgSearchLatencyMs:0,maxSearchLatencyMs:0,lastSearchLatencyMs:0,fallbackSearchCount:0,bruteForceSearchCount:0,nativeSearchCount:0,fallbackRate:0,allSearchesBruteForce:!1};constructor(e){this.config={...I,...e},this.nativeIndex=this.createFreshIndex()}createFreshIndex(){let e=de(),r=this.config.metric==="euclidean"?"l2":"cosine";try{let t=new e.HierarchicalNSW(r,this.config.dimensions);return t.initIndex(this.currentMaxElements,this.config.M,this.config.efConstruction,100,!0),t.setEf(this.config.efSearch),t}catch(t){let n=t instanceof Error?t.message:String(t);throw new b(`HierarchicalNSW init failed: ${n}`)}}add(e,r,t){if(!this.nativeIndex)throw new Error("NativeHnswBackend has been disposed");let n=this.normalizeVector(r);if(!this.liveIds.has(e)&&this.liveIds.size>=this.currentMaxElements){let a=this.currentMaxElements*2;this.nativeIndex.resizeIndex(a),this.currentMaxElements=a}this.nativeIndex.addPoint(K(n),e,!0),this.liveIds.add(e),t?this.metadataStore.set(e,t):this.metadataStore.delete(e),this._metrics.totalAdds++}search(e,r){if(!this.nativeIndex)throw new Error("NativeHnswBackend has been disposed");if(this.liveIds.size===0||r<=0)return[];let t=performance.now(),n=this.normalizeVector(e),a=Math.min(r,this.liveIds.size),o=Math.min(this.liveIds.size,Math.max(a,this.config.efSearch)*2),c=this.nativeIndex.searchKnn(K(n),o),s=this.config.metric==="cosine",d=new Map;for(let h=0;h<c.neighbors.length;h++){let m=c.neighbors[h];if(!this.liveIds.has(m))continue;let x=c.distances[h],f=s?1-x:-x,G=d.get(m);(G===void 0||f>G.score)&&d.set(m,{id:m,score:f,metadata:this.metadataStore.get(m)})}let l=Array.from(d.values());l.sort((h,m)=>m.score-h.score),l.length>a&&(l.length=a);let u=performance.now()-t;return this.updateSearchMetrics(u),this._metrics.nativeSearchCount=this._metrics.totalSearches,u>50&&console.warn(`[NativeHNSW] search took ${u.toFixed(1)}ms (k=${r}, results=${l.length})`),l}remove(e){if(!this.nativeIndex||!this.liveIds.has(e))return!1;try{this.nativeIndex.markDelete(e)}catch{return!1}return this.liveIds.delete(e),this.metadataStore.delete(e),this._metrics.totalRemoves++,!0}size(){return this.liveIds.size}dimensions(){return this.config.dimensions}recall(){return .99}getMetrics(){return{...this._metrics}}get lastSearchLatencyMs(){return this._metrics.lastSearchLatencyMs}getConfig(){return{...this.config}}clear(){this.nativeIndex&&(this.liveIds.clear(),this.metadataStore.clear(),this.currentMaxElements=J,this.nativeIndex=this.createFreshIndex())}dispose(){this.liveIds.clear(),this.metadataStore.clear(),this.nativeIndex=null}isNativeAvailable(){return this.nativeIndex!==null}normalizeVector(e){return e.length===this.config.dimensions?e:me(e,this.config.dimensions)}updateSearchMetrics(e){this._metrics.totalSearches++,this._metrics.lastSearchLatencyMs=e,e>this._metrics.maxSearchLatencyMs&&(this._metrics.maxSearchLatencyMs=e);let r=this._metrics.totalSearches;this._metrics.avgSearchLatencyMs=this._metrics.avgSearchLatencyMs*((r-1)/r)+e/r}}});function X(i,e){let r=Array.from({length:e},()=>new Float64Array(e));for(let t=0;t<e;t++){let n=i[t].length;r[t][t]=n;for(let a of i[t])r[t][a]=-1}return r}function N(i,e){let r=e.length,t=new Float64Array(r);for(let n=0;n<r;n++){let a=i[n].length;t[n]=a*e[n];for(let o of i[n])t[n]-=e[o]}return t}function H(i){let e=0;for(let r=0;r<i.length;r++)e+=i[r]*i[r];return Math.sqrt(e)}function R(i){let e=H(i);if(e>0)for(let r=0;r<i.length;r++)i[r]/=e}function v(i,e){let r=0;for(let t=0;t<i.length;t++)r+=i[t]*e[t];for(let t=0;t<i.length;t++)i[t]-=r*e[t]}function y(i,e,r=100,t=1e-6){if(e<=1)return 0;if(e===2)return i[0].includes(1)?2:0;let n=new Float64Array(e).fill(1/Math.sqrt(e)),a=new Float64Array(e);for(let l=0;l<e;l++)a[l]=Math.random()-.5;v(a,n),R(a);let o=0;for(let l=0;l<30;l++){let u=N(i,a);if(v(u,n),o=H(u),o>0)for(let h=0;h<e;h++)a[h]=u[h]/o}if(o<t)return 0;let c=new Float64Array(e);for(let l=0;l<e;l++)c[l]=Math.random()-.5;v(c,n),R(c);let s=0;for(let l=0;l<r;l++){let u=N(i,c),h=new Float64Array(e);for(let f=0;f<e;f++)h[f]=o*c[f]-u[f];v(h,n);let m=H(h);if(m<t)break;let x=m;for(let f=0;f<e;f++)c[f]=h[f]/m;if(Math.abs(x-s)<t)break;s=x}let d=o-s;return Math.max(0,d)}function F(i,e,r=100,t=1e-6){return y(i,e,r,t)}function C(i,e,r=50,t){if(e<=1)return 0;let n=t??y(i,e);if(n<1e-10)return 1/0;let o=2*Math.max(...i.map(d=>d.length),1),s=2*(Math.log(o/n)/(o-n));return Math.max(0,s)}function M(i,e,r){let t=1-Math.exp(-i/.05),n=1-Math.exp(-e/.5),a=r===1/0?0:1/(1+r/5),o=.4*t+.3*n+.3*a;return Math.max(0,Math.min(1,o))}var _=g(()=>{"use strict"});var ee={};ne(ee,{ALERT_THRESHOLDS:()=>fe,DEFAULT_HNSW_HEALTH_CONFIG:()=>Y,HnswHealthMonitor:()=>L,_resetNativeLoader:()=>be,approximateFiedlerValue:()=>y,approximateSpectralGap:()=>F,buildAdjacencyFromIndex:()=>Z,buildLaplacian:()=>X,computeCoherenceScore:()=>M,createHnswHealthMonitor:()=>ge,deflateVector:()=>v,estimateEffectiveResistance:()=>C,laplacianMultiply:()=>N,normalizeInPlace:()=>R,vectorNorm:()=>H});function pe(){return V?T:(V=!0,T=null,null)}function be(){T=null,V=!1}function Z(i,e=16,r){let t=i.size();if(t===0)return{adjacency:[],nodeCount:0,adjacencySource:"approximate"};let n=Array.from({length:t},()=>[]),a=Math.min(e,t-1);if(a===0)return{adjacency:n,nodeCount:t,adjacencySource:"approximate"};if(r&&r.size>0){let o=Array.from(r.keys()).slice(0,t),c=new Map;for(let s=0;s<o.length;s++)c.set(o[s],s);for(let s=0;s<o.length;s++){let d=r.get(o[s]);if(!d)continue;let l=i.search(d,a+1);for(let u of l){if(u.id===o[s])continue;let h=c.get(u.id);h!==void 0&&(n[s].includes(h)||n[s].push(h),n[h].includes(s)||n[h].push(s))}}return{adjacency:n,nodeCount:t,adjacencySource:"actual-search"}}console.warn("[HnswHealthMonitor] No stored vectors provided \u2014 using approximate circular adjacency. Pass stored vectors for accurate health metrics.");for(let o=0;o<t;o++)for(let c=0;c<a;c++){let s=(o+c+1)%t;n[o].includes(s)||n[o].push(s),n[s].includes(o)||n[s].push(o)}return{adjacency:n,nodeCount:t,adjacencySource:"approximate"}}function ge(i){return new L(i)}var Y,fe,T,V,L,te=g(()=>{"use strict";_();_();Y={fiedlerThreshold:.01,spectralGapThreshold:.1,resistanceThreshold:10,coherenceThreshold:.3,maxPowerIterations:100,convergenceTolerance:1e-6,resistanceSampleSize:50,maxHistoryEntries:200,minIndexSize:3},fe={FragileIndex:.01,PoorExpansion:.1,HighResistance:10,LowCoherence:.3},T=null,V=!1;L=class{config;alerts=[];history=[];lastReport=null;useNative=!1;nativeChecked=!1;constructor(e){this.config={...Y,...e}}checkHealth(e){let r=performance.now(),t=e.size();if(t<this.config.minIndexSize)return this.createSmallIndexReport(t,performance.now()-r);this.nativeChecked||(this.nativeChecked=!0,this.useNative=pe()!==null);let{adjacency:n,nodeCount:a,adjacencySource:o}=Z(e),c=this.useNative?this.computeNativeMetrics(n):this.computeApproximateMetrics(n,a),s=this.generateAlerts(c);this.alerts.length=0,this.alerts.push(...s);let d=performance.now()-r,l={healthy:s.length===0,metrics:c,alerts:s,indexSize:t,usedNativeBackend:this.useNative,adjacencySource:o,checkDurationMs:d,checkedAt:new Date};return this.addHistoryPoint({coherenceScore:c.coherenceScore,fiedlerValue:c.fiedlerValue,indexSize:t,healthy:l.healthy,timestamp:l.checkedAt}),this.lastReport=l,l}getAlerts(){return[...this.alerts]}getMetricsHistory(e){let r=[...this.history];return e!==void 0&&e<r.length?r.slice(-e):r}isHealthy(){return this.lastReport===null?!0:this.lastReport.healthy}getLastReport(){return this.lastReport}clearHistory(){this.history.length=0,this.alerts.length=0,this.lastReport=null}computeNativeMetrics(e){let r=T,t=r.computeFiedlerValue(e),n=r.computeSpectralGap(e),a=r.computeEffectiveResistance(e),o=M(t,n,a);return{fiedlerValue:t,spectralGap:n,effectiveResistance:a,coherenceScore:o}}computeApproximateMetrics(e,r){let t=y(e,r,this.config.maxPowerIterations,this.config.convergenceTolerance),n=F(e,r,this.config.maxPowerIterations,this.config.convergenceTolerance),a=C(e,r,this.config.resistanceSampleSize,t),o=M(t,n,a);return{fiedlerValue:t,spectralGap:n,effectiveResistance:a,coherenceScore:o}}generateAlerts(e){let r=[],t=new Date;return e.fiedlerValue<this.config.fiedlerThreshold&&r.push({type:"FragileIndex",message:`Fiedler value ${e.fiedlerValue.toFixed(6)} is below threshold ${this.config.fiedlerThreshold}. The index graph has weak algebraic connectivity.`,value:e.fiedlerValue,threshold:this.config.fiedlerThreshold,timestamp:t}),e.spectralGap<this.config.spectralGapThreshold&&r.push({type:"PoorExpansion",message:`Spectral gap ${e.spectralGap.toFixed(6)} is below threshold ${this.config.spectralGapThreshold}. The index graph has poor expansion properties.`,value:e.spectralGap,threshold:this.config.spectralGapThreshold,timestamp:t}),e.effectiveResistance>this.config.resistanceThreshold&&r.push({type:"HighResistance",message:`Average effective resistance ${e.effectiveResistance.toFixed(4)} exceeds threshold ${this.config.resistanceThreshold}. Nodes are poorly connected.`,value:e.effectiveResistance,threshold:this.config.resistanceThreshold,timestamp:t}),e.coherenceScore<this.config.coherenceThreshold&&r.push({type:"LowCoherence",message:`Coherence score ${e.coherenceScore.toFixed(4)} is below threshold ${this.config.coherenceThreshold}. Overall index health is degraded.`,value:e.coherenceScore,threshold:this.config.coherenceThreshold,timestamp:t}),r}createSmallIndexReport(e,r){let t={fiedlerValue:e>0?1:0,spectralGap:e>0?1:0,effectiveResistance:e>0?.5:0,coherenceScore:e>0?1:0},n={healthy:!0,metrics:t,alerts:[],indexSize:e,usedNativeBackend:!1,adjacencySource:"approximate",checkDurationMs:r,checkedAt:new Date};return this.addHistoryPoint({coherenceScore:t.coherenceScore,fiedlerValue:t.fiedlerValue,indexSize:e,healthy:!0,timestamp:n.checkedAt}),this.lastReport=n,n}addHistoryPoint(e){this.history.push(e),this.history.length>this.config.maxHistoryEntries&&this.history.splice(0,this.history.length-this.config.maxHistoryEntries)}}});var ve,p,re,ye=g(()=>{B();Q();ie();ve={patterns:{dimensions:384,M:16,efConstruction:200,efSearch:100,metric:"cosine"},"qe-memory":{dimensions:384,M:16,efConstruction:200,efSearch:100,metric:"cosine"},learning:{dimensions:384,M:16,efConstruction:200,efSearch:50,metric:"cosine"},coverage:{dimensions:384,M:16,efConstruction:200,efSearch:100,metric:"cosine"}},p=new Map,re=class i{backend;_isNativeBackend;indexName;stringToNumericId=new Map;numericToStringId=new Map;nextAutoId=0;healthMonitor=null;healthMonitorLoaded=!1;operationsSinceLastCheck=0;healthCheckFrequency=100;lastHealthReport=null;constructor(e,r){this.indexName=e;let n={...ve[e]??{},...r},{backend:a,isNative:o}=i.createBackend(n);this.backend=a,this._isNativeBackend=o}add(e,r,t){this.backend.add(e,r,t),this.maybeRunHealthCheck()}search(e,r){let t=performance.now(),n=this.backend.search(e,r),a=performance.now()-t;return a>50&&console.warn(`[HNSW] search took ${a.toFixed(1)}ms (k=${r}, results=${n.length})`),this._lastSearchLatencyMs=a,n}_lastSearchLatencyMs=0;get lastSearchLatencyMs(){return this._lastSearchLatencyMs}remove(e){return this.backend.remove(e)}size(){return this.backend.size()}dimensions(){return this.backend.dimensions()}recall(){return this.backend.recall()}addByStringId(e,r){let t=this.stringToNumericId.get(e);t!==void 0?this.backend.remove(t):(t=this.nextAutoId++,this.stringToNumericId.set(e,t),this.numericToStringId.set(t,e)),this.backend.add(t,new Float32Array(r))}searchByArray(e,r){return this.backend.search(new Float32Array(e),r).map(n=>({id:this.numericToStringId.get(n.id)??String(n.id),score:n.score}))}removeByStringId(e){let r=this.stringToNumericId.get(e);if(r===void 0)return!1;let t=this.backend.remove(r);return t&&(this.stringToNumericId.delete(e),this.numericToStringId.delete(r)),t}clear(){this.backend.clear?.(),this.stringToNumericId.clear(),this.numericToStringId.clear(),this.nextAutoId=0}dispose(){try{this.backend.dispose?.()}catch{}this.stringToNumericId.clear(),this.numericToStringId.clear(),this.nextAutoId=0}isRuvectorAvailable(){return this.backend instanceof S?this.backend.isRuvectorAvailable():this.backend instanceof w?this.backend.isNativeAvailable():!1}isNativeBackend(){return this._isNativeBackend}getName(){return this.indexName}setHealthCheckFrequency(e){this.healthCheckFrequency=Math.max(1,e)}getHealthCheckFrequency(){return this.healthCheckFrequency}getLastHealthReport(){return this.lastHealthReport}getHealthMonitor(){return this.healthMonitor}maybeRunHealthCheck(){if($()&&(this.operationsSinceLastCheck++,!(this.operationsSinceLastCheck<this.healthCheckFrequency)&&(this.operationsSinceLastCheck=0,this.ensureHealthMonitor(),this.healthMonitor)))try{this.lastHealthReport=this.healthMonitor.checkHealth(this.backend),this.lastHealthReport.healthy||console.warn(`[HNSW-Health] Index "${this.indexName}" health check failed: ${this.lastHealthReport.alerts.length} alert(s). Coherence: ${this.lastHealthReport.metrics.coherenceScore.toFixed(3)}`)}catch(e){console.warn(`[HNSW-Health] Health check error for "${this.indexName}":`,e)}}ensureHealthMonitor(){if(!this.healthMonitorLoaded){this.healthMonitorLoaded=!0;try{let e=(te(),W(ee));this.healthMonitor=e.createHnswHealthMonitor()}catch(e){process.env.DEBUG&&console.debug("[HNSW-Health] Monitor module unavailable:",e instanceof Error?e.message:e),this.healthMonitor=null}}}static createBackend(e){if(D())try{return{backend:new w(e),isNative:!0}}catch(r){r instanceof b?console.info(`[HNSW] Native backend unavailable, falling back to JS: ${r.message}`):console.warn("[HNSW] Unexpected error creating native backend, falling back to JS:",r)}return{backend:new S(e),isNative:!1}}static create(e,r){let t=p.get(e);if(t instanceof i)return t;let n=new i(e,r);return p.set(e,n),n}static get(e){let r=p.get(e);return r instanceof i?r:void 0}static close(e){let r=p.get(e);r instanceof i&&r.dispose(),p.delete(e)}static closeAll(){for(let[e]of p)i.close(e);p.clear()}static listIndexes(){return Array.from(p.keys())}}});export{re as a,ye 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.12");process.exit(0)}
2
- import{e as U,h as W,i as G}from"./chunk-OHVYINGM.js";import{b as F}from"./chunk-JGIJPDGD.js";import{o as j,q as V}from"./chunk-N7O3PF6Y.js";import{b as D,c as $,d as Y}from"./chunk-ZROAMFX2.js";import{a as T,e as N}from"./chunk-W4II6SIH.js";N();Y();import*as C from"fs";import*as b from"path";import*as H from"yaml";var z=5,X=4,Z=3e4,ee=".claude/skills",te=5e3,se=500,K=100,re=1e3,q=500,ne=.8,ae=.2,ie=.1,w=.1,oe=.1,le=.1,ce=.1,ue=200,de=500,pe=300,me=1,ge=.9,Q={maxWorkers:z,batchSize:X,retryFailedTests:!0,timeout:Z,skillsDir:ee,progressIntervalMs:te},S=class{async execute(e,r,s){let t=$(K,se+K);return await new Promise(i=>setTimeout(i,t)),{output:this.generateMockResponse(e),tokensUsed:D(q,re+q),durationMs:t}}generateMockResponse(e){let r=[];return e.includes("alt")&&r.push("alt","1.1.1","perceivable"),e.includes("contrast")&&r.push("contrast","1.4.3","4.5:1"),e.includes("keyboard")&&r.push("keyboard","2.1.1","operable","button"),e.includes("label")&&r.push("label","3.3.2","understandable"),e.includes("ARIA")&&r.push("ARIA","4.1.2","robust"),e.includes("focus")&&r.push("focus","2.4.7","outline"),e.includes("lang")&&r.push("lang","3.1.1","language"),e.includes("caption")&&r.push("caption","1.2.2","track"),e.includes("accessible")&&r.push("accessible","compliant"),r.length===0&&r.push("accessibility","WCAG","finding"),`Analysis complete. Found issues related to: ${r.join(", ")}.
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{e as U,h as W,i as G}from"./chunk-TCBBNUBP.js";import{b as F}from"./chunk-YSZ5OE3Z.js";import{o as j,q as V}from"./chunk-SSU73QAX.js";import{b as D,c as $,d as Y}from"./chunk-KV4T4MXK.js";import{a as T,e as N}from"./chunk-3Y2ROSCL.js";N();Y();import*as C from"fs";import*as b from"path";import*as H from"yaml";var z=5,X=4,Z=3e4,ee=".claude/skills",te=5e3,se=500,K=100,re=1e3,q=500,ne=.8,ae=.2,ie=.1,w=.1,oe=.1,le=.1,ce=.1,ue=200,de=500,pe=300,me=1,ge=.9,Q={maxWorkers:z,batchSize:X,retryFailedTests:!0,timeout:Z,skillsDir:ee,progressIntervalMs:te},S=class{async execute(e,r,s){let t=$(K,se+K);return await new Promise(i=>setTimeout(i,t)),{output:this.generateMockResponse(e),tokensUsed:D(q,re+q),durationMs:t}}generateMockResponse(e){let r=[];return e.includes("alt")&&r.push("alt","1.1.1","perceivable"),e.includes("contrast")&&r.push("contrast","1.4.3","4.5:1"),e.includes("keyboard")&&r.push("keyboard","2.1.1","operable","button"),e.includes("label")&&r.push("label","3.3.2","understandable"),e.includes("ARIA")&&r.push("ARIA","4.1.2","robust"),e.includes("focus")&&r.push("focus","2.4.7","outline"),e.includes("lang")&&r.push("lang","3.1.1","language"),e.includes("caption")&&r.push("caption","1.2.2","track"),e.includes("accessible")&&r.push("accessible","compliant"),r.length===0&&r.push("accessibility","WCAG","finding"),`Analysis complete. Found issues related to: ${r.join(", ")}.
3
3
  Recommendations: Implement proper ${r[0]} attributes for better accessibility.
4
4
  Severity: ${e.includes("critical")?"critical":"serious"}`}},P=class{constructor(e,r,s){this.executor=r;this.config=s;this.id=e}executor;config;id;status="idle";tasksCompleted=0;tasksFailed=0;lastHeartbeat=Date.now();async executeBatch(e){this.status="running";let r=[];for(let s of e){this.lastHeartbeat=Date.now();try{let t=await this.executeTestCase(s);if(r.push(t),t.passed)this.tasksCompleted++;else if(this.tasksFailed++,this.config.retryFailedTests&&!t.passed){let a=await this.executeTestCase(s,!0);a.passed&&(r[r.length-1]=a,this.tasksCompleted++,this.tasksFailed--)}}catch(t){this.tasksFailed++,r.push({testId:s.testCaseId,passed:!1,expectedPatterns:s.testCase.expected_output.must_contain||[],actualPatterns:[],reasoningQuality:0,category:s.testCase.category,priority:s.testCase.priority,error:T(t)})}}return this.status="idle",r}async executeTestCase(e,r=!1){let s=Date.now(),t=this.buildPrompt(e),a=await this.executor.execute(t,e.model,{timeout:this.config.timeout}),i=this.validateResponse(a.output,e.testCase.expected_output,e.testCase.validation);return{testId:e.testCaseId,passed:i.passed,expectedPatterns:e.testCase.expected_output.must_contain||[],actualPatterns:i.foundPatterns,reasoningQuality:i.reasoningQuality,executionTimeMs:Date.now()-s,category:e.testCase.category,priority:e.testCase.priority,error:i.error}}buildPrompt(e){let{testCase:r}=e,s=r.input.context;return`Analyze the following ${s.language||"HTML"} code for accessibility issues.
5
5
  Context: ${s.description||r.description}
@@ -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.12");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.13");process.exit(0)}
2
2
  function M(u){let e=u|0;return()=>{e=e+1831565813|0;let n=Math.imul(e^e>>>15,1|e);return n=n+Math.imul(n^n>>>7,61|n)^n,((n^n>>>14)>>>0)/4294967296}}var A=2,y=10,x=200,p=1e-8,b=class{epsilon;seed;constructor(e){if(this.epsilon=e?.epsilon??.3,this.seed=e?.seed,this.epsilon<=0||this.epsilon>=1)throw new Error("SparsifierConfig.epsilon must be in (0, 1)")}sparsify(e){if(e.nodeCount<=0||e.edges.length===0)return{nodeCount:e.nodeCount,edges:[]};let n=this.seed!==void 0?M(this.seed):Math.random,t=this.approximateEffectiveResistances(e),i=e.nodeCount,r=e.edges.length,o=Math.max(1,Math.log(i)),m=this.epsilon*this.epsilon,l=Math.min(r,Math.max(i-1,A*(i-1)*(1-this.epsilon))),s=new Float64Array(r),c=0;for(let a=0;a<r;a++){let d=e.edges[a][2];s[a]=d*t[a],c+=s[a]}if(c<=0)return{nodeCount:e.nodeCount,edges:[]};let f=[];for(let a=0;a<r;a++){let[d,C,E]=e.edges[a],g=Math.min(1,s[a]/c*l);if(n()<g){let w=E/g;f.push([d,C,w])}}return{nodeCount:e.nodeCount,edges:f}}validateSpectral(e,n){let t=Math.min(y,Math.max(1,e.nodeCount-1)),i=this.computeLaplacian(e),r=this.computeLaplacian(n),o=this.computeTopEigenvalues(i,t),m=this.computeTopEigenvalues(r,t),l=[],s=!0,c=this.epsilon;for(let f=0;f<o.length;f++){if(o[f]<1e-10)continue;let a=m[f]/o[f];l.push(a),(a<1-c||a>1+c)&&(s=!1)}return{isValid:s,eigenvalueRatios:l,originalEdgeCount:e.edges.length,sparsifiedEdgeCount:n.edges.length,compressionRatio:e.edges.length>0?n.edges.length/e.edges.length:0}}computeLaplacian(e){let n=e.nodeCount,t=Array.from({length:n},()=>new Array(n).fill(0));for(let[i,r,o]of e.edges)i<0||i>=n||r<0||r>=n||(t[i][i]+=o,t[r][r]+=o,t[i][r]-=o,t[r][i]-=o);return t}computeTopEigenvalues(e,n){let t=e.length;if(t===0)return[];let i=[],r=[],o=e.map(m=>[...m]);for(let m=0;m<Math.min(n,t);m++){let l=this.powerIteration(o,t,r);if(l===null)break;i.push(l.eigenvalue),r.push(l.eigenvector),V(o,l.eigenvalue,l.eigenvector)}return i}approximateEffectiveResistances(e){let n=e.nodeCount,t=new Float64Array(n);for(let[r,o,m]of e.edges)r>=0&&r<n&&(t[r]+=m),o>=0&&o<n&&(t[o]+=m);let i=new Array(e.edges.length);for(let r=0;r<e.edges.length;r++){let[o,m]=e.edges[r],l=t[o]||1,s=t[m]||1;i[r]=1/l+1/s}return i}powerIteration(e,n,t){let i=0;for(let s=0;s<n;s++)for(let c=0;c<n;c++)i+=e[s][c]*e[s][c];if(i<p*p)return null;let r=t.length,o=new Array(n);for(let s=0;s<n;s++)o[s]=Math.sin((s+1)*(r+1)*1.618033988749895)+.1*(s-n/2);for(let s of t)h(o,s);if(R(o)<p)return null;let l=0;for(let s=0;s<x;s++){let c=L(e,o);for(let d of t)h(c,d);let f=S(c,o),a=v(c);if(a<p)return{eigenvalue:0,eigenvector:o};for(let d=0;d<n;d++)o[d]=c[d]/a;if(Math.abs(f-l)<p){l=f;break}l=f}return{eigenvalue:Math.abs(l),eigenvector:o}}};function L(u,e){let n=u.length,t=new Array(n).fill(0);for(let i=0;i<n;i++){let r=0;for(let o=0;o<n;o++)r+=u[i][o]*e[o];t[i]=r}return t}function v(u){let e=0;for(let n=0;n<u.length;n++)e+=u[n]*u[n];return Math.sqrt(e)}function R(u){let e=v(u);if(e>0)for(let n=0;n<u.length;n++)u[n]/=e;return e}function S(u,e){let n=0;for(let t=0;t<u.length;t++)n+=u[t]*e[t];return n}function h(u,e){let n=S(u,e);for(let t=0;t<u.length;t++)u[t]-=n*e[t]}function V(u,e,n){let t=n.length;for(let i=0;i<t;i++)for(let r=0;r<t;r++)u[i][r]-=e*n[i]*n[r]}export{b as a};
@@ -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.12");process.exit(0)}
2
- import{b as L,d as B}from"./chunk-DZGPUGUG.js";import*as a from"fs";import*as v from"path";import{createRequire as K}from"node:module";var Z=K(import.meta.url),b=Z("semver"),F="3.15.12",y=t=>typeof t=="string"&&b.valid(t)===t.split("+")[0],E=t=>b.validRange(t)!==null,x=(t,e)=>b.satisfies(t,e),C=(t,e)=>b.compare(t,e),N=(t,e)=>C(e,t)||t.localeCompare(e);B();var R=class{cacheDir;keepVersions;constructor(e={}){this.cacheDir=e.cacheDir??L("plugins"),this.keepVersions=e.keepVersions??2}has(e,n){let s=this.versionDir(e,n);return a.existsSync(s)&&a.existsSync(v.join(s,"qe-plugin.json"))}get(e,n){if(!this.has(e,n))return;let s=this.versionDir(e,n),i=a.readFileSync(v.join(s,"qe-plugin.json"),"utf-8"),r=JSON.parse(i),l=a.statSync(s);return{manifest:r,path:s,cachedAt:l.birthtime.toISOString()}}store(e,n){let s=this.versionDir(e.name,e.version);if(a.existsSync(s))return s;a.mkdirSync(s,{recursive:!0});try{this.copyDir(n,s),a.writeFileSync(v.join(s,"qe-plugin.json"),JSON.stringify(e,null,2))}catch(i){throw a.rmSync(s,{recursive:!0,force:!0}),i}return this.pruneOldVersions(e.name),s}remove(e,n){let s=this.versionDir(e,n);return a.existsSync(s)?(a.rmSync(s,{recursive:!0,force:!0}),!0):!1}listVersions(e){let n=v.join(this.cacheDir,e);if(!a.existsSync(n))return[];let s=[],i=a.readdirSync(n);for(let r of i){let l=v.join(n,r),d=v.join(l,"qe-plugin.json");if(a.existsSync(d))try{let p=a.readFileSync(d,"utf-8"),m=JSON.parse(p);if(!y(m.version)){console.warn(`[PluginCache] Skipping cached plugin ${e}@${r}: invalid version ${JSON.stringify(m.version)}`);continue}let c=a.statSync(l);s.push({manifest:m,path:l,cachedAt:c.birthtime.toISOString()})}catch{}}return s}listAll(){if(!a.existsSync(this.cacheDir))return[];let e=[],n=a.readdirSync(this.cacheDir);for(let s of n){let i=this.listVersions(s);i.length>0&&(i.sort((r,l)=>N(r.manifest.version,l.manifest.version)),e.push(i[0]))}return e}listCandidates(){return a.existsSync(this.cacheDir)?a.readdirSync(this.cacheDir).flatMap(e=>this.listVersions(e)):[]}versionDir(e,n){return v.join(this.cacheDir,e,n)}pruneOldVersions(e){let n=this.listVersions(e);if(n.length<=this.keepVersions)return;n.sort((i,r)=>i.cachedAt.localeCompare(r.cachedAt));let s=n.slice(0,n.length-this.keepVersions);for(let i of s)a.rmSync(i.path,{recursive:!0,force:!0})}copyDir(e,n){if(!a.existsSync(e))return;let s=a.readdirSync(e,{withFileTypes:!0});for(let i of s){let r=v.join(e,i.name),l=v.join(n,i.name);if(i.isDirectory()){if(i.name===".git"||i.name==="node_modules")continue;a.mkdirSync(l,{recursive:!0}),this.copyDir(r,l)}else a.copyFileSync(r,l)}}};var ee=/^[a-z][a-z0-9-]*$/,se=["aqe-core-","agentic-qe-core-"],G=64,T=500;function k(t){let e=[],n=[];if(!t||typeof t!="object")return{valid:!1,errors:["Manifest must be a non-null object"],warnings:[]};let s=t;if(!s.name||typeof s.name!="string"?e.push("name is required and must be a string"):ne(s.name,e,n),!s.version||typeof s.version!="string"?e.push("version is required and must be a string"):y(s.version)||e.push(`version "${s.version}" is not valid semver (expected: major.minor.patch)`),!s.description||typeof s.description!="string"?e.push("description is required and must be a string"):s.description.length>T&&n.push(`description exceeds ${T} characters`),(!s.author||typeof s.author!="string")&&e.push("author is required and must be a string"),!Array.isArray(s.domains)||s.domains.length===0)e.push("domains is required and must be a non-empty array");else for(let i of s.domains)if(typeof i!="string"){e.push("Each domain must be a string");break}if(!s.entryPoint||typeof s.entryPoint!="string"?e.push("entryPoint is required and must be a string"):te(s.entryPoint,e),s.dependencies!==void 0)if(typeof s.dependencies!="object"||s.dependencies===null||Array.isArray(s.dependencies))e.push("dependencies must be an object mapping plugin names to semver ranges");else for(let[i,r]of Object.entries(s.dependencies))typeof r!="string"?e.push(`Dependency "${i}" must have a string version range`):E(r)||e.push(`Dependency "${i}" has an invalid semver range`);if(s.hooks!==void 0)if(typeof s.hooks!="object"||s.hooks===null||Array.isArray(s.hooks))e.push("hooks must be an object mapping event names to handler paths");else for(let[,i]of Object.entries(s.hooks)){if(typeof i!="string"){e.push("Hook handler paths must be strings");break}i.includes("..")&&e.push(`Hook handler path "${i}" must not contain ".." (path traversal)`)}if(s.minAqeVersion!==void 0&&(typeof s.minAqeVersion!="string"||!y(s.minAqeVersion))&&e.push("minAqeVersion must be valid semver"),s.permissions!==void 0){if(!Array.isArray(s.permissions))e.push("permissions must be an array of strings");else for(let i of s.permissions)if(typeof i!="string"){e.push("Each permission must be a string");break}}return{valid:e.length===0,errors:e,warnings:n}}function U(t){let e=typeof t=="string"?JSON.parse(t):t,n=k(e);if(!n.valid)throw new Error(`Invalid plugin manifest:
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 L,d as B}from"./chunk-J2ZIFFM6.js";import*as a from"fs";import*as v from"path";import{createRequire as K}from"node:module";var Z=K(import.meta.url),b=Z("semver"),F="3.15.13",y=t=>typeof t=="string"&&b.valid(t)===t.split("+")[0],E=t=>b.validRange(t)!==null,x=(t,e)=>b.satisfies(t,e),C=(t,e)=>b.compare(t,e),N=(t,e)=>C(e,t)||t.localeCompare(e);B();var R=class{cacheDir;keepVersions;constructor(e={}){this.cacheDir=e.cacheDir??L("plugins"),this.keepVersions=e.keepVersions??2}has(e,n){let s=this.versionDir(e,n);return a.existsSync(s)&&a.existsSync(v.join(s,"qe-plugin.json"))}get(e,n){if(!this.has(e,n))return;let s=this.versionDir(e,n),i=a.readFileSync(v.join(s,"qe-plugin.json"),"utf-8"),r=JSON.parse(i),l=a.statSync(s);return{manifest:r,path:s,cachedAt:l.birthtime.toISOString()}}store(e,n){let s=this.versionDir(e.name,e.version);if(a.existsSync(s))return s;a.mkdirSync(s,{recursive:!0});try{this.copyDir(n,s),a.writeFileSync(v.join(s,"qe-plugin.json"),JSON.stringify(e,null,2))}catch(i){throw a.rmSync(s,{recursive:!0,force:!0}),i}return this.pruneOldVersions(e.name),s}remove(e,n){let s=this.versionDir(e,n);return a.existsSync(s)?(a.rmSync(s,{recursive:!0,force:!0}),!0):!1}listVersions(e){let n=v.join(this.cacheDir,e);if(!a.existsSync(n))return[];let s=[],i=a.readdirSync(n);for(let r of i){let l=v.join(n,r),d=v.join(l,"qe-plugin.json");if(a.existsSync(d))try{let p=a.readFileSync(d,"utf-8"),m=JSON.parse(p);if(!y(m.version)){console.warn(`[PluginCache] Skipping cached plugin ${e}@${r}: invalid version ${JSON.stringify(m.version)}`);continue}let c=a.statSync(l);s.push({manifest:m,path:l,cachedAt:c.birthtime.toISOString()})}catch{}}return s}listAll(){if(!a.existsSync(this.cacheDir))return[];let e=[],n=a.readdirSync(this.cacheDir);for(let s of n){let i=this.listVersions(s);i.length>0&&(i.sort((r,l)=>N(r.manifest.version,l.manifest.version)),e.push(i[0]))}return e}listCandidates(){return a.existsSync(this.cacheDir)?a.readdirSync(this.cacheDir).flatMap(e=>this.listVersions(e)):[]}versionDir(e,n){return v.join(this.cacheDir,e,n)}pruneOldVersions(e){let n=this.listVersions(e);if(n.length<=this.keepVersions)return;n.sort((i,r)=>i.cachedAt.localeCompare(r.cachedAt));let s=n.slice(0,n.length-this.keepVersions);for(let i of s)a.rmSync(i.path,{recursive:!0,force:!0})}copyDir(e,n){if(!a.existsSync(e))return;let s=a.readdirSync(e,{withFileTypes:!0});for(let i of s){let r=v.join(e,i.name),l=v.join(n,i.name);if(i.isDirectory()){if(i.name===".git"||i.name==="node_modules")continue;a.mkdirSync(l,{recursive:!0}),this.copyDir(r,l)}else a.copyFileSync(r,l)}}};var ee=/^[a-z][a-z0-9-]*$/,se=["aqe-core-","agentic-qe-core-"],G=64,T=500;function k(t){let e=[],n=[];if(!t||typeof t!="object")return{valid:!1,errors:["Manifest must be a non-null object"],warnings:[]};let s=t;if(!s.name||typeof s.name!="string"?e.push("name is required and must be a string"):ne(s.name,e,n),!s.version||typeof s.version!="string"?e.push("version is required and must be a string"):y(s.version)||e.push(`version "${s.version}" is not valid semver (expected: major.minor.patch)`),!s.description||typeof s.description!="string"?e.push("description is required and must be a string"):s.description.length>T&&n.push(`description exceeds ${T} characters`),(!s.author||typeof s.author!="string")&&e.push("author is required and must be a string"),!Array.isArray(s.domains)||s.domains.length===0)e.push("domains is required and must be a non-empty array");else for(let i of s.domains)if(typeof i!="string"){e.push("Each domain must be a string");break}if(!s.entryPoint||typeof s.entryPoint!="string"?e.push("entryPoint is required and must be a string"):te(s.entryPoint,e),s.dependencies!==void 0)if(typeof s.dependencies!="object"||s.dependencies===null||Array.isArray(s.dependencies))e.push("dependencies must be an object mapping plugin names to semver ranges");else for(let[i,r]of Object.entries(s.dependencies))typeof r!="string"?e.push(`Dependency "${i}" must have a string version range`):E(r)||e.push(`Dependency "${i}" has an invalid semver range`);if(s.hooks!==void 0)if(typeof s.hooks!="object"||s.hooks===null||Array.isArray(s.hooks))e.push("hooks must be an object mapping event names to handler paths");else for(let[,i]of Object.entries(s.hooks)){if(typeof i!="string"){e.push("Hook handler paths must be strings");break}i.includes("..")&&e.push(`Hook handler path "${i}" must not contain ".." (path traversal)`)}if(s.minAqeVersion!==void 0&&(typeof s.minAqeVersion!="string"||!y(s.minAqeVersion))&&e.push("minAqeVersion must be valid semver"),s.permissions!==void 0){if(!Array.isArray(s.permissions))e.push("permissions must be an array of strings");else for(let i of s.permissions)if(typeof i!="string"){e.push("Each permission must be a string");break}}return{valid:e.length===0,errors:e,warnings:n}}function U(t){let e=typeof t=="string"?JSON.parse(t):t,n=k(e);if(!n.valid)throw new Error(`Invalid plugin manifest:
3
3
  - ${n.errors.join(`
4
4
  - `)}`);return e}function ne(t,e,n){t.length>G&&e.push(`name must be ${G} characters or fewer`),ee.test(t)||e.push("name must be lowercase alphanumeric with hyphens, starting with a letter"),/[^\x00-\x7F]/.test(t)&&e.push("name must contain only ASCII characters");for(let s of se)t.startsWith(s)&&e.push(`name cannot start with reserved prefix "${s}"`);["plugin","test","tool"].includes(t)&&n.push(`name "${t}" is very generic \u2014 consider a more descriptive name`)}function te(t,e){t.includes("..")&&e.push('entryPoint must not contain ".." (path traversal)'),(t.startsWith("/")||t.startsWith("\\"))&&e.push("entryPoint must be a relative path"),!t.endsWith(".js")&&!t.endsWith(".ts")&&!t.endsWith(".mjs")&&e.push("entryPoint must end in .js, .ts, or .mjs")}var I=class{constructor(e=F){this.aqeVersion=e}aqeVersion;resolve(e,n){let s=new Map,i=new Map;for(let o of e){let u=s.get(o.name)??[];s.set(o.name,u);let f=this.validateVersions(o);f?i.set(o.name,[...i.get(o.name)??[],f]):u.push(o)}for(let o of s.values())o.sort((u,f)=>N(u.version,f.version));let r=new Map,l=[],d=o=>({ordered:o.map((u,f)=>({manifest:u,order:f})),missing:r,errors:l,selectedVersions:Object.fromEntries(o.map(u=>[u.name,u.version])),aqeVersion:this.aqeVersion}),p=[...n??s.keys()].sort(),m=new Set(p),c=new Map,_=0,h=!1,X=()=>{for(let o of c.values())for(let[u,f]of Object.entries(o.dependencies??{})){let g=c.get(u);if(!(g?[g]:s.get(u)??[]).some(M=>x(M.version,f)))return!1}return!0},A,z=()=>{let o=new Set,u=new Set,f=(g,P)=>{if(u.has(g))return[...P.slice(P.indexOf(g)),g];if(!o.has(g)){u.add(g);for(let M of Object.keys(c.get(g)?.dependencies??{})){let Q=f(M,[...P,g]);if(Q)return Q}u.delete(g),o.add(g)}};for(let g of c.keys()){let P=f(g,[]);if(P)return P}},j=()=>{let o=new Set(p);for(let f of c.values())for(let g of Object.keys(f.dependencies??{}))o.add(g);let u=[...o].sort().find(f=>!c.has(f));if(!u){let f=z();return f?(A=f,!1):!0}m.add(u);for(let f of s.get(u)??[]){if(++_>1e4)return h=!0,!1;if(c.set(u,f),X()&&j())return!0;if(c.delete(u),h)return!1}return!1};if(!j()){if(A&&!h)throw new Error(`Dependency cycle detected: ${A.join(" -> ")}`);for(let o of m)s.get(o)?.length||l.push(...i.get(o)??[]);for(let[o,u]of s){let f=[...new Set(u.flatMap(g=>Object.keys(g.dependencies??{})))].filter(g=>!s.has(g));f.length&&r.set(o,f)}return l.push({code:h?"RESOLUTION_LIMIT":r.size?"MISSING_DEPENDENCY":"UNSATISFIED_DEPENDENCY_RANGE",plugin:p.join(", "),message:h?"Plugin dependency search exceeded 10000 candidates":"No cached plugin selection satisfies all dependency ranges"}),d([])}let O=[],q=new Set,w=new Set,$=(o,u)=>{if(q.has(o))return;if(w.has(o))throw new Error(`Dependency cycle detected: ${[...u.slice(u.indexOf(o)),o].join(" -> ")}`);w.add(o);let f=c.get(o);for(let g of Object.keys(f.dependencies??{}))$(g,[...u,o]);w.delete(o),q.add(o),O.push(f)};for(let o of[...c.keys()].sort())$(o,[]);return d(O)}resolveAvailable(e){let n=[],s=this.resolve(e,[]),i=[],r=new Map;for(let l of[...new Set(e.map(d=>d.name))].sort())try{let d=this.resolve(e,[...n,l]);if(d.errors.length){i.push(...d.errors.map(p=>({...p,plugin:l})));for(let[p,m]of d.missing)r.set(p,m);continue}n.push(l),s=d}catch(d){i.push({code:"DEPENDENCY_CYCLE",plugin:l,message:d instanceof Error?d.message:String(d)})}return{...s,errors:i,missing:r}}canLoad(e,n){let s=Object.entries(e.dependencies??{}).filter(([i,r])=>{let l=n instanceof Set?void 0:n.get(i);return!l||!E(r)||!x(l,r)}).map(([i])=>i);return{canLoad:!this.validateVersions(e)&&s.length===0,missingDeps:s}}validateVersions(e){if(!y(e.version))return{code:"INVALID_PLUGIN_VERSION",plugin:e.name,message:"Invalid plugin version"};for(let n of Object.values(e.dependencies??{}))if(!E(n))return{code:"INVALID_DEPENDENCY_RANGE",plugin:e.name,message:"Invalid dependency range"};if(e.minAqeVersion&&(!y(e.minAqeVersion)||!y(this.aqeVersion)||C(this.aqeVersion,e.minAqeVersion)<0))return{code:"AQE_VERSION_INCOMPATIBLE",plugin:e.name,message:`Requires AQE ${e.minAqeVersion}; running ${this.aqeVersion}`}}};var ie=["aqe-core-","agentic-qe-core-","agentic-qe-internal-"],Y=new Set(["aqe","agentic-qe","ruflo","claude-flow"]),re=["..","~","/etc/","/proc/","/dev/","node_modules/"];function W(t){let e=[];return oe(t.name,e),ae(t.entryPoint,e),ce(t.hooks,e),ue(t.permissions,e),{safe:e.length===0,violations:e}}function oe(t,e){/[^\x20-\x7E]/.test(t)&&e.push(`Plugin name "${t}" contains non-ASCII characters`),Y.has(t.toLowerCase())&&e.push(`Plugin name "${t}" is a reserved name`);for(let s of ie)t.toLowerCase().startsWith(s)&&e.push(`Plugin name "${t}" uses reserved prefix "${s}"`);let n=t.toLowerCase().replace(/[0o]/g,"o").replace(/[1il]/g,"l").replace(/[-_]/g,"");Y.has(n)&&e.push(`Plugin name "${t}" is visually similar to a reserved name`)}function ae(t,e){H(t,"entryPoint",e),(t.startsWith("/")||t.startsWith("\\"))&&e.push("entryPoint must be a relative path, not absolute")}function ce(t,e){if(t)for(let[n,s]of Object.entries(t))H(s,`hook[${n}]`,e)}function H(t,e,n){for(let s of re)t.includes(s)&&n.push(`${e} contains dangerous path pattern "${s}"`);t.includes("\0")&&n.push(`${e} contains null byte (path injection attempt)`)}function ue(t,e){if(!t)return;let n=["fs:write-root","net:arbitrary","exec:shell"];for(let s of t)n.includes(s)&&e.push(`Plugin requests dangerous permission: ${s}`)}import*as S from"fs";import*as V from"path";var D=class{type="local";async resolve(e){let n=V.resolve(e),s=V.join(n,"qe-plugin.json");if(!S.existsSync(s))throw new Error(`No qe-plugin.json found at ${s}`);let i=S.readFileSync(s,"utf-8");return U(i)}async getPluginPath(e){let n=V.resolve(e);if(!S.existsSync(n))throw new Error(`Plugin directory does not exist: ${n}`);return n}};var J=class{cache;resolver;sources=new Map;constructor(e={}){this.cache=e.cache??new R,this.resolver=new I;let n=new D;if(this.sources.set("local",n),e.sources)for(let s of e.sources)this.sources.set(s.type,s)}async install(e,n="local"){if(process.env.AQE_PLUGINS_DISABLED==="true")return{success:!1,errors:["Plugin loading is disabled (AQE_PLUGINS_DISABLED=true)"],securityViolations:[]};let s=[],i=this.sources.get(n);if(!i)return{success:!1,errors:[`Unknown source type: ${n}. Available: ${[...this.sources.keys()].join(", ")}`],securityViolations:[]};let r;try{r=await i.resolve(e)}catch(c){return{success:!1,errors:[`Failed to resolve plugin: ${c instanceof Error?c.message:String(c)}`],securityViolations:[]}}let l=k(r);if(!l.valid)return{success:!1,manifest:r,errors:l.errors,securityViolations:[]};let d=W(r);if(!d.safe)return{success:!1,manifest:r,errors:["Plugin failed security checks"],securityViolations:d.violations};try{let c=this.cache.listCandidates().map(h=>h.manifest).filter(h=>h.name!==r.name),_=this.resolver.resolve([...c,r],[r.name]);if(_.errors.length)return{success:!1,manifest:r,errors:_.errors.map(h=>`${h.code}: ${h.message}`),securityViolations:[]}}catch(c){return{success:!1,manifest:r,errors:[c instanceof Error?c.message:String(c)],securityViolations:[]}}if(this.cache.has(r.name,r.version)){let c=this.cache.get(r.name,r.version);return{success:!0,manifest:r,cachePath:c.path,errors:[],securityViolations:[]}}let p;try{p=await i.getPluginPath(e)}catch(c){return{success:!1,manifest:r,errors:[`Failed to get plugin path: ${c instanceof Error?c.message:String(c)}`],securityViolations:[]}}let m=this.cache.store(r,p);return{success:!0,manifest:r,cachePath:m,errors:s,securityViolations:[]}}remove(e,n){if(n)return this.cache.remove(e,n);let s=this.cache.listVersions(e),i=!1;for(let r of s)this.cache.remove(e,r.manifest.version)&&(i=!0);return i}list(){return this.cache.listAll().map(n=>({name:n.manifest.name,version:n.manifest.version,description:n.manifest.description,domains:n.manifest.domains,source:"cached",cachePath:n.path}))}resolveLoadOrder(){let e=this.cache.listCandidates();return this.resolver.resolveAvailable(e.map(n=>n.manifest))}registerSource(e){this.sources.set(e.type,e)}};export{U as a,R as b,J as c};
@@ -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.12");process.exit(0)}
2
- import{b as c,d as f,e as g,f as X}from"./chunk-L7NGKANW.js";import{createHash as I}from"crypto";import{existsSync as O,readFileSync as b,writeFileSync as D,openSync as F,writeSync as y,closeSync as S}from"fs";X();var U=[`CREATE TABLE IF NOT EXISTS qe_patterns (
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 c,d as f,e as g,f as X}from"./chunk-3Y7TJFHU.js";import{createHash as I}from"crypto";import{existsSync as O,readFileSync as b,writeFileSync as D,openSync as F,writeSync as y,closeSync as S}from"fs";X();var U=[`CREATE TABLE IF NOT EXISTS qe_patterns (
3
3
  id TEXT PRIMARY KEY, pattern_type TEXT NOT NULL, qe_domain TEXT NOT NULL,
4
4
  domain TEXT NOT NULL, name TEXT NOT NULL, description TEXT,
5
5
  confidence REAL DEFAULT 0.5, usage_count INTEGER DEFAULT 0,
@@ -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.12");process.exit(0)}
2
- import{e as l,l as c}from"./chunk-KJDI5CHX.js";import{a as i}from"./chunk-PX5OPXY6.js";import{a as n,e as h}from"./chunk-W4II6SIH.js";h();var d=class extends c{config={name:"qe/tests/schedule",description:"Schedule and execute tests using phase-based pipeline with git-aware selection and flaky tracking. Runs tests in phases (unit, integration, e2e), selects affected tests from git changes, and tracks flaky tests.",domain:"test-execution",schema:this.buildSchema()};buildSchema(){return{type:"object",properties:{cwd:{type:"string",description:"Working directory for test execution (defaults to project root)"},gitRef:{type:"string",description:'Git ref to compare for affected test selection (e.g., "main", "HEAD~3")'},useGitAware:{type:"boolean",description:"Enable git-aware test selection to only run affected tests",default:!0},trackFlaky:{type:"boolean",description:"Enable flaky test tracking and quarantine",default:!0}}}}async execute(s,o){if(s.gitRef!==void 0){let a=i(s.gitRef,"gitRef");if(a)return{success:!1,error:a}}try{let{runTestPipeline:a}=await import("./test-scheduling-VMVMVRHT.js"),u=await l(o),t=await a({cwd:s.cwd||process.cwd(),memory:u,baseRef:s.gitRef,flakyHistoryPath:s.trackFlaky!==!1?".agentic-qe/flaky-history.json":void 0,runAllTests:s.useGitAware===!1}),f=t.phaseResults.reduce((e,r)=>e+r.totalTests,0),p=t.phaseResults.reduce((e,r)=>e+r.passed,0),g=t.phaseResults.reduce((e,r)=>e+r.failed,0);return{success:!0,data:{pipelineId:o.requestId,phases:t.phaseResults.map(e=>({phaseId:e.phaseId,phaseName:e.phaseName,totalTests:e.totalTests,passed:e.passed,failed:e.failed,passRate:e.passRate,durationMs:e.durationMs})),gitAware:{enabled:!t.ranAllTests,selectedTests:t.selectedTests.length,gitRef:s.gitRef},flakyTracking:{enabled:s.trackFlaky!==!1},totalDuration:t.totalDurationMs,ranAllTests:t.ranAllTests,summary:`Executed ${t.phaseResults.length} phases, ${f} tests (${p} passed, ${g} failed) in ${t.totalDurationMs}ms`}}}catch(a){return{success:!1,error:n(a)}}}};export{d 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.13");process.exit(0)}
2
+ import{e as l,l as c}from"./chunk-UXZSUMEA.js";import{a as i}from"./chunk-JQGMW45H.js";import{a as n,e as h}from"./chunk-3Y2ROSCL.js";h();var d=class extends c{config={name:"qe/tests/schedule",description:"Schedule and execute tests using phase-based pipeline with git-aware selection and flaky tracking. Runs tests in phases (unit, integration, e2e), selects affected tests from git changes, and tracks flaky tests.",domain:"test-execution",schema:this.buildSchema()};buildSchema(){return{type:"object",properties:{cwd:{type:"string",description:"Working directory for test execution (defaults to project root)"},gitRef:{type:"string",description:'Git ref to compare for affected test selection (e.g., "main", "HEAD~3")'},useGitAware:{type:"boolean",description:"Enable git-aware test selection to only run affected tests",default:!0},trackFlaky:{type:"boolean",description:"Enable flaky test tracking and quarantine",default:!0}}}}async execute(s,o){if(s.gitRef!==void 0){let a=i(s.gitRef,"gitRef");if(a)return{success:!1,error:a}}try{let{runTestPipeline:a}=await import("./test-scheduling-HBOHVLI3.js"),u=await l(o),t=await a({cwd:s.cwd||process.cwd(),memory:u,baseRef:s.gitRef,flakyHistoryPath:s.trackFlaky!==!1?".agentic-qe/flaky-history.json":void 0,runAllTests:s.useGitAware===!1}),f=t.phaseResults.reduce((e,r)=>e+r.totalTests,0),p=t.phaseResults.reduce((e,r)=>e+r.passed,0),g=t.phaseResults.reduce((e,r)=>e+r.failed,0);return{success:!0,data:{pipelineId:o.requestId,phases:t.phaseResults.map(e=>({phaseId:e.phaseId,phaseName:e.phaseName,totalTests:e.totalTests,passed:e.passed,failed:e.failed,passRate:e.passRate,durationMs:e.durationMs})),gitAware:{enabled:!t.ranAllTests,selectedTests:t.selectedTests.length,gitRef:s.gitRef},flakyTracking:{enabled:s.trackFlaky!==!1},totalDuration:t.totalDurationMs,ranAllTests:t.ranAllTests,summary:`Executed ${t.phaseResults.length} phases, ${f} tests (${p} passed, ${g} failed) in ${t.totalDurationMs}ms`}}}catch(a){return{success:!1,error:n(a)}}}};export{d 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.12");process.exit(0)}
2
- import{l as m}from"./chunk-KJDI5CHX.js";import{a as l,e as d}from"./chunk-W4II6SIH.js";d();var c=class extends m{config={name:"qe/tests/load",description:"Run agent load tests to validate fleet scalability. Supports light, medium, and heavy workload profiles. Uses mock agents by default (safe); set mockMode=false to test with real fleet agents (requires fleet_init). Reports bottlenecks and pass/fail criteria.",domain:"test-execution",schema:this.buildSchema(),timeout:3e5};buildSchema(){return{type:"object",properties:{targetAgents:{type:"number",description:"Target number of concurrent agents to simulate",default:10,minimum:1,maximum:200},profile:{type:"string",description:"Workload profile: light, medium, or heavy",enum:["light","medium","heavy"],default:"medium"},durationMs:{type:"number",description:"Test duration in milliseconds",default:3e4,minimum:5e3,maximum:3e5},mockMode:{type:"boolean",description:"Use mock agents (true, default) or real fleet agents (false, requires fleet_init)",default:!0}}}}async execute(t,u){try{let{createAgentLoadTester:r}=await import("./load-XFVVLO7E.js"),a=t.profile||"medium",o=t.targetAgents||10,i=t.durationMs||3e4,n=t.mockMode!==!1,s=await r({maxAgents:o,workloadProfile:a,mockMode:n}).runTest(o,i),e=s.bottlenecks;return{success:!0,data:{testId:u.requestId,profile:a,targetAgents:o,duration:s.duration,mockMode:n,passed:s.success,bottleneckCount:e?.bottlenecks?.length??0,report:{overallSeverity:e?.overallSeverity??"none",hasCritical:e?.hasCritical??!1,checksPerformed:e?.summary?.totalChecks??0,bottlenecksDetected:e?.summary?.detected??0},summary:`Load test (${a}, ${n?"mock":"real"}): ${o} agents, ${i}ms \u2014 ${s.success?"PASSED":"FAILED"}`+(e?.hasCritical?" [CRITICAL BOTTLENECKS]":"")}}}catch(r){return{success:!1,error:l(r)}}}};export{c as a};
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.13");process.exit(0)}
2
+ import{l as m}from"./chunk-UXZSUMEA.js";import{a as l,e as d}from"./chunk-3Y2ROSCL.js";d();var c=class extends m{config={name:"qe/tests/load",description:"Run agent load tests to validate fleet scalability. Supports light, medium, and heavy workload profiles. Uses mock agents by default (safe); set mockMode=false to test with real fleet agents (requires fleet_init). Reports bottlenecks and pass/fail criteria.",domain:"test-execution",schema:this.buildSchema(),timeout:3e5};buildSchema(){return{type:"object",properties:{targetAgents:{type:"number",description:"Target number of concurrent agents to simulate",default:10,minimum:1,maximum:200},profile:{type:"string",description:"Workload profile: light, medium, or heavy",enum:["light","medium","heavy"],default:"medium"},durationMs:{type:"number",description:"Test duration in milliseconds",default:3e4,minimum:5e3,maximum:3e5},mockMode:{type:"boolean",description:"Use mock agents (true, default) or real fleet agents (false, requires fleet_init)",default:!0}}}}async execute(t,u){try{let{createAgentLoadTester:r}=await import("./load-ITHC564X.js"),a=t.profile||"medium",o=t.targetAgents||10,i=t.durationMs||3e4,n=t.mockMode!==!1,s=await r({maxAgents:o,workloadProfile:a,mockMode:n}).runTest(o,i),e=s.bottlenecks;return{success:!0,data:{testId:u.requestId,profile:a,targetAgents:o,duration:s.duration,mockMode:n,passed:s.success,bottleneckCount:e?.bottlenecks?.length??0,report:{overallSeverity:e?.overallSeverity??"none",hasCritical:e?.hasCritical??!1,checksPerformed:e?.summary?.totalChecks??0,bottlenecksDetected:e?.summary?.detected??0},summary:`Load test (${a}, ${n?"mock":"real"}): ${o} agents, ${i}ms \u2014 ${s.success?"PASSED":"FAILED"}`+(e?.hasCritical?" [CRITICAL BOTTLENECKS]":"")}}}catch(r){return{success:!1,error:l(r)}}}};export{c as a};