agentic-qe 3.12.0 → 3.12.2

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 (362) hide show
  1. package/.claude/skills/skills-manifest.json +1 -1
  2. package/CHANGELOG.md +83 -0
  3. package/assets/skills/skills-manifest.json +1 -1
  4. package/dist/cli/bundle.js +5 -5
  5. package/dist/cli/chunks/adapter-RL6GNUOS.js +2 -0
  6. package/dist/cli/chunks/{agent-booster-wasm-IO54X6IQ.js → agent-booster-wasm-3KYNICBC.js} +2 -2
  7. package/dist/cli/chunks/{agent-handler-A57SZUCW.js → agent-handler-NGPTMI6E.js} +2 -2
  8. package/dist/cli/chunks/{agent-memory-branch-BX7LRFGN.js → agent-memory-branch-GNTQKQMG.js} +2 -2
  9. package/dist/cli/chunks/aqe-learning-engine-UEEW6AQG.js +2 -0
  10. package/dist/cli/chunks/{arena-UTC4YY6Y.js → arena-HQEP2NWI.js} +4 -4
  11. package/dist/cli/chunks/{arena-Y3XTX6O7.js → arena-PA7VIYD4.js} +2 -2
  12. package/dist/cli/chunks/{audit-L4RL2AOY.js → audit-XSDM57GC.js} +3 -3
  13. package/dist/cli/chunks/base-JQA5YULE.js +2 -0
  14. package/dist/cli/chunks/{hnswlib-node-VS6L5VUG.js → better-sqlite3-RQCOOAZC.js} +2 -2
  15. package/dist/cli/chunks/{brain-handler-OHDPI5TQ.js → brain-handler-T7RDPKNM.js} +3 -3
  16. package/dist/cli/chunks/{branch-enumerator-ZRXE2CQ7.js → branch-enumerator-ZW7RNMUF.js} +2 -2
  17. package/dist/cli/chunks/{browser-NT33FG76.js → browser-4LU22CPP.js} +2 -2
  18. package/dist/cli/chunks/browser-workflow-XTKUHTIT.js +2 -0
  19. package/dist/cli/chunks/{chunk-XEYW3V5I.js → chunk-2L7K2J2T.js} +2 -2
  20. package/dist/cli/chunks/{chunk-VWJSWXHG.js → chunk-2R7J4ZGT.js} +1 -1
  21. package/dist/cli/chunks/{chunk-KZMRU7DL.js → chunk-2R7XZ2WP.js} +2 -2
  22. package/dist/cli/chunks/{chunk-2AR4B3DI.js → chunk-327YEKBU.js} +2 -2
  23. package/dist/cli/chunks/{chunk-HDJMD6UH.js → chunk-3AJUJAUJ.js} +1 -1
  24. package/dist/cli/chunks/{chunk-JOBCMNTP.js → chunk-3LELACAQ.js} +2 -2
  25. package/dist/cli/chunks/{chunk-JYX7AZHE.js → chunk-4FHJYJCH.js} +2 -2
  26. package/dist/cli/chunks/{chunk-KJWQ7ENF.js → chunk-4KEOBDEI.js} +2 -2
  27. package/dist/cli/chunks/{chunk-G6LR7FK7.js → chunk-56MXYSYY.js} +2 -2
  28. package/dist/cli/chunks/{chunk-5YGESYBC.js → chunk-5CGTBAVF.js} +1 -1
  29. package/dist/cli/chunks/{chunk-RZDNCTOA.js → chunk-5SM57X4D.js} +2 -2
  30. package/dist/cli/chunks/{chunk-O3C5RRDQ.js → chunk-5YLY2WT2.js} +3 -3
  31. package/dist/cli/chunks/{chunk-PQMLIVGV.js → chunk-6FBXYS6X.js} +2 -2
  32. package/dist/cli/chunks/{chunk-GGMQOEZZ.js → chunk-6N62KS3C.js} +2 -2
  33. package/dist/cli/chunks/{chunk-BB4OVXWF.js → chunk-6SWR2BN7.js} +1 -1
  34. package/dist/cli/chunks/{chunk-7HJHXSYT.js → chunk-6X65BGGK.js} +2 -2
  35. package/dist/cli/chunks/{chunk-P52YORQG.js → chunk-7DV42KFP.js} +2 -2
  36. package/dist/cli/chunks/{chunk-EZE2HRQB.js → chunk-7KMYBRKJ.js} +2 -2
  37. package/dist/cli/chunks/{chunk-335GHVJV.js → chunk-7OD6HFCP.js} +3 -3
  38. package/dist/cli/chunks/chunk-ABHKXMOJ.js +2 -0
  39. package/dist/cli/chunks/{chunk-L5ZLOW3K.js → chunk-ACDZ2CRV.js} +2 -2
  40. package/dist/cli/chunks/{chunk-NW7G57NR.js → chunk-ADZTWGEB.js} +2 -2
  41. package/dist/cli/chunks/{chunk-CC5G3K4X.js → chunk-AJ6DZXKK.js} +2 -2
  42. package/dist/cli/chunks/{chunk-SSXAW3ER.js → chunk-AL5QT6OX.js} +2 -2
  43. package/dist/cli/chunks/{chunk-FKPUPQQT.js → chunk-AMPYON7M.js} +2 -2
  44. package/dist/cli/chunks/{chunk-C4SZSPXY.js → chunk-APVXTHTA.js} +2 -2
  45. package/dist/cli/chunks/{chunk-FEEMJDUF.js → chunk-B7DI76SY.js} +2 -2
  46. package/dist/cli/chunks/{chunk-Q5YRPS4P.js → chunk-BDVOXGY5.js} +1 -1
  47. package/dist/cli/chunks/{chunk-VMP4M5PB.js → chunk-BDX54WJV.js} +1 -1
  48. package/dist/cli/chunks/{chunk-G5JQLUUO.js → chunk-BMRR3MBR.js} +2 -2
  49. package/dist/cli/chunks/{chunk-2UMCB7AH.js → chunk-BOR5MME3.js} +1 -1
  50. package/dist/cli/chunks/{chunk-HW62TB4T.js → chunk-BPSEFLJ6.js} +1 -1
  51. package/dist/cli/chunks/{chunk-DTOE3NYW.js → chunk-BUKGW63B.js} +12 -12
  52. package/dist/cli/chunks/{chunk-V2MD5EDD.js → chunk-C7VNQ4PY.js} +2 -2
  53. package/dist/cli/chunks/{chunk-W766S4SK.js → chunk-CDMAVNV5.js} +1 -1
  54. package/dist/cli/chunks/{chunk-K5SN66B4.js → chunk-CKFZOPZN.js} +2 -2
  55. package/dist/cli/chunks/{chunk-Y2MCIIJD.js → chunk-CMKCPRWX.js} +1 -1
  56. package/dist/cli/chunks/{chunk-DR7PCO3S.js → chunk-CQKEVUMO.js} +2 -2
  57. package/dist/cli/chunks/{chunk-2KHDGC7N.js → chunk-CTFW7CMI.js} +2 -2
  58. package/dist/cli/chunks/{chunk-5FR5GBUT.js → chunk-DGOZ3CGB.js} +2 -2
  59. package/dist/cli/chunks/{chunk-ZVPAFX4I.js → chunk-DTXHRALB.js} +2 -2
  60. package/dist/cli/chunks/{chunk-IJUYHIKN.js → chunk-E5XWCGSX.js} +2 -2
  61. package/dist/cli/chunks/{chunk-7ZIVDGSN.js → chunk-EGU54SNK.js} +1 -1
  62. package/dist/cli/chunks/{chunk-KI5BP4X5.js → chunk-EKTWIEEO.js} +2 -2
  63. package/dist/cli/chunks/{chunk-TJ6N4CCX.js → chunk-ERQL3D2O.js} +2 -2
  64. package/dist/cli/chunks/{chunk-CHO54B34.js → chunk-EZ3JVN6S.js} +2 -2
  65. package/dist/cli/chunks/{chunk-5VBPIJUZ.js → chunk-F3CKOVZM.js} +4 -4
  66. package/dist/cli/chunks/{chunk-RQN4HWGV.js → chunk-FKUH33L3.js} +2 -2
  67. package/dist/cli/chunks/{chunk-WNASEUBW.js → chunk-FTG4ZVTX.js} +11 -11
  68. package/dist/cli/chunks/{chunk-CMGYUCM7.js → chunk-FUBN5GPY.js} +1 -1
  69. package/dist/cli/chunks/{chunk-I6WHYRWB.js → chunk-GCQATSMK.js} +2 -2
  70. package/dist/cli/chunks/{chunk-TED4KOSK.js → chunk-GECWGFRR.js} +2 -2
  71. package/dist/cli/chunks/{chunk-BA6U7NSR.js → chunk-GP7IXYOY.js} +1 -1
  72. package/dist/cli/chunks/{chunk-CSEEGX5T.js → chunk-GUGUYFU5.js} +2 -2
  73. package/dist/cli/chunks/{chunk-KZ37VHMJ.js → chunk-HH5Y4NCR.js} +2 -2
  74. package/dist/cli/chunks/{chunk-DXOMRWDC.js → chunk-HNU32LN3.js} +1 -1
  75. package/dist/cli/chunks/{chunk-3AFNXU45.js → chunk-HU6ETNA7.js} +1 -1
  76. package/dist/cli/chunks/{chunk-KN5GOEYK.js → chunk-IKIKIHFQ.js} +2 -2
  77. package/dist/cli/chunks/{chunk-UGJQJSPB.js → chunk-ILNQPPKB.js} +1 -1
  78. package/dist/cli/chunks/{chunk-MJPYNGZ7.js → chunk-IQ56KMMH.js} +1 -1
  79. package/dist/cli/chunks/{chunk-SCMXIBI7.js → chunk-J6EFAKDQ.js} +2 -2
  80. package/dist/cli/chunks/{chunk-RMFRFING.js → chunk-K43YXI7C.js} +2 -2
  81. package/dist/cli/chunks/{chunk-FOPS6DRZ.js → chunk-KBAXD6PH.js} +1 -1
  82. package/dist/cli/chunks/{chunk-VS4GMNJK.js → chunk-KBXW7S3W.js} +3 -3
  83. package/dist/cli/chunks/{chunk-QJ6H2HQQ.js → chunk-KDGLNJPB.js} +1 -1
  84. package/dist/cli/chunks/{chunk-VA7TEOPM.js → chunk-KJJP446A.js} +1 -1
  85. package/dist/cli/chunks/{chunk-TC2JE5OK.js → chunk-KNOO6TFO.js} +3 -3
  86. package/dist/cli/chunks/{chunk-HAEUPIKW.js → chunk-KPV4N4KT.js} +2 -2
  87. package/dist/cli/chunks/{chunk-IKVNYK7Y.js → chunk-KV5OZ6T3.js} +2 -2
  88. package/dist/cli/chunks/{chunk-RG552ROA.js → chunk-LGEPR7MH.js} +3 -3
  89. package/dist/cli/chunks/{chunk-7WX3MKRS.js → chunk-LIAW5FD7.js} +2 -2
  90. package/dist/cli/chunks/{chunk-MUV56BPK.js → chunk-LOZAUP6L.js} +2 -2
  91. package/dist/cli/chunks/{chunk-BUYPRUNY.js → chunk-LWVUNBZO.js} +2 -2
  92. package/dist/cli/chunks/{chunk-FZRU73M4.js → chunk-M4XVEUUM.js} +2 -2
  93. package/dist/cli/chunks/{chunk-ICK3B24H.js → chunk-MALFTRCT.js} +2 -2
  94. package/dist/cli/chunks/{chunk-MBF3Q7FQ.js → chunk-MF4FULAI.js} +1 -1
  95. package/dist/cli/chunks/{chunk-7F7U2HUH.js → chunk-MNHGBG4D.js} +1 -1
  96. package/dist/cli/chunks/{chunk-XIFPIVZI.js → chunk-MNNNA57O.js} +2 -2
  97. package/dist/cli/chunks/{chunk-BZPF6GTL.js → chunk-N57BKUVE.js} +1 -1
  98. package/dist/cli/chunks/{chunk-TO5PQSDD.js → chunk-NDAJWCXN.js} +2 -2
  99. package/dist/cli/chunks/{chunk-NLHISTL2.js → chunk-OELLHV7S.js} +2 -2
  100. package/dist/cli/chunks/{chunk-PM566XEO.js → chunk-OEZNUXY7.js} +1 -1
  101. package/dist/cli/chunks/{chunk-4GU656WM.js → chunk-OIUIVV2N.js} +1 -1
  102. package/dist/cli/chunks/{chunk-CVGXB7IX.js → chunk-OMIGKGJJ.js} +2 -2
  103. package/dist/cli/chunks/{chunk-62RELCU6.js → chunk-OSAPKOGN.js} +1 -1
  104. package/dist/cli/chunks/{chunk-72VZGAMJ.js → chunk-P2FYRAC5.js} +1 -1
  105. package/dist/cli/chunks/{chunk-W2OMW6UU.js → chunk-P65S7AZA.js} +2 -2
  106. package/dist/cli/chunks/{chunk-VZ67ZDB3.js → chunk-PHIEJAQK.js} +3 -3
  107. package/dist/cli/chunks/chunk-PSA2SOON.js +18 -0
  108. package/dist/cli/chunks/{chunk-USB44IHJ.js → chunk-PXKVW6PT.js} +2 -2
  109. package/dist/cli/chunks/{chunk-64M3FFM4.js → chunk-QYST2TZW.js} +2 -2
  110. package/dist/cli/chunks/{chunk-MUAHFGIX.js → chunk-R554WVIG.js} +2 -2
  111. package/dist/cli/chunks/{chunk-TJEJ4UVX.js → chunk-R5HC6JVJ.js} +2 -2
  112. package/dist/cli/chunks/{chunk-6X3RJBA3.js → chunk-R6LDR3IO.js} +2 -2
  113. package/dist/cli/chunks/{chunk-OPIWFXME.js → chunk-RFQIC6ZF.js} +1 -1
  114. package/dist/cli/chunks/{chunk-EM2JIIAQ.js → chunk-RXEQB4OT.js} +2 -2
  115. package/dist/cli/chunks/{chunk-BGRJZH5Q.js → chunk-RXH2TC2K.js} +2 -2
  116. package/dist/cli/chunks/{chunk-DQDFACYW.js → chunk-SVUWAV6Y.js} +1 -1
  117. package/dist/cli/chunks/{chunk-POKMJTD2.js → chunk-SYLTJKN2.js} +1 -1
  118. package/dist/cli/chunks/{chunk-WJYTLRA5.js → chunk-T6TQPF5P.js} +3 -3
  119. package/dist/cli/chunks/{chunk-FI5SSLEF.js → chunk-T75VH6NT.js} +2 -2
  120. package/dist/cli/chunks/{chunk-EGH3H7QO.js → chunk-TERRRQVY.js} +1 -1
  121. package/dist/cli/chunks/{chunk-2ALNNXFF.js → chunk-TFVWUR2U.js} +2 -2
  122. package/dist/cli/chunks/{chunk-MK3J7JVZ.js → chunk-TLYZPOA7.js} +2 -2
  123. package/dist/cli/chunks/{chunk-RYUSZ43T.js → chunk-TMQ3S7HR.js} +1 -1
  124. package/dist/cli/chunks/{chunk-Z3W3R4CW.js → chunk-TQNNKW7K.js} +2 -2
  125. package/dist/cli/chunks/{chunk-PT3FTGKZ.js → chunk-TRHUH24V.js} +2 -2
  126. package/dist/cli/chunks/{chunk-5XFX25AJ.js → chunk-UEIIIDBJ.js} +2 -2
  127. package/dist/cli/chunks/{chunk-YKOTOCO6.js → chunk-UF3YOGHV.js} +2 -2
  128. package/dist/cli/chunks/{chunk-UUOXV3NS.js → chunk-UFPCNUJA.js} +10 -10
  129. package/dist/cli/chunks/{chunk-FZIHOMGY.js → chunk-V2QYW5KW.js} +2 -2
  130. package/dist/cli/chunks/{chunk-AAATFEIL.js → chunk-VHYACXLN.js} +2 -2
  131. package/dist/cli/chunks/chunk-VM6VBRRU.js +43 -0
  132. package/dist/cli/chunks/{chunk-ZT2WHCVM.js → chunk-VOHYQ6MX.js} +2 -2
  133. package/dist/cli/chunks/{chunk-C6GYLCTX.js → chunk-VQU2JXTK.js} +3 -3
  134. package/dist/cli/chunks/{chunk-FU5RNEXV.js → chunk-W7LBT3BF.js} +2 -2
  135. package/dist/cli/chunks/{chunk-GCF42L7M.js → chunk-WC5PM33J.js} +3 -3
  136. package/dist/cli/chunks/{chunk-WT4ZDDFM.js → chunk-WE5QHYL7.js} +1 -1
  137. package/dist/cli/chunks/chunk-WKWIUS5G.js +3 -0
  138. package/dist/cli/chunks/chunk-WL5VMIO4.js +2 -0
  139. package/dist/cli/chunks/{chunk-OHSVDMF7.js → chunk-WMNGPIP3.js} +1 -1
  140. package/dist/cli/chunks/{chunk-UVVKFBF7.js → chunk-WRMUQVKY.js} +2 -2
  141. package/dist/cli/chunks/{chunk-NNGCUJWQ.js → chunk-WY5CX3VH.js} +2 -2
  142. package/dist/cli/chunks/{chunk-36MPDANH.js → chunk-WYFEVPLO.js} +1 -1
  143. package/dist/cli/chunks/{chunk-RHC7TFPU.js → chunk-X47GHZY3.js} +2 -2
  144. package/dist/cli/chunks/{chunk-TR5GOGH3.js → chunk-XNNYHQLW.js} +5 -5
  145. package/dist/cli/chunks/{chunk-27JCWG5J.js → chunk-YDZIPP3Y.js} +2 -2
  146. package/dist/cli/chunks/{chunk-KDLYTJ5C.js → chunk-YRO7HNS4.js} +2 -2
  147. package/dist/cli/chunks/{chunk-SPEUF7ZL.js → chunk-YSCEUK55.js} +2 -2
  148. package/dist/cli/chunks/chunk-YY4KXDI6.js +2 -0
  149. package/dist/cli/chunks/{chunk-ZWC6CM4R.js → chunk-YYV3FYVB.js} +1 -1
  150. package/dist/cli/chunks/{chunk-AEX75YGI.js → chunk-YZ44FUVJ.js} +2 -2
  151. package/dist/cli/chunks/chunk-Z3FA5KR6.js +316 -0
  152. package/dist/cli/chunks/{chunk-G6RKUEGL.js → chunk-Z63IOTDW.js} +2 -2
  153. package/dist/cli/chunks/{chunk-6JNNZGI2.js → chunk-ZBYMF2QJ.js} +1 -1
  154. package/dist/cli/chunks/{chunk-JYXSVSH2.js → chunk-ZF65VOQH.js} +2 -2
  155. package/dist/cli/chunks/{chunk-4SALW7OT.js → chunk-ZHWXI4SK.js} +2 -2
  156. package/dist/cli/chunks/{chunk-LMJUQWR7.js → chunk-ZL7ZOIHO.js} +1 -1
  157. package/dist/cli/chunks/{ci-RJH5LAL3.js → ci-NT4DUGQ4.js} +2 -2
  158. package/dist/cli/chunks/{ci-output-62SGMGB2.js → ci-output-PXBD2QPH.js} +2 -2
  159. package/dist/cli/chunks/{circuit-breaker-QXTS5ZAW.js → circuit-breaker-ZPCCEEDX.js} +2 -2
  160. package/dist/cli/chunks/{claude-flow-setup-BBCCT5WV.js → claude-flow-setup-CZCDFZOE.js} +2 -2
  161. package/dist/cli/chunks/client-S7DIRNFJ.js +2 -0
  162. package/dist/cli/chunks/{cline-installer-IZCUJJ3I.js → cline-installer-6J2S7GLM.js} +2 -2
  163. package/dist/cli/chunks/{code-AWNVOZ7S.js → code-UTERK5AP.js} +2 -2
  164. package/dist/cli/chunks/{code-index-extractor-MX65BKMI.js → code-index-extractor-O3MJTOS2.js} +2 -2
  165. package/dist/cli/chunks/{codex-installer-EQT6JVLM.js → codex-installer-AZJIVXJR.js} +2 -2
  166. package/dist/cli/chunks/{completions-WOJAM45W.js → completions-A6ANQSZN.js} +2 -2
  167. package/dist/cli/chunks/{complexity-analyzer-3DJB7V3K.js → complexity-analyzer-MRSN7VUP.js} +2 -2
  168. package/dist/cli/chunks/{continuedev-installer-P4KWUTCJ.js → continuedev-installer-6LMKQRUI.js} +2 -2
  169. package/dist/cli/chunks/{copilot-installer-FFZWTMWQ.js → copilot-installer-KP3TWUNO.js} +2 -2
  170. package/dist/cli/chunks/core-handlers-NM2KCI6Z.js +2 -0
  171. package/dist/cli/chunks/{cost-tracker-CYBOV3NI.js → cost-tracker-R3C5IQPZ.js} +2 -2
  172. package/dist/cli/chunks/{coverage-GTZJBSC4.js → coverage-MR4QA2NM.js} +3 -3
  173. package/dist/cli/chunks/cross-domain-router-3TSZMCBM.js +2 -0
  174. package/dist/cli/chunks/{cursor-installer-WZIVXGGB.js → cursor-installer-LPZ7NGOS.js} +2 -2
  175. package/dist/cli/chunks/{daemon-JWMHEJEN.js → daemon-K3KW2UDV.js} +4 -4
  176. package/dist/cli/chunks/{daemon-MSFN2LXY.js → daemon-X5KXHRY3.js} +3 -3
  177. package/dist/cli/chunks/{dag-attention-scheduler-4TWOTTQE.js → dag-attention-scheduler-J4FJSGNN.js} +2 -2
  178. package/dist/cli/chunks/{detect-YZ6AGQPB.js → detect-22TX2NCA.js} +2 -2
  179. package/dist/cli/chunks/{dist-node-3EM2XH54.js → dist-node-QI4I4QPS.js} +2 -2
  180. package/dist/cli/chunks/{domain-handler-4XU5BINU.js → domain-handler-ZYZGPNOQ.js} +2 -2
  181. package/dist/cli/chunks/{domain-transfer-HUFC7I52.js → domain-transfer-2EEQTNIU.js} +2 -2
  182. package/dist/cli/chunks/dream-QIIJONYI.js +2 -0
  183. package/dist/cli/chunks/{embed-and-insert-pattern-J5ZFM6YX.js → embed-and-insert-pattern-LYCTU5BS.js} +2 -2
  184. package/dist/cli/chunks/eval-SOA72GUX.js +17 -0
  185. package/dist/cli/chunks/{experience-capture-middleware-E3RYQB6Z.js → experience-capture-middleware-AFFYOMYM.js} +3 -3
  186. package/dist/cli/chunks/{fast-paths-DKIYN2YS.js → fast-paths-WNMHOSUH.js} +2 -2
  187. package/dist/cli/chunks/{feature-flags-ZB63Z7N5.js → feature-flags-FT4YBZH4.js} +2 -2
  188. package/dist/cli/chunks/{feature-flags-S2RNZATS.js → feature-flags-HAP5IAAY.js} +2 -2
  189. package/dist/cli/chunks/{file-discovery-USJJLYQU.js → file-discovery-B4FFOH3Z.js} +2 -2
  190. package/dist/cli/chunks/{fleet-4MUPHSF5.js → fleet-2ICPYV3J.js} +3 -3
  191. package/dist/cli/chunks/{gnn-wrapper-PYOQZKX6.js → gnn-wrapper-XIBJAHMW.js} +2 -2
  192. package/dist/cli/chunks/{heartbeat-handler-HLO5XCG7.js → heartbeat-handler-NSLSKDOI.js} +4 -4
  193. package/dist/cli/chunks/heartbeat-scheduler-CDNGLJJO.js +2 -0
  194. package/dist/cli/chunks/hnsw-adapter-CR7Y4OAM.js +2 -0
  195. package/dist/cli/chunks/hnsw-index-TEDO4MQC.js +2 -0
  196. package/dist/cli/chunks/{hnsw-legacy-bridge-FZEH2KLM.js → hnsw-legacy-bridge-FTV4CCBB.js} +2 -2
  197. package/dist/cli/chunks/{better-sqlite3-LRDXKYOJ.js → hnswlib-node-BCASOCNU.js} +2 -2
  198. package/dist/cli/chunks/{hooks-R2757K57.js → hooks-SM4EU52N.js} +10 -10
  199. package/dist/cli/chunks/hybrid-router-O24ZDIP5.js +2 -0
  200. package/dist/cli/chunks/{hypergraph-engine-EAV3GJ5D.js → hypergraph-engine-RRMX4N3L.js} +2 -2
  201. package/dist/cli/chunks/{hypergraph-handler-5ERXAVGH.js → hypergraph-handler-MNFGDKAP.js} +3 -3
  202. package/dist/cli/chunks/impact-analyzer-PDM4SDB6.js +2 -0
  203. package/dist/cli/chunks/{init-handler-RXUSEMG7.js → init-handler-BNHIJ5TX.js} +6 -6
  204. package/dist/cli/chunks/init-wizard-F4KODPNW.js +2 -0
  205. package/dist/cli/chunks/kernel-77UM35L6.js +2 -0
  206. package/dist/cli/chunks/{kilocode-installer-ZUBVBHGT.js → kilocode-installer-GFKUKPLY.js} +2 -2
  207. package/dist/cli/chunks/{kiro-installer-TRTRQDGL.js → kiro-installer-YBIYKODN.js} +2 -2
  208. package/dist/cli/chunks/knowledge-graph-R6ZWWV2K.js +2 -0
  209. package/dist/cli/chunks/{learning-UYXWAU5D.js → learning-QEWUPCK6.js} +3 -3
  210. package/dist/cli/chunks/{llm-router-TB5OJPEV.js → llm-router-D5FQIMVQ.js} +5 -5
  211. package/dist/cli/chunks/llm-router-service-7QYCZ66H.js +2 -0
  212. package/dist/cli/chunks/{load-ELPSUIPV.js → load-CLBUCKZQ.js} +2 -2
  213. package/dist/cli/chunks/load-test-AWVA3CAQ.js +2 -0
  214. package/dist/cli/chunks/{mcp-UX7TK3XV.js → mcp-VOMG5DPV.js} +2 -2
  215. package/dist/cli/chunks/{memory-W3LG6H6N.js → memory-WZO63VSC.js} +5 -5
  216. package/dist/cli/chunks/memory-backend-YESSIHFW.js +2 -0
  217. package/dist/cli/chunks/memory-handlers-EOOWSUHI.js +2 -0
  218. package/dist/cli/chunks/{multi-model-executor-227LWZRY.js → multi-model-executor-7UKW43VV.js} +2 -2
  219. package/dist/cli/chunks/{opencode-installer-F4WKVWDL.js → opencode-installer-MLFPRRL2.js} +2 -2
  220. package/dist/cli/chunks/{orchestrator-V4DBMGK6.js → orchestrator-XNYDBGIN.js} +18 -18
  221. package/dist/cli/chunks/pattern-null-store-X3UXLJNL.js +2 -0
  222. package/dist/cli/chunks/{pattern-usage-recorder-BY3HEWSU.js → pattern-usage-recorder-ZAP7ASQI.js} +2 -2
  223. package/dist/cli/chunks/{pipeline-3F5RIESX.js → pipeline-4EJYOPBC.js} +2 -2
  224. package/dist/cli/chunks/{platform-KCGXTZO3.js → platform-ALPOWCOH.js} +2 -2
  225. package/dist/cli/chunks/{plugin-2H552KOV.js → plugin-S2RX3KHR.js} +2 -2
  226. package/dist/cli/chunks/{prime-radiant-advanced-wasm-EFKVL7VN.js → prime-radiant-advanced-wasm-P2JB73XX.js} +2 -2
  227. package/dist/cli/chunks/protocol-executor-KXDCTMWI.js +2 -0
  228. package/dist/cli/chunks/{protocol-handler-ELGYV7D2.js → protocol-handler-ZBJXSESA.js} +2 -2
  229. package/dist/cli/chunks/{prove-AYJCQYNI.js → prove-MYJ5YV45.js} +2 -2
  230. package/dist/cli/chunks/provider-manager-XJZVHYI6.js +2 -0
  231. package/dist/cli/chunks/qe-reasoning-bank-DPHPNIC6.js +2 -0
  232. package/dist/cli/chunks/{quality-HH7L5A7V.js → quality-NIACQC4M.js} +2 -2
  233. package/dist/cli/chunks/{quality-gate-NAQLXE4C.js → quality-gate-OAZ23ON5.js} +3 -3
  234. package/dist/cli/chunks/queen-coordinator-EVGWME5C.js +2 -0
  235. package/dist/cli/chunks/{real-embeddings-IO3F4ZFR.js → real-embeddings-6I4LP7PL.js} +2 -2
  236. package/dist/cli/chunks/{roocode-installer-X4TU5HO4.js → roocode-installer-LRQHP6MK.js} +2 -2
  237. package/dist/cli/chunks/router-R2N7TMAS.js +2 -0
  238. package/dist/cli/chunks/routing-feedback-G6W3H26L.js +2 -0
  239. package/dist/cli/chunks/{routing-handler-ZJKGDDMT.js → routing-handler-A7BW7MV4.js} +2 -2
  240. package/dist/cli/chunks/{ruvector-commands-NXCSUBN2.js → ruvector-commands-ZDRRFSJS.js} +2 -2
  241. package/dist/cli/chunks/{rvf-dual-writer-JMA74SKP.js → rvf-dual-writer-QWE3Z6BB.js} +2 -2
  242. package/dist/cli/chunks/{rvf-migration-adapter-BNTGH2KU.js → rvf-migration-adapter-6UDAP7QB.js} +2 -2
  243. package/dist/cli/chunks/{rvf-migration-coordinator-7T2HHUOH.js → rvf-migration-coordinator-FEW2N4R4.js} +2 -2
  244. package/dist/cli/chunks/rvf-native-adapter-D7R2GWXK.js +2 -0
  245. package/dist/cli/chunks/safe-db-CQZGF2KA.js +2 -0
  246. package/dist/cli/chunks/schedule-UP7E3LRC.js +2 -0
  247. package/dist/cli/chunks/scheduler-ENIZHYSL.js +2 -0
  248. package/dist/cli/chunks/{security-XSK2QHB3.js → security-KFXBV65O.js} +3 -3
  249. package/dist/cli/chunks/{shared-rvf-adapter-WLRKI7RY.js → shared-rvf-adapter-HDDCXCHY.js} +2 -2
  250. package/dist/cli/chunks/{shared-rvf-dual-writer-SZW3J7ZK.js → shared-rvf-dual-writer-CXXTB7CU.js} +2 -2
  251. package/dist/cli/chunks/sqlite-persistence-CEVJVWS5.js +2 -0
  252. package/dist/cli/chunks/status-handler-CXSVM236.js +47 -0
  253. package/dist/cli/chunks/{structural-health-4SJCFX63.js → structural-health-LMHSM7MJ.js} +2 -2
  254. package/dist/cli/chunks/{sync-7WAVNZGL.js → sync-DMOUY2EY.js} +2 -2
  255. package/dist/cli/chunks/{sync-ATR4DUSA.js → sync-REEFKICL.js} +2 -2
  256. package/dist/cli/chunks/{task-handler-O6REL34Y.js → task-handler-DMSNFIH3.js} +2 -2
  257. package/dist/cli/chunks/{task-handlers-WFV2ZYWW.js → task-handlers-3Z3QV7X7.js} +3 -3
  258. package/dist/cli/chunks/{test-4LXUVHEU.js → test-U6CGMDLN.js} +4 -4
  259. package/dist/cli/chunks/{test-scheduling-OTN3DMKY.js → test-scheduling-YHYA3BP5.js} +3 -3
  260. package/dist/cli/chunks/{token-bootstrap-VA7T4P42.js → token-bootstrap-MQCTJURQ.js} +2 -2
  261. package/dist/cli/chunks/{token-usage-TLT6OXXR.js → token-usage-EOOTM7Q3.js} +2 -2
  262. package/dist/cli/chunks/{transformers-JI7LZRQ3.js → transformers-EKDJW2H6.js} +2 -2
  263. package/dist/cli/chunks/{tree-sitter-wasm-parser-QNIMHB4K.js → tree-sitter-wasm-parser-HTGAXDQA.js} +2 -2
  264. package/dist/cli/chunks/{types-DJNWOAC6.js → types-GLRXY4RY.js} +2 -2
  265. package/dist/cli/chunks/unified-memory-PXOQ4N53.js +2 -0
  266. package/dist/cli/chunks/unified-memory-hnsw-VEXD6ASE.js +2 -0
  267. package/dist/cli/chunks/unified-persistence-46G6MZYC.js +2 -0
  268. package/dist/cli/chunks/{upgrade-VEW4FL23.js → upgrade-KU55H77X.js} +2 -2
  269. package/dist/cli/chunks/{validate-O3P6PF7B.js → validate-26VSBOJN.js} +2 -2
  270. package/dist/cli/chunks/{validate-swarm-M2HXHZVC.js → validate-swarm-OIALRDKF.js} +2 -2
  271. package/dist/cli/chunks/{vibium-GOU55LUO.js → vibium-LOTWW25P.js} +2 -2
  272. package/dist/cli/chunks/visual-security-4X3T3MFL.js +2 -0
  273. package/dist/cli/chunks/{web-tree-sitter-MXOI4GH3.js → web-tree-sitter-6LWPPBYU.js} +2 -2
  274. package/dist/cli/chunks/{windsurf-installer-6GKT53IH.js → windsurf-installer-ILOQYENG.js} +2 -2
  275. package/dist/cli/chunks/witness-chain-XW4S3LVW.js +2 -0
  276. package/dist/cli/chunks/{witness-chain-OXGQGL26.js → witness-chain-YBS6OHS4.js} +2 -2
  277. package/dist/cli/chunks/{witness-key-manager-PGFSQXUJ.js → witness-key-manager-SI3WV3ZQ.js} +2 -2
  278. package/dist/cli/chunks/{workflow-ENBWRMBA.js → workflow-GY6SJRQW.js} +4 -4
  279. package/dist/cli/chunks/workflow-orchestrator-IIVV6TCP.js +2 -0
  280. package/dist/cli/chunks/{wrappers-MHLNYANQ.js → wrappers-MMO5YKOZ.js} +2 -2
  281. package/dist/cli/commands/eval.js +73 -3
  282. package/dist/cli/commands/llm-router.js +2 -0
  283. package/dist/cli/handlers/status-handler.d.ts +5 -0
  284. package/dist/cli/handlers/status-handler.js +35 -0
  285. package/dist/coordination/consensus/providers/index.js +11 -0
  286. package/dist/init/init-wizard-hooks.js +11 -25
  287. package/dist/init/phases/07-hooks.js +15 -25
  288. package/dist/init/settings-merge.d.ts +44 -0
  289. package/dist/init/settings-merge.js +119 -4
  290. package/dist/mcp/bundle.js +412 -393
  291. package/dist/shared/llm/billing-modes.d.ts +24 -0
  292. package/dist/shared/llm/billing-modes.js +56 -0
  293. package/dist/shared/llm/cost-tracker.js +2 -0
  294. package/dist/shared/llm/interfaces.d.ts +61 -3
  295. package/dist/shared/llm/provider-manager.d.ts +34 -0
  296. package/dist/shared/llm/provider-manager.js +152 -3
  297. package/dist/shared/llm/providers/claude-code.d.ts +57 -0
  298. package/dist/shared/llm/providers/claude-code.js +312 -0
  299. package/dist/shared/llm/providers/cognitum.d.ts +64 -0
  300. package/dist/shared/llm/providers/cognitum.js +369 -0
  301. package/dist/shared/llm/providers/index.d.ts +2 -0
  302. package/dist/shared/llm/providers/index.js +2 -0
  303. package/dist/shared/llm/router/config-store.d.ts +31 -11
  304. package/dist/shared/llm/router/config-store.js +82 -12
  305. package/dist/shared/llm/router/hybrid-router.js +16 -0
  306. package/dist/shared/llm/router/types.js +7 -0
  307. package/dist/shared/llm/spend-ledger.d.ts +64 -0
  308. package/dist/shared/llm/spend-ledger.js +115 -0
  309. package/dist/shared/llm/translation/message-formatter.js +2 -0
  310. package/dist/shared/llm/translation/prompt-translator.js +2 -0
  311. package/dist/shared/llm/translation/tool-translator.js +2 -0
  312. package/dist/validation/index.d.ts +1 -0
  313. package/dist/validation/index.js +2 -0
  314. package/dist/validation/provider-llm-executor.d.ts +45 -0
  315. package/dist/validation/provider-llm-executor.js +98 -0
  316. package/package.json +1 -1
  317. package/dist/cli/chunks/adapter-6IWRIHF3.js +0 -2
  318. package/dist/cli/chunks/aqe-learning-engine-FSF5U67K.js +0 -2
  319. package/dist/cli/chunks/base-2CKCJU3O.js +0 -2
  320. package/dist/cli/chunks/browser-workflow-UGYJE64S.js +0 -2
  321. package/dist/cli/chunks/chunk-2AOOIAW3.js +0 -316
  322. package/dist/cli/chunks/chunk-3B4XXFKD.js +0 -18
  323. package/dist/cli/chunks/chunk-BBC526PL.js +0 -24
  324. package/dist/cli/chunks/chunk-ESDGCTC4.js +0 -2
  325. package/dist/cli/chunks/chunk-IDLNLSQI.js +0 -3
  326. package/dist/cli/chunks/chunk-MDT3LIXS.js +0 -2
  327. package/dist/cli/chunks/client-E2XUBCLK.js +0 -2
  328. package/dist/cli/chunks/core-handlers-46Z5VOO6.js +0 -2
  329. package/dist/cli/chunks/cross-domain-router-SXQ3HFRY.js +0 -2
  330. package/dist/cli/chunks/dream-R6MQQQ3N.js +0 -2
  331. package/dist/cli/chunks/eval-XYOA3EH2.js +0 -15
  332. package/dist/cli/chunks/heartbeat-scheduler-OSDPJT6A.js +0 -2
  333. package/dist/cli/chunks/hnsw-adapter-KMGSHBIN.js +0 -2
  334. package/dist/cli/chunks/hnsw-index-IMFRAOPE.js +0 -2
  335. package/dist/cli/chunks/hybrid-router-57QSWSWC.js +0 -2
  336. package/dist/cli/chunks/impact-analyzer-OC4MPBGA.js +0 -2
  337. package/dist/cli/chunks/init-wizard-CDBRL4PO.js +0 -2
  338. package/dist/cli/chunks/kernel-CQ7R3AAV.js +0 -2
  339. package/dist/cli/chunks/knowledge-graph-UXNH7RY4.js +0 -2
  340. package/dist/cli/chunks/llm-router-service-UV34YXBE.js +0 -2
  341. package/dist/cli/chunks/load-test-2VEN3PQZ.js +0 -2
  342. package/dist/cli/chunks/memory-backend-TZL5U6F3.js +0 -2
  343. package/dist/cli/chunks/memory-handlers-BNXAYS2P.js +0 -2
  344. package/dist/cli/chunks/pattern-null-store-KLX2RNHM.js +0 -2
  345. package/dist/cli/chunks/protocol-executor-5HJKW6MC.js +0 -2
  346. package/dist/cli/chunks/provider-manager-TRZSBXD3.js +0 -2
  347. package/dist/cli/chunks/qe-reasoning-bank-RCEYSLVV.js +0 -2
  348. package/dist/cli/chunks/queen-coordinator-6JFZD54W.js +0 -2
  349. package/dist/cli/chunks/router-KRLC46NS.js +0 -2
  350. package/dist/cli/chunks/routing-feedback-WW26H6SA.js +0 -2
  351. package/dist/cli/chunks/rvf-native-adapter-OVQKPQUH.js +0 -2
  352. package/dist/cli/chunks/safe-db-UQOCQIH2.js +0 -2
  353. package/dist/cli/chunks/schedule-EUX7ZQUK.js +0 -2
  354. package/dist/cli/chunks/scheduler-MALHQKNR.js +0 -2
  355. package/dist/cli/chunks/sqlite-persistence-OBCLRP4L.js +0 -2
  356. package/dist/cli/chunks/status-handler-HGCKYJX2.js +0 -46
  357. package/dist/cli/chunks/unified-memory-A5BS3LGX.js +0 -2
  358. package/dist/cli/chunks/unified-memory-hnsw-WJLJO5MY.js +0 -2
  359. package/dist/cli/chunks/unified-persistence-CFC2BKI5.js +0 -2
  360. package/dist/cli/chunks/visual-security-VPB6KVYJ.js +0 -2
  361. package/dist/cli/chunks/witness-chain-ZZAUAXDY.js +0 -2
  362. package/dist/cli/chunks/workflow-orchestrator-S4LBFTYD.js +0 -2
