agentic-qe 3.9.32 → 3.9.34

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 (333) hide show
  1. package/.claude/skills/skills-manifest.json +1 -1
  2. package/CHANGELOG.md +120 -0
  3. package/assets/skills/skills-manifest.json +1 -1
  4. package/dist/cli/bundle.js +5 -5
  5. package/dist/cli/chunks/adapter-OXCJPHRI.js +2 -0
  6. package/dist/cli/chunks/{agent-booster-wasm-WKS3E6KT.js → agent-booster-wasm-UD3YB7FC.js} +2 -2
  7. package/dist/cli/chunks/{agent-handler-LYCAWE7S.js → agent-handler-BNBGQS6N.js} +2 -2
  8. package/dist/cli/chunks/{agent-memory-branch-XF7IOMRK.js → agent-memory-branch-NJHROVKY.js} +2 -2
  9. package/dist/cli/chunks/aqe-learning-engine-HDAC5FJJ.js +2 -0
  10. package/dist/cli/chunks/{audit-D2AY3HFP.js → audit-4Y7M2S2O.js} +2 -2
  11. package/dist/cli/chunks/base-JY364ZUA.js +2 -0
  12. package/dist/cli/chunks/{hnswlib-node-BWUH4OQT.js → better-sqlite3-4JUNP7IW.js} +2 -2
  13. package/dist/cli/chunks/{brain-handler-NNW4TAO2.js → brain-handler-VWRD34M6.js} +3 -3
  14. package/dist/cli/chunks/{branch-enumerator-OM5HNZKV.js → branch-enumerator-H4WLPOU3.js} +2 -2
  15. package/dist/cli/chunks/{browser-Y2FU2NV4.js → browser-Y7ZNFLEU.js} +2 -2
  16. package/dist/cli/chunks/browser-workflow-DAGIWFJE.js +2 -0
  17. package/dist/cli/chunks/{chunk-O5UGJ3OI.js → chunk-26BODPAN.js} +2 -2
  18. package/dist/cli/chunks/{chunk-OKEHGXIS.js → chunk-2C6LRXLU.js} +2 -2
  19. package/dist/cli/chunks/{chunk-WQ4MT74X.js → chunk-2MC2YH4J.js} +1 -1
  20. package/dist/cli/chunks/{chunk-M5PYPGBC.js → chunk-3K3QGBH7.js} +2 -2
  21. package/dist/cli/chunks/{chunk-5R5WOLZM.js → chunk-3OTG4IXK.js} +1 -1
  22. package/dist/cli/chunks/{chunk-PS6ISBED.js → chunk-3PRHEG4B.js} +2 -2
  23. package/dist/cli/chunks/{chunk-7PTW3M67.js → chunk-45SJSOSI.js} +2 -2
  24. package/dist/cli/chunks/{chunk-PPS6VN24.js → chunk-4AIJOXQJ.js} +1 -1
  25. package/dist/cli/chunks/{chunk-62UXGD5J.js → chunk-4FW4ZWPB.js} +5 -5
  26. package/dist/cli/chunks/{chunk-YVMJTBXB.js → chunk-4GHSIVTA.js} +3 -3
  27. package/dist/cli/chunks/{chunk-A6VI5BZU.js → chunk-4GSUSYZK.js} +4 -4
  28. package/dist/cli/chunks/{chunk-MEHNT37H.js → chunk-4JILSEZT.js} +2 -2
  29. package/dist/cli/chunks/{chunk-VKNCMGOJ.js → chunk-4K5KVC7R.js} +4 -4
  30. package/dist/cli/chunks/{chunk-HPQZSXED.js → chunk-4W2GGE4Z.js} +1 -1
  31. package/dist/cli/chunks/{chunk-EFEJLZDN.js → chunk-4YDLD5TW.js} +1 -1
  32. package/dist/cli/chunks/{chunk-PG5F2VHA.js → chunk-53Y6ZKPN.js} +2 -2
  33. package/dist/cli/chunks/{chunk-2L5GAOST.js → chunk-54HTQ3KQ.js} +2 -2
  34. package/dist/cli/chunks/{chunk-WTNM7NA4.js → chunk-5H44TVAY.js} +1 -1
  35. package/dist/cli/chunks/{chunk-3R4CMTWF.js → chunk-5Y3P6IAQ.js} +2 -2
  36. package/dist/cli/chunks/{chunk-XCUNQ3FK.js → chunk-67Y5HBMW.js} +2 -2
  37. package/dist/cli/chunks/{chunk-5XY6SULI.js → chunk-6FMMHW2R.js} +2 -2
  38. package/dist/cli/chunks/{chunk-XHQFVTFD.js → chunk-6FNPEC2I.js} +1 -1
  39. package/dist/cli/chunks/{chunk-A4UNK5SY.js → chunk-6UUNB4AW.js} +2 -2
  40. package/dist/cli/chunks/{chunk-VJL7DNUU.js → chunk-6XI7MNHH.js} +22 -16
  41. package/dist/cli/chunks/{chunk-SLH7LFVY.js → chunk-7AEFEPFH.js} +2 -2
  42. package/dist/cli/chunks/{chunk-ZIVOT3B7.js → chunk-7II46WAF.js} +2 -2
  43. package/dist/cli/chunks/chunk-7IUNZ653.js +9 -0
  44. package/dist/cli/chunks/{chunk-IGEZVFOM.js → chunk-7QTMWILQ.js} +2 -2
  45. package/dist/cli/chunks/{chunk-DFY7F4TE.js → chunk-7YM2AZXK.js} +1 -1
  46. package/dist/cli/chunks/{chunk-REW3W3ZW.js → chunk-7ZE5BXCN.js} +1 -1
  47. package/dist/cli/chunks/{chunk-FNQCWEVJ.js → chunk-A2FZAEIU.js} +2 -2
  48. package/dist/cli/chunks/{chunk-JDW6GN3A.js → chunk-AGHBG5E4.js} +2 -2
  49. package/dist/cli/chunks/{chunk-NW5FYGDE.js → chunk-AHEHD3AP.js} +2 -2
  50. package/dist/cli/chunks/{chunk-NZRJWK5H.js → chunk-AIQHS7D2.js} +9 -9
  51. package/dist/cli/chunks/{chunk-MIHQIAVK.js → chunk-ARKWPPBZ.js} +2 -2
  52. package/dist/cli/chunks/{chunk-7AISRWBS.js → chunk-AX7F6CNY.js} +2 -2
  53. package/dist/cli/chunks/{chunk-2Z2IQBIJ.js → chunk-AYLTFMTW.js} +1 -1
  54. package/dist/cli/chunks/{chunk-6EKXBWJD.js → chunk-BBULBXTO.js} +2 -2
  55. package/dist/cli/chunks/{chunk-BQML7B4W.js → chunk-BP45DZKL.js} +3 -3
  56. package/dist/cli/chunks/{chunk-PLGMPG7S.js → chunk-CKJGWNIS.js} +2 -2
  57. package/dist/cli/chunks/{chunk-Z2EDNMCQ.js → chunk-CWM5LSLQ.js} +2 -2
  58. package/dist/cli/chunks/{chunk-667I4RTC.js → chunk-DGEXLCOX.js} +1 -1
  59. package/dist/cli/chunks/{chunk-W3JB3G7C.js → chunk-DIX6AR2P.js} +2 -2
  60. package/dist/cli/chunks/{chunk-45N22VAB.js → chunk-DKA5WC6T.js} +2 -2
  61. package/dist/cli/chunks/chunk-DOKH4EJX.js +2 -0
  62. package/dist/cli/chunks/{chunk-ONNTJXU7.js → chunk-DXKZQYBK.js} +2 -2
  63. package/dist/cli/chunks/chunk-DXOFPU3A.js +2 -0
  64. package/dist/cli/chunks/{chunk-FWEYOD3S.js → chunk-E2IC6PHO.js} +2 -2
  65. package/dist/cli/chunks/{chunk-H7YKTJMY.js → chunk-EPETDHDV.js} +2 -2
  66. package/dist/cli/chunks/{chunk-G77CYF7H.js → chunk-EWVKCXV3.js} +3 -3
  67. package/dist/cli/chunks/{chunk-V6HM2BKJ.js → chunk-FAQSUNVC.js} +1 -1
  68. package/dist/cli/chunks/{chunk-JRYNHFZA.js → chunk-FCWQRUXQ.js} +1 -1
  69. package/dist/cli/chunks/{chunk-FFBF5BLQ.js → chunk-FW3EEASU.js} +1 -1
  70. package/dist/cli/chunks/{chunk-NVZHCAEB.js → chunk-GCMCU54O.js} +2 -2
  71. package/dist/cli/chunks/{chunk-OKRY4LNE.js → chunk-GW7T2ABB.js} +3 -3
  72. package/dist/cli/chunks/{chunk-KHZRNJ3A.js → chunk-GYJAPCP2.js} +1 -1
  73. package/dist/cli/chunks/{chunk-PQAYCK2U.js → chunk-HIZWO4J3.js} +2 -2
  74. package/dist/cli/chunks/{chunk-5WR42V5O.js → chunk-I74WDBHS.js} +2 -2
  75. package/dist/cli/chunks/{chunk-XB3SIYGU.js → chunk-IH5MVTLA.js} +2 -2
  76. package/dist/cli/chunks/{chunk-4VAZSCTZ.js → chunk-IPEUGCUK.js} +2 -2
  77. package/dist/cli/chunks/{chunk-6SYP7QX6.js → chunk-IPRUAUGV.js} +4 -4
  78. package/dist/cli/chunks/{chunk-I6Q6BPVH.js → chunk-IT7TOO52.js} +1 -1
  79. package/dist/cli/chunks/{chunk-ZESMMAKZ.js → chunk-IUZNVWCR.js} +2 -2
  80. package/dist/cli/chunks/{chunk-V7ZBPSVG.js → chunk-JFGKC6D4.js} +1 -1
  81. package/dist/cli/chunks/{chunk-PIXUX2NR.js → chunk-JH5HQ2HW.js} +2 -2
  82. package/dist/cli/chunks/{chunk-7IDPVSTF.js → chunk-JNLDMRUK.js} +1 -1
  83. package/dist/cli/chunks/{chunk-SRJ5N7LD.js → chunk-JNURLIOU.js} +2 -2
  84. package/dist/cli/chunks/{chunk-DBE2LIYG.js → chunk-JOOI3M6I.js} +2 -2
  85. package/dist/cli/chunks/{chunk-HR6NX6DW.js → chunk-JRCHYAB7.js} +2 -2
  86. package/dist/cli/chunks/{chunk-5DSANX6S.js → chunk-JZBBCQ7Y.js} +2 -2
  87. package/dist/cli/chunks/{chunk-3MHWBCSC.js → chunk-K5KL5MPG.js} +1 -1
  88. package/dist/cli/chunks/{chunk-G6VVOUUF.js → chunk-K7EU2KJF.js} +2 -2
  89. package/dist/cli/chunks/{chunk-PHRMWRXA.js → chunk-KN6QHR7J.js} +2 -2
  90. package/dist/cli/chunks/{chunk-S4M7U6CZ.js → chunk-L5W7KTBW.js} +2 -2
  91. package/dist/cli/chunks/{chunk-LTSNDM5N.js → chunk-LBKEWXMR.js} +2 -2
  92. package/dist/cli/chunks/{chunk-RZXAXWBD.js → chunk-LH372B74.js} +2 -2
  93. package/dist/cli/chunks/{chunk-W2VTHUDK.js → chunk-LIIG3F7K.js} +2 -2
  94. package/dist/cli/chunks/{chunk-MERMCKPG.js → chunk-LUU2O2AZ.js} +1 -1
  95. package/dist/cli/chunks/{chunk-EVSUZKD5.js → chunk-LYOAIGIT.js} +2 -2
  96. package/dist/cli/chunks/{chunk-5A6LBGRU.js → chunk-M6NSPXHR.js} +2 -2
  97. package/dist/cli/chunks/{chunk-IGQPGXP7.js → chunk-MIH7Y46H.js} +2 -2
  98. package/dist/cli/chunks/{chunk-ESNBKAT6.js → chunk-NKBLXHVM.js} +2 -2
  99. package/dist/cli/chunks/{chunk-6ZG6TBWF.js → chunk-O4DJLMRE.js} +4 -4
  100. package/dist/cli/chunks/{chunk-V5RLGPEW.js → chunk-P22YWOM2.js} +2 -2
  101. package/dist/cli/chunks/{chunk-OMOGD2NN.js → chunk-PMFV3ZFP.js} +2 -2
  102. package/dist/cli/chunks/{chunk-THYGFSTA.js → chunk-PYQ7VCH2.js} +13 -13
  103. package/dist/cli/chunks/{chunk-V7I6FTLG.js → chunk-QFBPVPYA.js} +1 -1
  104. package/dist/cli/chunks/{chunk-33PGBYTC.js → chunk-QPH72S4A.js} +2 -2
  105. package/dist/cli/chunks/{chunk-BBPOTFIY.js → chunk-QX74JLGO.js} +2 -2
  106. package/dist/cli/chunks/{chunk-YBUUAFKR.js → chunk-R7IYH6X2.js} +1 -1
  107. package/dist/cli/chunks/{chunk-6YGFAJ3X.js → chunk-RASEXZD3.js} +1 -1
  108. package/dist/cli/chunks/{chunk-YJV6TTCW.js → chunk-REVCXO2R.js} +2 -2
  109. package/dist/cli/chunks/{chunk-HHBFI3YA.js → chunk-RGQ2AOYV.js} +2 -2
  110. package/dist/cli/chunks/{chunk-O5NEZCTB.js → chunk-RJUWW4XE.js} +1 -1
  111. package/dist/cli/chunks/{chunk-MTOHV22P.js → chunk-RVG3DAU3.js} +1 -1
  112. package/dist/cli/chunks/{chunk-LI2IOJMM.js → chunk-RXQCDEDD.js} +1 -1
  113. package/dist/cli/chunks/{chunk-HGWQC7PR.js → chunk-RYFQYSVF.js} +2 -2
  114. package/dist/cli/chunks/{chunk-OPOGZAN5.js → chunk-S43X3HTH.js} +2 -2
  115. package/dist/cli/chunks/{chunk-YUSGT2CU.js → chunk-SLHE7BA3.js} +1 -1
  116. package/dist/cli/chunks/chunk-TH7BP4KG.js +2 -0
  117. package/dist/cli/chunks/{chunk-LR5VW3OS.js → chunk-TZFIBU6S.js} +2 -2
  118. package/dist/cli/chunks/{chunk-2XC4XVCI.js → chunk-UAKD7J72.js} +1 -1
  119. package/dist/cli/chunks/{chunk-UJMGNO6L.js → chunk-UCBDYSNE.js} +1 -1
  120. package/dist/cli/chunks/{chunk-4H4PEZUX.js → chunk-ULXDULD6.js} +2 -2
  121. package/dist/cli/chunks/{chunk-BGRC4676.js → chunk-UZZKBGGQ.js} +3 -3
  122. package/dist/cli/chunks/{chunk-SJETAUZA.js → chunk-VB2ZBN46.js} +1 -1
  123. package/dist/cli/chunks/{chunk-YUTSN5BK.js → chunk-VID5XDDQ.js} +2 -2
  124. package/dist/cli/chunks/{chunk-OK2TFTXP.js → chunk-VR65KHTH.js} +2 -2
  125. package/dist/cli/chunks/chunk-VSNLUVQI.js +15 -0
  126. package/dist/cli/chunks/{chunk-IJQJV7BC.js → chunk-WGEKHWCJ.js} +3 -3
  127. package/dist/cli/chunks/{chunk-BV3SGEV7.js → chunk-WGMA22FN.js} +1 -1
  128. package/dist/cli/chunks/{chunk-T5ADVYPH.js → chunk-WM6MDDHR.js} +1 -1
  129. package/dist/cli/chunks/{chunk-6R6QCGNU.js → chunk-WUDJA3B6.js} +2 -2
  130. package/dist/cli/chunks/{chunk-UUQ3SOKM.js → chunk-XK2IKEXP.js} +1 -1
  131. package/dist/cli/chunks/{chunk-TX2DBLTL.js → chunk-XLDGQJWP.js} +1 -1
  132. package/dist/cli/chunks/chunk-XM6CMEQK.js +2 -0
  133. package/dist/cli/chunks/chunk-XWD7QYS5.js +2 -0
  134. package/dist/cli/chunks/{chunk-QRTZ67BC.js → chunk-YG5HLQAB.js} +2 -2
  135. package/dist/cli/chunks/{chunk-MQQANXFS.js → chunk-YIVJD5IY.js} +2 -2
  136. package/dist/cli/chunks/{chunk-MMVSERJQ.js → chunk-Z6IQMLD7.js} +2 -2
  137. package/dist/cli/chunks/{chunk-LHDTXTS7.js → chunk-ZQZ4NYTM.js} +1 -1
  138. package/dist/cli/chunks/{chunk-BDXEL3GM.js → chunk-ZSOPY44S.js} +2 -2
  139. package/dist/cli/chunks/{chunk-RHXYZ6AZ.js → chunk-ZYF6F4MA.js} +145 -145
  140. package/dist/cli/chunks/{ci-NSF6OHB4.js → ci-SIPIBCBR.js} +2 -2
  141. package/dist/cli/chunks/{ci-output-ZPDJ42U3.js → ci-output-TDKJNSD4.js} +2 -2
  142. package/dist/cli/chunks/{circuit-breaker-Y2RUJDYG.js → circuit-breaker-4JC4THEE.js} +2 -2
  143. package/dist/cli/chunks/{claude-flow-setup-OH6G6KM2.js → claude-flow-setup-7LCBF65N.js} +2 -2
  144. package/dist/cli/chunks/client-N53TFCGN.js +2 -0
  145. package/dist/cli/chunks/{cline-installer-IHH4F27G.js → cline-installer-X3RPF536.js} +2 -2
  146. package/dist/cli/chunks/{code-SFAHWFTX.js → code-QWSERFVQ.js} +2 -2
  147. package/dist/cli/chunks/{code-index-extractor-GXECMOM2.js → code-index-extractor-B6C35JTM.js} +2 -2
  148. package/dist/cli/chunks/{codex-installer-UPMSAFCQ.js → codex-installer-A427S2HR.js} +2 -2
  149. package/dist/cli/chunks/{completions-5TX6LDHY.js → completions-77KS3LAM.js} +2 -2
  150. package/dist/cli/chunks/{complexity-analyzer-J2ZR3XZB.js → complexity-analyzer-SJUYVCGS.js} +2 -2
  151. package/dist/cli/chunks/{continuedev-installer-GWYZKB5A.js → continuedev-installer-HQMJQXFA.js} +2 -2
  152. package/dist/cli/chunks/{copilot-installer-DQZMQWI7.js → copilot-installer-JVWVXFRV.js} +2 -2
  153. package/dist/cli/chunks/{cost-tracker-V7KIGCLZ.js → cost-tracker-ATJWY2ZJ.js} +2 -2
  154. package/dist/cli/chunks/{coverage-3X6LA2GZ.js → coverage-OVUELXVF.js} +3 -3
  155. package/dist/cli/chunks/cross-domain-router-3TYSHECB.js +2 -0
  156. package/dist/cli/chunks/{cursor-installer-ENDG4JIU.js → cursor-installer-HMRQMVDC.js} +2 -2
  157. package/dist/cli/chunks/{daemon-4XVAO7GT.js → daemon-KSWTELMB.js} +3 -3
  158. package/dist/cli/chunks/{daemon-TC65CQFK.js → daemon-PJLXQV52.js} +4 -4
  159. package/dist/cli/chunks/{dag-attention-scheduler-JOSCDRZC.js → dag-attention-scheduler-U2ENVYTQ.js} +2 -2
  160. package/dist/cli/chunks/{detect-KWZX3OMK.js → detect-TMMIVPON.js} +2 -2
  161. package/dist/cli/chunks/{dist-node-R4U2PJ47.js → dist-node-ELGZENVQ.js} +2 -2
  162. package/dist/cli/chunks/{domain-handler-BMYYZO2L.js → domain-handler-XERZXZL6.js} +2 -2
  163. package/dist/cli/chunks/{domain-transfer-MSDBBDLC.js → domain-transfer-QRERMYSJ.js} +2 -2
  164. package/dist/cli/chunks/dream-EU6ZE7N7.js +2 -0
  165. package/dist/cli/chunks/{embed-and-insert-pattern-MFINPOLS.js → embed-and-insert-pattern-Q2PARYU4.js} +2 -2
  166. package/dist/cli/chunks/{eval-OER6UNUY.js → eval-A2QR6KW4.js} +2 -2
  167. package/dist/cli/chunks/{experience-capture-middleware-F5I77ECG.js → experience-capture-middleware-CQWPD3DM.js} +3 -3
  168. package/dist/cli/chunks/{fast-paths-P3KT5DUQ.js → fast-paths-IAOUZHSJ.js} +2 -2
  169. package/dist/cli/chunks/{feature-flags-DYFZSQLV.js → feature-flags-3D74EHP5.js} +2 -2
  170. package/dist/cli/chunks/{feature-flags-5EBWQ5WU.js → feature-flags-CODLAMZU.js} +2 -2
  171. package/dist/cli/chunks/{file-discovery-MOBVABSM.js → file-discovery-ZUBZH4Q6.js} +2 -2
  172. package/dist/cli/chunks/{fleet-J3R3NQNC.js → fleet-TTADPVN2.js} +3 -3
  173. package/dist/cli/chunks/{gnn-wrapper-QD76SULF.js → gnn-wrapper-ZFDW3ZAW.js} +2 -2
  174. package/dist/cli/chunks/{heartbeat-handler-AJEWTPZ4.js → heartbeat-handler-IV67NVZW.js} +4 -4
  175. package/dist/cli/chunks/heartbeat-scheduler-JN775DB4.js +2 -0
  176. package/dist/cli/chunks/hnsw-adapter-PHMYMEDW.js +2 -0
  177. package/dist/cli/chunks/hnsw-index-BS65TOXD.js +2 -0
  178. package/dist/cli/chunks/{hnsw-legacy-bridge-5VRM5N7K.js → hnsw-legacy-bridge-GMFHJ4OK.js} +2 -2
  179. package/dist/cli/chunks/{better-sqlite3-K2VWFDKT.js → hnswlib-node-3LBUPOTX.js} +2 -2
  180. package/dist/cli/chunks/{hooks-7PMVKQOE.js → hooks-DOGCENUA.js} +34 -34
  181. package/dist/cli/chunks/{hybrid-router-2K2LW45J.js → hybrid-router-LQO3U6IH.js} +2 -2
  182. package/dist/cli/chunks/{hypergraph-engine-2CQ735JO.js → hypergraph-engine-KHKAUWVL.js} +2 -2
  183. package/dist/cli/chunks/{hypergraph-handler-AQ53GVIW.js → hypergraph-handler-T6X4F24T.js} +3 -3
  184. package/dist/cli/chunks/impact-analyzer-BR25PT76.js +2 -0
  185. package/dist/cli/chunks/{init-handler-ZOVJPAWO.js → init-handler-JTXMI2GF.js} +13 -12
  186. package/dist/cli/chunks/init-wizard-42IYSTTD.js +2 -0
  187. package/dist/cli/chunks/kernel-JFSTL7NN.js +2 -0
  188. package/dist/cli/chunks/{kilocode-installer-GWQCNLKI.js → kilocode-installer-P2WDAIOD.js} +2 -2
  189. package/dist/cli/chunks/{kiro-installer-6KVES4MO.js → kiro-installer-CLTOWLVB.js} +2 -2
  190. package/dist/cli/chunks/knowledge-graph-JYRFHKO2.js +2 -0
  191. package/dist/cli/chunks/{learning-6XMNWXRT.js → learning-CNDBY3JP.js} +3 -3
  192. package/dist/cli/chunks/{llm-router-GS4AZJJC.js → llm-router-SJOZ6EIJ.js} +4 -4
  193. package/dist/cli/chunks/load-GXZWRYTU.js +2 -0
  194. package/dist/cli/chunks/load-test-K7XFH5AD.js +2 -0
  195. package/dist/cli/chunks/{mcp-6V2H7EXU.js → mcp-LLMLANLC.js} +2 -2
  196. package/dist/cli/chunks/{memory-YLGPOB2H.js → memory-MEBFXR4C.js} +5 -5
  197. package/dist/cli/chunks/memory-backend-5O4Y5PKW.js +2 -0
  198. package/dist/cli/chunks/memory-handlers-46WKVXKK.js +2 -0
  199. package/dist/cli/chunks/{multi-model-executor-SL2EKAH2.js → multi-model-executor-ZO35ZPDR.js} +2 -2
  200. package/dist/cli/chunks/{opencode-installer-ADOJVGNA.js → opencode-installer-EG2MFPDZ.js} +2 -2
  201. package/dist/cli/chunks/{orchestrator-O4IWW2VU.js → orchestrator-PXA5IT5X.js} +5 -5
  202. package/dist/cli/chunks/{pipeline-5BD5YQNQ.js → pipeline-T3XOEAKT.js} +2 -2
  203. package/dist/cli/chunks/{platform-HXSUOOJH.js → platform-CPKBJ4I6.js} +2 -2
  204. package/dist/cli/chunks/{plugin-HOLH5CUH.js → plugin-YDP2IK3D.js} +2 -2
  205. package/dist/cli/chunks/{prime-radiant-advanced-wasm-PJTL7OLS.js → prime-radiant-advanced-wasm-GDN5WBH2.js} +2 -2
  206. package/dist/cli/chunks/protocol-executor-VACEWXHI.js +2 -0
  207. package/dist/cli/chunks/{protocol-handler-K27YGLC7.js → protocol-handler-32QLWTY3.js} +2 -2
  208. package/dist/cli/chunks/{prove-MHCLHQQ6.js → prove-7JFRIBOM.js} +2 -2
  209. package/dist/cli/chunks/{provider-manager-3645PPXX.js → provider-manager-TNR7QM6Z.js} +2 -2
  210. package/dist/cli/chunks/qe-reasoning-bank-4A5MKOA5.js +2 -0
  211. package/dist/cli/chunks/{quality-NDE6EDOY.js → quality-G36Z4FD3.js} +2 -2
  212. package/dist/cli/chunks/queen-coordinator-FF3W2BLZ.js +2 -0
  213. package/dist/cli/chunks/{real-embeddings-VD3EVV3U.js → real-embeddings-RYVIB5N2.js} +2 -2
  214. package/dist/cli/chunks/{roocode-installer-63Y45UUG.js → roocode-installer-ZANTFQAH.js} +2 -2
  215. package/dist/cli/chunks/router-OTSEMLFG.js +2 -0
  216. package/dist/cli/chunks/routing-feedback-PHWP7EO3.js +2 -0
  217. package/dist/cli/chunks/{routing-handler-76XISU2E.js → routing-handler-6YNDHLBC.js} +2 -2
  218. package/dist/cli/chunks/{ruvector-commands-AEKOZZHZ.js → ruvector-commands-E42JA573.js} +2 -2
  219. package/dist/cli/chunks/{rvf-dual-writer-4DMUIZQF.js → rvf-dual-writer-SQDEXP45.js} +2 -2
  220. package/dist/cli/chunks/{rvf-migration-adapter-YUTXFOZ3.js → rvf-migration-adapter-DMI4QBRX.js} +2 -2
  221. package/dist/cli/chunks/{rvf-migration-coordinator-XJ5N2W37.js → rvf-migration-coordinator-AUEOD5MP.js} +2 -2
  222. package/dist/cli/chunks/rvf-native-adapter-E4XSLZPD.js +2 -0
  223. package/dist/cli/chunks/safe-db-ESTCAWF2.js +2 -0
  224. package/dist/cli/chunks/schedule-VJYEPFI4.js +2 -0
  225. package/dist/cli/chunks/scheduler-2SVKVACS.js +2 -0
  226. package/dist/cli/chunks/{security-6YS6GQGO.js → security-BJTKEGXZ.js} +3 -3
  227. package/dist/cli/chunks/shared-rvf-adapter-RWX6AAVO.js +2 -0
  228. package/dist/cli/chunks/{shared-rvf-dual-writer-MH2Y65HA.js → shared-rvf-dual-writer-PIZFXKKE.js} +2 -2
  229. package/dist/cli/chunks/sqlite-persistence-KGN5AIVX.js +2 -0
  230. package/dist/cli/chunks/{status-handler-57JQMPY5.js → status-handler-BSQJAFH2.js} +2 -2
  231. package/dist/cli/chunks/{structural-health-34D5VWRD.js → structural-health-ZL4KQNQX.js} +2 -2
  232. package/dist/cli/chunks/{sync-TTQ6ZB5D.js → sync-BM32HBUY.js} +2 -2
  233. package/dist/cli/chunks/{sync-HJD2US5P.js → sync-KH3IIPKB.js} +2 -2
  234. package/dist/cli/chunks/{task-handler-4RF57637.js → task-handler-SWMZVIZ5.js} +2 -2
  235. package/dist/cli/chunks/{task-handlers-BRSK7HDE.js → task-handlers-PJD6QWQP.js} +3 -3
  236. package/dist/cli/chunks/{test-GMUW2VR3.js → test-ACQ2N7AK.js} +4 -4
  237. package/dist/cli/chunks/{test-scheduling-7LF24IFV.js → test-scheduling-BCSHQHZO.js} +3 -3
  238. package/dist/cli/chunks/{token-bootstrap-VYT4RTHU.js → token-bootstrap-7DAATWOU.js} +2 -2
  239. package/dist/cli/chunks/{token-usage-NFNCPQGW.js → token-usage-AYPCJN77.js} +2 -2
  240. package/dist/cli/chunks/{transformers-GGD5GIEY.js → transformers-ZYSRJRXA.js} +2 -2
  241. package/dist/cli/chunks/tree-sitter-wasm-parser-HXHBILDS.js +2 -0
  242. package/dist/cli/chunks/{types-WJ3ZTRD5.js → types-O5ODR3WQ.js} +2 -2
  243. package/dist/cli/chunks/unified-memory-UBGLIO43.js +2 -0
  244. package/dist/cli/chunks/unified-memory-hnsw-BJMFYCFZ.js +2 -0
  245. package/dist/cli/chunks/unified-persistence-Q54OKOYY.js +2 -0
  246. package/dist/cli/chunks/{upgrade-IMBT4F6K.js → upgrade-ULP5J35D.js} +2 -2
  247. package/dist/cli/chunks/{validate-76OVF45Z.js → validate-JS6WD4S5.js} +2 -2
  248. package/dist/cli/chunks/{validate-swarm-HH2ZYWXA.js → validate-swarm-NCO5QBTJ.js} +2 -2
  249. package/dist/cli/chunks/{vibium-74WQNDBX.js → vibium-RGRUK6EW.js} +2 -2
  250. package/dist/cli/chunks/visual-security-RRVHQBRP.js +2 -0
  251. package/dist/cli/chunks/{web-tree-sitter-W6RGE4SL.js → web-tree-sitter-NGX5C2HB.js} +2 -2
  252. package/dist/cli/chunks/{windsurf-installer-7DMSFCA2.js → windsurf-installer-KRAE3JB2.js} +2 -2
  253. package/dist/cli/chunks/witness-chain-2YIUBXAF.js +2 -0
  254. package/dist/cli/chunks/{witness-chain-BLZ4ZKAD.js → witness-chain-62V6YLTM.js} +2 -2
  255. package/dist/cli/chunks/{workflow-RNSDKRZ4.js → workflow-BVMZE2FE.js} +4 -4
  256. package/dist/cli/chunks/workflow-orchestrator-VGNC5PFE.js +2 -0
  257. package/dist/cli/chunks/{wrappers-J7RXMIOY.js → wrappers-SEDAPKCG.js} +2 -2
  258. package/dist/cli/commands/hooks-handlers/hooks-shared.js +12 -21
  259. package/dist/cli/handlers/init-handler.js +47 -0
  260. package/dist/domains/learning-optimization/coordinator-helpers.js +7 -1
  261. package/dist/domains/learning-optimization/coordinator.js +5 -1
  262. package/dist/domains/learning-optimization/services/learning-coordinator.js +6 -1
  263. package/dist/domains/learning-optimization/services/metrics-optimizer.js +4 -1
  264. package/dist/domains/learning-optimization/services/production-intel.js +14 -5
  265. package/dist/domains/learning-optimization/services/transfer-specialist.js +12 -4
  266. package/dist/integrations/embeddings/base/EmbeddingGenerator.d.ts +1 -1
  267. package/dist/integrations/embeddings/base/EmbeddingGenerator.js +14 -5
  268. package/dist/integrations/ruvector/rvf-dual-writer.d.ts +22 -0
  269. package/dist/integrations/ruvector/rvf-dual-writer.js +21 -0
  270. package/dist/integrations/ruvector/rvf-native-adapter.d.ts +18 -1
  271. package/dist/integrations/ruvector/rvf-native-adapter.js +15 -1
  272. package/dist/integrations/ruvector/shared-rvf-adapter.d.ts +46 -1
  273. package/dist/integrations/ruvector/shared-rvf-adapter.js +137 -0
  274. package/dist/kernel/hybrid-backend.d.ts +14 -3
  275. package/dist/kernel/hybrid-backend.js +16 -3
  276. package/dist/kernel/unified-memory.d.ts +3 -1
  277. package/dist/kernel/unified-memory.js +28 -3
  278. package/dist/learning/dream/dream-scheduler.d.ts +18 -0
  279. package/dist/learning/dream/dream-scheduler.js +68 -0
  280. package/dist/learning/qe-reasoning-bank.js +19 -2
  281. package/dist/learning/real-embeddings.js +1 -1
  282. package/dist/learning/sqlite-persistence.d.ts +11 -0
  283. package/dist/learning/sqlite-persistence.js +30 -0
  284. package/dist/mcp/bundle.js +404 -398
  285. package/dist/shared/parsers/tree-sitter-wasm-parser.js +8 -3
  286. package/dist/shared/utils/index.d.ts +1 -0
  287. package/dist/shared/utils/index.js +1 -0
  288. package/dist/shared/utils/kv-date-rehydrate.d.ts +51 -0
  289. package/dist/shared/utils/kv-date-rehydrate.js +78 -0
  290. package/dist/workers/workers/learning-consolidation.js +7 -1
  291. package/package.json +21 -10
  292. package/dist/cli/chunks/adapter-CDQOF5TF.js +0 -2
  293. package/dist/cli/chunks/aqe-learning-engine-RZK22CJB.js +0 -2
  294. package/dist/cli/chunks/base-UGH6TVO4.js +0 -2
  295. package/dist/cli/chunks/browser-workflow-SGOL3FCJ.js +0 -2
  296. package/dist/cli/chunks/chunk-FIONYUVH.js +0 -2
  297. package/dist/cli/chunks/chunk-FV2MU6CY.js +0 -2
  298. package/dist/cli/chunks/chunk-G6AJMFWL.js +0 -15
  299. package/dist/cli/chunks/chunk-QPYNQSWD.js +0 -9
  300. package/dist/cli/chunks/chunk-VKCWWR6C.js +0 -2
  301. package/dist/cli/chunks/chunk-YVQ4PR4H.js +0 -2
  302. package/dist/cli/chunks/client-QQGRKAY7.js +0 -2
  303. package/dist/cli/chunks/cross-domain-router-3SHAGRVP.js +0 -2
  304. package/dist/cli/chunks/dream-OCZK42FM.js +0 -2
  305. package/dist/cli/chunks/heartbeat-scheduler-EAVZR6TJ.js +0 -2
  306. package/dist/cli/chunks/hnsw-adapter-BY4XB7FB.js +0 -2
  307. package/dist/cli/chunks/hnsw-index-657CZRG7.js +0 -2
  308. package/dist/cli/chunks/impact-analyzer-GI6UVAMT.js +0 -2
  309. package/dist/cli/chunks/init-wizard-HOH577MH.js +0 -2
  310. package/dist/cli/chunks/kernel-JDYBG5GE.js +0 -2
  311. package/dist/cli/chunks/knowledge-graph-RAQOWLG3.js +0 -2
  312. package/dist/cli/chunks/load-FEMEQNE6.js +0 -2
  313. package/dist/cli/chunks/load-test-3MEJ43U2.js +0 -2
  314. package/dist/cli/chunks/memory-backend-2A47ZRGO.js +0 -2
  315. package/dist/cli/chunks/memory-handlers-UBTBC7D2.js +0 -2
  316. package/dist/cli/chunks/protocol-executor-3FR7FBVM.js +0 -2
  317. package/dist/cli/chunks/qe-reasoning-bank-CHNYPYQW.js +0 -2
  318. package/dist/cli/chunks/queen-coordinator-J6ZRYTBX.js +0 -2
  319. package/dist/cli/chunks/router-23HRN2Z6.js +0 -2
  320. package/dist/cli/chunks/routing-feedback-R6A4B6ZG.js +0 -2
  321. package/dist/cli/chunks/rvf-native-adapter-QINEJZM7.js +0 -2
  322. package/dist/cli/chunks/safe-db-YXMCSKFH.js +0 -2
  323. package/dist/cli/chunks/schedule-XVFD27P5.js +0 -2
  324. package/dist/cli/chunks/scheduler-NWH2IDEU.js +0 -2
  325. package/dist/cli/chunks/shared-rvf-adapter-FTZY35WI.js +0 -2
  326. package/dist/cli/chunks/sqlite-persistence-BR6YJF5P.js +0 -2
  327. package/dist/cli/chunks/tree-sitter-wasm-parser-GKYG6NKT.js +0 -2
  328. package/dist/cli/chunks/unified-memory-AT3Z4CY7.js +0 -2
  329. package/dist/cli/chunks/unified-memory-hnsw-6FOIGINN.js +0 -2
  330. package/dist/cli/chunks/unified-persistence-TCJB7MQS.js +0 -2
  331. package/dist/cli/chunks/visual-security-IBAUX2K5.js +0 -2
  332. package/dist/cli/chunks/witness-chain-GNNF23XU.js +0 -2
  333. package/dist/cli/chunks/workflow-orchestrator-S2YONHGM.js +0 -2
