agentic-qe 3.9.0 → 3.9.1

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 (411) hide show
  1. package/.claude/skills/skills-manifest.json +1 -1
  2. package/CHANGELOG.md +32 -0
  3. package/dist/audit/witness-chain.d.ts +1 -1
  4. package/dist/cli/bundle.js +5 -5
  5. package/dist/cli/chunks/adapter-NTM4ZH3P.js +2 -0
  6. package/dist/cli/chunks/{agent-booster-wasm-PQYB7VRU.js → agent-booster-wasm-UH2J6BNA.js} +2 -2
  7. package/dist/cli/chunks/{agent-handler-QDAB5NQS.js → agent-handler-ZCBWQE3X.js} +2 -2
  8. package/dist/cli/chunks/agent-memory-branch-2BAVI7UW.js +2 -0
  9. package/dist/cli/chunks/aqe-learning-engine-RVX6MPYK.js +2 -0
  10. package/dist/cli/chunks/{audit-S7JUYYVP.js → audit-G5UIJBSQ.js} +2 -2
  11. package/dist/cli/chunks/base-7HKNQ6UP.js +2 -0
  12. package/dist/cli/chunks/better-sqlite3-YHIAPPVT.js +2 -0
  13. package/dist/cli/chunks/brain-handler-5EE3J5PR.js +68 -0
  14. package/dist/cli/chunks/{branch-enumerator-XK4V5W7L.js → branch-enumerator-OV54PID5.js} +2 -2
  15. package/dist/cli/chunks/{browser-PALA5PL3.js → browser-7RZGKOEO.js} +2 -2
  16. package/dist/cli/chunks/browser-workflow-UOFSQK7X.js +2 -0
  17. package/dist/cli/chunks/{chunk-JJO7Y4H3.js → chunk-24E47G3D.js} +3 -3
  18. package/dist/cli/chunks/{chunk-UFUVUO3J.js → chunk-35H73OPP.js} +2 -2
  19. package/dist/cli/chunks/{chunk-7R6YMLVS.js → chunk-36X2O3BL.js} +2 -2
  20. package/dist/cli/chunks/{chunk-OI5NGQO2.js → chunk-3JESHZQM.js} +2 -2
  21. package/dist/cli/chunks/{chunk-72WOAVK6.js → chunk-3VAKR43Z.js} +1 -1
  22. package/dist/cli/chunks/chunk-3WQNW6CH.js +2 -0
  23. package/dist/cli/chunks/{chunk-24FKIJNC.js → chunk-43M6Y6VF.js} +2 -2
  24. package/dist/cli/chunks/{chunk-ZDATDCYN.js → chunk-4BHOAQJH.js} +1 -1
  25. package/dist/cli/chunks/{chunk-XIBDETCS.js → chunk-4LWXZCSD.js} +2 -2
  26. package/dist/cli/chunks/{chunk-3IUNFTIF.js → chunk-4TNXEANY.js} +1 -1
  27. package/dist/cli/chunks/{chunk-RTGGL7D7.js → chunk-4XBY5JDT.js} +2 -2
  28. package/dist/cli/chunks/chunk-4XREPCBZ.js +2 -0
  29. package/dist/cli/chunks/{chunk-TLHP5EII.js → chunk-5GPTM2RV.js} +1 -1
  30. package/dist/cli/chunks/{chunk-FGA7VIFR.js → chunk-5KBQQP3X.js} +3 -3
  31. package/dist/cli/chunks/{chunk-3ZOONQG6.js → chunk-5LDBKZ6P.js} +1 -1
  32. package/dist/cli/chunks/{chunk-LNQIY6BP.js → chunk-6BSJNG2S.js} +2 -2
  33. package/dist/cli/chunks/{chunk-EHDQJQ6Y.js → chunk-6YC24TPL.js} +5 -5
  34. package/dist/cli/chunks/{chunk-YVA65UZL.js → chunk-7ATLJCSG.js} +1 -1
  35. package/dist/cli/chunks/{chunk-U5RN7YQW.js → chunk-7JQTHPCD.js} +2 -2
  36. package/dist/cli/chunks/{chunk-ESVQ6MEB.js → chunk-7YUOUVN7.js} +2 -2
  37. package/dist/cli/chunks/{chunk-YAGODYIG.js → chunk-7ZNINH6J.js} +3 -3
  38. package/dist/cli/chunks/{chunk-4VUPRTVX.js → chunk-A57BEPL7.js} +2 -2
  39. package/dist/cli/chunks/{chunk-N2NS2PHA.js → chunk-AFPMCMVX.js} +2 -2
  40. package/dist/cli/chunks/{chunk-RU5WAHB7.js → chunk-AREIP4FX.js} +2 -2
  41. package/dist/cli/chunks/{chunk-XO6PVK2P.js → chunk-B2I7BJLL.js} +2 -2
  42. package/dist/cli/chunks/{chunk-HY6PMO5W.js → chunk-BEHP3DEF.js} +2 -2
  43. package/dist/cli/chunks/{chunk-YPFOCNOE.js → chunk-C24ZDUCM.js} +1 -1
  44. package/dist/cli/chunks/{chunk-CL6POIX4.js → chunk-D4PSFWND.js} +1 -1
  45. package/dist/cli/chunks/{chunk-YR6ZZGH7.js → chunk-D55PSO5D.js} +1 -1
  46. package/dist/cli/chunks/{chunk-4YS3IJ45.js → chunk-DC3HPOOJ.js} +1 -1
  47. package/dist/cli/chunks/chunk-DMGLX76J.js +180 -0
  48. package/dist/cli/chunks/{chunk-NZ2VCPN4.js → chunk-E33KQBMW.js} +2 -2
  49. package/dist/cli/chunks/{chunk-YANUP2RO.js → chunk-EQFZQPFN.js} +1 -1
  50. package/dist/cli/chunks/{chunk-TWUWL5EJ.js → chunk-FPRL6UDF.js} +2 -2
  51. package/dist/cli/chunks/{chunk-GRUUQAR6.js → chunk-FRNB4CH2.js} +2 -2
  52. package/dist/cli/chunks/{chunk-WBQSXPBI.js → chunk-FWDKVTK4.js} +2 -2
  53. package/dist/cli/chunks/chunk-GFNUESMU.js +2 -0
  54. package/dist/cli/chunks/{chunk-JBANAPWG.js → chunk-GJW6V35N.js} +1 -1
  55. package/dist/cli/chunks/{chunk-BULKFVYX.js → chunk-GLIFZWV2.js} +1 -1
  56. package/dist/cli/chunks/{chunk-WJ3DLOXF.js → chunk-GNUUBTSX.js} +2 -2
  57. package/dist/cli/chunks/{chunk-MZOFWJTM.js → chunk-HAUXLXKZ.js} +2 -2
  58. package/dist/cli/chunks/{chunk-X3KI6JOY.js → chunk-HTXSUTWL.js} +2 -2
  59. package/dist/cli/chunks/chunk-I5WZ2NM2.js +95 -0
  60. package/dist/cli/chunks/{chunk-BLBRY5UD.js → chunk-I7TA453K.js} +2 -2
  61. package/dist/cli/chunks/{chunk-5T2ZQWKF.js → chunk-IF6GW6IY.js} +2 -2
  62. package/dist/cli/chunks/{chunk-GKNNSCLC.js → chunk-IHWSNYL2.js} +2 -2
  63. package/dist/cli/chunks/chunk-IJKYJGJL.js +2 -0
  64. package/dist/cli/chunks/{chunk-3ADGXLTM.js → chunk-IQPXANCE.js} +1 -1
  65. package/dist/cli/chunks/{chunk-VOS4NQSF.js → chunk-JCEY7RLP.js} +2 -2
  66. package/dist/cli/chunks/{chunk-WGMPEW2T.js → chunk-JSOBRKMA.js} +2 -2
  67. package/dist/cli/chunks/{chunk-GPQ57KA4.js → chunk-KIGRLIU4.js} +2 -2
  68. package/dist/cli/chunks/{chunk-IFNIIK34.js → chunk-L4H54Z27.js} +3 -3
  69. package/dist/cli/chunks/{chunk-CS2KS7LP.js → chunk-LCOEBFAB.js} +1 -1
  70. package/dist/cli/chunks/chunk-MZ54VM6A.js +2 -0
  71. package/dist/cli/chunks/{chunk-IAV2JMIX.js → chunk-NB47YT6A.js} +2 -2
  72. package/dist/cli/chunks/{chunk-B36CDR4U.js → chunk-NG3BKE7V.js} +2 -2
  73. package/dist/cli/chunks/{chunk-WIEC7VKK.js → chunk-NG4TE3OW.js} +2 -2
  74. package/dist/cli/chunks/{chunk-Y7BHKZFJ.js → chunk-O636JKJR.js} +2 -2
  75. package/dist/cli/chunks/{chunk-BTREG4IW.js → chunk-O6QQ4HLS.js} +2 -2
  76. package/dist/cli/chunks/{chunk-MDUHYUHF.js → chunk-OFNIQCGX.js} +2 -2
  77. package/dist/cli/chunks/{chunk-JXM26HEE.js → chunk-OTSJU5LH.js} +2 -2
  78. package/dist/cli/chunks/{chunk-AFLLQ5PP.js → chunk-POLFT2PQ.js} +2 -2
  79. package/dist/cli/chunks/{chunk-XLRQYLWW.js → chunk-QAYTL6KC.js} +1 -1
  80. package/dist/cli/chunks/{chunk-AKE543X2.js → chunk-QMFP5OKH.js} +2 -2
  81. package/dist/cli/chunks/{chunk-OLHKGP35.js → chunk-RAJO7VML.js} +2 -2
  82. package/dist/cli/chunks/{chunk-5SKGFSKD.js → chunk-RKIGOARX.js} +2 -2
  83. package/dist/cli/chunks/{chunk-IGJPMN4I.js → chunk-RU6Q5HOC.js} +1 -1
  84. package/dist/cli/chunks/chunk-RV6SGDET.js +2 -0
  85. package/dist/cli/chunks/chunk-RWXI7XAR.js +2 -0
  86. package/dist/cli/chunks/{chunk-3NZLZHJI.js → chunk-RXVYOXDB.js} +1 -1
  87. package/dist/cli/chunks/{chunk-7VDBAVTY.js → chunk-SGRN6JFB.js} +2 -2
  88. package/dist/cli/chunks/{chunk-BPWXXEH2.js → chunk-SVNX4UWR.js} +128 -128
  89. package/dist/cli/chunks/{chunk-B6LLWYQ6.js → chunk-TL7ABIMP.js} +2 -2
  90. package/dist/cli/chunks/{chunk-6EOS7KX2.js → chunk-TOLYWONQ.js} +2 -2
  91. package/dist/cli/chunks/{chunk-XRE2HCWG.js → chunk-TPXYS3WG.js} +1 -1
  92. package/dist/cli/chunks/chunk-U5JQGRHZ.js +2 -0
  93. package/dist/cli/chunks/{chunk-SUSEVMZT.js → chunk-UB7RGVKO.js} +1 -1
  94. package/dist/cli/chunks/{chunk-4YOMLWEK.js → chunk-UBKK7KCR.js} +1 -1
  95. package/dist/cli/chunks/chunk-UMGWGX7C.js +2 -0
  96. package/dist/cli/chunks/chunk-UN4PA4M2.js +2 -0
  97. package/dist/cli/chunks/{chunk-N4TL73TH.js → chunk-US7INRP2.js} +8 -8
  98. package/dist/cli/chunks/{chunk-LHJQD2VU.js → chunk-UWDBFPHQ.js} +68 -68
  99. package/dist/cli/chunks/{chunk-4I2IOUS4.js → chunk-UZZCWWIG.js} +1 -1
  100. package/dist/cli/chunks/{chunk-BXAXGEFC.js → chunk-V4HM4QAO.js} +5 -5
  101. package/dist/cli/chunks/{chunk-2E5NQNSU.js → chunk-V4U3CTS2.js} +11 -11
  102. package/dist/cli/chunks/{chunk-XT2V2322.js → chunk-VCCMCFDU.js} +2 -2
  103. package/dist/cli/chunks/{chunk-2BZFNEN2.js → chunk-VEWIT6VN.js} +1 -1
  104. package/dist/cli/chunks/{chunk-4VBTXZRM.js → chunk-VNYGVG4Y.js} +2 -2
  105. package/dist/cli/chunks/{chunk-BGXNSCXX.js → chunk-VO3OVD5D.js} +1 -1
  106. package/dist/cli/chunks/{chunk-6SVX4DJC.js → chunk-VY74OMGQ.js} +3 -3
  107. package/dist/cli/chunks/{chunk-HRO6OZQD.js → chunk-WDJBGXC2.js} +1 -1
  108. package/dist/cli/chunks/chunk-WDV6TN7E.js +65 -0
  109. package/dist/cli/chunks/{chunk-YW2THB5Q.js → chunk-WLXEDOG4.js} +2 -2
  110. package/dist/cli/chunks/chunk-WXXAAXNS.js +12 -0
  111. package/dist/cli/chunks/{chunk-VSVXUTJN.js → chunk-X4MZYBOU.js} +2 -2
  112. package/dist/cli/chunks/{chunk-3IHG3WOY.js → chunk-XE2YAYU5.js} +3 -3
  113. package/dist/cli/chunks/chunk-XP6XKBNW.js +2 -0
  114. package/dist/cli/chunks/{chunk-JRYGQO2W.js → chunk-XPB6ZVQY.js} +1 -1
  115. package/dist/cli/chunks/chunk-XRVUSKQV.js +1 -0
  116. package/dist/cli/chunks/{chunk-ZAPS3UGQ.js → chunk-XSITQBYB.js} +3 -3
  117. package/dist/cli/chunks/{chunk-BDIEMZ22.js → chunk-XTLA4F5Z.js} +2 -2
  118. package/dist/cli/chunks/{chunk-FEKY7T6Q.js → chunk-XU6L2VJY.js} +2 -2
  119. package/dist/cli/chunks/chunk-XUFHYPZK.js +2 -0
  120. package/dist/cli/chunks/{chunk-UQHYFOBX.js → chunk-Y2ZEDXTV.js} +2 -2
  121. package/dist/cli/chunks/{chunk-CWFB6BSA.js → chunk-YQWB4QUP.js} +4 -4
  122. package/dist/cli/chunks/chunk-YUQIXT3G.js +79 -0
  123. package/dist/cli/chunks/chunk-YYYB2JN5.js +2 -0
  124. package/dist/cli/chunks/{chunk-GAOJV3OX.js → chunk-ZEUVPLGX.js} +2 -2
  125. package/dist/cli/chunks/{chunk-KP5NUODU.js → chunk-ZSRQHJEW.js} +1 -1
  126. package/dist/cli/chunks/{ci-J374KDLI.js → ci-N4NTYAAI.js} +2 -2
  127. package/dist/cli/chunks/ci-output-XYR2PSYH.js +2 -0
  128. package/dist/cli/chunks/{claude-flow-setup-245JLJCN.js → claude-flow-setup-FX7PRBJV.js} +2 -2
  129. package/dist/cli/chunks/client-CRRENRK4.js +2 -0
  130. package/dist/cli/chunks/{cline-installer-LBA2M5N3.js → cline-installer-GTHQOK7U.js} +2 -2
  131. package/dist/cli/chunks/{code-U4N4WONM.js → code-4G6ZHVNI.js} +2 -2
  132. package/dist/cli/chunks/{code-index-extractor-A57Z6BO4.js → code-index-extractor-MKJTP5AK.js} +2 -2
  133. package/dist/cli/chunks/{codex-installer-UXMK2N4T.js → codex-installer-UGS773DT.js} +2 -2
  134. package/dist/cli/chunks/{completions-W66BSCOE.js → completions-B3BXNXAU.js} +2 -2
  135. package/dist/cli/chunks/complexity-analyzer-PMN77CUP.js +2 -0
  136. package/dist/cli/chunks/{continuedev-installer-LRFZ2SJM.js → continuedev-installer-3DYKSIP3.js} +2 -2
  137. package/dist/cli/chunks/{copilot-installer-CQ3JYBIB.js → copilot-installer-IUC5HDHD.js} +2 -2
  138. package/dist/cli/chunks/cost-tracker-GSGQ7O5T.js +2 -0
  139. package/dist/cli/chunks/{coverage-4PUEQXAY.js → coverage-PO72QC3P.js} +3 -3
  140. package/dist/cli/chunks/cross-domain-router-FSCGJG3B.js +2 -0
  141. package/dist/cli/chunks/{cursor-installer-JZEDEDHA.js → cursor-installer-FK53S3ZL.js} +2 -2
  142. package/dist/cli/chunks/{daemon-B7TWGHXQ.js → daemon-4UIQTQ73.js} +3 -3
  143. package/dist/cli/chunks/dag-attention-scheduler-ZGIMLECE.js +2 -0
  144. package/dist/cli/chunks/detect-XXHLTLL7.js +2 -0
  145. package/dist/cli/chunks/{domain-handler-FT5FLZWL.js → domain-handler-PPGFP7P4.js} +2 -2
  146. package/dist/cli/chunks/domain-transfer-Q5UAE65W.js +2 -0
  147. package/dist/cli/chunks/dream-PONKQULG.js +2 -0
  148. package/dist/cli/chunks/esm-node-XLWDJRBX.js +2 -0
  149. package/dist/cli/chunks/{eval-GHMPFGWV.js → eval-JVJKHSTQ.js} +2 -2
  150. package/dist/cli/chunks/{fast-paths-B3R647KN.js → fast-paths-3KX4ZV66.js} +2 -2
  151. package/dist/cli/chunks/feature-flags-2NOVE7DL.js +2 -0
  152. package/dist/cli/chunks/{feature-flags-DWS7ARSX.js → feature-flags-GKHHG2I2.js} +2 -2
  153. package/dist/cli/chunks/file-discovery-XFSGQNM3.js +2 -0
  154. package/dist/cli/chunks/{fleet-EKOKMOMW.js → fleet-FOIDAXLR.js} +3 -3
  155. package/dist/cli/chunks/gnn-wrapper-HPCQREKP.js +2 -0
  156. package/dist/cli/chunks/{heartbeat-handler-MBBS4IBU.js → heartbeat-handler-HTR3EFFV.js} +4 -4
  157. package/dist/cli/chunks/{heartbeat-scheduler-XDGMOT7X.js → heartbeat-scheduler-NZQWN7CH.js} +2 -2
  158. package/dist/cli/chunks/hnsw-adapter-BNA5WUAB.js +2 -0
  159. package/dist/cli/chunks/hnsw-index-RQIIAE7S.js +2 -0
  160. package/dist/cli/chunks/hnsw-legacy-bridge-H6OA3AA3.js +2 -0
  161. package/dist/cli/chunks/hnswlib-node-FF27BDMD.js +2 -0
  162. package/dist/cli/chunks/{hooks-L5VLZGEK.js → hooks-63NZQ7NH.js} +6 -6
  163. package/dist/cli/chunks/hypergraph-engine-XMSLA4XH.js +2 -0
  164. package/dist/cli/chunks/{hypergraph-handler-3HDGB5SZ.js → hypergraph-handler-ID6J6GS2.js} +3 -3
  165. package/dist/cli/chunks/impact-analyzer-FS2UNVP4.js +2 -0
  166. package/dist/cli/chunks/{init-handler-JDET6WUN.js → init-handler-CIKZGGAY.js} +6 -6
  167. package/dist/cli/chunks/init-wizard-TUU5PPY6.js +2 -0
  168. package/dist/cli/chunks/kernel-XFG42WAG.js +2 -0
  169. package/dist/cli/chunks/{kilocode-installer-GZZG5AFW.js → kilocode-installer-N7NLISYY.js} +2 -2
  170. package/dist/cli/chunks/{kiro-installer-IWNY5TKH.js → kiro-installer-U6XIPAT3.js} +2 -2
  171. package/dist/cli/chunks/knowledge-graph-XV7FPU2T.js +2 -0
  172. package/dist/cli/chunks/{learning-722ZNSZ6.js → learning-NKOF7KDJ.js} +3 -3
  173. package/dist/cli/chunks/{llm-router-DNAV746L.js → llm-router-34WHT3PH.js} +2 -2
  174. package/dist/cli/chunks/{load-Y3GCUFM4.js → load-ZW4Z3YLT.js} +2 -2
  175. package/dist/cli/chunks/load-test-F4L7RTXJ.js +2 -0
  176. package/dist/cli/chunks/{mcp-LKPIBZ3W.js → mcp-6R7SVGKO.js} +2 -2
  177. package/dist/cli/chunks/{memory-L57MLFOP.js → memory-OUYCBU4M.js} +5 -5
  178. package/dist/cli/chunks/memory-backend-DTJD2DWF.js +2 -0
  179. package/dist/cli/chunks/{memory-handlers-MDZQ7HVW.js → memory-handlers-WNXKZRNM.js} +2 -2
  180. package/dist/cli/chunks/opencode-installer-FR75GHFU.js +3 -0
  181. package/dist/cli/chunks/{orchestrator-QHSBB2UC.js → orchestrator-AK7ZMVNH.js} +5 -5
  182. package/dist/cli/chunks/{pipeline-D3QER35Z.js → pipeline-CFOPG7EM.js} +2 -2
  183. package/dist/cli/chunks/{platform-T4E7Q3RD.js → platform-NY3ULBR7.js} +2 -2
  184. package/dist/cli/chunks/{plugin-JHW2YPRC.js → plugin-LRANQYUR.js} +2 -2
  185. package/dist/cli/chunks/{prime-radiant-advanced-wasm-G7CFNNQV.js → prime-radiant-advanced-wasm-6KEIU55P.js} +2 -2
  186. package/dist/cli/chunks/protocol-executor-6W4PS2D4.js +2 -0
  187. package/dist/cli/chunks/{protocol-handler-2BQQ4HDM.js → protocol-handler-ESSZGJ7R.js} +2 -2
  188. package/dist/cli/chunks/{prove-UQ6JFT73.js → prove-EF2PPY65.js} +2 -2
  189. package/dist/cli/chunks/qe-reasoning-bank-7G3TZLEA.js +2 -0
  190. package/dist/cli/chunks/{quality-JRZYMC77.js → quality-AYBXB635.js} +2 -2
  191. package/dist/cli/chunks/queen-coordinator-NFPKGMQN.js +2 -0
  192. package/dist/cli/chunks/real-embeddings-QPBXE7MA.js +2 -0
  193. package/dist/cli/chunks/{roocode-installer-F4E2LAYR.js → roocode-installer-UF6MMBH6.js} +2 -2
  194. package/dist/cli/chunks/router-F4B7Q66G.js +2 -0
  195. package/dist/cli/chunks/routing-feedback-5CIDDW7P.js +2 -0
  196. package/dist/cli/chunks/{routing-handler-VNKFUUGB.js → routing-handler-5TVKFU7V.js} +2 -2
  197. package/dist/cli/chunks/ruvector-commands-E33VXFIA.js +8 -0
  198. package/dist/cli/chunks/rvf-dual-writer-O3AZKD24.js +2 -0
  199. package/dist/cli/chunks/rvf-migration-adapter-IKEUZ2HX.js +2 -0
  200. package/dist/cli/chunks/rvf-migration-coordinator-M4H7W4RN.js +2 -0
  201. package/dist/cli/chunks/rvf-native-adapter-UX3WAPIP.js +2 -0
  202. package/dist/cli/chunks/safe-db-QBBNXEVK.js +2 -0
  203. package/dist/cli/chunks/schedule-GFT4NN6Z.js +2 -0
  204. package/dist/cli/chunks/scheduler-CQ56T7DB.js +2 -0
  205. package/dist/cli/chunks/{security-EBEG2OPU.js → security-ZLWT7IU3.js} +3 -3
  206. package/dist/cli/chunks/shared-rvf-adapter-EXACQ2PT.js +2 -0
  207. package/dist/cli/chunks/shared-rvf-dual-writer-G43LQDIV.js +2 -0
  208. package/dist/cli/chunks/sqlite-persistence-JHSUZPAW.js +2 -0
  209. package/dist/cli/chunks/{status-handler-VZ32M4G4.js → status-handler-7P23CXUI.js} +2 -2
  210. package/dist/cli/chunks/{structural-health-K6LRCKV6.js → structural-health-SCNBNL7K.js} +2 -2
  211. package/dist/cli/chunks/{sync-MHSHNLIM.js → sync-BYZBBH65.js} +2 -2
  212. package/dist/cli/chunks/{task-handler-JNOIBZ2G.js → task-handler-DWJQXZ2K.js} +2 -2
  213. package/dist/cli/chunks/{task-handlers-P5DSUKND.js → task-handlers-35JIXVRW.js} +2 -2
  214. package/dist/cli/chunks/{test-DO22BNIL.js → test-2JSS4XW7.js} +4 -4
  215. package/dist/cli/chunks/{test-scheduling-VLRQZEFL.js → test-scheduling-TWJ5I7N3.js} +3 -3
  216. package/dist/cli/chunks/{token-bootstrap-4VJKGVMK.js → token-bootstrap-LLLNJT5V.js} +2 -2
  217. package/dist/cli/chunks/{token-usage-LG3PXRXH.js → token-usage-EQ4HM4EZ.js} +2 -2
  218. package/dist/cli/chunks/transformers-PBIR5U5S.js +2 -0
  219. package/dist/cli/chunks/{tree-sitter-wasm-parser-FT2KB66N.js → tree-sitter-wasm-parser-X3L2GXUX.js} +2 -2
  220. package/dist/cli/chunks/types-OD43K2NP.js +2 -0
  221. package/dist/cli/chunks/unified-memory-YPHONR2T.js +2 -0
  222. package/dist/cli/chunks/unified-memory-hnsw-HJS4OXWM.js +2 -0
  223. package/dist/cli/chunks/unified-persistence-EFZRO6AW.js +2 -0
  224. package/dist/cli/chunks/{validate-VQCRSVNQ.js → validate-POMLT2KU.js} +2 -2
  225. package/dist/cli/chunks/{validate-swarm-A5DHAWTP.js → validate-swarm-UOC4JGZT.js} +2 -2
  226. package/dist/cli/chunks/{vibium-RZBSL4EB.js → vibium-5JF6LAXI.js} +2 -2
  227. package/dist/cli/chunks/visual-security-7KWFLYNB.js +2 -0
  228. package/dist/cli/chunks/{web-tree-sitter-7C4NXEOF.js → web-tree-sitter-R7WR7J7B.js} +2 -2
  229. package/dist/cli/chunks/{windsurf-installer-ES3KPQG3.js → windsurf-installer-ZSPEUBKR.js} +2 -2
  230. package/dist/cli/chunks/witness-chain-CFSPCXHG.js +2 -0
  231. package/dist/cli/chunks/witness-chain-RWU6WT37.js +2 -0
  232. package/dist/cli/chunks/{workflow-JETHX4ML.js → workflow-YNQT3OW2.js} +4 -4
  233. package/dist/cli/chunks/workflow-orchestrator-Z6TAVMQP.js +2 -0
  234. package/dist/cli/chunks/{wrappers-WP5RH745.js → wrappers-BP4FODVH.js} +2 -2
  235. package/dist/cli/commands/ruvector-commands.js +14 -2
  236. package/dist/coordination/agent-memory-branch.d.ts +117 -0
  237. package/dist/coordination/agent-memory-branch.js +213 -0
  238. package/dist/coordination/agent-teams/mailbox.d.ts +43 -0
  239. package/dist/coordination/agent-teams/mailbox.js +130 -4
  240. package/dist/coordination/handlers/handler-utils.d.ts +1 -0
  241. package/dist/coordination/handlers/handler-utils.js +9 -2
  242. package/dist/coordination/handlers/quality-handlers.js +7 -1
  243. package/dist/domains/contract-testing/coordinator.js +11 -0
  244. package/dist/domains/quality-assessment/coherence/gate-controller.d.ts +20 -1
  245. package/dist/domains/quality-assessment/coherence/gate-controller.js +64 -0
  246. package/dist/domains/quality-assessment/coherence/index.d.ts +3 -3
  247. package/dist/domains/quality-assessment/coherence/index.js +2 -2
  248. package/dist/domains/quality-assessment/coherence/types.d.ts +39 -0
  249. package/dist/domains/quality-assessment/coherence/types.js +11 -0
  250. package/dist/domains/quality-assessment/coordinator.d.ts +14 -0
  251. package/dist/domains/quality-assessment/coordinator.js +92 -0
  252. package/dist/domains/test-execution/coordinator.d.ts +19 -0
  253. package/dist/domains/test-execution/coordinator.js +102 -5
  254. package/dist/domains/test-generation/coordinator.js +11 -0
  255. package/dist/domains/test-generation/interfaces.d.ts +2 -0
  256. package/dist/domains/test-generation/services/test-generator.d.ts +9 -0
  257. package/dist/domains/test-generation/services/test-generator.js +37 -0
  258. package/dist/init/agents-installer.d.ts +5 -3
  259. package/dist/init/agents-installer.js +17 -43
  260. package/dist/init/find-package-root.d.ts +22 -0
  261. package/dist/init/find-package-root.js +46 -0
  262. package/dist/init/n8n-installer.d.ts +4 -2
  263. package/dist/init/n8n-installer.js +23 -23
  264. package/dist/init/opencode-installer.d.ts +0 -5
  265. package/dist/init/opencode-installer.js +12 -39
  266. package/dist/init/skills-installer.d.ts +5 -2
  267. package/dist/init/skills-installer.js +15 -37
  268. package/dist/integrations/embeddings/index/HNSWIndex.d.ts +9 -2
  269. package/dist/integrations/embeddings/index/HNSWIndex.js +110 -35
  270. package/dist/integrations/ruvector/cognitive-routing.d.ts +67 -0
  271. package/dist/integrations/ruvector/cognitive-routing.js +208 -0
  272. package/dist/integrations/ruvector/feature-flags.d.ts +84 -0
  273. package/dist/integrations/ruvector/feature-flags.js +59 -0
  274. package/dist/integrations/ruvector/hdc-fingerprint.d.ts +76 -0
  275. package/dist/integrations/ruvector/hdc-fingerprint.js +217 -0
  276. package/dist/integrations/ruvector/hyperbolic-hnsw.d.ts +59 -0
  277. package/dist/integrations/ruvector/hyperbolic-hnsw.js +194 -0
  278. package/dist/integrations/ruvector/index.d.ts +5 -2
  279. package/dist/integrations/ruvector/index.js +13 -2
  280. package/dist/integrations/ruvector/shared-rvf-adapter.d.ts +24 -0
  281. package/dist/integrations/ruvector/shared-rvf-adapter.js +55 -0
  282. package/dist/integrations/ruvector/shared-rvf-dual-writer.d.ts +6 -0
  283. package/dist/integrations/ruvector/shared-rvf-dual-writer.js +38 -0
  284. package/dist/integrations/ruvector/sona-persistence.d.ts +8 -0
  285. package/dist/integrations/ruvector/sona-persistence.js +10 -0
  286. package/dist/integrations/ruvector/vector-delta-tracker.d.ts +96 -0
  287. package/dist/integrations/ruvector/vector-delta-tracker.js +226 -0
  288. package/dist/kernel/agent-coordinator.d.ts +75 -1
  289. package/dist/kernel/agent-coordinator.js +250 -1
  290. package/dist/kernel/hnsw-legacy-bridge.d.ts +38 -0
  291. package/dist/kernel/hnsw-legacy-bridge.js +88 -0
  292. package/dist/kernel/hnsw-shadow-validator.d.ts +91 -0
  293. package/dist/kernel/hnsw-shadow-validator.js +139 -0
  294. package/dist/kernel/index.d.ts +1 -1
  295. package/dist/kernel/index.js +1 -1
  296. package/dist/kernel/interfaces.d.ts +39 -0
  297. package/dist/kernel/kernel.d.ts +23 -0
  298. package/dist/kernel/kernel.js +106 -1
  299. package/dist/kernel/unified-memory.d.ts +1 -1
  300. package/dist/kernel/unified-memory.js +7 -3
  301. package/dist/learning/aqe-learning-engine.d.ts +65 -0
  302. package/dist/learning/aqe-learning-engine.js +134 -0
  303. package/dist/learning/dream/dream-engine.d.ts +6 -1
  304. package/dist/learning/dream/dream-engine.js +37 -2
  305. package/dist/learning/dream/dream-scheduler.d.ts +25 -0
  306. package/dist/learning/dream/dream-scheduler.js +120 -0
  307. package/dist/learning/dream/rvcow-branch-manager.d.ts +6 -3
  308. package/dist/learning/dream/rvcow-branch-manager.js +60 -5
  309. package/dist/learning/experience-capture.d.ts +3 -3
  310. package/dist/learning/hyperbolic-pattern-index.d.ts +82 -0
  311. package/dist/learning/hyperbolic-pattern-index.js +142 -0
  312. package/dist/learning/index.d.ts +3 -3
  313. package/dist/learning/index.js +1 -1
  314. package/dist/learning/metrics-tracker.d.ts +44 -0
  315. package/dist/learning/metrics-tracker.js +37 -0
  316. package/dist/learning/pattern-promotion.d.ts +3 -3
  317. package/dist/learning/pattern-store.d.ts +45 -2
  318. package/dist/learning/pattern-store.js +217 -4
  319. package/dist/learning/qe-patterns.d.ts +1 -1
  320. package/dist/learning/qe-reasoning-bank.js +1 -1
  321. package/dist/learning/rvf-pattern-migration.d.ts +50 -0
  322. package/dist/learning/rvf-pattern-migration.js +106 -0
  323. package/dist/learning/rvf-pattern-store.d.ts +66 -0
  324. package/dist/learning/rvf-pattern-store.js +447 -0
  325. package/dist/mcp/bundle.js +1894 -1804
  326. package/dist/mcp/handlers/index.d.ts +1 -0
  327. package/dist/mcp/handlers/index.js +2 -0
  328. package/dist/mcp/handlers/migration-handlers.d.ts +52 -0
  329. package/dist/mcp/handlers/migration-handlers.js +85 -0
  330. package/dist/mcp/protocol-server.d.ts +1 -0
  331. package/dist/mcp/protocol-server.js +63 -2
  332. package/dist/mcp/types.d.ts +1 -1
  333. package/dist/optimization/early-exit-token-optimizer.d.ts +7 -7
  334. package/dist/optimization/early-exit-token-optimizer.js +3 -3
  335. package/dist/persistence/rvf-consistency-validator.d.ts +85 -0
  336. package/dist/persistence/rvf-consistency-validator.js +182 -0
  337. package/dist/persistence/rvf-migration-adapter.d.ts +125 -0
  338. package/dist/persistence/rvf-migration-adapter.js +303 -0
  339. package/dist/persistence/rvf-migration-coordinator.d.ts +115 -0
  340. package/dist/persistence/rvf-migration-coordinator.js +224 -0
  341. package/dist/persistence/rvf-stage-gate.d.ts +70 -0
  342. package/dist/persistence/rvf-stage-gate.js +163 -0
  343. package/package.json +10 -10
  344. package/dist/cli/chunks/adapter-WBR5NXS3.js +0 -2
  345. package/dist/cli/chunks/aqe-learning-engine-TK4JQCGT.js +0 -2
  346. package/dist/cli/chunks/base-2WXOSMBQ.js +0 -2
  347. package/dist/cli/chunks/better-sqlite3-7KY2RDXO.js +0 -2
  348. package/dist/cli/chunks/brain-handler-PPEGDCN4.js +0 -68
  349. package/dist/cli/chunks/browser-workflow-42F7GK5T.js +0 -2
  350. package/dist/cli/chunks/chunk-263XS447.js +0 -2
  351. package/dist/cli/chunks/chunk-2I7J3O6V.js +0 -2
  352. package/dist/cli/chunks/chunk-3JPRUND5.js +0 -2
  353. package/dist/cli/chunks/chunk-3THRQEZ2.js +0 -95
  354. package/dist/cli/chunks/chunk-4B6NCELM.js +0 -2
  355. package/dist/cli/chunks/chunk-62ADTHV7.js +0 -2
  356. package/dist/cli/chunks/chunk-BR26T7ZS.js +0 -180
  357. package/dist/cli/chunks/chunk-DRT3WKQW.js +0 -2
  358. package/dist/cli/chunks/chunk-FIA6X7UL.js +0 -2
  359. package/dist/cli/chunks/chunk-J3KWWR6Z.js +0 -1
  360. package/dist/cli/chunks/chunk-JZSDOIXA.js +0 -2
  361. package/dist/cli/chunks/chunk-MV6CMOJQ.js +0 -65
  362. package/dist/cli/chunks/chunk-N5UXCLFI.js +0 -2
  363. package/dist/cli/chunks/chunk-OF4D7MYI.js +0 -2
  364. package/dist/cli/chunks/chunk-QOVHWZEP.js +0 -1
  365. package/dist/cli/chunks/chunk-RFSN6IDA.js +0 -79
  366. package/dist/cli/chunks/chunk-X5IJGWYG.js +0 -2
  367. package/dist/cli/chunks/ci-output-7JN7F6CI.js +0 -2
  368. package/dist/cli/chunks/client-MCSNSH2C.js +0 -2
  369. package/dist/cli/chunks/complexity-analyzer-AB4OZARV.js +0 -2
  370. package/dist/cli/chunks/cost-tracker-4F723RB6.js +0 -2
  371. package/dist/cli/chunks/cross-domain-router-OWR5IJ5G.js +0 -2
  372. package/dist/cli/chunks/dag-attention-scheduler-JWO6XI6A.js +0 -2
  373. package/dist/cli/chunks/detect-L6ZZHUSX.js +0 -2
  374. package/dist/cli/chunks/domain-transfer-5Y4FGJAJ.js +0 -2
  375. package/dist/cli/chunks/dream-4TDBIYED.js +0 -2
  376. package/dist/cli/chunks/esm-node-2PKHKOTS.js +0 -2
  377. package/dist/cli/chunks/feature-flags-IVQ3AL4Q.js +0 -2
  378. package/dist/cli/chunks/file-discovery-QFPA6GMV.js +0 -2
  379. package/dist/cli/chunks/gnn-wrapper-OYC55N5E.js +0 -2
  380. package/dist/cli/chunks/hnsw-index-YO7CT23I.js +0 -2
  381. package/dist/cli/chunks/hnswlib-node-56YWVXFE.js +0 -2
  382. package/dist/cli/chunks/hypergraph-engine-A4Y2ZRAG.js +0 -2
  383. package/dist/cli/chunks/impact-analyzer-UEIGXSZ4.js +0 -2
  384. package/dist/cli/chunks/init-wizard-JWZUGIPJ.js +0 -2
  385. package/dist/cli/chunks/kernel-YNDTVKIW.js +0 -2
  386. package/dist/cli/chunks/knowledge-graph-NGJKFTSN.js +0 -2
  387. package/dist/cli/chunks/load-test-GZUBXFF3.js +0 -2
  388. package/dist/cli/chunks/memory-backend-3NQIZUXE.js +0 -2
  389. package/dist/cli/chunks/opencode-installer-4HUB36H5.js +0 -3
  390. package/dist/cli/chunks/protocol-executor-SPUVRDWT.js +0 -2
  391. package/dist/cli/chunks/qe-reasoning-bank-3HBK2FVD.js +0 -2
  392. package/dist/cli/chunks/queen-coordinator-RW3NKO5A.js +0 -2
  393. package/dist/cli/chunks/real-embeddings-GK63VF35.js +0 -2
  394. package/dist/cli/chunks/router-RJGHWDQ3.js +0 -2
  395. package/dist/cli/chunks/routing-feedback-ZXBXFKX6.js +0 -2
  396. package/dist/cli/chunks/ruvector-commands-2TLNHC3A.js +0 -8
  397. package/dist/cli/chunks/rvf-dual-writer-MQW2SJLT.js +0 -2
  398. package/dist/cli/chunks/rvf-native-adapter-LKFKTMUN.js +0 -2
  399. package/dist/cli/chunks/safe-db-G22E5ROA.js +0 -2
  400. package/dist/cli/chunks/schedule-Y7VVCPYV.js +0 -2
  401. package/dist/cli/chunks/scheduler-AUQIFQB7.js +0 -2
  402. package/dist/cli/chunks/shared-rvf-dual-writer-BVSCQAFS.js +0 -2
  403. package/dist/cli/chunks/sqlite-persistence-JAVHUGGL.js +0 -2
  404. package/dist/cli/chunks/transformers-GY7SIKEU.js +0 -2
  405. package/dist/cli/chunks/types-QJGNBKP2.js +0 -2
  406. package/dist/cli/chunks/unified-memory-XYGENQUT.js +0 -2
  407. package/dist/cli/chunks/unified-memory-hnsw-MVEGQBF3.js +0 -2
  408. package/dist/cli/chunks/unified-persistence-PFRCWEUG.js +0 -2
  409. package/dist/cli/chunks/visual-security-V47BLGJM.js +0 -2
  410. package/dist/cli/chunks/witness-chain-BR63P4A7.js +0 -2
  411. package/dist/cli/chunks/workflow-orchestrator-7PZMX3JZ.js +0 -2
