agentic-qe 3.13.8 → 3.13.10

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 (345) hide show
  1. package/.claude/skills/skills-manifest.json +1 -1
  2. package/CHANGELOG.md +65 -0
  3. package/assets/skills/skills-manifest.json +1 -1
  4. package/dist/cli/bundle.js +5 -5
  5. package/dist/cli/chunks/adapter-6CNMDJVJ.js +2 -0
  6. package/dist/cli/chunks/{agent-booster-wasm-W5KKWWGM.js → agent-booster-wasm-AWNQ6KB3.js} +2 -2
  7. package/dist/cli/chunks/{agent-handler-U27BOQIY.js → agent-handler-RSHQZHPS.js} +2 -2
  8. package/dist/cli/chunks/{agent-memory-branch-FYEN2L2U.js → agent-memory-branch-FU7Y3TQ3.js} +2 -2
  9. package/dist/cli/chunks/aqe-learning-engine-JGHHNSFX.js +2 -0
  10. package/dist/cli/chunks/{arena-F2ZO52SD.js → arena-LOK2WYHC.js} +2 -2
  11. package/dist/cli/chunks/{arena-7GWHLRNN.js → arena-XQOCNKB6.js} +4 -4
  12. package/dist/cli/chunks/{audit-O4RLECCQ.js → audit-6ZS4EAD2.js} +3 -3
  13. package/dist/cli/chunks/base-ND3KAA2L.js +2 -0
  14. package/dist/cli/chunks/{better-sqlite3-3VQVXH7I.js → better-sqlite3-IMBCIZK3.js} +2 -2
  15. package/dist/cli/chunks/{brain-handler-Z4FSHVHF.js → brain-handler-3U6BH4EO.js} +3 -3
  16. package/dist/cli/chunks/{branch-enumerator-VW7QDS3O.js → branch-enumerator-CJBPVBXM.js} +2 -2
  17. package/dist/cli/chunks/{browser-P5PZI236.js → browser-M4VW3KJY.js} +2 -2
  18. package/dist/cli/chunks/browser-workflow-EBSNGTSH.js +2 -0
  19. package/dist/cli/chunks/{chunk-CR5ZQXMN.js → chunk-2CLM53W2.js} +2 -2
  20. package/dist/cli/chunks/{chunk-DKX6SIVF.js → chunk-2E35LWYJ.js} +4 -4
  21. package/dist/cli/chunks/{chunk-UK2267F4.js → chunk-2FFCL4BK.js} +3 -3
  22. package/dist/cli/chunks/{chunk-XONUAS4K.js → chunk-2FPHM356.js} +2 -2
  23. package/dist/cli/chunks/{chunk-SLTIRAYZ.js → chunk-2HEHM2KV.js} +2 -2
  24. package/dist/cli/chunks/{chunk-PTAX4IY2.js → chunk-2HMBDTSI.js} +2 -2
  25. package/dist/cli/chunks/{chunk-HBM423QM.js → chunk-2LGQNT6Q.js} +1 -1
  26. package/dist/cli/chunks/{chunk-W2FT6OUU.js → chunk-2SS2SSNZ.js} +3 -3
  27. package/dist/cli/chunks/{chunk-SYPXKVVR.js → chunk-35CHBX6K.js} +2 -2
  28. package/dist/cli/chunks/{chunk-426SRHIW.js → chunk-37GWETSW.js} +2 -2
  29. package/dist/cli/chunks/{chunk-QYPXBIP5.js → chunk-3E3YLEHB.js} +1 -1
  30. package/dist/cli/chunks/{chunk-2CSKJ5JM.js → chunk-3I5ZTLFY.js} +1 -1
  31. package/dist/cli/chunks/{chunk-6H3VRSJ4.js → chunk-4EWKERKV.js} +2 -2
  32. package/dist/cli/chunks/{chunk-6BNPFSFE.js → chunk-4NXABNLF.js} +1 -1
  33. package/dist/cli/chunks/{chunk-M3PXWTNF.js → chunk-4PRQMFVO.js} +2 -2
  34. package/dist/cli/chunks/{chunk-YTBW2SLZ.js → chunk-4TSLLWE7.js} +1 -1
  35. package/dist/cli/chunks/{chunk-MRLPZMA3.js → chunk-54RIPGMC.js} +1 -1
  36. package/dist/cli/chunks/{chunk-MLFS3MVR.js → chunk-66BUC3JG.js} +2 -2
  37. package/dist/cli/chunks/{chunk-U6O3CFIW.js → chunk-6C5WRBGZ.js} +3 -3
  38. package/dist/cli/chunks/{chunk-YEGZUE6G.js → chunk-6FIWTBR5.js} +1 -1
  39. package/dist/cli/chunks/{chunk-5QZAXVUI.js → chunk-6L36EHM2.js} +2 -2
  40. package/dist/cli/chunks/{chunk-5PRVDHNG.js → chunk-6SM74KJI.js} +1 -1
  41. package/dist/cli/chunks/{chunk-MKCCKFUY.js → chunk-74QKFILD.js} +2 -2
  42. package/dist/cli/chunks/{chunk-Y7ALSL72.js → chunk-7BZUNNWC.js} +1 -1
  43. package/dist/cli/chunks/{chunk-A3V4SRLU.js → chunk-7GZJMPTD.js} +2 -2
  44. package/dist/cli/chunks/{chunk-BTCQJOI2.js → chunk-7JK57AI2.js} +1 -1
  45. package/dist/cli/chunks/chunk-7NDJW2DU.js +22 -0
  46. package/dist/cli/chunks/{chunk-5LLHM6NK.js → chunk-7QNN4GQU.js} +2 -2
  47. package/dist/cli/chunks/{chunk-Y5JWDXGB.js → chunk-7QSGUJE2.js} +1 -1
  48. package/dist/cli/chunks/{chunk-PIPV2C7N.js → chunk-7XCRPSSU.js} +2 -2
  49. package/dist/cli/chunks/{chunk-HP76TI6A.js → chunk-7XWFAPPI.js} +2 -2
  50. package/dist/cli/chunks/{chunk-RWSBQ2AD.js → chunk-A233TTUX.js} +1 -1
  51. package/dist/cli/chunks/{chunk-AMTA6V5L.js → chunk-A6V5NZCV.js} +2 -2
  52. package/dist/cli/chunks/{chunk-SEOOA2FX.js → chunk-AJQGNQ3W.js} +2 -2
  53. package/dist/cli/chunks/{chunk-CB6FBMND.js → chunk-ATSVI6T4.js} +1 -1
  54. package/dist/cli/chunks/{chunk-X4FHVATG.js → chunk-BB4LWAAH.js} +2 -2
  55. package/dist/cli/chunks/{chunk-AGJG5PAS.js → chunk-BFX3N7KU.js} +1 -1
  56. package/dist/cli/chunks/{chunk-BC37ZYBO.js → chunk-BM5BSYPW.js} +2 -2
  57. package/dist/cli/chunks/{chunk-CK2I5QTK.js → chunk-BTG5UFMA.js} +2 -2
  58. package/dist/cli/chunks/{chunk-HQQI4ZEO.js → chunk-C5CP66K5.js} +1 -1
  59. package/dist/cli/chunks/{chunk-2Q7T3PL4.js → chunk-C5HYQTD7.js} +1 -1
  60. package/dist/cli/chunks/{chunk-ZKOIWNH7.js → chunk-C656WHED.js} +2 -2
  61. package/dist/cli/chunks/{chunk-DZHVLIR6.js → chunk-CCAY7Q56.js} +1 -1
  62. package/dist/cli/chunks/{chunk-D2SHZXX7.js → chunk-CPXZC7LF.js} +1 -1
  63. package/dist/cli/chunks/{chunk-PVUQMV6P.js → chunk-DR4V75BF.js} +2 -2
  64. package/dist/cli/chunks/{chunk-MQKQTX4T.js → chunk-DZNK4EM7.js} +3 -3
  65. package/dist/cli/chunks/{chunk-X6MSSQFP.js → chunk-EE55ALFK.js} +2 -2
  66. package/dist/cli/chunks/{chunk-SECJ2IQE.js → chunk-EJRDL5W5.js} +2 -2
  67. package/dist/cli/chunks/{chunk-YWISQTXQ.js → chunk-EKZNA6HW.js} +1 -1
  68. package/dist/cli/chunks/{chunk-AKCNLYE3.js → chunk-EP2HOAEB.js} +2 -2
  69. package/dist/cli/chunks/{chunk-D53CCDCD.js → chunk-EZY3DAIX.js} +1 -1
  70. package/dist/cli/chunks/{chunk-SSIOQDWN.js → chunk-F3AHUNWH.js} +2 -2
  71. package/dist/cli/chunks/{chunk-Y6EFJG52.js → chunk-FBJUNJ2A.js} +1 -1
  72. package/dist/cli/chunks/{chunk-IYOGT6HD.js → chunk-FC47FRFI.js} +2 -2
  73. package/dist/cli/chunks/{chunk-7QJ344ZA.js → chunk-FOPLJRWL.js} +2 -2
  74. package/dist/cli/chunks/{chunk-XIJGRH5I.js → chunk-FOWBKCRK.js} +10 -10
  75. package/dist/cli/chunks/{chunk-QYZLZ6P3.js → chunk-G427QR5W.js} +2 -2
  76. package/dist/cli/chunks/{chunk-TQL4CSAS.js → chunk-G7YD3BR3.js} +2 -2
  77. package/dist/cli/chunks/{chunk-HD22NMGP.js → chunk-GQ6H37RN.js} +2 -2
  78. package/dist/cli/chunks/{chunk-CDBTYQ4N.js → chunk-GRTU5QOT.js} +2 -2
  79. package/dist/cli/chunks/{chunk-YCL7OWK3.js → chunk-GSN4QIDI.js} +2 -2
  80. package/dist/cli/chunks/{chunk-ZLWYE47I.js → chunk-H633BGA7.js} +1 -1
  81. package/dist/cli/chunks/{chunk-QFHOF4F3.js → chunk-H7AACUYS.js} +2 -2
  82. package/dist/cli/chunks/{chunk-BS4ZARET.js → chunk-HEY2ZRL7.js} +2 -2
  83. package/dist/cli/chunks/{chunk-ACZ7CNBM.js → chunk-HL5RC5YB.js} +1 -1
  84. package/dist/cli/chunks/{chunk-YRSKYBOL.js → chunk-HZIT42TM.js} +2 -2
  85. package/dist/cli/chunks/{chunk-JKSAZL2F.js → chunk-I3SBXWF2.js} +1 -1
  86. package/dist/cli/chunks/{chunk-X6VCAUOX.js → chunk-IHNPXNFG.js} +2 -2
  87. package/dist/cli/chunks/{chunk-NXTV6EJQ.js → chunk-IJ3HHUSD.js} +2 -2
  88. package/dist/cli/chunks/{chunk-PZS742LW.js → chunk-IR7FZYPO.js} +1 -1
  89. package/dist/cli/chunks/{chunk-XUB5UG7C.js → chunk-IYLSML27.js} +2 -2
  90. package/dist/cli/chunks/{chunk-3KSB2PDF.js → chunk-J6H2LUBM.js} +2 -2
  91. package/dist/cli/chunks/{chunk-YISGZEZR.js → chunk-JALFKAAD.js} +1 -1
  92. package/dist/cli/chunks/{chunk-MMNNQ5PO.js → chunk-JGXU5FUZ.js} +3 -3
  93. package/dist/cli/chunks/{chunk-OWWLOSVW.js → chunk-JMF3FMAO.js} +2 -2
  94. package/dist/cli/chunks/{chunk-4GTPYV66.js → chunk-JPDJARGR.js} +2 -2
  95. package/dist/cli/chunks/{chunk-BU6HG2RT.js → chunk-JUVW4DOU.js} +2 -2
  96. package/dist/cli/chunks/{chunk-XJT6TR5E.js → chunk-JWV5ZM2S.js} +2 -2
  97. package/dist/cli/chunks/{chunk-UJ5KZ764.js → chunk-K6SXDKWV.js} +1 -1
  98. package/dist/cli/chunks/{chunk-PDIJAWCK.js → chunk-KBJYXZI7.js} +2 -2
  99. package/dist/cli/chunks/{chunk-GO6GSIHE.js → chunk-KBOGA4GA.js} +2 -2
  100. package/dist/cli/chunks/{chunk-J3EDJVZR.js → chunk-KITVDY4T.js} +1 -1
  101. package/dist/cli/chunks/{chunk-ZO6QWQ2G.js → chunk-KQVTTP2S.js} +2 -2
  102. package/dist/cli/chunks/{chunk-CZTNTQZA.js → chunk-LPVHYZAE.js} +1 -1
  103. package/dist/cli/chunks/{chunk-UGBHQC32.js → chunk-MFGKSD44.js} +2 -2
  104. package/dist/cli/chunks/{chunk-CDVGXGUX.js → chunk-MGJPS2YV.js} +2 -2
  105. package/dist/cli/chunks/{chunk-Q53NBMNL.js → chunk-MMA6Q6NF.js} +2 -2
  106. package/dist/cli/chunks/{chunk-DTN5NUAJ.js → chunk-MMRORLMM.js} +2 -2
  107. package/dist/cli/chunks/{chunk-SXSCWO6M.js → chunk-NBUBGYLE.js} +2 -2
  108. package/dist/cli/chunks/{chunk-D45ZSWZD.js → chunk-NCX4W65B.js} +5 -5
  109. package/dist/cli/chunks/{chunk-M7O7UKP3.js → chunk-NL3KX4NE.js} +10 -10
  110. package/dist/cli/chunks/{chunk-YLFM5AZ4.js → chunk-NRD76M7A.js} +2 -2
  111. package/dist/cli/chunks/{chunk-R557EYUJ.js → chunk-NZRKWUBM.js} +2 -2
  112. package/dist/cli/chunks/{chunk-2GD3RLVF.js → chunk-O5QZB2AP.js} +2 -2
  113. package/dist/cli/chunks/{chunk-XKKCH24C.js → chunk-OLETDPH2.js} +2 -2
  114. package/dist/cli/chunks/{chunk-CB23FNZW.js → chunk-OSWAQX4G.js} +2 -2
  115. package/dist/cli/chunks/{chunk-GVX4IAKF.js → chunk-OZLMIEJC.js} +2 -2
  116. package/dist/cli/chunks/{chunk-SBGMMCPJ.js → chunk-OZO2JUEK.js} +1 -1
  117. package/dist/cli/chunks/{chunk-65LJ2QU4.js → chunk-PGJHCCR6.js} +3 -3
  118. package/dist/cli/chunks/{chunk-WR3PYP6X.js → chunk-PIV3QHGJ.js} +2 -2
  119. package/dist/cli/chunks/{chunk-L24DBYXX.js → chunk-PLJ72A3I.js} +2 -2
  120. package/dist/cli/chunks/{chunk-LXGDJ5TO.js → chunk-PSBQRTNF.js} +5 -5
  121. package/dist/cli/chunks/{chunk-7TK24XF7.js → chunk-PUN3KZ6N.js} +2 -2
  122. package/dist/cli/chunks/{chunk-TM55OOPV.js → chunk-PVGOOKBF.js} +1 -1
  123. package/dist/cli/chunks/{chunk-WIDOUTFF.js → chunk-Q26QKZYI.js} +2 -2
  124. package/dist/cli/chunks/{chunk-7VWAKVRE.js → chunk-Q7QKJY6Y.js} +2 -2
  125. package/dist/cli/chunks/{chunk-22TNTFEN.js → chunk-QHRMZP6J.js} +1 -1
  126. package/dist/cli/chunks/{chunk-ICET3FUT.js → chunk-QR6NVCRT.js} +3 -3
  127. package/dist/cli/chunks/{chunk-I6LGE3DO.js → chunk-QZOAU2N5.js} +1 -1
  128. package/dist/cli/chunks/{chunk-XPMQEFQI.js → chunk-RCXC4YGL.js} +1 -1
  129. package/dist/cli/chunks/{chunk-756OZOSH.js → chunk-RQTXQ6C7.js} +2 -2
  130. package/dist/cli/chunks/{chunk-EO3RV7QV.js → chunk-RYHOV4E3.js} +2 -2
  131. package/dist/cli/chunks/{chunk-FSKEQ625.js → chunk-SWZUMHIQ.js} +2 -2
  132. package/dist/cli/chunks/{chunk-WMRLLJDW.js → chunk-T7OS4CB4.js} +2 -2
  133. package/dist/cli/chunks/{chunk-OZSYL2CL.js → chunk-TIGBPVPZ.js} +1 -1
  134. package/dist/cli/chunks/chunk-TL5FMEKW.js +2 -0
  135. package/dist/cli/chunks/{chunk-SZYHPGZD.js → chunk-U562TIMO.js} +2 -2
  136. package/dist/cli/chunks/{chunk-N7ITWNQP.js → chunk-U5NKLMF4.js} +2 -2
  137. package/dist/cli/chunks/{chunk-QMMRUFEI.js → chunk-U5WFVIKL.js} +2 -2
  138. package/dist/cli/chunks/{chunk-3OJWLZIO.js → chunk-U6YDS37V.js} +2 -2
  139. package/dist/cli/chunks/{chunk-DPQ2IANL.js → chunk-UHHWEWDA.js} +2 -2
  140. package/dist/cli/chunks/{chunk-PLIUHFVE.js → chunk-UHSIP4DJ.js} +2 -2
  141. package/dist/cli/chunks/{chunk-E2OORKCW.js → chunk-UL6PT654.js} +2 -2
  142. package/dist/cli/chunks/{chunk-QWACAQQ4.js → chunk-UNXPBIX5.js} +2 -2
  143. package/dist/cli/chunks/{chunk-DW5F6DJM.js → chunk-VUCCPPQ6.js} +2 -2
  144. package/dist/cli/chunks/{chunk-FMTURKX4.js → chunk-VWZ743HH.js} +4 -4
  145. package/dist/cli/chunks/{chunk-NW5XQQMC.js → chunk-W3DCBOLL.js} +1 -1
  146. package/dist/cli/chunks/{chunk-HRAU4ZC3.js → chunk-WFEHOEYP.js} +1 -1
  147. package/dist/cli/chunks/{chunk-NJ7SVXE6.js → chunk-WIB6KRFJ.js} +2 -2
  148. package/dist/cli/chunks/{chunk-ZNJJLA64.js → chunk-WK5MKY45.js} +3 -3
  149. package/dist/cli/chunks/{chunk-VJDGJ6CW.js → chunk-WKE2FUCP.js} +1 -1
  150. package/dist/cli/chunks/{chunk-C37IK75J.js → chunk-WSPEAYPG.js} +2 -2
  151. package/dist/cli/chunks/{chunk-2CJ5V2DT.js → chunk-XPUPST5T.js} +1 -1
  152. package/dist/cli/chunks/{chunk-GPRPGL5N.js → chunk-YALYPHSG.js} +2 -2
  153. package/dist/cli/chunks/{chunk-YHV23E6J.js → chunk-YC5UJVV3.js} +1 -1
  154. package/dist/cli/chunks/{chunk-3UENFJEV.js → chunk-YHAUBZ4H.js} +3 -3
  155. package/dist/cli/chunks/{chunk-55UQC4BO.js → chunk-YO63NTJV.js} +1 -1
  156. package/dist/cli/chunks/{chunk-W4CW6TKP.js → chunk-ZAEUW3Q4.js} +1 -1
  157. package/dist/cli/chunks/{chunk-P6PRMORM.js → chunk-ZH3MVVXO.js} +2 -2
  158. package/dist/cli/chunks/{ci-3Z3OSULB.js → ci-7QW7234M.js} +2 -2
  159. package/dist/cli/chunks/{ci-output-ETGFFPKJ.js → ci-output-WGP4YKPQ.js} +2 -2
  160. package/dist/cli/chunks/{circuit-breaker-G7ABL353.js → circuit-breaker-AOHSCJYO.js} +2 -2
  161. package/dist/cli/chunks/{claude-flow-setup-EKBBG7HG.js → claude-flow-setup-CIZ3TWR7.js} +2 -2
  162. package/dist/cli/chunks/client-NEGGUFEM.js +2 -0
  163. package/dist/cli/chunks/{cline-installer-TRNHEMDA.js → cline-installer-J2QVGPJY.js} +2 -2
  164. package/dist/cli/chunks/{code-JMENIVDM.js → code-WH26MFMB.js} +2 -2
  165. package/dist/cli/chunks/{code-index-extractor-JIYCGDUF.js → code-index-extractor-DBOYEFZ4.js} +2 -2
  166. package/dist/cli/chunks/{codex-installer-XBHDOIN7.js → codex-installer-MWYVGZC4.js} +2 -2
  167. package/dist/cli/chunks/{completions-HF6I7WD3.js → completions-LNBHGWUS.js} +2 -2
  168. package/dist/cli/chunks/{complexity-analyzer-MWV6KUSW.js → complexity-analyzer-AMYCTQG2.js} +2 -2
  169. package/dist/cli/chunks/{continuedev-installer-YWTPGW7K.js → continuedev-installer-73EQPP37.js} +2 -2
  170. package/dist/cli/chunks/{copilot-installer-V2SX7GBX.js → copilot-installer-JWSY2272.js} +2 -2
  171. package/dist/cli/chunks/core-handlers-Q2XPFYQ5.js +2 -0
  172. package/dist/cli/chunks/{cost-tracker-RQJRRISN.js → cost-tracker-XQVIORRZ.js} +2 -2
  173. package/dist/cli/chunks/{coverage-IZ43CIOL.js → coverage-HYGJIQ25.js} +3 -3
  174. package/dist/cli/chunks/cross-domain-router-WNZMUQ3G.js +2 -0
  175. package/dist/cli/chunks/{cursor-installer-K3VUWVE3.js → cursor-installer-DNPNJGZM.js} +2 -2
  176. package/dist/cli/chunks/{daemon-HFAAQUIJ.js → daemon-6JNNBU33.js} +4 -4
  177. package/dist/cli/chunks/{daemon-N6AICOXE.js → daemon-GSOGO6L3.js} +3 -3
  178. package/dist/cli/chunks/{dag-attention-scheduler-7TFE4MSB.js → dag-attention-scheduler-7SGPLKGI.js} +2 -2
  179. package/dist/cli/chunks/{detect-VFGXI7AL.js → detect-IXD77HG4.js} +2 -2
  180. package/dist/cli/chunks/{dist-node-P2JPEBHL.js → dist-node-ARTYK2HL.js} +2 -2
  181. package/dist/cli/chunks/{domain-handler-CIMGA5Z3.js → domain-handler-X4BOFLMY.js} +2 -2
  182. package/dist/cli/chunks/{domain-transfer-UHNJ2JW4.js → domain-transfer-7JBEXLFL.js} +2 -2
  183. package/dist/cli/chunks/dream-OL5XLAYS.js +2 -0
  184. package/dist/cli/chunks/{embed-and-insert-pattern-UWK2RRN4.js → embed-and-insert-pattern-VSOLKM3Y.js} +2 -2
  185. package/dist/cli/chunks/{eval-NXHZ7BQE.js → eval-HS2QQW42.js} +2 -2
  186. package/dist/cli/chunks/{experience-capture-middleware-RVQ7F34S.js → experience-capture-middleware-MWEPZYBT.js} +3 -3
  187. package/dist/cli/chunks/{fast-paths-DRXANKX2.js → fast-paths-RONNJ6AC.js} +2 -2
  188. package/dist/cli/chunks/{feature-flags-V45DD537.js → feature-flags-4YE5A6XG.js} +2 -2
  189. package/dist/cli/chunks/{feature-flags-NW6VEQMN.js → feature-flags-CLW4K2HN.js} +2 -2
  190. package/dist/cli/chunks/{file-discovery-GJO7L2NH.js → file-discovery-56C2FW4V.js} +2 -2
  191. package/dist/cli/chunks/{fleet-O35WUOSC.js → fleet-KMB6RM3R.js} +3 -3
  192. package/dist/cli/chunks/{gnn-wrapper-AUVW767T.js → gnn-wrapper-R2OMDND4.js} +2 -2
  193. package/dist/cli/chunks/{heartbeat-handler-5YXDBHH4.js → heartbeat-handler-FP3CIA2V.js} +4 -4
  194. package/dist/cli/chunks/heartbeat-scheduler-XUAW3I3Q.js +2 -0
  195. package/dist/cli/chunks/hnsw-adapter-EDK2YUZJ.js +2 -0
  196. package/dist/cli/chunks/hnsw-index-RDMT66NM.js +2 -0
  197. package/dist/cli/chunks/{hnsw-legacy-bridge-BYJY6BS3.js → hnsw-legacy-bridge-EQKXBLRX.js} +2 -2
  198. package/dist/cli/chunks/{hnswlib-node-DOAKQHTK.js → hnswlib-node-JG3WOXKM.js} +2 -2
  199. package/dist/cli/chunks/{hooks-AXI33SEK.js → hooks-6QZYELUZ.js} +51 -50
  200. package/dist/cli/chunks/hybrid-router-BALMPXND.js +2 -0
  201. package/dist/cli/chunks/{hypergraph-engine-SMYLLI4Z.js → hypergraph-engine-5HGNZFDH.js} +2 -2
  202. package/dist/cli/chunks/{hypergraph-handler-GYPRTMRE.js → hypergraph-handler-LO2ODOYD.js} +3 -3
  203. package/dist/cli/chunks/impact-analyzer-P6XLP3QX.js +2 -0
  204. package/dist/cli/chunks/{init-handler-DO5NFTZT.js → init-handler-E346YK6H.js} +6 -6
  205. package/dist/cli/chunks/init-wizard-HMU5OPKQ.js +2 -0
  206. package/dist/cli/chunks/kernel-HMSENQ6R.js +2 -0
  207. package/dist/cli/chunks/{kilocode-installer-CVWXBLG6.js → kilocode-installer-ZBJNB6N4.js} +2 -2
  208. package/dist/cli/chunks/{kiro-installer-DK7J7XL7.js → kiro-installer-3TWFO4QZ.js} +2 -2
  209. package/dist/cli/chunks/knowledge-graph-G7W72UC5.js +2 -0
  210. package/dist/cli/chunks/{learning-QHDQFBN4.js → learning-3MLFLTM2.js} +44 -44
  211. package/dist/cli/chunks/{llm-router-AMNXDGQ2.js → llm-router-XCBGZRKA.js} +4 -4
  212. package/dist/cli/chunks/llm-router-service-VCM7LAGO.js +2 -0
  213. package/dist/cli/chunks/{load-2NZHFE5D.js → load-P6XC2P74.js} +2 -2
  214. package/dist/cli/chunks/load-test-H5FATYS2.js +2 -0
  215. package/dist/cli/chunks/{mcp-MX4GB3MU.js → mcp-XEND7FPN.js} +2 -2
  216. package/dist/cli/chunks/{memory-NZACDD2C.js → memory-HZ2WSMWW.js} +5 -5
  217. package/dist/cli/chunks/memory-backend-OPHD5UCR.js +2 -0
  218. package/dist/cli/chunks/{memory-handlers-KV7IJ2XA.js → memory-handlers-EA5UFT4G.js} +2 -2
  219. package/dist/cli/chunks/{multi-model-executor-ABZUIP3S.js → multi-model-executor-IYEHZP73.js} +2 -2
  220. package/dist/cli/chunks/{opencode-installer-V3IFSJQT.js → opencode-installer-GH3VVBM2.js} +2 -2
  221. package/dist/cli/chunks/{orchestrator-GCK47DTJ.js → orchestrator-GOKIBTQG.js} +8 -8
  222. package/dist/cli/chunks/pattern-null-store-XJOXEDQO.js +2 -0
  223. package/dist/cli/chunks/pattern-usage-recorder-J2X4DD5S.js +2 -0
  224. package/dist/cli/chunks/{pipeline-ZIXBDYN5.js → pipeline-ELINTMVF.js} +2 -2
  225. package/dist/cli/chunks/{platform-4B7OOTAM.js → platform-PIPUB3LU.js} +2 -2
  226. package/dist/cli/chunks/{plugin-QQ3SOXY2.js → plugin-DXDNI6ZV.js} +2 -2
  227. package/dist/cli/chunks/{prime-radiant-advanced-wasm-4BYJTTZX.js → prime-radiant-advanced-wasm-K6WWURGX.js} +2 -2
  228. package/dist/cli/chunks/protocol-executor-XVN7GTLL.js +2 -0
  229. package/dist/cli/chunks/{protocol-handler-VNRDG3KY.js → protocol-handler-NMO7VI64.js} +2 -2
  230. package/dist/cli/chunks/{prove-WVPJXN6K.js → prove-4BLOE4SC.js} +2 -2
  231. package/dist/cli/chunks/provider-manager-NQICCJZZ.js +2 -0
  232. package/dist/cli/chunks/qe-reasoning-bank-SVCH233Z.js +2 -0
  233. package/dist/cli/chunks/{quality-E3VPSE2L.js → quality-MYXBP3GX.js} +2 -2
  234. package/dist/cli/chunks/{quality-gate-2ZPH7H7Z.js → quality-gate-AXPBK3MT.js} +3 -3
  235. package/dist/cli/chunks/queen-coordinator-Z3PBE4EH.js +2 -0
  236. package/dist/cli/chunks/{real-embeddings-CYHZLS5U.js → real-embeddings-4AKAVZIY.js} +2 -2
  237. package/dist/cli/chunks/{roocode-installer-A2PJDZ6G.js → roocode-installer-JE36LP4T.js} +2 -2
  238. package/dist/cli/chunks/router-HMWZW2SF.js +2 -0
  239. package/dist/cli/chunks/routing-feedback-ZZYHE2CL.js +2 -0
  240. package/dist/cli/chunks/{routing-handler-WASZ7YUM.js → routing-handler-LOJUJCVV.js} +2 -2
  241. package/dist/cli/chunks/ruvector-commands-6PNDYF32.js +8 -0
  242. package/dist/cli/chunks/{rvf-dual-writer-GC2SZLOS.js → rvf-dual-writer-GSTQPRNA.js} +2 -2
  243. package/dist/cli/chunks/{rvf-migration-adapter-RMXAP7UZ.js → rvf-migration-adapter-Z2DSEG3E.js} +2 -2
  244. package/dist/cli/chunks/{rvf-migration-coordinator-22D6BTI5.js → rvf-migration-coordinator-XRNODDH4.js} +2 -2
  245. package/dist/cli/chunks/rvf-native-adapter-ZPT4RLBE.js +2 -0
  246. package/dist/cli/chunks/{rvf-store-integrity-B5676PI2.js → rvf-store-integrity-LVEFIUUW.js} +2 -2
  247. package/dist/cli/chunks/safe-db-VMYUKPV6.js +2 -0
  248. package/dist/cli/chunks/schedule-DOQ4X4MH.js +2 -0
  249. package/dist/cli/chunks/scheduler-FE2DH224.js +2 -0
  250. package/dist/cli/chunks/{security-GYR2YU72.js → security-A2FK2DER.js} +3 -3
  251. package/dist/cli/chunks/{shared-rvf-adapter-RTWRMMCR.js → shared-rvf-adapter-V7IBEGQQ.js} +2 -2
  252. package/dist/cli/chunks/{shared-rvf-dual-writer-4YKFV67E.js → shared-rvf-dual-writer-SMGECN2K.js} +2 -2
  253. package/dist/cli/chunks/sqlite-persistence-TKCACSFQ.js +2 -0
  254. package/dist/cli/chunks/{status-handler-CBPWW3QD.js → status-handler-UHY36LOR.js} +2 -2
  255. package/dist/cli/chunks/{structural-health-CATUHO2L.js → structural-health-6BRP74EW.js} +2 -2
  256. package/dist/cli/chunks/{sync-ADHPFKN6.js → sync-4PDTGP34.js} +2 -2
  257. package/dist/cli/chunks/{sync-YFHOSBNL.js → sync-KI573HOR.js} +2 -2
  258. package/dist/cli/chunks/{task-handler-R2KZIXXF.js → task-handler-QQGSAK6T.js} +2 -2
  259. package/dist/cli/chunks/{task-handlers-HLXWXRC4.js → task-handlers-VUPCDYTI.js} +3 -3
  260. package/dist/cli/chunks/{test-A5SJ4CSH.js → test-CJLXBSRH.js} +4 -4
  261. package/dist/cli/chunks/{test-scheduling-NWAUSA6A.js → test-scheduling-IKPQPQUB.js} +3 -3
  262. package/dist/cli/chunks/{token-bootstrap-KOZLR5KD.js → token-bootstrap-FHLC3SHC.js} +2 -2
  263. package/dist/cli/chunks/{token-usage-7EDWF7XZ.js → token-usage-NCXAK7TB.js} +2 -2
  264. package/dist/cli/chunks/{transformers-OJGVAPSE.js → transformers-SZFBEILB.js} +2 -2
  265. package/dist/cli/chunks/{tree-sitter-wasm-parser-A2BLMPCC.js → tree-sitter-wasm-parser-LFGJRML7.js} +2 -2
  266. package/dist/cli/chunks/{types-AU2VADM6.js → types-NKXH7VTP.js} +2 -2
  267. package/dist/cli/chunks/unified-memory-2PA3CIQT.js +2 -0
  268. package/dist/cli/chunks/unified-memory-hnsw-W43H4ZKY.js +2 -0
  269. package/dist/cli/chunks/unified-persistence-SOW7AAZL.js +2 -0
  270. package/dist/cli/chunks/upgrade-PFCFH6M5.js +5 -0
  271. package/dist/cli/chunks/{validate-AMJG6AVL.js → validate-YEBJRWQM.js} +2 -2
  272. package/dist/cli/chunks/{validate-swarm-6J4VKCBH.js → validate-swarm-TD2NA6QF.js} +2 -2
  273. package/dist/cli/chunks/{vibium-YATMPDAF.js → vibium-ACC4GIOT.js} +2 -2
  274. package/dist/cli/chunks/visual-security-R6BVIOYU.js +2 -0
  275. package/dist/cli/chunks/{web-tree-sitter-UCDN3H4X.js → web-tree-sitter-IWVW5FIE.js} +2 -2
  276. package/dist/cli/chunks/{windsurf-installer-WHKYYVAM.js → windsurf-installer-5PVGLJ3T.js} +2 -2
  277. package/dist/cli/chunks/witness-chain-GSJW7VDF.js +2 -0
  278. package/dist/cli/chunks/{witness-chain-NDBGA7TH.js → witness-chain-VZB4LJOJ.js} +2 -2
  279. package/dist/cli/chunks/{witness-key-manager-2PQHTQVG.js → witness-key-manager-X632AZTN.js} +2 -2
  280. package/dist/cli/chunks/{workflow-F5HE4FGG.js → workflow-VNAYFUVY.js} +4 -4
  281. package/dist/cli/chunks/workflow-orchestrator-TXEMI5DD.js +2 -0
  282. package/dist/cli/chunks/{wrappers-UHG2KXGO.js → wrappers-KO3QXNZP.js} +2 -2
  283. package/dist/cli/commands/hooks-handlers/hooks-dream-learning.js +18 -8
  284. package/dist/cli/commands/learning.js +55 -17
  285. package/dist/cli/commands/ruvector-commands.js +1 -1
  286. package/dist/cli/commands/upgrade.d.ts +5 -1
  287. package/dist/cli/commands/upgrade.js +34 -6
  288. package/dist/init/phases/12-verification.js +8 -2
  289. package/dist/integrations/ruvector/feature-flags.d.ts +2 -2
  290. package/dist/integrations/ruvector/index.d.ts +1 -1
  291. package/dist/integrations/ruvector/page-rank-backends.d.ts +41 -0
  292. package/dist/integrations/ruvector/page-rank-backends.js +154 -0
  293. package/dist/integrations/ruvector/solver-adapter.d.ts +26 -29
  294. package/dist/integrations/ruvector/solver-adapter.js +56 -163
  295. package/dist/learning/pattern-promotion.d.ts +11 -1
  296. package/dist/learning/pattern-promotion.js +27 -0
  297. package/dist/learning/pattern-usage-recorder.d.ts +10 -0
  298. package/dist/learning/pattern-usage-recorder.js +47 -0
  299. package/dist/learning/qe-reasoning-bank-types.d.ts +2 -0
  300. package/dist/learning/qe-reasoning-bank.d.ts +6 -0
  301. package/dist/learning/qe-reasoning-bank.js +14 -0
  302. package/dist/mcp/bundle.js +311 -303
  303. package/package.json +1 -1
  304. package/dist/cli/chunks/adapter-DM2E2X4Q.js +0 -2
  305. package/dist/cli/chunks/aqe-learning-engine-STMX2LM7.js +0 -2
  306. package/dist/cli/chunks/base-EPDGZB2X.js +0 -2
  307. package/dist/cli/chunks/browser-workflow-CRZ6635H.js +0 -2
  308. package/dist/cli/chunks/chunk-5P2K6VVS.js +0 -14
  309. package/dist/cli/chunks/chunk-K6XYLMXO.js +0 -2
  310. package/dist/cli/chunks/client-IAOK3VSF.js +0 -2
  311. package/dist/cli/chunks/core-handlers-624KK362.js +0 -2
  312. package/dist/cli/chunks/cross-domain-router-2DAGKVTZ.js +0 -2
  313. package/dist/cli/chunks/dream-EYG2RXNJ.js +0 -2
  314. package/dist/cli/chunks/heartbeat-scheduler-43Q5PRW7.js +0 -2
  315. package/dist/cli/chunks/hnsw-adapter-XN2M6KGB.js +0 -2
  316. package/dist/cli/chunks/hnsw-index-4TEELZ7L.js +0 -2
  317. package/dist/cli/chunks/hybrid-router-L4IMWRLC.js +0 -2
  318. package/dist/cli/chunks/impact-analyzer-GNCMGV2E.js +0 -2
  319. package/dist/cli/chunks/init-wizard-6XY76PR6.js +0 -2
  320. package/dist/cli/chunks/kernel-KSJDDMZX.js +0 -2
  321. package/dist/cli/chunks/knowledge-graph-MDPRHCAD.js +0 -2
  322. package/dist/cli/chunks/llm-router-service-Y5Q7C6J5.js +0 -2
  323. package/dist/cli/chunks/load-test-NZZNYHOR.js +0 -2
  324. package/dist/cli/chunks/memory-backend-H3JXCBSZ.js +0 -2
  325. package/dist/cli/chunks/pattern-null-store-DXW5PB5E.js +0 -2
  326. package/dist/cli/chunks/pattern-usage-recorder-TAD2TRNY.js +0 -2
  327. package/dist/cli/chunks/protocol-executor-RRLH6VOX.js +0 -2
  328. package/dist/cli/chunks/provider-manager-S7QOPTRO.js +0 -2
  329. package/dist/cli/chunks/qe-reasoning-bank-SPKHDTEL.js +0 -2
  330. package/dist/cli/chunks/queen-coordinator-T7LEO2QL.js +0 -2
  331. package/dist/cli/chunks/router-LMBUXWVM.js +0 -2
  332. package/dist/cli/chunks/routing-feedback-A5JZ2HTV.js +0 -2
  333. package/dist/cli/chunks/ruvector-commands-USEIUYOT.js +0 -8
  334. package/dist/cli/chunks/rvf-native-adapter-IVKAJC5C.js +0 -2
  335. package/dist/cli/chunks/safe-db-MREVE34L.js +0 -2
  336. package/dist/cli/chunks/schedule-QUQSORLA.js +0 -2
  337. package/dist/cli/chunks/scheduler-POQUTUKP.js +0 -2
  338. package/dist/cli/chunks/sqlite-persistence-K4TX4WXV.js +0 -2
  339. package/dist/cli/chunks/unified-memory-EWCB3EHN.js +0 -2
  340. package/dist/cli/chunks/unified-memory-hnsw-PH2ECVGQ.js +0 -2
  341. package/dist/cli/chunks/unified-persistence-2AM7JHBZ.js +0 -2
  342. package/dist/cli/chunks/upgrade-JLXJ6UTR.js +0 -5
  343. package/dist/cli/chunks/visual-security-B4KSJUTG.js +0 -2
  344. package/dist/cli/chunks/witness-chain-QHAHCB7E.js +0 -2
  345. package/dist/cli/chunks/workflow-orchestrator-LYU63YL7.js +0 -2
