agentic-qe 3.15.2 → 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/helpers/brain-checkpoint.cjs +46 -6
- package/.claude/hooks/aqe-hook.cjs +280 -51
- package/.claude/skills/skills-manifest.json +1 -1
- package/CHANGELOG.md +155 -0
- package/assets/skills/skills-manifest.json +1 -1
- package/dist/adapters/ag-ui/state-delta-cache.js +14 -5
- package/dist/adapters/trajectory-adapter.js +3 -1
- package/dist/cli/bundle.js +5 -5
- package/dist/cli/chunks/adapter-T54G3TBK.js +2 -0
- package/dist/cli/chunks/{agent-booster-wasm-664M7426.js → agent-booster-wasm-MHJBRXMK.js} +2 -2
- package/dist/cli/chunks/{agent-handler-E47ITH45.js → agent-handler-G64SD7J2.js} +2 -2
- package/dist/cli/chunks/{agent-memory-branch-CFWVOJX3.js → agent-memory-branch-G4UXFPKH.js} +2 -2
- package/dist/cli/chunks/aqe-learning-engine-HLCJJ3JM.js +2 -0
- package/dist/cli/chunks/{arena-ZU5CGBGH.js → arena-63M3M6EW.js} +2 -2
- package/dist/cli/chunks/{arena-JM3OY263.js → arena-QJMKYPHS.js} +4 -4
- package/dist/cli/chunks/{audit-HVBRC5AS.js → audit-UDFVTWSX.js} +3 -3
- package/dist/cli/chunks/base-VLD755UU.js +2 -0
- package/dist/cli/chunks/{better-sqlite3-45JLBQX3.js → better-sqlite3-JLX2G56I.js} +2 -2
- package/dist/cli/chunks/{brain-handler-FKDONZYA.js → brain-handler-PWF32LLW.js} +3 -3
- package/dist/cli/chunks/{branch-enumerator-M3DPS3D5.js → branch-enumerator-PB7QWXDP.js} +2 -2
- package/dist/cli/chunks/{browser-TG2TV6NR.js → browser-CYNV2F3U.js} +2 -2
- package/dist/cli/chunks/browser-workflow-6M6VLWRF.js +2 -0
- package/dist/cli/chunks/{chunk-JFFVYCTV.js → chunk-2534PXIV.js} +2 -2
- package/dist/cli/chunks/{chunk-GHXNRF63.js → chunk-2DRMTRBM.js} +2 -2
- package/dist/cli/chunks/{chunk-L77Z3Q6L.js → chunk-2ICC4H6K.js} +2 -2
- package/dist/cli/chunks/{chunk-EATZW5T2.js → chunk-2LL35V3A.js} +2 -2
- package/dist/cli/chunks/{chunk-MEUJWTOX.js → chunk-2MU4WCMQ.js} +2 -2
- package/dist/cli/chunks/{chunk-3RC5UMRJ.js → chunk-33IUCP34.js} +2 -2
- package/dist/cli/chunks/{chunk-UX4BOI6K.js → chunk-35A22AUL.js} +1 -1
- package/dist/cli/chunks/{chunk-Z7XCXHEB.js → chunk-3BDDOFYW.js} +2 -2
- package/dist/cli/chunks/chunk-3C2BFLYC.js +54 -0
- package/dist/cli/chunks/{chunk-56CE7UO4.js → chunk-3MSBVOYW.js} +6 -6
- package/dist/cli/chunks/{chunk-EDRIROCG.js → chunk-3ZIVBTX6.js} +2 -2
- package/dist/cli/chunks/{chunk-CRYZXTSQ.js → chunk-4GLR2S2M.js} +2 -2
- package/dist/cli/chunks/{chunk-DHSGCI6H.js → chunk-54ITMOFM.js} +6 -6
- package/dist/cli/chunks/{chunk-2AWU2E6R.js → chunk-54XTJBHV.js} +1 -1
- package/dist/cli/chunks/{chunk-JSTKSPYT.js → chunk-5B5D5KCV.js} +1 -1
- package/dist/cli/chunks/{chunk-NP2WWIZ3.js → chunk-5GWTJJEO.js} +1 -1
- package/dist/cli/chunks/{chunk-D75HDHX3.js → chunk-5H7MR6HP.js} +1 -1
- package/dist/cli/chunks/{chunk-NWYAV2UG.js → chunk-5SS2Z7JC.js} +2 -2
- package/dist/cli/chunks/chunk-5XXLWJU7.js +2 -0
- package/dist/cli/chunks/{chunk-B4H66LPR.js → chunk-6EHVPFHW.js} +1 -1
- package/dist/cli/chunks/{chunk-HSXLHNSS.js → chunk-6HO3XRXE.js} +2 -2
- package/dist/cli/chunks/chunk-6HTO4BLV.js +2 -0
- package/dist/cli/chunks/{chunk-SVHFSOGT.js → chunk-6QPW4OVH.js} +1 -1
- package/dist/cli/chunks/{chunk-BKZSTZDB.js → chunk-6TMUZGM2.js} +1 -1
- package/dist/cli/chunks/{chunk-2AOAEMJG.js → chunk-73MTUM6F.js} +2 -2
- package/dist/cli/chunks/{chunk-ANI3KPB7.js → chunk-73PCVMGA.js} +2 -2
- package/dist/cli/chunks/{chunk-HADOG2PT.js → chunk-76PRW2KY.js} +2 -2
- package/dist/cli/chunks/{chunk-NL6HKEPR.js → chunk-7INP6HZH.js} +3 -3
- package/dist/cli/chunks/{chunk-QB7H62A4.js → chunk-7X2IVMXN.js} +2 -2
- package/dist/cli/chunks/{chunk-ZVQSIH7Y.js → chunk-A4OPQJ4A.js} +8 -8
- package/dist/cli/chunks/{chunk-SKQTRYE7.js → chunk-ADF6LGHZ.js} +2 -2
- package/dist/cli/chunks/{chunk-5YS2DF5G.js → chunk-AHVN3UQZ.js} +2 -2
- package/dist/cli/chunks/{chunk-3XF7YTQC.js → chunk-AOKSLWON.js} +54 -54
- package/dist/cli/chunks/{chunk-CFDIYZGA.js → chunk-ASKPTGUU.js} +2 -2
- package/dist/cli/chunks/{chunk-LH3H4V7C.js → chunk-B7GJXQD2.js} +2 -2
- package/dist/cli/chunks/{chunk-HOBBYORR.js → chunk-B7J3O2WM.js} +1 -1
- package/dist/cli/chunks/{chunk-J4EJMAH3.js → chunk-BBKLVHDQ.js} +1 -1
- package/dist/cli/chunks/{chunk-WMNVFCKY.js → chunk-BND6M2JX.js} +2 -2
- package/dist/cli/chunks/{chunk-LRVR56PD.js → chunk-BPGFCUDO.js} +1 -1
- package/dist/cli/chunks/{chunk-O6QTCUSL.js → chunk-BY3IL56R.js} +1 -1
- package/dist/cli/chunks/{chunk-3KXKJSKS.js → chunk-BY5PLEPZ.js} +32 -32
- package/dist/cli/chunks/{chunk-DGKPGRBT.js → chunk-BZWZTGMF.js} +2 -2
- package/dist/cli/chunks/{chunk-AS27JP67.js → chunk-C5EN5WB6.js} +1 -1
- package/dist/cli/chunks/chunk-CFXFGQEN.js +15 -0
- package/dist/cli/chunks/{chunk-X4CADOSD.js → chunk-CQ3WSTJ2.js} +2 -2
- package/dist/cli/chunks/{chunk-HFF5ERIE.js → chunk-D7RVZ5C2.js} +2 -2
- package/dist/cli/chunks/{chunk-HS3O763N.js → chunk-DAYMT7TH.js} +21 -21
- package/dist/cli/chunks/{chunk-W6PLBRRS.js → chunk-DBIK4OFX.js} +1 -1
- package/dist/cli/chunks/{chunk-OWZ3F7DJ.js → chunk-DEJM2P5K.js} +1 -1
- package/dist/cli/chunks/{chunk-TC4B5D4Z.js → chunk-DF4Y3HPO.js} +1 -1
- package/dist/cli/chunks/{chunk-7UA7SMM4.js → chunk-DFJGXXCL.js} +1 -1
- package/dist/cli/chunks/{chunk-SZYK5JL7.js → chunk-DPL4ZXTE.js} +1 -1
- package/dist/cli/chunks/{chunk-6WVEICL2.js → chunk-DVE5SM5G.js} +4 -4
- package/dist/cli/chunks/{chunk-QR5ILM34.js → chunk-EGHK6NMH.js} +2 -2
- package/dist/cli/chunks/{chunk-E6GANSLP.js → chunk-EWUFVWRT.js} +2 -2
- package/dist/cli/chunks/{chunk-HBMBO4FD.js → chunk-EY5IUF7U.js} +2 -2
- package/dist/cli/chunks/{chunk-JCB6K24D.js → chunk-FDK2GF4G.js} +2 -2
- package/dist/cli/chunks/{chunk-QZNFZ5IQ.js → chunk-FRBCX46J.js} +2 -2
- package/dist/cli/chunks/{chunk-FCMCQ6OX.js → chunk-G3ZUB3HD.js} +2 -2
- package/dist/cli/chunks/{chunk-QGCFMACF.js → chunk-GAXTPQCZ.js} +2 -2
- package/dist/cli/chunks/{chunk-6O4KVU4K.js → chunk-GJVRQBLI.js} +2 -2
- package/dist/cli/chunks/{chunk-NLY5NUHZ.js → chunk-GLKLEHK3.js} +2 -2
- package/dist/cli/chunks/{chunk-IM67YHDK.js → chunk-HCDTLV5J.js} +2 -2
- package/dist/cli/chunks/{chunk-MY2XZHW3.js → chunk-HEDLZWPM.js} +1 -1
- package/dist/cli/chunks/{chunk-WUSSZ2S6.js → chunk-HEKCN5XQ.js} +2 -2
- package/dist/cli/chunks/{chunk-FRZVLRVR.js → chunk-HFSBONCS.js} +2 -2
- package/dist/cli/chunks/{chunk-IAOB2G3X.js → chunk-HX5KQK7I.js} +2 -2
- package/dist/cli/chunks/{chunk-BT6TZTCL.js → chunk-I43QRLLB.js} +2 -2
- package/dist/cli/chunks/{chunk-QJN5RW2U.js → chunk-I53365HG.js} +3 -3
- package/dist/cli/chunks/{chunk-55T7PDYP.js → chunk-I5A3HGO6.js} +2 -2
- package/dist/cli/chunks/{chunk-AR5V7VNC.js → chunk-I6E4X3L3.js} +1 -1
- package/dist/cli/chunks/chunk-IKWAPHJA.js +2 -0
- package/dist/cli/chunks/{chunk-UKRK3IE3.js → chunk-ISASRHZP.js} +2 -2
- package/dist/cli/chunks/{chunk-IHKRKRAV.js → chunk-J3RNVHDH.js} +1 -1
- package/dist/cli/chunks/{chunk-T75PWWK4.js → chunk-JFQDWAU3.js} +2 -2
- package/dist/cli/chunks/{chunk-3KTAMNKI.js → chunk-JL3TI43V.js} +2 -2
- package/dist/cli/chunks/{chunk-3DCRAW43.js → chunk-K2VUYRMG.js} +2 -2
- package/dist/cli/chunks/{chunk-RIAKRZCZ.js → chunk-KOLHZSEC.js} +2 -2
- package/dist/cli/chunks/{chunk-HXT4XDQO.js → chunk-LGA6J4I4.js} +2 -2
- package/dist/cli/chunks/{chunk-MDDECCAC.js → chunk-LJRZAALA.js} +169 -168
- package/dist/cli/chunks/{chunk-2B2MGJ2W.js → chunk-LOLAEDZD.js} +2 -2
- package/dist/cli/chunks/{chunk-2JEPRQMT.js → chunk-LPSE6DOQ.js} +1 -1
- package/dist/cli/chunks/{chunk-6KEYA4EH.js → chunk-LRTF5RMG.js} +4 -4
- package/dist/cli/chunks/{chunk-CV7E627D.js → chunk-LXYTC62V.js} +2 -2
- package/dist/cli/chunks/{chunk-YYVLMW65.js → chunk-LY53L6NH.js} +2 -2
- package/dist/cli/chunks/{chunk-HMDSBWF6.js → chunk-LZSLJJII.js} +2 -2
- package/dist/cli/chunks/{chunk-IT753IPZ.js → chunk-M6SJALLA.js} +2 -2
- package/dist/cli/chunks/{chunk-GDSLQTJC.js → chunk-MBV57LKC.js} +2 -2
- package/dist/cli/chunks/{chunk-I7J2ESGR.js → chunk-MGH4XIHH.js} +2 -2
- package/dist/cli/chunks/{chunk-Q32UGPWK.js → chunk-MVTUFPM2.js} +2 -2
- package/dist/cli/chunks/{chunk-UZL4JYVW.js → chunk-N6CRIUTO.js} +2 -2
- package/dist/cli/chunks/{chunk-326V7N25.js → chunk-NBMQOP2R.js} +1 -1
- package/dist/cli/chunks/{chunk-ZIKH7U5A.js → chunk-NIJMLEAX.js} +2 -2
- package/dist/cli/chunks/{chunk-MYDZBABD.js → chunk-O7TMY4GS.js} +2 -2
- package/dist/cli/chunks/{chunk-LVDZ25VX.js → chunk-OFQDM73J.js} +2 -2
- package/dist/cli/chunks/{chunk-WBZIOTY6.js → chunk-OG4KHX7S.js} +2 -2
- package/dist/cli/chunks/{chunk-GJTH6VBH.js → chunk-OHH6BUZK.js} +1 -1
- package/dist/cli/chunks/{chunk-T5N2PIPS.js → chunk-OOK6GPJR.js} +2 -2
- package/dist/cli/chunks/{chunk-AXJ75X6I.js → chunk-P7GM3EE7.js} +1 -1
- package/dist/cli/chunks/{chunk-IQB5ZBYO.js → chunk-PB2WSCBW.js} +3 -3
- package/dist/cli/chunks/{chunk-M36DAETL.js → chunk-PCWZCXBD.js} +2 -2
- package/dist/cli/chunks/{chunk-Z3PANQUT.js → chunk-PEA4DVXW.js} +1 -1
- package/dist/cli/chunks/{chunk-WBCE6V2N.js → chunk-PJAXWCFC.js} +1 -1
- package/dist/cli/chunks/{chunk-V67UQRQN.js → chunk-PMXWDTDK.js} +2 -2
- package/dist/cli/chunks/chunk-QIAX3JJB.js +3 -0
- package/dist/cli/chunks/chunk-R47LNH5W.js +2 -0
- package/dist/cli/chunks/{chunk-A6L2OCMO.js → chunk-RA3MI5WK.js} +2 -2
- package/dist/cli/chunks/{chunk-ITM26I6O.js → chunk-RB2SL5GD.js} +2 -2
- package/dist/cli/chunks/{chunk-XQBH3366.js → chunk-RG67RZIX.js} +2 -2
- package/dist/cli/chunks/{chunk-NBV37CEK.js → chunk-RI4JPBZD.js} +2 -2
- package/dist/cli/chunks/{chunk-2Q4Y3VQ6.js → chunk-RJ5CZ7B6.js} +2 -2
- package/dist/cli/chunks/{chunk-ATGIGJSL.js → chunk-RJMBHZYL.js} +1 -1
- package/dist/cli/chunks/{chunk-MOSXT6AO.js → chunk-RWZ4F44Y.js} +2 -2
- package/dist/cli/chunks/{chunk-URWT3EQT.js → chunk-S5D3HCGN.js} +2 -2
- package/dist/cli/chunks/{chunk-KQMCCHPO.js → chunk-SCL2OYN7.js} +2 -2
- package/dist/cli/chunks/{chunk-Y5VPLOA7.js → chunk-SIUUAKCE.js} +1 -1
- package/dist/cli/chunks/{chunk-JIRX6KUR.js → chunk-SJB4KMZS.js} +3 -3
- package/dist/cli/chunks/{chunk-TZH2QAFZ.js → chunk-SOSJFEFB.js} +2 -2
- package/dist/cli/chunks/{chunk-IBAXNCR2.js → chunk-SZWXUG36.js} +2 -2
- package/dist/cli/chunks/{chunk-KTLYL3BS.js → chunk-T3BMCEQR.js} +2 -2
- package/dist/cli/chunks/chunk-TB22Y3WW.js +4 -0
- package/dist/cli/chunks/{chunk-GJ7DON5S.js → chunk-TVQPYP2Z.js} +3 -3
- package/dist/cli/chunks/chunk-U2E5F3VZ.js +14 -0
- package/dist/cli/chunks/{chunk-ZSKQPXRW.js → chunk-UK5HY6LC.js} +1 -1
- package/dist/cli/chunks/{chunk-RO6HAZLV.js → chunk-UORI2CZ4.js} +1 -1
- package/dist/cli/chunks/{chunk-VTGAPHJE.js → chunk-V3NZ23X6.js} +2 -2
- package/dist/cli/chunks/{chunk-W7P7EOJ4.js → chunk-VAXQUD5G.js} +1 -1
- package/dist/cli/chunks/{chunk-EQG3JYSV.js → chunk-VMSO6DMF.js} +2 -2
- package/dist/cli/chunks/{chunk-6UO5YSNN.js → chunk-W3PPYNHF.js} +2 -2
- package/dist/cli/chunks/{chunk-FH6N2LKG.js → chunk-W6TJXK5Y.js} +2 -2
- package/dist/cli/chunks/{chunk-WJ7657IX.js → chunk-WEDVLKRB.js} +2 -2
- package/dist/cli/chunks/{chunk-N653RGT3.js → chunk-WI5AEB7Q.js} +2 -2
- package/dist/cli/chunks/{chunk-W5EKSBS4.js → chunk-WO4NSPLX.js} +2 -2
- package/dist/cli/chunks/{chunk-YH7VOLBP.js → chunk-WW6WUMS7.js} +2 -2
- package/dist/cli/chunks/{chunk-6OL2WES5.js → chunk-WYO5VN2L.js} +1 -1
- package/dist/cli/chunks/{chunk-PZK7O445.js → chunk-X5S5UEM6.js} +2 -2
- package/dist/cli/chunks/{chunk-NKWMTXBL.js → chunk-XHCCH7UC.js} +3 -3
- package/dist/cli/chunks/{chunk-GSC6JXDE.js → chunk-XKIFNKHV.js} +1 -1
- package/dist/cli/chunks/{chunk-FNPZINHV.js → chunk-XZ5Z56OP.js} +1 -1
- package/dist/cli/chunks/{chunk-6XLCFDIB.js → chunk-YQ6BK7QC.js} +2 -2
- package/dist/cli/chunks/{chunk-DNS37AHW.js → chunk-YUWUFYHK.js} +1 -1
- package/dist/cli/chunks/{chunk-YJSKT6G6.js → chunk-YZ2AGC7O.js} +1 -1
- package/dist/cli/chunks/{chunk-5TEPPW4J.js → chunk-Z56QTRRB.js} +2 -2
- package/dist/cli/chunks/{chunk-4MCO43NX.js → chunk-ZAOQIVHG.js} +4 -4
- package/dist/cli/chunks/{chunk-TMYGGYRY.js → chunk-ZF5JTQEE.js} +1 -1
- package/dist/cli/chunks/{chunk-HYWW4A2E.js → chunk-ZKXZTIVF.js} +2 -2
- package/dist/cli/chunks/{chunk-N4MNSEKY.js → chunk-ZP6ANUP7.js} +1 -1
- package/dist/cli/chunks/{chunk-5DFPAJ5O.js → chunk-ZURYZEHX.js} +2 -2
- package/dist/cli/chunks/{ci-JNBOR6FP.js → ci-NGMGB43T.js} +3 -3
- package/dist/cli/chunks/{ci-output-FYNKONEQ.js → ci-output-BMJABAEX.js} +2 -2
- package/dist/cli/chunks/{circuit-breaker-KOIXRDAD.js → circuit-breaker-GYD5CMJQ.js} +2 -2
- package/dist/cli/chunks/{claude-flow-setup-4CO7KHRN.js → claude-flow-setup-MMOYVBVD.js} +2 -2
- package/dist/cli/chunks/client-FUHNNK5O.js +2 -0
- package/dist/cli/chunks/{cline-installer-CMYAPKK5.js → cline-installer-B2SOZ44R.js} +2 -2
- package/dist/cli/chunks/{code-WFIAEP3H.js → code-V3FIRAXD.js} +3 -3
- package/dist/cli/chunks/{code-index-extractor-IYM6HWJN.js → code-index-extractor-CV6A756Z.js} +2 -2
- package/dist/cli/chunks/{codex-installer-DORVWRSU.js → codex-installer-EUC6J47Y.js} +2 -2
- package/dist/cli/chunks/{completions-54VM2MX2.js → completions-DQQIBAHR.js} +2 -2
- package/dist/cli/chunks/{complexity-analyzer-EGZDP5N4.js → complexity-analyzer-HPXMXP5I.js} +2 -2
- package/dist/cli/chunks/{continuedev-installer-4SDVDD4T.js → continuedev-installer-RCIYXH6V.js} +2 -2
- package/dist/cli/chunks/{copilot-installer-7FJQ7PCL.js → copilot-installer-VUH32SHF.js} +2 -2
- package/dist/cli/chunks/core-handlers-F7TLX4LM.js +2 -0
- package/dist/cli/chunks/cost-tracker-YLCKLOAL.js +2 -0
- package/dist/cli/chunks/{coverage-DI5LDRJ7.js → coverage-IVKDV236.js} +3 -3
- package/dist/cli/chunks/cross-domain-router-EGWPY67O.js +2 -0
- package/dist/cli/chunks/{cursor-installer-RTSZP5YD.js → cursor-installer-B42FN62K.js} +2 -2
- package/dist/cli/chunks/{daemon-SP3APEZY.js → daemon-DECQRQII.js} +3 -3
- package/dist/cli/chunks/{daemon-LM7LETPV.js → daemon-IPTOSCHM.js} +4 -4
- package/dist/cli/chunks/{dag-attention-scheduler-C3QBODFE.js → dag-attention-scheduler-RY7CDYSC.js} +2 -2
- package/dist/cli/chunks/{detect-I4RBUFFJ.js → detect-NW53BMJN.js} +2 -2
- package/dist/cli/chunks/{dist-node-PT6TCBCO.js → dist-node-LE6KHXAB.js} +2 -2
- package/dist/cli/chunks/{domain-handler-MJMTMB5X.js → domain-handler-JGXFT4LW.js} +2 -2
- package/dist/cli/chunks/{domain-plugins-Y4A2WYJW.js → domain-plugins-GY3RYKKK.js} +2 -2
- package/dist/cli/chunks/{domain-transfer-DUO42TLA.js → domain-transfer-CGBRXNTC.js} +2 -2
- package/dist/cli/chunks/dream-V4QN6OF5.js +2 -0
- package/dist/cli/chunks/{embed-and-insert-pattern-66ZQK4AI.js → embed-and-insert-pattern-65H4XHWR.js} +2 -2
- package/dist/cli/chunks/{eval-NQ7H27UF.js → eval-YPYIZQUR.js} +2 -2
- package/dist/cli/chunks/{experience-capture-middleware-MHEYPTIG.js → experience-capture-middleware-4JXVF5PL.js} +3 -3
- package/dist/cli/chunks/{fast-paths-YYDGN6ZC.js → fast-paths-HYQTAF2S.js} +2 -2
- package/dist/cli/chunks/{feature-flags-FY4DOYS2.js → feature-flags-HNSAFFX2.js} +2 -2
- package/dist/cli/chunks/{feature-flags-YFGUORHY.js → feature-flags-YACUH6OW.js} +2 -2
- package/dist/cli/chunks/{file-discovery-TOMDY7TK.js → file-discovery-R73BYEXB.js} +2 -2
- package/dist/cli/chunks/{fleet-MO3UCWB4.js → fleet-6M3BP4OO.js} +3 -3
- package/dist/cli/chunks/{gnn-wrapper-SLW4PPXQ.js → gnn-wrapper-QLD7KHXV.js} +2 -2
- package/dist/cli/chunks/{heartbeat-handler-36RFCP4E.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-BJLWBKHE.js → hnsw-legacy-bridge-47CUCSAU.js} +2 -2
- package/dist/cli/chunks/{hnswlib-node-RAYNVJCJ.js → hnswlib-node-SVNYDJZH.js} +2 -2
- package/dist/cli/chunks/{hooks-JMHFWVEQ.js → hooks-6V5LMWP6.js} +10 -10
- package/dist/cli/chunks/hybrid-backend-OW4J65YH.js +2 -0
- package/dist/cli/chunks/{hypergraph-engine-JUDBKPOX.js → hypergraph-engine-L2FOBIFF.js} +2 -2
- package/dist/cli/chunks/{hypergraph-handler-AXTWXOZU.js → hypergraph-handler-DU6Z57EE.js} +3 -3
- package/dist/cli/chunks/impact-analyzer-ZH5I2RG6.js +2 -0
- package/dist/cli/chunks/{init-handler-PARJNZFF.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-22HX2E4V.js → kilocode-installer-NHKYGJ7Q.js} +2 -2
- package/dist/cli/chunks/{kiro-installer-OVPBLY7J.js → kiro-installer-24UK6GGR.js} +2 -2
- package/dist/cli/chunks/knowledge-graph-D3BPWNNO.js +2 -0
- package/dist/cli/chunks/{learning-DWXPJ3R6.js → learning-QLVRZNHT.js} +3 -3
- package/dist/cli/chunks/{llm-router-7PPVVKNG.js → llm-router-XRMI2VMG.js} +4 -4
- package/dist/cli/chunks/llm-router-service-TJPPZFUN.js +2 -0
- package/dist/cli/chunks/{load-VI5XHNZA.js → load-W5UWL5C7.js} +2 -2
- package/dist/cli/chunks/load-test-RFT7IDOL.js +2 -0
- package/dist/cli/chunks/{mcp-UW4Z3Z64.js → mcp-N7ALQ4BL.js} +2 -2
- package/dist/cli/chunks/{memory-UD2KCB5M.js → memory-WV52DLSA.js} +5 -5
- package/dist/cli/chunks/memory-backend-O2O4CFKZ.js +2 -0
- package/dist/cli/chunks/memory-handlers-DAEGUDBD.js +2 -0
- package/dist/cli/chunks/{multi-model-executor-5O4WWU5Z.js → multi-model-executor-3FVTZCSO.js} +2 -2
- package/dist/cli/chunks/{opencode-installer-DTRFDGM7.js → opencode-installer-NTPWGHUW.js} +2 -2
- package/dist/cli/chunks/{orchestrator-ENJIKV6Z.js → orchestrator-ORGJ6VAA.js} +85 -26
- package/dist/cli/chunks/pattern-null-store-TUBNXS34.js +2 -0
- package/dist/cli/chunks/{pattern-usage-recorder-QPNIU5PD.js → pattern-usage-recorder-WWXHUH5U.js} +2 -2
- package/dist/cli/chunks/{pipeline-G3JYDNPE.js → pipeline-ZOKZFXTH.js} +2 -2
- package/dist/cli/chunks/{platform-P4WR6N3D.js → platform-CDNL322F.js} +2 -2
- package/dist/cli/chunks/{plugin-C7763Q5W.js → plugin-ZVLFNZZ4.js} +2 -2
- package/dist/cli/chunks/{prime-radiant-advanced-wasm-DH6R3XSZ.js → prime-radiant-advanced-wasm-FVJDU2JY.js} +2 -2
- package/dist/cli/chunks/{project-root-7DTXDLEG.js → project-root-UCHQH3QL.js} +2 -2
- package/dist/cli/chunks/protocol-executor-6FQTTO3Y.js +2 -0
- package/dist/cli/chunks/{protocol-handler-EODULGOZ.js → protocol-handler-4YBN5R23.js} +2 -2
- package/dist/cli/chunks/{prove-A7G3SIOF.js → prove-BHDHY664.js} +2 -2
- package/dist/cli/chunks/qe-reasoning-bank-TKPND56C.js +2 -0
- package/dist/cli/chunks/{quality-JTURFUX3.js → quality-46AK277P.js} +2 -2
- package/dist/cli/chunks/{quality-gate-M2EI754V.js → quality-gate-WANE7TCN.js} +3 -3
- package/dist/cli/chunks/queen-coordinator-DWMXLPJG.js +2 -0
- package/dist/cli/chunks/{real-embeddings-DI7JMCG7.js → real-embeddings-56MNGJGJ.js} +2 -2
- package/dist/cli/chunks/{ref-validation-MSFMNKDR.js → ref-validation-S7UWXQIP.js} +2 -2
- package/dist/cli/chunks/{roocode-installer-XIMFFHOH.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-MCDKNBQW.js → routing-handler-KDTLMRWD.js} +2 -2
- package/dist/cli/chunks/{ruvector-commands-OBSYAK2X.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-4DTRIHY6.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-CWAVMRC4.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-74TWSO74.js → security-SN6MWOJT.js} +3 -3
- package/dist/cli/chunks/{shared-rvf-adapter-ZHNAGE5H.js → shared-rvf-adapter-2LB56LP4.js} +2 -2
- package/dist/cli/chunks/{shared-rvf-dual-writer-BS5WAVCC.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-3HGHTE7S.js → standalone-memory-F6FSRFWC.js} +2 -2
- package/dist/cli/chunks/{status-handler-XWEEGNGH.js → status-handler-DHD5MS4G.js} +2 -2
- package/dist/cli/chunks/{structural-health-TB5JGMVS.js → structural-health-P6HPSQMR.js} +2 -2
- package/dist/cli/chunks/{sync-T4VLBURM.js → sync-LISJGDSE.js} +2 -2
- package/dist/cli/chunks/sync-SNAXAVCN.js +2 -0
- package/dist/cli/chunks/{task-handler-RQ65QKXX.js → task-handler-ZT44NT5Z.js} +2 -2
- package/dist/cli/chunks/{task-handlers-USYWJ4H2.js → task-handlers-R6DQ5324.js} +3 -3
- package/dist/cli/chunks/test-MUFHR4JQ.js +34 -0
- package/dist/cli/chunks/test-scheduling-TAUSLZJP.js +15 -0
- package/dist/cli/chunks/token-bootstrap-UGRH7OPU.js +2 -0
- package/dist/cli/chunks/{token-usage-CISTB5K5.js → token-usage-IX65ECBR.js} +2 -2
- package/dist/cli/chunks/{transformers-C7LV763N.js → transformers-QKPSVW2W.js} +2 -2
- package/dist/cli/chunks/{tree-sitter-wasm-parser-P26JC3YV.js → tree-sitter-wasm-parser-Z7PPA2JO.js} +2 -2
- package/dist/cli/chunks/{types-YMVMKIWB.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-U2REOPAW.js → upgrade-ECI3YUYA.js} +2 -2
- package/dist/cli/chunks/{validate-NDTCKN7P.js → validate-3JKRUW2S.js} +2 -2
- package/dist/cli/chunks/{validate-swarm-OJUGVH5Q.js → validate-swarm-LZWANCIE.js} +2 -2
- package/dist/cli/chunks/visual-security-CKLTAIAB.js +2 -0
- package/dist/cli/chunks/{web-tree-sitter-2CLRSA7K.js → web-tree-sitter-N5V4A6XG.js} +2 -2
- package/dist/cli/chunks/{windsurf-installer-DSUJJ4PG.js → windsurf-installer-5TBM5B3C.js} +2 -2
- package/dist/cli/chunks/{witness-chain-TEGL4ZWB.js → witness-chain-MFP3HBWQ.js} +2 -2
- package/dist/cli/chunks/witness-chain-Z6LWFEZS.js +2 -0
- package/dist/cli/chunks/witness-chain-repair-5QWRFVUK.js +2 -0
- package/dist/cli/chunks/{witness-chain-verifier-SPXKFC67.js → witness-chain-verifier-SRAT7LVY.js} +2 -2
- package/dist/cli/chunks/{witness-key-manager-EALOV4OV.js → witness-key-manager-FYZXQTLJ.js} +2 -2
- package/dist/cli/chunks/{workflow-PYI6HCAG.js → workflow-M7TUYYXY.js} +5 -5
- package/dist/cli/chunks/workflow-orchestrator-OFTAR2NA.js +2 -0
- package/dist/cli/chunks/wrappers-COU73OQ6.js +2 -0
- package/dist/cli/commands/test.js +30 -12
- 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/cli/utils/generated-test-writer.d.ts +35 -0
- package/dist/cli/utils/generated-test-writer.js +44 -0
- package/dist/context/compiler.js +4 -1
- package/dist/coordination/consensus/providers/ollama-provider.js +16 -27
- package/dist/coordination/consensus/providers/openrouter-provider.js +13 -24
- package/dist/coordination/handlers/test-execution-handlers.js +4 -2
- package/dist/coordination/protocols/defect-investigation.js +4 -1
- package/dist/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 +127 -39
- package/dist/domains/coverage-analysis/services/gap-detector.js +3 -1
- package/dist/domains/learning-optimization/services/learning-coordinator.js +4 -2
- package/dist/domains/test-execution/services/flaky-detector.js +8 -2
- package/dist/domains/test-execution/services/retry-handler.js +23 -20
- package/dist/domains/test-execution/services/test-executor.js +5 -2
- package/dist/domains/test-generation/services/test-generator.js +5 -2
- package/dist/governance/compliance-reporter.js +8 -7
- package/dist/governance/proof-envelope-integration.js +3 -1
- package/dist/init/phases/07-hooks.js +30 -4
- package/dist/init/phases/10-workers.js +42 -6
- package/dist/integrations/agentic-flow/onnx-embeddings/embedding-generator.d.ts +4 -1
- package/dist/integrations/agentic-flow/onnx-embeddings/embedding-generator.js +6 -2
- package/dist/integrations/browser/qe-dashboard/wasm-vector-store.js +2 -1
- package/dist/integrations/ruvector/coverage-router.d.ts +3 -1
- package/dist/integrations/ruvector/coverage-router.js +7 -6
- package/dist/integrations/ruvector/diff-risk-classifier.js +5 -4
- package/dist/integrations/ruvector/rvf-dual-writer.js +10 -1
- package/dist/integrations/vibium/runtime.js +2 -6
- package/dist/learning/dream/dream-engine.d.ts +5 -0
- package/dist/learning/dream/dream-engine.js +20 -3
- package/dist/learning/embedding-space.d.ts +18 -0
- package/dist/learning/embedding-space.js +33 -0
- package/dist/learning/rvf-pattern-store.js +19 -5
- package/dist/mcp/bundle.js +442 -441
- package/dist/mcp/handlers/domain-handler-configs.d.ts +42 -0
- package/dist/mcp/handlers/handler-factory.js +3 -1
- package/dist/mcp/handlers/save-results-option.d.ts +62 -0
- package/dist/mcp/handlers/save-results-option.js +35 -0
- package/dist/mcp/protocol-server.js +22 -11
- package/dist/mcp/security/rate-limiter.d.ts +8 -1
- package/dist/mcp/security/rate-limiter.js +33 -4
- package/dist/mcp/services/session-resume.js +11 -0
- package/dist/mcp/services/session-store.d.ts +31 -2
- package/dist/mcp/services/session-store.js +95 -16
- package/dist/mcp/services/session-write-buffer.d.ts +55 -0
- package/dist/mcp/services/session-write-buffer.js +144 -0
- package/dist/mcp/types.d.ts +18 -0
- package/dist/memory/crdt/convergence-tracker.js +14 -24
- package/dist/memory/crdt/crdt-store.js +15 -0
- package/dist/memory/crdt/g-counter.js +10 -8
- 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/embeddings/ollama-client.d.ts +1 -1
- package/dist/shared/embeddings/ollama-client.js +30 -31
- package/dist/shared/git/git-analyzer.d.ts +4 -1
- package/dist/shared/git/git-analyzer.js +9 -4
- package/dist/shared/llm/cache.js +1 -1
- package/dist/shared/llm/cost-tracker.js +8 -6
- package/dist/shared/llm/providers/azure-openai.js +5 -21
- package/dist/shared/llm/providers/bedrock.js +5 -21
- package/dist/shared/llm/providers/claude.js +5 -21
- package/dist/shared/llm/providers/cognitum.js +5 -17
- package/dist/shared/llm/providers/gemini.js +9 -23
- package/dist/shared/llm/providers/ollama.js +5 -21
- package/dist/shared/llm/providers/openai.js +5 -21
- package/dist/shared/llm/providers/openrouter.js +9 -23
- package/dist/shared/llm/providers/response-deadline.d.ts +3 -0
- package/dist/shared/llm/providers/response-deadline.js +100 -0
- package/dist/shared/llm/spend-ledger.js +3 -2
- package/dist/shared/metrics/code-metrics.d.ts +1 -0
- package/dist/shared/metrics/code-metrics.js +3 -44
- package/dist/shared/metrics/cognitive-complexity.d.ts +17 -0
- package/dist/shared/metrics/cognitive-complexity.js +108 -0
- package/dist/shared/npm-cli-invocation.d.ts +21 -0
- package/dist/shared/npm-cli-invocation.js +28 -0
- package/dist/shared/optional-module.js +24 -0
- package/dist/shared/test-runner-args.d.ts +42 -0
- package/dist/shared/test-runner-args.js +74 -0
- package/dist/shared/utils/safe-record.d.ts +18 -0
- package/dist/shared/utils/safe-record.js +28 -0
- package/dist/test-scheduling/executors/vitest-executor.js +23 -5
- package/dist/workers/quality-daemon/git-watcher.js +5 -0
- package/package.json +1 -1
- package/dist/adapters/ag-ui/json-patch-utils.d.ts +0 -136
- package/dist/adapters/ag-ui/json-patch-utils.js +0 -575
- package/dist/cli/chunks/adapter-EUIELRLI.js +0 -2
- package/dist/cli/chunks/aqe-learning-engine-LXRKHASR.js +0 -2
- package/dist/cli/chunks/base-4DSLX33Y.js +0 -2
- package/dist/cli/chunks/browser-workflow-AWCQLQZK.js +0 -2
- package/dist/cli/chunks/chunk-E2QHUMCR.js +0 -2
- package/dist/cli/chunks/chunk-I7ECEOFV.js +0 -2
- package/dist/cli/chunks/chunk-LW4BCFIV.js +0 -15
- package/dist/cli/chunks/chunk-QJGKL67W.js +0 -54
- package/dist/cli/chunks/chunk-RLQ4MYB6.js +0 -3
- package/dist/cli/chunks/chunk-X43HA3RF.js +0 -14
- package/dist/cli/chunks/chunk-Z3K4JZXQ.js +0 -4
- package/dist/cli/chunks/client-UJVHZXNQ.js +0 -2
- package/dist/cli/chunks/core-handlers-AFXZOSH3.js +0 -2
- package/dist/cli/chunks/cost-tracker-D6YSKTQC.js +0 -2
- package/dist/cli/chunks/cross-domain-router-ZLNVKLIR.js +0 -2
- package/dist/cli/chunks/dream-4OPJXXEG.js +0 -2
- package/dist/cli/chunks/heartbeat-scheduler-J5KLHO6C.js +0 -2
- package/dist/cli/chunks/hnsw-adapter-56P6XSFR.js +0 -2
- package/dist/cli/chunks/hnsw-index-GFZ6XCEW.js +0 -2
- package/dist/cli/chunks/hybrid-backend-TUBWJDDN.js +0 -2
- package/dist/cli/chunks/impact-analyzer-FXVGKS6B.js +0 -2
- package/dist/cli/chunks/init-wizard-LK73HQ7W.js +0 -2
- package/dist/cli/chunks/kernel-TCZDKRSI.js +0 -2
- package/dist/cli/chunks/knowledge-graph-TWMB2GH2.js +0 -2
- package/dist/cli/chunks/llm-router-service-HPDH3P77.js +0 -2
- package/dist/cli/chunks/load-test-HTYOUYSN.js +0 -2
- package/dist/cli/chunks/memory-backend-X5BE2MPK.js +0 -2
- package/dist/cli/chunks/memory-handlers-SQXMFX5X.js +0 -2
- package/dist/cli/chunks/pattern-null-store-OCQGQZU6.js +0 -2
- package/dist/cli/chunks/protocol-executor-CYEQHQCL.js +0 -2
- package/dist/cli/chunks/qe-reasoning-bank-GSTA5WJ4.js +0 -2
- package/dist/cli/chunks/queen-coordinator-Y2Q5RQL7.js +0 -2
- package/dist/cli/chunks/router-4QB5L4IW.js +0 -2
- package/dist/cli/chunks/routing-feedback-YBVHJY5L.js +0 -2
- package/dist/cli/chunks/rvf-dual-writer-T5B456SW.js +0 -2
- package/dist/cli/chunks/rvf-migration-adapter-2O2NL7ZF.js +0 -2
- package/dist/cli/chunks/rvf-native-adapter-RDB3GWTW.js +0 -2
- package/dist/cli/chunks/safe-db-YXVMLFU4.js +0 -2
- package/dist/cli/chunks/schedule-K6XWCCSK.js +0 -2
- package/dist/cli/chunks/scheduler-4MW22D6Q.js +0 -2
- package/dist/cli/chunks/sqlite-persistence-UVDHUSAU.js +0 -2
- package/dist/cli/chunks/sync-LSPNSVDI.js +0 -2
- package/dist/cli/chunks/test-M2XTKD62.js +0 -33
- package/dist/cli/chunks/test-scheduling-GYXJQHJL.js +0 -15
- package/dist/cli/chunks/token-bootstrap-OTEMRUFR.js +0 -2
- package/dist/cli/chunks/unified-memory-UUK77NSE.js +0 -2
- package/dist/cli/chunks/unified-memory-hnsw-JOUE6WNF.js +0 -2
- package/dist/cli/chunks/unified-persistence-3DRJGNQE.js +0 -2
- package/dist/cli/chunks/visual-security-EM7FQG5X.js +0 -2
- package/dist/cli/chunks/witness-chain-7NZ6IIUN.js +0 -2
- package/dist/cli/chunks/witness-chain-repair-ZWS5WXFL.js +0 -2
- package/dist/cli/chunks/workflow-orchestrator-3C3S5FIM.js +0 -2
- package/dist/cli/chunks/wrappers-NXJHGK3W.js +0 -2
|
@@ -83,6 +83,22 @@ export function createORSet(nodeId) {
|
|
|
83
83
|
let version = 0;
|
|
84
84
|
let lastUpdated = Date.now();
|
|
85
85
|
let tagCounter = 0;
|
|
86
|
+
/** Continue this owner's allocation sequence after importing a checkpoint. */
|
|
87
|
+
function observeOwnedTag(tag) {
|
|
88
|
+
const prefix = `${nodeId}:`;
|
|
89
|
+
if (!tag.startsWith(prefix))
|
|
90
|
+
return;
|
|
91
|
+
const suffix = tag.slice(prefix.length);
|
|
92
|
+
const match = /^(-?\d+):(\d+)$/.exec(suffix);
|
|
93
|
+
if (!match)
|
|
94
|
+
return;
|
|
95
|
+
const timestamp = Number(match[1]);
|
|
96
|
+
const counter = Number(match[2]);
|
|
97
|
+
if (Number.isSafeInteger(timestamp) && Number.isSafeInteger(counter) &&
|
|
98
|
+
counter < Number.MAX_SAFE_INTEGER) {
|
|
99
|
+
tagCounter = Math.max(tagCounter, counter + 1);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
86
102
|
/**
|
|
87
103
|
* Check if an element has any active (non-tombstoned) tags
|
|
88
104
|
*/
|
|
@@ -202,6 +218,7 @@ export function createORSet(nodeId) {
|
|
|
202
218
|
}
|
|
203
219
|
const localTags = elements.get(serialized);
|
|
204
220
|
for (const tag of incomingTags) {
|
|
221
|
+
observeOwnedTag(tag);
|
|
205
222
|
if (!localTags.has(tag)) {
|
|
206
223
|
localTags.add(tag);
|
|
207
224
|
changed = true;
|
|
@@ -215,6 +232,7 @@ export function createORSet(nodeId) {
|
|
|
215
232
|
}
|
|
216
233
|
const localTombstones = tombstones.get(serialized);
|
|
217
234
|
for (const tag of incomingTombstones) {
|
|
235
|
+
observeOwnedTag(tag);
|
|
218
236
|
if (!localTombstones.has(tag)) {
|
|
219
237
|
localTombstones.add(tag);
|
|
220
238
|
changed = true;
|
|
@@ -16,6 +16,8 @@ import { safeJsonParse } from '../shared/safe-json.js';
|
|
|
16
16
|
import { getUnifiedPersistence } from '../kernel/unified-persistence.js';
|
|
17
17
|
import { DEFAULT_MAX_PLAN_STEPS, validateMaxSteps } from './types.js';
|
|
18
18
|
import { getAllQEActions, QE_GOALS } from './actions/qe-action-library.js';
|
|
19
|
+
/** Conservative budget fallback for actions without a declared estimate. */
|
|
20
|
+
const DEFAULT_ACTION_DURATION_MS = 1000;
|
|
19
21
|
// ============================================================================
|
|
20
22
|
// MinHeap for A* Open Set (O(log n) insert/extract vs O(n log n) sort+shift)
|
|
21
23
|
// ============================================================================
|
|
@@ -215,18 +217,24 @@ export class GOAPPlanner {
|
|
|
215
217
|
}
|
|
216
218
|
/** Restore missing estimates only for unchanged legacy library definitions. */
|
|
217
219
|
backfillActionDurationEstimates() {
|
|
218
|
-
const
|
|
220
|
+
const db = this.ensureDb();
|
|
221
|
+
const missing = db.prepare('SELECT 1 FROM goap_actions WHERE estimated_duration_ms IS NULL LIMIT 1').get();
|
|
222
|
+
if (!missing)
|
|
223
|
+
return;
|
|
224
|
+
const update = db.prepare(`
|
|
219
225
|
UPDATE goap_actions SET estimated_duration_ms = ?
|
|
220
226
|
WHERE estimated_duration_ms IS NULL AND name = ?
|
|
221
227
|
AND agent_type IS ? AND category = ? AND qe_domain IS ?
|
|
222
228
|
AND preconditions = ? AND effects = ?
|
|
223
229
|
AND method IS ? AND params IS ? AND implemented = ?
|
|
224
230
|
`);
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
231
|
+
db.transaction(() => {
|
|
232
|
+
for (const action of getAllQEActions()) {
|
|
233
|
+
if (action.estimatedDurationMs === undefined)
|
|
234
|
+
continue;
|
|
235
|
+
update.run(action.estimatedDurationMs, action.name, action.agentType ?? null, action.category, action.qeDomain ?? null, JSON.stringify(action.preconditions), JSON.stringify(action.effects), action.method ?? null, action.params ? JSON.stringify(action.params) : null, action.implemented ? 1 : 0);
|
|
236
|
+
}
|
|
237
|
+
})();
|
|
230
238
|
}
|
|
231
239
|
// ==========================================================================
|
|
232
240
|
// Core Planning - A* Search
|
|
@@ -258,7 +266,7 @@ export class GOAPPlanner {
|
|
|
258
266
|
this.recordPlanReuse(reusedPlan.id, true);
|
|
259
267
|
const clonedPlan = {
|
|
260
268
|
...reusedPlan,
|
|
261
|
-
estimatedDurationMs: reusedPlan.actions.reduce((sum, action) => sum + (action.estimatedDurationMs ??
|
|
269
|
+
estimatedDurationMs: reusedPlan.actions.reduce((sum, action) => sum + (action.estimatedDurationMs ?? DEFAULT_ACTION_DURATION_MS), 0),
|
|
262
270
|
id: `plan-${Date.now()}-${randomUUID().slice(0, 8)}`,
|
|
263
271
|
initialState: this.cloneState(currentState),
|
|
264
272
|
reusedFrom: reusedPlan.id,
|
|
@@ -285,7 +293,7 @@ export class GOAPPlanner {
|
|
|
285
293
|
goalState: goal,
|
|
286
294
|
actions: actionSequence,
|
|
287
295
|
totalCost: actionSequence.reduce((sum, a) => sum + a.cost, 0),
|
|
288
|
-
estimatedDurationMs: actionSequence.reduce((sum, a) => sum + (a.estimatedDurationMs ??
|
|
296
|
+
estimatedDurationMs: actionSequence.reduce((sum, a) => sum + (a.estimatedDurationMs ?? DEFAULT_ACTION_DURATION_MS), 0),
|
|
289
297
|
status: 'pending',
|
|
290
298
|
};
|
|
291
299
|
// A14: persist the plan itself (not just its reuse signature) so
|
|
@@ -404,7 +412,7 @@ export class GOAPPlanner {
|
|
|
404
412
|
continue;
|
|
405
413
|
}
|
|
406
414
|
// Check duration constraints
|
|
407
|
-
const estimatedDuration = current.estimatedDurationMs + (action.estimatedDurationMs ??
|
|
415
|
+
const estimatedDuration = current.estimatedDurationMs + (action.estimatedDurationMs ?? DEFAULT_ACTION_DURATION_MS);
|
|
408
416
|
if (estimatedDuration > maxDuration) {
|
|
409
417
|
continue;
|
|
410
418
|
}
|
|
@@ -1040,7 +1048,7 @@ export class GOAPPlanner {
|
|
|
1040
1048
|
if (plan.actions.length > maxSteps)
|
|
1041
1049
|
return false;
|
|
1042
1050
|
if (constraints?.maxDurationMs !== undefined &&
|
|
1043
|
-
plan.actions.reduce((sum, action) => sum + (action.estimatedDurationMs ??
|
|
1051
|
+
plan.actions.reduce((sum, action) => sum + (action.estimatedDurationMs ?? DEFAULT_ACTION_DURATION_MS), 0)
|
|
1044
1052
|
> constraints.maxDurationMs) {
|
|
1045
1053
|
return false;
|
|
1046
1054
|
}
|
|
@@ -19,15 +19,15 @@ export declare class EmbeddingCache {
|
|
|
19
19
|
/**
|
|
20
20
|
* Get cached embedding if available
|
|
21
21
|
*/
|
|
22
|
-
get(content: string, model: string): number[] | null;
|
|
22
|
+
get(content: string, model: string, namespace?: string): number[] | null;
|
|
23
23
|
/**
|
|
24
24
|
* Store embedding in cache
|
|
25
25
|
*/
|
|
26
|
-
set(content: string, model: string, embedding: number[]): void;
|
|
26
|
+
set(content: string, model: string, embedding: number[], namespace?: string): void;
|
|
27
27
|
/**
|
|
28
28
|
* Check if embedding exists in cache
|
|
29
29
|
*/
|
|
30
|
-
has(content: string, model: string): boolean;
|
|
30
|
+
has(content: string, model: string, namespace?: string): boolean;
|
|
31
31
|
/**
|
|
32
32
|
* Get cache statistics
|
|
33
33
|
*/
|
|
@@ -20,16 +20,16 @@ export class EmbeddingCache {
|
|
|
20
20
|
/**
|
|
21
21
|
* Generate SHA-256 hash of content for cache key
|
|
22
22
|
*/
|
|
23
|
-
hashContent(content, model) {
|
|
23
|
+
hashContent(content, model, namespace) {
|
|
24
24
|
return createHash('sha256')
|
|
25
|
-
.update(JSON.stringify([model, content]))
|
|
25
|
+
.update(JSON.stringify(namespace === undefined ? [model, content] : [model, namespace, content]))
|
|
26
26
|
.digest('hex');
|
|
27
27
|
}
|
|
28
28
|
/**
|
|
29
29
|
* Get cached embedding if available
|
|
30
30
|
*/
|
|
31
|
-
get(content, model) {
|
|
32
|
-
const key = this.hashContent(content, model);
|
|
31
|
+
get(content, model, namespace) {
|
|
32
|
+
const key = this.hashContent(content, model, namespace);
|
|
33
33
|
const entry = this.cache.get(key);
|
|
34
34
|
if (entry) {
|
|
35
35
|
this.hits++;
|
|
@@ -44,8 +44,8 @@ export class EmbeddingCache {
|
|
|
44
44
|
/**
|
|
45
45
|
* Store embedding in cache
|
|
46
46
|
*/
|
|
47
|
-
set(content, model, embedding) {
|
|
48
|
-
const key = this.hashContent(content, model);
|
|
47
|
+
set(content, model, embedding, namespace) {
|
|
48
|
+
const key = this.hashContent(content, model, namespace);
|
|
49
49
|
// Evict oldest entry if cache is full (LRU)
|
|
50
50
|
if (this.cache.size >= this.maxSize && !this.cache.has(key)) {
|
|
51
51
|
const firstKey = this.cache.keys().next().value;
|
|
@@ -63,8 +63,8 @@ export class EmbeddingCache {
|
|
|
63
63
|
/**
|
|
64
64
|
* Check if embedding exists in cache
|
|
65
65
|
*/
|
|
66
|
-
has(content, model) {
|
|
67
|
-
const key = this.hashContent(content, model);
|
|
66
|
+
has(content, model, namespace) {
|
|
67
|
+
const key = this.hashContent(content, model, namespace);
|
|
68
68
|
return this.cache.has(key);
|
|
69
69
|
}
|
|
70
70
|
/**
|
|
@@ -15,6 +15,9 @@ import { EmbeddingCache } from './embedding-cache.js';
|
|
|
15
15
|
import { toErrorMessage } from '../error-utils.js';
|
|
16
16
|
import { EMBEDDING_CONFIG, } from './types.js';
|
|
17
17
|
const PSEUDO_EMBEDDING_MODEL = 'pseudo-embedding';
|
|
18
|
+
// Unversioned real-model entries may predate fallback provenance separation.
|
|
19
|
+
const VERIFIED_MODEL_CACHE_NAMESPACE = 'verified-backend-v1';
|
|
20
|
+
const cacheNamespace = (model) => model === EMBEDDING_CONFIG.MODEL ? VERIFIED_MODEL_CACHE_NAMESPACE : undefined;
|
|
18
21
|
/**
|
|
19
22
|
* Nomic Embedder for generating code embeddings via Ollama
|
|
20
23
|
*/
|
|
@@ -53,10 +56,10 @@ export class NomicEmbedder {
|
|
|
53
56
|
async embed(text) {
|
|
54
57
|
// Prefer genuine cached vectors, then select the active backend before a
|
|
55
58
|
// single counted lookup so alternate namespaces do not inflate misses.
|
|
56
|
-
let model = this.cache.has(text, EMBEDDING_CONFIG.MODEL) ||
|
|
59
|
+
let model = this.cache.has(text, EMBEDDING_CONFIG.MODEL, VERIFIED_MODEL_CACHE_NAMESPACE) ||
|
|
57
60
|
await this.isOllamaAvailable() || !this.enableFallback
|
|
58
61
|
? EMBEDDING_CONFIG.MODEL : PSEUDO_EMBEDDING_MODEL;
|
|
59
|
-
const cached = this.cache.get(text, model);
|
|
62
|
+
const cached = this.cache.get(text, model, cacheNamespace(model));
|
|
60
63
|
if (cached) {
|
|
61
64
|
return cached;
|
|
62
65
|
}
|
|
@@ -75,7 +78,7 @@ export class NomicEmbedder {
|
|
|
75
78
|
`Please run: ollama pull ${EMBEDDING_CONFIG.MODEL}`);
|
|
76
79
|
}
|
|
77
80
|
// Cache result
|
|
78
|
-
this.cache.set(text, model, embedding);
|
|
81
|
+
this.cache.set(text, model, embedding, cacheNamespace(model));
|
|
79
82
|
return embedding;
|
|
80
83
|
}
|
|
81
84
|
/**
|
|
@@ -188,9 +191,9 @@ export class NomicEmbedder {
|
|
|
188
191
|
const formattedText = this.formatForEmbedding(chunk);
|
|
189
192
|
const chunkStartTime = Date.now();
|
|
190
193
|
// Check cache
|
|
191
|
-
const cachedModel = useOllama || this.cache.has(formattedText, EMBEDDING_CONFIG.MODEL)
|
|
194
|
+
const cachedModel = useOllama || this.cache.has(formattedText, EMBEDDING_CONFIG.MODEL, VERIFIED_MODEL_CACHE_NAMESPACE)
|
|
192
195
|
? EMBEDDING_CONFIG.MODEL : PSEUDO_EMBEDDING_MODEL;
|
|
193
|
-
const cachedEmbedding = this.cache.get(formattedText, cachedModel);
|
|
196
|
+
const cachedEmbedding = this.cache.get(formattedText, cachedModel, cacheNamespace(cachedModel));
|
|
194
197
|
if (cachedEmbedding) {
|
|
195
198
|
return {
|
|
196
199
|
chunkId: chunk.id,
|
|
@@ -211,7 +214,7 @@ export class NomicEmbedder {
|
|
|
211
214
|
}
|
|
212
215
|
// Cache the result
|
|
213
216
|
const model = useOllama ? EMBEDDING_CONFIG.MODEL : PSEUDO_EMBEDDING_MODEL;
|
|
214
|
-
this.cache.set(formattedText, model, embedding);
|
|
217
|
+
this.cache.set(formattedText, model, embedding, cacheNamespace(model));
|
|
215
218
|
return {
|
|
216
219
|
chunkId: chunk.id,
|
|
217
220
|
embedding,
|
|
@@ -24,24 +24,24 @@ export class OllamaClient {
|
|
|
24
24
|
*/
|
|
25
25
|
async healthCheck() {
|
|
26
26
|
try {
|
|
27
|
-
|
|
27
|
+
return await this.fetchWithTimeout(`${this.baseUrl}/api/tags`, {
|
|
28
28
|
method: 'GET',
|
|
29
29
|
headers: { 'Content-Type': 'application/json' },
|
|
30
|
-
}, 5000 // Shorter timeout for health check
|
|
31
|
-
)
|
|
32
|
-
|
|
30
|
+
}, 5000, // Shorter timeout for health check
|
|
31
|
+
async (response) => {
|
|
32
|
+
if (!response.ok)
|
|
33
|
+
return false;
|
|
34
|
+
const data = await response.json();
|
|
35
|
+
// Check if configured embedding model is available
|
|
36
|
+
// Match the configured model exactly, allowing its existing tag suffix.
|
|
37
|
+
if (data.models) {
|
|
38
|
+
return data.models.some((model) => model.name === EMBEDDING_CONFIG.MODEL ||
|
|
39
|
+
model.name?.startsWith(`${EMBEDDING_CONFIG.MODEL}:`) ||
|
|
40
|
+
model.model === EMBEDDING_CONFIG.MODEL ||
|
|
41
|
+
model.model?.startsWith(`${EMBEDDING_CONFIG.MODEL}:`));
|
|
42
|
+
}
|
|
33
43
|
return false;
|
|
34
|
-
}
|
|
35
|
-
const data = await response.json();
|
|
36
|
-
// Check if configured embedding model is available
|
|
37
|
-
// Match the configured model exactly, allowing its existing tag suffix.
|
|
38
|
-
if (data.models) {
|
|
39
|
-
return data.models.some((model) => model.name === EMBEDDING_CONFIG.MODEL ||
|
|
40
|
-
model.name?.startsWith(`${EMBEDDING_CONFIG.MODEL}:`) ||
|
|
41
|
-
model.model === EMBEDDING_CONFIG.MODEL ||
|
|
42
|
-
model.model?.startsWith(`${EMBEDDING_CONFIG.MODEL}:`));
|
|
43
|
-
}
|
|
44
|
-
return false;
|
|
44
|
+
});
|
|
45
45
|
}
|
|
46
46
|
catch {
|
|
47
47
|
return false;
|
|
@@ -58,16 +58,17 @@ export class OllamaClient {
|
|
|
58
58
|
let lastError = null;
|
|
59
59
|
for (let attempt = 0; attempt < this.maxRetries; attempt++) {
|
|
60
60
|
try {
|
|
61
|
-
const
|
|
61
|
+
const data = await this.fetchWithTimeout(`${this.baseUrl}/api/embeddings`, {
|
|
62
62
|
method: 'POST',
|
|
63
63
|
headers: { 'Content-Type': 'application/json' },
|
|
64
64
|
body: JSON.stringify(request),
|
|
65
|
-
}, this.timeoutMs)
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
65
|
+
}, this.timeoutMs, async (response) => {
|
|
66
|
+
if (!response.ok) {
|
|
67
|
+
const errorText = await response.text();
|
|
68
|
+
throw new Error(`Ollama API error (${response.status}): ${errorText}`);
|
|
69
|
+
}
|
|
70
|
+
return await response.json();
|
|
71
|
+
});
|
|
71
72
|
// Validate embedding dimensions
|
|
72
73
|
if (data.embedding.length !== EMBEDDING_CONFIG.DIMENSIONS) {
|
|
73
74
|
throw new Error(`Invalid embedding dimensions: expected ${EMBEDDING_CONFIG.DIMENSIONS}, got ${data.embedding.length}`);
|
|
@@ -90,9 +91,9 @@ export class OllamaClient {
|
|
|
90
91
|
throw new Error(`Failed to generate embedding after ${this.maxRetries} attempts: ${lastError?.message}`);
|
|
91
92
|
}
|
|
92
93
|
/**
|
|
93
|
-
*
|
|
94
|
+
* Keep the request timeout active through required body consumption.
|
|
94
95
|
*/
|
|
95
|
-
async fetchWithTimeout(url, options, timeoutMs) {
|
|
96
|
+
async fetchWithTimeout(url, options, timeoutMs, consume) {
|
|
96
97
|
const controller = new AbortController();
|
|
97
98
|
const timeoutId = setTimeout(() => controller.abort(), timeoutMs);
|
|
98
99
|
try {
|
|
@@ -100,7 +101,7 @@ export class OllamaClient {
|
|
|
100
101
|
...options,
|
|
101
102
|
signal: controller.signal,
|
|
102
103
|
});
|
|
103
|
-
return response;
|
|
104
|
+
return await consume(response);
|
|
104
105
|
}
|
|
105
106
|
finally {
|
|
106
107
|
clearTimeout(timeoutId);
|
|
@@ -117,14 +118,12 @@ export class OllamaClient {
|
|
|
117
118
|
*/
|
|
118
119
|
async getServerInfo() {
|
|
119
120
|
try {
|
|
120
|
-
|
|
121
|
+
return await this.fetchWithTimeout(`${this.baseUrl}/api/tags`, {
|
|
121
122
|
method: 'GET',
|
|
122
123
|
headers: { 'Content-Type': 'application/json' },
|
|
123
|
-
}, 5000)
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
}
|
|
127
|
-
return await response.json();
|
|
124
|
+
}, 5000, async (response) => response.ok
|
|
125
|
+
? await response.json()
|
|
126
|
+
: null);
|
|
128
127
|
}
|
|
129
128
|
catch {
|
|
130
129
|
return null;
|
|
@@ -102,8 +102,11 @@ export declare class GitAnalyzer {
|
|
|
102
102
|
getChangedFiles(since?: Date): Promise<string[]>;
|
|
103
103
|
/**
|
|
104
104
|
* Get files changed in a specific commit
|
|
105
|
-
* @param commitHash - Git
|
|
105
|
+
* @param commitHash - Git revision (SHA, `HEAD~3`, `origin/main`, tag; default: HEAD)
|
|
106
106
|
* @returns Array of changed file paths relative to repo root
|
|
107
|
+
* @throws Error when `commitHash` is option-shaped (starts with "-") or otherwise
|
|
108
|
+
* not a safe revision argument; git would otherwise parse it as an option
|
|
109
|
+
* (e.g. `--output=<path>` writes an arbitrary file). See issue #960.
|
|
107
110
|
*/
|
|
108
111
|
getCommitFiles(commitHash?: string): Promise<string[]>;
|
|
109
112
|
/**
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import { execFileSync } from 'child_process';
|
|
12
12
|
import * as path from 'path';
|
|
13
|
+
import { assertSafeGitRef } from './ref-validation.js';
|
|
13
14
|
/**
|
|
14
15
|
* Sanitize a string for safe use in git arguments
|
|
15
16
|
* Removes shell metacharacters that could enable injection
|
|
@@ -432,18 +433,22 @@ export class GitAnalyzer {
|
|
|
432
433
|
}
|
|
433
434
|
/**
|
|
434
435
|
* Get files changed in a specific commit
|
|
435
|
-
* @param commitHash - Git
|
|
436
|
+
* @param commitHash - Git revision (SHA, `HEAD~3`, `origin/main`, tag; default: HEAD)
|
|
436
437
|
* @returns Array of changed file paths relative to repo root
|
|
438
|
+
* @throws Error when `commitHash` is option-shaped (starts with "-") or otherwise
|
|
439
|
+
* not a safe revision argument; git would otherwise parse it as an option
|
|
440
|
+
* (e.g. `--output=<path>` writes an arbitrary file). See issue #960.
|
|
437
441
|
*/
|
|
438
442
|
async getCommitFiles(commitHash = 'HEAD') {
|
|
443
|
+
// Validate before touching git: execFileSync has no shell, so stripping
|
|
444
|
+
// metacharacters does not help, but a leading "-" is still parsed as an option.
|
|
445
|
+
assertSafeGitRef(commitHash, 'commit hash');
|
|
439
446
|
if (!(await this.isGitRepository())) {
|
|
440
447
|
return [];
|
|
441
448
|
}
|
|
442
449
|
try {
|
|
443
|
-
// Sanitize commit hash to prevent injection
|
|
444
|
-
const sanitizedHash = sanitizeGitArg(commitHash);
|
|
445
450
|
const output = execFileSync('git', [
|
|
446
|
-
'diff-tree', '--no-commit-id', '--name-only', '-z', '-r',
|
|
451
|
+
'diff-tree', '--root', '--no-commit-id', '--name-only', '-z', '-r', commitHash
|
|
447
452
|
], {
|
|
448
453
|
cwd: this.config.repoRoot,
|
|
449
454
|
encoding: 'utf-8',
|
package/dist/shared/llm/cache.js
CHANGED
|
@@ -276,7 +276,7 @@ export class LLMResponseCache {
|
|
|
276
276
|
* Cache a generation response
|
|
277
277
|
*/
|
|
278
278
|
setGeneration(input, response, options, ttlMs) {
|
|
279
|
-
if (!this.config.cacheGenerations) {
|
|
279
|
+
if (!this.config.cacheGenerations || response.finishReason === 'content_filter') {
|
|
280
280
|
return;
|
|
281
281
|
}
|
|
282
282
|
const key = LLMCache.generateKey('generation', input, options);
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { randomUUID } from 'crypto';
|
|
9
9
|
import { getModelCost } from './model-registry.js';
|
|
10
|
+
import { addToCount, createSafeRecord } from '../utils/safe-record.js';
|
|
10
11
|
/**
|
|
11
12
|
* Token pricing per model (cost per 1M tokens in USD).
|
|
12
13
|
* Current-generation prices verified 2026-09-27 (Anthropic docs, OpenRouter
|
|
@@ -133,7 +134,8 @@ export const MODEL_PRICING = {
|
|
|
133
134
|
* as a free/local model.
|
|
134
135
|
*/
|
|
135
136
|
export function resolveModelPricing(model) {
|
|
136
|
-
|
|
137
|
+
// Own keys only: a model named `toString` must not resolve to the inherited method (#914).
|
|
138
|
+
const pricing = Object.hasOwn(MODEL_PRICING, model) ? MODEL_PRICING[model] : undefined;
|
|
137
139
|
if (pricing) {
|
|
138
140
|
return { input: pricing.input, output: pricing.output };
|
|
139
141
|
}
|
|
@@ -238,15 +240,15 @@ export class CostTracker {
|
|
|
238
240
|
gemini: 0,
|
|
239
241
|
cognitum: 0,
|
|
240
242
|
};
|
|
241
|
-
|
|
243
|
+
// Model and provider names are data, so buckets must not inherit from Object.prototype (#914).
|
|
244
|
+
const byModel = createSafeRecord();
|
|
242
245
|
let totalCost = 0;
|
|
243
246
|
let totalTokens = 0;
|
|
244
247
|
for (const record of relevantRecords) {
|
|
245
248
|
totalCost += record.cost.totalCost;
|
|
246
249
|
totalTokens += record.usage.totalTokens;
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
byModel[record.model] = (byModel[record.model] || 0) + record.cost.totalCost;
|
|
250
|
+
addToCount(byProvider, record.provider, record.cost.totalCost);
|
|
251
|
+
addToCount(byModel, record.model, record.cost.totalCost);
|
|
250
252
|
}
|
|
251
253
|
return {
|
|
252
254
|
period,
|
|
@@ -277,7 +279,7 @@ export class CostTracker {
|
|
|
277
279
|
getUsageByProvider(provider, period = 'all') {
|
|
278
280
|
const periodStart = this.getPeriodStart(new Date(), period);
|
|
279
281
|
const providerRecords = this.records.filter((r) => r.provider === provider && r.timestamp >= periodStart);
|
|
280
|
-
const models =
|
|
282
|
+
const models = createSafeRecord();
|
|
281
283
|
let totalCost = 0;
|
|
282
284
|
let totalTokens = 0;
|
|
283
285
|
for (const record of providerRecords) {
|
|
@@ -33,6 +33,7 @@ import { applyOpenAIParams } from '../openai-params.js';
|
|
|
33
33
|
import { TokenMetricsCollector } from '../../../learning/token-tracker.js';
|
|
34
34
|
import { toError } from '../../error-utils.js';
|
|
35
35
|
import { backoffDelay } from '../retry.js';
|
|
36
|
+
import { fetchWithResponseDeadline } from './response-deadline.js';
|
|
36
37
|
/**
|
|
37
38
|
* Default Azure OpenAI configuration
|
|
38
39
|
*/
|
|
@@ -492,27 +493,10 @@ export class AzureOpenAIProvider {
|
|
|
492
493
|
* Fetch with timeout
|
|
493
494
|
*/
|
|
494
495
|
async fetchWithTimeout(url, options, timeoutMs) {
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
...options,
|
|
500
|
-
signal: controller.signal,
|
|
501
|
-
});
|
|
502
|
-
return response;
|
|
503
|
-
}
|
|
504
|
-
catch (error) {
|
|
505
|
-
if (error instanceof Error && error.name === 'AbortError') {
|
|
506
|
-
throw createLLMError('Request timed out', 'TIMEOUT', {
|
|
507
|
-
provider: 'azure-openai',
|
|
508
|
-
retryable: true,
|
|
509
|
-
});
|
|
510
|
-
}
|
|
511
|
-
throw error;
|
|
512
|
-
}
|
|
513
|
-
finally {
|
|
514
|
-
clearTimeout(timeoutId);
|
|
515
|
-
}
|
|
496
|
+
return fetchWithResponseDeadline(url, options, timeoutMs, () => createLLMError('Request timed out', 'TIMEOUT', {
|
|
497
|
+
provider: 'azure-openai',
|
|
498
|
+
retryable: true,
|
|
499
|
+
}));
|
|
516
500
|
}
|
|
517
501
|
/**
|
|
518
502
|
* Fetch with retry logic
|
|
@@ -16,6 +16,7 @@ import { CostTracker } from '../cost-tracker.js';
|
|
|
16
16
|
import { TokenMetricsCollector } from '../../../learning/token-tracker.js';
|
|
17
17
|
import { toError } from '../../error-utils.js';
|
|
18
18
|
import { backoffDelay } from '../retry.js';
|
|
19
|
+
import { fetchWithResponseDeadline } from './response-deadline.js';
|
|
19
20
|
import { applyAnthropicParams } from '../anthropic-params.js';
|
|
20
21
|
/**
|
|
21
22
|
* Default Bedrock configuration
|
|
@@ -545,27 +546,10 @@ export class BedrockProvider {
|
|
|
545
546
|
* Fetch with timeout
|
|
546
547
|
*/
|
|
547
548
|
async fetchWithTimeout(url, options, timeoutMs) {
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
...options,
|
|
553
|
-
signal: controller.signal,
|
|
554
|
-
});
|
|
555
|
-
return response;
|
|
556
|
-
}
|
|
557
|
-
catch (error) {
|
|
558
|
-
if (error instanceof Error && error.name === 'AbortError') {
|
|
559
|
-
throw createLLMError('Request timed out', 'TIMEOUT', {
|
|
560
|
-
provider: 'bedrock',
|
|
561
|
-
retryable: true,
|
|
562
|
-
});
|
|
563
|
-
}
|
|
564
|
-
throw error;
|
|
565
|
-
}
|
|
566
|
-
finally {
|
|
567
|
-
clearTimeout(timeoutId);
|
|
568
|
-
}
|
|
549
|
+
return fetchWithResponseDeadline(url, options, timeoutMs, () => createLLMError('Request timed out', 'TIMEOUT', {
|
|
550
|
+
provider: 'bedrock',
|
|
551
|
+
retryable: true,
|
|
552
|
+
}));
|
|
569
553
|
}
|
|
570
554
|
/**
|
|
571
555
|
* Sleep utility
|
|
@@ -10,6 +10,7 @@ import { CostTracker } from '../cost-tracker.js';
|
|
|
10
10
|
import { TokenMetricsCollector } from '../../../learning/token-tracker.js';
|
|
11
11
|
import { toError } from '../../error-utils.js';
|
|
12
12
|
import { backoffDelay } from '../retry.js';
|
|
13
|
+
import { fetchWithResponseDeadline } from './response-deadline.js';
|
|
13
14
|
import { applyAnthropicParams } from '../anthropic-params.js';
|
|
14
15
|
import { DEFAULT_SONNET_MODEL } from '../model-registry.js';
|
|
15
16
|
/**
|
|
@@ -357,27 +358,10 @@ export class ClaudeProvider {
|
|
|
357
358
|
* Fetch with timeout
|
|
358
359
|
*/
|
|
359
360
|
async fetchWithTimeout(url, options, timeoutMs) {
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
...options,
|
|
365
|
-
signal: controller.signal,
|
|
366
|
-
});
|
|
367
|
-
return response;
|
|
368
|
-
}
|
|
369
|
-
catch (error) {
|
|
370
|
-
if (error instanceof Error && error.name === 'AbortError') {
|
|
371
|
-
throw createLLMError('Request timed out', 'TIMEOUT', {
|
|
372
|
-
provider: 'claude',
|
|
373
|
-
retryable: true,
|
|
374
|
-
});
|
|
375
|
-
}
|
|
376
|
-
throw error;
|
|
377
|
-
}
|
|
378
|
-
finally {
|
|
379
|
-
clearTimeout(timeoutId);
|
|
380
|
-
}
|
|
361
|
+
return fetchWithResponseDeadline(url, options, timeoutMs, () => createLLMError('Request timed out', 'TIMEOUT', {
|
|
362
|
+
provider: 'claude',
|
|
363
|
+
retryable: true,
|
|
364
|
+
}));
|
|
381
365
|
}
|
|
382
366
|
/**
|
|
383
367
|
* Fetch with retry logic
|
|
@@ -16,6 +16,7 @@ import { createLLMError, } from '../interfaces.js';
|
|
|
16
16
|
import { TokenMetricsCollector } from '../../../learning/token-tracker.js';
|
|
17
17
|
import { toError } from '../../error-utils.js';
|
|
18
18
|
import { backoffDelay } from '../retry.js';
|
|
19
|
+
import { fetchWithResponseDeadline } from './response-deadline.js';
|
|
19
20
|
export const DEFAULT_COGNITUM_CONFIG = {
|
|
20
21
|
model: 'cognitum-auto',
|
|
21
22
|
maxTokens: 4096,
|
|
@@ -320,23 +321,10 @@ export class CognitumProvider {
|
|
|
320
321
|
}
|
|
321
322
|
}
|
|
322
323
|
async fetchWithTimeout(url, options, timeoutMs) {
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
}
|
|
328
|
-
catch (error) {
|
|
329
|
-
if (error instanceof Error && error.name === 'AbortError') {
|
|
330
|
-
throw createLLMError('Request timed out', 'TIMEOUT', {
|
|
331
|
-
provider: 'cognitum',
|
|
332
|
-
retryable: true,
|
|
333
|
-
});
|
|
334
|
-
}
|
|
335
|
-
throw error;
|
|
336
|
-
}
|
|
337
|
-
finally {
|
|
338
|
-
clearTimeout(timeoutId);
|
|
339
|
-
}
|
|
324
|
+
return fetchWithResponseDeadline(url, options, timeoutMs, () => createLLMError('Request timed out', 'TIMEOUT', {
|
|
325
|
+
provider: 'cognitum',
|
|
326
|
+
retryable: true,
|
|
327
|
+
}));
|
|
340
328
|
}
|
|
341
329
|
async fetchWithRetry(url, options, timeoutMs, maxRetries) {
|
|
342
330
|
let lastError;
|