@@ -1,10 +1,10 @@
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.12.0");process.exit(0)}
2
- import{a as k}from"./chunk-LMJUQWR7.js";import{a as te,b as ne}from"./chunk-HDJMD6UH.js";import{b as ee}from"./chunk-BZPF6GTL.js";import{b as E,d as fe}from"./chunk-K5SN66B4.js";import{a as b,c as T}from"./chunk-RHC7TFPU.js";var he={M:16,efConstruction:200,efSearch:100},P={enabled:!0,pretrainedPatterns:!0,hnswConfig:he,promotionThreshold:3,qualityThreshold:.7,embeddingModel:"auto"},_={mode:"hybrid",confidenceThreshold:.7,feedbackEnabled:!0,cacheEnabled:!0,cacheTTLMs:300*1e3},F={enabled:["pattern-consolidator","coverage-gap-scanner","flaky-test-detector","routing-accuracy-monitor"],intervals:{"pattern-consolidator":1800*1e3,"coverage-gap-scanner":3600*1e3,"flaky-test-detector":7200*1e3,"routing-accuracy-monitor":900*1e3},maxConcurrent:4,daemonAutoStart:!0},N={claudeCode:!0,preCommit:!1,ciIntegration:!1},$={install:!0,installV2:!0,installV3:!0,overwrite:!1},O={enabled:!0,parameters:["hnsw.efSearch","routing.confidenceThreshold","pattern.promotionThreshold","testGen.complexityLimit"],tuningIntervalMs:10080*60*1e3,evaluationPeriodMs:5e3};var L=["test-generation","test-execution","coverage-analysis","quality-assessment","defect-intelligence","requirements-validation","code-intelligence","security-compliance","contract-testing","visual-accessibility","chaos-resilience","learning-optimization","enterprise-integration"];function M(){return"3.12.0"}function Fe(r,e){return{version:M(),project:{name:r,root:e,type:"single"},learning:P,routing:_,workers:F,hooks:N,skills:$,autoTuning:O,domains:{enabled:L,disabled:[]},agents:{maxConcurrent:15,defaultTimeout:6e4}}}fe();import{readFileSync as w,existsSync as p,statSync as ye,readdirSync as ve}from"fs";import{join as u,basename as re,extname as ie,relative as V}from"path";var be=[{name:"jest",detect:r=>{let e=["jest.config.js","jest.config.ts","jest.config.mjs","jest.config.cjs"];for(let n of e)if(p(u(r,n)))return{name:"jest",version:A(r,"jest"),configFile:n,confidence:1};let t=S(r);return t?.jest?{name:"jest",version:A(r,"jest"),configFile:"package.json",confidence:.9}:t?.devDependencies?.jest||t?.dependencies?.jest?{name:"jest",version:t.devDependencies?.jest||t.dependencies?.jest,confidence:.7}:null}},{name:"vitest",detect:r=>{let e=["vitest.config.ts","vitest.config.js","vitest.config.mts","vite.config.ts"];for(let n of e)if(p(u(r,n)))return{name:"vitest",version:A(r,"vitest"),configFile:n,confidence:1};let t=S(r);return t?.devDependencies?.vitest||t?.dependencies?.vitest?{name:"vitest",version:t.devDependencies?.vitest,confidence:.8}:null}},{name:"mocha",detect:r=>{let e=[".mocharc.js",".mocharc.json",".mocharc.yaml",".mocharc.yml"];for(let n of e)if(p(u(r,n)))return{name:"mocha",version:A(r,"mocha"),configFile:n,confidence:1};let t=S(r);return t?.devDependencies?.mocha?{name:"mocha",version:t.devDependencies?.mocha,confidence:.8}:null}},{name:"pytest",detect:r=>{let e=["pytest.ini","pyproject.toml","setup.cfg"];for(let n of e){let i=u(r,n);if(p(i))try{let s=w(i,"utf-8");if(s.includes("[pytest]")||s.includes("[tool.pytest]"))return{name:"pytest",configFile:n,confidence:1}}catch(s){console.debug("[ProjectAnalyzer] Config read failed:",s instanceof Error?s.message:s)}}let t=u(r,"requirements.txt");if(p(t))try{if(w(t,"utf-8").includes("pytest"))return{name:"pytest",configFile:"requirements.txt",confidence:.8}}catch(n){console.debug("[ProjectAnalyzer] requirements.txt read failed:",n instanceof Error?n.message:n)}return null}},{name:"playwright",detect:r=>{let e=["playwright.config.ts","playwright.config.js"];for(let n of e)if(p(u(r,n)))return{name:"playwright",version:A(r,"@playwright/test"),configFile:n,confidence:1};let t=S(r);return t?.devDependencies?.["@playwright/test"]?{name:"playwright",version:t.devDependencies["@playwright/test"],confidence:.8}:null}},{name:"cypress",detect:r=>{let e=["cypress.config.ts","cypress.config.js","cypress.json"];for(let t of e)if(p(u(r,t)))return{name:"cypress",version:A(r,"cypress"),configFile:t,confidence:1};return p(u(r,"cypress"))?{name:"cypress",configFile:"cypress/",confidence:.9}:null}}],ke=[{name:"typescript",extensions:[".ts",".tsx",".mts",".cts"]},{name:"javascript",extensions:[".js",".jsx",".mjs",".cjs"]},{name:"python",extensions:[".py",".pyw"]},{name:"java",extensions:[".java"]},{name:"go",extensions:[".go"]},{name:"rust",extensions:[".rs"]},{name:"csharp",extensions:[".cs"]},{name:"ruby",extensions:[".rb"]},{name:"php",extensions:[".php"]},{name:"kotlin",extensions:[".kt",".kts"]},{name:"swift",extensions:[".swift"]}];function S(r){let e=u(r,"package.json");if(!p(e))return null;try{return E(w(e,"utf-8"))}catch{return null}}function A(r,e){let t=S(r);if(t)return t.devDependencies?.[e]||t.dependencies?.[e]}function Q(r,e,t={}){let{maxDepth:n=10,exclude:i=["node_modules",".git","dist","build","coverage",".next","__pycache__"]}=t;function s(o,a){if(a>n)return;let l;try{l=ve(o)}catch{return}for(let g of l){if(i.includes(g))continue;let c=u(o,g),x;try{x=ye(c)}catch{continue}x.isDirectory()?s(c,a+1):x.isFile()&&e(c)}}s(r,0)}var W=class{projectRoot;constructor(e){this.projectRoot=e}async analyze(){let e=Date.now(),[t,n,i,s,o]=await Promise.all([this.detectFrameworks(),this.detectLanguages(),this.detectExistingTests(),this.analyzeComplexity(),this.measureCoverage()]);return{projectName:S(this.projectRoot)?.name||re(this.projectRoot),projectRoot:this.projectRoot,projectType:this.detectProjectType(),frameworks:t,languages:n,existingTests:i,codeComplexity:s,coverage:o,packageManager:this.detectPackageManager(),hasTypeScript:p(u(this.projectRoot,"tsconfig.json")),hasCIConfig:this.detectCIConfig(),ciProvider:this.detectCIProvider(),analysisTimestamp:new Date,analysisDurationMs:Date.now()-e}}async detectFrameworks(){let e=[];for(let t of be){let n=t.detect(this.projectRoot);n&&e.push(n)}return e.sort((t,n)=>n.confidence-t.confidence)}async detectLanguages(){let e=new Map,t=0;Q(this.projectRoot,i=>{let s=ie(i).toLowerCase();if(s){for(let o of ke)if(o.extensions.includes(s)){let a=e.get(o.name)||{count:0,extensions:new Set};a.count++,a.extensions.add(s),e.set(o.name,a),t++;break}}});let n=[];for(let[i,s]of e)n.push({name:i,percentage:t>0?Math.round(s.count/t*100):0,fileCount:s.count,extensions:Array.from(s.extensions)});return n.sort((i,s)=>s.fileCount-i.fileCount)}async detectExistingTests(){let e={totalCount:0,byFramework:{},byType:{unit:0,integration:0,e2e:0,unknown:0},directories:[]},t=new Set,n=[/\.test\.[jt]sx?$/,/\.spec\.[jt]sx?$/,/_test\.[jt]sx?$/,/test_.*\.py$/,/.*_test\.py$/,/.*_test\.go$/,/.*Test\.java$/];return Q(this.projectRoot,i=>{let s=re(i);if(n.some(a=>a.test(s))){e.totalCount++;let a=V(this.projectRoot,i).toLowerCase();a.includes("e2e")||a.includes("cypress")||a.includes("playwright")?e.byType.e2e++:a.includes("integration")||a.includes("int-test")?e.byType.integration++:a.includes("unit")||a.includes("__tests__")||a.includes("test/")?e.byType.unit++:e.byType.unknown++;let l=V(this.projectRoot,u(i,".."));t.add(l)}}),e.directories=Array.from(t).slice(0,10),e}async analyzeComplexity(){let e=[],t=[],n=0,i=0;Q(this.projectRoot,a=>{let l=ie(a);if([".ts",".tsx",".js",".jsx",".py",".java",".go"].includes(l))try{let g=w(a,"utf-8"),c=this.calculateFileComplexity(g,l);t.push(...c.functionComplexities),c.maxComplexity>n&&(n=c.maxComplexity),i++,c.maxComplexity>10&&e.push(V(this.projectRoot,a))}catch(g){console.debug("[ProjectAnalyzer] Complexity analysis read failed:",g instanceof Error?g.message:g)}});let s=t.reduce((a,l)=>a+l,0),o=t.length>0?s/t.length:0;return{averageCyclomatic:Math.round(o*10)/10,maxCyclomatic:n,totalFiles:i,complexFiles:e.slice(0,20),recommendation:o<5?"simple":o<15?"medium":"complex"}}calculateFileComplexity(e,t){let n=this.stripCommentsAndStrings(e,t),i=this.calculateComplexity(n);return{functionComplexities:[i],maxComplexity:i}}removeDelimitedBlocks(e,t,n){let i="",s=0;for(;s<e.length;){let o=e.indexOf(t,s);if(o===-1){i+=e.slice(s);break}i+=e.slice(s,o);let a=e.indexOf(n,o+t.length);if(a===-1)break;s=a+n.length}return i}stripCommentsAndStrings(e,t){let n=e;return[".ts",".tsx",".js",".jsx",".java",".go"].includes(t)?(n=n.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.12.2");process.exit(0)}
2
+ import{a as b}from"./chunk-ZL7ZOIHO.js";import{a as te,b as ne}from"./chunk-3AJUJAUJ.js";import{b as ee}from"./chunk-N57BKUVE.js";import{b as E,d as ve}from"./chunk-CKFZOPZN.js";import{a as k,c as T}from"./chunk-X47GHZY3.js";var ke={M:16,efConstruction:200,efSearch:100},P={enabled:!0,pretrainedPatterns:!0,hnswConfig:ke,promotionThreshold:3,qualityThreshold:.7,embeddingModel:"auto"},_={mode:"hybrid",confidenceThreshold:.7,feedbackEnabled:!0,cacheEnabled:!0,cacheTTLMs:300*1e3},F={enabled:["pattern-consolidator","coverage-gap-scanner","flaky-test-detector","routing-accuracy-monitor"],intervals:{"pattern-consolidator":1800*1e3,"coverage-gap-scanner":3600*1e3,"flaky-test-detector":7200*1e3,"routing-accuracy-monitor":900*1e3},maxConcurrent:4,daemonAutoStart:!0},$={claudeCode:!0,preCommit:!1,ciIntegration:!1},N={install:!0,installV2:!0,installV3:!0,overwrite:!1},O={enabled:!0,parameters:["hnsw.efSearch","routing.confidenceThreshold","pattern.promotionThreshold","testGen.complexityLimit"],tuningIntervalMs:10080*60*1e3,evaluationPeriodMs:5e3};var L=["test-generation","test-execution","coverage-analysis","quality-assessment","defect-intelligence","requirements-validation","code-intelligence","security-compliance","contract-testing","visual-accessibility","chaos-resilience","learning-optimization","enterprise-integration"];function M(){return"3.12.2"}function Ve(r,e){return{version:M(),project:{name:r,root:e,type:"single"},learning:P,routing:_,workers:F,hooks:$,skills:N,autoTuning:O,domains:{enabled:L,disabled:[]},agents:{maxConcurrent:15,defaultTimeout:6e4}}}ve();import{readFileSync as C,existsSync as p,statSync as be,readdirSync as xe}from"fs";import{join as g,basename as re,extname as ie,relative as V}from"path";var Se=[{name:"jest",detect:r=>{let e=["jest.config.js","jest.config.ts","jest.config.mjs","jest.config.cjs"];for(let n of e)if(p(g(r,n)))return{name:"jest",version:A(r,"jest"),configFile:n,confidence:1};let t=S(r);return t?.jest?{name:"jest",version:A(r,"jest"),configFile:"package.json",confidence:.9}:t?.devDependencies?.jest||t?.dependencies?.jest?{name:"jest",version:t.devDependencies?.jest||t.dependencies?.jest,confidence:.7}:null}},{name:"vitest",detect:r=>{let e=["vitest.config.ts","vitest.config.js","vitest.config.mts","vite.config.ts"];for(let n of e)if(p(g(r,n)))return{name:"vitest",version:A(r,"vitest"),configFile:n,confidence:1};let t=S(r);return t?.devDependencies?.vitest||t?.dependencies?.vitest?{name:"vitest",version:t.devDependencies?.vitest,confidence:.8}:null}},{name:"mocha",detect:r=>{let e=[".mocharc.js",".mocharc.json",".mocharc.yaml",".mocharc.yml"];for(let n of e)if(p(g(r,n)))return{name:"mocha",version:A(r,"mocha"),configFile:n,confidence:1};let t=S(r);return t?.devDependencies?.mocha?{name:"mocha",version:t.devDependencies?.mocha,confidence:.8}:null}},{name:"pytest",detect:r=>{let e=["pytest.ini","pyproject.toml","setup.cfg"];for(let n of e){let i=g(r,n);if(p(i))try{let s=C(i,"utf-8");if(s.includes("[pytest]")||s.includes("[tool.pytest]"))return{name:"pytest",configFile:n,confidence:1}}catch(s){console.debug("[ProjectAnalyzer] Config read failed:",s instanceof Error?s.message:s)}}let t=g(r,"requirements.txt");if(p(t))try{if(C(t,"utf-8").includes("pytest"))return{name:"pytest",configFile:"requirements.txt",confidence:.8}}catch(n){console.debug("[ProjectAnalyzer] requirements.txt read failed:",n instanceof Error?n.message:n)}return null}},{name:"playwright",detect:r=>{let e=["playwright.config.ts","playwright.config.js"];for(let n of e)if(p(g(r,n)))return{name:"playwright",version:A(r,"@playwright/test"),configFile:n,confidence:1};let t=S(r);return t?.devDependencies?.["@playwright/test"]?{name:"playwright",version:t.devDependencies["@playwright/test"],confidence:.8}:null}},{name:"cypress",detect:r=>{let e=["cypress.config.ts","cypress.config.js","cypress.json"];for(let t of e)if(p(g(r,t)))return{name:"cypress",version:A(r,"cypress"),configFile:t,confidence:1};return p(g(r,"cypress"))?{name:"cypress",configFile:"cypress/",confidence:.9}:null}}],Ae=[{name:"typescript",extensions:[".ts",".tsx",".mts",".cts"]},{name:"javascript",extensions:[".js",".jsx",".mjs",".cjs"]},{name:"python",extensions:[".py",".pyw"]},{name:"java",extensions:[".java"]},{name:"go",extensions:[".go"]},{name:"rust",extensions:[".rs"]},{name:"csharp",extensions:[".cs"]},{name:"ruby",extensions:[".rb"]},{name:"php",extensions:[".php"]},{name:"kotlin",extensions:[".kt",".kts"]},{name:"swift",extensions:[".swift"]}];function S(r){let e=g(r,"package.json");if(!p(e))return null;try{return E(C(e,"utf-8"))}catch{return null}}function A(r,e){let t=S(r);if(t)return t.devDependencies?.[e]||t.dependencies?.[e]}function Q(r,e,t={}){let{maxDepth:n=10,exclude:i=["node_modules",".git","dist","build","coverage",".next","__pycache__"]}=t;function s(o,a){if(a>n)return;let l;try{l=xe(o)}catch{return}for(let u of l){if(i.includes(u))continue;let c=g(o,u),x;try{x=be(c)}catch{continue}x.isDirectory()?s(c,a+1):x.isFile()&&e(c)}}s(r,0)}var W=class{projectRoot;constructor(e){this.projectRoot=e}async analyze(){let e=Date.now(),[t,n,i,s,o]=await Promise.all([this.detectFrameworks(),this.detectLanguages(),this.detectExistingTests(),this.analyzeComplexity(),this.measureCoverage()]);return{projectName:S(this.projectRoot)?.name||re(this.projectRoot),projectRoot:this.projectRoot,projectType:this.detectProjectType(),frameworks:t,languages:n,existingTests:i,codeComplexity:s,coverage:o,packageManager:this.detectPackageManager(),hasTypeScript:p(g(this.projectRoot,"tsconfig.json")),hasCIConfig:this.detectCIConfig(),ciProvider:this.detectCIProvider(),analysisTimestamp:new Date,analysisDurationMs:Date.now()-e}}async detectFrameworks(){let e=[];for(let t of Se){let n=t.detect(this.projectRoot);n&&e.push(n)}return e.sort((t,n)=>n.confidence-t.confidence)}async detectLanguages(){let e=new Map,t=0;Q(this.projectRoot,i=>{let s=ie(i).toLowerCase();if(s){for(let o of Ae)if(o.extensions.includes(s)){let a=e.get(o.name)||{count:0,extensions:new Set};a.count++,a.extensions.add(s),e.set(o.name,a),t++;break}}});let n=[];for(let[i,s]of e)n.push({name:i,percentage:t>0?Math.round(s.count/t*100):0,fileCount:s.count,extensions:Array.from(s.extensions)});return n.sort((i,s)=>s.fileCount-i.fileCount)}async detectExistingTests(){let e={totalCount:0,byFramework:{},byType:{unit:0,integration:0,e2e:0,unknown:0},directories:[]},t=new Set,n=[/\.test\.[jt]sx?$/,/\.spec\.[jt]sx?$/,/_test\.[jt]sx?$/,/test_.*\.py$/,/.*_test\.py$/,/.*_test\.go$/,/.*Test\.java$/];return Q(this.projectRoot,i=>{let s=re(i);if(n.some(a=>a.test(s))){e.totalCount++;let a=V(this.projectRoot,i).toLowerCase();a.includes("e2e")||a.includes("cypress")||a.includes("playwright")?e.byType.e2e++:a.includes("integration")||a.includes("int-test")?e.byType.integration++:a.includes("unit")||a.includes("__tests__")||a.includes("test/")?e.byType.unit++:e.byType.unknown++;let l=V(this.projectRoot,g(i,".."));t.add(l)}}),e.directories=Array.from(t).slice(0,10),e}async analyzeComplexity(){let e=[],t=[],n=0,i=0;Q(this.projectRoot,a=>{let l=ie(a);if([".ts",".tsx",".js",".jsx",".py",".java",".go"].includes(l))try{let u=C(a,"utf-8"),c=this.calculateFileComplexity(u,l);t.push(...c.functionComplexities),c.maxComplexity>n&&(n=c.maxComplexity),i++,c.maxComplexity>10&&e.push(V(this.projectRoot,a))}catch(u){console.debug("[ProjectAnalyzer] Complexity analysis read failed:",u instanceof Error?u.message:u)}});let s=t.reduce((a,l)=>a+l,0),o=t.length>0?s/t.length:0;return{averageCyclomatic:Math.round(o*10)/10,maxCyclomatic:n,totalFiles:i,complexFiles:e.slice(0,20),recommendation:o<5?"simple":o<15?"medium":"complex"}}calculateFileComplexity(e,t){let n=this.stripCommentsAndStrings(e,t),i=this.calculateComplexity(n);return{functionComplexities:[i],maxComplexity:i}}removeDelimitedBlocks(e,t,n){let i="",s=0;for(;s<e.length;){let o=e.indexOf(t,s);if(o===-1){i+=e.slice(s);break}i+=e.slice(s,o);let a=e.indexOf(n,o+t.length);if(a===-1)break;s=a+n.length}return i}stripCommentsAndStrings(e,t){let n=e;return[".ts",".tsx",".js",".jsx",".java",".go"].includes(t)?(n=n.split(`
3
3
  `).map(i=>{let s=i.indexOf("//");return s>=0?i.slice(0,s):i}).join(`
4
4
  `),n=this.removeDelimitedBlocks(n,"/*","*/"),n=this.removeDelimitedBlocks(n,"`","`"),n=this.removeDelimitedBlocks(n,'"','"'),n=this.removeDelimitedBlocks(n,"'","'")):t===".py"&&(n=n.split(`
5
5
  `).map(i=>{let s=i.indexOf("#");return s>=0?i.slice(0,s):i}).join(`
6
- `),n=this.removeDelimitedBlocks(n,'"""','"""'),n=this.removeDelimitedBlocks(n,"'''","'''"),n=this.removeDelimitedBlocks(n,'"','"'),n=this.removeDelimitedBlocks(n,"'","'")),n}calculateComplexity(e){let t=1,n=[{pattern:/(?<![a-zA-Z])if\s*\(/g,name:"if"},{pattern:/\bfor\s*\(/g,name:"for"},{pattern:/\bwhile\s*\(/g,name:"while"},{pattern:/\bcase\s+[^:]+:/g,name:"case"},{pattern:/\bcatch\s*\(/g,name:"catch"},{pattern:/&&/g,name:"&&"},{pattern:/\|\|/g,name:"||"},{pattern:/\?[^?:]+:/g,name:"ternary"},{pattern:/\belif\s+/g,name:"elif"},{pattern:/\bexcept\s*(?:\w+)?:/g,name:"except"},{pattern:/\bfor\s+\w+\s+in\s+/g,name:"for-in"},{pattern:/\bselect\s*\{/g,name:"select"}];for(let{pattern:i}of n){let s=e.match(i);s&&(t+=s.length)}return t}async measureCoverage(){let e=["coverage/lcov-report/index.html","coverage/coverage-summary.json","coverage/clover.xml","coverage/lcov.info","htmlcov/index.html"];for(let t of e){let n=u(this.projectRoot,t);if(p(n)){if(t.endsWith(".json"))try{let s=E(w(n,"utf-8")).total||{};return{lines:s.lines?.pct||0,branches:s.branches?.pct||0,functions:s.functions?.pct||0,statements:s.statements?.pct||0,hasReport:!0,reportPath:t}}catch(i){console.debug("[ProjectAnalyzer] Coverage report parse failed:",i instanceof Error?i.message:i)}return{lines:0,branches:0,functions:0,statements:0,hasReport:!0,reportPath:t}}}return{lines:0,branches:0,functions:0,statements:0,hasReport:!1}}detectProjectType(){if(p(u(this.projectRoot,"lerna.json"))||p(u(this.projectRoot,"pnpm-workspace.yaml"))||p(u(this.projectRoot,"packages")))return"monorepo";let e=S(this.projectRoot);return e?.workspaces?"monorepo":e?.main||e?.module||e?.exports?"library":"single"}detectPackageManager(){return p(u(this.projectRoot,"bun.lockb"))?"bun":p(u(this.projectRoot,"pnpm-lock.yaml"))?"pnpm":p(u(this.projectRoot,"yarn.lock"))?"yarn":p(u(this.projectRoot,"package-lock.json"))?"npm":"unknown"}detectCIConfig(){return[".github/workflows",".gitlab-ci.yml","Jenkinsfile",".circleci/config.yml",".travis.yml","azure-pipelines.yml"].some(t=>p(u(this.projectRoot,t)))}detectCIProvider(){if(p(u(this.projectRoot,".github/workflows")))return"github-actions";if(p(u(this.projectRoot,".gitlab-ci.yml")))return"gitlab-ci";if(p(u(this.projectRoot,"Jenkinsfile")))return"jenkins";if(p(u(this.projectRoot,".circleci/config.yml")))return"circleci";if(this.detectCIConfig())return"other"}};function Me(r){return new W(r)}var se=[{name:"typescript-vitest",condition:r=>r.hasTypeScript&&r.frameworks.some(e=>e.name==="vitest"),apply:r=>{r.learning.embeddingModel="transformer",r.routing.confidenceThreshold=.75}},{name:"large-codebase",condition:r=>r.codeComplexity.totalFiles>500,apply:r=>{r.learning.hnswConfig.M=32,r.learning.hnswConfig.efConstruction=400,r.learning.hnswConfig.efSearch=200,r.agents.maxConcurrent=15}},{name:"small-project",condition:r=>r.codeComplexity.totalFiles<50,apply:r=>{r.learning.hnswConfig.M=8,r.learning.hnswConfig.efConstruction=100,r.workers.enabled=["pattern-consolidator","routing-accuracy-monitor"],r.workers.maxConcurrent=2,r.agents.maxConcurrent=5}},{name:"high-complexity",condition:r=>r.codeComplexity.recommendation==="complex",apply:r=>{r.autoTuning.parameters.push("complexity.analysisDepth"),r.domains.enabled=L}},{name:"low-coverage",condition:r=>r.coverage.hasReport&&r.coverage.lines<50,apply:r=>{r.workers.enabled.push("coverage-gap-scanner"),r.workers.intervals["coverage-gap-scanner"]=1800*1e3}},{name:"monorepo",condition:r=>r.projectType==="monorepo",apply:r=>{r.agents.maxConcurrent=15,r.workers.maxConcurrent=6,r.domains.enabled=[...new Set([...r.domains.enabled,"code-intelligence"])]}},{name:"has-e2e",condition:r=>r.frameworks.some(e=>["playwright","cypress"].includes(e.name))||r.existingTests.byType.e2e>0,apply:r=>{r.domains.enabled=[...new Set([...r.domains.enabled,"visual-accessibility","chaos-resilience"])]}},{name:"has-ci",condition:r=>r.hasCIConfig,apply:r=>{r.hooks.ciIntegration=!0,r.domains.enabled=[...new Set([...r.domains.enabled,"quality-assessment"])]}},{name:"github-actions",condition:r=>r.ciProvider==="github-actions",apply:r=>{r.hooks.ciIntegration=!0,r.hooks.claudeCode=!0}},{name:"python-project",condition:r=>r.languages.some(e=>e.name==="python"&&e.percentage>30),apply:r=>{r.routing.mode="hybrid",r.domains.enabled=[...new Set([...r.domains.enabled,"security-compliance"])]}},{name:"java-project",condition:r=>r.languages.some(e=>e.name==="java"&&e.percentage>30),apply:r=>{r.agents.defaultTimeout=12e4}},{name:"no-tests",condition:r=>r.existingTests.totalCount===0,apply:r=>{r.workers.enabled=["pattern-consolidator"],r.learning.qualityThreshold=.5,r.learning.promotionThreshold=2}},{name:"many-tests",condition:r=>r.existingTests.totalCount>500,apply:r=>{r.workers.enabled=[...new Set([...r.workers.enabled,"flaky-test-detector"])],r.domains.enabled=[...new Set([...r.domains.enabled,"test-execution"])]}},{name:"security-focus",condition:r=>r.codeComplexity.totalFiles>100,apply:r=>{r.domains.enabled=[...new Set([...r.domains.enabled,"security-compliance"])]}}],z=class{rules;constructor(e={}){this.rules=e.minimal?se.filter(t=>["typescript-vitest","large-codebase","small-project"].includes(t.name)):[...se,...e.customRules||[]]}recommend(e){let t={version:M(),project:{name:e.projectName,root:e.projectRoot,type:e.projectType==="unknown"?"single":e.projectType},learning:this.recommendLearning(e),routing:this.recommendRouting(e),workers:this.recommendWorkers(e),hooks:this.recommendHooks(e),skills:this.recommendSkills(e),autoTuning:this.recommendAutoTuning(e),domains:{enabled:this.recommendDomains(e),disabled:[]},agents:{maxConcurrent:this.recommendMaxAgents(e),defaultTimeout:6e4}},n=[];for(let i of this.rules)i.condition(e)&&(i.apply(t,e),n.push(i.name));return t.domains.enabled=[...new Set(t.domains.enabled)],t.workers.enabled=[...new Set(t.workers.enabled)],t}getApplicableRules(e){return this.rules.filter(t=>t.condition(e)).map(t=>t.name)}recommendLearning(e){let t={...P};return e.codeComplexity.totalFiles>1e3?t.hnswConfig={M:32,efConstruction:400,efSearch:200}:e.codeComplexity.totalFiles<100&&(t.hnswConfig={M:8,efConstruction:100,efSearch:50}),e.languages.some(n=>["typescript","javascript"].includes(n.name))&&(t.embeddingModel="transformer"),t}recommendRouting(e){let t={..._};return e.codeComplexity.recommendation==="simple"?t.mode="rules":e.codeComplexity.recommendation==="complex"?t.mode="ml":t.mode="hybrid",t}recommendWorkers(e){let t={...F},n=new Set(["pattern-consolidator","routing-accuracy-monitor"]);return(!e.coverage.hasReport||e.coverage.lines<70)&&n.add("coverage-gap-scanner"),e.existingTests.totalCount>100&&n.add("flaky-test-detector"),t.enabled=Array.from(n),e.codeComplexity.totalFiles>500?t.maxConcurrent=6:e.codeComplexity.totalFiles<50&&(t.maxConcurrent=2),t}recommendHooks(e){let t={...N};return t.ciIntegration=e.hasCIConfig,t.preCommit=e.existingTests.totalCount>50,t}recommendSkills(e){let t={...$};return t.install=!0,t.installV2=!0,t.installV3=!0,t}recommendAutoTuning(e){let t={...O};return e.codeComplexity.totalFiles<20&&(t.enabled=!1),t}recommendDomains(e){return["test-generation","test-execution","coverage-analysis","quality-assessment","defect-intelligence","requirements-validation","code-intelligence","security-compliance","contract-testing","visual-accessibility","chaos-resilience","learning-optimization"]}recommendMaxAgents(e){return e.projectType==="monorepo"?15:e.codeComplexity.totalFiles>500?12:e.codeComplexity.totalFiles>100?8:5}};function We(r){return new z(r)}var xe=[/\baqe\b/i,/\bagentic-qe\b/i,/\bnpx\s+agentic-qe\b/i,/\bnpx\s+@anthropics\/agentic-qe\b/i,/brain-checkpoint\.cjs/i,/\.claude\/helpers\//i,/\bruflo\b/i,/dist\/cli\/bundle\.js/i];function Se(r){let e=r;return!e?.hooks||!Array.isArray(e.hooks)?!1:e.hooks.some(t=>!t.command||typeof t.command!="string"?!1:xe.some(n=>n.test(t.command)))}function Ge(r,e){let t={};for(let[n,i]of Object.entries(e)){let s=r[n]||[],o=Array.isArray(s)?s.filter(a=>!Se(a)):[];t[n]=[...i,...o]}for(let[n,i]of Object.entries(r))t[n]||(t[n]=i);return t}function Ue(r){let e=r.domains?.enabled||[];return{AQE_MEMORY_PATH:".agentic-qe/memory.db",AQE_MEMORY_ENABLED:"true",AQE_LEARNING_ENABLED:r.learning?.enabled?"true":"false",AQE_V3_MODE:"true",AQE_V3_DDD_ENABLED:"true",AQE_V3_DOMAINS:e.join(","),AQE_V3_SWARM_SIZE:String(r.agents?.maxConcurrent??15),AQE_V3_TOPOLOGY:"hierarchical",AQE_V3_SUBLINEAR_ENABLED:"true",AQE_V3_HNSW_ENABLED:r.learning?.hnswConfig?"true":"false",AQE_V3_HOOKS_ENABLED:"true",AQE_V3_AISP_ENABLED:"true",AQE_V3_REASONING_BANK:".agentic-qe/memory.db",AQE_V3_PATTERN_PROMOTION_THRESHOLD:String(r.learning?.promotionThreshold??3),AQE_V3_SUCCESS_RATE_THRESHOLD:String(r.learning?.qualityThreshold??.7)}}function He(r,e){let t=r.domains?.enabled||[];return{aqe:{version:r.version??"3.0.0",initialized:new Date().toISOString(),hooksConfigured:!0},statusLine:{type:"command",command:`sh -c 'node "\${CLAUDE_PROJECT_DIR:-.}/.claude/helpers/statusline-v3.cjs" 2>/dev/null || echo "\u258A Agentic QE v3"'`,refreshMs:5e3,enabled:!0},_aqePermissions:["Bash(npx agentic-qe:*)","Bash(npx @anthropics/agentic-qe:*)","mcp__agentic-qe__*"],includeCoAuthoredBy:!0,v3Configuration:{domains:{total:t.length,names:t},swarm:{totalAgents:r.agents?.maxConcurrent??15,topology:"hierarchical",coordination:"queen-led"}},v3Learning:{enabled:r.learning?.enabled??!0,reasoningBank:{dbPath:".agentic-qe/memory.db",enableHNSW:!!r.learning?.hnswConfig},patternPromotion:{threshold:r.learning?.promotionThreshold??3,successRateMin:r.learning?.qualityThreshold??.7}}}}T();import{existsSync as h,mkdirSync as j,readdirSync as R,statSync as G,readFileSync as Ae,writeFileSync as Ce,copyFileSync as we,unlinkSync as De,rmdirSync as je}from"fs";import{join as m}from"path";var U=["qe-test-generation","qe-test-execution","qe-coverage-analysis","qe-quality-assessment","qe-defect-intelligence","qe-requirements-validation","qe-code-intelligence","qe-browser","pentest-validation","qe-visual-accessibility","qe-chaos-resilience","qe-learning-optimization","qe-iterative-loop","strict-tdd","no-skip","coverage-guard","freeze-tests","security-watch","skill-stats","test-failure-investigator","coverage-drop-investigator","e2e-flow-verifier","test-metrics-dashboard"],H=["v3-core-implementation","v3-cli-modernization","v3-ddd-architecture","v3-integration-deep","v3-mcp-optimization","v3-memory-unification","v3-performance-optimization","v3-security-overhaul","v3-swarm-coordination","v3-qe-core-implementation","v3-qe-ddd-architecture","v3-qe-cli","v3-qe-memory-system","v3-qe-performance","v3-qe-security","v3-qe-mcp","v3-qe-mcp-optimization","v3-qe-memory-unification","v3-qe-integration","v3-qe-agentic-flow-integration","v3-qe-fleet-coordination","agentdb-advanced","agentdb-learning","agentdb-memory-patterns","agentdb-optimization","agentdb-vector-search","github-code-review","github-multi-repo","github-project-management","github-release-management","github-workflow-automation","flow-nexus-neural","flow-nexus-platform","flow-nexus-swarm","reasoningbank-agentdb","reasoningbank-intelligence","swarm-orchestration","swarm-advanced","sparc-methodology","hooks-automation","hive-mind-advanced","stream-chain","agentic-jujutsu","iterative-loop","performance-analysis","skill-builder","qe-agentic-flow-integration","release"],Re=["qe-contract-testing","qe-security-compliance","aqe-v2-v3-migration"],B=class{projectRoot;options;sourceSkillsDir;constructor(e){this.projectRoot=e.projectRoot,this.options={installV2Skills:!0,installV3Skills:!0,overwrite:!1,exclude:[],include:void 0,...e},this.sourceSkillsDir=this.findSourceSkillsDir()}findSourceSkillsDir(){let e=k(import.meta.url),t=[];e&&(t.push(m(e,"assets/skills")),t.push(m(e,".claude/skills"))),t.push(m(this.projectRoot,"node_modules/agentic-qe/assets/skills"));for(let n of t)if(h(n))return n;return t[0]}async install(){let e={installed:[],skipped:[],removed:[],errors:[],totalCount:0,skillsDir:m(this.projectRoot,".claude","skills"),validationInstalled:!1};if(!h(this.sourceSkillsDir))return e.errors.push(`Source skills directory not found: ${this.sourceSkillsDir}`),e;let t=m(this.projectRoot,".claude","skills");h(t)||j(t,{recursive:!0});let n=this.getAvailableSkills();e.totalCount=n.length;let i=this.filterSkills(n);for(let s of i)try{let o=await this.installSkill(s,t);o?e.installed.push(o):e.skipped.push(s)}catch(o){e.errors.push(`Failed to install ${s}: ${b(o)}`)}return this.options.overwrite&&(e.removed=this.removeDeprecatedSkills(t)),e.validationInstalled=this.installValidationInfrastructure(t),await this.createSkillsIndex(t,e.installed),e}installValidationInfrastructure(e){let t=m(this.sourceSkillsDir,".validation"),n=m(e,".validation");if(!h(t))return console.debug("[SkillsInstaller] Validation infrastructure not found in source"),!1;if(h(n)&&!this.options.overwrite)return console.debug("[SkillsInstaller] Validation infrastructure already exists, skipping"),!0;try{return h(n)||j(n,{recursive:!0}),this.copyDirectoryRecursive(t,n),console.debug("[SkillsInstaller] Validation infrastructure installed successfully"),!0}catch(i){return console.error("[SkillsInstaller] Failed to install validation infrastructure:",i instanceof Error?i.message:i),!1}}removeDeprecatedSkills(e){let t=[];for(let n of Re){let i=m(e,n);if(h(i))try{this.removeDirectoryRecursive(i),t.push(n)}catch(s){console.error(`[SkillsInstaller] Failed to remove deprecated skill ${n}:`,s instanceof Error?s.message:s)}}return t.length>0&&console.debug(`[SkillsInstaller] Removed ${t.length} deprecated skills: ${t.join(", ")}`),t}removeDirectoryRecursive(e){let t=R(e,{withFileTypes:!0});for(let n of t){let i=m(e,n.name);n.isDirectory()?this.removeDirectoryRecursive(i):De(i)}je(e)}getAvailableSkills(){try{return R(this.sourceSkillsDir).filter(t=>{let n=m(this.sourceSkillsDir,t);return G(n).isDirectory()&&!t.startsWith(".")})}catch{return[]}}filterSkills(e){let t=e;return t=t.filter(n=>!H.includes(n)),this.options.include&&this.options.include.length>0&&(t=t.filter(n=>this.options.include.includes(n))),this.options.exclude&&this.options.exclude.length>0&&(t=t.filter(n=>!this.options.exclude.some(i=>n.includes(i)||n.match(new RegExp(i))))),this.options.installV3Skills||(t=t.filter(n=>!U.includes(n))),this.options.installV2Skills||(t=t.filter(n=>U.includes(n))),t}async installSkill(e,t){let n=m(this.sourceSkillsDir,e),i=m(t,e);if(h(i)&&!this.options.overwrite)return null;h(i)||j(i,{recursive:!0}),this.copyDirectoryRecursive(n,i);let s=this.getSkillType(e),o=this.getSkillDescription(i),a=h(m(i,"resources"));return{name:e,type:s,description:o,hasResources:a}}copyDirectoryRecursive(e,t){let n=R(e);for(let i of n){let s=m(e,i),o=m(t,i);G(s).isDirectory()?(h(o)||j(o,{recursive:!0}),this.copyDirectoryRecursive(s,o)):we(s,o)}}getSkillType(e){return U.includes(e)?"v3-domain":"v2-methodology"}getSkillDescription(e){let t=m(e,"SKILL.md");if(h(t))try{let n=Ae(t,"utf-8"),i=n.match(/description:\s*["']?([^"'\n]+)["']?/i);if(i)return i[1].trim();let s=n.split(`
7
- `);for(let o of s){let a=o.trim();if(a&&!a.startsWith("#")&&!a.startsWith("-")&&!a.startsWith("```"))return a.slice(0,100)+(a.length>100?"...":"")}}catch(n){console.debug("[SkillsInstaller] Failed to read skill description:",n instanceof Error?n.message:n)}}async createSkillsIndex(e,t){let n=this.scanSkillsDirectory(e),i=n.filter(c=>!H.includes(c.name)),s=i.filter(c=>c.type==="v2-methodology"),o=i.filter(c=>c.type==="v3-domain"),a=n.filter(c=>H.includes(c.name)),l=h(m(e,".validation")),g=`# AQE Skills Index
6
+ `),n=this.removeDelimitedBlocks(n,'"""','"""'),n=this.removeDelimitedBlocks(n,"'''","'''"),n=this.removeDelimitedBlocks(n,'"','"'),n=this.removeDelimitedBlocks(n,"'","'")),n}calculateComplexity(e){let t=1,n=[{pattern:/(?<![a-zA-Z])if\s*\(/g,name:"if"},{pattern:/\bfor\s*\(/g,name:"for"},{pattern:/\bwhile\s*\(/g,name:"while"},{pattern:/\bcase\s+[^:]+:/g,name:"case"},{pattern:/\bcatch\s*\(/g,name:"catch"},{pattern:/&&/g,name:"&&"},{pattern:/\|\|/g,name:"||"},{pattern:/\?[^?:]+:/g,name:"ternary"},{pattern:/\belif\s+/g,name:"elif"},{pattern:/\bexcept\s*(?:\w+)?:/g,name:"except"},{pattern:/\bfor\s+\w+\s+in\s+/g,name:"for-in"},{pattern:/\bselect\s*\{/g,name:"select"}];for(let{pattern:i}of n){let s=e.match(i);s&&(t+=s.length)}return t}async measureCoverage(){let e=["coverage/lcov-report/index.html","coverage/coverage-summary.json","coverage/clover.xml","coverage/lcov.info","htmlcov/index.html"];for(let t of e){let n=g(this.projectRoot,t);if(p(n)){if(t.endsWith(".json"))try{let s=E(C(n,"utf-8")).total||{};return{lines:s.lines?.pct||0,branches:s.branches?.pct||0,functions:s.functions?.pct||0,statements:s.statements?.pct||0,hasReport:!0,reportPath:t}}catch(i){console.debug("[ProjectAnalyzer] Coverage report parse failed:",i instanceof Error?i.message:i)}return{lines:0,branches:0,functions:0,statements:0,hasReport:!0,reportPath:t}}}return{lines:0,branches:0,functions:0,statements:0,hasReport:!1}}detectProjectType(){if(p(g(this.projectRoot,"lerna.json"))||p(g(this.projectRoot,"pnpm-workspace.yaml"))||p(g(this.projectRoot,"packages")))return"monorepo";let e=S(this.projectRoot);return e?.workspaces?"monorepo":e?.main||e?.module||e?.exports?"library":"single"}detectPackageManager(){return p(g(this.projectRoot,"bun.lockb"))?"bun":p(g(this.projectRoot,"pnpm-lock.yaml"))?"pnpm":p(g(this.projectRoot,"yarn.lock"))?"yarn":p(g(this.projectRoot,"package-lock.json"))?"npm":"unknown"}detectCIConfig(){return[".github/workflows",".gitlab-ci.yml","Jenkinsfile",".circleci/config.yml",".travis.yml","azure-pipelines.yml"].some(t=>p(g(this.projectRoot,t)))}detectCIProvider(){if(p(g(this.projectRoot,".github/workflows")))return"github-actions";if(p(g(this.projectRoot,".gitlab-ci.yml")))return"gitlab-ci";if(p(g(this.projectRoot,"Jenkinsfile")))return"jenkins";if(p(g(this.projectRoot,".circleci/config.yml")))return"circleci";if(this.detectCIConfig())return"other"}};function Ue(r){return new W(r)}var se=[{name:"typescript-vitest",condition:r=>r.hasTypeScript&&r.frameworks.some(e=>e.name==="vitest"),apply:r=>{r.learning.embeddingModel="transformer",r.routing.confidenceThreshold=.75}},{name:"large-codebase",condition:r=>r.codeComplexity.totalFiles>500,apply:r=>{r.learning.hnswConfig.M=32,r.learning.hnswConfig.efConstruction=400,r.learning.hnswConfig.efSearch=200,r.agents.maxConcurrent=15}},{name:"small-project",condition:r=>r.codeComplexity.totalFiles<50,apply:r=>{r.learning.hnswConfig.M=8,r.learning.hnswConfig.efConstruction=100,r.workers.enabled=["pattern-consolidator","routing-accuracy-monitor"],r.workers.maxConcurrent=2,r.agents.maxConcurrent=5}},{name:"high-complexity",condition:r=>r.codeComplexity.recommendation==="complex",apply:r=>{r.autoTuning.parameters.push("complexity.analysisDepth"),r.domains.enabled=L}},{name:"low-coverage",condition:r=>r.coverage.hasReport&&r.coverage.lines<50,apply:r=>{r.workers.enabled.push("coverage-gap-scanner"),r.workers.intervals["coverage-gap-scanner"]=1800*1e3}},{name:"monorepo",condition:r=>r.projectType==="monorepo",apply:r=>{r.agents.maxConcurrent=15,r.workers.maxConcurrent=6,r.domains.enabled=[...new Set([...r.domains.enabled,"code-intelligence"])]}},{name:"has-e2e",condition:r=>r.frameworks.some(e=>["playwright","cypress"].includes(e.name))||r.existingTests.byType.e2e>0,apply:r=>{r.domains.enabled=[...new Set([...r.domains.enabled,"visual-accessibility","chaos-resilience"])]}},{name:"has-ci",condition:r=>r.hasCIConfig,apply:r=>{r.hooks.ciIntegration=!0,r.domains.enabled=[...new Set([...r.domains.enabled,"quality-assessment"])]}},{name:"github-actions",condition:r=>r.ciProvider==="github-actions",apply:r=>{r.hooks.ciIntegration=!0,r.hooks.claudeCode=!0}},{name:"python-project",condition:r=>r.languages.some(e=>e.name==="python"&&e.percentage>30),apply:r=>{r.routing.mode="hybrid",r.domains.enabled=[...new Set([...r.domains.enabled,"security-compliance"])]}},{name:"java-project",condition:r=>r.languages.some(e=>e.name==="java"&&e.percentage>30),apply:r=>{r.agents.defaultTimeout=12e4}},{name:"no-tests",condition:r=>r.existingTests.totalCount===0,apply:r=>{r.workers.enabled=["pattern-consolidator"],r.learning.qualityThreshold=.5,r.learning.promotionThreshold=2}},{name:"many-tests",condition:r=>r.existingTests.totalCount>500,apply:r=>{r.workers.enabled=[...new Set([...r.workers.enabled,"flaky-test-detector"])],r.domains.enabled=[...new Set([...r.domains.enabled,"test-execution"])]}},{name:"security-focus",condition:r=>r.codeComplexity.totalFiles>100,apply:r=>{r.domains.enabled=[...new Set([...r.domains.enabled,"security-compliance"])]}}],z=class{rules;constructor(e={}){this.rules=e.minimal?se.filter(t=>["typescript-vitest","large-codebase","small-project"].includes(t.name)):[...se,...e.customRules||[]]}recommend(e){let t={version:M(),project:{name:e.projectName,root:e.projectRoot,type:e.projectType==="unknown"?"single":e.projectType},learning:this.recommendLearning(e),routing:this.recommendRouting(e),workers:this.recommendWorkers(e),hooks:this.recommendHooks(e),skills:this.recommendSkills(e),autoTuning:this.recommendAutoTuning(e),domains:{enabled:this.recommendDomains(e),disabled:[]},agents:{maxConcurrent:this.recommendMaxAgents(e),defaultTimeout:6e4}},n=[];for(let i of this.rules)i.condition(e)&&(i.apply(t,e),n.push(i.name));return t.domains.enabled=[...new Set(t.domains.enabled)],t.workers.enabled=[...new Set(t.workers.enabled)],t}getApplicableRules(e){return this.rules.filter(t=>t.condition(e)).map(t=>t.name)}recommendLearning(e){let t={...P};return e.codeComplexity.totalFiles>1e3?t.hnswConfig={M:32,efConstruction:400,efSearch:200}:e.codeComplexity.totalFiles<100&&(t.hnswConfig={M:8,efConstruction:100,efSearch:50}),e.languages.some(n=>["typescript","javascript"].includes(n.name))&&(t.embeddingModel="transformer"),t}recommendRouting(e){let t={..._};return e.codeComplexity.recommendation==="simple"?t.mode="rules":e.codeComplexity.recommendation==="complex"?t.mode="ml":t.mode="hybrid",t}recommendWorkers(e){let t={...F},n=new Set(["pattern-consolidator","routing-accuracy-monitor"]);return(!e.coverage.hasReport||e.coverage.lines<70)&&n.add("coverage-gap-scanner"),e.existingTests.totalCount>100&&n.add("flaky-test-detector"),t.enabled=Array.from(n),e.codeComplexity.totalFiles>500?t.maxConcurrent=6:e.codeComplexity.totalFiles<50&&(t.maxConcurrent=2),t}recommendHooks(e){let t={...$};return t.ciIntegration=e.hasCIConfig,t.preCommit=e.existingTests.totalCount>50,t}recommendSkills(e){let t={...N};return t.install=!0,t.installV2=!0,t.installV3=!0,t}recommendAutoTuning(e){let t={...O};return e.codeComplexity.totalFiles<20&&(t.enabled=!1),t}recommendDomains(e){return["test-generation","test-execution","coverage-analysis","quality-assessment","defect-intelligence","requirements-validation","code-intelligence","security-compliance","contract-testing","visual-accessibility","chaos-resilience","learning-optimization"]}recommendMaxAgents(e){return e.projectType==="monorepo"?15:e.codeComplexity.totalFiles>500?12:e.codeComplexity.totalFiles>100?8:5}};function Ke(r){return new z(r)}import{existsSync as oe,readFileSync as we,writeFileSync as Ce}from"fs";function Ze(r){if(!oe(r))return null;let e=`${r}.backup`;if(oe(e))return null;try{return Ce(e,we(r,"utf-8"),"utf-8"),e}catch{return null}}var De=[/\baqe\b/i,/\bagentic-qe\b/i,/\bnpx\s+agentic-qe\b/i,/\bnpx\s+@anthropics\/agentic-qe\b/i,/aqe-hook\.cjs/i,/brain-checkpoint\.cjs/i,/statusline-v3\.cjs/i];function je(r){let e=r;return!e?.hooks||!Array.isArray(e.hooks)?!1:e.hooks.some(t=>!t.command||typeof t.command!="string"?!1:De.some(n=>n.test(t.command)))}function Xe(r,e){let t={};for(let[n,i]of Object.entries(e)){let s=r[n]||[],o=Array.isArray(s)?s.filter(a=>!je(a)):[];t[n]=[...i,...o]}for(let[n,i]of Object.entries(r))t[n]||(t[n]=i);return t}function et(r,e){return{...e,...r||{}}}function tt(r){let e=r.domains?.enabled||[];return{AQE_MEMORY_PATH:".agentic-qe/memory.db",AQE_MEMORY_ENABLED:"true",AQE_LEARNING_ENABLED:r.learning?.enabled?"true":"false",AQE_V3_MODE:"true",AQE_V3_DDD_ENABLED:"true",AQE_V3_DOMAINS:e.join(","),AQE_V3_SWARM_SIZE:String(r.agents?.maxConcurrent??15),AQE_V3_TOPOLOGY:"hierarchical",AQE_V3_SUBLINEAR_ENABLED:"true",AQE_V3_HNSW_ENABLED:r.learning?.hnswConfig?"true":"false",AQE_V3_HOOKS_ENABLED:"true",AQE_V3_AISP_ENABLED:"true",AQE_V3_REASONING_BANK:".agentic-qe/memory.db",AQE_V3_PATTERN_PROMOTION_THRESHOLD:String(r.learning?.promotionThreshold??3),AQE_V3_SUCCESS_RATE_THRESHOLD:String(r.learning?.qualityThreshold??.7)}}function Re(r){let e=r?.command;return typeof e=="string"&&/statusline-v3\.cjs|Agentic QE v3/.test(e)}function le(r,e){if(!ae(r)||!ae(e))return e;let t={...r};for(let[n,i]of Object.entries(e))t[n]=le(t[n],i);return t}function ae(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}function nt(r,e){for(let[t,n]of Object.entries(e))if(t==="_aqePermissions"){let i=r.permissions||{},s=i.allow||[],o=[...new Set([...s,...n])];r.permissions={...i,allow:o}}else t==="statusLine"?(r.statusLine===void 0||Re(r.statusLine))&&(r.statusLine=n):t==="includeCoAuthoredBy"?r.includeCoAuthoredBy===void 0&&(r.includeCoAuthoredBy=n):r[t]=le(r[t],n);return r}function rt(r,e){let t=r.domains?.enabled||[];return{aqe:{version:r.version??"3.0.0",initialized:new Date().toISOString(),hooksConfigured:!0},statusLine:{type:"command",command:`sh -c 'node "\${CLAUDE_PROJECT_DIR:-.}/.claude/helpers/statusline-v3.cjs" 2>/dev/null || echo "\u258A Agentic QE v3"'`,refreshMs:5e3,enabled:!0},_aqePermissions:["Bash(npx agentic-qe:*)","Bash(npx @anthropics/agentic-qe:*)","mcp__agentic-qe__*"],includeCoAuthoredBy:!0,v3Configuration:{domains:{total:t.length,names:t},swarm:{totalAgents:r.agents?.maxConcurrent??15,topology:"hierarchical",coordination:"queen-led"}},v3Learning:{enabled:r.learning?.enabled??!0,reasoningBank:{dbPath:".agentic-qe/memory.db",enableHNSW:!!r.learning?.hnswConfig},patternPromotion:{threshold:r.learning?.promotionThreshold??3,successRateMin:r.learning?.qualityThreshold??.7}}}}T();import{existsSync as h,mkdirSync as j,readdirSync as R,statSync as G,readFileSync as Ie,writeFileSync as qe,copyFileSync as Te,unlinkSync as Ee,rmdirSync as Pe}from"fs";import{join as m}from"path";var U=["qe-test-generation","qe-test-execution","qe-coverage-analysis","qe-quality-assessment","qe-defect-intelligence","qe-requirements-validation","qe-code-intelligence","qe-browser","pentest-validation","qe-visual-accessibility","qe-chaos-resilience","qe-learning-optimization","qe-iterative-loop","strict-tdd","no-skip","coverage-guard","freeze-tests","security-watch","skill-stats","test-failure-investigator","coverage-drop-investigator","e2e-flow-verifier","test-metrics-dashboard"],H=["v3-core-implementation","v3-cli-modernization","v3-ddd-architecture","v3-integration-deep","v3-mcp-optimization","v3-memory-unification","v3-performance-optimization","v3-security-overhaul","v3-swarm-coordination","v3-qe-core-implementation","v3-qe-ddd-architecture","v3-qe-cli","v3-qe-memory-system","v3-qe-performance","v3-qe-security","v3-qe-mcp","v3-qe-mcp-optimization","v3-qe-memory-unification","v3-qe-integration","v3-qe-agentic-flow-integration","v3-qe-fleet-coordination","agentdb-advanced","agentdb-learning","agentdb-memory-patterns","agentdb-optimization","agentdb-vector-search","github-code-review","github-multi-repo","github-project-management","github-release-management","github-workflow-automation","flow-nexus-neural","flow-nexus-platform","flow-nexus-swarm","reasoningbank-agentdb","reasoningbank-intelligence","swarm-orchestration","swarm-advanced","sparc-methodology","hooks-automation","hive-mind-advanced","stream-chain","agentic-jujutsu","iterative-loop","performance-analysis","skill-builder","qe-agentic-flow-integration","release"],_e=["qe-contract-testing","qe-security-compliance","aqe-v2-v3-migration"],B=class{projectRoot;options;sourceSkillsDir;constructor(e){this.projectRoot=e.projectRoot,this.options={installV2Skills:!0,installV3Skills:!0,overwrite:!1,exclude:[],include:void 0,...e},this.sourceSkillsDir=this.findSourceSkillsDir()}findSourceSkillsDir(){let e=b(import.meta.url),t=[];e&&(t.push(m(e,"assets/skills")),t.push(m(e,".claude/skills"))),t.push(m(this.projectRoot,"node_modules/agentic-qe/assets/skills"));for(let n of t)if(h(n))return n;return t[0]}async install(){let e={installed:[],skipped:[],removed:[],errors:[],totalCount:0,skillsDir:m(this.projectRoot,".claude","skills"),validationInstalled:!1};if(!h(this.sourceSkillsDir))return e.errors.push(`Source skills directory not found: ${this.sourceSkillsDir}`),e;let t=m(this.projectRoot,".claude","skills");h(t)||j(t,{recursive:!0});let n=this.getAvailableSkills();e.totalCount=n.length;let i=this.filterSkills(n);for(let s of i)try{let o=await this.installSkill(s,t);o?e.installed.push(o):e.skipped.push(s)}catch(o){e.errors.push(`Failed to install ${s}: ${k(o)}`)}return this.options.overwrite&&(e.removed=this.removeDeprecatedSkills(t)),e.validationInstalled=this.installValidationInfrastructure(t),await this.createSkillsIndex(t,e.installed),e}installValidationInfrastructure(e){let t=m(this.sourceSkillsDir,".validation"),n=m(e,".validation");if(!h(t))return console.debug("[SkillsInstaller] Validation infrastructure not found in source"),!1;if(h(n)&&!this.options.overwrite)return console.debug("[SkillsInstaller] Validation infrastructure already exists, skipping"),!0;try{return h(n)||j(n,{recursive:!0}),this.copyDirectoryRecursive(t,n),console.debug("[SkillsInstaller] Validation infrastructure installed successfully"),!0}catch(i){return console.error("[SkillsInstaller] Failed to install validation infrastructure:",i instanceof Error?i.message:i),!1}}removeDeprecatedSkills(e){let t=[];for(let n of _e){let i=m(e,n);if(h(i))try{this.removeDirectoryRecursive(i),t.push(n)}catch(s){console.error(`[SkillsInstaller] Failed to remove deprecated skill ${n}:`,s instanceof Error?s.message:s)}}return t.length>0&&console.debug(`[SkillsInstaller] Removed ${t.length} deprecated skills: ${t.join(", ")}`),t}removeDirectoryRecursive(e){let t=R(e,{withFileTypes:!0});for(let n of t){let i=m(e,n.name);n.isDirectory()?this.removeDirectoryRecursive(i):Ee(i)}Pe(e)}getAvailableSkills(){try{return R(this.sourceSkillsDir).filter(t=>{let n=m(this.sourceSkillsDir,t);return G(n).isDirectory()&&!t.startsWith(".")})}catch{return[]}}filterSkills(e){let t=e;return t=t.filter(n=>!H.includes(n)),this.options.include&&this.options.include.length>0&&(t=t.filter(n=>this.options.include.includes(n))),this.options.exclude&&this.options.exclude.length>0&&(t=t.filter(n=>!this.options.exclude.some(i=>n.includes(i)||n.match(new RegExp(i))))),this.options.installV3Skills||(t=t.filter(n=>!U.includes(n))),this.options.installV2Skills||(t=t.filter(n=>U.includes(n))),t}async installSkill(e,t){let n=m(this.sourceSkillsDir,e),i=m(t,e);if(h(i)&&!this.options.overwrite)return null;h(i)||j(i,{recursive:!0}),this.copyDirectoryRecursive(n,i);let s=this.getSkillType(e),o=this.getSkillDescription(i),a=h(m(i,"resources"));return{name:e,type:s,description:o,hasResources:a}}copyDirectoryRecursive(e,t){let n=R(e);for(let i of n){let s=m(e,i),o=m(t,i);G(s).isDirectory()?(h(o)||j(o,{recursive:!0}),this.copyDirectoryRecursive(s,o)):Te(s,o)}}getSkillType(e){return U.includes(e)?"v3-domain":"v2-methodology"}getSkillDescription(e){let t=m(e,"SKILL.md");if(h(t))try{let n=Ie(t,"utf-8"),i=n.match(/description:\s*["']?([^"'\n]+)["']?/i);if(i)return i[1].trim();let s=n.split(`
7
+ `);for(let o of s){let a=o.trim();if(a&&!a.startsWith("#")&&!a.startsWith("-")&&!a.startsWith("```"))return a.slice(0,100)+(a.length>100?"...":"")}}catch(n){console.debug("[SkillsInstaller] Failed to read skill description:",n instanceof Error?n.message:n)}}async createSkillsIndex(e,t){let n=this.scanSkillsDirectory(e),i=n.filter(c=>!H.includes(c.name)),s=i.filter(c=>c.type==="v2-methodology"),o=i.filter(c=>c.type==="v3-domain"),a=n.filter(c=>H.includes(c.name)),l=h(m(e,".validation")),u=`# AQE Skills Index
8
8
 
9
9
  This directory contains Quality Engineering skills managed by Agentic QE.
10
10
 
@@ -54,12 +54,12 @@ See \`.validation/README.md\` for usage instructions.
54
54
  ---
55
55
 
56
56
  *Generated by AQE v3 init on ${new Date().toISOString()}*
57
- `;Ce(m(e,"README.md"),g,"utf-8")}scanSkillsDirectory(e){let t=[];try{let n=R(e);for(let i of n){if(i.startsWith("."))continue;let s=m(e,i);if(!G(s).isDirectory())continue;let o=m(s,"SKILL.md");if(!h(o))continue;let a=this.getSkillType(i),l=this.getSkillDescription(s),g=h(m(s,"resources"));t.push({name:i,type:a,description:l,hasResources:g})}}catch(n){console.debug("[SkillsInstaller] Failed to scan skills directory:",n instanceof Error?n.message:n)}return t.sort((n,i)=>n.name.localeCompare(i.name))}};function Xe(r){return new B(r)}T();import{existsSync as f,mkdirSync as D,readdirSync as K,statSync as oe,readFileSync as ae,writeFileSync as le,copyFileSync as J}from"fs";import{join as d}from"path";function Ie(r){let e=new Date().toISOString().slice(0,10),t=r.match(/^---\n([\s\S]*?)\n---/);if(!t)return r;let n=t[1],i;return/^updated:/m.test(n)?i=n.replace(/^updated:.*$/m,`updated: ${e}`):/^created:/m.test(n)?i=n.replace(/^(created:.*$)/m,`$1
57
+ `;qe(m(e,"README.md"),u,"utf-8")}scanSkillsDirectory(e){let t=[];try{let n=R(e);for(let i of n){if(i.startsWith("."))continue;let s=m(e,i);if(!G(s).isDirectory())continue;let o=m(s,"SKILL.md");if(!h(o))continue;let a=this.getSkillType(i),l=this.getSkillDescription(s),u=h(m(s,"resources"));t.push({name:i,type:a,description:l,hasResources:u})}}catch(n){console.debug("[SkillsInstaller] Failed to scan skills directory:",n instanceof Error?n.message:n)}return t.sort((n,i)=>n.name.localeCompare(i.name))}};function ct(r){return new B(r)}T();import{existsSync as f,mkdirSync as D,readdirSync as K,statSync as ce,readFileSync as ue,writeFileSync as ge,copyFileSync as J}from"fs";import{join as d}from"path";function Fe(r){let e=new Date().toISOString().slice(0,10),t=r.match(/^---\n([\s\S]*?)\n---/);if(!t)return r;let n=t[1],i;return/^updated:/m.test(n)?i=n.replace(/^updated:.*$/m,`updated: ${e}`):/^created:/m.test(n)?i=n.replace(/^(created:.*$)/m,`$1
58
58
  updated: ${e}`):i=n+`
59
59
  updated: ${e}`,r.replace(/^---\n[\s\S]*?\n---/,`---
60
60
  ${i}
61
- ---`)}var qe=["qe-test-architect","qe-bdd-generator","qe-property-tester","qe-mutation-tester","qe-test-idea-rewriter","qe-quality-criteria-recommender","qe-parallel-executor","qe-flaky-hunter","qe-retry-handler","qe-coverage-specialist","qe-gap-detector","qe-quality-gate","qe-code-complexity","qe-deployment-advisor","qe-risk-assessor","qe-defect-predictor","qe-regression-analyzer","qe-root-cause-analyzer","qe-impact-analyzer","qe-requirements-validator","qe-qx-partner","qe-product-factors-assessor","qe-code-intelligence","qe-kg-builder","qe-dependency-mapper","qe-security-scanner","qe-security-auditor","qe-pentest-validator","qe-contract-validator","qe-graphql-tester","qe-visual-tester","qe-accessibility-auditor","qe-responsive-tester","qe-chaos-engineer","qe-load-tester","qe-performance-tester","qe-learning-coordinator","qe-pattern-learner","qe-metrics-optimizer","qe-transfer-specialist","qe-soap-tester","qe-sap-rfc-tester","qe-sap-idoc-tester","qe-odata-contract-tester","qe-middleware-validator","qe-message-broker-tester","qe-sod-analyzer","qe-fleet-commander","qe-queen-coordinator","qe-tdd-specialist","qe-integration-tester","qe-integration-architect"],Te=["qe-code-reviewer","qe-integration-reviewer","qe-performance-reviewer","qe-security-reviewer","qe-tdd-red","qe-tdd-green","qe-tdd-refactor"],Y=class{projectRoot;options;sourceAgentsDir;constructor(e){this.projectRoot=e.projectRoot,this.options={installQEAgents:!0,installSubagents:!0,overwrite:!1,exclude:[],include:void 0,...e},this.sourceAgentsDir=this.findSourceAgentsDir()}findSourceAgentsDir(){let e=k(import.meta.url),t=[];e&&(t.push(d(e,"assets/agents/v3")),t.push(d(e,".claude/agents/v3"))),t.push(d(this.projectRoot,"node_modules/agentic-qe/assets/agents/v3"));for(let n of t)if(f(n))return n;return t[0]}preserveOverridesDir(){let e=d(this.projectRoot,".claude","agent-overrides");f(e)||D(e,{recursive:!0});let t=d(e,"_example.yaml");if(!f(t))try{let n=k(import.meta.url),i=[...n?[d(n,"assets","templates","agent-override-example.yaml")]:[],d(this.projectRoot,"node_modules","agentic-qe","assets","templates","agent-override-example.yaml")];for(let s of i)if(f(s)){J(s,t);break}}catch{}}async install(){let e={installed:[],skipped:[],errors:[],totalCount:0,agentsDir:d(this.projectRoot,".claude","agents","v3"),overlaysApplied:[],overlayWarnings:[]};if(this.preserveOverridesDir(),!f(this.sourceAgentsDir))return e.errors.push(`Source agents directory not found: ${this.sourceAgentsDir}`),e;let t=d(this.projectRoot,".claude","agents","v3");f(t)||D(t,{recursive:!0});let n=d(t,"subagents");f(n)||D(n,{recursive:!0}),await this.copyHelpersDirectory(t),await this.copyTemplatesDirectory(t);let i=this.getAvailableAgents();e.totalCount=i.length;let s=this.filterAgents(i);for(let l of s)try{let g=await this.installAgent(l,t,n);g?e.installed.push(g):e.skipped.push(l)}catch(g){e.errors.push(`Failed to install ${l}: ${b(g)}`)}let o=te(this.projectRoot);if(o.warnings.length>0){e.overlayWarnings=o.warnings;for(let l of o.warnings)console.error(`[AgentsInstaller] Overlay warning: ${l}`)}if(o.errors.length>0)for(let l of o.errors)e.errors.push(`Overlay error: ${l}`);for(let l of o.overlays){let g=l.agent,x=Te.includes(g)?d(n,`${g}.md`):d(t,`${g}.md`);if(!f(x)){e.overlayWarnings.push(`Overlay for "${g}" found but agent file does not exist. Skipping.`);continue}try{let I=ae(x,"utf-8"),{content:de,applied:q}=ne(I,l),pe=Ie(de);le(x,pe,"utf-8"),e.overlaysApplied.push(g);let me=[...q.replacedFields.map(C=>`replaced:${C}`),...q.appendedFields.map(C=>`appended:${C}`),...q.configOverrides.map(C=>`config:${C}`)];console.error(`[AgentsInstaller] Applied overlay for ${g}: ${me.join(", ")}`)}catch(I){e.overlayWarnings.push(`Failed to apply overlay for "${g}": ${b(I)}`)}}e.overlaysApplied.length>0&&console.error(`[AgentsInstaller] Applied ${e.overlaysApplied.length} agent overlay(s): ${e.overlaysApplied.join(", ")}`);let a=ee(t,this.projectRoot);if(e.mcpValidationWarnings=a.warnings,a.warnings.length>0){console.error(`[AgentsInstaller] MCP dependency warnings (${a.agentsWithMissingDeps.length} agents affected):`);for(let l of a.warnings.slice(0,10))console.error(` ${l}`);a.warnings.length>10&&console.error(` ... and ${a.warnings.length-10} more warnings`)}return await this.createAgentsIndex(t,e.installed),e}getAvailableAgents(){let e=[];try{let t=K(this.sourceAgentsDir);for(let n of t){let i=d(this.sourceAgentsDir,n),s=oe(i);if(s.isFile()&&n.endsWith(".md"))e.push(n.replace(".md",""));else if(s.isDirectory()&&n==="subagents"){let o=K(i);for(let a of o)a.endsWith(".md")&&e.push(`subagents/${a.replace(".md","")}`)}}}catch{return[]}return e}filterAgents(e){let t=e.filter(n=>(n.includes("/")?n.split("/")[1]:n).startsWith("qe-"));return this.options.include&&this.options.include.length>0&&(t=t.filter(n=>{let i=n.includes("/")?n.split("/")[1]:n;return this.options.include.includes(i)})),this.options.exclude&&this.options.exclude.length>0&&(t=t.filter(n=>{let i=n.includes("/")?n.split("/")[1]:n;return!this.options.exclude.some(s=>i.includes(s)||i.match(new RegExp(s)))})),this.options.installQEAgents||(t=t.filter(n=>{let i=n.includes("/")?n.split("/")[1]:n;return!qe.includes(i)})),this.options.installSubagents||(t=t.filter(n=>!n.startsWith("subagents/"))),t}async installAgent(e,t,n){let i=e.startsWith("subagents/"),s=i?e.split("/")[1]:e,o=d(this.sourceAgentsDir,`${e}.md`),a=i?d(n,`${s}.md`):d(t,`${s}.md`);if(f(a)&&!this.options.overwrite)return null;if(f(o))J(o,a);else throw new Error(`Source file not found: ${o}`);let l=this.getAgentType(s,i),g=this.getAgentDescription(a),c=this.getAgentDomain(s);return{name:s,type:l,description:g,domain:c}}getAgentType(e,t){return t?"v3-subagent":"v3-qe"}copyDirectoryRecursive(e,t){if(!f(e))return;f(t)||D(t,{recursive:!0});let n=K(e);for(let i of n){let s=d(e,i),o=d(t,i);oe(s).isDirectory()?this.copyDirectoryRecursive(s,o):(!f(o)||this.options.overwrite)&&J(s,o)}}async copyHelpersDirectory(e){let t=d(this.sourceAgentsDir,"helpers"),n=d(this.projectRoot,".claude","helpers","v3");f(t)?this.copyDirectoryRecursive(t,n):console.error(`[AgentsInstaller] Helpers source not found: ${t}`)}async copyTemplatesDirectory(e){let t=d(this.sourceAgentsDir,"templates"),n=d(e,"templates");f(t)?this.copyDirectoryRecursive(t,n):console.error(`[AgentsInstaller] Templates source not found: ${t}`)}getAgentDescription(e){if(f(e))try{let t=ae(e,"utf-8"),n=t.match(/description:\s*["']?([^"'\n]+)["']?/i);if(n)return n[1].trim();let i=t.split(`
62
- `);for(let s of i){let o=s.trim();if(o&&!o.startsWith("#")&&!o.startsWith("-")&&!o.startsWith("```")&&!o.startsWith("---"))return o.slice(0,100)+(o.length>100?"...":"")}}catch(t){console.debug("[AgentsInstaller] Failed to read agent description:",t instanceof Error?t.message:t)}}getAgentDomain(e){let t={"test-architect":"test-generation","bdd-generator":"test-generation","property-tester":"test-generation","mutation-tester":"test-generation","parallel-executor":"test-execution","flaky-hunter":"test-execution","retry-handler":"test-execution","coverage-specialist":"coverage-analysis","gap-detector":"coverage-analysis","quality-gate":"quality-assessment","code-complexity":"quality-assessment","deployment-advisor":"quality-assessment","risk-assessor":"quality-assessment","defect-predictor":"defect-intelligence","regression-analyzer":"defect-intelligence","root-cause-analyzer":"defect-intelligence","impact-analyzer":"defect-intelligence","requirements-validator":"requirements-validation","qx-partner":"requirements-validation","product-factors-assessor":"requirements-validation","quality-criteria-recommender":"requirements-validation","test-idea-rewriter":"test-generation","code-intelligence":"code-intelligence","kg-builder":"code-intelligence","dependency-mapper":"code-intelligence","security-scanner":"security-compliance","security-auditor":"security-compliance","pentest-validator":"security-compliance","contract-validator":"contract-testing","graphql-tester":"contract-testing","visual-tester":"visual-accessibility","accessibility-auditor":"visual-accessibility","responsive-tester":"visual-accessibility","chaos-engineer":"chaos-resilience","load-tester":"chaos-resilience","performance-tester":"chaos-resilience","learning-coordinator":"learning-optimization","pattern-learner":"learning-optimization","metrics-optimizer":"learning-optimization","transfer-specialist":"learning-optimization","soap-tester":"enterprise-integration","sap-rfc-tester":"enterprise-integration","sap-idoc-tester":"enterprise-integration","odata-contract-tester":"enterprise-integration","middleware-validator":"enterprise-integration","message-broker-tester":"enterprise-integration","sod-analyzer":"enterprise-integration"},n=e.replace(/^(v3-)?qe-/,"");return t[n]}async createAgentsIndex(e,t){let n=t.filter(l=>l.type==="v3-qe"),i=t.filter(l=>l.type==="v3-subagent"),s=new Map;for(let l of n){let g=l.domain||"general";s.has(g)||s.set(g,[]),s.get(g).push(l)}let o=`# AQE V3 Agents Index
61
+ ---`)}var $e=["qe-test-architect","qe-bdd-generator","qe-property-tester","qe-mutation-tester","qe-test-idea-rewriter","qe-quality-criteria-recommender","qe-parallel-executor","qe-flaky-hunter","qe-retry-handler","qe-coverage-specialist","qe-gap-detector","qe-quality-gate","qe-code-complexity","qe-deployment-advisor","qe-risk-assessor","qe-defect-predictor","qe-regression-analyzer","qe-root-cause-analyzer","qe-impact-analyzer","qe-requirements-validator","qe-qx-partner","qe-product-factors-assessor","qe-code-intelligence","qe-kg-builder","qe-dependency-mapper","qe-security-scanner","qe-security-auditor","qe-pentest-validator","qe-contract-validator","qe-graphql-tester","qe-visual-tester","qe-accessibility-auditor","qe-responsive-tester","qe-chaos-engineer","qe-load-tester","qe-performance-tester","qe-learning-coordinator","qe-pattern-learner","qe-metrics-optimizer","qe-transfer-specialist","qe-soap-tester","qe-sap-rfc-tester","qe-sap-idoc-tester","qe-odata-contract-tester","qe-middleware-validator","qe-message-broker-tester","qe-sod-analyzer","qe-fleet-commander","qe-queen-coordinator","qe-tdd-specialist","qe-integration-tester","qe-integration-architect"],Ne=["qe-code-reviewer","qe-integration-reviewer","qe-performance-reviewer","qe-security-reviewer","qe-tdd-red","qe-tdd-green","qe-tdd-refactor"],Y=class{projectRoot;options;sourceAgentsDir;constructor(e){this.projectRoot=e.projectRoot,this.options={installQEAgents:!0,installSubagents:!0,overwrite:!1,exclude:[],include:void 0,...e},this.sourceAgentsDir=this.findSourceAgentsDir()}findSourceAgentsDir(){let e=b(import.meta.url),t=[];e&&(t.push(d(e,"assets/agents/v3")),t.push(d(e,".claude/agents/v3"))),t.push(d(this.projectRoot,"node_modules/agentic-qe/assets/agents/v3"));for(let n of t)if(f(n))return n;return t[0]}preserveOverridesDir(){let e=d(this.projectRoot,".claude","agent-overrides");f(e)||D(e,{recursive:!0});let t=d(e,"_example.yaml");if(!f(t))try{let n=b(import.meta.url),i=[...n?[d(n,"assets","templates","agent-override-example.yaml")]:[],d(this.projectRoot,"node_modules","agentic-qe","assets","templates","agent-override-example.yaml")];for(let s of i)if(f(s)){J(s,t);break}}catch{}}async install(){let e={installed:[],skipped:[],errors:[],totalCount:0,agentsDir:d(this.projectRoot,".claude","agents","v3"),overlaysApplied:[],overlayWarnings:[]};if(this.preserveOverridesDir(),!f(this.sourceAgentsDir))return e.errors.push(`Source agents directory not found: ${this.sourceAgentsDir}`),e;let t=d(this.projectRoot,".claude","agents","v3");f(t)||D(t,{recursive:!0});let n=d(t,"subagents");f(n)||D(n,{recursive:!0}),await this.copyHelpersDirectory(t),await this.copyTemplatesDirectory(t);let i=this.getAvailableAgents();e.totalCount=i.length;let s=this.filterAgents(i);for(let l of s)try{let u=await this.installAgent(l,t,n);u?e.installed.push(u):e.skipped.push(l)}catch(u){e.errors.push(`Failed to install ${l}: ${k(u)}`)}let o=te(this.projectRoot);if(o.warnings.length>0){e.overlayWarnings=o.warnings;for(let l of o.warnings)console.error(`[AgentsInstaller] Overlay warning: ${l}`)}if(o.errors.length>0)for(let l of o.errors)e.errors.push(`Overlay error: ${l}`);for(let l of o.overlays){let u=l.agent,x=Ne.includes(u)?d(n,`${u}.md`):d(t,`${u}.md`);if(!f(x)){e.overlayWarnings.push(`Overlay for "${u}" found but agent file does not exist. Skipping.`);continue}try{let I=ue(x,"utf-8"),{content:fe,applied:q}=ne(I,l),he=Fe(fe);ge(x,he,"utf-8"),e.overlaysApplied.push(u);let ye=[...q.replacedFields.map(w=>`replaced:${w}`),...q.appendedFields.map(w=>`appended:${w}`),...q.configOverrides.map(w=>`config:${w}`)];console.error(`[AgentsInstaller] Applied overlay for ${u}: ${ye.join(", ")}`)}catch(I){e.overlayWarnings.push(`Failed to apply overlay for "${u}": ${k(I)}`)}}e.overlaysApplied.length>0&&console.error(`[AgentsInstaller] Applied ${e.overlaysApplied.length} agent overlay(s): ${e.overlaysApplied.join(", ")}`);let a=ee(t,this.projectRoot);if(e.mcpValidationWarnings=a.warnings,a.warnings.length>0){console.error(`[AgentsInstaller] MCP dependency warnings (${a.agentsWithMissingDeps.length} agents affected):`);for(let l of a.warnings.slice(0,10))console.error(` ${l}`);a.warnings.length>10&&console.error(` ... and ${a.warnings.length-10} more warnings`)}return await this.createAgentsIndex(t,e.installed),e}getAvailableAgents(){let e=[];try{let t=K(this.sourceAgentsDir);for(let n of t){let i=d(this.sourceAgentsDir,n),s=ce(i);if(s.isFile()&&n.endsWith(".md"))e.push(n.replace(".md",""));else if(s.isDirectory()&&n==="subagents"){let o=K(i);for(let a of o)a.endsWith(".md")&&e.push(`subagents/${a.replace(".md","")}`)}}}catch{return[]}return e}filterAgents(e){let t=e.filter(n=>(n.includes("/")?n.split("/")[1]:n).startsWith("qe-"));return this.options.include&&this.options.include.length>0&&(t=t.filter(n=>{let i=n.includes("/")?n.split("/")[1]:n;return this.options.include.includes(i)})),this.options.exclude&&this.options.exclude.length>0&&(t=t.filter(n=>{let i=n.includes("/")?n.split("/")[1]:n;return!this.options.exclude.some(s=>i.includes(s)||i.match(new RegExp(s)))})),this.options.installQEAgents||(t=t.filter(n=>{let i=n.includes("/")?n.split("/")[1]:n;return!$e.includes(i)})),this.options.installSubagents||(t=t.filter(n=>!n.startsWith("subagents/"))),t}async installAgent(e,t,n){let i=e.startsWith("subagents/"),s=i?e.split("/")[1]:e,o=d(this.sourceAgentsDir,`${e}.md`),a=i?d(n,`${s}.md`):d(t,`${s}.md`);if(f(a)&&!this.options.overwrite)return null;if(f(o))J(o,a);else throw new Error(`Source file not found: ${o}`);let l=this.getAgentType(s,i),u=this.getAgentDescription(a),c=this.getAgentDomain(s);return{name:s,type:l,description:u,domain:c}}getAgentType(e,t){return t?"v3-subagent":"v3-qe"}copyDirectoryRecursive(e,t){if(!f(e))return;f(t)||D(t,{recursive:!0});let n=K(e);for(let i of n){let s=d(e,i),o=d(t,i);ce(s).isDirectory()?this.copyDirectoryRecursive(s,o):(!f(o)||this.options.overwrite)&&J(s,o)}}async copyHelpersDirectory(e){let t=d(this.sourceAgentsDir,"helpers"),n=d(this.projectRoot,".claude","helpers","v3");f(t)?this.copyDirectoryRecursive(t,n):console.error(`[AgentsInstaller] Helpers source not found: ${t}`)}async copyTemplatesDirectory(e){let t=d(this.sourceAgentsDir,"templates"),n=d(e,"templates");f(t)?this.copyDirectoryRecursive(t,n):console.error(`[AgentsInstaller] Templates source not found: ${t}`)}getAgentDescription(e){if(f(e))try{let t=ue(e,"utf-8"),n=t.match(/description:\s*["']?([^"'\n]+)["']?/i);if(n)return n[1].trim();let i=t.split(`
62
+ `);for(let s of i){let o=s.trim();if(o&&!o.startsWith("#")&&!o.startsWith("-")&&!o.startsWith("```")&&!o.startsWith("---"))return o.slice(0,100)+(o.length>100?"...":"")}}catch(t){console.debug("[AgentsInstaller] Failed to read agent description:",t instanceof Error?t.message:t)}}getAgentDomain(e){let t={"test-architect":"test-generation","bdd-generator":"test-generation","property-tester":"test-generation","mutation-tester":"test-generation","parallel-executor":"test-execution","flaky-hunter":"test-execution","retry-handler":"test-execution","coverage-specialist":"coverage-analysis","gap-detector":"coverage-analysis","quality-gate":"quality-assessment","code-complexity":"quality-assessment","deployment-advisor":"quality-assessment","risk-assessor":"quality-assessment","defect-predictor":"defect-intelligence","regression-analyzer":"defect-intelligence","root-cause-analyzer":"defect-intelligence","impact-analyzer":"defect-intelligence","requirements-validator":"requirements-validation","qx-partner":"requirements-validation","product-factors-assessor":"requirements-validation","quality-criteria-recommender":"requirements-validation","test-idea-rewriter":"test-generation","code-intelligence":"code-intelligence","kg-builder":"code-intelligence","dependency-mapper":"code-intelligence","security-scanner":"security-compliance","security-auditor":"security-compliance","pentest-validator":"security-compliance","contract-validator":"contract-testing","graphql-tester":"contract-testing","visual-tester":"visual-accessibility","accessibility-auditor":"visual-accessibility","responsive-tester":"visual-accessibility","chaos-engineer":"chaos-resilience","load-tester":"chaos-resilience","performance-tester":"chaos-resilience","learning-coordinator":"learning-optimization","pattern-learner":"learning-optimization","metrics-optimizer":"learning-optimization","transfer-specialist":"learning-optimization","soap-tester":"enterprise-integration","sap-rfc-tester":"enterprise-integration","sap-idoc-tester":"enterprise-integration","odata-contract-tester":"enterprise-integration","middleware-validator":"enterprise-integration","message-broker-tester":"enterprise-integration","sod-analyzer":"enterprise-integration"},n=e.replace(/^(v3-)?qe-/,"");return t[n]}async createAgentsIndex(e,t){let n=t.filter(l=>l.type==="v3-qe"),i=t.filter(l=>l.type==="v3-subagent"),s=new Map;for(let l of n){let u=l.domain||"general";s.has(u)||s.set(u,[]),s.get(u).push(l)}let o=`# AQE V3 Agents Index
63
63
 
64
64
  This directory contains V3 QE agents installed by \`aqe init\`.
65
65
 
@@ -87,10 +87,10 @@ Task("Run security scan", "...", "v3-qe-security-scanner")
87
87
 
88
88
  Quality Engineering agents mapped to the 12 DDD bounded contexts.
89
89
 
90
- ${Array.from(s.entries()).map(([l,g])=>`
90
+ ${Array.from(s.entries()).map(([l,u])=>`
91
91
  ### ${l.split("-").map(c=>c.charAt(0).toUpperCase()+c.slice(1)).join(" ")}
92
92
 
93
- ${g.map(c=>`- **${c.name}**${c.description?`: ${c.description}`:""}`).join(`
93
+ ${u.map(c=>`- **${c.name}**${c.description?`: ${c.description}`:""}`).join(`
94
94
  `)}
95
95
  `).join(`
96
96
  `)}
@@ -105,7 +105,7 @@ ${i.map(l=>`- **${l.name}**${l.description?`: ${l.description}`:""}`).join(`
105
105
  ---
106
106
 
107
107
  *Generated by AQE v3 init on ${new Date().toISOString()}*
108
- `,a=d(this.projectRoot,".claude","docs");f(a)||D(a,{recursive:!0}),le(d(a,"v3-agents-index.md"),o,"utf-8")}};function at(r){return new Y(r)}T();import{existsSync as v,mkdirSync as Z,readdirSync as ce,readFileSync as Ee,writeFileSync as Pe,copyFileSync as ge}from"fs";import{join as y}from"path";var ue={core:[{name:"workflow-executor",filename:"n8n-workflow-executor.md",category:"core"},{name:"node-validator",filename:"n8n-node-validator.md",category:"core"},{name:"trigger-test",filename:"n8n-trigger-test.md",category:"core"},{name:"expression-validator",filename:"n8n-expression-validator.md",category:"core"},{name:"integration-test",filename:"n8n-integration-test.md",category:"core"},{name:"security-auditor",filename:"n8n-security-auditor.md",category:"core"}],advanced:[{name:"unit-tester",filename:"n8n-unit-tester.md",category:"advanced"},{name:"performance-tester",filename:"n8n-performance-tester.md",category:"advanced"},{name:"ci-orchestrator",filename:"n8n-ci-orchestrator.md",category:"advanced"}],quality:[{name:"version-comparator",filename:"n8n-version-comparator.md",category:"quality"},{name:"bdd-scenario-tester",filename:"n8n-bdd-scenario-tester.md",category:"quality"},{name:"monitoring-validator",filename:"n8n-monitoring-validator.md",category:"quality"}],enterprise:[{name:"compliance-validator",filename:"n8n-compliance-validator.md",category:"enterprise"},{name:"chaos-tester",filename:"n8n-chaos-tester.md",category:"enterprise"}],reliability:[{name:"base-agent",filename:"n8n-base-agent.md",category:"reliability"}]},_e=["n8n-expression-testing","n8n-integration-testing-patterns","n8n-security-testing","n8n-trigger-testing-strategies","n8n-workflow-testing-fundamentals"],X=class{projectRoot;options;sourceAgentsDir;sourceSkillsDir;constructor(e){this.projectRoot=e.projectRoot,this.options={installAgents:!0,installSkills:!0,overwrite:!1,...e},this.sourceAgentsDir=this.findSourceAgentsDir(),this.sourceSkillsDir=this.findSourceSkillsDir()}findSourceAgentsDir(){let e=k(import.meta.url),t=[];e&&t.push(y(e,".claude/agents/n8n")),t.push(y(this.projectRoot,"node_modules/agentic-qe/.claude/agents/n8n"));for(let n of t)if(v(n))return n;return t[0]}findSourceSkillsDir(){let e=k(import.meta.url),t=[];e&&(t.push(y(e,"assets/skills")),t.push(y(e,".claude/skills"))),t.push(y(this.projectRoot,"node_modules/agentic-qe/assets/skills"));for(let n of t)if(v(n))return n;return t[0]}async install(){let e={success:!0,agentsInstalled:[],skillsInstalled:[],configGenerated:!1,errors:[],agentsDir:y(this.projectRoot,".claude/agents/n8n"),skillsDir:y(this.projectRoot,".claude/skills")};try{if(this.options.installAgents){let t=await this.installAgents(e.agentsDir);e.agentsInstalled=t.installed,e.errors.push(...t.errors)}if(this.options.installSkills){let t=await this.installSkills(e.skillsDir);e.skillsInstalled=t.installed,e.errors.push(...t.errors)}this.options.n8nApiConfig&&(e.configGenerated=!0),e.agentsInstalled.length>0&&this.createAgentsIndex(e.agentsDir,e.agentsInstalled)}catch(t){e.success=!1,e.errors.push(`Installation failed: ${b(t)}`)}return e}async installAgents(e){let t=[],n=[];if(v(e)||Z(e,{recursive:!0}),!v(this.sourceAgentsDir))return n.push(`Source agents directory not found: ${this.sourceAgentsDir}`),{installed:t,errors:n};let i=ce(this.sourceAgentsDir).filter(s=>s.endsWith(".md"));for(let s of Object.keys(ue))for(let o of ue[s]){let a=y(this.sourceAgentsDir,o.filename),l=y(e,o.filename);if(i.includes(o.filename)&&!(v(l)&&!this.options.overwrite))try{ge(a,l);let c=Ee(a,"utf-8").match(/description:\s*["']?(.+?)["']?\n/);o.description=c?.[1]||`n8n ${o.name} agent`,t.push(o)}catch(g){n.push(`Failed to install ${o.name}: ${b(g)}`)}}return{installed:t,errors:n}}async installSkills(e){let t=[],n=[];if(v(e)||Z(e,{recursive:!0}),!v(this.sourceSkillsDir))return n.push(`Source skills directory not found: ${this.sourceSkillsDir}`),{installed:t,errors:n};for(let i of _e){let s=y(this.sourceSkillsDir,i),o=y(e,i);if(v(s)&&!(v(o)&&!this.options.overwrite))try{this.copyDirectory(s,o),t.push(i)}catch(a){n.push(`Failed to install skill ${i}: ${b(a)}`)}}return{installed:t,errors:n}}copyDirectory(e,t){v(t)||Z(t,{recursive:!0});let n=ce(e,{withFileTypes:!0});for(let i of n){let s=y(e,i.name),o=y(t,i.name);i.isDirectory()?this.copyDirectory(s,o):ge(s,o)}}createAgentsIndex(e,t){let n=y(e,"README.md"),i={core:t.filter(o=>o.category==="core"),advanced:t.filter(o=>o.category==="advanced"),quality:t.filter(o=>o.category==="quality"),enterprise:t.filter(o=>o.category==="enterprise"),reliability:t.filter(o=>o.category==="reliability")},s=`# N8n Testing Agents
108
+ `,a=d(this.projectRoot,".claude","docs");f(a)||D(a,{recursive:!0}),ge(d(a,"v3-agents-index.md"),o,"utf-8")}};function yt(r){return new Y(r)}T();import{existsSync as v,mkdirSync as Z,readdirSync as de,readFileSync as Oe,writeFileSync as Le,copyFileSync as pe}from"fs";import{join as y}from"path";var me={core:[{name:"workflow-executor",filename:"n8n-workflow-executor.md",category:"core"},{name:"node-validator",filename:"n8n-node-validator.md",category:"core"},{name:"trigger-test",filename:"n8n-trigger-test.md",category:"core"},{name:"expression-validator",filename:"n8n-expression-validator.md",category:"core"},{name:"integration-test",filename:"n8n-integration-test.md",category:"core"},{name:"security-auditor",filename:"n8n-security-auditor.md",category:"core"}],advanced:[{name:"unit-tester",filename:"n8n-unit-tester.md",category:"advanced"},{name:"performance-tester",filename:"n8n-performance-tester.md",category:"advanced"},{name:"ci-orchestrator",filename:"n8n-ci-orchestrator.md",category:"advanced"}],quality:[{name:"version-comparator",filename:"n8n-version-comparator.md",category:"quality"},{name:"bdd-scenario-tester",filename:"n8n-bdd-scenario-tester.md",category:"quality"},{name:"monitoring-validator",filename:"n8n-monitoring-validator.md",category:"quality"}],enterprise:[{name:"compliance-validator",filename:"n8n-compliance-validator.md",category:"enterprise"},{name:"chaos-tester",filename:"n8n-chaos-tester.md",category:"enterprise"}],reliability:[{name:"base-agent",filename:"n8n-base-agent.md",category:"reliability"}]},Me=["n8n-expression-testing","n8n-integration-testing-patterns","n8n-security-testing","n8n-trigger-testing-strategies","n8n-workflow-testing-fundamentals"],X=class{projectRoot;options;sourceAgentsDir;sourceSkillsDir;constructor(e){this.projectRoot=e.projectRoot,this.options={installAgents:!0,installSkills:!0,overwrite:!1,...e},this.sourceAgentsDir=this.findSourceAgentsDir(),this.sourceSkillsDir=this.findSourceSkillsDir()}findSourceAgentsDir(){let e=b(import.meta.url),t=[];e&&t.push(y(e,".claude/agents/n8n")),t.push(y(this.projectRoot,"node_modules/agentic-qe/.claude/agents/n8n"));for(let n of t)if(v(n))return n;return t[0]}findSourceSkillsDir(){let e=b(import.meta.url),t=[];e&&(t.push(y(e,"assets/skills")),t.push(y(e,".claude/skills"))),t.push(y(this.projectRoot,"node_modules/agentic-qe/assets/skills"));for(let n of t)if(v(n))return n;return t[0]}async install(){let e={success:!0,agentsInstalled:[],skillsInstalled:[],configGenerated:!1,errors:[],agentsDir:y(this.projectRoot,".claude/agents/n8n"),skillsDir:y(this.projectRoot,".claude/skills")};try{if(this.options.installAgents){let t=await this.installAgents(e.agentsDir);e.agentsInstalled=t.installed,e.errors.push(...t.errors)}if(this.options.installSkills){let t=await this.installSkills(e.skillsDir);e.skillsInstalled=t.installed,e.errors.push(...t.errors)}this.options.n8nApiConfig&&(e.configGenerated=!0),e.agentsInstalled.length>0&&this.createAgentsIndex(e.agentsDir,e.agentsInstalled)}catch(t){e.success=!1,e.errors.push(`Installation failed: ${k(t)}`)}return e}async installAgents(e){let t=[],n=[];if(v(e)||Z(e,{recursive:!0}),!v(this.sourceAgentsDir))return n.push(`Source agents directory not found: ${this.sourceAgentsDir}`),{installed:t,errors:n};let i=de(this.sourceAgentsDir).filter(s=>s.endsWith(".md"));for(let s of Object.keys(me))for(let o of me[s]){let a=y(this.sourceAgentsDir,o.filename),l=y(e,o.filename);if(i.includes(o.filename)&&!(v(l)&&!this.options.overwrite))try{pe(a,l);let c=Oe(a,"utf-8").match(/description:\s*["']?(.+?)["']?\n/);o.description=c?.[1]||`n8n ${o.name} agent`,t.push(o)}catch(u){n.push(`Failed to install ${o.name}: ${k(u)}`)}}return{installed:t,errors:n}}async installSkills(e){let t=[],n=[];if(v(e)||Z(e,{recursive:!0}),!v(this.sourceSkillsDir))return n.push(`Source skills directory not found: ${this.sourceSkillsDir}`),{installed:t,errors:n};for(let i of Me){let s=y(this.sourceSkillsDir,i),o=y(e,i);if(v(s)&&!(v(o)&&!this.options.overwrite))try{this.copyDirectory(s,o),t.push(i)}catch(a){n.push(`Failed to install skill ${i}: ${k(a)}`)}}return{installed:t,errors:n}}copyDirectory(e,t){v(t)||Z(t,{recursive:!0});let n=de(e,{withFileTypes:!0});for(let i of n){let s=y(e,i.name),o=y(t,i.name);i.isDirectory()?this.copyDirectory(s,o):pe(s,o)}}createAgentsIndex(e,t){let n=y(e,"README.md"),i={core:t.filter(o=>o.category==="core"),advanced:t.filter(o=>o.category==="advanced"),quality:t.filter(o=>o.category==="quality"),enterprise:t.filter(o=>o.category==="enterprise"),reliability:t.filter(o=>o.category==="reliability")},s=`# N8n Testing Agents
109
109
 
110
110
  > Auto-generated by \`aqe init --with-n8n\`
111
111
 
@@ -138,7 +138,7 @@ Task("Run security audit on workflow", "n8n-security-auditor")
138
138
  `;s+=`
139
139
  `}s+=`---
140
140
  Generated: ${new Date().toISOString()}
141
- `,Pe(n,s)}generateConfigSection(){return{n8n:{enabled:!0,installAgents:this.options.installAgents,installSkills:this.options.installSkills,apiConfig:this.options.n8nApiConfig||null}}}generateClaudeMdSection(){return`
141
+ `,Le(n,s)}generateConfigSection(){return{n8n:{enabled:!0,installAgents:this.options.installAgents,installSkills:this.options.installSkills,apiConfig:this.options.n8nApiConfig||null}}}generateClaudeMdSection(){return`
142
142
  ## N8n Workflow Testing
143
143
 
144
144
  This project includes n8n workflow testing agents. Use them with Claude Code:
@@ -177,4 +177,4 @@ N8n agents map to v3 domains:
177
177
  - Compliance agents \u2192 security-compliance domain
178
178
  - Chaos agents \u2192 chaos-resilience domain
179
179
 
180
- `}};function pt(r){return new X(r)}export{M as a,Fe as b,Me as c,We as d,Se as e,Ge as f,Ue as g,He as h,Xe as i,at as j,pt as k};
180
+ `}};function At(r){return new X(r)}export{M as a,Ve as b,Ue as c,Ke as d,Ze as e,je as f,Xe as g,et as h,tt as i,nt as j,rt as k,ct as l,yt as m,At as n};
@@ -1,2 +1,2 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.12.0");process.exit(0)}
2
- import{c as T}from"./chunk-3AFNXU45.js";var S,E,t,N,_=T(()=>{"use strict";S={MMAP_SIZE_BYTES:67108864,CACHE_SIZE_KB:-32e3,BUSY_TIMEOUT_MS:5e3,DEFAULT_VECTOR_DIMENSIONS:384,DEFAULT_SEARCH_LIMIT:100,CLEANUP_INTERVAL_MS:6e4,TTL_MULTIPLIER_MS:1e3},E={M_CONNECTIONS:16,EF_CONSTRUCTION:200,EF_SEARCH:100,DEFAULT_K_NEIGHBORS:10,COVERAGE_VECTOR_DIMENSION:384},t={MAX_CONCURRENT_AGENTS:15,DEFAULT_AGENT_TTL_MS:36e5,DEFAULT_AGENT_TIMEOUT_MS:12e4,MAX_POOL_SIZE:10},N={MAX_HISTORY_SIZE:1e4}});export{S as a,E as b,t as c,N as d,_ as e};
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.12.2");process.exit(0)}
2
+ import{c as T}from"./chunk-HU6ETNA7.js";var S,E,t,N,_=T(()=>{"use strict";S={MMAP_SIZE_BYTES:67108864,CACHE_SIZE_KB:-32e3,BUSY_TIMEOUT_MS:5e3,DEFAULT_VECTOR_DIMENSIONS:384,DEFAULT_SEARCH_LIMIT:100,CLEANUP_INTERVAL_MS:6e4,TTL_MULTIPLIER_MS:1e3},E={M_CONNECTIONS:16,EF_CONSTRUCTION:200,EF_SEARCH:100,DEFAULT_K_NEIGHBORS:10,COVERAGE_VECTOR_DIMENSION:384},t={MAX_CONCURRENT_AGENTS:15,DEFAULT_AGENT_TTL_MS:36e5,DEFAULT_AGENT_TIMEOUT_MS:12e4,MAX_POOL_SIZE:10},N={MAX_HISTORY_SIZE:1e4}});export{S as a,E as b,t as c,N as d,_ as e};
@@ -1,2 +1,2 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.12.0");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.12.2");process.exit(0)}
2
2
  import{createRequire as t}from"module";var o=t(import.meta.url),e=o("@huggingface/transformers"),n=e,{RuvectorLayer:i,TensorCompress:a,differentiableSearch:c,hierarchicalForward:s,getCompressionLevel:l,init:p,FlashAttention:m,DotProductAttention:u,MultiHeadAttention:d,HyperbolicAttention:f,LinearAttention:A,MoEAttention:g,SonaEngine:h,pipeline:_}=e||{};export{n as a,i as b,a as c,c as d,s as e,l as f,p as g,m as h,u as i,d as j,f as k,A as l,g as m,h as n,_ as o};
@@ -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.12.0");process.exit(0)}
2
- import{c as w,d as E,f as T}from"./chunk-3AFNXU45.js";var d=E((b,u)=>{"use strict";var _=typeof Buffer<"u",a=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,l=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function p(r,t,e){e==null&&t!==null&&typeof t=="object"&&(e=t,t=void 0),_&&Buffer.isBuffer(r)&&(r=r.toString()),r&&r.charCodeAt(0)===65279&&(r=r.slice(1));let o=JSON.parse(r,t);if(o===null||typeof o!="object")return o;let n=e&&e.protoAction||"error",c=e&&e.constructorAction||"error";if(n==="ignore"&&c==="ignore")return o;if(n!=="ignore"&&c!=="ignore"){if(a.test(r)===!1&&l.test(r)===!1)return o}else if(n!=="ignore"&&c==="ignore"){if(a.test(r)===!1)return o}else if(l.test(r)===!1)return o;return y(o,{protoAction:n,constructorAction:c,safe:e&&e.safe})}function y(r,{protoAction:t="error",constructorAction:e="error",safe:o}={}){let n=[r];for(;n.length;){let c=n;n=[];for(let s of c){if(t!=="ignore"&&Object.prototype.hasOwnProperty.call(s,"__proto__")){if(o===!0)return null;if(t==="error")throw new SyntaxError("Object contains forbidden prototype property");delete s.__proto__}if(e!=="ignore"&&Object.prototype.hasOwnProperty.call(s,"constructor")&&s.constructor!==null&&typeof s.constructor=="object"&&Object.prototype.hasOwnProperty.call(s.constructor,"prototype")){if(o===!0)return null;if(e==="error")throw new SyntaxError("Object contains forbidden prototype property");delete s.constructor}for(let h in s){let f=s[h];f&&typeof f=="object"&&n.push(f)}}}return r}function i(r,t,e){let{stackTraceLimit:o}=Error;Error.stackTraceLimit=0;try{return p(r,t,e)}finally{Error.stackTraceLimit=o}}function m(r,t){let{stackTraceLimit:e}=Error;Error.stackTraceLimit=0;try{return p(r,t,{safe:!0})}catch{return}finally{Error.stackTraceLimit=e}}u.exports=i;u.exports.default=i;u.exports.parse=i;u.exports.safeParse=m;u.exports.scan=y});function F(r){return g.default.parse(r,void 0,{protoAction:"remove",constructorAction:"remove"})}function j(r,t){try{return F(r)}catch(e){throw new Error(`Invalid JSON in --${t}: ${e instanceof Error?e.message:"Parse error"}`)}}var g,O=w(()=>{"use strict";g=T(d(),1)});export{d as a,F as b,j as c,O as d};
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.12.2");process.exit(0)}
2
+ import{c as w,d as E,f as T}from"./chunk-HU6ETNA7.js";var d=E((b,u)=>{"use strict";var _=typeof Buffer<"u",a=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,l=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function p(r,t,e){e==null&&t!==null&&typeof t=="object"&&(e=t,t=void 0),_&&Buffer.isBuffer(r)&&(r=r.toString()),r&&r.charCodeAt(0)===65279&&(r=r.slice(1));let o=JSON.parse(r,t);if(o===null||typeof o!="object")return o;let n=e&&e.protoAction||"error",c=e&&e.constructorAction||"error";if(n==="ignore"&&c==="ignore")return o;if(n!=="ignore"&&c!=="ignore"){if(a.test(r)===!1&&l.test(r)===!1)return o}else if(n!=="ignore"&&c==="ignore"){if(a.test(r)===!1)return o}else if(l.test(r)===!1)return o;return y(o,{protoAction:n,constructorAction:c,safe:e&&e.safe})}function y(r,{protoAction:t="error",constructorAction:e="error",safe:o}={}){let n=[r];for(;n.length;){let c=n;n=[];for(let s of c){if(t!=="ignore"&&Object.prototype.hasOwnProperty.call(s,"__proto__")){if(o===!0)return null;if(t==="error")throw new SyntaxError("Object contains forbidden prototype property");delete s.__proto__}if(e!=="ignore"&&Object.prototype.hasOwnProperty.call(s,"constructor")&&s.constructor!==null&&typeof s.constructor=="object"&&Object.prototype.hasOwnProperty.call(s.constructor,"prototype")){if(o===!0)return null;if(e==="error")throw new SyntaxError("Object contains forbidden prototype property");delete s.constructor}for(let h in s){let f=s[h];f&&typeof f=="object"&&n.push(f)}}}return r}function i(r,t,e){let{stackTraceLimit:o}=Error;Error.stackTraceLimit=0;try{return p(r,t,e)}finally{Error.stackTraceLimit=o}}function m(r,t){let{stackTraceLimit:e}=Error;Error.stackTraceLimit=0;try{return p(r,t,{safe:!0})}catch{return}finally{Error.stackTraceLimit=e}}u.exports=i;u.exports.default=i;u.exports.parse=i;u.exports.safeParse=m;u.exports.scan=y});function F(r){return g.default.parse(r,void 0,{protoAction:"remove",constructorAction:"remove"})}function j(r,t){try{return F(r)}catch(e){throw new Error(`Invalid JSON in --${t}: ${e instanceof Error?e.message:"Parse error"}`)}}var g,O=w(()=>{"use strict";g=T(d(),1)});export{d as a,F as b,j as c,O as d};
@@ -1,2 +1,2 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.12.0");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.12.2");process.exit(0)}
2
2
  import{isIP as o}from"net";import{lookup as n}from"dns/promises";var f=[/^10\./,/^172\.(1[6-9]|2\d|3[01])\./,/^192\.168\./,/^127\./,/^0\./,/^169\.254\./,/^::1$/,/^fc00:/,/^fe80:/,/^fd[0-9a-f]{2}:/i];function t(r){return f.some(s=>s.test(r))}async function u(r){if(process.env.AQE_HOOKS_SSRF_DISABLED==="true")return{safe:!0};let s;try{s=new URL(r)}catch{return{safe:!1,reason:`Invalid URL: ${r}`}}let e=s.hostname.replace(/^\[|\]$/g,"");if(o(e))return t(e)?{safe:!1,reason:`Private IP blocked: ${e}`}:{safe:!0};try{let a=await n(e);if(t(a.address))return{safe:!1,reason:`DNS resolves to private IP: ${a.address}`}}catch(a){return{safe:!1,reason:`DNS lookup failed for ${e}: ${a.message}`}}return{safe:!0}}export{t as a,u 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.12.0");process.exit(0)}
2
- import{a as S}from"./chunk-7F7U2HUH.js";import{b as w}from"./chunk-PM566XEO.js";import{e as P}from"./chunk-VMP4M5PB.js";import{a as O}from"./chunk-MDT3LIXS.js";import{c as A}from"./chunk-TJEJ4UVX.js";import{b as h,d as U}from"./chunk-K5SN66B4.js";import{S as k,j as f}from"./chunk-2KHDGC7N.js";U();var F=["oracle:test-exec","judge:llm","proxy:structural"],u="proxy:structural";function I(r){return r&&F.includes(r)?r:u}function p(r,e={}){switch(I(r)){case"oracle:test-exec":return!0;case"judge:llm":return e.allowJudgeTier===!0;default:return!1}}import{createHash as D}from"node:crypto";var M=r=>p(r.provenanceTier,{allowJudgeTier:r.allowJudgeTier})?r.candidateHeldOut>r.baselineHeldOut?w(r.candidateAnchorMean,r.baselineAnchorMean,r.anchorTol)?{promote:!0,reason:"held-out gain, no anchor regression, oracle-tier evidence"}:{promote:!1,reason:`anchor regression: ${r.candidateAnchorMean} < ${r.baselineAnchorMean} - ${r.anchorTol}`}:{promote:!1,reason:`held-out ${r.candidateHeldOut} did not beat baseline ${r.baselineHeldOut}`}:{promote:!1,reason:`provenance tier '${r.provenanceTier}' not allowed to promote`},Y=Object.freeze({"accept/v1":M});function E(r){if(r===null||typeof r!="object")return JSON.stringify(r)??"null";if(Array.isArray(r))return`[${r.map(E).join(",")}]`;let e=r;return`{${Object.keys(e).filter(n=>e[n]!==void 0).sort().map(n=>`${JSON.stringify(n)}:${E(e[n])}`).join(",")}}`}var H="aqe:promotion-path-rule:v1+sig",q=r=>p(r.provenanceTier,{allowJudgeTier:r.allowJudgeTier})?r.reward===void 0||r.rewardThreshold===void 0||!(r.reward>=r.rewardThreshold)?{promote:!1,reason:`reward ${r.reward} below threshold ${r.rewardThreshold}`}:r.occurrences===void 0||r.occurrenceThreshold===void 0||!(r.occurrences>=r.occurrenceThreshold)?{promote:!1,reason:`occurrences ${r.occurrences} below threshold ${r.occurrenceThreshold}`}:r.successRate===void 0||r.successRateThreshold===void 0||!(r.successRate>=r.successRateThreshold)?{promote:!1,reason:`success rate ${r.successRate} below threshold ${r.successRateThreshold}`}:r.withinActivityWindow!==!0?{promote:!1,reason:"pattern outside promotion activity window (stale)"}:{promote:!0,reason:"tier allowed; reward/occurrence/success-rate thresholds met; within activity window"}:{promote:!1,reason:`provenance tier '${r.provenanceTier}' not allowed to promote`},W=r=>p(r.provenanceTier,{allowJudgeTier:r.allowJudgeTier})?r.insightConfidence===void 0||r.insightConfidenceThreshold===void 0||!(r.insightConfidence>=r.insightConfidenceThreshold)?{promote:!1,reason:`insight confidence ${r.insightConfidence} below threshold ${r.insightConfidenceThreshold}`}:r.insightActionable!==!0?{promote:!1,reason:"insight produced no actionable reorganization"}:{promote:!0,reason:"tier allowed; insight confidence meets threshold; actionable"}:{promote:!1,reason:`provenance tier '${r.provenanceTier}' not allowed to apply`},L=Object.freeze({"pattern-promote/v1":q,"dream-apply/v1":W});function T(r){return D("sha256").update(E(r)).digest("hex")}function _(r){if(!(r in L))throw new Error(`Unknown promotion-path rule version '${r}' \u2014 cannot fingerprint an unregistered rule.`);return D("sha256").update(H).update("\0").update(r).digest("hex")}function y(r,e){let t=L[r];if(!t)throw new Error(`Unknown promotion-path rule version '${r}' \u2014 refusing to re-execute an unregistered rule.`);return t(e)}function C(r,e={}){let t=[],n=T(r.sealed)===r.sealedHash;n||t.push("sealIntact");let a=!1;try{let c=_(r.ruleVersion);a=r.ruleFingerprint===c&&(e.pinnedRuleFingerprint===void 0||r.ruleFingerprint===e.pinnedRuleFingerprint)}catch{a=!1}a||t.push("gateUnchanged");let s=!1;n&&a&&(s=(y(r.ruleVersion,r.sealed).promote?"promote":"reject")===r.recordedVerdict),s||t.push("gateReExecutes");let i=t.length===0;return{valid:i,checks:{sealIntact:n,gateUnchanged:a,gateReExecutes:s},failures:t,reason:i?"promotion verified: sealed inputs intact, rule unchanged, frozen rule re-execution reproduces the recorded verdict":`promotion INVALID (failed: ${t.join(", ")}) \u2014 the recorded verdict is not reproducible under the frozen rule`}}O();k();var d=A.create("pattern-lifecycle"),$={promotionRewardThreshold:.7,promotionMinOccurrences:P,promotionMinSuccessRate:.7,deprecationFailureThreshold:3,staleDaysThreshold:30,confidenceDecayRate:.01,minActiveConfidence:.3,maxAgeForActivePatterns:90,promotionActivityWindowDays:30,asymmetricLearning:{},allowJudgeTierPromotion:!1},x=5,j=.9,V=2;function Q(r,e){return e<x||!Number.isFinite(r)?0:Math.min(Math.max(r,0),1)}var b=class{constructor(e,t={}){this.db=e;this.config={...$,...t},this.asymmetricEngine=new S(this.config.asymmetricLearning),this.ensureSchema()}db;config;asymmetricEngine;_witnessChain=null;set witnessChain(e){this._witnessChain=e}_compressionService=null;set compressionService(e){this._compressionService=e}ensureSchema(){try{this.db.prepare(`
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.12.2");process.exit(0)}
2
+ import{a as S}from"./chunk-MNHGBG4D.js";import{b as w}from"./chunk-OEZNUXY7.js";import{e as P}from"./chunk-BDX54WJV.js";import{a as O}from"./chunk-YY4KXDI6.js";import{c as A}from"./chunk-R5HC6JVJ.js";import{b as h,d as U}from"./chunk-CKFZOPZN.js";import{S as k,j as f}from"./chunk-CTFW7CMI.js";U();var F=["oracle:test-exec","judge:llm","proxy:structural"],u="proxy:structural";function I(r){return r&&F.includes(r)?r:u}function p(r,e={}){switch(I(r)){case"oracle:test-exec":return!0;case"judge:llm":return e.allowJudgeTier===!0;default:return!1}}import{createHash as D}from"node:crypto";var M=r=>p(r.provenanceTier,{allowJudgeTier:r.allowJudgeTier})?r.candidateHeldOut>r.baselineHeldOut?w(r.candidateAnchorMean,r.baselineAnchorMean,r.anchorTol)?{promote:!0,reason:"held-out gain, no anchor regression, oracle-tier evidence"}:{promote:!1,reason:`anchor regression: ${r.candidateAnchorMean} < ${r.baselineAnchorMean} - ${r.anchorTol}`}:{promote:!1,reason:`held-out ${r.candidateHeldOut} did not beat baseline ${r.baselineHeldOut}`}:{promote:!1,reason:`provenance tier '${r.provenanceTier}' not allowed to promote`},Y=Object.freeze({"accept/v1":M});function E(r){if(r===null||typeof r!="object")return JSON.stringify(r)??"null";if(Array.isArray(r))return`[${r.map(E).join(",")}]`;let e=r;return`{${Object.keys(e).filter(n=>e[n]!==void 0).sort().map(n=>`${JSON.stringify(n)}:${E(e[n])}`).join(",")}}`}var H="aqe:promotion-path-rule:v1+sig",q=r=>p(r.provenanceTier,{allowJudgeTier:r.allowJudgeTier})?r.reward===void 0||r.rewardThreshold===void 0||!(r.reward>=r.rewardThreshold)?{promote:!1,reason:`reward ${r.reward} below threshold ${r.rewardThreshold}`}:r.occurrences===void 0||r.occurrenceThreshold===void 0||!(r.occurrences>=r.occurrenceThreshold)?{promote:!1,reason:`occurrences ${r.occurrences} below threshold ${r.occurrenceThreshold}`}:r.successRate===void 0||r.successRateThreshold===void 0||!(r.successRate>=r.successRateThreshold)?{promote:!1,reason:`success rate ${r.successRate} below threshold ${r.successRateThreshold}`}:r.withinActivityWindow!==!0?{promote:!1,reason:"pattern outside promotion activity window (stale)"}:{promote:!0,reason:"tier allowed; reward/occurrence/success-rate thresholds met; within activity window"}:{promote:!1,reason:`provenance tier '${r.provenanceTier}' not allowed to promote`},W=r=>p(r.provenanceTier,{allowJudgeTier:r.allowJudgeTier})?r.insightConfidence===void 0||r.insightConfidenceThreshold===void 0||!(r.insightConfidence>=r.insightConfidenceThreshold)?{promote:!1,reason:`insight confidence ${r.insightConfidence} below threshold ${r.insightConfidenceThreshold}`}:r.insightActionable!==!0?{promote:!1,reason:"insight produced no actionable reorganization"}:{promote:!0,reason:"tier allowed; insight confidence meets threshold; actionable"}:{promote:!1,reason:`provenance tier '${r.provenanceTier}' not allowed to apply`},L=Object.freeze({"pattern-promote/v1":q,"dream-apply/v1":W});function T(r){return D("sha256").update(E(r)).digest("hex")}function _(r){if(!(r in L))throw new Error(`Unknown promotion-path rule version '${r}' \u2014 cannot fingerprint an unregistered rule.`);return D("sha256").update(H).update("\0").update(r).digest("hex")}function y(r,e){let t=L[r];if(!t)throw new Error(`Unknown promotion-path rule version '${r}' \u2014 refusing to re-execute an unregistered rule.`);return t(e)}function C(r,e={}){let t=[],n=T(r.sealed)===r.sealedHash;n||t.push("sealIntact");let a=!1;try{let c=_(r.ruleVersion);a=r.ruleFingerprint===c&&(e.pinnedRuleFingerprint===void 0||r.ruleFingerprint===e.pinnedRuleFingerprint)}catch{a=!1}a||t.push("gateUnchanged");let s=!1;n&&a&&(s=(y(r.ruleVersion,r.sealed).promote?"promote":"reject")===r.recordedVerdict),s||t.push("gateReExecutes");let i=t.length===0;return{valid:i,checks:{sealIntact:n,gateUnchanged:a,gateReExecutes:s},failures:t,reason:i?"promotion verified: sealed inputs intact, rule unchanged, frozen rule re-execution reproduces the recorded verdict":`promotion INVALID (failed: ${t.join(", ")}) \u2014 the recorded verdict is not reproducible under the frozen rule`}}O();k();var d=A.create("pattern-lifecycle"),$={promotionRewardThreshold:.7,promotionMinOccurrences:P,promotionMinSuccessRate:.7,deprecationFailureThreshold:3,staleDaysThreshold:30,confidenceDecayRate:.01,minActiveConfidence:.3,maxAgeForActivePatterns:90,promotionActivityWindowDays:30,asymmetricLearning:{},allowJudgeTierPromotion:!1},x=5,j=.9,V=2;function Q(r,e){return e<x||!Number.isFinite(r)?0:Math.min(Math.max(r,0),1)}var b=class{constructor(e,t={}){this.db=e;this.config={...$,...t},this.asymmetricEngine=new S(this.config.asymmetricLearning),this.ensureSchema()}db;config;asymmetricEngine;_witnessChain=null;set witnessChain(e){this._witnessChain=e}_compressionService=null;set compressionService(e){this._compressionService=e}ensureSchema(){try{this.db.prepare(`
3
3
  SELECT deprecated_at FROM qe_patterns LIMIT 1
4
4
  `).get()}catch(e){d.debug("Adding missing deprecated_at column",{error:e instanceof Error?e.message:String(e)}),this.db.exec(`
5
5
  ALTER TABLE qe_patterns ADD COLUMN deprecated_at TEXT DEFAULT NULL
@@ -1,2 +1,2 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.12.0");process.exit(0)}
2
- import{c as s,e as t}from"./chunk-3AFNXU45.js";var K={};t(K,{DEFAULT_FEATURE_FLAGS:()=>r,getRuVectorFeatureFlags:()=>u,getRvfMigrationStage:()=>H,initFeatureFlagsFromEnv:()=>z,isAgentMemoryBranchingEnabled:()=>I,isCNNVisualRegressionEnabled:()=>b,isCognitiveRoutingEnabled:()=>Y,isCoherenceActionGateEnabled:()=>A,isCoherenceGateEnabled:()=>f,isColdTierGNNEnabled:()=>P,isCrossDomainTransferEnabled:()=>N,isCusumDriftDetectionEnabled:()=>F,isDAGAttentionEnabled:()=>g,isDeltaEventSourcingEnabled:()=>M,isDeterministicDitherEnabled:()=>T,isEpropOnlineLearningEnabled:()=>Q,isEwcPlusPlusEnabled:()=>L,isFlashAttentionEnabled:()=>E,isGNNIndexEnabled:()=>R,isGrangerCausalityEnabled:()=>B,isGraphMAEEnabled:()=>x,isHDCFingerprintingEnabled:()=>D,isHnswHealthMonitorEnabled:()=>U,isHopfieldMemoryEnabled:()=>h,isHyperbolicHnswEnabled:()=>k,isMetaLearningEnabled:()=>m,isMetadataFilteringEnabled:()=>S,isNativeHNSWEnabled:()=>_,isNeuralRoutingEnabled:()=>C,isRVFPatternStoreEnabled:()=>V,isReasoningQECEnabled:()=>v,isRegretTrackingEnabled:()=>O,isReservoirReplayEnabled:()=>w,isSONAEnabled:()=>a,isSONAThreeLoopEnabled:()=>p,isSpectralSparsificationEnabled:()=>W,isSublinearSolverEnabled:()=>y,isTemporalCompressionEnabled:()=>c,isUnifiedHnswEnabled:()=>G,isWitnessChainEnabled:()=>d,resetRuVectorFeatureFlags:()=>i,setRuVectorFeatureFlags:()=>o,shouldLogMigrationMetrics:()=>l});function u(){return{...e}}function o(n){e={...e,...n}}function i(){e={...r}}function a(){return e.useQESONA}function E(){return e.useQEFlashAttention}function R(){return e.useQEGNNIndex}function l(){return e.logMigrationMetrics}function _(){return e.useNativeHNSW}function c(){return e.useTemporalCompression}function S(){return e.useMetadataFiltering}function T(){return e.useDeterministicDither}function C(){return e.useNeuralRouting}function p(){return e.useSONAThreeLoop}function N(){return e.useCrossDomainTransfer}function U(){return e.useHnswHealthMonitor}function O(){return e.useRegretTracking}function f(){return e.useCoherenceGate}function d(){return e.useWitnessChain}function b(){return e.useCNNVisualRegression}function g(){return e.useDAGAttention}function A(){return e.useCoherenceActionGate}function v(){return e.useReasoningQEC}function V(){return e.useRVFPatternStore}function I(){return e.useAgentMemoryBranching}function G(){return e.useUnifiedHnsw}function H(){return e.rvfMigrationStage}function D(){return e.useHDCFingerprinting}function F(){return e.useCusumDriftDetection}function M(){return e.useDeltaEventSourcing}function L(){return e.useEwcPlusPlusRegularization}function x(){return e.useGraphMAEEmbeddings}function h(){return e.useHopfieldMemory}function P(){return e.useColdTierGNN}function m(){return e.useMetaLearningEnhancements}function y(){return e.useSublinearSolver}function W(){return e.useSpectralSparsification}function w(){return e.useReservoirReplay}function Q(){return e.useEpropOnlineLearning}function B(){return e.useGrangerCausality}function Y(){return e.useCognitiveRouting}function k(){return e.useHyperbolicHnsw}function z(){let n={};process.env.RUVECTOR_USE_RVF_PATTERN_STORE!==void 0&&(n.useRVFPatternStore=process.env.RUVECTOR_USE_RVF_PATTERN_STORE==="true"),process.env.RUVECTOR_USE_SONA!==void 0&&(n.useQESONA=process.env.RUVECTOR_USE_SONA==="true"),process.env.RUVECTOR_USE_FLASH_ATTENTION!==void 0&&(n.useQEFlashAttention=process.env.RUVECTOR_USE_FLASH_ATTENTION==="true"),process.env.RUVECTOR_USE_GNN_INDEX!==void 0&&(n.useQEGNNIndex=process.env.RUVECTOR_USE_GNN_INDEX==="true"),process.env.RUVECTOR_LOG_MIGRATION_METRICS!==void 0&&(n.logMigrationMetrics=process.env.RUVECTOR_LOG_MIGRATION_METRICS==="true"),process.env.RUVECTOR_USE_NATIVE_HNSW!==void 0&&(n.useNativeHNSW=process.env.RUVECTOR_USE_NATIVE_HNSW==="true"),process.env.RUVECTOR_USE_TEMPORAL_COMPRESSION!==void 0&&(n.useTemporalCompression=process.env.RUVECTOR_USE_TEMPORAL_COMPRESSION==="true"),process.env.RUVECTOR_USE_METADATA_FILTERING!==void 0&&(n.useMetadataFiltering=process.env.RUVECTOR_USE_METADATA_FILTERING==="true"),process.env.RUVECTOR_USE_DETERMINISTIC_DITHER!==void 0&&(n.useDeterministicDither=process.env.RUVECTOR_USE_DETERMINISTIC_DITHER==="true"),process.env.RUVECTOR_USE_NEURAL_ROUTING!==void 0&&(n.useNeuralRouting=process.env.RUVECTOR_USE_NEURAL_ROUTING==="true"),process.env.RUVECTOR_USE_SONA_THREE_LOOP!==void 0&&(n.useSONAThreeLoop=process.env.RUVECTOR_USE_SONA_THREE_LOOP==="true"),process.env.RUVECTOR_USE_CROSS_DOMAIN_TRANSFER!==void 0&&(n.useCrossDomainTransfer=process.env.RUVECTOR_USE_CROSS_DOMAIN_TRANSFER==="true"),process.env.RUVECTOR_USE_HNSW_HEALTH_MONITOR!==void 0&&(n.useHnswHealthMonitor=process.env.RUVECTOR_USE_HNSW_HEALTH_MONITOR==="true"),process.env.RUVECTOR_USE_REGRET_TRACKING!==void 0&&(n.useRegretTracking=process.env.RUVECTOR_USE_REGRET_TRACKING==="true"),process.env.RUVECTOR_USE_COHERENCE_GATE!==void 0&&(n.useCoherenceGate=process.env.RUVECTOR_USE_COHERENCE_GATE==="true"),process.env.RUVECTOR_USE_WITNESS_CHAIN!==void 0&&(n.useWitnessChain=process.env.RUVECTOR_USE_WITNESS_CHAIN==="true"),process.env.RUVECTOR_USE_CNN_VISUAL_REGRESSION!==void 0&&(n.useCNNVisualRegression=process.env.RUVECTOR_USE_CNN_VISUAL_REGRESSION==="true"),process.env.RUVECTOR_USE_DAG_ATTENTION!==void 0&&(n.useDAGAttention=process.env.RUVECTOR_USE_DAG_ATTENTION==="true"),process.env.RUVECTOR_USE_COHERENCE_ACTION_GATE!==void 0&&(n.useCoherenceActionGate=process.env.RUVECTOR_USE_COHERENCE_ACTION_GATE==="true"),process.env.RUVECTOR_USE_REASONING_QEC!==void 0&&(n.useReasoningQEC=process.env.RUVECTOR_USE_REASONING_QEC==="true"),process.env.RUVECTOR_USE_HDC_FINGERPRINTING!==void 0&&(n.useHDCFingerprinting=process.env.RUVECTOR_USE_HDC_FINGERPRINTING==="true"),process.env.RUVECTOR_USE_CUSUM_DRIFT_DETECTION!==void 0&&(n.useCusumDriftDetection=process.env.RUVECTOR_USE_CUSUM_DRIFT_DETECTION==="true"),process.env.RUVECTOR_USE_DELTA_EVENT_SOURCING!==void 0&&(n.useDeltaEventSourcing=process.env.RUVECTOR_USE_DELTA_EVENT_SOURCING==="true"),process.env.RUVECTOR_USE_EWC_PLUS_PLUS!==void 0&&(n.useEwcPlusPlusRegularization=process.env.RUVECTOR_USE_EWC_PLUS_PLUS==="true"),process.env.RUVECTOR_USE_META_LEARNING!==void 0&&(n.useMetaLearningEnhancements=process.env.RUVECTOR_USE_META_LEARNING==="true"),process.env.RUVECTOR_USE_SUBLINEAR_SOLVER!==void 0&&(n.useSublinearSolver=process.env.RUVECTOR_USE_SUBLINEAR_SOLVER==="true"),process.env.RUVECTOR_USE_SPECTRAL_SPARSIFICATION!==void 0&&(n.useSpectralSparsification=process.env.RUVECTOR_USE_SPECTRAL_SPARSIFICATION==="true"),process.env.RUVECTOR_USE_RESERVOIR_REPLAY!==void 0&&(n.useReservoirReplay=process.env.RUVECTOR_USE_RESERVOIR_REPLAY==="true"),process.env.RUVECTOR_USE_EPROP_ONLINE_LEARNING!==void 0&&(n.useEpropOnlineLearning=process.env.RUVECTOR_USE_EPROP_ONLINE_LEARNING==="true"),process.env.RUVECTOR_USE_GRANGER_CAUSALITY!==void 0&&(n.useGrangerCausality=process.env.RUVECTOR_USE_GRANGER_CAUSALITY==="true"),process.env.RUVECTOR_USE_COGNITIVE_ROUTING!==void 0&&(n.useCognitiveRouting=process.env.RUVECTOR_USE_COGNITIVE_ROUTING==="true"),process.env.RUVECTOR_USE_HYPERBOLIC_HNSW!==void 0&&(n.useHyperbolicHnsw=process.env.RUVECTOR_USE_HYPERBOLIC_HNSW==="true"),o(n)}var r,e,X=s(()=>{r={useQESONA:!0,useQEFlashAttention:!0,useQEGNNIndex:!0,logMigrationMetrics:!0,useNativeHNSW:!0,useTemporalCompression:!0,useMetadataFiltering:!0,useDeterministicDither:!0,useNeuralRouting:!0,useSONAThreeLoop:!0,useCrossDomainTransfer:!0,useHnswHealthMonitor:!0,useRegretTracking:!0,useCoherenceGate:!0,useWitnessChain:!0,useCNNVisualRegression:!0,useDAGAttention:!0,useCoherenceActionGate:!0,useReasoningQEC:!0,useRVFPatternStore:!0,useAgentMemoryBranching:!0,useUnifiedHnsw:!0,rvfMigrationStage:2,useHDCFingerprinting:!0,useCusumDriftDetection:!0,useDeltaEventSourcing:!0,useEwcPlusPlusRegularization:!0,useGraphMAEEmbeddings:!0,useHopfieldMemory:!0,useColdTierGNN:!0,useMetaLearningEnhancements:!0,useSublinearSolver:!0,useSpectralSparsification:!0,useReservoirReplay:!0,useEpropOnlineLearning:!0,useGrangerCausality:!0,useCognitiveRouting:!1,useHyperbolicHnsw:!1},e={...r}});export{r as a,u as b,o as c,i as d,a as e,E as f,R as g,l as h,_ as i,c as j,S as k,T as l,C as m,p as n,N as o,U as p,O as q,f as r,d as s,b as t,g as u,A as v,v as w,V as x,I as y,G as z,H as A,D as B,F as C,M as D,L as E,x as F,h as G,P as H,m as I,y as J,W as K,w as L,Q as M,B as N,Y as O,k as P,z as Q,K as R,X as S};
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.12.2");process.exit(0)}
2
+ import{c as s,e as t}from"./chunk-HU6ETNA7.js";var K={};t(K,{DEFAULT_FEATURE_FLAGS:()=>r,getRuVectorFeatureFlags:()=>u,getRvfMigrationStage:()=>H,initFeatureFlagsFromEnv:()=>z,isAgentMemoryBranchingEnabled:()=>I,isCNNVisualRegressionEnabled:()=>b,isCognitiveRoutingEnabled:()=>Y,isCoherenceActionGateEnabled:()=>A,isCoherenceGateEnabled:()=>f,isColdTierGNNEnabled:()=>P,isCrossDomainTransferEnabled:()=>N,isCusumDriftDetectionEnabled:()=>F,isDAGAttentionEnabled:()=>g,isDeltaEventSourcingEnabled:()=>M,isDeterministicDitherEnabled:()=>T,isEpropOnlineLearningEnabled:()=>Q,isEwcPlusPlusEnabled:()=>L,isFlashAttentionEnabled:()=>E,isGNNIndexEnabled:()=>R,isGrangerCausalityEnabled:()=>B,isGraphMAEEnabled:()=>x,isHDCFingerprintingEnabled:()=>D,isHnswHealthMonitorEnabled:()=>U,isHopfieldMemoryEnabled:()=>h,isHyperbolicHnswEnabled:()=>k,isMetaLearningEnabled:()=>m,isMetadataFilteringEnabled:()=>S,isNativeHNSWEnabled:()=>_,isNeuralRoutingEnabled:()=>C,isRVFPatternStoreEnabled:()=>V,isReasoningQECEnabled:()=>v,isRegretTrackingEnabled:()=>O,isReservoirReplayEnabled:()=>w,isSONAEnabled:()=>a,isSONAThreeLoopEnabled:()=>p,isSpectralSparsificationEnabled:()=>W,isSublinearSolverEnabled:()=>y,isTemporalCompressionEnabled:()=>c,isUnifiedHnswEnabled:()=>G,isWitnessChainEnabled:()=>d,resetRuVectorFeatureFlags:()=>i,setRuVectorFeatureFlags:()=>o,shouldLogMigrationMetrics:()=>l});function u(){return{...e}}function o(n){e={...e,...n}}function i(){e={...r}}function a(){return e.useQESONA}function E(){return e.useQEFlashAttention}function R(){return e.useQEGNNIndex}function l(){return e.logMigrationMetrics}function _(){return e.useNativeHNSW}function c(){return e.useTemporalCompression}function S(){return e.useMetadataFiltering}function T(){return e.useDeterministicDither}function C(){return e.useNeuralRouting}function p(){return e.useSONAThreeLoop}function N(){return e.useCrossDomainTransfer}function U(){return e.useHnswHealthMonitor}function O(){return e.useRegretTracking}function f(){return e.useCoherenceGate}function d(){return e.useWitnessChain}function b(){return e.useCNNVisualRegression}function g(){return e.useDAGAttention}function A(){return e.useCoherenceActionGate}function v(){return e.useReasoningQEC}function V(){return e.useRVFPatternStore}function I(){return e.useAgentMemoryBranching}function G(){return e.useUnifiedHnsw}function H(){return e.rvfMigrationStage}function D(){return e.useHDCFingerprinting}function F(){return e.useCusumDriftDetection}function M(){return e.useDeltaEventSourcing}function L(){return e.useEwcPlusPlusRegularization}function x(){return e.useGraphMAEEmbeddings}function h(){return e.useHopfieldMemory}function P(){return e.useColdTierGNN}function m(){return e.useMetaLearningEnhancements}function y(){return e.useSublinearSolver}function W(){return e.useSpectralSparsification}function w(){return e.useReservoirReplay}function Q(){return e.useEpropOnlineLearning}function B(){return e.useGrangerCausality}function Y(){return e.useCognitiveRouting}function k(){return e.useHyperbolicHnsw}function z(){let n={};process.env.RUVECTOR_USE_RVF_PATTERN_STORE!==void 0&&(n.useRVFPatternStore=process.env.RUVECTOR_USE_RVF_PATTERN_STORE==="true"),process.env.RUVECTOR_USE_SONA!==void 0&&(n.useQESONA=process.env.RUVECTOR_USE_SONA==="true"),process.env.RUVECTOR_USE_FLASH_ATTENTION!==void 0&&(n.useQEFlashAttention=process.env.RUVECTOR_USE_FLASH_ATTENTION==="true"),process.env.RUVECTOR_USE_GNN_INDEX!==void 0&&(n.useQEGNNIndex=process.env.RUVECTOR_USE_GNN_INDEX==="true"),process.env.RUVECTOR_LOG_MIGRATION_METRICS!==void 0&&(n.logMigrationMetrics=process.env.RUVECTOR_LOG_MIGRATION_METRICS==="true"),process.env.RUVECTOR_USE_NATIVE_HNSW!==void 0&&(n.useNativeHNSW=process.env.RUVECTOR_USE_NATIVE_HNSW==="true"),process.env.RUVECTOR_USE_TEMPORAL_COMPRESSION!==void 0&&(n.useTemporalCompression=process.env.RUVECTOR_USE_TEMPORAL_COMPRESSION==="true"),process.env.RUVECTOR_USE_METADATA_FILTERING!==void 0&&(n.useMetadataFiltering=process.env.RUVECTOR_USE_METADATA_FILTERING==="true"),process.env.RUVECTOR_USE_DETERMINISTIC_DITHER!==void 0&&(n.useDeterministicDither=process.env.RUVECTOR_USE_DETERMINISTIC_DITHER==="true"),process.env.RUVECTOR_USE_NEURAL_ROUTING!==void 0&&(n.useNeuralRouting=process.env.RUVECTOR_USE_NEURAL_ROUTING==="true"),process.env.RUVECTOR_USE_SONA_THREE_LOOP!==void 0&&(n.useSONAThreeLoop=process.env.RUVECTOR_USE_SONA_THREE_LOOP==="true"),process.env.RUVECTOR_USE_CROSS_DOMAIN_TRANSFER!==void 0&&(n.useCrossDomainTransfer=process.env.RUVECTOR_USE_CROSS_DOMAIN_TRANSFER==="true"),process.env.RUVECTOR_USE_HNSW_HEALTH_MONITOR!==void 0&&(n.useHnswHealthMonitor=process.env.RUVECTOR_USE_HNSW_HEALTH_MONITOR==="true"),process.env.RUVECTOR_USE_REGRET_TRACKING!==void 0&&(n.useRegretTracking=process.env.RUVECTOR_USE_REGRET_TRACKING==="true"),process.env.RUVECTOR_USE_COHERENCE_GATE!==void 0&&(n.useCoherenceGate=process.env.RUVECTOR_USE_COHERENCE_GATE==="true"),process.env.RUVECTOR_USE_WITNESS_CHAIN!==void 0&&(n.useWitnessChain=process.env.RUVECTOR_USE_WITNESS_CHAIN==="true"),process.env.RUVECTOR_USE_CNN_VISUAL_REGRESSION!==void 0&&(n.useCNNVisualRegression=process.env.RUVECTOR_USE_CNN_VISUAL_REGRESSION==="true"),process.env.RUVECTOR_USE_DAG_ATTENTION!==void 0&&(n.useDAGAttention=process.env.RUVECTOR_USE_DAG_ATTENTION==="true"),process.env.RUVECTOR_USE_COHERENCE_ACTION_GATE!==void 0&&(n.useCoherenceActionGate=process.env.RUVECTOR_USE_COHERENCE_ACTION_GATE==="true"),process.env.RUVECTOR_USE_REASONING_QEC!==void 0&&(n.useReasoningQEC=process.env.RUVECTOR_USE_REASONING_QEC==="true"),process.env.RUVECTOR_USE_HDC_FINGERPRINTING!==void 0&&(n.useHDCFingerprinting=process.env.RUVECTOR_USE_HDC_FINGERPRINTING==="true"),process.env.RUVECTOR_USE_CUSUM_DRIFT_DETECTION!==void 0&&(n.useCusumDriftDetection=process.env.RUVECTOR_USE_CUSUM_DRIFT_DETECTION==="true"),process.env.RUVECTOR_USE_DELTA_EVENT_SOURCING!==void 0&&(n.useDeltaEventSourcing=process.env.RUVECTOR_USE_DELTA_EVENT_SOURCING==="true"),process.env.RUVECTOR_USE_EWC_PLUS_PLUS!==void 0&&(n.useEwcPlusPlusRegularization=process.env.RUVECTOR_USE_EWC_PLUS_PLUS==="true"),process.env.RUVECTOR_USE_META_LEARNING!==void 0&&(n.useMetaLearningEnhancements=process.env.RUVECTOR_USE_META_LEARNING==="true"),process.env.RUVECTOR_USE_SUBLINEAR_SOLVER!==void 0&&(n.useSublinearSolver=process.env.RUVECTOR_USE_SUBLINEAR_SOLVER==="true"),process.env.RUVECTOR_USE_SPECTRAL_SPARSIFICATION!==void 0&&(n.useSpectralSparsification=process.env.RUVECTOR_USE_SPECTRAL_SPARSIFICATION==="true"),process.env.RUVECTOR_USE_RESERVOIR_REPLAY!==void 0&&(n.useReservoirReplay=process.env.RUVECTOR_USE_RESERVOIR_REPLAY==="true"),process.env.RUVECTOR_USE_EPROP_ONLINE_LEARNING!==void 0&&(n.useEpropOnlineLearning=process.env.RUVECTOR_USE_EPROP_ONLINE_LEARNING==="true"),process.env.RUVECTOR_USE_GRANGER_CAUSALITY!==void 0&&(n.useGrangerCausality=process.env.RUVECTOR_USE_GRANGER_CAUSALITY==="true"),process.env.RUVECTOR_USE_COGNITIVE_ROUTING!==void 0&&(n.useCognitiveRouting=process.env.RUVECTOR_USE_COGNITIVE_ROUTING==="true"),process.env.RUVECTOR_USE_HYPERBOLIC_HNSW!==void 0&&(n.useHyperbolicHnsw=process.env.RUVECTOR_USE_HYPERBOLIC_HNSW==="true"),o(n)}var r,e,X=s(()=>{r={useQESONA:!0,useQEFlashAttention:!0,useQEGNNIndex:!0,logMigrationMetrics:!0,useNativeHNSW:!0,useTemporalCompression:!0,useMetadataFiltering:!0,useDeterministicDither:!0,useNeuralRouting:!0,useSONAThreeLoop:!0,useCrossDomainTransfer:!0,useHnswHealthMonitor:!0,useRegretTracking:!0,useCoherenceGate:!0,useWitnessChain:!0,useCNNVisualRegression:!0,useDAGAttention:!0,useCoherenceActionGate:!0,useReasoningQEC:!0,useRVFPatternStore:!0,useAgentMemoryBranching:!0,useUnifiedHnsw:!0,rvfMigrationStage:2,useHDCFingerprinting:!0,useCusumDriftDetection:!0,useDeltaEventSourcing:!0,useEwcPlusPlusRegularization:!0,useGraphMAEEmbeddings:!0,useHopfieldMemory:!0,useColdTierGNN:!0,useMetaLearningEnhancements:!0,useSublinearSolver:!0,useSpectralSparsification:!0,useReservoirReplay:!0,useEpropOnlineLearning:!0,useGrangerCausality:!0,useCognitiveRouting:!1,useHyperbolicHnsw:!1},e={...r}});export{r as a,u as b,o as c,i as d,a as e,E as f,R as g,l as h,_ as i,c as j,S as k,T as l,C as m,p as n,N as o,U as p,O as q,f as r,d as s,b as t,g as u,A as v,v as w,V as x,I as y,G as z,H as A,D as B,F as C,M as D,L as E,x as F,h as G,P as H,m as I,y as J,W as K,w as L,Q as M,B as N,Y as O,k as P,z as Q,K as R,X as S};
@@ -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.12.0");process.exit(0)}
2
- import{l as m}from"./chunk-7WX3MKRS.js";import{a as l,c as d}from"./chunk-RHC7TFPU.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-ELPSUIPV.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.12.2");process.exit(0)}
2
+ import{l as m}from"./chunk-LIAW5FD7.js";import{a as l,c as d}from"./chunk-X47GHZY3.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-CLBUCKZQ.js"),a=t.profile||"medium",o=t.targetAgents||10,i=t.durationMs||3e4,n=t.mockMode!==!1,s=await r({maxAgents:o,workloadProfile:a,mockMode:n}).runTest(o,i),e=s.bottlenecks;return{success:!0,data:{testId:u.requestId,profile:a,targetAgents:o,duration:s.duration,mockMode:n,passed:s.success,bottleneckCount:e?.bottlenecks?.length??0,report:{overallSeverity:e?.overallSeverity??"none",hasCritical:e?.hasCritical??!1,checksPerformed:e?.summary?.totalChecks??0,bottlenecksDetected:e?.summary?.detected??0},summary:`Load test (${a}, ${n?"mock":"real"}): ${o} agents, ${i}ms \u2014 ${s.success?"PASSED":"FAILED"}`+(e?.hasCritical?" [CRITICAL BOTTLENECKS]":"")}}}catch(r){return{success:!1,error:l(r)}}}};export{c as a};
@@ -1,2 +1,2 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.12.0");process.exit(0)}
2
- import{b as A,d as M}from"./chunk-K5SN66B4.js";import{a as S,b as D}from"./chunk-27JCWG5J.js";import{S as Q,l as E}from"./chunk-2KHDGC7N.js";import{g as C}from"./chunk-3AFNXU45.js";M();Q();var v=(1+Math.sqrt(5))/2,R=1/v;function k(t,e=0){if(t<0||!Number.isFinite(t))throw new Error(`Invalid dither sequence length: ${t}`);if(!Number.isFinite(e))throw new Error(`Invalid dither seed: ${e}`);let n=new Float32Array(t),r=(e*R%1+1)%1;for(let i=0;i<t;i++)n[i]=((r+(i+1)*v)%1+1)%1;return n}function I(t,e,n=0){if(!(t instanceof Float32Array))throw new Error("Input vector must be a Float32Array");if(t.length===0)return{quantized:new Int32Array(0),dequantized:new Float32Array(0),bitDepth:e,seed:n,stepSize:0,minValue:0,maxValue:0};if(e<1||e>32||!Number.isInteger(e))throw new Error(`Invalid bit depth: ${e}. Must be an integer in [1, 32].`);let r=t[0],i=t[0];for(let d=1;d<t.length;d++)t[d]<r&&(r=t[d]),t[d]>i&&(i=t[d]);let s=(1<<e)-1,a=i-r,o=a===0?1:a/s,m=k(t.length,n),l=new Int32Array(t.length),u=new Float32Array(t.length);for(let d=0;d<t.length;d++){if(a===0)l[d]=Math.round(s/2);else{let L=(t[d]-r)/o+(m[d]-.5);l[d]=Math.max(0,Math.min(s,Math.round(L)))}u[d]=l[d]*o+r}return{quantized:l,dequantized:u,bitDepth:e,seed:n,stepSize:o,minValue:r,maxValue:i}}var h=null,b=null,p=null,g=null,f=null,w=null,x=!1;try{let t=(D(),C(S));h=t.RuvectorLayer,b=t.TensorCompress,p=t.differentiableSearch,g=t.hierarchicalForward,f=t.getCompressionLevel,w=t.init,x=!0}catch{}function H(){return x}function c(){if(!x)throw new Error("@ruvector/gnn native module is not available on this platform. Install the appropriate optional dependency for your platform, or use a platform where pre-built binaries are available.")}var F=!1;function V(){if(!F){c();let t=w();return F=!0,t}return"@ruvector/gnn already initialized"}var y=class{indexes;config;nextId;gnnLayers;compressor;constructor(e={}){this.config={M:e.M||16,efConstruction:e.efConstruction||200,efSearch:e.efSearch||50,dimension:e.dimension||384,metric:e.metric||"cosine",quantization:e.quantization||"none"},this.indexes=new Map,this.nextId=new Map,this.gnnLayers=new Map,c(),this.compressor=new b,V()}initializeIndex(e){this.indexes.has(e)||(this.indexes.set(e,new Map),this.nextId.set(e,0))}addEmbedding(e,n){let r=e.namespace;this.indexes.has(r)||this.initializeIndex(r);let i=this.indexes.get(r),s=n??this.nextId.get(r);return n===void 0&&this.nextId.set(r,s+1),i.set(s,e),s}addEmbeddingsBatch(e){let n=[];for(let r of e){let i=this.addEmbedding(r.embedding,r.id);n.push(i)}return n}search(e,n={}){let r=n.namespace||e.namespace;if(!this.indexes.has(r))return[];let i=this.indexes.get(r),s=n.limit||10,a=[];for(let[u,d]of i.entries())a.push({id:u,vector:Array.from(d.vector)});if(a.length===0)return[];let o=new Float32Array(e.vector),m=a.map(u=>new Float32Array(u.vector)),l=p(o,m,Math.min(s,a.length),1);return l.indices.map((u,d)=>({id:a[u]?.id??u,distance:1-l.weights[d]}))}differentiableSearchWithWeights(e,n,r,i=1){let s=new Float32Array(e.vector),a=n.map(m=>new Float32Array(m.embedding.vector)),o=p(s,a,Math.min(r,n.length),i);return{indices:o.indices.map(m=>n[m]?.id??m),weights:o.weights}}hierarchicalForward(e,n,r){let i=r.map(l=>`${l.inputDim}-${l.hiddenDim}`).join(",");if(!this.gnnLayers.has(i)){let l=[];for(let u of r){let d=new h(u.inputDim,u.hiddenDim,u.heads,u.dropout);l.push(d)}this.gnnLayers.set(i,l[0])}let a=this.gnnLayers.get(i).toJson(),o=new Float32Array(e),m=n.map(l=>l.map(u=>new Float32Array(u)));return Array.from(g(o,m,[a]))}compressEmbedding(e,n){let r=f(n),s={none:"none",half:"half",pq8:"pq8",pq4:"pq4",binary:"binary"}[r]??"none",a=new Float32Array(e.vector),o=this.compressor.compress(a,n);return{dimension:Array.from(e.vector).length,level:s,data:o,accessFreq:n}}decompressEmbedding(e){let n=this.compressor.decompress(e.data),r={none:"none",half:"fp16",pq8:"int8",pq4:"int8",binary:"binary"};return{vector:n,dimension:e.dimension,namespace:"code",text:"",timestamp:Date.now(),quantization:r[e.level]??"none"}}getCompressionLevelForFrequency(e){return c(),f(e)}getIndexStats(e){return this.indexes.has(e)?{size:this.indexes.get(e).size,maxElements:1e4,dimension:this.config.dimension,metric:this.config.metric}:null}clearIndex(e){this.indexes.delete(e),this.nextId.delete(e)}clearAll(){this.indexes.clear(),this.nextId.clear()}resizeIndex(e){}setEfSearch(e){this.config.efSearch=e}getConfig(){return{...this.config}}isInitialized(e){return this.indexes.has(e)}getInitializedNamespaces(){return Array.from(this.indexes.keys())}getSize(e){return this.indexes.get(e)?.size??0}async saveIndex(e,n){let r=this.indexes.get(e);if(!r)throw new Error(`Namespace ${e} not initialized`);let i=Array.from(r.entries()).map(([a,o])=>({id:a,vector:Array.from(o.vector),metadata:o.metadata}));await(await import("fs/promises")).writeFile(n,JSON.stringify(i,null,2))}async loadIndex(e,n){let i=await(await import("fs/promises")).readFile(n,"utf-8"),s=A(i);this.initializeIndex(e);for(let a of s){let o={vector:a.vector,dimension:a.vector.length,namespace:e,text:"",timestamp:Date.now(),quantization:"none",metadata:a.metadata};this.addEmbedding(o,a.id)}}},q=class{static instances=new Map;static getInstance(e,n){return this.instances.has(e)||this.instances.set(e,new y(n)),this.instances.get(e)}static closeInstance(e){let n=this.instances.get(e);n&&(n.clearAll(),this.instances.delete(e))}static closeAll(){for(let e of this.instances.values())e.clearAll();this.instances.clear()}},z=class{static layers=new Map;static getLayer(e){let n=`${e.inputDim}-${e.hiddenDim}-${e.heads}-${e.dropout}`;if(!this.layers.has(n)){c();let r=new h(e.inputDim,e.hiddenDim,e.heads,e.dropout);this.layers.set(n,r)}return this.layers.get(n)}static layerFromJson(e){return c(),h.fromJson(e)}static clearCache(){this.layers.clear()}},N=class{static _compressor=null;static get compressor(){return this._compressor||(c(),this._compressor=new b),this._compressor}static compressWithLevel(e,n){let r={levelType:n,scale:1,subvectors:n==="pq8"?8:n==="pq4"?16:void 0,centroids:n==="pq8"?256:void 0,outlierThreshold:n==="pq4"?3:void 0,threshold:n==="binary"?0:void 0},i=e instanceof Float32Array?e:new Float32Array(e);return this.compressor.compressWithLevel(i,r)}static decompress(e){return this.compressor.decompress(e)}static getLevel(e){return c(),f(e)}static compressWithDither(e,n,r){let i=e instanceof Float32Array?e:new Float32Array(e),s;if(E()){let o={none:32,half:16,pq8:8,pq4:4,binary:1},m=r?.bitDepth??o[n]??8,l=r?.seed??0;s=I(i,m,l)}return{compressed:this.compressWithLevel(s?s.dequantized:e,n),ditherResult:s}}};function G(){return c(),h}function J(){return c(),b}function O(){return c(),p}function j(){return c(),g}function B(){return c(),f}function K(){return c(),w}function U(t){return t instanceof Float32Array?t:"vector"in t?t.vector instanceof Float32Array?t.vector:new Float32Array(t.vector):new Float32Array(t)}function X(t){return"vector"in t?Array.from(t.vector):Array.from(t)}function Y(t,e="code"){return{vector:t,dimension:t.length,namespace:e,text:"",timestamp:Date.now(),quantization:"none"}}function Z(t,e,n,r=1){let i=[],s=e.map(a=>a instanceof Float32Array?a:new Float32Array(a));for(let a of t){let o=a instanceof Float32Array?a:new Float32Array(a),m=p(o,s,n,r);i.push({indices:m.indices,weights:m.weights})}return i}export{H as a,V as b,y as c,q as d,z as e,N as f,G as g,J as h,O as i,j,B as k,K as l,U as m,X as n,Y as o,Z as p};
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.12.2");process.exit(0)}
2
+ import{b as A,d as M}from"./chunk-CKFZOPZN.js";import{a as S,b as D}from"./chunk-YDZIPP3Y.js";import{S as Q,l as E}from"./chunk-CTFW7CMI.js";import{g as C}from"./chunk-HU6ETNA7.js";M();Q();var v=(1+Math.sqrt(5))/2,R=1/v;function k(t,e=0){if(t<0||!Number.isFinite(t))throw new Error(`Invalid dither sequence length: ${t}`);if(!Number.isFinite(e))throw new Error(`Invalid dither seed: ${e}`);let n=new Float32Array(t),r=(e*R%1+1)%1;for(let i=0;i<t;i++)n[i]=((r+(i+1)*v)%1+1)%1;return n}function I(t,e,n=0){if(!(t instanceof Float32Array))throw new Error("Input vector must be a Float32Array");if(t.length===0)return{quantized:new Int32Array(0),dequantized:new Float32Array(0),bitDepth:e,seed:n,stepSize:0,minValue:0,maxValue:0};if(e<1||e>32||!Number.isInteger(e))throw new Error(`Invalid bit depth: ${e}. Must be an integer in [1, 32].`);let r=t[0],i=t[0];for(let d=1;d<t.length;d++)t[d]<r&&(r=t[d]),t[d]>i&&(i=t[d]);let s=(1<<e)-1,a=i-r,o=a===0?1:a/s,m=k(t.length,n),l=new Int32Array(t.length),u=new Float32Array(t.length);for(let d=0;d<t.length;d++){if(a===0)l[d]=Math.round(s/2);else{let L=(t[d]-r)/o+(m[d]-.5);l[d]=Math.max(0,Math.min(s,Math.round(L)))}u[d]=l[d]*o+r}return{quantized:l,dequantized:u,bitDepth:e,seed:n,stepSize:o,minValue:r,maxValue:i}}var h=null,b=null,p=null,g=null,f=null,w=null,x=!1;try{let t=(D(),C(S));h=t.RuvectorLayer,b=t.TensorCompress,p=t.differentiableSearch,g=t.hierarchicalForward,f=t.getCompressionLevel,w=t.init,x=!0}catch{}function H(){return x}function c(){if(!x)throw new Error("@ruvector/gnn native module is not available on this platform. Install the appropriate optional dependency for your platform, or use a platform where pre-built binaries are available.")}var F=!1;function V(){if(!F){c();let t=w();return F=!0,t}return"@ruvector/gnn already initialized"}var y=class{indexes;config;nextId;gnnLayers;compressor;constructor(e={}){this.config={M:e.M||16,efConstruction:e.efConstruction||200,efSearch:e.efSearch||50,dimension:e.dimension||384,metric:e.metric||"cosine",quantization:e.quantization||"none"},this.indexes=new Map,this.nextId=new Map,this.gnnLayers=new Map,c(),this.compressor=new b,V()}initializeIndex(e){this.indexes.has(e)||(this.indexes.set(e,new Map),this.nextId.set(e,0))}addEmbedding(e,n){let r=e.namespace;this.indexes.has(r)||this.initializeIndex(r);let i=this.indexes.get(r),s=n??this.nextId.get(r);return n===void 0&&this.nextId.set(r,s+1),i.set(s,e),s}addEmbeddingsBatch(e){let n=[];for(let r of e){let i=this.addEmbedding(r.embedding,r.id);n.push(i)}return n}search(e,n={}){let r=n.namespace||e.namespace;if(!this.indexes.has(r))return[];let i=this.indexes.get(r),s=n.limit||10,a=[];for(let[u,d]of i.entries())a.push({id:u,vector:Array.from(d.vector)});if(a.length===0)return[];let o=new Float32Array(e.vector),m=a.map(u=>new Float32Array(u.vector)),l=p(o,m,Math.min(s,a.length),1);return l.indices.map((u,d)=>({id:a[u]?.id??u,distance:1-l.weights[d]}))}differentiableSearchWithWeights(e,n,r,i=1){let s=new Float32Array(e.vector),a=n.map(m=>new Float32Array(m.embedding.vector)),o=p(s,a,Math.min(r,n.length),i);return{indices:o.indices.map(m=>n[m]?.id??m),weights:o.weights}}hierarchicalForward(e,n,r){let i=r.map(l=>`${l.inputDim}-${l.hiddenDim}`).join(",");if(!this.gnnLayers.has(i)){let l=[];for(let u of r){let d=new h(u.inputDim,u.hiddenDim,u.heads,u.dropout);l.push(d)}this.gnnLayers.set(i,l[0])}let a=this.gnnLayers.get(i).toJson(),o=new Float32Array(e),m=n.map(l=>l.map(u=>new Float32Array(u)));return Array.from(g(o,m,[a]))}compressEmbedding(e,n){let r=f(n),s={none:"none",half:"half",pq8:"pq8",pq4:"pq4",binary:"binary"}[r]??"none",a=new Float32Array(e.vector),o=this.compressor.compress(a,n);return{dimension:Array.from(e.vector).length,level:s,data:o,accessFreq:n}}decompressEmbedding(e){let n=this.compressor.decompress(e.data),r={none:"none",half:"fp16",pq8:"int8",pq4:"int8",binary:"binary"};return{vector:n,dimension:e.dimension,namespace:"code",text:"",timestamp:Date.now(),quantization:r[e.level]??"none"}}getCompressionLevelForFrequency(e){return c(),f(e)}getIndexStats(e){return this.indexes.has(e)?{size:this.indexes.get(e).size,maxElements:1e4,dimension:this.config.dimension,metric:this.config.metric}:null}clearIndex(e){this.indexes.delete(e),this.nextId.delete(e)}clearAll(){this.indexes.clear(),this.nextId.clear()}resizeIndex(e){}setEfSearch(e){this.config.efSearch=e}getConfig(){return{...this.config}}isInitialized(e){return this.indexes.has(e)}getInitializedNamespaces(){return Array.from(this.indexes.keys())}getSize(e){return this.indexes.get(e)?.size??0}async saveIndex(e,n){let r=this.indexes.get(e);if(!r)throw new Error(`Namespace ${e} not initialized`);let i=Array.from(r.entries()).map(([a,o])=>({id:a,vector:Array.from(o.vector),metadata:o.metadata}));await(await import("fs/promises")).writeFile(n,JSON.stringify(i,null,2))}async loadIndex(e,n){let i=await(await import("fs/promises")).readFile(n,"utf-8"),s=A(i);this.initializeIndex(e);for(let a of s){let o={vector:a.vector,dimension:a.vector.length,namespace:e,text:"",timestamp:Date.now(),quantization:"none",metadata:a.metadata};this.addEmbedding(o,a.id)}}},q=class{static instances=new Map;static getInstance(e,n){return this.instances.has(e)||this.instances.set(e,new y(n)),this.instances.get(e)}static closeInstance(e){let n=this.instances.get(e);n&&(n.clearAll(),this.instances.delete(e))}static closeAll(){for(let e of this.instances.values())e.clearAll();this.instances.clear()}},z=class{static layers=new Map;static getLayer(e){let n=`${e.inputDim}-${e.hiddenDim}-${e.heads}-${e.dropout}`;if(!this.layers.has(n)){c();let r=new h(e.inputDim,e.hiddenDim,e.heads,e.dropout);this.layers.set(n,r)}return this.layers.get(n)}static layerFromJson(e){return c(),h.fromJson(e)}static clearCache(){this.layers.clear()}},N=class{static _compressor=null;static get compressor(){return this._compressor||(c(),this._compressor=new b),this._compressor}static compressWithLevel(e,n){let r={levelType:n,scale:1,subvectors:n==="pq8"?8:n==="pq4"?16:void 0,centroids:n==="pq8"?256:void 0,outlierThreshold:n==="pq4"?3:void 0,threshold:n==="binary"?0:void 0},i=e instanceof Float32Array?e:new Float32Array(e);return this.compressor.compressWithLevel(i,r)}static decompress(e){return this.compressor.decompress(e)}static getLevel(e){return c(),f(e)}static compressWithDither(e,n,r){let i=e instanceof Float32Array?e:new Float32Array(e),s;if(E()){let o={none:32,half:16,pq8:8,pq4:4,binary:1},m=r?.bitDepth??o[n]??8,l=r?.seed??0;s=I(i,m,l)}return{compressed:this.compressWithLevel(s?s.dequantized:e,n),ditherResult:s}}};function G(){return c(),h}function J(){return c(),b}function O(){return c(),p}function j(){return c(),g}function B(){return c(),f}function K(){return c(),w}function U(t){return t instanceof Float32Array?t:"vector"in t?t.vector instanceof Float32Array?t.vector:new Float32Array(t.vector):new Float32Array(t)}function X(t){return"vector"in t?Array.from(t.vector):Array.from(t)}function Y(t,e="code"){return{vector:t,dimension:t.length,namespace:e,text:"",timestamp:Date.now(),quantization:"none"}}function Z(t,e,n,r=1){let i=[],s=e.map(a=>a instanceof Float32Array?a:new Float32Array(a));for(let a of t){let o=a instanceof Float32Array?a:new Float32Array(a),m=p(o,s,n,r);i.push({indices:m.indices,weights:m.weights})}return i}export{H as a,V as b,y as c,q as d,z as e,N as f,G as g,J as h,O as i,j,B as k,K as l,U as m,X as n,Y as o,Z as p};
@@ -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.12.0");process.exit(0)}
2
- import{c as t,e as o}from"./chunk-3AFNXU45.js";var g={};o(g,{DotProductAttention:()=>u,FlashAttention:()=>m,HyperbolicAttention:()=>h,LinearAttention:()=>f,MoEAttention:()=>_,MultiHeadAttention:()=>A,RuvectorLayer:()=>a,SonaEngine:()=>b,TensorCompress:()=>c,default:()=>r,differentiableSearch:()=>l,getCompressionLevel:()=>p,hierarchicalForward:()=>s,init:()=>d,pipeline:()=>L});import{createRequire as n}from"module";var i,e,r,a,c,l,s,p,d,m,u,A,h,f,_,b,L,q=t(()=>{i=n(import.meta.url),e=i("hnswlib-node"),r=e,{RuvectorLayer:a,TensorCompress:c,differentiableSearch:l,hierarchicalForward:s,getCompressionLevel:p,init:d,FlashAttention:m,DotProductAttention:u,MultiHeadAttention:A,HyperbolicAttention:h,LinearAttention:f,MoEAttention:_,SonaEngine:b,pipeline:L}=e||{}});export{r as a,a as b,c,l as d,s as e,p as f,d as g,m as h,u as i,A as j,h as k,f as l,_ as m,b as n,L as o,g as p,q};
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.12.2");process.exit(0)}
2
+ import{c as t,e as o}from"./chunk-HU6ETNA7.js";var g={};o(g,{DotProductAttention:()=>u,FlashAttention:()=>m,HyperbolicAttention:()=>h,LinearAttention:()=>f,MoEAttention:()=>_,MultiHeadAttention:()=>A,RuvectorLayer:()=>a,SonaEngine:()=>b,TensorCompress:()=>c,default:()=>r,differentiableSearch:()=>l,getCompressionLevel:()=>p,hierarchicalForward:()=>s,init:()=>d,pipeline:()=>L});import{createRequire as n}from"module";var i,e,r,a,c,l,s,p,d,m,u,A,h,f,_,b,L,q=t(()=>{i=n(import.meta.url),e=i("hnswlib-node"),r=e,{RuvectorLayer:a,TensorCompress:c,differentiableSearch:l,hierarchicalForward:s,getCompressionLevel:p,init:d,FlashAttention:m,DotProductAttention:u,MultiHeadAttention:A,HyperbolicAttention:h,LinearAttention:f,MoEAttention:_,SonaEngine:b,pipeline:L}=e||{}});export{r as a,a as b,c,l as d,s as e,p as f,d as g,m as h,u as i,A as j,h as k,f as l,_ as m,b as n,L as o,g as p,q};
@@ -1,2 +1,2 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.12.0");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.12.2");process.exit(0)}
2
2
  var n=["test-generation","test-execution","coverage-analysis","quality-assessment","defect-intelligence","requirements-validation","code-intelligence","security-compliance","contract-testing","visual-accessibility","chaos-resilience","learning-optimization","enterprise-integration","coordination"];function t(e){return{success:!0,value:e}}function r(e){return{success:!1,error:e}}export{n as a,t as b,r as c};
@@ -1,2 +1,2 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.12.0");process.exit(0)}
2
- import{a as f}from"./chunk-MDT3LIXS.js";import{c as p}from"./chunk-TJEJ4UVX.js";import{a as l,d as b}from"./chunk-KJWQ7ENF.js";import{a as d,c as g}from"./chunk-AEX75YGI.js";f();g();b();var v={dimensions:384,M:16,efConstruction:200,efSearch:100,metric:"cosine",namespace:"coverage-hnsw",maxElements:1e5},S=p.create("coverage-analysis/hnsw-index"),u=class{constructor(e,t={}){this.memory=e;this.config={...v,...t},this.stats={vectorCount:0,searchOperations:0,insertOperations:0}}memory;config;stats;searchLatencies=[];backendType="ruvector-gnn";adapter=null;initialized=!1;metadataStore=new Map;async initialize(){if(this.initialized)return;let e=this.config.metric==="cosine"?"cosine":"euclidean",t=`coverage-${this.config.namespace}`;d.close(t),this.adapter=d.create(t,{dimensions:this.config.dimensions,M:this.config.M,efConstruction:this.config.efConstruction,efSearch:this.config.efSearch,metric:e}),S.info(`HnswAdapter initialized: dimension=${this.config.dimensions}, metric=${this.config.metric}, M=${this.config.M} (unified backend via ADR-071)`),this.initialized=!0}isNativeAvailable(){return this.initialized&&this.adapter!==null}getBackendType(){return this.backendType}isRuvectorAvailable(){return this.initialized&&this.adapter!==null&&this.adapter.isRuvectorAvailable()}async insert(e,t,a){this.initialized||await this.initialize(),t=this.validateVector(t),this.adapter.addByStringId(e,t),a&&this.metadataStore.set(e,a),this.stats.insertOperations++,this.stats.vectorCount=this.adapter.size()}async search(e,t){this.initialized||await this.initialize(),e=this.validateVector(e);let a=performance.now(),n=[];this.adapter.size()>0&&(n=this.adapter.searchByArray(e,t).map(({id:i,score:o})=>({key:i,score:o,distance:1-o,metadata:this.metadataStore.get(i)})));let s=performance.now()-a;return this.recordSearchLatency(s),this.stats.searchOperations++,n}async batchInsert(e){this.initialized||await this.initialize();let t=100;for(let a=0;a<e.length;a+=t){let n=e.slice(a,a+t);await Promise.all(n.map(r=>this.insert(r.key,r.vector,r.metadata)))}}async delete(e){if(!this.adapter)return!1;let t=this.adapter.removeByStringId(e);if(t){this.metadataStore.delete(e);let a=this.buildKey(e);await this.memory.delete(a),this.stats.vectorCount=this.adapter.size()}return t}async getStats(){return{nativeHNSW:this.initialized&&this.adapter!==null,backendType:this.backendType,vectorCount:this.stats.vectorCount,indexSizeBytes:this.stats.vectorCount*this.config.dimensions*4,avgSearchLatencyMs:this.calculateAvgLatency(),p95SearchLatencyMs:this.calculatePercentileLatency(95),p99SearchLatencyMs:this.calculatePercentileLatency(99),searchOperations:this.stats.searchOperations,insertOperations:this.stats.insertOperations}}async clear(){this.metadataStore.clear(),this.adapter&&this.adapter.clear(),this.stats.vectorCount=0,this.searchLatencies=[]}validateVector(e){if(e.length!==this.config.dimensions)return this.resizeVector(e,this.config.dimensions);for(let t=0;t<e.length;t++)if(!Number.isFinite(e[t]))throw new Error(`Invalid vector value at index ${t}: ${e[t]}`);return e}resizeVector(e,t){if(e.length===t)return e;if(e.length>t){let n=new Array(t).fill(0),r=e.length/t;for(let s=0;s<t;s++){let h=Math.floor(s*r),i=Math.floor((s+1)*r),o=0;for(let m=h;m<i;m++)o+=e[m];n[s]=o/(i-h)}return n}let a=new Array(t).fill(0);for(let n=0;n<e.length;n++)a[n]=e[n];return a}buildKey(e){return`${this.config.namespace}:${e}`}recordSearchLatency(e){this.searchLatencies.push(e);let t=1e3;this.searchLatencies.length>t&&(this.searchLatencies=this.searchLatencies.slice(-t))}calculateAvgLatency(){return this.searchLatencies.length===0?0:this.searchLatencies.reduce((t,a)=>t+a,0)/this.searchLatencies.length}calculatePercentileLatency(e){if(this.searchLatencies.length===0)return 0;let t=[...this.searchLatencies].sort((n,r)=>n-r),a=Math.ceil(e/100*t.length)-1;return t[Math.max(0,a)]}setEfSearch(e){this.config.efSearch=e}};function C(c,e){return new u(c,e)}async function H(c,e=1e4,t=1e3){let n=performance.now();for(let i=0;i<e;i++){let o=Array.from({length:384},()=>l());await c.insert(`bench-${i}`,o)}let r=performance.now()-n,s=performance.now();for(let i=0;i<t;i++){let o=Array.from({length:384},()=>l());await c.search(o,10)}let h=performance.now()-s;return{insertTimeMs:r,searchTimeMs:h,avgSearchLatencyMs:h/t,isNative:c.isNativeAvailable(),backendType:c.getBackendType()}}export{v as a,u as b,C as c,H as d};
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.12.2");process.exit(0)}
2
+ import{a as f}from"./chunk-YY4KXDI6.js";import{c as p}from"./chunk-R5HC6JVJ.js";import{a as l,d as b}from"./chunk-4KEOBDEI.js";import{a as d,c as g}from"./chunk-YZ44FUVJ.js";f();g();b();var v={dimensions:384,M:16,efConstruction:200,efSearch:100,metric:"cosine",namespace:"coverage-hnsw",maxElements:1e5},S=p.create("coverage-analysis/hnsw-index"),u=class{constructor(e,t={}){this.memory=e;this.config={...v,...t},this.stats={vectorCount:0,searchOperations:0,insertOperations:0}}memory;config;stats;searchLatencies=[];backendType="ruvector-gnn";adapter=null;initialized=!1;metadataStore=new Map;async initialize(){if(this.initialized)return;let e=this.config.metric==="cosine"?"cosine":"euclidean",t=`coverage-${this.config.namespace}`;d.close(t),this.adapter=d.create(t,{dimensions:this.config.dimensions,M:this.config.M,efConstruction:this.config.efConstruction,efSearch:this.config.efSearch,metric:e}),S.info(`HnswAdapter initialized: dimension=${this.config.dimensions}, metric=${this.config.metric}, M=${this.config.M} (unified backend via ADR-071)`),this.initialized=!0}isNativeAvailable(){return this.initialized&&this.adapter!==null}getBackendType(){return this.backendType}isRuvectorAvailable(){return this.initialized&&this.adapter!==null&&this.adapter.isRuvectorAvailable()}async insert(e,t,a){this.initialized||await this.initialize(),t=this.validateVector(t),this.adapter.addByStringId(e,t),a&&this.metadataStore.set(e,a),this.stats.insertOperations++,this.stats.vectorCount=this.adapter.size()}async search(e,t){this.initialized||await this.initialize(),e=this.validateVector(e);let a=performance.now(),n=[];this.adapter.size()>0&&(n=this.adapter.searchByArray(e,t).map(({id:i,score:o})=>({key:i,score:o,distance:1-o,metadata:this.metadataStore.get(i)})));let s=performance.now()-a;return this.recordSearchLatency(s),this.stats.searchOperations++,n}async batchInsert(e){this.initialized||await this.initialize();let t=100;for(let a=0;a<e.length;a+=t){let n=e.slice(a,a+t);await Promise.all(n.map(r=>this.insert(r.key,r.vector,r.metadata)))}}async delete(e){if(!this.adapter)return!1;let t=this.adapter.removeByStringId(e);if(t){this.metadataStore.delete(e);let a=this.buildKey(e);await this.memory.delete(a),this.stats.vectorCount=this.adapter.size()}return t}async getStats(){return{nativeHNSW:this.initialized&&this.adapter!==null,backendType:this.backendType,vectorCount:this.stats.vectorCount,indexSizeBytes:this.stats.vectorCount*this.config.dimensions*4,avgSearchLatencyMs:this.calculateAvgLatency(),p95SearchLatencyMs:this.calculatePercentileLatency(95),p99SearchLatencyMs:this.calculatePercentileLatency(99),searchOperations:this.stats.searchOperations,insertOperations:this.stats.insertOperations}}async clear(){this.metadataStore.clear(),this.adapter&&this.adapter.clear(),this.stats.vectorCount=0,this.searchLatencies=[]}validateVector(e){if(e.length!==this.config.dimensions)return this.resizeVector(e,this.config.dimensions);for(let t=0;t<e.length;t++)if(!Number.isFinite(e[t]))throw new Error(`Invalid vector value at index ${t}: ${e[t]}`);return e}resizeVector(e,t){if(e.length===t)return e;if(e.length>t){let n=new Array(t).fill(0),r=e.length/t;for(let s=0;s<t;s++){let h=Math.floor(s*r),i=Math.floor((s+1)*r),o=0;for(let m=h;m<i;m++)o+=e[m];n[s]=o/(i-h)}return n}let a=new Array(t).fill(0);for(let n=0;n<e.length;n++)a[n]=e[n];return a}buildKey(e){return`${this.config.namespace}:${e}`}recordSearchLatency(e){this.searchLatencies.push(e);let t=1e3;this.searchLatencies.length>t&&(this.searchLatencies=this.searchLatencies.slice(-t))}calculateAvgLatency(){return this.searchLatencies.length===0?0:this.searchLatencies.reduce((t,a)=>t+a,0)/this.searchLatencies.length}calculatePercentileLatency(e){if(this.searchLatencies.length===0)return 0;let t=[...this.searchLatencies].sort((n,r)=>n-r),a=Math.ceil(e/100*t.length)-1;return t[Math.max(0,a)]}setEfSearch(e){this.config.efSearch=e}};function C(c,e){return new u(c,e)}async function H(c,e=1e4,t=1e3){let n=performance.now();for(let i=0;i<e;i++){let o=Array.from({length:384},()=>l());await c.insert(`bench-${i}`,o)}let r=performance.now()-n,s=performance.now();for(let i=0;i<t;i++){let o=Array.from({length:384},()=>l());await c.search(o,10)}let h=performance.now()-s;return{insertTimeMs:r,searchTimeMs:h,avgSearchLatencyMs:h/t,isNative:c.isNativeAvailable(),backendType:c.getBackendType()}}export{v as a,u as b,C as c,H as d};
@@ -1,2 +1,2 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.12.0");process.exit(0)}
2
- import{a as o,e as p}from"./chunk-V2MD5EDD.js";import{a as l,d}from"./chunk-64M3FFM4.js";d();p();var u=class{store=new Map;vectors=new Map;cleanupInterval;async initialize(){this.cleanupInterval=setInterval(()=>this.cleanup(),o.CLEANUP_INTERVAL_MS),this.cleanupInterval.unref&&this.cleanupInterval.unref()}async dispose(){this.cleanupInterval&&clearInterval(this.cleanupInterval),this.store.clear(),this.vectors.clear()}async set(t,r,e){let s={value:r,namespace:e?.namespace??"default",createdAt:Date.now()};e?.ttl&&(s.expiresAt=Date.now()+e.ttl*o.TTL_MULTIPLIER_MS);let n=this.buildKey(t,e?.namespace);this.store.set(n,s)}async get(t,r){let e=this.buildKey(t,r?.namespace),s=this.store.get(e);if(s){if(s.expiresAt&&Date.now()>s.expiresAt){this.store.delete(e);return}return s.value}}async delete(t,r){let e=this.buildKey(t,r?.namespace);return this.store.delete(e)}async has(t,r){return await this.get(t,r)!==void 0}async search(t,r=o.DEFAULT_SEARCH_LIMIT,e){let s=t.replace(/[.+?^${}()|[\]\\]/g,"\\$&"),n=new RegExp(s.replace(/\*/g,".*")),i=[],c=e?.namespace?`${e.namespace}:`:void 0;for(let a of this.store.keys())if(!(c&&!a.startsWith(c))&&n.test(a)&&(i.push(a),i.length>=r))break;return i}async vectorSearch(t,r){let e=[];for(let[s,n]of this.vectors.entries()){let i=l(t,n.embedding);e.push({key:s,score:i,metadata:n.metadata})}return e.sort((s,n)=>n.score-s.score).slice(0,r)}async storeVector(t,r,e){this.vectors.set(t,{embedding:r,metadata:e})}buildKey(t,r){return r?`${r}:${t}`:t}cleanup(){let t=Date.now();for(let[r,e]of this.store.entries())e.expiresAt&&t>e.expiresAt&&this.store.delete(r)}getStats(){return{entries:this.store.size,vectors:this.vectors.size}}async clear(t){if(t){let r=`${t}:`;for(let e of this.store.keys())e.startsWith(r)&&this.store.delete(e)}else this.store.clear()}async count(t){let r=0,e=`${t}:`;for(let s of this.store.keys())if(s.startsWith(e)){let n=this.store.get(s);n&&(!n.expiresAt||Date.now()<=n.expiresAt)&&r++}return r}async hasCodeIntelligenceIndex(){return await this.count("code-intelligence:kg")>0}};export{u as a};
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.12.2");process.exit(0)}
2
+ import{a as o,e as p}from"./chunk-C7VNQ4PY.js";import{a as l,d}from"./chunk-QYST2TZW.js";d();p();var u=class{store=new Map;vectors=new Map;cleanupInterval;async initialize(){this.cleanupInterval=setInterval(()=>this.cleanup(),o.CLEANUP_INTERVAL_MS),this.cleanupInterval.unref&&this.cleanupInterval.unref()}async dispose(){this.cleanupInterval&&clearInterval(this.cleanupInterval),this.store.clear(),this.vectors.clear()}async set(t,r,e){let s={value:r,namespace:e?.namespace??"default",createdAt:Date.now()};e?.ttl&&(s.expiresAt=Date.now()+e.ttl*o.TTL_MULTIPLIER_MS);let n=this.buildKey(t,e?.namespace);this.store.set(n,s)}async get(t,r){let e=this.buildKey(t,r?.namespace),s=this.store.get(e);if(s){if(s.expiresAt&&Date.now()>s.expiresAt){this.store.delete(e);return}return s.value}}async delete(t,r){let e=this.buildKey(t,r?.namespace);return this.store.delete(e)}async has(t,r){return await this.get(t,r)!==void 0}async search(t,r=o.DEFAULT_SEARCH_LIMIT,e){let s=t.replace(/[.+?^${}()|[\]\\]/g,"\\$&"),n=new RegExp(s.replace(/\*/g,".*")),i=[],c=e?.namespace?`${e.namespace}:`:void 0;for(let a of this.store.keys())if(!(c&&!a.startsWith(c))&&n.test(a)&&(i.push(a),i.length>=r))break;return i}async vectorSearch(t,r){let e=[];for(let[s,n]of this.vectors.entries()){let i=l(t,n.embedding);e.push({key:s,score:i,metadata:n.metadata})}return e.sort((s,n)=>n.score-s.score).slice(0,r)}async storeVector(t,r,e){this.vectors.set(t,{embedding:r,metadata:e})}buildKey(t,r){return r?`${r}:${t}`:t}cleanup(){let t=Date.now();for(let[r,e]of this.store.entries())e.expiresAt&&t>e.expiresAt&&this.store.delete(r)}getStats(){return{entries:this.store.size,vectors:this.vectors.size}}async clear(t){if(t){let r=`${t}:`;for(let e of this.store.keys())e.startsWith(r)&&this.store.delete(e)}else this.store.clear()}async count(t){let r=0,e=`${t}:`;for(let s of this.store.keys())if(s.startsWith(e)){let n=this.store.get(s);n&&(!n.expiresAt||Date.now()<=n.expiresAt)&&r++}return r}async hasCodeIntelligenceIndex(){return await this.count("code-intelligence:kg")>0}};export{u as a};
@@ -1,2 +1,2 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.12.0");process.exit(0)}
2
- import{a as h}from"./chunk-MDT3LIXS.js";import{c as m}from"./chunk-TJEJ4UVX.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.12.2");process.exit(0)}
2
+ import{a as h}from"./chunk-YY4KXDI6.js";import{c as m}from"./chunk-R5HC6JVJ.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};