agentic-qe 3.9.4 → 3.9.6

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 (283) hide show
  1. package/.claude/skills/skills-manifest.json +1 -1
  2. package/CHANGELOG.md +38 -0
  3. package/dist/cli/bundle.js +5 -5
  4. package/dist/cli/chunks/adapter-XV7RUOO7.js +2 -0
  5. package/dist/cli/chunks/{agent-booster-wasm-MGGEPROV.js → agent-booster-wasm-ID2COJCQ.js} +2 -2
  6. package/dist/cli/chunks/{agent-handler-AFHYFQXV.js → agent-handler-EWK6FHKU.js} +2 -2
  7. package/dist/cli/chunks/{agent-memory-branch-SQ3KDIG6.js → agent-memory-branch-BDKB7HER.js} +2 -2
  8. package/dist/cli/chunks/aqe-learning-engine-Q5CC43GW.js +2 -0
  9. package/dist/cli/chunks/{audit-SM5CK2K5.js → audit-EB62PPY4.js} +2 -2
  10. package/dist/cli/chunks/base-UL4PX45P.js +2 -0
  11. package/dist/cli/chunks/{better-sqlite3-UGOYRNXI.js → better-sqlite3-C4HK6YT3.js} +2 -2
  12. package/dist/cli/chunks/{brain-handler-SKXTB63O.js → brain-handler-QLIHJDGD.js} +3 -3
  13. package/dist/cli/chunks/{branch-enumerator-77NSOLNK.js → branch-enumerator-HWWHSETZ.js} +2 -2
  14. package/dist/cli/chunks/{browser-MCE5DWPV.js → browser-PEMYUQ6B.js} +2 -2
  15. package/dist/cli/chunks/browser-workflow-K77KPDRF.js +2 -0
  16. package/dist/cli/chunks/{chunk-4BQTEPAD.js → chunk-2DGTT6D2.js} +2 -2
  17. package/dist/cli/chunks/{chunk-7ST2YENJ.js → chunk-2FTTRGRS.js} +2 -2
  18. package/dist/cli/chunks/{chunk-QVZSIFSJ.js → chunk-3BAC7NLV.js} +3 -3
  19. package/dist/cli/chunks/{chunk-DZHGYZJP.js → chunk-3TAJSNCZ.js} +1 -1
  20. package/dist/cli/chunks/{chunk-7EL65Y27.js → chunk-3U3NUFII.js} +1 -1
  21. package/dist/cli/chunks/{chunk-G72E5DL3.js → chunk-3VBPPW7H.js} +1 -1
  22. package/dist/cli/chunks/{chunk-C3BXT3ZC.js → chunk-3WQ7MLAJ.js} +4 -4
  23. package/dist/cli/chunks/{chunk-QPC4STR6.js → chunk-46442R6Q.js} +2 -2
  24. package/dist/cli/chunks/{chunk-VBXJBXMG.js → chunk-4H3YCKAI.js} +4 -4
  25. package/dist/cli/chunks/{chunk-JVUNZBKX.js → chunk-4NYVSHN3.js} +2 -2
  26. package/dist/cli/chunks/{chunk-LW3DV23G.js → chunk-5A5ECZCN.js} +2 -2
  27. package/dist/cli/chunks/{chunk-ZQSEPDIJ.js → chunk-5AXU6KCI.js} +2 -2
  28. package/dist/cli/chunks/{chunk-KELYPHMV.js → chunk-5CKG46BM.js} +2 -2
  29. package/dist/cli/chunks/{chunk-IQE6GOH6.js → chunk-64SU2UFL.js} +2 -2
  30. package/dist/cli/chunks/{chunk-XYVMKCSI.js → chunk-67WBMX7K.js} +1 -1
  31. package/dist/cli/chunks/{chunk-RGRYL4MG.js → chunk-6T6TPZCK.js} +2 -2
  32. package/dist/cli/chunks/{chunk-QEYPK7KS.js → chunk-6X6NWAVQ.js} +1 -1
  33. package/dist/cli/chunks/{chunk-XB5HXTL4.js → chunk-775KESYW.js} +2 -2
  34. package/dist/cli/chunks/{chunk-RAZ2PGZD.js → chunk-7B3IZBNN.js} +2 -2
  35. package/dist/cli/chunks/{chunk-IGJ472XJ.js → chunk-7B46Q5OU.js} +2 -2
  36. package/dist/cli/chunks/{chunk-TT2TB6UF.js → chunk-7CSZCRSS.js} +3 -3
  37. package/dist/cli/chunks/{chunk-WHT46PJM.js → chunk-7EDVNITA.js} +2 -2
  38. package/dist/cli/chunks/{chunk-B252DDC5.js → chunk-7MD7PQYH.js} +1 -1
  39. package/dist/cli/chunks/{chunk-QOU4R6AF.js → chunk-AFOGTLSY.js} +2 -2
  40. package/dist/cli/chunks/{chunk-27P4VTCY.js → chunk-AJX44TJ7.js} +2 -2
  41. package/dist/cli/chunks/{chunk-MR5I6UR2.js → chunk-AMLREU5W.js} +2 -2
  42. package/dist/cli/chunks/{chunk-GT35EJKR.js → chunk-ARRJKSDK.js} +1 -1
  43. package/dist/cli/chunks/{chunk-RPYUKEAH.js → chunk-BHOJLQLF.js} +2 -2
  44. package/dist/cli/chunks/{chunk-MUX762XZ.js → chunk-BKCIW3O2.js} +2 -2
  45. package/dist/cli/chunks/{chunk-54OLXGXJ.js → chunk-C723FDLL.js} +2 -2
  46. package/dist/cli/chunks/{chunk-2MQMXI7C.js → chunk-CJ6GN5QT.js} +2 -2
  47. package/dist/cli/chunks/{chunk-27FNBMUC.js → chunk-CLVHHUZB.js} +2 -2
  48. package/dist/cli/chunks/{chunk-3MN7E6HY.js → chunk-CQNNNR53.js} +2 -2
  49. package/dist/cli/chunks/{chunk-RN3SN4ZC.js → chunk-CU3LGMOK.js} +2 -2
  50. package/dist/cli/chunks/{chunk-BH5XPYA3.js → chunk-DAWI2HRN.js} +2 -2
  51. package/dist/cli/chunks/{chunk-3MRFR534.js → chunk-E5J3GKCP.js} +2 -2
  52. package/dist/cli/chunks/{chunk-Q2ZYUIS2.js → chunk-EJSRKZ5M.js} +2 -2
  53. package/dist/cli/chunks/{chunk-Q6FSXNQP.js → chunk-EMKI4ZV5.js} +2 -2
  54. package/dist/cli/chunks/{chunk-SKWI5QBM.js → chunk-ESFKNND3.js} +2 -2
  55. package/dist/cli/chunks/{chunk-GQ7DCSKS.js → chunk-EVRJS6CN.js} +2 -2
  56. package/dist/cli/chunks/{chunk-NEYZXYFH.js → chunk-FZ77DJFC.js} +2 -2
  57. package/dist/cli/chunks/{chunk-OHZ6RJLS.js → chunk-G3VIZON2.js} +2 -2
  58. package/dist/cli/chunks/{chunk-LH3ZL2OK.js → chunk-GXVUDSYW.js} +2 -2
  59. package/dist/cli/chunks/{chunk-B6HLXE3D.js → chunk-H3KGRTY2.js} +9 -9
  60. package/dist/cli/chunks/{chunk-UJLSCJJS.js → chunk-H4J456F2.js} +1 -1
  61. package/dist/cli/chunks/{chunk-A6ZBQCYB.js → chunk-H5OYJKPR.js} +2 -2
  62. package/dist/cli/chunks/{chunk-TNWTQWLL.js → chunk-H7OP3RI2.js} +1 -1
  63. package/dist/cli/chunks/{chunk-DLMEBVLF.js → chunk-HUPIHL55.js} +2 -2
  64. package/dist/cli/chunks/{chunk-ENKPW6MA.js → chunk-HZSYBKRI.js} +2 -2
  65. package/dist/cli/chunks/{chunk-U7YC7VCM.js → chunk-JB3G5ZLL.js} +2 -2
  66. package/dist/cli/chunks/{chunk-ZW5DRPZY.js → chunk-JDGUTBC3.js} +2 -2
  67. package/dist/cli/chunks/{chunk-GSKZL36U.js → chunk-JEF3S4ER.js} +2 -2
  68. package/dist/cli/chunks/{chunk-BZ22GI4E.js → chunk-JRPYXCDT.js} +1 -1
  69. package/dist/cli/chunks/{chunk-5UKAEBKC.js → chunk-K52WNOTU.js} +3 -3
  70. package/dist/cli/chunks/{chunk-YDJKQKQH.js → chunk-K5RE6ODJ.js} +2 -2
  71. package/dist/cli/chunks/{chunk-EHGTXIT7.js → chunk-K6XC52U3.js} +1 -1
  72. package/dist/cli/chunks/{chunk-VBYREHZI.js → chunk-KI4W6CVC.js} +1 -1
  73. package/dist/cli/chunks/{chunk-O6QAOPUA.js → chunk-KIEXP4F3.js} +3 -3
  74. package/dist/cli/chunks/{chunk-HKTNFHWI.js → chunk-L6HQVZQL.js} +1 -1
  75. package/dist/cli/chunks/{chunk-VFXTZWNF.js → chunk-LFTQYU65.js} +2 -2
  76. package/dist/cli/chunks/{chunk-J222JLZ6.js → chunk-LSFJKCAQ.js} +2 -2
  77. package/dist/cli/chunks/{chunk-2JLKOGNU.js → chunk-LZ5LS4LF.js} +1 -1
  78. package/dist/cli/chunks/chunk-MA7OLK56.js +2 -0
  79. package/dist/cli/chunks/{chunk-SHJZ3YNX.js → chunk-MAZWSPEQ.js} +2 -2
  80. package/dist/cli/chunks/{chunk-RUJU5XEQ.js → chunk-MRDXDXPW.js} +1 -1
  81. package/dist/cli/chunks/{chunk-4GJAYXB7.js → chunk-MROCXAXJ.js} +2 -2
  82. package/dist/cli/chunks/{chunk-4TZTGYBQ.js → chunk-MV52OH7P.js} +1 -1
  83. package/dist/cli/chunks/{chunk-RRQEIGLS.js → chunk-MX3ORXM3.js} +2 -2
  84. package/dist/cli/chunks/{chunk-C2HGOUEB.js → chunk-N5CEEWWJ.js} +1 -1
  85. package/dist/cli/chunks/{chunk-RTC3ZCPK.js → chunk-NA5ZOZIF.js} +2 -2
  86. package/dist/cli/chunks/{chunk-MS6LTE4L.js → chunk-NOK2ICQT.js} +2 -2
  87. package/dist/cli/chunks/{chunk-C567IO5M.js → chunk-NPNGSE7X.js} +2 -2
  88. package/dist/cli/chunks/{chunk-MN2MYLVW.js → chunk-NSRIYP76.js} +2 -2
  89. package/dist/cli/chunks/{chunk-EZTUUOVI.js → chunk-O65ZAUG3.js} +1 -1
  90. package/dist/cli/chunks/{chunk-VSNPI2NO.js → chunk-P4X6YTOY.js} +8 -8
  91. package/dist/cli/chunks/{chunk-NZ5LY2BT.js → chunk-PKD6LEQZ.js} +1 -1
  92. package/dist/cli/chunks/{chunk-53M65YFH.js → chunk-QBQ52YUU.js} +2 -2
  93. package/dist/cli/chunks/{chunk-UUL3D5HR.js → chunk-QE255FHS.js} +4 -4
  94. package/dist/cli/chunks/{chunk-7FJIIB4H.js → chunk-QGEZJKVO.js} +1 -1
  95. package/dist/cli/chunks/{chunk-GVFHRHXC.js → chunk-QWVILMUX.js} +2 -2
  96. package/dist/cli/chunks/{chunk-EFD2J6GG.js → chunk-QYGI32T4.js} +3 -3
  97. package/dist/cli/chunks/{chunk-RS7ZGWHV.js → chunk-RD5N2722.js} +2 -2
  98. package/dist/cli/chunks/{chunk-3SPYUOSS.js → chunk-RZLRPLRC.js} +2 -2
  99. package/dist/cli/chunks/{chunk-G6RTCJFY.js → chunk-SQCNABS4.js} +2 -2
  100. package/dist/cli/chunks/chunk-SYYGXU7I.js +2 -0
  101. package/dist/cli/chunks/{chunk-GX7MEHQ2.js → chunk-T4L6MHRW.js} +1 -1
  102. package/dist/cli/chunks/{chunk-UPJZRDZK.js → chunk-TG7PATSN.js} +2 -2
  103. package/dist/cli/chunks/{chunk-ZODUKKPC.js → chunk-TPXS5KEC.js} +2 -2
  104. package/dist/cli/chunks/{chunk-MGRE767N.js → chunk-TSZ6VMCF.js} +2 -2
  105. package/dist/cli/chunks/{chunk-EEARIB4C.js → chunk-UB53OWSL.js} +1 -1
  106. package/dist/cli/chunks/{chunk-RE6XD6RI.js → chunk-V2IUGAJ7.js} +2 -2
  107. package/dist/cli/chunks/{chunk-JMBUIVVE.js → chunk-V3D6AA2P.js} +1 -1
  108. package/dist/cli/chunks/{chunk-GAG2P4I2.js → chunk-VJKIPTA2.js} +1 -1
  109. package/dist/cli/chunks/{chunk-3RHIPCBG.js → chunk-VMDSTKVR.js} +2 -2
  110. package/dist/cli/chunks/{chunk-72EC26AS.js → chunk-WFWVSI2W.js} +2 -2
  111. package/dist/cli/chunks/{chunk-ZKWNZ3ZK.js → chunk-WOR67NKR.js} +2 -2
  112. package/dist/cli/chunks/{chunk-NRH2QE4X.js → chunk-WQ76RMU3.js} +3 -3
  113. package/dist/cli/chunks/{chunk-ONOYANDX.js → chunk-XKU2LJIM.js} +1 -1
  114. package/dist/cli/chunks/{chunk-DHJJJ24V.js → chunk-XOTBE543.js} +2 -2
  115. package/dist/cli/chunks/{chunk-YS6C2Q4F.js → chunk-XQAZHVHD.js} +1 -1
  116. package/dist/cli/chunks/{chunk-V57PXZIK.js → chunk-Y2BEI3DL.js} +3 -3
  117. package/dist/cli/chunks/{chunk-J6KBI5NW.js → chunk-Y65KKN4T.js} +1 -1
  118. package/dist/cli/chunks/{chunk-Z75DMTMI.js → chunk-YI54PU4P.js} +1 -1
  119. package/dist/cli/chunks/{chunk-J72Q6ERO.js → chunk-YOLOT7MX.js} +2 -2
  120. package/dist/cli/chunks/{chunk-P3EOWBME.js → chunk-YQ7X6LKA.js} +2 -2
  121. package/dist/cli/chunks/{chunk-7ZXNJT4Q.js → chunk-YV34KLBV.js} +2 -2
  122. package/dist/cli/chunks/{chunk-KSMQH2CV.js → chunk-YWWQRNKI.js} +1 -1
  123. package/dist/cli/chunks/{chunk-COIRFVFO.js → chunk-Z4UUJUZO.js} +1 -1
  124. package/dist/cli/chunks/{chunk-F6AU2MAZ.js → chunk-Z5IOTEQI.js} +2 -2
  125. package/dist/cli/chunks/{chunk-NS4CCCTZ.js → chunk-ZV6CCRP2.js} +2 -2
  126. package/dist/cli/chunks/{ci-THZEECIQ.js → ci-6L22RUNC.js} +2 -2
  127. package/dist/cli/chunks/{ci-output-G6QLGL4S.js → ci-output-C2PAMUXM.js} +2 -2
  128. package/dist/cli/chunks/{claude-flow-setup-5MTYQM34.js → claude-flow-setup-S3HHSSIM.js} +2 -2
  129. package/dist/cli/chunks/client-KXLRKXSG.js +2 -0
  130. package/dist/cli/chunks/{cline-installer-E2LF2DQS.js → cline-installer-YIXOIHBL.js} +2 -2
  131. package/dist/cli/chunks/{code-QRF7ZGXG.js → code-QVFF72Z4.js} +2 -2
  132. package/dist/cli/chunks/{code-index-extractor-II6IRWU6.js → code-index-extractor-BRNK2X4M.js} +2 -2
  133. package/dist/cli/chunks/{codex-installer-LGOQ23ZS.js → codex-installer-TLRH3SG7.js} +2 -2
  134. package/dist/cli/chunks/{completions-LB2RR2OQ.js → completions-A46MED6L.js} +2 -2
  135. package/dist/cli/chunks/{complexity-analyzer-PUIPIRX3.js → complexity-analyzer-FJSG676O.js} +2 -2
  136. package/dist/cli/chunks/{continuedev-installer-HQAEAQZU.js → continuedev-installer-7HHND63H.js} +2 -2
  137. package/dist/cli/chunks/{copilot-installer-3PKCX5K5.js → copilot-installer-UQ4IEG4H.js} +2 -2
  138. package/dist/cli/chunks/{cost-tracker-JG3SZ2Q3.js → cost-tracker-R6FXO2MO.js} +2 -2
  139. package/dist/cli/chunks/{coverage-D3PZTOKT.js → coverage-3AGGT36D.js} +3 -3
  140. package/dist/cli/chunks/cross-domain-router-I2WPLKVN.js +2 -0
  141. package/dist/cli/chunks/{cursor-installer-UY6GWKTO.js → cursor-installer-7PABDYDI.js} +2 -2
  142. package/dist/cli/chunks/{daemon-UNO3LRRN.js → daemon-YTCKYJB4.js} +3 -3
  143. package/dist/cli/chunks/{dag-attention-scheduler-S2MXANYL.js → dag-attention-scheduler-LZZ4O2PT.js} +2 -2
  144. package/dist/cli/chunks/{detect-DU2FTRKR.js → detect-OBCGJIYW.js} +2 -2
  145. package/dist/cli/chunks/{domain-handler-KPNO36LF.js → domain-handler-5PHN6YQM.js} +2 -2
  146. package/dist/cli/chunks/{domain-transfer-6X3ZZF6A.js → domain-transfer-K6YSBC2L.js} +2 -2
  147. package/dist/cli/chunks/dream-BH35JQRS.js +2 -0
  148. package/dist/cli/chunks/esm-node-VI5DSKCM.js +2 -0
  149. package/dist/cli/chunks/{eval-6RXEDTBZ.js → eval-UAAFW3YU.js} +2 -2
  150. package/dist/cli/chunks/{fast-paths-FYODFGZB.js → fast-paths-7IFG4BYW.js} +2 -2
  151. package/dist/cli/chunks/{feature-flags-ZJ42B4IL.js → feature-flags-AEO5C73R.js} +2 -2
  152. package/dist/cli/chunks/{feature-flags-YOULURDA.js → feature-flags-TVJAGLLH.js} +2 -2
  153. package/dist/cli/chunks/{file-discovery-KOL7FSBQ.js → file-discovery-STTTDBN3.js} +2 -2
  154. package/dist/cli/chunks/{fleet-22I74LGD.js → fleet-L6RVZQ2B.js} +3 -3
  155. package/dist/cli/chunks/{gnn-wrapper-DFHTHLIZ.js → gnn-wrapper-W4QHVBUD.js} +2 -2
  156. package/dist/cli/chunks/{heartbeat-handler-SQ6VYEAA.js → heartbeat-handler-3KZOB7MZ.js} +4 -4
  157. package/dist/cli/chunks/{heartbeat-scheduler-W6PQJ5SG.js → heartbeat-scheduler-IR57JOZR.js} +2 -2
  158. package/dist/cli/chunks/hnsw-adapter-2SFTC2VH.js +2 -0
  159. package/dist/cli/chunks/hnsw-index-OBEYJRMU.js +2 -0
  160. package/dist/cli/chunks/{hnsw-legacy-bridge-AYTRT54U.js → hnsw-legacy-bridge-5BYAJDVC.js} +2 -2
  161. package/dist/cli/chunks/{hnswlib-node-4IA56UH4.js → hnswlib-node-MUXAWCUE.js} +2 -2
  162. package/dist/cli/chunks/{hooks-T6UMR72X.js → hooks-QT4NVEDG.js} +6 -6
  163. package/dist/cli/chunks/{hypergraph-engine-WVPYKMFY.js → hypergraph-engine-MLLU5WQB.js} +2 -2
  164. package/dist/cli/chunks/{hypergraph-handler-NB6GL4CR.js → hypergraph-handler-LJWRQ2WW.js} +3 -3
  165. package/dist/cli/chunks/impact-analyzer-C5SKESHG.js +2 -0
  166. package/dist/cli/chunks/{init-handler-UOFNBXEP.js → init-handler-MKAZHZJS.js} +6 -6
  167. package/dist/cli/chunks/init-wizard-DV34KMTN.js +2 -0
  168. package/dist/cli/chunks/kernel-3HL4J5WJ.js +2 -0
  169. package/dist/cli/chunks/{kilocode-installer-VWMNI4QX.js → kilocode-installer-5MAYAROV.js} +2 -2
  170. package/dist/cli/chunks/{kiro-installer-RNM47FV5.js → kiro-installer-3JJ7TSXH.js} +2 -2
  171. package/dist/cli/chunks/knowledge-graph-XPFESDWZ.js +2 -0
  172. package/dist/cli/chunks/{learning-L4RB5XYP.js → learning-G7MWQMRY.js} +3 -3
  173. package/dist/cli/chunks/{llm-router-BZYZL3YI.js → llm-router-HYK5VS4A.js} +2 -2
  174. package/dist/cli/chunks/{load-4UGEGRMO.js → load-YVN3F5ZP.js} +2 -2
  175. package/dist/cli/chunks/load-test-EF3BRFGO.js +2 -0
  176. package/dist/cli/chunks/{mcp-FWWZIWCI.js → mcp-I43GRN5E.js} +2 -2
  177. package/dist/cli/chunks/{memory-5OXPMXU6.js → memory-TMKTUI37.js} +5 -5
  178. package/dist/cli/chunks/memory-backend-FJDNXX6N.js +2 -0
  179. package/dist/cli/chunks/{memory-handlers-JS7BTWJK.js → memory-handlers-YFJOLCGN.js} +2 -2
  180. package/dist/cli/chunks/{opencode-installer-BS5TQKHB.js → opencode-installer-KYDQUOAW.js} +2 -2
  181. package/dist/cli/chunks/{orchestrator-G6BUZ6QE.js → orchestrator-C6XRSC6Z.js} +25 -22
  182. package/dist/cli/chunks/{pipeline-3MZ5COPR.js → pipeline-IULH5B62.js} +2 -2
  183. package/dist/cli/chunks/{platform-TKD4JCUG.js → platform-CACMGVB3.js} +2 -2
  184. package/dist/cli/chunks/{plugin-XXJ7R6SY.js → plugin-6VSTK54C.js} +2 -2
  185. package/dist/cli/chunks/{prime-radiant-advanced-wasm-JLJ6NKIP.js → prime-radiant-advanced-wasm-UA6FGPKX.js} +2 -2
  186. package/dist/cli/chunks/protocol-executor-OFL7H2VR.js +2 -0
  187. package/dist/cli/chunks/{protocol-handler-ZLYGQPHG.js → protocol-handler-UYJISQUT.js} +2 -2
  188. package/dist/cli/chunks/{prove-E2WZ335X.js → prove-H7PAIHGE.js} +2 -2
  189. package/dist/cli/chunks/qe-reasoning-bank-4NWLHIEM.js +2 -0
  190. package/dist/cli/chunks/{quality-6MHHBINU.js → quality-NT3N4UDM.js} +2 -2
  191. package/dist/cli/chunks/queen-coordinator-I7YDKGZD.js +2 -0
  192. package/dist/cli/chunks/{real-embeddings-QN5BY3WS.js → real-embeddings-K46PTHOR.js} +2 -2
  193. package/dist/cli/chunks/{roocode-installer-GTVII272.js → roocode-installer-K47KSTXW.js} +2 -2
  194. package/dist/cli/chunks/router-LNGYBIC4.js +2 -0
  195. package/dist/cli/chunks/routing-feedback-4RFHNTYV.js +2 -0
  196. package/dist/cli/chunks/{routing-handler-HYKZ3ISS.js → routing-handler-5RXV3FRV.js} +2 -2
  197. package/dist/cli/chunks/ruvector-commands-V46KRNUZ.js +8 -0
  198. package/dist/cli/chunks/{rvf-dual-writer-TVCJ2Y6N.js → rvf-dual-writer-YX5K3XO7.js} +2 -2
  199. package/dist/cli/chunks/{rvf-migration-adapter-34ITXLU3.js → rvf-migration-adapter-SURDRXWQ.js} +2 -2
  200. package/dist/cli/chunks/{rvf-migration-coordinator-SX2C7777.js → rvf-migration-coordinator-FMUHUWTB.js} +2 -2
  201. package/dist/cli/chunks/rvf-native-adapter-7REIX6DO.js +2 -0
  202. package/dist/cli/chunks/safe-db-SVN2BQFW.js +2 -0
  203. package/dist/cli/chunks/schedule-S6Z3DNRK.js +2 -0
  204. package/dist/cli/chunks/scheduler-BE5RHB4R.js +2 -0
  205. package/dist/cli/chunks/{security-7A4EW77M.js → security-ENEWXTNE.js} +3 -3
  206. package/dist/cli/chunks/shared-rvf-adapter-PNVIYEDK.js +2 -0
  207. package/dist/cli/chunks/{shared-rvf-dual-writer-27L4R5WK.js → shared-rvf-dual-writer-KJ67FATL.js} +2 -2
  208. package/dist/cli/chunks/sqlite-persistence-XBTALZ2S.js +2 -0
  209. package/dist/cli/chunks/{status-handler-JN6PRYLD.js → status-handler-CEMWQKE6.js} +2 -2
  210. package/dist/cli/chunks/{structural-health-JSY3DY7H.js → structural-health-B4VGYG4F.js} +2 -2
  211. package/dist/cli/chunks/{sync-ET3LYW2V.js → sync-P7PLECMB.js} +2 -2
  212. package/dist/cli/chunks/{task-handler-R24MR74L.js → task-handler-YGKMS5E2.js} +2 -2
  213. package/dist/cli/chunks/{task-handlers-YNPEEPPZ.js → task-handlers-LKTBRIPS.js} +2 -2
  214. package/dist/cli/chunks/{test-7BZXFZCT.js → test-ZWWGVM5X.js} +4 -4
  215. package/dist/cli/chunks/{test-scheduling-EVIFD5EY.js → test-scheduling-HTFVIWWL.js} +3 -3
  216. package/dist/cli/chunks/{token-bootstrap-QYYQRXM5.js → token-bootstrap-7VYNREQH.js} +2 -2
  217. package/dist/cli/chunks/{token-usage-H4OZA77I.js → token-usage-D67GP7FV.js} +2 -2
  218. package/dist/cli/chunks/{transformers-ILQFO5HZ.js → transformers-CI3CZC2C.js} +2 -2
  219. package/dist/cli/chunks/{tree-sitter-wasm-parser-KTST5NWH.js → tree-sitter-wasm-parser-BMRWIP7P.js} +2 -2
  220. package/dist/cli/chunks/{types-4Z7XELU6.js → types-SAPPKMCS.js} +2 -2
  221. package/dist/cli/chunks/unified-memory-OYIJOZ2E.js +2 -0
  222. package/dist/cli/chunks/unified-memory-hnsw-JRWF6EEB.js +2 -0
  223. package/dist/cli/chunks/unified-persistence-OOUATKAN.js +2 -0
  224. package/dist/cli/chunks/{validate-GSQCH6VN.js → validate-UZL2Y3GR.js} +2 -2
  225. package/dist/cli/chunks/{validate-swarm-SP2RPOYD.js → validate-swarm-ILNS64DZ.js} +2 -2
  226. package/dist/cli/chunks/{vibium-2SGOFYTF.js → vibium-CJMPXUAU.js} +2 -2
  227. package/dist/cli/chunks/visual-security-77T3APRH.js +2 -0
  228. package/dist/cli/chunks/{web-tree-sitter-QSQ27UTH.js → web-tree-sitter-HO5UYPPH.js} +2 -2
  229. package/dist/cli/chunks/{windsurf-installer-NIEH46E2.js → windsurf-installer-TEXMCEBB.js} +2 -2
  230. package/dist/cli/chunks/witness-chain-QIARNA6D.js +2 -0
  231. package/dist/cli/chunks/{witness-chain-62GJTCT5.js → witness-chain-TF35D7QS.js} +2 -2
  232. package/dist/cli/chunks/{workflow-WZMV2MGW.js → workflow-APRDB3SB.js} +4 -4
  233. package/dist/cli/chunks/workflow-orchestrator-IRZVM4MZ.js +2 -0
  234. package/dist/cli/chunks/{wrappers-LNTV533I.js → wrappers-VGV5RU5Q.js} +2 -2
  235. package/dist/cli/commands/ruvector-commands.js +5 -2
  236. package/dist/cli/index.js +5 -4
  237. package/dist/init/phases/04-database.js +19 -0
  238. package/dist/init/phases/06-code-intelligence.js +9 -6
  239. package/dist/init/phases/10-workers.js +2 -0
  240. package/dist/integrations/ruvector/feature-flags.d.ts +27 -5
  241. package/dist/integrations/ruvector/feature-flags.js +14 -1
  242. package/dist/kernel/hnsw-adapter.js +1 -1
  243. package/dist/kernel/native-hnsw-backend.d.ts +100 -37
  244. package/dist/kernel/native-hnsw-backend.js +207 -192
  245. package/dist/kernel/unified-memory.js +15 -10
  246. package/dist/mcp/bundle.js +189 -189
  247. package/package.json +1 -1
  248. package/dist/cli/chunks/adapter-5ODIX6ZG.js +0 -2
  249. package/dist/cli/chunks/aqe-learning-engine-PWGRS6KK.js +0 -2
  250. package/dist/cli/chunks/base-TJGIYR7L.js +0 -2
  251. package/dist/cli/chunks/browser-workflow-GUR7RLFP.js +0 -2
  252. package/dist/cli/chunks/chunk-MDFXPCBO.js +0 -2
  253. package/dist/cli/chunks/chunk-OZC42UMD.js +0 -2
  254. package/dist/cli/chunks/client-IFMC3AYQ.js +0 -2
  255. package/dist/cli/chunks/cross-domain-router-2LPBUUWY.js +0 -2
  256. package/dist/cli/chunks/dream-NGRDMOTE.js +0 -2
  257. package/dist/cli/chunks/esm-node-3COTOSO3.js +0 -2
  258. package/dist/cli/chunks/hnsw-adapter-BASJNTEV.js +0 -2
  259. package/dist/cli/chunks/hnsw-index-NFN2AUIX.js +0 -2
  260. package/dist/cli/chunks/impact-analyzer-ZMQXHQDV.js +0 -2
  261. package/dist/cli/chunks/init-wizard-QHAA4GWF.js +0 -2
  262. package/dist/cli/chunks/kernel-SNJFYN3T.js +0 -2
  263. package/dist/cli/chunks/knowledge-graph-EP5UTODP.js +0 -2
  264. package/dist/cli/chunks/load-test-KMMRHABK.js +0 -2
  265. package/dist/cli/chunks/memory-backend-Q5MWPMDE.js +0 -2
  266. package/dist/cli/chunks/protocol-executor-ORFR4WJ3.js +0 -2
  267. package/dist/cli/chunks/qe-reasoning-bank-PLTOH4SG.js +0 -2
  268. package/dist/cli/chunks/queen-coordinator-L3TRAX7H.js +0 -2
  269. package/dist/cli/chunks/router-3PBJJLRQ.js +0 -2
  270. package/dist/cli/chunks/routing-feedback-Q775MZ3Z.js +0 -2
  271. package/dist/cli/chunks/ruvector-commands-LBWHPUTZ.js +0 -8
  272. package/dist/cli/chunks/rvf-native-adapter-HLY2652E.js +0 -2
  273. package/dist/cli/chunks/safe-db-CCKCBZ5I.js +0 -2
  274. package/dist/cli/chunks/schedule-WZ5VV55N.js +0 -2
  275. package/dist/cli/chunks/scheduler-6PIKLCH7.js +0 -2
  276. package/dist/cli/chunks/shared-rvf-adapter-VCJNSACZ.js +0 -2
  277. package/dist/cli/chunks/sqlite-persistence-HMXYD56G.js +0 -2
  278. package/dist/cli/chunks/unified-memory-RBHCTAWW.js +0 -2
  279. package/dist/cli/chunks/unified-memory-hnsw-UBF5PT6D.js +0 -2
  280. package/dist/cli/chunks/unified-persistence-ZIJDP6GW.js +0 -2
  281. package/dist/cli/chunks/visual-security-WKIWOUTH.js +0 -2
  282. package/dist/cli/chunks/witness-chain-4BRX3GGH.js +0 -2
  283. package/dist/cli/chunks/workflow-orchestrator-G6VU7QZ4.js +0 -2
