agentic-qe 3.15.2 → 3.15.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/helpers/brain-checkpoint.cjs +46 -6
- package/.claude/hooks/aqe-hook.cjs +280 -51
- package/.claude/skills/skills-manifest.json +1 -1
- package/CHANGELOG.md +86 -0
- package/assets/skills/skills-manifest.json +1 -1
- package/dist/adapters/ag-ui/state-delta-cache.js +14 -5
- package/dist/adapters/trajectory-adapter.js +3 -1
- package/dist/cli/bundle.js +5 -5
- package/dist/cli/chunks/adapter-WQSFQES5.js +2 -0
- package/dist/cli/chunks/{agent-booster-wasm-664M7426.js → agent-booster-wasm-CYG3PKHH.js} +2 -2
- package/dist/cli/chunks/{agent-handler-E47ITH45.js → agent-handler-WTFYFZKL.js} +2 -2
- package/dist/cli/chunks/{agent-memory-branch-CFWVOJX3.js → agent-memory-branch-G6WE3ZXU.js} +2 -2
- package/dist/cli/chunks/aqe-learning-engine-TDHBBADE.js +2 -0
- package/dist/cli/chunks/{arena-JM3OY263.js → arena-S72QW44C.js} +4 -4
- package/dist/cli/chunks/{arena-ZU5CGBGH.js → arena-ZFXQEVUQ.js} +2 -2
- package/dist/cli/chunks/{audit-HVBRC5AS.js → audit-KPYIEQJ3.js} +3 -3
- package/dist/cli/chunks/base-CZSB27VO.js +2 -0
- package/dist/cli/chunks/{better-sqlite3-45JLBQX3.js → better-sqlite3-L2M3TI5D.js} +2 -2
- package/dist/cli/chunks/{brain-handler-FKDONZYA.js → brain-handler-FHKLQTB4.js} +3 -3
- package/dist/cli/chunks/{branch-enumerator-M3DPS3D5.js → branch-enumerator-3BSHOPOK.js} +2 -2
- package/dist/cli/chunks/{browser-TG2TV6NR.js → browser-JUIJPL6Y.js} +2 -2
- package/dist/cli/chunks/browser-workflow-AEMIS6PA.js +2 -0
- package/dist/cli/chunks/{chunk-3KTAMNKI.js → chunk-2GJJGO5D.js} +2 -2
- package/dist/cli/chunks/{chunk-HSXLHNSS.js → chunk-2M75CW5Q.js} +2 -2
- package/dist/cli/chunks/{chunk-MEUJWTOX.js → chunk-2MEWIXW4.js} +2 -2
- package/dist/cli/chunks/{chunk-SKQTRYE7.js → chunk-2TBHPYOU.js} +2 -2
- package/dist/cli/chunks/{chunk-PZK7O445.js → chunk-34Y4CIHD.js} +2 -2
- package/dist/cli/chunks/{chunk-RO6HAZLV.js → chunk-35VDOH4Y.js} +1 -1
- package/dist/cli/chunks/{chunk-KQMCCHPO.js → chunk-366IBPZB.js} +2 -2
- package/dist/cli/chunks/{chunk-GJTH6VBH.js → chunk-3MNKYCLH.js} +1 -1
- package/dist/cli/chunks/{chunk-6KEYA4EH.js → chunk-3UUMGWHW.js} +4 -4
- package/dist/cli/chunks/{chunk-EQG3JYSV.js → chunk-3Y4GX5FL.js} +2 -2
- package/dist/cli/chunks/{chunk-BKZSTZDB.js → chunk-3ZTBV6M3.js} +1 -1
- package/dist/cli/chunks/{chunk-UZL4JYVW.js → chunk-4IYHYHTG.js} +2 -2
- package/dist/cli/chunks/{chunk-56CE7UO4.js → chunk-4JVVVKAX.js} +6 -6
- package/dist/cli/chunks/chunk-4N7YXTV3.js +4 -0
- package/dist/cli/chunks/{chunk-N653RGT3.js → chunk-4TM5K6EZ.js} +2 -2
- package/dist/cli/chunks/{chunk-IAOB2G3X.js → chunk-5LEUEWJY.js} +2 -2
- package/dist/cli/chunks/{chunk-LRVR56PD.js → chunk-5QUOM357.js} +1 -1
- package/dist/cli/chunks/{chunk-NBV37CEK.js → chunk-5WOBFN2T.js} +2 -2
- package/dist/cli/chunks/{chunk-I7J2ESGR.js → chunk-6AKJ73X3.js} +2 -2
- package/dist/cli/chunks/{chunk-L77Z3Q6L.js → chunk-6EQDA4EC.js} +2 -2
- package/dist/cli/chunks/{chunk-3DCRAW43.js → chunk-6TYTBQPV.js} +2 -2
- package/dist/cli/chunks/{chunk-IQB5ZBYO.js → chunk-6V6XVGCL.js} +3 -3
- package/dist/cli/chunks/{chunk-DHSGCI6H.js → chunk-6W6GZHQA.js} +6 -6
- package/dist/cli/chunks/{chunk-MY2XZHW3.js → chunk-7IJVCDDC.js} +1 -1
- package/dist/cli/chunks/{chunk-AS27JP67.js → chunk-7PDC4SKR.js} +1 -1
- package/dist/cli/chunks/{chunk-3KXKJSKS.js → chunk-7SWHW5AC.js} +20 -20
- package/dist/cli/chunks/{chunk-FH6N2LKG.js → chunk-7TW5UGDP.js} +2 -2
- package/dist/cli/chunks/{chunk-SZYK5JL7.js → chunk-7UUSV2SK.js} +1 -1
- package/dist/cli/chunks/{chunk-HFF5ERIE.js → chunk-A3IQU2ND.js} +2 -2
- package/dist/cli/chunks/{chunk-RIAKRZCZ.js → chunk-A5H7TF7C.js} +2 -2
- package/dist/cli/chunks/{chunk-ATGIGJSL.js → chunk-A6PII4R4.js} +1 -1
- package/dist/cli/chunks/{chunk-X4CADOSD.js → chunk-AEL4XJGJ.js} +2 -2
- package/dist/cli/chunks/{chunk-JCB6K24D.js → chunk-AOZJ6UUZ.js} +2 -2
- package/dist/cli/chunks/chunk-APV5UWTU.js +15 -0
- package/dist/cli/chunks/{chunk-QJN5RW2U.js → chunk-AQTQ24SK.js} +3 -3
- package/dist/cli/chunks/{chunk-GDSLQTJC.js → chunk-AS54N3H7.js} +2 -2
- package/dist/cli/chunks/chunk-ASUXS4N4.js +2 -0
- package/dist/cli/chunks/{chunk-HS3O763N.js → chunk-B23ROYST.js} +3 -3
- package/dist/cli/chunks/{chunk-IHKRKRAV.js → chunk-BDKQSEEY.js} +1 -1
- package/dist/cli/chunks/{chunk-2B2MGJ2W.js → chunk-BO43BGHX.js} +2 -2
- package/dist/cli/chunks/{chunk-MDDECCAC.js → chunk-CF3BPD2R.js} +161 -159
- package/dist/cli/chunks/{chunk-ANI3KPB7.js → chunk-CFXROOIU.js} +2 -2
- package/dist/cli/chunks/{chunk-3RC5UMRJ.js → chunk-CNQUU6CF.js} +2 -2
- package/dist/cli/chunks/{chunk-NKWMTXBL.js → chunk-D5V6C3XG.js} +3 -3
- package/dist/cli/chunks/{chunk-ZIKH7U5A.js → chunk-D6PUDLJ4.js} +2 -2
- package/dist/cli/chunks/{chunk-FNPZINHV.js → chunk-DE3QNPTG.js} +1 -1
- package/dist/cli/chunks/{chunk-VTGAPHJE.js → chunk-DH5NWHH2.js} +2 -2
- package/dist/cli/chunks/{chunk-OWZ3F7DJ.js → chunk-DLA3EHKJ.js} +1 -1
- package/dist/cli/chunks/{chunk-7UA7SMM4.js → chunk-DWG4TN6A.js} +1 -1
- package/dist/cli/chunks/{chunk-4MCO43NX.js → chunk-EBIMVSPH.js} +4 -4
- package/dist/cli/chunks/{chunk-WMNVFCKY.js → chunk-ED5HUPUR.js} +2 -2
- package/dist/cli/chunks/{chunk-Y5VPLOA7.js → chunk-EQGT4VLC.js} +1 -1
- package/dist/cli/chunks/{chunk-ZVQSIH7Y.js → chunk-F5BREV2Q.js} +8 -8
- package/dist/cli/chunks/{chunk-CV7E627D.js → chunk-FPFGN2Z5.js} +2 -2
- package/dist/cli/chunks/{chunk-GJ7DON5S.js → chunk-FTUNC4EI.js} +3 -3
- package/dist/cli/chunks/chunk-FXTZXZCU.js +54 -0
- package/dist/cli/chunks/{chunk-6UO5YSNN.js → chunk-GJB3LPCS.js} +2 -2
- package/dist/cli/chunks/{chunk-6WVEICL2.js → chunk-GPZH6OPP.js} +4 -4
- package/dist/cli/chunks/{chunk-T5N2PIPS.js → chunk-HR7RL4PB.js} +2 -2
- package/dist/cli/chunks/{chunk-IT753IPZ.js → chunk-HSR53REE.js} +2 -2
- package/dist/cli/chunks/{chunk-DNS37AHW.js → chunk-HU474NXP.js} +1 -1
- package/dist/cli/chunks/{chunk-NP2WWIZ3.js → chunk-HV3ZVUHO.js} +1 -1
- package/dist/cli/chunks/{chunk-ITM26I6O.js → chunk-HVIFA73X.js} +2 -2
- package/dist/cli/chunks/{chunk-Q32UGPWK.js → chunk-HW4V7BVV.js} +2 -2
- package/dist/cli/chunks/{chunk-5DFPAJ5O.js → chunk-I5VJ3FBC.js} +2 -2
- package/dist/cli/chunks/{chunk-AR5V7VNC.js → chunk-IARE5VGI.js} +1 -1
- package/dist/cli/chunks/chunk-INVDDFJC.js +2 -0
- package/dist/cli/chunks/{chunk-M36DAETL.js → chunk-JJBTM4JO.js} +2 -2
- package/dist/cli/chunks/chunk-JVQK6NGI.js +14 -0
- package/dist/cli/chunks/{chunk-TMYGGYRY.js → chunk-K65X6CQA.js} +1 -1
- package/dist/cli/chunks/{chunk-HBMBO4FD.js → chunk-KCBCYF7M.js} +2 -2
- package/dist/cli/chunks/{chunk-V67UQRQN.js → chunk-KGS6H2HB.js} +2 -2
- package/dist/cli/chunks/{chunk-JSTKSPYT.js → chunk-L6OSEWOS.js} +1 -1
- package/dist/cli/chunks/{chunk-LH3H4V7C.js → chunk-LEB6O2IN.js} +2 -2
- package/dist/cli/chunks/{chunk-JIRX6KUR.js → chunk-LPZAB3N2.js} +3 -3
- package/dist/cli/chunks/{chunk-A6L2OCMO.js → chunk-M3ACHBC7.js} +2 -2
- package/dist/cli/chunks/{chunk-WBZIOTY6.js → chunk-M3ONCPSU.js} +2 -2
- package/dist/cli/chunks/{chunk-EATZW5T2.js → chunk-MUSYQF53.js} +2 -2
- package/dist/cli/chunks/{chunk-GSC6JXDE.js → chunk-MZDUBFLP.js} +1 -1
- package/dist/cli/chunks/{chunk-2Q4Y3VQ6.js → chunk-NT6FYFJA.js} +2 -2
- package/dist/cli/chunks/{chunk-HADOG2PT.js → chunk-O66D4NEJ.js} +2 -2
- package/dist/cli/chunks/{chunk-QZNFZ5IQ.js → chunk-OGARNKLS.js} +2 -2
- package/dist/cli/chunks/{chunk-QGCFMACF.js → chunk-OKNMZLGB.js} +2 -2
- package/dist/cli/chunks/{chunk-TC4B5D4Z.js → chunk-OMHISPPF.js} +1 -1
- package/dist/cli/chunks/{chunk-DGKPGRBT.js → chunk-OT6SOPAL.js} +2 -2
- package/dist/cli/chunks/{chunk-W6PLBRRS.js → chunk-OTTTHNIT.js} +1 -1
- package/dist/cli/chunks/{chunk-JFFVYCTV.js → chunk-P36IODAM.js} +2 -2
- package/dist/cli/chunks/{chunk-EDRIROCG.js → chunk-P6EGRAQG.js} +2 -2
- package/dist/cli/chunks/{chunk-HOBBYORR.js → chunk-PBUWNMZ2.js} +1 -1
- package/dist/cli/chunks/{chunk-Z3PANQUT.js → chunk-POTVF6BY.js} +1 -1
- package/dist/cli/chunks/{chunk-SVHFSOGT.js → chunk-POVP6O6K.js} +1 -1
- package/dist/cli/chunks/{chunk-LVDZ25VX.js → chunk-PPA53NJB.js} +2 -2
- package/dist/cli/chunks/{chunk-GHXNRF63.js → chunk-PUPEKA2J.js} +2 -2
- package/dist/cli/chunks/{chunk-RLQ4MYB6.js → chunk-QDQLL2QB.js} +2 -2
- package/dist/cli/chunks/{chunk-O6QTCUSL.js → chunk-QSVNVDA5.js} +1 -1
- package/dist/cli/chunks/{chunk-UKRK3IE3.js → chunk-QUXX2DP7.js} +2 -2
- package/dist/cli/chunks/{chunk-T75PWWK4.js → chunk-QVNMTMDJ.js} +2 -2
- package/dist/cli/chunks/{chunk-3XF7YTQC.js → chunk-QZBFMXO5.js} +52 -52
- package/dist/cli/chunks/{chunk-BT6TZTCL.js → chunk-RDTR43YN.js} +2 -2
- package/dist/cli/chunks/{chunk-55T7PDYP.js → chunk-RGD2CG23.js} +2 -2
- package/dist/cli/chunks/{chunk-NWYAV2UG.js → chunk-RQUSJEON.js} +2 -2
- package/dist/cli/chunks/{chunk-2AOAEMJG.js → chunk-RRSZ27A7.js} +2 -2
- package/dist/cli/chunks/{chunk-6XLCFDIB.js → chunk-RWLOERKK.js} +2 -2
- package/dist/cli/chunks/{chunk-5YS2DF5G.js → chunk-RWQDRPN5.js} +2 -2
- package/dist/cli/chunks/{chunk-CFDIYZGA.js → chunk-S7D4GD7H.js} +2 -2
- package/dist/cli/chunks/{chunk-NLY5NUHZ.js → chunk-SKHP5WUP.js} +2 -2
- package/dist/cli/chunks/{chunk-HMDSBWF6.js → chunk-SP2JO53K.js} +2 -2
- package/dist/cli/chunks/{chunk-WJ7657IX.js → chunk-SRDECRTL.js} +2 -2
- package/dist/cli/chunks/{chunk-CRYZXTSQ.js → chunk-TBVPNN65.js} +2 -2
- package/dist/cli/chunks/{chunk-UX4BOI6K.js → chunk-U5AVZ3T2.js} +1 -1
- package/dist/cli/chunks/{chunk-ZSKQPXRW.js → chunk-UCSGZVJX.js} +1 -1
- package/dist/cli/chunks/{chunk-URWT3EQT.js → chunk-UGNTLSBL.js} +2 -2
- package/dist/cli/chunks/{chunk-IM67YHDK.js → chunk-UTALYUMW.js} +2 -2
- package/dist/cli/chunks/{chunk-FCMCQ6OX.js → chunk-UZDTRCVU.js} +2 -2
- package/dist/cli/chunks/{chunk-WUSSZ2S6.js → chunk-V5NYGDSX.js} +2 -2
- package/dist/cli/chunks/{chunk-KTLYL3BS.js → chunk-VGN46ZT4.js} +2 -2
- package/dist/cli/chunks/{chunk-MOSXT6AO.js → chunk-VHBZADYK.js} +2 -2
- package/dist/cli/chunks/{chunk-6OL2WES5.js → chunk-VOKIUF7I.js} +1 -1
- package/dist/cli/chunks/{chunk-HYWW4A2E.js → chunk-VRT736E3.js} +2 -2
- package/dist/cli/chunks/{chunk-Z7XCXHEB.js → chunk-VUBLJBHQ.js} +2 -2
- package/dist/cli/chunks/{chunk-6O4KVU4K.js → chunk-VX7CQUO7.js} +2 -2
- package/dist/cli/chunks/{chunk-YYVLMW65.js → chunk-W7EHNX3Y.js} +2 -2
- package/dist/cli/chunks/{chunk-J4EJMAH3.js → chunk-WI7I6LMM.js} +1 -1
- package/dist/cli/chunks/{chunk-5TEPPW4J.js → chunk-WLOHTLHO.js} +2 -2
- package/dist/cli/chunks/{chunk-WBCE6V2N.js → chunk-WQZBKLAG.js} +1 -1
- package/dist/cli/chunks/{chunk-YH7VOLBP.js → chunk-WSND64RL.js} +2 -2
- package/dist/cli/chunks/{chunk-D75HDHX3.js → chunk-WSUYEVSY.js} +1 -1
- package/dist/cli/chunks/{chunk-HXT4XDQO.js → chunk-WTMLRMKW.js} +2 -2
- package/dist/cli/chunks/{chunk-FRZVLRVR.js → chunk-WW4RJ6BH.js} +2 -2
- package/dist/cli/chunks/{chunk-QR5ILM34.js → chunk-X335K4SU.js} +2 -2
- package/dist/cli/chunks/{chunk-326V7N25.js → chunk-X33LID2T.js} +1 -1
- package/dist/cli/chunks/{chunk-NL6HKEPR.js → chunk-XTGVGZ4J.js} +3 -3
- package/dist/cli/chunks/{chunk-AXJ75X6I.js → chunk-XV2TIODR.js} +1 -1
- package/dist/cli/chunks/{chunk-2JEPRQMT.js → chunk-XXW4KFBB.js} +1 -1
- package/dist/cli/chunks/{chunk-TZH2QAFZ.js → chunk-YCGU2LI7.js} +2 -2
- package/dist/cli/chunks/chunk-YGEC3PSD.js +2 -0
- package/dist/cli/chunks/{chunk-W7P7EOJ4.js → chunk-YGKU2QRC.js} +1 -1
- package/dist/cli/chunks/{chunk-XQBH3366.js → chunk-YHZGFWJE.js} +2 -2
- package/dist/cli/chunks/{chunk-E6GANSLP.js → chunk-YJH7UFA2.js} +2 -2
- package/dist/cli/chunks/{chunk-IBAXNCR2.js → chunk-YQ3ZW47V.js} +2 -2
- package/dist/cli/chunks/{chunk-MYDZBABD.js → chunk-YTRGMILO.js} +2 -2
- package/dist/cli/chunks/chunk-YW4GM36K.js +2 -0
- package/dist/cli/chunks/{chunk-W5EKSBS4.js → chunk-Z7JPWXW2.js} +2 -2
- package/dist/cli/chunks/{chunk-2AWU2E6R.js → chunk-Z7UGEQ4G.js} +1 -1
- package/dist/cli/chunks/{chunk-B4H66LPR.js → chunk-ZATQLTYL.js} +1 -1
- package/dist/cli/chunks/{chunk-N4MNSEKY.js → chunk-ZI6NJEBY.js} +1 -1
- package/dist/cli/chunks/{chunk-YJSKT6G6.js → chunk-ZJW4HRUA.js} +1 -1
- package/dist/cli/chunks/{chunk-QB7H62A4.js → chunk-ZL2GYU7H.js} +2 -2
- package/dist/cli/chunks/{ci-JNBOR6FP.js → ci-JPISJ25U.js} +3 -3
- package/dist/cli/chunks/{ci-output-FYNKONEQ.js → ci-output-DPHTFIGX.js} +2 -2
- package/dist/cli/chunks/{circuit-breaker-KOIXRDAD.js → circuit-breaker-PQ65VU2M.js} +2 -2
- package/dist/cli/chunks/{claude-flow-setup-4CO7KHRN.js → claude-flow-setup-GKHVO7AD.js} +2 -2
- package/dist/cli/chunks/client-BS7I637W.js +2 -0
- package/dist/cli/chunks/{cline-installer-CMYAPKK5.js → cline-installer-HWMQZJ64.js} +2 -2
- package/dist/cli/chunks/{code-WFIAEP3H.js → code-OTY7BF3D.js} +3 -3
- package/dist/cli/chunks/{code-index-extractor-IYM6HWJN.js → code-index-extractor-FG3TMHHR.js} +2 -2
- package/dist/cli/chunks/{codex-installer-DORVWRSU.js → codex-installer-63JARKKS.js} +2 -2
- package/dist/cli/chunks/{completions-54VM2MX2.js → completions-4ZHONFML.js} +2 -2
- package/dist/cli/chunks/{complexity-analyzer-EGZDP5N4.js → complexity-analyzer-FYHTJW5Y.js} +2 -2
- package/dist/cli/chunks/{continuedev-installer-4SDVDD4T.js → continuedev-installer-ZAWDSUR3.js} +2 -2
- package/dist/cli/chunks/{copilot-installer-7FJQ7PCL.js → copilot-installer-5QK565JX.js} +2 -2
- package/dist/cli/chunks/core-handlers-UG7RMTK5.js +2 -0
- package/dist/cli/chunks/cost-tracker-AWWMPPBJ.js +2 -0
- package/dist/cli/chunks/{coverage-DI5LDRJ7.js → coverage-SMFQEGKE.js} +3 -3
- package/dist/cli/chunks/cross-domain-router-NX7F6TOF.js +2 -0
- package/dist/cli/chunks/{cursor-installer-RTSZP5YD.js → cursor-installer-3BL7JACV.js} +2 -2
- package/dist/cli/chunks/{daemon-LM7LETPV.js → daemon-OJ624POF.js} +4 -4
- package/dist/cli/chunks/{daemon-SP3APEZY.js → daemon-R6ULBHHF.js} +3 -3
- package/dist/cli/chunks/{dag-attention-scheduler-C3QBODFE.js → dag-attention-scheduler-J6I3LTMY.js} +2 -2
- package/dist/cli/chunks/{detect-I4RBUFFJ.js → detect-5Q5W33UR.js} +2 -2
- package/dist/cli/chunks/{dist-node-PT6TCBCO.js → dist-node-GJNW56NA.js} +2 -2
- package/dist/cli/chunks/{domain-handler-MJMTMB5X.js → domain-handler-IZQY2G44.js} +2 -2
- package/dist/cli/chunks/{domain-plugins-Y4A2WYJW.js → domain-plugins-PIGO3KI2.js} +2 -2
- package/dist/cli/chunks/{domain-transfer-DUO42TLA.js → domain-transfer-NU3B4FQG.js} +2 -2
- package/dist/cli/chunks/dream-GYEH57FW.js +2 -0
- package/dist/cli/chunks/{embed-and-insert-pattern-66ZQK4AI.js → embed-and-insert-pattern-5QDDRPWV.js} +2 -2
- package/dist/cli/chunks/{eval-NQ7H27UF.js → eval-TB5HOAUY.js} +2 -2
- package/dist/cli/chunks/{experience-capture-middleware-MHEYPTIG.js → experience-capture-middleware-SIYVLKDE.js} +3 -3
- package/dist/cli/chunks/{fast-paths-YYDGN6ZC.js → fast-paths-T7QELS6D.js} +2 -2
- package/dist/cli/chunks/{feature-flags-YFGUORHY.js → feature-flags-T3CNNYMJ.js} +2 -2
- package/dist/cli/chunks/{feature-flags-FY4DOYS2.js → feature-flags-TNZ7ZAJV.js} +2 -2
- package/dist/cli/chunks/{file-discovery-TOMDY7TK.js → file-discovery-M45P2ZCY.js} +2 -2
- package/dist/cli/chunks/{fleet-MO3UCWB4.js → fleet-DSBZPHBZ.js} +3 -3
- package/dist/cli/chunks/{gnn-wrapper-SLW4PPXQ.js → gnn-wrapper-EHODCF32.js} +2 -2
- package/dist/cli/chunks/{heartbeat-handler-36RFCP4E.js → heartbeat-handler-V5DBVF7V.js} +4 -4
- package/dist/cli/chunks/heartbeat-scheduler-4TJ3T7LR.js +2 -0
- package/dist/cli/chunks/hnsw-adapter-PHFK4EAP.js +2 -0
- package/dist/cli/chunks/hnsw-index-434XDDBH.js +2 -0
- package/dist/cli/chunks/{hnsw-legacy-bridge-BJLWBKHE.js → hnsw-legacy-bridge-IYKDYA2F.js} +2 -2
- package/dist/cli/chunks/{hnswlib-node-RAYNVJCJ.js → hnswlib-node-DKG4LW3X.js} +2 -2
- package/dist/cli/chunks/{hooks-JMHFWVEQ.js → hooks-VKNMAILY.js} +10 -10
- package/dist/cli/chunks/hybrid-backend-DYVJQENQ.js +2 -0
- package/dist/cli/chunks/{hypergraph-engine-JUDBKPOX.js → hypergraph-engine-AXZVP7A7.js} +2 -2
- package/dist/cli/chunks/{hypergraph-handler-AXTWXOZU.js → hypergraph-handler-6EO6JN4Z.js} +3 -3
- package/dist/cli/chunks/impact-analyzer-CBAST6M2.js +2 -0
- package/dist/cli/chunks/{init-handler-PARJNZFF.js → init-handler-N3NG3RHN.js} +6 -6
- package/dist/cli/chunks/init-wizard-DWIJW7HY.js +2 -0
- package/dist/cli/chunks/kernel-AQGCS4X2.js +2 -0
- package/dist/cli/chunks/{kilocode-installer-22HX2E4V.js → kilocode-installer-JICGAHLM.js} +2 -2
- package/dist/cli/chunks/{kiro-installer-OVPBLY7J.js → kiro-installer-VYBFP6ZH.js} +2 -2
- package/dist/cli/chunks/knowledge-graph-2ICXFUUV.js +2 -0
- package/dist/cli/chunks/{learning-DWXPJ3R6.js → learning-3BHEZEPK.js} +3 -3
- package/dist/cli/chunks/{llm-router-7PPVVKNG.js → llm-router-GPTEZCUN.js} +4 -4
- package/dist/cli/chunks/llm-router-service-C47RGTH6.js +2 -0
- package/dist/cli/chunks/{load-VI5XHNZA.js → load-W5BIRPU4.js} +2 -2
- package/dist/cli/chunks/load-test-LRDAW3N6.js +2 -0
- package/dist/cli/chunks/{mcp-UW4Z3Z64.js → mcp-EBV4DZPG.js} +2 -2
- package/dist/cli/chunks/{memory-UD2KCB5M.js → memory-7F6YYKNL.js} +5 -5
- package/dist/cli/chunks/memory-backend-UFBAYPQ6.js +2 -0
- package/dist/cli/chunks/memory-handlers-OGLJHAAJ.js +2 -0
- package/dist/cli/chunks/{multi-model-executor-5O4WWU5Z.js → multi-model-executor-3ZIA2YOL.js} +2 -2
- package/dist/cli/chunks/{opencode-installer-DTRFDGM7.js → opencode-installer-2XRZUTLR.js} +2 -2
- package/dist/cli/chunks/{orchestrator-ENJIKV6Z.js → orchestrator-VSZVJUJW.js} +85 -26
- package/dist/cli/chunks/pattern-null-store-27FCITT3.js +2 -0
- package/dist/cli/chunks/{pattern-usage-recorder-QPNIU5PD.js → pattern-usage-recorder-I2IGVHRL.js} +2 -2
- package/dist/cli/chunks/{pipeline-G3JYDNPE.js → pipeline-5G3O6WBY.js} +2 -2
- package/dist/cli/chunks/{platform-P4WR6N3D.js → platform-6GUFDIA3.js} +2 -2
- package/dist/cli/chunks/{plugin-C7763Q5W.js → plugin-GYXE4CIC.js} +2 -2
- package/dist/cli/chunks/{prime-radiant-advanced-wasm-DH6R3XSZ.js → prime-radiant-advanced-wasm-THX6JLGZ.js} +2 -2
- package/dist/cli/chunks/{project-root-7DTXDLEG.js → project-root-QJRBKZQU.js} +2 -2
- package/dist/cli/chunks/protocol-executor-XWXXTMEW.js +2 -0
- package/dist/cli/chunks/{protocol-handler-EODULGOZ.js → protocol-handler-B54LRU26.js} +2 -2
- package/dist/cli/chunks/{prove-A7G3SIOF.js → prove-PCY2WQOD.js} +2 -2
- package/dist/cli/chunks/qe-reasoning-bank-3RMYXENE.js +2 -0
- package/dist/cli/chunks/{quality-JTURFUX3.js → quality-LPVDZC7U.js} +2 -2
- package/dist/cli/chunks/{quality-gate-M2EI754V.js → quality-gate-L3KXL6WE.js} +3 -3
- package/dist/cli/chunks/queen-coordinator-AS6DZ7UJ.js +2 -0
- package/dist/cli/chunks/{real-embeddings-DI7JMCG7.js → real-embeddings-N3H523PJ.js} +2 -2
- package/dist/cli/chunks/{ref-validation-MSFMNKDR.js → ref-validation-6BKDPHZ7.js} +2 -2
- package/dist/cli/chunks/{roocode-installer-XIMFFHOH.js → roocode-installer-NSGGTWXE.js} +2 -2
- package/dist/cli/chunks/router-OVNLNGHO.js +2 -0
- package/dist/cli/chunks/routing-feedback-TBOWEB6H.js +2 -0
- package/dist/cli/chunks/{routing-handler-MCDKNBQW.js → routing-handler-SRQNUBG3.js} +2 -2
- package/dist/cli/chunks/{ruvector-commands-OBSYAK2X.js → ruvector-commands-2IGULGDE.js} +2 -2
- package/dist/cli/chunks/rvf-dual-writer-YJYRCYGT.js +2 -0
- package/dist/cli/chunks/rvf-migration-adapter-VMRQ2SFO.js +2 -0
- package/dist/cli/chunks/{rvf-migration-coordinator-4DTRIHY6.js → rvf-migration-coordinator-ZD6WK5CK.js} +2 -2
- package/dist/cli/chunks/rvf-native-adapter-B75L3ALW.js +2 -0
- package/dist/cli/chunks/{rvf-store-integrity-CWAVMRC4.js → rvf-store-integrity-QULKUBBI.js} +2 -2
- package/dist/cli/chunks/safe-db-CRQHMCV6.js +2 -0
- package/dist/cli/chunks/schedule-L3DKJRXU.js +2 -0
- package/dist/cli/chunks/scheduler-VRHYUGY5.js +2 -0
- package/dist/cli/chunks/{security-74TWSO74.js → security-JW4EBARW.js} +3 -3
- package/dist/cli/chunks/{shared-rvf-adapter-ZHNAGE5H.js → shared-rvf-adapter-VQ7NJTGY.js} +2 -2
- package/dist/cli/chunks/{shared-rvf-dual-writer-BS5WAVCC.js → shared-rvf-dual-writer-SKTS52HK.js} +2 -2
- package/dist/cli/chunks/sqlite-persistence-JVAZETTL.js +2 -0
- package/dist/cli/chunks/{standalone-memory-3HGHTE7S.js → standalone-memory-3N4YJCSY.js} +2 -2
- package/dist/cli/chunks/{status-handler-XWEEGNGH.js → status-handler-5BQ2IIDG.js} +2 -2
- package/dist/cli/chunks/{structural-health-TB5JGMVS.js → structural-health-WGYR2RJB.js} +2 -2
- package/dist/cli/chunks/{sync-T4VLBURM.js → sync-DLKSXTIR.js} +2 -2
- package/dist/cli/chunks/sync-R5OKUBTQ.js +2 -0
- package/dist/cli/chunks/{task-handler-RQ65QKXX.js → task-handler-Z5KNTSUX.js} +2 -2
- package/dist/cli/chunks/{task-handlers-USYWJ4H2.js → task-handlers-RZFMYFSC.js} +3 -3
- package/dist/cli/chunks/test-LHWKZJRN.js +34 -0
- package/dist/cli/chunks/test-scheduling-EN7WXUMS.js +15 -0
- package/dist/cli/chunks/token-bootstrap-4V3OO4EC.js +2 -0
- package/dist/cli/chunks/{token-usage-CISTB5K5.js → token-usage-PFC2BYBS.js} +2 -2
- package/dist/cli/chunks/{transformers-C7LV763N.js → transformers-VZCC4SHC.js} +2 -2
- package/dist/cli/chunks/{tree-sitter-wasm-parser-P26JC3YV.js → tree-sitter-wasm-parser-ZYDQXGKN.js} +2 -2
- package/dist/cli/chunks/{types-YMVMKIWB.js → types-I6AWHZZQ.js} +2 -2
- package/dist/cli/chunks/unified-memory-WOOCCIUM.js +2 -0
- package/dist/cli/chunks/unified-memory-hnsw-PDDHFLUB.js +2 -0
- package/dist/cli/chunks/unified-persistence-6ETD3JSC.js +2 -0
- package/dist/cli/chunks/{upgrade-U2REOPAW.js → upgrade-T7SG75PA.js} +2 -2
- package/dist/cli/chunks/{validate-NDTCKN7P.js → validate-YLYEHTY3.js} +2 -2
- package/dist/cli/chunks/{validate-swarm-OJUGVH5Q.js → validate-swarm-VTLTRUE3.js} +2 -2
- package/dist/cli/chunks/visual-security-O4OT2YPY.js +2 -0
- package/dist/cli/chunks/{web-tree-sitter-2CLRSA7K.js → web-tree-sitter-JUM7ZY5M.js} +2 -2
- package/dist/cli/chunks/{windsurf-installer-DSUJJ4PG.js → windsurf-installer-4KS2466T.js} +2 -2
- package/dist/cli/chunks/witness-chain-67JHPDCN.js +2 -0
- package/dist/cli/chunks/{witness-chain-TEGL4ZWB.js → witness-chain-E4X6TOCT.js} +2 -2
- package/dist/cli/chunks/witness-chain-repair-MB53OZO6.js +2 -0
- package/dist/cli/chunks/{witness-chain-verifier-SPXKFC67.js → witness-chain-verifier-LBWJHO7Y.js} +2 -2
- package/dist/cli/chunks/{witness-key-manager-EALOV4OV.js → witness-key-manager-5IHVMXHJ.js} +2 -2
- package/dist/cli/chunks/{workflow-PYI6HCAG.js → workflow-XUQXIRNE.js} +4 -4
- package/dist/cli/chunks/workflow-orchestrator-ZVFSNRYZ.js +2 -0
- package/dist/cli/chunks/wrappers-YVF5SQUN.js +2 -0
- package/dist/cli/commands/test.js +30 -12
- 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/test-counter.js +3 -3
- package/dist/domains/coverage-analysis/services/gap-detector.js +3 -1
- package/dist/domains/learning-optimization/services/learning-coordinator.js +4 -2
- package/dist/domains/test-execution/services/flaky-detector.js +8 -2
- package/dist/domains/test-execution/services/retry-handler.js +23 -20
- package/dist/domains/test-execution/services/test-executor.js +5 -2
- package/dist/domains/test-generation/services/test-generator.js +5 -2
- package/dist/governance/compliance-reporter.js +8 -7
- package/dist/governance/proof-envelope-integration.js +3 -1
- package/dist/init/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 +443 -441
- 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 +84 -15
- package/dist/mcp/services/session-write-buffer.d.ts +55 -0
- package/dist/mcp/services/session-write-buffer.js +144 -0
- package/dist/memory/crdt/g-counter.js +10 -8
- package/dist/shared/embeddings/ollama-client.d.ts +1 -1
- package/dist/shared/embeddings/ollama-client.js +30 -31
- package/dist/shared/git/git-analyzer.d.ts +4 -1
- package/dist/shared/git/git-analyzer.js +9 -4
- package/dist/shared/llm/cost-tracker.js +8 -6
- package/dist/shared/llm/providers/azure-openai.js +5 -21
- package/dist/shared/llm/providers/bedrock.js +5 -21
- package/dist/shared/llm/providers/claude.js +5 -21
- package/dist/shared/llm/providers/cognitum.js +5 -17
- package/dist/shared/llm/providers/gemini.js +9 -23
- package/dist/shared/llm/providers/ollama.js +5 -21
- package/dist/shared/llm/providers/openai.js +5 -21
- package/dist/shared/llm/providers/openrouter.js +9 -23
- package/dist/shared/llm/providers/response-deadline.d.ts +3 -0
- package/dist/shared/llm/providers/response-deadline.js +100 -0
- package/dist/shared/llm/spend-ledger.js +3 -2
- package/dist/shared/metrics/code-metrics.d.ts +1 -0
- package/dist/shared/metrics/code-metrics.js +3 -44
- package/dist/shared/metrics/cognitive-complexity.d.ts +17 -0
- package/dist/shared/metrics/cognitive-complexity.js +108 -0
- package/dist/shared/npm-cli-invocation.d.ts +21 -0
- package/dist/shared/npm-cli-invocation.js +28 -0
- package/dist/shared/optional-module.js +24 -0
- package/dist/shared/test-runner-args.d.ts +42 -0
- package/dist/shared/test-runner-args.js +74 -0
- package/dist/shared/utils/safe-record.d.ts +18 -0
- package/dist/shared/utils/safe-record.js +28 -0
- package/dist/test-scheduling/executors/vitest-executor.js +23 -5
- package/dist/workers/quality-daemon/git-watcher.js +5 -0
- package/package.json +1 -1
- package/dist/adapters/ag-ui/json-patch-utils.d.ts +0 -136
- package/dist/adapters/ag-ui/json-patch-utils.js +0 -575
- package/dist/cli/chunks/adapter-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-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
|
@@ -19,6 +19,7 @@ import { governanceFlags, } from './feature-flags.js';
|
|
|
19
19
|
import { proofEnvelopeIntegration, } from './proof-envelope-integration.js';
|
|
20
20
|
import { getUnifiedMemory } from '../kernel/unified-memory.js';
|
|
21
21
|
import { toErrorMessage } from '../shared/error-utils.js';
|
|
22
|
+
import { createSafeRecord } from '../shared/utils/safe-record.js';
|
|
22
23
|
// ============================================================================
|
|
23
24
|
// Default Configuration
|
|
24
25
|
// ============================================================================
|
|
@@ -274,14 +275,14 @@ export class ComplianceReporter {
|
|
|
274
275
|
});
|
|
275
276
|
// Calculate overall score
|
|
276
277
|
const overall = this.calculateOverallScore(violations);
|
|
277
|
-
// Calculate score by gate
|
|
278
|
-
const byGate =
|
|
278
|
+
// Calculate score by gate. Gate and agent names are data (#914).
|
|
279
|
+
const byGate = createSafeRecord();
|
|
279
280
|
const gateViolations = this.groupBy(violations, 'gate');
|
|
280
281
|
for (const [gate, gateViols] of Object.entries(gateViolations)) {
|
|
281
282
|
byGate[gate] = this.calculateOverallScore(gateViols);
|
|
282
283
|
}
|
|
283
284
|
// Calculate score by agent
|
|
284
|
-
const byAgent =
|
|
285
|
+
const byAgent = createSafeRecord();
|
|
285
286
|
const agentViolations = this.groupBy(violations, 'agentId');
|
|
286
287
|
for (const [agentId, agentViols] of Object.entries(agentViolations)) {
|
|
287
288
|
if (agentId !== 'undefined') {
|
|
@@ -572,13 +573,13 @@ export class ComplianceReporter {
|
|
|
572
573
|
for (const v of allViolations) {
|
|
573
574
|
bySeverity[v.severity]++;
|
|
574
575
|
}
|
|
575
|
-
// Count by gate
|
|
576
|
-
const byGate =
|
|
576
|
+
// Count by gate. Gate and agent names are data (#914).
|
|
577
|
+
const byGate = createSafeRecord();
|
|
577
578
|
for (const v of allViolations) {
|
|
578
579
|
byGate[v.gate] = (byGate[v.gate] || 0) + 1;
|
|
579
580
|
}
|
|
580
581
|
// Count by agent
|
|
581
|
-
const byAgent =
|
|
582
|
+
const byAgent = createSafeRecord();
|
|
582
583
|
for (const v of allViolations) {
|
|
583
584
|
if (v.agentId) {
|
|
584
585
|
byAgent[v.agentId] = (byAgent[v.agentId] || 0) + 1;
|
|
@@ -984,7 +985,7 @@ export class ComplianceReporter {
|
|
|
984
985
|
* Group violations by a field
|
|
985
986
|
*/
|
|
986
987
|
groupBy(violations, field) {
|
|
987
|
-
const groups =
|
|
988
|
+
const groups = createSafeRecord();
|
|
988
989
|
for (const v of violations) {
|
|
989
990
|
const key = String(v[field]);
|
|
990
991
|
if (!groups[key]) {
|
|
@@ -19,6 +19,7 @@ import { safeJsonParse } from '../shared/safe-json.js';
|
|
|
19
19
|
*/
|
|
20
20
|
import { wasmKernelIntegration, } from './wasm-kernel-integration.js';
|
|
21
21
|
import { governanceFlags, } from './feature-flags.js';
|
|
22
|
+
import { createSafeRecord } from '../shared/utils/safe-record.js';
|
|
22
23
|
/**
|
|
23
24
|
* Genesis envelope hash constant
|
|
24
25
|
*/
|
|
@@ -514,7 +515,8 @@ export class ProofEnvelopeIntegration {
|
|
|
514
515
|
* Get chain statistics
|
|
515
516
|
*/
|
|
516
517
|
getProofStats() {
|
|
517
|
-
|
|
518
|
+
// Action names are data, so the buckets must not inherit from Object.prototype (#914).
|
|
519
|
+
const actionCounts = createSafeRecord();
|
|
518
520
|
const agents = new Set();
|
|
519
521
|
for (const envelope of this.chain) {
|
|
520
522
|
agents.add(envelope.agentId);
|
|
@@ -259,10 +259,13 @@ export class HooksPhase extends BasePhase {
|
|
|
259
259
|
mkdirSync(helpersDir, { recursive: true });
|
|
260
260
|
}
|
|
261
261
|
const destPath = join(helpersDir, 'brain-checkpoint.cjs');
|
|
262
|
-
// Try to copy from our own installation first
|
|
262
|
+
// Try to copy from our own installation first. The last candidate is this
|
|
263
|
+
// package's own copy (relative to the compiled init module), so a GLOBAL
|
|
264
|
+
// install also refreshes an existing project's helper on re-init (#872).
|
|
263
265
|
const sourcePaths = [
|
|
264
266
|
join(projectRoot, '.claude', 'helpers', 'brain-checkpoint.cjs'),
|
|
265
267
|
join(projectRoot, 'node_modules', 'agentic-qe', '.claude', 'helpers', 'brain-checkpoint.cjs'),
|
|
268
|
+
join(__dirname, '..', '..', '..', '.claude', 'helpers', 'brain-checkpoint.cjs'),
|
|
266
269
|
];
|
|
267
270
|
for (const src of sourcePaths) {
|
|
268
271
|
if (existsSync(src) && src !== destPath) {
|
|
@@ -399,16 +402,39 @@ const AQE_DIR = path.join(PROJECT_ROOT, '.agentic-qe');
|
|
|
399
402
|
const RVF_PATH = path.join(AQE_DIR, 'aqe.rvf');
|
|
400
403
|
const DB_PATH = path.join(AQE_DIR, 'memory.db');
|
|
401
404
|
const MAX_AGE_HOURS = 24;
|
|
402
|
-
|
|
405
|
+
// Windows (#872): never execFile aqe.cmd (EINVAL without a shell); reuse the
|
|
406
|
+
// hook shim's resolver, which runs the AQE bundle via node instead.
|
|
407
|
+
function aqeInvocation() {
|
|
408
|
+
if (process.platform !== 'win32') return { cmd: process.env.AQE_HOOK_BIN || 'aqe', args: [] };
|
|
409
|
+
const shimPath = path.join(__dirname, '..', 'hooks', 'aqe-hook.cjs');
|
|
410
|
+
let src = '';
|
|
411
|
+
try { src = fs.readFileSync(shimPath, 'utf8'); } catch { /* missing */ }
|
|
412
|
+
// An older shim runs its hook main (spawn + exit) when required.
|
|
413
|
+
if (!src.includes('resolveAqeInvocation') || !src.includes('require.main === module')) {
|
|
414
|
+
return { cmd: null, args: [], reason: '.claude/hooks/aqe-hook.cjs is missing or predates #872; re-run aqe init' };
|
|
415
|
+
}
|
|
416
|
+
try {
|
|
417
|
+
return require(shimPath).resolveAqeInvocation({ project: PROJECT_ROOT });
|
|
418
|
+
} catch (e) {
|
|
419
|
+
return { cmd: null, args: [], reason: 'aqe-hook.cjs failed to load: ' + e.message };
|
|
420
|
+
}
|
|
421
|
+
}
|
|
403
422
|
|
|
404
423
|
function log(msg) { process.stderr.write('[brain-checkpoint] ' + msg + '\\n'); }
|
|
405
424
|
|
|
406
425
|
function exportBrain() {
|
|
407
426
|
if (!fs.existsSync(DB_PATH)) { log('No memory.db, skipping'); return { exported: false }; }
|
|
427
|
+
const aqe = aqeInvocation();
|
|
428
|
+
if (!aqe.cmd) { log('Export skipped: ' + aqe.reason); return { exported: false, reason: aqe.reason }; }
|
|
429
|
+
// Never write through a committed symlink: .agentic-qe must be a real dir, and
|
|
430
|
+
// unlink (not existsSync) drops a planted aqe.rvf link, even a dangling one.
|
|
431
|
+
let st; try { st = fs.lstatSync(AQE_DIR); } catch { /* missing */ }
|
|
432
|
+
if (!st || !st.isDirectory()) { log('Export skipped: .agentic-qe is a symlink'); return { exported: false }; }
|
|
433
|
+
for (const f of [RVF_PATH, RVF_PATH + '.idmap.json']) { try { fs.unlinkSync(f); } catch { /* absent */ } }
|
|
408
434
|
try {
|
|
409
435
|
const result = execFileSync(
|
|
410
|
-
|
|
411
|
-
{ timeout: 60000, encoding: 'utf-8' }
|
|
436
|
+
aqe.cmd, [...aqe.args, 'brain', 'export', '-o', RVF_PATH, '--format', 'rvf'],
|
|
437
|
+
{ timeout: 60000, encoding: 'utf-8', windowsHide: true }
|
|
412
438
|
);
|
|
413
439
|
const m = result.match(/Patterns:\\s+(\\d+)/);
|
|
414
440
|
const p = m ? m[1] : '0';
|
|
@@ -109,8 +109,9 @@ export class WorkersPhase extends BasePhase {
|
|
|
109
109
|
// Generated by aqe init
|
|
110
110
|
// Starts the MCP server with background workers enabled
|
|
111
111
|
|
|
112
|
-
const
|
|
113
|
-
const {
|
|
112
|
+
const fs = require('fs');
|
|
113
|
+
const { existsSync, readFileSync } = fs;
|
|
114
|
+
const { join, dirname } = require('path');
|
|
114
115
|
const { spawn } = require('child_process');
|
|
115
116
|
|
|
116
117
|
const projectRoot = join(__dirname, '..', '..');
|
|
@@ -118,8 +119,33 @@ const workersDir = join(projectRoot, '.agentic-qe', 'workers');
|
|
|
118
119
|
const pidFile = join(workersDir, 'daemon.pid');
|
|
119
120
|
const logFile = join(workersDir, 'daemon.log');
|
|
120
121
|
|
|
121
|
-
//
|
|
122
|
-
|
|
122
|
+
// A repository can commit .agentic-qe, workers/ or a file in it as a symlink.
|
|
123
|
+
// Never write through one (#970): real directories only, appends only to a
|
|
124
|
+
// regular file (lstat + O_NOFOLLOW where the platform has it), and the pid file
|
|
125
|
+
// is replaced by rename instead of being written in place.
|
|
126
|
+
function isRealDir(d) { try { const s = fs.lstatSync(d); return s.isDirectory() && !s.isSymbolicLink(); } catch { return false; } }
|
|
127
|
+
function isRegularOrAbsent(f) { try { return fs.lstatSync(f).isFile(); } catch (e) { return !!e && e.code === 'ENOENT'; } }
|
|
128
|
+
if (!isRealDir(join(projectRoot, '.agentic-qe')) || !isRealDir(workersDir)) {
|
|
129
|
+
console.error('AQE v3 Worker Daemon not started: .agentic-qe/workers must be a real directory, not a symlink');
|
|
130
|
+
process.exit(1);
|
|
131
|
+
}
|
|
132
|
+
function appendFileSync(file, data) {
|
|
133
|
+
if (!isRegularOrAbsent(file)) return;
|
|
134
|
+
const c = fs.constants;
|
|
135
|
+
let fd;
|
|
136
|
+
try {
|
|
137
|
+
fd = fs.openSync(file, c.O_APPEND | c.O_CREAT | c.O_WRONLY | (c.O_NOFOLLOW || 0), 0o644);
|
|
138
|
+
fs.writeSync(fd, data);
|
|
139
|
+
} catch {} finally { if (fd !== undefined) { try { fs.closeSync(fd); } catch {} } }
|
|
140
|
+
}
|
|
141
|
+
function writeFileSync(file, data) {
|
|
142
|
+
const tmp = file + '.' + process.pid + '.' + Date.now() + '.tmp';
|
|
143
|
+
try { fs.writeFileSync(tmp, data, { flag: 'wx' }); fs.renameSync(tmp, file); }
|
|
144
|
+
catch { try { fs.unlinkSync(tmp); } catch {} }
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// Check if already running (only trust a regular pid file, never a link target)
|
|
148
|
+
if (existsSync(pidFile) && isRegularOrAbsent(pidFile)) {
|
|
123
149
|
const pid = parseInt(readFileSync(pidFile, 'utf-8').trim(), 10);
|
|
124
150
|
try { process.kill(pid, 0); console.log('Daemon already running (PID: ' + pid + ')'); process.exit(0); } catch {}
|
|
125
151
|
}
|
|
@@ -161,8 +187,18 @@ if (binCandidate && binCandidate.endsWith('bundle.js')) {
|
|
|
161
187
|
mcpCmd = binCandidate;
|
|
162
188
|
mcpArgs = [];
|
|
163
189
|
} else {
|
|
164
|
-
|
|
165
|
-
|
|
190
|
+
// Windows (#872): npx is npx.cmd, which spawn() refuses to start without a
|
|
191
|
+
// shell (EINVAL since CVE-2024-27980). Run npm's bundled npx CLI via node.
|
|
192
|
+
const npxCli = join(dirname(process.execPath), 'node_modules', 'npm', 'bin', 'npx-cli.js');
|
|
193
|
+
if (process.platform === 'win32' && !existsSync(npxCli)) {
|
|
194
|
+
appendFileSync(logFile, '[' + ts + '] ERROR: no AQE MCP bundle found and npx-cli.js is missing next to node.exe; install agentic-qe locally (npm install -D agentic-qe).\\n');
|
|
195
|
+
console.error('AQE v3 Worker Daemon not started: agentic-qe MCP bundle not found (see ' + logFile + ')');
|
|
196
|
+
process.exit(1);
|
|
197
|
+
}
|
|
198
|
+
mcpCmd = process.platform === 'win32' ? process.execPath : 'npx';
|
|
199
|
+
mcpArgs = process.platform === 'win32'
|
|
200
|
+
? [npxCli, '--yes', 'agentic-qe', 'mcp']
|
|
201
|
+
: ['--yes', 'agentic-qe', 'mcp'];
|
|
166
202
|
appendFileSync(logFile, '[' + ts + '] WARNING: using npx fallback — daemon.pid will point at the npx wrapper, not the MCP server. \`aqe daemon status\` may misreport liveness after the wrapper exits.\\n');
|
|
167
203
|
}
|
|
168
204
|
|
|
@@ -43,7 +43,10 @@ export declare class EmbeddingGenerator {
|
|
|
43
43
|
*/
|
|
44
44
|
updateConfig(config: Partial<EmbeddingConfig>): void;
|
|
45
45
|
/**
|
|
46
|
-
* Generate cache key from text and config
|
|
46
|
+
* Generate cache key from text and every config field that changes the vector.
|
|
47
|
+
* A JSON tuple keeps field boundaries intact when the model or text contains
|
|
48
|
+
* ':' (#914, as #863 did for the shared embedding cache). The cache is
|
|
49
|
+
* in-memory only, so no persisted keys need migrating.
|
|
47
50
|
*/
|
|
48
51
|
private getCacheKey;
|
|
49
52
|
/**
|
|
@@ -240,10 +240,14 @@ export class EmbeddingGenerator {
|
|
|
240
240
|
}
|
|
241
241
|
}
|
|
242
242
|
/**
|
|
243
|
-
* Generate cache key from text and config
|
|
243
|
+
* Generate cache key from text and every config field that changes the vector.
|
|
244
|
+
* A JSON tuple keeps field boundaries intact when the model or text contains
|
|
245
|
+
* ':' (#914, as #863 did for the shared embedding cache). The cache is
|
|
246
|
+
* in-memory only, so no persisted keys need migrating.
|
|
244
247
|
*/
|
|
245
248
|
getCacheKey(text) {
|
|
246
|
-
|
|
249
|
+
const { model, hyperbolic, normalize, curvature } = this.config;
|
|
250
|
+
return JSON.stringify([model, hyperbolic, normalize, curvature, text]);
|
|
247
251
|
}
|
|
248
252
|
/**
|
|
249
253
|
* Convert Euclidean embedding to Poincaré ball
|
|
@@ -232,7 +232,8 @@ export class WasmVectorStore {
|
|
|
232
232
|
* @returns StoreStats with counts, dimensions, memory usage, etc.
|
|
233
233
|
*/
|
|
234
234
|
getStats() {
|
|
235
|
-
|
|
235
|
+
// Namespaces are caller-supplied: no prototype, so `constructor` is just a name (#914).
|
|
236
|
+
const namespaceSizes = Object.create(null);
|
|
236
237
|
let memoryBytes = 0;
|
|
237
238
|
for (const [, entry] of this.vectors) {
|
|
238
239
|
const ns = entry.namespace;
|
|
@@ -125,7 +125,9 @@ export declare class RuVectorCoverageRouter implements CoverageRouter {
|
|
|
125
125
|
*/
|
|
126
126
|
private generateTargetReason;
|
|
127
127
|
/**
|
|
128
|
-
* Compute cache key
|
|
128
|
+
* Compute cache key. JSON tuples keep a ':' or '|' in a file path from merging
|
|
129
|
+
* entries (#914). Keys from older releases that were persisted to KV never
|
|
130
|
+
* match the new format, so they only miss and age out under the TTL.
|
|
129
131
|
*/
|
|
130
132
|
private computeCacheKey;
|
|
131
133
|
}
|
|
@@ -484,14 +484,15 @@ export class RuVectorCoverageRouter {
|
|
|
484
484
|
return reasons.join(', ') || 'coverage below target';
|
|
485
485
|
}
|
|
486
486
|
/**
|
|
487
|
-
* Compute cache key
|
|
487
|
+
* Compute cache key. JSON tuples keep a ':' or '|' in a file path from merging
|
|
488
|
+
* entries (#914). Keys from older releases that were persisted to KV never
|
|
489
|
+
* match the new format, so they only miss and age out under the TTL.
|
|
488
490
|
*/
|
|
489
491
|
computeCacheKey(coverageData, targetCoverage) {
|
|
490
|
-
const
|
|
491
|
-
.map((c) =>
|
|
492
|
-
.sort()
|
|
493
|
-
|
|
494
|
-
return `${targetCoverage}:${dataKey}`;
|
|
492
|
+
const entries = coverageData
|
|
493
|
+
.map((c) => JSON.stringify([c.filePath, c.lineCoverage, c.branchCoverage]))
|
|
494
|
+
.sort();
|
|
495
|
+
return JSON.stringify([targetCoverage, entries]);
|
|
495
496
|
}
|
|
496
497
|
}
|
|
497
498
|
// ============================================================================
|
|
@@ -593,11 +593,12 @@ export class RuVectorDiffRiskClassifier {
|
|
|
593
593
|
* Compute cache key for context
|
|
594
594
|
*/
|
|
595
595
|
computeCacheKey(context) {
|
|
596
|
+
// JSON tuples keep delimiters in a commit hash or file path from colliding
|
|
597
|
+
// (#914). Persisted keys in the old format never match, so they age out.
|
|
596
598
|
const fileKeys = context.files
|
|
597
|
-
.map((f) =>
|
|
598
|
-
.sort()
|
|
599
|
-
|
|
600
|
-
return `${context.commitHash || 'unknown'}:${fileKeys}`;
|
|
599
|
+
.map((f) => JSON.stringify([f.filePath, f.status, f.additions, f.deletions]))
|
|
600
|
+
.sort();
|
|
601
|
+
return JSON.stringify([context.commitHash || 'unknown', fileKeys]);
|
|
601
602
|
}
|
|
602
603
|
}
|
|
603
604
|
// ============================================================================
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* to one or both backends depending on the configured mode.
|
|
12
12
|
*/
|
|
13
13
|
import { ensureEndpointEmbeddingSpaceIdentity, getActiveEmbeddingSpaceIdentity } from '../../learning/real-embeddings.js';
|
|
14
|
-
import { verifyOrCreateEmbeddingSpaceManifest } from '../../learning/embedding-space.js';
|
|
14
|
+
import { reportEmbeddingRuntimeUnavailable, verifyOrCreateEmbeddingSpaceManifest, } from '../../learning/embedding-space.js';
|
|
15
15
|
/**
|
|
16
16
|
* Wraps the real RvfNativeAdapter to conform to the simpler RvfStore interface.
|
|
17
17
|
*/
|
|
@@ -102,6 +102,15 @@ export class RvfDualWriter {
|
|
|
102
102
|
if (!this.activeSpaceId()) {
|
|
103
103
|
await ensureEndpointEmbeddingSpaceIdentity();
|
|
104
104
|
}
|
|
105
|
+
if (!this.activeSpaceId()) {
|
|
106
|
+
// #852: no embedding runtime available (fresh project, or a missing
|
|
107
|
+
// endpoint). brain.rvf cannot be bound to a vector space, so leave it
|
|
108
|
+
// unopened (uncreated if absent; existing vectors are kept) and
|
|
109
|
+
// report the expected state once instead of a per-store failure.
|
|
110
|
+
this.rvfAvailable = false;
|
|
111
|
+
reportEmbeddingRuntimeUnavailable();
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
105
114
|
const { isRvfLockHeldError, removeStaleRvfLock, quarantineUnusableStore } = await import('./rvf-store-integrity.js');
|
|
106
115
|
const tryOpen = () => {
|
|
107
116
|
try {
|
|
@@ -3,6 +3,7 @@ import { createRequire } from 'node:module';
|
|
|
3
3
|
import { execFileSync } from 'node:child_process';
|
|
4
4
|
import { existsSync } from 'node:fs';
|
|
5
5
|
import { dirname, join } from 'node:path';
|
|
6
|
+
import { npmCliInvocation } from '../../shared/npm-cli-invocation.js';
|
|
6
7
|
export const VIBIUM_SETUP = 'aqe init --browser-engine (or npm install vibium@^26.8.21)';
|
|
7
8
|
const requireFromHere = createRequire(import.meta.url);
|
|
8
9
|
/**
|
|
@@ -12,12 +13,7 @@ const requireFromHere = createRequire(import.meta.url);
|
|
|
12
13
|
* Falls back to plain `npm` when that layout is absent.
|
|
13
14
|
*/
|
|
14
15
|
export function npmInvocation(platform = process.platform, execPath = process.execPath, exists = existsSync) {
|
|
15
|
-
|
|
16
|
-
const npmCli = join(dirname(execPath), 'node_modules', 'npm', 'bin', 'npm-cli.js');
|
|
17
|
-
if (exists(npmCli))
|
|
18
|
-
return [execPath, [npmCli]];
|
|
19
|
-
}
|
|
20
|
-
return ['npm', []];
|
|
16
|
+
return npmCliInvocation('npm', platform, execPath, exists) ?? ['npm', []];
|
|
21
17
|
}
|
|
22
18
|
/** Never install or download anything while probing availability. */
|
|
23
19
|
function resolveRuntime() {
|
|
@@ -63,6 +63,11 @@ export interface DreamCycleResult {
|
|
|
63
63
|
export interface ApplyInsightResult {
|
|
64
64
|
success: boolean;
|
|
65
65
|
patternId?: string;
|
|
66
|
+
/**
|
|
67
|
+
* The pattern row committed to SQLite but its vector index is pending
|
|
68
|
+
* (COMMITTED_PENDING_INDEX, e.g. the RVF index is unbound or locked).
|
|
69
|
+
*/
|
|
70
|
+
indexPending?: boolean;
|
|
66
71
|
error?: string;
|
|
67
72
|
}
|
|
68
73
|
/**
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
*/
|
|
17
17
|
import { safeJsonParse } from '../../shared/safe-json.js';
|
|
18
18
|
import { toErrorMessage } from '../../shared/error-utils.js';
|
|
19
|
+
import { PatternMutationError } from '../pattern-mutation-error.js';
|
|
19
20
|
import { LoggerFactory } from '../../logging/index.js';
|
|
20
21
|
const dreamLogger = LoggerFactory.create('dream-engine');
|
|
21
22
|
import { v4 as uuidv4 } from 'uuid';
|
|
@@ -640,7 +641,16 @@ export class DreamEngine {
|
|
|
640
641
|
complexity: 'medium',
|
|
641
642
|
},
|
|
642
643
|
});
|
|
643
|
-
|
|
644
|
+
// COMMITTED_PENDING_INDEX proves the authoritative SQLite row exists;
|
|
645
|
+
// only the derived vector index is pending (unbound or locked RVF).
|
|
646
|
+
// The pattern is real, so the insight is applied — re-applying would
|
|
647
|
+
// just hit the same row. Any other failure stays retryable.
|
|
648
|
+
const pendingIndex = !patternResult.success &&
|
|
649
|
+
patternResult.error instanceof PatternMutationError &&
|
|
650
|
+
patternResult.error.disposition === 'COMMITTED_PENDING_INDEX'
|
|
651
|
+
? patternResult.error
|
|
652
|
+
: null;
|
|
653
|
+
if (!patternResult.success && !pendingIndex) {
|
|
644
654
|
// Do NOT mark applied — leave it retryable rather than silently
|
|
645
655
|
// swallowing a real pattern-creation failure behind a fake success.
|
|
646
656
|
return {
|
|
@@ -648,7 +658,14 @@ export class DreamEngine {
|
|
|
648
658
|
error: `Failed to create pattern: ${patternResult.error?.message ?? 'unknown error'}`,
|
|
649
659
|
};
|
|
650
660
|
}
|
|
651
|
-
const patternId = patternResult.value.id;
|
|
661
|
+
const patternId = patternResult.success ? patternResult.value.id : pendingIndex.patternId;
|
|
662
|
+
if (pendingIndex) {
|
|
663
|
+
dreamLogger.warn('Insight applied; pattern committed with vector index pending', {
|
|
664
|
+
insightId,
|
|
665
|
+
patternId,
|
|
666
|
+
cause: toErrorMessage(pendingIndex.cause),
|
|
667
|
+
});
|
|
668
|
+
}
|
|
652
669
|
// Mark insight as applied — pattern_id now points at the REAL row.
|
|
653
670
|
const stmt = this.db.prepare(`
|
|
654
671
|
UPDATE dream_insights
|
|
@@ -656,7 +673,7 @@ export class DreamEngine {
|
|
|
656
673
|
WHERE id = ?
|
|
657
674
|
`);
|
|
658
675
|
stmt.run(patternId, insightId);
|
|
659
|
-
return { success: true, patternId };
|
|
676
|
+
return pendingIndex ? { success: true, patternId, indexPending: true } : { success: true, patternId };
|
|
660
677
|
}
|
|
661
678
|
catch (error) {
|
|
662
679
|
return {
|
|
@@ -39,6 +39,24 @@ export declare function verifyEmbeddingRoundTrip(writeEmbed: (text: string) => P
|
|
|
39
39
|
export declare function inspectEmbeddingSpaceRows(rows: ReadonlyArray<{
|
|
40
40
|
spaceId: string | null;
|
|
41
41
|
}>, activeSpaceId: string | null): EmbeddingSpaceDiagnostics;
|
|
42
|
+
/**
|
|
43
|
+
* #852: a project with no embedding runtime (no AQE_EMBEDDER_ENDPOINT, no
|
|
44
|
+
* injected embedder) has nothing that could prove which vector space an ANN
|
|
45
|
+
* index belongs to. That is the normal state of a freshly initialised
|
|
46
|
+
* project, not a fault: index binders must stay closed (the #633 guard), but
|
|
47
|
+
* they should say so once, at warn level, instead of reporting an ERROR.
|
|
48
|
+
*
|
|
49
|
+
* The wording must not imply data loss: the same state is reached by a user
|
|
50
|
+
* whose AQE_EMBEDDER_ENDPOINT went missing (an index with vectors) or whose
|
|
51
|
+
* in-process embedder only loads lazily, after the index was opened.
|
|
52
|
+
*/
|
|
53
|
+
export declare const EMBEDDING_RUNTIME_UNAVAILABLE_NOTICE: string;
|
|
54
|
+
/** Stored as the RVF init cause, so COMMITTED_PENDING_INDEX errors read correctly later. */
|
|
55
|
+
export declare const EMBEDDING_RUNTIME_UNAVAILABLE_CAUSE: string;
|
|
56
|
+
/** Log the no-embedder notice at most once per process. */
|
|
57
|
+
export declare function reportEmbeddingRuntimeUnavailable(): void;
|
|
58
|
+
/** @internal test-only seam */
|
|
59
|
+
export declare function __resetEmbeddingRuntimeNoticeForTests(): void;
|
|
42
60
|
/** Sidecar path used to bind a persistent ANN index to one embedding space. */
|
|
43
61
|
export declare function embeddingSpaceManifestPath(indexPath: string): string;
|
|
44
62
|
/**
|
|
@@ -87,6 +87,39 @@ export function inspectEmbeddingSpaceRows(rows, activeSpaceId) {
|
|
|
87
87
|
unverifiedVectors,
|
|
88
88
|
};
|
|
89
89
|
}
|
|
90
|
+
/**
|
|
91
|
+
* #852: a project with no embedding runtime (no AQE_EMBEDDER_ENDPOINT, no
|
|
92
|
+
* injected embedder) has nothing that could prove which vector space an ANN
|
|
93
|
+
* index belongs to. That is the normal state of a freshly initialised
|
|
94
|
+
* project, not a fault: index binders must stay closed (the #633 guard), but
|
|
95
|
+
* they should say so once, at warn level, instead of reporting an ERROR.
|
|
96
|
+
*
|
|
97
|
+
* The wording must not imply data loss: the same state is reached by a user
|
|
98
|
+
* whose AQE_EMBEDDER_ENDPOINT went missing (an index with vectors) or whose
|
|
99
|
+
* in-process embedder only loads lazily, after the index was opened.
|
|
100
|
+
*/
|
|
101
|
+
// The literal "WARN" is load-bearing: the MCP stdio entry only forwards
|
|
102
|
+
// stderr lines containing it (or ERROR/[MCP]/...), so without it MCP users
|
|
103
|
+
// would never see the notice the CLI prints.
|
|
104
|
+
export const EMBEDDING_RUNTIME_UNAVAILABLE_NOTICE = '[VectorSearch] WARN: semantic vector search is not active: no embedding runtime was available ' +
|
|
105
|
+
'when the ANN indexes were opened (set AQE_EMBEDDER_ENDPOINT, or install @huggingface/transformers). ' +
|
|
106
|
+
'Any existing vectors in patterns.rvf and brain.rvf are kept and will be used once an embedder is available; ' +
|
|
107
|
+
'until then pattern search uses SQLite text matching.';
|
|
108
|
+
/** Stored as the RVF init cause, so COMMITTED_PENDING_INDEX errors read correctly later. */
|
|
109
|
+
export const EMBEDDING_RUNTIME_UNAVAILABLE_CAUSE = 'VECTOR_SPACE_UNVERIFIED: no embedding runtime was available when the RVF index was opened; ' +
|
|
110
|
+
'index left unbound (existing vectors are kept)';
|
|
111
|
+
let embeddingRuntimeNoticeShown = false;
|
|
112
|
+
/** Log the no-embedder notice at most once per process. */
|
|
113
|
+
export function reportEmbeddingRuntimeUnavailable() {
|
|
114
|
+
if (embeddingRuntimeNoticeShown)
|
|
115
|
+
return;
|
|
116
|
+
embeddingRuntimeNoticeShown = true;
|
|
117
|
+
console.warn(EMBEDDING_RUNTIME_UNAVAILABLE_NOTICE);
|
|
118
|
+
}
|
|
119
|
+
/** @internal test-only seam */
|
|
120
|
+
export function __resetEmbeddingRuntimeNoticeForTests() {
|
|
121
|
+
embeddingRuntimeNoticeShown = false;
|
|
122
|
+
}
|
|
90
123
|
/** Sidecar path used to bind a persistent ANN index to one embedding space. */
|
|
91
124
|
export function embeddingSpaceManifestPath(indexPath) {
|
|
92
125
|
return `${indexPath}.space.json`;
|
|
@@ -17,7 +17,7 @@ import { toErrorMessage } from '../shared/error-utils.js';
|
|
|
17
17
|
import { calculateQualityScore, validateQEPattern, mapQEDomainToAQE, PROMOTION_THRESHOLD, } from './qe-patterns.js';
|
|
18
18
|
import { DEFAULT_PATTERN_STORE_CONFIG, blendFtsScore } from './pattern-store.js';
|
|
19
19
|
import { ensureEndpointEmbeddingSpaceIdentity, getActiveEmbeddingSpaceIdentity } from './real-embeddings.js';
|
|
20
|
-
import { verifyOrCreateEmbeddingSpaceManifest } from './embedding-space.js';
|
|
20
|
+
import { EMBEDDING_RUNTIME_UNAVAILABLE_CAUSE, reportEmbeddingRuntimeUnavailable, verifyOrCreateEmbeddingSpaceManifest, } from './embedding-space.js';
|
|
21
21
|
import { PatternMutationError } from './pattern-mutation-error.js';
|
|
22
22
|
// ============================================================================
|
|
23
23
|
// RVF Pattern Store Implementation
|
|
@@ -81,11 +81,25 @@ export class RvfPatternStore {
|
|
|
81
81
|
if (!this.embeddingSpaceId && !getActiveEmbeddingSpaceIdentity()) {
|
|
82
82
|
await ensureEndpointEmbeddingSpaceIdentity();
|
|
83
83
|
}
|
|
84
|
-
this.adapter = this.createAdapter(this.rvfPath, this.config.embeddingDimension);
|
|
85
84
|
const activeSpaceId = getActiveEmbeddingSpaceIdentity()?.spaceId ?? this.embeddingSpaceId ?? null;
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
85
|
+
if (!activeSpaceId) {
|
|
86
|
+
// #852: no embedding runtime was available when the index was opened
|
|
87
|
+
// (the normal state of a fresh project). The index stays closed —
|
|
88
|
+
// nothing could prove its vector space; any vectors in it are kept —
|
|
89
|
+
// but this is not a failure, so report it once at warn level
|
|
90
|
+
// and do not open or create the .rvf file. rvfInitError keeps
|
|
91
|
+
// embedding writes fail-closed (COMMITTED_PENDING_INDEX).
|
|
92
|
+
this.rvfInitError = EMBEDDING_RUNTIME_UNAVAILABLE_CAUSE;
|
|
93
|
+
this.adapter = null;
|
|
94
|
+
this.initialized = true;
|
|
95
|
+
reportEmbeddingRuntimeUnavailable();
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
this.adapter = this.createAdapter(this.rvfPath, this.config.embeddingDimension);
|
|
99
|
+
verifyOrCreateEmbeddingSpaceManifest(this.rvfPath, activeSpaceId, this.adapter.status()?.totalVectors ?? 0);
|
|
100
|
+
this.initialized = true;
|
|
101
|
+
console.log(`[RvfPatternStore] Initialized: ${this.rvfPath} (dim=${this.config.embeddingDimension})`);
|
|
102
|
+
}
|
|
89
103
|
}
|
|
90
104
|
catch (error) {
|
|
91
105
|
// Do NOT silently swallow — the user chose useRVFPatternStore=true,
|