agentic-qe 3.15.1 → 3.15.3
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 +46 -6
- package/.claude/hooks/aqe-hook.cjs +280 -51
- package/.claude/skills/skills-manifest.json +1 -1
- package/CHANGELOG.md +129 -0
- package/assets/skills/skills-manifest.json +1 -1
- package/dist/adapters/ag-ui/state-delta-cache.js +14 -5
- package/dist/adapters/trajectory-adapter.js +3 -1
- package/dist/cli/bundle.js +5 -5
- package/dist/cli/chunks/adapter-WQSFQES5.js +2 -0
- package/dist/cli/chunks/{agent-booster-wasm-XUHRLKWP.js → agent-booster-wasm-CYG3PKHH.js} +2 -2
- package/dist/cli/chunks/{agent-handler-CL7MJP5W.js → agent-handler-WTFYFZKL.js} +2 -2
- package/dist/cli/chunks/{agent-memory-branch-F7RV72FC.js → agent-memory-branch-G6WE3ZXU.js} +2 -2
- package/dist/cli/chunks/aqe-learning-engine-TDHBBADE.js +2 -0
- package/dist/cli/chunks/{arena-GRRNK7IN.js → arena-S72QW44C.js} +4 -4
- package/dist/cli/chunks/{arena-LHLVOQHW.js → arena-ZFXQEVUQ.js} +2 -2
- package/dist/cli/chunks/{audit-EOP2K34L.js → audit-KPYIEQJ3.js} +3 -3
- package/dist/cli/chunks/base-CZSB27VO.js +2 -0
- package/dist/cli/chunks/{better-sqlite3-YERQ5DOL.js → better-sqlite3-L2M3TI5D.js} +2 -2
- package/dist/cli/chunks/{brain-handler-FBXBM5XE.js → brain-handler-FHKLQTB4.js} +3 -3
- package/dist/cli/chunks/{branch-enumerator-NWO6LNHB.js → branch-enumerator-3BSHOPOK.js} +2 -2
- package/dist/cli/chunks/{browser-EDCG7TNF.js → browser-JUIJPL6Y.js} +2 -2
- package/dist/cli/chunks/browser-workflow-AEMIS6PA.js +2 -0
- package/dist/cli/chunks/{chunk-ARWSPV2C.js → chunk-2GJJGO5D.js} +2 -2
- package/dist/cli/chunks/{chunk-SUFXUM6W.js → chunk-2M75CW5Q.js} +2 -2
- package/dist/cli/chunks/{chunk-ZX4I7IND.js → chunk-2MEWIXW4.js} +2 -2
- package/dist/cli/chunks/{chunk-VEKRK3R6.js → chunk-2TBHPYOU.js} +2 -2
- package/dist/cli/chunks/{chunk-OH4SKOAM.js → chunk-34Y4CIHD.js} +2 -2
- package/dist/cli/chunks/{chunk-JY6HWYC4.js → chunk-35VDOH4Y.js} +1 -1
- package/dist/cli/chunks/{chunk-NK2BR4QZ.js → chunk-366IBPZB.js} +2 -2
- package/dist/cli/chunks/{chunk-PZBYZV5M.js → chunk-3MNKYCLH.js} +1 -1
- package/dist/cli/chunks/chunk-3UUMGWHW.js +316 -0
- package/dist/cli/chunks/{chunk-REGPCPEJ.js → chunk-3Y4GX5FL.js} +2 -2
- package/dist/cli/chunks/{chunk-PGARKOE6.js → chunk-3ZTBV6M3.js} +1 -1
- package/dist/cli/chunks/{chunk-GUHJWBPN.js → chunk-4IYHYHTG.js} +2 -2
- package/dist/cli/chunks/{chunk-J2WALRWR.js → chunk-4JVVVKAX.js} +6 -6
- package/dist/cli/chunks/chunk-4N7YXTV3.js +4 -0
- package/dist/cli/chunks/{chunk-YM3GAJMN.js → chunk-4TM5K6EZ.js} +2 -2
- package/dist/cli/chunks/{chunk-IUGY6Z4Q.js → chunk-5LEUEWJY.js} +2 -2
- package/dist/cli/chunks/{chunk-Q7ONRZBD.js → chunk-5QUOM357.js} +1 -1
- package/dist/cli/chunks/{chunk-5B5TA3X4.js → chunk-5WOBFN2T.js} +2 -2
- package/dist/cli/chunks/{chunk-JEXPSOT2.js → chunk-6AKJ73X3.js} +2 -2
- package/dist/cli/chunks/{chunk-K4NB3MYN.js → chunk-6EQDA4EC.js} +2 -2
- package/dist/cli/chunks/{chunk-HU4QGCIJ.js → chunk-6TYTBQPV.js} +2 -2
- package/dist/cli/chunks/{chunk-RXKOZ6VS.js → chunk-6V6XVGCL.js} +3 -3
- package/dist/cli/chunks/{chunk-4KHSWNFW.js → chunk-6W6GZHQA.js} +6 -6
- package/dist/cli/chunks/{chunk-WTFVYFRZ.js → chunk-7IJVCDDC.js} +1 -1
- package/dist/cli/chunks/{chunk-T5K6ZCA6.js → chunk-7PDC4SKR.js} +1 -1
- package/dist/cli/chunks/{chunk-NF6SLLE6.js → chunk-7SWHW5AC.js} +20 -20
- package/dist/cli/chunks/{chunk-UE33MZOC.js → chunk-7TW5UGDP.js} +2 -2
- package/dist/cli/chunks/{chunk-4AEFJEZH.js → chunk-7UUSV2SK.js} +1 -1
- package/dist/cli/chunks/{chunk-WONHFDWF.js → chunk-A3IQU2ND.js} +2 -2
- package/dist/cli/chunks/{chunk-ALLABEUK.js → chunk-A5H7TF7C.js} +2 -2
- package/dist/cli/chunks/{chunk-C3BW3Q27.js → chunk-A6PII4R4.js} +1 -1
- package/dist/cli/chunks/{chunk-ZE6WJDXM.js → chunk-AEL4XJGJ.js} +2 -2
- package/dist/cli/chunks/{chunk-5QEXDXHQ.js → chunk-AOZJ6UUZ.js} +2 -2
- package/dist/cli/chunks/chunk-APV5UWTU.js +15 -0
- package/dist/cli/chunks/{chunk-YWX7KLNG.js → chunk-AQTQ24SK.js} +3 -3
- package/dist/cli/chunks/{chunk-PBWR2SKH.js → chunk-AS54N3H7.js} +2 -2
- package/dist/cli/chunks/chunk-ASUXS4N4.js +2 -0
- package/dist/cli/chunks/{chunk-JSHASVQ2.js → chunk-B23ROYST.js} +3 -3
- package/dist/cli/chunks/{chunk-NTLWHLAY.js → chunk-BDKQSEEY.js} +1 -1
- package/dist/cli/chunks/{chunk-VLL7ASGH.js → chunk-BO43BGHX.js} +2 -2
- package/dist/cli/chunks/{chunk-KP6LNSDO.js → chunk-CF3BPD2R.js} +161 -159
- package/dist/cli/chunks/{chunk-KTBA2HJC.js → chunk-CFXROOIU.js} +2 -2
- package/dist/cli/chunks/{chunk-SRXXPZVT.js → chunk-CNQUU6CF.js} +2 -2
- package/dist/cli/chunks/{chunk-OKS25EGZ.js → chunk-D5V6C3XG.js} +3 -3
- package/dist/cli/chunks/{chunk-ADEYBXAS.js → chunk-D6PUDLJ4.js} +2 -2
- package/dist/cli/chunks/{chunk-D3LREV4P.js → chunk-DE3QNPTG.js} +1 -1
- package/dist/cli/chunks/{chunk-TJCMG3QE.js → chunk-DH5NWHH2.js} +2 -2
- package/dist/cli/chunks/{chunk-GDSYJHVB.js → chunk-DLA3EHKJ.js} +1 -1
- package/dist/cli/chunks/{chunk-VGYLV6VD.js → chunk-DWG4TN6A.js} +1 -1
- package/dist/cli/chunks/{chunk-4KSCJ462.js → chunk-EBIMVSPH.js} +4 -4
- package/dist/cli/chunks/{chunk-4XEZ562Q.js → chunk-ED5HUPUR.js} +2 -2
- package/dist/cli/chunks/{chunk-CHX65QXY.js → chunk-EQGT4VLC.js} +1 -1
- package/dist/cli/chunks/{chunk-WFDDWRWY.js → chunk-F5BREV2Q.js} +8 -8
- package/dist/cli/chunks/{chunk-7FGSX4UD.js → chunk-FPFGN2Z5.js} +2 -2
- package/dist/cli/chunks/{chunk-3TZRJ5QD.js → chunk-FTUNC4EI.js} +3 -3
- package/dist/cli/chunks/chunk-FXTZXZCU.js +54 -0
- package/dist/cli/chunks/{chunk-DREYYJ7A.js → chunk-GJB3LPCS.js} +2 -2
- package/dist/cli/chunks/{chunk-4P7CGSRL.js → chunk-GPZH6OPP.js} +4 -4
- package/dist/cli/chunks/{chunk-NWNZMXNO.js → chunk-HR7RL4PB.js} +2 -2
- package/dist/cli/chunks/{chunk-NGDRSF6Y.js → chunk-HSR53REE.js} +2 -2
- package/dist/cli/chunks/{chunk-UOHZRR5C.js → chunk-HU474NXP.js} +1 -1
- package/dist/cli/chunks/{chunk-LI7N45GM.js → chunk-HV3ZVUHO.js} +1 -1
- package/dist/cli/chunks/{chunk-WPG6SW7C.js → chunk-HVIFA73X.js} +2 -2
- package/dist/cli/chunks/{chunk-6U6JQS4Z.js → chunk-HW4V7BVV.js} +2 -2
- package/dist/cli/chunks/{chunk-X6W35QXO.js → chunk-I5VJ3FBC.js} +2 -2
- package/dist/cli/chunks/{chunk-YTMWPGVR.js → chunk-IARE5VGI.js} +1 -1
- package/dist/cli/chunks/chunk-INVDDFJC.js +2 -0
- package/dist/cli/chunks/{chunk-RDI3W4H6.js → chunk-JJBTM4JO.js} +2 -2
- package/dist/cli/chunks/chunk-JVQK6NGI.js +14 -0
- package/dist/cli/chunks/{chunk-CFZJEOCD.js → chunk-K65X6CQA.js} +1 -1
- package/dist/cli/chunks/{chunk-6DF6X3SZ.js → chunk-KCBCYF7M.js} +2 -2
- package/dist/cli/chunks/{chunk-QOOADAT7.js → chunk-KGS6H2HB.js} +2 -2
- package/dist/cli/chunks/{chunk-TCJ65NPY.js → chunk-L6OSEWOS.js} +1 -1
- package/dist/cli/chunks/{chunk-BW7S6LIJ.js → chunk-LEB6O2IN.js} +2 -2
- package/dist/cli/chunks/{chunk-WHBDSJUE.js → chunk-LPZAB3N2.js} +3 -3
- package/dist/cli/chunks/{chunk-JYF3QF4C.js → chunk-M3ACHBC7.js} +2 -2
- package/dist/cli/chunks/{chunk-WQZR6DS6.js → chunk-M3ONCPSU.js} +2 -2
- package/dist/cli/chunks/{chunk-7B3XVVYP.js → chunk-MUSYQF53.js} +2 -2
- package/dist/cli/chunks/{chunk-6AVVC7Y3.js → chunk-MZDUBFLP.js} +1 -1
- package/dist/cli/chunks/{chunk-53HWWWFZ.js → chunk-NT6FYFJA.js} +2 -2
- package/dist/cli/chunks/{chunk-6WW6A6JM.js → chunk-O66D4NEJ.js} +2 -2
- package/dist/cli/chunks/{chunk-3NOSMJS4.js → chunk-OGARNKLS.js} +2 -2
- package/dist/cli/chunks/{chunk-KHVWIUAF.js → chunk-OKNMZLGB.js} +2 -2
- package/dist/cli/chunks/{chunk-XCVD57GW.js → chunk-OMHISPPF.js} +1 -1
- package/dist/cli/chunks/{chunk-N5OSH5JO.js → chunk-OT6SOPAL.js} +2 -2
- package/dist/cli/chunks/{chunk-ZZV6GR46.js → chunk-OTTTHNIT.js} +1 -1
- package/dist/cli/chunks/{chunk-XZGRHJGC.js → chunk-P36IODAM.js} +2 -2
- package/dist/cli/chunks/{chunk-JHKMUY4W.js → chunk-P6EGRAQG.js} +2 -2
- package/dist/cli/chunks/{chunk-5JJWVFUV.js → chunk-PBUWNMZ2.js} +1 -1
- package/dist/cli/chunks/{chunk-LQI5GVH7.js → chunk-POTVF6BY.js} +1 -1
- package/dist/cli/chunks/{chunk-N4HQ6FE2.js → chunk-POVP6O6K.js} +1 -1
- package/dist/cli/chunks/{chunk-P24ZBDZY.js → chunk-PPA53NJB.js} +2 -2
- package/dist/cli/chunks/{chunk-OABFAREV.js → chunk-PUPEKA2J.js} +2 -2
- package/dist/cli/chunks/{chunk-27S47AYK.js → chunk-QDQLL2QB.js} +2 -2
- package/dist/cli/chunks/{chunk-MEOAKMKF.js → chunk-QSVNVDA5.js} +1 -1
- package/dist/cli/chunks/{chunk-66HKJJFH.js → chunk-QUXX2DP7.js} +2 -2
- package/dist/cli/chunks/{chunk-TLUMENRZ.js → chunk-QVNMTMDJ.js} +2 -2
- package/dist/cli/chunks/{chunk-LDDIYDIP.js → chunk-QZBFMXO5.js} +54 -54
- package/dist/cli/chunks/{chunk-4THIRDBL.js → chunk-RDTR43YN.js} +2 -2
- package/dist/cli/chunks/{chunk-6MGJMGAD.js → chunk-RGD2CG23.js} +2 -2
- package/dist/cli/chunks/{chunk-V5RP2SU3.js → chunk-RQUSJEON.js} +2 -2
- package/dist/cli/chunks/{chunk-WYE3ICSL.js → chunk-RRSZ27A7.js} +2 -2
- package/dist/cli/chunks/{chunk-GUKBN3BS.js → chunk-RWLOERKK.js} +2 -2
- package/dist/cli/chunks/{chunk-5TEDVUEB.js → chunk-RWQDRPN5.js} +2 -2
- package/dist/cli/chunks/{chunk-2IPBCXTT.js → chunk-S7D4GD7H.js} +2 -2
- package/dist/cli/chunks/{chunk-FTHXV7N7.js → chunk-SKHP5WUP.js} +2 -2
- package/dist/cli/chunks/{chunk-QVTV47TM.js → chunk-SP2JO53K.js} +2 -2
- package/dist/cli/chunks/{chunk-UTFNHITI.js → chunk-SRDECRTL.js} +2 -2
- package/dist/cli/chunks/{chunk-HVAYG54D.js → chunk-TBVPNN65.js} +2 -2
- package/dist/cli/chunks/{chunk-JQVECGYL.js → chunk-U5AVZ3T2.js} +1 -1
- package/dist/cli/chunks/{chunk-EQ3BJS37.js → chunk-UCSGZVJX.js} +1 -1
- package/dist/cli/chunks/{chunk-5C4UYXQL.js → chunk-UGNTLSBL.js} +2 -2
- package/dist/cli/chunks/{chunk-W5NHBYYS.js → chunk-UTALYUMW.js} +2 -2
- package/dist/cli/chunks/{chunk-35XRY6ZW.js → chunk-UZDTRCVU.js} +9 -9
- package/dist/cli/chunks/{chunk-AVOYMVD6.js → chunk-V5NYGDSX.js} +2 -2
- package/dist/cli/chunks/{chunk-FQYXPSWD.js → chunk-VGN46ZT4.js} +2 -2
- package/dist/cli/chunks/{chunk-QMHWJBD3.js → chunk-VHBZADYK.js} +2 -2
- package/dist/cli/chunks/{chunk-54JYUOSR.js → chunk-VOKIUF7I.js} +1 -1
- package/dist/cli/chunks/{chunk-PDLVO3ZR.js → chunk-VRT736E3.js} +2 -2
- package/dist/cli/chunks/{chunk-DV7I6CRH.js → chunk-VUBLJBHQ.js} +2 -2
- package/dist/cli/chunks/{chunk-FRGNM6SW.js → chunk-VX7CQUO7.js} +2 -2
- package/dist/cli/chunks/{chunk-YDM2DPUU.js → chunk-W7EHNX3Y.js} +2 -2
- package/dist/cli/chunks/{chunk-W5HQQTVH.js → chunk-WI7I6LMM.js} +1 -1
- package/dist/cli/chunks/{chunk-46DUU44C.js → chunk-WLOHTLHO.js} +2 -2
- package/dist/cli/chunks/{chunk-W6K77PQR.js → chunk-WQZBKLAG.js} +1 -1
- package/dist/cli/chunks/{chunk-UGUZFUQG.js → chunk-WSND64RL.js} +2 -2
- package/dist/cli/chunks/{chunk-PNK5KHSI.js → chunk-WSUYEVSY.js} +1 -1
- package/dist/cli/chunks/{chunk-FIIHSEXP.js → chunk-WTMLRMKW.js} +2 -2
- package/dist/cli/chunks/{chunk-OPBPFNBO.js → chunk-WW4RJ6BH.js} +2 -2
- package/dist/cli/chunks/{chunk-KBK4GBJQ.js → chunk-X335K4SU.js} +2 -2
- package/dist/cli/chunks/{chunk-NS4RIZ4F.js → chunk-X33LID2T.js} +1 -1
- package/dist/cli/chunks/{chunk-L5GEWKR3.js → chunk-XTGVGZ4J.js} +3 -3
- package/dist/cli/chunks/{chunk-CTLHNFPM.js → chunk-XV2TIODR.js} +1 -1
- package/dist/cli/chunks/{chunk-GAKVCN3C.js → chunk-XXW4KFBB.js} +1 -1
- package/dist/cli/chunks/{chunk-CTK7NMSJ.js → chunk-YCGU2LI7.js} +2 -2
- package/dist/cli/chunks/chunk-YGEC3PSD.js +2 -0
- package/dist/cli/chunks/{chunk-ARGMYSDY.js → chunk-YGKU2QRC.js} +1 -1
- package/dist/cli/chunks/{chunk-6Q7PWKWV.js → chunk-YHZGFWJE.js} +2 -2
- package/dist/cli/chunks/{chunk-V3ISBQ5Q.js → chunk-YJH7UFA2.js} +2 -2
- package/dist/cli/chunks/{chunk-A5LOELVV.js → chunk-YQ3ZW47V.js} +2 -2
- package/dist/cli/chunks/{chunk-25IWHVMW.js → chunk-YTRGMILO.js} +2 -2
- package/dist/cli/chunks/chunk-YW4GM36K.js +2 -0
- package/dist/cli/chunks/{chunk-JW2HNT3J.js → chunk-Z7JPWXW2.js} +2 -2
- package/dist/cli/chunks/{chunk-PZDI7WQ3.js → chunk-Z7UGEQ4G.js} +1 -1
- package/dist/cli/chunks/{chunk-TBCQWD5A.js → chunk-ZATQLTYL.js} +1 -1
- package/dist/cli/chunks/{chunk-DKWB4ERY.js → chunk-ZI6NJEBY.js} +1 -1
- package/dist/cli/chunks/{chunk-B3DWOR5R.js → chunk-ZJW4HRUA.js} +1 -1
- package/dist/cli/chunks/{chunk-X4PGLEPQ.js → chunk-ZL2GYU7H.js} +2 -2
- package/dist/cli/chunks/{ci-K7DG4GSO.js → ci-JPISJ25U.js} +3 -3
- package/dist/cli/chunks/{ci-output-EBSUG6HP.js → ci-output-DPHTFIGX.js} +2 -2
- package/dist/cli/chunks/{circuit-breaker-P6N6YIRZ.js → circuit-breaker-PQ65VU2M.js} +2 -2
- package/dist/cli/chunks/{claude-flow-setup-P6EZPQZT.js → claude-flow-setup-GKHVO7AD.js} +2 -2
- package/dist/cli/chunks/client-BS7I637W.js +2 -0
- package/dist/cli/chunks/{cline-installer-EVZZ3EFY.js → cline-installer-HWMQZJ64.js} +2 -2
- package/dist/cli/chunks/{code-3WLBG2XK.js → code-OTY7BF3D.js} +3 -3
- package/dist/cli/chunks/{code-index-extractor-ZP6D4WL2.js → code-index-extractor-FG3TMHHR.js} +2 -2
- package/dist/cli/chunks/{codex-installer-XAUI4SB7.js → codex-installer-63JARKKS.js} +2 -2
- package/dist/cli/chunks/{completions-RHFNDDG3.js → completions-4ZHONFML.js} +2 -2
- package/dist/cli/chunks/{complexity-analyzer-DCW7Q3OR.js → complexity-analyzer-FYHTJW5Y.js} +2 -2
- package/dist/cli/chunks/{continuedev-installer-53SQA5T6.js → continuedev-installer-ZAWDSUR3.js} +2 -2
- package/dist/cli/chunks/{copilot-installer-SXXMFB6T.js → copilot-installer-5QK565JX.js} +2 -2
- package/dist/cli/chunks/core-handlers-UG7RMTK5.js +2 -0
- package/dist/cli/chunks/cost-tracker-AWWMPPBJ.js +2 -0
- package/dist/cli/chunks/{coverage-AWCS2SP7.js → coverage-SMFQEGKE.js} +3 -3
- package/dist/cli/chunks/cross-domain-router-NX7F6TOF.js +2 -0
- package/dist/cli/chunks/{cursor-installer-4TYF5V5J.js → cursor-installer-3BL7JACV.js} +2 -2
- package/dist/cli/chunks/{daemon-CTZXGN5V.js → daemon-OJ624POF.js} +4 -4
- package/dist/cli/chunks/{daemon-OOY4H6RJ.js → daemon-R6ULBHHF.js} +3 -3
- package/dist/cli/chunks/{dag-attention-scheduler-3WG24Q33.js → dag-attention-scheduler-J6I3LTMY.js} +2 -2
- package/dist/cli/chunks/{detect-O7MUZ6NX.js → detect-5Q5W33UR.js} +2 -2
- package/dist/cli/chunks/{dist-node-H4XI7BAF.js → dist-node-GJNW56NA.js} +2 -2
- package/dist/cli/chunks/{domain-handler-FU4WZ23B.js → domain-handler-IZQY2G44.js} +2 -2
- package/dist/cli/chunks/{domain-plugins-XK26KYNJ.js → domain-plugins-PIGO3KI2.js} +2 -2
- package/dist/cli/chunks/{domain-transfer-6B5NOVH6.js → domain-transfer-NU3B4FQG.js} +2 -2
- package/dist/cli/chunks/dream-GYEH57FW.js +2 -0
- package/dist/cli/chunks/{embed-and-insert-pattern-XNZXPZNL.js → embed-and-insert-pattern-5QDDRPWV.js} +2 -2
- package/dist/cli/chunks/{eval-J3Q5TTI7.js → eval-TB5HOAUY.js} +2 -2
- package/dist/cli/chunks/{experience-capture-middleware-COKIGMXW.js → experience-capture-middleware-SIYVLKDE.js} +3 -3
- package/dist/cli/chunks/{fast-paths-IHWPJI6I.js → fast-paths-T7QELS6D.js} +2 -2
- package/dist/cli/chunks/{feature-flags-WUXFWZLR.js → feature-flags-T3CNNYMJ.js} +2 -2
- package/dist/cli/chunks/{feature-flags-G7ONDNTT.js → feature-flags-TNZ7ZAJV.js} +2 -2
- package/dist/cli/chunks/{file-discovery-JN3YMBOJ.js → file-discovery-M45P2ZCY.js} +2 -2
- package/dist/cli/chunks/{fleet-OUHUZJE4.js → fleet-DSBZPHBZ.js} +3 -3
- package/dist/cli/chunks/{gnn-wrapper-PRH55ZT6.js → gnn-wrapper-EHODCF32.js} +2 -2
- package/dist/cli/chunks/{heartbeat-handler-6YF35AQS.js → heartbeat-handler-V5DBVF7V.js} +4 -4
- package/dist/cli/chunks/heartbeat-scheduler-4TJ3T7LR.js +2 -0
- package/dist/cli/chunks/hnsw-adapter-PHFK4EAP.js +2 -0
- package/dist/cli/chunks/hnsw-index-434XDDBH.js +2 -0
- package/dist/cli/chunks/{hnsw-legacy-bridge-7PAFSTJO.js → hnsw-legacy-bridge-IYKDYA2F.js} +2 -2
- package/dist/cli/chunks/{hnswlib-node-UETDZNNN.js → hnswlib-node-DKG4LW3X.js} +2 -2
- package/dist/cli/chunks/{hooks-QQNUKQAS.js → hooks-VKNMAILY.js} +10 -10
- package/dist/cli/chunks/hybrid-backend-DYVJQENQ.js +2 -0
- package/dist/cli/chunks/{hypergraph-engine-5GDGE3ET.js → hypergraph-engine-AXZVP7A7.js} +2 -2
- package/dist/cli/chunks/{hypergraph-handler-C3F2OJYA.js → hypergraph-handler-6EO6JN4Z.js} +3 -3
- package/dist/cli/chunks/impact-analyzer-CBAST6M2.js +2 -0
- package/dist/cli/chunks/init-handler-N3NG3RHN.js +86 -0
- package/dist/cli/chunks/init-wizard-DWIJW7HY.js +2 -0
- package/dist/cli/chunks/kernel-AQGCS4X2.js +2 -0
- package/dist/cli/chunks/{kilocode-installer-VLJENC76.js → kilocode-installer-JICGAHLM.js} +2 -2
- package/dist/cli/chunks/{kiro-installer-UYPYM6LA.js → kiro-installer-VYBFP6ZH.js} +2 -2
- package/dist/cli/chunks/knowledge-graph-2ICXFUUV.js +2 -0
- package/dist/cli/chunks/{learning-SFIWIG6Z.js → learning-3BHEZEPK.js} +3 -3
- package/dist/cli/chunks/{llm-router-V633KAS5.js → llm-router-GPTEZCUN.js} +4 -4
- package/dist/cli/chunks/llm-router-service-C47RGTH6.js +2 -0
- package/dist/cli/chunks/{load-UWZV4JRA.js → load-W5BIRPU4.js} +2 -2
- package/dist/cli/chunks/load-test-LRDAW3N6.js +2 -0
- package/dist/cli/chunks/{mcp-XVFHUKCP.js → mcp-EBV4DZPG.js} +2 -2
- package/dist/cli/chunks/{memory-BQ5652VK.js → memory-7F6YYKNL.js} +5 -5
- package/dist/cli/chunks/memory-backend-UFBAYPQ6.js +2 -0
- package/dist/cli/chunks/memory-handlers-OGLJHAAJ.js +2 -0
- package/dist/cli/chunks/{multi-model-executor-X6AQ7VVR.js → multi-model-executor-3ZIA2YOL.js} +2 -2
- package/dist/cli/chunks/{opencode-installer-N3V2Z4EF.js → opencode-installer-2XRZUTLR.js} +2 -2
- package/dist/cli/chunks/{orchestrator-KNEKS4F7.js → orchestrator-VSZVJUJW.js} +87 -28
- package/dist/cli/chunks/pattern-null-store-27FCITT3.js +2 -0
- package/dist/cli/chunks/{pattern-usage-recorder-MZIM6XWU.js → pattern-usage-recorder-I2IGVHRL.js} +2 -2
- package/dist/cli/chunks/{pipeline-LNLBKSXR.js → pipeline-5G3O6WBY.js} +2 -2
- package/dist/cli/chunks/{platform-OMUDXHD3.js → platform-6GUFDIA3.js} +2 -2
- package/dist/cli/chunks/{plugin-HGY6KKZW.js → plugin-GYXE4CIC.js} +2 -2
- package/dist/cli/chunks/{prime-radiant-advanced-wasm-LZBHLQYN.js → prime-radiant-advanced-wasm-THX6JLGZ.js} +2 -2
- package/dist/cli/chunks/{project-root-VPSCDBMD.js → project-root-QJRBKZQU.js} +2 -2
- package/dist/cli/chunks/protocol-executor-XWXXTMEW.js +2 -0
- package/dist/cli/chunks/{protocol-handler-LZXT3TXU.js → protocol-handler-B54LRU26.js} +2 -2
- package/dist/cli/chunks/{prove-I4VKQEYQ.js → prove-PCY2WQOD.js} +2 -2
- package/dist/cli/chunks/qe-reasoning-bank-3RMYXENE.js +2 -0
- package/dist/cli/chunks/{quality-VVAWK2DD.js → quality-LPVDZC7U.js} +2 -2
- package/dist/cli/chunks/{quality-gate-RGXLWYT6.js → quality-gate-L3KXL6WE.js} +3 -3
- package/dist/cli/chunks/queen-coordinator-AS6DZ7UJ.js +2 -0
- package/dist/cli/chunks/{real-embeddings-WM66PMQ6.js → real-embeddings-N3H523PJ.js} +2 -2
- package/dist/cli/chunks/{ref-validation-ZIWJNI6M.js → ref-validation-6BKDPHZ7.js} +2 -2
- package/dist/cli/chunks/{roocode-installer-QYSI3STC.js → roocode-installer-NSGGTWXE.js} +2 -2
- package/dist/cli/chunks/router-OVNLNGHO.js +2 -0
- package/dist/cli/chunks/routing-feedback-TBOWEB6H.js +2 -0
- package/dist/cli/chunks/{routing-handler-BID3EOLE.js → routing-handler-SRQNUBG3.js} +2 -2
- package/dist/cli/chunks/{ruvector-commands-DXIFMF4W.js → ruvector-commands-2IGULGDE.js} +2 -2
- package/dist/cli/chunks/rvf-dual-writer-YJYRCYGT.js +2 -0
- package/dist/cli/chunks/rvf-migration-adapter-VMRQ2SFO.js +2 -0
- package/dist/cli/chunks/{rvf-migration-coordinator-EV5E6SAO.js → rvf-migration-coordinator-ZD6WK5CK.js} +2 -2
- package/dist/cli/chunks/rvf-native-adapter-B75L3ALW.js +2 -0
- package/dist/cli/chunks/{rvf-store-integrity-IT6DCCJK.js → rvf-store-integrity-QULKUBBI.js} +2 -2
- package/dist/cli/chunks/safe-db-CRQHMCV6.js +2 -0
- package/dist/cli/chunks/schedule-L3DKJRXU.js +2 -0
- package/dist/cli/chunks/scheduler-VRHYUGY5.js +2 -0
- package/dist/cli/chunks/{security-AAFAEATQ.js → security-JW4EBARW.js} +3 -3
- package/dist/cli/chunks/{shared-rvf-adapter-QIHSYHAF.js → shared-rvf-adapter-VQ7NJTGY.js} +2 -2
- package/dist/cli/chunks/{shared-rvf-dual-writer-V7OZ6TBR.js → shared-rvf-dual-writer-SKTS52HK.js} +2 -2
- package/dist/cli/chunks/sqlite-persistence-JVAZETTL.js +2 -0
- package/dist/cli/chunks/{standalone-memory-ALZI6VPX.js → standalone-memory-3N4YJCSY.js} +2 -2
- package/dist/cli/chunks/{status-handler-DED5A3OW.js → status-handler-5BQ2IIDG.js} +2 -2
- package/dist/cli/chunks/{structural-health-CB7L3NWH.js → structural-health-WGYR2RJB.js} +2 -2
- package/dist/cli/chunks/{sync-QNPGETIO.js → sync-DLKSXTIR.js} +2 -2
- package/dist/cli/chunks/sync-R5OKUBTQ.js +2 -0
- package/dist/cli/chunks/{task-handler-CGHXYFIF.js → task-handler-Z5KNTSUX.js} +2 -2
- package/dist/cli/chunks/{task-handlers-A6BGQJIB.js → task-handlers-RZFMYFSC.js} +3 -3
- package/dist/cli/chunks/test-LHWKZJRN.js +34 -0
- package/dist/cli/chunks/test-scheduling-EN7WXUMS.js +15 -0
- package/dist/cli/chunks/token-bootstrap-4V3OO4EC.js +2 -0
- package/dist/cli/chunks/{token-usage-25BRFKJ5.js → token-usage-PFC2BYBS.js} +2 -2
- package/dist/cli/chunks/{transformers-TBVVSZMF.js → transformers-VZCC4SHC.js} +2 -2
- package/dist/cli/chunks/{tree-sitter-wasm-parser-N7KCOQT4.js → tree-sitter-wasm-parser-ZYDQXGKN.js} +2 -2
- package/dist/cli/chunks/{types-TFHWJGRK.js → types-I6AWHZZQ.js} +2 -2
- package/dist/cli/chunks/unified-memory-WOOCCIUM.js +2 -0
- package/dist/cli/chunks/unified-memory-hnsw-PDDHFLUB.js +2 -0
- package/dist/cli/chunks/unified-persistence-6ETD3JSC.js +2 -0
- package/dist/cli/chunks/{upgrade-4VWQU7RD.js → upgrade-T7SG75PA.js} +2 -2
- package/dist/cli/chunks/{validate-FF7WVXMP.js → validate-YLYEHTY3.js} +2 -2
- package/dist/cli/chunks/{validate-swarm-NRLH4EDC.js → validate-swarm-VTLTRUE3.js} +2 -2
- package/dist/cli/chunks/visual-security-O4OT2YPY.js +2 -0
- package/dist/cli/chunks/{web-tree-sitter-VVU3LULW.js → web-tree-sitter-JUM7ZY5M.js} +2 -2
- package/dist/cli/chunks/{windsurf-installer-Q2ZNWG2D.js → windsurf-installer-4KS2466T.js} +2 -2
- package/dist/cli/chunks/witness-chain-67JHPDCN.js +2 -0
- package/dist/cli/chunks/{witness-chain-FP3D4PQL.js → witness-chain-E4X6TOCT.js} +2 -2
- package/dist/cli/chunks/witness-chain-repair-MB53OZO6.js +2 -0
- package/dist/cli/chunks/{witness-chain-verifier-LACGL6BK.js → witness-chain-verifier-LBWJHO7Y.js} +2 -2
- package/dist/cli/chunks/{witness-key-manager-GQZIB5ZE.js → witness-key-manager-5IHVMXHJ.js} +2 -2
- package/dist/cli/chunks/{workflow-JPA5Y7L6.js → workflow-XUQXIRNE.js} +4 -4
- package/dist/cli/chunks/workflow-orchestrator-ZVFSNRYZ.js +2 -0
- package/dist/cli/chunks/wrappers-YVF5SQUN.js +2 -0
- package/dist/cli/commands/test.js +42 -9
- package/dist/cli/handlers/init-flags.d.ts +45 -0
- package/dist/cli/handlers/init-flags.js +35 -0
- package/dist/cli/handlers/init-handler.d.ts +6 -0
- package/dist/cli/handlers/init-handler.js +24 -10
- package/dist/cli/utils/generated-test-writer.d.ts +35 -0
- package/dist/cli/utils/generated-test-writer.js +44 -0
- package/dist/context/compiler.js +4 -1
- package/dist/coordination/consensus/providers/ollama-provider.js +16 -27
- package/dist/coordination/consensus/providers/openrouter-provider.js +13 -24
- package/dist/coordination/handlers/test-execution-handlers.js +4 -2
- package/dist/coordination/protocols/defect-investigation.js +4 -1
- package/dist/coordination/task-executor.js +4 -2
- package/dist/domains/code-intelligence/services/metric-collector/test-counter.js +3 -3
- package/dist/domains/coverage-analysis/services/gap-detector.js +3 -1
- package/dist/domains/learning-optimization/services/learning-coordinator.js +4 -2
- package/dist/domains/test-execution/services/flaky-detector.js +8 -2
- package/dist/domains/test-execution/services/retry-handler.js +23 -20
- package/dist/domains/test-execution/services/test-executor.js +5 -2
- package/dist/domains/test-generation/services/test-generator.js +5 -2
- package/dist/governance/compliance-reporter.js +8 -7
- package/dist/governance/proof-envelope-integration.js +3 -1
- package/dist/init/claude-plugin-detection.d.ts +63 -0
- package/dist/init/claude-plugin-detection.js +118 -0
- package/dist/init/init-wizard-hooks.d.ts +6 -1
- package/dist/init/init-wizard-hooks.js +9 -1
- package/dist/init/init-wizard.d.ts +4 -0
- package/dist/init/init-wizard.js +3 -1
- package/dist/init/orchestrator.js +1 -0
- package/dist/init/phases/07-hooks.js +30 -4
- package/dist/init/phases/08-mcp.d.ts +7 -0
- package/dist/init/phases/08-mcp.js +22 -0
- package/dist/init/phases/10-workers.js +42 -6
- package/dist/init/phases/phase-interface.d.ts +5 -1
- package/dist/integrations/agentic-flow/onnx-embeddings/embedding-generator.d.ts +4 -1
- package/dist/integrations/agentic-flow/onnx-embeddings/embedding-generator.js +6 -2
- package/dist/integrations/browser/qe-dashboard/wasm-vector-store.js +2 -1
- package/dist/integrations/ruvector/coverage-router.d.ts +3 -1
- package/dist/integrations/ruvector/coverage-router.js +7 -6
- package/dist/integrations/ruvector/diff-risk-classifier.js +5 -4
- package/dist/integrations/ruvector/rvf-dual-writer.js +10 -1
- package/dist/integrations/vibium/runtime.js +2 -6
- package/dist/learning/dream/dream-engine.d.ts +5 -0
- package/dist/learning/dream/dream-engine.js +20 -3
- package/dist/learning/embedding-space.d.ts +18 -0
- package/dist/learning/embedding-space.js +33 -0
- package/dist/learning/rvf-pattern-store.js +19 -5
- package/dist/mcp/bundle.js +443 -441
- package/dist/mcp/handlers/domain-handler-configs.js +3 -1
- package/dist/mcp/handlers/handler-factory.js +7 -0
- package/dist/mcp/handlers/save-results-option.d.ts +97 -0
- package/dist/mcp/handlers/save-results-option.js +94 -0
- package/dist/mcp/protocol-server.js +23 -11
- package/dist/mcp/security/rate-limiter.d.ts +8 -1
- package/dist/mcp/security/rate-limiter.js +33 -4
- package/dist/mcp/services/session-resume.js +11 -0
- package/dist/mcp/services/session-store.d.ts +31 -2
- package/dist/mcp/services/session-store.js +84 -15
- package/dist/mcp/services/session-write-buffer.d.ts +55 -0
- package/dist/mcp/services/session-write-buffer.js +144 -0
- package/dist/mcp/types.d.ts +9 -0
- package/dist/memory/crdt/g-counter.js +10 -8
- package/dist/shared/embeddings/ollama-client.d.ts +1 -1
- package/dist/shared/embeddings/ollama-client.js +30 -31
- package/dist/shared/git/git-analyzer.d.ts +4 -1
- package/dist/shared/git/git-analyzer.js +9 -4
- package/dist/shared/llm/cost-tracker.js +8 -6
- package/dist/shared/llm/providers/azure-openai.js +5 -21
- package/dist/shared/llm/providers/bedrock.js +5 -21
- package/dist/shared/llm/providers/claude.js +5 -21
- package/dist/shared/llm/providers/cognitum.js +5 -17
- package/dist/shared/llm/providers/gemini.js +9 -23
- package/dist/shared/llm/providers/ollama.js +5 -21
- package/dist/shared/llm/providers/openai.js +5 -21
- package/dist/shared/llm/providers/openrouter.js +9 -23
- package/dist/shared/llm/providers/response-deadline.d.ts +3 -0
- package/dist/shared/llm/providers/response-deadline.js +100 -0
- package/dist/shared/llm/spend-ledger.js +3 -2
- package/dist/shared/metrics/code-metrics.d.ts +1 -0
- package/dist/shared/metrics/code-metrics.js +3 -44
- package/dist/shared/metrics/cognitive-complexity.d.ts +17 -0
- package/dist/shared/metrics/cognitive-complexity.js +108 -0
- package/dist/shared/npm-cli-invocation.d.ts +21 -0
- package/dist/shared/npm-cli-invocation.js +28 -0
- package/dist/shared/optional-module.js +24 -0
- package/dist/shared/test-runner-args.d.ts +42 -0
- package/dist/shared/test-runner-args.js +74 -0
- package/dist/shared/utils/safe-record.d.ts +18 -0
- package/dist/shared/utils/safe-record.js +28 -0
- package/dist/test-scheduling/executors/vitest-executor.js +23 -5
- package/dist/workers/quality-daemon/git-watcher.js +5 -0
- package/package.json +1 -1
- package/dist/adapters/ag-ui/json-patch-utils.d.ts +0 -136
- package/dist/adapters/ag-ui/json-patch-utils.js +0 -575
- package/dist/cli/chunks/adapter-Q6RPGMUE.js +0 -2
- package/dist/cli/chunks/aqe-learning-engine-JQPXIU7C.js +0 -2
- package/dist/cli/chunks/base-5SK64NXB.js +0 -2
- package/dist/cli/chunks/browser-workflow-WN7XNTCJ.js +0 -2
- package/dist/cli/chunks/chunk-2K3QFLX2.js +0 -2
- package/dist/cli/chunks/chunk-53C7TGC4.js +0 -4
- package/dist/cli/chunks/chunk-J4ULR4QR.js +0 -54
- package/dist/cli/chunks/chunk-R2ICZKQA.js +0 -2
- package/dist/cli/chunks/chunk-TR37Q7A6.js +0 -15
- package/dist/cli/chunks/chunk-XYZUBAR6.js +0 -316
- package/dist/cli/chunks/chunk-YDMPTCJ3.js +0 -14
- package/dist/cli/chunks/client-ZYH66YRI.js +0 -2
- package/dist/cli/chunks/core-handlers-XKSPHEHE.js +0 -2
- package/dist/cli/chunks/cost-tracker-CKLDQ5AZ.js +0 -2
- package/dist/cli/chunks/cross-domain-router-6VYNFQZA.js +0 -2
- package/dist/cli/chunks/dream-DRSSIHPP.js +0 -2
- package/dist/cli/chunks/heartbeat-scheduler-FMICCNWK.js +0 -2
- package/dist/cli/chunks/hnsw-adapter-4TGBNJEZ.js +0 -2
- package/dist/cli/chunks/hnsw-index-J4NSCPAZ.js +0 -2
- package/dist/cli/chunks/hybrid-backend-NKPA3QE7.js +0 -2
- package/dist/cli/chunks/impact-analyzer-MWX7XY7X.js +0 -2
- package/dist/cli/chunks/init-handler-C7ZBDAC5.js +0 -81
- package/dist/cli/chunks/init-wizard-EX5N5Q7X.js +0 -2
- package/dist/cli/chunks/kernel-EQLZDHDD.js +0 -2
- package/dist/cli/chunks/knowledge-graph-A3WSMQ6U.js +0 -2
- package/dist/cli/chunks/llm-router-service-A6XYWTL6.js +0 -2
- package/dist/cli/chunks/load-test-WF2PCXLI.js +0 -2
- package/dist/cli/chunks/memory-backend-BKGLI2RF.js +0 -2
- package/dist/cli/chunks/memory-handlers-PWI3G4P4.js +0 -2
- package/dist/cli/chunks/pattern-null-store-YTBLEH7D.js +0 -2
- package/dist/cli/chunks/protocol-executor-HFR2D54O.js +0 -2
- package/dist/cli/chunks/qe-reasoning-bank-MYFBQUYV.js +0 -2
- package/dist/cli/chunks/queen-coordinator-CQQMOTIW.js +0 -2
- package/dist/cli/chunks/router-GKWLPA3N.js +0 -2
- package/dist/cli/chunks/routing-feedback-WA4D5JRF.js +0 -2
- package/dist/cli/chunks/rvf-dual-writer-H3ZXS5MA.js +0 -2
- package/dist/cli/chunks/rvf-migration-adapter-J7MTCOQA.js +0 -2
- package/dist/cli/chunks/rvf-native-adapter-HXBY4VYI.js +0 -2
- package/dist/cli/chunks/safe-db-INVJ5LHR.js +0 -2
- package/dist/cli/chunks/schedule-XRIPPL52.js +0 -2
- package/dist/cli/chunks/scheduler-HBN3KPRW.js +0 -2
- package/dist/cli/chunks/sqlite-persistence-6KNLT5Q2.js +0 -2
- package/dist/cli/chunks/sync-S6Z2U46T.js +0 -2
- package/dist/cli/chunks/test-IISTF5W6.js +0 -33
- package/dist/cli/chunks/test-scheduling-FKYX4OLF.js +0 -15
- package/dist/cli/chunks/token-bootstrap-OKO3JEKT.js +0 -2
- package/dist/cli/chunks/unified-memory-WVELSL6T.js +0 -2
- package/dist/cli/chunks/unified-memory-hnsw-7P5MVKXD.js +0 -2
- package/dist/cli/chunks/unified-persistence-YLFCEWYY.js +0 -2
- package/dist/cli/chunks/visual-security-T5OM742H.js +0 -2
- package/dist/cli/chunks/witness-chain-D6X4OZP5.js +0 -2
- package/dist/cli/chunks/witness-chain-repair-3LG4BF7C.js +0 -2
- package/dist/cli/chunks/workflow-orchestrator-OORDDKT3.js +0 -2
- package/dist/cli/chunks/wrappers-2B5NHICD.js +0 -2
|
@@ -17,7 +17,27 @@ const AQE_DIR = path.join(PROJECT_ROOT, '.agentic-qe');
|
|
|
17
17
|
const RVF_PATH = path.join(AQE_DIR, 'aqe.rvf');
|
|
18
18
|
const DB_PATH = path.join(AQE_DIR, 'memory.db');
|
|
19
19
|
const MAX_AGE_HOURS = 24;
|
|
20
|
-
|
|
20
|
+
/**
|
|
21
|
+
* How to run `aqe`. POSIX: the `aqe` binary. Windows (#872): never execFile
|
|
22
|
+
* `aqe.cmd` (EINVAL without a shell since CVE-2024-27980, and a shell is unsafe);
|
|
23
|
+
* reuse the hook shim's resolver, which finds the bundle and runs it via node.
|
|
24
|
+
*/
|
|
25
|
+
function aqeInvocation() {
|
|
26
|
+
if (process.platform !== 'win32') return { cmd: process.env.AQE_HOOK_BIN || 'aqe', args: [] };
|
|
27
|
+
const shimPath = path.join(__dirname, '..', 'hooks', 'aqe-hook.cjs');
|
|
28
|
+
let src = '';
|
|
29
|
+
try { src = fs.readFileSync(shimPath, 'utf8'); } catch { /* missing: handled below */ }
|
|
30
|
+
// Only a #872+ shim may be required: an older one runs its hook main at load
|
|
31
|
+
// time (spawn + process.exit(0)), which would kill this export silently.
|
|
32
|
+
if (!src.includes('resolveAqeInvocation') || !src.includes('require.main === module')) {
|
|
33
|
+
return { cmd: null, args: [], reason: '.claude/hooks/aqe-hook.cjs is missing or predates #872; re-run `aqe init`' };
|
|
34
|
+
}
|
|
35
|
+
try {
|
|
36
|
+
return require(shimPath).resolveAqeInvocation({ project: PROJECT_ROOT });
|
|
37
|
+
} catch (e) {
|
|
38
|
+
return { cmd: null, args: [], reason: 'aqe-hook.cjs failed to load: ' + e.message };
|
|
39
|
+
}
|
|
40
|
+
}
|
|
21
41
|
|
|
22
42
|
// Mount-local kill switch. `brain export` (below) spawns a native RVF writer
|
|
23
43
|
// that, on a macOS Docker virtiofs bind mount, deadlocks in a futex and IGNORES
|
|
@@ -31,15 +51,35 @@ const CHECKPOINT_DISABLED =
|
|
|
31
51
|
|
|
32
52
|
function log(msg) { process.stderr.write('[brain-checkpoint] ' + msg + '\n'); }
|
|
33
53
|
|
|
54
|
+
/** A repository can commit `.agentic-qe` as a symlink: only write into a REAL dir. */
|
|
55
|
+
function isRealDir(dir) {
|
|
56
|
+
try { const st = fs.lstatSync(dir); return st.isDirectory() && !st.isSymbolicLink(); } catch { return false; }
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Remove whatever sits at `p` WITHOUT following it: unlink drops a planted
|
|
61
|
+
* symlink itself (even a dangling one, which existsSync reports as absent),
|
|
62
|
+
* so the exporter below creates a fresh regular file instead of writing
|
|
63
|
+
* through the link.
|
|
64
|
+
*/
|
|
65
|
+
function removeEntry(p) {
|
|
66
|
+
try { fs.unlinkSync(p); } catch (e) { if (!e || e.code !== 'ENOENT') throw e; }
|
|
67
|
+
}
|
|
68
|
+
|
|
34
69
|
function exportBrain() {
|
|
35
70
|
if (!fs.existsSync(DB_PATH)) { log('No memory.db, skipping'); return { exported: false }; }
|
|
71
|
+
if (!isRealDir(AQE_DIR)) {
|
|
72
|
+
const reason = '.agentic-qe is a symlink; refusing to write through it';
|
|
73
|
+
log('Export skipped: ' + reason); return { exported: false, reason };
|
|
74
|
+
}
|
|
75
|
+
const aqe = aqeInvocation();
|
|
76
|
+
if (!aqe.cmd) { log('Export skipped: ' + aqe.reason); return { exported: false, reason: aqe.reason }; }
|
|
36
77
|
try {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
if (fs.existsSync(idmap)) fs.unlinkSync(idmap);
|
|
78
|
+
removeEntry(RVF_PATH);
|
|
79
|
+
removeEntry(RVF_PATH + '.idmap.json');
|
|
40
80
|
const result = execFileSync(
|
|
41
|
-
|
|
42
|
-
{ timeout: 60000, encoding: 'utf-8' }
|
|
81
|
+
aqe.cmd, [...aqe.args, 'brain', 'export', '-o', RVF_PATH, '--format', 'rvf'],
|
|
82
|
+
{ timeout: 60000, encoding: 'utf-8', windowsHide: true }
|
|
43
83
|
);
|
|
44
84
|
const m = result.match(/Patterns:\s+(\d+)/);
|
|
45
85
|
const p = m ? m[1] : '0';
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
* Contract:
|
|
17
17
|
* * resolve a PROJECT-LOCAL AQE bundle and run it via THIS node (no shell),
|
|
18
18
|
* or invoke an already-installed `aqe` binary without package-manager or
|
|
19
|
-
* network resolution
|
|
19
|
+
* network resolution (on Windows: the global install's bundle, never the
|
|
20
|
+
* `aqe.cmd` shim — see resolveAqeInvocation, #872);
|
|
20
21
|
* * if nothing resolves, no-op (a hook must never block a turn);
|
|
21
22
|
* * keep stderr OUT of the transcript, but tee fatal native-init markers
|
|
22
23
|
* (e.g. better-sqlite3 `invalid ELF header`) to a throttled, durable
|
|
@@ -37,39 +38,240 @@
|
|
|
37
38
|
|
|
38
39
|
'use strict';
|
|
39
40
|
|
|
40
|
-
const
|
|
41
|
+
const childProcess = require('node:child_process');
|
|
41
42
|
const fs = require('node:fs');
|
|
42
43
|
const path = require('node:path');
|
|
43
44
|
|
|
44
45
|
const PROJECT = process.env.CLAUDE_PROJECT_DIR || '.';
|
|
45
46
|
const args = process.argv.slice(2); // hook subcommand + its args
|
|
46
47
|
|
|
47
|
-
|
|
48
|
-
//
|
|
49
|
-
//
|
|
50
|
-
//
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
48
|
+
const BUNDLE_IN_PACKAGE = ['node_modules', 'agentic-qe', 'dist', 'cli', 'bundle.js'];
|
|
49
|
+
// Script shims that Node cannot start without a shell (.ps1 is never directly
|
|
50
|
+
// executable at all). They are only ever READ to find the JS entry behind them.
|
|
51
|
+
// Windows ignores trailing dots/spaces in file names, so `aqe.cmd.` IS aqe.cmd.
|
|
52
|
+
const SCRIPT_SHIM = /\.(cmd|bat|ps1)[. ]*$/i;
|
|
53
|
+
const PREFIX_CACHE_TTL_MS = 5 * 60 * 1000;
|
|
54
|
+
const PREFIX_CACHE_MAX_BYTES = 4096;
|
|
55
|
+
|
|
56
|
+
function existsSafe(p) { try { return fs.existsSync(p); } catch { return false; } }
|
|
57
|
+
function readSafe(p) { try { return fs.readFileSync(p, 'utf8'); } catch { return ''; } }
|
|
58
|
+
|
|
59
|
+
/** Env lookup that is case-insensitive on Windows (PATH is usually `Path`). */
|
|
60
|
+
function envGet(env, name, platform) {
|
|
61
|
+
if (platform !== 'win32') return env[name];
|
|
62
|
+
const key = Object.keys(env).find((k) => k.toUpperCase() === name.toUpperCase());
|
|
63
|
+
return key === undefined ? undefined : env[key];
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* The target a package-manager `.cmd` shim launches, relative to its directory:
|
|
68
|
+
* npm: "%_prog%" "%dp0%\node_modules\agentic-qe\dist\cli\bundle.js" %*
|
|
69
|
+
* pnpm: "%~dp0\global\5\node_modules\agentic-qe\dist\cli\bundle.js" %*
|
|
70
|
+
* yarn v1: @"%~dp0\..\Data\global\node_modules\.bin\aqe.cmd" %* (another .cmd)
|
|
71
|
+
* Volta's `volta run %~n0 %*` names no file, so it yields null.
|
|
72
|
+
*/
|
|
73
|
+
function parseCmdShimTarget(shimPath, content, p) {
|
|
74
|
+
const m = /"%~?dp0%?\\([^"%]+\.(?:[cm]?js|cmd|bat))"/i.exec(content || '');
|
|
75
|
+
return m ? p.join(p.dirname(shimPath), ...m[1].split(/[\\/]+/)) : null;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* The JS bundle behind a shim: its parsed JS target, else npm's layout beside
|
|
80
|
+
* it, else (yarn v1) ONE hop through the `.cmd` it delegates to. Files are only
|
|
81
|
+
* read; the result is always run via node, never as a script.
|
|
82
|
+
*/
|
|
83
|
+
function shimBundle(shim, p, exists, readFile, hops) {
|
|
84
|
+
if (!exists(shim)) return null;
|
|
85
|
+
const target = parseCmdShimTarget(shim, readFile(shim), p);
|
|
86
|
+
const direct = [target && /\.[cm]?js$/i.test(target) ? target : null,
|
|
87
|
+
p.join(p.dirname(shim), ...BUNDLE_IN_PACKAGE)];
|
|
88
|
+
for (const b of direct) if (b && exists(b)) return b;
|
|
89
|
+
if (hops > 0 && target && /\.(cmd|bat)$/i.test(target)) {
|
|
90
|
+
return shimBundle(target, p, exists, readFile, hops - 1);
|
|
91
|
+
}
|
|
92
|
+
return null;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* `npm prefix -g` costs a node spawn (up to 1.5s) and only runs when nothing
|
|
97
|
+
* else resolved, i.e. on EVERY hook while AQE is unresolvable. Cache the answer
|
|
98
|
+
* (including "none") per node binary for a few minutes in the project's
|
|
99
|
+
* .agentic-qe/ (not a shared temp dir another user could pre-seed).
|
|
100
|
+
*/
|
|
101
|
+
function cachedNpmPrefix(lookup, execPath, p, exists, cacheFile, now) {
|
|
102
|
+
if (!cacheFile) return lookup(execPath, p, exists);
|
|
103
|
+
try {
|
|
104
|
+
// Never follow a symlink/junction or read something huge: regular file only.
|
|
105
|
+
const st = fs.lstatSync(cacheFile);
|
|
106
|
+
if (st.isFile() && st.size <= PREFIX_CACHE_MAX_BYTES) {
|
|
107
|
+
const c = JSON.parse(fs.readFileSync(cacheFile, 'utf8'));
|
|
108
|
+
if (c && c.execPath === execPath && now - c.at >= 0 && now - c.at < PREFIX_CACHE_TTL_MS) {
|
|
109
|
+
return typeof c.prefix === 'string' ? c.prefix : null;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
} catch { /* no or unreadable cache: look it up */ }
|
|
113
|
+
const prefix = lookup(execPath, p, exists) || null;
|
|
114
|
+
writeFileAtomic(cacheFile, JSON.stringify({ execPath, prefix, at: now }));
|
|
115
|
+
return prefix;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* A repository can commit `.agentic-qe` (or a file in it) as a symlink. Every
|
|
120
|
+
* write this hook makes therefore goes only into a REAL directory (created if
|
|
121
|
+
* missing; a symlink/junction is refused, never followed) ...
|
|
122
|
+
*/
|
|
123
|
+
function ensureRealDir(dir) {
|
|
124
|
+
try {
|
|
125
|
+
let st;
|
|
126
|
+
try { st = fs.lstatSync(dir); } catch (e) {
|
|
127
|
+
if (!e || e.code !== 'ENOENT') return false;
|
|
128
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
129
|
+
st = fs.lstatSync(dir);
|
|
130
|
+
}
|
|
131
|
+
return st.isDirectory() && !st.isSymbolicLink();
|
|
132
|
+
} catch { return false; }
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* ... and appends only to a regular file: lstat refuses an existing link or
|
|
137
|
+
* non-file, and O_NOFOLLOW (POSIX; undefined on Windows, where the lstat check
|
|
138
|
+
* stands alone) closes the race. Returns false when it declined to write.
|
|
139
|
+
*/
|
|
140
|
+
function appendFileSafe(file, text) {
|
|
141
|
+
if (!ensureRealDir(path.dirname(file))) return false;
|
|
142
|
+
try {
|
|
143
|
+
if (!fs.lstatSync(file).isFile()) return false; // lstat: a symlink is never isFile()
|
|
144
|
+
} catch (e) { if (!e || e.code !== 'ENOENT') return false; }
|
|
145
|
+
const c = fs.constants;
|
|
146
|
+
let fd;
|
|
147
|
+
try {
|
|
148
|
+
fd = fs.openSync(file, c.O_APPEND | c.O_CREAT | c.O_WRONLY | (c.O_NOFOLLOW || 0), 0o644);
|
|
149
|
+
fs.writeSync(fd, text);
|
|
150
|
+
return true;
|
|
151
|
+
} catch { return false; } finally {
|
|
152
|
+
if (fd !== undefined) { try { fs.closeSync(fd); } catch { /* ignore */ } }
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Write via a fresh temp file (O_EXCL: never opens an existing path or follows
|
|
158
|
+
* a planted link) + rename. rename REPLACES a symlink at the destination rather
|
|
159
|
+
* than writing through it, and readers never see a torn file. Best-effort.
|
|
160
|
+
*/
|
|
161
|
+
function writeFileAtomic(file, data) {
|
|
162
|
+
if (!ensureRealDir(path.dirname(file))) return;
|
|
163
|
+
const tmp = `${file}.${process.pid}.${Date.now()}.${Math.random().toString(36).slice(2)}.tmp`;
|
|
164
|
+
try {
|
|
165
|
+
fs.writeFileSync(tmp, data, { flag: 'wx' });
|
|
166
|
+
fs.renameSync(tmp, file);
|
|
167
|
+
} catch {
|
|
168
|
+
try { fs.unlinkSync(tmp); } catch { /* nothing to clean up */ }
|
|
169
|
+
}
|
|
66
170
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
171
|
+
|
|
172
|
+
/** `npm prefix -g` via the npm CLI bundled next to node.exe: no shell, no .cmd. */
|
|
173
|
+
function npmGlobalPrefix(execPath, p, exists) {
|
|
174
|
+
const npmCli = p.join(p.dirname(execPath), 'node_modules', 'npm', 'bin', 'npm-cli.js');
|
|
175
|
+
if (!exists(npmCli)) return null;
|
|
176
|
+
try {
|
|
177
|
+
const r = childProcess.spawnSync(execPath, [npmCli, 'prefix', '-g'], {
|
|
178
|
+
encoding: 'utf8', timeout: 1500, stdio: ['ignore', 'pipe', 'ignore'], windowsHide: true,
|
|
179
|
+
});
|
|
180
|
+
return r && r.status === 0 && r.stdout ? r.stdout.trim() || null : null;
|
|
181
|
+
} catch { return null; }
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Resolve how to run `<runner> hooks <args>`, in priority order:
|
|
186
|
+
* 1. AQE_HOOK_BUNDLE, the installed dependency bundle (node_modules/agentic-qe)
|
|
187
|
+
* or a local source build (./dist), run via process.execPath (this node):
|
|
188
|
+
* no shell, no node_modules/.bin/aqe(.cmd) wrapper.
|
|
189
|
+
* 2. POSIX: the installed `aqe` binary (AQE_HOOK_BIN is a test/managed-install
|
|
190
|
+
* seam). No package manager is ever invoked from a lifecycle hook.
|
|
191
|
+
* 3. Windows (#872): NEVER spawn `aqe.cmd`. Since the CVE-2024-27980 fix Node
|
|
192
|
+
* refuses to start .cmd/.bat without `shell: true` (EINVAL), and a shell
|
|
193
|
+
* would expose Claude Code-supplied arguments (--command, prompt text) to
|
|
194
|
+
* cmd.exe metacharacter injection. Instead find the bundle the global shim
|
|
195
|
+
* would have launched and run it via process.execPath: parse `aqe.cmd` on
|
|
196
|
+
* PATH (npm, pnpm, yarn v1), then npm's global layouts, then a cached
|
|
197
|
+
* `npm prefix -g` (bundled npm CLI). An AQE_HOOK_BIN naming a .cmd/.bat/
|
|
198
|
+
* .ps1 is resolved the same way, never spawned.
|
|
199
|
+
* 4. Nothing resolved (e.g. Volta): { cmd: null, reason }. The caller logs it.
|
|
200
|
+
*
|
|
201
|
+
* Returns { cmd, args, source }; `args` are the runner args that precede
|
|
202
|
+
* `hooks <subcommand ...>`. Every input is injectable for tests
|
|
203
|
+
* (`prefixCacheFile: null` disables the npm-prefix cache).
|
|
204
|
+
*/
|
|
205
|
+
function resolveAqeInvocation(opts) {
|
|
206
|
+
const o = opts || {};
|
|
207
|
+
const platform = o.platform || process.platform;
|
|
208
|
+
const env = o.env || process.env;
|
|
209
|
+
const execPath = o.execPath || process.execPath;
|
|
210
|
+
const exists = o.exists || existsSafe;
|
|
211
|
+
const readFile = o.readFile || readSafe;
|
|
212
|
+
const npmPrefix = o.npmPrefix || npmGlobalPrefix;
|
|
213
|
+
// Host path module (=== path.win32 on real Windows); injectable for tests.
|
|
214
|
+
const p = o.path || path;
|
|
215
|
+
const project = o.project || env.CLAUDE_PROJECT_DIR || '.';
|
|
216
|
+
// Always hand node an ABSOLUTE path: a relative one such as `--require=./x.js`
|
|
217
|
+
// would be parsed by node as an option, not as the script to run.
|
|
218
|
+
const viaNode = (bundle, source) => ({ cmd: execPath, args: [p.resolve(bundle)], source });
|
|
219
|
+
|
|
220
|
+
const local = [
|
|
221
|
+
env.AQE_HOOK_BUNDLE,
|
|
222
|
+
p.join(project, ...BUNDLE_IN_PACKAGE),
|
|
223
|
+
p.join(project, 'dist', 'cli', 'bundle.js'),
|
|
224
|
+
].filter(Boolean);
|
|
225
|
+
for (const b of local) if (exists(b)) return viaNode(b, 'project-bundle');
|
|
226
|
+
|
|
227
|
+
const bin = env.AQE_HOOK_BIN;
|
|
228
|
+
if (platform !== 'win32') return { cmd: bin || 'aqe', args: [], source: 'bin' };
|
|
229
|
+
// A real executable (aqe.exe, a test stub) can be spawned without a shell.
|
|
230
|
+
if (bin && !SCRIPT_SHIM.test(bin)) return { cmd: bin, args: [], source: 'bin' };
|
|
231
|
+
|
|
232
|
+
const shims = bin ? [bin] : [];
|
|
233
|
+
for (const dir of (envGet(env, 'PATH', platform) || '').split(';')) {
|
|
234
|
+
const d = dir.trim().replace(/^"(.*)"$/, '$1');
|
|
235
|
+
// Relative PATH entries (`.`, `--require=.`) resolve against an arbitrary
|
|
236
|
+
// cwd; Windows itself never searches them for a hook-launched process here.
|
|
237
|
+
if (d && p.isAbsolute(d)) shims.push(p.join(d, 'aqe.cmd'));
|
|
238
|
+
}
|
|
239
|
+
for (const shim of shims) {
|
|
240
|
+
const b = shimBundle(shim, p, exists, readFile, 1);
|
|
241
|
+
if (b) return viaNode(b, `global-shim:${shim}`);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
const appData = envGet(env, 'APPDATA', platform);
|
|
245
|
+
const prefixes = [
|
|
246
|
+
envGet(env, 'npm_config_prefix', platform),
|
|
247
|
+
appData && p.join(appData, 'npm'), // npm's default global prefix on Windows
|
|
248
|
+
p.dirname(execPath), // nvm-windows: prefix = node install dir
|
|
249
|
+
].filter(Boolean);
|
|
250
|
+
for (const prefix of prefixes) {
|
|
251
|
+
const b = p.join(prefix, ...BUNDLE_IN_PACKAGE);
|
|
252
|
+
if (exists(b)) return viaNode(b, `global-prefix:${prefix}`);
|
|
253
|
+
}
|
|
254
|
+
const cacheFile = o.prefixCacheFile === undefined
|
|
255
|
+
? p.join(project, '.agentic-qe', 'hook-npm-prefix.json') : o.prefixCacheFile;
|
|
256
|
+
const queried = cachedNpmPrefix(npmPrefix, execPath, p, exists, cacheFile, o.now || Date.now());
|
|
257
|
+
if (queried && exists(p.join(queried, ...BUNDLE_IN_PACKAGE))) {
|
|
258
|
+
return viaNode(p.join(queried, ...BUNDLE_IN_PACKAGE), `npm-prefix:${queried}`);
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
const binNote = bin
|
|
262
|
+
? `AQE_HOOK_BIN=${bin} is a .cmd/.bat/.ps1 script, which is never started without `
|
|
263
|
+
+ 'a shell, and no agentic-qe bundle was found behind it; ' : '';
|
|
264
|
+
return {
|
|
265
|
+
cmd: null,
|
|
266
|
+
args: [],
|
|
267
|
+
source: 'none',
|
|
268
|
+
reason: `${binNote}no agentic-qe bundle found (Windows cannot spawn aqe.cmd without a shell `
|
|
269
|
+
+ 'since CVE-2024-27980, and a shell is unsafe for hook arguments). Volta and other '
|
|
270
|
+
+ 'non-npm/pnpm/yarn-v1 shims cannot be followed. Fix: `npm install -D agentic-qe`, '
|
|
271
|
+
+ 'or set AQE_HOOK_BUNDLE to the global bundle, e.g. '
|
|
272
|
+
+ '<npm global prefix>\\node_modules\\agentic-qe\\dist\\cli\\bundle.js '
|
|
273
|
+
+ '(Volta: the agentic-qe dist\\cli\\bundle.js inside your Volta tools image directory)',
|
|
274
|
+
};
|
|
73
275
|
}
|
|
74
276
|
|
|
75
277
|
// Fatal init markers that mean the hook ran but its persistence layer is dead
|
|
@@ -100,18 +302,36 @@ function recordHookHealth(line) {
|
|
|
100
302
|
try {
|
|
101
303
|
const logPath = path.join(PROJECT, '.agentic-qe', 'hooks-health.log');
|
|
102
304
|
// Throttle: skip if we logged within the last 5 min (avoid a line/turn).
|
|
305
|
+
// lstat, so a planted symlink's TARGET mtime never decides anything.
|
|
103
306
|
try {
|
|
104
|
-
const st = fs.
|
|
105
|
-
if (Date.now() - st.mtimeMs < 5 * 60 * 1000) return;
|
|
307
|
+
const st = fs.lstatSync(logPath);
|
|
308
|
+
if (st.isFile() && Date.now() - st.mtimeMs < 5 * 60 * 1000) return;
|
|
106
309
|
} catch { /* no log yet — fall through and create it */ }
|
|
107
|
-
|
|
108
|
-
fs.appendFileSync(logPath, line);
|
|
310
|
+
appendFileSafe(logPath, line); // never through a symlinked log or .agentic-qe
|
|
109
311
|
} catch { /* health logging must never block a turn */ }
|
|
110
312
|
}
|
|
111
313
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
const
|
|
314
|
+
/** Spawn the resolved runner; returns its stdout ('' on any failure). */
|
|
315
|
+
function runHook() {
|
|
316
|
+
const ts = () => new Date().toISOString();
|
|
317
|
+
const subcmd = args[0] || 'unknown';
|
|
318
|
+
const inv = resolveAqeInvocation();
|
|
319
|
+
if (!inv.cmd) {
|
|
320
|
+
recordHookHealth(`[${ts()}] SPAWN-FAILED hook could not start `
|
|
321
|
+
+ `(cmd=${subcmd}): ${inv.reason}. Learning for this invocation was NOT captured.\n`);
|
|
322
|
+
return '';
|
|
323
|
+
}
|
|
324
|
+
let out = '';
|
|
325
|
+
try {
|
|
326
|
+
out = superviseSpawn(inv.cmd, [...inv.args, 'hooks', ...args], subcmd, ts);
|
|
327
|
+
} catch { /* never block a turn */ }
|
|
328
|
+
return out;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
function superviseSpawn(cmd, cmdArgs, subcmd, ts) {
|
|
332
|
+
// shell is deliberately NOT set: arguments go to CreateProcess/execve verbatim.
|
|
333
|
+
const res = childProcess.spawnSync(cmd, cmdArgs, {
|
|
334
|
+
windowsHide: true,
|
|
115
335
|
// Claude Code delivers hook event data (prompt, tool_input, etc.) as JSON
|
|
116
336
|
// on stdin — `$PROMPT`/`$TOOL_INPUT_*` env-var substitution is NOT
|
|
117
337
|
// reliable on every hook surface (see hooks-shared.ts:readStdinJsonEvent's
|
|
@@ -123,11 +343,9 @@ try {
|
|
|
123
343
|
maxBuffer: 16 * 1024 * 1024,
|
|
124
344
|
timeout: SPAWN_TIMEOUT_MS,
|
|
125
345
|
});
|
|
126
|
-
out = (res && res.stdout) || '';
|
|
127
|
-
const subcmd = args[0] || 'unknown';
|
|
346
|
+
const out = (res && res.stdout) || '';
|
|
128
347
|
const stderr = (res && res.stderr) || '';
|
|
129
348
|
const hit = FATAL_MARKERS.find((m) => stderr.includes(m));
|
|
130
|
-
const ts = () => new Date().toISOString();
|
|
131
349
|
if (hit) {
|
|
132
350
|
// The fix depends on WHICH failure hit. A native-binary marker (invalid ELF
|
|
133
351
|
// header / ERR_DLOPEN_FAILED / wrong Node version) is a real rebuild case.
|
|
@@ -183,20 +401,31 @@ try {
|
|
|
183
401
|
recordHookHealth(`[${ts()}] EMPTY-RESULT hook exited status=${res.status} `
|
|
184
402
|
+ `with no JSON output (cmd=${subcmd}). stderr: ${stderr.slice(0, 300)}\n`);
|
|
185
403
|
}
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
//
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
404
|
+
return out;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
function main() {
|
|
408
|
+
const out = runHook();
|
|
409
|
+
// Emit only the top-level JSON object: the first line beginning with '{' through
|
|
410
|
+
// the first line beginning with '}' (pretty-printed JSON closes at column 0;
|
|
411
|
+
// nested closes are indented). Drops leading init-noise lines AND any async log
|
|
412
|
+
// lines printed after the JSON.
|
|
413
|
+
const lines = out.split('\n');
|
|
414
|
+
const start = lines.findIndex((l) => l.startsWith('{'));
|
|
415
|
+
if (start !== -1) {
|
|
416
|
+
let end = lines.length - 1;
|
|
417
|
+
for (let i = start; i < lines.length; i++) {
|
|
418
|
+
if (lines[i].startsWith('}')) { end = i; break; }
|
|
419
|
+
}
|
|
420
|
+
process.stdout.write(lines.slice(start, end + 1).join('\n') + '\n');
|
|
198
421
|
}
|
|
199
|
-
process.
|
|
422
|
+
process.exit(0);
|
|
200
423
|
}
|
|
201
424
|
|
|
202
|
-
|
|
425
|
+
// Exported so brain-checkpoint.cjs and unit tests can reuse the resolver;
|
|
426
|
+
// requiring this file never spawns anything.
|
|
427
|
+
// brain-checkpoint.cjs checks for this export (and the require.main guard
|
|
428
|
+
// below) before requiring this file; keep both.
|
|
429
|
+
module.exports = { resolveAqeInvocation, parseCmdShimTarget };
|
|
430
|
+
|
|
431
|
+
if (require.main === module) main();
|
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,135 @@ All notable changes to the Agentic QE project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [3.15.3] - 2026-10-11
|
|
9
|
+
|
|
10
|
+
A bug-fix release. AQE hooks work on Windows again. Several hangs, data-safety
|
|
11
|
+
and correctness bugs are fixed, mostly found while testing the
|
|
12
|
+
`agentic-qe-fleet` plugin end to end and in the October review batch.
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
|
|
16
|
+
- **AQE hooks run on Windows again.** On Windows, hooks generated by
|
|
17
|
+
`aqe init` silently did nothing when agentic-qe was installed globally,
|
|
18
|
+
because Node refuses to start `aqe.cmd` without a shell. Hooks now run the
|
|
19
|
+
installed AQE bundle directly with Node. That works for npm, pnpm and
|
|
20
|
+
yarn v1 global installs; Volta users can set `AQE_HOOK_BUNDLE`. Re-run
|
|
21
|
+
`aqe init` to refresh existing hooks. This was verified with a simulated
|
|
22
|
+
Windows environment, not yet on a real Windows machine ([#872]).
|
|
23
|
+
- **Hook and daemon files can't be redirected.** The hook, brain-checkpoint
|
|
24
|
+
and daemon scripts no longer follow symbolic links when writing into
|
|
25
|
+
`.agentic-qe/` (#872 hardening).
|
|
26
|
+
- **No more hangs on stalled servers.** These now time out instead of
|
|
27
|
+
waiting forever when a server sends headers and then stalls:
|
|
28
|
+
- LLM providers (including slow but healthy streams, which keep
|
|
29
|
+
working) ([#889]);
|
|
30
|
+
- Ollama embeddings ([#885]);
|
|
31
|
+
- the Ollama and OpenRouter consensus providers ([#961]).
|
|
32
|
+
- **`RateLimiter.wait()` no longer hangs** when a request can never fit the
|
|
33
|
+
bucket ([#905]).
|
|
34
|
+
- **Git refs are validated.** A commit reference that looks like a git option
|
|
35
|
+
(for example `--output=…`) is rejected instead of being passed to git.
|
|
36
|
+
Refs such as `@{-1}` and `HEAD^!` now work correctly ([#960]).
|
|
37
|
+
- **Test retries target exactly the right test.** Retried test names and paths
|
|
38
|
+
are escaped and anchored for Jest, Vitest and Mocha. Names that start with
|
|
39
|
+
`-` work, and Jest 30's renamed path option is used ([#909]).
|
|
40
|
+
- **`aqe test generate` writes every generated test**, not just the first
|
|
41
|
+
10. Generated tests never land outside your project, and existing test
|
|
42
|
+
files are kept unless you pass `--force` ([#936]).
|
|
43
|
+
- **Session journal is crash-safe.** A partial write is completed, not
|
|
44
|
+
duplicated. If the disk stays full, the oldest buffered entries are dropped,
|
|
45
|
+
and a gap marker keeps the session resumable ([#910]).
|
|
46
|
+
- **Fresh projects no longer log an RVF error.** Without an embedder you get
|
|
47
|
+
one clear warning that explains how to enable vector search, and dream
|
|
48
|
+
"apply" succeeds while the vector index is pending. The provenance check
|
|
49
|
+
that protects existing indexes is unchanged ([#852]).
|
|
50
|
+
- **Cognitive complexity follows the SonarSource rules.** `else if` and
|
|
51
|
+
nesting are no longer double-counted, and keywords in comments or strings
|
|
52
|
+
are ignored ([#907]).
|
|
53
|
+
- Cargo test categories no longer overlap ([#906]). The git analyzer includes
|
|
54
|
+
files from a repository's initial commit ([#874]). Optional native modules
|
|
55
|
+
with a missing platform binary now degrade with a clear reason ([#858]).
|
|
56
|
+
- Hardening: costs, counters and caches are safe with keys such as
|
|
57
|
+
`constructor` or `__proto__`. Embedding cache keys can't collide. Cached
|
|
58
|
+
state deltas are JSON-safe ([#914]).
|
|
59
|
+
|
|
60
|
+
### Changed
|
|
61
|
+
|
|
62
|
+
- **Cognitive complexity scores are much lower.** Expect a one-time drop in
|
|
63
|
+
stored reports and trends after upgrading ([#907]).
|
|
64
|
+
- **`aqe test generate` no longer overwrites existing test files.** Pass
|
|
65
|
+
`--force` to overwrite them ([#936]).
|
|
66
|
+
- **`saveResults` on MCP domain tools.** The 11 tools that save results under
|
|
67
|
+
`.agentic-qe/results/` accept `saveResults: false`. They also return
|
|
68
|
+
`resultsSaved`, `resultsNote` and `savedFiles`, which is now always an
|
|
69
|
+
array ([#925], [#933]). `aqe test generate --no-save` prints the tests
|
|
70
|
+
instead of writing them.
|
|
71
|
+
- `goap-status` rejects unknown status filters, including the empty string
|
|
72
|
+
(#894, from the October batch).
|
|
73
|
+
- Dependency updates (lockfile only, dev dependencies) ([#938]).
|
|
74
|
+
|
|
75
|
+
[#852]: https://github.com/proffesor-for-testing/agentic-qe/issues/852
|
|
76
|
+
[#858]: https://github.com/proffesor-for-testing/agentic-qe/pull/858
|
|
77
|
+
[#872]: https://github.com/proffesor-for-testing/agentic-qe/issues/872
|
|
78
|
+
[#874]: https://github.com/proffesor-for-testing/agentic-qe/pull/874
|
|
79
|
+
[#885]: https://github.com/proffesor-for-testing/agentic-qe/pull/885
|
|
80
|
+
[#889]: https://github.com/proffesor-for-testing/agentic-qe/pull/889
|
|
81
|
+
[#905]: https://github.com/proffesor-for-testing/agentic-qe/issues/905
|
|
82
|
+
[#906]: https://github.com/proffesor-for-testing/agentic-qe/issues/906
|
|
83
|
+
[#907]: https://github.com/proffesor-for-testing/agentic-qe/issues/907
|
|
84
|
+
[#909]: https://github.com/proffesor-for-testing/agentic-qe/issues/909
|
|
85
|
+
[#910]: https://github.com/proffesor-for-testing/agentic-qe/issues/910
|
|
86
|
+
[#914]: https://github.com/proffesor-for-testing/agentic-qe/issues/914
|
|
87
|
+
[#925]: https://github.com/proffesor-for-testing/agentic-qe/issues/925
|
|
88
|
+
[#933]: https://github.com/proffesor-for-testing/agentic-qe/issues/933
|
|
89
|
+
[#936]: https://github.com/proffesor-for-testing/agentic-qe/issues/936
|
|
90
|
+
[#938]: https://github.com/proffesor-for-testing/agentic-qe/pull/938
|
|
91
|
+
[#960]: https://github.com/proffesor-for-testing/agentic-qe/issues/960
|
|
92
|
+
[#961]: https://github.com/proffesor-for-testing/agentic-qe/issues/961
|
|
93
|
+
|
|
94
|
+
## [3.15.2] - 2026-10-10
|
|
95
|
+
|
|
96
|
+
This hardening patch fixes problems found by installing the
|
|
97
|
+
`agentic-qe-fleet` plugin from the marketplace into a fresh project and
|
|
98
|
+
using it end to end.
|
|
99
|
+
|
|
100
|
+
### Fixed
|
|
101
|
+
|
|
102
|
+
- **No duplicate AQE MCP server.** When the `agentic-qe-fleet` plugin is
|
|
103
|
+
enabled, `aqe init` no longer also adds its own `agentic-qe` server to the
|
|
104
|
+
project's `.mcp.json`, so AQE is registered only once. If your project
|
|
105
|
+
already has that entry, init keeps it and tells you how to remove it. Use
|
|
106
|
+
`aqe init --with-mcp` to add the project entry anyway ([#922]).
|
|
107
|
+
- **`aqe init --no-mcp` and `--no-governance` now work.** Both flags were
|
|
108
|
+
ignored before: init still wrote the MCP entry and the governance files.
|
|
109
|
+
Combining `--no-mcp` with `--with-mcp` now stops with a clear error
|
|
110
|
+
([#931], [#935]).
|
|
111
|
+
- **aqe-mod reports its real version.** The status file and the ruflo
|
|
112
|
+
console now show the plugin version instead of `0.1.0` ([#923]).
|
|
113
|
+
- **aqe-mod remembers past refusals.** `/aqe-mod status` now shows totals
|
|
114
|
+
across sessions and the most recent refusal, not just the current
|
|
115
|
+
session's counts. The command text is never stored ([#924]).
|
|
116
|
+
- **aqe-mod status file handling is hardened.** The mod no longer follows
|
|
117
|
+
symbolic links when reading or writing its status file, and it validates
|
|
118
|
+
what it reads back ([#930]).
|
|
119
|
+
- **Test generation can skip saving results.** `test_generate_enhanced` (and
|
|
120
|
+
the other MCP tools that save results) accept `saveResults: false` to skip
|
|
121
|
+
writing reports under `.agentic-qe/results/`. The tool description now says
|
|
122
|
+
results are saved by default. `aqe test generate --no-save` prints the
|
|
123
|
+
generated tests instead of writing files ([#925]).
|
|
124
|
+
- **No broken `ruflo` plugin entry in this repository.** The vendored `ruflo`
|
|
125
|
+
skill is now just its `SKILL.md`, so Claude Code no longer lists a broken
|
|
126
|
+
skills-directory plugin when you work in this repo ([#926]).
|
|
127
|
+
|
|
128
|
+
[#922]: https://github.com/proffesor-for-testing/agentic-qe/issues/922
|
|
129
|
+
[#923]: https://github.com/proffesor-for-testing/agentic-qe/issues/923
|
|
130
|
+
[#924]: https://github.com/proffesor-for-testing/agentic-qe/issues/924
|
|
131
|
+
[#925]: https://github.com/proffesor-for-testing/agentic-qe/issues/925
|
|
132
|
+
[#926]: https://github.com/proffesor-for-testing/agentic-qe/issues/926
|
|
133
|
+
[#930]: https://github.com/proffesor-for-testing/agentic-qe/pull/930
|
|
134
|
+
[#931]: https://github.com/proffesor-for-testing/agentic-qe/issues/931
|
|
135
|
+
[#935]: https://github.com/proffesor-for-testing/agentic-qe/issues/935
|
|
136
|
+
|
|
8
137
|
## [3.15.1] - 2026-10-10
|
|
9
138
|
|
|
10
139
|
This patch hardens the aqe-mod guard that ships with the `agentic-qe-fleet`
|
|
@@ -67,6 +67,15 @@ const TOOL_STATUS_TRANSITIONS = [
|
|
|
67
67
|
// ============================================================================
|
|
68
68
|
// State Delta Cache Implementation
|
|
69
69
|
// ============================================================================
|
|
70
|
+
/**
|
|
71
|
+
* AG-UI state is JSON. States are hashed (#857), diffed and cloned with the
|
|
72
|
+
* same JSON round trip, so a function, Date or undefined behaves as it does
|
|
73
|
+
* over the wire, and the cached delta always matches its key (#914). Values JSON
|
|
74
|
+
* cannot represent (BigInt, cycles) throw a TypeError.
|
|
75
|
+
*/
|
|
76
|
+
function toJson(value) {
|
|
77
|
+
return JSON.parse(JSON.stringify(value));
|
|
78
|
+
}
|
|
70
79
|
/**
|
|
71
80
|
* LRU Cache for pre-computed state deltas
|
|
72
81
|
*
|
|
@@ -113,11 +122,11 @@ export class StateDeltaCache {
|
|
|
113
122
|
// Move to end for LRU (delete and re-add)
|
|
114
123
|
this.cache.delete(key);
|
|
115
124
|
this.cache.set(key, cached);
|
|
116
|
-
return
|
|
125
|
+
return toJson(cached.delta);
|
|
117
126
|
}
|
|
118
127
|
// Cache miss - compute delta
|
|
119
128
|
this.misses++;
|
|
120
|
-
const delta = computeDiff(fromState, toState, this.config.diffConfig);
|
|
129
|
+
const delta = computeDiff(toJson(fromState), toJson(toState), this.config.diffConfig);
|
|
121
130
|
// Store in cache
|
|
122
131
|
this.setDelta(key, delta);
|
|
123
132
|
return delta;
|
|
@@ -135,7 +144,7 @@ export class StateDeltaCache {
|
|
|
135
144
|
*/
|
|
136
145
|
precompute(fromState, toState) {
|
|
137
146
|
const key = this.computeCacheKey(fromState, toState);
|
|
138
|
-
const delta = computeDiff(fromState, toState, this.config.diffConfig);
|
|
147
|
+
const delta = computeDiff(toJson(fromState), toJson(toState), this.config.diffConfig);
|
|
139
148
|
this.setDelta(key, delta);
|
|
140
149
|
this.preComputedKeys.add(key);
|
|
141
150
|
return delta;
|
|
@@ -329,7 +338,7 @@ export class StateDeltaCache {
|
|
|
329
338
|
hashState(state) {
|
|
330
339
|
// A JSON replacer key list applies at every depth and drops nested fields.
|
|
331
340
|
// Normalize JSON values first, then sort each object without filtering keys.
|
|
332
|
-
const normalized =
|
|
341
|
+
const normalized = toJson(state);
|
|
333
342
|
const encode = (value) => {
|
|
334
343
|
if (value === null || typeof value !== 'object')
|
|
335
344
|
return JSON.stringify(value);
|
|
@@ -351,7 +360,7 @@ export class StateDeltaCache {
|
|
|
351
360
|
}
|
|
352
361
|
const now = Date.now();
|
|
353
362
|
this.cache.set(key, {
|
|
354
|
-
delta:
|
|
363
|
+
delta: toJson(delta),
|
|
355
364
|
createdAt: now,
|
|
356
365
|
lastAccessedAt: now,
|
|
357
366
|
accessCount: 0,
|