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.
- package/.claude/helpers/brain-checkpoint.cjs +2 -1
- package/.claude/helpers/validate-v3-config.sh +6 -5
- package/.claude/hooks/aqe-hook.cjs +14 -14
- package/.claude/skills/qe-browser/evals/qe-browser.yaml +30 -41
- package/.claude/skills/qe-browser/fixtures/serve-skills.js +37 -0
- package/.claude/skills/qe-browser/scripts/lib/vibium.js +1 -1
- package/.claude/skills/qe-browser/scripts/smoke-test.sh +56 -25
- package/.claude/skills/qe-browser/scripts/visual-diff.js +24 -15
- package/.claude/skills/skills-manifest.json +1 -1
- package/CHANGELOG.md +114 -0
- package/assets/skills/qe-browser/evals/qe-browser.yaml +30 -41
- package/assets/skills/qe-browser/fixtures/serve-skills.js +37 -0
- package/assets/skills/qe-browser/scripts/lib/vibium.js +1 -1
- package/assets/skills/qe-browser/scripts/smoke-test.sh +56 -25
- package/assets/skills/qe-browser/scripts/visual-diff.js +24 -15
- package/assets/skills/skills-manifest.json +1 -1
- package/dist/cli/bundle.js +7 -7
- package/dist/cli/chunks/adapter-OJF6LAJV.js +2 -0
- package/dist/cli/chunks/{agent-booster-wasm-JZO6VUW4.js → agent-booster-wasm-SD5N32MX.js} +2 -2
- package/dist/cli/chunks/{agent-handler-534KFGEJ.js → agent-handler-OZRSJM7F.js} +2 -2
- package/dist/cli/chunks/{agent-memory-branch-B7KWLWY4.js → agent-memory-branch-NYTRANRN.js} +2 -2
- package/dist/cli/chunks/aqe-learning-engine-FGT474XB.js +2 -0
- package/dist/cli/chunks/{arena-OW5MELJX.js → arena-EX3SC2DP.js} +4 -4
- package/dist/cli/chunks/{arena-7CCD3S3I.js → arena-FOTVSRK4.js} +2 -2
- package/dist/cli/chunks/{audit-BHVKN4E2.js → audit-Q5GHSUQY.js} +3 -3
- package/dist/cli/chunks/base-HH765JFV.js +2 -0
- package/dist/cli/chunks/{better-sqlite3-P5FA6WFK.js → better-sqlite3-S7M5R2HS.js} +2 -2
- package/dist/cli/chunks/{brain-handler-WNW5LOV7.js → brain-handler-5FSA46R5.js} +3 -3
- package/dist/cli/chunks/{branch-enumerator-TVZ2ODKH.js → branch-enumerator-RWAXTGEU.js} +2 -2
- package/dist/cli/chunks/{browser-TCEB2W2F.js → browser-IGDESJGF.js} +2 -2
- package/dist/cli/chunks/browser-workflow-NPM4FUPI.js +2 -0
- package/dist/cli/chunks/{chunk-Q73RRTLE.js → chunk-2EHFEMRU.js} +2 -2
- package/dist/cli/chunks/{chunk-ZBOWR4XT.js → chunk-2H5YJ5ZK.js} +2 -2
- package/dist/cli/chunks/chunk-2LKAMMMI.js +2 -0
- package/dist/cli/chunks/{chunk-A2WZEMWT.js → chunk-2TG24LYQ.js} +1 -1
- package/dist/cli/chunks/{chunk-3QT6S3A3.js → chunk-3C2K4YMS.js} +3 -3
- package/dist/cli/chunks/{chunk-VESOYP6A.js → chunk-3DFFFXXO.js} +2 -2
- package/dist/cli/chunks/{chunk-K6CGQR5R.js → chunk-3WV4H33V.js} +1 -1
- package/dist/cli/chunks/{chunk-IL4AEB3J.js → chunk-42WUDDUU.js} +2 -2
- package/dist/cli/chunks/chunk-4AKGBUYD.js +4 -0
- package/dist/cli/chunks/{chunk-4FEJEVG7.js → chunk-4K27ESCA.js} +1 -1
- package/dist/cli/chunks/{chunk-TGOGCA74.js → chunk-4M6A3PVJ.js} +2 -2
- package/dist/cli/chunks/{chunk-RGVD6ZUX.js → chunk-4MH22236.js} +1 -1
- package/dist/cli/chunks/{chunk-6DPAMYLU.js → chunk-4N44UJGI.js} +2 -2
- package/dist/cli/chunks/{chunk-DJITEQYS.js → chunk-4PH7O5ZH.js} +2 -2
- package/dist/cli/chunks/{chunk-M3HUZD2I.js → chunk-4RT7I7PI.js} +1 -1
- package/dist/cli/chunks/chunk-4UCMTYFQ.js +65 -0
- package/dist/cli/chunks/{chunk-ZI3UO7QR.js → chunk-4ZUZDFAA.js} +2 -2
- package/dist/cli/chunks/{chunk-QSPRQPEL.js → chunk-57TNBR2P.js} +2 -2
- package/dist/cli/chunks/{chunk-ZCVJCCQQ.js → chunk-5EHLGOWW.js} +2 -2
- package/dist/cli/chunks/{chunk-ZAAYOENS.js → chunk-5WJUNRTY.js} +2 -2
- package/dist/cli/chunks/{chunk-QZPFUFZG.js → chunk-67A6PEZM.js} +2 -2
- package/dist/cli/chunks/{chunk-7BOPFN3Y.js → chunk-6EHN7Q2Q.js} +2 -2
- package/dist/cli/chunks/{chunk-2HYVOX6N.js → chunk-6F4WHN7D.js} +1 -1
- package/dist/cli/chunks/{chunk-GVEJP5T7.js → chunk-6LMLN5R2.js} +2 -2
- package/dist/cli/chunks/{chunk-QKQZ4IJF.js → chunk-6SZKLWZT.js} +5 -5
- package/dist/cli/chunks/{chunk-PEW6FZ47.js → chunk-6VKJAMZY.js} +1 -1
- package/dist/cli/chunks/{chunk-VYENTZ45.js → chunk-7AFBNU6K.js} +2 -2
- package/dist/cli/chunks/{chunk-6IJMD2ZL.js → chunk-7FWP7CZY.js} +3 -3
- package/dist/cli/chunks/{chunk-IE5LC7MB.js → chunk-7SK6IMGZ.js} +2 -2
- package/dist/cli/chunks/{chunk-3EM2MK3Z.js → chunk-A7N3YUDJ.js} +2 -2
- package/dist/cli/chunks/{chunk-J3XSHJGK.js → chunk-ADK7DF3G.js} +2 -2
- package/dist/cli/chunks/{chunk-EJ6IP7DE.js → chunk-ARMZYHYL.js} +2 -2
- package/dist/cli/chunks/{chunk-BZ4QVFP2.js → chunk-BWRHOIYC.js} +2 -2
- package/dist/cli/chunks/{chunk-A7SKM6JL.js → chunk-C7AXRI7E.js} +1 -1
- package/dist/cli/chunks/{chunk-4XTHRAUV.js → chunk-CG2MUD7U.js} +1 -1
- package/dist/cli/chunks/{chunk-HLNQDRHA.js → chunk-CH2TQCV5.js} +1 -1
- package/dist/cli/chunks/{chunk-JGROLJ33.js → chunk-CIESXO73.js} +1 -1
- package/dist/cli/chunks/{chunk-AR6SATU3.js → chunk-CJCT452S.js} +2 -2
- package/dist/cli/chunks/{chunk-UUJ5VQJM.js → chunk-CJHVOBJY.js} +1 -1
- package/dist/cli/chunks/{chunk-VOSISOFD.js → chunk-CTCQOYBS.js} +1 -1
- package/dist/cli/chunks/{chunk-XITTURP2.js → chunk-D4RCV4LY.js} +2 -2
- package/dist/cli/chunks/{chunk-5XGVSQS2.js → chunk-DRO5NJZA.js} +2 -2
- package/dist/cli/chunks/{chunk-QMMDN4WX.js → chunk-DVHWLAEO.js} +3 -3
- package/dist/cli/chunks/{chunk-5LEAGKX5.js → chunk-DW6ZMNMR.js} +2 -2
- package/dist/cli/chunks/{chunk-ZBKGX72B.js → chunk-E3Q7WNJD.js} +3 -3
- package/dist/cli/chunks/{chunk-5MZF4N4Q.js → chunk-EAJK25IS.js} +1 -1
- package/dist/cli/chunks/{chunk-3RYTAYR6.js → chunk-EH5OCHAJ.js} +1 -1
- package/dist/cli/chunks/{chunk-UI6WSPEK.js → chunk-F2KRT2II.js} +3 -3
- package/dist/cli/chunks/{chunk-NDPQ2WPU.js → chunk-FPHPP5TQ.js} +1 -1
- package/dist/cli/chunks/{chunk-WWWX76QB.js → chunk-FREF6Y4L.js} +2 -2
- package/dist/cli/chunks/{chunk-SROZXIMT.js → chunk-FVGTINVR.js} +54 -54
- package/dist/cli/chunks/{chunk-H3YDDKBW.js → chunk-G2CLZVYI.js} +3 -3
- package/dist/cli/chunks/{chunk-2O4DDPEA.js → chunk-G6AV2HGY.js} +3 -3
- package/dist/cli/chunks/{chunk-ENGKLFLY.js → chunk-GHQ5PUOV.js} +2 -2
- package/dist/cli/chunks/{chunk-NKWO2X3T.js → chunk-GHUPID5E.js} +1 -1
- package/dist/cli/chunks/{chunk-S5YVLPXU.js → chunk-GJAWEUIN.js} +2 -2
- package/dist/cli/chunks/{chunk-6IZQSLYZ.js → chunk-HBTC4L53.js} +2 -2
- package/dist/cli/chunks/{chunk-DDPJUAXQ.js → chunk-HSJ5FQCF.js} +2 -2
- package/dist/cli/chunks/{chunk-OONCRNFA.js → chunk-HZ6NEJMO.js} +2 -2
- package/dist/cli/chunks/{chunk-LCSVROU7.js → chunk-HZMLNM2T.js} +10 -10
- package/dist/cli/chunks/{chunk-JY4VZ6BN.js → chunk-ICKLBATY.js} +2 -2
- package/dist/cli/chunks/{chunk-JMKMDSXG.js → chunk-IUNMW454.js} +2 -2
- package/dist/cli/chunks/{chunk-XXFKN7LB.js → chunk-IVGVOGIZ.js} +1 -1
- package/dist/cli/chunks/{chunk-3GUO4ERR.js → chunk-IWFL6EFI.js} +2 -2
- package/dist/cli/chunks/{chunk-FRL3X2QA.js → chunk-JDXLCNKV.js} +2 -2
- package/dist/cli/chunks/{chunk-YW4RNZWT.js → chunk-JIUF6NV6.js} +2 -2
- package/dist/cli/chunks/{chunk-JAK5UUWH.js → chunk-JQ2ZD3WO.js} +2 -2
- package/dist/cli/chunks/{chunk-YEAC3DC6.js → chunk-K574FLVB.js} +2 -2
- package/dist/cli/chunks/{chunk-LZHTCUCO.js → chunk-KEEBUVGV.js} +2 -2
- package/dist/cli/chunks/{chunk-LKR7T3OZ.js → chunk-KFXZDQ5J.js} +1 -1
- package/dist/cli/chunks/{chunk-7OUMJCJT.js → chunk-KPFG4OIM.js} +1 -1
- package/dist/cli/chunks/{chunk-HQ7243G3.js → chunk-KZOBLLXW.js} +2 -2
- package/dist/cli/chunks/{chunk-R6WJF4D5.js → chunk-L2F7FVIU.js} +2 -2
- package/dist/cli/chunks/{chunk-VRRG66XB.js → chunk-LML5VTFK.js} +1 -1
- package/dist/cli/chunks/{chunk-JTWJR2KY.js → chunk-LWUJQGCS.js} +2 -2
- package/dist/cli/chunks/{chunk-BQCTO7UB.js → chunk-MH73D5TN.js} +2 -2
- package/dist/cli/chunks/{chunk-U4GZWPKM.js → chunk-MWQTACNA.js} +2 -2
- package/dist/cli/chunks/{chunk-CIZ6LSNV.js → chunk-N3RN4QTC.js} +2 -2
- package/dist/cli/chunks/{chunk-ZQSXG7FA.js → chunk-N5ZRUOMR.js} +2 -2
- package/dist/cli/chunks/{chunk-AFGT26NR.js → chunk-NAZVPZJS.js} +2 -2
- package/dist/cli/chunks/{chunk-FOHYBR3O.js → chunk-NG2UVPTW.js} +1 -1
- package/dist/cli/chunks/{chunk-2D7UBX5S.js → chunk-NHHWLJQF.js} +1 -1
- package/dist/cli/chunks/{chunk-JRKEBESE.js → chunk-NNOMDM4N.js} +2 -2
- package/dist/cli/chunks/{chunk-YKWMKRYB.js → chunk-NRR23SJV.js} +1 -1
- package/dist/cli/chunks/{chunk-WKNWRDA5.js → chunk-NWFIJNEB.js} +1 -1
- package/dist/cli/chunks/{chunk-4MK2G6TK.js → chunk-OBCKP3G4.js} +2 -2
- package/dist/cli/chunks/{chunk-YKZV7O65.js → chunk-OC2CKU7I.js} +2 -2
- package/dist/cli/chunks/{chunk-7RVAHJQZ.js → chunk-OX6T26CD.js} +3 -3
- package/dist/cli/chunks/chunk-P64DMQ2C.js +2 -0
- package/dist/cli/chunks/{chunk-RKUYVVGJ.js → chunk-PFXX5Q32.js} +2 -2
- package/dist/cli/chunks/chunk-PHHXHG2W.js +2 -0
- package/dist/cli/chunks/{chunk-N2YAUDAV.js → chunk-PMUBG2RU.js} +2 -2
- package/dist/cli/chunks/{chunk-WTHAVFIC.js → chunk-PVHO6KLB.js} +1 -1
- package/dist/cli/chunks/{chunk-MO7EITJK.js → chunk-PWEIDHT7.js} +2 -2
- package/dist/cli/chunks/{chunk-52DFCV57.js → chunk-PZKZY6PB.js} +2 -2
- package/dist/cli/chunks/{chunk-I3VHXA2W.js → chunk-Q335R4MR.js} +2 -2
- package/dist/cli/chunks/{chunk-ECTPFCON.js → chunk-Q3JHS3UD.js} +2 -2
- package/dist/cli/chunks/{chunk-HJIAVR6P.js → chunk-QFUX7ELG.js} +2 -2
- package/dist/cli/chunks/{chunk-L4C42WYI.js → chunk-QW4LN5NK.js} +2 -2
- package/dist/cli/chunks/{chunk-HQHLHSJO.js → chunk-QXTW7XCS.js} +2 -2
- package/dist/cli/chunks/{chunk-SSV6KSFT.js → chunk-R5RNOLHI.js} +1 -1
- package/dist/cli/chunks/{chunk-AVLA5PBJ.js → chunk-RCI64RIJ.js} +2 -2
- package/dist/cli/chunks/{chunk-T3BZAFLP.js → chunk-RFNEHNJV.js} +1 -1
- package/dist/cli/chunks/{chunk-IL6QRXRP.js → chunk-RGH3WGWD.js} +10 -10
- package/dist/cli/chunks/{chunk-E4NU4BJA.js → chunk-RHJVDCLV.js} +2 -2
- package/dist/cli/chunks/{chunk-KTSCZ7AW.js → chunk-RVCWSAXI.js} +2 -2
- package/dist/cli/chunks/{chunk-TQJE7DNL.js → chunk-RYJHREYS.js} +2 -2
- package/dist/cli/chunks/{chunk-HNKPLVYS.js → chunk-S4MR6RTE.js} +1 -1
- package/dist/cli/chunks/{chunk-6AYO3IR2.js → chunk-S7N4BKI3.js} +2 -2
- package/dist/cli/chunks/{chunk-2NO4H35K.js → chunk-SEHCX4NH.js} +1 -1
- package/dist/cli/chunks/{chunk-GKNDP5VK.js → chunk-T46LOLW3.js} +2 -2
- package/dist/cli/chunks/{chunk-VXU53F7Z.js → chunk-T4C56HBW.js} +2 -2
- package/dist/cli/chunks/{chunk-43GPSYAL.js → chunk-TENYL5TI.js} +2 -2
- package/dist/cli/chunks/{chunk-6AOZU3UN.js → chunk-TLPL3EQY.js} +2 -2
- package/dist/cli/chunks/{chunk-4ZVGSVHV.js → chunk-TYVQNYXX.js} +4 -4
- package/dist/cli/chunks/{chunk-NOPVFBQM.js → chunk-U2AY57XZ.js} +2 -2
- package/dist/cli/chunks/{chunk-IQLRA4FV.js → chunk-U54OOA24.js} +1 -1
- package/dist/cli/chunks/{chunk-IQ3JFHZN.js → chunk-UHTAI4ZB.js} +1 -1
- package/dist/cli/chunks/{chunk-KDIZQHG5.js → chunk-UIGEUEBT.js} +2 -2
- package/dist/cli/chunks/{chunk-5VDVYTO5.js → chunk-UYTWDS2R.js} +2 -2
- package/dist/cli/chunks/{chunk-ZNSMVQCG.js → chunk-VNAKBHJI.js} +2 -2
- package/dist/cli/chunks/{chunk-SUSMHSXT.js → chunk-VOYJJ3KA.js} +2 -2
- package/dist/cli/chunks/{chunk-QQCENKCX.js → chunk-VSYBMNIR.js} +1 -1
- package/dist/cli/chunks/{chunk-7RAB2BZY.js → chunk-W2FLULF4.js} +2 -2
- package/dist/cli/chunks/{chunk-NYARYONH.js → chunk-W4OQYLYO.js} +1 -1
- package/dist/cli/chunks/{chunk-DOWCOZDO.js → chunk-WBH4C4BG.js} +2 -2
- package/dist/cli/chunks/{chunk-OIYUSWHX.js → chunk-WBMRADQP.js} +1 -1
- package/dist/cli/chunks/{chunk-B3H4K7CY.js → chunk-WMW47QMR.js} +2 -2
- package/dist/cli/chunks/{chunk-VPVZHJSU.js → chunk-WVY22NHZ.js} +2 -2
- package/dist/cli/chunks/{chunk-6W42XWLL.js → chunk-WXMSRBQF.js} +2 -2
- package/dist/cli/chunks/{chunk-CIUOC5F3.js → chunk-XPLSLHRB.js} +1 -1
- package/dist/cli/chunks/{chunk-E722WNWC.js → chunk-YF5OP6CR.js} +2 -2
- package/dist/cli/chunks/{chunk-H76TV4UU.js → chunk-YN6W2XIT.js} +3 -3
- package/dist/cli/chunks/{chunk-FF43SRP6.js → chunk-ZCDXJ27H.js} +1 -1
- package/dist/cli/chunks/{chunk-TKYEP7OR.js → chunk-ZFGND4QK.js} +1 -1
- package/dist/cli/chunks/{chunk-O2MZZL54.js → chunk-ZWRQ5VAU.js} +2 -2
- package/dist/cli/chunks/{chunk-H6NFDOMK.js → chunk-ZYLSOBOR.js} +1 -1
- package/dist/cli/chunks/{ci-B432UH6N.js → ci-NTRH7PAW.js} +2 -2
- package/dist/cli/chunks/{ci-output-GTHH7WYG.js → ci-output-F57RSD35.js} +2 -2
- package/dist/cli/chunks/{circuit-breaker-VW75DLME.js → circuit-breaker-4WST3QSA.js} +2 -2
- package/dist/cli/chunks/{claude-flow-setup-RE3IVT7U.js → claude-flow-setup-KB4TKMYI.js} +2 -2
- package/dist/cli/chunks/client-GPZEC54E.js +2 -0
- package/dist/cli/chunks/{cline-installer-NUBZZ55N.js → cline-installer-W2ZHQ6WM.js} +2 -2
- package/dist/cli/chunks/{code-K6JCWKNW.js → code-TF2AVR5D.js} +2 -2
- package/dist/cli/chunks/{code-index-extractor-I4ILB5JN.js → code-index-extractor-RMDRUVQJ.js} +2 -2
- package/dist/cli/chunks/codex-installer-VSTRHJHV.js +14 -0
- package/dist/cli/chunks/{completions-V3KJVJF4.js → completions-3Q37QVFR.js} +2 -2
- package/dist/cli/chunks/{complexity-analyzer-HRG7OOY3.js → complexity-analyzer-3FNFLACD.js} +2 -2
- package/dist/cli/chunks/{continuedev-installer-CNTDONWG.js → continuedev-installer-VTEXM455.js} +2 -2
- package/dist/cli/chunks/{copilot-installer-XPWWIWYA.js → copilot-installer-AGY7DQUS.js} +2 -2
- package/dist/cli/chunks/core-handlers-YMGHYIBR.js +2 -0
- package/dist/cli/chunks/{cost-tracker-MFNLQ56K.js → cost-tracker-LTZAQBX7.js} +2 -2
- package/dist/cli/chunks/{coverage-KOIK654V.js → coverage-TT64IOS4.js} +3 -3
- package/dist/cli/chunks/cross-domain-router-ECBNTGYJ.js +2 -0
- package/dist/cli/chunks/{cursor-installer-S5MKLRQQ.js → cursor-installer-OVOJIOHN.js} +2 -2
- package/dist/cli/chunks/{daemon-DUS6JYW6.js → daemon-DMFZMXKA.js} +8 -8
- package/dist/cli/chunks/{daemon-Z7VPGWHY.js → daemon-XCULEHWY.js} +4 -4
- package/dist/cli/chunks/{dag-attention-scheduler-7CQ3ARNI.js → dag-attention-scheduler-WW2RX4B5.js} +2 -2
- package/dist/cli/chunks/{detect-WORBCAYF.js → detect-QNWIM232.js} +2 -2
- package/dist/cli/chunks/{dist-node-KRNI6OYW.js → dist-node-6GQIY3CG.js} +2 -2
- package/dist/cli/chunks/{domain-handler-KRUR2VQG.js → domain-handler-6RJPDELX.js} +2 -2
- package/dist/cli/chunks/{domain-transfer-VEOVLV54.js → domain-transfer-WK524LBS.js} +2 -2
- package/dist/cli/chunks/dream-EHGKCFWH.js +2 -0
- package/dist/cli/chunks/{embed-and-insert-pattern-QU3NQVA5.js → embed-and-insert-pattern-SO6GWJW7.js} +2 -2
- package/dist/cli/chunks/{eval-AYQ7BSUP.js → eval-GL544IPO.js} +2 -2
- package/dist/cli/chunks/{experience-capture-middleware-AWQBL6LT.js → experience-capture-middleware-BCCJ35OX.js} +3 -3
- package/dist/cli/chunks/{fast-paths-V5EL4BYJ.js → fast-paths-CATDDBEU.js} +2 -2
- package/dist/cli/chunks/{feature-flags-P34BPRWU.js → feature-flags-BUXNAORY.js} +2 -2
- package/dist/cli/chunks/{feature-flags-BXX7BP22.js → feature-flags-KNNWWP5G.js} +2 -2
- package/dist/cli/chunks/{file-discovery-MS6BKQ2U.js → file-discovery-S4HF3O7D.js} +2 -2
- package/dist/cli/chunks/{fleet-7WVVPA4W.js → fleet-DQVQQONW.js} +3 -3
- package/dist/cli/chunks/{gnn-wrapper-7WQ3LEPG.js → gnn-wrapper-G7ABZUG7.js} +2 -2
- package/dist/cli/chunks/{heartbeat-handler-P7QD3BZH.js → heartbeat-handler-UFMELIWT.js} +4 -4
- package/dist/cli/chunks/heartbeat-scheduler-UFEL2CBW.js +2 -0
- package/dist/cli/chunks/hnsw-adapter-BLSD45CX.js +2 -0
- package/dist/cli/chunks/hnsw-index-A3RZODEN.js +2 -0
- package/dist/cli/chunks/{hnsw-legacy-bridge-Y3GAR3UP.js → hnsw-legacy-bridge-YIILSRXI.js} +2 -2
- package/dist/cli/chunks/{hnswlib-node-5QUXZQWQ.js → hnswlib-node-TSVRMXDH.js} +2 -2
- package/dist/cli/chunks/{hooks-2D64KPRY.js → hooks-OHQPNK74.js} +10 -10
- package/dist/cli/chunks/{hypergraph-engine-5INXEZDP.js → hypergraph-engine-LY7PJDSL.js} +2 -2
- package/dist/cli/chunks/{hypergraph-handler-YJJJ3ESZ.js → hypergraph-handler-YGDYZO6H.js} +3 -3
- package/dist/cli/chunks/impact-analyzer-OXHD3FOH.js +2 -0
- package/dist/cli/chunks/{init-handler-QSFYJN5Q.js → init-handler-MTK65LI3.js} +9 -8
- package/dist/cli/chunks/init-wizard-PKZL7QBU.js +2 -0
- package/dist/cli/chunks/kernel-XWPM72UJ.js +2 -0
- package/dist/cli/chunks/{kilocode-installer-3N3QGTJU.js → kilocode-installer-3IICU4RS.js} +2 -2
- package/dist/cli/chunks/{kiro-installer-GIWVTFZQ.js → kiro-installer-MXOVQYQA.js} +2 -2
- package/dist/cli/chunks/knowledge-graph-FRKR5XWI.js +2 -0
- package/dist/cli/chunks/{learning-SGO2DQ5Q.js → learning-EV5LSOOM.js} +3 -3
- package/dist/cli/chunks/{llm-router-HBBULO65.js → llm-router-7LYDJUOT.js} +4 -4
- package/dist/cli/chunks/llm-router-service-R7A5HHDM.js +2 -0
- package/dist/cli/chunks/{load-B5OFYB4H.js → load-F4PVAMXQ.js} +2 -2
- package/dist/cli/chunks/load-test-5IKDWSYL.js +2 -0
- package/dist/cli/chunks/{mcp-FG3LNQR4.js → mcp-DUYJUEME.js} +2 -2
- package/dist/cli/chunks/{memory-SPS7ZWLC.js → memory-XTTYORAS.js} +5 -5
- package/dist/cli/chunks/memory-backend-7VW5QCMO.js +2 -0
- package/dist/cli/chunks/{memory-handlers-P7FTPWP3.js → memory-handlers-VZH3R2TQ.js} +2 -2
- package/dist/cli/chunks/{multi-model-executor-PUB7E6KH.js → multi-model-executor-R6XCTMCF.js} +2 -2
- package/dist/cli/chunks/{opencode-installer-TGCSGVG2.js → opencode-installer-33ULBU2F.js} +2 -2
- package/dist/cli/chunks/{orchestrator-S5FTJFGB.js → orchestrator-34ZJEKTJ.js} +22 -21
- package/dist/cli/chunks/pattern-null-store-BU6LCB2W.js +2 -0
- package/dist/cli/chunks/{pattern-usage-recorder-LCXXGRAB.js → pattern-usage-recorder-GZ2M3F2E.js} +2 -2
- package/dist/cli/chunks/{pipeline-ENOSRHKW.js → pipeline-SR5OTY45.js} +2 -2
- package/dist/cli/chunks/platform-VKJFJIAW.js +2 -0
- package/dist/cli/chunks/{plugin-JZ5ODJSU.js → plugin-5C5UBQUQ.js} +2 -2
- package/dist/cli/chunks/{prime-radiant-advanced-wasm-DPJUPNCG.js → prime-radiant-advanced-wasm-KO2PQI3D.js} +2 -2
- package/dist/cli/chunks/protocol-executor-BSP5LWJN.js +2 -0
- package/dist/cli/chunks/{protocol-handler-IP4NLVY3.js → protocol-handler-ZF74NIKA.js} +2 -2
- package/dist/cli/chunks/{prove-P6FM4RU7.js → prove-MO5TQQU4.js} +2 -2
- package/dist/cli/chunks/qe-reasoning-bank-J2RC7P25.js +2 -0
- package/dist/cli/chunks/{quality-UHP4XO26.js → quality-EYIN6AER.js} +2 -2
- package/dist/cli/chunks/quality-gate-V6OQM57O.js +7 -0
- package/dist/cli/chunks/queen-coordinator-XI5AJV2V.js +2 -0
- package/dist/cli/chunks/{real-embeddings-6SO5MFRQ.js → real-embeddings-AR7TZX7U.js} +2 -2
- package/dist/cli/chunks/{roocode-installer-WTWUOFCH.js → roocode-installer-46E626VZ.js} +2 -2
- package/dist/cli/chunks/router-VXQYYA3D.js +2 -0
- package/dist/cli/chunks/routing-feedback-HZQTASFF.js +2 -0
- package/dist/cli/chunks/{routing-handler-IK7HYERQ.js → routing-handler-ZNRVW6QW.js} +2 -2
- package/dist/cli/chunks/{ruvector-commands-THLB4NIM.js → ruvector-commands-4L2CQMWS.js} +2 -2
- package/dist/cli/chunks/rvf-dual-writer-BDTLLJER.js +2 -0
- package/dist/cli/chunks/rvf-migration-adapter-IB343MDN.js +2 -0
- package/dist/cli/chunks/{rvf-migration-coordinator-BUKCSHBD.js → rvf-migration-coordinator-H4RVGBIA.js} +2 -2
- package/dist/cli/chunks/rvf-native-adapter-Y7SN7LHU.js +2 -0
- package/dist/cli/chunks/{rvf-store-integrity-ECTADZIN.js → rvf-store-integrity-OJGWWPLL.js} +2 -2
- package/dist/cli/chunks/safe-db-2VTKKBJU.js +2 -0
- package/dist/cli/chunks/schedule-QJ4CFGJY.js +2 -0
- package/dist/cli/chunks/scheduler-2NHDQPC3.js +2 -0
- package/dist/cli/chunks/{security-HN4UXFXX.js → security-JF3BVNRO.js} +3 -3
- package/dist/cli/chunks/{shared-rvf-adapter-XJCPX5SN.js → shared-rvf-adapter-M6NNIZ5W.js} +2 -2
- package/dist/cli/chunks/{shared-rvf-dual-writer-23X5PNY5.js → shared-rvf-dual-writer-LHMFCYVE.js} +2 -2
- package/dist/cli/chunks/sqlite-persistence-NVVAPZN3.js +2 -0
- package/dist/cli/chunks/{status-handler-ZXANTHKT.js → status-handler-GMIOXQIE.js} +2 -2
- package/dist/cli/chunks/{structural-health-LR6WI3AH.js → structural-health-YZXHVHM6.js} +2 -2
- package/dist/cli/chunks/{sync-I5IUJF33.js → sync-GMPCPV5L.js} +2 -2
- package/dist/cli/chunks/{sync-4OEI3BC2.js → sync-N56UQGCS.js} +2 -2
- package/dist/cli/chunks/{task-handler-R3ATJKU5.js → task-handler-VTNRGAXP.js} +2 -2
- package/dist/cli/chunks/{task-handlers-4X357AEW.js → task-handlers-FYSDH55N.js} +3 -3
- package/dist/cli/chunks/{test-PR2B5H2F.js → test-GQNCKRSP.js} +4 -4
- package/dist/cli/chunks/{test-scheduling-ZNOSQVLD.js → test-scheduling-GPRXSIRP.js} +3 -3
- package/dist/cli/chunks/{token-bootstrap-LYXOI72S.js → token-bootstrap-76SRNXGG.js} +2 -2
- package/dist/cli/chunks/{token-usage-R6EQZBX2.js → token-usage-O7CZDP5Q.js} +2 -2
- package/dist/cli/chunks/{transformers-COQWK27J.js → transformers-LTU4LSSC.js} +2 -2
- package/dist/cli/chunks/{tree-sitter-wasm-parser-LLIW2X3M.js → tree-sitter-wasm-parser-NQSQCMBM.js} +2 -2
- package/dist/cli/chunks/{types-MEYTZITK.js → types-OP6IWE6N.js} +2 -2
- package/dist/cli/chunks/unified-memory-DSTIEDSH.js +2 -0
- package/dist/cli/chunks/unified-memory-hnsw-KBV3P4OS.js +2 -0
- package/dist/cli/chunks/unified-persistence-XKCOUBKY.js +2 -0
- package/dist/cli/chunks/{upgrade-DVIJ456A.js → upgrade-OQWRBZ3R.js} +2 -2
- package/dist/cli/chunks/{validate-UYTSMJ5X.js → validate-TH5SRP3E.js} +2 -2
- package/dist/cli/chunks/{validate-swarm-P32WCJR6.js → validate-swarm-UITL2JUS.js} +2 -2
- package/dist/cli/chunks/{vibium-JGVOLM6X.js → vibium-O6PRAG4J.js} +2 -2
- package/dist/cli/chunks/visual-security-TTWSPZTZ.js +2 -0
- package/dist/cli/chunks/{web-tree-sitter-5ZGNCTPN.js → web-tree-sitter-XBFBY4OF.js} +2 -2
- package/dist/cli/chunks/{windsurf-installer-IILSSQAE.js → windsurf-installer-DVT5NRNY.js} +2 -2
- package/dist/cli/chunks/witness-chain-2KY73HPN.js +2 -0
- package/dist/cli/chunks/{witness-chain-JZMXCG3B.js → witness-chain-VRSH2F36.js} +2 -2
- package/dist/cli/chunks/{witness-key-manager-UUTLNUIH.js → witness-key-manager-GFHRDKQ4.js} +2 -2
- package/dist/cli/chunks/{workflow-NS7HXVHZ.js → workflow-HAZ6YKOG.js} +4 -4
- package/dist/cli/chunks/workflow-orchestrator-UK56AVOT.js +2 -0
- package/dist/cli/chunks/{wrappers-XKEDSV5W.js → wrappers-5LLLT7GM.js} +2 -2
- package/dist/cli/commands/daemon.js +3 -0
- package/dist/cli/commands/platform.d.ts +1 -0
- package/dist/cli/commands/platform.js +28 -6
- package/dist/cli/commands/quality-gate.js +25 -3
- package/dist/cli/foreground-command.d.ts +3 -0
- package/dist/cli/foreground-command.js +22 -0
- package/dist/cli/handlers/init-handler.d.ts +5 -0
- package/dist/cli/handlers/init-handler.js +6 -0
- package/dist/cli/index.js +8 -1
- package/dist/contracts/verdicts.d.ts +625 -0
- package/dist/contracts/verdicts.js +202 -14
- package/dist/coordination/handlers/coverage-handlers.js +8 -1
- package/dist/domains/chaos-resilience/diagnosis/corpus.d.ts +5 -0
- package/dist/domains/chaos-resilience/diagnosis/corpus.js +141 -0
- package/dist/domains/chaos-resilience/diagnosis/detectors.d.ts +11 -0
- package/dist/domains/chaos-resilience/diagnosis/detectors.js +109 -0
- package/dist/domains/chaos-resilience/diagnosis/index.d.ts +5 -0
- package/dist/domains/chaos-resilience/diagnosis/index.js +5 -0
- package/dist/domains/chaos-resilience/diagnosis/scorer.d.ts +8 -0
- package/dist/domains/chaos-resilience/diagnosis/scorer.js +128 -0
- package/dist/domains/chaos-resilience/diagnosis/types.d.ts +171 -0
- package/dist/domains/chaos-resilience/diagnosis/types.js +3 -0
- package/dist/domains/chaos-resilience/index.d.ts +1 -0
- package/dist/domains/chaos-resilience/index.js +1 -0
- package/dist/domains/index.d.ts +1 -0
- package/dist/domains/index.js +1 -0
- package/dist/early-exit/early-exit-controller.d.ts +4 -2
- package/dist/early-exit/early-exit-controller.js +95 -7
- package/dist/early-exit/index.d.ts +1 -1
- package/dist/early-exit/speculative-executor.js +3 -0
- package/dist/early-exit/types.d.ts +51 -0
- package/dist/early-exit/types.js +3 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.js +2 -1
- package/dist/init/browser-engine-installer.d.ts +11 -0
- package/dist/init/browser-engine-installer.js +35 -5
- package/dist/init/codex-installer.d.ts +11 -1
- package/dist/init/codex-installer.js +90 -24
- package/dist/init/init-wizard-hooks.js +11 -11
- package/dist/init/orchestrator.js +2 -0
- package/dist/init/phases/07-hooks.d.ts +3 -3
- package/dist/init/phases/07-hooks.js +19 -18
- package/dist/init/phases/09-assets.d.ts +4 -0
- package/dist/init/phases/09-assets.js +13 -10
- package/dist/init/phases/phase-interface.d.ts +2 -0
- package/dist/init/types.d.ts +4 -0
- package/dist/learning/index.d.ts +3 -0
- package/dist/learning/index.js +2 -0
- package/dist/learning/pattern-mutation-error.d.ts +9 -0
- package/dist/learning/pattern-mutation-error.js +14 -0
- package/dist/learning/pattern-store.js +24 -2
- package/dist/learning/qe-reasoning-bank.js +24 -5
- package/dist/learning/rvf-pattern-store.js +23 -5
- package/dist/learning/structural-retrieval/corpus.d.ts +5 -0
- package/dist/learning/structural-retrieval/corpus.js +97 -0
- package/dist/learning/structural-retrieval/evaluate.d.ts +7 -0
- package/dist/learning/structural-retrieval/evaluate.js +124 -0
- package/dist/learning/structural-retrieval/index.d.ts +6 -0
- package/dist/learning/structural-retrieval/index.js +4 -0
- package/dist/learning/structural-retrieval/receipt.d.ts +14 -0
- package/dist/learning/structural-retrieval/receipt.js +36 -0
- package/dist/learning/structural-retrieval/types.d.ts +83 -0
- package/dist/learning/structural-retrieval/types.js +2 -0
- package/dist/mcp/bundle.js +423 -423
- package/dist/mcp/index.d.ts +1 -0
- package/dist/mcp/index.js +1 -0
- package/dist/mcp/protocol-server.js +11 -2
- package/dist/mcp/qe-tool-bridge.js +1 -0
- package/dist/mcp/services/session-resume.d.ts +15 -19
- package/dist/mcp/services/session-resume.js +204 -194
- package/dist/mcp/tool-annotations.d.ts +25 -0
- package/dist/mcp/tool-annotations.js +75 -0
- package/dist/mcp/tool-registry.js +17 -12
- package/dist/mcp/tools/base.d.ts +7 -1
- package/dist/mcp/tools/base.js +8 -0
- package/dist/mcp/tools/quality-assessment/gate.d.ts +8 -5
- package/dist/mcp/tools/quality-assessment/gate.js +9 -4
- package/dist/mcp/tools/registry.d.ts +3 -0
- package/dist/mcp/tools/registry.js +1 -0
- package/dist/mcp/types.d.ts +15 -0
- package/dist/skills/qe-court/cli.js +0 -0
- package/dist/validation/quality-gate-runner.d.ts +27 -4
- package/dist/validation/quality-gate-runner.js +33 -4
- package/dist/validation/verification-reach.d.ts +90 -0
- package/dist/validation/verification-reach.js +187 -0
- package/dist/verification/adversarial-verify/index.d.ts +1 -1
- package/dist/verification/adversarial-verify/measurement-receipt.d.ts +13 -0
- package/dist/verification/adversarial-verify/measurement-receipt.js +136 -0
- package/dist/verification/adversarial-verify/synthesize.js +7 -10
- package/dist/verification/adversarial-verify/types.d.ts +35 -0
- package/dist/verification/adversarial-verify/verify.js +6 -1
- package/package.json +9 -5
- package/schemas/coverage-gap.schema.json +41 -0
- package/schemas/finding-verdict.schema.json +470 -0
- package/schemas/risk-decision.schema.json +41 -0
- package/dist/cli/chunks/adapter-3VBXL7DO.js +0 -2
- package/dist/cli/chunks/aqe-learning-engine-NXRNKJNA.js +0 -2
- package/dist/cli/chunks/base-F6GMOKU2.js +0 -2
- package/dist/cli/chunks/browser-workflow-QRDC46LR.js +0 -2
- package/dist/cli/chunks/chunk-3JIJBR4V.js +0 -2
- package/dist/cli/chunks/chunk-R2B6EE45.js +0 -2
- package/dist/cli/chunks/chunk-TRDEULS7.js +0 -4
- package/dist/cli/chunks/chunk-WJXHE52V.js +0 -65
- package/dist/cli/chunks/client-HNBZUEVV.js +0 -2
- package/dist/cli/chunks/codex-installer-AKQ5BCHU.js +0 -15
- package/dist/cli/chunks/core-handlers-TB7NLYXL.js +0 -2
- package/dist/cli/chunks/cross-domain-router-MDSI553U.js +0 -2
- package/dist/cli/chunks/dream-X7ISHFEE.js +0 -2
- package/dist/cli/chunks/heartbeat-scheduler-2C5XGFQT.js +0 -2
- package/dist/cli/chunks/hnsw-adapter-KCVMXLUL.js +0 -2
- package/dist/cli/chunks/hnsw-index-OGWZS6MP.js +0 -2
- package/dist/cli/chunks/impact-analyzer-IBJ43GQL.js +0 -2
- package/dist/cli/chunks/init-wizard-6XMFD5LP.js +0 -2
- package/dist/cli/chunks/kernel-UDUMUPB3.js +0 -2
- package/dist/cli/chunks/knowledge-graph-JRYTUG3W.js +0 -2
- package/dist/cli/chunks/llm-router-service-KF5ZALUQ.js +0 -2
- package/dist/cli/chunks/load-test-LHMBCNCH.js +0 -2
- package/dist/cli/chunks/memory-backend-WZHKHBZK.js +0 -2
- package/dist/cli/chunks/pattern-null-store-UZSHCRL2.js +0 -2
- package/dist/cli/chunks/platform-WCRBO3Z7.js +0 -2
- package/dist/cli/chunks/protocol-executor-42NLVDTC.js +0 -2
- package/dist/cli/chunks/qe-reasoning-bank-W74RSMMU.js +0 -2
- package/dist/cli/chunks/quality-gate-63DDBSGM.js +0 -7
- package/dist/cli/chunks/queen-coordinator-XELKSRMS.js +0 -2
- package/dist/cli/chunks/router-GTW2EQZV.js +0 -2
- package/dist/cli/chunks/routing-feedback-NVOBWEMK.js +0 -2
- package/dist/cli/chunks/rvf-dual-writer-5OPVMXNL.js +0 -2
- package/dist/cli/chunks/rvf-migration-adapter-5S4YFTX4.js +0 -2
- package/dist/cli/chunks/rvf-native-adapter-LYSJHEVX.js +0 -2
- package/dist/cli/chunks/safe-db-AEB3JMLD.js +0 -2
- package/dist/cli/chunks/schedule-4QNPCQNT.js +0 -2
- package/dist/cli/chunks/scheduler-S3DFHX6A.js +0 -2
- package/dist/cli/chunks/sqlite-persistence-L2KISU2H.js +0 -2
- package/dist/cli/chunks/unified-memory-5KQMA7FV.js +0 -2
- package/dist/cli/chunks/unified-memory-hnsw-PQRPTYOD.js +0 -2
- package/dist/cli/chunks/unified-persistence-YDONVPJB.js +0 -2
- package/dist/cli/chunks/visual-security-RJ7RTNGJ.js +0 -2
- package/dist/cli/chunks/witness-chain-YXXXNGAM.js +0 -2
- 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
|
|
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
|
|
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
|
-
|
|
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
|
-
*
|
|
426
|
-
*
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
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 */
|
package/dist/init/types.d.ts
CHANGED
package/dist/learning/index.d.ts
CHANGED
|
@@ -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';
|
package/dist/learning/index.js
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
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 (
|
|
286
|
-
|
|
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 &&
|
|
307
|
+
if (this.rvfDualWriter && sideEffectPattern.embedding && sideEffectPattern.embedding.length > 0) {
|
|
289
308
|
try {
|
|
290
|
-
this.rvfDualWriter.writePattern(
|
|
309
|
+
this.rvfDualWriter.writePattern(sideEffectPattern.id, sideEffectPattern.embedding);
|
|
291
310
|
}
|
|
292
311
|
catch (rvfErr) {
|
|
293
|
-
logger.warn('RVF dual-write failed (non-fatal)', { patternId:
|
|
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
|
|
68
|
-
//
|
|
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
|
-
|
|
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
|
-
|
|
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
|