@@ -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.9.4");process.exit(0)}
2
- import{a as B,b as L}from"./chunk-GAG2P4I2.js";import{b as y,d as $}from"./chunk-4GJAYXB7.js";import"./chunk-C2HGOUEB.js";var k=[{id:"unit",name:"Unit Tests",testTypes:["unit"],testPatterns:["**/*.test.ts","**/*.spec.ts","!**/*.integration.*","!**/*.e2e.*"],thresholds:{minPassRate:.99,maxFlakyRatio:.01,minCoverage:.8},parallelism:8,timeoutMs:6e4,failFast:!0},{id:"integration",name:"Integration Tests",testTypes:["integration","contract"],testPatterns:["**/*.integration.test.ts","**/*.integration.spec.ts"],thresholds:{minPassRate:.95,maxFlakyRatio:.05,minCoverage:.7},parallelism:4,timeoutMs:3e5,failFast:!1},{id:"e2e",name:"E2E Tests",testTypes:["e2e","visual"],testPatterns:["**/*.e2e.test.ts","**/*.e2e.spec.ts"],thresholds:{minPassRate:.9,maxFlakyRatio:.1,minCoverage:.5},parallelism:2,timeoutMs:6e5,failFast:!1}];var b=class{constructor(e,t={phases:k,failFast:!0,retryFailedPhases:!1,maxRetries:1}){this.executor=e;this.config=t}state="idle";currentPhaseIndex=0;results=[];startTime;endTime;abortController;async run(){if(this.state==="running")throw new Error("Scheduler is already running");this.state="running",this.currentPhaseIndex=0,this.results=[],this.startTime=new Date,this.abortController=new AbortController;try{for(let e of this.config.phases){if(this.state==="paused"&&await this.waitForResume(),this.abortController.signal.aborted)break;let t=await this.executePhaseWithRetry(e);if(this.results.push(t),this.currentPhaseIndex++,this.config.onPhaseComplete?.(t),!t.success&&this.config.failFast){this.state="failed";break}}return this.endTime=new Date,this.state=this.results.every(e=>e.success)?"completed":"failed",this.config.onAllComplete?.(this.results),this.results}catch(e){throw this.state="failed",this.endTime=new Date,e}}async runPhase(e){let t=this.config.phases.find(s=>s.id===e);if(!t)throw new Error(`Phase not found: ${e}`);return this.executePhaseWithRetry(t)}pause(){this.state==="running"&&(this.state="paused")}resume(){this.state==="paused"&&(this.state="running")}async abort(){this.abortController?.abort(),await this.executor.abort(),this.state="idle"}getStats(){let e=this.startTime&&this.endTime?this.endTime.getTime()-this.startTime.getTime():this.startTime?Date.now()-this.startTime.getTime():void 0;return{state:this.state,currentPhaseIndex:this.currentPhaseIndex,totalPhases:this.config.phases.length,completedPhases:this.results.filter(t=>t.success).length,failedPhases:this.results.filter(t=>!t.success).length,results:[...this.results],startTime:this.startTime,endTime:this.endTime,durationMs:e}}async isReady(){return this.executor.isReady()}async executePhaseWithRetry(e){let t,s=this.config.retryFailedPhases?this.config.maxRetries:1;for(let r=1;r<=s;r++)try{if(t=await this.executor.execute(e),t.success||!this.config.retryFailedPhases)return t}catch(a){if(this.config.onError?.(a,e),r===s)return this.createErrorResult(e,a)}return t}createErrorResult(e,t){return{phaseId:e.id,phaseName:e.name,success:!1,passRate:0,flakyRatio:0,coverage:0,durationMs:0,totalTests:0,passed:0,failed:0,skipped:0,testResults:[],flakyTests:[],error:t.message}}waitForResume(){return new Promise(e=>{let t=()=>{this.state!=="paused"?e():setTimeout(t,100)};t()})}};function _(n,e){return new b(n,{phases:k,failFast:!0,retryFailedPhases:!1,maxRetries:1,...e})}function V(n,e){return n.passRate>=e.minPassRate&&n.flakyRatio<=e.maxFlakyRatio&&n.coverage>=e.minCoverage}$();import{spawn as j}from"child_process";var f=class{constructor(e={}){this.config=e}currentProcess=null;isAborted=!1;async execute(e,t){this.isAborted=!1;let s=Date.now();try{let r=this.buildArgs(e,t),a=await this.runVitest(r,e.timeoutMs),i=Date.now();return this.parseResult(e,a,i-s)}catch(r){let a=Date.now();return this.createErrorResult(e,r,a-s)}}async isReady(){try{return(await this.runCommand("npx",["vitest","--version"],5e3)).exitCode===0}catch{return!1}}getName(){return"vitest-executor"}async abort(){this.isAborted=!0,this.currentProcess&&(this.currentProcess.kill("SIGTERM"),this.currentProcess=null)}buildArgs(e,t){let s=["vitest","run","--reporter=json"];if(t&&t.length>0)s.push(...t);else for(let r of e.testPatterns)r.startsWith("!")?s.push("--exclude",r.slice(1)):s.push(r);return e.parallelism>0&&(s.push("--pool","threads"),s.push("--poolOptions.threads.maxThreads",String(e.parallelism))),e.failFast&&s.push("--bail","1"),s.push("--coverage"),s.push("--coverage.reporter",this.config.coverageReporter||"json"),this.config.coverageDir&&s.push("--coverage.reportsDirectory",this.config.coverageDir),this.config.extraArgs&&s.push(...this.config.extraArgs),s}async runVitest(e,t){let{stdout:s,exitCode:r}=await this.runCommand(this.config.vitestPath||"npx",e,t);try{let a=s.indexOf("{"),i=s.lastIndexOf("}");if(a===-1||i===-1)throw new Error("No JSON output from Vitest");let o=s.slice(a,i+1);return y(o)}catch{return{numTotalTestSuites:0,numPassedTestSuites:0,numFailedTestSuites:0,numTotalTests:0,numPassedTests:0,numFailedTests:0,numPendingTests:0,success:r===0,startTime:Date.now(),testResults:[]}}}runCommand(e,t,s){return new Promise((r,a)=>{let i="",o="",l=process.platform==="win32"&&e==="npx"?"npx.cmd":e;this.currentProcess=j(l,t,{cwd:this.config.cwd||process.cwd(),env:{...process.env,...this.config.env},shell:!1});let c=setTimeout(()=>{this.currentProcess?.kill("SIGTERM"),a(new Error(`Test execution timed out after ${s}ms`))},s);this.currentProcess.stdout?.on("data",u=>{i+=u.toString()}),this.currentProcess.stderr?.on("data",u=>{o+=u.toString()}),this.currentProcess.on("close",u=>{clearTimeout(c),this.currentProcess=null,this.isAborted?a(new Error("Test execution aborted")):r({stdout:i,stderr:o,exitCode:u??1})}),this.currentProcess.on("error",u=>{clearTimeout(c),this.currentProcess=null,a(u)})})}async parseResult(e,t,s){let r=[];for(let p of t.testResults)for(let h of p.assertionResults){let T={file:p.name,name:h.title,suite:h.ancestorTitles.join(" > "),passed:h.status==="passed",durationMs:h.duration||0,retries:0,error:h.failureMessages.join(`
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.6");process.exit(0)}
2
+ import{a as B,b as L}from"./chunk-VJKIPTA2.js";import{b as y,d as $}from"./chunk-MROCXAXJ.js";import"./chunk-N5CEEWWJ.js";var k=[{id:"unit",name:"Unit Tests",testTypes:["unit"],testPatterns:["**/*.test.ts","**/*.spec.ts","!**/*.integration.*","!**/*.e2e.*"],thresholds:{minPassRate:.99,maxFlakyRatio:.01,minCoverage:.8},parallelism:8,timeoutMs:6e4,failFast:!0},{id:"integration",name:"Integration Tests",testTypes:["integration","contract"],testPatterns:["**/*.integration.test.ts","**/*.integration.spec.ts"],thresholds:{minPassRate:.95,maxFlakyRatio:.05,minCoverage:.7},parallelism:4,timeoutMs:3e5,failFast:!1},{id:"e2e",name:"E2E Tests",testTypes:["e2e","visual"],testPatterns:["**/*.e2e.test.ts","**/*.e2e.spec.ts"],thresholds:{minPassRate:.9,maxFlakyRatio:.1,minCoverage:.5},parallelism:2,timeoutMs:6e5,failFast:!1}];var b=class{constructor(e,t={phases:k,failFast:!0,retryFailedPhases:!1,maxRetries:1}){this.executor=e;this.config=t}state="idle";currentPhaseIndex=0;results=[];startTime;endTime;abortController;async run(){if(this.state==="running")throw new Error("Scheduler is already running");this.state="running",this.currentPhaseIndex=0,this.results=[],this.startTime=new Date,this.abortController=new AbortController;try{for(let e of this.config.phases){if(this.state==="paused"&&await this.waitForResume(),this.abortController.signal.aborted)break;let t=await this.executePhaseWithRetry(e);if(this.results.push(t),this.currentPhaseIndex++,this.config.onPhaseComplete?.(t),!t.success&&this.config.failFast){this.state="failed";break}}return this.endTime=new Date,this.state=this.results.every(e=>e.success)?"completed":"failed",this.config.onAllComplete?.(this.results),this.results}catch(e){throw this.state="failed",this.endTime=new Date,e}}async runPhase(e){let t=this.config.phases.find(s=>s.id===e);if(!t)throw new Error(`Phase not found: ${e}`);return this.executePhaseWithRetry(t)}pause(){this.state==="running"&&(this.state="paused")}resume(){this.state==="paused"&&(this.state="running")}async abort(){this.abortController?.abort(),await this.executor.abort(),this.state="idle"}getStats(){let e=this.startTime&&this.endTime?this.endTime.getTime()-this.startTime.getTime():this.startTime?Date.now()-this.startTime.getTime():void 0;return{state:this.state,currentPhaseIndex:this.currentPhaseIndex,totalPhases:this.config.phases.length,completedPhases:this.results.filter(t=>t.success).length,failedPhases:this.results.filter(t=>!t.success).length,results:[...this.results],startTime:this.startTime,endTime:this.endTime,durationMs:e}}async isReady(){return this.executor.isReady()}async executePhaseWithRetry(e){let t,s=this.config.retryFailedPhases?this.config.maxRetries:1;for(let r=1;r<=s;r++)try{if(t=await this.executor.execute(e),t.success||!this.config.retryFailedPhases)return t}catch(a){if(this.config.onError?.(a,e),r===s)return this.createErrorResult(e,a)}return t}createErrorResult(e,t){return{phaseId:e.id,phaseName:e.name,success:!1,passRate:0,flakyRatio:0,coverage:0,durationMs:0,totalTests:0,passed:0,failed:0,skipped:0,testResults:[],flakyTests:[],error:t.message}}waitForResume(){return new Promise(e=>{let t=()=>{this.state!=="paused"?e():setTimeout(t,100)};t()})}};function _(n,e){return new b(n,{phases:k,failFast:!0,retryFailedPhases:!1,maxRetries:1,...e})}function V(n,e){return n.passRate>=e.minPassRate&&n.flakyRatio<=e.maxFlakyRatio&&n.coverage>=e.minCoverage}$();import{spawn as j}from"child_process";var f=class{constructor(e={}){this.config=e}currentProcess=null;isAborted=!1;async execute(e,t){this.isAborted=!1;let s=Date.now();try{let r=this.buildArgs(e,t),a=await this.runVitest(r,e.timeoutMs),i=Date.now();return this.parseResult(e,a,i-s)}catch(r){let a=Date.now();return this.createErrorResult(e,r,a-s)}}async isReady(){try{return(await this.runCommand("npx",["vitest","--version"],5e3)).exitCode===0}catch{return!1}}getName(){return"vitest-executor"}async abort(){this.isAborted=!0,this.currentProcess&&(this.currentProcess.kill("SIGTERM"),this.currentProcess=null)}buildArgs(e,t){let s=["vitest","run","--reporter=json"];if(t&&t.length>0)s.push(...t);else for(let r of e.testPatterns)r.startsWith("!")?s.push("--exclude",r.slice(1)):s.push(r);return e.parallelism>0&&(s.push("--pool","threads"),s.push("--poolOptions.threads.maxThreads",String(e.parallelism))),e.failFast&&s.push("--bail","1"),s.push("--coverage"),s.push("--coverage.reporter",this.config.coverageReporter||"json"),this.config.coverageDir&&s.push("--coverage.reportsDirectory",this.config.coverageDir),this.config.extraArgs&&s.push(...this.config.extraArgs),s}async runVitest(e,t){let{stdout:s,exitCode:r}=await this.runCommand(this.config.vitestPath||"npx",e,t);try{let a=s.indexOf("{"),i=s.lastIndexOf("}");if(a===-1||i===-1)throw new Error("No JSON output from Vitest");let o=s.slice(a,i+1);return y(o)}catch{return{numTotalTestSuites:0,numPassedTestSuites:0,numFailedTestSuites:0,numTotalTests:0,numPassedTests:0,numFailedTests:0,numPendingTests:0,success:r===0,startTime:Date.now(),testResults:[]}}}runCommand(e,t,s){return new Promise((r,a)=>{let i="",o="",l=process.platform==="win32"&&e==="npx"?"npx.cmd":e;this.currentProcess=j(l,t,{cwd:this.config.cwd||process.cwd(),env:{...process.env,...this.config.env},shell:!1});let c=setTimeout(()=>{this.currentProcess?.kill("SIGTERM"),a(new Error(`Test execution timed out after ${s}ms`))},s);this.currentProcess.stdout?.on("data",u=>{i+=u.toString()}),this.currentProcess.stderr?.on("data",u=>{o+=u.toString()}),this.currentProcess.on("close",u=>{clearTimeout(c),this.currentProcess=null,this.isAborted?a(new Error("Test execution aborted")):r({stdout:i,stderr:o,exitCode:u??1})}),this.currentProcess.on("error",u=>{clearTimeout(c),this.currentProcess=null,a(u)})})}async parseResult(e,t,s){let r=[];for(let p of t.testResults)for(let h of p.assertionResults){let T={file:p.name,name:h.title,suite:h.ancestorTitles.join(" > "),passed:h.status==="passed",durationMs:h.duration||0,retries:0,error:h.failureMessages.join(`
3
3
  `)||void 0};r.push(T)}let a=this.config.flakyTracker;a&&a.recordResults(r);let i=t.numTotalTests,o=t.numPassedTests,l=t.numFailedTests,c=t.numPendingTests,u=i>0?o/i:0,m=[],g=0;if(a){m=a.analyze().flakyTests.map(d=>d.testId);let h=new Set(r.map(d=>`${d.file}:${d.suite}:${d.name}`)),T=m.filter(d=>h.has(d));g=i>0?T.length/i:0}let R=await this.getCoverageFromReport(),w=u>=e.thresholds.minPassRate&&g<=e.thresholds.maxFlakyRatio&&R>=e.thresholds.minCoverage;return{phaseId:e.id,phaseName:e.name,success:w,passRate:u,flakyRatio:g,coverage:R,durationMs:s,totalTests:i,passed:o,failed:l,skipped:c,testResults:r,flakyTests:m}}async getCoverageFromReport(){try{let e=await import("fs/promises"),t=await import("path"),s=this.config.coverageDir||"coverage",r=t.join(this.config.cwd||process.cwd(),s,"coverage-summary.json"),a=await e.readFile(r,"utf-8");return(y(a).total?.lines?.pct??0)/100}catch{return 0}}createErrorResult(e,t,s){return{phaseId:e.id,phaseName:e.name,success:!1,passRate:0,flakyRatio:0,coverage:0,durationMs:s,totalTests:0,passed:0,failed:0,skipped:0,testResults:[],flakyTests:[],error:t.message}}};function z(n){return new f(n)}import{spawn as Q}from"child_process";import{resolve as W,dirname as J,basename as M}from"path";var Y=[{sourcePattern:/^src\/(.+)\.ts$/,toTestPaths:(n,e)=>{let t=n[1];return[`tests/unit/${t}.test.ts`,`tests/unit/${t}.spec.ts`,`tests/${t}.test.ts`,`tests/${t}.spec.ts`,`src/${t}.test.ts`,`src/${t}.spec.ts`]}},{sourcePattern:/^src\/(.+)\/index\.ts$/,toTestPaths:(n,e)=>{let t=n[1];return[`tests/unit/${t}.test.ts`,`tests/unit/${t}/index.test.ts`,`tests/unit/${t}.spec.ts`]}},{sourcePattern:/\.(test|spec)\.(ts|tsx|js|jsx)$/,toTestPaths:(n,e)=>[e]},{sourcePattern:/^(vitest\.config|jest\.config|tsconfig|package\.json)/,toTestPaths:()=>["**/*.test.ts","**/*.spec.ts"]}],v=class{constructor(e){this.config=e;if(!e.impactAnalyzer)throw new Error("GitAwareTestSelector requires impactAnalyzer. Use ImpactAnalyzerService from code-intelligence domain. NO FALLBACK TO PATTERN MATCHING - use real dependency analysis.");this.cwd=e.cwd||process.cwd(),this.baseRef=e.baseRef||"HEAD~1",this.mappingRules=e.mappingRules||Y,this.impactAnalyzer=e.impactAnalyzer}cwd;baseRef;mappingRules;impactAnalyzer;async selectAffectedTests(){try{let e=await this.getChangedFiles();if(e.length===0)return{changedFiles:[],selectedTests:[],mappings:[],runAllTests:!1};let{selectedTests:t,mappings:s,runAllTests:r,runAllReason:a}=await this.mapChangesToTests(e);return{changedFiles:e,selectedTests:[...new Set(t)],mappings:s,runAllTests:r,runAllReason:a}}catch(e){return{changedFiles:[],selectedTests:[],mappings:[],runAllTests:!0,runAllReason:`Git error: ${e.message}`}}}async selectTestsForFiles(e){let t=e.map(o=>({path:o,changeType:"modified"})),{selectedTests:s,mappings:r,runAllTests:a,runAllReason:i}=await this.mapChangesToTests(t);return{changedFiles:t,selectedTests:[...new Set(s)],mappings:r,runAllTests:a,runAllReason:i}}async getChangedFiles(){let t=(await this.git(["diff","--name-status",this.baseRef,"HEAD"])).trim().split(`
4
4
  `).filter(Boolean),s=[];for(let r of t){let[a,...i]=r.split(" "),o=i.join(" "),l,c;switch(a[0]){case"A":l="added";break;case"M":l="modified";break;case"D":l="deleted";break;case"R":l="renamed",c=o;break;default:l="modified"}s.push({path:l==="renamed"&&i[1]||o,changeType:l,previousPath:c})}return s}async getMergeBase(e="main"){try{return(await this.git(["merge-base","HEAD",e])).trim()}catch{return(await this.git(["merge-base","HEAD","master"])).trim()}}async mapChangesToTests(e){let t=[],s=[],r=!1,a;for(let l of e)if(this.isConfigFile(l.path))return{selectedTests:[],mappings:[],runAllTests:!0,runAllReason:`Config file changed: ${l.path}`};let i=e.filter(l=>l.changeType!=="deleted"||this.config.includeDeletedFileTests).map(l=>l.path);if(i.length===0)return{selectedTests:[],mappings:[],runAllTests:!1};let o=await this.impactAnalyzer.getImpactedTests(i);if(!o.success){let l=o,c=l.error instanceof Error?l.error.message:String(l.error);return{selectedTests:[],mappings:[],runAllTests:!0,runAllReason:`Impact analysis failed: ${c}`}}if(o.value.length===0)return{selectedTests:[],mappings:[],runAllTests:!1};t.push(...o.value);for(let l of e){if(l.changeType==="deleted"&&!this.config.includeDeletedFileTests)continue;let c=o.value.filter(u=>u.includes(M(l.path,".ts").replace(/\.(tsx?|jsx?)$/,"")));c.length>0&&s.push({sourceFile:l.path,testFiles:c,confidence:.95})}return{selectedTests:t,mappings:s,runAllTests:r,runAllReason:a}}isConfigFile(e){return/^(vitest\.config|jest\.config|tsconfig|package\.json)/.test(e)}async findTestsHeuristically(e){let t=M(e,".ts").replace(/\.(tsx?|jsx?)$/,""),s=J(e),r=[`${s}/${t}.test.ts`,`${s}/${t}.spec.ts`,`${s}/__tests__/${t}.test.ts`,`tests/${s}/${t}.test.ts`,`tests/unit/${s.replace("src/","")}/${t}.test.ts`];return this.filterExistingFiles(r)}async filterExistingFiles(e){let t=await import("fs/promises"),s=[];for(let r of e)try{let a=W(this.cwd,r);await t.access(a),s.push(r)}catch(a){console.debug("[TestSelector] File access check failed:",a instanceof Error?a.message:a)}return s}git(e){return new Promise((t,s)=>{let r="",a="",i=Q("git",e,{cwd:this.cwd});i.stdout.on("data",o=>{r+=o.toString()}),i.stderr.on("data",o=>{a+=o.toString()}),i.on("close",o=>{o===0?t(r):s(new Error(`git ${e.join(" ")} failed: ${a}`))}),i.on("error",s)})}};function F(n){return new v(n)}async function q(n,e,t){let r=await F({impactAnalyzer:n,baseRef:e,cwd:t}).selectAffectedTests();return r.runAllTests?[]:r.selectedTests}$();var K={minRunsForFlakiness:5,flakinessThreshold:.1,maxRecentErrors:5,historyRetentionDays:30},A=class{records=new Map;config;constructor(e){this.config={...K,...e}}recordResult(e){let t=this.getTestId(e),s=this.getOrCreateRecord(t,e);s.totalRuns++,s.lastRun=new Date,e.passed?s.passCount++:(s.failCount++,e.error&&(s.recentErrors=[e.error,...s.recentErrors.slice(0,this.config.maxRecentErrors-1)])),e.retries>0&&e.passed&&(s.flakyCount++,s.lastFlaky=new Date),s.flakinessScore=this.calculateFlakiness(s)}recordResults(e){for(let t of e)this.recordResult(t)}getRecord(e){return this.records.get(e)}getFlakyTests(){return Array.from(this.records.values()).filter(e=>e.totalRuns>=this.config.minRunsForFlakiness&&e.flakinessScore>=this.config.flakinessThreshold)}isFlaky(e){let t=this.records.get(e);return t?t.totalRuns>=this.config.minRunsForFlakiness&&t.flakinessScore>=this.config.flakinessThreshold:!1}analyze(){let e=Array.from(this.records.values()),t=e.filter(l=>l.totalRuns>=this.config.minRunsForFlakiness&&l.flakinessScore>=this.config.flakinessThreshold),s=e.filter(l=>l.totalRuns>=this.config.minRunsForFlakiness&&l.flakyCount>0&&l.flakinessScore<this.config.flakinessThreshold),r=e.filter(l=>l.totalRuns<this.config.minRunsForFlakiness),a=e.filter(l=>l.totalRuns>=this.config.minRunsForFlakiness),i=a.length>0?t.length/a.length:0,o=this.calculateTrend(t);return{totalTests:e.length,flakyTests:t.sort((l,c)=>c.flakinessScore-l.flakinessScore),stabilizedTests:s,insufficientData:r,overallFlakiness:i,trend:o}}getQuarantineList(e=.3){return Array.from(this.records.values()).filter(t=>t.flakinessScore>=e).map(t=>t.testId)}pruneHistory(){let e=new Date;e.setDate(e.getDate()-this.config.historyRetentionDays);let t=0;for(let[s,r]of this.records)r.lastRun<e&&(this.records.delete(s),t++);return t}exportHistory(){return Array.from(this.records.values())}importHistory(e){for(let t of e){let s={...t,lastRun:new Date(t.lastRun),lastFlaky:t.lastFlaky?new Date(t.lastFlaky):void 0};this.records.set(t.testId,s)}}reset(){this.records.clear()}getTestId(e){return`${e.file}:${e.suite}:${e.name}`}getOrCreateRecord(e,t){let s=this.records.get(e);return s||(s={testId:e,file:t.file,name:t.name,totalRuns:0,passCount:0,failCount:0,flakyCount:0,flakinessScore:0,lastRun:new Date,recentErrors:[]},this.records.set(e,s)),s}calculateFlakiness(e){if(e.totalRuns<this.config.minRunsForFlakiness)return 0;let t=e.flakyCount/e.totalRuns,s=e.passCount/e.totalRuns,r=s>0&&s<1?Math.min(s,1-s)*2:0;return Math.min(1,t*3+r)}calculateTrend(e){if(e.length===0)return"stable";let s=Date.now()-10080*60*1e3,r=0,a=0;for(let i of e)i.lastFlaky&&(i.lastFlaky.getTime()>s?r++:a++);return r>a*1.5?"degrading":a>r*1.5?"improving":"stable"}};function C(n){return new A(n)}async function G(n,e){let t=C({...e,historyPath:n});try{let r=await(await import("fs/promises")).readFile(n,"utf-8"),a=y(r);t.importHistory(a)}catch(s){console.debug("[FlakyTracker] History load failed, starting fresh:",s instanceof Error?s.message:s)}return t}async function D(n,e){let t=await import("fs/promises"),s=n.exportHistory();await t.writeFile(e,JSON.stringify(s,null,2))}var X={enableAnnotations:!0,enableSummary:!0,enableOutputs:!0,maxAnnotations:10,includeFlakyWarnings:!0,includeCoverage:!0};function H(){let n=process.env;return n.GITHUB_ACTIONS==="true"?{isCI:!0,provider:"github-actions",branch:n.GITHUB_HEAD_REF||n.GITHUB_REF_NAME,commitSha:n.GITHUB_SHA,prNumber:n.GITHUB_EVENT_NAME==="pull_request"&&parseInt(n.GITHUB_REF?.split("/")[2]||"",10)||void 0,baseBranch:n.GITHUB_BASE_REF,buildUrl:`${n.GITHUB_SERVER_URL}/${n.GITHUB_REPOSITORY}/actions/runs/${n.GITHUB_RUN_ID}`}:n.GITLAB_CI==="true"?{isCI:!0,provider:"gitlab-ci",branch:n.CI_COMMIT_REF_NAME,commitSha:n.CI_COMMIT_SHA,prNumber:n.CI_MERGE_REQUEST_IID?parseInt(n.CI_MERGE_REQUEST_IID,10):void 0,baseBranch:n.CI_MERGE_REQUEST_TARGET_BRANCH_NAME,buildUrl:n.CI_JOB_URL}:n.JENKINS_URL?{isCI:!0,provider:"jenkins",branch:n.GIT_BRANCH||n.BRANCH_NAME,commitSha:n.GIT_COMMIT,prNumber:n.CHANGE_ID?parseInt(n.CHANGE_ID,10):void 0,baseBranch:n.CHANGE_TARGET,buildUrl:n.BUILD_URL}:n.CIRCLECI==="true"?{isCI:!0,provider:"circleci",branch:n.CIRCLE_BRANCH,commitSha:n.CIRCLE_SHA1,prNumber:n.CIRCLE_PULL_REQUEST?parseInt(n.CIRCLE_PULL_REQUEST.split("/").pop()||"",10):void 0,buildUrl:n.CIRCLE_BUILD_URL}:n.CI==="true"||n.CI==="1"?{isCI:!0,provider:"unknown"}:{isCI:!1}}var S=class{config;constructor(e){this.config={...X,...e}}generateOutput(e){let t=this.config.enableAnnotations?this.generateAnnotations(e):[],s=this.config.enableSummary?this.generateSummary(e):"",r=this.config.enableOutputs?this.generateOutputs(e):{};return{summary:s,annotations:t,outputs:r}}async writeOutput(e){let t=this.generateOutput(e),s=await import("fs/promises");for(let r of t.annotations)this.writeAnnotation(r);if(t.summary&&process.env.GITHUB_STEP_SUMMARY&&await s.appendFile(process.env.GITHUB_STEP_SUMMARY,t.summary),process.env.GITHUB_OUTPUT){let r=Object.entries(t.outputs).map(([a,i])=>`${a}=${i}`).join(`
5
5
  `);await s.appendFile(process.env.GITHUB_OUTPUT,r+`
@@ -12,4 +12,4 @@ import{a as B,b as L}from"./chunk-GAG2P4I2.js";import{b as y,d as $}from"./chunk
12
12
  `);for(let i of r.slice(0,20))t.push(`#### ${i.suite} > ${i.name}`),t.push(`- **File**: \`${i.file}\``),i.error&&(t.push("```"),t.push(i.error.slice(0,500)),t.push("```")),t.push("");r.length>20&&t.push(`_... and ${r.length-20} more failures_`),t.push(`</details>
13
13
  `)}let a=e.flatMap(i=>i.flakyTests);if(a.length>0&&this.config.includeFlakyWarnings){t.push(`### \u26A0\uFE0F Flaky Tests
14
14
  `);for(let i of a.slice(0,10))t.push(`- \`${i}\``);t.push("")}return t.join(`
15
- `)}generateOutputs(e){let t=e.reduce((o,l)=>o+l.totalTests,0),s=e.reduce((o,l)=>o+l.passed,0),r=e.reduce((o,l)=>o+l.failed,0),a=e.every(o=>o.success),i=e.length>0?e.reduce((o,l)=>o+l.coverage,0)/e.length:0;return{test_result:a?"success":"failure",total_tests:String(t),passed_tests:String(s),failed_tests:String(r),coverage_percent:String((i*100).toFixed(1)),phases_completed:String(e.length),phases_passed:String(e.filter(o=>o.success).length),has_flaky_tests:String(e.some(o=>o.flakyTests.length>0))}}writeAnnotation(e){let t=[`file=${e.file}`,`line=${e.line}`,`title=${e.title}`].join(",");console.log(`::${e.level} ${t}::${e.message}`)}extractLineNumber(e){if(!e)return;let t=e.match(/:(\d+):\d+/);return t?parseInt(t[1],10):void 0}formatDuration(e){return e<1e3?`${e}ms`:e<6e4?`${(e/1e3).toFixed(1)}s`:`${(e/6e4).toFixed(1)}m`}generateCoverageBar(e){let t=Math.round(e*10),s=10-t;return"\u2588".repeat(t)+"\u2591".repeat(s)}};function x(n){return new S(n)}async function Z(n,e){await x(e).writeOutput(n)}var E=class n{constructor(e,t,s,r,a,i){this.config=e;this.selector=t,this.executor=s,this.scheduler=r,this.flakyTracker=a,this.reporter=i,this.ciEnvironment=H()}selector;executor;scheduler;flakyTracker;reporter;ciEnvironment;static async create(e){let t=e.flakyHistoryPath?await G(e.flakyHistoryPath,e.flakyTracker):C(e.flakyTracker),s=new f({...e.vitest,cwd:e.cwd,flakyTracker:t}),{ImpactAnalyzerService:r}=await import("./impact-analyzer-ZMQXHQDV.js"),a=new r(e.memory),i=F({cwd:e.cwd,baseRef:e.baseRef,impactAnalyzer:a}),o=_(s,{...e.scheduler,phases:e.phases}),l=x(e.reporter);return new n(e,i,s,o,t,l)}async run(){let e=Date.now(),t=[],s=this.config.runAllTests??!1,r=performance.now();if(!s){let p=await this.selector.selectAffectedTests();p.runAllTests?(s=!0,console.log(`[TestSchedulingPipeline] Running all tests: ${p.runAllReason}`)):p.selectedTests.length===0?(console.log("[TestSchedulingPipeline] No affected tests found, running all"),s=!0):(t=p.selectedTests,console.log(`[TestSchedulingPipeline] Selected ${t.length} affected tests`))}let a=performance.now()-r;if(this.config.useDAGAttention&&t.length>0)try{let{isDAGAttentionEnabled:p}=await import("./feature-flags-ZJ42B4IL.js");if(p()){let{createDAGAttentionScheduler:h}=await import("./dag-attention-scheduler-S2MXANYL.js"),T=h(),d=t.map(P=>({id:P,name:P,estimatedDuration:1e3,dependencies:[],priority:1,tags:[]})),N=T.schedule(d),I=[];for(let P of N.phases)I.push(...P.tests.map(O=>O.id));I.length>0&&(t=I)}}catch(p){process.env.DEBUG&&console.debug("[Pipeline] DAG attention scheduling skipped:",p instanceof Error?p.message:p)}let i=performance.now(),o;s?o=await this.scheduler.run():o=await this.runWithSelectedTests(t);let l=performance.now()-i,c=performance.now(),u=this.flakyTracker.analyze();this.config.flakyHistoryPath&&await D(this.flakyTracker,this.config.flakyHistoryPath);let m=performance.now()-c,g=performance.now();this.ciEnvironment.isCI&&await this.reporter.writeOutput(o);let R=performance.now()-g,w=Date.now()-e;return{phaseResults:o,selectedTests:t,ranAllTests:s,flakyAnalysis:u,ciEnvironment:this.ciEnvironment,totalDurationMs:w,stepLatencies:{selectionMs:a,executionMs:l,analysisMs:m,reportingMs:R}}}async runPhase(e){return this.scheduler.runPhase(e)}getFlakyTracker(){return this.flakyTracker}getSelector(){return this.selector}getStats(){return this.scheduler.getStats()}async abort(){await this.scheduler.abort()}async runWithSelectedTests(e){let t=[],s=this.config.phases??[];for(let r of s){let a=e.filter(i=>r.testPatterns.some(o=>o.startsWith("!")?!1:this.patternToRegex(o).test(i)));if(a.length>0){let i=await this.executor.execute(r,a);t.push(i)}}return t}patternToRegex(e){let t=e.replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/\*\*/g,".*").replace(/\*/g,"[^/]*");return new RegExp(t)}};async function U(n){return E.create(n)}async function ee(n){return(await U(n)).run()}export{B as DAGAttentionScheduler,k as DEFAULT_TEST_PHASES,A as FlakyTestTracker,v as GitAwareTestSelector,S as GitHubActionsReporter,b as PhaseScheduler,E as TestSchedulingPipeline,f as VitestPhaseExecutor,V as checkQualityThresholds,L as createDAGAttentionScheduler,C as createFlakyTracker,x as createGitHubActionsReporter,_ as createPhaseScheduler,U as createTestPipeline,F as createTestSelector,z as createVitestExecutor,H as detectCIEnvironment,q as getAffectedTests,G as loadFlakyTracker,Z as reportToGitHubActions,ee as runTestPipeline,D as saveFlakyTracker};
15
+ `)}generateOutputs(e){let t=e.reduce((o,l)=>o+l.totalTests,0),s=e.reduce((o,l)=>o+l.passed,0),r=e.reduce((o,l)=>o+l.failed,0),a=e.every(o=>o.success),i=e.length>0?e.reduce((o,l)=>o+l.coverage,0)/e.length:0;return{test_result:a?"success":"failure",total_tests:String(t),passed_tests:String(s),failed_tests:String(r),coverage_percent:String((i*100).toFixed(1)),phases_completed:String(e.length),phases_passed:String(e.filter(o=>o.success).length),has_flaky_tests:String(e.some(o=>o.flakyTests.length>0))}}writeAnnotation(e){let t=[`file=${e.file}`,`line=${e.line}`,`title=${e.title}`].join(",");console.log(`::${e.level} ${t}::${e.message}`)}extractLineNumber(e){if(!e)return;let t=e.match(/:(\d+):\d+/);return t?parseInt(t[1],10):void 0}formatDuration(e){return e<1e3?`${e}ms`:e<6e4?`${(e/1e3).toFixed(1)}s`:`${(e/6e4).toFixed(1)}m`}generateCoverageBar(e){let t=Math.round(e*10),s=10-t;return"\u2588".repeat(t)+"\u2591".repeat(s)}};function x(n){return new S(n)}async function Z(n,e){await x(e).writeOutput(n)}var E=class n{constructor(e,t,s,r,a,i){this.config=e;this.selector=t,this.executor=s,this.scheduler=r,this.flakyTracker=a,this.reporter=i,this.ciEnvironment=H()}selector;executor;scheduler;flakyTracker;reporter;ciEnvironment;static async create(e){let t=e.flakyHistoryPath?await G(e.flakyHistoryPath,e.flakyTracker):C(e.flakyTracker),s=new f({...e.vitest,cwd:e.cwd,flakyTracker:t}),{ImpactAnalyzerService:r}=await import("./impact-analyzer-C5SKESHG.js"),a=new r(e.memory),i=F({cwd:e.cwd,baseRef:e.baseRef,impactAnalyzer:a}),o=_(s,{...e.scheduler,phases:e.phases}),l=x(e.reporter);return new n(e,i,s,o,t,l)}async run(){let e=Date.now(),t=[],s=this.config.runAllTests??!1,r=performance.now();if(!s){let p=await this.selector.selectAffectedTests();p.runAllTests?(s=!0,console.log(`[TestSchedulingPipeline] Running all tests: ${p.runAllReason}`)):p.selectedTests.length===0?(console.log("[TestSchedulingPipeline] No affected tests found, running all"),s=!0):(t=p.selectedTests,console.log(`[TestSchedulingPipeline] Selected ${t.length} affected tests`))}let a=performance.now()-r;if(this.config.useDAGAttention&&t.length>0)try{let{isDAGAttentionEnabled:p}=await import("./feature-flags-AEO5C73R.js");if(p()){let{createDAGAttentionScheduler:h}=await import("./dag-attention-scheduler-LZZ4O2PT.js"),T=h(),d=t.map(P=>({id:P,name:P,estimatedDuration:1e3,dependencies:[],priority:1,tags:[]})),N=T.schedule(d),I=[];for(let P of N.phases)I.push(...P.tests.map(O=>O.id));I.length>0&&(t=I)}}catch(p){process.env.DEBUG&&console.debug("[Pipeline] DAG attention scheduling skipped:",p instanceof Error?p.message:p)}let i=performance.now(),o;s?o=await this.scheduler.run():o=await this.runWithSelectedTests(t);let l=performance.now()-i,c=performance.now(),u=this.flakyTracker.analyze();this.config.flakyHistoryPath&&await D(this.flakyTracker,this.config.flakyHistoryPath);let m=performance.now()-c,g=performance.now();this.ciEnvironment.isCI&&await this.reporter.writeOutput(o);let R=performance.now()-g,w=Date.now()-e;return{phaseResults:o,selectedTests:t,ranAllTests:s,flakyAnalysis:u,ciEnvironment:this.ciEnvironment,totalDurationMs:w,stepLatencies:{selectionMs:a,executionMs:l,analysisMs:m,reportingMs:R}}}async runPhase(e){return this.scheduler.runPhase(e)}getFlakyTracker(){return this.flakyTracker}getSelector(){return this.selector}getStats(){return this.scheduler.getStats()}async abort(){await this.scheduler.abort()}async runWithSelectedTests(e){let t=[],s=this.config.phases??[];for(let r of s){let a=e.filter(i=>r.testPatterns.some(o=>o.startsWith("!")?!1:this.patternToRegex(o).test(i)));if(a.length>0){let i=await this.executor.execute(r,a);t.push(i)}}return t}patternToRegex(e){let t=e.replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/\*\*/g,".*").replace(/\*/g,"[^/]*");return new RegExp(t)}};async function U(n){return E.create(n)}async function ee(n){return(await U(n)).run()}export{B as DAGAttentionScheduler,k as DEFAULT_TEST_PHASES,A as FlakyTestTracker,v as GitAwareTestSelector,S as GitHubActionsReporter,b as PhaseScheduler,E as TestSchedulingPipeline,f as VitestPhaseExecutor,V as checkQualityThresholds,L as createDAGAttentionScheduler,C as createFlakyTracker,x as createGitHubActionsReporter,_ as createPhaseScheduler,U as createTestPipeline,F as createTestSelector,z as createVitestExecutor,H as detectCIEnvironment,q as getAffectedTests,G as loadFlakyTracker,Z as reportToGitHubActions,ee as runTestPipeline,D as saveFlakyTracker};
@@ -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.9.4");process.exit(0)}
2
- import{b as r,e as f,f as k}from"./chunk-RTC3ZCPK.js";import{b as l}from"./chunk-LH3ZL2OK.js";import"./chunk-VBXJBXMG.js";import"./chunk-EZTUUOVI.js";import"./chunk-UJLSCJJS.js";import"./chunk-27P4VTCY.js";import"./chunk-C567IO5M.js";import"./chunk-Q6FSXNQP.js";import"./chunk-G6RTCJFY.js";import"./chunk-7ZXNJT4Q.js";import"./chunk-MDFXPCBO.js";import"./chunk-RPYUKEAH.js";import"./chunk-4GJAYXB7.js";import"./chunk-VBYREHZI.js";import"./chunk-F6AU2MAZ.js";import"./chunk-G72E5DL3.js";import"./chunk-RS7ZGWHV.js";import"./chunk-RN3SN4ZC.js";import"./chunk-XB5HXTL4.js";import"./chunk-ZQSEPDIJ.js";import"./chunk-P3EOWBME.js";import"./chunk-KELYPHMV.js";import"./chunk-Q2ZYUIS2.js";import"./chunk-OZC42UMD.js";import"./chunk-RE6XD6RI.js";import"./chunk-MN2MYLVW.js";import"./chunk-C2HGOUEB.js";import*as s from"path";import*as a from"fs";var u={enableOptimization:!0,enablePersistence:!0,storagePath:process.env.AQE_STORAGE_PATH??".agentic-qe",autoSaveIntervalMs:6e4,verbose:process.env.AQE_VERBOSE==="true"},i=!1,n=null,p=!1;async function B(t){if(i)return;let e={...u,...t};if(e.verbose&&console.log("[TokenBootstrap] Initializing token tracking..."),e.enablePersistence){let o=s.resolve(e.storagePath);a.existsSync(o)||a.mkdirSync(o,{recursive:!0})}if(e.enableOptimization)try{n=(await l(!0)).backend,await k(n,{enabled:!0,verbose:e.verbose}),e.verbose&&(console.log("[TokenBootstrap] TokenOptimizerService initialized"),console.log(`[TokenBootstrap] isEnabled() = ${f.isEnabled()}`))}catch(o){console.error("[TokenBootstrap] Failed to initialize TokenOptimizerService:",o)}if(e.enablePersistence){let o=s.join(e.storagePath,"token-metrics.json");r.configurePersistence({filePath:o,autoSaveIntervalMs:e.autoSaveIntervalMs});try{let c=await r.load();e.verbose&&console.log(`[TokenBootstrap] Loaded existing metrics: ${c}`)}catch{e.verbose&&console.log("[TokenBootstrap] No existing metrics to load")}r.startAutoSave(),e.verbose&&console.log(`[TokenBootstrap] Persistence configured: ${o}`)}p||(g(e.verbose),p=!0),i=!0,e.verbose&&console.log("[TokenBootstrap] Token tracking initialized successfully")}async function d(t=!1){if(i){if(t&&console.log("[TokenBootstrap] Shutting down token tracking..."),r.stopAutoSave(),r.hasUnsavedChanges())try{await r.save(),t&&console.log("[TokenBootstrap] Metrics saved successfully")}catch(e){console.error("[TokenBootstrap] Failed to save metrics:",e)}if(n){try{await n.dispose()}catch(e){console.debug("[TokenBootstrap] Memory backend disposal error:",e instanceof Error?e.message:e)}n=null}i=!1}}function h(){return i}function y(){return n}function g(t){let e=async o=>{t&&console.log(`[TokenBootstrap] Received ${o}, saving metrics...`),await d(t)};process.on("beforeExit",()=>e("beforeExit"))}export{B as bootstrapTokenTracking,y as getTokenMemoryBackend,h as isTokenTrackingInitialized,d as shutdownTokenTracking};
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.9.6");process.exit(0)}
2
+ import{b as r,e as f,f as k}from"./chunk-NA5ZOZIF.js";import{b as l}from"./chunk-GXVUDSYW.js";import"./chunk-4H3YCKAI.js";import"./chunk-O65ZAUG3.js";import"./chunk-H4J456F2.js";import"./chunk-AJX44TJ7.js";import"./chunk-NPNGSE7X.js";import"./chunk-EMKI4ZV5.js";import"./chunk-SQCNABS4.js";import"./chunk-YV34KLBV.js";import"./chunk-MA7OLK56.js";import"./chunk-BHOJLQLF.js";import"./chunk-MROCXAXJ.js";import"./chunk-KI4W6CVC.js";import"./chunk-Z5IOTEQI.js";import"./chunk-3VBPPW7H.js";import"./chunk-RD5N2722.js";import"./chunk-CU3LGMOK.js";import"./chunk-775KESYW.js";import"./chunk-5AXU6KCI.js";import"./chunk-YQ7X6LKA.js";import"./chunk-5CKG46BM.js";import"./chunk-EJSRKZ5M.js";import"./chunk-SYYGXU7I.js";import"./chunk-V2IUGAJ7.js";import"./chunk-NSRIYP76.js";import"./chunk-N5CEEWWJ.js";import*as s from"path";import*as a from"fs";var u={enableOptimization:!0,enablePersistence:!0,storagePath:process.env.AQE_STORAGE_PATH??".agentic-qe",autoSaveIntervalMs:6e4,verbose:process.env.AQE_VERBOSE==="true"},i=!1,n=null,p=!1;async function B(t){if(i)return;let e={...u,...t};if(e.verbose&&console.log("[TokenBootstrap] Initializing token tracking..."),e.enablePersistence){let o=s.resolve(e.storagePath);a.existsSync(o)||a.mkdirSync(o,{recursive:!0})}if(e.enableOptimization)try{n=(await l(!0)).backend,await k(n,{enabled:!0,verbose:e.verbose}),e.verbose&&(console.log("[TokenBootstrap] TokenOptimizerService initialized"),console.log(`[TokenBootstrap] isEnabled() = ${f.isEnabled()}`))}catch(o){console.error("[TokenBootstrap] Failed to initialize TokenOptimizerService:",o)}if(e.enablePersistence){let o=s.join(e.storagePath,"token-metrics.json");r.configurePersistence({filePath:o,autoSaveIntervalMs:e.autoSaveIntervalMs});try{let c=await r.load();e.verbose&&console.log(`[TokenBootstrap] Loaded existing metrics: ${c}`)}catch{e.verbose&&console.log("[TokenBootstrap] No existing metrics to load")}r.startAutoSave(),e.verbose&&console.log(`[TokenBootstrap] Persistence configured: ${o}`)}p||(g(e.verbose),p=!0),i=!0,e.verbose&&console.log("[TokenBootstrap] Token tracking initialized successfully")}async function d(t=!1){if(i){if(t&&console.log("[TokenBootstrap] Shutting down token tracking..."),r.stopAutoSave(),r.hasUnsavedChanges())try{await r.save(),t&&console.log("[TokenBootstrap] Metrics saved successfully")}catch(e){console.error("[TokenBootstrap] Failed to save metrics:",e)}if(n){try{await n.dispose()}catch(e){console.debug("[TokenBootstrap] Memory backend disposal error:",e instanceof Error?e.message:e)}n=null}i=!1}}function h(){return i}function y(){return n}function g(t){let e=async o=>{t&&console.log(`[TokenBootstrap] Received ${o}, saving metrics...`),await d(t)};process.on("beforeExit",()=>e("beforeExit"))}export{B as bootstrapTokenTracking,y as getTokenMemoryBackend,h as isTokenTrackingInitialized,d as shutdownTokenTracking};
@@ -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.9.4");process.exit(0)}
2
- import{a as k,b as u,d as S,e as f}from"./chunk-RTC3ZCPK.js";import"./chunk-VBXJBXMG.js";import"./chunk-EZTUUOVI.js";import"./chunk-UJLSCJJS.js";import"./chunk-27P4VTCY.js";import"./chunk-Q6FSXNQP.js";import"./chunk-G6RTCJFY.js";import"./chunk-7ZXNJT4Q.js";import"./chunk-MDFXPCBO.js";import"./chunk-RPYUKEAH.js";import"./chunk-4GJAYXB7.js";import"./chunk-VBYREHZI.js";import{a as y,c as h}from"./chunk-F6AU2MAZ.js";import"./chunk-G72E5DL3.js";import"./chunk-RN3SN4ZC.js";import"./chunk-XB5HXTL4.js";import"./chunk-ZQSEPDIJ.js";import"./chunk-P3EOWBME.js";import"./chunk-KELYPHMV.js";import"./chunk-Q2ZYUIS2.js";import"./chunk-OZC42UMD.js";import"./chunk-RE6XD6RI.js";import"./chunk-MN2MYLVW.js";import"./chunk-C2HGOUEB.js";import{Command as v}from"commander";import e from"chalk";h();import*as p from"fs";function L(){return new v("token-usage").description("View and analyze token consumption metrics (ADR-042)").option("-p, --period <period>","Time period: 1h, 24h, 7d, 30d","24h").option("-a, --by-agent","Group usage by agent").option("-d, --by-domain","Group usage by domain").option("-r, --recommendations","Show optimization recommendations").option("-e, --export <file>","Export to CSV file").option("--dashboard","Show compact token budget dashboard summary").option("--cache-stats","Show session operation cache statistics (Imp-15)").option("--json","Output as JSON").option("-v, --verbose","Show detailed output").action(async n=>{await w(n)})}async function w(o){let n=R(o.period);try{o.cacheStats?await x(o):o.dashboard?console.log(k()):o.byAgent?await U(n,o):o.byDomain?await A(n,o):o.recommendations?await C(n,o):o.export?await E(n,o.export,o):await O(n,o)}catch(s){console.error(e.red(`Error: ${y(s)}`)),process.exit(1)}}async function O(o,n){let s=u.getSessionSummary(o);if(n.json){console.log(JSON.stringify($(s),null,2));return}console.log(e.bold.cyan(`
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.9.6");process.exit(0)}
2
+ import{a as k,b as u,d as S,e as f}from"./chunk-NA5ZOZIF.js";import"./chunk-4H3YCKAI.js";import"./chunk-O65ZAUG3.js";import"./chunk-H4J456F2.js";import"./chunk-AJX44TJ7.js";import"./chunk-EMKI4ZV5.js";import"./chunk-SQCNABS4.js";import"./chunk-YV34KLBV.js";import"./chunk-MA7OLK56.js";import"./chunk-BHOJLQLF.js";import"./chunk-MROCXAXJ.js";import"./chunk-KI4W6CVC.js";import{a as y,c as h}from"./chunk-Z5IOTEQI.js";import"./chunk-3VBPPW7H.js";import"./chunk-CU3LGMOK.js";import"./chunk-775KESYW.js";import"./chunk-5AXU6KCI.js";import"./chunk-YQ7X6LKA.js";import"./chunk-5CKG46BM.js";import"./chunk-EJSRKZ5M.js";import"./chunk-SYYGXU7I.js";import"./chunk-V2IUGAJ7.js";import"./chunk-NSRIYP76.js";import"./chunk-N5CEEWWJ.js";import{Command as v}from"commander";import e from"chalk";h();import*as p from"fs";function L(){return new v("token-usage").description("View and analyze token consumption metrics (ADR-042)").option("-p, --period <period>","Time period: 1h, 24h, 7d, 30d","24h").option("-a, --by-agent","Group usage by agent").option("-d, --by-domain","Group usage by domain").option("-r, --recommendations","Show optimization recommendations").option("-e, --export <file>","Export to CSV file").option("--dashboard","Show compact token budget dashboard summary").option("--cache-stats","Show session operation cache statistics (Imp-15)").option("--json","Output as JSON").option("-v, --verbose","Show detailed output").action(async n=>{await w(n)})}async function w(o){let n=R(o.period);try{o.cacheStats?await x(o):o.dashboard?console.log(k()):o.byAgent?await U(n,o):o.byDomain?await A(n,o):o.recommendations?await C(n,o):o.export?await E(n,o.export,o):await O(n,o)}catch(s){console.error(e.red(`Error: ${y(s)}`)),process.exit(1)}}async function O(o,n){let s=u.getSessionSummary(o);if(n.json){console.log(JSON.stringify($(s),null,2));return}console.log(e.bold.cyan(`
3
3
  \u{1F4CA} Token Usage Summary
4
4
  `)),console.log(e.gray(`Period: ${o}`)),console.log(e.gray(`Session: ${s.sessionId}
5
5
  `)),console.log(e.bold("Total Usage:")),console.log(` Input tokens: ${l(s.totalUsage.inputTokens)}`),console.log(` Output tokens: ${l(s.totalUsage.outputTokens)}`),console.log(` Total tokens: ${l(s.totalUsage.totalTokens)}`),s.totalUsage.estimatedCostUsd!==void 0&&console.log(` Estimated cost: ${T(s.totalUsage.estimatedCostUsd)}`),console.log(e.bold(`
@@ -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.9.4");process.exit(0)}
2
- import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o}from"./chunk-XYVMKCSI.js";import"./chunk-C2HGOUEB.js";export{i as DotProductAttention,h as FlashAttention,k as HyperbolicAttention,l as LinearAttention,m as MoEAttention,j as MultiHeadAttention,b as RuvectorLayer,n as SonaEngine,c as TensorCompress,a as default,d as differentiableSearch,f as getCompressionLevel,e as hierarchicalForward,g as init,o as pipeline};
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.6");process.exit(0)}
2
+ import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o}from"./chunk-67WBMX7K.js";import"./chunk-N5CEEWWJ.js";export{i as DotProductAttention,h as FlashAttention,k as HyperbolicAttention,l as LinearAttention,m as MoEAttention,j as MultiHeadAttention,b as RuvectorLayer,n as SonaEngine,c as TensorCompress,a as default,d as differentiableSearch,f as getCompressionLevel,e as hierarchicalForward,g as init,o as pipeline};
@@ -1,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.9.4");process.exit(0)}
2
- import{d as L,e as $}from"./chunk-RPYUKEAH.js";import"./chunk-C2HGOUEB.js";$();import*as U from"node:fs";import G from"node:module";import*as F from"node:path";import{fileURLToPath as V}from"node:url";var b=L("TreeSitterWASM"),R={python:{wasmFile:"tree-sitter-python.wasm",nodeTypes:{functionDecl:["function_definition"],classDecl:["class_definition"],importDecl:["import_statement","import_from_statement"]}},java:{wasmFile:"tree-sitter-java.wasm",nodeTypes:{functionDecl:["method_declaration","constructor_declaration"],classDecl:["class_declaration","interface_declaration"],importDecl:["import_declaration"]}},csharp:{wasmFile:"tree-sitter-c_sharp.wasm",nodeTypes:{functionDecl:["method_declaration","constructor_declaration"],classDecl:["class_declaration","interface_declaration"],importDecl:["using_directive"]}},rust:{wasmFile:"tree-sitter-rust.wasm",nodeTypes:{functionDecl:["function_item"],classDecl:[],importDecl:["use_declaration"],implBlock:"impl_item",structDecl:"struct_item"}},swift:{wasmFile:"tree-sitter-swift.wasm",nodeTypes:{functionDecl:["function_declaration"],classDecl:["class_declaration"],importDecl:["import_declaration"],structDecl:"struct_declaration",protocolDecl:"protocol_declaration"}}},g=null,N=null,x=0,P=3,w=new Map;function A(s){let e=V(new URL(".",import.meta.url)),t=[F.resolve(e,"..","..","..","assets","grammars",s),F.resolve(e,"..","..","assets","grammars",s),F.resolve(process.cwd(),"assets","grammars",s),F.resolve(e,"..","assets","grammars",s)];for(let n of t)if(U.existsSync(n))return n;throw new Error(`Grammar file ${s} not found. Searched: ${t.join(", ")}`)}async function B(){if(x>=P)throw new Error(`web-tree-sitter failed to initialize after ${P} attempts`);if(!g)return N||(N=(async()=>{try{let s=await import("./web-tree-sitter-QSQ27UTH.js"),e=s.default||s;await e.init(),g=e,x=0,b.info("web-tree-sitter WASM runtime initialized")}catch(s){x++,N=null;let e=s instanceof Error?s.message:String(s);throw b.warn(`web-tree-sitter WASM init failed (attempt ${x}/${P}): ${e}. `+(x<P?"Will retry on next parse.":"Falling back to regex permanently.")),s}})()),N}async function J(s){let e=w.get(s);if(e)return e;await B();let t=R[s];if(!t)throw new Error(`No WASM grammar config for ${s}`);try{let n=A(t.wasmFile),i=await g.Language.load(n);return w.set(s,i),b.info(`Loaded tree-sitter WASM grammar for ${s}`),i}catch(n){let i=n instanceof Error?n.message:String(n);throw b.warn(`Failed to load WASM grammar for ${s}: ${i}. Falling back to regex parser.`),n}}function u(s,e){let t=[];for(let n=0;n<s.childCount;n++){let i=s.child(n);e.includes(i.type)&&t.push(i)}return t}function y(s,e,t=10){let n=[];function i(r,o){if(!(o>t))for(let a=0;a<r.childCount;a++){let c=r.child(a);e.includes(c.type)&&n.push(c),i(c,o+1)}}return i(s,0),n}function h(s){let e=[];for(let t=0;t<s.childCount;t++){let n=s.child(t);(n.type==="modifiers"||n.type==="modifier"||n.type==="visibility_modifier")&&e.push(n.text.trim())}return e}function I(s,e){return h(s).some(t=>t.includes(e))}var X=new Set(["if_statement","if_expression","if_let_statement","while_statement","while_expression","for_statement","for_in_statement","for_expression","enhanced_for_statement","match_expression","switch_statement","switch_expression","case_clause","match_arm","switch_entry","catch_clause","except_clause","catch_block","binary_expression","conditional_expression","ternary_expression"]),Y=new Set(["&&","||","and","or"]);function _(s){if(!s)return 1;let e=1;function t(n){if(X.has(n.type))if(n.type==="binary_expression"){let i=n.childForFieldName("operator");i&&Y.has(i.text)&&e++}else e++;for(let i=0;i<n.childCount;i++)t(n.child(i))}return t(s),e}function S(s,e){if(!s)return[];let t=[];for(let n=0;n<s.childCount;n++){let i=s.child(n);switch(e){case"java":if(i.type==="field_declaration"){let r=h(i),o=i.childForFieldName("type")?.text?.trim(),a=i.childForFieldName("declarator"),c=a?.childForFieldName("name")?.text??a?.text?.split(/[=;]/)[0]?.trim()??"";c&&t.push({name:c,type:o||void 0,isPublic:r.some(l=>l.includes("public")),isReadonly:r.some(l=>l.includes("final"))})}break;case"csharp":if(i.type==="field_declaration"||i.type==="property_declaration"){let r=h(i),o=i.childForFieldName("type")?.text?.trim(),a=i.childForFieldName("name")?.text??"";a&&t.push({name:a,type:o||void 0,isPublic:r.some(c=>c.includes("public")),isReadonly:r.some(c=>c.includes("readonly"))})}break;case"rust":if(i.type==="field_declaration"){let r=i.childForFieldName("name")?.text??"",o=i.childForFieldName("type")?.text?.trim(),a=I(i,"pub");r&&t.push({name:r,type:o||void 0,isPublic:a,isReadonly:!1})}break;case"swift":if(i.type==="property_declaration"){let r=T(i),o=i.childForFieldName("name")?.text??"",a=i.childForFieldName("type")?.text?.trim(),c=r.includes("public")||r.includes("open"),l=i.text.includes("let ");o&&t.push({name:o,type:a||void 0,isPublic:c,isReadonly:l})}break;case"python":if(i.type==="expression_statement"){let r=i.child(0);if(r?.type==="assignment"){let o=r.childForFieldName("left");if(o?.type==="attribute"||o?.type==="identifier"){let a=o.text.replace("self.","");t.push({name:a,type:void 0,isPublic:!a.startsWith("_"),isReadonly:!1})}}}break}}return t}function O(s){return s.map(e=>{let t=e.childForFieldName("name")?.text??"",n=e.childForFieldName("parameters"),i=e.childForFieldName("return_type"),r=e.childForFieldName("body"),o=e.text.trimStart().startsWith("async"),a=E(e);return{name:t,parameters:q(n),returnType:i?.text?.trim()||void 0,isAsync:o,isPublic:!t.startsWith("_"),complexity:_(r),decorators:a,genericParams:[],startLine:e.startPosition.row+1,endLine:e.endPosition.row+1}})}function q(s){if(!s)return[];let e=[];for(let t=0;t<s.childCount;t++){let n=s.child(t);if(n.type==="identifier"){let i=n.text;if(i==="self"||i==="cls")continue;e.push({name:i,type:void 0,isOptional:!1,defaultValue:void 0})}else if(n.type==="typed_parameter"){let i=n.child(0)?.text??"";if(i==="self"||i==="cls")continue;let r=n.childForFieldName("type")?.text?.trim();e.push({name:i,type:r||void 0,isOptional:!1,defaultValue:void 0})}else if(n.type==="default_parameter"||n.type==="typed_default_parameter"){let i=n.childForFieldName("name")?.text??n.child(0)?.text??"";if(i==="self"||i==="cls")continue;let r=n.childForFieldName("type")?.text?.trim(),o=n.childForFieldName("value")?.text?.trim();e.push({name:i,type:r||void 0,isOptional:!0,defaultValue:o||void 0})}else if(n.type==="list_splat_pattern"||n.type==="dictionary_splat_pattern"){let i=n.text;e.push({name:i,type:void 0,isOptional:!0,defaultValue:void 0})}}return e}function E(s){let e=[],t=s.parent;if(!t)return e;if(t.type==="decorated_definition")for(let n=0;n<t.childCount;n++){let i=t.child(n);i.type==="decorator"&&e.push(i.text.trim())}return e}function z(s){return s.map(e=>{let t=e.childForFieldName("name")?.text??"",n=e.childForFieldName("body"),i=e.childForFieldName("superclasses"),r=[];if(i)for(let l=0;l<i.childCount;l++){let d=i.child(l);d.isNamed&&r.push(d.text)}let o=n?y(n,["function_definition"],2):[],a=O(o),c=E(e);return{name:t,methods:a,properties:S(n,"python"),isPublic:!t.startsWith("_"),implements:[],extends:r[0]||void 0,decorators:c,startLine:e.startPosition.row+1,endLine:e.endPosition.row+1}})}function Q(s){return s.map(e=>{if(e.type==="import_from_statement"){let n=e.childForFieldName("module_name")?.text??"",i=[];for(let r=0;r<e.childCount;r++){let o=e.child(r);e.fieldNameForChild(r)==="name"&&o.isNamed&&i.push(o.text)}return{module:n,namedImports:i,isTypeOnly:!1}}return{module:e.childForFieldName("name")?.text??"",namedImports:[],isTypeOnly:!1}})}function C(s){return s.map(e=>{let t=e.childForFieldName("name")?.text??"",n=e.childForFieldName("type"),i=e.childForFieldName("parameters"),r=e.childForFieldName("body"),a=h(e).some(d=>d.includes("public")),c=n?.text?.includes("CompletableFuture")??!1,l=k(e);return{name:t,parameters:H(i),returnType:n?.text==="void"?void 0:n?.text?.trim(),isAsync:c,isPublic:a,complexity:_(r),decorators:l,genericParams:[],startLine:e.startPosition.row+1,endLine:e.endPosition.row+1}})}function H(s){if(!s)return[];let e=[];for(let t=0;t<s.childCount;t++){let n=s.child(t);if(n.type==="formal_parameter"||n.type==="spread_parameter"){let i=n.childForFieldName("name")?.text??"",r=n.childForFieldName("type")?.text?.trim();e.push({name:i,type:r||void 0,isOptional:!1,defaultValue:void 0})}}return e}function k(s){let e=[];for(let t=0;t<s.childCount;t++){let n=s.child(t);if(n.type==="modifiers")for(let i=0;i<n.childCount;i++){let r=n.child(i);(r.type==="marker_annotation"||r.type==="annotation")&&e.push(r.text.trim())}}return e}function K(s){return s.map(e=>{let t=e.childForFieldName("name")?.text??"",n=e.childForFieldName("body"),r=h(e).some(p=>p.includes("public")),o=e.childForFieldName("superclass")?.text,a=e.childForFieldName("interfaces"),c=[];if(a)for(let p=0;p<a.childCount;p++){let f=a.child(p);f.isNamed&&c.push(f.text)}let l=n?u(n,["method_declaration","constructor_declaration"]):[],d=C(l),m=k(e);return{name:t,methods:d,properties:S(n,"java"),isPublic:r,implements:c,extends:o||void 0,decorators:m,startLine:e.startPosition.row+1,endLine:e.endPosition.row+1}})}function Z(s){return s.map(e=>{let t=e.text.replace(/^\s*import\s+(static\s+)?/,"").replace(/;\s*$/,"").trim(),n=t.split("."),i=n[n.length-1];return{module:t,namedImports:i==="*"?[]:[i],isTypeOnly:!1}})}function ee(s){return y(s,["method_declaration","constructor_declaration"]).map(t=>{let n=t.childForFieldName("name")?.text??"",i=t.childForFieldName("type"),r=t.childForFieldName("parameters"),o=h(t),a=o.some(d=>d.includes("public")),c=o.some(d=>d.includes("async"))||i?.text?.includes("Task")||!1,l=W(t);return{name:n,parameters:te(r),returnType:i?.text==="void"?void 0:i?.text?.trim(),isAsync:c,isPublic:a,complexity:_(t.childForFieldName("body")),decorators:l,genericParams:[],startLine:t.startPosition.row+1,endLine:t.endPosition.row+1}})}function te(s){if(!s)return[];let e=[];for(let t=0;t<s.childCount;t++){let n=s.child(t);if(n.type==="parameter"){let i=n.childForFieldName("name")?.text??"",r=n.childForFieldName("type")?.text?.trim();e.push({name:i,type:r||void 0,isOptional:r?.endsWith("?")||!1,defaultValue:void 0})}}return e}function W(s){let e=[];for(let t=0;t<s.childCount;t++){let n=s.child(t);n.type==="attribute_list"&&e.push(n.text.trim())}return e}function ne(s){return y(s,["class_declaration","interface_declaration"]).map(t=>{let n=t.childForFieldName("name")?.text??"",i=t.childForFieldName("body"),o=h(t).some(p=>p.includes("public")),a=t.childForFieldName("bases"),c=[];if(a)for(let p=0;p<a.childCount;p++){let f=a.child(p);f.isNamed&&c.push(f.text)}let l=i?u(i,["method_declaration","constructor_declaration"]):[],d=C(l),m=W(t);return{name:n,methods:d,properties:S(i,"csharp"),isPublic:o,implements:c.slice(1),extends:c[0]||void 0,decorators:m,startLine:t.startPosition.row+1,endLine:t.endPosition.row+1}})}function ie(s){return y(s,["using_directive"]).map(t=>({module:t.text.replace(/^\s*using\s+(static\s+)?/,"").replace(/;\s*$/,"").trim(),namedImports:[],isTypeOnly:!1}))}function se(s,e){let t=[],n=u(s,e.nodeTypes.functionDecl);if(t.push(...n.map(D)),e.nodeTypes.implBlock){let i=u(s,[e.nodeTypes.implBlock]);for(let r of i){let o=r.childForFieldName("body");if(o){let a=u(o,e.nodeTypes.functionDecl);t.push(...a.map(D))}}}return t}function D(s){let e=s.childForFieldName("name")?.text??"",t=s.childForFieldName("parameters"),n=s.childForFieldName("return_type"),i=s.childForFieldName("body"),r=I(s,"pub"),o=s.text.trimStart().startsWith("pub async")||s.text.trimStart().startsWith("async"),a=M(s);return{name:e,parameters:re(t),returnType:n?.text?.trim()||void 0,isAsync:o,isPublic:r,complexity:_(i),decorators:a,genericParams:[],startLine:s.startPosition.row+1,endLine:s.endPosition.row+1}}function re(s){if(!s)return[];let e=[];for(let t=0;t<s.childCount;t++){let n=s.child(t);if(n.type==="parameter"){let i=n.childForFieldName("pattern"),r=n.childForFieldName("type"),o=i?.text??"",a=r?.text?.trim();e.push({name:o,type:a||void 0,isOptional:!1,defaultValue:void 0})}else if(n.type==="self_parameter")continue}return e}function M(s){let e=[],t=s.previousNamedSibling;for(;t&&t.type==="attribute_item";)e.unshift(t.text.trim()),t=t.previousNamedSibling;return e}function oe(s){let e=[],t=u(s,["struct_item","enum_item","trait_item"]);for(let n of t){let i=n.childForFieldName("name")?.text??"",r=I(n,"pub"),o=M(n),a=n.childForFieldName("body");e.push({name:i,methods:[],properties:S(a,"rust"),isPublic:r,implements:[],extends:void 0,decorators:o,startLine:n.startPosition.row+1,endLine:n.endPosition.row+1})}return e}function ae(s){return u(s,["use_declaration"]).map(t=>({module:t.childForFieldName("argument")?.text??t.text.replace(/^\s*use\s+/,"").replace(/;\s*$/,"").trim(),namedImports:[],isTypeOnly:!1}))}function j(s){return s.map(e=>{let t="",n=[],i,r=T(e),o=r.includes("public")||r.includes("open"),a=!1;for(let l=0;l<e.childCount;l++){let d=e.child(l);e.fieldNameForChild(l)==="name"&&(d.type==="simple_identifier"?t=d.text:t||(i=d.text)),d.type==="parameter"&&n.push(d),(d.type==="async"||d.text==="async")&&(a=!0)}if(!t){for(let l=0;l<e.childCount;l++)if(e.child(l).type==="simple_identifier"){t=e.child(l).text;break}}let c=null;for(let l=0;l<e.childCount;l++)if(e.child(l).type==="function_body"){c=e.child(l);break}return{name:t,parameters:ce(n),returnType:i,isAsync:a,isPublic:o,complexity:_(c),decorators:[],genericParams:[],startLine:e.startPosition.row+1,endLine:e.endPosition.row+1}})}function T(s){let e=[];for(let t=0;t<s.childCount;t++){let n=s.child(t);if(n.type==="modifiers")for(let i=0;i<n.childCount;i++)e.push(n.child(i).text.trim())}return e}function ce(s){return s.map(e=>{let n=e.text.split(":"),i=n[0]?.trim().split(/\s+/)??[],r=i[i.length-1]||"",o=n.slice(1).join(":").trim()||void 0;return{name:r,type:o,isOptional:o?.endsWith("?")||!1,defaultValue:void 0}})}function le(s){return u(s,["class_declaration","struct_declaration","protocol_declaration"]).map(n=>{let i=n.childForFieldName("name"),r=i?.text??"",o=T(n),a=o.includes("public")||o.includes("open"),c=[];for(let p=0;p<n.childCount;p++){let f=n.child(p);f.type==="type_identifier"&&f!==i&&c.push(f.text),(f.type==="inheritance_specifier"||f.type==="user_type")&&c.push(f.text)}let l=n.childForFieldName("body"),d=l?y(l,["function_declaration"],2):[],m=j(d);return{name:r,methods:m,properties:S(l,"swift"),isPublic:a,implements:c.slice(1),extends:c[0]||void 0,decorators:[],startLine:n.startPosition.row+1,endLine:n.endPosition.row+1}})}function de(s){return u(s,["import_declaration"]).map(t=>{let n="";for(let i=0;i<t.childCount;i++){let r=t.child(i);(r.type==="identifier"||r.type==="simple_identifier")&&(n=r.text)}return{module:n,namedImports:[],isTypeOnly:!1}})}var v=class{language;supportedExtensions;constructor(e,t){this.language=e,this.supportedExtensions=t}async parseFile(e,t){let n=await J(this.language),i=new g;i.setLanguage(n);let r=i.parse(e),o=r.rootNode;try{return{...this.extractFromAST(o),language:this.language,filePath:t}}finally{r.delete(),i.delete()}}extractFromAST(e){let t=R[this.language];switch(this.language){case"python":{let n=u(e,t.nodeTypes.functionDecl),i=u(e,["decorated_definition"]).map(d=>{for(let m=0;m<d.childCount;m++)if(t.nodeTypes.functionDecl.includes(d.child(m).type))return d.child(m);return null}).filter(Boolean),r=[...n,...i],o=u(e,t.nodeTypes.classDecl),a=u(e,["decorated_definition"]).map(d=>{for(let m=0;m<d.childCount;m++)if(t.nodeTypes.classDecl.includes(d.child(m).type))return d.child(m);return null}).filter(Boolean),c=[...o,...a],l=u(e,t.nodeTypes.importDecl);return{functions:O(r),classes:z(c),imports:Q(l)}}case"java":{let n=y(e,t.nodeTypes.classDecl),i=u(e,t.nodeTypes.importDecl),o=[...u(e,t.nodeTypes.functionDecl)];for(let a of n){let c=a.childForFieldName("body");c&&o.push(...u(c,t.nodeTypes.functionDecl))}return{functions:C(o),classes:K(n),imports:Z(i)}}case"csharp":return{functions:ee(e),classes:ne(e),imports:ie(e)};case"rust":return{functions:se(e,t),classes:oe(e),imports:ae(e)};case"swift":{let n=y(e,t.nodeTypes.functionDecl);return{functions:j(n),classes:le(e),imports:de(e)}}default:return{functions:[],classes:[],imports:[]}}}},ue={python:[".py"],java:[".java"],csharp:[".cs"],rust:[".rs"],swift:[".swift"]};function ye(){let s=new Map;for(let[e,t]of Object.entries(ue))s.set(e,new v(e,t));return s}function he(){if(process.env.AQE_PARSER_REGEX_ONLY==="1"||process.env.AQE_PARSER_REGEX_ONLY==="true")return!1;try{let{createRequire:s}=G;return s(import.meta.url).resolve("web-tree-sitter"),A("tree-sitter-python.wasm"),!0}catch{return!1}}function xe(){g=null,N=null,x=0,w.clear()}export{v as TreeSitterWASMParser,xe as _resetWasmState,ye as createWasmParsers,he as isWasmAvailable};
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.9.6");process.exit(0)}
2
+ import{d as L,e as $}from"./chunk-BHOJLQLF.js";import"./chunk-N5CEEWWJ.js";$();import*as U from"node:fs";import G from"node:module";import*as F from"node:path";import{fileURLToPath as V}from"node:url";var b=L("TreeSitterWASM"),R={python:{wasmFile:"tree-sitter-python.wasm",nodeTypes:{functionDecl:["function_definition"],classDecl:["class_definition"],importDecl:["import_statement","import_from_statement"]}},java:{wasmFile:"tree-sitter-java.wasm",nodeTypes:{functionDecl:["method_declaration","constructor_declaration"],classDecl:["class_declaration","interface_declaration"],importDecl:["import_declaration"]}},csharp:{wasmFile:"tree-sitter-c_sharp.wasm",nodeTypes:{functionDecl:["method_declaration","constructor_declaration"],classDecl:["class_declaration","interface_declaration"],importDecl:["using_directive"]}},rust:{wasmFile:"tree-sitter-rust.wasm",nodeTypes:{functionDecl:["function_item"],classDecl:[],importDecl:["use_declaration"],implBlock:"impl_item",structDecl:"struct_item"}},swift:{wasmFile:"tree-sitter-swift.wasm",nodeTypes:{functionDecl:["function_declaration"],classDecl:["class_declaration"],importDecl:["import_declaration"],structDecl:"struct_declaration",protocolDecl:"protocol_declaration"}}},g=null,N=null,x=0,P=3,w=new Map;function A(s){let e=V(new URL(".",import.meta.url)),t=[F.resolve(e,"..","..","..","assets","grammars",s),F.resolve(e,"..","..","assets","grammars",s),F.resolve(process.cwd(),"assets","grammars",s),F.resolve(e,"..","assets","grammars",s)];for(let n of t)if(U.existsSync(n))return n;throw new Error(`Grammar file ${s} not found. Searched: ${t.join(", ")}`)}async function B(){if(x>=P)throw new Error(`web-tree-sitter failed to initialize after ${P} attempts`);if(!g)return N||(N=(async()=>{try{let s=await import("./web-tree-sitter-HO5UYPPH.js"),e=s.default||s;await e.init(),g=e,x=0,b.info("web-tree-sitter WASM runtime initialized")}catch(s){x++,N=null;let e=s instanceof Error?s.message:String(s);throw b.warn(`web-tree-sitter WASM init failed (attempt ${x}/${P}): ${e}. `+(x<P?"Will retry on next parse.":"Falling back to regex permanently.")),s}})()),N}async function J(s){let e=w.get(s);if(e)return e;await B();let t=R[s];if(!t)throw new Error(`No WASM grammar config for ${s}`);try{let n=A(t.wasmFile),i=await g.Language.load(n);return w.set(s,i),b.info(`Loaded tree-sitter WASM grammar for ${s}`),i}catch(n){let i=n instanceof Error?n.message:String(n);throw b.warn(`Failed to load WASM grammar for ${s}: ${i}. Falling back to regex parser.`),n}}function u(s,e){let t=[];for(let n=0;n<s.childCount;n++){let i=s.child(n);e.includes(i.type)&&t.push(i)}return t}function y(s,e,t=10){let n=[];function i(r,o){if(!(o>t))for(let a=0;a<r.childCount;a++){let c=r.child(a);e.includes(c.type)&&n.push(c),i(c,o+1)}}return i(s,0),n}function h(s){let e=[];for(let t=0;t<s.childCount;t++){let n=s.child(t);(n.type==="modifiers"||n.type==="modifier"||n.type==="visibility_modifier")&&e.push(n.text.trim())}return e}function I(s,e){return h(s).some(t=>t.includes(e))}var X=new Set(["if_statement","if_expression","if_let_statement","while_statement","while_expression","for_statement","for_in_statement","for_expression","enhanced_for_statement","match_expression","switch_statement","switch_expression","case_clause","match_arm","switch_entry","catch_clause","except_clause","catch_block","binary_expression","conditional_expression","ternary_expression"]),Y=new Set(["&&","||","and","or"]);function _(s){if(!s)return 1;let e=1;function t(n){if(X.has(n.type))if(n.type==="binary_expression"){let i=n.childForFieldName("operator");i&&Y.has(i.text)&&e++}else e++;for(let i=0;i<n.childCount;i++)t(n.child(i))}return t(s),e}function S(s,e){if(!s)return[];let t=[];for(let n=0;n<s.childCount;n++){let i=s.child(n);switch(e){case"java":if(i.type==="field_declaration"){let r=h(i),o=i.childForFieldName("type")?.text?.trim(),a=i.childForFieldName("declarator"),c=a?.childForFieldName("name")?.text??a?.text?.split(/[=;]/)[0]?.trim()??"";c&&t.push({name:c,type:o||void 0,isPublic:r.some(l=>l.includes("public")),isReadonly:r.some(l=>l.includes("final"))})}break;case"csharp":if(i.type==="field_declaration"||i.type==="property_declaration"){let r=h(i),o=i.childForFieldName("type")?.text?.trim(),a=i.childForFieldName("name")?.text??"";a&&t.push({name:a,type:o||void 0,isPublic:r.some(c=>c.includes("public")),isReadonly:r.some(c=>c.includes("readonly"))})}break;case"rust":if(i.type==="field_declaration"){let r=i.childForFieldName("name")?.text??"",o=i.childForFieldName("type")?.text?.trim(),a=I(i,"pub");r&&t.push({name:r,type:o||void 0,isPublic:a,isReadonly:!1})}break;case"swift":if(i.type==="property_declaration"){let r=T(i),o=i.childForFieldName("name")?.text??"",a=i.childForFieldName("type")?.text?.trim(),c=r.includes("public")||r.includes("open"),l=i.text.includes("let ");o&&t.push({name:o,type:a||void 0,isPublic:c,isReadonly:l})}break;case"python":if(i.type==="expression_statement"){let r=i.child(0);if(r?.type==="assignment"){let o=r.childForFieldName("left");if(o?.type==="attribute"||o?.type==="identifier"){let a=o.text.replace("self.","");t.push({name:a,type:void 0,isPublic:!a.startsWith("_"),isReadonly:!1})}}}break}}return t}function O(s){return s.map(e=>{let t=e.childForFieldName("name")?.text??"",n=e.childForFieldName("parameters"),i=e.childForFieldName("return_type"),r=e.childForFieldName("body"),o=e.text.trimStart().startsWith("async"),a=E(e);return{name:t,parameters:q(n),returnType:i?.text?.trim()||void 0,isAsync:o,isPublic:!t.startsWith("_"),complexity:_(r),decorators:a,genericParams:[],startLine:e.startPosition.row+1,endLine:e.endPosition.row+1}})}function q(s){if(!s)return[];let e=[];for(let t=0;t<s.childCount;t++){let n=s.child(t);if(n.type==="identifier"){let i=n.text;if(i==="self"||i==="cls")continue;e.push({name:i,type:void 0,isOptional:!1,defaultValue:void 0})}else if(n.type==="typed_parameter"){let i=n.child(0)?.text??"";if(i==="self"||i==="cls")continue;let r=n.childForFieldName("type")?.text?.trim();e.push({name:i,type:r||void 0,isOptional:!1,defaultValue:void 0})}else if(n.type==="default_parameter"||n.type==="typed_default_parameter"){let i=n.childForFieldName("name")?.text??n.child(0)?.text??"";if(i==="self"||i==="cls")continue;let r=n.childForFieldName("type")?.text?.trim(),o=n.childForFieldName("value")?.text?.trim();e.push({name:i,type:r||void 0,isOptional:!0,defaultValue:o||void 0})}else if(n.type==="list_splat_pattern"||n.type==="dictionary_splat_pattern"){let i=n.text;e.push({name:i,type:void 0,isOptional:!0,defaultValue:void 0})}}return e}function E(s){let e=[],t=s.parent;if(!t)return e;if(t.type==="decorated_definition")for(let n=0;n<t.childCount;n++){let i=t.child(n);i.type==="decorator"&&e.push(i.text.trim())}return e}function z(s){return s.map(e=>{let t=e.childForFieldName("name")?.text??"",n=e.childForFieldName("body"),i=e.childForFieldName("superclasses"),r=[];if(i)for(let l=0;l<i.childCount;l++){let d=i.child(l);d.isNamed&&r.push(d.text)}let o=n?y(n,["function_definition"],2):[],a=O(o),c=E(e);return{name:t,methods:a,properties:S(n,"python"),isPublic:!t.startsWith("_"),implements:[],extends:r[0]||void 0,decorators:c,startLine:e.startPosition.row+1,endLine:e.endPosition.row+1}})}function Q(s){return s.map(e=>{if(e.type==="import_from_statement"){let n=e.childForFieldName("module_name")?.text??"",i=[];for(let r=0;r<e.childCount;r++){let o=e.child(r);e.fieldNameForChild(r)==="name"&&o.isNamed&&i.push(o.text)}return{module:n,namedImports:i,isTypeOnly:!1}}return{module:e.childForFieldName("name")?.text??"",namedImports:[],isTypeOnly:!1}})}function C(s){return s.map(e=>{let t=e.childForFieldName("name")?.text??"",n=e.childForFieldName("type"),i=e.childForFieldName("parameters"),r=e.childForFieldName("body"),a=h(e).some(d=>d.includes("public")),c=n?.text?.includes("CompletableFuture")??!1,l=k(e);return{name:t,parameters:H(i),returnType:n?.text==="void"?void 0:n?.text?.trim(),isAsync:c,isPublic:a,complexity:_(r),decorators:l,genericParams:[],startLine:e.startPosition.row+1,endLine:e.endPosition.row+1}})}function H(s){if(!s)return[];let e=[];for(let t=0;t<s.childCount;t++){let n=s.child(t);if(n.type==="formal_parameter"||n.type==="spread_parameter"){let i=n.childForFieldName("name")?.text??"",r=n.childForFieldName("type")?.text?.trim();e.push({name:i,type:r||void 0,isOptional:!1,defaultValue:void 0})}}return e}function k(s){let e=[];for(let t=0;t<s.childCount;t++){let n=s.child(t);if(n.type==="modifiers")for(let i=0;i<n.childCount;i++){let r=n.child(i);(r.type==="marker_annotation"||r.type==="annotation")&&e.push(r.text.trim())}}return e}function K(s){return s.map(e=>{let t=e.childForFieldName("name")?.text??"",n=e.childForFieldName("body"),r=h(e).some(p=>p.includes("public")),o=e.childForFieldName("superclass")?.text,a=e.childForFieldName("interfaces"),c=[];if(a)for(let p=0;p<a.childCount;p++){let f=a.child(p);f.isNamed&&c.push(f.text)}let l=n?u(n,["method_declaration","constructor_declaration"]):[],d=C(l),m=k(e);return{name:t,methods:d,properties:S(n,"java"),isPublic:r,implements:c,extends:o||void 0,decorators:m,startLine:e.startPosition.row+1,endLine:e.endPosition.row+1}})}function Z(s){return s.map(e=>{let t=e.text.replace(/^\s*import\s+(static\s+)?/,"").replace(/;\s*$/,"").trim(),n=t.split("."),i=n[n.length-1];return{module:t,namedImports:i==="*"?[]:[i],isTypeOnly:!1}})}function ee(s){return y(s,["method_declaration","constructor_declaration"]).map(t=>{let n=t.childForFieldName("name")?.text??"",i=t.childForFieldName("type"),r=t.childForFieldName("parameters"),o=h(t),a=o.some(d=>d.includes("public")),c=o.some(d=>d.includes("async"))||i?.text?.includes("Task")||!1,l=W(t);return{name:n,parameters:te(r),returnType:i?.text==="void"?void 0:i?.text?.trim(),isAsync:c,isPublic:a,complexity:_(t.childForFieldName("body")),decorators:l,genericParams:[],startLine:t.startPosition.row+1,endLine:t.endPosition.row+1}})}function te(s){if(!s)return[];let e=[];for(let t=0;t<s.childCount;t++){let n=s.child(t);if(n.type==="parameter"){let i=n.childForFieldName("name")?.text??"",r=n.childForFieldName("type")?.text?.trim();e.push({name:i,type:r||void 0,isOptional:r?.endsWith("?")||!1,defaultValue:void 0})}}return e}function W(s){let e=[];for(let t=0;t<s.childCount;t++){let n=s.child(t);n.type==="attribute_list"&&e.push(n.text.trim())}return e}function ne(s){return y(s,["class_declaration","interface_declaration"]).map(t=>{let n=t.childForFieldName("name")?.text??"",i=t.childForFieldName("body"),o=h(t).some(p=>p.includes("public")),a=t.childForFieldName("bases"),c=[];if(a)for(let p=0;p<a.childCount;p++){let f=a.child(p);f.isNamed&&c.push(f.text)}let l=i?u(i,["method_declaration","constructor_declaration"]):[],d=C(l),m=W(t);return{name:n,methods:d,properties:S(i,"csharp"),isPublic:o,implements:c.slice(1),extends:c[0]||void 0,decorators:m,startLine:t.startPosition.row+1,endLine:t.endPosition.row+1}})}function ie(s){return y(s,["using_directive"]).map(t=>({module:t.text.replace(/^\s*using\s+(static\s+)?/,"").replace(/;\s*$/,"").trim(),namedImports:[],isTypeOnly:!1}))}function se(s,e){let t=[],n=u(s,e.nodeTypes.functionDecl);if(t.push(...n.map(D)),e.nodeTypes.implBlock){let i=u(s,[e.nodeTypes.implBlock]);for(let r of i){let o=r.childForFieldName("body");if(o){let a=u(o,e.nodeTypes.functionDecl);t.push(...a.map(D))}}}return t}function D(s){let e=s.childForFieldName("name")?.text??"",t=s.childForFieldName("parameters"),n=s.childForFieldName("return_type"),i=s.childForFieldName("body"),r=I(s,"pub"),o=s.text.trimStart().startsWith("pub async")||s.text.trimStart().startsWith("async"),a=M(s);return{name:e,parameters:re(t),returnType:n?.text?.trim()||void 0,isAsync:o,isPublic:r,complexity:_(i),decorators:a,genericParams:[],startLine:s.startPosition.row+1,endLine:s.endPosition.row+1}}function re(s){if(!s)return[];let e=[];for(let t=0;t<s.childCount;t++){let n=s.child(t);if(n.type==="parameter"){let i=n.childForFieldName("pattern"),r=n.childForFieldName("type"),o=i?.text??"",a=r?.text?.trim();e.push({name:o,type:a||void 0,isOptional:!1,defaultValue:void 0})}else if(n.type==="self_parameter")continue}return e}function M(s){let e=[],t=s.previousNamedSibling;for(;t&&t.type==="attribute_item";)e.unshift(t.text.trim()),t=t.previousNamedSibling;return e}function oe(s){let e=[],t=u(s,["struct_item","enum_item","trait_item"]);for(let n of t){let i=n.childForFieldName("name")?.text??"",r=I(n,"pub"),o=M(n),a=n.childForFieldName("body");e.push({name:i,methods:[],properties:S(a,"rust"),isPublic:r,implements:[],extends:void 0,decorators:o,startLine:n.startPosition.row+1,endLine:n.endPosition.row+1})}return e}function ae(s){return u(s,["use_declaration"]).map(t=>({module:t.childForFieldName("argument")?.text??t.text.replace(/^\s*use\s+/,"").replace(/;\s*$/,"").trim(),namedImports:[],isTypeOnly:!1}))}function j(s){return s.map(e=>{let t="",n=[],i,r=T(e),o=r.includes("public")||r.includes("open"),a=!1;for(let l=0;l<e.childCount;l++){let d=e.child(l);e.fieldNameForChild(l)==="name"&&(d.type==="simple_identifier"?t=d.text:t||(i=d.text)),d.type==="parameter"&&n.push(d),(d.type==="async"||d.text==="async")&&(a=!0)}if(!t){for(let l=0;l<e.childCount;l++)if(e.child(l).type==="simple_identifier"){t=e.child(l).text;break}}let c=null;for(let l=0;l<e.childCount;l++)if(e.child(l).type==="function_body"){c=e.child(l);break}return{name:t,parameters:ce(n),returnType:i,isAsync:a,isPublic:o,complexity:_(c),decorators:[],genericParams:[],startLine:e.startPosition.row+1,endLine:e.endPosition.row+1}})}function T(s){let e=[];for(let t=0;t<s.childCount;t++){let n=s.child(t);if(n.type==="modifiers")for(let i=0;i<n.childCount;i++)e.push(n.child(i).text.trim())}return e}function ce(s){return s.map(e=>{let n=e.text.split(":"),i=n[0]?.trim().split(/\s+/)??[],r=i[i.length-1]||"",o=n.slice(1).join(":").trim()||void 0;return{name:r,type:o,isOptional:o?.endsWith("?")||!1,defaultValue:void 0}})}function le(s){return u(s,["class_declaration","struct_declaration","protocol_declaration"]).map(n=>{let i=n.childForFieldName("name"),r=i?.text??"",o=T(n),a=o.includes("public")||o.includes("open"),c=[];for(let p=0;p<n.childCount;p++){let f=n.child(p);f.type==="type_identifier"&&f!==i&&c.push(f.text),(f.type==="inheritance_specifier"||f.type==="user_type")&&c.push(f.text)}let l=n.childForFieldName("body"),d=l?y(l,["function_declaration"],2):[],m=j(d);return{name:r,methods:m,properties:S(l,"swift"),isPublic:a,implements:c.slice(1),extends:c[0]||void 0,decorators:[],startLine:n.startPosition.row+1,endLine:n.endPosition.row+1}})}function de(s){return u(s,["import_declaration"]).map(t=>{let n="";for(let i=0;i<t.childCount;i++){let r=t.child(i);(r.type==="identifier"||r.type==="simple_identifier")&&(n=r.text)}return{module:n,namedImports:[],isTypeOnly:!1}})}var v=class{language;supportedExtensions;constructor(e,t){this.language=e,this.supportedExtensions=t}async parseFile(e,t){let n=await J(this.language),i=new g;i.setLanguage(n);let r=i.parse(e),o=r.rootNode;try{return{...this.extractFromAST(o),language:this.language,filePath:t}}finally{r.delete(),i.delete()}}extractFromAST(e){let t=R[this.language];switch(this.language){case"python":{let n=u(e,t.nodeTypes.functionDecl),i=u(e,["decorated_definition"]).map(d=>{for(let m=0;m<d.childCount;m++)if(t.nodeTypes.functionDecl.includes(d.child(m).type))return d.child(m);return null}).filter(Boolean),r=[...n,...i],o=u(e,t.nodeTypes.classDecl),a=u(e,["decorated_definition"]).map(d=>{for(let m=0;m<d.childCount;m++)if(t.nodeTypes.classDecl.includes(d.child(m).type))return d.child(m);return null}).filter(Boolean),c=[...o,...a],l=u(e,t.nodeTypes.importDecl);return{functions:O(r),classes:z(c),imports:Q(l)}}case"java":{let n=y(e,t.nodeTypes.classDecl),i=u(e,t.nodeTypes.importDecl),o=[...u(e,t.nodeTypes.functionDecl)];for(let a of n){let c=a.childForFieldName("body");c&&o.push(...u(c,t.nodeTypes.functionDecl))}return{functions:C(o),classes:K(n),imports:Z(i)}}case"csharp":return{functions:ee(e),classes:ne(e),imports:ie(e)};case"rust":return{functions:se(e,t),classes:oe(e),imports:ae(e)};case"swift":{let n=y(e,t.nodeTypes.functionDecl);return{functions:j(n),classes:le(e),imports:de(e)}}default:return{functions:[],classes:[],imports:[]}}}},ue={python:[".py"],java:[".java"],csharp:[".cs"],rust:[".rs"],swift:[".swift"]};function ye(){let s=new Map;for(let[e,t]of Object.entries(ue))s.set(e,new v(e,t));return s}function he(){if(process.env.AQE_PARSER_REGEX_ONLY==="1"||process.env.AQE_PARSER_REGEX_ONLY==="true")return!1;try{let{createRequire:s}=G;return s(import.meta.url).resolve("web-tree-sitter"),A("tree-sitter-python.wasm"),!0}catch{return!1}}function xe(){g=null,N=null,x=0,w.clear()}export{v as TreeSitterWASMParser,xe as _resetWasmState,ye as createWasmParsers,he as isWasmAvailable};
@@ -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.9.4");process.exit(0)}
2
- import{a,b,c,d,e,f,g}from"./chunk-JMBUIVVE.js";import"./chunk-C2HGOUEB.js";export{e as BudgetExceededError,f as ComplexityAnalysisError,b as DEFAULT_BUDGET_CONFIG,c as DEFAULT_ROUTER_CONFIG,d as ModelRouterError,g as RoutingTimeoutError,a as TIER_METADATA};
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.9.6");process.exit(0)}
2
+ import{a,b,c,d,e,f,g}from"./chunk-V3D6AA2P.js";import"./chunk-N5CEEWWJ.js";export{e as BudgetExceededError,f as ComplexityAnalysisError,b as DEFAULT_BUDGET_CONFIG,c as DEFAULT_ROUTER_CONFIG,d as ModelRouterError,g as RoutingTimeoutError,a as TIER_METADATA};
@@ -0,0 +1,2 @@
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.6");process.exit(0)}
2
+ import{a,b,e as f,f as g,g as h,h as i,i as j,j as k,k as l,l as m,m as n,o}from"./chunk-SQCNABS4.js";import"./chunk-YV34KLBV.js";import"./chunk-MA7OLK56.js";import"./chunk-BHOJLQLF.js";import"./chunk-MROCXAXJ.js";import"./chunk-Z5IOTEQI.js";import"./chunk-CU3LGMOK.js";import"./chunk-775KESYW.js";import{a as c,d,e}from"./chunk-5AXU6KCI.js";import"./chunk-YQ7X6LKA.js";import"./chunk-5CKG46BM.js";import"./chunk-EJSRKZ5M.js";import"./chunk-SYYGXU7I.js";import"./chunk-V2IUGAJ7.js";import"./chunk-NSRIYP76.js";import"./chunk-N5CEEWWJ.js";o();export{a as ALLOWED_TABLE_NAMES,c as BinaryHeap,i as DEFAULT_UNIFIED_MEMORY_CONFIG,d as UnifiedHnswIndex,k as UnifiedMemoryManager,f as clearProjectRootCache,e as createHnswIndex,g as findProjectRoot,h as getDefaultDbPath,j as getResolvedDefaultConfig,l as getUnifiedMemory,m as initializeUnifiedMemory,n as resetUnifiedMemory,b as validateTableName};
@@ -0,0 +1,2 @@
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.6");process.exit(0)}
2
+ import{a,b,c,d,e,f}from"./chunk-5AXU6KCI.js";import"./chunk-YQ7X6LKA.js";import"./chunk-5CKG46BM.js";import"./chunk-EJSRKZ5M.js";import"./chunk-SYYGXU7I.js";import"./chunk-V2IUGAJ7.js";import"./chunk-NSRIYP76.js";import"./chunk-N5CEEWWJ.js";f();export{a as BinaryHeap,b as InMemoryHNSWIndex,c as RuvectorFlatIndex,d as UnifiedHnswIndex,e as createHnswIndex};
@@ -0,0 +1,2 @@
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.6");process.exit(0)}
2
+ import{a,b,c,d,e}from"./chunk-C723FDLL.js";import"./chunk-SQCNABS4.js";import"./chunk-YV34KLBV.js";import"./chunk-MA7OLK56.js";import"./chunk-BHOJLQLF.js";import"./chunk-MROCXAXJ.js";import"./chunk-Z5IOTEQI.js";import"./chunk-CU3LGMOK.js";import"./chunk-775KESYW.js";import"./chunk-5AXU6KCI.js";import"./chunk-YQ7X6LKA.js";import"./chunk-5CKG46BM.js";import"./chunk-EJSRKZ5M.js";import"./chunk-SYYGXU7I.js";import"./chunk-V2IUGAJ7.js";import"./chunk-NSRIYP76.js";import"./chunk-N5CEEWWJ.js";export{a as DEFAULT_UNIFIED_CONFIG,b as UnifiedPersistenceManager,c as getUnifiedPersistence,d as initializeUnifiedPersistence,e as resetUnifiedPersistence};
@@ -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.9.4");process.exit(0)}
2
- import{e as P}from"./chunk-GVFHRHXC.js";import"./chunk-7ST2YENJ.js";import{a as V}from"./chunk-DHJJJ24V.js";import"./chunk-TNWTQWLL.js";import"./chunk-MDFXPCBO.js";import"./chunk-RPYUKEAH.js";import{b as v,d as F}from"./chunk-4GJAYXB7.js";import"./chunk-F6AU2MAZ.js";import"./chunk-P3EOWBME.js";import"./chunk-C2HGOUEB.js";F();import{Command as M}from"commander";import{readFileSync as A,writeFileSync as S,existsSync as C,readdirSync as O,statSync as B}from"fs";import{join as b,resolve as j,basename as I}from"path";import e from"chalk";function R(i){let n=j(i);if(!C(n))throw new Error(`Input path not found: ${n}`);if(B(n).isDirectory()){let r=[],t=O(n).filter(o=>o.endsWith(".json")).map(o=>b(n,o));for(let o of t)try{let u=v(A(o,"utf-8"));if($(u))r.push(u);else if(Array.isArray(u))for(let d of u)$(d)&&r.push(d)}catch{console.warn(e.yellow(`Warning: Could not parse ${I(o)}`))}return r}else{let r=v(A(n,"utf-8"));if($(r))return[r];if(Array.isArray(r))return r.filter($);throw new Error("Invalid input format. Expected ParallelValidationRunResult or array of results.")}}function $(i){return typeof i=="object"&&i!==null&&"runId"in i&&"model"in i&&"outcomes"in i&&Array.isArray(i.outcomes)}function D(){return V({storeQEPattern:async()=>{},searchQEPatterns:async()=>({success:!0,value:[]}),addFact:async()=>({success:!0,value:void 0}),query:async()=>({success:!0,value:{results:[],confidence:0}}),getStats:()=>({totalPatterns:0,totalFacts:0,indexHealth:1,lastCompaction:new Date})})}function T(){let i=process.cwd(),n=[b(i,".claude/skills/trust-tier-manifest.json"),b(i,".claude/skills/skills-manifest.json")];for(let g of n)if(C(g))return g;return b(i,".claude/skills/trust-tier-manifest.json")}function L(i,n,g){let r=g.format||"markdown";if(r==="markdown"||r==="both"){let t=n.generateMarkdownReport(i);if(g.output){let o=r==="both"?g.output.replace(/\.\w+$/,".md"):g.output;S(o,t),console.log(e.green(`Markdown report written to: ${o}`))}else console.log(`
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.9.6");process.exit(0)}
2
+ import{e as P}from"./chunk-QWVILMUX.js";import"./chunk-2FTTRGRS.js";import{a as V}from"./chunk-XOTBE543.js";import"./chunk-H7OP3RI2.js";import"./chunk-MA7OLK56.js";import"./chunk-BHOJLQLF.js";import{b as v,d as F}from"./chunk-MROCXAXJ.js";import"./chunk-Z5IOTEQI.js";import"./chunk-YQ7X6LKA.js";import"./chunk-N5CEEWWJ.js";F();import{Command as M}from"commander";import{readFileSync as A,writeFileSync as S,existsSync as C,readdirSync as O,statSync as B}from"fs";import{join as b,resolve as j,basename as I}from"path";import e from"chalk";function R(i){let n=j(i);if(!C(n))throw new Error(`Input path not found: ${n}`);if(B(n).isDirectory()){let r=[],t=O(n).filter(o=>o.endsWith(".json")).map(o=>b(n,o));for(let o of t)try{let u=v(A(o,"utf-8"));if($(u))r.push(u);else if(Array.isArray(u))for(let d of u)$(d)&&r.push(d)}catch{console.warn(e.yellow(`Warning: Could not parse ${I(o)}`))}return r}else{let r=v(A(n,"utf-8"));if($(r))return[r];if(Array.isArray(r))return r.filter($);throw new Error("Invalid input format. Expected ParallelValidationRunResult or array of results.")}}function $(i){return typeof i=="object"&&i!==null&&"runId"in i&&"model"in i&&"outcomes"in i&&Array.isArray(i.outcomes)}function D(){return V({storeQEPattern:async()=>{},searchQEPatterns:async()=>({success:!0,value:[]}),addFact:async()=>({success:!0,value:void 0}),query:async()=>({success:!0,value:{results:[],confidence:0}}),getStats:()=>({totalPatterns:0,totalFacts:0,indexHealth:1,lastCompaction:new Date})})}function T(){let i=process.cwd(),n=[b(i,".claude/skills/trust-tier-manifest.json"),b(i,".claude/skills/skills-manifest.json")];for(let g of n)if(C(g))return g;return b(i,".claude/skills/trust-tier-manifest.json")}function L(i,n,g){let r=g.format||"markdown";if(r==="markdown"||r==="both"){let t=n.generateMarkdownReport(i);if(g.output){let o=r==="both"?g.output.replace(/\.\w+$/,".md"):g.output;S(o,t),console.log(e.green(`Markdown report written to: ${o}`))}else console.log(`
3
3
  `+t)}if(r==="json"||r==="both"){let t=n.generateJsonReport(i);if(g.output){let o=r==="both"?g.output.replace(/\.\w+$/,".json"):g.output;S(o,t),console.log(e.green(`JSON report written to: ${o}`))}else console.log(`
4
4
  `+t)}}function G(i,n,g){let r=new M("skill").description("Skill validation and reporting (ADR-056)");return r.command("report").description("Generate aggregated report from validation results").requiredOption("-i, --input <path>","Input file or directory containing validation results").option("-o, --output <path>","Output file path (default: stdout)").option("-f, --format <format>","Output format: markdown, json, or both","markdown").option("-b, --baseline <path>","Baseline directory for regression detection").option("--detect-regressions","Enable regression detection against historical data").option("--update-manifest","Update trust tier manifest with new pass rates").option("-t, --threshold <number>","Regression threshold (0-1)",parseFloat).option("-v, --verbose","Verbose output").action(async t=>{try{t.verbose&&(console.log(e.blue(`
5
5
  Validation Result Aggregator`)),console.log(e.gray(`ADR-056 Phase 5
@@ -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.9.4");process.exit(0)}
2
- import{a as h}from"./chunk-MGRE767N.js";import{a as i,b as v,c as d,d as p}from"./chunk-GVFHRHXC.js";import"./chunk-7ST2YENJ.js";import{a as k}from"./chunk-DHJJJ24V.js";import"./chunk-7EL65Y27.js";import"./chunk-TNWTQWLL.js";import"./chunk-ZKWNZ3ZK.js";import"./chunk-4TZTGYBQ.js";import"./chunk-HKTNFHWI.js";import"./chunk-UJLSCJJS.js";import"./chunk-RRQEIGLS.js";import"./chunk-3RHIPCBG.js";import"./chunk-G6RTCJFY.js";import"./chunk-7ZXNJT4Q.js";import"./chunk-WHT46PJM.js";import"./chunk-MDFXPCBO.js";import"./chunk-RPYUKEAH.js";import"./chunk-4GJAYXB7.js";import"./chunk-VBYREHZI.js";import"./chunk-F6AU2MAZ.js";import"./chunk-G72E5DL3.js";import"./chunk-RN3SN4ZC.js";import"./chunk-XB5HXTL4.js";import"./chunk-ZQSEPDIJ.js";import"./chunk-P3EOWBME.js";import"./chunk-KELYPHMV.js";import"./chunk-Q2ZYUIS2.js";import"./chunk-OZC42UMD.js";import"./chunk-RE6XD6RI.js";import"./chunk-MN2MYLVW.js";import"./chunk-C2HGOUEB.js";import{Command as x}from"commander";import o from"chalk";function _(e,t,a){let c=new x("validate").description("Validation commands for skills and agents");return c.command("swarm").description("Validate skills in parallel using Claude Flow swarms (ADR-056)").option("-s, --skills <skills>",'Comma-separated list of skills to validate, or "all" for P0 skills',"all").option("-m, --models <models>","Comma-separated list of models to validate against",p.join(",")).option("-t, --topology <topology>","Swarm topology: hierarchical or mesh","hierarchical").option("--max-concurrent <number>","Maximum concurrent skill validations",String(i.maxConcurrentSkills)).option("--max-models <number>","Maximum concurrent models per skill",String(i.maxConcurrentModels)).option("--timeout <ms>","Timeout per validation in milliseconds",String(i.timeout)).option("--no-retry","Disable retries on failure").option("-v, --verbose","Show detailed output").option("--json","Output results as JSON").action(async l=>{if(await a())try{console.log(o.blue(`
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.6");process.exit(0)}
2
+ import{a as h}from"./chunk-TSZ6VMCF.js";import{a as i,b as v,c as d,d as p}from"./chunk-QWVILMUX.js";import"./chunk-2FTTRGRS.js";import{a as k}from"./chunk-XOTBE543.js";import"./chunk-3U3NUFII.js";import"./chunk-H7OP3RI2.js";import"./chunk-WOR67NKR.js";import"./chunk-MV52OH7P.js";import"./chunk-L6HQVZQL.js";import"./chunk-H4J456F2.js";import"./chunk-MX3ORXM3.js";import"./chunk-VMDSTKVR.js";import"./chunk-SQCNABS4.js";import"./chunk-YV34KLBV.js";import"./chunk-7EDVNITA.js";import"./chunk-MA7OLK56.js";import"./chunk-BHOJLQLF.js";import"./chunk-MROCXAXJ.js";import"./chunk-KI4W6CVC.js";import"./chunk-Z5IOTEQI.js";import"./chunk-3VBPPW7H.js";import"./chunk-CU3LGMOK.js";import"./chunk-775KESYW.js";import"./chunk-5AXU6KCI.js";import"./chunk-YQ7X6LKA.js";import"./chunk-5CKG46BM.js";import"./chunk-EJSRKZ5M.js";import"./chunk-SYYGXU7I.js";import"./chunk-V2IUGAJ7.js";import"./chunk-NSRIYP76.js";import"./chunk-N5CEEWWJ.js";import{Command as x}from"commander";import o from"chalk";function _(e,t,a){let c=new x("validate").description("Validation commands for skills and agents");return c.command("swarm").description("Validate skills in parallel using Claude Flow swarms (ADR-056)").option("-s, --skills <skills>",'Comma-separated list of skills to validate, or "all" for P0 skills',"all").option("-m, --models <models>","Comma-separated list of models to validate against",p.join(",")).option("-t, --topology <topology>","Swarm topology: hierarchical or mesh","hierarchical").option("--max-concurrent <number>","Maximum concurrent skill validations",String(i.maxConcurrentSkills)).option("--max-models <number>","Maximum concurrent models per skill",String(i.maxConcurrentModels)).option("--timeout <ms>","Timeout per validation in milliseconds",String(i.timeout)).option("--no-retry","Disable retries on failure").option("-v, --verbose","Show detailed output").option("--json","Output results as JSON").action(async l=>{if(await a())try{console.log(o.blue(`
3
3
  Swarm Skill Validation
4
4
  `));let r=l.skills==="all"?[...d]:l.skills.split(",").map(y=>y.trim()),u=l.models.split(",").map(y=>y.trim()),g=P(l.topology),n={topology:g,maxConcurrentSkills:parseInt(l.maxConcurrent,10)||i.maxConcurrentSkills,maxConcurrentModels:parseInt(l.maxModels,10)||i.maxConcurrentModels,timeout:parseInt(l.timeout,10)||i.timeout,continueOnFailure:!0,retry:l.retry!==!1?i.retry:void 0};l.verbose&&(console.log(o.gray("Configuration:")),console.log(o.gray(` Topology: ${n.topology}`)),console.log(o.gray(` Skills: ${r.length}`)),console.log(o.gray(` Models: ${u.length}`)),console.log(o.gray(` Max Concurrent Skills: ${n.maxConcurrentSkills}`)),console.log(o.gray(` Max Concurrent Models: ${n.maxConcurrentModels}`)),console.log(o.gray(` Timeout: ${n.timeout}ms`)),console.log(o.gray(` Retry: ${n.retry?"enabled":"disabled"}`)),console.log("")),console.log(o.cyan(` Skills: ${r.join(", ")}`)),console.log(o.cyan(` Models: ${u.join(", ")}`)),console.log(o.cyan(` Topology: ${g}`)),console.log("");let m=await R(e),f=k(m),C=v(n,f),w=Date.now();console.log(o.yellow(` Starting parallel validation...
5
5
  `));let $=await C.validateSkillsParallel(r,u),s=C.getSummary($),b=Date.now()-w;l.json?T(s):V(s,l.verbose),console.log(o.blue(`
@@ -1,2 +1,2 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.4");process.exit(0)}
2
- import{c as t}from"./chunk-C2HGOUEB.js";import{createRequire as o}from"module";var i,e,a,c,l,p,s,m,u,d,A,f,h,_,b,v,L,n=t(()=>{i=o(import.meta.url),e=i("vibium"),a=e,{RuvectorLayer:c,TensorCompress:l,differentiableSearch:p,hierarchicalForward:s,getCompressionLevel:m,init:u,FlashAttention:d,DotProductAttention:A,MultiHeadAttention:f,HyperbolicAttention:h,LinearAttention:_,MoEAttention:b,SonaEngine:v,pipeline:L}=e||{}});n();export{A as DotProductAttention,d as FlashAttention,h as HyperbolicAttention,_ as LinearAttention,b as MoEAttention,f as MultiHeadAttention,c as RuvectorLayer,v as SonaEngine,l as TensorCompress,a as default,p as differentiableSearch,m as getCompressionLevel,s as hierarchicalForward,u as init,L as pipeline};
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.6");process.exit(0)}
2
+ import{c as t}from"./chunk-N5CEEWWJ.js";import{createRequire as o}from"module";var i,e,a,c,l,p,s,m,u,d,A,f,h,_,b,v,L,n=t(()=>{i=o(import.meta.url),e=i("vibium"),a=e,{RuvectorLayer:c,TensorCompress:l,differentiableSearch:p,hierarchicalForward:s,getCompressionLevel:m,init:u,FlashAttention:d,DotProductAttention:A,MultiHeadAttention:f,HyperbolicAttention:h,LinearAttention:_,MoEAttention:b,SonaEngine:v,pipeline:L}=e||{}});n();export{A as DotProductAttention,d as FlashAttention,h as HyperbolicAttention,_ as LinearAttention,b as MoEAttention,f as MultiHeadAttention,c as RuvectorLayer,v as SonaEngine,l as TensorCompress,a as default,p as differentiableSearch,m as getCompressionLevel,s as hierarchicalForward,u as init,L as pipeline};
@@ -0,0 +1,2 @@
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.6");process.exit(0)}
2
+ import{a}from"./chunk-FZ77DJFC.js";import"./chunk-K5RE6ODJ.js";import"./chunk-NPNGSE7X.js";import"./chunk-SQCNABS4.js";import"./chunk-YV34KLBV.js";import"./chunk-MA7OLK56.js";import"./chunk-BHOJLQLF.js";import"./chunk-MROCXAXJ.js";import"./chunk-Z5IOTEQI.js";import"./chunk-3VBPPW7H.js";import"./chunk-CU3LGMOK.js";import"./chunk-775KESYW.js";import"./chunk-5AXU6KCI.js";import"./chunk-YQ7X6LKA.js";import"./chunk-5CKG46BM.js";import"./chunk-EJSRKZ5M.js";import"./chunk-SYYGXU7I.js";import"./chunk-V2IUGAJ7.js";import"./chunk-NSRIYP76.js";import"./chunk-N5CEEWWJ.js";export{a as VisualSecurityTool};
@@ -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.9.4");process.exit(0)}
2
- import"./chunk-C2HGOUEB.js";import{createRequire as t}from"module";var o=t(import.meta.url),e=o("web-tree-sitter"),i=e,{RuvectorLayer:n,TensorCompress:a,differentiableSearch:c,hierarchicalForward:s,getCompressionLevel:l,init:p,FlashAttention:m,DotProductAttention:u,MultiHeadAttention:d,HyperbolicAttention:A,LinearAttention:f,MoEAttention:h,SonaEngine:_,pipeline:b}=e||{};export{u as DotProductAttention,m as FlashAttention,A as HyperbolicAttention,f as LinearAttention,h as MoEAttention,d as MultiHeadAttention,n as RuvectorLayer,_ as SonaEngine,a as TensorCompress,i as default,c as differentiableSearch,l as getCompressionLevel,s as hierarchicalForward,p as init,b as pipeline};
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.6");process.exit(0)}
2
+ import"./chunk-N5CEEWWJ.js";import{createRequire as t}from"module";var o=t(import.meta.url),e=o("web-tree-sitter"),i=e,{RuvectorLayer:n,TensorCompress:a,differentiableSearch:c,hierarchicalForward:s,getCompressionLevel:l,init:p,FlashAttention:m,DotProductAttention:u,MultiHeadAttention:d,HyperbolicAttention:A,LinearAttention:f,MoEAttention:h,SonaEngine:_,pipeline:b}=e||{};export{u as DotProductAttention,m as FlashAttention,A as HyperbolicAttention,f as LinearAttention,h as MoEAttention,d as MultiHeadAttention,n as RuvectorLayer,_ as SonaEngine,a as TensorCompress,i as default,c as differentiableSearch,l as getCompressionLevel,s as hierarchicalForward,p as init,b as pipeline};
@@ -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.9.4");process.exit(0)}
2
- import{b as u}from"./chunk-2JLKOGNU.js";import{a as f,c as h}from"./chunk-F6AU2MAZ.js";import"./chunk-C2HGOUEB.js";h();import{existsSync as i,mkdirSync as d,readFileSync as g,writeFileSync as a}from"fs";import{join as p,dirname as v}from"path";var c=class{projectRoot;overwrite;generator;constructor(e){this.projectRoot=e.projectRoot,this.overwrite=e.overwrite??!1,this.generator=u()}async install(){let e={success:!0,mcpConfigured:!1,rulesInstalled:!1,errors:[],configPath:"",rulesPath:""};try{let t=this.generator.generateMcpConfig("windsurf"),r=p(this.projectRoot,t.path);if(e.configPath=r,!i(r)||this.overwrite){let o=v(r);if(i(o)||d(o,{recursive:!0}),i(r)&&this.overwrite){let m=this.mergeExistingConfig(r,t.content);a(r,m)}else a(r,t.content);e.mcpConfigured=!0}let n=this.generator.generateBehavioralRules("windsurf"),s=p(this.projectRoot,n.path);if(e.rulesPath=s,!i(s)||this.overwrite){if(i(s)&&this.overwrite){let o=this.mergeExistingRules(s,n.content);a(s,o)}else a(s,n.content);e.rulesInstalled=!0}}catch(t){e.success=!1,e.errors.push(`Windsurf installation failed: ${f(t)}`)}return e}mergeExistingConfig(e,t){try{let r=JSON.parse(g(e,"utf-8")),n=JSON.parse(t);return r.mcpServers||(r.mcpServers={}),Object.assign(r.mcpServers,n.mcpServers),JSON.stringify(r,null,2)+`
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.6");process.exit(0)}
2
+ import{b as u}from"./chunk-LZ5LS4LF.js";import{a as f,c as h}from"./chunk-Z5IOTEQI.js";import"./chunk-N5CEEWWJ.js";h();import{existsSync as i,mkdirSync as d,readFileSync as g,writeFileSync as a}from"fs";import{join as p,dirname as v}from"path";var c=class{projectRoot;overwrite;generator;constructor(e){this.projectRoot=e.projectRoot,this.overwrite=e.overwrite??!1,this.generator=u()}async install(){let e={success:!0,mcpConfigured:!1,rulesInstalled:!1,errors:[],configPath:"",rulesPath:""};try{let t=this.generator.generateMcpConfig("windsurf"),r=p(this.projectRoot,t.path);if(e.configPath=r,!i(r)||this.overwrite){let o=v(r);if(i(o)||d(o,{recursive:!0}),i(r)&&this.overwrite){let m=this.mergeExistingConfig(r,t.content);a(r,m)}else a(r,t.content);e.mcpConfigured=!0}let n=this.generator.generateBehavioralRules("windsurf"),s=p(this.projectRoot,n.path);if(e.rulesPath=s,!i(s)||this.overwrite){if(i(s)&&this.overwrite){let o=this.mergeExistingRules(s,n.content);a(s,o)}else a(s,n.content);e.rulesInstalled=!0}}catch(t){e.success=!1,e.errors.push(`Windsurf installation failed: ${f(t)}`)}return e}mergeExistingConfig(e,t){try{let r=JSON.parse(g(e,"utf-8")),n=JSON.parse(t);return r.mcpServers||(r.mcpServers={}),Object.assign(r.mcpServers,n.mcpServers),JSON.stringify(r,null,2)+`
3
3
  `}catch{return t}}mergeExistingRules(e,t){try{let r=g(e,"utf-8");return r.includes("Agentic QE")||r.includes("fleet_init")?r:r.trimEnd()+`
4
4
 
5
5
  ---
@@ -0,0 +1,2 @@
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.6");process.exit(0)}
2
+ import{a,b,c,d,e,f,g,h}from"./chunk-BKCIW3O2.js";import"./chunk-SQCNABS4.js";import"./chunk-YV34KLBV.js";import"./chunk-MA7OLK56.js";import"./chunk-BHOJLQLF.js";import"./chunk-MROCXAXJ.js";import"./chunk-Z5IOTEQI.js";import"./chunk-CU3LGMOK.js";import"./chunk-775KESYW.js";import"./chunk-5AXU6KCI.js";import"./chunk-YQ7X6LKA.js";import"./chunk-5CKG46BM.js";import"./chunk-EJSRKZ5M.js";import"./chunk-SYYGXU7I.js";import"./chunk-V2IUGAJ7.js";import"./chunk-NSRIYP76.js";import"./chunk-N5CEEWWJ.js";export{a as GENESIS_PREV_HASH,f as WitnessChain,h as createWitnessChain,g as getWitnessChain,d as hashWith,e as serializeEntry,b as sha256,c as shake256};
@@ -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.9.4");process.exit(0)}
2
- import{a,b,c,d,e,f,g}from"./chunk-WHT46PJM.js";import"./chunk-MDFXPCBO.js";import"./chunk-RPYUKEAH.js";import"./chunk-MN2MYLVW.js";import"./chunk-C2HGOUEB.js";export{c as PersistentWitnessChain,a as SPRTAccumulator,b as WitnessChain,f as createPersistentWitnessChain,e as createWitnessChain,d as createWitnessChainSQLitePersistence,g as isWitnessChainFeatureEnabled};
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.9.6");process.exit(0)}
2
+ import{a,b,c,d,e,f,g}from"./chunk-7EDVNITA.js";import"./chunk-MA7OLK56.js";import"./chunk-BHOJLQLF.js";import"./chunk-NSRIYP76.js";import"./chunk-N5CEEWWJ.js";export{c as PersistentWitnessChain,a as SPRTAccumulator,b as WitnessChain,f as createPersistentWitnessChain,e as createWitnessChain,d as createWitnessChainSQLitePersistence,g as isWitnessChainFeatureEnabled};
@@ -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.9.4");process.exit(0)}
2
- import"./chunk-4BQTEPAD.js";import{b as $}from"./chunk-Z75DMTMI.js";import{d as R}from"./chunk-U7YC7VCM.js";import{b as k,c as C,d as b}from"./chunk-QPC4STR6.js";import{c as W}from"./chunk-4GJAYXB7.js";import"./chunk-VBYREHZI.js";import"./chunk-F6AU2MAZ.js";import"./chunk-C2HGOUEB.js";import{Command as O}from"commander";import o from"chalk";function P(d,a){let m=d.indexOf("=");return m>0&&(a[d.substring(0,m)]=d.substring(m+1)),a}function x(d,a,m){let y=new O("workflow").description("Manage QE workflows and pipelines (ADR-041)");return y.command("run <file>").description("Execute a QE pipeline from YAML file").option("-w, --watch","Watch execution progress").option("-v, --verbose","Show detailed output").option("--params <json>","Additional parameters as JSON","{}").action(async(t,l)=>{if(!await m())return;let e=await import("fs"),c=(await import("path")).resolve(t);try{console.log(o.blue(`
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.6");process.exit(0)}
2
+ import"./chunk-2DGTT6D2.js";import{b as $}from"./chunk-YI54PU4P.js";import{d as R}from"./chunk-JB3G5ZLL.js";import{b as k,c as C,d as b}from"./chunk-46442R6Q.js";import{c as W}from"./chunk-MROCXAXJ.js";import"./chunk-KI4W6CVC.js";import"./chunk-Z5IOTEQI.js";import"./chunk-N5CEEWWJ.js";import{Command as O}from"commander";import o from"chalk";function P(d,a){let m=d.indexOf("=");return m>0&&(a[d.substring(0,m)]=d.substring(m+1)),a}function x(d,a,m){let y=new O("workflow").description("Manage QE workflows and pipelines (ADR-041)");return y.command("run <file>").description("Execute a QE pipeline from YAML file").option("-w, --watch","Watch execution progress").option("-v, --verbose","Show detailed output").option("--params <json>","Additional parameters as JSON","{}").action(async(t,l)=>{if(!await m())return;let e=await import("fs"),c=(await import("path")).resolve(t);try{console.log(o.blue(`
3
3
  Running workflow from: ${t}
4
4
  `));let s=k(c);if(!s.success||!s.workflow){console.log(o.red("Failed to parse pipeline:"));for(let w of s.errors)console.log(o.red(` ${w}`));await a(1)}let r={...W(l.params,"params")};if(s.pipeline){for(let w of s.pipeline.stages)if(w.params)for(let[S,h]of Object.entries(w.params))r[S]=h}if(!d.workflowOrchestrator.getWorkflow(s.workflow.id)){let w=d.workflowOrchestrator.registerWorkflow(s.workflow);w.success||(console.log(o.red(`Failed to register workflow: ${w.error.message}`)),await a(1))}let n=await d.workflowOrchestrator.executeWorkflow(s.workflow.id,r);if(!n.success){console.log(o.red(`Failed to start workflow: ${n.error.message}`)),await a(1);return}let p=n.value;if(console.log(o.cyan(` Execution ID: ${p}`)),console.log(o.gray(` Workflow: ${s.workflow.name}`)),console.log(o.gray(` Stages: ${s.workflow.steps.length}`)),console.log(""),l.watch){console.log(o.blue(`Workflow Progress:
5
5
  `));let w,S=Date.now();for(;;){let g=d.workflowOrchestrator.getWorkflowStatus(p);if(!g)break;if(!w||w.progress!==g.progress||w.status!==g.status||JSON.stringify(w.currentSteps)!==JSON.stringify(g.currentSteps)){process.stdout.write("\r\x1B[K");let v="\u2588".repeat(Math.floor(g.progress/5))+"\u2591".repeat(20-Math.floor(g.progress/5)),D=g.status==="completed"?o.green:g.status==="failed"?o.red:g.status==="running"?o.yellow:o.gray;console.log(` [${v}] ${g.progress}% - ${D(g.status)}`),g.currentSteps.length>0&&l.verbose&&console.log(o.gray(` Running: ${g.currentSteps.join(", ")}`)),w=g}if(g.status==="completed"||g.status==="failed"||g.status==="cancelled")break;await new Promise(v=>setTimeout(v,500))}let h=d.workflowOrchestrator.getWorkflowStatus(p);if(h){console.log("");let g=h.duration||Date.now()-S;h.status==="completed"?(console.log(o.green("Workflow completed successfully")),console.log(o.gray(` Duration: ${$(g)}`)),console.log(o.gray(` Completed: ${h.completedSteps.length} stages`)),h.skippedSteps.length>0&&console.log(o.yellow(` Skipped: ${h.skippedSteps.length} stages`))):h.status==="failed"?(console.log(o.red("Workflow failed")),console.log(o.red(` Error: ${h.error}`)),console.log(o.gray(` Failed stages: ${h.failedSteps.join(", ")}`))):console.log(o.yellow(`Workflow ${h.status}`))}}else console.log(o.green("Workflow execution started")),console.log(o.gray(` Use 'aqe workflow status ${p}' to check progress`));console.log(""),await a(0)}catch(s){console.error(o.red(`
@@ -35,10 +35,10 @@ Workflow cancelled: ${t}
35
35
  `)):console.log(o.red(`
36
36
  Failed to cancel workflow: ${l.error.message}
37
37
  `)),await a(l.success?0:1)}catch(l){console.error(o.red(`
38
- Failed to cancel workflow:`),l),await a(1)}}),y.command("browser-list").description("List available browser workflow templates").action(async()=>{try{let{BrowserWorkflowTool:t}=await import("./browser-workflow-GUR7RLFP.js"),e=await new t().invoke({});if(e.success&&e.data){console.log(o.blue(`
38
+ Failed to cancel workflow:`),l),await a(1)}}),y.command("browser-list").description("List available browser workflow templates").action(async()=>{try{let{BrowserWorkflowTool:t}=await import("./browser-workflow-K77KPDRF.js"),e=await new t().invoke({});if(e.success&&e.data){console.log(o.blue(`
39
39
  Browser Workflow Templates:
40
40
  `));for(let u of e.data.availableTemplates)console.log(` ${o.cyan(u)}`);console.log("")}else console.log(o.red(`Failed: ${e.error||"Unknown error"}`));await a(0)}catch(t){console.error(o.red(`
41
- Failed:`),t),await a(1)}}),y.command("browser-load [template]").description("Load and validate a browser workflow template or inline YAML").option("--yaml <yaml>","Inline YAML workflow definition").option("-v, --var <key=value>","Variable override (repeatable)",P,{}).option("-F, --format <format>","Output format (text|json)","text").option("-o, --output <path>","Write output to file").action(async(t,l)=>{try{let{BrowserWorkflowTool:e}=await import("./browser-workflow-GUR7RLFP.js"),{writeOutput:u,toJSON:c}=await import("./ci-output-G6QLGL4S.js"),s=new e,f={variables:l.var||{}};if(l.yaml)f.workflowYaml=l.yaml;else if(t)if(t.endsWith(".yaml")||t.endsWith(".yml")){let i=await import("fs"),p=(await import("path")).resolve(t);i.existsSync(p)||(console.log(o.red(`
41
+ Failed:`),t),await a(1)}}),y.command("browser-load [template]").description("Load and validate a browser workflow template or inline YAML").option("--yaml <yaml>","Inline YAML workflow definition").option("-v, --var <key=value>","Variable override (repeatable)",P,{}).option("-F, --format <format>","Output format (text|json)","text").option("-o, --output <path>","Write output to file").action(async(t,l)=>{try{let{BrowserWorkflowTool:e}=await import("./browser-workflow-K77KPDRF.js"),{writeOutput:u,toJSON:c}=await import("./ci-output-C2PAMUXM.js"),s=new e,f={variables:l.var||{}};if(l.yaml)f.workflowYaml=l.yaml;else if(t)if(t.endsWith(".yaml")||t.endsWith(".yml")){let i=await import("fs"),p=(await import("path")).resolve(t);i.existsSync(p)||(console.log(o.red(`
42
42
  File not found: ${p}
43
43
  `)),await a(1)),f.workflowYaml=i.readFileSync(p,"utf-8")}else f.templateName=t;else console.log(o.red(`
44
44
  Provide a template name or --yaml. Use "workflow browser-list" to see templates.
@@ -0,0 +1,2 @@
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.6");process.exit(0)}
2
+ import{a,b,c,d}from"./chunk-6T6TPZCK.js";import"./chunk-QBQ52YUU.js";import"./chunk-SQCNABS4.js";import"./chunk-YV34KLBV.js";import"./chunk-MA7OLK56.js";import"./chunk-BHOJLQLF.js";import"./chunk-MROCXAXJ.js";import"./chunk-KI4W6CVC.js";import"./chunk-Z5IOTEQI.js";import"./chunk-3VBPPW7H.js";import"./chunk-CU3LGMOK.js";import"./chunk-775KESYW.js";import"./chunk-5AXU6KCI.js";import"./chunk-YQ7X6LKA.js";import"./chunk-5CKG46BM.js";import"./chunk-EJSRKZ5M.js";import"./chunk-SYYGXU7I.js";import"./chunk-V2IUGAJ7.js";import"./chunk-NSRIYP76.js";import"./chunk-N5CEEWWJ.js";export{b as DEFAULT_WORKFLOW_CONFIG,a as WorkflowEvents,c as WorkflowOrchestrator,d as createWorkflowOrchestrator};
@@ -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.9.4");process.exit(0)}
2
- import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v as L,w as M,x as N}from"./chunk-LW3DV23G.js";import"./chunk-G6RTCJFY.js";import"./chunk-7ZXNJT4Q.js";import"./chunk-MDFXPCBO.js";import"./chunk-RPYUKEAH.js";import{a as v,b as w,c as x,d as y,e as z,f as A,g as B,h as C,i as D,j as E,k as F,l as G,m as H,n as I,o as J,p as K}from"./chunk-J222JLZ6.js";import"./chunk-4GJAYXB7.js";import"./chunk-F6AU2MAZ.js";import"./chunk-RN3SN4ZC.js";import"./chunk-XB5HXTL4.js";import"./chunk-ZQSEPDIJ.js";import"./chunk-P3EOWBME.js";import"./chunk-KELYPHMV.js";import"./chunk-Q2ZYUIS2.js";import"./chunk-OZC42UMD.js";import"./chunk-RE6XD6RI.js";import"./chunk-MN2MYLVW.js";import"./chunk-C2HGOUEB.js";export{z as GNNLayerFactory,i as QEFlashAttention,x as QEGNNEmbeddingIndex,y as QEGNNIndexFactory,a as QESONA,e as QE_FLASH_ATTENTION_CONFIG,g as QE_PERFORMANCE_TARGETS,f as QE_SONA_CONFIG,A as TensorCompressionFactory,u as batchComputeAttention,K as batchDifferentiableSearch,M as checkRuvectorPackagesAvailable,c as createDomainQESONA,j as createQEFlashAttention,b as createQESONA,D as getDifferentiableSearch,F as getGetCompressionLevel,E as getHierarchicalForward,G as getInit,h as getOptimalBlockConfig,k as getQEFlashAttentionConfig,n as getRuvectorDotProductAttention,m as getRuvectorFlashAttention,p as getRuvectorHyperbolicAttention,B as getRuvectorLayer,q as getRuvectorLinearAttention,r as getRuvectorMoEAttention,o as getRuvectorMultiHeadAttention,L as getRuvectorPackageVersions,C as getTensorCompress,l as getWorkloadTypes,N as initAllRuvectorPackages,w as initGNN,d as isAttentionAvailable,v as isGNNAvailable,s as toFloat32Array,H as toFloat32ArrayGNN,J as toIEmbedding,t as toNumberArrayAttn,I as toNumberArrayGNN};
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.9.6");process.exit(0)}
2
+ import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v as L,w as M,x as N}from"./chunk-5A5ECZCN.js";import"./chunk-SQCNABS4.js";import"./chunk-YV34KLBV.js";import"./chunk-MA7OLK56.js";import"./chunk-BHOJLQLF.js";import{a as v,b as w,c as x,d as y,e as z,f as A,g as B,h as C,i as D,j as E,k as F,l as G,m as H,n as I,o as J,p as K}from"./chunk-LSFJKCAQ.js";import"./chunk-MROCXAXJ.js";import"./chunk-Z5IOTEQI.js";import"./chunk-CU3LGMOK.js";import"./chunk-775KESYW.js";import"./chunk-5AXU6KCI.js";import"./chunk-YQ7X6LKA.js";import"./chunk-5CKG46BM.js";import"./chunk-EJSRKZ5M.js";import"./chunk-SYYGXU7I.js";import"./chunk-V2IUGAJ7.js";import"./chunk-NSRIYP76.js";import"./chunk-N5CEEWWJ.js";export{z as GNNLayerFactory,i as QEFlashAttention,x as QEGNNEmbeddingIndex,y as QEGNNIndexFactory,a as QESONA,e as QE_FLASH_ATTENTION_CONFIG,g as QE_PERFORMANCE_TARGETS,f as QE_SONA_CONFIG,A as TensorCompressionFactory,u as batchComputeAttention,K as batchDifferentiableSearch,M as checkRuvectorPackagesAvailable,c as createDomainQESONA,j as createQEFlashAttention,b as createQESONA,D as getDifferentiableSearch,F as getGetCompressionLevel,E as getHierarchicalForward,G as getInit,h as getOptimalBlockConfig,k as getQEFlashAttentionConfig,n as getRuvectorDotProductAttention,m as getRuvectorFlashAttention,p as getRuvectorHyperbolicAttention,B as getRuvectorLayer,q as getRuvectorLinearAttention,r as getRuvectorMoEAttention,o as getRuvectorMultiHeadAttention,L as getRuvectorPackageVersions,C as getTensorCompress,l as getWorkloadTypes,N as initAllRuvectorPackages,w as initGNN,d as isAttentionAvailable,v as isGNNAvailable,s as toFloat32Array,H as toFloat32ArrayGNN,J as toIEmbedding,t as toNumberArrayAttn,I as toNumberArrayGNN};
@@ -15,7 +15,10 @@ import { HnswAdapter } from '../../kernel/hnsw-adapter.js';
15
15
  // ============================================================================
16
16
  const NATIVE_PACKAGES = [
17
17
  {
18
- name: '@ruvector/router',
18
+ // Migrated from @ruvector/router to hnswlib-node in #399 / ADR-090.
19
+ // hnswlib-node wraps the canonical Hnswlib C++ reference implementation
20
+ // by Yury Malkov (used by Pinecone, Weaviate, Qdrant, LangChain, etc.).
21
+ name: 'hnswlib-node',
19
22
  flag: 'useNativeHNSW',
20
23
  fallback: 'ProgressiveHnswBackend',
21
24
  },
@@ -35,7 +38,7 @@ const FLAG_DESCRIPTIONS = {
35
38
  useQEFlashAttention: 'SIMD-accelerated attention computation',
36
39
  useQEGNNIndex: 'Differentiable search and HNSW indexing',
37
40
  logMigrationMetrics: 'Log migration metrics during rollout',
38
- useNativeHNSW: 'Rust-based HNSW backend (@ruvector/router VectorDb)',
41
+ useNativeHNSW: 'Native HNSW backend (hnswlib-node, C++ Hnswlib reference)',
39
42
  useTemporalCompression: 'Temporal tensor compression (ADR-085)',
40
43
  useMetadataFiltering: 'SIMD-accelerated metadata filtering',
41
44
  useDeterministicDither: 'Cross-platform deterministic dithering',
package/dist/cli/index.js CHANGED
@@ -182,10 +182,11 @@ async function cleanupAndExit(code = 0) {
182
182
  }
183
183
  }
184
184
  catch { /* best effort */ }
185
- // Force exit immediately. Native NAPI handles (@ruvector/rvf-node,
186
- // @ruvector/router) create ref'd event loop handles that prevent
187
- // natural exit, and dynamic import() of cleanup modules can load
188
- // more native bindings that make it worse. Exit now, clean later.
185
+ // Force exit immediately. Native NAPI handles (@ruvector/rvf-node and
186
+ // historically @ruvector/router, replaced by hnswlib-node in #399 /
187
+ // ADR-090) create ref'd event loop handles that prevent natural exit,
188
+ // and dynamic import() of cleanup modules can load more native
189
+ // bindings that make it worse. Exit now, clean later.
189
190
  process.exit(code);
190
191
  }
191
192
  // ============================================================================
@@ -28,6 +28,25 @@ export class DatabasePhase extends BasePhase {
28
28
  requiresPhases = ['configuration'];
29
29
  async run(context) {
30
30
  const { projectRoot } = context;
31
+ // Issue #399 / ADR-090: warn on stale ./vectors.db cruft.
32
+ //
33
+ // Prior to the hnswlib-node migration, NativeHnswBackend wrapped
34
+ // @ruvector/router's VectorDb, whose constructor unconditionally wrote
35
+ // a `vectors.db` redb file to the current working directory — outside
36
+ // .agentic-qe/, in a non-SQLite format, never read by anything in
37
+ // production (its HNSW search returned wrong answers anyway). Users
38
+ // who upgrade from a pre-#399 version will have an orphaned multi-MB
39
+ // file in their project root. We surface it once per `aqe init` so the
40
+ // user can clean up at their convenience. We do NOT delete it
41
+ // automatically — CLAUDE.md data protection rules forbid touching .db
42
+ // files without explicit user confirmation.
43
+ const staleVectorsDb = join(projectRoot, 'vectors.db');
44
+ if (existsSync(staleVectorsDb)) {
45
+ context.services.log(` ⚠ Stale vectors.db detected at ${staleVectorsDb}\n` +
46
+ ` This file is left over from @ruvector/router (pre-v3.9.6).\n` +
47
+ ` It is no longer read or written by AQE. Safe to delete:\n` +
48
+ ` rm "${staleVectorsDb}"`);
49
+ }
31
50
  // Create .agentic-qe directory structure
32
51
  const dataDir = join(projectRoot, '.agentic-qe');
33
52
  if (!existsSync(dataDir)) {
@@ -276,12 +276,15 @@ export class CodeIntelligencePhase extends BasePhase {
276
276
  //
277
277
  // IMPORTANT: This check only fires BETWEEN file iterations. If a
278
278
  // single call to kgService.index() blocks the Node event loop
279
- // inside synchronous native code (e.g. an @ruvector/router
280
- // native insert stalls on a specific vector shape), this check
281
- // never runs and the phase appears to hang past PHASE_TIMEOUT_MS.
282
- // That's the v3.9.3 failure mode observed on ruview. See
283
- // shouldRun() for the v3.9.4 AQE_SKIP_CODE_INDEX escape hatch
284
- // and the tracking issue for the killable-worker proper fix.
279
+ // inside synchronous native code, this check never runs and the
280
+ // phase appears to hang past PHASE_TIMEOUT_MS.
281
+ //
282
+ // The v3.9.3 hang was caused by @ruvector/router's native HNSW
283
+ // insert stalling on certain vector shapes — that path was
284
+ // replaced with hnswlib-node in #399 / ADR-090 and the specific
285
+ // hang no longer reproduces. The between-file timeout check and
286
+ // the AQE_SKIP_CODE_INDEX escape hatch are kept as defense in
287
+ // depth against future native-code stalls.
285
288
  if (Date.now() - startedAt > PHASE_TIMEOUT_MS) {
286
289
  timedOut = true;
287
290
  break;
@@ -191,6 +191,8 @@ try {
191
191
  // the cascade of errors seen in v3.9.1 and v3.9.2:
192
192
  // • RVF error 0x0303: FsyncFailed (child couldn't open patterns.rvf)
193
193
  // • VectorDb creation failed: Database already open
194
+ // (the @ruvector/router lock is gone post #399 / ADR-090, but
195
+ // the RVF lock still exists)
194
196
  // • Error: Could not find MCP server entry point
195
197
  //
196
198
  // The canonical path is .mcp.json (written by phase 08). Claude Code
@@ -53,10 +53,19 @@ export interface RuVectorFeatureFlags {
53
53
  */
54
54
  logMigrationMetrics: boolean;
55
55
  /**
56
- * Enable Native HNSW backend via @ruvector/router VectorDb
57
- * Uses the Rust-based HNSW implementation for higher throughput
58
- * and lower latency vector search. Falls back to ProgressiveHnswBackend
59
- * when the native binary is unavailable or the database lock is held.
56
+ * Enable Native HNSW backend via hnswlib-node (canonical Hnswlib C++).
57
+ *
58
+ * Uses Yury Malkov's Hnswlib reference implementation (the same C++ used
59
+ * by Pinecone, Weaviate, Qdrant, LangChain, ChromaDB) for sublinear
60
+ * approximate nearest-neighbour search. Falls back to ProgressiveHnswBackend
61
+ * when the hnswlib-node native binary is unavailable.
62
+ *
63
+ * History: previously wrapped @ruvector/router's VectorDb. Migrated to
64
+ * hnswlib-node in #399 / ADR-090 after empirical verification revealed
65
+ * four serious bugs in @ruvector/router 0.1.28 (broken HNSW search,
66
+ * CWD pollution via vectors.db, process-wide singleton lock, and an
67
+ * NAPI dispose path that didn't release the file lock).
68
+ *
60
69
  * @default true
61
70
  */
62
71
  useNativeHNSW: boolean;
@@ -357,7 +366,20 @@ export interface RuVectorFeatureFlags {
357
366
  useHyperbolicHnsw: boolean;
358
367
  }
359
368
  /**
360
- * Default feature flags - all enabled by default
369
+ * Default feature flags all enabled by default.
370
+ *
371
+ * useNativeHNSW history:
372
+ * - v3.9.5: flipped to false after the @ruvector/router native binding
373
+ * was found to deadlock on certain inputs (futex contention inside the
374
+ * Rust-side HNSW). The JS ProgressiveHnswBackend was the safe default.
375
+ * - issue #399 (April 2026): empirical verification revealed four bugs in
376
+ * @ruvector/router 0.1.28 — broken HNSW search (recall ~0% on textbook
377
+ * fixtures), CWD pollution via vectors.db, process-wide singleton lock,
378
+ * and unreleased file lock on dispose. NativeHnswBackend was rewritten
379
+ * to wrap hnswlib-node (the canonical Hnswlib reference implementation
380
+ * by Yury Malkov) which fixes all four bugs and gives users with large
381
+ * codebases real sublinear HNSW search. Default flipped back to true.
382
+ * See ADR-090.
361
383
  */
362
384
  declare const DEFAULT_FEATURE_FLAGS: RuVectorFeatureFlags;
363
385
  /**