agentic-qe 3.14.0 → 3.14.2

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 (430) hide show
  1. package/.claude/helpers/brain-checkpoint.cjs +2 -1
  2. package/.claude/helpers/validate-v3-config.sh +6 -5
  3. package/.claude/hooks/aqe-hook.cjs +14 -14
  4. package/.claude/skills/qe-browser/evals/qe-browser.yaml +30 -41
  5. package/.claude/skills/qe-browser/fixtures/serve-skills.js +37 -0
  6. package/.claude/skills/qe-browser/scripts/lib/vibium.js +1 -1
  7. package/.claude/skills/qe-browser/scripts/smoke-test.sh +56 -25
  8. package/.claude/skills/qe-browser/scripts/visual-diff.js +24 -15
  9. package/.claude/skills/skills-manifest.json +1 -1
  10. package/CHANGELOG.md +114 -0
  11. package/assets/skills/qe-browser/evals/qe-browser.yaml +30 -41
  12. package/assets/skills/qe-browser/fixtures/serve-skills.js +37 -0
  13. package/assets/skills/qe-browser/scripts/lib/vibium.js +1 -1
  14. package/assets/skills/qe-browser/scripts/smoke-test.sh +56 -25
  15. package/assets/skills/qe-browser/scripts/visual-diff.js +24 -15
  16. package/assets/skills/skills-manifest.json +1 -1
  17. package/dist/cli/bundle.js +7 -7
  18. package/dist/cli/chunks/adapter-OJF6LAJV.js +2 -0
  19. package/dist/cli/chunks/{agent-booster-wasm-JZO6VUW4.js → agent-booster-wasm-SD5N32MX.js} +2 -2
  20. package/dist/cli/chunks/{agent-handler-534KFGEJ.js → agent-handler-OZRSJM7F.js} +2 -2
  21. package/dist/cli/chunks/{agent-memory-branch-B7KWLWY4.js → agent-memory-branch-NYTRANRN.js} +2 -2
  22. package/dist/cli/chunks/aqe-learning-engine-FGT474XB.js +2 -0
  23. package/dist/cli/chunks/{arena-OW5MELJX.js → arena-EX3SC2DP.js} +4 -4
  24. package/dist/cli/chunks/{arena-7CCD3S3I.js → arena-FOTVSRK4.js} +2 -2
  25. package/dist/cli/chunks/{audit-BHVKN4E2.js → audit-Q5GHSUQY.js} +3 -3
  26. package/dist/cli/chunks/base-HH765JFV.js +2 -0
  27. package/dist/cli/chunks/{better-sqlite3-P5FA6WFK.js → better-sqlite3-S7M5R2HS.js} +2 -2
  28. package/dist/cli/chunks/{brain-handler-WNW5LOV7.js → brain-handler-5FSA46R5.js} +3 -3
  29. package/dist/cli/chunks/{branch-enumerator-TVZ2ODKH.js → branch-enumerator-RWAXTGEU.js} +2 -2
  30. package/dist/cli/chunks/{browser-TCEB2W2F.js → browser-IGDESJGF.js} +2 -2
  31. package/dist/cli/chunks/browser-workflow-NPM4FUPI.js +2 -0
  32. package/dist/cli/chunks/{chunk-Q73RRTLE.js → chunk-2EHFEMRU.js} +2 -2
  33. package/dist/cli/chunks/{chunk-ZBOWR4XT.js → chunk-2H5YJ5ZK.js} +2 -2
  34. package/dist/cli/chunks/chunk-2LKAMMMI.js +2 -0
  35. package/dist/cli/chunks/{chunk-A2WZEMWT.js → chunk-2TG24LYQ.js} +1 -1
  36. package/dist/cli/chunks/{chunk-3QT6S3A3.js → chunk-3C2K4YMS.js} +3 -3
  37. package/dist/cli/chunks/{chunk-VESOYP6A.js → chunk-3DFFFXXO.js} +2 -2
  38. package/dist/cli/chunks/{chunk-K6CGQR5R.js → chunk-3WV4H33V.js} +1 -1
  39. package/dist/cli/chunks/{chunk-IL4AEB3J.js → chunk-42WUDDUU.js} +2 -2
  40. package/dist/cli/chunks/chunk-4AKGBUYD.js +4 -0
  41. package/dist/cli/chunks/{chunk-4FEJEVG7.js → chunk-4K27ESCA.js} +1 -1
  42. package/dist/cli/chunks/{chunk-TGOGCA74.js → chunk-4M6A3PVJ.js} +2 -2
  43. package/dist/cli/chunks/{chunk-RGVD6ZUX.js → chunk-4MH22236.js} +1 -1
  44. package/dist/cli/chunks/{chunk-6DPAMYLU.js → chunk-4N44UJGI.js} +2 -2
  45. package/dist/cli/chunks/{chunk-DJITEQYS.js → chunk-4PH7O5ZH.js} +2 -2
  46. package/dist/cli/chunks/{chunk-M3HUZD2I.js → chunk-4RT7I7PI.js} +1 -1
  47. package/dist/cli/chunks/chunk-4UCMTYFQ.js +65 -0
  48. package/dist/cli/chunks/{chunk-ZI3UO7QR.js → chunk-4ZUZDFAA.js} +2 -2
  49. package/dist/cli/chunks/{chunk-QSPRQPEL.js → chunk-57TNBR2P.js} +2 -2
  50. package/dist/cli/chunks/{chunk-ZCVJCCQQ.js → chunk-5EHLGOWW.js} +2 -2
  51. package/dist/cli/chunks/{chunk-ZAAYOENS.js → chunk-5WJUNRTY.js} +2 -2
  52. package/dist/cli/chunks/{chunk-QZPFUFZG.js → chunk-67A6PEZM.js} +2 -2
  53. package/dist/cli/chunks/{chunk-7BOPFN3Y.js → chunk-6EHN7Q2Q.js} +2 -2
  54. package/dist/cli/chunks/{chunk-2HYVOX6N.js → chunk-6F4WHN7D.js} +1 -1
  55. package/dist/cli/chunks/{chunk-GVEJP5T7.js → chunk-6LMLN5R2.js} +2 -2
  56. package/dist/cli/chunks/{chunk-QKQZ4IJF.js → chunk-6SZKLWZT.js} +5 -5
  57. package/dist/cli/chunks/{chunk-PEW6FZ47.js → chunk-6VKJAMZY.js} +1 -1
  58. package/dist/cli/chunks/{chunk-VYENTZ45.js → chunk-7AFBNU6K.js} +2 -2
  59. package/dist/cli/chunks/{chunk-6IJMD2ZL.js → chunk-7FWP7CZY.js} +3 -3
  60. package/dist/cli/chunks/{chunk-IE5LC7MB.js → chunk-7SK6IMGZ.js} +2 -2
  61. package/dist/cli/chunks/{chunk-3EM2MK3Z.js → chunk-A7N3YUDJ.js} +2 -2
  62. package/dist/cli/chunks/{chunk-J3XSHJGK.js → chunk-ADK7DF3G.js} +2 -2
  63. package/dist/cli/chunks/{chunk-EJ6IP7DE.js → chunk-ARMZYHYL.js} +2 -2
  64. package/dist/cli/chunks/{chunk-BZ4QVFP2.js → chunk-BWRHOIYC.js} +2 -2
  65. package/dist/cli/chunks/{chunk-A7SKM6JL.js → chunk-C7AXRI7E.js} +1 -1
  66. package/dist/cli/chunks/{chunk-4XTHRAUV.js → chunk-CG2MUD7U.js} +1 -1
  67. package/dist/cli/chunks/{chunk-HLNQDRHA.js → chunk-CH2TQCV5.js} +1 -1
  68. package/dist/cli/chunks/{chunk-JGROLJ33.js → chunk-CIESXO73.js} +1 -1
  69. package/dist/cli/chunks/{chunk-AR6SATU3.js → chunk-CJCT452S.js} +2 -2
  70. package/dist/cli/chunks/{chunk-UUJ5VQJM.js → chunk-CJHVOBJY.js} +1 -1
  71. package/dist/cli/chunks/{chunk-VOSISOFD.js → chunk-CTCQOYBS.js} +1 -1
  72. package/dist/cli/chunks/{chunk-XITTURP2.js → chunk-D4RCV4LY.js} +2 -2
  73. package/dist/cli/chunks/{chunk-5XGVSQS2.js → chunk-DRO5NJZA.js} +2 -2
  74. package/dist/cli/chunks/{chunk-QMMDN4WX.js → chunk-DVHWLAEO.js} +3 -3
  75. package/dist/cli/chunks/{chunk-5LEAGKX5.js → chunk-DW6ZMNMR.js} +2 -2
  76. package/dist/cli/chunks/{chunk-ZBKGX72B.js → chunk-E3Q7WNJD.js} +3 -3
  77. package/dist/cli/chunks/{chunk-5MZF4N4Q.js → chunk-EAJK25IS.js} +1 -1
  78. package/dist/cli/chunks/{chunk-3RYTAYR6.js → chunk-EH5OCHAJ.js} +1 -1
  79. package/dist/cli/chunks/{chunk-UI6WSPEK.js → chunk-F2KRT2II.js} +3 -3
  80. package/dist/cli/chunks/{chunk-NDPQ2WPU.js → chunk-FPHPP5TQ.js} +1 -1
  81. package/dist/cli/chunks/{chunk-WWWX76QB.js → chunk-FREF6Y4L.js} +2 -2
  82. package/dist/cli/chunks/{chunk-SROZXIMT.js → chunk-FVGTINVR.js} +54 -54
  83. package/dist/cli/chunks/{chunk-H3YDDKBW.js → chunk-G2CLZVYI.js} +3 -3
  84. package/dist/cli/chunks/{chunk-2O4DDPEA.js → chunk-G6AV2HGY.js} +3 -3
  85. package/dist/cli/chunks/{chunk-ENGKLFLY.js → chunk-GHQ5PUOV.js} +2 -2
  86. package/dist/cli/chunks/{chunk-NKWO2X3T.js → chunk-GHUPID5E.js} +1 -1
  87. package/dist/cli/chunks/{chunk-S5YVLPXU.js → chunk-GJAWEUIN.js} +2 -2
  88. package/dist/cli/chunks/{chunk-6IZQSLYZ.js → chunk-HBTC4L53.js} +2 -2
  89. package/dist/cli/chunks/{chunk-DDPJUAXQ.js → chunk-HSJ5FQCF.js} +2 -2
  90. package/dist/cli/chunks/{chunk-OONCRNFA.js → chunk-HZ6NEJMO.js} +2 -2
  91. package/dist/cli/chunks/{chunk-LCSVROU7.js → chunk-HZMLNM2T.js} +10 -10
  92. package/dist/cli/chunks/{chunk-JY4VZ6BN.js → chunk-ICKLBATY.js} +2 -2
  93. package/dist/cli/chunks/{chunk-JMKMDSXG.js → chunk-IUNMW454.js} +2 -2
  94. package/dist/cli/chunks/{chunk-XXFKN7LB.js → chunk-IVGVOGIZ.js} +1 -1
  95. package/dist/cli/chunks/{chunk-3GUO4ERR.js → chunk-IWFL6EFI.js} +2 -2
  96. package/dist/cli/chunks/{chunk-FRL3X2QA.js → chunk-JDXLCNKV.js} +2 -2
  97. package/dist/cli/chunks/{chunk-YW4RNZWT.js → chunk-JIUF6NV6.js} +2 -2
  98. package/dist/cli/chunks/{chunk-JAK5UUWH.js → chunk-JQ2ZD3WO.js} +2 -2
  99. package/dist/cli/chunks/{chunk-YEAC3DC6.js → chunk-K574FLVB.js} +2 -2
  100. package/dist/cli/chunks/{chunk-LZHTCUCO.js → chunk-KEEBUVGV.js} +2 -2
  101. package/dist/cli/chunks/{chunk-LKR7T3OZ.js → chunk-KFXZDQ5J.js} +1 -1
  102. package/dist/cli/chunks/{chunk-7OUMJCJT.js → chunk-KPFG4OIM.js} +1 -1
  103. package/dist/cli/chunks/{chunk-HQ7243G3.js → chunk-KZOBLLXW.js} +2 -2
  104. package/dist/cli/chunks/{chunk-R6WJF4D5.js → chunk-L2F7FVIU.js} +2 -2
  105. package/dist/cli/chunks/{chunk-VRRG66XB.js → chunk-LML5VTFK.js} +1 -1
  106. package/dist/cli/chunks/{chunk-JTWJR2KY.js → chunk-LWUJQGCS.js} +2 -2
  107. package/dist/cli/chunks/{chunk-BQCTO7UB.js → chunk-MH73D5TN.js} +2 -2
  108. package/dist/cli/chunks/{chunk-U4GZWPKM.js → chunk-MWQTACNA.js} +2 -2
  109. package/dist/cli/chunks/{chunk-CIZ6LSNV.js → chunk-N3RN4QTC.js} +2 -2
  110. package/dist/cli/chunks/{chunk-ZQSXG7FA.js → chunk-N5ZRUOMR.js} +2 -2
  111. package/dist/cli/chunks/{chunk-AFGT26NR.js → chunk-NAZVPZJS.js} +2 -2
  112. package/dist/cli/chunks/{chunk-FOHYBR3O.js → chunk-NG2UVPTW.js} +1 -1
  113. package/dist/cli/chunks/{chunk-2D7UBX5S.js → chunk-NHHWLJQF.js} +1 -1
  114. package/dist/cli/chunks/{chunk-JRKEBESE.js → chunk-NNOMDM4N.js} +2 -2
  115. package/dist/cli/chunks/{chunk-YKWMKRYB.js → chunk-NRR23SJV.js} +1 -1
  116. package/dist/cli/chunks/{chunk-WKNWRDA5.js → chunk-NWFIJNEB.js} +1 -1
  117. package/dist/cli/chunks/{chunk-4MK2G6TK.js → chunk-OBCKP3G4.js} +2 -2
  118. package/dist/cli/chunks/{chunk-YKZV7O65.js → chunk-OC2CKU7I.js} +2 -2
  119. package/dist/cli/chunks/{chunk-7RVAHJQZ.js → chunk-OX6T26CD.js} +3 -3
  120. package/dist/cli/chunks/chunk-P64DMQ2C.js +2 -0
  121. package/dist/cli/chunks/{chunk-RKUYVVGJ.js → chunk-PFXX5Q32.js} +2 -2
  122. package/dist/cli/chunks/chunk-PHHXHG2W.js +2 -0
  123. package/dist/cli/chunks/{chunk-N2YAUDAV.js → chunk-PMUBG2RU.js} +2 -2
  124. package/dist/cli/chunks/{chunk-WTHAVFIC.js → chunk-PVHO6KLB.js} +1 -1
  125. package/dist/cli/chunks/{chunk-MO7EITJK.js → chunk-PWEIDHT7.js} +2 -2
  126. package/dist/cli/chunks/{chunk-52DFCV57.js → chunk-PZKZY6PB.js} +2 -2
  127. package/dist/cli/chunks/{chunk-I3VHXA2W.js → chunk-Q335R4MR.js} +2 -2
  128. package/dist/cli/chunks/{chunk-ECTPFCON.js → chunk-Q3JHS3UD.js} +2 -2
  129. package/dist/cli/chunks/{chunk-HJIAVR6P.js → chunk-QFUX7ELG.js} +2 -2
  130. package/dist/cli/chunks/{chunk-L4C42WYI.js → chunk-QW4LN5NK.js} +2 -2
  131. package/dist/cli/chunks/{chunk-HQHLHSJO.js → chunk-QXTW7XCS.js} +2 -2
  132. package/dist/cli/chunks/{chunk-SSV6KSFT.js → chunk-R5RNOLHI.js} +1 -1
  133. package/dist/cli/chunks/{chunk-AVLA5PBJ.js → chunk-RCI64RIJ.js} +2 -2
  134. package/dist/cli/chunks/{chunk-T3BZAFLP.js → chunk-RFNEHNJV.js} +1 -1
  135. package/dist/cli/chunks/{chunk-IL6QRXRP.js → chunk-RGH3WGWD.js} +10 -10
  136. package/dist/cli/chunks/{chunk-E4NU4BJA.js → chunk-RHJVDCLV.js} +2 -2
  137. package/dist/cli/chunks/{chunk-KTSCZ7AW.js → chunk-RVCWSAXI.js} +2 -2
  138. package/dist/cli/chunks/{chunk-TQJE7DNL.js → chunk-RYJHREYS.js} +2 -2
  139. package/dist/cli/chunks/{chunk-HNKPLVYS.js → chunk-S4MR6RTE.js} +1 -1
  140. package/dist/cli/chunks/{chunk-6AYO3IR2.js → chunk-S7N4BKI3.js} +2 -2
  141. package/dist/cli/chunks/{chunk-2NO4H35K.js → chunk-SEHCX4NH.js} +1 -1
  142. package/dist/cli/chunks/{chunk-GKNDP5VK.js → chunk-T46LOLW3.js} +2 -2
  143. package/dist/cli/chunks/{chunk-VXU53F7Z.js → chunk-T4C56HBW.js} +2 -2
  144. package/dist/cli/chunks/{chunk-43GPSYAL.js → chunk-TENYL5TI.js} +2 -2
  145. package/dist/cli/chunks/{chunk-6AOZU3UN.js → chunk-TLPL3EQY.js} +2 -2
  146. package/dist/cli/chunks/{chunk-4ZVGSVHV.js → chunk-TYVQNYXX.js} +4 -4
  147. package/dist/cli/chunks/{chunk-NOPVFBQM.js → chunk-U2AY57XZ.js} +2 -2
  148. package/dist/cli/chunks/{chunk-IQLRA4FV.js → chunk-U54OOA24.js} +1 -1
  149. package/dist/cli/chunks/{chunk-IQ3JFHZN.js → chunk-UHTAI4ZB.js} +1 -1
  150. package/dist/cli/chunks/{chunk-KDIZQHG5.js → chunk-UIGEUEBT.js} +2 -2
  151. package/dist/cli/chunks/{chunk-5VDVYTO5.js → chunk-UYTWDS2R.js} +2 -2
  152. package/dist/cli/chunks/{chunk-ZNSMVQCG.js → chunk-VNAKBHJI.js} +2 -2
  153. package/dist/cli/chunks/{chunk-SUSMHSXT.js → chunk-VOYJJ3KA.js} +2 -2
  154. package/dist/cli/chunks/{chunk-QQCENKCX.js → chunk-VSYBMNIR.js} +1 -1
  155. package/dist/cli/chunks/{chunk-7RAB2BZY.js → chunk-W2FLULF4.js} +2 -2
  156. package/dist/cli/chunks/{chunk-NYARYONH.js → chunk-W4OQYLYO.js} +1 -1
  157. package/dist/cli/chunks/{chunk-DOWCOZDO.js → chunk-WBH4C4BG.js} +2 -2
  158. package/dist/cli/chunks/{chunk-OIYUSWHX.js → chunk-WBMRADQP.js} +1 -1
  159. package/dist/cli/chunks/{chunk-B3H4K7CY.js → chunk-WMW47QMR.js} +2 -2
  160. package/dist/cli/chunks/{chunk-VPVZHJSU.js → chunk-WVY22NHZ.js} +2 -2
  161. package/dist/cli/chunks/{chunk-6W42XWLL.js → chunk-WXMSRBQF.js} +2 -2
  162. package/dist/cli/chunks/{chunk-CIUOC5F3.js → chunk-XPLSLHRB.js} +1 -1
  163. package/dist/cli/chunks/{chunk-E722WNWC.js → chunk-YF5OP6CR.js} +2 -2
  164. package/dist/cli/chunks/{chunk-H76TV4UU.js → chunk-YN6W2XIT.js} +3 -3
  165. package/dist/cli/chunks/{chunk-FF43SRP6.js → chunk-ZCDXJ27H.js} +1 -1
  166. package/dist/cli/chunks/{chunk-TKYEP7OR.js → chunk-ZFGND4QK.js} +1 -1
  167. package/dist/cli/chunks/{chunk-O2MZZL54.js → chunk-ZWRQ5VAU.js} +2 -2
  168. package/dist/cli/chunks/{chunk-H6NFDOMK.js → chunk-ZYLSOBOR.js} +1 -1
  169. package/dist/cli/chunks/{ci-B432UH6N.js → ci-NTRH7PAW.js} +2 -2
  170. package/dist/cli/chunks/{ci-output-GTHH7WYG.js → ci-output-F57RSD35.js} +2 -2
  171. package/dist/cli/chunks/{circuit-breaker-VW75DLME.js → circuit-breaker-4WST3QSA.js} +2 -2
  172. package/dist/cli/chunks/{claude-flow-setup-RE3IVT7U.js → claude-flow-setup-KB4TKMYI.js} +2 -2
  173. package/dist/cli/chunks/client-GPZEC54E.js +2 -0
  174. package/dist/cli/chunks/{cline-installer-NUBZZ55N.js → cline-installer-W2ZHQ6WM.js} +2 -2
  175. package/dist/cli/chunks/{code-K6JCWKNW.js → code-TF2AVR5D.js} +2 -2
  176. package/dist/cli/chunks/{code-index-extractor-I4ILB5JN.js → code-index-extractor-RMDRUVQJ.js} +2 -2
  177. package/dist/cli/chunks/codex-installer-VSTRHJHV.js +14 -0
  178. package/dist/cli/chunks/{completions-V3KJVJF4.js → completions-3Q37QVFR.js} +2 -2
  179. package/dist/cli/chunks/{complexity-analyzer-HRG7OOY3.js → complexity-analyzer-3FNFLACD.js} +2 -2
  180. package/dist/cli/chunks/{continuedev-installer-CNTDONWG.js → continuedev-installer-VTEXM455.js} +2 -2
  181. package/dist/cli/chunks/{copilot-installer-XPWWIWYA.js → copilot-installer-AGY7DQUS.js} +2 -2
  182. package/dist/cli/chunks/core-handlers-YMGHYIBR.js +2 -0
  183. package/dist/cli/chunks/{cost-tracker-MFNLQ56K.js → cost-tracker-LTZAQBX7.js} +2 -2
  184. package/dist/cli/chunks/{coverage-KOIK654V.js → coverage-TT64IOS4.js} +3 -3
  185. package/dist/cli/chunks/cross-domain-router-ECBNTGYJ.js +2 -0
  186. package/dist/cli/chunks/{cursor-installer-S5MKLRQQ.js → cursor-installer-OVOJIOHN.js} +2 -2
  187. package/dist/cli/chunks/{daemon-DUS6JYW6.js → daemon-DMFZMXKA.js} +8 -8
  188. package/dist/cli/chunks/{daemon-Z7VPGWHY.js → daemon-XCULEHWY.js} +4 -4
  189. package/dist/cli/chunks/{dag-attention-scheduler-7CQ3ARNI.js → dag-attention-scheduler-WW2RX4B5.js} +2 -2
  190. package/dist/cli/chunks/{detect-WORBCAYF.js → detect-QNWIM232.js} +2 -2
  191. package/dist/cli/chunks/{dist-node-KRNI6OYW.js → dist-node-6GQIY3CG.js} +2 -2
  192. package/dist/cli/chunks/{domain-handler-KRUR2VQG.js → domain-handler-6RJPDELX.js} +2 -2
  193. package/dist/cli/chunks/{domain-transfer-VEOVLV54.js → domain-transfer-WK524LBS.js} +2 -2
  194. package/dist/cli/chunks/dream-EHGKCFWH.js +2 -0
  195. package/dist/cli/chunks/{embed-and-insert-pattern-QU3NQVA5.js → embed-and-insert-pattern-SO6GWJW7.js} +2 -2
  196. package/dist/cli/chunks/{eval-AYQ7BSUP.js → eval-GL544IPO.js} +2 -2
  197. package/dist/cli/chunks/{experience-capture-middleware-AWQBL6LT.js → experience-capture-middleware-BCCJ35OX.js} +3 -3
  198. package/dist/cli/chunks/{fast-paths-V5EL4BYJ.js → fast-paths-CATDDBEU.js} +2 -2
  199. package/dist/cli/chunks/{feature-flags-P34BPRWU.js → feature-flags-BUXNAORY.js} +2 -2
  200. package/dist/cli/chunks/{feature-flags-BXX7BP22.js → feature-flags-KNNWWP5G.js} +2 -2
  201. package/dist/cli/chunks/{file-discovery-MS6BKQ2U.js → file-discovery-S4HF3O7D.js} +2 -2
  202. package/dist/cli/chunks/{fleet-7WVVPA4W.js → fleet-DQVQQONW.js} +3 -3
  203. package/dist/cli/chunks/{gnn-wrapper-7WQ3LEPG.js → gnn-wrapper-G7ABZUG7.js} +2 -2
  204. package/dist/cli/chunks/{heartbeat-handler-P7QD3BZH.js → heartbeat-handler-UFMELIWT.js} +4 -4
  205. package/dist/cli/chunks/heartbeat-scheduler-UFEL2CBW.js +2 -0
  206. package/dist/cli/chunks/hnsw-adapter-BLSD45CX.js +2 -0
  207. package/dist/cli/chunks/hnsw-index-A3RZODEN.js +2 -0
  208. package/dist/cli/chunks/{hnsw-legacy-bridge-Y3GAR3UP.js → hnsw-legacy-bridge-YIILSRXI.js} +2 -2
  209. package/dist/cli/chunks/{hnswlib-node-5QUXZQWQ.js → hnswlib-node-TSVRMXDH.js} +2 -2
  210. package/dist/cli/chunks/{hooks-2D64KPRY.js → hooks-OHQPNK74.js} +10 -10
  211. package/dist/cli/chunks/{hypergraph-engine-5INXEZDP.js → hypergraph-engine-LY7PJDSL.js} +2 -2
  212. package/dist/cli/chunks/{hypergraph-handler-YJJJ3ESZ.js → hypergraph-handler-YGDYZO6H.js} +3 -3
  213. package/dist/cli/chunks/impact-analyzer-OXHD3FOH.js +2 -0
  214. package/dist/cli/chunks/{init-handler-QSFYJN5Q.js → init-handler-MTK65LI3.js} +9 -8
  215. package/dist/cli/chunks/init-wizard-PKZL7QBU.js +2 -0
  216. package/dist/cli/chunks/kernel-XWPM72UJ.js +2 -0
  217. package/dist/cli/chunks/{kilocode-installer-3N3QGTJU.js → kilocode-installer-3IICU4RS.js} +2 -2
  218. package/dist/cli/chunks/{kiro-installer-GIWVTFZQ.js → kiro-installer-MXOVQYQA.js} +2 -2
  219. package/dist/cli/chunks/knowledge-graph-FRKR5XWI.js +2 -0
  220. package/dist/cli/chunks/{learning-SGO2DQ5Q.js → learning-EV5LSOOM.js} +3 -3
  221. package/dist/cli/chunks/{llm-router-HBBULO65.js → llm-router-7LYDJUOT.js} +4 -4
  222. package/dist/cli/chunks/llm-router-service-R7A5HHDM.js +2 -0
  223. package/dist/cli/chunks/{load-B5OFYB4H.js → load-F4PVAMXQ.js} +2 -2
  224. package/dist/cli/chunks/load-test-5IKDWSYL.js +2 -0
  225. package/dist/cli/chunks/{mcp-FG3LNQR4.js → mcp-DUYJUEME.js} +2 -2
  226. package/dist/cli/chunks/{memory-SPS7ZWLC.js → memory-XTTYORAS.js} +5 -5
  227. package/dist/cli/chunks/memory-backend-7VW5QCMO.js +2 -0
  228. package/dist/cli/chunks/{memory-handlers-P7FTPWP3.js → memory-handlers-VZH3R2TQ.js} +2 -2
  229. package/dist/cli/chunks/{multi-model-executor-PUB7E6KH.js → multi-model-executor-R6XCTMCF.js} +2 -2
  230. package/dist/cli/chunks/{opencode-installer-TGCSGVG2.js → opencode-installer-33ULBU2F.js} +2 -2
  231. package/dist/cli/chunks/{orchestrator-S5FTJFGB.js → orchestrator-34ZJEKTJ.js} +22 -21
  232. package/dist/cli/chunks/pattern-null-store-BU6LCB2W.js +2 -0
  233. package/dist/cli/chunks/{pattern-usage-recorder-LCXXGRAB.js → pattern-usage-recorder-GZ2M3F2E.js} +2 -2
  234. package/dist/cli/chunks/{pipeline-ENOSRHKW.js → pipeline-SR5OTY45.js} +2 -2
  235. package/dist/cli/chunks/platform-VKJFJIAW.js +2 -0
  236. package/dist/cli/chunks/{plugin-JZ5ODJSU.js → plugin-5C5UBQUQ.js} +2 -2
  237. package/dist/cli/chunks/{prime-radiant-advanced-wasm-DPJUPNCG.js → prime-radiant-advanced-wasm-KO2PQI3D.js} +2 -2
  238. package/dist/cli/chunks/protocol-executor-BSP5LWJN.js +2 -0
  239. package/dist/cli/chunks/{protocol-handler-IP4NLVY3.js → protocol-handler-ZF74NIKA.js} +2 -2
  240. package/dist/cli/chunks/{prove-P6FM4RU7.js → prove-MO5TQQU4.js} +2 -2
  241. package/dist/cli/chunks/qe-reasoning-bank-J2RC7P25.js +2 -0
  242. package/dist/cli/chunks/{quality-UHP4XO26.js → quality-EYIN6AER.js} +2 -2
  243. package/dist/cli/chunks/quality-gate-V6OQM57O.js +7 -0
  244. package/dist/cli/chunks/queen-coordinator-XI5AJV2V.js +2 -0
  245. package/dist/cli/chunks/{real-embeddings-6SO5MFRQ.js → real-embeddings-AR7TZX7U.js} +2 -2
  246. package/dist/cli/chunks/{roocode-installer-WTWUOFCH.js → roocode-installer-46E626VZ.js} +2 -2
  247. package/dist/cli/chunks/router-VXQYYA3D.js +2 -0
  248. package/dist/cli/chunks/routing-feedback-HZQTASFF.js +2 -0
  249. package/dist/cli/chunks/{routing-handler-IK7HYERQ.js → routing-handler-ZNRVW6QW.js} +2 -2
  250. package/dist/cli/chunks/{ruvector-commands-THLB4NIM.js → ruvector-commands-4L2CQMWS.js} +2 -2
  251. package/dist/cli/chunks/rvf-dual-writer-BDTLLJER.js +2 -0
  252. package/dist/cli/chunks/rvf-migration-adapter-IB343MDN.js +2 -0
  253. package/dist/cli/chunks/{rvf-migration-coordinator-BUKCSHBD.js → rvf-migration-coordinator-H4RVGBIA.js} +2 -2
  254. package/dist/cli/chunks/rvf-native-adapter-Y7SN7LHU.js +2 -0
  255. package/dist/cli/chunks/{rvf-store-integrity-ECTADZIN.js → rvf-store-integrity-OJGWWPLL.js} +2 -2
  256. package/dist/cli/chunks/safe-db-2VTKKBJU.js +2 -0
  257. package/dist/cli/chunks/schedule-QJ4CFGJY.js +2 -0
  258. package/dist/cli/chunks/scheduler-2NHDQPC3.js +2 -0
  259. package/dist/cli/chunks/{security-HN4UXFXX.js → security-JF3BVNRO.js} +3 -3
  260. package/dist/cli/chunks/{shared-rvf-adapter-XJCPX5SN.js → shared-rvf-adapter-M6NNIZ5W.js} +2 -2
  261. package/dist/cli/chunks/{shared-rvf-dual-writer-23X5PNY5.js → shared-rvf-dual-writer-LHMFCYVE.js} +2 -2
  262. package/dist/cli/chunks/sqlite-persistence-NVVAPZN3.js +2 -0
  263. package/dist/cli/chunks/{status-handler-ZXANTHKT.js → status-handler-GMIOXQIE.js} +2 -2
  264. package/dist/cli/chunks/{structural-health-LR6WI3AH.js → structural-health-YZXHVHM6.js} +2 -2
  265. package/dist/cli/chunks/{sync-I5IUJF33.js → sync-GMPCPV5L.js} +2 -2
  266. package/dist/cli/chunks/{sync-4OEI3BC2.js → sync-N56UQGCS.js} +2 -2
  267. package/dist/cli/chunks/{task-handler-R3ATJKU5.js → task-handler-VTNRGAXP.js} +2 -2
  268. package/dist/cli/chunks/{task-handlers-4X357AEW.js → task-handlers-FYSDH55N.js} +3 -3
  269. package/dist/cli/chunks/{test-PR2B5H2F.js → test-GQNCKRSP.js} +4 -4
  270. package/dist/cli/chunks/{test-scheduling-ZNOSQVLD.js → test-scheduling-GPRXSIRP.js} +3 -3
  271. package/dist/cli/chunks/{token-bootstrap-LYXOI72S.js → token-bootstrap-76SRNXGG.js} +2 -2
  272. package/dist/cli/chunks/{token-usage-R6EQZBX2.js → token-usage-O7CZDP5Q.js} +2 -2
  273. package/dist/cli/chunks/{transformers-COQWK27J.js → transformers-LTU4LSSC.js} +2 -2
  274. package/dist/cli/chunks/{tree-sitter-wasm-parser-LLIW2X3M.js → tree-sitter-wasm-parser-NQSQCMBM.js} +2 -2
  275. package/dist/cli/chunks/{types-MEYTZITK.js → types-OP6IWE6N.js} +2 -2
  276. package/dist/cli/chunks/unified-memory-DSTIEDSH.js +2 -0
  277. package/dist/cli/chunks/unified-memory-hnsw-KBV3P4OS.js +2 -0
  278. package/dist/cli/chunks/unified-persistence-XKCOUBKY.js +2 -0
  279. package/dist/cli/chunks/{upgrade-DVIJ456A.js → upgrade-OQWRBZ3R.js} +2 -2
  280. package/dist/cli/chunks/{validate-UYTSMJ5X.js → validate-TH5SRP3E.js} +2 -2
  281. package/dist/cli/chunks/{validate-swarm-P32WCJR6.js → validate-swarm-UITL2JUS.js} +2 -2
  282. package/dist/cli/chunks/{vibium-JGVOLM6X.js → vibium-O6PRAG4J.js} +2 -2
  283. package/dist/cli/chunks/visual-security-TTWSPZTZ.js +2 -0
  284. package/dist/cli/chunks/{web-tree-sitter-5ZGNCTPN.js → web-tree-sitter-XBFBY4OF.js} +2 -2
  285. package/dist/cli/chunks/{windsurf-installer-IILSSQAE.js → windsurf-installer-DVT5NRNY.js} +2 -2
  286. package/dist/cli/chunks/witness-chain-2KY73HPN.js +2 -0
  287. package/dist/cli/chunks/{witness-chain-JZMXCG3B.js → witness-chain-VRSH2F36.js} +2 -2
  288. package/dist/cli/chunks/{witness-key-manager-UUTLNUIH.js → witness-key-manager-GFHRDKQ4.js} +2 -2
  289. package/dist/cli/chunks/{workflow-NS7HXVHZ.js → workflow-HAZ6YKOG.js} +4 -4
  290. package/dist/cli/chunks/workflow-orchestrator-UK56AVOT.js +2 -0
  291. package/dist/cli/chunks/{wrappers-XKEDSV5W.js → wrappers-5LLLT7GM.js} +2 -2
  292. package/dist/cli/commands/daemon.js +3 -0
  293. package/dist/cli/commands/platform.d.ts +1 -0
  294. package/dist/cli/commands/platform.js +28 -6
  295. package/dist/cli/commands/quality-gate.js +25 -3
  296. package/dist/cli/foreground-command.d.ts +3 -0
  297. package/dist/cli/foreground-command.js +22 -0
  298. package/dist/cli/handlers/init-handler.d.ts +5 -0
  299. package/dist/cli/handlers/init-handler.js +6 -0
  300. package/dist/cli/index.js +8 -1
  301. package/dist/contracts/verdicts.d.ts +625 -0
  302. package/dist/contracts/verdicts.js +202 -14
  303. package/dist/coordination/handlers/coverage-handlers.js +8 -1
  304. package/dist/domains/chaos-resilience/diagnosis/corpus.d.ts +5 -0
  305. package/dist/domains/chaos-resilience/diagnosis/corpus.js +141 -0
  306. package/dist/domains/chaos-resilience/diagnosis/detectors.d.ts +11 -0
  307. package/dist/domains/chaos-resilience/diagnosis/detectors.js +109 -0
  308. package/dist/domains/chaos-resilience/diagnosis/index.d.ts +5 -0
  309. package/dist/domains/chaos-resilience/diagnosis/index.js +5 -0
  310. package/dist/domains/chaos-resilience/diagnosis/scorer.d.ts +8 -0
  311. package/dist/domains/chaos-resilience/diagnosis/scorer.js +128 -0
  312. package/dist/domains/chaos-resilience/diagnosis/types.d.ts +171 -0
  313. package/dist/domains/chaos-resilience/diagnosis/types.js +3 -0
  314. package/dist/domains/chaos-resilience/index.d.ts +1 -0
  315. package/dist/domains/chaos-resilience/index.js +1 -0
  316. package/dist/domains/index.d.ts +1 -0
  317. package/dist/domains/index.js +1 -0
  318. package/dist/early-exit/early-exit-controller.d.ts +4 -2
  319. package/dist/early-exit/early-exit-controller.js +95 -7
  320. package/dist/early-exit/index.d.ts +1 -1
  321. package/dist/early-exit/speculative-executor.js +3 -0
  322. package/dist/early-exit/types.d.ts +51 -0
  323. package/dist/early-exit/types.js +3 -0
  324. package/dist/index.d.ts +4 -2
  325. package/dist/index.js +2 -1
  326. package/dist/init/browser-engine-installer.d.ts +11 -0
  327. package/dist/init/browser-engine-installer.js +35 -5
  328. package/dist/init/codex-installer.d.ts +11 -1
  329. package/dist/init/codex-installer.js +90 -24
  330. package/dist/init/init-wizard-hooks.js +11 -11
  331. package/dist/init/orchestrator.js +2 -0
  332. package/dist/init/phases/07-hooks.d.ts +3 -3
  333. package/dist/init/phases/07-hooks.js +19 -18
  334. package/dist/init/phases/09-assets.d.ts +4 -0
  335. package/dist/init/phases/09-assets.js +13 -10
  336. package/dist/init/phases/phase-interface.d.ts +2 -0
  337. package/dist/init/types.d.ts +4 -0
  338. package/dist/learning/index.d.ts +3 -0
  339. package/dist/learning/index.js +2 -0
  340. package/dist/learning/pattern-mutation-error.d.ts +9 -0
  341. package/dist/learning/pattern-mutation-error.js +14 -0
  342. package/dist/learning/pattern-store.js +24 -2
  343. package/dist/learning/qe-reasoning-bank.js +24 -5
  344. package/dist/learning/rvf-pattern-store.js +23 -5
  345. package/dist/learning/structural-retrieval/corpus.d.ts +5 -0
  346. package/dist/learning/structural-retrieval/corpus.js +97 -0
  347. package/dist/learning/structural-retrieval/evaluate.d.ts +7 -0
  348. package/dist/learning/structural-retrieval/evaluate.js +124 -0
  349. package/dist/learning/structural-retrieval/index.d.ts +6 -0
  350. package/dist/learning/structural-retrieval/index.js +4 -0
  351. package/dist/learning/structural-retrieval/receipt.d.ts +14 -0
  352. package/dist/learning/structural-retrieval/receipt.js +36 -0
  353. package/dist/learning/structural-retrieval/types.d.ts +83 -0
  354. package/dist/learning/structural-retrieval/types.js +2 -0
  355. package/dist/mcp/bundle.js +423 -423
  356. package/dist/mcp/index.d.ts +1 -0
  357. package/dist/mcp/index.js +1 -0
  358. package/dist/mcp/protocol-server.js +11 -2
  359. package/dist/mcp/qe-tool-bridge.js +1 -0
  360. package/dist/mcp/services/session-resume.d.ts +15 -19
  361. package/dist/mcp/services/session-resume.js +204 -194
  362. package/dist/mcp/tool-annotations.d.ts +25 -0
  363. package/dist/mcp/tool-annotations.js +75 -0
  364. package/dist/mcp/tool-registry.js +17 -12
  365. package/dist/mcp/tools/base.d.ts +7 -1
  366. package/dist/mcp/tools/base.js +8 -0
  367. package/dist/mcp/tools/quality-assessment/gate.d.ts +8 -5
  368. package/dist/mcp/tools/quality-assessment/gate.js +9 -4
  369. package/dist/mcp/tools/registry.d.ts +3 -0
  370. package/dist/mcp/tools/registry.js +1 -0
  371. package/dist/mcp/types.d.ts +15 -0
  372. package/dist/skills/qe-court/cli.js +0 -0
  373. package/dist/validation/quality-gate-runner.d.ts +27 -4
  374. package/dist/validation/quality-gate-runner.js +33 -4
  375. package/dist/validation/verification-reach.d.ts +90 -0
  376. package/dist/validation/verification-reach.js +187 -0
  377. package/dist/verification/adversarial-verify/index.d.ts +1 -1
  378. package/dist/verification/adversarial-verify/measurement-receipt.d.ts +13 -0
  379. package/dist/verification/adversarial-verify/measurement-receipt.js +136 -0
  380. package/dist/verification/adversarial-verify/synthesize.js +7 -10
  381. package/dist/verification/adversarial-verify/types.d.ts +35 -0
  382. package/dist/verification/adversarial-verify/verify.js +6 -1
  383. package/package.json +9 -5
  384. package/schemas/coverage-gap.schema.json +41 -0
  385. package/schemas/finding-verdict.schema.json +470 -0
  386. package/schemas/risk-decision.schema.json +41 -0
  387. package/dist/cli/chunks/adapter-3VBXL7DO.js +0 -2
  388. package/dist/cli/chunks/aqe-learning-engine-NXRNKJNA.js +0 -2
  389. package/dist/cli/chunks/base-F6GMOKU2.js +0 -2
  390. package/dist/cli/chunks/browser-workflow-QRDC46LR.js +0 -2
  391. package/dist/cli/chunks/chunk-3JIJBR4V.js +0 -2
  392. package/dist/cli/chunks/chunk-R2B6EE45.js +0 -2
  393. package/dist/cli/chunks/chunk-TRDEULS7.js +0 -4
  394. package/dist/cli/chunks/chunk-WJXHE52V.js +0 -65
  395. package/dist/cli/chunks/client-HNBZUEVV.js +0 -2
  396. package/dist/cli/chunks/codex-installer-AKQ5BCHU.js +0 -15
  397. package/dist/cli/chunks/core-handlers-TB7NLYXL.js +0 -2
  398. package/dist/cli/chunks/cross-domain-router-MDSI553U.js +0 -2
  399. package/dist/cli/chunks/dream-X7ISHFEE.js +0 -2
  400. package/dist/cli/chunks/heartbeat-scheduler-2C5XGFQT.js +0 -2
  401. package/dist/cli/chunks/hnsw-adapter-KCVMXLUL.js +0 -2
  402. package/dist/cli/chunks/hnsw-index-OGWZS6MP.js +0 -2
  403. package/dist/cli/chunks/impact-analyzer-IBJ43GQL.js +0 -2
  404. package/dist/cli/chunks/init-wizard-6XMFD5LP.js +0 -2
  405. package/dist/cli/chunks/kernel-UDUMUPB3.js +0 -2
  406. package/dist/cli/chunks/knowledge-graph-JRYTUG3W.js +0 -2
  407. package/dist/cli/chunks/llm-router-service-KF5ZALUQ.js +0 -2
  408. package/dist/cli/chunks/load-test-LHMBCNCH.js +0 -2
  409. package/dist/cli/chunks/memory-backend-WZHKHBZK.js +0 -2
  410. package/dist/cli/chunks/pattern-null-store-UZSHCRL2.js +0 -2
  411. package/dist/cli/chunks/platform-WCRBO3Z7.js +0 -2
  412. package/dist/cli/chunks/protocol-executor-42NLVDTC.js +0 -2
  413. package/dist/cli/chunks/qe-reasoning-bank-W74RSMMU.js +0 -2
  414. package/dist/cli/chunks/quality-gate-63DDBSGM.js +0 -7
  415. package/dist/cli/chunks/queen-coordinator-XELKSRMS.js +0 -2
  416. package/dist/cli/chunks/router-GTW2EQZV.js +0 -2
  417. package/dist/cli/chunks/routing-feedback-NVOBWEMK.js +0 -2
  418. package/dist/cli/chunks/rvf-dual-writer-5OPVMXNL.js +0 -2
  419. package/dist/cli/chunks/rvf-migration-adapter-5S4YFTX4.js +0 -2
  420. package/dist/cli/chunks/rvf-native-adapter-LYSJHEVX.js +0 -2
  421. package/dist/cli/chunks/safe-db-AEB3JMLD.js +0 -2
  422. package/dist/cli/chunks/schedule-4QNPCQNT.js +0 -2
  423. package/dist/cli/chunks/scheduler-S3DFHX6A.js +0 -2
  424. package/dist/cli/chunks/sqlite-persistence-L2KISU2H.js +0 -2
  425. package/dist/cli/chunks/unified-memory-5KQMA7FV.js +0 -2
  426. package/dist/cli/chunks/unified-memory-hnsw-PQRPTYOD.js +0 -2
  427. package/dist/cli/chunks/unified-persistence-YDONVPJB.js +0 -2
  428. package/dist/cli/chunks/visual-security-RJ7RTNGJ.js +0 -2
  429. package/dist/cli/chunks/witness-chain-YXXXNGAM.js +0 -2
  430. package/dist/cli/chunks/workflow-orchestrator-5KUAVSTH.js +0 -2