@@ -1,4 +1,4 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.13.8");process.exit(0)}
2
- import{a as u,q as E}from"./chunk-YLFM5AZ4.js";import{c as k}from"./chunk-NW5XQQMC.js";import{existsSync as i,renameSync as p,copyFileSync as T,readdirSync as x,statSync as h,openSync as R,readSync as v,closeSync as B,writeFileSync as O,rmSync as $}from"node:fs";import{join as w,dirname as M}from"node:path";function D(e){if(!i(e))return!0;let t;try{t=h(e).size}catch{return!1}if(t===0)return!0;if(t<d.length)return!1;let r;try{r=R(e,"r");let o=Buffer.alloc(d.length);return v(r,o,0,d.length,0),o.equals(d)}catch{return!1}finally{if(r!==void 0)try{B(r)}catch{}}}function U(e){let t;try{return t=new u(e,{readonly:!0,fileMustExist:!0}),t.pragma("integrity_check",{simple:!0})==="ok"}catch{return!1}finally{try{t?.close()}catch{}}}function Q(e){return w(M(e),"backups","verified")}function C(e){if(!i(e))return null;let t=x(e).filter(r=>r.startsWith("memory-")&&r.endsWith(".db")).map(r=>{let o=w(e,r);return{path:o,mtime:h(o).mtimeMs}}).sort((r,o)=>o.mtime-r.mtime);for(let r of t)if(U(r.path))return r.path;return null}function S(e,t){if(D(e))return{restored:!1,reason:"healthy"};let r=t?.backupDir??Q(e),o=C(r);if(!o)return{restored:!1,reason:"no-verified-backup"};let f=`${e}.restore.lock`;try{O(f,String(process.pid),{flag:"wx"})}catch{return{restored:!1,reason:"restore-in-progress"}}try{if(D(e))return{restored:!1,reason:"healthy"};let l=t?.now??Date.now(),s=`${e}.corrupt-${l}`;try{i(e)&&p(e,s);for(let n of["-wal","-shm"])i(e+n)&&p(e+n,s+n)}catch{return{restored:!1,reason:"park-failed"}}let c=`${e}.restoring-${l}`;try{T(o,c),p(c,e)}catch{try{i(c)&&$(c,{force:!0}),!i(e)&&i(s)&&p(s,e)}catch{}return{restored:!1,reason:"copy-failed"}}return{restored:!0,reason:"restored-from-backup",backupUsed:o,parkedTo:s}}finally{try{$(f,{force:!0})}catch{}}}var d,_=k(()=>{"use strict";E();d=Buffer.concat([Buffer.from("SQLite format 3","latin1"),Buffer.from([0])])});import{basename as I}from"node:path";function H(e,t){let r=t?.readonly??!1,o=t?.fileMustExist??!1,f=t?.busyTimeout??5e3,l=t?.walMode??!r;if(t?.autoRestore&&!r){let a=S(e,{backupDir:t.backupDir});a.restored?console.warn(`[safe-db] memory DB at ${e} was malformed; auto-restored from ${a.backupUsed}. Corrupt original parked at ${a.parkedTo}.`):a.reason==="no-verified-backup"&&console.error(`[safe-db] memory DB at ${e} appears malformed and NO verified backup was found to restore from. Leaving it in place for manual inspection.`)}let s=(process.env.AQE_JOURNAL_MODE??"").trim().toUpperCase(),c=process.env.AQE_DISABLE_WAL==="1"||s==="DELETE"||s==="TRUNCATE",n=new u(e,{readonly:r,fileMustExist:o});if(n.pragma(`busy_timeout = ${f}`),c){if(!r){let a=(s||"DELETE").toUpperCase(),m=String(n.pragma("journal_mode",{simple:!0})??"").toUpperCase();if(m!==a){try{n.pragma(`journal_mode = ${a}`)}catch(y){let b=y?.code;if(n.close(),b!=="SQLITE_BUSY"&&b!=="SQLITE_LOCKED")throw y;let A=I(e),L=process.env.AQE_DISABLE_WAL==="1"?"AQE_DISABLE_WAL=1":`AQE_JOURNAL_MODE=${s}`;throw new Error(`[safe-db] cannot switch ${e} from '${m}' to '${a}' \u2014 another process holds the database open. ${L} declares WAL unsafe on this filesystem, so writing in '${m}' is NOT safe and this open is refused. Find the holder with:
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.13.10");process.exit(0)}
2
+ import{a as u,q as E}from"./chunk-NRD76M7A.js";import{c as k}from"./chunk-W3DCBOLL.js";import{existsSync as i,renameSync as p,copyFileSync as T,readdirSync as x,statSync as h,openSync as R,readSync as v,closeSync as B,writeFileSync as O,rmSync as $}from"node:fs";import{join as w,dirname as M}from"node:path";function D(e){if(!i(e))return!0;let t;try{t=h(e).size}catch{return!1}if(t===0)return!0;if(t<d.length)return!1;let r;try{r=R(e,"r");let o=Buffer.alloc(d.length);return v(r,o,0,d.length,0),o.equals(d)}catch{return!1}finally{if(r!==void 0)try{B(r)}catch{}}}function U(e){let t;try{return t=new u(e,{readonly:!0,fileMustExist:!0}),t.pragma("integrity_check",{simple:!0})==="ok"}catch{return!1}finally{try{t?.close()}catch{}}}function Q(e){return w(M(e),"backups","verified")}function C(e){if(!i(e))return null;let t=x(e).filter(r=>r.startsWith("memory-")&&r.endsWith(".db")).map(r=>{let o=w(e,r);return{path:o,mtime:h(o).mtimeMs}}).sort((r,o)=>o.mtime-r.mtime);for(let r of t)if(U(r.path))return r.path;return null}function S(e,t){if(D(e))return{restored:!1,reason:"healthy"};let r=t?.backupDir??Q(e),o=C(r);if(!o)return{restored:!1,reason:"no-verified-backup"};let f=`${e}.restore.lock`;try{O(f,String(process.pid),{flag:"wx"})}catch{return{restored:!1,reason:"restore-in-progress"}}try{if(D(e))return{restored:!1,reason:"healthy"};let l=t?.now??Date.now(),s=`${e}.corrupt-${l}`;try{i(e)&&p(e,s);for(let n of["-wal","-shm"])i(e+n)&&p(e+n,s+n)}catch{return{restored:!1,reason:"park-failed"}}let c=`${e}.restoring-${l}`;try{T(o,c),p(c,e)}catch{try{i(c)&&$(c,{force:!0}),!i(e)&&i(s)&&p(s,e)}catch{}return{restored:!1,reason:"copy-failed"}}return{restored:!0,reason:"restored-from-backup",backupUsed:o,parkedTo:s}}finally{try{$(f,{force:!0})}catch{}}}var d,_=k(()=>{"use strict";E();d=Buffer.concat([Buffer.from("SQLite format 3","latin1"),Buffer.from([0])])});import{basename as I}from"node:path";function H(e,t){let r=t?.readonly??!1,o=t?.fileMustExist??!1,f=t?.busyTimeout??5e3,l=t?.walMode??!r;if(t?.autoRestore&&!r){let a=S(e,{backupDir:t.backupDir});a.restored?console.warn(`[safe-db] memory DB at ${e} was malformed; auto-restored from ${a.backupUsed}. Corrupt original parked at ${a.parkedTo}.`):a.reason==="no-verified-backup"&&console.error(`[safe-db] memory DB at ${e} appears malformed and NO verified backup was found to restore from. Leaving it in place for manual inspection.`)}let s=(process.env.AQE_JOURNAL_MODE??"").trim().toUpperCase(),c=process.env.AQE_DISABLE_WAL==="1"||s==="DELETE"||s==="TRUNCATE",n=new u(e,{readonly:r,fileMustExist:o});if(n.pragma(`busy_timeout = ${f}`),c){if(!r){let a=(s||"DELETE").toUpperCase(),m=String(n.pragma("journal_mode",{simple:!0})??"").toUpperCase();if(m!==a){try{n.pragma(`journal_mode = ${a}`)}catch(y){let b=y?.code;if(n.close(),b!=="SQLITE_BUSY"&&b!=="SQLITE_LOCKED")throw y;let A=I(e),L=process.env.AQE_DISABLE_WAL==="1"?"AQE_DISABLE_WAL=1":`AQE_JOURNAL_MODE=${s}`;throw new Error(`[safe-db] cannot switch ${e} from '${m}' to '${a}' \u2014 another process holds the database open. ${L} declares WAL unsafe on this filesystem, so writing in '${m}' is NOT safe and this open is refused. Find the holder with:
3
3
  for p in /proc/[0-9]*; do for f in $p/fd/*; do readlink "$f" 2>/dev/null | grep -q ${JSON.stringify(A)} && echo "$(basename $p) $(tr '\\0' ' ' < $p/cmdline)"; done; done | sort -u
4
4
  then stop it and retry. Original error: ${y.message}`)}let g=String(n.pragma("journal_mode",{simple:!0})??"").toUpperCase();if(g!==a)throw n.close(),new Error(`[safe-db] journal_mode switch to '${a}' silently did not take on ${e} (still '${g}'). Refusing to write in an unsafe mode.`)}}}else l&&n.pragma("journal_mode = WAL");return n}var W=k(()=>{E();_()});export{H as a,W as b};
@@ -1,3 +1,3 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.13.8");process.exit(0)}
2
- import{b as c,d as p}from"./chunk-HD22NMGP.js";import{a as f}from"./chunk-NW5XQQMC.js";p();import{existsSync as l,readFileSync as i}from"node:fs";import{join as a}from"node:path";import{execSync as m}from"node:child_process";var s=null,d=0,g=6e4;function S(){s=null,d=0}function b(e){if(s&&Date.now()-d<g)return s;let n=w(e);return s=n,d=Date.now(),n}function w(e){let n=h(e);if(n)return n;let r=v(e);if(r)return r;let t=k(e);return t||{available:!1}}function h(e){let n=a(e,".mcp.json");if(l(n))try{let o=c(i(n,"utf-8"));if(o.mcpServers?.ruflo||o.mcpServers?.["claude-flow"])return{available:!0,method:"mcp-config"}}catch{}let r=a(e,".claude","mcp.json");if(l(r))try{let o=c(i(r,"utf-8"));if(o.mcpServers?.ruflo||o.mcpServers?.["claude-flow"])return{available:!0,method:"mcp-config"}}catch{}let t=a(e,".claude","settings.json");if(l(t))try{let o=c(i(t,"utf-8")),u=o.mcpServers||o.mcp?.servers||{};if(u.ruflo||u["claude-flow"]||u["@anthropic/claude-flow"])return{available:!0,method:"mcp-config"}}catch{}return null}function v(e){let n=a(e,"package.json");if(!l(n))return null;try{let r=c(i(n,"utf-8")),t={...r.dependencies,...r.devDependencies};if(t.ruflo||t["@claude-flow/cli"]||t["claude-flow"])return{available:!0,method:"npm-dependency"}}catch{}return null}function k(e){for(let n of["ruflo","@claude-flow/cli"])try{return{available:!0,method:"npx-cached",version:m(`npx --no-install ${n} --version`,{encoding:"utf-8",timeout:5e3,cwd:e,stdio:["pipe","pipe","pipe"]}).trim().match(/\d+\.\d+\.\d+[\w.-]*/)?.[0]}}catch{}return null}function x(){for(let e of["ruflo","@claude-flow/cli"])try{return f.resolve(`${e}/package.json`),e}catch{}return"ruflo"}function P(){return[" Claude Flow not found \u2014 running in standalone mode.",""," Claude Flow adds optional features:"," - SONA trajectory tracking (reinforcement learning)"," - 3-tier model routing (haiku / sonnet / opus)"," - Codebase pretrain analysis",""," To install later:"," npm install -g ruflo"," claude mcp add ruflo -- npx -y ruflo@3.5.18"," aqe init --auto --with-claude-flow"].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.13.10");process.exit(0)}
2
+ import{b as c,d as p}from"./chunk-GQ6H37RN.js";import{a as f}from"./chunk-W3DCBOLL.js";p();import{existsSync as l,readFileSync as i}from"node:fs";import{join as a}from"node:path";import{execSync as m}from"node:child_process";var s=null,d=0,g=6e4;function S(){s=null,d=0}function b(e){if(s&&Date.now()-d<g)return s;let n=w(e);return s=n,d=Date.now(),n}function w(e){let n=h(e);if(n)return n;let r=v(e);if(r)return r;let t=k(e);return t||{available:!1}}function h(e){let n=a(e,".mcp.json");if(l(n))try{let o=c(i(n,"utf-8"));if(o.mcpServers?.ruflo||o.mcpServers?.["claude-flow"])return{available:!0,method:"mcp-config"}}catch{}let r=a(e,".claude","mcp.json");if(l(r))try{let o=c(i(r,"utf-8"));if(o.mcpServers?.ruflo||o.mcpServers?.["claude-flow"])return{available:!0,method:"mcp-config"}}catch{}let t=a(e,".claude","settings.json");if(l(t))try{let o=c(i(t,"utf-8")),u=o.mcpServers||o.mcp?.servers||{};if(u.ruflo||u["claude-flow"]||u["@anthropic/claude-flow"])return{available:!0,method:"mcp-config"}}catch{}return null}function v(e){let n=a(e,"package.json");if(!l(n))return null;try{let r=c(i(n,"utf-8")),t={...r.dependencies,...r.devDependencies};if(t.ruflo||t["@claude-flow/cli"]||t["claude-flow"])return{available:!0,method:"npm-dependency"}}catch{}return null}function k(e){for(let n of["ruflo","@claude-flow/cli"])try{return{available:!0,method:"npx-cached",version:m(`npx --no-install ${n} --version`,{encoding:"utf-8",timeout:5e3,cwd:e,stdio:["pipe","pipe","pipe"]}).trim().match(/\d+\.\d+\.\d+[\w.-]*/)?.[0]}}catch{}return null}function x(){for(let e of["ruflo","@claude-flow/cli"])try{return f.resolve(`${e}/package.json`),e}catch{}return"ruflo"}function P(){return[" Claude Flow not found \u2014 running in standalone mode.",""," Claude Flow adds optional features:"," - SONA trajectory tracking (reinforcement learning)"," - 3-tier model routing (haiku / sonnet / opus)"," - Codebase pretrain analysis",""," To install later:"," npm install -g ruflo"," claude mcp add ruflo -- npx -y ruflo@3.5.18"," aqe init --auto --with-claude-flow"].join(`
3
3
  `)}export{S as a,b,x as c,P as d};
@@ -1,2 +1,2 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.13.8");process.exit(0)}
2
- import{c as w,d as E,f as T}from"./chunk-NW5XQQMC.js";var d=E((b,u)=>{"use strict";var _=typeof Buffer<"u",a=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,l=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function p(r,t,e){e==null&&t!==null&&typeof t=="object"&&(e=t,t=void 0),_&&Buffer.isBuffer(r)&&(r=r.toString()),r&&r.charCodeAt(0)===65279&&(r=r.slice(1));let o=JSON.parse(r,t);if(o===null||typeof o!="object")return o;let n=e&&e.protoAction||"error",c=e&&e.constructorAction||"error";if(n==="ignore"&&c==="ignore")return o;if(n!=="ignore"&&c!=="ignore"){if(a.test(r)===!1&&l.test(r)===!1)return o}else if(n!=="ignore"&&c==="ignore"){if(a.test(r)===!1)return o}else if(l.test(r)===!1)return o;return y(o,{protoAction:n,constructorAction:c,safe:e&&e.safe})}function y(r,{protoAction:t="error",constructorAction:e="error",safe:o}={}){let n=[r];for(;n.length;){let c=n;n=[];for(let s of c){if(t!=="ignore"&&Object.prototype.hasOwnProperty.call(s,"__proto__")){if(o===!0)return null;if(t==="error")throw new SyntaxError("Object contains forbidden prototype property");delete s.__proto__}if(e!=="ignore"&&Object.prototype.hasOwnProperty.call(s,"constructor")&&s.constructor!==null&&typeof s.constructor=="object"&&Object.prototype.hasOwnProperty.call(s.constructor,"prototype")){if(o===!0)return null;if(e==="error")throw new SyntaxError("Object contains forbidden prototype property");delete s.constructor}for(let h in s){let f=s[h];f&&typeof f=="object"&&n.push(f)}}}return r}function i(r,t,e){let{stackTraceLimit:o}=Error;Error.stackTraceLimit=0;try{return p(r,t,e)}finally{Error.stackTraceLimit=o}}function m(r,t){let{stackTraceLimit:e}=Error;Error.stackTraceLimit=0;try{return p(r,t,{safe:!0})}catch{return}finally{Error.stackTraceLimit=e}}u.exports=i;u.exports.default=i;u.exports.parse=i;u.exports.safeParse=m;u.exports.scan=y});function F(r){return g.default.parse(r,void 0,{protoAction:"remove",constructorAction:"remove"})}function j(r,t){try{return F(r)}catch(e){throw new Error(`Invalid JSON in --${t}: ${e instanceof Error?e.message:"Parse error"}`)}}var g,O=w(()=>{"use strict";g=T(d(),1)});export{d as a,F as b,j as c,O as d};
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.13.10");process.exit(0)}
2
+ import{c as w,d as E,f as T}from"./chunk-W3DCBOLL.js";var d=E((b,u)=>{"use strict";var _=typeof Buffer<"u",a=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,l=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function p(r,t,e){e==null&&t!==null&&typeof t=="object"&&(e=t,t=void 0),_&&Buffer.isBuffer(r)&&(r=r.toString()),r&&r.charCodeAt(0)===65279&&(r=r.slice(1));let o=JSON.parse(r,t);if(o===null||typeof o!="object")return o;let n=e&&e.protoAction||"error",c=e&&e.constructorAction||"error";if(n==="ignore"&&c==="ignore")return o;if(n!=="ignore"&&c!=="ignore"){if(a.test(r)===!1&&l.test(r)===!1)return o}else if(n!=="ignore"&&c==="ignore"){if(a.test(r)===!1)return o}else if(l.test(r)===!1)return o;return y(o,{protoAction:n,constructorAction:c,safe:e&&e.safe})}function y(r,{protoAction:t="error",constructorAction:e="error",safe:o}={}){let n=[r];for(;n.length;){let c=n;n=[];for(let s of c){if(t!=="ignore"&&Object.prototype.hasOwnProperty.call(s,"__proto__")){if(o===!0)return null;if(t==="error")throw new SyntaxError("Object contains forbidden prototype property");delete s.__proto__}if(e!=="ignore"&&Object.prototype.hasOwnProperty.call(s,"constructor")&&s.constructor!==null&&typeof s.constructor=="object"&&Object.prototype.hasOwnProperty.call(s.constructor,"prototype")){if(o===!0)return null;if(e==="error")throw new SyntaxError("Object contains forbidden prototype property");delete s.constructor}for(let h in s){let f=s[h];f&&typeof f=="object"&&n.push(f)}}}return r}function i(r,t,e){let{stackTraceLimit:o}=Error;Error.stackTraceLimit=0;try{return p(r,t,e)}finally{Error.stackTraceLimit=o}}function m(r,t){let{stackTraceLimit:e}=Error;Error.stackTraceLimit=0;try{return p(r,t,{safe:!0})}catch{return}finally{Error.stackTraceLimit=e}}u.exports=i;u.exports.default=i;u.exports.parse=i;u.exports.safeParse=m;u.exports.scan=y});function F(r){return g.default.parse(r,void 0,{protoAction:"remove",constructorAction:"remove"})}function j(r,t){try{return F(r)}catch(e){throw new Error(`Invalid JSON in --${t}: ${e instanceof Error?e.message:"Parse error"}`)}}var g,O=w(()=>{"use strict";g=T(d(),1)});export{d as a,F as b,j as c,O as d};
@@ -1,2 +1,2 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.13.8");process.exit(0)}
2
- import{a as N,d as P}from"./chunk-7TK24XF7.js";import{b,e as k}from"./chunk-NJ7SVXE6.js";import{a as p,d as F}from"./chunk-7VWAKVRE.js";import{a as T,b as E}from"./chunk-XJT6TR5E.js";import{a as H,b as O}from"./chunk-SECJ2IQE.js";import{c as z,g as S}from"./chunk-NW5XQQMC.js";function x(l){let e=0;for(let t=0;t<l.length;t++)e+=l[t]*l[t];return Math.sqrt(e)}function C(l,e,t,s){let n=t*s;if(n===0)return 0;let o=0;for(let r=0;r<l.length;r++)o+=l[r]*e[r];return o/n}function U(l={}){let{name:e="default",...t}=l;return new M(e,t)}var f,w,v,I,A,M,D=z(()=>{F();P();k();E();f=null,w=null;try{let l=(O(),S(H));f=l.differentiableSearch,w=l.init}catch{}v=class{data=[];compareFn;constructor(e){this.compareFn=e}push(e){this.data.push(e),this.bubbleUp(this.data.length-1)}pop(){if(this.data.length===0)return;let e=this.data[0],t=this.data.pop();return this.data.length>0&&(this.data[0]=t,this.sinkDown(0)),e}peek(){return this.data[0]}size(){return this.data.length}bubbleUp(e){for(;e>0;){let t=e-1>>1;if(this.compareFn(this.data[e],this.data[t])<0)[this.data[e],this.data[t]]=[this.data[t],this.data[e]],e=t;else break}}sinkDown(e){let t=this.data.length;for(;;){let s=e,n=2*e+1,o=2*e+2;if(n<t&&this.compareFn(this.data[n],this.data[s])<0&&(s=n),o<t&&this.compareFn(this.data[o],this.data[s])<0&&(s=o),s!==e)[this.data[e],this.data[s]]=[this.data[s],this.data[e]],e=s;else break}}},I=class{nodes=new Map;M=b.M_CONNECTIONS;Mmax0=b.M_CONNECTIONS*2;efConstruction=b.EF_CONSTRUCTION;efSearch=b.EF_SEARCH;mL=1/Math.log(b.M_CONNECTIONS);maxLevel=16;entryPoint=null;currentMaxLevel=-1;randomLevel(){return Math.min(Math.floor(-Math.log(N())*this.mL),this.maxLevel)}similarity(e,t){let s=this.nodes.get(t);return s?p(e,s.embedding):-1}searchLayer(e,t,s){let n=t,o=this.similarity(e,n),r=!0;for(;r;){r=!1;let a=this.nodes.get(n);if(!a)break;let h=a.neighbors.get(s)??[];for(let d of h){if(!this.nodes.has(d))continue;let i=this.similarity(e,d);i>o&&(n=d,o=i,r=!0)}}return n}searchLayerBeam(e,t,s,n){let o=new Set(t),r=t.filter(i=>this.nodes.has(i)).map(i=>({id:i,score:this.similarity(e,i)})),a=new v((i,c)=>c.score-i.score),h=new v((i,c)=>i.score-c.score);for(let i of r)a.push(i),h.push(i);for(;a.size()>0;){let i=a.pop();if(h.size()>=n&&i.score<h.peek().score)break;let c=this.nodes.get(i.id);if(!c)continue;let u=c.neighbors.get(s)??[];for(let m of u){if(o.has(m)||(o.add(m),!this.nodes.has(m)))continue;let g=this.similarity(e,m),y=h.size()>=n?h.peek().score:-1/0;if(h.size()<n||g>y){let L={id:m,score:g};a.push(L),h.push(L),h.size()>n&&h.pop()}}}let d=[];for(;h.size()>0;)d.push(h.pop());return d.reverse(),d}selectNeighbors(e,t,s){return t.sort((n,o)=>o.score-n.score).slice(0,s).map(n=>n.id)}getMaxConnections(e){return e===0?this.Mmax0:this.M}add(e,t){this.nodes.has(e)&&this.remove(e);let s=this.randomLevel(),n={id:e,embedding:t,neighbors:new Map};for(let r=0;r<=s;r++)n.neighbors.set(r,[]);if(this.nodes.set(e,n),this.entryPoint===null){this.entryPoint=e,this.currentMaxLevel=s;return}let o=this.entryPoint;for(let r=this.currentMaxLevel;r>s;r--)o=this.searchLayer(t,o,r);for(let r=Math.min(s,this.currentMaxLevel);r>=0;r--){let a=this.getMaxConnections(r),h=this.searchLayerBeam(t,[o],r,this.efConstruction),d=this.selectNeighbors(t,h,a);n.neighbors.set(r,[...d]);for(let i of d){let c=this.nodes.get(i);if(!c)continue;let u=c.neighbors.get(r)??[];if(u.push(e),u.length>a){let m=u.filter(g=>this.nodes.has(g)).map(g=>({id:g,score:p(c.embedding,this.nodes.get(g).embedding)}));m.sort((g,y)=>y.score-g.score),c.neighbors.set(r,m.slice(0,a).map(g=>g.id))}else c.neighbors.set(r,u)}h.length>0&&(o=h[0].id)}s>this.currentMaxLevel&&(this.entryPoint=e,this.currentMaxLevel=s)}remove(e){let t=this.nodes.get(e);if(!t)return!1;for(let[s,n]of t.neighbors.entries())for(let o of n){let r=this.nodes.get(o);if(!r)continue;let a=r.neighbors.get(s);if(!a)continue;let h=a.indexOf(e);h!==-1&&a.splice(h,1);let d=this.getMaxConnections(s);if(a.length<d){for(let i of n)if(i!==o&&i!==e&&this.nodes.has(i)&&!a.includes(i)){a.push(i);let c=this.nodes.get(i);if(c){let u=c.neighbors.get(s)??[];!u.includes(o)&&u.length<d&&(u.push(o),c.neighbors.set(s,u))}if(a.length>=d)break}}r.neighbors.set(s,a)}if(this.nodes.delete(e),this.entryPoint===e)if(this.nodes.size===0)this.entryPoint=null,this.currentMaxLevel=-1;else{let s=null,n=-1;for(let[o,r]of this.nodes.entries()){let a=-1;for(let h of r.neighbors.keys())h>a&&(a=h);a>n&&(n=a,s=o)}this.entryPoint=s,this.currentMaxLevel=n}return!0}search(e,t){if(this.nodes.size===0||this.entryPoint===null)return[];if(this.nodes.size===1){let r=this.nodes.get(this.entryPoint);return[{id:r.id,score:p(e,r.embedding)}]}let s=this.entryPoint;for(let r=this.currentMaxLevel;r>0;r--)s=this.searchLayer(e,s,r);let n=Math.max(this.efSearch,t);return this.searchLayerBeam(e,[s],0,n).slice(0,t)}size(){return this.nodes.size}clear(){this.nodes.clear(),this.entryPoint=null,this.currentMaxLevel=-1}};A=class{ids=[];vectors=[];norms=[];idToIndex=new Map;initialized=!1;constructor(){if(w&&!this.initialized)try{w(),this.initialized=!0}catch{this.initialized=f!==null}}add(e,t){let s=new Float32Array(t),n=x(s);if(this.idToIndex.has(e)){let r=this.idToIndex.get(e);this.vectors[r]=s,this.norms[r]=n;return}let o=this.ids.length;this.ids.push(e),this.vectors.push(s),this.norms.push(n),this.idToIndex.set(e,o)}search(e,t){if(this.ids.length===0)return[];let s=Math.min(t,this.ids.length),n=this.vectors.length>0?this.vectors[0].length:0,o=e.length,r=n===o;if(f&&this.vectors.length>0&&r){let i=new Float32Array(e),c=x(i);return f(i,this.vectors,s,1).indices.map(m=>({id:this.ids[m],score:C(i,this.vectors[m],c,this.norms[m])}))}let a=new Float32Array(e),h=x(a),d=[];for(let i=0;i<this.ids.length;i++){let c=this.vectors[i];if(c.length!==a.length){i===0&&console.warn(`[RuvectorFlatIndex] Dimension mismatch: query=${a.length}, stored=${c.length}. Skipping ${this.ids.length} mismatched vectors. Re-index with correct dimensions.`);continue}else d.push({id:this.ids[i],score:C(a,c,h,this.norms[i])})}return d.sort((i,c)=>c.score-i.score),d.slice(0,s)}remove(e){let t=this.idToIndex.get(e);if(t===void 0)return!1;let s=this.ids.length-1;if(t!==s){let n=this.ids[s];this.ids[t]=n,this.vectors[t]=this.vectors[s],this.norms[t]=this.norms[s],this.idToIndex.set(n,t)}return this.ids.pop(),this.vectors.pop(),this.norms.pop(),this.idToIndex.delete(e),!0}clear(){this.ids=[],this.vectors=[],this.norms=[],this.idToIndex.clear()}size(){return this.ids.length}},M=class{adapter;constructor(e,t){this.adapter=T.create(e,t)}add(e,t){this.adapter.addByStringId(e,t)}search(e,t){return this.adapter.searchByArray(e,t)}remove(e){return this.adapter.removeByStringId(e)}clear(){this.adapter.clear()}size(){return this.adapter.size()}recall(){return this.adapter.recall()}getProvider(){return this.adapter}}});export{v as a,I as b,A as c,M as d,U as e,D as f};
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.13.10");process.exit(0)}
2
+ import{a as N,d as P}from"./chunk-PUN3KZ6N.js";import{b,e as k}from"./chunk-WIB6KRFJ.js";import{a as p,d as F}from"./chunk-Q7QKJY6Y.js";import{a as T,b as E}from"./chunk-JWV5ZM2S.js";import{a as H,b as O}from"./chunk-EJRDL5W5.js";import{c as z,g as S}from"./chunk-W3DCBOLL.js";function x(l){let e=0;for(let t=0;t<l.length;t++)e+=l[t]*l[t];return Math.sqrt(e)}function C(l,e,t,s){let n=t*s;if(n===0)return 0;let o=0;for(let r=0;r<l.length;r++)o+=l[r]*e[r];return o/n}function U(l={}){let{name:e="default",...t}=l;return new M(e,t)}var f,w,v,I,A,M,D=z(()=>{F();P();k();E();f=null,w=null;try{let l=(O(),S(H));f=l.differentiableSearch,w=l.init}catch{}v=class{data=[];compareFn;constructor(e){this.compareFn=e}push(e){this.data.push(e),this.bubbleUp(this.data.length-1)}pop(){if(this.data.length===0)return;let e=this.data[0],t=this.data.pop();return this.data.length>0&&(this.data[0]=t,this.sinkDown(0)),e}peek(){return this.data[0]}size(){return this.data.length}bubbleUp(e){for(;e>0;){let t=e-1>>1;if(this.compareFn(this.data[e],this.data[t])<0)[this.data[e],this.data[t]]=[this.data[t],this.data[e]],e=t;else break}}sinkDown(e){let t=this.data.length;for(;;){let s=e,n=2*e+1,o=2*e+2;if(n<t&&this.compareFn(this.data[n],this.data[s])<0&&(s=n),o<t&&this.compareFn(this.data[o],this.data[s])<0&&(s=o),s!==e)[this.data[e],this.data[s]]=[this.data[s],this.data[e]],e=s;else break}}},I=class{nodes=new Map;M=b.M_CONNECTIONS;Mmax0=b.M_CONNECTIONS*2;efConstruction=b.EF_CONSTRUCTION;efSearch=b.EF_SEARCH;mL=1/Math.log(b.M_CONNECTIONS);maxLevel=16;entryPoint=null;currentMaxLevel=-1;randomLevel(){return Math.min(Math.floor(-Math.log(N())*this.mL),this.maxLevel)}similarity(e,t){let s=this.nodes.get(t);return s?p(e,s.embedding):-1}searchLayer(e,t,s){let n=t,o=this.similarity(e,n),r=!0;for(;r;){r=!1;let a=this.nodes.get(n);if(!a)break;let h=a.neighbors.get(s)??[];for(let d of h){if(!this.nodes.has(d))continue;let i=this.similarity(e,d);i>o&&(n=d,o=i,r=!0)}}return n}searchLayerBeam(e,t,s,n){let o=new Set(t),r=t.filter(i=>this.nodes.has(i)).map(i=>({id:i,score:this.similarity(e,i)})),a=new v((i,c)=>c.score-i.score),h=new v((i,c)=>i.score-c.score);for(let i of r)a.push(i),h.push(i);for(;a.size()>0;){let i=a.pop();if(h.size()>=n&&i.score<h.peek().score)break;let c=this.nodes.get(i.id);if(!c)continue;let u=c.neighbors.get(s)??[];for(let m of u){if(o.has(m)||(o.add(m),!this.nodes.has(m)))continue;let g=this.similarity(e,m),y=h.size()>=n?h.peek().score:-1/0;if(h.size()<n||g>y){let L={id:m,score:g};a.push(L),h.push(L),h.size()>n&&h.pop()}}}let d=[];for(;h.size()>0;)d.push(h.pop());return d.reverse(),d}selectNeighbors(e,t,s){return t.sort((n,o)=>o.score-n.score).slice(0,s).map(n=>n.id)}getMaxConnections(e){return e===0?this.Mmax0:this.M}add(e,t){this.nodes.has(e)&&this.remove(e);let s=this.randomLevel(),n={id:e,embedding:t,neighbors:new Map};for(let r=0;r<=s;r++)n.neighbors.set(r,[]);if(this.nodes.set(e,n),this.entryPoint===null){this.entryPoint=e,this.currentMaxLevel=s;return}let o=this.entryPoint;for(let r=this.currentMaxLevel;r>s;r--)o=this.searchLayer(t,o,r);for(let r=Math.min(s,this.currentMaxLevel);r>=0;r--){let a=this.getMaxConnections(r),h=this.searchLayerBeam(t,[o],r,this.efConstruction),d=this.selectNeighbors(t,h,a);n.neighbors.set(r,[...d]);for(let i of d){let c=this.nodes.get(i);if(!c)continue;let u=c.neighbors.get(r)??[];if(u.push(e),u.length>a){let m=u.filter(g=>this.nodes.has(g)).map(g=>({id:g,score:p(c.embedding,this.nodes.get(g).embedding)}));m.sort((g,y)=>y.score-g.score),c.neighbors.set(r,m.slice(0,a).map(g=>g.id))}else c.neighbors.set(r,u)}h.length>0&&(o=h[0].id)}s>this.currentMaxLevel&&(this.entryPoint=e,this.currentMaxLevel=s)}remove(e){let t=this.nodes.get(e);if(!t)return!1;for(let[s,n]of t.neighbors.entries())for(let o of n){let r=this.nodes.get(o);if(!r)continue;let a=r.neighbors.get(s);if(!a)continue;let h=a.indexOf(e);h!==-1&&a.splice(h,1);let d=this.getMaxConnections(s);if(a.length<d){for(let i of n)if(i!==o&&i!==e&&this.nodes.has(i)&&!a.includes(i)){a.push(i);let c=this.nodes.get(i);if(c){let u=c.neighbors.get(s)??[];!u.includes(o)&&u.length<d&&(u.push(o),c.neighbors.set(s,u))}if(a.length>=d)break}}r.neighbors.set(s,a)}if(this.nodes.delete(e),this.entryPoint===e)if(this.nodes.size===0)this.entryPoint=null,this.currentMaxLevel=-1;else{let s=null,n=-1;for(let[o,r]of this.nodes.entries()){let a=-1;for(let h of r.neighbors.keys())h>a&&(a=h);a>n&&(n=a,s=o)}this.entryPoint=s,this.currentMaxLevel=n}return!0}search(e,t){if(this.nodes.size===0||this.entryPoint===null)return[];if(this.nodes.size===1){let r=this.nodes.get(this.entryPoint);return[{id:r.id,score:p(e,r.embedding)}]}let s=this.entryPoint;for(let r=this.currentMaxLevel;r>0;r--)s=this.searchLayer(e,s,r);let n=Math.max(this.efSearch,t);return this.searchLayerBeam(e,[s],0,n).slice(0,t)}size(){return this.nodes.size}clear(){this.nodes.clear(),this.entryPoint=null,this.currentMaxLevel=-1}};A=class{ids=[];vectors=[];norms=[];idToIndex=new Map;initialized=!1;constructor(){if(w&&!this.initialized)try{w(),this.initialized=!0}catch{this.initialized=f!==null}}add(e,t){let s=new Float32Array(t),n=x(s);if(this.idToIndex.has(e)){let r=this.idToIndex.get(e);this.vectors[r]=s,this.norms[r]=n;return}let o=this.ids.length;this.ids.push(e),this.vectors.push(s),this.norms.push(n),this.idToIndex.set(e,o)}search(e,t){if(this.ids.length===0)return[];let s=Math.min(t,this.ids.length),n=this.vectors.length>0?this.vectors[0].length:0,o=e.length,r=n===o;if(f&&this.vectors.length>0&&r){let i=new Float32Array(e),c=x(i);return f(i,this.vectors,s,1).indices.map(m=>({id:this.ids[m],score:C(i,this.vectors[m],c,this.norms[m])}))}let a=new Float32Array(e),h=x(a),d=[];for(let i=0;i<this.ids.length;i++){let c=this.vectors[i];if(c.length!==a.length){i===0&&console.warn(`[RuvectorFlatIndex] Dimension mismatch: query=${a.length}, stored=${c.length}. Skipping ${this.ids.length} mismatched vectors. Re-index with correct dimensions.`);continue}else d.push({id:this.ids[i],score:C(a,c,h,this.norms[i])})}return d.sort((i,c)=>c.score-i.score),d.slice(0,s)}remove(e){let t=this.idToIndex.get(e);if(t===void 0)return!1;let s=this.ids.length-1;if(t!==s){let n=this.ids[s];this.ids[t]=n,this.vectors[t]=this.vectors[s],this.norms[t]=this.norms[s],this.idToIndex.set(n,t)}return this.ids.pop(),this.vectors.pop(),this.norms.pop(),this.idToIndex.delete(e),!0}clear(){this.ids=[],this.vectors=[],this.norms=[],this.idToIndex.clear()}size(){return this.ids.length}},M=class{adapter;constructor(e,t){this.adapter=T.create(e,t)}add(e,t){this.adapter.addByStringId(e,t)}search(e,t){return this.adapter.searchByArray(e,t)}remove(e){return this.adapter.removeByStringId(e)}clear(){this.adapter.clear()}size(){return this.adapter.size()}recall(){return this.adapter.recall()}getProvider(){return this.adapter}}});export{v as a,I as b,A as c,M as d,U as e,D as f};
@@ -1,2 +1,2 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.13.8");process.exit(0)}
2
- import{c as h,e as v,g as T}from"./chunk-NW5XQQMC.js";var y={};v(y,{DotProductAttention:()=>z,FlashAttention:()=>k,HyperbolicAttention:()=>C,LinearAttention:()=>j,MoEAttention:()=>W,MultiHeadAttention:()=>F,RuvectorLayer:()=>O,SonaEngine:()=>K,TensorCompress:()=>E,default:()=>I,differentiableSearch:()=>L,getCompressionLevel:()=>B,hierarchicalForward:()=>V,init:()=>D,pipeline:()=>q});import{createRequire as A}from"module";var _,g,I,O,E,L,V,B,D,k,z,F,C,j,W,K,q,R=h(()=>{_=A(import.meta.url),g=_("@ruvector/rvf-node"),I=g,{RuvectorLayer:O,TensorCompress:E,differentiableSearch:L,hierarchicalForward:V,getCompressionLevel:B,init:D,FlashAttention:k,DotProductAttention:z,MultiHeadAttention:F,HyperbolicAttention:C,LinearAttention:j,MoEAttention:W,SonaEngine:K,pipeline:q}=g||{}});var Z={};v(Z,{createRvfStore:()=>$,isRvfNativeAvailable:()=>X,openRvfStore:()=>G,openRvfStoreReadonly:()=>U});import{readFileSync as J,writeFileSync as H,copyFileSync as Q,existsSync as Y}from"fs";function c(){if(S)return m;S=!0;try{let s=(R(),T(y));!s.RvfDatabase&&s.default&&s.default.RvfDatabase&&(s=s.default),m=s}catch{m=null}return m}function w(s){return`${s}.idmap.json`}function N(s){let e=w(s),t=new Map,n=new Map,i=1;if(Y(e))try{let r=JSON.parse(J(e,"utf-8"));i=r.nextLabel;for(let[a,p]of r.entries)t.set(a,p),n.set(p,a)}catch{}return{strToNum:t,numToStr:n,nextLabel:i}}function b(s,e,t){let n={nextLabel:t,entries:Array.from(e.entries())};H(w(s),JSON.stringify(n),"utf-8")}function $(s,e){let t=c();if(!t)throw new Error("@ruvector/rvf-node is not available \u2014 install the package or check platform compatibility");let n=t.RvfDatabase.create(s,{dimension:e}),i=n.dimension();return new d(n,s,i,new Map,new Map,1)}function G(s){let e=c();if(!e)throw new Error("@ruvector/rvf-node is not available \u2014 install the package or check platform compatibility");let t=e.RvfDatabase.open(s),n=t.dimension(),{strToNum:i,numToStr:r,nextLabel:a}=N(s);return new d(t,s,n,i,r,a)}function U(s){let e=c();if(!e)throw new Error("@ruvector/rvf-node is not available \u2014 install the package or check platform compatibility");let t=e.RvfDatabase.openReadonly(s),n=t.dimension(),{strToNum:i,numToStr:r,nextLabel:a}=N(s);return new d(t,s,n,i,r,a)}function X(){return process.env.AQE_MEMORY_BACKEND==="memory"?!1:c()!==null}var m,S,d,P=h(()=>{m=null,S=!1;d=class s{db;_path;_dimension;strToNum;numToStr;nextLabel;_open;constructor(e,t,n,i,r,a){this.db=e,this._path=t,this._dimension=n,this.strToNum=i,this.numToStr=r,this.nextLabel=a,this._open=!0}ingest(e){if(this.ensureOpen(),e.length===0)return{accepted:0,rejected:0};let t=this._dimension,n=new Float32Array(e.length*t),i=[],r=[];for(let o=0;o<e.length;o++){let{id:u,vector:f,metadata:x}=e[o],l=this.strToNum.get(u);l===void 0&&(l=this.nextLabel++,this.strToNum.set(u,l),this.numToStr.set(l,u)),i.push(l),r.push(x);let M=f instanceof Float32Array?f:new Float32Array(f);n.set(M.subarray(0,t),o*t)}let a;if(r.some(o=>o!==void 0)&&typeof this.db.ingestBatchWithMetadata=="function"){let o=r.map(u=>u?JSON.stringify(u):"");a=this.db.ingestBatchWithMetadata(n,i,o)}else a=this.db.ingestBatch(n,i);return this.persistIdMap(),{accepted:a.accepted,rejected:a.rejected}}search(e,t){this.ensureOpen();let n=e instanceof Float32Array?e:new Float32Array(e);return this.db.query(n,t).map(r=>{let a=this.numToStr.get(r.id);return a===void 0?null:{id:a,distance:r.distance,score:1/(1+r.distance)}}).filter(r=>r!==null)}delete(e){this.ensureOpen();let t=[];for(let i of e){let r=this.strToNum.get(i);r!==void 0&&t.push(r)}if(t.length===0)return 0;let n=this.db.delete(t);for(let i of e){let r=this.strToNum.get(i);r!==void 0&&(this.strToNum.delete(i),this.numToStr.delete(r))}return this.persistIdMap(),n.deleted}fork(e){this.ensureOpen(),Q(this._path,e);let t=new Map(this.strToNum),n=new Map(this.numToStr);b(e,t,this.nextLabel);let r=c().RvfDatabase.open(e);return new s(r,e,this._dimension,t,n,this.nextLabel)}status(){this.ensureOpen();let e=this.db.status(),n=this.db.segments().filter(i=>i.segType==="witness");return{totalVectors:e.totalVectors,totalSegments:e.totalSegments,fileSizeBytes:e.fileSize,epoch:e.currentEpoch,witnessValid:n.length>0,witnessEntries:n.length,deadSpaceRatio:typeof e.deadSpaceRatio=="number"?e.deadSpaceRatio:0}}dimension(){return this._dimension}size(){return this.ensureOpen(),this.db.status().totalVectors}compact(){this.ensureOpen();try{let e=this.db.compact();return e&&typeof e=="object"?{segmentsCompacted:typeof e.segmentsCompacted=="number"?e.segmentsCompacted:0,bytesReclaimed:typeof e.bytesReclaimed=="number"?e.bytesReclaimed:0,epoch:typeof e.epoch=="number"?e.epoch:0}:{segmentsCompacted:0,bytesReclaimed:0,epoch:0}}catch{return null}}close(){this._open&&(this.db.close(),this._open=!1)}isOpen(){return this._open}path(){return this._path}embedKernel(e){return this.ensureOpen(),this.db.embedKernel(0,99,0,e,0,"")}extractKernel(){return this.ensureOpen(),this.db.extractKernel()}verifyWitness(){this.ensureOpen();let e=this.tryNative("verifyWitness");return e?{valid:e.valid??!0,totalEntries:e.totalEntries??0,errors:Array.isArray(e.errors)?e.errors:[]}:{valid:!0,totalEntries:0,errors:[]}}sign(e){this.ensureOpen();let t=this.tryNative("sign",e);return typeof t=="string"?t:null}fileId(){this.ensureOpen();let e=this.tryNative("fileId");return typeof e=="string"?e:null}parentId(){this.ensureOpen();let e=this.tryNative("parentId");return typeof e=="string"?e:null}lineageDepth(){this.ensureOpen();let e=this.tryNative("lineageDepth");return typeof e=="number"?e:0}indexStats(){let e=this.status();return{totalVectors:e.totalVectors,dimension:this._dimension,totalSegments:e.totalSegments,fileSizeBytes:e.fileSizeBytes,epoch:e.epoch,witnessValid:e.witnessValid,witnessEntries:e.witnessEntries,idMapSize:this.strToNum.size}}freeze(){this.ensureOpen();let e=this.tryNative("freeze");return typeof e=="number"?e:0}derive(e){this.ensureOpen();let t=c();if(typeof this.db.derive=="function")try{let n=this.db.derive(e),i=new Map(this.strToNum),r=new Map(this.numToStr);return b(e,i,this.nextLabel),new s(n,e,this._dimension,i,r,this.nextLabel)}catch{}return this.fork(e)}ensureOpen(){if(!this._open)throw new Error("RVF database is closed")}tryNative(e,...t){if(typeof this.db[e]!="function")return null;try{return this.db[e](...t)}catch{return null}}persistIdMap(){b(this._path,this.strToNum,this.nextLabel)}}});export{$ as a,G as b,U as c,X as d,Z as e,P as f};
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.13.10");process.exit(0)}
2
+ import{c as h,e as v,g as T}from"./chunk-W3DCBOLL.js";var y={};v(y,{DotProductAttention:()=>z,FlashAttention:()=>k,HyperbolicAttention:()=>C,LinearAttention:()=>j,MoEAttention:()=>W,MultiHeadAttention:()=>F,RuvectorLayer:()=>O,SonaEngine:()=>K,TensorCompress:()=>E,default:()=>I,differentiableSearch:()=>L,getCompressionLevel:()=>B,hierarchicalForward:()=>V,init:()=>D,pipeline:()=>q});import{createRequire as A}from"module";var _,g,I,O,E,L,V,B,D,k,z,F,C,j,W,K,q,R=h(()=>{_=A(import.meta.url),g=_("@ruvector/rvf-node"),I=g,{RuvectorLayer:O,TensorCompress:E,differentiableSearch:L,hierarchicalForward:V,getCompressionLevel:B,init:D,FlashAttention:k,DotProductAttention:z,MultiHeadAttention:F,HyperbolicAttention:C,LinearAttention:j,MoEAttention:W,SonaEngine:K,pipeline:q}=g||{}});var Z={};v(Z,{createRvfStore:()=>$,isRvfNativeAvailable:()=>X,openRvfStore:()=>G,openRvfStoreReadonly:()=>U});import{readFileSync as J,writeFileSync as H,copyFileSync as Q,existsSync as Y}from"fs";function c(){if(S)return m;S=!0;try{let s=(R(),T(y));!s.RvfDatabase&&s.default&&s.default.RvfDatabase&&(s=s.default),m=s}catch{m=null}return m}function w(s){return`${s}.idmap.json`}function N(s){let e=w(s),t=new Map,n=new Map,i=1;if(Y(e))try{let r=JSON.parse(J(e,"utf-8"));i=r.nextLabel;for(let[a,p]of r.entries)t.set(a,p),n.set(p,a)}catch{}return{strToNum:t,numToStr:n,nextLabel:i}}function b(s,e,t){let n={nextLabel:t,entries:Array.from(e.entries())};H(w(s),JSON.stringify(n),"utf-8")}function $(s,e){let t=c();if(!t)throw new Error("@ruvector/rvf-node is not available \u2014 install the package or check platform compatibility");let n=t.RvfDatabase.create(s,{dimension:e}),i=n.dimension();return new d(n,s,i,new Map,new Map,1)}function G(s){let e=c();if(!e)throw new Error("@ruvector/rvf-node is not available \u2014 install the package or check platform compatibility");let t=e.RvfDatabase.open(s),n=t.dimension(),{strToNum:i,numToStr:r,nextLabel:a}=N(s);return new d(t,s,n,i,r,a)}function U(s){let e=c();if(!e)throw new Error("@ruvector/rvf-node is not available \u2014 install the package or check platform compatibility");let t=e.RvfDatabase.openReadonly(s),n=t.dimension(),{strToNum:i,numToStr:r,nextLabel:a}=N(s);return new d(t,s,n,i,r,a)}function X(){return process.env.AQE_MEMORY_BACKEND==="memory"?!1:c()!==null}var m,S,d,P=h(()=>{m=null,S=!1;d=class s{db;_path;_dimension;strToNum;numToStr;nextLabel;_open;constructor(e,t,n,i,r,a){this.db=e,this._path=t,this._dimension=n,this.strToNum=i,this.numToStr=r,this.nextLabel=a,this._open=!0}ingest(e){if(this.ensureOpen(),e.length===0)return{accepted:0,rejected:0};let t=this._dimension,n=new Float32Array(e.length*t),i=[],r=[];for(let o=0;o<e.length;o++){let{id:u,vector:f,metadata:x}=e[o],l=this.strToNum.get(u);l===void 0&&(l=this.nextLabel++,this.strToNum.set(u,l),this.numToStr.set(l,u)),i.push(l),r.push(x);let M=f instanceof Float32Array?f:new Float32Array(f);n.set(M.subarray(0,t),o*t)}let a;if(r.some(o=>o!==void 0)&&typeof this.db.ingestBatchWithMetadata=="function"){let o=r.map(u=>u?JSON.stringify(u):"");a=this.db.ingestBatchWithMetadata(n,i,o)}else a=this.db.ingestBatch(n,i);return this.persistIdMap(),{accepted:a.accepted,rejected:a.rejected}}search(e,t){this.ensureOpen();let n=e instanceof Float32Array?e:new Float32Array(e);return this.db.query(n,t).map(r=>{let a=this.numToStr.get(r.id);return a===void 0?null:{id:a,distance:r.distance,score:1/(1+r.distance)}}).filter(r=>r!==null)}delete(e){this.ensureOpen();let t=[];for(let i of e){let r=this.strToNum.get(i);r!==void 0&&t.push(r)}if(t.length===0)return 0;let n=this.db.delete(t);for(let i of e){let r=this.strToNum.get(i);r!==void 0&&(this.strToNum.delete(i),this.numToStr.delete(r))}return this.persistIdMap(),n.deleted}fork(e){this.ensureOpen(),Q(this._path,e);let t=new Map(this.strToNum),n=new Map(this.numToStr);b(e,t,this.nextLabel);let r=c().RvfDatabase.open(e);return new s(r,e,this._dimension,t,n,this.nextLabel)}status(){this.ensureOpen();let e=this.db.status(),n=this.db.segments().filter(i=>i.segType==="witness");return{totalVectors:e.totalVectors,totalSegments:e.totalSegments,fileSizeBytes:e.fileSize,epoch:e.currentEpoch,witnessValid:n.length>0,witnessEntries:n.length,deadSpaceRatio:typeof e.deadSpaceRatio=="number"?e.deadSpaceRatio:0}}dimension(){return this._dimension}size(){return this.ensureOpen(),this.db.status().totalVectors}compact(){this.ensureOpen();try{let e=this.db.compact();return e&&typeof e=="object"?{segmentsCompacted:typeof e.segmentsCompacted=="number"?e.segmentsCompacted:0,bytesReclaimed:typeof e.bytesReclaimed=="number"?e.bytesReclaimed:0,epoch:typeof e.epoch=="number"?e.epoch:0}:{segmentsCompacted:0,bytesReclaimed:0,epoch:0}}catch{return null}}close(){this._open&&(this.db.close(),this._open=!1)}isOpen(){return this._open}path(){return this._path}embedKernel(e){return this.ensureOpen(),this.db.embedKernel(0,99,0,e,0,"")}extractKernel(){return this.ensureOpen(),this.db.extractKernel()}verifyWitness(){this.ensureOpen();let e=this.tryNative("verifyWitness");return e?{valid:e.valid??!0,totalEntries:e.totalEntries??0,errors:Array.isArray(e.errors)?e.errors:[]}:{valid:!0,totalEntries:0,errors:[]}}sign(e){this.ensureOpen();let t=this.tryNative("sign",e);return typeof t=="string"?t:null}fileId(){this.ensureOpen();let e=this.tryNative("fileId");return typeof e=="string"?e:null}parentId(){this.ensureOpen();let e=this.tryNative("parentId");return typeof e=="string"?e:null}lineageDepth(){this.ensureOpen();let e=this.tryNative("lineageDepth");return typeof e=="number"?e:0}indexStats(){let e=this.status();return{totalVectors:e.totalVectors,dimension:this._dimension,totalSegments:e.totalSegments,fileSizeBytes:e.fileSizeBytes,epoch:e.epoch,witnessValid:e.witnessValid,witnessEntries:e.witnessEntries,idMapSize:this.strToNum.size}}freeze(){this.ensureOpen();let e=this.tryNative("freeze");return typeof e=="number"?e:0}derive(e){this.ensureOpen();let t=c();if(typeof this.db.derive=="function")try{let n=this.db.derive(e),i=new Map(this.strToNum),r=new Map(this.numToStr);return b(e,i,this.nextLabel),new s(n,e,this._dimension,i,r,this.nextLabel)}catch{}return this.fork(e)}ensureOpen(){if(!this._open)throw new Error("RVF database is closed")}tryNative(e,...t){if(typeof this.db[e]!="function")return null;try{return this.db[e](...t)}catch{return null}}persistIdMap(){b(this._path,this.strToNum,this.nextLabel)}}});export{$ as a,G as b,U as c,X as d,Z as e,P as f};
@@ -1,2 +1,2 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.13.8");process.exit(0)}
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.13.10");process.exit(0)}
2
2
  var o=!1;function r(t){if(!o){for(let e of["ALTER TABLE routing_outcomes ADD COLUMN exploration INTEGER NOT NULL DEFAULT 0","ALTER TABLE routing_outcomes ADD COLUMN criticality REAL","ALTER TABLE routing_outcomes ADD COLUMN q_weight REAL"])try{t.prepare(e).run()}catch{}try{t.prepare("CREATE INDEX IF NOT EXISTS idx_routing_outcomes_exploration ON routing_outcomes(exploration)").run()}catch{}o=!0}}export{r as a};
@@ -1,2 +1,2 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.13.8");process.exit(0)}
2
- import{e as a}from"./chunk-BC37ZYBO.js";import{b as w,d as y}from"./chunk-HD22NMGP.js";import{a as f,c as P}from"./chunk-XKKCH24C.js";import{randomUUID as v}from"crypto";import*as i from"fs";import*as n from"path";import*as c from"os";y();P();var k=".aqe",b="schedules.json",F="1.0.0",g=5e3,x=50,p=10*1024*1024,d=class{schedulesPath;debug;lockFile;initialized=!1;constructor(e={}){e.schedulesPath&&this.validateSchedulesPath(e.schedulesPath),this.schedulesPath=e.schedulesPath??this.getDefaultSchedulesPath(),this.lockFile=`${this.schedulesPath}.lock`,this.debug=e.debug??!1}validateSchedulesPath(e){let s=c.homedir(),t=n.resolve(e),r=n.resolve(s);if(t.startsWith(r+n.sep)||t===r)return;let l=process.cwd(),h=n.resolve(l);if(t.startsWith(h+n.sep)||t===h)return;let u=c.tmpdir(),S=n.resolve(u);if(!(t.startsWith(S+n.sep)||t===S))throw new Error(`Security: Custom schedulesPath must be within home directory (${s}), current working directory (${l}), or temp directory (${u}). Provided path: ${e}`)}getDefaultSchedulesPath(){let e=c.homedir();return n.join(e,k,b)}async initialize(){if(this.initialized)return;let e=n.dirname(this.schedulesPath);i.existsSync(e)||(i.mkdirSync(e,{recursive:!0}),this.log(`Created directory: ${e}`)),this.initialized=!0}async loadSchedules(){if(await this.initialize(),!i.existsSync(this.schedulesPath))return this.log("Schedules file does not exist, returning empty array"),[];try{let e=i.readFileSync(this.schedulesPath,"utf-8"),s=this.parseSchedulesFile(e);return this.log(`Loaded ${s.schedules.length} schedules`),s.schedules}catch(e){return await this.handleCorruptFile(e),[]}}async saveSchedule(e){await this.initialize(),await this.withFileLock(async()=>{let s=await this.loadSchedulesUnsafe(),t=s.findIndex(r=>r.id===e.id);t>=0?(s[t]=e,this.log(`Updated schedule: ${e.id}`)):(s.push(e),this.log(`Added schedule: ${e.id}`)),await this.writeSchedules(s)})}async removeSchedule(e){await this.initialize(),await this.withFileLock(async()=>{let s=await this.loadSchedulesUnsafe(),t=s.filter(r=>r.id!==e);if(t.length===s.length){this.log(`Schedule not found: ${e}`);return}await this.writeSchedules(t),this.log(`Removed schedule: ${e}`)})}async getSchedules(){return this.loadSchedules()}async getSchedule(e){return(await this.loadSchedules()).find(t=>t.id===e)}async getDueSchedules(){let e=await this.loadSchedules(),s=new Date;return e.filter(t=>t.enabled?new Date(t.nextRun)<=s:!1)}async markExecuted(e){await this.initialize(),await this.withFileLock(async()=>{let s=await this.loadSchedulesUnsafe(),t=s.find(l=>l.id===e);if(!t)throw new Error(`Schedule not found: ${e}`);let r=new Date;t.lastRun=r.toISOString(),t.nextRun=a(t.schedule,r).toISOString(),await this.writeSchedules(s),this.log(`Marked executed: ${e}, next run: ${t.nextRun}`)})}async setEnabled(e,s){await this.initialize(),await this.withFileLock(async()=>{let t=await this.loadSchedulesUnsafe(),r=t.find(l=>l.id===e);if(!r)throw new Error(`Schedule not found: ${e}`);r.enabled=s,s&&(r.nextRun=a(r.schedule,new Date).toISOString()),await this.writeSchedules(t),this.log(`Set enabled=${s}: ${e}`)})}async getEnabledSchedules(){return(await this.loadSchedules()).filter(s=>s.enabled)}async getSchedulesByWorkflow(e){return(await this.loadSchedules()).filter(t=>t.workflowId===e)}async clearAll(){await this.initialize(),await this.withFileLock(async()=>{await this.writeSchedules([]),this.log("Cleared all schedules")})}async getStats(){let e=await this.loadSchedules(),s=new Date;return{total:e.length,enabled:e.filter(t=>t.enabled).length,disabled:e.filter(t=>!t.enabled).length,due:e.filter(t=>t.enabled&&new Date(t.nextRun)<=s).length}}async loadSchedulesUnsafe(){if(!i.existsSync(this.schedulesPath))return[];try{let e=i.readFileSync(this.schedulesPath,"utf-8");return this.parseSchedulesFile(e).schedules}catch{return[]}}parseSchedulesFile(e){let s=Buffer.byteLength(e,"utf-8");if(s>p)throw new Error(`Schedules file exceeds maximum allowed size (${p/(1024*1024)}MB). File is ${(s/(1024*1024)).toFixed(2)}MB.`);let t=w(e);if(!t.schedules||!Array.isArray(t.schedules))throw new Error("Invalid schedules file: missing schedules array");for(let r of t.schedules)if(!r.id||!r.workflowId||!r.schedule)throw new Error("Invalid schedule entry: missing required fields");return t}async writeSchedules(e){let s={version:F,updatedAt:new Date().toISOString(),schedules:e},t=JSON.stringify(s,null,2);i.writeFileSync(this.schedulesPath,t,"utf-8"),this.log(`Wrote ${e.length} schedules to disk`)}async handleCorruptFile(e){let s=f(e);this.log(`Corrupt schedules file detected: ${s}`);let t=`${this.schedulesPath}.corrupt.${Date.now()}`;try{i.existsSync(this.schedulesPath)&&(i.copyFileSync(this.schedulesPath,t),this.log(`Backed up corrupt file to: ${t}`))}catch(r){this.log(`Failed to backup corrupt file: ${r}`)}try{i.existsSync(this.schedulesPath)&&(i.unlinkSync(this.schedulesPath),this.log("Removed corrupt schedules file"))}catch(r){this.log(`Failed to remove corrupt file: ${r}`)}}async withFileLock(e){await this.acquireLock();try{return await e()}finally{this.releaseLock()}}async acquireLock(){let e=Date.now();for(;i.existsSync(this.lockFile);){try{let s=i.statSync(this.lockFile);if(Date.now()-s.mtimeMs>g){i.unlinkSync(this.lockFile),this.log("Removed stale lock file");break}}catch{break}if(Date.now()-e>g)throw new Error("Timeout waiting for scheduler lock");await this.sleep(x)}try{i.writeFileSync(this.lockFile,`${process.pid}:${Date.now()}`,{flag:"wx"})}catch(s){if(s.code==="EEXIST")return this.acquireLock();throw s}}releaseLock(){try{i.existsSync(this.lockFile)&&i.unlinkSync(this.lockFile)}catch(e){console.debug("[PersistentScheduler] Lock release error:",e instanceof Error?e.message:e)}}sleep(e){return new Promise(s=>setTimeout(s,e))}log(e){this.debug&&console.log(`[PersistentScheduler] ${e}`)}};function E(o={}){return new d(o)}function m(){let o=Date.now().toString(36),e=v().slice(0,8);return`sched-${o}-${e}`}function $(o){let e=new Date;return{id:m(),workflowId:o.workflowId,pipelinePath:o.pipelinePath,schedule:o.schedule,scheduleDescription:o.scheduleDescription,nextRun:a(o.schedule,e).toISOString(),enabled:o.enabled??!0,createdAt:e.toISOString()}}export{d as a,E as b,m as c,$ as d};
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.13.10");process.exit(0)}
2
+ import{e as a}from"./chunk-BM5BSYPW.js";import{b as w,d as y}from"./chunk-GQ6H37RN.js";import{a as f,c as P}from"./chunk-OLETDPH2.js";import{randomUUID as v}from"crypto";import*as i from"fs";import*as n from"path";import*as c from"os";y();P();var k=".aqe",b="schedules.json",F="1.0.0",g=5e3,x=50,p=10*1024*1024,d=class{schedulesPath;debug;lockFile;initialized=!1;constructor(e={}){e.schedulesPath&&this.validateSchedulesPath(e.schedulesPath),this.schedulesPath=e.schedulesPath??this.getDefaultSchedulesPath(),this.lockFile=`${this.schedulesPath}.lock`,this.debug=e.debug??!1}validateSchedulesPath(e){let s=c.homedir(),t=n.resolve(e),r=n.resolve(s);if(t.startsWith(r+n.sep)||t===r)return;let l=process.cwd(),h=n.resolve(l);if(t.startsWith(h+n.sep)||t===h)return;let u=c.tmpdir(),S=n.resolve(u);if(!(t.startsWith(S+n.sep)||t===S))throw new Error(`Security: Custom schedulesPath must be within home directory (${s}), current working directory (${l}), or temp directory (${u}). Provided path: ${e}`)}getDefaultSchedulesPath(){let e=c.homedir();return n.join(e,k,b)}async initialize(){if(this.initialized)return;let e=n.dirname(this.schedulesPath);i.existsSync(e)||(i.mkdirSync(e,{recursive:!0}),this.log(`Created directory: ${e}`)),this.initialized=!0}async loadSchedules(){if(await this.initialize(),!i.existsSync(this.schedulesPath))return this.log("Schedules file does not exist, returning empty array"),[];try{let e=i.readFileSync(this.schedulesPath,"utf-8"),s=this.parseSchedulesFile(e);return this.log(`Loaded ${s.schedules.length} schedules`),s.schedules}catch(e){return await this.handleCorruptFile(e),[]}}async saveSchedule(e){await this.initialize(),await this.withFileLock(async()=>{let s=await this.loadSchedulesUnsafe(),t=s.findIndex(r=>r.id===e.id);t>=0?(s[t]=e,this.log(`Updated schedule: ${e.id}`)):(s.push(e),this.log(`Added schedule: ${e.id}`)),await this.writeSchedules(s)})}async removeSchedule(e){await this.initialize(),await this.withFileLock(async()=>{let s=await this.loadSchedulesUnsafe(),t=s.filter(r=>r.id!==e);if(t.length===s.length){this.log(`Schedule not found: ${e}`);return}await this.writeSchedules(t),this.log(`Removed schedule: ${e}`)})}async getSchedules(){return this.loadSchedules()}async getSchedule(e){return(await this.loadSchedules()).find(t=>t.id===e)}async getDueSchedules(){let e=await this.loadSchedules(),s=new Date;return e.filter(t=>t.enabled?new Date(t.nextRun)<=s:!1)}async markExecuted(e){await this.initialize(),await this.withFileLock(async()=>{let s=await this.loadSchedulesUnsafe(),t=s.find(l=>l.id===e);if(!t)throw new Error(`Schedule not found: ${e}`);let r=new Date;t.lastRun=r.toISOString(),t.nextRun=a(t.schedule,r).toISOString(),await this.writeSchedules(s),this.log(`Marked executed: ${e}, next run: ${t.nextRun}`)})}async setEnabled(e,s){await this.initialize(),await this.withFileLock(async()=>{let t=await this.loadSchedulesUnsafe(),r=t.find(l=>l.id===e);if(!r)throw new Error(`Schedule not found: ${e}`);r.enabled=s,s&&(r.nextRun=a(r.schedule,new Date).toISOString()),await this.writeSchedules(t),this.log(`Set enabled=${s}: ${e}`)})}async getEnabledSchedules(){return(await this.loadSchedules()).filter(s=>s.enabled)}async getSchedulesByWorkflow(e){return(await this.loadSchedules()).filter(t=>t.workflowId===e)}async clearAll(){await this.initialize(),await this.withFileLock(async()=>{await this.writeSchedules([]),this.log("Cleared all schedules")})}async getStats(){let e=await this.loadSchedules(),s=new Date;return{total:e.length,enabled:e.filter(t=>t.enabled).length,disabled:e.filter(t=>!t.enabled).length,due:e.filter(t=>t.enabled&&new Date(t.nextRun)<=s).length}}async loadSchedulesUnsafe(){if(!i.existsSync(this.schedulesPath))return[];try{let e=i.readFileSync(this.schedulesPath,"utf-8");return this.parseSchedulesFile(e).schedules}catch{return[]}}parseSchedulesFile(e){let s=Buffer.byteLength(e,"utf-8");if(s>p)throw new Error(`Schedules file exceeds maximum allowed size (${p/(1024*1024)}MB). File is ${(s/(1024*1024)).toFixed(2)}MB.`);let t=w(e);if(!t.schedules||!Array.isArray(t.schedules))throw new Error("Invalid schedules file: missing schedules array");for(let r of t.schedules)if(!r.id||!r.workflowId||!r.schedule)throw new Error("Invalid schedule entry: missing required fields");return t}async writeSchedules(e){let s={version:F,updatedAt:new Date().toISOString(),schedules:e},t=JSON.stringify(s,null,2);i.writeFileSync(this.schedulesPath,t,"utf-8"),this.log(`Wrote ${e.length} schedules to disk`)}async handleCorruptFile(e){let s=f(e);this.log(`Corrupt schedules file detected: ${s}`);let t=`${this.schedulesPath}.corrupt.${Date.now()}`;try{i.existsSync(this.schedulesPath)&&(i.copyFileSync(this.schedulesPath,t),this.log(`Backed up corrupt file to: ${t}`))}catch(r){this.log(`Failed to backup corrupt file: ${r}`)}try{i.existsSync(this.schedulesPath)&&(i.unlinkSync(this.schedulesPath),this.log("Removed corrupt schedules file"))}catch(r){this.log(`Failed to remove corrupt file: ${r}`)}}async withFileLock(e){await this.acquireLock();try{return await e()}finally{this.releaseLock()}}async acquireLock(){let e=Date.now();for(;i.existsSync(this.lockFile);){try{let s=i.statSync(this.lockFile);if(Date.now()-s.mtimeMs>g){i.unlinkSync(this.lockFile),this.log("Removed stale lock file");break}}catch{break}if(Date.now()-e>g)throw new Error("Timeout waiting for scheduler lock");await this.sleep(x)}try{i.writeFileSync(this.lockFile,`${process.pid}:${Date.now()}`,{flag:"wx"})}catch(s){if(s.code==="EEXIST")return this.acquireLock();throw s}}releaseLock(){try{i.existsSync(this.lockFile)&&i.unlinkSync(this.lockFile)}catch(e){console.debug("[PersistentScheduler] Lock release error:",e instanceof Error?e.message:e)}}sleep(e){return new Promise(s=>setTimeout(s,e))}log(e){this.debug&&console.log(`[PersistentScheduler] ${e}`)}};function E(o={}){return new d(o)}function m(){let o=Date.now().toString(36),e=v().slice(0,8);return`sched-${o}-${e}`}function $(o){let e=new Date;return{id:m(),workflowId:o.workflowId,pipelinePath:o.pipelinePath,schedule:o.schedule,scheduleDescription:o.scheduleDescription,nextRun:a(o.schedule,e).toISOString(),enabled:o.enabled??!0,createdAt:e.toISOString()}}export{d as a,E as b,m as c,$ as d};
@@ -1,2 +1,2 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.13.8");process.exit(0)}
2
- import{b as y,d as p}from"./chunk-AGJG5PAS.js";import{i as h}from"./chunk-YTBW2SLZ.js";var f={healthyThreshold:3,warningThreshold:2,checkIntervalMs:5e3,maxHistoryEntries:100,alertsEnabled:!0,alertCooldownMs:6e4,selfHealingEnabled:!1,maxHealingActionsPerMinute:5};var g=class{calculator;config;eventBus;persistence;graph;history=[];alerts=new Map;lastAlertTime=new Map;monitoringInterval=null;isMonitoring=!1;constructor(e,t={},r,i){this.graph=e,this.config={...f,...t},this.calculator=p(),this.eventBus=r,this.persistence=i}start(){this.isMonitoring||(this.isMonitoring=!0,this.monitoringInterval=setInterval(()=>this.checkHealth(),this.config.checkIntervalMs),this.checkHealth())}stop(){this.monitoringInterval&&(clearInterval(this.monitoringInterval),this.monitoringInterval=null),this.isMonitoring=!1}updateGraph(e){this.graph=e,this.isMonitoring&&this.checkHealth()}isEmptyTopology(){return this.graph.getVerticesByType("agent").length===0}checkHealth(){let e=this.calculator.getMinCutValue(this.graph),t=this.calculator.findWeakVertices(this.graph),r=this.isEmptyTopology()?"idle":this.determineStatus(e),i=this.calculateTrend();return this.recordHistory(e),this.isEmptyTopology()||this.checkAlertConditions(e,t,r),this.persistence&&t.length>0&&this.persistence.saveWeakVertices(t).catch(n=>console.warn("[MinCutHealthMonitor] Failed to persist weak vertices:",n)),this.emitEvent("mincut.updated",e,{status:r,weakVertexCount:t.length}),{status:r,minCutValue:e,healthyThreshold:this.config.healthyThreshold,warningThreshold:this.config.warningThreshold,weakVertexCount:t.length,topWeakVertices:t.slice(0,5),trend:i,history:this.history.slice(-20),lastUpdated:new Date}}getHealth(){let e=this.calculator.getMinCutValue(this.graph),t=this.calculator.findWeakVertices(this.graph);return{status:this.isEmptyTopology()?"idle":this.determineStatus(e),minCutValue:e,healthyThreshold:this.config.healthyThreshold,warningThreshold:this.config.warningThreshold,weakVertexCount:t.length,topWeakVertices:t.slice(0,5),trend:this.calculateTrend(),history:this.history.slice(-20),lastUpdated:new Date}}getMinCutValue(){return this.calculator.getMinCutValue(this.graph)}getWeakVertices(){return this.calculator.findWeakVertices(this.graph)}isCritical(){return this.calculator.getMinCutValue(this.graph)<this.config.warningThreshold}isHealthy(){return this.calculator.getMinCutValue(this.graph)>=this.config.healthyThreshold}getActiveAlerts(){return Array.from(this.alerts.values()).filter(e=>!e.acknowledged).sort((e,t)=>{let r={critical:0,high:1,medium:2,low:3,info:4};return r[e.severity]-r[t.severity]})}getAllAlerts(){return Array.from(this.alerts.values())}acknowledgeAlert(e){let t=this.alerts.get(e);return t?(t.acknowledged=!0,!0):!1}clearAcknowledgedAlerts(){let e=[];for(let[t,r]of this.alerts)r.acknowledged&&e.push(t);for(let t of e)this.alerts.delete(t);return e.length}getHistory(){return[...this.history]}getTrend(){return this.calculateTrend()}getStats(e=6e4){let t=Date.now()-e,r=this.history.filter(n=>n.timestamp.getTime()>t);if(r.length===0){let n=this.calculator.getMinCutValue(this.graph);return{min:n,max:n,average:n,count:0}}let i=r.map(n=>n.value);return{min:Math.min(...i),max:Math.max(...i),average:i.reduce((n,a)=>n+a,0)/i.length,count:r.length}}updateConfig(e){Object.assign(this.config,e),e.checkIntervalMs&&this.isMonitoring&&(this.stop(),this.start())}getConfig(){return{...this.config}}determineStatus(e){return e>=this.config.healthyThreshold?"healthy":e>=this.config.warningThreshold?"warning":"critical"}calculateTrend(){if(this.history.length<3)return"stable";let e=this.history.slice(-5),t=e[0].value,i=e[e.length-1].value-t,a=e.reduce((o,c)=>o+c.value,0)/e.length*.1;return i>a?"improving":i<-a?"degrading":"stable"}recordHistory(e){let t={timestamp:new Date,value:e,vertexCount:this.graph.vertexCount,edgeCount:this.graph.edgeCount};for(this.history.push(t);this.history.length>this.config.maxHistoryEntries;)this.history.shift()}checkAlertConditions(e,t,r){if(!this.config.alertsEnabled)return;let i=Date.now();r==="critical"?this.maybeGenerateAlert("critical-threshold","critical",`MinCut value (${e.toFixed(2)}) is below critical threshold (${this.config.warningThreshold})`,e,this.config.warningThreshold,t):r==="warning"&&this.maybeGenerateAlert("warning-threshold","high",`MinCut value (${e.toFixed(2)}) is below healthy threshold (${this.config.healthyThreshold})`,e,this.config.healthyThreshold,t);let n=t.filter(o=>o.weightedDegree===0);n.length>0&&this.maybeGenerateAlert("isolated-vertices","high",`${n.length} isolated vertex(es) detected`,e,0,n);let a=t.filter(o=>o.riskScore>.8);a.length>0&&this.maybeGenerateAlert("critical-vertices","medium",`${a.length} critical vertex(es) with high risk score`,e,0,a)}maybeGenerateAlert(e,t,r,i,n,a){let o=Date.now(),c=this.lastAlertTime.get(e)||0;if(o-c<this.config.alertCooldownMs)return;let s={id:h(),severity:t,message:r,minCutValue:i,threshold:n,affectedVertices:a.map(l=>l.vertexId),timestamp:new Date,acknowledged:!1,remediations:a.flatMap(l=>l.suggestions).slice(0,5)};this.alerts.set(s.id,s),this.persistence&&this.persistence.saveAlert(s).catch(l=>console.warn("[MinCutHealthMonitor] Failed to persist alert:",l)),this.lastAlertTime.set(e,o),this.emitEvent("mincut.alert.generated",i,{alert:s})}emitEvent(e,t,r){if(!this.eventBus)return;let i={id:h(),type:e,source:"coordination",timestamp:new Date,correlationId:h(),payload:{minCutValue:t,...r}};this.eventBus.publish(i).catch(n=>{console.error("Failed to publish MinCut event:",n)})}};function v(m,e,t,r){return new g(m,e,t,r)}var d=null,u=null;function C(){return d||(d=y()),d}function P(){return u||(u=v(C())),u}function B(){return d!==null}function F(){return u!==null}export{f as a,v as b,C as c,P as d,B as e,F as f};
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.13.10");process.exit(0)}
2
+ import{b as y,d as p}from"./chunk-BFX3N7KU.js";import{i as h}from"./chunk-4TSLLWE7.js";var f={healthyThreshold:3,warningThreshold:2,checkIntervalMs:5e3,maxHistoryEntries:100,alertsEnabled:!0,alertCooldownMs:6e4,selfHealingEnabled:!1,maxHealingActionsPerMinute:5};var g=class{calculator;config;eventBus;persistence;graph;history=[];alerts=new Map;lastAlertTime=new Map;monitoringInterval=null;isMonitoring=!1;constructor(e,t={},r,i){this.graph=e,this.config={...f,...t},this.calculator=p(),this.eventBus=r,this.persistence=i}start(){this.isMonitoring||(this.isMonitoring=!0,this.monitoringInterval=setInterval(()=>this.checkHealth(),this.config.checkIntervalMs),this.checkHealth())}stop(){this.monitoringInterval&&(clearInterval(this.monitoringInterval),this.monitoringInterval=null),this.isMonitoring=!1}updateGraph(e){this.graph=e,this.isMonitoring&&this.checkHealth()}isEmptyTopology(){return this.graph.getVerticesByType("agent").length===0}checkHealth(){let e=this.calculator.getMinCutValue(this.graph),t=this.calculator.findWeakVertices(this.graph),r=this.isEmptyTopology()?"idle":this.determineStatus(e),i=this.calculateTrend();return this.recordHistory(e),this.isEmptyTopology()||this.checkAlertConditions(e,t,r),this.persistence&&t.length>0&&this.persistence.saveWeakVertices(t).catch(n=>console.warn("[MinCutHealthMonitor] Failed to persist weak vertices:",n)),this.emitEvent("mincut.updated",e,{status:r,weakVertexCount:t.length}),{status:r,minCutValue:e,healthyThreshold:this.config.healthyThreshold,warningThreshold:this.config.warningThreshold,weakVertexCount:t.length,topWeakVertices:t.slice(0,5),trend:i,history:this.history.slice(-20),lastUpdated:new Date}}getHealth(){let e=this.calculator.getMinCutValue(this.graph),t=this.calculator.findWeakVertices(this.graph);return{status:this.isEmptyTopology()?"idle":this.determineStatus(e),minCutValue:e,healthyThreshold:this.config.healthyThreshold,warningThreshold:this.config.warningThreshold,weakVertexCount:t.length,topWeakVertices:t.slice(0,5),trend:this.calculateTrend(),history:this.history.slice(-20),lastUpdated:new Date}}getMinCutValue(){return this.calculator.getMinCutValue(this.graph)}getWeakVertices(){return this.calculator.findWeakVertices(this.graph)}isCritical(){return this.calculator.getMinCutValue(this.graph)<this.config.warningThreshold}isHealthy(){return this.calculator.getMinCutValue(this.graph)>=this.config.healthyThreshold}getActiveAlerts(){return Array.from(this.alerts.values()).filter(e=>!e.acknowledged).sort((e,t)=>{let r={critical:0,high:1,medium:2,low:3,info:4};return r[e.severity]-r[t.severity]})}getAllAlerts(){return Array.from(this.alerts.values())}acknowledgeAlert(e){let t=this.alerts.get(e);return t?(t.acknowledged=!0,!0):!1}clearAcknowledgedAlerts(){let e=[];for(let[t,r]of this.alerts)r.acknowledged&&e.push(t);for(let t of e)this.alerts.delete(t);return e.length}getHistory(){return[...this.history]}getTrend(){return this.calculateTrend()}getStats(e=6e4){let t=Date.now()-e,r=this.history.filter(n=>n.timestamp.getTime()>t);if(r.length===0){let n=this.calculator.getMinCutValue(this.graph);return{min:n,max:n,average:n,count:0}}let i=r.map(n=>n.value);return{min:Math.min(...i),max:Math.max(...i),average:i.reduce((n,a)=>n+a,0)/i.length,count:r.length}}updateConfig(e){Object.assign(this.config,e),e.checkIntervalMs&&this.isMonitoring&&(this.stop(),this.start())}getConfig(){return{...this.config}}determineStatus(e){return e>=this.config.healthyThreshold?"healthy":e>=this.config.warningThreshold?"warning":"critical"}calculateTrend(){if(this.history.length<3)return"stable";let e=this.history.slice(-5),t=e[0].value,i=e[e.length-1].value-t,a=e.reduce((o,c)=>o+c.value,0)/e.length*.1;return i>a?"improving":i<-a?"degrading":"stable"}recordHistory(e){let t={timestamp:new Date,value:e,vertexCount:this.graph.vertexCount,edgeCount:this.graph.edgeCount};for(this.history.push(t);this.history.length>this.config.maxHistoryEntries;)this.history.shift()}checkAlertConditions(e,t,r){if(!this.config.alertsEnabled)return;let i=Date.now();r==="critical"?this.maybeGenerateAlert("critical-threshold","critical",`MinCut value (${e.toFixed(2)}) is below critical threshold (${this.config.warningThreshold})`,e,this.config.warningThreshold,t):r==="warning"&&this.maybeGenerateAlert("warning-threshold","high",`MinCut value (${e.toFixed(2)}) is below healthy threshold (${this.config.healthyThreshold})`,e,this.config.healthyThreshold,t);let n=t.filter(o=>o.weightedDegree===0);n.length>0&&this.maybeGenerateAlert("isolated-vertices","high",`${n.length} isolated vertex(es) detected`,e,0,n);let a=t.filter(o=>o.riskScore>.8);a.length>0&&this.maybeGenerateAlert("critical-vertices","medium",`${a.length} critical vertex(es) with high risk score`,e,0,a)}maybeGenerateAlert(e,t,r,i,n,a){let o=Date.now(),c=this.lastAlertTime.get(e)||0;if(o-c<this.config.alertCooldownMs)return;let s={id:h(),severity:t,message:r,minCutValue:i,threshold:n,affectedVertices:a.map(l=>l.vertexId),timestamp:new Date,acknowledged:!1,remediations:a.flatMap(l=>l.suggestions).slice(0,5)};this.alerts.set(s.id,s),this.persistence&&this.persistence.saveAlert(s).catch(l=>console.warn("[MinCutHealthMonitor] Failed to persist alert:",l)),this.lastAlertTime.set(e,o),this.emitEvent("mincut.alert.generated",i,{alert:s})}emitEvent(e,t,r){if(!this.eventBus)return;let i={id:h(),type:e,source:"coordination",timestamp:new Date,correlationId:h(),payload:{minCutValue:t,...r}};this.eventBus.publish(i).catch(n=>{console.error("Failed to publish MinCut event:",n)})}};function v(m,e,t,r){return new g(m,e,t,r)}var d=null,u=null;function C(){return d||(d=y()),d}function P(){return u||(u=v(C())),u}function B(){return d!==null}function F(){return u!==null}export{f as a,v as b,C as c,P as d,B as e,F as f};
@@ -1,2 +1,2 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.13.8");process.exit(0)}
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.13.10");process.exit(0)}
2
2
  var l=["ECONNREFUSED","ETIMEOUT","ENOMEM","ENOSPC"];var s={successRate:.1,failureRate:1,viabilityThreshold:.3,rehabilitationThreshold:10,maxQuarantineDurationMs:6048e5,domainOverrides:{"security-compliance":{successRate:.05,failureRate:1,viabilityThreshold:.5},"test-generation":{successRate:.15,failureRate:1,viabilityThreshold:.2},"quality-assessment":{successRate:.1,failureRate:1,viabilityThreshold:.4}}},a=class{config;_witnessChain=null;set witnessChain(e){this._witnessChain=e}constructor(e={}){this.config={...s,...e,domainOverrides:{...s.domainOverrides,...e.domainOverrides}}}computeConfidenceUpdate(e,r,i){let{successRate:u,failureRate:o}=this.getConfigForDomain(i),n=r==="success"?u:-o;if(r==="failure")try{this._witnessChain?.append("HEBBIAN_PENALTY",{previousConfidence:e,delta:n,domain:i},"asymmetric-learning")}catch{}return c(e+n,0,1)}shouldQuarantine(e,r){let{viabilityThreshold:i}=this.getConfigForDomain(r);return{shouldQuarantine:e<i,confidence:e,viabilityThreshold:i,domain:r}}classifyFailure(e){if(e.infrastructureHealthy===!1||e.durationMs!==void 0&&e.durationMs>3e4)return"infrastructure";if(e.errorMessage){let r=e.errorMessage.toUpperCase();for(let i of l)if(r.includes(i))return"infrastructure"}return e.failureCategory==="infrastructure"?"infrastructure":(e.failureCategory==="pattern","pattern")}checkRehabilitation(e,r){let i=this.config.rehabilitationThreshold;return{canRehabilitate:e>=i,consecutiveSuccesses:e,requiredSuccesses:i,domain:r}}getConfigForDomain(e){return e&&this.config.domainOverrides?.[e]?this.config.domainOverrides[e]:{successRate:this.config.successRate,failureRate:this.config.failureRate,viabilityThreshold:this.config.viabilityThreshold}}getAsymmetryRatio(e){let{successRate:r,failureRate:i}=this.getConfigForDomain(e);return r===0?1/0:i/r}};function c(t,e,r){return t<e?e:t>r?r:t}export{a};