@@ -393,6 +393,43 @@ export class LearningMetricsTracker {
393
393
  }
394
394
  return data;
395
395
  }
396
+ /**
397
+ * Collect a unified metrics snapshot across all subsystems (ADR-062).
398
+ *
399
+ * Gathers token, quality, learning, and performance data into a single
400
+ * point-in-time structure suitable for meta-learning trend analysis.
401
+ * Uses sensible zero-defaults when a subsystem is unavailable.
402
+ */
403
+ async collectUnifiedSnapshot() {
404
+ if (!this.initialized)
405
+ await this.initialize();
406
+ const learningSnap = await this.getCurrentMetrics();
407
+ return {
408
+ timestamp: Date.now(),
409
+ tokenMetrics: {
410
+ totalTokens: 0,
411
+ costUsd: 0,
412
+ savingsUsd: 0,
413
+ cacheHitRate: 0,
414
+ },
415
+ qualityMetrics: {
416
+ gatePassRate: learningSnap.successRate,
417
+ averageScore: learningSnap.avgQualityScore,
418
+ ratchetLevel: 0,
419
+ },
420
+ learningMetrics: {
421
+ patternCount: learningSnap.totalPatterns,
422
+ averageConfidence: learningSnap.avgConfidence,
423
+ quarantinedCount: 0,
424
+ transferSuccessRate: 0,
425
+ },
426
+ performanceMetrics: {
427
+ avgLatencyMs: 0,
428
+ p95LatencyMs: 0,
429
+ errorRate: 0,
430
+ },
431
+ };
432
+ }
396
433
  /**
397
434
  * Close the database connection
398
435
  */
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import type { EventBus } from '../kernel/interfaces.js';
9
9
  import type { QEPattern } from './qe-patterns.js';