@@ -293,7 +293,7 @@ export class HooksPhase extends BasePhase {
293
293
  /**
294
294
  * Install the resilient hook shim (aqe-hook.cjs) into .claude/hooks/.
295
295
  * The generated settings.json hooks run `node .../aqe-hook.cjs <cmd>` — the
296
- * shim resolves a project-local AQE bundle (or falls back to npx), strips
296
+ * shim resolves a project-local AQE bundle (or an installed aqe binary), strips
297
297
  * init noise from stdout, swallows stderr, and always exits 0.
298
298
  */
299
299
  installHookShim(projectRoot, context) {
@@ -321,7 +321,7 @@ export class HooksPhase extends BasePhase {
321
321
  return;
322
322
  }
323
323
  // Should not happen for a real install (the file ships in the package).
324
- context.services.log(' ⚠ aqe-hook.cjs source not found — hooks will fall back to `npx agentic-qe`');
324
+ context.services.log(' ⚠ aqe-hook.cjs source not found — lifecycle hooks cannot run until AQE is reinstalled');
325
325
  }
326
326
  /**
327
327
  * Generate a minimal statusline-v3.cjs script as a fallback.
@@ -381,6 +381,7 @@ const AQE_DIR = path.join(PROJECT_ROOT, '.agentic-qe');
381
381
  const RVF_PATH = path.join(AQE_DIR, 'aqe.rvf');
382
382
  const DB_PATH = path.join(AQE_DIR, 'memory.db');
383
383
  const MAX_AGE_HOURS = 24;
384
+ const AQE_BIN = process.env.AQE_HOOK_BIN || (process.platform === 'win32' ? 'aqe.cmd' : 'aqe');
384
385
 
385
386
  function log(msg) { process.stderr.write('[brain-checkpoint] ' + msg + '\\n'); }
386
387
 
@@ -388,7 +389,7 @@ function exportBrain() {
388
389
  if (!fs.existsSync(DB_PATH)) { log('No memory.db, skipping'); return { exported: false }; }
389
390
  try {
390
391
  const result = execFileSync(
391
- 'npx', ['agentic-qe', 'brain', 'export', '-o', RVF_PATH, '--format', 'rvf'],
392
+ AQE_BIN, ['brain', 'export', '-o', RVF_PATH, '--format', 'rvf'],
392
393
  { timeout: 60000, encoding: 'utf-8' }
393
394
  );
394
395
  const m = result.match(/Patterns:\\s+(\\d+)/);
@@ -422,8 +423,8 @@ if (process.argv.includes('--json')) process.stdout.write(JSON.stringify(result)
422
423
  /**
423
424
  * Generate hooks configuration
424
425
  *
425
- * Uses `npx agentic-qe` for portability - works without global installation.
426
- * All hooks use --json output for structured data and fail silently with continueOnError.
426
+ * Timeout values use Claude Code's native seconds unit. The shim itself uses
427
+ * a smaller millisecond budget so it can record failures before the host stops it.
427
428
  */
428
429
  generateHooksConfig(_config, _projectRoot) {
429
430
  // Shell injection safety: env vars like $TOOL_INPUT_file_path are set by
@@ -441,7 +442,7 @@ if (process.argv.includes('--json')) process.stdout.write(JSON.stringify(result)
441
442
  {
442
443
  type: 'command',
443
444
  command: 'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" guard --file "$TOOL_INPUT_file_path" --json',
444
- timeout: 3000,
445
+ timeout: 3,
445
446
  continueOnError: true,
446
447
  },
447
448
  ],
@@ -453,7 +454,7 @@ if (process.argv.includes('--json')) process.stdout.write(JSON.stringify(result)
453
454
  {
454
455
  type: 'command',
455
456
  command: 'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" pre-edit --file "$TOOL_INPUT_file_path" --json',
456
- timeout: 5000,
457
+ timeout: 5,
457
458
  continueOnError: true,
458
459
  },
459
460
  ],
@@ -465,7 +466,7 @@ if (process.argv.includes('--json')) process.stdout.write(JSON.stringify(result)
465
466
  {
466
467
  type: 'command',
467
468
  command: 'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" pre-command --command "$TOOL_INPUT_command" --json',
468
- timeout: 3000,
469
+ timeout: 3,
469
470
  continueOnError: true,
470
471
  },
471
472
  ],
@@ -477,7 +478,7 @@ if (process.argv.includes('--json')) process.stdout.write(JSON.stringify(result)
477
478
  {
478
479
  type: 'command',
479
480
  command: 'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" pre-task --description "$TOOL_INPUT_prompt" --json',
480
- timeout: 5000,
481
+ timeout: 5,
481
482
  continueOnError: true,
482
483
  },
483
484
  ],
@@ -490,7 +491,7 @@ if (process.argv.includes('--json')) process.stdout.write(JSON.stringify(result)
490
491
  {
491
492
  type: 'command',
492
493
  command: 'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" post-edit --file "$TOOL_INPUT_file_path" --success --json',
493
- timeout: 5000,
494
+ timeout: 5,
494
495
  continueOnError: true,
495
496
  },
496
497
  ],
@@ -501,7 +502,7 @@ if (process.argv.includes('--json')) process.stdout.write(JSON.stringify(result)
501
502
  {
502
503
  type: 'command',
503
504
  command: 'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" post-command --command "$TOOL_INPUT_command" --success true --json',
504
- timeout: 5000,
505
+ timeout: 5,
505
506
  continueOnError: true,
506
507
  },
507
508
  ],
@@ -512,7 +513,7 @@ if (process.argv.includes('--json')) process.stdout.write(JSON.stringify(result)
512
513
  {
513
514
  type: 'command',
514
515
  command: 'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" post-task --task-id "$TOOL_RESULT_agent_id" --agent "$TOOL_INPUT_subagent_type" --success true --description "$TOOL_INPUT_prompt" --json',
515
- timeout: 5000,
516
+ timeout: 5,
516
517
  continueOnError: true,
517
518
  },
518
519
  ],
@@ -527,7 +528,7 @@ if (process.argv.includes('--json')) process.stdout.write(JSON.stringify(result)
527
528
  // var, so we let the CLI read stdin directly.
528
529
  type: 'command',
529
530
  command: 'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" route --json',
530
- timeout: 5000,
531
+ timeout: 5,
531
532
  continueOnError: true,
532
533
  },
533
534
  ],
@@ -539,7 +540,7 @@ if (process.argv.includes('--json')) process.stdout.write(JSON.stringify(result)
539
540
  {
540
541
  type: 'command',
541
542
  command: 'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" session-start --session-id "$SESSION_ID" --json',
542
- timeout: 10000,
543
+ timeout: 10,
543
544
  continueOnError: true,
544
545
  },
545
546
  ],
@@ -549,7 +550,7 @@ if (process.argv.includes('--json')) process.stdout.write(JSON.stringify(result)
549
550
  {
550
551
  type: 'command',
551
552
  command: 'sh -c \'exec node "${CLAUDE_PROJECT_DIR:-.}/.claude/helpers/brain-checkpoint.cjs" verify --json\'',
552
- timeout: 5000,
553
+ timeout: 5,
553
554
  continueOnError: true,
554
555
  },
555
556
  ],
@@ -561,7 +562,7 @@ if (process.argv.includes('--json')) process.stdout.write(JSON.stringify(result)
561
562
  {
562
563
  type: 'command',
563
564
  command: 'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" session-end --save-state --json',
564
- timeout: 5000,
565
+ timeout: 5,
565
566
  continueOnError: true,
566
567
  },
567
568
  ],
@@ -575,7 +576,7 @@ if (process.argv.includes('--json')) process.stdout.write(JSON.stringify(result)
575
576
  // rows forever in direct-work sessions (no Task/Agent spawned).
576
577
  type: 'command',
577
578
  command: 'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" post-route --success true --json',
578
- timeout: 5000,
579
+ timeout: 5,
579
580
  continueOnError: true,
580
581
  },
581
582
  ],
