@hawkeyexl/manni 4.13.0 → 4.15.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-OMDKRGUE.js +48 -0
- package/dist/build-YCY5MUHA.js +37 -0
- package/dist/calibrate-RN2NJ4FS.js +43 -0
- package/dist/capture-2WYROZKA.js +39 -0
- package/dist/check-KRVWHF7E.js +33 -0
- package/dist/{check-NBN2YK2J.js → check-LVUTWAGR.js} +33 -32
- package/dist/{check-NBN2YK2J.js.map → check-LVUTWAGR.js.map} +1 -1
- package/dist/check-MR7IG7IP.js +36 -0
- package/dist/{check-LU5YC3L4.js → check-OIRJ6OBW.js} +15 -14
- package/dist/{chunk-J5NOWIJ3.js → chunk-3CSEHHKB.js} +14 -8
- package/dist/{chunk-J5NOWIJ3.js.map → chunk-3CSEHHKB.js.map} +1 -1
- package/dist/{chunk-7RNONVHI.js → chunk-3EJVJDMX.js} +9 -9
- package/dist/{chunk-LSFXNAHU.js → chunk-3WQMMLIO.js} +129 -59
- package/dist/chunk-3WQMMLIO.js.map +1 -0
- package/dist/{chunk-OREHJQNN.js → chunk-46OWIAAX.js} +5 -4
- package/dist/{chunk-OREHJQNN.js.map → chunk-46OWIAAX.js.map} +1 -1
- package/dist/{chunk-LNGSE7V2.js → chunk-476DMDJ5.js} +132 -27
- package/dist/chunk-476DMDJ5.js.map +1 -0
- package/dist/{chunk-EQ7E6HMG.js → chunk-4MYW2D2U.js} +14 -16
- package/dist/chunk-4MYW2D2U.js.map +1 -0
- package/dist/{chunk-NTEYYYKL.js → chunk-525KMBZS.js} +16 -22
- package/dist/chunk-525KMBZS.js.map +1 -0
- package/dist/{chunk-HIEGOW7X.js → chunk-57DHX65T.js} +5 -79
- package/dist/chunk-57DHX65T.js.map +1 -0
- package/dist/{chunk-PCE7QHXJ.js → chunk-5D24C6WM.js} +6 -1
- package/dist/chunk-5D24C6WM.js.map +1 -0
- package/dist/{chunk-DQOM3DEU.js → chunk-6DYFWAZA.js} +563 -359
- package/dist/chunk-6DYFWAZA.js.map +1 -0
- package/dist/{chunk-CU57HT2E.js → chunk-6WJUZQQX.js} +2 -2
- package/dist/chunk-7EKXSSEO.js +81 -0
- package/dist/chunk-7EKXSSEO.js.map +1 -0
- package/dist/{chunk-ULDV2LUI.js → chunk-7SVFBJBE.js} +10 -4
- package/dist/chunk-7SVFBJBE.js.map +1 -0
- package/dist/{chunk-QKT67PFE.js → chunk-7XHW5DZA.js} +9 -9
- package/dist/{chunk-TDCOKKMI.js → chunk-AL4HRKSZ.js} +3 -3
- package/dist/{chunk-OTJOBZJ5.js → chunk-B2242FYO.js} +2 -1
- package/dist/chunk-B2242FYO.js.map +1 -0
- package/dist/chunk-BREAC43H.js +85 -0
- package/dist/chunk-BREAC43H.js.map +1 -0
- package/dist/{chunk-HKTGHLBA.js → chunk-C37OVJ35.js} +2 -2
- package/dist/{chunk-HKTGHLBA.js.map → chunk-C37OVJ35.js.map} +1 -1
- package/dist/{chunk-YQV75FIL.js → chunk-CFMI74TP.js} +3 -3
- package/dist/{chunk-BMBAAPGN.js → chunk-CWGBRWP7.js} +33 -18
- package/dist/chunk-CWGBRWP7.js.map +1 -0
- package/dist/chunk-DN4LCWSA.js +83 -0
- package/dist/chunk-DN4LCWSA.js.map +1 -0
- package/dist/{chunk-JEUFYSFQ.js → chunk-DW22KCLN.js} +118 -75
- package/dist/chunk-DW22KCLN.js.map +1 -0
- package/dist/{chunk-PCGBXHSE.js → chunk-FEEO7ET6.js} +5 -5
- package/dist/{chunk-CODWRUAD.js → chunk-FYWQS35G.js} +7 -5
- package/dist/chunk-FYWQS35G.js.map +1 -0
- package/dist/{chunk-3O6U4ICM.js → chunk-GLQCSDFS.js} +3 -3
- package/dist/{chunk-BQXY76JB.js → chunk-GUTAKJIF.js} +148 -92
- package/dist/chunk-GUTAKJIF.js.map +1 -0
- package/dist/{chunk-WVXCN5DS.js → chunk-GZHBMMDC.js} +78 -14
- package/dist/chunk-GZHBMMDC.js.map +1 -0
- package/dist/{chunk-52WO7ESI.js → chunk-IE5PXI6M.js} +6 -5
- package/dist/chunk-IE5PXI6M.js.map +1 -0
- package/dist/{chunk-ZXRAE55H.js → chunk-IGRXQC3H.js} +2 -2
- package/dist/{chunk-U6IHLEWT.js → chunk-JCTHXG33.js} +2 -2
- package/dist/{chunk-NSAW7U42.js → chunk-JHE3CYWS.js} +58 -10
- package/dist/chunk-JHE3CYWS.js.map +1 -0
- package/dist/{chunk-6ZFJWUUH.js → chunk-JNMY7KZG.js} +2 -2
- package/dist/chunk-JQPZKWIP.js +76 -0
- package/dist/chunk-JQPZKWIP.js.map +1 -0
- package/dist/{chunk-OBXCJZ6R.js → chunk-JTATFPWB.js} +28 -17
- package/dist/chunk-JTATFPWB.js.map +1 -0
- package/dist/{chunk-3HUCB4Z3.js → chunk-JULE3EU3.js} +10 -7
- package/dist/chunk-JULE3EU3.js.map +1 -0
- package/dist/{chunk-TQ3W6RKG.js → chunk-KCXQXKOL.js} +3 -3
- package/dist/{chunk-VYBYUQIP.js → chunk-KN37BXVY.js} +88 -7
- package/dist/chunk-KN37BXVY.js.map +1 -0
- package/dist/{chunk-OUAH7XF2.js → chunk-MAOX3524.js} +2 -2
- package/dist/chunk-MC7U5IH4.js +126 -0
- package/dist/chunk-MC7U5IH4.js.map +1 -0
- package/dist/{chunk-OYIWF3B2.js → chunk-NIQ2JSZO.js} +29 -20
- package/dist/chunk-NIQ2JSZO.js.map +1 -0
- package/dist/{chunk-HY6ROJTH.js → chunk-OFOIBV5J.js} +86 -10
- package/dist/chunk-OFOIBV5J.js.map +1 -0
- package/dist/{chunk-TZOYZK2E.js → chunk-OZUPJB4J.js} +2 -2
- package/dist/{chunk-N6A6DJUO.js → chunk-Q2VOXKAQ.js} +6 -7
- package/dist/chunk-Q2VOXKAQ.js.map +1 -0
- package/dist/{chunk-GWI6JPTT.js → chunk-Q62Q7CDI.js} +88 -8
- package/dist/chunk-Q62Q7CDI.js.map +1 -0
- package/dist/{chunk-PA7CMQGD.js → chunk-QDO5JFFV.js} +11 -5
- package/dist/chunk-QDO5JFFV.js.map +1 -0
- package/dist/{chunk-VNYXK7TM.js → chunk-QEJ4GH25.js} +8 -8
- package/dist/chunk-QEJ4GH25.js.map +1 -0
- package/dist/chunk-QK6VYJHV.js +26 -0
- package/dist/chunk-QK6VYJHV.js.map +1 -0
- package/dist/chunk-QS2Z3SWL.js +21 -0
- package/dist/chunk-QS2Z3SWL.js.map +1 -0
- package/dist/{chunk-NWUXRV6N.js → chunk-QS3K57OJ.js} +10 -8
- package/dist/chunk-QS3K57OJ.js.map +1 -0
- package/dist/{chunk-OKMTUAWO.js → chunk-QSPH4F56.js} +5 -5
- package/dist/{chunk-3XGTNN3M.js → chunk-RGRNAQG5.js} +12 -124
- package/dist/chunk-RGRNAQG5.js.map +1 -0
- package/dist/{chunk-E6BVUDGY.js → chunk-SLGCRXHM.js} +4 -4
- package/dist/{chunk-KE2F7QES.js → chunk-SVF3WCC7.js} +6 -6
- package/dist/{chunk-IGQMBHFY.js → chunk-T62SFCQY.js} +88 -12
- package/dist/chunk-T62SFCQY.js.map +1 -0
- package/dist/{chunk-SCLXVTFZ.js → chunk-TKINOTVS.js} +1 -1
- package/dist/chunk-TKINOTVS.js.map +1 -0
- package/dist/{chunk-VOXOBUTX.js → chunk-TXZJESES.js} +5 -5
- package/dist/chunk-UPUJJOKB.js +236 -0
- package/dist/chunk-UPUJJOKB.js.map +1 -0
- package/dist/{chunk-7JPL3CUC.js → chunk-URGALOZY.js} +2 -2
- package/dist/{chunk-X4MPUD4B.js → chunk-UVLQRP6O.js} +53 -13
- package/dist/chunk-UVLQRP6O.js.map +1 -0
- package/dist/{chunk-CWXZ2MRT.js → chunk-VHJ72YCD.js} +4 -3
- package/dist/chunk-VHJ72YCD.js.map +1 -0
- package/dist/{chunk-PAU352SV.js → chunk-W4GTMOJW.js} +2 -2
- package/dist/{chunk-SE4JN5XN.js → chunk-WDENIUC7.js} +3 -1
- package/dist/chunk-WDENIUC7.js.map +1 -0
- package/dist/{chunk-3BVDFQ6Y.js → chunk-Y3GWQBJP.js} +5 -5
- package/dist/{chunk-YZ4TJLZQ.js → chunk-YT5HKJWV.js} +497 -18
- package/dist/chunk-YT5HKJWV.js.map +1 -0
- package/dist/{chunk-UQMLCIRX.js → chunk-Z6PZKXSP.js} +6 -6
- package/dist/{chunk-JUL2PRQN.js → chunk-ZC2MZZR5.js} +207 -79
- package/dist/chunk-ZC2MZZR5.js.map +1 -0
- package/dist/{chunk-UKZNLVJW.js → chunk-ZINZTHWO.js} +4 -2
- package/dist/chunk-ZINZTHWO.js.map +1 -0
- package/dist/{cli-4JHQCPHU.js → cli-33E3B2FK.js} +3 -3
- package/dist/{cli-G66X7YMP.js → cli-7JV4RM66.js} +23 -22
- package/dist/{cli-G66X7YMP.js.map → cli-7JV4RM66.js.map} +1 -1
- package/dist/{cli-L5B2RVV2.js → cli-B4DTJ2KC.js} +31 -29
- package/dist/{cli-L5B2RVV2.js.map → cli-B4DTJ2KC.js.map} +1 -1
- package/dist/{cli-ECVT4YXR.js → cli-D4WXCDTS.js} +20 -19
- package/dist/{cli-ECVT4YXR.js.map → cli-D4WXCDTS.js.map} +1 -1
- package/dist/{cli-7DETHSNW.js → cli-DDLLZHZW.js} +90 -84
- package/dist/cli-DDLLZHZW.js.map +1 -0
- package/dist/{cli-KYTCJYXK.js → cli-EVACAD7K.js} +317 -28
- package/dist/cli-EVACAD7K.js.map +1 -0
- package/dist/{cli-H5LVGOVT.js → cli-LIKI7WPR.js} +384 -248
- package/dist/cli-LIKI7WPR.js.map +1 -0
- package/dist/{cli-AZKWTCFV.js → cli-MWUFAS2X.js} +11 -11
- package/dist/{cli-DGFLJ2DD.js → cli-OKPRTVG6.js} +69 -26
- package/dist/cli-OKPRTVG6.js.map +1 -0
- package/dist/{cli-RP5E7XHC.js → cli-QEPVGLQ3.js} +20 -18
- package/dist/{cli-RP5E7XHC.js.map → cli-QEPVGLQ3.js.map} +1 -1
- package/dist/{cli-BW5VOFOZ.js → cli-VP6JTPFS.js} +11 -10
- package/dist/{cli-BW5VOFOZ.js.map → cli-VP6JTPFS.js.map} +1 -1
- package/dist/cli.js +14 -14
- package/dist/{config-JJW75SBX.js → config-7I5CHHRZ.js} +6 -6
- package/dist/docmeta.js +10 -10
- package/dist/github-DV57TW5L.js +32 -0
- package/dist/github-SGX2EARO.js +36 -0
- package/dist/graph/runtime.js.map +1 -1
- package/dist/index.d.ts +222 -45
- package/dist/index.js +138 -132
- package/dist/index.js.map +1 -1
- package/dist/{json-7WV7KL6H.js → json-5EQCGVCV.js} +4 -2
- package/dist/{json-LCVPMEAM.js → json-SHPUCD64.js} +15 -13
- package/dist/{labels-OQXBVM4A.js → labels-3GCGYYV3.js} +14 -12
- package/dist/{labels-OQXBVM4A.js.map → labels-3GCGYYV3.js.map} +1 -1
- package/dist/lint-RE4DMI6E.js +35 -0
- package/dist/list-F56MEJXR.js +36 -0
- package/dist/list-ZR3KY556.js +34 -0
- package/dist/{page-XPX5XJZE.js → page-G7XSO4FD.js} +13 -12
- package/dist/{picker-3XF36MJF.js → picker-FPUC5UGM.js} +3 -3
- package/dist/{prepare-VMBIQYAM.js → prepare-WHMWP7BG.js} +21 -20
- package/dist/{prepare-VMBIQYAM.js.map → prepare-WHMWP7BG.js.map} +1 -1
- package/dist/{pretty-KSTZMBUF.js → pretty-VTJVXWRK.js} +15 -13
- package/dist/{pretty-KG6TMOEI.js → pretty-YVRRWBWN.js} +23 -16
- package/dist/{provider-LBX4IXGX.js → provider-JY2I3VLF.js} +3 -3
- package/dist/{release-VV3UTKE5.js → release-Z3ASYZ3S.js} +3 -3
- package/dist/{reporters-26H3N2KW.js → reporters-FSXJ42EB.js} +6 -5
- package/dist/{reporters-AQU4W3KY.js → reporters-G5R4SURQ.js} +6 -6
- package/dist/{reporters-FBYLPKD4.js → reporters-MHPY4HRA.js} +15 -14
- package/dist/run-FSYOYEPR.js +39 -0
- package/dist/sarif-HBQIDY7T.js +31 -0
- package/dist/sarif-RRUFJZUL.js +37 -0
- package/dist/{term-SI3VM6EM.js → term-ABHGACYE.js} +58 -109
- package/dist/term-ABHGACYE.js.map +1 -0
- package/dist/types-VMOT7RAL.js +12 -0
- package/dist/types-VMOT7RAL.js.map +1 -0
- package/dist/{validate-NQO7TFSN.js → validate-DXYUUGUD.js} +6 -6
- package/dist/validate-DXYUUGUD.js.map +1 -0
- package/package.json +1 -1
- package/plugin/manni/.claude-plugin/plugin.json +1 -1
- package/plugin/manni/skills/check/SKILL.md +2 -2
- package/plugin/manni/skills/evals/SKILL.md +1 -1
- package/plugin/manni/skills/fix/SKILL.md +95 -16
- package/plugin/manni/skills/setup/SKILL.md +1 -1
- package/shapes/graph/shapes-1.1.1.ttl +953 -0
- package/dist/batch-OB2FXT47.js +0 -46
- package/dist/build-4BL24BG3.js +0 -36
- package/dist/calibrate-AEDJ7N7G.js +0 -41
- package/dist/capture-TP3P4YNL.js +0 -38
- package/dist/check-5IYH42KS.js +0 -34
- package/dist/check-S55MH66H.js +0 -30
- package/dist/chunk-3HUCB4Z3.js.map +0 -1
- package/dist/chunk-3XGTNN3M.js.map +0 -1
- package/dist/chunk-52WO7ESI.js.map +0 -1
- package/dist/chunk-BMBAAPGN.js.map +0 -1
- package/dist/chunk-BQXY76JB.js.map +0 -1
- package/dist/chunk-CODWRUAD.js.map +0 -1
- package/dist/chunk-CWXZ2MRT.js.map +0 -1
- package/dist/chunk-DQOM3DEU.js.map +0 -1
- package/dist/chunk-EQ7E6HMG.js.map +0 -1
- package/dist/chunk-GWI6JPTT.js.map +0 -1
- package/dist/chunk-HIEGOW7X.js.map +0 -1
- package/dist/chunk-HY6ROJTH.js.map +0 -1
- package/dist/chunk-IGQMBHFY.js.map +0 -1
- package/dist/chunk-JEUFYSFQ.js.map +0 -1
- package/dist/chunk-JUL2PRQN.js.map +0 -1
- package/dist/chunk-LNGSE7V2.js.map +0 -1
- package/dist/chunk-LSFXNAHU.js.map +0 -1
- package/dist/chunk-MNH7QO4Z.js +0 -15
- package/dist/chunk-MNH7QO4Z.js.map +0 -1
- package/dist/chunk-N6A6DJUO.js.map +0 -1
- package/dist/chunk-NSAW7U42.js.map +0 -1
- package/dist/chunk-NTEYYYKL.js.map +0 -1
- package/dist/chunk-NWUXRV6N.js.map +0 -1
- package/dist/chunk-OBXCJZ6R.js.map +0 -1
- package/dist/chunk-OTJOBZJ5.js.map +0 -1
- package/dist/chunk-OYIWF3B2.js.map +0 -1
- package/dist/chunk-PA7CMQGD.js.map +0 -1
- package/dist/chunk-PCE7QHXJ.js.map +0 -1
- package/dist/chunk-SCLXVTFZ.js.map +0 -1
- package/dist/chunk-SE4JN5XN.js.map +0 -1
- package/dist/chunk-UKZNLVJW.js.map +0 -1
- package/dist/chunk-ULDV2LUI.js.map +0 -1
- package/dist/chunk-VNYXK7TM.js.map +0 -1
- package/dist/chunk-VYBYUQIP.js.map +0 -1
- package/dist/chunk-WVXCN5DS.js.map +0 -1
- package/dist/chunk-X4MPUD4B.js.map +0 -1
- package/dist/chunk-Y6M4JFKG.js +0 -117
- package/dist/chunk-Y6M4JFKG.js.map +0 -1
- package/dist/chunk-YZ4TJLZQ.js.map +0 -1
- package/dist/cli-7DETHSNW.js.map +0 -1
- package/dist/cli-DGFLJ2DD.js.map +0 -1
- package/dist/cli-H5LVGOVT.js.map +0 -1
- package/dist/cli-KYTCJYXK.js.map +0 -1
- package/dist/github-DJQ4MWNZ.js +0 -35
- package/dist/github-UWTDM2J2.js +0 -30
- package/dist/lint-O7XRHKFP.js +0 -34
- package/dist/list-OOOCLOAL.js +0 -35
- package/dist/list-OYQ5XPN2.js +0 -32
- package/dist/run-KUGTU3TT.js +0 -37
- package/dist/term-SI3VM6EM.js.map +0 -1
- package/dist/types-Y6TXHM7M.js +0 -10
- /package/dist/{batch-OB2FXT47.js.map → batch-OMDKRGUE.js.map} +0 -0
- /package/dist/{build-4BL24BG3.js.map → build-YCY5MUHA.js.map} +0 -0
- /package/dist/{calibrate-AEDJ7N7G.js.map → calibrate-RN2NJ4FS.js.map} +0 -0
- /package/dist/{capture-TP3P4YNL.js.map → capture-2WYROZKA.js.map} +0 -0
- /package/dist/{check-5IYH42KS.js.map → check-KRVWHF7E.js.map} +0 -0
- /package/dist/{check-LU5YC3L4.js.map → check-MR7IG7IP.js.map} +0 -0
- /package/dist/{check-S55MH66H.js.map → check-OIRJ6OBW.js.map} +0 -0
- /package/dist/{chunk-7RNONVHI.js.map → chunk-3EJVJDMX.js.map} +0 -0
- /package/dist/{chunk-CU57HT2E.js.map → chunk-6WJUZQQX.js.map} +0 -0
- /package/dist/{chunk-QKT67PFE.js.map → chunk-7XHW5DZA.js.map} +0 -0
- /package/dist/{chunk-TDCOKKMI.js.map → chunk-AL4HRKSZ.js.map} +0 -0
- /package/dist/{chunk-YQV75FIL.js.map → chunk-CFMI74TP.js.map} +0 -0
- /package/dist/{chunk-PCGBXHSE.js.map → chunk-FEEO7ET6.js.map} +0 -0
- /package/dist/{chunk-3O6U4ICM.js.map → chunk-GLQCSDFS.js.map} +0 -0
- /package/dist/{chunk-ZXRAE55H.js.map → chunk-IGRXQC3H.js.map} +0 -0
- /package/dist/{chunk-U6IHLEWT.js.map → chunk-JCTHXG33.js.map} +0 -0
- /package/dist/{chunk-6ZFJWUUH.js.map → chunk-JNMY7KZG.js.map} +0 -0
- /package/dist/{chunk-TQ3W6RKG.js.map → chunk-KCXQXKOL.js.map} +0 -0
- /package/dist/{chunk-OUAH7XF2.js.map → chunk-MAOX3524.js.map} +0 -0
- /package/dist/{chunk-TZOYZK2E.js.map → chunk-OZUPJB4J.js.map} +0 -0
- /package/dist/{chunk-OKMTUAWO.js.map → chunk-QSPH4F56.js.map} +0 -0
- /package/dist/{chunk-E6BVUDGY.js.map → chunk-SLGCRXHM.js.map} +0 -0
- /package/dist/{chunk-KE2F7QES.js.map → chunk-SVF3WCC7.js.map} +0 -0
- /package/dist/{chunk-VOXOBUTX.js.map → chunk-TXZJESES.js.map} +0 -0
- /package/dist/{chunk-7JPL3CUC.js.map → chunk-URGALOZY.js.map} +0 -0
- /package/dist/{chunk-PAU352SV.js.map → chunk-W4GTMOJW.js.map} +0 -0
- /package/dist/{chunk-3BVDFQ6Y.js.map → chunk-Y3GWQBJP.js.map} +0 -0
- /package/dist/{chunk-UQMLCIRX.js.map → chunk-Z6PZKXSP.js.map} +0 -0
- /package/dist/{cli-4JHQCPHU.js.map → cli-33E3B2FK.js.map} +0 -0
- /package/dist/{cli-AZKWTCFV.js.map → cli-MWUFAS2X.js.map} +0 -0
- /package/dist/{config-JJW75SBX.js.map → config-7I5CHHRZ.js.map} +0 -0
- /package/dist/{github-DJQ4MWNZ.js.map → github-DV57TW5L.js.map} +0 -0
- /package/dist/{github-UWTDM2J2.js.map → github-SGX2EARO.js.map} +0 -0
- /package/dist/{json-7WV7KL6H.js.map → json-5EQCGVCV.js.map} +0 -0
- /package/dist/{json-LCVPMEAM.js.map → json-SHPUCD64.js.map} +0 -0
- /package/dist/{lint-O7XRHKFP.js.map → lint-RE4DMI6E.js.map} +0 -0
- /package/dist/{list-OOOCLOAL.js.map → list-F56MEJXR.js.map} +0 -0
- /package/dist/{list-OYQ5XPN2.js.map → list-ZR3KY556.js.map} +0 -0
- /package/dist/{page-XPX5XJZE.js.map → page-G7XSO4FD.js.map} +0 -0
- /package/dist/{picker-3XF36MJF.js.map → picker-FPUC5UGM.js.map} +0 -0
- /package/dist/{pretty-KG6TMOEI.js.map → pretty-VTJVXWRK.js.map} +0 -0
- /package/dist/{pretty-KSTZMBUF.js.map → pretty-YVRRWBWN.js.map} +0 -0
- /package/dist/{provider-LBX4IXGX.js.map → provider-JY2I3VLF.js.map} +0 -0
- /package/dist/{release-VV3UTKE5.js.map → release-Z3ASYZ3S.js.map} +0 -0
- /package/dist/{reporters-26H3N2KW.js.map → reporters-FSXJ42EB.js.map} +0 -0
- /package/dist/{reporters-AQU4W3KY.js.map → reporters-G5R4SURQ.js.map} +0 -0
- /package/dist/{reporters-FBYLPKD4.js.map → reporters-MHPY4HRA.js.map} +0 -0
- /package/dist/{run-KUGTU3TT.js.map → run-FSYOYEPR.js.map} +0 -0
- /package/dist/{types-Y6TXHM7M.js.map → sarif-HBQIDY7T.js.map} +0 -0
- /package/dist/{validate-NQO7TFSN.js.map → sarif-RRUFJZUL.js.map} +0 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
renderCheck,
|
|
4
4
|
runCheck
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-UPUJJOKB.js";
|
|
6
6
|
import {
|
|
7
7
|
EXPORT_TARGETS,
|
|
8
8
|
renderEmbed,
|
|
@@ -16,50 +16,60 @@ import {
|
|
|
16
16
|
runQuery,
|
|
17
17
|
runStats,
|
|
18
18
|
runTraverse
|
|
19
|
-
} from "./chunk-
|
|
20
|
-
import {
|
|
21
|
-
runBuild
|
|
22
|
-
} from "./chunk-N6A6DJUO.js";
|
|
19
|
+
} from "./chunk-4MYW2D2U.js";
|
|
23
20
|
import {
|
|
24
21
|
SEARCH_MODES,
|
|
22
|
+
bundledShapesPath,
|
|
23
|
+
compactIri,
|
|
24
|
+
loadShapes,
|
|
25
|
+
localName,
|
|
25
26
|
renderSearch,
|
|
26
|
-
runSearch
|
|
27
|
-
|
|
27
|
+
runSearch,
|
|
28
|
+
shapeText
|
|
29
|
+
} from "./chunk-ZC2MZZR5.js";
|
|
30
|
+
import {
|
|
31
|
+
runBuild
|
|
32
|
+
} from "./chunk-Q2VOXKAQ.js";
|
|
28
33
|
import {
|
|
29
34
|
ALL_FILL_FIELDS,
|
|
30
35
|
CONFIG_SECTION,
|
|
31
36
|
DEFAULT_CONFIG_FILENAME,
|
|
32
37
|
DEFAULT_EXTENSIONS,
|
|
33
38
|
GraphError,
|
|
39
|
+
NS,
|
|
34
40
|
STDIN,
|
|
35
|
-
assertInputFormat
|
|
36
|
-
|
|
41
|
+
assertInputFormat,
|
|
42
|
+
byCodeUnit,
|
|
43
|
+
loadRunConfig
|
|
44
|
+
} from "./chunk-3CSEHHKB.js";
|
|
45
|
+
import "./chunk-GLP5PSXB.js";
|
|
37
46
|
import "./chunk-TIUTIOFB.js";
|
|
38
|
-
import "./chunk-
|
|
39
|
-
import "./chunk-
|
|
47
|
+
import "./chunk-AL4HRKSZ.js";
|
|
48
|
+
import "./chunk-TKINOTVS.js";
|
|
40
49
|
import "./chunk-YUTVAMWW.js";
|
|
41
|
-
import "./chunk-
|
|
42
|
-
import "./chunk-
|
|
43
|
-
import "./chunk-
|
|
44
|
-
import "./chunk-
|
|
45
|
-
import "./chunk-
|
|
50
|
+
import "./chunk-DN4LCWSA.js";
|
|
51
|
+
import "./chunk-57DHX65T.js";
|
|
52
|
+
import "./chunk-T62SFCQY.js";
|
|
53
|
+
import "./chunk-MAOX3524.js";
|
|
54
|
+
import "./chunk-CWGBRWP7.js";
|
|
55
|
+
import "./chunk-IE5PXI6M.js";
|
|
46
56
|
import {
|
|
47
57
|
collect,
|
|
48
58
|
configOption,
|
|
49
59
|
readStdin,
|
|
50
60
|
splitList,
|
|
51
61
|
writeTextAtomic
|
|
52
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-476DMDJ5.js";
|
|
53
63
|
import "./chunk-DSWKBZWW.js";
|
|
54
|
-
import "./chunk-
|
|
55
|
-
import "./chunk-
|
|
64
|
+
import "./chunk-OFOIBV5J.js";
|
|
65
|
+
import "./chunk-QK6VYJHV.js";
|
|
56
66
|
import {
|
|
57
67
|
shouldColor
|
|
58
68
|
} from "./chunk-RNVYGWIC.js";
|
|
59
69
|
import {
|
|
60
70
|
fail
|
|
61
71
|
} from "./chunk-YEUYKR62.js";
|
|
62
|
-
import "./chunk-
|
|
72
|
+
import "./chunk-B2242FYO.js";
|
|
63
73
|
import {
|
|
64
74
|
warn
|
|
65
75
|
} from "./chunk-HX44GB4Z.js";
|
|
@@ -68,7 +78,7 @@ import {
|
|
|
68
78
|
} from "./chunk-VM7VAFJW.js";
|
|
69
79
|
import {
|
|
70
80
|
package_default
|
|
71
|
-
} from "./chunk-
|
|
81
|
+
} from "./chunk-C37OVJ35.js";
|
|
72
82
|
import "./chunk-OWBRDNRZ.js";
|
|
73
83
|
import {
|
|
74
84
|
errorMessage
|
|
@@ -81,12 +91,237 @@ import { Command } from "commander";
|
|
|
81
91
|
// src/graph/reporters/index.ts
|
|
82
92
|
var GRAPH_FORMATS = ["pretty", "json"];
|
|
83
93
|
var GRAPH_FORMAT_LIST = GRAPH_FORMATS.join(" | ");
|
|
84
|
-
var CHECK_FORMATS = [...GRAPH_FORMATS, "github"];
|
|
94
|
+
var CHECK_FORMATS = [...GRAPH_FORMATS, "github", "sarif"];
|
|
95
|
+
var SHAPES_SHOW_FORMATS = [...GRAPH_FORMATS, "markdown"];
|
|
96
|
+
var SHAPES_SHOW_FORMAT_LIST = SHAPES_SHOW_FORMATS.join(" | ");
|
|
85
97
|
var CHECK_FORMAT_LIST = CHECK_FORMATS.join(" | ");
|
|
86
98
|
|
|
99
|
+
// src/graph/commands/shapes.ts
|
|
100
|
+
import { resolve } from "node:path";
|
|
101
|
+
import { DataFactory } from "n3";
|
|
102
|
+
var SH = "http://www.w3.org/ns/shacl#";
|
|
103
|
+
function resolveShapes(opts) {
|
|
104
|
+
const cwd = opts.cwd ?? process.cwd();
|
|
105
|
+
const config = loadRunConfig(
|
|
106
|
+
{
|
|
107
|
+
...opts.config === void 0 ? {} : { configPath: opts.config },
|
|
108
|
+
...opts.noConfig === void 0 ? {} : { noConfig: opts.noConfig }
|
|
109
|
+
},
|
|
110
|
+
cwd
|
|
111
|
+
);
|
|
112
|
+
const given = opts.shapes && opts.shapes.length > 0 ? opts.shapes : config.check.shapes;
|
|
113
|
+
const sources = given.length > 0 ? given.map((p) => ({ path: resolve(cwd, p), label: p })) : [bundledShapesPath(import.meta.url)];
|
|
114
|
+
const loaded = loadShapes(sources);
|
|
115
|
+
const sourceOf = new Map(
|
|
116
|
+
loaded.files.map((file) => [file, given.length > 0 ? file.label : "bundled"])
|
|
117
|
+
);
|
|
118
|
+
return { loaded, sourceOf };
|
|
119
|
+
}
|
|
120
|
+
function fileIndex(resolved, iri) {
|
|
121
|
+
const file = resolved.loaded.fileOf.get(iri);
|
|
122
|
+
return file === void 0 ? 0 : resolved.loaded.files.indexOf(file);
|
|
123
|
+
}
|
|
124
|
+
var named = (iri) => DataFactory.namedNode(iri);
|
|
125
|
+
function firstObject(store, subject, predicate) {
|
|
126
|
+
return store.getObjects(named(subject), named(predicate), null).map((o) => o.value).sort(byCodeUnit)[0];
|
|
127
|
+
}
|
|
128
|
+
function nodeShapeRow(resolved, iri) {
|
|
129
|
+
const { loaded, sourceOf } = resolved;
|
|
130
|
+
const file = loaded.fileOf.get(iri);
|
|
131
|
+
const store = loaded.store;
|
|
132
|
+
const targetClass = firstObject(store, iri, `${SH}targetClass`);
|
|
133
|
+
const objectsOf = firstObject(store, iri, `${SH}targetObjectsOf`);
|
|
134
|
+
return {
|
|
135
|
+
name: localName(iri),
|
|
136
|
+
id: file?.id ?? "",
|
|
137
|
+
source: file === void 0 ? "" : sourceOf.get(file) ?? file.label,
|
|
138
|
+
target: targetClass ?? (objectsOf === void 0 ? null : `objects of ${objectsOf}`),
|
|
139
|
+
closed: firstObject(store, iri, `${SH}closed`) === "true",
|
|
140
|
+
description: shapeText(store, named(iri), `${SH}description`),
|
|
141
|
+
guide: file?.guide ?? null
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
function nodeShapes(store) {
|
|
145
|
+
return store.getSubjects(named(`${NS.rdf}type`), named(`${SH}NodeShape`), null).filter((s) => s.termType === "NamedNode").map((s) => s.value).sort((a, b) => byCodeUnit(localName(a), localName(b)) || byCodeUnit(a, b));
|
|
146
|
+
}
|
|
147
|
+
var SEVERITIES = {
|
|
148
|
+
[`${SH}Violation`]: "error",
|
|
149
|
+
[`${SH}Warning`]: "warning",
|
|
150
|
+
[`${SH}Info`]: "notice"
|
|
151
|
+
};
|
|
152
|
+
function propertyRows(store, shape) {
|
|
153
|
+
const rows = [];
|
|
154
|
+
for (const property of store.getObjects(named(shape), named(`${SH}property`), null)) {
|
|
155
|
+
const term = property.termType === "BlankNode" ? DataFactory.blankNode(property.value) : named(property.value);
|
|
156
|
+
const read = (predicate) => store.getObjects(term, named(predicate), null).map((o) => o.value).sort(byCodeUnit)[0];
|
|
157
|
+
const path = read(`${SH}path`);
|
|
158
|
+
if (path === void 0) continue;
|
|
159
|
+
const min = read(`${SH}minCount`);
|
|
160
|
+
const max = read(`${SH}maxCount`);
|
|
161
|
+
rows.push({
|
|
162
|
+
rule: property.termType === "NamedNode" ? localName(property.value) : null,
|
|
163
|
+
path,
|
|
164
|
+
key: shapeText(store, term, `${SH}name`),
|
|
165
|
+
min: min === void 0 ? 0 : Number(min),
|
|
166
|
+
max: max === void 0 ? null : Number(max),
|
|
167
|
+
severity: SEVERITIES[read(`${SH}severity`) ?? ""] ?? "error",
|
|
168
|
+
description: shapeText(store, term, `${SH}description`)
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
return rows.sort(
|
|
172
|
+
(a, b) => byCodeUnit(a.rule ?? "", b.rule ?? "") || byCodeUnit(a.path, b.path)
|
|
173
|
+
);
|
|
174
|
+
}
|
|
175
|
+
function runShapes(opts = {}) {
|
|
176
|
+
const resolved = resolveShapes(opts);
|
|
177
|
+
const shapes = nodeShapes(resolved.loaded.store).sort(
|
|
178
|
+
(a, b) => fileIndex(resolved, a) - fileIndex(resolved, b)
|
|
179
|
+
);
|
|
180
|
+
return { shapes: shapes.map((iri) => nodeShapeRow(resolved, iri)) };
|
|
181
|
+
}
|
|
182
|
+
function runShapesShow(name, opts = {}) {
|
|
183
|
+
const resolved = resolveShapes(opts);
|
|
184
|
+
const all = nodeShapes(resolved.loaded.store);
|
|
185
|
+
const matching = all.filter((iri) => localName(iri) === name);
|
|
186
|
+
if (matching.length === 0) {
|
|
187
|
+
if (all.length === 0) {
|
|
188
|
+
throw new GraphError(`Unknown shape "${name}". The shapes in effect define no node shapes.`);
|
|
189
|
+
}
|
|
190
|
+
const available = [...new Set(all.map(localName))].join(", ");
|
|
191
|
+
throw new GraphError(`Unknown shape "${name}". Available: ${available}.`);
|
|
192
|
+
}
|
|
193
|
+
return {
|
|
194
|
+
shapes: matching.map((iri) => ({
|
|
195
|
+
...nodeShapeRow(resolved, iri),
|
|
196
|
+
properties: propertyRows(resolved.loaded.store, iri)
|
|
197
|
+
}))
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
function occurrence(min, max) {
|
|
201
|
+
if (max === 0) return "forbidden";
|
|
202
|
+
if (max === null) {
|
|
203
|
+
if (min === 0) return "optional, repeats";
|
|
204
|
+
if (min === 1) return "required, repeats";
|
|
205
|
+
return `at least ${String(min)}`;
|
|
206
|
+
}
|
|
207
|
+
if (min === 1 && max === 1) return "required";
|
|
208
|
+
if (min === 0 && max === 1) return "optional";
|
|
209
|
+
return `${String(min)} to ${String(max)}`;
|
|
210
|
+
}
|
|
211
|
+
function columns(rows) {
|
|
212
|
+
const widths = [];
|
|
213
|
+
for (const row of rows) {
|
|
214
|
+
row.forEach((cell, i) => widths[i] = Math.max(widths[i] ?? 0, cell.length));
|
|
215
|
+
}
|
|
216
|
+
return rows.map(
|
|
217
|
+
(row) => row.map((cell, i) => i === row.length - 1 ? cell : cell.padEnd(widths[i] ?? 0)).join(" ").trimEnd()
|
|
218
|
+
);
|
|
219
|
+
}
|
|
220
|
+
var compactTarget = (target) => target === null ? "(no target)" : target.startsWith("objects of ") ? `objects of ${compactIri(target.slice("objects of ".length))}` : compactIri(target);
|
|
221
|
+
function renderShapes(list, format) {
|
|
222
|
+
if (format === "json") return JSON.stringify(list, null, 2);
|
|
223
|
+
const groups = [];
|
|
224
|
+
for (const shape of list.shapes) {
|
|
225
|
+
const last = groups.at(-1);
|
|
226
|
+
const head = last?.[0];
|
|
227
|
+
if (last !== void 0 && head?.id === shape.id && head.source === shape.source) {
|
|
228
|
+
last.push(shape);
|
|
229
|
+
} else {
|
|
230
|
+
groups.push([shape]);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
const blocks = [];
|
|
234
|
+
for (const rows of groups) {
|
|
235
|
+
const first = rows[0];
|
|
236
|
+
if (first === void 0) continue;
|
|
237
|
+
const lines = [first.source === first.id ? first.id : `${first.id} (${first.source})`];
|
|
238
|
+
if (first.guide !== null) lines.push(` Guide: ${first.guide}`);
|
|
239
|
+
lines.push(
|
|
240
|
+
...columns(
|
|
241
|
+
rows.map((s) => [s.name, compactTarget(s.target), s.description ?? ""])
|
|
242
|
+
).map((l) => ` ${l}`)
|
|
243
|
+
);
|
|
244
|
+
blocks.push(lines.join("\n"));
|
|
245
|
+
}
|
|
246
|
+
return blocks.join("\n\n");
|
|
247
|
+
}
|
|
248
|
+
function renderShapesShow(show, format) {
|
|
249
|
+
if (format === "json") return JSON.stringify(show, null, 2);
|
|
250
|
+
if (format === "markdown") return skeleton(show);
|
|
251
|
+
return show.shapes.map((shape) => {
|
|
252
|
+
const head = [compactTarget(shape.target), ...shape.closed ? ["closed"] : []].join(", ");
|
|
253
|
+
const lines = [`${shape.name} ${shape.id} ${head}`];
|
|
254
|
+
if (shape.description !== null) lines.push(` ${shape.description}`);
|
|
255
|
+
if (shape.guide !== null) lines.push(` Guide: ${shape.guide}`);
|
|
256
|
+
lines.push("");
|
|
257
|
+
const rows = columns(
|
|
258
|
+
shape.properties.map((p) => {
|
|
259
|
+
const words = [
|
|
260
|
+
occurrence(p.min, p.max),
|
|
261
|
+
...p.severity === "error" ? [] : [p.severity]
|
|
262
|
+
].join(", ");
|
|
263
|
+
return [p.rule ?? "(unnamed)", compactIri(p.path), p.key === null ? words : `${p.key} \xB7 ${words}`];
|
|
264
|
+
})
|
|
265
|
+
);
|
|
266
|
+
shape.properties.forEach((p, i) => {
|
|
267
|
+
lines.push(` ${rows[i] ?? ""}`);
|
|
268
|
+
if (p.description !== null) lines.push(` ${p.description}`);
|
|
269
|
+
});
|
|
270
|
+
return lines.join("\n");
|
|
271
|
+
}).join("\n\n");
|
|
272
|
+
}
|
|
273
|
+
function skeleton(show) {
|
|
274
|
+
const root = /* @__PURE__ */ new Map();
|
|
275
|
+
for (const shape of show.shapes) {
|
|
276
|
+
for (const p of shape.properties) {
|
|
277
|
+
if (p.key === null) continue;
|
|
278
|
+
let level = root;
|
|
279
|
+
let node;
|
|
280
|
+
for (const part of p.key.split(".")) {
|
|
281
|
+
node = level.get(part);
|
|
282
|
+
if (node === void 0) {
|
|
283
|
+
node = { comment: null, required: false, repeats: false, children: /* @__PURE__ */ new Map() };
|
|
284
|
+
level.set(part, node);
|
|
285
|
+
}
|
|
286
|
+
level = node.children;
|
|
287
|
+
}
|
|
288
|
+
if (node === void 0) continue;
|
|
289
|
+
node.comment ??= p.description;
|
|
290
|
+
node.required ||= p.min > 0;
|
|
291
|
+
node.repeats ||= p.max !== 1;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
const first = show.shapes[0];
|
|
295
|
+
if (first === void 0 || root.size === 0) {
|
|
296
|
+
throw new GraphError(
|
|
297
|
+
`${first?.name ?? "This shape"} has no frontmatter keys. manni writes every value it checks.`
|
|
298
|
+
);
|
|
299
|
+
}
|
|
300
|
+
const required = (node) => node.children.size === 0 ? node.required : [...node.children.values()].some(required);
|
|
301
|
+
const lines = ["---", `# ${first.name}, ${first.id}`];
|
|
302
|
+
for (const g of [...new Set(show.shapes.map((s) => s.guide))]) {
|
|
303
|
+
if (g !== null) lines.push(`# Guide: ${g}`);
|
|
304
|
+
}
|
|
305
|
+
const write = (level, indent) => {
|
|
306
|
+
for (const [key, node] of [...level].sort(([a], [b]) => byCodeUnit(a, b))) {
|
|
307
|
+
const mark = required(node) ? "" : "# ";
|
|
308
|
+
if (node.children.size > 0) {
|
|
309
|
+
lines.push(`${indent}${mark}${key}:`);
|
|
310
|
+
write(node.children, `${indent} `);
|
|
311
|
+
continue;
|
|
312
|
+
}
|
|
313
|
+
if (node.comment !== null) lines.push(`${indent}# ${node.comment}`);
|
|
314
|
+
lines.push(`${indent}${mark}${key}:${node.repeats ? " []" : ""}`);
|
|
315
|
+
}
|
|
316
|
+
};
|
|
317
|
+
write(root, "");
|
|
318
|
+
lines.push("---");
|
|
319
|
+
return lines.join("\n");
|
|
320
|
+
}
|
|
321
|
+
|
|
87
322
|
// src/graph/commands/init.ts
|
|
88
323
|
import { existsSync, readFileSync } from "node:fs";
|
|
89
|
-
import { resolve } from "node:path";
|
|
324
|
+
import { resolve as resolve2 } from "node:path";
|
|
90
325
|
import { parse as parseYaml } from "yaml";
|
|
91
326
|
var HEADER = `# manni.config.yaml \u2014 shared configuration for the manni family of tools.
|
|
92
327
|
# Each tool reads its own top-level key; manni graph reads "graph:".
|
|
@@ -139,7 +374,7 @@ provenance:
|
|
|
139
374
|
# stewardship people fields (owner, stakeholders, reviewed-by) out.
|
|
140
375
|
|
|
141
376
|
# SHACL shapes \`manni graph check\` validates the built graph against. Default:
|
|
142
|
-
# the shapes contract bundled with manni (shapes/graph/shapes-1.1.
|
|
377
|
+
# the shapes contract bundled with manni (shapes/graph/shapes-1.1.1.ttl).
|
|
143
378
|
# check:
|
|
144
379
|
# shapes: ["./my-shapes.ttl"]
|
|
145
380
|
|
|
@@ -207,7 +442,7 @@ function starterSection() {
|
|
|
207
442
|
${body}`;
|
|
208
443
|
}
|
|
209
444
|
async function runInit(cwd = process.cwd()) {
|
|
210
|
-
const path =
|
|
445
|
+
const path = resolve2(cwd, DEFAULT_CONFIG_FILENAME);
|
|
211
446
|
if (!existsSync(path)) {
|
|
212
447
|
await writeTextAtomic(path, `${HEADER}${starterSection()}`);
|
|
213
448
|
return path;
|
|
@@ -295,6 +530,7 @@ function buildProgram() {
|
|
|
295
530
|
}
|
|
296
531
|
const formatOption = choiceOption("--format", GRAPH_FORMATS);
|
|
297
532
|
const checkFormatOption = choiceOption("--format", CHECK_FORMATS);
|
|
533
|
+
const showFormatOption = choiceOption("--format", SHAPES_SHOW_FORMATS);
|
|
298
534
|
const fieldsOption = (raw) => splitList(raw).map((value) => enumOption("--fields", ALL_FILL_FIELDS)(value));
|
|
299
535
|
function documentInputs(command, verb) {
|
|
300
536
|
return command.argument(
|
|
@@ -382,16 +618,69 @@ function buildProgram() {
|
|
|
382
618
|
checkFormatOption,
|
|
383
619
|
"pretty"
|
|
384
620
|
).action(
|
|
385
|
-
async (opts) => {
|
|
621
|
+
async (opts, command) => {
|
|
386
622
|
try {
|
|
387
623
|
const report = await runCheck({ ...rest(opts), ...documentOptions(opts) });
|
|
388
|
-
console.log(
|
|
624
|
+
console.log(
|
|
625
|
+
renderCheck(report, opts.format, {
|
|
626
|
+
color: colorFor(command, process.stdout.isTTY)
|
|
627
|
+
})
|
|
628
|
+
);
|
|
389
629
|
process.exitCode = report.exitCode;
|
|
390
630
|
} catch (e) {
|
|
391
631
|
fail(e);
|
|
392
632
|
}
|
|
393
633
|
}
|
|
394
634
|
);
|
|
635
|
+
function optionValue(command, key) {
|
|
636
|
+
for (let cmd = command; cmd !== null; cmd = cmd.parent) {
|
|
637
|
+
if (cmd.getOptionValueSource(key) === "cli") return cmd.getOptionValue(key);
|
|
638
|
+
}
|
|
639
|
+
return command.getOptionValue(key);
|
|
640
|
+
}
|
|
641
|
+
function shapesOptions(command) {
|
|
642
|
+
const { configPath, noConfig } = configOption(optionValue(command, "config"));
|
|
643
|
+
const shapes = optionValue(command, "shapes");
|
|
644
|
+
return {
|
|
645
|
+
...configPath === void 0 ? {} : { config: configPath },
|
|
646
|
+
...noConfig === true ? { noConfig } : {},
|
|
647
|
+
...Array.isArray(shapes) ? { shapes: shapes.map(String) } : {}
|
|
648
|
+
};
|
|
649
|
+
}
|
|
650
|
+
function shapesInput(command) {
|
|
651
|
+
return command.option(
|
|
652
|
+
"--shapes <path>",
|
|
653
|
+
"Shapes .ttl file; repeatable (default: config check.shapes, then bundled)",
|
|
654
|
+
collect,
|
|
655
|
+
[]
|
|
656
|
+
);
|
|
657
|
+
}
|
|
658
|
+
const shapesCommand = shapesInput(
|
|
659
|
+
configInputs(
|
|
660
|
+
program.command("shapes").description("List the SHACL node shapes `graph check` runs, and what each one targets")
|
|
661
|
+
)
|
|
662
|
+
).option("-f, --format <format>", `Output: ${GRAPH_FORMAT_LIST}`, "pretty").action((_opts, command) => {
|
|
663
|
+
try {
|
|
664
|
+
const format = formatOption(String(optionValue(command, "format")));
|
|
665
|
+
console.log(renderShapes(runShapes(shapesOptions(command)), format));
|
|
666
|
+
} catch (e) {
|
|
667
|
+
fail(e);
|
|
668
|
+
}
|
|
669
|
+
});
|
|
670
|
+
shapesInput(
|
|
671
|
+
configInputs(
|
|
672
|
+
shapesCommand.command("show").description(
|
|
673
|
+
"Print every property a shape checks and the frontmatter key that feeds it"
|
|
674
|
+
).argument("<shape>", "Node shape to show, by local name, such as DocumentShape")
|
|
675
|
+
)
|
|
676
|
+
).option("-f, --format <format>", `Output: ${SHAPES_SHOW_FORMAT_LIST}`, "pretty").action((shape, _opts, command) => {
|
|
677
|
+
try {
|
|
678
|
+
const format = showFormatOption(String(optionValue(command, "format")));
|
|
679
|
+
console.log(renderShapesShow(runShapesShow(shape, shapesOptions(command)), format));
|
|
680
|
+
} catch (e) {
|
|
681
|
+
fail(e);
|
|
682
|
+
}
|
|
683
|
+
});
|
|
395
684
|
documentInputs(
|
|
396
685
|
program.command("fill").description(
|
|
397
686
|
"Propose `graph:` fields and sample questions with an LLM, gated by confidence, and write them back"
|
|
@@ -651,4 +940,4 @@ export {
|
|
|
651
940
|
buildProgram,
|
|
652
941
|
colorFor
|
|
653
942
|
};
|
|
654
|
-
//# sourceMappingURL=cli-
|
|
943
|
+
//# sourceMappingURL=cli-EVACAD7K.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/graph/cli.ts","../src/graph/reporters/index.ts","../src/graph/commands/shapes.ts","../src/graph/commands/init.ts"],"sourcesContent":["/**\n * The graph program. Named `graph` because that is where it is mounted\n * (`manni graph …`); `src/cli.ts` adds it to the umbrella and runs it.\n *\n * Grammar per proposals 0034 and 0051 §2: the domain owns verbs and has no\n * default subcommand, `-f` means the output format everywhere and is checked\n * against the verb's list, and a list reaches a flag by exactly one\n * separator. The plumbing is the family's: `fail()` from `src/shared/run.ts`,\n * `warn()` from `src/shared/warn.ts`, and `--no-color` from\n * `src/shared/color.ts`.\n */\nimport { Command } from \"commander\";\nimport pkg from \"../../package.json\" with { type: \"json\" };\nimport {\n collect,\n configOption,\n readStdin,\n splitList,\n} from \"../shared/cli-options.js\";\nimport { shouldColor } from \"../shared/color.js\";\nimport { fail } from \"../shared/run.js\";\nimport { warn } from \"../shared/warn.js\";\nimport { GraphError } from \"./types.js\";\nimport { LOCAL_FLAG_HELP } from \"../shared/providers.js\";\nimport { ALL_FILL_FIELDS, type FillField } from \"./core/config.js\";\nimport {\n assertInputFormat,\n DEFAULT_EXTENSIONS,\n STDIN,\n} from \"./core/discover.js\";\nimport {\n CHECK_FORMATS,\n CHECK_FORMAT_LIST,\n GRAPH_FORMATS,\n GRAPH_FORMAT_LIST,\n SHAPES_SHOW_FORMATS,\n SHAPES_SHOW_FORMAT_LIST,\n type CheckFormat,\n type GraphFormat,\n} from \"./reporters/index.js\";\nimport { runBuild } from \"./commands/build.js\";\nimport { renderCheck, runCheck } from \"./commands/check.js\";\nimport {\n renderShapes,\n renderShapesShow,\n runShapes,\n runShapesShow,\n type ShapesOptions,\n} from \"./commands/shapes.js\";\nimport {\n EXPORT_TARGETS,\n runExport,\n type ExportFormat,\n} from \"./commands/export.js\";\nimport { renderQuery, runQuery } from \"./commands/query.js\";\nimport { renderFill, runFill } from \"./commands/fill.js\";\nimport { runInit } from \"./commands/init.js\";\nimport { renderEmbed, runEmbed } from \"./commands/embed.js\";\nimport {\n renderSearch,\n runSearch,\n SEARCH_MODES,\n type SearchMode,\n} from \"./commands/search.js\";\nimport { renderStats, runStats } from \"./commands/stats.js\";\nimport { renderTraverse, runTraverse } from \"./commands/traverse.js\";\n\n/**\n * Whether `command`'s output gets colour: this domain's `--no-color` and\n * `NO_COLOR` turn it off, and otherwise only a TTY turns it on\n * (`shouldColor`). `isTTY` is passed uncoerced: Node leaves it undefined off\n * a terminal, never false, and `shouldColor` reads a missing one as \"not a\n * terminal\".\n *\n * Exported because this is where the decision is testable — a spawned bin is\n * never a TTY. `check`'s pretty output dims the lines under each finding, and\n * takes the boolean from here rather than consulting the environment itself.\n */\nexport function colorFor(\n command: Command,\n isTTY: boolean | undefined,\n env?: NodeJS.ProcessEnv,\n): boolean {\n // commander maps --no-color to opts.color === false, on the command that\n // declares it.\n const noColor = colorOwner(command).opts().color === false;\n return shouldColor({ noColor, isTTY, env });\n}\n\n/**\n * The nearest command, this one or an ancestor, that declares `--no-color`:\n * the `graph` program, wherever it is mounted. Not the root: under the umbrella\n * that is `manni`, which has no `--no-color` of its own.\n */\nfunction colorOwner(command: Command): Command {\n for (let c: Command | null = command; c !== null; c = c.parent) {\n if (c.options.some((o) => o.long === \"--no-color\")) return c;\n }\n return command;\n}\n\nexport function buildProgram(): Command {\nconst program = new Command();\n\nprogram\n .name(\"graph\")\n .description(\n \"Deterministic knowledge graphs derived from documentation frontmatter and formatting.\",\n )\n .version(pkg.version)\n .option(\"--no-color\", \"disable colored output\")\n // A pointer, not the whole help screen: the message that precedes it\n // already names the offending flag.\n .showHelpAfterError(\"(add --help for usage)\")\n // MUST come before the `.command()` calls below. `copyInheritedSettings`\n // copies `_exitCallback` by value at subcommand-creation time, so an\n // `exitOverride()` installed afterwards leaves every subcommand still\n // calling `process.exit(1)` — which reports a usage error as a finding.\n .exitOverride();\n\n/**\n * Parse a numeric CLI option, refusing what the config schema refuses.\n *\n * `Number.parseFloat`/`parseInt` return NaN for `abc` and silently accept\n * out-of-range values, and NaN then disables whatever gate it feeds — a cost\n * cap that never fires, a confidence gate that writes everything, a `--top`\n * that asks for a negative number of rows. The documented precedence is\n * config → Ajv → CLI override, so the override has to be held to the same range.\n */\nfunction numericOption(\n flag: string,\n { min, max, integer }: { min: number; max?: number; integer?: boolean },\n) {\n return (raw: string): number => {\n const value = Number.parseFloat(raw);\n if (!Number.isFinite(value)) {\n throw new GraphError(`${flag} expects a number, got \"${raw}\".`);\n }\n if (integer && !Number.isInteger(value)) {\n throw new GraphError(`${flag} expects a whole number, got ${value}.`);\n }\n if (value < min || (max !== undefined && value > max)) {\n const range = max === undefined ? `>= ${min}` : `${min}..${max}`;\n throw new GraphError(`${flag} must be ${range}, got ${value}.`);\n }\n return value;\n };\n}\n\n/** A count: a whole number, at least `min` (1 unless the flag allows zero). */\nfunction countOption(flag: string, min = 1) {\n return numericOption(flag, { min, integer: true });\n}\n\n/**\n * Hold a CLI override to the same list its config key is held to.\n *\n * `fill.provider` is Ajv-validated against the schema enum; the `--provider`\n * override was an arbitrary string cast straight to `ProviderName`, so the\n * documented config → Ajv → CLI precedence had a hole at the last step.\n */\nfunction enumOption<T extends string>(flag: string, allowed: readonly T[]) {\n return (raw: string): T => {\n if (!(allowed as readonly string[]).includes(raw)) {\n throw new GraphError(\n `${flag} must be one of ${allowed.join(\" | \")}, got \"${raw}\".`,\n );\n }\n return raw as T;\n };\n}\n\n/**\n * A flag whose value is one of a named set, refused in the family's words:\n * `Unknown --format \"xml\". Use pretty | json.` The check runs while the\n * options are parsed, so a typo costs a message rather than a graph load.\n */\nfunction choiceOption<T extends string>(flag: string, allowed: readonly T[]) {\n return (raw: string): T => {\n if (!(allowed as readonly string[]).includes(raw)) {\n throw new GraphError(`Unknown ${flag} \"${raw}\". Use ${allowed.join(\" | \")}.`);\n }\n return raw as T;\n };\n}\n\n/** `-f, --format`: every verb's list is `pretty | json` (0051 §2). */\nconst formatOption = choiceOption(\"--format\", GRAPH_FORMATS);\n\n/** `check`'s own, which adds the two CI formats, `github` and `sarif`. */\nconst checkFormatOption = choiceOption(\"--format\", CHECK_FORMATS);\n\n/** `shapes show`'s own, which adds the frontmatter skeleton. */\nconst showFormatOption = choiceOption(\"--format\", SHAPES_SHOW_FORMATS);\n\n/**\n * `--fields <list>`: comma-separated and given once, never repeatable — one\n * separator per list (proposal 0034), and the spelling `meta fill --fields`\n * already uses. Each value is held to the same list `fill.fields` is.\n */\nconst fieldsOption = (raw: string): FillField[] =>\n splitList(raw).map((value) => enumOption(\"--fields\", ALL_FILL_FIELDS)(value));\n\n/**\n * The document-set surface the verbs that read documents share (proposals\n * 0041 and 0051 §1): positional `[paths...]` with `-` for stdin,\n * `--collection` and `--exclude` (each one value per occurrence), `--as`,\n * `--ext` (comma-separated, given once), `--allow-empty`, and\n * `-c`/`--no-config`. Declared once so the verbs cannot drift apart on a name\n * or a description, and worded as `meta` and `lint` word them.\n */\nfunction documentInputs(command: Command, verb: string): Command {\n return command\n .argument(\n \"[paths...]\",\n `files, directories, or globs to ${verb} (use - for stdin)`,\n )\n .option(\n \"--collection <name>\",\n \"Configured collection to read (repeatable)\",\n collect,\n [],\n )\n .option(\"--exclude <glob>\", \"Glob to exclude (repeatable)\", collect, [])\n .option(\n \"--as <format>\",\n \"Parse every input as asciidoc, html, markdown, mdx, rst or xml, whatever its extension. Required with -.\",\n )\n .option(\n \"--ext <list>\",\n \"comma-separated extensions for directory walks\",\n DEFAULT_EXTENSIONS.join(\",\"),\n )\n .option(\"--allow-empty\", \"treat zero matched files as success\")\n .option(\"-c, --config <path>\", \"Path to manni.config.yaml\")\n .option(\"--no-config\", \"Ignore any discovered config file\");\n}\n\n/** The input flags as commander hands them over. */\ninterface InputFlags {\n as?: string;\n ext: string;\n allowEmpty?: boolean;\n}\n\n/**\n * The input flags for a core, and stdin when `paths` holds `-`. `--as` is\n * checked first, so `-` without it is refused before anything waits on stdin.\n */\nasync function inputOptions(\n paths: string[],\n opts: InputFlags,\n): Promise<{\n as?: string;\n ext: string[];\n allowEmpty?: boolean;\n stdinContent?: string;\n}> {\n assertInputFormat(paths, opts.as);\n return {\n ...(opts.as === undefined ? {} : { as: opts.as }),\n ext: splitList(opts.ext),\n ...(opts.allowEmpty === true ? { allowEmpty: true } : {}),\n ...(paths.includes(STDIN) ? { stdinContent: await readStdin() } : {}),\n };\n}\n\n/**\n * `-c`/`--no-config` for a verb that reads a built graph rather than a\n * document set. They share one commander attribute, which `configOption`\n * splits.\n */\nfunction configInputs(command: Command): Command {\n return command\n .option(\"-c, --config <path>\", \"Path to manni.config.yaml\")\n .option(\"--no-config\", \"Ignore any discovered config file\");\n}\n\n/**\n * `opts` minus the one attribute `-c` and `--no-config` share. `documentOptions`\n * restates it as the two fields a core reads, and spreading the raw value over\n * them would put commander's `false` back where a path belongs.\n */\nfunction rest<T extends { config?: string | boolean }>(\n opts: T,\n): Omit<T, \"config\"> {\n const { config, ...others } = opts;\n return others;\n}\n\n/** The shared options as the command cores take them. */\nfunction documentOptions(opts: {\n collection?: string[];\n exclude?: string[];\n config?: string | boolean;\n}): {\n config?: string;\n noConfig?: boolean;\n collection?: string[];\n exclude?: string[];\n} {\n const { configPath, noConfig } = configOption(opts.config);\n return {\n ...(configPath === undefined ? {} : { config: configPath }),\n ...(noConfig === true ? { noConfig } : {}),\n ...(opts.collection === undefined ? {} : { collection: opts.collection }),\n ...(opts.exclude === undefined ? {} : { exclude: opts.exclude }),\n };\n}\n\nprogram\n .command(\"init\")\n .description(\"Add a starter `graph:` section to manni.config.yaml in the current directory\")\n .action(async () => {\n try {\n console.log(`Created ${await runInit()}`);\n } catch (e) {\n fail(e);\n }\n });\n\ndocumentInputs(\n program\n .command(\"build\")\n .description(\"Derive the knowledge graph and write deterministic Turtle\"),\n \"build\",\n)\n .option(\"-o, --out <path>\", \"Output .ttl path (default: config out)\")\n .action(async (paths: string[], opts: InputFlags & {\n config?: string | boolean;\n collection?: string[];\n exclude?: string[];\n out?: string;\n }) => {\n try {\n const result = await runBuild({\n paths,\n ...documentOptions(opts),\n ...(await inputOptions(paths, opts)),\n out: opts.out,\n });\n // Warnings go to stderr so stdout stays the machine-readable summary;\n // a degraded build is still a successful one, so the exit code is 0.\n for (const warning of result.warnings) warn(warning);\n const { total, fromTermbase } = result.concepts;\n const termbase = fromTermbase > 0 ? ` (${fromTermbase} from the termbase)` : \"\";\n console.log(\n `Wrote ${result.outPath} (${result.docs} docs, ${result.quads} triples, ${total} concepts${termbase})`,\n );\n } catch (e) {\n fail(e);\n }\n });\n\nconfigInputs(\n program\n .command(\"check\")\n .description(\n \"Validate the built graph against the bundled SHACL shapes (errors exit 1)\",\n ),\n)\n .option(\"-g, --graph <path>\", \"Graph .ttl path (default: config out)\")\n // One path per occurrence, never split on commas: a path may hold one.\n .option(\n \"--shapes <path>\",\n \"Shapes .ttl file; repeatable (default: config check.shapes, then bundled)\",\n collect,\n [],\n )\n .option(\n \"-f, --format <format>\",\n `Output: ${CHECK_FORMAT_LIST}`,\n checkFormatOption,\n \"pretty\",\n )\n .action(\n async (\n opts: {\n config?: string | boolean;\n graph?: string;\n shapes: string[];\n format: CheckFormat;\n },\n command: Command,\n ) => {\n try {\n const report = await runCheck({ ...rest(opts), ...documentOptions(opts) });\n console.log(\n renderCheck(report, opts.format, {\n color: colorFor(command, process.stdout.isTTY),\n }),\n );\n process.exitCode = report.exitCode;\n } catch (e) {\n fail(e);\n }\n },\n );\n\n/**\n * The value of a flag `shapes` and `shapes show` both declare. Commander keeps\n * parsing a parent's options past a subcommand name, so `shapes show X -f\n * markdown` sets `format` on `shapes`. The nearest command given the flag\n * wins, and the subcommand's own default is the fallback, as lint reads its\n * `templates` flags. So neither declaration checks its value as it parses,\n * and the action checks the one that applies.\n */\nfunction optionValue(command: Command, key: string): unknown {\n for (let cmd: Command | null = command; cmd !== null; cmd = cmd.parent) {\n if (cmd.getOptionValueSource(key) === \"cli\") return cmd.getOptionValue(key);\n }\n return command.getOptionValue(key);\n}\n\n/** The options `shapes` and `shapes show` share, as the cores take them. */\nfunction shapesOptions(command: Command): ShapesOptions {\n const { configPath, noConfig } = configOption(optionValue(command, \"config\"));\n const shapes = optionValue(command, \"shapes\");\n return {\n ...(configPath === undefined ? {} : { config: configPath }),\n ...(noConfig === true ? { noConfig } : {}),\n ...(Array.isArray(shapes) ? { shapes: shapes.map(String) } : {}),\n };\n}\n\n/** `--shapes`, worded as `check` words it. */\nfunction shapesInput(command: Command): Command {\n return command.option(\n \"--shapes <path>\",\n \"Shapes .ttl file; repeatable (default: config check.shapes, then bundled)\",\n collect,\n [],\n );\n}\n\nconst shapesCommand = shapesInput(\n configInputs(\n program\n .command(\"shapes\")\n .description(\"List the SHACL node shapes `graph check` runs, and what each one targets\"),\n ),\n)\n .option(\"-f, --format <format>\", `Output: ${GRAPH_FORMAT_LIST}`, \"pretty\")\n .action((_opts: unknown, command: Command) => {\n try {\n const format = formatOption(String(optionValue(command, \"format\")));\n console.log(renderShapes(runShapes(shapesOptions(command)), format));\n } catch (e) {\n fail(e);\n }\n });\n\nshapesInput(\n configInputs(\n shapesCommand\n .command(\"show\")\n .description(\n \"Print every property a shape checks and the frontmatter key that feeds it\",\n )\n .argument(\"<shape>\", \"Node shape to show, by local name, such as DocumentShape\"),\n ),\n)\n .option(\"-f, --format <format>\", `Output: ${SHAPES_SHOW_FORMAT_LIST}`, \"pretty\")\n .action((shape: string, _opts: unknown, command: Command) => {\n try {\n const format = showFormatOption(String(optionValue(command, \"format\")));\n console.log(renderShapesShow(runShapesShow(shape, shapesOptions(command)), format));\n } catch (e) {\n fail(e);\n }\n });\n\ndocumentInputs(\n program\n .command(\"fill\")\n .description(\n \"Propose `graph:` fields and sample questions with an LLM, gated by confidence, and write them back\",\n ),\n \"fill\",\n)\n .option(\n \"-f, --format <format>\",\n `Output: ${GRAPH_FORMAT_LIST}`,\n formatOption,\n \"pretty\",\n )\n .option(\"--dry-run\", \"Report proposals without writing files\")\n .option(\"--force\", \"Overwrite human-set graph fields\")\n .option(\"--no-cache\", \"Bypass the proposal cache\")\n .option(\"--no-validate-graph\", \"Skip the SHACL graph guardrail on proposals\")\n .option(\"--sections\", \"Also propose per-section metadata\")\n .option(\n \"--max-turns <n>\",\n \"Stop after this many inference calls (a cached page costs none)\",\n countOption(\"--max-turns\"),\n )\n .option(\n \"--confidence <n>\",\n \"Minimum model confidence (0..1) to write a field (default: config, 0.7)\",\n numericOption(\"--confidence\", { min: 0, max: 1 }),\n )\n .option(\n // Comma-separated and given once: one separator per list (proposal 0034).\n \"--fields <list>\",\n `Fields to propose (comma-separated; default: config, then every field)`,\n fieldsOption,\n )\n // The nameable providers, and `auto`. `mock` is the library's test double:\n // accepted when asked for by name, never offered.\n .option(\n \"--provider <name>\",\n \"Provider: auto (default) | anthropic | openai | claude-cli | llama-cpp\",\n )\n .option(\"--model <model>\", \"Model override; needs a named provider, from here or config\")\n .option(\"--local\", LOCAL_FLAG_HELP)\n .option(\n \"--offline\",\n \"no network egress: only a model already downloaded, never a remote provider\",\n )\n .option(\n \"--chunk-chars <n>\",\n \"characters of page per question request (default: config, then 12000)\",\n countOption(\"--chunk-chars\"),\n )\n // Typed inline, as every other action in this file is. The option parsers\n // above (`numericOption`, `choiceOption`, `fieldsOption`) have already thrown\n // on anything malformed by the time this runs, so a cast per field would be\n // safe — but it would also be the one command with the most options and the\n // least help from the compiler.\n .action(async (paths: string[], opts: InputFlags & {\n config?: string | boolean;\n collection?: string[];\n exclude?: string[];\n dryRun?: boolean;\n force?: boolean;\n cache?: boolean;\n validateGraph?: boolean;\n sections?: boolean;\n maxTurns?: number;\n confidence?: number;\n fields?: FillField[];\n provider?: string;\n model?: string;\n local?: boolean;\n offline?: boolean;\n chunkChars?: number;\n format: GraphFormat;\n }) => {\n try {\n const report = await runFill({\n paths,\n ...documentOptions(opts),\n ...(await inputOptions(paths, opts)),\n dryRun: opts.dryRun,\n force: opts.force,\n noCache: opts.cache === false,\n noValidateGraph: opts.validateGraph === false,\n sections: opts.sections,\n maxTurns: opts.maxTurns,\n confidence: opts.confidence,\n fields: opts.fields,\n provider: opts.provider,\n model: opts.model,\n local: opts.local,\n offline: opts.offline,\n chunkChars: opts.chunkChars,\n });\n // Same channel discipline as build: warnings on stderr, so stdout stays\n // the report, and a warning never changes the exit code.\n for (const warning of report.warnings) warn(warning);\n const rendered = renderFill(report, opts.format);\n if (paths.includes(STDIN)) {\n // With `-` the filled document owns stdout, as under `meta fill -`,\n // and the report in either format is a diagnostic on stderr.\n if (report.stdinDocument !== undefined) {\n process.stdout.write(report.stdinDocument);\n }\n if (rendered.length > 0) process.stderr.write(`${rendered}\\n`);\n } else {\n console.log(rendered);\n }\n process.exitCode = report.exitCode;\n } catch (e) {\n fail(e);\n }\n });\n\nprogram\n .command(\"query\")\n .description(\n \"Match triple patterns against the built graph (omit a term for wildcard)\",\n )\n // Long-only, and named for the triple position each one fills. `-o` is\n // `--out` on every other graph verb and `-s` is meta's schema flag; a\n // one-letter spelling that means two things in one family costs more than\n // the letters it saves.\n .option(\"--subject <term>\", \"Subject IRI or prefixed name\")\n .option(\"--predicate <term>\", \"Predicate IRI or prefixed name\")\n .option(\"--object <term>\", \"Object IRI, prefixed name, or literal value\")\n .option(\"-c, --config <path>\", \"Path to manni.config.yaml\")\n .option(\"--no-config\", \"Ignore any discovered config file\")\n .option(\"-g, --graph <path>\", \"Graph .ttl path (default: config out)\")\n .option(\n \"-f, --format <format>\",\n `Output: ${GRAPH_FORMAT_LIST}`,\n formatOption,\n \"pretty\",\n )\n .action(\n (opts: {\n subject?: string;\n predicate?: string;\n object?: string;\n config?: string | boolean;\n graph?: string;\n format: GraphFormat;\n }) => {\n try {\n const { subject, predicate, object, ...others } = rest(opts);\n const result = runQuery({\n ...others,\n ...documentOptions(opts),\n ...(subject === undefined ? {} : { s: subject }),\n ...(predicate === undefined ? {} : { p: predicate }),\n ...(object === undefined ? {} : { o: object }),\n });\n console.log(renderQuery(result, opts.format));\n } catch (e) {\n fail(e);\n }\n },\n );\n\nprogram\n .command(\"stats\")\n .description(\n \"Summarize the built graph: counts, orphans, broken links, hubs, metadata coverage\",\n )\n .option(\"-c, --config <path>\", \"Path to manni.config.yaml\")\n .option(\"--no-config\", \"Ignore any discovered config file\")\n .option(\"-g, --graph <path>\", \"Graph .ttl path (default: config out)\")\n .option(\n \"-f, --format <format>\",\n `Output: ${GRAPH_FORMAT_LIST}`,\n formatOption,\n \"pretty\",\n )\n .option(\n \"--check\",\n \"Exit 1 when broken internal links exist or coverage is below threshold\",\n )\n .option(\n \"--top <n>\",\n \"How many most-connected docs to list\",\n countOption(\"--top\"),\n )\n .option(\n \"--coverage-threshold <pct>\",\n \"Minimum metadata coverage % (all fields); overrides config for this run\",\n // A percentage, so 0..100 rather than the 0..1 of a confidence. NaN here is\n // worse than a wrong number: `pct < NaN` is false for every field, so the\n // gate this flag exists to tighten would silently pass instead.\n numericOption(\"--coverage-threshold\", { min: 0, max: 100 }),\n )\n .action(\n (opts: {\n config?: string | boolean;\n graph?: string;\n format: GraphFormat;\n check?: boolean;\n top?: number;\n coverageThreshold?: number;\n }) => {\n try {\n const report = runStats({ ...rest(opts), ...documentOptions(opts) });\n console.log(renderStats(report, opts.format));\n process.exitCode = report.exitCode;\n } catch (e) {\n fail(e);\n }\n },\n );\n\nprogram\n .command(\"search\")\n .description(\"Rank graph nodes for a text query (needs `export search`)\")\n .argument(\"<query>\", \"Text query\")\n .option(\"-c, --config <path>\", \"Path to manni.config.yaml\")\n .option(\"--no-config\", \"Ignore any discovered config file\")\n .option(\"-g, --graph <path>\", \"Graph .ttl path (default: config out)\")\n .option(\n \"-i, --index <dir>\",\n \"Directory holding the indexes and manifest (default: beside the graph)\",\n )\n .option(\n \"--lang <tag>\",\n \"Which localization to search (required when the corpus has more than one)\",\n )\n .option(\"--limit <n>\", \"Maximum results (default 10)\", countOption(\"--limit\"))\n .option(\n \"--vectors <path>\",\n \"Vector sidecar path (default: from the manifest)\",\n )\n .option(\n \"--mode <mode>\",\n `Which legs to run: ${SEARCH_MODES.join(\" | \")} (default: hybrid when vectors exist)`,\n choiceOption(\"--mode\", SEARCH_MODES),\n )\n .option(\n \"-f, --format <format>\",\n `Output: ${GRAPH_FORMAT_LIST}`,\n formatOption,\n \"pretty\",\n )\n .action(\n async (\n query: string,\n opts: {\n config?: string | boolean;\n graph?: string;\n index?: string;\n lang?: string;\n limit?: number;\n vectors?: string;\n mode?: SearchMode;\n format: GraphFormat;\n },\n ) => {\n try {\n const report = await runSearch({\n ...rest(opts),\n ...documentOptions(opts),\n query,\n });\n console.log(renderSearch(report, opts.format));\n } catch (e) {\n fail(e);\n }\n },\n );\n\nprogram\n .command(\"traverse\")\n .description(\n \"Walk the graph from a node, honoring scope rules, with the full trace\",\n )\n .argument(\"<node>\", \"Starting node: a full IRI or a prefix:local CURIE\")\n .option(\"-c, --config <path>\", \"Path to manni.config.yaml\")\n .option(\"--no-config\", \"Ignore any discovered config file\")\n .option(\"-g, --graph <path>\", \"Graph .ttl path (default: config out)\")\n .option(\n \"-d, --depth <n>\",\n \"Maximum hops from the node (default 1; 3 under --impact)\",\n // Zero is allowed: it means the node itself, which is a real answer.\n countOption(\"--depth\", 0),\n )\n // Comma-separated and given once: a CURIE holds no comma, so one separator\n // is enough, and a second spelling would be a second thing to document.\n .option(\n \"--predicates <list>\",\n \"Only follow these predicates (comma-separated)\",\n )\n .option(\"--reverse\", \"Follow inbound edges (who points at this node)\")\n .option(\"--impact\", \"Transitive inbound reach: what a change here affects\")\n .option(\n \"--variant <variant>\",\n \"Scope filter: product variant IRI, title, or slug\",\n )\n // Not `--subject`: on `query` that is a triple's subject, and one flag name\n // means one thing across the domain.\n .option(\"--software-subject <subject>\", \"Scope filter: software subject\")\n .option(\"--lang <tag>\", \"Scope filter: BCP-47 language tag, matched in any case\")\n .option(\"--limit <n>\", \"Stop after this many nodes\", countOption(\"--limit\"))\n .option(\n \"-f, --format <format>\",\n `Output: ${GRAPH_FORMAT_LIST}`,\n formatOption,\n \"pretty\",\n )\n .action(\n (\n node: string,\n opts: {\n config?: string | boolean;\n graph?: string;\n depth?: number;\n predicates?: string;\n reverse?: boolean;\n impact?: boolean;\n variant?: string;\n softwareSubject?: string;\n lang?: string;\n limit?: number;\n format: GraphFormat;\n },\n ) => {\n try {\n const { softwareSubject, ...others } = rest(opts);\n const report = runTraverse({\n ...others,\n ...documentOptions(opts),\n ...(softwareSubject === undefined ? {} : { subject: softwareSubject }),\n node,\n predicates:\n opts.predicates === undefined\n ? undefined\n : splitList(opts.predicates),\n });\n console.log(renderTraverse(report, opts.format));\n } catch (e) {\n fail(e);\n }\n },\n );\n\nprogram\n .command(\"embed\")\n .description(\n \"Compute local embeddings for the search index (needs @huggingface/transformers)\",\n )\n .option(\"-c, --config <path>\", \"Path to manni.config.yaml\")\n .option(\"--no-config\", \"Ignore any discovered config file\")\n .option(\"-g, --graph <path>\", \"Graph .ttl path (default: config out)\")\n .option(\n \"-i, --index <dir>\",\n \"Directory holding the indexes and manifest (default: beside the graph)\",\n )\n .option(\n \"-o, --out <dir>\",\n \"Directory for the sidecars (default: the index directory)\",\n )\n // Not `--model`: on `fill` that is the inference model, a different thing.\n .option(\n \"--embedding-model <id>\",\n \"Embedding model id (any id; `mock` for offline runs)\",\n )\n .option(\"--dtype <dtype>\", \"Weight quantization (default q8)\")\n .option(\"--no-cache\", \"Ignore the vector cache\")\n .option(\n \"-f, --format <format>\",\n `Output: ${GRAPH_FORMAT_LIST}`,\n formatOption,\n \"pretty\",\n )\n .action(\n async (opts: {\n config?: string | boolean;\n graph?: string;\n index?: string;\n out?: string;\n embeddingModel?: string;\n dtype?: string;\n cache?: boolean;\n format: GraphFormat;\n }) => {\n try {\n const { embeddingModel, ...others } = rest(opts);\n const report = await runEmbed({\n ...others,\n ...documentOptions(opts),\n ...(embeddingModel === undefined ? {} : { model: embeddingModel }),\n noCache: opts.cache === false,\n });\n console.log(renderEmbed(report, opts.format));\n } catch (e) {\n fail(e);\n }\n },\n );\n\nprogram\n .command(\"export\")\n .description(\n \"Reserialize the built graph into a consumer format (jsonld file, iirds package, search index, or question set)\",\n )\n // The target is a positional, not `-f`: `-f` is the output format in every\n // other verb of the family (0051 §2), and one flag cannot mean two things.\n .argument(\"<target>\", `What to write: ${EXPORT_TARGETS.join(\" | \")}`)\n .option(\"-c, --config <path>\", \"Path to manni.config.yaml\")\n .option(\"--no-config\", \"Ignore any discovered config file\")\n .option(\"-g, --graph <path>\", \"Graph .ttl path (default: config out)\")\n .option(\n \"-o, --out <path>\",\n \"Output path (default: the graph path with the target's extension)\",\n )\n .action(\n async (\n target: string,\n opts: { config?: string | boolean; graph?: string; out?: string },\n ) => {\n try {\n if (!(EXPORT_TARGETS as readonly string[]).includes(target)) {\n throw new GraphError(\n `Unknown export target \"${target}\". Use ${EXPORT_TARGETS.join(\" | \")}.`,\n );\n }\n const result = await runExport({\n ...documentOptions(opts),\n graph: opts.graph,\n format: target as ExportFormat,\n out: opts.out,\n });\n for (const warning of result.warnings) warn(warning);\n const noun = result.format === \"questions\" ? \"question\" : \"node\";\n console.log(\n `Wrote ${result.nodes} ${noun}${result.nodes === 1 ? \"\" : \"s\"} to ${result.outPath}`,\n );\n } catch (e) {\n fail(e);\n }\n },\n );\n\nreturn program;\n}\n","/**\n * What `-f` accepts, per verb.\n *\n * Each verb's renderer lives beside its command core (`renderCheck`,\n * `renderStats`, …); what belongs here is the *list*, stated once so the\n * union, the guard, the help text and the refusal sentence cannot drift\n * apart. It is the same shape a11y and cite keep (`A11Y_FORMATS`,\n * `REPORT_FORMATS`), which is why the sentence a user reads is the family's.\n *\n * Every verb takes `pretty | json`. `check` also takes `github` and `sarif`,\n * because it is the CI gate: it is the one graph verb whose output changes what\n * a reviewer sees on a pull request (proposal 0051 §2), and code scanning reads\n * SARIF (proposal 0089). It names its own list here rather than widening the\n * shared one, so no other verb advertises a format it cannot render.\n */\n\n/** The list every graph verb's `-f` accepts, in the order messages list them. */\nexport const GRAPH_FORMATS = [\"pretty\", \"json\"] as const;\nexport type GraphFormat = (typeof GRAPH_FORMATS)[number];\n\n/** `\"pretty | json\"`, for help text and the refusal sentence. */\nexport const GRAPH_FORMAT_LIST: string = GRAPH_FORMATS.join(\" | \");\n\n/** `check`'s list: the shared two plus the two CI formats. */\nexport const CHECK_FORMATS = [...GRAPH_FORMATS, \"github\", \"sarif\"] as const;\nexport type CheckFormat = (typeof CHECK_FORMATS)[number];\n\n/** `shapes show`'s list: the shared two plus a frontmatter skeleton. */\nexport const SHAPES_SHOW_FORMATS = [...GRAPH_FORMATS, \"markdown\"] as const;\n\n/** `\"pretty | json | markdown\"`, for help text and the refusal sentence. */\nexport const SHAPES_SHOW_FORMAT_LIST: string = SHAPES_SHOW_FORMATS.join(\" | \");\n\n/** `\"pretty | json | github | sarif\"`, for help text and the refusal sentence. */\nexport const CHECK_FORMAT_LIST: string = CHECK_FORMATS.join(\" | \");\n","/**\n * `manni graph shapes` and `manni graph shapes show <shape>`: what the shapes\n * in effect ask for, before a page is written (proposal 0089). The listing\n * names each node shape and what it targets. `show` prints every property a\n * shape checks and the frontmatter key that feeds it, from `sh:name`, and\n * `-f markdown` turns those keys into a frontmatter skeleton.\n *\n * The shapes are the ones `check` would run: `--shapes`, else\n * `graph.check.shapes`, else the bundled file.\n */\nimport { resolve } from \"node:path\";\nimport { DataFactory, type Store } from \"n3\";\nimport type { Severity } from \"../../shared/severity.js\";\nimport { GraphError } from \"../types.js\";\nimport { loadRunConfig } from \"../core/config.js\";\nimport { compactIri } from \"../core/load.js\";\nimport { bundledShapesPath } from \"../core/pkg.js\";\nimport {\n loadShapes,\n localName,\n shapeText,\n type LoadedShapes,\n type ShapesFile,\n} from \"../core/shacl.js\";\nimport { byCodeUnit } from \"../core/sort.js\";\nimport { NS } from \"../core/vocab.js\";\n\nconst SH = \"http://www.w3.org/ns/shacl#\";\n\nexport interface ShapesOptions {\n config?: string;\n /** `--no-config`: skip discovery and use the bundled shapes. */\n noConfig?: boolean;\n /** Shapes .ttl paths (default: config `check.shapes`, then bundled). */\n shapes?: string[];\n cwd?: string;\n}\n\n/** One node shape, as `graph shapes` lists it. */\nexport interface NodeShapeRow {\n /** The shape's local name, such as `DocumentShape`. */\n name: string;\n /** The shapes file's id. */\n id: string;\n /** `\"bundled\"`, or the path as given. */\n source: string;\n /** What the shape targets: a class IRI, or `objects of <predicate>`. */\n target: string | null;\n closed: boolean;\n description: string | null;\n guide: string | null;\n}\n\n/** One property a node shape checks. */\nexport interface PropertyRow {\n /** The property shape's local name, or `null` for a blank node. */\n rule: string | null;\n /** The predicate IRI. */\n path: string;\n /** The frontmatter key that feeds it (`sh:name`), or `null` when manni writes it. */\n key: string | null;\n min: number;\n max: number | null;\n severity: Severity;\n description: string | null;\n}\n\nexport interface ShapeDetail extends NodeShapeRow {\n properties: PropertyRow[];\n}\n\n/** The listing `graph shapes` prints. */\nexport interface ShapesList {\n shapes: NodeShapeRow[];\n}\n\n/** What `graph shapes show` prints: one block per file that defines the shape. */\nexport interface ShapesShow {\n shapes: ShapeDetail[];\n}\n\ninterface Resolved {\n loaded: LoadedShapes;\n sourceOf: Map<ShapesFile, string>;\n}\n\n/** The shapes `check` would run, each with the name the listing gives it. */\nfunction resolveShapes(opts: ShapesOptions): Resolved {\n const cwd = opts.cwd ?? process.cwd();\n const config = loadRunConfig(\n {\n ...(opts.config === undefined ? {} : { configPath: opts.config }),\n ...(opts.noConfig === undefined ? {} : { noConfig: opts.noConfig }),\n },\n cwd,\n );\n const given = opts.shapes && opts.shapes.length > 0 ? opts.shapes : config.check.shapes;\n const sources =\n given.length > 0\n ? given.map((p) => ({ path: resolve(cwd, p), label: p }))\n : [bundledShapesPath(import.meta.url)];\n const loaded = loadShapes(sources);\n const sourceOf = new Map<ShapesFile, string>(\n loaded.files.map((file) => [file, given.length > 0 ? file.label : \"bundled\"]),\n );\n return { loaded, sourceOf };\n}\n\n/** Where a shape's file sits in the order the files were given. */\nfunction fileIndex(resolved: Resolved, iri: string): number {\n const file = resolved.loaded.fileOf.get(iri);\n return file === undefined ? 0 : resolved.loaded.files.indexOf(file);\n}\n\nconst named = (iri: string) => DataFactory.namedNode(iri);\n\nfunction firstObject(store: Store, subject: string, predicate: string): string | undefined {\n return store\n .getObjects(named(subject), named(predicate), null)\n .map((o) => o.value)\n .sort(byCodeUnit)[0];\n}\n\nfunction nodeShapeRow(resolved: Resolved, iri: string): NodeShapeRow {\n const { loaded, sourceOf } = resolved;\n // Every node shape listed here is the subject of its own `a sh:NodeShape`\n // triple, and every triple came from a file, so the lookup always finds one.\n // No fallback to another file, which would misattribute the row.\n const file = loaded.fileOf.get(iri);\n const store = loaded.store;\n const targetClass = firstObject(store, iri, `${SH}targetClass`);\n const objectsOf = firstObject(store, iri, `${SH}targetObjectsOf`);\n return {\n name: localName(iri),\n id: file?.id ?? \"\",\n source: file === undefined ? \"\" : (sourceOf.get(file) ?? file.label),\n target:\n targetClass ?? (objectsOf === undefined ? null : `objects of ${objectsOf}`),\n closed: firstObject(store, iri, `${SH}closed`) === \"true\",\n description: shapeText(store, named(iri), `${SH}description`),\n guide: file?.guide ?? null,\n };\n}\n\n/** Every named node shape in the store, sorted by name. */\nfunction nodeShapes(store: Store): string[] {\n return store\n .getSubjects(named(`${NS.rdf}type`), named(`${SH}NodeShape`), null)\n .filter((s) => s.termType === \"NamedNode\")\n .map((s) => s.value)\n .sort((a, b) => byCodeUnit(localName(a), localName(b)) || byCodeUnit(a, b));\n}\n\nconst SEVERITIES: Record<string, Severity> = {\n [`${SH}Violation`]: \"error\",\n [`${SH}Warning`]: \"warning\",\n [`${SH}Info`]: \"notice\",\n};\n\nfunction propertyRows(store: Store, shape: string): PropertyRow[] {\n const rows: PropertyRow[] = [];\n for (const property of store.getObjects(named(shape), named(`${SH}property`), null)) {\n const term =\n property.termType === \"BlankNode\"\n ? DataFactory.blankNode(property.value)\n : named(property.value);\n const read = (predicate: string): string | undefined =>\n store\n .getObjects(term, named(predicate), null)\n .map((o) => o.value)\n .sort(byCodeUnit)[0];\n const path = read(`${SH}path`);\n if (path === undefined) continue;\n const min = read(`${SH}minCount`);\n const max = read(`${SH}maxCount`);\n rows.push({\n rule: property.termType === \"NamedNode\" ? localName(property.value) : null,\n path,\n key: shapeText(store, term, `${SH}name`),\n min: min === undefined ? 0 : Number(min),\n max: max === undefined ? null : Number(max),\n severity: SEVERITIES[read(`${SH}severity`) ?? \"\"] ?? \"error\",\n description: shapeText(store, term, `${SH}description`),\n });\n }\n return rows.sort(\n (a, b) => byCodeUnit(a.rule ?? \"\", b.rule ?? \"\") || byCodeUnit(a.path, b.path),\n );\n}\n\nexport function runShapes(opts: ShapesOptions = {}): ShapesList {\n const resolved = resolveShapes(opts);\n // Grouped by file, in the order the files were given, then by name.\n const shapes = nodeShapes(resolved.loaded.store).sort(\n (a, b) => fileIndex(resolved, a) - fileIndex(resolved, b),\n );\n return { shapes: shapes.map((iri) => nodeShapeRow(resolved, iri)) };\n}\n\nexport function runShapesShow(name: string, opts: ShapesOptions = {}): ShapesShow {\n const resolved = resolveShapes(opts);\n const all = nodeShapes(resolved.loaded.store);\n const matching = all.filter((iri) => localName(iri) === name);\n if (matching.length === 0) {\n if (all.length === 0) {\n throw new GraphError(`Unknown shape \"${name}\". The shapes in effect define no node shapes.`);\n }\n const available = [...new Set(all.map(localName))].join(\", \");\n throw new GraphError(`Unknown shape \"${name}\". Available: ${available}.`);\n }\n return {\n shapes: matching.map((iri) => ({\n ...nodeShapeRow(resolved, iri),\n properties: propertyRows(resolved.loaded.store, iri),\n })),\n };\n}\n\n/** How often a property may occur, in lint's words. */\nfunction occurrence(min: number, max: number | null): string {\n if (max === 0) return \"forbidden\";\n if (max === null) {\n if (min === 0) return \"optional, repeats\";\n if (min === 1) return \"required, repeats\";\n return `at least ${String(min)}`;\n }\n if (min === 1 && max === 1) return \"required\";\n if (min === 0 && max === 1) return \"optional\";\n return `${String(min)} to ${String(max)}`;\n}\n\n/** Rows of cells, each column padded to its widest cell. */\nfunction columns(rows: string[][]): string[] {\n const widths: number[] = [];\n for (const row of rows) {\n row.forEach((cell, i) => (widths[i] = Math.max(widths[i] ?? 0, cell.length)));\n }\n return rows.map((row) =>\n row\n .map((cell, i) => (i === row.length - 1 ? cell : cell.padEnd(widths[i] ?? 0)))\n .join(\" \")\n .trimEnd(),\n );\n}\n\nconst compactTarget = (target: string | null): string =>\n target === null\n ? \"(no target)\"\n : target.startsWith(\"objects of \")\n ? `objects of ${compactIri(target.slice(\"objects of \".length))}`\n : compactIri(target);\n\nexport function renderShapes(list: ShapesList, format: \"pretty\" | \"json\"): string {\n if (format === \"json\") return JSON.stringify(list, null, 2);\n // One block per file: `runShapes` lists them grouped, in the order given.\n const groups: NodeShapeRow[][] = [];\n for (const shape of list.shapes) {\n const last = groups.at(-1);\n const head = last?.[0];\n if (last !== undefined && head?.id === shape.id && head.source === shape.source) {\n last.push(shape);\n } else {\n groups.push([shape]);\n }\n }\n const blocks: string[] = [];\n for (const rows of groups) {\n const first = rows[0];\n if (first === undefined) continue;\n const lines = [first.source === first.id ? first.id : `${first.id} (${first.source})`];\n if (first.guide !== null) lines.push(` Guide: ${first.guide}`);\n lines.push(\n ...columns(\n rows.map((s) => [s.name, compactTarget(s.target), s.description ?? \"\"]),\n ).map((l) => ` ${l}`),\n );\n blocks.push(lines.join(\"\\n\"));\n }\n return blocks.join(\"\\n\\n\");\n}\n\nexport function renderShapesShow(\n show: ShapesShow,\n format: \"pretty\" | \"json\" | \"markdown\",\n): string {\n if (format === \"json\") return JSON.stringify(show, null, 2);\n if (format === \"markdown\") return skeleton(show);\n return show.shapes\n .map((shape) => {\n const head = [compactTarget(shape.target), ...(shape.closed ? [\"closed\"] : [])].join(\", \");\n const lines = [`${shape.name} ${shape.id} ${head}`];\n if (shape.description !== null) lines.push(` ${shape.description}`);\n if (shape.guide !== null) lines.push(` Guide: ${shape.guide}`);\n lines.push(\"\");\n const rows = columns(\n shape.properties.map((p) => {\n const words = [\n occurrence(p.min, p.max),\n ...(p.severity === \"error\" ? [] : [p.severity]),\n ].join(\", \");\n return [p.rule ?? \"(unnamed)\", compactIri(p.path), p.key === null ? words : `${p.key} · ${words}`];\n }),\n );\n shape.properties.forEach((p, i) => {\n lines.push(` ${rows[i] ?? \"\"}`);\n if (p.description !== null) lines.push(` ${p.description}`);\n });\n return lines.join(\"\\n\");\n })\n .join(\"\\n\\n\");\n}\n\n/** A nested key of the skeleton: its comment, its value, or its children. */\ninterface SkeletonNode {\n comment: string | null;\n required: boolean;\n repeats: boolean;\n children: Map<string, SkeletonNode>;\n}\n\n/**\n * A frontmatter skeleton from every `sh:name` the shape carries. A required\n * key is written out and an optional one is commented, each under its\n * description. A dotted key nests, and a parent is commented when every key\n * under it is.\n */\nfunction skeleton(show: ShapesShow): string {\n const root = new Map<string, SkeletonNode>();\n for (const shape of show.shapes) {\n for (const p of shape.properties) {\n if (p.key === null) continue;\n let level = root;\n let node: SkeletonNode | undefined;\n for (const part of p.key.split(\".\")) {\n node = level.get(part);\n if (node === undefined) {\n node = { comment: null, required: false, repeats: false, children: new Map() };\n level.set(part, node);\n }\n level = node.children;\n }\n if (node === undefined) continue;\n node.comment ??= p.description;\n node.required ||= p.min > 0;\n node.repeats ||= p.max !== 1;\n }\n }\n const first = show.shapes[0];\n if (first === undefined || root.size === 0) {\n throw new GraphError(\n `${first?.name ?? \"This shape\"} has no frontmatter keys. manni writes every value it checks.`,\n );\n }\n const required = (node: SkeletonNode): boolean =>\n node.children.size === 0 ? node.required : [...node.children.values()].some(required);\n const lines = [\"---\", `# ${first.name}, ${first.id}`];\n for (const g of [...new Set(show.shapes.map((s) => s.guide))]) {\n if (g !== null) lines.push(`# Guide: ${g}`);\n }\n const write = (level: Map<string, SkeletonNode>, indent: string): void => {\n for (const [key, node] of [...level].sort(([a], [b]) => byCodeUnit(a, b))) {\n const mark = required(node) ? \"\" : \"# \";\n if (node.children.size > 0) {\n lines.push(`${indent}${mark}${key}:`);\n write(node.children, `${indent} `);\n continue;\n }\n if (node.comment !== null) lines.push(`${indent}# ${node.comment}`);\n lines.push(`${indent}${mark}${key}:${node.repeats ? \" []\" : \"\"}`);\n }\n };\n write(root, \"\");\n lines.push(\"---\");\n return lines.join(\"\\n\");\n}\n","/**\n * `manni graph init` — scaffold a starter `graph:` section in manni.config.yaml.\n *\n * The family file is shared with the other tools, so a file that already\n * exists is not overwritten: the section is appended to it, leaving the\n * siblings' keys and comments exactly as they were. A file that already has a\n * `graph:` key is refused.\n */\nimport { existsSync, readFileSync } from \"node:fs\";\nimport { resolve } from \"node:path\";\nimport { parse as parseYaml } from \"yaml\";\nimport { errorMessage } from \"../../shared/errors.js\";\nimport { writeTextAtomic } from \"../../shared/write-file.js\";\nimport { GraphError } from \"../types.js\";\nimport { CONFIG_SECTION, DEFAULT_CONFIG_FILENAME } from \"../core/config.js\";\n\nconst HEADER = `# manni.config.yaml — shared configuration for the manni family of tools.\n# Each tool reads its own top-level key; manni graph reads \"graph:\".\n`;\n\nconst STARTER = `# Base IRI for every minted node. Set this to a namespace you control;\n# without it, IRIs fall back to the urn:manni:graph: placeholder.\n# baseIri: https://example.com/graph/\n\n# There is no document set here. \\`manni graph build\\` and \\`manni graph fill\\` read the\n# paths you name, or the collections declared once for every tool at the TOP\n# level of this file, beside \\`graph:\\` rather than inside it:\n#\n# collections:\n# - name: site\n# paths: [\"docs/**/*.md\"]\n#\n# Output of \\`manni graph build\\`.\nout: graph/graph.ttl\n\n# Map published-site routes back to source files so route-style links\n# (/docs/actions/find) become graph edges. A route may also carry the BCP-47\n# \\`language\\` labelling every document under its root; a page's own \\`lang\\`\n# frontmatter wins. Uncomment and adjust:\n# routes:\n# - basePath: /docs\n# root: docs\n# extensions: [.md, .mdx, .markdown]\n# indexFiles: [index, README]\n# - basePath: /docs/de\n# root: docs/de\n# language: de\n\n# What to derive triples from. Remove entries to opt out.\nbuild:\n derive: [frontmatter, sections, links, tags, images, code, provenance, terms]\n\n# PROV-O settings. Git history is detected, not switched: per-file dates and\n# author agents, rename -> prov:wasRevisionOf, and the build activity's HEAD\n# committer date are derived wherever git can run over a repository, and a run\n# that cannot says so once and builds the rest. Deterministic per commit;\n# wall-clock time never enters the graph.\n# qualified: emit prov:qualifiedAttribution/qualifiedAssociation nodes\n# with roles alongside the direct properties.\nprovenance:\n qualified: true\n\n# Which fields a published graph may carry is read from x-manni-graph-output in\n# the schema set \\`manni meta validate\\` resolves for each page. Set that under\n# meta: (schemas, strict, register), not here. The default set keeps the\n# stewardship people fields (owner, stakeholders, reviewed-by) out.\n\n# SHACL shapes \\`manni graph check\\` validates the built graph against. Default:\n# the shapes contract bundled with manni (shapes/graph/shapes-1.1.1.ttl).\n# check:\n# shapes: [\"./my-shapes.ttl\"]\n\n# Metadata coverage gate for \\`manni graph stats --check\\`. A number applies to\n# every measured field; a map gates named fields only. Unset gates nothing.\n# stats:\n# coverageThreshold:\n# title: 100\n# description: 50\n\n# Which provider \\`manni graph fill\\` sends pages to. Unset, the family's\n# top-level providers: map decides, and then \\`auto\\`, which detects one: an\n# Anthropic key, then an OpenAI key, then the Claude CLI, then a local model.\n# Connection settings (apiKeyEnv, baseUrl, command) live in that map, declared\n# once for every manni tool. \\`--provider\\` wins over this, \\`--local\\` over both.\n# provider: anthropic # auto | anthropic | openai | claude-cli | llama-cpp\n# model: claude-sonnet-4-5 # the provider's default when omitted\n\n# LLM settings for \\`manni graph fill\\` (SKOS frontmatter proposals and sample questions).\nfill:\n temperature: 0\n # Stop after this many inference calls. One page is one turn, and a cached\n # page spends none. Unset is unbounded.\n # maxTurns: 50\n cacheDir: .manni/graph/cache\n # fill proposes every field; confidence (0..1 per field) gates what is\n # written. Fields scored below the threshold are reported, not written.\n confidenceThreshold: 0.7\n # fields: defaults to every fillable field — uncomment to restrict.\n # Record meta-provenance (model + /graph/ pointers + confidence) on filled docs.\n writeProvenance: true\n # Reject proposals that would violate the SHACL shapes contract\n # (broader/narrower cycles, conflicting labels).\n validateGraph: true\n # Also propose per-section metadata. Off by default: it costs more output per\n # call, and section metadata is explicit-only, so review it as carefully.\n sections: false\n # Sample questions: draft until a page has perPage, each pinned to the lines\n # that answer it. A question request sends at most chunkChars of a page.\n questions:\n perPage: 3\n chunkChars: 12000\n # Send nothing off this machine: only a local model already downloaded.\n offline: false\n\n# Local embeddings for semantic search (\\`manni graph embed\\`). Needs the optional\n# peer: npm install @huggingface/transformers\n# embed:\n# model: onnx-community/granite-embedding-small-english-r2-ONNX\n# dtype: q8 # q8 keeps embedding reproducible across platforms\n# out: graph # directory for the per-language vector sidecars\n# cacheDir: .manni/graph/embed-cache\n\n# Optional enrichment for \\`manni graph export iirds\\` (the iiRDS package).\n# Absent, a minimal valid package is still produced.\n# export:\n# iirds:\n# title: My Docs # package title (default: \"manni graph export\")\n# creator: Acme Corp # Creator iirds:Party + vcard:Organization\n# version: \"1.3\" # iiRDS version literal: \"1.2\" | \"1.3\"\n`;\n\n/** The starter as a `graph:` section: every line nested one level. */\nfunction starterSection(): string {\n const body = STARTER.split(\"\\n\")\n .map((line) => (line === \"\" ? \"\" : ` ${line}`))\n .join(\"\\n\");\n return `${CONFIG_SECTION}:\\n${body}`;\n}\n\nexport async function runInit(cwd = process.cwd()): Promise<string> {\n const path = resolve(cwd, DEFAULT_CONFIG_FILENAME);\n if (!existsSync(path)) {\n await writeTextAtomic(path, `${HEADER}${starterSection()}`);\n return path;\n }\n\n // A family file is already here. Parse it to make sure a `graph:` key can be\n // appended: the document must be a mapping (or empty) without one.\n const text = readFileSync(path, \"utf8\");\n let doc: unknown;\n try {\n doc = parseYaml(text);\n } catch (e) {\n throw new GraphError(\n `Invalid YAML in ${DEFAULT_CONFIG_FILENAME}: ${errorMessage(e)}`,\n );\n }\n if (doc != null && (typeof doc !== \"object\" || Array.isArray(doc))) {\n throw new GraphError(\n `${DEFAULT_CONFIG_FILENAME}: top level must be a mapping — not adding a \\`${CONFIG_SECTION}:\\` section to it.`,\n );\n }\n if (doc != null && Object.hasOwn(doc, CONFIG_SECTION)) {\n throw new GraphError(\n `${DEFAULT_CONFIG_FILENAME} already has a \\`${CONFIG_SECTION}:\\` section — not overwriting.`,\n );\n }\n // Append as text rather than re-serialising the document, so the siblings'\n // keys and comments come out byte-for-byte as they went in.\n const separator = text === \"\" || text.endsWith(\"\\n\") ? \"\" : \"\\n\";\n const blank = text === \"\" ? \"\" : \"\\n\";\n await writeTextAtomic(\n path,\n `${text}${separator}${blank}${starterSection()}`,\n );\n return path;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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