agentic-qe 3.15.15 → 3.15.17

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 (526) hide show
  1. package/.claude/skills/skills-manifest.json +1 -1
  2. package/CHANGELOG.md +168 -0
  3. package/assets/skills/skills-manifest.json +1 -1
  4. package/dist/audit/witness-chain.d.ts +7 -0
  5. package/dist/audit/witness-chain.js +10 -0
  6. package/dist/cli/bundle.js +6 -6
  7. package/dist/cli/chunks/adapter-OMILP6KH.js +2 -0
  8. package/dist/cli/chunks/{agent-booster-wasm-EUF4XVUC.js → agent-booster-wasm-6BUOFQZA.js} +2 -2
  9. package/dist/cli/chunks/{agent-handler-MOX6PSIQ.js → agent-handler-HPDK3JI3.js} +2 -2
  10. package/dist/cli/chunks/{agent-memory-branch-AEXKIGDG.js → agent-memory-branch-5QKUTWK5.js} +2 -2
  11. package/dist/cli/chunks/aqe-learning-engine-OXH5CCOS.js +2 -0
  12. package/dist/cli/chunks/{arena-IQ5ZZDRF.js → arena-7OKPMNHD.js} +2 -2
  13. package/dist/cli/chunks/{arena-M7GA3CVG.js → arena-HZ35LESR.js} +4 -4
  14. package/dist/cli/chunks/{audit-4IPBMKWB.js → audit-XI575SVK.js} +3 -3
  15. package/dist/cli/chunks/base-MAK2BLTG.js +2 -0
  16. package/dist/cli/chunks/{better-sqlite3-IKDKJ2IE.js → better-sqlite3-YO5X7ZJS.js} +2 -2
  17. package/dist/cli/chunks/{brain-handler-5NQUDH4W.js → brain-handler-GCQZFZGQ.js} +3 -3
  18. package/dist/cli/chunks/{branch-enumerator-KSXELWRC.js → branch-enumerator-N6G44UU2.js} +2 -2
  19. package/dist/cli/chunks/{browser-6LACARWE.js → browser-EVKPTLOI.js} +2 -2
  20. package/dist/cli/chunks/browser-workflow-IR3VF2TL.js +2 -0
  21. package/dist/cli/chunks/{chunk-DKX4GNRU.js → chunk-2EQK7B5L.js} +2 -2
  22. package/dist/cli/chunks/chunk-2PCEMDIX.js +757 -0
  23. package/dist/cli/chunks/{chunk-JCQGJGGZ.js → chunk-2UUZCQSD.js} +7 -7
  24. package/dist/cli/chunks/chunk-2YWYW7NU.js +21 -0
  25. package/dist/cli/chunks/{chunk-PFQCV6YS.js → chunk-45223KK6.js} +6 -6
  26. package/dist/cli/chunks/chunk-4EJLHNER.js +12 -0
  27. package/dist/cli/chunks/{chunk-E5G4WZ2T.js → chunk-4L6WX5KC.js} +1 -1
  28. package/dist/cli/chunks/{chunk-UQPA33UK.js → chunk-4NKZU2JZ.js} +2 -2
  29. package/dist/cli/chunks/{chunk-OBDONJQM.js → chunk-4UKTIQDT.js} +2 -2
  30. package/dist/cli/chunks/{chunk-7BLZHFKD.js → chunk-4YM45Z5B.js} +1 -1
  31. package/dist/cli/chunks/{chunk-ZWBGYJ7K.js → chunk-5FSPELOG.js} +2 -2
  32. package/dist/cli/chunks/{chunk-NWIIYHT6.js → chunk-5WATBVU6.js} +2 -2
  33. package/dist/cli/chunks/{chunk-7ACCBHRB.js → chunk-5WYZVSL2.js} +1 -1
  34. package/dist/cli/chunks/{chunk-ZYJB6FML.js → chunk-6LSZCEW2.js} +1 -1
  35. package/dist/cli/chunks/{chunk-U62OUXBF.js → chunk-6V6BD6PH.js} +1 -1
  36. package/dist/cli/chunks/{chunk-MIA447GY.js → chunk-74MDUIAZ.js} +1 -1
  37. package/dist/cli/chunks/{chunk-AJPROCDW.js → chunk-776K4ZLE.js} +2 -2
  38. package/dist/cli/chunks/{chunk-CBK5CT6T.js → chunk-7BSOO3CY.js} +2 -2
  39. package/dist/cli/chunks/{chunk-ERN56H6S.js → chunk-7SNSI4VY.js} +1 -1
  40. package/dist/cli/chunks/{chunk-JKJOB65O.js → chunk-A4BVDYIL.js} +1 -1
  41. package/dist/cli/chunks/{chunk-MV55NXTD.js → chunk-AGCS5GSO.js} +2 -2
  42. package/dist/cli/chunks/{chunk-XIVVTYM2.js → chunk-AVHYJ3XP.js} +2 -2
  43. package/dist/cli/chunks/{chunk-KJBPB7P5.js → chunk-BE7ZHM34.js} +2 -2
  44. package/dist/cli/chunks/{chunk-GKSMRBHU.js → chunk-BHQ2DLJU.js} +1 -1
  45. package/dist/cli/chunks/{chunk-7XB3FCKM.js → chunk-BKHEQIRZ.js} +2 -2
  46. package/dist/cli/chunks/{chunk-G242G224.js → chunk-BSIWI4ES.js} +2 -2
  47. package/dist/cli/chunks/{chunk-NQS3BWS6.js → chunk-C7QLLMYI.js} +1 -1
  48. package/dist/cli/chunks/{chunk-XWIAZG3C.js → chunk-CMN7PU2H.js} +2 -2
  49. package/dist/cli/chunks/{chunk-4X3SWKBA.js → chunk-COTQ44YO.js} +2 -2
  50. package/dist/cli/chunks/{chunk-3J3RNJNX.js → chunk-CQER6IJ5.js} +1 -1
  51. package/dist/cli/chunks/{chunk-6KCSKGVY.js → chunk-CVPXHDQU.js} +1 -1
  52. package/dist/cli/chunks/{chunk-R6LHJ7ME.js → chunk-CVYPMGUM.js} +2 -2
  53. package/dist/cli/chunks/chunk-CXCMATZ6.js +3 -0
  54. package/dist/cli/chunks/{chunk-PYPS65P7.js → chunk-D75GLKEL.js} +2 -2
  55. package/dist/cli/chunks/chunk-DCDSN67A.js +2 -0
  56. package/dist/cli/chunks/{chunk-6RBTS3NF.js → chunk-DHKSPOUQ.js} +2 -2
  57. package/dist/cli/chunks/{chunk-JW74KRBC.js → chunk-DJDVD6RM.js} +2 -2
  58. package/dist/cli/chunks/{chunk-X33CWRDF.js → chunk-DNVRTJKB.js} +2 -2
  59. package/dist/cli/chunks/{chunk-BQ47GQPK.js → chunk-DS5IFRY6.js} +2 -2
  60. package/dist/cli/chunks/{chunk-AHMWD6JG.js → chunk-E7XIMOKW.js} +2 -2
  61. package/dist/cli/chunks/{chunk-SON6ZRH3.js → chunk-ECKHDHR2.js} +2 -2
  62. package/dist/cli/chunks/chunk-EPVPXHL7.js +2 -0
  63. package/dist/cli/chunks/{chunk-BP5T3OEV.js → chunk-ERYADKMZ.js} +4 -4
  64. package/dist/cli/chunks/{chunk-DUKE27HC.js → chunk-EUWG2JG4.js} +2 -2
  65. package/dist/cli/chunks/chunk-FAQ24UHB.js +29 -0
  66. package/dist/cli/chunks/{chunk-XG4F4XH4.js → chunk-FBBPRVNF.js} +2 -2
  67. package/dist/cli/chunks/{chunk-5PTAFGJT.js → chunk-FBSBXCZS.js} +2 -2
  68. package/dist/cli/chunks/chunk-G2X3OLMN.js +153 -0
  69. package/dist/cli/chunks/{chunk-IXL5ZHWJ.js → chunk-GG7PMTHD.js} +1 -1
  70. package/dist/cli/chunks/{chunk-6BRQPHMZ.js → chunk-GN6OE3JT.js} +1 -1
  71. package/dist/cli/chunks/{chunk-SZAZQZWI.js → chunk-GPPTRKEM.js} +2 -2
  72. package/dist/cli/chunks/{chunk-LTQVUAPH.js → chunk-H2LHWZRE.js} +2 -2
  73. package/dist/cli/chunks/{chunk-WVXJ2QIG.js → chunk-HAQJFUAQ.js} +2 -2
  74. package/dist/cli/chunks/{chunk-C5CXL3JP.js → chunk-HD6W6PHV.js} +2 -2
  75. package/dist/cli/chunks/{chunk-K3WZICFA.js → chunk-HFZD5KLR.js} +1 -1
  76. package/dist/cli/chunks/{chunk-VCXI4XC4.js → chunk-HRUHHHVR.js} +2 -2
  77. package/dist/cli/chunks/{chunk-GV2QE5TO.js → chunk-HVT7RMGV.js} +1 -1
  78. package/dist/cli/chunks/chunk-HWQPMUSN.js +2 -0
  79. package/dist/cli/chunks/{chunk-4ATQP3PR.js → chunk-HZ5O7G2P.js} +1 -1
  80. package/dist/cli/chunks/{chunk-XHHWABJV.js → chunk-IHQGNDMX.js} +2 -2
  81. package/dist/cli/chunks/{chunk-UUBIQR6A.js → chunk-IJSROBM6.js} +18 -18
  82. package/dist/cli/chunks/{chunk-PS6UMZVK.js → chunk-IJZFJPHS.js} +2 -2
  83. package/dist/cli/chunks/{chunk-C4KLXFJP.js → chunk-IKB3M7OF.js} +1 -1
  84. package/dist/cli/chunks/{chunk-SJCKCSN3.js → chunk-INI3Q4CN.js} +1 -1
  85. package/dist/cli/chunks/{chunk-LYJHUNBK.js → chunk-IOWEBPXJ.js} +2 -2
  86. package/dist/cli/chunks/{chunk-HTZSRMHW.js → chunk-IQL6XRF5.js} +2 -2
  87. package/dist/cli/chunks/{chunk-DEKR3CTS.js → chunk-IRHXGCQR.js} +2 -2
  88. package/dist/cli/chunks/{chunk-TODNOP7C.js → chunk-J3QFJI2Y.js} +6 -6
  89. package/dist/cli/chunks/{chunk-OLZH5LRT.js → chunk-J6QRNQJF.js} +11 -11
  90. package/dist/cli/chunks/{chunk-HL2ANKN3.js → chunk-J7Q5TXFZ.js} +2 -2
  91. package/dist/cli/chunks/{chunk-6YVMX2TC.js → chunk-JHKKIJT2.js} +2 -2
  92. package/dist/cli/chunks/{chunk-K3XBQC3R.js → chunk-JI33PMPZ.js} +1 -1
  93. package/dist/cli/chunks/{chunk-74YG72NQ.js → chunk-JRIJM4LE.js} +3 -3
  94. package/dist/cli/chunks/{chunk-TDQWTSBS.js → chunk-JVWZAE2H.js} +2 -2
  95. package/dist/cli/chunks/{chunk-RDMRY7CT.js → chunk-K7WAI662.js} +1 -1
  96. package/dist/cli/chunks/{chunk-C4RTAVC6.js → chunk-KB34MTFZ.js} +2 -2
  97. package/dist/cli/chunks/{chunk-2CKERSMB.js → chunk-KPIPVSIP.js} +2 -2
  98. package/dist/cli/chunks/{chunk-LNX74WHQ.js → chunk-KR2TAAF6.js} +1 -1
  99. package/dist/cli/chunks/{chunk-73PBAWAF.js → chunk-KT2QCXO6.js} +2 -2
  100. package/dist/cli/chunks/{chunk-BBRROA3Z.js → chunk-KTORRIX3.js} +2 -2
  101. package/dist/cli/chunks/{chunk-GCHYOPRZ.js → chunk-LCWEQRZI.js} +2 -2
  102. package/dist/cli/chunks/{chunk-M4WMSCAE.js → chunk-LG5PPJT7.js} +1 -1
  103. package/dist/cli/chunks/{chunk-UAQZI6N4.js → chunk-LIF6UWHV.js} +2 -2
  104. package/dist/cli/chunks/chunk-LN7NKE3N.js +27 -0
  105. package/dist/cli/chunks/chunk-LOLSZG5J.js +2 -0
  106. package/dist/cli/chunks/{chunk-BLL2XU7A.js → chunk-LOMT4UC2.js} +2 -2
  107. package/dist/cli/chunks/chunk-LRKLATSH.js +2 -0
  108. package/dist/cli/chunks/{chunk-EKP2SC77.js → chunk-LRY6UIRI.js} +2 -2
  109. package/dist/cli/chunks/{chunk-JCZCJE6X.js → chunk-LV7UIK4Q.js} +2 -2
  110. package/dist/cli/chunks/{chunk-LVABQNRF.js → chunk-M2YI5YUR.js} +2 -2
  111. package/dist/cli/chunks/{chunk-RIRZHOS2.js → chunk-MCXW3DKE.js} +2 -2
  112. package/dist/cli/chunks/{chunk-ZSOMUTNL.js → chunk-MGZ6XZHU.js} +1 -1
  113. package/dist/cli/chunks/{chunk-H5DER3JY.js → chunk-MLMD3I75.js} +1 -1
  114. package/dist/cli/chunks/{chunk-UXIY4IAI.js → chunk-MVVVGQJ6.js} +2 -2
  115. package/dist/cli/chunks/{chunk-WUOOX7UG.js → chunk-ND72UDVH.js} +2 -2
  116. package/dist/cli/chunks/{chunk-AKZO6GGG.js → chunk-NE3LRUNC.js} +4 -4
  117. package/dist/cli/chunks/{chunk-O6EWL5DQ.js → chunk-NKUHMA4T.js} +2 -2
  118. package/dist/cli/chunks/{chunk-L32JNNKL.js → chunk-NQFDJ6BT.js} +1 -1
  119. package/dist/cli/chunks/{chunk-T66PPF4D.js → chunk-NZJVDOUN.js} +31 -31
  120. package/dist/cli/chunks/{chunk-EBTNMQSS.js → chunk-O7VJ3VKD.js} +2 -2
  121. package/dist/cli/chunks/{chunk-76P32JVU.js → chunk-OJIUIEI4.js} +1 -1
  122. package/dist/cli/chunks/chunk-OO2M2QUV.js +12 -0
  123. package/dist/cli/chunks/{chunk-CAOUV5GZ.js → chunk-ORQ2YBRR.js} +2 -2
  124. package/dist/cli/chunks/chunk-OWIQR6N2.js +4 -0
  125. package/dist/cli/chunks/chunk-OWIZBZLN.js +14 -0
  126. package/dist/cli/chunks/{chunk-J3FP5UGL.js → chunk-P3D7SEHW.js} +1 -1
  127. package/dist/cli/chunks/{chunk-3CYNZFKH.js → chunk-P4OB6WDJ.js} +1 -1
  128. package/dist/cli/chunks/{chunk-LHMQIZ6B.js → chunk-PCL5JRKN.js} +2 -2
  129. package/dist/cli/chunks/{chunk-KLTMOXIK.js → chunk-PIWGKGWP.js} +2 -2
  130. package/dist/cli/chunks/{chunk-VMAM46HQ.js → chunk-PK34KJH7.js} +2 -2
  131. package/dist/cli/chunks/chunk-POPSZDI2.js +65 -0
  132. package/dist/cli/chunks/{chunk-JUDUBQHA.js → chunk-Q6F3DYZN.js} +2 -2
  133. package/dist/cli/chunks/{chunk-Y2OX6KGN.js → chunk-QJSSUBO3.js} +2 -2
  134. package/dist/cli/chunks/{chunk-XM6ZVFM5.js → chunk-QN7HP2UW.js} +235 -173
  135. package/dist/cli/chunks/{chunk-T4GE7MPI.js → chunk-QSQNXBD2.js} +2 -2
  136. package/dist/cli/chunks/{chunk-5C62XMJR.js → chunk-QTQDX4TZ.js} +33 -33
  137. package/dist/cli/chunks/{chunk-DURD37JZ.js → chunk-R3KBOQ3O.js} +2 -2
  138. package/dist/cli/chunks/{chunk-LJMYRTJ7.js → chunk-REY52O7J.js} +1 -1
  139. package/dist/cli/chunks/{chunk-W5ZJG2OU.js → chunk-RKCN4B26.js} +2 -2
  140. package/dist/cli/chunks/chunk-S3DT5TPR.js +14 -0
  141. package/dist/cli/chunks/{chunk-4HKAD25N.js → chunk-S3TBOKAZ.js} +22 -22
  142. package/dist/cli/chunks/{chunk-2IIXCEMS.js → chunk-SAEECT23.js} +2 -2
  143. package/dist/cli/chunks/{chunk-LB2LGEDP.js → chunk-SAZ4PJBR.js} +2 -2
  144. package/dist/cli/chunks/{chunk-FOOW4JVS.js → chunk-SFITYZLV.js} +2 -2
  145. package/dist/cli/chunks/{chunk-2ZFLULL4.js → chunk-SRBCBVSI.js} +2 -2
  146. package/dist/cli/chunks/chunk-SUAZ5Z47.js +63 -0
  147. package/dist/cli/chunks/{chunk-RBKUU7WF.js → chunk-TDZ6N43D.js} +2 -2
  148. package/dist/cli/chunks/chunk-TIVKDIF7.js +2 -0
  149. package/dist/cli/chunks/{chunk-MPFPWJTH.js → chunk-TM75GAXG.js} +2 -2
  150. package/dist/cli/chunks/{chunk-UJABDXST.js → chunk-TWBZONKT.js} +2 -2
  151. package/dist/cli/chunks/{chunk-AOKKUB5F.js → chunk-U4S74IIZ.js} +1 -1
  152. package/dist/cli/chunks/{chunk-W62OOK7A.js → chunk-U5SMBJ6F.js} +2 -2
  153. package/dist/cli/chunks/{chunk-6LE362LZ.js → chunk-UHJVZEQA.js} +2 -2
  154. package/dist/cli/chunks/{chunk-T67R2MUN.js → chunk-UOVCTK5L.js} +2 -2
  155. package/dist/cli/chunks/{chunk-FTRSS64D.js → chunk-VDEKVIP5.js} +2 -2
  156. package/dist/cli/chunks/{chunk-BDKEAGQ2.js → chunk-VITV7AEC.js} +2 -2
  157. package/dist/cli/chunks/{chunk-BU4UQR36.js → chunk-VKREKVFI.js} +2 -2
  158. package/dist/cli/chunks/{chunk-BZULJMGH.js → chunk-VLTDW7XJ.js} +2 -2
  159. package/dist/cli/chunks/{chunk-UE2J6MA5.js → chunk-VQFV2IPV.js} +1 -1
  160. package/dist/cli/chunks/{chunk-TZIHDJZD.js → chunk-VYPVU3JF.js} +2 -2
  161. package/dist/cli/chunks/{chunk-UORB2QDU.js → chunk-WAOEQA3W.js} +2 -2
  162. package/dist/cli/chunks/{chunk-GQABPCQE.js → chunk-WBDWHHKP.js} +2 -2
  163. package/dist/cli/chunks/{chunk-GGQGCT4Y.js → chunk-WX4PO65Q.js} +2 -2
  164. package/dist/cli/chunks/chunk-X2DWHGCC.js +6 -0
  165. package/dist/cli/chunks/{chunk-337Z52QM.js → chunk-X5QD76IU.js} +2 -2
  166. package/dist/cli/chunks/{chunk-E56PVVWC.js → chunk-XBTGEYED.js} +2 -2
  167. package/dist/cli/chunks/{chunk-5AFVEWMT.js → chunk-XEMCHGAJ.js} +2 -2
  168. package/dist/cli/chunks/{chunk-E3MRDIZF.js → chunk-XEYFZLIT.js} +1 -1
  169. package/dist/cli/chunks/{chunk-KCQNFBBR.js → chunk-XFTX3KLE.js} +1 -1
  170. package/dist/cli/chunks/{chunk-QFGYH6HD.js → chunk-XPTCQKVE.js} +1 -1
  171. package/dist/cli/chunks/{chunk-PXATBHWN.js → chunk-YAJOBZE5.js} +2 -2
  172. package/dist/cli/chunks/{chunk-27HE2BHC.js → chunk-YCVLKU6H.js} +2 -2
  173. package/dist/cli/chunks/{chunk-ZIPAB5J6.js → chunk-YD2C6EPN.js} +2 -2
  174. package/dist/cli/chunks/{chunk-5G4UFTV4.js → chunk-YKRLUTK7.js} +2 -2
  175. package/dist/cli/chunks/{chunk-YUS6TWAL.js → chunk-YMUY3TES.js} +6 -6
  176. package/dist/cli/chunks/chunk-YR5QBUHZ.js +6 -0
  177. package/dist/cli/chunks/{chunk-XH4JMX5O.js → chunk-Z7SKUC6P.js} +1 -1
  178. package/dist/cli/chunks/{chunk-EFUJDMNC.js → chunk-ZAQMRFBB.js} +2 -2
  179. package/dist/cli/chunks/{chunk-22UKJGGN.js → chunk-ZC3KDNJW.js} +3 -3
  180. package/dist/cli/chunks/{chunk-AP2W7Z3A.js → chunk-ZGV7L4MW.js} +1 -1
  181. package/dist/cli/chunks/{chunk-W27AJ5B4.js → chunk-ZN35XSKF.js} +2 -2
  182. package/dist/cli/chunks/{chunk-M4CJCPCQ.js → chunk-ZNXM6WVL.js} +2 -2
  183. package/dist/cli/chunks/{chunk-5I7357KS.js → chunk-ZP5AWQRO.js} +2 -2
  184. package/dist/cli/chunks/{chunk-OQG3UQQ7.js → chunk-ZTP3DQ5M.js} +1 -1
  185. package/dist/cli/chunks/{chunk-BFQTLF5X.js → chunk-ZVMSSCTH.js} +2 -2
  186. package/dist/cli/chunks/chunk-ZWUF27P4.js +2 -0
  187. package/dist/cli/chunks/{ci-UCUJOSBW.js → ci-3RTTTS2D.js} +2 -2
  188. package/dist/cli/chunks/{ci-config-2XILD3XG.js → ci-config-XRUR3I4K.js} +2 -2
  189. package/dist/cli/chunks/{ci-output-BL6KWOHW.js → ci-output-E5IAMU2U.js} +2 -2
  190. package/dist/cli/chunks/{circuit-breaker-5XLIOXE5.js → circuit-breaker-SHR2P44P.js} +2 -2
  191. package/dist/cli/chunks/{claude-flow-setup-4IMP6ACS.js → claude-flow-setup-ZDDILFMF.js} +2 -2
  192. package/dist/cli/chunks/client-NO5FOWT4.js +2 -0
  193. package/dist/cli/chunks/{cline-installer-RYLHCDK7.js → cline-installer-BGYVUM6G.js} +2 -2
  194. package/dist/cli/chunks/{code-WY3GJXHX.js → code-PJ4MC3MC.js} +4 -3
  195. package/dist/cli/chunks/{code-index-extractor-Y4MZBZCW.js → code-index-extractor-IW2P22YG.js} +2 -2
  196. package/dist/cli/chunks/{codex-installer-SCJ3T3DX.js → codex-installer-A7WZ6OGL.js} +2 -2
  197. package/dist/cli/chunks/{completions-CN2DXQFU.js → completions-KS23WD5J.js} +2 -2
  198. package/dist/cli/chunks/{complexity-analyzer-7MDPPIBH.js → complexity-analyzer-Q7GLSR2E.js} +2 -2
  199. package/dist/cli/chunks/{continuedev-installer-GCEJRK34.js → continuedev-installer-SK55BFW2.js} +2 -2
  200. package/dist/cli/chunks/copilot-installer-3N5J3WTM.js +3 -0
  201. package/dist/cli/chunks/core-handlers-JNAZPXE2.js +2 -0
  202. package/dist/cli/chunks/{cost-tracker-VO5MFWR6.js → cost-tracker-NENVSO4A.js} +2 -2
  203. package/dist/cli/chunks/{coverage-LYFQYNH6.js → coverage-5L7UQWDH.js} +3 -3
  204. package/dist/cli/chunks/cross-domain-router-HEBM767Z.js +2 -0
  205. package/dist/cli/chunks/{cursor-installer-KP4HA7TV.js → cursor-installer-XXBO2ZE6.js} +2 -2
  206. package/dist/cli/chunks/{daemon-7RC7TS57.js → daemon-CDCQU3LR.js} +3 -3
  207. package/dist/cli/chunks/daemon-JEBJGEUK.js +18 -0
  208. package/dist/cli/chunks/{dag-attention-scheduler-NKA44RSR.js → dag-attention-scheduler-HOMMF7FA.js} +2 -2
  209. package/dist/cli/chunks/{detect-CMYAJWYF.js → detect-FXCOUG6X.js} +2 -2
  210. package/dist/cli/chunks/{dist-node-EN3PYEGW.js → dist-node-GXQ7FMTY.js} +2 -2
  211. package/dist/cli/chunks/{domain-handler-EXSZCX7A.js → domain-handler-TI3JBAPC.js} +2 -2
  212. package/dist/cli/chunks/{domain-plugins-HCQFSNL7.js → domain-plugins-R7LTUM32.js} +2 -2
  213. package/dist/cli/chunks/{domain-transfer-3LGSNTPO.js → domain-transfer-LBIAFHIQ.js} +2 -2
  214. package/dist/cli/chunks/dream-GQDCEJMS.js +2 -0
  215. package/dist/cli/chunks/embed-and-insert-pattern-33KLHDD5.js +3 -0
  216. package/dist/cli/chunks/embedding-space-HHLWTBF5.js +2 -0
  217. package/dist/cli/chunks/{eval-OQELIWJK.js → eval-KDOZMAXJ.js} +2 -2
  218. package/dist/cli/chunks/experience-capture-middleware-X45PECQN.js +40 -0
  219. package/dist/cli/chunks/{fast-paths-UV4NDEWM.js → fast-paths-462V6UUB.js} +2 -2
  220. package/dist/cli/chunks/{feature-flags-H7H33B6C.js → feature-flags-G66OT3AS.js} +2 -2
  221. package/dist/cli/chunks/{feature-flags-CKTYX67J.js → feature-flags-NIRQ4YDM.js} +2 -2
  222. package/dist/cli/chunks/file-discovery-33USPLB5.js +2 -0
  223. package/dist/cli/chunks/{fleet-ZJBCAKRG.js → fleet-PXWGB7CU.js} +3 -3
  224. package/dist/cli/chunks/{gnn-wrapper-RUE2QZRG.js → gnn-wrapper-7MUW3M5M.js} +2 -2
  225. package/dist/cli/chunks/{heartbeat-handler-XRV327M7.js → heartbeat-handler-5237PB35.js} +4 -4
  226. package/dist/cli/chunks/heartbeat-scheduler-LIXLC5IH.js +2 -0
  227. package/dist/cli/chunks/hnsw-adapter-62D5UH27.js +2 -0
  228. package/dist/cli/chunks/hnsw-index-GSGUMQQC.js +2 -0
  229. package/dist/cli/chunks/{hnsw-legacy-bridge-UJID6ZZ4.js → hnsw-legacy-bridge-OSQPW7JP.js} +2 -2
  230. package/dist/cli/chunks/{hnswlib-node-WS43R4AX.js → hnswlib-node-GX6WG2GB.js} +2 -2
  231. package/dist/cli/chunks/{hooks-YZNJKXAJ.js → hooks-GUWHL7VC.js} +23 -22
  232. package/dist/cli/chunks/hybrid-backend-FRWP4BOY.js +2 -0
  233. package/dist/cli/chunks/{hypergraph-engine-XQJSIMTS.js → hypergraph-engine-SRWLLCU3.js} +2 -2
  234. package/dist/cli/chunks/{hypergraph-handler-ZD2NYXMR.js → hypergraph-handler-AVOPRHHO.js} +3 -3
  235. package/dist/cli/chunks/impact-analyzer-7KF3AQXV.js +2 -0
  236. package/dist/cli/chunks/{init-guard-DSRUAVRT.js → init-guard-P4N6EVZS.js} +2 -2
  237. package/dist/cli/chunks/{init-handler-RJU5QMAP.js → init-handler-LRGWOJMD.js} +6 -6
  238. package/dist/cli/chunks/init-wizard-XWWAXY25.js +2 -0
  239. package/dist/cli/chunks/kernel-ZEJPNDBW.js +2 -0
  240. package/dist/cli/chunks/{kilocode-installer-BCPOCVMC.js → kilocode-installer-7R2EPOQ6.js} +2 -2
  241. package/dist/cli/chunks/{kiro-installer-GFCWCB2S.js → kiro-installer-QNM7DPOB.js} +2 -2
  242. package/dist/cli/chunks/knowledge-graph-RRZQS7KY.js +2 -0
  243. package/dist/cli/chunks/{learning-FZTD72CF.js → learning-7OIZBPXZ.js} +3 -3
  244. package/dist/cli/chunks/{llm-router-GJVKGRJL.js → llm-router-SIDXES23.js} +4 -4
  245. package/dist/cli/chunks/llm-router-service-3OSW67LC.js +2 -0
  246. package/dist/cli/chunks/{load-YKTPOYBE.js → load-EI2E2C3S.js} +2 -2
  247. package/dist/cli/chunks/load-test-7TRIH2WJ.js +2 -0
  248. package/dist/cli/chunks/{mcp-LT6R2IKS.js → mcp-IOE5WOCS.js} +2 -2
  249. package/dist/cli/chunks/{memory-4HKKOLRY.js → memory-DLYGJAP7.js} +5 -5
  250. package/dist/cli/chunks/memory-backend-G7ZW6Q2B.js +2 -0
  251. package/dist/cli/chunks/memory-handlers-TPF3KCO5.js +2 -0
  252. package/dist/cli/chunks/{multi-model-executor-2YPM2WTK.js → multi-model-executor-WHH4YCHM.js} +2 -2
  253. package/dist/cli/chunks/{opencode-installer-WBAJMH5K.js → opencode-installer-63FDZAMS.js} +2 -2
  254. package/dist/cli/chunks/{orchestrator-5W5WVMVJ.js → orchestrator-3LA776KK.js} +5 -5
  255. package/dist/cli/chunks/pattern-null-store-OU3ZC3NR.js +2 -0
  256. package/dist/cli/chunks/{pattern-usage-recorder-GXRMNPAZ.js → pattern-usage-recorder-NW54QUGI.js} +2 -2
  257. package/dist/cli/chunks/{pipeline-2NA4DRDA.js → pipeline-P3TYX6J6.js} +2 -2
  258. package/dist/cli/chunks/{platform-BGERNQ5V.js → platform-FNA2WLI6.js} +2 -2
  259. package/dist/cli/chunks/{plugin-L4EPVENR.js → plugin-NJS7BC2S.js} +2 -2
  260. package/dist/cli/chunks/{prime-radiant-advanced-wasm-RTQRTPTM.js → prime-radiant-advanced-wasm-NIAVL2OT.js} +2 -2
  261. package/dist/cli/chunks/project-root-GMOFJEKD.js +2 -0
  262. package/dist/cli/chunks/protocol-executor-AD345XRO.js +2 -0
  263. package/dist/cli/chunks/{protocol-handler-SYQXM6JK.js → protocol-handler-JU5C4JHY.js} +2 -2
  264. package/dist/cli/chunks/{prove-5O7GPJCU.js → prove-35VOSLYP.js} +2 -2
  265. package/dist/cli/chunks/qe-reasoning-bank-NLTP26RC.js +2 -0
  266. package/dist/cli/chunks/{quality-KIIDHGNF.js → quality-ET74X7HN.js} +2 -2
  267. package/dist/cli/chunks/{quality-gate-H65VECD3.js → quality-gate-FEDQISNB.js} +3 -3
  268. package/dist/cli/chunks/queen-coordinator-2TB4FWS6.js +2 -0
  269. package/dist/cli/chunks/real-embeddings-II6CXTCI.js +2 -0
  270. package/dist/cli/chunks/{ref-validation-CSBJOMZM.js → ref-validation-DTBPYCEB.js} +2 -2
  271. package/dist/cli/chunks/{roocode-installer-G7OVYXEN.js → roocode-installer-LYQEMR4J.js} +2 -2
  272. package/dist/cli/chunks/router-PLM3MWME.js +2 -0
  273. package/dist/cli/chunks/routing-feedback-I7VOX2HU.js +2 -0
  274. package/dist/cli/chunks/{routing-handler-ZNZPPI5Y.js → routing-handler-DJOJFPII.js} +2 -2
  275. package/dist/cli/chunks/{ruvector-commands-C6IG3OY3.js → ruvector-commands-VXYGJDPW.js} +2 -2
  276. package/dist/cli/chunks/rvf-dual-writer-GQZHFWO2.js +2 -0
  277. package/dist/cli/chunks/rvf-migration-adapter-3TVKBCAM.js +2 -0
  278. package/dist/cli/chunks/rvf-migration-coordinator-XUHKLMT6.js +2 -0
  279. package/dist/cli/chunks/rvf-native-adapter-5GUTYOWS.js +2 -0
  280. package/dist/cli/chunks/{rvf-store-integrity-3G6LFLT3.js → rvf-store-integrity-GA2ZYOEG.js} +2 -2
  281. package/dist/cli/chunks/safe-db-RZPQGLGQ.js +2 -0
  282. package/dist/cli/chunks/schedule-G7JMQDUX.js +2 -0
  283. package/dist/cli/chunks/scheduler-4SEGPCKD.js +2 -0
  284. package/dist/cli/chunks/{security-A3IMVLFM.js → security-MM6YOECX.js} +3 -3
  285. package/dist/cli/chunks/{shared-rvf-adapter-VHWQ6US5.js → shared-rvf-adapter-6AHPA3V5.js} +2 -2
  286. package/dist/cli/chunks/{shared-rvf-dual-writer-JB3QS7IG.js → shared-rvf-dual-writer-EYAVY2GZ.js} +2 -2
  287. package/dist/cli/chunks/sqlite-persistence-IVE4SQXR.js +2 -0
  288. package/dist/cli/chunks/{standalone-memory-DDNXCSBD.js → standalone-memory-A3PLB4CZ.js} +2 -2
  289. package/dist/cli/chunks/{status-handler-2HK7XPEK.js → status-handler-OSSFAP4Z.js} +2 -2
  290. package/dist/cli/chunks/{structural-health-DSJVLEPV.js → structural-health-PGY5XUNO.js} +2 -2
  291. package/dist/cli/chunks/{sync-NTUR53PI.js → sync-CWEHYGNN.js} +2 -2
  292. package/dist/cli/chunks/sync-PM6D7EQF.js +2 -0
  293. package/dist/cli/chunks/task-handler-LHMQ75W4.js +64 -0
  294. package/dist/cli/chunks/{task-handlers-VJR6EHRZ.js → task-handlers-S2TX5FTR.js} +4 -4
  295. package/dist/cli/chunks/test-4EGZZ6NJ.js +34 -0
  296. package/dist/cli/chunks/test-runner-process-72YACW6M.js +2 -0
  297. package/dist/cli/chunks/{test-scheduling-Q6QEEOS6.js → test-scheduling-YJQHH3XE.js} +3 -3
  298. package/dist/cli/chunks/token-bootstrap-DJNETMVW.js +2 -0
  299. package/dist/cli/chunks/{token-usage-YEEFWSSI.js → token-usage-WPNOJR6H.js} +2 -2
  300. package/dist/cli/chunks/{transformers-BZCHJJJT.js → transformers-4MRPXCPU.js} +2 -2
  301. package/dist/cli/chunks/tree-sitter-wasm-parser-UVWSDXFR.js +2 -0
  302. package/dist/cli/chunks/{types-4AOKZYOX.js → types-6P5FB4EB.js} +2 -2
  303. package/dist/cli/chunks/unified-memory-2VMGSGQL.js +2 -0
  304. package/dist/cli/chunks/unified-memory-hnsw-3KULVD3N.js +2 -0
  305. package/dist/cli/chunks/unified-persistence-QCSLU2SV.js +2 -0
  306. package/dist/cli/chunks/{upgrade-2MWW6BT2.js → upgrade-4ICTN63Y.js} +2 -2
  307. package/dist/cli/chunks/{validate-PAEV3GT5.js → validate-HQF5GZ7L.js} +2 -2
  308. package/dist/cli/chunks/{validate-swarm-ZIXACK5K.js → validate-swarm-45JYG7VW.js} +2 -2
  309. package/dist/cli/chunks/visual-security-ZYP2KPH7.js +2 -0
  310. package/dist/cli/chunks/{web-tree-sitter-VLTXZFAB.js → web-tree-sitter-UOTWZLNH.js} +2 -2
  311. package/dist/cli/chunks/{windsurf-installer-VELMLOZF.js → windsurf-installer-WDWSBXGN.js} +2 -2
  312. package/dist/cli/chunks/witness-chain-5QRT7EMX.js +2 -0
  313. package/dist/cli/chunks/witness-chain-DOYMNPC7.js +2 -0
  314. package/dist/cli/chunks/witness-chain-repair-CUF2AFQB.js +2 -0
  315. package/dist/cli/chunks/{witness-chain-verifier-MIDWD4JS.js → witness-chain-verifier-JB42X62J.js} +2 -2
  316. package/dist/cli/chunks/{witness-key-manager-OSVCWOB2.js → witness-key-manager-LXXO6L2G.js} +2 -2
  317. package/dist/cli/chunks/{workflow-MK7A7QCX.js → workflow-6ARK47NF.js} +4 -4
  318. package/dist/cli/chunks/workflow-orchestrator-RYDDWIXN.js +2 -0
  319. package/dist/cli/chunks/wrappers-CYQBOMPL.js +2 -0
  320. package/dist/cli/commands/code.js +4 -0
  321. package/dist/cli/commands/hooks-handlers/hooks-dream-learning.js +10 -2
  322. package/dist/cli/commands/test.js +26 -4
  323. package/dist/cli/handlers/task-handler.d.ts +5 -0
  324. package/dist/cli/handlers/task-handler.js +21 -1
  325. package/dist/cli/utils/task-result.d.ts +11 -0
  326. package/dist/cli/utils/task-result.js +39 -0
  327. package/dist/coordination/handlers/test-execution-handlers.js +137 -59
  328. package/dist/coordination/mincut/mincut-persistence.js +29 -25
  329. package/dist/domains/code-intelligence/coordinator.d.ts +4 -0
  330. package/dist/domains/code-intelligence/coordinator.js +46 -13
  331. package/dist/domains/code-intelligence/interfaces.d.ts +10 -1
  332. package/dist/domains/code-intelligence/services/semantic-analyzer.d.ts +37 -7
  333. package/dist/domains/code-intelligence/services/semantic-analyzer.js +135 -62
  334. package/dist/domains/code-intelligence/services/text-relevance.d.ts +32 -0
  335. package/dist/domains/code-intelligence/services/text-relevance.js +63 -0
  336. package/dist/domains/learning-optimization/services/learning-coordinator.js +1 -1
  337. package/dist/domains/quality-assessment/coordinator.js +2 -1
  338. package/dist/domains/test-execution/coordinator.d.ts +3 -1
  339. package/dist/domains/test-execution/coordinator.js +21 -7
  340. package/dist/domains/test-execution/interfaces.d.ts +17 -0
  341. package/dist/domains/test-execution/plugin.js +8 -2
  342. package/dist/domains/test-execution/services/flaky-detector.d.ts +9 -1
  343. package/dist/domains/test-execution/services/flaky-detector.js +26 -8
  344. package/dist/domains/test-execution/services/retry-handler.d.ts +9 -1
  345. package/dist/domains/test-execution/services/retry-handler.js +56 -12
  346. package/dist/domains/test-execution/services/runner-test-cases.d.ts +2 -0
  347. package/dist/domains/test-execution/services/runner-test-cases.js +7 -3
  348. package/dist/domains/test-execution/services/test-executor.d.ts +6 -1
  349. package/dist/domains/test-execution/services/test-executor.js +97 -14
  350. package/dist/domains/visual-accessibility/coordinator.d.ts +15 -7
  351. package/dist/domains/visual-accessibility/coordinator.js +15 -7
  352. package/dist/domains/visual-accessibility/interfaces.d.ts +27 -3
  353. package/dist/domains/visual-accessibility/services/accessibility-contrast.d.ts +39 -0
  354. package/dist/domains/visual-accessibility/services/accessibility-contrast.js +93 -0
  355. package/dist/domains/visual-accessibility/services/accessibility-tester-browser.d.ts +18 -3
  356. package/dist/domains/visual-accessibility/services/accessibility-tester-browser.js +50 -40
  357. package/dist/domains/visual-accessibility/services/accessibility-tester-checks.d.ts +27 -0
  358. package/dist/domains/visual-accessibility/services/accessibility-tester-checks.js +137 -0
  359. package/dist/domains/visual-accessibility/services/accessibility-tester.d.ts +5 -0
  360. package/dist/domains/visual-accessibility/services/accessibility-tester.js +43 -24
  361. package/dist/domains/visual-accessibility/services/browser-swarm-coordinator.d.ts +2 -3
  362. package/dist/domains/visual-accessibility/services/browser-swarm-coordinator.js +8 -14
  363. package/dist/feedback/coverage-learner.js +13 -9
  364. package/dist/feedback/test-outcome-tracker.js +13 -9
  365. package/dist/governance/witness-chain.d.ts +5 -0
  366. package/dist/governance/witness-chain.js +22 -6
  367. package/dist/init/copilot-installer.d.ts +6 -0
  368. package/dist/init/copilot-installer.js +37 -17
  369. package/dist/init/platform-config-generator.d.ts +10 -0
  370. package/dist/init/platform-config-generator.js +26 -1
  371. package/dist/integrations/agentic-flow/reasoning-bank/experience-replay.d.ts +22 -0
  372. package/dist/integrations/agentic-flow/reasoning-bank/experience-replay.js +115 -45
  373. package/dist/integrations/agentic-flow/reasoning-bank/pattern-evolution.d.ts +6 -0
  374. package/dist/integrations/agentic-flow/reasoning-bank/pattern-evolution.js +51 -33
  375. package/dist/integrations/agentic-flow/reasoning-bank/trajectory-tracker.js +17 -9
  376. package/dist/integrations/embeddings/cache/EmbeddingCache.d.ts +8 -0
  377. package/dist/integrations/embeddings/cache/EmbeddingCache.js +24 -10
  378. package/dist/integrations/ruvector/delta-tracker.d.ts +11 -0
  379. package/dist/integrations/ruvector/delta-tracker.js +16 -0
  380. package/dist/integrations/ruvector/sona-persistence.d.ts +10 -0
  381. package/dist/integrations/ruvector/sona-persistence.js +49 -24
  382. package/dist/kernel/unified-memory.d.ts +32 -0
  383. package/dist/kernel/unified-memory.js +76 -8
  384. package/dist/learning/aqe-learning-engine.js +1 -1
  385. package/dist/learning/embed-and-insert-pattern.js +4 -2
  386. package/dist/learning/embedder-endpoint-client.d.ts +76 -0
  387. package/dist/learning/embedder-endpoint-client.js +201 -13
  388. package/dist/learning/embedding-space-registry.d.ts +75 -0
  389. package/dist/learning/embedding-space-registry.js +142 -0
  390. package/dist/learning/embedding-space.d.ts +12 -0
  391. package/dist/learning/embedding-space.js +17 -0
  392. package/dist/learning/experience-capture-middleware.js +25 -13
  393. package/dist/learning/experience-capture.js +1 -1
  394. package/dist/learning/experience-consolidation.d.ts +18 -0
  395. package/dist/learning/experience-consolidation.js +55 -8
  396. package/dist/learning/experience-space-verification.d.ts +71 -0
  397. package/dist/learning/experience-space-verification.js +147 -0
  398. package/dist/learning/pattern-lifecycle.d.ts +40 -4
  399. package/dist/learning/pattern-lifecycle.js +153 -76
  400. package/dist/learning/pattern-null-store.d.ts +5 -0
  401. package/dist/learning/pattern-null-store.js +8 -0
  402. package/dist/learning/pattern-promotion.js +6 -3
  403. package/dist/learning/pattern-store.d.ts +6 -0
  404. package/dist/learning/pattern-store.js +19 -6
  405. package/dist/learning/qe-reasoning-bank.js +2 -2
  406. package/dist/learning/real-embeddings.d.ts +3 -0
  407. package/dist/learning/real-embeddings.js +52 -12
  408. package/dist/learning/real-qe-reasoning-bank.d.ts +5 -0
  409. package/dist/learning/real-qe-reasoning-bank.js +77 -47
  410. package/dist/learning/rvf-pattern-store.js +6 -2
  411. package/dist/learning/sqlite-persistence.d.ts +6 -0
  412. package/dist/learning/sqlite-persistence.js +10 -0
  413. package/dist/mcp/bundle.js +699 -619
  414. package/dist/mcp/entry.js +4 -0
  415. package/dist/mcp/handlers/domain-handler-configs.js +2 -0
  416. package/dist/mcp/handlers/trajectory-judge.js +1 -1
  417. package/dist/mcp/protocol-server.js +1 -0
  418. package/dist/mcp/tools/visual-accessibility/index.js +8 -2
  419. package/dist/mcp/types.d.ts +6 -0
  420. package/dist/optimization/session-cache.d.ts +17 -1
  421. package/dist/optimization/session-cache.js +40 -36
  422. package/dist/planning/goap-planner.d.ts +6 -0
  423. package/dist/planning/goap-planner.js +35 -19
  424. package/dist/planning/plan-executor.js +24 -15
  425. package/dist/routing/co-execution-repository.js +12 -9
  426. package/dist/routing/routing-feedback.d.ts +8 -0
  427. package/dist/routing/routing-feedback.js +46 -24
  428. package/dist/routing/routing-outcomes-migration.js +7 -2
  429. package/dist/shared/embeddings/index.d.ts +2 -2
  430. package/dist/shared/embeddings/index.js +1 -1
  431. package/dist/shared/embeddings/nomic-embedder.d.ts +8 -2
  432. package/dist/shared/embeddings/nomic-embedder.js +19 -11
  433. package/dist/shared/embeddings/ollama-client.d.ts +28 -2
  434. package/dist/shared/embeddings/ollama-client.js +84 -22
  435. package/dist/shared/embeddings/types.d.ts +15 -0
  436. package/dist/shared/embeddings/types.js +4 -0
  437. package/dist/shared/llm/spend-ledger.d.ts +9 -0
  438. package/dist/shared/llm/spend-ledger.js +64 -39
  439. package/dist/shared/pytest-junit-report.d.ts +93 -0
  440. package/dist/shared/pytest-junit-report.js +241 -0
  441. package/dist/shared/sqlite-lock-wait.d.ts +27 -0
  442. package/dist/shared/sqlite-lock-wait.js +37 -0
  443. package/dist/shared/sqlite-write-queue.d.ts +28 -0
  444. package/dist/shared/sqlite-write-queue.js +38 -0
  445. package/dist/shared/test-runner-project.d.ts +119 -0
  446. package/dist/shared/test-runner-project.js +301 -0
  447. package/dist/skills/security-visual-testing/index.d.ts +3 -1
  448. package/dist/skills/security-visual-testing/index.js +49 -35
  449. package/dist/skills/security-visual-testing/types.d.ts +19 -3
  450. package/dist/workers/workers/heartbeat-scheduler.js +5 -5
  451. package/dist/workers/workers/learning-consolidation.js +8 -7
  452. package/package.json +1 -1
  453. package/dist/cli/chunks/adapter-QU6INSKP.js +0 -2
  454. package/dist/cli/chunks/aqe-learning-engine-PAJPENJD.js +0 -2
  455. package/dist/cli/chunks/base-OTGSN6IC.js +0 -2
  456. package/dist/cli/chunks/browser-workflow-WLZGR6SB.js +0 -2
  457. package/dist/cli/chunks/chunk-2LUTPMBO.js +0 -21
  458. package/dist/cli/chunks/chunk-3HVFIITW.js +0 -2
  459. package/dist/cli/chunks/chunk-4D4CWP72.js +0 -2
  460. package/dist/cli/chunks/chunk-5KA5TVPR.js +0 -6
  461. package/dist/cli/chunks/chunk-6NBRMD25.js +0 -13
  462. package/dist/cli/chunks/chunk-7O45RQHF.js +0 -153
  463. package/dist/cli/chunks/chunk-EMSZVUYA.js +0 -29
  464. package/dist/cli/chunks/chunk-G6RDCCFV.js +0 -4
  465. package/dist/cli/chunks/chunk-HH4ED4F7.js +0 -744
  466. package/dist/cli/chunks/chunk-Q6I4SIUU.js +0 -65
  467. package/dist/cli/chunks/chunk-QGBGSQ2E.js +0 -14
  468. package/dist/cli/chunks/chunk-QRKTBSZT.js +0 -27
  469. package/dist/cli/chunks/chunk-SHRI7TKJ.js +0 -62
  470. package/dist/cli/chunks/chunk-TX2CHQD7.js +0 -2
  471. package/dist/cli/chunks/chunk-UGYM4U44.js +0 -2
  472. package/dist/cli/chunks/chunk-VY4U6DPO.js +0 -12
  473. package/dist/cli/chunks/chunk-WNTA4YKE.js +0 -14
  474. package/dist/cli/chunks/chunk-XHLYGXYE.js +0 -2
  475. package/dist/cli/chunks/client-KKRNPX4F.js +0 -2
  476. package/dist/cli/chunks/copilot-installer-BHPDSELY.js +0 -3
  477. package/dist/cli/chunks/core-handlers-47MPMED7.js +0 -2
  478. package/dist/cli/chunks/cross-domain-router-U6MBFHEC.js +0 -2
  479. package/dist/cli/chunks/daemon-AXLVPKVO.js +0 -18
  480. package/dist/cli/chunks/dream-76L6EEN7.js +0 -2
  481. package/dist/cli/chunks/embed-and-insert-pattern-B6MNHICW.js +0 -3
  482. package/dist/cli/chunks/experience-capture-middleware-SUFILYPW.js +0 -40
  483. package/dist/cli/chunks/file-discovery-VSFKZ3LJ.js +0 -2
  484. package/dist/cli/chunks/heartbeat-scheduler-NIK3KKEH.js +0 -2
  485. package/dist/cli/chunks/hnsw-adapter-WJG7LUJJ.js +0 -2
  486. package/dist/cli/chunks/hnsw-index-D6PRI5HC.js +0 -2
  487. package/dist/cli/chunks/hybrid-backend-RIUR3I7F.js +0 -2
  488. package/dist/cli/chunks/impact-analyzer-C36YYTJ5.js +0 -2
  489. package/dist/cli/chunks/init-wizard-JCKNGIGT.js +0 -2
  490. package/dist/cli/chunks/kernel-F7ILJTYD.js +0 -2
  491. package/dist/cli/chunks/knowledge-graph-VTXDBHB2.js +0 -2
  492. package/dist/cli/chunks/llm-router-service-TNOWQINA.js +0 -2
  493. package/dist/cli/chunks/load-test-FPVBK2EV.js +0 -2
  494. package/dist/cli/chunks/memory-backend-2QE7O67A.js +0 -2
  495. package/dist/cli/chunks/memory-handlers-X4CMVBXB.js +0 -2
  496. package/dist/cli/chunks/pattern-null-store-UI35ORHW.js +0 -2
  497. package/dist/cli/chunks/project-root-S7WDFTMU.js +0 -2
  498. package/dist/cli/chunks/protocol-executor-OPANXQVB.js +0 -2
  499. package/dist/cli/chunks/qe-reasoning-bank-3OTF4DYQ.js +0 -2
  500. package/dist/cli/chunks/queen-coordinator-WTYH4TAN.js +0 -2
  501. package/dist/cli/chunks/real-embeddings-DYIOLKQ3.js +0 -2
  502. package/dist/cli/chunks/router-DBBW4NC2.js +0 -2
  503. package/dist/cli/chunks/routing-feedback-W35QHCL4.js +0 -2
  504. package/dist/cli/chunks/rvf-dual-writer-X3NSL25Z.js +0 -2
  505. package/dist/cli/chunks/rvf-migration-adapter-TZR7GDOK.js +0 -2
  506. package/dist/cli/chunks/rvf-migration-coordinator-4ATTHGHD.js +0 -2
  507. package/dist/cli/chunks/rvf-native-adapter-HD25ZYV5.js +0 -2
  508. package/dist/cli/chunks/safe-db-ZS2QKANY.js +0 -2
  509. package/dist/cli/chunks/schedule-ZH6VNA32.js +0 -2
  510. package/dist/cli/chunks/scheduler-T6CD74B6.js +0 -2
  511. package/dist/cli/chunks/sqlite-persistence-47WU5EKZ.js +0 -2
  512. package/dist/cli/chunks/sync-3MUV6S5E.js +0 -2
  513. package/dist/cli/chunks/task-handler-74MZN2EO.js +0 -62
  514. package/dist/cli/chunks/test-O6FK3FVF.js +0 -34
  515. package/dist/cli/chunks/test-runner-process-2NPW3UDQ.js +0 -2
  516. package/dist/cli/chunks/token-bootstrap-TTRCECLP.js +0 -2
  517. package/dist/cli/chunks/tree-sitter-wasm-parser-RZAND65G.js +0 -2
  518. package/dist/cli/chunks/unified-memory-FZ5K2C7W.js +0 -2
  519. package/dist/cli/chunks/unified-memory-hnsw-VREWX56M.js +0 -2
  520. package/dist/cli/chunks/unified-persistence-YZGMKX6B.js +0 -2
  521. package/dist/cli/chunks/visual-security-GXGSFBVA.js +0 -2
  522. package/dist/cli/chunks/witness-chain-MRJKVCOW.js +0 -2
  523. package/dist/cli/chunks/witness-chain-WWHJKITG.js +0 -2
  524. package/dist/cli/chunks/witness-chain-repair-5SAXPETG.js +0 -2
  525. package/dist/cli/chunks/workflow-orchestrator-SG7DV72E.js +0 -2
  526. package/dist/cli/chunks/wrappers-5QFMCKXL.js +0 -2
