agentic-qe 3.14.0 → 3.14.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/helpers/brain-checkpoint.cjs +2 -1
- package/.claude/helpers/validate-v3-config.sh +6 -5
- package/.claude/hooks/aqe-hook.cjs +14 -14
- package/.claude/skills/qe-browser/evals/qe-browser.yaml +30 -41
- package/.claude/skills/qe-browser/fixtures/serve-skills.js +37 -0
- package/.claude/skills/qe-browser/scripts/lib/vibium.js +1 -1
- package/.claude/skills/qe-browser/scripts/smoke-test.sh +56 -25
- package/.claude/skills/qe-browser/scripts/visual-diff.js +24 -15
- package/.claude/skills/skills-manifest.json +1 -1
- package/CHANGELOG.md +114 -0
- package/assets/skills/qe-browser/evals/qe-browser.yaml +30 -41
- package/assets/skills/qe-browser/fixtures/serve-skills.js +37 -0
- package/assets/skills/qe-browser/scripts/lib/vibium.js +1 -1
- package/assets/skills/qe-browser/scripts/smoke-test.sh +56 -25
- package/assets/skills/qe-browser/scripts/visual-diff.js +24 -15
- package/assets/skills/skills-manifest.json +1 -1
- package/dist/cli/bundle.js +7 -7
- package/dist/cli/chunks/adapter-OJF6LAJV.js +2 -0
- package/dist/cli/chunks/{agent-booster-wasm-JZO6VUW4.js → agent-booster-wasm-SD5N32MX.js} +2 -2
- package/dist/cli/chunks/{agent-handler-534KFGEJ.js → agent-handler-OZRSJM7F.js} +2 -2
- package/dist/cli/chunks/{agent-memory-branch-B7KWLWY4.js → agent-memory-branch-NYTRANRN.js} +2 -2
- package/dist/cli/chunks/aqe-learning-engine-FGT474XB.js +2 -0
- package/dist/cli/chunks/{arena-OW5MELJX.js → arena-EX3SC2DP.js} +4 -4
- package/dist/cli/chunks/{arena-7CCD3S3I.js → arena-FOTVSRK4.js} +2 -2
- package/dist/cli/chunks/{audit-BHVKN4E2.js → audit-Q5GHSUQY.js} +3 -3
- package/dist/cli/chunks/base-HH765JFV.js +2 -0
- package/dist/cli/chunks/{better-sqlite3-P5FA6WFK.js → better-sqlite3-S7M5R2HS.js} +2 -2
- package/dist/cli/chunks/{brain-handler-WNW5LOV7.js → brain-handler-5FSA46R5.js} +3 -3
- package/dist/cli/chunks/{branch-enumerator-TVZ2ODKH.js → branch-enumerator-RWAXTGEU.js} +2 -2
- package/dist/cli/chunks/{browser-TCEB2W2F.js → browser-IGDESJGF.js} +2 -2
- package/dist/cli/chunks/browser-workflow-NPM4FUPI.js +2 -0
- package/dist/cli/chunks/{chunk-Q73RRTLE.js → chunk-2EHFEMRU.js} +2 -2
- package/dist/cli/chunks/{chunk-ZBOWR4XT.js → chunk-2H5YJ5ZK.js} +2 -2
- package/dist/cli/chunks/chunk-2LKAMMMI.js +2 -0
- package/dist/cli/chunks/{chunk-A2WZEMWT.js → chunk-2TG24LYQ.js} +1 -1
- package/dist/cli/chunks/{chunk-3QT6S3A3.js → chunk-3C2K4YMS.js} +3 -3
- package/dist/cli/chunks/{chunk-VESOYP6A.js → chunk-3DFFFXXO.js} +2 -2
- package/dist/cli/chunks/{chunk-K6CGQR5R.js → chunk-3WV4H33V.js} +1 -1
- package/dist/cli/chunks/{chunk-IL4AEB3J.js → chunk-42WUDDUU.js} +2 -2
- package/dist/cli/chunks/chunk-4AKGBUYD.js +4 -0
- package/dist/cli/chunks/{chunk-4FEJEVG7.js → chunk-4K27ESCA.js} +1 -1
- package/dist/cli/chunks/{chunk-TGOGCA74.js → chunk-4M6A3PVJ.js} +2 -2
- package/dist/cli/chunks/{chunk-RGVD6ZUX.js → chunk-4MH22236.js} +1 -1
- package/dist/cli/chunks/{chunk-6DPAMYLU.js → chunk-4N44UJGI.js} +2 -2
- package/dist/cli/chunks/{chunk-DJITEQYS.js → chunk-4PH7O5ZH.js} +2 -2
- package/dist/cli/chunks/{chunk-M3HUZD2I.js → chunk-4RT7I7PI.js} +1 -1
- package/dist/cli/chunks/chunk-4UCMTYFQ.js +65 -0
- package/dist/cli/chunks/{chunk-ZI3UO7QR.js → chunk-4ZUZDFAA.js} +2 -2
- package/dist/cli/chunks/{chunk-QSPRQPEL.js → chunk-57TNBR2P.js} +2 -2
- package/dist/cli/chunks/{chunk-ZCVJCCQQ.js → chunk-5EHLGOWW.js} +2 -2
- package/dist/cli/chunks/{chunk-ZAAYOENS.js → chunk-5WJUNRTY.js} +2 -2
- package/dist/cli/chunks/{chunk-QZPFUFZG.js → chunk-67A6PEZM.js} +2 -2
- package/dist/cli/chunks/{chunk-7BOPFN3Y.js → chunk-6EHN7Q2Q.js} +2 -2
- package/dist/cli/chunks/{chunk-2HYVOX6N.js → chunk-6F4WHN7D.js} +1 -1
- package/dist/cli/chunks/{chunk-GVEJP5T7.js → chunk-6LMLN5R2.js} +2 -2
- package/dist/cli/chunks/{chunk-QKQZ4IJF.js → chunk-6SZKLWZT.js} +5 -5
- package/dist/cli/chunks/{chunk-PEW6FZ47.js → chunk-6VKJAMZY.js} +1 -1
- package/dist/cli/chunks/{chunk-VYENTZ45.js → chunk-7AFBNU6K.js} +2 -2
- package/dist/cli/chunks/{chunk-6IJMD2ZL.js → chunk-7FWP7CZY.js} +3 -3
- package/dist/cli/chunks/{chunk-IE5LC7MB.js → chunk-7SK6IMGZ.js} +2 -2
- package/dist/cli/chunks/{chunk-3EM2MK3Z.js → chunk-A7N3YUDJ.js} +2 -2
- package/dist/cli/chunks/{chunk-J3XSHJGK.js → chunk-ADK7DF3G.js} +2 -2
- package/dist/cli/chunks/{chunk-EJ6IP7DE.js → chunk-ARMZYHYL.js} +2 -2
- package/dist/cli/chunks/{chunk-BZ4QVFP2.js → chunk-BWRHOIYC.js} +2 -2
- package/dist/cli/chunks/{chunk-A7SKM6JL.js → chunk-C7AXRI7E.js} +1 -1
- package/dist/cli/chunks/{chunk-4XTHRAUV.js → chunk-CG2MUD7U.js} +1 -1
- package/dist/cli/chunks/{chunk-HLNQDRHA.js → chunk-CH2TQCV5.js} +1 -1
- package/dist/cli/chunks/{chunk-JGROLJ33.js → chunk-CIESXO73.js} +1 -1
- package/dist/cli/chunks/{chunk-AR6SATU3.js → chunk-CJCT452S.js} +2 -2
- package/dist/cli/chunks/{chunk-UUJ5VQJM.js → chunk-CJHVOBJY.js} +1 -1
- package/dist/cli/chunks/{chunk-VOSISOFD.js → chunk-CTCQOYBS.js} +1 -1
- package/dist/cli/chunks/{chunk-XITTURP2.js → chunk-D4RCV4LY.js} +2 -2
- package/dist/cli/chunks/{chunk-5XGVSQS2.js → chunk-DRO5NJZA.js} +2 -2
- package/dist/cli/chunks/{chunk-QMMDN4WX.js → chunk-DVHWLAEO.js} +3 -3
- package/dist/cli/chunks/{chunk-5LEAGKX5.js → chunk-DW6ZMNMR.js} +2 -2
- package/dist/cli/chunks/{chunk-ZBKGX72B.js → chunk-E3Q7WNJD.js} +3 -3
- package/dist/cli/chunks/{chunk-5MZF4N4Q.js → chunk-EAJK25IS.js} +1 -1
- package/dist/cli/chunks/{chunk-3RYTAYR6.js → chunk-EH5OCHAJ.js} +1 -1
- package/dist/cli/chunks/{chunk-UI6WSPEK.js → chunk-F2KRT2II.js} +3 -3
- package/dist/cli/chunks/{chunk-NDPQ2WPU.js → chunk-FPHPP5TQ.js} +1 -1
- package/dist/cli/chunks/{chunk-WWWX76QB.js → chunk-FREF6Y4L.js} +2 -2
- package/dist/cli/chunks/{chunk-SROZXIMT.js → chunk-FVGTINVR.js} +54 -54
- package/dist/cli/chunks/{chunk-H3YDDKBW.js → chunk-G2CLZVYI.js} +3 -3
- package/dist/cli/chunks/{chunk-2O4DDPEA.js → chunk-G6AV2HGY.js} +3 -3
- package/dist/cli/chunks/{chunk-ENGKLFLY.js → chunk-GHQ5PUOV.js} +2 -2
- package/dist/cli/chunks/{chunk-NKWO2X3T.js → chunk-GHUPID5E.js} +1 -1
- package/dist/cli/chunks/{chunk-S5YVLPXU.js → chunk-GJAWEUIN.js} +2 -2
- package/dist/cli/chunks/{chunk-6IZQSLYZ.js → chunk-HBTC4L53.js} +2 -2
- package/dist/cli/chunks/{chunk-DDPJUAXQ.js → chunk-HSJ5FQCF.js} +2 -2
- package/dist/cli/chunks/{chunk-OONCRNFA.js → chunk-HZ6NEJMO.js} +2 -2
- package/dist/cli/chunks/{chunk-LCSVROU7.js → chunk-HZMLNM2T.js} +10 -10
- package/dist/cli/chunks/{chunk-JY4VZ6BN.js → chunk-ICKLBATY.js} +2 -2
- package/dist/cli/chunks/{chunk-JMKMDSXG.js → chunk-IUNMW454.js} +2 -2
- package/dist/cli/chunks/{chunk-XXFKN7LB.js → chunk-IVGVOGIZ.js} +1 -1
- package/dist/cli/chunks/{chunk-3GUO4ERR.js → chunk-IWFL6EFI.js} +2 -2
- package/dist/cli/chunks/{chunk-FRL3X2QA.js → chunk-JDXLCNKV.js} +2 -2
- package/dist/cli/chunks/{chunk-YW4RNZWT.js → chunk-JIUF6NV6.js} +2 -2
- package/dist/cli/chunks/{chunk-JAK5UUWH.js → chunk-JQ2ZD3WO.js} +2 -2
- package/dist/cli/chunks/{chunk-YEAC3DC6.js → chunk-K574FLVB.js} +2 -2
- package/dist/cli/chunks/{chunk-LZHTCUCO.js → chunk-KEEBUVGV.js} +2 -2
- package/dist/cli/chunks/{chunk-LKR7T3OZ.js → chunk-KFXZDQ5J.js} +1 -1
- package/dist/cli/chunks/{chunk-7OUMJCJT.js → chunk-KPFG4OIM.js} +1 -1
- package/dist/cli/chunks/{chunk-HQ7243G3.js → chunk-KZOBLLXW.js} +2 -2
- package/dist/cli/chunks/{chunk-R6WJF4D5.js → chunk-L2F7FVIU.js} +2 -2
- package/dist/cli/chunks/{chunk-VRRG66XB.js → chunk-LML5VTFK.js} +1 -1
- package/dist/cli/chunks/{chunk-JTWJR2KY.js → chunk-LWUJQGCS.js} +2 -2
- package/dist/cli/chunks/{chunk-BQCTO7UB.js → chunk-MH73D5TN.js} +2 -2
- package/dist/cli/chunks/{chunk-U4GZWPKM.js → chunk-MWQTACNA.js} +2 -2
- package/dist/cli/chunks/{chunk-CIZ6LSNV.js → chunk-N3RN4QTC.js} +2 -2
- package/dist/cli/chunks/{chunk-ZQSXG7FA.js → chunk-N5ZRUOMR.js} +2 -2
- package/dist/cli/chunks/{chunk-AFGT26NR.js → chunk-NAZVPZJS.js} +2 -2
- package/dist/cli/chunks/{chunk-FOHYBR3O.js → chunk-NG2UVPTW.js} +1 -1
- package/dist/cli/chunks/{chunk-2D7UBX5S.js → chunk-NHHWLJQF.js} +1 -1
- package/dist/cli/chunks/{chunk-JRKEBESE.js → chunk-NNOMDM4N.js} +2 -2
- package/dist/cli/chunks/{chunk-YKWMKRYB.js → chunk-NRR23SJV.js} +1 -1
- package/dist/cli/chunks/{chunk-WKNWRDA5.js → chunk-NWFIJNEB.js} +1 -1
- package/dist/cli/chunks/{chunk-4MK2G6TK.js → chunk-OBCKP3G4.js} +2 -2
- package/dist/cli/chunks/{chunk-YKZV7O65.js → chunk-OC2CKU7I.js} +2 -2
- package/dist/cli/chunks/{chunk-7RVAHJQZ.js → chunk-OX6T26CD.js} +3 -3
- package/dist/cli/chunks/chunk-P64DMQ2C.js +2 -0
- package/dist/cli/chunks/{chunk-RKUYVVGJ.js → chunk-PFXX5Q32.js} +2 -2
- package/dist/cli/chunks/chunk-PHHXHG2W.js +2 -0
- package/dist/cli/chunks/{chunk-N2YAUDAV.js → chunk-PMUBG2RU.js} +2 -2
- package/dist/cli/chunks/{chunk-WTHAVFIC.js → chunk-PVHO6KLB.js} +1 -1
- package/dist/cli/chunks/{chunk-MO7EITJK.js → chunk-PWEIDHT7.js} +2 -2
- package/dist/cli/chunks/{chunk-52DFCV57.js → chunk-PZKZY6PB.js} +2 -2
- package/dist/cli/chunks/{chunk-I3VHXA2W.js → chunk-Q335R4MR.js} +2 -2
- package/dist/cli/chunks/{chunk-ECTPFCON.js → chunk-Q3JHS3UD.js} +2 -2
- package/dist/cli/chunks/{chunk-HJIAVR6P.js → chunk-QFUX7ELG.js} +2 -2
- package/dist/cli/chunks/{chunk-L4C42WYI.js → chunk-QW4LN5NK.js} +2 -2
- package/dist/cli/chunks/{chunk-HQHLHSJO.js → chunk-QXTW7XCS.js} +2 -2
- package/dist/cli/chunks/{chunk-SSV6KSFT.js → chunk-R5RNOLHI.js} +1 -1
- package/dist/cli/chunks/{chunk-AVLA5PBJ.js → chunk-RCI64RIJ.js} +2 -2
- package/dist/cli/chunks/{chunk-T3BZAFLP.js → chunk-RFNEHNJV.js} +1 -1
- package/dist/cli/chunks/{chunk-IL6QRXRP.js → chunk-RGH3WGWD.js} +10 -10
- package/dist/cli/chunks/{chunk-E4NU4BJA.js → chunk-RHJVDCLV.js} +2 -2
- package/dist/cli/chunks/{chunk-KTSCZ7AW.js → chunk-RVCWSAXI.js} +2 -2
- package/dist/cli/chunks/{chunk-TQJE7DNL.js → chunk-RYJHREYS.js} +2 -2
- package/dist/cli/chunks/{chunk-HNKPLVYS.js → chunk-S4MR6RTE.js} +1 -1
- package/dist/cli/chunks/{chunk-6AYO3IR2.js → chunk-S7N4BKI3.js} +2 -2
- package/dist/cli/chunks/{chunk-2NO4H35K.js → chunk-SEHCX4NH.js} +1 -1
- package/dist/cli/chunks/{chunk-GKNDP5VK.js → chunk-T46LOLW3.js} +2 -2
- package/dist/cli/chunks/{chunk-VXU53F7Z.js → chunk-T4C56HBW.js} +2 -2
- package/dist/cli/chunks/{chunk-43GPSYAL.js → chunk-TENYL5TI.js} +2 -2
- package/dist/cli/chunks/{chunk-6AOZU3UN.js → chunk-TLPL3EQY.js} +2 -2
- package/dist/cli/chunks/{chunk-4ZVGSVHV.js → chunk-TYVQNYXX.js} +4 -4
- package/dist/cli/chunks/{chunk-NOPVFBQM.js → chunk-U2AY57XZ.js} +2 -2
- package/dist/cli/chunks/{chunk-IQLRA4FV.js → chunk-U54OOA24.js} +1 -1
- package/dist/cli/chunks/{chunk-IQ3JFHZN.js → chunk-UHTAI4ZB.js} +1 -1
- package/dist/cli/chunks/{chunk-KDIZQHG5.js → chunk-UIGEUEBT.js} +2 -2
- package/dist/cli/chunks/{chunk-5VDVYTO5.js → chunk-UYTWDS2R.js} +2 -2
- package/dist/cli/chunks/{chunk-ZNSMVQCG.js → chunk-VNAKBHJI.js} +2 -2
- package/dist/cli/chunks/{chunk-SUSMHSXT.js → chunk-VOYJJ3KA.js} +2 -2
- package/dist/cli/chunks/{chunk-QQCENKCX.js → chunk-VSYBMNIR.js} +1 -1
- package/dist/cli/chunks/{chunk-7RAB2BZY.js → chunk-W2FLULF4.js} +2 -2
- package/dist/cli/chunks/{chunk-NYARYONH.js → chunk-W4OQYLYO.js} +1 -1
- package/dist/cli/chunks/{chunk-DOWCOZDO.js → chunk-WBH4C4BG.js} +2 -2
- package/dist/cli/chunks/{chunk-OIYUSWHX.js → chunk-WBMRADQP.js} +1 -1
- package/dist/cli/chunks/{chunk-B3H4K7CY.js → chunk-WMW47QMR.js} +2 -2
- package/dist/cli/chunks/{chunk-VPVZHJSU.js → chunk-WVY22NHZ.js} +2 -2
- package/dist/cli/chunks/{chunk-6W42XWLL.js → chunk-WXMSRBQF.js} +2 -2
- package/dist/cli/chunks/{chunk-CIUOC5F3.js → chunk-XPLSLHRB.js} +1 -1
- package/dist/cli/chunks/{chunk-E722WNWC.js → chunk-YF5OP6CR.js} +2 -2
- package/dist/cli/chunks/{chunk-H76TV4UU.js → chunk-YN6W2XIT.js} +3 -3
- package/dist/cli/chunks/{chunk-FF43SRP6.js → chunk-ZCDXJ27H.js} +1 -1
- package/dist/cli/chunks/{chunk-TKYEP7OR.js → chunk-ZFGND4QK.js} +1 -1
- package/dist/cli/chunks/{chunk-O2MZZL54.js → chunk-ZWRQ5VAU.js} +2 -2
- package/dist/cli/chunks/{chunk-H6NFDOMK.js → chunk-ZYLSOBOR.js} +1 -1
- package/dist/cli/chunks/{ci-B432UH6N.js → ci-NTRH7PAW.js} +2 -2
- package/dist/cli/chunks/{ci-output-GTHH7WYG.js → ci-output-F57RSD35.js} +2 -2
- package/dist/cli/chunks/{circuit-breaker-VW75DLME.js → circuit-breaker-4WST3QSA.js} +2 -2
- package/dist/cli/chunks/{claude-flow-setup-RE3IVT7U.js → claude-flow-setup-KB4TKMYI.js} +2 -2
- package/dist/cli/chunks/client-GPZEC54E.js +2 -0
- package/dist/cli/chunks/{cline-installer-NUBZZ55N.js → cline-installer-W2ZHQ6WM.js} +2 -2
- package/dist/cli/chunks/{code-K6JCWKNW.js → code-TF2AVR5D.js} +2 -2
- package/dist/cli/chunks/{code-index-extractor-I4ILB5JN.js → code-index-extractor-RMDRUVQJ.js} +2 -2
- package/dist/cli/chunks/codex-installer-VSTRHJHV.js +14 -0
- package/dist/cli/chunks/{completions-V3KJVJF4.js → completions-3Q37QVFR.js} +2 -2
- package/dist/cli/chunks/{complexity-analyzer-HRG7OOY3.js → complexity-analyzer-3FNFLACD.js} +2 -2
- package/dist/cli/chunks/{continuedev-installer-CNTDONWG.js → continuedev-installer-VTEXM455.js} +2 -2
- package/dist/cli/chunks/{copilot-installer-XPWWIWYA.js → copilot-installer-AGY7DQUS.js} +2 -2
- package/dist/cli/chunks/core-handlers-YMGHYIBR.js +2 -0
- package/dist/cli/chunks/{cost-tracker-MFNLQ56K.js → cost-tracker-LTZAQBX7.js} +2 -2
- package/dist/cli/chunks/{coverage-KOIK654V.js → coverage-TT64IOS4.js} +3 -3
- package/dist/cli/chunks/cross-domain-router-ECBNTGYJ.js +2 -0
- package/dist/cli/chunks/{cursor-installer-S5MKLRQQ.js → cursor-installer-OVOJIOHN.js} +2 -2
- package/dist/cli/chunks/{daemon-DUS6JYW6.js → daemon-DMFZMXKA.js} +8 -8
- package/dist/cli/chunks/{daemon-Z7VPGWHY.js → daemon-XCULEHWY.js} +4 -4
- package/dist/cli/chunks/{dag-attention-scheduler-7CQ3ARNI.js → dag-attention-scheduler-WW2RX4B5.js} +2 -2
- package/dist/cli/chunks/{detect-WORBCAYF.js → detect-QNWIM232.js} +2 -2
- package/dist/cli/chunks/{dist-node-KRNI6OYW.js → dist-node-6GQIY3CG.js} +2 -2
- package/dist/cli/chunks/{domain-handler-KRUR2VQG.js → domain-handler-6RJPDELX.js} +2 -2
- package/dist/cli/chunks/{domain-transfer-VEOVLV54.js → domain-transfer-WK524LBS.js} +2 -2
- package/dist/cli/chunks/dream-EHGKCFWH.js +2 -0
- package/dist/cli/chunks/{embed-and-insert-pattern-QU3NQVA5.js → embed-and-insert-pattern-SO6GWJW7.js} +2 -2
- package/dist/cli/chunks/{eval-AYQ7BSUP.js → eval-GL544IPO.js} +2 -2
- package/dist/cli/chunks/{experience-capture-middleware-AWQBL6LT.js → experience-capture-middleware-BCCJ35OX.js} +3 -3
- package/dist/cli/chunks/{fast-paths-V5EL4BYJ.js → fast-paths-CATDDBEU.js} +2 -2
- package/dist/cli/chunks/{feature-flags-P34BPRWU.js → feature-flags-BUXNAORY.js} +2 -2
- package/dist/cli/chunks/{feature-flags-BXX7BP22.js → feature-flags-KNNWWP5G.js} +2 -2
- package/dist/cli/chunks/{file-discovery-MS6BKQ2U.js → file-discovery-S4HF3O7D.js} +2 -2
- package/dist/cli/chunks/{fleet-7WVVPA4W.js → fleet-DQVQQONW.js} +3 -3
- package/dist/cli/chunks/{gnn-wrapper-7WQ3LEPG.js → gnn-wrapper-G7ABZUG7.js} +2 -2
- package/dist/cli/chunks/{heartbeat-handler-P7QD3BZH.js → heartbeat-handler-UFMELIWT.js} +4 -4
- package/dist/cli/chunks/heartbeat-scheduler-UFEL2CBW.js +2 -0
- package/dist/cli/chunks/hnsw-adapter-BLSD45CX.js +2 -0
- package/dist/cli/chunks/hnsw-index-A3RZODEN.js +2 -0
- package/dist/cli/chunks/{hnsw-legacy-bridge-Y3GAR3UP.js → hnsw-legacy-bridge-YIILSRXI.js} +2 -2
- package/dist/cli/chunks/{hnswlib-node-5QUXZQWQ.js → hnswlib-node-TSVRMXDH.js} +2 -2
- package/dist/cli/chunks/{hooks-2D64KPRY.js → hooks-OHQPNK74.js} +10 -10
- package/dist/cli/chunks/{hypergraph-engine-5INXEZDP.js → hypergraph-engine-LY7PJDSL.js} +2 -2
- package/dist/cli/chunks/{hypergraph-handler-YJJJ3ESZ.js → hypergraph-handler-YGDYZO6H.js} +3 -3
- package/dist/cli/chunks/impact-analyzer-OXHD3FOH.js +2 -0
- package/dist/cli/chunks/{init-handler-QSFYJN5Q.js → init-handler-MTK65LI3.js} +9 -8
- package/dist/cli/chunks/init-wizard-PKZL7QBU.js +2 -0
- package/dist/cli/chunks/kernel-XWPM72UJ.js +2 -0
- package/dist/cli/chunks/{kilocode-installer-3N3QGTJU.js → kilocode-installer-3IICU4RS.js} +2 -2
- package/dist/cli/chunks/{kiro-installer-GIWVTFZQ.js → kiro-installer-MXOVQYQA.js} +2 -2
- package/dist/cli/chunks/knowledge-graph-FRKR5XWI.js +2 -0
- package/dist/cli/chunks/{learning-SGO2DQ5Q.js → learning-EV5LSOOM.js} +3 -3
- package/dist/cli/chunks/{llm-router-HBBULO65.js → llm-router-7LYDJUOT.js} +4 -4
- package/dist/cli/chunks/llm-router-service-R7A5HHDM.js +2 -0
- package/dist/cli/chunks/{load-B5OFYB4H.js → load-F4PVAMXQ.js} +2 -2
- package/dist/cli/chunks/load-test-5IKDWSYL.js +2 -0
- package/dist/cli/chunks/{mcp-FG3LNQR4.js → mcp-DUYJUEME.js} +2 -2
- package/dist/cli/chunks/{memory-SPS7ZWLC.js → memory-XTTYORAS.js} +5 -5
- package/dist/cli/chunks/memory-backend-7VW5QCMO.js +2 -0
- package/dist/cli/chunks/{memory-handlers-P7FTPWP3.js → memory-handlers-VZH3R2TQ.js} +2 -2
- package/dist/cli/chunks/{multi-model-executor-PUB7E6KH.js → multi-model-executor-R6XCTMCF.js} +2 -2
- package/dist/cli/chunks/{opencode-installer-TGCSGVG2.js → opencode-installer-33ULBU2F.js} +2 -2
- package/dist/cli/chunks/{orchestrator-S5FTJFGB.js → orchestrator-34ZJEKTJ.js} +22 -21
- package/dist/cli/chunks/pattern-null-store-BU6LCB2W.js +2 -0
- package/dist/cli/chunks/{pattern-usage-recorder-LCXXGRAB.js → pattern-usage-recorder-GZ2M3F2E.js} +2 -2
- package/dist/cli/chunks/{pipeline-ENOSRHKW.js → pipeline-SR5OTY45.js} +2 -2
- package/dist/cli/chunks/platform-VKJFJIAW.js +2 -0
- package/dist/cli/chunks/{plugin-JZ5ODJSU.js → plugin-5C5UBQUQ.js} +2 -2
- package/dist/cli/chunks/{prime-radiant-advanced-wasm-DPJUPNCG.js → prime-radiant-advanced-wasm-KO2PQI3D.js} +2 -2
- package/dist/cli/chunks/protocol-executor-BSP5LWJN.js +2 -0
- package/dist/cli/chunks/{protocol-handler-IP4NLVY3.js → protocol-handler-ZF74NIKA.js} +2 -2
- package/dist/cli/chunks/{prove-P6FM4RU7.js → prove-MO5TQQU4.js} +2 -2
- package/dist/cli/chunks/qe-reasoning-bank-J2RC7P25.js +2 -0
- package/dist/cli/chunks/{quality-UHP4XO26.js → quality-EYIN6AER.js} +2 -2
- package/dist/cli/chunks/quality-gate-V6OQM57O.js +7 -0
- package/dist/cli/chunks/queen-coordinator-XI5AJV2V.js +2 -0
- package/dist/cli/chunks/{real-embeddings-6SO5MFRQ.js → real-embeddings-AR7TZX7U.js} +2 -2
- package/dist/cli/chunks/{roocode-installer-WTWUOFCH.js → roocode-installer-46E626VZ.js} +2 -2
- package/dist/cli/chunks/router-VXQYYA3D.js +2 -0
- package/dist/cli/chunks/routing-feedback-HZQTASFF.js +2 -0
- package/dist/cli/chunks/{routing-handler-IK7HYERQ.js → routing-handler-ZNRVW6QW.js} +2 -2
- package/dist/cli/chunks/{ruvector-commands-THLB4NIM.js → ruvector-commands-4L2CQMWS.js} +2 -2
- package/dist/cli/chunks/rvf-dual-writer-BDTLLJER.js +2 -0
- package/dist/cli/chunks/rvf-migration-adapter-IB343MDN.js +2 -0
- package/dist/cli/chunks/{rvf-migration-coordinator-BUKCSHBD.js → rvf-migration-coordinator-H4RVGBIA.js} +2 -2
- package/dist/cli/chunks/rvf-native-adapter-Y7SN7LHU.js +2 -0
- package/dist/cli/chunks/{rvf-store-integrity-ECTADZIN.js → rvf-store-integrity-OJGWWPLL.js} +2 -2
- package/dist/cli/chunks/safe-db-2VTKKBJU.js +2 -0
- package/dist/cli/chunks/schedule-QJ4CFGJY.js +2 -0
- package/dist/cli/chunks/scheduler-2NHDQPC3.js +2 -0
- package/dist/cli/chunks/{security-HN4UXFXX.js → security-JF3BVNRO.js} +3 -3
- package/dist/cli/chunks/{shared-rvf-adapter-XJCPX5SN.js → shared-rvf-adapter-M6NNIZ5W.js} +2 -2
- package/dist/cli/chunks/{shared-rvf-dual-writer-23X5PNY5.js → shared-rvf-dual-writer-LHMFCYVE.js} +2 -2
- package/dist/cli/chunks/sqlite-persistence-NVVAPZN3.js +2 -0
- package/dist/cli/chunks/{status-handler-ZXANTHKT.js → status-handler-GMIOXQIE.js} +2 -2
- package/dist/cli/chunks/{structural-health-LR6WI3AH.js → structural-health-YZXHVHM6.js} +2 -2
- package/dist/cli/chunks/{sync-I5IUJF33.js → sync-GMPCPV5L.js} +2 -2
- package/dist/cli/chunks/{sync-4OEI3BC2.js → sync-N56UQGCS.js} +2 -2
- package/dist/cli/chunks/{task-handler-R3ATJKU5.js → task-handler-VTNRGAXP.js} +2 -2
- package/dist/cli/chunks/{task-handlers-4X357AEW.js → task-handlers-FYSDH55N.js} +3 -3
- package/dist/cli/chunks/{test-PR2B5H2F.js → test-GQNCKRSP.js} +4 -4
- package/dist/cli/chunks/{test-scheduling-ZNOSQVLD.js → test-scheduling-GPRXSIRP.js} +3 -3
- package/dist/cli/chunks/{token-bootstrap-LYXOI72S.js → token-bootstrap-76SRNXGG.js} +2 -2
- package/dist/cli/chunks/{token-usage-R6EQZBX2.js → token-usage-O7CZDP5Q.js} +2 -2
- package/dist/cli/chunks/{transformers-COQWK27J.js → transformers-LTU4LSSC.js} +2 -2
- package/dist/cli/chunks/{tree-sitter-wasm-parser-LLIW2X3M.js → tree-sitter-wasm-parser-NQSQCMBM.js} +2 -2
- package/dist/cli/chunks/{types-MEYTZITK.js → types-OP6IWE6N.js} +2 -2
- package/dist/cli/chunks/unified-memory-DSTIEDSH.js +2 -0
- package/dist/cli/chunks/unified-memory-hnsw-KBV3P4OS.js +2 -0
- package/dist/cli/chunks/unified-persistence-XKCOUBKY.js +2 -0
- package/dist/cli/chunks/{upgrade-DVIJ456A.js → upgrade-OQWRBZ3R.js} +2 -2
- package/dist/cli/chunks/{validate-UYTSMJ5X.js → validate-TH5SRP3E.js} +2 -2
- package/dist/cli/chunks/{validate-swarm-P32WCJR6.js → validate-swarm-UITL2JUS.js} +2 -2
- package/dist/cli/chunks/{vibium-JGVOLM6X.js → vibium-O6PRAG4J.js} +2 -2
- package/dist/cli/chunks/visual-security-TTWSPZTZ.js +2 -0
- package/dist/cli/chunks/{web-tree-sitter-5ZGNCTPN.js → web-tree-sitter-XBFBY4OF.js} +2 -2
- package/dist/cli/chunks/{windsurf-installer-IILSSQAE.js → windsurf-installer-DVT5NRNY.js} +2 -2
- package/dist/cli/chunks/witness-chain-2KY73HPN.js +2 -0
- package/dist/cli/chunks/{witness-chain-JZMXCG3B.js → witness-chain-VRSH2F36.js} +2 -2
- package/dist/cli/chunks/{witness-key-manager-UUTLNUIH.js → witness-key-manager-GFHRDKQ4.js} +2 -2
- package/dist/cli/chunks/{workflow-NS7HXVHZ.js → workflow-HAZ6YKOG.js} +4 -4
- package/dist/cli/chunks/workflow-orchestrator-UK56AVOT.js +2 -0
- package/dist/cli/chunks/{wrappers-XKEDSV5W.js → wrappers-5LLLT7GM.js} +2 -2
- package/dist/cli/commands/daemon.js +3 -0
- package/dist/cli/commands/platform.d.ts +1 -0
- package/dist/cli/commands/platform.js +28 -6
- package/dist/cli/commands/quality-gate.js +25 -3
- package/dist/cli/foreground-command.d.ts +3 -0
- package/dist/cli/foreground-command.js +22 -0
- package/dist/cli/handlers/init-handler.d.ts +5 -0
- package/dist/cli/handlers/init-handler.js +6 -0
- package/dist/cli/index.js +8 -1
- package/dist/contracts/verdicts.d.ts +625 -0
- package/dist/contracts/verdicts.js +202 -14
- package/dist/coordination/handlers/coverage-handlers.js +8 -1
- package/dist/domains/chaos-resilience/diagnosis/corpus.d.ts +5 -0
- package/dist/domains/chaos-resilience/diagnosis/corpus.js +141 -0
- package/dist/domains/chaos-resilience/diagnosis/detectors.d.ts +11 -0
- package/dist/domains/chaos-resilience/diagnosis/detectors.js +109 -0
- package/dist/domains/chaos-resilience/diagnosis/index.d.ts +5 -0
- package/dist/domains/chaos-resilience/diagnosis/index.js +5 -0
- package/dist/domains/chaos-resilience/diagnosis/scorer.d.ts +8 -0
- package/dist/domains/chaos-resilience/diagnosis/scorer.js +128 -0
- package/dist/domains/chaos-resilience/diagnosis/types.d.ts +171 -0
- package/dist/domains/chaos-resilience/diagnosis/types.js +3 -0
- package/dist/domains/chaos-resilience/index.d.ts +1 -0
- package/dist/domains/chaos-resilience/index.js +1 -0
- package/dist/domains/index.d.ts +1 -0
- package/dist/domains/index.js +1 -0
- package/dist/early-exit/early-exit-controller.d.ts +4 -2
- package/dist/early-exit/early-exit-controller.js +95 -7
- package/dist/early-exit/index.d.ts +1 -1
- package/dist/early-exit/speculative-executor.js +3 -0
- package/dist/early-exit/types.d.ts +51 -0
- package/dist/early-exit/types.js +3 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.js +2 -1
- package/dist/init/browser-engine-installer.d.ts +11 -0
- package/dist/init/browser-engine-installer.js +35 -5
- package/dist/init/codex-installer.d.ts +11 -1
- package/dist/init/codex-installer.js +90 -24
- package/dist/init/init-wizard-hooks.js +11 -11
- package/dist/init/orchestrator.js +2 -0
- package/dist/init/phases/07-hooks.d.ts +3 -3
- package/dist/init/phases/07-hooks.js +19 -18
- package/dist/init/phases/09-assets.d.ts +4 -0
- package/dist/init/phases/09-assets.js +13 -10
- package/dist/init/phases/phase-interface.d.ts +2 -0
- package/dist/init/types.d.ts +4 -0
- package/dist/learning/index.d.ts +3 -0
- package/dist/learning/index.js +2 -0
- package/dist/learning/pattern-mutation-error.d.ts +9 -0
- package/dist/learning/pattern-mutation-error.js +14 -0
- package/dist/learning/pattern-store.js +24 -2
- package/dist/learning/qe-reasoning-bank.js +24 -5
- package/dist/learning/rvf-pattern-store.js +23 -5
- package/dist/learning/structural-retrieval/corpus.d.ts +5 -0
- package/dist/learning/structural-retrieval/corpus.js +97 -0
- package/dist/learning/structural-retrieval/evaluate.d.ts +7 -0
- package/dist/learning/structural-retrieval/evaluate.js +124 -0
- package/dist/learning/structural-retrieval/index.d.ts +6 -0
- package/dist/learning/structural-retrieval/index.js +4 -0
- package/dist/learning/structural-retrieval/receipt.d.ts +14 -0
- package/dist/learning/structural-retrieval/receipt.js +36 -0
- package/dist/learning/structural-retrieval/types.d.ts +83 -0
- package/dist/learning/structural-retrieval/types.js +2 -0
- package/dist/mcp/bundle.js +423 -423
- package/dist/mcp/index.d.ts +1 -0
- package/dist/mcp/index.js +1 -0
- package/dist/mcp/protocol-server.js +11 -2
- package/dist/mcp/qe-tool-bridge.js +1 -0
- package/dist/mcp/services/session-resume.d.ts +15 -19
- package/dist/mcp/services/session-resume.js +204 -194
- package/dist/mcp/tool-annotations.d.ts +25 -0
- package/dist/mcp/tool-annotations.js +75 -0
- package/dist/mcp/tool-registry.js +17 -12
- package/dist/mcp/tools/base.d.ts +7 -1
- package/dist/mcp/tools/base.js +8 -0
- package/dist/mcp/tools/quality-assessment/gate.d.ts +8 -5
- package/dist/mcp/tools/quality-assessment/gate.js +9 -4
- package/dist/mcp/tools/registry.d.ts +3 -0
- package/dist/mcp/tools/registry.js +1 -0
- package/dist/mcp/types.d.ts +15 -0
- package/dist/skills/qe-court/cli.js +0 -0
- package/dist/validation/quality-gate-runner.d.ts +27 -4
- package/dist/validation/quality-gate-runner.js +33 -4
- package/dist/validation/verification-reach.d.ts +90 -0
- package/dist/validation/verification-reach.js +187 -0
- package/dist/verification/adversarial-verify/index.d.ts +1 -1
- package/dist/verification/adversarial-verify/measurement-receipt.d.ts +13 -0
- package/dist/verification/adversarial-verify/measurement-receipt.js +136 -0
- package/dist/verification/adversarial-verify/synthesize.js +7 -10
- package/dist/verification/adversarial-verify/types.d.ts +35 -0
- package/dist/verification/adversarial-verify/verify.js +6 -1
- package/package.json +9 -5
- package/schemas/coverage-gap.schema.json +41 -0
- package/schemas/finding-verdict.schema.json +470 -0
- package/schemas/risk-decision.schema.json +41 -0
- package/dist/cli/chunks/adapter-3VBXL7DO.js +0 -2
- package/dist/cli/chunks/aqe-learning-engine-NXRNKJNA.js +0 -2
- package/dist/cli/chunks/base-F6GMOKU2.js +0 -2
- package/dist/cli/chunks/browser-workflow-QRDC46LR.js +0 -2
- package/dist/cli/chunks/chunk-3JIJBR4V.js +0 -2
- package/dist/cli/chunks/chunk-R2B6EE45.js +0 -2
- package/dist/cli/chunks/chunk-TRDEULS7.js +0 -4
- package/dist/cli/chunks/chunk-WJXHE52V.js +0 -65
- package/dist/cli/chunks/client-HNBZUEVV.js +0 -2
- package/dist/cli/chunks/codex-installer-AKQ5BCHU.js +0 -15
- package/dist/cli/chunks/core-handlers-TB7NLYXL.js +0 -2
- package/dist/cli/chunks/cross-domain-router-MDSI553U.js +0 -2
- package/dist/cli/chunks/dream-X7ISHFEE.js +0 -2
- package/dist/cli/chunks/heartbeat-scheduler-2C5XGFQT.js +0 -2
- package/dist/cli/chunks/hnsw-adapter-KCVMXLUL.js +0 -2
- package/dist/cli/chunks/hnsw-index-OGWZS6MP.js +0 -2
- package/dist/cli/chunks/impact-analyzer-IBJ43GQL.js +0 -2
- package/dist/cli/chunks/init-wizard-6XMFD5LP.js +0 -2
- package/dist/cli/chunks/kernel-UDUMUPB3.js +0 -2
- package/dist/cli/chunks/knowledge-graph-JRYTUG3W.js +0 -2
- package/dist/cli/chunks/llm-router-service-KF5ZALUQ.js +0 -2
- package/dist/cli/chunks/load-test-LHMBCNCH.js +0 -2
- package/dist/cli/chunks/memory-backend-WZHKHBZK.js +0 -2
- package/dist/cli/chunks/pattern-null-store-UZSHCRL2.js +0 -2
- package/dist/cli/chunks/platform-WCRBO3Z7.js +0 -2
- package/dist/cli/chunks/protocol-executor-42NLVDTC.js +0 -2
- package/dist/cli/chunks/qe-reasoning-bank-W74RSMMU.js +0 -2
- package/dist/cli/chunks/quality-gate-63DDBSGM.js +0 -7
- package/dist/cli/chunks/queen-coordinator-XELKSRMS.js +0 -2
- package/dist/cli/chunks/router-GTW2EQZV.js +0 -2
- package/dist/cli/chunks/routing-feedback-NVOBWEMK.js +0 -2
- package/dist/cli/chunks/rvf-dual-writer-5OPVMXNL.js +0 -2
- package/dist/cli/chunks/rvf-migration-adapter-5S4YFTX4.js +0 -2
- package/dist/cli/chunks/rvf-native-adapter-LYSJHEVX.js +0 -2
- package/dist/cli/chunks/safe-db-AEB3JMLD.js +0 -2
- package/dist/cli/chunks/schedule-4QNPCQNT.js +0 -2
- package/dist/cli/chunks/scheduler-S3DFHX6A.js +0 -2
- package/dist/cli/chunks/sqlite-persistence-L2KISU2H.js +0 -2
- package/dist/cli/chunks/unified-memory-5KQMA7FV.js +0 -2
- package/dist/cli/chunks/unified-memory-hnsw-PQRPTYOD.js +0 -2
- package/dist/cli/chunks/unified-persistence-YDONVPJB.js +0 -2
- package/dist/cli/chunks/visual-security-RJ7RTNGJ.js +0 -2
- package/dist/cli/chunks/witness-chain-YXXXNGAM.js +0 -2
- package/dist/cli/chunks/workflow-orchestrator-5KUAVSTH.js +0 -2
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { v4 as uuidv4 } from 'uuid';
|
|
8
8
|
import { ALL_DOMAINS } from '../shared/types/index.js';
|
|
9
|
+
import { resolveToolAnnotations } from './tool-annotations.js';
|
|
9
10
|
import { sanitizeInput } from './security/cve-prevention.js';
|
|
10
11
|
import { toErrorMessage } from '../shared/error-utils.js';
|
|
11
12
|
import { BatchToolExecutor } from './middleware/batch-executor.js';
|
|
@@ -234,32 +235,36 @@ export class ToolRegistry {
|
|
|
234
235
|
* Register a tool
|
|
235
236
|
*/
|
|
236
237
|
register(definition, handler) {
|
|
237
|
-
const
|
|
238
|
+
const normalizedDefinition = {
|
|
239
|
+
...definition,
|
|
240
|
+
annotations: resolveToolAnnotations(definition.name, definition.annotations),
|
|
241
|
+
};
|
|
242
|
+
const existing = this.tools.get(normalizedDefinition.name);
|
|
238
243
|
if (existing) {
|
|
239
244
|
// Update existing tool
|
|
240
|
-
existing.definition =
|
|
245
|
+
existing.definition = normalizedDefinition;
|
|
241
246
|
existing.handler = handler;
|
|
242
247
|
return;
|
|
243
248
|
}
|
|
244
249
|
// Register new tool
|
|
245
250
|
const tool = {
|
|
246
|
-
definition,
|
|
251
|
+
definition: normalizedDefinition,
|
|
247
252
|
handler,
|
|
248
|
-
loaded: !
|
|
253
|
+
loaded: !normalizedDefinition.lazyLoad,
|
|
249
254
|
loadCount: 0,
|
|
250
255
|
};
|
|
251
|
-
this.tools.set(
|
|
256
|
+
this.tools.set(normalizedDefinition.name, tool);
|
|
252
257
|
this.stats.totalTools++;
|
|
253
258
|
// Track by category
|
|
254
|
-
this.categoryTools.get(
|
|
255
|
-
this.stats.byCategory[
|
|
259
|
+
this.categoryTools.get(normalizedDefinition.category)?.add(normalizedDefinition.name);
|
|
260
|
+
this.stats.byCategory[normalizedDefinition.category]++;
|
|
256
261
|
// Track by domain if specified
|
|
257
|
-
if (
|
|
258
|
-
this.domainTools.get(
|
|
259
|
-
this.stats.byDomain[
|
|
260
|
-
(this.stats.byDomain[
|
|
262
|
+
if (normalizedDefinition.domain) {
|
|
263
|
+
this.domainTools.get(normalizedDefinition.domain)?.add(normalizedDefinition.name);
|
|
264
|
+
this.stats.byDomain[normalizedDefinition.domain] =
|
|
265
|
+
(this.stats.byDomain[normalizedDefinition.domain] || 0) + 1;
|
|
261
266
|
}
|
|
262
|
-
if (!
|
|
267
|
+
if (!normalizedDefinition.lazyLoad) {
|
|
263
268
|
this.stats.loadedTools++;
|
|
264
269
|
}
|
|
265
270
|
}
|
package/dist/mcp/tools/base.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* All domain tools extend this base class.
|
|
6
6
|
*/
|
|
7
7
|
import { DomainName } from '../../shared/types';
|
|
8
|
-
import { ToolResult, ToolResultMetadata } from '../types';
|
|
8
|
+
import { ToolAnnotations, ToolResult, ToolResultMetadata } from '../types';
|
|
9
9
|
import { MemoryBackend } from '../../kernel/interfaces';
|
|
10
10
|
/**
|
|
11
11
|
* Database-free mode: when AQE_MEMORY_BACKEND=memory, the MCP server keeps all
|
|
@@ -114,6 +114,7 @@ export interface MCPToolConfig {
|
|
|
114
114
|
schema: MCPToolSchema;
|
|
115
115
|
streaming?: boolean;
|
|
116
116
|
timeout?: number;
|
|
117
|
+
annotations?: ToolAnnotations;
|
|
117
118
|
}
|
|
118
119
|
/**
|
|
119
120
|
* Streaming callback for long-running operations
|
|
@@ -279,6 +280,11 @@ export declare abstract class MCPToolBase<TParams extends Record<string, unknown
|
|
|
279
280
|
* Get tool description
|
|
280
281
|
*/
|
|
281
282
|
get description(): string;
|
|
283
|
+
/**
|
|
284
|
+
* Return the complete, conservative safety metadata for this tool.
|
|
285
|
+
* Missing hints must never be interpreted as permission to skip policy.
|
|
286
|
+
*/
|
|
287
|
+
get annotations(): ToolAnnotations;
|
|
282
288
|
/**
|
|
283
289
|
* Get domain this tool belongs to
|
|
284
290
|
*/
|
package/dist/mcp/tools/base.js
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* All domain tools extend this base class.
|
|
6
6
|
*/
|
|
7
7
|
import { v4 as uuidv4 } from 'uuid';
|
|
8
|
+
import { resolveToolAnnotations } from '../tool-annotations.js';
|
|
8
9
|
import { HybridMemoryBackend } from '../../kernel/hybrid-backend.js';
|
|
9
10
|
import { InMemoryBackend } from '../../kernel/memory-backend.js';
|
|
10
11
|
import { findProjectRoot } from '../../kernel/unified-memory.js';
|
|
@@ -457,6 +458,13 @@ export class MCPToolBase {
|
|
|
457
458
|
get description() {
|
|
458
459
|
return this.config.description;
|
|
459
460
|
}
|
|
461
|
+
/**
|
|
462
|
+
* Return the complete, conservative safety metadata for this tool.
|
|
463
|
+
* Missing hints must never be interpreted as permission to skip policy.
|
|
464
|
+
*/
|
|
465
|
+
get annotations() {
|
|
466
|
+
return resolveToolAnnotations(this.name, this.config.annotations);
|
|
467
|
+
}
|
|
460
468
|
/**
|
|
461
469
|
* Get domain this tool belongs to
|
|
462
470
|
*/
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Agentic QE v3 - Quality Gate MCP Tool (ADR-119)
|
|
3
3
|
*
|
|
4
|
-
* qe/quality/gate -
|
|
5
|
-
* ADR-117 checklist. Calls the SAME `runQualityGate` orchestrator as the
|
|
4
|
+
* qe/quality/gate - fail-closed quality and verification-reach verdict against
|
|
5
|
+
* a pinned ADR-117 checklist. Calls the SAME `runQualityGate` orchestrator as the
|
|
6
6
|
* `aqe quality-gate` CLI subcommand so CLI and MCP stay in exact parity.
|
|
7
7
|
*
|
|
8
8
|
* The frontier judge is built from the forwarded HybridRouter
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import { MCPToolBase, MCPToolConfig, MCPToolContext } from '../base';
|
|
13
13
|
import { ToolResult } from '../../types';
|
|
14
|
-
import type
|
|
14
|
+
import { type ReachAwareQualityGateResult } from '../../../validation/quality-gate-runner.js';
|
|
15
|
+
import type { VerificationReachManifest } from '../../../validation/verification-reach.js';
|
|
15
16
|
export interface QualityGateParams {
|
|
16
17
|
/** Pinned anchor checklist id (e.g. "A1-inRange"). */
|
|
17
18
|
checklistId: string;
|
|
@@ -27,12 +28,14 @@ export interface QualityGateParams {
|
|
|
27
28
|
} | null;
|
|
28
29
|
/** Override the frozen anchor path (ADR-117). */
|
|
29
30
|
anchorPath?: string;
|
|
31
|
+
/** Revision-bound evidence proving which failure modes the checks can observe. */
|
|
32
|
+
verificationManifest?: VerificationReachManifest;
|
|
30
33
|
/** Frontier judge model id (ADR-111: always frontier-tier). */
|
|
31
34
|
model?: string;
|
|
32
35
|
[key: string]: unknown;
|
|
33
36
|
}
|
|
34
|
-
export declare class QualityGateTool extends MCPToolBase<QualityGateParams,
|
|
37
|
+
export declare class QualityGateTool extends MCPToolBase<QualityGateParams, ReachAwareQualityGateResult> {
|
|
35
38
|
readonly config: MCPToolConfig;
|
|
36
|
-
execute(params: QualityGateParams, context: MCPToolContext): Promise<ToolResult<
|
|
39
|
+
execute(params: QualityGateParams, context: MCPToolContext): Promise<ToolResult<ReachAwareQualityGateResult>>;
|
|
37
40
|
}
|
|
38
41
|
//# sourceMappingURL=gate.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Agentic QE v3 - Quality Gate MCP Tool (ADR-119)
|
|
3
3
|
*
|
|
4
|
-
* qe/quality/gate -
|
|
5
|
-
* ADR-117 checklist. Calls the SAME `runQualityGate` orchestrator as the
|
|
4
|
+
* qe/quality/gate - fail-closed quality and verification-reach verdict against
|
|
5
|
+
* a pinned ADR-117 checklist. Calls the SAME `runQualityGate` orchestrator as the
|
|
6
6
|
* `aqe quality-gate` CLI subcommand so CLI and MCP stay in exact parity.
|
|
7
7
|
*
|
|
8
8
|
* The frontier judge is built from the forwarded HybridRouter
|
|
@@ -12,13 +12,13 @@
|
|
|
12
12
|
import { MCPToolBase } from '../base.js';
|
|
13
13
|
import { toErrorMessage } from '../../../shared/error-utils.js';
|
|
14
14
|
import { getLLMRouter } from '../base.js';
|
|
15
|
-
import { runQualityGate } from '../../../validation/quality-gate-runner.js';
|
|
15
|
+
import { runQualityGate, } from '../../../validation/quality-gate-runner.js';
|
|
16
16
|
import { createRouterFrontierJudge, createUnavailableJudge, } from '../../../validation/frontier-judge.js';
|
|
17
17
|
export class QualityGateTool extends MCPToolBase {
|
|
18
18
|
config = {
|
|
19
19
|
name: 'qe/quality/gate',
|
|
20
20
|
description: 'Two-gate, three-valued quality verdict (ADR-119): mechanical oracle gate plus a frontier '
|
|
21
|
-
+ 'judge grading
|
|
21
|
+
+ 'judge grading plus failure-mode verification reach. Returns pass|fail|inconclusive.',
|
|
22
22
|
domain: 'quality-assessment',
|
|
23
23
|
schema: QUALITY_GATE_SCHEMA,
|
|
24
24
|
streaming: false,
|
|
@@ -48,6 +48,7 @@ export class QualityGateTool extends MCPToolBase {
|
|
|
48
48
|
checklistId: params.checklistId,
|
|
49
49
|
judge,
|
|
50
50
|
anchorPath: params.anchorPath,
|
|
51
|
+
verificationManifest: params.verificationManifest,
|
|
51
52
|
});
|
|
52
53
|
return { success: true, data: result };
|
|
53
54
|
}
|
|
@@ -79,6 +80,10 @@ const QUALITY_GATE_SCHEMA = {
|
|
|
79
80
|
type: 'string',
|
|
80
81
|
description: 'Override the frozen anchor path (ADR-117)',
|
|
81
82
|
},
|
|
83
|
+
verificationManifest: {
|
|
84
|
+
type: 'object',
|
|
85
|
+
description: 'Hashed, revision-bound failure-mode verification reach manifest (#651)',
|
|
86
|
+
},
|
|
82
87
|
model: {
|
|
83
88
|
type: 'string',
|
|
84
89
|
description: 'Frontier judge model id (ADR-111: always frontier-tier)',
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { MCPToolBase } from './base';
|
|
8
8
|
import { ToolRegistry } from '../tool-registry';
|
|
9
|
+
import type { ToolAnnotations } from '../types';
|
|
9
10
|
export declare const QE_TOOL_NAMES: {
|
|
10
11
|
readonly QX_ANALYZE: "qe/qx/analyze";
|
|
11
12
|
readonly TEST_SCHEDULE: "qe/tests/schedule";
|
|
@@ -80,6 +81,7 @@ export declare function getToolsByDomain(domain: string): MCPToolBase[];
|
|
|
80
81
|
export declare function getToolDefinition(tool: MCPToolBase): {
|
|
81
82
|
name: string;
|
|
82
83
|
description: string;
|
|
84
|
+
annotations: ToolAnnotations;
|
|
83
85
|
inputSchema: Record<string, unknown>;
|
|
84
86
|
};
|
|
85
87
|
/**
|
|
@@ -88,6 +90,7 @@ export declare function getToolDefinition(tool: MCPToolBase): {
|
|
|
88
90
|
export declare function getAllToolDefinitions(): Array<{
|
|
89
91
|
name: string;
|
|
90
92
|
description: string;
|
|
93
|
+
annotations: ToolAnnotations;
|
|
91
94
|
inputSchema: Record<string, unknown>;
|
|
92
95
|
}>;
|
|
93
96
|
/**
|
package/dist/mcp/types.d.ts
CHANGED
|
@@ -15,6 +15,20 @@ export interface ToolParameter {
|
|
|
15
15
|
default?: unknown;
|
|
16
16
|
enum?: string[];
|
|
17
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* Optional safety metadata advertised by an MCP tool.
|
|
20
|
+
*
|
|
21
|
+
* These hints help clients make better presentation and confirmation
|
|
22
|
+
* decisions. They are advisory only: authorization, sandboxing, and policy
|
|
23
|
+
* checks remain authoritative for every invocation.
|
|
24
|
+
*/
|
|
25
|
+
export interface ToolAnnotations {
|
|
26
|
+
title?: string;
|
|
27
|
+
readOnlyHint?: boolean;
|
|
28
|
+
destructiveHint?: boolean;
|
|
29
|
+
idempotentHint?: boolean;
|
|
30
|
+
openWorldHint?: boolean;
|
|
31
|
+
}
|
|
18
32
|
/**
|
|
19
33
|
* MCP tool definition
|
|
20
34
|
*/
|
|
@@ -26,6 +40,7 @@ export interface ToolDefinition {
|
|
|
26
40
|
domain?: DomainName;
|
|
27
41
|
lazyLoad?: boolean;
|
|
28
42
|
isConcurrencySafe?: boolean;
|
|
43
|
+
annotations?: ToolAnnotations;
|
|
29
44
|
}
|
|
30
45
|
/**
|
|
31
46
|
* Tool categories for organization and lazy loading
|
|
File without changes
|
|
@@ -8,14 +8,17 @@
|
|
|
8
8
|
* 1. loads the pinned, hash-checked ADR-117 anchor via `loadAnchorSet` (which
|
|
9
9
|
* throws on drift — the frozen checklist can't be silently edited),
|
|
10
10
|
* 2. selects the constant-denominator checklist for `checklistId`,
|
|
11
|
-
* 3.
|
|
12
|
-
*
|
|
11
|
+
* 3. evaluates the revision-bound failure-mode reach manifest before any
|
|
12
|
+
* judge call (missing legacy manifests remain explicitly inconclusive),
|
|
13
|
+
* 4. runs the two-gate, three-valued `computeQualityVerdict` with the injected
|
|
14
|
+
* frontier judge and combines the independent verdicts fail-closed.
|
|
13
15
|
*
|
|
14
16
|
* The oracle result and the judge are injected — this module owns no LLM and no
|
|
15
17
|
* mutation runner, so it is deterministic and unit-testable with a fake judge.
|
|
16
18
|
*/
|
|
17
19
|
import { type Judge, type QualityVerdictResult, type RequirementChecklist } from './quality-verdict.js';
|
|
18
20
|
import type { OracleResult } from './oracle-eval.js';
|
|
21
|
+
import { type VerificationCoverageVerdict, type VerificationReachManifest, type VerificationReachResult } from './verification-reach.js';
|
|
19
22
|
/** Default frozen anchor location, relative to the project root (ADR-117). */
|
|
20
23
|
export declare const DEFAULT_ANCHOR_RELATIVE_PATH = "verification/anchors/qe-anchor-v1.json";
|
|
21
24
|
export interface QualityGateRequest {
|
|
@@ -32,13 +35,33 @@ export interface QualityGateRequest {
|
|
|
32
35
|
judge: Judge;
|
|
33
36
|
/** Override the frozen anchor path (absolute, or relative to project root). */
|
|
34
37
|
anchorPath?: string;
|
|
38
|
+
/** Revision-bound failure-mode reach evidence. Omit only for legacy migration. */
|
|
39
|
+
verificationManifest?: VerificationReachManifest;
|
|
40
|
+
}
|
|
41
|
+
export interface LegacyUnknownVerificationCoverage {
|
|
42
|
+
kind: 'legacy-unknown';
|
|
43
|
+
coverageVerdict: 'inconclusive';
|
|
44
|
+
reason: string;
|
|
45
|
+
}
|
|
46
|
+
export interface VerifiedVerificationCoverage extends VerificationReachResult {
|
|
47
|
+
kind: 'verified';
|
|
48
|
+
}
|
|
49
|
+
export type QualityGateVerificationCoverage = LegacyUnknownVerificationCoverage | VerifiedVerificationCoverage;
|
|
50
|
+
export interface ReachAwareQualityGateResult extends QualityVerdictResult {
|
|
51
|
+
/** Threshold/oracle/judge verdict before verification-reach preflight. */
|
|
52
|
+
qualityVerdict: QualityVerdictResult['verdict'];
|
|
53
|
+
/** Independent verdict for required failure-mode observation coverage. */
|
|
54
|
+
coverageVerdict: VerificationCoverageVerdict;
|
|
55
|
+
/** Overall fail-closed verdict. A pass requires both independent gates to pass. */
|
|
56
|
+
verdict: QualityVerdictResult['verdict'];
|
|
57
|
+
verification: QualityGateVerificationCoverage;
|
|
35
58
|
}
|
|
36
59
|
/**
|
|
37
60
|
* Run the two-gate quality gate for one artifact against one pinned checklist.
|
|
38
61
|
* Throws only for caller error (unknown checklist id, unloadable/drifted anchor);
|
|
39
|
-
* every judgement outcome is returned as a three-valued
|
|
62
|
+
* every judgement outcome is returned as a three-valued reach-aware result.
|
|
40
63
|
*/
|
|
41
|
-
export declare function runQualityGate(req: QualityGateRequest): Promise<
|
|
64
|
+
export declare function runQualityGate(req: QualityGateRequest): Promise<ReachAwareQualityGateResult>;
|
|
42
65
|
/**
|
|
43
66
|
* Load the pinned checklist for `checklistId` from the frozen anchor. Exposed so
|
|
44
67
|
* callers (CLI/MCP) can list valid ids or pre-validate before building a judge.
|
|
@@ -8,8 +8,10 @@
|
|
|
8
8
|
* 1. loads the pinned, hash-checked ADR-117 anchor via `loadAnchorSet` (which
|
|
9
9
|
* throws on drift — the frozen checklist can't be silently edited),
|
|
10
10
|
* 2. selects the constant-denominator checklist for `checklistId`,
|
|
11
|
-
* 3.
|
|
12
|
-
*
|
|
11
|
+
* 3. evaluates the revision-bound failure-mode reach manifest before any
|
|
12
|
+
* judge call (missing legacy manifests remain explicitly inconclusive),
|
|
13
|
+
* 4. runs the two-gate, three-valued `computeQualityVerdict` with the injected
|
|
14
|
+
* frontier judge and combines the independent verdicts fail-closed.
|
|
13
15
|
*
|
|
14
16
|
* The oracle result and the judge are injected — this module owns no LLM and no
|
|
15
17
|
* mutation runner, so it is deterministic and unit-testable with a fake judge.
|
|
@@ -18,21 +20,48 @@ import path from 'node:path';
|
|
|
18
20
|
import { loadAnchorSet } from './anchor-set.js';
|
|
19
21
|
import { computeQualityVerdict, } from './quality-verdict.js';
|
|
20
22
|
import { findProjectRoot } from '../kernel/unified-memory.js';
|
|
23
|
+
import { computeVerificationArtifactDigest, evaluateVerificationReach, } from './verification-reach.js';
|
|
21
24
|
/** Default frozen anchor location, relative to the project root (ADR-117). */
|
|
22
25
|
export const DEFAULT_ANCHOR_RELATIVE_PATH = 'verification/anchors/qe-anchor-v1.json';
|
|
23
26
|
/**
|
|
24
27
|
* Run the two-gate quality gate for one artifact against one pinned checklist.
|
|
25
28
|
* Throws only for caller error (unknown checklist id, unloadable/drifted anchor);
|
|
26
|
-
* every judgement outcome is returned as a three-valued
|
|
29
|
+
* every judgement outcome is returned as a three-valued reach-aware result.
|
|
27
30
|
*/
|
|
28
31
|
export async function runQualityGate(req) {
|
|
29
32
|
const checklist = loadChecklist(req.checklistId, req.anchorPath);
|
|
30
|
-
|
|
33
|
+
if (req.verificationManifest
|
|
34
|
+
&& req.verificationManifest.artifact.digest !== computeVerificationArtifactDigest(req.artifact)) {
|
|
35
|
+
throw new Error('Verification reach manifest artifact digest does not match the judged artifact');
|
|
36
|
+
}
|
|
37
|
+
const verification = req.verificationManifest
|
|
38
|
+
? { kind: 'verified', ...evaluateVerificationReach(req.verificationManifest) }
|
|
39
|
+
: {
|
|
40
|
+
kind: 'legacy-unknown',
|
|
41
|
+
coverageVerdict: 'inconclusive',
|
|
42
|
+
reason: 'legacy quality-gate request has no verification reach manifest',
|
|
43
|
+
};
|
|
44
|
+
const coverageVerdict = verification.coverageVerdict;
|
|
45
|
+
const quality = await computeQualityVerdict({
|
|
31
46
|
oracle: req.oracleResult,
|
|
32
47
|
artifact: req.artifact,
|
|
33
48
|
checklist,
|
|
34
49
|
judge: req.judge,
|
|
35
50
|
});
|
|
51
|
+
return {
|
|
52
|
+
...quality,
|
|
53
|
+
qualityVerdict: quality.verdict,
|
|
54
|
+
coverageVerdict,
|
|
55
|
+
verdict: combineVerdicts(quality.verdict, coverageVerdict),
|
|
56
|
+
verification,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
function combineVerdicts(quality, coverage) {
|
|
60
|
+
if (quality === 'fail' || coverage === 'fail')
|
|
61
|
+
return 'fail';
|
|
62
|
+
if (quality === 'pass' && coverage === 'pass')
|
|
63
|
+
return 'pass';
|
|
64
|
+
return 'inconclusive';
|
|
36
65
|
}
|
|
37
66
|
/**
|
|
38
67
|
* Load the pinned checklist for `checklistId` from the frozen anchor. Exposed so
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Failure-mode verification reach contracts (#651).
|
|
3
|
+
*
|
|
4
|
+
* Quality evidence is useful only within the boundary it actually observed.
|
|
5
|
+
* This module keeps that boundary revision-bound and fail-closed: direct,
|
|
6
|
+
* executed, fresh evidence with the required oracle can cover a risk; partial,
|
|
7
|
+
* inferred, stale, unavailable, and wrong-target evidence remains visible but
|
|
8
|
+
* cannot silently produce a passing coverage verdict.
|
|
9
|
+
*/
|
|
10
|
+
export type FailureModeSeverity = 'critical' | 'high' | 'medium' | 'low';
|
|
11
|
+
export type VerificationChannel = 'static' | 'build' | 'runtime' | 'api' | 'browser' | 'telemetry' | 'hardware' | 'human';
|
|
12
|
+
export type VerificationReachLevel = 'direct' | 'partial' | 'none';
|
|
13
|
+
export type VerificationEvidenceClass = 'EXECUTED' | 'STATIC' | 'INFERRED' | 'UNKNOWN';
|
|
14
|
+
export type VerificationExecutionStatus = 'passed' | 'failed' | 'not-run' | 'unavailable';
|
|
15
|
+
export type UncoveredDisposition = 'fail' | 'inconclusive' | 'human-review';
|
|
16
|
+
export type VerificationCoverageVerdict = 'pass' | UncoveredDisposition;
|
|
17
|
+
export interface VerificationTarget {
|
|
18
|
+
revision: string;
|
|
19
|
+
digest: string;
|
|
20
|
+
environment: string;
|
|
21
|
+
}
|
|
22
|
+
export interface VerificationCost {
|
|
23
|
+
tokens?: number;
|
|
24
|
+
durationMs?: number;
|
|
25
|
+
monetary?: number;
|
|
26
|
+
}
|
|
27
|
+
export interface VerificationReach {
|
|
28
|
+
checkId: string;
|
|
29
|
+
channel: VerificationChannel;
|
|
30
|
+
reach: VerificationReachLevel;
|
|
31
|
+
evidenceClass: VerificationEvidenceClass;
|
|
32
|
+
executionStatus: VerificationExecutionStatus;
|
|
33
|
+
target: VerificationTarget;
|
|
34
|
+
oracleRef?: string;
|
|
35
|
+
observedAt?: string;
|
|
36
|
+
limitations: string[];
|
|
37
|
+
cost?: VerificationCost;
|
|
38
|
+
}
|
|
39
|
+
export interface FailureModeRequirement {
|
|
40
|
+
riskId: string;
|
|
41
|
+
failureMode: string;
|
|
42
|
+
severity: FailureModeSeverity;
|
|
43
|
+
requiredOracle: string;
|
|
44
|
+
requiredObservations: VerificationChannel[];
|
|
45
|
+
checks: VerificationReach[];
|
|
46
|
+
dispositionWhenUncovered: UncoveredDisposition;
|
|
47
|
+
}
|
|
48
|
+
export interface VerificationReachManifest {
|
|
49
|
+
id: string;
|
|
50
|
+
systemUnderTest: string;
|
|
51
|
+
artifact: VerificationTarget;
|
|
52
|
+
risks: FailureModeRequirement[];
|
|
53
|
+
generatedAt: string;
|
|
54
|
+
expiresAt?: string;
|
|
55
|
+
manifestHash: string;
|
|
56
|
+
}
|
|
57
|
+
export type VerificationReachManifestInput = Omit<VerificationReachManifest, 'manifestHash'>;
|
|
58
|
+
export interface FailureModeReachResult {
|
|
59
|
+
riskId: string;
|
|
60
|
+
failureMode: string;
|
|
61
|
+
severity: FailureModeSeverity;
|
|
62
|
+
verdict: VerificationCoverageVerdict;
|
|
63
|
+
directCheckIds: string[];
|
|
64
|
+
partialCheckIds: string[];
|
|
65
|
+
failedCheckIds: string[];
|
|
66
|
+
uncoveredObservations: VerificationChannel[];
|
|
67
|
+
limitations: string[];
|
|
68
|
+
reason: string;
|
|
69
|
+
}
|
|
70
|
+
export interface VerificationReachResult {
|
|
71
|
+
manifestId: string;
|
|
72
|
+
manifestHash: string;
|
|
73
|
+
systemUnderTest: string;
|
|
74
|
+
artifact: VerificationTarget;
|
|
75
|
+
coverageVerdict: VerificationCoverageVerdict;
|
|
76
|
+
risks: FailureModeReachResult[];
|
|
77
|
+
evaluatedAt: string;
|
|
78
|
+
}
|
|
79
|
+
export interface VerificationReachEvaluationOptions {
|
|
80
|
+
now?: Date;
|
|
81
|
+
}
|
|
82
|
+
/** Create a manifest whose hash binds its target, risks, checks, and lifetime. */
|
|
83
|
+
export declare function createVerificationReachManifest(input: VerificationReachManifestInput): VerificationReachManifest;
|
|
84
|
+
/** Compute the canonical SHA-256 identity for all manifest content except the hash itself. */
|
|
85
|
+
export declare function computeVerificationReachManifestHash(manifest: VerificationReachManifest | VerificationReachManifestInput): string;
|
|
86
|
+
/** Bind a reach manifest to the exact artifact bytes submitted to the gate. */
|
|
87
|
+
export declare function computeVerificationArtifactDigest(artifact: string): string;
|
|
88
|
+
/** Evaluate whether the declared evidence can directly observe every required failure mode. */
|
|
89
|
+
export declare function evaluateVerificationReach(manifest: VerificationReachManifest, options?: VerificationReachEvaluationOptions): VerificationReachResult;
|
|
90
|
+
//# sourceMappingURL=verification-reach.d.ts.map
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Failure-mode verification reach contracts (#651).
|
|
3
|
+
*
|
|
4
|
+
* Quality evidence is useful only within the boundary it actually observed.
|
|
5
|
+
* This module keeps that boundary revision-bound and fail-closed: direct,
|
|
6
|
+
* executed, fresh evidence with the required oracle can cover a risk; partial,
|
|
7
|
+
* inferred, stale, unavailable, and wrong-target evidence remains visible but
|
|
8
|
+
* cannot silently produce a passing coverage verdict.
|
|
9
|
+
*/
|
|
10
|
+
import { createHash } from 'node:crypto';
|
|
11
|
+
/** Create a manifest whose hash binds its target, risks, checks, and lifetime. */
|
|
12
|
+
export function createVerificationReachManifest(input) {
|
|
13
|
+
validateManifestShape(input);
|
|
14
|
+
const manifest = structuredClone(input);
|
|
15
|
+
return {
|
|
16
|
+
...manifest,
|
|
17
|
+
manifestHash: computeVerificationReachManifestHash(manifest),
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
/** Compute the canonical SHA-256 identity for all manifest content except the hash itself. */
|
|
21
|
+
export function computeVerificationReachManifestHash(manifest) {
|
|
22
|
+
const { manifestHash: _ignored, ...content } = manifest;
|
|
23
|
+
return `sha256:${createHash('sha256').update(canonicalJson(content)).digest('hex')}`;
|
|
24
|
+
}
|
|
25
|
+
/** Bind a reach manifest to the exact artifact bytes submitted to the gate. */
|
|
26
|
+
export function computeVerificationArtifactDigest(artifact) {
|
|
27
|
+
return `sha256:${createHash('sha256').update(artifact).digest('hex')}`;
|
|
28
|
+
}
|
|
29
|
+
/** Evaluate whether the declared evidence can directly observe every required failure mode. */
|
|
30
|
+
export function evaluateVerificationReach(manifest, options = {}) {
|
|
31
|
+
validateManifestShape(manifest);
|
|
32
|
+
const expectedHash = computeVerificationReachManifestHash(manifest);
|
|
33
|
+
if (manifest.manifestHash !== expectedHash) {
|
|
34
|
+
throw new Error(`Verification reach manifestHash mismatch: expected ${expectedHash}`);
|
|
35
|
+
}
|
|
36
|
+
const now = options.now ?? new Date();
|
|
37
|
+
const evaluatedAt = now.toISOString();
|
|
38
|
+
const manifestExpired = manifest.expiresAt != null
|
|
39
|
+
&& now.getTime() > parseTimestamp(manifest.expiresAt, 'expiresAt');
|
|
40
|
+
const risks = manifest.risks.map((requirement) => evaluateRisk(requirement, manifest, manifestExpired, now.getTime()));
|
|
41
|
+
return {
|
|
42
|
+
manifestId: manifest.id,
|
|
43
|
+
manifestHash: manifest.manifestHash,
|
|
44
|
+
systemUnderTest: manifest.systemUnderTest,
|
|
45
|
+
artifact: structuredClone(manifest.artifact),
|
|
46
|
+
coverageVerdict: aggregateVerdicts(risks.map((risk) => risk.verdict)),
|
|
47
|
+
risks,
|
|
48
|
+
evaluatedAt,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
function evaluateRisk(requirement, manifest, manifestExpired, evaluatedAt) {
|
|
52
|
+
const direct = new Set();
|
|
53
|
+
const partial = new Set();
|
|
54
|
+
const failed = new Set();
|
|
55
|
+
const covered = new Set();
|
|
56
|
+
const limitations = new Set();
|
|
57
|
+
for (const check of requirement.checks) {
|
|
58
|
+
for (const limitation of check.limitations)
|
|
59
|
+
limitations.add(limitation);
|
|
60
|
+
if (!isUsableObservation(check, manifest, manifestExpired, evaluatedAt))
|
|
61
|
+
continue;
|
|
62
|
+
if (check.reach === 'partial') {
|
|
63
|
+
partial.add(check.checkId);
|
|
64
|
+
continue;
|
|
65
|
+
}
|
|
66
|
+
if (check.reach !== 'direct')
|
|
67
|
+
continue;
|
|
68
|
+
if (!requirement.requiredObservations.includes(check.channel))
|
|
69
|
+
continue;
|
|
70
|
+
if (check.oracleRef !== requirement.requiredOracle)
|
|
71
|
+
continue;
|
|
72
|
+
if (check.executionStatus === 'failed') {
|
|
73
|
+
failed.add(check.checkId);
|
|
74
|
+
continue;
|
|
75
|
+
}
|
|
76
|
+
if (check.executionStatus === 'passed') {
|
|
77
|
+
direct.add(check.checkId);
|
|
78
|
+
covered.add(check.channel);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
const uncoveredObservations = requirement.requiredObservations.filter((channel) => !covered.has(channel));
|
|
82
|
+
const verdict = failed.size > 0
|
|
83
|
+
? 'fail'
|
|
84
|
+
: uncoveredObservations.length === 0
|
|
85
|
+
? 'pass'
|
|
86
|
+
: requirement.dispositionWhenUncovered;
|
|
87
|
+
return {
|
|
88
|
+
riskId: requirement.riskId,
|
|
89
|
+
failureMode: requirement.failureMode,
|
|
90
|
+
severity: requirement.severity,
|
|
91
|
+
verdict,
|
|
92
|
+
directCheckIds: [...direct],
|
|
93
|
+
partialCheckIds: [...partial],
|
|
94
|
+
failedCheckIds: [...failed],
|
|
95
|
+
uncoveredObservations,
|
|
96
|
+
limitations: [...limitations],
|
|
97
|
+
reason: buildRiskReason(verdict, failed, uncoveredObservations, manifestExpired),
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
function isUsableObservation(check, manifest, manifestExpired, evaluatedAt) {
|
|
101
|
+
if (manifestExpired)
|
|
102
|
+
return false;
|
|
103
|
+
if (!sameTarget(check.target, manifest.artifact))
|
|
104
|
+
return false;
|
|
105
|
+
if (check.evidenceClass !== 'EXECUTED')
|
|
106
|
+
return false;
|
|
107
|
+
if (check.executionStatus === 'not-run' || check.executionStatus === 'unavailable')
|
|
108
|
+
return false;
|
|
109
|
+
if (!check.observedAt)
|
|
110
|
+
return false;
|
|
111
|
+
const observedAt = parseTimestamp(check.observedAt, `check ${check.checkId} observedAt`);
|
|
112
|
+
const generatedAt = parseTimestamp(manifest.generatedAt, 'generatedAt');
|
|
113
|
+
if (observedAt < generatedAt)
|
|
114
|
+
return false;
|
|
115
|
+
if (observedAt > evaluatedAt)
|
|
116
|
+
return false;
|
|
117
|
+
if (manifest.expiresAt && observedAt > parseTimestamp(manifest.expiresAt, 'expiresAt'))
|
|
118
|
+
return false;
|
|
119
|
+
return true;
|
|
120
|
+
}
|
|
121
|
+
function sameTarget(actual, expected) {
|
|
122
|
+
return actual.revision === expected.revision
|
|
123
|
+
&& actual.digest === expected.digest
|
|
124
|
+
&& actual.environment === expected.environment;
|
|
125
|
+
}
|
|
126
|
+
function aggregateVerdicts(verdicts) {
|
|
127
|
+
if (verdicts.some((verdict) => verdict === 'fail'))
|
|
128
|
+
return 'fail';
|
|
129
|
+
if (verdicts.some((verdict) => verdict === 'human-review'))
|
|
130
|
+
return 'human-review';
|
|
131
|
+
if (verdicts.some((verdict) => verdict === 'inconclusive'))
|
|
132
|
+
return 'inconclusive';
|
|
133
|
+
return 'pass';
|
|
134
|
+
}
|
|
135
|
+
function buildRiskReason(verdict, failed, uncovered, manifestExpired) {
|
|
136
|
+
if (manifestExpired)
|
|
137
|
+
return `verification manifest expired; uncovered: ${uncovered.join(', ')}`;
|
|
138
|
+
if (failed.size > 0)
|
|
139
|
+
return `direct check failed: ${[...failed].join(', ')}`;
|
|
140
|
+
if (verdict === 'pass')
|
|
141
|
+
return 'all required observation channels have direct executed reach';
|
|
142
|
+
return `required reach is uncovered (${uncovered.join(', ')}); disposition: ${verdict}`;
|
|
143
|
+
}
|
|
144
|
+
function validateManifestShape(manifest) {
|
|
145
|
+
if (!manifest.id || !manifest.systemUnderTest) {
|
|
146
|
+
throw new Error('Verification reach manifest requires id and systemUnderTest');
|
|
147
|
+
}
|
|
148
|
+
if (!manifest.artifact.revision || !manifest.artifact.digest || !manifest.artifact.environment) {
|
|
149
|
+
throw new Error('Verification reach manifest artifact requires revision, digest, and environment');
|
|
150
|
+
}
|
|
151
|
+
parseTimestamp(manifest.generatedAt, 'generatedAt');
|
|
152
|
+
if (manifest.expiresAt)
|
|
153
|
+
parseTimestamp(manifest.expiresAt, 'expiresAt');
|
|
154
|
+
if (manifest.risks.length === 0) {
|
|
155
|
+
throw new Error('Verification reach manifest requires at least one failure mode');
|
|
156
|
+
}
|
|
157
|
+
const riskIds = new Set();
|
|
158
|
+
for (const risk of manifest.risks) {
|
|
159
|
+
if (riskIds.has(risk.riskId))
|
|
160
|
+
throw new Error(`Duplicate riskId: ${risk.riskId}`);
|
|
161
|
+
riskIds.add(risk.riskId);
|
|
162
|
+
if (!risk.riskId || !risk.failureMode || !risk.requiredOracle) {
|
|
163
|
+
throw new Error('Each failure mode requires riskId, failureMode, and requiredOracle');
|
|
164
|
+
}
|
|
165
|
+
if (risk.requiredObservations.length === 0) {
|
|
166
|
+
throw new Error(`Failure mode ${risk.riskId} requires at least one observation channel`);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
function parseTimestamp(value, field) {
|
|
171
|
+
const timestamp = Date.parse(value);
|
|
172
|
+
if (!Number.isFinite(timestamp))
|
|
173
|
+
throw new Error(`Invalid ${field} timestamp: ${value}`);
|
|
174
|
+
return timestamp;
|
|
175
|
+
}
|
|
176
|
+
function canonicalJson(value) {
|
|
177
|
+
if (Array.isArray(value))
|
|
178
|
+
return `[${value.map(canonicalJson).join(',')}]`;
|
|
179
|
+
if (value && typeof value === 'object') {
|
|
180
|
+
const entries = Object.entries(value)
|
|
181
|
+
.filter(([, entry]) => entry !== undefined)
|
|
182
|
+
.sort(([left], [right]) => left < right ? -1 : left > right ? 1 : 0);
|
|
183
|
+
return `{${entries.map(([key, entry]) => `${JSON.stringify(key)}:${canonicalJson(entry)}`).join(',')}}`;
|
|
184
|
+
}
|
|
185
|
+
return JSON.stringify(value);
|
|
186
|
+
}
|
|
187
|
+
//# sourceMappingURL=verification-reach.js.map
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* const verdicts = await adversarialVerify(findings, { judge, refuters: 3 });
|
|
12
12
|
* const { confirmed, killed } = partitionVerdicts(verdicts);
|
|
13
13
|
*/
|
|
14
|
-
export type { Finding, FindingVerdict, FindingSeverity, FindingOutcome, RefuterVote, Judge, AdversarialVerifyOptions, } from './types.js';
|
|
14
|
+
export type { Finding, FindingVerdict, FindingSeverity, FindingOutcome, RefuterVote, JudgeMeasurementReceipt, EndpointClass, SnapshotIdentityLevel, ReceiptSemantics, CacheStatus, Judge, AdversarialVerifyOptions, } from './types.js';
|
|
15
15
|
export { adversarialVerify, partitionVerdicts } from './verify.js';
|
|
16
16
|
export { synthesizeVerdict, majorityKill, isFindingVerdict } from './synthesize.js';
|
|
17
17
|
export { refuterPrompt, DEFAULT_LENSES } from './prompts.js';
|