agentic-qe 3.9.2 → 3.9.3

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 (286) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/dist/cli/bundle.js +5 -5
  3. package/dist/cli/chunks/adapter-WKI55MLS.js +2 -0
  4. package/dist/cli/chunks/{agent-booster-wasm-AKAOHSCX.js → agent-booster-wasm-W6GGSB43.js} +2 -2
  5. package/dist/cli/chunks/{agent-handler-MTGPOUVP.js → agent-handler-3IRN5WBS.js} +2 -2
  6. package/dist/cli/chunks/{agent-memory-branch-UFPKWUFK.js → agent-memory-branch-SO63CIPJ.js} +2 -2
  7. package/dist/cli/chunks/aqe-learning-engine-QQHHH3ZL.js +2 -0
  8. package/dist/cli/chunks/{audit-VBEZHNHO.js → audit-TONGHW5H.js} +2 -2
  9. package/dist/cli/chunks/base-3ENVJTIL.js +2 -0
  10. package/dist/cli/chunks/{better-sqlite3-IRPHIXRU.js → better-sqlite3-OK5DP5FC.js} +2 -2
  11. package/dist/cli/chunks/{brain-handler-7EO3FFRZ.js → brain-handler-MC2S3UHL.js} +3 -3
  12. package/dist/cli/chunks/{branch-enumerator-MZRGP35N.js → branch-enumerator-PRKJKPAE.js} +2 -2
  13. package/dist/cli/chunks/{browser-VSIWQE7J.js → browser-WTMMBSU3.js} +2 -2
  14. package/dist/cli/chunks/browser-workflow-QVT343YP.js +2 -0
  15. package/dist/cli/chunks/{chunk-563PJBDM.js → chunk-2CPNZVGL.js} +2 -2
  16. package/dist/cli/chunks/{chunk-XFMKJ3UD.js → chunk-2GZ4EG3L.js} +1 -1
  17. package/dist/cli/chunks/{chunk-X6LCMOGC.js → chunk-2IU6WK32.js} +2 -2
  18. package/dist/cli/chunks/{chunk-PNL5G6TE.js → chunk-3GMN3PNP.js} +2 -2
  19. package/dist/cli/chunks/{chunk-56IWS2KY.js → chunk-3Q5FG6M3.js} +2 -2
  20. package/dist/cli/chunks/{chunk-WXWY2GAF.js → chunk-53YFAERL.js} +2 -2
  21. package/dist/cli/chunks/{chunk-LMMEUVE5.js → chunk-5B2KXDWF.js} +1 -1
  22. package/dist/cli/chunks/{chunk-TTOE336G.js → chunk-5OL6UOBM.js} +3 -3
  23. package/dist/cli/chunks/{chunk-XH53ARZD.js → chunk-5UMSMRJC.js} +2 -2
  24. package/dist/cli/chunks/{chunk-NRCKGXJJ.js → chunk-5YUNMBIH.js} +1 -1
  25. package/dist/cli/chunks/{chunk-QNBQBSAI.js → chunk-66RCUQCI.js} +2 -2
  26. package/dist/cli/chunks/{chunk-MY4LMIG7.js → chunk-6B4CTO5D.js} +2 -2
  27. package/dist/cli/chunks/{chunk-JOVINE23.js → chunk-6N26CWST.js} +2 -2
  28. package/dist/cli/chunks/{chunk-YXCU4CJX.js → chunk-7ASGPJWU.js} +1 -1
  29. package/dist/cli/chunks/{chunk-2Z2TFEOL.js → chunk-7HTSXZ77.js} +2 -2
  30. package/dist/cli/chunks/{chunk-QIH3E775.js → chunk-7JBIDAXT.js} +2 -2
  31. package/dist/cli/chunks/{chunk-4PKXIBX2.js → chunk-AS5WPUDR.js} +1 -1
  32. package/dist/cli/chunks/{chunk-GITD7SRQ.js → chunk-AWSYGQEB.js} +2 -2
  33. package/dist/cli/chunks/{chunk-AA33R5U4.js → chunk-BK445WWE.js} +2 -2
  34. package/dist/cli/chunks/{chunk-4LA7IW3V.js → chunk-BRCCPQXN.js} +1 -1
  35. package/dist/cli/chunks/{chunk-SRRFWTNF.js → chunk-CF4T4YSL.js} +2 -2
  36. package/dist/cli/chunks/{chunk-AKSJQ6B3.js → chunk-COIFERYS.js} +2 -2
  37. package/dist/cli/chunks/{chunk-N3F3CX4V.js → chunk-CU36MONI.js} +2 -2
  38. package/dist/cli/chunks/{chunk-65M7C6SH.js → chunk-D5AQDGTS.js} +1 -1
  39. package/dist/cli/chunks/{chunk-4D2ZG2QO.js → chunk-D5GIV6O7.js} +1 -1
  40. package/dist/cli/chunks/{chunk-XYJL6DKI.js → chunk-DBEU5ISS.js} +2 -2
  41. package/dist/cli/chunks/{chunk-DNLMZTE2.js → chunk-DBSVEWWL.js} +1 -1
  42. package/dist/cli/chunks/{chunk-5AUKULWO.js → chunk-DGRO6LSI.js} +2 -2
  43. package/dist/cli/chunks/{chunk-KTYUCZEM.js → chunk-DKOOKULB.js} +5 -5
  44. package/dist/cli/chunks/{chunk-V6XBAZNH.js → chunk-DTNXHRUF.js} +1 -1
  45. package/dist/cli/chunks/{chunk-UKDOMLBI.js → chunk-ELU576GE.js} +3 -3
  46. package/dist/cli/chunks/{chunk-NM6TIEJ3.js → chunk-ERWNQ6NC.js} +3 -3
  47. package/dist/cli/chunks/{chunk-E25S5E2D.js → chunk-EVIXQR4O.js} +1 -1
  48. package/dist/cli/chunks/{chunk-7SLN2JGP.js → chunk-EXTVDKH7.js} +3 -3
  49. package/dist/cli/chunks/{chunk-DSE57A5N.js → chunk-F6O5XLIE.js} +1 -1
  50. package/dist/cli/chunks/{chunk-7NOIIC7G.js → chunk-FIQ62VOQ.js} +1 -1
  51. package/dist/cli/chunks/chunk-FONTSK2O.js +2 -0
  52. package/dist/cli/chunks/{chunk-RITN3XR4.js → chunk-FR26EINS.js} +2 -2
  53. package/dist/cli/chunks/{chunk-Y6O7CDLI.js → chunk-FSUS5TV6.js} +2 -2
  54. package/dist/cli/chunks/{chunk-WG4GHAML.js → chunk-GBLX5XOH.js} +2 -2
  55. package/dist/cli/chunks/{chunk-KZUJBZ7B.js → chunk-GGEVILIS.js} +2 -2
  56. package/dist/cli/chunks/{chunk-L5YEPSDU.js → chunk-GGKV5IQR.js} +2 -2
  57. package/dist/cli/chunks/{chunk-BY47GV4T.js → chunk-GGQCAQM4.js} +2 -2
  58. package/dist/cli/chunks/{chunk-2VVV73PW.js → chunk-HJEWQD2B.js} +1 -1
  59. package/dist/cli/chunks/{chunk-VUAO4VFC.js → chunk-HVOOYPW6.js} +2 -2
  60. package/dist/cli/chunks/{chunk-Z54EO6E6.js → chunk-IOW7QTYT.js} +2 -2
  61. package/dist/cli/chunks/{chunk-CQP7ZFME.js → chunk-ITFNPXZL.js} +2 -2
  62. package/dist/cli/chunks/{chunk-25LFUL2K.js → chunk-J7QGH6PG.js} +2 -2
  63. package/dist/cli/chunks/{chunk-KQTJ2YLI.js → chunk-JF6AXXAL.js} +4 -4
  64. package/dist/cli/chunks/{chunk-J4BS6IWE.js → chunk-JI5MNJSU.js} +1 -1
  65. package/dist/cli/chunks/{chunk-4UH25U4O.js → chunk-JTIWAUWW.js} +1 -1
  66. package/dist/cli/chunks/{chunk-X35GP7TR.js → chunk-JXE2DFXM.js} +1 -1
  67. package/dist/cli/chunks/{chunk-L5WZUPZF.js → chunk-JZXSKPQB.js} +2 -2
  68. package/dist/cli/chunks/{chunk-2WBCYSUN.js → chunk-K2DDNM4V.js} +8 -8
  69. package/dist/cli/chunks/{chunk-TKF447CW.js → chunk-KV32LAKU.js} +1 -1
  70. package/dist/cli/chunks/{chunk-GCMVJS5X.js → chunk-LDLLHLKE.js} +2 -2
  71. package/dist/cli/chunks/{chunk-QODE4LM6.js → chunk-LHDR6E6F.js} +2 -2
  72. package/dist/cli/chunks/{chunk-DHE66JRR.js → chunk-LMN72H3V.js} +1 -1
  73. package/dist/cli/chunks/{chunk-GK72GUHA.js → chunk-LQDAH47F.js} +2 -2
  74. package/dist/cli/chunks/{chunk-FRJLP7IB.js → chunk-LRE4A464.js} +2 -2
  75. package/dist/cli/chunks/{chunk-HW4ISY5B.js → chunk-M3EFT3XR.js} +3 -3
  76. package/dist/cli/chunks/chunk-M7PGW5Z5.js +2 -0
  77. package/dist/cli/chunks/{chunk-3GZKAORV.js → chunk-MNZ2HHKI.js} +2 -2
  78. package/dist/cli/chunks/{chunk-KBA7FBK3.js → chunk-MSKVWOND.js} +3 -3
  79. package/dist/cli/chunks/{chunk-RC5CPXON.js → chunk-NZLJWXXM.js} +2 -2
  80. package/dist/cli/chunks/{chunk-RJROC5M3.js → chunk-O2O5RO4H.js} +2 -2
  81. package/dist/cli/chunks/{chunk-6SOJVEU7.js → chunk-OBOCKH47.js} +2 -2
  82. package/dist/cli/chunks/{chunk-DBE34QES.js → chunk-OJKGRB6D.js} +2 -2
  83. package/dist/cli/chunks/{chunk-4DAOZQ3V.js → chunk-OV6H3TRU.js} +2 -2
  84. package/dist/cli/chunks/{chunk-SDTVHR63.js → chunk-OXR2FPHK.js} +2 -2
  85. package/dist/cli/chunks/{chunk-T5GV6UIO.js → chunk-OZNJZMQL.js} +2 -2
  86. package/dist/cli/chunks/{chunk-Q4A72ZTV.js → chunk-P4RYVWIR.js} +2 -2
  87. package/dist/cli/chunks/{chunk-VL7YOOC2.js → chunk-P6OZKWNK.js} +2 -2
  88. package/dist/cli/chunks/{chunk-SGAW2WLI.js → chunk-PD5YPC2A.js} +4 -4
  89. package/dist/cli/chunks/{chunk-BKCTNRC5.js → chunk-PKIBG7OJ.js} +2 -2
  90. package/dist/cli/chunks/{chunk-CQBSGYRA.js → chunk-PRIWFNVU.js} +2 -2
  91. package/dist/cli/chunks/{chunk-RQGYJK7H.js → chunk-PS6KLLLQ.js} +2 -2
  92. package/dist/cli/chunks/{chunk-NJY7ZA77.js → chunk-QAXJOCTW.js} +1 -1
  93. package/dist/cli/chunks/{chunk-PJFLO37I.js → chunk-QB2LOM5O.js} +2 -2
  94. package/dist/cli/chunks/{chunk-SNVM4YJS.js → chunk-RRELDHZY.js} +2 -2
  95. package/dist/cli/chunks/{chunk-VHVWAXCF.js → chunk-S23UV7FV.js} +1 -1
  96. package/dist/cli/chunks/{chunk-KZTO5EVM.js → chunk-SDHZLA45.js} +2 -2
  97. package/dist/cli/chunks/{chunk-5L6AU3QK.js → chunk-SFFI3MDN.js} +2 -2
  98. package/dist/cli/chunks/{chunk-BOH22AKC.js → chunk-SJLDTV5B.js} +2 -2
  99. package/dist/cli/chunks/{chunk-QEQTC4WQ.js → chunk-SVXIAQRW.js} +2 -2
  100. package/dist/cli/chunks/{chunk-CL3K5EJK.js → chunk-T4GTFSB2.js} +2 -2
  101. package/dist/cli/chunks/{chunk-Z5HXGVXZ.js → chunk-T4RR4YMH.js} +1 -1
  102. package/dist/cli/chunks/{chunk-STE42EMB.js → chunk-T5MWENBA.js} +2 -2
  103. package/dist/cli/chunks/{chunk-BIVIPF4O.js → chunk-TA454OEB.js} +1 -1
  104. package/dist/cli/chunks/{chunk-MN742FIH.js → chunk-TPFE3BAI.js} +2 -2
  105. package/dist/cli/chunks/{chunk-CCYMJKWX.js → chunk-TSS6LXJ6.js} +1 -1
  106. package/dist/cli/chunks/{chunk-5RL66XSH.js → chunk-TTEXJW2U.js} +2 -2
  107. package/dist/cli/chunks/{chunk-S3RDH5CI.js → chunk-TUHIFT65.js} +2 -2
  108. package/dist/cli/chunks/{chunk-QPRVX4H2.js → chunk-U6QQS5Z3.js} +2 -2
  109. package/dist/cli/chunks/{chunk-727BDQ3K.js → chunk-UC3RA5LW.js} +2 -2
  110. package/dist/cli/chunks/{chunk-4FT3PND7.js → chunk-UVWKIP3U.js} +3 -3
  111. package/dist/cli/chunks/{chunk-FAXVVLPL.js → chunk-VNSRA5PY.js} +2 -2
  112. package/dist/cli/chunks/{chunk-ICDXWIFZ.js → chunk-WAWCNUIJ.js} +1 -1
  113. package/dist/cli/chunks/{chunk-FUIHWBVF.js → chunk-WDTFG5AG.js} +1 -1
  114. package/dist/cli/chunks/{chunk-2EC5Z2J4.js → chunk-WIY3V5VQ.js} +9 -9
  115. package/dist/cli/chunks/{chunk-PFNFC43Q.js → chunk-WLK5UVRJ.js} +1 -1
  116. package/dist/cli/chunks/{chunk-34U7JDCN.js → chunk-WSVWVIVR.js} +2 -2
  117. package/dist/cli/chunks/{chunk-KDDZYXP4.js → chunk-X5C73DW5.js} +2 -2
  118. package/dist/cli/chunks/{chunk-SCF7NRVE.js → chunk-XJII5WMD.js} +1 -1
  119. package/dist/cli/chunks/{chunk-JV7LX6OT.js → chunk-YTBE2MEW.js} +4 -4
  120. package/dist/cli/chunks/{chunk-GPLERTZU.js → chunk-Z4V3XV7E.js} +2 -2
  121. package/dist/cli/chunks/{chunk-KNVAAVHH.js → chunk-ZMUVSL5Q.js} +2 -2
  122. package/dist/cli/chunks/{chunk-4Z27TRQF.js → chunk-ZQCU62JJ.js} +2 -2
  123. package/dist/cli/chunks/{chunk-4FMHBBG5.js → chunk-ZTIPMKUS.js} +1 -1
  124. package/dist/cli/chunks/{chunk-Z2IKNC5M.js → chunk-ZVMAE5JD.js} +1 -1
  125. package/dist/cli/chunks/{ci-2BCOBWFG.js → ci-XQEZTRJN.js} +2 -2
  126. package/dist/cli/chunks/{ci-output-FB4OJHAC.js → ci-output-ZWGXOIUD.js} +2 -2
  127. package/dist/cli/chunks/{claude-flow-setup-NEEFZTMB.js → claude-flow-setup-PFJFHZSD.js} +2 -2
  128. package/dist/cli/chunks/client-VUKA3X4R.js +2 -0
  129. package/dist/cli/chunks/{cline-installer-ODO2PS4K.js → cline-installer-L3WC4KUM.js} +2 -2
  130. package/dist/cli/chunks/{code-NSOF62VE.js → code-QMDXXY6C.js} +2 -2
  131. package/dist/cli/chunks/{code-index-extractor-YQL5XN52.js → code-index-extractor-YTPMAZPU.js} +2 -2
  132. package/dist/cli/chunks/{codex-installer-SPEY6VYT.js → codex-installer-KO5G7LHQ.js} +2 -2
  133. package/dist/cli/chunks/{completions-OWKBUMBE.js → completions-KVDPIXMY.js} +2 -2
  134. package/dist/cli/chunks/{complexity-analyzer-PGTXKP73.js → complexity-analyzer-KNIBPEC3.js} +2 -2
  135. package/dist/cli/chunks/{continuedev-installer-KGOXAC7L.js → continuedev-installer-N2GWI5PC.js} +2 -2
  136. package/dist/cli/chunks/{copilot-installer-BF3UA3TG.js → copilot-installer-EX3UTDQN.js} +2 -2
  137. package/dist/cli/chunks/{cost-tracker-2HDJ66E2.js → cost-tracker-XX6OMP37.js} +2 -2
  138. package/dist/cli/chunks/{coverage-KPA2PHIN.js → coverage-FHDDNCPO.js} +3 -3
  139. package/dist/cli/chunks/cross-domain-router-5SUV5AP6.js +2 -0
  140. package/dist/cli/chunks/{cursor-installer-7CDZFHTV.js → cursor-installer-M47YCQU7.js} +2 -2
  141. package/dist/cli/chunks/{daemon-4BPGCKDJ.js → daemon-EV3RXWAG.js} +3 -3
  142. package/dist/cli/chunks/{dag-attention-scheduler-2MAVGSBB.js → dag-attention-scheduler-J7JDWG5J.js} +2 -2
  143. package/dist/cli/chunks/{detect-WRPWTGP5.js → detect-4P5RKV5J.js} +2 -2
  144. package/dist/cli/chunks/{domain-handler-JZVSJ7AG.js → domain-handler-Q35TYDGA.js} +2 -2
  145. package/dist/cli/chunks/{domain-transfer-XGIZOR2X.js → domain-transfer-XC34MV5U.js} +2 -2
  146. package/dist/cli/chunks/dream-2UNEPNI2.js +2 -0
  147. package/dist/cli/chunks/esm-node-TPR2KU6L.js +2 -0
  148. package/dist/cli/chunks/{eval-T7YPAS4G.js → eval-QZGRW7XD.js} +2 -2
  149. package/dist/cli/chunks/{fast-paths-QECJTKCQ.js → fast-paths-O42GG56B.js} +2 -2
  150. package/dist/cli/chunks/{feature-flags-LIFURSFZ.js → feature-flags-G6SJTDVO.js} +2 -2
  151. package/dist/cli/chunks/{feature-flags-R4QZYTIW.js → feature-flags-GIGWUPEX.js} +2 -2
  152. package/dist/cli/chunks/{file-discovery-4W3K3W4C.js → file-discovery-D4NXB3JP.js} +2 -2
  153. package/dist/cli/chunks/{fleet-NLLQWCI5.js → fleet-ZXZ5AAPW.js} +3 -3
  154. package/dist/cli/chunks/{gnn-wrapper-XEII72LN.js → gnn-wrapper-YK6NAPJV.js} +2 -2
  155. package/dist/cli/chunks/{heartbeat-handler-DJ65RE5D.js → heartbeat-handler-DD4T6U36.js} +4 -4
  156. package/dist/cli/chunks/{heartbeat-scheduler-H664265Q.js → heartbeat-scheduler-CBPO5KUB.js} +2 -2
  157. package/dist/cli/chunks/hnsw-adapter-BLMGBVDE.js +2 -0
  158. package/dist/cli/chunks/hnsw-index-UWMXU7RN.js +2 -0
  159. package/dist/cli/chunks/{hnsw-legacy-bridge-SQIDTWAA.js → hnsw-legacy-bridge-REKPPJ75.js} +2 -2
  160. package/dist/cli/chunks/{hnswlib-node-WICYCU5U.js → hnswlib-node-PMWK24KT.js} +2 -2
  161. package/dist/cli/chunks/{hooks-GZUHUD63.js → hooks-UDKFTCJ7.js} +6 -6
  162. package/dist/cli/chunks/{hypergraph-engine-MLCDZ6BL.js → hypergraph-engine-FIAZJD7K.js} +2 -2
  163. package/dist/cli/chunks/{hypergraph-handler-NNDDI4R3.js → hypergraph-handler-NN2EBNBW.js} +3 -3
  164. package/dist/cli/chunks/impact-analyzer-RK2VPRRL.js +2 -0
  165. package/dist/cli/chunks/{init-handler-IJ6BHE6A.js → init-handler-RK256F2M.js} +6 -6
  166. package/dist/cli/chunks/init-wizard-HA2VADPV.js +2 -0
  167. package/dist/cli/chunks/kernel-QMZBPOWP.js +2 -0
  168. package/dist/cli/chunks/{kilocode-installer-EPZFFPFE.js → kilocode-installer-6XPW7IAO.js} +2 -2
  169. package/dist/cli/chunks/{kiro-installer-5VACG3HU.js → kiro-installer-DOHZGTBZ.js} +2 -2
  170. package/dist/cli/chunks/knowledge-graph-INYQCVMS.js +2 -0
  171. package/dist/cli/chunks/{learning-6FITK6XY.js → learning-GRSMZRPZ.js} +3 -3
  172. package/dist/cli/chunks/{llm-router-4DDC6AKJ.js → llm-router-MTZPLM7A.js} +2 -2
  173. package/dist/cli/chunks/{load-KGDNVUBX.js → load-CQXXMUR7.js} +2 -2
  174. package/dist/cli/chunks/load-test-YSEU2TUL.js +2 -0
  175. package/dist/cli/chunks/mcp-IIPV4IWF.js +2 -0
  176. package/dist/cli/chunks/{memory-II4I4QMO.js → memory-GIODHUAL.js} +5 -5
  177. package/dist/cli/chunks/memory-backend-MNSPY44E.js +2 -0
  178. package/dist/cli/chunks/{memory-handlers-TQXTOJGQ.js → memory-handlers-O6UVJSAG.js} +2 -2
  179. package/dist/cli/chunks/{opencode-installer-EU6JCWBW.js → opencode-installer-DDIIEIKL.js} +2 -2
  180. package/dist/cli/chunks/{orchestrator-YLMGJVSP.js → orchestrator-PAQTJDA3.js} +18 -19
  181. package/dist/cli/chunks/{pipeline-MPZJWYKK.js → pipeline-6HFLH75G.js} +2 -2
  182. package/dist/cli/chunks/{platform-YH35ZZFZ.js → platform-UKK776G2.js} +2 -2
  183. package/dist/cli/chunks/{plugin-B7JYZFNQ.js → plugin-ERW5YBXU.js} +2 -2
  184. package/dist/cli/chunks/{prime-radiant-advanced-wasm-KTUK6UE2.js → prime-radiant-advanced-wasm-WB5A4ULB.js} +2 -2
  185. package/dist/cli/chunks/protocol-executor-CBKER6RL.js +2 -0
  186. package/dist/cli/chunks/{protocol-handler-3NXMVU34.js → protocol-handler-AKDFZI6G.js} +2 -2
  187. package/dist/cli/chunks/{prove-H5LMGSUC.js → prove-GT5XEWVF.js} +2 -2
  188. package/dist/cli/chunks/qe-reasoning-bank-C3J4RA2M.js +2 -0
  189. package/dist/cli/chunks/{quality-RCWHY6GO.js → quality-VZAG6B54.js} +2 -2
  190. package/dist/cli/chunks/queen-coordinator-ZXTNAEYV.js +2 -0
  191. package/dist/cli/chunks/{real-embeddings-NKH4VURF.js → real-embeddings-KOOT5MTA.js} +2 -2
  192. package/dist/cli/chunks/{roocode-installer-SB7QJYM3.js → roocode-installer-KHGDU6QK.js} +2 -2
  193. package/dist/cli/chunks/router-YMQF6M2D.js +2 -0
  194. package/dist/cli/chunks/routing-feedback-MM7LNDS7.js +2 -0
  195. package/dist/cli/chunks/{routing-handler-SY7GKG2W.js → routing-handler-HVCNYSJM.js} +2 -2
  196. package/dist/cli/chunks/{ruvector-commands-HATTO3UQ.js → ruvector-commands-D46MOJ32.js} +2 -2
  197. package/dist/cli/chunks/{rvf-dual-writer-D57EXQUD.js → rvf-dual-writer-WASNBBMN.js} +2 -2
  198. package/dist/cli/chunks/{rvf-migration-adapter-OWDYN6KD.js → rvf-migration-adapter-ESLGEE5X.js} +2 -2
  199. package/dist/cli/chunks/{rvf-migration-coordinator-SIQVJB5S.js → rvf-migration-coordinator-S5NAMHTP.js} +2 -2
  200. package/dist/cli/chunks/rvf-native-adapter-3EEWPK4C.js +2 -0
  201. package/dist/cli/chunks/safe-db-5P6ABYNG.js +2 -0
  202. package/dist/cli/chunks/schedule-ZGESH3FK.js +2 -0
  203. package/dist/cli/chunks/scheduler-AC4AA2BD.js +2 -0
  204. package/dist/cli/chunks/{security-DS3XLZWN.js → security-4AHBDCJJ.js} +3 -3
  205. package/dist/cli/chunks/shared-rvf-adapter-UQQUEC52.js +2 -0
  206. package/dist/cli/chunks/{shared-rvf-dual-writer-YB7AH6XJ.js → shared-rvf-dual-writer-ZFNW4C3N.js} +2 -2
  207. package/dist/cli/chunks/sqlite-persistence-KXDW2Q66.js +2 -0
  208. package/dist/cli/chunks/{status-handler-TUYHE4FT.js → status-handler-ZVC4HX5J.js} +2 -2
  209. package/dist/cli/chunks/{structural-health-XNGBNRRD.js → structural-health-DPFQ4GEF.js} +2 -2
  210. package/dist/cli/chunks/{sync-K6CIRKBB.js → sync-7A5JMQNB.js} +2 -2
  211. package/dist/cli/chunks/{task-handler-7PJY67DR.js → task-handler-OFZ5YMXH.js} +2 -2
  212. package/dist/cli/chunks/{task-handlers-WB5CDWUR.js → task-handlers-IRSHSFQW.js} +2 -2
  213. package/dist/cli/chunks/{test-WV5ALEBB.js → test-F6XPB2DN.js} +4 -4
  214. package/dist/cli/chunks/{test-scheduling-N55ZGGA2.js → test-scheduling-CPHQ7DBP.js} +3 -3
  215. package/dist/cli/chunks/{token-bootstrap-SINWHAKR.js → token-bootstrap-5YD6K4LL.js} +2 -2
  216. package/dist/cli/chunks/{token-usage-R7TGEVGL.js → token-usage-KQYGQAEK.js} +2 -2
  217. package/dist/cli/chunks/{transformers-6DBLXPV7.js → transformers-P7TT2MJB.js} +2 -2
  218. package/dist/cli/chunks/{tree-sitter-wasm-parser-7C7FKMQW.js → tree-sitter-wasm-parser-SUSDXGOP.js} +2 -2
  219. package/dist/cli/chunks/{types-VNPMOKQT.js → types-OEGMO7AH.js} +2 -2
  220. package/dist/cli/chunks/unified-memory-MNW25PVU.js +2 -0
  221. package/dist/cli/chunks/unified-memory-hnsw-4RZRP37O.js +2 -0
  222. package/dist/cli/chunks/unified-persistence-6UBNXF25.js +2 -0
  223. package/dist/cli/chunks/{validate-53MNIRAF.js → validate-XI4GTLQR.js} +2 -2
  224. package/dist/cli/chunks/{validate-swarm-ZY4RGUFO.js → validate-swarm-UZQR6AWZ.js} +2 -2
  225. package/dist/cli/chunks/{vibium-PBADBIV6.js → vibium-VPJH2KD5.js} +2 -2
  226. package/dist/cli/chunks/visual-security-7742DBSK.js +2 -0
  227. package/dist/cli/chunks/{web-tree-sitter-O7VI6RLB.js → web-tree-sitter-LUNFY67E.js} +2 -2
  228. package/dist/cli/chunks/{windsurf-installer-HV3C3TAD.js → windsurf-installer-LTJCP7AT.js} +2 -2
  229. package/dist/cli/chunks/witness-chain-QVPNOHDC.js +2 -0
  230. package/dist/cli/chunks/{witness-chain-4WIMYP4X.js → witness-chain-YWBIN5MQ.js} +2 -2
  231. package/dist/cli/chunks/{workflow-5RVAQ4TM.js → workflow-UGXLNO36.js} +4 -4
  232. package/dist/cli/chunks/workflow-orchestrator-K3Q2GOEG.js +2 -0
  233. package/dist/cli/chunks/{wrappers-RRHCCA3E.js → wrappers-LUJRP2YI.js} +2 -2
  234. package/dist/cli/commands/mcp.js +27 -17
  235. package/dist/init/phases/06-code-intelligence.d.ts +33 -1
  236. package/dist/init/phases/06-code-intelligence.js +125 -10
  237. package/dist/init/phases/10-workers.d.ts +0 -14
  238. package/dist/init/phases/10-workers.js +19 -164
  239. package/dist/kernel/hnsw-adapter.d.ts +14 -0
  240. package/dist/kernel/hnsw-adapter.js +25 -1
  241. package/dist/kernel/hnsw-index-provider.d.ts +16 -0
  242. package/dist/kernel/native-hnsw-backend.d.ts +11 -0
  243. package/dist/kernel/native-hnsw-backend.js +20 -0
  244. package/dist/kernel/progressive-hnsw-backend.d.ts +9 -0
  245. package/dist/kernel/progressive-hnsw-backend.js +41 -12
  246. package/dist/kernel/unified-memory.js +10 -0
  247. package/dist/mcp/bundle.js +216 -216
  248. package/dist/optimization/token-optimizer-service.d.ts +31 -2
  249. package/dist/optimization/token-optimizer-service.js +85 -23
  250. package/package.json +1 -1
  251. package/dist/cli/chunks/adapter-53WBPKXU.js +0 -2
  252. package/dist/cli/chunks/aqe-learning-engine-MV7NGY24.js +0 -2
  253. package/dist/cli/chunks/base-DZVGMQN2.js +0 -2
  254. package/dist/cli/chunks/browser-workflow-3J5YNMEI.js +0 -2
  255. package/dist/cli/chunks/chunk-LCAA6H4J.js +0 -2
  256. package/dist/cli/chunks/chunk-XIBVVZGB.js +0 -2
  257. package/dist/cli/chunks/client-EF555KYW.js +0 -2
  258. package/dist/cli/chunks/cross-domain-router-GXFNK5TS.js +0 -2
  259. package/dist/cli/chunks/dream-3IKF5XH4.js +0 -2
  260. package/dist/cli/chunks/esm-node-DHAE52OW.js +0 -2
  261. package/dist/cli/chunks/hnsw-adapter-DML5KXQR.js +0 -2
  262. package/dist/cli/chunks/hnsw-index-BUPPGVR6.js +0 -2
  263. package/dist/cli/chunks/impact-analyzer-DPTMJRYS.js +0 -2
  264. package/dist/cli/chunks/init-wizard-35PUDJPW.js +0 -2
  265. package/dist/cli/chunks/kernel-2HZ44ZJ4.js +0 -2
  266. package/dist/cli/chunks/knowledge-graph-JL62G72U.js +0 -2
  267. package/dist/cli/chunks/load-test-LN245SSD.js +0 -2
  268. package/dist/cli/chunks/mcp-4LETGVIV.js +0 -2
  269. package/dist/cli/chunks/memory-backend-SVM7YRIE.js +0 -2
  270. package/dist/cli/chunks/protocol-executor-IEN2XB4L.js +0 -2
  271. package/dist/cli/chunks/qe-reasoning-bank-Q3ZV3JRG.js +0 -2
  272. package/dist/cli/chunks/queen-coordinator-E6ON3JUR.js +0 -2
  273. package/dist/cli/chunks/router-WMC3LZ3C.js +0 -2
  274. package/dist/cli/chunks/routing-feedback-VKCZRCE3.js +0 -2
  275. package/dist/cli/chunks/rvf-native-adapter-C7NBH5UN.js +0 -2
  276. package/dist/cli/chunks/safe-db-5KLXCNXN.js +0 -2
  277. package/dist/cli/chunks/schedule-HAWWOXWB.js +0 -2
  278. package/dist/cli/chunks/scheduler-HTRDY5BC.js +0 -2
  279. package/dist/cli/chunks/shared-rvf-adapter-6I2Z5UGL.js +0 -2
  280. package/dist/cli/chunks/sqlite-persistence-WNNRGTGG.js +0 -2
  281. package/dist/cli/chunks/unified-memory-72SKVZ7Y.js +0 -2
  282. package/dist/cli/chunks/unified-memory-hnsw-TMN2L77W.js +0 -2
  283. package/dist/cli/chunks/unified-persistence-MDN3SRCR.js +0 -2
  284. package/dist/cli/chunks/visual-security-TRBCXPIB.js +0 -2
  285. package/dist/cli/chunks/witness-chain-JOI2YYGK.js +0 -2
  286. package/dist/cli/chunks/workflow-orchestrator-2NQ72S3C.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.2");process.exit(0)}
