@hawkeyexl/manni 4.26.2 → 4.27.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/README.md +1 -1
- package/dist/{batch-4I5S6DXG.js → batch-FXJMZSYY.js} +14 -14
- package/dist/build-5O753VOV.js +37 -0
- package/dist/{calibrate-U4TQAXXD.js → calibrate-RF7YSQMK.js} +15 -15
- package/dist/{capture-ODSHL2XI.js → capture-EKYFKMBB.js} +14 -14
- package/dist/check-4YQUHDAP.js +58 -0
- package/dist/check-CG4UOXP7.js +34 -0
- package/dist/{check-YFLWJUZC.js → check-KI3HYODN.js} +15 -15
- package/dist/check-PWFSARDW.js +31 -0
- package/dist/check-VXTYP4XW.js +58 -0
- package/dist/{chunk-QNXNA2BR.js → chunk-35J3BP37.js} +300 -58
- package/dist/chunk-35J3BP37.js.map +1 -0
- package/dist/{chunk-SIDHDT4X.js → chunk-3G3TETDC.js} +8 -8
- package/dist/{chunk-4X3EH5VC.js → chunk-3VFYCN5N.js} +65 -47
- package/dist/chunk-3VFYCN5N.js.map +1 -0
- package/dist/{chunk-BREAC43H.js → chunk-43VLZO4W.js} +2 -2
- package/dist/{chunk-HJHDYROD.js → chunk-47CLJY6H.js} +4 -4
- package/dist/{chunk-RVATMGUL.js → chunk-4CBACRVT.js} +4 -4
- package/dist/{chunk-UT3CPOGN.js → chunk-4YTYUB77.js} +8 -8
- package/dist/{chunk-QWGAM3T6.js → chunk-5GQ7FF22.js} +3 -3
- package/dist/{chunk-B6YZINES.js → chunk-5UCBYX53.js} +173 -83
- package/dist/chunk-5UCBYX53.js.map +1 -0
- package/dist/{chunk-KHBOMLPS.js → chunk-6RGLJTXE.js} +4 -4
- package/dist/{chunk-KLTGAGB6.js → chunk-74E5D3DP.js} +3 -3
- package/dist/{chunk-UUGTQUKK.js → chunk-7DFAXPO6.js} +64 -11
- package/dist/chunk-7DFAXPO6.js.map +1 -0
- package/dist/{chunk-5KWMVAZZ.js → chunk-7VCMV247.js} +2 -2
- package/dist/{chunk-MC7U5IH4.js → chunk-BCRMMIY5.js} +1 -1
- package/dist/chunk-BCRMMIY5.js.map +1 -0
- package/dist/{chunk-3ZVRGBK6.js → chunk-BTFXOKCP.js} +2 -2
- package/dist/{chunk-4DFLLMIM.js → chunk-C2XLJICN.js} +3 -3
- package/dist/{chunk-JF4BC7ZD.js → chunk-CDX4QK6O.js} +29 -2
- package/dist/chunk-CDX4QK6O.js.map +1 -0
- package/dist/{chunk-PEZP4ZFP.js → chunk-CIGRVU5V.js} +31 -13
- package/dist/chunk-CIGRVU5V.js.map +1 -0
- package/dist/{chunk-K7UVWJJW.js → chunk-CUOJGVVA.js} +15 -7
- package/dist/chunk-CUOJGVVA.js.map +1 -0
- package/dist/{chunk-NTQ73IQL.js → chunk-D7V5MUXP.js} +2 -2
- package/dist/{chunk-NTQ73IQL.js.map → chunk-D7V5MUXP.js.map} +1 -1
- package/dist/{chunk-PX4QZLA2.js → chunk-F4CL337L.js} +3 -3
- package/dist/{chunk-KSDAAJJX.js → chunk-G2SEJDO6.js} +2 -2
- package/dist/{chunk-J7E4XAFG.js → chunk-GEBXLJKQ.js} +32 -22
- package/dist/chunk-GEBXLJKQ.js.map +1 -0
- package/dist/chunk-HMJZHUCJ.js +337 -0
- package/dist/chunk-HMJZHUCJ.js.map +1 -0
- package/dist/{chunk-GXC7SDLO.js → chunk-IHW7N3A6.js} +369 -89
- package/dist/chunk-IHW7N3A6.js.map +1 -0
- package/dist/{chunk-UOZZTK7T.js → chunk-JVWJYB7V.js} +6 -6
- package/dist/{chunk-P6QJPKZ2.js → chunk-K7742NWM.js} +31 -26
- package/dist/chunk-K7742NWM.js.map +1 -0
- package/dist/{chunk-PJ5YJS6L.js → chunk-KPXZZD66.js} +2 -2
- package/dist/{chunk-KLRTOQN4.js → chunk-KQ66NYWY.js} +13 -7
- package/dist/chunk-KQ66NYWY.js.map +1 -0
- package/dist/{chunk-GM5LWEDF.js → chunk-L7QHAAZC.js} +56 -27
- package/dist/chunk-L7QHAAZC.js.map +1 -0
- package/dist/{chunk-BAJ23I2H.js → chunk-LEGD33WJ.js} +14 -7
- package/dist/chunk-LEGD33WJ.js.map +1 -0
- package/dist/{chunk-Z2JBWLRF.js → chunk-M2XDU7QB.js} +9 -9
- package/dist/{chunk-H4JXCWLM.js → chunk-MHVS4LTZ.js} +7 -7
- package/dist/{chunk-7ODOTGU4.js → chunk-MRQTMVJZ.js} +3 -3
- package/dist/{chunk-RV2BYDJK.js → chunk-MZMVTI6Y.js} +24 -14
- package/dist/chunk-MZMVTI6Y.js.map +1 -0
- package/dist/{chunk-MMVT3ZP3.js → chunk-NFQH77XJ.js} +5 -5
- package/dist/{chunk-SHYEKYV4.js → chunk-OBZY2ZLQ.js} +2 -2
- package/dist/{chunk-TI4DA6DF.js → chunk-OPF3NOKF.js} +1 -1
- package/dist/chunk-OPF3NOKF.js.map +1 -0
- package/dist/{chunk-QFEEUI2Z.js → chunk-OVIWWR5N.js} +4 -4
- package/dist/{chunk-THFV3YVO.js → chunk-P3OV32LW.js} +4 -4
- package/dist/{chunk-NZ7RO6ZD.js → chunk-P4HSBQHG.js} +3 -3
- package/dist/{chunk-VNR7BQBZ.js → chunk-P6JCXNMG.js} +52 -4
- package/dist/chunk-P6JCXNMG.js.map +1 -0
- package/dist/{chunk-JDQFU2U6.js → chunk-QXSPGFT3.js} +9 -9
- package/dist/{chunk-BPVO3OED.js → chunk-RCP5V6KE.js} +6 -6
- package/dist/{chunk-P7MGBTY3.js → chunk-RHR64UXW.js} +3 -3
- package/dist/{chunk-A43A335C.js → chunk-RWGHG66G.js} +3 -3
- package/dist/{chunk-HAZQCHO5.js → chunk-S4ADL7Y4.js} +3 -3
- package/dist/{chunk-DPQAF2VR.js → chunk-SDUVH4J2.js} +2 -2
- package/dist/{chunk-LSH6HPKB.js → chunk-SJS6Z7JV.js} +4 -4
- package/dist/{chunk-K4X6GJKG.js → chunk-SJUEUKJD.js} +3 -3
- package/dist/{chunk-YG4GZXSA.js → chunk-TO6N7QVO.js} +2 -2
- package/dist/{chunk-OKLRZM2N.js → chunk-TXIZMTCQ.js} +5 -5
- package/dist/{chunk-LHFO4HF7.js → chunk-UGQPOFLW.js} +7 -7
- package/dist/{chunk-SJI7C7FY.js → chunk-VCJ6ZJDW.js} +14 -14
- package/dist/{chunk-EXCYL3S7.js → chunk-VH3X7GHC.js} +2 -2
- package/dist/{chunk-VDEE7AUI.js → chunk-VKIIG6DZ.js} +2 -2
- package/dist/{chunk-LURF4MTH.js → chunk-VPNKSEQU.js} +3 -3
- package/dist/{chunk-PWLUQLFH.js → chunk-W4RCGOLJ.js} +7 -7
- package/dist/{chunk-GCJPYCOV.js → chunk-WOCG36UV.js} +4 -4
- package/dist/{chunk-ZR33AQFW.js → chunk-XK3T6MKU.js} +10 -8
- package/dist/chunk-XK3T6MKU.js.map +1 -0
- package/dist/{chunk-A6LHTTNO.js → chunk-XOKLYJJT.js} +21 -12
- package/dist/chunk-XOKLYJJT.js.map +1 -0
- package/dist/{chunk-M6RB342K.js → chunk-YTW7A62V.js} +2 -2
- package/dist/{chunk-4IM6A2WK.js → chunk-YWJ453BG.js} +6 -6
- package/dist/{chunk-RZ65VMRW.js → chunk-ZBN2HEC2.js} +10 -10
- package/dist/{chunk-DGN4VVFG.js → chunk-ZMEDAKMB.js} +3 -3
- package/dist/{chunk-NXP3DG4L.js → chunk-ZMGME5NG.js} +4 -4
- package/dist/{chunk-XD4Z26HJ.js → chunk-ZMWQZF3F.js} +3 -3
- package/dist/{chunk-G5I2JTDK.js → chunk-ZWVYT2G6.js} +2 -2
- package/dist/{chunk-D4BGNAN5.js → chunk-ZZGHTXZ2.js} +159 -23
- package/dist/chunk-ZZGHTXZ2.js.map +1 -0
- package/dist/{cli-XM4F6ZC7.js → cli-545YXHOS.js} +26 -25
- package/dist/{cli-XM4F6ZC7.js.map → cli-545YXHOS.js.map} +1 -1
- package/dist/{cli-DKRISKSR.js → cli-6EPISRJR.js} +21 -21
- package/dist/{cli-WWNQFDMK.js → cli-6LJS32R2.js} +3 -3
- package/dist/{cli-RO4TNFXJ.js → cli-6N2VRKCW.js} +16 -15
- package/dist/{cli-RO4TNFXJ.js.map → cli-6N2VRKCW.js.map} +1 -1
- package/dist/{cli-SDW7JOTO.js → cli-6SDS7T2Q.js} +56 -55
- package/dist/{cli-SDW7JOTO.js.map → cli-6SDS7T2Q.js.map} +1 -1
- package/dist/{cli-3VAVQYQT.js → cli-DCGA5IQ4.js} +24 -42
- package/dist/cli-DCGA5IQ4.js.map +1 -0
- package/dist/{cli-AR6TOW7M.js → cli-E6JIYSKY.js} +20 -19
- package/dist/{cli-AR6TOW7M.js.map → cli-E6JIYSKY.js.map} +1 -1
- package/dist/{cli-CFDGH5HD.js → cli-K4SDAECI.js} +30 -29
- package/dist/{cli-CFDGH5HD.js.map → cli-K4SDAECI.js.map} +1 -1
- package/dist/{cli-6DOYYCTT.js → cli-KINREG4W.js} +29 -28
- package/dist/{cli-6DOYYCTT.js.map → cli-KINREG4W.js.map} +1 -1
- package/dist/{cli-7IPP6ZTQ.js → cli-XUWY3QTT.js} +37 -36
- package/dist/{cli-7IPP6ZTQ.js.map → cli-XUWY3QTT.js.map} +1 -1
- package/dist/{cli-C2OATF3N.js → cli-ZTYRATHT.js} +8 -8
- package/dist/cli.js +15 -15
- package/dist/{config-2YJPJ36T.js → config-Z3FYLJ6X.js} +3 -3
- package/dist/docmeta.js +7 -7
- package/dist/github-GW6UZTRR.js +29 -0
- package/dist/{github-GU23WNCU.js → github-IT66VVCM.js} +15 -14
- package/dist/github-UJTQPG6S.js +49 -0
- package/dist/index.d.ts +165 -6
- package/dist/index.js +55 -54
- package/dist/index.js.map +1 -1
- package/dist/{json-P4EDSVIC.js → json-KKNQHTAA.js} +13 -12
- package/dist/{json-YIZON5LE.js → json-X4XGVPXV.js} +16 -15
- package/dist/{labels-6RROJOYQ.js → labels-7UD5VT2S.js} +12 -11
- package/dist/{labels-6RROJOYQ.js.map → labels-7UD5VT2S.js.map} +1 -1
- package/dist/lint-L7QTMCCV.js +33 -0
- package/dist/list-R34MHZWK.js +31 -0
- package/dist/list-S6LJENZ3.js +49 -0
- package/dist/{list-UARFGS7C.js → list-URXKGZ5I.js} +15 -14
- package/dist/{page-JADAILE3.js → page-2H44PTPE.js} +10 -10
- package/dist/{prepare-B24HTUCX.js → prepare-ND2INKAJ.js} +13 -13
- package/dist/{pretty-XAMSAKAR.js → pretty-54GDW63J.js} +15 -14
- package/dist/{pretty-NHNYY7CP.js → pretty-BW6SLRBO.js} +25 -24
- package/dist/{pretty-5V3PWJ6L.js → pretty-ZVAM3XV6.js} +13 -12
- package/dist/{reporters-HTJKW7NG.js → reporters-6P74QNVX.js} +5 -5
- package/dist/{reporters-ULSSBAAG.js → reporters-LON6K3EN.js} +12 -12
- package/dist/run-KLO35LDY.js +52 -0
- package/dist/{sarif-LBODGUNE.js → sarif-2HOXOFAZ.js} +9 -9
- package/dist/sarif-DM5XJGBX.js +50 -0
- package/dist/{sarif-SOA76ESJ.js → sarif-WXGSULXG.js} +11 -11
- package/dist/{strategy-XI7QTY7T.js → strategy-FOZDCVLS.js} +22 -21
- package/dist/{term-UIBQBGMR.js → term-CAPJSZ6V.js} +19 -18
- package/dist/{term-UIBQBGMR.js.map → term-CAPJSZ6V.js.map} +1 -1
- package/dist/{validate-X257AMWS.js → validate-LSB6TBY6.js} +5 -5
- package/package.json +1 -1
- package/plugin/manni/.claude-plugin/plugin.json +1 -1
- package/plugin/manni/hooks/page-metadata.mjs +1 -1
- package/dist/build-OPWHXPXE.js +0 -36
- package/dist/check-4VOOUC5E.js +0 -33
- package/dist/check-M3ORYGTW.js +0 -57
- package/dist/check-QJ35SM3K.js +0 -57
- package/dist/check-UXS5LVFJ.js +0 -30
- package/dist/chunk-4X3EH5VC.js.map +0 -1
- package/dist/chunk-A6LHTTNO.js.map +0 -1
- package/dist/chunk-B6YZINES.js.map +0 -1
- package/dist/chunk-BAJ23I2H.js.map +0 -1
- package/dist/chunk-D4BGNAN5.js.map +0 -1
- package/dist/chunk-GM5LWEDF.js.map +0 -1
- package/dist/chunk-GXC7SDLO.js.map +0 -1
- package/dist/chunk-J7E4XAFG.js.map +0 -1
- package/dist/chunk-JF4BC7ZD.js.map +0 -1
- package/dist/chunk-K7UVWJJW.js.map +0 -1
- package/dist/chunk-KLRTOQN4.js.map +0 -1
- package/dist/chunk-MC7U5IH4.js.map +0 -1
- package/dist/chunk-P6QJPKZ2.js.map +0 -1
- package/dist/chunk-PEZP4ZFP.js.map +0 -1
- package/dist/chunk-QNXNA2BR.js.map +0 -1
- package/dist/chunk-RV2BYDJK.js.map +0 -1
- package/dist/chunk-TI4DA6DF.js.map +0 -1
- package/dist/chunk-UUGTQUKK.js.map +0 -1
- package/dist/chunk-VNR7BQBZ.js.map +0 -1
- package/dist/chunk-ZR33AQFW.js.map +0 -1
- package/dist/cli-3VAVQYQT.js.map +0 -1
- package/dist/github-RPHQGICU.js +0 -48
- package/dist/github-VKUOQE77.js +0 -28
- package/dist/lint-VXM7UKPY.js +0 -32
- package/dist/list-2Y7AM5BW.js +0 -30
- package/dist/list-ILJJM7EL.js +0 -48
- package/dist/run-EVPJ7SDL.js +0 -51
- package/dist/sarif-3PHFVX7D.js +0 -49
- /package/dist/{batch-4I5S6DXG.js.map → batch-FXJMZSYY.js.map} +0 -0
- /package/dist/{build-OPWHXPXE.js.map → build-5O753VOV.js.map} +0 -0
- /package/dist/{calibrate-U4TQAXXD.js.map → calibrate-RF7YSQMK.js.map} +0 -0
- /package/dist/{capture-ODSHL2XI.js.map → capture-EKYFKMBB.js.map} +0 -0
- /package/dist/{check-4VOOUC5E.js.map → check-4YQUHDAP.js.map} +0 -0
- /package/dist/{check-M3ORYGTW.js.map → check-CG4UOXP7.js.map} +0 -0
- /package/dist/{check-YFLWJUZC.js.map → check-KI3HYODN.js.map} +0 -0
- /package/dist/{check-QJ35SM3K.js.map → check-PWFSARDW.js.map} +0 -0
- /package/dist/{check-UXS5LVFJ.js.map → check-VXTYP4XW.js.map} +0 -0
- /package/dist/{chunk-SIDHDT4X.js.map → chunk-3G3TETDC.js.map} +0 -0
- /package/dist/{chunk-BREAC43H.js.map → chunk-43VLZO4W.js.map} +0 -0
- /package/dist/{chunk-HJHDYROD.js.map → chunk-47CLJY6H.js.map} +0 -0
- /package/dist/{chunk-RVATMGUL.js.map → chunk-4CBACRVT.js.map} +0 -0
- /package/dist/{chunk-UT3CPOGN.js.map → chunk-4YTYUB77.js.map} +0 -0
- /package/dist/{chunk-QWGAM3T6.js.map → chunk-5GQ7FF22.js.map} +0 -0
- /package/dist/{chunk-KHBOMLPS.js.map → chunk-6RGLJTXE.js.map} +0 -0
- /package/dist/{chunk-KLTGAGB6.js.map → chunk-74E5D3DP.js.map} +0 -0
- /package/dist/{chunk-5KWMVAZZ.js.map → chunk-7VCMV247.js.map} +0 -0
- /package/dist/{chunk-3ZVRGBK6.js.map → chunk-BTFXOKCP.js.map} +0 -0
- /package/dist/{chunk-4DFLLMIM.js.map → chunk-C2XLJICN.js.map} +0 -0
- /package/dist/{chunk-PX4QZLA2.js.map → chunk-F4CL337L.js.map} +0 -0
- /package/dist/{chunk-KSDAAJJX.js.map → chunk-G2SEJDO6.js.map} +0 -0
- /package/dist/{chunk-UOZZTK7T.js.map → chunk-JVWJYB7V.js.map} +0 -0
- /package/dist/{chunk-PJ5YJS6L.js.map → chunk-KPXZZD66.js.map} +0 -0
- /package/dist/{chunk-Z2JBWLRF.js.map → chunk-M2XDU7QB.js.map} +0 -0
- /package/dist/{chunk-H4JXCWLM.js.map → chunk-MHVS4LTZ.js.map} +0 -0
- /package/dist/{chunk-7ODOTGU4.js.map → chunk-MRQTMVJZ.js.map} +0 -0
- /package/dist/{chunk-MMVT3ZP3.js.map → chunk-NFQH77XJ.js.map} +0 -0
- /package/dist/{chunk-SHYEKYV4.js.map → chunk-OBZY2ZLQ.js.map} +0 -0
- /package/dist/{chunk-QFEEUI2Z.js.map → chunk-OVIWWR5N.js.map} +0 -0
- /package/dist/{chunk-THFV3YVO.js.map → chunk-P3OV32LW.js.map} +0 -0
- /package/dist/{chunk-NZ7RO6ZD.js.map → chunk-P4HSBQHG.js.map} +0 -0
- /package/dist/{chunk-JDQFU2U6.js.map → chunk-QXSPGFT3.js.map} +0 -0
- /package/dist/{chunk-BPVO3OED.js.map → chunk-RCP5V6KE.js.map} +0 -0
- /package/dist/{chunk-P7MGBTY3.js.map → chunk-RHR64UXW.js.map} +0 -0
- /package/dist/{chunk-A43A335C.js.map → chunk-RWGHG66G.js.map} +0 -0
- /package/dist/{chunk-HAZQCHO5.js.map → chunk-S4ADL7Y4.js.map} +0 -0
- /package/dist/{chunk-DPQAF2VR.js.map → chunk-SDUVH4J2.js.map} +0 -0
- /package/dist/{chunk-LSH6HPKB.js.map → chunk-SJS6Z7JV.js.map} +0 -0
- /package/dist/{chunk-K4X6GJKG.js.map → chunk-SJUEUKJD.js.map} +0 -0
- /package/dist/{chunk-YG4GZXSA.js.map → chunk-TO6N7QVO.js.map} +0 -0
- /package/dist/{chunk-OKLRZM2N.js.map → chunk-TXIZMTCQ.js.map} +0 -0
- /package/dist/{chunk-LHFO4HF7.js.map → chunk-UGQPOFLW.js.map} +0 -0
- /package/dist/{chunk-SJI7C7FY.js.map → chunk-VCJ6ZJDW.js.map} +0 -0
- /package/dist/{chunk-EXCYL3S7.js.map → chunk-VH3X7GHC.js.map} +0 -0
- /package/dist/{chunk-VDEE7AUI.js.map → chunk-VKIIG6DZ.js.map} +0 -0
- /package/dist/{chunk-LURF4MTH.js.map → chunk-VPNKSEQU.js.map} +0 -0
- /package/dist/{chunk-PWLUQLFH.js.map → chunk-W4RCGOLJ.js.map} +0 -0
- /package/dist/{chunk-GCJPYCOV.js.map → chunk-WOCG36UV.js.map} +0 -0
- /package/dist/{chunk-M6RB342K.js.map → chunk-YTW7A62V.js.map} +0 -0
- /package/dist/{chunk-4IM6A2WK.js.map → chunk-YWJ453BG.js.map} +0 -0
- /package/dist/{chunk-RZ65VMRW.js.map → chunk-ZBN2HEC2.js.map} +0 -0
- /package/dist/{chunk-DGN4VVFG.js.map → chunk-ZMEDAKMB.js.map} +0 -0
- /package/dist/{chunk-NXP3DG4L.js.map → chunk-ZMGME5NG.js.map} +0 -0
- /package/dist/{chunk-XD4Z26HJ.js.map → chunk-ZMWQZF3F.js.map} +0 -0
- /package/dist/{chunk-G5I2JTDK.js.map → chunk-ZWVYT2G6.js.map} +0 -0
- /package/dist/{cli-DKRISKSR.js.map → cli-6EPISRJR.js.map} +0 -0
- /package/dist/{cli-WWNQFDMK.js.map → cli-6LJS32R2.js.map} +0 -0
- /package/dist/{cli-C2OATF3N.js.map → cli-ZTYRATHT.js.map} +0 -0
- /package/dist/{config-2YJPJ36T.js.map → config-Z3FYLJ6X.js.map} +0 -0
- /package/dist/{github-GU23WNCU.js.map → github-GW6UZTRR.js.map} +0 -0
- /package/dist/{github-RPHQGICU.js.map → github-IT66VVCM.js.map} +0 -0
- /package/dist/{github-VKUOQE77.js.map → github-UJTQPG6S.js.map} +0 -0
- /package/dist/{json-P4EDSVIC.js.map → json-KKNQHTAA.js.map} +0 -0
- /package/dist/{json-YIZON5LE.js.map → json-X4XGVPXV.js.map} +0 -0
- /package/dist/{lint-VXM7UKPY.js.map → lint-L7QTMCCV.js.map} +0 -0
- /package/dist/{list-2Y7AM5BW.js.map → list-R34MHZWK.js.map} +0 -0
- /package/dist/{list-ILJJM7EL.js.map → list-S6LJENZ3.js.map} +0 -0
- /package/dist/{list-UARFGS7C.js.map → list-URXKGZ5I.js.map} +0 -0
- /package/dist/{page-JADAILE3.js.map → page-2H44PTPE.js.map} +0 -0
- /package/dist/{prepare-B24HTUCX.js.map → prepare-ND2INKAJ.js.map} +0 -0
- /package/dist/{pretty-5V3PWJ6L.js.map → pretty-54GDW63J.js.map} +0 -0
- /package/dist/{pretty-NHNYY7CP.js.map → pretty-BW6SLRBO.js.map} +0 -0
- /package/dist/{pretty-XAMSAKAR.js.map → pretty-ZVAM3XV6.js.map} +0 -0
- /package/dist/{reporters-HTJKW7NG.js.map → reporters-6P74QNVX.js.map} +0 -0
- /package/dist/{reporters-ULSSBAAG.js.map → reporters-LON6K3EN.js.map} +0 -0
- /package/dist/{run-EVPJ7SDL.js.map → run-KLO35LDY.js.map} +0 -0
- /package/dist/{sarif-3PHFVX7D.js.map → sarif-2HOXOFAZ.js.map} +0 -0
- /package/dist/{sarif-LBODGUNE.js.map → sarif-DM5XJGBX.js.map} +0 -0
- /package/dist/{sarif-SOA76ESJ.js.map → sarif-WXGSULXG.js.map} +0 -0
- /package/dist/{strategy-XI7QTY7T.js.map → strategy-FOZDCVLS.js.map} +0 -0
- /package/dist/{validate-X257AMWS.js.map → validate-LSB6TBY6.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/docevals/cli.ts"],"sourcesContent":["/**\n * The docevals program. Named `docevals` because that is where it is mounted\n * (`manni docevals …`); `src/cli.ts` adds it to the umbrella and runs it.\n */\nimport { Command } from \"commander\";\nimport pkg from \"../../package.json\" with { type: \"json\" };\nimport { fail } from \"../shared/run.js\";\nimport { notice } from \"../shared/warn.js\";\nimport { terminalConfirm } from \"../shared/prompt.js\";\nimport { collect, configOption } from \"../shared/cli-options.js\";\nimport { LOCAL_FLAG_HELP } from \"../shared/providers.js\";\nimport type { DocumentInputOptions } from \"./core/discover.js\";\nimport { colorFor, palette } from \"../shared/color.js\";\nimport { DocevalsError } from \"./types.js\";\nimport { allowExecutionMessage, isExecutionGrant } from \"../shared/execution.js\";\nimport { runList, renderList } from \"./commands/list.js\";\nimport { runRun } from \"./commands/run.js\";\nimport { runGenerate } from \"./commands/generate.js\";\nimport { runFill, renderFill } from \"./commands/fill.js\";\nimport { runPromote } from \"./commands/promote.js\";\nimport { listReviews, renderReviews, runReview } from \"./commands/review.js\";\nimport {\n runCalibrate,\n renderCalibration,\n seedGoldenCases,\n} from \"./commands/calibrate.js\";\nimport { runInit } from \"./commands/init.js\";\nimport {\n render,\n parseFormat,\n REPORT_FORMATS,\n SUMMARY_FORMATS,\n type ReportFormat,\n type SummaryFormat,\n} from \"./reporters/index.js\";\n\n/**\n * Whether `command`'s output gets colour: the family's rule, read off this\n * domain's `--no-color`. Exported for the tests that pin it.\n */\nexport { colorFor };\n\nexport function buildProgram(): Command {\n const program = new Command();\n\n program\n .name(\"docevals\")\n .description(\n \"Deterministic and LLM-as-judge evals for documentation pages, driven by frontmatter.\",\n )\n .version(pkg.version)\n .option(\"--no-color\", \"disable colored output\")\n // A pointer, not the whole help screen: the message that precedes it\n // already names the offending flag.\n .showHelpAfterError(\"(add --help for usage)\")\n // MUST come before the `.command()` calls below. `copyInheritedSettings`\n // copies `_exitCallback` by value at subcommand-creation time, so an\n // `exitOverride()` installed afterwards leaves every subcommand calling\n // `process.exit(1)` on a parse error, which is a usage error owed exit 2.\n .exitOverride();\n\n /**\n * Repeatable execution grant, validated on the way in.\n *\n * An unknown value is a usage error rather than a silent no-op (ADR 01007, the\n * same rule `--format` follows): a mistyped grant that quietly granted nothing\n * would skip every command eval and still exit 0, which reads as \"the corpus\n * is clean\" rather than \"you misspelled a flag\".\n */\n function collectGrant(value: string, previous: string[]): string[] {\n if (!isExecutionGrant(value)) {\n fail(new DocevalsError(allowExecutionMessage(value)));\n }\n return [...previous, value];\n }\n\n function parseIntArg(name: string) {\n return (value: string): number => {\n const n = Number.parseInt(value, 10);\n if (Number.isNaN(n) || n < 1) {\n fail(new DocevalsError(`${name} must be a positive integer, got \"${value}\"`));\n }\n return n;\n };\n }\n\n /**\n * Repeatable single-value option, e.g. `--eval a --eval b`.\n *\n * NOT commander's variadic `<name...>`: a variadic consumes every following\n * non-option token, so `run --eval fresh-enough docs/guide.md` parsed the glob\n * as a second eval name and left `globs` empty — silently widening the run to\n * the whole configured corpus, which is the opposite of what selection is for.\n */\n function collectArg(value: string, previous: string[]): string[] {\n return [...previous, value];\n }\n\n function parseFloatArg(name: string) {\n return (value: string): number => {\n const n = Number.parseFloat(value);\n if (Number.isNaN(n) || n < 0) {\n fail(new DocevalsError(`${name} must be a non-negative number, got \"${value}\"`));\n }\n return n;\n };\n }\n\n /**\n * Commander argument parser for `-f/--format` (ADR 01007). Routes through\n * `fail()` for the same reason the numeric parsers do: commander only special-\n * cases InvalidArgumentError, so any other exception escapes `program.parse()`\n * uncaught — a stack trace and exit 1, when a bad flag owes exit 2.\n */\n function parseFormatArg<T extends string>(name: string, allowed: readonly T[]) {\n return (value: string): T => {\n try {\n return parseFormat(value, allowed, name);\n } catch (e) {\n fail(e);\n }\n };\n }\n\n /**\n * The document-set surface every verb that reads pages shares (proposal\n * 0041): positional `[paths...]`, `--collection` and `--exclude` (each one\n * value per occurrence), and `-c`/`--no-config`. Declared once so the five\n * verbs cannot drift apart on a name or a description.\n */\n function documentInputs(command: Command, verb: string): Command {\n return command\n .argument(\n \"[paths...]\",\n `Files, directories, or globs to ${verb} (default: the configured collections)`,\n )\n .option(\n \"--collection <name>\",\n \"Configured collection to read (repeatable)\",\n collect,\n [],\n )\n .option(\"--exclude <glob>\", \"Glob to exclude (repeatable)\", collect, [])\n .option(\"-c, --config <path>\", \"Path to manni.config.yaml\")\n .option(\"--no-config\", \"Ignore any discovered config file\");\n }\n\n /** The shared options as the command cores take them. */\n function documentOptions(opts: {\n collection?: string[];\n exclude?: string[];\n config?: string | boolean;\n }): DocumentInputOptions {\n const { configPath, noConfig } = configOption(opts.config);\n return {\n ...(configPath === undefined ? {} : { config: configPath }),\n ...(noConfig === true ? { noConfig } : {}),\n ...(opts.collection === undefined ? {} : { collection: opts.collection }),\n ...(opts.exclude === undefined ? {} : { exclude: opts.exclude }),\n };\n }\n\n documentInputs(\n program\n .command(\"list\")\n .description(\"Show the resolved eval plan per page without running anything\"),\n \"list\",\n )\n .option(\n \"-f, --format <format>\",\n `Output format: ${SUMMARY_FORMATS.join(\" | \")}`,\n parseFormatArg(\"--format\", SUMMARY_FORMATS),\n \"pretty\" as SummaryFormat,\n )\n .option(\"--eval <name>\", \"Show only this eval (repeatable)\", collectArg, [])\n .option(\"--suite <name>\", \"Show only evals in this suite\")\n .action(\n async (\n paths: string[],\n opts: {\n config?: string | boolean;\n collection?: string[];\n exclude?: string[];\n format: SummaryFormat;\n eval?: string[];\n suite?: string;\n },\n command: Command,\n ) => {\n try {\n const run = await runList(paths, {\n ...documentOptions(opts),\n format: opts.format,\n evalNames: opts.eval,\n suite: opts.suite,\n });\n console.log(\n renderList(run, opts.format, {\n color: colorFor(command, process.stdout.isTTY),\n }),\n );\n process.exitCode = run.exitCode;\n } catch (e) {\n fail(e);\n }\n });\n\n documentInputs(\n program.command(\"run\").description(\"Run evals against documentation pages\"),\n \"evaluate\",\n )\n .option(\n \"-f, --format <format>\",\n `Output format: ${REPORT_FORMATS.join(\" | \")}`,\n parseFormatArg(\"--format\", REPORT_FORMATS),\n \"pretty\" as ReportFormat,\n )\n .option(\"--deterministic-only\", \"Run only command/tool graders, skip the AI judge\")\n .option(\"--ai-only\", \"Run only AI-judged evals, skip deterministic graders\")\n .option(\n // `<kind>`, not `<kind...>`: a variadic option greedily eats the\n // positional `[paths...]` that follow it, so `--allow-execution\n // frontmatter-commands docs/**` would silently swallow the glob and run\n // over the default file set instead. Repeat the flag to grant twice.\n \"--allow-execution <kind>\",\n \"Run only these execution grants (repeatable): frontmatter-commands\",\n collectGrant,\n [],\n )\n .option(\"--no-execution\", \"Clear every execution grant for this run\")\n .option(\"--no-generate\", \"Do not generate scripts for command evals missing a command\")\n .option(\"--no-cache\", \"Bypass the judge response cache\")\n .option(\"--fail-on-review\", \"Exit 1 when any eval lands in the human-review zone\")\n .option(\"--provider <name>\", \"Judge provider: auto (default) | anthropic | openai | claude-cli | llama-cpp\")\n .option(\"--model <model>\", \"Model override; needs a named provider, from here or config\")\n .option(\"--local\", LOCAL_FLAG_HELP)\n .option(\"--runs <n>\", \"Ensemble runs per eval\", parseIntArg(\"--runs\"))\n .option(\n \"--chunk-chars <n>\",\n \"Characters of page per judge call; longer pages are read in parts\",\n parseIntArg(\"--chunk-chars\"),\n )\n .option(\n \"--eval <name>\",\n \"Run only this eval (repeatable); suite targets are not evaluated on a filtered run\",\n collectArg,\n [],\n )\n .option(\"--suite <name>\", \"Run only evals in this suite\")\n .option(\n \"--since <ref>\",\n \"Evaluate only pages whose file or eval manifest changed between this git ref and HEAD, \" +\n \"or whose persona record did when an eval reads the page as its personas\",\n )\n .option(\n \"--newer-than <duration>\",\n \"Evaluate only pages whose file or eval manifest changed within this window, \" +\n \"such as 30m, 24h, 7d or 2w, or whose persona record did when an eval reads the page \" +\n \"as its personas; in CI, prefer --since\",\n )\n .option(\n \"--max-turns <n>\",\n \"Stop after this many ensemble runs (a cached ensemble costs none)\",\n parseIntArg(\"--max-turns\"),\n )\n .option(\n \"--baseline [path]\",\n \"Fail only on findings a recorded baseline does not already hold\",\n )\n .option(\"--no-baseline\", \"Ignore the configured baseline for this run\")\n .option(\n \"--write-baseline [path]\",\n \"Record this run's findings as the baseline; without a path, the configured one\",\n )\n .action(async (paths: string[], opts: Record<string, unknown>, command: Command) => {\n try {\n const report = await runRun(paths, {\n ...documentOptions({\n config: opts.config as string | boolean | undefined,\n collection: opts.collection as string[] | undefined,\n exclude: opts.exclude as string[] | undefined,\n }),\n // parseFormatArg validated this at parse time; the cast only re-narrows\n // from the `unknown` that the Record-typed options bag erases it to.\n format: opts.format as ReportFormat,\n deterministicOnly: opts.deterministicOnly as boolean | undefined,\n aiOnly: opts.aiOnly as boolean | undefined,\n // Commander's default is `[]`, which is \"no flag\", not \"run nothing\":\n // only a list someone typed narrows the run.\n allowExecution:\n (opts.allowExecution as string[]).length > 0\n ? (opts.allowExecution as string[])\n : undefined,\n execution: opts.execution as boolean | undefined,\n generate: opts.generate as boolean | undefined,\n cache: opts.cache as boolean | undefined,\n failOnReview: opts.failOnReview as boolean | undefined,\n provider: opts.provider as string | undefined,\n model: opts.model as string | undefined,\n local: opts.local as boolean | undefined,\n runs: opts.runs as number | undefined,\n chunkChars: opts.chunkChars as number | undefined,\n maxTurns: opts.maxTurns as number | undefined,\n evalNames: opts.eval as string[] | undefined,\n suite: opts.suite as string | undefined,\n since: opts.since as string | undefined,\n newerThan: opts.newerThan as string | undefined,\n // commander collapses `--baseline` to true and `--no-baseline` to\n // false on the same key; a string is an explicit path.\n baseline: opts.baseline as string | boolean | undefined,\n writeBaseline: opts.writeBaseline as string | boolean | undefined,\n toolVersion: pkg.version,\n });\n console.log(\n render(report, opts.format as ReportFormat, {\n color: colorFor(command, process.stdout.isTTY),\n }),\n );\n process.exitCode = report.exitCode;\n } catch (e) {\n fail(e);\n }\n });\n\n documentInputs(\n program\n .command(\"generate\")\n .description(\n \"Generate check scripts for command evals with a plain-language assertion but no command\",\n ),\n \"read\",\n )\n .option(\"--provider <name>\", \"Provider: auto (default) | anthropic | openai | claude-cli | llama-cpp\")\n .option(\"--model <model>\", \"Model override; needs a named provider, from here or config\")\n .option(\"--local\", LOCAL_FLAG_HELP)\n .action(\n async (\n paths: string[],\n opts: {\n config?: string | boolean;\n collection?: string[];\n exclude?: string[];\n provider?: string;\n model?: string;\n local?: boolean;\n },\n command: Command,\n ) => {\n try {\n const pc = palette(colorFor(command, process.stdout.isTTY));\n const result = await runGenerate(paths, {\n ...documentOptions(opts),\n provider: opts.provider,\n model: opts.model,\n local: opts.local,\n });\n if (result.targets === 0) {\n console.log(\"Nothing to generate — every command eval has a command.\");\n return;\n }\n console.log(\n `Generated ${result.generatedPaths.length}/${result.targets} check script(s):`,\n );\n for (const p of result.generatedPaths) console.log(` ${p}`);\n // Evals whose command reference had nowhere to go (proposal 0047).\n for (const r of result.refusals) console.log(pc.red(` ${r.message}`));\n if (result.generatedPaths.length < result.targets) {\n process.exitCode = 1;\n }\n } catch (e) {\n fail(e);\n }\n },\n );\n\n documentInputs(\n program\n .command(\"fill\")\n .description(\n \"Propose frontmatter evals for pages with an LLM; writes proposals at or above the confidence threshold\",\n ),\n \"fill\",\n )\n .option(\n \"-f, --format <format>\",\n `Output format: ${SUMMARY_FORMATS.join(\" | \")}`,\n parseFormatArg(\"--format\", SUMMARY_FORMATS),\n \"pretty\" as SummaryFormat,\n )\n .option(\"--dry-run\", \"Report proposals without writing frontmatter\")\n .option(\n \"--confidence <n>\",\n \"Minimum confidence to write (0-1, default: config fill.confidenceThreshold)\",\n parseFloatArg(\"--confidence\"),\n )\n .option(\n \"--max-turns <n>\",\n \"Stop after this many inference calls (a cached page costs none)\",\n parseIntArg(\"--max-turns\"),\n )\n .option(\"--no-cache\", \"Bypass the fill proposal cache\")\n .option(\n \"--chunk-chars <n>\",\n \"Characters of page per fill call; longer pages are proposed in parts\",\n parseIntArg(\"--chunk-chars\"),\n )\n .option(\"--provider <name>\", \"Provider: auto (default) | anthropic | openai | claude-cli | llama-cpp\")\n .option(\"--model <model>\", \"Model override; needs a named provider, from here or config\")\n .option(\"--local\", LOCAL_FLAG_HELP)\n .action(async (paths: string[], opts: Record<string, unknown>, command: Command) => {\n try {\n const confidence = opts.confidence as number | undefined;\n if (confidence !== undefined && confidence > 1) {\n fail(new DocevalsError(`--confidence must be between 0 and 1, got ${confidence}`));\n }\n const report = await runFill(paths, {\n ...documentOptions({\n config: opts.config as string | boolean | undefined,\n collection: opts.collection as string[] | undefined,\n exclude: opts.exclude as string[] | undefined,\n }),\n dryRun: opts.dryRun as boolean | undefined,\n confidence,\n maxTurns: opts.maxTurns as number | undefined,\n noCache: opts.cache === false ? true : undefined,\n provider: opts.provider as string | undefined,\n model: opts.model as string | undefined,\n local: opts.local as boolean | undefined,\n // P1 (proposal 0047): offered only on a terminal, where there is\n // someone to answer. Off one the evals go to the page and the W1\n // line says so.\n confirm: terminalConfirm(),\n onNotice: notice,\n onRelocated: (result) => {\n const manifests = result.manifests.map((m) => m.file).join(\", \");\n notice(\n `moved ${String(result.summary.moved)} value(s) into ${manifests}.`,\n );\n },\n });\n // As in `run`: parseFormatArg validated this at parse time, and the cast\n // only re-narrows from the `unknown` the Record-typed options bag erases\n // it to. renderFill guards itself regardless.\n console.log(\n renderFill(report, opts.format as SummaryFormat, {\n color: colorFor(command, process.stdout.isTTY),\n }),\n );\n process.exitCode = report.exitCode;\n } catch (e) {\n fail(e);\n }\n });\n\n documentInputs(\n program\n .command(\"promote\")\n .description(\n \"Find ai-graded evals expressible as deterministic checks; --write converts them\",\n ),\n \"read\",\n )\n .option(\"--write\", \"Apply promotions (write scripts and rewrite evals)\")\n .option(\"--provider <name>\", \"Provider: auto (default) | anthropic | openai | claude-cli | llama-cpp\")\n .option(\"--model <model>\", \"Model override; needs a named provider, from here or config\")\n .option(\"--local\", LOCAL_FLAG_HELP)\n .action(\n async (\n paths: string[],\n opts: {\n config?: string | boolean;\n collection?: string[];\n exclude?: string[];\n write?: boolean;\n provider?: string;\n model?: string;\n local?: boolean;\n },\n command: Command,\n ) => {\n try {\n const pc = palette(colorFor(command, process.stdout.isTTY));\n const proposals = await runPromote(paths, {\n ...documentOptions(opts),\n write: opts.write,\n provider: opts.provider,\n model: opts.model,\n local: opts.local,\n });\n if (proposals.length === 0) {\n console.log(\"No ai-graded evals found.\");\n return;\n }\n for (const p of proposals) {\n const tag = p.promotable\n ? p.applied\n ? pc.green(\"promoted\")\n : pc.cyan(\"promotable\")\n : pc.dim(\"keep-ai\");\n const script = p.scriptPath ? pc.dim(` -> ${p.scriptPath}`) : \"\";\n console.log(`${tag} ${p.evalName} (${p.source}, ${p.file})${script}`);\n console.log(pc.dim(` ${p.rationale}`));\n // Promotable, and nowhere to write it (proposal 0047).\n if (p.error !== undefined) console.log(pc.red(` ${p.error}`));\n }\n if (!opts.write && proposals.some((p) => p.promotable)) {\n console.log(pc.cyan(\"\\nRe-run with --write to apply promotions.\"));\n }\n } catch (e) {\n fail(e);\n }\n },\n );\n\n program\n .command(\"calibrate\")\n .description(\n \"Measure judge agreement against a human-verified golden set (.manni/docevals/golden/*.yaml)\",\n )\n .option(\"-c, --config <path>\", \"Path to manni.config.yaml\")\n .option(\"--golden <dir>\", \"Golden set directory\", \".manni/docevals/golden\")\n .option(\n \"--seed\",\n \"Write golden candidates from recorded reviews and exit; judges nothing, needs no provider\",\n )\n .option(\"--provider <name>\", \"Provider: auto (default) | anthropic | openai | claude-cli | llama-cpp\")\n .option(\"--model <model>\", \"Model override; needs a named provider, from here or config\")\n .option(\"--local\", LOCAL_FLAG_HELP)\n .option(\"--runs <n>\", \"Ensemble runs per case\", parseIntArg(\"--runs\"))\n .option(\n \"--max-turns <n>\",\n \"Stop after this many ensemble runs (a cached ensemble costs none)\",\n parseIntArg(\"--max-turns\"),\n )\n .option(\"--no-cache\", \"Bypass the judge response cache\")\n .action(\n async (opts: {\n config?: string;\n golden?: string;\n seed?: boolean;\n provider?: string;\n model?: string;\n local?: boolean;\n runs?: number;\n maxTurns?: number;\n cache?: boolean;\n }, command: Command) => {\n try {\n const color = colorFor(command, process.stdout.isTTY);\n const pc = palette(color);\n if (opts.seed) {\n // No `config`: reviews.yaml and the golden directory both resolve\n // against the working directory, not the config's, so passing it\n // would imply an influence it does not have.\n const seeded = seedGoldenCases({ golden: opts.golden });\n if (seeded.total === 0) {\n console.log(\n \"No recorded reviews to seed from — run `manni docevals review <file> <eval> <pass|fail>` first.\",\n );\n return;\n }\n // The lead number is what moved, not the file's size: `total`\n // counts cases already confirmed and left alone, so leading with it\n // read as \"wrote 8 candidates\" on a re-seed that wrote none.\n const changed = seeded.added + seeded.updated;\n console.log(\n changed === 0\n ? `No new reviews to seed — ${seeded.total} golden case(s) already in ${seeded.path}.`\n : `Wrote ${changed} golden candidate(s) to ${seeded.path} ` +\n `(${seeded.added} new, ${seeded.updated} updated; ${seeded.total} total).`,\n );\n if (seeded.unreviewed > 0) {\n console.log(\n pc.yellow(\n `${seeded.unreviewed} case(s) are \\`reviewed: false\\`. Read them and set ` +\n \"`reviewed: true` — a golden set assembled without a human is not one.\",\n ),\n );\n }\n return;\n }\n const report = await runCalibrate({\n config: opts.config,\n golden: opts.golden,\n provider: opts.provider,\n model: opts.model,\n local: opts.local,\n runs: opts.runs,\n maxTurns: opts.maxTurns,\n noCache: opts.cache === false,\n });\n console.log(renderCalibration(report, { color }));\n // Both conditions: the judge has to agree enough, AND the set has to\n // have been measured. A stale golden file whose pages were renamed\n // used to certify on whatever still resolved.\n process.exitCode =\n report.meetsThreshold &&\n report.unjudged === 0 &&\n report.balanced\n ? 0\n : 1;\n } catch (e) {\n fail(e);\n }\n },\n );\n\n program\n .command(\"init\")\n .description(\"Create a starter manni.config.yaml in the current directory\")\n .action(() => {\n try {\n console.log(`Created ${runInit()}`);\n } catch (e) {\n fail(e);\n }\n });\n\n program\n .command(\"review\")\n .description(\n \"Record a human verdict for an eval in the human-review zone (or list recorded reviews)\",\n )\n .argument(\"[file]\", \"Page path\")\n .argument(\"[eval]\", \"Eval name\")\n .argument(\"[verdict]\", \"pass | fail\")\n .option(\"--reviewer <name>\", \"Reviewer name recorded with the verdict\")\n .option(\"--note <text>\", \"Optional note\")\n .action(\n (\n file: string | undefined,\n evalName: string | undefined,\n verdict: string | undefined,\n opts: { reviewer?: string; note?: string },\n command: Command,\n ) => {\n try {\n if (!file) {\n console.log(\n renderReviews(listReviews(), {\n color: colorFor(command, process.stdout.isTTY),\n }),\n );\n return;\n }\n if (!evalName || !verdict) {\n throw new DocevalsError(\n \"Usage: manni docevals review <file> <eval> <pass|fail>\",\n );\n }\n const entry = runReview(file, evalName, verdict, opts);\n console.log(\n `Recorded ${entry.verdict} for ${entry.evalName} on ${entry.file}`,\n );\n } catch (e) {\n fail(e);\n }\n },\n );\n\n return program;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,SAAS,eAAe;AAsCjB,SAAS,eAAwB;AACtC,QAAM,UAAU,IAAI,QAAQ;AAE5B,UACG,KAAK,UAAU,EACf;AAAA,IACC;AAAA,EACF,EACC,QAAQ,gBAAI,OAAO,EACnB,OAAO,cAAc,wBAAwB,EAG7C,mBAAmB,wBAAwB,EAK3C,aAA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,kBAAQ;AAAA,YACN,cAAc,YAAY,GAAG;AAAA,cAC3B,OAAO,SAAS,SAAS,QAAQ,OAAO,KAAK;AAAA,YAC/C,CAAC;AAAA,UACH;AACA;AAAA,QACF;AACA,YAAI,CAAC,YAAY,CAAC,SAAS;AACzB,gBAAM,IAAI;AAAA,YACR;AAAA,UACF;AAAA,QACF;AACA,cAAM,QAAQ,UAAU,MAAM,UAAU,SAAS,IAAI;AACrD,gBAAQ;AAAA,UACN,YAAY,MAAM,OAAO,QAAQ,MAAM,QAAQ,OAAO,MAAM,IAAI;AAAA,QAClE;AAAA,MACF,SAAS,GAAG;AACV,aAAK,CAAC;AAAA,MACR;AAAA,IACF;AAAA,EACF;AAEF,SAAO;AACT;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/docevals/cli.ts"],"sourcesContent":["/**\n * The docevals program. Named `docevals` because that is where it is mounted\n * (`manni docevals …`); `src/cli.ts` adds it to the umbrella and runs it.\n */\nimport { Command } from \"commander\";\nimport pkg from \"../../package.json\" with { type: \"json\" };\nimport { fail } from \"../shared/run.js\";\nimport { notice } from \"../shared/warn.js\";\nimport { terminalConfirm } from \"../shared/prompt.js\";\nimport { collect, configOption } from \"../shared/cli-options.js\";\nimport { LOCAL_FLAG_HELP } from \"../shared/providers.js\";\nimport type { DocumentInputOptions } from \"./core/discover.js\";\nimport { colorFor, palette } from \"../shared/color.js\";\nimport { DocevalsError } from \"./types.js\";\nimport { allowExecutionMessage, isExecutionGrant } from \"../shared/execution.js\";\nimport { runList, renderList } from \"./commands/list.js\";\nimport { runRun } from \"./commands/run.js\";\nimport { runGenerate } from \"./commands/generate.js\";\nimport { runFill, renderFill } from \"./commands/fill.js\";\nimport { runPromote } from \"./commands/promote.js\";\nimport { listReviews, renderReviews, runReview } from \"./commands/review.js\";\nimport {\n runCalibrate,\n renderCalibration,\n seedGoldenCases,\n} from \"./commands/calibrate.js\";\nimport { runInit } from \"./commands/init.js\";\nimport {\n render,\n parseFormat,\n REPORT_FORMATS,\n SUMMARY_FORMATS,\n type ReportFormat,\n type SummaryFormat,\n} from \"./reporters/index.js\";\n\n/**\n * Whether `command`'s output gets colour: the family's rule, read off this\n * domain's `--no-color`. Exported for the tests that pin it.\n */\nexport { colorFor };\n\nexport function buildProgram(): Command {\n const program = new Command();\n\n program\n .name(\"docevals\")\n .description(\n \"Deterministic and LLM-as-judge evals for documentation pages, driven by frontmatter.\",\n )\n .version(pkg.version)\n .option(\"--no-color\", \"disable colored output\")\n // A pointer, not the whole help screen: the message that precedes it\n // already names the offending flag.\n .showHelpAfterError(\"(add --help for usage)\")\n // MUST come before the `.command()` calls below. `copyInheritedSettings`\n // copies `_exitCallback` by value at subcommand-creation time, so an\n // `exitOverride()` installed afterwards leaves every subcommand calling\n // `process.exit(1)` on a parse error, which is a usage error owed exit 2.\n .exitOverride();\n\n /**\n * Repeatable execution grant, validated on the way in.\n *\n * An unknown value is a usage error rather than a silent no-op (ADR 01007, the\n * same rule `--format` follows): a mistyped grant that quietly granted nothing\n * would skip every command eval and still exit 0, which reads as \"the corpus\n * is clean\" rather than \"you misspelled a flag\".\n */\n function collectGrant(value: string, previous: string[]): string[] {\n if (!isExecutionGrant(value)) {\n fail(new DocevalsError(allowExecutionMessage(value)));\n }\n return [...previous, value];\n }\n\n function parseIntArg(name: string) {\n return (value: string): number => {\n const n = Number.parseInt(value, 10);\n if (Number.isNaN(n) || n < 1) {\n fail(new DocevalsError(`${name} must be a positive integer, got \"${value}\"`));\n }\n return n;\n };\n }\n\n /**\n * Repeatable single-value option, e.g. `--eval a --eval b`.\n *\n * NOT commander's variadic `<name...>`: a variadic consumes every following\n * non-option token, so `run --eval fresh-enough docs/guide.md` parsed the glob\n * as a second eval name and left `globs` empty — silently widening the run to\n * the whole configured corpus, which is the opposite of what selection is for.\n */\n function collectArg(value: string, previous: string[]): string[] {\n return [...previous, value];\n }\n\n function parseFloatArg(name: string) {\n return (value: string): number => {\n const n = Number.parseFloat(value);\n if (Number.isNaN(n) || n < 0) {\n fail(new DocevalsError(`${name} must be a non-negative number, got \"${value}\"`));\n }\n return n;\n };\n }\n\n /**\n * Commander argument parser for `-f/--format` (ADR 01007). Routes through\n * `fail()` for the same reason the numeric parsers do: commander only special-\n * cases InvalidArgumentError, so any other exception escapes `program.parse()`\n * uncaught — a stack trace and exit 1, when a bad flag owes exit 2.\n */\n function parseFormatArg<T extends string>(name: string, allowed: readonly T[]) {\n return (value: string): T => {\n try {\n return parseFormat(value, allowed, name);\n } catch (e) {\n fail(e);\n }\n };\n }\n\n /**\n * The document-set surface every verb that reads pages shares (proposal\n * 0041): positional `[paths...]`, `--collection` and `--exclude` (each one\n * value per occurrence), and `-c`/`--no-config`. Declared once so the five\n * verbs cannot drift apart on a name or a description.\n */\n function documentInputs(command: Command, verb: string): Command {\n return command\n .argument(\n \"[paths...]\",\n `Files, directories, or globs to ${verb} (default: the configured collections)`,\n )\n .option(\n \"--collection <name>\",\n \"Configured collection to read (repeatable)\",\n collect,\n [],\n )\n .option(\"--exclude <glob>\", \"Glob to exclude (repeatable)\", collect, [])\n .option(\"-c, --config <path>\", \"Path to manni.config.yaml\")\n .option(\"--no-config\", \"Ignore any discovered config file\");\n }\n\n /** The shared options as the command cores take them. */\n function documentOptions(opts: {\n collection?: string[];\n exclude?: string[];\n config?: string | boolean;\n }): DocumentInputOptions {\n const { configPath, noConfig } = configOption(opts.config);\n return {\n ...(configPath === undefined ? {} : { config: configPath }),\n ...(noConfig === true ? { noConfig } : {}),\n ...(opts.collection === undefined ? {} : { collection: opts.collection }),\n ...(opts.exclude === undefined ? {} : { exclude: opts.exclude }),\n };\n }\n\n documentInputs(\n program\n .command(\"list\")\n .description(\"Show the resolved eval plan per page without running anything\"),\n \"list\",\n )\n .option(\n \"-f, --format <format>\",\n `Output format: ${SUMMARY_FORMATS.join(\" | \")}`,\n parseFormatArg(\"--format\", SUMMARY_FORMATS),\n \"pretty\" as SummaryFormat,\n )\n .option(\"--eval <name>\", \"Show only this eval (repeatable)\", collectArg, [])\n .option(\"--suite <name>\", \"Show only evals in this suite\")\n .action(\n async (\n paths: string[],\n opts: {\n config?: string | boolean;\n collection?: string[];\n exclude?: string[];\n format: SummaryFormat;\n eval?: string[];\n suite?: string;\n },\n command: Command,\n ) => {\n try {\n const run = await runList(paths, {\n ...documentOptions(opts),\n format: opts.format,\n evalNames: opts.eval,\n suite: opts.suite,\n });\n console.log(\n renderList(run, opts.format, {\n color: colorFor(command, process.stdout.isTTY),\n }),\n );\n process.exitCode = run.exitCode;\n } catch (e) {\n fail(e);\n }\n });\n\n documentInputs(\n program.command(\"run\").description(\"Run evals against documentation pages\"),\n \"evaluate\",\n )\n .option(\n \"-f, --format <format>\",\n `Output format: ${REPORT_FORMATS.join(\" | \")}`,\n parseFormatArg(\"--format\", REPORT_FORMATS),\n \"pretty\" as ReportFormat,\n )\n .option(\"--deterministic-only\", \"Run only command/tool graders, skip the AI judge\")\n .option(\"--ai-only\", \"Run only AI-judged evals, skip deterministic graders\")\n .option(\n // `<kind>`, not `<kind...>`: a variadic option greedily eats the\n // positional `[paths...]` that follow it, so `--allow-execution\n // frontmatter-commands docs/**` would silently swallow the glob and run\n // over the default file set instead. Repeat the flag to grant twice.\n \"--allow-execution <kind>\",\n \"Run only these execution grants (repeatable): frontmatter-commands\",\n collectGrant,\n [],\n )\n .option(\"--no-execution\", \"Clear every execution grant for this run\")\n .option(\"--no-generate\", \"Do not generate scripts for command evals missing a command\")\n .option(\"--no-cache\", \"Bypass the judge response cache\")\n .option(\"--fail-on-review\", \"Exit 1 when any eval lands in the human-review zone\")\n .option(\"--provider <name>\", \"Judge provider: auto (default) | anthropic | openai | claude-cli | llama-cpp\")\n .option(\"--model <model>\", \"Model override; needs a named provider, from here or config\")\n .option(\"--local\", LOCAL_FLAG_HELP)\n .option(\"--runs <n>\", \"Ensemble runs per eval\", parseIntArg(\"--runs\"))\n .option(\n \"--chunk-chars <n>\",\n \"Characters of page per judge call; longer pages are read in parts\",\n parseIntArg(\"--chunk-chars\"),\n )\n .option(\n \"--eval <name>\",\n \"Run only this eval (repeatable); suite targets are not evaluated on a filtered run\",\n collectArg,\n [],\n )\n .option(\"--suite <name>\", \"Run only evals in this suite\")\n .option(\n \"--since <ref>\",\n \"Evaluate only pages whose file or eval manifest changed between this git ref and HEAD, \" +\n \"or whose persona record did when an eval reads the page as its personas\",\n )\n .option(\n \"--newer-than <duration>\",\n \"Evaluate only pages whose file or eval manifest changed within this window, \" +\n \"such as 30m, 24h, 7d or 2w, or whose persona record did when an eval reads the page \" +\n \"as its personas; in CI, prefer --since\",\n )\n .option(\n \"--max-turns <n>\",\n \"Stop after this many ensemble runs (a cached ensemble costs none)\",\n parseIntArg(\"--max-turns\"),\n )\n .option(\n \"--baseline [path]\",\n \"Fail only on findings a recorded baseline does not already hold\",\n )\n .option(\"--no-baseline\", \"Ignore the configured baseline for this run\")\n .option(\n \"--write-baseline [path]\",\n \"Record this run's findings as the baseline; without a path, the configured one\",\n )\n .action(async (paths: string[], opts: Record<string, unknown>, command: Command) => {\n try {\n const report = await runRun(paths, {\n ...documentOptions({\n config: opts.config as string | boolean | undefined,\n collection: opts.collection as string[] | undefined,\n exclude: opts.exclude as string[] | undefined,\n }),\n // parseFormatArg validated this at parse time; the cast only re-narrows\n // from the `unknown` that the Record-typed options bag erases it to.\n format: opts.format as ReportFormat,\n deterministicOnly: opts.deterministicOnly as boolean | undefined,\n aiOnly: opts.aiOnly as boolean | undefined,\n // Commander's default is `[]`, which is \"no flag\", not \"run nothing\":\n // only a list someone typed narrows the run.\n allowExecution:\n (opts.allowExecution as string[]).length > 0\n ? (opts.allowExecution as string[])\n : undefined,\n execution: opts.execution as boolean | undefined,\n generate: opts.generate as boolean | undefined,\n cache: opts.cache as boolean | undefined,\n failOnReview: opts.failOnReview as boolean | undefined,\n provider: opts.provider as string | undefined,\n model: opts.model as string | undefined,\n local: opts.local as boolean | undefined,\n runs: opts.runs as number | undefined,\n chunkChars: opts.chunkChars as number | undefined,\n maxTurns: opts.maxTurns as number | undefined,\n evalNames: opts.eval as string[] | undefined,\n suite: opts.suite as string | undefined,\n since: opts.since as string | undefined,\n newerThan: opts.newerThan as string | undefined,\n // commander collapses `--baseline` to true and `--no-baseline` to\n // false on the same key; a string is an explicit path.\n baseline: opts.baseline as string | boolean | undefined,\n writeBaseline: opts.writeBaseline as string | boolean | undefined,\n toolVersion: pkg.version,\n });\n console.log(\n render(report, opts.format as ReportFormat, {\n color: colorFor(command, process.stdout.isTTY),\n }),\n );\n process.exitCode = report.exitCode;\n } catch (e) {\n fail(e);\n }\n });\n\n documentInputs(\n program\n .command(\"generate\")\n .description(\n \"Generate check scripts for command evals with a plain-language assertion but no command\",\n ),\n \"read\",\n )\n .option(\"--provider <name>\", \"Provider: auto (default) | anthropic | openai | claude-cli | llama-cpp\")\n .option(\"--model <model>\", \"Model override; needs a named provider, from here or config\")\n .option(\"--local\", LOCAL_FLAG_HELP)\n .action(\n async (\n paths: string[],\n opts: {\n config?: string | boolean;\n collection?: string[];\n exclude?: string[];\n provider?: string;\n model?: string;\n local?: boolean;\n },\n command: Command,\n ) => {\n try {\n const pc = palette(colorFor(command, process.stdout.isTTY));\n const result = await runGenerate(paths, {\n ...documentOptions(opts),\n provider: opts.provider,\n model: opts.model,\n local: opts.local,\n });\n if (result.targets === 0) {\n console.log(\"Nothing to generate — every command eval has a command.\");\n return;\n }\n console.log(\n `Generated ${result.generatedPaths.length}/${result.targets} check script(s):`,\n );\n for (const p of result.generatedPaths) console.log(` ${p}`);\n // Evals whose command reference had nowhere to go (proposal 0047).\n for (const r of result.refusals) console.log(pc.red(` ${r.message}`));\n if (result.generatedPaths.length < result.targets) {\n process.exitCode = 1;\n }\n } catch (e) {\n fail(e);\n }\n },\n );\n\n documentInputs(\n program\n .command(\"fill\")\n .description(\n \"Propose frontmatter evals for pages with an LLM; writes proposals at or above the confidence threshold\",\n ),\n \"fill\",\n )\n .option(\n \"-f, --format <format>\",\n `Output format: ${SUMMARY_FORMATS.join(\" | \")}`,\n parseFormatArg(\"--format\", SUMMARY_FORMATS),\n \"pretty\" as SummaryFormat,\n )\n .option(\"--dry-run\", \"Report proposals without writing frontmatter\")\n .option(\n \"--confidence <n>\",\n \"Minimum confidence to write (0-1, default: config fill.confidenceThreshold)\",\n parseFloatArg(\"--confidence\"),\n )\n .option(\n \"--max-turns <n>\",\n \"Stop after this many inference calls (a cached page costs none)\",\n parseIntArg(\"--max-turns\"),\n )\n .option(\"--no-cache\", \"Bypass the fill proposal cache\")\n .option(\n \"--chunk-chars <n>\",\n \"Characters of page per fill call; longer pages are proposed in parts\",\n parseIntArg(\"--chunk-chars\"),\n )\n .option(\"--provider <name>\", \"Provider: auto (default) | anthropic | openai | claude-cli | llama-cpp\")\n .option(\"--model <model>\", \"Model override; needs a named provider, from here or config\")\n .option(\"--local\", LOCAL_FLAG_HELP)\n .action(async (paths: string[], opts: Record<string, unknown>, command: Command) => {\n try {\n const confidence = opts.confidence as number | undefined;\n if (confidence !== undefined && confidence > 1) {\n fail(new DocevalsError(`--confidence must be between 0 and 1, got ${confidence}`));\n }\n const report = await runFill(paths, {\n ...documentOptions({\n config: opts.config as string | boolean | undefined,\n collection: opts.collection as string[] | undefined,\n exclude: opts.exclude as string[] | undefined,\n }),\n dryRun: opts.dryRun as boolean | undefined,\n confidence,\n maxTurns: opts.maxTurns as number | undefined,\n noCache: opts.cache === false ? true : undefined,\n provider: opts.provider as string | undefined,\n model: opts.model as string | undefined,\n local: opts.local as boolean | undefined,\n // P1 (proposal 0047): offered only on a terminal, where there is\n // someone to answer. Off one the evals go to the page and the W1\n // line says so.\n confirm: terminalConfirm(),\n onNotice: notice,\n onRelocated: (result) => {\n const manifests = result.manifests.map((m) => m.file).join(\", \");\n notice(\n `moved ${String(result.summary.moved)} value(s) into ${manifests}.`,\n );\n },\n });\n // As in `run`: parseFormatArg validated this at parse time, and the cast\n // only re-narrows from the `unknown` the Record-typed options bag erases\n // it to. renderFill guards itself regardless.\n console.log(\n renderFill(report, opts.format as SummaryFormat, {\n color: colorFor(command, process.stdout.isTTY),\n }),\n );\n process.exitCode = report.exitCode;\n } catch (e) {\n fail(e);\n }\n });\n\n documentInputs(\n program\n .command(\"promote\")\n .description(\n \"Find ai-graded evals expressible as deterministic checks; --write converts them\",\n ),\n \"read\",\n )\n .option(\"--write\", \"Apply promotions (write scripts and rewrite evals)\")\n .option(\"--provider <name>\", \"Provider: auto (default) | anthropic | openai | claude-cli | llama-cpp\")\n .option(\"--model <model>\", \"Model override; needs a named provider, from here or config\")\n .option(\"--local\", LOCAL_FLAG_HELP)\n .action(\n async (\n paths: string[],\n opts: {\n config?: string | boolean;\n collection?: string[];\n exclude?: string[];\n write?: boolean;\n provider?: string;\n model?: string;\n local?: boolean;\n },\n command: Command,\n ) => {\n try {\n const pc = palette(colorFor(command, process.stdout.isTTY));\n const proposals = await runPromote(paths, {\n ...documentOptions(opts),\n write: opts.write,\n provider: opts.provider,\n model: opts.model,\n local: opts.local,\n });\n if (proposals.length === 0) {\n console.log(\"No ai-graded evals found.\");\n return;\n }\n for (const p of proposals) {\n const tag = p.promotable\n ? p.applied\n ? pc.green(\"promoted\")\n : pc.cyan(\"promotable\")\n : pc.dim(\"keep-ai\");\n const script = p.scriptPath ? pc.dim(` -> ${p.scriptPath}`) : \"\";\n console.log(`${tag} ${p.evalName} (${p.source}, ${p.file})${script}`);\n console.log(pc.dim(` ${p.rationale}`));\n // Promotable, and nowhere to write it (proposal 0047).\n if (p.error !== undefined) console.log(pc.red(` ${p.error}`));\n }\n if (!opts.write && proposals.some((p) => p.promotable)) {\n console.log(pc.cyan(\"\\nRe-run with --write to apply promotions.\"));\n }\n } catch (e) {\n fail(e);\n }\n },\n );\n\n program\n .command(\"calibrate\")\n .description(\n \"Measure judge agreement against a human-verified golden set (.manni/docevals/golden/*.yaml)\",\n )\n .option(\"-c, --config <path>\", \"Path to manni.config.yaml\")\n .option(\"--golden <dir>\", \"Golden set directory\", \".manni/docevals/golden\")\n .option(\n \"--seed\",\n \"Write golden candidates from recorded reviews and exit; judges nothing, needs no provider\",\n )\n .option(\"--provider <name>\", \"Provider: auto (default) | anthropic | openai | claude-cli | llama-cpp\")\n .option(\"--model <model>\", \"Model override; needs a named provider, from here or config\")\n .option(\"--local\", LOCAL_FLAG_HELP)\n .option(\"--runs <n>\", \"Ensemble runs per case\", parseIntArg(\"--runs\"))\n .option(\n \"--max-turns <n>\",\n \"Stop after this many ensemble runs (a cached ensemble costs none)\",\n parseIntArg(\"--max-turns\"),\n )\n .option(\"--no-cache\", \"Bypass the judge response cache\")\n .action(\n async (opts: {\n config?: string;\n golden?: string;\n seed?: boolean;\n provider?: string;\n model?: string;\n local?: boolean;\n runs?: number;\n maxTurns?: number;\n cache?: boolean;\n }, command: Command) => {\n try {\n const color = colorFor(command, process.stdout.isTTY);\n const pc = palette(color);\n if (opts.seed) {\n // No `config`: reviews.yaml and the golden directory both resolve\n // against the working directory, not the config's, so passing it\n // would imply an influence it does not have.\n const seeded = seedGoldenCases({ golden: opts.golden });\n if (seeded.total === 0) {\n console.log(\n \"No recorded reviews to seed from — run `manni docevals review <file> <eval> <pass|fail>` first.\",\n );\n return;\n }\n // The lead number is what moved, not the file's size: `total`\n // counts cases already confirmed and left alone, so leading with it\n // read as \"wrote 8 candidates\" on a re-seed that wrote none.\n const changed = seeded.added + seeded.updated;\n console.log(\n changed === 0\n ? `No new reviews to seed — ${seeded.total} golden case(s) already in ${seeded.path}.`\n : `Wrote ${changed} golden candidate(s) to ${seeded.path} ` +\n `(${seeded.added} new, ${seeded.updated} updated; ${seeded.total} total).`,\n );\n if (seeded.unreviewed > 0) {\n console.log(\n pc.yellow(\n `${seeded.unreviewed} case(s) are \\`reviewed: false\\`. Read them and set ` +\n \"`reviewed: true` — a golden set assembled without a human is not one.\",\n ),\n );\n }\n return;\n }\n const report = await runCalibrate({\n config: opts.config,\n golden: opts.golden,\n provider: opts.provider,\n model: opts.model,\n local: opts.local,\n runs: opts.runs,\n maxTurns: opts.maxTurns,\n noCache: opts.cache === false,\n });\n console.log(renderCalibration(report, { color }));\n // Both conditions: the judge has to agree enough, AND the set has to\n // have been measured. A stale golden file whose pages were renamed\n // used to certify on whatever still resolved.\n process.exitCode =\n report.meetsThreshold &&\n report.unjudged === 0 &&\n report.balanced\n ? 0\n : 1;\n } catch (e) {\n fail(e);\n }\n },\n );\n\n program\n .command(\"init\")\n .description(\"Create a starter manni.config.yaml in the current directory\")\n .action(() => {\n try {\n console.log(`Created ${runInit()}`);\n } catch (e) {\n fail(e);\n }\n });\n\n program\n .command(\"review\")\n .description(\n \"Record a human verdict for an eval in the human-review zone (or list recorded reviews)\",\n )\n .argument(\"[file]\", \"Page path\")\n .argument(\"[eval]\", \"Eval name\")\n .argument(\"[verdict]\", \"pass | fail\")\n .option(\"--reviewer <name>\", \"Reviewer name recorded with the verdict\")\n .option(\"--note <text>\", \"Optional note\")\n .action(\n (\n file: string | undefined,\n evalName: string | undefined,\n verdict: string | undefined,\n opts: { reviewer?: string; note?: string },\n command: Command,\n ) => {\n try {\n if (!file) {\n console.log(\n renderReviews(listReviews(), {\n color: colorFor(command, process.stdout.isTTY),\n }),\n );\n return;\n }\n if (!evalName || !verdict) {\n throw new DocevalsError(\n \"Usage: manni docevals review <file> <eval> <pass|fail>\",\n );\n }\n const entry = runReview(file, evalName, verdict, opts);\n console.log(\n `Recorded ${entry.verdict} for ${entry.evalName} on ${entry.file}`,\n );\n } catch (e) {\n fail(e);\n }\n },\n );\n\n return program;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,SAAS,eAAe;AAsCjB,SAAS,eAAwB;AACtC,QAAM,UAAU,IAAI,QAAQ;AAE5B,UACG,KAAK,UAAU,EACf;AAAA,IACC;AAAA,EACF,EACC,QAAQ,gBAAI,OAAO,EACnB,OAAO,cAAc,wBAAwB,EAG7C,mBAAmB,wBAAwB,EAK3C,aAAa;AAUhB,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AAAA,YACN,cAAc,YAAY,GAAG;AAAA,cAC3B,OAAO,SAAS,SAAS,QAAQ,OAAO,KAAK;AAAA,YAC/C,CAAC;AAAA,UACH;AACA;AAAA,QACF;AACA,YAAI,CAAC,YAAY,CAAC,SAAS;AACzB,gBAAM,IAAI;AAAA,YACR;AAAA,UACF;AAAA,QACF;AACA,cAAM,QAAQ,UAAU,MAAM,UAAU,SAAS,IAAI;AACrD,gBAAQ;AAAA,UACN,YAAY,MAAM,OAAO,QAAQ,MAAM,QAAQ,OAAO,MAAM,IAAI;AAAA,QAClE;AAAA,MACF,SAAS,GAAG;AACV,aAAK,CAAC;AAAA,MACR;AAAA,IACF;AAAA,EACF;AAEF,SAAO;AACT;","names":[]}
|
|
@@ -3,24 +3,24 @@ import {
|
|
|
3
3
|
renderList,
|
|
4
4
|
runFill,
|
|
5
5
|
runList
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-W4RCGOLJ.js";
|
|
7
7
|
import {
|
|
8
8
|
CALIBRATE_FORMATS,
|
|
9
9
|
REPORT_FORMATS,
|
|
10
10
|
SUMMARY_FORMATS,
|
|
11
11
|
parseFormat,
|
|
12
12
|
runRun
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-ZBN2HEC2.js";
|
|
14
14
|
import "./chunk-ZAOJYN2D.js";
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-C2XLJICN.js";
|
|
16
|
+
import "./chunk-YTW7A62V.js";
|
|
17
17
|
import "./chunk-4TSWU2SU.js";
|
|
18
18
|
import "./chunk-TT5UDTDM.js";
|
|
19
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-OBZY2ZLQ.js";
|
|
20
20
|
import "./chunk-FQGLRJGX.js";
|
|
21
21
|
import "./chunk-VHJ72YCD.js";
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-5GQ7FF22.js";
|
|
23
|
+
import "./chunk-BTFXOKCP.js";
|
|
24
24
|
import "./chunk-6WJUZQQX.js";
|
|
25
25
|
import "./chunk-NHOGTAPK.js";
|
|
26
26
|
import {
|
|
@@ -33,18 +33,18 @@ import {
|
|
|
33
33
|
} from "./chunk-YNHZHSSM.js";
|
|
34
34
|
import "./chunk-QS2Z3SWL.js";
|
|
35
35
|
import "./chunk-GLP5PSXB.js";
|
|
36
|
-
import "./chunk-
|
|
37
|
-
import "./chunk-
|
|
36
|
+
import "./chunk-P6JCXNMG.js";
|
|
37
|
+
import "./chunk-47CLJY6H.js";
|
|
38
38
|
import {
|
|
39
39
|
terminalConfirm
|
|
40
|
-
} from "./chunk-
|
|
41
|
-
import "./chunk-
|
|
40
|
+
} from "./chunk-KQ66NYWY.js";
|
|
41
|
+
import "./chunk-4CBACRVT.js";
|
|
42
42
|
import {
|
|
43
43
|
collect,
|
|
44
44
|
configOption
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-RHR64UXW.js";
|
|
46
46
|
import "./chunk-DSWKBZWW.js";
|
|
47
|
-
import "./chunk-
|
|
47
|
+
import "./chunk-IHW7N3A6.js";
|
|
48
48
|
import "./chunk-77AINBYM.js";
|
|
49
49
|
import "./chunk-QK6VYJHV.js";
|
|
50
50
|
import {
|
|
@@ -53,7 +53,7 @@ import {
|
|
|
53
53
|
import {
|
|
54
54
|
fail
|
|
55
55
|
} from "./chunk-YEUYKR62.js";
|
|
56
|
-
import "./chunk-
|
|
56
|
+
import "./chunk-CDX4QK6O.js";
|
|
57
57
|
import {
|
|
58
58
|
notice
|
|
59
59
|
} from "./chunk-HX44GB4Z.js";
|
|
@@ -62,7 +62,7 @@ import {
|
|
|
62
62
|
} from "./chunk-NVYDWVXN.js";
|
|
63
63
|
import {
|
|
64
64
|
package_default
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-D7V5MUXP.js";
|
|
66
66
|
import "./chunk-OWBRDNRZ.js";
|
|
67
67
|
import "./chunk-G3T47CFV.js";
|
|
68
68
|
import "./chunk-2H7UOFLK.js";
|
|
@@ -163,7 +163,7 @@ function buildProgram() {
|
|
|
163
163
|
"--manifest names one session's manifest, so it cannot be used with a corpus; drop it and each trace will find its own"
|
|
164
164
|
);
|
|
165
165
|
}
|
|
166
|
-
const { runBatch } = await import("./batch-
|
|
166
|
+
const { runBatch } = await import("./batch-FXJMZSYY.js");
|
|
167
167
|
const { report: report2, rendered: rendered2 } = await runBatch({
|
|
168
168
|
...shared,
|
|
169
169
|
...traces.length > 0 ? { traces } : {}
|
|
@@ -282,7 +282,7 @@ function buildProgram() {
|
|
|
282
282
|
whole("--max-false-pass", opts.maxFalsePass, 0);
|
|
283
283
|
whole("--max-false-fail", opts.maxFalseFail, 0);
|
|
284
284
|
whole("--max-review", opts.maxReview, 0);
|
|
285
|
-
const { runCalibrate } = await import("./calibrate-
|
|
285
|
+
const { runCalibrate } = await import("./calibrate-RF7YSQMK.js");
|
|
286
286
|
const { report, rendered } = await runCalibrate({
|
|
287
287
|
...shared,
|
|
288
288
|
...traces.length > 0 ? { traces } : {},
|
|
@@ -384,7 +384,7 @@ function buildProgram() {
|
|
|
384
384
|
"pretty"
|
|
385
385
|
).action(async (opts) => {
|
|
386
386
|
try {
|
|
387
|
-
const { runCapture } = await import("./capture-
|
|
387
|
+
const { runCapture } = await import("./capture-EKYFKMBB.js");
|
|
388
388
|
const result = await runCapture({
|
|
389
389
|
version,
|
|
390
390
|
...configOptions(opts),
|
|
@@ -411,7 +411,7 @@ function buildProgram() {
|
|
|
411
411
|
"pretty"
|
|
412
412
|
).action(async (opts) => {
|
|
413
413
|
try {
|
|
414
|
-
const { runPrepare } = await import("./prepare-
|
|
414
|
+
const { runPrepare } = await import("./prepare-ND2INKAJ.js");
|
|
415
415
|
const result = await runPrepare({
|
|
416
416
|
...configOptions(opts),
|
|
417
417
|
...opts.project !== void 0 ? { project: opts.project } : {},
|
|
@@ -448,7 +448,7 @@ function buildProgram() {
|
|
|
448
448
|
throw new TracevalsError(`tracevals check takes one trace, got ${String(traces.length)}`);
|
|
449
449
|
}
|
|
450
450
|
whole("--runs", opts.runs, 1);
|
|
451
|
-
const { runCheck } = await import("./check-
|
|
451
|
+
const { runCheck } = await import("./check-KI3HYODN.js");
|
|
452
452
|
const { report, rendered } = await runCheck({
|
|
453
453
|
...configOptions(opts),
|
|
454
454
|
tracePath: trace,
|
|
@@ -519,4 +519,4 @@ function buildProgram() {
|
|
|
519
519
|
export {
|
|
520
520
|
buildProgram
|
|
521
521
|
};
|
|
522
|
-
//# sourceMappingURL=cli-
|
|
522
|
+
//# sourceMappingURL=cli-6EPISRJR.js.map
|
|
@@ -24,12 +24,12 @@ import {
|
|
|
24
24
|
matchesFileGlob,
|
|
25
25
|
readConfigFile,
|
|
26
26
|
selectCollections
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-CDX4QK6O.js";
|
|
28
28
|
import "./chunk-HX44GB4Z.js";
|
|
29
29
|
import "./chunk-NVYDWVXN.js";
|
|
30
30
|
import {
|
|
31
31
|
package_default
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-D7V5MUXP.js";
|
|
33
33
|
import {
|
|
34
34
|
programName
|
|
35
35
|
} from "./chunk-OWBRDNRZ.js";
|
|
@@ -1245,4 +1245,4 @@ export {
|
|
|
1245
1245
|
resolveCrawl,
|
|
1246
1246
|
resolveMaxPages
|
|
1247
1247
|
};
|
|
1248
|
-
//# sourceMappingURL=cli-
|
|
1248
|
+
//# sourceMappingURL=cli-6LJS32R2.js.map
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
runTemplates,
|
|
10
10
|
runTemplatesInfer,
|
|
11
11
|
runTools
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-LEGD33WJ.js";
|
|
13
13
|
import {
|
|
14
14
|
LINT_JOBS,
|
|
15
15
|
TOOLS_BY_JOB,
|
|
@@ -17,29 +17,30 @@ import {
|
|
|
17
17
|
rebaseConfig,
|
|
18
18
|
resolveStructureTool,
|
|
19
19
|
runLint
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-CIGRVU5V.js";
|
|
21
21
|
import "./chunk-ZMECS2IJ.js";
|
|
22
22
|
import "./chunk-TIUTIOFB.js";
|
|
23
23
|
import {
|
|
24
24
|
render,
|
|
25
25
|
renderTemplates,
|
|
26
26
|
renderTools
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-CUOJGVVA.js";
|
|
28
28
|
import "./chunk-GLP5PSXB.js";
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-
|
|
29
|
+
import "./chunk-ZWVYT2G6.js";
|
|
30
|
+
import "./chunk-35J3BP37.js";
|
|
31
31
|
import {
|
|
32
32
|
LintError
|
|
33
|
-
} from "./chunk-
|
|
34
|
-
import "./chunk-
|
|
35
|
-
import "./chunk-
|
|
36
|
-
import "./chunk-
|
|
33
|
+
} from "./chunk-OPF3NOKF.js";
|
|
34
|
+
import "./chunk-HMJZHUCJ.js";
|
|
35
|
+
import "./chunk-P6JCXNMG.js";
|
|
36
|
+
import "./chunk-47CLJY6H.js";
|
|
37
|
+
import "./chunk-KQ66NYWY.js";
|
|
37
38
|
import {
|
|
38
39
|
OMITTED_WHEN_CLEAN,
|
|
39
40
|
REPORT_FORMATS,
|
|
40
41
|
REPORT_FORMAT_LIST,
|
|
41
42
|
isReportFormat
|
|
42
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-4CBACRVT.js";
|
|
43
44
|
import {
|
|
44
45
|
collect,
|
|
45
46
|
configOption,
|
|
@@ -47,11 +48,11 @@ import {
|
|
|
47
48
|
readStdin,
|
|
48
49
|
reportConfig,
|
|
49
50
|
splitList
|
|
50
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-RHR64UXW.js";
|
|
51
52
|
import "./chunk-DSWKBZWW.js";
|
|
52
53
|
import {
|
|
53
54
|
STDIN_TOKEN
|
|
54
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-IHW7N3A6.js";
|
|
55
56
|
import "./chunk-QK6VYJHV.js";
|
|
56
57
|
import {
|
|
57
58
|
shouldColor
|
|
@@ -59,14 +60,14 @@ import {
|
|
|
59
60
|
import {
|
|
60
61
|
fail
|
|
61
62
|
} from "./chunk-YEUYKR62.js";
|
|
62
|
-
import "./chunk-
|
|
63
|
+
import "./chunk-CDX4QK6O.js";
|
|
63
64
|
import {
|
|
64
65
|
notice
|
|
65
66
|
} from "./chunk-HX44GB4Z.js";
|
|
66
67
|
import "./chunk-NVYDWVXN.js";
|
|
67
68
|
import {
|
|
68
69
|
package_default
|
|
69
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-D7V5MUXP.js";
|
|
70
71
|
import "./chunk-OWBRDNRZ.js";
|
|
71
72
|
import "./chunk-G3T47CFV.js";
|
|
72
73
|
import "./chunk-2H7UOFLK.js";
|
|
@@ -386,4 +387,4 @@ function buildProgram() {
|
|
|
386
387
|
export {
|
|
387
388
|
buildProgram
|
|
388
389
|
};
|
|
389
|
-
//# sourceMappingURL=cli-
|
|
390
|
+
//# sourceMappingURL=cli-6N2VRKCW.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/lint/cli.ts"],"sourcesContent":["/**\n * The lint program. Named `lint` because that is where it is mounted\n * (`manni lint …`); `src/cli.ts` adds it to the umbrella and runs it. Thin\n * commander wrapper over the command cores. Follows clig.dev: primary output to\n * stdout, diagnostics to stderr, color only on a TTY (and never under\n * NO_COLOR/--no-color), meaningful exit codes.\n *\n * Grammar per proposal 0034: the verbs are `check`, `structure`, `templates`\n * and `tools`, and there is no default subcommand, so a bare `manni lint` is a\n * usage error that lists them. `check` runs every configured job; `structure`\n * runs one of them, and carries the options that belong to the tool performing\n * it.\n *\n * Exit codes are the contract CI reads:\n * 0 every file linted clean\n * 1 the run produced findings\n * 2 the tool could not do its job - bad usage, missing template, unreadable\n * input. A LintError is always this, never a lint failure.\n *\n * The 1/2 split is what lets a workflow tell \"the docs are wrong\" apart from\n * \"the linter is misconfigured\", which a single non-zero exit cannot.\n */\nimport { Command } from \"commander\";\nimport pkg from \"../../package.json\" with { type: \"json\" };\nimport {\n collect,\n configOption,\n explicitFalse,\n readStdin,\n reportConfig,\n splitList,\n} from \"../shared/cli-options.js\";\nimport { shouldColor } from \"../shared/color.js\";\nimport { fail } from \"../shared/run.js\";\nimport { notice } from \"../shared/warn.js\";\nimport {\n OMITTED_WHEN_CLEAN,\n REPORT_FORMAT_LIST,\n STDIN_TOKEN,\n} from \"../meta/internal.js\";\nimport {\n REPORT_FORMATS,\n isReportFormat,\n type ReportFormat as FamilyFormat,\n} from \"../meta/index.js\";\nimport { LintError } from \"./types.js\";\nimport { runLint } from \"./commands/lint.js\";\nimport {\n runTemplateShow,\n runTemplates,\n runTemplatesInfer,\n} from \"./commands/templates.js\";\nimport { runTools } from \"./commands/tools.js\";\nimport { INFER_FORMATS, isInferFormat, type InferFormat } from \"./core/infer.js\";\nimport {\n LINT_JOBS,\n TOOLS_BY_JOB,\n loadConfig,\n rebaseConfig,\n} from \"./core/config.js\";\nimport { resolveStructureTool } from \"./tools/index.js\";\nimport {\n render,\n renderTemplates,\n renderTools,\n type ListFormat,\n type ReportFormat,\n} from \"./reporters/index.js\";\nimport {\n SHOW_FORMATS,\n isShowFormat,\n renderTemplateShow,\n type ShowFormat,\n} from \"./reporters/template-show.js\";\n\n/** The options `check` and `structure` share, in the family's spelling. */\ninterface InputCliOptions {\n /** `--collection <name>`, repeatable; commander's default value is `[]`. */\n collection: string[];\n /** `--ext <list>`; the command splits it. */\n ext?: string;\n /** `--exclude <glob>`, repeatable; commander's default value is `[]`. */\n exclude: string[];\n /** `--as <format>`: force a parser. */\n as?: string;\n /**\n * `-c, --config <path>` and `--no-config` share one commander attribute:\n * `undefined` with neither flag, the path with `-c`, `false` with\n * `--no-config`. Split by `configOption`.\n */\n config?: string | boolean;\n allowEmpty?: boolean;\n /** `--no-gitignore`. */\n gitignore: boolean;\n /** `-f, --format <format>`. Always a string: the declaration has a default. */\n format: string;\n}\n\n/** `structure` adds the options of the tool that performs the job. */\ninterface StructureCliOptions extends InputCliOptions {\n tool?: string;\n template?: string;\n /** `--templates <path>`, repeatable; commander's default value is `[]`. */\n templates: string[];\n explain?: boolean;\n}\n\n/** What commander parses for `templates`. */\ninterface TemplatesCommandOptions {\n templates: string[];\n config?: string | boolean;\n format: string;\n}\n\n/** What commander parses for `templates infer`. */\ninterface TemplatesInferCliOptions {\n as?: string;\n name?: string;\n config?: string | boolean;\n format: string;\n out?: string;\n force?: boolean;\n}\n\n/** What commander parses for `tools`. */\ninterface ToolsCommandOptions {\n config?: string | boolean;\n format: string;\n}\n\n// `explain` is reachable through `--explain`, not `-f`: it reports on\n// configuration rather than on documents, and offering it as a format would\n// invite `-f explain` alongside a lint that then never happens. The `-f` set\n// itself is the family's, from meta, rather than a fourth hand-kept copy of\n// the same five words.\nconst LIST_FORMATS = new Set<string>([\"pretty\", \"json\"]);\n\n/** The heading the tool's own options print under, after the shared ones. */\nconst TOOL_OPTIONS_GROUP = \"Tool options:\";\n\nfunction resolveColor(program: Command): boolean {\n // commander maps --no-color to opts.color === false.\n const noColor = program.opts().color === false;\n return shouldColor({ noColor, isTTY: process.stdout.isTTY });\n}\n\nfunction reportFormat(value: unknown): FamilyFormat {\n const format = String(value);\n if (!isReportFormat(format)) {\n throw new LintError(\n `Unknown --format \"${format}\". Use ${REPORT_FORMAT_LIST}.`,\n );\n }\n return format;\n}\n\n/**\n * Whether a clean run may print nothing at all in this format.\n *\n * Only `github` may: an empty annotation stream is a clean check. Every other\n * format owes its envelope - an empty JSON array, a SARIF log with no results,\n * a JUnit suite of passing testcases - because a consumer parsing stdout must\n * not have to treat \"no output\" as a third outcome. `explain` is never clean\n * or dirty; it always has something to say.\n */\nfunction omittedWhenClean(format: ReportFormat): boolean {\n return format !== \"explain\" && OMITTED_WHEN_CLEAN.has(format);\n}\n\nfunction listFormat(value: unknown): ListFormat {\n const format = String(value);\n if (!LIST_FORMATS.has(format)) {\n throw new LintError(\n `Unknown --format \"${format}\". Use pretty or json.`,\n );\n }\n return format as ListFormat;\n}\n\n/**\n * `templates infer -f`: the format a *template file* is written in, which is\n * not the set a report is rendered in. A template is YAML or JSON because those\n * are the two the loader reads back, and `pretty` would name a third thing the\n * tool cannot then load.\n */\nfunction inferFormat(value: unknown): InferFormat {\n const format = String(value);\n if (!isInferFormat(format)) {\n throw new LintError(`Unknown --format \"${format}\". Use yaml or json.`);\n }\n return format;\n}\n\n/** `templates show -f`: a report, a template's data, or a page skeleton. */\nfunction showFormat(value: unknown): ShowFormat {\n const format = String(value);\n if (!isShowFormat(format)) {\n throw new LintError(\n `Unknown --format \"${format}\". Use pretty, json or markdown.`,\n );\n }\n return format;\n}\n\n/**\n * `--tool <name>`: which tool performs the structure job. Refused by name\n * rather than ignored, because falling through to manni's engine would lint\n * with something other than what was asked for and say nothing.\n *\n * The refusal is the registry's, not a second copy of it here. `runLint`\n * refuses the same name with the same sentence for a caller that never touches\n * commander; this one fires first, so a bad `--tool` is reported before the\n * run asks what it was pointed at.\n */\nfunction assertStructureTool(value: string | undefined): void {\n if (value === undefined) return;\n resolveStructureTool(value);\n}\n\n/**\n * `-c/--config` and `--no-config`, in one place.\n *\n * Every verb here takes them, and they had been written out three times. A flag\n * two commands both have carries the same name *and* the same description, so\n * the declaration is shared rather than copied - which is what kept the fourth\n * copy, on `templates infer`, from spelling either of them slightly differently.\n */\nfunction withConfigOptions(command: Command): Command {\n return command\n .option(\"-c, --config <path>\", \"path to a manni config file\")\n .option(\"--no-config\", \"ignore any discovered config file\");\n}\n\n/**\n * The value of a flag a command and its parent both declare.\n *\n * Commander keeps parsing a parent's options past a subcommand name unless\n * `enablePositionalOptions()` is on, so `templates infer page.md -f json` sets\n * `format` on `templates` and leaves `infer` holding its own default. Both\n * commands declare `-f`, `-c` and `--no-config`, because \"commands must have\n * parallel behaviors\" and `infer` must list them in its own `--help`.\n *\n * Turning positional options on would fix it and move every other flag in this\n * program with it: `manni lint structure docs/ --no-color` is a root option\n * written after its command, and there are three more like it. So the lookup\n * changes instead. The nearest command actually *given* the flag wins, and the\n * subcommand's own default is the fallback - which is the reading a person\n * typing the line already has.\n */\nfunction optionValue(command: Command, key: string): unknown {\n for (\n let cmd: Command | null = command;\n cmd !== null;\n cmd = cmd.parent ?? null\n ) {\n if (cmd.getOptionValueSource(key) === \"cli\") return cmd.getOptionValue(key);\n }\n return command.getOptionValue(key);\n}\n\n/** The options every job verb takes, in one place so the two cannot drift. */\nfunction withInputOptions(command: Command): Command {\n command\n .argument(\n \"[paths...]\",\n \"files, directories, or globs to lint (use - for stdin)\",\n )\n .option(\n \"--collection <name>\",\n \"configured collection to run over; repeatable\",\n collect,\n [],\n )\n .option(\"--ext <list>\", \"comma-separated extensions for directory walks\")\n .option(\"--exclude <glob>\", \"glob to exclude; repeatable\", collect, [])\n .option(\"--as <format>\", \"force an input format (e.g. markdown, mdx)\")\n .option(\n \"-f, --format <format>\",\n `output: ${REPORT_FORMATS.join(\" | \")}`,\n \"pretty\",\n );\n return withConfigOptions(command)\n .option(\"--allow-empty\", \"treat zero matched files as success\")\n .option(\"--no-gitignore\", \"lint files .gitignore covers\");\n}\n\n/** The lint options every job verb turns its shared flags into. */\nfunction inputOptions(\n paths: string[],\n options: InputCliOptions,\n): {\n inputs: string[];\n collection: string[];\n exts?: string[];\n exclude: string[];\n as?: string;\n configPath?: string;\n noConfig?: boolean;\n allowEmpty?: boolean;\n respectGitignore?: boolean;\n onNotice: (message: string) => void;\n} {\n return {\n inputs: paths,\n collection: options.collection,\n ...(options.ext ? { exts: splitList(options.ext) } : {}),\n exclude: options.exclude,\n ...(options.as === undefined ? {} : { as: options.as }),\n ...configOption(options.config),\n // `undefined` rather than `false` when absent, so config still wins.\n ...(options.allowEmpty ? { allowEmpty: true } : {}),\n respectGitignore: explicitFalse(options.gitignore),\n onNotice: notice,\n };\n}\n\nexport function buildProgram(): Command {\n const program = new Command();\n program\n .name(\"lint\")\n .description(\n \"Validate document structure against doctype templates. Deterministic, CI-friendly.\",\n )\n .version(pkg.version, \"-V, --version\")\n .option(\"--no-color\", \"disable colored output\")\n .showHelpAfterError()\n // Exit code 1 is reserved for \"the docs are wrong\". Commander exits 1 on a\n // usage error by default, which would make a typo'd flag look exactly like\n // a failing lint to a workflow. With no callback, commander throws the\n // CommanderError instead, and the umbrella's runner maps it: help and\n // --version stay 0, every other usage error becomes 2. Commander has\n // already written its own message. This has to precede .command(), which\n // copies the callback into each subcommand.\n .exitOverride();\n\n /** Run one lint, render it, and settle the exit code. Both job verbs share it. */\n const lint = async (\n paths: string[],\n options: StructureCliOptions | InputCliOptions,\n command: Command,\n job: { tool?: StructureCliOptions } = {},\n ): Promise<void> => {\n const tool = job.tool;\n const format = reportFormat(options.format);\n const explain = tool?.explain === true;\n const stdinContent = paths.includes(STDIN_TOKEN) ? await readStdin() : undefined;\n const cwd = process.cwd();\n\n const run = await runLint({\n ...inputOptions(paths, options),\n ...(tool?.tool === undefined ? {} : { tool: tool.tool }),\n ...(tool?.template === undefined ? {} : { template: tool.template }),\n ...(tool && tool.templates.length > 0 ? { templates: tool.templates } : {}),\n ...(explain ? { explain: true } : {}),\n ...(stdinContent === undefined ? {} : { stdinContent }),\n // Which config governed the run, said where a report cannot be parsed\n // around: discovery walks up to the project boundary, so an unexpected\n // ancestor config is the difference between a five-minute diagnosis and\n // an hour of confusion.\n onConfigLoaded: reportConfig(format === \"pretty\", cwd),\n });\n\n const color = resolveColor(command.parent ?? command);\n const chosen: ReportFormat = explain ? \"explain\" : format;\n const text = render(run, chosen, { color });\n if (text.length > 0 || !omittedWhenClean(chosen)) {\n process.stdout.write(`${text}\\n`);\n }\n // `--explain` answers a question about configuration, so its exit code\n // reports whether it could answer it - not whether the docs are clean.\n //\n // That covers routing failures too: a page whose `type` matches no\n // template is a answered question, not an unanswered one, so it exits 0\n // like everything else here. Automation must not read this code as\n // \"everything routed\" - the ordinary run is what reports that, with exit\n // 1. Said in `--help` and the README, because the distinction is invisible\n // from the exit code alone.\n process.exitCode = explain ? 0 : run.summary.failed > 0 ? 1 : 0;\n };\n\n withInputOptions(\n program\n .command(\"check\")\n .description(\"Run every configured lint job over the given files/dirs/globs\"),\n )\n .addHelpText(\n \"after\",\n [\n \"\",\n \"Jobs: structure.\",\n \"\",\n \"Examples:\",\n \" manni lint check docs/ # every configured job\",\n \" manni lint check # targets from collections:\",\n \" manni lint check --collection guides\",\n ' manni lint check \"**/*.md\" -f github # CI annotations',\n \" cat page.md | manni lint check - --as markdown\",\n ].join(\"\\n\"),\n )\n .action(async (paths: string[], options: InputCliOptions, command: Command) => {\n try {\n // Which jobs this run covered, said once, beside the config line. The\n // full form also names the jobs that exist and are not configured;\n // `structure` is the only job there is, so today it is one word.\n if (options.format === \"pretty\") {\n process.stderr.write(`Checked: ${LINT_JOBS.join(\", \")}.\\n`);\n }\n await lint(paths, options, command);\n } catch (err) {\n fail(err);\n }\n });\n\n const structure = withInputOptions(\n program\n .command(\"structure\")\n .description(\n \"Lint document structure against doctype templates, routing each page by its `type`\",\n ),\n );\n structure\n .optionsGroup(TOOL_OPTIONS_GROUP)\n .option(\n \"--tool <name>\",\n `tool that performs the job: ${TOOLS_BY_JOB.structure.join(\", \")}`,\n )\n .option(\n \"-t, --template <ref>\",\n \"apply this template to every file, overriding type routing\",\n )\n .option(\n \"--templates <path>\",\n \"template file to route by: its `types:` win over built-ins; repeatable\",\n collect,\n [],\n )\n .option(\n \"--explain\",\n \"print how each file's template was chosen, and lint nothing (always exits 0, unrouted pages included)\",\n )\n .addHelpText(\n \"after\",\n [\n \"\",\n \"Examples:\",\n \" manni lint structure docs/ # route each page by its `type`\",\n \" manni lint structure docs/ --templates ./templates.yaml # add your own templates\",\n \" manni lint structure # targets from collections:\",\n \" manni lint structure docs/ --explain # show why each page routed where\",\n \" manni lint structure page.md -t tgdp:how-to:1.6 # force one template\",\n ' manni lint structure \"**/*.md\" -f github # CI annotations',\n \" manni lint structure docs/ --exclude '**/drafts/**'\",\n \" cat page.md | manni lint structure - -t tgdp:how-to:1.6 --as markdown\",\n ].join(\"\\n\"),\n )\n .action(\n async (paths: string[], options: StructureCliOptions, command: Command) => {\n try {\n assertStructureTool(options.tool);\n await lint(paths, options, command, { tool: options });\n } catch (err) {\n fail(err);\n }\n },\n );\n\n const templates = program\n .command(\"templates\")\n .description(\"List the templates that can be applied, and the types they serve\")\n .option(\n \"--templates <path>\",\n \"also list the templates in this file; repeatable\",\n collect,\n [],\n );\n withConfigOptions(templates)\n .option(\"-f, --format <format>\", \"output: pretty | json\", \"pretty\")\n .action(async (options: TemplatesCommandOptions, command: Command) => {\n try {\n const format = listFormat(options.format);\n // The listing answers \"what could route a page?\", so it has to see the\n // same template files a lint would - rebased the same way, or it would\n // answer for a different set of files depending on where it was run.\n const { configPath, noConfig } = configOption(options.config);\n const found = noConfig ? null : await loadConfig(configPath);\n const info = await runTemplates({\n templates:\n options.templates.length > 0\n ? options.templates\n : rebaseConfig(found).templates,\n });\n const color = resolveColor(command.parent ?? command);\n process.stdout.write(`${renderTemplates(info, format, { color })}\\n`);\n } catch (err) {\n fail(err);\n }\n });\n\n const inferCommand = templates\n .command(\"infer\")\n .description(\"Write a first template from a page that already has the shape you want\")\n .argument(\"<page>\", \"one file to infer from (use - for stdin)\")\n .option(\"--as <format>\", \"force an input format (e.g. markdown, mdx)\")\n .option(\n \"--name <name>\",\n \"name for the template; defaults to the page's `type`, else its filename\",\n )\n .option(\"-f, --format <format>\", `output: ${INFER_FORMATS.join(\" | \")}`, \"yaml\")\n .option(\"-o, --out <path>\", \"write the template here instead of to stdout\")\n .option(\"--force\", \"overwrite the --out path\");\n withConfigOptions(inferCommand)\n .addHelpText(\n \"after\",\n [\n \"\",\n \"Examples:\",\n \" manni lint templates infer docs/guides/install.md\",\n \" manni lint templates infer docs/guides/install.md --name how-to\",\n \" manni lint templates infer page.mdx -f json\",\n \" manni lint templates infer page.md -o ./templates.yaml\",\n \" manni lint templates infer page.md -o ./templates.yaml --force\",\n \" cat page.md | manni lint templates infer - --as markdown\",\n \"\",\n \"One page, and every rule it writes is exactly one occurrence: a single\",\n \"page cannot show what varies. Loosening a heading into a list or a\",\n \"pattern, setting `min: 0`, and adding a trailing rule with no heading\",\n \"for the sections that may follow are your edits to make.\",\n ].join(\"\\n\"),\n )\n .action(\n async (\n page: string,\n options: TemplatesInferCliOptions,\n command: Command,\n ) => {\n try {\n // `-f`, `-c` and `--no-config` are read through `optionValue`: the\n // parent `templates` declares all three, and commander hands it any\n // of them typed after `infer`.\n const format = inferFormat(optionValue(command, \"format\"));\n const { configPath, noConfig } = configOption(\n optionValue(command, \"config\"),\n );\n const stdinContent =\n page === STDIN_TOKEN ? await readStdin() : undefined;\n const result = await runTemplatesInfer({\n page,\n format,\n ...(options.as === undefined ? {} : { as: options.as }),\n ...(options.name === undefined ? {} : { name: options.name }),\n ...(options.out === undefined ? {} : { out: options.out }),\n ...(options.force === undefined ? {} : { force: options.force }),\n ...(configPath === undefined ? {} : { configPath }),\n ...(noConfig === undefined ? {} : { noConfig }),\n ...(stdinContent === undefined ? {} : { stdinContent }),\n // The template is the primary output, so with no --out it owns\n // stdout and the config line goes to stderr beside it. With --out\n // stdout is free, and the line still belongs on stderr: a reader\n // piping nothing is not a reason to move a diagnostic.\n onConfigLoaded: reportConfig(false, process.cwd()),\n });\n\n if (result.written === undefined) {\n process.stdout.write(result.text);\n return;\n }\n // Said on stderr, so `-o` leaves stdout empty for a shell that is\n // watching it, and the template file is the whole output.\n process.stderr.write(\n `Wrote template \"${result.name}\" to ${result.written}\\n`,\n );\n } catch (err) {\n fail(err);\n }\n },\n );\n\n templates\n .command(\"show\")\n .description(\n \"Print what a template asks for: each section, how often it may occur, what it must contain, and what it is for\",\n )\n .argument(\n \"<ref>\",\n \"template to show: a built-in id, a path, a path#name, or a URL\",\n )\n .option(\"-f, --format <format>\", `output: ${SHOW_FORMATS.join(\" | \")}`, \"pretty\")\n .addHelpText(\n \"after\",\n [\n \"\",\n \"Examples:\",\n \" manni lint templates show tgdp:how-to:1.6\",\n \" manni lint templates show ./templates.yaml#how-to\",\n \" manni lint templates show tgdp:reference:1.6 -f json\",\n \" manni lint templates show tgdp:how-to:1.6 -f markdown > docs/rotate-key.md\",\n ].join(\"\\n\"),\n )\n .action(async (ref: string, _options: unknown, command: Command) => {\n try {\n // `-f` is read through `optionValue`: the parent `templates` declares\n // it too, and commander hands it any `-f` typed after `show`.\n const format = showFormat(optionValue(command, \"format\"));\n const show = await runTemplateShow({ ref });\n const color = resolveColor(program);\n process.stdout.write(`${renderTemplateShow(show, format, { color })}\\n`);\n } catch (err) {\n fail(err);\n }\n });\n\n withConfigOptions(\n program\n .command(\"tools\")\n .description(\n \"List the lint jobs, the tool that performs each, and what it reads\",\n ),\n )\n .option(\"-f, --format <format>\", \"output: pretty | json\", \"pretty\")\n .action(async (options: ToolsCommandOptions, command: Command) => {\n try {\n const format = listFormat(options.format);\n const tools = await runTools(configOption(options.config));\n const color = resolveColor(command.parent ?? command);\n process.stdout.write(`${renderTools(tools, format, { color })}\\n`);\n } catch (err) {\n fail(err);\n }\n });\n\n return program;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBA,SAAS,eAAe;AAiHxB,IAAM,eAAe,oBAAI,IAAY,CAAC,UAAU,MAAM,CAAC;AAGvD,IAAM,qBAAqB;AAE3B,SAAS,aAAa,SAA2B;AAE/C,QAAM,UAAU,QAAQ,KAAK,EAAE,UAAU;AACzC,SAAO,YAAY,EAAE,SAAS,OAAO,QAAQ,OAAO,MAAM,CAAC;AAC7D;AAEA,SAAS,aAAa,OAA8B;AAClD,QAAM,SAAS,OAAO,KAAK;AAC3B,MAAI,CAAC,eAAe,MAAM,GAAG;AAC3B,UAAM,IAAI;AAAA,MACR,qBAAqB,MAAM,UAAU,kBAAkB;AAAA,IACzD;AAAA,EACF;AACA,SAAO;AACT;AAWA,SAAS,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SAAS,WAAW,QAAQ,MAAM;AACxC,YAAM,QAAQ,MAAM,SAAS,aAAa,QAAQ,MAAM,CAAC;AACzD,YAAM,QAAQ,aAAa,QAAQ,UAAU,OAAO;AACpD,cAAQ,OAAO,MAAM,GAAG,YAAY,OAAO,QAAQ,EAAE,MAAM,CAAC,CAAC;AAAA,CAAI;AAAA,IACnE,SAAS,KAAK;AACZ,WAAK,GAAG;AAAA,IACV;AAAA,EACF,CAAC;AAEH,SAAO;AACT;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/lint/cli.ts"],"sourcesContent":["/**\n * The lint program. Named `lint` because that is where it is mounted\n * (`manni lint …`); `src/cli.ts` adds it to the umbrella and runs it. Thin\n * commander wrapper over the command cores. Follows clig.dev: primary output to\n * stdout, diagnostics to stderr, color only on a TTY (and never under\n * NO_COLOR/--no-color), meaningful exit codes.\n *\n * Grammar per proposal 0034: the verbs are `check`, `structure`, `templates`\n * and `tools`, and there is no default subcommand, so a bare `manni lint` is a\n * usage error that lists them. `check` runs every configured job; `structure`\n * runs one of them, and carries the options that belong to the tool performing\n * it.\n *\n * Exit codes are the contract CI reads:\n * 0 every file linted clean\n * 1 the run produced findings\n * 2 the tool could not do its job - bad usage, missing template, unreadable\n * input. A LintError is always this, never a lint failure.\n *\n * The 1/2 split is what lets a workflow tell \"the docs are wrong\" apart from\n * \"the linter is misconfigured\", which a single non-zero exit cannot.\n */\nimport { Command } from \"commander\";\nimport pkg from \"../../package.json\" with { type: \"json\" };\nimport {\n collect,\n configOption,\n explicitFalse,\n readStdin,\n reportConfig,\n splitList,\n} from \"../shared/cli-options.js\";\nimport { shouldColor } from \"../shared/color.js\";\nimport { fail } from \"../shared/run.js\";\nimport { notice } from \"../shared/warn.js\";\nimport {\n OMITTED_WHEN_CLEAN,\n REPORT_FORMAT_LIST,\n STDIN_TOKEN,\n} from \"../meta/internal.js\";\nimport {\n REPORT_FORMATS,\n isReportFormat,\n type ReportFormat as FamilyFormat,\n} from \"../meta/index.js\";\nimport { LintError } from \"./types.js\";\nimport { runLint } from \"./commands/lint.js\";\nimport {\n runTemplateShow,\n runTemplates,\n runTemplatesInfer,\n} from \"./commands/templates.js\";\nimport { runTools } from \"./commands/tools.js\";\nimport { INFER_FORMATS, isInferFormat, type InferFormat } from \"./core/infer.js\";\nimport {\n LINT_JOBS,\n TOOLS_BY_JOB,\n loadConfig,\n rebaseConfig,\n} from \"./core/config.js\";\nimport { resolveStructureTool } from \"./tools/index.js\";\nimport {\n render,\n renderTemplates,\n renderTools,\n type ListFormat,\n type ReportFormat,\n} from \"./reporters/index.js\";\nimport {\n SHOW_FORMATS,\n isShowFormat,\n renderTemplateShow,\n type ShowFormat,\n} from \"./reporters/template-show.js\";\n\n/** The options `check` and `structure` share, in the family's spelling. */\ninterface InputCliOptions {\n /** `--collection <name>`, repeatable; commander's default value is `[]`. */\n collection: string[];\n /** `--ext <list>`; the command splits it. */\n ext?: string;\n /** `--exclude <glob>`, repeatable; commander's default value is `[]`. */\n exclude: string[];\n /** `--as <format>`: force a parser. */\n as?: string;\n /**\n * `-c, --config <path>` and `--no-config` share one commander attribute:\n * `undefined` with neither flag, the path with `-c`, `false` with\n * `--no-config`. Split by `configOption`.\n */\n config?: string | boolean;\n allowEmpty?: boolean;\n /** `--no-gitignore`. */\n gitignore: boolean;\n /** `-f, --format <format>`. Always a string: the declaration has a default. */\n format: string;\n}\n\n/** `structure` adds the options of the tool that performs the job. */\ninterface StructureCliOptions extends InputCliOptions {\n tool?: string;\n template?: string;\n /** `--templates <path>`, repeatable; commander's default value is `[]`. */\n templates: string[];\n explain?: boolean;\n}\n\n/** What commander parses for `templates`. */\ninterface TemplatesCommandOptions {\n templates: string[];\n config?: string | boolean;\n format: string;\n}\n\n/** What commander parses for `templates infer`. */\ninterface TemplatesInferCliOptions {\n as?: string;\n name?: string;\n config?: string | boolean;\n format: string;\n out?: string;\n force?: boolean;\n}\n\n/** What commander parses for `tools`. */\ninterface ToolsCommandOptions {\n config?: string | boolean;\n format: string;\n}\n\n// `explain` is reachable through `--explain`, not `-f`: it reports on\n// configuration rather than on documents, and offering it as a format would\n// invite `-f explain` alongside a lint that then never happens. The `-f` set\n// itself is the family's, from meta, rather than a fourth hand-kept copy of\n// the same five words.\nconst LIST_FORMATS = new Set<string>([\"pretty\", \"json\"]);\n\n/** The heading the tool's own options print under, after the shared ones. */\nconst TOOL_OPTIONS_GROUP = \"Tool options:\";\n\nfunction resolveColor(program: Command): boolean {\n // commander maps --no-color to opts.color === false.\n const noColor = program.opts().color === false;\n return shouldColor({ noColor, isTTY: process.stdout.isTTY });\n}\n\nfunction reportFormat(value: unknown): FamilyFormat {\n const format = String(value);\n if (!isReportFormat(format)) {\n throw new LintError(\n `Unknown --format \"${format}\". Use ${REPORT_FORMAT_LIST}.`,\n );\n }\n return format;\n}\n\n/**\n * Whether a clean run may print nothing at all in this format.\n *\n * Only `github` may: an empty annotation stream is a clean check. Every other\n * format owes its envelope - an empty JSON array, a SARIF log with no results,\n * a JUnit suite of passing testcases - because a consumer parsing stdout must\n * not have to treat \"no output\" as a third outcome. `explain` is never clean\n * or dirty; it always has something to say.\n */\nfunction omittedWhenClean(format: ReportFormat): boolean {\n return format !== \"explain\" && OMITTED_WHEN_CLEAN.has(format);\n}\n\nfunction listFormat(value: unknown): ListFormat {\n const format = String(value);\n if (!LIST_FORMATS.has(format)) {\n throw new LintError(\n `Unknown --format \"${format}\". Use pretty or json.`,\n );\n }\n return format as ListFormat;\n}\n\n/**\n * `templates infer -f`: the format a *template file* is written in, which is\n * not the set a report is rendered in. A template is YAML or JSON because those\n * are the two the loader reads back, and `pretty` would name a third thing the\n * tool cannot then load.\n */\nfunction inferFormat(value: unknown): InferFormat {\n const format = String(value);\n if (!isInferFormat(format)) {\n throw new LintError(`Unknown --format \"${format}\". Use yaml or json.`);\n }\n return format;\n}\n\n/** `templates show -f`: a report, a template's data, or a page skeleton. */\nfunction showFormat(value: unknown): ShowFormat {\n const format = String(value);\n if (!isShowFormat(format)) {\n throw new LintError(\n `Unknown --format \"${format}\". Use pretty, json or markdown.`,\n );\n }\n return format;\n}\n\n/**\n * `--tool <name>`: which tool performs the structure job. Refused by name\n * rather than ignored, because falling through to manni's engine would lint\n * with something other than what was asked for and say nothing.\n *\n * The refusal is the registry's, not a second copy of it here. `runLint`\n * refuses the same name with the same sentence for a caller that never touches\n * commander; this one fires first, so a bad `--tool` is reported before the\n * run asks what it was pointed at.\n */\nfunction assertStructureTool(value: string | undefined): void {\n if (value === undefined) return;\n resolveStructureTool(value);\n}\n\n/**\n * `-c/--config` and `--no-config`, in one place.\n *\n * Every verb here takes them, and they had been written out three times. A flag\n * two commands both have carries the same name *and* the same description, so\n * the declaration is shared rather than copied - which is what kept the fourth\n * copy, on `templates infer`, from spelling either of them slightly differently.\n */\nfunction withConfigOptions(command: Command): Command {\n return command\n .option(\"-c, --config <path>\", \"path to a manni config file\")\n .option(\"--no-config\", \"ignore any discovered config file\");\n}\n\n/**\n * The value of a flag a command and its parent both declare.\n *\n * Commander keeps parsing a parent's options past a subcommand name unless\n * `enablePositionalOptions()` is on, so `templates infer page.md -f json` sets\n * `format` on `templates` and leaves `infer` holding its own default. Both\n * commands declare `-f`, `-c` and `--no-config`, because \"commands must have\n * parallel behaviors\" and `infer` must list them in its own `--help`.\n *\n * Turning positional options on would fix it and move every other flag in this\n * program with it: `manni lint structure docs/ --no-color` is a root option\n * written after its command, and there are three more like it. So the lookup\n * changes instead. The nearest command actually *given* the flag wins, and the\n * subcommand's own default is the fallback - which is the reading a person\n * typing the line already has.\n */\nfunction optionValue(command: Command, key: string): unknown {\n for (\n let cmd: Command | null = command;\n cmd !== null;\n cmd = cmd.parent ?? null\n ) {\n if (cmd.getOptionValueSource(key) === \"cli\") return cmd.getOptionValue(key);\n }\n return command.getOptionValue(key);\n}\n\n/** The options every job verb takes, in one place so the two cannot drift. */\nfunction withInputOptions(command: Command): Command {\n command\n .argument(\n \"[paths...]\",\n \"files, directories, or globs to lint (use - for stdin)\",\n )\n .option(\n \"--collection <name>\",\n \"configured collection to run over; repeatable\",\n collect,\n [],\n )\n .option(\"--ext <list>\", \"comma-separated extensions for directory walks\")\n .option(\"--exclude <glob>\", \"glob to exclude; repeatable\", collect, [])\n .option(\"--as <format>\", \"force an input format (e.g. markdown, mdx)\")\n .option(\n \"-f, --format <format>\",\n `output: ${REPORT_FORMATS.join(\" | \")}`,\n \"pretty\",\n );\n return withConfigOptions(command)\n .option(\"--allow-empty\", \"treat zero matched files as success\")\n .option(\"--no-gitignore\", \"lint files .gitignore covers\");\n}\n\n/** The lint options every job verb turns its shared flags into. */\nfunction inputOptions(\n paths: string[],\n options: InputCliOptions,\n): {\n inputs: string[];\n collection: string[];\n exts?: string[];\n exclude: string[];\n as?: string;\n configPath?: string;\n noConfig?: boolean;\n allowEmpty?: boolean;\n respectGitignore?: boolean;\n onNotice: (message: string) => void;\n} {\n return {\n inputs: paths,\n collection: options.collection,\n ...(options.ext ? { exts: splitList(options.ext) } : {}),\n exclude: options.exclude,\n ...(options.as === undefined ? {} : { as: options.as }),\n ...configOption(options.config),\n // `undefined` rather than `false` when absent, so config still wins.\n ...(options.allowEmpty ? { allowEmpty: true } : {}),\n respectGitignore: explicitFalse(options.gitignore),\n onNotice: notice,\n };\n}\n\nexport function buildProgram(): Command {\n const program = new Command();\n program\n .name(\"lint\")\n .description(\n \"Validate document structure against doctype templates. Deterministic, CI-friendly.\",\n )\n .version(pkg.version, \"-V, --version\")\n .option(\"--no-color\", \"disable colored output\")\n .showHelpAfterError()\n // Exit code 1 is reserved for \"the docs are wrong\". Commander exits 1 on a\n // usage error by default, which would make a typo'd flag look exactly like\n // a failing lint to a workflow. With no callback, commander throws the\n // CommanderError instead, and the umbrella's runner maps it: help and\n // --version stay 0, every other usage error becomes 2. Commander has\n // already written its own message. This has to precede .command(), which\n // copies the callback into each subcommand.\n .exitOverride();\n\n /** Run one lint, render it, and settle the exit code. Both job verbs share it. */\n const lint = async (\n paths: string[],\n options: StructureCliOptions | InputCliOptions,\n command: Command,\n job: { tool?: StructureCliOptions } = {},\n ): Promise<void> => {\n const tool = job.tool;\n const format = reportFormat(options.format);\n const explain = tool?.explain === true;\n const stdinContent = paths.includes(STDIN_TOKEN) ? await readStdin() : undefined;\n const cwd = process.cwd();\n\n const run = await runLint({\n ...inputOptions(paths, options),\n ...(tool?.tool === undefined ? {} : { tool: tool.tool }),\n ...(tool?.template === undefined ? {} : { template: tool.template }),\n ...(tool && tool.templates.length > 0 ? { templates: tool.templates } : {}),\n ...(explain ? { explain: true } : {}),\n ...(stdinContent === undefined ? {} : { stdinContent }),\n // Which config governed the run, said where a report cannot be parsed\n // around: discovery walks up to the project boundary, so an unexpected\n // ancestor config is the difference between a five-minute diagnosis and\n // an hour of confusion.\n onConfigLoaded: reportConfig(format === \"pretty\", cwd),\n });\n\n const color = resolveColor(command.parent ?? command);\n const chosen: ReportFormat = explain ? \"explain\" : format;\n const text = render(run, chosen, { color });\n if (text.length > 0 || !omittedWhenClean(chosen)) {\n process.stdout.write(`${text}\\n`);\n }\n // `--explain` answers a question about configuration, so its exit code\n // reports whether it could answer it - not whether the docs are clean.\n //\n // That covers routing failures too: a page whose `type` matches no\n // template is a answered question, not an unanswered one, so it exits 0\n // like everything else here. Automation must not read this code as\n // \"everything routed\" - the ordinary run is what reports that, with exit\n // 1. Said in `--help` and the README, because the distinction is invisible\n // from the exit code alone.\n process.exitCode = explain ? 0 : run.summary.failed > 0 ? 1 : 0;\n };\n\n withInputOptions(\n program\n .command(\"check\")\n .description(\"Run every configured lint job over the given files/dirs/globs\"),\n )\n .addHelpText(\n \"after\",\n [\n \"\",\n \"Jobs: structure.\",\n \"\",\n \"Examples:\",\n \" manni lint check docs/ # every configured job\",\n \" manni lint check # targets from collections:\",\n \" manni lint check --collection guides\",\n ' manni lint check \"**/*.md\" -f github # CI annotations',\n \" cat page.md | manni lint check - --as markdown\",\n ].join(\"\\n\"),\n )\n .action(async (paths: string[], options: InputCliOptions, command: Command) => {\n try {\n // Which jobs this run covered, said once, beside the config line. The\n // full form also names the jobs that exist and are not configured;\n // `structure` is the only job there is, so today it is one word.\n if (options.format === \"pretty\") {\n process.stderr.write(`Checked: ${LINT_JOBS.join(\", \")}.\\n`);\n }\n await lint(paths, options, command);\n } catch (err) {\n fail(err);\n }\n });\n\n const structure = withInputOptions(\n program\n .command(\"structure\")\n .description(\n \"Lint document structure against doctype templates, routing each page by its `type`\",\n ),\n );\n structure\n .optionsGroup(TOOL_OPTIONS_GROUP)\n .option(\n \"--tool <name>\",\n `tool that performs the job: ${TOOLS_BY_JOB.structure.join(\", \")}`,\n )\n .option(\n \"-t, --template <ref>\",\n \"apply this template to every file, overriding type routing\",\n )\n .option(\n \"--templates <path>\",\n \"template file to route by: its `types:` win over built-ins; repeatable\",\n collect,\n [],\n )\n .option(\n \"--explain\",\n \"print how each file's template was chosen, and lint nothing (always exits 0, unrouted pages included)\",\n )\n .addHelpText(\n \"after\",\n [\n \"\",\n \"Examples:\",\n \" manni lint structure docs/ # route each page by its `type`\",\n \" manni lint structure docs/ --templates ./templates.yaml # add your own templates\",\n \" manni lint structure # targets from collections:\",\n \" manni lint structure docs/ --explain # show why each page routed where\",\n \" manni lint structure page.md -t tgdp:how-to:1.6 # force one template\",\n ' manni lint structure \"**/*.md\" -f github # CI annotations',\n \" manni lint structure docs/ --exclude '**/drafts/**'\",\n \" cat page.md | manni lint structure - -t tgdp:how-to:1.6 --as markdown\",\n ].join(\"\\n\"),\n )\n .action(\n async (paths: string[], options: StructureCliOptions, command: Command) => {\n try {\n assertStructureTool(options.tool);\n await lint(paths, options, command, { tool: options });\n } catch (err) {\n fail(err);\n }\n },\n );\n\n const templates = program\n .command(\"templates\")\n .description(\"List the templates that can be applied, and the types they serve\")\n .option(\n \"--templates <path>\",\n \"also list the templates in this file; repeatable\",\n collect,\n [],\n );\n withConfigOptions(templates)\n .option(\"-f, --format <format>\", \"output: pretty | json\", \"pretty\")\n .action(async (options: TemplatesCommandOptions, command: Command) => {\n try {\n const format = listFormat(options.format);\n // The listing answers \"what could route a page?\", so it has to see the\n // same template files a lint would - rebased the same way, or it would\n // answer for a different set of files depending on where it was run.\n const { configPath, noConfig } = configOption(options.config);\n const found = noConfig ? null : await loadConfig(configPath);\n const info = await runTemplates({\n templates:\n options.templates.length > 0\n ? options.templates\n : rebaseConfig(found).templates,\n });\n const color = resolveColor(command.parent ?? command);\n process.stdout.write(`${renderTemplates(info, format, { color })}\\n`);\n } catch (err) {\n fail(err);\n }\n });\n\n const inferCommand = templates\n .command(\"infer\")\n .description(\"Write a first template from a page that already has the shape you want\")\n .argument(\"<page>\", \"one file to infer from (use - for stdin)\")\n .option(\"--as <format>\", \"force an input format (e.g. markdown, mdx)\")\n .option(\n \"--name <name>\",\n \"name for the template; defaults to the page's `type`, else its filename\",\n )\n .option(\"-f, --format <format>\", `output: ${INFER_FORMATS.join(\" | \")}`, \"yaml\")\n .option(\"-o, --out <path>\", \"write the template here instead of to stdout\")\n .option(\"--force\", \"overwrite the --out path\");\n withConfigOptions(inferCommand)\n .addHelpText(\n \"after\",\n [\n \"\",\n \"Examples:\",\n \" manni lint templates infer docs/guides/install.md\",\n \" manni lint templates infer docs/guides/install.md --name how-to\",\n \" manni lint templates infer page.mdx -f json\",\n \" manni lint templates infer page.md -o ./templates.yaml\",\n \" manni lint templates infer page.md -o ./templates.yaml --force\",\n \" cat page.md | manni lint templates infer - --as markdown\",\n \"\",\n \"One page, and every rule it writes is exactly one occurrence: a single\",\n \"page cannot show what varies. Loosening a heading into a list or a\",\n \"pattern, setting `min: 0`, and adding a trailing rule with no heading\",\n \"for the sections that may follow are your edits to make.\",\n ].join(\"\\n\"),\n )\n .action(\n async (\n page: string,\n options: TemplatesInferCliOptions,\n command: Command,\n ) => {\n try {\n // `-f`, `-c` and `--no-config` are read through `optionValue`: the\n // parent `templates` declares all three, and commander hands it any\n // of them typed after `infer`.\n const format = inferFormat(optionValue(command, \"format\"));\n const { configPath, noConfig } = configOption(\n optionValue(command, \"config\"),\n );\n const stdinContent =\n page === STDIN_TOKEN ? await readStdin() : undefined;\n const result = await runTemplatesInfer({\n page,\n format,\n ...(options.as === undefined ? {} : { as: options.as }),\n ...(options.name === undefined ? {} : { name: options.name }),\n ...(options.out === undefined ? {} : { out: options.out }),\n ...(options.force === undefined ? {} : { force: options.force }),\n ...(configPath === undefined ? {} : { configPath }),\n ...(noConfig === undefined ? {} : { noConfig }),\n ...(stdinContent === undefined ? {} : { stdinContent }),\n // The template is the primary output, so with no --out it owns\n // stdout and the config line goes to stderr beside it. With --out\n // stdout is free, and the line still belongs on stderr: a reader\n // piping nothing is not a reason to move a diagnostic.\n onConfigLoaded: reportConfig(false, process.cwd()),\n });\n\n if (result.written === undefined) {\n process.stdout.write(result.text);\n return;\n }\n // Said on stderr, so `-o` leaves stdout empty for a shell that is\n // watching it, and the template file is the whole output.\n process.stderr.write(\n `Wrote template \"${result.name}\" to ${result.written}\\n`,\n );\n } catch (err) {\n fail(err);\n }\n },\n );\n\n templates\n .command(\"show\")\n .description(\n \"Print what a template asks for: each section, how often it may occur, what it must contain, and what it is for\",\n )\n .argument(\n \"<ref>\",\n \"template to show: a built-in id, a path, a path#name, or a URL\",\n )\n .option(\"-f, --format <format>\", `output: ${SHOW_FORMATS.join(\" | \")}`, \"pretty\")\n .addHelpText(\n \"after\",\n [\n \"\",\n \"Examples:\",\n \" manni lint templates show tgdp:how-to:1.6\",\n \" manni lint templates show ./templates.yaml#how-to\",\n \" manni lint templates show tgdp:reference:1.6 -f json\",\n \" manni lint templates show tgdp:how-to:1.6 -f markdown > docs/rotate-key.md\",\n ].join(\"\\n\"),\n )\n .action(async (ref: string, _options: unknown, command: Command) => {\n try {\n // `-f` is read through `optionValue`: the parent `templates` declares\n // it too, and commander hands it any `-f` typed after `show`.\n const format = showFormat(optionValue(command, \"format\"));\n const show = await runTemplateShow({ ref });\n const color = resolveColor(program);\n process.stdout.write(`${renderTemplateShow(show, format, { color })}\\n`);\n } catch (err) {\n fail(err);\n }\n });\n\n withConfigOptions(\n program\n .command(\"tools\")\n .description(\n \"List the lint jobs, the tool that performs each, and what it reads\",\n ),\n )\n .option(\"-f, --format <format>\", \"output: pretty | json\", \"pretty\")\n .action(async (options: ToolsCommandOptions, command: Command) => {\n try {\n const format = listFormat(options.format);\n const tools = await runTools(configOption(options.config));\n const color = resolveColor(command.parent ?? command);\n process.stdout.write(`${renderTools(tools, format, { color })}\\n`);\n } catch (err) {\n fail(err);\n }\n });\n\n return program;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBA,SAAS,eAAe;AAiHxB,IAAM,eAAe,oBAAI,IAAY,CAAC,UAAU,MAAM,CAAC;AAGvD,IAAM,qBAAqB;AAE3B,SAAS,aAAa,SAA2B;AAE/C,QAAM,UAAU,QAAQ,KAAK,EAAE,UAAU;AACzC,SAAO,YAAY,EAAE,SAAS,OAAO,QAAQ,OAAO,MAAM,CAAC;AAC7D;AAEA,SAAS,aAAa,OAA8B;AAClD,QAAM,SAAS,OAAO,KAAK;AAC3B,MAAI,CAAC,eAAe,MAAM,GAAG;AAC3B,UAAM,IAAI;AAAA,MACR,qBAAqB,MAAM,UAAU,kBAAkB;AAAA,IACzD;AAAA,EACF;AACA,SAAO;AACT;AAWA,SAAS,iBAAiB,QAA+B;AACvD,SAAO,WAAW,aAAa,mBAAmB,IAAI,MAAM;AAC9D;AAEA,SAAS,WAAW,OAA4B;AAC9C,QAAM,SAAS,OAAO,KAAK;AAC3B,MAAI,CAAC,aAAa,IAAI,MAAM,GAAG;AAC7B,UAAM,IAAI;AAAA,MACR,qBAAqB,MAAM;AAAA,IAC7B;AAAA,EACF;AACA,SAAO;AACT;AAQA,SAAS,YAAY,OAA6B;AAChD,QAAM,SAAS,OAAO,KAAK;AAC3B,MAAI,CAAC,cAAc,MAAM,GAAG;AAC1B,UAAM,IAAI,UAAU,qBAAqB,MAAM,sBAAsB;AAAA,EACvE;AACA,S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