@@ -585,7 +586,7 @@ if (process.argv.includes('--json')) process.stdout.write(JSON.stringify(result)
585
586
  {
586
587
  type: 'command',
587
588
  command: 'sh -c \'exec node "${CLAUDE_PROJECT_DIR:-.}/.claude/helpers/brain-checkpoint.cjs" export --json\'',
588
- timeout: 60000,
589
+ timeout: 60,
589
590
  continueOnError: true,
590
591
  },
591
592
  ],
@@ -16,6 +16,10 @@ export interface AssetsResult {
16
16
  kiroHooks: number;
17
17
  platformsConfigured: string[];
18
18
  browserEngine?: BrowserEngineInstallResult;
19
+ codexGuidance?: {
20
+ policy: 'full' | 'compact' | 'none';
21
+ ownedBytes: number;
22
+ };
19
23
  }
20
24
  /**
21
25
  * Assets phase - installs skills and agents
@@ -8,7 +8,7 @@ import { BasePhase, } from './phase-interface.js';
8
8
  import { createSkillsInstaller } from '../skills-installer.js';
9
9
  import { createAgentsInstaller } from '../agents-installer.js';
10
10
  import { createN8nInstaller } from '../n8n-installer.js';
11
- import { installBrowserEngine, DEFAULT_VIBIUM_SPEC, } from '../browser-engine-installer.js';
11
+ import { installBrowserEngine, detectBrowserEngine, diagnosePlatform, DEFAULT_VIBIUM_SPEC, } from '../browser-engine-installer.js';
12
12
  import { initializeOverlays } from '../../routing/qe-agent-registry.js';
13
13
  /**
14
14
  * Assets phase - installs skills and agents
@@ -36,6 +36,7 @@ export class AssetsPhase extends BasePhase {
36
36
  let kiroAgents = 0;
37
37
  let kiroSkills = 0;
38
38
  let kiroHooks = 0;
39
+ let codexGuidance;
39
40
  if (options.upgrade) {
40
41
  context.services.log(` Upgrade mode: overwriting existing files`);
41
42
  }
@@ -93,15 +94,14 @@ export class AssetsPhase extends BasePhase {
93
94
  try {
94
95
  // Pre-flight check: if vibium is already on PATH, skip the loud
95
96
  // banner so we don't scare users on the common path.
96
- const alreadyHere = installBrowserEngine({
97
- skip: false,
98
- // Use a tiny timeout for the pre-flight detect-only call. The
99
- // installer will short-circuit on already-installed without
100
- // ever invoking npm.
101
- timeoutMs: 5_000,
102
- });
103
- if (alreadyHere.status === 'already-installed') {
104
- browserEngine = alreadyHere;
97
+ const detected = detectBrowserEngine();
98
+ if (detected.status === 'ready') {
99
+ browserEngine = {
100
+ status: 'already-installed',
101
+ version: detected.version,
102
+ packageSpec: DEFAULT_VIBIUM_SPEC,
103
+ platformHint: diagnosePlatform(),
104
+ };
105
105
  context.services.log(` Browser engine: vibium ${browserEngine.version} (already installed)`);
106
106
  }
107
107
  else {
@@ -298,9 +298,11 @@ export class AssetsPhase extends BasePhase {
298
298
  overwrite: shouldOverwrite,
299
299
  installMcp: !options.noMcp,
300
300
  includeRuflo: options.withRuflo,
301
+ guidancePolicy: options.codexGuidance,
301
302
  memoryBackend: options.memoryBackend === 'memory' ? 'memory' : undefined,
302
303
  });
303
304
  const res = await installer.install();
305
+ codexGuidance = { policy: res.guidancePolicy, ownedBytes: res.ownedGuidanceBytes };
304
306
  if (res.mcpConfigured)
305
307
  platformsConfigured.push('codex');
306
308
  if (res.errors.length > 0)
@@ -358,6 +360,7 @@ export class AssetsPhase extends BasePhase {
358
360
  kiroHooks,
359
361
  platformsConfigured,
360
362
  browserEngine,
363
+ codexGuidance,
361
364
  };
362
365
  }
363
366
  /**
@@ -123,6 +123,8 @@ export interface InitOptions {
123
123
  withCodex?: boolean;
124
124
  /** Include optional Ruflo guidance and Codex lifecycle integration */
