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
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Line-based cognitive complexity heuristic (SonarSource rules, issues #907).
|
|
3
|
+
* Known gaps (lambdas, labelled jumps, boolean sequences, ...) are tracked in #967.
|
|
4
|
+
*/
|
|
5
|
+
// A `/` after one of these starts a regex literal; after an operand it is division.
|
|
6
|
+
const REGEX_PREFIX = /(?:^|[(,=:[!&|?{;+\-*%~^]|\b(?:return|typeof|case|do|else|in|of|void|yield|await))$/;
|
|
7
|
+
const blank = (text) => text.replace(/[^\n]/g, ' ');
|
|
8
|
+
/** True when a `/` appended to `out` would start a regex literal (checks only the last token). */
|
|
9
|
+
function regexCanStart(out) {
|
|
10
|
+
let k = out.length - 1;
|
|
11
|
+
while (k >= 0 && /\s/.test(out[k]))
|
|
12
|
+
k--;
|
|
13
|
+
return REGEX_PREFIX.test(out.slice(Math.max(0, k - 9), k + 1));
|
|
14
|
+
}
|
|
15
|
+
/** Index just past a string, template or regex literal starting at `start`, and whether it closed. */
|
|
16
|
+
function scanLiteral(code, start) {
|
|
17
|
+
const quote = code[start];
|
|
18
|
+
let inClass = false;
|
|
19
|
+
for (let j = start + 1; j < code.length; j++) {
|
|
20
|
+
const c = code[j];
|
|
21
|
+
if (c === '\\') {
|
|
22
|
+
j++;
|
|
23
|
+
continue;
|
|
24
|
+
}
|
|
25
|
+
if (c === '\n' && quote !== '`')
|
|
26
|
+
return { end: j, closed: false };
|
|
27
|
+
if (quote === '/' && c === '[')
|
|
28
|
+
inClass = true;
|
|
29
|
+
else if (quote === '/' && c === ']')
|
|
30
|
+
inClass = false;
|
|
31
|
+
else if (c === quote && !(quote === '/' && inClass))
|
|
32
|
+
return { end: j + 1, closed: true };
|
|
33
|
+
}
|
|
34
|
+
return { end: code.length, closed: false };
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Blank out comments and the contents of string, template and regex literals,
|
|
38
|
+
* keeping newlines and delimiters, so keywords and braces inside them are not counted.
|
|
39
|
+
*/
|
|
40
|
+
export function maskCommentsAndLiterals(code) {
|
|
41
|
+
let out = '';
|
|
42
|
+
let i = 0;
|
|
43
|
+
while (i < code.length) {
|
|
44
|
+
const ch = code[i];
|
|
45
|
+
const next = code[i + 1];
|
|
46
|
+
if (ch === '/' && (next === '/' || next === '*')) {
|
|
47
|
+
const close = next === '/' ? code.indexOf('\n', i) : code.indexOf('*/', i + 2);
|
|
48
|
+
const end = close < 0 ? code.length : next === '/' ? close : close + 2;
|
|
49
|
+
out += blank(code.slice(i, end));
|
|
50
|
+
i = end;
|
|
51
|
+
}
|
|
52
|
+
else if (ch === '"' || ch === "'" || ch === '`' || (ch === '/' && regexCanStart(out))) {
|
|
53
|
+
const { end, closed } = scanLiteral(code, i);
|
|
54
|
+
out += ch + blank(code.slice(i + 1, closed ? end - 1 : end)) + (closed ? code[end - 1] : '');
|
|
55
|
+
i = end;
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
out += ch;
|
|
59
|
+
i++;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return out;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* `if`, loops, `switch`, `catch` and ternaries score +1 plus the nesting level;
|
|
66
|
+
* `else if` and `else` score a flat +1 (an `else if` is not also an `if`).
|
|
67
|
+
* Nesting rises only inside the braces of those structures, so a function
|
|
68
|
+
* body, try block or object literal adds no nesting bonus.
|
|
69
|
+
*/
|
|
70
|
+
export function calculateCognitiveComplexity(code) {
|
|
71
|
+
const count = (text, pattern) => (text.match(pattern) || []).length;
|
|
72
|
+
let complexity = 0;
|
|
73
|
+
const braces = []; // one entry per open `{`: true when it opens a nesting structure
|
|
74
|
+
let pendingNest = false; // nesting structure whose `{` has not been seen yet
|
|
75
|
+
for (const line of maskCommentsAndLiterals(code).split('\n')) {
|
|
76
|
+
let rest = line.trim();
|
|
77
|
+
// `} else {` / `} catch (e) {`: the previous block closes before this structure is scored.
|
|
78
|
+
while (rest.startsWith('}')) {
|
|
79
|
+
braces.pop();
|
|
80
|
+
rest = rest.slice(1).trimStart();
|
|
81
|
+
}
|
|
82
|
+
const nesting = braces.filter(Boolean).length;
|
|
83
|
+
const flat = count(rest, /\belse\s+if\s*\(/g) + count(rest, /\belse\b(?!\s+if\b)/g);
|
|
84
|
+
const nested = count(rest, /(?<!\belse\s+)\bif\s*\(/g) + count(rest, /\b(?:for|while|switch|catch)\s*\(/g);
|
|
85
|
+
complexity += flat + nested * (1 + nesting);
|
|
86
|
+
if (/\?\s*[^:]/.test(rest)) {
|
|
87
|
+
complexity += 1 + nesting; // Ternary
|
|
88
|
+
}
|
|
89
|
+
if (/&&|\|\|/.test(rest)) {
|
|
90
|
+
complexity += 1; // Boolean operators
|
|
91
|
+
}
|
|
92
|
+
pendingNest ||= flat + nested > 0 || /\bdo\b/.test(rest);
|
|
93
|
+
for (const ch of rest.match(/[{}]/g) || []) {
|
|
94
|
+
if (ch === '{') {
|
|
95
|
+
braces.push(pendingNest);
|
|
96
|
+
pendingNest = false;
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
braces.pop();
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
// A brace-less body (`if (x) return;`) ends the structure without nesting anything.
|
|
103
|
+
if (rest.endsWith(';'))
|
|
104
|
+
pendingNest = false;
|
|
105
|
+
}
|
|
106
|
+
return complexity;
|
|
107
|
+
}
|
|
108
|
+
//# sourceMappingURL=cognitive-complexity.js.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Run npm / npx without a shell on every platform.
|
|
3
|
+
*
|
|
4
|
+
* On Windows `npm` and `npx` are `npm.cmd` / `npx.cmd` batch shims. Since the
|
|
5
|
+
* CVE-2024-27980 fix (Node 18.20.2 / 20.12.2 / 21.7.3+), child_process refuses
|
|
6
|
+
* to start a `.cmd`/`.bat` without `shell: true` and fails with EINVAL. Turning
|
|
7
|
+
* the shell on would route caller-supplied arguments through cmd.exe, so we run
|
|
8
|
+
* the JavaScript CLI that ships next to node.exe with process.execPath instead
|
|
9
|
+
* (#812, #872).
|
|
10
|
+
*/
|
|
11
|
+
export type NpmCliTool = 'npm' | 'npx';
|
|
12
|
+
/**
|
|
13
|
+
* Resolve `[executable, leadingArgs]` for npm/npx.
|
|
14
|
+
*
|
|
15
|
+
* - POSIX: `[tool, []]` (the real executable on PATH; unchanged behaviour).
|
|
16
|
+
* - Windows: `[execPath, ['<node dir>\\node_modules\\npm\\bin\\<tool>-cli.js']]`,
|
|
17
|
+
* or `null` when that layout is absent. Callers must then fail clearly rather
|
|
18
|
+
* than spawn `<tool>.cmd` without a shell.
|
|
19
|
+
*/
|
|
20
|
+
export declare function npmCliInvocation(tool: NpmCliTool, platform?: NodeJS.Platform, execPath?: string, exists?: (path: string) => boolean): [string, string[]] | null;
|
|
21
|
+
//# sourceMappingURL=npm-cli-invocation.d.ts.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Run npm / npx without a shell on every platform.
|
|
3
|
+
*
|
|
4
|
+
* On Windows `npm` and `npx` are `npm.cmd` / `npx.cmd` batch shims. Since the
|
|
5
|
+
* CVE-2024-27980 fix (Node 18.20.2 / 20.12.2 / 21.7.3+), child_process refuses
|
|
6
|
+
* to start a `.cmd`/`.bat` without `shell: true` and fails with EINVAL. Turning
|
|
7
|
+
* the shell on would route caller-supplied arguments through cmd.exe, so we run
|
|
8
|
+
* the JavaScript CLI that ships next to node.exe with process.execPath instead
|
|
9
|
+
* (#812, #872).
|
|
10
|
+
*/
|
|
11
|
+
import { existsSync } from 'node:fs';
|
|
12
|
+
import { dirname, join } from 'node:path';
|
|
13
|
+
/**
|
|
14
|
+
* Resolve `[executable, leadingArgs]` for npm/npx.
|
|
15
|
+
*
|
|
16
|
+
* - POSIX: `[tool, []]` (the real executable on PATH; unchanged behaviour).
|
|
17
|
+
* - Windows: `[execPath, ['<node dir>\\node_modules\\npm\\bin\\<tool>-cli.js']]`,
|
|
18
|
+
* or `null` when that layout is absent. Callers must then fail clearly rather
|
|
19
|
+
* than spawn `<tool>.cmd` without a shell.
|
|
20
|
+
*/
|
|
21
|
+
export function npmCliInvocation(tool, platform = process.platform, execPath = process.execPath, exists = existsSync) {
|
|
22
|
+
if (platform !== 'win32')
|
|
23
|
+
return [tool, []];
|
|
24
|
+
// Host path module: it is path.win32 whenever this branch runs for real.
|
|
25
|
+
const cli = join(dirname(execPath), 'node_modules', 'npm', 'bin', `${tool}-cli.js`);
|
|
26
|
+
return exists(cli) ? [execPath, [cli]] : null;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=npm-cli-invocation.js.map
|
|
@@ -33,6 +33,30 @@ export function loadOptionalModule(name, req = defaultRequire) {
|
|
|
33
33
|
}
|
|
34
34
|
catch (err) {
|
|
35
35
|
if (isModuleAbsent(err)) {
|
|
36
|
+
// MODULE_NOT_FOUND can name a transitive dependency of a present package.
|
|
37
|
+
// Resolution checks availability without executing the package again.
|
|
38
|
+
if (typeof req.resolve === 'function') {
|
|
39
|
+
try {
|
|
40
|
+
req.resolve(name);
|
|
41
|
+
}
|
|
42
|
+
catch (resolutionError) {
|
|
43
|
+
if (!isModuleAbsent(resolutionError))
|
|
44
|
+
throw resolutionError;
|
|
45
|
+
return { available: false, degraded: true, name, reason: `optional module "${name}" not installed (running degraded)` };
|
|
46
|
+
}
|
|
47
|
+
// Installed optional wrappers may lack the binary for this platform.
|
|
48
|
+
// Preserve degradation, but identify the missing inner dependency.
|
|
49
|
+
const message = err.message;
|
|
50
|
+
const inner = typeof message === 'string'
|
|
51
|
+
? /Cannot find (?:module|package) ['"]([^'"]+)['"]/.exec(message)?.[1]
|
|
52
|
+
: undefined;
|
|
53
|
+
const dependency = inner ? ` its dependency "${inner}" is missing` : ' a dependency is missing';
|
|
54
|
+
return {
|
|
55
|
+
available: false, degraded: true, name,
|
|
56
|
+
reason: `optional module "${name}" is installed but${dependency} (running degraded)`,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
// Injected minimal require functions retain the historical absence contract.
|
|
36
60
|
return { available: false, degraded: true, name, reason: `optional module "${name}" not installed (running degraded)` };
|
|
37
61
|
}
|
|
38
62
|
throw err; // present but broken — do NOT mask a real failure (#528)
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Safe argument builders for spawning test runners (issue #909).
|
|
3
|
+
*
|
|
4
|
+
* Runner CLIs read some values in ways that can select the wrong tests:
|
|
5
|
+
* - Jest treats positional TestPathPatterns as regular expressions, so a path
|
|
6
|
+
* containing `(`, `[`, `+` or `.` can match other files or miss its own.
|
|
7
|
+
* - A value that starts with `-` (a test name such as `-x`, or a relative path
|
|
8
|
+
* such as `-dash.test.ts`) is parsed as a flag by Jest, Vitest and Mocha.
|
|
9
|
+
* Vitest ignores everything after a `--` separator, so a separator alone
|
|
10
|
+
* cannot protect positional file filters.
|
|
11
|
+
*
|
|
12
|
+
* The rules used here:
|
|
13
|
+
* - Name filters use the `--flag=value` form, so the value is never a flag.
|
|
14
|
+
* - File filters are absolute paths, which never start with `-`.
|
|
15
|
+
* - Jest file filters are regex-escaped and anchored as `^<path>$`, so they
|
|
16
|
+
* select exactly one file, and the leading `^` cannot be read as a flag.
|
|
17
|
+
*/
|
|
18
|
+
/** Runners whose test-name filter is a regular expression. */
|
|
19
|
+
export type NameFilterRunner = 'vitest' | 'jest' | 'mocha';
|
|
20
|
+
/** Escape every regular-expression metacharacter in a literal string. */
|
|
21
|
+
export declare function escapeRegExpLiteral(value: string): string;
|
|
22
|
+
/**
|
|
23
|
+
* Absolute path for a test file. Directory symlinks (for example `/tmp` on
|
|
24
|
+
* macOS) are resolved the same way runners resolve their root, while the file
|
|
25
|
+
* name itself is kept. The result never begins with `-`.
|
|
26
|
+
*/
|
|
27
|
+
export declare function runnerFilePath(file: string, cwd?: string): string;
|
|
28
|
+
/**
|
|
29
|
+
* Jest positional TestPathPattern for `file`. A file matches exactly; a
|
|
30
|
+
* directory matches every path beneath it but not a sibling that shares its
|
|
31
|
+
* prefix (`app` vs `app-other`). Separators are normalised to `/`, which Jest
|
|
32
|
+
* maps to the platform separator.
|
|
33
|
+
*/
|
|
34
|
+
export declare function jestExactPathPattern(file: string, cwd?: string): string;
|
|
35
|
+
/**
|
|
36
|
+
* Literal test-name filter in `--flag=value` form. Mocha uses `--grep`; Jest
|
|
37
|
+
* and Vitest use `--testNamePattern` (the long form of `-t`).
|
|
38
|
+
*/
|
|
39
|
+
export declare function nameFilterArg(runner: NameFilterRunner, testName: string): string;
|
|
40
|
+
/** True when a command vector (runner command plus its arguments) runs Jest. */
|
|
41
|
+
export declare function isJestCommand(args: readonly string[]): boolean;
|
|
42
|
+
//# sourceMappingURL=test-runner-args.d.ts.map
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Safe argument builders for spawning test runners (issue #909).
|
|
3
|
+
*
|
|
4
|
+
* Runner CLIs read some values in ways that can select the wrong tests:
|
|
5
|
+
* - Jest treats positional TestPathPatterns as regular expressions, so a path
|
|
6
|
+
* containing `(`, `[`, `+` or `.` can match other files or miss its own.
|
|
7
|
+
* - A value that starts with `-` (a test name such as `-x`, or a relative path
|
|
8
|
+
* such as `-dash.test.ts`) is parsed as a flag by Jest, Vitest and Mocha.
|
|
9
|
+
* Vitest ignores everything after a `--` separator, so a separator alone
|
|
10
|
+
* cannot protect positional file filters.
|
|
11
|
+
*
|
|
12
|
+
* The rules used here:
|
|
13
|
+
* - Name filters use the `--flag=value` form, so the value is never a flag.
|
|
14
|
+
* - File filters are absolute paths, which never start with `-`.
|
|
15
|
+
* - Jest file filters are regex-escaped and anchored as `^<path>$`, so they
|
|
16
|
+
* select exactly one file, and the leading `^` cannot be read as a flag.
|
|
17
|
+
*/
|
|
18
|
+
import { realpathSync, statSync } from 'node:fs';
|
|
19
|
+
import { basename, dirname, extname, resolve, sep } from 'node:path';
|
|
20
|
+
/** Escape every regular-expression metacharacter in a literal string. */
|
|
21
|
+
export function escapeRegExpLiteral(value) {
|
|
22
|
+
return value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Absolute path for a test file. Directory symlinks (for example `/tmp` on
|
|
26
|
+
* macOS) are resolved the same way runners resolve their root, while the file
|
|
27
|
+
* name itself is kept. The result never begins with `-`.
|
|
28
|
+
*/
|
|
29
|
+
export function runnerFilePath(file, cwd = process.cwd()) {
|
|
30
|
+
const absolute = resolve(cwd, file);
|
|
31
|
+
try {
|
|
32
|
+
return resolve(realpathSync(dirname(absolute)), basename(absolute));
|
|
33
|
+
}
|
|
34
|
+
catch {
|
|
35
|
+
return absolute;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* True when `absolutePath` names a directory. A path that does not exist is
|
|
40
|
+
* treated as a directory when it has no file extension.
|
|
41
|
+
*/
|
|
42
|
+
function isDirectoryTarget(absolutePath) {
|
|
43
|
+
try {
|
|
44
|
+
return statSync(absolutePath).isDirectory();
|
|
45
|
+
}
|
|
46
|
+
catch {
|
|
47
|
+
return extname(absolutePath) === '';
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Jest positional TestPathPattern for `file`. A file matches exactly; a
|
|
52
|
+
* directory matches every path beneath it but not a sibling that shares its
|
|
53
|
+
* prefix (`app` vs `app-other`). Separators are normalised to `/`, which Jest
|
|
54
|
+
* maps to the platform separator.
|
|
55
|
+
*/
|
|
56
|
+
export function jestExactPathPattern(file, cwd = process.cwd()) {
|
|
57
|
+
const absolute = runnerFilePath(file, cwd);
|
|
58
|
+
const normalized = absolute.split(sep).join('/');
|
|
59
|
+
const end = isDirectoryTarget(absolute) ? '(?:/|$)' : '$';
|
|
60
|
+
return `^${escapeRegExpLiteral(normalized)}${end}`;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Literal test-name filter in `--flag=value` form. Mocha uses `--grep`; Jest
|
|
64
|
+
* and Vitest use `--testNamePattern` (the long form of `-t`).
|
|
65
|
+
*/
|
|
66
|
+
export function nameFilterArg(runner, testName) {
|
|
67
|
+
const pattern = escapeRegExpLiteral(testName);
|
|
68
|
+
return runner === 'mocha' ? `--grep=${pattern}` : `--testNamePattern=${pattern}`;
|
|
69
|
+
}
|
|
70
|
+
/** True when a command vector (runner command plus its arguments) runs Jest. */
|
|
71
|
+
export function isJestCommand(args) {
|
|
72
|
+
return args.some(arg => /(^|[\\/])jest(\.cmd|\.js|\.mjs)?$/i.test(arg));
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=test-runner-args.js.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Prototype-safe keyed records (#914).
|
|
3
|
+
*
|
|
4
|
+
* Plain `{}` objects inherit from Object.prototype. When a key comes from data
|
|
5
|
+
* (a model name, an agent id, a file path), keys such as `constructor`,
|
|
6
|
+
* `toString` or `__proto__` read the inherited member instead of a missing
|
|
7
|
+
* bucket: `(counts[key] || 0) + 1` then concatenates a function source string,
|
|
8
|
+
* and an assignment to `__proto__` is silently dropped.
|
|
9
|
+
*/
|
|
10
|
+
/** A record with no prototype, so every key starts out absent. */
|
|
11
|
+
export declare function createSafeRecord<T>(): Record<string, T>;
|
|
12
|
+
/** Read only an own property; inherited members count as absent. */
|
|
13
|
+
export declare function getOwn<T>(record: Record<string, T>, key: string): T | undefined;
|
|
14
|
+
/** Write an own data property, including for the key `__proto__`. */
|
|
15
|
+
export declare function setOwn<T>(record: Record<string, T>, key: string, value: T): void;
|
|
16
|
+
/** Add `amount` to the bucket for `key` and return the new total. */
|
|
17
|
+
export declare function addToCount(record: Record<string, number>, key: string, amount?: number): number;
|
|
18
|
+
//# sourceMappingURL=safe-record.d.ts.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Prototype-safe keyed records (#914).
|
|
3
|
+
*
|
|
4
|
+
* Plain `{}` objects inherit from Object.prototype. When a key comes from data
|
|
5
|
+
* (a model name, an agent id, a file path), keys such as `constructor`,
|
|
6
|
+
* `toString` or `__proto__` read the inherited member instead of a missing
|
|
7
|
+
* bucket: `(counts[key] || 0) + 1` then concatenates a function source string,
|
|
8
|
+
* and an assignment to `__proto__` is silently dropped.
|
|
9
|
+
*/
|
|
10
|
+
/** A record with no prototype, so every key starts out absent. */
|
|
11
|
+
export function createSafeRecord() {
|
|
12
|
+
return Object.create(null);
|
|
13
|
+
}
|
|
14
|
+
/** Read only an own property; inherited members count as absent. */
|
|
15
|
+
export function getOwn(record, key) {
|
|
16
|
+
return Object.hasOwn(record, key) ? record[key] : undefined;
|
|
17
|
+
}
|
|
18
|
+
/** Write an own data property, including for the key `__proto__`. */
|
|
19
|
+
export function setOwn(record, key, value) {
|
|
20
|
+
Object.defineProperty(record, key, { value, writable: true, enumerable: true, configurable: true });
|
|
21
|
+
}
|
|
22
|
+
/** Add `amount` to the bucket for `key` and return the new total. */
|
|
23
|
+
export function addToCount(record, key, amount = 1) {
|
|
24
|
+
const next = (getOwn(record, key) ?? 0) + amount;
|
|
25
|
+
setOwn(record, key, next);
|
|
26
|
+
return next;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=safe-record.js.map
|
|
@@ -8,6 +8,8 @@ import { execFile, spawn } from 'child_process';
|
|
|
8
8
|
import { safeJsonParse } from '../../shared/safe-json.js';
|
|
9
9
|
import { getTestRunnerExecutionError } from '../../shared/test-runner-verdict.js';
|
|
10
10
|
import { createVitestJsonReport } from '../../shared/vitest-json-report.js';
|
|
11
|
+
import { runnerFilePath } from '../../shared/test-runner-args.js';
|
|
12
|
+
import { npmCliInvocation } from '../../shared/npm-cli-invocation.js';
|
|
11
13
|
// ============================================================================
|
|
12
14
|
// Vitest Executor Implementation
|
|
13
15
|
// ============================================================================
|
|
@@ -56,7 +58,9 @@ export class VitestPhaseExecutor {
|
|
|
56
58
|
const args = ['vitest', 'run', '--reporter=json'];
|
|
57
59
|
// Add test patterns or specific files
|
|
58
60
|
if (testFiles && testFiles.length > 0) {
|
|
59
|
-
|
|
61
|
+
// #909: absolute paths cannot be read as flags when a name starts with '-'.
|
|
62
|
+
const cwd = this.config.cwd || process.cwd();
|
|
63
|
+
args.push(...testFiles.map(file => runnerFilePath(file, cwd)));
|
|
60
64
|
}
|
|
61
65
|
else {
|
|
62
66
|
// Use phase patterns
|
|
@@ -149,10 +153,24 @@ export class VitestPhaseExecutor {
|
|
|
149
153
|
if (this.currentCommand) {
|
|
150
154
|
return Promise.reject(new Error('Test executor already has an active process'));
|
|
151
155
|
}
|
|
152
|
-
// shell: false prevents argument injection.
|
|
153
|
-
//
|
|
154
|
-
|
|
155
|
-
|
|
156
|
+
// shell: false prevents argument injection. On Windows `npx` is npx.cmd,
|
|
157
|
+
// which Node refuses to start without a shell (EINVAL, CVE-2024-27980), so
|
|
158
|
+
// run the npx CLI bundled next to node.exe instead (#872). A JS vitestPath
|
|
159
|
+
// is not executable on Windows either, so it always runs via this node.
|
|
160
|
+
const invocation = command === 'npx'
|
|
161
|
+
? npmCliInvocation('npx')
|
|
162
|
+
: /\.[cm]?js$/i.test(command)
|
|
163
|
+
? [process.execPath, [command]]
|
|
164
|
+
: [command, []];
|
|
165
|
+
if (!invocation) {
|
|
166
|
+
return Promise.reject(new Error('Cannot run npx on Windows without a shell: node_modules\\npm\\bin\\npx-cli.js was not '
|
|
167
|
+
+ 'found next to node.exe. Set vitestPath to Vitest\'s JS entry '
|
|
168
|
+
+ '(node_modules/vitest/vitest.mjs), which is run with node.'));
|
|
169
|
+
}
|
|
170
|
+
const [executable, leadingArgs] = invocation;
|
|
171
|
+
// A fresh POSIX process group lets cancellation reach npx, Vitest, and the
|
|
172
|
+
// workers it started.
|
|
173
|
+
const child = spawn(executable, [...leadingArgs, ...args], {
|
|
156
174
|
cwd: this.config.cwd || process.cwd(),
|
|
157
175
|
env: { ...process.env, ...this.config.env },
|
|
158
176
|
shell: false,
|
|
@@ -10,6 +10,7 @@ import { execFile } from 'child_process';
|
|
|
10
10
|
import { promisify } from 'util';
|
|
11
11
|
import { resolve, join } from 'path';
|
|
12
12
|
import { existsSync, readFileSync } from 'fs';
|
|
13
|
+
import { getGitRefError } from '../../shared/git/ref-validation.js';
|
|
13
14
|
const execFileAsync = promisify(execFile);
|
|
14
15
|
const DEFAULTS = {
|
|
15
16
|
repoRoot: process.cwd(),
|
|
@@ -155,6 +156,10 @@ export class GitWatcher {
|
|
|
155
156
|
await this.enqueueCommitAnalysis(branch, newHash);
|
|
156
157
|
}
|
|
157
158
|
async enqueueCommitAnalysis(branch, commitHash) {
|
|
159
|
+
// The hash is read from a ref file; never let an option-shaped value
|
|
160
|
+
// (e.g. `--output=<path>`) reach `git diff-tree` (issue #960).
|
|
161
|
+
if (getGitRefError(commitHash, 'commit hash'))
|
|
162
|
+
return;
|
|
158
163
|
let changedFiles = [];
|
|
159
164
|
try {
|
|
160
165
|
const { stdout } = await execFileAsync('git', [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentic-qe",
|
|
3
|
-
"version": "3.15.
|
|
3
|
+
"version": "3.15.3",
|
|
4
4
|
"description": "Agentic Quality Engineering V3 - Domain-Driven Design Architecture with 13 Bounded Contexts, O(log n) coverage analysis, ReasoningBank learning, 60 specialized QE agents, mathematical Coherence verification, deep Claude Flow integration",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* JSON Patch Utilities (RFC 6902)
|
|
3
|
-
*
|
|
4
|
-
* Provides utilities for computing and applying JSON Patch operations
|
|
5
|
-
* for AG-UI STATE_DELTA event synchronization.
|
|
6
|
-
*
|
|
7
|
-
* Reference: https://datatracker.ietf.org/doc/html/rfc6902
|
|
8
|
-
*
|
|
9
|
-
* @module adapters/ag-ui/json-patch-utils
|
|
10
|
-
*/
|
|
11
|
-
import type { JsonPatchOperation } from './event-types.js';
|
|
12
|
-
/**
|
|
13
|
-
* Result of applying a patch operation
|
|
14
|
-
*/
|
|
15
|
-
export interface PatchResult {
|
|
16
|
-
/** Whether the patch was applied successfully */
|
|
17
|
-
success: boolean;
|
|
18
|
-
/** The resulting document after patch application */
|
|
19
|
-
document: Record<string, unknown>;
|
|
20
|
-
/** Error message if patch failed */
|
|
21
|
-
error?: string;
|
|
22
|
-
/** Index of the failed operation (if any) */
|
|
23
|
-
failedOperationIndex?: number;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Configuration for diff computation
|
|
27
|
-
*/
|
|
28
|
-
export interface DiffConfig {
|
|
29
|
-
/** Whether to generate 'test' operations for validation */
|
|
30
|
-
generateTestOps?: boolean;
|
|
31
|
-
/** Whether to use 'move' operations when possible */
|
|
32
|
-
detectMoves?: boolean;
|
|
33
|
-
/** Maximum depth to compare objects (default: unlimited) */
|
|
34
|
-
maxDepth?: number;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Validation result for a patch operation
|
|
38
|
-
*/
|
|
39
|
-
export interface ValidationResult {
|
|
40
|
-
/** Whether the operation is valid */
|
|
41
|
-
valid: boolean;
|
|
42
|
-
/** Error message if invalid */
|
|
43
|
-
error?: string;
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Escape special characters in a JSON Pointer token (RFC 6901)
|
|
47
|
-
* ~ becomes ~0
|
|
48
|
-
* / becomes ~1
|
|
49
|
-
*/
|
|
50
|
-
export declare function escapePathToken(token: string): string;
|
|
51
|
-
/**
|
|
52
|
-
* Unescape special characters in a JSON Pointer token (RFC 6901)
|
|
53
|
-
* ~0 becomes ~
|
|
54
|
-
* ~1 becomes /
|
|
55
|
-
*/
|
|
56
|
-
export declare function unescapePathToken(token: string): string;
|
|
57
|
-
/**
|
|
58
|
-
* Parse a JSON Pointer path into tokens
|
|
59
|
-
*/
|
|
60
|
-
export declare function parsePath(path: string): string[];
|
|
61
|
-
/**
|
|
62
|
-
* Build a JSON Pointer path from tokens
|
|
63
|
-
*/
|
|
64
|
-
export declare function buildPath(tokens: string[]): string;
|
|
65
|
-
/**
|
|
66
|
-
* Get a value from an object using a JSON Pointer path
|
|
67
|
-
*/
|
|
68
|
-
export declare function getValueAtPath(document: Record<string, unknown>, path: string): unknown;
|
|
69
|
-
/**
|
|
70
|
-
* Set a value at a JSON Pointer path (mutates the document)
|
|
71
|
-
*/
|
|
72
|
-
export declare function setValueAtPath(document: Record<string, unknown>, path: string, value: unknown): void;
|
|
73
|
-
/**
|
|
74
|
-
* Delete a value at a JSON Pointer path (mutates the document)
|
|
75
|
-
*/
|
|
76
|
-
export declare function deleteValueAtPath(document: Record<string, unknown>, path: string): void;
|
|
77
|
-
/**
|
|
78
|
-
* Check if a path exists in the document
|
|
79
|
-
*/
|
|
80
|
-
export declare function pathExists(document: Record<string, unknown>, path: string): boolean;
|
|
81
|
-
/**
|
|
82
|
-
* Validate a single patch operation
|
|
83
|
-
*/
|
|
84
|
-
export declare function validateOperation(op: JsonPatchOperation): ValidationResult;
|
|
85
|
-
/**
|
|
86
|
-
* Validate an array of patch operations
|
|
87
|
-
*/
|
|
88
|
-
export declare function validatePatch(patch: JsonPatchOperation[]): ValidationResult;
|
|
89
|
-
/**
|
|
90
|
-
* Apply a single patch operation to a document
|
|
91
|
-
* Returns a new document (immutable)
|
|
92
|
-
*/
|
|
93
|
-
export declare function applyOperation(document: Record<string, unknown>, op: JsonPatchOperation): Record<string, unknown>;
|
|
94
|
-
/**
|
|
95
|
-
* Apply a JSON Patch to a document
|
|
96
|
-
* Returns result with success status and either new document or error info
|
|
97
|
-
*/
|
|
98
|
-
export declare function applyPatch(document: Record<string, unknown>, patch: JsonPatchOperation[]): PatchResult;
|
|
99
|
-
/**
|
|
100
|
-
* Apply a JSON Patch atomically with automatic rollback on failure
|
|
101
|
-
* Returns the new document if successful, throws on error
|
|
102
|
-
*/
|
|
103
|
-
export declare function applyPatchAtomic(document: Record<string, unknown>, patch: JsonPatchOperation[]): Record<string, unknown>;
|
|
104
|
-
/**
|
|
105
|
-
* Deep equality comparison for JSON values
|
|
106
|
-
*/
|
|
107
|
-
export declare function deepEqual(a: unknown, b: unknown): boolean;
|
|
108
|
-
/**
|
|
109
|
-
* Compute the JSON Patch to transform oldState into newState
|
|
110
|
-
*/
|
|
111
|
-
export declare function computeDiff(oldState: Record<string, unknown>, newState: Record<string, unknown>, config?: DiffConfig): JsonPatchOperation[];
|
|
112
|
-
/**
|
|
113
|
-
* Create a test operation to validate state before applying patches
|
|
114
|
-
*/
|
|
115
|
-
export declare function createTestOperation(path: string, value: unknown): JsonPatchOperation;
|
|
116
|
-
/**
|
|
117
|
-
* Create an add operation
|
|
118
|
-
*/
|
|
119
|
-
export declare function createAddOperation(path: string, value: unknown): JsonPatchOperation;
|
|
120
|
-
/**
|
|
121
|
-
* Create a remove operation
|
|
122
|
-
*/
|
|
123
|
-
export declare function createRemoveOperation(path: string): JsonPatchOperation;
|
|
124
|
-
/**
|
|
125
|
-
* Create a replace operation
|
|
126
|
-
*/
|
|
127
|
-
export declare function createReplaceOperation(path: string, value: unknown): JsonPatchOperation;
|
|
128
|
-
/**
|
|
129
|
-
* Create a move operation
|
|
130
|
-
*/
|
|
131
|
-
export declare function createMoveOperation(from: string, path: string): JsonPatchOperation;
|
|
132
|
-
/**
|
|
133
|
-
* Create a copy operation
|
|
134
|
-
*/
|
|
135
|
-
export declare function createCopyOperation(from: string, path: string): JsonPatchOperation;
|
|
136
|
-
//# sourceMappingURL=json-patch-utils.d.ts.map
|