agentic-qe 3.14.6 → 3.14.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/skills/skills-manifest.json +1 -1
- package/CHANGELOG.md +74 -0
- package/assets/skills/skills-manifest.json +1 -1
- package/dist/cli/bundle.js +8 -8
- package/dist/cli/chunks/adapter-TVQKH65T.js +2 -0
- package/dist/cli/chunks/{agent-booster-wasm-2YGML6OU.js → agent-booster-wasm-AK2W76RG.js} +2 -2
- package/dist/cli/chunks/{agent-handler-D5SSQYNU.js → agent-handler-MGZCWHIY.js} +2 -2
- package/dist/cli/chunks/{agent-memory-branch-YHPLTITV.js → agent-memory-branch-JZ54MCSP.js} +2 -2
- package/dist/cli/chunks/aqe-learning-engine-ULGTVVWE.js +2 -0
- package/dist/cli/chunks/{arena-7BGOXGXO.js → arena-CUVH3V7H.js} +2 -2
- package/dist/cli/chunks/{arena-MCE6EU7K.js → arena-YSWTKBCL.js} +4 -4
- package/dist/cli/chunks/{audit-BMWTQECB.js → audit-LVU76QGA.js} +3 -3
- package/dist/cli/chunks/base-W42BURDL.js +2 -0
- package/dist/cli/chunks/{better-sqlite3-PMUNGASU.js → better-sqlite3-DB3LOJQU.js} +2 -2
- package/dist/cli/chunks/{brain-handler-QPUFYX7F.js → brain-handler-SD63KOQ6.js} +3 -3
- package/dist/cli/chunks/{branch-enumerator-WKFDGRN4.js → branch-enumerator-4MNOPUC7.js} +2 -2
- package/dist/cli/chunks/{browser-VY5HKH5X.js → browser-OLPNTWQE.js} +2 -2
- package/dist/cli/chunks/browser-workflow-HKGHFFFT.js +2 -0
- package/dist/cli/chunks/{chunk-62N4NUJH.js → chunk-23CX7JNL.js} +2 -2
- package/dist/cli/chunks/{chunk-MW2GGZZ5.js → chunk-25P6JA6V.js} +1 -1
- package/dist/cli/chunks/{chunk-RSXXCL4A.js → chunk-2G63VIJE.js} +1 -1
- package/dist/cli/chunks/{chunk-3NIG7S5W.js → chunk-2IMSJ7IO.js} +1 -1
- package/dist/cli/chunks/{chunk-I33ERSGB.js → chunk-36VKMAMN.js} +2 -2
- package/dist/cli/chunks/{chunk-2TMWAQQ3.js → chunk-3M7J4U74.js} +3 -3
- package/dist/cli/chunks/{chunk-CM7U6TAX.js → chunk-3QJU4Q4R.js} +2 -2
- package/dist/cli/chunks/{chunk-H5BS5VH7.js → chunk-4EKV7PHB.js} +2 -2
- package/dist/cli/chunks/{chunk-IG5GNEC6.js → chunk-4INST4ZL.js} +1 -1
- package/dist/cli/chunks/{chunk-YHKEDEAA.js → chunk-53BXTTRO.js} +3 -3
- package/dist/cli/chunks/{chunk-ENGZ4D5V.js → chunk-5D7ZFWDS.js} +2 -2
- package/dist/cli/chunks/{chunk-DZ3AUAAB.js → chunk-5FSLMYAC.js} +2 -2
- package/dist/cli/chunks/{chunk-FBMN7B46.js → chunk-5GFKTJ65.js} +2 -2
- package/dist/cli/chunks/{chunk-NMAIY4PX.js → chunk-5U6N4V5M.js} +11 -11
- package/dist/cli/chunks/{chunk-B6D2CHEH.js → chunk-6EGS77BB.js} +1 -1
- package/dist/cli/chunks/{chunk-NQZ5AR3D.js → chunk-6PJPQGF4.js} +2 -2
- package/dist/cli/chunks/{chunk-ICTXTNQZ.js → chunk-6RD44SCE.js} +1 -1
- package/dist/cli/chunks/{chunk-2NPKIBAZ.js → chunk-74IOEOMH.js} +2 -2
- package/dist/cli/chunks/{chunk-RTFO5UQH.js → chunk-77QZHIVX.js} +2 -2
- package/dist/cli/chunks/{chunk-D45SG6CP.js → chunk-7EZ2Z2CK.js} +1 -1
- package/dist/cli/chunks/{chunk-UNFFDHER.js → chunk-7MIOK72I.js} +10 -32
- package/dist/cli/chunks/{chunk-HNFVJP4I.js → chunk-7QYOTUOX.js} +2 -2
- package/dist/cli/chunks/{chunk-Q7EAGKAE.js → chunk-A2VUCUTT.js} +2 -2
- package/dist/cli/chunks/{chunk-TVYY3OCX.js → chunk-A3DK3XNZ.js} +1 -1
- package/dist/cli/chunks/{chunk-RETBYIAC.js → chunk-A5MA7A23.js} +4 -4
- package/dist/cli/chunks/{chunk-DUYOVM5I.js → chunk-AEUEMVJK.js} +2 -2
- package/dist/cli/chunks/{chunk-6U7LNMWZ.js → chunk-AJUBT4NP.js} +2 -2
- package/dist/cli/chunks/{chunk-7CUQCCMD.js → chunk-B2YGVSOP.js} +2 -2
- package/dist/cli/chunks/{chunk-SNOBH4AZ.js → chunk-B4I43GE2.js} +2 -2
- package/dist/cli/chunks/{chunk-VMNWDJIZ.js → chunk-BD7FEUN3.js} +2 -2
- package/dist/cli/chunks/{chunk-HM6ZSCPI.js → chunk-BE4KALTE.js} +1 -1
- package/dist/cli/chunks/{chunk-WGM35YWL.js → chunk-BEFTQVEW.js} +2 -2
- package/dist/cli/chunks/{chunk-SMDN3BQZ.js → chunk-BLG7SH4A.js} +1 -1
- package/dist/cli/chunks/{chunk-AJRUJAAK.js → chunk-C3FXFU2T.js} +1 -1
- package/dist/cli/chunks/{chunk-IQO7UCFR.js → chunk-CBONQM5D.js} +2 -2
- package/dist/cli/chunks/{chunk-L4RUBPLR.js → chunk-CQNMGK6Y.js} +2 -2
- package/dist/cli/chunks/{chunk-NHWGMJAP.js → chunk-CVOQ6ESD.js} +2 -2
- package/dist/cli/chunks/{chunk-P6OYS755.js → chunk-DOBKEXMJ.js} +1 -1
- package/dist/cli/chunks/{chunk-QZANMBIT.js → chunk-DYTQHRUS.js} +1 -1
- package/dist/cli/chunks/{chunk-FZOBD67M.js → chunk-EADSQN5T.js} +1 -1
- package/dist/cli/chunks/{chunk-DHVX5UB2.js → chunk-EGOIIUBD.js} +2 -2
- package/dist/cli/chunks/{chunk-6OS76PHI.js → chunk-EIGRV3J6.js} +2 -2
- package/dist/cli/chunks/{chunk-CD542DNJ.js → chunk-EJ6MMYLK.js} +1 -1
- package/dist/cli/chunks/{chunk-ELLBS5RP.js → chunk-ENK44A6Q.js} +2 -2
- package/dist/cli/chunks/{chunk-VGFFFKGK.js → chunk-EYXE2XKP.js} +2 -2
- package/dist/cli/chunks/{chunk-72KXSMWI.js → chunk-F2OPFVQH.js} +1 -1
- package/dist/cli/chunks/{chunk-DK4XN4CU.js → chunk-FBZC4IGB.js} +2 -2
- package/dist/cli/chunks/{chunk-MUOG6QXR.js → chunk-FSSR6WBE.js} +2 -2
- package/dist/cli/chunks/{chunk-DPYSUDAO.js → chunk-FW4DJ4FJ.js} +1 -1
- package/dist/cli/chunks/{chunk-ZVWVV4EX.js → chunk-FYPX5WBJ.js} +1 -1
- package/dist/cli/chunks/{chunk-7J6QC567.js → chunk-G367W7XR.js} +3 -3
- package/dist/cli/chunks/{chunk-IAF6T27S.js → chunk-GLGKQX2V.js} +2 -2
- package/dist/cli/chunks/{chunk-JXGFRBUO.js → chunk-GV4DYPJP.js} +2 -2
- package/dist/cli/chunks/{chunk-BPEDWS6O.js → chunk-GVVFTFMB.js} +2 -2
- package/dist/cli/chunks/{chunk-CF2ISEOJ.js → chunk-H5RQPO3X.js} +2 -2
- package/dist/cli/chunks/{chunk-GSF6MB64.js → chunk-HPWWYT67.js} +2 -2
- package/dist/cli/chunks/{chunk-RG52OKAM.js → chunk-HXXHMLJ5.js} +1 -1
- package/dist/cli/chunks/{chunk-SESK3ARK.js → chunk-HYFQUWNB.js} +2 -2
- package/dist/cli/chunks/{chunk-7D3V65N5.js → chunk-HYOPJHHW.js} +1 -1
- package/dist/cli/chunks/{chunk-7LPR6HJG.js → chunk-HZY42OVU.js} +2 -2
- package/dist/cli/chunks/{chunk-SDRHUMJB.js → chunk-IAENZ2DR.js} +2 -2
- package/dist/cli/chunks/{chunk-B6MOJC3X.js → chunk-IEJ7ZV3M.js} +1 -1
- package/dist/cli/chunks/{chunk-UCFQALXO.js → chunk-IWFFO6VT.js} +2 -2
- package/dist/cli/chunks/chunk-J7AQZLIH.js +21 -0
- package/dist/cli/chunks/{chunk-H52HZ67P.js → chunk-JHJUSSAU.js} +2 -2
- package/dist/cli/chunks/{chunk-2YXGBZWV.js → chunk-JOZ47MV6.js} +1 -1
- package/dist/cli/chunks/{chunk-EAY2JMZG.js → chunk-JZT7BU44.js} +2 -2
- package/dist/cli/chunks/{chunk-BVR7RMC5.js → chunk-KD2BLA5Y.js} +1 -1
- package/dist/cli/chunks/{chunk-BAMN2CHI.js → chunk-KUHLTVWC.js} +1 -1
- package/dist/cli/chunks/{chunk-5QQSIGUA.js → chunk-LU2EDWQK.js} +2 -2
- package/dist/cli/chunks/{chunk-D6CJIGRU.js → chunk-LXZMP3VX.js} +54 -54
- package/dist/cli/chunks/{chunk-GPYVDFB3.js → chunk-LY7MFGBD.js} +196 -187
- package/dist/cli/chunks/{chunk-W6HXLH5G.js → chunk-MM56VPNE.js} +2 -2
- package/dist/cli/chunks/{chunk-E6G2RD5H.js → chunk-MNQN7UZX.js} +2 -2
- package/dist/cli/chunks/{chunk-ZCRTRYXK.js → chunk-MQZ53OR3.js} +2 -2
- package/dist/cli/chunks/{chunk-3HZS4M3O.js → chunk-MT7UNBZ7.js} +2 -2
- package/dist/cli/chunks/{chunk-XAS3XRYM.js → chunk-MZB2UV2O.js} +1 -1
- package/dist/cli/chunks/{chunk-GDSXITFH.js → chunk-MZMG6CUJ.js} +2 -2
- package/dist/cli/chunks/{chunk-6SQM2MUX.js → chunk-N5XOXPHZ.js} +2 -2
- package/dist/cli/chunks/{chunk-5OOMJGFN.js → chunk-NBLDBVAW.js} +1 -1
- package/dist/cli/chunks/{chunk-PI7TJS62.js → chunk-ND4QTZOL.js} +2 -2
- package/dist/cli/chunks/{chunk-H6ZM3PUT.js → chunk-NHUGHAY6.js} +1 -1
- package/dist/cli/chunks/{chunk-5VFPCSK7.js → chunk-NOHWJOBS.js} +1 -1
- package/dist/cli/chunks/{chunk-DBDPRORT.js → chunk-O5V7RHVG.js} +2 -2
- package/dist/cli/chunks/{chunk-UQ32JHES.js → chunk-O6MO5KMR.js} +2 -2
- package/dist/cli/chunks/{chunk-WO4QMXIG.js → chunk-OAZX6WFU.js} +2 -2
- package/dist/cli/chunks/{chunk-GGRHV6D7.js → chunk-OEPNNLR4.js} +1 -1
- package/dist/cli/chunks/{chunk-AIRGNL55.js → chunk-OIDWDGLG.js} +2 -2
- package/dist/cli/chunks/{chunk-V4DM6ELU.js → chunk-ON2UTP2U.js} +2 -2
- package/dist/cli/chunks/{chunk-MBRHSU6W.js → chunk-ONR2NXXD.js} +10 -10
- package/dist/cli/chunks/{chunk-WCJBU2KI.js → chunk-OXHF3L2T.js} +2 -2
- package/dist/cli/chunks/{chunk-AVBJYI5I.js → chunk-OZGIOKEA.js} +1 -1
- package/dist/cli/chunks/{chunk-YFBSPLJG.js → chunk-P2UPYSDJ.js} +1 -1
- package/dist/cli/chunks/{chunk-C6KWXUFJ.js → chunk-P7XSPP5D.js} +2 -2
- package/dist/cli/chunks/{chunk-QDFTT3RF.js → chunk-PCJQCEBA.js} +2 -2
- package/dist/cli/chunks/chunk-PELENDDQ.js +2 -0
- package/dist/cli/chunks/{chunk-257E2A5M.js → chunk-PYKY22GC.js} +5 -5
- package/dist/cli/chunks/{chunk-LL3IGZBI.js → chunk-Q3NSU24F.js} +2 -2
- package/dist/cli/chunks/{chunk-Y3LZ35OG.js → chunk-Q6NTEICT.js} +2 -2
- package/dist/cli/chunks/chunk-QFETNCNN.js +12 -0
- package/dist/cli/chunks/{chunk-SE4WIB26.js → chunk-QGOWNVVG.js} +1 -1
- package/dist/cli/chunks/{chunk-6RE3X4V5.js → chunk-QPLSYEWJ.js} +2 -2
- package/dist/cli/chunks/{chunk-FWASDOT2.js → chunk-QQFQDEUE.js} +2 -2
- package/dist/cli/chunks/{chunk-2JVWITNK.js → chunk-QUORH2MG.js} +55 -79
- package/dist/cli/chunks/{chunk-5J6W7SIA.js → chunk-QVH5Y7AP.js} +1 -1
- package/dist/cli/chunks/{chunk-YSLL6VSL.js → chunk-RC2A4JZ5.js} +2 -2
- package/dist/cli/chunks/{chunk-IB27QACC.js → chunk-RDGPXENG.js} +2 -2
- package/dist/cli/chunks/{chunk-PX5YDCRH.js → chunk-RKI3IQKQ.js} +2 -2
- package/dist/cli/chunks/{chunk-BMAPORJ7.js → chunk-RKUAWQOF.js} +2 -2
- package/dist/cli/chunks/chunk-RLW25X66.js +2 -0
- package/dist/cli/chunks/{chunk-RFNPJK6N.js → chunk-ROVZSZCS.js} +3 -3
- package/dist/cli/chunks/{chunk-MQROI74N.js → chunk-RT6O2HW2.js} +2 -2
- package/dist/cli/chunks/{chunk-Y3UOUNHM.js → chunk-SM2YJ2AL.js} +2 -2
- package/dist/cli/chunks/{chunk-BBT64TII.js → chunk-SRPLERER.js} +3 -3
- package/dist/cli/chunks/{chunk-YS4FCTWF.js → chunk-T77GZF4B.js} +1 -1
- package/dist/cli/chunks/{chunk-IV5UZOHH.js → chunk-TFK2AYIN.js} +2 -2
- package/dist/cli/chunks/chunk-TW3SR4TS.js +2 -0
- package/dist/cli/chunks/{chunk-7Z5LHRC3.js → chunk-TXSPBLBT.js} +2 -2
- package/dist/cli/chunks/chunk-UA7TDVL7.js +12 -0
- package/dist/cli/chunks/{chunk-3EZOZN25.js → chunk-UBJG3IHT.js} +2 -2
- package/dist/cli/chunks/{chunk-QW6VMTBR.js → chunk-UFSVUBTR.js} +2 -2
- package/dist/cli/chunks/{chunk-ZEV3YTO7.js → chunk-UOI6ULCH.js} +2 -2
- package/dist/cli/chunks/{chunk-JZOS5FCX.js → chunk-UYUJT6QO.js} +2 -2
- package/dist/cli/chunks/{chunk-3EA536JF.js → chunk-V5AK56DA.js} +2 -2
- package/dist/cli/chunks/{chunk-UKA2KOXE.js → chunk-V6RE4YRQ.js} +2 -2
- package/dist/cli/chunks/{chunk-RZZCUIAI.js → chunk-VW6FRMLW.js} +2 -2
- package/dist/cli/chunks/chunk-VXKWNRGA.js +2 -0
- package/dist/cli/chunks/{chunk-6SH5VZUD.js → chunk-VYDVI6FZ.js} +2 -2
- package/dist/cli/chunks/{chunk-BJTJLJRZ.js → chunk-WF6UISKW.js} +3 -3
- package/dist/cli/chunks/{chunk-ZL6SYKUK.js → chunk-WIH522AP.js} +1 -1
- package/dist/cli/chunks/{chunk-JIXUMYKZ.js → chunk-WOV6XI3A.js} +1 -1
- package/dist/cli/chunks/{chunk-JBTPOIAC.js → chunk-X7ADKL7T.js} +2 -2
- package/dist/cli/chunks/{chunk-JVNTSNWU.js → chunk-XBYQ2BS4.js} +2 -2
- package/dist/cli/chunks/{chunk-Z7WODOTH.js → chunk-XL5KIYE3.js} +2 -2
- package/dist/cli/chunks/{chunk-JMONHE4B.js → chunk-XWYELBZS.js} +1 -1
- package/dist/cli/chunks/{chunk-SJUXE4IC.js → chunk-XYLQZWF6.js} +2 -2
- package/dist/cli/chunks/{chunk-KNNISEDY.js → chunk-Y6AKKQIQ.js} +1 -1
- package/dist/cli/chunks/{chunk-CCK4BF76.js → chunk-YMW57PEL.js} +1 -1
- package/dist/cli/chunks/{chunk-64VGZQLB.js → chunk-YO4ESCB4.js} +1 -1
- package/dist/cli/chunks/{chunk-ZSPU4MOS.js → chunk-YRHTQZU4.js} +2 -2
- package/dist/cli/chunks/chunk-Z4Q5PCRZ.js +65 -0
- package/dist/cli/chunks/{chunk-Q5XTSMWR.js → chunk-ZELWDJXT.js} +2 -2
- package/dist/cli/chunks/{chunk-SPV2VKC5.js → chunk-ZQZD55MN.js} +2 -2
- package/dist/cli/chunks/{chunk-66VWCR67.js → chunk-ZS4XVJGV.js} +2 -2
- package/dist/cli/chunks/{chunk-6LIHFV7O.js → chunk-ZUB5YOCM.js} +2 -2
- package/dist/cli/chunks/chunk-ZUOVNFXK.js +2 -0
- package/dist/cli/chunks/{chunk-7NITCZWD.js → chunk-ZWEKAEEV.js} +1 -1
- package/dist/cli/chunks/{ci-W6K6G2KZ.js → ci-J3TDK5RA.js} +8 -8
- package/dist/cli/chunks/{ci-output-LDT24TS3.js → ci-output-RLS32FUY.js} +2 -2
- package/dist/cli/chunks/{circuit-breaker-F5V4KITU.js → circuit-breaker-MRCC7WCM.js} +2 -2
- package/dist/cli/chunks/{claude-flow-setup-DT6WQQVD.js → claude-flow-setup-LIZCEKDF.js} +2 -2
- package/dist/cli/chunks/client-3BD2DI4N.js +2 -0
- package/dist/cli/chunks/{cline-installer-G7TJOAEX.js → cline-installer-T7H6R2RC.js} +2 -2
- package/dist/cli/chunks/{code-PGE6A42V.js → code-XMBLI7OF.js} +3 -3
- package/dist/cli/chunks/{code-index-extractor-RNITH372.js → code-index-extractor-QS7BYLEX.js} +2 -2
- package/dist/cli/chunks/{codex-installer-LBX77AI3.js → codex-installer-6PGT5FM6.js} +2 -2
- package/dist/cli/chunks/{completions-4AWLAARX.js → completions-2A3WRXY2.js} +2 -2
- package/dist/cli/chunks/{complexity-analyzer-ZPNSS476.js → complexity-analyzer-23HOOGJ7.js} +2 -2
- package/dist/cli/chunks/{continuedev-installer-UAPWX6OA.js → continuedev-installer-4FSF7B3N.js} +2 -2
- package/dist/cli/chunks/{copilot-installer-BJN2YJGI.js → copilot-installer-A5GRQQUU.js} +2 -2
- package/dist/cli/chunks/core-handlers-C3H2ZCS2.js +2 -0
- package/dist/cli/chunks/{cost-tracker-MHP2VJ63.js → cost-tracker-Z4STQ5VB.js} +2 -2
- package/dist/cli/chunks/{coverage-PQB4IEFG.js → coverage-NUPP6KZZ.js} +3 -3
- package/dist/cli/chunks/cross-domain-router-JCQ7SWDP.js +2 -0
- package/dist/cli/chunks/{cursor-installer-ZXBWYAS3.js → cursor-installer-FVJ7ROPJ.js} +2 -2
- package/dist/cli/chunks/{daemon-N2BEGEFY.js → daemon-7ZZA2MMN.js} +4 -4
- package/dist/cli/chunks/{daemon-64C7R6OJ.js → daemon-D662EX5N.js} +3 -3
- package/dist/cli/chunks/{dag-attention-scheduler-SPZDAPNL.js → dag-attention-scheduler-IB4TQ2KA.js} +2 -2
- package/dist/cli/chunks/{detect-LXJBSSZW.js → detect-LGLBZN4I.js} +2 -2
- package/dist/cli/chunks/{dist-node-U3TKZ2IZ.js → dist-node-Z3OL42YE.js} +2 -2
- package/dist/cli/chunks/{domain-handler-3DDWUVSR.js → domain-handler-L3CLNL7U.js} +2 -2
- package/dist/cli/chunks/{domain-plugins-JJVWI4OQ.js → domain-plugins-GQ3V5X6L.js} +2 -2
- package/dist/cli/chunks/{domain-transfer-M36KUJ2U.js → domain-transfer-MFCI76IY.js} +2 -2
- package/dist/cli/chunks/dream-FTP33IJB.js +2 -0
- package/dist/cli/chunks/{embed-and-insert-pattern-JPAR7TXX.js → embed-and-insert-pattern-UGD6USYH.js} +2 -2
- package/dist/cli/chunks/{eval-SOLG23EA.js → eval-3B7UIYGY.js} +2 -2
- package/dist/cli/chunks/{experience-capture-middleware-T7G2VOOD.js → experience-capture-middleware-3RQ4NYY3.js} +3 -3
- package/dist/cli/chunks/{fast-paths-32N3ELI4.js → fast-paths-QOSAEPYD.js} +2 -2
- package/dist/cli/chunks/{feature-flags-NAHKLDRN.js → feature-flags-3S5TH6P4.js} +2 -2
- package/dist/cli/chunks/{feature-flags-APJDQ4N7.js → feature-flags-TLF4NKOH.js} +2 -2
- package/dist/cli/chunks/{file-discovery-YKVM3MDB.js → file-discovery-AEVMJRNB.js} +2 -2
- package/dist/cli/chunks/{fleet-55M5CJS4.js → fleet-E6WTXWFL.js} +3 -3
- package/dist/cli/chunks/{gnn-wrapper-UD6E6S6Z.js → gnn-wrapper-MCKH3AUU.js} +2 -2
- package/dist/cli/chunks/{heartbeat-handler-OYVW3VSC.js → heartbeat-handler-U7XENHRR.js} +4 -4
- package/dist/cli/chunks/heartbeat-scheduler-HXBJVJL2.js +2 -0
- package/dist/cli/chunks/hnsw-adapter-TU6WG2ME.js +2 -0
- package/dist/cli/chunks/hnsw-index-MS5KODD7.js +2 -0
- package/dist/cli/chunks/{hnsw-legacy-bridge-HBYIS3ZW.js → hnsw-legacy-bridge-5GW4SAEI.js} +2 -2
- package/dist/cli/chunks/{hnswlib-node-EQPM42OU.js → hnswlib-node-7BLZBK5T.js} +2 -2
- package/dist/cli/chunks/{hooks-5ZSSJWO6.js → hooks-F3O2SB6H.js} +10 -10
- package/dist/cli/chunks/hybrid-backend-HT45LBHC.js +2 -0
- package/dist/cli/chunks/{hypergraph-engine-XBGVQ4PD.js → hypergraph-engine-PV4EKXHB.js} +2 -2
- package/dist/cli/chunks/{hypergraph-handler-CAWAQ673.js → hypergraph-handler-VOWO5ZTW.js} +3 -3
- package/dist/cli/chunks/impact-analyzer-AP4AGTG5.js +2 -0
- package/dist/cli/chunks/{init-handler-PRHXSARK.js → init-handler-ENJ5ONJX.js} +16 -14
- package/dist/cli/chunks/init-wizard-I5DFZUQL.js +2 -0
- package/dist/cli/chunks/kernel-MISPSPPA.js +2 -0
- package/dist/cli/chunks/{kilocode-installer-F7LXBM7I.js → kilocode-installer-HNNJOOPE.js} +2 -2
- package/dist/cli/chunks/{kiro-installer-NM723ZRG.js → kiro-installer-UZBIQ3IC.js} +2 -2
- package/dist/cli/chunks/knowledge-graph-L26JESGE.js +2 -0
- package/dist/cli/chunks/{learning-5QYIDHH3.js → learning-YMLCVFUT.js} +3 -3
- package/dist/cli/chunks/{llm-router-43HKWPSX.js → llm-router-YWTARCCT.js} +4 -4
- package/dist/cli/chunks/llm-router-service-MWGC43ZA.js +2 -0
- package/dist/cli/chunks/{load-5YDBWSCS.js → load-DKE3F3IP.js} +2 -2
- package/dist/cli/chunks/load-test-H5ISNNM5.js +2 -0
- package/dist/cli/chunks/{mcp-UMAPMNMY.js → mcp-5PSGIUCW.js} +2 -2
- package/dist/cli/chunks/{memory-FWCPCQFP.js → memory-3L3O6JMM.js} +5 -5
- package/dist/cli/chunks/memory-backend-HWDNOBKW.js +2 -0
- package/dist/cli/chunks/memory-handlers-ZFDVQZM5.js +2 -0
- package/dist/cli/chunks/{multi-model-executor-2XTBGLE4.js → multi-model-executor-AEEO7IA4.js} +2 -2
- package/dist/cli/chunks/{opencode-installer-GIXOJ6NS.js → opencode-installer-ABBO355U.js} +2 -2
- package/dist/cli/chunks/{orchestrator-VW6BKHLI.js → orchestrator-E36Q7MKE.js} +17 -17
- package/dist/cli/chunks/pattern-null-store-GQP6ICWK.js +2 -0
- package/dist/cli/chunks/{pattern-usage-recorder-7CEUC3J7.js → pattern-usage-recorder-H4XKSID4.js} +2 -2
- package/dist/cli/chunks/{pipeline-IGUQPPPO.js → pipeline-BGFEHXIN.js} +2 -2
- package/dist/cli/chunks/{platform-2P636I7B.js → platform-GK7ZVDJI.js} +2 -2
- package/dist/cli/chunks/{plugin-NY6SWDPE.js → plugin-CAH2CKI6.js} +2 -2
- package/dist/cli/chunks/{prime-radiant-advanced-wasm-2UUDTIO2.js → prime-radiant-advanced-wasm-M5EYRONA.js} +2 -2
- package/dist/cli/chunks/{project-root-IOISG5KX.js → project-root-BSNZC243.js} +2 -2
- package/dist/cli/chunks/protocol-executor-AD5A4DAI.js +2 -0
- package/dist/cli/chunks/{protocol-handler-ZTPCRQ5W.js → protocol-handler-JDSSC2SF.js} +2 -2
- package/dist/cli/chunks/{prove-SQX5A3IG.js → prove-ANPTOZJE.js} +2 -2
- package/dist/cli/chunks/qe-reasoning-bank-W3Z2PKTR.js +2 -0
- package/dist/cli/chunks/{quality-DROILKRY.js → quality-SXWGYRQR.js} +2 -2
- package/dist/cli/chunks/{quality-gate-PWKWDJY2.js → quality-gate-GYNCA4ZY.js} +3 -3
- package/dist/cli/chunks/queen-coordinator-HQRHLIJX.js +2 -0
- package/dist/cli/chunks/{real-embeddings-P5U3MGYC.js → real-embeddings-WSRYAOZM.js} +2 -2
- package/dist/cli/chunks/{ref-validation-KY73NQXD.js → ref-validation-AZ3LRWEK.js} +2 -2
- package/dist/cli/chunks/{roocode-installer-6JPPRB3W.js → roocode-installer-2QKGFIEU.js} +2 -2
- package/dist/cli/chunks/router-MTP5LH4H.js +2 -0
- package/dist/cli/chunks/routing-feedback-GWETVB4L.js +2 -0
- package/dist/cli/chunks/{routing-handler-VTJIVFUO.js → routing-handler-UYDC5MMD.js} +2 -2
- package/dist/cli/chunks/{ruvector-commands-C6RPSJJO.js → ruvector-commands-QXADPVEY.js} +2 -2
- package/dist/cli/chunks/rvf-dual-writer-4UE5S7WP.js +2 -0
- package/dist/cli/chunks/rvf-migration-adapter-PHH3HF4Q.js +2 -0
- package/dist/cli/chunks/{rvf-migration-coordinator-R53URRIO.js → rvf-migration-coordinator-GD4NBFKT.js} +2 -2
- package/dist/cli/chunks/rvf-native-adapter-KTLZBUWV.js +2 -0
- package/dist/cli/chunks/{rvf-store-integrity-MMXN5TEJ.js → rvf-store-integrity-7SXG66IL.js} +2 -2
- package/dist/cli/chunks/safe-db-FWWGAPVE.js +2 -0
- package/dist/cli/chunks/schedule-TPA4V4D5.js +2 -0
- package/dist/cli/chunks/scheduler-5ZTEPNDD.js +2 -0
- package/dist/cli/chunks/{security-3B3R2NL4.js → security-YKB622PK.js} +3 -3
- package/dist/cli/chunks/{shared-rvf-adapter-VIJB7JUS.js → shared-rvf-adapter-KMLAV7JK.js} +2 -2
- package/dist/cli/chunks/{shared-rvf-dual-writer-UVWGDUWC.js → shared-rvf-dual-writer-OYY27DFV.js} +2 -2
- package/dist/cli/chunks/sqlite-persistence-HPTT624C.js +2 -0
- package/dist/cli/chunks/{standalone-memory-M4LWAAYZ.js → standalone-memory-2DOABVLC.js} +2 -2
- package/dist/cli/chunks/{status-handler-YYFV6OZL.js → status-handler-EXRKETV7.js} +2 -2
- package/dist/cli/chunks/{structural-health-27E6LLKB.js → structural-health-2SKK6DU6.js} +2 -2
- package/dist/cli/chunks/sync-DQ2YUNI6.js +2 -0
- package/dist/cli/chunks/{sync-J3LJ56WN.js → sync-UW7SX7GO.js} +2 -2
- package/dist/cli/chunks/{task-handler-4MCEBQZL.js → task-handler-LYQ6WYUY.js} +2 -2
- package/dist/cli/chunks/task-handlers-DIJO232S.js +9 -0
- package/dist/cli/chunks/test-WRHZMUCW.js +33 -0
- package/dist/cli/chunks/{test-scheduling-ZJBFRZ3J.js → test-scheduling-HI23RXFK.js} +3 -3
- package/dist/cli/chunks/token-bootstrap-23SA6SWZ.js +2 -0
- package/dist/cli/chunks/{token-usage-3X5WMTG2.js → token-usage-M7RRDPXO.js} +2 -2
- package/dist/cli/chunks/{transformers-MVL4C5IX.js → transformers-4TC35KKS.js} +2 -2
- package/dist/cli/chunks/{tree-sitter-wasm-parser-SLW65ZFO.js → tree-sitter-wasm-parser-F4LTKAWD.js} +2 -2
- package/dist/cli/chunks/{types-TG5P3CRS.js → types-NBXV6LXQ.js} +2 -2
- package/dist/cli/chunks/unified-memory-OVFEPRPS.js +2 -0
- package/dist/cli/chunks/unified-memory-hnsw-KKRSCZHR.js +2 -0
- package/dist/cli/chunks/unified-persistence-7GLR4RI3.js +2 -0
- package/dist/cli/chunks/{upgrade-ETBHDEPY.js → upgrade-4BGOU5RM.js} +2 -2
- package/dist/cli/chunks/{validate-C2A73LZK.js → validate-EDWAR63H.js} +2 -2
- package/dist/cli/chunks/{validate-swarm-67XN42ML.js → validate-swarm-VI72CPR7.js} +2 -2
- package/dist/cli/chunks/visual-security-2FUM5GLI.js +2 -0
- package/dist/cli/chunks/{web-tree-sitter-USJN77P4.js → web-tree-sitter-Y5XBRQXF.js} +2 -2
- package/dist/cli/chunks/{windsurf-installer-5GGZXGJW.js → windsurf-installer-VEX23WAF.js} +2 -2
- package/dist/cli/chunks/{witness-chain-IWS5ZHHL.js → witness-chain-3YNL6YGY.js} +2 -2
- package/dist/cli/chunks/witness-chain-MH6GA5L6.js +2 -0
- package/dist/cli/chunks/witness-chain-repair-MJZGZRWT.js +2 -0
- package/dist/cli/chunks/{witness-chain-verifier-3GEADWPE.js → witness-chain-verifier-TTJYXTBE.js} +2 -2
- package/dist/cli/chunks/{witness-key-manager-ZWEIK3VJ.js → witness-key-manager-EM6YXYOY.js} +2 -2
- package/dist/cli/chunks/{workflow-KHMVVBBA.js → workflow-2RBDOM7V.js} +4 -4
- package/dist/cli/chunks/workflow-orchestrator-H6G65YKU.js +2 -0
- package/dist/cli/chunks/wrappers-5OTAVVOV.js +2 -0
- package/dist/cli/commands/ci.js +1 -1
- package/dist/cli/commands/test.js +18 -3
- package/dist/cli/handlers/init-handler.d.ts +2 -0
- package/dist/cli/handlers/init-handler.js +8 -2
- package/dist/cli/index.js +8 -0
- package/dist/coordination/handlers/test-execution-handlers.js +13 -8
- package/dist/coordination/index.d.ts +1 -1
- package/dist/coordination/queen-event-handlers.js +9 -6
- package/dist/coordination/result-saver.js +1 -1
- package/dist/coordination/services/index.d.ts +1 -1
- package/dist/coordination/services/task-audit-logger.d.ts +38 -13
- package/dist/coordination/services/task-audit-logger.js +33 -5
- package/dist/coordination/task-executor.d.ts +5 -0
- package/dist/coordination/task-executor.js +10 -5
- package/dist/domains/test-generation/coordinator.js +6 -5
- package/dist/domains/test-generation/interfaces.d.ts +11 -1
- package/dist/domains/test-generation/services/behavior-example-validation.d.ts +36 -0
- package/dist/domains/test-generation/services/behavior-example-validation.js +89 -0
- package/dist/domains/test-generation/services/behavior-examples.d.ts +8 -0
- package/dist/domains/test-generation/services/behavior-examples.js +65 -0
- package/dist/domains/test-generation/services/test-generator.d.ts +1 -1
- package/dist/domains/test-generation/services/test-generator.js +59 -30
- package/dist/domains/visual-accessibility/services/axe-core-audit.d.ts +0 -15
- package/dist/domains/visual-accessibility/services/axe-core-audit.js +12 -10
- package/dist/init/browser-engine-installer.d.ts +5 -5
- package/dist/init/browser-engine-installer.js +28 -6
- package/dist/init/init-wizard.d.ts +2 -0
- package/dist/init/orchestrator.js +1 -0
- package/dist/init/phases/09-assets.js +8 -18
- package/dist/init/phases/phase-interface.d.ts +2 -0
- package/dist/integrations/agentic-flow/reasoning-bank/index.d.ts +2 -5
- package/dist/integrations/vibium/client.d.ts +1 -0
- package/dist/integrations/vibium/client.js +24 -11
- package/dist/integrations/vibium/runtime.d.ts +14 -0
- package/dist/integrations/vibium/runtime.js +94 -0
- package/dist/kernel/pattern-fts-self-heal.d.ts +63 -0
- package/dist/kernel/pattern-fts-self-heal.js +193 -0
- package/dist/kernel/process-lifecycle.d.ts +60 -0
- package/dist/kernel/process-lifecycle.js +91 -0
- package/dist/kernel/unified-memory-schemas.d.ts +15 -1
- package/dist/kernel/unified-memory-schemas.js +53 -25
- package/dist/kernel/unified-memory.js +31 -34
- package/dist/kernel/unified-persistence.js +12 -6
- package/dist/learning/experience-capture.d.ts +2 -1
- package/dist/learning/experience-capture.js +23 -8
- package/dist/learning/pattern-store.d.ts +1 -1
- package/dist/learning/pattern-store.js +27 -30
- package/dist/learning/qe-patterns.d.ts +6 -0
- package/dist/learning/qe-reasoning-bank.d.ts +1 -0
- package/dist/learning/qe-reasoning-bank.js +14 -4
- package/dist/learning/real-qe-reasoning-bank.d.ts +9 -4
- package/dist/learning/real-qe-reasoning-bank.js +28 -4
- package/dist/learning/rvf-pattern-store.js +19 -19
- package/dist/learning/sqlite-persistence.js +9 -24
- package/dist/mcp/bundle.js +508 -545
- package/dist/mcp/entry.js +52 -6
- package/dist/mcp/handlers/domain-handler-configs.js +12 -4
- package/dist/mcp/handlers/task-handlers.js +11 -7
- package/dist/mcp/protocol-server.js +18 -3
- package/dist/mcp/services/reasoning-bank-service.d.ts +6 -1
- package/dist/mcp/services/reasoning-bank-service.js +5 -1
- package/dist/mcp/tools/test-execution/e2e-execute.js +9 -1
- package/dist/mcp/tools/test-generation/generate.d.ts +6 -1
- package/dist/mcp/tools/test-generation/generate.js +8 -0
- package/dist/mcp/types.d.ts +6 -2
- package/dist/shared/error-utils.d.ts +15 -0
- package/dist/shared/error-utils.js +21 -0
- package/dist/shared/events/domain-events.d.ts +2 -1
- package/package.json +10 -6
- package/dist/cli/chunks/adapter-UYOJPTOX.js +0 -2
- package/dist/cli/chunks/aqe-learning-engine-JR5AVQXR.js +0 -2
- package/dist/cli/chunks/base-DRZ2LS6X.js +0 -2
- package/dist/cli/chunks/browser-workflow-CJ7T3MXF.js +0 -2
- package/dist/cli/chunks/chunk-4N23RFDU.js +0 -2
- package/dist/cli/chunks/chunk-AHKELLIO.js +0 -12
- package/dist/cli/chunks/chunk-MJS53PRX.js +0 -2
- package/dist/cli/chunks/chunk-PZPWRQ2M.js +0 -21
- package/dist/cli/chunks/chunk-QGA55PFM.js +0 -12
- package/dist/cli/chunks/chunk-TCHGOB2N.js +0 -2
- package/dist/cli/chunks/chunk-Z6GGIRQQ.js +0 -65
- package/dist/cli/chunks/client-KHWJT6FB.js +0 -2
- package/dist/cli/chunks/core-handlers-HING5RRG.js +0 -2
- package/dist/cli/chunks/cross-domain-router-PQTD6AZN.js +0 -2
- package/dist/cli/chunks/dream-WUGRSNCV.js +0 -2
- package/dist/cli/chunks/heartbeat-scheduler-33XX5XNQ.js +0 -2
- package/dist/cli/chunks/hnsw-adapter-XQPERX3H.js +0 -2
- package/dist/cli/chunks/hnsw-index-2GNXTWHH.js +0 -2
- package/dist/cli/chunks/hybrid-backend-CCF7URKI.js +0 -2
- package/dist/cli/chunks/impact-analyzer-HGKAZWIG.js +0 -2
- package/dist/cli/chunks/init-wizard-72MFBI3G.js +0 -2
- package/dist/cli/chunks/kernel-BRCBVMSK.js +0 -2
- package/dist/cli/chunks/knowledge-graph-DG44IPEI.js +0 -2
- package/dist/cli/chunks/llm-router-service-24KXFX32.js +0 -2
- package/dist/cli/chunks/load-test-N4TAYJY3.js +0 -2
- package/dist/cli/chunks/memory-backend-NVYFYVAU.js +0 -2
- package/dist/cli/chunks/memory-handlers-UTWCNCHL.js +0 -2
- package/dist/cli/chunks/pattern-null-store-SBPNYDBR.js +0 -2
- package/dist/cli/chunks/protocol-executor-IBYEII5Q.js +0 -2
- package/dist/cli/chunks/qe-reasoning-bank-7IETWW6W.js +0 -2
- package/dist/cli/chunks/queen-coordinator-NHUK2MWJ.js +0 -2
- package/dist/cli/chunks/router-SRSO3IHF.js +0 -2
- package/dist/cli/chunks/routing-feedback-PASRE5HY.js +0 -2
- package/dist/cli/chunks/rvf-dual-writer-4M4J67OU.js +0 -2
- package/dist/cli/chunks/rvf-migration-adapter-TSXGT5LF.js +0 -2
- package/dist/cli/chunks/rvf-native-adapter-MOF3E7BR.js +0 -2
- package/dist/cli/chunks/safe-db-QJLFO33B.js +0 -2
- package/dist/cli/chunks/schedule-YIVXW5O2.js +0 -2
- package/dist/cli/chunks/scheduler-AON7DWSJ.js +0 -2
- package/dist/cli/chunks/sqlite-persistence-75VHKKQB.js +0 -2
- package/dist/cli/chunks/sync-26CEGSTC.js +0 -2
- package/dist/cli/chunks/task-handlers-GYBAWKE2.js +0 -9
- package/dist/cli/chunks/test-MPC5HRH5.js +0 -33
- package/dist/cli/chunks/token-bootstrap-2Y2XITBX.js +0 -2
- package/dist/cli/chunks/unified-memory-UCQ6AB32.js +0 -2
- package/dist/cli/chunks/unified-memory-hnsw-IXYUMKRR.js +0 -2
- package/dist/cli/chunks/unified-persistence-7E6JQ4FZ.js +0 -2
- package/dist/cli/chunks/vibium-NILGKHLN.js +0 -2
- package/dist/cli/chunks/visual-security-4VZXPEVG.js +0 -2
- package/dist/cli/chunks/witness-chain-JQA2VPZI.js +0 -2
- package/dist/cli/chunks/witness-chain-repair-4UA7IPS3.js +0 -2
- package/dist/cli/chunks/workflow-orchestrator-GI5NQH7C.js +0 -2
- package/dist/cli/chunks/wrappers-N6XIK5PT.js +0 -2
|
@@ -15,7 +15,21 @@ export declare const VECTORS_SCHEMA = "\n -- Vector Embeddings (new in v3 - rep
|
|
|
15
15
|
export declare const RL_QVALUES_SCHEMA = "\n -- Q-Values for RL algorithms (ADR-046)\n CREATE TABLE IF NOT EXISTS rl_q_values (\n id TEXT PRIMARY KEY,\n algorithm TEXT NOT NULL,\n agent_id TEXT NOT NULL,\n state_key TEXT NOT NULL,\n action_key TEXT NOT NULL,\n q_value REAL NOT NULL DEFAULT 0.0,\n visits INTEGER NOT NULL DEFAULT 0,\n last_reward REAL,\n domain TEXT,\n created_at TEXT DEFAULT (datetime('now')),\n updated_at TEXT DEFAULT (datetime('now')),\n UNIQUE(algorithm, agent_id, state_key, action_key)\n );\n CREATE INDEX IF NOT EXISTS idx_qvalues_agent ON rl_q_values(agent_id);\n CREATE INDEX IF NOT EXISTS idx_qvalues_algorithm ON rl_q_values(algorithm);\n CREATE INDEX IF NOT EXISTS idx_qvalues_state ON rl_q_values(agent_id, state_key);\n CREATE INDEX IF NOT EXISTS idx_qvalues_domain ON rl_q_values(domain);\n CREATE INDEX IF NOT EXISTS idx_qvalues_updated ON rl_q_values(updated_at);\n";
|
|
16
16
|
export declare const GOAP_SCHEMA = "\n -- GOAP Goals\n CREATE TABLE IF NOT EXISTS goap_goals (\n id TEXT PRIMARY KEY,\n name TEXT NOT NULL,\n description TEXT,\n conditions TEXT NOT NULL,\n priority INTEGER DEFAULT 3,\n qe_domain TEXT,\n created_at TEXT DEFAULT (datetime('now'))\n );\n\n -- GOAP Actions\n CREATE TABLE IF NOT EXISTS goap_actions (\n id TEXT PRIMARY KEY,\n name TEXT NOT NULL,\n description TEXT,\n agent_type TEXT NOT NULL,\n preconditions TEXT NOT NULL,\n effects TEXT NOT NULL,\n cost REAL DEFAULT 1.0,\n estimated_duration_ms INTEGER,\n success_rate REAL DEFAULT 1.0,\n execution_count INTEGER DEFAULT 0,\n category TEXT NOT NULL,\n qe_domain TEXT,\n created_at TEXT DEFAULT (datetime('now')),\n updated_at TEXT DEFAULT (datetime('now')),\n -- A14: real domain API method binding (kernel.getDomainAPI(qe_domain)[method](params)).\n -- method/implemented are NULL/0 for actions with no real backing yet \u2014\n -- GOAPExecutor must report those as \"not implemented\", never simulate them.\n method TEXT,\n params TEXT,\n implemented INTEGER DEFAULT 0\n );\n\n -- GOAP Plans\n CREATE TABLE IF NOT EXISTS goap_plans (\n id TEXT PRIMARY KEY,\n goal_id TEXT,\n initial_state TEXT NOT NULL,\n goal_state TEXT NOT NULL,\n action_sequence TEXT NOT NULL,\n total_cost REAL,\n estimated_duration_ms INTEGER,\n status TEXT DEFAULT 'pending',\n reused_from TEXT,\n similarity_score REAL,\n created_at TEXT DEFAULT (datetime('now')),\n executed_at TEXT,\n completed_at TEXT,\n FOREIGN KEY (goal_id) REFERENCES goap_goals(id)\n );\n\n -- Plan Signatures (for similarity matching)\n CREATE TABLE IF NOT EXISTS goap_plan_signatures (\n id TEXT PRIMARY KEY,\n plan_id TEXT NOT NULL UNIQUE,\n goal_hash TEXT NOT NULL,\n state_vector TEXT NOT NULL,\n action_sequence TEXT NOT NULL,\n total_cost REAL NOT NULL,\n success_rate REAL DEFAULT 1.0,\n usage_count INTEGER DEFAULT 0,\n created_at TEXT DEFAULT (datetime('now'))\n );\n\n -- A14: canonical per-step execution history (was previously undefined in\n -- this schema \u2014 plan-executor.ts invented its own parallel\n -- execution_results/executed_steps tables instead). One row per action\n -- step per execution attempt (execution_id groups steps from the same\n -- plan.execute() call, since a plan can be executed/retried more than\n -- once). Aggregate per-execution stats (steps completed/failed, total\n -- duration, final world state) are derived by querying this table rather\n -- than maintained in a separate denormalized summary table.\n CREATE TABLE IF NOT EXISTS goap_execution_steps (\n id TEXT PRIMARY KEY,\n plan_id TEXT NOT NULL,\n execution_id TEXT NOT NULL,\n action_id TEXT NOT NULL,\n step_order INTEGER NOT NULL,\n world_state_before TEXT,\n world_state_after TEXT,\n status TEXT NOT NULL DEFAULT 'pending',\n retries INTEGER DEFAULT 0,\n started_at TEXT,\n duration_ms INTEGER,\n agent_id TEXT,\n agent_output TEXT,\n error_message TEXT,\n created_at TEXT DEFAULT (datetime('now'))\n -- Deliberately no FK to goap_plans/goap_actions: PlanExecutor.execute()\n -- can legitimately run an ad-hoc GOAPPlan/GOAPAction that was never\n -- saved via savePlan()/addAction() (e.g. programmatic orchestration\n -- bypassing the A* planner). unified-memory.ts enables the\n -- foreign_keys pragma, so an enforced FK here would reject that\n -- entirely legitimate usage, not just catch real corruption.\n );\n\n -- GOAP Indexes\n CREATE INDEX IF NOT EXISTS idx_goap_actions_category ON goap_actions(category);\n CREATE INDEX IF NOT EXISTS idx_goap_actions_agent ON goap_actions(agent_type);\n CREATE INDEX IF NOT EXISTS idx_goap_plans_status ON goap_plans(status);\n CREATE INDEX IF NOT EXISTS idx_goap_sig_goal ON goap_plan_signatures(goal_hash);\n CREATE INDEX IF NOT EXISTS idx_goap_exec_steps_plan ON goap_execution_steps(plan_id);\n CREATE INDEX IF NOT EXISTS idx_goap_exec_steps_action ON goap_execution_steps(action_id);\n -- idx_goap_exec_steps_execution is NOT created here: databases with a\n -- pre-existing narrower goap_execution_steps table (missing execution_id)\n -- would fail on \"no such column\" since CREATE TABLE IF NOT EXISTS above\n -- silently no-ops against them. unified-memory.ts's v11 migration creates\n -- this index only after confirming/backfilling the column.\n";
|
|
17
17
|
export declare const DREAM_SCHEMA = "\n -- Concept Graph Nodes (Dream Engine)\n CREATE TABLE IF NOT EXISTS concept_nodes (\n id TEXT PRIMARY KEY,\n concept_type TEXT NOT NULL,\n content TEXT NOT NULL,\n embedding BLOB,\n activation_level REAL DEFAULT 0.0,\n last_activated TEXT,\n pattern_id TEXT,\n metadata TEXT,\n created_at TEXT DEFAULT (datetime('now'))\n );\n\n -- Concept Edges\n CREATE TABLE IF NOT EXISTS concept_edges (\n id TEXT PRIMARY KEY,\n source TEXT NOT NULL,\n target TEXT NOT NULL,\n weight REAL NOT NULL DEFAULT 1.0,\n edge_type TEXT NOT NULL,\n evidence INTEGER DEFAULT 1,\n created_at TEXT DEFAULT (datetime('now')),\n updated_at TEXT DEFAULT (datetime('now')),\n FOREIGN KEY (source) REFERENCES concept_nodes(id) ON DELETE CASCADE,\n FOREIGN KEY (target) REFERENCES concept_nodes(id) ON DELETE CASCADE\n );\n\n -- Dream Cycles\n CREATE TABLE IF NOT EXISTS dream_cycles (\n id TEXT PRIMARY KEY,\n start_time TEXT NOT NULL,\n end_time TEXT,\n duration_ms INTEGER,\n concepts_processed INTEGER DEFAULT 0,\n associations_found INTEGER DEFAULT 0,\n insights_generated INTEGER DEFAULT 0,\n status TEXT DEFAULT 'running',\n error TEXT,\n created_at TEXT DEFAULT (datetime('now'))\n );\n\n -- Dream Insights\n CREATE TABLE IF NOT EXISTS dream_insights (\n id TEXT PRIMARY KEY,\n cycle_id TEXT NOT NULL,\n insight_type TEXT NOT NULL,\n source_concepts TEXT NOT NULL,\n description TEXT NOT NULL,\n novelty_score REAL DEFAULT 0.5,\n confidence_score REAL DEFAULT 0.5,\n actionable INTEGER DEFAULT 0,\n applied INTEGER DEFAULT 0,\n suggested_action TEXT,\n pattern_id TEXT,\n created_at TEXT DEFAULT (datetime('now')),\n FOREIGN KEY (cycle_id) REFERENCES dream_cycles(id) ON DELETE CASCADE\n );\n\n -- Dream Indexes\n CREATE INDEX IF NOT EXISTS idx_concept_type ON concept_nodes(concept_type);\n CREATE INDEX IF NOT EXISTS idx_concept_activation ON concept_nodes(activation_level);\n CREATE INDEX IF NOT EXISTS idx_concept_pattern ON concept_nodes(pattern_id);\n CREATE INDEX IF NOT EXISTS idx_edge_source ON concept_edges(source);\n CREATE INDEX IF NOT EXISTS idx_edge_target ON concept_edges(target);\n CREATE INDEX IF NOT EXISTS idx_edge_type ON concept_edges(edge_type);\n CREATE INDEX IF NOT EXISTS idx_edge_weight ON concept_edges(weight DESC);\n CREATE INDEX IF NOT EXISTS idx_insight_cycle ON dream_insights(cycle_id);\n CREATE INDEX IF NOT EXISTS idx_dream_status ON dream_cycles(status);\n";
|
|
18
|
-
|
|
18
|
+
/** FTS5 external-content index over qe_patterns (hybrid vector/text search). */
|
|
19
|
+
export declare const QE_PATTERNS_FTS_TABLE_DDL = "\n CREATE VIRTUAL TABLE IF NOT EXISTS qe_patterns_fts USING fts5(\n name, description, pattern_type, qe_domain,\n content='qe_patterns',\n content_rowid='rowid'\n );\n";
|
|
20
|
+
/** Sync triggers keeping qe_patterns_fts in step with qe_patterns, keyed by name. */
|
|
21
|
+
export declare const QE_PATTERNS_FTS_TRIGGER_DDL: Readonly<Record<string, string>>;
|
|
22
|
+
/** FTS5 table plus all sync triggers (idempotent). Requires qe_patterns to exist. */
|
|
23
|
+
export declare const QE_PATTERNS_FTS_SCHEMA: string;
|
|
24
|
+
export declare const QE_PATTERNS_SCHEMA: string;
|
|
25
|
+
/**
|
|
26
|
+
* QE_PATTERNS_SCHEMA without the FTS5 table/triggers, for migrations that run
|
|
27
|
+
* after v9 on an existing DB. Re-creating the sync triggers there (with
|
|
28
|
+
* CREATE TRIGGER IF NOT EXISTS, no rebuild) would hide "triggers were missing"
|
|
29
|
+
* from the on-open self-heal, leaving UPDATE-only drift unrepaired; the heal
|
|
30
|
+
* creates any missing FTS objects and rebuilds instead.
|
|
31
|
+
*/
|
|
32
|
+
export declare const QE_PATTERNS_SCHEMA_WITHOUT_FTS: string;
|
|
19
33
|
export declare const MINCUT_SCHEMA = "\n -- MinCut Graph Snapshots (ADR-047)\n CREATE TABLE IF NOT EXISTS mincut_snapshots (\n id TEXT PRIMARY KEY,\n timestamp TEXT NOT NULL DEFAULT (datetime('now')),\n vertex_count INTEGER NOT NULL,\n edge_count INTEGER NOT NULL,\n total_weight REAL NOT NULL DEFAULT 0.0,\n is_connected INTEGER NOT NULL DEFAULT 1,\n component_count INTEGER NOT NULL DEFAULT 1,\n vertices_json TEXT NOT NULL,\n edges_json TEXT NOT NULL,\n created_at TEXT DEFAULT (datetime('now'))\n );\n\n -- MinCut History (time-series MinCut values)\n CREATE TABLE IF NOT EXISTS mincut_history (\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n timestamp TEXT NOT NULL DEFAULT (datetime('now')),\n mincut_value REAL NOT NULL,\n vertex_count INTEGER NOT NULL,\n edge_count INTEGER NOT NULL,\n algorithm TEXT NOT NULL DEFAULT 'weighted-degree',\n duration_ms INTEGER,\n snapshot_id TEXT,\n created_at TEXT DEFAULT (datetime('now')),\n FOREIGN KEY (snapshot_id) REFERENCES mincut_snapshots(id) ON DELETE SET NULL\n );\n\n -- MinCut Weak Vertices (detected bottlenecks)\n CREATE TABLE IF NOT EXISTS mincut_weak_vertices (\n id TEXT PRIMARY KEY,\n vertex_id TEXT NOT NULL,\n weighted_degree REAL NOT NULL,\n risk_score REAL NOT NULL,\n reason TEXT NOT NULL,\n domain TEXT,\n vertex_type TEXT NOT NULL,\n suggestions_json TEXT,\n detected_at TEXT NOT NULL DEFAULT (datetime('now')),\n resolved_at TEXT,\n snapshot_id TEXT,\n created_at TEXT DEFAULT (datetime('now')),\n FOREIGN KEY (snapshot_id) REFERENCES mincut_snapshots(id) ON DELETE SET NULL\n );\n\n -- MinCut Alerts\n CREATE TABLE IF NOT EXISTS mincut_alerts (\n id TEXT PRIMARY KEY,\n severity TEXT NOT NULL,\n message TEXT NOT NULL,\n mincut_value REAL NOT NULL,\n threshold REAL NOT NULL,\n affected_vertices_json TEXT,\n remediations_json TEXT,\n acknowledged INTEGER DEFAULT 0,\n acknowledged_at TEXT,\n acknowledged_by TEXT,\n timestamp TEXT NOT NULL DEFAULT (datetime('now')),\n created_at TEXT DEFAULT (datetime('now'))\n );\n\n -- MinCut Healing Actions (self-healing history)\n CREATE TABLE IF NOT EXISTS mincut_healing_actions (\n id TEXT PRIMARY KEY,\n action_type TEXT NOT NULL,\n action_params_json TEXT NOT NULL,\n success INTEGER NOT NULL,\n mincut_before REAL NOT NULL,\n mincut_after REAL NOT NULL,\n improvement REAL NOT NULL DEFAULT 0.0,\n error_message TEXT,\n duration_ms INTEGER NOT NULL,\n triggered_by TEXT,\n snapshot_before_id TEXT,\n snapshot_after_id TEXT,\n created_at TEXT DEFAULT (datetime('now')),\n FOREIGN KEY (snapshot_before_id) REFERENCES mincut_snapshots(id) ON DELETE SET NULL,\n FOREIGN KEY (snapshot_after_id) REFERENCES mincut_snapshots(id) ON DELETE SET NULL\n );\n\n -- MinCut Strange Loop Observations (P1: self-organizing)\n CREATE TABLE IF NOT EXISTS mincut_observations (\n id TEXT PRIMARY KEY,\n iteration INTEGER NOT NULL,\n mincut_value REAL NOT NULL,\n weak_vertex_count INTEGER NOT NULL DEFAULT 0,\n weak_vertices_json TEXT,\n snapshot_id TEXT,\n prediction_json TEXT,\n actual_vs_predicted_diff REAL,\n timestamp TEXT NOT NULL DEFAULT (datetime('now')),\n FOREIGN KEY (snapshot_id) REFERENCES mincut_snapshots(id) ON DELETE SET NULL\n );\n\n -- MinCut Indexes\n CREATE INDEX IF NOT EXISTS idx_mincut_history_timestamp ON mincut_history(timestamp DESC);\n CREATE INDEX IF NOT EXISTS idx_mincut_history_value ON mincut_history(mincut_value);\n CREATE INDEX IF NOT EXISTS idx_mincut_weak_vertex ON mincut_weak_vertices(vertex_id);\n CREATE INDEX IF NOT EXISTS idx_mincut_weak_risk ON mincut_weak_vertices(risk_score DESC);\n CREATE INDEX IF NOT EXISTS idx_mincut_weak_resolved ON mincut_weak_vertices(resolved_at);\n CREATE INDEX IF NOT EXISTS idx_mincut_alerts_severity ON mincut_alerts(severity);\n CREATE INDEX IF NOT EXISTS idx_mincut_alerts_ack ON mincut_alerts(acknowledged);\n CREATE INDEX IF NOT EXISTS idx_mincut_healing_type ON mincut_healing_actions(action_type);\n CREATE INDEX IF NOT EXISTS idx_mincut_healing_success ON mincut_healing_actions(success);\n CREATE INDEX IF NOT EXISTS idx_mincut_observations_iter ON mincut_observations(iteration);\n";
|
|
20
34
|
export declare const SONA_PATTERNS_SCHEMA = "\n -- SONA Patterns table (ADR-046: Pattern Persistence for Neural Backbone)\n CREATE TABLE IF NOT EXISTS sona_patterns (\n id TEXT PRIMARY KEY,\n type TEXT NOT NULL,\n domain TEXT NOT NULL,\n state_embedding BLOB,\n action_embedding BLOB,\n action_type TEXT NOT NULL,\n action_value TEXT,\n outcome_reward REAL NOT NULL DEFAULT 0.0,\n outcome_success INTEGER NOT NULL DEFAULT 0,\n outcome_quality REAL NOT NULL DEFAULT 0.0,\n confidence REAL DEFAULT 0.5,\n usage_count INTEGER DEFAULT 0,\n success_count INTEGER DEFAULT 0,\n failure_count INTEGER DEFAULT 0,\n metadata TEXT,\n created_at TEXT DEFAULT (datetime('now')),\n updated_at TEXT DEFAULT (datetime('now')),\n last_used_at TEXT\n );\n CREATE INDEX IF NOT EXISTS idx_sona_patterns_type ON sona_patterns(type);\n CREATE INDEX IF NOT EXISTS idx_sona_patterns_domain ON sona_patterns(domain);\n CREATE INDEX IF NOT EXISTS idx_sona_patterns_confidence ON sona_patterns(confidence DESC);\n CREATE INDEX IF NOT EXISTS idx_sona_patterns_updated ON sona_patterns(updated_at DESC);\n";
|
|
21
35
|
export declare const WITNESS_CHAIN_SCHEMA = "\n -- Witness Chain (ADR-070: Cryptographic audit trail for QE decisions)\n CREATE TABLE IF NOT EXISTS witness_chain (\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n prev_hash TEXT NOT NULL,\n action_hash TEXT NOT NULL,\n action_type TEXT NOT NULL,\n action_data TEXT,\n timestamp TEXT NOT NULL,\n actor TEXT NOT NULL\n );\n CREATE INDEX IF NOT EXISTS idx_witness_action_type ON witness_chain(action_type);\n CREATE INDEX IF NOT EXISTS idx_witness_timestamp ON witness_chain(timestamp);\n";
|
|
@@ -254,7 +254,48 @@ export const DREAM_SCHEMA = `
|
|
|
254
254
|
CREATE INDEX IF NOT EXISTS idx_insight_cycle ON dream_insights(cycle_id);
|
|
255
255
|
CREATE INDEX IF NOT EXISTS idx_dream_status ON dream_cycles(status);
|
|
256
256
|
`;
|
|
257
|
-
|
|
257
|
+
// ============================================================================
|
|
258
|
+
// qe_patterns FTS5 index (single source of truth)
|
|
259
|
+
// ============================================================================
|
|
260
|
+
//
|
|
261
|
+
// Shared by QE_PATTERNS_SCHEMA, the v9 migration, the legacy SQLitePatternStore
|
|
262
|
+
// schema and the on-open self-heal (pattern-fts-self-heal.ts), so the DDL can't
|
|
263
|
+
// drift between paths. External-content table: the index stores no text of its
|
|
264
|
+
// own and is kept in sync ONLY by the three triggers below.
|
|
265
|
+
/** FTS5 external-content index over qe_patterns (hybrid vector/text search). */
|
|
266
|
+
export const QE_PATTERNS_FTS_TABLE_DDL = `
|
|
267
|
+
CREATE VIRTUAL TABLE IF NOT EXISTS qe_patterns_fts USING fts5(
|
|
268
|
+
name, description, pattern_type, qe_domain,
|
|
269
|
+
content='qe_patterns',
|
|
270
|
+
content_rowid='rowid'
|
|
271
|
+
);
|
|
272
|
+
`;
|
|
273
|
+
/** Sync triggers keeping qe_patterns_fts in step with qe_patterns, keyed by name. */
|
|
274
|
+
export const QE_PATTERNS_FTS_TRIGGER_DDL = Object.freeze({
|
|
275
|
+
qe_patterns_fts_insert: `
|
|
276
|
+
CREATE TRIGGER IF NOT EXISTS qe_patterns_fts_insert AFTER INSERT ON qe_patterns BEGIN
|
|
277
|
+
INSERT INTO qe_patterns_fts(rowid, name, description, pattern_type, qe_domain)
|
|
278
|
+
VALUES (new.rowid, new.name, new.description, new.pattern_type, new.qe_domain);
|
|
279
|
+
END;
|
|
280
|
+
`,
|
|
281
|
+
qe_patterns_fts_delete: `
|
|
282
|
+
CREATE TRIGGER IF NOT EXISTS qe_patterns_fts_delete AFTER DELETE ON qe_patterns BEGIN
|
|
283
|
+
INSERT INTO qe_patterns_fts(qe_patterns_fts, rowid, name, description, pattern_type, qe_domain)
|
|
284
|
+
VALUES ('delete', old.rowid, old.name, old.description, old.pattern_type, old.qe_domain);
|
|
285
|
+
END;
|
|
286
|
+
`,
|
|
287
|
+
qe_patterns_fts_update: `
|
|
288
|
+
CREATE TRIGGER IF NOT EXISTS qe_patterns_fts_update AFTER UPDATE ON qe_patterns BEGIN
|
|
289
|
+
INSERT INTO qe_patterns_fts(qe_patterns_fts, rowid, name, description, pattern_type, qe_domain)
|
|
290
|
+
VALUES ('delete', old.rowid, old.name, old.description, old.pattern_type, old.qe_domain);
|
|
291
|
+
INSERT INTO qe_patterns_fts(rowid, name, description, pattern_type, qe_domain)
|
|
292
|
+
VALUES (new.rowid, new.name, new.description, new.pattern_type, new.qe_domain);
|
|
293
|
+
END;
|
|
294
|
+
`,
|
|
295
|
+
});
|
|
296
|
+
/** FTS5 table plus all sync triggers (idempotent). Requires qe_patterns to exist. */
|
|
297
|
+
export const QE_PATTERNS_FTS_SCHEMA = QE_PATTERNS_FTS_TABLE_DDL + Object.values(QE_PATTERNS_FTS_TRIGGER_DDL).join('');
|
|
298
|
+
const qePatternsSchema = (ftsSchema) => `
|
|
258
299
|
-- QE Patterns table (unified from sqlite-persistence.ts)
|
|
259
300
|
CREATE TABLE IF NOT EXISTS qe_patterns (
|
|
260
301
|
id TEXT PRIMARY KEY,
|
|
@@ -367,30 +408,8 @@ export const QE_PATTERNS_SCHEMA = `
|
|
|
367
408
|
FOREIGN KEY (execution_id) REFERENCES execution_results(id)
|
|
368
409
|
);
|
|
369
410
|
|
|
370
|
-
-- FTS5 full-text search index for hybrid vector/text search
|
|
371
|
-
|
|
372
|
-
name, description, pattern_type, qe_domain,
|
|
373
|
-
content='qe_patterns',
|
|
374
|
-
content_rowid='rowid'
|
|
375
|
-
);
|
|
376
|
-
|
|
377
|
-
-- FTS5 triggers to keep index in sync
|
|
378
|
-
CREATE TRIGGER IF NOT EXISTS qe_patterns_fts_insert AFTER INSERT ON qe_patterns BEGIN
|
|
379
|
-
INSERT INTO qe_patterns_fts(rowid, name, description, pattern_type, qe_domain)
|
|
380
|
-
VALUES (new.rowid, new.name, new.description, new.pattern_type, new.qe_domain);
|
|
381
|
-
END;
|
|
382
|
-
|
|
383
|
-
CREATE TRIGGER IF NOT EXISTS qe_patterns_fts_delete AFTER DELETE ON qe_patterns BEGIN
|
|
384
|
-
INSERT INTO qe_patterns_fts(qe_patterns_fts, rowid, name, description, pattern_type, qe_domain)
|
|
385
|
-
VALUES ('delete', old.rowid, old.name, old.description, old.pattern_type, old.qe_domain);
|
|
386
|
-
END;
|
|
387
|
-
|
|
388
|
-
CREATE TRIGGER IF NOT EXISTS qe_patterns_fts_update AFTER UPDATE ON qe_patterns BEGIN
|
|
389
|
-
INSERT INTO qe_patterns_fts(qe_patterns_fts, rowid, name, description, pattern_type, qe_domain)
|
|
390
|
-
VALUES ('delete', old.rowid, old.name, old.description, old.pattern_type, old.qe_domain);
|
|
391
|
-
INSERT INTO qe_patterns_fts(rowid, name, description, pattern_type, qe_domain)
|
|
392
|
-
VALUES (new.rowid, new.name, new.description, new.pattern_type, new.qe_domain);
|
|
393
|
-
END;
|
|
411
|
+
-- FTS5 full-text search index + sync triggers for hybrid vector/text search
|
|
412
|
+
${ftsSchema}
|
|
394
413
|
|
|
395
414
|
-- QE Patterns indexes
|
|
396
415
|
CREATE INDEX IF NOT EXISTS idx_qe_patterns_domain ON qe_patterns(qe_domain);
|
|
@@ -407,6 +426,15 @@ export const QE_PATTERNS_SCHEMA = `
|
|
|
407
426
|
CREATE INDEX IF NOT EXISTS idx_executed_steps_execution ON executed_steps(execution_id);
|
|
408
427
|
CREATE INDEX IF NOT EXISTS idx_executed_steps_action ON executed_steps(action_id);
|
|
409
428
|
`;
|
|
429
|
+
export const QE_PATTERNS_SCHEMA = qePatternsSchema(QE_PATTERNS_FTS_SCHEMA);
|
|
430
|
+
/**
|
|
431
|
+
* QE_PATTERNS_SCHEMA without the FTS5 table/triggers, for migrations that run
|
|
432
|
+
* after v9 on an existing DB. Re-creating the sync triggers there (with
|
|
433
|
+
* CREATE TRIGGER IF NOT EXISTS, no rebuild) would hide "triggers were missing"
|
|
434
|
+
* from the on-open self-heal, leaving UPDATE-only drift unrepaired; the heal
|
|
435
|
+
* creates any missing FTS objects and rebuilds instead.
|
|
436
|
+
*/
|
|
437
|
+
export const QE_PATTERNS_SCHEMA_WITHOUT_FTS = qePatternsSchema('');
|
|
410
438
|
export const MINCUT_SCHEMA = `
|
|
411
439
|
-- MinCut Graph Snapshots (ADR-047)
|
|
412
440
|
CREATE TABLE IF NOT EXISTS mincut_snapshots (
|
|
@@ -41,7 +41,8 @@ export { BinaryHeap, UnifiedHnswIndex, createHnswIndex } from './unified-memory-
|
|
|
41
41
|
// parity tests or benchmarks only.
|
|
42
42
|
import { UnifiedHnswIndex } from './unified-memory-hnsw.js';
|
|
43
43
|
// Import schemas
|
|
44
|
-
import { SCHEMA_VERSION, SCHEMA_VERSION_TABLE, KV_STORE_SCHEMA, VECTORS_SCHEMA, RL_QVALUES_SCHEMA, GOAP_SCHEMA, DREAM_SCHEMA, QE_PATTERNS_SCHEMA, MINCUT_SCHEMA, SONA_PATTERNS_SCHEMA, FEEDBACK_SCHEMA, HYPERGRAPH_SCHEMA, PATTERN_NULLS_SCHEMA, STATS_TABLES, } from './unified-memory-schemas.js';
|
|
44
|
+
import { SCHEMA_VERSION, SCHEMA_VERSION_TABLE, KV_STORE_SCHEMA, VECTORS_SCHEMA, RL_QVALUES_SCHEMA, GOAP_SCHEMA, DREAM_SCHEMA, QE_PATTERNS_SCHEMA, QE_PATTERNS_FTS_SCHEMA, QE_PATTERNS_SCHEMA_WITHOUT_FTS, MINCUT_SCHEMA, SONA_PATTERNS_SCHEMA, FEEDBACK_SCHEMA, HYPERGRAPH_SCHEMA, PATTERN_NULLS_SCHEMA, STATS_TABLES, } from './unified-memory-schemas.js';
|
|
45
|
+
import { ensurePatternFtsInSync } from './pattern-fts-self-heal.js';
|
|
45
46
|
import { applyMigration as applyLearningEvidenceMigration } from '../migrations/20260830_add_learning_evidence_tables.js';
|
|
46
47
|
// CRDT imports for distributed state synchronization
|
|
47
48
|
import { createCRDTStore, } from '../memory/crdt/index.js';
|
|
@@ -55,6 +56,7 @@ import { createCRDTStore, } from '../memory/crdt/index.js';
|
|
|
55
56
|
// working unchanged. Imported (not bare re-exported) so internal callers below
|
|
56
57
|
// have a usable local binding.
|
|
57
58
|
import { findProjectRoot, clearProjectRootCache } from './project-root.js';
|
|
59
|
+
import { registerStoreCloser, requestOwnedShutdown } from './process-lifecycle.js';
|
|
58
60
|
export { findProjectRoot, clearProjectRootCache };
|
|
59
61
|
/**
|
|
60
62
|
* Get the default database path using project root detection.
|
|
@@ -276,6 +278,9 @@ export class UnifiedMemoryManager {
|
|
|
276
278
|
signal.throwIfAborted();
|
|
277
279
|
}
|
|
278
280
|
await this.runMigrations();
|
|
281
|
+
// Not gated on schema version: repairs missing qe_patterns_fts sync
|
|
282
|
+
// triggers / index drift on every open. Never throws; silent when healthy.
|
|
283
|
+
ensurePatternFtsInSync(this.db, { logPrefix: '[UnifiedMemory]' });
|
|
279
284
|
signal?.throwIfAborted();
|
|
280
285
|
// DATA LOSS PREVENTION: After migration, if the DB existed before and was
|
|
281
286
|
// large (>1MB = has real data), but now qe_patterns is empty, something
|
|
@@ -451,36 +456,13 @@ export class UnifiedMemoryManager {
|
|
|
451
456
|
if (currentVersion < 8)
|
|
452
457
|
this.db.exec(FEEDBACK_SCHEMA);
|
|
453
458
|
if (currentVersion < 9) {
|
|
454
|
-
// Add FTS5 full-text search for qe_patterns (hybrid vector/text search)
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
CREATE TRIGGER IF NOT EXISTS qe_patterns_fts_insert AFTER INSERT ON qe_patterns BEGIN
|
|
463
|
-
INSERT INTO qe_patterns_fts(rowid, name, description, pattern_type, qe_domain)
|
|
464
|
-
VALUES (new.rowid, new.name, new.description, new.pattern_type, new.qe_domain);
|
|
465
|
-
END;
|
|
466
|
-
|
|
467
|
-
CREATE TRIGGER IF NOT EXISTS qe_patterns_fts_delete AFTER DELETE ON qe_patterns BEGIN
|
|
468
|
-
INSERT INTO qe_patterns_fts(qe_patterns_fts, rowid, name, description, pattern_type, qe_domain)
|
|
469
|
-
VALUES ('delete', old.rowid, old.name, old.description, old.pattern_type, old.qe_domain);
|
|
470
|
-
END;
|
|
471
|
-
|
|
472
|
-
CREATE TRIGGER IF NOT EXISTS qe_patterns_fts_update AFTER UPDATE ON qe_patterns BEGIN
|
|
473
|
-
INSERT INTO qe_patterns_fts(qe_patterns_fts, rowid, name, description, pattern_type, qe_domain)
|
|
474
|
-
VALUES ('delete', old.rowid, old.name, old.description, old.pattern_type, old.qe_domain);
|
|
475
|
-
INSERT INTO qe_patterns_fts(rowid, name, description, pattern_type, qe_domain)
|
|
476
|
-
VALUES (new.rowid, new.name, new.description, new.pattern_type, new.qe_domain);
|
|
477
|
-
END;
|
|
478
|
-
`);
|
|
479
|
-
// Populate FTS5 index from existing patterns
|
|
480
|
-
this.db.exec(`
|
|
481
|
-
INSERT INTO qe_patterns_fts(rowid, name, description, pattern_type, qe_domain)
|
|
482
|
-
SELECT rowid, name, description, pattern_type, qe_domain FROM qe_patterns;
|
|
483
|
-
`);
|
|
459
|
+
// Add FTS5 full-text search for qe_patterns (hybrid vector/text search).
|
|
460
|
+
// DDL shared with QE_PATTERNS_SCHEMA and the on-open self-heal.
|
|
461
|
+
this.db.exec(QE_PATTERNS_FTS_SCHEMA);
|
|
462
|
+
// Populate the index from existing patterns. 'rebuild' rather than a
|
|
463
|
+
// raw INSERT...SELECT so it's idempotent when QE_PATTERNS_SCHEMA's
|
|
464
|
+
// triggers already indexed some rows.
|
|
465
|
+
this.db.exec(`INSERT INTO qe_patterns_fts(qe_patterns_fts) VALUES('rebuild')`);
|
|
484
466
|
}
|
|
485
467
|
if (currentVersion < 10)
|
|
486
468
|
this.db.exec(PATTERN_NULLS_SCHEMA);
|
|
@@ -810,7 +792,9 @@ export class UnifiedMemoryManager {
|
|
|
810
792
|
const db = this.db;
|
|
811
793
|
const table = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='qe_pattern_embeddings'").get();
|
|
812
794
|
if (!table) {
|
|
813
|
-
|
|
795
|
+
// FTS objects are left to ensurePatternFtsInSync (runs after migrations)
|
|
796
|
+
// so missing triggers are still seen and the index is rebuilt.
|
|
797
|
+
db.exec(QE_PATTERNS_SCHEMA_WITHOUT_FTS);
|
|
814
798
|
return;
|
|
815
799
|
}
|
|
816
800
|
const columns = db.prepare("PRAGMA table_info('qe_pattern_embeddings')").all();
|
|
@@ -1091,8 +1075,21 @@ function registerExitHandlers() {
|
|
|
1091
1075
|
}
|
|
1092
1076
|
};
|
|
1093
1077
|
process.on('beforeExit', cleanup);
|
|
1094
|
-
|
|
1095
|
-
|
|
1078
|
+
// A claimed lifecycle owner (the MCP server) closes this store at the end of
|
|
1079
|
+
// its shutdown on every path (EOF, JSON-RPC shutdown, signals, watchdog), so
|
|
1080
|
+
// the WAL is checkpointed into memory.db. close() is idempotent.
|
|
1081
|
+
registerStoreCloser(cleanup);
|
|
1082
|
+
const onSignal = (signal) => {
|
|
1083
|
+
// #801: when a lifecycle owner is claimed, its graceful shutdown may still
|
|
1084
|
+
// need this store, and exiting here would pre-empt it. The owner closes it
|
|
1085
|
+
// through the closer registered above.
|
|
1086
|
+
if (requestOwnedShutdown(signal))
|
|
1087
|
+
return;
|
|
1088
|
+
cleanup();
|
|
1089
|
+
process.exit(0);
|
|
1090
|
+
};
|
|
1091
|
+
process.on('SIGINT', onSignal);
|
|
1092
|
+
process.on('SIGTERM', onSignal);
|
|
1096
1093
|
}
|
|
1097
1094
|
registerExitHandlers();
|
|
1098
1095
|
//# sourceMappingURL=unified-memory.js.map
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
import { toErrorMessage } from '../shared/error-utils.js';
|
|
22
22
|
import { getUnifiedMemory, resetUnifiedMemory, DEFAULT_UNIFIED_MEMORY_CONFIG, } from './unified-memory.js';
|
|
23
23
|
import { MEMORY_CONSTANTS } from './constants.js';
|
|
24
|
+
import { registerStoreCloser, requestOwnedShutdown } from './process-lifecycle.js';
|
|
24
25
|
// Use same path as unified-memory for true unification
|
|
25
26
|
export const DEFAULT_UNIFIED_CONFIG = {
|
|
26
27
|
dbPath: DEFAULT_UNIFIED_MEMORY_CONFIG.dbPath, // '.agentic-qe/memory.db'
|
|
@@ -254,14 +255,19 @@ function registerExitHandlers() {
|
|
|
254
255
|
}
|
|
255
256
|
};
|
|
256
257
|
process.on('beforeExit', cleanup);
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
258
|
+
// Closed by a claimed lifecycle owner (the MCP server) at the end of its
|
|
259
|
+
// shutdown on every path; registered after unified memory, so it closes first.
|
|
260
|
+
registerStoreCloser(cleanup);
|
|
261
|
+
const onSignal = (signal) => {
|
|
262
|
+
// #801: defer to a claimed lifecycle owner instead of exiting under its
|
|
263
|
+
// graceful shutdown; the owner closes the facade via the closer above.
|
|
264
|
+
if (requestOwnedShutdown(signal))
|
|
265
|
+
return;
|
|
262
266
|
cleanup();
|
|
263
267
|
process.exit(0);
|
|
264
|
-
}
|
|
268
|
+
};
|
|
269
|
+
process.on('SIGINT', onSignal);
|
|
270
|
+
process.on('SIGTERM', onSignal);
|
|
265
271
|
}
|
|
266
272
|
// Register exit handlers when module is loaded
|
|
267
273
|
registerExitHandlers();
|
|
@@ -301,8 +301,9 @@ export declare class ExperienceCaptureService {
|
|
|
301
301
|
*/
|
|
302
302
|
private detectPatternType;
|
|
303
303
|
/**
|
|
304
|
-
*
|
|
304
|
+
* Stable lookup identity; verify full origin metadata before reinforcement.
|
|
305
305
|
*/
|
|
306
|
+
private experienceIdentity;
|
|
306
307
|
private generatePatternName;
|
|
307
308
|
/**
|
|
308
309
|
* Extract tags from experience
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
* - Pattern promotion after threshold uses
|
|
13
13
|
* - Cross-domain experience sharing
|
|
14
14
|
*/
|
|
15
|
+
import { createHash } from 'node:crypto';
|
|
15
16
|
import { v4 as uuidv4 } from 'uuid';
|
|
16
17
|
import { ok, err } from '../shared/types/index.js';
|
|
17
18
|
import { LoggerFactory } from '../logging/index.js';
|
|
@@ -373,16 +374,23 @@ export class ExperienceCaptureService {
|
|
|
373
374
|
if (!this.patternStore) {
|
|
374
375
|
return { newPattern: false, reinforced: false, promoted: false };
|
|
375
376
|
}
|
|
376
|
-
//
|
|
377
|
-
|
|
377
|
+
// Reinforcement records repeated observations of the exact originating task;
|
|
378
|
+
// lexical relevance is not a semantic reuse oracle.
|
|
379
|
+
const identity = this.experienceIdentity(experience);
|
|
380
|
+
const searchResult = await this.patternStore.search(identity, {
|
|
378
381
|
limit: 1,
|
|
379
382
|
domain: experience.domain,
|
|
380
|
-
|
|
383
|
+
patternType: this.detectPatternType(experience.task),
|
|
384
|
+
useVectorSearch: false,
|
|
381
385
|
});
|
|
382
386
|
if (searchResult.success && searchResult.value.length > 0) {
|
|
383
387
|
const existing = searchResult.value[0];
|
|
384
|
-
|
|
385
|
-
if (
|
|
388
|
+
const origin = existing.pattern.context?.experienceOrigin;
|
|
389
|
+
if (origin?.task === experience.task
|
|
390
|
+
&& origin.domain === (experience.domain ?? null)
|
|
391
|
+
&& origin.patternType === this.detectPatternType(experience.task)
|
|
392
|
+
&& existing.pattern.patternType === origin.patternType
|
|
393
|
+
&& (!experience.domain || existing.pattern.qeDomain === experience.domain)) {
|
|
386
394
|
const usageResult = await this.patternStore.recordUsage(existing.pattern.id, experience.success);
|
|
387
395
|
// Check if pattern should be promoted (short-term → long-term)
|
|
388
396
|
const pattern = await this.patternStore.get(existing.pattern.id);
|
|
@@ -590,10 +598,12 @@ ${stepDescriptions}
|
|
|
590
598
|
Duration: ${experience.durationMs}ms`;
|
|
591
599
|
return {
|
|
592
600
|
patternType,
|
|
601
|
+
qeDomain: experience.domain,
|
|
593
602
|
name: this.generatePatternName(experience),
|
|
594
603
|
description: `Pattern extracted from: ${experience.task}`,
|
|
595
604
|
context: {
|
|
596
|
-
tags: this.extractTags(experience),
|
|
605
|
+
tags: [...this.extractTags(experience), this.experienceIdentity(experience)],
|
|
606
|
+
experienceOrigin: { task: experience.task, domain: experience.domain ?? null, patternType },
|
|
597
607
|
testType: this.detectTestType(experience.task),
|
|
598
608
|
},
|
|
599
609
|
template: {
|
|
@@ -657,8 +667,13 @@ Duration: ${experience.durationMs}ms`;
|
|
|
657
667
|
return 'test-template'; // Default
|
|
658
668
|
}
|
|
659
669
|
/**
|
|
660
|
-
*
|
|
670
|
+
* Stable lookup identity; verify full origin metadata before reinforcement.
|
|
661
671
|
*/
|
|
672
|
+
experienceIdentity(experience) {
|
|
673
|
+
return createHash('sha256').update(JSON.stringify([
|
|
674
|
+
experience.task, experience.domain ?? null, this.detectPatternType(experience.task),
|
|
675
|
+
])).digest('hex');
|
|
676
|
+
}
|
|
662
677
|
generatePatternName(experience) {
|
|
663
678
|
// Take first 50 chars of task, sanitize
|
|
664
679
|
const sanitized = experience.task
|
|
@@ -666,7 +681,7 @@ Duration: ${experience.durationMs}ms`;
|
|
|
666
681
|
.slice(0, 50)
|
|
667
682
|
.trim();
|
|
668
683
|
const domain = experience.domain ? `[${experience.domain}] ` : '';
|
|
669
|
-
return `${domain}${sanitized}`;
|
|
684
|
+
return `${domain}${sanitized} ${this.experienceIdentity(experience)}`;
|
|
670
685
|
}
|
|
671
686
|
/**
|
|
672
687
|
* Extract tags from experience
|
|
@@ -155,7 +155,7 @@ export interface PatternSearchResult {
|
|
|
155
155
|
/** Match score (0-1) */
|
|
156
156
|
score: number;
|
|
157
157
|
/** How the pattern was matched */
|
|
158
|
-
matchType: 'vector' | 'exact' | 'context';
|
|
158
|
+
matchType: 'vector' | 'exact' | 'lexical' | 'context';
|
|
159
159
|
/** Similarity score for vector matches (ADR-042) */
|
|
160
160
|
similarity: number;
|
|
161
161
|
/** Whether this pattern can be reused to skip LLM calls (ADR-042) */
|
|
@@ -60,10 +60,12 @@ function getHDCTokenFingerprinter() {
|
|
|
60
60
|
/** Module-level Hopfield memory for exact pattern recall */
|
|
61
61
|
let hopfieldMemory = null;
|
|
62
62
|
let hopfieldDimension = 0;
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
let hopfieldSpaceId;
|
|
64
|
+
function getHopfieldMemory(dimension, spaceId) {
|
|
65
|
+
if (!hopfieldMemory || hopfieldDimension !== dimension || hopfieldSpaceId !== spaceId) {
|
|
65
66
|
hopfieldMemory = createHopfieldMemory({ dimension, maxPatterns: 10000 });
|
|
66
67
|
hopfieldDimension = dimension;
|
|
68
|
+
hopfieldSpaceId = spaceId;
|
|
67
69
|
}
|
|
68
70
|
return hopfieldMemory;
|
|
69
71
|
}
|
|
@@ -564,9 +566,9 @@ export class PatternStore {
|
|
|
564
566
|
console.debug(`[PatternStore] HDC token fingerprint failed for ${pattern.id}:`, toErrorMessage(error));
|
|
565
567
|
}
|
|
566
568
|
// R5: Store embedding in Hopfield memory for exact recall
|
|
567
|
-
if (isHopfieldMemoryEnabled() && pattern.embedding) {
|
|
569
|
+
if (isHopfieldMemoryEnabled() && pattern.embedding && activeSpaceId) {
|
|
568
570
|
try {
|
|
569
|
-
const hopfield = getHopfieldMemory(pattern.embedding.length);
|
|
571
|
+
const hopfield = getHopfieldMemory(pattern.embedding.length, activeSpaceId);
|
|
570
572
|
hopfield.store(new Float32Array(pattern.embedding), {
|
|
571
573
|
id: pattern.id,
|
|
572
574
|
name: pattern.name,
|
|
@@ -717,10 +719,14 @@ export class PatternStore {
|
|
|
717
719
|
const limit = options.limit || 10;
|
|
718
720
|
const results = [];
|
|
719
721
|
try {
|
|
722
|
+
const activeSpaceId = getActiveEmbeddingSpaceIdentity()?.spaceId ?? this.config.embeddingSpaceId;
|
|
723
|
+
if (Array.isArray(query) && (!activeSpaceId || options.embeddingSpaceId !== activeSpaceId)) {
|
|
724
|
+
throw new Error('VECTOR_SPACE_UNVERIFIED: pre-computed query vectors require the active embeddingSpaceId');
|
|
725
|
+
}
|
|
720
726
|
// R5: Exact recall via Hopfield — check for high-confidence exact match
|
|
721
|
-
if (Array.isArray(query) && isHopfieldMemoryEnabled()) {
|
|
727
|
+
if (Array.isArray(query) && options.useVectorSearch !== false && activeSpaceId && isHopfieldMemoryEnabled()) {
|
|
722
728
|
try {
|
|
723
|
-
const hopfield = getHopfieldMemory(query.length);
|
|
729
|
+
const hopfield = getHopfieldMemory(query.length, activeSpaceId);
|
|
724
730
|
if (hopfield.getPatternCount() > 0) {
|
|
725
731
|
const recallResult = hopfield.recall(new Float32Array(query));
|
|
726
732
|
if (recallResult && recallResult.similarity > 0.98) {
|
|
@@ -747,10 +753,6 @@ export class PatternStore {
|
|
|
747
753
|
}
|
|
748
754
|
// Vector search if query is embedding and HNSW available (lazy-load)
|
|
749
755
|
if (Array.isArray(query) && options.useVectorSearch !== false) {
|
|
750
|
-
const activeSpaceId = getActiveEmbeddingSpaceIdentity()?.spaceId ?? this.config.embeddingSpaceId;
|
|
751
|
-
if (!activeSpaceId || options.embeddingSpaceId !== activeSpaceId) {
|
|
752
|
-
throw new Error('VECTOR_SPACE_UNVERIFIED: pre-computed query vectors require the active embeddingSpaceId');
|
|
753
|
-
}
|
|
754
756
|
const hnsw = await this.ensureHNSW();
|
|
755
757
|
if (hnsw) {
|
|
756
758
|
const hnswResults = await hnsw.search(query, limit * 2);
|
|
@@ -778,7 +780,7 @@ export class PatternStore {
|
|
|
778
780
|
try {
|
|
779
781
|
const ftsResults = this.sqliteStore.searchFTS(ftsText, limit * 2);
|
|
780
782
|
if (ftsResults.length > 0) {
|
|
781
|
-
const ftsScoreMap = new Map(ftsResults.map(r => [r.id, r.ftsScore]));
|
|
783
|
+
const ftsScoreMap = new Map(ftsResults.map(r => [r.id, r.ftsScore * r.coverage]));
|
|
782
784
|
const existingIds = new Set(results.map(r => r.pattern.id));
|
|
783
785
|
// Boost existing vector results that also match FTS5
|
|
784
786
|
for (const result of results) {
|
|
@@ -793,22 +795,18 @@ export class PatternStore {
|
|
|
793
795
|
continue;
|
|
794
796
|
const pattern = await this.get(ftsResult.id);
|
|
795
797
|
if (pattern && this.matchesFilters(pattern, options)) {
|
|
796
|
-
//
|
|
797
|
-
//
|
|
798
|
-
// report the conservative keyword score as their similarity.
|
|
799
|
-
// Scaled by query-term coverage so the best of a weak lexical
|
|
800
|
-
// set (e.g. one shared stopword) cannot outrank vector hits.
|
|
798
|
+
// Relative BM25 is weighted by query coverage for ranking;
|
|
799
|
+
// lexical evidence alone never authorizes vector reuse.
|
|
801
800
|
const keywordScore = 0.5 * ftsResult.ftsScore * ftsResult.coverage;
|
|
802
|
-
const similarity =
|
|
803
|
-
const reuseInfo = this.calculateReuseInfo(pattern, similarity);
|
|
801
|
+
const similarity = 0; // Lexical relevance is not vector similarity or safe reuse.
|
|
804
802
|
results.push({
|
|
805
803
|
pattern,
|
|
806
|
-
score: keywordScore,
|
|
807
|
-
matchType: '
|
|
804
|
+
score: keywordScore,
|
|
805
|
+
matchType: 'lexical',
|
|
808
806
|
similarity,
|
|
809
|
-
canReuse:
|
|
810
|
-
estimatedTokenSavings:
|
|
811
|
-
reuseConfidence:
|
|
807
|
+
canReuse: false,
|
|
808
|
+
estimatedTokenSavings: 0,
|
|
809
|
+
reuseConfidence: 0,
|
|
812
810
|
});
|
|
813
811
|
}
|
|
814
812
|
}
|
|
@@ -974,15 +972,14 @@ export class PatternStore {
|
|
|
974
972
|
score = pattern.qualityScore;
|
|
975
973
|
}
|
|
976
974
|
if (score > 0 || !queryLower) {
|
|
977
|
-
const reuseInfo = this.calculateReuseInfo(pattern, score);
|
|
978
975
|
results.push({
|
|
979
976
|
pattern,
|
|
980
|
-
score: score
|
|
981
|
-
matchType: queryLower ? '
|
|
982
|
-
similarity:
|
|
983
|
-
canReuse:
|
|
984
|
-
estimatedTokenSavings:
|
|
985
|
-
reuseConfidence:
|
|
977
|
+
score: queryLower ? 0.5 * score : pattern.qualityScore,
|
|
978
|
+
matchType: queryLower ? 'lexical' : 'context',
|
|
979
|
+
similarity: 0,
|
|
980
|
+
canReuse: false,
|
|
981
|
+
estimatedTokenSavings: 0,
|
|
982
|
+
reuseConfidence: 0,
|
|
986
983
|
});
|
|
987
984
|
}
|
|
988
985
|
}
|
|
@@ -111,6 +111,12 @@ export interface QEPattern {
|
|
|
111
111
|
* Pattern applicability context
|
|
112
112
|
*/
|
|
113
113
|
export interface QEPatternContext {
|
|
114
|
+
/** Exact originating experience; reinforcement identity, never a similarity claim. */
|
|
115
|
+
readonly experienceOrigin?: {
|
|
116
|
+
task: string;
|
|
117
|
+
domain: QEDomain | null;
|
|
118
|
+
patternType: QEPatternType;
|
|
119
|
+
};
|
|
114
120
|
/** Programming language this pattern applies to */
|
|
115
121
|
readonly language?: ProgrammingLanguage;
|
|
116
122
|
/** Test framework this pattern uses */
|
|
@@ -48,6 +48,7 @@ export declare class QEReasoningBank implements IQEReasoningBank {
|
|
|
48
48
|
private readonly eventBus?;
|
|
49
49
|
private readonly coherenceService?;
|
|
50
50
|
private readonly config;
|
|
51
|
+
private readonly embeddingProvenance;
|
|
51
52
|
private patternStore;
|
|
52
53
|
private initialized;
|
|
53
54
|
private sqliteStore;
|
|
@@ -64,6 +64,7 @@ export class QEReasoningBank {
|
|
|
64
64
|
eventBus;
|
|
65
65
|
coherenceService;
|
|
66
66
|
config;
|
|
67
|
+
embeddingProvenance = new WeakMap();
|
|
67
68
|
patternStore;
|
|
68
69
|
initialized = false;
|
|
69
70
|
sqliteStore = null;
|
|
@@ -337,7 +338,11 @@ export class QEReasoningBank {
|
|
|
337
338
|
searchQuery = '';
|
|
338
339
|
}
|
|
339
340
|
else {
|
|
340
|
-
|
|
341
|
+
const embedding = await this.embed(query);
|
|
342
|
+
// Hash fallback and resized vectors do not belong to the active provider.
|
|
343
|
+
// Keep their text searchable without claiming semantic comparability.
|
|
344
|
+
searchQuery = this.embeddingProvenance.has(embedding) ? embedding : query;
|
|
345
|
+
useVectorSearch = Array.isArray(searchQuery);
|
|
341
346
|
}
|
|
342
347
|
}
|
|
343
348
|
return this.patternStore.search(searchQuery, {
|
|
@@ -346,7 +351,7 @@ export class QEReasoningBank {
|
|
|
346
351
|
textQuery: typeof query === 'string' && query.trim() ? query : options?.textQuery,
|
|
347
352
|
useVectorSearch,
|
|
348
353
|
embeddingSpaceId: typeof query === 'string'
|
|
349
|
-
?
|
|
354
|
+
? (Array.isArray(searchQuery) ? this.embeddingProvenance.get(searchQuery) : undefined)
|
|
350
355
|
: options?.embeddingSpaceId,
|
|
351
356
|
});
|
|
352
357
|
}
|
|
@@ -442,11 +447,13 @@ export class QEReasoningBank {
|
|
|
442
447
|
}
|
|
443
448
|
// 2. Search for similar patterns
|
|
444
449
|
const embedding = await this.embed(request.task);
|
|
445
|
-
const
|
|
450
|
+
const embeddingSpaceId = this.embeddingProvenance.get(embedding);
|
|
451
|
+
const patternResults = await this.patternStore.search(embeddingSpaceId ? embedding : request.task, {
|
|
446
452
|
limit: this.config.maxRoutingCandidates,
|
|
447
453
|
domain: detectedDomains[0],
|
|
448
|
-
useVectorSearch:
|
|
454
|
+
useVectorSearch: Boolean(embeddingSpaceId),
|
|
449
455
|
textQuery: request.task,
|
|
456
|
+
embeddingSpaceId,
|
|
450
457
|
});
|
|
451
458
|
const patterns = patternResults.success
|
|
452
459
|
? patternResults.value.map((r) => r.pattern)
|
|
@@ -607,6 +614,9 @@ export class QEReasoningBank {
|
|
|
607
614
|
if (embedding.length !== this.config.embeddingDimension) {
|
|
608
615
|
return resizeEmbedding(embedding, this.config.embeddingDimension);
|
|
609
616
|
}
|
|
617
|
+
const spaceId = getActiveEmbeddingSpaceIdentity()?.spaceId;
|
|
618
|
+
if (spaceId)
|
|
619
|
+
this.embeddingProvenance.set(embedding, spaceId);
|
|
610
620
|
return embedding;
|
|
611
621
|
}
|
|
612
622
|
catch (error) {
|
|
@@ -30,6 +30,14 @@ export interface RealQEReasoningBankConfig {
|
|
|
30
30
|
coherenceThreshold?: number;
|
|
31
31
|
}
|
|
32
32
|
export declare const DEFAULT_REAL_CONFIG: RealQEReasoningBankConfig;
|
|
33
|
+
/** Ranking evidence keeps lexical relevance separate from vector reuse safety. */
|
|
34
|
+
export interface RealQEPatternSearchResult {
|
|
35
|
+
pattern: QEPattern;
|
|
36
|
+
score: number;
|
|
37
|
+
similarity: number;
|
|
38
|
+
matchType: 'vector' | 'lexical';
|
|
39
|
+
canReuse: boolean;
|
|
40
|
+
}
|
|
33
41
|
export interface RealQERoutingRequest {
|
|
34
42
|
task: string;
|
|
35
43
|
taskType?: 'test-generation' | 'analysis' | 'debugging' | 'optimization';
|
|
@@ -144,10 +152,7 @@ export declare class RealQEReasoningBank {
|
|
|
144
152
|
limit?: number;
|
|
145
153
|
domain?: QEDomain;
|
|
146
154
|
minSimilarity?: number;
|
|
147
|
-
}): Promise<Result<
|
|
148
|
-
pattern: QEPattern;
|
|
149
|
-
similarity: number;
|
|
150
|
-
}>>>;
|
|
155
|
+
}): Promise<Result<RealQEPatternSearchResult[]>>;
|
|
151
156
|
/**
|
|
152
157
|
* Route a task to optimal agent
|
|
153
158
|
*/
|