agentic-qe 3.9.33 → 3.9.35
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 +104 -0
- package/assets/skills/skills-manifest.json +1 -1
- package/dist/audit/witness-chain.d.ts +7 -0
- package/dist/audit/witness-chain.js +9 -0
- package/dist/cli/bundle.js +5 -5
- package/dist/cli/chunks/adapter-JUISYMI3.js +2 -0
- package/dist/cli/chunks/{agent-booster-wasm-DUOP4SS6.js → agent-booster-wasm-4PJZ34PF.js} +2 -2
- package/dist/cli/chunks/{agent-handler-6AHMQ5OK.js → agent-handler-OB5JATVT.js} +2 -2
- package/dist/cli/chunks/{agent-memory-branch-77WTL4KU.js → agent-memory-branch-ZEHRWZ5R.js} +2 -2
- package/dist/cli/chunks/aqe-learning-engine-DEIUPULJ.js +2 -0
- package/dist/cli/chunks/{audit-ZRSUAGID.js → audit-PWFRSBBW.js} +2 -2
- package/dist/cli/chunks/base-7SMQWXHT.js +2 -0
- package/dist/cli/chunks/{hnswlib-node-SDVX3I7F.js → better-sqlite3-XEIBI22V.js} +2 -2
- package/dist/cli/chunks/{brain-handler-EPNKL22C.js → brain-handler-6SMUCFO7.js} +3 -3
- package/dist/cli/chunks/{branch-enumerator-VVPWHTZ4.js → branch-enumerator-U6ROQR4O.js} +2 -2
- package/dist/cli/chunks/{browser-NNQ6UHFJ.js → browser-BMM57TA3.js} +2 -2
- package/dist/cli/chunks/browser-workflow-4DGHRZLS.js +2 -0
- package/dist/cli/chunks/{chunk-KQDWD34T.js → chunk-2FTSVPVG.js} +1 -1
- package/dist/cli/chunks/{chunk-JHFQJKTW.js → chunk-2ICMLI2T.js} +2 -2
- package/dist/cli/chunks/{chunk-IQ5OS342.js → chunk-2UY3X3KE.js} +9 -9
- package/dist/cli/chunks/{chunk-2NRCDJBB.js → chunk-3BDZSWCA.js} +2 -2
- package/dist/cli/chunks/{chunk-DLUEORKO.js → chunk-3R6YQEQY.js} +4 -4
- package/dist/cli/chunks/{chunk-TGMZ7K72.js → chunk-3UGY4ZQB.js} +1 -1
- package/dist/cli/chunks/{chunk-FRS4DYHG.js → chunk-3YIVRMQB.js} +1 -1
- package/dist/cli/chunks/{chunk-54B5QL4A.js → chunk-42QMNST6.js} +2 -2
- package/dist/cli/chunks/{chunk-4HJAUI2N.js → chunk-4HJVTKJD.js} +1 -1
- package/dist/cli/chunks/{chunk-LFPYLTNN.js → chunk-4NVDPO7L.js} +2 -2
- package/dist/cli/chunks/{chunk-LAPIIGZ2.js → chunk-4UZ7G2KT.js} +2 -2
- package/dist/cli/chunks/{chunk-4MRVNLCT.js → chunk-4YKHVRQH.js} +3 -3
- package/dist/cli/chunks/{chunk-JEGTTVTL.js → chunk-56O5V5MP.js} +2 -2
- package/dist/cli/chunks/{chunk-SR2EV7PQ.js → chunk-5CZDHJZX.js} +1 -1
- package/dist/cli/chunks/{chunk-VJHKNSOC.js → chunk-5Q7X5SDB.js} +2 -2
- package/dist/cli/chunks/{chunk-KF3R6OCB.js → chunk-5XXZQCHS.js} +1 -1
- package/dist/cli/chunks/{chunk-6DBS53L7.js → chunk-6CCKOU2U.js} +2 -2
- package/dist/cli/chunks/{chunk-KLTN2AVK.js → chunk-6SN55CMC.js} +2 -2
- package/dist/cli/chunks/{chunk-TIEXYJMS.js → chunk-6TYWIS4R.js} +2 -2
- package/dist/cli/chunks/{chunk-H5AQHFIA.js → chunk-6WZNRHJJ.js} +1 -1
- package/dist/cli/chunks/{chunk-LERCHSFI.js → chunk-72HXOVRN.js} +1 -1
- package/dist/cli/chunks/{chunk-JF4SWEMU.js → chunk-7RNLOYAP.js} +2 -2
- package/dist/cli/chunks/{chunk-C2XCETKV.js → chunk-A5LZVQQL.js} +3 -3
- package/dist/cli/chunks/chunk-A7QP5E46.js +2 -0
- package/dist/cli/chunks/{chunk-JMSQW6KN.js → chunk-AAVOYIKA.js} +1 -1
- package/dist/cli/chunks/chunk-ACL5JFJR.js +2 -0
- package/dist/cli/chunks/{chunk-CCSISDAP.js → chunk-BBHTM2RF.js} +1 -1
- package/dist/cli/chunks/chunk-BCD2IMXF.js +9 -0
- package/dist/cli/chunks/{chunk-LXWXZPEB.js → chunk-BEJAUYFA.js} +2 -2
- package/dist/cli/chunks/{chunk-GVO53VR5.js → chunk-BKF3E3UJ.js} +1 -1
- package/dist/cli/chunks/{chunk-ZUFM5K7F.js → chunk-BSM7YJBY.js} +1 -1
- package/dist/cli/chunks/{chunk-PIINM2PD.js → chunk-BTPDHALG.js} +2 -2
- package/dist/cli/chunks/{chunk-3J4TTZP7.js → chunk-BTQA2E2Y.js} +2 -2
- package/dist/cli/chunks/{chunk-23VQRQCC.js → chunk-BXBUUSJN.js} +3 -3
- package/dist/cli/chunks/{chunk-BLNISJ3M.js → chunk-C7QVMFCJ.js} +3 -3
- package/dist/cli/chunks/{chunk-GLA2TD4M.js → chunk-CMKNLC3Q.js} +4 -4
- package/dist/cli/chunks/{chunk-7HRE2VTG.js → chunk-CROIRPKG.js} +2 -2
- package/dist/cli/chunks/{chunk-MZ6GBVQY.js → chunk-CTU4V32J.js} +2 -2
- package/dist/cli/chunks/{chunk-L77OGJVK.js → chunk-D2ITP3ON.js} +2 -2
- package/dist/cli/chunks/{chunk-Q5JL7NZG.js → chunk-DEJW6GYF.js} +2 -2
- package/dist/cli/chunks/{chunk-LKEQBIX2.js → chunk-E7N6CRFV.js} +1 -1
- package/dist/cli/chunks/{chunk-IWBJ7KB7.js → chunk-F6R2TGNS.js} +2 -2
- package/dist/cli/chunks/{chunk-IXWIABRJ.js → chunk-FMAUTL26.js} +2 -2
- package/dist/cli/chunks/{chunk-7ZMRQKO2.js → chunk-FMV22K3J.js} +2 -2
- package/dist/cli/chunks/{chunk-AVQS5H7Y.js → chunk-FMZ7I4XV.js} +1 -1
- package/dist/cli/chunks/{chunk-LJBVPR3Z.js → chunk-FPPV7TYI.js} +2 -2
- package/dist/cli/chunks/{chunk-UBOH75WQ.js → chunk-FXITHMQB.js} +4 -4
- package/dist/cli/chunks/{chunk-EYCV6IYA.js → chunk-G6BJ5I57.js} +1 -1
- package/dist/cli/chunks/{chunk-WRPQJZSP.js → chunk-GHMIADYW.js} +2 -2
- package/dist/cli/chunks/{chunk-JGCTXHHZ.js → chunk-GQCIW2ZZ.js} +1 -1
- package/dist/cli/chunks/{chunk-B4N7XODV.js → chunk-GR732YA3.js} +2 -2
- package/dist/cli/chunks/{chunk-CG2IM6IA.js → chunk-GWROZUWK.js} +1 -1
- package/dist/cli/chunks/{chunk-JTXZ3MMZ.js → chunk-GWXP36YP.js} +2 -2
- package/dist/cli/chunks/{chunk-KGA5XCHX.js → chunk-H7V3ZQT7.js} +2 -2
- package/dist/cli/chunks/{chunk-MI5TV5HT.js → chunk-HAOGVFKR.js} +2 -2
- package/dist/cli/chunks/{chunk-BD6BS2AL.js → chunk-HGJGU625.js} +2 -2
- package/dist/cli/chunks/{chunk-GBMKXJKW.js → chunk-HKQ23RPJ.js} +5 -5
- package/dist/cli/chunks/{chunk-HCAWQ7ZD.js → chunk-HMIRBSTI.js} +2 -2
- package/dist/cli/chunks/{chunk-JJY6K3OI.js → chunk-HSR7EHVN.js} +1 -1
- package/dist/cli/chunks/{chunk-QCFJQZXN.js → chunk-I5XEXLBF.js} +1 -1
- package/dist/cli/chunks/{chunk-TNQW3FUW.js → chunk-I7XQT6YM.js} +2 -2
- package/dist/cli/chunks/{chunk-6TC6UCDL.js → chunk-ICYM7H6T.js} +2 -2
- package/dist/cli/chunks/{chunk-SFNSMZGU.js → chunk-II6DIMY6.js} +2 -2
- package/dist/cli/chunks/{chunk-OPC4ZVSN.js → chunk-INCNWH3R.js} +2 -2
- package/dist/cli/chunks/{chunk-YDIHYU7V.js → chunk-IQ363U37.js} +2 -2
- package/dist/cli/chunks/{chunk-46LV5MI3.js → chunk-IXOGBA7C.js} +13 -13
- package/dist/cli/chunks/{chunk-EVDEFUJG.js → chunk-J2LOP3GE.js} +2 -2
- package/dist/cli/chunks/{chunk-BIXDUMZ4.js → chunk-JNK742DP.js} +1 -1
- package/dist/cli/chunks/{chunk-473YM6LV.js → chunk-JW4N25B5.js} +2 -2
- package/dist/cli/chunks/{chunk-NCTSH4T6.js → chunk-KAEWFVGD.js} +2 -2
- package/dist/cli/chunks/{chunk-HVC3F4IM.js → chunk-M4BCSFVN.js} +1 -1
- package/dist/cli/chunks/{chunk-C5UGKQUG.js → chunk-M7TDNJMZ.js} +1 -1
- package/dist/cli/chunks/{chunk-QYIGUM3F.js → chunk-MHUPY3YO.js} +2 -2
- package/dist/cli/chunks/{chunk-GU5DISHT.js → chunk-MSEG7GKM.js} +1 -1
- package/dist/cli/chunks/chunk-NAVH552F.js +15 -0
- package/dist/cli/chunks/{chunk-F6WQ3ES6.js → chunk-NFIOKKA6.js} +2 -2
- package/dist/cli/chunks/{chunk-63SAZCUH.js → chunk-NJUNYXMH.js} +2 -2
- package/dist/cli/chunks/{chunk-N44DNZTM.js → chunk-NPUMPLL7.js} +1 -1
- package/dist/cli/chunks/{chunk-V7GV54AY.js → chunk-NS4P3VRA.js} +2 -2
- package/dist/cli/chunks/{chunk-IYDZ4NWA.js → chunk-NWWXVXXG.js} +2 -2
- package/dist/cli/chunks/{chunk-UDJLIERV.js → chunk-NZB2JE2D.js} +2 -2
- package/dist/cli/chunks/{chunk-5RILQ3EG.js → chunk-O3MTYRBX.js} +1 -1
- package/dist/cli/chunks/{chunk-ZGR5LFER.js → chunk-OJ5GBEXU.js} +2 -2
- package/dist/cli/chunks/{chunk-FQQJUIN7.js → chunk-OPD6AENV.js} +2 -2
- package/dist/cli/chunks/chunk-PHJK33IV.js +2 -0
- package/dist/cli/chunks/{chunk-24M7JF3G.js → chunk-PK3NAZQI.js} +2 -2
- package/dist/cli/chunks/{chunk-6S5H34AN.js → chunk-PY7PJT2Y.js} +2 -2
- package/dist/cli/chunks/{chunk-YCD3EBQJ.js → chunk-QOAVXGAU.js} +2 -2
- package/dist/cli/chunks/{chunk-FHSCCEHZ.js → chunk-RP5SDWCL.js} +22 -16
- package/dist/cli/chunks/{chunk-MFMPTRZW.js → chunk-RPRFDO23.js} +1 -1
- package/dist/cli/chunks/{chunk-AL54ARD4.js → chunk-RZDMSTAQ.js} +2 -2
- package/dist/cli/chunks/{chunk-GJKTHVFE.js → chunk-S3QU54ZQ.js} +1 -1
- package/dist/cli/chunks/{chunk-DEXOYNIQ.js → chunk-SBDRHY3I.js} +2 -2
- package/dist/cli/chunks/{chunk-NFFA2UKL.js → chunk-SI6VUQSI.js} +3 -3
- package/dist/cli/chunks/{chunk-RP2RRUKT.js → chunk-SMPMLODT.js} +1 -1
- package/dist/cli/chunks/{chunk-VVGXCLJF.js → chunk-SSJV4AZ7.js} +5 -5
- package/dist/cli/chunks/{chunk-HRE4TFMN.js → chunk-T26ENWX5.js} +8 -8
- package/dist/cli/chunks/{chunk-MAP6IAOP.js → chunk-T2QVCK56.js} +1 -1
- package/dist/cli/chunks/{chunk-NNFWNI6A.js → chunk-T4HZLBM4.js} +2 -2
- package/dist/cli/chunks/{chunk-FEJCPLXV.js → chunk-TE27EK44.js} +2 -2
- package/dist/cli/chunks/{chunk-U5L7FALK.js → chunk-TLBIFZM4.js} +2 -2
- package/dist/cli/chunks/{chunk-OXGZKXSI.js → chunk-UDKBQAAH.js} +2 -2
- package/dist/cli/chunks/{chunk-AGMHJ3GS.js → chunk-UJTI5MRE.js} +2 -2
- package/dist/cli/chunks/{chunk-3B5ZAFB2.js → chunk-UQ6JC3UY.js} +3 -3
- package/dist/cli/chunks/{chunk-K5YL3O22.js → chunk-VLZ3LC6L.js} +2 -2
- package/dist/cli/chunks/{chunk-MULV6D5J.js → chunk-VMMPOLUV.js} +2 -2
- package/dist/cli/chunks/{chunk-R3U7DSLA.js → chunk-WFVBK7N3.js} +2 -2
- package/dist/cli/chunks/{chunk-UYMA75Y4.js → chunk-WGWOCTQW.js} +1 -1
- package/dist/cli/chunks/{chunk-JPJURL4N.js → chunk-WSJN6HFR.js} +2 -2
- package/dist/cli/chunks/{chunk-KD2B54EH.js → chunk-WU3RGTLV.js} +1 -1
- package/dist/cli/chunks/{chunk-VSV6PV47.js → chunk-X27VMOIH.js} +1 -1
- package/dist/cli/chunks/{chunk-GY2G2YYH.js → chunk-X3GKTB6R.js} +1 -1
- package/dist/cli/chunks/{chunk-CAZQL4G2.js → chunk-XMCMLPXY.js} +2 -2
- package/dist/cli/chunks/{chunk-TLVEBQCX.js → chunk-XUZ73S3Y.js} +2 -2
- package/dist/cli/chunks/{chunk-VK7AXSAI.js → chunk-YBGQT3OS.js} +2 -2
- package/dist/cli/chunks/{chunk-BOHAND5J.js → chunk-YL56FMCJ.js} +1 -1
- package/dist/cli/chunks/{chunk-QSH4Y5E6.js → chunk-YLYKRAGZ.js} +2 -2
- package/dist/cli/chunks/{chunk-LYWA4OU6.js → chunk-YPJ2O3TE.js} +2 -2
- package/dist/cli/chunks/{chunk-HJETZJJO.js → chunk-YQRABKOC.js} +2 -2
- package/dist/cli/chunks/{chunk-LICFVB4C.js → chunk-YTB7DDLE.js} +1 -1
- package/dist/cli/chunks/{chunk-JYDWDNNZ.js → chunk-YYKZVBIG.js} +2 -2
- package/dist/cli/chunks/{chunk-TH2BBFJ6.js → chunk-Z6NUCGQA.js} +1 -1
- package/dist/cli/chunks/{chunk-ZSDK26IP.js → chunk-ZAGCKWOC.js} +1 -1
- package/dist/cli/chunks/{ci-WZ4E35B6.js → ci-GXSOJB6I.js} +2 -2
- package/dist/cli/chunks/{ci-output-WMYWSAHI.js → ci-output-GNUGZD2F.js} +2 -2
- package/dist/cli/chunks/{circuit-breaker-4E4ZZ47P.js → circuit-breaker-LAW2AAHF.js} +2 -2
- package/dist/cli/chunks/{claude-flow-setup-Q37FECGF.js → claude-flow-setup-VF5NUUJZ.js} +2 -2
- package/dist/cli/chunks/client-OSUT6W6W.js +2 -0
- package/dist/cli/chunks/{cline-installer-O7GPSWES.js → cline-installer-H7RPYI3G.js} +2 -2
- package/dist/cli/chunks/{code-AEIXP2UD.js → code-COHRPYF6.js} +2 -2
- package/dist/cli/chunks/{code-index-extractor-5RXCWE5W.js → code-index-extractor-353PWY6B.js} +2 -2
- package/dist/cli/chunks/{codex-installer-HDPSP2IN.js → codex-installer-DIXHDH63.js} +2 -2
- package/dist/cli/chunks/{completions-LYTPZCND.js → completions-NGPREB6E.js} +2 -2
- package/dist/cli/chunks/{complexity-analyzer-WBRRBUIA.js → complexity-analyzer-BO3QCTWT.js} +2 -2
- package/dist/cli/chunks/{continuedev-installer-6KICDS72.js → continuedev-installer-SG4HUNX6.js} +2 -2
- package/dist/cli/chunks/{copilot-installer-2YI4SWDH.js → copilot-installer-RC6ZFHQG.js} +2 -2
- package/dist/cli/chunks/{cost-tracker-YEVYFYK5.js → cost-tracker-Q76KFISR.js} +2 -2
- package/dist/cli/chunks/{coverage-MO2TU62L.js → coverage-PT23ZOGU.js} +3 -3
- package/dist/cli/chunks/cross-domain-router-X5EEGWMA.js +2 -0
- package/dist/cli/chunks/{cursor-installer-AO2JNN27.js → cursor-installer-ZDS65WC6.js} +2 -2
- package/dist/cli/chunks/{daemon-WCSJ3HS2.js → daemon-M32BWOES.js} +4 -4
- package/dist/cli/chunks/{daemon-6DWF4GAR.js → daemon-ZRDBUK4Q.js} +3 -3
- package/dist/cli/chunks/{dag-attention-scheduler-NI6TAE7Y.js → dag-attention-scheduler-GUPZT7PR.js} +2 -2
- package/dist/cli/chunks/{detect-3MTKRZEI.js → detect-PZNLC2CO.js} +2 -2
- package/dist/cli/chunks/{dist-node-32YFXCS3.js → dist-node-QO5MMHVF.js} +2 -2
- package/dist/cli/chunks/{domain-handler-TFVVUKSC.js → domain-handler-OH2YSZCT.js} +2 -2
- package/dist/cli/chunks/{domain-transfer-7HWX6PVA.js → domain-transfer-TVTK2YX5.js} +2 -2
- package/dist/cli/chunks/dream-CP4VOPNU.js +2 -0
- package/dist/cli/chunks/{embed-and-insert-pattern-GGNDGEHX.js → embed-and-insert-pattern-2ARE7NCX.js} +2 -2
- package/dist/cli/chunks/{eval-T2KWZU2L.js → eval-64RXRKM4.js} +2 -2
- package/dist/cli/chunks/{experience-capture-middleware-JHQPDNVK.js → experience-capture-middleware-TH7JERGY.js} +3 -3
- package/dist/cli/chunks/{fast-paths-KJQ56NG6.js → fast-paths-IAWNSJFU.js} +2 -2
- package/dist/cli/chunks/{feature-flags-DJU7Z6UH.js → feature-flags-22FDDEFG.js} +2 -2
- package/dist/cli/chunks/{feature-flags-IPK5DUQM.js → feature-flags-TAKLIOWM.js} +2 -2
- package/dist/cli/chunks/{file-discovery-G5I7VV34.js → file-discovery-QWEHC5VO.js} +2 -2
- package/dist/cli/chunks/{fleet-BRKXQGTC.js → fleet-5PQX4H2Q.js} +3 -3
- package/dist/cli/chunks/{gnn-wrapper-F44UEMIK.js → gnn-wrapper-RR5EYGCL.js} +2 -2
- package/dist/cli/chunks/{heartbeat-handler-4EJQ3VWP.js → heartbeat-handler-QOVPD6JV.js} +4 -4
- package/dist/cli/chunks/heartbeat-scheduler-MX7EHYU5.js +2 -0
- package/dist/cli/chunks/hnsw-adapter-B7FZYZGZ.js +2 -0
- package/dist/cli/chunks/hnsw-index-7OVB67MX.js +2 -0
- package/dist/cli/chunks/{hnsw-legacy-bridge-HVFM7LAR.js → hnsw-legacy-bridge-RRTRMCEL.js} +2 -2
- package/dist/cli/chunks/{better-sqlite3-QOENX3WX.js → hnswlib-node-XEOLAMMR.js} +2 -2
- package/dist/cli/chunks/{hooks-QFQSVB2C.js → hooks-DTEIDS42.js} +34 -34
- package/dist/cli/chunks/{hybrid-router-TZPIYG3I.js → hybrid-router-E36GZC7Q.js} +2 -2
- package/dist/cli/chunks/{hypergraph-engine-HXG5GI27.js → hypergraph-engine-7VTF3N6A.js} +2 -2
- package/dist/cli/chunks/{hypergraph-handler-R4LFFQ3Z.js → hypergraph-handler-CTUGX3DL.js} +3 -3
- package/dist/cli/chunks/impact-analyzer-TG34YBHU.js +2 -0
- package/dist/cli/chunks/{init-handler-NJKVTURQ.js → init-handler-HRSUGKSE.js} +6 -6
- package/dist/cli/chunks/init-wizard-MS3A2X5C.js +2 -0
- package/dist/cli/chunks/kernel-J4IW4DA6.js +2 -0
- package/dist/cli/chunks/{kilocode-installer-T6CMAQ6P.js → kilocode-installer-UGB5UY5B.js} +2 -2
- package/dist/cli/chunks/{kiro-installer-IOAHUSWU.js → kiro-installer-7SAM5O2F.js} +2 -2
- package/dist/cli/chunks/knowledge-graph-4LCYX5AN.js +2 -0
- package/dist/cli/chunks/{learning-2AH5KAFV.js → learning-GBRPEBXN.js} +3 -3
- package/dist/cli/chunks/{llm-router-I3YBDMC7.js → llm-router-YP2RW2QC.js} +4 -4
- package/dist/cli/chunks/{load-MTLOPMP4.js → load-3TRJPJBJ.js} +2 -2
- package/dist/cli/chunks/load-test-TFBVT7V3.js +2 -0
- package/dist/cli/chunks/{mcp-EEINX3NP.js → mcp-U7ZYZTEU.js} +2 -2
- package/dist/cli/chunks/{memory-OBDYP5P7.js → memory-CLBPDAAE.js} +5 -5
- package/dist/cli/chunks/memory-backend-E7OCG27P.js +2 -0
- package/dist/cli/chunks/{memory-handlers-TTMZ2JK6.js → memory-handlers-JEOU6AOR.js} +2 -2
- package/dist/cli/chunks/{multi-model-executor-OCANACFF.js → multi-model-executor-MPPD63KI.js} +2 -2
- package/dist/cli/chunks/{opencode-installer-4PNJOOKX.js → opencode-installer-DIMXI5PK.js} +2 -2
- package/dist/cli/chunks/{orchestrator-DGIKNLST.js → orchestrator-YKOSNTFS.js} +5 -5
- package/dist/cli/chunks/{pipeline-4DZ3FRRT.js → pipeline-SDCM3CNA.js} +2 -2
- package/dist/cli/chunks/{platform-A27VETGX.js → platform-7UH4BXN7.js} +2 -2
- package/dist/cli/chunks/{plugin-SAIG2MCN.js → plugin-KIVAXJ3P.js} +2 -2
- package/dist/cli/chunks/{prime-radiant-advanced-wasm-XBCJETFT.js → prime-radiant-advanced-wasm-PONLGWM6.js} +2 -2
- package/dist/cli/chunks/protocol-executor-MYFH7ZP4.js +2 -0
- package/dist/cli/chunks/{protocol-handler-NDOZLFK7.js → protocol-handler-6RYLLDOG.js} +2 -2
- package/dist/cli/chunks/{prove-XVUI5VJL.js → prove-PDFFRQQW.js} +2 -2
- package/dist/cli/chunks/{provider-manager-W6CZHTWY.js → provider-manager-I6R4EQGK.js} +2 -2
- package/dist/cli/chunks/qe-reasoning-bank-G46PVD2U.js +2 -0
- package/dist/cli/chunks/{quality-MRCQ7SDM.js → quality-KQVKAGWL.js} +2 -2
- package/dist/cli/chunks/queen-coordinator-ZQRKBBUH.js +2 -0
- package/dist/cli/chunks/{real-embeddings-3NBKHQSF.js → real-embeddings-VQXMPAH6.js} +2 -2
- package/dist/cli/chunks/{roocode-installer-FPWTSZG7.js → roocode-installer-RYPQ25JO.js} +2 -2
- package/dist/cli/chunks/router-UBQULTOO.js +2 -0
- package/dist/cli/chunks/routing-feedback-3VBS3SYD.js +2 -0
- package/dist/cli/chunks/{routing-handler-SYAT3QTK.js → routing-handler-U4FEWPIN.js} +2 -2
- package/dist/cli/chunks/{ruvector-commands-Y3JV2RC4.js → ruvector-commands-YID52EZ6.js} +2 -2
- package/dist/cli/chunks/{rvf-dual-writer-4IS5JKSA.js → rvf-dual-writer-HABBORJW.js} +2 -2
- package/dist/cli/chunks/{rvf-migration-adapter-FPEUOS55.js → rvf-migration-adapter-JE5NWU3J.js} +2 -2
- package/dist/cli/chunks/{rvf-migration-coordinator-FR4NHRNG.js → rvf-migration-coordinator-FBIFWTAD.js} +2 -2
- package/dist/cli/chunks/rvf-native-adapter-NDKSHCMG.js +2 -0
- package/dist/cli/chunks/safe-db-ZPGX4NYW.js +2 -0
- package/dist/cli/chunks/schedule-JZUKDE6O.js +2 -0
- package/dist/cli/chunks/scheduler-7YIQOOW3.js +2 -0
- package/dist/cli/chunks/{security-EPJBWOM2.js → security-22ERFMD6.js} +3 -3
- package/dist/cli/chunks/shared-rvf-adapter-YU7XN6ND.js +2 -0
- package/dist/cli/chunks/{shared-rvf-dual-writer-MSUS3ROX.js → shared-rvf-dual-writer-G5VIQHSN.js} +2 -2
- package/dist/cli/chunks/sqlite-persistence-4STSI5SJ.js +2 -0
- package/dist/cli/chunks/{status-handler-7T6ZWWSG.js → status-handler-5B3FP2DN.js} +2 -2
- package/dist/cli/chunks/{structural-health-IT5COKMM.js → structural-health-6YSKVKQG.js} +2 -2
- package/dist/cli/chunks/{sync-MVC5LKWT.js → sync-2YCW23XX.js} +2 -2
- package/dist/cli/chunks/{sync-CYTAJ62F.js → sync-OFSJUYBU.js} +2 -2
- package/dist/cli/chunks/{task-handler-R5T6DQ62.js → task-handler-6OIPFSXX.js} +2 -2
- package/dist/cli/chunks/{task-handlers-BQDACRA4.js → task-handlers-6QY5Q5IH.js} +3 -3
- package/dist/cli/chunks/{test-JQ6DNHJU.js → test-VR6EP23Y.js} +4 -4
- package/dist/cli/chunks/{test-scheduling-47CCXYB3.js → test-scheduling-OI7N5QBA.js} +3 -3
- package/dist/cli/chunks/{token-bootstrap-THINRRHA.js → token-bootstrap-HZES3TAA.js} +2 -2
- package/dist/cli/chunks/{token-usage-AQOWJPTG.js → token-usage-2NSXSNS7.js} +2 -2
- package/dist/cli/chunks/{transformers-KRVEZU55.js → transformers-4U4PX5YQ.js} +2 -2
- package/dist/cli/chunks/{tree-sitter-wasm-parser-UDOTWN4W.js → tree-sitter-wasm-parser-NQ3JYKHC.js} +2 -2
- package/dist/cli/chunks/{types-YZSDKHGD.js → types-YGTXBQ4T.js} +2 -2
- package/dist/cli/chunks/unified-memory-R72C7IBY.js +2 -0
- package/dist/cli/chunks/unified-memory-hnsw-A4LOFKDQ.js +2 -0
- package/dist/cli/chunks/unified-persistence-MYD2R4LE.js +2 -0
- package/dist/cli/chunks/{upgrade-UX6VHS4H.js → upgrade-GS4EJOHW.js} +2 -2
- package/dist/cli/chunks/{validate-SUS7IEZG.js → validate-4X7OETYQ.js} +2 -2
- package/dist/cli/chunks/{validate-swarm-E2YE6GY2.js → validate-swarm-RSVPLHZQ.js} +2 -2
- package/dist/cli/chunks/{vibium-UZMTKRTE.js → vibium-SN2J4QEA.js} +2 -2
- package/dist/cli/chunks/visual-security-CUKQ5N37.js +2 -0
- package/dist/cli/chunks/{web-tree-sitter-XXU37FYS.js → web-tree-sitter-ZO6DPXRC.js} +2 -2
- package/dist/cli/chunks/{windsurf-installer-WRTVYD3Y.js → windsurf-installer-RGSOOJSH.js} +2 -2
- package/dist/cli/chunks/{witness-chain-6OSAEH67.js → witness-chain-7XBKRDAW.js} +2 -2
- package/dist/cli/chunks/witness-chain-S7ADS6TA.js +2 -0
- package/dist/cli/chunks/{workflow-7XKEQVKT.js → workflow-H7KG5R6L.js} +4 -4
- package/dist/cli/chunks/workflow-orchestrator-3GIDXU43.js +2 -0
- package/dist/cli/chunks/{wrappers-2HDILUDI.js → wrappers-3YCDNHDG.js} +2 -2
- package/dist/cli/commands/hooks-handlers/hooks-shared.js +12 -21
- package/dist/integrations/ruvector/rvf-dual-writer.d.ts +22 -0
- package/dist/integrations/ruvector/rvf-dual-writer.js +21 -0
- package/dist/integrations/ruvector/rvf-native-adapter.d.ts +18 -1
- package/dist/integrations/ruvector/rvf-native-adapter.js +15 -1
- package/dist/integrations/ruvector/shared-rvf-adapter.d.ts +46 -1
- package/dist/integrations/ruvector/shared-rvf-adapter.js +137 -0
- package/dist/kernel/hybrid-backend.d.ts +14 -3
- package/dist/kernel/hybrid-backend.js +16 -3
- package/dist/kernel/unified-memory.d.ts +3 -1
- package/dist/kernel/unified-memory.js +28 -3
- package/dist/learning/dream/dream-scheduler.d.ts +18 -0
- package/dist/learning/dream/dream-scheduler.js +68 -0
- package/dist/learning/qe-reasoning-bank.js +19 -2
- package/dist/learning/sqlite-persistence.d.ts +11 -0
- package/dist/learning/sqlite-persistence.js +30 -0
- package/dist/mcp/bundle.js +352 -346
- package/package.json +6 -2
- package/dist/cli/chunks/adapter-PSHWPJGO.js +0 -2
- package/dist/cli/chunks/aqe-learning-engine-2WOSQ42V.js +0 -2
- package/dist/cli/chunks/base-QZ6CGEZG.js +0 -2
- package/dist/cli/chunks/browser-workflow-T74U33BJ.js +0 -2
- package/dist/cli/chunks/chunk-AE7P7VDM.js +0 -9
- package/dist/cli/chunks/chunk-LVCQ4LSA.js +0 -2
- package/dist/cli/chunks/chunk-MCONVCB6.js +0 -15
- package/dist/cli/chunks/chunk-ND33EKHX.js +0 -2
- package/dist/cli/chunks/chunk-SHAXRSWJ.js +0 -2
- package/dist/cli/chunks/client-3YW2WA67.js +0 -2
- package/dist/cli/chunks/cross-domain-router-2MAV2XPY.js +0 -2
- package/dist/cli/chunks/dream-4N3YBX36.js +0 -2
- package/dist/cli/chunks/heartbeat-scheduler-5KZS7T6Q.js +0 -2
- package/dist/cli/chunks/hnsw-adapter-A4XK3GZU.js +0 -2
- package/dist/cli/chunks/hnsw-index-TI7LZBWF.js +0 -2
- package/dist/cli/chunks/impact-analyzer-NQZBRTZH.js +0 -2
- package/dist/cli/chunks/init-wizard-UZR2AKQA.js +0 -2
- package/dist/cli/chunks/kernel-2HFKLNTS.js +0 -2
- package/dist/cli/chunks/knowledge-graph-GHICW2ZM.js +0 -2
- package/dist/cli/chunks/load-test-DUOZJLRA.js +0 -2
- package/dist/cli/chunks/memory-backend-AMPSDQR7.js +0 -2
- package/dist/cli/chunks/protocol-executor-4HZSMKVG.js +0 -2
- package/dist/cli/chunks/qe-reasoning-bank-OGPCKVDP.js +0 -2
- package/dist/cli/chunks/queen-coordinator-ETWOFJGR.js +0 -2
- package/dist/cli/chunks/router-OMWLL5V3.js +0 -2
- package/dist/cli/chunks/routing-feedback-SULO56IE.js +0 -2
- package/dist/cli/chunks/rvf-native-adapter-PFMHXYDR.js +0 -2
- package/dist/cli/chunks/safe-db-V34EBOPG.js +0 -2
- package/dist/cli/chunks/schedule-WJALMS5B.js +0 -2
- package/dist/cli/chunks/scheduler-CBWMQLTY.js +0 -2
- package/dist/cli/chunks/shared-rvf-adapter-KOZOSWBO.js +0 -2
- package/dist/cli/chunks/sqlite-persistence-7RV55RNF.js +0 -2
- package/dist/cli/chunks/unified-memory-FHP2C2NF.js +0 -2
- package/dist/cli/chunks/unified-memory-hnsw-MI27GSUL.js +0 -2
- package/dist/cli/chunks/unified-persistence-67RJXTNL.js +0 -2
- package/dist/cli/chunks/visual-security-JF6AGYOT.js +0 -2
- package/dist/cli/chunks/witness-chain-HNY2ED2G.js +0 -2
- package/dist/cli/chunks/workflow-orchestrator-OPUU4TNV.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.35");process.exit(0)}
|
|
2
|
+
import"./chunk-HSR7EHVN.js";import{createRequire as t}from"module";var o=t(import.meta.url),e=o("web-tree-sitter"),i=e,{RuvectorLayer:n,TensorCompress:a,differentiableSearch:c,hierarchicalForward:s,getCompressionLevel:l,init:p,FlashAttention:m,DotProductAttention:u,MultiHeadAttention:d,HyperbolicAttention:A,LinearAttention:f,MoEAttention:h,SonaEngine:_,pipeline:b}=e||{};export{u as DotProductAttention,m as FlashAttention,A as HyperbolicAttention,f as LinearAttention,h as MoEAttention,d as MultiHeadAttention,n as RuvectorLayer,_ as SonaEngine,a as TensorCompress,i as default,c as differentiableSearch,l as getCompressionLevel,s as hierarchicalForward,p as init,b as pipeline};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{b as u}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.35");process.exit(0)}
|
|
2
|
+
import{b as u}from"./chunk-YTB7DDLE.js";import{a as f,c as h}from"./chunk-DEJW6GYF.js";import"./chunk-HSR7EHVN.js";h();import{existsSync as i,mkdirSync as d,readFileSync as g,writeFileSync as a}from"fs";import{join as p,dirname as v}from"path";var c=class{projectRoot;overwrite;generator;constructor(e){this.projectRoot=e.projectRoot,this.overwrite=e.overwrite??!1,this.generator=u()}async install(){let e={success:!0,mcpConfigured:!1,rulesInstalled:!1,errors:[],configPath:"",rulesPath:""};try{let t=this.generator.generateMcpConfig("windsurf"),r=p(this.projectRoot,t.path);if(e.configPath=r,!i(r)||this.overwrite){let o=v(r);if(i(o)||d(o,{recursive:!0}),i(r)&&this.overwrite){let m=this.mergeExistingConfig(r,t.content);a(r,m)}else a(r,t.content);e.mcpConfigured=!0}let n=this.generator.generateBehavioralRules("windsurf"),s=p(this.projectRoot,n.path);if(e.rulesPath=s,!i(s)||this.overwrite){if(i(s)&&this.overwrite){let o=this.mergeExistingRules(s,n.content);a(s,o)}else a(s,n.content);e.rulesInstalled=!0}}catch(t){e.success=!1,e.errors.push(`Windsurf installation failed: ${f(t)}`)}return e}mergeExistingConfig(e,t){try{let r=JSON.parse(g(e,"utf-8")),n=JSON.parse(t);return r.mcpServers||(r.mcpServers={}),Object.assign(r.mcpServers,n.mcpServers),JSON.stringify(r,null,2)+`
|
|
3
3
|
`}catch{return t}}mergeExistingRules(e,t){try{let r=g(e,"utf-8");return r.includes("Agentic QE")||r.includes("fleet_init")?r:r.trimEnd()+`
|
|
4
4
|
|
|
5
5
|
---
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{a,b,c,d,e,f,g}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.35");process.exit(0)}
|
|
2
|
+
import{a,b,c,d,e,f,g}from"./chunk-CTU4V32J.js";import"./chunk-PHJK33IV.js";import"./chunk-BTPDHALG.js";import"./chunk-5Q7X5SDB.js";import"./chunk-HSR7EHVN.js";export{c as PersistentWitnessChain,a as SPRTAccumulator,b as WitnessChain,f as createPersistentWitnessChain,e as createWitnessChain,d as createWitnessChainSQLitePersistence,g as isWitnessChainFeatureEnabled};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.35");process.exit(0)}
|
|
2
|
+
import{a,b,c,d,e,f,g,h,i}from"./chunk-HKQ23RPJ.js";import"./chunk-IXOGBA7C.js";import"./chunk-NFIOKKA6.js";import"./chunk-RZDMSTAQ.js";import"./chunk-PHJK33IV.js";import"./chunk-BTPDHALG.js";import"./chunk-DEJW6GYF.js";import"./chunk-NZB2JE2D.js";import"./chunk-6SN55CMC.js";import"./chunk-FPPV7TYI.js";import"./chunk-3BDZSWCA.js";import"./chunk-UJTI5MRE.js";import"./chunk-HMIRBSTI.js";import"./chunk-SBDRHY3I.js";import"./chunk-CROIRPKG.js";import"./chunk-5Q7X5SDB.js";import"./chunk-HSR7EHVN.js";export{a as GENESIS_PREV_HASH,f as WitnessChain,i as _resetWitnessChainForTests,h as createWitnessChain,g as getWitnessChain,d as hashWith,e as serializeEntry,b as sha256,c as shake256};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.35");process.exit(0)}
|
|
2
|
+
import"./chunk-XMCMLPXY.js";import{b as $}from"./chunk-BBHTM2RF.js";import{d as R}from"./chunk-PY7PJT2Y.js";import{b as k,c as C,d as b}from"./chunk-OPD6AENV.js";import{c as W}from"./chunk-RZDMSTAQ.js";import"./chunk-6WZNRHJJ.js";import"./chunk-DEJW6GYF.js";import"./chunk-HSR7EHVN.js";import{Command as O}from"commander";import o from"chalk";function P(d,a){let m=d.indexOf("=");return m>0&&(a[d.substring(0,m)]=d.substring(m+1)),a}function x(d,a,m){let y=new O("workflow").description("Manage QE workflows and pipelines (ADR-041)");return y.command("run <file>").description("Execute a QE pipeline from YAML file").option("-w, --watch","Watch execution progress").option("-v, --verbose","Show detailed output").option("--params <json>","Additional parameters as JSON","{}").action(async(t,l)=>{if(!await m())return;let e=await import("fs"),c=(await import("path")).resolve(t);try{console.log(o.blue(`
|
|
3
3
|
Running workflow from: ${t}
|
|
4
4
|
`));let s=k(c);if(!s.success||!s.workflow){console.log(o.red("Failed to parse pipeline:"));for(let w of s.errors)console.log(o.red(` ${w}`));await a(1)}let r={...W(l.params,"params")};if(s.pipeline){for(let w of s.pipeline.stages)if(w.params)for(let[S,h]of Object.entries(w.params))r[S]=h}if(!d.workflowOrchestrator.getWorkflow(s.workflow.id)){let w=d.workflowOrchestrator.registerWorkflow(s.workflow);w.success||(console.log(o.red(`Failed to register workflow: ${w.error.message}`)),await a(1))}let n=await d.workflowOrchestrator.executeWorkflow(s.workflow.id,r);if(!n.success){console.log(o.red(`Failed to start workflow: ${n.error.message}`)),await a(1);return}let p=n.value;if(console.log(o.cyan(` Execution ID: ${p}`)),console.log(o.gray(` Workflow: ${s.workflow.name}`)),console.log(o.gray(` Stages: ${s.workflow.steps.length}`)),console.log(""),l.watch){console.log(o.blue(`Workflow Progress:
|
|
5
5
|
`));let w,S=Date.now();for(;;){let g=d.workflowOrchestrator.getWorkflowStatus(p);if(!g)break;if(!w||w.progress!==g.progress||w.status!==g.status||JSON.stringify(w.currentSteps)!==JSON.stringify(g.currentSteps)){process.stdout.write("\r\x1B[K");let v="\u2588".repeat(Math.floor(g.progress/5))+"\u2591".repeat(20-Math.floor(g.progress/5)),D=g.status==="completed"?o.green:g.status==="failed"?o.red:g.status==="running"?o.yellow:o.gray;console.log(` [${v}] ${g.progress}% - ${D(g.status)}`),g.currentSteps.length>0&&l.verbose&&console.log(o.gray(` Running: ${g.currentSteps.join(", ")}`)),w=g}if(g.status==="completed"||g.status==="failed"||g.status==="cancelled")break;await new Promise(v=>setTimeout(v,500))}let h=d.workflowOrchestrator.getWorkflowStatus(p);if(h){console.log("");let g=h.duration||Date.now()-S;h.status==="completed"?(console.log(o.green("Workflow completed successfully")),console.log(o.gray(` Duration: ${$(g)}`)),console.log(o.gray(` Completed: ${h.completedSteps.length} stages`)),h.skippedSteps.length>0&&console.log(o.yellow(` Skipped: ${h.skippedSteps.length} stages`))):h.status==="failed"?(console.log(o.red("Workflow failed")),console.log(o.red(` Error: ${h.error}`)),console.log(o.gray(` Failed stages: ${h.failedSteps.join(", ")}`))):console.log(o.yellow(`Workflow ${h.status}`))}}else console.log(o.green("Workflow execution started")),console.log(o.gray(` Use 'aqe workflow status ${p}' to check progress`));console.log(""),await a(0)}catch(s){console.error(o.red(`
|
|
@@ -35,10 +35,10 @@ Workflow cancelled: ${t}
|
|
|
35
35
|
`)):console.log(o.red(`
|
|
36
36
|
Failed to cancel workflow: ${l.error.message}
|
|
37
37
|
`)),await a(l.success?0:1)}catch(l){console.error(o.red(`
|
|
38
|
-
Failed to cancel workflow:`),l),await a(1)}}),y.command("browser-list").description("List available browser workflow templates").action(async()=>{try{let{BrowserWorkflowTool:t}=await import("./browser-workflow-
|
|
38
|
+
Failed to cancel workflow:`),l),await a(1)}}),y.command("browser-list").description("List available browser workflow templates").action(async()=>{try{let{BrowserWorkflowTool:t}=await import("./browser-workflow-4DGHRZLS.js"),e=await new t().invoke({});if(e.success&&e.data){console.log(o.blue(`
|
|
39
39
|
Browser Workflow Templates:
|
|
40
40
|
`));for(let u of e.data.availableTemplates)console.log(` ${o.cyan(u)}`);console.log("")}else console.log(o.red(`Failed: ${e.error||"Unknown error"}`));await a(0)}catch(t){console.error(o.red(`
|
|
41
|
-
Failed:`),t),await a(1)}}),y.command("browser-load [template]").description("Load and validate a browser workflow template or inline YAML").option("--yaml <yaml>","Inline YAML workflow definition").option("-v, --var <key=value>","Variable override (repeatable)",P,{}).option("-F, --format <format>","Output format (text|json)","text").option("-o, --output <path>","Write output to file").action(async(t,l)=>{try{let{BrowserWorkflowTool:e}=await import("./browser-workflow-
|
|
41
|
+
Failed:`),t),await a(1)}}),y.command("browser-load [template]").description("Load and validate a browser workflow template or inline YAML").option("--yaml <yaml>","Inline YAML workflow definition").option("-v, --var <key=value>","Variable override (repeatable)",P,{}).option("-F, --format <format>","Output format (text|json)","text").option("-o, --output <path>","Write output to file").action(async(t,l)=>{try{let{BrowserWorkflowTool:e}=await import("./browser-workflow-4DGHRZLS.js"),{writeOutput:u,toJSON:c}=await import("./ci-output-GNUGZD2F.js"),s=new e,f={variables:l.var||{}};if(l.yaml)f.workflowYaml=l.yaml;else if(t)if(t.endsWith(".yaml")||t.endsWith(".yml")){let i=await import("fs"),p=(await import("path")).resolve(t);i.existsSync(p)||(console.log(o.red(`
|
|
42
42
|
File not found: ${p}
|
|
43
43
|
`)),await a(1)),f.workflowYaml=i.readFileSync(p,"utf-8")}else f.templateName=t;else console.log(o.red(`
|
|
44
44
|
Provide a template name or --yaml. Use "workflow browser-list" to see templates.
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.35");process.exit(0)}
|
|
2
|
+
import{a,b,c,d}from"./chunk-NS4P3VRA.js";import"./chunk-ICYM7H6T.js";import"./chunk-IXOGBA7C.js";import"./chunk-NFIOKKA6.js";import"./chunk-RZDMSTAQ.js";import"./chunk-PHJK33IV.js";import"./chunk-BTPDHALG.js";import"./chunk-6WZNRHJJ.js";import"./chunk-DEJW6GYF.js";import"./chunk-E7N6CRFV.js";import"./chunk-NZB2JE2D.js";import"./chunk-6SN55CMC.js";import"./chunk-FPPV7TYI.js";import"./chunk-3BDZSWCA.js";import"./chunk-UJTI5MRE.js";import"./chunk-HMIRBSTI.js";import"./chunk-SBDRHY3I.js";import"./chunk-CROIRPKG.js";import"./chunk-5Q7X5SDB.js";import"./chunk-HSR7EHVN.js";export{b as DEFAULT_WORKFLOW_CONFIG,a as WorkflowEvents,c as WorkflowOrchestrator,d as createWorkflowOrchestrator};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.
|
|
2
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v as L,w as M,x as N}from"./chunk-
|
|
1
|
+
import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.9.35");process.exit(0)}
|
|
2
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v as L,w as M,x as N}from"./chunk-2ICMLI2T.js";import{a as v,b as w,c as x,d as y,e as z,f as A,g as B,h as C,i as D,j as E,k as F,l as G,m as H,n as I,o as J,p as K}from"./chunk-INCNWH3R.js";import"./chunk-IXOGBA7C.js";import"./chunk-NFIOKKA6.js";import"./chunk-RZDMSTAQ.js";import"./chunk-PHJK33IV.js";import"./chunk-BTPDHALG.js";import"./chunk-DEJW6GYF.js";import"./chunk-NZB2JE2D.js";import"./chunk-6SN55CMC.js";import"./chunk-FPPV7TYI.js";import"./chunk-3BDZSWCA.js";import"./chunk-UJTI5MRE.js";import"./chunk-HMIRBSTI.js";import"./chunk-SBDRHY3I.js";import"./chunk-CROIRPKG.js";import"./chunk-5Q7X5SDB.js";import"./chunk-HSR7EHVN.js";export{z as GNNLayerFactory,i as QEFlashAttention,x as QEGNNEmbeddingIndex,y as QEGNNIndexFactory,a as QESONA,e as QE_FLASH_ATTENTION_CONFIG,g as QE_PERFORMANCE_TARGETS,f as QE_SONA_CONFIG,A as TensorCompressionFactory,u as batchComputeAttention,K as batchDifferentiableSearch,M as checkRuvectorPackagesAvailable,c as createDomainQESONA,j as createQEFlashAttention,b as createQESONA,D as getDifferentiableSearch,F as getGetCompressionLevel,E as getHierarchicalForward,G as getInit,h as getOptimalBlockConfig,k as getQEFlashAttentionConfig,n as getRuvectorDotProductAttention,m as getRuvectorFlashAttention,p as getRuvectorHyperbolicAttention,B as getRuvectorLayer,q as getRuvectorLinearAttention,r as getRuvectorMoEAttention,o as getRuvectorMultiHeadAttention,L as getRuvectorPackageVersions,C as getTensorCompress,l as getWorkloadTypes,N as initAllRuvectorPackages,w as initGNN,d as isAttentionAvailable,v as isGNNAvailable,s as toFloat32Array,H as toFloat32ArrayGNN,J as toIEmbedding,t as toNumberArrayAttn,I as toNumberArrayGNN};
|
|
@@ -182,29 +182,20 @@ export async function createHybridBackendWithTimeout(dataDir) {
|
|
|
182
182
|
enableFallback: true,
|
|
183
183
|
defaultNamespace: 'qe-patterns',
|
|
184
184
|
});
|
|
185
|
-
// HybridMemoryBackend.initialize()
|
|
186
|
-
//
|
|
187
|
-
//
|
|
188
|
-
//
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
}, timeoutMs));
|
|
185
|
+
// Issue #495: bound HybridMemoryBackend.initialize() with an AbortSignal —
|
|
186
|
+
// the previous Promise.race-based timeout could not stop the underlying
|
|
187
|
+
// work, so a stuck unified-memory init kept running for 14+ min while the
|
|
188
|
+
// hook subprocess held patterns.rvf open (20 GB / 12 MB/s leak reported in
|
|
189
|
+
// the field). HybridMemoryBackend.initialize() now checks
|
|
190
|
+
// `signal.throwIfAborted()` between awaited steps, so an aborted signal
|
|
191
|
+
// actually stops the work instead of leaking a promise into the void.
|
|
192
|
+
const controller = new AbortController();
|
|
193
|
+
const timer = setTimeout(() => controller.abort(new Error('Backend init timeout')), timeoutMs);
|
|
195
194
|
try {
|
|
196
|
-
await
|
|
195
|
+
await backend.initialize({ signal: controller.signal });
|
|
197
196
|
}
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
// Tear down the backend after the leaked init completes so its
|
|
201
|
-
// SQLite connections, WAL handles, and pool entries are released.
|
|
202
|
-
// .catch() prevents "unhandled rejection" if dispose itself throws.
|
|
203
|
-
void initPromise
|
|
204
|
-
.then(() => backend.dispose())
|
|
205
|
-
.catch(() => undefined);
|
|
206
|
-
}
|
|
207
|
-
throw err;
|
|
197
|
+
finally {
|
|
198
|
+
clearTimeout(timer);
|
|
208
199
|
}
|
|
209
200
|
return backend;
|
|
210
201
|
}
|
|
@@ -27,6 +27,15 @@ export interface RvfStore {
|
|
|
27
27
|
delete(ids: string[]): void;
|
|
28
28
|
status(): RvfStatus;
|
|
29
29
|
close(): void;
|
|
30
|
+
/**
|
|
31
|
+
* Optional: reclaim dead space. Returns reclaim stats or null when the
|
|
32
|
+
* underlying store does not support compaction (e.g. mock stores in tests).
|
|
33
|
+
*/
|
|
34
|
+
compact?(): {
|
|
35
|
+
segmentsCompacted: number;
|
|
36
|
+
bytesReclaimed: number;
|
|
37
|
+
epoch: number;
|
|
38
|
+
} | null;
|
|
30
39
|
}
|
|
31
40
|
export interface RvfStatus {
|
|
32
41
|
totalVectors: number;
|
|
@@ -120,6 +129,19 @@ export declare class RvfDualWriter {
|
|
|
120
129
|
* Close the RVF store. SQLite is managed externally.
|
|
121
130
|
*/
|
|
122
131
|
close(): void;
|
|
132
|
+
/**
|
|
133
|
+
* Reclaim dead space in the underlying brain.rvf container. Best-effort —
|
|
134
|
+
* returns reclaim stats if compaction ran, null if it was skipped or the
|
|
135
|
+
* store does not implement compact(). Same rationale as patterns.rvf
|
|
136
|
+
* compaction: brain.rvf receives one write per pattern via writePattern()
|
|
137
|
+
* and is otherwise append-only, so without periodic compaction it grows
|
|
138
|
+
* monotonically.
|
|
139
|
+
*/
|
|
140
|
+
compact(): {
|
|
141
|
+
segmentsCompacted: number;
|
|
142
|
+
bytesReclaimed: number;
|
|
143
|
+
epoch: number;
|
|
144
|
+
} | null;
|
|
123
145
|
private shouldWriteRvf;
|
|
124
146
|
private writeSqliteEmbedding;
|
|
125
147
|
private deleteSqliteEmbedding;
|
|
@@ -39,6 +39,9 @@ function wrapNativeAdapter(adapter, dim) {
|
|
|
39
39
|
close() {
|
|
40
40
|
adapter.close();
|
|
41
41
|
},
|
|
42
|
+
compact() {
|
|
43
|
+
return adapter.compact();
|
|
44
|
+
},
|
|
42
45
|
};
|
|
43
46
|
}
|
|
44
47
|
function tableExists(db, name) {
|
|
@@ -280,6 +283,24 @@ export class RvfDualWriter {
|
|
|
280
283
|
this.rvfAvailable = false;
|
|
281
284
|
}
|
|
282
285
|
}
|
|
286
|
+
/**
|
|
287
|
+
* Reclaim dead space in the underlying brain.rvf container. Best-effort —
|
|
288
|
+
* returns reclaim stats if compaction ran, null if it was skipped or the
|
|
289
|
+
* store does not implement compact(). Same rationale as patterns.rvf
|
|
290
|
+
* compaction: brain.rvf receives one write per pattern via writePattern()
|
|
291
|
+
* and is otherwise append-only, so without periodic compaction it grows
|
|
292
|
+
* monotonically.
|
|
293
|
+
*/
|
|
294
|
+
compact() {
|
|
295
|
+
if (!this.rvfStore || !this.rvfAvailable || !this.rvfStore.compact)
|
|
296
|
+
return null;
|
|
297
|
+
try {
|
|
298
|
+
return this.rvfStore.compact() ?? null;
|
|
299
|
+
}
|
|
300
|
+
catch {
|
|
301
|
+
return null;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
283
304
|
// --------------------------------------------------------------------------
|
|
284
305
|
// Private helpers
|
|
285
306
|
// --------------------------------------------------------------------------
|
|
@@ -43,6 +43,18 @@ export interface RvfStatus {
|
|
|
43
43
|
epoch: number;
|
|
44
44
|
witnessValid: boolean;
|
|
45
45
|
witnessEntries: number;
|
|
46
|
+
/**
|
|
47
|
+
* Fraction of file bytes occupied by tombstoned/superseded segments (0-1).
|
|
48
|
+
* Optional so existing partial mocks in tests still compile; runtime
|
|
49
|
+
* adapters always populate this (the wrapper defaults to 0 if the native
|
|
50
|
+
* binding does not surface it).
|
|
51
|
+
*/
|
|
52
|
+
deadSpaceRatio?: number;
|
|
53
|
+
}
|
|
54
|
+
export interface RvfCompactionResult {
|
|
55
|
+
segmentsCompacted: number;
|
|
56
|
+
bytesReclaimed: number;
|
|
57
|
+
epoch: number;
|
|
46
58
|
}
|
|
47
59
|
export interface RvfNativeAdapter {
|
|
48
60
|
ingest(entries: RvfIngestEntry[]): {
|
|
@@ -55,7 +67,12 @@ export interface RvfNativeAdapter {
|
|
|
55
67
|
status(): RvfStatus;
|
|
56
68
|
dimension(): number;
|
|
57
69
|
size(): number;
|
|
58
|
-
|
|
70
|
+
/**
|
|
71
|
+
* Reclaim dead space by merging segments and dropping tombstones.
|
|
72
|
+
* Returns reclaim stats. Logs and returns `null` if the native call throws
|
|
73
|
+
* (best-effort — never let compaction failures propagate to callers).
|
|
74
|
+
*/
|
|
75
|
+
compact(): RvfCompactionResult | null;
|
|
59
76
|
close(): void;
|
|
60
77
|
isOpen(): boolean;
|
|
61
78
|
path(): string;
|
|
@@ -190,6 +190,7 @@ class RvfNativeAdapterImpl {
|
|
|
190
190
|
epoch: s.currentEpoch,
|
|
191
191
|
witnessValid: witnessSegs.length > 0,
|
|
192
192
|
witnessEntries: witnessSegs.length,
|
|
193
|
+
deadSpaceRatio: typeof s.deadSpaceRatio === 'number' ? s.deadSpaceRatio : 0,
|
|
193
194
|
};
|
|
194
195
|
}
|
|
195
196
|
// -- accessors ------------------------------------------------------------
|
|
@@ -202,7 +203,20 @@ class RvfNativeAdapterImpl {
|
|
|
202
203
|
}
|
|
203
204
|
compact() {
|
|
204
205
|
this.ensureOpen();
|
|
205
|
-
|
|
206
|
+
try {
|
|
207
|
+
const r = this.db.compact();
|
|
208
|
+
if (r && typeof r === 'object') {
|
|
209
|
+
return {
|
|
210
|
+
segmentsCompacted: typeof r.segmentsCompacted === 'number' ? r.segmentsCompacted : 0,
|
|
211
|
+
bytesReclaimed: typeof r.bytesReclaimed === 'number' ? r.bytesReclaimed : 0,
|
|
212
|
+
epoch: typeof r.epoch === 'number' ? r.epoch : 0,
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
return { segmentsCompacted: 0, bytesReclaimed: 0, epoch: 0 };
|
|
216
|
+
}
|
|
217
|
+
catch {
|
|
218
|
+
return null;
|
|
219
|
+
}
|
|
206
220
|
}
|
|
207
221
|
close() {
|
|
208
222
|
if (this._open) {
|
|
@@ -10,7 +10,9 @@
|
|
|
10
10
|
*
|
|
11
11
|
* @module integrations/ruvector/shared-rvf-adapter
|
|
12
12
|
*/
|
|
13
|
-
import type { RvfNativeAdapter } from './rvf-native-adapter.js';
|
|
13
|
+
import type { RvfNativeAdapter, RvfCompactionResult, RvfStatus } from './rvf-native-adapter.js';
|
|
14
|
+
/** @internal test-only seam */
|
|
15
|
+
export declare function __setSharedRvfAdapterForTests(adapter: RvfNativeAdapter | null): void;
|
|
14
16
|
/**
|
|
15
17
|
* Get or create the shared RvfNativeAdapter singleton for patterns.rvf.
|
|
16
18
|
*
|
|
@@ -19,6 +21,49 @@ import type { RvfNativeAdapter } from './rvf-native-adapter.js';
|
|
|
19
21
|
* @returns The shared adapter, or null if native bindings are unavailable
|
|
20
22
|
*/
|
|
21
23
|
export declare function getSharedRvfAdapter(dataDir?: string, dimensions?: number): RvfNativeAdapter | null;
|
|
24
|
+
export interface CompactDecision {
|
|
25
|
+
shouldCompact: boolean;
|
|
26
|
+
trigger: 'force' | 'size-guard' | 'dead-ratio' | 'none';
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Pure decision function: given an adapter status, decide whether compaction
|
|
30
|
+
* should run and which threshold triggered it. Exported so tests can verify
|
|
31
|
+
* the decision logic without exercising the singleton or native binding.
|
|
32
|
+
*/
|
|
33
|
+
export declare function decideCompactionFromStatus(status: RvfStatus, opts?: {
|
|
34
|
+
deadRatioThreshold?: number;
|
|
35
|
+
sizeGuardBytes?: number;
|
|
36
|
+
force?: boolean;
|
|
37
|
+
}): CompactDecision;
|
|
38
|
+
/**
|
|
39
|
+
* Run `compact()` against the shared patterns.rvf adapter when dead-space or
|
|
40
|
+
* file-size thresholds are exceeded. Best-effort — returns the reclaim stats
|
|
41
|
+
* if compaction ran, or `null` if it was skipped or failed.
|
|
42
|
+
*
|
|
43
|
+
* Safe to call from steady-state code (e.g. after a dream cycle). The native
|
|
44
|
+
* binding's compact() is documented as exclusive against writers, so callers
|
|
45
|
+
* should run this in idle windows when possible.
|
|
46
|
+
*
|
|
47
|
+
* Thresholds can be overridden via:
|
|
48
|
+
* AQE_RVF_SIZE_GUARD_BYTES (default 256 MB)
|
|
49
|
+
* AQE_RVF_DEAD_RATIO_THRESHOLD (default 0.30)
|
|
50
|
+
*/
|
|
51
|
+
export declare function compactSharedRvfAdapter(opts?: {
|
|
52
|
+
/** Override the dead-space ratio above which compaction runs. */
|
|
53
|
+
deadRatioThreshold?: number;
|
|
54
|
+
/** Override the file size above which compaction runs unconditionally. */
|
|
55
|
+
sizeGuardBytes?: number;
|
|
56
|
+
/** When true, run compact() regardless of thresholds. */
|
|
57
|
+
force?: boolean;
|
|
58
|
+
}): RvfCompactionResult | null;
|
|
59
|
+
/**
|
|
60
|
+
* One-shot at boot. Runs a best-effort `compact()` against the freshly-opened
|
|
61
|
+
* adapter when fileSize or deadSpaceRatio exceed configured thresholds. Lives
|
|
62
|
+
* here (not at module load) so a never-opened adapter doesn't trigger native
|
|
63
|
+
* binding init. Exported for tests; production callers go via
|
|
64
|
+
* `getSharedRvfAdapter()` which invokes it internally.
|
|
65
|
+
*/
|
|
66
|
+
export declare function runBootCompactGuard(adapter: RvfNativeAdapter, rvfPath: string): RvfCompactionResult | null;
|
|
22
67
|
/** Close the shared adapter and reset the singleton. */
|
|
23
68
|
export declare function resetSharedRvfAdapter(): void;
|
|
24
69
|
//# sourceMappingURL=shared-rvf-adapter.d.ts.map
|
|
@@ -12,6 +12,34 @@
|
|
|
12
12
|
*/
|
|
13
13
|
let sharedAdapter = null;
|
|
14
14
|
let initAttempted = false;
|
|
15
|
+
// ---------------------------------------------------------------------------
|
|
16
|
+
// Test seam: allow tests to install a fake adapter without going through the
|
|
17
|
+
// native binding loader. NOT part of the public API — used by tests only.
|
|
18
|
+
// ---------------------------------------------------------------------------
|
|
19
|
+
/** @internal test-only seam */
|
|
20
|
+
export function __setSharedRvfAdapterForTests(adapter) {
|
|
21
|
+
sharedAdapter = adapter;
|
|
22
|
+
initAttempted = adapter !== null;
|
|
23
|
+
}
|
|
24
|
+
// ----------------------------------------------------------------------------
|
|
25
|
+
// Compaction tunables
|
|
26
|
+
//
|
|
27
|
+
// `compact()` is best-effort and idempotent on a clean file, so the thresholds
|
|
28
|
+
// are deliberately conservative. They can be tightened via env vars without a
|
|
29
|
+
// rebuild — useful in field debugging when an installation is already large.
|
|
30
|
+
// ----------------------------------------------------------------------------
|
|
31
|
+
/** File size above which we run a boot-time compact (default: 256 MB). */
|
|
32
|
+
const SIZE_GUARD_BYTES = (() => {
|
|
33
|
+
const env = process.env.AQE_RVF_SIZE_GUARD_BYTES;
|
|
34
|
+
const parsed = env ? Number(env) : NaN;
|
|
35
|
+
return Number.isFinite(parsed) && parsed > 0 ? parsed : 256 * 1024 * 1024;
|
|
36
|
+
})();
|
|
37
|
+
/** Dead-space ratio above which we run a compact (default: 0.30 = 30%). */
|
|
38
|
+
const DEAD_RATIO_THRESHOLD = (() => {
|
|
39
|
+
const env = process.env.AQE_RVF_DEAD_RATIO_THRESHOLD;
|
|
40
|
+
const parsed = env ? Number(env) : NaN;
|
|
41
|
+
return Number.isFinite(parsed) && parsed > 0 && parsed <= 1 ? parsed : 0.30;
|
|
42
|
+
})();
|
|
15
43
|
/**
|
|
16
44
|
* Get or create the shared RvfNativeAdapter singleton for patterns.rvf.
|
|
17
45
|
*
|
|
@@ -48,6 +76,10 @@ export function getSharedRvfAdapter(dataDir = '.agentic-qe', dimensions = 384) {
|
|
|
48
76
|
// FsyncFailed regardless. The try-ladder degrades to whichever
|
|
49
77
|
// path the OS actually permits.
|
|
50
78
|
sharedAdapter = openOrCreateRvf(openRvfStore, createRvfStore, rvfPath, dimensions);
|
|
79
|
+
// Boot-time size guard: an oversized or fragmented patterns.rvf gets a
|
|
80
|
+
// best-effort compaction on first open. Synchronous — runs once per
|
|
81
|
+
// process. Errors logged, never thrown (compaction must not block boot).
|
|
82
|
+
runBootCompactGuard(sharedAdapter, rvfPath);
|
|
51
83
|
return sharedAdapter;
|
|
52
84
|
}
|
|
53
85
|
catch (error) {
|
|
@@ -149,6 +181,111 @@ function openOrCreateRvf(openFn, createFn, rvfPath, dimensions) {
|
|
|
149
181
|
}
|
|
150
182
|
}
|
|
151
183
|
}
|
|
184
|
+
/**
|
|
185
|
+
* Pure decision function: given an adapter status, decide whether compaction
|
|
186
|
+
* should run and which threshold triggered it. Exported so tests can verify
|
|
187
|
+
* the decision logic without exercising the singleton or native binding.
|
|
188
|
+
*/
|
|
189
|
+
export function decideCompactionFromStatus(status, opts) {
|
|
190
|
+
if (opts?.force)
|
|
191
|
+
return { shouldCompact: true, trigger: 'force' };
|
|
192
|
+
const sizeThreshold = opts?.sizeGuardBytes ?? SIZE_GUARD_BYTES;
|
|
193
|
+
const deadThreshold = opts?.deadRatioThreshold ?? DEAD_RATIO_THRESHOLD;
|
|
194
|
+
if (status.fileSizeBytes >= sizeThreshold) {
|
|
195
|
+
return { shouldCompact: true, trigger: 'size-guard' };
|
|
196
|
+
}
|
|
197
|
+
if ((status.deadSpaceRatio ?? 0) >= deadThreshold) {
|
|
198
|
+
return { shouldCompact: true, trigger: 'dead-ratio' };
|
|
199
|
+
}
|
|
200
|
+
return { shouldCompact: false, trigger: 'none' };
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Run `compact()` against the shared patterns.rvf adapter when dead-space or
|
|
204
|
+
* file-size thresholds are exceeded. Best-effort — returns the reclaim stats
|
|
205
|
+
* if compaction ran, or `null` if it was skipped or failed.
|
|
206
|
+
*
|
|
207
|
+
* Safe to call from steady-state code (e.g. after a dream cycle). The native
|
|
208
|
+
* binding's compact() is documented as exclusive against writers, so callers
|
|
209
|
+
* should run this in idle windows when possible.
|
|
210
|
+
*
|
|
211
|
+
* Thresholds can be overridden via:
|
|
212
|
+
* AQE_RVF_SIZE_GUARD_BYTES (default 256 MB)
|
|
213
|
+
* AQE_RVF_DEAD_RATIO_THRESHOLD (default 0.30)
|
|
214
|
+
*/
|
|
215
|
+
export function compactSharedRvfAdapter(opts) {
|
|
216
|
+
if (!sharedAdapter)
|
|
217
|
+
return null;
|
|
218
|
+
let status;
|
|
219
|
+
try {
|
|
220
|
+
status = sharedAdapter.status();
|
|
221
|
+
}
|
|
222
|
+
catch {
|
|
223
|
+
return null;
|
|
224
|
+
}
|
|
225
|
+
const decision = decideCompactionFromStatus(status, opts);
|
|
226
|
+
if (!decision.shouldCompact)
|
|
227
|
+
return null;
|
|
228
|
+
const before = status.fileSizeBytes;
|
|
229
|
+
let result;
|
|
230
|
+
try {
|
|
231
|
+
result = sharedAdapter.compact();
|
|
232
|
+
}
|
|
233
|
+
catch {
|
|
234
|
+
// The thin native wrapper already catches and returns null on native
|
|
235
|
+
// errors, but be defensive in case a caller installs a non-wrapped
|
|
236
|
+
// adapter (e.g. tests, custom adapters).
|
|
237
|
+
return null;
|
|
238
|
+
}
|
|
239
|
+
if (!result)
|
|
240
|
+
return null;
|
|
241
|
+
// Log only when there's something interesting to report — keeps idle logs quiet.
|
|
242
|
+
if (result.bytesReclaimed > 0 || result.segmentsCompacted > 0) {
|
|
243
|
+
console.log(`[RVF] compacted patterns.rvf: reclaimed ${formatBytes(result.bytesReclaimed)} ` +
|
|
244
|
+
`(${result.segmentsCompacted} segments, fileSize ${formatBytes(before)} → ` +
|
|
245
|
+
`${formatBytes(Math.max(0, before - result.bytesReclaimed))}, ` +
|
|
246
|
+
`trigger: ${decision.trigger})`);
|
|
247
|
+
}
|
|
248
|
+
return result;
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* One-shot at boot. Runs a best-effort `compact()` against the freshly-opened
|
|
252
|
+
* adapter when fileSize or deadSpaceRatio exceed configured thresholds. Lives
|
|
253
|
+
* here (not at module load) so a never-opened adapter doesn't trigger native
|
|
254
|
+
* binding init. Exported for tests; production callers go via
|
|
255
|
+
* `getSharedRvfAdapter()` which invokes it internally.
|
|
256
|
+
*/
|
|
257
|
+
export function runBootCompactGuard(adapter, rvfPath) {
|
|
258
|
+
try {
|
|
259
|
+
const status = adapter.status();
|
|
260
|
+
const decision = decideCompactionFromStatus(status);
|
|
261
|
+
if (!decision.shouldCompact)
|
|
262
|
+
return null;
|
|
263
|
+
const result = adapter.compact();
|
|
264
|
+
if (result && (result.bytesReclaimed > 0 || result.segmentsCompacted > 0)) {
|
|
265
|
+
console.log(`[RVF] boot-time compact (${rvfPath}): reclaimed ${formatBytes(result.bytesReclaimed)} ` +
|
|
266
|
+
`from ${result.segmentsCompacted} segments (trigger: ${decision.trigger})`);
|
|
267
|
+
}
|
|
268
|
+
return result;
|
|
269
|
+
}
|
|
270
|
+
catch (error) {
|
|
271
|
+
if (process.env.DEBUG) {
|
|
272
|
+
console.debug('[RVF] boot-time compact guard skipped:', error instanceof Error ? error.message : error);
|
|
273
|
+
}
|
|
274
|
+
return null;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
function formatBytes(n) {
|
|
278
|
+
if (!Number.isFinite(n) || n < 0)
|
|
279
|
+
return `${n}B`;
|
|
280
|
+
const units = ['B', 'KB', 'MB', 'GB', 'TB'];
|
|
281
|
+
let i = 0;
|
|
282
|
+
let v = n;
|
|
283
|
+
while (v >= 1024 && i < units.length - 1) {
|
|
284
|
+
v /= 1024;
|
|
285
|
+
i++;
|
|
286
|
+
}
|
|
287
|
+
return `${v.toFixed(i === 0 ? 0 : 1)}${units[i]}`;
|
|
288
|
+
}
|
|
152
289
|
/** Close the shared adapter and reset the singleton. */
|
|
153
290
|
export function resetSharedRvfAdapter() {
|
|
154
291
|
if (sharedAdapter) {
|
|
@@ -71,9 +71,20 @@ export declare class HybridMemoryBackend implements MemoryBackend {
|
|
|
71
71
|
private initialized;
|
|
72
72
|
constructor(config?: Partial<HybridBackendConfig>);
|
|
73
73
|
/**
|
|
74
|
-
* Initialize the unified backend
|
|
75
|
-
|
|
76
|
-
|
|
74
|
+
* Initialize the unified backend.
|
|
75
|
+
*
|
|
76
|
+
* `options.signal` bounds the init: if a caller-side timeout aborts the
|
|
77
|
+
* signal, `signal.throwIfAborted()` checks between awaited steps cause
|
|
78
|
+
* initialize() to reject promptly instead of leaking the init promise
|
|
79
|
+
* past the timeout (issue #495 — sibling to #478's fix for
|
|
80
|
+
* ReasoningBank.initialize). The previous Promise.race-based timeout in
|
|
81
|
+
* `createHybridBackendWithTimeout()` could not stop the underlying work,
|
|
82
|
+
* so a stuck unified-memory init would keep running for 14+ min while
|
|
83
|
+
* the hook subprocess held patterns.rvf open.
|
|
84
|
+
*/
|
|
85
|
+
initialize(options?: {
|
|
86
|
+
signal?: AbortSignal;
|
|
87
|
+
}): Promise<void>;
|
|
77
88
|
/**
|
|
78
89
|
* Dispose of the backend
|
|
79
90
|
*/
|
|
@@ -50,12 +50,23 @@ export class HybridMemoryBackend {
|
|
|
50
50
|
};
|
|
51
51
|
}
|
|
52
52
|
/**
|
|
53
|
-
* Initialize the unified backend
|
|
53
|
+
* Initialize the unified backend.
|
|
54
|
+
*
|
|
55
|
+
* `options.signal` bounds the init: if a caller-side timeout aborts the
|
|
56
|
+
* signal, `signal.throwIfAborted()` checks between awaited steps cause
|
|
57
|
+
* initialize() to reject promptly instead of leaking the init promise
|
|
58
|
+
* past the timeout (issue #495 — sibling to #478's fix for
|
|
59
|
+
* ReasoningBank.initialize). The previous Promise.race-based timeout in
|
|
60
|
+
* `createHybridBackendWithTimeout()` could not stop the underlying work,
|
|
61
|
+
* so a stuck unified-memory init would keep running for 14+ min while
|
|
62
|
+
* the hook subprocess held patterns.rvf open.
|
|
54
63
|
*/
|
|
55
|
-
async initialize() {
|
|
64
|
+
async initialize(options) {
|
|
56
65
|
if (this.initialized) {
|
|
57
66
|
return;
|
|
58
67
|
}
|
|
68
|
+
const signal = options?.signal;
|
|
69
|
+
signal?.throwIfAborted();
|
|
59
70
|
// Get unified memory manager with our config
|
|
60
71
|
const unifiedConfig = {
|
|
61
72
|
dbPath: this.config.sqlite.path ?? DEFAULT_UNIFIED_MEMORY_CONFIG.dbPath,
|
|
@@ -63,7 +74,9 @@ export class HybridMemoryBackend {
|
|
|
63
74
|
busyTimeout: this.config.sqlite.busyTimeout ?? MEMORY_CONSTANTS.BUSY_TIMEOUT_MS,
|
|
64
75
|
};
|
|
65
76
|
this.unifiedMemory = getUnifiedMemory(unifiedConfig);
|
|
66
|
-
|
|
77
|
+
signal?.throwIfAborted();
|
|
78
|
+
await this.unifiedMemory.initialize({ signal });
|
|
79
|
+
signal?.throwIfAborted();
|
|
67
80
|
// Start cleanup interval (unref so it doesn't block process exit)
|
|
68
81
|
this.cleanupInterval = setInterval(() => this.cleanup(), this.config.cleanupInterval);
|
|
69
82
|
if (this.cleanupInterval.unref) {
|
|
@@ -92,7 +92,9 @@ export declare class UnifiedMemoryManager {
|
|
|
92
92
|
static getInstance(config?: Partial<UnifiedMemoryConfig>): UnifiedMemoryManager;
|
|
93
93
|
static getInstanceAsync(config?: Partial<UnifiedMemoryConfig>): Promise<UnifiedMemoryManager>;
|
|
94
94
|
static resetInstance(): void;
|
|
95
|
-
initialize(
|
|
95
|
+
initialize(options?: {
|
|
96
|
+
signal?: AbortSignal;
|
|
97
|
+
}): Promise<void>;
|
|
96
98
|
private _doInitialize;
|
|
97
99
|
/**
|
|
98
100
|
* Find recent backup files for the memory database, sorted newest first.
|
|
@@ -218,17 +218,18 @@ export class UnifiedMemoryManager {
|
|
|
218
218
|
// opening the production database instead of the test database.
|
|
219
219
|
clearProjectRootCache();
|
|
220
220
|
}
|
|
221
|
-
async initialize() {
|
|
221
|
+
async initialize(options) {
|
|
222
222
|
if (this.initialized)
|
|
223
223
|
return;
|
|
224
224
|
if (!this.initPromise) {
|
|
225
|
-
this.initPromise = this._doInitialize();
|
|
225
|
+
this.initPromise = this._doInitialize(options?.signal);
|
|
226
226
|
}
|
|
227
227
|
return this.initPromise;
|
|
228
228
|
}
|
|
229
|
-
async _doInitialize() {
|
|
229
|
+
async _doInitialize(signal) {
|
|
230
230
|
if (this.initialized)
|
|
231
231
|
return;
|
|
232
|
+
signal?.throwIfAborted();
|
|
232
233
|
try {
|
|
233
234
|
// SAFETY: Detect test processes trying to open the production DB.
|
|
234
235
|
// If AQE_PROJECT_ROOT is set to a temp dir (vitest isolation) but the
|
|
@@ -282,6 +283,9 @@ export class UnifiedMemoryManager {
|
|
|
282
283
|
dbSizeBefore = newest.size;
|
|
283
284
|
}
|
|
284
285
|
}
|
|
286
|
+
// Bail before opening the DB if the caller already gave up — saves a
|
|
287
|
+
// file handle and avoids racing the busy-timeout under contention.
|
|
288
|
+
signal?.throwIfAborted();
|
|
285
289
|
this.db = openSafeDatabase(this.config.dbPath, {
|
|
286
290
|
walMode: this.config.walMode,
|
|
287
291
|
busyTimeout: this.config.busyTimeout,
|
|
@@ -289,12 +293,26 @@ export class UnifiedMemoryManager {
|
|
|
289
293
|
this.db.pragma(`mmap_size = ${this.config.mmapSize}`);
|
|
290
294
|
this.db.pragma(`cache_size = ${this.config.cacheSize}`);
|
|
291
295
|
this.db.pragma('foreign_keys = ON');
|
|
296
|
+
// Migrations are the longest-running step under contention (#495's
|
|
297
|
+
// primary stall point). If abort fires after the DB opens, drop the
|
|
298
|
+
// handle before throwing so we don't leak the WAL/SHM in the background.
|
|
299
|
+
if (signal?.aborted) {
|
|
300
|
+
try {
|
|
301
|
+
this.db.close();
|
|
302
|
+
}
|
|
303
|
+
catch { /* best-effort */ }
|
|
304
|
+
this.db = null;
|
|
305
|
+
signal.throwIfAborted();
|
|
306
|
+
}
|
|
292
307
|
await this.runMigrations();
|
|
308
|
+
signal?.throwIfAborted();
|
|
293
309
|
// DATA LOSS PREVENTION: After migration, if the DB existed before and was
|
|
294
310
|
// large (>1MB = has real data), but now qe_patterns is empty, something
|
|
295
311
|
// went wrong. Refuse to proceed with an empty DB over real data.
|
|
296
312
|
if (dbExistedBefore && dbSizeBefore > 1_000_000) {
|
|
297
313
|
try {
|
|
314
|
+
// Non-null: post-runMigrations, this.db is guaranteed open (the
|
|
315
|
+
// abort-cleanup branch above already throws before reaching here).
|
|
298
316
|
const row = this.db.prepare('SELECT COUNT(*) as cnt FROM qe_patterns').get();
|
|
299
317
|
if (row && row.cnt === 0) {
|
|
300
318
|
const currentSize = fs.statSync(this.config.dbPath).size;
|
|
@@ -318,6 +336,13 @@ export class UnifiedMemoryManager {
|
|
|
318
336
|
}
|
|
319
337
|
catch (error) {
|
|
320
338
|
this.initPromise = null;
|
|
339
|
+
// Preserve AbortError so callers can distinguish cancellation from a
|
|
340
|
+
// genuine init failure. Wrapping it in a generic "Failed to initialize"
|
|
341
|
+
// message would hide the signal cause (#495).
|
|
342
|
+
if (error instanceof Error &&
|
|
343
|
+
(error.name === 'AbortError' || (signal?.aborted ?? false))) {
|
|
344
|
+
throw error;
|
|
345
|
+
}
|
|
321
346
|
throw new Error(`Failed to initialize UnifiedMemoryManager: ${toErrorMessage(error)}`);
|
|
322
347
|
}
|
|
323
348
|
}
|