@@ -1,5 +1,5 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.32");process.exit(0)}
2
- import"./chunk-7PTW3M67.js";import{b as $}from"./chunk-PPS6VN24.js";import{d as R}from"./chunk-PQAYCK2U.js";import{b as k,c as C,d as b}from"./chunk-NVZHCAEB.js";import{c as W}from"./chunk-OK2TFTXP.js";import"./chunk-EFEJLZDN.js";import"./chunk-5WR42V5O.js";import"./chunk-XHQFVTFD.js";import{Command as O}from"commander";import o from"chalk";function P(d,a){let m=d.indexOf("=");return m>0&&(a[d.substring(0,m)]=d.substring(m+1)),a}function x(d,a,m){let y=new O("workflow").description("Manage QE workflows and pipelines (ADR-041)");return y.command("run <file>").description("Execute a QE pipeline from YAML file").option("-w, --watch","Watch execution progress").option("-v, --verbose","Show detailed output").option("--params <json>","Additional parameters as JSON","{}").action(async(t,l)=>{if(!await m())return;let e=await import("fs"),c=(await import("path")).resolve(t);try{console.log(o.blue(`
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.34");process.exit(0)}
2
+ import"./chunk-45SJSOSI.js";import{b as $}from"./chunk-4AIJOXQJ.js";import{d as R}from"./chunk-HIZWO4J3.js";import{b as k,c as C,d as b}from"./chunk-GCMCU54O.js";import{c as W}from"./chunk-VR65KHTH.js";import"./chunk-4YDLD5TW.js";import"./chunk-I74WDBHS.js";import"./chunk-6FNPEC2I.js";import{Command as O}from"commander";import o from"chalk";function P(d,a){let m=d.indexOf("=");return m>0&&(a[d.substring(0,m)]=d.substring(m+1)),a}function x(d,a,m){let y=new O("workflow").description("Manage QE workflows and pipelines (ADR-041)");return y.command("run <file>").description("Execute a QE pipeline from YAML file").option("-w, --watch","Watch execution progress").option("-v, --verbose","Show detailed output").option("--params <json>","Additional parameters as JSON","{}").action(async(t,l)=>{if(!await m())return;let e=await import("fs"),c=(await import("path")).resolve(t);try{console.log(o.blue(`
3
3
  Running workflow from: ${t}
4
4
  `));let s=k(c);if(!s.success||!s.workflow){console.log(o.red("Failed to parse pipeline:"));for(let w of s.errors)console.log(o.red(` ${w}`));await a(1)}let r={...W(l.params,"params")};if(s.pipeline){for(let w of s.pipeline.stages)if(w.params)for(let[S,h]of Object.entries(w.params))r[S]=h}if(!d.workflowOrchestrator.getWorkflow(s.workflow.id)){let w=d.workflowOrchestrator.registerWorkflow(s.workflow);w.success||(console.log(o.red(`Failed to register workflow: ${w.error.message}`)),await a(1))}let n=await d.workflowOrchestrator.executeWorkflow(s.workflow.id,r);if(!n.success){console.log(o.red(`Failed to start workflow: ${n.error.message}`)),await a(1);return}let p=n.value;if(console.log(o.cyan(` Execution ID: ${p}`)),console.log(o.gray(` Workflow: ${s.workflow.name}`)),console.log(o.gray(` Stages: ${s.workflow.steps.length}`)),console.log(""),l.watch){console.log(o.blue(`Workflow Progress:
5
5
  `));let w,S=Date.now();for(;;){let g=d.workflowOrchestrator.getWorkflowStatus(p);if(!g)break;if(!w||w.progress!==g.progress||w.status!==g.status||JSON.stringify(w.currentSteps)!==JSON.stringify(g.currentSteps)){process.stdout.write("\r\x1B[K");let v="\u2588".repeat(Math.floor(g.progress/5))+"\u2591".repeat(20-Math.floor(g.progress/5)),D=g.status==="completed"?o.green:g.status==="failed"?o.red:g.status==="running"?o.yellow:o.gray;console.log(` [${v}] ${g.progress}% - ${D(g.status)}`),g.currentSteps.length>0&&l.verbose&&console.log(o.gray(` Running: ${g.currentSteps.join(", ")}`)),w=g}if(g.status==="completed"||g.status==="failed"||g.status==="cancelled")break;await new Promise(v=>setTimeout(v,500))}let h=d.workflowOrchestrator.getWorkflowStatus(p);if(h){console.log("");let g=h.duration||Date.now()-S;h.status==="completed"?(console.log(o.green("Workflow completed successfully")),console.log(o.gray(` Duration: ${$(g)}`)),console.log(o.gray(` Completed: ${h.completedSteps.length} stages`)),h.skippedSteps.length>0&&console.log(o.yellow(` Skipped: ${h.skippedSteps.length} stages`))):h.status==="failed"?(console.log(o.red("Workflow failed")),console.log(o.red(` Error: ${h.error}`)),console.log(o.gray(` Failed stages: ${h.failedSteps.join(", ")}`))):console.log(o.yellow(`Workflow ${h.status}`))}}else console.log(o.green("Workflow execution started")),console.log(o.gray(` Use 'aqe workflow status ${p}' to check progress`));console.log(""),await a(0)}catch(s){console.error(o.red(`
@@ -35,10 +35,10 @@ Workflow cancelled: ${t}
35
35
  `)):console.log(o.red(`
36
36
  Failed to cancel workflow: ${l.error.message}
37
37
  `)),await a(l.success?0:1)}catch(l){console.error(o.red(`
38
- Failed to cancel workflow:`),l),await a(1)}}),y.command("browser-list").description("List available browser workflow templates").action(async()=>{try{let{BrowserWorkflowTool:t}=await import("./browser-workflow-SGOL3FCJ.js"),e=await new t().invoke({});if(e.success&&e.data){console.log(o.blue(`
38
+ Failed to cancel workflow:`),l),await a(1)}}),y.command("browser-list").description("List available browser workflow templates").action(async()=>{try{let{BrowserWorkflowTool:t}=await import("./browser-workflow-DAGIWFJE.js"),e=await new t().invoke({});if(e.success&&e.data){console.log(o.blue(`
39
39
  Browser Workflow Templates:
40
40
  `));for(let u of e.data.availableTemplates)console.log(` ${o.cyan(u)}`);console.log("")}else console.log(o.red(`Failed: ${e.error||"Unknown error"}`));await a(0)}catch(t){console.error(o.red(`
41
- Failed:`),t),await a(1)}}),y.command("browser-load [template]").description("Load and validate a browser workflow template or inline YAML").option("--yaml <yaml>","Inline YAML workflow definition").option("-v, --var <key=value>","Variable override (repeatable)",P,{}).option("-F, --format <format>","Output format (text|json)","text").option("-o, --output <path>","Write output to file").action(async(t,l)=>{try{let{BrowserWorkflowTool:e}=await import("./browser-workflow-SGOL3FCJ.js"),{writeOutput:u,toJSON:c}=await import("./ci-output-ZPDJ42U3.js"),s=new e,f={variables:l.var||{}};if(l.yaml)f.workflowYaml=l.yaml;else if(t)if(t.endsWith(".yaml")||t.endsWith(".yml")){let i=await import("fs"),p=(await import("path")).resolve(t);i.existsSync(p)||(console.log(o.red(`
41
+ Failed:`),t),await a(1)}}),y.command("browser-load [template]").description("Load and validate a browser workflow template or inline YAML").option("--yaml <yaml>","Inline YAML workflow definition").option("-v, --var <key=value>","Variable override (repeatable)",P,{}).option("-F, --format <format>","Output format (text|json)","text").option("-o, --output <path>","Write output to file").action(async(t,l)=>{try{let{BrowserWorkflowTool:e}=await import("./browser-workflow-DAGIWFJE.js"),{writeOutput:u,toJSON:c}=await import("./ci-output-TDKJNSD4.js"),s=new e,f={variables:l.var||{}};if(l.yaml)f.workflowYaml=l.yaml;else if(t)if(t.endsWith(".yaml")||t.endsWith(".yml")){let i=await import("fs"),p=(await import("path")).resolve(t);i.existsSync(p)||(console.log(o.red(`
42
42
  File not found: ${p}
43
43
  `)),await a(1)),f.workflowYaml=i.readFileSync(p,"utf-8")}else f.templateName=t;else console.log(o.red(`
44
44
  Provide a template name or --yaml. Use "workflow browser-list" to see templates.
@@ -0,0 +1,2 @@
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.34");process.exit(0)}
2
+ import{a,b,c,d}from"./chunk-53Y6ZKPN.js";import"./chunk-AHEHD3AP.js";import"./chunk-PYQ7VCH2.js";import"./chunk-DXKZQYBK.js";import"./chunk-VR65KHTH.js";import"./chunk-DXOFPU3A.js";import"./chunk-PMFV3ZFP.js";import"./chunk-4YDLD5TW.js";import"./chunk-I74WDBHS.js";import"./chunk-5H44TVAY.js";import"./chunk-IPEUGCUK.js";import"./chunk-EPETDHDV.js";import"./chunk-JH5HQ2HW.js";import"./chunk-YIVJD5IY.js";import"./chunk-QX74JLGO.js";import"./chunk-REVCXO2R.js";import"./chunk-RYFQYSVF.js";import"./chunk-IUZNVWCR.js";import"./chunk-QPH72S4A.js";import"./chunk-6FNPEC2I.js";export{b as DEFAULT_WORKFLOW_CONFIG,a as WorkflowEvents,c as WorkflowOrchestrator,d as createWorkflowOrchestrator};
@@ -1,2 +1,2 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.32");process.exit(0)}
2
- import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v as L,w as M,x as N}from"./chunk-4H4PEZUX.js";import{a as v,b as w,c as x,d as y,e as z,f as A,g as B,h as C,i as D,j as E,k as F,l as G,m as H,n as I,o as J,p as K}from"./chunk-OKEHGXIS.js";import"./chunk-THYGFSTA.js";import"./chunk-ONNTJXU7.js";import"./chunk-OK2TFTXP.js";import"./chunk-YVQ4PR4H.js";import"./chunk-OMOGD2NN.js";import"./chunk-5WR42V5O.js";import"./chunk-4VAZSCTZ.js";import"./chunk-H7YKTJMY.js";import"./chunk-PIXUX2NR.js";import"./chunk-MQQANXFS.js";import"./chunk-BBPOTFIY.js";import"./chunk-YJV6TTCW.js";import"./chunk-HGWQC7PR.js";import"./chunk-ZESMMAKZ.js";import"./chunk-33PGBYTC.js";import"./chunk-XHQFVTFD.js";export{z as GNNLayerFactory,i as QEFlashAttention,x as QEGNNEmbeddingIndex,y as QEGNNIndexFactory,a as QESONA,e as QE_FLASH_ATTENTION_CONFIG,g as QE_PERFORMANCE_TARGETS,f as QE_SONA_CONFIG,A as TensorCompressionFactory,u as batchComputeAttention,K as batchDifferentiableSearch,M as checkRuvectorPackagesAvailable,c as createDomainQESONA,j as createQEFlashAttention,b as createQESONA,D as getDifferentiableSearch,F as getGetCompressionLevel,E as getHierarchicalForward,G as getInit,h as getOptimalBlockConfig,k as getQEFlashAttentionConfig,n as getRuvectorDotProductAttention,m as getRuvectorFlashAttention,p as getRuvectorHyperbolicAttention,B as getRuvectorLayer,q as getRuvectorLinearAttention,r as getRuvectorMoEAttention,o as getRuvectorMultiHeadAttention,L as getRuvectorPackageVersions,C as getTensorCompress,l as getWorkloadTypes,N as initAllRuvectorPackages,w as initGNN,d as isAttentionAvailable,v as isGNNAvailable,s as toFloat32Array,H as toFloat32ArrayGNN,J as toIEmbedding,t as toNumberArrayAttn,I as toNumberArrayGNN};
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.34");process.exit(0)}
2
+ import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v as L,w as M,x as N}from"./chunk-ULXDULD6.js";import{a as v,b as w,c as x,d as y,e as z,f as A,g as B,h as C,i as D,j as E,k as F,l as G,m as H,n as I,o as J,p as K}from"./chunk-2C6LRXLU.js";import"./chunk-PYQ7VCH2.js";import"./chunk-DXKZQYBK.js";import"./chunk-VR65KHTH.js";import"./chunk-DXOFPU3A.js";import"./chunk-PMFV3ZFP.js";import"./chunk-I74WDBHS.js";import"./chunk-IPEUGCUK.js";import"./chunk-EPETDHDV.js";import"./chunk-JH5HQ2HW.js";import"./chunk-YIVJD5IY.js";import"./chunk-QX74JLGO.js";import"./chunk-REVCXO2R.js";import"./chunk-RYFQYSVF.js";import"./chunk-IUZNVWCR.js";import"./chunk-QPH72S4A.js";import"./chunk-6FNPEC2I.js";export{z as GNNLayerFactory,i as QEFlashAttention,x as QEGNNEmbeddingIndex,y as QEGNNIndexFactory,a as QESONA,e as QE_FLASH_ATTENTION_CONFIG,g as QE_PERFORMANCE_TARGETS,f as QE_SONA_CONFIG,A as TensorCompressionFactory,u as batchComputeAttention,K as batchDifferentiableSearch,M as checkRuvectorPackagesAvailable,c as createDomainQESONA,j as createQEFlashAttention,b as createQESONA,D as getDifferentiableSearch,F as getGetCompressionLevel,E as getHierarchicalForward,G as getInit,h as getOptimalBlockConfig,k as getQEFlashAttentionConfig,n as getRuvectorDotProductAttention,m as getRuvectorFlashAttention,p as getRuvectorHyperbolicAttention,B as getRuvectorLayer,q as getRuvectorLinearAttention,r as getRuvectorMoEAttention,o as getRuvectorMultiHeadAttention,L as getRuvectorPackageVersions,C as getTensorCompress,l as getWorkloadTypes,N as initAllRuvectorPackages,w as initGNN,d as isAttentionAvailable,v as isGNNAvailable,s as toFloat32Array,H as toFloat32ArrayGNN,J as toIEmbedding,t as toNumberArrayAttn,I as toNumberArrayGNN};
@@ -182,29 +182,20 @@ export async function createHybridBackendWithTimeout(dataDir) {
182
182
  enableFallback: true,
183
183
  defaultNamespace: 'qe-patterns',
184
184
  });
185
- // HybridMemoryBackend.initialize() does not accept an AbortSignal yet
186
- // (separate refactor). Use Promise.race for the timeout, but if the
187
- // timeout wins, dispose the backend once init resolves so we don't leak
188
- // SQLite/WAL handles in the background (issue #478 family).
189
- let timedOut = false;
190
- const initPromise = backend.initialize();
191
- const timeoutPromise = new Promise((_, reject) => setTimeout(() => {
192
- timedOut = true;
193
- reject(new Error('Backend init timeout'));
194
- }, timeoutMs));
185
+ // Issue #495: bound HybridMemoryBackend.initialize() with an AbortSignal
186
+ // the previous Promise.race-based timeout could not stop the underlying
187
+ // work, so a stuck unified-memory init kept running for 14+ min while the
188
+ // hook subprocess held patterns.rvf open (20 GB / 12 MB/s leak reported in
189
+ // the field). HybridMemoryBackend.initialize() now checks
190
+ // `signal.throwIfAborted()` between awaited steps, so an aborted signal
191
+ // actually stops the work instead of leaking a promise into the void.
192
+ const controller = new AbortController();
193
+ const timer = setTimeout(() => controller.abort(new Error('Backend init timeout')), timeoutMs);
195
194
  try {
196
- await Promise.race([initPromise, timeoutPromise]);
195
+ await backend.initialize({ signal: controller.signal });
197
196
  }
198
- catch (err) {
199
- if (timedOut) {
200
- // Tear down the backend after the leaked init completes so its
201
- // SQLite connections, WAL handles, and pool entries are released.
202
- // .catch() prevents "unhandled rejection" if dispose itself throws.
203
- void initPromise
204
- .then(() => backend.dispose())
205
- .catch(() => undefined);
206
- }
207
- throw err;
197
+ finally {
198
+ clearTimeout(timer);
208
199
  }
209
200
  return backend;
210
201
  }
@@ -4,6 +4,7 @@
4
4
  * Handles the 'aqe init' command for system initialization.
5
5
  */
6
6
  import chalk from 'chalk';
7
+ import { createRequire } from 'node:module';
7
8
  import { ALL_DOMAINS } from '../../shared/types/index.js';
8
9
  import { toErrorMessage } from '../../shared/error-utils.js';
9
10
  // ============================================================================
@@ -227,6 +228,7 @@ export class InitHandler {
227
228
  console.log(chalk.gray('\n MCP server configured in .mcp.json'));
228
229
  console.log(chalk.gray(' Use --no-mcp to skip MCP setup if using CLI only\n'));
229
230
  }
231
+ printOptionalPeerHints();
230
232
  }
231
233
  else {
232
234
  console.log(chalk.red(' Initialization failed. Check errors above.\n'));
@@ -282,6 +284,7 @@ export class InitHandler {
282
284
  console.log(chalk.gray('\n MCP server configured in .mcp.json'));
283
285
  console.log(chalk.gray(' Use --no-mcp to skip MCP setup if using CLI only\n'));
284
286
  }
287
+ printOptionalPeerHints();
285
288
  }
286
289
  else {
287
290
  console.log(chalk.red(' Initialization failed. Check errors above.\n'));
@@ -419,6 +422,50 @@ Examples:
419
422
  }
420
423
  }
421
424
  // ============================================================================
425
+ // Optional peer-dep hints
426
+ // ============================================================================
427
+ // Declared in package.json's peerDependenciesMeta. NOT auto-installed because
428
+ // they each pull @claude-flow/cli@3.6.x, whose internal peer mismatch creates
429
+ // ~480 packages of transitive noise and ERESOLVE warnings during npm install.
430
+ // Users opt into them only when they want the feature.
431
+ const OPTIONAL_PEERS = [
432
+ {
433
+ pkg: '@claude-flow/browser',
434
+ version: '3.0.0-alpha.1',
435
+ enables: 'browser MCP server — URL safety + PII scanning in browser flows',
436
+ },
437
+ {
438
+ pkg: '@claude-flow/guidance',
439
+ version: '3.0.0-alpha.1',
440
+ enables: 'governance — trust accumulator, continue-gate, proof envelope',
441
+ },
442
+ ];
443
+ function isPeerInstalled(pkg) {
444
+ const require = createRequire(import.meta.url);
445
+ try {
446
+ require.resolve(pkg);
447
+ return true;
448
+ }
449
+ catch (err) {
450
+ // ERR_PACKAGE_PATH_NOT_EXPORTED means the package IS installed but its
451
+ // `exports` field has no CJS condition for the bare specifier — still
452
+ // counts as installed for our purposes.
453
+ const code = err?.code;
454
+ return code === 'ERR_PACKAGE_PATH_NOT_EXPORTED';
455
+ }
456
+ }
457
+ function printOptionalPeerHints() {
458
+ const missing = OPTIONAL_PEERS.filter(({ pkg }) => !isPeerInstalled(pkg));
459
+ if (missing.length === 0)
460
+ return;
461
+ console.log(chalk.bold('\n Optional add-ons (install only if you want the feature):'));
462
+ for (const { pkg, version, enables } of missing) {
463
+ console.log(` ${chalk.gray(pkg)} ${chalk.dim('— ' + enables)}`);
464
+ console.log(chalk.cyan(` npm install -g ${pkg}@${version}`));
465
+ }
466
+ console.log('');
467
+ }
468
+ // ============================================================================
422
469
  // Factory
423
470
  // ============================================================================
424
471
  export function createInitHandler(cleanupAndExit) {
@@ -6,6 +6,7 @@
6
6
  * domain relationships, pattern similarity, checksum
7
7
  */
8
8
  import { ok, ALL_DOMAINS, } from '../../shared/types/index.js';
9
+ import { rehydrateDates } from '../../shared/utils/kv-date-rehydrate.js';
9
10
  /**
10
11
  * Get experiences for a specific domain within a time range
11
12
  */
@@ -15,7 +16,12 @@ export async function getExperiencesForDomain(memory, domain, timeRange) {
15
16
  for (const key of keys) {
16
17
  const experienceId = await memory.get(key);
17
18
  if (experienceId) {
18
- const experience = await memory.get(`learning:experience:${experienceId}`);
19
+ // #493: rehydrate timestamp at the kv-read seam. Without this,
20
+ // `timeRange.contains(experience.timestamp)` silently filters every
21
+ // experience out — `string >= Date` coerces to NaN, all comparisons
22
+ // false. Same root cause the team patched at
23
+ // learning-coordinator.ts:898-904 (#491 Bug 3).
24
+ const experience = rehydrateDates(await memory.get(`learning:experience:${experienceId}`), ['timestamp']);
19
25
  if (experience && timeRange.contains(experience.timestamp)) {
20
26
  experiences.push(experience);
21
27
  }
@@ -5,6 +5,7 @@
5
5
  import { LoggerFactory } from '../../logging/index.js';
6
6
  import { v4 as uuidv4 } from 'uuid';
7
7
  import { toError } from '../../shared/error-utils.js';
8
+ import { rehydrateDates } from '../../shared/utils/kv-date-rehydrate.js';
8
9
  import { ok, err, ALL_DOMAINS, } from '../../shared/types/index.js';
9
10
  import { TimeRange } from '../../shared/value-objects/index.js';
10
11
  import { LearningOptimizationEvents, createEvent, } from '../../shared/events/domain-events.js';
@@ -1191,7 +1192,10 @@ export class LearningOptimizationCoordinator extends BaseDomainCoordinator {
1191
1192
  for (const key of keys) {
1192
1193
  const experienceId = await this.memory.get(key);
1193
1194
  if (experienceId) {
1194
- const experience = await this.memory.get(`learning:experience:${experienceId}`);
1195
+ // #493: rehydrate timestamp at the kv-read seam — without this,
1196
+ // `timeRange.contains` silently filters every experience out
1197
+ // (string vs Date coerces to NaN). Same root cause as #491 Bug 3.
1198
+ const experience = rehydrateDates(await this.memory.get(`learning:experience:${experienceId}`), ['timestamp']);
1195
1199
  if (experience && timeRange.contains(experience.timestamp)) {
1196
1200
  experiences.push(experience);
1197
1201
  }
@@ -5,6 +5,7 @@
5
5
  import { LoggerFactory } from '../../../logging/index.js';
6
6
  import { v4 as uuidv4 } from 'uuid';
7
7
  import { ok, err } from '../../../shared/types/index.js';
8
+ import { rehydrateDates } from '../../../shared/utils/kv-date-rehydrate.js';
8
9
  import { toError } from '../../../shared/error-utils.js';
9
10
  import { createQEFlashAttention, } from '../../../integrations/ruvector/wrappers.js';
10
11
  const DEFAULT_CONFIG = {
@@ -538,7 +539,11 @@ Provide:
538
539
  for (const key of keys) {
539
540
  const experienceId = await this.memory.get(key, LEARNING_NS);
540
541
  if (experienceId) {
541
- const experience = await this.memory.get(`learning:experience:${experienceId}`, LEARNING_NS);
542
+ // #493: rehydrate `timestamp` at the kv-read seam — the sort
543
+ // below throws once the replay buffer has any kv-stored entries.
544
+ // Same hazard the team already noted in mineExperiences at
545
+ // learning-coordinator.ts:898-904 (#491 Bug 3).
546
+ const experience = rehydrateDates(await this.memory.get(`learning:experience:${experienceId}`, LEARNING_NS), ['timestamp']);
542
547
  if (experience) {
543
548
  experiences.push(experience);
544
549
  }
@@ -6,6 +6,7 @@ import { v4 as uuidv4 } from 'uuid';
6
6
  import { ok, err } from '../../../shared/types/index.js';
7
7
  import { toError } from '../../../shared/error-utils.js';
8
8
  import { secureRandom } from '../../../shared/utils/crypto-random.js';
9
+ import { rehydrateDates } from '../../../shared/utils/kv-date-rehydrate.js';
9
10
  const DEFAULT_CONFIG = {
10
11
  defaultConfidenceLevel: 0.95,
11
12
  minSamplesForOptimization: 20,
@@ -252,7 +253,9 @@ export class MetricsOptimizerService {
252
253
  const keys = await this.memory.search(`learning:metrics:history:${strategyId}:*`, limit);
253
254
  const snapshots = [];
254
255
  for (const key of keys) {
255
- const snapshot = await this.memory.get(key);
256
+ // #493: rehydrate `timestamp` at the kv-read seam — without this,
257
+ // the sort below throws once any snapshot exists in the kv.
258
+ const snapshot = rehydrateDates(await this.memory.get(key), ['timestamp']);
256
259
  if (snapshot) {
257
260
  snapshots.push(snapshot);
258
261
  }
@@ -6,6 +6,7 @@ import { v4 as uuidv4 } from 'uuid';
6
6
  import { ok, err } from '../../../shared/types/index.js';
7
7
  import { TimeRange } from '../../../shared/value-objects/index.js';
8
8
  import { toError } from '../../../shared/error-utils.js';
9
+ import { rehydrateDates } from '../../../shared/utils/kv-date-rehydrate.js';
9
10
  const DEFAULT_CONFIG = {
10
11
  metricsRetentionDays: 90,
11
12
  anomalyThreshold: 2.5,
@@ -91,7 +92,11 @@ export class ProductionIntelService {
91
92
  for (const key of keys) {
92
93
  const metricId = await this.memory.get(key);
93
94
  if (metricId) {
94
- const metric = await this.memory.get(`production:metric:${metricId}`);
95
+ // #493: rehydrate Date fields at the kv-read seam. Without this,
96
+ // `metric.timestamp` arrives as an ISO string after JSON.parse —
97
+ // `timeRange.contains` silently drops every metric (string vs Date
98
+ // coercion yields NaN) and `.getTime()` below throws.
99
+ const metric = rehydrateDates(await this.memory.get(`production:metric:${metricId}`), ['timestamp']);
95
100
  if (metric && timeRange.contains(metric.timestamp)) {
96
101
  metrics.push(metric);
97
102
  }
@@ -138,7 +143,9 @@ export class ProductionIntelService {
138
143
  */
139
144
  async resolveIncident(incidentId, rootCause, resolution) {
140
145
  try {
141
- const incident = await this.memory.get(`production:incident:${incidentId}`);
146
+ // #493: rehydrate before spreading — `incident.startedAt` is consumed
147
+ // downstream by updateExperienceWithResolution → .getTime() math.
148
+ const incident = rehydrateDates(await this.memory.get(`production:incident:${incidentId}`), ['startedAt', 'resolvedAt']);
142
149
  if (!incident) {
143
150
  return err(new Error(`Incident ${incidentId} not found`));
144
151
  }
@@ -171,14 +178,15 @@ export class ProductionIntelService {
171
178
  if (key.includes(':index:')) {
172
179
  const incidentId = await this.memory.get(key);
173
180
  if (incidentId) {
174
- const incident = await this.memory.get(`production:incident:${incidentId}`);
181
+ // #493: rehydrate startedAt/resolvedAt at the kv-read seam.
182
+ const incident = rehydrateDates(await this.memory.get(`production:incident:${incidentId}`), ['startedAt', 'resolvedAt']);
175
183
  if (incident) {
176
184
  incidents.push(incident);
177
185
  }
178
186
  }
179
187
  }
180
188
  else {
181
- const incident = await this.memory.get(key);
189
+ const incident = rehydrateDates(await this.memory.get(key), ['startedAt', 'resolvedAt']);
182
190
  if (incident) {
183
191
  incidents.push(incident);
184
192
  }
@@ -426,7 +434,8 @@ export class ProductionIntelService {
426
434
  const keys = await this.memory.search('production:milestone:*', limit);
427
435
  const milestones = [];
428
436
  for (const key of keys) {
429
- const milestone = await this.memory.get(key);
437
+ // #493: rehydrate achievedAt at the kv-read seam.
438
+ const milestone = rehydrateDates(await this.memory.get(key), ['achievedAt']);
430
439
  if (milestone) {
431
440
  milestones.push(milestone);
432
441
  }
@@ -5,6 +5,7 @@
5
5
  import { v4 as uuidv4 } from 'uuid';
6
6
  import { ok, err, ALL_DOMAINS } from '../../../shared/types/index.js';
7
7
  import { toError } from '../../../shared/error-utils.js';
8
+ import { rehydrateDates } from '../../../shared/utils/kv-date-rehydrate.js';
8
9
  const DEFAULT_CONFIG = {
9
10
  maxKnowledgeItems: 1000,
10
11
  relevanceThreshold: 0.5,
@@ -64,7 +65,11 @@ export class TransferSpecialistService {
64
65
  keys = await this.memory.search('learning:knowledge:shared:*', query.limit || 100);
65
66
  }
66
67
  for (const key of keys) {
67
- const knowledge = await this.memory.get(key);
68
+ // #493: rehydrate Date fields at the kv-read seam. `createdAt` is
69
+ // consumed by validateRelevance().getTime() and `expiresAt` is
70
+ // compared via `new Date() > knowledge.expiresAt` — both broken
71
+ // when the field is a string after JSON round-trip.
72
+ const knowledge = rehydrateDates(await this.memory.get(key), ['createdAt', 'expiresAt']);
68
73
  if (knowledge && this.matchesQuery(knowledge, query)) {
69
74
  results.push(knowledge);
70
75
  }
@@ -75,7 +80,8 @@ export class TransferSpecialistService {
75
80
  if (query.embedding && query.embedding.length > 0) {
76
81
  const vectorResults = await this.memory.vectorSearch(query.embedding, query.limit || 10);
77
82
  for (const vr of vectorResults) {
78
- const knowledge = await this.memory.get(vr.key);
83
+ // #493: rehydrate Date fields at the kv-read seam.
84
+ const knowledge = rehydrateDates(await this.memory.get(vr.key), ['createdAt', 'expiresAt']);
79
85
  if (knowledge &&
80
86
  !results.some((r) => r.id === knowledge.id) &&
81
87
  this.matchesQuery(knowledge, query)) {
@@ -246,7 +252,8 @@ export class TransferSpecialistService {
246
252
  * Get knowledge by ID
247
253
  */
248
254
  async getKnowledgeById(id) {
249
- const knowledge = await this.memory.get(`learning:knowledge:shared:${id}`);
255
+ // #493: rehydrate Date fields at the kv-read seam.
256
+ const knowledge = rehydrateDates(await this.memory.get(`learning:knowledge:shared:${id}`), ['createdAt', 'expiresAt']);
250
257
  return knowledge || null;
251
258
  }
252
259
  /**
@@ -257,7 +264,8 @@ export class TransferSpecialistService {
257
264
  const keys = await this.memory.search(`learning:knowledge:project:${sourceProject}:*`, 500);
258
265
  const results = [];
259
266
  for (const key of keys) {
260
- const knowledge = await this.memory.get(key);
267
+ // #493: rehydrate Date fields at the kv-read seam.
268
+ const knowledge = rehydrateDates(await this.memory.get(key), ['createdAt', 'expiresAt']);
261
269
  if (!knowledge)
262
270
  continue;
263
271
  // Apply filter
@@ -13,7 +13,7 @@
13
13
  import type { IEmbedding, IEmbeddingModelConfig, IEmbeddingOptions, IBatchEmbeddingResult, ISimilarityResult, ISearchOptions, IEmbeddingStats, EmbeddingDimension, EmbeddingNamespace, QuantizationType } from './types.js';
14
14
  export type { IEmbedding, IEmbeddingModelConfig, IEmbeddingOptions, IBatchEmbeddingResult, ISimilarityResult, ISearchOptions, IEmbeddingStats, EmbeddingDimension, EmbeddingNamespace, QuantizationType, };
15
15
  import { EmbeddingCache } from '../cache/EmbeddingCache.js';
16
- import type { Tensor } from '@xenova/transformers';
16
+ import type { Tensor } from '@huggingface/transformers';
17
17
  /**
18
18
  * Feature extraction pipeline interface
19
19
  *
@@ -11,7 +11,7 @@
11
11
  * @module integrations/embeddings/base/EmbeddingGenerator
12
12
  */
13
13
  import { EmbeddingCache } from '../cache/EmbeddingCache.js';
14
- import { pipeline } from '@xenova/transformers';
14
+ import { pipeline } from '@huggingface/transformers';
15
15
  import { cosineSimilarity } from '../../../shared/utils/vector-math.js';
16
16
  /**
17
17
  * Base embedding generator class
@@ -54,11 +54,20 @@ export class EmbeddingGenerator {
54
54
  const startTime = performance.now();
55
55
  // Use ONNX runtime if enabled
56
56
  if (this.config.onnxEnabled) {
57
+ // v4 replaced `quantized: bool` with `dtype: DataType`. We map our
58
+ // QuantizationType to the closest model-load dtype; the 'binary' bucket
59
+ // is a post-process step, not a model weight format, so we fall back to
60
+ // q8 for load and keep the binary quantization step downstream.
61
+ const loadDtype = this.config.quantization === 'none' ? 'fp32' :
62
+ this.config.quantization === 'fp16' ? 'fp16' :
63
+ this.config.quantization === 'int8' ? 'int8' : 'q8';
57
64
  this.model = await pipeline('feature-extraction', this.config.model, {
58
- quantized: this.config.quantization !== 'none',
59
- progress_callback: (progress) => {
60
- if (progress.status === 'downloading') {
61
- console.log(`Downloading model: ${(progress.progress * 100).toFixed(0)}%`);
65
+ dtype: loadDtype,
66
+ // v4 narrowed ProgressInfo to a discriminated union — `progress`
67
+ // only exists on the "progress"/download variants.
68
+ progress_callback: (info) => {
69
+ if (info.status === 'progress' && typeof info.progress === 'number') {
70
+ console.log(`Downloading model: ${(info.progress * 100).toFixed(0)}%`);
62
71
  }
63
72
  },
64
73
  });
@@ -27,6 +27,15 @@ export interface RvfStore {
27
27
  delete(ids: string[]): void;
28
28
  status(): RvfStatus;
29
29
  close(): void;
30
+ /**
31
+ * Optional: reclaim dead space. Returns reclaim stats or null when the
32
+ * underlying store does not support compaction (e.g. mock stores in tests).
33
+ */
34
+ compact?(): {
35
+ segmentsCompacted: number;
36
+ bytesReclaimed: number;
37
+ epoch: number;
38
+ } | null;
30
39
  }
31
40
  export interface RvfStatus {
32
41
  totalVectors: number;
@@ -120,6 +129,19 @@ export declare class RvfDualWriter {
120
129
  * Close the RVF store. SQLite is managed externally.
121
130
  */
122
131
  close(): void;
132
+ /**
133
+ * Reclaim dead space in the underlying brain.rvf container. Best-effort —
134
+ * returns reclaim stats if compaction ran, null if it was skipped or the
135
+ * store does not implement compact(). Same rationale as patterns.rvf
136
+ * compaction: brain.rvf receives one write per pattern via writePattern()
137
+ * and is otherwise append-only, so without periodic compaction it grows
138
+ * monotonically.
139
+ */
140
+ compact(): {
141
+ segmentsCompacted: number;
142
+ bytesReclaimed: number;
143
+ epoch: number;
144
+ } | null;
123
145
  private shouldWriteRvf;
124
146
  private writeSqliteEmbedding;
125
147
  private deleteSqliteEmbedding;
@@ -39,6 +39,9 @@ function wrapNativeAdapter(adapter, dim) {
39
39
  close() {
40
40
  adapter.close();
41
41
  },
42
+ compact() {
43
+ return adapter.compact();
44
+ },
42
45
  };
43
46
  }
44
47
  function tableExists(db, name) {
@@ -280,6 +283,24 @@ export class RvfDualWriter {
280
283
  this.rvfAvailable = false;
281
284
  }
282
285
  }
286
+ /**
287
+ * Reclaim dead space in the underlying brain.rvf container. Best-effort —
288
+ * returns reclaim stats if compaction ran, null if it was skipped or the
289
+ * store does not implement compact(). Same rationale as patterns.rvf
290
+ * compaction: brain.rvf receives one write per pattern via writePattern()
291
+ * and is otherwise append-only, so without periodic compaction it grows
292
+ * monotonically.
293
+ */
294
+ compact() {
295
+ if (!this.rvfStore || !this.rvfAvailable || !this.rvfStore.compact)
296
+ return null;
297
+ try {
298
+ return this.rvfStore.compact() ?? null;
299
+ }
300
+ catch {
301
+ return null;
302
+ }
303
+ }
283
304
  // --------------------------------------------------------------------------
284
305
  // Private helpers
285
306
  // --------------------------------------------------------------------------
@@ -43,6 +43,18 @@ export interface RvfStatus {
43
43
  epoch: number;
44
44
  witnessValid: boolean;
45
45
  witnessEntries: number;
46
+ /**
47
+ * Fraction of file bytes occupied by tombstoned/superseded segments (0-1).
48
+ * Optional so existing partial mocks in tests still compile; runtime
49
+ * adapters always populate this (the wrapper defaults to 0 if the native
50
+ * binding does not surface it).
51
+ */
52
+ deadSpaceRatio?: number;
53
+ }
54
+ export interface RvfCompactionResult {
55
+ segmentsCompacted: number;
56
+ bytesReclaimed: number;
57
+ epoch: number;
46
58
  }
47
59
  export interface RvfNativeAdapter {
48
60
  ingest(entries: RvfIngestEntry[]): {
@@ -55,7 +67,12 @@ export interface RvfNativeAdapter {
55
67
  status(): RvfStatus;
56
68
  dimension(): number;
57
69
  size(): number;
58
- compact(): void;
70
+ /**
71
+ * Reclaim dead space by merging segments and dropping tombstones.
72
+ * Returns reclaim stats. Logs and returns `null` if the native call throws
73
+ * (best-effort — never let compaction failures propagate to callers).
74
+ */
75
+ compact(): RvfCompactionResult | null;
59
76
  close(): void;
60
77
  isOpen(): boolean;
61
78
  path(): string;
@@ -190,6 +190,7 @@ class RvfNativeAdapterImpl {
190
190
  epoch: s.currentEpoch,
191
191
  witnessValid: witnessSegs.length > 0,
192
192
  witnessEntries: witnessSegs.length,
193
+ deadSpaceRatio: typeof s.deadSpaceRatio === 'number' ? s.deadSpaceRatio : 0,
193
194
  };
194
195
  }
195
196
  // -- accessors ------------------------------------------------------------
@@ -202,7 +203,20 @@ class RvfNativeAdapterImpl {
202
203
  }
203
204
  compact() {
204
205
  this.ensureOpen();
205
- this.db.compact();
206
+ try {
207
+ const r = this.db.compact();
208
+ if (r && typeof r === 'object') {
209
+ return {
210
+ segmentsCompacted: typeof r.segmentsCompacted === 'number' ? r.segmentsCompacted : 0,
211
+ bytesReclaimed: typeof r.bytesReclaimed === 'number' ? r.bytesReclaimed : 0,
212
+ epoch: typeof r.epoch === 'number' ? r.epoch : 0,
213
+ };
214
+ }
215
+ return { segmentsCompacted: 0, bytesReclaimed: 0, epoch: 0 };
216
+ }
217
+ catch {
218
+ return null;
219
+ }
206
220
  }
207
221
  close() {
208
222
  if (this._open) {
@@ -10,7 +10,9 @@
10
10
  *
11
11
  * @module integrations/ruvector/shared-rvf-adapter
12
12
  */
13
- import type { RvfNativeAdapter } from './rvf-native-adapter.js';
13
+ import type { RvfNativeAdapter, RvfCompactionResult, RvfStatus } from './rvf-native-adapter.js';
14
+ /** @internal test-only seam */
15
+ export declare function __setSharedRvfAdapterForTests(adapter: RvfNativeAdapter | null): void;
14
16
  /**
15
17
  * Get or create the shared RvfNativeAdapter singleton for patterns.rvf.
16
18
  *
@@ -19,6 +21,49 @@ import type { RvfNativeAdapter } from './rvf-native-adapter.js';
19
21
  * @returns The shared adapter, or null if native bindings are unavailable
20
22
  */
21
23
  export declare function getSharedRvfAdapter(dataDir?: string, dimensions?: number): RvfNativeAdapter | null;
24
+ export interface CompactDecision {
25
+ shouldCompact: boolean;
26
+ trigger: 'force' | 'size-guard' | 'dead-ratio' | 'none';
27
+ }
28
+ /**
29
+ * Pure decision function: given an adapter status, decide whether compaction
30
+ * should run and which threshold triggered it. Exported so tests can verify
31
+ * the decision logic without exercising the singleton or native binding.
32
+ */
33
+ export declare function decideCompactionFromStatus(status: RvfStatus, opts?: {
34
+ deadRatioThreshold?: number;
35
+ sizeGuardBytes?: number;
36
+ force?: boolean;
37
+ }): CompactDecision;
38
+ /**
39
+ * Run `compact()` against the shared patterns.rvf adapter when dead-space or
40
+ * file-size thresholds are exceeded. Best-effort — returns the reclaim stats
41
+ * if compaction ran, or `null` if it was skipped or failed.
42
+ *
43
+ * Safe to call from steady-state code (e.g. after a dream cycle). The native
44
+ * binding's compact() is documented as exclusive against writers, so callers
45
+ * should run this in idle windows when possible.
46
+ *
47
+ * Thresholds can be overridden via:
48
+ * AQE_RVF_SIZE_GUARD_BYTES (default 256 MB)
49
+ * AQE_RVF_DEAD_RATIO_THRESHOLD (default 0.30)
50
+ */
51
+ export declare function compactSharedRvfAdapter(opts?: {
52
+ /** Override the dead-space ratio above which compaction runs. */
53
+ deadRatioThreshold?: number;
54
+ /** Override the file size above which compaction runs unconditionally. */
55
+ sizeGuardBytes?: number;
56
+ /** When true, run compact() regardless of thresholds. */
57
+ force?: boolean;
58
+ }): RvfCompactionResult | null;
59
+ /**
60
+ * One-shot at boot. Runs a best-effort `compact()` against the freshly-opened
61
+ * adapter when fileSize or deadSpaceRatio exceed configured thresholds. Lives
62
+ * here (not at module load) so a never-opened adapter doesn't trigger native
63
+ * binding init. Exported for tests; production callers go via
64
+ * `getSharedRvfAdapter()` which invokes it internally.
65
+ */
66
+ export declare function runBootCompactGuard(adapter: RvfNativeAdapter, rvfPath: string): RvfCompactionResult | null;
22
67
  /** Close the shared adapter and reset the singleton. */
23
68
  export declare function resetSharedRvfAdapter(): void;
24
69
  //# sourceMappingURL=shared-rvf-adapter.d.ts.map