2
- import{a as B,b as L}from"./chunk-FUIHWBVF.js";import{b as y,d as $}from"./chunk-N3F3CX4V.js";import"./chunk-YXCU4CJX.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.3");process.exit(0)}
2
+ import{a as B,b as L}from"./chunk-WDTFG5AG.js";import{b as y,d as $}from"./chunk-CU36MONI.js";import"./chunk-7ASGPJWU.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-FUIHWBVF.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-DPTMJRYS.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-R4QZYTIW.js");if(p()){let{createDAGAttentionScheduler:h}=await import("./dag-attention-scheduler-2MAVGSBB.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-RK2VPRRL.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-GIGWUPEX.js");if(p()){let{createDAGAttentionScheduler:h}=await import("./dag-attention-scheduler-J7JDWG5J.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.2");process.exit(0)}
2
- import{b as r,e as f,f as k}from"./chunk-KTYUCZEM.js";import{b as l}from"./chunk-GPLERTZU.js";import"./chunk-SGAW2WLI.js";import"./chunk-4PKXIBX2.js";import"./chunk-TKF447CW.js";import"./chunk-FRJLP7IB.js";import"./chunk-3GZKAORV.js";import"./chunk-RQGYJK7H.js";import"./chunk-GK72GUHA.js";import"./chunk-SNVM4YJS.js";import"./chunk-XIBVVZGB.js";import"./chunk-JOVINE23.js";import"./chunk-N3F3CX4V.js";import"./chunk-BIVIPF4O.js";import"./chunk-SDTVHR63.js";import"./chunk-E25S5E2D.js";import"./chunk-VUAO4VFC.js";import"./chunk-XYJL6DKI.js";import"./chunk-L5YEPSDU.js";import"./chunk-KNVAAVHH.js";import"./chunk-34U7JDCN.js";import"./chunk-MN742FIH.js";import"./chunk-4DAOZQ3V.js";import"./chunk-LCAA6H4J.js";import"./chunk-727BDQ3K.js";import"./chunk-DBE34QES.js";import"./chunk-YXCU4CJX.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.3");process.exit(0)}
2
+ import{b as r,e as f,f as k}from"./chunk-DKOOKULB.js";import{b as l}from"./chunk-Z4V3XV7E.js";import"./chunk-PD5YPC2A.js";import"./chunk-AS5WPUDR.js";import"./chunk-KV32LAKU.js";import"./chunk-LRE4A464.js";import"./chunk-MNZ2HHKI.js";import"./chunk-PS6KLLLQ.js";import"./chunk-LQDAH47F.js";import"./chunk-RRELDHZY.js";import"./chunk-FONTSK2O.js";import"./chunk-6N26CWST.js";import"./chunk-CU36MONI.js";import"./chunk-TA454OEB.js";import"./chunk-OXR2FPHK.js";import"./chunk-EVIXQR4O.js";import"./chunk-HVOOYPW6.js";import"./chunk-DBEU5ISS.js";import"./chunk-GGKV5IQR.js";import"./chunk-ZMUVSL5Q.js";import"./chunk-WSVWVIVR.js";import"./chunk-TPFE3BAI.js";import"./chunk-OV6H3TRU.js";import"./chunk-M7PGW5Z5.js";import"./chunk-UC3RA5LW.js";import"./chunk-OJKGRB6D.js";import"./chunk-7ASGPJWU.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.2");process.exit(0)}
2
- import{a as k,b as u,d as S,e as f}from"./chunk-KTYUCZEM.js";import"./chunk-SGAW2WLI.js";import"./chunk-4PKXIBX2.js";import"./chunk-TKF447CW.js";import"./chunk-FRJLP7IB.js";import"./chunk-RQGYJK7H.js";import"./chunk-GK72GUHA.js";import"./chunk-SNVM4YJS.js";import"./chunk-XIBVVZGB.js";import"./chunk-JOVINE23.js";import"./chunk-N3F3CX4V.js";import"./chunk-BIVIPF4O.js";import{a as y,c as h}from"./chunk-SDTVHR63.js";import"./chunk-E25S5E2D.js";import"./chunk-XYJL6DKI.js";import"./chunk-L5YEPSDU.js";import"./chunk-KNVAAVHH.js";import"./chunk-34U7JDCN.js";import"./chunk-MN742FIH.js";import"./chunk-4DAOZQ3V.js";import"./chunk-LCAA6H4J.js";import"./chunk-727BDQ3K.js";import"./chunk-DBE34QES.js";import"./chunk-YXCU4CJX.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.3");process.exit(0)}
2
+ import{a as k,b as u,d as S,e as f}from"./chunk-DKOOKULB.js";import"./chunk-PD5YPC2A.js";import"./chunk-AS5WPUDR.js";import"./chunk-KV32LAKU.js";import"./chunk-LRE4A464.js";import"./chunk-PS6KLLLQ.js";import"./chunk-LQDAH47F.js";import"./chunk-RRELDHZY.js";import"./chunk-FONTSK2O.js";import"./chunk-6N26CWST.js";import"./chunk-CU36MONI.js";import"./chunk-TA454OEB.js";import{a as y,c as h}from"./chunk-OXR2FPHK.js";import"./chunk-EVIXQR4O.js";import"./chunk-DBEU5ISS.js";import"./chunk-GGKV5IQR.js";import"./chunk-ZMUVSL5Q.js";import"./chunk-WSVWVIVR.js";import"./chunk-TPFE3BAI.js";import"./chunk-OV6H3TRU.js";import"./chunk-M7PGW5Z5.js";import"./chunk-UC3RA5LW.js";import"./chunk-OJKGRB6D.js";import"./chunk-7ASGPJWU.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.2");process.exit(0)}
2
- import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o}from"./chunk-4FMHBBG5.js";import"./chunk-YXCU4CJX.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.3");process.exit(0)}
2
+ import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o}from"./chunk-ZTIPMKUS.js";import"./chunk-7ASGPJWU.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.2");process.exit(0)}
2
- import{d as L,e as $}from"./chunk-JOVINE23.js";import"./chunk-YXCU4CJX.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-O7VI6RLB.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.3");process.exit(0)}
2
+ import{d as L,e as $}from"./chunk-6N26CWST.js";import"./chunk-7ASGPJWU.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-LUNFY67E.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.2");process.exit(0)}
2
- import{a,b,c,d,e,f,g}from"./chunk-ICDXWIFZ.js";import"./chunk-YXCU4CJX.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.3");process.exit(0)}
2
+ import{a,b,c,d,e,f,g}from"./chunk-WAWCNUIJ.js";import"./chunk-7ASGPJWU.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.3");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-LQDAH47F.js";import"./chunk-RRELDHZY.js";import"./chunk-FONTSK2O.js";import"./chunk-6N26CWST.js";import"./chunk-CU36MONI.js";import"./chunk-OXR2FPHK.js";import"./chunk-DBEU5ISS.js";import"./chunk-GGKV5IQR.js";import{a as c,d,e}from"./chunk-ZMUVSL5Q.js";import"./chunk-WSVWVIVR.js";import"./chunk-TPFE3BAI.js";import"./chunk-OV6H3TRU.js";import"./chunk-M7PGW5Z5.js";import"./chunk-UC3RA5LW.js";import"./chunk-OJKGRB6D.js";import"./chunk-7ASGPJWU.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.3");process.exit(0)}
2
+ import{a,b,c,d,e,f}from"./chunk-ZMUVSL5Q.js";import"./chunk-WSVWVIVR.js";import"./chunk-TPFE3BAI.js";import"./chunk-OV6H3TRU.js";import"./chunk-M7PGW5Z5.js";import"./chunk-UC3RA5LW.js";import"./chunk-OJKGRB6D.js";import"./chunk-7ASGPJWU.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.3");process.exit(0)}
2
+ import{a,b,c,d,e}from"./chunk-66RCUQCI.js";import"./chunk-LQDAH47F.js";import"./chunk-RRELDHZY.js";import"./chunk-FONTSK2O.js";import"./chunk-6N26CWST.js";import"./chunk-CU36MONI.js";import"./chunk-OXR2FPHK.js";import"./chunk-DBEU5ISS.js";import"./chunk-GGKV5IQR.js";import"./chunk-ZMUVSL5Q.js";import"./chunk-WSVWVIVR.js";import"./chunk-TPFE3BAI.js";import"./chunk-OV6H3TRU.js";import"./chunk-M7PGW5Z5.js";import"./chunk-UC3RA5LW.js";import"./chunk-OJKGRB6D.js";import"./chunk-7ASGPJWU.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.2");process.exit(0)}
2
- import{e as P}from"./chunk-56IWS2KY.js";import"./chunk-AKSJQ6B3.js";import{a as V}from"./chunk-RITN3XR4.js";import"./chunk-NRCKGXJJ.js";import"./chunk-XIBVVZGB.js";import"./chunk-JOVINE23.js";import{b as v,d as F}from"./chunk-N3F3CX4V.js";import"./chunk-SDTVHR63.js";import"./chunk-34U7JDCN.js";import"./chunk-YXCU4CJX.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.3");process.exit(0)}
2
+ import{e as P}from"./chunk-3Q5FG6M3.js";import"./chunk-COIFERYS.js";import{a as V}from"./chunk-FR26EINS.js";import"./chunk-5YUNMBIH.js";import"./chunk-FONTSK2O.js";import"./chunk-6N26CWST.js";import{b as v,d as F}from"./chunk-CU36MONI.js";import"./chunk-OXR2FPHK.js";import"./chunk-WSVWVIVR.js";import"./chunk-7ASGPJWU.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.2");process.exit(0)}
2
- import{a as h}from"./chunk-KZUJBZ7B.js";import{a as i,b as v,c as d,d as p}from"./chunk-56IWS2KY.js";import"./chunk-AKSJQ6B3.js";import{a as k}from"./chunk-RITN3XR4.js";import"./chunk-J4BS6IWE.js";import"./chunk-NRCKGXJJ.js";import"./chunk-Q4A72ZTV.js";import"./chunk-7NOIIC7G.js";import"./chunk-4UH25U4O.js";import"./chunk-TKF447CW.js";import"./chunk-5L6AU3QK.js";import"./chunk-563PJBDM.js";import"./chunk-GK72GUHA.js";import"./chunk-SNVM4YJS.js";import"./chunk-Y6O7CDLI.js";import"./chunk-XIBVVZGB.js";import"./chunk-JOVINE23.js";import"./chunk-N3F3CX4V.js";import"./chunk-BIVIPF4O.js";import"./chunk-SDTVHR63.js";import"./chunk-E25S5E2D.js";import"./chunk-XYJL6DKI.js";import"./chunk-L5YEPSDU.js";import"./chunk-KNVAAVHH.js";import"./chunk-34U7JDCN.js";import"./chunk-MN742FIH.js";import"./chunk-4DAOZQ3V.js";import"./chunk-LCAA6H4J.js";import"./chunk-727BDQ3K.js";import"./chunk-DBE34QES.js";import"./chunk-YXCU4CJX.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.3");process.exit(0)}
2
+ import{a as h}from"./chunk-GGEVILIS.js";import{a as i,b as v,c as d,d as p}from"./chunk-3Q5FG6M3.js";import"./chunk-COIFERYS.js";import{a as k}from"./chunk-FR26EINS.js";import"./chunk-JI5MNJSU.js";import"./chunk-5YUNMBIH.js";import"./chunk-P4RYVWIR.js";import"./chunk-FIQ62VOQ.js";import"./chunk-JTIWAUWW.js";import"./chunk-KV32LAKU.js";import"./chunk-SFFI3MDN.js";import"./chunk-2CPNZVGL.js";import"./chunk-LQDAH47F.js";import"./chunk-RRELDHZY.js";import"./chunk-FSUS5TV6.js";import"./chunk-FONTSK2O.js";import"./chunk-6N26CWST.js";import"./chunk-CU36MONI.js";import"./chunk-TA454OEB.js";import"./chunk-OXR2FPHK.js";import"./chunk-EVIXQR4O.js";import"./chunk-DBEU5ISS.js";import"./chunk-GGKV5IQR.js";import"./chunk-ZMUVSL5Q.js";import"./chunk-WSVWVIVR.js";import"./chunk-TPFE3BAI.js";import"./chunk-OV6H3TRU.js";import"./chunk-M7PGW5Z5.js";import"./chunk-UC3RA5LW.js";import"./chunk-OJKGRB6D.js";import"./chunk-7ASGPJWU.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.2");process.exit(0)}
2
- import{c as t}from"./chunk-YXCU4CJX.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.3");process.exit(0)}
2
+ import{c as t}from"./chunk-7ASGPJWU.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.3");process.exit(0)}
2
+ import{a}from"./chunk-ZQCU62JJ.js";import"./chunk-BK445WWE.js";import"./chunk-MNZ2HHKI.js";import"./chunk-LQDAH47F.js";import"./chunk-RRELDHZY.js";import"./chunk-FONTSK2O.js";import"./chunk-6N26CWST.js";import"./chunk-CU36MONI.js";import"./chunk-OXR2FPHK.js";import"./chunk-EVIXQR4O.js";import"./chunk-DBEU5ISS.js";import"./chunk-GGKV5IQR.js";import"./chunk-ZMUVSL5Q.js";import"./chunk-WSVWVIVR.js";import"./chunk-TPFE3BAI.js";import"./chunk-OV6H3TRU.js";import"./chunk-M7PGW5Z5.js";import"./chunk-UC3RA5LW.js";import"./chunk-OJKGRB6D.js";import"./chunk-7ASGPJWU.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.2");process.exit(0)}
2
- import"./chunk-YXCU4CJX.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.3");process.exit(0)}
2
+ import"./chunk-7ASGPJWU.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.2");process.exit(0)}
2
- import{b as u}from"./chunk-2VVV73PW.js";import{a as f,c as h}from"./chunk-SDTVHR63.js";import"./chunk-YXCU4CJX.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.3");process.exit(0)}
2
+ import{b as u}from"./chunk-HJEWQD2B.js";import{a as f,c as h}from"./chunk-OXR2FPHK.js";import"./chunk-7ASGPJWU.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.3");process.exit(0)}
2
+ import{a,b,c,d,e,f,g,h}from"./chunk-SVXIAQRW.js";import"./chunk-LQDAH47F.js";import"./chunk-RRELDHZY.js";import"./chunk-FONTSK2O.js";import"./chunk-6N26CWST.js";import"./chunk-CU36MONI.js";import"./chunk-OXR2FPHK.js";import"./chunk-DBEU5ISS.js";import"./chunk-GGKV5IQR.js";import"./chunk-ZMUVSL5Q.js";import"./chunk-WSVWVIVR.js";import"./chunk-TPFE3BAI.js";import"./chunk-OV6H3TRU.js";import"./chunk-M7PGW5Z5.js";import"./chunk-UC3RA5LW.js";import"./chunk-OJKGRB6D.js";import"./chunk-7ASGPJWU.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.2");process.exit(0)}
2
- import{a,b,c,d,e,f,g}from"./chunk-Y6O7CDLI.js";import"./chunk-XIBVVZGB.js";import"./chunk-JOVINE23.js";import"./chunk-DBE34QES.js";import"./chunk-YXCU4CJX.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.3");process.exit(0)}
2
+ import{a,b,c,d,e,f,g}from"./chunk-FSUS5TV6.js";import"./chunk-FONTSK2O.js";import"./chunk-6N26CWST.js";import"./chunk-OJKGRB6D.js";import"./chunk-7ASGPJWU.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.2");process.exit(0)}
2
- import"./chunk-5AUKULWO.js";import{b as $}from"./chunk-65M7C6SH.js";import{d as R}from"./chunk-Z54EO6E6.js";import{b as k,c as C,d as b}from"./chunk-KZTO5EVM.js";import{c as W}from"./chunk-N3F3CX4V.js";import"./chunk-BIVIPF4O.js";import"./chunk-SDTVHR63.js";import"./chunk-YXCU4CJX.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.3");process.exit(0)}
2
+ import"./chunk-DGRO6LSI.js";import{b as $}from"./chunk-D5AQDGTS.js";import{d as R}from"./chunk-IOW7QTYT.js";import{b as k,c as C,d as b}from"./chunk-SDHZLA45.js";import{c as W}from"./chunk-CU36MONI.js";import"./chunk-TA454OEB.js";import"./chunk-OXR2FPHK.js";import"./chunk-7ASGPJWU.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-3J5YNMEI.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-QVT343YP.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-3J5YNMEI.js"),{writeOutput:u,toJSON:c}=await import("./ci-output-FB4OJHAC.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-QVT343YP.js"),{writeOutput:u,toJSON:c}=await import("./ci-output-ZWGXOIUD.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.3");process.exit(0)}
2
+ import{a,b,c,d}from"./chunk-T5MWENBA.js";import"./chunk-P6OZKWNK.js";import"./chunk-LQDAH47F.js";import"./chunk-RRELDHZY.js";import"./chunk-FONTSK2O.js";import"./chunk-6N26CWST.js";import"./chunk-CU36MONI.js";import"./chunk-TA454OEB.js";import"./chunk-OXR2FPHK.js";import"./chunk-EVIXQR4O.js";import"./chunk-DBEU5ISS.js";import"./chunk-GGKV5IQR.js";import"./chunk-ZMUVSL5Q.js";import"./chunk-WSVWVIVR.js";import"./chunk-TPFE3BAI.js";import"./chunk-OV6H3TRU.js";import"./chunk-M7PGW5Z5.js";import"./chunk-UC3RA5LW.js";import"./chunk-OJKGRB6D.js";import"./chunk-7ASGPJWU.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.2");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-GITD7SRQ.js";import"./chunk-GK72GUHA.js";import"./chunk-SNVM4YJS.js";import"./chunk-XIBVVZGB.js";import"./chunk-JOVINE23.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-RJROC5M3.js";import"./chunk-N3F3CX4V.js";import"./chunk-SDTVHR63.js";import"./chunk-XYJL6DKI.js";import"./chunk-L5YEPSDU.js";import"./chunk-KNVAAVHH.js";import"./chunk-34U7JDCN.js";import"./chunk-MN742FIH.js";import"./chunk-4DAOZQ3V.js";import"./chunk-LCAA6H4J.js";import"./chunk-727BDQ3K.js";import"./chunk-DBE34QES.js";import"./chunk-YXCU4CJX.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.3");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-AWSYGQEB.js";import"./chunk-LQDAH47F.js";import"./chunk-RRELDHZY.js";import"./chunk-FONTSK2O.js";import"./chunk-6N26CWST.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-O2O5RO4H.js";import"./chunk-CU36MONI.js";import"./chunk-OXR2FPHK.js";import"./chunk-DBEU5ISS.js";import"./chunk-GGKV5IQR.js";import"./chunk-ZMUVSL5Q.js";import"./chunk-WSVWVIVR.js";import"./chunk-TPFE3BAI.js";import"./chunk-OV6H3TRU.js";import"./chunk-M7PGW5Z5.js";import"./chunk-UC3RA5LW.js";import"./chunk-OJKGRB6D.js";import"./chunk-7ASGPJWU.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};
@@ -13,6 +13,7 @@ import { spawn } from 'child_process';
13
13
  import { join, dirname } from 'path';
