@hawkeyexl/manni 4.21.0 → 4.23.0
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-C534YIAU.js → batch-DPYBMRVD.js} +21 -22
- package/dist/build-LEKUMGEC.js +36 -0
- package/dist/calibrate-TYONPNG4.js +42 -0
- package/dist/capture-2EPHIAZT.js +37 -0
- package/dist/check-ADCSXGBK.js +57 -0
- package/dist/check-HWEDHABD.js +30 -0
- package/dist/check-J2KQI7IW.js +33 -0
- package/dist/check-L5AUSTE6.js +57 -0
- package/dist/{check-LKPQPQWJ.js → check-SQVQE4E4.js} +23 -23
- package/dist/{chunk-D4QHRVDJ.js → chunk-2GPF4OEF.js} +3 -157
- package/dist/chunk-2GPF4OEF.js.map +1 -0
- package/dist/{chunk-IOJD2RFG.js → chunk-2MOXVM6H.js} +2 -2
- package/dist/{chunk-762MM6NA.js → chunk-2QK25SLZ.js} +4 -4
- package/dist/{chunk-HHJ2HFPP.js → chunk-2UJOQ6CB.js} +9 -9
- package/dist/{chunk-H5YWCCBO.js → chunk-3CBGLUJX.js} +3 -3
- package/dist/{chunk-E23KWEPL.js → chunk-3USSSKLA.js} +2 -2
- package/dist/{chunk-PTGXEZQD.js → chunk-3ZVRGBK6.js} +4 -4
- package/dist/{chunk-XI3BNZG4.js → chunk-5JXA75XB.js} +46 -7
- package/dist/chunk-5JXA75XB.js.map +1 -0
- package/dist/{chunk-IN5T22FP.js → chunk-6QNA7UX2.js} +2 -2
- package/dist/{chunk-CZIO37J5.js → chunk-6RENCXLC.js} +10 -5
- package/dist/chunk-6RENCXLC.js.map +1 -0
- package/dist/{chunk-WHVFHBL3.js → chunk-72UN462G.js} +11 -3
- package/dist/chunk-72UN462G.js.map +1 -0
- package/dist/{chunk-OWJLB2AF.js → chunk-76Y3JATE.js} +2 -2
- package/dist/chunk-7M3MBFG7.js +38 -0
- package/dist/chunk-7M3MBFG7.js.map +1 -0
- package/dist/{chunk-BHGFLRXM.js → chunk-7NSFGAAQ.js} +8 -7
- package/dist/chunk-7NSFGAAQ.js.map +1 -0
- package/dist/{chunk-3SFAB75L.js → chunk-AJCUKL43.js} +6 -6
- package/dist/{chunk-CREFJCWZ.js → chunk-AOLCEULZ.js} +8 -8
- package/dist/{chunk-Q76T6Y6X.js → chunk-AZKNB2T3.js} +3635 -3409
- package/dist/chunk-AZKNB2T3.js.map +1 -0
- package/dist/{chunk-2NGFDLIM.js → chunk-B4ECIBLF.js} +4 -4
- package/dist/{chunk-5UJKXOAD.js → chunk-B4POKRCS.js} +6 -6
- package/dist/chunk-BA7BQBWV.js +311 -0
- package/dist/chunk-BA7BQBWV.js.map +1 -0
- package/dist/{chunk-KBSTXL6L.js → chunk-BOCJTOKA.js} +4 -4
- package/dist/{chunk-CFMI74TP.js → chunk-BZ74YUYE.js} +2 -2
- package/dist/{chunk-NLJ3XIKT.js → chunk-C2QE4FSZ.js} +3 -3
- package/dist/{chunk-DENZLZ3Z.js → chunk-CLUUSZDY.js} +26 -17
- package/dist/chunk-CLUUSZDY.js.map +1 -0
- package/dist/{chunk-PACZEDOH.js → chunk-CWPRB7SA.js} +19 -15
- package/dist/chunk-CWPRB7SA.js.map +1 -0
- package/dist/{chunk-245W2Q7C.js → chunk-D4BGNAN5.js} +2 -2
- package/dist/{chunk-XBJKYXOR.js → chunk-DWUK6YNX.js} +11 -11
- package/dist/{chunk-MTCOBRCX.js → chunk-E75CMOR3.js} +4 -4
- package/dist/{chunk-TFVNEPMF.js → chunk-EAF4K7IK.js} +4 -4
- package/dist/{chunk-TFVNEPMF.js.map → chunk-EAF4K7IK.js.map} +1 -1
- package/dist/{chunk-KCWNJMSS.js → chunk-EBBJFXMX.js} +3 -3
- package/dist/{chunk-LWBNHK72.js → chunk-EPN67ZNX.js} +47 -29
- package/dist/chunk-EPN67ZNX.js.map +1 -0
- package/dist/{chunk-6XK3NTL5.js → chunk-FBIBR4CH.js} +35 -40
- package/dist/chunk-FBIBR4CH.js.map +1 -0
- package/dist/{chunk-5LE4NH3Z.js → chunk-FJYIPHWK.js} +6 -4
- package/dist/{chunk-5LE4NH3Z.js.map → chunk-FJYIPHWK.js.map} +1 -1
- package/dist/{chunk-A4QNKEX4.js → chunk-GCHEVTCJ.js} +2 -2
- package/dist/{chunk-GMOAW2EG.js → chunk-GIHIONJH.js} +3 -2
- package/dist/chunk-GIHIONJH.js.map +1 -0
- package/dist/{chunk-P7HAXMFN.js → chunk-I4KDAO6P.js} +5 -3
- package/dist/{chunk-P7HAXMFN.js.map → chunk-I4KDAO6P.js.map} +1 -1
- package/dist/chunk-INOVEO32.js +28 -0
- package/dist/chunk-INOVEO32.js.map +1 -0
- package/dist/{chunk-B2242FYO.js → chunk-JF4BC7ZD.js} +38 -3
- package/dist/chunk-JF4BC7ZD.js.map +1 -0
- package/dist/{chunk-RKACUTY5.js → chunk-JZWQQOUN.js} +9 -11
- package/dist/{chunk-RKACUTY5.js.map → chunk-JZWQQOUN.js.map} +1 -1
- package/dist/{chunk-BXCVOHEX.js → chunk-K4YR4PY2.js} +15 -13
- package/dist/{chunk-BXCVOHEX.js.map → chunk-K4YR4PY2.js.map} +1 -1
- package/dist/{chunk-BXE4L52Q.js → chunk-KX6HRTLH.js} +6599 -3508
- package/dist/chunk-KX6HRTLH.js.map +1 -0
- package/dist/{chunk-V2XJJEEF.js → chunk-L3DOX3UL.js} +4 -4
- package/dist/{chunk-FHJIH6XP.js → chunk-LHP56Q45.js} +16 -7
- package/dist/chunk-LHP56Q45.js.map +1 -0
- package/dist/{chunk-BLXRIAV2.js → chunk-LT3STF5K.js} +29 -4
- package/dist/chunk-LT3STF5K.js.map +1 -0
- package/dist/{chunk-SHXPE4D4.js → chunk-MGQNGW6I.js} +2 -2
- package/dist/{chunk-SHXPE4D4.js.map → chunk-MGQNGW6I.js.map} +1 -1
- package/dist/{chunk-JUUCCML3.js → chunk-MPRVAMO3.js} +4 -4
- package/dist/{chunk-JQA6RF4R.js → chunk-N2T6RLSE.js} +2 -2
- package/dist/{chunk-JQA6RF4R.js.map → chunk-N2T6RLSE.js.map} +1 -1
- package/dist/{chunk-JCTHXG33.js → chunk-NHOGTAPK.js} +2 -2
- package/dist/{chunk-VM7VAFJW.js → chunk-NVYDWVXN.js} +2 -1
- package/dist/{chunk-ARNI3SJT.js → chunk-OL3Z7KPQ.js} +9 -9
- package/dist/chunk-P6LRDWMJ.js +1875 -0
- package/dist/chunk-P6LRDWMJ.js.map +1 -0
- package/dist/{chunk-NUQF5F5J.js → chunk-PNDEKFF3.js} +2 -2
- package/dist/chunk-QJGPOFNB.js +409 -0
- package/dist/chunk-QJGPOFNB.js.map +1 -0
- package/dist/{chunk-DMVBIIP3.js → chunk-QJL57GPX.js} +3 -3
- package/dist/{chunk-AE6KBAAU.js → chunk-QR55QXJ7.js} +11 -11
- package/dist/{chunk-BJUEOC4G.js → chunk-QWVIGKBM.js} +3 -3
- package/dist/{chunk-E7OG5F6S.js → chunk-RZ6OONZU.js} +13 -11
- package/dist/{chunk-E7OG5F6S.js.map → chunk-RZ6OONZU.js.map} +1 -1
- package/dist/{chunk-U4OJ7U45.js → chunk-SZMJ24FR.js} +9 -9
- package/dist/{chunk-KQDRO6N6.js → chunk-TLY44PCL.js} +2 -2
- package/dist/{chunk-VLRIP4BQ.js → chunk-TOVSR2YO.js} +2 -2
- package/dist/chunk-TT5UDTDM.js +888 -0
- package/dist/chunk-TT5UDTDM.js.map +1 -0
- package/dist/{chunk-2YKUSTHS.js → chunk-TVLIJ6ZM.js} +5 -5
- package/dist/{chunk-RQPEKHZH.js → chunk-UQYDLEBS.js} +80 -16
- package/dist/chunk-UQYDLEBS.js.map +1 -0
- package/dist/{chunk-GMLOAKOA.js → chunk-VSDXZAQU.js} +4 -22
- package/dist/chunk-VSDXZAQU.js.map +1 -0
- package/dist/{chunk-22WGKOQ7.js → chunk-VTJAY3WN.js} +7 -7
- package/dist/{chunk-DPDG3FHL.js → chunk-WHECOVH2.js} +3 -3
- package/dist/{chunk-BKY6GAFA.js → chunk-WPHPLVS3.js} +53 -918
- package/dist/chunk-WPHPLVS3.js.map +1 -0
- package/dist/{chunk-SSQZB5SQ.js → chunk-XG6PVB5S.js} +11 -1
- package/dist/chunk-XG6PVB5S.js.map +1 -0
- package/dist/{chunk-R2CR62JV.js → chunk-XVL7DYWM.js} +4 -4
- package/dist/{chunk-CLPC3LKX.js → chunk-Y4O737F7.js} +4 -4
- package/dist/{chunk-YSZNJ2ID.js → chunk-YBPXVBSY.js} +2 -2
- package/dist/{chunk-2HOWRAWK.js → chunk-YJHH2DHV.js} +2 -2
- package/dist/{chunk-APAF4VWW.js → chunk-YUCH6WJY.js} +6 -405
- package/dist/chunk-YUCH6WJY.js.map +1 -0
- package/dist/chunk-ZAOJYN2D.js +159 -0
- package/dist/chunk-ZAOJYN2D.js.map +1 -0
- package/dist/{cli-77A46SB2.js → cli-4R5HIGG4.js} +33 -21
- package/dist/{cli-77A46SB2.js.map → cli-4R5HIGG4.js.map} +1 -1
- package/dist/{cli-6NKE6RMT.js → cli-BF6KB3EJ.js} +34 -22
- package/dist/{cli-6NKE6RMT.js.map → cli-BF6KB3EJ.js.map} +1 -1
- package/dist/{cli-3PBRPPMQ.js → cli-DXOHHWZK.js} +16 -19
- package/dist/{cli-3PBRPPMQ.js.map → cli-DXOHHWZK.js.map} +1 -1
- package/dist/{cli-AVHLY2AI.js → cli-MPMECIQH.js} +154 -65
- package/dist/cli-MPMECIQH.js.map +1 -0
- package/dist/cli-NDYBQ755.js +152 -0
- package/dist/cli-NDYBQ755.js.map +1 -0
- package/dist/{cli-K47XWDLJ.js → cli-SJA66MIP.js} +29 -30
- package/dist/{cli-K47XWDLJ.js.map → cli-SJA66MIP.js.map} +1 -1
- package/dist/{cli-FDXU7CGZ.js → cli-TBAOKTMV.js} +16 -19
- package/dist/{cli-FDXU7CGZ.js.map → cli-TBAOKTMV.js.map} +1 -1
- package/dist/{cli-MQXOK64K.js → cli-TWGGMUXX.js} +89 -45
- package/dist/cli-TWGGMUXX.js.map +1 -0
- package/dist/{cli-FSDJY5OC.js → cli-V2BJYNMF.js} +4 -4
- package/dist/{cli-JNYL6LB7.js → cli-XGCK2LUV.js} +19 -22
- package/dist/{cli-JNYL6LB7.js.map → cli-XGCK2LUV.js.map} +1 -1
- package/dist/{cli-MOKRUHZT.js → cli-XXN75A42.js} +9 -11
- package/dist/cli.js +15 -15
- package/dist/cli.js.map +1 -1
- package/dist/{config-BMWDC66C.js → config-2YJPJ36T.js} +5 -5
- package/dist/docmeta.js +8 -10
- package/dist/docmeta.js.map +1 -1
- package/dist/github-NQQTH5JK.js +33 -0
- package/dist/github-NWL2XGE7.js +48 -0
- package/dist/github-WBIEYSM7.js +28 -0
- package/dist/graph/runtime.js.map +1 -1
- package/dist/{host-YSTYO5DX.js → host-JT27OWTC.js} +3 -3
- package/dist/index.d.ts +363 -25
- package/dist/index.js +289 -270
- package/dist/index.js.map +1 -1
- package/dist/json-IVHRVOGQ.js +40 -0
- package/dist/{json-YTKUFNO3.js → json-J4TONMKY.js} +2 -2
- package/dist/{json-YIK72XAL.js → json-QQAK73QQ.js} +12 -15
- package/dist/{labels-X633ZPK7.js → labels-VI2I5YFD.js} +11 -14
- package/dist/{labels-X633ZPK7.js.map → labels-VI2I5YFD.js.map} +1 -1
- package/dist/lint-VB5A3ENL.js +32 -0
- package/dist/list-3XRFX2Y3.js +33 -0
- package/dist/list-LMYCD5G5.js +37 -0
- package/dist/list-LOS7FTFD.js +30 -0
- package/dist/{page-OMPEACUN.js → page-3Y4EGYUO.js} +11 -14
- package/dist/{prepare-B4JVDVOV.js → prepare-JK6XKBZB.js} +20 -22
- package/dist/{prepare-B4JVDVOV.js.map → prepare-JK6XKBZB.js.map} +1 -1
- package/dist/{pretty-U7ATCFBN.js → pretty-DR4GHOJG.js} +12 -15
- package/dist/pretty-G2J5UEXC.js +41 -0
- package/dist/pretty-GCEIQ3FP.js +65 -0
- package/dist/{provider-JY2I3VLF.js → provider-YWNTTQPA.js} +3 -3
- package/dist/{release-VHHASAG7.js → release-EFLQT3FW.js} +3 -3
- package/dist/{reporters-FAIEOTC4.js → reporters-43LBUWEE.js} +11 -14
- package/dist/{reporters-KE7AZR6C.js → reporters-OWYFZD4S.js} +6 -6
- package/dist/run-G6G55SWJ.js +36 -0
- package/dist/{sarif-DOGRSGTB.js → sarif-CN7RSIKH.js} +10 -13
- package/dist/sarif-FR26WNVT.js +49 -0
- package/dist/sarif-GWTNYCZJ.js +28 -0
- package/dist/strategy-3EZUOE2T.js +59 -0
- package/dist/{term-MDN3NJDW.js → term-5WITRS3M.js} +21 -25
- package/dist/{term-MDN3NJDW.js.map → term-5WITRS3M.js.map} +1 -1
- package/dist/{validate-QDYQ642J.js → validate-TDIEFXRQ.js} +6 -7
- package/package.json +1 -1
- package/plugin/manni/.claude-plugin/plugin.json +1 -1
- package/plugin/manni/hooks/graph-server.mjs +3 -3
- package/plugin/manni/hooks/page-metadata.mjs +81 -7
- package/plugin/manni/skills/fix/SKILL.md +3 -3
- package/shapes/graph/shapes-1.3.0.ttl +1250 -0
- package/dist/build-SVKT7QFU.js +0 -39
- package/dist/calibrate-AL3MH7TY.js +0 -43
- package/dist/capture-2F7B4DAD.js +0 -39
- package/dist/check-BI7OGIVE.js +0 -48
- package/dist/check-JZINDP3F.js +0 -45
- package/dist/check-OPUMZEVK.js +0 -35
- package/dist/check-OW7UD73D.js +0 -33
- package/dist/chunk-6XK3NTL5.js.map +0 -1
- package/dist/chunk-APAF4VWW.js.map +0 -1
- package/dist/chunk-B2242FYO.js.map +0 -1
- package/dist/chunk-BHGFLRXM.js.map +0 -1
- package/dist/chunk-BKY6GAFA.js.map +0 -1
- package/dist/chunk-BLXRIAV2.js.map +0 -1
- package/dist/chunk-BXE4L52Q.js.map +0 -1
- package/dist/chunk-CZIO37J5.js.map +0 -1
- package/dist/chunk-D4QHRVDJ.js.map +0 -1
- package/dist/chunk-D5GBYKDU.js +0 -164
- package/dist/chunk-D5GBYKDU.js.map +0 -1
- package/dist/chunk-DENZLZ3Z.js.map +0 -1
- package/dist/chunk-FHJIH6XP.js.map +0 -1
- package/dist/chunk-GMLOAKOA.js.map +0 -1
- package/dist/chunk-GMOAW2EG.js.map +0 -1
- package/dist/chunk-LWBNHK72.js.map +0 -1
- package/dist/chunk-PACZEDOH.js.map +0 -1
- package/dist/chunk-Q76T6Y6X.js.map +0 -1
- package/dist/chunk-RQPEKHZH.js.map +0 -1
- package/dist/chunk-RWXR3GJI.js +0 -441
- package/dist/chunk-RWXR3GJI.js.map +0 -1
- package/dist/chunk-S5G6T4VC.js +0 -3200
- package/dist/chunk-S5G6T4VC.js.map +0 -1
- package/dist/chunk-SSQZB5SQ.js.map +0 -1
- package/dist/chunk-UP6NBQ62.js +0 -2
- package/dist/chunk-WHVFHBL3.js.map +0 -1
- package/dist/chunk-XI3BNZG4.js.map +0 -1
- package/dist/chunk-ZPLVANY2.js +0 -15
- package/dist/chunk-ZPLVANY2.js.map +0 -1
- package/dist/cli-AVHLY2AI.js.map +0 -1
- package/dist/cli-LP5OE3BL.js +0 -84
- package/dist/cli-LP5OE3BL.js.map +0 -1
- package/dist/cli-MQXOK64K.js.map +0 -1
- package/dist/github-6GYTPSGV.js +0 -35
- package/dist/github-DJOLVNDD.js +0 -31
- package/dist/github-ZF2TQ3RP.js +0 -35
- package/dist/json-Y7625EFE.js +0 -42
- package/dist/lint-RF3B55W7.js +0 -35
- package/dist/list-5DW4QZ7P.js +0 -36
- package/dist/list-7CHWJ633.js +0 -39
- package/dist/list-UNWG6NPD.js +0 -33
- package/dist/pretty-PPNHHOEN.js +0 -52
- package/dist/pretty-XGYQ25PH.js +0 -43
- package/dist/run-MHJ3AYKG.js +0 -39
- package/dist/sarif-MIEMQOIK.js +0 -30
- package/dist/sarif-RGRG7VFX.js +0 -36
- package/dist/strategy-EK5VY5DG.js +0 -223
- package/dist/strategy-EK5VY5DG.js.map +0 -1
- /package/dist/{batch-C534YIAU.js.map → batch-DPYBMRVD.js.map} +0 -0
- /package/dist/{build-SVKT7QFU.js.map → build-LEKUMGEC.js.map} +0 -0
- /package/dist/{calibrate-AL3MH7TY.js.map → calibrate-TYONPNG4.js.map} +0 -0
- /package/dist/{capture-2F7B4DAD.js.map → capture-2EPHIAZT.js.map} +0 -0
- /package/dist/{check-BI7OGIVE.js.map → check-ADCSXGBK.js.map} +0 -0
- /package/dist/{check-JZINDP3F.js.map → check-HWEDHABD.js.map} +0 -0
- /package/dist/{check-OPUMZEVK.js.map → check-J2KQI7IW.js.map} +0 -0
- /package/dist/{check-OW7UD73D.js.map → check-L5AUSTE6.js.map} +0 -0
- /package/dist/{check-LKPQPQWJ.js.map → check-SQVQE4E4.js.map} +0 -0
- /package/dist/{chunk-IOJD2RFG.js.map → chunk-2MOXVM6H.js.map} +0 -0
- /package/dist/{chunk-762MM6NA.js.map → chunk-2QK25SLZ.js.map} +0 -0
- /package/dist/{chunk-HHJ2HFPP.js.map → chunk-2UJOQ6CB.js.map} +0 -0
- /package/dist/{chunk-H5YWCCBO.js.map → chunk-3CBGLUJX.js.map} +0 -0
- /package/dist/{chunk-E23KWEPL.js.map → chunk-3USSSKLA.js.map} +0 -0
- /package/dist/{chunk-PTGXEZQD.js.map → chunk-3ZVRGBK6.js.map} +0 -0
- /package/dist/{chunk-IN5T22FP.js.map → chunk-6QNA7UX2.js.map} +0 -0
- /package/dist/{chunk-OWJLB2AF.js.map → chunk-76Y3JATE.js.map} +0 -0
- /package/dist/{chunk-3SFAB75L.js.map → chunk-AJCUKL43.js.map} +0 -0
- /package/dist/{chunk-CREFJCWZ.js.map → chunk-AOLCEULZ.js.map} +0 -0
- /package/dist/{chunk-2NGFDLIM.js.map → chunk-B4ECIBLF.js.map} +0 -0
- /package/dist/{chunk-5UJKXOAD.js.map → chunk-B4POKRCS.js.map} +0 -0
- /package/dist/{chunk-KBSTXL6L.js.map → chunk-BOCJTOKA.js.map} +0 -0
- /package/dist/{chunk-CFMI74TP.js.map → chunk-BZ74YUYE.js.map} +0 -0
- /package/dist/{chunk-NLJ3XIKT.js.map → chunk-C2QE4FSZ.js.map} +0 -0
- /package/dist/{chunk-245W2Q7C.js.map → chunk-D4BGNAN5.js.map} +0 -0
- /package/dist/{chunk-XBJKYXOR.js.map → chunk-DWUK6YNX.js.map} +0 -0
- /package/dist/{chunk-MTCOBRCX.js.map → chunk-E75CMOR3.js.map} +0 -0
- /package/dist/{chunk-KCWNJMSS.js.map → chunk-EBBJFXMX.js.map} +0 -0
- /package/dist/{chunk-A4QNKEX4.js.map → chunk-GCHEVTCJ.js.map} +0 -0
- /package/dist/{chunk-V2XJJEEF.js.map → chunk-L3DOX3UL.js.map} +0 -0
- /package/dist/{chunk-JUUCCML3.js.map → chunk-MPRVAMO3.js.map} +0 -0
- /package/dist/{chunk-JCTHXG33.js.map → chunk-NHOGTAPK.js.map} +0 -0
- /package/dist/{chunk-VM7VAFJW.js.map → chunk-NVYDWVXN.js.map} +0 -0
- /package/dist/{chunk-ARNI3SJT.js.map → chunk-OL3Z7KPQ.js.map} +0 -0
- /package/dist/{chunk-NUQF5F5J.js.map → chunk-PNDEKFF3.js.map} +0 -0
- /package/dist/{chunk-DMVBIIP3.js.map → chunk-QJL57GPX.js.map} +0 -0
- /package/dist/{chunk-AE6KBAAU.js.map → chunk-QR55QXJ7.js.map} +0 -0
- /package/dist/{chunk-BJUEOC4G.js.map → chunk-QWVIGKBM.js.map} +0 -0
- /package/dist/{chunk-U4OJ7U45.js.map → chunk-SZMJ24FR.js.map} +0 -0
- /package/dist/{chunk-KQDRO6N6.js.map → chunk-TLY44PCL.js.map} +0 -0
- /package/dist/{chunk-VLRIP4BQ.js.map → chunk-TOVSR2YO.js.map} +0 -0
- /package/dist/{chunk-2YKUSTHS.js.map → chunk-TVLIJ6ZM.js.map} +0 -0
- /package/dist/{chunk-22WGKOQ7.js.map → chunk-VTJAY3WN.js.map} +0 -0
- /package/dist/{chunk-DPDG3FHL.js.map → chunk-WHECOVH2.js.map} +0 -0
- /package/dist/{chunk-R2CR62JV.js.map → chunk-XVL7DYWM.js.map} +0 -0
- /package/dist/{chunk-CLPC3LKX.js.map → chunk-Y4O737F7.js.map} +0 -0
- /package/dist/{chunk-YSZNJ2ID.js.map → chunk-YBPXVBSY.js.map} +0 -0
- /package/dist/{chunk-2HOWRAWK.js.map → chunk-YJHH2DHV.js.map} +0 -0
- /package/dist/{cli-FSDJY5OC.js.map → cli-V2BJYNMF.js.map} +0 -0
- /package/dist/{chunk-UP6NBQ62.js.map → cli-XXN75A42.js.map} +0 -0
- /package/dist/{cli-MOKRUHZT.js.map → config-2YJPJ36T.js.map} +0 -0
- /package/dist/{config-BMWDC66C.js.map → github-NQQTH5JK.js.map} +0 -0
- /package/dist/{github-6GYTPSGV.js.map → github-NWL2XGE7.js.map} +0 -0
- /package/dist/{github-DJOLVNDD.js.map → github-WBIEYSM7.js.map} +0 -0
- /package/dist/{github-ZF2TQ3RP.js.map → host-JT27OWTC.js.map} +0 -0
- /package/dist/{host-YSTYO5DX.js.map → json-IVHRVOGQ.js.map} +0 -0
- /package/dist/{json-Y7625EFE.js.map → json-J4TONMKY.js.map} +0 -0
- /package/dist/{json-YIK72XAL.js.map → json-QQAK73QQ.js.map} +0 -0
- /package/dist/{json-YTKUFNO3.js.map → lint-VB5A3ENL.js.map} +0 -0
- /package/dist/{lint-RF3B55W7.js.map → list-3XRFX2Y3.js.map} +0 -0
- /package/dist/{list-5DW4QZ7P.js.map → list-LMYCD5G5.js.map} +0 -0
- /package/dist/{list-7CHWJ633.js.map → list-LOS7FTFD.js.map} +0 -0
- /package/dist/{list-UNWG6NPD.js.map → page-3Y4EGYUO.js.map} +0 -0
- /package/dist/{page-OMPEACUN.js.map → pretty-DR4GHOJG.js.map} +0 -0
- /package/dist/{pretty-PPNHHOEN.js.map → pretty-G2J5UEXC.js.map} +0 -0
- /package/dist/{pretty-U7ATCFBN.js.map → pretty-GCEIQ3FP.js.map} +0 -0
- /package/dist/{pretty-XGYQ25PH.js.map → provider-YWNTTQPA.js.map} +0 -0
- /package/dist/{release-VHHASAG7.js.map → release-EFLQT3FW.js.map} +0 -0
- /package/dist/{provider-JY2I3VLF.js.map → reporters-43LBUWEE.js.map} +0 -0
- /package/dist/{reporters-FAIEOTC4.js.map → reporters-OWYFZD4S.js.map} +0 -0
- /package/dist/{reporters-KE7AZR6C.js.map → run-G6G55SWJ.js.map} +0 -0
- /package/dist/{run-MHJ3AYKG.js.map → sarif-CN7RSIKH.js.map} +0 -0
- /package/dist/{sarif-DOGRSGTB.js.map → sarif-FR26WNVT.js.map} +0 -0
- /package/dist/{sarif-MIEMQOIK.js.map → sarif-GWTNYCZJ.js.map} +0 -0
- /package/dist/{sarif-RGRG7VFX.js.map → strategy-3EZUOE2T.js.map} +0 -0
- /package/dist/{validate-QDYQ642J.js.map → validate-TDIEFXRQ.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/tracevals/cli.ts"],"sourcesContent":["/**\n * The tracevals program. Named `tracevals` because that is where it is\n * mounted (`manni tracevals …`); `src/cli.ts` adds it to the umbrella and\n * runs it. Thin commander wrapper; all behavior lives in commands.\n */\nimport { Command } from \"commander\";\nimport pkg from \"../../package.json\" with { type: \"json\" };\nimport { collect, configOption } from \"../shared/cli-options.js\";\nimport { LOCAL_FLAG_HELP } from \"../shared/providers.js\";\nimport { fail } from \"../shared/run.js\";\nimport { terminalConfirm } from \"../shared/prompt.js\";\nimport { colorFor } from \"../shared/color.js\";\nimport { notice } from \"../shared/warn.js\";\nimport { renderList, runList } from \"./commands/list.js\";\nimport { runFill } from \"./commands/fill.js\";\nimport { runRun } from \"./commands/run.js\";\nimport { TracevalsError } from \"./types.js\";\nimport { allowExecutionMessage, isExecutionGrant } from \"../shared/execution.js\";\nimport {\n CALIBRATE_FORMATS,\n REPORT_FORMATS,\n SUMMARY_FORMATS,\n parseFormat,\n type ReportFormat,\n type SummaryFormat,\n} from \"./reporters/index.js\";\n\nconst { version } = pkg;\n\nexport function buildProgram(): Command {\nconst program = new Command();\n\nprogram\n .name(\"tracevals\")\n .description(\n \"Deterministic and LLM-as-judge adherence evals for AI agent session traces.\",\n )\n .version(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\ninterface ConfigFlags {\n /** `-c <path>` gives a string, `--no-config` gives false, neither gives undefined. */\n config?: string | boolean;\n}\n\ninterface RunFlags extends ConfigFlags {\n project?: string;\n provider?: string;\n model?: string;\n local?: boolean;\n offline?: boolean;\n runs?: number;\n deterministicOnly?: boolean;\n cache?: boolean;\n maxTurns?: number;\n format?: ReportFormat;\n output?: string;\n history?: boolean;\n failOnReview?: boolean;\n allowExecution?: string[];\n execution?: boolean;\n require?: string[];\n reportUnusedArtifacts?: boolean;\n manifest?: string;\n allProjects?: boolean;\n newerThan?: string;\n limit?: number;\n}\n\n/**\n * Repeatable execution grant, validated on the way in. An unknown value is a\n * usage error rather than a grant that quietly matches nothing.\n */\nfunction collectGrant(value: string, previous: string[]): string[] {\n if (!isExecutionGrant(value)) fail(new TracevalsError(allowExecutionMessage(value)));\n return [...previous, value];\n}\n\n/**\n * `-c, --config <path>` and `--no-config`, on every verb that reads config.\n *\n * Declared once so the four cannot drift apart on a name or a description,\n * the way docevals' `documentInputs()` does it. `list` is the one verb without\n * them: it enumerates the session store and reads no config at all, and an\n * accepted flag that quietly does nothing is worse than an absent one.\n */\nfunction addConfigFlags(cmd: Command): Command {\n return cmd\n .option(\"-c, --config <path>\", \"Path to manni.config.yaml\")\n .option(\"--no-config\", \"Ignore any discovered config file\");\n}\n\n/** The config flags as the command cores take them. */\nfunction configOptions(opts: ConfigFlags): {\n config?: string;\n noConfig?: boolean;\n} {\n const { configPath, noConfig } = configOption(opts.config);\n return {\n ...(configPath === undefined ? {} : { config: configPath }),\n ...(noConfig === true ? { noConfig } : {}),\n };\n}\n\n/**\n * Commander argument parser for `-f/--format`. Routes through `fail()` for the\n * reason the numeric checks below do: commander only special-cases\n * InvalidArgumentError, so any other exception escapes `program.parse()`\n * uncaught — a stack trace and exit 1, when a bad flag owes exit 2.\n */\nfunction 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\nconst range = (min: number, max: number): string =>\n Number.isFinite(max) ? `between ${min} and ${max}` : `of at least ${min}`;\n\n/**\n * A numeric flag, checked before anything reads it.\n *\n * `parseFloat(\"abc\")` is NaN, and every comparison against NaN is false — so a\n * flag that failed to parse does **not** fall back to the config. `undefined`\n * is what defers to the config, and NaN is not undefined: it survives the `??`\n * overlay and lands in the runtime as a limit that can never be reached. A\n * budget of NaN bills without a ceiling while the report still claims one,\n * which is the most expensive way for a safety limit to fail. Range checks\n * therefore test for a *finite* number, not only for the range.\n */\nfunction numeric(\n name: string,\n value: number | undefined,\n min: number,\n max: number = Number.POSITIVE_INFINITY,\n): void {\n if (value === undefined) return;\n if (Number.isFinite(value) && value >= min && value <= max) return;\n throw new TracevalsError(\n `${name} must be a number ${range(min, max)}, got ${value}`,\n );\n}\n\n/**\n * The same for a count. Kept apart from `numeric` because a fraction is never\n * meant here: `--limit 2.5` and `--limit -1` both reach `slice(0, n)`, where\n * the negative one silently evaluates every trace except the oldest.\n */\nfunction whole(\n name: string,\n value: number | undefined,\n min: number,\n max: number = Number.POSITIVE_INFINITY,\n): void {\n if (value === undefined) return;\n if (Number.isInteger(value) && value >= min && value <= max) return;\n throw new TracevalsError(\n `${name} must be a whole number ${range(min, max)}, got ${value}`,\n );\n}\n\n/**\n * The single mapping from `addRunFlags`' options onto the shared run options.\n *\n * `run` and `calibrate` accept the same flags, and `calibrate` used to\n * hand-copy the list, which is how it came to accept a flag and drop it on\n * the floor. `addRunFlags`' own docstring says an accepted flag that\n * quietly does nothing is worse than an absent one, so there is now one place\n * to add a flag rather than two places to remember.\n *\n * Validation lives here for the same reason: both commands get it, or neither.\n */\nfunction sharedRunOptions(opts: RunFlags) {\n whole(\"--runs\", opts.runs, 1);\n whole(\"--limit\", opts.limit, 1);\n whole(\"--max-turns\", opts.maxTurns, 1);\n\n return {\n ...configOptions(opts),\n project: opts.project,\n provider: opts.provider,\n model: opts.model,\n local: opts.local,\n // `undefined` rather than `false` when absent, so a future config\n // `offline:` still decides on a run where the flag was never typed.\n offline: opts.offline ? true : undefined,\n runs: opts.runs,\n deterministicOnly: opts.deterministicOnly,\n noCache: opts.cache === false,\n maxTurns: opts.maxTurns,\n format: opts.format ?? \"pretty\",\n output: opts.output,\n // Undefined when neither spelling is passed, so the config still decides.\n // Both spellings are declared for precisely that reason: commander\n // defaults a lone `--no-x` to `true`, which makes the config's own value\n // unreachable from the command line.\n failOnReview: opts.failOnReview,\n // Commander's default is `[]`, which is \"no flag\", not \"run nothing\": only\n // a list someone typed narrows the run, and `--no-execution` runs none.\n ...(opts.execution === false\n ? { allowExecution: [] }\n : (opts.allowExecution ?? []).length > 0\n ? { allowExecution: opts.allowExecution }\n : {}),\n reportUnusedArtifacts: opts.reportUnusedArtifacts,\n ...(opts.require !== undefined ? { require: opts.require } : {}),\n ...(opts.allProjects !== undefined ? { allProjects: opts.allProjects } : {}),\n ...(opts.newerThan !== undefined ? { newerThan: opts.newerThan } : {}),\n ...(opts.limit !== undefined ? { limit: opts.limit } : {}),\n };\n}\n\nasync function executeRun(traces: string[], opts: RunFlags, color: boolean) {\n const shared = {\n ...sharedRunOptions(opts),\n color,\n // Run-only, both of them: `--history` is a point in one session's\n // timeline, and a manifest belongs to exactly one session (ADR 01024).\n history: opts.history,\n ...(opts.manifest !== undefined ? { manifest: opts.manifest } : {}),\n };\n\n // What decides the report shape is *how traces were selected*, not how many\n // came back. One named trace is a `RunReport`, byte for byte as before; a\n // discovery selector is a `BatchReport` even when it matches exactly one, so\n // a script piping `--format json` gets a stable shape (ADR 01018).\n const selecting =\n opts.allProjects === true ||\n opts.newerThan !== undefined ||\n opts.limit !== undefined;\n\n if (traces.length > 1 || selecting) {\n if (opts.manifest !== undefined) {\n // Each trace finds its own manifest by convention; one named file cannot\n // be evidence about more than the session it was captured for.\n throw new TracevalsError(\n \"--manifest names one session's manifest, so it cannot be used with a corpus; drop it and each trace will find its own\",\n );\n }\n const { runBatch } = await import(\"./commands/batch.js\");\n const { report, rendered } = await runBatch({\n ...shared,\n ...(traces.length > 0 ? { traces } : {}),\n });\n console.log(rendered);\n process.exitCode = report.exitCode;\n return;\n }\n\n let trace = traces[0];\n if (trace === undefined) {\n // The interactive picker needs a TTY; scripted callers must name a trace.\n if (!process.stdout.isTTY || !process.stdin.isTTY) {\n throw new TracevalsError(\n \"no trace given; pass a trace file or run `manni tracevals list`\",\n );\n }\n const { pickTrace } = await import(\"./trace/picker.js\");\n trace = await pickTrace();\n }\n const { report, rendered } = await runRun({ ...shared, tracePath: trace });\n console.log(rendered);\n process.exitCode = report.exitCode;\n}\n\n/**\n * Flags shared by `run` and `calibrate`. `--history` is run-only: calibration\n * is a measurement of a corpus, not a point in one session's timeline, and an\n * accepted flag that quietly does nothing is worse than an absent one.\n */\nfunction addRunFlags(\n cmd: Command,\n options: { history?: boolean; formats?: readonly ReportFormat[] } = {},\n): Command {\n const withHistory = options.history !== false;\n const formats = options.formats ?? REPORT_FORMATS;\n const base = addConfigFlags(cmd)\n .option(\n \"--project <dir>\",\n \"artifact-lookup root (overrides the trace's recorded cwd)\",\n )\n .option(\n \"--provider <name>\",\n \"Judge provider: auto (default) | anthropic | openai | claude-cli | llama-cpp\",\n )\n .option(\n \"--model <model>\",\n \"Model override; needs a named provider, from here or config\",\n )\n .option(\"--local\", LOCAL_FLAG_HELP)\n // `Number`, not `parseInt`: parseInt truncates, so `--runs 1.5` would be\n // silently accepted as 1 and `--runs 1e3` as 1. `whole()` below refuses\n // what Number keeps.\n .option(\"--runs <n>\", \"ensemble runs per eval\", (v) => Number(v))\n .option(\"--deterministic-only\", \"skip LLM-judged evals\")\n .option(\n \"--offline\",\n \"never fetch a remote manifest; read external metadata from local manifests\",\n )\n .option(\"--no-cache\", \"bypass the judge cache\")\n .option(\n \"--max-turns <n>\",\n \"Stop after this many ensemble runs (a cached ensemble costs none)\",\n (v) => Number(v),\n )\n .option(\n \"-f, --format <format>\",\n `Output format: ${formats.join(\" | \")}`,\n parseFormatArg(\"--format\", formats),\n \"pretty\" as ReportFormat,\n )\n .option(\"-o, --output <file>\", \"also write the report to a file\")\n .option(\n \"--report-unused-artifacts\",\n \"list every skill and agent the session was offered and never used\",\n )\n .option(\"--fail-on-review\", \"Exit 1 when any eval lands in the human-review zone (the default)\")\n .option(\"--no-fail-on-review\", \"Do not fail the run on evals left for human review\")\n // `<kind>`, not `<kind...>`: a variadic option greedily eats the\n // positional `[traces...]` that follow it. Repeat the flag instead.\n .option(\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(\n \"--require <module>\",\n \"load a grader plugin; repeatable, and added to config plugins\",\n collect,\n [],\n )\n .option(\"--all-projects\", \"evaluate every project's traces in the session store\")\n .option(\n \"--newer-than <duration>\",\n \"only traces modified within this window, such as 30m, 24h, 7d or 2w\",\n )\n .option(\"--limit <n>\", \"maximum traces to evaluate\", (v) => Number(v));\n return withHistory\n ? base.option(\n \"--history\",\n \"append to history and compare with the previous run\",\n )\n : base;\n}\n\naddRunFlags(\n // No `isDefault` (proposal 0034): `run` is a verb, so a bare\n // `manni tracevals` prints the help and exits 2, and a trace path with no\n // verb is commander's unknown-command refusal rather than a silent run.\n program\n .command(\"run [traces...]\")\n .description(\n \"Evaluate one or more traces against the skills and instructions they used\",\n ),\n)\n // Run-only, and single-trace-only: a manifest belongs to exactly one session\n // (ADR 01024). A corpus still picks one up per trace by convention — this\n // flag is for naming one outright, which only a single trace can mean.\n .option(\n \"--manifest <file>\",\n \"session manifest to compare artifacts against; without it one is looked for beside the trace and under the project\",\n )\n .action(async (traces: string[], opts: RunFlags, command: Command) => {\n try {\n await executeRun(traces, opts, colorFor(command, process.stdout.isTTY));\n } catch (e) {\n fail(e);\n }\n });\n\n// `calibrate` shares `run`'s flags because it *is* a run — plus the labels it\n// is measured against. Kept a separate command rather than a flag on `run`:\n// the report answers a different question and carries a different shape, and\n// a script must be able to tell which it is asking for (ADR 01022).\naddRunFlags(\n program\n .command(\"calibrate [traces...]\")\n .description(\n \"Measure judged and graded verdicts against a labels file: false passes, false fails, and review volume\",\n )\n .option(\n \"--labels <file>\",\n \"calibration labels sidecar (default: calibrate.labels)\",\n )\n .option(\n \"--sweep\",\n \"re-score the corpus across the configured grid of zones and ensemble sizes, from cached verdicts\",\n )\n .option(\"--max-false-pass <n>\", \"exit 1 above this many false passes\", (v) =>\n Number(v),\n )\n .option(\"--max-false-fail <n>\", \"exit 1 above this many false fails\", (v) =>\n Number(v),\n )\n .option(\n \"--max-review <n>\",\n \"exit 1 above this many needs-review outcomes\",\n (v) => Number(v),\n ),\n { history: false, formats: CALIBRATE_FORMATS },\n).action(\n async (\n traces: string[],\n opts: RunFlags & {\n labels?: string;\n sweep?: boolean;\n maxFalsePass?: number;\n maxFalseFail?: number;\n maxReview?: number;\n },\n command: Command,\n ) => {\n try {\n const shared = {\n ...sharedRunOptions(opts),\n color: colorFor(command, process.stdout.isTTY),\n };\n // A threshold that never trips looks exactly like a threshold that held.\n whole(\"--max-false-pass\", opts.maxFalsePass, 0);\n whole(\"--max-false-fail\", opts.maxFalseFail, 0);\n whole(\"--max-review\", opts.maxReview, 0);\n\n const { runCalibrate } = await import(\"./commands/calibrate.js\");\n const { report, rendered } = await runCalibrate({\n ...shared,\n ...(traces.length > 0 ? { traces } : {}),\n ...(opts.labels !== undefined ? { labels: opts.labels } : {}),\n ...(opts.sweep !== undefined ? { sweep: opts.sweep } : {}),\n ...(opts.maxFalsePass !== undefined\n ? { maxFalsePass: opts.maxFalsePass }\n : {}),\n ...(opts.maxFalseFail !== undefined\n ? { maxFalseFail: opts.maxFalseFail }\n : {}),\n ...(opts.maxReview !== undefined ? { maxReview: opts.maxReview } : {}),\n });\n console.log(rendered);\n process.exitCode = report.exitCode;\n } catch (e) {\n fail(e);\n }\n },\n);\n\naddConfigFlags(\n program\n .command(\"fill [paths...]\")\n .description(\n \"Propose evals for skills, agent definitions, and project rules, and write those above the confidence threshold\",\n ),\n)\n .option(\"--project <dir>\", \"project root to scan (default: current directory)\")\n // Repeatable, one value per occurrence, never split on commas — the family's\n // one-separator-per-list rule. It narrows what `fill` scans; there is no\n // `--collection`, because a docs collection is not an artifact set.\n .option(\"--exclude <glob>\", \"Glob to exclude (repeatable)\", collect, [])\n .option(\"--dry-run\", \"report proposals without writing them\")\n .option(\n \"--confidence <n>\",\n \"minimum confidence to write (0-1)\",\n (v) => parseFloat(v),\n )\n .option(\n \"--max-evals <n>\",\n \"maximum evals per artifact, including existing ones\",\n (v) => Number(v),\n )\n .option(\n \"--max-turns <n>\",\n \"Stop after this many inference calls (a cached artifact costs none)\",\n (v) => Number(v),\n )\n .option(\"--no-cache\", \"bypass the proposal cache\")\n .option(\n \"--provider <name>\",\n \"Provider: auto (default) | anthropic | openai | claude-cli | llama-cpp\",\n )\n .option(\n \"--model <model>\",\n \"Model override; needs a named provider, from here or config\",\n )\n .option(\"--local\", LOCAL_FLAG_HELP)\n .option(\n \"--offline\",\n \"never fetch a remote manifest; read external metadata from local manifests\",\n )\n .option(\n \"--require <module>\",\n \"load a grader plugin; repeatable, and added to config plugins\",\n collect,\n [],\n )\n .option(\n \"-f, --format <format>\",\n `Output format: ${SUMMARY_FORMATS.join(\" | \")}`,\n parseFormatArg(\"--format\", SUMMARY_FORMATS),\n \"pretty\" as SummaryFormat,\n )\n .action(async (paths: string[], opts: ConfigFlags & {\n project?: string;\n exclude?: string[];\n dryRun?: boolean;\n confidence?: number;\n maxEvals?: number;\n maxTurns?: number;\n cache?: boolean;\n provider?: string;\n model?: string;\n local?: boolean;\n offline?: boolean;\n require?: string[];\n format?: SummaryFormat;\n }, command: Command) => {\n try {\n numeric(\"--confidence\", opts.confidence, 0, 1);\n whole(\"--max-evals\", opts.maxEvals, 1);\n whole(\"--max-turns\", opts.maxTurns, 1);\n\n const { report, rendered } = await runFill({\n ...configOptions(opts),\n ...(paths.length > 0 ? { paths } : {}),\n ...(opts.project !== undefined ? { project: opts.project } : {}),\n ...(opts.exclude !== undefined ? { exclude: opts.exclude } : {}),\n ...(opts.dryRun !== undefined ? { dryRun: opts.dryRun } : {}),\n ...(opts.confidence !== undefined ? { confidence: opts.confidence } : {}),\n ...(opts.maxEvals !== undefined ? { maxEvals: opts.maxEvals } : {}),\n ...(opts.maxTurns !== undefined ? { maxTurns: opts.maxTurns } : {}),\n ...(opts.cache === false ? { noCache: true } : {}),\n ...(opts.provider !== undefined ? { provider: opts.provider } : {}),\n ...(opts.model !== undefined ? { model: opts.model } : {}),\n ...(opts.local !== undefined ? { local: opts.local } : {}),\n ...(opts.offline === true ? { offline: true } : {}),\n ...(opts.require !== undefined ? { require: opts.require } : {}),\n // P1 (proposal 0047): offered only on a terminal, where there is\n // someone to answer. Off one the block goes to the artifact and the\n // W1 line says so.\n confirm: terminalConfirm(),\n onNotice: notice,\n onRelocated: (result) => {\n const manifests = result.manifests.map((m) => m.file).join(\", \");\n notice(`moved ${String(result.summary.moved)} value(s) into ${manifests}.`);\n },\n color: colorFor(command, process.stdout.isTTY),\n });\n console.log(\n opts.format === \"json\" ? JSON.stringify(report, null, 2) : rendered,\n );\n process.exitCode = report.exitCode;\n } catch (e) {\n fail(e);\n }\n });\n\n// The one write path `run` never takes (ADR 01024). Meant for a `SessionStart`\n// hook, which is why it reads its payload on stdin and — in that mode — writes\n// its report to stderr: a SessionStart hook's stdout becomes model context.\naddConfigFlags(\n program\n .command(\"capture\")\n .description(\n \"Record a session manifest: sha256 of every instruction artifact plus the git SHA, read from a Claude Code hook payload on stdin\",\n ),\n)\n .option(\"--project <dir>\", \"project root to scan (default: the payload's cwd)\")\n .option(\"--session-id <id>\", \"session id (default: the payload's session_id)\")\n .option(\"-o, --out <file>\", \"write here instead of the configured directory\")\n .option(\n \"-f, --format <format>\",\n `Output format: ${SUMMARY_FORMATS.join(\" | \")}`,\n parseFormatArg(\"--format\", SUMMARY_FORMATS),\n \"pretty\" as SummaryFormat,\n )\n .action(async (opts: ConfigFlags & {\n project?: string;\n sessionId?: string;\n out?: string;\n format?: SummaryFormat;\n }) => {\n try {\n const { runCapture } = await import(\"./commands/capture.js\");\n const result = await runCapture({\n version,\n ...configOptions(opts),\n ...(opts.project !== undefined ? { project: opts.project } : {}),\n ...(opts.sessionId !== undefined ? { sessionId: opts.sessionId } : {}),\n ...(opts.out !== undefined ? { out: opts.out } : {}),\n format: opts.format ?? \"pretty\",\n });\n if (result.stdout !== \"\") console.log(result.stdout);\n // Hook mode's report, through the family's stderr writer rather than\n // `console.error`, so the `manni: ` prefix comes from `programName()`\n // and is never hand-spelled. `notice`, not `warn`: the report says what\n // this run did, so it is said every time rather than deduplicated.\n if (result.stderr !== \"\") notice(result.stderr);\n process.exitCode = result.exitCode;\n } catch (e) {\n fail(e);\n }\n });\n\n// Proposal 0079. `prepare` is meant for a SessionStart hook as `capture` is,\n// so under an envelope its report goes to stderr; a SessionStart hook's\n// stdout becomes model context.\naddConfigFlags(\n program\n .command(\"prepare\")\n .description(\n \"Fetch the local models judging needs and extract the rules of every file that applies to every session\",\n ),\n)\n .option(\"--project <dir>\", \"project root (default: the payload's cwd, else the current directory)\")\n .option(\"--no-cache\", \"extract again, even from cached sources\")\n .option(\"--offline\", \"refuse network providers, so only local models are fetched\")\n .option(\n \"-f, --format <format>\",\n `Output format: ${SUMMARY_FORMATS.join(\" | \")}`,\n parseFormatArg(\"--format\", SUMMARY_FORMATS),\n \"pretty\" as SummaryFormat,\n )\n .action(async (opts: ConfigFlags & {\n project?: string;\n cache?: boolean;\n offline?: boolean;\n format?: SummaryFormat;\n }) => {\n try {\n const { runPrepare } = await import(\"./commands/prepare.js\");\n const result = await runPrepare({\n ...configOptions(opts),\n ...(opts.project !== undefined ? { project: opts.project } : {}),\n ...(opts.cache === false ? { noCache: true } : {}),\n ...(opts.offline === true ? { offline: true } : {}),\n format: opts.format ?? \"pretty\",\n });\n if (result.stdout !== \"\") console.log(result.stdout);\n if (result.stderr !== \"\") notice(result.stderr);\n process.exitCode = result.exitCode;\n } catch (e) {\n fail(e);\n }\n });\n\n// `[traces...]` rather than `<trace>`, so a missing or second trace gets the\n// tool's own message and exit 2 instead of commander's.\naddConfigFlags(\n program\n .command(\"check [traces...]\")\n .description(\n \"Judge the last turn of one session against the rules that governed it\",\n ),\n)\n .option(\"--project <dir>\", \"project root for resolving sources (default: the trace's recorded cwd)\")\n .option(\n \"--provider <name>\",\n \"Judge provider: auto (default) | anthropic | openai | claude-cli | jev | llama-cpp\",\n )\n .option(\"--model <model>\", \"Judge model; needs a named provider, from here or config\")\n .option(\"--local\", LOCAL_FLAG_HELP)\n .option(\"--runs <n>\", \"judge calls per rule (overrides judge.ensembleRuns)\", (v) => Number(v))\n .option(\"--no-cache\", \"bypass the rules cache and the verdict cache\")\n .option(\"--offline\", \"refuse network providers; judge and extract with local models only\")\n .option(\n \"-f, --format <format>\",\n `Output format: ${SUMMARY_FORMATS.join(\" | \")}`,\n parseFormatArg(\"--format\", SUMMARY_FORMATS),\n \"pretty\" as SummaryFormat,\n )\n .option(\"-o, --output <file>\", \"also write the report to a file\")\n .action(async (traces: string[], opts: ConfigFlags & {\n project?: string;\n provider?: string;\n model?: string;\n local?: boolean;\n runs?: number;\n cache?: boolean;\n offline?: boolean;\n format?: SummaryFormat;\n output?: string;\n }, command: Command) => {\n try {\n const trace = traces[0];\n if (trace === undefined) {\n throw new TracevalsError(\"no trace given; pass a trace file or run manni tracevals list\");\n }\n if (traces.length > 1) {\n throw new TracevalsError(`tracevals check takes one trace, got ${String(traces.length)}`);\n }\n whole(\"--runs\", opts.runs, 1);\n const { runCheck } = await import(\"./commands/check.js\");\n const { report, rendered } = await runCheck({\n ...configOptions(opts),\n tracePath: trace,\n ...(opts.project !== undefined ? { project: opts.project } : {}),\n ...(opts.provider !== undefined ? { provider: opts.provider } : {}),\n ...(opts.model !== undefined ? { model: opts.model } : {}),\n ...(opts.local !== undefined ? { local: opts.local } : {}),\n ...(opts.runs !== undefined ? { runs: opts.runs } : {}),\n ...(opts.cache === false ? { noCache: true } : {}),\n ...(opts.offline === true ? { offline: true } : {}),\n format: opts.format ?? \"pretty\",\n ...(opts.output !== undefined ? { output: opts.output } : {}),\n color: colorFor(command, process.stdout.isTTY),\n });\n console.log(rendered);\n process.exitCode = report.exitCode;\n } catch (e) {\n fail(e);\n }\n });\n\n// No `-c`/`--no-config`: `release` reads no config, only the envelope.\nprogram\n .command(\"release\")\n .description(\"Return a session's lease on the model host, or with --all stop the host\")\n .option(\"--all\", \"drop every lease, unload every model and stop the host\")\n .option(\n \"-f, --format <format>\",\n `Output format: ${SUMMARY_FORMATS.join(\" | \")}`,\n parseFormatArg(\"--format\", SUMMARY_FORMATS),\n \"pretty\" as SummaryFormat,\n )\n .action(async (opts: { all?: boolean; format?: SummaryFormat }) => {\n try {\n const { runRelease } = await import(\"./commands/release.js\");\n const result = await runRelease({\n ...(opts.all === true ? { all: true } : {}),\n format: opts.format ?? \"pretty\",\n });\n if (result.stdout !== \"\") console.log(result.stdout);\n process.exitCode = result.exitCode;\n } catch (e) {\n fail(e);\n }\n });\n\nprogram\n .command(\"list\")\n .description(\"List discoverable traces (Claude Code session files)\")\n // The long spellings only, matching `run`: a short form that exists on one\n // verb and not on its sibling is exactly the drift \"commands must have\n // parallel behaviors\" exists to prevent.\n .option(\n \"--project <dir>\",\n \"project directory to scope to (default: current directory)\",\n )\n .option(\"--all-projects\", \"scan every project in the session store\")\n .option(\n \"--newer-than <duration>\",\n \"only traces modified within this window, such as 30m, 24h, 7d or 2w\",\n )\n .option(\"--limit <n>\", \"maximum traces to list\", (v) => Number(v))\n .option(\n \"-f, --format <format>\",\n `Output format: ${SUMMARY_FORMATS.join(\" | \")}`,\n parseFormatArg(\"--format\", SUMMARY_FORMATS),\n \"pretty\" as SummaryFormat,\n )\n // No `-c`/`--no-config`: `list` enumerates the session store and reads no\n // config at all, and an accepted flag that quietly does nothing is worse\n // than an absent one.\n .action(async (opts: {\n project?: string;\n allProjects?: boolean;\n newerThan?: string;\n limit?: number;\n format?: SummaryFormat;\n }, command: Command) => {\n try {\n // The same footgun as `run --limit`: `slice(0, -1)` lists everything but\n // the oldest, and reads as a shorter store rather than as a bad flag.\n whole(\"--limit\", opts.limit, 1);\n const run = await runList({\n project: opts.project,\n allProjects: opts.allProjects,\n ...(opts.newerThan !== undefined ? { newerThan: opts.newerThan } : {}),\n limit: opts.limit,\n });\n console.log(\n opts.format === \"json\"\n ? JSON.stringify(run, null, 2)\n : renderList(run, { color: colorFor(command, process.stdout.isTTY) }),\n );\n } catch (e) {\n fail(e);\n }\n });\n\nreturn program;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,SAAS,eAAe;AAsBxB,IAAM,EAAE,QAAQ,IAAI;AAEb,SAAS,eAAwB;AACxC,QAAM,UAAU,IAAI,QAAQ;AAE5B,UACG,KAAK,WAAW,EAChB;AAAA,IACC;AAAA,EACF,EACC,QAAQ,OAAO,EACf,OAAO,cAAc,wBAAwB,EAG7C,mBAAmB,wBAAwB,EAK3C,aAAa;AAmChB,WAAS,aAAa,OAAe,UAA8B;AACjE,QAAI,CAAC,iBAAiB,KAAK,EAAG,MAAK,IAAI,eAAe,sBAAsB,KAAK,CAAC,CAAC;AACnF,WAAO,CAAC,GAAG,UAAU,KAAK;AAAA,EAC5B;AAUA,WAAS,eAAe,KAAuB;AAC7C,WAAO,IACJ,OAAO,uBAAu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UAAI,OAAO,WAAW,GAAI,SAAQ,IAAI,OAAO,MAAM;AACnD,cAAQ,WAAW,OAAO;AAAA,IAC5B,SAAS,GAAG;AACV,WAAK,CAAC;AAAA,IACR;AAAA,EACF,CAAC;AAEH,UACG,QAAQ,MAAM,EACd,YAAY,sDAAsD,EAIlE;AAAA,IACC;AAAA,IACA;AAAA,EACF,EACC,OAAO,kBAAkB,yCAAyC,EAClE;AAAA,IACC;AAAA,IACA;AAAA,EACF,EACC,OAAO,eAAe,0BAA0B,CAAC,MAAM,OAAO,CAAC,CAAC,EAChE;AAAA,IACC;AAAA,IACA,kBAAkB,gBAAgB,KAAK,KAAK,CAAC;AAAA,IAC7C,eAAe,YAAY,eAAe;AAAA,IAC1C;AAAA,EACF,EAIC,OAAO,OAAO,MAMZ,YAAqB;AACtB,QAAI;AAGF,YAAM,WAAW,KAAK,OAAO,CAAC;AAC9B,YAAM,MAAM,MAAM,QAAQ;AAAA,QACxB,SAAS,KAAK;AAAA,QACd,aAAa,KAAK;AAAA,QAClB,GAAI,KAAK,cAAc,SAAY,EAAE,WAAW,KAAK,UAAU,IAAI,CAAC;AAAA,QACpE,OAAO,KAAK;AAAA,MACd,CAAC;AACD,cAAQ;AAAA,QACN,KAAK,WAAW,SACZ,KAAK,UAAU,KAAK,MAAM,CAAC,IAC3B,WAAW,KAAK,EAAE,OAAO,SAAS,SAAS,QAAQ,OAAO,KAAK,EAAE,CAAC;AAAA,MACxE;AAAA,IACF,SAAS,GAAG;AACV,WAAK,CAAC;AAAA,IACR;AAAA,EACF,CAAC;AAEH,SAAO;AACP;","names":["report","rendered"]}
|
|
1
|
+
{"version":3,"sources":["../src/tracevals/cli.ts"],"sourcesContent":["/**\n * The tracevals program. Named `tracevals` because that is where it is\n * mounted (`manni tracevals …`); `src/cli.ts` adds it to the umbrella and\n * runs it. Thin commander wrapper; all behavior lives in commands.\n */\nimport { Command } from \"commander\";\nimport pkg from \"../../package.json\" with { type: \"json\" };\nimport { collect, configOption } from \"../shared/cli-options.js\";\nimport { LOCAL_FLAG_HELP } from \"../shared/providers.js\";\nimport { fail } from \"../shared/run.js\";\nimport { terminalConfirm } from \"../shared/prompt.js\";\nimport { colorFor } from \"../shared/color.js\";\nimport { notice } from \"../shared/warn.js\";\nimport { renderList, runList } from \"./commands/list.js\";\nimport { runFill } from \"./commands/fill.js\";\nimport { runRun } from \"./commands/run.js\";\nimport { TracevalsError } from \"./types.js\";\nimport { allowExecutionMessage, isExecutionGrant } from \"../shared/execution.js\";\nimport {\n CALIBRATE_FORMATS,\n REPORT_FORMATS,\n SUMMARY_FORMATS,\n parseFormat,\n type ReportFormat,\n type SummaryFormat,\n} from \"./reporters/index.js\";\n\nconst { version } = pkg;\n\nexport function buildProgram(): Command {\nconst program = new Command();\n\nprogram\n .name(\"tracevals\")\n .description(\n \"Deterministic and LLM-as-judge adherence evals for AI agent session traces.\",\n )\n .version(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\ninterface ConfigFlags {\n /** `-c <path>` gives a string, `--no-config` gives false, neither gives undefined. */\n config?: string | boolean;\n}\n\ninterface RunFlags extends ConfigFlags {\n project?: string;\n provider?: string;\n model?: string;\n local?: boolean;\n offline?: boolean;\n runs?: number;\n deterministicOnly?: boolean;\n cache?: boolean;\n maxTurns?: number;\n format?: ReportFormat;\n output?: string;\n history?: boolean;\n failOnReview?: boolean;\n allowExecution?: string[];\n execution?: boolean;\n require?: string[];\n reportUnusedArtifacts?: boolean;\n manifest?: string;\n allProjects?: boolean;\n newerThan?: string;\n limit?: number;\n}\n\n/**\n * Repeatable execution grant, validated on the way in. An unknown value is a\n * usage error rather than a grant that quietly matches nothing.\n */\nfunction collectGrant(value: string, previous: string[]): string[] {\n if (!isExecutionGrant(value)) fail(new TracevalsError(allowExecutionMessage(value)));\n return [...previous, value];\n}\n\n/**\n * `-c, --config <path>` and `--no-config`, on every verb that reads config.\n *\n * Declared once so the four cannot drift apart on a name or a description,\n * the way docevals' `documentInputs()` does it. `list` is the one verb without\n * them: it enumerates the session store and reads no config at all, and an\n * accepted flag that quietly does nothing is worse than an absent one.\n */\nfunction addConfigFlags(cmd: Command): Command {\n return cmd\n .option(\"-c, --config <path>\", \"Path to manni.config.yaml\")\n .option(\"--no-config\", \"Ignore any discovered config file\");\n}\n\n/** The config flags as the command cores take them. */\nfunction configOptions(opts: ConfigFlags): {\n config?: string;\n noConfig?: boolean;\n} {\n const { configPath, noConfig } = configOption(opts.config);\n return {\n ...(configPath === undefined ? {} : { config: configPath }),\n ...(noConfig === true ? { noConfig } : {}),\n };\n}\n\n/**\n * Commander argument parser for `-f/--format`. Routes through `fail()` for the\n * reason the numeric checks below do: commander only special-cases\n * InvalidArgumentError, so any other exception escapes `program.parse()`\n * uncaught — a stack trace and exit 1, when a bad flag owes exit 2.\n */\nfunction 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\nconst range = (min: number, max: number): string =>\n Number.isFinite(max) ? `between ${min} and ${max}` : `of at least ${min}`;\n\n/**\n * A numeric flag, checked before anything reads it.\n *\n * `parseFloat(\"abc\")` is NaN, and every comparison against NaN is false — so a\n * flag that failed to parse does **not** fall back to the config. `undefined`\n * is what defers to the config, and NaN is not undefined: it survives the `??`\n * overlay and lands in the runtime as a limit that can never be reached. A\n * budget of NaN bills without a ceiling while the report still claims one,\n * which is the most expensive way for a safety limit to fail. Range checks\n * therefore test for a *finite* number, not only for the range.\n */\nfunction numeric(\n name: string,\n value: number | undefined,\n min: number,\n max: number = Number.POSITIVE_INFINITY,\n): void {\n if (value === undefined) return;\n if (Number.isFinite(value) && value >= min && value <= max) return;\n throw new TracevalsError(\n `${name} must be a number ${range(min, max)}, got ${value}`,\n );\n}\n\n/**\n * The same for a count. Kept apart from `numeric` because a fraction is never\n * meant here: `--limit 2.5` and `--limit -1` both reach `slice(0, n)`, where\n * the negative one silently evaluates every trace except the oldest.\n */\nfunction whole(\n name: string,\n value: number | undefined,\n min: number,\n max: number = Number.POSITIVE_INFINITY,\n): void {\n if (value === undefined) return;\n if (Number.isInteger(value) && value >= min && value <= max) return;\n throw new TracevalsError(\n `${name} must be a whole number ${range(min, max)}, got ${value}`,\n );\n}\n\n/**\n * The single mapping from `addRunFlags`' options onto the shared run options.\n *\n * `run` and `calibrate` accept the same flags, and `calibrate` used to\n * hand-copy the list, which is how it came to accept a flag and drop it on\n * the floor. `addRunFlags`' own docstring says an accepted flag that\n * quietly does nothing is worse than an absent one, so there is now one place\n * to add a flag rather than two places to remember.\n *\n * Validation lives here for the same reason: both commands get it, or neither.\n */\nfunction sharedRunOptions(opts: RunFlags) {\n whole(\"--runs\", opts.runs, 1);\n whole(\"--limit\", opts.limit, 1);\n whole(\"--max-turns\", opts.maxTurns, 1);\n\n return {\n ...configOptions(opts),\n project: opts.project,\n provider: opts.provider,\n model: opts.model,\n local: opts.local,\n // `undefined` rather than `false` when absent, so a future config\n // `offline:` still decides on a run where the flag was never typed.\n offline: opts.offline ? true : undefined,\n runs: opts.runs,\n deterministicOnly: opts.deterministicOnly,\n noCache: opts.cache === false,\n maxTurns: opts.maxTurns,\n format: opts.format ?? \"pretty\",\n output: opts.output,\n // Undefined when neither spelling is passed, so the config still decides.\n // Both spellings are declared for precisely that reason: commander\n // defaults a lone `--no-x` to `true`, which makes the config's own value\n // unreachable from the command line.\n failOnReview: opts.failOnReview,\n // Commander's default is `[]`, which is \"no flag\", not \"run nothing\": only\n // a list someone typed narrows the run, and `--no-execution` runs none.\n ...(opts.execution === false\n ? { allowExecution: [] }\n : (opts.allowExecution ?? []).length > 0\n ? { allowExecution: opts.allowExecution }\n : {}),\n reportUnusedArtifacts: opts.reportUnusedArtifacts,\n ...(opts.require !== undefined ? { require: opts.require } : {}),\n ...(opts.allProjects !== undefined ? { allProjects: opts.allProjects } : {}),\n ...(opts.newerThan !== undefined ? { newerThan: opts.newerThan } : {}),\n ...(opts.limit !== undefined ? { limit: opts.limit } : {}),\n };\n}\n\nasync function executeRun(traces: string[], opts: RunFlags, color: boolean) {\n const shared = {\n ...sharedRunOptions(opts),\n color,\n // Run-only, both of them: `--history` is a point in one session's\n // timeline, and a manifest belongs to exactly one session (ADR 01024).\n history: opts.history,\n ...(opts.manifest !== undefined ? { manifest: opts.manifest } : {}),\n };\n\n // What decides the report shape is *how traces were selected*, not how many\n // came back. One named trace is a `RunReport`, byte for byte as before; a\n // discovery selector is a `BatchReport` even when it matches exactly one, so\n // a script piping `--format json` gets a stable shape (ADR 01018).\n const selecting =\n opts.allProjects === true ||\n opts.newerThan !== undefined ||\n opts.limit !== undefined;\n\n if (traces.length > 1 || selecting) {\n if (opts.manifest !== undefined) {\n // Each trace finds its own manifest by convention; one named file cannot\n // be evidence about more than the session it was captured for.\n throw new TracevalsError(\n \"--manifest names one session's manifest, so it cannot be used with a corpus; drop it and each trace will find its own\",\n );\n }\n const { runBatch } = await import(\"./commands/batch.js\");\n const { report, rendered } = await runBatch({\n ...shared,\n ...(traces.length > 0 ? { traces } : {}),\n });\n console.log(rendered);\n process.exitCode = report.exitCode;\n return;\n }\n\n let trace = traces[0];\n if (trace === undefined) {\n // The interactive picker needs a TTY; scripted callers must name a trace.\n if (!process.stdout.isTTY || !process.stdin.isTTY) {\n throw new TracevalsError(\n \"no trace given; pass a trace file or run `manni tracevals list`\",\n );\n }\n const { pickTrace } = await import(\"./trace/picker.js\");\n trace = await pickTrace();\n }\n const { report, rendered } = await runRun({ ...shared, tracePath: trace });\n console.log(rendered);\n process.exitCode = report.exitCode;\n}\n\n/**\n * Flags shared by `run` and `calibrate`. `--history` is run-only: calibration\n * is a measurement of a corpus, not a point in one session's timeline, and an\n * accepted flag that quietly does nothing is worse than an absent one.\n */\nfunction addRunFlags(\n cmd: Command,\n options: { history?: boolean; formats?: readonly ReportFormat[] } = {},\n): Command {\n const withHistory = options.history !== false;\n const formats = options.formats ?? REPORT_FORMATS;\n const base = addConfigFlags(cmd)\n .option(\n \"--project <dir>\",\n \"artifact-lookup root (overrides the trace's recorded cwd)\",\n )\n .option(\n \"--provider <name>\",\n \"Judge provider: auto (default) | anthropic | openai | claude-cli | llama-cpp\",\n )\n .option(\n \"--model <model>\",\n \"Model override; needs a named provider, from here or config\",\n )\n .option(\"--local\", LOCAL_FLAG_HELP)\n // `Number`, not `parseInt`: parseInt truncates, so `--runs 1.5` would be\n // silently accepted as 1 and `--runs 1e3` as 1. `whole()` below refuses\n // what Number keeps.\n .option(\"--runs <n>\", \"ensemble runs per eval\", (v) => Number(v))\n .option(\"--deterministic-only\", \"skip LLM-judged evals\")\n .option(\n \"--offline\",\n \"never fetch a remote manifest; read external metadata from local manifests\",\n )\n .option(\"--no-cache\", \"bypass the judge cache\")\n .option(\n \"--max-turns <n>\",\n \"Stop after this many ensemble runs (a cached ensemble costs none)\",\n (v) => Number(v),\n )\n .option(\n \"-f, --format <format>\",\n `Output format: ${formats.join(\" | \")}`,\n parseFormatArg(\"--format\", formats),\n \"pretty\" as ReportFormat,\n )\n .option(\"-o, --output <file>\", \"also write the report to a file\")\n .option(\n \"--report-unused-artifacts\",\n \"list every skill and agent the session was offered and never used\",\n )\n .option(\"--fail-on-review\", \"Exit 1 when any eval lands in the human-review zone (the default)\")\n .option(\"--no-fail-on-review\", \"Do not fail the run on evals left for human review\")\n // `<kind>`, not `<kind...>`: a variadic option greedily eats the\n // positional `[traces...]` that follow it. Repeat the flag instead.\n .option(\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(\n \"--require <module>\",\n \"load a grader plugin; repeatable, and added to config plugins\",\n collect,\n [],\n )\n .option(\"--all-projects\", \"evaluate every project's traces in the session store\")\n .option(\n \"--newer-than <duration>\",\n \"only traces modified within this window, such as 30m, 24h, 7d or 2w\",\n )\n .option(\"--limit <n>\", \"maximum traces to evaluate\", (v) => Number(v));\n return withHistory\n ? base.option(\n \"--history\",\n \"append to history and compare with the previous run\",\n )\n : base;\n}\n\naddRunFlags(\n // No `isDefault` (proposal 0034): `run` is a verb, so a bare\n // `manni tracevals` prints the help and exits 2, and a trace path with no\n // verb is commander's unknown-command refusal rather than a silent run.\n program\n .command(\"run [traces...]\")\n .description(\n \"Evaluate one or more traces against the skills and instructions they used\",\n ),\n)\n // Run-only, and single-trace-only: a manifest belongs to exactly one session\n // (ADR 01024). A corpus still picks one up per trace by convention — this\n // flag is for naming one outright, which only a single trace can mean.\n .option(\n \"--manifest <file>\",\n \"session manifest to compare artifacts against; without it one is looked for beside the trace and under the project\",\n )\n .action(async (traces: string[], opts: RunFlags, command: Command) => {\n try {\n await executeRun(traces, opts, colorFor(command, process.stdout.isTTY));\n } catch (e) {\n fail(e);\n }\n });\n\n// `calibrate` shares `run`'s flags because it *is* a run — plus the labels it\n// is measured against. Kept a separate command rather than a flag on `run`:\n// the report answers a different question and carries a different shape, and\n// a script must be able to tell which it is asking for (ADR 01022).\naddRunFlags(\n program\n .command(\"calibrate [traces...]\")\n .description(\n \"Measure judged and graded verdicts against a labels file: false passes, false fails, and review volume\",\n )\n .option(\n \"--labels <file>\",\n \"calibration labels sidecar (default: calibrate.labels)\",\n )\n .option(\n \"--sweep\",\n \"re-score the corpus across the configured grid of zones and ensemble sizes, from cached verdicts\",\n )\n .option(\"--max-false-pass <n>\", \"exit 1 above this many false passes\", (v) =>\n Number(v),\n )\n .option(\"--max-false-fail <n>\", \"exit 1 above this many false fails\", (v) =>\n Number(v),\n )\n .option(\n \"--max-review <n>\",\n \"exit 1 above this many needs-review outcomes\",\n (v) => Number(v),\n ),\n { history: false, formats: CALIBRATE_FORMATS },\n).action(\n async (\n traces: string[],\n opts: RunFlags & {\n labels?: string;\n sweep?: boolean;\n maxFalsePass?: number;\n maxFalseFail?: number;\n maxReview?: number;\n },\n command: Command,\n ) => {\n try {\n const shared = {\n ...sharedRunOptions(opts),\n color: colorFor(command, process.stdout.isTTY),\n };\n // A threshold that never trips looks exactly like a threshold that held.\n whole(\"--max-false-pass\", opts.maxFalsePass, 0);\n whole(\"--max-false-fail\", opts.maxFalseFail, 0);\n whole(\"--max-review\", opts.maxReview, 0);\n\n const { runCalibrate } = await import(\"./commands/calibrate.js\");\n const { report, rendered } = await runCalibrate({\n ...shared,\n ...(traces.length > 0 ? { traces } : {}),\n ...(opts.labels !== undefined ? { labels: opts.labels } : {}),\n ...(opts.sweep !== undefined ? { sweep: opts.sweep } : {}),\n ...(opts.maxFalsePass !== undefined\n ? { maxFalsePass: opts.maxFalsePass }\n : {}),\n ...(opts.maxFalseFail !== undefined\n ? { maxFalseFail: opts.maxFalseFail }\n : {}),\n ...(opts.maxReview !== undefined ? { maxReview: opts.maxReview } : {}),\n });\n console.log(rendered);\n process.exitCode = report.exitCode;\n } catch (e) {\n fail(e);\n }\n },\n);\n\naddConfigFlags(\n program\n .command(\"fill [paths...]\")\n .description(\n \"Propose evals for skills, agent definitions, and project rules, and write those above the confidence threshold\",\n ),\n)\n .option(\"--project <dir>\", \"project root to scan (default: current directory)\")\n // Repeatable, one value per occurrence, never split on commas — the family's\n // one-separator-per-list rule. It narrows what `fill` scans; there is no\n // `--collection`, because a docs collection is not an artifact set.\n .option(\"--exclude <glob>\", \"Glob to exclude (repeatable)\", collect, [])\n .option(\"--dry-run\", \"report proposals without writing them\")\n .option(\n \"--confidence <n>\",\n \"minimum confidence to write (0-1)\",\n (v) => parseFloat(v),\n )\n .option(\n \"--max-evals <n>\",\n \"maximum evals per artifact, including existing ones\",\n (v) => Number(v),\n )\n .option(\n \"--max-turns <n>\",\n \"Stop after this many inference calls (a cached artifact costs none)\",\n (v) => Number(v),\n )\n .option(\"--no-cache\", \"bypass the proposal cache\")\n .option(\n \"--provider <name>\",\n \"Provider: auto (default) | anthropic | openai | claude-cli | llama-cpp\",\n )\n .option(\n \"--model <model>\",\n \"Model override; needs a named provider, from here or config\",\n )\n .option(\"--local\", LOCAL_FLAG_HELP)\n .option(\n \"--offline\",\n \"never fetch a remote manifest; read external metadata from local manifests\",\n )\n .option(\n \"--require <module>\",\n \"load a grader plugin; repeatable, and added to config plugins\",\n collect,\n [],\n )\n .option(\n \"-f, --format <format>\",\n `Output format: ${SUMMARY_FORMATS.join(\" | \")}`,\n parseFormatArg(\"--format\", SUMMARY_FORMATS),\n \"pretty\" as SummaryFormat,\n )\n .action(async (paths: string[], opts: ConfigFlags & {\n project?: string;\n exclude?: string[];\n dryRun?: boolean;\n confidence?: number;\n maxEvals?: number;\n maxTurns?: number;\n cache?: boolean;\n provider?: string;\n model?: string;\n local?: boolean;\n offline?: boolean;\n require?: string[];\n format?: SummaryFormat;\n }, command: Command) => {\n try {\n numeric(\"--confidence\", opts.confidence, 0, 1);\n whole(\"--max-evals\", opts.maxEvals, 1);\n whole(\"--max-turns\", opts.maxTurns, 1);\n\n const { report, rendered } = await runFill({\n ...configOptions(opts),\n ...(paths.length > 0 ? { paths } : {}),\n ...(opts.project !== undefined ? { project: opts.project } : {}),\n ...(opts.exclude !== undefined ? { exclude: opts.exclude } : {}),\n ...(opts.dryRun !== undefined ? { dryRun: opts.dryRun } : {}),\n ...(opts.confidence !== undefined ? { confidence: opts.confidence } : {}),\n ...(opts.maxEvals !== undefined ? { maxEvals: opts.maxEvals } : {}),\n ...(opts.maxTurns !== undefined ? { maxTurns: opts.maxTurns } : {}),\n ...(opts.cache === false ? { noCache: true } : {}),\n ...(opts.provider !== undefined ? { provider: opts.provider } : {}),\n ...(opts.model !== undefined ? { model: opts.model } : {}),\n ...(opts.local !== undefined ? { local: opts.local } : {}),\n ...(opts.offline === true ? { offline: true } : {}),\n ...(opts.require !== undefined ? { require: opts.require } : {}),\n // P1 (proposal 0047): offered only on a terminal, where there is\n // someone to answer. Off one the block goes to the artifact and the\n // W1 line says so.\n confirm: terminalConfirm(),\n onNotice: notice,\n onRelocated: (result) => {\n const manifests = result.manifests.map((m) => m.file).join(\", \");\n notice(`moved ${String(result.summary.moved)} value(s) into ${manifests}.`);\n },\n color: colorFor(command, process.stdout.isTTY),\n });\n console.log(\n opts.format === \"json\" ? JSON.stringify(report, null, 2) : rendered,\n );\n process.exitCode = report.exitCode;\n } catch (e) {\n fail(e);\n }\n });\n\n// The one write path `run` never takes (ADR 01024). Meant for a `SessionStart`\n// hook, which is why it reads its payload on stdin and — in that mode — writes\n// its report to stderr: a SessionStart hook's stdout becomes model context.\naddConfigFlags(\n program\n .command(\"capture\")\n .description(\n \"Record a session manifest: sha256 of every instruction artifact plus the git SHA, read from a Claude Code hook payload on stdin\",\n ),\n)\n .option(\"--project <dir>\", \"project root to scan (default: the payload's cwd)\")\n .option(\"--session-id <id>\", \"session id (default: the payload's session_id)\")\n .option(\"-o, --out <file>\", \"write here instead of the configured directory\")\n .option(\n \"-f, --format <format>\",\n `Output format: ${SUMMARY_FORMATS.join(\" | \")}`,\n parseFormatArg(\"--format\", SUMMARY_FORMATS),\n \"pretty\" as SummaryFormat,\n )\n .action(async (opts: ConfigFlags & {\n project?: string;\n sessionId?: string;\n out?: string;\n format?: SummaryFormat;\n }) => {\n try {\n const { runCapture } = await import(\"./commands/capture.js\");\n const result = await runCapture({\n version,\n ...configOptions(opts),\n ...(opts.project !== undefined ? { project: opts.project } : {}),\n ...(opts.sessionId !== undefined ? { sessionId: opts.sessionId } : {}),\n ...(opts.out !== undefined ? { out: opts.out } : {}),\n format: opts.format ?? \"pretty\",\n });\n if (result.stdout !== \"\") console.log(result.stdout);\n // Hook mode's report, through the family's stderr writer rather than\n // `console.error`, so the `manni: ` prefix comes from `programName()`\n // and is never hand-spelled. `notice`, not `warn`: the report says what\n // this run did, so it is said every time rather than deduplicated.\n if (result.stderr !== \"\") notice(result.stderr);\n process.exitCode = result.exitCode;\n } catch (e) {\n fail(e);\n }\n });\n\n// Proposal 0079. `prepare` is meant for a SessionStart hook as `capture` is,\n// so under an envelope its report goes to stderr; a SessionStart hook's\n// stdout becomes model context.\naddConfigFlags(\n program\n .command(\"prepare\")\n .description(\n \"Fetch the local models judging needs and extract the rules of every file that applies to every session\",\n ),\n)\n .option(\"--project <dir>\", \"project root (default: the payload's cwd, else the current directory)\")\n .option(\"--no-cache\", \"extract again, even from cached sources\")\n .option(\"--offline\", \"refuse network providers, so only local models are fetched\")\n .option(\n \"-f, --format <format>\",\n `Output format: ${SUMMARY_FORMATS.join(\" | \")}`,\n parseFormatArg(\"--format\", SUMMARY_FORMATS),\n \"pretty\" as SummaryFormat,\n )\n .action(async (opts: ConfigFlags & {\n project?: string;\n cache?: boolean;\n offline?: boolean;\n format?: SummaryFormat;\n }) => {\n try {\n const { runPrepare } = await import(\"./commands/prepare.js\");\n const result = await runPrepare({\n ...configOptions(opts),\n ...(opts.project !== undefined ? { project: opts.project } : {}),\n ...(opts.cache === false ? { noCache: true } : {}),\n ...(opts.offline === true ? { offline: true } : {}),\n format: opts.format ?? \"pretty\",\n });\n if (result.stdout !== \"\") console.log(result.stdout);\n if (result.stderr !== \"\") notice(result.stderr);\n process.exitCode = result.exitCode;\n } catch (e) {\n fail(e);\n }\n });\n\n// `[traces...]` rather than `<trace>`, so a missing or second trace gets the\n// tool's own message and exit 2 instead of commander's.\naddConfigFlags(\n program\n .command(\"check [traces...]\")\n .description(\n \"Judge the last turn of one session against the rules that governed it\",\n ),\n)\n .option(\"--project <dir>\", \"project root for resolving sources (default: the trace's recorded cwd)\")\n .option(\n \"--provider <name>\",\n \"Judge provider: auto (default) | anthropic | openai | claude-cli | jev | llama-cpp\",\n )\n .option(\"--model <model>\", \"Judge model; needs a named provider, from here or config\")\n .option(\"--local\", LOCAL_FLAG_HELP)\n .option(\"--runs <n>\", \"judge calls per rule (overrides judge.ensembleRuns)\", (v) => Number(v))\n .option(\"--no-cache\", \"bypass the rules cache and the verdict cache\")\n .option(\"--offline\", \"refuse network providers; judge and extract with local models only\")\n .option(\n \"-f, --format <format>\",\n `Output format: ${SUMMARY_FORMATS.join(\" | \")}`,\n parseFormatArg(\"--format\", SUMMARY_FORMATS),\n \"pretty\" as SummaryFormat,\n )\n .option(\"-o, --output <file>\", \"also write the report to a file\")\n .action(async (traces: string[], opts: ConfigFlags & {\n project?: string;\n provider?: string;\n model?: string;\n local?: boolean;\n runs?: number;\n cache?: boolean;\n offline?: boolean;\n format?: SummaryFormat;\n output?: string;\n }, command: Command) => {\n try {\n const trace = traces[0];\n if (trace === undefined) {\n throw new TracevalsError(\"no trace given; pass a trace file or run manni tracevals list\");\n }\n if (traces.length > 1) {\n throw new TracevalsError(`tracevals check takes one trace, got ${String(traces.length)}`);\n }\n whole(\"--runs\", opts.runs, 1);\n const { runCheck } = await import(\"./commands/check.js\");\n const { report, rendered } = await runCheck({\n ...configOptions(opts),\n tracePath: trace,\n ...(opts.project !== undefined ? { project: opts.project } : {}),\n ...(opts.provider !== undefined ? { provider: opts.provider } : {}),\n ...(opts.model !== undefined ? { model: opts.model } : {}),\n ...(opts.local !== undefined ? { local: opts.local } : {}),\n ...(opts.runs !== undefined ? { runs: opts.runs } : {}),\n ...(opts.cache === false ? { noCache: true } : {}),\n ...(opts.offline === true ? { offline: true } : {}),\n format: opts.format ?? \"pretty\",\n ...(opts.output !== undefined ? { output: opts.output } : {}),\n color: colorFor(command, process.stdout.isTTY),\n });\n console.log(rendered);\n process.exitCode = report.exitCode;\n } catch (e) {\n fail(e);\n }\n });\n\n// No `-c`/`--no-config`: `release` reads no config, only the envelope.\nprogram\n .command(\"release\")\n .description(\"Return a session's lease on the model host, or with --all stop the host\")\n .option(\"--all\", \"drop every lease, unload every model and stop the host\")\n .option(\n \"-f, --format <format>\",\n `Output format: ${SUMMARY_FORMATS.join(\" | \")}`,\n parseFormatArg(\"--format\", SUMMARY_FORMATS),\n \"pretty\" as SummaryFormat,\n )\n .action(async (opts: { all?: boolean; format?: SummaryFormat }) => {\n try {\n const { runRelease } = await import(\"./commands/release.js\");\n const result = await runRelease({\n ...(opts.all === true ? { all: true } : {}),\n format: opts.format ?? \"pretty\",\n });\n if (result.stdout !== \"\") console.log(result.stdout);\n process.exitCode = result.exitCode;\n } catch (e) {\n fail(e);\n }\n });\n\nprogram\n .command(\"list\")\n .description(\"List discoverable traces (Claude Code session files)\")\n // The long spellings only, matching `run`: a short form that exists on one\n // verb and not on its sibling is exactly the drift \"commands must have\n // parallel behaviors\" exists to prevent.\n .option(\n \"--project <dir>\",\n \"project directory to scope to (default: current directory)\",\n )\n .option(\"--all-projects\", \"scan every project in the session store\")\n .option(\n \"--newer-than <duration>\",\n \"only traces modified within this window, such as 30m, 24h, 7d or 2w\",\n )\n .option(\"--limit <n>\", \"maximum traces to list\", (v) => Number(v))\n .option(\n \"-f, --format <format>\",\n `Output format: ${SUMMARY_FORMATS.join(\" | \")}`,\n parseFormatArg(\"--format\", SUMMARY_FORMATS),\n \"pretty\" as SummaryFormat,\n )\n // No `-c`/`--no-config`: `list` enumerates the session store and reads no\n // config at all, and an accepted flag that quietly does nothing is worse\n // than an absent one.\n .action(async (opts: {\n project?: string;\n allProjects?: boolean;\n newerThan?: string;\n limit?: number;\n format?: SummaryFormat;\n }, command: Command) => {\n try {\n // The same footgun as `run --limit`: `slice(0, -1)` lists everything but\n // the oldest, and reads as a shorter store rather than as a bad flag.\n whole(\"--limit\", opts.limit, 1);\n const run = await runList({\n project: opts.project,\n allProjects: opts.allProjects,\n ...(opts.newerThan !== undefined ? { newerThan: opts.newerThan } : {}),\n limit: opts.limit,\n });\n console.log(\n opts.format === \"json\"\n ? JSON.stringify(run, null, 2)\n : renderList(run, { color: colorFor(command, process.stdout.isTTY) }),\n );\n } catch (e) {\n fail(e);\n }\n });\n\nreturn program;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAW,SACZ,KAAK,UAAU,KAAK,MAAM,CAAC,IAC3B,WAAW,KAAK,EAAE,OAAO,SAAS,SAAS,QAAQ,OAAO,KAAK,EAAE,CAAC;AAAA,MACxE;AAAA,IACF,SAAS,GAAG;AACV,WAAK,CAAC;AAAA,IACR;AAAA,EACF,CAAC;AAEH,SAAO;AACP;","names":["report","rendered"]}
|
|
@@ -3,42 +3,39 @@ import {
|
|
|
3
3
|
ANNOTATE_FORMATS,
|
|
4
4
|
renderAnnotate,
|
|
5
5
|
runAnnotate
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-B4POKRCS.js";
|
|
7
7
|
import {
|
|
8
8
|
SiteError,
|
|
9
9
|
resolvePlan
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-FHJIH6XP.js";
|
|
10
|
+
} from "./chunk-D4BGNAN5.js";
|
|
11
|
+
import "./chunk-C2QE4FSZ.js";
|
|
12
|
+
import "./chunk-MGQNGW6I.js";
|
|
14
13
|
import {
|
|
15
14
|
launcherCommandLine
|
|
16
15
|
} from "./chunk-ZMECS2IJ.js";
|
|
17
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-LHP56Q45.js";
|
|
17
|
+
import "./chunk-TOVSR2YO.js";
|
|
18
18
|
import "./chunk-TI4DA6DF.js";
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-762MM6NA.js";
|
|
25
|
-
import "./chunk-S5G6T4VC.js";
|
|
26
|
-
import "./chunk-BXE4L52Q.js";
|
|
19
|
+
import "./chunk-EBBJFXMX.js";
|
|
20
|
+
import "./chunk-B4ECIBLF.js";
|
|
21
|
+
import "./chunk-AZKNB2T3.js";
|
|
22
|
+
import "./chunk-2QK25SLZ.js";
|
|
23
|
+
import "./chunk-KX6HRTLH.js";
|
|
27
24
|
import "./chunk-DSWKBZWW.js";
|
|
28
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-QWVIGKBM.js";
|
|
29
26
|
import "./chunk-QK6VYJHV.js";
|
|
30
27
|
import "./chunk-RNVYGWIC.js";
|
|
31
28
|
import {
|
|
32
29
|
fail
|
|
33
30
|
} from "./chunk-YEUYKR62.js";
|
|
34
|
-
import "./chunk-
|
|
31
|
+
import "./chunk-JF4BC7ZD.js";
|
|
35
32
|
import {
|
|
36
33
|
notice
|
|
37
34
|
} from "./chunk-HX44GB4Z.js";
|
|
38
|
-
import "./chunk-
|
|
35
|
+
import "./chunk-NVYDWVXN.js";
|
|
39
36
|
import {
|
|
40
37
|
package_default
|
|
41
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-N2T6RLSE.js";
|
|
42
39
|
import "./chunk-OWBRDNRZ.js";
|
|
43
40
|
import {
|
|
44
41
|
errorMessage
|
|
@@ -377,4 +374,4 @@ function buildProgram() {
|
|
|
377
374
|
export {
|
|
378
375
|
buildProgram
|
|
379
376
|
};
|
|
380
|
-
//# sourceMappingURL=cli-
|
|
377
|
+
//# sourceMappingURL=cli-TBAOKTMV.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/site/cli.ts","../src/site/core/run.ts","../src/site/core/static-server.ts","../src/site/commands/run.ts"],"sourcesContent":["/**\n * The `site` domain's commander program. Mounted by `src/cli.ts` under\n * `manni site`; no entry point of its own. Like `key` (proposal 0045), `site`\n * is a family resource with verbs: the site every other domain checks\n * (proposal 0082). Four verbs, no default subcommand.\n *\n * `start`, `build` and `preview` print no report: the framework's output is\n * the output, on the inherited stdio. `annotate` (proposal 0095) prints its\n * own. manni's own lines are diagnostics on stderr. Exit `0` done, `2`\n * operational/usage, and never `1`, because nothing here is a finding.\n */\nimport { Command } from \"commander\";\nimport pkg from \"../../package.json\" with { type: \"json\" };\nimport { fail } from \"../shared/run.js\";\nimport { ANNOTATE_FORMATS, renderAnnotate, runAnnotate, type AnnotateFormat } from \"./commands/annotate.js\";\nimport { runSite } from \"./commands/run.js\";\nimport { SiteError } from \"./errors.js\";\nimport type { Verb } from \"./types.js\";\n\n/** What commander hands `annotate`'s action. */\ninterface AnnotateCliOptions {\n out?: string;\n chunks?: string;\n format: string;\n config?: string;\n}\n\nconst isAnnotateFormat = (value: string): value is AnnotateFormat => (ANNOTATE_FORMATS as readonly string[]).includes(value);\n\n/** What commander hands each verb's action. */\ninterface SiteCliOptions {\n /** `-c, --config <file>`. */\n config?: string;\n /** `--port <n>` as typed; `resolvePlan` validates it. start and preview only. */\n port?: string;\n /** `--host <host>`. start and preview only. */\n host?: string;\n}\n\n/**\n * Split a verb's operands into `[dir]` and what came after `--`.\n *\n * Commander drops the `--` itself, at whichever program met it first (here,\n * the umbrella), and hands everything after it on as operands. So `[dir]`\n * alone cannot tell `start -- --open` (no dir) from `start website`. The\n * process argv still has the `--`, and what follows it is the tail of the\n * operands; a tail that does not match (a program parsed from elsewhere) is\n * no passthrough at all.\n * ponytail: an option given `--` as its value (`--host --`) is misread as the\n * separator; nobody binds a host named `--`.\n */\nfunction splitOperands(args: readonly string[]): { dir: string | undefined; passthrough: string[]; extra: number } {\n const at = process.argv.indexOf(\"--\");\n const tail = at === -1 ? [] : process.argv.slice(at + 1);\n const start = args.length - tail.length;\n const passthrough = start >= 0 && tail.every((arg, i) => args[start + i] === arg) ? tail : [];\n const before = args.slice(0, args.length - passthrough.length);\n return { dir: before[0], passthrough, extra: before.length };\n}\n\nexport function buildProgram(): Command {\n const program = new Command();\n program\n .name(\"site\")\n .description(\"Start, build and preview the docs site\")\n .version(pkg.version, \"-V, --version\")\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 still\n // calling `process.exit(1)`.\n .exitOverride();\n\n const verb = (name: Verb, description: string, serves: boolean): void => {\n const cmd = program\n .command(name)\n .description(description)\n .argument(\"[dir]\", \"the site's directory (default: site.dir, else found by search)\")\n // Everything after `--` arrives as operands; splitOperands sorts them.\n .allowExcessArguments();\n if (serves) {\n cmd\n .option(\"--port <n>\", \"port, an integer from 1 to 65535 (default: a local collection url, else the framework's)\")\n .option(\"--host <host>\", \"host to bind (default: a local collection url, else the framework's)\");\n }\n cmd\n .option(\"-c, --config <file>\", \"path to a manni config file\")\n .action(async (_dir: string | undefined, options: SiteCliOptions, self: Command) => {\n const { dir, passthrough, extra } = splitOperands(self.args);\n if (extra > 1) {\n self.error(\n `error: too many arguments for '${name}'. Expected 1 argument but got ${String(extra)}.`,\n { code: \"commander.excessArguments\" },\n );\n }\n try {\n process.exitCode = await runSite(name, {\n cwd: process.cwd(),\n dir,\n configPath: options.config,\n port: options.port,\n host: options.host,\n passthrough,\n });\n } catch (err) {\n fail(err);\n }\n });\n };\n\n verb(\"start\", \"Run the docs framework's dev server\", true);\n verb(\"build\", \"Build the docs site\", false);\n verb(\"preview\", \"Build the docs site, then serve the output\", true);\n\n program\n .command(\"annotate\")\n .description(\"Join the graph's pins and statements to the built site, as data attributes\")\n .argument(\"[dir]\", \"the site's directory (default: site.dir, else found by search)\")\n .option(\"--out <dir>\", \"the built site to annotate (default: site.out, else the framework's output)\")\n .option(\"--chunks <file>\", \"the chunk manifest graph publish writes (default: chunks.json beside graph.out)\")\n .option(\"-f, --format <format>\", `output: ${ANNOTATE_FORMATS.join(\" | \")}`, \"pretty\")\n .option(\"-c, --config <file>\", \"path to a manni config file\")\n .action((dir: string | undefined, options: AnnotateCliOptions) => {\n try {\n const format = options.format;\n if (!isAnnotateFormat(format)) {\n throw new SiteError(`Unknown --format \"${format}\". Use ${ANNOTATE_FORMATS.join(\" or \")}.`);\n }\n const report = runAnnotate({\n cwd: process.cwd(),\n ...(dir === undefined ? {} : { dir }),\n ...(options.config === undefined ? {} : { configPath: options.config }),\n ...(options.out === undefined ? {} : { out: options.out }),\n ...(options.chunks === undefined ? {} : { chunks: options.chunks }),\n });\n process.stdout.write(`${renderAnnotate(report, format)}\n`);\n process.exitCode = 0;\n } catch (err) {\n fail(err);\n }\n });\n\n program.addHelpText(\n \"after\",\n [\n \"\",\n \"Examples:\",\n \" manni site start # detect the framework, run its dev server\",\n \" manni site build\",\n \" manni site preview --port 4000 # build, then serve the output\",\n \" manni site start website -- --open # arguments after -- go to the framework\",\n \" manni site annotate # join the graph's pins to the built site\",\n ].join(\"\\n\"),\n );\n\n return program;\n}\n","/**\n * The runner: carries out a `Plan` step by step, with the child's stdio\n * inherited so the framework's own output is the output. No timeout, because\n * the last step of `start` and `preview` is a server that runs until Ctrl-C.\n */\nimport { spawn, type ChildProcess } from \"node:child_process\";\nimport { accessSync, constants, statSync } from \"node:fs\";\nimport { delimiter, resolve } from \"node:path\";\nimport { launcherCommandLine } from \"../../shared/batch-launcher.js\";\nimport { notice } from \"../../shared/warn.js\";\nimport { renderAnnotate, runAnnotate } from \"../commands/annotate.js\";\nimport { SiteError } from \"../errors.js\";\nimport type { Plan, PlannedStep, Step } from \"../types.js\";\nimport { serveStatic } from \"./static-server.js\";\n\nfunction isExecutable(path: string): boolean {\n try {\n if (!statSync(path).isFile()) return false;\n if (process.platform !== \"win32\") accessSync(path, constants.X_OK);\n return true;\n } catch {\n return false;\n }\n}\n\n/**\n * Where `name` resolves, the way the OS would find it: a name with a separator\n * against `cwd`, a bare one along PATH. On Windows a name without one of\n * PATHEXT's extensions is tried with each in turn, so `npm` finds `npm.cmd`.\n */\nfunction findOnPath(name: string, cwd: string): string | undefined {\n const win = process.platform === \"win32\";\n const exts = win\n ? (process.env[\"PATHEXT\"] ?? \".COM;.EXE;.BAT;.CMD\").split(\";\").filter((e) => e !== \"\")\n : [];\n const lower = name.toLowerCase();\n const names =\n win && !exts.some((e) => lower.endsWith(e.toLowerCase())) ? exts.map((e) => name + e) : [name];\n const dirs = /[\\\\/]/.test(name)\n ? [cwd]\n : (process.env[\"PATH\"] ?? \"\").split(delimiter).filter((d) => d !== \"\");\n for (const dir of dirs) {\n for (const candidate of names) {\n const path = resolve(dir, candidate);\n if (isExecutable(path)) return path;\n }\n }\n return undefined;\n}\n\nfunction startExec(planned: PlannedStep, step: Extract<Step, { kind: \"exec\" }>): ChildProcess {\n const [name, ...args] = step.argv;\n const binary = name === undefined ? undefined : findOnPath(name, step.cwd);\n if (binary === undefined) throw new SiteError(planned.notFound);\n const line = launcherCommandLine(\n binary,\n args,\n (value) => new SiteError(`${planned.display} cannot be given an argument containing a quote: ${value}`),\n );\n return spawn(line.command, line.argv, {\n cwd: step.cwd,\n stdio: \"inherit\",\n windowsVerbatimArguments: line.verbatim,\n });\n}\n\nfunction exitOf(\n planned: PlannedStep,\n child: ChildProcess,\n): Promise<{ code: number | null; signal: NodeJS.Signals | null }> {\n return new Promise((settle, reject) => {\n child.once(\"error\", (err: NodeJS.ErrnoException) => {\n reject(\n err.code === \"ENOENT\"\n ? new SiteError(planned.notFound)\n : new SiteError(`${planned.display} could not start: ${err.message}`),\n );\n });\n child.once(\"exit\", (code, signal) => {\n settle({ code, signal });\n });\n });\n}\n\n/**\n * One step; resolves true when the user stopped it. While any step runs this\n * process ignores SIGINT itself (the terminal delivers Ctrl-C to the whole\n * process group, child included) and forwards SIGTERM, which reaches this\n * process alone, so a cancelled build is not left running. An exit after\n * either is a stop the user asked for, so it is not a failure whatever code\n * the child chose. Otherwise the step must exit 0.\n */\nasync function runStep(planned: PlannedStep): Promise<boolean> {\n const { step } = planned;\n if (step.kind === \"static\") {\n await serveStatic(step);\n return true;\n }\n if (step.kind === \"annotate\") {\n const { cwd, dir, configPath } = step;\n const report = runAnnotate({ cwd, dir, ...(configPath === undefined ? {} : { configPath }) });\n process.stdout.write(`${renderAnnotate(report, \"pretty\")}\n`);\n return false;\n }\n const child =\n step.kind === \"exec\"\n ? startExec(planned, step)\n : spawn(step.command, { cwd: step.cwd, stdio: \"inherit\", shell: true });\n // An object, not a `let`: TypeScript cannot see the handlers assign it.\n const signal = { received: false };\n const onInt = (): void => {\n signal.received = true;\n };\n const onTerm = (): void => {\n signal.received = true;\n child.kill(\"SIGTERM\");\n };\n process.on(\"SIGINT\", onInt);\n process.on(\"SIGTERM\", onTerm);\n try {\n const exit = await exitOf(planned, child);\n if (signal.received) return true;\n if (exit.code === 0) return false;\n throw new SiteError(\n exit.code === null\n ? `${planned.display} was stopped by ${String(exit.signal)}.`\n : `${planned.display} exited with code ${String(exit.code)}.`,\n );\n } finally {\n process.off(\"SIGINT\", onInt);\n process.off(\"SIGTERM\", onTerm);\n }\n}\n\n/** Run every step in order. Resolves the exit code, 0; a failure throws `SiteError`. */\nexport async function runPlan(plan: Plan): Promise<number> {\n for (const planned of plan.steps) {\n if (planned.announce !== \"\") notice(planned.announce);\n // A stop during the build ends the run there: nothing is served.\n if (await runStep(planned)) break;\n }\n return 0;\n}\n","/**\n * The built-in static server `manni site preview` uses for frameworks whose\n * own CLI has no preview (MkDocs, Zensical, Sphinx, Hugo, Jekyll). It serves a\n * build output directory, mounted at the collection `url:` path, until the\n * process is stopped. `node:http` and `node:fs` only.\n */\nimport { createReadStream } from \"node:fs\";\nimport { stat } from \"node:fs/promises\";\nimport { createServer, type IncomingMessage, type Server, type ServerResponse } from \"node:http\";\nimport type { AddressInfo } from \"node:net\";\nimport { extname, join, relative, resolve, sep } from \"node:path\";\nimport { errorMessage } from \"../../shared/errors.js\";\nimport { SiteError } from \"../errors.js\";\n\nexport interface StaticOptions {\n root: string;\n host: string;\n port: number;\n /** The URL path the root is mounted at, e.g. `/manni/`. */\n base: string;\n}\n\n// ponytail: the types a static docs build ships. Anything else goes out as\n// application/octet-stream; add a row when a site needs one.\nconst MIME: Record<string, string> = {\n \".html\": \"text/html; charset=utf-8\",\n \".css\": \"text/css; charset=utf-8\",\n \".js\": \"text/javascript; charset=utf-8\",\n \".mjs\": \"text/javascript; charset=utf-8\",\n \".json\": \"application/json; charset=utf-8\",\n \".map\": \"application/json; charset=utf-8\",\n \".txt\": \"text/plain; charset=utf-8\",\n \".xml\": \"application/xml; charset=utf-8\",\n \".svg\": \"image/svg+xml\",\n \".png\": \"image/png\",\n \".jpg\": \"image/jpeg\",\n \".jpeg\": \"image/jpeg\",\n \".gif\": \"image/gif\",\n \".webp\": \"image/webp\",\n \".avif\": \"image/avif\",\n \".ico\": \"image/x-icon\",\n \".woff\": \"font/woff\",\n \".woff2\": \"font/woff2\",\n \".ttf\": \"font/ttf\",\n \".wasm\": \"application/wasm\",\n \".pdf\": \"application/pdf\",\n \".webmanifest\": \"application/manifest+json\",\n};\n\n/** `/manni/` from `manni`, `/manni` or `/manni/`; `/` from `/` or empty. */\nfunction normalizeBase(base: string): string {\n const trimmed = base.replace(/^\\/+|\\/+$/g, \"\");\n return trimmed === \"\" ? \"/\" : `/${trimmed}/`;\n}\n\nasync function kindOf(path: string): Promise<\"file\" | \"dir\" | undefined> {\n try {\n const s = await stat(path);\n if (s.isDirectory()) return \"dir\";\n return s.isFile() ? \"file\" : undefined;\n } catch {\n return undefined;\n }\n}\n\nfunction sendFile(req: IncomingMessage, res: ServerResponse, path: string, status = 200): void {\n res.writeHead(status, {\n \"content-type\": MIME[extname(path).toLowerCase()] ?? \"application/octet-stream\",\n });\n if (req.method === \"HEAD\") {\n res.end();\n return;\n }\n createReadStream(path)\n .on(\"error\", () => res.destroy())\n .pipe(res);\n}\n\nfunction redirect(res: ServerResponse, status: 301 | 302, location: string): void {\n res.writeHead(status, { location });\n res.end();\n}\n\n/**\n * The file inside `root` a URL path below the base names, or undefined when it\n * names nothing inside it. The URL parser has already collapsed `..` and\n * `%2e%2e` segments; what it leaves are encoded separators (`..%2f`, `..%5c`),\n * so the decoded path is checked for `..` segments and then for containment.\n * Both layers are needed: the parser normalises before it decodes, so a `..`\n * hidden behind an encoded separator only appears after this decode.\n */\nfunction inside(root: string, rest: string): string | undefined {\n let decoded: string;\n try {\n decoded = decodeURIComponent(rest);\n } catch {\n return undefined;\n }\n if (decoded.includes(\"\\0\") || decoded.split(/[\\\\/]/).includes(\"..\")) return undefined;\n const path = resolve(root, `.${sep}${decoded}`);\n return path === root || path.startsWith(root + sep) ? path : undefined;\n}\n\nfunction handler(root: string, base: string) {\n const notFound = join(root, \"404.html\");\n return async (req: IncomingMessage, res: ServerResponse): Promise<void> => {\n if (req.method !== \"GET\" && req.method !== \"HEAD\") {\n res.writeHead(405, { allow: \"GET, HEAD\" });\n res.end();\n return;\n }\n const url = new URL(req.url ?? \"/\", \"http://localhost\");\n const { pathname } = url;\n if (base !== \"/\" && (pathname === \"/\" || pathname === base.slice(0, -1))) {\n redirect(res, pathname === \"/\" ? 302 : 301, `${base}${url.search}`);\n return;\n }\n const path = pathname.startsWith(base) ? inside(root, pathname.slice(base.length)) : undefined;\n const kind = path === undefined ? undefined : await kindOf(path);\n if (path !== undefined && kind === \"dir\" && !pathname.endsWith(\"/\")) {\n redirect(res, 301, `${pathname}/${url.search}`);\n return;\n }\n const file = path !== undefined && kind === \"dir\" ? join(path, \"index.html\") : path;\n if (file !== undefined && (await kindOf(file)) === \"file\") {\n sendFile(req, res, file);\n } else if ((await kindOf(notFound)) === \"file\") {\n sendFile(req, res, notFound, 404);\n } else {\n res.writeHead(404, { \"content-type\": \"text/plain; charset=utf-8\" });\n res.end(\"Not found\\n\");\n }\n };\n}\n\nfunction urlOf(host: string, port: number, base: string): string {\n const shown = host.includes(\":\") ? `[${host}]` : host;\n return `http://${shown}:${String(port)}${base}`;\n}\n\n/**\n * Serve `root` at `base` on `host:port` and print the URL to stdout once\n * listening. Resolves with the listening server; the caller closes it.\n */\nexport async function startStaticServer(opts: StaticOptions): Promise<Server> {\n const root = resolve(opts.root);\n if ((await kindOf(root)) !== \"dir\") {\n const shown = relative(process.cwd(), root).split(sep).join(\"/\") || \".\";\n throw new SiteError(`${shown}/ does not exist.`);\n }\n const base = normalizeBase(opts.base);\n const handle = handler(root, base);\n const server = createServer((req, res) => {\n handle(req, res).catch(() => res.destroy());\n });\n await new Promise<void>((settle, reject) => {\n server.once(\"error\", (err: NodeJS.ErrnoException) => {\n reject(\n new SiteError(\n err.code === \"EADDRINUSE\"\n ? `port ${String(opts.port)} is in use. Pass --port, or stop the process holding it.`\n : `cannot listen on ${urlOf(opts.host, opts.port, \"\")}: ${errorMessage(err)}`,\n ),\n );\n });\n server.listen(opts.port, opts.host, settle);\n });\n const { port } = server.address() as AddressInfo;\n process.stdout.write(`${urlOf(opts.host, port, base)}\\n`);\n return server;\n}\n\n/** Serve until SIGINT or SIGTERM, then close the server and resolve. */\nexport async function serveStatic(opts: StaticOptions): Promise<void> {\n const server = await startStaticServer(opts);\n await new Promise<void>((settle) => {\n const stop = (): void => {\n process.off(\"SIGINT\", stop);\n process.off(\"SIGTERM\", stop);\n server.close(() => {\n settle();\n });\n server.closeAllConnections();\n };\n process.on(\"SIGINT\", stop);\n process.on(\"SIGTERM\", stop);\n });\n}\n","/**\n * The one command core behind `start`, `build` and `preview`: resolve the\n * verb to a plan, then run it. The three verbs differ only in the plan, which\n * `resolvePlan` owns, so they share this core rather than three copies of it.\n */\nimport { resolvePlan, type ResolveOptions } from \"../core/detect.js\";\nimport { runPlan } from \"../core/run.js\";\nimport type { Verb } from \"../types.js\";\n\n/** Resolves the exit code, 0; anything operational throws `SiteError`. */\nexport async function runSite(verb: Verb, opts: ResolveOptions): Promise<number> {\n return runPlan(resolvePlan(verb, opts));\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA,SAAS,eAAe;;;ACNxB,SAAS,aAAgC;AACzC,SAAS,YAAY,WAAW,gBAAgB;AAChD,SAAS,WAAW,WAAAA,gBAAe;;;ACDnC,SAAS,wBAAwB;AACjC,SAAS,YAAY;AACrB,SAAS,oBAA4E;AAErF,SAAS,SAAS,MAAM,UAAU,SAAS,WAAW;AActD,IAAM,OAA+B;AAAA,EACnC,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,OAAO;AAAA,EACP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src/site/commands/run.ts"],"sourcesContent":["/**\n * The `site` domain's commander program. Mounted by `src/cli.ts` under\n * `manni site`; no entry point of its own. Like `key` (proposal 0045), `site`\n * is a family resource with verbs: the site every other domain checks\n * (proposal 0082). Four verbs, no default subcommand.\n *\n * `start`, `build` and `preview` print no report: the framework's output is\n * the output, on the inherited stdio. `annotate` (proposal 0095) prints its\n * own. manni's own lines are diagnostics on stderr. Exit `0` done, `2`\n * operational/usage, and never `1`, because nothing here is a finding.\n */\nimport { Command } from \"commander\";\nimport pkg from \"../../package.json\" with { type: \"json\" };\nimport { fail } from \"../shared/run.js\";\nimport { ANNOTATE_FORMATS, renderAnnotate, runAnnotate, type AnnotateFormat } from \"./commands/annotate.js\";\nimport { runSite } from \"./commands/run.js\";\nimport { SiteError } from \"./errors.js\";\nimport type { Verb } from \"./types.js\";\n\n/** What commander hands `annotate`'s action. */\ninterface AnnotateCliOptions {\n out?: string;\n chunks?: string;\n format: string;\n config?: string;\n}\n\nconst isAnnotateFormat = (value: string): value is AnnotateFormat => (ANNOTATE_FORMATS as readonly string[]).includes(value);\n\n/** What commander hands each verb's action. */\ninterface SiteCliOptions {\n /** `-c, --config <file>`. */\n config?: string;\n /** `--port <n>` as typed; `resolvePlan` validates it. start and preview only. */\n port?: string;\n /** `--host <host>`. start and preview only. */\n host?: string;\n}\n\n/**\n * Split a verb's operands into `[dir]` and what came after `--`.\n *\n * Commander drops the `--` itself, at whichever program met it first (here,\n * the umbrella), and hands everything after it on as operands. So `[dir]`\n * alone cannot tell `start -- --open` (no dir) from `start website`. The\n * process argv still has the `--`, and what follows it is the tail of the\n * operands; a tail that does not match (a program parsed from elsewhere) is\n * no passthrough at all.\n * ponytail: an option given `--` as its value (`--host --`) is misread as the\n * separator; nobody binds a host named `--`.\n */\nfunction splitOperands(args: readonly string[]): { dir: string | undefined; passthrough: string[]; extra: number } {\n const at = process.argv.indexOf(\"--\");\n const tail = at === -1 ? [] : process.argv.slice(at + 1);\n const start = args.length - tail.length;\n const passthrough = start >= 0 && tail.every((arg, i) => args[start + i] === arg) ? tail : [];\n const before = args.slice(0, args.length - passthrough.length);\n return { dir: before[0], passthrough, extra: before.length };\n}\n\nexport function buildProgram(): Command {\n const program = new Command();\n program\n .name(\"site\")\n .description(\"Start, build and preview the docs site\")\n .version(pkg.version, \"-V, --version\")\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 still\n // calling `process.exit(1)`.\n .exitOverride();\n\n const verb = (name: Verb, description: string, serves: boolean): void => {\n const cmd = program\n .command(name)\n .description(description)\n .argument(\"[dir]\", \"the site's directory (default: site.dir, else found by search)\")\n // Everything after `--` arrives as operands; splitOperands sorts them.\n .allowExcessArguments();\n if (serves) {\n cmd\n .option(\"--port <n>\", \"port, an integer from 1 to 65535 (default: a local collection url, else the framework's)\")\n .option(\"--host <host>\", \"host to bind (default: a local collection url, else the framework's)\");\n }\n cmd\n .option(\"-c, --config <file>\", \"path to a manni config file\")\n .action(async (_dir: string | undefined, options: SiteCliOptions, self: Command) => {\n const { dir, passthrough, extra } = splitOperands(self.args);\n if (extra > 1) {\n self.error(\n `error: too many arguments for '${name}'. Expected 1 argument but got ${String(extra)}.`,\n { code: \"commander.excessArguments\" },\n );\n }\n try {\n process.exitCode = await runSite(name, {\n cwd: process.cwd(),\n dir,\n configPath: options.config,\n port: options.port,\n host: options.host,\n passthrough,\n });\n } catch (err) {\n fail(err);\n }\n });\n };\n\n verb(\"start\", \"Run the docs framework's dev server\", true);\n verb(\"build\", \"Build the docs site\", false);\n verb(\"preview\", \"Build the docs site, then serve the output\", true);\n\n program\n .command(\"annotate\")\n .description(\"Join the graph's pins and statements to the built site, as data attributes\")\n .argument(\"[dir]\", \"the site's directory (default: site.dir, else found by search)\")\n .option(\"--out <dir>\", \"the built site to annotate (default: site.out, else the framework's output)\")\n .option(\"--chunks <file>\", \"the chunk manifest graph publish writes (default: chunks.json beside graph.out)\")\n .option(\"-f, --format <format>\", `output: ${ANNOTATE_FORMATS.join(\" | \")}`, \"pretty\")\n .option(\"-c, --config <file>\", \"path to a manni config file\")\n .action((dir: string | undefined, options: AnnotateCliOptions) => {\n try {\n const format = options.format;\n if (!isAnnotateFormat(format)) {\n throw new SiteError(`Unknown --format \"${format}\". Use ${ANNOTATE_FORMATS.join(\" or \")}.`);\n }\n const report = runAnnotate({\n cwd: process.cwd(),\n ...(dir === undefined ? {} : { dir }),\n ...(options.config === undefined ? {} : { configPath: options.config }),\n ...(options.out === undefined ? {} : { out: options.out }),\n ...(options.chunks === undefined ? {} : { chunks: options.chunks }),\n });\n process.stdout.write(`${renderAnnotate(report, format)}\n`);\n process.exitCode = 0;\n } catch (err) {\n fail(err);\n }\n });\n\n program.addHelpText(\n \"after\",\n [\n \"\",\n \"Examples:\",\n \" manni site start # detect the framework, run its dev server\",\n \" manni site build\",\n \" manni site preview --port 4000 # build, then serve the output\",\n \" manni site start website -- --open # arguments after -- go to the framework\",\n \" manni site annotate # join the graph's pins to the built site\",\n ].join(\"\\n\"),\n );\n\n return program;\n}\n","/**\n * The runner: carries out a `Plan` step by step, with the child's stdio\n * inherited so the framework's own output is the output. No timeout, because\n * the last step of `start` and `preview` is a server that runs until Ctrl-C.\n */\nimport { spawn, type ChildProcess } from \"node:child_process\";\nimport { accessSync, constants, statSync } from \"node:fs\";\nimport { delimiter, resolve } from \"node:path\";\nimport { launcherCommandLine } from \"../../shared/batch-launcher.js\";\nimport { notice } from \"../../shared/warn.js\";\nimport { renderAnnotate, runAnnotate } from \"../commands/annotate.js\";\nimport { SiteError } from \"../errors.js\";\nimport type { Plan, PlannedStep, Step } from \"../types.js\";\nimport { serveStatic } from \"./static-server.js\";\n\nfunction isExecutable(path: string): boolean {\n try {\n if (!statSync(path).isFile()) return false;\n if (process.platform !== \"win32\") accessSync(path, constants.X_OK);\n return true;\n } catch {\n return false;\n }\n}\n\n/**\n * Where `name` resolves, the way the OS would find it: a name with a separator\n * against `cwd`, a bare one along PATH. On Windows a name without one of\n * PATHEXT's extensions is tried with each in turn, so `npm` finds `npm.cmd`.\n */\nfunction findOnPath(name: string, cwd: string): string | undefined {\n const win = process.platform === \"win32\";\n const exts = win\n ? (process.env[\"PATHEXT\"] ?? \".COM;.EXE;.BAT;.CMD\").split(\";\").filter((e) => e !== \"\")\n : [];\n const lower = name.toLowerCase();\n const names =\n win && !exts.some((e) => lower.endsWith(e.toLowerCase())) ? exts.map((e) => name + e) : [name];\n const dirs = /[\\\\/]/.test(name)\n ? [cwd]\n : (process.env[\"PATH\"] ?? \"\").split(delimiter).filter((d) => d !== \"\");\n for (const dir of dirs) {\n for (const candidate of names) {\n const path = resolve(dir, candidate);\n if (isExecutable(path)) return path;\n }\n }\n return undefined;\n}\n\nfunction startExec(planned: PlannedStep, step: Extract<Step, { kind: \"exec\" }>): ChildProcess {\n const [name, ...args] = step.argv;\n const binary = name === undefined ? undefined : findOnPath(name, step.cwd);\n if (binary === undefined) throw new SiteError(planned.notFound);\n const line = launcherCommandLine(\n binary,\n args,\n (value) => new SiteError(`${planned.display} cannot be given an argument containing a quote: ${value}`),\n );\n return spawn(line.command, line.argv, {\n cwd: step.cwd,\n stdio: \"inherit\",\n windowsVerbatimArguments: line.verbatim,\n });\n}\n\nfunction exitOf(\n planned: PlannedStep,\n child: ChildProcess,\n): Promise<{ code: number | null; signal: NodeJS.Signals | null }> {\n return new Promise((settle, reject) => {\n child.once(\"error\", (err: NodeJS.ErrnoException) => {\n reject(\n err.code === \"ENOENT\"\n ? new SiteError(planned.notFound)\n : new SiteError(`${planned.display} could not start: ${err.message}`),\n );\n });\n child.once(\"exit\", (code, signal) => {\n settle({ code, signal });\n });\n });\n}\n\n/**\n * One step; resolves true when the user stopped it. While any step runs this\n * process ignores SIGINT itself (the terminal delivers Ctrl-C to the whole\n * process group, child included) and forwards SIGTERM, which reaches this\n * process alone, so a cancelled build is not left running. An exit after\n * either is a stop the user asked for, so it is not a failure whatever code\n * the child chose. Otherwise the step must exit 0.\n */\nasync function runStep(planned: PlannedStep): Promise<boolean> {\n const { step } = planned;\n if (step.kind === \"static\") {\n await serveStatic(step);\n return true;\n }\n if (step.kind === \"annotate\") {\n const { cwd, dir, configPath } = step;\n const report = runAnnotate({ cwd, dir, ...(configPath === undefined ? {} : { configPath }) });\n process.stdout.write(`${renderAnnotate(report, \"pretty\")}\n`);\n return false;\n }\n const child =\n step.kind === \"exec\"\n ? startExec(planned, step)\n : spawn(step.command, { cwd: step.cwd, stdio: \"inherit\", shell: true });\n // An object, not a `let`: TypeScript cannot see the handlers assign it.\n const signal = { received: false };\n const onInt = (): void => {\n signal.received = true;\n };\n const onTerm = (): void => {\n signal.received = true;\n child.kill(\"SIGTERM\");\n };\n process.on(\"SIGINT\", onInt);\n process.on(\"SIGTERM\", onTerm);\n try {\n const exit = await exitOf(planned, child);\n if (signal.received) return true;\n if (exit.code === 0) return false;\n throw new SiteError(\n exit.code === null\n ? `${planned.display} was stopped by ${String(exit.signal)}.`\n : `${planned.display} exited with code ${String(exit.code)}.`,\n );\n } finally {\n process.off(\"SIGINT\", onInt);\n process.off(\"SIGTERM\", onTerm);\n }\n}\n\n/** Run every step in order. Resolves the exit code, 0; a failure throws `SiteError`. */\nexport async function runPlan(plan: Plan): Promise<number> {\n for (const planned of plan.steps) {\n if (planned.announce !== \"\") notice(planned.announce);\n // A stop during the build ends the run there: nothing is served.\n if (await runStep(planned)) break;\n }\n return 0;\n}\n","/**\n * The built-in static server `manni site preview` uses for frameworks whose\n * own CLI has no preview (MkDocs, Zensical, Sphinx, Hugo, Jekyll). It serves a\n * build output directory, mounted at the collection `url:` path, until the\n * process is stopped. `node:http` and `node:fs` only.\n */\nimport { createReadStream } from \"node:fs\";\nimport { stat } from \"node:fs/promises\";\nimport { createServer, type IncomingMessage, type Server, type ServerResponse } from \"node:http\";\nimport type { AddressInfo } from \"node:net\";\nimport { extname, join, relative, resolve, sep } from \"node:path\";\nimport { errorMessage } from \"../../shared/errors.js\";\nimport { SiteError } from \"../errors.js\";\n\nexport interface StaticOptions {\n root: string;\n host: string;\n port: number;\n /** The URL path the root is mounted at, e.g. `/manni/`. */\n base: string;\n}\n\n// ponytail: the types a static docs build ships. Anything else goes out as\n// application/octet-stream; add a row when a site needs one.\nconst MIME: Record<string, string> = {\n \".html\": \"text/html; charset=utf-8\",\n \".css\": \"text/css; charset=utf-8\",\n \".js\": \"text/javascript; charset=utf-8\",\n \".mjs\": \"text/javascript; charset=utf-8\",\n \".json\": \"application/json; charset=utf-8\",\n \".map\": \"application/json; charset=utf-8\",\n \".txt\": \"text/plain; charset=utf-8\",\n \".xml\": \"application/xml; charset=utf-8\",\n \".svg\": \"image/svg+xml\",\n \".png\": \"image/png\",\n \".jpg\": \"image/jpeg\",\n \".jpeg\": \"image/jpeg\",\n \".gif\": \"image/gif\",\n \".webp\": \"image/webp\",\n \".avif\": \"image/avif\",\n \".ico\": \"image/x-icon\",\n \".woff\": \"font/woff\",\n \".woff2\": \"font/woff2\",\n \".ttf\": \"font/ttf\",\n \".wasm\": \"application/wasm\",\n \".pdf\": \"application/pdf\",\n \".webmanifest\": \"application/manifest+json\",\n};\n\n/** `/manni/` from `manni`, `/manni` or `/manni/`; `/` from `/` or empty. */\nfunction normalizeBase(base: string): string {\n const trimmed = base.replace(/^\\/+|\\/+$/g, \"\");\n return trimmed === \"\" ? \"/\" : `/${trimmed}/`;\n}\n\nasync function kindOf(path: string): Promise<\"file\" | \"dir\" | undefined> {\n try {\n const s = await stat(path);\n if (s.isDirectory()) return \"dir\";\n return s.isFile() ? \"file\" : undefined;\n } catch {\n return undefined;\n }\n}\n\nfunction sendFile(req: IncomingMessage, res: ServerResponse, path: string, status = 200): void {\n res.writeHead(status, {\n \"content-type\": MIME[extname(path).toLowerCase()] ?? \"application/octet-stream\",\n });\n if (req.method === \"HEAD\") {\n res.end();\n return;\n }\n createReadStream(path)\n .on(\"error\", () => res.destroy())\n .pipe(res);\n}\n\nfunction redirect(res: ServerResponse, status: 301 | 302, location: string): void {\n res.writeHead(status, { location });\n res.end();\n}\n\n/**\n * The file inside `root` a URL path below the base names, or undefined when it\n * names nothing inside it. The URL parser has already collapsed `..` and\n * `%2e%2e` segments; what it leaves are encoded separators (`..%2f`, `..%5c`),\n * so the decoded path is checked for `..` segments and then for containment.\n * Both layers are needed: the parser normalises before it decodes, so a `..`\n * hidden behind an encoded separator only appears after this decode.\n */\nfunction inside(root: string, rest: string): string | undefined {\n let decoded: string;\n try {\n decoded = decodeURIComponent(rest);\n } catch {\n return undefined;\n }\n if (decoded.includes(\"\\0\") || decoded.split(/[\\\\/]/).includes(\"..\")) return undefined;\n const path = resolve(root, `.${sep}${decoded}`);\n return path === root || path.startsWith(root + sep) ? path : undefined;\n}\n\nfunction handler(root: string, base: string) {\n const notFound = join(root, \"404.html\");\n return async (req: IncomingMessage, res: ServerResponse): Promise<void> => {\n if (req.method !== \"GET\" && req.method !== \"HEAD\") {\n res.writeHead(405, { allow: \"GET, HEAD\" });\n res.end();\n return;\n }\n const url = new URL(req.url ?? \"/\", \"http://localhost\");\n const { pathname } = url;\n if (base !== \"/\" && (pathname === \"/\" || pathname === base.slice(0, -1))) {\n redirect(res, pathname === \"/\" ? 302 : 301, `${base}${url.search}`);\n return;\n }\n const path = pathname.startsWith(base) ? inside(root, pathname.slice(base.length)) : undefined;\n const kind = path === undefined ? undefined : await kindOf(path);\n if (path !== undefined && kind === \"dir\" && !pathname.endsWith(\"/\")) {\n redirect(res, 301, `${pathname}/${url.search}`);\n return;\n }\n const file = path !== undefined && kind === \"dir\" ? join(path, \"index.html\") : path;\n if (file !== undefined && (await kindOf(file)) === \"file\") {\n sendFile(req, res, file);\n } else if ((await kindOf(notFound)) === \"file\") {\n sendFile(req, res, notFound, 404);\n } else {\n res.writeHead(404, { \"content-type\": \"text/plain; charset=utf-8\" });\n res.end(\"Not found\\n\");\n }\n };\n}\n\nfunction urlOf(host: string, port: number, base: string): string {\n const shown = host.includes(\":\") ? `[${host}]` : host;\n return `http://${shown}:${String(port)}${base}`;\n}\n\n/**\n * Serve `root` at `base` on `host:port` and print the URL to stdout once\n * listening. Resolves with the listening server; the caller closes it.\n */\nexport async function startStaticServer(opts: StaticOptions): Promise<Server> {\n const root = resolve(opts.root);\n if ((await kindOf(root)) !== \"dir\") {\n const shown = relative(process.cwd(), root).split(sep).join(\"/\") || \".\";\n throw new SiteError(`${shown}/ does not exist.`);\n }\n const base = normalizeBase(opts.base);\n const handle = handler(root, base);\n const server = createServer((req, res) => {\n handle(req, res).catch(() => res.destroy());\n });\n await new Promise<void>((settle, reject) => {\n server.once(\"error\", (err: NodeJS.ErrnoException) => {\n reject(\n new SiteError(\n err.code === \"EADDRINUSE\"\n ? `port ${String(opts.port)} is in use. Pass --port, or stop the process holding it.`\n : `cannot listen on ${urlOf(opts.host, opts.port, \"\")}: ${errorMessage(err)}`,\n ),\n );\n });\n server.listen(opts.port, opts.host, settle);\n });\n const { port } = server.address() as AddressInfo;\n process.stdout.write(`${urlOf(opts.host, port, base)}\\n`);\n return server;\n}\n\n/** Serve until SIGINT or SIGTERM, then close the server and resolve. */\nexport async function serveStatic(opts: StaticOptions): Promise<void> {\n const server = await startStaticServer(opts);\n await new Promise<void>((settle) => {\n const stop = (): void => {\n process.off(\"SIGINT\", stop);\n process.off(\"SIGTERM\", stop);\n server.close(() => {\n settle();\n });\n server.closeAllConnections();\n };\n process.on(\"SIGINT\", stop);\n process.on(\"SIGTERM\", stop);\n });\n}\n","/**\n * The one command core behind `start`, `build` and `preview`: resolve the\n * verb to a plan, then run it. The three verbs differ only in the plan, which\n * `resolvePlan` owns, so they share this core rather than three copies of it.\n */\nimport { resolvePlan, type ResolveOptions } from \"../core/detect.js\";\nimport { runPlan } from \"../core/run.js\";\nimport type { Verb } from \"../types.js\";\n\n/** Resolves the exit code, 0; anything operational throws `SiteError`. */\nexport async function runSite(verb: Verb, opts: ResolveO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