125
125
  withRuflo?: boolean;
126
+ /** Codex AGENTS.md guidance policy. */
127
+ codexGuidance?: 'full' | 'compact' | 'none';
126
128
  /** Install Windsurf MCP config and rules */
127
129
  withWindsurf?: boolean;
128
130
  /** Install Continue.dev MCP config and rules */
@@ -223,6 +223,10 @@ export interface InitResult {
223
223
  agents: number;
224
224
  skills: number;
225
225
  };
226
+ codexGuidance?: {
227
+ policy: 'full' | 'compact' | 'none';
228
+ ownedBytes: number;
229
+ };
226
230
  };
227
231
  totalDurationMs: number;
228
232
  timestamp: Date;
@@ -46,10 +46,13 @@ export { admitLearningEvidence, countIndependentAdmissions, createLearningEviden
46
46
  export { persistLearningEvidence } from './evidence-admission-store.js';
47
47
  export type { PersistLearningEvidenceOptions, PersistedLearningEvidence, } from './evidence-admission-store.js';
48
48
  export type { LearningAdmissionResult, LearningContribution, LearningEvidenceManifest, LearningSegment, } from './learning-evidence-admission.js';
49
+ export * from './structural-retrieval/index.js';
49
50
  export type { QEDomain, QEPatternType, QEPattern, QEPatternContext, QEPatternTemplate, QETemplateVariable, ProgrammingLanguage, TestFramework, ComplexityLevel, CreateQEPatternOptions, PatternMatchResult, } from './qe-patterns.js';
50
51
  export { QE_GUIDANCE_REGISTRY, TEST_GENERATION_GUIDANCE, COVERAGE_ANALYSIS_GUIDANCE, MUTATION_TESTING_GUIDANCE, API_TESTING_GUIDANCE, SECURITY_TESTING_GUIDANCE, VISUAL_TESTING_GUIDANCE, ACCESSIBILITY_GUIDANCE, PERFORMANCE_GUIDANCE, getGuidance, getFrameworkGuidance, getLanguageGuidance, getCombinedGuidance, checkAntiPatterns, generateGuidanceContext, } from './qe-guidance.js';
51
52
  export type { QEGuidance, AntiPattern, GuidanceExample, } from './qe-guidance.js';
52
53
  export { PatternStore, createPatternStore, DEFAULT_PATTERN_STORE_CONFIG, } from './pattern-store.js';
54
+ export { PatternMutationError } from './pattern-mutation-error.js';
55
+ export type { PatternMutationDisposition } from './pattern-mutation-error.js';
53
56
  export type { IPatternStore, PatternStoreConfig, PatternStoreStats, PatternSearchOptions, PatternSearchResult, } from './pattern-store.js';
54
57
  export { QE_HOOK_EVENTS, createQEHookHandlers, QEHookRegistry, createQEHookRegistry, setupQEHooks, } from './qe-hooks.js';
55
58
  export type { QEHookEvent, QEHookContext, QEHookResult, QEHookHandler, } from './qe-hooks.js';
@@ -55,6 +55,7 @@ QE_PATTERN_TYPES,
55
55
  detectQEDomain, detectQEDomains, mapQEDomainToAQE, calculateQualityScore, shouldPromotePattern, validateQEPattern, applyPatternTemplate, matchPatternContext, } from './qe-patterns.js';