@@ -245,6 +245,11 @@ export declare class WitnessChain {
245
245
  export interface IWitnessChainPersistence {
246
246
  /** Store a receipt in SQLite. Called after each appendWitness(). */
247
247
  insertReceipt(receipt: WitnessReceipt): void;
248
+ /**
249
+ * Store a receipt without blocking on a locked database (#1283). When
250
+ * present, appendWitness() uses it instead of insertReceipt().
251
+ */
252
+ insertReceiptWhenUnlocked?(receipt: WitnessReceipt): Promise<void>;
248
253
  /** Load all receipts from SQLite, ordered by chainIndex. */
249
254
  loadAllReceipts(): WitnessReceipt[];
250
255
  /** Get the total count of persisted receipts. */
@@ -18,6 +18,7 @@
18
18
  import { createHash, randomUUID } from 'crypto';
19
19
  import { LoggerFactory } from '../logging/index.js';
20
20
  import { getRuVectorFeatureFlags } from '../integrations/ruvector/feature-flags.js';
21
+ import { writeWhenUnlockedOn } from '../shared/sqlite-write-queue.js';
21
22
  const logger = LoggerFactory.create('witness-chain');
22
23
  // ============================================================================
23
24
  // SPRT Accumulator
@@ -387,14 +388,25 @@ export class PersistentWitnessChain extends WitnessChain {
387
388
  */
388
389
  appendWitness(decision) {
389
390
  const receipt = super.appendWitness(decision);
390
- try {
391
- this.persistence.insertReceipt(receipt);
392
- }
393
- catch (err) {
391
+ const warn = (err) => {
394
392
  logger.warn('Failed to persist witness receipt to SQLite', {
395
393
  chainIndex: receipt.chainIndex,
396
394
  error: err instanceof Error ? err.message : String(err),
397
395
  });
396
+ };
397
+ try {
398
+ // #1283: queue the insert when the backend can, so a locked memory.db
399
+ // does not freeze the MCP server's event loop. The receipt is already in
400
+ // the in-memory chain, which is what callers read.
401
+ if (this.persistence.insertReceiptWhenUnlocked) {
402
+ this.persistence.insertReceiptWhenUnlocked(receipt).catch(warn);
403
+ }
404
+ else {
405
+ this.persistence.insertReceipt(receipt);
406
+ }
407
+ }
408
+ catch (err) {
409
+ warn(err);
398
410
  }
399
411
  return receipt;
400
412
  }
@@ -440,9 +452,13 @@ export function createWitnessChainSQLitePersistence(db) {
440
452
  const countStmt = db.prepare(`
441
453
  SELECT COUNT(*) as cnt FROM witness_chain_receipts
442
454
  `);
455
+ const insertReceipt = (receipt) => {
456
+ insertStmt.run(receipt.id, receipt.chainIndex, receipt.timestamp, receipt.previousHash, receipt.hash, receipt.decision.type, receipt.decision.decision, JSON.stringify(receipt.decision.context), receipt.decision.evidence ?? null);
457
+ };
443
458
  return {
444
- insertReceipt(receipt) {
445
- insertStmt.run(receipt.id, receipt.chainIndex, receipt.timestamp, receipt.previousHash, receipt.hash, receipt.decision.type, receipt.decision.decision, JSON.stringify(receipt.decision.context), receipt.decision.evidence ?? null);
459
+ insertReceipt,
460
+ insertReceiptWhenUnlocked(receipt) {
461
+ return writeWhenUnlockedOn(db, () => insertReceipt(receipt));
446
462
  },
447
463
  loadAllReceipts() {
448
464
  const rows = loadAllStmt.all();
@@ -29,6 +29,12 @@ export declare class CopilotInstaller {
29
29
  private generator;
30
30
  constructor(options: CopilotInstallerOptions);
31
31
  install(): Promise<CopilotInstallResult>;
32
+ /**
33
+ * Replace AQE's server entry in an existing config, keeping everything else.
34
+ * Returns null when the file cannot be merged safely (e.g. JSONC comments,
35
+ * which VS Code accepts but JSON.parse does not) so the user's file is never
36
+ * clobbered wholesale.
37
+ */
32
38
  private mergeExistingConfig;
33
39
  }
34
40
  export declare function createCopilotInstaller(options: CopilotInstallerOptions): CopilotInstaller;
@@ -8,6 +8,7 @@
8
8
  import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'fs';
9
9
  import { join, dirname } from 'path';
10
10
  import { toErrorMessage } from '../shared/error-utils.js';
11
+ import { writeFileIfChanged } from './idempotent-write.js';
11
12
  import { createPlatformConfigGenerator, } from './platform-config-generator.js';
12
13
  // ============================================================================
13
14
  // Copilot Installer Class
@@ -37,20 +38,28 @@ export class CopilotInstaller {
37
38
  const mcpConfig = this.generator.generateMcpConfig('copilot', { memoryBackend: this.options.memoryBackend });
38
39
  const configPath = join(this.projectRoot, mcpConfig.path);
39
40
  result.configPath = configPath;
40
- if (!existsSync(configPath) || this.overwrite) {
41
+ // AQE's own server entry is refreshed on every init, independent of
42
+ // `overwrite` (#1269): its launch config is version-pinned, and a stale one
43
+ // leaves VS Code serving tool schemas cached from an older server. Other
44
+ // servers and top-level keys in the file are preserved.
45
+ if (!existsSync(configPath)) {
41
46
  const configDir = dirname(configPath);
42
47
  if (!existsSync(configDir)) {
43
48
  mkdirSync(configDir, { recursive: true });
44
49
  }
45
- // Merge with existing if present
46
- if (existsSync(configPath) && this.overwrite) {
47
- const merged = this.mergeExistingConfig(configPath, mcpConfig.content);
48
- writeFileSync(configPath, merged);
50
+ writeFileSync(configPath, mcpConfig.content);
51
+ result.mcpConfigured = true;
52
+ }
53
+ else {
54
+ const merged = this.mergeExistingConfig(configPath, mcpConfig.content);
55
+ if (merged === null) {
56
+ result.errors.push(`${configPath} is not plain JSON (comments?) and was left unchanged; ` +
57
+ `update its "agentic-qe" server entry by hand`);
49
58
  }
50
59
  else {
51
- writeFileSync(configPath, mcpConfig.content);
60
+ writeFileIfChanged(configPath, merged);
61
+ result.mcpConfigured = true;
52
62
  }
53
- result.mcpConfigured = true;
54
63
  }
55
64
  // Generate behavioral rules
56
65
  const rules = this.generator.generateBehavioralRules('copilot');
@@ -71,23 +80,34 @@ export class CopilotInstaller {
71
80
  }
72
81
  return result;
73
82
  }
83
+ /**
84
+ * Replace AQE's server entry in an existing config, keeping everything else.
85
+ * Returns null when the file cannot be merged safely (e.g. JSONC comments,
86
+ * which VS Code accepts but JSON.parse does not) so the user's file is never
87
+ * clobbered wholesale.
88
+ */
74
89
  mergeExistingConfig(configPath, newContent) {
90
+ let existing;
75
91
  try {
76
- const existing = JSON.parse(readFileSync(configPath, 'utf-8'));
77
- const incoming = JSON.parse(newContent);
78
- // Merge servers
79
- if (!existing.servers) {
80
- existing.servers = {};
81
- }
82
- Object.assign(existing.servers, incoming.servers);
83
- return JSON.stringify(existing, null, 2) + '\n';
92
+ existing = JSON.parse(readFileSync(configPath, 'utf-8'));
84
93
  }
85
94
  catch {
86
- // If existing config is invalid, overwrite
87
- return newContent;
95
+ return null;
88
96
  }
97
+ if (!isPlainObject(existing))
98
+ return null;
99
+ if (existing.servers === undefined)
100
+ existing.servers = {};
101
+ if (!isPlainObject(existing.servers))
102
+ return null;
103
+ const incoming = JSON.parse(newContent);
104
+ Object.assign(existing.servers, incoming.servers);
105
+ return JSON.stringify(existing, null, 2) + '\n';
89
106
  }
90
107
  }
108
+ function isPlainObject(value) {
109
+ return typeof value === 'object' && value !== null && !Array.isArray(value);
110
+ }
91
111
  // ============================================================================
92
112
  // Factory Function
93
113
  // ============================================================================
@@ -23,6 +23,16 @@ export interface GeneratedConfig {
23
23
  format: string;
24
24
  }
25
25
  export declare const PLATFORM_REGISTRY: Record<PlatformId, PlatformDefinition>;
26
+ /**
27
+ * Issue #1269: VS Code caches each MCP server's tool list keyed by a hash of its
28
+ * launch config (command/args/env) and only restarts the server when that hash
29
+ * changes. The `agentic-qe@latest` entry is identical across releases, so tool
30
+ * schemas cached from an older server (the pre-#1185 "array type must have items"
31
+ * ones) survived upgrades. Stamping the installing version into the Copilot
32
+ * entry's env changes the hash whenever `aqe init` runs after an upgrade, without
33
+ * pinning which server version npx launches. The server does not read it.
34
+ */
35
+ export declare function getCopilotInitVersionEnv(): Record<string, string>;
26
36
  export declare class PlatformConfigGenerator {
27
37
  /**
28
38
  * Get the platform definition for a given platform ID
@@ -4,6 +4,7 @@
4
4
  *
5
5
  * Supports: GitHub Copilot, Cursor, Cline, Kilo Code, Roo Code, OpenAI Codex, Windsurf, Continue.dev
6
6
  */
7
+ import { createRequire } from 'module';
7
8
  // ============================================================================
8
9
  // Platform Registry
9
10
  // ============================================================================
@@ -146,6 +147,29 @@ function getMcpServerEnv(dbFree) {
146
147
  ? { AQE_MEMORY_BACKEND: 'memory', AQE_V3_MODE: 'true' }
147
148
  : { AQE_MEMORY_PATH: '.agentic-qe/memory.db', AQE_V3_MODE: 'true' };
148
149
  }
150
+ /**
151
+ * Installed AQE version: the build-time define in the CLI/MCP bundles, otherwise
152
+ * package.json (tsc output and tests). Both src/init/ and dist/cli/ sit two levels
153
+ * below the package root.
154
+ */
155
+ function getInstalledAqeVersion() {
156
+ if (typeof __CLI_VERSION__ !== 'undefined')
157
+ return __CLI_VERSION__;
158
+ const pkg = createRequire(import.meta.url)('../../package.json');
159
+ return pkg.version;
160
+ }
161
+ /**
162
+ * Issue #1269: VS Code caches each MCP server's tool list keyed by a hash of its
163
+ * launch config (command/args/env) and only restarts the server when that hash
164
+ * changes. The `agentic-qe@latest` entry is identical across releases, so tool
165
+ * schemas cached from an older server (the pre-#1185 "array type must have items"
166
+ * ones) survived upgrades. Stamping the installing version into the Copilot
167
+ * entry's env changes the hash whenever `aqe init` runs after an upgrade, without
168
+ * pinning which server version npx launches. The server does not read it.
169
+ */
170
+ export function getCopilotInitVersionEnv() {
171
+ return { AQE_INIT_VERSION: getInstalledAqeVersion() };
172
+ }
149
173
  function getMcpServerEntry(withAutoApprove, dbFree) {
150
174
  const entry = {
151
175
  command: 'npx',
@@ -164,12 +188,13 @@ function getMcpServerEntry(withAutoApprove, dbFree) {
164
188
  function generateJsonConfig(platform, dbFree) {
165
189
  const serverEntry = getMcpServerEntry(platform.supportsAutoApprove, dbFree);
166
190
  if (platform.id === 'copilot') {
167
- // Copilot uses "servers" key with "type": "stdio"
191
+ // Copilot uses "servers" key with "type": "stdio"; env carries the init version stamp (#1269)
168
192
  const config = {
169
193
  [platform.configKey]: {
170
194
  'agentic-qe': {
171
195
  type: 'stdio',
172
196
  ...serverEntry,
197
+ env: { ...serverEntry.env, ...getCopilotInitVersionEnv() },
173
198
  },
174
199
  },
175
200
  };
@@ -41,6 +41,11 @@ export interface Experience {
41
41
  readonly avgTokenSavings: number;
42
42
  /** Embedding for similarity search */
43
43
  readonly embedding?: number[];
44
+ /**
45
+ * #1217: embedding-space identity (ADR-097 spaceId) the embedding was
46
+ * computed in. Only vectors from the active space are compared.
47
+ */
48
+ readonly embeddingSpaceId?: string;
44
49
  /** Creation timestamp */
45
50
  readonly createdAt: Date;
46
51
  /** Last applied timestamp */
@@ -135,6 +140,12 @@ export declare class ExperienceReplay {
135
140
  private idToExperienceId;
136
141
  private experienceIdToHnswId;
137
142
  private nextHnswId;
143
+ /**
144
+ * #1217: embedding space the HNSW index holds vectors of. The index only
145
+ * holds vectors of one space, so a similarity is never measured across
146
+ * spaces. Null until the embedder's space is known.
147
+ */
148
+ private indexSpaceId;
138
149
  private recentExperiences;
139
150
  private reservoirBuffer;
140
151
  private stats;
@@ -157,6 +168,10 @@ export declare class ExperienceReplay {
157
168
  /**
158
169
  * Load embeddings into HNSW index for O(log n) similarity search
159
170
  * Performance: 150x-12,500x faster than linear scan
171
+ *
172
+ * #1217: loads only vectors of the given embedding space, as the pattern
173
+ * banks do (ADR-097). Vectors of another space, or without provenance, are
174
+ * not comparable with a query embedded in this one.
160
175
  */
161
176
  private loadEmbeddingIndex;
162
177
  /**
@@ -245,6 +260,13 @@ export declare class ExperienceReplay {
245
260
  dispose(): Promise<void>;
246
261
  private ensureInitialized;
247
262
  private rowToExperience;
263
+ /**
264
+ * #1217: add a stored vector to the HNSW index. A vector of another
265
+ * embedding space re-binds the index to that space (the active one, since
266
+ * the vector was just computed): the rows of that space are reloaded,
267
+ * including this one.
268
+ */
269
+ private indexExperience;
248
270
  private floatArrayToBuffer;
249
271
  private bufferToFloatArray;
250
272
  }
@@ -14,8 +14,9 @@
14
14
  */
15
15
  import { v4 as uuidv4 } from 'uuid';
16
16
  import { getUnifiedMemory } from '../../../kernel/unified-memory.js';
17
- import { computeRealEmbedding, cosineSimilarity, } from '../../../learning/real-embeddings.js';
17
+ import { computeRealEmbedding, cosineSimilarity, getActiveEmbeddingSpaceIdentity, } from '../../../learning/real-embeddings.js';
18
18
  import { EmbedderRecovery, probeEmbedder } from '../../../learning/embedder-recovery.js';
19
+ import { verifyLegacyExperienceSpaces } from '../../../learning/experience-space-verification.js';
19
20
  import { CircularBuffer } from '../../../shared/utils/circular-buffer.js';
20
21
  import { HNSWEmbeddingIndex } from '../../embeddings/index/HNSWIndex.js';
21
22
  import { safeJsonParse } from '../../../shared/safe-json.js';
@@ -74,6 +75,12 @@ export class ExperienceReplay {
74
75
  idToExperienceId = new Map();
75
76
  experienceIdToHnswId = new Map();
76
77
  nextHnswId = 0;
78
+ /**
79
+ * #1217: embedding space the HNSW index holds vectors of. The index only
80
+ * holds vectors of one space, so a similarity is never measured across
81
+ * spaces. Null until the embedder's space is known.
82
+ */
83
+ indexSpaceId = null;
77
84
  // Recent experiences buffer
78
85
  recentExperiences;
79
86
  // Reservoir replay buffer (R10, ADR-087) — coherence-gated admission
@@ -130,7 +137,7 @@ export class ExperienceReplay {
130
137
  // Prepare statements
131
138
  this.prepareStatements();
132
139
  // Load embeddings into memory index
133
- await this.loadEmbeddingIndex();
140
+ await this.loadEmbeddingIndex(getActiveEmbeddingSpaceIdentity()?.spaceId ?? null);
134
141
  // Backfill missing embeddings on captured_experiences. Hook-side INSERT
135
142
  // paths (sources: cli-hook-post-command, patch-060-post-task, etc.)
136
143
  // bypass storeExperience() and never call computeRealEmbedding(),
@@ -149,7 +156,7 @@ export class ExperienceReplay {
149
156
  return;
150
157
  const updateStmt = this.db.prepare(`
151
158
  UPDATE captured_experiences
152
- SET embedding = ?, embedding_dimension = ?
159
+ SET embedding = ?, embedding_dimension = ?, embedding_space_id = ?
153
160
  WHERE id = ?
154
161
  `);
155
162
  let written = 0;
@@ -157,21 +164,15 @@ export class ExperienceReplay {
157
164
  // ADR-099: legacy rows may predate ingestion-time scrubbing
158
165
  const text = scrubReasoningBlocks(`${row.domain ?? ''}: ${row.task}`).slice(0, 512);
159
166
  const embedding = await computeRealEmbedding(text);
167
+ const spaceId = getActiveEmbeddingSpaceIdentity()?.spaceId;
168
+ // ADR-097: a vector without provenance would never be compared.
169
+ if (!spaceId)
170
+ break;
160
171
  const buf = Buffer.from(new Float32Array(embedding).buffer);
161
- updateStmt.run(buf, embedding.length, row.id);
172
+ // #1263: retried asynchronously, so a locked DB does not freeze the MCP server.
173
+ await this.unifiedMemory.writeWhenUnlocked(() => updateStmt.run(buf, embedding.length, spaceId, row.id));
162
174
  // Add to live HNSW so freshly-embedded rows are immediately searchable
163
- const hnswId = this.nextHnswId++;
164
- this.hnswIndex.addEmbedding({
165
- vector: embedding,
166
- dimension: 384,
167
- namespace: 'experiences',
168
- text: row.id,
169
- timestamp: Date.now(),
170
- quantization: 'none',
171
- metadata: {},
172
- }, hnswId);
173
- this.idToExperienceId.set(hnswId, row.id);
174
- this.experienceIdToHnswId.set(row.id, hnswId);
175
+ this.indexExperience(row.id, embedding, spaceId);
175
176
  written++;
176
177
  }
177
178
  console.log(`[ExperienceReplay] Backfilled ${written} captured_experiences embeddings`);
@@ -180,6 +181,30 @@ export class ExperienceReplay {
180
181
  console.warn('[ExperienceReplay] Embedding backfill failed:', err instanceof Error ? err.message : err);
181
182
  }
182
183
  })();
184
+ // #1217: vectors stored before embedding-space provenance existed are
185
+ // never compared. Attribute those the active embedder reproduces to its
186
+ // space; the vectors themselves are never rewritten. Same cap per boot.
187
+ void (async () => {
188
+ try {
189
+ if (!this.db)
190
+ return;
191
+ const result = await verifyLegacyExperienceSpaces(this.db, {
192
+ embed: (text) => computeRealEmbedding(text, this.config.embedding),
193
+ activeSpaceId: () => getActiveEmbeddingSpaceIdentity()?.spaceId,
194
+ write: (fn) => this.unifiedMemory.writeWhenUnlocked(fn),
195
+ });
196
+ if (result.checked === 0)
197
+ return;
198
+ if (result.stamped.length > 0 && result.spaceId) {
199
+ await this.loadEmbeddingIndex(result.spaceId);
200
+ }
201
+ console.log(`[ExperienceReplay] Checked ${result.checked} experience vectors without an embedding space: ` +
202
+ `${result.stamped.length} match the active embedder, ${result.left} left uncompared`);
203
+ }
204
+ catch (err) {
205
+ console.warn('[ExperienceReplay] Embedding-space check failed:', err instanceof Error ? err.message : err);
206
+ }
207
+ })();
183
208
  // Backfill missing embeddings on qe_trajectories. TrajectoryTracker.endTrajectory()
184
209
  // writes embedding=NULL with no follow-up worker; hook-side trajectory inserts
185
210
  // (cli-hook-post-task) also leave the column NULL. Without this, kNN over
@@ -206,7 +231,7 @@ export class ExperienceReplay {
206
231
  // ADR-099: legacy rows may predate ingestion-time scrubbing
207
232
  const text = scrubReasoningBlocks(`${row.domain ?? ''}: ${row.task}`).slice(0, 512);
208
233
  const embedding = await computeRealEmbedding(text);
209
- updateStmt.run(Buffer.from(new Float32Array(embedding).buffer), row.id);
234
+ await this.unifiedMemory.writeWhenUnlocked(() => updateStmt.run(Buffer.from(new Float32Array(embedding).buffer), row.id));
210
235
  written++;
211
236
  }
212
237
  console.log(`[ExperienceReplay] Backfilled ${written} qe_trajectories embeddings`);
@@ -254,6 +279,7 @@ export class ExperienceReplay {
254
279
  avg_token_savings REAL DEFAULT 0,
255
280
  embedding BLOB,
256
281
  embedding_dimension INTEGER,
282
+ embedding_space_id TEXT,
257
283
  tags TEXT,
258
284
  last_applied_at TEXT
259
285
  );
@@ -269,6 +295,8 @@ export class ExperienceReplay {
269
295
  ['avg_token_savings', 'REAL DEFAULT 0'],
270
296
  ['embedding', 'BLOB'],
271
297
  ['embedding_dimension', 'INTEGER'],
298
+ // #1217: embedding-space identity of the stored vector (ADR-097)
299
+ ['embedding_space_id', 'TEXT'],
272
300
  ['tags', 'TEXT'],
273
301
  ['last_applied_at', 'TEXT'],
274
302
  // Consolidation columns (experience-consolidation system)
@@ -320,8 +348,8 @@ export class ExperienceReplay {
320
348
  this.prepared.set('insertExperience', this.db.prepare(`
321
349
  INSERT INTO captured_experiences (
322
350
  id, task, agent, domain, success, quality, duration_ms,
323
- steps_json, routing_json, embedding, embedding_dimension, tags, source
324
- ) VALUES (?, ?, ?, ?, 1, ?, 0, ?, ?, ?, ?, ?, 'experience-replay')
351
+ steps_json, routing_json, embedding, embedding_dimension, embedding_space_id, tags, source
352
+ ) VALUES (?, ?, ?, ?, 1, ?, 0, ?, ?, ?, ?, ?, ?, 'experience-replay')
325
353
  `));
326
354
  this.prepared.set('getExperience', this.db.prepare(`
327
355
  SELECT * FROM captured_experiences WHERE id = ?
@@ -333,7 +361,8 @@ export class ExperienceReplay {
333
361
  SELECT * FROM captured_experiences WHERE consolidated_into IS NULL ORDER BY quality DESC LIMIT ?
334
362
  `));
335
363
  this.prepared.set('getAllEmbeddings', this.db.prepare(`
336
- SELECT id, embedding, embedding_dimension FROM captured_experiences WHERE embedding IS NOT NULL AND consolidated_into IS NULL
364
+ SELECT id, embedding, embedding_dimension FROM captured_experiences
365
+ WHERE embedding IS NOT NULL AND embedding_space_id = ? AND consolidated_into IS NULL
337
366
  `));
338
367
  this.prepared.set('updateApplication', this.db.prepare(`
339
368
  UPDATE captured_experiences SET
@@ -353,17 +382,22 @@ export class ExperienceReplay {
353
382
  /**
354
383
  * Load embeddings into HNSW index for O(log n) similarity search
355
384
  * Performance: 150x-12,500x faster than linear scan
385
+ *
386
+ * #1217: loads only vectors of the given embedding space, as the pattern
387
+ * banks do (ADR-097). Vectors of another space, or without provenance, are
388
+ * not comparable with a query embedded in this one.
356
389
  */
357
- async loadEmbeddingIndex() {
390
+ async loadEmbeddingIndex(spaceId) {
358
391
  const stmt = this.prepared.get('getAllEmbeddings');
359
392
  if (!stmt)
360
393
  return;
361
- const rows = stmt.all();
394
+ const rows = (spaceId ? stmt.all(spaceId) : []);
362
395
  // Clear existing mappings
363
396
  this.idToExperienceId.clear();
364
397
  this.experienceIdToHnswId.clear();
365
398
  this.hnswIndex.clearIndex('experiences');
366
399
  this.nextHnswId = 0;
400
+ this.indexSpaceId = spaceId;
367
401
  // Build HNSW index with all embeddings
368
402
  for (const row of rows) {
369
403
  if (row.embedding && row.embedding_dimension) {
@@ -413,6 +447,8 @@ export class ExperienceReplay {
413
447
  // Generate embedding for similarity search
414
448
  const embeddingText = `${task} ${strategy} ${keyActions.join(' ')}`;
415
449
  const embedding = (await this.embedOrNull(embeddingText)) ?? undefined;
450
+ // ADR-097: a vector is kept only with the space it was computed in.
451
+ const embeddingSpaceId = embedding ? getActiveEmbeddingSpaceIdentity()?.spaceId : undefined;
416
452
  const id = uuidv4();
417
453
  const domain = trajectory.domain || 'test-generation';
418
454
  const experience = {
@@ -426,7 +462,8 @@ export class ExperienceReplay {
426
462
  applicationCount: 0,
427
463
  successRate: 1.0,
428
464
  avgTokenSavings: 0,
429
- embedding,
465
+ embedding: embeddingSpaceId ? embedding : undefined,
466
+ embeddingSpaceId,
430
467
  createdAt: new Date(),
431
468
  originalMetrics: trajectory.metrics,
432
469
  tags,
@@ -434,27 +471,17 @@ export class ExperienceReplay {
434
471
  // Store in captured_experiences table
435
472
  const insertStmt = this.prepared.get('insertExperience');
436
473
  if (insertStmt) {
437
- const embeddingBuffer = embedding ? this.floatArrayToBuffer(embedding) : null;
438
- insertStmt.run(id, task, strategy, // agent column stores strategy
474
+ const embeddingBuffer = experience.embedding ? this.floatArrayToBuffer(experience.embedding) : null;
475
+ // Queued (#1274): runs when task completion events end a trajectory.
476
+ const run = () => insertStmt.run(id, task, strategy, // agent column stores strategy
439
477
  domain, trajectory.metrics.efficiencyScore, JSON.stringify(keyActions), // steps_json stores key actions
440
478
  JSON.stringify(trajectory.metrics), // routing_json stores original metrics
441
- embeddingBuffer, embedding?.length ?? null, JSON.stringify(tags));
479
+ embeddingBuffer, experience.embedding?.length ?? null, embeddingSpaceId ?? null, JSON.stringify(tags));
480
+ await (this.unifiedMemory ? this.unifiedMemory.writeWhenUnlocked(run) : run());
442
481
  }
443
482
  // Add to HNSW index for fast similarity search
444
- if (embedding) {
445
- const hnswId = this.nextHnswId++;
446
- const iEmbedding = {
447
- vector: embedding,
448
- dimension: 384,
449
- namespace: 'experiences',
450
- text: id, // Use ID as text identifier
451
- timestamp: Date.now(),
452
- quantization: 'none',
453
- metadata: {},
454
- };
455
- this.hnswIndex.addEmbedding(iEmbedding, hnswId);
456
- this.idToExperienceId.set(hnswId, id);
457
- this.experienceIdToHnswId.set(id, hnswId);
483
+ if (experience.embedding && embeddingSpaceId) {
484
+ this.indexExperience(id, experience.embedding, embeddingSpaceId);
458
485
  }
459
486
  // Add to recent buffer
460
487
  this.recentExperiences.push(experience);
@@ -515,7 +542,9 @@ export class ExperienceReplay {
515
542
  // #1022: without an embedding of the query nothing measures relevance, so
516
543
  // return no guidance rather than picks with a made-up similarity.
517
544
  const queryEmbedding = await this.embedOrNull(scrubReasoningBlocks(task));
518
- if (!queryEmbedding) {
545
+ // #1217: the query's embedding space; only vectors of it are compared.
546
+ const querySpaceId = getActiveEmbeddingSpaceIdentity()?.spaceId;
547
+ if (!queryEmbedding || !querySpaceId) {
519
548
  return null;
520
549
  }
521
550
  // Find similar experiences via HNSW
@@ -535,7 +564,11 @@ export class ExperienceReplay {
535
564
  // Skip if domain filter doesn't match
536
565
  if (domain && exp.domain !== domain)
537
566
  continue;
538
- if (!exp.embedding || exp.embedding.length !== queryEmbedding.length)
567
+ // #1217: a vector from another embedding space (even of the same
568
+ // dimension), or without provenance, has no comparable similarity.
569
+ if (!exp.embedding || exp.embeddingSpaceId !== querySpaceId)
570
+ continue;
571
+ if (exp.embedding.length !== queryEmbedding.length)
539
572
  continue;
540
573
  const similarity = cosineSimilarity(queryEmbedding, exp.embedding);
541
574
  if (similarity < this.config.similarityThreshold)
@@ -600,8 +633,9 @@ export class ExperienceReplay {
600
633
  async findSimilarExperiences(task, domain, limit) {
601
634
  this.ensureInitialized();
602
635
  const k = limit ?? this.config.topK;
603
- // Check if index is empty
604
- if (this.idToExperienceId.size === 0) {
636
+ // Check if index is empty (and bound to the active embedding space)
637
+ const knownSpaceId = getActiveEmbeddingSpaceIdentity()?.spaceId ?? null;
638
+ if (this.idToExperienceId.size === 0 && knownSpaceId !== null && knownSpaceId === this.indexSpaceId) {
605
639
  return [];
606
640
  }
607
641
  // Generate embedding for the task
@@ -611,6 +645,16 @@ export class ExperienceReplay {
611
645
  if (!taskEmbedding) {
612
646
  return [];
613
647
  }
648
+ // #1217: search only vectors of the query's embedding space.
649
+ const querySpaceId = getActiveEmbeddingSpaceIdentity()?.spaceId ?? null;
650
+ if (!querySpaceId)
651
+ return [];
652
+ if (querySpaceId !== this.indexSpaceId) {
653
+ await this.loadEmbeddingIndex(querySpaceId);
654
+ }
655
+ if (this.idToExperienceId.size === 0) {
656
+ return [];
657
+ }
614
658
  // Create query embedding for HNSW search
615
659
  const queryEmbedding = {
616
660
  vector: taskEmbedding,
@@ -722,7 +766,7 @@ export class ExperienceReplay {
722
766
  // Remove HNSW mappings for absorbed experiences
723
767
  if (result.merged > 0) {
724
768
  // Reload HNSW index to reflect consolidated state
725
- await this.loadEmbeddingIndex();
769
+ await this.loadEmbeddingIndex(this.indexSpaceId);
726
770
  }
727
771
  console.log(`[ExperienceReplay] Auto-consolidated ${domain}: ` +
728
772
  `${result.merged} merged, ${result.archived} archived`);
@@ -815,12 +859,38 @@ export class ExperienceReplay {
815
859
  embedding: row.embedding && row.embedding_dimension
816
860
  ? this.bufferToFloatArray(row.embedding, row.embedding_dimension)
817
861
  : undefined,
862
+ embeddingSpaceId: row.embedding_space_id ?? undefined,
818
863
  createdAt: new Date(row.started_at),
819
864
  lastAppliedAt: row.last_applied_at ? new Date(row.last_applied_at) : undefined,
820
865
  originalMetrics: safeJsonParse(row.routing_json || '{}'),
821
866
  tags: safeJsonParse(row.tags || '[]'),
822
867
  };
823
868
  }
869
+ /**
870
+ * #1217: add a stored vector to the HNSW index. A vector of another
871
+ * embedding space re-binds the index to that space (the active one, since
872
+ * the vector was just computed): the rows of that space are reloaded,
873
+ * including this one.
874
+ */
875
+ indexExperience(id, embedding, spaceId) {
876
+ if (spaceId !== this.indexSpaceId) {
877
+ void this.loadEmbeddingIndex(spaceId);
878
+ return;
879
+ }
880
+ const hnswId = this.nextHnswId++;
881
+ const iEmbedding = {
882
+ vector: embedding,
883
+ dimension: 384,
884
+ namespace: 'experiences',
885
+ text: id, // Use ID as text identifier
886
+ timestamp: Date.now(),
887
+ quantization: 'none',
888
+ metadata: {},
889
+ };
890
+ this.hnswIndex.addEmbedding(iEmbedding, hnswId);
891
+ this.idToExperienceId.set(hnswId, id);
892
+ this.experienceIdToHnswId.set(id, hnswId);
893
+ }
824
894
  floatArrayToBuffer(arr) {
825
895
  const buffer = Buffer.alloc(arr.length * 4);
826
896
  for (let i = 0; i < arr.length; i++) {
@@ -231,6 +231,12 @@ export declare class PatternEvolution {
231
231
  * Record an evolution event
232
232
  */
233
233
  private recordEvent;
234
+ /**
235
+ * Run a write through the shared connection's writeWhenUnlocked queue, so a
236
+ * locked memory.db does not freeze the MCP server's event loop while the
237
+ * hourly consolidation timer merges and prunes patterns (#1274).
238
+ */
239
+ private write;
234
240
  /**
235
241
  * Get statistics
236
242
  */