agentic-qe 3.14.5 → 3.14.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/skills/skills-manifest.json +1 -1
- package/CHANGELOG.md +150 -0
- package/assets/skills/skills-manifest.json +1 -1
- package/dist/adapters/ag-ui/event-types.d.ts +1 -1
- package/dist/audit/witness-chain-hash.d.ts +18 -0
- package/dist/audit/witness-chain-hash.js +37 -0
- package/dist/audit/witness-chain-repair.d.ts +71 -0
- package/dist/audit/witness-chain-repair.js +203 -0
- package/dist/audit/witness-chain-verifier.d.ts +152 -0
- package/dist/audit/witness-chain-verifier.js +293 -0
- package/dist/audit/witness-chain.d.ts +10 -43
- package/dist/audit/witness-chain.js +16 -106
- package/dist/audit/witness-findings.js +4 -1
- package/dist/cli/bundle.js +8 -8
- package/dist/cli/chunks/adapter-TVQKH65T.js +2 -0
- package/dist/cli/chunks/agent-booster-wasm-AK2W76RG.js +2 -0
- package/dist/cli/chunks/{agent-handler-V6CZ7Q6S.js → agent-handler-MGZCWHIY.js} +2 -2
- package/dist/cli/chunks/{agent-memory-branch-ZMD6ULC3.js → agent-memory-branch-JZ54MCSP.js} +2 -2
- package/dist/cli/chunks/aqe-learning-engine-ULGTVVWE.js +2 -0
- package/dist/cli/chunks/{arena-QLSBESC7.js → arena-CUVH3V7H.js} +2 -2
- package/dist/cli/chunks/{arena-4UPAEHFT.js → arena-YSWTKBCL.js} +4 -4
- package/dist/cli/chunks/audit-LVU76QGA.js +4 -0
- package/dist/cli/chunks/base-W42BURDL.js +2 -0
- package/dist/cli/chunks/{better-sqlite3-4DSBPDRH.js → better-sqlite3-DB3LOJQU.js} +2 -2
- package/dist/cli/chunks/{brain-handler-GBY4EZ4P.js → brain-handler-SD63KOQ6.js} +3 -3
- package/dist/cli/chunks/{branch-enumerator-XYBVXCNO.js → branch-enumerator-4MNOPUC7.js} +2 -2
- package/dist/cli/chunks/{browser-32F6MREU.js → browser-OLPNTWQE.js} +2 -2
- package/dist/cli/chunks/browser-workflow-HKGHFFFT.js +2 -0
- package/dist/cli/chunks/{chunk-WLXK2KNU.js → chunk-23CX7JNL.js} +2 -2
- package/dist/cli/chunks/{chunk-O3JTQ7N4.js → chunk-25P6JA6V.js} +1 -1
- package/dist/cli/chunks/{chunk-DO6EI5KB.js → chunk-2G63VIJE.js} +1 -1
- package/dist/cli/chunks/{chunk-G3L5L6YQ.js → chunk-2IMSJ7IO.js} +1 -1
- package/dist/cli/chunks/{chunk-RD6TEZ64.js → chunk-36VKMAMN.js} +2 -2
- package/dist/cli/chunks/{chunk-KIP6WZGV.js → chunk-3M7J4U74.js} +3 -3
- package/dist/cli/chunks/chunk-3QJU4Q4R.js +5 -0
- package/dist/cli/chunks/{chunk-2JGEZHWY.js → chunk-4EKV7PHB.js} +2 -2
- package/dist/cli/chunks/chunk-4INST4ZL.js +4 -0
- package/dist/cli/chunks/{chunk-DPBRWP4J.js → chunk-53BXTTRO.js} +3 -3
- package/dist/cli/chunks/chunk-5D7ZFWDS.js +2 -0
- package/dist/cli/chunks/{chunk-XLAUGSW7.js → chunk-5FSLMYAC.js} +2 -2
- package/dist/cli/chunks/chunk-5GFKTJ65.js +4 -0
- package/dist/cli/chunks/{chunk-WOIGKU2N.js → chunk-5U6N4V5M.js} +11 -11
- package/dist/cli/chunks/{chunk-PSPKSUF6.js → chunk-6EGS77BB.js} +1 -1
- package/dist/cli/chunks/{chunk-QIRL6B3C.js → chunk-6PJPQGF4.js} +2 -2
- package/dist/cli/chunks/{chunk-I6X3EGJI.js → chunk-6RD44SCE.js} +1 -1
- package/dist/cli/chunks/{chunk-IGBEJ4UJ.js → chunk-74IOEOMH.js} +2 -2
- package/dist/cli/chunks/{chunk-E3W6XQ57.js → chunk-77QZHIVX.js} +2 -2
- package/dist/cli/chunks/{chunk-R74ZKREV.js → chunk-7EZ2Z2CK.js} +1 -1
- package/dist/cli/chunks/{chunk-UTBYJ4RF.js → chunk-7MIOK72I.js} +18 -35
- package/dist/cli/chunks/{chunk-URVHZPWY.js → chunk-7QYOTUOX.js} +2 -2
- package/dist/cli/chunks/{chunk-K27SU3RE.js → chunk-A2VUCUTT.js} +2 -2
- package/dist/cli/chunks/{chunk-2KJQ2UQE.js → chunk-A3DK3XNZ.js} +1 -1
- package/dist/cli/chunks/{chunk-5D36YHS3.js → chunk-A5MA7A23.js} +4 -4
- package/dist/cli/chunks/{chunk-WJHWH5D2.js → chunk-AEUEMVJK.js} +2 -2
- package/dist/cli/chunks/{chunk-6CR4VQBQ.js → chunk-AJUBT4NP.js} +2 -2
- package/dist/cli/chunks/chunk-B2YGVSOP.js +27 -0
- package/dist/cli/chunks/{chunk-D6OUCB2H.js → chunk-B4I43GE2.js} +2 -2
- package/dist/cli/chunks/{chunk-WK7B4B6Y.js → chunk-BD7FEUN3.js} +2 -2
- package/dist/cli/chunks/{chunk-OEIQTWQP.js → chunk-BE4KALTE.js} +1 -1
- package/dist/cli/chunks/{chunk-JROVR6YS.js → chunk-BEFTQVEW.js} +2 -2
- package/dist/cli/chunks/{chunk-HBCGYMQU.js → chunk-BLG7SH4A.js} +1 -1
- package/dist/cli/chunks/{chunk-2OMLTYQK.js → chunk-C3FXFU2T.js} +1 -1
- package/dist/cli/chunks/{chunk-6A44AOGN.js → chunk-CBONQM5D.js} +2 -2
- package/dist/cli/chunks/{chunk-73EI4C2E.js → chunk-CQNMGK6Y.js} +2 -2
- package/dist/cli/chunks/{chunk-IIAR5S7Q.js → chunk-CVOQ6ESD.js} +2 -2
- package/dist/cli/chunks/{chunk-6TU7FEMD.js → chunk-DOBKEXMJ.js} +1 -1
- package/dist/cli/chunks/{chunk-BHFR2EXL.js → chunk-DYTQHRUS.js} +1 -1
- package/dist/cli/chunks/{chunk-E4AZXCT5.js → chunk-EADSQN5T.js} +1 -1
- package/dist/cli/chunks/{chunk-CYE2TJFV.js → chunk-EGOIIUBD.js} +2 -2
- package/dist/cli/chunks/{chunk-DKUBQQFG.js → chunk-EIGRV3J6.js} +2 -2
- package/dist/cli/chunks/{chunk-RP2ZKPYV.js → chunk-EJ6MMYLK.js} +1 -1
- package/dist/cli/chunks/{chunk-HSVKZ5KI.js → chunk-ENK44A6Q.js} +2 -2
- package/dist/cli/chunks/{chunk-67YV75XP.js → chunk-EYXE2XKP.js} +2 -2
- package/dist/cli/chunks/{chunk-HYEJJJY3.js → chunk-F2OPFVQH.js} +1 -1
- package/dist/cli/chunks/{chunk-XUR2M2WB.js → chunk-FBZC4IGB.js} +2 -2
- package/dist/cli/chunks/{chunk-BXVAVFGU.js → chunk-FSSR6WBE.js} +2 -2
- package/dist/cli/chunks/{chunk-W2XCZU62.js → chunk-FW4DJ4FJ.js} +1 -1
- package/dist/cli/chunks/{chunk-KKHYJF5U.js → chunk-FYPX5WBJ.js} +1 -1
- package/dist/cli/chunks/{chunk-K7NJHFLZ.js → chunk-G367W7XR.js} +3 -3
- package/dist/cli/chunks/{chunk-IUDWEOLX.js → chunk-GLGKQX2V.js} +2 -2
- package/dist/cli/chunks/{chunk-JVQBWYHW.js → chunk-GV4DYPJP.js} +2 -2
- package/dist/cli/chunks/{chunk-GTKCGPJZ.js → chunk-GVVFTFMB.js} +2 -2
- package/dist/cli/chunks/{chunk-AFEDJ3RU.js → chunk-H5RQPO3X.js} +2 -2
- package/dist/cli/chunks/{chunk-4FWTLJEP.js → chunk-HPWWYT67.js} +2 -2
- package/dist/cli/chunks/{chunk-G3W6BMVJ.js → chunk-HXXHMLJ5.js} +1 -1
- package/dist/cli/chunks/{chunk-NU7UTXMP.js → chunk-HYFQUWNB.js} +2 -2
- package/dist/cli/chunks/chunk-HYOPJHHW.js +2 -0
- package/dist/cli/chunks/{chunk-6LKDHEBY.js → chunk-HZY42OVU.js} +2 -2
- package/dist/cli/chunks/{chunk-C3HQL6S4.js → chunk-IAENZ2DR.js} +2 -2
- package/dist/cli/chunks/{chunk-M23ZOZVY.js → chunk-IEJ7ZV3M.js} +1 -1
- package/dist/cli/chunks/{chunk-RIZVC4XY.js → chunk-IWFFO6VT.js} +2 -2
- package/dist/cli/chunks/chunk-J7AQZLIH.js +21 -0
- package/dist/cli/chunks/{chunk-3KDL6QDK.js → chunk-JHJUSSAU.js} +2 -2
- package/dist/cli/chunks/{chunk-DLF5BOJD.js → chunk-JOZ47MV6.js} +1 -1
- package/dist/cli/chunks/{chunk-ELBZON4V.js → chunk-JZT7BU44.js} +2 -2
- package/dist/cli/chunks/{chunk-3DDXWYMO.js → chunk-KD2BLA5Y.js} +1 -1
- package/dist/cli/chunks/{chunk-VD5IO5EO.js → chunk-KUHLTVWC.js} +1 -1
- package/dist/cli/chunks/{chunk-YDFL445W.js → chunk-LU2EDWQK.js} +2 -2
- package/dist/cli/chunks/chunk-LXZMP3VX.js +736 -0
- package/dist/cli/chunks/{chunk-3YUB5HER.js → chunk-LY7MFGBD.js} +196 -187
- package/dist/cli/chunks/chunk-MM56VPNE.js +180 -0
- package/dist/cli/chunks/{chunk-37TUN44F.js → chunk-MNQN7UZX.js} +2 -2
- package/dist/cli/chunks/{chunk-7DETTOPZ.js → chunk-MQZ53OR3.js} +2 -2
- package/dist/cli/chunks/{chunk-BYG36QC5.js → chunk-MT7UNBZ7.js} +2 -2
- package/dist/cli/chunks/{chunk-JES6R5KP.js → chunk-MZB2UV2O.js} +1 -1
- package/dist/cli/chunks/{chunk-QZMUXJHZ.js → chunk-MZMG6CUJ.js} +2 -2
- package/dist/cli/chunks/chunk-N5XOXPHZ.js +4 -0
- package/dist/cli/chunks/{chunk-RD2VGOUH.js → chunk-NBLDBVAW.js} +1 -1
- package/dist/cli/chunks/{chunk-HVU64GP5.js → chunk-ND4QTZOL.js} +2 -2
- package/dist/cli/chunks/{chunk-SQF6HRXR.js → chunk-NHUGHAY6.js} +1 -1
- package/dist/cli/chunks/{chunk-TUSSPKRM.js → chunk-NOHWJOBS.js} +1 -1
- package/dist/cli/chunks/{chunk-NVYBM3R4.js → chunk-O5V7RHVG.js} +2 -2
- package/dist/cli/chunks/{chunk-6VAZAHQG.js → chunk-O6MO5KMR.js} +2 -2
- package/dist/cli/chunks/{chunk-IUHB5GVS.js → chunk-OAZX6WFU.js} +2 -2
- package/dist/cli/chunks/{chunk-LSUILON7.js → chunk-OEPNNLR4.js} +1 -1
- package/dist/cli/chunks/{chunk-IJHCIXJC.js → chunk-OIDWDGLG.js} +2 -2
- package/dist/cli/chunks/{chunk-CPC7FN52.js → chunk-ON2UTP2U.js} +2 -2
- package/dist/cli/chunks/{chunk-UJWAWIRV.js → chunk-ONR2NXXD.js} +7 -7
- package/dist/cli/chunks/{chunk-7VFY7TUR.js → chunk-OXHF3L2T.js} +2 -2
- package/dist/cli/chunks/{chunk-QYOGD2VW.js → chunk-OZGIOKEA.js} +1 -1
- package/dist/cli/chunks/{chunk-WJTSY5MC.js → chunk-P2UPYSDJ.js} +1 -1
- package/dist/cli/chunks/{chunk-52L77RMG.js → chunk-P7XSPP5D.js} +2 -2
- package/dist/cli/chunks/{chunk-M5AEL7IS.js → chunk-PCJQCEBA.js} +2 -2
- package/dist/cli/chunks/chunk-PELENDDQ.js +2 -0
- package/dist/cli/chunks/{chunk-C3Z4VVHP.js → chunk-PYKY22GC.js} +5 -5
- package/dist/cli/chunks/{chunk-AF4XKLXO.js → chunk-Q3NSU24F.js} +2 -2
- package/dist/cli/chunks/chunk-Q6NTEICT.js +2 -0
- package/dist/cli/chunks/chunk-QFETNCNN.js +12 -0
- package/dist/cli/chunks/{chunk-KYA5LARK.js → chunk-QGOWNVVG.js} +1 -1
- package/dist/cli/chunks/{chunk-Y5L3ES4L.js → chunk-QPLSYEWJ.js} +2 -2
- package/dist/cli/chunks/{chunk-F34OAHOM.js → chunk-QQFQDEUE.js} +2 -2
- package/dist/cli/chunks/{chunk-EFV4ADMO.js → chunk-QUORH2MG.js} +55 -79
- package/dist/cli/chunks/{chunk-QWUXCG2L.js → chunk-QVH5Y7AP.js} +1 -1
- package/dist/cli/chunks/{chunk-I2NENQ44.js → chunk-RC2A4JZ5.js} +2 -2
- package/dist/cli/chunks/{chunk-XZSMZHM2.js → chunk-RDGPXENG.js} +2 -2
- package/dist/cli/chunks/{chunk-N7H767TP.js → chunk-RKI3IQKQ.js} +2 -2
- package/dist/cli/chunks/{chunk-LULD4JV2.js → chunk-RKUAWQOF.js} +2 -2
- package/dist/cli/chunks/chunk-RLW25X66.js +2 -0
- package/dist/cli/chunks/{chunk-UKGXWW64.js → chunk-ROVZSZCS.js} +3 -3
- package/dist/cli/chunks/{chunk-EOR2UT72.js → chunk-RT6O2HW2.js} +2 -2
- package/dist/cli/chunks/{chunk-75QJ5HWE.js → chunk-SM2YJ2AL.js} +2 -2
- package/dist/cli/chunks/{chunk-KO4FNAUR.js → chunk-SRPLERER.js} +3 -3
- package/dist/cli/chunks/{chunk-NRE4NAVA.js → chunk-T77GZF4B.js} +1 -1
- package/dist/cli/chunks/{chunk-R6IU3EWP.js → chunk-TFK2AYIN.js} +2 -2
- package/dist/cli/chunks/chunk-TW3SR4TS.js +2 -0
- package/dist/cli/chunks/{chunk-IYTLXUBO.js → chunk-TXSPBLBT.js} +2 -2
- package/dist/cli/chunks/chunk-UA7TDVL7.js +12 -0
- package/dist/cli/chunks/{chunk-WX6RRIGW.js → chunk-UBJG3IHT.js} +2 -2
- package/dist/cli/chunks/{chunk-NQI7FWCS.js → chunk-UFSVUBTR.js} +2 -2
- package/dist/cli/chunks/{chunk-FUNGTIF2.js → chunk-UOI6ULCH.js} +2 -2
- package/dist/cli/chunks/{chunk-HVXJC3OC.js → chunk-UYUJT6QO.js} +2 -2
- package/dist/cli/chunks/{chunk-KEY43ANX.js → chunk-V5AK56DA.js} +2 -2
- package/dist/cli/chunks/{chunk-XFPPERA2.js → chunk-V6RE4YRQ.js} +2 -2
- package/dist/cli/chunks/{chunk-DDCIYOGT.js → chunk-VW6FRMLW.js} +2 -2
- package/dist/cli/chunks/chunk-VXKWNRGA.js +2 -0
- package/dist/cli/chunks/{chunk-CVMNJSCB.js → chunk-VYDVI6FZ.js} +2 -2
- package/dist/cli/chunks/{chunk-7JZJJA7U.js → chunk-WF6UISKW.js} +3 -3
- package/dist/cli/chunks/{chunk-SQKW3B6B.js → chunk-WIH522AP.js} +1 -1
- package/dist/cli/chunks/{chunk-KLTP5IDB.js → chunk-WOV6XI3A.js} +1 -1
- package/dist/cli/chunks/{chunk-VTOVWHEM.js → chunk-X7ADKL7T.js} +2 -2
- package/dist/cli/chunks/{chunk-SX4JLSLV.js → chunk-XBYQ2BS4.js} +2 -2
- package/dist/cli/chunks/{chunk-E4EYPYR3.js → chunk-XL5KIYE3.js} +2 -2
- package/dist/cli/chunks/{chunk-3VIXOHMS.js → chunk-XWYELBZS.js} +1 -1
- package/dist/cli/chunks/{chunk-YQGPQBCX.js → chunk-XYLQZWF6.js} +2 -2
- package/dist/cli/chunks/{chunk-XEZIIQYJ.js → chunk-Y6AKKQIQ.js} +1 -1
- package/dist/cli/chunks/{chunk-BJPL6THQ.js → chunk-YMW57PEL.js} +1 -1
- package/dist/cli/chunks/{chunk-JSZ663MU.js → chunk-YO4ESCB4.js} +1 -1
- package/dist/cli/chunks/{chunk-AMMQOV35.js → chunk-YRHTQZU4.js} +2 -2
- package/dist/cli/chunks/chunk-Z4Q5PCRZ.js +65 -0
- package/dist/cli/chunks/{chunk-RKOUXVZZ.js → chunk-ZELWDJXT.js} +2 -2
- package/dist/cli/chunks/{chunk-QRCIZFNK.js → chunk-ZQZD55MN.js} +2 -2
- package/dist/cli/chunks/{chunk-UMGFMKDW.js → chunk-ZS4XVJGV.js} +2 -2
- package/dist/cli/chunks/{chunk-6ITZZIQX.js → chunk-ZUB5YOCM.js} +2 -2
- package/dist/cli/chunks/chunk-ZUOVNFXK.js +2 -0
- package/dist/cli/chunks/{chunk-RGGK6VZ7.js → chunk-ZWEKAEEV.js} +1 -1
- package/dist/cli/chunks/{ci-RACDAJMR.js → ci-J3TDK5RA.js} +8 -8
- package/dist/cli/chunks/{ci-output-EHRSZBKG.js → ci-output-RLS32FUY.js} +2 -2
- package/dist/cli/chunks/{circuit-breaker-GBV7M5XG.js → circuit-breaker-MRCC7WCM.js} +2 -2
- package/dist/cli/chunks/claude-flow-setup-LIZCEKDF.js +2 -0
- package/dist/cli/chunks/client-3BD2DI4N.js +2 -0
- package/dist/cli/chunks/{cline-installer-W4NMXJSG.js → cline-installer-T7H6R2RC.js} +2 -2
- package/dist/cli/chunks/{code-JWXJMYXB.js → code-XMBLI7OF.js} +3 -3
- package/dist/cli/chunks/{code-index-extractor-RVI2IFTM.js → code-index-extractor-QS7BYLEX.js} +2 -2
- package/dist/cli/chunks/{codex-installer-3BORJINH.js → codex-installer-6PGT5FM6.js} +6 -6
- package/dist/cli/chunks/{completions-A55NCTAO.js → completions-2A3WRXY2.js} +2 -2
- package/dist/cli/chunks/{complexity-analyzer-JCXHGGLY.js → complexity-analyzer-23HOOGJ7.js} +2 -2
- package/dist/cli/chunks/{continuedev-installer-PUVFMGYW.js → continuedev-installer-4FSF7B3N.js} +2 -2
- package/dist/cli/chunks/{copilot-installer-4DCMYWHB.js → copilot-installer-A5GRQQUU.js} +2 -2
- package/dist/cli/chunks/core-handlers-C3H2ZCS2.js +2 -0
- package/dist/cli/chunks/{cost-tracker-5TV2GGKY.js → cost-tracker-Z4STQ5VB.js} +2 -2
- package/dist/cli/chunks/{coverage-NNWM7TX3.js → coverage-NUPP6KZZ.js} +3 -3
- package/dist/cli/chunks/cross-domain-router-JCQ7SWDP.js +2 -0
- package/dist/cli/chunks/{cursor-installer-4NCHGJGK.js → cursor-installer-FVJ7ROPJ.js} +2 -2
- package/dist/cli/chunks/{daemon-QIKCXKWO.js → daemon-7ZZA2MMN.js} +4 -4
- package/dist/cli/chunks/{daemon-T4JO4IXP.js → daemon-D662EX5N.js} +3 -3
- package/dist/cli/chunks/{dag-attention-scheduler-RPAAIDAD.js → dag-attention-scheduler-IB4TQ2KA.js} +2 -2
- package/dist/cli/chunks/{detect-SBEEVDSN.js → detect-LGLBZN4I.js} +2 -2
- package/dist/cli/chunks/{dist-node-ZHI6NCSU.js → dist-node-Z3OL42YE.js} +2 -2
- package/dist/cli/chunks/{domain-handler-LBC3GJ7Z.js → domain-handler-L3CLNL7U.js} +2 -2
- package/dist/cli/chunks/{domain-plugins-H6IZ5USZ.js → domain-plugins-GQ3V5X6L.js} +2 -2
- package/dist/cli/chunks/domain-transfer-MFCI76IY.js +2 -0
- package/dist/cli/chunks/dream-FTP33IJB.js +2 -0
- package/dist/cli/chunks/{embed-and-insert-pattern-AHTR7CRU.js → embed-and-insert-pattern-UGD6USYH.js} +2 -2
- package/dist/cli/chunks/{eval-DZU2KISM.js → eval-3B7UIYGY.js} +2 -2
- package/dist/cli/chunks/{experience-capture-middleware-5IQCWKSL.js → experience-capture-middleware-3RQ4NYY3.js} +3 -3
- package/dist/cli/chunks/{fast-paths-2KLDUWCY.js → fast-paths-QOSAEPYD.js} +2 -2
- package/dist/cli/chunks/{feature-flags-7AC3XDZA.js → feature-flags-3S5TH6P4.js} +2 -2
- package/dist/cli/chunks/{feature-flags-N6UAEZY4.js → feature-flags-TLF4NKOH.js} +2 -2
- package/dist/cli/chunks/{file-discovery-5SDIW4V2.js → file-discovery-AEVMJRNB.js} +2 -2
- package/dist/cli/chunks/{fleet-ZIQCAZ2Y.js → fleet-E6WTXWFL.js} +3 -3
- package/dist/cli/chunks/{gnn-wrapper-DUMBZJEV.js → gnn-wrapper-MCKH3AUU.js} +2 -2
- package/dist/cli/chunks/{heartbeat-handler-6HVM6ZMR.js → heartbeat-handler-U7XENHRR.js} +4 -4
- package/dist/cli/chunks/heartbeat-scheduler-HXBJVJL2.js +2 -0
- package/dist/cli/chunks/hnsw-adapter-TU6WG2ME.js +2 -0
- package/dist/cli/chunks/hnsw-index-MS5KODD7.js +2 -0
- package/dist/cli/chunks/{hnsw-legacy-bridge-5DRL5FLX.js → hnsw-legacy-bridge-5GW4SAEI.js} +2 -2
- package/dist/cli/chunks/{hnswlib-node-GW67GTCL.js → hnswlib-node-7BLZBK5T.js} +2 -2
- package/dist/cli/chunks/{hooks-QHH6FVO4.js → hooks-F3O2SB6H.js} +10 -10
- package/dist/cli/chunks/hybrid-backend-HT45LBHC.js +2 -0
- package/dist/cli/chunks/{hypergraph-engine-7XDCCVG2.js → hypergraph-engine-PV4EKXHB.js} +2 -2
- package/dist/cli/chunks/{hypergraph-handler-QHF7NOU5.js → hypergraph-handler-VOWO5ZTW.js} +3 -3
- package/dist/cli/chunks/impact-analyzer-AP4AGTG5.js +2 -0
- package/dist/cli/chunks/{init-handler-5UIVOM7K.js → init-handler-ENJ5ONJX.js} +16 -14
- package/dist/cli/chunks/init-wizard-I5DFZUQL.js +2 -0
- package/dist/cli/chunks/kernel-MISPSPPA.js +2 -0
- package/dist/cli/chunks/{kilocode-installer-TGGV6K5Q.js → kilocode-installer-HNNJOOPE.js} +2 -2
- package/dist/cli/chunks/{kiro-installer-4XYBHZWW.js → kiro-installer-UZBIQ3IC.js} +2 -2
- package/dist/cli/chunks/knowledge-graph-L26JESGE.js +2 -0
- package/dist/cli/chunks/{learning-STE5W6BS.js → learning-YMLCVFUT.js} +3 -3
- package/dist/cli/chunks/{llm-router-NKF7J3RI.js → llm-router-YWTARCCT.js} +4 -4
- package/dist/cli/chunks/llm-router-service-MWGC43ZA.js +2 -0
- package/dist/cli/chunks/{load-B2T77UJQ.js → load-DKE3F3IP.js} +2 -2
- package/dist/cli/chunks/load-test-H5ISNNM5.js +2 -0
- package/dist/cli/chunks/mcp-5PSGIUCW.js +2 -0
- package/dist/cli/chunks/{memory-WRFZKG56.js → memory-3L3O6JMM.js} +5 -5
- package/dist/cli/chunks/memory-backend-HWDNOBKW.js +2 -0
- package/dist/cli/chunks/memory-handlers-ZFDVQZM5.js +2 -0
- package/dist/cli/chunks/multi-model-executor-AEEO7IA4.js +14 -0
- package/dist/cli/chunks/{opencode-installer-J36EMQU7.js → opencode-installer-ABBO355U.js} +2 -2
- package/dist/cli/chunks/orchestrator-E36Q7MKE.js +393 -0
- package/dist/cli/chunks/pattern-null-store-GQP6ICWK.js +2 -0
- package/dist/cli/chunks/{pattern-usage-recorder-BVMTWI3E.js → pattern-usage-recorder-H4XKSID4.js} +2 -2
- package/dist/cli/chunks/{pipeline-OWAHDUAQ.js → pipeline-BGFEHXIN.js} +2 -2
- package/dist/cli/chunks/{platform-ANGBFWBV.js → platform-GK7ZVDJI.js} +2 -2
- package/dist/cli/chunks/{plugin-OO7ON2YW.js → plugin-CAH2CKI6.js} +2 -2
- package/dist/cli/chunks/{prime-radiant-advanced-wasm-HFG3BXWU.js → prime-radiant-advanced-wasm-M5EYRONA.js} +2 -2
- package/dist/cli/chunks/{project-root-LNOYVTYY.js → project-root-BSNZC243.js} +2 -2
- package/dist/cli/chunks/protocol-executor-AD5A4DAI.js +2 -0
- package/dist/cli/chunks/{protocol-handler-CE3Q6LY4.js → protocol-handler-JDSSC2SF.js} +2 -2
- package/dist/cli/chunks/{prove-7XPN53PY.js → prove-ANPTOZJE.js} +2 -2
- package/dist/cli/chunks/qe-reasoning-bank-W3Z2PKTR.js +2 -0
- package/dist/cli/chunks/{quality-TT23JRFX.js → quality-SXWGYRQR.js} +2 -2
- package/dist/cli/chunks/{quality-gate-PPPRP255.js → quality-gate-GYNCA4ZY.js} +3 -3
- package/dist/cli/chunks/queen-coordinator-HQRHLIJX.js +2 -0
- package/dist/cli/chunks/{real-embeddings-EYNZIFJE.js → real-embeddings-WSRYAOZM.js} +2 -2
- package/dist/cli/chunks/{ref-validation-QQR64ZXD.js → ref-validation-AZ3LRWEK.js} +2 -2
- package/dist/cli/chunks/{roocode-installer-UIGS7ZJD.js → roocode-installer-2QKGFIEU.js} +2 -2
- package/dist/cli/chunks/router-MTP5LH4H.js +2 -0
- package/dist/cli/chunks/routing-feedback-GWETVB4L.js +2 -0
- package/dist/cli/chunks/{routing-handler-6AENUIRG.js → routing-handler-UYDC5MMD.js} +2 -2
- package/dist/cli/chunks/{ruvector-commands-5AWMEV34.js → ruvector-commands-QXADPVEY.js} +2 -2
- package/dist/cli/chunks/rvf-dual-writer-4UE5S7WP.js +2 -0
- package/dist/cli/chunks/rvf-migration-adapter-PHH3HF4Q.js +2 -0
- package/dist/cli/chunks/{rvf-migration-coordinator-NWRJ7C22.js → rvf-migration-coordinator-GD4NBFKT.js} +2 -2
- package/dist/cli/chunks/rvf-native-adapter-KTLZBUWV.js +2 -0
- package/dist/cli/chunks/{rvf-store-integrity-ISKRP563.js → rvf-store-integrity-7SXG66IL.js} +2 -2
- package/dist/cli/chunks/safe-db-FWWGAPVE.js +2 -0
- package/dist/cli/chunks/schedule-TPA4V4D5.js +2 -0
- package/dist/cli/chunks/scheduler-5ZTEPNDD.js +2 -0
- package/dist/cli/chunks/{security-325A7FMB.js → security-YKB622PK.js} +3 -3
- package/dist/cli/chunks/shared-rvf-adapter-KMLAV7JK.js +2 -0
- package/dist/cli/chunks/{shared-rvf-dual-writer-THFDYS2Z.js → shared-rvf-dual-writer-OYY27DFV.js} +2 -2
- package/dist/cli/chunks/sqlite-persistence-HPTT624C.js +2 -0
- package/dist/cli/chunks/{standalone-memory-UD4MJ6GZ.js → standalone-memory-2DOABVLC.js} +2 -2
- package/dist/cli/chunks/{status-handler-CPFTN4XL.js → status-handler-EXRKETV7.js} +2 -2
- package/dist/cli/chunks/{structural-health-2MG2IVBL.js → structural-health-2SKK6DU6.js} +2 -2
- package/dist/cli/chunks/sync-DQ2YUNI6.js +2 -0
- package/dist/cli/chunks/{sync-EE4VVKOW.js → sync-UW7SX7GO.js} +2 -2
- package/dist/cli/chunks/{task-handler-7H5OYJG4.js → task-handler-LYQ6WYUY.js} +2 -2
- package/dist/cli/chunks/task-handlers-DIJO232S.js +9 -0
- package/dist/cli/chunks/test-WRHZMUCW.js +33 -0
- package/dist/cli/chunks/{test-scheduling-CHQ4ZLLJ.js → test-scheduling-HI23RXFK.js} +3 -3
- package/dist/cli/chunks/token-bootstrap-23SA6SWZ.js +2 -0
- package/dist/cli/chunks/{token-usage-EBXUJNRB.js → token-usage-M7RRDPXO.js} +2 -2
- package/dist/cli/chunks/{transformers-ZEKS2OJZ.js → transformers-4TC35KKS.js} +2 -2
- package/dist/cli/chunks/tree-sitter-wasm-parser-F4LTKAWD.js +2 -0
- package/dist/cli/chunks/{types-KYAA5VLV.js → types-NBXV6LXQ.js} +2 -2
- package/dist/cli/chunks/unified-memory-OVFEPRPS.js +2 -0
- package/dist/cli/chunks/unified-memory-hnsw-KKRSCZHR.js +2 -0
- package/dist/cli/chunks/unified-persistence-7GLR4RI3.js +2 -0
- package/dist/cli/chunks/{upgrade-UJBJ5AYM.js → upgrade-4BGOU5RM.js} +2 -2
- package/dist/cli/chunks/{validate-RUV6YMWS.js → validate-EDWAR63H.js} +2 -2
- package/dist/cli/chunks/{validate-swarm-IVEVMGVM.js → validate-swarm-VI72CPR7.js} +2 -2
- package/dist/cli/chunks/visual-security-2FUM5GLI.js +2 -0
- package/dist/cli/chunks/{web-tree-sitter-AVWA6HKE.js → web-tree-sitter-Y5XBRQXF.js} +2 -2
- package/dist/cli/chunks/{windsurf-installer-DAH7HI2W.js → windsurf-installer-VEX23WAF.js} +2 -2
- package/dist/cli/chunks/witness-chain-3YNL6YGY.js +2 -0
- package/dist/cli/chunks/witness-chain-MH6GA5L6.js +2 -0
- package/dist/cli/chunks/witness-chain-repair-MJZGZRWT.js +2 -0
- package/dist/cli/chunks/witness-chain-verifier-TTJYXTBE.js +2 -0
- package/dist/cli/chunks/{witness-key-manager-JSTBMG43.js → witness-key-manager-EM6YXYOY.js} +2 -2
- package/dist/cli/chunks/{workflow-TWOIA6LZ.js → workflow-2RBDOM7V.js} +4 -4
- package/dist/cli/chunks/workflow-orchestrator-H6G65YKU.js +2 -0
- package/dist/cli/chunks/wrappers-5OTAVVOV.js +2 -0
- package/dist/cli/commands/audit.d.ts +20 -2
- package/dist/cli/commands/audit.js +158 -16
- package/dist/cli/commands/ci.js +1 -1
- package/dist/cli/commands/claude-flow-setup.js +5 -4
- package/dist/cli/commands/test.js +18 -3
- package/dist/cli/handlers/init-handler.d.ts +2 -0
- package/dist/cli/handlers/init-handler.js +8 -2
- package/dist/cli/index.js +10 -1
- package/dist/coordination/handlers/test-execution-handlers.js +13 -8
- package/dist/coordination/index.d.ts +1 -1
- package/dist/coordination/queen-event-handlers.js +9 -6
- package/dist/coordination/result-saver.js +1 -1
- package/dist/coordination/services/index.d.ts +1 -1
- package/dist/coordination/services/task-audit-logger.d.ts +38 -13
- package/dist/coordination/services/task-audit-logger.js +33 -5
- package/dist/coordination/task-executor.d.ts +5 -0
- package/dist/coordination/task-executor.js +10 -5
- package/dist/domains/test-generation/coordinator.js +6 -5
- package/dist/domains/test-generation/interfaces.d.ts +11 -1
- package/dist/domains/test-generation/services/behavior-example-validation.d.ts +36 -0
- package/dist/domains/test-generation/services/behavior-example-validation.js +89 -0
- package/dist/domains/test-generation/services/behavior-examples.d.ts +8 -0
- package/dist/domains/test-generation/services/behavior-examples.js +65 -0
- package/dist/domains/test-generation/services/test-generator.d.ts +1 -1
- package/dist/domains/test-generation/services/test-generator.js +59 -30
- package/dist/domains/visual-accessibility/services/axe-core-audit.d.ts +0 -15
- package/dist/domains/visual-accessibility/services/axe-core-audit.js +12 -10
- package/dist/init/agents-installer.d.ts +4 -0
- package/dist/init/agents-installer.js +24 -11
- package/dist/init/browser-engine-installer.d.ts +5 -5
- package/dist/init/browser-engine-installer.js +28 -6
- package/dist/init/codex-installer.js +4 -2
- package/dist/init/idempotent-write.d.ts +53 -0
- package/dist/init/idempotent-write.js +160 -0
- package/dist/init/init-wizard.d.ts +2 -0
- package/dist/init/orchestrator.js +1 -0
- package/dist/init/phases/05-learning.js +3 -1
- package/dist/init/phases/07-hooks.js +32 -16
- package/dist/init/phases/08-mcp.js +4 -2
- package/dist/init/phases/09-assets.js +8 -18
- package/dist/init/phases/10-workers.js +7 -5
- package/dist/init/phases/12-verification.js +7 -2
- package/dist/init/phases/phase-interface.d.ts +2 -0
- package/dist/init/project-analyzer.d.ts +9 -0
- package/dist/init/project-analyzer.js +20 -1
- package/dist/init/self-configurator.d.ts +5 -3
- package/dist/init/self-configurator.js +18 -29
- package/dist/init/skills-installer.js +4 -2
- package/dist/init/types.d.ts +6 -0
- package/dist/init/types.js +20 -24
- package/dist/integrations/agentic-flow/reasoning-bank/index.d.ts +2 -5
- package/dist/integrations/coherence/coherence-service.js +84 -24
- package/dist/integrations/coherence/vote-tally.d.ts +38 -0
- package/dist/integrations/coherence/vote-tally.js +39 -0
- package/dist/integrations/ruvector/shared-rvf-adapter.d.ts +23 -0
- package/dist/integrations/ruvector/shared-rvf-adapter.js +24 -0
- package/dist/integrations/vibium/client.d.ts +1 -0
- package/dist/integrations/vibium/client.js +24 -11
- package/dist/integrations/vibium/runtime.d.ts +14 -0
- package/dist/integrations/vibium/runtime.js +94 -0
- package/dist/kernel/kernel.js +3 -2
- package/dist/kernel/pattern-fts-self-heal.d.ts +63 -0
- package/dist/kernel/pattern-fts-self-heal.js +193 -0
- package/dist/kernel/process-lifecycle.d.ts +60 -0
- package/dist/kernel/process-lifecycle.js +91 -0
- package/dist/kernel/unified-memory-schemas.d.ts +15 -1
- package/dist/kernel/unified-memory-schemas.js +53 -25
- package/dist/kernel/unified-memory.js +31 -34
- package/dist/kernel/unified-persistence.js +12 -6
- package/dist/learning/experience-capture.d.ts +2 -1
- package/dist/learning/experience-capture.js +23 -8
- package/dist/learning/pattern-store.d.ts +12 -1
- package/dist/learning/pattern-store.js +45 -30
- package/dist/learning/qe-patterns.d.ts +12 -0
- package/dist/learning/qe-patterns.js +7 -1
- package/dist/learning/qe-reasoning-bank.d.ts +1 -0
- package/dist/learning/qe-reasoning-bank.js +17 -4
- package/dist/learning/real-qe-reasoning-bank.d.ts +9 -4
- package/dist/learning/real-qe-reasoning-bank.js +28 -4
- package/dist/learning/rvf-pattern-store.js +36 -23
- package/dist/learning/sqlite-persistence.d.ts +8 -1
- package/dist/learning/sqlite-persistence.js +58 -33
- package/dist/logging/console-logger.d.ts +2 -5
- package/dist/logging/console-logger.js +10 -46
- package/dist/logging/index.d.ts +2 -0
- package/dist/logging/index.js +1 -0
- package/dist/logging/redaction.d.ts +27 -0
- package/dist/logging/redaction.js +170 -0
- package/dist/mcp/bundle.js +522 -545
- package/dist/mcp/entry.js +52 -6
- package/dist/mcp/handlers/core-handlers.js +5 -4
- package/dist/mcp/handlers/domain-handler-configs.js +12 -4
- package/dist/mcp/handlers/task-handlers.js +11 -7
- package/dist/mcp/protocol-server.js +20 -4
- package/dist/mcp/services/reasoning-bank-service.d.ts +6 -1
- package/dist/mcp/services/reasoning-bank-service.js +5 -1
- package/dist/mcp/tools/base.d.ts +9 -2
- package/dist/mcp/tools/base.js +7 -0
- package/dist/mcp/tools/coherence/consensus.js +51 -2
- package/dist/mcp/tools/planning/goap-plan.d.ts +20 -7
- package/dist/mcp/tools/planning/goap-plan.js +92 -20
- package/dist/mcp/tools/planning/goap-status.d.ts +37 -12
- package/dist/mcp/tools/planning/goap-status.js +52 -23
- package/dist/mcp/tools/planning/world-state.d.ts +101 -0
- package/dist/mcp/tools/planning/world-state.js +274 -0
- package/dist/mcp/tools/test-execution/e2e-execute.js +9 -1
- package/dist/mcp/tools/test-generation/generate.d.ts +6 -1
- package/dist/mcp/tools/test-generation/generate.js +8 -0
- package/dist/mcp/types.d.ts +10 -4
- package/dist/planning/goap-planner.d.ts +60 -4
- package/dist/planning/goap-planner.js +218 -60
- package/dist/planning/index.d.ts +1 -1
- package/dist/planning/index.js +1 -1
- package/dist/planning/plan-executor.d.ts +20 -1
- package/dist/planning/plan-executor.js +209 -100
- package/dist/planning/types.d.ts +16 -0
- package/dist/planning/types.js +17 -0
- package/dist/shared/error-utils.d.ts +15 -0
- package/dist/shared/error-utils.js +21 -0
- package/dist/shared/events/domain-events.d.ts +2 -1
- package/package.json +10 -6
- package/dist/cli/chunks/adapter-IYC62SXA.js +0 -2
- package/dist/cli/chunks/agent-booster-wasm-EDNKP3SP.js +0 -2
- package/dist/cli/chunks/aqe-learning-engine-LLOU2IXD.js +0 -2
- package/dist/cli/chunks/audit-CVZQMF55.js +0 -3
- package/dist/cli/chunks/base-P3Z4IKCT.js +0 -2
- package/dist/cli/chunks/browser-workflow-YYHQQ25X.js +0 -2
- package/dist/cli/chunks/chunk-3EZ5DR2R.js +0 -21
- package/dist/cli/chunks/chunk-5WOSWNDN.js +0 -2
- package/dist/cli/chunks/chunk-7CD7PBHY.js +0 -3
- package/dist/cli/chunks/chunk-7X7JYWT4.js +0 -27
- package/dist/cli/chunks/chunk-CZO4BJG5.js +0 -2
- package/dist/cli/chunks/chunk-J27F4NSB.js +0 -2
- package/dist/cli/chunks/chunk-J5UNP6W3.js +0 -2
- package/dist/cli/chunks/chunk-MI5Q55DG.js +0 -65
- package/dist/cli/chunks/chunk-TY5WC3FT.js +0 -12
- package/dist/cli/chunks/chunk-UDHVCKGA.js +0 -5
- package/dist/cli/chunks/chunk-XQSIRBKT.js +0 -180
- package/dist/cli/chunks/chunk-YXP6BKGS.js +0 -730
- package/dist/cli/chunks/chunk-ZBABIZ2D.js +0 -2
- package/dist/cli/chunks/chunk-ZCWERUYB.js +0 -12
- package/dist/cli/chunks/claude-flow-setup-5LVJOFKP.js +0 -2
- package/dist/cli/chunks/client-HUVFA5PF.js +0 -2
- package/dist/cli/chunks/core-handlers-UEXO3VAA.js +0 -2
- package/dist/cli/chunks/cross-domain-router-ODU5IZD6.js +0 -2
- package/dist/cli/chunks/domain-transfer-JZA5TMW3.js +0 -2
- package/dist/cli/chunks/dream-HE3OX42F.js +0 -2
- package/dist/cli/chunks/heartbeat-scheduler-QUIFGGLX.js +0 -2
- package/dist/cli/chunks/hnsw-adapter-42KB37KP.js +0 -2
- package/dist/cli/chunks/hnsw-index-T2PGO77J.js +0 -2
- package/dist/cli/chunks/hybrid-backend-FRNWYRKH.js +0 -2
- package/dist/cli/chunks/impact-analyzer-A5QYOYBR.js +0 -2
- package/dist/cli/chunks/init-wizard-XBU674YH.js +0 -2
- package/dist/cli/chunks/kernel-DV5MTNZD.js +0 -2
- package/dist/cli/chunks/knowledge-graph-4ACGVJQK.js +0 -2
- package/dist/cli/chunks/llm-router-service-PSMASERT.js +0 -2
- package/dist/cli/chunks/load-test-MRUO2VPF.js +0 -2
- package/dist/cli/chunks/mcp-JGSFCEMH.js +0 -2
- package/dist/cli/chunks/memory-backend-2MPGI6JW.js +0 -2
- package/dist/cli/chunks/memory-handlers-XT4HMITB.js +0 -2
- package/dist/cli/chunks/multi-model-executor-26Q5BSVG.js +0 -14
- package/dist/cli/chunks/orchestrator-D5IFV65I.js +0 -393
- package/dist/cli/chunks/pattern-null-store-TGWUL237.js +0 -2
- package/dist/cli/chunks/protocol-executor-GEVH5KD6.js +0 -2
- package/dist/cli/chunks/qe-reasoning-bank-DJ2JL6QB.js +0 -2
- package/dist/cli/chunks/queen-coordinator-F7E3AS26.js +0 -2
- package/dist/cli/chunks/router-OZH3QSAU.js +0 -2
- package/dist/cli/chunks/routing-feedback-J2E3ADZB.js +0 -2
- package/dist/cli/chunks/rvf-dual-writer-HK525Y5Y.js +0 -2
- package/dist/cli/chunks/rvf-migration-adapter-Q7FB3BKR.js +0 -2
- package/dist/cli/chunks/rvf-native-adapter-5ZRCGUI6.js +0 -2
- package/dist/cli/chunks/safe-db-3OYEPVEH.js +0 -2
- package/dist/cli/chunks/schedule-AG4C2EIQ.js +0 -2
- package/dist/cli/chunks/scheduler-SQS2CZFZ.js +0 -2
- package/dist/cli/chunks/shared-rvf-adapter-NFL6QSZ6.js +0 -2
- package/dist/cli/chunks/sqlite-persistence-MAKDFSHC.js +0 -2
- package/dist/cli/chunks/sync-MBTW5XBF.js +0 -2
- package/dist/cli/chunks/task-handlers-NH4GJHCJ.js +0 -9
- package/dist/cli/chunks/test-MPHGT4T6.js +0 -33
- package/dist/cli/chunks/token-bootstrap-SSDCYEKK.js +0 -2
- package/dist/cli/chunks/tree-sitter-wasm-parser-J6ZMAK37.js +0 -2
- package/dist/cli/chunks/unified-memory-DDWMC435.js +0 -2
- package/dist/cli/chunks/unified-memory-hnsw-4JA7SGBK.js +0 -2
- package/dist/cli/chunks/unified-persistence-F6OSNTXY.js +0 -2
- package/dist/cli/chunks/vibium-HOGMFJ2Z.js +0 -2
- package/dist/cli/chunks/visual-security-25SMBIYT.js +0 -2
- package/dist/cli/chunks/witness-chain-PJOQPFUX.js +0 -2
- package/dist/cli/chunks/witness-chain-ZW6KKUZU.js +0 -2
- package/dist/cli/chunks/workflow-orchestrator-UKSIDM7Q.js +0 -2
- package/dist/cli/chunks/wrappers-UR7BLXKV.js +0 -2
|
@@ -30,6 +30,14 @@ export interface RealQEReasoningBankConfig {
|
|
|
30
30
|
coherenceThreshold?: number;
|
|
31
31
|
}
|
|
32
32
|
export declare const DEFAULT_REAL_CONFIG: RealQEReasoningBankConfig;
|
|
33
|
+
/** Ranking evidence keeps lexical relevance separate from vector reuse safety. */
|
|
34
|
+
export interface RealQEPatternSearchResult {
|
|
35
|
+
pattern: QEPattern;
|
|
36
|
+
score: number;
|
|
37
|
+
similarity: number;
|
|
38
|
+
matchType: 'vector' | 'lexical';
|
|
39
|
+
canReuse: boolean;
|
|
40
|
+
}
|
|
33
41
|
export interface RealQERoutingRequest {
|
|
34
42
|
task: string;
|
|
35
43
|
taskType?: 'test-generation' | 'analysis' | 'debugging' | 'optimization';
|
|
@@ -144,10 +152,7 @@ export declare class RealQEReasoningBank {
|
|
|
144
152
|
limit?: number;
|
|
145
153
|
domain?: QEDomain;
|
|
146
154
|
minSimilarity?: number;
|
|
147
|
-
}): Promise<Result<
|
|
148
|
-
pattern: QEPattern;
|
|
149
|
-
similarity: number;
|
|
150
|
-
}>>>;
|
|
155
|
+
}): Promise<Result<RealQEPatternSearchResult[]>>;
|
|
151
156
|
/**
|
|
152
157
|
* Route a task to optimal agent
|
|
153
158
|
*/
|
|
@@ -19,6 +19,7 @@ import { v4 as uuidv4 } from 'uuid';
|
|
|
19
19
|
import { LoggerFactory } from '../logging/index.js';
|
|
20
20
|
import { toError, toErrorMessage } from '../shared/error-utils.js';
|
|
21
21
|
import { maybeEnhanceRoutingWithPatterns } from './pattern-routing-guidance.js';
|
|
22
|
+
import { blendFtsScore, DEFAULT_PATTERN_STORE_CONFIG } from './pattern-store.js';
|
|
22
23
|
import { EMBEDDING_SPACE_CANARY } from './embedding-space.js';
|
|
23
24
|
const logger = LoggerFactory.create('RealQEReasoningBank');
|
|
24
25
|
import { computeRealEmbedding, isTransformerAvailable, getEmbeddingDimension, clearEmbeddingCache, getActiveEmbeddingSpaceIdentity, } from './real-embeddings.js';
|
|
@@ -418,11 +419,11 @@ export class RealQEReasoningBank {
|
|
|
418
419
|
const limit = options.limit || 10;
|
|
419
420
|
const results = this.hnswIndex.searchKnn(queryEmbedding, limit * 2); // Get extra for filtering
|
|
420
421
|
const patterns = [];
|
|
421
|
-
for (let i = 0; i < results.neighbors.length
|
|
422
|
+
for (let i = 0; i < results.neighbors.length; i++) {
|
|
422
423
|
const hnswIndex = results.neighbors[i];
|
|
423
424
|
const distance = results.distances[i];
|
|
424
425
|
const similarity = 1 - distance; // Convert distance to similarity
|
|
425
|
-
if (options.minSimilarity && similarity < options.minSimilarity) {
|
|
426
|
+
if (options.minSimilarity !== undefined && similarity < options.minSimilarity) {
|
|
426
427
|
continue;
|
|
427
428
|
}
|
|
428
429
|
const patternId = this.patternIdMap.get(hnswIndex);
|
|
@@ -435,13 +436,36 @@ export class RealQEReasoningBank {
|
|
|
435
436
|
if (options.domain && pattern.qeDomain !== options.domain) {
|
|
436
437
|
continue;
|
|
437
438
|
}
|
|
438
|
-
|
|
439
|
+
const reuse = DEFAULT_PATTERN_STORE_CONFIG.reuseOptimization;
|
|
440
|
+
const ageDays = (Date.now() - new Date(pattern.lastUsedAt).getTime()) / 86_400_000;
|
|
441
|
+
patterns.push({ pattern, similarity, score: similarity, matchType: 'vector',
|
|
442
|
+
canReuse: Boolean(pattern.reusable && similarity >= reuse.minSimilarityForReuse
|
|
443
|
+
&& pattern.successRate >= reuse.minSuccessRateForReuse && ageDays <= reuse.maxAgeForReuse),
|
|
444
|
+
});
|
|
445
|
+
}
|
|
446
|
+
const existing = new Map(patterns.map(hit => [hit.pattern.id, hit]));
|
|
447
|
+
for (const lexical of this.sqliteStore.searchFTS(query, limit * 2)) {
|
|
448
|
+
const vector = existing.get(lexical.id);
|
|
449
|
+
if (vector) {
|
|
450
|
+
vector.score = blendFtsScore(vector.score, lexical.ftsScore * lexical.coverage);
|
|
451
|
+
continue;
|
|
452
|
+
}
|
|
453
|
+
// A vector threshold requires measured vector evidence. A rejected
|
|
454
|
+
// vector must never re-enter through the lexical-only branch.
|
|
455
|
+
if (options.minSimilarity !== undefined)
|
|
456
|
+
continue;
|
|
457
|
+
const pattern = this.sqliteStore.getPattern(lexical.id);
|
|
458
|
+
if (!pattern || (options.domain && pattern.qeDomain !== options.domain))
|
|
459
|
+
continue;
|
|
460
|
+
patterns.push({ pattern, score: 0.5 * lexical.ftsScore * lexical.coverage,
|
|
461
|
+
similarity: 0, matchType: 'lexical', canReuse: false });
|
|
439
462
|
}
|
|
463
|
+
patterns.sort((a, b) => b.score - a.score);
|
|
440
464
|
const searchTime = performance.now() - startTime;
|
|
441
465
|
if (searchTime > 10) {
|
|
442
466
|
logger.warn('Slow search', { searchTimeMs: Number(searchTime.toFixed(1)) });
|
|
443
467
|
}
|
|
444
|
-
return ok(patterns);
|
|
468
|
+
return ok(patterns.slice(0, limit));
|
|
445
469
|
}
|
|
446
470
|
catch (error) {
|
|
447
471
|
return err(toError(error));
|
|
@@ -15,7 +15,7 @@ import { v4 as uuidv4 } from 'uuid';
|
|
|
15
15
|
import { ok, err } from '../shared/types/index.js';
|
|
16
16
|
import { toErrorMessage } from '../shared/error-utils.js';
|
|
17
17
|
import { calculateQualityScore, validateQEPattern, mapQEDomainToAQE, PROMOTION_THRESHOLD, } from './qe-patterns.js';
|
|
18
|
-
import { DEFAULT_PATTERN_STORE_CONFIG } from './pattern-store.js';
|
|
18
|
+
import { DEFAULT_PATTERN_STORE_CONFIG, blendFtsScore } from './pattern-store.js';
|
|
19
19
|
import { ensureEndpointEmbeddingSpaceIdentity, getActiveEmbeddingSpaceIdentity } from './real-embeddings.js';
|
|
20
20
|
import { verifyOrCreateEmbeddingSpaceManifest } from './embedding-space.js';
|
|
21
21
|
import { PatternMutationError } from './pattern-mutation-error.js';
|
|
@@ -322,16 +322,18 @@ export class RvfPatternStore {
|
|
|
322
322
|
// Uses getPattern(id) which joins the embedding from qe_pattern_embeddings.
|
|
323
323
|
if (Array.isArray(query) && !this.adapter && this.sqliteStore && results.length === 0) {
|
|
324
324
|
try {
|
|
325
|
-
const
|
|
325
|
+
const activeSpaceId = getActiveEmbeddingSpaceIdentity()?.spaceId ?? this.embeddingSpaceId;
|
|
326
|
+
const embeddings = this.sqliteStore.getAllEmbeddings();
|
|
326
327
|
const qArr = query;
|
|
327
328
|
const qMag = Math.sqrt(qArr.reduce((s, v) => s + v * v, 0));
|
|
328
329
|
if (qMag > 0) {
|
|
329
|
-
for (const
|
|
330
|
-
if (!
|
|
330
|
+
for (const row of embeddings) {
|
|
331
|
+
if (!activeSpaceId || row.spaceId !== activeSpaceId)
|
|
331
332
|
continue;
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
333
|
+
const full = this.sqliteStore.getPattern(row.patternId);
|
|
334
|
+
if (!full || !this.matchesFilters(full, options))
|
|
335
|
+
continue;
|
|
336
|
+
const emb = row.embedding;
|
|
335
337
|
if (!emb || emb.length !== qArr.length)
|
|
336
338
|
continue;
|
|
337
339
|
let dot = 0, eMag = 0;
|
|
@@ -368,39 +370,50 @@ export class RvfPatternStore {
|
|
|
368
370
|
continue;
|
|
369
371
|
if (!this.matchesFilters(pattern, options))
|
|
370
372
|
continue;
|
|
371
|
-
const reuseInfo = this.calculateReuseInfo(pattern, pattern.confidence);
|
|
372
373
|
results.push({
|
|
373
374
|
pattern,
|
|
374
375
|
score: pattern.confidence,
|
|
375
|
-
matchType: '
|
|
376
|
-
similarity:
|
|
377
|
-
canReuse:
|
|
378
|
-
estimatedTokenSavings:
|
|
379
|
-
reuseConfidence:
|
|
376
|
+
matchType: 'context',
|
|
377
|
+
similarity: 0,
|
|
378
|
+
canReuse: false,
|
|
379
|
+
estimatedTokenSavings: 0,
|
|
380
|
+
reuseConfidence: 0,
|
|
380
381
|
});
|
|
381
382
|
}
|
|
382
383
|
}
|
|
383
384
|
catch { /* SQLite unavailable */ }
|
|
384
385
|
}
|
|
385
|
-
// FTS5
|
|
386
|
-
|
|
386
|
+
// FTS5 hybrid search via SQLite
|
|
387
|
+
const ftsText = typeof query === 'string' ? query : options.textQuery;
|
|
388
|
+
if (ftsText?.trim() && this.sqliteStore) {
|
|
387
389
|
try {
|
|
388
|
-
const ftsResults = this.sqliteStore.searchFTS(
|
|
390
|
+
const ftsResults = this.sqliteStore.searchFTS(ftsText, limit * 2);
|
|
389
391
|
const existingIds = new Set(results.map(r => r.pattern.id));
|
|
392
|
+
// #653: same vector/FTS5 blend as PatternStore for hits found by
|
|
393
|
+
// both, so lexical relevance can reorder vector results.
|
|
394
|
+
const ftsScoreMap = new Map(ftsResults.map(r => [r.id, r.ftsScore * r.coverage]));
|
|
395
|
+
for (const result of results) {
|
|
396
|
+
const ftsScore = ftsScoreMap.get(result.pattern.id);
|
|
397
|
+
if (ftsScore !== undefined) {
|
|
398
|
+
result.score = blendFtsScore(result.score, ftsScore);
|
|
399
|
+
}
|
|
400
|
+
}
|
|
390
401
|
for (const ftsResult of ftsResults) {
|
|
391
402
|
if (existingIds.has(ftsResult.id))
|
|
392
403
|
continue;
|
|
393
404
|
const pattern = await this.get(ftsResult.id);
|
|
394
405
|
if (pattern && this.matchesFilters(pattern, options)) {
|
|
395
|
-
|
|
406
|
+
// Same keyword-only similarity rule as PatternStore (#653)
|
|
407
|
+
const keywordScore = 0.5 * ftsResult.ftsScore * ftsResult.coverage;
|
|
408
|
+
const similarity = 0; // Lexical relevance is not vector similarity or safe reuse.
|
|
396
409
|
results.push({
|
|
397
410
|
pattern,
|
|
398
|
-
score:
|
|
399
|
-
matchType: '
|
|
400
|
-
similarity
|
|
401
|
-
canReuse:
|
|
402
|
-
estimatedTokenSavings:
|
|
403
|
-
reuseConfidence:
|
|
411
|
+
score: keywordScore,
|
|
412
|
+
matchType: 'lexical',
|
|
413
|
+
similarity,
|
|
414
|
+
canReuse: false,
|
|
415
|
+
estimatedTokenSavings: 0,
|
|
416
|
+
reuseConfidence: 0,
|
|
404
417
|
});
|
|
405
418
|
}
|
|
406
419
|
}
|
|
@@ -91,12 +91,19 @@ export declare class SQLitePatternStore {
|
|
|
91
91
|
}): QEPattern[];
|
|
92
92
|
/**
|
|
93
93
|
* FTS5 full-text search for patterns.
|
|
94
|
-
* Returns pattern IDs with BM25 relevance scores.
|
|
94
|
+
* Returns pattern IDs with BM25 relevance scores. `phrase` marks hits that
|
|
95
|
+
* also contain the whole query as a phrase (near-duplicate evidence).
|
|
96
|
+
* `coverage` is the fraction of distinct query terms the hit contains: an
|
|
97
|
+
* absolute measure, unlike `ftsScore`, which is relative to the best hit.
|
|
95
98
|
*/
|
|
96
99
|
searchFTS(query: string, limit?: number): Array<{
|
|
97
100
|
id: string;
|
|
98
101
|
ftsScore: number;
|
|
102
|
+
phrase: boolean;
|
|
103
|
+
coverage: number;
|
|
99
104
|
}>;
|
|
105
|
+
/** IDs whose FTS5 text contains the whole query as one phrase. */
|
|
106
|
+
private searchFTSPhraseIds;
|
|
100
107
|
/** Last FTS5 search latency in ms, for instrumentation */
|
|
101
108
|
private _lastFtsLatencyMs;
|
|
102
109
|
get lastFtsLatencyMs(): number;
|
|
@@ -16,6 +16,8 @@ import { v4 as uuidv4 } from 'uuid';
|
|
|
16
16
|
import { safeJsonParse } from '../shared/safe-json.js';
|
|
17
17
|
import { toErrorMessage } from '../shared/error-utils.js';
|
|
18
18
|
import { getUnifiedMemory } from '../kernel/unified-memory.js';
|
|
19
|
+
import { QE_PATTERNS_FTS_SCHEMA } from '../kernel/unified-memory-schemas.js';
|
|
20
|
+
import { ensurePatternFtsInSync } from '../kernel/pattern-fts-self-heal.js';
|
|
19
21
|
import { computeBatchEmbeddings, getEmbeddingDimension, isUsingEndpoint, getActiveEmbeddingSpaceIdentity, } from './real-embeddings.js';
|
|
20
22
|
import { EMBEDDING_SPACE_CANARY, inspectEmbeddingSpaceRows, } from './embedding-space.js';
|
|
21
23
|
import { recordPatternUsage } from './pattern-usage-recorder.js';
|
|
@@ -54,6 +56,13 @@ export function hashEmbedding(text, dimension = 384) {
|
|
|
54
56
|
}
|
|
55
57
|
return embedding;
|
|
56
58
|
}
|
|
59
|
+
/**
|
|
60
|
+
* Lowercased letter/digit tokens with diacritics removed, approximating the
|
|
61
|
+
* FTS5 unicode61 tokenizer so query terms and stored text compare alike.
|
|
62
|
+
*/
|
|
63
|
+
function ftsTokens(text) {
|
|
64
|
+
return text.normalize('NFKD').replace(/\p{M}+/gu, '').toLowerCase().match(/[\p{L}\p{N}]+/gu) ?? [];
|
|
65
|
+
}
|
|
57
66
|
/**
|
|
58
67
|
* SQLite-based pattern persistence
|
|
59
68
|
*/
|
|
@@ -101,6 +110,11 @@ export class SQLitePatternStore {
|
|
|
101
110
|
if (this.config.foreignKeys) {
|
|
102
111
|
this.db.pragma('foreign_keys = ON');
|
|
103
112
|
}
|
|
113
|
+
// Unified mode heals on UnifiedMemoryManager open; legacy DBs get the
|
|
114
|
+
// same repair. Runs BEFORE createSchema so a missing trigger is still
|
|
115
|
+
// observable (createSchema would silently recreate it without
|
|
116
|
+
// rebuilding the drifted index). No-op on a fresh DB.
|
|
117
|
+
ensurePatternFtsInSync(this.db, { logPrefix: '[SQLitePatternStore]' });
|
|
104
118
|
// Create schema (only for legacy mode)
|
|
105
119
|
this.createSchema();
|
|
106
120
|
console.log(`[SQLitePatternStore] Initialized (legacy): ${this.config.dbPath}`);
|
|
@@ -212,30 +226,8 @@ export class SQLitePatternStore {
|
|
|
212
226
|
CREATE UNIQUE INDEX IF NOT EXISTS idx_patterns_unique_name_domain_type
|
|
213
227
|
ON qe_patterns(name, qe_domain, pattern_type);
|
|
214
228
|
|
|
215
|
-
-- FTS5 full-text search index
|
|
216
|
-
|
|
217
|
-
name, description, pattern_type, qe_domain,
|
|
218
|
-
content='qe_patterns',
|
|
219
|
-
content_rowid='rowid'
|
|
220
|
-
);
|
|
221
|
-
|
|
222
|
-
-- FTS5 triggers to keep index in sync
|
|
223
|
-
CREATE TRIGGER IF NOT EXISTS qe_patterns_fts_insert AFTER INSERT ON qe_patterns BEGIN
|
|
224
|
-
INSERT INTO qe_patterns_fts(rowid, name, description, pattern_type, qe_domain)
|
|
225
|
-
VALUES (new.rowid, new.name, new.description, new.pattern_type, new.qe_domain);
|
|
226
|
-
END;
|
|
227
|
-
|
|
228
|
-
CREATE TRIGGER IF NOT EXISTS qe_patterns_fts_delete AFTER DELETE ON qe_patterns BEGIN
|
|
229
|
-
INSERT INTO qe_patterns_fts(qe_patterns_fts, rowid, name, description, pattern_type, qe_domain)
|
|
230
|
-
VALUES ('delete', old.rowid, old.name, old.description, old.pattern_type, old.qe_domain);
|
|
231
|
-
END;
|
|
232
|
-
|
|
233
|
-
CREATE TRIGGER IF NOT EXISTS qe_patterns_fts_update AFTER UPDATE ON qe_patterns BEGIN
|
|
234
|
-
INSERT INTO qe_patterns_fts(qe_patterns_fts, rowid, name, description, pattern_type, qe_domain)
|
|
235
|
-
VALUES ('delete', old.rowid, old.name, old.description, old.pattern_type, old.qe_domain);
|
|
236
|
-
INSERT INTO qe_patterns_fts(rowid, name, description, pattern_type, qe_domain)
|
|
237
|
-
VALUES (new.rowid, new.name, new.description, new.pattern_type, new.qe_domain);
|
|
238
|
-
END;
|
|
229
|
+
-- FTS5 full-text search index + sync triggers (shared DDL)
|
|
230
|
+
${QE_PATTERNS_FTS_SCHEMA}
|
|
239
231
|
|
|
240
232
|
-- Indexes for performance
|
|
241
233
|
CREATE INDEX IF NOT EXISTS idx_patterns_domain ON qe_patterns(qe_domain);
|
|
@@ -465,20 +457,29 @@ export class SQLitePatternStore {
|
|
|
465
457
|
}
|
|
466
458
|
/**
|
|
467
459
|
* FTS5 full-text search for patterns.
|
|
468
|
-
* Returns pattern IDs with BM25 relevance scores.
|
|
460
|
+
* Returns pattern IDs with BM25 relevance scores. `phrase` marks hits that
|
|
461
|
+
* also contain the whole query as a phrase (near-duplicate evidence).
|
|
462
|
+
* `coverage` is the fraction of distinct query terms the hit contains: an
|
|
463
|
+
* absolute measure, unlike `ftsScore`, which is relative to the best hit.
|
|
469
464
|
*/
|
|
470
465
|
searchFTS(query, limit = 20) {
|
|
471
466
|
if (!this.db)
|
|
472
467
|
throw new Error('Database not initialized');
|
|
473
468
|
if (!query.trim())
|
|
474
469
|
return [];
|
|
475
|
-
//
|
|
476
|
-
//
|
|
477
|
-
|
|
470
|
+
// #653: match any query term (BM25 ranks docs matching more/rarer terms
|
|
471
|
+
// higher). A whole-query phrase almost never matched sentence-style task
|
|
472
|
+
// queries. Terms are letters/digits only, quoted, so FTS5 syntax can't leak in.
|
|
473
|
+
const terms = [...new Set(ftsTokens(query))]
|
|
474
|
+
.filter(term => term.length >= 2)
|
|
475
|
+
.slice(0, 32);
|
|
476
|
+
if (terms.length === 0)
|
|
477
|
+
return [];
|
|
478
|
+
const sanitized = terms.map(term => `"${term}"`).join(' OR ');
|
|
478
479
|
const start = performance.now();
|
|
479
480
|
try {
|
|
480
481
|
const rows = this.db.prepare(`
|
|
481
|
-
SELECT p.id, rank AS fts_score
|
|
482
|
+
SELECT p.id, rank AS fts_score, p.name, p.description, p.pattern_type, p.qe_domain
|
|
482
483
|
FROM qe_patterns_fts fts
|
|
483
484
|
JOIN qe_patterns p ON p.rowid = fts.rowid
|
|
484
485
|
WHERE qe_patterns_fts MATCH ?
|
|
@@ -494,16 +495,40 @@ export class SQLitePatternStore {
|
|
|
494
495
|
// Use Math.max(maxScore, 1.0) to prevent single-result inflation:
|
|
495
496
|
// without this, a single FTS5 result always normalizes to 1.0
|
|
496
497
|
const maxAbsScore = Math.max(...rows.map(r => Math.abs(r.fts_score)), 1.0);
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
498
|
+
const phraseIds = rows.length > 0 ? this.searchFTSPhraseIds(query, limit) : new Set();
|
|
499
|
+
return rows.map(r => {
|
|
500
|
+
const docTerms = new Set(ftsTokens([r.name, r.description, r.pattern_type, r.qe_domain].filter(Boolean).join(' ')));
|
|
501
|
+
const matched = terms.filter(term => docTerms.has(term)).length;
|
|
502
|
+
return {
|
|
503
|
+
id: r.id,
|
|
504
|
+
ftsScore: Math.abs(r.fts_score) / maxAbsScore,
|
|
505
|
+
phrase: phraseIds.has(r.id),
|
|
506
|
+
coverage: matched / terms.length,
|
|
507
|
+
};
|
|
508
|
+
});
|
|
501
509
|
}
|
|
502
510
|
catch {
|
|
503
511
|
// FTS5 table may not exist yet (unified DB migrated before schema update)
|
|
504
512
|
return [];
|
|
505
513
|
}
|
|
506
514
|
}
|
|
515
|
+
/** IDs whose FTS5 text contains the whole query as one phrase. */
|
|
516
|
+
searchFTSPhraseIds(query, limit) {
|
|
517
|
+
// Whole query quoted as one phrase, internal quotes escaped (FTS5 syntax-safe)
|
|
518
|
+
const phrase = '"' + query.replace(/"/g, '""') + '"';
|
|
519
|
+
try {
|
|
520
|
+
const rows = this.db.prepare(`
|
|
521
|
+
SELECT p.id FROM qe_patterns_fts fts
|
|
522
|
+
JOIN qe_patterns p ON p.rowid = fts.rowid
|
|
523
|
+
WHERE qe_patterns_fts MATCH ?
|
|
524
|
+
LIMIT ?
|
|
525
|
+
`).all(phrase, limit);
|
|
526
|
+
return new Set(rows.map(r => r.id));
|
|
527
|
+
}
|
|
528
|
+
catch {
|
|
529
|
+
return new Set();
|
|
530
|
+
}
|
|
531
|
+
}
|
|
507
532
|
/** Last FTS5 search latency in ms, for instrumentation */
|
|
508
533
|
_lastFtsLatencyMs = 0;
|
|
509
534
|
get lastFtsLatencyMs() { return this._lastFtsLatencyMs; }
|
|
@@ -69,13 +69,10 @@ export declare class ConsoleLogger implements Logger {
|
|
|
69
69
|
*/
|
|
70
70
|
private mergeContext;
|
|
71
71
|
/**
|
|
72
|
-
* Format context object for display
|
|
72
|
+
* Format context object for display. The context is first reduced to a
|
|
73
|
+
* redacted, bounded, cycle-free copy (#740), so it serializes safely.
|
|
73
74
|
*/
|
|
74
75
|
private formatContext;
|
|
75
|
-
/**
|
|
76
|
-
* Create a JSON replacer that handles circular references and depth limiting
|
|
77
|
-
*/
|
|
78
|
-
private createReplacer;
|
|
79
76
|
}
|
|
80
77
|
/**
|
|
81
78
|
* No-op Logger implementation for use when logging is disabled
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* - Error stack trace handling
|
|
11
11
|
*/
|
|
12
12
|
import { LogLevel, LOG_LEVEL_NAMES, } from './logger.js';
|
|
13
|
+
import { redactLogText, redactLogValue } from './redaction.js';
|
|
13
14
|
/**
|
|
14
15
|
* Default configuration for ConsoleLogger
|
|
15
16
|
*/
|
|
@@ -61,11 +62,11 @@ export class ConsoleLogger {
|
|
|
61
62
|
if (error.stack) {
|
|
62
63
|
errorContext.stack = error.stack;
|
|
63
64
|
}
|
|
64
|
-
//
|
|
65
|
+
// Keep the cause structured; format() redacts it with everything else
|
|
65
66
|
// Use type assertion for ES2022 Error.cause compatibility
|
|
66
67
|
const errorWithCause = error;
|
|
67
68
|
if (errorWithCause.cause !== undefined) {
|
|
68
|
-
errorContext.cause =
|
|
69
|
+
errorContext.cause = errorWithCause.cause;
|
|
69
70
|
}
|
|
70
71
|
}
|
|
71
72
|
this.output(LogLevel.ERROR, message, errorContext);
|
|
@@ -115,8 +116,8 @@ export class ConsoleLogger {
|
|
|
115
116
|
}
|
|
116
117
|
// Add domain
|
|
117
118
|
parts.push(`[${this.domain}]`);
|
|
118
|
-
// Add message
|
|
119
|
-
parts.push(message);
|
|
119
|
+
// Add message (#740: redaction is a sink invariant, at every level)
|
|
120
|
+
parts.push(redactLogText(message));
|
|
120
121
|
// Add context if provided
|
|
121
122
|
const mergedContext = this.mergeContext(context);
|
|
122
123
|
if (mergedContext && Object.keys(mergedContext).length > 0) {
|
|
@@ -159,58 +160,21 @@ export class ConsoleLogger {
|
|
|
159
160
|
};
|
|
160
161
|
}
|
|
161
162
|
/**
|
|
162
|
-
* Format context object for display
|
|
163
|
+
* Format context object for display. The context is first reduced to a
|
|
164
|
+
* redacted, bounded, cycle-free copy (#740), so it serializes safely.
|
|
163
165
|
*/
|
|
164
166
|
formatContext(context) {
|
|
165
167
|
try {
|
|
168
|
+
const safe = redactLogValue(context, { maxDepth: this.config.maxContextDepth + 1 });
|
|
166
169
|
if (this.config.prettyPrint) {
|
|
167
|
-
return '\n' + JSON.stringify(
|
|
170
|
+
return '\n' + JSON.stringify(safe, null, 2);
|
|
168
171
|
}
|
|
169
|
-
return JSON.stringify(
|
|
172
|
+
return JSON.stringify(safe);
|
|
170
173
|
}
|
|
171
174
|
catch {
|
|
172
175
|
return '[unserializable context]';
|
|
173
176
|
}
|
|
174
177
|
}
|
|
175
|
-
/**
|
|
176
|
-
* Create a JSON replacer that handles circular references and depth limiting
|
|
177
|
-
*/
|
|
178
|
-
createReplacer() {
|
|
179
|
-
const seen = new WeakSet();
|
|
180
|
-
let depth = 0;
|
|
181
|
-
return (_key, value) => {
|
|
182
|
-
// Handle depth limiting
|
|
183
|
-
if (typeof value === 'object' && value !== null) {
|
|
184
|
-
if (depth >= this.config.maxContextDepth) {
|
|
185
|
-
return '[object]';
|
|
186
|
-
}
|
|
187
|
-
// Handle circular references
|
|
188
|
-
if (seen.has(value)) {
|
|
189
|
-
return '[circular]';
|
|
190
|
-
}
|
|
191
|
-
seen.add(value);
|
|
192
|
-
depth++;
|
|
193
|
-
}
|
|
194
|
-
// Handle special types
|
|
195
|
-
if (value instanceof Error) {
|
|
196
|
-
return {
|
|
197
|
-
name: value.name,
|
|
198
|
-
message: value.message,
|
|
199
|
-
stack: value.stack,
|
|
200
|
-
};
|
|
201
|
-
}
|
|
202
|
-
if (typeof value === 'bigint') {
|
|
203
|
-
return value.toString();
|
|
204
|
-
}
|
|
205
|
-
if (typeof value === 'function') {
|
|
206
|
-
return '[function]';
|
|
207
|
-
}
|
|
208
|
-
if (typeof value === 'symbol') {
|
|
209
|
-
return value.toString();
|
|
210
|
-
}
|
|
211
|
-
return value;
|
|
212
|
-
};
|
|
213
|
-
}
|
|
214
178
|
}
|
|
215
179
|
/**
|
|
216
180
|
* No-op Logger implementation for use when logging is disabled
|
package/dist/logging/index.d.ts
CHANGED
|
@@ -39,4 +39,6 @@ export type { ConsoleLoggerConfig } from './console-logger.js';
|
|
|
39
39
|
export { ConsoleLogger, NullLogger, DEFAULT_CONSOLE_LOGGER_CONFIG } from './console-logger.js';
|
|
40
40
|
export type { LoggerFactoryConfig, LoggerProvider } from './logger-factory.js';
|
|
41
41
|
export { LoggerFactory, createLogger, getLogger } from './logger-factory.js';
|
|
42
|
+
export type { LogRedactionOptions } from './redaction.js';
|
|
43
|
+
export { redactLogValue, redactLogText, formatErrorForLog, isSensitiveLogKey } from './redaction.js';
|
|
42
44
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/logging/index.js
CHANGED
|
@@ -36,4 +36,5 @@
|
|
|
36
36
|
export { LogLevel, LOG_LEVEL_NAMES, parseLogLevel, isLogger } from './logger.js';
|
|
37
37
|
export { ConsoleLogger, NullLogger, DEFAULT_CONSOLE_LOGGER_CONFIG } from './console-logger.js';
|
|
38
38
|
export { LoggerFactory, createLogger, getLogger } from './logger-factory.js';
|
|
39
|
+
export { redactLogValue, redactLogText, formatErrorForLog, isSensitiveLogKey } from './redaction.js';
|
|
39
40
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agentic QE v3 - Log redaction (issue #740)
|
|
3
|
+
*
|
|
4
|
+
* Sink-side sanitizer applied before any log text is written. Redacts values
|
|
5
|
+
* under sensitive keys and credential-shaped strings anywhere in a value.
|
|
6
|
+
* Non-mutating, cycle-safe, bounded, never invokes getters or toJSON, and
|
|
7
|
+
* fails closed: a value that cannot be inspected is replaced, not printed.
|
|
8
|
+
*
|
|
9
|
+
* Heuristic redaction is defense in depth: it does not replace keeping
|
|
10
|
+
* payloads, headers and configuration out of log events in the first place.
|
|
11
|
+
*/
|
|
12
|
+
export interface LogRedactionOptions {
|
|
13
|
+
/** Nesting depth beyond which objects become '[object]' */
|
|
14
|
+
maxDepth?: number;
|
|
15
|
+
/** Array items / object keys kept per level */
|
|
16
|
+
maxEntries?: number;
|
|
17
|
+
/** Characters kept per string after redaction */
|
|
18
|
+
maxStringLength?: number;
|
|
19
|
+
}
|
|
20
|
+
export declare function isSensitiveLogKey(key: string): boolean;
|
|
21
|
+
/** Redact credential-shaped substrings from free text. */
|
|
22
|
+
export declare function redactLogText(text: string, maxLength?: number): string;
|
|
23
|
+
/** Return a sanitized, JSON-safe copy of `value`. The input is never modified. */
|
|
24
|
+
export declare function redactLogValue(value: unknown, options?: LogRedactionOptions): unknown;
|
|
25
|
+
/** Render a thrown value (Error or not) as redacted text for direct console output. */
|
|
26
|
+
export declare function formatErrorForLog(error: unknown): string;
|
|
27
|
+
//# sourceMappingURL=redaction.d.ts.map
|