56
56
  export { admitLearningEvidence, countIndependentAdmissions, createLearningEvidenceManifest, } from './learning-evidence-admission.js';
57
57
  export { persistLearningEvidence } from './evidence-admission-store.js';
58
+ export * from './structural-retrieval/index.js';
58
59
  // ============================================================================
59
60
  // QE Guidance
60
61
  // ============================================================================
@@ -69,6 +70,7 @@ getGuidance, getFrameworkGuidance, getLanguageGuidance, getCombinedGuidance, che
69
70
  // Pattern Store
70
71
  // ============================================================================
71
72
  export { PatternStore, createPatternStore, DEFAULT_PATTERN_STORE_CONFIG, } from './pattern-store.js';
73
+ export { PatternMutationError } from './pattern-mutation-error.js';
72
74
  // ============================================================================
73
75
  // QE Hooks
74
76
  // ============================================================================
@@ -0,0 +1,9 @@
1
+ export type PatternMutationDisposition = 'FAILED' | 'COMMITTED_PENDING_INDEX';
2
+ /** Error evidence that distinguishes an uncommitted write from index lag. */
3
+ export declare class PatternMutationError extends Error {
4
+ readonly patternId: string;
5
+ readonly disposition: PatternMutationDisposition;
6
+ readonly cause: unknown;
7
+ constructor(patternId: string, disposition: PatternMutationDisposition, cause: unknown);
8
+ }
9
+ //# sourceMappingURL=pattern-mutation-error.d.ts.map
@@ -0,0 +1,14 @@
1
+ /** Error evidence that distinguishes an uncommitted write from index lag. */
2
+ export class PatternMutationError extends Error {
3
+ patternId;
4
+ disposition;
5
+ cause;
6
+ constructor(patternId, disposition, cause) {
7
+ super(`${disposition}: pattern ${patternId}: ${cause instanceof Error ? cause.message : String(cause)}`);
8
+ this.name = 'PatternMutationError';
9
+ this.patternId = patternId;
10
+ this.disposition = disposition;
11
+ this.cause = cause;
12
+ }
13
+ }
14
+ //# sourceMappingURL=pattern-mutation-error.js.map
@@ -31,6 +31,7 @@ import { createHopfieldMemory } from '../integrations/ruvector/hopfield-memory.j
31
31
  import { createHyperbolicPatternIndex, } from './hyperbolic-pattern-index.js';
