@hawkeyexl/manni 4.20.1 → 4.22.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.
Files changed (314) hide show
  1. package/README.md +1 -1
  2. package/dist/{batch-J626LZ22.js → batch-C3NN2YXB.js} +20 -21
  3. package/dist/build-CEVEAHN7.js +36 -0
  4. package/dist/calibrate-CSKPY5AK.js +42 -0
  5. package/dist/capture-3HDBIHH6.js +37 -0
  6. package/dist/check-555TCJGF.js +45 -0
  7. package/dist/check-KGJBV42O.js +30 -0
  8. package/dist/{check-RCSQARQE.js → check-KXWHSCCR.js} +13 -16
  9. package/dist/check-MZSXCS2M.js +33 -0
  10. package/dist/{check-PQ7S5I3I.js → check-QNHLTYPN.js} +23 -23
  11. package/dist/{chunk-YIHIRMXN.js → chunk-2VLZDU4E.js} +5 -5
  12. package/dist/{chunk-D54BQM5P.js → chunk-37Q7WEJJ.js} +9 -9
  13. package/dist/{chunk-QSPH4F56.js → chunk-3ZVRGBK6.js} +5 -5
  14. package/dist/chunk-3ZVRGBK6.js.map +1 -0
  15. package/dist/{chunk-P5DWBG6T.js → chunk-46MMIJWR.js} +3 -3
  16. package/dist/{chunk-P6XZ44C2.js → chunk-4LYVTR2T.js} +4 -4
  17. package/dist/{chunk-ODSIHEIW.js → chunk-562QZKAB.js} +6599 -3508
  18. package/dist/chunk-562QZKAB.js.map +1 -0
  19. package/dist/{chunk-ACJUZFRT.js → chunk-57LZPG4V.js} +29 -4
  20. package/dist/chunk-57LZPG4V.js.map +1 -0
  21. package/dist/chunk-5LQX57BW.js +100 -0
  22. package/dist/chunk-5LQX57BW.js.map +1 -0
  23. package/dist/{chunk-MPXMQGJI.js → chunk-63EQKVNT.js} +45 -910
  24. package/dist/chunk-63EQKVNT.js.map +1 -0
  25. package/dist/{chunk-6FY573GB.js → chunk-64DULZIG.js} +4 -4
  26. package/dist/{chunk-TAJYMXMM.js → chunk-6SVHI2U6.js} +2 -2
  27. package/dist/{chunk-OVUQNM7Y.js → chunk-6UHEMPEY.js} +3 -157
  28. package/dist/chunk-6UHEMPEY.js.map +1 -0
  29. package/dist/{chunk-A633WB3N.js → chunk-A5YUK3SG.js} +37 -26
  30. package/dist/chunk-A5YUK3SG.js.map +1 -0
  31. package/dist/{chunk-C5BXSQDO.js → chunk-A67EJ3J6.js} +6 -6
  32. package/dist/{chunk-2GTR24SA.js → chunk-BLDL23RY.js} +8 -8
  33. package/dist/{chunk-JPXC62SD.js → chunk-BY3635RR.js} +82 -16
  34. package/dist/chunk-BY3635RR.js.map +1 -0
  35. package/dist/{chunk-CFMI74TP.js → chunk-BZ74YUYE.js} +2 -2
  36. package/dist/{chunk-NDPQ2GQ4.js → chunk-CHTSA3YR.js} +6 -6
  37. package/dist/{chunk-5CJ3P5O3.js → chunk-CPYQ4BJK.js} +19 -100
  38. package/dist/chunk-CPYQ4BJK.js.map +1 -0
  39. package/dist/{chunk-Z2T5U7HN.js → chunk-CQTESLC5.js} +2 -2
  40. package/dist/{chunk-245W2Q7C.js → chunk-D4BGNAN5.js} +2 -2
  41. package/dist/{chunk-XPO655IX.js → chunk-E3HYSNS6.js} +4 -4
  42. package/dist/{chunk-LPJ3IB26.js → chunk-EL2KNRC3.js} +17 -3
  43. package/dist/chunk-EL2KNRC3.js.map +1 -0
  44. package/dist/{chunk-ISDFYXLA.js → chunk-FTSNG6DZ.js} +48 -28
  45. package/dist/chunk-FTSNG6DZ.js.map +1 -0
  46. package/dist/{chunk-MJZK7G4B.js → chunk-FXE5K56B.js} +3 -3
  47. package/dist/{chunk-YM2W43DI.js → chunk-HYEKQ22B.js} +13 -9
  48. package/dist/chunk-HYEKQ22B.js.map +1 -0
  49. package/dist/{chunk-QGBNWEWS.js → chunk-IC3FJWIF.js} +2 -2
  50. package/dist/{chunk-OQR3VVAX.js → chunk-IDDRHB7E.js} +3 -3
  51. package/dist/chunk-INOVEO32.js +28 -0
  52. package/dist/chunk-INOVEO32.js.map +1 -0
  53. package/dist/chunk-IXFFVI5S.js +409 -0
  54. package/dist/chunk-IXFFVI5S.js.map +1 -0
  55. package/dist/{chunk-OXCWCEVV.js → chunk-JA7DWOVV.js} +5 -5
  56. package/dist/{chunk-B2242FYO.js → chunk-JF4BC7ZD.js} +38 -3
  57. package/dist/chunk-JF4BC7ZD.js.map +1 -0
  58. package/dist/{chunk-RN7IA742.js → chunk-JL5FHNQK.js} +9 -11
  59. package/dist/{chunk-RN7IA742.js.map → chunk-JL5FHNQK.js.map} +1 -1
  60. package/dist/{chunk-HGUCJ3K3.js → chunk-JVE5YQN4.js} +4 -4
  61. package/dist/chunk-K5LBIAOM.js +700 -0
  62. package/dist/chunk-K5LBIAOM.js.map +1 -0
  63. package/dist/{chunk-5E3ABFOQ.js → chunk-KIUFBUUZ.js} +13 -11
  64. package/dist/{chunk-5E3ABFOQ.js.map → chunk-KIUFBUUZ.js.map} +1 -1
  65. package/dist/{chunk-SUTY4VCZ.js → chunk-LCMBG4LY.js} +3635 -3409
  66. package/dist/chunk-LCMBG4LY.js.map +1 -0
  67. package/dist/{chunk-H3C3UXTA.js → chunk-LMS2RWDS.js} +15 -13
  68. package/dist/{chunk-H3C3UXTA.js.map → chunk-LMS2RWDS.js.map} +1 -1
  69. package/dist/{chunk-RA2BER5P.js → chunk-MR5JWMC2.js} +2 -2
  70. package/dist/{chunk-JCTHXG33.js → chunk-NHOGTAPK.js} +2 -2
  71. package/dist/{chunk-VM7VAFJW.js → chunk-NVYDWVXN.js} +2 -1
  72. package/dist/{chunk-N2VB6UUE.js → chunk-O6IDYZVW.js} +7 -5
  73. package/dist/{chunk-N2VB6UUE.js.map → chunk-O6IDYZVW.js.map} +1 -1
  74. package/dist/{chunk-MTMR65NM.js → chunk-OHMLEITS.js} +2 -2
  75. package/dist/{chunk-NUQF5F5J.js → chunk-PNDEKFF3.js} +2 -2
  76. package/dist/{chunk-S2HW3CBF.js → chunk-PX7OTUNU.js} +6 -6
  77. package/dist/{chunk-4F5WGZRP.js → chunk-Q7FFJMFO.js} +19 -15
  78. package/dist/chunk-Q7FFJMFO.js.map +1 -0
  79. package/dist/{chunk-D4XQX4W7.js → chunk-QJJPTS6L.js} +5 -3
  80. package/dist/{chunk-D4XQX4W7.js.map → chunk-QJJPTS6L.js.map} +1 -1
  81. package/dist/chunk-RAN3CF33.js +1875 -0
  82. package/dist/chunk-RAN3CF33.js.map +1 -0
  83. package/dist/{chunk-YYWZ2MSL.js → chunk-S7V4F7HC.js} +16 -11
  84. package/dist/chunk-S7V4F7HC.js.map +1 -0
  85. package/dist/{chunk-CXL6ES7O.js → chunk-SCKVDD4E.js} +4 -4
  86. package/dist/{chunk-ZB3OFSRB.js → chunk-TJYJ4BNK.js} +4 -4
  87. package/dist/{chunk-MJZ5HYYL.js → chunk-TR5TNPWT.js} +2 -2
  88. package/dist/{chunk-MJZ5HYYL.js.map → chunk-TR5TNPWT.js.map} +1 -1
  89. package/dist/chunk-TT5UDTDM.js +888 -0
  90. package/dist/chunk-TT5UDTDM.js.map +1 -0
  91. package/dist/{chunk-N3DYE6LJ.js → chunk-TWYJ2TVS.js} +7 -7
  92. package/dist/{chunk-BM43RJIS.js → chunk-UQI463L3.js} +9 -9
  93. package/dist/{chunk-FIR2MAGS.js → chunk-V27DOGAO.js} +2 -2
  94. package/dist/{chunk-O4O6JOGD.js → chunk-VSDXZAQU.js} +14 -20
  95. package/dist/chunk-VSDXZAQU.js.map +1 -0
  96. package/dist/{chunk-4DFBBU4A.js → chunk-VSHMXMBZ.js} +2 -2
  97. package/dist/{chunk-ROZDHPKA.js → chunk-VZSATUI7.js} +4 -4
  98. package/dist/{chunk-EOJEPEYY.js → chunk-W5OZMYMX.js} +2 -2
  99. package/dist/{chunk-KERICP5Y.js → chunk-WW4JATBJ.js} +6 -6
  100. package/dist/{chunk-SSQZB5SQ.js → chunk-XG6PVB5S.js} +11 -1
  101. package/dist/chunk-XG6PVB5S.js.map +1 -0
  102. package/dist/{chunk-TDG2S5UE.js → chunk-XQKRD5A3.js} +4 -4
  103. package/dist/{chunk-GGTCSMNX.js → chunk-XSP3TUFN.js} +5 -5
  104. package/dist/{chunk-UVC3BUKU.js → chunk-XTMONCQE.js} +6 -405
  105. package/dist/chunk-XTMONCQE.js.map +1 -0
  106. package/dist/{chunk-WRWW6SGG.js → chunk-YB3KD5RI.js} +3 -3
  107. package/dist/chunk-ZAOJYN2D.js +159 -0
  108. package/dist/chunk-ZAOJYN2D.js.map +1 -0
  109. package/dist/{chunk-FKELQCGN.js → chunk-ZKIXGFID.js} +2 -2
  110. package/dist/{chunk-BY4THWAQ.js → chunk-ZT3ERG4B.js} +3 -3
  111. package/dist/chunk-ZTRC37NH.js +38 -0
  112. package/dist/chunk-ZTRC37NH.js.map +1 -0
  113. package/dist/{chunk-LXJ4FZ7Y.js → chunk-ZW4YASUB.js} +4 -4
  114. package/dist/{chunk-E6JYRVR5.js → chunk-ZX4TOTZS.js} +27 -8
  115. package/dist/chunk-ZX4TOTZS.js.map +1 -0
  116. package/dist/{cli-4RTNEVVX.js → cli-4QAH3DBX.js} +9 -11
  117. package/dist/{cli-IIFCE6GY.js → cli-6476FRBK.js} +16 -19
  118. package/dist/{cli-IIFCE6GY.js.map → cli-6476FRBK.js.map} +1 -1
  119. package/dist/{cli-DQRFSU7U.js → cli-7XT7O5YM.js} +16 -18
  120. package/dist/{cli-DQRFSU7U.js.map → cli-7XT7O5YM.js.map} +1 -1
  121. package/dist/{cli-PCZ7XNCO.js → cli-FGCHGJYZ.js} +70 -53
  122. package/dist/cli-FGCHGJYZ.js.map +1 -0
  123. package/dist/{cli-6J4P5MLU.js → cli-JE4LG35H.js} +4 -4
  124. package/dist/{cli-K5635N25.js → cli-U3622DIB.js} +14 -17
  125. package/dist/{cli-K5635N25.js.map → cli-U3622DIB.js.map} +1 -1
  126. package/dist/{cli-K5QWXB7H.js → cli-ULHJTJHH.js} +74 -41
  127. package/dist/cli-ULHJTJHH.js.map +1 -0
  128. package/dist/{cli-ISKXSN3P.js → cli-W7B2PNZO.js} +18 -21
  129. package/dist/{cli-ISKXSN3P.js.map → cli-W7B2PNZO.js.map} +1 -1
  130. package/dist/{cli-FTSJQSB4.js → cli-YGMXZ46V.js} +17 -20
  131. package/dist/{cli-FTSJQSB4.js.map → cli-YGMXZ46V.js.map} +1 -1
  132. package/dist/{cli-TCHSYJLB.js → cli-YINQL2NI.js} +28 -29
  133. package/dist/{cli-TCHSYJLB.js.map → cli-YINQL2NI.js.map} +1 -1
  134. package/dist/cli-Z3ART5DN.js +152 -0
  135. package/dist/cli-Z3ART5DN.js.map +1 -0
  136. package/dist/cli.js +15 -15
  137. package/dist/cli.js.map +1 -1
  138. package/dist/{config-7I5CHHRZ.js → config-2YJPJ36T.js} +5 -5
  139. package/dist/docmeta.js +8 -10
  140. package/dist/docmeta.js.map +1 -1
  141. package/dist/github-64ZVAUIT.js +28 -0
  142. package/dist/github-ARGPMQD2.js +32 -0
  143. package/dist/github-YHJABBUI.js +33 -0
  144. package/dist/graph/runtime.js.map +1 -1
  145. package/dist/{host-YSTYO5DX.js → host-JT27OWTC.js} +3 -3
  146. package/dist/index.d.ts +334 -24
  147. package/dist/index.js +218 -203
  148. package/dist/index.js.map +1 -1
  149. package/dist/{json-7Z2IFGB3.js → json-CVOVXB7O.js} +12 -15
  150. package/dist/json-QNGJFUY2.js +40 -0
  151. package/dist/{labels-SE2WL7WD.js → labels-5WOKC3VR.js} +11 -14
  152. package/dist/{labels-SE2WL7WD.js.map → labels-5WOKC3VR.js.map} +1 -1
  153. package/dist/lint-OQGB4DWJ.js +32 -0
  154. package/dist/list-EDAB7X5Y.js +30 -0
  155. package/dist/list-OQ3IYV2W.js +37 -0
  156. package/dist/list-PN6JKYNX.js +33 -0
  157. package/dist/{page-A2Y4ZMV4.js → page-TPNMHL27.js} +11 -14
  158. package/dist/{prepare-M2COBP5O.js → prepare-3V2QYBKL.js} +20 -22
  159. package/dist/{prepare-M2COBP5O.js.map → prepare-3V2QYBKL.js.map} +1 -1
  160. package/dist/{pretty-SFFOMSG5.js → pretty-EZ2NFU3C.js} +13 -16
  161. package/dist/pretty-HO2LYG5N.js +41 -0
  162. package/dist/{pretty-D3DZFC5U.js → pretty-K3M4AW2D.js} +12 -15
  163. package/dist/{provider-JY2I3VLF.js → provider-YWNTTQPA.js} +3 -3
  164. package/dist/{release-VHHASAG7.js → release-EFLQT3FW.js} +3 -3
  165. package/dist/{reporters-TO7Q6JYF.js → reporters-4R2E7PRJ.js} +6 -6
  166. package/dist/{reporters-UTLJVSWX.js → reporters-YVLLFBO5.js} +11 -14
  167. package/dist/run-H4BOR2FR.js +36 -0
  168. package/dist/{sarif-IAGMXA6C.js → sarif-GWHWJJFP.js} +10 -13
  169. package/dist/sarif-SJFVSOBV.js +33 -0
  170. package/dist/sarif-YBFD5OUL.js +28 -0
  171. package/dist/{strategy-UKRA6WO4.js → strategy-T56PH2VK.js} +29 -46
  172. package/dist/strategy-T56PH2VK.js.map +1 -0
  173. package/dist/{term-AMORBEO7.js → term-33YSMISR.js} +18 -22
  174. package/dist/{term-AMORBEO7.js.map → term-33YSMISR.js.map} +1 -1
  175. package/dist/{validate-CDTKFZUV.js → validate-6R5UBDGU.js} +6 -7
  176. package/package.json +1 -1
  177. package/plugin/manni/.claude-plugin/plugin.json +11 -3
  178. package/plugin/manni/hooks/graph-server.mjs +3 -3
  179. package/plugin/manni/hooks/hooks.json +4 -4
  180. package/plugin/manni/hooks/manni.mjs +18 -5
  181. package/plugin/manni/hooks/page-metadata.mjs +81 -7
  182. package/plugin/manni/hooks/tracevals.mjs +7 -0
  183. package/plugin/manni/skills/fix/SKILL.md +8 -4
  184. package/shapes/graph/shapes-1.3.0.ttl +1250 -0
  185. package/dist/build-AYLD6V6Y.js +0 -38
  186. package/dist/calibrate-2HZFACIX.js +0 -43
  187. package/dist/capture-NMDIPC6S.js +0 -39
  188. package/dist/check-KNQV7GLU.js +0 -33
  189. package/dist/check-OH4KKXP3.js +0 -33
  190. package/dist/check-PRAMKQCI.js +0 -47
  191. package/dist/chunk-4F5WGZRP.js.map +0 -1
  192. package/dist/chunk-4H3IOF52.js +0 -3200
  193. package/dist/chunk-4H3IOF52.js.map +0 -1
  194. package/dist/chunk-5CJ3P5O3.js.map +0 -1
  195. package/dist/chunk-A633WB3N.js.map +0 -1
  196. package/dist/chunk-ACJUZFRT.js.map +0 -1
  197. package/dist/chunk-B2242FYO.js.map +0 -1
  198. package/dist/chunk-CT5WSUUZ.js +0 -441
  199. package/dist/chunk-CT5WSUUZ.js.map +0 -1
  200. package/dist/chunk-DNF42MK7.js +0 -326
  201. package/dist/chunk-DNF42MK7.js.map +0 -1
  202. package/dist/chunk-E6JYRVR5.js.map +0 -1
  203. package/dist/chunk-ISDFYXLA.js.map +0 -1
  204. package/dist/chunk-JPXC62SD.js.map +0 -1
  205. package/dist/chunk-LPJ3IB26.js.map +0 -1
  206. package/dist/chunk-MPXMQGJI.js.map +0 -1
  207. package/dist/chunk-O4O6JOGD.js.map +0 -1
  208. package/dist/chunk-ODSIHEIW.js.map +0 -1
  209. package/dist/chunk-OVUQNM7Y.js.map +0 -1
  210. package/dist/chunk-QSPH4F56.js.map +0 -1
  211. package/dist/chunk-SIREOHLW.js +0 -233
  212. package/dist/chunk-SIREOHLW.js.map +0 -1
  213. package/dist/chunk-SSQZB5SQ.js.map +0 -1
  214. package/dist/chunk-SUTY4VCZ.js.map +0 -1
  215. package/dist/chunk-UP6NBQ62.js +0 -2
  216. package/dist/chunk-UVC3BUKU.js.map +0 -1
  217. package/dist/chunk-WI3PPQQX.js +0 -164
  218. package/dist/chunk-WI3PPQQX.js.map +0 -1
  219. package/dist/chunk-YM2W43DI.js.map +0 -1
  220. package/dist/chunk-YYWZ2MSL.js.map +0 -1
  221. package/dist/chunk-ZPLVANY2.js +0 -15
  222. package/dist/chunk-ZPLVANY2.js.map +0 -1
  223. package/dist/cli-K5QWXB7H.js.map +0 -1
  224. package/dist/cli-PCZ7XNCO.js.map +0 -1
  225. package/dist/cli-TM2JCTQT.js +0 -84
  226. package/dist/cli-TM2JCTQT.js.map +0 -1
  227. package/dist/github-BUK5CVQW.js +0 -27
  228. package/dist/github-CMAZWS76.js +0 -31
  229. package/dist/github-NXR4QMMM.js +0 -35
  230. package/dist/json-NZSGRYOE.js +0 -34
  231. package/dist/lint-VUYM5PPM.js +0 -35
  232. package/dist/list-4JGOXLOZ.js +0 -33
  233. package/dist/list-LTF25DQE.js +0 -33
  234. package/dist/list-WD3TZS5R.js +0 -36
  235. package/dist/pretty-R67YU6TU.js +0 -35
  236. package/dist/run-BDGYRUXJ.js +0 -39
  237. package/dist/sarif-EHAMGCVR.js +0 -36
  238. package/dist/sarif-GJYLRXLS.js +0 -30
  239. package/dist/strategy-UKRA6WO4.js.map +0 -1
  240. package/dist/validate-CDTKFZUV.js.map +0 -1
  241. /package/dist/{batch-J626LZ22.js.map → batch-C3NN2YXB.js.map} +0 -0
  242. /package/dist/{build-AYLD6V6Y.js.map → build-CEVEAHN7.js.map} +0 -0
  243. /package/dist/{calibrate-2HZFACIX.js.map → calibrate-CSKPY5AK.js.map} +0 -0
  244. /package/dist/{capture-NMDIPC6S.js.map → capture-3HDBIHH6.js.map} +0 -0
  245. /package/dist/{check-KNQV7GLU.js.map → check-555TCJGF.js.map} +0 -0
  246. /package/dist/{check-OH4KKXP3.js.map → check-KGJBV42O.js.map} +0 -0
  247. /package/dist/{check-PRAMKQCI.js.map → check-KXWHSCCR.js.map} +0 -0
  248. /package/dist/{check-RCSQARQE.js.map → check-MZSXCS2M.js.map} +0 -0
  249. /package/dist/{check-PQ7S5I3I.js.map → check-QNHLTYPN.js.map} +0 -0
  250. /package/dist/{chunk-YIHIRMXN.js.map → chunk-2VLZDU4E.js.map} +0 -0
  251. /package/dist/{chunk-D54BQM5P.js.map → chunk-37Q7WEJJ.js.map} +0 -0
  252. /package/dist/{chunk-P5DWBG6T.js.map → chunk-46MMIJWR.js.map} +0 -0
  253. /package/dist/{chunk-P6XZ44C2.js.map → chunk-4LYVTR2T.js.map} +0 -0
  254. /package/dist/{chunk-6FY573GB.js.map → chunk-64DULZIG.js.map} +0 -0
  255. /package/dist/{chunk-TAJYMXMM.js.map → chunk-6SVHI2U6.js.map} +0 -0
  256. /package/dist/{chunk-C5BXSQDO.js.map → chunk-A67EJ3J6.js.map} +0 -0
  257. /package/dist/{chunk-2GTR24SA.js.map → chunk-BLDL23RY.js.map} +0 -0
  258. /package/dist/{chunk-CFMI74TP.js.map → chunk-BZ74YUYE.js.map} +0 -0
  259. /package/dist/{chunk-NDPQ2GQ4.js.map → chunk-CHTSA3YR.js.map} +0 -0
  260. /package/dist/{chunk-Z2T5U7HN.js.map → chunk-CQTESLC5.js.map} +0 -0
  261. /package/dist/{chunk-245W2Q7C.js.map → chunk-D4BGNAN5.js.map} +0 -0
  262. /package/dist/{chunk-XPO655IX.js.map → chunk-E3HYSNS6.js.map} +0 -0
  263. /package/dist/{chunk-MJZK7G4B.js.map → chunk-FXE5K56B.js.map} +0 -0
  264. /package/dist/{chunk-QGBNWEWS.js.map → chunk-IC3FJWIF.js.map} +0 -0
  265. /package/dist/{chunk-OQR3VVAX.js.map → chunk-IDDRHB7E.js.map} +0 -0
  266. /package/dist/{chunk-OXCWCEVV.js.map → chunk-JA7DWOVV.js.map} +0 -0
  267. /package/dist/{chunk-HGUCJ3K3.js.map → chunk-JVE5YQN4.js.map} +0 -0
  268. /package/dist/{chunk-RA2BER5P.js.map → chunk-MR5JWMC2.js.map} +0 -0
  269. /package/dist/{chunk-JCTHXG33.js.map → chunk-NHOGTAPK.js.map} +0 -0
  270. /package/dist/{chunk-VM7VAFJW.js.map → chunk-NVYDWVXN.js.map} +0 -0
  271. /package/dist/{chunk-MTMR65NM.js.map → chunk-OHMLEITS.js.map} +0 -0
  272. /package/dist/{chunk-NUQF5F5J.js.map → chunk-PNDEKFF3.js.map} +0 -0
  273. /package/dist/{chunk-S2HW3CBF.js.map → chunk-PX7OTUNU.js.map} +0 -0
  274. /package/dist/{chunk-CXL6ES7O.js.map → chunk-SCKVDD4E.js.map} +0 -0
  275. /package/dist/{chunk-ZB3OFSRB.js.map → chunk-TJYJ4BNK.js.map} +0 -0
  276. /package/dist/{chunk-N3DYE6LJ.js.map → chunk-TWYJ2TVS.js.map} +0 -0
  277. /package/dist/{chunk-BM43RJIS.js.map → chunk-UQI463L3.js.map} +0 -0
  278. /package/dist/{chunk-FIR2MAGS.js.map → chunk-V27DOGAO.js.map} +0 -0
  279. /package/dist/{chunk-4DFBBU4A.js.map → chunk-VSHMXMBZ.js.map} +0 -0
  280. /package/dist/{chunk-ROZDHPKA.js.map → chunk-VZSATUI7.js.map} +0 -0
  281. /package/dist/{chunk-EOJEPEYY.js.map → chunk-W5OZMYMX.js.map} +0 -0
  282. /package/dist/{chunk-KERICP5Y.js.map → chunk-WW4JATBJ.js.map} +0 -0
  283. /package/dist/{chunk-TDG2S5UE.js.map → chunk-XQKRD5A3.js.map} +0 -0
  284. /package/dist/{chunk-GGTCSMNX.js.map → chunk-XSP3TUFN.js.map} +0 -0
  285. /package/dist/{chunk-WRWW6SGG.js.map → chunk-YB3KD5RI.js.map} +0 -0
  286. /package/dist/{chunk-FKELQCGN.js.map → chunk-ZKIXGFID.js.map} +0 -0
  287. /package/dist/{chunk-BY4THWAQ.js.map → chunk-ZT3ERG4B.js.map} +0 -0
  288. /package/dist/{chunk-LXJ4FZ7Y.js.map → chunk-ZW4YASUB.js.map} +0 -0
  289. /package/dist/{chunk-UP6NBQ62.js.map → cli-4QAH3DBX.js.map} +0 -0
  290. /package/dist/{cli-6J4P5MLU.js.map → cli-JE4LG35H.js.map} +0 -0
  291. /package/dist/{cli-4RTNEVVX.js.map → config-2YJPJ36T.js.map} +0 -0
  292. /package/dist/{config-7I5CHHRZ.js.map → github-64ZVAUIT.js.map} +0 -0
  293. /package/dist/{github-BUK5CVQW.js.map → github-ARGPMQD2.js.map} +0 -0
  294. /package/dist/{github-CMAZWS76.js.map → github-YHJABBUI.js.map} +0 -0
  295. /package/dist/{github-NXR4QMMM.js.map → host-JT27OWTC.js.map} +0 -0
  296. /package/dist/{host-YSTYO5DX.js.map → json-CVOVXB7O.js.map} +0 -0
  297. /package/dist/{json-7Z2IFGB3.js.map → json-QNGJFUY2.js.map} +0 -0
  298. /package/dist/{json-NZSGRYOE.js.map → lint-OQGB4DWJ.js.map} +0 -0
  299. /package/dist/{lint-VUYM5PPM.js.map → list-EDAB7X5Y.js.map} +0 -0
  300. /package/dist/{list-4JGOXLOZ.js.map → list-OQ3IYV2W.js.map} +0 -0
  301. /package/dist/{list-LTF25DQE.js.map → list-PN6JKYNX.js.map} +0 -0
  302. /package/dist/{list-WD3TZS5R.js.map → page-TPNMHL27.js.map} +0 -0
  303. /package/dist/{page-A2Y4ZMV4.js.map → pretty-EZ2NFU3C.js.map} +0 -0
  304. /package/dist/{pretty-D3DZFC5U.js.map → pretty-HO2LYG5N.js.map} +0 -0
  305. /package/dist/{pretty-R67YU6TU.js.map → pretty-K3M4AW2D.js.map} +0 -0
  306. /package/dist/{pretty-SFFOMSG5.js.map → provider-YWNTTQPA.js.map} +0 -0
  307. /package/dist/{release-VHHASAG7.js.map → release-EFLQT3FW.js.map} +0 -0
  308. /package/dist/{provider-JY2I3VLF.js.map → reporters-4R2E7PRJ.js.map} +0 -0
  309. /package/dist/{reporters-TO7Q6JYF.js.map → reporters-YVLLFBO5.js.map} +0 -0
  310. /package/dist/{reporters-UTLJVSWX.js.map → run-H4BOR2FR.js.map} +0 -0
  311. /package/dist/{run-BDGYRUXJ.js.map → sarif-GWHWJJFP.js.map} +0 -0
  312. /package/dist/{sarif-EHAMGCVR.js.map → sarif-SJFVSOBV.js.map} +0 -0
  313. /package/dist/{sarif-GJYLRXLS.js.map → sarif-YBFD5OUL.js.map} +0 -0
  314. /package/dist/{sarif-IAGMXA6C.js.map → validate-6R5UBDGU.js.map} +0 -0
