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
|
@@ -274,10 +274,10 @@ function countCargoTests(projectPath, config) {
|
|
|
274
274
|
// Count lines ending with ": test"
|
|
275
275
|
const testLines = output.split('\n').filter(line => line.endsWith(': test'));
|
|
276
276
|
const total = testLines.length;
|
|
277
|
-
//
|
|
278
|
-
const unit = testLines.filter(t => !t.includes('integration') && !t.includes('e2e')).length;
|
|
279
|
-
const integration = testLines.filter(t => t.includes('integration')).length;
|
|
277
|
+
// Disjoint categories, e2e before integration: `tests::integration::e2e_x` counts once.
|
|
280
278
|
const e2e = testLines.filter(t => t.includes('e2e')).length;
|
|
279
|
+
const integration = testLines.filter(t => !t.includes('e2e') && t.includes('integration')).length;
|
|
280
|
+
const unit = total - integration - e2e;
|
|
281
281
|
return {
|
|
282
282
|
total,
|
|
283
283
|
unit,
|
|
@@ -9,6 +9,7 @@ import { ok, err } from '../../../shared/types/index.js';
|
|
|
9
9
|
import { toError } from '../../../shared/error-utils.js';
|
|
10
10
|
import { safeJsonParse } from '../../../shared/safe-json.js';
|
|
11
11
|
import { getClaudeModelForTier } from '../../../shared/llm/model-registry.js';
|
|
12
|
+
import { createSafeRecord } from '../../../shared/utils/safe-record.js';
|
|
12
13
|
const DEFAULT_CONFIG = {
|
|
13
14
|
minCoverage: 80,
|
|
14
15
|
enableLLMAnalysis: true, // On by default - opt-out
|
|
@@ -212,7 +213,8 @@ Return JSON in this exact format:
|
|
|
212
213
|
* Calculate effort breakdown by file
|
|
213
214
|
*/
|
|
214
215
|
calculateEffortBreakdown(gaps) {
|
|
215
|
-
|
|
216
|
+
// File paths are data, so the buckets must not inherit from Object.prototype (#914).
|
|
217
|
+
const breakdown = createSafeRecord();
|
|
216
218
|
for (const gap of gaps) {
|
|
217
219
|
const effort = Math.ceil(gap.lines.length / 15);
|
|
218
220
|
breakdown[gap.file] = (breakdown[gap.file] || 0) + effort;
|
|
@@ -9,6 +9,7 @@ import { rehydrateDates } from '../../../shared/utils/kv-date-rehydrate.js';
|
|
|
9
9
|
import { toError } from '../../../shared/error-utils.js';
|
|
10
10
|
import { createQEFlashAttention, } from '../../../integrations/ruvector/wrappers.js';
|
|
11
11
|
import { getClaudeModelForTier } from '../../../shared/llm/model-registry.js';
|
|
12
|
+
import { createSafeRecord } from '../../../shared/utils/safe-record.js';
|
|
12
13
|
const DEFAULT_CONFIG = {
|
|
13
14
|
minExperiencesForPattern: 5,
|
|
14
15
|
patternConfidenceThreshold: 0.7,
|
|
@@ -943,8 +944,9 @@ Provide:
|
|
|
943
944
|
return false;
|
|
944
945
|
}
|
|
945
946
|
calculateCentroid(experiences) {
|
|
946
|
-
|
|
947
|
-
const
|
|
947
|
+
// Metric names come from stored experiences (#914).
|
|
948
|
+
const avgMetrics = createSafeRecord();
|
|
949
|
+
const metricCounts = createSafeRecord();
|
|
948
950
|
for (const exp of experiences) {
|
|
949
951
|
for (const [key, value] of Object.entries(exp.state.metrics)) {
|
|
950
952
|
avgMetrics[key] = (avgMetrics[key] || 0) + value;
|
|
@@ -13,6 +13,7 @@ import { toError } from '../../../shared/error-utils.js';
|
|
|
13
13
|
import { safeJsonParse } from '../../../shared/safe-json.js';
|
|
14
14
|
import { getTestRunnerExecutionError } from '../../../shared/test-runner-verdict.js';
|
|
15
15
|
import { createVitestJsonReport, needsVitestJsonReportFile } from '../../../shared/vitest-json-report.js';
|
|
16
|
+
import { isJestCommand, jestExactPathPattern, runnerFilePath } from '../../../shared/test-runner-args.js';
|
|
16
17
|
import { secureRandom } from '../../../shared/utils/crypto-random.js';
|
|
17
18
|
const DEFAULT_FLAKY_CONFIG = {
|
|
18
19
|
simulateForTesting: false,
|
|
@@ -256,14 +257,19 @@ export class FlakyDetectorService {
|
|
|
256
257
|
const runId = uuidv4();
|
|
257
258
|
const startTime = Date.now();
|
|
258
259
|
return new Promise((resolve, reject) => {
|
|
259
|
-
const
|
|
260
|
+
const cwd = this.config.cwd ?? process.cwd();
|
|
261
|
+
// #909: pass an absolute path (never read as a flag); Jest reads it as a
|
|
262
|
+
// regex, so escape and anchor it to select exactly this file.
|
|
263
|
+
const fileArg = isJestCommand([this.config.testRunner, ...this.config.testRunnerArgs])
|
|
264
|
+
? jestExactPathPattern(file, cwd)
|
|
265
|
+
: runnerFilePath(file, cwd);
|
|
266
|
+
const baseArgs = [...this.config.testRunnerArgs, fileArg];
|
|
260
267
|
// Vitest 5 writes --reporter=json output to a file, not stdout. Detect
|
|
261
268
|
// Vitest from the runner command too (testRunner: 'vitest', args: ['run', ...]).
|
|
262
269
|
const report = needsVitestJsonReportFile([this.config.testRunner, ...baseArgs])
|
|
263
270
|
? createVitestJsonReport()
|
|
264
271
|
: undefined;
|
|
265
272
|
const args = report ? [...baseArgs, ...report.args] : baseArgs;
|
|
266
|
-
const cwd = this.config.cwd ?? process.cwd();
|
|
267
273
|
const child = spawn(this.config.testRunner, args, {
|
|
268
274
|
cwd,
|
|
269
275
|
env: { ...process.env, ...this.config.env },
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import { LoggerFactory } from '../../../logging/index.js';
|
|
6
6
|
import { spawn } from 'node:child_process';
|
|
7
7
|
import { createVitestJsonReport } from '../../../shared/vitest-json-report.js';
|
|
8
|
+
import { jestExactPathPattern, nameFilterArg, runnerFilePath } from '../../../shared/test-runner-args.js';
|
|
8
9
|
import { existsSync, readFileSync } from 'node:fs';
|
|
9
10
|
import { ok, err } from '../../../shared/types/index.js';
|
|
10
11
|
import { TEST_EXECUTION_CONSTANTS, RETRY_CONSTANTS } from '../../constants.js';
|
|
@@ -264,7 +265,7 @@ export class RetryHandlerService {
|
|
|
264
265
|
`or configure testRunner in RetryHandlerConfig. Cannot execute retry for: ${testFile}`);
|
|
265
266
|
}
|
|
266
267
|
// Build command based on runner
|
|
267
|
-
const { command, args, report } = this.buildTestCommand(runner, testFile, testName);
|
|
268
|
+
const { command, args, report } = this.buildTestCommand(runner, testFile, testName, cwd);
|
|
268
269
|
// Execute the test
|
|
269
270
|
return this.spawnTestProcess(command, args, cwd, report);
|
|
270
271
|
}
|
|
@@ -334,40 +335,42 @@ export class RetryHandlerService {
|
|
|
334
335
|
/**
|
|
335
336
|
* Build the command and arguments for the test runner
|
|
336
337
|
*/
|
|
337
|
-
buildTestCommand(runner, testFile, testName) {
|
|
338
|
+
buildTestCommand(runner, testFile, testName, cwd = this.config.cwd ?? process.cwd()) {
|
|
338
339
|
const npx = this.config.npxPath;
|
|
339
|
-
//
|
|
340
|
-
//
|
|
341
|
-
|
|
340
|
+
// A FailedTest holds the literal assertion name and path from the previous
|
|
341
|
+
// run. Name filters are regex-escaped and passed as --flag=value; file
|
|
342
|
+
// filters are absolute (Jest: escaped and anchored), so neither can be
|
|
343
|
+
// misread as a regex or as a flag when it starts with '-' (#886, #909).
|
|
344
|
+
const filterByName = Boolean(testName) && testName !== testFile;
|
|
342
345
|
switch (runner) {
|
|
343
346
|
case 'vitest':
|
|
344
|
-
// vitest run --reporter=json
|
|
347
|
+
// vitest run --reporter=json <abs file> --testNamePattern=<name>
|
|
345
348
|
// --outputFile: Vitest 5 no longer prints the JSON report to stdout.
|
|
346
349
|
{
|
|
347
350
|
const report = createVitestJsonReport();
|
|
348
|
-
const vitestArgs = ['vitest', 'run', '--reporter=json', testFile];
|
|
349
|
-
if (
|
|
350
|
-
vitestArgs.push('
|
|
351
|
-
}
|
|
351
|
+
const vitestArgs = ['vitest', 'run', '--reporter=json', runnerFilePath(testFile, cwd)];
|
|
352
|
+
if (filterByName)
|
|
353
|
+
vitestArgs.push(nameFilterArg('vitest', testName));
|
|
352
354
|
vitestArgs.push(...report.args);
|
|
353
355
|
return { command: npx, args: vitestArgs, report };
|
|
354
356
|
}
|
|
355
357
|
case 'jest':
|
|
356
|
-
// jest --json
|
|
358
|
+
// jest --json --testNamePattern=<name> ^<escaped abs file>$
|
|
359
|
+
// Positional TestPathPatterns work on Jest 29 and 30 (Jest 30 rejects
|
|
360
|
+
// the old --testPathPattern flag).
|
|
357
361
|
{
|
|
358
|
-
const jestArgs = ['jest', '--json'
|
|
359
|
-
if (
|
|
360
|
-
jestArgs.push('
|
|
361
|
-
|
|
362
|
+
const jestArgs = ['jest', '--json'];
|
|
363
|
+
if (filterByName)
|
|
364
|
+
jestArgs.push(nameFilterArg('jest', testName));
|
|
365
|
+
jestArgs.push(jestExactPathPattern(testFile, cwd));
|
|
362
366
|
return { command: npx, args: jestArgs };
|
|
363
367
|
}
|
|
364
368
|
case 'mocha':
|
|
365
|
-
// mocha --reporter json
|
|
369
|
+
// mocha --reporter json <abs file> --grep=<name>
|
|
366
370
|
{
|
|
367
|
-
const mochaArgs = ['mocha', '--reporter', 'json', testFile];
|
|
368
|
-
if (
|
|
369
|
-
mochaArgs.push('
|
|
370
|
-
}
|
|
371
|
+
const mochaArgs = ['mocha', '--reporter', 'json', runnerFilePath(testFile, cwd)];
|
|
372
|
+
if (filterByName)
|
|
373
|
+
mochaArgs.push(nameFilterArg('mocha', testName));
|
|
371
374
|
return { command: npx, args: mochaArgs };
|
|
372
375
|
}
|
|
373
376
|
default:
|
|
@@ -16,6 +16,7 @@ import { secureRandom, secureRandomInt } from '../../../shared/utils/crypto-rand
|
|
|
16
16
|
import { writeQualityEvidence } from '../../quality-assessment/quality-evidence.js';
|
|
17
17
|
import { getTestRunnerExecutionError, TestRunnerExecutionError } from '../../../shared/test-runner-verdict.js';
|
|
18
18
|
import { createVitestJsonReport } from '../../../shared/vitest-json-report.js';
|
|
19
|
+
import { jestExactPathPattern, runnerFilePath } from '../../../shared/test-runner-args.js';
|
|
19
20
|
import { getClaudeModelForTier } from '../../../shared/llm/model-registry.js';
|
|
20
21
|
import { terminateTestRunner, trackTestRunnerExit } from '../../../shared/test-runner-process.js';
|
|
21
22
|
const DEFAULT_CONFIG = {
|
|
@@ -481,7 +482,9 @@ Provide:
|
|
|
481
482
|
* Build test command based on framework
|
|
482
483
|
*/
|
|
483
484
|
buildTestCommand(fileOrFiles, framework) {
|
|
484
|
-
|
|
485
|
+
// #909: absolute paths never start with '-', so a file cannot be read as a
|
|
486
|
+
// flag; Jest's positional patterns are regexes, so escape and anchor them.
|
|
487
|
+
const files = (Array.isArray(fileOrFiles) ? fileOrFiles : [fileOrFiles]).map(file => runnerFilePath(file));
|
|
485
488
|
const createCoverageDirectory = () => mkdtempSync(join(tmpdir(), 'aqe-test-coverage-'));
|
|
486
489
|
switch (framework.toLowerCase()) {
|
|
487
490
|
case 'vitest': {
|
|
@@ -507,7 +510,7 @@ Provide:
|
|
|
507
510
|
const coverageDirectory = createCoverageDirectory();
|
|
508
511
|
return {
|
|
509
512
|
command: 'npx',
|
|
510
|
-
args: ['jest', ...files, '--json', '--no-colors', '--testLocationInResults', `--coverageDirectory=${coverageDirectory}`],
|
|
513
|
+
args: ['jest', ...files.map(file => jestExactPathPattern(file)), '--json', '--no-colors', '--testLocationInResults', `--coverageDirectory=${coverageDirectory}`],
|
|
511
514
|
coverageDirectory,
|
|
512
515
|
};
|
|
513
516
|
}
|
|
@@ -993,8 +993,11 @@ Return a JSON array of test suggestions, each with: { "name": "test name", "desc
|
|
|
993
993
|
if (lang && lang !== 'typescript' && lang !== 'javascript') {
|
|
994
994
|
return resolveTestFilePath(sourceFile, lang);
|
|
995
995
|
}
|
|
996
|
-
|
|
997
|
-
|
|
996
|
+
// #936 follow-up: strip only the trailing extension. A first-match
|
|
997
|
+
// replace turned /home/u/my.ts-app/src/a.ts into /home/u/my-app/src/a.ts,
|
|
998
|
+
// pointing the test file at a sibling directory outside the project.
|
|
999
|
+
const ext = fileExt ? fileExt.slice(1) : 'ts';
|
|
1000
|
+
const base = fileExt ? sourceFile.slice(0, -fileExt.length) : sourceFile;
|
|
998
1001
|
if (framework === 'pytest') {
|
|
999
1002
|
return `test_${base.split('/').pop()}.py`;
|
|
1000
1003
|
}
|
|
@@ -19,6 +19,7 @@ import { governanceFlags, } from './feature-flags.js';
|
|
|
19
19
|
import { proofEnvelopeIntegration, } from './proof-envelope-integration.js';
|
|
20
20
|
import { getUnifiedMemory } from '../kernel/unified-memory.js';
|
|
21
21
|
import { toErrorMessage } from '../shared/error-utils.js';
|
|
22
|
+
import { createSafeRecord } from '../shared/utils/safe-record.js';
|
|
22
23
|
// ============================================================================
|
|
23
24
|
// Default Configuration
|
|
24
25
|
// ============================================================================
|
|
@@ -274,14 +275,14 @@ export class ComplianceReporter {
|
|
|
274
275
|
});
|
|
275
276
|
// Calculate overall score
|
|
276
277
|
const overall = this.calculateOverallScore(violations);
|
|
277
|
-
// Calculate score by gate
|
|
278
|
-
const byGate =
|
|
278
|
+
// Calculate score by gate. Gate and agent names are data (#914).
|
|
279
|
+
const byGate = createSafeRecord();
|
|
279
280
|
const gateViolations = this.groupBy(violations, 'gate');
|
|
280
281
|
for (const [gate, gateViols] of Object.entries(gateViolations)) {
|
|
281
282
|
byGate[gate] = this.calculateOverallScore(gateViols);
|
|
282
283
|
}
|
|
283
284
|
// Calculate score by agent
|
|
284
|
-
const byAgent =
|
|
285
|
+
const byAgent = createSafeRecord();
|
|
285
286
|
const agentViolations = this.groupBy(violations, 'agentId');
|
|
286
287
|
for (const [agentId, agentViols] of Object.entries(agentViolations)) {
|
|
287
288
|
if (agentId !== 'undefined') {
|
|
@@ -572,13 +573,13 @@ export class ComplianceReporter {
|
|
|
572
573
|
for (const v of allViolations) {
|
|
573
574
|
bySeverity[v.severity]++;
|
|
574
575
|
}
|
|
575
|
-
// Count by gate
|
|
576
|
-
const byGate =
|
|
576
|
+
// Count by gate. Gate and agent names are data (#914).
|
|
577
|
+
const byGate = createSafeRecord();
|
|
577
578
|
for (const v of allViolations) {
|
|
578
579
|
byGate[v.gate] = (byGate[v.gate] || 0) + 1;
|
|
579
580
|
}
|
|
580
581
|
// Count by agent
|
|
581
|
-
const byAgent =
|
|
582
|
+
const byAgent = createSafeRecord();
|
|
582
583
|
for (const v of allViolations) {
|
|
583
584
|
if (v.agentId) {
|
|
584
585
|
byAgent[v.agentId] = (byAgent[v.agentId] || 0) + 1;
|
|
@@ -984,7 +985,7 @@ export class ComplianceReporter {
|
|
|
984
985
|
* Group violations by a field
|
|
985
986
|
*/
|
|
986
987
|
groupBy(violations, field) {
|
|
987
|
-
const groups =
|
|
988
|
+
const groups = createSafeRecord();
|
|
988
989
|
for (const v of violations) {
|
|
989
990
|
const key = String(v[field]);
|
|
990
991
|
if (!groups[key]) {
|
|
@@ -19,6 +19,7 @@ import { safeJsonParse } from '../shared/safe-json.js';
|
|
|
19
19
|
*/
|
|
20
20
|
import { wasmKernelIntegration, } from './wasm-kernel-integration.js';
|
|
21
21
|
import { governanceFlags, } from './feature-flags.js';
|
|
22
|
+
import { createSafeRecord } from '../shared/utils/safe-record.js';
|
|
22
23
|
/**
|
|
23
24
|
* Genesis envelope hash constant
|
|
24
25
|
*/
|
|
@@ -514,7 +515,8 @@ export class ProofEnvelopeIntegration {
|
|
|
514
515
|
* Get chain statistics
|
|
515
516
|
*/
|
|
516
517
|
getProofStats() {
|
|
517
|
-
|
|
518
|
+
// Action names are data, so the buckets must not inherit from Object.prototype (#914).
|
|
519
|
+
const actionCounts = createSafeRecord();
|
|
518
520
|
const agents = new Set();
|
|
519
521
|
for (const envelope of this.chain) {
|
|
520
522
|
agents.add(envelope.agentId);
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Claude Code plugin detection (#922)
|
|
3
|
+
*
|
|
4
|
+
* The `agentic-qe-fleet` Claude Code plugin bundles its own `agentic-qe` MCP
|
|
5
|
+
* server (exposed as `mcp__plugin_agentic-qe-fleet_agentic-qe__*`). When that
|
|
6
|
+
* plugin is enabled, `aqe init` must not also register a project-level
|
|
7
|
+
* `agentic-qe` server in `.mcp.json`, or AQE ends up registered twice.
|
|
8
|
+
*
|
|
9
|
+
* Detection reads `enabledPlugins` from the three Claude Code settings scopes
|
|
10
|
+
* and merges them per key with Claude Code's precedence (local > project >
|
|
11
|
+
* user):
|
|
12
|
+
* - user: `$CLAUDE_CONFIG_DIR/settings.json` (default `~/.claude/settings.json`)
|
|
13
|
+
* - project: `<project>/.claude/settings.json`
|
|
14
|
+
* - local: `<project>/.claude/settings.local.json`
|
|
15
|
+
*
|
|
16
|
+
* A key `agentic-qe-fleet@<marketplace>` whose merged value is `true` means
|
|
17
|
+
* the plugin is enabled. Missing, unreadable or invalid files count as "no
|
|
18
|
+
* opinion"; detection never throws.
|
|
19
|
+
*/
|
|
20
|
+
/** Plugin name as published in the `agentic-qe` marketplace. */
|
|
21
|
+
export declare const AQE_FLEET_PLUGIN_NAME = "agentic-qe-fleet";
|
|
22
|
+
export type ClaudeSettingsScope = 'user' | 'project' | 'local';
|
|
23
|
+
export interface PluginDetectionOptions {
|
|
24
|
+
/** Environment to read CLAUDE_CONFIG_DIR from (defaults to process.env). */
|
|
25
|
+
env?: NodeJS.ProcessEnv;
|
|
26
|
+
/** Home directory used when CLAUDE_CONFIG_DIR is unset (defaults to os.homedir()). */
|
|
27
|
+
homeDir?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface PluginDetectionResult {
|
|
30
|
+
/** True when at least one `agentic-qe-fleet@*` key resolves to `true`. */
|
|
31
|
+
enabled: boolean;
|
|
32
|
+
/** The enabled plugin key, e.g. `agentic-qe-fleet@agentic-qe`. */
|
|
33
|
+
pluginKey?: string;
|
|
34
|
+
/** Scope whose setting decided the enabled key. */
|
|
35
|
+
scope?: ClaudeSettingsScope;
|
|
36
|
+
/** Settings file that decided the enabled key. */
|
|
37
|
+
settingsPath?: string;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Settings files in ascending precedence order (later entries win).
|
|
41
|
+
*/
|
|
42
|
+
export declare function claudeSettingsPaths(projectRoot: string, options?: PluginDetectionOptions): Array<{
|
|
43
|
+
scope: ClaudeSettingsScope;
|
|
44
|
+
path: string;
|
|
45
|
+
}>;
|
|
46
|
+
/**
|
|
47
|
+
* Detect whether the `agentic-qe-fleet` Claude Code plugin is enabled for
|
|
48
|
+
* `projectRoot`. Never throws.
|
|
49
|
+
*/
|
|
50
|
+
export declare function detectAqeFleetPlugin(projectRoot: string, options?: PluginDetectionOptions): PluginDetectionResult;
|
|
51
|
+
/** One-line notice printed when init skips the project MCP entry. */
|
|
52
|
+
export declare const AQE_PLUGIN_MCP_SKIP_MESSAGE: string;
|
|
53
|
+
/**
|
|
54
|
+
* One-line notice printed when the plugin is enabled but `.mcp.json` already
|
|
55
|
+
* has an `agentic-qe` entry (e.g. an upgrade from 3.15.1). Init never deletes
|
|
56
|
+
* user config, so the entry is kept and the user is told how to remove it.
|
|
57
|
+
*/
|
|
58
|
+
export declare const AQE_PLUGIN_MCP_EXISTING_ENTRY_MESSAGE: string;
|
|
59
|
+
/** True when `<projectRoot>/.mcp.json` declares an `agentic-qe` server. Never throws. */
|
|
60
|
+
export declare function hasProjectAqeMcpEntry(projectRoot: string): boolean;
|
|
61
|
+
/** The notice to print when init skips the project entry because of the plugin. */
|
|
62
|
+
export declare function aqePluginMcpSkipMessage(projectRoot: string): string;
|
|
63
|
+
//# sourceMappingURL=claude-plugin-detection.d.ts.map
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Claude Code plugin detection (#922)
|
|
3
|
+
*
|
|
4
|
+
* The `agentic-qe-fleet` Claude Code plugin bundles its own `agentic-qe` MCP
|
|
5
|
+
* server (exposed as `mcp__plugin_agentic-qe-fleet_agentic-qe__*`). When that
|
|
6
|
+
* plugin is enabled, `aqe init` must not also register a project-level
|
|
7
|
+
* `agentic-qe` server in `.mcp.json`, or AQE ends up registered twice.
|
|
8
|
+
*
|
|
9
|
+
* Detection reads `enabledPlugins` from the three Claude Code settings scopes
|
|
10
|
+
* and merges them per key with Claude Code's precedence (local > project >
|
|
11
|
+
* user):
|
|
12
|
+
* - user: `$CLAUDE_CONFIG_DIR/settings.json` (default `~/.claude/settings.json`)
|
|
13
|
+
* - project: `<project>/.claude/settings.json`
|
|
14
|
+
* - local: `<project>/.claude/settings.local.json`
|
|
15
|
+
*
|
|
16
|
+
* A key `agentic-qe-fleet@<marketplace>` whose merged value is `true` means
|
|
17
|
+
* the plugin is enabled. Missing, unreadable or invalid files count as "no
|
|
18
|
+
* opinion"; detection never throws.
|
|
19
|
+
*/
|
|
20
|
+
import { readFileSync } from 'fs';
|
|
21
|
+
import { homedir } from 'os';
|
|
22
|
+
import { join } from 'path';
|
|
23
|
+
import { safeJsonParse } from '../shared/safe-json.js';
|
|
24
|
+
/** Plugin name as published in the `agentic-qe` marketplace. */
|
|
25
|
+
export const AQE_FLEET_PLUGIN_NAME = 'agentic-qe-fleet';
|
|
26
|
+
/**
|
|
27
|
+
* Settings files in ascending precedence order (later entries win).
|
|
28
|
+
*/
|
|
29
|
+
export function claudeSettingsPaths(projectRoot, options = {}) {
|
|
30
|
+
const env = options.env ?? process.env;
|
|
31
|
+
const configDir = env.CLAUDE_CONFIG_DIR?.trim()
|
|
32
|
+
? env.CLAUDE_CONFIG_DIR.trim()
|
|
33
|
+
: join(options.homeDir ?? homedir(), '.claude');
|
|
34
|
+
return [
|
|
35
|
+
{ scope: 'user', path: join(configDir, 'settings.json') },
|
|
36
|
+
{ scope: 'project', path: join(projectRoot, '.claude', 'settings.json') },
|
|
37
|
+
{ scope: 'local', path: join(projectRoot, '.claude', 'settings.local.json') },
|
|
38
|
+
];
|
|
39
|
+
}
|
|
40
|
+
/** Read `enabledPlugins` from one settings file; null on any failure. */
|
|
41
|
+
function readEnabledPlugins(path) {
|
|
42
|
+
try {
|
|
43
|
+
const parsed = safeJsonParse(readFileSync(path, 'utf-8'));
|
|
44
|
+
if (!parsed || typeof parsed !== 'object' || Array.isArray(parsed))
|
|
45
|
+
return null;
|
|
46
|
+
const plugins = parsed.enabledPlugins;
|
|
47
|
+
if (!plugins || typeof plugins !== 'object' || Array.isArray(plugins))
|
|
48
|
+
return null;
|
|
49
|
+
return plugins;
|
|
50
|
+
}
|
|
51
|
+
catch {
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
function isFleetPluginKey(key) {
|
|
56
|
+
const at = key.lastIndexOf('@');
|
|
57
|
+
const name = at === -1 ? key : key.slice(0, at);
|
|
58
|
+
return name === AQE_FLEET_PLUGIN_NAME && at > 0 && at < key.length - 1;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Detect whether the `agentic-qe-fleet` Claude Code plugin is enabled for
|
|
62
|
+
* `projectRoot`. Never throws.
|
|
63
|
+
*/
|
|
64
|
+
export function detectAqeFleetPlugin(projectRoot, options = {}) {
|
|
65
|
+
try {
|
|
66
|
+
const merged = new Map();
|
|
67
|
+
for (const { scope, path } of claudeSettingsPaths(projectRoot, options)) {
|
|
68
|
+
const plugins = readEnabledPlugins(path);
|
|
69
|
+
if (!plugins)
|
|
70
|
+
continue;
|
|
71
|
+
for (const [key, value] of Object.entries(plugins)) {
|
|
72
|
+
if (isFleetPluginKey(key))
|
|
73
|
+
merged.set(key, { value, scope, path });
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
for (const [key, entry] of merged) {
|
|
77
|
+
if (entry.value === true) {
|
|
78
|
+
return { enabled: true, pluginKey: key, scope: entry.scope, settingsPath: entry.path };
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
catch {
|
|
83
|
+
// Detection is advisory; fall through to "not enabled".
|
|
84
|
+
}
|
|
85
|
+
return { enabled: false };
|
|
86
|
+
}
|
|
87
|
+
/** One-line notice printed when init skips the project MCP entry. */
|
|
88
|
+
export const AQE_PLUGIN_MCP_SKIP_MESSAGE = ' MCP: skipped — the agentic-qe-fleet plugin already provides the AQE MCP server ' +
|
|
89
|
+
'(mcp__plugin_agentic-qe-fleet_agentic-qe__* tools); run `aqe init --with-mcp` to add the project entry anyway';
|
|
90
|
+
/**
|
|
91
|
+
* One-line notice printed when the plugin is enabled but `.mcp.json` already
|
|
92
|
+
* has an `agentic-qe` entry (e.g. an upgrade from 3.15.1). Init never deletes
|
|
93
|
+
* user config, so the entry is kept and the user is told how to remove it.
|
|
94
|
+
*/
|
|
95
|
+
export const AQE_PLUGIN_MCP_EXISTING_ENTRY_MESSAGE = ' MCP: kept the existing project `agentic-qe` entry in .mcp.json — it duplicates the agentic-qe-fleet ' +
|
|
96
|
+
"plugin's AQE MCP server (mcp__plugin_agentic-qe-fleet_agentic-qe__* tools); to remove it, delete the " +
|
|
97
|
+
'`agentic-qe` key from .mcp.json or run `claude mcp remove agentic-qe -s project`';
|
|
98
|
+
/** True when `<projectRoot>/.mcp.json` declares an `agentic-qe` server. Never throws. */
|
|
99
|
+
export function hasProjectAqeMcpEntry(projectRoot) {
|
|
100
|
+
try {
|
|
101
|
+
const parsed = safeJsonParse(readFileSync(join(projectRoot, '.mcp.json'), 'utf-8'));
|
|
102
|
+
if (!parsed || typeof parsed !== 'object')
|
|
103
|
+
return false;
|
|
104
|
+
const servers = parsed.mcpServers;
|
|
105
|
+
return !!servers && typeof servers === 'object' && !Array.isArray(servers) &&
|
|
106
|
+
Object.prototype.hasOwnProperty.call(servers, 'agentic-qe');
|
|
107
|
+
}
|
|
108
|
+
catch {
|
|
109
|
+
return false;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
/** The notice to print when init skips the project entry because of the plugin. */
|
|
113
|
+
export function aqePluginMcpSkipMessage(projectRoot) {
|
|
114
|
+
return hasProjectAqeMcpEntry(projectRoot)
|
|
115
|
+
? AQE_PLUGIN_MCP_EXISTING_ENTRY_MESSAGE
|
|
116
|
+
: AQE_PLUGIN_MCP_SKIP_MESSAGE;
|
|
117
|
+
}
|
|
118
|
+
//# sourceMappingURL=claude-plugin-detection.js.map
|
|
@@ -22,8 +22,13 @@ export declare function configureHooks(projectRoot: string, config: AQEInitConfi
|
|
|
22
22
|
* Configure MCP server.
|
|
23
23
|
* Creates .mcp.json (root level) with AQE v3 MCP server configuration.
|
|
24
24
|
* Uses npx to run the MCP server without requiring global installation.
|
|
25
|
+
*
|
|
26
|
+
* #922: skipped when the agentic-qe-fleet Claude Code plugin is enabled (it
|
|
27
|
+
* already provides the AQE MCP server) unless `force` is set (--with-mcp).
|
|
25
28
|
*/
|
|
26
|
-
export declare function configureMCP(projectRoot: string
|
|
29
|
+
export declare function configureMCP(projectRoot: string, options?: {
|
|
30
|
+
force?: boolean;
|
|
31
|
+
}): Promise<boolean>;
|
|
27
32
|
/**
|
|
28
33
|
* Generate CLAUDE.md for the project.
|
|
29
34
|
* Creates a comprehensive guide for Claude Code with V3-specific instructions.
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
import { existsSync, mkdirSync, writeFileSync, readFileSync, copyFileSync } from 'fs';
|
|
13
13
|
import { join, dirname } from 'path';
|
|
14
14
|
import { safeJsonParse } from '../shared/safe-json.js';
|
|
15
|
+
import { aqePluginMcpSkipMessage, detectAqeFleetPlugin } from './claude-plugin-detection.js';
|
|
15
16
|
import { mergeHooksSmart, generateAqeEnvVars, generateV3SettingsSections, applyV3Sections, mergeAqeEnv, backupSettingsFile, } from './settings-merge.js';
|
|
16
17
|
// ============================================================================
|
|
17
18
|
// Hook Configuration
|
|
@@ -272,8 +273,15 @@ routing:
|
|
|
272
273
|
* Configure MCP server.
|
|
273
274
|
* Creates .mcp.json (root level) with AQE v3 MCP server configuration.
|
|
274
275
|
* Uses npx to run the MCP server without requiring global installation.
|
|
276
|
+
*
|
|
277
|
+
* #922: skipped when the agentic-qe-fleet Claude Code plugin is enabled (it
|
|
278
|
+
* already provides the AQE MCP server) unless `force` is set (--with-mcp).
|
|
275
279
|
*/
|
|
276
|
-
export async function configureMCP(projectRoot) {
|
|
280
|
+
export async function configureMCP(projectRoot, options = {}) {
|
|
281
|
+
if (!options.force && detectAqeFleetPlugin(projectRoot).enabled) {
|
|
282
|
+
console.log(aqePluginMcpSkipMessage(projectRoot));
|
|
283
|
+
return false;
|
|
284
|
+
}
|
|
277
285
|
const mcpPath = join(projectRoot, '.mcp.json');
|
|
278
286
|
let mcpConfig = {};
|
|
279
287
|
if (existsSync(mcpPath)) {
|
|
@@ -26,6 +26,10 @@ export interface InitOrchestratorOptions {
|
|
|
26
26
|
wizardAnswers?: Record<string, unknown>;
|
|
27
27
|
/** Install n8n workflow testing agents and skills */
|
|
28
28
|
withN8n?: boolean;
|
|
29
|
+
/** Write the .mcp.json entry even when the agentic-qe-fleet plugin is enabled (#922) */
|
|
30
|
+
withMcp?: boolean;
|
|
31
|
+
/** Skip the .mcp.json entry entirely (--no-mcp, #931) */
|
|
32
|
+
noMcp?: boolean;
|
|
29
33
|
/** N8n API configuration */
|
|
30
34
|
n8nApiConfig?: {
|
|
31
35
|
baseUrl?: string;
|
package/dist/init/init-wizard.js
CHANGED
|
@@ -146,7 +146,9 @@ export class InitOrchestrator {
|
|
|
146
146
|
});
|
|
147
147
|
// Step 6: Configure MCP server
|
|
148
148
|
const mcpConfigured = await this.runStep('MCP Configuration', async () => {
|
|
149
|
-
|
|
149
|
+
if (this.options.noMcp)
|
|
150
|
+
return false;
|
|
151
|
+
return await configureMCP(this.projectRoot, { force: this.options.withMcp });
|
|
150
152
|
});
|
|
151
153
|
// Step 7: Generate CLAUDE.md
|
|
152
154
|
const claudeMdGenerated = await this.runStep('CLAUDE.md Generation', async () => {
|
|
@@ -52,6 +52,7 @@ export class ModularInitOrchestrator {
|
|
|
52
52
|
wizardAnswers: options.wizardAnswers,
|
|
53
53
|
noGovernance: options.noGovernance,
|
|
54
54
|
noMcp: options.noMcp,
|
|
55
|
+
withMcp: options.withMcp,
|
|
55
56
|
noClaude: options.noClaude,
|
|
56
57
|
noStatusLine: options.noStatusLine,
|
|
57
58
|
memoryBackend: options.memoryBackend,
|
|
@@ -259,10 +259,13 @@ export class HooksPhase extends BasePhase {
|
|
|
259
259
|
mkdirSync(helpersDir, { recursive: true });
|
|
260
260
|
}
|
|
261
261
|
const destPath = join(helpersDir, 'brain-checkpoint.cjs');
|
|
262
|
-
// Try to copy from our own installation first
|
|
262
|
+
// Try to copy from our own installation first. The last candidate is this
|
|
263
|
+
// package's own copy (relative to the compiled init module), so a GLOBAL
|
|
264
|
+
// install also refreshes an existing project's helper on re-init (#872).
|
|
263
265
|
const sourcePaths = [
|
|
264
266
|
join(projectRoot, '.claude', 'helpers', 'brain-checkpoint.cjs'),
|
|
265
267
|
join(projectRoot, 'node_modules', 'agentic-qe', '.claude', 'helpers', 'brain-checkpoint.cjs'),
|
|
268
|
+
join(__dirname, '..', '..', '..', '.claude', 'helpers', 'brain-checkpoint.cjs'),
|
|
266
269
|
];
|
|
267
270
|
for (const src of sourcePaths) {
|
|
268
271
|
if (existsSync(src) && src !== destPath) {
|
|
@@ -399,16 +402,39 @@ const AQE_DIR = path.join(PROJECT_ROOT, '.agentic-qe');
|
|
|
399
402
|
const RVF_PATH = path.join(AQE_DIR, 'aqe.rvf');
|
|
400
403
|
const DB_PATH = path.join(AQE_DIR, 'memory.db');
|
|
401
404
|
const MAX_AGE_HOURS = 24;
|
|
402
|
-
|
|
405
|
+
// Windows (#872): never execFile aqe.cmd (EINVAL without a shell); reuse the
|
|
406
|
+
// hook shim's resolver, which runs the AQE bundle via node instead.
|
|
407
|
+
function aqeInvocation() {
|
|
408
|
+
if (process.platform !== 'win32') return { cmd: process.env.AQE_HOOK_BIN || 'aqe', args: [] };
|
|
409
|
+
const shimPath = path.join(__dirname, '..', 'hooks', 'aqe-hook.cjs');
|
|
410
|
+
let src = '';
|
|
411
|
+
try { src = fs.readFileSync(shimPath, 'utf8'); } catch { /* missing */ }
|
|
412
|
+
// An older shim runs its hook main (spawn + exit) when required.
|
|
413
|
+
if (!src.includes('resolveAqeInvocation') || !src.includes('require.main === module')) {
|
|
414
|
+
return { cmd: null, args: [], reason: '.claude/hooks/aqe-hook.cjs is missing or predates #872; re-run aqe init' };
|
|
415
|
+
}
|
|
416
|
+
try {
|
|
417
|
+
return require(shimPath).resolveAqeInvocation({ project: PROJECT_ROOT });
|
|
418
|
+
} catch (e) {
|
|
419
|
+
return { cmd: null, args: [], reason: 'aqe-hook.cjs failed to load: ' + e.message };
|
|
420
|
+
}
|
|
421
|
+
}
|
|
403
422
|
|
|
404
423
|
function log(msg) { process.stderr.write('[brain-checkpoint] ' + msg + '\\n'); }
|
|
405
424
|
|
|
406
425
|
function exportBrain() {
|
|
407
426
|
if (!fs.existsSync(DB_PATH)) { log('No memory.db, skipping'); return { exported: false }; }
|
|
427
|
+
const aqe = aqeInvocation();
|
|
428
|
+
if (!aqe.cmd) { log('Export skipped: ' + aqe.reason); return { exported: false, reason: aqe.reason }; }
|
|
429
|
+
// Never write through a committed symlink: .agentic-qe must be a real dir, and
|
|
430
|
+
// unlink (not existsSync) drops a planted aqe.rvf link, even a dangling one.
|
|
431
|
+
let st; try { st = fs.lstatSync(AQE_DIR); } catch { /* missing */ }
|
|
432
|
+
if (!st || !st.isDirectory()) { log('Export skipped: .agentic-qe is a symlink'); return { exported: false }; }
|
|
433
|
+
for (const f of [RVF_PATH, RVF_PATH + '.idmap.json']) { try { fs.unlinkSync(f); } catch { /* absent */ } }
|
|
408
434
|
try {
|
|
409
435
|
const result = execFileSync(
|
|
410
|
-
|
|
411
|
-
{ timeout: 60000, encoding: 'utf-8' }
|
|
436
|
+
aqe.cmd, [...aqe.args, 'brain', 'export', '-o', RVF_PATH, '--format', 'rvf'],
|
|
437
|
+
{ timeout: 60000, encoding: 'utf-8', windowsHide: true }
|
|
412
438
|
);
|
|
413
439
|
const m = result.match(/Patterns:\\s+(\\d+)/);
|
|
414
440
|
const p = m ? m[1] : '0';
|
|
@@ -11,21 +11,28 @@
|
|
|
11
11
|
* walks up looking for .agentic-qe/, .git/, or package.json. This
|
|
12
12
|
* makes the config portable across machines, devcontainers, and CI.
|
|
13
13
|
*/
|
|
14
|
+
import { type PluginDetectionResult } from '../claude-plugin-detection.js';
|
|
14
15
|
import { BasePhase, type InitContext } from './phase-interface.js';
|
|
15
16
|
export interface MCPResult {
|
|
16
17
|
configured: boolean;
|
|
17
18
|
mcpPath: string;
|
|
18
19
|
serverName: string;
|
|
20
|
+
/** Set when the entry was skipped because the agentic-qe-fleet plugin provides it (#922). */
|
|
21
|
+
skippedForPlugin?: string;
|
|
19
22
|
}
|
|
23
|
+
/** Plugin detector signature — injectable for tests. */
|
|
24
|
+
export type FleetPluginDetector = (projectRoot: string) => PluginDetectionResult;
|
|
20
25
|
/**
|
|
21
26
|
* MCP phase - configures MCP server
|
|
22
27
|
*/
|
|
23
28
|
export declare class MCPPhase extends BasePhase<MCPResult> {
|
|
29
|
+
private readonly detectPlugin;
|
|
24
30
|
readonly name = "mcp";
|
|
25
31
|
readonly description = "Configure MCP server";
|
|
26
32
|
readonly order = 80;
|
|
27
33
|
readonly critical = false;
|
|
28
34
|
readonly requiresPhases: readonly ["configuration", "database"];
|
|
35
|
+
constructor(detectPlugin?: FleetPluginDetector);
|
|
29
36
|
protected run(context: InitContext): Promise<MCPResult>;
|
|
30
37
|
}
|
|
31
38
|
//# sourceMappingURL=08-mcp.d.ts.map
|