32
32
  import { PatternNullStore } from './pattern-null-store.js';
33
33
  import { getActiveEmbeddingSpaceIdentity } from './real-embeddings.js';
34
+ import { PatternMutationError } from './pattern-mutation-error.js';
34
35
  // ============================================================================
35
36
  // R1: HDC Fingerprint Singleton (lazy-initialized)
36
37
  // ============================================================================
@@ -443,6 +444,10 @@ export class PatternStore {
443
444
  if (pattern.confidence < this.config.minConfidence) {
444
445
  return err(new Error(`Pattern confidence ${pattern.confidence} below threshold ${this.config.minConfidence}`));
445
446
  }
447
+ const persistentBackend = (process.env.AQE_MEMORY_BACKEND ?? 'memory') !== 'memory';
448
+ if (persistentBackend && !this.sqliteStore) {
449
+ return err(new PatternMutationError(pattern.id, 'FAILED', new Error('authoritative SQLite pattern store is unavailable')));
450
+ }
446
451
  const activeSpaceId = getActiveEmbeddingSpaceIdentity()?.spaceId ?? this.config.embeddingSpaceId;
447
452
  if (pattern.embedding && !activeSpaceId) {
448
453
  return err(new Error('VECTOR_SPACE_UNVERIFIED: refusing to persist or index an embedding without runtime provenance'));
@@ -455,6 +460,12 @@ export class PatternStore {
455
460
  }
456
461
  // R3b: Capture pre-existing pattern for VectorDeltaTracker before overwrite
457
462
  const existingPattern = this.patternCache.get(pattern.id) ?? null;
463
+ let authoritativeCommitted = false;
464
+ const rollbackUncommittedCache = () => {
465
+ this.unindexPattern(pattern);
466
+ if (existingPattern)
467
+ this.indexPattern(existingPattern);
468
+ };
458
469
  // Index in memory cache
459
470
  this.indexPattern(pattern);
460
471
  // Persist to SQLite (pattern + embedding atomically)
@@ -472,14 +483,23 @@ export class PatternStore {
472
483
  pattern.id = actualId;
473
484
  this.indexPattern(pattern);
474
485
  }
486
+ authoritativeCommitted = true;
475
487
  }
476
488
  catch (error) {
477
- console.warn(`[PatternStore] SQLite persist failed for ${pattern.id}:`, toErrorMessage(error));
489
+ rollbackUncommittedCache();
490
+ return err(new PatternMutationError(pattern.id, 'FAILED', error));
478
491
  }
479
492
  }
