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
@@ -4,8 +4,8 @@
4
4
  * Provides graph-based importance scoring for QE patterns using PageRank.
5
5
  *
6
6
  * Two execution paths:
7
- * - **Native** (@ruvector/solver-node): O(log n) sublinear via Neumann series.
8
- * Requires the optional NAPI dependency to be installed.
7
+ * - **Async**: optional @ruvector/solver NAPI backend, then worker-thread
8
+ * TypeScript fallback for large graphs.
9
9
  * - **TypeScript fallback**: Standard power iteration, O(n * m * iterations).
10
10
  * Always available, correct results, linear-time.
11
11
  *
@@ -20,45 +20,43 @@
20
20
  *
21
21
  * @module integrations/ruvector/solver-adapter
22
22
  */
23
+ import { type AsyncPageRankRunner, type NativeSolverModule, type PatternGraph, type SolverConfig } from './page-rank-backends.js';
24
+ export type { PatternGraph, SolverConfig } from './page-rank-backends.js';
23
25
  /**
24
26
  * A directed graph of pattern relationships for importance scoring.
25
27
  *
26
28
  * Nodes represent pattern IDs; edges encode directed relationships
27
29
  * (e.g., "pattern A depends on pattern B") with numeric weights.
28
30
  */
29
- export interface PatternGraph {
30
- /** Node IDs (pattern IDs) */
31
- nodes: string[];
32
- /** Directed edges: [fromIndex, toIndex, weight] */
33
- edges: Array<[number, number, number]>;
34
- }
35
31
  /** Result of importance scoring for a single pattern */
36
32
  export interface ImportanceScore {
37
33
  patternId: string;
38
34
  score: number;
39
35
  rank: number;
40
36
  }