14
14
  import { existsSync } from 'fs';
15
15
  import { fileURLToPath } from 'url';
16
+ import { findPackageRoot } from '../../init/find-package-root.js';
16
17
  /**
17
18
  * Create the MCP command
18
19
  */
@@ -63,27 +64,36 @@ export function createMcpCommand() {
63
64
  return cmd;
64
65
  }
65
66
  /**
66
- * Find the MCP entry point
67
- * Looks in multiple locations for the compiled or source entry
67
+ * Find the MCP entry point.
68
+ *
69
+ * Resolution order (fix/init-v3-9-3 Fix 4):
70
+ * 1. Package root (found by walking up to the nearest package.json with
71
+ * name=agentic-qe) + dist/mcp/bundle.js. Survives esbuild code-splitting
72
+ * that places CLI chunks under dist/cli/chunks/ (3+ levels deep).
73
+ * 2. Legacy sibling paths relative to this file (dev mode with tsx).
74
+ * 3. Consumer's node_modules (when agentic-qe is a transitive dependency).
75
+ *
76
+ * The bug this fixes: v3.9.0 switched esbuild to code-splitting which broke
77
+ * the fixed `__dirname + '..'` paths the CLI used to locate its own bundle.
78
+ * On global installs the MCP command died with "Could not find MCP server
79
+ * entry point" — a regression of the v3.7.10 fix.
68
80
  */