480
493
  // Add to HNSW if embedding is available (lazy-load HNSW only when needed)
481
494
  if (pattern.embedding) {
482
495
  const hnsw = await this.ensureHNSW();
496
+ if (!hnsw && authoritativeCommitted) {
497
+ return err(new PatternMutationError(pattern.id, 'COMMITTED_PENDING_INDEX', new Error('HNSW unavailable after authoritative pattern commit')));
498
+ }
499
+ if (!hnsw && persistentBackend) {
500
+ rollbackUncommittedCache();
501
+ return err(new PatternMutationError(pattern.id, 'FAILED', new Error('HNSW unavailable before an authoritative pattern commit')));
502
+ }
483
503
  if (hnsw) {
484
504
  try {
485
505
  // Cast pattern metadata to CoverageVectorMetadata for HNSW storage
@@ -498,7 +518,9 @@ export class PatternStore {
498
518
  });
499
519
  }
500
520
  catch (error) {
501
- console.warn(`[PatternStore] Failed to index embedding for ${pattern.id}:`, error);
521
+ if (!authoritativeCommitted)
522
+ rollbackUncommittedCache();
523
+ return err(new PatternMutationError(pattern.id, authoritativeCommitted ? 'COMMITTED_PENDING_INDEX' : 'FAILED', error));
502
524
  }
503
525
  }
504
526
  }
@@ -23,6 +23,7 @@ import { createPatternStore, } from './pattern-store.js';
23
23
  import { createSQLitePatternStore, } from './sqlite-persistence.js';
24
24
  import { getWitnessChain } from '../audit/witness-chain.js';
25
25
  import { getActiveEmbeddingSpaceIdentity } from './real-embeddings.js';
26
+ import { PatternMutationError } from './pattern-mutation-error.js';
26
27
  // Import extracted modules
27
28
  import { DEFAULT_QE_REASONING_BANK_CONFIG } from './qe-reasoning-bank-types.js';
28
29
  import { PRETRAINED_PATTERNS } from './pretrained-patterns.js';
@@ -281,16 +282,34 @@ export class QEReasoningBank {
281
282
  options = { ...options, embedding };
282
283
  }
283
284
  const result = await this.patternStore.create(options);
285
+ // A pending-index error still proves the authoritative SQLite mutation
286
+ // committed. Resolve that committed row for witness and replication side
287
+ // effects, while returning the original typed partial disposition.
288
+ let committedPattern = result.success ? result.value : null;
289
+ if (!result.success &&
290
+ result.error instanceof PatternMutationError &&
291
+ result.error.disposition === 'COMMITTED_PENDING_INDEX') {
292
+ try {
293
+ committedPattern = await this.patternStore.get(result.error.patternId);
294
+ }
295
+ catch (error) {
296
+ logger.warn('Committed pattern lookup failed', {
297
+ patternId: result.error.patternId,
298
+ error: toErrorMessage(error),
299
+ });
300
+ }
301
+ }
284
302
  // ADR-070: Record pattern creation in witness chain
