agentic-qe 3.14.5 → 3.14.6
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 +76 -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 +7 -7
- package/dist/cli/chunks/adapter-UYOJPTOX.js +2 -0
- package/dist/cli/chunks/agent-booster-wasm-2YGML6OU.js +2 -0
- package/dist/cli/chunks/{agent-handler-V6CZ7Q6S.js → agent-handler-D5SSQYNU.js} +2 -2
- package/dist/cli/chunks/{agent-memory-branch-ZMD6ULC3.js → agent-memory-branch-YHPLTITV.js} +2 -2
- package/dist/cli/chunks/aqe-learning-engine-JR5AVQXR.js +2 -0
- package/dist/cli/chunks/{arena-QLSBESC7.js → arena-7BGOXGXO.js} +2 -2
- package/dist/cli/chunks/{arena-4UPAEHFT.js → arena-MCE6EU7K.js} +4 -4
- package/dist/cli/chunks/audit-BMWTQECB.js +4 -0
- package/dist/cli/chunks/base-DRZ2LS6X.js +2 -0
- package/dist/cli/chunks/{better-sqlite3-4DSBPDRH.js → better-sqlite3-PMUNGASU.js} +2 -2
- package/dist/cli/chunks/{brain-handler-GBY4EZ4P.js → brain-handler-QPUFYX7F.js} +3 -3
- package/dist/cli/chunks/{branch-enumerator-XYBVXCNO.js → branch-enumerator-WKFDGRN4.js} +2 -2
- package/dist/cli/chunks/{browser-32F6MREU.js → browser-VY5HKH5X.js} +2 -2
- package/dist/cli/chunks/browser-workflow-CJ7T3MXF.js +2 -0
- package/dist/cli/chunks/{chunk-C3Z4VVHP.js → chunk-257E2A5M.js} +5 -5
- package/dist/cli/chunks/{chunk-EFV4ADMO.js → chunk-2JVWITNK.js} +2 -2
- package/dist/cli/chunks/{chunk-IGBEJ4UJ.js → chunk-2NPKIBAZ.js} +2 -2
- package/dist/cli/chunks/{chunk-KIP6WZGV.js → chunk-2TMWAQQ3.js} +3 -3
- package/dist/cli/chunks/{chunk-DLF5BOJD.js → chunk-2YXGBZWV.js} +1 -1
- package/dist/cli/chunks/{chunk-KEY43ANX.js → chunk-3EA536JF.js} +2 -2
- package/dist/cli/chunks/{chunk-WX6RRIGW.js → chunk-3EZOZN25.js} +2 -2
- package/dist/cli/chunks/{chunk-BYG36QC5.js → chunk-3HZS4M3O.js} +2 -2
- package/dist/cli/chunks/{chunk-G3L5L6YQ.js → chunk-3NIG7S5W.js} +1 -1
- package/dist/cli/chunks/{chunk-CZO4BJG5.js → chunk-4N23RFDU.js} +2 -2
- package/dist/cli/chunks/{chunk-QWUXCG2L.js → chunk-5J6W7SIA.js} +1 -1
- package/dist/cli/chunks/{chunk-RD2VGOUH.js → chunk-5OOMJGFN.js} +1 -1
- package/dist/cli/chunks/{chunk-YDFL445W.js → chunk-5QQSIGUA.js} +2 -2
- package/dist/cli/chunks/{chunk-TUSSPKRM.js → chunk-5VFPCSK7.js} +1 -1
- package/dist/cli/chunks/{chunk-WLXK2KNU.js → chunk-62N4NUJH.js} +2 -2
- package/dist/cli/chunks/{chunk-JSZ663MU.js → chunk-64VGZQLB.js} +1 -1
- package/dist/cli/chunks/{chunk-UMGFMKDW.js → chunk-66VWCR67.js} +2 -2
- package/dist/cli/chunks/{chunk-6ITZZIQX.js → chunk-6LIHFV7O.js} +2 -2
- package/dist/cli/chunks/{chunk-DKUBQQFG.js → chunk-6OS76PHI.js} +2 -2
- package/dist/cli/chunks/{chunk-Y5L3ES4L.js → chunk-6RE3X4V5.js} +2 -2
- package/dist/cli/chunks/{chunk-CVMNJSCB.js → chunk-6SH5VZUD.js} +2 -2
- package/dist/cli/chunks/chunk-6SQM2MUX.js +4 -0
- package/dist/cli/chunks/{chunk-6CR4VQBQ.js → chunk-6U7LNMWZ.js} +2 -2
- package/dist/cli/chunks/{chunk-HYEJJJY3.js → chunk-72KXSMWI.js} +1 -1
- package/dist/cli/chunks/chunk-7CUQCCMD.js +27 -0
- package/dist/cli/chunks/chunk-7D3V65N5.js +2 -0
- package/dist/cli/chunks/{chunk-K7NJHFLZ.js → chunk-7J6QC567.js} +3 -3
- package/dist/cli/chunks/{chunk-6LKDHEBY.js → chunk-7LPR6HJG.js} +2 -2
- package/dist/cli/chunks/{chunk-RGGK6VZ7.js → chunk-7NITCZWD.js} +1 -1
- package/dist/cli/chunks/{chunk-IYTLXUBO.js → chunk-7Z5LHRC3.js} +2 -2
- package/dist/cli/chunks/{chunk-ZCWERUYB.js → chunk-AHKELLIO.js} +3 -3
- package/dist/cli/chunks/{chunk-IJHCIXJC.js → chunk-AIRGNL55.js} +2 -2
- package/dist/cli/chunks/{chunk-2OMLTYQK.js → chunk-AJRUJAAK.js} +1 -1
- package/dist/cli/chunks/{chunk-QYOGD2VW.js → chunk-AVBJYI5I.js} +1 -1
- package/dist/cli/chunks/{chunk-PSPKSUF6.js → chunk-B6D2CHEH.js} +1 -1
- package/dist/cli/chunks/{chunk-M23ZOZVY.js → chunk-B6MOJC3X.js} +1 -1
- package/dist/cli/chunks/{chunk-VD5IO5EO.js → chunk-BAMN2CHI.js} +1 -1
- package/dist/cli/chunks/{chunk-KO4FNAUR.js → chunk-BBT64TII.js} +3 -3
- package/dist/cli/chunks/{chunk-7JZJJA7U.js → chunk-BJTJLJRZ.js} +3 -3
- package/dist/cli/chunks/{chunk-LULD4JV2.js → chunk-BMAPORJ7.js} +2 -2
- package/dist/cli/chunks/{chunk-GTKCGPJZ.js → chunk-BPEDWS6O.js} +2 -2
- package/dist/cli/chunks/{chunk-3DDXWYMO.js → chunk-BVR7RMC5.js} +1 -1
- package/dist/cli/chunks/{chunk-52L77RMG.js → chunk-C6KWXUFJ.js} +2 -2
- package/dist/cli/chunks/{chunk-BJPL6THQ.js → chunk-CCK4BF76.js} +1 -1
- package/dist/cli/chunks/{chunk-RP2ZKPYV.js → chunk-CD542DNJ.js} +1 -1
- package/dist/cli/chunks/{chunk-AFEDJ3RU.js → chunk-CF2ISEOJ.js} +2 -2
- package/dist/cli/chunks/chunk-CM7U6TAX.js +5 -0
- package/dist/cli/chunks/{chunk-R74ZKREV.js → chunk-D45SG6CP.js} +1 -1
- package/dist/cli/chunks/{chunk-YXP6BKGS.js → chunk-D6CJIGRU.js} +89 -83
- package/dist/cli/chunks/{chunk-NVYBM3R4.js → chunk-DBDPRORT.js} +2 -2
- package/dist/cli/chunks/{chunk-CYE2TJFV.js → chunk-DHVX5UB2.js} +2 -2
- package/dist/cli/chunks/{chunk-XUR2M2WB.js → chunk-DK4XN4CU.js} +2 -2
- package/dist/cli/chunks/{chunk-W2XCZU62.js → chunk-DPYSUDAO.js} +1 -1
- package/dist/cli/chunks/{chunk-WJHWH5D2.js → chunk-DUYOVM5I.js} +2 -2
- package/dist/cli/chunks/{chunk-XLAUGSW7.js → chunk-DZ3AUAAB.js} +2 -2
- package/dist/cli/chunks/{chunk-37TUN44F.js → chunk-E6G2RD5H.js} +2 -2
- package/dist/cli/chunks/{chunk-ELBZON4V.js → chunk-EAY2JMZG.js} +2 -2
- package/dist/cli/chunks/{chunk-HSVKZ5KI.js → chunk-ELLBS5RP.js} +2 -2
- package/dist/cli/chunks/chunk-ENGZ4D5V.js +2 -0
- package/dist/cli/chunks/chunk-FBMN7B46.js +4 -0
- package/dist/cli/chunks/{chunk-F34OAHOM.js → chunk-FWASDOT2.js} +2 -2
- package/dist/cli/chunks/{chunk-E4AZXCT5.js → chunk-FZOBD67M.js} +1 -1
- package/dist/cli/chunks/{chunk-QZMUXJHZ.js → chunk-GDSXITFH.js} +2 -2
- package/dist/cli/chunks/{chunk-LSUILON7.js → chunk-GGRHV6D7.js} +1 -1
- package/dist/cli/chunks/{chunk-3YUB5HER.js → chunk-GPYVDFB3.js} +101 -101
- package/dist/cli/chunks/{chunk-4FWTLJEP.js → chunk-GSF6MB64.js} +2 -2
- package/dist/cli/chunks/{chunk-3KDL6QDK.js → chunk-H52HZ67P.js} +2 -2
- package/dist/cli/chunks/{chunk-2JGEZHWY.js → chunk-H5BS5VH7.js} +2 -2
- package/dist/cli/chunks/{chunk-SQF6HRXR.js → chunk-H6ZM3PUT.js} +1 -1
- package/dist/cli/chunks/{chunk-OEIQTWQP.js → chunk-HM6ZSCPI.js} +1 -1
- package/dist/cli/chunks/{chunk-URVHZPWY.js → chunk-HNFVJP4I.js} +2 -2
- package/dist/cli/chunks/{chunk-RD6TEZ64.js → chunk-I33ERSGB.js} +2 -2
- package/dist/cli/chunks/{chunk-IUDWEOLX.js → chunk-IAF6T27S.js} +2 -2
- package/dist/cli/chunks/{chunk-XZSMZHM2.js → chunk-IB27QACC.js} +2 -2
- package/dist/cli/chunks/{chunk-I6X3EGJI.js → chunk-ICTXTNQZ.js} +1 -1
- package/dist/cli/chunks/chunk-IG5GNEC6.js +4 -0
- package/dist/cli/chunks/{chunk-6A44AOGN.js → chunk-IQO7UCFR.js} +2 -2
- package/dist/cli/chunks/{chunk-R6IU3EWP.js → chunk-IV5UZOHH.js} +2 -2
- package/dist/cli/chunks/{chunk-VTOVWHEM.js → chunk-JBTPOIAC.js} +2 -2
- package/dist/cli/chunks/{chunk-KLTP5IDB.js → chunk-JIXUMYKZ.js} +1 -1
- package/dist/cli/chunks/{chunk-3VIXOHMS.js → chunk-JMONHE4B.js} +1 -1
- package/dist/cli/chunks/{chunk-SX4JLSLV.js → chunk-JVNTSNWU.js} +2 -2
- package/dist/cli/chunks/{chunk-JVQBWYHW.js → chunk-JXGFRBUO.js} +2 -2
- package/dist/cli/chunks/{chunk-HVXJC3OC.js → chunk-JZOS5FCX.js} +2 -2
- package/dist/cli/chunks/{chunk-XEZIIQYJ.js → chunk-KNNISEDY.js} +1 -1
- package/dist/cli/chunks/{chunk-73EI4C2E.js → chunk-L4RUBPLR.js} +2 -2
- package/dist/cli/chunks/{chunk-AF4XKLXO.js → chunk-LL3IGZBI.js} +2 -2
- package/dist/cli/chunks/{chunk-UJWAWIRV.js → chunk-MBRHSU6W.js} +10 -10
- package/dist/cli/chunks/{chunk-J5UNP6W3.js → chunk-MJS53PRX.js} +2 -2
- package/dist/cli/chunks/{chunk-EOR2UT72.js → chunk-MQROI74N.js} +2 -2
- package/dist/cli/chunks/{chunk-BXVAVFGU.js → chunk-MUOG6QXR.js} +2 -2
- package/dist/cli/chunks/{chunk-O3JTQ7N4.js → chunk-MW2GGZZ5.js} +1 -1
- package/dist/cli/chunks/{chunk-IIAR5S7Q.js → chunk-NHWGMJAP.js} +2 -2
- package/dist/cli/chunks/{chunk-WOIGKU2N.js → chunk-NMAIY4PX.js} +3 -3
- package/dist/cli/chunks/{chunk-QIRL6B3C.js → chunk-NQZ5AR3D.js} +2 -2
- package/dist/cli/chunks/{chunk-6TU7FEMD.js → chunk-P6OYS755.js} +1 -1
- package/dist/cli/chunks/{chunk-HVU64GP5.js → chunk-PI7TJS62.js} +2 -2
- package/dist/cli/chunks/{chunk-N7H767TP.js → chunk-PX5YDCRH.js} +2 -2
- package/dist/cli/chunks/{chunk-3EZ5DR2R.js → chunk-PZPWRQ2M.js} +2 -2
- package/dist/cli/chunks/{chunk-RKOUXVZZ.js → chunk-Q5XTSMWR.js} +2 -2
- package/dist/cli/chunks/{chunk-K27SU3RE.js → chunk-Q7EAGKAE.js} +2 -2
- package/dist/cli/chunks/{chunk-M5AEL7IS.js → chunk-QDFTT3RF.js} +2 -2
- package/dist/cli/chunks/{chunk-TY5WC3FT.js → chunk-QGA55PFM.js} +3 -3
- package/dist/cli/chunks/{chunk-NQI7FWCS.js → chunk-QW6VMTBR.js} +2 -2
- package/dist/cli/chunks/{chunk-BHFR2EXL.js → chunk-QZANMBIT.js} +1 -1
- package/dist/cli/chunks/{chunk-5D36YHS3.js → chunk-RETBYIAC.js} +4 -4
- package/dist/cli/chunks/{chunk-UKGXWW64.js → chunk-RFNPJK6N.js} +3 -3
- package/dist/cli/chunks/{chunk-G3W6BMVJ.js → chunk-RG52OKAM.js} +1 -1
- package/dist/cli/chunks/{chunk-DO6EI5KB.js → chunk-RSXXCL4A.js} +1 -1
- package/dist/cli/chunks/{chunk-E3W6XQ57.js → chunk-RTFO5UQH.js} +2 -2
- package/dist/cli/chunks/{chunk-DDCIYOGT.js → chunk-RZZCUIAI.js} +2 -2
- package/dist/cli/chunks/{chunk-C3HQL6S4.js → chunk-SDRHUMJB.js} +2 -2
- package/dist/cli/chunks/{chunk-KYA5LARK.js → chunk-SE4WIB26.js} +1 -1
- package/dist/cli/chunks/{chunk-NU7UTXMP.js → chunk-SESK3ARK.js} +2 -2
- package/dist/cli/chunks/{chunk-YQGPQBCX.js → chunk-SJUXE4IC.js} +2 -2
- package/dist/cli/chunks/{chunk-HBCGYMQU.js → chunk-SMDN3BQZ.js} +1 -1
- package/dist/cli/chunks/{chunk-D6OUCB2H.js → chunk-SNOBH4AZ.js} +2 -2
- package/dist/cli/chunks/{chunk-QRCIZFNK.js → chunk-SPV2VKC5.js} +2 -2
- package/dist/cli/chunks/chunk-TCHGOB2N.js +2 -0
- package/dist/cli/chunks/{chunk-2KJQ2UQE.js → chunk-TVYY3OCX.js} +1 -1
- package/dist/cli/chunks/{chunk-RIZVC4XY.js → chunk-UCFQALXO.js} +2 -2
- package/dist/cli/chunks/{chunk-XFPPERA2.js → chunk-UKA2KOXE.js} +2 -2
- package/dist/cli/chunks/{chunk-UTBYJ4RF.js → chunk-UNFFDHER.js} +16 -11
- package/dist/cli/chunks/{chunk-6VAZAHQG.js → chunk-UQ32JHES.js} +2 -2
- package/dist/cli/chunks/{chunk-CPC7FN52.js → chunk-V4DM6ELU.js} +2 -2
- package/dist/cli/chunks/{chunk-67YV75XP.js → chunk-VGFFFKGK.js} +2 -2
- package/dist/cli/chunks/{chunk-WK7B4B6Y.js → chunk-VMNWDJIZ.js} +2 -2
- package/dist/cli/chunks/chunk-W6HXLH5G.js +180 -0
- package/dist/cli/chunks/{chunk-7VFY7TUR.js → chunk-WCJBU2KI.js} +2 -2
- package/dist/cli/chunks/{chunk-JROVR6YS.js → chunk-WGM35YWL.js} +2 -2
- package/dist/cli/chunks/{chunk-IUHB5GVS.js → chunk-WO4QMXIG.js} +2 -2
- package/dist/cli/chunks/{chunk-JES6R5KP.js → chunk-XAS3XRYM.js} +1 -1
- package/dist/cli/chunks/chunk-Y3LZ35OG.js +2 -0
- package/dist/cli/chunks/{chunk-75QJ5HWE.js → chunk-Y3UOUNHM.js} +2 -2
- package/dist/cli/chunks/{chunk-WJTSY5MC.js → chunk-YFBSPLJG.js} +1 -1
- package/dist/cli/chunks/{chunk-DPBRWP4J.js → chunk-YHKEDEAA.js} +3 -3
- package/dist/cli/chunks/{chunk-NRE4NAVA.js → chunk-YS4FCTWF.js} +1 -1
- package/dist/cli/chunks/{chunk-I2NENQ44.js → chunk-YSLL6VSL.js} +2 -2
- package/dist/cli/chunks/chunk-Z6GGIRQQ.js +65 -0
- package/dist/cli/chunks/{chunk-E4EYPYR3.js → chunk-Z7WODOTH.js} +2 -2
- package/dist/cli/chunks/{chunk-7DETTOPZ.js → chunk-ZCRTRYXK.js} +2 -2
- package/dist/cli/chunks/{chunk-FUNGTIF2.js → chunk-ZEV3YTO7.js} +2 -2
- package/dist/cli/chunks/{chunk-SQKW3B6B.js → chunk-ZL6SYKUK.js} +1 -1
- package/dist/cli/chunks/{chunk-AMMQOV35.js → chunk-ZSPU4MOS.js} +2 -2
- package/dist/cli/chunks/{chunk-KKHYJF5U.js → chunk-ZVWVV4EX.js} +1 -1
- package/dist/cli/chunks/{ci-RACDAJMR.js → ci-W6K6G2KZ.js} +2 -2
- package/dist/cli/chunks/{ci-output-EHRSZBKG.js → ci-output-LDT24TS3.js} +2 -2
- package/dist/cli/chunks/{circuit-breaker-GBV7M5XG.js → circuit-breaker-F5V4KITU.js} +2 -2
- package/dist/cli/chunks/claude-flow-setup-DT6WQQVD.js +2 -0
- package/dist/cli/chunks/client-KHWJT6FB.js +2 -0
- package/dist/cli/chunks/{cline-installer-W4NMXJSG.js → cline-installer-G7TJOAEX.js} +2 -2
- package/dist/cli/chunks/{code-JWXJMYXB.js → code-PGE6A42V.js} +3 -3
- package/dist/cli/chunks/{code-index-extractor-RVI2IFTM.js → code-index-extractor-RNITH372.js} +2 -2
- package/dist/cli/chunks/{codex-installer-3BORJINH.js → codex-installer-LBX77AI3.js} +6 -6
- package/dist/cli/chunks/{completions-A55NCTAO.js → completions-4AWLAARX.js} +2 -2
- package/dist/cli/chunks/{complexity-analyzer-JCXHGGLY.js → complexity-analyzer-ZPNSS476.js} +2 -2
- package/dist/cli/chunks/{continuedev-installer-PUVFMGYW.js → continuedev-installer-UAPWX6OA.js} +2 -2
- package/dist/cli/chunks/{copilot-installer-4DCMYWHB.js → copilot-installer-BJN2YJGI.js} +2 -2
- package/dist/cli/chunks/core-handlers-HING5RRG.js +2 -0
- package/dist/cli/chunks/{cost-tracker-5TV2GGKY.js → cost-tracker-MHP2VJ63.js} +2 -2
- package/dist/cli/chunks/{coverage-NNWM7TX3.js → coverage-PQB4IEFG.js} +3 -3
- package/dist/cli/chunks/cross-domain-router-PQTD6AZN.js +2 -0
- package/dist/cli/chunks/{cursor-installer-4NCHGJGK.js → cursor-installer-ZXBWYAS3.js} +2 -2
- package/dist/cli/chunks/{daemon-T4JO4IXP.js → daemon-64C7R6OJ.js} +3 -3
- package/dist/cli/chunks/{daemon-QIKCXKWO.js → daemon-N2BEGEFY.js} +4 -4
- package/dist/cli/chunks/{dag-attention-scheduler-RPAAIDAD.js → dag-attention-scheduler-SPZDAPNL.js} +2 -2
- package/dist/cli/chunks/{detect-SBEEVDSN.js → detect-LXJBSSZW.js} +2 -2
- package/dist/cli/chunks/{dist-node-ZHI6NCSU.js → dist-node-U3TKZ2IZ.js} +2 -2
- package/dist/cli/chunks/{domain-handler-LBC3GJ7Z.js → domain-handler-3DDWUVSR.js} +2 -2
- package/dist/cli/chunks/{domain-plugins-H6IZ5USZ.js → domain-plugins-JJVWI4OQ.js} +2 -2
- package/dist/cli/chunks/domain-transfer-M36KUJ2U.js +2 -0
- package/dist/cli/chunks/dream-WUGRSNCV.js +2 -0
- package/dist/cli/chunks/{embed-and-insert-pattern-AHTR7CRU.js → embed-and-insert-pattern-JPAR7TXX.js} +2 -2
- package/dist/cli/chunks/{eval-DZU2KISM.js → eval-SOLG23EA.js} +2 -2
- package/dist/cli/chunks/{experience-capture-middleware-5IQCWKSL.js → experience-capture-middleware-T7G2VOOD.js} +3 -3
- package/dist/cli/chunks/{fast-paths-2KLDUWCY.js → fast-paths-32N3ELI4.js} +2 -2
- package/dist/cli/chunks/{feature-flags-N6UAEZY4.js → feature-flags-APJDQ4N7.js} +2 -2
- package/dist/cli/chunks/{feature-flags-7AC3XDZA.js → feature-flags-NAHKLDRN.js} +2 -2
- package/dist/cli/chunks/{file-discovery-5SDIW4V2.js → file-discovery-YKVM3MDB.js} +2 -2
- package/dist/cli/chunks/{fleet-ZIQCAZ2Y.js → fleet-55M5CJS4.js} +3 -3
- package/dist/cli/chunks/{gnn-wrapper-DUMBZJEV.js → gnn-wrapper-UD6E6S6Z.js} +2 -2
- package/dist/cli/chunks/{heartbeat-handler-6HVM6ZMR.js → heartbeat-handler-OYVW3VSC.js} +4 -4
- package/dist/cli/chunks/heartbeat-scheduler-33XX5XNQ.js +2 -0
- package/dist/cli/chunks/hnsw-adapter-XQPERX3H.js +2 -0
- package/dist/cli/chunks/hnsw-index-2GNXTWHH.js +2 -0
- package/dist/cli/chunks/{hnsw-legacy-bridge-5DRL5FLX.js → hnsw-legacy-bridge-HBYIS3ZW.js} +2 -2
- package/dist/cli/chunks/{hnswlib-node-GW67GTCL.js → hnswlib-node-EQPM42OU.js} +2 -2
- package/dist/cli/chunks/{hooks-QHH6FVO4.js → hooks-5ZSSJWO6.js} +10 -10
- package/dist/cli/chunks/hybrid-backend-CCF7URKI.js +2 -0
- package/dist/cli/chunks/{hypergraph-engine-7XDCCVG2.js → hypergraph-engine-XBGVQ4PD.js} +2 -2
- package/dist/cli/chunks/{hypergraph-handler-QHF7NOU5.js → hypergraph-handler-CAWAQ673.js} +3 -3
- package/dist/cli/chunks/impact-analyzer-HGKAZWIG.js +2 -0
- package/dist/cli/chunks/{init-handler-5UIVOM7K.js → init-handler-PRHXSARK.js} +6 -6
- package/dist/cli/chunks/init-wizard-72MFBI3G.js +2 -0
- package/dist/cli/chunks/kernel-BRCBVMSK.js +2 -0
- package/dist/cli/chunks/{kilocode-installer-TGGV6K5Q.js → kilocode-installer-F7LXBM7I.js} +2 -2
- package/dist/cli/chunks/{kiro-installer-4XYBHZWW.js → kiro-installer-NM723ZRG.js} +2 -2
- package/dist/cli/chunks/knowledge-graph-DG44IPEI.js +2 -0
- package/dist/cli/chunks/{learning-STE5W6BS.js → learning-5QYIDHH3.js} +3 -3
- package/dist/cli/chunks/{llm-router-NKF7J3RI.js → llm-router-43HKWPSX.js} +4 -4
- package/dist/cli/chunks/llm-router-service-24KXFX32.js +2 -0
- package/dist/cli/chunks/{load-B2T77UJQ.js → load-5YDBWSCS.js} +2 -2
- package/dist/cli/chunks/load-test-N4TAYJY3.js +2 -0
- package/dist/cli/chunks/mcp-UMAPMNMY.js +2 -0
- package/dist/cli/chunks/{memory-WRFZKG56.js → memory-FWCPCQFP.js} +5 -5
- package/dist/cli/chunks/memory-backend-NVYFYVAU.js +2 -0
- package/dist/cli/chunks/memory-handlers-UTWCNCHL.js +2 -0
- package/dist/cli/chunks/multi-model-executor-2XTBGLE4.js +14 -0
- package/dist/cli/chunks/{opencode-installer-J36EMQU7.js → opencode-installer-GIXOJ6NS.js} +2 -2
- package/dist/cli/chunks/orchestrator-VW6BKHLI.js +393 -0
- package/dist/cli/chunks/pattern-null-store-SBPNYDBR.js +2 -0
- package/dist/cli/chunks/{pattern-usage-recorder-BVMTWI3E.js → pattern-usage-recorder-7CEUC3J7.js} +2 -2
- package/dist/cli/chunks/{pipeline-OWAHDUAQ.js → pipeline-IGUQPPPO.js} +2 -2
- package/dist/cli/chunks/{platform-ANGBFWBV.js → platform-2P636I7B.js} +2 -2
- package/dist/cli/chunks/{plugin-OO7ON2YW.js → plugin-NY6SWDPE.js} +2 -2
- package/dist/cli/chunks/{prime-radiant-advanced-wasm-HFG3BXWU.js → prime-radiant-advanced-wasm-2UUDTIO2.js} +2 -2
- package/dist/cli/chunks/{project-root-LNOYVTYY.js → project-root-IOISG5KX.js} +2 -2
- package/dist/cli/chunks/protocol-executor-IBYEII5Q.js +2 -0
- package/dist/cli/chunks/{protocol-handler-CE3Q6LY4.js → protocol-handler-ZTPCRQ5W.js} +2 -2
- package/dist/cli/chunks/{prove-7XPN53PY.js → prove-SQX5A3IG.js} +2 -2
- package/dist/cli/chunks/qe-reasoning-bank-7IETWW6W.js +2 -0
- package/dist/cli/chunks/{quality-TT23JRFX.js → quality-DROILKRY.js} +2 -2
- package/dist/cli/chunks/{quality-gate-PPPRP255.js → quality-gate-PWKWDJY2.js} +3 -3
- package/dist/cli/chunks/queen-coordinator-NHUK2MWJ.js +2 -0
- package/dist/cli/chunks/{real-embeddings-EYNZIFJE.js → real-embeddings-P5U3MGYC.js} +2 -2
- package/dist/cli/chunks/{ref-validation-QQR64ZXD.js → ref-validation-KY73NQXD.js} +2 -2
- package/dist/cli/chunks/{roocode-installer-UIGS7ZJD.js → roocode-installer-6JPPRB3W.js} +2 -2
- package/dist/cli/chunks/router-SRSO3IHF.js +2 -0
- package/dist/cli/chunks/routing-feedback-PASRE5HY.js +2 -0
- package/dist/cli/chunks/{routing-handler-6AENUIRG.js → routing-handler-VTJIVFUO.js} +2 -2
- package/dist/cli/chunks/{ruvector-commands-5AWMEV34.js → ruvector-commands-C6RPSJJO.js} +2 -2
- package/dist/cli/chunks/rvf-dual-writer-4M4J67OU.js +2 -0
- package/dist/cli/chunks/rvf-migration-adapter-TSXGT5LF.js +2 -0
- package/dist/cli/chunks/{rvf-migration-coordinator-NWRJ7C22.js → rvf-migration-coordinator-R53URRIO.js} +2 -2
- package/dist/cli/chunks/rvf-native-adapter-MOF3E7BR.js +2 -0
- package/dist/cli/chunks/{rvf-store-integrity-ISKRP563.js → rvf-store-integrity-MMXN5TEJ.js} +2 -2
- package/dist/cli/chunks/safe-db-QJLFO33B.js +2 -0
- package/dist/cli/chunks/schedule-YIVXW5O2.js +2 -0
- package/dist/cli/chunks/scheduler-AON7DWSJ.js +2 -0
- package/dist/cli/chunks/{security-325A7FMB.js → security-3B3R2NL4.js} +3 -3
- package/dist/cli/chunks/shared-rvf-adapter-VIJB7JUS.js +2 -0
- package/dist/cli/chunks/{shared-rvf-dual-writer-THFDYS2Z.js → shared-rvf-dual-writer-UVWGDUWC.js} +2 -2
- package/dist/cli/chunks/sqlite-persistence-75VHKKQB.js +2 -0
- package/dist/cli/chunks/{standalone-memory-UD4MJ6GZ.js → standalone-memory-M4LWAAYZ.js} +2 -2
- package/dist/cli/chunks/{status-handler-CPFTN4XL.js → status-handler-YYFV6OZL.js} +2 -2
- package/dist/cli/chunks/{structural-health-2MG2IVBL.js → structural-health-27E6LLKB.js} +2 -2
- package/dist/cli/chunks/sync-26CEGSTC.js +2 -0
- package/dist/cli/chunks/{sync-EE4VVKOW.js → sync-J3LJ56WN.js} +2 -2
- package/dist/cli/chunks/{task-handler-7H5OYJG4.js → task-handler-4MCEBQZL.js} +2 -2
- package/dist/cli/chunks/{task-handlers-NH4GJHCJ.js → task-handlers-GYBAWKE2.js} +3 -3
- package/dist/cli/chunks/{test-MPHGT4T6.js → test-MPC5HRH5.js} +4 -4
- package/dist/cli/chunks/{test-scheduling-CHQ4ZLLJ.js → test-scheduling-ZJBFRZ3J.js} +3 -3
- package/dist/cli/chunks/token-bootstrap-2Y2XITBX.js +2 -0
- package/dist/cli/chunks/{token-usage-EBXUJNRB.js → token-usage-3X5WMTG2.js} +2 -2
- package/dist/cli/chunks/{transformers-ZEKS2OJZ.js → transformers-MVL4C5IX.js} +2 -2
- package/dist/cli/chunks/tree-sitter-wasm-parser-SLW65ZFO.js +2 -0
- package/dist/cli/chunks/{types-KYAA5VLV.js → types-TG5P3CRS.js} +2 -2
- package/dist/cli/chunks/unified-memory-UCQ6AB32.js +2 -0
- package/dist/cli/chunks/unified-memory-hnsw-IXYUMKRR.js +2 -0
- package/dist/cli/chunks/unified-persistence-7E6JQ4FZ.js +2 -0
- package/dist/cli/chunks/{upgrade-UJBJ5AYM.js → upgrade-ETBHDEPY.js} +2 -2
- package/dist/cli/chunks/{validate-RUV6YMWS.js → validate-C2A73LZK.js} +2 -2
- package/dist/cli/chunks/{validate-swarm-IVEVMGVM.js → validate-swarm-67XN42ML.js} +2 -2
- package/dist/cli/chunks/{vibium-HOGMFJ2Z.js → vibium-NILGKHLN.js} +2 -2
- package/dist/cli/chunks/visual-security-4VZXPEVG.js +2 -0
- package/dist/cli/chunks/{web-tree-sitter-AVWA6HKE.js → web-tree-sitter-USJN77P4.js} +2 -2
- package/dist/cli/chunks/{windsurf-installer-DAH7HI2W.js → windsurf-installer-5GGZXGJW.js} +2 -2
- package/dist/cli/chunks/witness-chain-IWS5ZHHL.js +2 -0
- package/dist/cli/chunks/witness-chain-JQA2VPZI.js +2 -0
- package/dist/cli/chunks/witness-chain-repair-4UA7IPS3.js +2 -0
- package/dist/cli/chunks/witness-chain-verifier-3GEADWPE.js +2 -0
- package/dist/cli/chunks/{witness-key-manager-JSTBMG43.js → witness-key-manager-ZWEIK3VJ.js} +2 -2
- package/dist/cli/chunks/{workflow-TWOIA6LZ.js → workflow-KHMVVBBA.js} +4 -4
- package/dist/cli/chunks/workflow-orchestrator-GI5NQH7C.js +2 -0
- package/dist/cli/chunks/wrappers-N6XIK5PT.js +2 -0
- package/dist/cli/commands/audit.d.ts +20 -2
- package/dist/cli/commands/audit.js +158 -16
- package/dist/cli/commands/claude-flow-setup.js +5 -4
- package/dist/cli/index.js +2 -1
- package/dist/init/agents-installer.d.ts +4 -0
- package/dist/init/agents-installer.js +24 -11
- 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/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/10-workers.js +7 -5
- package/dist/init/phases/12-verification.js +7 -2
- 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/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/kernel/kernel.js +3 -2
- package/dist/learning/pattern-store.d.ts +11 -0
- package/dist/learning/pattern-store.js +26 -8
- package/dist/learning/qe-patterns.d.ts +6 -0
- package/dist/learning/qe-patterns.js +7 -1
- package/dist/learning/qe-reasoning-bank.js +3 -0
- package/dist/learning/rvf-pattern-store.js +20 -7
- package/dist/learning/sqlite-persistence.d.ts +8 -1
- package/dist/learning/sqlite-persistence.js +49 -9
- 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 +435 -421
- package/dist/mcp/handlers/core-handlers.js +5 -4
- package/dist/mcp/protocol-server.js +2 -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/types.d.ts +4 -2
- 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/package.json +1 -1
- 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-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-J27F4NSB.js +0 -2
- package/dist/cli/chunks/chunk-MI5Q55DG.js +0 -65
- package/dist/cli/chunks/chunk-UDHVCKGA.js +0 -5
- package/dist/cli/chunks/chunk-XQSIRBKT.js +0 -180
- package/dist/cli/chunks/chunk-ZBABIZ2D.js +0 -2
- 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/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/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
|
@@ -54,6 +54,13 @@ export function hashEmbedding(text, dimension = 384) {
|
|
|
54
54
|
}
|
|
55
55
|
return embedding;
|
|
56
56
|
}
|
|
57
|
+
/**
|
|
58
|
+
* Lowercased letter/digit tokens with diacritics removed, approximating the
|
|
59
|
+
* FTS5 unicode61 tokenizer so query terms and stored text compare alike.
|
|
60
|
+
*/
|
|
61
|
+
function ftsTokens(text) {
|
|
62
|
+
return text.normalize('NFKD').replace(/\p{M}+/gu, '').toLowerCase().match(/[\p{L}\p{N}]+/gu) ?? [];
|
|
63
|
+
}
|
|
57
64
|
/**
|
|
58
65
|
* SQLite-based pattern persistence
|
|
59
66
|
*/
|
|
@@ -465,20 +472,29 @@ export class SQLitePatternStore {
|
|
|
465
472
|
}
|
|
466
473
|
/**
|
|
467
474
|
* FTS5 full-text search for patterns.
|
|
468
|
-
* Returns pattern IDs with BM25 relevance scores.
|
|
475
|
+
* Returns pattern IDs with BM25 relevance scores. `phrase` marks hits that
|
|
476
|
+
* also contain the whole query as a phrase (near-duplicate evidence).
|
|
477
|
+
* `coverage` is the fraction of distinct query terms the hit contains: an
|
|
478
|
+
* absolute measure, unlike `ftsScore`, which is relative to the best hit.
|
|
469
479
|
*/
|
|
470
480
|
searchFTS(query, limit = 20) {
|
|
471
481
|
if (!this.db)
|
|
472
482
|
throw new Error('Database not initialized');
|
|
473
483
|
if (!query.trim())
|
|
474
484
|
return [];
|
|
475
|
-
//
|
|
476
|
-
//
|
|
477
|
-
|
|
485
|
+
// #653: match any query term (BM25 ranks docs matching more/rarer terms
|
|
486
|
+
// higher). A whole-query phrase almost never matched sentence-style task
|
|
487
|
+
// queries. Terms are letters/digits only, quoted, so FTS5 syntax can't leak in.
|
|
488
|
+
const terms = [...new Set(ftsTokens(query))]
|
|
489
|
+
.filter(term => term.length >= 2)
|
|
490
|
+
.slice(0, 32);
|
|
491
|
+
if (terms.length === 0)
|
|
492
|
+
return [];
|
|
493
|
+
const sanitized = terms.map(term => `"${term}"`).join(' OR ');
|
|
478
494
|
const start = performance.now();
|
|
479
495
|
try {
|
|
480
496
|
const rows = this.db.prepare(`
|
|
481
|
-
SELECT p.id, rank AS fts_score
|
|
497
|
+
SELECT p.id, rank AS fts_score, p.name, p.description, p.pattern_type, p.qe_domain
|
|
482
498
|
FROM qe_patterns_fts fts
|
|
483
499
|
JOIN qe_patterns p ON p.rowid = fts.rowid
|
|
484
500
|
WHERE qe_patterns_fts MATCH ?
|
|
@@ -494,16 +510,40 @@ export class SQLitePatternStore {
|
|
|
494
510
|
// Use Math.max(maxScore, 1.0) to prevent single-result inflation:
|
|
495
511
|
// without this, a single FTS5 result always normalizes to 1.0
|
|
496
512
|
const maxAbsScore = Math.max(...rows.map(r => Math.abs(r.fts_score)), 1.0);
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
513
|
+
const phraseIds = rows.length > 0 ? this.searchFTSPhraseIds(query, limit) : new Set();
|
|
514
|
+
return rows.map(r => {
|
|
515
|
+
const docTerms = new Set(ftsTokens([r.name, r.description, r.pattern_type, r.qe_domain].filter(Boolean).join(' ')));
|
|
516
|
+
const matched = terms.filter(term => docTerms.has(term)).length;
|
|
517
|
+
return {
|
|
518
|
+
id: r.id,
|
|
519
|
+
ftsScore: Math.abs(r.fts_score) / maxAbsScore,
|
|
520
|
+
phrase: phraseIds.has(r.id),
|
|
521
|
+
coverage: matched / terms.length,
|
|
522
|
+
};
|
|
523
|
+
});
|
|
501
524
|
}
|
|
502
525
|
catch {
|
|
503
526
|
// FTS5 table may not exist yet (unified DB migrated before schema update)
|
|
504
527
|
return [];
|
|
505
528
|
}
|
|
506
529
|
}
|
|
530
|
+
/** IDs whose FTS5 text contains the whole query as one phrase. */
|
|
531
|
+
searchFTSPhraseIds(query, limit) {
|
|
532
|
+
// Whole query quoted as one phrase, internal quotes escaped (FTS5 syntax-safe)
|
|
533
|
+
const phrase = '"' + query.replace(/"/g, '""') + '"';
|
|
534
|
+
try {
|
|
535
|
+
const rows = this.db.prepare(`
|
|
536
|
+
SELECT p.id FROM qe_patterns_fts fts
|
|
537
|
+
JOIN qe_patterns p ON p.rowid = fts.rowid
|
|
538
|
+
WHERE qe_patterns_fts MATCH ?
|
|
539
|
+
LIMIT ?
|
|
540
|
+
`).all(phrase, limit);
|
|
541
|
+
return new Set(rows.map(r => r.id));
|
|
542
|
+
}
|
|
543
|
+
catch {
|
|
544
|
+
return new Set();
|
|
545
|
+
}
|
|
546
|
+
}
|
|
507
547
|
/** Last FTS5 search latency in ms, for instrumentation */
|
|
508
548
|
_lastFtsLatencyMs = 0;
|
|
509
549
|
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
|
|
@@ -0,0 +1,170 @@
|
|
|
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
|
+
import { redact } from '../routing/advisor/redaction.js';
|
|
13
|
+
const DEFAULTS = { maxDepth: 6, maxEntries: 100, maxStringLength: 8192 };
|
|
14
|
+
/** Strings above this size are dropped rather than scanned. */
|
|
15
|
+
const MAX_SCAN_LENGTH = 1_000_000;
|
|
16
|
+
const SENSITIVE_KEYS = new Set([
|
|
17
|
+
'auth', 'dsn', 'pwd', 'proxyauthorization', 'setcookie', 'sessionid',
|
|
18
|
+
]);
|
|
19
|
+
const SENSITIVE_SUFFIXES = [
|
|
20
|
+
'token', 'secret', 'password', 'passwd', 'passphrase', 'apikey', 'privatekey',
|
|
21
|
+
'accesskey', 'secretkey', 'credential', 'credentials', 'cookie', 'authorization',
|
|
22
|
+
'sessionid', 'connectionstring',
|
|
23
|
+
];
|
|
24
|
+
/** Log-specific credential shapes, applied before the shared advisor patterns. */
|
|
25
|
+
const LOG_PATTERNS = [
|
|
26
|
+
// Anchored on '://' rather than a scheme prefix: `\b[a-z][a-z0-9+.-]*://`
|
|
27
|
+
// backtracks quadratically on inputs such as 'a.a.a.…' (seconds per call at
|
|
28
|
+
// 100 KB). The scheme is left in place; an empty user (://:pw@) is covered.
|
|
29
|
+
[/(:\/\/)[^\s/@:"']*:[^\s/@"']+@/g, '$1<REDACTED:credentials>@'],
|
|
30
|
+
[/\b(Bearer|Basic)\s+[A-Za-z0-9._~+/=-]{8,}/gi, '$1 <REDACTED:credential>'],
|
|
31
|
+
[/\bsk-(?:ant-|proj-)?[A-Za-z0-9_-]{16,}/g, '<REDACTED:api_key>'],
|
|
32
|
+
[/\b(set-cookie|cookie):\s*[^\n]+/gi, '$1: <REDACTED:cookie>'],
|
|
33
|
+
// Compound query/assignment keys the shared pattern misses: access_token=, client_secret=
|
|
34
|
+
[/\b([A-Za-z0-9_-]{0,64}?[_-](?:token|secret|password|passwd))=([^\s&"'#]+)/gi, '$1=<REDACTED:credential>'],
|
|
35
|
+
];
|
|
36
|
+
/**
|
|
37
|
+
* JSON / repr serialized fields ("apiKey":"…", 'password': 123). The key is
|
|
38
|
+
* checked with isSensitiveLogKey() so text and structured values agree.
|
|
39
|
+
* Unterminated strings are redacted to end of line (fail closed).
|
|
40
|
+
*/
|
|
41
|
+
const SERIALIZED_FIELD = /(["'])([A-Za-z0-9_.-]{1,64})\1(\s*:\s*)("(?:[^"\\\n]|\\.)*"?|'(?:[^'\\\n]|\\.)*'?|-?\d[\d.eE+-]*)/g;
|
|
42
|
+
function redactSerializedFields(text) {
|
|
43
|
+
return text.replace(SERIALIZED_FIELD, (match, q, key, sep) => isSensitiveLogKey(key) ? `${q}${key}${q}${sep}${q}<REDACTED:sensitive-key>${q}` : match);
|
|
44
|
+
}
|
|
45
|
+
export function isSensitiveLogKey(key) {
|
|
46
|
+
const normalized = key.toLowerCase().replace(/[^a-z0-9]/g, '');
|
|
47
|
+
return SENSITIVE_KEYS.has(normalized) || SENSITIVE_SUFFIXES.some(suffix => normalized.endsWith(suffix));
|
|
48
|
+
}
|
|
49
|
+
/** Redact credential-shaped substrings from free text. */
|
|
50
|
+
export function redactLogText(text, maxLength = DEFAULTS.maxStringLength) {
|
|
51
|
+
// Untyped (JS / `any`) callers may pass a non-string message; render it
|
|
52
|
+
// safely instead of throwing from inside the logger.
|
|
53
|
+
if (typeof text !== 'string')
|
|
54
|
+
return formatErrorForLog(text);
|
|
55
|
+
if (text.length > MAX_SCAN_LENGTH)
|
|
56
|
+
return `[REDACTED:size-limit ${text.length} chars]`;
|
|
57
|
+
let result = text;
|
|
58
|
+
for (const [regex, replacement] of LOG_PATTERNS)
|
|
59
|
+
result = result.replace(regex, replacement);
|
|
60
|
+
result = redactSerializedFields(result);
|
|
61
|
+
result = redact(result, 'balanced').text;
|
|
62
|
+
return result.length > maxLength
|
|
63
|
+
? `${result.slice(0, maxLength)}…[truncated ${result.length - maxLength} chars]`
|
|
64
|
+
: result;
|
|
65
|
+
}
|
|
66
|
+
/** Return a sanitized, JSON-safe copy of `value`. The input is never modified. */
|
|
67
|
+
export function redactLogValue(value, options = {}) {
|
|
68
|
+
return sanitize(value, { ...DEFAULTS, ...options }, 0, []);
|
|
69
|
+
}
|
|
70
|
+
/** Render a thrown value (Error or not) as redacted text for direct console output. */
|
|
71
|
+
export function formatErrorForLog(error) {
|
|
72
|
+
try {
|
|
73
|
+
if (error instanceof Error) {
|
|
74
|
+
let text = redactLogText(error.stack || `${error.name}: ${error.message}`);
|
|
75
|
+
let cause = error.cause;
|
|
76
|
+
for (let hops = 0; cause !== undefined && hops < 3; hops++) {
|
|
77
|
+
text += `\nCaused by: ${cause instanceof Error
|
|
78
|
+
? redactLogText(cause.stack || `${cause.name}: ${cause.message}`)
|
|
79
|
+
: JSON.stringify(redactLogValue(cause, { maxDepth: 3 }))}`;
|
|
80
|
+
cause = cause instanceof Error ? cause.cause : undefined;
|
|
81
|
+
}
|
|
82
|
+
return text;
|
|
83
|
+
}
|
|
84
|
+
return typeof error === 'string'
|
|
85
|
+
? redactLogText(error)
|
|
86
|
+
: JSON.stringify(redactLogValue(error, { maxDepth: 3 })) ?? String(error);
|
|
87
|
+
}
|
|
88
|
+
catch {
|
|
89
|
+
return '[REDACTED:sanitization-failed]';
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
function sanitize(value, opts, depth, ancestors) {
|
|
93
|
+
try {
|
|
94
|
+
if (value === null || value === undefined || typeof value === 'number' || typeof value === 'boolean')
|
|
95
|
+
return value;
|
|
96
|
+
if (typeof value === 'string')
|
|
97
|
+
return redactLogText(value, opts.maxStringLength);
|
|
98
|
+
if (typeof value === 'bigint')
|
|
99
|
+
return value.toString();
|
|
100
|
+
if (typeof value === 'symbol')
|
|
101
|
+
return value.toString();
|
|
102
|
+
if (typeof value === 'function')
|
|
103
|
+
return '[function]';
|
|
104
|
+
const obj = value;
|
|
105
|
+
if (ancestors.includes(obj))
|
|
106
|
+
return '[circular]';
|
|
107
|
+
if (depth >= opts.maxDepth)
|
|
108
|
+
return '[object]';
|
|
109
|
+
if (ArrayBuffer.isView(obj))
|
|
110
|
+
return `[binary ${obj.byteLength} bytes]`;
|
|
111
|
+
if (obj instanceof ArrayBuffer)
|
|
112
|
+
return `[binary ${obj.byteLength} bytes]`;
|
|
113
|
+
if (obj instanceof Date)
|
|
114
|
+
return Number.isNaN(obj.getTime()) ? '[invalid date]' : obj.toISOString();
|
|
115
|
+
if (obj instanceof Map || obj instanceof Set)
|
|
116
|
+
return `[${obj.constructor.name}(${obj.size})]`;
|
|
117
|
+
const path = [...ancestors, obj];
|
|
118
|
+
if (Array.isArray(obj)) {
|
|
119
|
+
const items = obj.slice(0, opts.maxEntries).map(item => sanitize(item, opts, depth + 1, path));
|
|
120
|
+
if (obj.length > opts.maxEntries)
|
|
121
|
+
items.push(`[+${obj.length - opts.maxEntries} more]`);
|
|
122
|
+
return items;
|
|
123
|
+
}
|
|
124
|
+
if (obj instanceof Error)
|
|
125
|
+
return sanitizeError(obj, opts, depth, path);
|
|
126
|
+
return sanitizeRecord(obj, Object.keys(obj), opts, depth, path);
|
|
127
|
+
}
|
|
128
|
+
catch {
|
|
129
|
+
return '[REDACTED:sanitization-failed]';
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
function sanitizeError(error, opts, depth, path) {
|
|
133
|
+
const out = {
|
|
134
|
+
name: redactLogText(String(error.name), opts.maxStringLength),
|
|
135
|
+
message: redactLogText(String(error.message), opts.maxStringLength),
|
|
136
|
+
};
|
|
137
|
+
if (typeof error.stack === 'string')
|
|
138
|
+
out.stack = redactLogText(error.stack, opts.maxStringLength);
|
|
139
|
+
const code = error.code;
|
|
140
|
+
if (typeof code === 'string' || typeof code === 'number')
|
|
141
|
+
out.code = code;
|
|
142
|
+
const cause = error.cause;
|
|
143
|
+
if (cause !== undefined)
|
|
144
|
+
out.cause = sanitize(cause, opts, depth + 1, path);
|
|
145
|
+
return out;
|
|
146
|
+
}
|
|
147
|
+
function sanitizeRecord(obj, keys, opts, depth, path) {
|
|
148
|
+
const out = {};
|
|
149
|
+
for (const key of keys.slice(0, opts.maxEntries)) {
|
|
150
|
+
const descriptor = Object.getOwnPropertyDescriptor(obj, key);
|
|
151
|
+
if (!descriptor)
|
|
152
|
+
continue;
|
|
153
|
+
if (!('value' in descriptor)) {
|
|
154
|
+
out[key] = '[getter]';
|
|
155
|
+
continue;
|
|
156
|
+
}
|
|
157
|
+
const v = descriptor.value;
|
|
158
|
+
// Numbers are redacted too (numeric PINs, session IDs); counters such as
|
|
159
|
+
// maxTokens/tokensUsed do not match a sensitive suffix in the first place.
|
|
160
|
+
if (isSensitiveLogKey(key) && v !== null && v !== undefined && typeof v !== 'boolean') {
|
|
161
|
+
out[key] = '[REDACTED:sensitive-key]';
|
|
162
|
+
continue;
|
|
163
|
+
}
|
|
164
|
+
out[key] = sanitize(v, opts, depth + 1, path);
|
|
165
|
+
}
|
|
166
|
+
if (keys.length > opts.maxEntries)
|
|
167
|
+
out['[truncated]'] = `${keys.length - opts.maxEntries} more keys`;
|
|
168
|
+
return out;
|
|
169
|
+
}
|
|
170
|
+
//# sourceMappingURL=redaction.js.map
|