41
- /** Configuration for the solver */
42
- export interface SolverConfig {
43
- /** Damping factor for PageRank (default: 0.85) */
44
- dampingFactor: number;
45
- /** Convergence tolerance (default: 1e-6) */
46
- tolerance: number;
47
- /** Maximum iterations for power iteration fallback (default: 100) */
48
- maxIterations: number;
37
+ export interface PageRankRuntimeOptions {
38
+ /** Minimum nodes + edges before using a worker (default: 50,000). */
39
+ workerThreshold: number;
40
+ /** Worker timeout before synchronous fallback (default: 30 seconds). */
41
+ workerTimeoutMs: number;
42
+ /** Dependency-injection seam for tests and alternative worker runners. */
43
+ workerRunner: AsyncPageRankRunner;
44
+ /** Override native discovery; null explicitly disables the native backend. */
45
+ nativeModule?: NativeSolverModule | null;
49
46
  }
50
47
  /**
51
48
  * Computes importance scores for pattern graphs using PageRank.
52
49
  *
53
- * Prefers the native @ruvector/solver-node NAPI bindings when available
54
- * (O(log n) via Neumann series). Falls back to a TypeScript power-iteration
55
- * implementation (O(n * m * iterations)) when the native module is absent.
50
+ * The synchronous API uses the deterministic TypeScript implementation.
51
+ * The async API prefers @ruvector/solver and offloads large fallback graphs.
56
52
  */
57
53
  export declare class PageRankSolver {
58
54
  private readonly config;
59
- constructor(config?: Partial<SolverConfig>);
55
+ private readonly runtime;
56
+ private readonly nativeModule;
57
+ constructor(config?: Partial<SolverConfig>, runtime?: Partial<PageRankRuntimeOptions>);
60
58
  /**
61
- * Check whether the native @ruvector/solver-node module is available.
59
+ * Check whether the native @ruvector/solver module is available.
62
60
  */
63
61
  isNativeAvailable(): boolean;
64
62
  /**
@@ -68,6 +66,11 @@ export declare class PageRankSolver {
68
66
  * @returns Map from node ID to its importance score (scores sum to ~1.0)
69
67
  */
70
68
  computeImportance(graph: PatternGraph): Map<string, number>;
69
+ /**
70
+ * Compute PageRank without blocking the event loop for large graphs.
71
+ * Native and worker failures fall back to the verified synchronous backend.
72
+ */
73
+ computeImportanceAsync(graph: PatternGraph): Promise<Map<string, number>>;
71
74
  /**
72
75
  * Rank all patterns in the graph by importance, highest first.
73
76
  *
@@ -75,13 +78,7 @@ export declare class PageRankSolver {
75
78
  * @returns Array of ImportanceScore sorted by score descending
76
79
  */
77
80
  rankPatterns(graph: PatternGraph): ImportanceScore[];
78
- /**
79
- * Delegate PageRank computation to the native @ruvector/solver-node module.
80
- *
81
- * The native API is expected to accept the graph in a compatible format
82
- * and return a Float64Array of scores indexed by node position.
83
- */
84
- private computeNative;
81
+ private copyScoresToResult;
85
82
  }
86
83
  /**
87
84
  * Create a PageRankSolver instance with the given configuration.
@@ -89,5 +86,5 @@ export declare class PageRankSolver {
89
86
  * @param config - Partial solver configuration (defaults applied)
90
87
  * @returns A configured PageRankSolver
91
88
  */
92
- export declare function createPageRankSolver(config?: Partial<SolverConfig>): PageRankSolver;
89
+ export declare function createPageRankSolver(config?: Partial<SolverConfig>, runtime?: Partial<PageRankRuntimeOptions>): PageRankSolver;
93
90
  //# sourceMappingURL=solver-adapter.d.ts.map
@@ -4,8 +4,8 @@
4
4
  * Provides graph-based importance scoring for QE patterns using PageRank.
5
5
  *
6
6
  * Two execution paths:
7
- * - **Native** (@ruvector/solver-node): O(log n) sublinear via Neumann series.
8
- * Requires the optional NAPI dependency to be installed.
7
+ * - **Async**: optional @ruvector/solver NAPI backend, then worker-thread
8
+ * TypeScript fallback for large graphs.
9
9
  * - **TypeScript fallback**: Standard power iteration, O(n * m * iterations).
10
10
  * Always available, correct results, linear-time.
11
11
  *
@@ -20,6 +20,7 @@
20
20
  *
21
21
  * @module integrations/ruvector/solver-adapter
22
22
  */
23
+ import { computeTypeScriptPageRank, loadNativeSolverModule, runNativePageRank, runPageRankWorker, } from './page-rank-backends.js';
23
24
  // ============================================================================
24
25
  // Default Configuration
25
26
  // ============================================================================
@@ -28,33 +29,11 @@ const DEFAULT_SOLVER_CONFIG = {
28
29
  tolerance: 1e-6,
29
30
  maxIterations: 100,
30
31
  };
31
- // ============================================================================
32
- // Native Module Detection
33
- // ============================================================================
34
- /**
35
- * Cached reference to the @ruvector/solver-node native module.
36
- * `null` means we haven't attempted to load yet; `false` means load failed.
37
- */
38
- let _nativeModule = null;
39
- /**
40
- * Attempt to load the optional @ruvector/solver-node native bindings.
41
- * The result is cached so the cost is paid at most once per process.
42
- */
43
- function tryLoadNativeSync() {
44
- if (_nativeModule === false)
45
- return false;
46
- if (_nativeModule != null)
47
- return true;
48
- try {
49
- // eslint-disable-next-line @typescript-eslint/no-require-imports
50
- _nativeModule = require('@ruvector/solver-node');
51
- return true;
52
- }
53
- catch {
54
- _nativeModule = false;
55
- return false;
56
- }
57
- }
32
+ const DEFAULT_RUNTIME_OPTIONS = {
33
+ workerThreshold: 50_000,
34
+ workerTimeoutMs: 30_000,
35
+ workerRunner: runPageRankWorker,
36
+ };
58
37
  // ============================================================================
59
38
  // Input Validation
60
39
  // ============================================================================
@@ -78,95 +57,24 @@ function validateGraph(graph) {
78
57
  return n;
79
58
  }
80
59
  // ============================================================================
81
- // TypeScript Power-Iteration PageRank
82
- // ============================================================================
83
- /**
84
- * Compute PageRank scores using the standard power-iteration method.
85
- *
86
- * Algorithm (per Wikipedia / original Brin-Page paper):
87
- * 1. scores[i] = 1 / N for all i
88
- * 2. For each iteration:
89
- * new[i] = (1 - d) / N
90
- * + d * SUM_{j -> i} ( scores[j] * edgeWeight(j,i) / weightedOutDegree[j] )
91
- * 3. Converge when max |new[i] - old[i]| < tolerance
92
- *
93
- * Self-loops are included in outDegree computation but their contribution
94
- * flows back to the same node (standard PageRank semantics).
95
- *
96
- * Dangling nodes (zero out-degree) distribute their score uniformly to all
97
- * nodes, matching the standard random-surfer model.
98
- */
99
- function powerIterationPageRank(graph, config) {
100
- const n = graph.nodes.length;
101
- const { dampingFactor: d, tolerance, maxIterations } = config;
102
- // Pre-compute weighted out-degree for each node
103
- const weightedOutDegree = new Float64Array(n);
104
- for (const [from, , weight] of graph.edges) {
105
- weightedOutDegree[from] += weight;
106
- }
107
- // Build adjacency list for incoming edges: inEdges[toIndex] = [[fromIndex, weight], ...]
108
- const inEdges = new Array(n);
109
- for (let i = 0; i < n; i++) {
110
- inEdges[i] = [];
111
- }
112
- for (const [from, to, weight] of graph.edges) {
113
- inEdges[to].push([from, weight]);
114
- }
115
- // Identify dangling nodes (no outgoing edges)
116
- const danglingNodes = [];
117
- for (let i = 0; i < n; i++) {
118
- if (weightedOutDegree[i] === 0) {
119
- danglingNodes.push(i);
120
- }
121
- }
122
- // Initialize scores uniformly
123
- let scores = new Float64Array(n);
124
- const uniformShare = 1 / n;
125
- scores.fill(uniformShare);
126
- const base = (1 - d) / n;
127
- for (let iter = 0; iter < maxIterations; iter++) {
128
- // Dangling node contribution: their total score is redistributed uniformly
129
- let danglingSum = 0;
130
- for (const di of danglingNodes) {
131
- danglingSum += scores[di];
132
- }
133
- const danglingContrib = d * danglingSum / n;
134
- const next = new Float64Array(n);
135
- for (let i = 0; i < n; i++) {
136
- let incoming = 0;
137
- for (const [from, weight] of inEdges[i]) {
138
- incoming += (scores[from] * weight) / weightedOutDegree[from];
139
- }
140
- next[i] = base + d * incoming + danglingContrib;
141
- }
142
- // Check convergence (L-infinity norm)
143
- let maxDelta = 0;
144
- for (let i = 0; i < n; i++) {
145
- const delta = Math.abs(next[i] - scores[i]);
146
- if (delta > maxDelta)
147
- maxDelta = delta;
148
- }
149
- scores = next;
150
- if (maxDelta < tolerance) {
151
- break;
152
- }
153
- }
154
- return scores;
155
- }
156
- // ============================================================================
157
60
  // PageRankSolver Class
158
61
  // ============================================================================
159
62
  /**
160
63
  * Computes importance scores for pattern graphs using PageRank.
161
64
  *
162
- * Prefers the native @ruvector/solver-node NAPI bindings when available
163
- * (O(log n) via Neumann series). Falls back to a TypeScript power-iteration
164
- * implementation (O(n * m * iterations)) when the native module is absent.
65
+ * The synchronous API uses the deterministic TypeScript implementation.
66
+ * The async API prefers @ruvector/solver and offloads large fallback graphs.
165
67
  */
166
68
  export class PageRankSolver {
167
69
  config;
168
- constructor(config) {
70
+ runtime;
71
+ nativeModule;
72
+ constructor(config, runtime) {
169
73
  this.config = { ...DEFAULT_SOLVER_CONFIG, ...config };
74
+ this.runtime = { ...DEFAULT_RUNTIME_OPTIONS, ...runtime };
75
+ this.nativeModule = runtime && 'nativeModule' in runtime
76
+ ? runtime.nativeModule ?? null
77
+ : loadNativeSolverModule();
170
78
  // Validate config ranges
171
79
  if (this.config.dampingFactor <= 0 || this.config.dampingFactor >= 1) {
172
80
  throw new RangeError('dampingFactor must be in (0, 1)');
@@ -177,14 +85,18 @@ export class PageRankSolver {
177
85
  if (this.config.maxIterations < 1) {
178
86
  throw new RangeError('maxIterations must be >= 1');
179
87
  }
180
- // Eagerly attempt native load so isNativeAvailable() is stable
181
- tryLoadNativeSync();
88
+ if (this.runtime.workerThreshold < 0) {
89
+ throw new RangeError('workerThreshold must be >= 0');
90
+ }
91
+ if (this.runtime.workerTimeoutMs < 1) {
92
+ throw new RangeError('workerTimeoutMs must be >= 1');
93
+ }
182
94
  }
183
95
  /**
184
- * Check whether the native @ruvector/solver-node module is available.
96
+ * Check whether the native @ruvector/solver module is available.
185
97
  */
186
98
  isNativeAvailable() {
187
- return tryLoadNativeSync();
99
+ return this.nativeModule !== null;
188
100
  }
189
101
  /**
190
102
  * Compute importance scores for all nodes in a pattern graph.
@@ -204,18 +116,35 @@ export class PageRankSolver {
204
116
  result.set(graph.nodes[0], 1.0);
205
117
  return result;
206
118
  }
119
+ const scores = computeTypeScriptPageRank(graph, this.config);
120
+ this.copyScoresToResult(graph, scores, result);
121
+ return result;
122
+ }
123
+ /**
124
+ * Compute PageRank without blocking the event loop for large graphs.
125
+ * Native and worker failures fall back to the verified synchronous backend.
126
+ */
127
+ async computeImportanceAsync(graph) {
128
+ const n = validateGraph(graph);
129
+ if (n < 2)
130
+ return this.computeImportance(graph);
207
131
  let scores;
208
- if (this.isNativeAvailable() && _nativeModule?.pagerank) {
209
- // Delegate to native solver
210
- scores = this.computeNative(graph);
211
- }
212
- else {
213
- // TypeScript power iteration fallback
214
- scores = powerIterationPageRank(graph, this.config);
132
+ try {
133
+ if (this.nativeModule) {
134
+ scores = await runNativePageRank(this.nativeModule, graph, this.config);
135
+ }
136
+ else if (graph.nodes.length + graph.edges.length >= this.runtime.workerThreshold) {
137
+ scores = await this.runtime.workerRunner(graph, this.config, this.runtime.workerTimeoutMs);
138
+ }
139
+ else {
140
+ scores = computeTypeScriptPageRank(graph, this.config);
141
+ }
215
142
  }
216
- for (let i = 0; i < n; i++) {
217
- result.set(graph.nodes[i], scores[i]);
143
+ catch {
144
+ scores = computeTypeScriptPageRank(graph, this.config);
218
145
  }
146
+ const result = new Map();
147
+ this.copyScoresToResult(graph, scores, result);
219
148
  return result;
220
149
  }
221
150
  /**
@@ -242,45 +171,9 @@ export class PageRankSolver {
242
171
  }
243
172
  return ranked;
244
173
  }
245
- // --------------------------------------------------------------------------
246
- // Private: native solver delegation
247
- // --------------------------------------------------------------------------
248
- /**
249
- * Delegate PageRank computation to the native @ruvector/solver-node module.
250
- *
251
- * The native API is expected to accept the graph in a compatible format
252
- * and return a Float64Array of scores indexed by node position.
253
- */
254
- computeNative(graph) {
255
- const n = graph.nodes.length;
256
- // Build edge arrays in the format expected by native solver
257
- const fromIndices = new Int32Array(graph.edges.length);
258
- const toIndices = new Int32Array(graph.edges.length);
259
- const weights = new Float64Array(graph.edges.length);
260
- for (let i = 0; i < graph.edges.length; i++) {
261
- fromIndices[i] = graph.edges[i][0];
262
- toIndices[i] = graph.edges[i][1];
263
- weights[i] = graph.edges[i][2];
264
- }
265
- try {
266
- const result = _nativeModule.pagerank({
267
- nodeCount: n,
268
- fromIndices,
269
- toIndices,
270
- weights,
271
- dampingFactor: this.config.dampingFactor,
272
- tolerance: this.config.tolerance,
273
- maxIterations: this.config.maxIterations,
274
- });
275
- // Expect Float64Array or plain number[]
276
- if (result instanceof Float64Array) {
277
- return result;
278
- }
279
- return Float64Array.from(result);
280
- }
281
- catch {
282
- // If native call fails, fall back gracefully to TS implementation
283
- return powerIterationPageRank(graph, this.config);
174
+ copyScoresToResult(graph, scores, result) {
175
+ for (let i = 0; i < graph.nodes.length; i++) {
176
+ result.set(graph.nodes[i], scores[i]);
284
177
  }
285
178
  }
286
179
  }
@@ -293,7 +186,7 @@ export class PageRankSolver {
293
186
  * @param config - Partial solver configuration (defaults applied)
294
187
  * @returns A configured PageRankSolver
295
188
  */
296
- export function createPageRankSolver(config) {
297
- return new PageRankSolver(config);
189
+ export function createPageRankSolver(config, runtime) {
190
+ return new PageRankSolver(config, runtime);
298
191
  }
299
192
  //# sourceMappingURL=solver-adapter.js.map
@@ -45,7 +45,7 @@ export declare function checkPatternPromotionWithCoherence(pattern: QEPattern, d
45
45
  /**
46
46
  * Promote a pattern to long-term storage
47
47
  */
48
- export declare function promotePattern(patternId: string, deps: PromotionDeps): Promise<void>;
48
+ export declare function promotePattern(patternId: string, deps: PromotionDeps): Promise<Result<void>>;
49
49
  /**
50
50
  * Dependencies for cross-domain seeding
51
51
  */
@@ -129,4 +129,14 @@ export declare function computeBlendedImportance(patterns: Array<{
129
129
  usageCount: number;
130
130
  successRate: number;
131
131
  }>, citationGraph: PatternGraph, alpha?: number): Map<string, number>;
132
+ /**
133
+ * Async counterpart that offloads large graphs and can use the optional
134
+ * RuVector NAPI backend without changing existing synchronous callers.
135
+ */
136
+ export declare function computeBlendedImportanceAsync(patterns: Array<{
137
+ id: string;
138
+ confidence: number;
139
+ usageCount: number;
140
+ successRate: number;
141
+ }>, citationGraph: PatternGraph, alpha?: number): Promise<Map<string, number>>;
132
142
  //# sourceMappingURL=pattern-promotion.d.ts.map
@@ -142,9 +142,11 @@ export async function promotePattern(patternId, deps) {
142
142
  payload: { patternId, newTier: 'long-term' },
143
143
  });
144
144
  }
145
+ return result;
145
146
  }
146
147
  else {
147
148
  logger.error('Failed to promote pattern', result.error, { patternId });
149
+ return result;
148
150
  }
149
151
  }
150
152
  /**
@@ -415,6 +417,31 @@ export function computeBlendedImportance(patterns, citationGraph, alpha = 0.3) {
415
417
  }
416
418
  const solver = new PageRankSolver();
417
419
  const pageRankScores = solver.computeImportance(citationGraph);
420
+ return blendImportanceScores(patterns, citationGraph, qualityScores, pageRankScores, alpha);
421
+ }
422
+ /**
423
+ * Async counterpart that offloads large graphs and can use the optional
424
+ * RuVector NAPI backend without changing existing synchronous callers.
425
+ */
426
+ export async function computeBlendedImportanceAsync(patterns, citationGraph, alpha = 0.3) {
427
+ const result = new Map();
428
+ if (!getRuVectorFeatureFlags().useSublinearSolver) {
429
+ for (const pattern of patterns)
430
+ result.set(pattern.id, calculateQualityScore(pattern));
431
+ return result;
432
+ }
433
+ const qualityScores = new Map();
434
+ for (const pattern of patterns) {
435
+ qualityScores.set(pattern.id, calculateQualityScore(pattern));
436
+ }
437
+ if (citationGraph.nodes.length < 3 || citationGraph.edges.length < 2) {
438
+ return qualityScores;
439
+ }
440
+ const pageRankScores = await new PageRankSolver().computeImportanceAsync(citationGraph);
441
+ return blendImportanceScores(patterns, citationGraph, qualityScores, pageRankScores, alpha);
442
+ }
443
+ function blendImportanceScores(patterns, citationGraph, qualityScores, pageRankScores, alpha) {
444
+ const result = new Map();
418
445
  for (const p of patterns) {
419
446
  const quality = qualityScores.get(p.id) ?? 0;
420
447
  const pageRank = pageRankScores.get(p.id) ?? 0;
@@ -27,6 +27,10 @@ export interface PatternUsageRecord {
27
27
  metrics?: Record<string, unknown>;
28
28
  feedback?: string;
29
29
  }
30
+ export interface PatternUsageBatchRecord extends Omit<PatternUsageRecord, 'success'> {
31
+ usageCount: number;
32
+ successfulUses: number;
33
+ }
30
34
  export interface PatternUsageResult {
31
35
  /**
32
36
  * Whether the helper found and updated the pattern row.
@@ -55,4 +59,10 @@ export interface PatternUsageResult {
55
59
  * level. Multiple concurrent callers on the same connection will queue.
56
60
  */
57
61
  export declare function recordPatternUsage(db: DatabaseType, record: PatternUsageRecord): PatternUsageResult;
62
+ /**
63
+ * Record an aggregate of observed uses without bypassing the usage audit.
64
+ * One audit row is written per observed use, while the pattern counters are
65
+ * updated once in the same transaction.
66
+ */
67
+ export declare function recordPatternUsageBatch(db: DatabaseType, record: PatternUsageBatchRecord): PatternUsageResult;
58
68
  //# sourceMappingURL=pattern-usage-recorder.d.ts.map
@@ -69,4 +69,51 @@ export function recordPatternUsage(db, record) {
69
69
  qualityScore: newQualityScore,
70
70
  };
71
71
  }
72
+ /**
73
+ * Record an aggregate of observed uses without bypassing the usage audit.
74
+ * One audit row is written per observed use, while the pattern counters are
75
+ * updated once in the same transaction.
76
+ */
77
+ export function recordPatternUsageBatch(db, record) {
78
+ if (!Number.isInteger(record.usageCount) || record.usageCount < 1 ||
79
+ !Number.isInteger(record.successfulUses) || record.successfulUses < 0 ||
80
+ record.successfulUses > record.usageCount) {
81
+ throw new Error('Invalid aggregate pattern usage counts');
82
+ }
83
+ const pattern = db
84
+ .prepare('SELECT confidence, usage_count, successful_uses FROM qe_patterns WHERE id = ?')
85
+ .get(record.patternId);
86
+ if (!pattern)
87
+ return { updated: false };
88
+ const newUsageCount = pattern.usage_count + record.usageCount;
89
+ const newSuccessfulUses = pattern.successful_uses + record.successfulUses;
90
+ const newSuccessRate = newSuccessfulUses / newUsageCount;
91
+ const usageScore = Math.min(1, newUsageCount / 100);
92
+ const newQualityScore = pattern.confidence * 0.3 + usageScore * 0.2 + newSuccessRate * 0.5;
93
+ const insertUsage = db.prepare(`
94
+ INSERT INTO qe_pattern_usage (pattern_id, success, metrics_json, feedback)
95
+ VALUES (?, ?, ?, ?)
96
+ `);
97
+ const updatePattern = db.prepare(`
98
+ UPDATE qe_patterns SET
99
+ usage_count = ?, successful_uses = ?, success_rate = ?, quality_score = ?,
100
+ last_used_at = datetime('now'), updated_at = datetime('now')
101
+ WHERE id = ?
102
+ `);
103
+ const metricsJson = record.metrics ? JSON.stringify(record.metrics) : null;
104
+ const feedback = record.feedback ?? null;
105
+ db.transaction(() => {
106
+ for (let index = 0; index < record.usageCount; index++) {
107
+ insertUsage.run(record.patternId, index < record.successfulUses ? 1 : 0, metricsJson, feedback);
108
+ }
109
+ updatePattern.run(newUsageCount, newSuccessfulUses, newSuccessRate, newQualityScore, record.patternId);
110
+ })();
111
+ return {
112
+ updated: true,
113
+ usageCount: newUsageCount,
114
+ successfulUses: newSuccessfulUses,
115
+ successRate: newSuccessRate,
116
+ qualityScore: newQualityScore,
117
+ };
118
+ }
72
119
  //# sourceMappingURL=pattern-usage-recorder.js.map
@@ -142,6 +142,8 @@ export interface IQEReasoningBank {
142
142
  getPattern(id: string): Promise<QEPattern | null>;
143
143
  /** Record pattern usage outcome */
144
144
  recordOutcome(outcome: LearningOutcome): Promise<Result<void>>;
145
+ /** Explicitly promote a stored pattern to long-term memory. */
146
+ promotePattern(patternId: string): Promise<Result<void>>;
145
147
  /** Route a task to optimal agent */
146
148
  routeTask(request: QERoutingRequest): Promise<Result<QERoutingResult>>;
147
149
  /** Get guidance for a domain */
@@ -110,6 +110,12 @@ export declare class QEReasoningBank implements IQEReasoningBank {
110
110
  * Record pattern usage outcome
111
111
  */
112
112
  recordOutcome(outcome: LearningOutcome): Promise<Result<void>>;
113
+ /**
114
+ * Explicitly promote a stored pattern to long-term memory.
115
+ * Eligibility is decided by the caller; persistence, audit, and events use
116
+ * the same path as automatic promotion.
117
+ */
118
+ promotePattern(patternId: string): Promise<Result<void>>;
113
119
  /**
114
120
  * Get promotion dependencies for the extracted promotion module
115
121
  */
@@ -366,6 +366,20 @@ export class QEReasoningBank {
366
366
  }
367
367
  return result;
368
368
  }
369
+ /**
370
+ * Explicitly promote a stored pattern to long-term memory.
371
+ * Eligibility is decided by the caller; persistence, audit, and events use
372
+ * the same path as automatic promotion.
373
+ */
374
+ async promotePattern(patternId) {
375
+ if (!this.initialized) {
376
+ await this.initialize();
377
+ }
378
+ if (!await this.getPattern(patternId)) {
379
+ return err(new Error(`Pattern not found: ${patternId}`));
380
+ }
381
+ return promotePatternFn(patternId, this.getPromotionDeps());
382
+ }
369
383
  /**
370
384
  * Get promotion dependencies for the extracted promotion module
371
385
  */