agentic-qe 3.15.3 → 3.15.4
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/skills/skills-manifest.json +1 -1
- package/CHANGELOG.md +69 -0
- package/assets/skills/skills-manifest.json +1 -1
- package/dist/cli/bundle.js +5 -5
- package/dist/cli/chunks/adapter-T54G3TBK.js +2 -0
- package/dist/cli/chunks/{agent-booster-wasm-CYG3PKHH.js → agent-booster-wasm-MHJBRXMK.js} +2 -2
- package/dist/cli/chunks/{agent-handler-WTFYFZKL.js → agent-handler-G64SD7J2.js} +2 -2
- package/dist/cli/chunks/{agent-memory-branch-G6WE3ZXU.js → agent-memory-branch-G4UXFPKH.js} +2 -2
- package/dist/cli/chunks/aqe-learning-engine-HLCJJ3JM.js +2 -0
- package/dist/cli/chunks/{arena-ZFXQEVUQ.js → arena-63M3M6EW.js} +2 -2
- package/dist/cli/chunks/{arena-S72QW44C.js → arena-QJMKYPHS.js} +4 -4
- package/dist/cli/chunks/{audit-KPYIEQJ3.js → audit-UDFVTWSX.js} +3 -3
- package/dist/cli/chunks/base-VLD755UU.js +2 -0
- package/dist/cli/chunks/{better-sqlite3-L2M3TI5D.js → better-sqlite3-JLX2G56I.js} +2 -2
- package/dist/cli/chunks/{brain-handler-FHKLQTB4.js → brain-handler-PWF32LLW.js} +3 -3
- package/dist/cli/chunks/{branch-enumerator-3BSHOPOK.js → branch-enumerator-PB7QWXDP.js} +2 -2
- package/dist/cli/chunks/{browser-JUIJPL6Y.js → browser-CYNV2F3U.js} +2 -2
- package/dist/cli/chunks/browser-workflow-6M6VLWRF.js +2 -0
- package/dist/cli/chunks/{chunk-P36IODAM.js → chunk-2534PXIV.js} +2 -2
- package/dist/cli/chunks/{chunk-PUPEKA2J.js → chunk-2DRMTRBM.js} +2 -2
- package/dist/cli/chunks/{chunk-6EQDA4EC.js → chunk-2ICC4H6K.js} +2 -2
- package/dist/cli/chunks/{chunk-MUSYQF53.js → chunk-2LL35V3A.js} +2 -2
- package/dist/cli/chunks/{chunk-2MEWIXW4.js → chunk-2MU4WCMQ.js} +2 -2
- package/dist/cli/chunks/{chunk-CNQUU6CF.js → chunk-33IUCP34.js} +2 -2
- package/dist/cli/chunks/{chunk-U5AVZ3T2.js → chunk-35A22AUL.js} +1 -1
- package/dist/cli/chunks/{chunk-VUBLJBHQ.js → chunk-3BDDOFYW.js} +2 -2
- package/dist/cli/chunks/{chunk-FXTZXZCU.js → chunk-3C2BFLYC.js} +3 -3
- package/dist/cli/chunks/{chunk-4JVVVKAX.js → chunk-3MSBVOYW.js} +2 -2
- package/dist/cli/chunks/{chunk-P6EGRAQG.js → chunk-3ZIVBTX6.js} +2 -2
- package/dist/cli/chunks/{chunk-TBVPNN65.js → chunk-4GLR2S2M.js} +2 -2
- package/dist/cli/chunks/{chunk-6W6GZHQA.js → chunk-54ITMOFM.js} +4 -4
- package/dist/cli/chunks/{chunk-Z7UGEQ4G.js → chunk-54XTJBHV.js} +1 -1
- package/dist/cli/chunks/{chunk-L6OSEWOS.js → chunk-5B5D5KCV.js} +1 -1
- package/dist/cli/chunks/{chunk-HV3ZVUHO.js → chunk-5GWTJJEO.js} +1 -1
- package/dist/cli/chunks/{chunk-WSUYEVSY.js → chunk-5H7MR6HP.js} +1 -1
- package/dist/cli/chunks/{chunk-RQUSJEON.js → chunk-5SS2Z7JC.js} +2 -2
- package/dist/cli/chunks/chunk-5XXLWJU7.js +2 -0
- package/dist/cli/chunks/{chunk-ZATQLTYL.js → chunk-6EHVPFHW.js} +1 -1
- package/dist/cli/chunks/{chunk-2M75CW5Q.js → chunk-6HO3XRXE.js} +2 -2
- package/dist/cli/chunks/{chunk-ASUXS4N4.js → chunk-6HTO4BLV.js} +2 -2
- package/dist/cli/chunks/{chunk-POVP6O6K.js → chunk-6QPW4OVH.js} +1 -1
- package/dist/cli/chunks/{chunk-3ZTBV6M3.js → chunk-6TMUZGM2.js} +1 -1
- package/dist/cli/chunks/{chunk-RRSZ27A7.js → chunk-73MTUM6F.js} +2 -2
- package/dist/cli/chunks/{chunk-CFXROOIU.js → chunk-73PCVMGA.js} +2 -2
- package/dist/cli/chunks/{chunk-O66D4NEJ.js → chunk-76PRW2KY.js} +2 -2
- package/dist/cli/chunks/{chunk-XTGVGZ4J.js → chunk-7INP6HZH.js} +3 -3
- package/dist/cli/chunks/{chunk-ZL2GYU7H.js → chunk-7X2IVMXN.js} +2 -2
- package/dist/cli/chunks/{chunk-F5BREV2Q.js → chunk-A4OPQJ4A.js} +5 -5
- package/dist/cli/chunks/{chunk-2TBHPYOU.js → chunk-ADF6LGHZ.js} +2 -2
- package/dist/cli/chunks/{chunk-RWQDRPN5.js → chunk-AHVN3UQZ.js} +2 -2
- package/dist/cli/chunks/{chunk-QZBFMXO5.js → chunk-AOKSLWON.js} +54 -54
- package/dist/cli/chunks/{chunk-S7D4GD7H.js → chunk-ASKPTGUU.js} +2 -2
- package/dist/cli/chunks/{chunk-LEB6O2IN.js → chunk-B7GJXQD2.js} +2 -2
- package/dist/cli/chunks/{chunk-PBUWNMZ2.js → chunk-B7J3O2WM.js} +1 -1
- package/dist/cli/chunks/{chunk-WI7I6LMM.js → chunk-BBKLVHDQ.js} +1 -1
- package/dist/cli/chunks/{chunk-ED5HUPUR.js → chunk-BND6M2JX.js} +2 -2
- package/dist/cli/chunks/{chunk-5QUOM357.js → chunk-BPGFCUDO.js} +1 -1
- package/dist/cli/chunks/{chunk-QSVNVDA5.js → chunk-BY3IL56R.js} +1 -1
- package/dist/cli/chunks/{chunk-7SWHW5AC.js → chunk-BY5PLEPZ.js} +20 -20
- package/dist/cli/chunks/{chunk-OT6SOPAL.js → chunk-BZWZTGMF.js} +2 -2
- package/dist/cli/chunks/{chunk-7PDC4SKR.js → chunk-C5EN5WB6.js} +1 -1
- package/dist/cli/chunks/{chunk-APV5UWTU.js → chunk-CFXFGQEN.js} +2 -2
- package/dist/cli/chunks/{chunk-AEL4XJGJ.js → chunk-CQ3WSTJ2.js} +2 -2
- package/dist/cli/chunks/{chunk-A3IQU2ND.js → chunk-D7RVZ5C2.js} +2 -2
- package/dist/cli/chunks/{chunk-B23ROYST.js → chunk-DAYMT7TH.js} +21 -21
- package/dist/cli/chunks/{chunk-OTTTHNIT.js → chunk-DBIK4OFX.js} +1 -1
- package/dist/cli/chunks/{chunk-DLA3EHKJ.js → chunk-DEJM2P5K.js} +1 -1
- package/dist/cli/chunks/{chunk-OMHISPPF.js → chunk-DF4Y3HPO.js} +1 -1
- package/dist/cli/chunks/{chunk-DWG4TN6A.js → chunk-DFJGXXCL.js} +1 -1
- package/dist/cli/chunks/{chunk-7UUSV2SK.js → chunk-DPL4ZXTE.js} +1 -1
- package/dist/cli/chunks/{chunk-GPZH6OPP.js → chunk-DVE5SM5G.js} +3 -3
- package/dist/cli/chunks/{chunk-X335K4SU.js → chunk-EGHK6NMH.js} +2 -2
- package/dist/cli/chunks/{chunk-YJH7UFA2.js → chunk-EWUFVWRT.js} +2 -2
- package/dist/cli/chunks/{chunk-KCBCYF7M.js → chunk-EY5IUF7U.js} +2 -2
- package/dist/cli/chunks/{chunk-AOZJ6UUZ.js → chunk-FDK2GF4G.js} +2 -2
- package/dist/cli/chunks/{chunk-OGARNKLS.js → chunk-FRBCX46J.js} +2 -2
- package/dist/cli/chunks/{chunk-UZDTRCVU.js → chunk-G3ZUB3HD.js} +2 -2
- package/dist/cli/chunks/{chunk-OKNMZLGB.js → chunk-GAXTPQCZ.js} +2 -2
- package/dist/cli/chunks/{chunk-VX7CQUO7.js → chunk-GJVRQBLI.js} +2 -2
- package/dist/cli/chunks/{chunk-SKHP5WUP.js → chunk-GLKLEHK3.js} +2 -2
- package/dist/cli/chunks/{chunk-UTALYUMW.js → chunk-HCDTLV5J.js} +2 -2
- package/dist/cli/chunks/{chunk-7IJVCDDC.js → chunk-HEDLZWPM.js} +1 -1
- package/dist/cli/chunks/{chunk-V5NYGDSX.js → chunk-HEKCN5XQ.js} +2 -2
- package/dist/cli/chunks/{chunk-WW4RJ6BH.js → chunk-HFSBONCS.js} +2 -2
- package/dist/cli/chunks/{chunk-5LEUEWJY.js → chunk-HX5KQK7I.js} +2 -2
- package/dist/cli/chunks/{chunk-RDTR43YN.js → chunk-I43QRLLB.js} +2 -2
- package/dist/cli/chunks/{chunk-AQTQ24SK.js → chunk-I53365HG.js} +3 -3
- package/dist/cli/chunks/{chunk-RGD2CG23.js → chunk-I5A3HGO6.js} +2 -2
- package/dist/cli/chunks/{chunk-IARE5VGI.js → chunk-I6E4X3L3.js} +1 -1
- package/dist/cli/chunks/{chunk-YW4GM36K.js → chunk-IKWAPHJA.js} +2 -2
- package/dist/cli/chunks/{chunk-QUXX2DP7.js → chunk-ISASRHZP.js} +2 -2
- package/dist/cli/chunks/{chunk-BDKQSEEY.js → chunk-J3RNVHDH.js} +1 -1
- package/dist/cli/chunks/{chunk-QVNMTMDJ.js → chunk-JFQDWAU3.js} +2 -2
- package/dist/cli/chunks/{chunk-2GJJGO5D.js → chunk-JL3TI43V.js} +2 -2
- package/dist/cli/chunks/{chunk-6TYTBQPV.js → chunk-K2VUYRMG.js} +2 -2
- package/dist/cli/chunks/{chunk-A5H7TF7C.js → chunk-KOLHZSEC.js} +2 -2
- package/dist/cli/chunks/{chunk-WTMLRMKW.js → chunk-LGA6J4I4.js} +2 -2
- package/dist/cli/chunks/{chunk-CF3BPD2R.js → chunk-LJRZAALA.js} +154 -155
- package/dist/cli/chunks/{chunk-BO43BGHX.js → chunk-LOLAEDZD.js} +2 -2
- package/dist/cli/chunks/{chunk-XXW4KFBB.js → chunk-LPSE6DOQ.js} +1 -1
- package/dist/cli/chunks/{chunk-3UUMGWHW.js → chunk-LRTF5RMG.js} +4 -4
- package/dist/cli/chunks/{chunk-FPFGN2Z5.js → chunk-LXYTC62V.js} +2 -2
- package/dist/cli/chunks/{chunk-W7EHNX3Y.js → chunk-LY53L6NH.js} +2 -2
- package/dist/cli/chunks/{chunk-SP2JO53K.js → chunk-LZSLJJII.js} +2 -2
- package/dist/cli/chunks/{chunk-HSR53REE.js → chunk-M6SJALLA.js} +2 -2
- package/dist/cli/chunks/{chunk-AS54N3H7.js → chunk-MBV57LKC.js} +2 -2
- package/dist/cli/chunks/{chunk-6AKJ73X3.js → chunk-MGH4XIHH.js} +2 -2
- package/dist/cli/chunks/{chunk-HW4V7BVV.js → chunk-MVTUFPM2.js} +2 -2
- package/dist/cli/chunks/{chunk-4IYHYHTG.js → chunk-N6CRIUTO.js} +2 -2
- package/dist/cli/chunks/{chunk-X33LID2T.js → chunk-NBMQOP2R.js} +1 -1
- package/dist/cli/chunks/{chunk-D6PUDLJ4.js → chunk-NIJMLEAX.js} +2 -2
- package/dist/cli/chunks/{chunk-YTRGMILO.js → chunk-O7TMY4GS.js} +2 -2
- package/dist/cli/chunks/{chunk-PPA53NJB.js → chunk-OFQDM73J.js} +2 -2
- package/dist/cli/chunks/{chunk-M3ONCPSU.js → chunk-OG4KHX7S.js} +2 -2
- package/dist/cli/chunks/{chunk-3MNKYCLH.js → chunk-OHH6BUZK.js} +1 -1
- package/dist/cli/chunks/{chunk-HR7RL4PB.js → chunk-OOK6GPJR.js} +2 -2
- package/dist/cli/chunks/{chunk-XV2TIODR.js → chunk-P7GM3EE7.js} +1 -1
- package/dist/cli/chunks/{chunk-6V6XVGCL.js → chunk-PB2WSCBW.js} +3 -3
- package/dist/cli/chunks/{chunk-JJBTM4JO.js → chunk-PCWZCXBD.js} +2 -2
- package/dist/cli/chunks/{chunk-POTVF6BY.js → chunk-PEA4DVXW.js} +1 -1
- package/dist/cli/chunks/{chunk-WQZBKLAG.js → chunk-PJAXWCFC.js} +1 -1
- package/dist/cli/chunks/{chunk-KGS6H2HB.js → chunk-PMXWDTDK.js} +2 -2
- package/dist/cli/chunks/chunk-QIAX3JJB.js +3 -0
- package/dist/cli/chunks/{chunk-YGEC3PSD.js → chunk-R47LNH5W.js} +2 -2
- package/dist/cli/chunks/{chunk-M3ACHBC7.js → chunk-RA3MI5WK.js} +2 -2
- package/dist/cli/chunks/{chunk-HVIFA73X.js → chunk-RB2SL5GD.js} +2 -2
- package/dist/cli/chunks/{chunk-YHZGFWJE.js → chunk-RG67RZIX.js} +2 -2
- package/dist/cli/chunks/{chunk-5WOBFN2T.js → chunk-RI4JPBZD.js} +2 -2
- package/dist/cli/chunks/{chunk-NT6FYFJA.js → chunk-RJ5CZ7B6.js} +2 -2
- package/dist/cli/chunks/{chunk-A6PII4R4.js → chunk-RJMBHZYL.js} +1 -1
- package/dist/cli/chunks/{chunk-VHBZADYK.js → chunk-RWZ4F44Y.js} +2 -2
- package/dist/cli/chunks/{chunk-UGNTLSBL.js → chunk-S5D3HCGN.js} +2 -2
- package/dist/cli/chunks/{chunk-366IBPZB.js → chunk-SCL2OYN7.js} +2 -2
- package/dist/cli/chunks/{chunk-EQGT4VLC.js → chunk-SIUUAKCE.js} +1 -1
- package/dist/cli/chunks/{chunk-LPZAB3N2.js → chunk-SJB4KMZS.js} +3 -3
- package/dist/cli/chunks/{chunk-YCGU2LI7.js → chunk-SOSJFEFB.js} +2 -2
- package/dist/cli/chunks/{chunk-YQ3ZW47V.js → chunk-SZWXUG36.js} +2 -2
- package/dist/cli/chunks/{chunk-VGN46ZT4.js → chunk-T3BMCEQR.js} +2 -2
- package/dist/cli/chunks/{chunk-4N7YXTV3.js → chunk-TB22Y3WW.js} +1 -1
- package/dist/cli/chunks/{chunk-FTUNC4EI.js → chunk-TVQPYP2Z.js} +3 -3
- package/dist/cli/chunks/{chunk-JVQK6NGI.js → chunk-U2E5F3VZ.js} +2 -2
- package/dist/cli/chunks/{chunk-UCSGZVJX.js → chunk-UK5HY6LC.js} +1 -1
- package/dist/cli/chunks/{chunk-35VDOH4Y.js → chunk-UORI2CZ4.js} +1 -1
- package/dist/cli/chunks/{chunk-DH5NWHH2.js → chunk-V3NZ23X6.js} +2 -2
- package/dist/cli/chunks/{chunk-YGKU2QRC.js → chunk-VAXQUD5G.js} +1 -1
- package/dist/cli/chunks/{chunk-3Y4GX5FL.js → chunk-VMSO6DMF.js} +2 -2
- package/dist/cli/chunks/{chunk-GJB3LPCS.js → chunk-W3PPYNHF.js} +2 -2
- package/dist/cli/chunks/{chunk-7TW5UGDP.js → chunk-W6TJXK5Y.js} +2 -2
- package/dist/cli/chunks/{chunk-SRDECRTL.js → chunk-WEDVLKRB.js} +2 -2
- package/dist/cli/chunks/{chunk-4TM5K6EZ.js → chunk-WI5AEB7Q.js} +2 -2
- package/dist/cli/chunks/{chunk-Z7JPWXW2.js → chunk-WO4NSPLX.js} +2 -2
- package/dist/cli/chunks/{chunk-WSND64RL.js → chunk-WW6WUMS7.js} +2 -2
- package/dist/cli/chunks/{chunk-VOKIUF7I.js → chunk-WYO5VN2L.js} +1 -1
- package/dist/cli/chunks/{chunk-34Y4CIHD.js → chunk-X5S5UEM6.js} +2 -2
- package/dist/cli/chunks/{chunk-D5V6C3XG.js → chunk-XHCCH7UC.js} +3 -3
- package/dist/cli/chunks/{chunk-MZDUBFLP.js → chunk-XKIFNKHV.js} +1 -1
- package/dist/cli/chunks/{chunk-DE3QNPTG.js → chunk-XZ5Z56OP.js} +1 -1
- package/dist/cli/chunks/{chunk-RWLOERKK.js → chunk-YQ6BK7QC.js} +2 -2
- package/dist/cli/chunks/{chunk-HU474NXP.js → chunk-YUWUFYHK.js} +1 -1
- package/dist/cli/chunks/{chunk-ZJW4HRUA.js → chunk-YZ2AGC7O.js} +1 -1
- package/dist/cli/chunks/{chunk-WLOHTLHO.js → chunk-Z56QTRRB.js} +2 -2
- package/dist/cli/chunks/{chunk-EBIMVSPH.js → chunk-ZAOQIVHG.js} +2 -2
- package/dist/cli/chunks/{chunk-K65X6CQA.js → chunk-ZF5JTQEE.js} +1 -1
- package/dist/cli/chunks/{chunk-VRT736E3.js → chunk-ZKXZTIVF.js} +2 -2
- package/dist/cli/chunks/{chunk-ZI6NJEBY.js → chunk-ZP6ANUP7.js} +1 -1
- package/dist/cli/chunks/{chunk-I5VJ3FBC.js → chunk-ZURYZEHX.js} +2 -2
- package/dist/cli/chunks/{ci-JPISJ25U.js → ci-NGMGB43T.js} +3 -3
- package/dist/cli/chunks/{ci-output-DPHTFIGX.js → ci-output-BMJABAEX.js} +2 -2
- package/dist/cli/chunks/{circuit-breaker-PQ65VU2M.js → circuit-breaker-GYD5CMJQ.js} +2 -2
- package/dist/cli/chunks/{claude-flow-setup-GKHVO7AD.js → claude-flow-setup-MMOYVBVD.js} +2 -2
- package/dist/cli/chunks/client-FUHNNK5O.js +2 -0
- package/dist/cli/chunks/{cline-installer-HWMQZJ64.js → cline-installer-B2SOZ44R.js} +2 -2
- package/dist/cli/chunks/{code-OTY7BF3D.js → code-V3FIRAXD.js} +3 -3
- package/dist/cli/chunks/{code-index-extractor-FG3TMHHR.js → code-index-extractor-CV6A756Z.js} +2 -2
- package/dist/cli/chunks/{codex-installer-63JARKKS.js → codex-installer-EUC6J47Y.js} +2 -2
- package/dist/cli/chunks/{completions-4ZHONFML.js → completions-DQQIBAHR.js} +2 -2
- package/dist/cli/chunks/{complexity-analyzer-FYHTJW5Y.js → complexity-analyzer-HPXMXP5I.js} +2 -2
- package/dist/cli/chunks/{continuedev-installer-ZAWDSUR3.js → continuedev-installer-RCIYXH6V.js} +2 -2
- package/dist/cli/chunks/{copilot-installer-5QK565JX.js → copilot-installer-VUH32SHF.js} +2 -2
- package/dist/cli/chunks/core-handlers-F7TLX4LM.js +2 -0
- package/dist/cli/chunks/{cost-tracker-AWWMPPBJ.js → cost-tracker-YLCKLOAL.js} +2 -2
- package/dist/cli/chunks/{coverage-SMFQEGKE.js → coverage-IVKDV236.js} +3 -3
- package/dist/cli/chunks/cross-domain-router-EGWPY67O.js +2 -0
- package/dist/cli/chunks/{cursor-installer-3BL7JACV.js → cursor-installer-B42FN62K.js} +2 -2
- package/dist/cli/chunks/{daemon-R6ULBHHF.js → daemon-DECQRQII.js} +3 -3
- package/dist/cli/chunks/{daemon-OJ624POF.js → daemon-IPTOSCHM.js} +4 -4
- package/dist/cli/chunks/{dag-attention-scheduler-J6I3LTMY.js → dag-attention-scheduler-RY7CDYSC.js} +2 -2
- package/dist/cli/chunks/{detect-5Q5W33UR.js → detect-NW53BMJN.js} +2 -2
- package/dist/cli/chunks/{dist-node-GJNW56NA.js → dist-node-LE6KHXAB.js} +2 -2
- package/dist/cli/chunks/{domain-handler-IZQY2G44.js → domain-handler-JGXFT4LW.js} +2 -2
- package/dist/cli/chunks/{domain-plugins-PIGO3KI2.js → domain-plugins-GY3RYKKK.js} +2 -2
- package/dist/cli/chunks/{domain-transfer-NU3B4FQG.js → domain-transfer-CGBRXNTC.js} +2 -2
- package/dist/cli/chunks/dream-V4QN6OF5.js +2 -0
- package/dist/cli/chunks/{embed-and-insert-pattern-5QDDRPWV.js → embed-and-insert-pattern-65H4XHWR.js} +2 -2
- package/dist/cli/chunks/{eval-TB5HOAUY.js → eval-YPYIZQUR.js} +2 -2
- package/dist/cli/chunks/{experience-capture-middleware-SIYVLKDE.js → experience-capture-middleware-4JXVF5PL.js} +3 -3
- package/dist/cli/chunks/{fast-paths-T7QELS6D.js → fast-paths-HYQTAF2S.js} +2 -2
- package/dist/cli/chunks/{feature-flags-TNZ7ZAJV.js → feature-flags-HNSAFFX2.js} +2 -2
- package/dist/cli/chunks/{feature-flags-T3CNNYMJ.js → feature-flags-YACUH6OW.js} +2 -2
- package/dist/cli/chunks/{file-discovery-M45P2ZCY.js → file-discovery-R73BYEXB.js} +2 -2
- package/dist/cli/chunks/{fleet-DSBZPHBZ.js → fleet-6M3BP4OO.js} +3 -3
- package/dist/cli/chunks/{gnn-wrapper-EHODCF32.js → gnn-wrapper-QLD7KHXV.js} +2 -2
- package/dist/cli/chunks/{heartbeat-handler-V5DBVF7V.js → heartbeat-handler-EZP333X4.js} +4 -4
- package/dist/cli/chunks/heartbeat-scheduler-3N3L6CRM.js +2 -0
- package/dist/cli/chunks/hnsw-adapter-2BXJYDXI.js +2 -0
- package/dist/cli/chunks/hnsw-index-2DLI5OVO.js +2 -0
- package/dist/cli/chunks/{hnsw-legacy-bridge-IYKDYA2F.js → hnsw-legacy-bridge-47CUCSAU.js} +2 -2
- package/dist/cli/chunks/{hnswlib-node-DKG4LW3X.js → hnswlib-node-SVNYDJZH.js} +2 -2
- package/dist/cli/chunks/{hooks-VKNMAILY.js → hooks-6V5LMWP6.js} +10 -10
- package/dist/cli/chunks/hybrid-backend-OW4J65YH.js +2 -0
- package/dist/cli/chunks/{hypergraph-engine-AXZVP7A7.js → hypergraph-engine-L2FOBIFF.js} +2 -2
- package/dist/cli/chunks/{hypergraph-handler-6EO6JN4Z.js → hypergraph-handler-DU6Z57EE.js} +3 -3
- package/dist/cli/chunks/impact-analyzer-ZH5I2RG6.js +2 -0
- package/dist/cli/chunks/{init-handler-N3NG3RHN.js → init-handler-HETPWU67.js} +6 -6
- package/dist/cli/chunks/init-wizard-NIKM3ZOK.js +2 -0
- package/dist/cli/chunks/kernel-2EOSVM6X.js +2 -0
- package/dist/cli/chunks/{kilocode-installer-JICGAHLM.js → kilocode-installer-NHKYGJ7Q.js} +2 -2
- package/dist/cli/chunks/{kiro-installer-VYBFP6ZH.js → kiro-installer-24UK6GGR.js} +2 -2
- package/dist/cli/chunks/knowledge-graph-D3BPWNNO.js +2 -0
- package/dist/cli/chunks/{learning-3BHEZEPK.js → learning-QLVRZNHT.js} +3 -3
- package/dist/cli/chunks/{llm-router-GPTEZCUN.js → llm-router-XRMI2VMG.js} +4 -4
- package/dist/cli/chunks/llm-router-service-TJPPZFUN.js +2 -0
- package/dist/cli/chunks/{load-W5BIRPU4.js → load-W5UWL5C7.js} +2 -2
- package/dist/cli/chunks/load-test-RFT7IDOL.js +2 -0
- package/dist/cli/chunks/{mcp-EBV4DZPG.js → mcp-N7ALQ4BL.js} +2 -2
- package/dist/cli/chunks/{memory-7F6YYKNL.js → memory-WV52DLSA.js} +5 -5
- package/dist/cli/chunks/memory-backend-O2O4CFKZ.js +2 -0
- package/dist/cli/chunks/{memory-handlers-OGLJHAAJ.js → memory-handlers-DAEGUDBD.js} +2 -2
- package/dist/cli/chunks/{multi-model-executor-3ZIA2YOL.js → multi-model-executor-3FVTZCSO.js} +2 -2
- package/dist/cli/chunks/{opencode-installer-2XRZUTLR.js → opencode-installer-NTPWGHUW.js} +2 -2
- package/dist/cli/chunks/{orchestrator-VSZVJUJW.js → orchestrator-ORGJ6VAA.js} +5 -5
- package/dist/cli/chunks/pattern-null-store-TUBNXS34.js +2 -0
- package/dist/cli/chunks/{pattern-usage-recorder-I2IGVHRL.js → pattern-usage-recorder-WWXHUH5U.js} +2 -2
- package/dist/cli/chunks/{pipeline-5G3O6WBY.js → pipeline-ZOKZFXTH.js} +2 -2
- package/dist/cli/chunks/{platform-6GUFDIA3.js → platform-CDNL322F.js} +2 -2
- package/dist/cli/chunks/{plugin-GYXE4CIC.js → plugin-ZVLFNZZ4.js} +2 -2
- package/dist/cli/chunks/{prime-radiant-advanced-wasm-THX6JLGZ.js → prime-radiant-advanced-wasm-FVJDU2JY.js} +2 -2
- package/dist/cli/chunks/{project-root-QJRBKZQU.js → project-root-UCHQH3QL.js} +2 -2
- package/dist/cli/chunks/protocol-executor-6FQTTO3Y.js +2 -0
- package/dist/cli/chunks/{protocol-handler-B54LRU26.js → protocol-handler-4YBN5R23.js} +2 -2
- package/dist/cli/chunks/{prove-PCY2WQOD.js → prove-BHDHY664.js} +2 -2
- package/dist/cli/chunks/qe-reasoning-bank-TKPND56C.js +2 -0
- package/dist/cli/chunks/{quality-LPVDZC7U.js → quality-46AK277P.js} +2 -2
- package/dist/cli/chunks/{quality-gate-L3KXL6WE.js → quality-gate-WANE7TCN.js} +3 -3
- package/dist/cli/chunks/queen-coordinator-DWMXLPJG.js +2 -0
- package/dist/cli/chunks/{real-embeddings-N3H523PJ.js → real-embeddings-56MNGJGJ.js} +2 -2
- package/dist/cli/chunks/{ref-validation-6BKDPHZ7.js → ref-validation-S7UWXQIP.js} +2 -2
- package/dist/cli/chunks/{roocode-installer-NSGGTWXE.js → roocode-installer-TEYOQYL6.js} +2 -2
- package/dist/cli/chunks/router-QIMUYRCC.js +2 -0
- package/dist/cli/chunks/routing-feedback-4OH5ZNF4.js +2 -0
- package/dist/cli/chunks/{routing-handler-SRQNUBG3.js → routing-handler-KDTLMRWD.js} +2 -2
- package/dist/cli/chunks/{ruvector-commands-2IGULGDE.js → ruvector-commands-AOUDXCYE.js} +2 -2
- package/dist/cli/chunks/rvf-dual-writer-S6JBZL54.js +2 -0
- package/dist/cli/chunks/rvf-migration-adapter-TSGMLMYR.js +2 -0
- package/dist/cli/chunks/{rvf-migration-coordinator-ZD6WK5CK.js → rvf-migration-coordinator-V74MVBHS.js} +2 -2
- package/dist/cli/chunks/rvf-native-adapter-Z7QOW47S.js +2 -0
- package/dist/cli/chunks/{rvf-store-integrity-QULKUBBI.js → rvf-store-integrity-QI47Y354.js} +2 -2
- package/dist/cli/chunks/safe-db-JLOVBJNC.js +2 -0
- package/dist/cli/chunks/schedule-IM6XOBGR.js +2 -0
- package/dist/cli/chunks/scheduler-XL2SVVK5.js +2 -0
- package/dist/cli/chunks/{security-JW4EBARW.js → security-SN6MWOJT.js} +3 -3
- package/dist/cli/chunks/{shared-rvf-adapter-VQ7NJTGY.js → shared-rvf-adapter-2LB56LP4.js} +2 -2
- package/dist/cli/chunks/{shared-rvf-dual-writer-SKTS52HK.js → shared-rvf-dual-writer-WU7PFKQM.js} +2 -2
- package/dist/cli/chunks/sqlite-persistence-LWMIIC4U.js +2 -0
- package/dist/cli/chunks/{standalone-memory-3N4YJCSY.js → standalone-memory-F6FSRFWC.js} +2 -2
- package/dist/cli/chunks/{status-handler-5BQ2IIDG.js → status-handler-DHD5MS4G.js} +2 -2
- package/dist/cli/chunks/{structural-health-WGYR2RJB.js → structural-health-P6HPSQMR.js} +2 -2
- package/dist/cli/chunks/{sync-DLKSXTIR.js → sync-LISJGDSE.js} +2 -2
- package/dist/cli/chunks/{sync-R5OKUBTQ.js → sync-SNAXAVCN.js} +2 -2
- package/dist/cli/chunks/{task-handler-Z5KNTSUX.js → task-handler-ZT44NT5Z.js} +2 -2
- package/dist/cli/chunks/{task-handlers-RZFMYFSC.js → task-handlers-R6DQ5324.js} +3 -3
- package/dist/cli/chunks/{test-LHWKZJRN.js → test-MUFHR4JQ.js} +4 -4
- package/dist/cli/chunks/{test-scheduling-EN7WXUMS.js → test-scheduling-TAUSLZJP.js} +3 -3
- package/dist/cli/chunks/{token-bootstrap-4V3OO4EC.js → token-bootstrap-UGRH7OPU.js} +2 -2
- package/dist/cli/chunks/{token-usage-PFC2BYBS.js → token-usage-IX65ECBR.js} +2 -2
- package/dist/cli/chunks/{transformers-VZCC4SHC.js → transformers-QKPSVW2W.js} +2 -2
- package/dist/cli/chunks/{tree-sitter-wasm-parser-ZYDQXGKN.js → tree-sitter-wasm-parser-Z7PPA2JO.js} +2 -2
- package/dist/cli/chunks/{types-I6AWHZZQ.js → types-ULNNGGGH.js} +2 -2
- package/dist/cli/chunks/unified-memory-F5IJY7W7.js +2 -0
- package/dist/cli/chunks/unified-memory-hnsw-C3WAMAQL.js +2 -0
- package/dist/cli/chunks/unified-persistence-EWXXOTCB.js +2 -0
- package/dist/cli/chunks/{upgrade-T7SG75PA.js → upgrade-ECI3YUYA.js} +2 -2
- package/dist/cli/chunks/{validate-YLYEHTY3.js → validate-3JKRUW2S.js} +2 -2
- package/dist/cli/chunks/{validate-swarm-VTLTRUE3.js → validate-swarm-LZWANCIE.js} +2 -2
- package/dist/cli/chunks/visual-security-CKLTAIAB.js +2 -0
- package/dist/cli/chunks/{web-tree-sitter-JUM7ZY5M.js → web-tree-sitter-N5V4A6XG.js} +2 -2
- package/dist/cli/chunks/{windsurf-installer-4KS2466T.js → windsurf-installer-5TBM5B3C.js} +2 -2
- package/dist/cli/chunks/{witness-chain-E4X6TOCT.js → witness-chain-MFP3HBWQ.js} +2 -2
- package/dist/cli/chunks/witness-chain-Z6LWFEZS.js +2 -0
- package/dist/cli/chunks/{witness-chain-repair-MB53OZO6.js → witness-chain-repair-5QWRFVUK.js} +2 -2
- package/dist/cli/chunks/{witness-chain-verifier-LBWJHO7Y.js → witness-chain-verifier-SRAT7LVY.js} +2 -2
- package/dist/cli/chunks/{witness-key-manager-5IHVMXHJ.js → witness-key-manager-FYZXQTLJ.js} +2 -2
- package/dist/cli/chunks/{workflow-XUQXIRNE.js → workflow-M7TUYYXY.js} +5 -5
- package/dist/cli/chunks/workflow-orchestrator-OFTAR2NA.js +2 -0
- package/dist/cli/chunks/{wrappers-YVF5SQUN.js → wrappers-COU73OQ6.js} +2 -2
- package/dist/cli/commands/workflow.js +3 -0
- package/dist/cli/scheduler/persistent-scheduler.d.ts +2 -0
- package/dist/cli/scheduler/persistent-scheduler.js +12 -2
- package/dist/domains/code-intelligence/services/metric-collector/listing-process-owner.d.ts +3 -0
- package/dist/domains/code-intelligence/services/metric-collector/listing-process-owner.js +57 -0
- package/dist/domains/code-intelligence/services/metric-collector/test-counter.js +124 -36
- package/dist/mcp/bundle.js +414 -415
- package/dist/mcp/handlers/domain-handler-configs.d.ts +42 -0
- package/dist/mcp/services/session-store.js +11 -1
- package/dist/mcp/types.d.ts +18 -0
- package/dist/memory/crdt/convergence-tracker.js +14 -24
- package/dist/memory/crdt/crdt-store.js +15 -0
- package/dist/memory/crdt/lww-register.js +3 -3
- package/dist/memory/crdt/or-set.js +18 -0
- package/dist/planning/goap-planner.js +18 -10
- package/dist/shared/embeddings/embedding-cache.d.ts +3 -3
- package/dist/shared/embeddings/embedding-cache.js +8 -8
- package/dist/shared/embeddings/nomic-embedder.js +9 -6
- package/dist/shared/llm/cache.js +1 -1
- package/package.json +1 -1
- package/dist/cli/chunks/adapter-WQSFQES5.js +0 -2
- package/dist/cli/chunks/aqe-learning-engine-TDHBBADE.js +0 -2
- package/dist/cli/chunks/base-CZSB27VO.js +0 -2
- package/dist/cli/chunks/browser-workflow-AEMIS6PA.js +0 -2
- package/dist/cli/chunks/chunk-INVDDFJC.js +0 -2
- package/dist/cli/chunks/chunk-QDQLL2QB.js +0 -3
- package/dist/cli/chunks/client-BS7I637W.js +0 -2
- package/dist/cli/chunks/core-handlers-UG7RMTK5.js +0 -2
- package/dist/cli/chunks/cross-domain-router-NX7F6TOF.js +0 -2
- package/dist/cli/chunks/dream-GYEH57FW.js +0 -2
- package/dist/cli/chunks/heartbeat-scheduler-4TJ3T7LR.js +0 -2
- package/dist/cli/chunks/hnsw-adapter-PHFK4EAP.js +0 -2
- package/dist/cli/chunks/hnsw-index-434XDDBH.js +0 -2
- package/dist/cli/chunks/hybrid-backend-DYVJQENQ.js +0 -2
- package/dist/cli/chunks/impact-analyzer-CBAST6M2.js +0 -2
- package/dist/cli/chunks/init-wizard-DWIJW7HY.js +0 -2
- package/dist/cli/chunks/kernel-AQGCS4X2.js +0 -2
- package/dist/cli/chunks/knowledge-graph-2ICXFUUV.js +0 -2
- package/dist/cli/chunks/llm-router-service-C47RGTH6.js +0 -2
- package/dist/cli/chunks/load-test-LRDAW3N6.js +0 -2
- package/dist/cli/chunks/memory-backend-UFBAYPQ6.js +0 -2
- package/dist/cli/chunks/pattern-null-store-27FCITT3.js +0 -2
- package/dist/cli/chunks/protocol-executor-XWXXTMEW.js +0 -2
- package/dist/cli/chunks/qe-reasoning-bank-3RMYXENE.js +0 -2
- package/dist/cli/chunks/queen-coordinator-AS6DZ7UJ.js +0 -2
- package/dist/cli/chunks/router-OVNLNGHO.js +0 -2
- package/dist/cli/chunks/routing-feedback-TBOWEB6H.js +0 -2
- package/dist/cli/chunks/rvf-dual-writer-YJYRCYGT.js +0 -2
- package/dist/cli/chunks/rvf-migration-adapter-VMRQ2SFO.js +0 -2
- package/dist/cli/chunks/rvf-native-adapter-B75L3ALW.js +0 -2
- package/dist/cli/chunks/safe-db-CRQHMCV6.js +0 -2
- package/dist/cli/chunks/schedule-L3DKJRXU.js +0 -2
- package/dist/cli/chunks/scheduler-VRHYUGY5.js +0 -2
- package/dist/cli/chunks/sqlite-persistence-JVAZETTL.js +0 -2
- package/dist/cli/chunks/unified-memory-WOOCCIUM.js +0 -2
- package/dist/cli/chunks/unified-memory-hnsw-PDDHFLUB.js +0 -2
- package/dist/cli/chunks/unified-persistence-6ETD3JSC.js +0 -2
- package/dist/cli/chunks/visual-security-O4OT2YPY.js +0 -2
- package/dist/cli/chunks/witness-chain-67JHPDCN.js +0 -2
- package/dist/cli/chunks/workflow-orchestrator-ZVFSNRYZ.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.
|
|
2
|
-
import{b as h}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.4");process.exit(0)}
|
|
2
|
+
import{b as h}from"./chunk-5H7MR6HP.js";function i(t,r){if(t.length!==r.length)throw new Error(`Vector length mismatch: ${t.length} vs ${r.length}`);let e=0,o=0,l=0;for(let n=0;n<t.length;n++)e+=t[n]*r[n],o+=t[n]*t[n],l+=r[n]*r[n];let u=Math.sqrt(o)*Math.sqrt(l);return u===0?0:e/u}function c(t){let r=Math.sqrt(t.reduce((e,o)=>e+o*o,0));return r===0?t.slice():t.map(e=>e/r)}function g(t){let r=0;for(let e=0;e<t.length;e++)r+=t[e]*t[e];return Math.sqrt(r)}var m=h(()=>{"use strict"});export{i as a,c as b,g as c,m as d};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.4");process.exit(0)}
|
|
2
2
|
import a from"chalk";import{existsSync as m,statSync as S}from"fs";import{join as p,relative as P}from"path";var l=class{static prompt(t,e){return new Promise(r=>{t.question(e,s=>{r(s)})})}static printStepHeader(t,e,r){console.log(""),console.log(a.cyan(`Step ${t}: ${e}`)),r&&console.log(a.gray(r)),console.log("")}static printWizardHeader(t,e){console.log(""),console.log(a.blue("========================================")),console.log(a.blue.bold(` ${t}`)),console.log(a.blue("========================================")),e&&console.log(a.gray(e)),console.log(a.gray("Press Ctrl+C to cancel at any time")),console.log("")}static printSummaryHeader(){console.log(""),console.log(a.blue("========================================")),console.log(a.blue.bold(" Configuration Summary")),console.log(a.blue("========================================")),console.log("")}static printSummaryField(t,e,r){let s=r?.indent??" ",i=r?.maxItems??5,c=r?.formatValue??(o=>a.cyan(o));if(Array.isArray(e))e.length===0?console.log(a.white(`${s}${t}: ${a.gray("(none)")}`)):e.length<=i?console.log(a.white(`${s}${t}: ${c(e.join(", "))}`)):(console.log(a.white(`${s}${t}:`)),e.slice(0,i).forEach(o=>{console.log(a.gray(`${s} - ${o}`))}),console.log(a.gray(`${s} ... and ${e.length-i} more`)));else{let o=t.padEnd(16);console.log(a.white(`${s}${o}${c(e)}`))}}static printDerivedSettings(t,e=" "){console.log(""),console.log(a.gray(`${e}Derived settings:`));for(let[r,s]of Object.entries(t))console.log(a.gray(`${e} ${r}: ${s}`));console.log("")}};var h=class u{static getSourceDirectories(t){let e=[],r=["src","lib","app","packages","api"];for(let s of r){let i=p(t,s);m(i)&&S(i).isDirectory()&&e.push(s)}return e}static getCoverageTargets(t){let e=u.getSourceDirectories(t),r=["coverage","coverage/lcov.info","coverage/coverage-final.json",".nyc_output"];for(let s of r){let i=p(t,s);m(i)&&e.push(s)}return e}static getSecurityTargets(t){let e=u.getSourceDirectories(t),r=["package.json","package-lock.json","yarn.lock","pnpm-lock.yaml",".env",".env.example","docker-compose.yml","Dockerfile"];for(let s of r){let i=p(t,s);m(i)&&e.push(s)}return e}static getTestSourceFiles(t){let e=[],r=["src","lib","app","packages"];for(let s of r){let i=p(t,s);m(i)&&S(i).isDirectory()&&(e.push(`${s}/**/*.ts`),e.push(s))}return m(p(t,"src"))&&(e.push("src/services/**/*.ts"),e.push("src/utils/**/*.ts"),e.push("src/components/**/*.tsx")),e}static checkPatternsExist(t){return[p(t,".agentic-qe","patterns"),p(t,".agentic-qe","memory.db"),p(t,".aqe","patterns"),p(t,"data","patterns")].some(r=>m(r))}},f=class{static relativePath(t,e){return P(e,t)||"."}static yesNo(t){return t?"Yes":"No"}static enabledDisabled(t){return t?"Enabled":"Disabled"}static percentage(t){return`${t}%`}static truncatedList(t,e=5){return t.length===0?"(none)":t.length<=e?t.join(", "):`${t.slice(0,e).join(", ")}... and ${t.length-e} more`}};import n from"chalk";import{existsSync as w}from"fs";import{resolve as I}from"path";var d=class{constructor(t){this.defaultValue=t}defaultValue;description;getDefaultValue(){return this.defaultValue}success(t){return{value:t,continue:!0}}cancelled(){return{value:this.defaultValue,continue:!1}}error(t){return{value:this.defaultValue,continue:!1,error:t}}};var y=class extends d{id;stepNumber;title;description;options;validValues;constructor(t){super(t.defaultValue),this.id=t.id,this.stepNumber=t.stepNumber,this.title=t.title,this.description=t.description,this.options=t.options,this.validValues=t.validValues}async execute(t){if(t.nonInteractive)return this.success(this.defaultValue);l.printStepHeader(this.stepNumber,this.title,this.description),this.options.forEach(i=>{let c=[];i.isRecommended?c.push(n.green(" (recommended)")):(i.isDefault||i.value===this.defaultValue)&&c.push(n.green(" (default)")),console.log(n.white(` ${i.key}. ${i.label||i.value}${c.join("")}`)),i.description&&console.log(n.gray(` ${i.description}`))}),console.log("");let r=(await l.prompt(t.rl,`Select ${this.title.toLowerCase()} [${n.gray(String(this.defaultValue))}]: `)).trim();if(!r)return this.success(this.defaultValue);let s=parseInt(r,10);return s>=1&&s<=this.options.length?this.success(this.options[s-1].value):this.validValues.includes(r)?this.success(r):(console.log(n.yellow(` Invalid input, using default: ${this.defaultValue}`)),this.success(this.defaultValue))}},b=class extends d{id;stepNumber;title;description;options;validValues;instructions;allowEmpty;constructor(t){super(t.defaultValue),this.id=t.id,this.stepNumber=t.stepNumber,this.title=t.title,this.description=t.description,this.options=t.options,this.validValues=t.validValues,this.instructions=t.instructions,this.allowEmpty=t.allowEmpty??!1}async execute(t){if(t.nonInteractive)return this.success(this.defaultValue);l.printStepHeader(this.stepNumber,this.title,this.description),this.instructions&&(console.log(n.gray(this.instructions)),console.log("")),this.options.forEach(o=>{let N=o.isDefaultSelected||this.defaultValue.includes(o.value)?n.green(" *"):"";console.log(n.white(` ${o.key}. ${o.label||o.value}${N}`)),o.description&&console.log(n.gray(` ${o.description}`))}),console.log(""),console.log(n.gray(" * = included in default selection")),console.log("");let e=this.defaultValue.join(","),s=(await l.prompt(t.rl,`Select options [${n.gray(e)}]: `)).trim();if(!s)return this.success(this.defaultValue);let i=s.split(",").map(o=>o.trim().toLowerCase()).filter(o=>o.length>0),c=[];for(let o of i){let g=parseInt(o,10);g>=1&&g<=this.options.length?c.push(this.options[g-1].value):this.validValues.includes(o)&&c.push(o)}return c.length===0?this.allowEmpty?this.success([]):(console.log(n.yellow(` Invalid input, using default: ${e}`)),this.success(this.defaultValue)):this.success([...new Set(c)])}},v=class extends d{id;stepNumber;title;description;additionalInfo;constructor(t){super(t.defaultValue),this.id=t.id,this.stepNumber=t.stepNumber,this.title=t.title,this.description=t.description,this.additionalInfo=t.additionalInfo}async execute(t){if(t.nonInteractive)return this.success(this.defaultValue);l.printStepHeader(this.stepNumber,this.title,this.description),this.additionalInfo&&(console.log(n.gray(this.additionalInfo)),console.log(""));let e=this.defaultValue?"Y/n":"y/N",s=(await l.prompt(t.rl,`${this.title}? [${n.gray(e)}]: `)).trim().toLowerCase();return s===""?this.success(this.defaultValue):s==="n"||s==="no"?this.success(!1):s==="y"||s==="yes"?this.success(!0):this.success(this.defaultValue)}},x=class extends d{id;stepNumber;title;description;presets;min;max;constructor(t){super(t.defaultValue),this.id=t.id,this.stepNumber=t.stepNumber,this.title=t.title,this.description=t.description,this.presets=t.presets,this.min=t.min,this.max=t.max}async execute(t){if(t.nonInteractive)return this.success(this.defaultValue);l.printStepHeader(this.stepNumber,this.title,this.description),this.presets&&this.presets.length>0&&(this.presets.forEach(i=>{let c=i.value===this.defaultValue?n.green(" (default)"):"";console.log(n.gray(` ${i.key}. ${i.label}${c}`))}),this.min!==void 0&&this.max!==void 0&&console.log(n.gray(` Or enter a custom number (${this.min}-${this.max})`)),console.log(""));let r=(await l.prompt(t.rl,`${this.title} [${n.gray(String(this.defaultValue))}]: `)).trim();if(!r)return this.success(this.defaultValue);let s=parseInt(r,10);if(this.presets){let i=s;if(i>=1&&i<=this.presets.length)return this.success(this.presets[i-1].value)}return isNaN(s)?(console.log(n.yellow(` Invalid input, using default: ${this.defaultValue}`)),this.success(this.defaultValue)):this.min!==void 0&&s<this.min?(console.log(n.yellow(` Value too low, using minimum: ${this.min}`)),this.success(this.min)):this.max!==void 0&&s>this.max?(console.log(n.yellow(` Value too high, using maximum: ${this.max}`)),this.success(this.max)):this.success(s)}},C=class extends d{id;stepNumber;title;description;examples;suggestionsProvider;validatePath;constructor(t){super(t.defaultValue),this.id=t.id,this.stepNumber=t.stepNumber,this.title=t.title,this.description=t.description,this.examples=t.examples,this.suggestionsProvider=t.suggestionsProvider,this.validatePath=t.validatePath??!0}async execute(t){if(t.nonInteractive){let i=I(t.cwd,this.defaultValue);return this.success(w(i)?i:t.cwd)}if(l.printStepHeader(this.stepNumber,this.title,this.description),this.examples&&(console.log(n.gray(`Examples: ${this.examples}`)),console.log("")),this.suggestionsProvider){let i=this.suggestionsProvider(t.cwd);i.length>0&&(console.log(n.yellow("Detected directories:")),i.slice(0,5).forEach((c,o)=>{console.log(n.gray(` ${o+1}. ${c}`))}),console.log(""))}let r=(await l.prompt(t.rl,`${this.title} [${n.gray(this.defaultValue)}]: `)).trim()||this.defaultValue,s=I(t.cwd,r);return this.validatePath&&!w(s)?(console.log(n.yellow(` Warning: '${r}' does not exist, using current directory.`)),this.success(t.cwd)):this.success(s)}};var T=class extends d{id;stepNumber;title;description;constructor(t){super({}),this.id=t.id,this.stepNumber=t.stepNumber,this.title=t.title,this.description=t.description}async execute(t){if(t.nonInteractive)return this.success({});l.printStepHeader(this.stepNumber,this.title,this.description);let e=await l.prompt(t.rl,`Include patterns [${n.gray("e.g., src/**/*.ts")}]: `),r=await l.prompt(t.rl,`Exclude patterns [${n.gray("e.g., **/*.test.ts,dist/**")}]: `),s={};return e.trim()&&(s.include=e.split(",").map(i=>i.trim()).filter(i=>i.length>0)),r.trim()&&(s.exclude=r.split(",").map(i=>i.trim()).filter(i=>i.length>0)),this.success(s)}};import{createInterface as R}from"readline";import $ from"chalk";var V=class{options;cwd;constructor(t){this.options=t,this.cwd=process.cwd()}async run(){if(this.isNonInteractive())return this.getDefaults();let t=R({input:process.stdin,output:process.stdout});try{this.printHeader();let e={},r=this.getCommands();for(let c of r){let o={rl:t,cwd:this.cwd,results:e,nonInteractive:!1},g=await c.execute(o);if(!g.continue)return this.getCancelled();e[c.id]=g.value}let s=this.buildResult(e);return this.printSummary(s),await this.promptConfirmation(t)?s:this.getCancelled()}finally{t.close()}}printHeader(){l.printWizardHeader(this.getTitle(),this.getSubtitle())}async promptConfirmation(t){console.log("");let r=(await l.prompt(t,`${$.green(this.getConfirmationPrompt())} [${$.gray("Y/n")}]: `)).trim().toLowerCase();return r==="n"||r==="no"?(console.log($.yellow(`
|
|
3
3
|
Wizard cancelled.`)),!1):!0}};export{l as a,h as b,f as c,y as d,b as e,v as f,x as g,C as h,T as i,V as j};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.
|
|
2
|
-
import{a as P}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.4");process.exit(0)}
|
|
2
|
+
import{a as P}from"./chunk-DFJGXXCL.js";import{b as w}from"./chunk-VAXQUD5G.js";import{e as S}from"./chunk-6TMUZGM2.js";import{b as T,d as $}from"./chunk-S5D3HCGN.js";import{a as q}from"./chunk-5XXLWJU7.js";import{e as v}from"./chunk-LXYTC62V.js";import{S as H,j as E}from"./chunk-K2VUYRMG.js";$();var W=["oracle:test-exec","judge:llm","proxy:structural"],d="proxy:structural";function j(n){return n&&W.includes(n)?n:d}function m(n,e={}){switch(j(n)){case"oracle:test-exec":return!0;case"judge:llm":return e.allowJudgeTier===!0;default:return!1}}import{createHash as O}from"node:crypto";function D(n,e){let t=n.length;if(t===0)return-1/0;let r=e?.iters??2e3,a=e?.alpha??.05,s=(e?.seed??2654435761)>>>0,o=()=>(s=Math.imul(s,1664525)+1013904223>>>0,s/4294967296),c=new Array(r);for(let u=0;u<r;u++){let l=0;for(let h=0;h<t;h++)l+=n[Math.floor(o()*t)];c[u]=l/t}c.sort((u,l)=>u-l);let i=Math.min(Math.floor(a*r),r-1);return c[i]}function L(n,e){let t=Math.min(n.length,e.length),r=new Array(t);for(let a=0;a<t;a++)r[a]=n[a]-e[a];return r}var U=n=>m(n.provenanceTier,{allowJudgeTier:n.allowJudgeTier})?n.candidateHeldOut>n.baselineHeldOut?w(n.candidateAnchorMean,n.baselineAnchorMean,n.anchorTol)?{promote:!0,reason:"held-out gain, no anchor regression, oracle-tier evidence"}:{promote:!1,reason:`anchor regression: ${n.candidateAnchorMean} < ${n.baselineAnchorMean} - ${n.anchorTol}`}:{promote:!1,reason:`held-out ${n.candidateHeldOut} did not beat baseline ${n.baselineHeldOut}`}:{promote:!1,reason:`provenance tier '${n.provenanceTier}' not allowed to promote`},C=8,x=1e-6,N=n=>n.reduce((e,t)=>e+t,0)/n.length,V=n=>{let e=U(n);if(!e.promote)return e;let t=n.candidateHeldOutSamples,r=n.baselineHeldOutSamples;if(!t||!r||t.length===0||t.length!==r.length)return{promote:!1,reason:"significance gate: missing/mismatched paired held-out samples (need equal-length candidate & baseline per-task vectors)"};if(t.length<C)return{promote:!1,reason:`significance gate: only ${t.length} paired samples (< ${C}) \u2014 a bootstrap CI is not meaningful; fail closed rather than certify noise`};if(Math.abs(N(t)-n.candidateHeldOut)>x||Math.abs(N(r)-n.baselineHeldOut)>x)return{promote:!1,reason:"significance gate: sealed sample means do not match the sealed held-out scalars \u2014 inconsistent/forged evaluation"};let a=D(L(t,r));return a>0?{promote:!0,reason:`${e.reason}; paired gain significant (CI low ${a.toFixed(4)} > 0)`}:{promote:!1,reason:`significance gate: paired held-out gain not significant (95% CI lower bound ${a.toFixed(4)} \u2264 0)`}},se=Object.freeze({"accept/v1":U,"accept/v1+sig":V});function _(n){if(n===null||typeof n!="object")return JSON.stringify(n)??"null";if(Array.isArray(n))return`[${n.map(_).join(",")}]`;let e=n;return`{${Object.keys(e).filter(r=>e[r]!==void 0).sort().map(r=>`${JSON.stringify(r)}:${_(e[r])}`).join(",")}}`}var Q="aqe:promotion-path-rule:v1+sig",J=n=>m(n.provenanceTier,{allowJudgeTier:n.allowJudgeTier})?n.reward===void 0||n.rewardThreshold===void 0||!(n.reward>=n.rewardThreshold)?{promote:!1,reason:`reward ${n.reward} below threshold ${n.rewardThreshold}`}:n.occurrences===void 0||n.occurrenceThreshold===void 0||!(n.occurrences>=n.occurrenceThreshold)?{promote:!1,reason:`occurrences ${n.occurrences} below threshold ${n.occurrenceThreshold}`}:n.successRate===void 0||n.successRateThreshold===void 0||!(n.successRate>=n.successRateThreshold)?{promote:!1,reason:`success rate ${n.successRate} below threshold ${n.successRateThreshold}`}:n.withinActivityWindow!==!0?{promote:!1,reason:"pattern outside promotion activity window (stale)"}:{promote:!0,reason:"tier allowed; reward/occurrence/success-rate thresholds met; within activity window"}:{promote:!1,reason:`provenance tier '${n.provenanceTier}' not allowed to promote`},G=n=>m(n.provenanceTier,{allowJudgeTier:n.allowJudgeTier})?n.insightConfidence===void 0||n.insightConfidenceThreshold===void 0||!(n.insightConfidence>=n.insightConfidenceThreshold)?{promote:!1,reason:`insight confidence ${n.insightConfidence} below threshold ${n.insightConfidenceThreshold}`}:n.insightActionable!==!0?{promote:!1,reason:"insight produced no actionable reorganization"}:{promote:!0,reason:"tier allowed; insight confidence meets threshold; actionable"}:{promote:!1,reason:`provenance tier '${n.provenanceTier}' not allowed to apply`},M=Object.freeze({"pattern-promote/v1":J,"dream-apply/v1":G});function b(n){return O("sha256").update(_(n)).digest("hex")}function y(n){if(!(n in M))throw new Error(`Unknown promotion-path rule version '${n}' \u2014 cannot fingerprint an unregistered rule.`);return O("sha256").update(Q).update("\0").update(n).digest("hex")}function R(n,e){let t=M[n];if(!t)throw new Error(`Unknown promotion-path rule version '${n}' \u2014 refusing to re-execute an unregistered rule.`);return t(e)}function I(n,e={}){let t=[],r=b(n.sealed)===n.sealedHash;r||t.push("sealIntact");let a=!1;try{let c=y(n.ruleVersion);a=n.ruleFingerprint===c&&(e.pinnedRuleFingerprint===void 0||n.ruleFingerprint===e.pinnedRuleFingerprint)}catch{a=!1}a||t.push("gateUnchanged");let s=!1;r&&a&&(s=(R(n.ruleVersion,n.sealed).promote?"promote":"reject")===n.recordedVerdict),s||t.push("gateReExecutes");let o=t.length===0;return{valid:o,checks:{sealIntact:r,gateUnchanged:a,gateReExecutes:s},failures:t,reason:o?"promotion verified: sealed inputs intact, rule unchanged, frozen rule re-execution reproduces the recorded verdict":`promotion INVALID (failed: ${t.join(", ")}) \u2014 the recorded verdict is not reproducible under the frozen rule`}}q();H();var p=v.create("pattern-lifecycle"),z={promotionRewardThreshold:.7,promotionMinOccurrences:S,promotionMinSuccessRate:.7,deprecationFailureThreshold:3,staleDaysThreshold:30,confidenceDecayRate:.01,minActiveConfidence:.3,maxAgeForActivePatterns:90,promotionActivityWindowDays:30,asymmetricLearning:{},allowJudgeTierPromotion:!1},k=5,B=.9,X=2;function Y(n,e){return e<k||!Number.isFinite(n)?0:Math.min(Math.max(n,0),1)}var A=class{constructor(e,t={}){this.db=e;this.config={...z,...t},this.asymmetricEngine=new P(this.config.asymmetricLearning),this.ensureSchema()}db;config;asymmetricEngine;_witnessChain=null;set witnessChain(e){this._witnessChain=e}_compressionService=null;set compressionService(e){this._compressionService=e}ensureSchema(){try{this.db.prepare(`
|
|
3
3
|
SELECT deprecated_at FROM qe_patterns LIMIT 1
|
|
4
4
|
`).get()}catch(e){p.debug("Adding missing deprecated_at column",{error:e instanceof Error?e.message:String(e)}),this.db.exec(`
|
|
5
5
|
ALTER TABLE qe_patterns ADD COLUMN deprecated_at TEXT DEFAULT NULL
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.
|
|
2
|
-
import{b as k}from"./chunk-VGN46ZT4.js";import{a as we,c as Ae}from"./chunk-RWLOERKK.js";import{b as c,g as Me}from"./chunk-X335K4SU.js";import{a as me,b as $e}from"./chunk-YCGU2LI7.js";import{b as Re,c as R,d as _e,f as x}from"./chunk-YW4GM36K.js";import{e as z,h as Ce,i as de,n as H}from"./chunk-S7D4GD7H.js";import{b as W,d as ke}from"./chunk-UGNTLSBL.js";import{a as pe,e as Ge}from"./chunk-ASUXS4N4.js";import{b as Ee,d as Fe}from"./chunk-7TW5UGDP.js";import{b as C,e as P}from"./chunk-2GJJGO5D.js";import{b as $}from"./chunk-WSUYEVSY.js";async function _(g,t,e,r,o="absolute"){let s=new AbortController,n=!1,i,l=()=>{n=!0;let a=r();i?.(a),s.abort(a)},p=setTimeout(l,e),h=()=>{o==="idle"&&(clearTimeout(p),p=setTimeout(l,e),p.unref?.())};p.unref?.();try{let a=await fetch(g,{...t,signal:s.signal});if(!a.body)return clearTimeout(p),a;h();let u=a.body.getReader(),d=!1,m=()=>{d=!0,clearTimeout(p)},y=new ReadableStream({start(f){i=v=>{d||(m(),f.error(v),u.cancel(v).catch(()=>{}).finally(()=>u.releaseLock()))}},async pull(f){try{let v=await u.read();if(d)return;v.done?(m(),u.releaseLock(),f.close()):(h(),f.enqueue(v.value))}catch(v){if(d)return;m(),u.releaseLock(),f.error(v)}},async cancel(f){if(!d){m();try{await u.cancel(f)}finally{u.releaseLock()}}}},{highWaterMark:0}),b=new Response(y,{status:a.status,statusText:a.statusText,headers:a.headers});for(let f of["url","redirected","type"])Object.defineProperty(b,f,{value:a[f]});return b}catch(a){throw clearTimeout(p),n||a instanceof Error&&a.name==="AbortError"?r():a}}var O=$(()=>{"use strict"});import{readFileSync as Ve}from"fs";import*as Ie from"path";function J(g){return typeof g=="string"&&Ye.includes(g)}function Xe(g){try{let e=Ve(g,"utf8").match(/^\s*effort_level\s*:\s*['"]?([a-z]+)['"]?\s*$/m);return e&&J(e[1])?e[1]:null}catch{return null}}function Se(g={}){if(g.override&&J(g.override))return g.override;if(g.agentEffort&&J(g.agentEffort))return g.agentEffort;let e=(g.env??process.env).QE_EFFORT_LEVEL;if(e&&J(e))return e;let r=g.fleetDefaultsPath??Ie.join(process.cwd(),"config","fleet-defaults.yaml");return Y===void 0&&(Y=Xe(r)),Y||Je}var Ye,Je,Y,xe=$(()=>{"use strict";Ye=["low","medium","high","xhigh","max"],Je="xhigh"});function Qe(g){try{let t=z(g);return{sendSampling:t.supportsSamplingParams!==!1,supportsEffort:t.supportsEffortXHigh===!0}}catch{return{sendSampling:!1,supportsEffort:!1}}}function X(g,t,e){let r=Qe(t);if(r.sendSampling&&e.temperature!==void 0&&(g.temperature=e.temperature),r.supportsEffort){let o=e.effort??(Ze(t)?Se():void 0);o!==void 0&&(g.output_config={effort:o})}return g}function Ze(g){return Ce(g)?.tier==="flagship"}var be=$(()=>{"use strict";H();xe()});function gt(g){try{let t=z(g);return{sendSampling:t.supportsSamplingParams!==!1,maxTokensField:t.usesMaxCompletionTokens===!0?"max_completion_tokens":"max_tokens"}}catch{return dt.test(g)?{...ht}:{...mt}}}function D(g,t,e){let r=gt(t),o=g;return e.maxTokens!==void 0&&(o[r.maxTokensField]=e.maxTokens),r.sendSampling&&e.temperature!==void 0&&(o.temperature=e.temperature),g}var dt,mt,ht,ve=$(()=>{"use strict";H();dt=/^(openai\/)?(gpt-5|gpt-6|o\d)/i,mt={sendSampling:!0,maxTokensField:"max_tokens"},ht={sendSampling:!1,maxTokensField:"max_completion_tokens"}});Fe();P();var Le={failureThreshold:5,resetTimeoutMs:3e4,halfOpenSuccessThreshold:2,failureWindowMs:6e4,includeTimeouts:!0},he=class{state="closed";failures=[];successCount=0;totalRequests=0;totalSuccesses=0;totalFailures=0;rejectedCount=0;lastFailureTime;lastSuccessTime;openedAt;halfOpenSuccesses=0;config;providerType;constructor(t,e={}){this.providerType=t,this.config={...Le,...e}}getState(){return this.state==="open"&&this.openedAt&&Date.now()-this.openedAt.getTime()>=this.config.resetTimeoutMs&&this.transitionTo("half-open"),this.state}canExecute(){let t=this.getState();return t==="closed"?!0:t!=="open"}async execute(t){if(this.totalRequests++,this.getState()==="open")throw this.rejectedCount++,c(`Circuit breaker is open for provider ${this.providerType}`,"CIRCUIT_OPEN",{provider:this.providerType,retryable:!0,retryAfterMs:this.getTimeUntilTransition()});try{let r=await t();return this.recordSuccess(),r}catch(r){throw this.recordFailure(C(r)),r}}recordSuccess(){this.successCount++,this.totalSuccesses++,this.lastSuccessTime=new Date,this.getState()==="half-open"&&(this.halfOpenSuccesses++,this.halfOpenSuccesses>=this.config.halfOpenSuccessThreshold&&this.transitionTo("closed"))}recordFailure(t){if(this.totalFailures++,this.lastFailureTime=new Date,(t.message.toLowerCase().includes("timeout")||t.name==="TimeoutError"||t.name==="AbortError")&&!this.config.includeTimeouts)return;this.failures.push({timestamp:new Date,error:t}),this.cleanOldFailures();let r=this.getState();if(r==="half-open"){this.transitionTo("open");return}r==="closed"&&this.failures.length>=this.config.failureThreshold&&this.transitionTo("open")}getStats(){return{state:this.getState(),totalRequests:this.totalRequests,successCount:this.totalSuccesses,failureCount:this.totalFailures,rejectedCount:this.rejectedCount,lastFailureTime:this.lastFailureTime,lastSuccessTime:this.lastSuccessTime,timeUntilTransitionMs:this.getTimeUntilTransition()}}reset(){this.state="closed",this.failures=[],this.successCount=0,this.halfOpenSuccesses=0,this.openedAt=void 0}forceOpen(){this.transitionTo("open")}forceHalfOpen(){this.transitionTo("half-open")}getRecentFailures(t=5){return this.failures.slice(-t).map(e=>`[${e.timestamp.toISOString()}] ${e.error.message}`)}transitionTo(t){if(this.state!==t)switch(this.state=t,t){case"open":this.openedAt=new Date,this.halfOpenSuccesses=0;break;case"half-open":this.halfOpenSuccesses=0;break;case"closed":this.failures=[],this.openedAt=void 0,this.halfOpenSuccesses=0;break}}cleanOldFailures(){let t=Date.now()-this.config.failureWindowMs;this.failures=this.failures.filter(e=>e.timestamp.getTime()>t)}getTimeUntilTransition(){if(this.state==="open"&&this.openedAt){let t=Date.now()-this.openedAt.getTime(),e=this.config.resetTimeoutMs-t;return Math.max(0,e)}}},j=class{breakers=new Map;defaultConfig;constructor(t={}){this.defaultConfig={...Le,...t}}getBreaker(t,e){let r=this.breakers.get(t);return r||(r=new he(t,{...this.defaultConfig,...e}),this.breakers.set(t,r)),r}getAllStats(){let t={};for(let[e,r]of this.breakers)t[e]=r.getStats();return t}getAvailableProviders(){let t=[];for(let[e,r]of this.breakers)r.canExecute()&&t.push(e);return t}resetAll(){for(let t of this.breakers.values())t.reset()}reset(t){let e=this.breakers.get(t);e&&e.reset()}};import{createHash as We}from"node:crypto";var Pe={maxSize:1e3,defaultTtlMs:36e5,enableLRU:!0,cacheGenerations:!0,cacheEmbeddings:!0,cacheCompletions:!0},A=class{cache=new Map;accessOrder=[];config;hits=0;misses=0;evictions=0;constructor(t={}){this.config={...Pe,...t}}static generateKey(t,e,r){let o=[t,r?.model??"default",String(r?.temperature??.7),String(r?.maxTokens??0),r?.systemPrompt??"",e],s=[r?.stopSequences,r?.effort,r?.preferredProvider];s.some(i=>i!==void 0)&&o.push(JSON.stringify(s));let n=We("sha256").update(JSON.stringify(o)).digest("hex");return`${t}:${n}`}get(t){let e=this.cache.get(t);if(!e){this.misses++;return}if(e.ttlMs>0&&Date.now()-e.createdAt.getTime()>e.ttlMs){this.delete(t),this.misses++;return}return this.hits++,e.lastAccessedAt=new Date,e.accessCount++,this.config.enableLRU&&this.updateAccessOrder(t),e.value}set(t,e,r){this.cache.size>=this.config.maxSize&&!this.cache.has(t)&&this.evictLRU();let o={value:e,createdAt:new Date,lastAccessedAt:new Date,accessCount:1,ttlMs:r??this.config.defaultTtlMs,keyHash:t};this.cache.set(t,o),this.config.enableLRU&&this.updateAccessOrder(t)}has(t){let e=this.cache.get(t);return e?e.ttlMs>0&&Date.now()-e.createdAt.getTime()>e.ttlMs?(this.delete(t),!1):!0:!1}delete(t){let e=this.cache.delete(t);if(e){let r=this.accessOrder.indexOf(t);r!==-1&&this.accessOrder.splice(r,1)}return e}clear(){this.cache.clear(),this.accessOrder=[],this.hits=0,this.misses=0,this.evictions=0}getStats(){let t=this.hits+this.misses,e=t>0?this.hits/t:0,r=0;for(let o of this.cache.values())r+=this.estimateSize(o.value);return{size:this.cache.size,maxSize:this.config.maxSize,hits:this.hits,misses:this.misses,hitRate:e,evictions:this.evictions,memoryUsageBytes:r}}keys(){return Array.from(this.cache.keys())}entries(){return Array.from(this.cache.entries())}import(t){for(let[e,r]of t)r.createdAt=new Date(r.createdAt),r.lastAccessedAt=new Date(r.lastAccessedAt),this.cache.set(e,r),this.config.enableLRU&&this.updateAccessOrder(e);for(;this.cache.size>this.config.maxSize;)this.evictLRU()}pruneExpired(){let t=Date.now(),e=0;for(let[r,o]of this.cache.entries())o.ttlMs>0&&t-o.createdAt.getTime()>o.ttlMs&&(this.delete(r),e++);return e}updateAccessOrder(t){let e=this.accessOrder.indexOf(t);e!==-1&&this.accessOrder.splice(e,1),this.accessOrder.push(t)}evictLRU(){if(this.accessOrder.length===0){let e=this.cache.keys().next().value;e!==void 0&&(this.cache.delete(e),this.evictions++);return}let t=this.accessOrder.shift();t!==void 0&&(this.cache.delete(t),this.evictions++)}estimateSize(t){return t==null?0:JSON.stringify(t).length*2}},V=class{generationCache;embeddingCache;completionCache;config;constructor(t={}){this.config={...Pe,...t},this.generationCache=new A(t),this.embeddingCache=new A(t),this.completionCache=new A(t)}getGeneration(t,e){if(!this.config.cacheGenerations)return;let r=A.generateKey("generation",t,e);return this.generationCache.get(r)}setGeneration(t,e,r,o){if(!this.config.cacheGenerations)return;let s=A.generateKey("generation",t,r);this.generationCache.set(s,e,o)}getEmbedding(t,e){if(!this.config.cacheEmbeddings)return;let r=A.generateKey("embedding",t,e);return this.embeddingCache.get(r)}setEmbedding(t,e,r,o){if(!this.config.cacheEmbeddings)return;let s=A.generateKey("embedding",t,r);this.embeddingCache.set(s,e,o)}getCompletion(t,e){if(!this.config.cacheCompletions)return;let r=A.generateKey("completion",t,e);return this.completionCache.get(r)}setCompletion(t,e,r,o){if(!this.config.cacheCompletions)return;let s=A.generateKey("completion",t,r);this.completionCache.set(s,e,o)}getStats(){let t=this.generationCache.getStats(),e=this.embeddingCache.getStats(),r=this.completionCache.getStats(),o=t.hits+e.hits+r.hits,s=t.misses+e.misses+r.misses,n=o+s;return{generation:t,embedding:e,completion:r,total:{size:t.size+e.size+r.size,maxSize:this.config.maxSize*3,hits:o,misses:s,hitRate:n>0?o/n:0,evictions:t.evictions+e.evictions+r.evictions,memoryUsageBytes:t.memoryUsageBytes+e.memoryUsageBytes+r.memoryUsageBytes}}}clear(){this.generationCache.clear(),this.embeddingCache.clear(),this.completionCache.clear()}pruneExpired(){return this.generationCache.pruneExpired()+this.embeddingCache.pruneExpired()+this.completionCache.pruneExpired()}};x();Ge();var ge="(unattributed)",ze=`
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.4");process.exit(0)}
|
|
2
|
+
import{b as k}from"./chunk-T3BMCEQR.js";import{a as we,c as Ae}from"./chunk-YQ6BK7QC.js";import{b as c,g as Me}from"./chunk-EGHK6NMH.js";import{a as me,b as $e}from"./chunk-SOSJFEFB.js";import{b as Re,c as R,d as _e,f as x}from"./chunk-IKWAPHJA.js";import{e as z,h as Ce,i as de,n as H}from"./chunk-ASKPTGUU.js";import{b as W,d as ke}from"./chunk-S5D3HCGN.js";import{a as pe,e as Ge}from"./chunk-6HTO4BLV.js";import{b as Ee,d as Fe}from"./chunk-W6TJXK5Y.js";import{b as C,e as P}from"./chunk-JL3TI43V.js";import{b as $}from"./chunk-5H7MR6HP.js";async function _(g,t,e,r,o="absolute"){let s=new AbortController,n=!1,i,l=()=>{n=!0;let a=r();i?.(a),s.abort(a)},p=setTimeout(l,e),h=()=>{o==="idle"&&(clearTimeout(p),p=setTimeout(l,e),p.unref?.())};p.unref?.();try{let a=await fetch(g,{...t,signal:s.signal});if(!a.body)return clearTimeout(p),a;h();let u=a.body.getReader(),d=!1,m=()=>{d=!0,clearTimeout(p)},y=new ReadableStream({start(f){i=v=>{d||(m(),f.error(v),u.cancel(v).catch(()=>{}).finally(()=>u.releaseLock()))}},async pull(f){try{let v=await u.read();if(d)return;v.done?(m(),u.releaseLock(),f.close()):(h(),f.enqueue(v.value))}catch(v){if(d)return;m(),u.releaseLock(),f.error(v)}},async cancel(f){if(!d){m();try{await u.cancel(f)}finally{u.releaseLock()}}}},{highWaterMark:0}),b=new Response(y,{status:a.status,statusText:a.statusText,headers:a.headers});for(let f of["url","redirected","type"])Object.defineProperty(b,f,{value:a[f]});return b}catch(a){throw clearTimeout(p),n||a instanceof Error&&a.name==="AbortError"?r():a}}var O=$(()=>{"use strict"});import{readFileSync as Ve}from"fs";import*as Ie from"path";function J(g){return typeof g=="string"&&Ye.includes(g)}function Xe(g){try{let e=Ve(g,"utf8").match(/^\s*effort_level\s*:\s*['"]?([a-z]+)['"]?\s*$/m);return e&&J(e[1])?e[1]:null}catch{return null}}function Se(g={}){if(g.override&&J(g.override))return g.override;if(g.agentEffort&&J(g.agentEffort))return g.agentEffort;let e=(g.env??process.env).QE_EFFORT_LEVEL;if(e&&J(e))return e;let r=g.fleetDefaultsPath??Ie.join(process.cwd(),"config","fleet-defaults.yaml");return Y===void 0&&(Y=Xe(r)),Y||Je}var Ye,Je,Y,xe=$(()=>{"use strict";Ye=["low","medium","high","xhigh","max"],Je="xhigh"});function Qe(g){try{let t=z(g);return{sendSampling:t.supportsSamplingParams!==!1,supportsEffort:t.supportsEffortXHigh===!0}}catch{return{sendSampling:!1,supportsEffort:!1}}}function X(g,t,e){let r=Qe(t);if(r.sendSampling&&e.temperature!==void 0&&(g.temperature=e.temperature),r.supportsEffort){let o=e.effort??(Ze(t)?Se():void 0);o!==void 0&&(g.output_config={effort:o})}return g}function Ze(g){return Ce(g)?.tier==="flagship"}var be=$(()=>{"use strict";H();xe()});function gt(g){try{let t=z(g);return{sendSampling:t.supportsSamplingParams!==!1,maxTokensField:t.usesMaxCompletionTokens===!0?"max_completion_tokens":"max_tokens"}}catch{return dt.test(g)?{...ht}:{...mt}}}function D(g,t,e){let r=gt(t),o=g;return e.maxTokens!==void 0&&(o[r.maxTokensField]=e.maxTokens),r.sendSampling&&e.temperature!==void 0&&(o.temperature=e.temperature),g}var dt,mt,ht,ve=$(()=>{"use strict";H();dt=/^(openai\/)?(gpt-5|gpt-6|o\d)/i,mt={sendSampling:!0,maxTokensField:"max_tokens"},ht={sendSampling:!1,maxTokensField:"max_completion_tokens"}});Fe();P();var Le={failureThreshold:5,resetTimeoutMs:3e4,halfOpenSuccessThreshold:2,failureWindowMs:6e4,includeTimeouts:!0},he=class{state="closed";failures=[];successCount=0;totalRequests=0;totalSuccesses=0;totalFailures=0;rejectedCount=0;lastFailureTime;lastSuccessTime;openedAt;halfOpenSuccesses=0;config;providerType;constructor(t,e={}){this.providerType=t,this.config={...Le,...e}}getState(){return this.state==="open"&&this.openedAt&&Date.now()-this.openedAt.getTime()>=this.config.resetTimeoutMs&&this.transitionTo("half-open"),this.state}canExecute(){let t=this.getState();return t==="closed"?!0:t!=="open"}async execute(t){if(this.totalRequests++,this.getState()==="open")throw this.rejectedCount++,c(`Circuit breaker is open for provider ${this.providerType}`,"CIRCUIT_OPEN",{provider:this.providerType,retryable:!0,retryAfterMs:this.getTimeUntilTransition()});try{let r=await t();return this.recordSuccess(),r}catch(r){throw this.recordFailure(C(r)),r}}recordSuccess(){this.successCount++,this.totalSuccesses++,this.lastSuccessTime=new Date,this.getState()==="half-open"&&(this.halfOpenSuccesses++,this.halfOpenSuccesses>=this.config.halfOpenSuccessThreshold&&this.transitionTo("closed"))}recordFailure(t){if(this.totalFailures++,this.lastFailureTime=new Date,(t.message.toLowerCase().includes("timeout")||t.name==="TimeoutError"||t.name==="AbortError")&&!this.config.includeTimeouts)return;this.failures.push({timestamp:new Date,error:t}),this.cleanOldFailures();let r=this.getState();if(r==="half-open"){this.transitionTo("open");return}r==="closed"&&this.failures.length>=this.config.failureThreshold&&this.transitionTo("open")}getStats(){return{state:this.getState(),totalRequests:this.totalRequests,successCount:this.totalSuccesses,failureCount:this.totalFailures,rejectedCount:this.rejectedCount,lastFailureTime:this.lastFailureTime,lastSuccessTime:this.lastSuccessTime,timeUntilTransitionMs:this.getTimeUntilTransition()}}reset(){this.state="closed",this.failures=[],this.successCount=0,this.halfOpenSuccesses=0,this.openedAt=void 0}forceOpen(){this.transitionTo("open")}forceHalfOpen(){this.transitionTo("half-open")}getRecentFailures(t=5){return this.failures.slice(-t).map(e=>`[${e.timestamp.toISOString()}] ${e.error.message}`)}transitionTo(t){if(this.state!==t)switch(this.state=t,t){case"open":this.openedAt=new Date,this.halfOpenSuccesses=0;break;case"half-open":this.halfOpenSuccesses=0;break;case"closed":this.failures=[],this.openedAt=void 0,this.halfOpenSuccesses=0;break}}cleanOldFailures(){let t=Date.now()-this.config.failureWindowMs;this.failures=this.failures.filter(e=>e.timestamp.getTime()>t)}getTimeUntilTransition(){if(this.state==="open"&&this.openedAt){let t=Date.now()-this.openedAt.getTime(),e=this.config.resetTimeoutMs-t;return Math.max(0,e)}}},j=class{breakers=new Map;defaultConfig;constructor(t={}){this.defaultConfig={...Le,...t}}getBreaker(t,e){let r=this.breakers.get(t);return r||(r=new he(t,{...this.defaultConfig,...e}),this.breakers.set(t,r)),r}getAllStats(){let t={};for(let[e,r]of this.breakers)t[e]=r.getStats();return t}getAvailableProviders(){let t=[];for(let[e,r]of this.breakers)r.canExecute()&&t.push(e);return t}resetAll(){for(let t of this.breakers.values())t.reset()}reset(t){let e=this.breakers.get(t);e&&e.reset()}};import{createHash as We}from"node:crypto";var Pe={maxSize:1e3,defaultTtlMs:36e5,enableLRU:!0,cacheGenerations:!0,cacheEmbeddings:!0,cacheCompletions:!0},A=class{cache=new Map;accessOrder=[];config;hits=0;misses=0;evictions=0;constructor(t={}){this.config={...Pe,...t}}static generateKey(t,e,r){let o=[t,r?.model??"default",String(r?.temperature??.7),String(r?.maxTokens??0),r?.systemPrompt??"",e],s=[r?.stopSequences,r?.effort,r?.preferredProvider];s.some(i=>i!==void 0)&&o.push(JSON.stringify(s));let n=We("sha256").update(JSON.stringify(o)).digest("hex");return`${t}:${n}`}get(t){let e=this.cache.get(t);if(!e){this.misses++;return}if(e.ttlMs>0&&Date.now()-e.createdAt.getTime()>e.ttlMs){this.delete(t),this.misses++;return}return this.hits++,e.lastAccessedAt=new Date,e.accessCount++,this.config.enableLRU&&this.updateAccessOrder(t),e.value}set(t,e,r){this.cache.size>=this.config.maxSize&&!this.cache.has(t)&&this.evictLRU();let o={value:e,createdAt:new Date,lastAccessedAt:new Date,accessCount:1,ttlMs:r??this.config.defaultTtlMs,keyHash:t};this.cache.set(t,o),this.config.enableLRU&&this.updateAccessOrder(t)}has(t){let e=this.cache.get(t);return e?e.ttlMs>0&&Date.now()-e.createdAt.getTime()>e.ttlMs?(this.delete(t),!1):!0:!1}delete(t){let e=this.cache.delete(t);if(e){let r=this.accessOrder.indexOf(t);r!==-1&&this.accessOrder.splice(r,1)}return e}clear(){this.cache.clear(),this.accessOrder=[],this.hits=0,this.misses=0,this.evictions=0}getStats(){let t=this.hits+this.misses,e=t>0?this.hits/t:0,r=0;for(let o of this.cache.values())r+=this.estimateSize(o.value);return{size:this.cache.size,maxSize:this.config.maxSize,hits:this.hits,misses:this.misses,hitRate:e,evictions:this.evictions,memoryUsageBytes:r}}keys(){return Array.from(this.cache.keys())}entries(){return Array.from(this.cache.entries())}import(t){for(let[e,r]of t)r.createdAt=new Date(r.createdAt),r.lastAccessedAt=new Date(r.lastAccessedAt),this.cache.set(e,r),this.config.enableLRU&&this.updateAccessOrder(e);for(;this.cache.size>this.config.maxSize;)this.evictLRU()}pruneExpired(){let t=Date.now(),e=0;for(let[r,o]of this.cache.entries())o.ttlMs>0&&t-o.createdAt.getTime()>o.ttlMs&&(this.delete(r),e++);return e}updateAccessOrder(t){let e=this.accessOrder.indexOf(t);e!==-1&&this.accessOrder.splice(e,1),this.accessOrder.push(t)}evictLRU(){if(this.accessOrder.length===0){let e=this.cache.keys().next().value;e!==void 0&&(this.cache.delete(e),this.evictions++);return}let t=this.accessOrder.shift();t!==void 0&&(this.cache.delete(t),this.evictions++)}estimateSize(t){return t==null?0:JSON.stringify(t).length*2}},V=class{generationCache;embeddingCache;completionCache;config;constructor(t={}){this.config={...Pe,...t},this.generationCache=new A(t),this.embeddingCache=new A(t),this.completionCache=new A(t)}getGeneration(t,e){if(!this.config.cacheGenerations)return;let r=A.generateKey("generation",t,e);return this.generationCache.get(r)}setGeneration(t,e,r,o){if(!this.config.cacheGenerations||e.finishReason==="content_filter")return;let s=A.generateKey("generation",t,r);this.generationCache.set(s,e,o)}getEmbedding(t,e){if(!this.config.cacheEmbeddings)return;let r=A.generateKey("embedding",t,e);return this.embeddingCache.get(r)}setEmbedding(t,e,r,o){if(!this.config.cacheEmbeddings)return;let s=A.generateKey("embedding",t,r);this.embeddingCache.set(s,e,o)}getCompletion(t,e){if(!this.config.cacheCompletions)return;let r=A.generateKey("completion",t,e);return this.completionCache.get(r)}setCompletion(t,e,r,o){if(!this.config.cacheCompletions)return;let s=A.generateKey("completion",t,r);this.completionCache.set(s,e,o)}getStats(){let t=this.generationCache.getStats(),e=this.embeddingCache.getStats(),r=this.completionCache.getStats(),o=t.hits+e.hits+r.hits,s=t.misses+e.misses+r.misses,n=o+s;return{generation:t,embedding:e,completion:r,total:{size:t.size+e.size+r.size,maxSize:this.config.maxSize*3,hits:o,misses:s,hitRate:n>0?o/n:0,evictions:t.evictions+e.evictions+r.evictions,memoryUsageBytes:t.memoryUsageBytes+e.memoryUsageBytes+r.memoryUsageBytes}}}clear(){this.generationCache.clear(),this.embeddingCache.clear(),this.completionCache.clear()}pruneExpired(){return this.generationCache.pruneExpired()+this.embeddingCache.pruneExpired()+this.completionCache.pruneExpired()}};x();Ge();var ge="(unattributed)",ze=`
|
|
3
3
|
CREATE TABLE IF NOT EXISTS llm_spend (
|
|
4
4
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
5
5
|
ts INTEGER NOT NULL,
|
|
@@ -17,7 +17,7 @@ CREATE INDEX IF NOT EXISTS idx_llm_spend_ts ON llm_spend(ts);
|
|
|
17
17
|
VALUES (@ts, @provider, @model, @cost_usd, @cost_source, @prompt_tokens, @completion_tokens, @request_id, @agent_type)`).run({ts:Date.now(),provider:t.provider,model:t.model,cost_usd:t.costUsd,cost_source:t.costSource,prompt_tokens:t.promptTokens,completion_tokens:t.completionTokens,request_id:t.requestId,agent_type:t.agent??null}):this.db.prepare(`INSERT INTO llm_spend
|
|
18
18
|
(ts, provider, model, cost_usd, cost_source, prompt_tokens, completion_tokens, request_id)
|
|
19
19
|
VALUES (@ts, @provider, @model, @cost_usd, @cost_source, @prompt_tokens, @completion_tokens, @request_id)`).run({ts:Date.now(),provider:t.provider,model:t.model,cost_usd:t.costUsd,cost_source:t.costSource,prompt_tokens:t.promptTokens,completion_tokens:t.completionTokens,request_id:t.requestId})}catch{}}spentSince(t,e=Date.now()){try{return this.db.prepare("SELECT COALESCE(SUM(cost_usd), 0) AS total FROM llm_spend WHERE ts >= ?").get(e-t)?.total??0}catch{return 0}}spentByAgentSince(t,e=Date.now()){try{let r=this.db.prepare(`SELECT COALESCE(agent_type, ?) AS agent, COALESCE(SUM(cost_usd), 0) AS total
|
|
20
|
-
FROM llm_spend WHERE ts >= ? GROUP BY COALESCE(agent_type, ?)`).all(ge,e-t,ge),o=pe();for(let s of r)o[s.agent]=s.total;return o}catch{return{}}}},B=class{entries=[];record(t){this.entries.push({ts:Date.now(),costUsd:t.costUsd,agent:t.agent??ge})}spentSince(t,e=Date.now()){let r=e-t,o=0;for(let s of this.entries)s.ts>=r&&(o+=s.costUsd);return o}spentByAgentSince(t,e=Date.now()){let r=e-t,o=pe();for(let s of this.entries)s.ts>=r&&(o[s.agent]=(o[s.agent]??0)+s.costUsd);return o}};async function Oe(){try{let t=(await import("./unified-memory-
|
|
20
|
+
FROM llm_spend WHERE ts >= ? GROUP BY COALESCE(agent_type, ?)`).all(ge,e-t,ge),o=pe();for(let s of r)o[s.agent]=s.total;return o}catch{return{}}}},B=class{entries=[];record(t){this.entries.push({ts:Date.now(),costUsd:t.costUsd,agent:t.agent??ge})}spentSince(t,e=Date.now()){let r=e-t,o=0;for(let s of this.entries)s.ts>=r&&(o+=s.costUsd);return o}spentByAgentSince(t,e=Date.now()){let r=e-t,o=pe();for(let s of this.entries)s.ts>=r&&(o[s.agent]=(o[s.agent]??0)+s.costUsd);return o}};async function Oe(){try{let t=(await import("./unified-memory-F5IJY7W7.js")).getUnifiedMemory();return t.isInitialized()||await t.initialize(),new fe(t.getDatabase())}catch{return new B}}x();P();P();function ye(g,t,e,r){let o=Math.min(t*Math.pow(2,g),e),s=Math.random()*r*o;return o+s}var He=1e3,je=3e4;function E(g,t=He,e=je){return ye(g,t,e,0)}O();be();H();var et={model:de,maxTokens:4096,temperature:.7,timeoutMs:6e4,maxRetries:3,anthropicVersion:"2023-06-01",enableCache:!0,enableCircuitBreaker:!0},Q=class{type="claude";name="Anthropic Claude";config;requestId=0;constructor(t={}){this.config={...et,...t}}async isAvailable(){if(!this.getApiKey())return!1;try{return(await this.healthCheck()).healthy}catch{return!1}}async healthCheck(){if(!this.getApiKey())return{healthy:!1,error:"API key not configured. Set ANTHROPIC_API_KEY environment variable."};let e=Date.now();try{let r=await this.fetchWithTimeout(`${this.getBaseUrl()}/v1/messages`,{method:"POST",headers:this.getHeaders(),body:JSON.stringify({model:this.config.model,max_tokens:1,messages:[{role:"user",content:"Hi"}]})},5e3),o=Date.now()-e;if(!r.ok){let s=await r.text();return{healthy:!1,latencyMs:o,error:`API error: ${r.status} - ${s}`}}return{healthy:!0,latencyMs:o,models:this.getSupportedModels(),details:{apiVersion:this.config.anthropicVersion,defaultModel:this.config.model}}}catch(r){return{healthy:!1,error:r instanceof Error?r.message:"Unknown error"}}}async generate(t,e){if(!this.getApiKey())throw c("Anthropic API key not configured","API_KEY_MISSING",{provider:"claude",retryable:!1});let o=this.formatMessages(t),s=e?.model??this.config.model,n=e?.maxTokens??this.config.maxTokens??4096,i=e?.temperature??this.config.temperature??.7,l=`claude-${++this.requestId}-${Date.now()}`,p=Date.now(),h={model:s,max_tokens:n,messages:o};X(h,s,{temperature:i,effort:e?.effort}),e?.systemPrompt&&(h.system=this.config.enableCache!==!1?[{type:"text",text:e.systemPrompt,cache_control:{type:"ephemeral"}}]:e.systemPrompt),e?.stopSequences&&e.stopSequences.length>0&&(h.stop_sequences=e.stopSequences);try{let a=await this.fetchWithRetry(`${this.getBaseUrl()}/v1/messages`,{method:"POST",headers:this.getHeaders(),body:JSON.stringify(h)},e?.timeoutMs??this.config.timeoutMs??6e4,this.config.maxRetries??3),u=Date.now()-p;if(!a.ok){let T=await a.json().catch(()=>({error:{message:"Unknown error"}}));throw this.handleApiError(a.status,T,s)}let d=await a.json(),m=d.usage.cache_creation_input_tokens??0,y=d.usage.cache_read_input_tokens??0,b={promptTokens:d.usage.input_tokens,completionTokens:d.usage.output_tokens,totalTokens:d.usage.input_tokens+m+y+d.usage.output_tokens,cacheCreationTokens:m,cacheReadTokens:y},f=R.calculateCost(s,b);return k.recordTokenUsage(l,"claude-provider","llm","generate",{inputTokens:d.usage.input_tokens,outputTokens:d.usage.output_tokens,totalTokens:d.usage.input_tokens+d.usage.output_tokens,estimatedCostUsd:f.totalCost}),{content:d.content.filter(T=>T.type==="text").map(T=>T.text).join(""),model:d.model,provider:"claude",usage:b,cost:f,latencyMs:u,finishReason:this.mapFinishReason(d.stop_reason),cached:!1,requestId:l}}catch(a){throw a instanceof Error&&"code"in a?a:c(a instanceof Error?a.message:"Request failed","NETWORK_ERROR",{provider:"claude",model:s,retryable:!0,cause:a})}}async embed(t,e){throw c("Claude does not support native embeddings. Use OpenAI or Ollama for embeddings.","MODEL_NOT_FOUND",{provider:"claude",retryable:!1})}async complete(t,e){let r=await this.generate(t,{model:e?.model,temperature:e?.temperature??.2,maxTokens:e?.maxTokens??256,stopSequences:e?.stopSequences??[`
|
|
21
21
|
|
|
22
22
|
`,"```"]});return{completion:r.content,model:r.model,provider:"claude",usage:r.usage,latencyMs:r.latencyMs,cached:r.cached}}getConfig(){return{...this.config}}getSupportedModels(){return["claude-opus-4-7","claude-sonnet-4-6","claude-haiku-4-5-20251001","claude-3-opus-20240229","claude-3-sonnet-20240229","claude-3-haiku-20240307"]}getCostPerToken(){return R.getCostPerToken(this.config.model)}async dispose(){}getApiKey(){return this.config.apiKey??process.env.ANTHROPIC_API_KEY}getBaseUrl(){return(this.config.baseUrl??process.env.ANTHROPIC_BASE_URL??"https://api.anthropic.com").replace(/\/$/,"")}getHeaders(){return{"Content-Type":"application/json","x-api-key":this.getApiKey(),"anthropic-version":this.config.anthropicVersion??"2023-06-01"}}formatMessages(t){return typeof t=="string"?[{role:"user",content:t}]:t.filter(e=>e.role!=="system").map(e=>({role:e.role,content:e.content}))}mapFinishReason(t){switch(t){case"end_turn":return"stop";case"max_tokens":return"length";case"stop_sequence":return"stop";default:return"stop"}}handleApiError(t,e,r){let o="error"in e?e.error?.message??"Unknown API error":"Unknown API error",s="error"in e&&"type"in e.error?e.error.type:"";switch(t){case 401:throw c(o,"API_KEY_INVALID",{provider:"claude",model:r,retryable:!1});case 429:throw c(o,"RATE_LIMITED",{provider:"claude",model:r,retryable:!0,retryAfterMs:6e4});case 400:throw s==="invalid_request_error"&&o.includes("context")?c(o,"CONTEXT_LENGTH_EXCEEDED",{provider:"claude",model:r,retryable:!1}):c(o,"UNKNOWN",{provider:"claude",model:r,retryable:!1});case 500:case 502:case 503:throw c(o,"PROVIDER_UNAVAILABLE",{provider:"claude",model:r,retryable:!0,retryAfterMs:5e3});default:throw c(o,"UNKNOWN",{provider:"claude",model:r,retryable:!1})}}async fetchWithTimeout(t,e,r){return _(t,e,r,()=>c("Request timed out","TIMEOUT",{provider:"claude",retryable:!0}))}async fetchWithRetry(t,e,r,o){let s;for(let n=0;n<o;n++)try{let i=await this.fetchWithTimeout(t,e,r);if(i.status>=400&&i.status<500&&i.status!==429)return i;if((i.status>=500||i.status===429)&&n<o-1){let l=E(n);await this.sleep(l);continue}return i}catch(i){if(s=C(i),n<o-1){let l=E(n);await this.sleep(l)}}throw s??new Error("Request failed after retries")}sleep(t){return new Promise(e=>setTimeout(e,t))}};import{spawn as tt}from"node:child_process";var rt=["ANTHROPIC_API_KEY","CLAUDE_API_KEY","ANTHROPIC_AUTH_TOKEN"],ot={model:"sonnet",maxTokens:4096,temperature:.7,timeoutMs:12e4,maxRetries:1,binaryPath:"claude",maxConcurrency:2,disallowedTools:["Bash","Edit","Write","NotebookEdit","WebFetch","WebSearch","Task"]},Z=class g{type="claude-code";name="Claude Code (subscription)";billingMode="subscription";config;requestId=0;availabilityCache;active=0;queue=[];constructor(t={}){this.config={...ot,...t};let e=Number.parseInt(process.env.AQE_CLAUDE_CODE_CONCURRENCY??"",10);Number.isFinite(e)&&e>0&&(this.config.maxConcurrency=e)}async isAvailable(){let t=Date.now();if(this.availabilityCache&&t-this.availabilityCache.at<6e4)return this.availabilityCache.available;let e=!1;try{let{code:r}=await this.runProcess(["--version"],void 0,5e3);e=r===0}catch{e=!1}return this.availabilityCache={at:t,available:e},e}async healthCheck(){let t=Date.now(),e=await this.isAvailable(),r=Date.now()-t;return e?{healthy:!0,latencyMs:r,models:this.getSupportedModels(),details:{binaryPath:this.config.binaryPath,billing:"subscription"}}:{healthy:!1,latencyMs:r,error:`Claude Code CLI ("${this.config.binaryPath}") not found or not runnable. Install Claude Code and log in with your Pro/Max account.`}}async generate(t,e){let r=this.toCliModel(e?.model??this.config.model),o=`claude-code-${++this.requestId}-${Date.now()}`,{prompt:s,systemPrompt:n}=this.flatten(t,e?.systemPrompt),i=["-p","--output-format","json","--model",r];n&&i.push("--append-system-prompt",n);let l=this.config.disallowedTools??[];l.length>0&&i.push("--disallowedTools",...l);let p=Date.now(),h=e?.timeoutMs??this.config.timeoutMs??12e4,{code:a,stdout:u,stderr:d}=await this.withConcurrency(()=>this.runProcess(i,s,h)),m=Date.now()-p;if(a!==0&&!u.trim())throw this.classifyError(d||`claude exited with code ${a}`,r);let y;try{y=JSON.parse(u)}catch{throw c(`Could not parse claude -p JSON output: ${u.slice(0,200)}`,"PROVIDER_UNAVAILABLE",{provider:"claude-code",model:r,retryable:!0})}if(y.is_error)throw this.classifyError(y.result??y.api_error_status??"claude error",r);let b=y.usage??{},f={promptTokens:b.input_tokens??0,completionTokens:b.output_tokens??0,totalTokens:(b.input_tokens??0)+(b.output_tokens??0),cacheCreationTokens:b.cache_creation_input_tokens??0,cacheReadTokens:b.cache_read_input_tokens??0},v=y.modelUsage&&Object.keys(y.modelUsage)[0]||r;return k.recordTokenUsage(o,"claude-code-provider","llm","generate",{inputTokens:f.promptTokens,outputTokens:f.completionTokens,totalTokens:f.totalTokens,estimatedCostUsd:0}),{content:y.result??"",model:v,provider:"claude-code",usage:f,cost:{inputCost:0,outputCost:0,totalCost:0,currency:"USD",source:"provider-receipt"},latencyMs:m,finishReason:this.mapFinishReason(y.stop_reason),cached:!1,requestId:o}}async embed(t,e){throw c("Claude Code provider does not support embeddings. Use openai, ollama, or cognitum.","MODEL_NOT_FOUND",{provider:"claude-code",retryable:!1})}async complete(t,e){let r=await this.generate(t,{model:e?.model,temperature:e?.temperature??.2,maxTokens:e?.maxTokens??256});return{completion:r.content,model:r.model,provider:"claude-code",usage:r.usage,latencyMs:r.latencyMs,cached:r.cached}}getConfig(){return{...this.config}}getSupportedModels(){return["opus","sonnet","haiku"]}getCostPerToken(){return{input:0,output:0}}async dispose(){}toCliModel(t){let e=t.toLowerCase();return e.includes("opus")?"opus":e.includes("haiku")?"haiku":e.includes("sonnet")?"sonnet":t}flatten(t,e){if(typeof t=="string")return{prompt:t,systemPrompt:e};let r=t.filter(s=>s.role==="system").map(s=>s.content);return e&&r.unshift(e),{prompt:t.filter(s=>s.role!=="system").map(s=>`${s.role==="assistant"?"Assistant":"User"}: ${s.content}`).join(`
|
|
23
23
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.
|
|
2
|
-
import{a as T,b as G}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.4");process.exit(0)}
|
|
2
|
+
import{a as T,b as G}from"./chunk-R47LNH5W.js";import{e as A,f as O,j as R,k as I,q as z}from"./chunk-ZKXZTIVF.js";import{b as S,e as q}from"./chunk-JL3TI43V.js";import{b as p}from"./chunk-5H7MR6HP.js";import{createRequire as N}from"node:module";import{execFileSync as k}from"node:child_process";import{existsSync as j}from"node:fs";import{dirname as J,join as V}from"node:path";function W(i=process.platform,e=process.execPath,t=j){return T("npm",i,e,t)??["npm",[]]}function B(){try{return x.resolve("vibium")}catch{try{return N(V(process.cwd(),"package.json")).resolve("vibium")}catch{}let[i,e]=W(),t=k(i,[...e,"root","-g"],{encoding:"utf8",timeout:5e3,stdio:["ignore","pipe","pipe"]}).trim();return x.resolve(V(t,"vibium"))}}function K(i){return typeof i?.browser?.start=="function"?i:typeof i?.default?.browser?.start=="function"?i.default:null}async function F(){let i;try{i=await import("vibium")}catch(t){if(t.code!=="ERR_MODULE_NOT_FOUND"&&t.code!=="MODULE_NOT_FOUND")throw t;let r;try{r=B()}catch(s){throw new Error(`Vibium is not installed; run ${l}`,{cause:s})}i=x(r)}let e=K(i);if(!e)throw new Error(`Unsupported Vibium API: the installed package exposes no browser.start() (neither as a named nor a default export); run ${l}`);return e}function P(){try{let i=V(J(B()),"..","bin","cli.js");return k(process.execPath,[i,"is-installed"],{timeout:5e3,stdio:"ignore"}),!0}catch{return!1}}var l,x,_=p(()=>{"use strict";G();l="aqe init --browser-engine (or npm install vibium@^26.8.21)",x=N(import.meta.url)});var M,U=p(()=>{"use strict";M={enabled:!0,headless:!0,timeout:3e4,retryAttempts:3,fallbackEnabled:!0,browserType:"chromium",viewport:{width:1280,height:720},userAgent:"",devtools:!1,slowMo:0,screenshotDir:".agentic-qe/screenshots"}});function X(i){return i instanceof o}function a(i,e="Unknown Vibium error"){return X(i)?i:i instanceof Error?new o(i.message||e,"UNKNOWN_ERROR",i):new o(typeof i=="string"?i:e,"UNKNOWN_ERROR")}var o,m,g,v,b,w,d,f,$=p(()=>{"use strict";o=class i extends Error{constructor(t,r,s){super(t);this.code=r;this.cause=s;this.name="VibiumError",Error.captureStackTrace&&Error.captureStackTrace(this,i),s?.stack&&(this.stack+=`
|
|
3
3
|
Caused by: ${s.stack}`)}code;cause},m=class extends o{constructor(e="Vibium MCP server is unavailable",t){super(e,"VIBIUM_UNAVAILABLE",t),this.name="VibiumUnavailableError"}},g=class extends o{constructor(e="Browser operation timed out",t){super(e,"VIBIUM_TIMEOUT",t),this.name="VibiumTimeoutError"}},v=class extends o{selector;constructor(e,t){super(`Element not found: ${e}`,"ELEMENT_NOT_FOUND",t),this.name="VibiumElementNotFoundError",this.selector=e}},b=class extends o{constructor(e="Failed to connect to browser",t){super(e,"CONNECTION_ERROR",t),this.name="VibiumConnectionError"}},w=class extends o{url;statusCode;constructor(e,t,r){let s=t?`Navigation failed: ${e} (HTTP ${t})`:`Navigation failed: ${e}`;super(s,"NAVIGATION_ERROR",r),this.name="VibiumNavigationError",this.url=e,this.statusCode=t}},d=class extends o{constructor(e="Failed to capture screenshot",t){super(e,"SCREENSHOT_ERROR",t),this.name="VibiumScreenshotError"}},f=class extends o{action;selector;constructor(e,t,r){super(`Failed to ${e} element: ${t}`,"INTERACTION_ERROR",r),this.name="VibiumInteractionError",this.action=e,this.selector=t}}});import{randomUUID as Y}from"crypto";async function C(){if(E!==null)return E;try{return E=(await F()).browser,D=!0,E}catch(i){return console.warn("[Vibium] Failed to load vibium package:",i),D=!1,null}}async function L(i,e,t){let r;for(let s=1;s<=e;s++)try{return await i()}catch(n){if(r=S(n),s<e){let u=Math.min(100*Math.pow(2,s-1),2e3);await new Promise(c=>setTimeout(c,u))}}throw new o(`${t} failed after ${e} attempts`,"RETRY_EXHAUSTED",r)}async function h(i,e){let t=Date.now();try{let r=await i();return I()&&console.log(`[Vibium] ${e}: ${Date.now()-t}ms`),r}catch(r){throw I()&&console.log(`[Vibium] ${e} failed: ${Date.now()-t}ms`,r),r}}var E,D,y,H,Q=p(()=>{_();U();$();q();z();E=null,D=!1;y=class{config;currentSession=null;lastHealthCheck=null;_initialized=!1;_available=null;vibeInstance=null;browserInstance=null;constructor(e={}){this.config={...M,...e}}async isAvailable(){if(!this.config.enabled)return!1;if(this._available!==null)return this._available;try{let e=await C();return this._available=e!==null&&P(),this._available}catch{return this._available=!1,!1}}async getHealth(){let e=new Date;if(!this.config.enabled)return{status:"unavailable",features:["fallback-only"],lastChecked:e,error:"Vibium is disabled by configuration",sessionActive:!1};try{await this.isAvailable()?this.lastHealthCheck={status:this.vibeInstance?"connected":"disconnected",browserType:this.config.browserType,features:["browser-launch","navigation","element-interaction","screenshots","script-evaluation","accessibility-testing"],latencyMs:10,lastChecked:e,sessionActive:this.vibeInstance!==null}:this.lastHealthCheck={status:"unavailable",features:["fallback-only"],lastChecked:e,error:`Vibium runtime or browser payload unavailable; run ${l}`,sessionActive:!1}}catch(t){this.lastHealthCheck={status:"error",features:["fallback-only"],lastChecked:e,error:t instanceof Error?t.message:"Unknown error",sessionActive:!1}}return this.lastHealthCheck}async getSession(){return this.currentSession}async launch(e){if(!A())return{success:!1,error:new m("Browser mode is disabled by feature flags")};let t=async()=>{let r=await C();if(!r)throw new m(`Vibium runtime unavailable; run ${l}`);let s=e?.headless??this.config.headless;if(!P())throw new m(`Vibium browser payload unavailable; run ${l}`);let n=await r.start({headless:s});try{this.vibeInstance=await n.page(),this.browserInstance=n}catch(c){throw await n.stop(),c}let u={id:this.generateSessionId(),browserType:this.config.browserType,launchedAt:new Date,status:"connected",viewport:e?.viewport??this.config.viewport,headless:s};return this.currentSession=u,u};try{return{success:!0,value:R()?await L(()=>h(t,"browser_launch"),this.config.retryAttempts,"browser_launch"):await h(t,"browser_launch")}}catch(r){return{success:!1,error:a(r,"Failed to launch browser")}}}async quit(){if(!this.vibeInstance)return{success:!1,error:new b("No active browser session")};let e=async()=>{this.vibeInstance&&(await this.browserInstance?.stop(),this.vibeInstance=null,this.browserInstance=null),this.currentSession=null};try{return await h(e,"browser_quit"),{success:!0,value:void 0}}catch(t){return{success:!1,error:a(t,"Failed to quit browser")}}}async navigate(e){this.ensureSession();let t=async()=>{let r=Date.now();await this.vibeInstance.go(e.url);let s="";try{s=await this.vibeInstance.evaluate("document.title")}catch{s="Unknown"}let n={url:e.url,statusCode:200,title:s,durationMs:Date.now()-r,success:!0};return this.currentSession&&(this.currentSession.currentUrl=e.url),n};try{return{success:!0,value:R()?await L(()=>h(t,"page_navigate"),this.config.retryAttempts,"page_navigate"):await h(t,"page_navigate")}}catch(r){return{success:!1,error:new w(e.url,void 0,r instanceof Error?r:void 0)}}}async getPageInfo(){this.ensureSession();try{let e=await this.vibeInstance.evaluate("window.location.href"),t=await this.vibeInstance.evaluate("document.title");return{success:!0,value:{url:e,title:t,viewport:this.config.viewport,loadState:"loaded"}}}catch(e){return{success:!1,error:a(e,"Failed to get page info")}}}async goBack(){this.ensureSession();try{return await this.vibeInstance.evaluate("window.history.back()"),{success:!0,value:void 0}}catch(e){return{success:!1,error:a(e,"Failed to go back")}}}async goForward(){this.ensureSession();try{return await this.vibeInstance.evaluate("window.history.forward()"),{success:!0,value:void 0}}catch(e){return{success:!1,error:a(e,"Failed to go forward")}}}async reload(){this.ensureSession();try{return await this.vibeInstance.evaluate("window.location.reload()"),{success:!0,value:void 0}}catch(e){return{success:!1,error:a(e,"Failed to reload page")}}}async findElement(e){this.ensureSession();try{let t=await this.vibeInstance.find(e.selector,{timeout:e.timeout??this.config.timeout});return{success:!0,value:{selector:e.selector,tagName:t.info.tag,textContent:t.info.text,attributes:{},boundingBox:t.info.box,visible:!0,enabled:!0}}}catch(t){return{success:!1,error:new v(e.selector,t instanceof Error?t:void 0)}}}async findElements(e){this.ensureSession();try{let t=e.selector.replace(/\\/g,"\\\\").replace(/'/g,"\\'");return{success:!0,value:(await this.vibeInstance.evaluate(`
|
|
4
4
|
Array.from(document.querySelectorAll('${t}'))
|
|
5
5
|
.map(el => ({
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.
|
|
2
|
-
import{a as C,f as x}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.4");process.exit(0)}
|
|
2
|
+
import{a as C,f as x}from"./chunk-PMXWDTDK.js";import{a as h}from"./chunk-OHH6BUZK.js";var d={mechanical:["convert var to const","add types","remove console","convert to async","convert to esm","arrow function","rename variable","format code"],simple:["fix typo","update comment","fix simple bug","add documentation","format","rename","simple refactor","basic test"],moderate:["implement feature","implement","refactor","complex refactor","performance optimization","optimize","test generation","generate test","error handling","validation logic","api integration","code index","coverage analysis","quality assessment","defect prediction","predict defect","analyze coverage","analyze","assess","scan","detect"],complex:["multi-file refactor","orchestrate","coordinate","large codebase","migration","cross-domain","workflow","system design","analyze security","security scan","security analysis","vulnerability scan","chaos test","resilience test","contract validation"],critical:["architecture","security audit","critical bug","algorithm design","system-wide","vulnerability","cryptography","performance critical","hardcoded secret","cve","owasp","penetration test","exploit"]},f={architecture:/\b(architect|design|system design|overall structure|component design)\b/i,security:/\b(security|vulnerability|audit|xss|sql injection|csrf|encryption|auth|authentication|authorization)\b/i,multiStep:/\b(orchestrate|coordinate|workflow|pipeline|multi[- ]step)\b/i,crossDomain:/\b(cross[- ]domain|across (domains|modules)|integrate|coordination)\b/i},m=class{config;agentBoosterAdapter;constructor(e,t){this.config=e,this.agentBoosterAdapter=t}async collectSignals(e){let t=e.task.toLowerCase(),r=await this.checkAgentBoosterEligibility(e),o={simple:this.findKeywordMatches(t,d.simple),moderate:this.findKeywordMatches(t,d.moderate),complex:this.findKeywordMatches(t,d.complex),critical:this.findKeywordMatches(t,d.critical)},c=e.codeContext?e.codeContext.split(`
|
|
3
3
|
`).length:void 0,n=e.filePaths?e.filePaths.length:void 0,i=f.architecture.test(t),a=f.security.test(t),l=f.multiStep.test(t),g=f.crossDomain.test(t),b=this.detectCreativityRequirement(t),S=this.estimateLanguageComplexity(e.codeContext,e.filePaths),T=e.codeContext?this.estimateCyclomaticComplexity(e.codeContext):void 0;return{linesOfCode:c,fileCount:n,hasArchitectureScope:i,hasSecurityScope:a,requiresMultiStepReasoning:l,requiresCrossDomainCoordination:g,isMechanicalTransform:r.eligible,languageComplexity:S,cyclomaticComplexity:T,dependencyCount:this.countDependencies(e.codeContext),requiresCreativity:b,detectedTransformType:r.transformType,keywordMatches:o}}async checkAgentBoosterEligibility(e){if(!this.config.enableAgentBooster)return{eligible:!1,confidence:0,reason:"Agent Booster is disabled"};let t=e.task.toLowerCase(),r,o=0;for(let n of h){let i=this.getTransformKeywords(n),a=0;for(let l of i)t.includes(l.toLowerCase())&&(a=a===0?.5:a+.25);for(let l of d.mechanical)t.includes(l.toLowerCase())&&(a=Math.max(a,.6));a>o&&(o=a,r=n)}if(e.codeContext&&r&&this.agentBoosterAdapter)try{let i=(await this.agentBoosterAdapter.detectTransformOpportunities(e.codeContext)).opportunities.find(a=>a.type===r);if(i)return{eligible:i.confidence>=this.config.agentBoosterThreshold,transformType:r,confidence:i.confidence,reason:i.reason}}catch(n){console.debug("[SignalCollector] WASM analysis error:",n instanceof Error?n.message:n)}let c=o>=this.config.agentBoosterThreshold&&r!==void 0;return{eligible:c,transformType:r,confidence:Math.min(o,1),reason:c?`Detected ${r} transform pattern`:"No mechanical transform pattern detected"}}findKeywordMatches(e,t){let r=[];for(let o of t)e.includes(o.toLowerCase())&&r.push(o);return r}detectCreativityRequirement(e){return e.includes("design")||e.includes("creative")||e.includes("innovative")||e.includes("novel")}estimateLanguageComplexity(e,t){if(!e&&(!t||t.length===0))return;let r=[".ts",".tsx",".rs",".cpp",".c",".go"],o=[".js",".jsx",".py",".java"],c=[".json",".yaml",".md",".txt",".css",".html"];if(t){for(let n of t)if(r.some(i=>n.endsWith(i)))return"high";for(let n of t)if(o.some(i=>n.endsWith(i)))return"medium";for(let n of t)if(c.some(i=>n.endsWith(i)))return"low"}if(e){let n=/<[A-Z][^>]*>/.test(e),i=/\b(async|await)\b/.test(e),a=/\b(interface|type|class)\b/.test(e);return n&&a?"high":i||a?"medium":"low"}return"medium"}estimateCyclomaticComplexity(e){let t=[/\bif\b/g,/\bfor\b/g,/\bwhile\b/g,/\bcase\b/g,/\bcatch\b/g,/&&/g,/\|\|/g,/\?/g],r=1;for(let o of t){let c=e.match(o);c&&(r+=c.length)}return r}countDependencies(e){if(!e)return;let t=e.match(/\b(import|require|from)\b.*['"].*['"]/g);return t?t.length:0}getTransformKeywords(e){return{"var-to-const":["var to const","convert var","var declaration","var to let","convert var to const","change var to const"],"add-types":["add types","add type","typescript types","type annotations","type annotation","add type annotations"],"remove-console":["remove console","delete console","console.log","remove console.log","strip console"],"promise-to-async":["promise to async","async await",".then to async","convert to async","convert function to async"],"cjs-to-esm":["commonjs to esm","require to import","convert to esm","cjs to esm","module conversion"],"func-to-arrow":["arrow function","function to arrow","convert to arrow","convert function to arrow"]}[e]||[]}};function v(s,e){return new m(s,e)}var u=class{calculateCodeComplexity(e){let t=0;return t+=this.calculateLinesOfCodeContribution(e.linesOfCode),t+=this.calculateFileCountContribution(e.fileCount),t+=this.calculateCyclomaticContribution(e.cyclomaticComplexity),t+=this.calculateLanguageContribution(e.languageComplexity),Math.min(t,100)}calculateReasoningComplexity(e){let t=0;return t+=this.calculateKeywordScore(e.keywordMatches),e.requiresMultiStepReasoning&&(t+=20),e.requiresCreativity&&(t+=20),Math.min(t,100)}calculateScopeComplexity(e){let t=0;return e.hasArchitectureScope&&(t+=40),e.hasSecurityScope&&(t+=30),e.requiresCrossDomainCoordination&&(t+=20),t+=this.calculateDependencyContribution(e.dependencyCount),Math.min(t,100)}calculateOverallComplexity(e,t,r,o){if(o.isMechanicalTransform&&!o.hasSecurityScope&&!o.hasArchitectureScope&&!o.requiresMultiStepReasoning&&!o.requiresCrossDomainCoordination&&e===0&&t===0&&r===0)return 5;let c=e*.3+t*.4+r*.3,n=0;return o.hasSecurityScope&&(n=Math.max(n,50)),o.hasArchitectureScope&&(n=Math.max(n,55)),o.requiresCrossDomainCoordination&&(n=Math.max(n,35)),o.requiresMultiStepReasoning&&(n=Math.max(n,30)),o.keywordMatches.simple.length+o.keywordMatches.moderate.length+o.keywordMatches.complex.length+o.keywordMatches.critical.length===0&&!o.isMechanicalTransform&&c<15&&(n=Math.max(n,15)),Math.min(Math.max(Math.round(c),n),100)}calculateConfidence(e,t){let r=.5;return t.codeContext&&(r+=.2),t.filePaths&&t.filePaths.length>0&&(r+=.1),r+=this.calculateKeywordConfidenceBoost(e.keywordMatches),e.isMechanicalTransform&&(r+=.15),Math.min(r,1)}calculateLinesOfCodeContribution(e){return e===void 0||e<10?0:e<50?10:e<200?20:30}calculateFileCountContribution(e){return e===void 0||e===1?0:e<5?10:20}calculateCyclomaticContribution(e){return e===void 0||e<5?0:e<10?10:e<20?20:30}calculateLanguageContribution(e){return e==="low"?0:e==="medium"?10:e==="high"?20:0}calculateKeywordScore(e){let t=e.simple.length*5+e.moderate.length*15+e.complex.length*25+e.critical.length*35;return Math.min(t,60)}calculateDependencyContribution(e){return e===void 0||e<3?0:e<10?5:10}calculateKeywordConfidenceBoost(e){let t=e.simple.length+e.moderate.length+e.complex.length+e.critical.length;return t>=3?.1:t>=1?.05:0}};function M(){return new u}var p=class{getRecommendedTier(e){for(let t of[0,1,2,3,4]){let[r,o]=C[t].complexityRange;if(e>=r&&e<=o)return t}return 2}findAlternateTiers(e,t){let r=[];return t>0&&r.push(t-1),t<4&&r.push(t+1),t<3&&!r.includes(4)&&r.push(4),r}generateExplanation(e,t,r){let o=[];return o.push(`Complexity score: ${e}/100 (Tier ${t})`),r.isMechanicalTransform&&o.push(this.formatMechanicalTransformInfo(r.detectedTransformType)),o.push(...this.formatScopeExplanations(r)),o.push(...this.formatCodeMetricsExplanations(r)),o.join(". ")}formatMechanicalTransformInfo(e){return`Detected mechanical transform: ${e}`}formatScopeExplanations(e){let t=[];return e.hasArchitectureScope&&t.push("Architecture scope detected"),e.hasSecurityScope&&t.push("Security scope detected"),e.requiresMultiStepReasoning&&t.push("Multi-step reasoning required"),e.requiresCrossDomainCoordination&&t.push("Cross-domain coordination required"),t}formatCodeMetricsExplanations(e){let t=[];return e.linesOfCode!==void 0&&e.linesOfCode>100&&t.push(`Large code change: ${e.linesOfCode} lines`),e.fileCount!==void 0&&e.fileCount>3&&t.push(`Multi-file change: ${e.fileCount} files`),t}};function w(){return new p}var y=class{config;signalCollector;scoreCalculator;tierRecommender;constructor(e,t,r,o){this.config=e,this.signalCollector=t,this.scoreCalculator=r,this.tierRecommender=o}async analyze(e){try{let t=await this.signalCollector.collectSignals(e),r=this.scoreCalculator.calculateCodeComplexity(t),o=this.scoreCalculator.calculateReasoningComplexity(t),c=this.scoreCalculator.calculateScopeComplexity(t),n=this.scoreCalculator.calculateOverallComplexity(r,o,c,t),i=this.tierRecommender.getRecommendedTier(n),a=this.tierRecommender.findAlternateTiers(n,i),l=this.scoreCalculator.calculateConfidence(t,e),g=this.tierRecommender.generateExplanation(n,i,t);return{overall:n,codeComplexity:r,reasoningComplexity:o,scopeComplexity:c,confidence:l,signals:t,recommendedTier:i,alternateTiers:a,explanation:g}}catch(t){throw new x(`Failed to analyze task complexity: ${t instanceof Error?t.message:"Unknown error"}`,t instanceof Error?t:void 0)}}async checkAgentBoosterEligibility(e){return this.signalCollector.checkAgentBoosterEligibility(e)}getRecommendedTier(e){return this.tierRecommender.getRecommendedTier(e)}};function L(s,e){let t=new m(s,e),r=new u,o=new p;return new y(s,t,r,o)}function z(s,e,t,r){return new y(s,e,t,r)}export{m as a,v as b,u as c,M as d,p as e,w as f,y as g,L as h,z as i};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.
|
|
2
|
-
import{b as c,d as p}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.15.4");process.exit(0)}
|
|
2
|
+
import{b as c,d as p}from"./chunk-S5D3HCGN.js";import{a as f}from"./chunk-5H7MR6HP.js";p();import{existsSync as l,readFileSync as i}from"node:fs";import{join as a}from"node:path";import{execSync as m}from"node:child_process";var s=null,d=0,g=6e4;function S(){s=null,d=0}function b(e){if(s&&Date.now()-d<g)return s;let n=w(e);return s=n,d=Date.now(),n}function w(e){let n=h(e);if(n)return n;let r=v(e);if(r)return r;let t=k(e);return t||{available:!1}}function h(e){let n=a(e,".mcp.json");if(l(n))try{let o=c(i(n,"utf-8"));if(o.mcpServers?.ruflo||o.mcpServers?.["claude-flow"])return{available:!0,method:"mcp-config"}}catch{}let r=a(e,".claude","mcp.json");if(l(r))try{let o=c(i(r,"utf-8"));if(o.mcpServers?.ruflo||o.mcpServers?.["claude-flow"])return{available:!0,method:"mcp-config"}}catch{}let t=a(e,".claude","settings.json");if(l(t))try{let o=c(i(t,"utf-8")),u=o.mcpServers||o.mcp?.servers||{};if(u.ruflo||u["claude-flow"]||u["@anthropic/claude-flow"])return{available:!0,method:"mcp-config"}}catch{}return null}function v(e){let n=a(e,"package.json");if(!l(n))return null;try{let r=c(i(n,"utf-8")),t={...r.dependencies,...r.devDependencies};if(t.ruflo||t["@claude-flow/cli"]||t["claude-flow"])return{available:!0,method:"npm-dependency"}}catch{}return null}function k(e){for(let n of["ruflo","@claude-flow/cli"])try{return{available:!0,method:"npx-cached",version:m(`npx --no-install ${n} --version`,{encoding:"utf-8",timeout:5e3,cwd:e,stdio:["pipe","pipe","pipe"]}).trim().match(/\d+\.\d+\.\d+[\w.-]*/)?.[0]}}catch{}return null}function x(){for(let e of["ruflo","@claude-flow/cli"])try{return f.resolve(`${e}/package.json`),e}catch{}return"ruflo"}function P(){return[" Claude Flow not found \u2014 running in standalone mode.",""," Claude Flow adds optional features:"," - SONA trajectory tracking (reinforcement learning)"," - 3-tier model routing (haiku / sonnet / opus)"," - Codebase pretrain analysis",""," To install later:"," npm install -g ruflo"," claude mcp add ruflo -- npx -y ruflo@3.5.18"," aqe init --auto --with-claude-flow"].join(`
|
|
3
3
|
`)}export{S as a,b,x as c,P as d};
|