285
- if (result.success) {
286
- getWitnessChain().then(wc => wc.append('PATTERN_CREATE', { patternId: result.value.id, domain: result.value.qeDomain, confidence: result.value.confidence, name: result.value.name }, 'reasoning-bank')).catch((e) => { logger.warn('Witness chain PATTERN_CREATE failed', { error: toErrorMessage(e) }); });
303
+ if (committedPattern) {
304
+ const sideEffectPattern = committedPattern;
305
+ getWitnessChain().then(wc => wc.append('PATTERN_CREATE', { patternId: sideEffectPattern.id, domain: sideEffectPattern.qeDomain, confidence: sideEffectPattern.confidence, name: sideEffectPattern.name }, 'reasoning-bank')).catch((e) => { logger.warn('Witness chain PATTERN_CREATE failed', { error: toErrorMessage(e) }); });
287
306
  // Phase 3: Best-effort RVF dual-write for vector replication
288
- if (this.rvfDualWriter && result.value.embedding && result.value.embedding.length > 0) {
307
+ if (this.rvfDualWriter && sideEffectPattern.embedding && sideEffectPattern.embedding.length > 0) {
289
308
  try {
290
- this.rvfDualWriter.writePattern(result.value.id, result.value.embedding);
309
+ this.rvfDualWriter.writePattern(sideEffectPattern.id, sideEffectPattern.embedding);
291
310
  }
292
311
  catch (rvfErr) {
293
- logger.warn('RVF dual-write failed (non-fatal)', { patternId: result.value.id, error: toErrorMessage(rvfErr) });
312
+ logger.warn('RVF dual-write failed (non-fatal)', { patternId: sideEffectPattern.id, error: toErrorMessage(rvfErr) });
294
313
  }
295
314
  }
296
315
  }
@@ -18,6 +18,7 @@ import { calculateQualityScore, validateQEPattern, mapQEDomainToAQE, PROMOTION_T
18
18
  import { DEFAULT_PATTERN_STORE_CONFIG } from './pattern-store.js';
19
19
  import { getActiveEmbeddingSpaceIdentity } from './real-embeddings.js';
20
20
  import { verifyOrCreateEmbeddingSpaceManifest } from './embedding-space.js';
21
+ import { PatternMutationError } from './pattern-mutation-error.js';
21
22
  // ============================================================================
22
23
  // RVF Pattern Store Implementation
23
24
  // ============================================================================
@@ -63,9 +64,11 @@ export class RvfPatternStore {
63
64
  async initialize() {
64
65
  if (this.initialized)
65
66
  return;
67
+ this.rvfInitError = null;
66
68
  // Database-free mode (#534): never create an on-disk patterns.rvf (+ .idmap/.lock).
67
- // Run adapter-less the store degrades to metadata-only (the same graceful
68
- // path used when the RVF native binding is unavailable), writing nothing.
69
+ // Run adapter-less and write nothing. The factory normally selects the
70
+ // in-memory PatternStore in this mode; a directly constructed RVF store
71
+ // remains fail-closed unless an authoritative SQLite delegate is attached.
69
72
  if (process.env.AQE_MEMORY_BACKEND === 'memory') {
70
73
  this.adapter = null;
71
74
  this.initialized = true;
@@ -172,10 +175,18 @@ export class RvfPatternStore {
172
175
  if (pattern.confidence < this.config.minConfidence) {
173
176
  return err(new Error(`Pattern confidence ${pattern.confidence} below threshold ${this.config.minConfidence}`));
174
177
  }
178
+ // RVF is a derived persistent index. A write is observable only through its
179
+ // authoritative SQLite metadata row, regardless of the process-wide memory
180
+ // setting. The factory routes memory mode to PatternStore, so a directly
181
+ // constructed RVF store without SQLite must fail before vector ingestion.
182
+ if (!this.sqliteStore) {
183
+ return err(new PatternMutationError(pattern.id, 'FAILED', new Error('authoritative SQLite pattern store is unavailable')));
184
+ }
175
185
  const activeSpaceId = getActiveEmbeddingSpaceIdentity()?.spaceId ?? this.embeddingSpaceId;
176
186
  if (pattern.embedding && !activeSpaceId) {
177
187
  return err(new Error('VECTOR_SPACE_UNVERIFIED: refusing to persist or index an embedding without runtime provenance'));
178
188
  }
189
+ let authoritativeCommitted = false;
179
190
  // Persist metadata to SQLite. #447: capture the returned id — ON CONFLICT
180
191
  // on (name, qe_domain, pattern_type) preserves the existing row's id, so
181
192
  // we must align pattern.id with what's actually stored before ingesting
@@ -190,21 +201,28 @@ export class RvfPatternStore {
190
201
  // before HNSW ingest (otherwise the index keys diverge from SQLite).
191
202
  pattern.id = actualId;
192
203
  }
204
+ authoritativeCommitted = true;
193
205
  }
194
206
  catch (error) {
195
- console.warn(`[RvfPatternStore] SQLite persist failed for ${pattern.id}:`, toErrorMessage(error));
207
+ return err(new PatternMutationError(pattern.id, 'FAILED', error));
196
208
  }
197
209
  }
210
+ if (pattern.embedding && !this.adapter && this.rvfInitError) {
211
+ return err(new PatternMutationError(pattern.id, authoritativeCommitted ? 'COMMITTED_PENDING_INDEX' : 'FAILED', new Error(`RVF unavailable ${authoritativeCommitted ? 'after' : 'before'} authoritative pattern commit: ${this.rvfInitError}`)));
212
+ }
198
213
  // Ingest vector into RVF
199
214
  if (pattern.embedding && this.adapter) {
200
215
  try {
201
216
  const vec = pattern.embedding instanceof Float32Array
202
217
  ? pattern.embedding
203
218
  : new Float32Array(pattern.embedding);
204
- this.adapter.ingest([{ id: pattern.id, vector: vec }]);
219
+ const ingest = this.adapter.ingest([{ id: pattern.id, vector: vec }]);
220
+ if (ingest.accepted !== 1 || ingest.rejected !== 0) {
221
+ throw new Error(`RVF rejected pattern vector (accepted=${ingest.accepted}, rejected=${ingest.rejected})`);
222
+ }
205
223
  }
206
224
  catch (error) {
207
- console.warn(`[RvfPatternStore] RVF ingest failed for ${pattern.id}:`, toErrorMessage(error));
225
+ return err(new PatternMutationError(pattern.id, authoritativeCommitted ? 'COMMITTED_PENDING_INDEX' : 'FAILED', error));
208
226
  }
209
227
  }
210
228
  return ok(pattern.id);
@@ -0,0 +1,5 @@
1
+ import type { StructuralRetrievalCorpus, StructuralTransformation } from './types.js';
2
+ export declare function createStructuralRetrievalCorpus(): StructuralRetrievalCorpus;
3
+ export declare const STRUCTURAL_RETRIEVAL_TRANSFORMATIONS: readonly StructuralTransformation[];
4
+ export declare function verifyStructuralRetrievalCorpus(corpus: StructuralRetrievalCorpus): boolean;
5
+ //# sourceMappingURL=corpus.d.ts.map
@@ -0,0 +1,97 @@
1
+ import { createHash } from 'node:crypto';
2
+ const REVISION = 'aqe-structural-transfer-2026-09-06';
3
+ const TRANSFORMATIONS = [
4
+ 'rename', 'framework-transfer', 'reordered-steps',
5
+ 'distractor-terminology', 'cross-domain-transfer',
6
+ ];
7
+ const SEEDS = [
8
+ ['async-race', 'observe completion before assertion', 'await the operation', 'increase the timeout', 'completion probe', 'unit', 'vitest'],
9
+ ['stale-cache', 'invalidate on every state mutation', 'invalidate the cache', 'retry the read', 'freshness assertion', 'integration', 'redis'],
10
+ ['transaction-leak', 'rollback isolates each test', 'rollback the transaction', 'truncate a shared table', 'row-count check', 'database', 'postgres'],
11
+ ['clock-skew', 'compare times in one clock domain', 'inject a monotonic clock', 'widen the time window', 'clock boundary check', 'unit', 'node'],
12
+ ['event-loss', 'subscribe before publishing', 'register the listener first', 'publish twice', 'delivery assertion', 'events', 'eventemitter'],
13
+ ['resource-leak', 'release resources on every exit', 'close in a finally block', 'raise the pool limit', 'handle-count check', 'integration', 'playwright'],
14
+ ['eventual-consistency', 'poll the observable state', 'poll with a bounded deadline', 'sleep for a fixed delay', 'state convergence', 'distributed', 'kubernetes'],
15
+ ['identity-confusion', 'compare canonical identities', 'normalize the identifier', 'use display names', 'identity equality', 'security', 'oauth'],
16
+ ['partial-write', 'publish only complete state', 'commit through an atomic swap', 'ignore missing fields', 'atomicity check', 'filesystem', 'node'],
17
+ ['order-dependence', 'tests start from isolated state', 'reset state in setup', 'force alphabetical order', 'shuffle repeat', 'unit', 'jest'],
18
+ ['schema-drift', 'validate at the boundary', 'reject the incompatible schema', 'cast the payload', 'schema validator', 'api', 'zod'],
19
+ ['backpressure-loss', 'producer respects consumer capacity', 'await the drain signal', 'increase buffer memory', 'loss counter', 'performance', 'streams'],
20
+ ['retry-duplication', 'retries preserve idempotency', 'attach an idempotency key', 'disable all retries', 'duplicate detector', 'api', 'fetch'],
21
+ ['permission-bypass', 'authorization precedes mutation', 'check permission before write', 'hide the user interface', 'denial assertion', 'security', 'express'],
22
+ ['encoding-mismatch', 'encode and decode with one charset', 'set UTF-8 explicitly', 'strip non-ASCII text', 'round-trip equality', 'api', 'json'],
23
+ ['pagination-gap', 'cursor advances from the last item', 'use the returned cursor', 'increase page size', 'set equality', 'api', 'graphql'],
24
+ ['cancellation-leak', 'cancellation propagates to children', 'forward the abort signal', 'wait for natural completion', 'abort observation', 'integration', 'abortcontroller'],
25
+ ['floating-point-boundary', 'compare numeric results by tolerance', 'use an error bound', 'round every input', 'relative-error check', 'unit', 'vitest'],
26
+ ['locale-dependence', 'format under an explicit locale', 'pass the locale explicitly', 'update the snapshot locally', 'multi-locale check', 'ui', 'intl'],
27
+ ['lock-starvation', 'lock acquisition remains fair', 'queue lock waiters', 'raise retry count', 'bounded-wait check', 'concurrency', 'mutex'],
28
+ ].map(([mechanism, invariant, action, wrongAction, oracle, domain, framework]) => ({
29
+ mechanism, invariant, action, wrongAction, oracle, domain, framework,
30
+ }));
31
+ function splitFor(index) {
32
+ if (index < 12)
33
+ return 'train';
34
+ if (index < 16)
35
+ return 'calibration';
36
+ return 'audit';
37
+ }
38
+ function stableHash(value) {
39
+ return createHash('sha256').update(JSON.stringify(value)).digest('hex');
40
+ }
41
+ function deepFreeze(value) {
42
+ if (value && typeof value === 'object' && !Object.isFrozen(value)) {
43
+ Object.freeze(value);
44
+ for (const child of Object.values(value))
45
+ deepFreeze(child);
46
+ }
47
+ return value;
48
+ }
49
+ function queryText(seed, transformation, index) {
50
+ const object = `component-${index + 41}`;
51
+ switch (transformation) {
52
+ case 'rename': return `${object} intermittently fails; ensure ${seed.invariant} by applying: ${seed.action}`;
53
+ case 'framework-transfer': return `In an alternative runtime, ${seed.mechanism} appears. Preserve this rule: ${seed.invariant}`;
54
+ case 'reordered-steps': return `Verify with ${seed.oracle}; first arrange the fixture, then ${seed.action}; fault: ${seed.mechanism}`;
55
+ case 'distractor-terminology': return `${seed.wrongAction} is tempting for ${seed.mechanism}, but the required invariant is ${seed.invariant}`;
56
+ case 'cross-domain-transfer': return `A ${seed.domain} workflow moved to service-${index}; reuse the mechanism ${seed.mechanism} and ${seed.action}`;
57
+ }
58
+ }
59
+ export function createStructuralRetrievalCorpus() {
60
+ const patterns = [];
61
+ const queries = [];
62
+ SEEDS.forEach((seed, index) => {
63
+ const familyId = `family-${String(index + 1).padStart(2, '0')}`;
64
+ const correctId = `${familyId}-structural`;
65
+ const distractorId = `${familyId}-surface-distractor`;
66
+ const counterexampleId = `${familyId}-counterexample`;
67
+ patterns.push({ id: correctId, familyId, framework: seed.framework, domain: seed.domain,
68
+ failureMechanism: seed.mechanism, invariant: seed.invariant, actions: [seed.action], oracle: seed.oracle,
69
+ text: `${seed.framework} ${seed.domain} ${seed.mechanism}: ${seed.action}; verify ${seed.oracle}` }, { id: distractorId, familyId, framework: seed.framework, domain: seed.domain,
70
+ failureMechanism: `symptom resembling ${seed.mechanism}`, invariant: 'mask the observed symptom',
71
+ actions: [seed.wrongAction], oracle: 'single rerun',
72
+ text: `${seed.framework} ${seed.domain} ${seed.mechanism}: ${seed.wrongAction}; quick ${seed.oracle}` }, { id: counterexampleId, familyId, framework: seed.framework, domain: seed.domain,
73
+ failureMechanism: seed.mechanism, invariant: `environment forbids ${seed.action}`,
74
+ actions: [`escalate instead of ${seed.action}`], oracle: 'environment constraint check',
75
+ text: `${seed.mechanism} ${seed.action} ${seed.framework}, but environment forbids the action` });
76
+ TRANSFORMATIONS.forEach((transformation) => queries.push({
77
+ id: `${familyId}-${transformation}`,
78
+ familyId,
79
+ split: splitFor(index),
80
+ transformation,
81
+ text: queryText(seed, transformation, index),
82
+ relevantPatternIds: [correctId],
83
+ mustNotRankAbove: [
84
+ { lowerPatternId: distractorId, higherPatternId: correctId },
85
+ { lowerPatternId: counterexampleId, higherPatternId: correctId },
86
+ ],
87
+ }));
88
+ });
89
+ const payload = { schemaVersion: 'aqe-structural-retrieval/v1', corpusRevision: REVISION, patterns, queries };
90
+ return deepFreeze({ ...payload, lineageHash: stableHash(payload) });
91
+ }
92
+ export const STRUCTURAL_RETRIEVAL_TRANSFORMATIONS = Object.freeze([...TRANSFORMATIONS]);
93
+ export function verifyStructuralRetrievalCorpus(corpus) {
94
+ const { lineageHash: _lineageHash, ...payload } = corpus;
95
+ return stableHash(payload) === corpus.lineageHash;
96
+ }
97
+ //# sourceMappingURL=corpus.js.map
@@ -0,0 +1,7 @@
1
+ import type { QueryRetrievalResult, RetrievalDiagnostic, StructuralRetrievalCorpus, StructuralRetrievalQuery, StructuralRetrievalReport } from './types.js';
2
+ export declare function diagnoseRetrieval(query: StructuralRetrievalQuery, result: QueryRetrievalResult, k: number): RetrievalDiagnostic;
3
+ export declare function evaluateStructuralRetrieval(corpus: StructuralRetrievalCorpus, results: QueryRetrievalResult[], options: {
4
+ rankerVersion: string;
5
+ k?: number;
6
+ }): StructuralRetrievalReport;
7
+ //# sourceMappingURL=evaluate.d.ts.map