agentic-qe 3.11.2 → 3.11.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/.validation/templates/eval.template.yaml +36 -0
- package/.claude/skills/qe-quality-assessment/SKILL.md +25 -0
- package/.claude/skills/qe-test-generation/SKILL.md +58 -20
- package/.claude/skills/qe-test-generation/evals/qe-test-generation.yaml +37 -0
- package/.claude/skills/skills-manifest.json +1 -1
- package/CHANGELOG.md +84 -0
- package/assets/skills/.validation/templates/eval.template.yaml +36 -0
- package/assets/skills/enterprise-integration-testing/SKILL.md +1 -1
- package/assets/skills/pentest-validation/SKILL.md +1 -1
- package/assets/skills/qcsd-development-swarm/SKILL.md +27 -6
- package/assets/skills/qe-quality-assessment/SKILL.md +25 -0
- package/assets/skills/qe-test-generation/SKILL.md +58 -20
- package/assets/skills/qe-test-generation/evals/qe-test-generation.yaml +37 -0
- package/dist/cli/bundle.js +5 -5
- package/dist/cli/chunks/adapter-2HMUXHWY.js +2 -0
- package/dist/cli/chunks/{agent-booster-wasm-FNCVODUJ.js → agent-booster-wasm-62I6ZNRW.js} +2 -2
- package/dist/cli/chunks/{agent-handler-JK7VK37B.js → agent-handler-E2TZKKBS.js} +2 -2
- package/dist/cli/chunks/{agent-memory-branch-EPVVJNNA.js → agent-memory-branch-JHAHC2NH.js} +2 -2
- package/dist/cli/chunks/aqe-learning-engine-M2NKRVRE.js +2 -0
- package/dist/cli/chunks/{arena-EH2IMSRW.js → arena-72ZV65BR.js} +4 -4
- package/dist/cli/chunks/{arena-NTHVDZTJ.js → arena-KLG3YSSR.js} +2 -2
- package/dist/cli/chunks/{audit-ODZV2T2B.js → audit-EPB7ETMT.js} +2 -2
- package/dist/cli/chunks/base-CCHC2DAC.js +2 -0
- package/dist/cli/chunks/{hnswlib-node-2KL54YUA.js → better-sqlite3-URULPKRF.js} +2 -2
- package/dist/cli/chunks/{brain-handler-NVB6OJ25.js → brain-handler-FBMYEERK.js} +3 -3
- package/dist/cli/chunks/{branch-enumerator-BIXSELMY.js → branch-enumerator-C7MPNYT7.js} +2 -2
- package/dist/cli/chunks/{browser-S2Y2W33Z.js → browser-UUDUDYLR.js} +2 -2
- package/dist/cli/chunks/browser-workflow-4DGHFYY3.js +2 -0
- package/dist/cli/chunks/{chunk-XXCSJMSR.js → chunk-2KNFS3L5.js} +1 -1
- package/dist/cli/chunks/{chunk-I7UWFV6N.js → chunk-2WPSMQIL.js} +1 -1
- package/dist/cli/chunks/chunk-37ZDGJ3H.js +2 -0
- package/dist/cli/chunks/{chunk-JELN5XTK.js → chunk-3E7D3A35.js} +1 -1
- package/dist/cli/chunks/{chunk-ZBJMVWQR.js → chunk-3FJZMQJ7.js} +2 -2
- package/dist/cli/chunks/chunk-3SBUL72V.js +2 -0
- package/dist/cli/chunks/{chunk-O3IIAIXB.js → chunk-3SKIZDKL.js} +1 -1
- package/dist/cli/chunks/{chunk-LAY35POY.js → chunk-3SRPFBU7.js} +3 -3
- package/dist/cli/chunks/{chunk-6VAFRS5N.js → chunk-4BFCLSDN.js} +2 -2
- package/dist/cli/chunks/{chunk-NZNXEEZR.js → chunk-4JFH3MVA.js} +1 -1
- package/dist/cli/chunks/{chunk-C6UTRG66.js → chunk-4RHNPRAP.js} +2 -2
- package/dist/cli/chunks/{chunk-3NCVUFAL.js → chunk-4YT5YN5G.js} +2 -2
- package/dist/cli/chunks/{chunk-P3VRXQ3H.js → chunk-54B6P2WS.js} +3 -3
- package/dist/cli/chunks/{chunk-H5TM4KIB.js → chunk-5AQ7FXYG.js} +2 -2
- package/dist/cli/chunks/{chunk-WARFZ626.js → chunk-5P7Q5YNC.js} +1 -1
- package/dist/cli/chunks/{chunk-ARUXFZDY.js → chunk-5U2WHPXL.js} +1 -1
- package/dist/cli/chunks/{chunk-MAXOIEUG.js → chunk-5VSQAGA2.js} +1 -1
- package/dist/cli/chunks/{chunk-CEMROADY.js → chunk-5Z4FBCBK.js} +1 -1
- package/dist/cli/chunks/{chunk-I3AD523O.js → chunk-63QUN3JK.js} +1 -1
- package/dist/cli/chunks/{chunk-4FTVTAMN.js → chunk-6545AS2J.js} +2 -2
- package/dist/cli/chunks/{chunk-5BDVFFYF.js → chunk-6GYGAW53.js} +2 -2
- package/dist/cli/chunks/{chunk-OC2W7KIW.js → chunk-6JUOH6L4.js} +2 -2
- package/dist/cli/chunks/{chunk-YDPBCN7H.js → chunk-6W3QHS45.js} +2 -2
- package/dist/cli/chunks/{chunk-WKIYYF3G.js → chunk-7ADD2ZQL.js} +2 -2
- package/dist/cli/chunks/{chunk-7MKF52GT.js → chunk-7AWK43JN.js} +2 -2
- package/dist/cli/chunks/{chunk-FV53RMVB.js → chunk-7IKWF2AD.js} +1 -1
- package/dist/cli/chunks/{chunk-UCXW24HY.js → chunk-7QTB5XIQ.js} +2 -2
- package/dist/cli/chunks/{chunk-HDBJORV7.js → chunk-A4OMK3FO.js} +2 -2
- package/dist/cli/chunks/{chunk-DMUQV2YU.js → chunk-ADFKY3X2.js} +2 -2
- package/dist/cli/chunks/{chunk-SE4S23C7.js → chunk-AE6HXMOG.js} +1 -1
- package/dist/cli/chunks/{chunk-ZH6HYT7C.js → chunk-AJXGGTX7.js} +1 -1
- package/dist/cli/chunks/{chunk-CMVNYVKL.js → chunk-AQIEK4SY.js} +2 -2
- package/dist/cli/chunks/{chunk-H4ZPPHOI.js → chunk-ARPBG6FQ.js} +2 -2
- package/dist/cli/chunks/{chunk-X36TZXDK.js → chunk-AYGEWPN4.js} +1 -1
- package/dist/cli/chunks/{chunk-JSZNI3AO.js → chunk-B5XUWHKQ.js} +1 -1
- package/dist/cli/chunks/{chunk-76RO2RHG.js → chunk-BMQDELPA.js} +1 -1
- package/dist/cli/chunks/{chunk-26ZMIYSK.js → chunk-BRLUNIR4.js} +2 -2
- package/dist/cli/chunks/{chunk-H6MBRYA7.js → chunk-CNF3ZWLM.js} +2 -2
- package/dist/cli/chunks/{chunk-XRDPGJNW.js → chunk-D5S47YUS.js} +2 -2
- package/dist/cli/chunks/{chunk-S6BWEZKK.js → chunk-D6CKKNYC.js} +2 -2
- package/dist/cli/chunks/{chunk-K6IQBVD7.js → chunk-DNOU2HVQ.js} +2 -2
- package/dist/cli/chunks/{chunk-DPFLJMEI.js → chunk-DRMHVY4T.js} +4 -4
- package/dist/cli/chunks/{chunk-3ATEYGVD.js → chunk-EONKMHKO.js} +2 -2
- package/dist/cli/chunks/{chunk-6LQIVIZB.js → chunk-EZRHSHOQ.js} +2 -2
- package/dist/cli/chunks/{chunk-WEBHFIWS.js → chunk-FRFVN6AA.js} +2 -2
- package/dist/cli/chunks/{chunk-YJUJCLXV.js → chunk-FSGMRQFC.js} +2 -2
- package/dist/cli/chunks/{chunk-OFUF3APC.js → chunk-G3TFNY4T.js} +2 -2
- package/dist/cli/chunks/{chunk-PPD5ZLNA.js → chunk-GOQ4P2PB.js} +2 -2
- package/dist/cli/chunks/chunk-GRQ36XUH.js +24 -0
- package/dist/cli/chunks/{chunk-LI3T5YNC.js → chunk-HH6NCBSP.js} +3 -3
- package/dist/cli/chunks/{chunk-NPT7BYGF.js → chunk-HJ24KMC2.js} +1 -1
- package/dist/cli/chunks/{chunk-AK5Q2WCJ.js → chunk-HJO4RNOW.js} +2 -2
- package/dist/cli/chunks/{chunk-VNFL2TPU.js → chunk-HT6WAYIR.js} +1 -1
- package/dist/cli/chunks/{chunk-IO7ZUP2G.js → chunk-HWBMYR5W.js} +3 -3
- package/dist/cli/chunks/{chunk-AKZK46TQ.js → chunk-IB3ZPLFA.js} +2 -2
- package/dist/cli/chunks/{chunk-EDH4H55B.js → chunk-ICCTQ5LO.js} +2 -2
- package/dist/cli/chunks/{chunk-P7MIOTVP.js → chunk-IF3HPQNV.js} +1 -1
- package/dist/cli/chunks/{chunk-DU4GQKTH.js → chunk-IQBZBUP5.js} +2 -2
- package/dist/cli/chunks/{chunk-LFXXA325.js → chunk-JCTCM6IR.js} +1 -1
- package/dist/cli/chunks/{chunk-K426HTEQ.js → chunk-JDFPAJGB.js} +10 -10
- package/dist/cli/chunks/{chunk-CAVBEZV4.js → chunk-JFLSQH2X.js} +2 -2
- package/dist/cli/chunks/{chunk-P5SGBQLY.js → chunk-JNQN5DNS.js} +1 -1
- package/dist/cli/chunks/{chunk-A4ZDKF5F.js → chunk-JPENUVCI.js} +1 -1
- package/dist/cli/chunks/{chunk-5AFO7ZZG.js → chunk-KUZMVH6N.js} +3 -3
- package/dist/cli/chunks/{chunk-KFE6LB4I.js → chunk-KYTFIP6R.js} +2 -2
- package/dist/cli/chunks/{chunk-OU52V67H.js → chunk-LKURMUBU.js} +4 -4
- package/dist/cli/chunks/{chunk-JCH2FHJ7.js → chunk-LLUPRGOR.js} +2 -2
- package/dist/cli/chunks/{chunk-5KMGG3QW.js → chunk-LMJUMUQJ.js} +4 -4
- package/dist/cli/chunks/{chunk-Y4M2HMPR.js → chunk-LW5DHT3Z.js} +2 -2
- package/dist/cli/chunks/{chunk-JC4Z2ADP.js → chunk-MALOUGSF.js} +2 -2
- package/dist/cli/chunks/{chunk-7VM4ZUHT.js → chunk-MCT4CD5M.js} +2 -2
- package/dist/cli/chunks/{chunk-FPZLOVEF.js → chunk-MWFJC5HR.js} +1 -1
- package/dist/cli/chunks/{chunk-7KHZZVF2.js → chunk-MYMIEQSZ.js} +4 -4
- package/dist/cli/chunks/{chunk-EIWZDVMT.js → chunk-N2BJN6AO.js} +3 -3
- package/dist/cli/chunks/{chunk-3J3QXLWP.js → chunk-NBBLPDJX.js} +2 -2
- package/dist/cli/chunks/{chunk-PFDILSVO.js → chunk-NFJT7XXR.js} +1 -1
- package/dist/cli/chunks/{chunk-IXYF5BZY.js → chunk-NSPCZPTB.js} +2 -2
- package/dist/cli/chunks/{chunk-YWG4LHFU.js → chunk-NV3TXXOW.js} +2 -2
- package/dist/cli/chunks/{chunk-ZU3V4CJ4.js → chunk-O5NEJIHB.js} +2 -2
- package/dist/cli/chunks/{chunk-QZLTIGLB.js → chunk-O7PVZ32A.js} +1 -1
- package/dist/cli/chunks/{chunk-42DCMEUM.js → chunk-ODZSQVEW.js} +1 -1
- package/dist/cli/chunks/{chunk-G6LIQFT2.js → chunk-P6S6ZVB5.js} +1 -1
- package/dist/cli/chunks/{chunk-FYY7OJ6Y.js → chunk-PEIQDQXN.js} +2 -2
- package/dist/cli/chunks/{chunk-WZC4HKGZ.js → chunk-PFWJQPUC.js} +2 -2
- package/dist/cli/chunks/{chunk-6SOGYNJG.js → chunk-PQUXFSN6.js} +2 -2
- package/dist/cli/chunks/{chunk-P2RR4SW5.js → chunk-Q7ORVHJB.js} +3 -3
- package/dist/cli/chunks/{chunk-2Q65LTJN.js → chunk-QEVX4GWF.js} +2 -2
- package/dist/cli/chunks/{chunk-AINAWVGD.js → chunk-QJ5NCYJ3.js} +2 -2
- package/dist/cli/chunks/{chunk-75C5GX7D.js → chunk-QMC5MTBV.js} +2 -2
- package/dist/cli/chunks/{chunk-H3LGBH4Y.js → chunk-QSDIY3E2.js} +1 -1
- package/dist/cli/chunks/chunk-RCPD6F4R.js +2 -0
- package/dist/cli/chunks/{chunk-XNREA3FG.js → chunk-RFQBDMAP.js} +1 -1
- package/dist/cli/chunks/{chunk-KO3WB4SU.js → chunk-SFDUT5WM.js} +2 -2
- package/dist/cli/chunks/{chunk-YGR54EAA.js → chunk-SL3SNOO2.js} +2 -2
- package/dist/cli/chunks/{chunk-QFJDR4HC.js → chunk-SRVTNG6L.js} +2 -2
- package/dist/cli/chunks/{chunk-TOGZ37RL.js → chunk-T76RFXQX.js} +2 -2
- package/dist/cli/chunks/{chunk-AAVUZVM6.js → chunk-TCVEKRPI.js} +2 -2
- package/dist/cli/chunks/{chunk-AZQ6HDPM.js → chunk-TCWR6TDN.js} +2 -2
- package/dist/cli/chunks/{chunk-ZP2GE6DM.js → chunk-THKZVOZV.js} +1 -1
- package/dist/cli/chunks/{chunk-4PYJCIRO.js → chunk-TPMBFARK.js} +31 -26
- package/dist/cli/chunks/{chunk-NIW4CLN2.js → chunk-TQ373GGI.js} +2 -2
- package/dist/cli/chunks/{chunk-CUDGKSFX.js → chunk-TSWF3AGQ.js} +2 -2
- package/dist/cli/chunks/{chunk-MN6W7ZNL.js → chunk-TU6YN43Q.js} +1 -1
- package/dist/cli/chunks/{chunk-CAUTOCLZ.js → chunk-U34OZXD6.js} +2 -2
- package/dist/cli/chunks/{chunk-AYXRT2ND.js → chunk-U3AVZGQA.js} +1 -1
- package/dist/cli/chunks/{chunk-NGE5YNKC.js → chunk-UCYTY4LG.js} +2 -2
- package/dist/cli/chunks/{chunk-LRJWKFGY.js → chunk-UJMTKXPI.js} +2 -2
- package/dist/cli/chunks/{chunk-BGVEBYV4.js → chunk-UQ72K44T.js} +2 -2
- package/dist/cli/chunks/{chunk-XY2B2BEJ.js → chunk-VCUCD3B5.js} +2 -2
- package/dist/cli/chunks/{chunk-LY6PTRVL.js → chunk-VJGHRWMH.js} +2 -2
- package/dist/cli/chunks/{chunk-ZRU3OZEU.js → chunk-VKJQAKYG.js} +2 -2
- package/dist/cli/chunks/{chunk-XY4JS3IZ.js → chunk-VO6YJGB4.js} +2 -2
- package/dist/cli/chunks/{chunk-RHSUXQNF.js → chunk-VQU7DMEY.js} +2 -2
- package/dist/cli/chunks/{chunk-27KNLVOY.js → chunk-WMIRAD3J.js} +2 -2
- package/dist/cli/chunks/{chunk-3KTOM7NN.js → chunk-WNMDWP5A.js} +2 -2
- package/dist/cli/chunks/{chunk-G4CQBQBV.js → chunk-WQZ2WRO4.js} +1 -1
- package/dist/cli/chunks/{chunk-UQBGA4UA.js → chunk-WZYNY3VF.js} +1 -1
- package/dist/cli/chunks/{chunk-KEJEZY2R.js → chunk-X64BEXUY.js} +173 -173
- package/dist/cli/chunks/{chunk-7XIQR6VU.js → chunk-XHRLBJTM.js} +2 -2
- package/dist/cli/chunks/{chunk-UQ6WB4N2.js → chunk-XQ6DW5FV.js} +2 -2
- package/dist/cli/chunks/chunk-XXRTWG7O.js +2 -0
- package/dist/cli/chunks/{chunk-LIEA5EON.js → chunk-Y4AXOHW4.js} +1 -1
- package/dist/cli/chunks/{chunk-ZWMXF6AX.js → chunk-YKSWC7I4.js} +2 -2
- package/dist/cli/chunks/{chunk-IMPSB5WW.js → chunk-YNK6SUPU.js} +2 -2
- package/dist/cli/chunks/{chunk-Z2QNTRUX.js → chunk-YUHM72VQ.js} +2 -2
- package/dist/cli/chunks/{chunk-QZ2GQGJX.js → chunk-YZ5EQR37.js} +2 -2
- package/dist/cli/chunks/{chunk-YGRY2TVI.js → chunk-Z2REKBD6.js} +2 -2
- package/dist/cli/chunks/{chunk-ZQYEBLTL.js → chunk-ZFCVT43J.js} +2 -2
- package/dist/cli/chunks/{chunk-XN4G3SRU.js → chunk-ZKCKOQJI.js} +2 -2
- package/dist/cli/chunks/{chunk-CZYSCUJ4.js → chunk-ZSA6V5FH.js} +2 -2
- package/dist/cli/chunks/{chunk-IQOCTGA2.js → chunk-ZSBJNE35.js} +2 -2
- package/dist/cli/chunks/{chunk-JDFF2QMZ.js → chunk-ZYZT2CDX.js} +1 -1
- package/dist/cli/chunks/{ci-SM3EVLZ4.js → ci-HQCRSCC7.js} +2 -2
- package/dist/cli/chunks/{ci-output-YYXICZBC.js → ci-output-YBVXLA6O.js} +2 -2
- package/dist/cli/chunks/{circuit-breaker-CV5UGKXT.js → circuit-breaker-ULGMF2QN.js} +2 -2
- package/dist/cli/chunks/{claude-flow-setup-BSBUZ4B7.js → claude-flow-setup-MKZ2LJXK.js} +2 -2
- package/dist/cli/chunks/client-2OVEDWGU.js +2 -0
- package/dist/cli/chunks/{cline-installer-P2O6STIC.js → cline-installer-WZQ6XBWN.js} +2 -2
- package/dist/cli/chunks/{code-M7DDLBGS.js → code-H3KGH45S.js} +2 -2
- package/dist/cli/chunks/{code-index-extractor-3QZIUYOG.js → code-index-extractor-NUVEAJ7C.js} +2 -2
- package/dist/cli/chunks/{codex-installer-5JVZCCTC.js → codex-installer-JQI6E6CV.js} +2 -2
- package/dist/cli/chunks/{completions-EM7IL2BJ.js → completions-NDF4PFE7.js} +2 -2
- package/dist/cli/chunks/{complexity-analyzer-VJXVB2CV.js → complexity-analyzer-XCZH66HG.js} +2 -2
- package/dist/cli/chunks/{continuedev-installer-RCKJIAEC.js → continuedev-installer-Z4AJGZ7S.js} +2 -2
- package/dist/cli/chunks/{copilot-installer-DZ7LTDOZ.js → copilot-installer-K4IPAL7C.js} +2 -2
- package/dist/cli/chunks/core-handlers-UXRRYP52.js +2 -0
- package/dist/cli/chunks/{cost-tracker-QLOLXVAM.js → cost-tracker-35KXAB23.js} +2 -2
- package/dist/cli/chunks/{coverage-LYHTLWRV.js → coverage-QW5I4TYZ.js} +3 -3
- package/dist/cli/chunks/cross-domain-router-PV3VQVLO.js +2 -0
- package/dist/cli/chunks/{cursor-installer-PSIZ3Y53.js → cursor-installer-P4Z7RMIZ.js} +2 -2
- package/dist/cli/chunks/{daemon-IYDTMA5M.js → daemon-ESUEM6VB.js} +4 -4
- package/dist/cli/chunks/{daemon-YLOAXM4X.js → daemon-WQWTCYBM.js} +3 -3
- package/dist/cli/chunks/{dag-attention-scheduler-I2UIO3Z7.js → dag-attention-scheduler-7XD2VGON.js} +2 -2
- package/dist/cli/chunks/{detect-ZXQ7X7GZ.js → detect-GZ3P4DI7.js} +2 -2
- package/dist/cli/chunks/{dist-node-GK6OZX4H.js → dist-node-6WWAW7OP.js} +2 -2
- package/dist/cli/chunks/{domain-handler-NS3IBLRQ.js → domain-handler-3GTLWARQ.js} +2 -2
- package/dist/cli/chunks/{domain-transfer-5G4RZEWF.js → domain-transfer-TQYO3SVG.js} +2 -2
- package/dist/cli/chunks/dream-UFUXVJQC.js +2 -0
- package/dist/cli/chunks/{embed-and-insert-pattern-V4JJUFR6.js → embed-and-insert-pattern-BGIMA77V.js} +2 -2
- package/dist/cli/chunks/{eval-7Q6PPYKR.js → eval-SXV6DRDD.js} +2 -2
- package/dist/cli/chunks/{experience-capture-middleware-DUBKSYFM.js → experience-capture-middleware-TT6WCT2S.js} +3 -3
- package/dist/cli/chunks/{fast-paths-IDPPMBUW.js → fast-paths-HTAZHEQP.js} +2 -2
- package/dist/cli/chunks/{feature-flags-EPTMAAKA.js → feature-flags-DIE3Z2B4.js} +2 -2
- package/dist/cli/chunks/{feature-flags-KXI6FDY7.js → feature-flags-WBUKU54W.js} +2 -2
- package/dist/cli/chunks/{file-discovery-EDX2OJO7.js → file-discovery-SKDETFS3.js} +2 -2
- package/dist/cli/chunks/{fleet-67BO3LJ4.js → fleet-WCWEPAVU.js} +3 -3
- package/dist/cli/chunks/{gnn-wrapper-YARORYT7.js → gnn-wrapper-KWZOWBYS.js} +2 -2
- package/dist/cli/chunks/{heartbeat-handler-K3JGPBYR.js → heartbeat-handler-3AGYHVG2.js} +4 -4
- package/dist/cli/chunks/heartbeat-scheduler-MBG3SARO.js +2 -0
- package/dist/cli/chunks/hnsw-adapter-5HXA3QB3.js +2 -0
- package/dist/cli/chunks/hnsw-index-PZRQWBRG.js +2 -0
- package/dist/cli/chunks/{hnsw-legacy-bridge-CDDRSV5E.js → hnsw-legacy-bridge-6OJJDZHL.js} +2 -2
- package/dist/cli/chunks/{better-sqlite3-5JTP47LA.js → hnswlib-node-LAFK5QZ4.js} +2 -2
- package/dist/cli/chunks/{hooks-6SCAE6LC.js → hooks-OXEBTLXV.js} +10 -10
- package/dist/cli/chunks/hybrid-router-NQRIE2GG.js +2 -0
- package/dist/cli/chunks/{hypergraph-engine-I3LUMO7I.js → hypergraph-engine-NL74PRHD.js} +2 -2
- package/dist/cli/chunks/{hypergraph-handler-YAKAIVCN.js → hypergraph-handler-KZ54AEEL.js} +3 -3
- package/dist/cli/chunks/impact-analyzer-46347ZDV.js +2 -0
- package/dist/cli/chunks/{init-handler-NBKCZD7Q.js → init-handler-XKZXRXPG.js} +6 -6
- package/dist/cli/chunks/init-wizard-CJYP4WKO.js +2 -0
- package/dist/cli/chunks/kernel-22KQZ56U.js +2 -0
- package/dist/cli/chunks/{kilocode-installer-YGPJCPU3.js → kilocode-installer-WISQMJK7.js} +2 -2
- package/dist/cli/chunks/{kiro-installer-JV3ONVMN.js → kiro-installer-O7TBB3GM.js} +2 -2
- package/dist/cli/chunks/knowledge-graph-KM3JDBGR.js +2 -0
- package/dist/cli/chunks/{learning-2FEZJ5CX.js → learning-6IZBGVRU.js} +3 -3
- package/dist/cli/chunks/{llm-router-SILI4KLU.js → llm-router-QDMQPPQ7.js} +4 -4
- package/dist/cli/chunks/llm-router-service-IFO6GRRO.js +2 -0
- package/dist/cli/chunks/{load-EGXLQVR3.js → load-KLAJJGL5.js} +2 -2
- package/dist/cli/chunks/load-test-TTKCYAPB.js +2 -0
- package/dist/cli/chunks/{mcp-OJH775TL.js → mcp-SZOPQZIZ.js} +2 -2
- package/dist/cli/chunks/{memory-FNEOK4FW.js → memory-G3WY74C6.js} +5 -5
- package/dist/cli/chunks/memory-backend-ELHCX2ZT.js +2 -0
- package/dist/cli/chunks/memory-handlers-3SKYQZTL.js +2 -0
- package/dist/cli/chunks/{multi-model-executor-ORTFWLLE.js → multi-model-executor-TDNQGTOT.js} +2 -2
- package/dist/cli/chunks/{opencode-installer-UAQLW6XX.js → opencode-installer-NGYGEDMV.js} +2 -2
- package/dist/cli/chunks/{orchestrator-VE5KJ2V4.js → orchestrator-KPI5DY2C.js} +5 -5
- package/dist/cli/chunks/pattern-null-store-TMXAYD43.js +2 -0
- package/dist/cli/chunks/{pipeline-FNMDRWTU.js → pipeline-CSDCC675.js} +2 -2
- package/dist/cli/chunks/{platform-MGAKRUQN.js → platform-Q5XKEVKH.js} +2 -2
- package/dist/cli/chunks/{plugin-YX7THX3I.js → plugin-XKKR3GVL.js} +2 -2
- package/dist/cli/chunks/{prime-radiant-advanced-wasm-XJV4RLMK.js → prime-radiant-advanced-wasm-22QVNKEN.js} +2 -2
- package/dist/cli/chunks/protocol-executor-BPLR5EJC.js +2 -0
- package/dist/cli/chunks/{protocol-handler-QFET442Y.js → protocol-handler-REQKTJGG.js} +2 -2
- package/dist/cli/chunks/{prove-QBAESCOC.js → prove-NOFUFSQN.js} +2 -2
- package/dist/cli/chunks/provider-manager-4MMD5QKL.js +2 -0
- package/dist/cli/chunks/qe-reasoning-bank-P7KNT3WZ.js +2 -0
- package/dist/cli/chunks/{quality-ZTNRL6EG.js → quality-3DQ2H5TK.js} +2 -2
- package/dist/cli/chunks/queen-coordinator-NBZZ4MGC.js +2 -0
- package/dist/cli/chunks/{real-embeddings-ZFFDV6HC.js → real-embeddings-FCGNYWLL.js} +2 -2
- package/dist/cli/chunks/{roocode-installer-J4LFL4AE.js → roocode-installer-HX3CNRIR.js} +2 -2
- package/dist/cli/chunks/router-2RXR6J2Q.js +2 -0
- package/dist/cli/chunks/routing-feedback-AVAA76TK.js +2 -0
- package/dist/cli/chunks/{routing-handler-A5QG2TP2.js → routing-handler-YRZ2LDCR.js} +2 -2
- package/dist/cli/chunks/{ruvector-commands-J5JL5WX5.js → ruvector-commands-GCQVBJ4E.js} +2 -2
- package/dist/cli/chunks/{rvf-dual-writer-H7442GMO.js → rvf-dual-writer-B562P3ZC.js} +2 -2
- package/dist/cli/chunks/{rvf-migration-adapter-PTFQUYKC.js → rvf-migration-adapter-NAGFKCMD.js} +2 -2
- package/dist/cli/chunks/{rvf-migration-coordinator-RSNROYRX.js → rvf-migration-coordinator-WWFBEJ5Q.js} +2 -2
- package/dist/cli/chunks/rvf-native-adapter-X2YDJA55.js +2 -0
- package/dist/cli/chunks/safe-db-4PRU65BK.js +2 -0
- package/dist/cli/chunks/schedule-2AST5CHW.js +2 -0
- package/dist/cli/chunks/scheduler-SW6II7OU.js +2 -0
- package/dist/cli/chunks/{security-LHHLMCBA.js → security-IFOYTD75.js} +3 -3
- package/dist/cli/chunks/{shared-rvf-adapter-NPSHVUTM.js → shared-rvf-adapter-TYD5TQ35.js} +2 -2
- package/dist/cli/chunks/{shared-rvf-dual-writer-INQDY5WE.js → shared-rvf-dual-writer-YGOOVDQZ.js} +2 -2
- package/dist/cli/chunks/sqlite-persistence-OB5NEGAK.js +2 -0
- package/dist/cli/chunks/{status-handler-R2KIAMAE.js → status-handler-HFPWSCBY.js} +2 -2
- package/dist/cli/chunks/{structural-health-2VPPIOZX.js → structural-health-KZI6YMKV.js} +2 -2
- package/dist/cli/chunks/{sync-NLASP7AK.js → sync-ABZNNYRC.js} +2 -2
- package/dist/cli/chunks/{sync-ASZ3T5GT.js → sync-Z5BDDBMK.js} +2 -2
- package/dist/cli/chunks/{task-handler-UV5R6LJG.js → task-handler-5ACZEPJ7.js} +2 -2
- package/dist/cli/chunks/{task-handlers-I6YJXPYP.js → task-handlers-UZWDPL6A.js} +3 -3
- package/dist/cli/chunks/{test-TE43TNTI.js → test-APO3MCVV.js} +4 -4
- package/dist/cli/chunks/{test-scheduling-WWWWF2TZ.js → test-scheduling-EFZA5G5C.js} +3 -3
- package/dist/cli/chunks/{token-bootstrap-HEWP7KKS.js → token-bootstrap-J2OPLNUK.js} +2 -2
- package/dist/cli/chunks/{token-usage-3FVHUAW6.js → token-usage-VHWVNN4R.js} +2 -2
- package/dist/cli/chunks/{transformers-O5OFM4XM.js → transformers-PX4HPO75.js} +2 -2
- package/dist/cli/chunks/{tree-sitter-wasm-parser-YOYWFW63.js → tree-sitter-wasm-parser-44HA2Z3F.js} +2 -2
- package/dist/cli/chunks/{types-42GR6PLO.js → types-IMOP7F4R.js} +2 -2
- package/dist/cli/chunks/unified-memory-X7OJYGSD.js +2 -0
- package/dist/cli/chunks/unified-memory-hnsw-O6HOD5YL.js +2 -0
- package/dist/cli/chunks/unified-persistence-C332CER2.js +2 -0
- package/dist/cli/chunks/{upgrade-BU6DJ4LT.js → upgrade-OZ3O6ZZI.js} +2 -2
- package/dist/cli/chunks/{validate-MPTBARGN.js → validate-DRY5BMWX.js} +2 -2
- package/dist/cli/chunks/{validate-swarm-5LUQYHPP.js → validate-swarm-QD3LYPUF.js} +2 -2
- package/dist/cli/chunks/{vibium-MJJDANDL.js → vibium-2J3H2ITD.js} +2 -2
- package/dist/cli/chunks/visual-security-MPUG5HPI.js +2 -0
- package/dist/cli/chunks/{web-tree-sitter-5TF4UGB3.js → web-tree-sitter-KRNUOGKI.js} +2 -2
- package/dist/cli/chunks/{windsurf-installer-NQAOSVCN.js → windsurf-installer-PQIPH3WP.js} +2 -2
- package/dist/cli/chunks/{witness-chain-23UWK2JT.js → witness-chain-HPLOYPS7.js} +2 -2
- package/dist/cli/chunks/witness-chain-Q4BZHPDF.js +2 -0
- package/dist/cli/chunks/{workflow-3QOLXRJC.js → workflow-OAQ3FWCY.js} +4 -4
- package/dist/cli/chunks/workflow-orchestrator-4NDWECYK.js +2 -0
- package/dist/cli/chunks/{wrappers-S6EUZBCX.js → wrappers-UPIU6S5S.js} +2 -2
- package/dist/coordination/consensus/providers/ollama-provider.js +3 -2
- package/dist/feedback/regenerability-gate.d.ts +70 -0
- package/dist/feedback/regenerability-gate.js +91 -0
- package/dist/integrations/ruvector/proof-gate.d.ts +68 -0
- package/dist/integrations/ruvector/proof-gate.js +135 -0
- package/dist/kernel/unified-memory.d.ts +35 -0
- package/dist/kernel/unified-memory.js +105 -0
- package/dist/learning/local-judge-client.js +2 -1
- package/dist/mcp/bundle.js +383 -378
- package/dist/routing/free-tier/coordinator-support.d.ts +6 -3
- package/dist/routing/free-tier/coordinator-support.js +6 -3
- package/dist/routing/free-tier/executor.d.ts +14 -0
- package/dist/routing/free-tier/executor.js +21 -0
- package/dist/routing/free-tier/index.d.ts +1 -0
- package/dist/routing/free-tier/index.js +1 -0
- package/dist/routing/free-tier/pattern-cache.d.ts +57 -0
- package/dist/routing/free-tier/pattern-cache.js +148 -0
- package/dist/routing/free-tier/provider.js +9 -1
- package/dist/routing/value-score.js +3 -0
- package/dist/shared/embeddings/ollama-client.js +2 -1
- package/dist/shared/llm/model-mapping.js +26 -0
- package/dist/shared/llm/model-registry.d.ts +10 -0
- package/dist/shared/llm/model-registry.js +92 -0
- package/dist/shared/llm/ollama-url.d.ts +17 -0
- package/dist/shared/llm/ollama-url.js +25 -0
- package/dist/shared/llm/providers/gemini.js +16 -10
- package/dist/shared/llm/providers/ollama-timeout.d.ts +26 -0
- package/dist/shared/llm/providers/ollama-timeout.js +31 -0
- package/dist/shared/llm/providers/ollama.d.ts +10 -0
- package/dist/shared/llm/providers/ollama.js +31 -4
- package/dist/shared/llm/providers/openrouter.js +20 -20
- package/dist/shared/llm/router/hybrid-router.js +18 -1
- package/dist/validation/conservation-guard.d.ts +39 -0
- package/dist/validation/conservation-guard.js +54 -0
- package/dist/validation/oracle-eval.d.ts +46 -0
- package/dist/validation/oracle-eval.js +108 -0
- package/dist/validation/skill-parity.d.ts +58 -0
- package/dist/validation/skill-parity.js +94 -0
- package/dist/validation/test-gen-prompt.d.ts +10 -0
- package/dist/validation/test-gen-prompt.js +26 -0
- package/package.json +12 -1
- package/dist/cli/chunks/adapter-LDNYC4GH.js +0 -2
- package/dist/cli/chunks/aqe-learning-engine-CA4CT5Q7.js +0 -2
- package/dist/cli/chunks/base-TSDAEMT4.js +0 -2
- package/dist/cli/chunks/browser-workflow-3HCTJBLR.js +0 -2
- package/dist/cli/chunks/chunk-527U4AHC.js +0 -24
- package/dist/cli/chunks/chunk-72VVTMEL.js +0 -2
- package/dist/cli/chunks/chunk-7HYO76F2.js +0 -2
- package/dist/cli/chunks/chunk-K3YM2Z3E.js +0 -2
- package/dist/cli/chunks/client-WRDYZGM2.js +0 -2
- package/dist/cli/chunks/core-handlers-O6E5DNHT.js +0 -2
- package/dist/cli/chunks/cross-domain-router-EV7LQMDO.js +0 -2
- package/dist/cli/chunks/dream-E4C236UL.js +0 -2
- package/dist/cli/chunks/heartbeat-scheduler-WMADLDKT.js +0 -2
- package/dist/cli/chunks/hnsw-adapter-STRDGJ65.js +0 -2
- package/dist/cli/chunks/hnsw-index-DBHX3TSC.js +0 -2
- package/dist/cli/chunks/hybrid-router-L2K55I4T.js +0 -2
- package/dist/cli/chunks/impact-analyzer-WMO7ZGS7.js +0 -2
- package/dist/cli/chunks/init-wizard-ZAB7UZZS.js +0 -2
- package/dist/cli/chunks/kernel-4MUFDEQI.js +0 -2
- package/dist/cli/chunks/knowledge-graph-GZRFGXLX.js +0 -2
- package/dist/cli/chunks/llm-router-service-5ODLU5U5.js +0 -2
- package/dist/cli/chunks/load-test-ZDQFS5XS.js +0 -2
- package/dist/cli/chunks/memory-backend-UK7SQ6ZM.js +0 -2
- package/dist/cli/chunks/memory-handlers-6LDUH3JZ.js +0 -2
- package/dist/cli/chunks/pattern-null-store-LO2QTIBU.js +0 -2
- package/dist/cli/chunks/protocol-executor-JWMYQEOI.js +0 -2
- package/dist/cli/chunks/provider-manager-PEXOHGNB.js +0 -2
- package/dist/cli/chunks/qe-reasoning-bank-7B2G4UGQ.js +0 -2
- package/dist/cli/chunks/queen-coordinator-6OF4HT3S.js +0 -2
- package/dist/cli/chunks/router-GMWRF6DU.js +0 -2
- package/dist/cli/chunks/routing-feedback-XKJSQK3I.js +0 -2
- package/dist/cli/chunks/rvf-native-adapter-YEA6TMXB.js +0 -2
- package/dist/cli/chunks/safe-db-5DOP2J3V.js +0 -2
- package/dist/cli/chunks/schedule-SUWTOBHP.js +0 -2
- package/dist/cli/chunks/scheduler-P4VTC5SQ.js +0 -2
- package/dist/cli/chunks/sqlite-persistence-5Z2RAXH7.js +0 -2
- package/dist/cli/chunks/unified-memory-HCKOPFAY.js +0 -2
- package/dist/cli/chunks/unified-memory-hnsw-6NQPYA5C.js +0 -2
- package/dist/cli/chunks/unified-persistence-NIMKNAFR.js +0 -2
- package/dist/cli/chunks/visual-security-HFGHA57Z.js +0 -2
- package/dist/cli/chunks/witness-chain-VZGGJ7TJ.js +0 -2
- package/dist/cli/chunks/workflow-orchestrator-45L7D4SN.js +0 -2
|
@@ -14,9 +14,12 @@
|
|
|
14
14
|
import { FreeTierEscalatingExecutor, type QeExecutionResult, type QeVerifier } from './executor.js';
|
|
15
15
|
import { type RoutingFeedbackLike } from './feedback-sink.js';
|
|
16
16
|
import type { FreeTierProviderConfig } from './types.js';
|
|
17
|
-
/** Default cheap tier. qwen3:30b
|
|
18
|
-
*
|
|
19
|
-
|
|
17
|
+
/** Default cheap tier. qwen3-coder:30b — same 30B MoE class/RAM as qwen3:30b-a3b
|
|
18
|
+
* and IDENTICAL measured quality (2026-06-29 oracle bench, 8 fixtures: both 6/8,
|
|
19
|
+
* 75% avg mutation kill), but ~14× faster wall-clock (the code-tuned model does
|
|
20
|
+
* not spend ~70s "thinking" before answering). qwen3:8b stays off-default: D3
|
|
21
|
+
* measured it well below this (3/8). */
|
|
22
|
+
export declare const DEFAULT_FREE_TIER_MODEL = "qwen3-coder:30b";
|
|
20
23
|
/** Per-coordinator config knobs (mix into a coordinator's CoordinatorConfig). */
|
|
21
24
|
export interface FreeTierCoordinatorConfig {
|
|
22
25
|
/** Opt-in the cheap-first free local tier. Also via env `AQE_FREE_TIER=1`. */
|
|
@@ -14,9 +14,12 @@
|
|
|
14
14
|
import { FreeTierEscalatingExecutor } from './executor.js';
|
|
15
15
|
import { defaultFreeTierLadder } from './ladder.js';
|
|
16
16
|
import { createRoutingFeedbackSink } from './feedback-sink.js';
|
|
17
|
-
/** Default cheap tier. qwen3:30b
|
|
18
|
-
*
|
|
19
|
-
|
|
17
|
+
/** Default cheap tier. qwen3-coder:30b — same 30B MoE class/RAM as qwen3:30b-a3b
|
|
18
|
+
* and IDENTICAL measured quality (2026-06-29 oracle bench, 8 fixtures: both 6/8,
|
|
19
|
+
* 75% avg mutation kill), but ~14× faster wall-clock (the code-tuned model does
|
|
20
|
+
* not spend ~70s "thinking" before answering). qwen3:8b stays off-default: D3
|
|
21
|
+
* measured it well below this (3/8). */
|
|
22
|
+
export const DEFAULT_FREE_TIER_MODEL = 'qwen3-coder:30b';
|
|
20
23
|
/**
|
|
21
24
|
* Build a cheap-first escalating executor from coordinator config + (optional)
|
|
22
25
|
* router. Returns `null` when the free tier is not opted in — callers store the
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
* never leaves the start tier (the "no escalation yet" mode).
|
|
16
16
|
*/
|
|
17
17
|
import { type ChatMessage } from './provider.js';
|
|
18
|
+
import { TestGenPatternCache } from './pattern-cache.js';
|
|
18
19
|
import { AutoEscalationTracker } from '../escalation/auto-escalation-tracker.js';
|
|
19
20
|
import type { QeRoutingLadder, FreeTierProviderConfig } from './types.js';
|
|
20
21
|
import type { AgentTier } from '../routing-config.js';
|
|
@@ -57,6 +58,12 @@ export interface QeTaskRequest {
|
|
|
57
58
|
* `objective` (existing callers inject real oracles, e.g. a coverage/test run).
|
|
58
59
|
*/
|
|
59
60
|
oracleKind?: 'objective' | 'self-authored';
|
|
61
|
+
/**
|
|
62
|
+
* #6: the code under test, for the pattern cache. When set AND the executor
|
|
63
|
+
* has a `patternCache`, a cache hit (re-verified by `verify`) short-circuits
|
|
64
|
+
* generation entirely. Omit to disable caching for this task.
|
|
65
|
+
*/
|
|
66
|
+
cacheText?: string;
|
|
60
67
|
}
|
|
61
68
|
export interface TierAttempt {
|
|
62
69
|
tier: string;
|
|
@@ -113,6 +120,11 @@ export interface FreeTierExecutorOptions {
|
|
|
113
120
|
* Omit ⇒ single-model best-of-k (unchanged).
|
|
114
121
|
*/
|
|
115
122
|
candidateProviders?: FreeTierProviderConfig[];
|
|
123
|
+
/**
|
|
124
|
+
* #6: ruvLLM-style pattern cache. When provided and a request carries
|
|
125
|
+
* `cacheText`, a verified cache hit skips all LLM tiers. Omit to disable.
|
|
126
|
+
*/
|
|
127
|
+
patternCache?: TestGenPatternCache;
|
|
116
128
|
/** D9 sink: record each completed task outcome (→ routing-feedback). */
|
|
117
129
|
onOutcome?: (o: {
|
|
118
130
|
agentId: string;
|
|
@@ -139,6 +151,8 @@ export declare class FreeTierEscalatingExecutor {
|
|
|
139
151
|
private readonly onOutcome?;
|
|
140
152
|
/** Resolved cross-model generator pool (A12); undefined ⇒ single-model best-of-k. */
|
|
141
153
|
private readonly candidateProviders?;
|
|
154
|
+
/** #6: optional pattern cache; undefined ⇒ caching disabled. */
|
|
155
|
+
private readonly patternCache?;
|
|
142
156
|
constructor(opts: FreeTierExecutorOptions);
|
|
143
157
|
/** Expose the tracker so a coordinator can inspect/share adaptation state. */
|
|
144
158
|
getTracker(): AutoEscalationTracker<string>;
|
|
@@ -34,8 +34,11 @@ export class FreeTierEscalatingExecutor {
|
|
|
34
34
|
onOutcome;
|
|
35
35
|
/** Resolved cross-model generator pool (A12); undefined ⇒ single-model best-of-k. */
|
|
36
36
|
candidateProviders;
|
|
37
|
+
/** #6: optional pattern cache; undefined ⇒ caching disabled. */
|
|
38
|
+
patternCache;
|
|
37
39
|
constructor(opts) {
|
|
38
40
|
this.ladder = opts.ladder;
|
|
41
|
+
this.patternCache = opts.patternCache;
|
|
39
42
|
this.claudeRunner = opts.claudeRunner;
|
|
40
43
|
this.env = opts.env ?? process.env;
|
|
41
44
|
this.onOutcome = opts.onOutcome;
|
|
@@ -124,6 +127,20 @@ export class FreeTierEscalatingExecutor {
|
|
|
124
127
|
let passedAtStart = false;
|
|
125
128
|
const t0 = Date.now();
|
|
126
129
|
let result = { ok: false, content: '', tierUsed: startTier, escalated: false, repaired: false, bestOf: false, goodhartGuarded: false, attempts };
|
|
130
|
+
// #6: pattern-cache skip. A hit is only a CANDIDATE — re-verify with the same
|
|
131
|
+
// objective oracle before returning, so a stale/wrong hit falls through to
|
|
132
|
+
// real generation. Cache hits are NOT fed to the tracker/onOutcome (they are
|
|
133
|
+
// not a tier-capability signal).
|
|
134
|
+
if (this.patternCache && req.cacheText) {
|
|
135
|
+
const cached = await this.patternCache.lookup(req.cacheText);
|
|
136
|
+
if (cached !== undefined) {
|
|
137
|
+
const verdict = normalizeVerdict(await Promise.resolve(req.verify(cached)));
|
|
138
|
+
attempts.push({ tier: 'cache', provider: 'free-tier', repairRound: 0, ok: true, passed: verdict.passed, latencyMs: 0, feedback: verdict.feedback });
|
|
139
|
+
if (verdict.passed) {
|
|
140
|
+
return { ok: true, content: cached, tierUsed: 'cache', escalated: false, repaired: false, bestOf: false, goodhartGuarded: !objectiveOracle, attempts };
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
127
144
|
outer: for (let idx = startIdx; idx <= topIdx; idx++) {
|
|
128
145
|
const tier = order[idx];
|
|
129
146
|
const resolved = resolveTier(this.ladder, tier, this.env);
|
|
@@ -151,6 +168,10 @@ export class FreeTierEscalatingExecutor {
|
|
|
151
168
|
passedAtStart = true;
|
|
152
169
|
if (verdict.passed) {
|
|
153
170
|
result = { ok: true, content: run.content, tierUsed: tier, escalated: idx > startIdx, repaired: round > 0, bestOf: round === 0 && k > 0, goodhartGuarded: false, attempts };
|
|
171
|
+
// #6: cache the VERIFIED output so an identical/near-identical code
|
|
172
|
+
// under test can skip generation next time.
|
|
173
|
+
if (this.patternCache && req.cacheText)
|
|
174
|
+
await this.patternCache.put(req.cacheText, run.content);
|
|
154
175
|
break outer;
|
|
155
176
|
}
|
|
156
177
|
result = { ok: false, content: run.content || result.content, tierUsed: tier, escalated: idx > startIdx, repaired: round > 0, bestOf: false, goodhartGuarded: false, attempts };
|
|
@@ -10,6 +10,7 @@ export type { FreeTierKind, FreeTierProviderConfig, ResolvedFreeTierProvider, Ti
|
|
|
10
10
|
export { FREE_TIER_PRESETS, resolveFreeTierProvider, freeTierChat, freeTierHealth, type ChatMessage, type FreeTierChatResult, } from './provider.js';
|
|
11
11
|
export { defaultFreeTierLadder, validateLadder, createFreeTierEscalation, resolveTier, type ResolvedTier, } from './ladder.js';
|
|
12
12
|
export { FreeTierEscalatingExecutor, type ClaudeTierRunner, type QeVerifier, type QeVerdict, type QeTaskRequest, type QeExecutionResult, type TierAttempt, type FreeTierExecutorOptions, } from './executor.js';
|
|
13
|
+
export { TestGenPatternCache, normalizeCode, cosineSimilarity, type CodeEmbedder, type PatternCacheOptions, } from './pattern-cache.js';
|
|
13
14
|
export { createRoutingFeedbackSink, type RoutingFeedbackLike, type FreeTierOutcomeEvent, type RoutingFeedbackSinkOptions, } from './feedback-sink.js';
|
|
14
15
|
export { buildFreeTierExecutor, runFreeTierTextTask, DEFAULT_FREE_TIER_MODEL, type FreeTierCoordinatorConfig, type FreeTierLlmRouter, type BuildFreeTierExecutorOptions, } from './coordinator-support.js';
|
|
15
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { FREE_TIER_PRESETS, resolveFreeTierProvider, freeTierChat, freeTierHealth, } from './provider.js';
|
|
2
2
|
export { defaultFreeTierLadder, validateLadder, createFreeTierEscalation, resolveTier, } from './ladder.js';
|
|
3
3
|
export { FreeTierEscalatingExecutor, } from './executor.js';
|
|
4
|
+
export { TestGenPatternCache, normalizeCode, cosineSimilarity, } from './pattern-cache.js';
|
|
4
5
|
export { createRoutingFeedbackSink, } from './feedback-sink.js';
|
|
5
6
|
export { buildFreeTierExecutor, runFreeTierTextTask, DEFAULT_FREE_TIER_MODEL, } from './coordinator-support.js';
|
|
6
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ruvLLM-style test-gen pattern cache (#6).
|
|
3
|
+
*
|
|
4
|
+
* The local test-gen model is the slow part of the free tier (a thinking MoE
|
|
5
|
+
* spends ~100s/gen). This cache lets the executor SKIP generation when it has
|
|
6
|
+
* already produced a durable test for the same — or near-identical — code under
|
|
7
|
+
* test. Two tiers:
|
|
8
|
+
* 1. exact: normalized-source key match (whitespace/comments stripped).
|
|
9
|
+
* 2. similarity: cosine over an injected code embedding, ≥ threshold.
|
|
10
|
+
*
|
|
11
|
+
* SAFETY: a cache hit is only a CANDIDATE. The executor re-runs the same
|
|
12
|
+
* objective oracle on it before use, so a stale or wrong-but-similar hit simply
|
|
13
|
+
* fails verification and falls through to real generation — the cache can never
|
|
14
|
+
* bypass the oracle. Only outputs that PASSED verification are stored.
|
|
15
|
+
*
|
|
16
|
+
* Persistence: in-memory + per-process by design — it opens no database, so it
|
|
17
|
+
* does not touch the unified memory.db (ADR). A durable variant would go through
|
|
18
|
+
* the unified memory layer; out of scope here.
|
|
19
|
+
*/
|
|
20
|
+
/** Minimal embedder contract (subset of IEmbeddingProvider), injected & optional. */
|
|
21
|
+
export interface CodeEmbedder {
|
|
22
|
+
embed(text: string): Promise<number[]>;
|
|
23
|
+
}
|
|
24
|
+
export interface PatternCacheOptions {
|
|
25
|
+
/** Optional embedder; without it only the exact-match tier is active. */
|
|
26
|
+
embedder?: CodeEmbedder;
|
|
27
|
+
/** Cosine threshold for a similarity hit (default 0.97 — deliberately strict). */
|
|
28
|
+
similarityThreshold?: number;
|
|
29
|
+
/** Max entries retained (LRU by insertion/last-hit); default 200. */
|
|
30
|
+
maxEntries?: number;
|
|
31
|
+
}
|
|
32
|
+
/** Strip line/block comments and collapse whitespace → stable exact-match key. */
|
|
33
|
+
export declare function normalizeCode(code: string): string;
|
|
34
|
+
/** Cosine similarity of two equal-length vectors; 0 for empty/mismatched/zero. */
|
|
35
|
+
export declare function cosineSimilarity(a: number[], b: number[]): number;
|
|
36
|
+
export declare class TestGenPatternCache {
|
|
37
|
+
private readonly embedder?;
|
|
38
|
+
private readonly threshold;
|
|
39
|
+
private readonly maxEntries;
|
|
40
|
+
/** key = normalized code; Map preserves insertion order for cheap LRU eviction. */
|
|
41
|
+
private readonly store;
|
|
42
|
+
private hits;
|
|
43
|
+
private misses;
|
|
44
|
+
constructor(opts?: PatternCacheOptions);
|
|
45
|
+
get stats(): {
|
|
46
|
+
size: number;
|
|
47
|
+
hits: number;
|
|
48
|
+
misses: number;
|
|
49
|
+
};
|
|
50
|
+
/** Return a cached test for `code` (exact, then similarity), or undefined. */
|
|
51
|
+
lookup(code: string): Promise<string | undefined>;
|
|
52
|
+
/** Cache a VERIFIED test for `code`. Computes an embedding when an embedder is set. */
|
|
53
|
+
put(code: string, test: string): Promise<void>;
|
|
54
|
+
private touch;
|
|
55
|
+
private evictIfNeeded;
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=pattern-cache.d.ts.map
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ruvLLM-style test-gen pattern cache (#6).
|
|
3
|
+
*
|
|
4
|
+
* The local test-gen model is the slow part of the free tier (a thinking MoE
|
|
5
|
+
* spends ~100s/gen). This cache lets the executor SKIP generation when it has
|
|
6
|
+
* already produced a durable test for the same — or near-identical — code under
|
|
7
|
+
* test. Two tiers:
|
|
8
|
+
* 1. exact: normalized-source key match (whitespace/comments stripped).
|
|
9
|
+
* 2. similarity: cosine over an injected code embedding, ≥ threshold.
|
|
10
|
+
*
|
|
11
|
+
* SAFETY: a cache hit is only a CANDIDATE. The executor re-runs the same
|
|
12
|
+
* objective oracle on it before use, so a stale or wrong-but-similar hit simply
|
|
13
|
+
* fails verification and falls through to real generation — the cache can never
|
|
14
|
+
* bypass the oracle. Only outputs that PASSED verification are stored.
|
|
15
|
+
*
|
|
16
|
+
* Persistence: in-memory + per-process by design — it opens no database, so it
|
|
17
|
+
* does not touch the unified memory.db (ADR). A durable variant would go through
|
|
18
|
+
* the unified memory layer; out of scope here.
|
|
19
|
+
*/
|
|
20
|
+
/** Strip line/block comments and collapse whitespace → stable exact-match key. */
|
|
21
|
+
export function normalizeCode(code) {
|
|
22
|
+
return stripBlockComments(code)
|
|
23
|
+
.replace(/\/\/[^\n]*/g, ' ') // line comments (linear, single quantifier)
|
|
24
|
+
.replace(/\s+/g, ' ')
|
|
25
|
+
.trim();
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Remove `/* ... *\/` block comments in a single linear pass. A regex here
|
|
29
|
+
* (`/\/\*[\s\S]*?\*\//g`) backtracks polynomially on unterminated `/*` input —
|
|
30
|
+
* a ReDoS CodeQL flags — so we scan with native `indexOf` instead. An
|
|
31
|
+
* unterminated block comment is left in place, matching the old regex behavior.
|
|
32
|
+
*/
|
|
33
|
+
function stripBlockComments(code) {
|
|
34
|
+
let out = '';
|
|
35
|
+
let i = 0;
|
|
36
|
+
const n = code.length;
|
|
37
|
+
while (i < n) {
|
|
38
|
+
if (code.charCodeAt(i) === 47 /* / */ && code.charCodeAt(i + 1) === 42 /* * */) {
|
|
39
|
+
const end = code.indexOf('*/', i + 2);
|
|
40
|
+
if (end === -1) {
|
|
41
|
+
out += code.slice(i);
|
|
42
|
+
break;
|
|
43
|
+
} // unterminated → leave as-is
|
|
44
|
+
out += ' ';
|
|
45
|
+
i = end + 2;
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
out += code[i];
|
|
49
|
+
i += 1;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return out;
|
|
53
|
+
}
|
|
54
|
+
/** Cosine similarity of two equal-length vectors; 0 for empty/mismatched/zero. */
|
|
55
|
+
export function cosineSimilarity(a, b) {
|
|
56
|
+
if (a.length === 0 || a.length !== b.length)
|
|
57
|
+
return 0;
|
|
58
|
+
let dot = 0, na = 0, nb = 0;
|
|
59
|
+
for (let i = 0; i < a.length; i++) {
|
|
60
|
+
dot += a[i] * b[i];
|
|
61
|
+
na += a[i] * a[i];
|
|
62
|
+
nb += b[i] * b[i];
|
|
63
|
+
}
|
|
64
|
+
if (na === 0 || nb === 0)
|
|
65
|
+
return 0;
|
|
66
|
+
return dot / (Math.sqrt(na) * Math.sqrt(nb));
|
|
67
|
+
}
|
|
68
|
+
export class TestGenPatternCache {
|
|
69
|
+
embedder;
|
|
70
|
+
threshold;
|
|
71
|
+
maxEntries;
|
|
72
|
+
/** key = normalized code; Map preserves insertion order for cheap LRU eviction. */
|
|
73
|
+
store = new Map();
|
|
74
|
+
hits = 0;
|
|
75
|
+
misses = 0;
|
|
76
|
+
constructor(opts = {}) {
|
|
77
|
+
this.embedder = opts.embedder;
|
|
78
|
+
this.threshold = opts.similarityThreshold ?? 0.97;
|
|
79
|
+
this.maxEntries = Math.max(1, opts.maxEntries ?? 200);
|
|
80
|
+
}
|
|
81
|
+
get stats() {
|
|
82
|
+
return { size: this.store.size, hits: this.hits, misses: this.misses };
|
|
83
|
+
}
|
|
84
|
+
/** Return a cached test for `code` (exact, then similarity), or undefined. */
|
|
85
|
+
async lookup(code) {
|
|
86
|
+
const key = normalizeCode(code);
|
|
87
|
+
const exact = this.store.get(key);
|
|
88
|
+
if (exact) {
|
|
89
|
+
this.touch(key, exact);
|
|
90
|
+
this.hits++;
|
|
91
|
+
return exact.test;
|
|
92
|
+
}
|
|
93
|
+
if (this.embedder) {
|
|
94
|
+
let query;
|
|
95
|
+
try {
|
|
96
|
+
query = await this.embedder.embed(key);
|
|
97
|
+
}
|
|
98
|
+
catch {
|
|
99
|
+
this.misses++;
|
|
100
|
+
return undefined; // embedder unavailable → no similarity tier this call
|
|
101
|
+
}
|
|
102
|
+
let best;
|
|
103
|
+
for (const [k, entry] of this.store) {
|
|
104
|
+
if (!entry.embedding)
|
|
105
|
+
continue;
|
|
106
|
+
const sim = cosineSimilarity(query, entry.embedding);
|
|
107
|
+
if (sim >= this.threshold && (!best || sim > best.sim))
|
|
108
|
+
best = { key: k, entry, sim };
|
|
109
|
+
}
|
|
110
|
+
if (best) {
|
|
111
|
+
this.touch(best.key, best.entry);
|
|
112
|
+
this.hits++;
|
|
113
|
+
return best.entry.test;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
this.misses++;
|
|
117
|
+
return undefined;
|
|
118
|
+
}
|
|
119
|
+
/** Cache a VERIFIED test for `code`. Computes an embedding when an embedder is set. */
|
|
120
|
+
async put(code, test) {
|
|
121
|
+
const key = normalizeCode(code);
|
|
122
|
+
let embedding;
|
|
123
|
+
if (this.embedder) {
|
|
124
|
+
try {
|
|
125
|
+
embedding = await this.embedder.embed(key);
|
|
126
|
+
}
|
|
127
|
+
catch {
|
|
128
|
+
embedding = undefined; // still cache for the exact-match tier
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
this.store.delete(key); // re-insert so it becomes most-recent
|
|
132
|
+
this.store.set(key, { test, embedding });
|
|
133
|
+
this.evictIfNeeded();
|
|
134
|
+
}
|
|
135
|
+
touch(key, entry) {
|
|
136
|
+
this.store.delete(key);
|
|
137
|
+
this.store.set(key, entry);
|
|
138
|
+
}
|
|
139
|
+
evictIfNeeded() {
|
|
140
|
+
while (this.store.size > this.maxEntries) {
|
|
141
|
+
const oldest = this.store.keys().next().value;
|
|
142
|
+
if (oldest === undefined)
|
|
143
|
+
break;
|
|
144
|
+
this.store.delete(oldest);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
//# sourceMappingURL=pattern-cache.js.map
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* universal `/v1/chat/completions` shape (verified live against the M5 host
|
|
7
7
|
* Ollama on 2026-06-19) and is reasoning-model aware.
|
|
8
8
|
*/
|
|
9
|
+
import { resolveOllamaBaseUrl } from '../../shared/llm/ollama-url.js';
|
|
9
10
|
/**
|
|
10
11
|
* Endpoint presets. `local-ollama` defaults to the Docker-Desktop host gateway
|
|
11
12
|
* (the M5 host) — override baseUrl to 'http://localhost:11434/v1' for a same-box
|
|
@@ -28,7 +29,14 @@ export function resolveFreeTierProvider(cfg, env = process.env) {
|
|
|
28
29
|
const preset = FREE_TIER_PRESETS[cfg.kind];
|
|
29
30
|
if (!preset)
|
|
30
31
|
throw new Error(`free-tier: unknown provider kind "${cfg.kind}"`);
|
|
31
|
-
|
|
32
|
+
// For the local Ollama preset, honour AQE_OLLAMA_URL / OLLAMA_URL (keeping the
|
|
33
|
+
// host.docker.internal default + the /v1 OpenAI-compat suffix) so the free
|
|
34
|
+
// tier follows the same single knob as every other local client. An explicit
|
|
35
|
+
// cfg.baseUrl still wins.
|
|
36
|
+
const presetBaseUrl = cfg.kind === 'local-ollama' && !cfg.baseUrl
|
|
37
|
+
? `${resolveOllamaBaseUrl('http://host.docker.internal:11434', env)}/v1`
|
|
38
|
+
: preset.baseUrl;
|
|
39
|
+
const baseUrl = (cfg.baseUrl ?? presetBaseUrl).replace(/\/$/, '');
|
|
32
40
|
if (!baseUrl) {
|
|
33
41
|
throw new Error(`free-tier: kind "${cfg.kind}" requires an explicit baseUrl`);
|
|
34
42
|
}
|
|
@@ -48,6 +48,9 @@ export function paretoFrontier(models) {
|
|
|
48
48
|
export const MEASURED_QE_TEST_GEN = [
|
|
49
49
|
{ model: 'qwen3:8b', quality: 0.0, costPerInstance: 0 }, // D3: below the generation floor (0/3 valid)
|
|
50
50
|
{ model: 'qwen3:30b-a3b', quality: 0.62, costPerInstance: 0 }, // D3: clears the floor (best-of-k ~0.673 on judged)
|
|
51
|
+
{ model: 'qwen3-coder:30b', quality: 0.62, costPerInstance: 0 }, // 2026-06-29 oracle bench: ties 30b-a3b (both 6/8, 75% mut) but ~14× faster wall-clock; default local test-gen model
|
|
52
|
+
{ model: 'qwen2.5-coder:7b', quality: 0.50, costPerInstance: 0 }, // 2026-06-29: stock 7B coder = 4/8 (50%) — beats general qwen3:8b (38%), 16× faster; ~25pp below 30B (PEFT-tune target)
|
|
53
|
+
{ model: 'qwen2.5-coder:1.5b', quality: 0.08, costPerInstance: 0 }, // 2026-06-29: stock 1.5B coder = 1/8 (8%); below floor, size dominates coder-tuning at tiny scale
|
|
51
54
|
{ model: 'z-ai/glm-5.2', quality: 0.71, costPerInstance: 0.0065 }, // A12: diverse, higher per-model best
|
|
52
55
|
{ model: 'claude-sonnet-4-6', quality: 0.83, costPerInstance: 0.045 }, // D3: frontier ceiling
|
|
53
56
|
];
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { toError } from '../error-utils.js';
|
|
6
6
|
import { EMBEDDING_CONFIG, } from './types';
|
|
7
|
+
import { resolveOllamaBaseUrl } from '../llm/ollama-url.js';
|
|
7
8
|
/**
|
|
8
9
|
* Client for Ollama API
|
|
9
10
|
*/
|
|
@@ -12,7 +13,7 @@ export class OllamaClient {
|
|
|
12
13
|
maxRetries;
|
|
13
14
|
retryDelayMs;
|
|
14
15
|
timeoutMs;
|
|
15
|
-
constructor(baseUrl = EMBEDDING_CONFIG.DEFAULT_OLLAMA_URL, maxRetries = EMBEDDING_CONFIG.MAX_RETRIES, retryDelayMs = EMBEDDING_CONFIG.RETRY_DELAY_MS, timeoutMs = EMBEDDING_CONFIG.TIMEOUT_MS) {
|
|
16
|
+
constructor(baseUrl = resolveOllamaBaseUrl(EMBEDDING_CONFIG.DEFAULT_OLLAMA_URL), maxRetries = EMBEDDING_CONFIG.MAX_RETRIES, retryDelayMs = EMBEDDING_CONFIG.RETRY_DELAY_MS, timeoutMs = EMBEDDING_CONFIG.TIMEOUT_MS) {
|
|
16
17
|
this.baseUrl = baseUrl.replace(/\/$/, ''); // Remove trailing slash
|
|
17
18
|
this.maxRetries = maxRetries;
|
|
18
19
|
this.retryDelayMs = retryDelayMs;
|
|
@@ -282,6 +282,32 @@ export const MODEL_MAPPINGS = {
|
|
|
282
282
|
openrouter: 'qwen/qwen-2-7b-instruct',
|
|
283
283
|
},
|
|
284
284
|
},
|
|
285
|
+
// Qwen3 local models (Ollama). Canonical id == Ollama tag so normalizeModelId
|
|
286
|
+
// resolves the tags AQE's local clients actually use.
|
|
287
|
+
'qwen3:8b': {
|
|
288
|
+
canonical: 'Qwen3 8B',
|
|
289
|
+
family: 'qwen',
|
|
290
|
+
tier: 'economy',
|
|
291
|
+
providers: {
|
|
292
|
+
ollama: 'qwen3:8b',
|
|
293
|
+
},
|
|
294
|
+
},
|
|
295
|
+
'qwen3:30b-a3b': {
|
|
296
|
+
canonical: 'Qwen3 30B-A3B',
|
|
297
|
+
family: 'qwen',
|
|
298
|
+
tier: 'economy',
|
|
299
|
+
providers: {
|
|
300
|
+
ollama: 'qwen3:30b-a3b',
|
|
301
|
+
},
|
|
302
|
+
},
|
|
303
|
+
'qwen3-coder:30b': {
|
|
304
|
+
canonical: 'Qwen3 Coder 30B-A3B',
|
|
305
|
+
family: 'qwen',
|
|
306
|
+
tier: 'economy',
|
|
307
|
+
providers: {
|
|
308
|
+
ollama: 'qwen3-coder:30b',
|
|
309
|
+
},
|
|
310
|
+
},
|
|
285
311
|
};
|
|
286
312
|
// ============================================================================
|
|
287
313
|
// Reverse Lookup Table (Provider-specific ID -> Canonical ID)
|
|
@@ -128,6 +128,16 @@ export declare const MODEL_REGISTRY: Record<string, Omit<ModelInfo, 'id' | 'prov
|
|
|
128
128
|
* ```
|
|
129
129
|
*/
|
|
130
130
|
export declare function getModelCapabilities(modelId: string): ModelCapabilities;
|
|
131
|
+
/**
|
|
132
|
+
* Whether a model is KNOWN to support tool / function calling.
|
|
133
|
+
*
|
|
134
|
+
* Fail-open: an unknown model id (not in the registry) returns `true` so a
|
|
135
|
+
* capability guard never strands a request on an unrecognized id — the guard
|
|
136
|
+
* only acts on models the registry explicitly marks tool-less.
|
|
137
|
+
*
|
|
138
|
+
* @param modelId - Any model ID (canonical or provider-specific)
|
|
139
|
+
*/
|
|
140
|
+
export declare function modelSupportsTools(modelId: string): boolean;
|
|
131
141
|
/**
|
|
132
142
|
* Get cost information for a model
|
|
133
143
|
*
|
|
@@ -686,6 +686,81 @@ export const MODEL_REGISTRY = {
|
|
|
686
686
|
outputCostPerMillion: 0,
|
|
687
687
|
},
|
|
688
688
|
},
|
|
689
|
+
'qwen3:8b': {
|
|
690
|
+
name: 'Qwen3 8B',
|
|
691
|
+
family: 'qwen',
|
|
692
|
+
tier: 'economy',
|
|
693
|
+
description: 'Alibaba Qwen3 8B — tools + thinking; below the QE test-gen floor (use for judge/triage)',
|
|
694
|
+
releaseDate: '2025-04-29',
|
|
695
|
+
recommended: false,
|
|
696
|
+
capabilities: {
|
|
697
|
+
contextLength: 40960,
|
|
698
|
+
maxOutputTokens: 8192,
|
|
699
|
+
supportsTools: true,
|
|
700
|
+
supportsStreaming: true,
|
|
701
|
+
supportsVision: false,
|
|
702
|
+
supportsJsonMode: true,
|
|
703
|
+
supportsSystemPrompt: true,
|
|
704
|
+
supportsExtendedThinking: true,
|
|
705
|
+
supportsMCP: false,
|
|
706
|
+
supportsEmbeddings: false,
|
|
707
|
+
supportsCodeExecution: false,
|
|
708
|
+
},
|
|
709
|
+
cost: {
|
|
710
|
+
inputCostPerMillion: 0,
|
|
711
|
+
outputCostPerMillion: 0,
|
|
712
|
+
},
|
|
713
|
+
},
|
|
714
|
+
'qwen3:30b-a3b': {
|
|
715
|
+
name: 'Qwen3 30B-A3B',
|
|
716
|
+
family: 'qwen',
|
|
717
|
+
tier: 'economy',
|
|
718
|
+
description: 'Alibaba Qwen3 30B MoE (3B active) — fast general local model; clears the QE test-gen floor',
|
|
719
|
+
releaseDate: '2025-04-29',
|
|
720
|
+
recommended: true,
|
|
721
|
+
capabilities: {
|
|
722
|
+
contextLength: 262144,
|
|
723
|
+
maxOutputTokens: 8192,
|
|
724
|
+
supportsTools: true,
|
|
725
|
+
supportsStreaming: true,
|
|
726
|
+
supportsVision: false,
|
|
727
|
+
supportsJsonMode: true,
|
|
728
|
+
supportsSystemPrompt: true,
|
|
729
|
+
supportsExtendedThinking: true,
|
|
730
|
+
supportsMCP: false,
|
|
731
|
+
supportsEmbeddings: false,
|
|
732
|
+
supportsCodeExecution: false,
|
|
733
|
+
},
|
|
734
|
+
cost: {
|
|
735
|
+
inputCostPerMillion: 0,
|
|
736
|
+
outputCostPerMillion: 0,
|
|
737
|
+
},
|
|
738
|
+
},
|
|
739
|
+
'qwen3-coder:30b': {
|
|
740
|
+
name: 'Qwen3 Coder 30B-A3B',
|
|
741
|
+
family: 'qwen',
|
|
742
|
+
tier: 'economy',
|
|
743
|
+
description: 'Alibaba Qwen3-Coder 30B MoE (3B active) — code-tuned, non-thinking; preferred local QE test-gen model',
|
|
744
|
+
releaseDate: '2025-07-31',
|
|
745
|
+
recommended: true,
|
|
746
|
+
capabilities: {
|
|
747
|
+
contextLength: 262144,
|
|
748
|
+
maxOutputTokens: 8192,
|
|
749
|
+
supportsTools: true,
|
|
750
|
+
supportsStreaming: true,
|
|
751
|
+
supportsVision: false,
|
|
752
|
+
supportsJsonMode: true,
|
|
753
|
+
supportsSystemPrompt: true,
|
|
754
|
+
supportsExtendedThinking: false,
|
|
755
|
+
supportsMCP: false,
|
|
756
|
+
supportsEmbeddings: false,
|
|
757
|
+
supportsCodeExecution: false,
|
|
758
|
+
},
|
|
759
|
+
cost: {
|
|
760
|
+
inputCostPerMillion: 0,
|
|
761
|
+
outputCostPerMillion: 0,
|
|
762
|
+
},
|
|
763
|
+
},
|
|
689
764
|
};
|
|
690
765
|
// ============================================================================
|
|
691
766
|
// Core Functions
|
|
@@ -716,6 +791,23 @@ export function getModelCapabilities(modelId) {
|
|
|
716
791
|
}
|
|
717
792
|
return { ...entry.capabilities };
|
|
718
793
|
}
|
|
794
|
+
/**
|
|
795
|
+
* Whether a model is KNOWN to support tool / function calling.
|
|
796
|
+
*
|
|
797
|
+
* Fail-open: an unknown model id (not in the registry) returns `true` so a
|
|
798
|
+
* capability guard never strands a request on an unrecognized id — the guard
|
|
799
|
+
* only acts on models the registry explicitly marks tool-less.
|
|
800
|
+
*
|
|
801
|
+
* @param modelId - Any model ID (canonical or provider-specific)
|
|
802
|
+
*/
|
|
803
|
+
export function modelSupportsTools(modelId) {
|
|
804
|
+
try {
|
|
805
|
+
return getModelCapabilities(modelId).supportsTools;
|
|
806
|
+
}
|
|
807
|
+
catch {
|
|
808
|
+
return true;
|
|
809
|
+
}
|
|
810
|
+
}
|
|
719
811
|
/**
|
|
720
812
|
* Get cost information for a model
|
|
721
813
|
*
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Single source of truth for resolving the local Ollama base URL.
|
|
3
|
+
*
|
|
4
|
+
* Precedence: AQE_OLLAMA_URL (project-namespaced) → OLLAMA_URL (generic) → the
|
|
5
|
+
* call-site's own default. Trailing slashes are stripped. This lets a user
|
|
6
|
+
* point every AQE local-model client (chat provider, consensus provider, local
|
|
7
|
+
* judge, embeddings, free-tier) at a non-localhost Ollama — a Docker host
|
|
8
|
+
* gateway (host.docker.internal), a remote GPU box — with ONE env var, while
|
|
9
|
+
* changing nothing when the vars are unset (each call-site keeps its own
|
|
10
|
+
* default via the `fallback` argument).
|
|
11
|
+
*
|
|
12
|
+
* The `env` parameter is injectable so resolution stays unit-testable without
|
|
13
|
+
* mutating process.env.
|
|
14
|
+
*/
|
|
15
|
+
export declare const DEFAULT_OLLAMA_BASE_URL = "http://localhost:11434";
|
|
16
|
+
export declare function resolveOllamaBaseUrl(fallback?: string, env?: NodeJS.ProcessEnv): string;
|
|
17
|
+
//# sourceMappingURL=ollama-url.d.ts.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Single source of truth for resolving the local Ollama base URL.
|
|
3
|
+
*
|
|
4
|
+
* Precedence: AQE_OLLAMA_URL (project-namespaced) → OLLAMA_URL (generic) → the
|
|
5
|
+
* call-site's own default. Trailing slashes are stripped. This lets a user
|
|
6
|
+
* point every AQE local-model client (chat provider, consensus provider, local
|
|
7
|
+
* judge, embeddings, free-tier) at a non-localhost Ollama — a Docker host
|
|
8
|
+
* gateway (host.docker.internal), a remote GPU box — with ONE env var, while
|
|
9
|
+
* changing nothing when the vars are unset (each call-site keeps its own
|
|
10
|
+
* default via the `fallback` argument).
|
|
11
|
+
*
|
|
12
|
+
* The `env` parameter is injectable so resolution stays unit-testable without
|
|
13
|
+
* mutating process.env.
|
|
14
|
+
*/
|
|
15
|
+
export const DEFAULT_OLLAMA_BASE_URL = 'http://localhost:11434';
|
|
16
|
+
export function resolveOllamaBaseUrl(fallback = DEFAULT_OLLAMA_BASE_URL, env = process.env) {
|
|
17
|
+
const raw = env['AQE_OLLAMA_URL'] ?? env['OLLAMA_URL'] ?? fallback;
|
|
18
|
+
// Strip trailing slashes via a linear char-scan — a `/\/+$/` regex backtracks
|
|
19
|
+
// polynomially on adversarial input (many '/'), a ReDoS flagged by CodeQL.
|
|
20
|
+
let end = raw.length;
|
|
21
|
+
while (end > 0 && raw.charCodeAt(end - 1) === 47 /* '/' */)
|
|
22
|
+
end -= 1;
|
|
23
|
+
return raw.slice(0, end);
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=ollama-url.js.map
|
|
@@ -17,7 +17,7 @@ import { safeJsonParse } from '../../safe-json.js';
|
|
|
17
17
|
* Default Gemini configuration
|
|
18
18
|
*/
|
|
19
19
|
export const DEFAULT_GEMINI_CONFIG = {
|
|
20
|
-
model: 'gemini-1.5-pro
|
|
20
|
+
model: 'gemini-2.5-flash', // gemini-1.5-pro was retired ("not found for API version"); 2.5-flash is current
|
|
21
21
|
maxTokens: 8192,
|
|
22
22
|
temperature: 0.7,
|
|
23
23
|
timeoutMs: 60000,
|
|
@@ -42,6 +42,10 @@ export const GEMINI_PRICING = {
|
|
|
42
42
|
'gemini-1.5-flash': { input: 0.075, output: 0.3 },
|
|
43
43
|
'gemini-1.5-flash-latest': { input: 0.075, output: 0.3 },
|
|
44
44
|
'gemini-2.0-flash-exp': { input: 0.075, output: 0.3 },
|
|
45
|
+
// Gemini 2.5 (current generation)
|
|
46
|
+
'gemini-2.5-pro': { input: 1.25, output: 10.0 },
|
|
47
|
+
'gemini-2.5-flash': { input: 0.3, output: 2.5 },
|
|
48
|
+
'gemini-flash-latest': { input: 0.3, output: 2.5 },
|
|
45
49
|
// Gemini Ultra (flagship)
|
|
46
50
|
'gemini-ultra': { input: 7.0, output: 21.0 },
|
|
47
51
|
'gemini-1.0-ultra': { input: 7.0, output: 21.0 },
|
|
@@ -393,15 +397,18 @@ export class GeminiProvider {
|
|
|
393
397
|
if (this.cachedModels) {
|
|
394
398
|
return this.cachedModels;
|
|
395
399
|
}
|
|
400
|
+
// Current text-generation models (verified via Gemini ListModels API 2026-06-27).
|
|
401
|
+
// Prefer the `-latest` aliases as defaults so they don't rot (gemini-1.5-pro was retired).
|
|
396
402
|
return [
|
|
397
|
-
'gemini-
|
|
398
|
-
'gemini-
|
|
399
|
-
'gemini-
|
|
400
|
-
'gemini-
|
|
401
|
-
'gemini-
|
|
402
|
-
'gemini-
|
|
403
|
-
'gemini-2.0-flash
|
|
404
|
-
'gemini-
|
|
403
|
+
'gemini-flash-latest',
|
|
404
|
+
'gemini-pro-latest',
|
|
405
|
+
'gemini-flash-lite-latest',
|
|
406
|
+
'gemini-2.5-pro',
|
|
407
|
+
'gemini-2.5-flash',
|
|
408
|
+
'gemini-2.5-flash-lite',
|
|
409
|
+
'gemini-2.0-flash',
|
|
410
|
+
'gemini-2.0-flash-lite',
|
|
411
|
+
'gemini-3.5-flash',
|
|
405
412
|
];
|
|
406
413
|
}
|
|
407
414
|
/**
|
|
@@ -485,7 +492,6 @@ export class GeminiProvider {
|
|
|
485
492
|
*/
|
|
486
493
|
handleApiError(status, data, model) {
|
|
487
494
|
const message = data.error?.message ?? 'Unknown API error';
|
|
488
|
-
const errorStatus = data.error?.status ?? '';
|
|
489
495
|
switch (status) {
|
|
490
496
|
case 400:
|
|
491
497
|
// Check for context length exceeded FIRST (message-based detection)
|