agentic-qe 3.15.16 → 3.15.18
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 +107 -10
- package/.claude/skills/agentic-quality-engineering/SKILL.md +67 -44
- package/.claude/skills/brutal-honesty-review/SKILL.md +12 -7
- package/.claude/skills/brutal-honesty-review/evals/brutal-honesty-review.yaml +120 -0
- package/.claude/skills/brutal-honesty-review/schemas/output.json +9 -3
- package/.claude/skills/code-review-quality/SKILL.md +2 -2
- package/.claude/skills/holistic-testing-pact/SKILL.md +11 -11
- package/.claude/skills/sherlock-review/SKILL.md +4 -2
- package/.claude/skills/sherlock-review/evals/sherlock-review.yaml +124 -0
- package/.claude/skills/skills-manifest.json +1 -1
- package/.claude/skills/technical-writing/SKILL.md +12 -6
- package/.claude/skills/technical-writing/evals/technical-writing.yaml +96 -0
- package/.opencode/skills/qe-agentic-quality-engineering.yaml +2 -2
- package/.opencode/skills/qe-holistic-testing-pact.yaml +2 -2
- package/CHANGELOG.md +201 -0
- package/assets/skills/agentic-quality-engineering/SKILL.md +67 -44
- package/assets/skills/brutal-honesty-review/SKILL.md +12 -8
- package/assets/skills/brutal-honesty-review/evals/brutal-honesty-review.yaml +120 -0
- package/assets/skills/brutal-honesty-review/schemas/output.json +9 -3
- package/assets/skills/code-review-quality/SKILL.md +2 -2
- package/assets/skills/holistic-testing-pact/SKILL.md +11 -11
- package/assets/skills/sherlock-review/SKILL.md +4 -3
- package/assets/skills/sherlock-review/evals/sherlock-review.yaml +124 -0
- package/assets/skills/skills-manifest.json +1 -1
- package/assets/skills/technical-writing/SKILL.md +12 -6
- package/assets/skills/technical-writing/evals/technical-writing.yaml +96 -0
- package/dist/cli/brain-commands.d.ts +5 -0
- package/dist/cli/brain-commands.js +4 -0
- package/dist/cli/bundle.js +6 -6
- package/dist/cli/chunks/adapter-WRSDXLOT.js +2 -0
- package/dist/cli/chunks/{agent-booster-wasm-45NWEKVS.js → agent-booster-wasm-UFNJNF3M.js} +2 -2
- package/dist/cli/chunks/{agent-handler-LVHMYFEF.js → agent-handler-EAYVRJXN.js} +2 -2
- package/dist/cli/chunks/{agent-memory-branch-YDWOJFEQ.js → agent-memory-branch-M65C6WAQ.js} +2 -2
- package/dist/cli/chunks/aqe-learning-engine-O6NJBCCM.js +2 -0
- package/dist/cli/chunks/{arena-ELDZH3CZ.js → arena-2GDICP6R.js} +4 -4
- package/dist/cli/chunks/{arena-CZKHXDDS.js → arena-CG3X67OE.js} +2 -2
- package/dist/cli/chunks/{audit-5MT4T47Z.js → audit-F4FSPJPL.js} +3 -3
- package/dist/cli/chunks/base-J2FXOE77.js +2 -0
- package/dist/cli/chunks/{better-sqlite3-6TGYPC2B.js → better-sqlite3-2MCFXW4J.js} +2 -2
- package/dist/cli/chunks/brain-handler-WGTJNYNB.js +95 -0
- package/dist/cli/chunks/{branch-enumerator-WVILM4SO.js → branch-enumerator-KL7C535H.js} +2 -2
- package/dist/cli/chunks/{browser-RX5ALU3H.js → browser-SJEXDVHS.js} +2 -2
- package/dist/cli/chunks/browser-workflow-LXGER6ZD.js +2 -0
- package/dist/cli/chunks/{chunk-2H4XH6FT.js → chunk-244RKAEP.js} +2 -2
- package/dist/cli/chunks/{chunk-SI6DPU5D.js → chunk-27TUMXPD.js} +1 -1
- package/dist/cli/chunks/{chunk-YNMJEDN5.js → chunk-2MBYDPCP.js} +2 -2
- package/dist/cli/chunks/{chunk-24QHCVX6.js → chunk-2Q6DTBMT.js} +1 -1
- package/dist/cli/chunks/{chunk-XWUWX7BV.js → chunk-355MI7RV.js} +13 -13
- package/dist/cli/chunks/{chunk-NQXXI77K.js → chunk-3LX5OKBD.js} +2 -2
- package/dist/cli/chunks/{chunk-63GMRQ25.js → chunk-3RPDKJGV.js} +1 -1
- package/dist/cli/chunks/chunk-3YMIT73A.js +4 -0
- package/dist/cli/chunks/{chunk-P3EYRILV.js → chunk-43KUVBSU.js} +2 -2
- package/dist/cli/chunks/chunk-477FKXSS.js +2 -0
- package/dist/cli/chunks/{chunk-HGWXF45W.js → chunk-4BIMTRRX.js} +1 -1
- package/dist/cli/chunks/{chunk-SSUAAX3F.js → chunk-4CVNVBX5.js} +2 -2
- package/dist/cli/chunks/{chunk-5V3TI2LG.js → chunk-4HL3SD4A.js} +1 -1
- package/dist/cli/chunks/{chunk-KKU2QGSJ.js → chunk-4PEG4DU2.js} +2 -2
- package/dist/cli/chunks/{chunk-J4ELZNLY.js → chunk-4QSQKFED.js} +2 -2
- package/dist/cli/chunks/chunk-53ZBETYR.js +16 -0
- package/dist/cli/chunks/{chunk-7TE5ONQQ.js → chunk-544KDWL4.js} +1 -1
- package/dist/cli/chunks/chunk-54RCGMLB.js +8 -0
- package/dist/cli/chunks/{chunk-KU2AUFGX.js → chunk-5AGXIZQ5.js} +2 -2
- package/dist/cli/chunks/{chunk-LQLPB2T6.js → chunk-5M24X6W7.js} +2 -2
- package/dist/cli/chunks/{chunk-YU2BDRSD.js → chunk-5O5T4LEU.js} +1 -1
- package/dist/cli/chunks/{chunk-NAEWCFQT.js → chunk-5RFXX4IF.js} +2 -2
- package/dist/cli/chunks/{chunk-MD43XRX5.js → chunk-62MLAQRJ.js} +1 -1
- package/dist/cli/chunks/{chunk-PEQDY4BO.js → chunk-6D6TGL2E.js} +2 -2
- package/dist/cli/chunks/{chunk-IOYG4VFL.js → chunk-6IHZDSDL.js} +2 -2
- package/dist/cli/chunks/{chunk-C5FP5GW3.js → chunk-6P3Y45QL.js} +2 -2
- package/dist/cli/chunks/{chunk-4LQFBY5L.js → chunk-6TEVM3X3.js} +10 -10
- package/dist/cli/chunks/{chunk-YPBSUGMI.js → chunk-7XTUKKRA.js} +1 -1
- package/dist/cli/chunks/chunk-A3GDX6UF.js +2 -0
- package/dist/cli/chunks/{chunk-HLUXXCHF.js → chunk-A5YTKKNA.js} +1 -1
- package/dist/cli/chunks/{chunk-Y4PFUMOU.js → chunk-ADNGZAT2.js} +1 -1
- package/dist/cli/chunks/{chunk-KNSRL6NO.js → chunk-AWQAE3SW.js} +2 -2
- package/dist/cli/chunks/{chunk-BY5OF7OH.js → chunk-AXDBQFR4.js} +2 -2
- package/dist/cli/chunks/{chunk-525CFDUE.js → chunk-AXVD7O3F.js} +2 -2
- package/dist/cli/chunks/{chunk-JHQCRRJI.js → chunk-B52ULNYO.js} +2 -2
- package/dist/cli/chunks/chunk-B6S4FC7M.js +3 -0
- package/dist/cli/chunks/{chunk-AJMJNQMP.js → chunk-BDVFSMOQ.js} +1 -1
- package/dist/cli/chunks/{chunk-DXD6K2ZP.js → chunk-BGXXMX3Y.js} +2 -2
- package/dist/cli/chunks/{chunk-EK7OLYOZ.js → chunk-BKMQQY5T.js} +2 -2
- package/dist/cli/chunks/{chunk-VWPM27GU.js → chunk-BN2FROBQ.js} +2 -2
- package/dist/cli/chunks/{chunk-J7I6PABJ.js → chunk-BO6EQNOC.js} +2 -2
- package/dist/cli/chunks/{chunk-4D4DENG6.js → chunk-BOVAKCDC.js} +2 -2
- package/dist/cli/chunks/{chunk-ZFL436FN.js → chunk-BSXKZDKO.js} +2 -2
- package/dist/cli/chunks/{chunk-J442IZLE.js → chunk-C5QVJ5XQ.js} +1 -1
- package/dist/cli/chunks/{chunk-ZB3LEFYG.js → chunk-CFQLLF3D.js} +2 -2
- package/dist/cli/chunks/{chunk-UHEOGZLX.js → chunk-DUCVLT3F.js} +7 -7
- package/dist/cli/chunks/{chunk-TVGI32MB.js → chunk-E4RMJCGA.js} +3 -3
- package/dist/cli/chunks/{chunk-TIUKLYAI.js → chunk-EONDCWY4.js} +1 -1
- package/dist/cli/chunks/{chunk-ZJH5MU2I.js → chunk-F4AGNKL2.js} +2 -2
- package/dist/cli/chunks/{chunk-N7HL5PHH.js → chunk-F6YD3BOW.js} +1 -1
- package/dist/cli/chunks/{chunk-5VZL4UVN.js → chunk-FQRS7WVA.js} +2 -2
- package/dist/cli/chunks/{chunk-SHKOCGNK.js → chunk-FT24SSDG.js} +2 -2
- package/dist/cli/chunks/chunk-FV4YNSAJ.js +5 -0
- package/dist/cli/chunks/{chunk-KXCLACFG.js → chunk-FVDM3X42.js} +2 -2
- package/dist/cli/chunks/{chunk-32BPDLRZ.js → chunk-FVH7TXWU.js} +2 -2
- package/dist/cli/chunks/{chunk-72XSEQMW.js → chunk-FWR5QY37.js} +2 -2
- package/dist/cli/chunks/chunk-FYINK2B7.js +6 -0
- package/dist/cli/chunks/{chunk-5JZRZI4S.js → chunk-GGISVPOZ.js} +2 -2
- package/dist/cli/chunks/{chunk-5LAVKGLH.js → chunk-GPIJIZJQ.js} +2 -2
- package/dist/cli/chunks/{chunk-5QO3R3TU.js → chunk-GXEVOT5F.js} +2 -2
- package/dist/cli/chunks/{chunk-IHRXZZQM.js → chunk-GZ4VB5RI.js} +1 -1
- package/dist/cli/chunks/chunk-HBDSCYSK.js +2 -0
- package/dist/cli/chunks/{chunk-GSKMOPL7.js → chunk-HGG4HR7C.js} +2 -2
- package/dist/cli/chunks/{chunk-AR67RJPY.js → chunk-HSCKWWO2.js} +2 -2
- package/dist/cli/chunks/{chunk-6XXZDV2C.js → chunk-HSQ3GUYJ.js} +2 -2
- package/dist/cli/chunks/{chunk-AAMLQ2LF.js → chunk-HZQBW5EM.js} +3 -3
- package/dist/cli/chunks/{chunk-O5W3FIO6.js → chunk-IGIYANVT.js} +2 -2
- package/dist/cli/chunks/{chunk-C6D5AHBO.js → chunk-IPWMSXBF.js} +2 -2
- package/dist/cli/chunks/{chunk-NDJ7P2EP.js → chunk-IWVNC7VY.js} +1 -1
- package/dist/cli/chunks/{chunk-FDDC72IA.js → chunk-IZODXKZD.js} +2 -2
- package/dist/cli/chunks/{chunk-NO3IV5Q5.js → chunk-J2MT2OJV.js} +1 -1
- package/dist/cli/chunks/{chunk-GQ6TUIKY.js → chunk-JKIJVVSP.js} +1 -1
- package/dist/cli/chunks/{chunk-LE4QJREF.js → chunk-JMRDT2XK.js} +1 -1
- package/dist/cli/chunks/{chunk-2YZ4G6NW.js → chunk-JR2UMTKG.js} +1 -1
- package/dist/cli/chunks/{chunk-RJIEG3NA.js → chunk-K6CH4CFF.js} +2 -2
- package/dist/cli/chunks/{chunk-5NNNEWLS.js → chunk-K7KW5QB5.js} +81 -88
- package/dist/cli/chunks/chunk-KFCQP434.js +2 -0
- package/dist/cli/chunks/{chunk-A5GBXCP5.js → chunk-KH4T6STG.js} +2 -2
- package/dist/cli/chunks/{chunk-VMDFFTCK.js → chunk-KJBYZO57.js} +1 -1
- package/dist/cli/chunks/{chunk-GJYHWYXR.js → chunk-KP4OKOKV.js} +2 -2
- package/dist/cli/chunks/chunk-L2MBKVSE.js +2 -0
- package/dist/cli/chunks/{chunk-XIQW7EFL.js → chunk-L3IPUIT3.js} +2 -2
- package/dist/cli/chunks/{chunk-W5HQUIML.js → chunk-L7PSU2YN.js} +2 -2
- package/dist/cli/chunks/{chunk-6DPYNAOK.js → chunk-LA3JPGQA.js} +2 -2
- package/dist/cli/chunks/{chunk-5PBLPQ5T.js → chunk-LC2QRN7V.js} +14 -13
- package/dist/cli/chunks/{chunk-SSYAQZXA.js → chunk-LHY7TMTM.js} +2 -2
- package/dist/cli/chunks/{chunk-QQWBWEJS.js → chunk-LLQ2UMF6.js} +3 -3
- package/dist/cli/chunks/{chunk-DTMAS2GB.js → chunk-LOJ7OO6W.js} +2 -2
- package/dist/cli/chunks/{chunk-32GN3JKR.js → chunk-LPUSH3VF.js} +1 -1
- package/dist/cli/chunks/{chunk-SDLWKRVL.js → chunk-LSEC2BU7.js} +2 -2
- package/dist/cli/chunks/{chunk-IOKYCMTJ.js → chunk-LTGB7OIU.js} +2 -2
- package/dist/cli/chunks/{chunk-6ZBXSOX6.js → chunk-LUG7YNVZ.js} +2 -2
- package/dist/cli/chunks/{chunk-CAKMOVZ6.js → chunk-LWAFRYKE.js} +2 -2
- package/dist/cli/chunks/{chunk-FLNAW7C4.js → chunk-M24ZAZ4U.js} +2 -2
- package/dist/cli/chunks/{chunk-L2DWPVNJ.js → chunk-MKRKRXTX.js} +1 -1
- package/dist/cli/chunks/{chunk-YTHTQPWR.js → chunk-MNNLONAD.js} +1 -1
- package/dist/cli/chunks/{chunk-V5NHZV7S.js → chunk-MQM37KAR.js} +2 -2
- package/dist/cli/chunks/{chunk-PPUZWYUG.js → chunk-MSX2OHYT.js} +2 -2
- package/dist/cli/chunks/{chunk-YRAX7SFJ.js → chunk-MVYQRVLP.js} +2 -2
- package/dist/cli/chunks/{chunk-QVDCVD5D.js → chunk-MZC5WM2P.js} +2 -2
- package/dist/cli/chunks/{chunk-S75SOOZL.js → chunk-MZRBNBB3.js} +2 -2
- package/dist/cli/chunks/{chunk-FL64OUBA.js → chunk-N3KQU4UC.js} +2 -2
- package/dist/cli/chunks/{chunk-G5RHFBAY.js → chunk-NKU3FFM4.js} +2 -2
- package/dist/cli/chunks/chunk-O5EWFR76.js +2 -0
- package/dist/cli/chunks/{chunk-63ZKI4PX.js → chunk-O5RDHD5T.js} +2 -2
- package/dist/cli/chunks/chunk-O6UWIXME.js +3 -0
- package/dist/cli/chunks/{chunk-HCH4Y6XX.js → chunk-OA4EQDC4.js} +2 -2
- package/dist/cli/chunks/{chunk-QPEOLAAS.js → chunk-OBCXCRXK.js} +1 -1
- package/dist/cli/chunks/{chunk-6ICX3FEG.js → chunk-OHU5P25N.js} +22 -22
- package/dist/cli/chunks/{chunk-GFWHUQSF.js → chunk-OOSV2RIA.js} +2 -2
- package/dist/cli/chunks/{chunk-MO55CVMT.js → chunk-OW23N2Y5.js} +14 -14
- package/dist/cli/chunks/{chunk-M7WJCTG3.js → chunk-OXOO3YDL.js} +2 -2
- package/dist/cli/chunks/{chunk-KQYJ4VQ5.js → chunk-OYGKSSSI.js} +1 -1
- package/dist/cli/chunks/chunk-PGO46IIW.js +2 -0
- package/dist/cli/chunks/{chunk-NVEWF4JV.js → chunk-PZOYQHWS.js} +1 -1
- package/dist/cli/chunks/{chunk-IESR7TNB.js → chunk-Q2BZSG7Z.js} +2 -2
- package/dist/cli/chunks/{chunk-XIIQ5QTT.js → chunk-Q7V722K5.js} +2 -2
- package/dist/cli/chunks/{chunk-F742SZAX.js → chunk-QZU6M5IO.js} +2 -2
- package/dist/cli/chunks/{chunk-PINSJCM3.js → chunk-R55Y76SJ.js} +1 -1
- package/dist/cli/chunks/{chunk-5B5QPCNU.js → chunk-RMEQYJPU.js} +4 -4
- package/dist/cli/chunks/{chunk-ZQ2XW3IP.js → chunk-RTYXFXTI.js} +2 -2
- package/dist/cli/chunks/{chunk-DVYHMDFR.js → chunk-SJF3O4FX.js} +374 -371
- package/dist/cli/chunks/{chunk-AG2EWGXS.js → chunk-SOUS7Z2H.js} +2 -2
- package/dist/cli/chunks/{chunk-3HD7E6HN.js → chunk-SRVNR3R3.js} +2 -2
- package/dist/cli/chunks/{chunk-KITOPKRG.js → chunk-SU3SXMVG.js} +2 -2
- package/dist/cli/chunks/chunk-SWGPLXWW.js +32 -0
- package/dist/cli/chunks/{chunk-ZR2TKVXQ.js → chunk-TRB3EVH3.js} +2 -2
- package/dist/cli/chunks/{chunk-OCV2XEWQ.js → chunk-TVBDUMKT.js} +2 -2
- package/dist/cli/chunks/{chunk-IOQ6ZQ5W.js → chunk-TWTXPSFU.js} +1 -1
- package/dist/cli/chunks/{chunk-CJSHWQXP.js → chunk-ULYUVUL2.js} +2 -2
- package/dist/cli/chunks/{chunk-PHT5N7SC.js → chunk-UNTBVJ5X.js} +2 -2
- package/dist/cli/chunks/{chunk-LKTTUHLF.js → chunk-UQAA4PHU.js} +2 -2
- package/dist/cli/chunks/{chunk-SR52XP5F.js → chunk-UWSJVKTE.js} +1 -1
- package/dist/cli/chunks/{chunk-L6QSTQME.js → chunk-V2LJ54KP.js} +2 -2
- package/dist/cli/chunks/{chunk-FBDVGRSC.js → chunk-VCCTTKP3.js} +7 -7
- package/dist/cli/chunks/{chunk-YLMNVLDK.js → chunk-VEGUYUVS.js} +1 -1
- package/dist/cli/chunks/{chunk-ASEOFRIG.js → chunk-VUQPVWNK.js} +2 -2
- package/dist/cli/chunks/{chunk-VXFLJNCA.js → chunk-VVGUE2T2.js} +2 -2
- package/dist/cli/chunks/{chunk-4NFQLP6R.js → chunk-W5ASDHJQ.js} +1 -1
- package/dist/cli/chunks/{chunk-I7MQIM2U.js → chunk-WGXT5NWQ.js} +1 -1
- package/dist/cli/chunks/chunk-WJN3V7QB.js +7 -0
- package/dist/cli/chunks/chunk-WPCRQIIF.js +29 -0
- package/dist/cli/chunks/{chunk-SASBO5Y5.js → chunk-WQNLXUWA.js} +6 -6
- package/dist/cli/chunks/{chunk-5SPCGMBB.js → chunk-WZVRMKG2.js} +2 -2
- package/dist/cli/chunks/{chunk-MI5MFHRA.js → chunk-X27IUWTD.js} +2 -2
- package/dist/cli/chunks/{chunk-HJ6ZGVTB.js → chunk-X4B345B6.js} +2 -2
- package/dist/cli/chunks/{chunk-HVRRLYX6.js → chunk-X5I2Y4VO.js} +2 -2
- package/dist/cli/chunks/{chunk-SUDMM5SO.js → chunk-X7IQIFTS.js} +2 -2
- package/dist/cli/chunks/chunk-XJN3RKUD.js +3 -0
- package/dist/cli/chunks/{chunk-E3D4GPLP.js → chunk-XQMGXTHJ.js} +3 -3
- package/dist/cli/chunks/{chunk-67Z5R7RJ.js → chunk-XTSAMB2Q.js} +2 -2
- package/dist/cli/chunks/{chunk-KVF4NXGQ.js → chunk-XZLIF4O2.js} +2 -2
- package/dist/cli/chunks/{chunk-EA4YQVKS.js → chunk-Y4LSEOZ3.js} +1 -1
- package/dist/cli/chunks/{chunk-OAEE6JWQ.js → chunk-Y4YN2RXR.js} +2 -2
- package/dist/cli/chunks/{chunk-CEYSYSK5.js → chunk-YDI56L35.js} +2 -2
- package/dist/cli/chunks/{chunk-JDIYMZCQ.js → chunk-YFILS5D5.js} +2 -2
- package/dist/cli/chunks/{chunk-GAHNO6JJ.js → chunk-YISDX6WB.js} +2 -2
- package/dist/cli/chunks/{chunk-AGRV5B3T.js → chunk-YP2GHQSV.js} +2 -2
- package/dist/cli/chunks/{chunk-UNGBRZDK.js → chunk-YSX756AM.js} +4 -4
- package/dist/cli/chunks/{chunk-BEKDKVQT.js → chunk-YWANOASW.js} +2 -2
- package/dist/cli/chunks/{chunk-JQ3DYUMS.js → chunk-YYIJLG7S.js} +2 -2
- package/dist/cli/chunks/{chunk-CRPIYUTJ.js → chunk-Z7SD7LXM.js} +2 -2
- package/dist/cli/chunks/{chunk-U2A7NHZA.js → chunk-ZDWD73UF.js} +2 -2
- package/dist/cli/chunks/{chunk-WP4RETKG.js → chunk-ZFT3RLA4.js} +2 -2
- package/dist/cli/chunks/{chunk-VJCIEHEF.js → chunk-ZNTHX5G3.js} +1 -1
- package/dist/cli/chunks/{chunk-PF7RBAYL.js → chunk-ZS27R7VL.js} +2 -2
- package/dist/cli/chunks/{chunk-24OX5TQJ.js → chunk-ZXHHHR7K.js} +1 -1
- package/dist/cli/chunks/{ci-MFUR4CWV.js → ci-N5MOMNXH.js} +2 -2
- package/dist/cli/chunks/{ci-config-PNDLQ6XV.js → ci-config-6L2ROQCW.js} +2 -2
- package/dist/cli/chunks/{ci-output-PFZ4M7NC.js → ci-output-DSRBYEIK.js} +2 -2
- package/dist/cli/chunks/{circuit-breaker-5HH6NLZN.js → circuit-breaker-VRPTNBL7.js} +2 -2
- package/dist/cli/chunks/{claude-flow-setup-QCKYLGLC.js → claude-flow-setup-4YFG3FU5.js} +2 -2
- package/dist/cli/chunks/client-I3L6BKRQ.js +2 -0
- package/dist/cli/chunks/{cline-installer-EASVPFXR.js → cline-installer-7RGYJWGN.js} +2 -2
- package/dist/cli/chunks/{code-UJXDVYRK.js → code-ISC6NW2K.js} +3 -3
- package/dist/cli/chunks/{code-index-extractor-BZJ3UDP4.js → code-index-extractor-2FID75YV.js} +2 -2
- package/dist/cli/chunks/{codex-installer-XSQZUVOZ.js → codex-installer-DZ7OG6KM.js} +2 -2
- package/dist/cli/chunks/{completions-OWOOJFI2.js → completions-SM3LICWK.js} +2 -2
- package/dist/cli/chunks/{complexity-analyzer-KP5TOHDT.js → complexity-analyzer-ZWD2CTAD.js} +2 -2
- package/dist/cli/chunks/{continuedev-installer-IFKQXLHM.js → continuedev-installer-AGASOA26.js} +2 -2
- package/dist/cli/chunks/copilot-installer-CLPZYTQC.js +3 -0
- package/dist/cli/chunks/core-handlers-5EFOJ37H.js +2 -0
- package/dist/cli/chunks/{cost-tracker-MMDDNKZB.js → cost-tracker-7PIGQYDV.js} +2 -2
- package/dist/cli/chunks/{coverage-LUH2B7NT.js → coverage-T2GEBTYS.js} +9 -9
- package/dist/cli/chunks/cross-domain-router-65WJAKVD.js +2 -0
- package/dist/cli/chunks/{cursor-installer-4YLM5GWM.js → cursor-installer-KXBID4MB.js} +2 -2
- package/dist/cli/chunks/daemon-43MXIVH3.js +18 -0
- package/dist/cli/chunks/{daemon-MZKVM4CJ.js → daemon-VAMJLQJ5.js} +3 -3
- package/dist/cli/chunks/{dag-attention-scheduler-X4CYW665.js → dag-attention-scheduler-UBP4VHTA.js} +2 -2
- package/dist/cli/chunks/{detect-7BM2XINO.js → detect-QWFIQRKI.js} +2 -2
- package/dist/cli/chunks/{dist-node-Y5APLEYB.js → dist-node-I2GICS3W.js} +2 -2
- package/dist/cli/chunks/{domain-handler-X3ZRJNAH.js → domain-handler-Z66ISB2A.js} +2 -2
- package/dist/cli/chunks/{domain-plugins-2UW5KQJB.js → domain-plugins-KHMD3FKT.js} +2 -2
- package/dist/cli/chunks/{domain-transfer-35W4CIBV.js → domain-transfer-JWGNNA6K.js} +2 -2
- package/dist/cli/chunks/dream-VQ2PZCVR.js +2 -0
- package/dist/cli/chunks/embed-and-insert-pattern-F5P5B6JX.js +3 -0
- package/dist/cli/chunks/{embedding-space-SBM2MZD2.js → embedding-space-KHG6TITM.js} +2 -2
- package/dist/cli/chunks/{eval-4QA2SROK.js → eval-43OHU7EI.js} +2 -2
- package/dist/cli/chunks/{experience-capture-middleware-Z6BF6KYM.js → experience-capture-middleware-KXD47H6P.js} +3 -3
- package/dist/cli/chunks/{fast-paths-FIORX6GN.js → fast-paths-6D75D5KD.js} +2 -2
- package/dist/cli/chunks/{feature-flags-6LYI2T4G.js → feature-flags-IE35Y55N.js} +2 -2
- package/dist/cli/chunks/{feature-flags-ZOO7LMIC.js → feature-flags-OYYHY7LS.js} +2 -2
- package/dist/cli/chunks/file-discovery-LGBTY3ID.js +2 -0
- package/dist/cli/chunks/{fleet-7WF53H4F.js → fleet-AGVJMFGD.js} +16 -16
- package/dist/cli/chunks/{gnn-wrapper-KJ6B7BRM.js → gnn-wrapper-5L66A7LW.js} +2 -2
- package/dist/cli/chunks/{heartbeat-handler-DEKKMOVW.js → heartbeat-handler-2BY6YYOT.js} +5 -5
- package/dist/cli/chunks/heartbeat-scheduler-3DU3M5AT.js +2 -0
- package/dist/cli/chunks/hnsw-adapter-N2IMSRPV.js +2 -0
- package/dist/cli/chunks/hnsw-index-DVU7TTJE.js +2 -0
- package/dist/cli/chunks/{hnsw-legacy-bridge-L27WS27N.js → hnsw-legacy-bridge-RYMWFNAH.js} +2 -2
- package/dist/cli/chunks/{hnswlib-node-4YOQC6L4.js → hnswlib-node-GG47HP2P.js} +2 -2
- package/dist/cli/chunks/{hooks-TAOKV4EJ.js → hooks-FQNACS24.js} +10 -10
- package/dist/cli/chunks/hybrid-backend-AS2PNHOD.js +2 -0
- package/dist/cli/chunks/{hypergraph-engine-BODRJLHL.js → hypergraph-engine-6BYNJQEP.js} +2 -2
- package/dist/cli/chunks/{hypergraph-handler-RKMYJNTU.js → hypergraph-handler-CYTAXZKJ.js} +3 -3
- package/dist/cli/chunks/impact-analyzer-Y4OONLFP.js +2 -0
- package/dist/cli/chunks/{init-guard-MXHSLSB2.js → init-guard-METTAV5O.js} +2 -2
- package/dist/cli/chunks/{init-handler-HUE57IFW.js → init-handler-GFT74U5Y.js} +6 -6
- package/dist/cli/chunks/init-wizard-HLNUBJQN.js +2 -0
- package/dist/cli/chunks/kernel-XKFWCL7Y.js +2 -0
- package/dist/cli/chunks/{kilocode-installer-S333IKYQ.js → kilocode-installer-GZV2D3FF.js} +2 -2
- package/dist/cli/chunks/{kiro-installer-WM5DLQWC.js → kiro-installer-Q4ZXUFC7.js} +2 -2
- package/dist/cli/chunks/knowledge-graph-CNL77CSZ.js +2 -0
- package/dist/cli/chunks/{learning-LNHMQLH5.js → learning-WA2QEYL7.js} +35 -34
- package/dist/cli/chunks/{llm-router-EWFXYZZR.js → llm-router-GRTCHWH7.js} +4 -4
- package/dist/cli/chunks/llm-router-service-UIYTYKP6.js +2 -0
- package/dist/cli/chunks/{load-FGYGWVDK.js → load-WXN3Q7Y5.js} +2 -2
- package/dist/cli/chunks/load-test-PXLW4A5B.js +2 -0
- package/dist/cli/chunks/{mcp-2FHNAAOM.js → mcp-LIQCPSJN.js} +2 -2
- package/dist/cli/chunks/{memory-DZMQ73AB.js → memory-OP6CHRFH.js} +5 -5
- package/dist/cli/chunks/memory-backend-XYOSO73Q.js +2 -0
- package/dist/cli/chunks/memory-handlers-PQFYVNVG.js +2 -0
- package/dist/cli/chunks/{multi-model-executor-6F2UAEUW.js → multi-model-executor-H54DEVRZ.js} +2 -2
- package/dist/cli/chunks/{opencode-installer-XY3BGOTZ.js → opencode-installer-BSQV6UAT.js} +2 -2
- package/dist/cli/chunks/{orchestrator-B4CNKUOS.js → orchestrator-TJDPQ4VL.js} +122 -35
- package/dist/cli/chunks/pattern-null-store-BKGTQFNF.js +2 -0
- package/dist/cli/chunks/{pattern-usage-recorder-R4GUFNMD.js → pattern-usage-recorder-FOVS4M5L.js} +2 -2
- package/dist/cli/chunks/{pipeline-FG5RKVRO.js → pipeline-4AY2ZIC6.js} +2 -2
- package/dist/cli/chunks/{platform-3BT4KEVJ.js → platform-FCSITYMR.js} +2 -2
- package/dist/cli/chunks/{plugin-WI4RIN7O.js → plugin-E56TV5S2.js} +2 -2
- package/dist/cli/chunks/{prime-radiant-advanced-wasm-7ECDNQFS.js → prime-radiant-advanced-wasm-ACOPC533.js} +2 -2
- package/dist/cli/chunks/project-root-MPX7CN2C.js +2 -0
- package/dist/cli/chunks/protocol-executor-CRQOCC4A.js +2 -0
- package/dist/cli/chunks/{protocol-handler-WNODKPGW.js → protocol-handler-KRVXF4LS.js} +2 -2
- package/dist/cli/chunks/{prove-5RHAEPYZ.js → prove-KMFPSKGD.js} +2 -2
- package/dist/cli/chunks/qe-reasoning-bank-UEGQ3O7F.js +2 -0
- package/dist/cli/chunks/{quality-WPHR7BGQ.js → quality-6DBI3HLB.js} +2 -2
- package/dist/cli/chunks/{quality-gate-4RKTEZMX.js → quality-gate-3ROZMEIL.js} +3 -3
- package/dist/cli/chunks/queen-coordinator-32574XSG.js +2 -0
- package/dist/cli/chunks/real-embeddings-MIGZNKK3.js +2 -0
- package/dist/cli/chunks/{ref-validation-TPAWHOHH.js → ref-validation-EYIP7DHW.js} +2 -2
- package/dist/cli/chunks/{roocode-installer-7AVHFNDI.js → roocode-installer-IGGZHR2Y.js} +2 -2
- package/dist/cli/chunks/router-CZJY5WX6.js +2 -0
- package/dist/cli/chunks/routing-feedback-RC3UBNFX.js +2 -0
- package/dist/cli/chunks/{routing-handler-YKEDVJSH.js → routing-handler-BWNHBYDC.js} +2 -2
- package/dist/cli/chunks/{ruvector-commands-JUAMM354.js → ruvector-commands-PXIHF432.js} +2 -2
- package/dist/cli/chunks/rvf-dual-writer-OG7OV2AK.js +2 -0
- package/dist/cli/chunks/rvf-migration-adapter-THYMW7ZO.js +2 -0
- package/dist/cli/chunks/rvf-migration-coordinator-3H6CLFU7.js +2 -0
- package/dist/cli/chunks/rvf-native-adapter-6JQJIKKW.js +2 -0
- package/dist/cli/chunks/{rvf-store-integrity-VJDUIRTX.js → rvf-store-integrity-CVB3NMSL.js} +2 -2
- package/dist/cli/chunks/safe-db-QFKCVTIJ.js +2 -0
- package/dist/cli/chunks/schedule-6JLVMMYB.js +2 -0
- package/dist/cli/chunks/scheduler-3MPZRMJD.js +2 -0
- package/dist/cli/chunks/{security-ORDN3RD2.js → security-DCRGOTWU.js} +3 -3
- package/dist/cli/chunks/{shared-rvf-adapter-CF4BCIO7.js → shared-rvf-adapter-GKD74QUB.js} +2 -2
- package/dist/cli/chunks/{shared-rvf-dual-writer-C32UBR6D.js → shared-rvf-dual-writer-HVAAVEOH.js} +2 -2
- package/dist/cli/chunks/sqlite-persistence-LGTIKAEX.js +2 -0
- package/dist/cli/chunks/{standalone-memory-OXRJYZXN.js → standalone-memory-O7O2U5N4.js} +2 -2
- package/dist/cli/chunks/{status-handler-BCX5D4HY.js → status-handler-BQTPJJTL.js} +2 -2
- package/dist/cli/chunks/{structural-health-LFG7RUU6.js → structural-health-4H6J4OHK.js} +2 -2
- package/dist/cli/chunks/sync-DJ4TF6QX.js +2 -0
- package/dist/cli/chunks/{sync-YJEE2K2L.js → sync-WW5TAVYW.js} +2 -2
- package/dist/cli/chunks/{task-handler-6LXKPTXJ.js → task-handler-HEM4IEOW.js} +2 -2
- package/dist/cli/chunks/{task-handlers-CILP36I7.js → task-handlers-JRA3NXIR.js} +3 -3
- package/dist/cli/chunks/test-772ZXVG2.js +34 -0
- package/dist/cli/chunks/test-runner-process-XGF2U3NG.js +2 -0
- package/dist/cli/chunks/{test-scheduling-ISI2O4Q5.js → test-scheduling-4TRB7LZ7.js} +3 -3
- package/dist/cli/chunks/token-bootstrap-CICBIJ7T.js +2 -0
- package/dist/cli/chunks/{token-usage-XOC5KG7S.js → token-usage-B7PEKE2G.js} +2 -2
- package/dist/cli/chunks/{transformers-LSLQAARK.js → transformers-V7X7BDZX.js} +2 -2
- package/dist/cli/chunks/tree-sitter-wasm-parser-OXPFKFZS.js +2 -0
- package/dist/cli/chunks/{types-5BLCGLCR.js → types-AHHTUY3I.js} +2 -2
- package/dist/cli/chunks/unified-memory-GUR3IUI6.js +2 -0
- package/dist/cli/chunks/unified-memory-hnsw-NJP2F2RY.js +2 -0
- package/dist/cli/chunks/unified-persistence-NILBWXDP.js +2 -0
- package/dist/cli/chunks/{upgrade-RQJYLK3J.js → upgrade-DZ4DLUQ5.js} +2 -2
- package/dist/cli/chunks/{validate-QBHWXXCK.js → validate-4DTLIDJE.js} +2 -2
- package/dist/cli/chunks/{validate-swarm-IKXBKFB5.js → validate-swarm-A26UFVIS.js} +2 -2
- package/dist/cli/chunks/visual-security-YECYZ27X.js +2 -0
- package/dist/cli/chunks/{web-tree-sitter-ZF6FIE5R.js → web-tree-sitter-F2C7QRYT.js} +2 -2
- package/dist/cli/chunks/{windsurf-installer-HQGDZT5D.js → windsurf-installer-OOBTDA6W.js} +2 -2
- package/dist/cli/chunks/{witness-chain-DCHCAMSQ.js → witness-chain-KGFZJP32.js} +2 -2
- package/dist/cli/chunks/witness-chain-LYBXFLJB.js +2 -0
- package/dist/cli/chunks/witness-chain-repair-CNTXOGPN.js +2 -0
- package/dist/cli/chunks/{witness-chain-verifier-PX2OQ6XT.js → witness-chain-verifier-OB7ZZOI3.js} +2 -2
- package/dist/cli/chunks/{witness-key-manager-RXYQNFJB.js → witness-key-manager-YCKGKGQI.js} +2 -2
- package/dist/cli/chunks/{workflow-FBKCA4H6.js → workflow-PRERHWKY.js} +4 -4
- package/dist/cli/chunks/workflow-orchestrator-UIBGWCU3.js +2 -0
- package/dist/cli/chunks/wrappers-L4UY4V63.js +2 -0
- package/dist/cli/commands/coverage.js +4 -1
- package/dist/cli/commands/learning-prune.js +9 -1
- package/dist/cli/commands/test.js +26 -4
- package/dist/cli/handlers/brain-handler.js +32 -2
- package/dist/cli/handlers/heartbeat-handler.js +3 -1
- package/dist/cli/utils/coverage-data.js +5 -1
- package/dist/cli/utils/coverage-verdict.d.ts +10 -2
- package/dist/cli/utils/coverage-verdict.js +23 -8
- package/dist/cli/utils/fleet-operation.js +9 -3
- package/dist/coordination/handlers/code-intelligence-handlers.js +17 -3
- package/dist/coordination/handlers/coverage-handlers.js +22 -9
- package/dist/coordination/handlers/coverage-target.d.ts +22 -2
- package/dist/coordination/handlers/coverage-target.js +45 -9
- package/dist/coordination/handlers/handler-utils.d.ts +19 -0
- package/dist/coordination/handlers/handler-utils.js +22 -8
- package/dist/coordination/handlers/test-execution-handlers.js +64 -20
- package/dist/coordination/protocols/code-intelligence-index.js +6 -3
- package/dist/coordination/protocols/learning-consolidation-archive.d.ts +6 -3
- package/dist/coordination/protocols/learning-consolidation-archive.js +4 -3
- package/dist/coordination/workflow-builtin.js +1 -0
- package/dist/domains/code-intelligence/services/semantic-analyzer.d.ts +8 -3
- package/dist/domains/code-intelligence/services/semantic-analyzer.js +39 -25
- package/dist/domains/code-intelligence/services/text-relevance.d.ts +32 -0
- package/dist/domains/code-intelligence/services/text-relevance.js +63 -0
- package/dist/domains/defect-intelligence/interfaces.d.ts +2 -0
- package/dist/domains/defect-intelligence/prediction-history.d.ts +15 -1
- package/dist/domains/defect-intelligence/prediction-history.js +63 -7
- package/dist/domains/defect-intelligence/services/defect-predictor.d.ts +1 -0
- package/dist/domains/defect-intelligence/services/defect-predictor.js +33 -13
- package/dist/domains/learning-optimization/coordinator.js +17 -10
- package/dist/domains/learning-optimization/domain-ranking.d.ts +26 -0
- package/dist/domains/learning-optimization/domain-ranking.js +28 -0
- package/dist/domains/learning-optimization/interfaces.d.ts +5 -0
- package/dist/domains/learning-optimization/pattern-archive.d.ts +55 -8
- package/dist/domains/learning-optimization/pattern-archive.js +90 -17
- package/dist/domains/learning-optimization/pattern-consolidation.js +18 -2
- package/dist/domains/learning-optimization/pattern-merge.d.ts +26 -0
- package/dist/domains/learning-optimization/pattern-merge.js +127 -0
- package/dist/domains/learning-optimization/services/learning-coordinator.js +21 -35
- package/dist/domains/test-execution/coordinator.d.ts +3 -1
- package/dist/domains/test-execution/coordinator.js +13 -4
- package/dist/domains/test-execution/interfaces.d.ts +5 -0
- package/dist/domains/test-execution/plugin.js +2 -0
- package/dist/domains/test-execution/services/flaky-detector.d.ts +9 -1
- package/dist/domains/test-execution/services/flaky-detector.js +26 -8
- package/dist/domains/test-execution/services/retry-handler.d.ts +7 -1
- package/dist/domains/test-execution/services/retry-handler.js +44 -5
- package/dist/domains/test-execution/services/runner-test-cases.d.ts +2 -0
- package/dist/domains/test-execution/services/runner-test-cases.js +7 -3
- package/dist/domains/test-execution/services/test-executor.d.ts +5 -1
- package/dist/domains/test-execution/services/test-executor.js +85 -17
- package/dist/init/copilot-installer.d.ts +6 -0
- package/dist/init/copilot-installer.js +37 -17
- package/dist/init/init-wizard-steps.js +3 -1
- package/dist/init/phases/07-hooks.js +97 -10
- package/dist/init/platform-config-generator.d.ts +10 -0
- package/dist/init/platform-config-generator.js +26 -1
- package/dist/integrations/embeddings/cache/EmbeddingCache.js +1 -1
- package/dist/integrations/ruvector/brain-rvf-exporter.d.ts +16 -1
- package/dist/integrations/ruvector/brain-rvf-exporter.js +18 -32
- package/dist/integrations/ruvector/brain-rvf-richness.d.ts +75 -0
- package/dist/integrations/ruvector/brain-rvf-richness.js +127 -0
- package/dist/kernel/unified-memory-migration.js +1 -1
- package/dist/kernel/unified-memory.d.ts +8 -0
- package/dist/kernel/unified-memory.js +13 -0
- package/dist/learning/checkpoint-shrink-ack.d.ts +25 -0
- package/dist/learning/checkpoint-shrink-ack.js +57 -0
- package/dist/learning/dream/dream-engine.d.ts +44 -3
- package/dist/learning/dream/dream-engine.js +6 -2
- package/dist/learning/embedder-endpoint-client.d.ts +45 -0
- package/dist/learning/embedder-endpoint-client.js +98 -3
- package/dist/learning/embedder-identity-store.js +3 -1
- package/dist/learning/embedding-space-legacy-adoption.d.ts +53 -0
- package/dist/learning/embedding-space-legacy-adoption.js +115 -0
- package/dist/learning/embedding-space-registry.d.ts +90 -0
- package/dist/learning/embedding-space-registry.js +181 -0
- package/dist/learning/experience-capture.d.ts +3 -1
- package/dist/learning/experience-capture.js +15 -5
- package/dist/learning/experience-space-verification.d.ts +2 -0
- package/dist/learning/experience-space-verification.js +3 -2
- package/dist/learning/learning-retention.js +4 -0
- package/dist/learning/pattern-promotion.d.ts +7 -0
- package/dist/learning/pattern-promotion.js +64 -12
- package/dist/learning/real-embeddings.d.ts +3 -0
- package/dist/learning/real-embeddings.js +73 -11
- package/dist/learning/rvf-pattern-store.js +6 -1
- package/dist/mcp/bundle.js +558 -537
- package/dist/mcp/handlers/domain-handler-configs.d.ts +3 -0
- package/dist/mcp/handlers/domain-handler-configs.js +1 -0
- package/dist/mcp/handlers/heartbeat-handlers.d.ts +4 -2
- package/dist/mcp/protocol-server.js +1 -1
- package/dist/mcp/tools/learning-optimization/optimize.d.ts +6 -1
- package/dist/mcp/tools/learning-optimization/optimize.js +20 -11
- package/dist/planning/goap-planner.js +4 -0
- package/dist/planning/plan-executor.js +6 -2
- package/dist/shared/embeddings/index.d.ts +2 -2
- package/dist/shared/embeddings/index.js +1 -1
- package/dist/shared/embeddings/nomic-embedder.d.ts +8 -2
- package/dist/shared/embeddings/nomic-embedder.js +19 -11
- package/dist/shared/embeddings/ollama-client.d.ts +28 -2
- package/dist/shared/embeddings/ollama-client.js +84 -22
- package/dist/shared/embeddings/types.d.ts +15 -0
- package/dist/shared/embeddings/types.js +4 -0
- package/dist/shared/git/git-analyzer.d.ts +30 -11
- package/dist/shared/git/git-analyzer.js +95 -48
- package/dist/shared/io/confined-read.d.ts +32 -7
- package/dist/shared/io/confined-read.js +58 -25
- package/dist/shared/io/file-reader.js +4 -1
- package/dist/shared/pytest-junit-report.d.ts +93 -0
- package/dist/shared/pytest-junit-report.js +241 -0
- package/dist/shared/safe-db.d.ts +1 -1
- package/dist/shared/safe-db.js +20 -5
- package/dist/shared/sqlite-journal-mode.d.ts +39 -0
- package/dist/shared/sqlite-journal-mode.js +53 -0
- package/dist/shared/test-runner-project.d.ts +51 -1
- package/dist/shared/test-runner-project.js +140 -25
- package/dist/sync/claude-flow-bridge.js +1 -1
- package/dist/sync/readers/sqlite-reader.js +3 -4
- package/dist/sync/writers/sqlite-writer.js +1 -1
- package/dist/workers/interfaces.d.ts +2 -2
- package/dist/workers/quality-daemon/git-watcher.d.ts +8 -0
- package/dist/workers/quality-daemon/git-watcher.js +54 -12
- package/dist/workers/quality-daemon/index.js +1 -1
- package/dist/workers/quality-daemon/priority-queue.d.ts +2 -1
- package/dist/workers/workers/defect-predictor.d.ts +9 -4
- package/dist/workers/workers/defect-predictor.js +98 -37
- package/package.json +1 -1
- package/dist/cli/chunks/adapter-6CQ2PIP5.js +0 -2
- package/dist/cli/chunks/aqe-learning-engine-73RR52VS.js +0 -2
- package/dist/cli/chunks/base-SMCMMVGP.js +0 -2
- package/dist/cli/chunks/brain-handler-HQWZFO52.js +0 -95
- package/dist/cli/chunks/browser-workflow-A2MEZ66K.js +0 -2
- package/dist/cli/chunks/chunk-CGGUM2YJ.js +0 -3
- package/dist/cli/chunks/chunk-D6COXLYE.js +0 -8
- package/dist/cli/chunks/chunk-EGYE5UPQ.js +0 -2
- package/dist/cli/chunks/chunk-IUBJVHNB.js +0 -3
- package/dist/cli/chunks/chunk-KL7OKSU2.js +0 -4
- package/dist/cli/chunks/chunk-KPRCB5LT.js +0 -7
- package/dist/cli/chunks/chunk-LRSX2FJM.js +0 -2
- package/dist/cli/chunks/chunk-M4FRQ4TE.js +0 -12
- package/dist/cli/chunks/chunk-MAFQV4U4.js +0 -16
- package/dist/cli/chunks/chunk-NZU4ACBZ.js +0 -2
- package/dist/cli/chunks/chunk-RV74I3YO.js +0 -3
- package/dist/cli/chunks/chunk-SJ6Y4725.js +0 -5
- package/dist/cli/chunks/chunk-UE5ZOZR2.js +0 -2
- package/dist/cli/chunks/chunk-VSIKHWZ4.js +0 -29
- package/dist/cli/chunks/chunk-YAPLJR7K.js +0 -2
- package/dist/cli/chunks/client-MHQRTZM4.js +0 -2
- package/dist/cli/chunks/copilot-installer-IGJ6KGQY.js +0 -3
- package/dist/cli/chunks/core-handlers-UAK3LLJE.js +0 -2
- package/dist/cli/chunks/cross-domain-router-WTRZQPNQ.js +0 -2
- package/dist/cli/chunks/daemon-CAVZ7OFV.js +0 -18
- package/dist/cli/chunks/dream-EJY24JN6.js +0 -2
- package/dist/cli/chunks/embed-and-insert-pattern-COG4C7ZI.js +0 -3
- package/dist/cli/chunks/file-discovery-UZSFSS4V.js +0 -2
- package/dist/cli/chunks/heartbeat-scheduler-NVR356I7.js +0 -2
- package/dist/cli/chunks/hnsw-adapter-LFMPLUJU.js +0 -2
- package/dist/cli/chunks/hnsw-index-POCPMVJH.js +0 -2
- package/dist/cli/chunks/hybrid-backend-4STAO7CV.js +0 -2
- package/dist/cli/chunks/impact-analyzer-3VIIISBQ.js +0 -2
- package/dist/cli/chunks/init-wizard-PL6QN6RQ.js +0 -2
- package/dist/cli/chunks/kernel-CCDWT7KS.js +0 -2
- package/dist/cli/chunks/knowledge-graph-KFOMEN3H.js +0 -2
- package/dist/cli/chunks/llm-router-service-7NBE2EX6.js +0 -2
- package/dist/cli/chunks/load-test-UNZUWY3F.js +0 -2
- package/dist/cli/chunks/memory-backend-DFGKWA2Q.js +0 -2
- package/dist/cli/chunks/memory-handlers-MP426XRJ.js +0 -2
- package/dist/cli/chunks/pattern-null-store-SSVF5TE5.js +0 -2
- package/dist/cli/chunks/project-root-BEANNYWU.js +0 -2
- package/dist/cli/chunks/protocol-executor-FQVIHXZ7.js +0 -2
- package/dist/cli/chunks/qe-reasoning-bank-5TFYSE24.js +0 -2
- package/dist/cli/chunks/queen-coordinator-Y2OUL7IN.js +0 -2
- package/dist/cli/chunks/real-embeddings-OXLYU7JW.js +0 -2
- package/dist/cli/chunks/router-EP34O3KB.js +0 -2
- package/dist/cli/chunks/routing-feedback-FJCRKXNG.js +0 -2
- package/dist/cli/chunks/rvf-dual-writer-ILITJSFG.js +0 -2
- package/dist/cli/chunks/rvf-migration-adapter-XF6W4C2N.js +0 -2
- package/dist/cli/chunks/rvf-migration-coordinator-CMKG56AR.js +0 -2
- package/dist/cli/chunks/rvf-native-adapter-7YFW6S4Y.js +0 -2
- package/dist/cli/chunks/safe-db-TCAU4FUT.js +0 -2
- package/dist/cli/chunks/schedule-NB5KV435.js +0 -2
- package/dist/cli/chunks/scheduler-JKXGKVK6.js +0 -2
- package/dist/cli/chunks/sqlite-persistence-IXCNZRTW.js +0 -2
- package/dist/cli/chunks/sync-OSF7C2NL.js +0 -2
- package/dist/cli/chunks/test-SD457QJ6.js +0 -34
- package/dist/cli/chunks/test-runner-process-VKD65QQU.js +0 -2
- package/dist/cli/chunks/token-bootstrap-VUELSBOS.js +0 -2
- package/dist/cli/chunks/tree-sitter-wasm-parser-YAIPHRIL.js +0 -2
- package/dist/cli/chunks/unified-memory-GI76TXFV.js +0 -2
- package/dist/cli/chunks/unified-memory-hnsw-GXJ5BTZO.js +0 -2
- package/dist/cli/chunks/unified-persistence-OP7FDQPD.js +0 -2
- package/dist/cli/chunks/visual-security-GZ2MOKWB.js +0 -2
- package/dist/cli/chunks/witness-chain-P3XXXA62.js +0 -2
- package/dist/cli/chunks/witness-chain-repair-PUX2NFDL.js +0 -2
- package/dist/cli/chunks/workflow-orchestrator-P2APAJAA.js +0 -2
- package/dist/cli/chunks/wrappers-TWSKBTWD.js +0 -2
|
@@ -408,6 +408,15 @@ const MAX_AGE_HOURS = 24;
|
|
|
408
408
|
const SKIP_PATH = path.join(AQE_DIR, 'brain-checkpoint.skip.json');
|
|
409
409
|
const RETRY_ENV = Number.parseFloat(process.env.AQE_BRAIN_CHECKPOINT_RETRY_HOURS || '');
|
|
410
410
|
const TOO_LARGE_RETRY_HOURS = Number.isFinite(RETRY_ENV) && RETRY_ENV >= 0 ? RETRY_ENV : 6;
|
|
411
|
+
// #1251: refuse an export in which a table collapsed; a deliberate shrink
|
|
412
|
+
// (aqe learning prune --apply, dream retention) leaves this acknowledgement,
|
|
413
|
+
// which the CLI honours once, within 24h, while the brain holds its counts.
|
|
414
|
+
const SHRINK_ACK_PATH = path.join(AQE_DIR, 'brain-checkpoint.accept-shrink.json');
|
|
415
|
+
const SHRINK_ACK_MAX_AGE_HOURS = 24;
|
|
416
|
+
const MIRROR_REFUSAL = /RVF_MIRROR_(?:RICHER|INSPECTION_AMBIGUOUS):[^\\n]*/;
|
|
417
|
+
const SHRINK_ACK_VERDICT = /SHRINK_ACK_(HONOURED|IGNORED): ([^\\n]*)/;
|
|
418
|
+
// An older global aqe rejects the #1251 flags: back off rather than fail every turn.
|
|
419
|
+
const OUTDATED_CLI = /unknown option '(--(?:compare-with|richness-policy|accept-shrink))'/;
|
|
411
420
|
// Windows (#872): never execFile aqe.cmd (EINVAL without a shell); reuse the
|
|
412
421
|
// hook shim's resolver, which runs the AQE bundle via node instead.
|
|
413
422
|
function aqeInvocation() {
|
|
@@ -441,6 +450,42 @@ function activeSkip() {
|
|
|
441
450
|
return skip;
|
|
442
451
|
}
|
|
443
452
|
|
|
453
|
+
function dropShrinkAck(why) {
|
|
454
|
+
try { fs.unlinkSync(SHRINK_ACK_PATH); } catch { /* best-effort */ }
|
|
455
|
+
log('Ignored the shrink acknowledgement (' + why + '); the normal checkpoint policy applies.');
|
|
456
|
+
}
|
|
457
|
+
// The deliberate-shrink acknowledgement, or null; drops one that is unreadable,
|
|
458
|
+
// over 24h old or older than aqe.rvf. The CLI checks its counts (--accept-shrink).
|
|
459
|
+
function pendingShrinkAck() {
|
|
460
|
+
let st; try { st = fs.lstatSync(SHRINK_ACK_PATH); } catch { return null; }
|
|
461
|
+
let ack = null;
|
|
462
|
+
if (st.isFile()) { try { ack = JSON.parse(fs.readFileSync(SHRINK_ACK_PATH, 'utf8')); } catch { /* unreadable */ } }
|
|
463
|
+
const at = ack ? Date.parse(ack.at) : NaN;
|
|
464
|
+
let rvfMtime = 0; try { rvfMtime = fs.lstatSync(RVF_PATH).mtimeMs; } catch { /* absent */ }
|
|
465
|
+
let why = null;
|
|
466
|
+
if (!Number.isFinite(at)) why = 'unreadable';
|
|
467
|
+
else if (Date.now() - at > SHRINK_ACK_MAX_AGE_HOURS * 3600000) why = 'older than 24h';
|
|
468
|
+
else if (rvfMtime > at) why = 'already checkpointed';
|
|
469
|
+
if (why) { dropShrinkAck(why); return null; }
|
|
470
|
+
return { at, producer: String(ack.producer) };
|
|
471
|
+
}
|
|
472
|
+
// The CLI's verdict on the acknowledgement: its producer when honoured. No
|
|
473
|
+
// verdict (the export failed first) keeps it for the next turn.
|
|
474
|
+
function settleShrinkAck(output) {
|
|
475
|
+
const verdict = String(output || '').match(SHRINK_ACK_VERDICT);
|
|
476
|
+
if (!verdict) return null;
|
|
477
|
+
if (verdict[1] === 'IGNORED') { dropShrinkAck(verdict[2].trim()); return null; }
|
|
478
|
+
return verdict[2].trim();
|
|
479
|
+
}
|
|
480
|
+
function resumeHint(skip) {
|
|
481
|
+
return MIRROR_REFUSAL.test(skip.reason)
|
|
482
|
+
? 'To resume now, back up aqe.rvf and run \`aqe brain export -o .agentic-qe/aqe.rvf --force-overwrite-richer\`, '
|
|
483
|
+
+ 'or delete .agentic-qe/brain-checkpoint.skip.json to retry.'
|
|
484
|
+
: skip.reason.includes('upgrade to enable the checkpoint guard')
|
|
485
|
+
? 'Upgrade the global aqe (npm i -g agentic-qe), then delete .agentic-qe/brain-checkpoint.skip.json.'
|
|
486
|
+
: 'To retry now, delete .agentic-qe/brain-checkpoint.skip.json.';
|
|
487
|
+
}
|
|
488
|
+
|
|
444
489
|
function writeSkip(reason) {
|
|
445
490
|
const at = new Date();
|
|
446
491
|
const skip = { reason, at: at.toISOString(), retryAfter: new Date(at.getTime() + TOO_LARGE_RETRY_HOURS * 3600000).toISOString() };
|
|
@@ -483,6 +528,17 @@ function promote(tmp) {
|
|
|
483
528
|
}
|
|
484
529
|
}
|
|
485
530
|
|
|
531
|
+
// Version of the installed aqe, for the outdated-CLI back-off.
|
|
532
|
+
function aqeVersion(aqe) {
|
|
533
|
+
try {
|
|
534
|
+
const out = execFileSync(aqe.cmd, [...aqe.args, '--version'],
|
|
535
|
+
{ timeout: 10000, encoding: 'utf-8', windowsHide: true, stdio: ['ignore', 'pipe', 'ignore'] });
|
|
536
|
+
return out.trim().split(/\\s+/).pop() || 'unknown';
|
|
537
|
+
} catch {
|
|
538
|
+
return 'unknown';
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
|
|
486
542
|
function exportBrain() {
|
|
487
543
|
if (!fs.existsSync(DB_PATH)) { log('No memory.db, skipping'); return { exported: false }; }
|
|
488
544
|
const aqe = aqeInvocation();
|
|
@@ -490,17 +546,22 @@ function exportBrain() {
|
|
|
490
546
|
// Never write through a committed symlink: .agentic-qe must be a real dir.
|
|
491
547
|
let st; try { st = fs.lstatSync(AQE_DIR); } catch { /* missing */ }
|
|
492
548
|
if (!st || !st.isDirectory()) { log('Export skipped: .agentic-qe is a symlink'); return { exported: false }; }
|
|
549
|
+
const ack = pendingShrinkAck();
|
|
493
550
|
const skip = activeSkip();
|
|
494
|
-
|
|
495
|
-
|
|
551
|
+
// A shrink acknowledged after the back-off began is the answer to it.
|
|
552
|
+
if (skip && !(ack && ack.at > Date.parse(skip.at))) {
|
|
553
|
+
// Logged once, when the back-off began; session-start verify reports it.
|
|
496
554
|
return { exported: false, skipped: true, reason: skip.reason, retryAfter: skip.retryAfter };
|
|
497
555
|
}
|
|
498
556
|
sweepStaleTmp();
|
|
499
557
|
const tmp = path.join(AQE_DIR, TMP_PREFIX + process.pid + '-' + crypto.randomBytes(4).toString('hex'));
|
|
500
558
|
try {
|
|
501
559
|
for (const suffix of ['', ...RVF_SIDECARS]) removeEntry(tmp + suffix);
|
|
560
|
+
const args = [...aqe.args, 'brain', 'export', '-o', tmp, '--format', 'rvf'];
|
|
561
|
+
if (lexists(RVF_PATH)) args.push('--compare-with', RVF_PATH, '--richness-policy', 'checkpoint');
|
|
562
|
+
if (ack) args.push('--accept-shrink', SHRINK_ACK_PATH);
|
|
502
563
|
const result = execFileSync(
|
|
503
|
-
aqe.cmd,
|
|
564
|
+
aqe.cmd, args,
|
|
504
565
|
{ timeout: 60000, encoding: 'utf-8', windowsHide: true, stdio: ['ignore', 'pipe', 'pipe'] }
|
|
505
566
|
);
|
|
506
567
|
// A zero exit without a store is a failure, not an empty checkpoint.
|
|
@@ -509,9 +570,30 @@ function exportBrain() {
|
|
|
509
570
|
const m = result.match(/Patterns:\\s+(\\d+)/);
|
|
510
571
|
const p = m ? m[1] : '0';
|
|
511
572
|
log('Exported ' + p + ' patterns to aqe.rvf');
|
|
512
|
-
|
|
573
|
+
const accepted = ack ? settleShrinkAck(result) : null;
|
|
574
|
+
if (!accepted) return { exported: true, patterns: parseInt(p) };
|
|
575
|
+
try { removeEntry(SHRINK_ACK_PATH); removeEntry(SKIP_PATH); } catch { /* spent: older than aqe.rvf now */ }
|
|
576
|
+
log('Accepted the smaller brain (' + accepted + ')');
|
|
577
|
+
return { exported: true, patterns: parseInt(p), acceptedShrink: accepted };
|
|
513
578
|
} catch (e) {
|
|
514
|
-
const
|
|
579
|
+
const output = String(e.stderr || '') + String(e.stdout || '');
|
|
580
|
+
if (ack) settleShrinkAck(e.stdout);
|
|
581
|
+
const outdated = output.match(OUTDATED_CLI);
|
|
582
|
+
if (outdated) {
|
|
583
|
+
const skip = writeSkip('installed aqe ' + aqeVersion(aqe) + ' lacks ' + outdated[1] + '; upgrade to enable the checkpoint guard');
|
|
584
|
+
log('Export skipped, previous aqe.rvf kept: ' + skip.reason);
|
|
585
|
+
log('Skipping the checkpoint export until ' + skip.retryAfter + ' (logged once).');
|
|
586
|
+
return { exported: false, outdatedCli: true, reason: skip.reason, retryAfter: skip.retryAfter };
|
|
587
|
+
}
|
|
588
|
+
const refused = output.match(MIRROR_REFUSAL);
|
|
589
|
+
if (refused) {
|
|
590
|
+
const skip = writeSkip(refused[0].trim());
|
|
591
|
+
log('Export refused, previous aqe.rvf kept: ' + skip.reason);
|
|
592
|
+
log('Skipping the checkpoint export until ' + skip.retryAfter + ' (logged once). If the smaller brain is '
|
|
593
|
+
+ 'intended, back up aqe.rvf and run: aqe brain export -o .agentic-qe/aqe.rvf --force-overwrite-richer');
|
|
594
|
+
return { exported: false, richer: true, reason: skip.reason, retryAfter: skip.retryAfter };
|
|
595
|
+
}
|
|
596
|
+
const tooLarge = output.match(/RVF_KERNEL_TOO_LARGE:[^\\n]*/);
|
|
515
597
|
if (tooLarge) {
|
|
516
598
|
const skip = writeSkip(tooLarge[0].trim());
|
|
517
599
|
log('Export failed: ' + skip.reason);
|
|
@@ -529,18 +611,23 @@ function verifyBrain() {
|
|
|
529
611
|
if (!fs.existsSync(RVF_PATH)) {
|
|
530
612
|
const skip = activeSkip();
|
|
531
613
|
if (skip) {
|
|
532
|
-
log('No aqe.rvf found; checkpoint export paused until ' + skip.retryAfter + ': ' + skip.reason);
|
|
533
|
-
return { valid: false, reason: 'missing', skippedUntil: skip.retryAfter };
|
|
614
|
+
log('No aqe.rvf found; checkpoint export paused until ' + skip.retryAfter + ': ' + skip.reason + ' ' + resumeHint(skip));
|
|
615
|
+
return { valid: false, reason: 'missing', skippedUntil: skip.retryAfter, resumeHint: resumeHint(skip) };
|
|
534
616
|
}
|
|
535
617
|
log('No aqe.rvf found');
|
|
536
618
|
return { valid: false, reason: 'missing' };
|
|
537
619
|
}
|
|
538
620
|
const stat = fs.statSync(RVF_PATH);
|
|
621
|
+
const paused = activeSkip();
|
|
622
|
+
if (paused) log('Checkpoint export paused until ' + paused.retryAfter + ': ' + paused.reason + ' ' + resumeHint(paused));
|
|
623
|
+
const pause = paused
|
|
624
|
+
? { pausedUntil: paused.retryAfter, pauseReason: paused.reason, resumeHint: resumeHint(paused) }
|
|
625
|
+
: {};
|
|
539
626
|
const ageH = (Date.now() - stat.mtimeMs) / 3600000;
|
|
540
|
-
if (stat.size < 1024) { log('aqe.rvf too small'); return { valid: false, reason: 'too-small' }; }
|
|
541
|
-
if (ageH > MAX_AGE_HOURS) { log('aqe.rvf is ' + ageH.toFixed(1) + 'h old'); return { valid: true, stale: true }; }
|
|
627
|
+
if (stat.size < 1024) { log('aqe.rvf too small'); return { valid: false, reason: 'too-small', ...pause }; }
|
|
628
|
+
if (ageH > MAX_AGE_HOURS) { log('aqe.rvf is ' + ageH.toFixed(1) + 'h old'); return { valid: true, stale: true, ...pause }; }
|
|
542
629
|
log('aqe.rvf OK (' + (stat.size/1048576).toFixed(1) + ' MB)');
|
|
543
|
-
return { valid: true, stale: false };
|
|
630
|
+
return { valid: true, stale: false, ...pause };
|
|
544
631
|
}
|
|
545
632
|
|
|
546
633
|
const cmd = process.argv[2] || 'verify';
|
|
@@ -23,6 +23,16 @@ export interface GeneratedConfig {
|
|
|
23
23
|
format: string;
|
|
24
24
|
}
|
|
25
25
|
export declare const PLATFORM_REGISTRY: Record<PlatformId, PlatformDefinition>;
|
|
26
|
+
/**
|
|
27
|
+
* Issue #1269: VS Code caches each MCP server's tool list keyed by a hash of its
|
|
28
|
+
* launch config (command/args/env) and only restarts the server when that hash
|
|
29
|
+
* changes. The `agentic-qe@latest` entry is identical across releases, so tool
|
|
30
|
+
* schemas cached from an older server (the pre-#1185 "array type must have items"
|
|
31
|
+
* ones) survived upgrades. Stamping the installing version into the Copilot
|
|
32
|
+
* entry's env changes the hash whenever `aqe init` runs after an upgrade, without
|
|
33
|
+
* pinning which server version npx launches. The server does not read it.
|
|
34
|
+
*/
|
|
35
|
+
export declare function getCopilotInitVersionEnv(): Record<string, string>;
|
|
26
36
|
export declare class PlatformConfigGenerator {
|
|
27
37
|
/**
|
|
28
38
|
* Get the platform definition for a given platform ID
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Supports: GitHub Copilot, Cursor, Cline, Kilo Code, Roo Code, OpenAI Codex, Windsurf, Continue.dev
|
|
6
6
|
*/
|
|
7
|
+
import { createRequire } from 'module';
|
|
7
8
|
// ============================================================================
|
|
8
9
|
// Platform Registry
|
|
9
10
|
// ============================================================================
|
|
@@ -146,6 +147,29 @@ function getMcpServerEnv(dbFree) {
|
|
|
146
147
|
? { AQE_MEMORY_BACKEND: 'memory', AQE_V3_MODE: 'true' }
|
|
147
148
|
: { AQE_MEMORY_PATH: '.agentic-qe/memory.db', AQE_V3_MODE: 'true' };
|
|
148
149
|
}
|
|
150
|
+
/**
|
|
151
|
+
* Installed AQE version: the build-time define in the CLI/MCP bundles, otherwise
|
|
152
|
+
* package.json (tsc output and tests). Both src/init/ and dist/cli/ sit two levels
|
|
153
|
+
* below the package root.
|
|
154
|
+
*/
|
|
155
|
+
function getInstalledAqeVersion() {
|
|
156
|
+
if (typeof __CLI_VERSION__ !== 'undefined')
|
|
157
|
+
return __CLI_VERSION__;
|
|
158
|
+
const pkg = createRequire(import.meta.url)('../../package.json');
|
|
159
|
+
return pkg.version;
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Issue #1269: VS Code caches each MCP server's tool list keyed by a hash of its
|
|
163
|
+
* launch config (command/args/env) and only restarts the server when that hash
|
|
164
|
+
* changes. The `agentic-qe@latest` entry is identical across releases, so tool
|
|
165
|
+
* schemas cached from an older server (the pre-#1185 "array type must have items"
|
|
166
|
+
* ones) survived upgrades. Stamping the installing version into the Copilot
|
|
167
|
+
* entry's env changes the hash whenever `aqe init` runs after an upgrade, without
|
|
168
|
+
* pinning which server version npx launches. The server does not read it.
|
|
169
|
+
*/
|
|
170
|
+
export function getCopilotInitVersionEnv() {
|
|
171
|
+
return { AQE_INIT_VERSION: getInstalledAqeVersion() };
|
|
172
|
+
}
|
|
149
173
|
function getMcpServerEntry(withAutoApprove, dbFree) {
|
|
150
174
|
const entry = {
|
|
151
175
|
command: 'npx',
|
|
@@ -164,12 +188,13 @@ function getMcpServerEntry(withAutoApprove, dbFree) {
|
|
|
164
188
|
function generateJsonConfig(platform, dbFree) {
|
|
165
189
|
const serverEntry = getMcpServerEntry(platform.supportsAutoApprove, dbFree);
|
|
166
190
|
if (platform.id === 'copilot') {
|
|
167
|
-
// Copilot uses "servers" key with "type": "stdio"
|
|
191
|
+
// Copilot uses "servers" key with "type": "stdio"; env carries the init version stamp (#1269)
|
|
168
192
|
const config = {
|
|
169
193
|
[platform.configKey]: {
|
|
170
194
|
'agentic-qe': {
|
|
171
195
|
type: 'stdio',
|
|
172
196
|
...serverEntry,
|
|
197
|
+
env: { ...serverEntry.env, ...getCopilotInitVersionEnv() },
|
|
173
198
|
},
|
|
174
199
|
},
|
|
175
200
|
};
|
|
@@ -89,8 +89,8 @@ export class EmbeddingCache {
|
|
|
89
89
|
if (!existsSync(dir)) {
|
|
90
90
|
mkdirSync(dir, { recursive: true });
|
|
91
91
|
}
|
|
92
|
+
// #1164: openDatabase() set the journal mode (retrying contention, honouring AQE_DISABLE_WAL).
|
|
92
93
|
this.db = openDatabase(this.storagePath);
|
|
93
|
-
this.db.pragma('journal_mode = WAL');
|
|
94
94
|
this.db.pragma('synchronous = NORMAL');
|
|
95
95
|
// Create table if not exists (only for legacy mode)
|
|
96
96
|
this.db.exec(`
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import Database from 'better-sqlite3';
|
|
7
7
|
import { type MergeStrategy } from './brain-shared.js';
|
|
8
|
+
import { CODE_INDEX_VECTOR_ID_PREFIX, type RichnessPolicy, type ShrinkAckVerdict } from './brain-rvf-richness.js';
|
|
8
9
|
export interface RvfBrainManifest {
|
|
9
10
|
readonly version: '2.0' | '3.0';
|
|
10
11
|
readonly format: 'rvf';
|
|
@@ -50,6 +51,20 @@ export interface RvfBrainExportOptions {
|
|
|
50
51
|
readonly signerKeyId?: string;
|
|
51
52
|
/** Explicit operator acknowledgement that a richer existing mirror may be replaced. */
|
|
52
53
|
readonly allowOverwriteRicher?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* The mirror to compare richness against, when it is not `outputPath`
|
|
56
|
+
* (#1251: the checkpoint hook exports to a temp path, then renames).
|
|
57
|
+
*/
|
|
58
|
+
readonly compareWithPath?: string;
|
|
59
|
+
/** How much shrinkage the richness guard tolerates. Defaults to 'strict'. */
|
|
60
|
+
readonly richnessPolicy?: RichnessPolicy;
|
|
61
|
+
/**
|
|
62
|
+
* A deliberate-shrink acknowledgement (parsed JSON, #1251). When it still
|
|
63
|
+
* vouches for this export, it replaces the mirror comparison.
|
|
64
|
+
*/
|
|
65
|
+
readonly shrinkAck?: unknown;
|
|
66
|
+
/** Told whether `shrinkAck` was honoured, before the mirror comparison runs. */
|
|
67
|
+
readonly onShrinkAck?: (verdict: ShrinkAckVerdict) => void;
|
|
53
68
|
/** Kernel size ceiling in bytes. Defaults to RVF_MAX_KERNEL_BYTES; lowered only by tests. */
|
|
54
69
|
readonly maxKernelBytes?: number;
|
|
55
70
|
}
|
|
@@ -74,7 +89,7 @@ export declare const RVF_MAX_KERNEL_BYTES: number;
|
|
|
74
89
|
* index, C4 diagrams). They are derived from source code and rebuilt by
|
|
75
90
|
* `aqe code index`, so they stay out of the brain kernel (#1238).
|
|
76
91
|
*/
|
|
77
|
-
export
|
|
92
|
+
export { CODE_INDEX_VECTOR_ID_PREFIX };
|
|
78
93
|
/** Thrown before any native call when the kernel would exceed the RVF limit. */
|
|
79
94
|
export declare class RvfKernelTooLargeError extends Error {
|
|
80
95
|
readonly kernelBytes: number;
|
|
@@ -8,6 +8,7 @@ import { basename, dirname, join, resolve } from 'path';
|
|
|
8
8
|
import { createRvfStore, openRvfStore, openRvfStoreReadonly, isRvfNativeAvailable, } from './rvf-native-adapter.js';
|
|
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
|
+
import { assertNotPoorerThanMirror, CODE_INDEX_VECTOR_ID_PREFIX, evaluateShrinkAck, RvfMirrorGuardError, } from './brain-rvf-richness.js';
|
|
11
12
|
// --- Export ---
|
|
12
13
|
/**
|
|
13
14
|
* Largest kernel image @ruvector/rvf-node accepts. One byte more and
|
|
@@ -20,7 +21,7 @@ export const RVF_MAX_KERNEL_BYTES = 128 * 1024 * 1024;
|
|
|
20
21
|
* index, C4 diagrams). They are derived from source code and rebuilt by
|
|
21
22
|
* `aqe code index`, so they stay out of the brain kernel (#1238).
|
|
22
23
|
*/
|
|
23
|
-
export
|
|
24
|
+
export { CODE_INDEX_VECTOR_ID_PREFIX };
|
|
24
25
|
const CODE_INDEX_VECTOR_MATCH = `substr(id, 1, ${CODE_INDEX_VECTOR_ID_PREFIX.length}) = ?`;
|
|
25
26
|
function isCodeIndexVectorRow(tableName, row) {
|
|
26
27
|
if (tableName !== 'vectors')
|
|
@@ -319,47 +320,32 @@ export function exportBrainToRvf(db, options, sourceDbLabel = 'memory.db') {
|
|
|
319
320
|
// promotion. Inspection is fail-closed when the RVF itself remains readable
|
|
320
321
|
// but its kernel cannot yield a complete table inventory. A genuinely
|
|
321
322
|
// unreadable/corrupt RVF remains replaceable to preserve #563 recovery.
|
|
322
|
-
|
|
323
|
+
// #1251: the Stop-hook checkpoint writes to a temp path and names the
|
|
324
|
+
// published checkpoint in `compareWithPath`, so it is compared here too.
|
|
325
|
+
const comparePath = options.compareWithPath ? resolve(options.compareWithPath) : outPath;
|
|
326
|
+
let allowOverwriteRicher = options.allowOverwriteRicher === true;
|
|
327
|
+
if (options.shrinkAck !== undefined && !allowOverwriteRicher) {
|
|
328
|
+
const verdict = evaluateShrinkAck(options.shrinkAck, TABLE_CONFIGS.map(({ tableName }) => tableName), manifest.stats.tableCounts);
|
|
329
|
+
options.onShrinkAck?.(verdict);
|
|
330
|
+
allowOverwriteRicher = verdict.honoured;
|
|
331
|
+
}
|
|
332
|
+
if (existsSync(comparePath) && !allowOverwriteRicher) {
|
|
323
333
|
let existing;
|
|
324
334
|
try {
|
|
325
335
|
// Code-index vectors are no longer exported (#1238), so an older mirror
|
|
326
336
|
// that still holds them is compared on the rows both exports carry.
|
|
327
|
-
existing = readBrainInfo(
|
|
337
|
+
existing = readBrainInfo(comparePath, true);
|
|
328
338
|
}
|
|
329
339
|
catch (error) {
|
|
330
|
-
if (hasReadableBrainKernel(
|
|
340
|
+
if (hasReadableBrainKernel(comparePath) || !isKnownUnusableRvfError(error)) {
|
|
331
341
|
const detail = error instanceof Error ? error.message : String(error);
|
|
332
|
-
throw new
|
|
333
|
-
`
|
|
334
|
-
|
|
342
|
+
throw new RvfMirrorGuardError('RVF_MIRROR_INSPECTION_AMBIGUOUS', `the existing mirror is readable but its richness could not be established ` +
|
|
343
|
+
`(${detail}). Preserve/import it before retrying, or repeat with ` +
|
|
344
|
+
`--force-overwrite-richer after preserving a backup.`);
|
|
335
345
|
}
|
|
336
346
|
}
|
|
337
347
|
if (existing) {
|
|
338
|
-
|
|
339
|
-
const candidateCounts = manifest.stats.tableCounts;
|
|
340
|
-
const missing = TABLE_CONFIGS
|
|
341
|
-
.map(({ tableName }) => tableName)
|
|
342
|
-
.filter((tableName) => !existingCounts || !Number.isSafeInteger(existingCounts[tableName]));
|
|
343
|
-
if (missing.length > 0) {
|
|
344
|
-
throw new Error(`RVF_MIRROR_INSPECTION_AMBIGUOUS: existing mirror lacks trustworthy counts for ` +
|
|
345
|
-
`${missing.join(', ')}. Preserve/import it before retrying, or repeat with ` +
|
|
346
|
-
`--force-overwrite-richer after preserving a backup.`);
|
|
347
|
-
}
|
|
348
|
-
const richer = TABLE_CONFIGS
|
|
349
|
-
.map(({ tableName }) => ({
|
|
350
|
-
tableName,
|
|
351
|
-
existing: existingCounts[tableName],
|
|
352
|
-
candidate: candidateCounts[tableName],
|
|
353
|
-
}))
|
|
354
|
-
.filter(({ existing: existingCount, candidate }) => existingCount > candidate);
|
|
355
|
-
if (richer.length > 0) {
|
|
356
|
-
const differences = richer
|
|
357
|
-
.map(({ tableName, existing: existingCount, candidate }) => `${tableName} ${existingCount} -> ${candidate}`)
|
|
358
|
-
.join(', ');
|
|
359
|
-
throw new Error(`RVF_MIRROR_RICHER: refusing to replace richer mirrored tables: ${differences}. ` +
|
|
360
|
-
`Restore/import the mirror first, or repeat with --force-overwrite-richer after ` +
|
|
361
|
-
`preserving a backup.`);
|
|
362
|
-
}
|
|
348
|
+
assertNotPoorerThanMirror(TABLE_CONFIGS.map(({ tableName }) => tableName), existing.stats.tableCounts, manifest.stats.tableCounts, options.richnessPolicy);
|
|
363
349
|
}
|
|
364
350
|
}
|
|
365
351
|
// Promote tmp → final. The store itself goes last: until it lands, the
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Richness comparison between an existing RVF mirror and a new export
|
|
3
|
+
* (#629, ADR-128; #1251 for the checkpoint policy).
|
|
4
|
+
*
|
|
5
|
+
* - `strict` (default, manual `aqe brain export`): any mirrored table with
|
|
6
|
+
* fewer rows than the existing mirror refuses the export.
|
|
7
|
+
* - `checkpoint` (the Stop-hook checkpoint): routine retention trims rows
|
|
8
|
+
* between turns (routing outcomes, concept edges, q-values, trajectories),
|
|
9
|
+
* so only a collapse refuses: a table that lost more than its share in
|
|
10
|
+
* CHECKPOINT_MAX_LOSS (half by default), and either at least
|
|
11
|
+
* CHECKPOINT_MIN_LOST_ROWS rows or every row of a table that had at least
|
|
12
|
+
* CHECKPOINT_MIN_EMPTIED_ROWS. A database recreated from seed data loses
|
|
13
|
+
* that much; a retention pass does not. A table the existing mirror does
|
|
14
|
+
* not have (added in a later release) held no rows to lose.
|
|
15
|
+
*
|
|
16
|
+
* A deliberate shrink (`aqe learning prune --apply`, dream retention) records
|
|
17
|
+
* a CheckpointShrinkAck. The checkpoint honours it in place of the mirror
|
|
18
|
+
* comparison only while it is fresh and the export still holds the counts the
|
|
19
|
+
* shrink left, so it cannot approve a later, unrelated drop.
|
|
20
|
+
*/
|
|
21
|
+
import type Database from 'better-sqlite3';
|
|
22
|
+
export type RichnessPolicy = 'strict' | 'checkpoint';
|
|
23
|
+
export declare const RICHNESS_POLICIES: readonly RichnessPolicy[];
|
|
24
|
+
/** Smallest loss the checkpoint policy refuses, so retention can trim a small table. */
|
|
25
|
+
export declare const CHECKPOINT_MIN_LOST_ROWS = 10;
|
|
26
|
+
/** A table emptied from at least this many rows is refused even under the minimum loss. */
|
|
27
|
+
export declare const CHECKPOINT_MIN_EMPTIED_ROWS = 3;
|
|
28
|
+
/**
|
|
29
|
+
* Largest share of a table the checkpoint policy lets go. Learned patterns
|
|
30
|
+
* are deduplicated at most 10% at a time (SQLitePatternStore), and captured
|
|
31
|
+
* experiences are never deleted (v3.9.22), so they get the 10% bound.
|
|
32
|
+
*/
|
|
33
|
+
export declare const CHECKPOINT_MAX_LOSS: Readonly<Record<string, number>>;
|
|
34
|
+
/** Code-intelligence vectors are a regenerable cache, never exported (#1238). */
|
|
35
|
+
export declare const CODE_INDEX_VECTOR_ID_PREFIX = "code-intelligence:";
|
|
36
|
+
export type RvfMirrorGuardCode = 'RVF_MIRROR_RICHER' | 'RVF_MIRROR_INSPECTION_AMBIGUOUS';
|
|
37
|
+
/** Refusal to replace an existing mirror. The message starts with the code. */
|
|
38
|
+
export declare class RvfMirrorGuardError extends Error {
|
|
39
|
+
readonly code: RvfMirrorGuardCode;
|
|
40
|
+
constructor(code: RvfMirrorGuardCode, detail: string);
|
|
41
|
+
}
|
|
42
|
+
export declare function isRichnessPolicy(value: unknown): value is RichnessPolicy;
|
|
43
|
+
/**
|
|
44
|
+
* Throw when replacing a mirror with `existingCounts` by a candidate with
|
|
45
|
+
* `candidateCounts` would lose rows under `policy`. `existingCounts` is
|
|
46
|
+
* undefined when the mirror has no table inventory at all: that is ambiguous
|
|
47
|
+
* under every policy.
|
|
48
|
+
*/
|
|
49
|
+
export declare function assertNotPoorerThanMirror(tableNames: readonly string[], existingCounts: Readonly<Record<string, number>> | undefined, candidateCounts: Readonly<Record<string, number>>, policy?: RichnessPolicy): void;
|
|
50
|
+
/** Row counts of every mirrored table, counted the way the RVF export counts them. */
|
|
51
|
+
export declare function mirroredTableCounts(db: Database.Database): Record<string, number>;
|
|
52
|
+
export type ShrinkProducer = 'prune' | 'dream';
|
|
53
|
+
/** What a deliberate shrink records for the checkpoint hook. */
|
|
54
|
+
export interface CheckpointShrinkAck {
|
|
55
|
+
readonly at: string;
|
|
56
|
+
readonly producer: ShrinkProducer;
|
|
57
|
+
/** mirroredTableCounts() right after the shrink. */
|
|
58
|
+
readonly tableCounts: Readonly<Record<string, number>>;
|
|
59
|
+
}
|
|
60
|
+
/** An acknowledgement is honoured for this long after the shrink. */
|
|
61
|
+
export declare const SHRINK_ACK_MAX_AGE_MS: number;
|
|
62
|
+
export type ShrinkAckVerdict = {
|
|
63
|
+
readonly honoured: true;
|
|
64
|
+
readonly producer: ShrinkProducer;
|
|
65
|
+
} | {
|
|
66
|
+
readonly honoured: false;
|
|
67
|
+
readonly reason: string;
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* Whether the acknowledgement `raw` (parsed JSON, or anything else) still
|
|
71
|
+
* vouches for an export with `candidateCounts`: under 24h old, and no table
|
|
72
|
+
* collapsed since the shrink, under the checkpoint policy. Growth is fine.
|
|
73
|
+
*/
|
|
74
|
+
export declare function evaluateShrinkAck(raw: unknown, tableNames: readonly string[], candidateCounts: Readonly<Record<string, number>>, now?: number): ShrinkAckVerdict;
|
|
75
|
+
//# sourceMappingURL=brain-rvf-richness.d.ts.map
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Richness comparison between an existing RVF mirror and a new export
|
|
3
|
+
* (#629, ADR-128; #1251 for the checkpoint policy).
|
|
4
|
+
*
|
|
5
|
+
* - `strict` (default, manual `aqe brain export`): any mirrored table with
|
|
6
|
+
* fewer rows than the existing mirror refuses the export.
|
|
7
|
+
* - `checkpoint` (the Stop-hook checkpoint): routine retention trims rows
|
|
8
|
+
* between turns (routing outcomes, concept edges, q-values, trajectories),
|
|
9
|
+
* so only a collapse refuses: a table that lost more than its share in
|
|
10
|
+
* CHECKPOINT_MAX_LOSS (half by default), and either at least
|
|
11
|
+
* CHECKPOINT_MIN_LOST_ROWS rows or every row of a table that had at least
|
|
12
|
+
* CHECKPOINT_MIN_EMPTIED_ROWS. A database recreated from seed data loses
|
|
13
|
+
* that much; a retention pass does not. A table the existing mirror does
|
|
14
|
+
* not have (added in a later release) held no rows to lose.
|
|
15
|
+
*
|
|
16
|
+
* A deliberate shrink (`aqe learning prune --apply`, dream retention) records
|
|
17
|
+
* a CheckpointShrinkAck. The checkpoint honours it in place of the mirror
|
|
18
|
+
* comparison only while it is fresh and the export still holds the counts the
|
|
19
|
+
* shrink left, so it cannot approve a later, unrelated drop.
|
|
20
|
+
*/
|
|
21
|
+
import { TABLE_CONFIGS, countRows } from './brain-shared.js';
|
|
22
|
+
export const RICHNESS_POLICIES = ['strict', 'checkpoint'];
|
|
23
|
+
/** Smallest loss the checkpoint policy refuses, so retention can trim a small table. */
|
|
24
|
+
export const CHECKPOINT_MIN_LOST_ROWS = 10;
|
|
25
|
+
/** A table emptied from at least this many rows is refused even under the minimum loss. */
|
|
26
|
+
export const CHECKPOINT_MIN_EMPTIED_ROWS = 3;
|
|
27
|
+
/**
|
|
28
|
+
* Largest share of a table the checkpoint policy lets go. Learned patterns
|
|
29
|
+
* are deduplicated at most 10% at a time (SQLitePatternStore), and captured
|
|
30
|
+
* experiences are never deleted (v3.9.22), so they get the 10% bound.
|
|
31
|
+
*/
|
|
32
|
+
export const CHECKPOINT_MAX_LOSS = {
|
|
33
|
+
qe_patterns: 0.1,
|
|
34
|
+
captured_experiences: 0.1,
|
|
35
|
+
};
|
|
36
|
+
const CHECKPOINT_DEFAULT_MAX_LOSS = 0.5;
|
|
37
|
+
/** Code-intelligence vectors are a regenerable cache, never exported (#1238). */
|
|
38
|
+
export const CODE_INDEX_VECTOR_ID_PREFIX = 'code-intelligence:';
|
|
39
|
+
/** Refusal to replace an existing mirror. The message starts with the code. */
|
|
40
|
+
export class RvfMirrorGuardError extends Error {
|
|
41
|
+
code;
|
|
42
|
+
constructor(code, detail) {
|
|
43
|
+
super(`${code}: ${detail}`);
|
|
44
|
+
this.code = code;
|
|
45
|
+
this.name = 'RvfMirrorGuardError';
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
export function isRichnessPolicy(value) {
|
|
49
|
+
return typeof value === 'string' && RICHNESS_POLICIES.includes(value);
|
|
50
|
+
}
|
|
51
|
+
function isLoss(tableName, existing, candidate, policy) {
|
|
52
|
+
if (policy === 'strict')
|
|
53
|
+
return existing > candidate;
|
|
54
|
+
const lost = existing - candidate;
|
|
55
|
+
const maxLoss = CHECKPOINT_MAX_LOSS[tableName] ?? CHECKPOINT_DEFAULT_MAX_LOSS;
|
|
56
|
+
const emptied = candidate === 0 && existing >= CHECKPOINT_MIN_EMPTIED_ROWS;
|
|
57
|
+
return lost > existing * maxLoss && (lost >= CHECKPOINT_MIN_LOST_ROWS || emptied);
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Throw when replacing a mirror with `existingCounts` by a candidate with
|
|
61
|
+
* `candidateCounts` would lose rows under `policy`. `existingCounts` is
|
|
62
|
+
* undefined when the mirror has no table inventory at all: that is ambiguous
|
|
63
|
+
* under every policy.
|
|
64
|
+
*/
|
|
65
|
+
export function assertNotPoorerThanMirror(tableNames, existingCounts, candidateCounts, policy = 'strict') {
|
|
66
|
+
const missing = tableNames.filter((tableName) => !existingCounts || !Number.isSafeInteger(existingCounts[tableName]));
|
|
67
|
+
if (!existingCounts || (policy === 'strict' && missing.length > 0)) {
|
|
68
|
+
throw new RvfMirrorGuardError('RVF_MIRROR_INSPECTION_AMBIGUOUS', `existing mirror lacks trustworthy counts for ${missing.join(', ')}. Preserve/import it ` +
|
|
69
|
+
`before retrying, or repeat with --force-overwrite-richer after preserving a backup.`);
|
|
70
|
+
}
|
|
71
|
+
const richer = tableNames
|
|
72
|
+
.map((tableName) => ({
|
|
73
|
+
tableName,
|
|
74
|
+
existing: Number.isSafeInteger(existingCounts[tableName]) ? existingCounts[tableName] : 0,
|
|
75
|
+
candidate: candidateCounts[tableName] ?? 0,
|
|
76
|
+
}))
|
|
77
|
+
.filter(({ tableName, existing, candidate }) => isLoss(tableName, existing, candidate, policy));
|
|
78
|
+
if (richer.length > 0) {
|
|
79
|
+
const differences = richer
|
|
80
|
+
.map(({ tableName, existing, candidate }) => `${tableName} ${existing} -> ${candidate}`)
|
|
81
|
+
.join(', ');
|
|
82
|
+
throw new RvfMirrorGuardError('RVF_MIRROR_RICHER', `refusing to replace richer mirrored tables: ${differences}. Restore/import the mirror ` +
|
|
83
|
+
`first, or repeat with --force-overwrite-richer after preserving a backup.`);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
/** Row counts of every mirrored table, counted the way the RVF export counts them. */
|
|
87
|
+
export function mirroredTableCounts(db) {
|
|
88
|
+
const counts = {};
|
|
89
|
+
for (const { tableName } of TABLE_CONFIGS) {
|
|
90
|
+
counts[tableName] = tableName === 'vectors'
|
|
91
|
+
? countRows(db, 'vectors', `(id IS NULL OR substr(id, 1, ?) != ?)`, [CODE_INDEX_VECTOR_ID_PREFIX.length, CODE_INDEX_VECTOR_ID_PREFIX])
|
|
92
|
+
: countRows(db, tableName);
|
|
93
|
+
}
|
|
94
|
+
return counts;
|
|
95
|
+
}
|
|
96
|
+
/** An acknowledgement is honoured for this long after the shrink. */
|
|
97
|
+
export const SHRINK_ACK_MAX_AGE_MS = 24 * 3600_000;
|
|
98
|
+
/** Clock skew tolerated for an acknowledgement dated in the future. */
|
|
99
|
+
const SHRINK_ACK_MAX_SKEW_MS = 5 * 60_000;
|
|
100
|
+
/**
|
|
101
|
+
* Whether the acknowledgement `raw` (parsed JSON, or anything else) still
|
|
102
|
+
* vouches for an export with `candidateCounts`: under 24h old, and no table
|
|
103
|
+
* collapsed since the shrink, under the checkpoint policy. Growth is fine.
|
|
104
|
+
*/
|
|
105
|
+
export function evaluateShrinkAck(raw, tableNames, candidateCounts, now = Date.now()) {
|
|
106
|
+
const ack = raw;
|
|
107
|
+
if (!ack || typeof ack !== 'object' || (ack.producer !== 'prune' && ack.producer !== 'dream')
|
|
108
|
+
|| !ack.tableCounts || typeof ack.tableCounts !== 'object') {
|
|
109
|
+
return { honoured: false, reason: 'malformed acknowledgement' };
|
|
110
|
+
}
|
|
111
|
+
const at = Date.parse(String(ack.at));
|
|
112
|
+
if (!Number.isFinite(at) || at > now + SHRINK_ACK_MAX_SKEW_MS) {
|
|
113
|
+
return { honoured: false, reason: `invalid time ${String(ack.at)}` };
|
|
114
|
+
}
|
|
115
|
+
if (now - at > SHRINK_ACK_MAX_AGE_MS) {
|
|
116
|
+
return { honoured: false, reason: `older than 24h (${ack.producer} at ${ack.at})` };
|
|
117
|
+
}
|
|
118
|
+
try {
|
|
119
|
+
assertNotPoorerThanMirror(tableNames, ack.tableCounts, candidateCounts, 'checkpoint');
|
|
120
|
+
}
|
|
121
|
+
catch (error) {
|
|
122
|
+
const detail = error instanceof Error ? error.message.replace(/^RVF_MIRROR_[A-Z_]+: /, '') : String(error);
|
|
123
|
+
return { honoured: false, reason: `the brain shrank again since the ${ack.producer}: ${detail.split('.')[0]}` };
|
|
124
|
+
}
|
|
125
|
+
return { honoured: true, producer: ack.producer };
|
|
126
|
+
}
|
|
127
|
+
//# sourceMappingURL=brain-rvf-richness.js.map
|
|
@@ -70,8 +70,8 @@ export async function migrateToUnifiedMemory(options) {
|
|
|
70
70
|
if (!fs.existsSync(opts.baseDir)) {
|
|
71
71
|
fs.mkdirSync(opts.baseDir, { recursive: true });
|
|
72
72
|
}
|
|
73
|
+
// #1164: openDatabase() set the journal mode (retrying contention, honouring AQE_DISABLE_WAL).
|
|
73
74
|
targetDb = openDatabase(memoryDbPath);
|
|
74
|
-
targetDb.pragma('journal_mode = WAL');
|
|
75
75
|
}
|
|
76
76
|
// Get list of tables to migrate
|
|
77
77
|
const tablesToMigrate = [
|
|
@@ -82,6 +82,8 @@ export declare class UnifiedMemoryManager {
|
|
|
82
82
|
private constructor();
|
|
83
83
|
static getInstance(config?: Partial<UnifiedMemoryConfig>): UnifiedMemoryManager;
|
|
84
84
|
static getInstanceAsync(config?: Partial<UnifiedMemoryConfig>): Promise<UnifiedMemoryManager>;
|
|
85
|
+
/** The shared instance when it is initialized; never creates one. */
|
|
86
|
+
static peekInitialized(): UnifiedMemoryManager | null;
|
|
85
87
|
static resetInstance(): void;
|
|
86
88
|
initialize(options?: {
|
|
87
89
|
signal?: AbortSignal;
|
|
@@ -227,6 +229,12 @@ export declare class UnifiedMemoryManager {
|
|
|
227
229
|
}
|
|
228
230
|
export declare function getUnifiedMemory(config?: Partial<UnifiedMemoryConfig>): UnifiedMemoryManager;
|
|
229
231
|
export declare function initializeUnifiedMemory(config?: Partial<UnifiedMemoryConfig>): Promise<UnifiedMemoryManager>;
|
|
232
|
+
/**
|
|
233
|
+
* The shared memory.db connection when UnifiedMemory is already initialized,
|
|
234
|
+
* else null. Never opens it: callers that run before it keep their
|
|
235
|
+
* no-database behavior (#1298).
|
|
236
|
+
*/
|
|
237
|
+
export declare function getOpenUnifiedMemoryDatabase(): DatabaseType | null;
|
|
230
238
|
export declare function resetUnifiedMemory(): void;
|
|
231
239
|
/**
|
|
232
240
|
* Run a write on `db` through the shared manager's writeWhenUnlocked queue
|
|
@@ -174,6 +174,11 @@ export class UnifiedMemoryManager {
|
|
|
174
174
|
}
|
|
175
175
|
return UnifiedMemoryManager.instancePromise;
|
|
176
176
|
}
|
|
177
|
+
/** The shared instance when it is initialized; never creates one. */
|
|
178
|
+
static peekInitialized() {
|
|
179
|
+
const instance = UnifiedMemoryManager.instance;
|
|
180
|
+
return instance?.initialized ? instance : null;
|
|
181
|
+
}
|
|
177
182
|
static resetInstance() {
|
|
178
183
|
if (UnifiedMemoryManager.instance) {
|
|
179
184
|
UnifiedMemoryManager.instance.close();
|
|
@@ -1118,6 +1123,14 @@ export async function initializeUnifiedMemory(config) {
|
|
|
1118
1123
|
await manager.initialize();
|
|
1119
1124
|
return manager;
|
|
1120
1125
|
}
|
|
1126
|
+
/**
|
|
1127
|
+
* The shared memory.db connection when UnifiedMemory is already initialized,
|
|
1128
|
+
* else null. Never opens it: callers that run before it keep their
|
|
1129
|
+
* no-database behavior (#1298).
|
|
1130
|
+
*/
|
|
1131
|
+
export function getOpenUnifiedMemoryDatabase() {
|
|
1132
|
+
return UnifiedMemoryManager.peekInitialized()?.getDatabase() ?? null;
|
|
1133
|
+
}
|
|
1121
1134
|
export function resetUnifiedMemory() {
|
|
1122
1135
|
UnifiedMemoryManager.resetInstance();
|
|
1123
1136
|
}
|