agentic-qe 3.9.0 → 3.9.2
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 +43 -0
- package/dist/audit/witness-chain.d.ts +1 -1
- package/dist/cli/bundle.js +8 -8
- package/dist/cli/chunks/adapter-53WBPKXU.js +2 -0
- package/dist/cli/chunks/{agent-booster-wasm-PQYB7VRU.js → agent-booster-wasm-AKAOHSCX.js} +2 -2
- package/dist/cli/chunks/{agent-handler-QDAB5NQS.js → agent-handler-MTGPOUVP.js} +2 -2
- package/dist/cli/chunks/agent-memory-branch-UFPKWUFK.js +2 -0
- package/dist/cli/chunks/aqe-learning-engine-MV7NGY24.js +2 -0
- package/dist/cli/chunks/{audit-S7JUYYVP.js → audit-VBEZHNHO.js} +2 -2
- package/dist/cli/chunks/base-DZVGMQN2.js +2 -0
- package/dist/cli/chunks/better-sqlite3-IRPHIXRU.js +2 -0
- package/dist/cli/chunks/brain-handler-7EO3FFRZ.js +68 -0
- package/dist/cli/chunks/{branch-enumerator-XK4V5W7L.js → branch-enumerator-MZRGP35N.js} +2 -2
- package/dist/cli/chunks/{browser-PALA5PL3.js → browser-VSIWQE7J.js} +2 -2
- package/dist/cli/chunks/browser-workflow-3J5YNMEI.js +2 -0
- package/dist/cli/chunks/chunk-25LFUL2K.js +79 -0
- package/dist/cli/chunks/{chunk-LHJQD2VU.js → chunk-2EC5Z2J4.js} +68 -68
- package/dist/cli/chunks/{chunk-4YOMLWEK.js → chunk-2VVV73PW.js} +1 -1
- package/dist/cli/chunks/{chunk-BPWXXEH2.js → chunk-2WBCYSUN.js} +128 -128
- package/dist/cli/chunks/{chunk-X3KI6JOY.js → chunk-2Z2TFEOL.js} +2 -2
- package/dist/cli/chunks/chunk-34U7JDCN.js +2 -0
- package/dist/cli/chunks/{chunk-24FKIJNC.js → chunk-3GZKAORV.js} +2 -2
- package/dist/cli/chunks/{chunk-72WOAVK6.js → chunk-4D2ZG2QO.js} +1 -1
- package/dist/cli/chunks/{chunk-B36CDR4U.js → chunk-4DAOZQ3V.js} +2 -2
- package/dist/cli/chunks/{chunk-CL6POIX4.js → chunk-4FMHBBG5.js} +1 -1
- package/dist/cli/chunks/{chunk-BXAXGEFC.js → chunk-4FT3PND7.js} +5 -5
- package/dist/cli/chunks/{chunk-IGJPMN4I.js → chunk-4LA7IW3V.js} +1 -1
- package/dist/cli/chunks/{chunk-JRYGQO2W.js → chunk-4PKXIBX2.js} +1 -1
- package/dist/cli/chunks/{chunk-YPFOCNOE.js → chunk-4UH25U4O.js} +1 -1
- package/dist/cli/chunks/{chunk-U5RN7YQW.js → chunk-4Z27TRQF.js} +2 -2
- package/dist/cli/chunks/{chunk-YW2THB5Q.js → chunk-563PJBDM.js} +2 -2
- package/dist/cli/chunks/{chunk-BDIEMZ22.js → chunk-56IWS2KY.js} +2 -2
- package/dist/cli/chunks/chunk-5AUKULWO.js +2 -0
- package/dist/cli/chunks/{chunk-VSVXUTJN.js → chunk-5L6AU3QK.js} +2 -2
- package/dist/cli/chunks/{chunk-RTGGL7D7.js → chunk-5RL66XSH.js} +2 -2
- package/dist/cli/chunks/{chunk-YANUP2RO.js → chunk-65M7C6SH.js} +1 -1
- package/dist/cli/chunks/{chunk-ESVQ6MEB.js → chunk-6SOJVEU7.js} +2 -2
- package/dist/cli/chunks/{chunk-UFUVUO3J.js → chunk-727BDQ3K.js} +2 -2
- package/dist/cli/chunks/{chunk-TLHP5EII.js → chunk-7NOIIC7G.js} +1 -1
- package/dist/cli/chunks/{chunk-N4TL73TH.js → chunk-7SLN2JGP.js} +8 -8
- package/dist/cli/chunks/{chunk-NZ2VCPN4.js → chunk-AA33R5U4.js} +2 -2
- package/dist/cli/chunks/{chunk-Y7BHKZFJ.js → chunk-AKSJQ6B3.js} +2 -2
- package/dist/cli/chunks/{chunk-3ZOONQG6.js → chunk-BIVIPF4O.js} +1 -1
- package/dist/cli/chunks/{chunk-VOS4NQSF.js → chunk-BKCTNRC5.js} +2 -2
- package/dist/cli/chunks/{chunk-B6LLWYQ6.js → chunk-BOH22AKC.js} +2 -2
- package/dist/cli/chunks/{chunk-OI5NGQO2.js → chunk-BY47GV4T.js} +2 -2
- package/dist/cli/chunks/chunk-CCYMJKWX.js +2 -0
- package/dist/cli/chunks/chunk-CL3K5EJK.js +2 -0
- package/dist/cli/chunks/{chunk-GPQ57KA4.js → chunk-CQBSGYRA.js} +2 -2
- package/dist/cli/chunks/{chunk-MZOFWJTM.js → chunk-CQP7ZFME.js} +2 -2
- package/dist/cli/chunks/chunk-DBE34QES.js +2 -0
- package/dist/cli/chunks/chunk-DHE66JRR.js +12 -0
- package/dist/cli/chunks/{chunk-2BZFNEN2.js → chunk-DNLMZTE2.js} +1 -1
- package/dist/cli/chunks/{chunk-XLRQYLWW.js → chunk-DSE57A5N.js} +1 -1
- package/dist/cli/chunks/{chunk-SUSEVMZT.js → chunk-E25S5E2D.js} +1 -1
- package/dist/cli/chunks/{chunk-FEKY7T6Q.js → chunk-FAXVVLPL.js} +2 -2
- package/dist/cli/chunks/chunk-FRJLP7IB.js +2 -0
- package/dist/cli/chunks/{chunk-CS2KS7LP.js → chunk-FUIHWBVF.js} +1 -1
- package/dist/cli/chunks/{chunk-LNQIY6BP.js → chunk-GCMVJS5X.js} +2 -2
- package/dist/cli/chunks/{chunk-XT2V2322.js → chunk-GITD7SRQ.js} +2 -2
- package/dist/cli/chunks/{chunk-JJO7Y4H3.js → chunk-GK72GUHA.js} +3 -3
- package/dist/cli/chunks/{chunk-6EOS7KX2.js → chunk-GPLERTZU.js} +2 -2
- package/dist/cli/chunks/{chunk-2E5NQNSU.js → chunk-HW4ISY5B.js} +11 -11
- package/dist/cli/chunks/{chunk-HRO6OZQD.js → chunk-ICDXWIFZ.js} +1 -1
- package/dist/cli/chunks/{chunk-3NZLZHJI.js → chunk-J4BS6IWE.js} +1 -1
- package/dist/cli/chunks/{chunk-4VUPRTVX.js → chunk-JOVINE23.js} +2 -2
- package/dist/cli/chunks/chunk-JV7LX6OT.js +95 -0
- package/dist/cli/chunks/{chunk-6SVX4DJC.js → chunk-KBA7FBK3.js} +3 -3
- package/dist/cli/chunks/chunk-KDDZYXP4.js +2 -0
- package/dist/cli/chunks/{chunk-GAOJV3OX.js → chunk-KNVAAVHH.js} +2 -2
- package/dist/cli/chunks/{chunk-CWFB6BSA.js → chunk-KQTJ2YLI.js} +4 -4
- package/dist/cli/chunks/{chunk-FGA7VIFR.js → chunk-KTYUCZEM.js} +3 -3
- package/dist/cli/chunks/{chunk-RU5WAHB7.js → chunk-KZTO5EVM.js} +2 -2
- package/dist/cli/chunks/{chunk-IFNIIK34.js → chunk-KZUJBZ7B.js} +3 -3
- package/dist/cli/chunks/{chunk-GKNNSCLC.js → chunk-L5WZUPZF.js} +2 -2
- package/dist/cli/chunks/{chunk-MDUHYUHF.js → chunk-L5YEPSDU.js} +2 -2
- package/dist/cli/chunks/chunk-LCAA6H4J.js +2 -0
- package/dist/cli/chunks/{chunk-XRE2HCWG.js → chunk-LMMEUVE5.js} +1 -1
- package/dist/cli/chunks/{chunk-7VDBAVTY.js → chunk-MN742FIH.js} +2 -2
- package/dist/cli/chunks/chunk-MY4LMIG7.js +180 -0
- package/dist/cli/chunks/{chunk-WGMPEW2T.js → chunk-N3F3CX4V.js} +2 -2
- package/dist/cli/chunks/{chunk-YVA65UZL.js → chunk-NJY7ZA77.js} +1 -1
- package/dist/cli/chunks/{chunk-3IHG3WOY.js → chunk-NM6TIEJ3.js} +3 -3
- package/dist/cli/chunks/{chunk-KP5NUODU.js → chunk-NRCKGXJJ.js} +1 -1
- package/dist/cli/chunks/{chunk-3ADGXLTM.js → chunk-PFNFC43Q.js} +1 -1
- package/dist/cli/chunks/{chunk-4VBTXZRM.js → chunk-PJFLO37I.js} +2 -2
- package/dist/cli/chunks/{chunk-XIBDETCS.js → chunk-PNL5G6TE.js} +2 -2
- package/dist/cli/chunks/{chunk-AFLLQ5PP.js → chunk-Q4A72ZTV.js} +2 -2
- package/dist/cli/chunks/{chunk-EHDQJQ6Y.js → chunk-QEQTC4WQ.js} +5 -5
- package/dist/cli/chunks/{chunk-IAV2JMIX.js → chunk-QIH3E775.js} +2 -2
- package/dist/cli/chunks/{chunk-GRUUQAR6.js → chunk-QNBQBSAI.js} +2 -2
- package/dist/cli/chunks/{chunk-WIEC7VKK.js → chunk-QODE4LM6.js} +2 -2
- package/dist/cli/chunks/{chunk-HY6PMO5W.js → chunk-QPRVX4H2.js} +2 -2
- package/dist/cli/chunks/chunk-RC5CPXON.js +2 -0
- package/dist/cli/chunks/{chunk-TWUWL5EJ.js → chunk-RITN3XR4.js} +2 -2
- package/dist/cli/chunks/{chunk-WBQSXPBI.js → chunk-RJROC5M3.js} +2 -2
- package/dist/cli/chunks/chunk-RQGYJK7H.js +2 -0
- package/dist/cli/chunks/{chunk-XO6PVK2P.js → chunk-S3RDH5CI.js} +2 -2
- package/dist/cli/chunks/{chunk-3IUNFTIF.js → chunk-SCF7NRVE.js} +1 -1
- package/dist/cli/chunks/chunk-SDTVHR63.js +2 -0
- package/dist/cli/chunks/chunk-SGAW2WLI.js +65 -0
- package/dist/cli/chunks/{chunk-N2NS2PHA.js → chunk-SNVM4YJS.js} +2 -2
- package/dist/cli/chunks/{chunk-JXM26HEE.js → chunk-SRRFWTNF.js} +2 -2
- package/dist/cli/chunks/{chunk-UQHYFOBX.js → chunk-STE42EMB.js} +2 -2
- package/dist/cli/chunks/{chunk-WJ3DLOXF.js → chunk-T5GV6UIO.js} +2 -2
- package/dist/cli/chunks/{chunk-4YS3IJ45.js → chunk-TKF447CW.js} +1 -1
- package/dist/cli/chunks/{chunk-ZAPS3UGQ.js → chunk-TTOE336G.js} +3 -3
- package/dist/cli/chunks/{chunk-YAGODYIG.js → chunk-UKDOMLBI.js} +3 -3
- package/dist/cli/chunks/{chunk-JBANAPWG.js → chunk-V6XBAZNH.js} +1 -1
- package/dist/cli/chunks/{chunk-BULKFVYX.js → chunk-VHVWAXCF.js} +1 -1
- package/dist/cli/chunks/{chunk-5SKGFSKD.js → chunk-VL7YOOC2.js} +2 -2
- package/dist/cli/chunks/{chunk-AKE543X2.js → chunk-VUAO4VFC.js} +2 -2
- package/dist/cli/chunks/{chunk-7R6YMLVS.js → chunk-WG4GHAML.js} +2 -2
- package/dist/cli/chunks/{chunk-BTREG4IW.js → chunk-WXWY2GAF.js} +2 -2
- package/dist/cli/chunks/chunk-X35GP7TR.js +1 -0
- package/dist/cli/chunks/chunk-X6LCMOGC.js +2 -0
- package/dist/cli/chunks/{chunk-BGXNSCXX.js → chunk-XFMKJ3UD.js} +1 -1
- package/dist/cli/chunks/{chunk-BLBRY5UD.js → chunk-XH53ARZD.js} +2 -2
- package/dist/cli/chunks/chunk-XIBVVZGB.js +2 -0
- package/dist/cli/chunks/chunk-XYJL6DKI.js +2 -0
- package/dist/cli/chunks/{chunk-5T2ZQWKF.js → chunk-Y6O7CDLI.js} +2 -2
- package/dist/cli/chunks/{chunk-4I2IOUS4.js → chunk-YXCU4CJX.js} +1 -1
- package/dist/cli/chunks/{chunk-YR6ZZGH7.js → chunk-Z2IKNC5M.js} +1 -1
- package/dist/cli/chunks/{chunk-OLHKGP35.js → chunk-Z54EO6E6.js} +2 -2
- package/dist/cli/chunks/{chunk-ZDATDCYN.js → chunk-Z5HXGVXZ.js} +1 -1
- package/dist/cli/chunks/{ci-J374KDLI.js → ci-2BCOBWFG.js} +2 -2
- package/dist/cli/chunks/ci-output-FB4OJHAC.js +2 -0
- package/dist/cli/chunks/{claude-flow-setup-245JLJCN.js → claude-flow-setup-NEEFZTMB.js} +2 -2
- package/dist/cli/chunks/client-EF555KYW.js +2 -0
- package/dist/cli/chunks/{cline-installer-LBA2M5N3.js → cline-installer-ODO2PS4K.js} +2 -2
- package/dist/cli/chunks/{code-U4N4WONM.js → code-NSOF62VE.js} +2 -2
- package/dist/cli/chunks/{code-index-extractor-A57Z6BO4.js → code-index-extractor-YQL5XN52.js} +2 -2
- package/dist/cli/chunks/{codex-installer-UXMK2N4T.js → codex-installer-SPEY6VYT.js} +2 -2
- package/dist/cli/chunks/{completions-W66BSCOE.js → completions-OWKBUMBE.js} +2 -2
- package/dist/cli/chunks/complexity-analyzer-PGTXKP73.js +2 -0
- package/dist/cli/chunks/{continuedev-installer-LRFZ2SJM.js → continuedev-installer-KGOXAC7L.js} +2 -2
- package/dist/cli/chunks/{copilot-installer-CQ3JYBIB.js → copilot-installer-BF3UA3TG.js} +2 -2
- package/dist/cli/chunks/cost-tracker-2HDJ66E2.js +2 -0
- package/dist/cli/chunks/{coverage-4PUEQXAY.js → coverage-KPA2PHIN.js} +3 -3
- package/dist/cli/chunks/cross-domain-router-GXFNK5TS.js +2 -0
- package/dist/cli/chunks/{cursor-installer-JZEDEDHA.js → cursor-installer-7CDZFHTV.js} +2 -2
- package/dist/cli/chunks/{daemon-B7TWGHXQ.js → daemon-4BPGCKDJ.js} +3 -3
- package/dist/cli/chunks/dag-attention-scheduler-2MAVGSBB.js +2 -0
- package/dist/cli/chunks/detect-WRPWTGP5.js +2 -0
- package/dist/cli/chunks/{domain-handler-FT5FLZWL.js → domain-handler-JZVSJ7AG.js} +2 -2
- package/dist/cli/chunks/domain-transfer-XGIZOR2X.js +2 -0
- package/dist/cli/chunks/dream-3IKF5XH4.js +2 -0
- package/dist/cli/chunks/esm-node-DHAE52OW.js +2 -0
- package/dist/cli/chunks/{eval-GHMPFGWV.js → eval-T7YPAS4G.js} +2 -2
- package/dist/cli/chunks/{fast-paths-B3R647KN.js → fast-paths-QECJTKCQ.js} +2 -2
- package/dist/cli/chunks/{feature-flags-DWS7ARSX.js → feature-flags-LIFURSFZ.js} +2 -2
- package/dist/cli/chunks/feature-flags-R4QZYTIW.js +2 -0
- package/dist/cli/chunks/file-discovery-4W3K3W4C.js +2 -0
- package/dist/cli/chunks/{fleet-EKOKMOMW.js → fleet-NLLQWCI5.js} +3 -3
- package/dist/cli/chunks/gnn-wrapper-XEII72LN.js +2 -0
- package/dist/cli/chunks/{heartbeat-handler-MBBS4IBU.js → heartbeat-handler-DJ65RE5D.js} +4 -4
- package/dist/cli/chunks/{heartbeat-scheduler-XDGMOT7X.js → heartbeat-scheduler-H664265Q.js} +2 -2
- package/dist/cli/chunks/hnsw-adapter-DML5KXQR.js +2 -0
- package/dist/cli/chunks/hnsw-index-BUPPGVR6.js +2 -0
- package/dist/cli/chunks/hnsw-legacy-bridge-SQIDTWAA.js +2 -0
- package/dist/cli/chunks/hnswlib-node-WICYCU5U.js +2 -0
- package/dist/cli/chunks/{hooks-L5VLZGEK.js → hooks-GZUHUD63.js} +6 -6
- package/dist/cli/chunks/hypergraph-engine-MLCDZ6BL.js +2 -0
- package/dist/cli/chunks/{hypergraph-handler-3HDGB5SZ.js → hypergraph-handler-NNDDI4R3.js} +3 -3
- package/dist/cli/chunks/impact-analyzer-DPTMJRYS.js +2 -0
- package/dist/cli/chunks/{init-handler-JDET6WUN.js → init-handler-IJ6BHE6A.js} +6 -6
- package/dist/cli/chunks/init-wizard-35PUDJPW.js +2 -0
- package/dist/cli/chunks/kernel-2HZ44ZJ4.js +2 -0
- package/dist/cli/chunks/{kilocode-installer-GZZG5AFW.js → kilocode-installer-EPZFFPFE.js} +2 -2
- package/dist/cli/chunks/{kiro-installer-IWNY5TKH.js → kiro-installer-5VACG3HU.js} +2 -2
- package/dist/cli/chunks/knowledge-graph-JL62G72U.js +2 -0
- package/dist/cli/chunks/{learning-722ZNSZ6.js → learning-6FITK6XY.js} +3 -3
- package/dist/cli/chunks/{llm-router-DNAV746L.js → llm-router-4DDC6AKJ.js} +2 -2
- package/dist/cli/chunks/{load-Y3GCUFM4.js → load-KGDNVUBX.js} +2 -2
- package/dist/cli/chunks/load-test-LN245SSD.js +2 -0
- package/dist/cli/chunks/{mcp-LKPIBZ3W.js → mcp-4LETGVIV.js} +2 -2
- package/dist/cli/chunks/{memory-L57MLFOP.js → memory-II4I4QMO.js} +5 -5
- package/dist/cli/chunks/memory-backend-SVM7YRIE.js +2 -0
- package/dist/cli/chunks/memory-handlers-TQXTOJGQ.js +2 -0
- package/dist/cli/chunks/opencode-installer-EU6JCWBW.js +3 -0
- package/dist/cli/chunks/{orchestrator-QHSBB2UC.js → orchestrator-YLMGJVSP.js} +5 -5
- package/dist/cli/chunks/{pipeline-D3QER35Z.js → pipeline-MPZJWYKK.js} +2 -2
- package/dist/cli/chunks/{platform-T4E7Q3RD.js → platform-YH35ZZFZ.js} +2 -2
- package/dist/cli/chunks/{plugin-JHW2YPRC.js → plugin-B7JYZFNQ.js} +2 -2
- package/dist/cli/chunks/{prime-radiant-advanced-wasm-G7CFNNQV.js → prime-radiant-advanced-wasm-KTUK6UE2.js} +2 -2
- package/dist/cli/chunks/protocol-executor-IEN2XB4L.js +2 -0
- package/dist/cli/chunks/{protocol-handler-2BQQ4HDM.js → protocol-handler-3NXMVU34.js} +2 -2
- package/dist/cli/chunks/{prove-UQ6JFT73.js → prove-H5LMGSUC.js} +2 -2
- package/dist/cli/chunks/qe-reasoning-bank-Q3ZV3JRG.js +2 -0
- package/dist/cli/chunks/{quality-JRZYMC77.js → quality-RCWHY6GO.js} +2 -2
- package/dist/cli/chunks/queen-coordinator-E6ON3JUR.js +2 -0
- package/dist/cli/chunks/real-embeddings-NKH4VURF.js +2 -0
- package/dist/cli/chunks/{roocode-installer-F4E2LAYR.js → roocode-installer-SB7QJYM3.js} +2 -2
- package/dist/cli/chunks/router-WMC3LZ3C.js +2 -0
- package/dist/cli/chunks/routing-feedback-VKCZRCE3.js +2 -0
- package/dist/cli/chunks/{routing-handler-VNKFUUGB.js → routing-handler-SY7GKG2W.js} +2 -2
- package/dist/cli/chunks/ruvector-commands-HATTO3UQ.js +8 -0
- package/dist/cli/chunks/rvf-dual-writer-D57EXQUD.js +2 -0
- package/dist/cli/chunks/rvf-migration-adapter-OWDYN6KD.js +2 -0
- package/dist/cli/chunks/rvf-migration-coordinator-SIQVJB5S.js +2 -0
- package/dist/cli/chunks/rvf-native-adapter-C7NBH5UN.js +2 -0
- package/dist/cli/chunks/safe-db-5KLXCNXN.js +2 -0
- package/dist/cli/chunks/schedule-HAWWOXWB.js +2 -0
- package/dist/cli/chunks/scheduler-HTRDY5BC.js +2 -0
- package/dist/cli/chunks/{security-EBEG2OPU.js → security-DS3XLZWN.js} +3 -3
- package/dist/cli/chunks/shared-rvf-adapter-6I2Z5UGL.js +2 -0
- package/dist/cli/chunks/shared-rvf-dual-writer-YB7AH6XJ.js +2 -0
- package/dist/cli/chunks/sqlite-persistence-WNNRGTGG.js +2 -0
- package/dist/cli/chunks/{status-handler-VZ32M4G4.js → status-handler-TUYHE4FT.js} +2 -2
- package/dist/cli/chunks/{structural-health-K6LRCKV6.js → structural-health-XNGBNRRD.js} +2 -2
- package/dist/cli/chunks/{sync-MHSHNLIM.js → sync-K6CIRKBB.js} +2 -2
- package/dist/cli/chunks/{task-handler-JNOIBZ2G.js → task-handler-7PJY67DR.js} +2 -2
- package/dist/cli/chunks/task-handlers-WB5CDWUR.js +2 -0
- package/dist/cli/chunks/{test-DO22BNIL.js → test-WV5ALEBB.js} +4 -4
- package/dist/cli/chunks/{test-scheduling-VLRQZEFL.js → test-scheduling-N55ZGGA2.js} +3 -3
- package/dist/cli/chunks/token-bootstrap-SINWHAKR.js +2 -0
- package/dist/cli/chunks/{token-usage-LG3PXRXH.js → token-usage-R7TGEVGL.js} +2 -2
- package/dist/cli/chunks/transformers-6DBLXPV7.js +2 -0
- package/dist/cli/chunks/{tree-sitter-wasm-parser-FT2KB66N.js → tree-sitter-wasm-parser-7C7FKMQW.js} +2 -2
- package/dist/cli/chunks/types-VNPMOKQT.js +2 -0
- package/dist/cli/chunks/unified-memory-72SKVZ7Y.js +2 -0
- package/dist/cli/chunks/unified-memory-hnsw-TMN2L77W.js +2 -0
- package/dist/cli/chunks/unified-persistence-MDN3SRCR.js +2 -0
- package/dist/cli/chunks/{validate-VQCRSVNQ.js → validate-53MNIRAF.js} +2 -2
- package/dist/cli/chunks/{validate-swarm-A5DHAWTP.js → validate-swarm-ZY4RGUFO.js} +2 -2
- package/dist/cli/chunks/{vibium-RZBSL4EB.js → vibium-PBADBIV6.js} +2 -2
- package/dist/cli/chunks/visual-security-TRBCXPIB.js +2 -0
- package/dist/cli/chunks/{web-tree-sitter-7C4NXEOF.js → web-tree-sitter-O7VI6RLB.js} +2 -2
- package/dist/cli/chunks/{windsurf-installer-ES3KPQG3.js → windsurf-installer-HV3C3TAD.js} +2 -2
- package/dist/cli/chunks/witness-chain-4WIMYP4X.js +2 -0
- package/dist/cli/chunks/witness-chain-JOI2YYGK.js +2 -0
- package/dist/cli/chunks/{workflow-JETHX4ML.js → workflow-5RVAQ4TM.js} +4 -4
- package/dist/cli/chunks/workflow-orchestrator-2NQ72S3C.js +2 -0
- package/dist/cli/chunks/{wrappers-WP5RH745.js → wrappers-RRHCCA3E.js} +2 -2
- package/dist/cli/commands/ruvector-commands.js +14 -2
- package/dist/cli/index.js +10 -15
- package/dist/coordination/agent-memory-branch.d.ts +117 -0
- package/dist/coordination/agent-memory-branch.js +213 -0
- package/dist/coordination/agent-teams/mailbox.d.ts +43 -0
- package/dist/coordination/agent-teams/mailbox.js +130 -4
- package/dist/coordination/handlers/handler-utils.d.ts +1 -0
- package/dist/coordination/handlers/handler-utils.js +9 -2
- package/dist/coordination/handlers/quality-handlers.js +7 -1
- package/dist/domains/contract-testing/coordinator.js +11 -0
- package/dist/domains/quality-assessment/coherence/gate-controller.d.ts +20 -1
- package/dist/domains/quality-assessment/coherence/gate-controller.js +64 -0
- package/dist/domains/quality-assessment/coherence/index.d.ts +3 -3
- package/dist/domains/quality-assessment/coherence/index.js +2 -2
- package/dist/domains/quality-assessment/coherence/types.d.ts +39 -0
- package/dist/domains/quality-assessment/coherence/types.js +11 -0
- package/dist/domains/quality-assessment/coordinator.d.ts +14 -0
- package/dist/domains/quality-assessment/coordinator.js +92 -0
- package/dist/domains/test-execution/coordinator.d.ts +19 -0
- package/dist/domains/test-execution/coordinator.js +102 -5
- package/dist/domains/test-generation/coordinator.js +11 -0
- package/dist/domains/test-generation/interfaces.d.ts +2 -0
- package/dist/domains/test-generation/services/test-generator.d.ts +9 -0
- package/dist/domains/test-generation/services/test-generator.js +37 -0
- package/dist/init/agents-installer.d.ts +5 -3
- package/dist/init/agents-installer.js +17 -43
- package/dist/init/find-package-root.d.ts +22 -0
- package/dist/init/find-package-root.js +46 -0
- package/dist/init/n8n-installer.d.ts +4 -2
- package/dist/init/n8n-installer.js +23 -23
- package/dist/init/opencode-installer.d.ts +0 -5
- package/dist/init/opencode-installer.js +12 -39
- package/dist/init/skills-installer.d.ts +5 -2
- package/dist/init/skills-installer.js +15 -37
- package/dist/integrations/embeddings/index/HNSWIndex.d.ts +9 -2
- package/dist/integrations/embeddings/index/HNSWIndex.js +110 -35
- package/dist/integrations/ruvector/cognitive-routing.d.ts +67 -0
- package/dist/integrations/ruvector/cognitive-routing.js +208 -0
- package/dist/integrations/ruvector/feature-flags.d.ts +84 -0
- package/dist/integrations/ruvector/feature-flags.js +59 -0
- package/dist/integrations/ruvector/hdc-fingerprint.d.ts +76 -0
- package/dist/integrations/ruvector/hdc-fingerprint.js +217 -0
- package/dist/integrations/ruvector/hyperbolic-hnsw.d.ts +59 -0
- package/dist/integrations/ruvector/hyperbolic-hnsw.js +194 -0
- package/dist/integrations/ruvector/index.d.ts +5 -2
- package/dist/integrations/ruvector/index.js +13 -2
- package/dist/integrations/ruvector/shared-rvf-adapter.d.ts +24 -0
- package/dist/integrations/ruvector/shared-rvf-adapter.js +55 -0
- package/dist/integrations/ruvector/shared-rvf-dual-writer.d.ts +6 -0
- package/dist/integrations/ruvector/shared-rvf-dual-writer.js +38 -0
- package/dist/integrations/ruvector/sona-persistence.d.ts +8 -0
- package/dist/integrations/ruvector/sona-persistence.js +10 -0
- package/dist/integrations/ruvector/vector-delta-tracker.d.ts +96 -0
- package/dist/integrations/ruvector/vector-delta-tracker.js +226 -0
- package/dist/kernel/agent-coordinator.d.ts +75 -1
- package/dist/kernel/agent-coordinator.js +250 -1
- package/dist/kernel/hnsw-legacy-bridge.d.ts +38 -0
- package/dist/kernel/hnsw-legacy-bridge.js +88 -0
- package/dist/kernel/hnsw-shadow-validator.d.ts +91 -0
- package/dist/kernel/hnsw-shadow-validator.js +139 -0
- package/dist/kernel/index.d.ts +1 -1
- package/dist/kernel/index.js +1 -1
- package/dist/kernel/interfaces.d.ts +39 -0
- package/dist/kernel/kernel.d.ts +23 -0
- package/dist/kernel/kernel.js +106 -1
- package/dist/kernel/unified-memory.d.ts +1 -1
- package/dist/kernel/unified-memory.js +7 -3
- package/dist/learning/aqe-learning-engine.d.ts +65 -0
- package/dist/learning/aqe-learning-engine.js +134 -0
- package/dist/learning/dream/dream-engine.d.ts +6 -1
- package/dist/learning/dream/dream-engine.js +37 -2
- package/dist/learning/dream/dream-scheduler.d.ts +25 -0
- package/dist/learning/dream/dream-scheduler.js +120 -0
- package/dist/learning/dream/rvcow-branch-manager.d.ts +6 -3
- package/dist/learning/dream/rvcow-branch-manager.js +60 -5
- package/dist/learning/experience-capture.d.ts +3 -3
- package/dist/learning/hyperbolic-pattern-index.d.ts +82 -0
- package/dist/learning/hyperbolic-pattern-index.js +142 -0
- package/dist/learning/index.d.ts +3 -3
- package/dist/learning/index.js +1 -1
- package/dist/learning/metrics-tracker.d.ts +44 -0
- package/dist/learning/metrics-tracker.js +37 -0
- package/dist/learning/pattern-promotion.d.ts +3 -3
- package/dist/learning/pattern-store.d.ts +45 -2
- package/dist/learning/pattern-store.js +239 -4
- package/dist/learning/qe-patterns.d.ts +1 -1
- package/dist/learning/qe-reasoning-bank.js +1 -1
- package/dist/learning/rvf-pattern-migration.d.ts +50 -0
- package/dist/learning/rvf-pattern-migration.js +106 -0
- package/dist/learning/rvf-pattern-store.d.ts +69 -0
- package/dist/learning/rvf-pattern-store.js +449 -0
- package/dist/mcp/bundle.js +1894 -1804
- package/dist/mcp/handlers/index.d.ts +1 -0
- package/dist/mcp/handlers/index.js +2 -0
- package/dist/mcp/handlers/migration-handlers.d.ts +52 -0
- package/dist/mcp/handlers/migration-handlers.js +85 -0
- package/dist/mcp/protocol-server.d.ts +1 -0
- package/dist/mcp/protocol-server.js +63 -2
- package/dist/mcp/types.d.ts +1 -1
- package/dist/optimization/early-exit-token-optimizer.d.ts +7 -7
- package/dist/optimization/early-exit-token-optimizer.js +3 -3
- package/dist/persistence/rvf-consistency-validator.d.ts +85 -0
- package/dist/persistence/rvf-consistency-validator.js +182 -0
- package/dist/persistence/rvf-migration-adapter.d.ts +125 -0
- package/dist/persistence/rvf-migration-adapter.js +303 -0
- package/dist/persistence/rvf-migration-coordinator.d.ts +115 -0
- package/dist/persistence/rvf-migration-coordinator.js +224 -0
- package/dist/persistence/rvf-stage-gate.d.ts +70 -0
- package/dist/persistence/rvf-stage-gate.js +163 -0
- package/package.json +10 -10
- package/dist/cli/chunks/adapter-WBR5NXS3.js +0 -2
- package/dist/cli/chunks/aqe-learning-engine-TK4JQCGT.js +0 -2
- package/dist/cli/chunks/base-2WXOSMBQ.js +0 -2
- package/dist/cli/chunks/better-sqlite3-7KY2RDXO.js +0 -2
- package/dist/cli/chunks/brain-handler-PPEGDCN4.js +0 -68
- package/dist/cli/chunks/browser-workflow-42F7GK5T.js +0 -2
- package/dist/cli/chunks/chunk-263XS447.js +0 -2
- package/dist/cli/chunks/chunk-2I7J3O6V.js +0 -2
- package/dist/cli/chunks/chunk-3JPRUND5.js +0 -2
- package/dist/cli/chunks/chunk-3THRQEZ2.js +0 -95
- package/dist/cli/chunks/chunk-4B6NCELM.js +0 -2
- package/dist/cli/chunks/chunk-62ADTHV7.js +0 -2
- package/dist/cli/chunks/chunk-BR26T7ZS.js +0 -180
- package/dist/cli/chunks/chunk-DRT3WKQW.js +0 -2
- package/dist/cli/chunks/chunk-FIA6X7UL.js +0 -2
- package/dist/cli/chunks/chunk-J3KWWR6Z.js +0 -1
- package/dist/cli/chunks/chunk-JZSDOIXA.js +0 -2
- package/dist/cli/chunks/chunk-MV6CMOJQ.js +0 -65
- package/dist/cli/chunks/chunk-N5UXCLFI.js +0 -2
- package/dist/cli/chunks/chunk-OF4D7MYI.js +0 -2
- package/dist/cli/chunks/chunk-QOVHWZEP.js +0 -1
- package/dist/cli/chunks/chunk-RFSN6IDA.js +0 -79
- package/dist/cli/chunks/chunk-X5IJGWYG.js +0 -2
- package/dist/cli/chunks/ci-output-7JN7F6CI.js +0 -2
- package/dist/cli/chunks/client-MCSNSH2C.js +0 -2
- package/dist/cli/chunks/complexity-analyzer-AB4OZARV.js +0 -2
- package/dist/cli/chunks/cost-tracker-4F723RB6.js +0 -2
- package/dist/cli/chunks/cross-domain-router-OWR5IJ5G.js +0 -2
- package/dist/cli/chunks/dag-attention-scheduler-JWO6XI6A.js +0 -2
- package/dist/cli/chunks/detect-L6ZZHUSX.js +0 -2
- package/dist/cli/chunks/domain-transfer-5Y4FGJAJ.js +0 -2
- package/dist/cli/chunks/dream-4TDBIYED.js +0 -2
- package/dist/cli/chunks/esm-node-2PKHKOTS.js +0 -2
- package/dist/cli/chunks/feature-flags-IVQ3AL4Q.js +0 -2
- package/dist/cli/chunks/file-discovery-QFPA6GMV.js +0 -2
- package/dist/cli/chunks/gnn-wrapper-OYC55N5E.js +0 -2
- package/dist/cli/chunks/hnsw-index-YO7CT23I.js +0 -2
- package/dist/cli/chunks/hnswlib-node-56YWVXFE.js +0 -2
- package/dist/cli/chunks/hypergraph-engine-A4Y2ZRAG.js +0 -2
- package/dist/cli/chunks/impact-analyzer-UEIGXSZ4.js +0 -2
- package/dist/cli/chunks/init-wizard-JWZUGIPJ.js +0 -2
- package/dist/cli/chunks/kernel-YNDTVKIW.js +0 -2
- package/dist/cli/chunks/knowledge-graph-NGJKFTSN.js +0 -2
- package/dist/cli/chunks/load-test-GZUBXFF3.js +0 -2
- package/dist/cli/chunks/memory-backend-3NQIZUXE.js +0 -2
- package/dist/cli/chunks/memory-handlers-MDZQ7HVW.js +0 -2
- package/dist/cli/chunks/opencode-installer-4HUB36H5.js +0 -3
- package/dist/cli/chunks/protocol-executor-SPUVRDWT.js +0 -2
- package/dist/cli/chunks/qe-reasoning-bank-3HBK2FVD.js +0 -2
- package/dist/cli/chunks/queen-coordinator-RW3NKO5A.js +0 -2
- package/dist/cli/chunks/real-embeddings-GK63VF35.js +0 -2
- package/dist/cli/chunks/router-RJGHWDQ3.js +0 -2
- package/dist/cli/chunks/routing-feedback-ZXBXFKX6.js +0 -2
- package/dist/cli/chunks/ruvector-commands-2TLNHC3A.js +0 -8
- package/dist/cli/chunks/rvf-dual-writer-MQW2SJLT.js +0 -2
- package/dist/cli/chunks/rvf-native-adapter-LKFKTMUN.js +0 -2
- package/dist/cli/chunks/safe-db-G22E5ROA.js +0 -2
- package/dist/cli/chunks/schedule-Y7VVCPYV.js +0 -2
- package/dist/cli/chunks/scheduler-AUQIFQB7.js +0 -2
- package/dist/cli/chunks/shared-rvf-dual-writer-BVSCQAFS.js +0 -2
- package/dist/cli/chunks/sqlite-persistence-JAVHUGGL.js +0 -2
- package/dist/cli/chunks/task-handlers-P5DSUKND.js +0 -2
- package/dist/cli/chunks/token-bootstrap-4VJKGVMK.js +0 -2
- package/dist/cli/chunks/transformers-GY7SIKEU.js +0 -2
- package/dist/cli/chunks/types-QJGNBKP2.js +0 -2
- package/dist/cli/chunks/unified-memory-XYGENQUT.js +0 -2
- package/dist/cli/chunks/unified-memory-hnsw-MVEGQBF3.js +0 -2
- package/dist/cli/chunks/unified-persistence-PFRCWEUG.js +0 -2
- package/dist/cli/chunks/visual-security-V47BLGJM.js +0 -2
- package/dist/cli/chunks/witness-chain-BR63P4A7.js +0 -2
- package/dist/cli/chunks/workflow-orchestrator-7PZMX3JZ.js +0 -2
|
@@ -14,4 +14,5 @@ export { handleValidationPipeline, type ValidationPipelineParams, type Validatio
|
|
|
14
14
|
export { handleHypergraphQuery, type HypergraphQueryParams, type HypergraphQueryResult, } from './hypergraph-handler.js';
|
|
15
15
|
export { handleHeartbeatStatus, handleHeartbeatTrigger, handleHeartbeatLog, type HeartbeatStatusParams, type HeartbeatStatusResult, type HeartbeatTriggerParams, type HeartbeatTriggerResult, type HeartbeatLogParams, type HeartbeatLogResult, } from './heartbeat-handlers.js';
|
|
16
16
|
export { handleCrossPhaseStore, handleCrossPhaseQuery, handleAgentComplete, handlePhaseStart, handlePhaseEnd, handleCrossPhaseStats, handleFormatSignals, handleCrossPhaseCleanup, resetCrossPhaseHandlers, type StoreSignalParams, type StoreSignalResult, type QuerySignalsParams, type QuerySignalsResult, type AgentCompleteParams, type AgentCompleteResult, type PhaseEventParams, type PhaseStartResult, type PhaseEndResult, type CrossPhaseStatsResult, type FormatSignalsParams, type FormatSignalsResult, } from './cross-phase-handlers';
|
|
17
|
+
export { handleMigrationStatus, handleMigrationCheck, handleMigrationPromote, resetMigrationHandlers, type MigrationStatusResult, type MigrationCheckResult, type MigrationPromoteResult, } from './migration-handlers.js';
|
|
17
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -30,4 +30,6 @@ export { handleHypergraphQuery, } from './hypergraph-handler.js';
|
|
|
30
30
|
export { handleHeartbeatStatus, handleHeartbeatTrigger, handleHeartbeatLog, } from './heartbeat-handlers.js';
|
|
31
31
|
// Cross-phase handlers
|
|
32
32
|
export { handleCrossPhaseStore, handleCrossPhaseQuery, handleAgentComplete, handlePhaseStart, handlePhaseEnd, handleCrossPhaseStats, handleFormatSignals, handleCrossPhaseCleanup, resetCrossPhaseHandlers, } from './cross-phase-handlers';
|
|
33
|
+
// RVF Migration handlers (ADR-072 Phase 3)
|
|
34
|
+
export { handleMigrationStatus, handleMigrationCheck, handleMigrationPromote, resetMigrationHandlers, } from './migration-handlers.js';
|
|
33
35
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Handlers for RVF Migration (ADR-072 Phase 3)
|
|
3
|
+
*
|
|
4
|
+
* Exposes migration status, consistency checks, and stage promotion
|
|
5
|
+
* via MCP tools for user-facing verification.
|
|
6
|
+
*/
|
|
7
|
+
import { type MigrationStatus } from '../../persistence/rvf-migration-coordinator.js';
|
|
8
|
+
import type { ConsistencyCheckResult } from '../../persistence/rvf-consistency-validator.js';
|
|
9
|
+
import type { StageGateResult } from '../../persistence/rvf-stage-gate.js';
|
|
10
|
+
import type { MigrationStage } from '../../persistence/rvf-migration-adapter.js';
|
|
11
|
+
export interface MigrationStatusResult {
|
|
12
|
+
success: boolean;
|
|
13
|
+
data: MigrationStatus | null;
|
|
14
|
+
error?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface MigrationCheckResult {
|
|
17
|
+
success: boolean;
|
|
18
|
+
data: ConsistencyCheckResult | null;
|
|
19
|
+
error?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface MigrationPromoteResult {
|
|
22
|
+
success: boolean;
|
|
23
|
+
data: {
|
|
24
|
+
promoted: boolean;
|
|
25
|
+
previousStage: MigrationStage;
|
|
26
|
+
newStage: MigrationStage;
|
|
27
|
+
gateResult: StageGateResult;
|
|
28
|
+
} | null;
|
|
29
|
+
error?: string;
|
|
30
|
+
}
|
|
31
|
+
/** Reset for testing */
|
|
32
|
+
export declare function resetMigrationHandlers(): void;
|
|
33
|
+
/**
|
|
34
|
+
* Get comprehensive RVF migration status including stage, metrics,
|
|
35
|
+
* consistency history, engine status, and gate evaluation.
|
|
36
|
+
*/
|
|
37
|
+
export declare function handleMigrationStatus(): Promise<MigrationStatusResult>;
|
|
38
|
+
/**
|
|
39
|
+
* Run a consistency check comparing SQLite and RVF search results.
|
|
40
|
+
* Samples random patterns and reports divergences.
|
|
41
|
+
*/
|
|
42
|
+
export declare function handleMigrationCheck(): Promise<MigrationCheckResult>;
|
|
43
|
+
/**
|
|
44
|
+
* Attempt to promote to the next migration stage.
|
|
45
|
+
* Evaluates stage gate criteria and records result in witness chain.
|
|
46
|
+
*
|
|
47
|
+
* @param params.force - Skip gate checks (force promotion)
|
|
48
|
+
*/
|
|
49
|
+
export declare function handleMigrationPromote(params?: {
|
|
50
|
+
force?: boolean;
|
|
51
|
+
}): Promise<MigrationPromoteResult>;
|
|
52
|
+
//# sourceMappingURL=migration-handlers.d.ts.map
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP Handlers for RVF Migration (ADR-072 Phase 3)
|
|
3
|
+
*
|
|
4
|
+
* Exposes migration status, consistency checks, and stage promotion
|
|
5
|
+
* via MCP tools for user-facing verification.
|
|
6
|
+
*/
|
|
7
|
+
import { RvfMigrationCoordinator, } from '../../persistence/rvf-migration-coordinator.js';
|
|
8
|
+
// ============================================================================
|
|
9
|
+
// Lazy Coordinator Init
|
|
10
|
+
// ============================================================================
|
|
11
|
+
let coordinator = null;
|
|
12
|
+
async function getCoordinator() {
|
|
13
|
+
if (!coordinator) {
|
|
14
|
+
coordinator = RvfMigrationCoordinator.getInstance();
|
|
15
|
+
await coordinator.initialize();
|
|
16
|
+
}
|
|
17
|
+
return coordinator;
|
|
18
|
+
}
|
|
19
|
+
/** Reset for testing */
|
|
20
|
+
export function resetMigrationHandlers() {
|
|
21
|
+
coordinator = null;
|
|
22
|
+
RvfMigrationCoordinator.resetInstance();
|
|
23
|
+
}
|
|
24
|
+
// ============================================================================
|
|
25
|
+
// Handlers
|
|
26
|
+
// ============================================================================
|
|
27
|
+
/**
|
|
28
|
+
* Get comprehensive RVF migration status including stage, metrics,
|
|
29
|
+
* consistency history, engine status, and gate evaluation.
|
|
30
|
+
*/
|
|
31
|
+
export async function handleMigrationStatus() {
|
|
32
|
+
try {
|
|
33
|
+
const coord = await getCoordinator();
|
|
34
|
+
return { success: true, data: coord.getStatus() };
|
|
35
|
+
}
|
|
36
|
+
catch (err) {
|
|
37
|
+
return {
|
|
38
|
+
success: false,
|
|
39
|
+
data: null,
|
|
40
|
+
error: err instanceof Error ? err.message : String(err),
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Run a consistency check comparing SQLite and RVF search results.
|
|
46
|
+
* Samples random patterns and reports divergences.
|
|
47
|
+
*/
|
|
48
|
+
export async function handleMigrationCheck() {
|
|
49
|
+
try {
|
|
50
|
+
const coord = await getCoordinator();
|
|
51
|
+
const result = coord.runConsistencyCheck();
|
|
52
|
+
return { success: true, data: result };
|
|
53
|
+
}
|
|
54
|
+
catch (err) {
|
|
55
|
+
return {
|
|
56
|
+
success: false,
|
|
57
|
+
data: null,
|
|
58
|
+
error: err instanceof Error ? err.message : String(err),
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Attempt to promote to the next migration stage.
|
|
64
|
+
* Evaluates stage gate criteria and records result in witness chain.
|
|
65
|
+
*
|
|
66
|
+
* @param params.force - Skip gate checks (force promotion)
|
|
67
|
+
*/
|
|
68
|
+
export async function handleMigrationPromote(params = {}) {
|
|
69
|
+
try {
|
|
70
|
+
const coord = await getCoordinator();
|
|
71
|
+
const { promoted, previousStage, newStage, result } = coord.promote(params.force ?? false);
|
|
72
|
+
return {
|
|
73
|
+
success: true,
|
|
74
|
+
data: { promoted, previousStage, newStage, gateResult: result },
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
catch (err) {
|
|
78
|
+
return {
|
|
79
|
+
success: false,
|
|
80
|
+
data: null,
|
|
81
|
+
error: err instanceof Error ? err.message : String(err),
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=migration-handlers.js.map
|
|
@@ -46,6 +46,7 @@ export declare class MCPProtocolServer {
|
|
|
46
46
|
private readonly middlewareChain;
|
|
47
47
|
private readonly sessionStore;
|
|
48
48
|
private readonly compactionPipeline;
|
|
49
|
+
private readonly loopTracker;
|
|
49
50
|
private reconnecting;
|
|
50
51
|
private pendingRequests;
|
|
51
52
|
constructor(config?: MCPServerConfig);
|
|
@@ -30,12 +30,16 @@ handleValidationPipeline,
|
|
|
30
30
|
// Imp-9: YAML pipeline handlers
|
|
31
31
|
handlePipelineLoad, handlePipelineRun, handlePipelineList, handlePipelineValidate,
|
|
32
32
|
// Cross-phase handlers
|
|
33
|
-
handleCrossPhaseStore, handleCrossPhaseQuery, handleAgentComplete, handlePhaseStart, handlePhaseEnd, handleCrossPhaseStats, handleFormatSignals, handleCrossPhaseCleanup,
|
|
33
|
+
handleCrossPhaseStore, handleCrossPhaseQuery, handleAgentComplete, handlePhaseStart, handlePhaseEnd, handleCrossPhaseStats, handleFormatSignals, handleCrossPhaseCleanup,
|
|
34
|
+
// ADR-072: RVF Migration handlers
|
|
35
|
+
handleMigrationStatus, handleMigrationCheck, handleMigrationPromote, } from './handlers';
|
|
34
36
|
// ADR-039: Performance optimization imports
|
|
35
37
|
import { registerMissingQETools } from './qe-tool-bridge.js';
|
|
36
38
|
import { getConnectionPool, initializeConnectionPool, shutdownConnectionPool, } from './connection-pool';
|
|
37
39
|
import { getLoadBalancer, } from './load-balancer';
|
|
38
40
|
import { getPerformanceMonitor, } from './performance-monitor';
|
|
41
|
+
// ADR-062: Loop detection for MCP tool calls
|
|
42
|
+
import { ToolCallSignatureTracker } from '../kernel/anti-drift-middleware.js';
|
|
39
43
|
import { createRequire } from 'module';
|
|
40
44
|
const _require = createRequire(import.meta.url);
|
|
41
45
|
const _pkg = _require('../../package.json');
|
|
@@ -61,6 +65,8 @@ export class MCPProtocolServer {
|
|
|
61
65
|
sessionStore;
|
|
62
66
|
// IMP-08: 4-tier context compaction pipeline
|
|
63
67
|
compactionPipeline;
|
|
68
|
+
// ADR-062: Loop detection tracker for MCP tool calls
|
|
69
|
+
loopTracker;
|
|
64
70
|
// Connection recovery state
|
|
65
71
|
reconnecting = false;
|
|
66
72
|
pendingRequests = [];
|
|
@@ -94,6 +100,8 @@ export class MCPProtocolServer {
|
|
|
94
100
|
llmCaller: createLLMCompactCaller(),
|
|
95
101
|
});
|
|
96
102
|
this.middlewareChain.register(this.compactionPipeline.createMiddleware());
|
|
103
|
+
// ADR-062: Initialize loop detection tracker
|
|
104
|
+
this.loopTracker = new ToolCallSignatureTracker();
|
|
97
105
|
// Register all tools
|
|
98
106
|
this.registerAllTools();
|
|
99
107
|
}
|
|
@@ -355,6 +363,26 @@ export class MCPProtocolServer {
|
|
|
355
363
|
timestamp: Date.now(),
|
|
356
364
|
metadata: { stepId },
|
|
357
365
|
};
|
|
366
|
+
// ADR-062: Loop detection — check for repeated identical tool calls
|
|
367
|
+
let loopSteeringPrefix = '';
|
|
368
|
+
if (process.env.AQE_LOOP_DETECTION_ENABLED !== 'false') {
|
|
369
|
+
try {
|
|
370
|
+
const loopResult = this.loopTracker.trackCall('mcp-client', name, args);
|
|
371
|
+
if (loopResult.action === 'steer') {
|
|
372
|
+
// BLOCK the tool call — return error with steering message to break the loop
|
|
373
|
+
return {
|
|
374
|
+
content: [{ type: 'text', text: loopResult.steeringMessage || 'Loop detected: repeated identical tool call blocked.' }],
|
|
375
|
+
isError: true,
|
|
376
|
+
};
|
|
377
|
+
}
|
|
378
|
+
else if (loopResult.action === 'warn' && loopResult.steeringMessage) {
|
|
379
|
+
loopSteeringPrefix = loopResult.steeringMessage + '\n\n';
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
catch {
|
|
383
|
+
// Loop detection must not break tool execution
|
|
384
|
+
}
|
|
385
|
+
}
|
|
358
386
|
try {
|
|
359
387
|
// IMP-00: Execute pre-tool-call middleware
|
|
360
388
|
const processedCtx = await this.middlewareChain.executePreHooks(ctx);
|
|
@@ -371,11 +399,12 @@ export class MCPProtocolServer {
|
|
|
371
399
|
requestId: stepId,
|
|
372
400
|
},
|
|
373
401
|
});
|
|
402
|
+
const resultText = JSON.stringify(processedResult, null, 2);
|
|
374
403
|
return {
|
|
375
404
|
content: [
|
|
376
405
|
{
|
|
377
406
|
type: 'text',
|
|
378
|
-
text:
|
|
407
|
+
text: loopSteeringPrefix ? loopSteeringPrefix + resultText : resultText,
|
|
379
408
|
},
|
|
380
409
|
],
|
|
381
410
|
};
|
|
@@ -1164,6 +1193,38 @@ export class MCPProtocolServer {
|
|
|
1164
1193
|
},
|
|
1165
1194
|
handler: () => handleAQEHealth(),
|
|
1166
1195
|
});
|
|
1196
|
+
// ADR-072 Phase 3: RVF Migration tools
|
|
1197
|
+
this.registerTool({
|
|
1198
|
+
definition: {
|
|
1199
|
+
name: 'migration_status',
|
|
1200
|
+
description: 'Get RVF migration status: current stage, metrics, consistency, and gate evaluation. Example: migration_status({})',
|
|
1201
|
+
category: 'persistence',
|
|
1202
|
+
isConcurrencySafe: true,
|
|
1203
|
+
parameters: [],
|
|
1204
|
+
},
|
|
1205
|
+
handler: () => handleMigrationStatus(),
|
|
1206
|
+
});
|
|
1207
|
+
this.registerTool({
|
|
1208
|
+
definition: {
|
|
1209
|
+
name: 'migration_check',
|
|
1210
|
+
description: 'Run a consistency check comparing SQLite and RVF search results. Samples random patterns and reports divergences. Example: migration_check({})',
|
|
1211
|
+
category: 'persistence',
|
|
1212
|
+
isConcurrencySafe: true,
|
|
1213
|
+
parameters: [],
|
|
1214
|
+
},
|
|
1215
|
+
handler: () => handleMigrationCheck(),
|
|
1216
|
+
});
|
|
1217
|
+
this.registerTool({
|
|
1218
|
+
definition: {
|
|
1219
|
+
name: 'migration_promote',
|
|
1220
|
+
description: 'Attempt to promote to the next RVF migration stage. Evaluates stage gate criteria. Example: migration_promote({ force: false })',
|
|
1221
|
+
category: 'persistence',
|
|
1222
|
+
parameters: [
|
|
1223
|
+
{ name: 'force', type: 'boolean', description: 'Skip gate checks and force promotion', default: false },
|
|
1224
|
+
],
|
|
1225
|
+
},
|
|
1226
|
+
handler: (params) => handleMigrationPromote(params),
|
|
1227
|
+
});
|
|
1167
1228
|
// Register QE domain tools not already covered by hardcoded handlers above
|
|
1168
1229
|
const bridgedCount = registerMissingQETools((entry) => this.registerTool(entry));
|
|
1169
1230
|
console.error(`[MCP] Registered ${this.tools.size} tools (${bridgedCount} via QE bridge)`);
|
package/dist/mcp/types.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ export interface ToolDefinition {
|
|
|
30
30
|
/**
|
|
31
31
|
* Tool categories for organization and lazy loading
|
|
32
32
|
*/
|
|
33
|
-
export type ToolCategory = 'core' | 'task' | 'agent' | 'domain' | 'coordination' | 'memory' | 'learning' | 'routing' | 'cross-phase' | 'infra-healing';
|
|
33
|
+
export type ToolCategory = 'core' | 'task' | 'agent' | 'domain' | 'coordination' | 'memory' | 'learning' | 'routing' | 'cross-phase' | 'infra-healing' | 'persistence';
|
|
34
34
|
/**
|
|
35
35
|
* Tool handler function type
|
|
36
36
|
*/
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
* ADR-042: Token Optimization via Pattern Reuse
|
|
4
4
|
*
|
|
5
5
|
* Enables LLM call skipping by reusing high-confidence patterns from
|
|
6
|
-
* the
|
|
6
|
+
* the IPatternStore. Uses HNSW similarity search for O(log n) pattern
|
|
7
7
|
* matching and tracks token savings statistics.
|
|
8
8
|
*/
|
|
9
|
-
import type {
|
|
9
|
+
import type { IPatternStore } from '../learning/pattern-store.js';
|
|
10
10
|
import type { QEPattern, QEDomain } from '../learning/qe-patterns.js';
|
|
11
11
|
/**
|
|
12
12
|
* Configuration for early exit token optimization
|
|
@@ -181,7 +181,7 @@ export interface EarlyExitTask {
|
|
|
181
181
|
* Early Exit Token Optimizer
|
|
182
182
|
*
|
|
183
183
|
* Enables LLM call skipping by reusing high-confidence patterns.
|
|
184
|
-
* Uses HNSW-indexed
|
|
184
|
+
* Uses HNSW-indexed IPatternStore for O(log n) similarity search.
|
|
185
185
|
*
|
|
186
186
|
* @example
|
|
187
187
|
* ```typescript
|
|
@@ -203,7 +203,7 @@ export declare class EarlyExitTokenOptimizer {
|
|
|
203
203
|
private readonly config;
|
|
204
204
|
private reuseHistory;
|
|
205
205
|
private attemptHistory;
|
|
206
|
-
constructor(patternStore:
|
|
206
|
+
constructor(patternStore: IPatternStore, config?: Partial<EarlyExitConfig>);
|
|
207
207
|
/**
|
|
208
208
|
* Check if we can skip LLM call by reusing a pattern
|
|
209
209
|
*
|
|
@@ -265,13 +265,13 @@ export declare class EarlyExitTokenOptimizer {
|
|
|
265
265
|
/**
|
|
266
266
|
* Create an EarlyExitTokenOptimizer with default configuration
|
|
267
267
|
*/
|
|
268
|
-
export declare function createEarlyExitTokenOptimizer(patternStore:
|
|
268
|
+
export declare function createEarlyExitTokenOptimizer(patternStore: IPatternStore, config?: Partial<EarlyExitConfig>): EarlyExitTokenOptimizer;
|
|
269
269
|
/**
|
|
270
270
|
* Create an EarlyExitTokenOptimizer with aggressive configuration
|
|
271
271
|
*/
|
|
272
|
-
export declare function createAggressiveTokenOptimizer(patternStore:
|
|
272
|
+
export declare function createAggressiveTokenOptimizer(patternStore: IPatternStore): EarlyExitTokenOptimizer;
|
|
273
273
|
/**
|
|
274
274
|
* Create an EarlyExitTokenOptimizer with conservative configuration
|
|
275
275
|
*/
|
|
276
|
-
export declare function createConservativeTokenOptimizer(patternStore:
|
|
276
|
+
export declare function createConservativeTokenOptimizer(patternStore: IPatternStore): EarlyExitTokenOptimizer;
|
|
277
277
|
//# sourceMappingURL=early-exit-token-optimizer.d.ts.map
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* ADR-042: Token Optimization via Pattern Reuse
|
|
4
4
|
*
|
|
5
5
|
* Enables LLM call skipping by reusing high-confidence patterns from
|
|
6
|
-
* the
|
|
6
|
+
* the IPatternStore. Uses HNSW similarity search for O(log n) pattern
|
|
7
7
|
* matching and tracks token savings statistics.
|
|
8
8
|
*/
|
|
9
9
|
import { detectQEDomain } from '../learning/qe-patterns.js';
|
|
@@ -54,7 +54,7 @@ export const CONSERVATIVE_EARLY_EXIT_CONFIG = {
|
|
|
54
54
|
* Early Exit Token Optimizer
|
|
55
55
|
*
|
|
56
56
|
* Enables LLM call skipping by reusing high-confidence patterns.
|
|
57
|
-
* Uses HNSW-indexed
|
|
57
|
+
* Uses HNSW-indexed IPatternStore for O(log n) similarity search.
|
|
58
58
|
*
|
|
59
59
|
* @example
|
|
60
60
|
* ```typescript
|
|
@@ -94,7 +94,7 @@ export class EarlyExitTokenOptimizer {
|
|
|
94
94
|
// Detect domain if not provided
|
|
95
95
|
const domain = task.domain ?? detectQEDomain(task.description) ?? undefined;
|
|
96
96
|
// Build search options
|
|
97
|
-
// Note: We don't pass minConfidence/minQualityScore to the
|
|
97
|
+
// Note: We don't pass minConfidence/minQualityScore to the IPatternStore
|
|
98
98
|
// because we want to evaluate patterns ourselves to provide proper rejection reasons
|
|
99
99
|
const searchOptions = {
|
|
100
100
|
limit: this.config.maxSearchResults * 2, // Get extra candidates for filtering
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RVF Consistency Validator (ADR-072)
|
|
3
|
+
*
|
|
4
|
+
* Periodically samples reads from both SQLite and RVF engines, compares
|
|
5
|
+
* results, and tracks divergence rate over a rolling window. Monitors
|
|
6
|
+
* RVF deadSpaceRatio and triggers compaction when needed.
|
|
7
|
+
*
|
|
8
|
+
* Used by RvfStageGate to make go/no-go decisions for stage promotion.
|
|
9
|
+
*
|
|
10
|
+
* @module persistence/rvf-consistency-validator
|
|
11
|
+
*/
|
|
12
|
+
import type { RvfStore } from '../integrations/ruvector/rvf-dual-writer.js';
|
|
13
|
+
export interface ConsistencyCheckResult {
|
|
14
|
+
/** Timestamp of the check */
|
|
15
|
+
timestamp: number;
|
|
16
|
+
/** Number of samples compared */
|
|
17
|
+
samplesChecked: number;
|
|
18
|
+
/** Number of divergences found */
|
|
19
|
+
divergences: number;
|
|
20
|
+
/** Divergence rate (0-1) */
|
|
21
|
+
divergenceRate: number;
|
|
22
|
+
/** Details of any divergences */
|
|
23
|
+
details: DivergenceDetail[];
|
|
24
|
+
/** RVF dead space ratio (if available) */
|
|
25
|
+
deadSpaceRatio: number | null;
|
|
26
|
+
/** Whether compaction was triggered */
|
|
27
|
+
compactionTriggered: boolean;
|
|
28
|
+
}
|
|
29
|
+
export interface DivergenceDetail {
|
|
30
|
+
patternId: string;
|
|
31
|
+
issue: 'missing-in-rvf' | 'missing-in-sqlite' | 'score-mismatch';
|
|
32
|
+
sqliteScore?: number;
|
|
33
|
+
rvfScore?: number;
|
|
34
|
+
}
|
|
35
|
+
export interface ValidatorConfig {
|
|
36
|
+
/** Number of random samples per check (default: 50) */
|
|
37
|
+
sampleSize: number;
|
|
38
|
+
/** Rolling window duration in ms (default: 7 days) */
|
|
39
|
+
windowDurationMs: number;
|
|
40
|
+
/** Dead space ratio threshold to trigger compaction (default: 0.3) */
|
|
41
|
+
compactionThreshold: number;
|
|
42
|
+
/** Score difference threshold to count as divergence (default: 0.05) */
|
|
43
|
+
scoreTolerance: number;
|
|
44
|
+
}
|
|
45
|
+
interface SqliteDb {
|
|
46
|
+
prepare(sql: string): {
|
|
47
|
+
run(...params: unknown[]): {
|
|
48
|
+
changes: number;
|
|
49
|
+
};
|
|
50
|
+
get(...params: unknown[]): unknown;
|
|
51
|
+
all(...params: unknown[]): unknown[];
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
export declare class RvfConsistencyValidator {
|
|
55
|
+
private readonly config;
|
|
56
|
+
private db;
|
|
57
|
+
private rvfStore;
|
|
58
|
+
private history;
|
|
59
|
+
constructor(config?: Partial<ValidatorConfig>);
|
|
60
|
+
setSqliteDb(db: SqliteDb): void;
|
|
61
|
+
setRvfStore(store: RvfStore): void;
|
|
62
|
+
/**
|
|
63
|
+
* Run a consistency check by sampling random pattern IDs from SQLite,
|
|
64
|
+
* searching for them in both engines, and comparing results.
|
|
65
|
+
*/
|
|
66
|
+
runCheck(): ConsistencyCheckResult;
|
|
67
|
+
/**
|
|
68
|
+
* Get the aggregate divergence rate over the rolling window.
|
|
69
|
+
*/
|
|
70
|
+
getRollingDivergenceRate(): number;
|
|
71
|
+
/**
|
|
72
|
+
* Get the number of consistency checks performed in the rolling window.
|
|
73
|
+
*/
|
|
74
|
+
getCheckCount(): number;
|
|
75
|
+
/**
|
|
76
|
+
* Get all check results in the rolling window.
|
|
77
|
+
*/
|
|
78
|
+
getHistory(): ConsistencyCheckResult[];
|
|
79
|
+
private getSampleIds;
|
|
80
|
+
private getSqliteEmbedding;
|
|
81
|
+
private triggerCompaction;
|
|
82
|
+
private pruneHistory;
|
|
83
|
+
}
|
|
84
|
+
export {};
|
|
85
|
+
//# sourceMappingURL=rvf-consistency-validator.d.ts.map
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RVF Consistency Validator (ADR-072)
|
|
3
|
+
*
|
|
4
|
+
* Periodically samples reads from both SQLite and RVF engines, compares
|
|
5
|
+
* results, and tracks divergence rate over a rolling window. Monitors
|
|
6
|
+
* RVF deadSpaceRatio and triggers compaction when needed.
|
|
7
|
+
*
|
|
8
|
+
* Used by RvfStageGate to make go/no-go decisions for stage promotion.
|
|
9
|
+
*
|
|
10
|
+
* @module persistence/rvf-consistency-validator
|
|
11
|
+
*/
|
|
12
|
+
const DEFAULT_CONFIG = {
|
|
13
|
+
sampleSize: 50,
|
|
14
|
+
windowDurationMs: 7 * 24 * 60 * 60 * 1000, // 7 days
|
|
15
|
+
compactionThreshold: 0.3,
|
|
16
|
+
scoreTolerance: 0.05,
|
|
17
|
+
};
|
|
18
|
+
// ============================================================================
|
|
19
|
+
// RvfConsistencyValidator
|
|
20
|
+
// ============================================================================
|
|
21
|
+
export class RvfConsistencyValidator {
|
|
22
|
+
config;
|
|
23
|
+
db = null;
|
|
24
|
+
rvfStore = null;
|
|
25
|
+
history = [];
|
|
26
|
+
constructor(config) {
|
|
27
|
+
this.config = { ...DEFAULT_CONFIG, ...config };
|
|
28
|
+
}
|
|
29
|
+
setSqliteDb(db) { this.db = db; }
|
|
30
|
+
setRvfStore(store) { this.rvfStore = store; }
|
|
31
|
+
// --------------------------------------------------------------------------
|
|
32
|
+
// Consistency Check
|
|
33
|
+
// --------------------------------------------------------------------------
|
|
34
|
+
/**
|
|
35
|
+
* Run a consistency check by sampling random pattern IDs from SQLite,
|
|
36
|
+
* searching for them in both engines, and comparing results.
|
|
37
|
+
*/
|
|
38
|
+
runCheck() {
|
|
39
|
+
const result = {
|
|
40
|
+
timestamp: Date.now(),
|
|
41
|
+
samplesChecked: 0,
|
|
42
|
+
divergences: 0,
|
|
43
|
+
divergenceRate: 0,
|
|
44
|
+
details: [],
|
|
45
|
+
deadSpaceRatio: null,
|
|
46
|
+
compactionTriggered: false,
|
|
47
|
+
};
|
|
48
|
+
if (!this.db || !this.rvfStore) {
|
|
49
|
+
this.history.push(result);
|
|
50
|
+
return result;
|
|
51
|
+
}
|
|
52
|
+
// 1. Get random sample of pattern IDs from SQLite
|
|
53
|
+
const sampleIds = this.getSampleIds(this.config.sampleSize);
|
|
54
|
+
result.samplesChecked = sampleIds.length;
|
|
55
|
+
if (sampleIds.length === 0) {
|
|
56
|
+
this.history.push(result);
|
|
57
|
+
return result;
|
|
58
|
+
}
|
|
59
|
+
// 2. For each sample, get embedding from SQLite and search both engines
|
|
60
|
+
for (const patternId of sampleIds) {
|
|
61
|
+
const embedding = this.getSqliteEmbedding(patternId);
|
|
62
|
+
if (!embedding) {
|
|
63
|
+
result.divergences++;
|
|
64
|
+
result.details.push({ patternId, issue: 'missing-in-sqlite' });
|
|
65
|
+
continue;
|
|
66
|
+
}
|
|
67
|
+
// Search RVF
|
|
68
|
+
try {
|
|
69
|
+
const rvfResults = this.rvfStore.search(embedding, 1);
|
|
70
|
+
if (rvfResults.length === 0) {
|
|
71
|
+
result.divergences++;
|
|
72
|
+
result.details.push({ patternId, issue: 'missing-in-rvf' });
|
|
73
|
+
}
|
|
74
|
+
// If RVF returns results, check that the top result ID matches
|
|
75
|
+
// (self-search should return the same pattern as top-1)
|
|
76
|
+
else if (rvfResults[0].id !== patternId && rvfResults[0].score < 0.99) {
|
|
77
|
+
result.divergences++;
|
|
78
|
+
result.details.push({
|
|
79
|
+
patternId,
|
|
80
|
+
issue: 'score-mismatch',
|
|
81
|
+
rvfScore: rvfResults[0].score,
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
catch {
|
|
86
|
+
result.divergences++;
|
|
87
|
+
result.details.push({ patternId, issue: 'missing-in-rvf' });
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
result.divergenceRate = result.samplesChecked > 0
|
|
91
|
+
? result.divergences / result.samplesChecked
|
|
92
|
+
: 0;
|
|
93
|
+
// 3. Check dead space ratio and trigger compaction if needed
|
|
94
|
+
try {
|
|
95
|
+
const rvfStatus = this.rvfStore.status();
|
|
96
|
+
const deadSpace = rvfStatus.deadSpaceRatio;
|
|
97
|
+
result.deadSpaceRatio = deadSpace ?? null;
|
|
98
|
+
if (deadSpace != null && deadSpace > this.config.compactionThreshold) {
|
|
99
|
+
this.triggerCompaction();
|
|
100
|
+
result.compactionTriggered = true;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
catch {
|
|
104
|
+
// Status check is best-effort
|
|
105
|
+
}
|
|
106
|
+
// 4. Add to history and prune old entries
|
|
107
|
+
this.history.push(result);
|
|
108
|
+
this.pruneHistory();
|
|
109
|
+
return result;
|
|
110
|
+
}
|
|
111
|
+
// --------------------------------------------------------------------------
|
|
112
|
+
// Rolling Window Metrics
|
|
113
|
+
// --------------------------------------------------------------------------
|
|
114
|
+
/**
|
|
115
|
+
* Get the aggregate divergence rate over the rolling window.
|
|
116
|
+
*/
|
|
117
|
+
getRollingDivergenceRate() {
|
|
118
|
+
const windowStart = Date.now() - this.config.windowDurationMs;
|
|
119
|
+
const inWindow = this.history.filter(h => h.timestamp >= windowStart);
|
|
120
|
+
if (inWindow.length === 0)
|
|
121
|
+
return 0;
|
|
122
|
+
const totalSamples = inWindow.reduce((s, h) => s + h.samplesChecked, 0);
|
|
123
|
+
const totalDivergences = inWindow.reduce((s, h) => s + h.divergences, 0);
|
|
124
|
+
return totalSamples > 0 ? totalDivergences / totalSamples : 0;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Get the number of consistency checks performed in the rolling window.
|
|
128
|
+
*/
|
|
129
|
+
getCheckCount() {
|
|
130
|
+
const windowStart = Date.now() - this.config.windowDurationMs;
|
|
131
|
+
return this.history.filter(h => h.timestamp >= windowStart).length;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Get all check results in the rolling window.
|
|
135
|
+
*/
|
|
136
|
+
getHistory() {
|
|
137
|
+
const windowStart = Date.now() - this.config.windowDurationMs;
|
|
138
|
+
return this.history.filter(h => h.timestamp >= windowStart);
|
|
139
|
+
}
|
|
140
|
+
// --------------------------------------------------------------------------
|
|
141
|
+
// Private
|
|
142
|
+
// --------------------------------------------------------------------------
|
|
143
|
+
getSampleIds(count) {
|
|
144
|
+
if (!this.db)
|
|
145
|
+
return [];
|
|
146
|
+
try {
|
|
147
|
+
const rows = this.db.prepare(`SELECT pattern_id FROM qe_pattern_embeddings ORDER BY RANDOM() LIMIT ?`).all(count);
|
|
148
|
+
return rows.map(r => r.pattern_id);
|
|
149
|
+
}
|
|
150
|
+
catch {
|
|
151
|
+
return [];
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
getSqliteEmbedding(patternId) {
|
|
155
|
+
if (!this.db)
|
|
156
|
+
return null;
|
|
157
|
+
try {
|
|
158
|
+
const row = this.db.prepare('SELECT embedding, dimension FROM qe_pattern_embeddings WHERE pattern_id = ?').get(patternId);
|
|
159
|
+
if (!row)
|
|
160
|
+
return null;
|
|
161
|
+
return new Float32Array(row.embedding.buffer, row.embedding.byteOffset, row.dimension);
|
|
162
|
+
}
|
|
163
|
+
catch {
|
|
164
|
+
return null;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
triggerCompaction() {
|
|
168
|
+
// RVF compaction via the store's compact method (if available)
|
|
169
|
+
try {
|
|
170
|
+
const store = this.rvfStore;
|
|
171
|
+
store.compact?.();
|
|
172
|
+
}
|
|
173
|
+
catch {
|
|
174
|
+
// Compaction is best-effort
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
pruneHistory() {
|
|
178
|
+
const cutoff = Date.now() - this.config.windowDurationMs;
|
|
179
|
+
this.history = this.history.filter(h => h.timestamp >= cutoff);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
//# sourceMappingURL=rvf-consistency-validator.js.map
|