@@ -9,12 +9,12 @@ import {
9
9
  runTemplates,
10
10
  runTemplatesInfer,
11
11
  runTools
12
- } from "./chunk-P6XZ44C2.js";
12
+ } from "./chunk-4LYVTR2T.js";
13
13
  import {
14
14
  render,
15
15
  renderTemplates,
16
16
  renderTools
17
- } from "./chunk-LXJ4FZ7Y.js";
17
+ } from "./chunk-ZW4YASUB.js";
18
18
  import "./chunk-GLP5PSXB.js";
19
19
  import {
20
20
  LINT_JOBS,
@@ -23,26 +23,23 @@ import {
23
23
  rebaseConfig,
24
24
  resolveStructureTool,
25
25
  runLint
26
- } from "./chunk-YIHIRMXN.js";
26
+ } from "./chunk-2VLZDU4E.js";
27
27
  import "./chunk-ZMECS2IJ.js";
28
28
  import "./chunk-TIUTIOFB.js";
29
- import "./chunk-QGBNWEWS.js";
29
+ import "./chunk-IC3FJWIF.js";
30
30
  import "./chunk-G5I2JTDK.js";
31
31
  import {
32
32
  LintError
33
33
  } from "./chunk-TI4DA6DF.js";
34
- import "./chunk-UP6NBQ62.js";
35
- import "./chunk-MJZK7G4B.js";
36
- import "./chunk-ROZDHPKA.js";
37
- import "./chunk-SUTY4VCZ.js";
38
- import "./chunk-WI3PPQQX.js";
34
+ import "./chunk-FXE5K56B.js";
35
+ import "./chunk-VZSATUI7.js";
36
+ import "./chunk-LCMBG4LY.js";
39
37
  import {
40
38
  OMITTED_WHEN_CLEAN,
41
39
  REPORT_FORMATS,
42
40
  REPORT_FORMAT_LIST,
43
41
  isReportFormat
44
- } from "./chunk-XPO655IX.js";
45
- import "./chunk-4H3IOF52.js";
42
+ } from "./chunk-E3HYSNS6.js";
46
43
  import {
47
44
  collect,
48
45
  configOption,
@@ -50,11 +47,11 @@ import {
50
47
  readStdin,
51
48
  reportConfig,
52
49
  splitList
53
- } from "./chunk-ODSIHEIW.js";
50
+ } from "./chunk-562QZKAB.js";
54
51
  import "./chunk-DSWKBZWW.js";