69
81
  function findMcpEntry() {
70
- // Get the directory of this file
82
+ const candidates = [];
83
+ // 1. Find the package root via walk-up. This is the canonical path
84
+ // and works regardless of bundle depth.
85
+ const packageRoot = findPackageRoot(import.meta.url);
86
+ if (packageRoot) {
87
+ candidates.push(join(packageRoot, 'dist', 'mcp', 'bundle.js'), join(packageRoot, 'dist', 'mcp', 'entry.js'), join(packageRoot, 'src', 'mcp', 'entry.ts'));
88
+ }
89
+ // 2. Legacy sibling-path fallback (dev tree without a package.json walk hit).
71
90
  const __filename = fileURLToPath(import.meta.url);
72
91
  const __dirname = dirname(__filename);
73
- // Paths to check, in order of preference:
74
- // CLI bundle is at dist/cli/bundle.js, so __dirname = dist/cli/
75
- // MCP bundle is at dist/mcp/bundle.js — one level up (sibling dir)
76
- const candidates = [
77
- // 1. Sibling bundle in dist/ (production: dist/cli/ -> dist/mcp/)
78
- join(__dirname, '..', 'mcp', 'bundle.js'),
79
- // 2. Sibling compiled in dist/
80
- join(__dirname, '..', 'mcp', 'entry.js'),
81
- // 3. Source (development with tsx: src/cli/ -> src/mcp/)
82
- join(__dirname, '..', 'mcp', 'entry.ts'),
83
- // 4. From node_modules (when used as dependency — flat structure since v3.7.5)
84
- join(process.cwd(), 'node_modules', 'agentic-qe', 'dist', 'mcp', 'bundle.js'),
85
- join(process.cwd(), 'node_modules', 'agentic-qe', 'dist', 'mcp', 'entry.js'),
86
- ];
92
+ candidates.push(join(__dirname, '..', 'mcp', 'bundle.js'), join(__dirname, '..', 'mcp', 'entry.js'), join(__dirname, '..', 'mcp', 'entry.ts'),
93
+ // Extra hop for chunk-split layouts: dist/cli/chunks -> dist/mcp
94
+ join(__dirname, '..', '..', 'mcp', 'bundle.js'));
95
+ // 3. Consumer's node_modules (transitive dependency scenarios).
96
+ candidates.push(join(process.cwd(), 'node_modules', 'agentic-qe', 'dist', 'mcp', 'bundle.js'), join(process.cwd(), 'node_modules', 'agentic-qe', 'dist', 'mcp', 'entry.js'));
87
97
  for (const candidate of candidates) {
88
98
  if (existsSync(candidate)) {
89
99
  return candidate;
@@ -8,8 +8,10 @@
8
8
  */
9
9
  import { BasePhase, type InitContext } from './phase-interface.js';
10
10
  export interface CodeIntelligenceResult {
11
- status: 'indexed' | 'existing' | 'skipped' | 'error';
11
+ status: 'indexed' | 'existing' | 'skipped' | 'error' | 'timeout';
12
12
  entries: number;
13
+ /** Last file the indexer touched before a timeout, if any. Used for diagnostics. */
14
+ timeoutFile?: string;
13
15
  }
14
16
  /**
15
17
  * Code Intelligence phase - builds knowledge graph
@@ -38,8 +40,38 @@ export declare class CodeIntelligencePhase extends BasePhase<CodeIntelligenceRes
38
40
  * - Dependency analysis (impact of changes)
39
41
  * - Test target discovery (what tests cover what code)
40
42
  * - Token reduction (search KG instead of reading entire files)
43
+ *
44
+ * fix/init-v3-9-3 Fix 5: The whole scan is wrapped in a phase-level
45
+ * watchdog. Inside, each file is indexed via `indexOneFile()` with a
46
+ * per-file timeout so a single pathological file or a native-layer
47
+ * stall (e.g. @ruvector/rvf-node fsync on an overlay filesystem) can
48
+ * never block the init command indefinitely. Progress is logged every
49
+ * PROGRESS_LOG_INTERVAL files so operators can see exactly where the
50
+ * indexer is — and, if a timeout fires, which file was responsible.
41
51
  */
42
52
  private runCodeIntelligenceScan;
53
+ /**
54
+ * Drive file-by-file indexing with per-file and phase-level timeouts.
55
+ *
56
+ * fix/init-v3-9-3 Fix 5. This method is the reason v3.9.3 can survive
57
+ * pathological files and native-layer stalls that hung v3.9.1/v3.9.2.
58
+ *
59
+ * Invariants:
60
+ * - A single file cannot block longer than PER_FILE_TIMEOUT_MS.
61
+ * - The whole loop cannot block longer than PHASE_TIMEOUT_MS.
62
+ * - Progress is observable via structured log lines.
63
+ * - Partial results are kept — on timeout we return the entries
64
+ * indexed so far, not zero.
65
+ */
66
+ private runBoundedScan;
67
+ /**
68
+ * Race a promise against a timer. On timeout, rejects with a tagged
69
+ * error so the caller can distinguish timeouts from real failures.
70
+ *
71
+ * The tagged error prefix 'AQE_PER_FILE_TIMEOUT' is matched in
72
+ * runBoundedScan to differentiate per-file timeouts from other errors.
73
+ */
74
+ private withTimeout;
43
75
  /**
44
76
  * Build hypergraph from indexed files.
45
77
  * Uses shared extractor to populate hypergraph_nodes/hypergraph_edges in memory.db.