agentic-qe 3.14.5 → 3.14.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/skills/skills-manifest.json +1 -1
- package/CHANGELOG.md +150 -0
- package/assets/skills/skills-manifest.json +1 -1
- package/dist/adapters/ag-ui/event-types.d.ts +1 -1
- package/dist/audit/witness-chain-hash.d.ts +18 -0
- package/dist/audit/witness-chain-hash.js +37 -0
- package/dist/audit/witness-chain-repair.d.ts +71 -0
- package/dist/audit/witness-chain-repair.js +203 -0
- package/dist/audit/witness-chain-verifier.d.ts +152 -0
- package/dist/audit/witness-chain-verifier.js +293 -0
- package/dist/audit/witness-chain.d.ts +10 -43
- package/dist/audit/witness-chain.js +16 -106
- package/dist/audit/witness-findings.js +4 -1
- package/dist/cli/bundle.js +8 -8
- package/dist/cli/chunks/adapter-TVQKH65T.js +2 -0
- package/dist/cli/chunks/agent-booster-wasm-AK2W76RG.js +2 -0
- package/dist/cli/chunks/{agent-handler-V6CZ7Q6S.js → agent-handler-MGZCWHIY.js} +2 -2
- package/dist/cli/chunks/{agent-memory-branch-ZMD6ULC3.js → agent-memory-branch-JZ54MCSP.js} +2 -2
- package/dist/cli/chunks/aqe-learning-engine-ULGTVVWE.js +2 -0
- package/dist/cli/chunks/{arena-QLSBESC7.js → arena-CUVH3V7H.js} +2 -2
- package/dist/cli/chunks/{arena-4UPAEHFT.js → arena-YSWTKBCL.js} +4 -4
- package/dist/cli/chunks/audit-LVU76QGA.js +4 -0
- package/dist/cli/chunks/base-W42BURDL.js +2 -0
- package/dist/cli/chunks/{better-sqlite3-4DSBPDRH.js → better-sqlite3-DB3LOJQU.js} +2 -2
- package/dist/cli/chunks/{brain-handler-GBY4EZ4P.js → brain-handler-SD63KOQ6.js} +3 -3
- package/dist/cli/chunks/{branch-enumerator-XYBVXCNO.js → branch-enumerator-4MNOPUC7.js} +2 -2
- package/dist/cli/chunks/{browser-32F6MREU.js → browser-OLPNTWQE.js} +2 -2
- package/dist/cli/chunks/browser-workflow-HKGHFFFT.js +2 -0
- package/dist/cli/chunks/{chunk-WLXK2KNU.js → chunk-23CX7JNL.js} +2 -2
- package/dist/cli/chunks/{chunk-O3JTQ7N4.js → chunk-25P6JA6V.js} +1 -1
- package/dist/cli/chunks/{chunk-DO6EI5KB.js → chunk-2G63VIJE.js} +1 -1
- package/dist/cli/chunks/{chunk-G3L5L6YQ.js → chunk-2IMSJ7IO.js} +1 -1
- package/dist/cli/chunks/{chunk-RD6TEZ64.js → chunk-36VKMAMN.js} +2 -2
- package/dist/cli/chunks/{chunk-KIP6WZGV.js → chunk-3M7J4U74.js} +3 -3
- package/dist/cli/chunks/chunk-3QJU4Q4R.js +5 -0
- package/dist/cli/chunks/{chunk-2JGEZHWY.js → chunk-4EKV7PHB.js} +2 -2
- package/dist/cli/chunks/chunk-4INST4ZL.js +4 -0
- package/dist/cli/chunks/{chunk-DPBRWP4J.js → chunk-53BXTTRO.js} +3 -3
- package/dist/cli/chunks/chunk-5D7ZFWDS.js +2 -0
- package/dist/cli/chunks/{chunk-XLAUGSW7.js → chunk-5FSLMYAC.js} +2 -2
- package/dist/cli/chunks/chunk-5GFKTJ65.js +4 -0
- package/dist/cli/chunks/{chunk-WOIGKU2N.js → chunk-5U6N4V5M.js} +11 -11
- package/dist/cli/chunks/{chunk-PSPKSUF6.js → chunk-6EGS77BB.js} +1 -1
- package/dist/cli/chunks/{chunk-QIRL6B3C.js → chunk-6PJPQGF4.js} +2 -2
- package/dist/cli/chunks/{chunk-I6X3EGJI.js → chunk-6RD44SCE.js} +1 -1
- package/dist/cli/chunks/{chunk-IGBEJ4UJ.js → chunk-74IOEOMH.js} +2 -2
- package/dist/cli/chunks/{chunk-E3W6XQ57.js → chunk-77QZHIVX.js} +2 -2
- package/dist/cli/chunks/{chunk-R74ZKREV.js → chunk-7EZ2Z2CK.js} +1 -1
- package/dist/cli/chunks/{chunk-UTBYJ4RF.js → chunk-7MIOK72I.js} +18 -35
- package/dist/cli/chunks/{chunk-URVHZPWY.js → chunk-7QYOTUOX.js} +2 -2
- package/dist/cli/chunks/{chunk-K27SU3RE.js → chunk-A2VUCUTT.js} +2 -2
- package/dist/cli/chunks/{chunk-2KJQ2UQE.js → chunk-A3DK3XNZ.js} +1 -1
- package/dist/cli/chunks/{chunk-5D36YHS3.js → chunk-A5MA7A23.js} +4 -4
- package/dist/cli/chunks/{chunk-WJHWH5D2.js → chunk-AEUEMVJK.js} +2 -2
- package/dist/cli/chunks/{chunk-6CR4VQBQ.js → chunk-AJUBT4NP.js} +2 -2
- package/dist/cli/chunks/chunk-B2YGVSOP.js +27 -0
- package/dist/cli/chunks/{chunk-D6OUCB2H.js → chunk-B4I43GE2.js} +2 -2
- package/dist/cli/chunks/{chunk-WK7B4B6Y.js → chunk-BD7FEUN3.js} +2 -2
- package/dist/cli/chunks/{chunk-OEIQTWQP.js → chunk-BE4KALTE.js} +1 -1
- package/dist/cli/chunks/{chunk-JROVR6YS.js → chunk-BEFTQVEW.js} +2 -2
- package/dist/cli/chunks/{chunk-HBCGYMQU.js → chunk-BLG7SH4A.js} +1 -1
- package/dist/cli/chunks/{chunk-2OMLTYQK.js → chunk-C3FXFU2T.js} +1 -1
- package/dist/cli/chunks/{chunk-6A44AOGN.js → chunk-CBONQM5D.js} +2 -2
- package/dist/cli/chunks/{chunk-73EI4C2E.js → chunk-CQNMGK6Y.js} +2 -2
- package/dist/cli/chunks/{chunk-IIAR5S7Q.js → chunk-CVOQ6ESD.js} +2 -2
- package/dist/cli/chunks/{chunk-6TU7FEMD.js → chunk-DOBKEXMJ.js} +1 -1
- package/dist/cli/chunks/{chunk-BHFR2EXL.js → chunk-DYTQHRUS.js} +1 -1
- package/dist/cli/chunks/{chunk-E4AZXCT5.js → chunk-EADSQN5T.js} +1 -1
- package/dist/cli/chunks/{chunk-CYE2TJFV.js → chunk-EGOIIUBD.js} +2 -2
- package/dist/cli/chunks/{chunk-DKUBQQFG.js → chunk-EIGRV3J6.js} +2 -2
- package/dist/cli/chunks/{chunk-RP2ZKPYV.js → chunk-EJ6MMYLK.js} +1 -1
- package/dist/cli/chunks/{chunk-HSVKZ5KI.js → chunk-ENK44A6Q.js} +2 -2
- package/dist/cli/chunks/{chunk-67YV75XP.js → chunk-EYXE2XKP.js} +2 -2
- package/dist/cli/chunks/{chunk-HYEJJJY3.js → chunk-F2OPFVQH.js} +1 -1
- package/dist/cli/chunks/{chunk-XUR2M2WB.js → chunk-FBZC4IGB.js} +2 -2
- package/dist/cli/chunks/{chunk-BXVAVFGU.js → chunk-FSSR6WBE.js} +2 -2
- package/dist/cli/chunks/{chunk-W2XCZU62.js → chunk-FW4DJ4FJ.js} +1 -1
- package/dist/cli/chunks/{chunk-KKHYJF5U.js → chunk-FYPX5WBJ.js} +1 -1
- package/dist/cli/chunks/{chunk-K7NJHFLZ.js → chunk-G367W7XR.js} +3 -3
- package/dist/cli/chunks/{chunk-IUDWEOLX.js → chunk-GLGKQX2V.js} +2 -2
- package/dist/cli/chunks/{chunk-JVQBWYHW.js → chunk-GV4DYPJP.js} +2 -2
- package/dist/cli/chunks/{chunk-GTKCGPJZ.js → chunk-GVVFTFMB.js} +2 -2
- package/dist/cli/chunks/{chunk-AFEDJ3RU.js → chunk-H5RQPO3X.js} +2 -2
- package/dist/cli/chunks/{chunk-4FWTLJEP.js → chunk-HPWWYT67.js} +2 -2
- package/dist/cli/chunks/{chunk-G3W6BMVJ.js → chunk-HXXHMLJ5.js} +1 -1
- package/dist/cli/chunks/{chunk-NU7UTXMP.js → chunk-HYFQUWNB.js} +2 -2
- package/dist/cli/chunks/chunk-HYOPJHHW.js +2 -0
- package/dist/cli/chunks/{chunk-6LKDHEBY.js → chunk-HZY42OVU.js} +2 -2
- package/dist/cli/chunks/{chunk-C3HQL6S4.js → chunk-IAENZ2DR.js} +2 -2
- package/dist/cli/chunks/{chunk-M23ZOZVY.js → chunk-IEJ7ZV3M.js} +1 -1
- package/dist/cli/chunks/{chunk-RIZVC4XY.js → chunk-IWFFO6VT.js} +2 -2
- package/dist/cli/chunks/chunk-J7AQZLIH.js +21 -0
- package/dist/cli/chunks/{chunk-3KDL6QDK.js → chunk-JHJUSSAU.js} +2 -2
- package/dist/cli/chunks/{chunk-DLF5BOJD.js → chunk-JOZ47MV6.js} +1 -1
- package/dist/cli/chunks/{chunk-ELBZON4V.js → chunk-JZT7BU44.js} +2 -2
- package/dist/cli/chunks/{chunk-3DDXWYMO.js → chunk-KD2BLA5Y.js} +1 -1
- package/dist/cli/chunks/{chunk-VD5IO5EO.js → chunk-KUHLTVWC.js} +1 -1
- package/dist/cli/chunks/{chunk-YDFL445W.js → chunk-LU2EDWQK.js} +2 -2
- package/dist/cli/chunks/chunk-LXZMP3VX.js +736 -0
- package/dist/cli/chunks/{chunk-3YUB5HER.js → chunk-LY7MFGBD.js} +196 -187
- package/dist/cli/chunks/chunk-MM56VPNE.js +180 -0
- package/dist/cli/chunks/{chunk-37TUN44F.js → chunk-MNQN7UZX.js} +2 -2
- package/dist/cli/chunks/{chunk-7DETTOPZ.js → chunk-MQZ53OR3.js} +2 -2
- package/dist/cli/chunks/{chunk-BYG36QC5.js → chunk-MT7UNBZ7.js} +2 -2
- package/dist/cli/chunks/{chunk-JES6R5KP.js → chunk-MZB2UV2O.js} +1 -1
- package/dist/cli/chunks/{chunk-QZMUXJHZ.js → chunk-MZMG6CUJ.js} +2 -2
- package/dist/cli/chunks/chunk-N5XOXPHZ.js +4 -0
- package/dist/cli/chunks/{chunk-RD2VGOUH.js → chunk-NBLDBVAW.js} +1 -1
- package/dist/cli/chunks/{chunk-HVU64GP5.js → chunk-ND4QTZOL.js} +2 -2
- package/dist/cli/chunks/{chunk-SQF6HRXR.js → chunk-NHUGHAY6.js} +1 -1
- package/dist/cli/chunks/{chunk-TUSSPKRM.js → chunk-NOHWJOBS.js} +1 -1
- package/dist/cli/chunks/{chunk-NVYBM3R4.js → chunk-O5V7RHVG.js} +2 -2
- package/dist/cli/chunks/{chunk-6VAZAHQG.js → chunk-O6MO5KMR.js} +2 -2
- package/dist/cli/chunks/{chunk-IUHB5GVS.js → chunk-OAZX6WFU.js} +2 -2
- package/dist/cli/chunks/{chunk-LSUILON7.js → chunk-OEPNNLR4.js} +1 -1
- package/dist/cli/chunks/{chunk-IJHCIXJC.js → chunk-OIDWDGLG.js} +2 -2
- package/dist/cli/chunks/{chunk-CPC7FN52.js → chunk-ON2UTP2U.js} +2 -2
- package/dist/cli/chunks/{chunk-UJWAWIRV.js → chunk-ONR2NXXD.js} +7 -7
- package/dist/cli/chunks/{chunk-7VFY7TUR.js → chunk-OXHF3L2T.js} +2 -2
- package/dist/cli/chunks/{chunk-QYOGD2VW.js → chunk-OZGIOKEA.js} +1 -1
- package/dist/cli/chunks/{chunk-WJTSY5MC.js → chunk-P2UPYSDJ.js} +1 -1
- package/dist/cli/chunks/{chunk-52L77RMG.js → chunk-P7XSPP5D.js} +2 -2
- package/dist/cli/chunks/{chunk-M5AEL7IS.js → chunk-PCJQCEBA.js} +2 -2
- package/dist/cli/chunks/chunk-PELENDDQ.js +2 -0
- package/dist/cli/chunks/{chunk-C3Z4VVHP.js → chunk-PYKY22GC.js} +5 -5
- package/dist/cli/chunks/{chunk-AF4XKLXO.js → chunk-Q3NSU24F.js} +2 -2
- package/dist/cli/chunks/chunk-Q6NTEICT.js +2 -0
- package/dist/cli/chunks/chunk-QFETNCNN.js +12 -0
- package/dist/cli/chunks/{chunk-KYA5LARK.js → chunk-QGOWNVVG.js} +1 -1
- package/dist/cli/chunks/{chunk-Y5L3ES4L.js → chunk-QPLSYEWJ.js} +2 -2
- package/dist/cli/chunks/{chunk-F34OAHOM.js → chunk-QQFQDEUE.js} +2 -2
- package/dist/cli/chunks/{chunk-EFV4ADMO.js → chunk-QUORH2MG.js} +55 -79
- package/dist/cli/chunks/{chunk-QWUXCG2L.js → chunk-QVH5Y7AP.js} +1 -1
- package/dist/cli/chunks/{chunk-I2NENQ44.js → chunk-RC2A4JZ5.js} +2 -2
- package/dist/cli/chunks/{chunk-XZSMZHM2.js → chunk-RDGPXENG.js} +2 -2
- package/dist/cli/chunks/{chunk-N7H767TP.js → chunk-RKI3IQKQ.js} +2 -2
- package/dist/cli/chunks/{chunk-LULD4JV2.js → chunk-RKUAWQOF.js} +2 -2
- package/dist/cli/chunks/chunk-RLW25X66.js +2 -0
- package/dist/cli/chunks/{chunk-UKGXWW64.js → chunk-ROVZSZCS.js} +3 -3
- package/dist/cli/chunks/{chunk-EOR2UT72.js → chunk-RT6O2HW2.js} +2 -2
- package/dist/cli/chunks/{chunk-75QJ5HWE.js → chunk-SM2YJ2AL.js} +2 -2
- package/dist/cli/chunks/{chunk-KO4FNAUR.js → chunk-SRPLERER.js} +3 -3
- package/dist/cli/chunks/{chunk-NRE4NAVA.js → chunk-T77GZF4B.js} +1 -1
- package/dist/cli/chunks/{chunk-R6IU3EWP.js → chunk-TFK2AYIN.js} +2 -2
- package/dist/cli/chunks/chunk-TW3SR4TS.js +2 -0
- package/dist/cli/chunks/{chunk-IYTLXUBO.js → chunk-TXSPBLBT.js} +2 -2
- package/dist/cli/chunks/chunk-UA7TDVL7.js +12 -0
- package/dist/cli/chunks/{chunk-WX6RRIGW.js → chunk-UBJG3IHT.js} +2 -2
- package/dist/cli/chunks/{chunk-NQI7FWCS.js → chunk-UFSVUBTR.js} +2 -2
- package/dist/cli/chunks/{chunk-FUNGTIF2.js → chunk-UOI6ULCH.js} +2 -2
- package/dist/cli/chunks/{chunk-HVXJC3OC.js → chunk-UYUJT6QO.js} +2 -2
- package/dist/cli/chunks/{chunk-KEY43ANX.js → chunk-V5AK56DA.js} +2 -2
- package/dist/cli/chunks/{chunk-XFPPERA2.js → chunk-V6RE4YRQ.js} +2 -2
- package/dist/cli/chunks/{chunk-DDCIYOGT.js → chunk-VW6FRMLW.js} +2 -2
- package/dist/cli/chunks/chunk-VXKWNRGA.js +2 -0
- package/dist/cli/chunks/{chunk-CVMNJSCB.js → chunk-VYDVI6FZ.js} +2 -2
- package/dist/cli/chunks/{chunk-7JZJJA7U.js → chunk-WF6UISKW.js} +3 -3
- package/dist/cli/chunks/{chunk-SQKW3B6B.js → chunk-WIH522AP.js} +1 -1
- package/dist/cli/chunks/{chunk-KLTP5IDB.js → chunk-WOV6XI3A.js} +1 -1
- package/dist/cli/chunks/{chunk-VTOVWHEM.js → chunk-X7ADKL7T.js} +2 -2
- package/dist/cli/chunks/{chunk-SX4JLSLV.js → chunk-XBYQ2BS4.js} +2 -2
- package/dist/cli/chunks/{chunk-E4EYPYR3.js → chunk-XL5KIYE3.js} +2 -2
- package/dist/cli/chunks/{chunk-3VIXOHMS.js → chunk-XWYELBZS.js} +1 -1
- package/dist/cli/chunks/{chunk-YQGPQBCX.js → chunk-XYLQZWF6.js} +2 -2
- package/dist/cli/chunks/{chunk-XEZIIQYJ.js → chunk-Y6AKKQIQ.js} +1 -1
- package/dist/cli/chunks/{chunk-BJPL6THQ.js → chunk-YMW57PEL.js} +1 -1
- package/dist/cli/chunks/{chunk-JSZ663MU.js → chunk-YO4ESCB4.js} +1 -1
- package/dist/cli/chunks/{chunk-AMMQOV35.js → chunk-YRHTQZU4.js} +2 -2
- package/dist/cli/chunks/chunk-Z4Q5PCRZ.js +65 -0
- package/dist/cli/chunks/{chunk-RKOUXVZZ.js → chunk-ZELWDJXT.js} +2 -2
- package/dist/cli/chunks/{chunk-QRCIZFNK.js → chunk-ZQZD55MN.js} +2 -2
- package/dist/cli/chunks/{chunk-UMGFMKDW.js → chunk-ZS4XVJGV.js} +2 -2
- package/dist/cli/chunks/{chunk-6ITZZIQX.js → chunk-ZUB5YOCM.js} +2 -2
- package/dist/cli/chunks/chunk-ZUOVNFXK.js +2 -0
- package/dist/cli/chunks/{chunk-RGGK6VZ7.js → chunk-ZWEKAEEV.js} +1 -1
- package/dist/cli/chunks/{ci-RACDAJMR.js → ci-J3TDK5RA.js} +8 -8
- package/dist/cli/chunks/{ci-output-EHRSZBKG.js → ci-output-RLS32FUY.js} +2 -2
- package/dist/cli/chunks/{circuit-breaker-GBV7M5XG.js → circuit-breaker-MRCC7WCM.js} +2 -2
- package/dist/cli/chunks/claude-flow-setup-LIZCEKDF.js +2 -0
- package/dist/cli/chunks/client-3BD2DI4N.js +2 -0
- package/dist/cli/chunks/{cline-installer-W4NMXJSG.js → cline-installer-T7H6R2RC.js} +2 -2
- package/dist/cli/chunks/{code-JWXJMYXB.js → code-XMBLI7OF.js} +3 -3
- package/dist/cli/chunks/{code-index-extractor-RVI2IFTM.js → code-index-extractor-QS7BYLEX.js} +2 -2
- package/dist/cli/chunks/{codex-installer-3BORJINH.js → codex-installer-6PGT5FM6.js} +6 -6
- package/dist/cli/chunks/{completions-A55NCTAO.js → completions-2A3WRXY2.js} +2 -2
- package/dist/cli/chunks/{complexity-analyzer-JCXHGGLY.js → complexity-analyzer-23HOOGJ7.js} +2 -2
- package/dist/cli/chunks/{continuedev-installer-PUVFMGYW.js → continuedev-installer-4FSF7B3N.js} +2 -2
- package/dist/cli/chunks/{copilot-installer-4DCMYWHB.js → copilot-installer-A5GRQQUU.js} +2 -2
- package/dist/cli/chunks/core-handlers-C3H2ZCS2.js +2 -0
- package/dist/cli/chunks/{cost-tracker-5TV2GGKY.js → cost-tracker-Z4STQ5VB.js} +2 -2
- package/dist/cli/chunks/{coverage-NNWM7TX3.js → coverage-NUPP6KZZ.js} +3 -3
- package/dist/cli/chunks/cross-domain-router-JCQ7SWDP.js +2 -0
- package/dist/cli/chunks/{cursor-installer-4NCHGJGK.js → cursor-installer-FVJ7ROPJ.js} +2 -2
- package/dist/cli/chunks/{daemon-QIKCXKWO.js → daemon-7ZZA2MMN.js} +4 -4
- package/dist/cli/chunks/{daemon-T4JO4IXP.js → daemon-D662EX5N.js} +3 -3
- package/dist/cli/chunks/{dag-attention-scheduler-RPAAIDAD.js → dag-attention-scheduler-IB4TQ2KA.js} +2 -2
- package/dist/cli/chunks/{detect-SBEEVDSN.js → detect-LGLBZN4I.js} +2 -2
- package/dist/cli/chunks/{dist-node-ZHI6NCSU.js → dist-node-Z3OL42YE.js} +2 -2
- package/dist/cli/chunks/{domain-handler-LBC3GJ7Z.js → domain-handler-L3CLNL7U.js} +2 -2
- package/dist/cli/chunks/{domain-plugins-H6IZ5USZ.js → domain-plugins-GQ3V5X6L.js} +2 -2
- package/dist/cli/chunks/domain-transfer-MFCI76IY.js +2 -0
- package/dist/cli/chunks/dream-FTP33IJB.js +2 -0
- package/dist/cli/chunks/{embed-and-insert-pattern-AHTR7CRU.js → embed-and-insert-pattern-UGD6USYH.js} +2 -2
- package/dist/cli/chunks/{eval-DZU2KISM.js → eval-3B7UIYGY.js} +2 -2
- package/dist/cli/chunks/{experience-capture-middleware-5IQCWKSL.js → experience-capture-middleware-3RQ4NYY3.js} +3 -3
- package/dist/cli/chunks/{fast-paths-2KLDUWCY.js → fast-paths-QOSAEPYD.js} +2 -2
- package/dist/cli/chunks/{feature-flags-7AC3XDZA.js → feature-flags-3S5TH6P4.js} +2 -2
- package/dist/cli/chunks/{feature-flags-N6UAEZY4.js → feature-flags-TLF4NKOH.js} +2 -2
- package/dist/cli/chunks/{file-discovery-5SDIW4V2.js → file-discovery-AEVMJRNB.js} +2 -2
- package/dist/cli/chunks/{fleet-ZIQCAZ2Y.js → fleet-E6WTXWFL.js} +3 -3
- package/dist/cli/chunks/{gnn-wrapper-DUMBZJEV.js → gnn-wrapper-MCKH3AUU.js} +2 -2
- package/dist/cli/chunks/{heartbeat-handler-6HVM6ZMR.js → heartbeat-handler-U7XENHRR.js} +4 -4
- package/dist/cli/chunks/heartbeat-scheduler-HXBJVJL2.js +2 -0
- package/dist/cli/chunks/hnsw-adapter-TU6WG2ME.js +2 -0
- package/dist/cli/chunks/hnsw-index-MS5KODD7.js +2 -0
- package/dist/cli/chunks/{hnsw-legacy-bridge-5DRL5FLX.js → hnsw-legacy-bridge-5GW4SAEI.js} +2 -2
- package/dist/cli/chunks/{hnswlib-node-GW67GTCL.js → hnswlib-node-7BLZBK5T.js} +2 -2
- package/dist/cli/chunks/{hooks-QHH6FVO4.js → hooks-F3O2SB6H.js} +10 -10
- package/dist/cli/chunks/hybrid-backend-HT45LBHC.js +2 -0
- package/dist/cli/chunks/{hypergraph-engine-7XDCCVG2.js → hypergraph-engine-PV4EKXHB.js} +2 -2
- package/dist/cli/chunks/{hypergraph-handler-QHF7NOU5.js → hypergraph-handler-VOWO5ZTW.js} +3 -3
- package/dist/cli/chunks/impact-analyzer-AP4AGTG5.js +2 -0
- package/dist/cli/chunks/{init-handler-5UIVOM7K.js → init-handler-ENJ5ONJX.js} +16 -14
- package/dist/cli/chunks/init-wizard-I5DFZUQL.js +2 -0
- package/dist/cli/chunks/kernel-MISPSPPA.js +2 -0
- package/dist/cli/chunks/{kilocode-installer-TGGV6K5Q.js → kilocode-installer-HNNJOOPE.js} +2 -2
- package/dist/cli/chunks/{kiro-installer-4XYBHZWW.js → kiro-installer-UZBIQ3IC.js} +2 -2
- package/dist/cli/chunks/knowledge-graph-L26JESGE.js +2 -0
- package/dist/cli/chunks/{learning-STE5W6BS.js → learning-YMLCVFUT.js} +3 -3
- package/dist/cli/chunks/{llm-router-NKF7J3RI.js → llm-router-YWTARCCT.js} +4 -4
- package/dist/cli/chunks/llm-router-service-MWGC43ZA.js +2 -0
- package/dist/cli/chunks/{load-B2T77UJQ.js → load-DKE3F3IP.js} +2 -2
- package/dist/cli/chunks/load-test-H5ISNNM5.js +2 -0
- package/dist/cli/chunks/mcp-5PSGIUCW.js +2 -0
- package/dist/cli/chunks/{memory-WRFZKG56.js → memory-3L3O6JMM.js} +5 -5
- package/dist/cli/chunks/memory-backend-HWDNOBKW.js +2 -0
- package/dist/cli/chunks/memory-handlers-ZFDVQZM5.js +2 -0
- package/dist/cli/chunks/multi-model-executor-AEEO7IA4.js +14 -0
- package/dist/cli/chunks/{opencode-installer-J36EMQU7.js → opencode-installer-ABBO355U.js} +2 -2
- package/dist/cli/chunks/orchestrator-E36Q7MKE.js +393 -0
- package/dist/cli/chunks/pattern-null-store-GQP6ICWK.js +2 -0
- package/dist/cli/chunks/{pattern-usage-recorder-BVMTWI3E.js → pattern-usage-recorder-H4XKSID4.js} +2 -2
- package/dist/cli/chunks/{pipeline-OWAHDUAQ.js → pipeline-BGFEHXIN.js} +2 -2
- package/dist/cli/chunks/{platform-ANGBFWBV.js → platform-GK7ZVDJI.js} +2 -2
- package/dist/cli/chunks/{plugin-OO7ON2YW.js → plugin-CAH2CKI6.js} +2 -2
- package/dist/cli/chunks/{prime-radiant-advanced-wasm-HFG3BXWU.js → prime-radiant-advanced-wasm-M5EYRONA.js} +2 -2
- package/dist/cli/chunks/{project-root-LNOYVTYY.js → project-root-BSNZC243.js} +2 -2
- package/dist/cli/chunks/protocol-executor-AD5A4DAI.js +2 -0
- package/dist/cli/chunks/{protocol-handler-CE3Q6LY4.js → protocol-handler-JDSSC2SF.js} +2 -2
- package/dist/cli/chunks/{prove-7XPN53PY.js → prove-ANPTOZJE.js} +2 -2
- package/dist/cli/chunks/qe-reasoning-bank-W3Z2PKTR.js +2 -0
- package/dist/cli/chunks/{quality-TT23JRFX.js → quality-SXWGYRQR.js} +2 -2
- package/dist/cli/chunks/{quality-gate-PPPRP255.js → quality-gate-GYNCA4ZY.js} +3 -3
- package/dist/cli/chunks/queen-coordinator-HQRHLIJX.js +2 -0
- package/dist/cli/chunks/{real-embeddings-EYNZIFJE.js → real-embeddings-WSRYAOZM.js} +2 -2
- package/dist/cli/chunks/{ref-validation-QQR64ZXD.js → ref-validation-AZ3LRWEK.js} +2 -2
- package/dist/cli/chunks/{roocode-installer-UIGS7ZJD.js → roocode-installer-2QKGFIEU.js} +2 -2
- package/dist/cli/chunks/router-MTP5LH4H.js +2 -0
- package/dist/cli/chunks/routing-feedback-GWETVB4L.js +2 -0
- package/dist/cli/chunks/{routing-handler-6AENUIRG.js → routing-handler-UYDC5MMD.js} +2 -2
- package/dist/cli/chunks/{ruvector-commands-5AWMEV34.js → ruvector-commands-QXADPVEY.js} +2 -2
- package/dist/cli/chunks/rvf-dual-writer-4UE5S7WP.js +2 -0
- package/dist/cli/chunks/rvf-migration-adapter-PHH3HF4Q.js +2 -0
- package/dist/cli/chunks/{rvf-migration-coordinator-NWRJ7C22.js → rvf-migration-coordinator-GD4NBFKT.js} +2 -2
- package/dist/cli/chunks/rvf-native-adapter-KTLZBUWV.js +2 -0
- package/dist/cli/chunks/{rvf-store-integrity-ISKRP563.js → rvf-store-integrity-7SXG66IL.js} +2 -2
- package/dist/cli/chunks/safe-db-FWWGAPVE.js +2 -0
- package/dist/cli/chunks/schedule-TPA4V4D5.js +2 -0
- package/dist/cli/chunks/scheduler-5ZTEPNDD.js +2 -0
- package/dist/cli/chunks/{security-325A7FMB.js → security-YKB622PK.js} +3 -3
- package/dist/cli/chunks/shared-rvf-adapter-KMLAV7JK.js +2 -0
- package/dist/cli/chunks/{shared-rvf-dual-writer-THFDYS2Z.js → shared-rvf-dual-writer-OYY27DFV.js} +2 -2
- package/dist/cli/chunks/sqlite-persistence-HPTT624C.js +2 -0
- package/dist/cli/chunks/{standalone-memory-UD4MJ6GZ.js → standalone-memory-2DOABVLC.js} +2 -2
- package/dist/cli/chunks/{status-handler-CPFTN4XL.js → status-handler-EXRKETV7.js} +2 -2
- package/dist/cli/chunks/{structural-health-2MG2IVBL.js → structural-health-2SKK6DU6.js} +2 -2
- package/dist/cli/chunks/sync-DQ2YUNI6.js +2 -0
- package/dist/cli/chunks/{sync-EE4VVKOW.js → sync-UW7SX7GO.js} +2 -2
- package/dist/cli/chunks/{task-handler-7H5OYJG4.js → task-handler-LYQ6WYUY.js} +2 -2
- package/dist/cli/chunks/task-handlers-DIJO232S.js +9 -0
- package/dist/cli/chunks/test-WRHZMUCW.js +33 -0
- package/dist/cli/chunks/{test-scheduling-CHQ4ZLLJ.js → test-scheduling-HI23RXFK.js} +3 -3
- package/dist/cli/chunks/token-bootstrap-23SA6SWZ.js +2 -0
- package/dist/cli/chunks/{token-usage-EBXUJNRB.js → token-usage-M7RRDPXO.js} +2 -2
- package/dist/cli/chunks/{transformers-ZEKS2OJZ.js → transformers-4TC35KKS.js} +2 -2
- package/dist/cli/chunks/tree-sitter-wasm-parser-F4LTKAWD.js +2 -0
- package/dist/cli/chunks/{types-KYAA5VLV.js → types-NBXV6LXQ.js} +2 -2
- package/dist/cli/chunks/unified-memory-OVFEPRPS.js +2 -0
- package/dist/cli/chunks/unified-memory-hnsw-KKRSCZHR.js +2 -0
- package/dist/cli/chunks/unified-persistence-7GLR4RI3.js +2 -0
- package/dist/cli/chunks/{upgrade-UJBJ5AYM.js → upgrade-4BGOU5RM.js} +2 -2
- package/dist/cli/chunks/{validate-RUV6YMWS.js → validate-EDWAR63H.js} +2 -2
- package/dist/cli/chunks/{validate-swarm-IVEVMGVM.js → validate-swarm-VI72CPR7.js} +2 -2
- package/dist/cli/chunks/visual-security-2FUM5GLI.js +2 -0
- package/dist/cli/chunks/{web-tree-sitter-AVWA6HKE.js → web-tree-sitter-Y5XBRQXF.js} +2 -2
- package/dist/cli/chunks/{windsurf-installer-DAH7HI2W.js → windsurf-installer-VEX23WAF.js} +2 -2
- package/dist/cli/chunks/witness-chain-3YNL6YGY.js +2 -0
- package/dist/cli/chunks/witness-chain-MH6GA5L6.js +2 -0
- package/dist/cli/chunks/witness-chain-repair-MJZGZRWT.js +2 -0
- package/dist/cli/chunks/witness-chain-verifier-TTJYXTBE.js +2 -0
- package/dist/cli/chunks/{witness-key-manager-JSTBMG43.js → witness-key-manager-EM6YXYOY.js} +2 -2
- package/dist/cli/chunks/{workflow-TWOIA6LZ.js → workflow-2RBDOM7V.js} +4 -4
- package/dist/cli/chunks/workflow-orchestrator-H6G65YKU.js +2 -0
- package/dist/cli/chunks/wrappers-5OTAVVOV.js +2 -0
- package/dist/cli/commands/audit.d.ts +20 -2
- package/dist/cli/commands/audit.js +158 -16
- package/dist/cli/commands/ci.js +1 -1
- package/dist/cli/commands/claude-flow-setup.js +5 -4
- package/dist/cli/commands/test.js +18 -3
- package/dist/cli/handlers/init-handler.d.ts +2 -0
- package/dist/cli/handlers/init-handler.js +8 -2
- package/dist/cli/index.js +10 -1
- package/dist/coordination/handlers/test-execution-handlers.js +13 -8
- package/dist/coordination/index.d.ts +1 -1
- package/dist/coordination/queen-event-handlers.js +9 -6
- package/dist/coordination/result-saver.js +1 -1
- package/dist/coordination/services/index.d.ts +1 -1
- package/dist/coordination/services/task-audit-logger.d.ts +38 -13
- package/dist/coordination/services/task-audit-logger.js +33 -5
- package/dist/coordination/task-executor.d.ts +5 -0
- package/dist/coordination/task-executor.js +10 -5
- package/dist/domains/test-generation/coordinator.js +6 -5
- package/dist/domains/test-generation/interfaces.d.ts +11 -1
- package/dist/domains/test-generation/services/behavior-example-validation.d.ts +36 -0
- package/dist/domains/test-generation/services/behavior-example-validation.js +89 -0
- package/dist/domains/test-generation/services/behavior-examples.d.ts +8 -0
- package/dist/domains/test-generation/services/behavior-examples.js +65 -0
- package/dist/domains/test-generation/services/test-generator.d.ts +1 -1
- package/dist/domains/test-generation/services/test-generator.js +59 -30
- package/dist/domains/visual-accessibility/services/axe-core-audit.d.ts +0 -15
- package/dist/domains/visual-accessibility/services/axe-core-audit.js +12 -10
- package/dist/init/agents-installer.d.ts +4 -0
- package/dist/init/agents-installer.js +24 -11
- package/dist/init/browser-engine-installer.d.ts +5 -5
- package/dist/init/browser-engine-installer.js +28 -6
- package/dist/init/codex-installer.js +4 -2
- package/dist/init/idempotent-write.d.ts +53 -0
- package/dist/init/idempotent-write.js +160 -0
- package/dist/init/init-wizard.d.ts +2 -0
- package/dist/init/orchestrator.js +1 -0
- package/dist/init/phases/05-learning.js +3 -1
- package/dist/init/phases/07-hooks.js +32 -16
- package/dist/init/phases/08-mcp.js +4 -2
- package/dist/init/phases/09-assets.js +8 -18
- package/dist/init/phases/10-workers.js +7 -5
- package/dist/init/phases/12-verification.js +7 -2
- package/dist/init/phases/phase-interface.d.ts +2 -0
- package/dist/init/project-analyzer.d.ts +9 -0
- package/dist/init/project-analyzer.js +20 -1
- package/dist/init/self-configurator.d.ts +5 -3
- package/dist/init/self-configurator.js +18 -29
- package/dist/init/skills-installer.js +4 -2
- package/dist/init/types.d.ts +6 -0
- package/dist/init/types.js +20 -24
- package/dist/integrations/agentic-flow/reasoning-bank/index.d.ts +2 -5
- package/dist/integrations/coherence/coherence-service.js +84 -24
- package/dist/integrations/coherence/vote-tally.d.ts +38 -0
- package/dist/integrations/coherence/vote-tally.js +39 -0
- package/dist/integrations/ruvector/shared-rvf-adapter.d.ts +23 -0
- package/dist/integrations/ruvector/shared-rvf-adapter.js +24 -0
- package/dist/integrations/vibium/client.d.ts +1 -0
- package/dist/integrations/vibium/client.js +24 -11
- package/dist/integrations/vibium/runtime.d.ts +14 -0
- package/dist/integrations/vibium/runtime.js +94 -0
- package/dist/kernel/kernel.js +3 -2
- package/dist/kernel/pattern-fts-self-heal.d.ts +63 -0
- package/dist/kernel/pattern-fts-self-heal.js +193 -0
- package/dist/kernel/process-lifecycle.d.ts +60 -0
- package/dist/kernel/process-lifecycle.js +91 -0
- package/dist/kernel/unified-memory-schemas.d.ts +15 -1
- package/dist/kernel/unified-memory-schemas.js +53 -25
- package/dist/kernel/unified-memory.js +31 -34
- package/dist/kernel/unified-persistence.js +12 -6
- package/dist/learning/experience-capture.d.ts +2 -1
- package/dist/learning/experience-capture.js +23 -8
- package/dist/learning/pattern-store.d.ts +12 -1
- package/dist/learning/pattern-store.js +45 -30
- package/dist/learning/qe-patterns.d.ts +12 -0
- package/dist/learning/qe-patterns.js +7 -1
- package/dist/learning/qe-reasoning-bank.d.ts +1 -0
- package/dist/learning/qe-reasoning-bank.js +17 -4
- package/dist/learning/real-qe-reasoning-bank.d.ts +9 -4
- package/dist/learning/real-qe-reasoning-bank.js +28 -4
- package/dist/learning/rvf-pattern-store.js +36 -23
- package/dist/learning/sqlite-persistence.d.ts +8 -1
- package/dist/learning/sqlite-persistence.js +58 -33
- package/dist/logging/console-logger.d.ts +2 -5
- package/dist/logging/console-logger.js +10 -46
- package/dist/logging/index.d.ts +2 -0
- package/dist/logging/index.js +1 -0
- package/dist/logging/redaction.d.ts +27 -0
- package/dist/logging/redaction.js +170 -0
- package/dist/mcp/bundle.js +522 -545
- package/dist/mcp/entry.js +52 -6
- package/dist/mcp/handlers/core-handlers.js +5 -4
- package/dist/mcp/handlers/domain-handler-configs.js +12 -4
- package/dist/mcp/handlers/task-handlers.js +11 -7
- package/dist/mcp/protocol-server.js +20 -4
- package/dist/mcp/services/reasoning-bank-service.d.ts +6 -1
- package/dist/mcp/services/reasoning-bank-service.js +5 -1
- package/dist/mcp/tools/base.d.ts +9 -2
- package/dist/mcp/tools/base.js +7 -0
- package/dist/mcp/tools/coherence/consensus.js +51 -2
- package/dist/mcp/tools/planning/goap-plan.d.ts +20 -7
- package/dist/mcp/tools/planning/goap-plan.js +92 -20
- package/dist/mcp/tools/planning/goap-status.d.ts +37 -12
- package/dist/mcp/tools/planning/goap-status.js +52 -23
- package/dist/mcp/tools/planning/world-state.d.ts +101 -0
- package/dist/mcp/tools/planning/world-state.js +274 -0
- package/dist/mcp/tools/test-execution/e2e-execute.js +9 -1
- package/dist/mcp/tools/test-generation/generate.d.ts +6 -1
- package/dist/mcp/tools/test-generation/generate.js +8 -0
- package/dist/mcp/types.d.ts +10 -4
- package/dist/planning/goap-planner.d.ts +60 -4
- package/dist/planning/goap-planner.js +218 -60
- package/dist/planning/index.d.ts +1 -1
- package/dist/planning/index.js +1 -1
- package/dist/planning/plan-executor.d.ts +20 -1
- package/dist/planning/plan-executor.js +209 -100
- package/dist/planning/types.d.ts +16 -0
- package/dist/planning/types.js +17 -0
- package/dist/shared/error-utils.d.ts +15 -0
- package/dist/shared/error-utils.js +21 -0
- package/dist/shared/events/domain-events.d.ts +2 -1
- package/package.json +10 -6
- package/dist/cli/chunks/adapter-IYC62SXA.js +0 -2
- package/dist/cli/chunks/agent-booster-wasm-EDNKP3SP.js +0 -2
- package/dist/cli/chunks/aqe-learning-engine-LLOU2IXD.js +0 -2
- package/dist/cli/chunks/audit-CVZQMF55.js +0 -3
- package/dist/cli/chunks/base-P3Z4IKCT.js +0 -2
- package/dist/cli/chunks/browser-workflow-YYHQQ25X.js +0 -2
- package/dist/cli/chunks/chunk-3EZ5DR2R.js +0 -21
- package/dist/cli/chunks/chunk-5WOSWNDN.js +0 -2
- package/dist/cli/chunks/chunk-7CD7PBHY.js +0 -3
- package/dist/cli/chunks/chunk-7X7JYWT4.js +0 -27
- package/dist/cli/chunks/chunk-CZO4BJG5.js +0 -2
- package/dist/cli/chunks/chunk-J27F4NSB.js +0 -2
- package/dist/cli/chunks/chunk-J5UNP6W3.js +0 -2
- package/dist/cli/chunks/chunk-MI5Q55DG.js +0 -65
- package/dist/cli/chunks/chunk-TY5WC3FT.js +0 -12
- package/dist/cli/chunks/chunk-UDHVCKGA.js +0 -5
- package/dist/cli/chunks/chunk-XQSIRBKT.js +0 -180
- package/dist/cli/chunks/chunk-YXP6BKGS.js +0 -730
- package/dist/cli/chunks/chunk-ZBABIZ2D.js +0 -2
- package/dist/cli/chunks/chunk-ZCWERUYB.js +0 -12
- package/dist/cli/chunks/claude-flow-setup-5LVJOFKP.js +0 -2
- package/dist/cli/chunks/client-HUVFA5PF.js +0 -2
- package/dist/cli/chunks/core-handlers-UEXO3VAA.js +0 -2
- package/dist/cli/chunks/cross-domain-router-ODU5IZD6.js +0 -2
- package/dist/cli/chunks/domain-transfer-JZA5TMW3.js +0 -2
- package/dist/cli/chunks/dream-HE3OX42F.js +0 -2
- package/dist/cli/chunks/heartbeat-scheduler-QUIFGGLX.js +0 -2
- package/dist/cli/chunks/hnsw-adapter-42KB37KP.js +0 -2
- package/dist/cli/chunks/hnsw-index-T2PGO77J.js +0 -2
- package/dist/cli/chunks/hybrid-backend-FRNWYRKH.js +0 -2
- package/dist/cli/chunks/impact-analyzer-A5QYOYBR.js +0 -2
- package/dist/cli/chunks/init-wizard-XBU674YH.js +0 -2
- package/dist/cli/chunks/kernel-DV5MTNZD.js +0 -2
- package/dist/cli/chunks/knowledge-graph-4ACGVJQK.js +0 -2
- package/dist/cli/chunks/llm-router-service-PSMASERT.js +0 -2
- package/dist/cli/chunks/load-test-MRUO2VPF.js +0 -2
- package/dist/cli/chunks/mcp-JGSFCEMH.js +0 -2
- package/dist/cli/chunks/memory-backend-2MPGI6JW.js +0 -2
- package/dist/cli/chunks/memory-handlers-XT4HMITB.js +0 -2
- package/dist/cli/chunks/multi-model-executor-26Q5BSVG.js +0 -14
- package/dist/cli/chunks/orchestrator-D5IFV65I.js +0 -393
- package/dist/cli/chunks/pattern-null-store-TGWUL237.js +0 -2
- package/dist/cli/chunks/protocol-executor-GEVH5KD6.js +0 -2
- package/dist/cli/chunks/qe-reasoning-bank-DJ2JL6QB.js +0 -2
- package/dist/cli/chunks/queen-coordinator-F7E3AS26.js +0 -2
- package/dist/cli/chunks/router-OZH3QSAU.js +0 -2
- package/dist/cli/chunks/routing-feedback-J2E3ADZB.js +0 -2
- package/dist/cli/chunks/rvf-dual-writer-HK525Y5Y.js +0 -2
- package/dist/cli/chunks/rvf-migration-adapter-Q7FB3BKR.js +0 -2
- package/dist/cli/chunks/rvf-native-adapter-5ZRCGUI6.js +0 -2
- package/dist/cli/chunks/safe-db-3OYEPVEH.js +0 -2
- package/dist/cli/chunks/schedule-AG4C2EIQ.js +0 -2
- package/dist/cli/chunks/scheduler-SQS2CZFZ.js +0 -2
- package/dist/cli/chunks/shared-rvf-adapter-NFL6QSZ6.js +0 -2
- package/dist/cli/chunks/sqlite-persistence-MAKDFSHC.js +0 -2
- package/dist/cli/chunks/sync-MBTW5XBF.js +0 -2
- package/dist/cli/chunks/task-handlers-NH4GJHCJ.js +0 -9
- package/dist/cli/chunks/test-MPHGT4T6.js +0 -33
- package/dist/cli/chunks/token-bootstrap-SSDCYEKK.js +0 -2
- package/dist/cli/chunks/tree-sitter-wasm-parser-J6ZMAK37.js +0 -2
- package/dist/cli/chunks/unified-memory-DDWMC435.js +0 -2
- package/dist/cli/chunks/unified-memory-hnsw-4JA7SGBK.js +0 -2
- package/dist/cli/chunks/unified-persistence-F6OSNTXY.js +0 -2
- package/dist/cli/chunks/vibium-HOGMFJ2Z.js +0 -2
- package/dist/cli/chunks/visual-security-25SMBIYT.js +0 -2
- package/dist/cli/chunks/witness-chain-PJOQPFUX.js +0 -2
- package/dist/cli/chunks/witness-chain-ZW6KKUZU.js +0 -2
- package/dist/cli/chunks/workflow-orchestrator-UKSIDM7Q.js +0 -2
- package/dist/cli/chunks/wrappers-UR7BLXKV.js +0 -2
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GOAP world-state detection for the planning MCP tools (issue #535).
|
|
3
|
+
*
|
|
4
|
+
* `goap_status {type:"world"}` and `goap_plan`'s auto-detected start state
|
|
5
|
+
* used to return a static copy of DEFAULT_V3_WORLD_STATE (fleet frozen at
|
|
6
|
+
* `activeAgents: 0`, coverage 0, securityScore 100, ...) and label it as real
|
|
7
|
+
* data. This module builds the state from sources that are actually live in
|
|
8
|
+
* the MCP server process and records, per field, where each value came from:
|
|
9
|
+
*
|
|
10
|
+
* - 'live' — read from the running fleet (the same queen/kernel state
|
|
11
|
+
* `agent_list` reads)
|
|
12
|
+
* - 'measured' — read from a coverage report on disk
|
|
13
|
+
* (`coverage/coverage-summary.json`, istanbul json-summary)
|
|
14
|
+
* - 'caller' — supplied by the caller (goap_plan `currentState`)
|
|
15
|
+
* - 'default' — not measured; the planner's DEFAULT_V3_WORLD_STATE value
|
|
16
|
+
* is used as an assumption and must not be reported as real
|
|
17
|
+
*
|
|
18
|
+
* @module mcp/tools/planning/world-state
|
|
19
|
+
*/
|
|
20
|
+
import * as fs from 'fs';
|
|
21
|
+
import * as path from 'path';
|
|
22
|
+
import { DEFAULT_V3_WORLD_STATE, QE_GOALS, getAllQEActions, } from '../../../planning/index.js';
|
|
23
|
+
import { findProjectRoot } from '../../../kernel/project-root.js';
|
|
24
|
+
/** Every leaf field the planner's world state carries (for provenance). */
|
|
25
|
+
const TRACKED_FIELDS = [
|
|
26
|
+
'coverage.line',
|
|
27
|
+
'coverage.branch',
|
|
28
|
+
'coverage.function',
|
|
29
|
+
'coverage.target',
|
|
30
|
+
'coverage.measured',
|
|
31
|
+
'quality.testsPassing',
|
|
32
|
+
'quality.totalTests',
|
|
33
|
+
'quality.securityScore',
|
|
34
|
+
'quality.performanceScore',
|
|
35
|
+
'fleet.activeAgents',
|
|
36
|
+
'fleet.availableAgents',
|
|
37
|
+
'fleet.maxAgents',
|
|
38
|
+
'resources.timeRemaining',
|
|
39
|
+
'resources.memoryAvailable',
|
|
40
|
+
'resources.parallelSlots',
|
|
41
|
+
'context.environment',
|
|
42
|
+
'context.riskLevel',
|
|
43
|
+
'patterns.available',
|
|
44
|
+
'patterns.reusable',
|
|
45
|
+
];
|
|
46
|
+
const COVERAGE_SUMMARY_RELATIVE = path.join('coverage', 'coverage-summary.json');
|
|
47
|
+
const MAX_COVERAGE_SUMMARY_BYTES = 32 * 1024 * 1024;
|
|
48
|
+
// ============================================================================
|
|
49
|
+
// Live sources
|
|
50
|
+
// ============================================================================
|
|
51
|
+
/**
|
|
52
|
+
* Read the in-process fleet via core-handlers' fleet state — the same queen
|
|
53
|
+
* `agent_list` reads. Returns null when no fleet is initialized. Dynamic
|
|
54
|
+
* import: core-handlers transitively imports the tool registry, which
|
|
55
|
+
* imports this module's callers (a static import would be circular).
|
|
56
|
+
*/
|
|
57
|
+
export async function readLiveFleet() {
|
|
58
|
+
try {
|
|
59
|
+
const { getFleetState, isFleetInitialized } = await import('../../handlers/core-handlers.js');
|
|
60
|
+
if (!isFleetInitialized())
|
|
61
|
+
return null;
|
|
62
|
+
const { queen, kernel } = getFleetState();
|
|
63
|
+
if (!queen || !kernel)
|
|
64
|
+
return null;
|
|
65
|
+
const agents = queen.listAllAgents();
|
|
66
|
+
const availableAgents = [
|
|
67
|
+
...new Set(agents.filter((a) => a.status === 'running' || a.status === 'idle').map((a) => a.type)),
|
|
68
|
+
].sort();
|
|
69
|
+
return {
|
|
70
|
+
activeAgents: agents.filter((a) => a.status === 'running').length,
|
|
71
|
+
maxAgents: kernel.getConfig().maxConcurrentAgents,
|
|
72
|
+
availableAgents,
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
catch {
|
|
76
|
+
return null;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
function isPercent(value) {
|
|
80
|
+
return typeof value === 'number' && Number.isFinite(value) && value >= 0 && value <= 100;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Read `coverage/coverage-summary.json` (istanbul/v8 json-summary reporter)
|
|
84
|
+
* under the project root. Fixed relative path — no caller-controlled input
|
|
85
|
+
* reaches the filesystem. Returns null when absent, oversized, or malformed.
|
|
86
|
+
*/
|
|
87
|
+
export function readCoverageSummary(projectRoot = findProjectRoot()) {
|
|
88
|
+
const file = path.join(projectRoot, COVERAGE_SUMMARY_RELATIVE);
|
|
89
|
+
try {
|
|
90
|
+
const stat = fs.statSync(file);
|
|
91
|
+
if (!stat.isFile() || stat.size > MAX_COVERAGE_SUMMARY_BYTES)
|
|
92
|
+
return null;
|
|
93
|
+
const parsed = JSON.parse(fs.readFileSync(file, 'utf-8'));
|
|
94
|
+
const line = parsed.total?.lines?.pct;
|
|
95
|
+
const branch = parsed.total?.branches?.pct;
|
|
96
|
+
const fn = parsed.total?.functions?.pct;
|
|
97
|
+
if (!isPercent(line) || !isPercent(branch) || !isPercent(fn))
|
|
98
|
+
return null;
|
|
99
|
+
return {
|
|
100
|
+
line,
|
|
101
|
+
branch,
|
|
102
|
+
function: fn,
|
|
103
|
+
source: COVERAGE_SUMMARY_RELATIVE,
|
|
104
|
+
measuredAt: stat.mtime.toISOString(),
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
catch {
|
|
108
|
+
return null;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
// ============================================================================
|
|
112
|
+
// Detection
|
|
113
|
+
// ============================================================================
|
|
114
|
+
function cloneDefaultState() {
|
|
115
|
+
const d = DEFAULT_V3_WORLD_STATE;
|
|
116
|
+
return {
|
|
117
|
+
coverage: { ...d.coverage },
|
|
118
|
+
quality: { ...d.quality },
|
|
119
|
+
fleet: { ...d.fleet, availableAgents: [...d.fleet.availableAgents] },
|
|
120
|
+
resources: { ...d.resources },
|
|
121
|
+
context: { ...d.context },
|
|
122
|
+
patterns: { ...d.patterns },
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Build the current world state from live/measured sources, falling back to
|
|
127
|
+
* DEFAULT_V3_WORLD_STATE per field and recording which is which.
|
|
128
|
+
*/
|
|
129
|
+
export async function detectWorldState(sources = {}) {
|
|
130
|
+
const state = cloneDefaultState();
|
|
131
|
+
const provenance = {};
|
|
132
|
+
for (const field of TRACKED_FIELDS)
|
|
133
|
+
provenance[field] = 'default';
|
|
134
|
+
const fleet = await (sources.readFleet ?? readLiveFleet)();
|
|
135
|
+
if (fleet) {
|
|
136
|
+
state.fleet.activeAgents = fleet.activeAgents;
|
|
137
|
+
state.fleet.maxAgents = fleet.maxAgents;
|
|
138
|
+
state.fleet.availableAgents = [...fleet.availableAgents];
|
|
139
|
+
provenance['fleet.activeAgents'] = 'live';
|
|
140
|
+
provenance['fleet.maxAgents'] = 'live';
|
|
141
|
+
provenance['fleet.availableAgents'] = 'live';
|
|
142
|
+
}
|
|
143
|
+
const coverage = (sources.readCoverage ?? (() => readCoverageSummary()))();
|
|
144
|
+
let coverageReport;
|
|
145
|
+
if (coverage) {
|
|
146
|
+
state.coverage.line = coverage.line;
|
|
147
|
+
state.coverage.branch = coverage.branch;
|
|
148
|
+
state.coverage.function = coverage.function;
|
|
149
|
+
state.coverage.measured = true;
|
|
150
|
+
for (const f of ['coverage.line', 'coverage.branch', 'coverage.function', 'coverage.measured']) {
|
|
151
|
+
provenance[f] = 'measured';
|
|
152
|
+
}
|
|
153
|
+
coverageReport = { source: coverage.source, measuredAt: coverage.measuredAt };
|
|
154
|
+
}
|
|
155
|
+
return { state, provenance, fleetInitialized: fleet !== null, coverageReport };
|
|
156
|
+
}
|
|
157
|
+
const percent = (v) => typeof v === 'number' && Number.isFinite(v) && v >= 0 && v <= 100 ? null : 'a number between 0 and 100';
|
|
158
|
+
const nonNegativeInt = (v) => typeof v === 'number' && Number.isInteger(v) && v >= 0 ? null : 'a non-negative integer';
|
|
159
|
+
const nonNegative = (v) => typeof v === 'number' && Number.isFinite(v) && v >= 0 ? null : 'a non-negative number';
|
|
160
|
+
const bool = (v) => (typeof v === 'boolean' ? null : 'a boolean');
|
|
161
|
+
const stringList = (v) => Array.isArray(v) && v.every((x) => typeof x === 'string') ? null : 'an array of strings';
|
|
162
|
+
const oneOf = (...allowed) => (v) => typeof v === 'string' && allowed.includes(v) ? null : `one of ${allowed.join(', ')}`;
|
|
163
|
+
/** Schema of the known V3WorldState leaves. */
|
|
164
|
+
const FIELD_CHECKS = {
|
|
165
|
+
'coverage.line': percent,
|
|
166
|
+
'coverage.branch': percent,
|
|
167
|
+
'coverage.function': percent,
|
|
168
|
+
'coverage.target': percent,
|
|
169
|
+
'coverage.measured': bool,
|
|
170
|
+
'quality.testsPassing': percent,
|
|
171
|
+
'quality.totalTests': nonNegativeInt,
|
|
172
|
+
'quality.securityScore': percent,
|
|
173
|
+
'quality.performanceScore': percent,
|
|
174
|
+
'fleet.activeAgents': nonNegativeInt,
|
|
175
|
+
'fleet.availableAgents': stringList,
|
|
176
|
+
'fleet.maxAgents': nonNegativeInt,
|
|
177
|
+
'resources.timeRemaining': nonNegative,
|
|
178
|
+
'resources.memoryAvailable': nonNegative,
|
|
179
|
+
'resources.parallelSlots': nonNegativeInt,
|
|
180
|
+
'context.environment': oneOf('development', 'staging', 'production'),
|
|
181
|
+
'context.riskLevel': oneOf('low', 'medium', 'high'),
|
|
182
|
+
'patterns.available': nonNegativeInt,
|
|
183
|
+
'patterns.reusable': nonNegativeInt,
|
|
184
|
+
};
|
|
185
|
+
const SECTIONS = ['coverage', 'quality', 'fleet', 'resources', 'context', 'patterns'];
|
|
186
|
+
let libraryFlagKeys = null;
|
|
187
|
+
/** Extra state keys the seeded action library / goals read or write. */
|
|
188
|
+
function plannerFlagKeys() {
|
|
189
|
+
if (!libraryFlagKeys) {
|
|
190
|
+
const keys = new Set();
|
|
191
|
+
for (const action of getAllQEActions()) {
|
|
192
|
+
for (const k of Object.keys(action.preconditions))
|
|
193
|
+
keys.add(k);
|
|
194
|
+
for (const k of Object.keys(action.effects))
|
|
195
|
+
keys.add(k);
|
|
196
|
+
}
|
|
197
|
+
for (const goal of QE_GOALS) {
|
|
198
|
+
for (const k of Object.keys(goal.conditions))
|
|
199
|
+
keys.add(k);
|
|
200
|
+
}
|
|
201
|
+
libraryFlagKeys = keys;
|
|
202
|
+
}
|
|
203
|
+
return libraryFlagKeys;
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Validate a caller-supplied world state (issue #535, codex review): known
|
|
207
|
+
* fields must match the V3WorldState schema (types, 0-100 percentages,
|
|
208
|
+
* enums); other keys are accepted only if a loaded planner action (seeded
|
|
209
|
+
* or custom), the seeded library, or the goal references them (planner
|
|
210
|
+
* flags such as `coverage.gapsIdentified`) and hold a primitive value.
|
|
211
|
+
* Returns an error message, or null when valid.
|
|
212
|
+
*/
|
|
213
|
+
export function validateWorldStatePatch(provided, extraAllowedKeys = []) {
|
|
214
|
+
if (typeof provided !== 'object' || provided === null || Array.isArray(provided)) {
|
|
215
|
+
return 'currentState must be an object';
|
|
216
|
+
}
|
|
217
|
+
const flags = new Set([...plannerFlagKeys(), ...extraAllowedKeys]);
|
|
218
|
+
for (const [section, patch] of Object.entries(provided)) {
|
|
219
|
+
if (!SECTIONS.includes(section)) {
|
|
220
|
+
return `currentState.${section} is not a world-state section (expected one of ${SECTIONS.join(', ')})`;
|
|
221
|
+
}
|
|
222
|
+
if (typeof patch !== 'object' || patch === null || Array.isArray(patch)) {
|
|
223
|
+
return `currentState.${section} must be an object`;
|
|
224
|
+
}
|
|
225
|
+
for (const [key, value] of Object.entries(patch)) {
|
|
226
|
+
const field = `${section}.${key}`;
|
|
227
|
+
const check = FIELD_CHECKS[field];
|
|
228
|
+
if (check) {
|
|
229
|
+
const expected = check(value);
|
|
230
|
+
if (expected)
|
|
231
|
+
return `currentState.${field} must be ${expected}, got ${JSON.stringify(value)}`;
|
|
232
|
+
continue;
|
|
233
|
+
}
|
|
234
|
+
if (!flags.has(field)) {
|
|
235
|
+
return `currentState.${field} is not a known world-state field`;
|
|
236
|
+
}
|
|
237
|
+
if (typeof value !== 'boolean' &&
|
|
238
|
+
typeof value !== 'string' &&
|
|
239
|
+
!(typeof value === 'number' && Number.isFinite(value))) {
|
|
240
|
+
return `currentState.${field} must be a boolean, string or finite number, got ${JSON.stringify(value)}`;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
return null;
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* Overlay a caller-supplied (possibly partial) world state onto a detected
|
|
248
|
+
* one, section by section, marking every overridden leaf as 'caller'.
|
|
249
|
+
* Callers must run validateWorldStatePatch() first; this only merges.
|
|
250
|
+
*/
|
|
251
|
+
export function overlayCallerState(detected, provided) {
|
|
252
|
+
const state = detected.state;
|
|
253
|
+
const provenance = { ...detected.provenance };
|
|
254
|
+
for (const section of SECTIONS) {
|
|
255
|
+
const patch = provided[section];
|
|
256
|
+
if (typeof patch !== 'object' || patch === null || Array.isArray(patch))
|
|
257
|
+
continue;
|
|
258
|
+
for (const [key, value] of Object.entries(patch)) {
|
|
259
|
+
if (key === '__proto__' || key === 'constructor' || key === 'prototype')
|
|
260
|
+
continue;
|
|
261
|
+
state[section][key] = Array.isArray(value) ? [...value] : value;
|
|
262
|
+
provenance[`${section}.${key}`] = 'caller';
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
return { ...detected, provenance };
|
|
266
|
+
}
|
|
267
|
+
/** Field paths whose values are assumptions rather than observations. */
|
|
268
|
+
export function defaultedFields(provenance) {
|
|
269
|
+
return Object.entries(provenance)
|
|
270
|
+
.filter(([, source]) => source === 'default')
|
|
271
|
+
.map(([field]) => field)
|
|
272
|
+
.sort();
|
|
273
|
+
}
|
|
274
|
+
//# sourceMappingURL=world-state.js.map
|
|
@@ -36,15 +36,20 @@ export class E2EExecuteTool extends MCPToolBase {
|
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
38
|
const startTime = Date.now();
|
|
39
|
+
let vibiumClient;
|
|
39
40
|
try {
|
|
40
41
|
// Get E2E runner from domain
|
|
41
42
|
const { createE2ETestRunnerService } = await import('../../../domains/test-execution/index.js');
|
|
42
43
|
const { createVibiumClient } = await import('../../../integrations/vibium/index.js');
|
|
43
44
|
// Create Vibium client
|
|
44
|
-
|
|
45
|
+
vibiumClient = await createVibiumClient({
|
|
45
46
|
enabled: true,
|
|
47
|
+
fallbackEnabled: false,
|
|
46
48
|
});
|
|
47
49
|
// Create E2E runner
|
|
50
|
+
if (!await vibiumClient.isAvailable()) {
|
|
51
|
+
throw new Error('Browser unavailable; run aqe init --browser-engine');
|
|
52
|
+
}
|
|
48
53
|
const runner = createE2ETestRunnerService(vibiumClient, runnerConfig);
|
|
49
54
|
// Execute test case or suite
|
|
50
55
|
if (testCase) {
|
|
@@ -106,6 +111,9 @@ export class E2EExecuteTool extends MCPToolBase {
|
|
|
106
111
|
error: `E2E test execution failed: ${toErrorMessage(error)}`,
|
|
107
112
|
};
|
|
108
113
|
}
|
|
114
|
+
finally {
|
|
115
|
+
await vibiumClient?.dispose();
|
|
116
|
+
}
|
|
109
117
|
}
|
|
110
118
|
}
|
|
111
119
|
// ============================================================================
|
|
@@ -8,7 +8,9 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import { MCPToolBase, MCPToolConfig, MCPToolContext } from '../base';
|
|
10
10
|
import { ToolResult } from '../../types';
|
|
11
|
+
import { GenerateTestsRequest } from '../../../domains/test-generation/interfaces';
|
|
11
12
|
export interface TestGenerateParams {
|
|
13
|
+
behaviorExamples?: GenerateTestsRequest['behaviorExamples'];
|
|
12
14
|
sourceFiles: string[];
|
|
13
15
|
testType?: 'unit' | 'integration' | 'e2e';
|
|
14
16
|
framework?: 'jest' | 'vitest' | 'mocha' | 'pytest' | 'node-test';
|
|
@@ -21,7 +23,8 @@ export interface TestGenerateParams {
|
|
|
21
23
|
}
|
|
22
24
|
export interface TestGenerateResult {
|
|
23
25
|
tests: GeneratedTest[];
|
|
24
|
-
|
|
26
|
+
/** null means unmeasured; never coerce unknown coverage to measured zero. */
|
|
27
|
+
coverageEstimate: number | null;
|
|
25
28
|
patternsUsed: string[];
|
|
26
29
|
suggestions: string[];
|
|
27
30
|
antiPatterns?: AntiPattern[];
|
|
@@ -34,6 +37,8 @@ export interface GeneratedTest {
|
|
|
34
37
|
testCode: string;
|
|
35
38
|
type: 'unit' | 'integration' | 'e2e';
|
|
36
39
|
assertions: number;
|
|
40
|
+
generationMode?: string;
|
|
41
|
+
generationLimits?: string[];
|
|
37
42
|
}
|
|
38
43
|
export interface AntiPattern {
|
|
39
44
|
name: string;
|
|
@@ -10,6 +10,7 @@ import { MCPToolBase, getSharedMemoryBackend, getLLMRouter } from '../base.js';
|
|
|
10
10
|
import { createTestGeneratorServiceWithDependencies } from '../../../domains/test-generation/services/test-generator.js';
|
|
11
11
|
import { TokenOptimizerService } from '../../../optimization/token-optimizer-service.js';
|
|
12
12
|
import { toErrorMessage } from '../../../shared/error-utils.js';
|
|
13
|
+
import { BEHAVIOR_EXAMPLE_ITEM_SCHEMA, validateBehaviorExamples } from '../../../domains/test-generation/services/behavior-example-validation.js';
|
|
13
14
|
// ============================================================================
|
|
14
15
|
// Tool Implementation
|
|
15
16
|
// ============================================================================
|
|
@@ -45,6 +46,9 @@ export class TestGenerateTool extends MCPToolBase {
|
|
|
45
46
|
async execute(params, context) {
|
|
46
47
|
const { sourceFiles, testType = 'unit', framework = 'vitest', language = 'typescript', coverageTarget = 80, patterns = [], aiEnhancement = true, detectAntiPatterns = false, } = params;
|
|
47
48
|
try {
|
|
49
|
+
// #795: reject malformed caller fixtures at the tool boundary, before
|
|
50
|
+
// any service or domain work runs.
|
|
51
|
+
const behaviorExamples = validateBehaviorExamples(params.behaviorExamples);
|
|
48
52
|
// Stream progress updates
|
|
49
53
|
this.emitStream(context, {
|
|
50
54
|
status: 'analyzing',
|
|
@@ -79,6 +83,7 @@ export class TestGenerateTool extends MCPToolBase {
|
|
|
79
83
|
const service = await this.getService(context);
|
|
80
84
|
// Build the domain request from MCP params
|
|
81
85
|
const domainRequest = {
|
|
86
|
+
behaviorExamples,
|
|
82
87
|
sourceFiles,
|
|
83
88
|
testType: testType,
|
|
84
89
|
framework: framework,
|
|
@@ -103,6 +108,8 @@ export class TestGenerateTool extends MCPToolBase {
|
|
|
103
108
|
testCode: test.testCode,
|
|
104
109
|
type: test.type,
|
|
105
110
|
assertions: test.assertions,
|
|
111
|
+
generationMode: test.generationMode,
|
|
112
|
+
generationLimits: test.generationLimits,
|
|
106
113
|
}));
|
|
107
114
|
this.emitStream(context, {
|
|
108
115
|
status: 'generating',
|
|
@@ -150,6 +157,7 @@ export class TestGenerateTool extends MCPToolBase {
|
|
|
150
157
|
const TEST_GENERATE_SCHEMA = {
|
|
151
158
|
type: 'object',
|
|
152
159
|
properties: {
|
|
160
|
+
behaviorExamples: { type: 'array', description: 'Trusted JSON specification fixtures: functionName, args, expected', items: BEHAVIOR_EXAMPLE_ITEM_SCHEMA },
|
|
153
161
|
sourceFiles: {
|
|
154
162
|
type: 'array',
|
|
155
163
|
description: 'Array of source file paths to generate tests for',
|
package/dist/mcp/types.d.ts
CHANGED
|
@@ -14,6 +14,8 @@ export interface ToolParameter {
|
|
|
14
14
|
required?: boolean;
|
|
15
15
|
default?: unknown;
|
|
16
16
|
enum?: string[];
|
|
17
|
+
/** JSON Schema for array elements (only meaningful when type is 'array'). */
|
|
18
|
+
items?: Record<string, unknown>;
|
|
17
19
|
}
|
|
18
20
|
/**
|
|
19
21
|
* Optional safety metadata advertised by an MCP tool.
|
|
@@ -60,9 +62,11 @@ export interface ToolResult<T = unknown> {
|
|
|
60
62
|
metadata?: ToolResultMetadata;
|
|
61
63
|
}
|
|
62
64
|
/**
|
|
63
|
-
* Data source tracking for audit/transparency
|
|
65
|
+
* Data source tracking for audit/transparency.
|
|
66
|
+
* 'estimated': computed from real inputs mixed with assumed/default values
|
|
67
|
+
* (the result names which ones) — never presented as fully real (#535).
|
|
64
68
|
*/
|
|
65
|
-
export type DataSource = 'real' | 'demo' | 'fallback';
|
|
69
|
+
export type DataSource = 'real' | 'demo' | 'fallback' | 'estimated';
|
|
66
70
|
/**
|
|
67
71
|
* Tool result metadata
|
|
68
72
|
*/
|
|
@@ -169,6 +173,7 @@ export interface TestGenerateParams {
|
|
|
169
173
|
framework?: string;
|
|
170
174
|
testType?: 'unit' | 'integration' | 'e2e' | 'property-based';
|
|
171
175
|
coverageGoal?: number;
|
|
176
|
+
behaviorExamples?: import('../domains/test-generation/interfaces').BehaviorExample[];
|
|
172
177
|
aiEnhancement?: boolean;
|
|
173
178
|
detectAntiPatterns?: boolean;
|
|
174
179
|
}
|
|
@@ -465,14 +470,15 @@ export interface TestGenerateResult {
|
|
|
465
470
|
status: string;
|
|
466
471
|
duration: number;
|
|
467
472
|
testsGenerated: number;
|
|
468
|
-
|
|
473
|
+
/** null means unmeasured; never coerce unknown coverage to measured zero. */
|
|
474
|
+
coverageEstimate: number | null;
|
|
469
475
|
antiPatternsDetected?: number;
|
|
470
476
|
suggestions?: string[];
|
|
471
477
|
savedFiles?: string[];
|
|
472
478
|
patternsUsed?: string[];
|
|
473
479
|
/**
|
|
474
480
|
* #567: true when the ADR-051 LLM branch actually ran. When false the tests
|
|
475
|
-
*
|
|
481
|
+
* come from deterministic fixtures or scaffolding — see `generationMode`/`note`.
|
|
476
482
|
*/
|
|
477
483
|
llmEnhanced?: boolean;
|
|
478
484
|
/** #567: set to 'deterministic-template' when no LLM enhancement was applied. */
|
|
@@ -120,9 +120,26 @@ export declare class GOAPPlanner {
|
|
|
120
120
|
*/
|
|
121
121
|
private checkCondition;
|
|
122
122
|
/**
|
|
123
|
-
*
|
|
124
|
-
|
|
125
|
-
|
|
123
|
+
* Build an admissible, cost-unit A* heuristic for `goal` over `actions`.
|
|
124
|
+
*
|
|
125
|
+
* Issue #535: the previous heuristic was the raw percentage gap / 100 (e.g.
|
|
126
|
+
* 0.9 for coverage 0 -> 90) while a single generate-coverage-tests step
|
|
127
|
+
* costs ~5, so it carried almost no information and A* degenerated into
|
|
128
|
+
* uniform-cost search: it enumerated every combination of the ~40 cheap
|
|
129
|
+
* flag-setting library actions and hit the iteration cap before reaching
|
|
130
|
+
* any deep goal. Now each unmet goal key contributes a lower bound on the
|
|
131
|
+
* cost still needed to satisfy it:
|
|
132
|
+
* - numeric min/max gap reachable by deltas: ceil(gap / largest delta)
|
|
133
|
+
* steps x cheapest such action;
|
|
134
|
+
* - any key an action can `set` (primitive or {set}) directly: that
|
|
135
|
+
* action's cost (one step);
|
|
136
|
+
* - unmet key no action can move: Infinity (dead end, pruned).
|
|
137
|
+
* The per-key bounds are combined with max(), which keeps the heuristic
|
|
138
|
+
* admissible and consistent even when one action moves several keys.
|
|
139
|
+
* Costs use the same base as getActionCost() (cost / successRate), whose
|
|
140
|
+
* risk multiplier only ever increases cost, so the bound never overshoots.
|
|
141
|
+
*/
|
|
142
|
+
private buildHeuristic;
|
|
126
143
|
/**
|
|
127
144
|
* Get value from nested state using dot notation
|
|
128
145
|
*/
|
|
@@ -133,9 +150,20 @@ export declare class GOAPPlanner {
|
|
|
133
150
|
*/
|
|
134
151
|
private setStateValue;
|
|
135
152
|
/**
|
|
136
|
-
* Create hash of state for deduplication
|
|
153
|
+
* Create hash of state for deduplication.
|
|
154
|
+
*
|
|
155
|
+
* Issue #535: this previously hashed a fixed list of known fields only, so
|
|
156
|
+
* every action effect on any other key (coverage.gapsIdentified,
|
|
157
|
+
* quality.unitTestsRun, fleet.specialistAvailable, ... — most of the
|
|
158
|
+
* seeded action library) produced a successor state that hashed identical
|
|
159
|
+
* to its already-closed parent and was pruned. That made e.g. the seeded
|
|
160
|
+
* `achieve-90-percent-coverage` goal unplannable from any state (the
|
|
161
|
+
* analyze-coverage-gaps -> generate-coverage-tests chain was unreachable).
|
|
162
|
+
* Now every key in the state participates. Numbers are compared at 1e-6
|
|
163
|
+
* precision; resources.timeRemaining is bucketed per minute, as before.
|
|
137
164
|
*/
|
|
138
165
|
private hashState;
|
|
166
|
+
private static stableStateKey;
|
|
139
167
|
/**
|
|
140
168
|
* Deep clone world state.
|
|
141
169
|
* PERF-008: Manual structured clone avoids JSON.parse/stringify overhead.
|
|
@@ -163,6 +191,12 @@ export declare class GOAPPlanner {
|
|
|
163
191
|
* Get actions by category
|
|
164
192
|
*/
|
|
165
193
|
getActionsByCategory(category: GOAPAction['category']): Promise<GOAPAction[]>;
|
|
194
|
+
/**
|
|
195
|
+
* State keys referenced by any loaded action's preconditions or effects
|
|
196
|
+
* (seeded library plus custom actions added via addAction()). Used by the
|
|
197
|
+
* goap_plan tool to validate caller-supplied world-state keys (#535).
|
|
198
|
+
*/
|
|
199
|
+
getReferencedStateKeys(): string[];
|
|
166
200
|
/**
|
|
167
201
|
* Get available actions based on constraints
|
|
168
202
|
*/
|
|
@@ -175,6 +209,20 @@ export declare class GOAPPlanner {
|
|
|
175
209
|
* Get plan by ID
|
|
176
210
|
*/
|
|
177
211
|
getPlan(planId: string): Promise<GOAPPlan | null>;
|
|
212
|
+
/**
|
|
213
|
+
* List persisted plan summaries without loading every plan into memory.
|
|
214
|
+
* Count includes all rows matching the optional status, before pagination.
|
|
215
|
+
*/
|
|
216
|
+
listPlanSummaries(status?: string, limit?: number): Promise<{
|
|
217
|
+
plans: Array<{
|
|
218
|
+
id: string;
|
|
219
|
+
status: string;
|
|
220
|
+
stepCount: number;
|
|
221
|
+
totalCost: number;
|
|
222
|
+
createdAt: string;
|
|
223
|
+
}>;
|
|
224
|
+
count: number;
|
|
225
|
+
}>;
|
|
178
226
|
/**
|
|
179
227
|
* Find a similar plan by goal conditions
|
|
180
228
|
*/
|
|
@@ -191,6 +239,14 @@ export declare class GOAPPlanner {
|
|
|
191
239
|
* Validate that a plan can be executed from current state
|
|
192
240
|
*/
|
|
193
241
|
private validatePlanForState;
|
|
242
|
+
/**
|
|
243
|
+
* Issue #535: a reused plan must honour the caller's constraints exactly
|
|
244
|
+
* like a freshly searched one — otherwise a cached 11-step plan is handed
|
|
245
|
+
* back for a `maxSteps: 3` request (or one using an excluded action, or
|
|
246
|
+
* over budget). Also requires that replaying the plan from the current
|
|
247
|
+
* state actually reaches the goal.
|
|
248
|
+
*/
|
|
249
|
+
private planSatisfiesConstraints;
|
|
194
250
|
/**
|
|
195
251
|
* Hash goal conditions for comparison
|
|
196
252
|
*/
|