55
52
  import {
56
53
  STDIN_TOKEN
57
- } from "./chunk-WRWW6SGG.js";
54
+ } from "./chunk-YB3KD5RI.js";
58
55
  import "./chunk-QK6VYJHV.js";
59
56
  import {
60
57
  shouldColor
@@ -62,14 +59,14 @@ import {
62
59
  import {
63
60
  fail
64
61
  } from "./chunk-YEUYKR62.js";
65
- import "./chunk-B2242FYO.js";
62
+ import "./chunk-JF4BC7ZD.js";
66
63
  import {
67
64
  notice
68
65
  } from "./chunk-HX44GB4Z.js";
69
- import "./chunk-VM7VAFJW.js";
66
+ import "./chunk-NVYDWVXN.js";
70
67
  import {
71
68
  package_default
72
- } from "./chunk-MJZ5HYYL.js";
69
+ } from "./chunk-TR5TNPWT.js";
73
70
  import "./chunk-OWBRDNRZ.js";
74
71
  import "./chunk-G3T47CFV.js";
75
72
  import "./chunk-2H7UOFLK.js";
@@ -389,4 +386,4 @@ function buildProgram() {
389
386
  export {
390
387
  buildProgram
391
388
  };
392
- //# sourceMappingURL=cli-K5635N25.js.map
389
+ //# sourceMappingURL=cli-U3622DIB.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/lint/cli.ts"],"sourcesContent":["/**\n * The lint program. Named `lint` because that is where it is mounted\n * (`manni lint …`); `src/cli.ts` adds it to the umbrella and runs it. Thin\n * commander wrapper over the command cores. Follows clig.dev: primary output to\n * stdout, diagnostics to stderr, color only on a TTY (and never under\n * NO_COLOR/--no-color), meaningful exit codes.\n *\n * Grammar per proposal 0034: the verbs are `check`, `structure`, `templates`\n * and `tools`, and there is no default subcommand, so a bare `manni lint` is a\n * usage error that lists them. `check` runs every configured job; `structure`\n * runs one of them, and carries the options that belong to the tool performing\n * it.\n *\n * Exit codes are the contract CI reads:\n * 0 every file linted clean\n * 1 the run produced findings\n * 2 the tool could not do its job - bad usage, missing template, unreadable\n * input. A LintError is always this, never a lint failure.\n *\n * The 1/2 split is what lets a workflow tell \"the docs are wrong\" apart from\n * \"the linter is misconfigured\", which a single non-zero exit cannot.\n */\nimport { Command } from \"commander\";\nimport pkg from \"../../package.json\" with { type: \"json\" };\nimport {\n collect,\n configOption,\n explicitFalse,\n readStdin,\n reportConfig,\n splitList,\n} from \"../shared/cli-options.js\";\nimport { shouldColor } from \"../shared/color.js\";\nimport { fail } from \"../shared/run.js\";\nimport { notice } from \"../shared/warn.js\";\nimport {\n OMITTED_WHEN_CLEAN,\n REPORT_FORMAT_LIST,\n STDIN_TOKEN,\n} from \"../meta/internal.js\";\nimport {\n REPORT_FORMATS,\n isReportFormat,\n type ReportFormat as FamilyFormat,\n} from \"../meta/index.js\";\nimport { LintError } from \"./types.js\";\nimport { runLint } from \"./commands/lint.js\";\nimport {\n runTemplateShow,\n runTemplates,\n runTemplatesInfer,\n} from \"./commands/templates.js\";\nimport { runTools } from \"./commands/tools.js\";\nimport { INFER_FORMATS, isInferFormat, type InferFormat } from \"./core/infer.js\";\nimport {\n LINT_JOBS,\n TOOLS_BY_JOB,\n loadConfig,\n rebaseConfig,\n} from \"./core/config.js\";\nimport { resolveStructureTool } from \"./tools/index.js\";\nimport {\n render,\n renderTemplates,\n renderTools,\n type ListFormat,\n type ReportFormat,\n} from \"./reporters/index.js\";\nimport {\n SHOW_FORMATS,\n isShowFormat,\n renderTemplateShow,\n type ShowFormat,\n} from \"./reporters/template-show.js\";\n\n/** The options `check` and `structure` share, in the family's spelling. */\ninterface InputCliOptions {\n /** `--collection <name>`, repeatable; commander's default value is `[]`. */\n collection: string[];\n /** `--ext <list>`; the command splits it. */\n ext?: string;\n /** `--exclude <glob>`, repeatable; commander's default value is `[]`. */\n exclude: string[];\n /** `--as <format>`: force a parser. */\n as?: string;\n /**\n * `-c, --config <path>` and `--no-config` share one commander attribute:\n * `undefined` with neither flag, the path with `-c`, `false` with\n * `--no-config`. Split by `configOption`.\n */\n config?: string | boolean;\n allowEmpty?: boolean;\n /** `--no-gitignore`. */\n gitignore: boolean;\n /** `-f, --format <format>`. Always a string: the declaration has a default. */\n format: string;\n}\n\n/** `structure` adds the options of the tool that performs the job. */\ninterface StructureCliOptions extends InputCliOptions {\n tool?: string;\n template?: string;\n /** `--templates <path>`, repeatable; commander's default value is `[]`. */\n templates: string[];\n explain?: boolean;\n}\n\n/** What commander parses for `templates`. */\ninterface TemplatesCommandOptions {\n templates: string[];\n config?: string | boolean;\n format: string;\n}\n\n/** What commander parses for `templates infer`. */\ninterface TemplatesInferCliOptions {\n as?: string;\n name?: string;\n config?: string | boolean;\n format: string;\n out?: string;\n force?: boolean;\n}\n\n/** What commander parses for `tools`. */\ninterface ToolsCommandOptions {\n config?: string | boolean;\n format: string;\n}\n\n// `explain` is reachable through `--explain`, not `-f`: it reports on\n// configuration rather than on documents, and offering it as a format would\n// invite `-f explain` alongside a lint that then never happens. The `-f` set\n// itself is the family's, from meta, rather than a fourth hand-kept copy of\n// the same five words.\nconst LIST_FORMATS = new Set<string>([\"pretty\", \"json\"]);\n\n/** The heading the tool's own options print under, after the shared ones. */\nconst TOOL_OPTIONS_GROUP = \"Tool options:\";\n\nfunction resolveColor(program: Command): boolean {\n // commander maps --no-color to opts.color === false.\n const noColor = program.opts().color === false;\n return shouldColor({ noColor, isTTY: process.stdout.isTTY });\n}\n\nfunction reportFormat(value: unknown): FamilyFormat {\n const format = String(value);\n if (!isReportFormat(format)) {\n throw new LintError(\n `Unknown --format \"${format}\". Use ${REPORT_FORMAT_LIST}.`,\n );\n }\n return format;\n}\n\n/**\n * Whether a clean run may print nothing at all in this format.\n *\n * Only `github` may: an empty annotation stream is a clean check. Every other\n * format owes its envelope - an empty JSON array, a SARIF log with no results,\n * a JUnit suite of passing testcases - because a consumer parsing stdout must\n * not have to treat \"no output\" as a third outcome. `explain` is never clean\n * or dirty; it always has something to say.\n */\nfunction omittedWhenClean(format: ReportFormat): boolean {\n return format !== \"explain\" && OMITTED_WHEN_CLEAN.has(format);\n}\n\nfunction listFormat(value: unknown): ListFormat {\n const format = String(value);\n if (!LIST_FORMATS.has(format)) {\n throw new LintError(\n `Unknown --format \"${format}\". Use pretty or json.`,\n );\n }\n return format as ListFormat;\n}\n\n/**\n * `templates infer -f`: the format a *template file* is written in, which is\n * not the set a report is rendered in. A template is YAML or JSON because those\n * are the two the loader reads back, and `pretty` would name a third thing the\n * tool cannot then load.\n */\nfunction inferFormat(value: unknown): InferFormat {\n const format = String(value);\n if (!isInferFormat(format)) {\n throw new LintError(`Unknown --format \"${format}\". Use yaml or json.`);\n }\n return format;\n}\n\n/** `templates show -f`: a report, a template's data, or a page skeleton. */\nfunction showFormat(value: unknown): ShowFormat {\n const format = String(value);\n if (!isShowFormat(format)) {\n throw new LintError(\n `Unknown --format \"${format}\". Use pretty, json or markdown.`,\n );\n }\n return format;\n}\n\n/**\n * `--tool <name>`: which tool performs the structure job. Refused by name\n * rather than ignored, because falling through to manni's engine would lint\n * with something other than what was asked for and say nothing.\n *\n * The refusal is the registry's, not a second copy of it here. `runLint`\n * refuses the same name with the same sentence for a caller that never touches\n * commander; this one fires first, so a bad `--tool` is reported before the\n * run asks what it was pointed at.\n */\nfunction assertStructureTool(value: string | undefined): void {\n if (value === undefined) return;\n resolveStructureTool(value);\n}\n\n/**\n * `-c/--config` and `--no-config`, in one place.\n *\n * Every verb here takes them, and they had been written out three times. A flag\n * two commands both have carries the same name *and* the same description, so\n * the declaration is shared rather than copied - which is what kept the fourth\n * copy, on `templates infer`, from spelling either of them slightly differently.\n */\nfunction withConfigOptions(command: Command): Command {\n return command\n .option(\"-c, --config <path>\", \"path to a manni config file\")\n .option(\"--no-config\", \"ignore any discovered config file\");\n}\n\n/**\n * The value of a flag a command and its parent both declare.\n *\n * Commander keeps parsing a parent's options past a subcommand name unless\n * `enablePositionalOptions()` is on, so `templates infer page.md -f json` sets\n * `format` on `templates` and leaves `infer` holding its own default. Both\n * commands declare `-f`, `-c` and `--no-config`, because \"commands must have\n * parallel behaviors\" and `infer` must list them in its own `--help`.\n *\n * Turning positional options on would fix it and move every other flag in this\n * program with it: `manni lint structure docs/ --no-color` is a root option\n * written after its command, and there are three more like it. So the lookup\n * changes instead. The nearest command actually *given* the flag wins, and the\n * subcommand's own default is the fallback - which is the reading a person\n * typing the line already has.\n */\nfunction optionValue(command: Command, key: string): unknown {\n for (\n let cmd: Command | null = command;\n cmd !== null;\n cmd = cmd.parent ?? null\n ) {\n if (cmd.getOptionValueSource(key) === \"cli\") return cmd.getOptionValue(key);\n }\n return command.getOptionValue(key);\n}\n\n/** The options every job verb takes, in one place so the two cannot drift. */\nfunction withInputOptions(command: Command): Command {\n command\n .argument(\n \"[paths...]\",\n \"files, directories, or globs to lint (use - for stdin)\",\n )\n .option(\n \"--collection <name>\",\n \"configured collection to run over; repeatable\",\n collect,\n [],\n )\n .option(\"--ext <list>\", \"comma-separated extensions for directory walks\")\n .option(\"--exclude <glob>\", \"glob to exclude; repeatable\", collect, [])\n .option(\"--as <format>\", \"force an input format (e.g. markdown, mdx)\")\n .option(\n \"-f, --format <format>\",\n `output: ${REPORT_FORMATS.join(\" | \")}`,\n \"pretty\",\n );\n return withConfigOptions(command)\n .option(\"--allow-empty\", \"treat zero matched files as success\")\n .option(\"--no-gitignore\", \"lint files .gitignore covers\");\n}\n\n/** The lint options every job verb turns its shared flags into. */\nfunction inputOptions(\n paths: string[],\n options: InputCliOptions,\n): {\n inputs: string[];\n collection: string[];\n exts?: string[];\n exclude: string[];\n as?: string;\n configPath?: string;\n noConfig?: boolean;\n allowEmpty?: boolean;\n respectGitignore?: boolean;\n onNotice: (message: string) => void;\n} {\n return {\n inputs: paths,\n collection: options.collection,\n ...(options.ext ? { exts: splitList(options.ext) } : {}),\n exclude: options.exclude,\n ...(options.as === undefined ? {} : { as: options.as }),\n ...configOption(options.config),\n // `undefined` rather than `false` when absent, so config still wins.\n ...(options.allowEmpty ? { allowEmpty: true } : {}),\n respectGitignore: explicitFalse(options.gitignore),\n onNotice: notice,\n };\n}\n\nexport function buildProgram(): Command {\n const program = new Command();\n program\n .name(\"lint\")\n .description(\n \"Validate document structure against doctype templates. Deterministic, CI-friendly.\",\n )\n .version(pkg.version, \"-V, --version\")\n .option(\"--no-color\", \"disable colored output\")\n .showHelpAfterError()\n // Exit code 1 is reserved for \"the docs are wrong\". Commander exits 1 on a\n // usage error by default, which would make a typo'd flag look exactly like\n // a failing lint to a workflow. With no callback, commander throws the\n // CommanderError instead, and the umbrella's runner maps it: help and\n // --version stay 0, every other usage error becomes 2. Commander has\n // already written its own message. This has to precede .command(), which\n // copies the callback into each subcommand.\n .exitOverride();\n\n /** Run one lint, render it, and settle the exit code. Both job verbs share it. */\n const lint = async (\n paths: string[],\n options: StructureCliOptions | InputCliOptions,\n command: Command,\n job: { tool?: StructureCliOptions } = {},\n ): Promise<void> => {\n const tool = job.tool;\n const format = reportFormat(options.format);\n const explain = tool?.explain === true;\n const stdinContent = paths.includes(STDIN_TOKEN) ? await readStdin() : undefined;\n const cwd = process.cwd();\n\n const run = await runLint({\n ...inputOptions(paths, options),\n ...(tool?.tool === undefined ? {} : { tool: tool.tool }),\n ...(tool?.template === undefined ? {} : { template: tool.template }),\n ...(tool && tool.templates.length > 0 ? { templates: tool.templates } : {}),\n ...(explain ? { explain: true } : {}),\n ...(stdinContent === undefined ? {} : { stdinContent }),\n // Which config governed the run, said where a report cannot be parsed\n // around: discovery walks up to the project boundary, so an unexpected\n // ancestor config is the difference between a five-minute diagnosis and\n // an hour of confusion.\n onConfigLoaded: reportConfig(format === \"pretty\", cwd),\n });\n\n const color = resolveColor(command.parent ?? command);\n const chosen: ReportFormat = explain ? \"explain\" : format;\n const text = render(run, chosen, { color });\n if (text.length > 0 || !omittedWhenClean(chosen)) {\n process.stdout.write(`${text}\\n`);\n }\n // `--explain` answers a question about configuration, so its exit code\n // reports whether it could answer it - not whether the docs are clean.\n //\n // That covers routing failures too: a page whose `type` matches no\n // template is a answered question, not an unanswered one, so it exits 0\n // like everything else here. Automation must not read this code as\n // \"everything routed\" - the ordinary run is what reports that, with exit\n // 1. Said in `--help` and the README, because the distinction is invisible\n // from the exit code alone.\n process.exitCode = explain ? 0 : run.summary.failed > 0 ? 1 : 0;\n };\n\n withInputOptions(\n program\n .command(\"check\")\n .description(\"Run every configured lint job over the given files/dirs/globs\"),\n )\n .addHelpText(\n \"after\",\n [\n \"\",\n \"Jobs: structure.\",\n \"\",\n \"Examples:\",\n \" manni lint check docs/ # every configured job\",\n \" manni lint check # targets from collections:\",\n \" manni lint check --collection guides\",\n ' manni lint check \"**/*.md\" -f github # CI annotations',\n \" cat page.md | manni lint check - --as markdown\",\n ].join(\"\\n\"),\n )\n .action(async (paths: string[], options: InputCliOptions, command: Command) => {\n try {\n // Which jobs this run covered, said once, beside the config line. The\n // full form also names the jobs that exist and are not configured;\n // `structure` is the only job there is, so today it is one word.\n if (options.format === \"pretty\") {\n process.stderr.write(`Checked: ${LINT_JOBS.join(\", \")}.\\n`);\n }\n await lint(paths, options, command);\n } catch (err) {\n fail(err);\n }\n });\n\n const structure = withInputOptions(\n program\n .command(\"structure\")\n .description(\n \"Lint document structure against doctype templates, routing each page by its `type`\",\n ),\n );\n structure\n .optionsGroup(TOOL_OPTIONS_GROUP)\n .option(\n \"--tool <name>\",\n `tool that performs the job: ${TOOLS_BY_JOB.structure.join(\", \")}`,\n )\n .option(\n \"-t, --template <ref>\",\n \"apply this template to every file, overriding type routing\",\n )\n .option(\n \"--templates <path>\",\n \"template file to route by: its `types:` win over built-ins; repeatable\",\n collect,\n [],\n )\n .option(\n \"--explain\",\n \"print how each file's template was chosen, and lint nothing (always exits 0, unrouted pages included)\",\n )\n .addHelpText(\n \"after\",\n [\n \"\",\n \"Examples:\",\n \" manni lint structure docs/ # route each page by its `type`\",\n \" manni lint structure docs/ --templates ./templates.yaml # add your own templates\",\n \" manni lint structure # targets from collections:\",\n \" manni lint structure docs/ --explain # show why each page routed where\",\n \" manni lint structure page.md -t tgdp:how-to:1.6 # force one template\",\n ' manni lint structure \"**/*.md\" -f github # CI annotations',\n \" manni lint structure docs/ --exclude '**/drafts/**'\",\n \" cat page.md | manni lint structure - -t tgdp:how-to:1.6 --as markdown\",\n ].join(\"\\n\"),\n )\n .action(\n async (paths: string[], options: StructureCliOptions, command: Command) => {\n try {\n assertStructureTool(options.tool);\n await lint(paths, options, command, { tool: options });\n } catch (err) {\n fail(err);\n }\n },\n );\n\n const templates = program\n .command(\"templates\")\n .description(\"List the templates that can be applied, and the types they serve\")\n .option(\n \"--templates <path>\",\n \"also list the templates in this file; repeatable\",\n collect,\n [],\n );\n withConfigOptions(templates)\n .option(\"-f, --format <format>\", \"output: pretty | json\", \"pretty\")\n .action(async (options: TemplatesCommandOptions, command: Command) => {\n try {\n const format = listFormat(options.format);\n // The listing answers \"what could route a page?\", so it has to see the\n // same template files a lint would - rebased the same way, or it would\n // answer for a different set of files depending on where it was run.\n const { configPath, noConfig } = configOption(options.config);\n const found = noConfig ? null : await loadConfig(configPath);\n const info = await runTemplates({\n templates:\n options.templates.length > 0\n ? options.templates\n : rebaseConfig(found).templates,\n });\n const color = resolveColor(command.parent ?? command);\n process.stdout.write(`${renderTemplates(info, format, { color })}\\n`);\n } catch (err) {\n fail(err);\n }\n });\n\n const inferCommand = templates\n .command(\"infer\")\n .description(\"Write a first template from a page that already has the shape you want\")\n .argument(\"<page>\", \"one file to infer from (use - for stdin)\")\n .option(\"--as <format>\", \"force an input format (e.g. markdown, mdx)\")\n .option(\n \"--name <name>\",\n \"name for the template; defaults to the page's `type`, else its filename\",\n )\n .option(\"-f, --format <format>\", `output: ${INFER_FORMATS.join(\" | \")}`, \"yaml\")\n .option(\"-o, --out <path>\", \"write the template here instead of to stdout\")\n .option(\"--force\", \"overwrite the --out path\");\n withConfigOptions(inferCommand)\n .addHelpText(\n \"after\",\n [\n \"\",\n \"Examples:\",\n \" manni lint templates infer docs/guides/install.md\",\n \" manni lint templates infer docs/guides/install.md --name how-to\",\n \" manni lint templates infer page.mdx -f json\",\n \" manni lint templates infer page.md -o ./templates.yaml\",\n \" manni lint templates infer page.md -o ./templates.yaml --force\",\n \" cat page.md | manni lint templates infer - --as markdown\",\n \"\",\n \"One page, and every rule it writes is exactly one occurrence: a single\",\n \"page cannot show what varies. Loosening a heading into a list or a\",\n \"pattern, setting `min: 0`, and adding a trailing rule with no heading\",\n \"for the sections that may follow are your edits to make.\",\n ].join(\"\\n\"),\n )\n .action(\n async (\n page: string,\n options: TemplatesInferCliOptions,\n command: Command,\n ) => {\n try {\n // `-f`, `-c` and `--no-config` are read through `optionValue`: the\n // parent `templates` declares all three, and commander hands it any\n // of them typed after `infer`.\n const format = inferFormat(optionValue(command, \"format\"));\n const { configPath, noConfig } = configOption(\n optionValue(command, \"config\"),\n );\n const stdinContent =\n page === STDIN_TOKEN ? await readStdin() : undefined;\n const result = await runTemplatesInfer({\n page,\n format,\n ...(options.as === undefined ? {} : { as: options.as }),\n ...(options.name === undefined ? {} : { name: options.name }),\n ...(options.out === undefined ? {} : { out: options.out }),\n ...(options.force === undefined ? {} : { force: options.force }),\n ...(configPath === undefined ? {} : { configPath }),\n ...(noConfig === undefined ? {} : { noConfig }),\n ...(stdinContent === undefined ? {} : { stdinContent }),\n // The template is the primary output, so with no --out it owns\n // stdout and the config line goes to stderr beside it. With --out\n // stdout is free, and the line still belongs on stderr: a reader\n // piping nothing is not a reason to move a diagnostic.\n onConfigLoaded: reportConfig(false, process.cwd()),\n });\n\n if (result.written === undefined) {\n process.stdout.write(result.text);\n return;\n }\n // Said on stderr, so `-o` leaves stdout empty for a shell that is\n // watching it, and the template file is the whole output.\n process.stderr.write(\n `Wrote template \"${result.name}\" to ${result.written}\\n`,\n );\n } catch (err) {\n fail(err);\n }\n },\n );\n\n templates\n .command(\"show\")\n .description(\n \"Print what a template asks for: each section, how often it may occur, what it must contain, and what it is for\",\n )\n .argument(\n \"<ref>\",\n \"template to show: a built-in id, a path, a path#name, or a URL\",\n )\n .option(\"-f, --format <format>\", `output: ${SHOW_FORMATS.join(\" | \")}`, \"pretty\")\n .addHelpText(\n \"after\",\n [\n \"\",\n \"Examples:\",\n \" manni lint templates show tgdp:how-to:1.6\",\n \" manni lint templates show ./templates.yaml#how-to\",\n \" manni lint templates show tgdp:reference:1.6 -f json\",\n \" manni lint templates show tgdp:how-to:1.6 -f markdown > docs/rotate-key.md\",\n ].join(\"\\n\"),\n )\n .action(async (ref: string, _options: unknown, command: Command) => {\n try {\n // `-f` is read through `optionValue`: the parent `templates` declares\n // it too, and commander hands it any `-f` typed after `show`.\n const format = showFormat(optionValue(command, \"format\"));\n const show = await runTemplateShow({ ref });\n const color = resolveColor(program);\n process.stdout.write(`${renderTemplateShow(show, format, { color })}\\n`);\n } catch (err) {\n fail(err);\n }\n });\n\n withConfigOptions(\n program\n .command(\"tools\")\n .description(\n \"List the lint jobs, the tool that performs each, and what it reads\",\n ),\n )\n .option(\"-f, --format <format>\", \"output: pretty | json\", \"pretty\")\n .action(async (options: ToolsCommandOptions, command: Command) => {\n try {\n const format = listFormat(options.format);\n const tools = await runTools(configOption(options.config));\n const color = resolveColor(command.parent ?? command);\n process.stdout.write(`${renderTools(tools, format, { color })}\\n`);\n } catch (err) {\n fail(err);\n }\n });\n\n return program;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBA,SAAS,eAAe;AAiHxB,IAAM,eAAe,oBAAI,IAAY,CAAC,UAAU,MAAM,CAAC;AAGvD,IAAM,qBAAqB;AAE3B,SAAS,aAAa,SAA2B;AAE/C,QAAM,UAAU,QAAQ,KAAK,EAAE,UAAU;AACzC,SAAO,YAAY,EAAE,SAAS,OAAO,QAAQ,OAAO,MAAM,CAAC;AAC7D;AAEA,SAAS,aAAa,OAA8B;AAClD,QAAM,SAAS,OAAO,KAAK;AAC3B,MAAI,CAAC,eAAe,MAAM,GAAG;AAC3B,UAAM,IAAI;AAAA,MACR,qBAAqB,MAAM,UAAU,kBAAkB;AAAA,IACzD;AAAA,EACF;AACA,SAAO;AACT;AAWA,SAAS,iBAAiB,QAA+B;AACvD,SAAO,WAAW,aAAa,mBAAmB,IAAI,MAAM;AAC9D;AAEA,SAAS,WAAW,OAA4B;AAC9C,QAAM,SAAS,OAAO,KAAK;AAC3B,MAAI,CAAC,aAAa,IAAI,MAAM,GAAG;AAC7B,UAAM,IAAI;AAAA,MACR,qBAAqB,MAAM;AAAA,IAC7B;AAAA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,KAAK;AACZ,WAAK,GAAG;AAAA,IACV;AAAA,EACF,CAAC;AAEH,SAAO;AACT;","names":[]}
1
+ {"version":3,"sources":["../src/lint/cli.ts"],"sourcesContent":["/**\n * The lint program. Named `lint` because that is where it is mounted\n * (`manni lint …`); `src/cli.ts` adds it to the umbrella and runs it. Thin\n * commander wrapper over the command cores. Follows clig.dev: primary output to\n * stdout, diagnostics to stderr, color only on a TTY (and never under\n * NO_COLOR/--no-color), meaningful exit codes.\n *\n * Grammar per proposal 0034: the verbs are `check`, `structure`, `templates`\n * and `tools`, and there is no default subcommand, so a bare `manni lint` is a\n * usage error that lists them. `check` runs every configured job; `structure`\n * runs one of them, and carries the options that belong to the tool performing\n * it.\n *\n * Exit codes are the contract CI reads:\n * 0 every file linted clean\n * 1 the run produced findings\n * 2 the tool could not do its job - bad usage, missing template, unreadable\n * input. A LintError is always this, never a lint failure.\n *\n * The 1/2 split is what lets a workflow tell \"the docs are wrong\" apart from\n * \"the linter is misconfigured\", which a single non-zero exit cannot.\n */\nimport { Command } from \"commander\";\nimport pkg from \"../../package.json\" with { type: \"json\" };\nimport {\n collect,\n configOption,\n explicitFalse,\n readStdin,\n reportConfig,\n splitList,\n} from \"../shared/cli-options.js\";\nimport { shouldColor } from \"../shared/color.js\";\nimport { fail } from \"../shared/run.js\";\nimport { notice } from \"../shared/warn.js\";\nimport {\n OMITTED_WHEN_CLEAN,\n REPORT_FORMAT_LIST,\n STDIN_TOKEN,\n} from \"../meta/internal.js\";\nimport {\n REPORT_FORMATS,\n isReportFormat,\n type ReportFormat as FamilyFormat,\n} from \"../meta/index.js\";\nimport { LintError } from \"./types.js\";\nimport { runLint } from \"./commands/lint.js\";\nimport {\n runTemplateShow,\n runTemplates,\n runTemplatesInfer,\n} from \"./commands/templates.js\";\nimport { runTools } from \"./commands/tools.js\";\nimport { INFER_FORMATS, isInferFormat, type InferFormat } from \"./core/infer.js\";\nimport {\n LINT_JOBS,\n TOOLS_BY_JOB,\n loadConfig,\n rebaseConfig,\n} from \"./core/config.js\";\nimport { resolveStructureTool } from \"./tools/index.js\";\nimport {\n render,\n renderTemplates,\n renderTools,\n type ListFormat,\n type ReportFormat,\n} from \"./reporters/index.js\";\nimport {\n SHOW_FORMATS,\n isShowFormat,\n renderTemplateShow,\n type ShowFormat,\n} from \"./reporters/template-show.js\";\n\n/** The options `check` and `structure` share, in the family's spelling. */\ninterface InputCliOptions {\n /** `--collection <name>`, repeatable; commander's default value is `[]`. */\n collection: string[];\n /** `--ext <list>`; the command splits it. */\n ext?: string;\n /** `--exclude <glob>`, repeatable; commander's default value is `[]`. */\n exclude: string[];\n /** `--as <format>`: force a parser. */\n as?: string;\n /**\n * `-c, --config <path>` and `--no-config` share one commander attribute:\n * `undefined` with neither flag, the path with `-c`, `false` with\n * `--no-config`. Split by `configOption`.\n */\n config?: string | boolean;\n allowEmpty?: boolean;\n /** `--no-gitignore`. */\n gitignore: boolean;\n /** `-f, --format <format>`. Always a string: the declaration has a default. */\n format: string;\n}\n\n/** `structure` adds the options of the tool that performs the job. */\ninterface StructureCliOptions extends InputCliOptions {\n tool?: string;\n template?: string;\n /** `--templates <path>`, repeatable; commander's default value is `[]`. */\n templates: string[];\n explain?: boolean;\n}\n\n/** What commander parses for `templates`. */\ninterface TemplatesCommandOptions {\n templates: string[];\n config?: string | boolean;\n format: string;\n}\n\n/** What commander parses for `templates infer`. */\ninterface TemplatesInferCliOptions {\n as?: string;\n name?: string;\n config?: string | boolean;\n format: string;\n out?: string;\n force?: boolean;\n}\n\n/** What commander parses for `tools`. */\ninterface ToolsCommandOptions {\n config?: string | boolean;\n format: string;\n}\n\n// `explain` is reachable through `--explain`, not `-f`: it reports on\n// configuration rather than on documents, and offering it as a format would\n// invite `-f explain` alongside a lint that then never happens. The `-f` set\n// itself is the family's, from meta, rather than a fourth hand-kept copy of\n// the same five words.\nconst LIST_FORMATS = new Set<string>([\"pretty\", \"json\"]);\n\n/** The heading the tool's own options print under, after the shared ones. */\nconst TOOL_OPTIONS_GROUP = \"Tool options:\";\n\nfunction resolveColor(program: Command): boolean {\n // commander maps --no-color to opts.color === false.\n const noColor = program.opts().color === false;\n return shouldColor({ noColor, isTTY: process.stdout.isTTY });\n}\n\nfunction reportFormat(value: unknown): FamilyFormat {\n const format = String(value);\n if (!isReportFormat(format)) {\n throw new LintError(\n `Unknown --format \"${format}\". Use ${REPORT_FORMAT_LIST}.`,\n );\n }\n return format;\n}\n\n/**\n * Whether a clean run may print nothing at all in this format.\n *\n * Only `github` may: an empty annotation stream is a clean check. Every other\n * format owes its envelope - an empty JSON array, a SARIF log with no results,\n * a JUnit suite of passing testcases - because a consumer parsing stdout must\n * not have to treat \"no output\" as a third outcome. `explain` is never clean\n * or dirty; it always has something to say.\n */\nfunction omittedWhenClean(format: ReportFormat): boolean {\n return format !== \"explain\" && OMITTED_WHEN_CLEAN.has(format);\n}\n\nfunction listFormat(value: unknown): ListFormat {\n const format = String(value);\n if (!LIST_FORMATS.has(format)) {\n throw new LintError(\n `Unknown --format \"${format}\". Use pretty or json.`,\n );\n }\n return format as ListFormat;\n}\n\n/**\n * `templates infer -f`: the format a *template file* is written in, which is\n * not the set a report is rendered in. A template is YAML or JSON because those\n * are the two the loader reads back, and `pretty` would name a third thing the\n * tool cannot then load.\n */\nfunction inferFormat(value: unknown): InferFormat {\n const format = String(value);\n if (!isInferFormat(format)) {\n throw new LintError(`Unknown --format \"${format}\". Use yaml or json.`);\n }\n return format;\n}\n\n/** `templates show -f`: a report, a template's data, or a page skeleton. */\nfunction showFormat(value: unknown): ShowFormat {\n const format = String(value);\n if (!isShowFormat(format)) {\n throw new LintError(\n `Unknown --format \"${format}\". Use pretty, json or markdown.`,\n );\n }\n return format;\n}\n\n/**\n * `--tool <name>`: which tool performs the structure job. Refused by name\n * rather than ignored, because falling through to manni's engine would lint\n * with something other than what was asked for and say nothing.\n *\n * The refusal is the registry's, not a second copy of it here. `runLint`\n * refuses the same name with the same sentence for a caller that never touches\n * commander; this one fires first, so a bad `--tool` is reported before the\n * run asks what it was pointed at.\n */\nfunction assertStructureTool(value: string | undefined): void {\n if (value === undefined) return;\n resolveStructureTool(value);\n}\n\n/**\n * `-c/--config` and `--no-config`, in one place.\n *\n * Every verb here takes them, and they had been written out three times. A flag\n * two commands both have carries the same name *and* the same description, so\n * the declaration is shared rather than copied - which is what kept the fourth\n * copy, on `templates infer`, from spelling either of them slightly differently.\n */\nfunction withConfigOptions(command: Command): Command {\n return command\n .option(\"-c, --config <path>\", \"path to a manni config file\")\n .option(\"--no-config\", \"ignore any discovered config file\");\n}\n\n/**\n * The value of a flag a command and its parent both declare.\n *\n * Commander keeps parsing a parent's options past a subcommand name unless\n * `enablePositionalOptions()` is on, so `templates infer page.md -f json` sets\n * `format` on `templates` and leaves `infer` holding its own default. Both\n * commands declare `-f`, `-c` and `--no-config`, because \"commands must have\n * parallel behaviors\" and `infer` must list them in its own `--help`.\n *\n * Turning positional options on would fix it and move every other flag in this\n * program with it: `manni lint structure docs/ --no-color` is a root option\n * written after its command, and there are three more like it. So the lookup\n * changes instead. The nearest command actually *given* the flag wins, and the\n * subcommand's own default is the fallback - which is the reading a person\n * typing the line already has.\n */\nfunction optionValue(command: Command, key: string): unknown {\n for (\n let cmd: Command | null = command;\n cmd !== null;\n cmd = cmd.parent ?? null\n ) {\n if (cmd.getOptionValueSource(key) === \"cli\") return cmd.getOptionValue(key);\n }\n return command.getOptionValue(key);\n}\n\n/** The options every job verb takes, in one place so the two cannot drift. */\nfunction withInputOptions(command: Command): Command {\n command\n .argument(\n \"[paths...]\",\n \"files, directories, or globs to lint (use - for stdin)\",\n )\n .option(\n \"--collection <name>\",\n \"configured collection to run over; repeatable\",\n collect,\n [],\n )\n .option(\"--ext <list>\", \"comma-separated extensions for directory walks\")\n .option(\"--exclude <glob>\", \"glob to exclude; repeatable\", collect, [])\n .option(\"--as <format>\", \"force an input format (e.g. markdown, mdx)\")\n .option(\n \"-f, --format <format>\",\n `output: ${REPORT_FORMATS.join(\" | \")}`,\n \"pretty\",\n );\n return withConfigOptions(command)\n .option(\"--allow-empty\", \"treat zero matched files as success\")\n .option(\"--no-gitignore\", \"lint files .gitignore covers\");\n}\n\n/** The lint options every job verb turns its shared flags into. */\nfunction inputOptions(\n paths: string[],\n options: InputCliOptions,\n): {\n inputs: string[];\n collection: string[];\n exts?: string[];\n exclude: string[];\n as?: string;\n configPath?: string;\n noConfig?: boolean;\n allowEmpty?: boolean;\n respectGitignore?: boolean;\n onNotice: (message: string) => void;\n} {\n return {\n inputs: paths,\n collection: options.collection,\n ...(options.ext ? { exts: splitList(options.ext) } : {}),\n exclude: options.exclude,\n ...(options.as === undefined ? {} : { as: options.as }),\n ...configOption(options.config),\n // `undefined` rather than `false` when absent, so config still wins.\n ...(options.allowEmpty ? { allowEmpty: true } : {}),\n respectGitignore: explicitFalse(options.gitignore),\n onNotice: notice,\n };\n}\n\nexport function buildProgram(): Command {\n const program = new Command();\n program\n .name(\"lint\")\n .description(\n \"Validate document structure against doctype templates. Deterministic, CI-friendly.\",\n )\n .version(pkg.version, \"-V, --version\")\n .option(\"--no-color\", \"disable colored output\")\n .showHelpAfterError()\n // Exit code 1 is reserved for \"the docs are wrong\". Commander exits 1 on a\n // usage error by default, which would make a typo'd flag look exactly like\n // a failing lint to a workflow. With no callback, commander throws the\n // CommanderError instead, and the umbrella's runner maps it: help and\n // --version stay 0, every other usage error becomes 2. Commander has\n // already written its own message. This has to precede .command(), which\n // copies the callback into each subcommand.\n .exitOverride();\n\n /** Run one lint, render it, and settle the exit code. Both job verbs share it. */\n const lint = async (\n paths: string[],\n options: StructureCliOptions | InputCliOptions,\n command: Command,\n job: { tool?: StructureCliOptions } = {},\n ): Promise<void> => {\n const tool = job.tool;\n const format = reportFormat(options.format);\n const explain = tool?.explain === true;\n const stdinContent = paths.includes(STDIN_TOKEN) ? await readStdin() : undefined;\n const cwd = process.cwd();\n\n const run = await runLint({\n ...inputOptions(paths, options),\n ...(tool?.tool === undefined ? {} : { tool: tool.tool }),\n ...(tool?.template === undefined ? {} : { template: tool.template }),\n ...(tool && tool.templates.length > 0 ? { templates: tool.templates } : {}),\n ...(explain ? { explain: true } : {}),\n ...(stdinContent === undefined ? {} : { stdinContent }),\n // Which config governed the run, said where a report cannot be parsed\n // around: discovery walks up to the project boundary, so an unexpected\n // ancestor config is the difference between a five-minute diagnosis and\n // an hour of confusion.\n onConfigLoaded: reportConfig(format === \"pretty\", cwd),\n });\n\n const color = resolveColor(command.parent ?? command);\n const chosen: ReportFormat = explain ? \"explain\" : format;\n const text = render(run, chosen, { color });\n if (text.length > 0 || !omittedWhenClean(chosen)) {\n process.stdout.write(`${text}\\n`);\n }\n // `--explain` answers a question about configuration, so its exit code\n // reports whether it could answer it - not whether the docs are clean.\n //\n // That covers routing failures too: a page whose `type` matches no\n // template is a answered question, not an unanswered one, so it exits 0\n // like everything else here. Automation must not read this code as\n // \"everything routed\" - the ordinary run is what reports that, with exit\n // 1. Said in `--help` and the README, because the distinction is invisible\n // from the exit code alone.\n process.exitCode = explain ? 0 : run.summary.failed > 0 ? 1 : 0;\n };\n\n withInputOptions(\n program\n .command(\"check\")\n .description(\"Run every configured lint job over the given files/dirs/globs\"),\n )\n .addHelpText(\n \"after\",\n [\n \"\",\n \"Jobs: structure.\",\n \"\",\n \"Examples:\",\n \" manni lint check docs/ # every configured job\",\n \" manni lint check # targets from collections:\",\n \" manni lint check --collection guides\",\n ' manni lint check \"**/*.md\" -f github # CI annotations',\n \" cat page.md | manni lint check - --as markdown\",\n ].join(\"\\n\"),\n )\n .action(async (paths: string[], options: InputCliOptions, command: Command) => {\n try {\n // Which jobs this run covered, said once, beside the config line. The\n // full form also names the jobs that exist and are not configured;\n // `structure` is the only job there is, so today it is one word.\n if (options.format === \"pretty\") {\n process.stderr.write(`Checked: ${LINT_JOBS.join(\", \")}.\\n`);\n }\n await lint(paths, options, command);\n } catch (err) {\n fail(err);\n }\n });\n\n const structure = withInputOptions(\n program\n .command(\"structure\")\n .description(\n \"Lint document structure against doctype templates, routing each page by its `type`\",\n ),\n );\n structure\n .optionsGroup(TOOL_OPTIONS_GROUP)\n .option(\n \"--tool <name>\",\n `tool that performs the job: ${TOOLS_BY_JOB.structure.join(\", \")}`,\n )\n .option(\n \"-t, --template <ref>\",\n \"apply this template to every file, overriding type routing\",\n )\n .option(\n \"--templates <path>\",\n \"template file to route by: its `types:` win over built-ins; repeatable\",\n collect,\n [],\n )\n .option(\n \"--explain\",\n \"print how each file's template was chosen, and lint nothing (always exits 0, unrouted pages included)\",\n )\n .addHelpText(\n \"after\",\n [\n \"\",\n \"Examples:\",\n \" manni lint structure docs/ # route each page by its `type`\",\n \" manni lint structure docs/ --templates ./templates.yaml # add your own templates\",\n \" manni lint structure # targets from collections:\",\n \" manni lint structure docs/ --explain # show why each page routed where\",\n \" manni lint structure page.md -t tgdp:how-to:1.6 # force one template\",\n ' manni lint structure \"**/*.md\" -f github # CI annotations',\n \" manni lint structure docs/ --exclude '**/drafts/**'\",\n \" cat page.md | manni lint structure - -t tgdp:how-to:1.6 --as markdown\",\n ].join(\"\\n\"),\n )\n .action(\n async (paths: string[], options: StructureCliOptions, command: Command) => {\n try {\n assertStructureTool(options.tool);\n await lint(paths, options, command, { tool: options });\n } catch (err) {\n fail(err);\n }\n },\n );\n\n const templates = program\n .command(\"templates\")\n .description(\"List the templates that can be applied, and the types they serve\")\n .option(\n \"--templates <path>\",\n \"also list the templates in this file; repeatable\",\n collect,\n [],\n );\n withConfigOptions(templates)\n .option(\"-f, --format <format>\", \"output: pretty | json\", \"pretty\")\n .action(async (options: TemplatesCommandOptions, command: Command) => {\n try {\n const format = listFormat(options.format);\n // The listing answers \"what could route a page?\", so it has to see the\n // same template files a lint would - rebased the same way, or it would\n // answer for a different set of files depending on where it was run.\n const { configPath, noConfig } = configOption(options.config);\n const found = noConfig ? null : await loadConfig(configPath);\n const info = await runTemplates({\n templates:\n options.templates.length > 0\n ? options.templates\n : rebaseConfig(found).templates,\n });\n const color = resolveColor(command.parent ?? command);\n process.stdout.write(`${renderTemplates(info, format, { color })}\\n`);\n } catch (err) {\n fail(err);\n }\n });\n\n const inferCommand = templates\n .command(\"infer\")\n .description(\"Write a first template from a page that already has the shape you want\")\n .argument(\"<page>\", \"one file to infer from (use - for stdin)\")\n .option(\"--as <format>\", \"force an input format (e.g. markdown, mdx)\")\n .option(\n \"--name <name>\",\n \"name for the template; defaults to the page's `type`, else its filename\",\n )\n .option(\"-f, --format <format>\", `output: ${INFER_FORMATS.join(\" | \")}`, \"yaml\")\n .option(\"-o, --out <path>\", \"write the template here instead of to stdout\")\n .option(\"--force\", \"overwrite the --out path\");\n withConfigOptions(inferCommand)\n .addHelpText(\n \"after\",\n [\n \"\",\n \"Examples:\",\n \" manni lint templates infer docs/guides/install.md\",\n \" manni lint templates infer docs/guides/install.md --name how-to\",\n \" manni lint templates infer page.mdx -f json\",\n \" manni lint templates infer page.md -o ./templates.yaml\",\n \" manni lint templates infer page.md -o ./templates.yaml --force\",\n \" cat page.md | manni lint templates infer - --as markdown\",\n \"\",\n \"One page, and every rule it writes is exactly one occurrence: a single\",\n \"page cannot show what varies. Loosening a heading into a list or a\",\n \"pattern, setting `min: 0`, and adding a trailing rule with no heading\",\n \"for the sections that may follow are your edits to make.\",\n ].join(\"\\n\"),\n )\n .action(\n async (\n page: string,\n options: TemplatesInferCliOptions,\n command: Command,\n ) => {\n try {\n // `-f`, `-c` and `--no-config` are read through `optionValue`: the\n // parent `templates` declares all three, and commander hands it any\n // of them typed after `infer`.\n const format = inferFormat(optionValue(command, \"format\"));\n const { configPath, noConfig } = configOption(\n optionValue(command, \"config\"),\n );\n const stdinContent =\n page === STDIN_TOKEN ? await readStdin() : undefined;\n const result = await runTemplatesInfer({\n page,\n format,\n ...(options.as === undefined ? {} : { as: options.as }),\n ...(options.name === undefined ? {} : { name: options.name }),\n ...(options.out === undefined ? {} : { out: options.out }),\n ...(options.force === undefined ? {} : { force: options.force }),\n ...(configPath === undefined ? {} : { configPath }),\n ...(noConfig === undefined ? {} : { noConfig }),\n ...(stdinContent === undefined ? {} : { stdinContent }),\n // The template is the primary output, so with no --out it owns\n // stdout and the config line goes to stderr beside it. With --out\n // stdout is free, and the line still belongs on stderr: a reader\n // piping nothing is not a reason to move a diagnostic.\n onConfigLoaded: reportConfig(false, process.cwd()),\n });\n\n if (result.written === undefined) {\n process.stdout.write(result.text);\n return;\n }\n // Said on stderr, so `-o` leaves stdout empty for a shell that is\n // watching it, and the template file is the whole output.\n process.stderr.write(\n `Wrote template \"${result.name}\" to ${result.written}\\n`,\n );\n } catch (err) {\n fail(err);\n }\n },\n );\n\n templates\n .command(\"show\")\n .description(\n \"Print what a template asks for: each section, how often it may occur, what it must contain, and what it is for\",\n )\n .argument(\n \"<ref>\",\n \"template to show: a built-in id, a path, a path#name, or a URL\",\n )\n .option(\"-f, --format <format>\", `output: ${SHOW_FORMATS.join(\" | \")}`, \"pretty\")\n .addHelpText(\n \"after\",\n [\n \"\",\n \"Examples:\",\n \" manni lint templates show tgdp:how-to:1.6\",\n \" manni lint templates show ./templates.yaml#how-to\",\n \" manni lint templates show tgdp:reference:1.6 -f json\",\n \" manni lint templates show tgdp:how-to:1.6 -f markdown > docs/rotate-key.md\",\n ].join(\"\\n\"),\n )\n .action(async (ref: string, _options: unknown, command: Command) => {\n try {\n // `-f` is read through `optionValue`: the parent `templates` declares\n // it too, and commander hands it any `-f` typed after `show`.\n const format = showFormat(optionValue(command, \"format\"));\n const show = await runTemplateShow({ ref });\n const color = resolveColor(program);\n process.stdout.write(`${renderTemplateShow(show, format, { color })}\\n`);\n } catch (err) {\n fail(err);\n }\n });\n\n withConfigOptions(\n program\n .command(\"tools\")\n .description(\n \"List the lint jobs, the tool that performs each, and what it reads\",\n ),\n )\n .option(\"-f, --format <format>\", \"output: pretty | json\", \"pretty\")\n .action(async (options: ToolsCommandOptions, command: Command) => {\n try {\n const format = listFormat(options.format);\n const tools = await runTools(configOption(options.config));\n const color = resolveColor(command.parent ?? command);\n process.stdout.write(`${renderTools(tools, format, { color })}\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A,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,EAAE,KAAK,IAAI;AAAA,EACb,EACC,OAAO,OAAO,KAAa,UAAmB,YAAqB;AAClE,QAAI;AAGF,YAAM,SAAS,WAAW,YAAY,SAAS,QAAQ,CAAC;AACxD,YAAM,OAAO,MAAM,gBAAgB,EAAE,IAAI,CAAC;AAC1C,YAAM,QAAQ,aAAa,OAAO;AAClC,cAAQ,OAAO,MAAM,GAAG,mBAAmB,MAAM,QAAQ,EAAE,MAAM,CAAC,CAAC;AAAA,CAAI;AAAA,IACzE,SAAS,KAAK;AACZ,WAAK,GAAG;AAAA,IACV;AAAA,EACF,CAAC;AAEH;AAAA,IACE,QACG,QAAQ,OAAO,EACf;AAAA,MACC;AAAA,IACF;AAAA,EACJ,EACG,OAAO,yBAAyB,yBAAyB,QAAQ,EACjE,OAAO,OAAO,SAA8B,YAAqB;AAChE,QAAI;AACF,YAAM,SAAS,WAAW,QAAQ,MAAM;AACxC,YAAM,QAAQ,MAAM,SAAS,aAAa,QAAQ,MAAM,CAAC;AACzD,YAAM,QAAQ,aAAa,QAAQ,UAAU,OAAO;AACpD,cAAQ,OAAO,MAAM,GAAG,YAAY,OAAO,QAAQ,EAAE,MAAM,CAAC,CAAC;AAAA,CAAI;AAAA,IACnE,SAAS,KAAK;AACZ,WAAK,GAAG;AAAA,IACV;AAAA,EACF,CAAC;AAEH,SAAO;AACT;","names":[]}
@@ -11,7 +11,7 @@ import {
11
11
  runRetrieve,
12
12
  runTraverseContext,
13
13
  traverseIn
14
- } from "./chunk-KERICP5Y.js";
14
+ } from "./chunk-WW4JATBJ.js";
15
15
  import {
16
16
  EXPORT_TARGETS,
17
17
  LLMS_FILENAME,
@@ -24,12 +24,12 @@ import {
24
24
  runFill,
25
25
  runQuery,
26
26
  runStats
27
- } from "./chunk-A633WB3N.js";
28
- import "./chunk-245W2Q7C.js";
27
+ } from "./chunk-A5YUK3SG.js";
28
+ import "./chunk-D4BGNAN5.js";
29
29
  import {
30
30
  checkoutStatus,
31
31
  runBuild
32
- } from "./chunk-JPXC62SD.js";
32
+ } from "./chunk-BY3635RR.js";
33
33
  import {
34
34
  CHUNKS_MANIFEST,
35
35
  SEARCH_MODES,
@@ -42,12 +42,16 @@ import {
42
42
  runSearch,
43
43
  runTraverse,
44
44
  shapeText
45
- } from "./chunk-ISDFYXLA.js";
46
- import "./chunk-2GTR24SA.js";
45
+ } from "./chunk-FTSNG6DZ.js";
46
+ import "./chunk-BLDL23RY.js";
47
47
  import {
48
48
  parseChunksManifest
49
- } from "./chunk-N2VB6UUE.js";
50
- import "./chunk-ACJUZFRT.js";
49
+ } from "./chunk-O6IDYZVW.js";
50
+ import {
51
+ EVALS_ARE_AUTHOR_FACING,
52
+ NO_AUTHORING_NEEDS_PUBLISH
53
+ } from "./chunk-57LZPG4V.js";
54
+ import "./chunk-5LQX57BW.js";
51
55
  import {
52
56
  ALL_FILL_FIELDS,
53
57
  CONFIG_SECTION,
@@ -59,34 +63,31 @@ import {
59
63
  assertInputFormat,
60
64
  byCodeUnit,
61
65
  loadRunConfig
62
- } from "./chunk-5CJ3P5O3.js";
66
+ } from "./chunk-CPYQ4BJK.js";
63
67
  import "./chunk-GLP5PSXB.js";
