agentic-qe 3.15.11 → 3.15.12
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/hooks/aqe-hook.cjs +38 -2
- package/.claude/skills/skills-manifest.json +1 -1
- package/CHANGELOG.md +149 -0
- package/assets/skills/skills-manifest.json +1 -1
- package/dist/cli/bundle.js +6 -6
- package/dist/cli/chunks/adapter-HL7MOCQN.js +2 -0
- package/dist/cli/chunks/{agent-booster-wasm-TIDSQ3ZK.js → agent-booster-wasm-5VZCKTIJ.js} +2 -2
- package/dist/cli/chunks/{agent-handler-G3EPBVA7.js → agent-handler-K3C6CQCD.js} +2 -2
- package/dist/cli/chunks/{agent-memory-branch-ARC5C7GW.js → agent-memory-branch-NVFQ25WS.js} +2 -2
- package/dist/cli/chunks/aqe-learning-engine-OZ2DXB4G.js +2 -0
- package/dist/cli/chunks/{arena-K4I4QDXB.js → arena-QGWIJADQ.js} +2 -2
- package/dist/cli/chunks/{arena-36DTATJV.js → arena-TSZVDSXS.js} +4 -4
- package/dist/cli/chunks/{audit-WQSJSJZF.js → audit-KIEE2SHJ.js} +3 -3
- package/dist/cli/chunks/base-WIM7G3HC.js +2 -0
- package/dist/cli/chunks/{better-sqlite3-BB4K67MT.js → better-sqlite3-BNB32NW3.js} +2 -2
- package/dist/cli/chunks/{brain-handler-CU3GOIU3.js → brain-handler-MPC5SPYI.js} +3 -3
- package/dist/cli/chunks/{branch-enumerator-NJQX7ZNB.js → branch-enumerator-LZ7UXKAY.js} +2 -2
- package/dist/cli/chunks/{browser-6YJF4FQW.js → browser-VDHAW4RK.js} +2 -2
- package/dist/cli/chunks/browser-workflow-QRKCFVR3.js +2 -0
- package/dist/cli/chunks/{chunk-V7DA4HAK.js → chunk-23PQF7NN.js} +1 -1
- package/dist/cli/chunks/{chunk-IENZSO3K.js → chunk-26672ISV.js} +2 -2
- package/dist/cli/chunks/{chunk-OURITHFV.js → chunk-2ASQRBK2.js} +2 -2
- package/dist/cli/chunks/{chunk-VBK2YAYY.js → chunk-2E2QO44T.js} +2 -2
- package/dist/cli/chunks/{chunk-NT7JRHMH.js → chunk-2IVE5AR3.js} +1 -1
- package/dist/cli/chunks/{chunk-672XOJDG.js → chunk-2JYUA27M.js} +1 -1
- package/dist/cli/chunks/{chunk-OHR7C777.js → chunk-2PPSS4JD.js} +2 -2
- package/dist/cli/chunks/{chunk-FUYOOKTH.js → chunk-32UTHIY5.js} +3 -3
- package/dist/cli/chunks/{chunk-UKKYMW3S.js → chunk-33I2ZP6E.js} +2 -2
- package/dist/cli/chunks/{chunk-76SNL7GU.js → chunk-35MIUSXQ.js} +2 -2
- package/dist/cli/chunks/{chunk-4X4MWMHB.js → chunk-35NW676P.js} +2 -2
- package/dist/cli/chunks/{chunk-BZPE3LDO.js → chunk-3EWQN37E.js} +2 -2
- package/dist/cli/chunks/{chunk-5N25I53C.js → chunk-3IU4LDZR.js} +2 -2
- package/dist/cli/chunks/{chunk-NKTWKYHB.js → chunk-47RMGDG4.js} +2 -2
- package/dist/cli/chunks/chunk-4A76VPU4.js +3 -0
- package/dist/cli/chunks/{chunk-4RH5I24Q.js → chunk-4CB3QPZM.js} +2 -2
- package/dist/cli/chunks/{chunk-U3LJNNVJ.js → chunk-4HWUECVD.js} +2 -2
- package/dist/cli/chunks/{chunk-T5KHJ3J7.js → chunk-4KUOYDY2.js} +2 -2
- package/dist/cli/chunks/{chunk-XNLIWQYE.js → chunk-4LWMAAWK.js} +2 -2
- package/dist/cli/chunks/{chunk-KKYO2NKV.js → chunk-4PU5GTZW.js} +2 -2
- package/dist/cli/chunks/{chunk-VWUZSNVC.js → chunk-4SA7M34P.js} +1 -1
- package/dist/cli/chunks/{chunk-5WYZHDIZ.js → chunk-4Y6OEBJZ.js} +1 -1
- package/dist/cli/chunks/{chunk-J4JMCZVA.js → chunk-5A66EGEW.js} +2 -2
- package/dist/cli/chunks/{chunk-HFFPYC4G.js → chunk-5ADXFUMO.js} +2 -2
- package/dist/cli/chunks/{chunk-KJCIMNHS.js → chunk-5S4UIDFK.js} +1 -1
- package/dist/cli/chunks/{chunk-YBBT3YYG.js → chunk-5TAEW5OV.js} +1 -1
- package/dist/cli/chunks/{chunk-FLU5FDSC.js → chunk-5Z23ZMXZ.js} +59 -59
- package/dist/cli/chunks/{chunk-YNOCQ2SL.js → chunk-65TH6RPD.js} +1 -1
- package/dist/cli/chunks/{chunk-XGPTZUKQ.js → chunk-66PXR3NI.js} +2 -2
- package/dist/cli/chunks/{chunk-ITPGWGQS.js → chunk-6E6HB4N4.js} +4 -4
- package/dist/cli/chunks/{chunk-EJPK7OTR.js → chunk-6QRI3JVE.js} +2 -2
- package/dist/cli/chunks/{chunk-ZP75ASUU.js → chunk-7DNR4KKR.js} +1 -1
- package/dist/cli/chunks/{chunk-V5AADCBC.js → chunk-7JFDLL2F.js} +1 -1
- package/dist/cli/chunks/chunk-7OEFBWAG.js +5 -0
- package/dist/cli/chunks/{chunk-EIDJNT5C.js → chunk-7QEUHNKO.js} +1 -1
- package/dist/cli/chunks/{chunk-7R5HC56U.js → chunk-7TA5MUPW.js} +1 -1
- package/dist/cli/chunks/{chunk-LCVEEII4.js → chunk-A2JCRXTK.js} +2 -2
- package/dist/cli/chunks/{chunk-JUMICXM6.js → chunk-A5Y7DAVQ.js} +2 -2
- package/dist/cli/chunks/{chunk-FZHSG75I.js → chunk-ADUAJIAU.js} +2 -2
- package/dist/cli/chunks/{chunk-TFW7CCKS.js → chunk-AJEXPFAB.js} +1 -1
- package/dist/cli/chunks/{chunk-JGJXXAS6.js → chunk-BC4T6SCV.js} +4 -4
- package/dist/cli/chunks/{chunk-4RAQ7PJA.js → chunk-BMG2JLSQ.js} +2 -2
- package/dist/cli/chunks/{chunk-Y7B5EUIJ.js → chunk-BOSMELJX.js} +2 -2
- package/dist/cli/chunks/{chunk-CIAL4YRY.js → chunk-BYRCB5JT.js} +2 -2
- package/dist/cli/chunks/{chunk-XS2XF3YG.js → chunk-C3YOVASQ.js} +1 -1
- package/dist/cli/chunks/{chunk-FL32MTKT.js → chunk-C74M4WUI.js} +2 -2
- package/dist/cli/chunks/{chunk-S6IYEBAI.js → chunk-CA5UNWQF.js} +2 -2
- package/dist/cli/chunks/{chunk-5MTWCCZJ.js → chunk-CDA5Z74H.js} +2 -2
- package/dist/cli/chunks/{chunk-DOFREOPQ.js → chunk-CPIBIR3X.js} +2 -2
- package/dist/cli/chunks/{chunk-UMVSWQNB.js → chunk-CU36D7TN.js} +2 -2
- package/dist/cli/chunks/{chunk-G4CKPWF6.js → chunk-DAUEK66C.js} +1 -1
- package/dist/cli/chunks/{chunk-2KFFEKSI.js → chunk-DRCBRUGN.js} +2 -2
- package/dist/cli/chunks/{chunk-EH2S6AOR.js → chunk-DZGPUGUG.js} +2 -2
- package/dist/cli/chunks/{chunk-HYXUN7BW.js → chunk-EF6OERRR.js} +1 -1
- package/dist/cli/chunks/{chunk-G77MLBDF.js → chunk-EN7GRVEQ.js} +2 -2
- package/dist/cli/chunks/{chunk-XDI5X3FR.js → chunk-ENGL7FIJ.js} +1 -1
- package/dist/cli/chunks/{chunk-HDNWSKHA.js → chunk-FAGKBOX2.js} +2 -2
- package/dist/cli/chunks/{chunk-FWSGPE3V.js → chunk-FNUFTWEO.js} +3 -3
- package/dist/cli/chunks/{chunk-AUUJBXWX.js → chunk-FZJCBSN4.js} +2 -2
- package/dist/cli/chunks/{chunk-ERN43HOX.js → chunk-G24SWTAX.js} +35 -35
- package/dist/cli/chunks/{chunk-VEEYL2CZ.js → chunk-G3AABG4Q.js} +2 -2
- package/dist/cli/chunks/{chunk-35M2X3C5.js → chunk-GJKZ7UQO.js} +2 -2
- package/dist/cli/chunks/{chunk-OV5RPLKV.js → chunk-GKFV6CUD.js} +2 -2
- package/dist/cli/chunks/{chunk-4HJKQIX5.js → chunk-HLGFHHWV.js} +2 -2
- package/dist/cli/chunks/{chunk-R5LGV6GZ.js → chunk-HM3LSFTY.js} +2 -2
- package/dist/cli/chunks/{chunk-M7XFBSIK.js → chunk-HSA5IGGW.js} +2 -2
- package/dist/cli/chunks/{chunk-GWJWSLDA.js → chunk-HZBXJFGN.js} +2 -2
- package/dist/cli/chunks/{chunk-4MUBW4RT.js → chunk-IA55PFLG.js} +2 -2
- package/dist/cli/chunks/{chunk-RBZCA7SD.js → chunk-ICKUINKD.js} +2 -2
- package/dist/cli/chunks/{chunk-KDI5JOYZ.js → chunk-IETBWYHW.js} +2 -2
- package/dist/cli/chunks/{chunk-325QCVDI.js → chunk-IL7GQNNE.js} +2 -2
- package/dist/cli/chunks/{chunk-BTVWA35P.js → chunk-INZARYUD.js} +2 -2
- package/dist/cli/chunks/{chunk-G2IJFNZS.js → chunk-IPA7K556.js} +2 -2
- package/dist/cli/chunks/{chunk-UTTSH4NH.js → chunk-IVTQF55W.js} +3 -3
- package/dist/cli/chunks/{chunk-2CW7VRPH.js → chunk-J7Y7ZBIT.js} +5 -5
- package/dist/cli/chunks/{chunk-M5RQ6U3G.js → chunk-JGIJPDGD.js} +2 -2
- package/dist/cli/chunks/{chunk-RQMCZQN2.js → chunk-JNXK47OL.js} +2 -2
- package/dist/cli/chunks/{chunk-X4J73KP3.js → chunk-JOWUS2X5.js} +1 -1
- package/dist/cli/chunks/{chunk-ZMC543GI.js → chunk-JR6CUKAI.js} +2 -2
- package/dist/cli/chunks/chunk-JRYWLOBD.js +21 -0
- package/dist/cli/chunks/{chunk-ETVAYGCB.js → chunk-JW5PDJ5O.js} +3 -3
- package/dist/cli/chunks/{chunk-OD5D4LSZ.js → chunk-K3A3NWT3.js} +2 -2
- package/dist/cli/chunks/{chunk-LPU6PAJE.js → chunk-KA5SHLMW.js} +2 -2
- package/dist/cli/chunks/{chunk-NPZOBSAN.js → chunk-KGA7VAI4.js} +2 -2
- package/dist/cli/chunks/{chunk-ZMHCMJ4J.js → chunk-KJDI5CHX.js} +2 -2
- package/dist/cli/chunks/{chunk-KSLLHFVY.js → chunk-L3PV7VXK.js} +1 -1
- package/dist/cli/chunks/{chunk-LD5CFK53.js → chunk-L7NGKANW.js} +2 -2
- package/dist/cli/chunks/{chunk-6NA3KZZT.js → chunk-LFBA735S.js} +7 -7
- package/dist/cli/chunks/{chunk-Z2EA7A4Z.js → chunk-MAJXZYGK.js} +1 -1
- package/dist/cli/chunks/{chunk-TCYSBC7Y.js → chunk-MCPEC6OO.js} +1 -1
- package/dist/cli/chunks/{chunk-LBX7M4LW.js → chunk-MCPXNUDK.js} +2 -2
- package/dist/cli/chunks/{chunk-5YLOLACR.js → chunk-MMEALJ4D.js} +2 -2
- package/dist/cli/chunks/{chunk-IOZRKXR5.js → chunk-MYF5CNGV.js} +2 -2
- package/dist/cli/chunks/{chunk-X3PZCXWG.js → chunk-MYUMJ2ZI.js} +1 -1
- package/dist/cli/chunks/{chunk-VYTILW4R.js → chunk-N7O3PF6Y.js} +2 -2
- package/dist/cli/chunks/{chunk-GVKVJJQX.js → chunk-NA3F6FEO.js} +2 -2
- package/dist/cli/chunks/{chunk-TL6OFMXF.js → chunk-NNBQZR73.js} +2 -2
- package/dist/cli/chunks/{chunk-KXS3Y2AX.js → chunk-NV74SICL.js} +2 -2
- package/dist/cli/chunks/chunk-NVRYELCY.js +13 -0
- package/dist/cli/chunks/{chunk-OH5V5EJW.js → chunk-NX4BCSOZ.js} +2 -2
- package/dist/cli/chunks/{chunk-XJKZ7FTR.js → chunk-O3IM4WRZ.js} +2 -2
- package/dist/cli/chunks/{chunk-3RHOPP7A.js → chunk-O4QJMANM.js} +1 -1
- package/dist/cli/chunks/{chunk-O4JAKWWM.js → chunk-OHVYINGM.js} +17 -17
- package/dist/cli/chunks/{chunk-APPZATXA.js → chunk-P5E26N2X.js} +2 -2
- package/dist/cli/chunks/{chunk-5ERFHEEE.js → chunk-P7UFJ6DO.js} +1 -1
- package/dist/cli/chunks/{chunk-5MNASJOH.js → chunk-PGSJBXTD.js} +2 -2
- package/dist/cli/chunks/{chunk-WCAVIJ64.js → chunk-PT2NXS43.js} +1 -1
- package/dist/cli/chunks/{chunk-EWPUQCN4.js → chunk-PTBOLBM4.js} +2 -2
- package/dist/cli/chunks/{chunk-EK5GMOSO.js → chunk-PX5OPXY6.js} +1 -1
- package/dist/cli/chunks/chunk-QCPVUNN3.js +2 -0
- package/dist/cli/chunks/{chunk-K2HBNYAZ.js → chunk-QSGEBCDB.js} +2 -2
- package/dist/cli/chunks/{chunk-G4FAPO57.js → chunk-QUJJYTJH.js} +2 -2
- package/dist/cli/chunks/{chunk-H7BLYMNU.js → chunk-QWG3SILX.js} +3 -3
- package/dist/cli/chunks/{chunk-LXQ3B4RY.js → chunk-RCOLPF3B.js} +2 -2
- package/dist/cli/chunks/{chunk-E44NNCEU.js → chunk-RYHG3I7J.js} +2 -2
- package/dist/cli/chunks/{chunk-RTFKTKSO.js → chunk-SBHM5X2S.js} +2 -2
- package/dist/cli/chunks/{chunk-DOBZPSKE.js → chunk-SDRJJUPO.js} +1 -1
- package/dist/cli/chunks/{chunk-RTY7VSZB.js → chunk-SG2TX72G.js} +2 -2
- package/dist/cli/chunks/{chunk-NTB342NJ.js → chunk-SITL5YZV.js} +4 -4
- package/dist/cli/chunks/{chunk-WM3SRRA6.js → chunk-SPC4RBLF.js} +2 -2
- package/dist/cli/chunks/{chunk-ITL3IN2E.js → chunk-SQVZ3TRU.js} +2 -2
- package/dist/cli/chunks/{chunk-CO3DX2AX.js → chunk-SUX5XB2Z.js} +2 -2
- package/dist/cli/chunks/{chunk-KSE5TDM5.js → chunk-T4EN5VVK.js} +2 -2
- package/dist/cli/chunks/{chunk-5HQP4SLM.js → chunk-TGMXUZZC.js} +2 -2
- package/dist/cli/chunks/{chunk-YOCULVHR.js → chunk-TLRHAMX5.js} +1 -1
- package/dist/cli/chunks/{chunk-GBFUANTC.js → chunk-TOWOJGEI.js} +1 -1
- package/dist/cli/chunks/{chunk-4UBVAJFO.js → chunk-TSOQ2QLT.js} +2 -2
- package/dist/cli/chunks/{chunk-SMVVAVN2.js → chunk-TVA5GRIU.js} +2 -2
- package/dist/cli/chunks/{chunk-K7V2WZNF.js → chunk-TXEUVUMO.js} +1 -1
- package/dist/cli/chunks/{chunk-LQ4NUC6Q.js → chunk-U6IXYQO4.js} +2 -2
- package/dist/cli/chunks/{chunk-HDJUYAZG.js → chunk-U7ZHDGXG.js} +1 -1
- package/dist/cli/chunks/{chunk-2VLYUF7U.js → chunk-UCSK2RMI.js} +2 -2
- package/dist/cli/chunks/{chunk-4UX35V7P.js → chunk-UIKQPO4Y.js} +2 -2
- package/dist/cli/chunks/chunk-UJNGGFGX.js +2 -0
- package/dist/cli/chunks/{chunk-AFFN6E6Q.js → chunk-ULCW6IVQ.js} +2 -2
- package/dist/cli/chunks/{chunk-WCVCOT4E.js → chunk-UREDS662.js} +2 -2
- package/dist/cli/chunks/{chunk-E6PF35JZ.js → chunk-URSTP3WI.js} +2 -2
- package/dist/cli/chunks/{chunk-I36CRDHF.js → chunk-UUZZXHUF.js} +2 -2
- package/dist/cli/chunks/{chunk-MIK4RBEH.js → chunk-UZED4YZ5.js} +1 -1
- package/dist/cli/chunks/{chunk-ZQHDA4O7.js → chunk-VF7FTD64.js} +1 -1
- package/dist/cli/chunks/{chunk-AMZKAJLJ.js → chunk-VUR5THML.js} +2 -2
- package/dist/cli/chunks/{chunk-H43AFUKL.js → chunk-VXVTFKRA.js} +2 -2
- package/dist/cli/chunks/chunk-VZBC6DP7.js +2 -0
- package/dist/cli/chunks/{chunk-DDEOZPWJ.js → chunk-W4II6SIH.js} +2 -2
- package/dist/cli/chunks/{chunk-55CH76ZO.js → chunk-W5HQIYQU.js} +3 -3
- package/dist/cli/chunks/{chunk-YPX2TV3M.js → chunk-W7H55PY4.js} +1 -1
- package/dist/cli/chunks/{chunk-CFWGGRE7.js → chunk-WDEXOLK2.js} +1 -1
- package/dist/cli/chunks/{chunk-XGBU3KEM.js → chunk-WGTEZT7G.js} +2 -2
- package/dist/cli/chunks/{chunk-NC6K7SCQ.js → chunk-WLRU6ESI.js} +2 -2
- package/dist/cli/chunks/{chunk-JFLU7L3W.js → chunk-WTAUF6O4.js} +2 -2
- package/dist/cli/chunks/chunk-XCNSGSKV.js +3 -0
- package/dist/cli/chunks/{chunk-57LNKSW7.js → chunk-XZOYKB22.js} +2 -2
- package/dist/cli/chunks/chunk-YIDAXOUX.js +8 -0
- package/dist/cli/chunks/{chunk-25P77WA5.js → chunk-YLKIXEPP.js} +1 -1
- package/dist/cli/chunks/{chunk-R5GRABPQ.js → chunk-YNVEDFPQ.js} +1 -1
- package/dist/cli/chunks/{chunk-NQZNMCZU.js → chunk-YUA6ZKKY.js} +2 -2
- package/dist/cli/chunks/{chunk-OYJC3YON.js → chunk-YVJEUX3I.js} +2 -2
- package/dist/cli/chunks/{chunk-QDESWOZP.js → chunk-YWWMNTBF.js} +2 -2
- package/dist/cli/chunks/{chunk-7HEMJHPP.js → chunk-ZGROHCOW.js} +1 -1
- package/dist/cli/chunks/{chunk-AP3ADWDK.js → chunk-ZPVGX4DI.js} +2 -2
- package/dist/cli/chunks/{chunk-M5XYIQYZ.js → chunk-ZROAMFX2.js} +2 -2
- package/dist/cli/chunks/{chunk-I4K2HTQU.js → chunk-ZYOYR3UR.js} +1 -1
- package/dist/cli/chunks/ci-BZNWW3I3.js +81 -0
- package/dist/cli/chunks/{ci-config-J665XNOX.js → ci-config-LOHNXOKV.js} +2 -2
- package/dist/cli/chunks/{ci-output-PEQQQWVD.js → ci-output-LCOQBSJL.js} +2 -2
- package/dist/cli/chunks/{circuit-breaker-HHB2JSKH.js → circuit-breaker-7LRXTLFE.js} +2 -2
- package/dist/cli/chunks/{claude-flow-setup-JKUJRWPN.js → claude-flow-setup-HBU4VWC3.js} +2 -2
- package/dist/cli/chunks/client-4PNYDFYS.js +2 -0
- package/dist/cli/chunks/{cline-installer-Y77BWTAN.js → cline-installer-CO6MLH6X.js} +2 -2
- package/dist/cli/chunks/{code-LV2HAGJY.js → code-SIXBS6JM.js} +3 -3
- package/dist/cli/chunks/{code-index-extractor-4GKKSETB.js → code-index-extractor-GWJKZ2IQ.js} +2 -2
- package/dist/cli/chunks/{codex-installer-WMKBYE5Y.js → codex-installer-6NINVWXJ.js} +2 -2
- package/dist/cli/chunks/{completions-SBGFAOIJ.js → completions-7VIX3GML.js} +2 -2
- package/dist/cli/chunks/{complexity-analyzer-AQHFIJXC.js → complexity-analyzer-FBQR6ZP2.js} +2 -2
- package/dist/cli/chunks/{continuedev-installer-26AYFS2E.js → continuedev-installer-VA7RIXW5.js} +2 -2
- package/dist/cli/chunks/{copilot-installer-4UD3DK55.js → copilot-installer-4QEBC4MU.js} +2 -2
- package/dist/cli/chunks/core-handlers-ODO6LUWQ.js +2 -0
- package/dist/cli/chunks/{cost-tracker-TP4NZCG4.js → cost-tracker-GRYKHPWL.js} +2 -2
- package/dist/cli/chunks/{coverage-B2KIXHAI.js → coverage-USPMNKOU.js} +11 -10
- package/dist/cli/chunks/cross-domain-router-DT4MHJKK.js +2 -0
- package/dist/cli/chunks/{cursor-installer-AVZEQZ4W.js → cursor-installer-ZXIPSZVH.js} +2 -2
- package/dist/cli/chunks/{daemon-XM2A7LQU.js → daemon-D7F3RGI5.js} +3 -3
- package/dist/cli/chunks/{daemon-P574WWBW.js → daemon-N2VRHPSJ.js} +4 -4
- package/dist/cli/chunks/{dag-attention-scheduler-MIWOZ6ET.js → dag-attention-scheduler-NL6BA7BY.js} +2 -2
- package/dist/cli/chunks/{detect-TYR7HT23.js → detect-XC2HCIIT.js} +2 -2
- package/dist/cli/chunks/{dist-node-2DGVQGLS.js → dist-node-A3Y26MEI.js} +2 -2
- package/dist/cli/chunks/{domain-handler-RRA4ZOMF.js → domain-handler-WV6SFXRB.js} +2 -2
- package/dist/cli/chunks/{domain-plugins-IVZEZ5RB.js → domain-plugins-KJIF6Z2B.js} +2 -2
- package/dist/cli/chunks/{domain-transfer-DOBI67K6.js → domain-transfer-L3F6AES2.js} +2 -2
- package/dist/cli/chunks/dream-QOB3JCOM.js +2 -0
- package/dist/cli/chunks/{embed-and-insert-pattern-VNIEOVPO.js → embed-and-insert-pattern-PA3Y4KGO.js} +2 -2
- package/dist/cli/chunks/{eval-QV4LVPUF.js → eval-YGEZNUVE.js} +2 -2
- package/dist/cli/chunks/{experience-capture-middleware-DAPKT763.js → experience-capture-middleware-D4T7NW6B.js} +3 -3
- package/dist/cli/chunks/{fast-paths-WVRFPHX7.js → fast-paths-6JYK7RYQ.js} +2 -2
- package/dist/cli/chunks/{feature-flags-O7ZXDDCD.js → feature-flags-DKXMDVPE.js} +2 -2
- package/dist/cli/chunks/{feature-flags-DEFTUIYT.js → feature-flags-RBH2GDSR.js} +2 -2
- package/dist/cli/chunks/file-discovery-BN76S2PR.js +2 -0
- package/dist/cli/chunks/fleet-43YMXACN.js +46 -0
- package/dist/cli/chunks/{gnn-wrapper-LS4LZJDR.js → gnn-wrapper-MV54UC4C.js} +2 -2
- package/dist/cli/chunks/{heartbeat-handler-RFTERD4K.js → heartbeat-handler-7DKMVQQH.js} +4 -4
- package/dist/cli/chunks/heartbeat-scheduler-3NNP4WCP.js +2 -0
- package/dist/cli/chunks/hnsw-adapter-MZR7Y4WF.js +2 -0
- package/dist/cli/chunks/hnsw-index-HE4AX22U.js +2 -0
- package/dist/cli/chunks/{hnsw-legacy-bridge-GPKGFFHY.js → hnsw-legacy-bridge-6IWREDQC.js} +2 -2
- package/dist/cli/chunks/{hnswlib-node-PHL3F2PR.js → hnswlib-node-5BIESSCK.js} +2 -2
- package/dist/cli/chunks/{hooks-GYJ6D4QM.js → hooks-3EETRM62.js} +28 -28
- package/dist/cli/chunks/hybrid-backend-IHUHB3Y2.js +2 -0
- package/dist/cli/chunks/{hypergraph-engine-YGEQPCKJ.js → hypergraph-engine-RSWCB2D3.js} +2 -2
- package/dist/cli/chunks/{hypergraph-handler-ZIMM647V.js → hypergraph-handler-552LXKL3.js} +3 -3
- package/dist/cli/chunks/impact-analyzer-FI6GI6PD.js +2 -0
- package/dist/cli/chunks/{init-guard-VOMBXJXG.js → init-guard-OTDBJ5HD.js} +2 -2
- package/dist/cli/chunks/{init-handler-PSMUBWK5.js → init-handler-3FK3TKEA.js} +6 -6
- package/dist/cli/chunks/init-wizard-WLQKH5Y5.js +2 -0
- package/dist/cli/chunks/kernel-2WZOQEZS.js +2 -0
- package/dist/cli/chunks/{kilocode-installer-2YNTFBWJ.js → kilocode-installer-KZ2O4LF3.js} +2 -2
- package/dist/cli/chunks/{kiro-installer-XHJDPVAZ.js → kiro-installer-MLCCXRF7.js} +2 -2
- package/dist/cli/chunks/knowledge-graph-G3LVKK6P.js +2 -0
- package/dist/cli/chunks/{learning-GNSIDRNG.js → learning-QUCMBD77.js} +3 -3
- package/dist/cli/chunks/{llm-router-LQDM7IU2.js → llm-router-PDEV3UP2.js} +4 -4
- package/dist/cli/chunks/llm-router-service-MM75HKWJ.js +2 -0
- package/dist/cli/chunks/{load-YATHI72E.js → load-XFVVLO7E.js} +2 -2
- package/dist/cli/chunks/load-test-BEWEE44J.js +2 -0
- package/dist/cli/chunks/{mcp-4Y6GDLYK.js → mcp-74G3CL2S.js} +2 -2
- package/dist/cli/chunks/{memory-OUW3L7H2.js → memory-XIFM6JNX.js} +5 -5
- package/dist/cli/chunks/memory-backend-NYKBBKZR.js +2 -0
- package/dist/cli/chunks/{memory-handlers-G3LFF53U.js → memory-handlers-ZCKURV6S.js} +2 -2
- package/dist/cli/chunks/{multi-model-executor-UBZJXAD2.js → multi-model-executor-7L4W3O2Q.js} +2 -2
- package/dist/cli/chunks/{opencode-installer-AMMNWVH5.js → opencode-installer-BPG422LF.js} +2 -2
- package/dist/cli/chunks/{orchestrator-Y44WDOER.js → orchestrator-OEAFLAEV.js} +58 -20
- package/dist/cli/chunks/pattern-null-store-QGPUIV6M.js +2 -0
- package/dist/cli/chunks/{pattern-usage-recorder-ESR42RME.js → pattern-usage-recorder-LOPNCULT.js} +2 -2
- package/dist/cli/chunks/{pipeline-EDTS6OSC.js → pipeline-VWTYUZB7.js} +2 -2
- package/dist/cli/chunks/{platform-5WONJSUX.js → platform-WFJJ3X2E.js} +2 -2
- package/dist/cli/chunks/{plugin-IJXPCLD4.js → plugin-744TPUSG.js} +2 -2
- package/dist/cli/chunks/{prime-radiant-advanced-wasm-5ECKGZK6.js → prime-radiant-advanced-wasm-BD5BLNDR.js} +2 -2
- package/dist/cli/chunks/project-root-C7ELXZRK.js +2 -0
- package/dist/cli/chunks/protocol-executor-SUVE33BM.js +2 -0
- package/dist/cli/chunks/{protocol-handler-DRD3GVNW.js → protocol-handler-JIBILI74.js} +2 -2
- package/dist/cli/chunks/{prove-KTGW2HMJ.js → prove-MNOL5FYW.js} +2 -2
- package/dist/cli/chunks/qe-reasoning-bank-YWZMMGJB.js +2 -0
- package/dist/cli/chunks/{quality-DV2WPRRS.js → quality-JEGBDGGX.js} +2 -2
- package/dist/cli/chunks/{quality-gate-HFUAFVZC.js → quality-gate-SYJ6ROMI.js} +3 -3
- package/dist/cli/chunks/queen-coordinator-ZFAKXRN7.js +2 -0
- package/dist/cli/chunks/real-embeddings-ZWXS5ZFV.js +2 -0
- package/dist/cli/chunks/{ref-validation-QWSKS5OY.js → ref-validation-RRHUFW2N.js} +2 -2
- package/dist/cli/chunks/{roocode-installer-RBAYRCHX.js → roocode-installer-XFO6JSVN.js} +2 -2
- package/dist/cli/chunks/router-4FTAVYLJ.js +2 -0
- package/dist/cli/chunks/routing-feedback-IO2KOWMJ.js +2 -0
- package/dist/cli/chunks/{routing-handler-FMPP3XKO.js → routing-handler-L2K3JASE.js} +2 -2
- package/dist/cli/chunks/{ruvector-commands-KZZT4HWF.js → ruvector-commands-A6CINHGM.js} +2 -2
- package/dist/cli/chunks/rvf-dual-writer-KCIRNE7C.js +2 -0
- package/dist/cli/chunks/rvf-migration-adapter-MFC5WTJU.js +2 -0
- package/dist/cli/chunks/{rvf-migration-coordinator-7CHEV35N.js → rvf-migration-coordinator-T4RY7L53.js} +2 -2
- package/dist/cli/chunks/rvf-native-adapter-I3KWHE7X.js +2 -0
- package/dist/cli/chunks/{rvf-store-integrity-Q2TH52SN.js → rvf-store-integrity-IR33TGQS.js} +2 -2
- package/dist/cli/chunks/safe-db-QXDZ6QY3.js +2 -0
- package/dist/cli/chunks/schedule-CZKD6RIY.js +2 -0
- package/dist/cli/chunks/scheduler-BLA3Q4CH.js +2 -0
- package/dist/cli/chunks/{security-CUEA3UIM.js → security-Z5GDE2IH.js} +3 -3
- package/dist/cli/chunks/{shared-rvf-adapter-DROMBRV2.js → shared-rvf-adapter-SIZMEHPM.js} +2 -2
- package/dist/cli/chunks/{shared-rvf-dual-writer-DBNABOP7.js → shared-rvf-dual-writer-HLM65RDS.js} +2 -2
- package/dist/cli/chunks/sqlite-persistence-XIUYDJC4.js +2 -0
- package/dist/cli/chunks/{standalone-memory-IAHA3M6B.js → standalone-memory-SKSZG7P5.js} +2 -2
- package/dist/cli/chunks/{status-handler-AFUCASTX.js → status-handler-766YOOMJ.js} +2 -2
- package/dist/cli/chunks/{structural-health-AQRV6JJ6.js → structural-health-M45FNOLT.js} +2 -2
- package/dist/cli/chunks/{sync-GX7FMJHL.js → sync-6CJ24B5T.js} +2 -2
- package/dist/cli/chunks/{sync-XW5TLZ7M.js → sync-B2U366I3.js} +2 -2
- package/dist/cli/chunks/{task-handler-TFKVUTNF.js → task-handler-P6IFLCKP.js} +17 -15
- package/dist/cli/chunks/task-handlers-DPWMUKFC.js +9 -0
- package/dist/cli/chunks/{test-D2XDJNDX.js → test-TODH7KRF.js} +4 -4
- package/dist/cli/chunks/test-runner-process-46IPK3GH.js +2 -0
- package/dist/cli/chunks/{test-scheduling-TS6I2PR7.js → test-scheduling-VMVMVRHT.js} +3 -3
- package/dist/cli/chunks/{token-bootstrap-HBBLPCZ3.js → token-bootstrap-XQW7BMCK.js} +2 -2
- package/dist/cli/chunks/{token-usage-3MBUX4PR.js → token-usage-JCZEIRKO.js} +2 -2
- package/dist/cli/chunks/{transformers-ZWMQO3L2.js → transformers-U2ML3OHE.js} +2 -2
- package/dist/cli/chunks/tree-sitter-wasm-parser-MOI2WWNJ.js +2 -0
- package/dist/cli/chunks/{types-5YEMGPSQ.js → types-GGEPCHP6.js} +2 -2
- package/dist/cli/chunks/unified-memory-FL26RTV3.js +2 -0
- package/dist/cli/chunks/unified-memory-hnsw-E2BPTH3U.js +2 -0
- package/dist/cli/chunks/unified-persistence-5ZOUPKHF.js +2 -0
- package/dist/cli/chunks/{upgrade-2TPBKIHI.js → upgrade-T5GRM7HS.js} +2 -2
- package/dist/cli/chunks/{validate-XRAXXFW6.js → validate-XMUJPLP3.js} +2 -2
- package/dist/cli/chunks/{validate-swarm-IYSCS3BZ.js → validate-swarm-KJLF7JEH.js} +2 -2
- package/dist/cli/chunks/visual-security-IJVPO5FA.js +2 -0
- package/dist/cli/chunks/{web-tree-sitter-PZQ3ZG2P.js → web-tree-sitter-LOHVZ7G5.js} +2 -2
- package/dist/cli/chunks/{windsurf-installer-U6XWFRVT.js → windsurf-installer-33FBTXJU.js} +2 -2
- package/dist/cli/chunks/witness-chain-5FAFCQKP.js +2 -0
- package/dist/cli/chunks/witness-chain-V2M32W5D.js +2 -0
- package/dist/cli/chunks/{witness-chain-repair-K7YX2AO6.js → witness-chain-repair-VWBO4NXE.js} +2 -2
- package/dist/cli/chunks/{witness-chain-verifier-GUTC3W7N.js → witness-chain-verifier-BHJ3ZAEK.js} +2 -2
- package/dist/cli/chunks/{witness-key-manager-YBNKMOP6.js → witness-key-manager-WNVPH2Z3.js} +2 -2
- package/dist/cli/chunks/{workflow-UAJUILFQ.js → workflow-6QR5MQTO.js} +4 -4
- package/dist/cli/chunks/workflow-orchestrator-3JLF3IX7.js +2 -0
- package/dist/cli/chunks/{wrappers-AVZ3GPAL.js → wrappers-EHOL62TS.js} +2 -2
- package/dist/cli/commands/ci.js +7 -0
- package/dist/cli/commands/coverage.js +7 -1
- package/dist/cli/commands/fleet.js +2 -2
- package/dist/cli/commands/hooks-handlers/stats-hooks.d.ts +4 -3
- package/dist/cli/commands/hooks-handlers/stats-hooks.js +22 -4
- package/dist/cli/handlers/task-handler.js +6 -0
- package/dist/cli/utils/coverage-verdict.d.ts +11 -2
- package/dist/cli/utils/coverage-verdict.js +26 -6
- package/dist/cli/utils/fleet-operation.d.ts +5 -0
- package/dist/cli/utils/fleet-operation.js +7 -1
- package/dist/cli/utils/fleet-result.d.ts +5 -3
- package/dist/cli/utils/fleet-result.js +9 -3
- package/dist/coordination/handlers/coverage-collection.d.ts +2 -0
- package/dist/coordination/handlers/coverage-collection.js +2 -1
- package/dist/coordination/handlers/coverage-evidence.d.ts +75 -0
- package/dist/coordination/handlers/coverage-evidence.js +159 -0
- package/dist/coordination/handlers/coverage-handlers.js +16 -3
- package/dist/coordination/handlers/coverage-scope.d.ts +40 -0
- package/dist/coordination/handlers/coverage-scope.js +321 -0
- package/dist/coordination/handlers/coverage-target.d.ts +9 -0
- package/dist/coordination/handlers/coverage-target.js +15 -5
- package/dist/coordination/handlers/handler-utils.d.ts +5 -0
- package/dist/coordination/handlers/handler-utils.js +8 -4
- package/dist/domains/code-intelligence/services/metric-collector/listing-process-owner.js +4 -1
- package/dist/domains/code-intelligence/services/semantic-analyzer.d.ts +8 -0
- package/dist/domains/code-intelligence/services/semantic-analyzer.js +10 -7
- package/dist/init/phases/10-workers.js +42 -4
- package/dist/integrations/agentic-flow/reasoning-bank/experience-replay.d.ts +23 -1
- package/dist/integrations/agentic-flow/reasoning-bank/experience-replay.js +50 -15
- package/dist/integrations/agentic-flow/reasoning-bank/index.d.ts +7 -2
- package/dist/integrations/agentic-flow/reasoning-bank/index.js +8 -0
- package/dist/learning/embedder-endpoint-client.d.ts +8 -0
- package/dist/learning/embedder-endpoint-client.js +20 -0
- package/dist/learning/embedder-recovery.d.ts +63 -0
- package/dist/learning/embedder-recovery.js +94 -0
- package/dist/learning/qe-reasoning-bank-types.d.ts +5 -0
- package/dist/learning/qe-reasoning-bank.d.ts +21 -0
- package/dist/learning/qe-reasoning-bank.js +54 -8
- package/dist/learning/real-embeddings.d.ts +23 -0
- package/dist/learning/real-embeddings.js +69 -2
- package/dist/learning/real-qe-reasoning-bank.d.ts +24 -4
- package/dist/learning/real-qe-reasoning-bank.js +58 -20
- package/dist/logging/redaction.js +142 -12
- package/dist/mcp/bundle.js +504 -492
- package/dist/mcp/daemon-mode.d.ts +126 -0
- package/dist/mcp/daemon-mode.js +257 -0
- package/dist/mcp/entry.d.ts +4 -0
- package/dist/mcp/entry.js +50 -2
- package/dist/mcp/handlers/domain-handler-configs.js +5 -0
- package/dist/mcp/handlers/orchestrate-routes.d.ts +6 -1
- package/dist/mcp/handlers/orchestrate-routes.js +53 -0
- package/dist/mcp/handlers/task-handlers.d.ts +11 -2
- package/dist/mcp/handlers/task-handlers.js +50 -5
- package/dist/mcp/protocol-server.js +3 -0
- package/dist/mcp/services/reasoning-bank-service.d.ts +6 -1
- package/dist/mcp/services/reasoning-bank-service.js +9 -0
- package/dist/mcp/types.d.ts +14 -0
- package/dist/routing/advisor/redaction.js +22 -2
- package/dist/shared/llm/providers/response-deadline.js +16 -2
- package/dist/shared/types/index.js +3 -1
- package/dist/strange-loop/infra-healing/infra-aware-agent-provider.js +8 -1
- package/package.json +3 -3
- package/dist/cli/chunks/adapter-V4GSGOOK.js +0 -2
- package/dist/cli/chunks/aqe-learning-engine-6WQTM5YR.js +0 -2
- package/dist/cli/chunks/base-AK7BXBX2.js +0 -2
- package/dist/cli/chunks/browser-workflow-VTDFBW7T.js +0 -2
- package/dist/cli/chunks/chunk-2DTX7YAZ.js +0 -6
- package/dist/cli/chunks/chunk-72ZBJD2E.js +0 -3
- package/dist/cli/chunks/chunk-EBPJY4DI.js +0 -3
- package/dist/cli/chunks/chunk-HJ3XNTTJ.js +0 -2
- package/dist/cli/chunks/chunk-IO5537OM.js +0 -2
- package/dist/cli/chunks/chunk-IW6WDGHM.js +0 -2
- package/dist/cli/chunks/chunk-LRL56ZYL.js +0 -21
- package/dist/cli/chunks/chunk-VLD7Z2ED.js +0 -13
- package/dist/cli/chunks/chunk-VO3DRK4P.js +0 -3
- package/dist/cli/chunks/ci-6GUFAZMJ.js +0 -81
- package/dist/cli/chunks/client-HL2COSFM.js +0 -2
- package/dist/cli/chunks/core-handlers-IX7ATLM6.js +0 -2
- package/dist/cli/chunks/cross-domain-router-YYKLAPJO.js +0 -2
- package/dist/cli/chunks/dream-T6EP7B3F.js +0 -2
- package/dist/cli/chunks/file-discovery-JYMVTDMU.js +0 -2
- package/dist/cli/chunks/fleet-FVAUMKUT.js +0 -46
- package/dist/cli/chunks/heartbeat-scheduler-4N5MUJ7S.js +0 -2
- package/dist/cli/chunks/hnsw-adapter-ZPAJDSLR.js +0 -2
- package/dist/cli/chunks/hnsw-index-4CTH6RHB.js +0 -2
- package/dist/cli/chunks/hybrid-backend-AW6UTXQS.js +0 -2
- package/dist/cli/chunks/impact-analyzer-MZK3JMSV.js +0 -2
- package/dist/cli/chunks/init-wizard-FUC7KDVX.js +0 -2
- package/dist/cli/chunks/kernel-ZCPMCVMW.js +0 -2
- package/dist/cli/chunks/knowledge-graph-NUJKEDNF.js +0 -2
- package/dist/cli/chunks/llm-router-service-B2BFBQ76.js +0 -2
- package/dist/cli/chunks/load-test-ZHQ2MUGO.js +0 -2
- package/dist/cli/chunks/memory-backend-AAMQG6WH.js +0 -2
- package/dist/cli/chunks/pattern-null-store-RFNVA46O.js +0 -2
- package/dist/cli/chunks/project-root-7QL4KP5C.js +0 -2
- package/dist/cli/chunks/protocol-executor-2NW5BD4R.js +0 -2
- package/dist/cli/chunks/qe-reasoning-bank-G2JZOGKD.js +0 -2
- package/dist/cli/chunks/queen-coordinator-GRG5FT2A.js +0 -2
- package/dist/cli/chunks/real-embeddings-RQRVOKVM.js +0 -2
- package/dist/cli/chunks/router-LQB5SWAF.js +0 -2
- package/dist/cli/chunks/routing-feedback-OEEXA55N.js +0 -2
- package/dist/cli/chunks/rvf-dual-writer-BZK4M7BO.js +0 -2
- package/dist/cli/chunks/rvf-migration-adapter-EZZUJL2E.js +0 -2
- package/dist/cli/chunks/rvf-native-adapter-6COXTQZ3.js +0 -2
- package/dist/cli/chunks/safe-db-PE6G3L55.js +0 -2
- package/dist/cli/chunks/schedule-OLKQ6QYW.js +0 -2
- package/dist/cli/chunks/scheduler-LSGBDFAT.js +0 -2
- package/dist/cli/chunks/sqlite-persistence-HH4DNTYH.js +0 -2
- package/dist/cli/chunks/task-handlers-SS4ZDXNF.js +0 -9
- package/dist/cli/chunks/test-runner-process-PSSBNNGR.js +0 -2
- package/dist/cli/chunks/tree-sitter-wasm-parser-TYRQRJ2W.js +0 -2
- package/dist/cli/chunks/unified-memory-AGDZQ5XD.js +0 -2
- package/dist/cli/chunks/unified-memory-hnsw-X5TJ3JDE.js +0 -2
- package/dist/cli/chunks/unified-persistence-UCV7YETW.js +0 -2
- package/dist/cli/chunks/visual-security-ZLXRIQZV.js +0 -2
- package/dist/cli/chunks/witness-chain-CVIWYTD2.js +0 -2
- package/dist/cli/chunks/witness-chain-VBKORKOX.js +0 -2
- package/dist/cli/chunks/workflow-orchestrator-3ZN7MVCE.js +0 -2
|
@@ -74,6 +74,11 @@ export interface IstanbulFileCoverage {
|
|
|
74
74
|
* Load coverage data from common coverage file formats
|
|
75
75
|
*/
|
|
76
76
|
export declare function loadCoverageData(targetPath: string): Promise<CoverageData | null>;
|
|
77
|
+
/** `loadCoverageData` plus the path of the report it read (#1154: staleness needs it). */
|
|
78
|
+
export declare function loadCoverageReport(targetPath: string): Promise<{
|
|
79
|
+
data: CoverageData;
|
|
80
|
+
path: string;
|
|
81
|
+
} | null>;
|
|
77
82
|
/**
|
|
78
83
|
* Per-line hit counts of one istanbul file entry, computed the way istanbul's
|
|
79
84
|
* own `FileCoverage#getLineCoverage` (and therefore coverage-summary.json
|
|
@@ -16,6 +16,10 @@ import { safeJsonParse } from '../../shared/safe-json.js';
|
|
|
16
16
|
* Load coverage data from common coverage file formats
|
|
17
17
|
*/
|
|
18
18
|
export async function loadCoverageData(targetPath) {
|
|
19
|
+
return (await loadCoverageReport(targetPath))?.data ?? null;
|
|
20
|
+
}
|
|
21
|
+
/** `loadCoverageData` plus the path of the report it read (#1154: staleness needs it). */
|
|
22
|
+
export async function loadCoverageReport(targetPath) {
|
|
19
23
|
// Try various coverage file locations (JS, Python, Java, etc.)
|
|
20
24
|
const coverageLocations = [
|
|
21
25
|
// JavaScript/TypeScript (Istanbul/nyc/vitest)
|
|
@@ -36,16 +40,16 @@ export async function loadCoverageData(targetPath) {
|
|
|
36
40
|
// #1161: a report linked out of the project, or to a device, is not read.
|
|
37
41
|
const content = await readConfinedText(coveragePath, { outsideRoot: 'allow' });
|
|
38
42
|
if (coveragePath.endsWith('coverage-summary.json')) {
|
|
39
|
-
return parseCoverageSummaryJson(content);
|
|
43
|
+
return { data: parseCoverageSummaryJson(content), path: coveragePath };
|
|
40
44
|
}
|
|
41
45
|
else if (coveragePath.endsWith('.json')) {
|
|
42
|
-
return parseCoverageJson(content);
|
|
46
|
+
return { data: parseCoverageJson(content), path: coveragePath };
|
|
43
47
|
}
|
|
44
48
|
else if (coveragePath.endsWith('.info')) {
|
|
45
|
-
return parseLcovInfo(content);
|
|
49
|
+
return { data: parseLcovInfo(content), path: coveragePath };
|
|
46
50
|
}
|
|
47
51
|
else if (coveragePath.endsWith('.xml')) {
|
|
48
|
-
return parseCoberturaXml(content);
|
|
52
|
+
return { data: parseCoberturaXml(content), path: coveragePath };
|
|
49
53
|
}
|
|
50
54
|
}
|
|
51
55
|
catch {
|
|
@@ -32,7 +32,10 @@ function interrupted(signal) {
|
|
|
32
32
|
removeHandlers();
|
|
33
33
|
// Restore signal termination (including its exit status) instead of swallowing
|
|
34
34
|
// Ctrl-C or converting a requested shutdown into a successful metrics result.
|
|
35
|
-
|
|
35
|
+
// An embedding host with its own listener already received this signal, so
|
|
36
|
+
// re-raising would deliver it twice; the host decides how to shut down (#992).
|
|
37
|
+
if (process.listenerCount(signal) === 0)
|
|
38
|
+
process.kill(process.pid, signal);
|
|
36
39
|
}
|
|
37
40
|
const signalHandlers = {
|
|
38
41
|
SIGINT: () => interrupted('SIGINT'),
|
|
@@ -134,6 +134,14 @@ export declare class SemanticAnalyzerService implements ISemanticAnalyzerService
|
|
|
134
134
|
private findHighlights;
|
|
135
135
|
private findSemanticHighlights;
|
|
136
136
|
private fileToKey;
|
|
137
|
+
/**
|
|
138
|
+
* Content identity for the analysis and embedding caches.
|
|
139
|
+
*
|
|
140
|
+
* This keys cache entries, so it has to separate any two distinct inputs.
|
|
141
|
+
* A 31-multiplier 32-bit hash does not: for any shared prefix and suffix,
|
|
142
|
+
* "Aa" and "BB" collide, so two different functions would share one entry
|
|
143
|
+
* and the second caller would receive the first one's result.
|
|
144
|
+
*/
|
|
137
145
|
private hashCode;
|
|
138
146
|
private cacheEmbedding;
|
|
139
147
|
private cacheAnalysis;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Agentic QE v3 - Semantic Analyzer Service
|
|
3
3
|
* Semantic code analysis using vector embeddings and HNSW search
|
|
4
4
|
*/
|
|
5
|
+
import { createHash } from 'node:crypto';
|
|
5
6
|
import { ok, err } from '../../../shared/types/index.js';
|
|
6
7
|
import { NomicEmbedder, EMBEDDING_CONFIG, } from '../../../shared/embeddings/index.js';
|
|
7
8
|
import { toError } from '../../../shared/error-utils.js';
|
|
@@ -635,14 +636,16 @@ export class SemanticAnalyzerService {
|
|
|
635
636
|
fileToKey(file) {
|
|
636
637
|
return file.replace(/[/\\]/g, ':').replace(/\./g, '_');
|
|
637
638
|
}
|
|
639
|
+
/**
|
|
640
|
+
* Content identity for the analysis and embedding caches.
|
|
641
|
+
*
|
|
642
|
+
* This keys cache entries, so it has to separate any two distinct inputs.
|
|
643
|
+
* A 31-multiplier 32-bit hash does not: for any shared prefix and suffix,
|
|
644
|
+
* "Aa" and "BB" collide, so two different functions would share one entry
|
|
645
|
+
* and the second caller would receive the first one's result.
|
|
646
|
+
*/
|
|
638
647
|
hashCode(str) {
|
|
639
|
-
|
|
640
|
-
for (let i = 0; i < str.length; i++) {
|
|
641
|
-
const char = str.charCodeAt(i);
|
|
642
|
-
hash = (hash << 5) - hash + char;
|
|
643
|
-
hash = hash & hash;
|
|
644
|
-
}
|
|
645
|
-
return hash.toString(16);
|
|
648
|
+
return createHash('sha256').update(str, 'utf8').digest('hex');
|
|
646
649
|
}
|
|
647
650
|
cacheEmbedding(key, embedding) {
|
|
648
651
|
if (this.embeddingCache.size >= this.config.cacheSize) {
|
|
@@ -173,6 +173,26 @@ if (workersSetting !== undefined && ['false', '0', 'off', 'no'].includes(workers
|
|
|
173
173
|
process.exit(0);
|
|
174
174
|
}
|
|
175
175
|
|
|
176
|
+
// #1207: keep daemon.log bounded. The server truncates it on its heartbeat once
|
|
177
|
+
// it passes AQE_DAEMON_LOG_MAX_SIZE (default 5M, 0 or off disables); a log left
|
|
178
|
+
// over that size by an earlier run is moved to daemon.log.1 here, before
|
|
179
|
+
// anything writes to it. rename() replaces daemon.log.1 and never follows it.
|
|
180
|
+
function logMaxBytes() {
|
|
181
|
+
const text = String(process.env.AQE_DAEMON_LOG_MAX_SIZE || '').trim().toLowerCase();
|
|
182
|
+
if (['0', 'off', 'false', 'no', 'none', 'disable', 'disabled'].includes(text)) return 0;
|
|
183
|
+
const m = /^(\\d+)\\s*([kmg]?)b?$/.exec(text);
|
|
184
|
+
const bytes = m ? Number(m[1]) * { '': 1, k: 1024, m: 1048576, g: 1073741824 }[m[2]] : NaN;
|
|
185
|
+
return Number.isSafeInteger(bytes) && bytes >= 1024 ? bytes : 5 * 1048576;
|
|
186
|
+
}
|
|
187
|
+
function rotateLogAtStart(file) {
|
|
188
|
+
const max = logMaxBytes();
|
|
189
|
+
try {
|
|
190
|
+
const s = fs.lstatSync(file);
|
|
191
|
+
if (max > 0 && s.isFile() && s.size > max) fs.renameSync(file, file + '.1');
|
|
192
|
+
} catch {}
|
|
193
|
+
}
|
|
194
|
+
rotateLogAtStart(logFile);
|
|
195
|
+
|
|
176
196
|
const ts = new Date().toISOString();
|
|
177
197
|
appendFileSync(logFile, '[' + ts + '] Starting AQE v3 Worker Daemon...\\n');
|
|
178
198
|
|
|
@@ -228,10 +248,28 @@ if (binCandidate && binCandidate.endsWith('bundle.js')) {
|
|
|
228
248
|
appendFileSync(logFile, '[' + ts + '] Using: ' + mcpCmd + ' ' + mcpArgs.join(' ') + '\\n');
|
|
229
249
|
|
|
230
250
|
// #1066: keep a user's AQE_WORKERS_ENABLED (for example false) instead of forcing it on.
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
251
|
+
// #1158: AQE_MCP_DAEMON=1 is daemon mode. The server has no stdin here, so
|
|
252
|
+
// without it the stdin-EOF guard (#513) shut it down right after starting;
|
|
253
|
+
// in daemon mode it stops only on SIGTERM/SIGINT (stop-daemon.cjs).
|
|
254
|
+
const env = { ...process.env, AQE_STORAGE_PATH: '.agentic-qe', AQE_LEARNING_ENABLED: 'true', AQE_WORKERS_ENABLED: workersSetting ?? 'true', AQE_HTTP_PORT: '0', AQE_MCP_DAEMON: '1' };
|
|
255
|
+
// #1158: the server writes daemon.log itself, through a descriptor opened
|
|
256
|
+
// here with the same symlink rules as appendFileSync. Piping its output
|
|
257
|
+
// through this script kept the script from exiting while the daemon ran, and
|
|
258
|
+
// once the script was gone nothing was logged any more.
|
|
259
|
+
function openLogFd(file) {
|
|
260
|
+
if (!isRegularOrAbsent(file)) return 'ignore';
|
|
261
|
+
const c = fs.constants;
|
|
262
|
+
try { return fs.openSync(file, c.O_APPEND | c.O_CREAT | c.O_WRONLY | (c.O_NOFOLLOW || 0), 0o644); } catch { return 'ignore'; }
|
|
263
|
+
}
|
|
264
|
+
const logFd = openLogFd(logFile);
|
|
265
|
+
// #1207: name the file behind the server's stdout/stderr so it can rotate it.
|
|
266
|
+
if (typeof logFd === 'number') env.AQE_MCP_DAEMON_LOG = logFile; else delete env.AQE_MCP_DAEMON_LOG;
|
|
267
|
+
let child;
|
|
268
|
+
try {
|
|
269
|
+
child = spawn(mcpCmd, mcpArgs, { cwd: projectRoot, env, detached: true, stdio: ['ignore', logFd, logFd] });
|
|
270
|
+
} finally {
|
|
271
|
+
if (typeof logFd === 'number') { try { fs.closeSync(logFd); } catch {} }
|
|
272
|
+
}
|
|
235
273
|
let exited = null;
|
|
236
274
|
child.on('exit', (code, signal) => { exited = { code, signal }; });
|
|
237
275
|
// #1116: a command that cannot be started (no npx on PATH: spawn ENOENT) emits
|
|
@@ -71,6 +71,15 @@ export interface ExperienceGuidance {
|
|
|
71
71
|
/** Estimated token savings */
|
|
72
72
|
readonly estimatedTokenSavings: number;
|
|
73
73
|
}
|
|
74
|
+
/**
|
|
75
|
+
* #1204: whether similar-experience guidance can use vectors. 'unavailable'
|
|
76
|
+
* means the embedder failed (or there is none): experiences are stored
|
|
77
|
+
* without vectors and getGuidance returns no guidance.
|
|
78
|
+
*/
|
|
79
|
+
export interface ExperienceGuidanceStatus {
|
|
80
|
+
mode: 'vector' | 'unavailable';
|
|
81
|
+
reason?: string;
|
|
82
|
+
}
|
|
74
83
|
/**
|
|
75
84
|
* Configuration for ExperienceReplay
|
|
76
85
|
*/
|
|
@@ -89,6 +98,8 @@ export interface ExperienceReplayConfig {
|
|
|
89
98
|
autoPrune: boolean;
|
|
90
99
|
/** Prune threshold (quality below this is removed) */
|
|
91
100
|
pruneThreshold: number;
|
|
101
|
+
/** #1204: after the embedder fails, wait this long before retrying it (default 60 s). */
|
|
102
|
+
embedderRetryIntervalMs?: number;
|
|
92
103
|
}
|
|
93
104
|
/**
|
|
94
105
|
* ExperienceReplay stores and retrieves successful experiences for learning.
|
|
@@ -113,7 +124,13 @@ export declare class ExperienceReplay {
|
|
|
113
124
|
private prepared;
|
|
114
125
|
private initialized;
|
|
115
126
|
private initializationPromise;
|
|
116
|
-
|
|
127
|
+
/**
|
|
128
|
+
* #1204: whether the embedder works; retried in the background after a
|
|
129
|
+
* failure, as the pattern banks do (#1187).
|
|
130
|
+
*/
|
|
131
|
+
private readonly embedderRecovery;
|
|
132
|
+
/** Whether an embedding succeeded, to label later failures as runtime ones. */
|
|
133
|
+
private embedderWorked;
|
|
117
134
|
private hnswIndex;
|
|
118
135
|
private idToExperienceId;
|
|
119
136
|
private experienceIdToHnswId;
|
|
@@ -155,8 +172,13 @@ export declare class ExperienceReplay {
|
|
|
155
172
|
* #1022: embed text, or return null when no embedding runtime is available.
|
|
156
173
|
* The experience is then stored without a vector (backfilled at a later
|
|
157
174
|
* start that has an embedder) and similarity search finds no matches.
|
|
175
|
+
* #1204: a failure is reported by getEmbedderStatus(), labelled as a
|
|
176
|
+
* runtime failure when the embedder had worked, and warned about once per
|
|
177
|
+
* outage. The embedder is retried in the background after the interval.
|
|
158
178
|
*/
|
|
159
179
|
private embedOrNull;
|
|
180
|
+
/** #1204: whether similar-experience guidance can use vectors, and if not why. */
|
|
181
|
+
getEmbedderStatus(): ExperienceGuidanceStatus;
|
|
160
182
|
/**
|
|
161
183
|
* Get guidance for a new task based on similar experiences
|
|
162
184
|
*
|
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
*/
|
|
15
15
|
import { v4 as uuidv4 } from 'uuid';
|
|
16
16
|
import { getUnifiedMemory } from '../../../kernel/unified-memory.js';
|
|
17
|
-
import { computeRealEmbedding, } from '../../../learning/real-embeddings.js';
|
|
17
|
+
import { computeRealEmbedding, cosineSimilarity, } from '../../../learning/real-embeddings.js';
|
|
18
|
+
import { EmbedderRecovery, probeEmbedder } from '../../../learning/embedder-recovery.js';
|
|
18
19
|
import { CircularBuffer } from '../../../shared/utils/circular-buffer.js';
|
|
19
20
|
import { HNSWEmbeddingIndex } from '../../embeddings/index/HNSWIndex.js';
|
|
20
21
|
import { safeJsonParse } from '../../../shared/safe-json.js';
|
|
@@ -60,7 +61,13 @@ export class ExperienceReplay {
|
|
|
60
61
|
prepared = new Map();
|
|
61
62
|
initialized = false;
|
|
62
63
|
initializationPromise = null;
|
|
63
|
-
|
|
64
|
+
/**
|
|
65
|
+
* #1204: whether the embedder works; retried in the background after a
|
|
66
|
+
* failure, as the pattern banks do (#1187).
|
|
67
|
+
*/
|
|
68
|
+
embedderRecovery;
|
|
69
|
+
/** Whether an embedding succeeded, to label later failures as runtime ones. */
|
|
70
|
+
embedderWorked = false;
|
|
64
71
|
// Real HNSW index for O(log n) similarity search (150x-12,500x faster than linear scan)
|
|
65
72
|
hnswIndex;
|
|
66
73
|
// Mapping from HNSW numeric IDs to experience string IDs
|
|
@@ -82,6 +89,11 @@ export class ExperienceReplay {
|
|
|
82
89
|
constructor(config = {}) {
|
|
83
90
|
this.config = { ...DEFAULT_CONFIG, ...config };
|
|
84
91
|
this.recentExperiences = new CircularBuffer(100);
|
|
92
|
+
this.embedderRecovery = new EmbedderRecovery({
|
|
93
|
+
retryIntervalMs: this.config.embedderRetryIntervalMs,
|
|
94
|
+
probe: () => probeEmbedder(this.config.embedding),
|
|
95
|
+
onRecovered: () => console.log('[ExperienceReplay] Embedder available again: similar-experience guidance uses vectors'),
|
|
96
|
+
});
|
|
85
97
|
// Initialize real HNSW index with optimal parameters for experience search
|
|
86
98
|
this.hnswIndex = new HNSWEmbeddingIndex({
|
|
87
99
|
dimension: 384, // all-MiniLM-L6-v2 dimension
|
|
@@ -461,20 +473,36 @@ export class ExperienceReplay {
|
|
|
461
473
|
* #1022: embed text, or return null when no embedding runtime is available.
|
|
462
474
|
* The experience is then stored without a vector (backfilled at a later
|
|
463
475
|
* start that has an embedder) and similarity search finds no matches.
|
|
476
|
+
* #1204: a failure is reported by getEmbedderStatus(), labelled as a
|
|
477
|
+
* runtime failure when the embedder had worked, and warned about once per
|
|
478
|
+
* outage. The embedder is retried in the background after the interval.
|
|
464
479
|
*/
|
|
465
480
|
async embedOrNull(text) {
|
|
481
|
+
if (!this.embedderRecovery.isAvailable())
|
|
482
|
+
return null;
|
|
466
483
|
try {
|
|
467
|
-
|
|
484
|
+
const embedding = await computeRealEmbedding(text, this.config.embedding);
|
|
485
|
+
this.embedderWorked = true;
|
|
486
|
+
return embedding;
|
|
468
487
|
}
|
|
469
488
|
catch (error) {
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
489
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
490
|
+
const reason = this.embedderWorked ? `Embedder failed at runtime: ${message}` : message;
|
|
491
|
+
if (this.embedderRecovery.markUnavailable(reason)) {
|
|
492
|
+
console.warn(this.embedderWorked
|
|
493
|
+
? '[ExperienceReplay] Embedder failed; experiences are stored without vectors and ' +
|
|
494
|
+
'similar-experience guidance is unavailable until it recovers:'
|
|
495
|
+
: '[ExperienceReplay] No embedding runtime; experiences are stored without vectors ' +
|
|
496
|
+
'and similar-experience guidance is unavailable:', message);
|
|
474
497
|
}
|
|
475
498
|
return null;
|
|
476
499
|
}
|
|
477
500
|
}
|
|
501
|
+
/** #1204: whether similar-experience guidance can use vectors, and if not why. */
|
|
502
|
+
getEmbedderStatus() {
|
|
503
|
+
const reason = this.embedderRecovery.unavailableReason;
|
|
504
|
+
return reason === null ? { mode: 'vector' } : { mode: 'unavailable', reason };
|
|
505
|
+
}
|
|
478
506
|
/**
|
|
479
507
|
* Get guidance for a new task based on similar experiences
|
|
480
508
|
*
|
|
@@ -484,16 +512,19 @@ export class ExperienceReplay {
|
|
|
484
512
|
*/
|
|
485
513
|
async getGuidance(task, domain) {
|
|
486
514
|
this.ensureInitialized();
|
|
487
|
-
// #1022:
|
|
488
|
-
//
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
if (!(await this.embedOrNull(scrubReasoningBlocks(task)))) {
|
|
515
|
+
// #1022: without an embedding of the query nothing measures relevance, so
|
|
516
|
+
// return no guidance rather than picks with a made-up similarity.
|
|
517
|
+
const queryEmbedding = await this.embedOrNull(scrubReasoningBlocks(task));
|
|
518
|
+
if (!queryEmbedding) {
|
|
492
519
|
return null;
|
|
493
520
|
}
|
|
494
521
|
// Find similar experiences via HNSW
|
|
495
522
|
const similar = await this.findSimilarExperiences(task, domain);
|
|
496
|
-
// Blend in high-coherence experiences from reservoir buffer (R10, ADR-087)
|
|
523
|
+
// Blend in high-coherence experiences from reservoir buffer (R10, ADR-087).
|
|
524
|
+
// #1192: the buffer samples without looking at the query, so a sample is
|
|
525
|
+
// kept only when its similarity to the query embedding is measured and
|
|
526
|
+
// reaches the retrieval threshold. Samples without a comparable vector
|
|
527
|
+
// are skipped: every reported similarity is a measured one.
|
|
497
528
|
if (this.reservoirBuffer && this.reservoirBuffer.size() > 0) {
|
|
498
529
|
const reservoirSamples = this.reservoirBuffer.sample(Math.max(2, Math.floor(this.config.topK / 2)), 0.6);
|
|
499
530
|
for (const entry of reservoirSamples) {
|
|
@@ -504,8 +535,12 @@ export class ExperienceReplay {
|
|
|
504
535
|
// Skip if domain filter doesn't match
|
|
505
536
|
if (domain && exp.domain !== domain)
|
|
506
537
|
continue;
|
|
507
|
-
|
|
508
|
-
|
|
538
|
+
if (!exp.embedding || exp.embedding.length !== queryEmbedding.length)
|
|
539
|
+
continue;
|
|
540
|
+
const similarity = cosineSimilarity(queryEmbedding, exp.embedding);
|
|
541
|
+
if (similarity < this.config.similarityThreshold)
|
|
542
|
+
continue;
|
|
543
|
+
similar.push({ experience: exp, similarity });
|
|
509
544
|
}
|
|
510
545
|
}
|
|
511
546
|
if (similar.length === 0) {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
*/
|
|
18
18
|
import { RealQEReasoningBank, type RealQEReasoningBankConfig, type RealQEPatternSearchResult, type PatternSearchStatus, type RealQERoutingRequest, type RealQERoutingResult, type LearningOutcome } from '../../../learning/real-qe-reasoning-bank.js';
|
|
19
19
|
import { TrajectoryTracker, type Trajectory, type TrajectoryStep, type TrajectoryOptions, type TrajectoryTrackerConfig } from './trajectory-tracker.js';
|
|
20
|
-
import { ExperienceReplay, type ExperienceGuidance, type ExperienceReplayConfig } from './experience-replay.js';
|
|
20
|
+
import { ExperienceReplay, type ExperienceGuidance, type ExperienceGuidanceStatus, type ExperienceReplayConfig } from './experience-replay.js';
|
|
21
21
|
import { PatternEvolution, type PatternVersion, type DriftDetectionResult, type MergeCandidate, type PatternEvolutionConfig } from './pattern-evolution.js';
|
|
22
22
|
import type { QEPattern, QEDomain, CreateQEPatternOptions } from '../../../learning/qe-patterns.js';
|
|
23
23
|
export interface EnhancedReasoningBankAdapterStats {
|
|
@@ -32,7 +32,7 @@ export interface EnhancedReasoningBankAdapterStats {
|
|
|
32
32
|
}
|
|
33
33
|
import type { Result } from '../../../shared/types/index.js';
|
|
34
34
|
export { TrajectoryTracker, createTrajectoryTracker, type Trajectory, type TrajectoryStep, type TrajectoryOptions, type TrajectoryTrackerConfig, } from './trajectory-tracker.js';
|
|
35
|
-
export { ExperienceReplay, createExperienceReplay, type Experience, type ExperienceGuidance, type ExperienceReplayConfig, } from './experience-replay.js';
|
|
35
|
+
export { ExperienceReplay, createExperienceReplay, type Experience, type ExperienceGuidance, type ExperienceGuidanceStatus, type ExperienceReplayConfig, } from './experience-replay.js';
|
|
36
36
|
export { PatternEvolution, createPatternEvolution, type PatternVersion, type DriftDetectionResult, type MergeCandidate, type PatternEvolutionConfig, } from './pattern-evolution.js';
|
|
37
37
|
/**
|
|
38
38
|
* Configuration for Enhanced ReasoningBank Adapter
|
|
@@ -185,6 +185,11 @@ export declare class EnhancedReasoningBankAdapter {
|
|
|
185
185
|
}): Promise<Result<RealQEPatternSearchResult[]>>;
|
|
186
186
|
/** #1022: whether pattern search uses vectors or text matching only. */
|
|
187
187
|
getPatternSearchStatus(): PatternSearchStatus;
|
|
188
|
+
/**
|
|
189
|
+
* #1204: whether similar-experience guidance can use vectors; null when
|
|
190
|
+
* experience replay is disabled.
|
|
191
|
+
*/
|
|
192
|
+
getExperienceGuidanceStatus(): ExperienceGuidanceStatus | null;
|
|
188
193
|
/**
|
|
189
194
|
* Record a pattern outcome with evolution tracking
|
|
190
195
|
*/
|
|
@@ -302,6 +302,14 @@ export class EnhancedReasoningBankAdapter {
|
|
|
302
302
|
this.ensureInitialized();
|
|
303
303
|
return this.reasoningBank.getPatternSearchStatus();
|
|
304
304
|
}
|
|
305
|
+
/**
|
|
306
|
+
* #1204: whether similar-experience guidance can use vectors; null when
|
|
307
|
+
* experience replay is disabled.
|
|
308
|
+
*/
|
|
309
|
+
getExperienceGuidanceStatus() {
|
|
310
|
+
this.ensureInitialized();
|
|
311
|
+
return this.experienceReplay?.getEmbedderStatus() ?? null;
|
|
312
|
+
}
|
|
305
313
|
/**
|
|
306
314
|
* Record a pattern outcome with evolution tracking
|
|
307
315
|
*/
|
|
@@ -121,6 +121,14 @@ export declare class EmbedderEndpointClient {
|
|
|
121
121
|
failures: number;
|
|
122
122
|
trippedAt: number | null;
|
|
123
123
|
};
|
|
124
|
+
/**
|
|
125
|
+
* #1204: probe the endpoint while the circuit breaker is open, as its single
|
|
126
|
+
* half-open trial. Other callers keep fast-failing meanwhile. A success
|
|
127
|
+
* closes the breaker and refreshes the identity; a failure keeps the
|
|
128
|
+
* breaker open for another full window. Lets a caller that rate-limits its
|
|
129
|
+
* own retries recover without also waiting out the breaker window.
|
|
130
|
+
*/
|
|
131
|
+
probeThroughOpenBreaker(): Promise<EndpointIdentity>;
|
|
124
132
|
/**
|
|
125
133
|
* Close the underlying keep-alive agent. Tests should call this in afterEach.
|
|
126
134
|
*/
|
|
@@ -125,6 +125,10 @@ class CircuitBreaker {
|
|
|
125
125
|
}
|
|
126
126
|
return true;
|
|
127
127
|
}
|
|
128
|
+
/** #1204: open (or re-open) the breaker for a full window from now. */
|
|
129
|
+
trip() {
|
|
130
|
+
this.trippedAt = Date.now();
|
|
131
|
+
}
|
|
128
132
|
/** For tests / observability */
|
|
129
133
|
getState() {
|
|
130
134
|
return { open: this.isOpen(), failures: this.failures.length, trippedAt: this.trippedAt };
|
|
@@ -266,6 +270,22 @@ export class EmbedderEndpointClient {
|
|
|
266
270
|
getBreakerState() {
|
|
267
271
|
return this.breaker.getState();
|
|
268
272
|
}
|
|
273
|
+
/**
|
|
274
|
+
* #1204: probe the endpoint while the circuit breaker is open, as its single
|
|
275
|
+
* half-open trial. Other callers keep fast-failing meanwhile. A success
|
|
276
|
+
* closes the breaker and refreshes the identity; a failure keeps the
|
|
277
|
+
* breaker open for another full window. Lets a caller that rate-limits its
|
|
278
|
+
* own retries recover without also waiting out the breaker window.
|
|
279
|
+
*/
|
|
280
|
+
async probeThroughOpenBreaker() {
|
|
281
|
+
try {
|
|
282
|
+
return await this.probe();
|
|
283
|
+
}
|
|
284
|
+
catch (err) {
|
|
285
|
+
this.breaker.trip();
|
|
286
|
+
throw err;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
269
289
|
/**
|
|
270
290
|
* Close the underlying keep-alive agent. Tests should call this in afterEach.
|
|
271
291
|
*/
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Embedder recovery after a failure (#1187, #1204)
|
|
3
|
+
*
|
|
4
|
+
* A consumer of the embedder (a pattern bank, ExperienceReplay) runs without
|
|
5
|
+
* vectors while its embedder is down: patterns are stored text-only and
|
|
6
|
+
* searched by text. This class tracks that state and retries the embedder
|
|
7
|
+
* after a bounded interval, so a short outage does not last until restart.
|
|
8
|
+
*
|
|
9
|
+
* The retry runs in the background. The call that finds a retry due still
|
|
10
|
+
* gets "unavailable" and carries on without vectors, so a slow or unreachable
|
|
11
|
+
* embedder host never stalls it. The consumer becomes available again only
|
|
12
|
+
* after the retry's probe has succeeded: it never reports vectors it does not
|
|
13
|
+
* have. ADR-097 still holds: nothing here produces a substitute vector.
|
|
14
|
+
*/
|
|
15
|
+
import { type EmbeddingConfig } from './real-embeddings.js';
|
|
16
|
+
export declare const DEFAULT_EMBEDDER_RETRY_INTERVAL_MS = 60000;
|
|
17
|
+
export interface EmbedderRecoveryOptions {
|
|
18
|
+
/** Wait this long after a failure before trying the embedder again. */
|
|
19
|
+
retryIntervalMs?: number;
|
|
20
|
+
/**
|
|
21
|
+
* Resolve once the embedder works and the consumer is ready to use
|
|
22
|
+
* vectors again; throw otherwise. Defaults to probeEmbedder().
|
|
23
|
+
*/
|
|
24
|
+
probe?: () => Promise<void>;
|
|
25
|
+
/** Called after a retry succeeded. */
|
|
26
|
+
onRecovered?: () => void;
|
|
27
|
+
/** Called after a retry failed. */
|
|
28
|
+
onRetryFailed?: (error: unknown) => void;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Probe the embedder after a failure: re-initialize it, or try the endpoint
|
|
32
|
+
* through its open circuit breaker (recheckEmbedder), then embed the canary,
|
|
33
|
+
* bypassing the cache — a cached vector proves nothing about the embedder now.
|
|
34
|
+
*/
|
|
35
|
+
export declare function probeEmbedder(config?: Partial<EmbeddingConfig>): Promise<void>;
|
|
36
|
+
export declare class EmbedderRecovery {
|
|
37
|
+
private readonly options;
|
|
38
|
+
private reason;
|
|
39
|
+
private failedAt;
|
|
40
|
+
/** Counts failures, so a retry does not clear one recorded while it ran. */
|
|
41
|
+
private failureCount;
|
|
42
|
+
private retry;
|
|
43
|
+
private readonly retryIntervalMs;
|
|
44
|
+
private readonly probe;
|
|
45
|
+
constructor(options?: EmbedderRecoveryOptions);
|
|
46
|
+
/** Why the embedder is unavailable, or null while it works. */
|
|
47
|
+
get unavailableReason(): string | null;
|
|
48
|
+
/**
|
|
49
|
+
* True when the embedder can be used now. When it cannot and a retry is
|
|
50
|
+
* due, starts one in the background and still returns false.
|
|
51
|
+
*/
|
|
52
|
+
isAvailable(): boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Record an embedder failure. Returns true when the embedder was available
|
|
55
|
+
* until now, so the caller can warn once per outage rather than per call.
|
|
56
|
+
*/
|
|
57
|
+
markUnavailable(reason: string): boolean;
|
|
58
|
+
/** Resolves once an in-flight retry has finished (tests, shutdown). */
|
|
59
|
+
whenRetrySettled(): Promise<void>;
|
|
60
|
+
private startRetryIfDue;
|
|
61
|
+
private runRetry;
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=embedder-recovery.d.ts.map
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Embedder recovery after a failure (#1187, #1204)
|
|
3
|
+
*
|
|
4
|
+
* A consumer of the embedder (a pattern bank, ExperienceReplay) runs without
|
|
5
|
+
* vectors while its embedder is down: patterns are stored text-only and
|
|
6
|
+
* searched by text. This class tracks that state and retries the embedder
|
|
7
|
+
* after a bounded interval, so a short outage does not last until restart.
|
|
8
|
+
*
|
|
9
|
+
* The retry runs in the background. The call that finds a retry due still
|
|
10
|
+
* gets "unavailable" and carries on without vectors, so a slow or unreachable
|
|
11
|
+
* embedder host never stalls it. The consumer becomes available again only
|
|
12
|
+
* after the retry's probe has succeeded: it never reports vectors it does not
|
|
13
|
+
* have. ADR-097 still holds: nothing here produces a substitute vector.
|
|
14
|
+
*/
|
|
15
|
+
import { computeRealEmbedding, recheckEmbedder, } from './real-embeddings.js';
|
|
16
|
+
import { EMBEDDING_SPACE_CANARY } from './embedding-space.js';
|
|
17
|
+
export const DEFAULT_EMBEDDER_RETRY_INTERVAL_MS = 60_000;
|
|
18
|
+
/**
|
|
19
|
+
* Probe the embedder after a failure: re-initialize it, or try the endpoint
|
|
20
|
+
* through its open circuit breaker (recheckEmbedder), then embed the canary,
|
|
21
|
+
* bypassing the cache — a cached vector proves nothing about the embedder now.
|
|
22
|
+
*/
|
|
23
|
+
export async function probeEmbedder(config = {}) {
|
|
24
|
+
await recheckEmbedder(config);
|
|
25
|
+
await computeRealEmbedding(EMBEDDING_SPACE_CANARY, { ...config, enableCache: false });
|
|
26
|
+
}
|
|
27
|
+
export class EmbedderRecovery {
|
|
28
|
+
options;
|
|
29
|
+
reason = null;
|
|
30
|
+
failedAt = 0;
|
|
31
|
+
/** Counts failures, so a retry does not clear one recorded while it ran. */
|
|
32
|
+
failureCount = 0;
|
|
33
|
+
retry = null;
|
|
34
|
+
retryIntervalMs;
|
|
35
|
+
probe;
|
|
36
|
+
constructor(options = {}) {
|
|
37
|
+
this.options = options;
|
|
38
|
+
this.retryIntervalMs = options.retryIntervalMs ?? DEFAULT_EMBEDDER_RETRY_INTERVAL_MS;
|
|
39
|
+
this.probe = options.probe ?? (() => probeEmbedder());
|
|
40
|
+
}
|
|
41
|
+
/** Why the embedder is unavailable, or null while it works. */
|
|
42
|
+
get unavailableReason() {
|
|
43
|
+
return this.reason;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* True when the embedder can be used now. When it cannot and a retry is
|
|
47
|
+
* due, starts one in the background and still returns false.
|
|
48
|
+
*/
|
|
49
|
+
isAvailable() {
|
|
50
|
+
if (this.reason === null)
|
|
51
|
+
return true;
|
|
52
|
+
this.startRetryIfDue();
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Record an embedder failure. Returns true when the embedder was available
|
|
57
|
+
* until now, so the caller can warn once per outage rather than per call.
|
|
58
|
+
*/
|
|
59
|
+
markUnavailable(reason) {
|
|
60
|
+
const wasAvailable = this.reason === null;
|
|
61
|
+
this.reason = reason;
|
|
62
|
+
this.failedAt = Date.now();
|
|
63
|
+
this.failureCount++;
|
|
64
|
+
return wasAvailable;
|
|
65
|
+
}
|
|
66
|
+
/** Resolves once an in-flight retry has finished (tests, shutdown). */
|
|
67
|
+
async whenRetrySettled() {
|
|
68
|
+
await this.retry;
|
|
69
|
+
}
|
|
70
|
+
startRetryIfDue() {
|
|
71
|
+
if (this.retry)
|
|
72
|
+
return;
|
|
73
|
+
if (Date.now() - this.failedAt < this.retryIntervalMs)
|
|
74
|
+
return;
|
|
75
|
+
this.retry = this.runRetry().finally(() => {
|
|
76
|
+
this.retry = null;
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
async runRetry() {
|
|
80
|
+
const failuresBefore = this.failureCount;
|
|
81
|
+
try {
|
|
82
|
+
await this.probe();
|
|
83
|
+
if (this.failureCount !== failuresBefore)
|
|
84
|
+
return;
|
|
85
|
+
this.reason = null;
|
|
86
|
+
this.options.onRecovered?.();
|
|
87
|
+
}
|
|
88
|
+
catch (error) {
|
|
89
|
+
this.failedAt = Date.now();
|
|
90
|
+
this.options.onRetryFailed?.(error);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=embedder-recovery.js.map
|
|
@@ -38,6 +38,11 @@ export interface QEReasoningBankConfig {
|
|
|
38
38
|
coherenceThreshold?: number;
|
|
39
39
|
/** Optional RVF dual-writer for vector replication (Phase 3) */
|
|
40
40
|
rvfDualWriter?: RvfDualWriter;
|
|
41
|
+
/**
|
|
42
|
+
* #1204: after the embedder fails, wait this long before trying it again
|
|
43
|
+
* (in the background). Until then patterns are stored and searched by text.
|
|
44
|
+
*/
|
|
45
|
+
embedderRetryIntervalMs?: number;
|
|
41
46
|
}
|
|
42
47
|
/**
|
|
43
48
|
* Default configuration
|
|
@@ -50,6 +50,11 @@ export declare class QEReasoningBank implements IQEReasoningBank {
|
|
|
50
50
|
private readonly coherenceService?;
|
|
51
51
|
private readonly config;
|
|
52
52
|
private readonly embeddingProvenance;
|
|
53
|
+
/**
|
|
54
|
+
* #1187/#1204: whether the embedder works. While it does not, patterns are
|
|
55
|
+
* stored text-only and searched by text; it is retried in the background.
|
|
56
|
+
*/
|
|
57
|
+
private readonly embedderRecovery;
|
|
53
58
|
private patternStore;
|
|
54
59
|
private initialized;
|
|
55
60
|
private sqliteStore;
|
|
@@ -168,6 +173,22 @@ export declare class QEReasoningBank implements IQEReasoningBank {
|
|
|
168
173
|
* for ARM64 or when transformers module cannot be loaded.
|
|
169
174
|
*/
|
|
170
175
|
embed(text: string): Promise<number[]>;
|
|
176
|
+
/**
|
|
177
|
+
* #1187: embed for pattern store, search and routing, or null when the
|
|
178
|
+
* embedder endpoint fails at runtime. Callers then store the pattern
|
|
179
|
+
* text-only and search by text, as they do without an embedding runtime.
|
|
180
|
+
* ADR-097 still holds: no hash vector stands in for an endpoint vector.
|
|
181
|
+
* #1204: after a failure the embedder is not called again until a
|
|
182
|
+
* background retry, due `embedderRetryIntervalMs` later, finds it working.
|
|
183
|
+
*/
|
|
184
|
+
private embedForPatterns;
|
|
185
|
+
/**
|
|
186
|
+
* #1204: why the embedder failed, while patterns are stored and searched
|
|
187
|
+
* by text only because of that failure; null while it works or was never
|
|
188
|
+
* needed. A missing embedding runtime with no endpoint configured is not a
|
|
189
|
+
* failure: there embed() returns a hash vector, which is stored text-only.
|
|
190
|
+
*/
|
|
191
|
+
getEmbedderFailure(): string | null;
|
|
171
192
|
/**
|
|
172
193
|
* Get statistics
|
|
173
194
|
*/
|