agentic-qe 3.15.12 → 3.15.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/helpers/brain-checkpoint.cjs +124 -5
- package/.claude/skills/skills-manifest.json +1 -1
- package/CHANGELOG.md +196 -0
- package/assets/skills/skills-manifest.json +1 -1
- package/dist/cli/bundle.js +6 -6
- package/dist/cli/chunks/adapter-23KA2YW7.js +2 -0
- package/dist/cli/chunks/{agent-booster-wasm-5VZCKTIJ.js → agent-booster-wasm-2DLAEZK6.js} +2 -2
- package/dist/cli/chunks/{agent-handler-K3C6CQCD.js → agent-handler-P3IY7XEE.js} +2 -2
- package/dist/cli/chunks/{agent-memory-branch-NVFQ25WS.js → agent-memory-branch-WWKC2H3G.js} +2 -2
- package/dist/cli/chunks/aqe-learning-engine-MUICAXW5.js +2 -0
- package/dist/cli/chunks/{arena-TSZVDSXS.js → arena-4BMFF6BS.js} +4 -4
- package/dist/cli/chunks/{arena-QGWIJADQ.js → arena-EIV5OALF.js} +2 -2
- package/dist/cli/chunks/{audit-KIEE2SHJ.js → audit-DNTI453H.js} +3 -3
- package/dist/cli/chunks/base-XPWGYDKD.js +2 -0
- package/dist/cli/chunks/{better-sqlite3-BNB32NW3.js → better-sqlite3-TQBQGNC6.js} +2 -2
- package/dist/cli/chunks/brain-handler-HY57CNAO.js +95 -0
- package/dist/cli/chunks/{branch-enumerator-LZ7UXKAY.js → branch-enumerator-THPMZPHQ.js} +2 -2
- package/dist/cli/chunks/{browser-VDHAW4RK.js → browser-O6JJOZCK.js} +2 -2
- package/dist/cli/chunks/browser-workflow-UMQVBVGK.js +2 -0
- package/dist/cli/chunks/{chunk-4PU5GTZW.js → chunk-2HPNGK7A.js} +2 -2
- package/dist/cli/chunks/{chunk-MCPXNUDK.js → chunk-2IJO3657.js} +2 -2
- package/dist/cli/chunks/{chunk-4Y6OEBJZ.js → chunk-2QLE6NDW.js} +1 -1
- package/dist/cli/chunks/{chunk-DZGPUGUG.js → chunk-2UZBLC5H.js} +2 -2
- package/dist/cli/chunks/{chunk-5A66EGEW.js → chunk-2W5MQDHM.js} +2 -2
- package/dist/cli/chunks/{chunk-JRYWLOBD.js → chunk-3FITMWWJ.js} +2 -2
- package/dist/cli/chunks/{chunk-RCOLPF3B.js → chunk-3TF27MG5.js} +2 -2
- package/dist/cli/chunks/{chunk-KGA7VAI4.js → chunk-3XACRXBY.js} +2 -2
- package/dist/cli/chunks/{chunk-SQVZ3TRU.js → chunk-43XHGWYH.js} +2 -2
- package/dist/cli/chunks/{chunk-JR6CUKAI.js → chunk-4RPBODN5.js} +2 -2
- package/dist/cli/chunks/{chunk-C3YOVASQ.js → chunk-4T7XV5KQ.js} +1 -1
- package/dist/cli/chunks/{chunk-N7O3PF6Y.js → chunk-4WLIOPHX.js} +2 -2
- package/dist/cli/chunks/{chunk-PGSJBXTD.js → chunk-52KOPIMI.js} +2 -2
- package/dist/cli/chunks/{chunk-4KUOYDY2.js → chunk-56NSE3LJ.js} +2 -2
- package/dist/cli/chunks/{chunk-3IU4LDZR.js → chunk-57DRT6UA.js} +2 -2
- package/dist/cli/chunks/{chunk-2JYUA27M.js → chunk-57FX3GP6.js} +1 -1
- package/dist/cli/chunks/{chunk-7QEUHNKO.js → chunk-5PLBQZ5J.js} +1 -1
- package/dist/cli/chunks/{chunk-VF7FTD64.js → chunk-5Y7UFHJD.js} +1 -1
- package/dist/cli/chunks/{chunk-7JFDLL2F.js → chunk-5Z4MO2F3.js} +1 -1
- package/dist/cli/chunks/chunk-65EE2EST.js +8 -0
- package/dist/cli/chunks/{chunk-66PXR3NI.js → chunk-6NIGSY5L.js} +2 -2
- package/dist/cli/chunks/chunk-6O63ZTVX.js +3 -0
- package/dist/cli/chunks/{chunk-ZYOYR3UR.js → chunk-6OI5SK7M.js} +1 -1
- package/dist/cli/chunks/{chunk-5TAEW5OV.js → chunk-6P4Q4RTC.js} +1 -1
- package/dist/cli/chunks/{chunk-W5HQIYQU.js → chunk-7724KXM2.js} +3 -3
- package/dist/cli/chunks/{chunk-A2JCRXTK.js → chunk-7MISCSL5.js} +2 -2
- package/dist/cli/chunks/{chunk-OHVYINGM.js → chunk-7MUO4DEH.js} +3 -3
- package/dist/cli/chunks/{chunk-QCPVUNN3.js → chunk-7QUSNBAA.js} +2 -2
- package/dist/cli/chunks/{chunk-YUA6ZKKY.js → chunk-7SQTLUEN.js} +2 -2
- package/dist/cli/chunks/{chunk-CA5UNWQF.js → chunk-7T6L3LFN.js} +2 -2
- package/dist/cli/chunks/{chunk-UREDS662.js → chunk-7TH4PJSU.js} +2 -2
- package/dist/cli/chunks/{chunk-TVA5GRIU.js → chunk-7Y3LXH57.js} +2 -2
- package/dist/cli/chunks/{chunk-A5Y7DAVQ.js → chunk-A2T56XVL.js} +2 -2
- package/dist/cli/chunks/{chunk-ZROAMFX2.js → chunk-AJVLVF7V.js} +2 -2
- package/dist/cli/chunks/{chunk-26672ISV.js → chunk-ARRBXCII.js} +2 -2
- package/dist/cli/chunks/{chunk-5S4UIDFK.js → chunk-AYLEH2UF.js} +1 -1
- package/dist/cli/chunks/{chunk-DRCBRUGN.js → chunk-BBYJBZHG.js} +2 -2
- package/dist/cli/chunks/{chunk-BMG2JLSQ.js → chunk-BM3EJLMV.js} +2 -2
- package/dist/cli/chunks/{chunk-6QRI3JVE.js → chunk-BNG4J3CE.js} +2 -2
- package/dist/cli/chunks/{chunk-EN7GRVEQ.js → chunk-BPDAQB3F.js} +2 -2
- package/dist/cli/chunks/{chunk-J7Y7ZBIT.js → chunk-BQJ7CV53.js} +9 -9
- package/dist/cli/chunks/{chunk-ADUAJIAU.js → chunk-C3OIBFAA.js} +2 -2
- package/dist/cli/chunks/{chunk-4LWMAAWK.js → chunk-CAZM63TP.js} +2 -2
- package/dist/cli/chunks/{chunk-UZED4YZ5.js → chunk-CIINJHOX.js} +1 -1
- package/dist/cli/chunks/{chunk-C74M4WUI.js → chunk-CPPYZYXC.js} +2 -2
- package/dist/cli/chunks/chunk-D3ZZ2NLL.js +62 -0
- package/dist/cli/chunks/{chunk-U7ZHDGXG.js → chunk-D5GB5PUU.js} +1 -1
- package/dist/cli/chunks/{chunk-HZBXJFGN.js → chunk-DLTB5KCR.js} +2 -2
- package/dist/cli/chunks/{chunk-NNBQZR73.js → chunk-DRLSJJIC.js} +2 -2
- package/dist/cli/chunks/{chunk-HLGFHHWV.js → chunk-DSQESXL4.js} +2 -2
- package/dist/cli/chunks/{chunk-LFBA735S.js → chunk-E2JLAW3U.js} +3 -3
- package/dist/cli/chunks/{chunk-PT2NXS43.js → chunk-E3QIQMMN.js} +1 -1
- package/dist/cli/chunks/{chunk-35MIUSXQ.js → chunk-E7OR6V3V.js} +2 -2
- package/dist/cli/chunks/{chunk-G24SWTAX.js → chunk-E7QTWGPI.js} +413 -413
- package/dist/cli/chunks/{chunk-PX5OPXY6.js → chunk-EC65UZ77.js} +1 -1
- package/dist/cli/chunks/{chunk-JNXK47OL.js → chunk-EIEEST4T.js} +2 -2
- package/dist/cli/chunks/{chunk-2PPSS4JD.js → chunk-FHPNWHY7.js} +2 -2
- package/dist/cli/chunks/{chunk-PTBOLBM4.js → chunk-FJOIBZUB.js} +2 -2
- package/dist/cli/chunks/{chunk-TXEUVUMO.js → chunk-FTYRPEJS.js} +1 -1
- package/dist/cli/chunks/{chunk-ZPVGX4DI.js → chunk-G7HGUQAE.js} +2 -2
- package/dist/cli/chunks/{chunk-EF6OERRR.js → chunk-GY4P7KAI.js} +1 -1
- package/dist/cli/chunks/{chunk-UUZZXHUF.js → chunk-H3C5FJRH.js} +2 -2
- package/dist/cli/chunks/{chunk-L3PV7VXK.js → chunk-H4LYXLAT.js} +1 -1
- package/dist/cli/chunks/{chunk-5Z23ZMXZ.js → chunk-HAYKLXCT.js} +63 -61
- package/dist/cli/chunks/{chunk-IPA7K556.js → chunk-HEDGFKC5.js} +2 -2
- package/dist/cli/chunks/{chunk-BC4T6SCV.js → chunk-HHBF2BZC.js} +4 -4
- package/dist/cli/chunks/{chunk-IVTQF55W.js → chunk-HSDWPQQY.js} +3 -3
- package/dist/cli/chunks/{chunk-SG2TX72G.js → chunk-HTVGHHX2.js} +2 -2
- package/dist/cli/chunks/{chunk-FZJCBSN4.js → chunk-HV43NX4A.js} +2 -2
- package/dist/cli/chunks/{chunk-MMEALJ4D.js → chunk-IDBA5GK2.js} +2 -2
- package/dist/cli/chunks/{chunk-IA55PFLG.js → chunk-INGXD5IX.js} +2 -2
- package/dist/cli/chunks/{chunk-RYHG3I7J.js → chunk-IQRPR4KB.js} +2 -2
- package/dist/cli/chunks/{chunk-7OEFBWAG.js → chunk-IRPNEXOU.js} +2 -2
- package/dist/cli/chunks/{chunk-P7UFJ6DO.js → chunk-J35JWDJE.js} +1 -1
- package/dist/cli/chunks/chunk-J6ASX536.js +2 -0
- package/dist/cli/chunks/{chunk-2ASQRBK2.js → chunk-JAOCHPYX.js} +2 -2
- package/dist/cli/chunks/{chunk-G3AABG4Q.js → chunk-JB7R77SH.js} +2 -2
- package/dist/cli/chunks/{chunk-HSA5IGGW.js → chunk-JI67T6Q2.js} +2 -2
- package/dist/cli/chunks/{chunk-ZGROHCOW.js → chunk-JJHLGGPP.js} +1 -1
- package/dist/cli/chunks/{chunk-L7NGKANW.js → chunk-JK6PMLQQ.js} +2 -2
- package/dist/cli/chunks/{chunk-IL7GQNNE.js → chunk-JO26SG47.js} +2 -2
- package/dist/cli/chunks/{chunk-3EWQN37E.js → chunk-JSSU4RIK.js} +2 -2
- package/dist/cli/chunks/{chunk-TOWOJGEI.js → chunk-K2SMP4OD.js} +1 -1
- package/dist/cli/chunks/{chunk-YVJEUX3I.js → chunk-K7GFYFBO.js} +2 -2
- package/dist/cli/chunks/{chunk-DAUEK66C.js → chunk-K7RT6ITZ.js} +1 -1
- package/dist/cli/chunks/{chunk-33I2ZP6E.js → chunk-KJ5A54ZH.js} +2 -2
- package/dist/cli/chunks/{chunk-W4II6SIH.js → chunk-L5VSLPMW.js} +2 -2
- package/dist/cli/chunks/{chunk-NVRYELCY.js → chunk-L752CNG3.js} +3 -3
- package/dist/cli/chunks/{chunk-MAJXZYGK.js → chunk-L7PC675Y.js} +1 -1
- package/dist/cli/chunks/{chunk-YWWMNTBF.js → chunk-LTGQJYYO.js} +2 -2
- package/dist/cli/chunks/{chunk-7DNR4KKR.js → chunk-M2TG7VDK.js} +1 -1
- package/dist/cli/chunks/{chunk-2E2QO44T.js → chunk-M5JEA6ZY.js} +2 -2
- package/dist/cli/chunks/{chunk-IETBWYHW.js → chunk-MB4UKUBV.js} +2 -2
- package/dist/cli/chunks/{chunk-W7H55PY4.js → chunk-MKYOE7NE.js} +1 -1
- package/dist/cli/chunks/{chunk-FNUFTWEO.js → chunk-MQXWG55U.js} +3 -3
- package/dist/cli/chunks/{chunk-O4QJMANM.js → chunk-MR2OPUSA.js} +1 -1
- package/dist/cli/chunks/{chunk-KA5SHLMW.js → chunk-N736GLWZ.js} +2 -2
- package/dist/cli/chunks/{chunk-NV74SICL.js → chunk-NHEG2DLN.js} +2 -2
- package/dist/cli/chunks/chunk-NKOLILT7.js +86 -0
- package/dist/cli/chunks/{chunk-KJDI5CHX.js → chunk-NPCXGX7N.js} +2 -2
- package/dist/cli/chunks/{chunk-2IVE5AR3.js → chunk-NZQYJCO6.js} +1 -1
- package/dist/cli/chunks/{chunk-4SA7M34P.js → chunk-O2AAYJUV.js} +1 -1
- package/dist/cli/chunks/{chunk-ULCW6IVQ.js → chunk-O32BFQV4.js} +2 -2
- package/dist/cli/chunks/{chunk-JOWUS2X5.js → chunk-O3ERGUXH.js} +1 -1
- package/dist/cli/chunks/{chunk-BYRCB5JT.js → chunk-O5CEL447.js} +2 -2
- package/dist/cli/chunks/{chunk-CPIBIR3X.js → chunk-O756AOUX.js} +2 -2
- package/dist/cli/chunks/{chunk-TSOQ2QLT.js → chunk-OCN53CCK.js} +2 -2
- package/dist/cli/chunks/{chunk-YLKIXEPP.js → chunk-OGEIHS76.js} +1 -1
- package/dist/cli/chunks/{chunk-ICKUINKD.js → chunk-OLUOVNUF.js} +2 -2
- package/dist/cli/chunks/{chunk-5ADXFUMO.js → chunk-P2TPH3TC.js} +2 -2
- package/dist/cli/chunks/{chunk-SBHM5X2S.js → chunk-PCQZIAXB.js} +2 -2
- package/dist/cli/chunks/{chunk-CDA5Z74H.js → chunk-PGN4TARY.js} +2 -2
- package/dist/cli/chunks/{chunk-P5E26N2X.js → chunk-PNRPVQGI.js} +2 -2
- package/dist/cli/chunks/{chunk-23PQF7NN.js → chunk-PWQWKYBG.js} +1 -1
- package/dist/cli/chunks/{chunk-T4EN5VVK.js → chunk-QNQE3EOH.js} +2 -2
- package/dist/cli/chunks/chunk-QP2HLKTS.js +2 -0
- package/dist/cli/chunks/{chunk-7TA5MUPW.js → chunk-QP6GL3O5.js} +1 -1
- package/dist/cli/chunks/{chunk-GKFV6CUD.js → chunk-QUZ745UQ.js} +2 -2
- package/dist/cli/chunks/{chunk-INZARYUD.js → chunk-R5RRWLRI.js} +2 -2
- package/dist/cli/chunks/{chunk-VZBC6DP7.js → chunk-RE6JTSDM.js} +1 -1
- package/dist/cli/chunks/{chunk-JGIJPDGD.js → chunk-TOJF3ZG4.js} +2 -2
- package/dist/cli/chunks/{chunk-WLRU6ESI.js → chunk-TSP6SU5V.js} +2 -2
- package/dist/cli/chunks/{chunk-6E6HB4N4.js → chunk-TW6Z6W4X.js} +4 -4
- package/dist/cli/chunks/{chunk-ENGL7FIJ.js → chunk-TWOV3I3A.js} +1 -1
- package/dist/cli/chunks/chunk-U4TML2VD.js +3 -0
- package/dist/cli/chunks/{chunk-O3IM4WRZ.js → chunk-U6IOQKCT.js} +2 -2
- package/dist/cli/chunks/{chunk-SPC4RBLF.js → chunk-UDSB3XCG.js} +2 -2
- package/dist/cli/chunks/{chunk-URSTP3WI.js → chunk-UFP7SN5V.js} +2 -2
- package/dist/cli/chunks/{chunk-MYF5CNGV.js → chunk-UMHFTQTR.js} +2 -2
- package/dist/cli/chunks/{chunk-65TH6RPD.js → chunk-UNYTHZDZ.js} +1 -1
- package/dist/cli/chunks/{chunk-FAGKBOX2.js → chunk-UPWLMIDY.js} +2 -2
- package/dist/cli/chunks/{chunk-4CB3QPZM.js → chunk-USAKCGHC.js} +2 -2
- package/dist/cli/chunks/{chunk-QUJJYTJH.js → chunk-V3MGY76S.js} +2 -2
- package/dist/cli/chunks/{chunk-WDEXOLK2.js → chunk-V6SE2ZU2.js} +1 -1
- package/dist/cli/chunks/{chunk-JW5PDJ5O.js → chunk-VCVRZD4Y.js} +3 -3
- package/dist/cli/chunks/{chunk-TGMXUZZC.js → chunk-VG32EEUG.js} +2 -2
- package/dist/cli/chunks/{chunk-MYUMJ2ZI.js → chunk-VGZOPQQY.js} +1 -1
- package/dist/cli/chunks/{chunk-BOSMELJX.js → chunk-VJBJRFUO.js} +2 -2
- package/dist/cli/chunks/{chunk-K3A3NWT3.js → chunk-WBC6WB32.js} +2 -2
- package/dist/cli/chunks/{chunk-QWG3SILX.js → chunk-WCM6WE7G.js} +5 -5
- package/dist/cli/chunks/{chunk-GJKZ7UQO.js → chunk-WCPSR4MJ.js} +2 -2
- package/dist/cli/chunks/{chunk-U6IXYQO4.js → chunk-WKI46WWN.js} +2 -2
- package/dist/cli/chunks/{chunk-NX4BCSOZ.js → chunk-WM2QRIRD.js} +2 -2
- package/dist/cli/chunks/{chunk-32UTHIY5.js → chunk-WRC3HLUY.js} +3 -3
- package/dist/cli/chunks/{chunk-AJEXPFAB.js → chunk-WUGXXNK4.js} +1 -1
- package/dist/cli/chunks/{chunk-NA3F6FEO.js → chunk-WZQADC5R.js} +2 -2
- package/dist/cli/chunks/{chunk-SDRJJUPO.js → chunk-X6NJOT3V.js} +1 -1
- package/dist/cli/chunks/{chunk-CU36D7TN.js → chunk-X6Q2N5S5.js} +2 -2
- package/dist/cli/chunks/{chunk-UIKQPO4Y.js → chunk-X7CUI7KH.js} +2 -2
- package/dist/cli/chunks/{chunk-MCPEC6OO.js → chunk-XMCSKYDE.js} +1 -1
- package/dist/cli/chunks/{chunk-WTAUF6O4.js → chunk-XN3KCKAM.js} +2 -2
- package/dist/cli/chunks/{chunk-TLRHAMX5.js → chunk-XSPMLJCQ.js} +1 -1
- package/dist/cli/chunks/{chunk-VUR5THML.js → chunk-XTZGAG6P.js} +2 -2
- package/dist/cli/chunks/{chunk-47RMGDG4.js → chunk-YE54T2NQ.js} +2 -2
- package/dist/cli/chunks/{chunk-HM3LSFTY.js → chunk-YEFTK4HD.js} +2 -2
- package/dist/cli/chunks/{chunk-4HWUECVD.js → chunk-YGC5QKQ4.js} +2 -2
- package/dist/cli/chunks/{chunk-SUX5XB2Z.js → chunk-YGOSSVY5.js} +2 -2
- package/dist/cli/chunks/{chunk-UJNGGFGX.js → chunk-YKQWIXUY.js} +2 -2
- package/dist/cli/chunks/{chunk-SITL5YZV.js → chunk-Z2S7DNFP.js} +2 -2
- package/dist/cli/chunks/{chunk-WGTEZT7G.js → chunk-Z54G2YOL.js} +2 -2
- package/dist/cli/chunks/{chunk-YNVEDFPQ.js → chunk-ZJGFQK27.js} +1 -1
- package/dist/cli/chunks/{chunk-35NW676P.js → chunk-ZUE524JL.js} +2 -2
- package/dist/cli/chunks/{ci-BZNWW3I3.js → ci-UMA2SMNW.js} +2 -2
- package/dist/cli/chunks/{ci-config-LOHNXOKV.js → ci-config-UQSILJFQ.js} +2 -2
- package/dist/cli/chunks/{ci-output-LCOQBSJL.js → ci-output-U6YZLLKH.js} +2 -2
- package/dist/cli/chunks/{circuit-breaker-7LRXTLFE.js → circuit-breaker-ATYQP6X2.js} +2 -2
- package/dist/cli/chunks/{claude-flow-setup-HBU4VWC3.js → claude-flow-setup-6YHFD7AN.js} +2 -2
- package/dist/cli/chunks/client-E43GWLQH.js +2 -0
- package/dist/cli/chunks/{cline-installer-CO6MLH6X.js → cline-installer-EPE7IOZE.js} +2 -2
- package/dist/cli/chunks/{code-SIXBS6JM.js → code-NUEJ4XYO.js} +19 -18
- package/dist/cli/chunks/{code-index-extractor-GWJKZ2IQ.js → code-index-extractor-D4DBT6OL.js} +2 -2
- package/dist/cli/chunks/{codex-installer-6NINVWXJ.js → codex-installer-633SM4LR.js} +2 -2
- package/dist/cli/chunks/{completions-7VIX3GML.js → completions-WUKVIW3L.js} +2 -2
- package/dist/cli/chunks/{complexity-analyzer-FBQR6ZP2.js → complexity-analyzer-F73ACR5H.js} +2 -2
- package/dist/cli/chunks/{continuedev-installer-VA7RIXW5.js → continuedev-installer-QH42TKMS.js} +2 -2
- package/dist/cli/chunks/{copilot-installer-4QEBC4MU.js → copilot-installer-Y3XC7BTT.js} +2 -2
- package/dist/cli/chunks/core-handlers-R5A3SQDY.js +2 -0
- package/dist/cli/chunks/{cost-tracker-GRYKHPWL.js → cost-tracker-57QPV7E3.js} +2 -2
- package/dist/cli/chunks/coverage-IBCHMBCR.js +51 -0
- package/dist/cli/chunks/cross-domain-router-LLYVPZF6.js +2 -0
- package/dist/cli/chunks/{cursor-installer-ZXIPSZVH.js → cursor-installer-F4UYQHIN.js} +2 -2
- package/dist/cli/chunks/{daemon-N2VRHPSJ.js → daemon-BYYPIJ7G.js} +4 -4
- package/dist/cli/chunks/{daemon-D7F3RGI5.js → daemon-XR4Q6YZF.js} +3 -3
- package/dist/cli/chunks/{dag-attention-scheduler-NL6BA7BY.js → dag-attention-scheduler-ZR5ZD3TW.js} +2 -2
- package/dist/cli/chunks/{detect-XC2HCIIT.js → detect-GEGYURLL.js} +2 -2
- package/dist/cli/chunks/{dist-node-A3Y26MEI.js → dist-node-JU3KT2JO.js} +2 -2
- package/dist/cli/chunks/{domain-handler-WV6SFXRB.js → domain-handler-7QI3FJGE.js} +2 -2
- package/dist/cli/chunks/{domain-plugins-KJIF6Z2B.js → domain-plugins-O2YRM2PD.js} +2 -2
- package/dist/cli/chunks/domain-transfer-7J3S2OS6.js +2 -0
- package/dist/cli/chunks/dream-6C4NURSE.js +2 -0
- package/dist/cli/chunks/{embed-and-insert-pattern-PA3Y4KGO.js → embed-and-insert-pattern-URES5Q6J.js} +2 -2
- package/dist/cli/chunks/{eval-YGEZNUVE.js → eval-RVMCIUOR.js} +2 -2
- package/dist/cli/chunks/{experience-capture-middleware-D4T7NW6B.js → experience-capture-middleware-SYJQSBKE.js} +3 -3
- package/dist/cli/chunks/{fast-paths-6JYK7RYQ.js → fast-paths-QUKPKWKZ.js} +2 -2
- package/dist/cli/chunks/{feature-flags-DKXMDVPE.js → feature-flags-5JCSKL2P.js} +2 -2
- package/dist/cli/chunks/{feature-flags-RBH2GDSR.js → feature-flags-K7JXNKJI.js} +2 -2
- package/dist/cli/chunks/file-discovery-J5IE5KP7.js +2 -0
- package/dist/cli/chunks/fleet-II4Q6HXK.js +44 -0
- package/dist/cli/chunks/{gnn-wrapper-MV54UC4C.js → gnn-wrapper-M7VO2EMS.js} +2 -2
- package/dist/cli/chunks/{heartbeat-handler-7DKMVQQH.js → heartbeat-handler-ND5CY26N.js} +4 -4
- package/dist/cli/chunks/heartbeat-scheduler-FC5PBTMN.js +2 -0
- package/dist/cli/chunks/hnsw-adapter-47UIVOBG.js +2 -0
- package/dist/cli/chunks/hnsw-index-3AKVLOZQ.js +2 -0
- package/dist/cli/chunks/{hnsw-legacy-bridge-6IWREDQC.js → hnsw-legacy-bridge-N3AUUUU7.js} +2 -2
- package/dist/cli/chunks/{hnswlib-node-5BIESSCK.js → hnswlib-node-NZY3E5EN.js} +2 -2
- package/dist/cli/chunks/{hooks-3EETRM62.js → hooks-QVJDTII5.js} +10 -10
- package/dist/cli/chunks/hybrid-backend-YAOSNX47.js +2 -0
- package/dist/cli/chunks/{hypergraph-engine-RSWCB2D3.js → hypergraph-engine-ZRY6MTDV.js} +2 -2
- package/dist/cli/chunks/{hypergraph-handler-552LXKL3.js → hypergraph-handler-56DO4XZQ.js} +3 -3
- package/dist/cli/chunks/impact-analyzer-4FMJXM4M.js +2 -0
- package/dist/cli/chunks/{init-guard-OTDBJ5HD.js → init-guard-DTF4EVUY.js} +2 -2
- package/dist/cli/chunks/{init-handler-3FK3TKEA.js → init-handler-M6CNQHMX.js} +6 -6
- package/dist/cli/chunks/init-wizard-RTLCRWDT.js +2 -0
- package/dist/cli/chunks/kernel-2OWIGGGT.js +2 -0
- package/dist/cli/chunks/{kilocode-installer-KZ2O4LF3.js → kilocode-installer-IJN7XKBH.js} +2 -2
- package/dist/cli/chunks/{kiro-installer-MLCCXRF7.js → kiro-installer-UKKPGPDC.js} +2 -2
- package/dist/cli/chunks/knowledge-graph-25XXKDJN.js +2 -0
- package/dist/cli/chunks/learning-W2HETWQ4.js +131 -0
- package/dist/cli/chunks/{llm-router-PDEV3UP2.js → llm-router-Y546K4VX.js} +4 -4
- package/dist/cli/chunks/llm-router-service-G3EIN4UB.js +2 -0
- package/dist/cli/chunks/{load-XFVVLO7E.js → load-MKAB2AXE.js} +2 -2
- package/dist/cli/chunks/load-test-D6QYNIVT.js +2 -0
- package/dist/cli/chunks/{mcp-74G3CL2S.js → mcp-AZKUS6K3.js} +2 -2
- package/dist/cli/chunks/{memory-XIFM6JNX.js → memory-ZDOQN2KU.js} +5 -5
- package/dist/cli/chunks/memory-backend-LDFFZMEQ.js +2 -0
- package/dist/cli/chunks/{memory-handlers-ZCKURV6S.js → memory-handlers-3SQVY7FE.js} +2 -2
- package/dist/cli/chunks/{multi-model-executor-7L4W3O2Q.js → multi-model-executor-WWVXDHG4.js} +2 -2
- package/dist/cli/chunks/{opencode-installer-BPG422LF.js → opencode-installer-YUJNXXWS.js} +2 -2
- package/dist/cli/chunks/{orchestrator-OEAFLAEV.js → orchestrator-Z6PWPLRE.js} +109 -25
- package/dist/cli/chunks/pattern-null-store-KDVRM7PW.js +2 -0
- package/dist/cli/chunks/{pattern-usage-recorder-LOPNCULT.js → pattern-usage-recorder-TPWPX32U.js} +2 -2
- package/dist/cli/chunks/{pipeline-VWTYUZB7.js → pipeline-4BBGTE4M.js} +2 -2
- package/dist/cli/chunks/{platform-WFJJ3X2E.js → platform-5GSHXCV5.js} +2 -2
- package/dist/cli/chunks/{plugin-744TPUSG.js → plugin-OFDVF5HS.js} +2 -2
- package/dist/cli/chunks/{prime-radiant-advanced-wasm-BD5BLNDR.js → prime-radiant-advanced-wasm-NC6MUYGJ.js} +2 -2
- package/dist/cli/chunks/project-root-DDGBWDP6.js +2 -0
- package/dist/cli/chunks/protocol-executor-KBOLLCWA.js +2 -0
- package/dist/cli/chunks/{protocol-handler-JIBILI74.js → protocol-handler-MPOAAEPA.js} +2 -2
- package/dist/cli/chunks/{prove-MNOL5FYW.js → prove-CDKMAIVM.js} +2 -2
- package/dist/cli/chunks/qe-reasoning-bank-GRXBT7FC.js +2 -0
- package/dist/cli/chunks/{quality-JEGBDGGX.js → quality-ZH4F7R7R.js} +2 -2
- package/dist/cli/chunks/{quality-gate-SYJ6ROMI.js → quality-gate-IDRMW6OE.js} +3 -3
- package/dist/cli/chunks/queen-coordinator-L2QWMJ5Q.js +2 -0
- package/dist/cli/chunks/{real-embeddings-ZWXS5ZFV.js → real-embeddings-I2UVNNB3.js} +2 -2
- package/dist/cli/chunks/{ref-validation-RRHUFW2N.js → ref-validation-Z5GCGVXK.js} +2 -2
- package/dist/cli/chunks/{roocode-installer-XFO6JSVN.js → roocode-installer-IZ2S7PH2.js} +2 -2
- package/dist/cli/chunks/router-FT5WJPUH.js +2 -0
- package/dist/cli/chunks/routing-feedback-EO2MKOUX.js +2 -0
- package/dist/cli/chunks/{routing-handler-L2K3JASE.js → routing-handler-NAX35VUW.js} +2 -2
- package/dist/cli/chunks/{ruvector-commands-A6CINHGM.js → ruvector-commands-5YW2SOFF.js} +2 -2
- package/dist/cli/chunks/rvf-dual-writer-WHBFQJVU.js +2 -0
- package/dist/cli/chunks/rvf-migration-adapter-YT3APF2I.js +2 -0
- package/dist/cli/chunks/{rvf-migration-coordinator-T4RY7L53.js → rvf-migration-coordinator-VUIZHTVG.js} +2 -2
- package/dist/cli/chunks/rvf-native-adapter-37PUFKQD.js +2 -0
- package/dist/cli/chunks/{rvf-store-integrity-IR33TGQS.js → rvf-store-integrity-IPGCAT6C.js} +2 -2
- package/dist/cli/chunks/safe-db-TDZKUOZJ.js +2 -0
- package/dist/cli/chunks/schedule-CRKTRY2A.js +2 -0
- package/dist/cli/chunks/scheduler-6ZBDVQWN.js +2 -0
- package/dist/cli/chunks/{security-Z5GDE2IH.js → security-3IH4BO5Z.js} +3 -3
- package/dist/cli/chunks/{shared-rvf-adapter-SIZMEHPM.js → shared-rvf-adapter-ABY7PAY2.js} +2 -2
- package/dist/cli/chunks/{shared-rvf-dual-writer-HLM65RDS.js → shared-rvf-dual-writer-6KENLN2W.js} +2 -2
- package/dist/cli/chunks/sqlite-persistence-FFJQAIKW.js +2 -0
- package/dist/cli/chunks/{standalone-memory-SKSZG7P5.js → standalone-memory-RLFAUGOW.js} +2 -2
- package/dist/cli/chunks/{status-handler-766YOOMJ.js → status-handler-FCOZBPE5.js} +2 -2
- package/dist/cli/chunks/{structural-health-M45FNOLT.js → structural-health-4RDA5UUM.js} +2 -2
- package/dist/cli/chunks/{sync-B2U366I3.js → sync-54LUAUTK.js} +2 -2
- package/dist/cli/chunks/{sync-6CJ24B5T.js → sync-KGEEXXCC.js} +2 -2
- package/dist/cli/chunks/task-handler-K3OXHYKU.js +62 -0
- package/dist/cli/chunks/task-handlers-6H7L2UT4.js +9 -0
- package/dist/cli/chunks/{test-TODH7KRF.js → test-S7IG6EIX.js} +4 -4
- package/dist/cli/chunks/test-runner-process-OTQDAJLN.js +2 -0
- package/dist/cli/chunks/{test-scheduling-VMVMVRHT.js → test-scheduling-7XYXI4L2.js} +3 -3
- package/dist/cli/chunks/{token-bootstrap-XQW7BMCK.js → token-bootstrap-3QMABE45.js} +2 -2
- package/dist/cli/chunks/{token-usage-JCZEIRKO.js → token-usage-Y2YTPOFE.js} +2 -2
- package/dist/cli/chunks/{transformers-U2ML3OHE.js → transformers-UCJ3HHHC.js} +2 -2
- package/dist/cli/chunks/tree-sitter-wasm-parser-D6JTTHTP.js +2 -0
- package/dist/cli/chunks/{types-GGEPCHP6.js → types-6CMFPETH.js} +2 -2
- package/dist/cli/chunks/unified-memory-QARWQKJ2.js +2 -0
- package/dist/cli/chunks/unified-memory-hnsw-LHY3DXCP.js +2 -0
- package/dist/cli/chunks/unified-persistence-WEYYGLHM.js +2 -0
- package/dist/cli/chunks/{upgrade-T5GRM7HS.js → upgrade-K25DN6WU.js} +2 -2
- package/dist/cli/chunks/{validate-XMUJPLP3.js → validate-T4V3TBY3.js} +2 -2
- package/dist/cli/chunks/{validate-swarm-KJLF7JEH.js → validate-swarm-XSRC576T.js} +2 -2
- package/dist/cli/chunks/visual-security-O4ALMCXQ.js +2 -0
- package/dist/cli/chunks/{web-tree-sitter-LOHVZ7G5.js → web-tree-sitter-YOZXHRTN.js} +2 -2
- package/dist/cli/chunks/{windsurf-installer-33FBTXJU.js → windsurf-installer-ITPU2IYL.js} +2 -2
- package/dist/cli/chunks/witness-chain-B3YW5NMS.js +2 -0
- package/dist/cli/chunks/witness-chain-PIYR72HJ.js +2 -0
- package/dist/cli/chunks/{witness-chain-repair-VWBO4NXE.js → witness-chain-repair-YUG7E3UX.js} +2 -2
- package/dist/cli/chunks/{witness-chain-verifier-BHJ3ZAEK.js → witness-chain-verifier-DTDSVKOG.js} +2 -2
- package/dist/cli/chunks/{witness-key-manager-WNVPH2Z3.js → witness-key-manager-EWACWGAW.js} +2 -2
- package/dist/cli/chunks/{workflow-6QR5MQTO.js → workflow-ZIQ4FV42.js} +4 -4
- package/dist/cli/chunks/workflow-orchestrator-3ZN2BCGY.js +2 -0
- package/dist/cli/chunks/{wrappers-EHOL62TS.js → wrappers-PW2O27LL.js} +2 -2
- package/dist/cli/commands/code.js +6 -0
- package/dist/cli/commands/coverage.js +6 -0
- package/dist/cli/commands/fleet-run.d.ts +12 -0
- package/dist/cli/commands/fleet-run.js +175 -0
- package/dist/cli/commands/fleet.js +2 -117
- package/dist/cli/commands/learning-prune.d.ts +14 -0
- package/dist/cli/commands/learning-prune.js +105 -0
- package/dist/cli/commands/learning.js +9 -0
- package/dist/cli/handlers/brain-handler.js +12 -1
- package/dist/cli/handlers/task-handler.d.ts +5 -0
- package/dist/cli/handlers/task-handler.js +20 -0
- package/dist/cli/utils/coverage-verdict.js +14 -3
- package/dist/cli/utils/fleet-operation.d.ts +5 -2
- package/dist/cli/utils/fleet-operation.js +13 -2
- package/dist/cli/utils/fleet-result.d.ts +16 -2
- package/dist/cli/utils/fleet-result.js +26 -21
- package/dist/cli/utils/fleet-shard.d.ts +36 -0
- package/dist/cli/utils/fleet-shard.js +110 -0
- package/dist/context/compaction/index.d.ts +7 -0
- package/dist/context/compaction/index.js +30 -6
- package/dist/coordination/handlers/code-intelligence-handlers.js +21 -1
- package/dist/coordination/handlers/coverage-evidence.d.ts +19 -0
- package/dist/coordination/handlers/coverage-evidence.js +31 -2
- package/dist/coordination/handlers/coverage-handlers.js +5 -1
- package/dist/coordination/handlers/coverage-target.js +8 -1
- package/dist/coordination/handlers/handler-types.d.ts +2 -2
- package/dist/coordination/handlers/handler-utils.d.ts +6 -0
- package/dist/coordination/handlers/handler-utils.js +14 -4
- package/dist/coordination/handlers/misc-handlers.js +5 -2
- package/dist/coordination/handlers/quality-handlers.js +11 -3
- package/dist/coordination/handlers/security-handlers.js +12 -2
- package/dist/coordination/protocols/security-audit.js +11 -1
- package/dist/coordination/result-saver-adapters.js +1 -0
- package/dist/coordination/result-saver.js +9 -5
- package/dist/coordination/task-executor.js +7 -2
- package/dist/domains/chaos-resilience/services/chaos-engineer.d.ts +1 -0
- package/dist/domains/chaos-resilience/services/chaos-engineer.js +23 -45
- package/dist/domains/code-intelligence/coordinator-gnn.d.ts +2 -16
- package/dist/domains/code-intelligence/coordinator-gnn.js +1 -62
- package/dist/domains/code-intelligence/coordinator.d.ts +12 -6
- package/dist/domains/code-intelligence/coordinator.js +24 -27
- package/dist/domains/code-intelligence/interfaces.d.ts +9 -0
- package/dist/domains/code-intelligence/services/semantic-analyzer.d.ts +43 -5
- package/dist/domains/code-intelligence/services/semantic-analyzer.js +134 -71
- package/dist/domains/coverage-analysis/collected-metrics.d.ts +26 -0
- package/dist/domains/coverage-analysis/collected-metrics.js +54 -0
- package/dist/domains/coverage-analysis/services/coverage-analyzer.js +13 -3
- package/dist/domains/coverage-analysis/services/coverage-parser.d.ts +2 -0
- package/dist/domains/coverage-analysis/services/coverage-parser.js +18 -2
- package/dist/domains/defect-intelligence/services/defect-predictor.js +3 -6
- package/dist/domains/quality-assessment/coherence/gate-controller.js +16 -4
- package/dist/domains/quality-assessment/coherence/lambda-calculator.d.ts +8 -0
- package/dist/domains/quality-assessment/coherence/lambda-calculator.js +57 -14
- package/dist/domains/quality-assessment/coherence/types.d.ts +12 -7
- package/dist/domains/quality-assessment/coordinator-gate-evaluation.js +3 -1
- package/dist/domains/quality-assessment/coordinator-reports.d.ts +30 -10
- package/dist/domains/quality-assessment/coordinator-reports.js +93 -57
- package/dist/domains/quality-assessment/coordinator.d.ts +14 -40
- package/dist/domains/quality-assessment/coordinator.js +10 -4
- package/dist/domains/quality-assessment/coverage-report-event.d.ts +8 -0
- package/dist/domains/quality-assessment/coverage-report-event.js +22 -1
- package/dist/domains/quality-assessment/interfaces.d.ts +8 -0
- package/dist/domains/quality-assessment/services/coherence-gate.js +15 -2
- package/dist/domains/quality-assessment/services/quality-analyzer.d.ts +4 -0
- package/dist/domains/quality-assessment/services/quality-analyzer.js +63 -17
- package/dist/domains/quality-assessment/services/quality-gate.js +6 -4
- package/dist/domains/security-compliance/index.d.ts +1 -1
- package/dist/domains/security-compliance/interfaces.d.ts +46 -5
- package/dist/domains/security-compliance/services/scanners/dast-auth-testing.d.ts +3 -3
- package/dist/domains/security-compliance/services/scanners/dast-auth-testing.js +15 -14
- package/dist/domains/security-compliance/services/scanners/dast-helpers.d.ts +8 -9
- package/dist/domains/security-compliance/services/scanners/dast-helpers.js +19 -44
- package/dist/domains/security-compliance/services/scanners/dast-injection-testing.d.ts +3 -3
- package/dist/domains/security-compliance/services/scanners/dast-injection-testing.js +13 -9
- package/dist/domains/security-compliance/services/scanners/dast-requests.d.ts +54 -0
- package/dist/domains/security-compliance/services/scanners/dast-requests.js +125 -0
- package/dist/domains/security-compliance/services/scanners/dast-scanner.d.ts +5 -1
- package/dist/domains/security-compliance/services/scanners/dast-scanner.js +125 -155
- package/dist/domains/security-compliance/services/scanners/index.d.ts +1 -1
- package/dist/domains/security-compliance/services/scanners/index.js +1 -1
- package/dist/domains/security-compliance/services/scanners/scanner-types.d.ts +2 -2
- package/dist/domains/security-compliance/services/security-auditor-dast.js +183 -212
- package/dist/domains/security-compliance/services/security-auditor-reports.js +5 -1
- package/dist/domains/security-compliance/services/security-auditor.d.ts +11 -3
- package/dist/domains/security-compliance/services/security-auditor.js +106 -65
- package/dist/domains/test-execution/coordinator.d.ts +2 -1
- package/dist/domains/test-execution/coordinator.js +33 -27
- package/dist/domains/test-execution/interfaces.d.ts +10 -0
- package/dist/domains/test-execution/services/test-executor.d.ts +6 -0
- package/dist/domains/test-execution/services/test-executor.js +22 -4
- package/dist/domains/visual-accessibility/coordinator.js +34 -9
- package/dist/domains/visual-accessibility/interfaces.d.ts +27 -0
- package/dist/domains/visual-accessibility/plugin.js +5 -0
- package/dist/domains/visual-accessibility/services/accessibility-tester-heuristics.d.ts +13 -21
- package/dist/domains/visual-accessibility/services/accessibility-tester-heuristics.js +13 -297
- package/dist/domains/visual-accessibility/services/accessibility-tester.d.ts +13 -5
- package/dist/domains/visual-accessibility/services/accessibility-tester.js +96 -73
- package/dist/init/phases/07-hooks.js +90 -6
- package/dist/integrations/embeddings/index/HNSWIndex.js +8 -4
- package/dist/integrations/ruvector/brain-rvf-exporter.d.ts +25 -0
- package/dist/integrations/ruvector/brain-rvf-exporter.js +154 -61
- package/dist/integrations/ruvector/transfer-coherence-stub.js +5 -10
- package/dist/learning/dream/dream-engine.d.ts +24 -1
- package/dist/learning/dream/dream-engine.js +57 -6
- package/dist/learning/learning-retention.d.ts +103 -0
- package/dist/learning/learning-retention.js +213 -0
- package/dist/mcp/bundle.js +508 -503
- package/dist/mcp/handlers/domain-handler-configs.d.ts +17 -1
- package/dist/mcp/handlers/domain-handler-configs.js +33 -16
- package/dist/mcp/handlers/handler-factory.js +3 -0
- package/dist/mcp/handlers/model-route-handlers.d.ts +107 -0
- package/dist/mcp/handlers/model-route-handlers.js +139 -0
- package/dist/mcp/handlers/orchestrate-routes.js +41 -3
- package/dist/mcp/handlers/task-handlers.d.ts +3 -251
- package/dist/mcp/handlers/task-handlers.js +6 -828
- package/dist/mcp/handlers/task-inference.d.ts +26 -0
- package/dist/mcp/handlers/task-inference.js +156 -0
- package/dist/mcp/handlers/task-learning-handlers.d.ts +92 -0
- package/dist/mcp/handlers/task-learning-handlers.js +230 -0
- package/dist/mcp/handlers/task-orchestrate-handler.d.ts +73 -0
- package/dist/mcp/handlers/task-orchestrate-handler.js +361 -0
- package/dist/mcp/protocol-server.js +13 -3
- package/dist/mcp/tools/chaos-resilience/inject.d.ts +3 -4
- package/dist/mcp/tools/chaos-resilience/inject.js +11 -81
- package/dist/mcp/tools/code-intelligence/analyze.js +3 -6
- package/dist/mcp/tools/coverage-analysis/index.d.ts +4 -0
- package/dist/mcp/tools/coverage-analysis/index.js +8 -2
- package/dist/mcp/tools/learning-optimization/dream.d.ts +8 -0
- package/dist/mcp/tools/learning-optimization/dream.js +4 -0
- package/dist/mcp/tools/visual-accessibility/index.d.ts +7 -0
- package/dist/mcp/tools/visual-accessibility/index.js +29 -13
- package/dist/shared/events/domain-events.d.ts +2 -0
- package/dist/shared/metrics/code-metrics.js +21 -3
- package/dist/shared/parsers/typescript-parser.d.ts +6 -0
- package/dist/shared/parsers/typescript-parser.js +13 -1
- package/package.json +1 -1
- package/dist/cli/chunks/adapter-HL7MOCQN.js +0 -2
- package/dist/cli/chunks/aqe-learning-engine-OZ2DXB4G.js +0 -2
- package/dist/cli/chunks/base-WIM7G3HC.js +0 -2
- package/dist/cli/chunks/brain-handler-MPC5SPYI.js +0 -94
- package/dist/cli/chunks/browser-workflow-QRKCFVR3.js +0 -2
- package/dist/cli/chunks/chunk-4A76VPU4.js +0 -3
- package/dist/cli/chunks/chunk-QSGEBCDB.js +0 -62
- package/dist/cli/chunks/chunk-UCSK2RMI.js +0 -2
- package/dist/cli/chunks/chunk-VXVTFKRA.js +0 -2
- package/dist/cli/chunks/chunk-XCNSGSKV.js +0 -3
- package/dist/cli/chunks/chunk-XZOYKB22.js +0 -79
- package/dist/cli/chunks/chunk-YIDAXOUX.js +0 -8
- package/dist/cli/chunks/client-4PNYDFYS.js +0 -2
- package/dist/cli/chunks/core-handlers-ODO6LUWQ.js +0 -2
- package/dist/cli/chunks/coverage-USPMNKOU.js +0 -50
- package/dist/cli/chunks/cross-domain-router-DT4MHJKK.js +0 -2
- package/dist/cli/chunks/domain-transfer-L3F6AES2.js +0 -2
- package/dist/cli/chunks/dream-QOB3JCOM.js +0 -2
- package/dist/cli/chunks/file-discovery-BN76S2PR.js +0 -2
- package/dist/cli/chunks/fleet-43YMXACN.js +0 -46
- package/dist/cli/chunks/heartbeat-scheduler-3NNP4WCP.js +0 -2
- package/dist/cli/chunks/hnsw-adapter-MZR7Y4WF.js +0 -2
- package/dist/cli/chunks/hnsw-index-HE4AX22U.js +0 -2
- package/dist/cli/chunks/hybrid-backend-IHUHB3Y2.js +0 -2
- package/dist/cli/chunks/impact-analyzer-FI6GI6PD.js +0 -2
- package/dist/cli/chunks/init-wizard-WLQKH5Y5.js +0 -2
- package/dist/cli/chunks/kernel-2WZOQEZS.js +0 -2
- package/dist/cli/chunks/knowledge-graph-G3LVKK6P.js +0 -2
- package/dist/cli/chunks/learning-QUCMBD77.js +0 -122
- package/dist/cli/chunks/llm-router-service-MM75HKWJ.js +0 -2
- package/dist/cli/chunks/load-test-BEWEE44J.js +0 -2
- package/dist/cli/chunks/memory-backend-NYKBBKZR.js +0 -2
- package/dist/cli/chunks/pattern-null-store-QGPUIV6M.js +0 -2
- package/dist/cli/chunks/project-root-C7ELXZRK.js +0 -2
- package/dist/cli/chunks/protocol-executor-SUVE33BM.js +0 -2
- package/dist/cli/chunks/qe-reasoning-bank-YWZMMGJB.js +0 -2
- package/dist/cli/chunks/queen-coordinator-ZFAKXRN7.js +0 -2
- package/dist/cli/chunks/router-4FTAVYLJ.js +0 -2
- package/dist/cli/chunks/routing-feedback-IO2KOWMJ.js +0 -2
- package/dist/cli/chunks/rvf-dual-writer-KCIRNE7C.js +0 -2
- package/dist/cli/chunks/rvf-migration-adapter-MFC5WTJU.js +0 -2
- package/dist/cli/chunks/rvf-native-adapter-I3KWHE7X.js +0 -2
- package/dist/cli/chunks/safe-db-QXDZ6QY3.js +0 -2
- package/dist/cli/chunks/schedule-CZKD6RIY.js +0 -2
- package/dist/cli/chunks/scheduler-BLA3Q4CH.js +0 -2
- package/dist/cli/chunks/sqlite-persistence-XIUYDJC4.js +0 -2
- package/dist/cli/chunks/task-handler-P6IFLCKP.js +0 -62
- package/dist/cli/chunks/task-handlers-DPWMUKFC.js +0 -9
- package/dist/cli/chunks/test-runner-process-46IPK3GH.js +0 -2
- package/dist/cli/chunks/tree-sitter-wasm-parser-MOI2WWNJ.js +0 -2
- package/dist/cli/chunks/unified-memory-FL26RTV3.js +0 -2
- package/dist/cli/chunks/unified-memory-hnsw-E2BPTH3U.js +0 -2
- package/dist/cli/chunks/unified-persistence-5ZOUPKHF.js +0 -2
- package/dist/cli/chunks/visual-security-IJVPO5FA.js +0 -2
- package/dist/cli/chunks/witness-chain-5FAFCQKP.js +0 -2
- package/dist/cli/chunks/witness-chain-V2M32W5D.js +0 -2
- package/dist/cli/chunks/workflow-orchestrator-3JLF3IX7.js +0 -2
|
@@ -9,6 +9,54 @@ import { createRvfStore, openRvfStore, openRvfStoreReadonly, isRvfNativeAvailabl
|
|
|
9
9
|
import { sha256, tableExists, queryAll, domainFilterForColumn, runImportTransaction, mergeGenericRow, remapPatternReferences, mergeAppendOnlyRow, TABLE_CONFIGS, TABLE_BLOB_COLUMNS, PK_COLUMNS, CONFIDENCE_COLUMNS, TIMESTAMP_COLUMNS, serializeRowBlobs, deserializeRowBlobs, } from './brain-shared.js';
|
|
10
10
|
import { appendBrainImportWitness } from './brain-import-audit.js';
|
|
11
11
|
// --- Export ---
|
|
12
|
+
/**
|
|
13
|
+
* Largest kernel image @ruvector/rvf-node accepts. One byte more and
|
|
14
|
+
* `embedKernel` fails with a misleading `RVF error 0x0303: FsyncFailed`
|
|
15
|
+
* (#1238; measured 134,217,728 B ok, 134,217,729 B fails).
|
|
16
|
+
*/
|
|
17
|
+
export const RVF_MAX_KERNEL_BYTES = 128 * 1024 * 1024;
|
|
18
|
+
/**
|
|
19
|
+
* Vector ids written by the code-intelligence domain (KG nodes, semantic code
|
|
20
|
+
* index, C4 diagrams). They are derived from source code and rebuilt by
|
|
21
|
+
* `aqe code index`, so they stay out of the brain kernel (#1238).
|
|
22
|
+
*/
|
|
23
|
+
export const CODE_INDEX_VECTOR_ID_PREFIX = 'code-intelligence:';
|
|
24
|
+
const CODE_INDEX_VECTOR_MATCH = `substr(id, 1, ${CODE_INDEX_VECTOR_ID_PREFIX.length}) = ?`;
|
|
25
|
+
function isCodeIndexVectorRow(tableName, row) {
|
|
26
|
+
if (tableName !== 'vectors')
|
|
27
|
+
return false;
|
|
28
|
+
const id = row.id;
|
|
29
|
+
return typeof id === 'string' && id.startsWith(CODE_INDEX_VECTOR_ID_PREFIX);
|
|
30
|
+
}
|
|
31
|
+
/** Thrown before any native call when the kernel would exceed the RVF limit. */
|
|
32
|
+
export class RvfKernelTooLargeError extends Error {
|
|
33
|
+
kernelBytes;
|
|
34
|
+
limitBytes;
|
|
35
|
+
tableBytes;
|
|
36
|
+
complete;
|
|
37
|
+
code = 'RVF_KERNEL_TOO_LARGE';
|
|
38
|
+
constructor(kernelBytes, limitBytes, tableBytes, complete) {
|
|
39
|
+
const largest = Object.entries(tableBytes)
|
|
40
|
+
.filter(([, bytes]) => bytes >= 1024 * 1024)
|
|
41
|
+
.sort((a, b) => b[1] - a[1])
|
|
42
|
+
.slice(0, 3)
|
|
43
|
+
.map(([table, bytes]) => `${table} ${formatMb(bytes)}`)
|
|
44
|
+
.join(', ');
|
|
45
|
+
super(`RVF_KERNEL_TOO_LARGE: the brain kernel needs ${complete ? '' : 'at least '}` +
|
|
46
|
+
`${formatMb(kernelBytes)}, over the ${formatMb(limitBytes)} limit of the native RVF writer.` +
|
|
47
|
+
(largest ? ` Largest tables: ${largest}.` : '') +
|
|
48
|
+
' Nothing was written. ' +
|
|
49
|
+
`Use --format jsonl (no size limit), or reduce the largest learning tables first.`);
|
|
50
|
+
this.kernelBytes = kernelBytes;
|
|
51
|
+
this.limitBytes = limitBytes;
|
|
52
|
+
this.tableBytes = tableBytes;
|
|
53
|
+
this.complete = complete;
|
|
54
|
+
this.name = 'RvfKernelTooLargeError';
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
function formatMb(bytes) {
|
|
58
|
+
return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
|
|
59
|
+
}
|
|
12
60
|
/**
|
|
13
61
|
* Sidecar suffixes that make up a complete store on disk. `''` is the store
|
|
14
62
|
* itself; the adapter writes `.idmap.json` on close, and we write the manifest.
|
|
@@ -98,52 +146,93 @@ export function exportBrainToRvf(db, options, sourceDbLabel = 'memory.db') {
|
|
|
98
146
|
const tmpPath = `${outPath}.tmp.${process.pid}`;
|
|
99
147
|
sweepStaleTmpFiles(outPath);
|
|
100
148
|
removeStoreFiles(tmpPath);
|
|
101
|
-
//
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
}
|
|
149
|
+
// --- Serialize all tables using TABLE_CONFIGS, before any native call ---
|
|
150
|
+
// Issue #1238: the native writer has a hard kernel ceiling, so each table is
|
|
151
|
+
// serialized once and measured as it goes. An oversized brain fails here,
|
|
152
|
+
// without creating a store or spending time on the rest of the tables.
|
|
153
|
+
const maxKernelBytes = options.maxKernelBytes ?? RVF_MAX_KERNEL_BYTES;
|
|
154
|
+
const allTableData = {};
|
|
155
|
+
const tableJson = [];
|
|
156
|
+
const tableBytes = {};
|
|
157
|
+
const tableCounts = {};
|
|
158
|
+
const skippedCacheRows = {};
|
|
159
|
+
const domainSet = new Set();
|
|
160
|
+
let totalRecords = 0;
|
|
161
|
+
let kernelBytes = 0;
|
|
162
|
+
for (const config of TABLE_CONFIGS) {
|
|
163
|
+
let [where, params] = config.domainColumn
|
|
164
|
+
? domainFilterForColumn(options.domains, config.domainColumn)
|
|
165
|
+
: [undefined, []];
|
|
166
|
+
if (config.tableName === 'vectors' && tableExists(db, 'vectors')) {
|
|
167
|
+
const { n } = db.prepare(`SELECT COUNT(*) AS n FROM vectors WHERE ${CODE_INDEX_VECTOR_MATCH}`).get(CODE_INDEX_VECTOR_ID_PREFIX);
|
|
168
|
+
if (n > 0)
|
|
169
|
+
skippedCacheRows.vectors = n;
|
|
170
|
+
where = `(id IS NULL OR NOT ${CODE_INDEX_VECTOR_MATCH})`;
|
|
171
|
+
params = [CODE_INDEX_VECTOR_ID_PREFIX];
|
|
172
|
+
}
|
|
173
|
+
let rows = queryAll(db, config.tableName, where, params);
|
|
174
|
+
if (options.domains && options.domains.length > 0) {
|
|
175
|
+
const manifestIds = new Set((allTableData.learning_evidence_manifests ?? []).map(row => row.id));
|
|
176
|
+
const patternIds = new Set((allTableData.qe_patterns ?? []).map(row => row.id));
|
|
177
|
+
if (['learning_evidence_segments', 'learning_segment_edges', 'learning_evidence_admissions'].includes(config.tableName)) {
|
|
178
|
+
rows = rows.filter(row => manifestIds.has(row.manifest_id));
|
|
132
179
|
}
|
|
133
|
-
if (config.tableName === '
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
}
|
|
180
|
+
else if (config.tableName === 'pattern_manifest_lineage') {
|
|
181
|
+
rows = rows.filter(row => {
|
|
182
|
+
const lineage = row;
|
|
183
|
+
return manifestIds.has(lineage.manifest_id) && patternIds.has(lineage.pattern_id);
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
else if (config.tableName === 'pattern_segment_lineage') {
|
|
187
|
+
rows = rows.filter(row => {
|
|
188
|
+
const lineage = row;
|
|
189
|
+
return manifestIds.has(lineage.manifest_id) && patternIds.has(lineage.pattern_id);
|
|
190
|
+
});
|
|
138
191
|
}
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
192
|
+
}
|
|
193
|
+
if (config.tableName === 'qe_patterns') {
|
|
194
|
+
for (const p of rows) {
|
|
195
|
+
if (p.qe_domain)
|
|
196
|
+
domainSet.add(p.qe_domain);
|
|
143
197
|
}
|
|
198
|
+
}
|
|
199
|
+
// Serialize BLOBs to Base64 for JSON storage
|
|
200
|
+
const blobCols = TABLE_BLOB_COLUMNS[config.tableName];
|
|
201
|
+
if (blobCols && blobCols.length > 0) {
|
|
202
|
+
rows = rows.map(r => serializeRowBlobs(r, blobCols));
|
|
203
|
+
}
|
|
204
|
+
// Only these two tables are read back (domain-filtered lineage above).
|
|
205
|
+
if (config.tableName === 'qe_patterns' || config.tableName === 'learning_evidence_manifests') {
|
|
144
206
|
allTableData[config.tableName] = rows;
|
|
145
|
-
totalRecords += rows.length;
|
|
146
207
|
}
|
|
208
|
+
tableCounts[config.tableName] = rows.length;
|
|
209
|
+
totalRecords += rows.length;
|
|
210
|
+
const json = JSON.stringify(rows);
|
|
211
|
+
tableJson.push([config.tableName, json]);
|
|
212
|
+
tableBytes[config.tableName] = Buffer.byteLength(json);
|
|
213
|
+
kernelBytes += tableBytes[config.tableName];
|
|
214
|
+
if (kernelBytes > maxKernelBytes) {
|
|
215
|
+
throw new RvfKernelTooLargeError(kernelBytes, maxKernelBytes, tableBytes, false);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
// Same bytes JSON.stringify would produce for { version, format, exportedAt,
|
|
219
|
+
// sourceDb, domains, tables }, assembled from the per-table JSON above.
|
|
220
|
+
const exportedAt = new Date().toISOString();
|
|
221
|
+
const domains = [...domainSet].sort();
|
|
222
|
+
const brainJson = `{"version":"3.0","format":"rvf","exportedAt":${JSON.stringify(exportedAt)},` +
|
|
223
|
+
`"sourceDb":${JSON.stringify(sourceDbLabel)},"domains":${JSON.stringify(domains)},"tables":{` +
|
|
224
|
+
tableJson.map(([tableName, json]) => `${JSON.stringify(tableName)}:${json}`).join(',') +
|
|
225
|
+
'}}';
|
|
226
|
+
tableJson.length = 0;
|
|
227
|
+
const kernelBuffer = Buffer.from(brainJson);
|
|
228
|
+
if (kernelBuffer.length > maxKernelBytes) {
|
|
229
|
+
throw new RvfKernelTooLargeError(kernelBuffer.length, maxKernelBytes, tableBytes, true);
|
|
230
|
+
}
|
|
231
|
+
const checksum = sha256(brainJson);
|
|
232
|
+
// Create RVF container via adapter (handles idmap automatically)
|
|
233
|
+
const rvf = createRvfStore(tmpPath, dimension);
|
|
234
|
+
let closed = false;
|
|
235
|
+
try {
|
|
147
236
|
// --- Ingest vector embeddings into HNSW ---
|
|
148
237
|
let embeddingCount = 0;
|
|
149
238
|
const embeddingEntries = [];
|
|
@@ -175,17 +264,6 @@ export function exportBrainToRvf(db, options, sourceDbLabel = 'memory.db') {
|
|
|
175
264
|
embeddingCount = result.accepted;
|
|
176
265
|
}
|
|
177
266
|
// --- Embed full brain data as kernel ---
|
|
178
|
-
const brainData = {
|
|
179
|
-
version: '3.0',
|
|
180
|
-
format: 'rvf',
|
|
181
|
-
exportedAt: new Date().toISOString(),
|
|
182
|
-
sourceDb: sourceDbLabel,
|
|
183
|
-
domains: [...domainSet].sort(),
|
|
184
|
-
tables: allTableData,
|
|
185
|
-
};
|
|
186
|
-
const brainJson = JSON.stringify(brainData);
|
|
187
|
-
const checksum = sha256(brainJson);
|
|
188
|
-
const kernelBuffer = Buffer.from(brainJson);
|
|
189
267
|
rvf.embedKernel(kernelBuffer);
|
|
190
268
|
// Optional Ed25519 signing
|
|
191
269
|
const signature = options.sign ? rvf.sign(kernelBuffer) ?? undefined : undefined;
|
|
@@ -199,18 +277,19 @@ export function exportBrainToRvf(db, options, sourceDbLabel = 'memory.db') {
|
|
|
199
277
|
const manifest = {
|
|
200
278
|
version: '3.0',
|
|
201
279
|
format: 'rvf',
|
|
202
|
-
exportedAt
|
|
280
|
+
exportedAt,
|
|
203
281
|
sourceDb: sourceDbLabel,
|
|
204
282
|
stats: {
|
|
205
|
-
patternCount:
|
|
283
|
+
patternCount: tableCounts['qe_patterns'] ?? 0,
|
|
206
284
|
embeddingCount,
|
|
207
|
-
qValueCount:
|
|
208
|
-
dreamInsightCount:
|
|
209
|
-
witnessChainLength:
|
|
285
|
+
qValueCount: tableCounts['rl_q_values'] ?? 0,
|
|
286
|
+
dreamInsightCount: tableCounts['dream_insights'] ?? 0,
|
|
287
|
+
witnessChainLength: tableCounts['witness_chain'] ?? 0,
|
|
210
288
|
totalRecords,
|
|
211
|
-
tableCounts
|
|
289
|
+
tableCounts,
|
|
290
|
+
...(Object.keys(skippedCacheRows).length > 0 ? { skippedCacheRows } : {}),
|
|
212
291
|
},
|
|
213
|
-
domains
|
|
292
|
+
domains,
|
|
214
293
|
checksum,
|
|
215
294
|
rvfStatus: {
|
|
216
295
|
totalVectors: status.totalVectors,
|
|
@@ -243,7 +322,9 @@ export function exportBrainToRvf(db, options, sourceDbLabel = 'memory.db') {
|
|
|
243
322
|
if (existsSync(outPath) && !options.allowOverwriteRicher) {
|
|
244
323
|
let existing;
|
|
245
324
|
try {
|
|
246
|
-
|
|
325
|
+
// Code-index vectors are no longer exported (#1238), so an older mirror
|
|
326
|
+
// that still holds them is compared on the rows both exports carry.
|
|
327
|
+
existing = readBrainInfo(outPath, true);
|
|
247
328
|
}
|
|
248
329
|
catch (error) {
|
|
249
330
|
if (hasReadableBrainKernel(outPath) || !isKnownUnusableRvfError(error)) {
|
|
@@ -468,6 +549,13 @@ export function importBrainFromRvf(db, rvfPath, options) {
|
|
|
468
549
|
// --- Info ---
|
|
469
550
|
/** Read brain info from an RVF file without importing. */
|
|
470
551
|
export function brainInfoFromRvf(rvfPath) {
|
|
552
|
+
return readBrainInfo(rvfPath, false);
|
|
553
|
+
}
|
|
554
|
+
/**
|
|
555
|
+
* `excludeCodeIndex` drops code-index vector rows from `tableCounts`, which
|
|
556
|
+
* makes them comparable with the counts of a current export.
|
|
557
|
+
*/
|
|
558
|
+
function readBrainInfo(rvfPath, excludeCodeIndex) {
|
|
471
559
|
if (!isRvfNativeAvailable()) {
|
|
472
560
|
throw new Error('@ruvector/rvf-node is not available.');
|
|
473
561
|
}
|
|
@@ -499,7 +587,12 @@ export function brainInfoFromRvf(rvfPath) {
|
|
|
499
587
|
const tableCounts = t && typeof t === 'object' && !Array.isArray(t)
|
|
500
588
|
? Object.fromEntries(Object.entries(t)
|
|
501
589
|
.filter((entry) => Array.isArray(entry[1]))
|
|
502
|
-
.map(([tableName, rows]) => [
|
|
590
|
+
.map(([tableName, rows]) => [
|
|
591
|
+
tableName,
|
|
592
|
+
excludeCodeIndex
|
|
593
|
+
? rows.filter(row => !isCodeIndexVectorRow(tableName, row)).length
|
|
594
|
+
: rows.length,
|
|
595
|
+
]))
|
|
503
596
|
: undefined;
|
|
504
597
|
return {
|
|
505
598
|
version: '3.0',
|
|
@@ -11,9 +11,11 @@
|
|
|
11
11
|
*
|
|
12
12
|
* @module integrations/ruvector/transfer-coherence-stub
|
|
13
13
|
*/
|
|
14
|
-
import { createRequire } from 'module';
|
|
15
14
|
import { getRuVectorFeatureFlags } from './feature-flags.js';
|
|
16
|
-
|
|
15
|
+
// Static import so the bundlers inline the gate. A runtime
|
|
16
|
+
// require('./coherence-gate.js') resolves against the bundle file instead,
|
|
17
|
+
// fails, and silently returned the approve-everything stub (#1237).
|
|
18
|
+
import { CoherenceGate } from './coherence-gate-core.js';
|
|
17
19
|
// ============================================================================
|
|
18
20
|
// Stub Implementation
|
|
19
21
|
// ============================================================================
|
|
@@ -49,14 +51,7 @@ export class TransferCoherenceStub {
|
|
|
49
51
|
*/
|
|
50
52
|
export function createTransferCoherenceGate() {
|
|
51
53
|
if (getRuVectorFeatureFlags().useCoherenceGate) {
|
|
52
|
-
|
|
53
|
-
// Dynamic require to avoid circular dependency at module level
|
|
54
|
-
const { CoherenceGate } = esmRequire('./coherence-gate.js');
|
|
55
|
-
return new CoherenceGate();
|
|
56
|
-
}
|
|
57
|
-
catch {
|
|
58
|
-
// Fall through to stub if CoherenceGate fails to load
|
|
59
|
-
}
|
|
54
|
+
return new CoherenceGate();
|
|
60
55
|
}
|
|
61
56
|
return new TransferCoherenceStub();
|
|
62
57
|
}
|
|
@@ -14,11 +14,18 @@
|
|
|
14
14
|
*
|
|
15
15
|
* @module learning/dream/dream-engine
|
|
16
16
|
*/
|
|
17
|
+
/**
|
|
18
|
+
* #1239: how long retention waits for a locked database. better-sqlite3 waits
|
|
19
|
+
* synchronously, and retention is optional (the next dream retries), so it
|
|
20
|
+
* gives up quickly instead of using the engine's 60 s commit wait.
|
|
21
|
+
*/
|
|
22
|
+
export declare const RETENTION_BUSY_TIMEOUT_MS = 1000;
|
|
17
23
|
import { type ActivationConfig } from './spreading-activation.js';
|
|
18
24
|
import { type InsightConfig, type DreamInsight } from './insight-generator.js';
|
|
19
25
|
import { type Branch, type ValidationResult, type ValidationThresholds } from './rvcow-branch-manager.js';
|
|
20
26
|
import { type ComputedDream } from './dream-commit.js';
|
|
21
27
|
import type { WitnessChain } from '../../audit/witness-chain.js';
|
|
28
|
+
import { type DreamRetentionReport } from '../learning-retention.js';
|
|
22
29
|
import type { DreamCycle, PatternImportData, FailureImportData, SuccessImportData } from './types.js';
|
|
23
30
|
/**
|
|
24
31
|
* Complete DreamEngine configuration
|
|
@@ -66,6 +73,12 @@ export interface DreamCycleResult {
|
|
|
66
73
|
patternsCreated: number;
|
|
67
74
|
/** #1060: how long the single commit transaction held the write lock, in ms. */
|
|
68
75
|
commitDurationMs?: number;
|
|
76
|
+
/**
|
|
77
|
+
* #1239: dream retention after the commit, with row counts. Off by default
|
|
78
|
+
* (AQE_DREAM_RETENTION); while off, the steps are a dry run showing what
|
|
79
|
+
* they would remove.
|
|
80
|
+
*/
|
|
81
|
+
retention?: DreamRetentionReport;
|
|
69
82
|
/**
|
|
70
83
|
* #1060: the uncommitted results of a `dream(…, { commit: false })` run.
|
|
71
84
|
* Pass the result to DreamEngine.commitDreamResult() to write them.
|
|
@@ -202,8 +215,18 @@ export declare class DreamEngine {
|
|
|
202
215
|
* fails.
|
|
203
216
|
*/
|
|
204
217
|
commitDreamResult(result: DreamCycleResult): number;
|
|
205
|
-
/**
|
|
218
|
+
/**
|
|
219
|
+
* Commit a computed dream, then record it in the witness chain (#1060) and
|
|
220
|
+
* run the default retention steps (#1239).
|
|
221
|
+
*/
|
|
206
222
|
private commitComputed;
|
|
223
|
+
/**
|
|
224
|
+
* #1239: after a committed dream, drop failed cycles past their retention
|
|
225
|
+
* window and outcome concepts beyond the cap when AQE_DREAM_RETENTION=on;
|
|
226
|
+
* otherwise only count what that would remove. The dream is already
|
|
227
|
+
* committed, so a failure here (a locked database, say) is only logged.
|
|
228
|
+
*/
|
|
229
|
+
private runDefaultRetention;
|
|
207
230
|
/**
|
|
208
231
|
* #1060: build a synchronous handler that stops a still-running dream and
|
|
209
232
|
* records its cycle as 'interrupted'. It runs from close() and from a
|
|
@@ -19,6 +19,14 @@ import { toErrorMessage } from '../../shared/error-utils.js';
|
|
|
19
19
|
import { PatternMutationError } from '../pattern-mutation-error.js';
|
|
20
20
|
import { LoggerFactory } from '../../logging/index.js';
|
|
21
21
|
const dreamLogger = LoggerFactory.create('dream-engine');
|
|
22
|
+
/** #1239: an unreadable retention setting is reported once per process. */
|
|
23
|
+
let retentionWarningsLogged = false;
|
|
24
|
+
/**
|
|
25
|
+
* #1239: how long retention waits for a locked database. better-sqlite3 waits
|
|
26
|
+
* synchronously, and retention is optional (the next dream retries), so it
|
|
27
|
+
* gives up quickly instead of using the engine's 60 s commit wait.
|
|
28
|
+
*/
|
|
29
|
+
export const RETENTION_BUSY_TIMEOUT_MS = 1000;
|
|
22
30
|
import { v4 as uuidv4 } from 'uuid';
|
|
23
31
|
import { getUnifiedPersistence } from '../../kernel/unified-persistence.js';
|
|
24
32
|
import { registerStoreCloser } from '../../kernel/process-lifecycle.js';
|
|
@@ -27,6 +35,7 @@ import { SpreadingActivation, } from './spreading-activation.js';
|
|
|
27
35
|
import { InsightGenerator, } from './insight-generator.js';
|
|
28
36
|
import { DEFAULT_VALIDATION_THRESHOLDS, } from './rvcow-branch-manager.js';
|
|
29
37
|
import { commitDream, markAbandonedCycles, ABANDONED_CYCLE_GRACE_MS, } from './dream-commit.js';
|
|
38
|
+
import { describeRetention, resolveDefaultRetention, runDreamRetention, } from '../learning-retention.js';
|
|
30
39
|
/**
|
|
31
40
|
* Default DreamEngine configuration
|
|
32
41
|
*/
|
|
@@ -474,8 +483,10 @@ export class DreamEngine {
|
|
|
474
483
|
committed = true; // nothing to record: the caller decides
|
|
475
484
|
return { ...result, pending: computed };
|
|
476
485
|
}
|
|
477
|
-
|
|
486
|
+
const commit = this.commitComputed(db, computed);
|
|
478
487
|
committed = true;
|
|
488
|
+
result.commitDurationMs = commit.durationMs;
|
|
489
|
+
result.retention = commit.retention;
|
|
479
490
|
return result;
|
|
480
491
|
}
|
|
481
492
|
catch (error) {
|
|
@@ -527,12 +538,16 @@ export class DreamEngine {
|
|
|
527
538
|
if (!result.pending) {
|
|
528
539
|
throw new Error('Dream result has nothing pending to commit (it was already committed)');
|
|
529
540
|
}
|
|
530
|
-
const
|
|
541
|
+
const commit = this.commitComputed(this.db, result.pending);
|
|
531
542
|
result.pending = undefined;
|
|
532
|
-
result.commitDurationMs =
|
|
533
|
-
|
|
543
|
+
result.commitDurationMs = commit.durationMs;
|
|
544
|
+
result.retention = commit.retention;
|
|
545
|
+
return commit.durationMs;
|
|
534
546
|
}
|
|
535
|
-
/**
|
|
547
|
+
/**
|
|
548
|
+
* Commit a computed dream, then record it in the witness chain (#1060) and
|
|
549
|
+
* run the default retention steps (#1239).
|
|
550
|
+
*/
|
|
536
551
|
commitComputed(db, computed) {
|
|
537
552
|
const commit = commitDream(db, computed);
|
|
538
553
|
try {
|
|
@@ -544,7 +559,43 @@ export class DreamEngine {
|
|
|
544
559
|
}, 'dream-engine');
|
|
545
560
|
}
|
|
546
561
|
catch { /* best-effort witness */ }
|
|
547
|
-
return commit.commitDurationMs;
|
|
562
|
+
return { durationMs: commit.commitDurationMs, retention: this.runDefaultRetention(db) };
|
|
563
|
+
}
|
|
564
|
+
/**
|
|
565
|
+
* #1239: after a committed dream, drop failed cycles past their retention
|
|
566
|
+
* window and outcome concepts beyond the cap when AQE_DREAM_RETENTION=on;
|
|
567
|
+
* otherwise only count what that would remove. The dream is already
|
|
568
|
+
* committed, so a failure here (a locked database, say) is only logged.
|
|
569
|
+
*/
|
|
570
|
+
runDefaultRetention(db) {
|
|
571
|
+
const settings = resolveDefaultRetention();
|
|
572
|
+
if (settings.warnings.length > 0 && !retentionWarningsLogged) {
|
|
573
|
+
retentionWarningsLogged = true;
|
|
574
|
+
for (const warning of settings.warnings)
|
|
575
|
+
dreamLogger.warn(warning);
|
|
576
|
+
}
|
|
577
|
+
const previousBusyTimeout = db.pragma('busy_timeout', { simple: true });
|
|
578
|
+
try {
|
|
579
|
+
db.pragma(`busy_timeout = ${RETENTION_BUSY_TIMEOUT_MS}`);
|
|
580
|
+
const report = runDreamRetention(db, settings);
|
|
581
|
+
if (report.enabled) {
|
|
582
|
+
for (const step of report.steps) {
|
|
583
|
+
if (step.affected > 0)
|
|
584
|
+
dreamLogger.info(`Retention ${describeRetention(step)}`);
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
return report;
|
|
588
|
+
}
|
|
589
|
+
catch (error) {
|
|
590
|
+
dreamLogger.warn('Dream retention skipped after dream commit', { error: toErrorMessage(error) });
|
|
591
|
+
return { enabled: settings.enabled, steps: [], error: toErrorMessage(error) };
|
|
592
|
+
}
|
|
593
|
+
finally {
|
|
594
|
+
try {
|
|
595
|
+
db.pragma(`busy_timeout = ${previousBusyTimeout}`);
|
|
596
|
+
}
|
|
597
|
+
catch { /* connection gone */ }
|
|
598
|
+
}
|
|
548
599
|
}
|
|
549
600
|
/**
|
|
550
601
|
* #1060: build a synchronous handler that stops a still-running dream and
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Learning Retention (#1239)
|
|
3
|
+
*
|
|
4
|
+
* Bounds the learning tables that otherwise grow for as long as a project
|
|
5
|
+
* lives. Two kinds of step, kept apart on purpose:
|
|
6
|
+
*
|
|
7
|
+
* - Dream retention steps remove only rows that carry no learning value.
|
|
8
|
+
* They are off by default. With `AQE_DREAM_RETENTION=on` they run after
|
|
9
|
+
* each committed dream cycle; while off, the dream reports what they
|
|
10
|
+
* would remove (COUNT queries only, nothing is written):
|
|
11
|
+
* - failed/interrupted `dream_cycles` past a retention window. A cycle
|
|
12
|
+
* that did not commit wrote no insights, and any cycle that still has
|
|
13
|
+
* an insight is kept.
|
|
14
|
+
* - `outcome` concept nodes beyond a cap, with their edges. They are
|
|
15
|
+
* derived from `qe_pattern_usage`, which is not touched, and only the
|
|
16
|
+
* newest 100 usage rows are ever loaded back, so a cap >= 100 does not
|
|
17
|
+
* churn.
|
|
18
|
+
*
|
|
19
|
+
* - Opt-in steps drop data that could still matter to someone, so they run
|
|
20
|
+
* only from `aqe learning prune`, which defaults to a dry run:
|
|
21
|
+
* - compacting soft-archived and merged experiences: `result_json` and the
|
|
22
|
+
* embedding are cleared, the row and its counters stay (the experience
|
|
23
|
+
* count stays monotonic, v3.9.22).
|
|
24
|
+
* - `routing_outcomes` older than a number of days.
|
|
25
|
+
*
|
|
26
|
+
* Every step reports the row counts it measured before and after, or, in a
|
|
27
|
+
* dry run, the counts it would change.
|
|
28
|
+
*/
|
|
29
|
+
import type { Database as DatabaseType } from 'better-sqlite3';
|
|
30
|
+
export interface TableCount {
|
|
31
|
+
readonly table: string;
|
|
32
|
+
readonly before: number;
|
|
33
|
+
readonly after: number;
|
|
34
|
+
}
|
|
35
|
+
export interface RetentionStepResult {
|
|
36
|
+
readonly step: RetentionStep;
|
|
37
|
+
readonly dryRun: boolean;
|
|
38
|
+
/** Rows deleted, or for compaction rows whose payload was cleared. */
|
|
39
|
+
readonly affected: number;
|
|
40
|
+
/**
|
|
41
|
+
* Row counts per table. `after` is read back after the write; in a dry run
|
|
42
|
+
* it is the projection (`before` minus the rows the step would delete).
|
|
43
|
+
*/
|
|
44
|
+
readonly tables: readonly TableCount[];
|
|
45
|
+
/** Bytes of payload removed (compaction only), measured with length(). */
|
|
46
|
+
readonly payloadBytes?: number;
|
|
47
|
+
}
|
|
48
|
+
export type RetentionStep = 'failed-dream-cycles' | 'outcome-concepts' | 'compact-experiences' | 'routing-outcomes';
|
|
49
|
+
export declare const DEFAULT_FAILED_DREAM_CYCLE_RETENTION_DAYS = 7;
|
|
50
|
+
export declare const DEFAULT_OUTCOME_CONCEPT_CAP = 2000;
|
|
51
|
+
/** Below this the cap would delete outcome nodes that the next dream reloads. */
|
|
52
|
+
export declare const MIN_OUTCOME_CONCEPT_CAP = 100;
|
|
53
|
+
/** Failed or interrupted cycles older than `retentionDays` that have no insight. */
|
|
54
|
+
export declare function pruneFailedDreamCycles(db: DatabaseType, options?: {
|
|
55
|
+
retentionDays?: number;
|
|
56
|
+
dryRun?: boolean;
|
|
57
|
+
}): RetentionStepResult;
|
|
58
|
+
/** Keep the newest `maxNodes` outcome concept nodes; delete the rest and their edges. */
|
|
59
|
+
export declare function capOutcomeConcepts(db: DatabaseType, options?: {
|
|
60
|
+
maxNodes?: number;
|
|
61
|
+
dryRun?: boolean;
|
|
62
|
+
}): RetentionStepResult;
|
|
63
|
+
/** Clear `result_json` and the embedding of archived and merged experiences. */
|
|
64
|
+
export declare function compactConsolidatedExperiences(db: DatabaseType, options?: {
|
|
65
|
+
dryRun?: boolean;
|
|
66
|
+
}): RetentionStepResult;
|
|
67
|
+
/** Delete routing outcomes older than `olderThanDays`. */
|
|
68
|
+
export declare function pruneRoutingOutcomes(db: DatabaseType, options: {
|
|
69
|
+
olderThanDays: number;
|
|
70
|
+
dryRun?: boolean;
|
|
71
|
+
}): RetentionStepResult;
|
|
72
|
+
export interface DefaultRetentionSettings {
|
|
73
|
+
/** AQE_DREAM_RETENTION: false (the default) previews the steps instead of running them. */
|
|
74
|
+
readonly enabled: boolean;
|
|
75
|
+
/** null = off */
|
|
76
|
+
readonly failedDreamCycleRetentionDays: number | null;
|
|
77
|
+
/** null = off */
|
|
78
|
+
readonly outcomeConceptCap: number | null;
|
|
79
|
+
readonly warnings: readonly string[];
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Read `AQE_DREAM_RETENTION` (off by default) and the per-step settings
|
|
83
|
+
* `AQE_FAILED_DREAM_CYCLE_RETENTION_DAYS` (default 7) and
|
|
84
|
+
* `AQE_OUTCOME_CONCEPT_CAP` (default 2000). Each step setting accepts "off".
|
|
85
|
+
*/
|
|
86
|
+
export declare function resolveDefaultRetention(env?: Readonly<Record<string, string | undefined>>): DefaultRetentionSettings;
|
|
87
|
+
export interface DreamRetentionReport {
|
|
88
|
+
/** False: the steps ran as a dry run and wrote nothing. */
|
|
89
|
+
readonly enabled: boolean;
|
|
90
|
+
readonly steps: readonly RetentionStepResult[];
|
|
91
|
+
/** Set when retention could not run (a locked database, say); nothing was deleted. */
|
|
92
|
+
readonly error?: string;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* The dream retention steps that are not switched off individually: run
|
|
96
|
+
* when retention is enabled, otherwise previewed as a dry run.
|
|
97
|
+
*/
|
|
98
|
+
export declare function runDreamRetention(db: DatabaseType, settings?: DefaultRetentionSettings): DreamRetentionReport;
|
|
99
|
+
/** Lines for a dream's output: what retention removed, or would remove while off. */
|
|
100
|
+
export declare function describeDreamRetention(report: DreamRetentionReport): string[];
|
|
101
|
+
/** One line per step, for logs: "outcome-concepts: 3000 removed (concept_nodes 5000 -> 2000, ...)". */
|
|
102
|
+
export declare function describeRetention(result: RetentionStepResult): string;
|
|
103
|
+
//# sourceMappingURL=learning-retention.d.ts.map
|