64
- import "./chunk-D54BQM5P.js";
65
- import "./chunk-C5BXSQDO.js";
68
+ import "./chunk-37Q7WEJJ.js";
69
+ import "./chunk-A67EJ3J6.js";
66
70
  import "./chunk-GMOAW2EG.js";
67
- import "./chunk-OQR3VVAX.js";
68
- import "./chunk-BY4THWAQ.js";
69
- import "./chunk-CXL6ES7O.js";
70
- import "./chunk-6FY573GB.js";
71
+ import "./chunk-IDDRHB7E.js";
72
+ import "./chunk-ZT3ERG4B.js";
73
+ import "./chunk-SCKVDD4E.js";
74
+ import "./chunk-64DULZIG.js";
71
75
  import "./chunk-TIUTIOFB.js";
72
- import "./chunk-QGBNWEWS.js";
76
+ import "./chunk-IC3FJWIF.js";
73
77
  import "./chunk-TI4DA6DF.js";
74
- import "./chunk-UP6NBQ62.js";
75
- import "./chunk-MJZK7G4B.js";
76
- import "./chunk-ROZDHPKA.js";
77
- import "./chunk-SUTY4VCZ.js";
78
- import "./chunk-WI3PPQQX.js";
79
- import "./chunk-XPO655IX.js";
80
- import "./chunk-4H3IOF52.js";
78
+ import "./chunk-FXE5K56B.js";
79
+ import "./chunk-VZSATUI7.js";
80
+ import "./chunk-LCMBG4LY.js";
81
+ import "./chunk-E3HYSNS6.js";
81
82
  import {
82
83
  collect,
83
84
  configOption,
84
85
  readStdin,
85
86
  splitList,
86
87
  writeTextAtomic
87
- } from "./chunk-ODSIHEIW.js";
88
+ } from "./chunk-562QZKAB.js";
88
89
  import "./chunk-DSWKBZWW.js";
