agentic-qe 3.13.12 → 3.14.1
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/qe-court/SKILL.md +4 -4
- package/.claude/skills/qe-court/config-schema.json +38 -0
- package/.claude/skills/qe-court/evals/qe-court.yaml +8 -8
- package/.claude/skills/skills-manifest.json +1 -1
- package/CHANGELOG.md +130 -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/qe-court/SKILL.md +4 -4
- package/assets/skills/qe-court/config-schema.json +38 -0
- package/assets/skills/qe-court/evals/qe-court.yaml +8 -8
- package/assets/skills/skills-manifest.json +1 -1
- package/dist/cli/brain-commands.d.ts +1 -0
- package/dist/cli/brain-commands.js +1 -0
- package/dist/cli/bundle.js +7 -7
- package/dist/cli/chunks/adapter-I2N7PEKG.js +2 -0
- package/dist/cli/chunks/{agent-booster-wasm-7I7LZFNC.js → agent-booster-wasm-OY5Y2CUM.js} +2 -2
- package/dist/cli/chunks/{agent-handler-QZZT52BH.js → agent-handler-TUOH55LD.js} +2 -2
- package/dist/cli/chunks/{agent-memory-branch-MLQS5Y26.js → agent-memory-branch-XM3IYKT3.js} +2 -2
- package/dist/cli/chunks/aqe-learning-engine-U4ALUH6A.js +2 -0
- package/dist/cli/chunks/{arena-WRIY37EJ.js → arena-DOCLIEBL.js} +4 -4
- package/dist/cli/chunks/{arena-IM4CP6LP.js → arena-UMFJZKG7.js} +2 -2
- package/dist/cli/chunks/{audit-BSAQ4EFN.js → audit-KZLU5VLW.js} +3 -3
- package/dist/cli/chunks/base-RCYIBNHM.js +2 -0
- package/dist/cli/chunks/{better-sqlite3-X2XZUXWZ.js → better-sqlite3-MIEZBNUI.js} +2 -2
- package/dist/cli/chunks/brain-handler-6PZN46B7.js +90 -0
- package/dist/cli/chunks/{branch-enumerator-NI4Q7DSJ.js → branch-enumerator-XCETHA4F.js} +2 -2
- package/dist/cli/chunks/{browser-PXBLORUZ.js → browser-UEXISDCJ.js} +2 -2
- package/dist/cli/chunks/browser-workflow-L6TDB5O5.js +2 -0
- package/dist/cli/chunks/{chunk-5PNQNBDZ.js → chunk-3AYNHOWS.js} +1 -1
- package/dist/cli/chunks/{chunk-NL2SCAGJ.js → chunk-3BRR2FLH.js} +3 -3
- package/dist/cli/chunks/chunk-3FFMUB3B.js +14 -0
- package/dist/cli/chunks/{chunk-GJJWXRAD.js → chunk-3JMSXOU4.js} +2 -2
- package/dist/cli/chunks/{chunk-MB2KLJ6Q.js → chunk-3TMUCJNJ.js} +1 -1
- package/dist/cli/chunks/{chunk-JVFZAJ5N.js → chunk-3WSH4HD2.js} +2 -2
- package/dist/cli/chunks/{chunk-SCQNISGS.js → chunk-3XRXUVUI.js} +1 -1
- package/dist/cli/chunks/{chunk-Z56BBX77.js → chunk-45S5553E.js} +2 -2
- package/dist/cli/chunks/{chunk-6BSZHNOC.js → chunk-4MT62HKK.js} +1 -1
- package/dist/cli/chunks/{chunk-PVINNJ4P.js → chunk-4ZLFUO4I.js} +2 -2
- package/dist/cli/chunks/{chunk-MYVKTG55.js → chunk-5F5V4QYU.js} +3 -3
- package/dist/cli/chunks/{chunk-2W3D5A4R.js → chunk-5KP62DC3.js} +2 -2
- package/dist/cli/chunks/{chunk-BODFJ3DC.js → chunk-5NSSJUWW.js} +2 -2
- package/dist/cli/chunks/{chunk-KXSUDN46.js → chunk-5T6PAUZD.js} +1 -1
- package/dist/cli/chunks/{chunk-7ZVO7I4Q.js → chunk-5TYGSQOL.js} +1 -1
- package/dist/cli/chunks/{chunk-M7CPJW53.js → chunk-5Y2QFSVZ.js} +2 -2
- package/dist/cli/chunks/{chunk-VQD2ELNL.js → chunk-6B77GPWL.js} +2 -2
- package/dist/cli/chunks/{chunk-GJUGG6UR.js → chunk-6DDMHZWH.js} +2 -2
- package/dist/cli/chunks/{chunk-IPZEBALY.js → chunk-6HMNN2Y2.js} +54 -54
- package/dist/cli/chunks/{chunk-M73KM3AZ.js → chunk-6YIMLUH6.js} +160 -26
- package/dist/cli/chunks/{chunk-UBOGJHWC.js → chunk-6Z6Y3YBX.js} +1 -1
- package/dist/cli/chunks/{chunk-M3354CE4.js → chunk-75SC3GEX.js} +2 -2
- package/dist/cli/chunks/{chunk-TJVTV3HP.js → chunk-7AF55H2D.js} +2 -2
- package/dist/cli/chunks/{chunk-3XVZHJQT.js → chunk-7AYTM426.js} +1 -1
- package/dist/cli/chunks/{chunk-U5G6OC2C.js → chunk-7GF6IRSU.js} +2 -2
- package/dist/cli/chunks/{chunk-LRO74LPA.js → chunk-7XL2D56F.js} +4 -4
- package/dist/cli/chunks/{chunk-MGKH4LCM.js → chunk-A6RB34Y6.js} +1 -1
- package/dist/cli/chunks/{chunk-X2SZCVDA.js → chunk-AESYVAPH.js} +8 -7
- package/dist/cli/chunks/{chunk-3ASVQILY.js → chunk-AZUC7E5S.js} +2 -2
- package/dist/cli/chunks/{chunk-R7LGVJMZ.js → chunk-B6Y6AF4M.js} +2 -2
- package/dist/cli/chunks/chunk-C3XNFIOM.js +2 -0
- package/dist/cli/chunks/{chunk-ZSAGRDXA.js → chunk-CBWF42ET.js} +2 -2
- package/dist/cli/chunks/{chunk-VNODKACB.js → chunk-CCZZZBAO.js} +2 -2
- package/dist/cli/chunks/{chunk-5E76HULA.js → chunk-CGDW47WP.js} +2 -2
- package/dist/cli/chunks/chunk-CGZ7LTUK.js +2 -0
- package/dist/cli/chunks/{chunk-6KI6LAAZ.js → chunk-D6RCRTTR.js} +2 -2
- package/dist/cli/chunks/{chunk-TB2N3CAK.js → chunk-DFXQLHQM.js} +2 -2
- package/dist/cli/chunks/chunk-DKSLJZVA.js +2 -0
- package/dist/cli/chunks/{chunk-JTYCOFTD.js → chunk-DKUKGBJE.js} +1 -1
- package/dist/cli/chunks/{chunk-AN5CGTTJ.js → chunk-DKXSJDII.js} +2 -2
- package/dist/cli/chunks/chunk-EEJP3WTQ.js +4 -0
- package/dist/cli/chunks/{chunk-ZMYV4R32.js → chunk-EHW62JL2.js} +1 -1
- package/dist/cli/chunks/{chunk-WYFAPA2G.js → chunk-EPBWFTHH.js} +2 -2
- package/dist/cli/chunks/{chunk-P6EFKHNI.js → chunk-ERTGGFXZ.js} +2 -2
- package/dist/cli/chunks/{chunk-G45AOQDZ.js → chunk-F7TRO2OM.js} +1 -1
- package/dist/cli/chunks/{chunk-XT473WPO.js → chunk-FFRKTZYP.js} +2 -2
- package/dist/cli/chunks/{chunk-5VSS2RBD.js → chunk-FH7SCX2I.js} +2 -2
- package/dist/cli/chunks/{chunk-44NPKZGI.js → chunk-FHBGALBG.js} +2 -2
- package/dist/cli/chunks/{chunk-NTALX2YC.js → chunk-FOAFRC2W.js} +2 -2
- package/dist/cli/chunks/{chunk-7LATB5IR.js → chunk-FPBQ7BXU.js} +2 -2
- package/dist/cli/chunks/{chunk-AKUDUB3O.js → chunk-FRRRDCXY.js} +2 -2
- package/dist/cli/chunks/{chunk-NG6A7LCG.js → chunk-FZ47ZCRL.js} +1 -1
- package/dist/cli/chunks/{chunk-VD53LBF7.js → chunk-GH3NJOTC.js} +3 -3
- package/dist/cli/chunks/{chunk-NDRZZSD5.js → chunk-GO66DCIZ.js} +2 -2
- package/dist/cli/chunks/{chunk-Z6DSYLAG.js → chunk-GRVR3Y6I.js} +1 -1
- package/dist/cli/chunks/chunk-GYTWUOKU.js +65 -0
- package/dist/cli/chunks/{chunk-6KKVMPPR.js → chunk-H2DX36SC.js} +2 -2
- package/dist/cli/chunks/{chunk-NJ3QXJ54.js → chunk-H5LSXVWY.js} +2 -2
- package/dist/cli/chunks/{chunk-HQWFZQMJ.js → chunk-HBAQVJDP.js} +2 -2
- package/dist/cli/chunks/{chunk-33YZGOT6.js → chunk-HCCILQGN.js} +2 -2
- package/dist/cli/chunks/{chunk-KRZYWVS3.js → chunk-HJD52N32.js} +2 -2
- package/dist/cli/chunks/{chunk-IPDM3CAK.js → chunk-HKU5PPS7.js} +1 -1
- package/dist/cli/chunks/{chunk-7RVLVIAI.js → chunk-HPQU6XZH.js} +1 -1
- package/dist/cli/chunks/{chunk-TWUWLSGQ.js → chunk-HRUQWABO.js} +10 -10
- package/dist/cli/chunks/{chunk-HAJG44BD.js → chunk-IGRTQ6VT.js} +2 -2
- package/dist/cli/chunks/{chunk-WXU7FAEB.js → chunk-IIBXGHZT.js} +2 -2
- package/dist/cli/chunks/{chunk-QG5L2JM5.js → chunk-IYB3GRXF.js} +10 -10
- package/dist/cli/chunks/{chunk-NNLZAVFH.js → chunk-IYIMLLUV.js} +1 -1
- package/dist/cli/chunks/{chunk-SXFSJJZF.js → chunk-J2VF7ZO7.js} +2 -2
- package/dist/cli/chunks/{chunk-4FVOJBEU.js → chunk-J33LKXVH.js} +1 -1
- package/dist/cli/chunks/{chunk-IOJ34SXJ.js → chunk-J7VAD4RG.js} +2 -2
- package/dist/cli/chunks/{chunk-VQCLSX7T.js → chunk-JJ4GUO4K.js} +1 -1
- package/dist/cli/chunks/{chunk-QM4Z7TQH.js → chunk-JMULRLD4.js} +1 -1
- package/dist/cli/chunks/{chunk-LXVT6JXO.js → chunk-JNSTKE3K.js} +2 -2
- package/dist/cli/chunks/{chunk-SOS37ECY.js → chunk-JZUWPDVS.js} +1 -1
- package/dist/cli/chunks/chunk-KHUO4NCW.js +11 -0
- package/dist/cli/chunks/chunk-KXMW7XTJ.js +2 -0
- package/dist/cli/chunks/{chunk-4AITMWFZ.js → chunk-KXTN3FR4.js} +2 -2
- package/dist/cli/chunks/{chunk-4Z4X2ND4.js → chunk-L4WATX6B.js} +2 -2
- package/dist/cli/chunks/{chunk-GMLRIZ4E.js → chunk-L66BWYQH.js} +1 -1
- package/dist/cli/chunks/{chunk-52VGZJSD.js → chunk-LJ63HPPN.js} +1 -1
- package/dist/cli/chunks/{chunk-WE3VKDMK.js → chunk-LMPK63PO.js} +3 -3
- package/dist/cli/chunks/{chunk-S6WHYOWV.js → chunk-LQDFWLKK.js} +27 -25
- package/dist/cli/chunks/{chunk-EG73WYAW.js → chunk-LSXQPMPI.js} +2 -2
- package/dist/cli/chunks/{chunk-NJ4YVAG7.js → chunk-MDLLEUFN.js} +3 -3
- package/dist/cli/chunks/{chunk-YQOQVSYU.js → chunk-MFAN5W27.js} +1 -1
- package/dist/cli/chunks/{chunk-A5RWLPVT.js → chunk-MZ2PJUN6.js} +2 -2
- package/dist/cli/chunks/{chunk-HRTSYT4N.js → chunk-N22LMACN.js} +2 -2
- package/dist/cli/chunks/{chunk-L3GBNX7B.js → chunk-NAJCQJSK.js} +2 -2
- package/dist/cli/chunks/{chunk-XM5I7J5S.js → chunk-ND6JBUVH.js} +2 -2
- package/dist/cli/chunks/{chunk-YL2GOJF6.js → chunk-NEEZ6M4W.js} +2 -2
- package/dist/cli/chunks/{chunk-DGFINXUE.js → chunk-NNJ63W77.js} +1 -1
- package/dist/cli/chunks/{chunk-G6FJHDUG.js → chunk-O7KF3GBV.js} +1 -1
- package/dist/cli/chunks/{chunk-RP2BRRLX.js → chunk-OBKMLOHU.js} +2 -2
- package/dist/cli/chunks/{chunk-AOOCV56W.js → chunk-OBLHI4HA.js} +1 -1
- package/dist/cli/chunks/{chunk-OZ53BIY5.js → chunk-ODNLKYOM.js} +1 -1
- package/dist/cli/chunks/{chunk-VBHA4SDU.js → chunk-PMREFRPP.js} +2 -2
- package/dist/cli/chunks/{chunk-ASWWBNX2.js → chunk-PMUF7WU6.js} +2 -2
- package/dist/cli/chunks/{chunk-I5SXLV7D.js → chunk-PS5NIMWJ.js} +2 -2
- package/dist/cli/chunks/chunk-PS6Y662P.js +13 -0
- package/dist/cli/chunks/{chunk-N4OQ4D4V.js → chunk-PYAH4K2U.js} +2 -2
- package/dist/cli/chunks/{chunk-H3GAR4SV.js → chunk-PZZX57ZA.js} +2 -2
- package/dist/cli/chunks/chunk-QAE4BOIV.js +2 -0
- package/dist/cli/chunks/{chunk-7A4WTRWI.js → chunk-QIY43XQJ.js} +1 -1
- package/dist/cli/chunks/{chunk-MLXLGBQZ.js → chunk-QM6EJHP5.js} +1 -1
- package/dist/cli/chunks/{chunk-4ANJV6I4.js → chunk-QMTBWHGR.js} +3 -3
- package/dist/cli/chunks/{chunk-IT5QIUUA.js → chunk-RCHDSUVU.js} +2 -2
- package/dist/cli/chunks/{chunk-AYH3DMW2.js → chunk-RUEHSOE6.js} +1 -1
- package/dist/cli/chunks/{chunk-DCVFHVPR.js → chunk-RVCMZUSJ.js} +2 -2
- package/dist/cli/chunks/{chunk-2JAC57JE.js → chunk-RXHI6CKK.js} +1 -1
- package/dist/cli/chunks/{chunk-QXO35J6F.js → chunk-RXPHQ4ZE.js} +2 -2
- package/dist/cli/chunks/{chunk-FI6J3UHJ.js → chunk-RYHCYTFE.js} +1 -1
- package/dist/cli/chunks/{chunk-DFLASG3B.js → chunk-S4WIAKPL.js} +1 -1
- package/dist/cli/chunks/{chunk-2VY7FL6A.js → chunk-S53ZUAVI.js} +2 -2
- package/dist/cli/chunks/{chunk-4M7YZ2X7.js → chunk-SEKOMKNG.js} +1 -1
- package/dist/cli/chunks/{chunk-UC4EIULB.js → chunk-SZRDEPUY.js} +19 -19
- package/dist/cli/chunks/chunk-T7XYQX5G.js +24 -0
- package/dist/cli/chunks/{chunk-OG3DBHIV.js → chunk-TF33GKWA.js} +2 -2
- package/dist/cli/chunks/{chunk-2VTX4SYW.js → chunk-TGFJUL6M.js} +2 -2
- package/dist/cli/chunks/{chunk-4THFPRFM.js → chunk-TLD727EF.js} +2 -2
- package/dist/cli/chunks/{chunk-7PCIN7UN.js → chunk-TQ2JZVZ3.js} +2 -2
- package/dist/cli/chunks/{chunk-UWZYXI3R.js → chunk-TT7DF2GX.js} +2 -2
- package/dist/cli/chunks/{chunk-X3JNFQW2.js → chunk-UCJEAK7D.js} +2 -2
- package/dist/cli/chunks/{chunk-AM42ROKZ.js → chunk-UN7EHLRV.js} +1 -1
- package/dist/cli/chunks/{chunk-42AS3HPO.js → chunk-UUE5CBZQ.js} +2 -2
- package/dist/cli/chunks/{chunk-E67ZXRG6.js → chunk-UWRMPRY5.js} +1 -1
- package/dist/cli/chunks/{chunk-4YFXF5AQ.js → chunk-VEWYUEVY.js} +5 -5
- package/dist/cli/chunks/{chunk-UJUK6T4V.js → chunk-VUXHJPUS.js} +2 -2
- package/dist/cli/chunks/{chunk-VA2ORJB5.js → chunk-VVP2ROXD.js} +2 -2
- package/dist/cli/chunks/{chunk-BZIPYXSW.js → chunk-WFJKLM6Z.js} +3 -3
- package/dist/cli/chunks/{chunk-MLFELTJX.js → chunk-X5G3UDWP.js} +2 -2
- package/dist/cli/chunks/{chunk-IQH2RDN3.js → chunk-Y63V33M6.js} +5 -5
- package/dist/cli/chunks/{chunk-XIKYUBIV.js → chunk-YXN47QOI.js} +2 -2
- package/dist/cli/chunks/{chunk-RP5VFZJO.js → chunk-Z5YU2TDS.js} +2 -2
- package/dist/cli/chunks/{chunk-KYJBJ56M.js → chunk-ZAHCVRR7.js} +2 -2
- package/dist/cli/chunks/{chunk-66OQ7AB3.js → chunk-ZC3HC6FO.js} +1 -1
- package/dist/cli/chunks/{ci-QAUD62WH.js → ci-Q2VX75PS.js} +2 -2
- package/dist/cli/chunks/{ci-output-TZDVTNE7.js → ci-output-MD5GTVR2.js} +2 -2
- package/dist/cli/chunks/{circuit-breaker-ZWPHJ7YJ.js → circuit-breaker-JMRLG2XI.js} +2 -2
- package/dist/cli/chunks/{claude-flow-setup-SCB4EURN.js → claude-flow-setup-IMXYALBU.js} +2 -2
- package/dist/cli/chunks/client-L4PIXCGV.js +2 -0
- package/dist/cli/chunks/{cline-installer-EHZLMLXF.js → cline-installer-HWFASEGE.js} +2 -2
- package/dist/cli/chunks/{code-3N6PBJMK.js → code-3V37TCAD.js} +2 -2
- package/dist/cli/chunks/{code-index-extractor-6DIKHNRI.js → code-index-extractor-5V54WGFL.js} +2 -2
- package/dist/cli/chunks/codex-installer-UCA5AVE6.js +14 -0
- package/dist/cli/chunks/{completions-5MKWWCCE.js → completions-2DMRCQU6.js} +2 -2
- package/dist/cli/chunks/{complexity-analyzer-TPM4IPEK.js → complexity-analyzer-MMQRXBTD.js} +2 -2
- package/dist/cli/chunks/{continuedev-installer-VXODKGVX.js → continuedev-installer-FAARXP3S.js} +2 -2
- package/dist/cli/chunks/{copilot-installer-PVD5O56P.js → copilot-installer-AKQALMB5.js} +2 -2
- package/dist/cli/chunks/core-handlers-KROSXP4V.js +2 -0
- package/dist/cli/chunks/{cost-tracker-JOMZEQF3.js → cost-tracker-AXWHDND5.js} +2 -2
- package/dist/cli/chunks/{coverage-HTXLEV3B.js → coverage-ZLSKKCG5.js} +3 -3
- package/dist/cli/chunks/cross-domain-router-WMTYBOON.js +2 -0
- package/dist/cli/chunks/{cursor-installer-SHKDTDDZ.js → cursor-installer-UALCQKVD.js} +2 -2
- package/dist/cli/chunks/{daemon-FCFEWVVJ.js → daemon-4LNOPJGN.js} +3 -3
- package/dist/cli/chunks/{daemon-PN4FEPLE.js → daemon-K3DFGCXC.js} +4 -4
- package/dist/cli/chunks/{dag-attention-scheduler-PLOHU5SR.js → dag-attention-scheduler-LCQ7MYKC.js} +2 -2
- package/dist/cli/chunks/{detect-F3H4ZEZY.js → detect-P7PEN3MZ.js} +2 -2
- package/dist/cli/chunks/{dist-node-5TC665N6.js → dist-node-I72BJC2D.js} +2 -2
- package/dist/cli/chunks/{domain-handler-ZIWVFXCU.js → domain-handler-LROF6KWN.js} +2 -2
- package/dist/cli/chunks/{domain-transfer-7Q5JYMYR.js → domain-transfer-M2ZSSTPV.js} +2 -2
- package/dist/cli/chunks/dream-AV63YQ2Y.js +2 -0
- package/dist/cli/chunks/embed-and-insert-pattern-MTBPUGO4.js +3 -0
- package/dist/cli/chunks/{eval-E2K2T75A.js → eval-O24ALB3W.js} +2 -2
- package/dist/cli/chunks/{experience-capture-middleware-Z5SE2O53.js → experience-capture-middleware-7JXEOGRE.js} +3 -3
- package/dist/cli/chunks/{fast-paths-3H52RSUK.js → fast-paths-4CFYJV4U.js} +2 -2
- package/dist/cli/chunks/{feature-flags-ONIKUZVK.js → feature-flags-CHPUA7IM.js} +2 -2
- package/dist/cli/chunks/{feature-flags-LUHSMHPS.js → feature-flags-E6PIM6ZB.js} +2 -2
- package/dist/cli/chunks/{file-discovery-FLYSYSS4.js → file-discovery-2ANIAUCP.js} +2 -2
- package/dist/cli/chunks/{fleet-6OJUAAKV.js → fleet-2MQ3OGCP.js} +3 -3
- package/dist/cli/chunks/{gnn-wrapper-PUL6B7KZ.js → gnn-wrapper-P7JW3622.js} +2 -2
- package/dist/cli/chunks/{heartbeat-handler-HGHHDUDY.js → heartbeat-handler-WWWZSA7V.js} +4 -4
- package/dist/cli/chunks/heartbeat-scheduler-5IZUGMC2.js +2 -0
- package/dist/cli/chunks/hnsw-adapter-NV2NNBJL.js +2 -0
- package/dist/cli/chunks/hnsw-index-GRJ3KA2O.js +2 -0
- package/dist/cli/chunks/{hnsw-legacy-bridge-NDZSNMYX.js → hnsw-legacy-bridge-W634ZOTV.js} +2 -2
- package/dist/cli/chunks/{hnswlib-node-PISLKSO2.js → hnswlib-node-SLZDLMKM.js} +2 -2
- package/dist/cli/chunks/{hooks-WYG54MRI.js → hooks-3BFAZGG7.js} +10 -10
- package/dist/cli/chunks/{hypergraph-engine-EDHKHZZ2.js → hypergraph-engine-XJSGXP2J.js} +2 -2
- package/dist/cli/chunks/{hypergraph-handler-OCHZAPPL.js → hypergraph-handler-RVUWZMOX.js} +3 -3
- package/dist/cli/chunks/impact-analyzer-YM4QUWVH.js +2 -0
- package/dist/cli/chunks/{init-handler-5TCJ672H.js → init-handler-FYOZNNNO.js} +9 -8
- package/dist/cli/chunks/init-wizard-YESXGIK6.js +2 -0
- package/dist/cli/chunks/kernel-VH5SKESU.js +2 -0
- package/dist/cli/chunks/{kilocode-installer-SWUQRCTZ.js → kilocode-installer-MAAKFVSB.js} +2 -2
- package/dist/cli/chunks/{kiro-installer-L22EBAM5.js → kiro-installer-GX3TLZC5.js} +2 -2
- package/dist/cli/chunks/knowledge-graph-F3NL4WJV.js +2 -0
- package/dist/cli/chunks/learning-T4QZ6C26.js +122 -0
- package/dist/cli/chunks/{llm-router-F2L4LFT2.js → llm-router-N2M4WXOC.js} +14 -14
- package/dist/cli/chunks/llm-router-service-HQYCJMPK.js +2 -0
- package/dist/cli/chunks/{load-A4ZF2KHC.js → load-6RU3G4P2.js} +2 -2
- package/dist/cli/chunks/load-test-GWRGKWMN.js +2 -0
- package/dist/cli/chunks/{mcp-T2Z46NNK.js → mcp-EFBO7BAU.js} +2 -2
- package/dist/cli/chunks/{memory-PUC3J6XC.js → memory-AXU2M3DN.js} +5 -5
- package/dist/cli/chunks/memory-backend-7A2PFKPV.js +2 -0
- package/dist/cli/chunks/memory-handlers-65CXN76C.js +2 -0
- package/dist/cli/chunks/{multi-model-executor-U5L4FI4O.js → multi-model-executor-W7AFGVNH.js} +2 -2
- package/dist/cli/chunks/{opencode-installer-UWI6KHYH.js → opencode-installer-KJE2RLCH.js} +2 -2
- package/dist/cli/chunks/{orchestrator-3BEI7R5D.js → orchestrator-CL6MLGVU.js} +22 -24
- package/dist/cli/chunks/pattern-null-store-K2WPRYCP.js +2 -0
- package/dist/cli/chunks/{pattern-usage-recorder-EGWUI5LU.js → pattern-usage-recorder-7SNSJ7K2.js} +2 -2
- package/dist/cli/chunks/{pipeline-JG6M4RHD.js → pipeline-3UU6ON3F.js} +2 -2
- package/dist/cli/chunks/platform-SNMPIDIT.js +2 -0
- package/dist/cli/chunks/{plugin-EEGN3PMK.js → plugin-65IIUUCU.js} +2 -2
- package/dist/cli/chunks/{prime-radiant-advanced-wasm-7KZAINFT.js → prime-radiant-advanced-wasm-WWWJRLRP.js} +2 -2
- package/dist/cli/chunks/protocol-executor-TJDLEHND.js +2 -0
- package/dist/cli/chunks/{protocol-handler-UCEHYK2R.js → protocol-handler-SEBHCLLJ.js} +2 -2
- package/dist/cli/chunks/{prove-JSNG75VD.js → prove-N4X7CCJ4.js} +2 -2
- package/dist/cli/chunks/qe-reasoning-bank-CGRMFPDM.js +2 -0
- package/dist/cli/chunks/{quality-7SRM2HBM.js → quality-LBCJWXMU.js} +2 -2
- package/dist/cli/chunks/quality-gate-KZIQI7QT.js +7 -0
- package/dist/cli/chunks/queen-coordinator-FKP6QZAQ.js +2 -0
- package/dist/cli/chunks/real-embeddings-XCZFHFME.js +2 -0
- package/dist/cli/chunks/{roocode-installer-UYQK64BZ.js → roocode-installer-P3O6B7PT.js} +2 -2
- package/dist/cli/chunks/router-KZ5BISAM.js +2 -0
- package/dist/cli/chunks/routing-feedback-O4Y5TTR6.js +2 -0
- package/dist/cli/chunks/{routing-handler-PY3KPDTH.js → routing-handler-OXZ4DOV4.js} +2 -2
- package/dist/cli/chunks/{ruvector-commands-GCAOUTYS.js → ruvector-commands-PSY5IDSL.js} +2 -2
- package/dist/cli/chunks/rvf-dual-writer-NG3UF3D5.js +2 -0
- package/dist/cli/chunks/rvf-migration-adapter-PUHVTKQY.js +2 -0
- package/dist/cli/chunks/rvf-migration-coordinator-4SUT7GTJ.js +2 -0
- package/dist/cli/chunks/rvf-native-adapter-ODXFKZ6G.js +2 -0
- package/dist/cli/chunks/{rvf-store-integrity-HNDKOM4L.js → rvf-store-integrity-TCKC22FH.js} +2 -2
- package/dist/cli/chunks/safe-db-BUQDNH2R.js +2 -0
- package/dist/cli/chunks/schedule-ZXNDZNNB.js +2 -0
- package/dist/cli/chunks/scheduler-YUQQWWW3.js +2 -0
- package/dist/cli/chunks/{security-MQ2VB7PY.js → security-RQGUQGSI.js} +3 -3
- package/dist/cli/chunks/{shared-rvf-adapter-TAZEU6QK.js → shared-rvf-adapter-ZJFN52C2.js} +2 -2
- package/dist/cli/chunks/{shared-rvf-dual-writer-B7N6AOCY.js → shared-rvf-dual-writer-V2R37HWV.js} +2 -2
- package/dist/cli/chunks/sqlite-persistence-HVSX46C7.js +2 -0
- package/dist/cli/chunks/{status-handler-NZP7DFHE.js → status-handler-XEKWNVDR.js} +2 -2
- package/dist/cli/chunks/{structural-health-ALLUQ4X6.js → structural-health-QMIW6WUN.js} +2 -2
- package/dist/cli/chunks/{sync-WJJG5J6V.js → sync-GDYJ2ULT.js} +2 -2
- package/dist/cli/chunks/{sync-MM7OCUYD.js → sync-H5SXWXPP.js} +2 -2
- package/dist/cli/chunks/{task-handler-CAQUEEB4.js → task-handler-EPLKCQHY.js} +2 -2
- package/dist/cli/chunks/{task-handlers-25BJ7D3W.js → task-handlers-22NTLWTC.js} +3 -3
- package/dist/cli/chunks/{test-HW7GVGVN.js → test-WHJFRZ3F.js} +4 -4
- package/dist/cli/chunks/{test-scheduling-HTMFJMSP.js → test-scheduling-KZVFZOQN.js} +3 -3
- package/dist/cli/chunks/token-bootstrap-BW5WA6PY.js +2 -0
- package/dist/cli/chunks/{token-usage-RJZDMBDP.js → token-usage-4A4O57R6.js} +2 -2
- package/dist/cli/chunks/{transformers-3YFW3EUO.js → transformers-FYTBRV46.js} +2 -2
- package/dist/cli/chunks/{tree-sitter-wasm-parser-U3PQPIK7.js → tree-sitter-wasm-parser-TZIJPLF3.js} +2 -2
- package/dist/cli/chunks/{types-7Q762WDO.js → types-B2L6LKFA.js} +2 -2
- package/dist/cli/chunks/unified-memory-AHN4RVBP.js +2 -0
- package/dist/cli/chunks/unified-memory-hnsw-XB7JPF74.js +2 -0
- package/dist/cli/chunks/unified-persistence-53KWNFQJ.js +2 -0
- package/dist/cli/chunks/{upgrade-F7MKJWBQ.js → upgrade-O6U7EA7V.js} +2 -2
- package/dist/cli/chunks/{validate-B27AVRA6.js → validate-FHNZ5XL3.js} +2 -2
- package/dist/cli/chunks/{validate-swarm-GYZR3GNL.js → validate-swarm-YOLLUEHE.js} +2 -2
- package/dist/cli/chunks/{vibium-W4XQMPJP.js → vibium-UXRPEIXB.js} +2 -2
- package/dist/cli/chunks/visual-security-CRPYS7L7.js +2 -0
- package/dist/cli/chunks/{web-tree-sitter-I7CDCFJU.js → web-tree-sitter-JJ5UIYFD.js} +2 -2
- package/dist/cli/chunks/{windsurf-installer-UYLHFDHU.js → windsurf-installer-I4QMQPIL.js} +2 -2
- package/dist/cli/chunks/witness-chain-5WCR2CAS.js +2 -0
- package/dist/cli/chunks/{witness-chain-B66SYZKU.js → witness-chain-BIJ7WDGS.js} +2 -2
- package/dist/cli/chunks/{witness-key-manager-U4JPAHVW.js → witness-key-manager-3SMMLJLP.js} +2 -2
- package/dist/cli/chunks/{workflow-DYMO47FF.js → workflow-33PUXXJV.js} +4 -4
- package/dist/cli/chunks/workflow-orchestrator-RZWCLTT5.js +2 -0
- package/dist/cli/chunks/{wrappers-7S6DQTEA.js → wrappers-ASAU36VK.js} +2 -2
- package/dist/cli/commands/learning.js +44 -0
- package/dist/cli/commands/llm-router.js +27 -21
- 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/handlers/brain-handler.js +2 -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 +4 -1
- package/dist/context/compaction/index.d.ts +1 -0
- package/dist/context/compaction/index.js +3 -0
- package/dist/context/compaction/instruction-provenance.d.ts +20 -0
- package/dist/context/compaction/instruction-provenance.js +18 -0
- package/dist/context/compaction/tier2-session-summary.d.ts +8 -0
- package/dist/context/compaction/tier2-session-summary.js +20 -0
- package/dist/context/compaction/tier3-llm-compact.d.ts +4 -0
- package/dist/context/compaction/tier3-llm-compact.js +32 -4
- 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 -21
- 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/integrations/embeddings/base/EmbeddingGenerator.js +4 -2
- package/dist/integrations/ruvector/brain-exporter.d.ts +1 -1
- package/dist/integrations/ruvector/brain-exporter.js +15 -3
- package/dist/integrations/ruvector/brain-rvf-exporter.d.ts +4 -0
- package/dist/integrations/ruvector/brain-rvf-exporter.js +118 -37
- package/dist/integrations/ruvector/brain-search.d.ts +1 -1
- package/dist/integrations/ruvector/brain-search.js +1 -1
- package/dist/integrations/ruvector/brain-shared.d.ts +4 -2
- package/dist/integrations/ruvector/brain-shared.js +11 -4
- package/dist/integrations/ruvector/brain-table-ddl.d.ts +2 -2
- package/dist/integrations/ruvector/brain-table-ddl.js +20 -8
- package/dist/integrations/ruvector/cognitive-container.js +1 -1
- package/dist/integrations/ruvector/rvf-dual-writer.d.ts +4 -0
- package/dist/integrations/ruvector/rvf-dual-writer.js +57 -9
- package/dist/integrations/ruvector/rvf-store-integrity.js +1 -1
- package/dist/kernel/unified-memory-schemas.d.ts +4 -3
- package/dist/kernel/unified-memory-schemas.js +19 -9
- package/dist/kernel/unified-memory.d.ts +2 -0
- package/dist/kernel/unified-memory.js +19 -0
- package/dist/learning/embed-and-insert-pattern.js +6 -3
- package/dist/learning/embedding-space.d.ts +50 -0
- package/dist/learning/embedding-space.js +128 -0
- package/dist/learning/evidence-admission-store.d.ts +15 -0
- package/dist/learning/evidence-admission-store.js +68 -0
- package/dist/learning/index.d.ts +7 -0
- package/dist/learning/index.js +4 -0
- package/dist/learning/learning-evidence-admission.d.ts +44 -0
- package/dist/learning/learning-evidence-admission.js +97 -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.d.ts +5 -0
- package/dist/learning/pattern-store.js +60 -9
- package/dist/learning/qe-flywheel/coupled-anchor.d.ts +8 -0
- package/dist/learning/qe-flywheel/coupled-anchor.js +46 -3
- package/dist/learning/qe-reasoning-bank.js +28 -5
- package/dist/learning/real-embeddings.d.ts +3 -0
- package/dist/learning/real-embeddings.js +40 -3
- package/dist/learning/real-qe-reasoning-bank.js +7 -3
- package/dist/learning/rvf-pattern-migration.d.ts +2 -0
- package/dist/learning/rvf-pattern-migration.js +5 -3
- package/dist/learning/rvf-pattern-store.d.ts +3 -0
- package/dist/learning/rvf-pattern-store.js +44 -6
- package/dist/learning/sqlite-persistence.d.ts +7 -2
- package/dist/learning/sqlite-persistence.js +58 -21
- 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 +589 -433
- package/dist/mcp/handlers/memory-handlers.js +6 -2
- package/dist/mcp/services/session-resume.d.ts +15 -19
- package/dist/mcp/services/session-resume.js +204 -194
- package/dist/mcp/tools/quality-assessment/gate.d.ts +8 -5
- package/dist/mcp/tools/quality-assessment/gate.js +9 -4
- package/dist/migrations/20260830_add_learning_evidence_tables.d.ts +7 -0
- package/dist/migrations/20260830_add_learning_evidence_tables.js +173 -0
- package/dist/persistence/rvf-migration-adapter.d.ts +2 -0
- package/dist/persistence/rvf-migration-adapter.js +56 -12
- package/dist/shared/llm/llm-router-service.d.ts +8 -0
- package/dist/shared/llm/llm-router-service.js +21 -3
- package/dist/shared/sql-safety.js +4 -0
- package/dist/skills/qe-court/cli.d.ts +3 -0
- package/dist/skills/qe-court/cli.js +54 -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/calibrate.d.ts +46 -2
- package/dist/verification/adversarial-verify/calibrate.js +104 -2
- package/dist/verification/adversarial-verify/index.d.ts +2 -2
- package/dist/verification/adversarial-verify/index.js +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 +14 -6
- 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-FUV6LBJT.js +0 -2
- package/dist/cli/chunks/aqe-learning-engine-QNFNA3J4.js +0 -2
- package/dist/cli/chunks/base-37W2XIXC.js +0 -2
- package/dist/cli/chunks/brain-handler-TVTTWZGP.js +0 -89
- package/dist/cli/chunks/browser-workflow-PDIUEK7B.js +0 -2
- package/dist/cli/chunks/chunk-5PI75QYP.js +0 -4
- package/dist/cli/chunks/chunk-EDRPTLAX.js +0 -2
- package/dist/cli/chunks/chunk-GEQWCK4F.js +0 -2
- package/dist/cli/chunks/chunk-GQLJYTXN.js +0 -2
- package/dist/cli/chunks/chunk-NLZUGANH.js +0 -11
- package/dist/cli/chunks/chunk-O4BWESH5.js +0 -2
- package/dist/cli/chunks/chunk-PGFCKE4G.js +0 -12
- package/dist/cli/chunks/chunk-RACWX2ZX.js +0 -9
- package/dist/cli/chunks/chunk-SNC73DWF.js +0 -2
- package/dist/cli/chunks/chunk-TDVMILKO.js +0 -2
- package/dist/cli/chunks/chunk-TK5XLF3Z.js +0 -65
- package/dist/cli/chunks/chunk-UQ4UCHO7.js +0 -2
- package/dist/cli/chunks/chunk-VZGP77YU.js +0 -12
- package/dist/cli/chunks/chunk-WA6CSEOX.js +0 -2
- package/dist/cli/chunks/chunk-WYIXNHPF.js +0 -2
- package/dist/cli/chunks/client-4W3KWTAU.js +0 -2
- package/dist/cli/chunks/codex-installer-P7DPQMYL.js +0 -15
- package/dist/cli/chunks/core-handlers-BDU2XBLO.js +0 -2
- package/dist/cli/chunks/cross-domain-router-BPB6IHN4.js +0 -2
- package/dist/cli/chunks/dream-WFCZGFDY.js +0 -2
- package/dist/cli/chunks/embed-and-insert-pattern-VESJQSYD.js +0 -3
- package/dist/cli/chunks/heartbeat-scheduler-HWS4SHRM.js +0 -2
- package/dist/cli/chunks/hnsw-adapter-7QOBHKRB.js +0 -2
- package/dist/cli/chunks/hnsw-index-6WUKYJH7.js +0 -2
- package/dist/cli/chunks/hybrid-router-525JTRA5.js +0 -2
- package/dist/cli/chunks/impact-analyzer-GG6CJEOK.js +0 -2
- package/dist/cli/chunks/init-wizard-4VFAOK4Y.js +0 -2
- package/dist/cli/chunks/kernel-N3FQGOST.js +0 -2
- package/dist/cli/chunks/knowledge-graph-I5QIHB4G.js +0 -2
- package/dist/cli/chunks/learning-TQOGG3CR.js +0 -119
- package/dist/cli/chunks/llm-router-service-NCJZYJLG.js +0 -2
- package/dist/cli/chunks/load-test-DCJEYIXD.js +0 -2
- package/dist/cli/chunks/memory-backend-O6KO2KTX.js +0 -2
- package/dist/cli/chunks/memory-handlers-4Z43WEKD.js +0 -2
- package/dist/cli/chunks/pattern-null-store-5WIJKX2K.js +0 -2
- package/dist/cli/chunks/platform-F76G6RUI.js +0 -2
- package/dist/cli/chunks/protocol-executor-5TPNAZTB.js +0 -2
- package/dist/cli/chunks/provider-manager-3VMOZ6HV.js +0 -2
- package/dist/cli/chunks/qe-reasoning-bank-BATV4NTT.js +0 -2
- package/dist/cli/chunks/quality-gate-A5MPWHST.js +0 -7
- package/dist/cli/chunks/queen-coordinator-EIHGYBUO.js +0 -2
- package/dist/cli/chunks/real-embeddings-ZBF5EQOG.js +0 -2
- package/dist/cli/chunks/router-EMVGY4HU.js +0 -2
- package/dist/cli/chunks/routing-feedback-JUP4OFB2.js +0 -2
- package/dist/cli/chunks/rvf-dual-writer-BUNP4SKD.js +0 -2
- package/dist/cli/chunks/rvf-migration-adapter-VSOAPLMB.js +0 -2
- package/dist/cli/chunks/rvf-migration-coordinator-LSWEHAWX.js +0 -2
- package/dist/cli/chunks/rvf-native-adapter-LOC42TQ6.js +0 -2
- package/dist/cli/chunks/safe-db-WQ62IQKV.js +0 -2
- package/dist/cli/chunks/schedule-XJRP57TE.js +0 -2
- package/dist/cli/chunks/scheduler-EZH5SDIM.js +0 -2
- package/dist/cli/chunks/sqlite-persistence-HPEVCTIB.js +0 -2
- package/dist/cli/chunks/token-bootstrap-F2DCLWGW.js +0 -2
- package/dist/cli/chunks/unified-memory-ATILROKR.js +0 -2
- package/dist/cli/chunks/unified-memory-hnsw-XJXAX7DW.js +0 -2
- package/dist/cli/chunks/unified-persistence-3TN5PBWE.js +0 -2
- package/dist/cli/chunks/visual-security-VFWRBCNA.js +0 -2
- package/dist/cli/chunks/witness-chain-JC5LEXRV.js +0 -2
- package/dist/cli/chunks/workflow-orchestrator-TKQUF2KN.js +0 -2
|
@@ -1,17 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* Agentic QE v3 - Structured Verdict Contracts (ADR-103)
|
|
3
|
-
*
|
|
4
|
-
* Typed, versioned verdict envelopes for agent-to-agent and MCP-boundary
|
|
5
|
-
* handoffs: RiskDecision (quality gates), FindingVerdict (review findings
|
|
6
|
-
* with adversarial refutations), CoverageGap (risk-weighted gap reports).
|
|
7
|
-
*
|
|
8
|
-
* Validators are dependency-free and are the source of truth; the exported
|
|
9
|
-
* JSON Schemas (published to schemas/*.schema.json by
|
|
10
|
-
* scripts/generate-verdict-schemas.mjs) mirror them for external tooling
|
|
11
|
-
* (ajv, workflow agent() schema option). Envelopes are versioned and
|
|
12
|
-
* additive-only within a major version: consumers must tolerate unknown
|
|
13
|
-
* fields, so schemas keep `additionalProperties: true`.
|
|
14
|
-
*/
|
|
1
|
+
import { isSanitizedReceiptIdentifier, isSanitizedReceiptTimestamp, RECEIPT_IDENTIFIER_PATTERN, RECEIPT_JWT_PATTERN, RECEIPT_KNOWN_TIMESTAMP_PATTERN, RECEIPT_OPAQUE_CORRELATION_PATTERN, RECEIPT_OPAQUE_DESCRIPTOR_PATTERN, RECEIPT_SENSITIVE_IDENTIFIER_PATTERN, } from '../verification/adversarial-verify/measurement-receipt.js';
|
|
15
2
|
export const VERDICT_CONTRACT_VERSION = '1.0';
|
|
16
3
|
// ============================================================================
|
|
17
4
|
// Validators (dependency-free, boundary-grade)
|
|
@@ -25,6 +12,88 @@ function isStringArray(v) {
|
|
|
25
12
|
function inUnitRange(v) {
|
|
26
13
|
return typeof v === 'number' && Number.isFinite(v) && v >= 0 && v <= 1;
|
|
27
14
|
}
|
|
15
|
+
const RECEIPT_KEYS = new Set([
|
|
16
|
+
'contract', 'provider', 'requestedModel', 'resolvedModel', 'endpointClass', 'snapshotIdentity',
|
|
17
|
+
'semantics', 'fingerprint', 'requestHash', 'promptHash', 'configHash', 'parserSchemaHash',
|
|
18
|
+
'outputHash', 'parsedVoteHash', 'temperature', 'topP', 'seed', 'deterministic', 'cacheStatus',
|
|
19
|
+
'retryCount', 'timestamp', 'windowId', 'latencyMs', 'requestId',
|
|
20
|
+
]);
|
|
21
|
+
const RECEIPT_HASH = /^(?:UNKNOWN|sha256:[a-f\d]{64})$/;
|
|
22
|
+
function validateMeasurementReceipt(value, path) {
|
|
23
|
+
if (!isRecord(value))
|
|
24
|
+
return [`${path} must be an object`];
|
|
25
|
+
const errors = [];
|
|
26
|
+
for (const key of Object.keys(value)) {
|
|
27
|
+
if (!RECEIPT_KEYS.has(key))
|
|
28
|
+
errors.push(`${path}.${key} is not allowed`);
|
|
29
|
+
}
|
|
30
|
+
if (value.contract !== 'judge-measurement@1')
|
|
31
|
+
errors.push(`${path}.contract must be "judge-measurement@1"`);
|
|
32
|
+
for (const key of ['provider', 'requestedModel', 'resolvedModel', 'fingerprint', 'windowId', 'requestId']) {
|
|
33
|
+
if (!isSanitizedReceiptIdentifier(value[key], key)) {
|
|
34
|
+
errors.push(`${path}.${key} must be a sanitized identifier`);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
for (const key of ['requestHash', 'promptHash', 'configHash', 'parserSchemaHash', 'outputHash', 'parsedVoteHash']) {
|
|
38
|
+
if (typeof value[key] !== 'string' || !RECEIPT_HASH.test(value[key])) {
|
|
39
|
+
errors.push(`${path}.${key} must be UNKNOWN or a SHA-256 digest`);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
if (!['shared', 'dedicated', 'local', 'UNKNOWN'].includes(value.endpointClass)) {
|
|
43
|
+
errors.push(`${path}.endpointClass is invalid`);
|
|
44
|
+
}
|
|
45
|
+
if (!['L0_UNKNOWN', 'L1_NAMED', 'L2_CONTENT_BOUND'].includes(value.snapshotIdentity)) {
|
|
46
|
+
errors.push(`${path}.snapshotIdentity is invalid`);
|
|
47
|
+
}
|
|
48
|
+
if (!['verified', 'provider-asserted', 'UNKNOWN'].includes(value.semantics)) {
|
|
49
|
+
errors.push(`${path}.semantics is invalid`);
|
|
50
|
+
}
|
|
51
|
+
if (!['hit', 'miss', 'bypass', 'UNKNOWN'].includes(value.cacheStatus)) {
|
|
52
|
+
errors.push(`${path}.cacheStatus is invalid`);
|
|
53
|
+
}
|
|
54
|
+
if (value.temperature !== null && (typeof value.temperature !== 'number'
|
|
55
|
+
|| !Number.isFinite(value.temperature) || value.temperature < 0)) {
|
|
56
|
+
errors.push(`${path}.temperature must be a non-negative finite number or null`);
|
|
57
|
+
}
|
|
58
|
+
if (value.topP !== null && (typeof value.topP !== 'number'
|
|
59
|
+
|| !Number.isFinite(value.topP) || value.topP < 0 || value.topP > 1)) {
|
|
60
|
+
errors.push(`${path}.topP must be a finite number in [0,1] or null`);
|
|
61
|
+
}
|
|
62
|
+
if (value.seed !== null && (typeof value.seed !== 'number' || !Number.isSafeInteger(value.seed))) {
|
|
63
|
+
errors.push(`${path}.seed must be a safe integer or null`);
|
|
64
|
+
}
|
|
65
|
+
if (value.deterministic !== null && typeof value.deterministic !== 'boolean') {
|
|
66
|
+
errors.push(`${path}.deterministic must be a boolean or null`);
|
|
67
|
+
}
|
|
68
|
+
if (!Number.isSafeInteger(value.retryCount) || value.retryCount < 0) {
|
|
69
|
+
errors.push(`${path}.retryCount must be a non-negative safe integer`);
|
|
70
|
+
}
|
|
71
|
+
if (!isSanitizedReceiptTimestamp(value.timestamp)) {
|
|
72
|
+
errors.push(`${path}.timestamp must be UNKNOWN or an ISO-8601 UTC timestamp`);
|
|
73
|
+
}
|
|
74
|
+
if (value.latencyMs !== null && (typeof value.latencyMs !== 'number'
|
|
75
|
+
|| !Number.isFinite(value.latencyMs) || value.latencyMs < 0)) {
|
|
76
|
+
errors.push(`${path}.latencyMs must be a non-negative finite number or null`);
|
|
77
|
+
}
|
|
78
|
+
const contentBound = value.fingerprint !== 'UNKNOWN'
|
|
79
|
+
&& ['requestHash', 'promptHash', 'configHash', 'parserSchemaHash', 'outputHash', 'parsedVoteHash']
|
|
80
|
+
.every((field) => value[field] !== 'UNKNOWN');
|
|
81
|
+
if (value.snapshotIdentity === 'L2_CONTENT_BOUND' && !contentBound) {
|
|
82
|
+
errors.push(`${path}.snapshotIdentity L2_CONTENT_BOUND requires non-UNKNOWN fingerprint and hashes`);
|
|
83
|
+
}
|
|
84
|
+
if (value.snapshotIdentity === 'L1_NAMED' && value.resolvedModel === 'UNKNOWN') {
|
|
85
|
+
errors.push(`${path}.snapshotIdentity L1_NAMED requires a resolved model`);
|
|
86
|
+
}
|
|
87
|
+
if (value.semantics === 'verified'
|
|
88
|
+
&& (value.snapshotIdentity !== 'L2_CONTENT_BOUND' || !contentBound)) {
|
|
89
|
+
errors.push(`${path}.semantics verified requires L2 content-bound identity`);
|
|
90
|
+
}
|
|
91
|
+
if (value.semantics !== 'UNKNOWN'
|
|
92
|
+
&& (value.snapshotIdentity === 'L0_UNKNOWN' || value.fingerprint === 'UNKNOWN')) {
|
|
93
|
+
errors.push(`${path}.semantics requires identified snapshot and fingerprint`);
|
|
94
|
+
}
|
|
95
|
+
return errors;
|
|
96
|
+
}
|
|
28
97
|
export function validateRiskDecision(value) {
|
|
29
98
|
const errors = [];
|
|
30
99
|
if (!isRecord(value))
|
|
@@ -67,6 +136,16 @@ export function validateFindingVerdict(value) {
|
|
|
67
136
|
}
|
|
68
137
|
if (!isStringArray(value.refutations))
|
|
69
138
|
errors.push('refutations must be string[]');
|
|
139
|
+
if (value.measurementReceipts !== undefined) {
|
|
140
|
+
if (!Array.isArray(value.measurementReceipts)) {
|
|
141
|
+
errors.push('measurementReceipts must be an array when present');
|
|
142
|
+
}
|
|
143
|
+
else {
|
|
144
|
+
value.measurementReceipts.forEach((receipt, index) => {
|
|
145
|
+
errors.push(...validateMeasurementReceipt(receipt, `measurementReceipts[${index}]`));
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
}
|
|
70
149
|
return { valid: errors.length === 0, errors };
|
|
71
150
|
}
|
|
72
151
|
export function validateCoverageGap(value) {
|
|
@@ -120,6 +199,22 @@ export function buildRiskDecisionFromQualityGate(input) {
|
|
|
120
199
|
// ============================================================================
|
|
121
200
|
const unit = { type: 'number', minimum: 0, maximum: 1 };
|
|
122
201
|
const stringArray = { type: 'array', items: { type: 'string' } };
|
|
202
|
+
function receiptIdentifier(field) {
|
|
203
|
+
const opaquePattern = field === 'provider' || field === 'requestedModel' || field === 'resolvedModel'
|
|
204
|
+
? RECEIPT_OPAQUE_DESCRIPTOR_PATTERN
|
|
205
|
+
: RECEIPT_OPAQUE_CORRELATION_PATTERN;
|
|
206
|
+
return {
|
|
207
|
+
type: 'string',
|
|
208
|
+
pattern: RECEIPT_IDENTIFIER_PATTERN,
|
|
209
|
+
allOf: [
|
|
210
|
+
{ not: { pattern: RECEIPT_SENSITIVE_IDENTIFIER_PATTERN } },
|
|
211
|
+
{ not: { pattern: RECEIPT_JWT_PATTERN } },
|
|
212
|
+
{ not: { pattern: opaquePattern } },
|
|
213
|
+
],
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
const receiptHash = { type: 'string', pattern: '^(?:UNKNOWN|sha256:[a-f0-9]{64})$' };
|
|
217
|
+
const knownReceiptHash = { type: 'string', pattern: '^sha256:[a-f0-9]{64}$' };
|
|
123
218
|
export const RISK_DECISION_SCHEMA = {
|
|
124
219
|
$schema: 'http://json-schema.org/draft-07/schema#',
|
|
125
220
|
$id: 'https://agentic-qe.dev/schemas/risk-decision.schema.json',
|
|
@@ -152,6 +247,99 @@ export const FINDING_VERDICT_SCHEMA = {
|
|
|
152
247
|
evidence: stringArray,
|
|
153
248
|
verdict: { enum: ['upheld', 'refuted', 'uncertain'] },
|
|
154
249
|
refutations: stringArray,
|
|
250
|
+
measurementReceipts: {
|
|
251
|
+
type: 'array',
|
|
252
|
+
items: {
|
|
253
|
+
type: 'object',
|
|
254
|
+
required: [
|
|
255
|
+
'contract', 'provider', 'requestedModel', 'resolvedModel', 'endpointClass',
|
|
256
|
+
'snapshotIdentity', 'semantics', 'fingerprint', 'requestHash', 'promptHash',
|
|
257
|
+
'configHash', 'parserSchemaHash', 'outputHash', 'parsedVoteHash', 'temperature',
|
|
258
|
+
'topP', 'seed', 'deterministic', 'cacheStatus', 'retryCount', 'timestamp',
|
|
259
|
+
'windowId', 'latencyMs', 'requestId',
|
|
260
|
+
],
|
|
261
|
+
additionalProperties: false,
|
|
262
|
+
properties: {
|
|
263
|
+
contract: { const: 'judge-measurement@1' },
|
|
264
|
+
provider: receiptIdentifier('provider'),
|
|
265
|
+
requestedModel: receiptIdentifier('requestedModel'),
|
|
266
|
+
resolvedModel: receiptIdentifier('resolvedModel'),
|
|
267
|
+
endpointClass: { enum: ['shared', 'dedicated', 'local', 'UNKNOWN'] },
|
|
268
|
+
snapshotIdentity: { enum: ['L0_UNKNOWN', 'L1_NAMED', 'L2_CONTENT_BOUND'] },
|
|
269
|
+
semantics: { enum: ['verified', 'provider-asserted', 'UNKNOWN'] },
|
|
270
|
+
fingerprint: receiptIdentifier('fingerprint'),
|
|
271
|
+
requestHash: receiptHash,
|
|
272
|
+
promptHash: receiptHash,
|
|
273
|
+
configHash: receiptHash,
|
|
274
|
+
parserSchemaHash: receiptHash,
|
|
275
|
+
outputHash: receiptHash,
|
|
276
|
+
parsedVoteHash: receiptHash,
|
|
277
|
+
temperature: { type: ['number', 'null'], minimum: 0 },
|
|
278
|
+
topP: { type: ['number', 'null'], minimum: 0, maximum: 1 },
|
|
279
|
+
seed: {
|
|
280
|
+
type: ['integer', 'null'],
|
|
281
|
+
minimum: Number.MIN_SAFE_INTEGER,
|
|
282
|
+
maximum: Number.MAX_SAFE_INTEGER,
|
|
283
|
+
},
|
|
284
|
+
deterministic: { type: ['boolean', 'null'] },
|
|
285
|
+
cacheStatus: { enum: ['hit', 'miss', 'bypass', 'UNKNOWN'] },
|
|
286
|
+
retryCount: { type: 'integer', minimum: 0, maximum: Number.MAX_SAFE_INTEGER },
|
|
287
|
+
timestamp: {
|
|
288
|
+
anyOf: [
|
|
289
|
+
{ const: 'UNKNOWN' },
|
|
290
|
+
{ type: 'string', pattern: RECEIPT_KNOWN_TIMESTAMP_PATTERN, format: 'date-time' },
|
|
291
|
+
],
|
|
292
|
+
},
|
|
293
|
+
windowId: receiptIdentifier('windowId'),
|
|
294
|
+
latencyMs: { type: ['number', 'null'], minimum: 0 },
|
|
295
|
+
requestId: receiptIdentifier('requestId'),
|
|
296
|
+
},
|
|
297
|
+
allOf: [
|
|
298
|
+
{
|
|
299
|
+
if: { properties: { snapshotIdentity: { const: 'L2_CONTENT_BOUND' } } },
|
|
300
|
+
then: {
|
|
301
|
+
properties: {
|
|
302
|
+
fingerprint: { not: { const: 'UNKNOWN' } },
|
|
303
|
+
requestHash: knownReceiptHash,
|
|
304
|
+
promptHash: knownReceiptHash,
|
|
305
|
+
configHash: knownReceiptHash,
|
|
306
|
+
parserSchemaHash: knownReceiptHash,
|
|
307
|
+
outputHash: knownReceiptHash,
|
|
308
|
+
parsedVoteHash: knownReceiptHash,
|
|
309
|
+
},
|
|
310
|
+
},
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
if: { properties: { snapshotIdentity: { const: 'L1_NAMED' } } },
|
|
314
|
+
then: { properties: { resolvedModel: { not: { const: 'UNKNOWN' } } } },
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
if: { properties: { semantics: { const: 'verified' } } },
|
|
318
|
+
then: {
|
|
319
|
+
properties: {
|
|
320
|
+
snapshotIdentity: { const: 'L2_CONTENT_BOUND' },
|
|
321
|
+
fingerprint: { not: { const: 'UNKNOWN' } },
|
|
322
|
+
requestHash: knownReceiptHash,
|
|
323
|
+
promptHash: knownReceiptHash,
|
|
324
|
+
configHash: knownReceiptHash,
|
|
325
|
+
parserSchemaHash: knownReceiptHash,
|
|
326
|
+
outputHash: knownReceiptHash,
|
|
327
|
+
parsedVoteHash: knownReceiptHash,
|
|
328
|
+
},
|
|
329
|
+
},
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
if: { properties: { semantics: { enum: ['verified', 'provider-asserted'] } } },
|
|
333
|
+
then: {
|
|
334
|
+
properties: {
|
|
335
|
+
snapshotIdentity: { not: { const: 'L0_UNKNOWN' } },
|
|
336
|
+
fingerprint: { not: { const: 'UNKNOWN' } },
|
|
337
|
+
},
|
|
338
|
+
},
|
|
339
|
+
},
|
|
340
|
+
],
|
|
341
|
+
},
|
|
342
|
+
},
|
|
155
343
|
},
|
|
156
344
|
};
|
|
157
345
|
export const COVERAGE_GAP_SCHEMA = {
|
|
@@ -120,10 +120,17 @@ async function collectCoverage(targetPath) {
|
|
|
120
120
|
return { collected: fromReport, ranTests: false };
|
|
121
121
|
}
|
|
122
122
|
// #569 work item 1: delegate to real instrumentation where available.
|
|
123
|
-
|
|
123
|
+
const rustProject = isRustProject(targetPath);
|
|
124
|
+
if (rustProject) {
|
|
124
125
|
const rust = await collectRustCoverage(targetPath);
|
|
125
126
|
if (rust)
|
|
126
127
|
return { collected: rust, ranTests: true };
|
|
128
|
+
// This target is a Rust crate. Do not continue into the JS/TS runner:
|
|
129
|
+
// `npx vitest --coverage` can still be available through the parent
|
|
130
|
+
// process PATH and will write an empty report even though the crate has no
|
|
131
|
+
// JavaScript tests. Treating that artifact as coverage hides the intended
|
|
132
|
+
// Rust static-estimation fallback and mislabels the result.
|
|
133
|
+
return { collected: buildEstimatedCoverage(targetPath), ranTests: false };
|
|
127
134
|
}
|
|
128
135
|
const ranTests = await tryRunJsCoverage(targetPath);
|
|
129
136
|
const afterRun = await loadCoverageData(targetPath);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type AgentFaultCorpus, type AgentFaultCorpusCase } from './types.js';
|
|
2
|
+
/** Frozen, synthetic corpus. Ground truth is never embedded in detectorInput. */
|
|
3
|
+
export declare function createAgentFaultDiagnosisCorpus(): AgentFaultCorpus;
|
|
4
|
+
export declare function serializeDetectorInput(input: AgentFaultCorpusCase['detectorInput']): string;
|
|
5
|
+
//# sourceMappingURL=corpus.d.ts.map
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
import { AGENT_FAULT_CORPUS_SCHEMA_VERSION, AGENT_FAULT_TRACE_SCHEMA_VERSION, } from './types.js';
|
|
3
|
+
const SOURCE_REVISION = 'fixture-source-v1';
|
|
4
|
+
const HARNESS_REVISION = 'agent-runtime-diagnosis-v1';
|
|
5
|
+
const ENVIRONMENT_DIGEST = sha256('synthetic-node-runtime-v1');
|
|
6
|
+
function sha256(value) {
|
|
7
|
+
return createHash('sha256').update(value).digest('hex');
|
|
8
|
+
}
|
|
9
|
+
function stable(value) {
|
|
10
|
+
if (Array.isArray(value))
|
|
11
|
+
return `[${value.map(stable).join(',')}]`;
|
|
12
|
+
if (value && typeof value === 'object') {
|
|
13
|
+
return `{${Object.entries(value)
|
|
14
|
+
.sort(([a], [b]) => a.localeCompare(b))
|
|
15
|
+
.map(([key, item]) => `${JSON.stringify(key)}:${stable(item)}`).join(',')}}`;
|
|
16
|
+
}
|
|
17
|
+
return JSON.stringify(value);
|
|
18
|
+
}
|
|
19
|
+
function span(spanId, componentId, kind, parentSpanId) {
|
|
20
|
+
const input = `input:${componentId}`;
|
|
21
|
+
const output = `output:${componentId}`;
|
|
22
|
+
return {
|
|
23
|
+
spanId,
|
|
24
|
+
...(parentSpanId ? { parentSpanId } : {}),
|
|
25
|
+
componentId,
|
|
26
|
+
kind,
|
|
27
|
+
startOffsetMs: kind === 'run' ? 0 : 10,
|
|
28
|
+
durationMs: kind === 'run' ? 100 : 20,
|
|
29
|
+
status: 'ok',
|
|
30
|
+
inputBytes: Buffer.byteLength(input),
|
|
31
|
+
outputBytes: Buffer.byteLength(output),
|
|
32
|
+
inputHash: sha256(input),
|
|
33
|
+
outputHash: sha256(output),
|
|
34
|
+
recovered: false,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
function baseSpans() {
|
|
38
|
+
return [
|
|
39
|
+
span('run', 'workflow', 'run'),
|
|
40
|
+
span('agent-primary', 'planner', 'agent', 'run'),
|
|
41
|
+
{ ...span('tool-weather', 'weather-tool', 'tool', 'agent-primary'), intendedDestination: 'weather-tool', actualDestination: 'weather-tool' },
|
|
42
|
+
span('model-answer', 'reasoning-model', 'model', 'agent-primary'),
|
|
43
|
+
{ ...span('policy-check', 'safety-policy', 'guardrail', 'agent-primary'), policyRef: 'policy://safety/v1', expectedDecision: 'deny', actualDecision: 'deny' },
|
|
44
|
+
{ ...span('delegate-review', 'reviewer-agent', 'delegation', 'agent-primary'), intendedDestination: 'reviewer-agent', actualDestination: 'reviewer-agent' },
|
|
45
|
+
];
|
|
46
|
+
}
|
|
47
|
+
const FIXTURES = [
|
|
48
|
+
{ faultType: 'tool-unavailable', boundary: 'tool', componentId: 'weather-tool', spanId: 'tool-weather', signal: 'tool unavailable', mutate: (s) => ({ ...s, status: 'error', signalCode: 'TOOL_UNAVAILABLE', outputBytes: 0, outputHash: sha256('') }) },
|
|
49
|
+
{ faultType: 'tool-timeout', boundary: 'tool', componentId: 'weather-tool', spanId: 'tool-weather', signal: 'tool deadline exceeded', mutate: (s) => ({ ...s, status: 'timeout', signalCode: 'DEADLINE_EXCEEDED', durationMs: 5_000 }) },
|
|
50
|
+
{ faultType: 'corrupted-tool-output', boundary: 'tool', componentId: 'weather-tool', spanId: 'tool-weather', signal: 'output differs from aligned clean reference', mutate: (s) => ({ ...s, outputHash: sha256('plausible-but-wrong'), outputBytes: 19 }) },
|
|
51
|
+
{ faultType: 'context-truncation', boundary: 'model-context', componentId: 'reasoning-model', spanId: 'model-answer', signal: 'context truncated', mutate: (s) => ({ ...s, status: 'error', signalCode: 'CONTEXT_TRUNCATED', inputBytes: 131_072 }) },
|
|
52
|
+
{ faultType: 'delegation-timeout', boundary: 'inter-agent', componentId: 'reviewer-agent', spanId: 'delegate-review', signal: 'delegation deadline exceeded', mutate: (s) => ({ ...s, status: 'timeout', signalCode: 'DELEGATION_TIMEOUT', durationMs: 5_000 }) },
|
|
53
|
+
{ faultType: 'agent-misroute', boundary: 'inter-agent', componentId: 'reviewer-agent', spanId: 'delegate-review', signal: 'actual agent differs from intended agent', mutate: (s) => ({ ...s, actualDestination: 'billing-agent' }) },
|
|
54
|
+
{ faultType: 'delegation-loop', boundary: 'inter-agent', componentId: 'reviewer-agent', spanId: 'delegate-review', signal: 'delegation edge repeats', mutate: (s) => ({ ...s, retry: 4, signalCode: 'DELEGATION_REPEATED' }) },
|
|
55
|
+
{ faultType: 'guardrail-bypass', boundary: 'guardrail', componentId: 'safety-policy', spanId: 'policy-check', signal: 'policy oracle denies but runtime allows', mutate: (s) => ({ ...s, actualDecision: 'allow' }) },
|
|
56
|
+
];
|
|
57
|
+
function trace(runId, taskId, spans) {
|
|
58
|
+
return {
|
|
59
|
+
schemaVersion: AGENT_FAULT_TRACE_SCHEMA_VERSION,
|
|
60
|
+
runId,
|
|
61
|
+
taskId,
|
|
62
|
+
harnessRevision: HARNESS_REVISION,
|
|
63
|
+
terminalOutcome: 'completed',
|
|
64
|
+
spans,
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
function structured(raw) {
|
|
68
|
+
return {
|
|
69
|
+
schemaVersion: raw.schemaVersion,
|
|
70
|
+
runId: raw.runId,
|
|
71
|
+
taskId: raw.taskId,
|
|
72
|
+
terminalOutcome: raw.terminalOutcome,
|
|
73
|
+
spans: [...raw.spans].sort((a, b) => a.startOffsetMs - b.startOffsetMs || a.spanId.localeCompare(b.spanId)),
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
function makeCase(caseId, runId, taskId, truth, spans, cleanReference, cleanReferenceId, expectedObservableSignal = 'no fault signal') {
|
|
77
|
+
const raw = trace(runId, taskId, spans);
|
|
78
|
+
return {
|
|
79
|
+
caseId,
|
|
80
|
+
...(cleanReferenceId ? { cleanReferenceId } : {}),
|
|
81
|
+
detectorInput: { trace: raw, structured: structured(raw), ...(cleanReference ? { cleanReference } : {}) },
|
|
82
|
+
heldOut: {
|
|
83
|
+
truth,
|
|
84
|
+
manifest: {
|
|
85
|
+
schemaVersion: AGENT_FAULT_CORPUS_SCHEMA_VERSION,
|
|
86
|
+
caseId,
|
|
87
|
+
runId,
|
|
88
|
+
taskId,
|
|
89
|
+
sourceRevision: SOURCE_REVISION,
|
|
90
|
+
environmentDigest: ENVIRONMENT_DIGEST,
|
|
91
|
+
seed: 649,
|
|
92
|
+
target: { boundary: truth.boundary, componentId: truth.componentId, spanId: truth.spanId },
|
|
93
|
+
parameters: { synthetic: true },
|
|
94
|
+
expectedObservableSignal,
|
|
95
|
+
cleanup: { required: false, state: 'not-required', witness: 'synthetic fixture; no side effects' },
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
/** Frozen, synthetic corpus. Ground truth is never embedded in detectorInput. */
|
|
101
|
+
export function createAgentFaultDiagnosisCorpus() {
|
|
102
|
+
const cases = [];
|
|
103
|
+
FIXTURES.forEach((fixture, index) => {
|
|
104
|
+
const ordinal = String(index + 1).padStart(3, '0');
|
|
105
|
+
const taskId = `task-${ordinal}`;
|
|
106
|
+
const cleanCaseId = `case-${ordinal}-a`;
|
|
107
|
+
const cleanSpans = baseSpans();
|
|
108
|
+
const cleanRaw = trace(`run-${ordinal}-a`, taskId, cleanSpans);
|
|
109
|
+
const cleanView = structured(cleanRaw);
|
|
110
|
+
const cleanTruth = { faultType: 'none', boundary: 'control', componentId: 'workflow', spanId: 'run' };
|
|
111
|
+
cases.push(makeCase(cleanCaseId, `run-${ordinal}-a`, taskId, cleanTruth, cleanSpans));
|
|
112
|
+
const faultySpans = cleanSpans.map((item) => item.spanId === fixture.spanId ? fixture.mutate(item) : item);
|
|
113
|
+
const truth = {
|
|
114
|
+
faultType: fixture.faultType,
|
|
115
|
+
boundary: fixture.boundary,
|
|
116
|
+
componentId: fixture.componentId,
|
|
117
|
+
spanId: fixture.spanId,
|
|
118
|
+
};
|
|
119
|
+
cases.push(makeCase(`case-${ordinal}-b`, `run-${ordinal}-b`, taskId, truth, faultySpans, cleanView, cleanCaseId, fixture.signal));
|
|
120
|
+
});
|
|
121
|
+
const casesDigest = sha256(stable(cases.map(({ caseId, cleanReferenceId, detectorInput, heldOut }) => ({
|
|
122
|
+
caseId, cleanReferenceId, detectorInput, heldOut,
|
|
123
|
+
}))));
|
|
124
|
+
return {
|
|
125
|
+
manifest: {
|
|
126
|
+
schemaVersion: AGENT_FAULT_CORPUS_SCHEMA_VERSION,
|
|
127
|
+
corpusId: `aqe-agent-faults-${casesDigest.slice(0, 16)}`,
|
|
128
|
+
sourceRevision: SOURCE_REVISION,
|
|
129
|
+
harnessRevision: HARNESS_REVISION,
|
|
130
|
+
caseCount: cases.length,
|
|
131
|
+
casesDigest,
|
|
132
|
+
mixedFaults: 'out-of-scope',
|
|
133
|
+
detectorInputExcludes: ['injection manifest', 'ground-truth fault type', 'ground-truth location', 'fixture path'],
|
|
134
|
+
},
|
|
135
|
+
cases,
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
export function serializeDetectorInput(input) {
|
|
139
|
+
return stable(input);
|
|
140
|
+
}
|
|
141
|
+
//# sourceMappingURL=corpus.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { AgentFaultDetector } from './types.js';
|
|
2
|
+
/** A transparent baseline limited to explicit runtime signals. */
|
|
3
|
+
export declare const directSignalBaseline: AgentFaultDetector;
|
|
4
|
+
/**
|
|
5
|
+
* AQE reference-aware diagnosis. It adds paired-output comparison and a policy
|
|
6
|
+
* oracle to the direct-signal baseline; neither source is a hidden fault label.
|
|
7
|
+
*/
|
|
8
|
+
export declare const referenceAwareAqeDetector: AgentFaultDetector;
|
|
9
|
+
/** Negative-control detector used to prove majority-class guessing cannot pass. */
|
|
10
|
+
export declare const majorityFaultDetector: AgentFaultDetector;
|
|
11
|
+
//# sourceMappingURL=detectors.d.ts.map
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
function directSignal(span) {
|
|
2
|
+
if (span.signalCode === 'TOOL_UNAVAILABLE')
|
|
3
|
+
return { faultType: 'tool-unavailable', boundary: 'tool', confidence: 1 };
|
|
4
|
+
if (span.kind === 'tool' && span.status === 'timeout')
|
|
5
|
+
return { faultType: 'tool-timeout', boundary: 'tool', confidence: 1 };
|
|
6
|
+
if (span.signalCode === 'CONTEXT_TRUNCATED')
|
|
7
|
+
return { faultType: 'context-truncation', boundary: 'model-context', confidence: 1 };
|
|
8
|
+
if (span.kind === 'delegation' && span.status === 'timeout')
|
|
9
|
+
return { faultType: 'delegation-timeout', boundary: 'inter-agent', confidence: 1 };
|
|
10
|
+
if (span.kind === 'delegation' && span.intendedDestination !== span.actualDestination) {
|
|
11
|
+
return { faultType: 'agent-misroute', boundary: 'inter-agent', confidence: 1 };
|
|
12
|
+
}
|
|
13
|
+
if (span.kind === 'delegation' && (span.retry ?? 0) >= 3) {
|
|
14
|
+
return { faultType: 'delegation-loop', boundary: 'inter-agent', confidence: 0.95 };
|
|
15
|
+
}
|
|
16
|
+
return undefined;
|
|
17
|
+
}
|
|
18
|
+
function candidate(span, match) {
|
|
19
|
+
return {
|
|
20
|
+
...match,
|
|
21
|
+
componentId: span.componentId,
|
|
22
|
+
spanId: span.spanId,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
/** A transparent baseline limited to explicit runtime signals. */
|
|
26
|
+
export const directSignalBaseline = {
|
|
27
|
+
id: 'direct-signal-v1',
|
|
28
|
+
diagnose(caseId, input) {
|
|
29
|
+
const candidates = input.structured.spans.flatMap((span) => {
|
|
30
|
+
const match = directSignal(span);
|
|
31
|
+
return match ? [candidate(span, match)] : [];
|
|
32
|
+
});
|
|
33
|
+
if (candidates.length > 0)
|
|
34
|
+
return diagnosed(caseId, candidates);
|
|
35
|
+
if (input.cleanReference && input.structured.spans.some((span) => {
|
|
36
|
+
const clean = input.cleanReference?.spans.find((item) => item.spanId === span.spanId);
|
|
37
|
+
return clean?.outputHash !== span.outputHash;
|
|
38
|
+
}))
|
|
39
|
+
return abstained(caseId, 'Output differs from reference but has no direct failure signal');
|
|
40
|
+
if (input.structured.spans.every(isHealthy))
|
|
41
|
+
return healthy(caseId);
|
|
42
|
+
return abstained(caseId, 'No qualified direct signal');
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* AQE reference-aware diagnosis. It adds paired-output comparison and a policy
|
|
47
|
+
* oracle to the direct-signal baseline; neither source is a hidden fault label.
|
|
48
|
+
*/
|
|
49
|
+
export const referenceAwareAqeDetector = {
|
|
50
|
+
id: 'aqe-reference-aware-v1',
|
|
51
|
+
diagnose(caseId, input) {
|
|
52
|
+
const direct = directSignalBaseline.diagnose(caseId, input);
|
|
53
|
+
if (direct.status === 'diagnosed')
|
|
54
|
+
return direct;
|
|
55
|
+
for (const span of input.structured.spans) {
|
|
56
|
+
if (span.kind === 'guardrail' && span.policyRef && span.expectedDecision && span.actualDecision
|
|
57
|
+
&& span.expectedDecision !== span.actualDecision) {
|
|
58
|
+
return diagnosed(caseId, [candidate(span, {
|
|
59
|
+
faultType: 'guardrail-bypass', boundary: 'guardrail', confidence: 1,
|
|
60
|
+
})]);
|
|
61
|
+
}
|
|
62
|
+
if (span.kind === 'tool' && input.cleanReference) {
|
|
63
|
+
const clean = input.cleanReference.spans.find((item) => item.spanId === span.spanId);
|
|
64
|
+
if (clean && clean.outputHash !== span.outputHash) {
|
|
65
|
+
return diagnosed(caseId, [candidate(span, {
|
|
66
|
+
faultType: 'corrupted-tool-output', boundary: 'tool', confidence: 0.9,
|
|
67
|
+
})]);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return direct;
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
/** Negative-control detector used to prove majority-class guessing cannot pass. */
|
|
75
|
+
export const majorityFaultDetector = {
|
|
76
|
+
id: 'always-tool-unavailable',
|
|
77
|
+
diagnose(caseId, input) {
|
|
78
|
+
const span = input.structured.spans.find((item) => item.kind === 'tool') ?? input.structured.spans[0];
|
|
79
|
+
if (!span)
|
|
80
|
+
return { ...abstained(caseId, 'Empty trace'), status: 'parse-error' };
|
|
81
|
+
return diagnosed(caseId, [candidate(span, {
|
|
82
|
+
faultType: 'tool-unavailable', boundary: 'tool', confidence: 1,
|
|
83
|
+
})]);
|
|
84
|
+
},
|
|
85
|
+
};
|
|
86
|
+
function isHealthy(span) {
|
|
87
|
+
return span.status === 'ok'
|
|
88
|
+
&& span.intendedDestination === span.actualDestination
|
|
89
|
+
&& (!(span.expectedDecision && span.actualDecision) || span.expectedDecision === span.actualDecision)
|
|
90
|
+
&& (span.retry ?? 0) < 3;
|
|
91
|
+
}
|
|
92
|
+
function diagnosed(caseId, candidates) {
|
|
93
|
+
return { caseId, status: 'diagnosed', candidates, signalObserved: true, latencyMs: 0 };
|
|
94
|
+
}
|
|
95
|
+
function healthy(caseId) {
|
|
96
|
+
return {
|
|
97
|
+
caseId,
|
|
98
|
+
status: 'diagnosed',
|
|
99
|
+
candidates: [{
|
|
100
|
+
faultType: 'none', boundary: 'control', componentId: 'workflow', spanId: 'run', confidence: 1,
|
|
101
|
+
}],
|
|
102
|
+
signalObserved: false,
|
|
103
|
+
latencyMs: 0,
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
function abstained(caseId, reason) {
|
|
107
|
+
return { caseId, status: 'abstained', candidates: [], signalObserved: false, latencyMs: 0, reason };
|
|
108
|
+
}
|
|
109
|
+
//# sourceMappingURL=detectors.js.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AgentFaultCorpus, AgentFaultDetector, AgentFaultScoreReport } from './types.js';
|
|
2
|
+
export declare function scoreAgentFaultDetector(corpus: AgentFaultCorpus, detector: AgentFaultDetector, topK?: number): AgentFaultScoreReport;
|
|
3
|
+
export interface AgentFaultQualification {
|
|
4
|
+
readonly passed: boolean;
|
|
5
|
+
readonly failures: readonly string[];
|
|
6
|
+
}
|
|
7
|
+
export declare function qualifyAgentFaultDetector(report: AgentFaultScoreReport): AgentFaultQualification;
|
|
8
|
+
//# sourceMappingURL=scorer.d.ts.map
|