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
|
@@ -115,14 +115,15 @@ export async function handleFleetInit(params) {
|
|
|
115
115
|
try {
|
|
116
116
|
// If already initialized, return existing fleet
|
|
117
117
|
if (state.initialized && state.kernel && state.queen) {
|
|
118
|
+
const effectiveConfig = state.kernel.getConfig();
|
|
118
119
|
return {
|
|
119
120
|
success: true,
|
|
120
121
|
data: {
|
|
121
122
|
fleetId: state.fleetId,
|
|
122
|
-
topology:
|
|
123
|
-
maxAgents:
|
|
124
|
-
//
|
|
125
|
-
enabledDomains:
|
|
123
|
+
topology: state.topology,
|
|
124
|
+
maxAgents: effectiveConfig.maxConcurrentAgents,
|
|
125
|
+
// Report the running kernel, not the later caller's requested domains.
|
|
126
|
+
enabledDomains: effectiveConfig.enabledDomains.filter(d => d !== 'coordination'),
|
|
126
127
|
status: 'ready',
|
|
127
128
|
},
|
|
128
129
|
};
|
|
@@ -41,6 +41,7 @@ import { getLoadBalancer, } from './load-balancer.js';
|
|
|
41
41
|
import { getPerformanceMonitor, } from './performance-monitor.js';
|
|
42
42
|
// ADR-062: Loop detection for MCP tool calls
|
|
43
43
|
import { ToolCallSignatureTracker } from '../kernel/anti-drift-middleware.js';
|
|
44
|
+
import { formatErrorForLog } from '../logging/redaction.js';
|
|
44
45
|
import { createRequire } from 'module';
|
|
45
46
|
const _require = createRequire(import.meta.url);
|
|
46
47
|
const _pkg = _require('../../package.json');
|
|
@@ -550,7 +551,7 @@ export class MCPProtocolServer {
|
|
|
550
551
|
catch (err) {
|
|
551
552
|
// Preserve the diagnostic for operators without exposing it in the MCP
|
|
552
553
|
// response or AG-UI event. Stderr keeps stdio protocol output valid.
|
|
553
|
-
console.error(`[MCP] Tool ${name} failed:`, err);
|
|
554
|
+
console.error(`[MCP] Tool ${name} failed:`, formatErrorForLog(err));
|
|
554
555
|
const error = err instanceof Error ? err : new Error('Tool execution failed');
|
|
555
556
|
// IMP-08: Detect context overflow (413) and trigger reactive compaction
|
|
556
557
|
const errorMsg = error.message || '';
|
package/dist/mcp/tools/base.d.ts
CHANGED
|
@@ -153,9 +153,11 @@ export interface MCPToolContext {
|
|
|
153
153
|
kernel?: import('../../kernel/interfaces.js').QEKernel;
|
|
154
154
|
}
|
|
155
155
|
/**
|
|
156
|
-
* Data source tracking for audit/transparency
|
|
156
|
+
* Data source tracking for audit/transparency.
|
|
157
|
+
* 'estimated': computed from real inputs mixed with assumed/default values
|
|
158
|
+
* (the result names which ones) — never presented as fully real (#535).
|
|
157
159
|
*/
|
|
158
|
-
export type DataSource = 'real' | 'demo' | 'fallback';
|
|
160
|
+
export type DataSource = 'real' | 'demo' | 'fallback' | 'estimated';
|
|
159
161
|
/**
|
|
160
162
|
* Logger interface for tool operations
|
|
161
163
|
*/
|
|
@@ -196,6 +198,11 @@ export declare abstract class MCPToolBase<TParams extends Record<string, unknown
|
|
|
196
198
|
* MUST be called when returning sample data for transparency
|
|
197
199
|
*/
|
|
198
200
|
protected markAsDemoData(context: MCPToolContext, reason: string): void;
|
|
201
|
+
/**
|
|
202
|
+
* Mark result as partly derived from assumed/default values (#535). The
|
|
203
|
+
* tool's result must say which values were assumed.
|
|
204
|
+
*/
|
|
205
|
+
protected markAsEstimatedData(): void;
|
|
199
206
|
/**
|
|
200
207
|
* Mark result as coming from real service data
|
|
201
208
|
*/
|
package/dist/mcp/tools/base.js
CHANGED
|
@@ -277,6 +277,13 @@ export class MCPToolBase {
|
|
|
277
277
|
demoMode: context.demoMode,
|
|
278
278
|
});
|
|
279
279
|
}
|
|
280
|
+
/**
|
|
281
|
+
* Mark result as partly derived from assumed/default values (#535). The
|
|
282
|
+
* tool's result must say which values were assumed.
|
|
283
|
+
*/
|
|
284
|
+
markAsEstimatedData() {
|
|
285
|
+
this.currentDataSource = 'estimated';
|
|
286
|
+
}
|
|
280
287
|
/**
|
|
281
288
|
* Mark result as coming from real service data
|
|
282
289
|
*/
|
|
@@ -10,6 +10,32 @@
|
|
|
10
10
|
import { MCPToolBase, } from '../base.js';
|
|
11
11
|
import { createCoherenceService, wasmLoader, } from '../../../integrations/coherence/index.js';
|
|
12
12
|
import { toErrorMessage } from '../../../shared/error-utils.js';
|
|
13
|
+
import { tallyVotes, describeBreakdown } from '../../../integrations/coherence/vote-tally.js';
|
|
14
|
+
/**
|
|
15
|
+
* Check every vote's shape. Returns an error message naming the first bad
|
|
16
|
+
* field, or null when all votes are usable.
|
|
17
|
+
*/
|
|
18
|
+
function validateVotes(votes) {
|
|
19
|
+
const shape = 'Each vote must be { agentId: string, verdict: string | number | boolean, confidence: number 0-1 }.';
|
|
20
|
+
for (let i = 0; i < votes.length; i++) {
|
|
21
|
+
const vote = votes[i];
|
|
22
|
+
if (typeof vote !== 'object' || vote === null || Array.isArray(vote)) {
|
|
23
|
+
return `votes[${i}] must be an object. ${shape}`;
|
|
24
|
+
}
|
|
25
|
+
const { agentId, verdict, confidence } = vote;
|
|
26
|
+
if (typeof agentId !== 'string' || agentId.trim() === '') {
|
|
27
|
+
return `votes[${i}].agentId must be a non-empty string. ${shape}`;
|
|
28
|
+
}
|
|
29
|
+
const verdictType = typeof verdict;
|
|
30
|
+
if (verdictType !== 'string' && verdictType !== 'number' && verdictType !== 'boolean') {
|
|
31
|
+
return `votes[${i}].verdict is required (string, number, or boolean), got ${verdict === null ? 'null' : verdictType}. ${shape}`;
|
|
32
|
+
}
|
|
33
|
+
if (typeof confidence !== 'number' || !Number.isFinite(confidence) || confidence < 0 || confidence > 1) {
|
|
34
|
+
return `votes[${i}].confidence must be a number between 0 and 1, got ${JSON.stringify(confidence) ?? 'undefined'}. ${shape}`;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
13
39
|
// ============================================================================
|
|
14
40
|
// Schema
|
|
15
41
|
// ============================================================================
|
|
@@ -18,7 +44,22 @@ const COHERENCE_CONSENSUS_SCHEMA = {
|
|
|
18
44
|
properties: {
|
|
19
45
|
votes: {
|
|
20
46
|
type: 'array',
|
|
21
|
-
description: 'Array of agent votes to verify for consensus'
|
|
47
|
+
description: 'Array of agent votes to verify for consensus (at least 2). Each vote is an object ' +
|
|
48
|
+
'{ agentId: string, verdict: string | number | boolean, confidence: number 0-1, ' +
|
|
49
|
+
'agentType?: string, reasoning?: string }.',
|
|
50
|
+
items: {
|
|
51
|
+
type: 'object',
|
|
52
|
+
description: 'One agent vote',
|
|
53
|
+
properties: {
|
|
54
|
+
agentId: { type: 'string', description: 'Agent identifier', minLength: 1 },
|
|
55
|
+
agentType: { type: 'string', description: 'Agent type (default: worker)' },
|
|
56
|
+
// `verdict` may be a string, number, or boolean, which this schema
|
|
57
|
+
// type cannot express; it is required below and checked in execute().
|
|
58
|
+
confidence: { type: 'number', description: 'Confidence in the verdict', minimum: 0, maximum: 1 },
|
|
59
|
+
reasoning: { type: 'string', description: 'Optional reasoning text' },
|
|
60
|
+
},
|
|
61
|
+
required: ['agentId', 'verdict', 'confidence'],
|
|
62
|
+
},
|
|
22
63
|
},
|
|
23
64
|
confidenceThreshold: {
|
|
24
65
|
type: 'number',
|
|
@@ -102,6 +143,13 @@ export class CoherenceConsensusTool extends MCPToolBase {
|
|
|
102
143
|
error: 'At least two votes are required to verify consensus',
|
|
103
144
|
};
|
|
104
145
|
}
|
|
146
|
+
// A vote without a usable verdict would be grouped as the string
|
|
147
|
+
// "undefined"; three such votes looked like a unanimous false consensus
|
|
148
|
+
// even for a 2-1 split sent under another key (issue #535).
|
|
149
|
+
const voteError = validateVotes(votes);
|
|
150
|
+
if (voteError) {
|
|
151
|
+
return { success: false, error: voteError };
|
|
152
|
+
}
|
|
105
153
|
try {
|
|
106
154
|
// Get service
|
|
107
155
|
const service = await this.getService();
|
|
@@ -152,7 +200,8 @@ export class CoherenceConsensusTool extends MCPToolBase {
|
|
|
152
200
|
success: true,
|
|
153
201
|
data: {
|
|
154
202
|
...fallbackResult,
|
|
155
|
-
recommendation:
|
|
203
|
+
recommendation: `Running in fallback mode (simple analysis): ${describeBreakdown(tallyVotes(votes))} ` +
|
|
204
|
+
`across ${votes.length} votes. ` +
|
|
156
205
|
'Install prime-radiant-advanced-wasm for spectral consensus analysis.',
|
|
157
206
|
usedFallback: true,
|
|
158
207
|
executionTimeMs: Date.now() - startTime,
|
|
@@ -9,19 +9,21 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import { MCPToolBase, MCPToolConfig, MCPToolContext } from '../base.js';
|
|
11
11
|
import { ToolResult } from '../../types.js';
|
|
12
|
-
import {
|
|
12
|
+
import { type WorldStatePatch, type WorldStateProvenance, type WorldStateSources } from './world-state.js';
|
|
13
13
|
/**
|
|
14
14
|
* Parameters for GOAP plan tool
|
|
15
15
|
*/
|
|
16
16
|
export interface GOAPPlanParams {
|
|
17
17
|
/** Goal name (named goal) or custom goal conditions object */
|
|
18
18
|
goal: string | Record<string, unknown>;
|
|
19
|
-
/** Current world state (auto-detected if not provided) */
|
|
20
|
-
currentState?:
|
|
19
|
+
/** Current world state (auto-detected if not provided; may be partial) */
|
|
20
|
+
currentState?: WorldStatePatch;
|
|
21
21
|
/** Plan constraints */
|
|
22
22
|
constraints?: {
|
|
23
23
|
maxCost?: number;
|
|
24
24
|
maxDurationMs?: number;
|
|
25
|
+
/** Maximum number of plan steps (positive integer) */
|
|
26
|
+
maxSteps?: number;
|
|
25
27
|
requiredAgentTypes?: string[];
|
|
26
28
|
excludedActions?: string[];
|
|
27
29
|
};
|
|
@@ -46,6 +48,13 @@ export interface GOAPPlanResult {
|
|
|
46
48
|
stepCount: number;
|
|
47
49
|
reusedFrom?: string;
|
|
48
50
|
similarityScore?: number;
|
|
51
|
+
/**
|
|
52
|
+
* Where each start-state field came from ('live' | 'measured' | 'caller' |
|
|
53
|
+
* 'default'). Issue #535: the plan is only as real as its start state.
|
|
54
|
+
*/
|
|
55
|
+
stateProvenance: WorldStateProvenance;
|
|
56
|
+
/** Start-state fields that were DEFAULT_V3_WORLD_STATE assumptions. */
|
|
57
|
+
defaultedFields: string[];
|
|
49
58
|
}
|
|
50
59
|
/**
|
|
51
60
|
* GOAP Plan MCP Tool
|
|
@@ -53,7 +62,10 @@ export interface GOAPPlanResult {
|
|
|
53
62
|
* Finds optimal action sequences to achieve QE goals using A* search.
|
|
54
63
|
*/
|
|
55
64
|
export declare class GOAPPlanTool extends MCPToolBase<GOAPPlanParams, GOAPPlanResult> {
|
|
65
|
+
private readonly worldStateSources;
|
|
56
66
|
private planner;
|
|
67
|
+
/** World-state sources; injectable for tests (defaults read live state). */
|
|
68
|
+
constructor(worldStateSources?: WorldStateSources);
|
|
57
69
|
readonly config: MCPToolConfig;
|
|
58
70
|
private buildSchema;
|
|
59
71
|
/**
|
|
@@ -67,11 +79,12 @@ export declare class GOAPPlanTool extends MCPToolBase<GOAPPlanParams, GOAPPlanRe
|
|
|
67
79
|
/**
|
|
68
80
|
* Execute the GOAP planning
|
|
69
81
|
*/
|
|
70
|
-
execute(params: GOAPPlanParams,
|
|
82
|
+
execute(params: GOAPPlanParams, _context: MCPToolContext): Promise<ToolResult<GOAPPlanResult>>;
|
|
71
83
|
/**
|
|
72
|
-
*
|
|
73
|
-
*
|
|
84
|
+
* Validate `constraints` (issue #535): must be an object, only known keys,
|
|
85
|
+
* numeric limits must be numbers, maxSteps a positive integer, and the
|
|
86
|
+
* list constraints string arrays.
|
|
74
87
|
*/
|
|
75
|
-
private
|
|
88
|
+
private validateConstraints;
|
|
76
89
|
}
|
|
77
90
|
//# sourceMappingURL=goap-plan.d.ts.map
|
|
@@ -9,7 +9,16 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import { MCPToolBase, } from '../base.js';
|
|
11
11
|
import { toErrorMessage } from '../../../shared/error-utils.js';
|
|
12
|
-
import { getSharedGOAPPlanner,
|
|
12
|
+
import { getSharedGOAPPlanner, validateMaxSteps, } from '../../../planning/index.js';
|
|
13
|
+
import { detectWorldState, overlayCallerState, validateWorldStatePatch, defaultedFields, } from './world-state.js';
|
|
14
|
+
/** Constraint keys goap_plan understands; anything else is rejected (#535). */
|
|
15
|
+
const KNOWN_CONSTRAINT_KEYS = [
|
|
16
|
+
'maxCost',
|
|
17
|
+
'maxDurationMs',
|
|
18
|
+
'maxSteps',
|
|
19
|
+
'requiredAgentTypes',
|
|
20
|
+
'excludedActions',
|
|
21
|
+
];
|
|
13
22
|
// ============================================================================
|
|
14
23
|
// Tool Implementation
|
|
15
24
|
// ============================================================================
|
|
@@ -19,7 +28,13 @@ import { getSharedGOAPPlanner, DEFAULT_V3_WORLD_STATE, } from '../../../planning
|
|
|
19
28
|
* Finds optimal action sequences to achieve QE goals using A* search.
|
|
20
29
|
*/
|
|
21
30
|
export class GOAPPlanTool extends MCPToolBase {
|
|
31
|
+
worldStateSources;
|
|
22
32
|
planner = null;
|
|
33
|
+
/** World-state sources; injectable for tests (defaults read live state). */
|
|
34
|
+
constructor(worldStateSources = {}) {
|
|
35
|
+
super();
|
|
36
|
+
this.worldStateSources = worldStateSources;
|
|
37
|
+
}
|
|
23
38
|
config = {
|
|
24
39
|
name: 'qe/planning/goap_plan',
|
|
25
40
|
description: 'Find optimal action plan to achieve a QE goal using A* search. ' +
|
|
@@ -52,6 +67,11 @@ export class GOAPPlanTool extends MCPToolBase {
|
|
|
52
67
|
type: 'number',
|
|
53
68
|
description: 'Maximum total duration in milliseconds',
|
|
54
69
|
},
|
|
70
|
+
maxSteps: {
|
|
71
|
+
type: 'number',
|
|
72
|
+
description: 'Maximum number of steps (actions) in the plan; positive integer',
|
|
73
|
+
minimum: 1,
|
|
74
|
+
},
|
|
55
75
|
requiredAgentTypes: {
|
|
56
76
|
type: 'array',
|
|
57
77
|
description: 'Only use actions that these agent types can execute',
|
|
@@ -87,12 +107,18 @@ export class GOAPPlanTool extends MCPToolBase {
|
|
|
87
107
|
/**
|
|
88
108
|
* Execute the GOAP planning
|
|
89
109
|
*/
|
|
90
|
-
async execute(params,
|
|
110
|
+
async execute(params, _context) {
|
|
91
111
|
try {
|
|
112
|
+
// Issue #535: nested constraint properties aren't covered by the base
|
|
113
|
+
// schema validation (and the MCP bridge only exposes top-level
|
|
114
|
+
// params), so validate them here instead of silently ignoring them.
|
|
115
|
+
const constraintError = this.validateConstraints(params.constraints);
|
|
116
|
+
if (constraintError) {
|
|
117
|
+
return { success: false, error: constraintError };
|
|
118
|
+
}
|
|
92
119
|
const planner = await this.getPlanner();
|
|
93
120
|
// Resolve goal to conditions
|
|
94
121
|
let goalConditions;
|
|
95
|
-
let goalName;
|
|
96
122
|
if (typeof params.goal === 'string') {
|
|
97
123
|
// Look up named goal
|
|
98
124
|
const namedGoals = await planner.getGoals();
|
|
@@ -105,20 +131,34 @@ export class GOAPPlanTool extends MCPToolBase {
|
|
|
105
131
|
};
|
|
106
132
|
}
|
|
107
133
|
goalConditions = found.conditions;
|
|
108
|
-
goalName = found.name;
|
|
109
134
|
}
|
|
110
135
|
else {
|
|
111
136
|
// Use custom goal conditions
|
|
112
137
|
goalConditions = params.goal;
|
|
113
|
-
goalName = 'custom';
|
|
114
138
|
}
|
|
115
|
-
//
|
|
116
|
-
|
|
139
|
+
// Issue #535: start from the live/measured world state (not a static
|
|
140
|
+
// DEFAULT_V3_WORLD_STATE copy), overlaid with any caller-supplied
|
|
141
|
+
// fields, and keep track of which values are assumptions.
|
|
142
|
+
if (params.currentState !== undefined) {
|
|
143
|
+
const stateError = validateWorldStatePatch(params.currentState, [
|
|
144
|
+
...planner.getReferencedStateKeys(),
|
|
145
|
+
...Object.keys(goalConditions),
|
|
146
|
+
]);
|
|
147
|
+
if (stateError) {
|
|
148
|
+
return { success: false, error: `Invalid currentState: ${stateError}` };
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
const detected = params.currentState
|
|
152
|
+
? overlayCallerState(await detectWorldState(this.worldStateSources), params.currentState)
|
|
153
|
+
: await detectWorldState(this.worldStateSources);
|
|
154
|
+
const currentState = detected.state;
|
|
155
|
+
const defaulted = defaultedFields(detected.provenance);
|
|
117
156
|
// Build constraints
|
|
118
157
|
const constraints = params.constraints
|
|
119
158
|
? {
|
|
120
159
|
maxCost: params.constraints.maxCost,
|
|
121
160
|
maxDurationMs: params.constraints.maxDurationMs,
|
|
161
|
+
maxSteps: params.constraints.maxSteps,
|
|
122
162
|
requiredAgentTypes: params.constraints.requiredAgentTypes,
|
|
123
163
|
excludedActions: params.constraints.excludedActions,
|
|
124
164
|
}
|
|
@@ -126,14 +166,23 @@ export class GOAPPlanTool extends MCPToolBase {
|
|
|
126
166
|
// Find plan using A* search
|
|
127
167
|
const plan = await planner.findPlan(currentState, goalConditions, constraints);
|
|
128
168
|
if (!plan) {
|
|
169
|
+
const stepHint = constraints?.maxSteps !== undefined
|
|
170
|
+
? ` (maxSteps: ${constraints.maxSteps} — the goal may need more steps)`
|
|
171
|
+
: '';
|
|
129
172
|
return {
|
|
130
173
|
success: false,
|
|
131
|
-
error:
|
|
174
|
+
error: `No valid plan found for the given goal and constraints${stepHint}. ` +
|
|
132
175
|
'Try relaxing constraints or seeding more actions.',
|
|
133
176
|
};
|
|
134
177
|
}
|
|
135
|
-
//
|
|
136
|
-
|
|
178
|
+
// The search is real; the start state is only 'real' if nothing in it
|
|
179
|
+
// was an assumed default.
|
|
180
|
+
if (defaulted.length === 0) {
|
|
181
|
+
this.markAsRealData();
|
|
182
|
+
}
|
|
183
|
+
else {
|
|
184
|
+
this.markAsEstimatedData();
|
|
185
|
+
}
|
|
137
186
|
return {
|
|
138
187
|
success: true,
|
|
139
188
|
data: {
|
|
@@ -151,6 +200,8 @@ export class GOAPPlanTool extends MCPToolBase {
|
|
|
151
200
|
stepCount: plan.actions.length,
|
|
152
201
|
reusedFrom: plan.reusedFrom,
|
|
153
202
|
similarityScore: plan.similarityScore,
|
|
203
|
+
stateProvenance: detected.provenance,
|
|
204
|
+
defaultedFields: defaulted,
|
|
154
205
|
},
|
|
155
206
|
};
|
|
156
207
|
}
|
|
@@ -162,17 +213,38 @@ export class GOAPPlanTool extends MCPToolBase {
|
|
|
162
213
|
}
|
|
163
214
|
}
|
|
164
215
|
/**
|
|
165
|
-
*
|
|
166
|
-
*
|
|
216
|
+
* Validate `constraints` (issue #535): must be an object, only known keys,
|
|
217
|
+
* numeric limits must be numbers, maxSteps a positive integer, and the
|
|
218
|
+
* list constraints string arrays.
|
|
167
219
|
*/
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
220
|
+
validateConstraints(constraints) {
|
|
221
|
+
if (constraints === undefined || constraints === null)
|
|
222
|
+
return null;
|
|
223
|
+
if (typeof constraints !== 'object' || Array.isArray(constraints)) {
|
|
224
|
+
return 'constraints must be an object';
|
|
225
|
+
}
|
|
226
|
+
const c = constraints;
|
|
227
|
+
const unknownKeys = Object.keys(c).filter((k) => !KNOWN_CONSTRAINT_KEYS.includes(k));
|
|
228
|
+
if (unknownKeys.length > 0) {
|
|
229
|
+
return (`Unknown constraint(s): ${unknownKeys.join(', ')}. ` +
|
|
230
|
+
`Supported constraints: ${KNOWN_CONSTRAINT_KEYS.join(', ')}`);
|
|
231
|
+
}
|
|
232
|
+
for (const key of ['maxCost', 'maxDurationMs']) {
|
|
233
|
+
const v = c[key];
|
|
234
|
+
if (v !== undefined && (typeof v !== 'number' || !Number.isFinite(v) || v < 0)) {
|
|
235
|
+
return `constraints.${key} must be a non-negative number, got ${String(v)}`;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
const stepsError = validateMaxSteps(c.maxSteps);
|
|
239
|
+
if (stepsError)
|
|
240
|
+
return stepsError;
|
|
241
|
+
for (const key of ['requiredAgentTypes', 'excludedActions']) {
|
|
242
|
+
const v = c[key];
|
|
243
|
+
if (v !== undefined && (!Array.isArray(v) || !v.every((x) => typeof x === 'string'))) {
|
|
244
|
+
return `constraints.${key} must be an array of strings`;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
return null;
|
|
176
248
|
}
|
|
177
249
|
}
|
|
178
250
|
//# sourceMappingURL=goap-plan.js.map
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import { MCPToolBase, MCPToolConfig, MCPToolContext } from '../base.js';
|
|
11
11
|
import { ToolResult } from '../../types.js';
|
|
12
|
+
import { type WorldStateProvenance, type WorldStateSources } from './world-state.js';
|
|
12
13
|
/**
|
|
13
14
|
* Status type to query
|
|
14
15
|
*/
|
|
@@ -29,28 +30,44 @@ export interface GOAPStatusParams {
|
|
|
29
30
|
[key: string]: unknown;
|
|
30
31
|
}
|
|
31
32
|
/**
|
|
32
|
-
* World state status result
|
|
33
|
+
* World state status result.
|
|
34
|
+
*
|
|
35
|
+
* Issue #535: values that are not observed from a live source are reported
|
|
36
|
+
* as `null` (not the planner's optimistic defaults such as securityScore
|
|
37
|
+
* 100), and `provenance` names the source of every field.
|
|
33
38
|
*/
|
|
34
39
|
export interface WorldStateResult {
|
|
35
40
|
coverage: {
|
|
36
|
-
line: number;
|
|
37
|
-
branch: number;
|
|
38
|
-
function: number;
|
|
41
|
+
line: number | null;
|
|
42
|
+
branch: number | null;
|
|
43
|
+
function: number | null;
|
|
39
44
|
measured: boolean;
|
|
45
|
+
/** Coverage report the values were read from, when measured. */
|
|
46
|
+
report?: {
|
|
47
|
+
source: string;
|
|
48
|
+
measuredAt: string;
|
|
49
|
+
};
|
|
40
50
|
};
|
|
41
51
|
quality: {
|
|
42
|
-
testsPassing: number;
|
|
43
|
-
securityScore: number;
|
|
44
|
-
performanceScore: number;
|
|
52
|
+
testsPassing: number | null;
|
|
53
|
+
securityScore: number | null;
|
|
54
|
+
performanceScore: number | null;
|
|
45
55
|
};
|
|
46
56
|
fleet: {
|
|
57
|
+
/** Whether a fleet (fleet_init) is running in this MCP server process. */
|
|
58
|
+
initialized: boolean;
|
|
47
59
|
activeAgents: number;
|
|
48
|
-
maxAgents: number;
|
|
60
|
+
maxAgents: number | null;
|
|
61
|
+
availableAgents: string[];
|
|
49
62
|
};
|
|
50
63
|
resources: {
|
|
51
|
-
timeRemaining: number;
|
|
52
|
-
parallelSlots: number;
|
|
64
|
+
timeRemaining: number | null;
|
|
65
|
+
parallelSlots: number | null;
|
|
53
66
|
};
|
|
67
|
+
/** Dotted field path -> 'live' | 'measured' | 'caller' | 'default'. */
|
|
68
|
+
provenance: WorldStateProvenance;
|
|
69
|
+
/** Fields the planner would fill with DEFAULT_V3_WORLD_STATE assumptions. */
|
|
70
|
+
defaultedFields: string[];
|
|
54
71
|
}
|
|
55
72
|
/**
|
|
56
73
|
* Goals status result
|
|
@@ -132,8 +149,11 @@ export type GOAPStatusResult = {
|
|
|
132
149
|
* Query GOAP system status for world state, goals, actions, or plans.
|
|
133
150
|
*/
|
|
134
151
|
export declare class GOAPStatusTool extends MCPToolBase<GOAPStatusParams, GOAPStatusResult> {
|
|
152
|
+
private readonly worldStateSources;
|
|
135
153
|
private planner;
|
|
136
154
|
private executor;
|
|
155
|
+
/** World-state sources; injectable for tests (defaults read live state). */
|
|
156
|
+
constructor(worldStateSources?: WorldStateSources);
|
|
137
157
|
readonly config: MCPToolConfig;
|
|
138
158
|
private buildSchema;
|
|
139
159
|
/**
|
|
@@ -151,9 +171,14 @@ export declare class GOAPStatusTool extends MCPToolBase<GOAPStatusParams, GOAPSt
|
|
|
151
171
|
/**
|
|
152
172
|
* Execute the status query
|
|
153
173
|
*/
|
|
154
|
-
execute(params: GOAPStatusParams,
|
|
174
|
+
execute(params: GOAPStatusParams, _context: MCPToolContext): Promise<ToolResult<GOAPStatusResult>>;
|
|
155
175
|
/**
|
|
156
|
-
* Get current world state
|
|
176
|
+
* Get current world state.
|
|
177
|
+
*
|
|
178
|
+
* Issue #535: previously returned a static DEFAULT_V3_WORLD_STATE copy
|
|
179
|
+
* (fleet.activeAgents always 0) and called markAsRealData() on it. Now
|
|
180
|
+
* reads the live fleet and any coverage report, reports unobserved values
|
|
181
|
+
* as null, and only claims 'real' when nothing was defaulted.
|
|
157
182
|
*/
|
|
158
183
|
private getWorldState;
|
|
159
184
|
/**
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import { MCPToolBase, } from '../base.js';
|
|
11
11
|
import { toErrorMessage } from '../../../shared/error-utils.js';
|
|
12
|
-
import { getSharedGOAPPlanner, createMockExecutor,
|
|
12
|
+
import { getSharedGOAPPlanner, createMockExecutor, getAllQEActions, } from '../../../planning/index.js';
|
|
13
|
+
import { detectWorldState, defaultedFields, } from './world-state.js';
|
|
13
14
|
// ============================================================================
|
|
14
15
|
// Tool Implementation
|
|
15
16
|
// ============================================================================
|
|
@@ -19,8 +20,14 @@ import { getSharedGOAPPlanner, createMockExecutor, DEFAULT_V3_WORLD_STATE, getAl
|
|
|
19
20
|
* Query GOAP system status for world state, goals, actions, or plans.
|
|
20
21
|
*/
|
|
21
22
|
export class GOAPStatusTool extends MCPToolBase {
|
|
23
|
+
worldStateSources;
|
|
22
24
|
planner = null;
|
|
23
25
|
executor = null;
|
|
26
|
+
/** World-state sources; injectable for tests (defaults read live state). */
|
|
27
|
+
constructor(worldStateSources = {}) {
|
|
28
|
+
super();
|
|
29
|
+
this.worldStateSources = worldStateSources;
|
|
30
|
+
}
|
|
24
31
|
config = {
|
|
25
32
|
name: 'qe/planning/goap_status',
|
|
26
33
|
description: 'Get GOAP system status: world state, available goals, actions, or plans. ' +
|
|
@@ -93,7 +100,7 @@ export class GOAPStatusTool extends MCPToolBase {
|
|
|
93
100
|
/**
|
|
94
101
|
* Execute the status query
|
|
95
102
|
*/
|
|
96
|
-
async execute(params,
|
|
103
|
+
async execute(params, _context) {
|
|
97
104
|
try {
|
|
98
105
|
switch (params.type) {
|
|
99
106
|
case 'world':
|
|
@@ -121,37 +128,60 @@ export class GOAPStatusTool extends MCPToolBase {
|
|
|
121
128
|
}
|
|
122
129
|
}
|
|
123
130
|
/**
|
|
124
|
-
* Get current world state
|
|
131
|
+
* Get current world state.
|
|
132
|
+
*
|
|
133
|
+
* Issue #535: previously returned a static DEFAULT_V3_WORLD_STATE copy
|
|
134
|
+
* (fleet.activeAgents always 0) and called markAsRealData() on it. Now
|
|
135
|
+
* reads the live fleet and any coverage report, reports unobserved values
|
|
136
|
+
* as null, and only claims 'real' when nothing was defaulted.
|
|
125
137
|
*/
|
|
126
138
|
async getWorldState() {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
const
|
|
130
|
-
|
|
139
|
+
const detected = await detectWorldState(this.worldStateSources);
|
|
140
|
+
const { state, provenance } = detected;
|
|
141
|
+
const observed = (field) => provenance[field] !== 'default';
|
|
142
|
+
const valueIfObserved = (field, value) => observed(field) ? value : null;
|
|
143
|
+
const defaulted = defaultedFields(provenance);
|
|
144
|
+
const exposedFields = [
|
|
145
|
+
'coverage.line', 'coverage.branch', 'coverage.function',
|
|
146
|
+
'quality.testsPassing', 'quality.securityScore', 'quality.performanceScore',
|
|
147
|
+
'fleet.activeAgents', 'fleet.maxAgents',
|
|
148
|
+
'resources.timeRemaining', 'resources.parallelSlots',
|
|
149
|
+
];
|
|
150
|
+
if (exposedFields.every(observed)) {
|
|
151
|
+
this.markAsRealData();
|
|
152
|
+
}
|
|
153
|
+
else {
|
|
154
|
+
this.markAsEstimatedData();
|
|
155
|
+
}
|
|
131
156
|
return {
|
|
132
157
|
success: true,
|
|
133
158
|
data: {
|
|
134
159
|
type: 'world',
|
|
135
160
|
data: {
|
|
136
161
|
coverage: {
|
|
137
|
-
line: state.coverage.line,
|
|
138
|
-
branch: state.coverage.branch,
|
|
139
|
-
function: state.coverage.function,
|
|
162
|
+
line: valueIfObserved('coverage.line', state.coverage.line),
|
|
163
|
+
branch: valueIfObserved('coverage.branch', state.coverage.branch),
|
|
164
|
+
function: valueIfObserved('coverage.function', state.coverage.function),
|
|
140
165
|
measured: state.coverage.measured,
|
|
166
|
+
...(detected.coverageReport ? { report: detected.coverageReport } : {}),
|
|
141
167
|
},
|
|
142
168
|
quality: {
|
|
143
|
-
testsPassing: state.quality.testsPassing,
|
|
144
|
-
securityScore: state.quality.securityScore,
|
|
145
|
-
performanceScore: state.quality.performanceScore,
|
|
169
|
+
testsPassing: valueIfObserved('quality.testsPassing', state.quality.testsPassing),
|
|
170
|
+
securityScore: valueIfObserved('quality.securityScore', state.quality.securityScore),
|
|
171
|
+
performanceScore: valueIfObserved('quality.performanceScore', state.quality.performanceScore),
|
|
146
172
|
},
|
|
147
173
|
fleet: {
|
|
174
|
+
initialized: detected.fleetInitialized,
|
|
148
175
|
activeAgents: state.fleet.activeAgents,
|
|
149
|
-
maxAgents: state.fleet.maxAgents,
|
|
176
|
+
maxAgents: valueIfObserved('fleet.maxAgents', state.fleet.maxAgents),
|
|
177
|
+
availableAgents: [...state.fleet.availableAgents],
|
|
150
178
|
},
|
|
151
179
|
resources: {
|
|
152
|
-
timeRemaining: state.resources.timeRemaining,
|
|
153
|
-
parallelSlots: state.resources.parallelSlots,
|
|
180
|
+
timeRemaining: valueIfObserved('resources.timeRemaining', state.resources.timeRemaining),
|
|
181
|
+
parallelSlots: valueIfObserved('resources.parallelSlots', state.resources.parallelSlots),
|
|
154
182
|
},
|
|
183
|
+
provenance,
|
|
184
|
+
defaultedFields: defaulted,
|
|
155
185
|
},
|
|
156
186
|
},
|
|
157
187
|
};
|
|
@@ -184,7 +214,6 @@ export class GOAPStatusTool extends MCPToolBase {
|
|
|
184
214
|
* Get available actions
|
|
185
215
|
*/
|
|
186
216
|
async getActions(category, limit = 50) {
|
|
187
|
-
const planner = await this.getPlanner();
|
|
188
217
|
// Get actions from the library
|
|
189
218
|
let actions = [];
|
|
190
219
|
// Get actions from the action library
|
|
@@ -224,18 +253,18 @@ export class GOAPStatusTool extends MCPToolBase {
|
|
|
224
253
|
*/
|
|
225
254
|
async getPlans(status, limit = 20) {
|
|
226
255
|
const planner = await this.getPlanner();
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
256
|
+
const [{ plans, count }, reuseStats] = await Promise.all([
|
|
257
|
+
planner.listPlanSummaries(status, limit),
|
|
258
|
+
planner.getPlanReuseStats(),
|
|
259
|
+
]);
|
|
231
260
|
this.markAsRealData();
|
|
232
261
|
return {
|
|
233
262
|
success: true,
|
|
234
263
|
data: {
|
|
235
264
|
type: 'plans',
|
|
236
265
|
data: {
|
|
237
|
-
plans
|
|
238
|
-
count
|
|
266
|
+
plans,
|
|
267
|
+
count,
|
|
239
268
|
reuseStats: {
|
|
240
269
|
totalPlans: reuseStats.totalPlans,
|
|
241
270
|
reusedPlans: reuseStats.reusedPlans,
|