89
- import "./chunk-WRWW6SGG.js";
90
+ import "./chunk-YB3KD5RI.js";
90
91
  import "./chunk-77AINBYM.js";
91
92
  import "./chunk-QK6VYJHV.js";
92
93
  import {
@@ -95,7 +96,7 @@ import {
95
96
  import {
96
97
  fail
97
98
  } from "./chunk-YEUYKR62.js";
98
- import "./chunk-B2242FYO.js";
99
+ import "./chunk-JF4BC7ZD.js";
99
100
  import {
100
101
  notice,
101
102
  noticeOnce,
@@ -103,10 +104,10 @@ import {
103
104
  } from "./chunk-HX44GB4Z.js";
104
105
  import {
105
106
  LOCAL_FLAG_HELP
106
- } from "./chunk-VM7VAFJW.js";
107
+ } from "./chunk-NVYDWVXN.js";
107
108
  import {
108
109
  package_default
109
- } from "./chunk-MJZ5HYYL.js";
110
+ } from "./chunk-TR5TNPWT.js";
110
111
  import "./chunk-OWBRDNRZ.js";
111
112
  import {
112
113
  errorMessage
@@ -402,7 +403,7 @@ provenance:
402
403
  # stewardship people fields (owner, stakeholders, reviewed-by) out.
403
404
 
404
405
  # SHACL shapes \`manni graph check\` validates the built graph against. Default:
405
- # the shapes contract bundled with manni (shapes/graph/shapes-1.2.0.ttl).
406
+ # the shapes contract bundled with manni (shapes/graph/shapes-1.3.0.ttl).
406
407
  # check:
407
408
  # shapes: ["./my-shapes.ttl"]
408
409
 
@@ -525,6 +526,8 @@ async function runPublish(opts = {}) {
525
526
  },
526
527
  cwd
527
528
  );
529
+ const authoring = opts.authoring ?? config.authoring;
530
+ if (!authoring && opts.evals !== void 0) throw new GraphError(EVALS_ARE_AUTHOR_FACING);
528
531
  const configured = resolve3(cwd, config.out);
529
532
  const outDir = opts.out === void 0 ? dirname(configured) : resolve3(cwd, opts.out);
530
533
  const graph = join(outDir, basename(configured));
@@ -546,13 +549,31 @@ async function runPublish(opts = {}) {
546
549
  steps.push({ step, status: "skipped", detail: `no ${section} section`, files: [] });
547
550
  };
548
551
  const exported = (format, detail, out) => run(`export:${format}`, async () => {
549
- const r = await runExport({ ...source, graph, format, ...out === void 0 ? {} : { out }, ...format === "chunks" && opts.evals !== void 0 ? { evals: opts.evals } : {} });
552
+ const r = await runExport({
553
+ ...source,
554
+ graph,
555
+ format,
556
+ ...out === void 0 ? {} : { out },
557
+ ...format === "chunks" && opts.evals !== void 0 ? { evals: opts.evals } : {},
558
+ // The build already left author-facing content out of the graph the others reserialize.
559
+ ...!authoring && (format === "chunks" || format === "llms") ? { authoring } : {}
560
+ });
550
561
  return { detail: detail(r), files: r.files, warnings: r.warnings, ...r.notices === void 0 ? {} : { notices: r.notices } };
551
562
  });
552
563
  const names = (r) => r.files.map(shown).join(", ");
553
564
  await run("build", async () => {
554
- const r = await runBuild({ ...source, ...opts.collection === void 0 ? {} : { collection: opts.collection }, out: graph });
555
- return { detail: `${shown(r.outPath)}: ${plural(r.docs, "page")}, ${plural(r.quads, "triple")}`, files: [r.outPath], warnings: r.warnings };
565
+ const r = await runBuild({
566
+ ...source,
567
+ ...opts.collection === void 0 ? {} : { collection: opts.collection },
568
+ out: graph,
569
+ ...authoring ? {} : { authoring }
570
+ });
571
+ const records = r.strategyRecords > 0 ? `, ${plural(r.strategyRecords, "strategy record")}` : "";
572
+ return {
573
+ detail: `${shown(r.outPath)}: ${plural(r.docs, "page")}, ${plural(r.quads, "triple")}${records}`,
574
+ files: [r.outPath],
575
+ warnings: r.warnings
576
+ };
556
577
  });
557
578
  await exported("search", (r) => `${names(r)}: ${String(r.nodes)} ${r.nodes === 1 ? "entry" : "entries"}`, outDir);
558
579
  if (config.declared.embed) {
@@ -1008,6 +1029,7 @@ function publisher(opts, seams) {
1008
1029
  await publish({
1009
1030
  ...source,
1010
1031
  out: index,
1032
+ ...opts.authoring === void 0 ? {} : { authoring: opts.authoring },
1011
1033
  say: (kind, message) => {
1012
1034
  if (kind === "warning") warn(message);
1013
1035
  else notice(message);
@@ -1064,6 +1086,7 @@ function publisher(opts, seams) {
1064
1086
  };
1065
1087
  }
1066
1088
  async function runServe(opts, seams = {}) {
1089
+ if (opts.authoring === false && opts.publish !== true) throw new GraphError(NO_AUTHORING_NEEDS_PUBLISH);
1067
1090
  if (opts.publish === true && opts.graph !== void 0) {
1068
1091
  throw new GraphError(
1069
1092
  "--publish writes graph.ttl into the index directory, so it cannot be combined with --graph. Use --index to choose the directory."
@@ -1219,6 +1242,10 @@ function buildProgram() {
1219
1242
  }
1220
1243
  return [...prev, { field, value }];
1221
1244
  };
1245
+ const NO_AUTHORING_HELP = "Leave out author-facing content: strategy records, and every field its schemas prefer in a sidecar (default: config authoring)";
1246
+ function authoringOption(value) {
1247
+ return value === false ? { authoring: false } : {};
1248
+ }
1222
1249
  function artifactInputs(command) {
1223
1250
  return command.option("-c, --config <path>", "Path to manni.config.yaml").option("--no-config", "Ignore any discovered config file").option("-g, --graph <path>", "Graph .ttl path (default: config out)").option(
1224
1251
  "-i, --index <dir>",
@@ -1283,19 +1310,22 @@ function buildProgram() {
1283
1310
  documentInputs(
1284
1311
  program.command("build").description("Derive the knowledge graph and write deterministic Turtle"),
1285
1312
  "build"
1286
- ).option("-o, --out <path>", "Output .ttl path (default: config out)").action(async (paths, opts) => {
1313
+ ).option("-o, --out <path>", "Output .ttl path (default: config out)").option("--no-authoring", NO_AUTHORING_HELP).action(async (paths, opts) => {
1287
1314
  try {
1288
1315
  const result = await runBuild({
1289
1316
  paths,
1290
1317
  ...documentOptions(opts),
1291
1318
  ...await inputOptions(paths, opts),
1292
- out: opts.out
1319
+ out: opts.out,
1320
+ ...authoringOption(opts.authoring)
1293
1321
  });
1294
1322
  for (const warning of result.warnings) warn(warning);
1295
1323
  const { total, fromTermbase } = result.concepts;
1296
1324
  const termbase = fromTermbase > 0 ? ` (${fromTermbase} from the termbase)` : "";
1325
+ const records = result.strategyRecords;
1326
+ const strategy = records > 0 ? `, ${records} strategy record${records === 1 ? "" : "s"}` : "";
1297
1327
  console.log(
1298
- `Wrote ${result.outPath} (${result.docs} docs, ${result.quads} triples, ${total} concepts${termbase})`
1328
+ `Wrote ${result.outPath} (${result.docs} docs, ${result.quads} triples, ${total} concepts${termbase}${strategy})`
1299
1329
  );
1300
1330
  } catch (e) {
1301
1331
  fail(e);
@@ -1667,10 +1697,11 @@ function buildProgram() {
1667
1697
  ).option(
1668
1698
  "--publish",
1669
1699
  "Publish the graph first when its artifact is missing or older than the checkout, and again after the checkout changes"
1670
- ).action(
1700
+ ).option("--no-authoring", NO_AUTHORING_HELP).action(
1671
1701
  async (opts) => {
1672
1702
  try {
1673
- process.exitCode = await runServe({ ...rest(opts), ...documentOptions(opts) });
1703
+ const { authoring, ...others } = rest(opts);
1704
+ process.exitCode = await runServe({ ...others, ...documentOptions(opts), ...authoringOption(authoring) });
1674
1705
  } catch (e) {
1675
1706
  fail(e);
1676
1707
  }
@@ -1713,7 +1744,7 @@ function buildProgram() {
1713
1744
  ).argument("<target>", `What to write: ${EXPORT_TARGETS.join(" | ")}`).option("-c, --config <path>", "Path to manni.config.yaml").option("--no-config", "Ignore any discovered config file").option("-g, --graph <path>", "Graph .ttl path (default: config out)").option(
1714
1745
  "-o, --out <path>",
1715
1746
  "Output path (default: the graph path with the target's extension); a directory for search and chunks"
1716
- ).option("--evals <path>", "A docevals JSON report for chunks (default: config export.chunks.evals)").action(
1747
+ ).option("--evals <path>", "A docevals JSON report for chunks (default: config export.chunks.evals)").option("--no-authoring", NO_AUTHORING_HELP).action(
1717
1748
  async (target, opts) => {
1718
1749
  try {
1719
1750
  if (!EXPORT_TARGETS.includes(target)) {
@@ -1726,7 +1757,8 @@ function buildProgram() {
1726
1757
  graph: opts.graph,
1727
1758
  format: target,
1728
1759
  out: opts.out,
1729
- ...opts.evals === void 0 ? {} : { evals: opts.evals }
1760
+ ...opts.evals === void 0 ? {} : { evals: opts.evals },
1761
+ ...authoringOption(opts.authoring)
1730
1762
  });
1731
1763
  for (const warning of result.warnings) warn(warning);
1732
1764
  for (const said of result.notices ?? []) noticeOnce(said);
@@ -1741,7 +1773,7 @@ function buildProgram() {
1741
1773
  );
1742
1774
  program.command("publish").description(
1743
1775
  "Build, embed when configured, and export everything serving needs into one directory"
1744
- ).option("-c, --config <path>", "Path to manni.config.yaml").option("--no-config", "Ignore any discovered config file").option("-o, --out <dir>", "Directory for every artifact (default: the directory of config out)").option("--evals <path>", "A docevals JSON report for the chunks (default: config export.chunks.evals)").option("--collection <name>", "Configured collection to read (repeatable)", collect, []).option(
1776
+ ).option("-c, --config <path>", "Path to manni.config.yaml").option("--no-config", "Ignore any discovered config file").option("-o, --out <dir>", "Directory for every artifact (default: the directory of config out)").option("--evals <path>", "A docevals JSON report for the chunks (default: config export.chunks.evals)").option("--collection <name>", "Configured collection to read (repeatable)", collect, []).option("--no-authoring", NO_AUTHORING_HELP).option(
1745
1777
  "-f, --format <format>",
1746
1778
  `Output: ${GRAPH_FORMAT_LIST}`,
1747
1779
  formatOption,
@@ -1753,6 +1785,7 @@ function buildProgram() {
1753
1785
  ...documentOptions(opts),
1754
1786
  ...opts.out === void 0 ? {} : { out: opts.out },
1755
1787
  ...opts.evals === void 0 ? {} : { evals: opts.evals },
1788
+ ...authoringOption(opts.authoring),
1756
1789
  say: (kind, message) => {
1757
1790
  if (kind === "notice") noticeOnce(message);
1758
1791
  else warn(message);
@@ -1770,4 +1803,4 @@ export {
1770
1803
  buildProgram,
1771
1804
  colorFor
1772
1805
  };
1773
- //# sourceMappingURL=cli-K5QWXB7H.js.map
1806
+ //# sourceMappingURL=cli-ULHJTJHH.js.map