10
- import type { PatternStore, PatternSearchResult } from './pattern-store.js';
10
+ import type { IPatternStore, PatternSearchResult } from './pattern-store.js';
11
11
  import type { SQLitePatternStore } from './sqlite-persistence.js';
12
12
  import type { RvfDualWriter } from '../integrations/ruvector/rvf-dual-writer.js';
13
13
  import type { Result } from '../shared/types/index.js';
@@ -17,7 +17,7 @@ import type { Database as DatabaseType } from 'better-sqlite3';
17
17
  * Dependencies needed for promotion checks
18
18
  */
19
19
  export interface PromotionDeps {
20
- patternStore: PatternStore;
20
+ patternStore: IPatternStore;
21
21
  coherenceService?: {
22
22
  isInitialized(): boolean;
23
23
  checkCoherence(nodes: unknown[]): Promise<{
@@ -52,7 +52,7 @@ export declare function promotePattern(patternId: string, deps: PromotionDeps):
52
52
  export interface SeedingDeps {
53
53
  searchPatterns: (query: string | number[], options?: Record<string, unknown>) => Promise<Result<PatternSearchResult[]>>;
54
54
  storePattern: (options: Record<string, unknown>) => Promise<Result<QEPattern>>;
55
- patternStore: PatternStore;
55
+ patternStore: IPatternStore;
56
56
  }
57
57
  /**
58
58
  * Seed cross-domain patterns by transferring generalizable patterns
@@ -156,6 +156,8 @@ export interface PatternSearchResult {
156
156
  export interface IPatternStore {
157
157
  /** Initialize the store */
158
158
  initialize(): Promise<void>;
159
+ /** Attach SQLite persistence for metadata */
160
+ setSqliteStore?(store: import('./sqlite-persistence.js').SQLitePatternStore): void;
159
161
  /** Store a new pattern */
160
162
  store(pattern: QEPattern): Promise<Result<string>>;
161
163
  /** Create and store a pattern from options */
@@ -200,7 +202,10 @@ export declare class PatternStore implements IPatternStore {
200
202
  private hnswAvailable;
201
203
  private hnswInitPromise;
202
204
  private hdcCache;
205
+ private hdcTokenCache;
203
206
  private deltaTracker;
207
+ private vectorDeltaTracker;
208
+ private hyperbolicIndex;
204
209
  private stats;
205
210
  constructor(memory: MemoryBackend, config?: Partial<PatternStoreConfig>);
206
211
  /**
@@ -233,6 +238,11 @@ export declare class PatternStore implements IPatternStore {
233
238
  * Internal HNSW initialization with timeout protection
234
239
  */
235
240
  private initializeHNSWInternal;
241
+ /**
242
+ * Lazily initialize the VectorDeltaTracker for embedding version history.
243
+ * Returns null when the useDeltaEventSourcing feature flag is disabled.
244
+ */
245
+ private getVectorDeltaTracker;
236
246
  /**
237
247
  * Load existing patterns from SQLite into in-memory cache.
238
248
  *
@@ -320,9 +330,42 @@ export declare class PatternStore implements IPatternStore {
320
330
  * Dispose the pattern store
321
331
  */
322
332
  dispose(): Promise<void>;
333
+ /**
334
+ * Index a pattern's embedding into the hyperbolic HNSW index.
335
+ *
336
+ * Call this after storing a pattern when hyperbolic search is enabled.
337
+ * Safe to call when disabled — it no-ops. Does not modify the pattern
338
+ * or the main HNSW index; the hyperbolic index is a parallel backend.
339
+ *
340
+ * @param patternId - The pattern ID to index
341
+ * @param embedding - Euclidean embedding (projected to Poincare ball internally)
342
+ * @param metadata - Optional metadata (e.g., domain, type)
343
+ */
344
+ indexHyperbolic(patternId: string, embedding: number[] | Float32Array, metadata?: Record<string, unknown>): void;
345
+ /**
346
+ * Search for similar patterns using the hyperbolic (Poincare ball) HNSW index.
347
+ *
348
+ * Hyperbolic geometry naturally preserves hierarchical relationships:
349
+ * root patterns cluster near the origin, leaf patterns near the boundary.
350
+ * This makes it well-suited for module hierarchy and test suite tree searches.
351
+ *
352
+ * Falls back to an empty result set when:
353
+ * - The `useHyperbolicHnsw` feature flag is disabled
354
+ * - The hyperbolic index has not been populated
355
+ * - An error occurs during search
356
+ *
357
+ * @param query - Euclidean query embedding (will be projected to Poincare ball)
358
+ * @param k - Number of nearest neighbors to return
359
+ * @returns Array of pattern search results with hyperbolic distances, or empty on failure
360
+ */
361
+ searchHyperbolic(query: Float32Array | number[], k?: number): Promise<Result<PatternSearchResult[]>>;
323
362
  }
324
363
  /**
325
- * Create a new pattern store instance
364
+ * Create a new pattern store instance.
365
+ *
366
+ * When `useRVFPatternStore` feature flag is enabled (ADR-066), returns an
367
+ * RvfPatternStore backed by @ruvector/rvf-node with persistent HNSW.
368
+ * Otherwise returns the existing in-memory HNSW PatternStore.
326
369
  */
327
- export declare function createPatternStore(memory: MemoryBackend, config?: Partial<PatternStoreConfig>): PatternStore;
370
+ export declare function createPatternStore(memory: MemoryBackend, config?: Partial<PatternStoreConfig>): IPatternStore;
328
371
  //# sourceMappingURL=pattern-store.d.ts.map
@@ -7,13 +7,17 @@
7
7
  */
8
8
  import { v4 as uuidv4 } from 'uuid';
9
9
  import { ok, err } from '../shared/types/index.js';
10
+ import { RvfPatternStore } from './rvf-pattern-store.js';
11
+ import { createRvfStore as _createRvfStore, isRvfNativeAvailable } from '../integrations/ruvector/rvf-native-adapter.js';
10
12
  import { toErrorMessage, toError } from '../shared/error-utils.js';
11
13
  import { calculateQualityScore, shouldPromotePattern, validateQEPattern, mapQEDomainToAQE, PROMOTION_THRESHOLD, } from './qe-patterns.js';
12
14
  import { applyFilterSync } from '../integrations/ruvector/filter-adapter.js';
13
- import { isHDCFingerprintingEnabled, isDeltaEventSourcingEnabled, isHopfieldMemoryEnabled, } from '../integrations/ruvector/feature-flags.js';
14
- import { createHdcFingerprinter, } from '../integrations/ruvector/hdc-fingerprint.js';
15
+ import { isHDCFingerprintingEnabled, isDeltaEventSourcingEnabled, isHopfieldMemoryEnabled, isHyperbolicHnswEnabled, getRuVectorFeatureFlags, } from '../integrations/ruvector/feature-flags.js';
16
+ import { createHdcFingerprinter, createHDCFingerprinter, } from '../integrations/ruvector/hdc-fingerprint.js';
15
17
  import { DeltaTracker } from '../integrations/ruvector/delta-tracker.js';
18
+ import { createVectorDeltaTracker, } from '../integrations/ruvector/vector-delta-tracker.js';
16
19
  import { createHopfieldMemory } from '../integrations/ruvector/hopfield-memory.js';
20
+ import { createHyperbolicPatternIndex, } from './hyperbolic-pattern-index.js';
17
21
  // ============================================================================
18
22
  // R1: HDC Fingerprint Singleton (lazy-initialized)
19
23
  // ============================================================================
@@ -26,6 +30,17 @@ function getHdcFingerprinter() {
26
30
  return hdcFingerprinter;
27
31
  }
28
32
  // ============================================================================
33
+ // R1b: Token-based HDC Fingerprinter Singleton (lazy-initialized, flag-gated)
34
+ // ============================================================================
35
+ /** Module-level token-based HDC fingerprinter (null when feature disabled) */
36
+ let hdcTokenFingerprinter = undefined;
37
+ function getHDCTokenFingerprinter() {
38
+ if (hdcTokenFingerprinter === undefined) {
39
+ hdcTokenFingerprinter = createHDCFingerprinter(); // null when flag disabled
40
+ }
41
+ return hdcTokenFingerprinter;
42
+ }
43
+ // ============================================================================
29
44
  // R5: Hopfield Memory Singleton (lazy-initialized, dimension-aware)
30
45
  // ============================================================================
31
46
  /** Module-level Hopfield memory for exact pattern recall */
@@ -97,8 +112,14 @@ export class PatternStore {
97
112
  hnswInitPromise = null;
98
113
  // R1: HDC fingerprint cache (pattern ID -> fingerprint vector)
99
114
  hdcCache = new Map();
115
+ // R1b: Token-based HDC fingerprint cache (pattern ID -> token fingerprint vector)
116
+ hdcTokenCache = new Map();
100
117
  // R3: Delta event sourcing tracker (lazy-initialized with SQLite)
101
118
  deltaTracker = null;
119
+ // R3b: Vector delta tracker for embedding version history (lazy-initialized, flag-gated)
120
+ vectorDeltaTracker = undefined;
121
+ // R14: Hyperbolic HNSW index for hierarchical pattern search (lazy-initialized, flag-gated)
122
+ hyperbolicIndex = null;
102
123
  // Statistics
103
124
  stats = {
104
125
  searchOperations: 0,
@@ -201,7 +222,29 @@ export class PatternStore {
201
222
  */
202
223
  async initializeHNSWInternal() {
203
224
  try {
204
- // Try to import and use the existing HNSWIndex
225
+ // ADR-071: Use unified HNSW via bridge when flag is enabled
226
+ const unifiedFlags = getRuVectorFeatureFlags();
227
+ if (unifiedFlags.useUnifiedHnsw) {
228
+ try {
229
+ const { HnswLegacyBridge } = await import('../kernel/hnsw-legacy-bridge.js');
230
+ const { HnswAdapter } = await import('../kernel/hnsw-adapter.js');
231
+ const adapter = new HnswAdapter('patterns', {
232
+ dimensions: this.config.embeddingDimension,
233
+ M: this.config.hnsw.M,
234
+ efConstruction: this.config.hnsw.efConstruction,
235
+ efSearch: this.config.hnsw.efSearch,
236
+ metric: 'cosine',
237
+ });
238
+ this.hnswIndex = new HnswLegacyBridge(adapter);
239
+ this.hnswAvailable = true;
240
+ console.log('[PatternStore] Using unified HNSW via HnswLegacyBridge (ADR-071)');
241
+ return;
242
+ }
243
+ catch (bridgeError) {
244
+ console.warn('[PatternStore] Unified HNSW bridge failed, falling back:', bridgeError);
245
+ }
246
+ }
247
+ // Fallback: direct HNSWIndex (legacy path)
205
248
  const { HNSWIndex } = await import('../domains/coverage-analysis/services/hnsw-index.js');
206
249
  this.hnswIndex = new HNSWIndex(this.memory, {
207
250
  dimensions: this.config.embeddingDimension,
@@ -267,6 +310,16 @@ export class PatternStore {
267
310
  this.hnswAvailable = false;
268
311
  }
269
312
  }
313
+ /**
314
+ * Lazily initialize the VectorDeltaTracker for embedding version history.
315
+ * Returns null when the useDeltaEventSourcing feature flag is disabled.
316
+ */
317
+ getVectorDeltaTracker() {
318
+ if (this.vectorDeltaTracker === undefined) {
319
+ this.vectorDeltaTracker = createVectorDeltaTracker(); // null when flag disabled
320
+ }
321
+ return this.vectorDeltaTracker;
322
+ }
270
323
  /**
271
324
  * Load existing patterns from SQLite into in-memory cache.
272
325
  *
@@ -323,6 +376,7 @@ export class PatternStore {
323
376
  this.typeIndex.get(pattern.patternType)?.delete(pattern.id);
324
377
  this.tierIndex.get(pattern.tier)?.delete(pattern.id);
325
378
  this.hdcCache.delete(pattern.id); // R1: cleanup HDC fingerprint
379
+ this.hdcTokenCache.delete(pattern.id); // R1b: cleanup token-based fingerprint
326
380
  }
327
381
  /**
328
382
  * Store a new pattern
@@ -349,6 +403,8 @@ export class PatternStore {
349
403
  // Run cleanup for this domain
350
404
  await this.cleanupDomain(pattern.qeDomain);
351
405
  }
406
+ // R3b: Capture pre-existing pattern for VectorDeltaTracker before overwrite
407
+ const existingPattern = this.patternCache.get(pattern.id) ?? null;
352
408
  // Index in memory cache
353
409
  this.indexPattern(pattern);
354
410
  // Persist to SQLite (pattern + embedding atomically)
@@ -401,6 +457,25 @@ export class PatternStore {
401
457
  console.debug(`[PatternStore] HDC fingerprint failed for ${pattern.id}:`, toErrorMessage(error));
402
458
  }
403
459
  }
460
+ // R1b: Compute token-based HDC fingerprint via HDCPatternFingerprinter
461
+ try {
462
+ const tokenFp = getHDCTokenFingerprinter();
463
+ if (tokenFp) {
464
+ const tokens = [pattern.patternType, pattern.qeDomain];
465
+ if (pattern.context?.tags) {
466
+ tokens.push(...pattern.context.tags);
467
+ }
468
+ if (pattern.name) {
469
+ tokens.push(pattern.name);
470
+ }
471
+ const fpVector = tokenFp.fingerprintPattern(tokens);
472
+ this.hdcTokenCache.set(pattern.id, fpVector);
473
+ }
474
+ }
475
+ catch (error) {
476
+ // Token fingerprinting failure must not prevent pattern storage
477
+ console.debug(`[PatternStore] HDC token fingerprint failed for ${pattern.id}:`, toErrorMessage(error));
478
+ }
404
479
  // R5: Store embedding in Hopfield memory for exact recall
405
480
  if (isHopfieldMemoryEnabled() && pattern.embedding) {
406
481
  try {
@@ -434,6 +509,37 @@ export class PatternStore {
434
509
  console.debug(`[PatternStore] Delta genesis for ${pattern.id}:`, toErrorMessage(error));
435
510
  }
436
511
  }
512
+ // R3b: Track embedding version history via VectorDeltaTracker
513
+ if (pattern.embedding) {
514
+ try {
515
+ const vdt = this.getVectorDeltaTracker();
516
+ if (vdt) {
517
+ if (existingPattern?.embedding) {
518
+ // Update: record delta between old and new embeddings
519
+ vdt.recordDelta(pattern.id, existingPattern.embedding, pattern.embedding);
520
+ }
521
+ else if (vdt.getVersion(pattern.id) < 0) {
522
+ // New pattern: record genesis for the embedding
523
+ vdt.recordGenesis(pattern.id, pattern.embedding);
524
+ }
525
+ }
526
+ }
527
+ catch (error) {
528
+ // Vector delta tracking failure must not prevent pattern storage
529
+ console.debug(`[PatternStore] VectorDeltaTracker for ${pattern.id}:`, toErrorMessage(error));
530
+ }
531
+ }
532
+ // R14: Auto-index into hyperbolic HNSW when enabled
533
+ try {
534
+ if (isHyperbolicHnswEnabled() && pattern.embedding) {
535
+ this.indexHyperbolic(pattern.id, pattern.embedding, {
536
+ domain: pattern.qeDomain,
537
+ type: pattern.patternType,
538
+ name: pattern.name,
539
+ });
540
+ }
541
+ }
542
+ catch { /* best-effort — hyperbolic indexing must not block store() */ }
437
543
  return ok(pattern.id);
438
544
  }
439
545
  /**
@@ -494,6 +600,7 @@ export class PatternStore {
494
600
  'flaky-fix': 'test-execution',
495
601
  'refactor-safe': 'code-intelligence',
496
602
  'error-handling': 'test-generation',
603
+ 'meta-optimization': 'learning-optimization',
497
604
  };
498
605
  return typeToDomain[patternType] || 'test-generation';
499
606
  }
@@ -1129,6 +1236,10 @@ export class PatternStore {
1129
1236
  this.tierIndex.clear();
1130
1237
  this.hdcCache.clear(); // R1: cleanup
1131
1238
  this.deltaTracker = null; // R3: cleanup
1239
+ if (this.hyperbolicIndex) {
1240
+ this.hyperbolicIndex.reset();
1241
+ this.hyperbolicIndex = null;
1242
+ } // R14: cleanup
1132
1243
  if (hopfieldMemory) {
1133
1244
  hopfieldMemory.clear();
1134
1245
  hopfieldMemory = null;
@@ -1136,14 +1247,116 @@ export class PatternStore {
1136
1247
  } // R5: cleanup
1137
1248
  this.initialized = false;
1138
1249
  }
1250
+ // ==========================================================================
1251
+ // R14: Hyperbolic Pattern Search (ADR-087)
1252
+ // ==========================================================================
1253
+ /**
1254
+ * Index a pattern's embedding into the hyperbolic HNSW index.
1255
+ *
1256
+ * Call this after storing a pattern when hyperbolic search is enabled.
1257
+ * Safe to call when disabled — it no-ops. Does not modify the pattern
1258
+ * or the main HNSW index; the hyperbolic index is a parallel backend.
1259
+ *
1260
+ * @param patternId - The pattern ID to index
1261
+ * @param embedding - Euclidean embedding (projected to Poincare ball internally)
1262
+ * @param metadata - Optional metadata (e.g., domain, type)
1263
+ */
1264
+ indexHyperbolic(patternId, embedding, metadata) {
1265
+ if (!isHyperbolicHnswEnabled())
1266
+ return;
1267
+ try {
1268
+ if (!this.hyperbolicIndex) {
1269
+ this.hyperbolicIndex = createHyperbolicPatternIndex({
1270
+ dimensions: this.config.embeddingDimension,
1271
+ maxElements: this.config.hnsw.maxElements,
1272
+ });
1273
+ }
1274
+ this.hyperbolicIndex.indexPattern(patternId, embedding, metadata);
1275
+ }
1276
+ catch (error) {
1277
+ console.debug(`[PatternStore] Hyperbolic indexing failed for ${patternId}:`, error instanceof Error ? error.message : error);
1278
+ }
1279
+ }
1280
+ /**
1281
+ * Search for similar patterns using the hyperbolic (Poincare ball) HNSW index.
1282
+ *
1283
+ * Hyperbolic geometry naturally preserves hierarchical relationships:
1284
+ * root patterns cluster near the origin, leaf patterns near the boundary.
1285
+ * This makes it well-suited for module hierarchy and test suite tree searches.
1286
+ *
1287
+ * Falls back to an empty result set when:
1288
+ * - The `useHyperbolicHnsw` feature flag is disabled
1289
+ * - The hyperbolic index has not been populated
1290
+ * - An error occurs during search
1291
+ *
1292
+ * @param query - Euclidean query embedding (will be projected to Poincare ball)
1293
+ * @param k - Number of nearest neighbors to return
1294
+ * @returns Array of pattern search results with hyperbolic distances, or empty on failure
1295
+ */
1296
+ async searchHyperbolic(query, k = 10) {
1297
+ if (!isHyperbolicHnswEnabled() || !this.hyperbolicIndex) {
1298
+ return ok([]);
1299
+ }
1300
+ try {
1301
+ const hyperbolicResults = this.hyperbolicIndex.search(query, k);
1302
+ const results = [];
1303
+ for (const hr of hyperbolicResults) {
1304
+ const pattern = await this.get(hr.patternId);
1305
+ if (!pattern)
1306
+ continue;
1307
+ // Convert hyperbolic distance to a 0-1 similarity score
1308
+ // Using exp(-distance) which maps [0, inf) -> (0, 1]
1309
+ const similarity = Math.exp(-hr.distance);
1310
+ const reuseInfo = this.calculateReuseInfo(pattern, similarity);
1311
+ results.push({
1312
+ pattern,
1313
+ score: similarity,
1314
+ matchType: 'vector',
1315
+ similarity,
1316
+ canReuse: reuseInfo.canReuse,
1317
+ estimatedTokenSavings: reuseInfo.estimatedTokenSavings,
1318
+ reuseConfidence: reuseInfo.reuseConfidence,
1319
+ });
1320
+ }
1321
+ return ok(results);
1322
+ }
1323
+ catch (error) {
1324
+ console.warn('[PatternStore] Hyperbolic search failed, returning empty results:', error instanceof Error ? error.message : error);
1325
+ return ok([]);
1326
+ }
1327
+ }
1139
1328
  }
1140
1329
  // ============================================================================
1141
1330
  // Factory Functions
1142
1331
  // ============================================================================
1143
1332
  /**
1144
- * Create a new pattern store instance
1333
+ * Create a new pattern store instance.
1334
+ *
1335
+ * When `useRVFPatternStore` feature flag is enabled (ADR-066), returns an
1336
+ * RvfPatternStore backed by @ruvector/rvf-node with persistent HNSW.
1337
+ * Otherwise returns the existing in-memory HNSW PatternStore.
1145
1338
  */
1146
1339
  export function createPatternStore(memory, config) {
1340
+ // ADR-066: RVF-backed PatternStore when feature flag is enabled
1341
+ try {
1342
+ const flags = getRuVectorFeatureFlags();
1343
+ if (flags.useRVFPatternStore && isRvfNativeAvailable()) {
1344
+ // Only use RVF if the data directory exists (created by kernel init)
1345
+ const { existsSync } = require('fs');
1346
+ const rvfPath = '.agentic-qe/patterns.rvf';
1347
+ const rvfDir = require('path').dirname(rvfPath);
1348
+ if (existsSync(rvfDir)) {
1349
+ const mergedConfig = { ...DEFAULT_PATTERN_STORE_CONFIG, ...config };
1350
+ const store = new RvfPatternStore((path, dim) => _createRvfStore(path, dim), { rvfPath, base: mergedConfig });
1351
+ console.log('[PatternStore] Using RVF-backed store (ADR-066)');
1352
+ return store;
1353
+ }
1354
+ }
1355
+ }
1356
+ catch (error) {
1357
+ // Feature flags or RVF modules not available — use default
1358
+ console.warn('[PatternStore] RVF store unavailable, using in-memory HNSW:', error instanceof Error ? error.message : error);
1359
+ }
1147
1360
  return new PatternStore(memory, config);
1148
1361
  }
1149
1362
  //# sourceMappingURL=pattern-store.js.map
@@ -31,7 +31,7 @@ export type QEDomain = keyof typeof QE_DOMAINS;
31
31
  /**
32
32
  * QE pattern types - specific pattern categories
33
33
  */
34
- export type QEPatternType = 'test-template' | 'assertion-pattern' | 'mock-pattern' | 'coverage-strategy' | 'mutation-strategy' | 'api-contract' | 'visual-baseline' | 'a11y-check' | 'perf-benchmark' | 'flaky-fix' | 'refactor-safe' | 'error-handling';
34
+ export type QEPatternType = 'test-template' | 'assertion-pattern' | 'mock-pattern' | 'coverage-strategy' | 'mutation-strategy' | 'api-contract' | 'visual-baseline' | 'a11y-check' | 'perf-benchmark' | 'flaky-fix' | 'refactor-safe' | 'error-handling' | 'meta-optimization';
35
35
  /**
36
36
  * Test framework identifiers
37
37
  */
@@ -116,7 +116,7 @@ export class QEReasoningBank {
116
116
  try {
117
117
  const store = this.getSqliteStore();
118
118
  await store.initialize();
119
- this.patternStore.setSqliteStore(store);
119
+ this.patternStore.setSqliteStore?.(store);
120
120
  }
121
121
  catch (e) {
122
122
  logger.warn('Failed to wire SQLitePatternStore into PatternStore', { error: toErrorMessage(e) });
@@ -0,0 +1,50 @@
1
+ /**
2
+ * SQLite → RVF Pattern Migration Utility (ADR-066)
3
+ *
4
+ * Reads pattern embeddings from the SQLite qe_patterns/qe_pattern_embeddings
5
+ * tables and ingests them into an RVF file. This is a one-time migration
6
+ * that creates the .rvf file for the RvfPatternStore.
7
+ *
8
+ * Safety:
9
+ * - Read-only on SQLite (never modifies memory.db)
10
+ * - Creates a NEW .rvf file (never overwrites existing)
11
+ * - Batch ingestion (500 vectors at a time) for memory efficiency
12
+ *
13
+ * @module learning/rvf-pattern-migration
14
+ */
15
+ import type { RvfNativeAdapter } from '../integrations/ruvector/rvf-native-adapter.js';
16
+ import type { SQLitePatternStore } from './sqlite-persistence.js';
17
+ export interface MigrationResult {
18
+ /** Total patterns successfully migrated */
19
+ totalMigrated: number;
20
+ /** Patterns skipped (no embedding or dimension mismatch) */
21
+ totalSkipped: number;
22
+ /** Errors encountered during ingestion */
23
+ errors: string[];
24
+ /** Migration duration in milliseconds */
25
+ durationMs: number;
26
+ /** Path to the created .rvf file */
27
+ rvfPath: string;
28
+ }
29
+ export interface MigrationOptions {
30
+ /** Batch size for ingestion (default: 500) */
31
+ batchSize?: number;
32
+ /** Expected embedding dimension (default: 384) */
33
+ dimension?: number;
34
+ /** Log progress every N patterns (default: 1000) */
35
+ progressInterval?: number;
36
+ }
37
+ /**
38
+ * Migrate pattern embeddings from SQLite to an RVF file.
39
+ *
40
+ * This function is read-only on SQLite. It reads all embeddings from
41
+ * the qe_pattern_embeddings table and ingests them into the provided
42
+ * RVF adapter in batches.
43
+ *
44
+ * @param sqliteStore - Initialized SQLitePatternStore to read from
45
+ * @param rvfAdapter - Initialized RvfNativeAdapter to write to
46
+ * @param options - Migration options (batch size, dimension)
47
+ * @returns Migration result with counts and timing
48
+ */
49
+ export declare function migratePatterns(sqliteStore: SQLitePatternStore, rvfAdapter: RvfNativeAdapter, options?: MigrationOptions): MigrationResult;
50
+ //# sourceMappingURL=rvf-pattern-migration.d.ts.map
@@ -0,0 +1,106 @@
1
+ /**
2
+ * SQLite → RVF Pattern Migration Utility (ADR-066)
3
+ *
4
+ * Reads pattern embeddings from the SQLite qe_patterns/qe_pattern_embeddings
5
+ * tables and ingests them into an RVF file. This is a one-time migration
6
+ * that creates the .rvf file for the RvfPatternStore.
7
+ *
8
+ * Safety:
9
+ * - Read-only on SQLite (never modifies memory.db)
10
+ * - Creates a NEW .rvf file (never overwrites existing)
11
+ * - Batch ingestion (500 vectors at a time) for memory efficiency
12
+ *
13
+ * @module learning/rvf-pattern-migration
14
+ */
15
+ // ============================================================================
16
+ // Migration Function
17
+ // ============================================================================
18
+ /**
19
+ * Migrate pattern embeddings from SQLite to an RVF file.
20
+ *
21
+ * This function is read-only on SQLite. It reads all embeddings from
22
+ * the qe_pattern_embeddings table and ingests them into the provided
23
+ * RVF adapter in batches.
24
+ *
25
+ * @param sqliteStore - Initialized SQLitePatternStore to read from
26
+ * @param rvfAdapter - Initialized RvfNativeAdapter to write to
27
+ * @param options - Migration options (batch size, dimension)
28
+ * @returns Migration result with counts and timing
29
+ */
30
+ export function migratePatterns(sqliteStore, rvfAdapter, options = {}) {
31
+ const startTime = performance.now();
32
+ const batchSize = options.batchSize ?? 500;
33
+ const dimension = options.dimension ?? 384;
34
+ const progressInterval = options.progressInterval ?? 1000;
35
+ const result = {
36
+ totalMigrated: 0,
37
+ totalSkipped: 0,
38
+ errors: [],
39
+ durationMs: 0,
40
+ rvfPath: rvfAdapter.path(),
41
+ };
42
+ // Read all embeddings from SQLite
43
+ let allEmbeddings;
44
+ try {
45
+ allEmbeddings = sqliteStore.getAllEmbeddings();
46
+ }
47
+ catch (error) {
48
+ result.errors.push(`Failed to read embeddings from SQLite: ${error}`);
49
+ result.durationMs = performance.now() - startTime;
50
+ return result;
51
+ }
52
+ console.log(`[RVF Migration] Found ${allEmbeddings.length} embeddings to migrate (dim=${dimension})`);
53
+ // Process in batches
54
+ let batch = [];
55
+ for (let i = 0; i < allEmbeddings.length; i++) {
56
+ const { patternId, embedding } = allEmbeddings[i];
57
+ // Skip if dimension doesn't match
58
+ if (embedding.length !== dimension) {
59
+ result.totalSkipped++;
60
+ continue;
61
+ }
62
+ batch.push({
63
+ id: patternId,
64
+ vector: new Float32Array(embedding),
65
+ });
66
+ // Flush batch when full
67
+ if (batch.length >= batchSize) {
68
+ const batchResult = flushBatch(rvfAdapter, batch, result);
69
+ if (!batchResult)
70
+ break; // Fatal error
71
+ batch = [];
72
+ }
73
+ // Progress logging
74
+ if ((i + 1) % progressInterval === 0) {
75
+ console.log(`[RVF Migration] Progress: ${i + 1}/${allEmbeddings.length} ` +
76
+ `(migrated: ${result.totalMigrated}, skipped: ${result.totalSkipped})`);
77
+ }
78
+ }
79
+ // Flush remaining
80
+ if (batch.length > 0) {
81
+ flushBatch(rvfAdapter, batch, result);
82
+ }
83
+ result.durationMs = performance.now() - startTime;
84
+ console.log(`[RVF Migration] Complete: ${result.totalMigrated} migrated, ` +
85
+ `${result.totalSkipped} skipped, ${result.errors.length} errors ` +
86
+ `in ${result.durationMs.toFixed(0)}ms`);
87
+ return result;
88
+ }
89
+ // ============================================================================
90
+ // Helpers
91
+ // ============================================================================
92
+ function flushBatch(adapter, batch, result) {
93
+ try {
94
+ const ingestResult = adapter.ingest(batch);
95
+ result.totalMigrated += ingestResult.accepted;
96
+ if (ingestResult.rejected > 0) {
97
+ result.errors.push(`Batch rejected ${ingestResult.rejected} of ${batch.length} vectors`);
98
+ }
99
+ return true;
100
+ }
101
+ catch (error) {
102
+ result.errors.push(`Batch ingest failed: ${error}`);
103
+ return false;
104
+ }
105
+ }
106
+ //# sourceMappingURL=rvf-pattern-migration.js.map