@hawkeyexl/manni 4.21.0 → 4.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (316) hide show
  1. package/README.md +1 -1
  2. package/dist/{batch-C534YIAU.js → batch-DPYBMRVD.js} +21 -22
  3. package/dist/build-LEKUMGEC.js +36 -0
  4. package/dist/calibrate-TYONPNG4.js +42 -0
  5. package/dist/capture-2EPHIAZT.js +37 -0
  6. package/dist/check-ADCSXGBK.js +57 -0
  7. package/dist/check-HWEDHABD.js +30 -0
  8. package/dist/check-J2KQI7IW.js +33 -0
  9. package/dist/check-L5AUSTE6.js +57 -0
  10. package/dist/{check-LKPQPQWJ.js → check-SQVQE4E4.js} +23 -23
  11. package/dist/{chunk-D4QHRVDJ.js → chunk-2GPF4OEF.js} +3 -157
  12. package/dist/chunk-2GPF4OEF.js.map +1 -0
  13. package/dist/{chunk-IOJD2RFG.js → chunk-2MOXVM6H.js} +2 -2
  14. package/dist/{chunk-762MM6NA.js → chunk-2QK25SLZ.js} +4 -4
  15. package/dist/{chunk-HHJ2HFPP.js → chunk-2UJOQ6CB.js} +9 -9
  16. package/dist/{chunk-H5YWCCBO.js → chunk-3CBGLUJX.js} +3 -3
  17. package/dist/{chunk-E23KWEPL.js → chunk-3USSSKLA.js} +2 -2
  18. package/dist/{chunk-PTGXEZQD.js → chunk-3ZVRGBK6.js} +4 -4
  19. package/dist/{chunk-XI3BNZG4.js → chunk-5JXA75XB.js} +46 -7
  20. package/dist/chunk-5JXA75XB.js.map +1 -0
  21. package/dist/{chunk-IN5T22FP.js → chunk-6QNA7UX2.js} +2 -2
  22. package/dist/{chunk-CZIO37J5.js → chunk-6RENCXLC.js} +10 -5
  23. package/dist/chunk-6RENCXLC.js.map +1 -0
  24. package/dist/{chunk-WHVFHBL3.js → chunk-72UN462G.js} +11 -3
  25. package/dist/chunk-72UN462G.js.map +1 -0
  26. package/dist/{chunk-OWJLB2AF.js → chunk-76Y3JATE.js} +2 -2
  27. package/dist/chunk-7M3MBFG7.js +38 -0
  28. package/dist/chunk-7M3MBFG7.js.map +1 -0
  29. package/dist/{chunk-BHGFLRXM.js → chunk-7NSFGAAQ.js} +8 -7
  30. package/dist/chunk-7NSFGAAQ.js.map +1 -0
  31. package/dist/{chunk-3SFAB75L.js → chunk-AJCUKL43.js} +6 -6
  32. package/dist/{chunk-CREFJCWZ.js → chunk-AOLCEULZ.js} +8 -8
  33. package/dist/{chunk-Q76T6Y6X.js → chunk-AZKNB2T3.js} +3635 -3409
  34. package/dist/chunk-AZKNB2T3.js.map +1 -0
  35. package/dist/{chunk-2NGFDLIM.js → chunk-B4ECIBLF.js} +4 -4
  36. package/dist/{chunk-5UJKXOAD.js → chunk-B4POKRCS.js} +6 -6
  37. package/dist/chunk-BA7BQBWV.js +311 -0
  38. package/dist/chunk-BA7BQBWV.js.map +1 -0
  39. package/dist/{chunk-KBSTXL6L.js → chunk-BOCJTOKA.js} +4 -4
  40. package/dist/{chunk-CFMI74TP.js → chunk-BZ74YUYE.js} +2 -2
  41. package/dist/{chunk-NLJ3XIKT.js → chunk-C2QE4FSZ.js} +3 -3
  42. package/dist/{chunk-DENZLZ3Z.js → chunk-CLUUSZDY.js} +26 -17
  43. package/dist/chunk-CLUUSZDY.js.map +1 -0
  44. package/dist/{chunk-PACZEDOH.js → chunk-CWPRB7SA.js} +19 -15
  45. package/dist/chunk-CWPRB7SA.js.map +1 -0
  46. package/dist/{chunk-245W2Q7C.js → chunk-D4BGNAN5.js} +2 -2
  47. package/dist/{chunk-XBJKYXOR.js → chunk-DWUK6YNX.js} +11 -11
  48. package/dist/{chunk-MTCOBRCX.js → chunk-E75CMOR3.js} +4 -4
  49. package/dist/{chunk-TFVNEPMF.js → chunk-EAF4K7IK.js} +4 -4
  50. package/dist/{chunk-TFVNEPMF.js.map → chunk-EAF4K7IK.js.map} +1 -1
  51. package/dist/{chunk-KCWNJMSS.js → chunk-EBBJFXMX.js} +3 -3
  52. package/dist/{chunk-LWBNHK72.js → chunk-EPN67ZNX.js} +47 -29
  53. package/dist/chunk-EPN67ZNX.js.map +1 -0
  54. package/dist/{chunk-6XK3NTL5.js → chunk-FBIBR4CH.js} +35 -40
  55. package/dist/chunk-FBIBR4CH.js.map +1 -0
  56. package/dist/{chunk-5LE4NH3Z.js → chunk-FJYIPHWK.js} +6 -4
  57. package/dist/{chunk-5LE4NH3Z.js.map → chunk-FJYIPHWK.js.map} +1 -1
  58. package/dist/{chunk-A4QNKEX4.js → chunk-GCHEVTCJ.js} +2 -2
  59. package/dist/{chunk-GMOAW2EG.js → chunk-GIHIONJH.js} +3 -2
  60. package/dist/chunk-GIHIONJH.js.map +1 -0
  61. package/dist/{chunk-P7HAXMFN.js → chunk-I4KDAO6P.js} +5 -3
  62. package/dist/{chunk-P7HAXMFN.js.map → chunk-I4KDAO6P.js.map} +1 -1
  63. package/dist/chunk-INOVEO32.js +28 -0
  64. package/dist/chunk-INOVEO32.js.map +1 -0
  65. package/dist/{chunk-B2242FYO.js → chunk-JF4BC7ZD.js} +38 -3
  66. package/dist/chunk-JF4BC7ZD.js.map +1 -0
  67. package/dist/{chunk-RKACUTY5.js → chunk-JZWQQOUN.js} +9 -11
  68. package/dist/{chunk-RKACUTY5.js.map → chunk-JZWQQOUN.js.map} +1 -1
  69. package/dist/{chunk-BXCVOHEX.js → chunk-K4YR4PY2.js} +15 -13
  70. package/dist/{chunk-BXCVOHEX.js.map → chunk-K4YR4PY2.js.map} +1 -1
  71. package/dist/{chunk-BXE4L52Q.js → chunk-KX6HRTLH.js} +6599 -3508
  72. package/dist/chunk-KX6HRTLH.js.map +1 -0
  73. package/dist/{chunk-V2XJJEEF.js → chunk-L3DOX3UL.js} +4 -4
  74. package/dist/{chunk-FHJIH6XP.js → chunk-LHP56Q45.js} +16 -7
  75. package/dist/chunk-LHP56Q45.js.map +1 -0
  76. package/dist/{chunk-BLXRIAV2.js → chunk-LT3STF5K.js} +29 -4
  77. package/dist/chunk-LT3STF5K.js.map +1 -0
  78. package/dist/{chunk-SHXPE4D4.js → chunk-MGQNGW6I.js} +2 -2
  79. package/dist/{chunk-SHXPE4D4.js.map → chunk-MGQNGW6I.js.map} +1 -1
  80. package/dist/{chunk-JUUCCML3.js → chunk-MPRVAMO3.js} +4 -4
  81. package/dist/{chunk-JQA6RF4R.js → chunk-N2T6RLSE.js} +2 -2
  82. package/dist/{chunk-JQA6RF4R.js.map → chunk-N2T6RLSE.js.map} +1 -1
  83. package/dist/{chunk-JCTHXG33.js → chunk-NHOGTAPK.js} +2 -2
  84. package/dist/{chunk-VM7VAFJW.js → chunk-NVYDWVXN.js} +2 -1
  85. package/dist/{chunk-ARNI3SJT.js → chunk-OL3Z7KPQ.js} +9 -9
  86. package/dist/chunk-P6LRDWMJ.js +1875 -0
  87. package/dist/chunk-P6LRDWMJ.js.map +1 -0
  88. package/dist/{chunk-NUQF5F5J.js → chunk-PNDEKFF3.js} +2 -2
  89. package/dist/chunk-QJGPOFNB.js +409 -0
  90. package/dist/chunk-QJGPOFNB.js.map +1 -0
  91. package/dist/{chunk-DMVBIIP3.js → chunk-QJL57GPX.js} +3 -3
  92. package/dist/{chunk-AE6KBAAU.js → chunk-QR55QXJ7.js} +11 -11
  93. package/dist/{chunk-BJUEOC4G.js → chunk-QWVIGKBM.js} +3 -3
  94. package/dist/{chunk-E7OG5F6S.js → chunk-RZ6OONZU.js} +13 -11
  95. package/dist/{chunk-E7OG5F6S.js.map → chunk-RZ6OONZU.js.map} +1 -1
  96. package/dist/{chunk-U4OJ7U45.js → chunk-SZMJ24FR.js} +9 -9
  97. package/dist/{chunk-KQDRO6N6.js → chunk-TLY44PCL.js} +2 -2
  98. package/dist/{chunk-VLRIP4BQ.js → chunk-TOVSR2YO.js} +2 -2
  99. package/dist/chunk-TT5UDTDM.js +888 -0
  100. package/dist/chunk-TT5UDTDM.js.map +1 -0
  101. package/dist/{chunk-2YKUSTHS.js → chunk-TVLIJ6ZM.js} +5 -5
  102. package/dist/{chunk-RQPEKHZH.js → chunk-UQYDLEBS.js} +80 -16
  103. package/dist/chunk-UQYDLEBS.js.map +1 -0
  104. package/dist/{chunk-GMLOAKOA.js → chunk-VSDXZAQU.js} +4 -22
  105. package/dist/chunk-VSDXZAQU.js.map +1 -0
  106. package/dist/{chunk-22WGKOQ7.js → chunk-VTJAY3WN.js} +7 -7
  107. package/dist/{chunk-DPDG3FHL.js → chunk-WHECOVH2.js} +3 -3
  108. package/dist/{chunk-BKY6GAFA.js → chunk-WPHPLVS3.js} +53 -918
  109. package/dist/chunk-WPHPLVS3.js.map +1 -0
  110. package/dist/{chunk-SSQZB5SQ.js → chunk-XG6PVB5S.js} +11 -1
  111. package/dist/chunk-XG6PVB5S.js.map +1 -0
  112. package/dist/{chunk-R2CR62JV.js → chunk-XVL7DYWM.js} +4 -4
  113. package/dist/{chunk-CLPC3LKX.js → chunk-Y4O737F7.js} +4 -4
  114. package/dist/{chunk-YSZNJ2ID.js → chunk-YBPXVBSY.js} +2 -2
  115. package/dist/{chunk-2HOWRAWK.js → chunk-YJHH2DHV.js} +2 -2
  116. package/dist/{chunk-APAF4VWW.js → chunk-YUCH6WJY.js} +6 -405
  117. package/dist/chunk-YUCH6WJY.js.map +1 -0
  118. package/dist/chunk-ZAOJYN2D.js +159 -0
  119. package/dist/chunk-ZAOJYN2D.js.map +1 -0
  120. package/dist/{cli-77A46SB2.js → cli-4R5HIGG4.js} +33 -21
  121. package/dist/{cli-77A46SB2.js.map → cli-4R5HIGG4.js.map} +1 -1
  122. package/dist/{cli-6NKE6RMT.js → cli-BF6KB3EJ.js} +34 -22
  123. package/dist/{cli-6NKE6RMT.js.map → cli-BF6KB3EJ.js.map} +1 -1
  124. package/dist/{cli-3PBRPPMQ.js → cli-DXOHHWZK.js} +16 -19
  125. package/dist/{cli-3PBRPPMQ.js.map → cli-DXOHHWZK.js.map} +1 -1
  126. package/dist/{cli-AVHLY2AI.js → cli-MPMECIQH.js} +154 -65
  127. package/dist/cli-MPMECIQH.js.map +1 -0
  128. package/dist/cli-NDYBQ755.js +152 -0
  129. package/dist/cli-NDYBQ755.js.map +1 -0
  130. package/dist/{cli-K47XWDLJ.js → cli-SJA66MIP.js} +29 -30
  131. package/dist/{cli-K47XWDLJ.js.map → cli-SJA66MIP.js.map} +1 -1
  132. package/dist/{cli-FDXU7CGZ.js → cli-TBAOKTMV.js} +16 -19
  133. package/dist/{cli-FDXU7CGZ.js.map → cli-TBAOKTMV.js.map} +1 -1
  134. package/dist/{cli-MQXOK64K.js → cli-TWGGMUXX.js} +89 -45
  135. package/dist/cli-TWGGMUXX.js.map +1 -0
  136. package/dist/{cli-FSDJY5OC.js → cli-V2BJYNMF.js} +4 -4
  137. package/dist/{cli-JNYL6LB7.js → cli-XGCK2LUV.js} +19 -22
  138. package/dist/{cli-JNYL6LB7.js.map → cli-XGCK2LUV.js.map} +1 -1
  139. package/dist/{cli-MOKRUHZT.js → cli-XXN75A42.js} +9 -11
  140. package/dist/cli.js +15 -15
  141. package/dist/cli.js.map +1 -1
  142. package/dist/{config-BMWDC66C.js → config-2YJPJ36T.js} +5 -5
  143. package/dist/docmeta.js +8 -10
  144. package/dist/docmeta.js.map +1 -1
  145. package/dist/github-NQQTH5JK.js +33 -0
  146. package/dist/github-NWL2XGE7.js +48 -0
  147. package/dist/github-WBIEYSM7.js +28 -0
  148. package/dist/graph/runtime.js.map +1 -1
  149. package/dist/{host-YSTYO5DX.js → host-JT27OWTC.js} +3 -3
  150. package/dist/index.d.ts +363 -25
  151. package/dist/index.js +289 -270
  152. package/dist/index.js.map +1 -1
  153. package/dist/json-IVHRVOGQ.js +40 -0
  154. package/dist/{json-YTKUFNO3.js → json-J4TONMKY.js} +2 -2
  155. package/dist/{json-YIK72XAL.js → json-QQAK73QQ.js} +12 -15
  156. package/dist/{labels-X633ZPK7.js → labels-VI2I5YFD.js} +11 -14
  157. package/dist/{labels-X633ZPK7.js.map → labels-VI2I5YFD.js.map} +1 -1
  158. package/dist/lint-VB5A3ENL.js +32 -0
  159. package/dist/list-3XRFX2Y3.js +33 -0
  160. package/dist/list-LMYCD5G5.js +37 -0
  161. package/dist/list-LOS7FTFD.js +30 -0
  162. package/dist/{page-OMPEACUN.js → page-3Y4EGYUO.js} +11 -14
  163. package/dist/{prepare-B4JVDVOV.js → prepare-JK6XKBZB.js} +20 -22
  164. package/dist/{prepare-B4JVDVOV.js.map → prepare-JK6XKBZB.js.map} +1 -1
  165. package/dist/{pretty-U7ATCFBN.js → pretty-DR4GHOJG.js} +12 -15
  166. package/dist/pretty-G2J5UEXC.js +41 -0
  167. package/dist/pretty-GCEIQ3FP.js +65 -0
  168. package/dist/{provider-JY2I3VLF.js → provider-YWNTTQPA.js} +3 -3
  169. package/dist/{release-VHHASAG7.js → release-EFLQT3FW.js} +3 -3
  170. package/dist/{reporters-FAIEOTC4.js → reporters-43LBUWEE.js} +11 -14
  171. package/dist/{reporters-KE7AZR6C.js → reporters-OWYFZD4S.js} +6 -6
  172. package/dist/run-G6G55SWJ.js +36 -0
  173. package/dist/{sarif-DOGRSGTB.js → sarif-CN7RSIKH.js} +10 -13
  174. package/dist/sarif-FR26WNVT.js +49 -0
  175. package/dist/sarif-GWTNYCZJ.js +28 -0
  176. package/dist/strategy-3EZUOE2T.js +59 -0
  177. package/dist/{term-MDN3NJDW.js → term-5WITRS3M.js} +21 -25
  178. package/dist/{term-MDN3NJDW.js.map → term-5WITRS3M.js.map} +1 -1
  179. package/dist/{validate-QDYQ642J.js → validate-TDIEFXRQ.js} +6 -7
  180. package/package.json +1 -1
  181. package/plugin/manni/.claude-plugin/plugin.json +1 -1
  182. package/plugin/manni/hooks/graph-server.mjs +3 -3
  183. package/plugin/manni/hooks/page-metadata.mjs +81 -7
  184. package/plugin/manni/skills/fix/SKILL.md +3 -3
  185. package/shapes/graph/shapes-1.3.0.ttl +1250 -0
  186. package/dist/build-SVKT7QFU.js +0 -39
  187. package/dist/calibrate-AL3MH7TY.js +0 -43
  188. package/dist/capture-2F7B4DAD.js +0 -39
  189. package/dist/check-BI7OGIVE.js +0 -48
  190. package/dist/check-JZINDP3F.js +0 -45
  191. package/dist/check-OPUMZEVK.js +0 -35
  192. package/dist/check-OW7UD73D.js +0 -33
  193. package/dist/chunk-6XK3NTL5.js.map +0 -1
  194. package/dist/chunk-APAF4VWW.js.map +0 -1
  195. package/dist/chunk-B2242FYO.js.map +0 -1
  196. package/dist/chunk-BHGFLRXM.js.map +0 -1
  197. package/dist/chunk-BKY6GAFA.js.map +0 -1
  198. package/dist/chunk-BLXRIAV2.js.map +0 -1
  199. package/dist/chunk-BXE4L52Q.js.map +0 -1
  200. package/dist/chunk-CZIO37J5.js.map +0 -1
  201. package/dist/chunk-D4QHRVDJ.js.map +0 -1
  202. package/dist/chunk-D5GBYKDU.js +0 -164
  203. package/dist/chunk-D5GBYKDU.js.map +0 -1
  204. package/dist/chunk-DENZLZ3Z.js.map +0 -1
  205. package/dist/chunk-FHJIH6XP.js.map +0 -1
  206. package/dist/chunk-GMLOAKOA.js.map +0 -1
  207. package/dist/chunk-GMOAW2EG.js.map +0 -1
  208. package/dist/chunk-LWBNHK72.js.map +0 -1
  209. package/dist/chunk-PACZEDOH.js.map +0 -1
  210. package/dist/chunk-Q76T6Y6X.js.map +0 -1
  211. package/dist/chunk-RQPEKHZH.js.map +0 -1
  212. package/dist/chunk-RWXR3GJI.js +0 -441
  213. package/dist/chunk-RWXR3GJI.js.map +0 -1
  214. package/dist/chunk-S5G6T4VC.js +0 -3200
  215. package/dist/chunk-S5G6T4VC.js.map +0 -1
  216. package/dist/chunk-SSQZB5SQ.js.map +0 -1
  217. package/dist/chunk-UP6NBQ62.js +0 -2
  218. package/dist/chunk-WHVFHBL3.js.map +0 -1
  219. package/dist/chunk-XI3BNZG4.js.map +0 -1
  220. package/dist/chunk-ZPLVANY2.js +0 -15
  221. package/dist/chunk-ZPLVANY2.js.map +0 -1
  222. package/dist/cli-AVHLY2AI.js.map +0 -1
  223. package/dist/cli-LP5OE3BL.js +0 -84
  224. package/dist/cli-LP5OE3BL.js.map +0 -1
  225. package/dist/cli-MQXOK64K.js.map +0 -1
  226. package/dist/github-6GYTPSGV.js +0 -35
  227. package/dist/github-DJOLVNDD.js +0 -31
  228. package/dist/github-ZF2TQ3RP.js +0 -35
  229. package/dist/json-Y7625EFE.js +0 -42
  230. package/dist/lint-RF3B55W7.js +0 -35
  231. package/dist/list-5DW4QZ7P.js +0 -36
  232. package/dist/list-7CHWJ633.js +0 -39
  233. package/dist/list-UNWG6NPD.js +0 -33
  234. package/dist/pretty-PPNHHOEN.js +0 -52
  235. package/dist/pretty-XGYQ25PH.js +0 -43
  236. package/dist/run-MHJ3AYKG.js +0 -39
  237. package/dist/sarif-MIEMQOIK.js +0 -30
  238. package/dist/sarif-RGRG7VFX.js +0 -36
  239. package/dist/strategy-EK5VY5DG.js +0 -223
  240. package/dist/strategy-EK5VY5DG.js.map +0 -1
  241. /package/dist/{batch-C534YIAU.js.map → batch-DPYBMRVD.js.map} +0 -0
  242. /package/dist/{build-SVKT7QFU.js.map → build-LEKUMGEC.js.map} +0 -0
  243. /package/dist/{calibrate-AL3MH7TY.js.map → calibrate-TYONPNG4.js.map} +0 -0
  244. /package/dist/{capture-2F7B4DAD.js.map → capture-2EPHIAZT.js.map} +0 -0
  245. /package/dist/{check-BI7OGIVE.js.map → check-ADCSXGBK.js.map} +0 -0
  246. /package/dist/{check-JZINDP3F.js.map → check-HWEDHABD.js.map} +0 -0
  247. /package/dist/{check-OPUMZEVK.js.map → check-J2KQI7IW.js.map} +0 -0
  248. /package/dist/{check-OW7UD73D.js.map → check-L5AUSTE6.js.map} +0 -0
  249. /package/dist/{check-LKPQPQWJ.js.map → check-SQVQE4E4.js.map} +0 -0
  250. /package/dist/{chunk-IOJD2RFG.js.map → chunk-2MOXVM6H.js.map} +0 -0
  251. /package/dist/{chunk-762MM6NA.js.map → chunk-2QK25SLZ.js.map} +0 -0
  252. /package/dist/{chunk-HHJ2HFPP.js.map → chunk-2UJOQ6CB.js.map} +0 -0
  253. /package/dist/{chunk-H5YWCCBO.js.map → chunk-3CBGLUJX.js.map} +0 -0
  254. /package/dist/{chunk-E23KWEPL.js.map → chunk-3USSSKLA.js.map} +0 -0
  255. /package/dist/{chunk-PTGXEZQD.js.map → chunk-3ZVRGBK6.js.map} +0 -0
  256. /package/dist/{chunk-IN5T22FP.js.map → chunk-6QNA7UX2.js.map} +0 -0
  257. /package/dist/{chunk-OWJLB2AF.js.map → chunk-76Y3JATE.js.map} +0 -0
  258. /package/dist/{chunk-3SFAB75L.js.map → chunk-AJCUKL43.js.map} +0 -0
  259. /package/dist/{chunk-CREFJCWZ.js.map → chunk-AOLCEULZ.js.map} +0 -0
  260. /package/dist/{chunk-2NGFDLIM.js.map → chunk-B4ECIBLF.js.map} +0 -0
  261. /package/dist/{chunk-5UJKXOAD.js.map → chunk-B4POKRCS.js.map} +0 -0
  262. /package/dist/{chunk-KBSTXL6L.js.map → chunk-BOCJTOKA.js.map} +0 -0
  263. /package/dist/{chunk-CFMI74TP.js.map → chunk-BZ74YUYE.js.map} +0 -0
  264. /package/dist/{chunk-NLJ3XIKT.js.map → chunk-C2QE4FSZ.js.map} +0 -0
  265. /package/dist/{chunk-245W2Q7C.js.map → chunk-D4BGNAN5.js.map} +0 -0
  266. /package/dist/{chunk-XBJKYXOR.js.map → chunk-DWUK6YNX.js.map} +0 -0
  267. /package/dist/{chunk-MTCOBRCX.js.map → chunk-E75CMOR3.js.map} +0 -0
  268. /package/dist/{chunk-KCWNJMSS.js.map → chunk-EBBJFXMX.js.map} +0 -0
  269. /package/dist/{chunk-A4QNKEX4.js.map → chunk-GCHEVTCJ.js.map} +0 -0
  270. /package/dist/{chunk-V2XJJEEF.js.map → chunk-L3DOX3UL.js.map} +0 -0
  271. /package/dist/{chunk-JUUCCML3.js.map → chunk-MPRVAMO3.js.map} +0 -0
  272. /package/dist/{chunk-JCTHXG33.js.map → chunk-NHOGTAPK.js.map} +0 -0
  273. /package/dist/{chunk-VM7VAFJW.js.map → chunk-NVYDWVXN.js.map} +0 -0
  274. /package/dist/{chunk-ARNI3SJT.js.map → chunk-OL3Z7KPQ.js.map} +0 -0
  275. /package/dist/{chunk-NUQF5F5J.js.map → chunk-PNDEKFF3.js.map} +0 -0
  276. /package/dist/{chunk-DMVBIIP3.js.map → chunk-QJL57GPX.js.map} +0 -0
  277. /package/dist/{chunk-AE6KBAAU.js.map → chunk-QR55QXJ7.js.map} +0 -0
  278. /package/dist/{chunk-BJUEOC4G.js.map → chunk-QWVIGKBM.js.map} +0 -0
  279. /package/dist/{chunk-U4OJ7U45.js.map → chunk-SZMJ24FR.js.map} +0 -0
  280. /package/dist/{chunk-KQDRO6N6.js.map → chunk-TLY44PCL.js.map} +0 -0
  281. /package/dist/{chunk-VLRIP4BQ.js.map → chunk-TOVSR2YO.js.map} +0 -0
  282. /package/dist/{chunk-2YKUSTHS.js.map → chunk-TVLIJ6ZM.js.map} +0 -0
  283. /package/dist/{chunk-22WGKOQ7.js.map → chunk-VTJAY3WN.js.map} +0 -0
  284. /package/dist/{chunk-DPDG3FHL.js.map → chunk-WHECOVH2.js.map} +0 -0
  285. /package/dist/{chunk-R2CR62JV.js.map → chunk-XVL7DYWM.js.map} +0 -0
  286. /package/dist/{chunk-CLPC3LKX.js.map → chunk-Y4O737F7.js.map} +0 -0
  287. /package/dist/{chunk-YSZNJ2ID.js.map → chunk-YBPXVBSY.js.map} +0 -0
  288. /package/dist/{chunk-2HOWRAWK.js.map → chunk-YJHH2DHV.js.map} +0 -0
  289. /package/dist/{cli-FSDJY5OC.js.map → cli-V2BJYNMF.js.map} +0 -0
  290. /package/dist/{chunk-UP6NBQ62.js.map → cli-XXN75A42.js.map} +0 -0
  291. /package/dist/{cli-MOKRUHZT.js.map → config-2YJPJ36T.js.map} +0 -0
  292. /package/dist/{config-BMWDC66C.js.map → github-NQQTH5JK.js.map} +0 -0
  293. /package/dist/{github-6GYTPSGV.js.map → github-NWL2XGE7.js.map} +0 -0
  294. /package/dist/{github-DJOLVNDD.js.map → github-WBIEYSM7.js.map} +0 -0
  295. /package/dist/{github-ZF2TQ3RP.js.map → host-JT27OWTC.js.map} +0 -0
  296. /package/dist/{host-YSTYO5DX.js.map → json-IVHRVOGQ.js.map} +0 -0
  297. /package/dist/{json-Y7625EFE.js.map → json-J4TONMKY.js.map} +0 -0
  298. /package/dist/{json-YIK72XAL.js.map → json-QQAK73QQ.js.map} +0 -0
  299. /package/dist/{json-YTKUFNO3.js.map → lint-VB5A3ENL.js.map} +0 -0
  300. /package/dist/{lint-RF3B55W7.js.map → list-3XRFX2Y3.js.map} +0 -0
  301. /package/dist/{list-5DW4QZ7P.js.map → list-LMYCD5G5.js.map} +0 -0
  302. /package/dist/{list-7CHWJ633.js.map → list-LOS7FTFD.js.map} +0 -0
  303. /package/dist/{list-UNWG6NPD.js.map → page-3Y4EGYUO.js.map} +0 -0
  304. /package/dist/{page-OMPEACUN.js.map → pretty-DR4GHOJG.js.map} +0 -0
  305. /package/dist/{pretty-PPNHHOEN.js.map → pretty-G2J5UEXC.js.map} +0 -0
  306. /package/dist/{pretty-U7ATCFBN.js.map → pretty-GCEIQ3FP.js.map} +0 -0
  307. /package/dist/{pretty-XGYQ25PH.js.map → provider-YWNTTQPA.js.map} +0 -0
  308. /package/dist/{release-VHHASAG7.js.map → release-EFLQT3FW.js.map} +0 -0
  309. /package/dist/{provider-JY2I3VLF.js.map → reporters-43LBUWEE.js.map} +0 -0
  310. /package/dist/{reporters-FAIEOTC4.js.map → reporters-OWYFZD4S.js.map} +0 -0
  311. /package/dist/{reporters-KE7AZR6C.js.map → run-G6G55SWJ.js.map} +0 -0
  312. /package/dist/{run-MHJ3AYKG.js.map → sarif-CN7RSIKH.js.map} +0 -0
  313. /package/dist/{sarif-DOGRSGTB.js.map → sarif-FR26WNVT.js.map} +0 -0
  314. /package/dist/{sarif-MIEMQOIK.js.map → sarif-GWTNYCZJ.js.map} +0 -0
  315. /package/dist/{sarif-RGRG7VFX.js.map → strategy-3EZUOE2T.js.map} +0 -0
  316. /package/dist/{validate-QDYQ642J.js.map → validate-TDIEFXRQ.js.map} +0 -0
@@ -0,0 +1,159 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ windowFor
4
+ } from "./chunk-VHJ72YCD.js";
5
+ import {
6
+ makeRedactor
7
+ } from "./chunk-6WJUZQQX.js";
8
+
9
+ // src/tracevals/judge/render.ts
10
+ var DEFAULTS = {
11
+ maxBlockChars: 2e3,
12
+ maxTotalChars: 15e4,
13
+ redact: []
14
+ };
15
+ var MIN_TIMELINE_CHARS = 200;
16
+ var HEADER_TRUNCATED = "\n[... header truncated ...]";
17
+ var TURN_HEADING = "## The last turn";
18
+ var TIMELINE_SHELL = "\n\n## Timeline\n";
19
+ function renderTrace(trace, options = {}, plan) {
20
+ const { maxBlockChars, maxTotalChars, redact } = { ...DEFAULTS, ...options };
21
+ const scrub = makeRedactor(redact);
22
+ const clip = (text, max) => {
23
+ const safe = scrub(text);
24
+ if (safe.length <= max) return safe;
25
+ return `${safe.slice(0, max)} [... truncated ${safe.length - max} chars ...]`;
26
+ };
27
+ const window = options.window ?? (plan === void 0 ? void 0 : windowFor(trace, plan));
28
+ const scoped = window !== void 0 && window.scope !== "session" ? window : void 0;
29
+ const events = scoped?.events ?? trace.events;
30
+ const fullHeader = scrub(
31
+ [
32
+ "# Session",
33
+ `source: ${trace.source}`,
34
+ trace.model ? `model: ${trace.model}` : void 0,
35
+ `cwd: ${trace.cwd}`,
36
+ trace.gitBranch ? `branch: ${trace.gitBranch}` : void 0,
37
+ scoped ? `scope: ${scoped.label} \u2014 ${events.length} of ${trace.events.length} session events` : void 0,
38
+ // Everything below describes what the judge can actually see. On a
39
+ // scoped render the timeline is the window, so a session-wide count here
40
+ // reads as evidence that the rest was truncated away — the judge would
41
+ // discount a digest that is complete for what it was asked about. The
42
+ // session totals stay, in parentheses, because "3 of 87" is context the
43
+ // window count alone does not carry.
44
+ scoped ? `turns: ${scoped.turnCount} (of ${trace.turnCount} in the session)` : `turns: ${trace.turnCount}`,
45
+ (() => {
46
+ const used = (scoped ?? trace).skillInvocations.map((s) => s.name);
47
+ return used.length > 0 ? `skills used: ${used.join(", ")}` : "skills used: none";
48
+ })(),
49
+ (() => {
50
+ const inWindow = new Set(events.map((e) => e.index));
51
+ const spawns = trace.agentSpawns.filter(
52
+ (a) => !scoped || inWindow.has(a.index)
53
+ );
54
+ return spawns.length > 0 ? `agents spawned: ${spawns.map((a) => a.subagentType).join(", ")}` : void 0;
55
+ })(),
56
+ (() => {
57
+ const inWindow = new Set(events.map((e) => e.index));
58
+ const branches = trace.subagentBranches.filter(
59
+ (b) => !scoped || inWindow.has(b.spawnIndex)
60
+ );
61
+ return branches.length > 0 ? `subagent transcripts: ${branches.map((b) => `${b.agentType} (depth ${b.spawnDepth})`).join(", ")}` : void 0;
62
+ })()
63
+ ].filter((line) => line !== void 0).join("\n")
64
+ );
65
+ const headerRoom = Math.max(
66
+ maxTotalChars - TIMELINE_SHELL.length - MIN_TIMELINE_CHARS,
67
+ 0
68
+ );
69
+ if (fullHeader.length > headerRoom) options.onTruncated?.();
70
+ const header = fullHeader.length <= headerRoom ? fullHeader : fullHeader.slice(
71
+ 0,
72
+ Math.max(headerRoom - HEADER_TRUNCATED.length, 0)
73
+ ) + HEADER_TRUNCATED;
74
+ const branchTypes = /* @__PURE__ */ new Map();
75
+ for (const spawn of trace.agentSpawns) {
76
+ if (spawn.toolUseId) branchTypes.set(spawn.toolUseId, spawn.subagentType);
77
+ }
78
+ for (const branch2 of trace.subagentBranches) {
79
+ branchTypes.set(branch2.branchId, branch2.agentType);
80
+ }
81
+ const label = (branchId) => branchTypes.get(branchId) ?? branchId;
82
+ const callAt = new Map(trace.toolCalls.map((call) => [call.index, call]));
83
+ if (scoped?.empty === true) {
84
+ return `${header}${TIMELINE_SHELL}[no turns: ${scrub(scoped.reason ?? "")}]`;
85
+ }
86
+ const lines = [];
87
+ let branch;
88
+ let turnAt;
89
+ for (const event of events) {
90
+ if (turnAt === void 0 && options.turnFrom !== void 0 && event.index >= options.turnFrom) {
91
+ turnAt = lines.length;
92
+ if (turnAt > 0) lines.push(TURN_HEADING);
93
+ }
94
+ const tag = event.branchId ? `:${label(event.branchId)}` : event.sidechain ? ":sidechain" : "";
95
+ let line;
96
+ switch (event.kind) {
97
+ case "user":
98
+ if (event.text) line = `[user${tag}] ${clip(event.text, maxBlockChars)}`;
99
+ break;
100
+ case "assistant":
101
+ if (event.text) {
102
+ line = `[assistant${tag}] ${clip(event.text, maxBlockChars)}`;
103
+ }
104
+ break;
105
+ case "tool_call": {
106
+ const call = callAt.get(event.index);
107
+ const input = call ? JSON.stringify(call.input) : "";
108
+ line = `[tool${tag}] ${event.toolName ?? call?.name ?? "?"} ${clip(input, Math.min(maxBlockChars, 500))}`;
109
+ break;
110
+ }
111
+ default:
112
+ break;
113
+ }
114
+ if (line === void 0) continue;
115
+ if (event.branchId !== branch) {
116
+ if (branch !== void 0) lines.push(`[/subagent ${label(branch)}]`);
117
+ branch = event.branchId;
118
+ if (branch !== void 0) {
119
+ lines.push(`[subagent ${label(branch)} (${branch})]`);
120
+ }
121
+ }
122
+ lines.push(line);
123
+ }
124
+ if (branch !== void 0) lines.push(`[/subagent ${label(branch)}]`);
125
+ const budget = Math.max(
126
+ maxTotalChars - header.length - TIMELINE_SHELL.length,
127
+ MIN_TIMELINE_CHARS
128
+ );
129
+ if (turnAt !== void 0 && turnAt > 0) {
130
+ let size = lines.reduce((n, l) => n + l.length + 1, -1);
131
+ let cut = 0;
132
+ while (cut < turnAt && size > budget) {
133
+ size -= (lines[cut]?.length ?? 0) + 1;
134
+ cut += 1;
135
+ }
136
+ if (cut > 0) {
137
+ options.onTruncated?.();
138
+ lines.splice(0, cut, `[... ${String(cut)} earlier lines left out ...]`);
139
+ }
140
+ }
141
+ let timeline = scrub(lines.join("\n"));
142
+ if (timeline.length > budget) {
143
+ options.onTruncated?.();
144
+ const marker = (omitted2) => `
145
+ [... truncated ${omitted2} chars of transcript ...]
146
+ `;
147
+ const room = Math.max(budget - marker(timeline.length).length, 0);
148
+ const headLen = Math.floor(room * 0.6);
149
+ const tailLen = room - headLen;
150
+ const omitted = timeline.length - headLen - tailLen;
151
+ timeline = `${timeline.slice(0, headLen)}${marker(omitted)}${tailLen > 0 ? timeline.slice(-tailLen) : ""}`;
152
+ }
153
+ return `${header}${TIMELINE_SHELL}${timeline}`;
154
+ }
155
+
156
+ export {
157
+ renderTrace
158
+ };
159
+ //# sourceMappingURL=chunk-ZAOJYN2D.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/tracevals/judge/render.ts"],"sourcesContent":["/**\n * Render a trace into judge-readable text. Session files can be tens of MB,\n * so every block is capped and the whole digest is bounded by a head/tail\n * window — the opening (instructions, intent) and the ending (outcome) matter\n * most for adherence judging.\n *\n * Given an eval plan, only the turns that plan's artifact was governing are\n * rendered (ADR 01015). That is both the correct evidence to judge against and\n * a large cut in tokens: a skill's window is usually a fraction of a session.\n *\n * This is also the only place trace content is turned into text bound for a\n * third-party API, so it is where redaction happens (ADR 01020). Every block is\n * scrubbed *before* it is clipped, so truncation can never bisect a secret and\n * leave a usable prefix behind.\n */\nimport type { Trace, TraceEvent } from \"../trace/types.js\";\nimport type { EvalPlan } from \"../core/plan.js\";\nimport { windowFor, type TraceWindow } from \"../graders/util.js\";\nimport { makeRedactor } from \"./redact.js\";\n\nexport interface RenderOptions {\n /** Per-block character cap (messages, tool inputs). */\n maxBlockChars?: number;\n /** Whole-digest character cap; overflow keeps head and tail. */\n maxTotalChars?: number;\n /**\n * Extra redaction patterns, applied on top of the built-in shapes rather\n * than instead of them. Sources are compiled with the `g` flag.\n */\n redact?: string[];\n /**\n * A window cut elsewhere, such as the turn a Stop judges (proposal 0079).\n * It takes the place of the plan's window when both are given.\n */\n window?: TraceWindow;\n /**\n * The ordinal the judged turn starts at (proposal 0079). The whole session\n * is rendered, a heading marks where that turn starts, and over the cap the\n * lines before it go first, oldest first, before the turn itself is cut.\n * When the session is that one turn, nothing comes before it, so there is\n * no heading and nothing to cut first. When no event reaches it, the whole\n * session renders with no heading.\n */\n turnFrom?: number;\n /**\n * Called when `maxTotalChars` cut the digest: the header, the timeline, or\n * both. The cut is already visible as a marker in the text; this lets a\n * caller say so in a warning as well. It can be called more than once for\n * one digest, once per cut.\n */\n onTruncated?: () => void;\n}\n\nconst DEFAULTS: Required<Omit<RenderOptions, \"window\" | \"onTruncated\" | \"turnFrom\">> = {\n maxBlockChars: 2_000,\n maxTotalChars: 150_000,\n redact: [],\n};\n\n/**\n * The smallest timeline the head/tail window will ever leave.\n *\n * The cap used to be skipped outright when the header grew past it — the guard\n * was `budget > 0`, so a non-positive budget *disabled* truncation and shipped\n * the entire unclipped transcript to a third-party provider, precisely when the\n * user had asked for the tightest cap. A floor keeps truncation running; the\n * header is bounded separately so the whole digest still honours the cap.\n */\nconst MIN_TIMELINE_CHARS = 200;\n\nconst HEADER_TRUNCATED = \"\\n[... header truncated ...]\";\nconst TURN_HEADING = \"## The last turn\";\nconst TIMELINE_SHELL = \"\\n\\n## Timeline\\n\";\n\nexport function renderTrace(\n trace: Trace,\n options: RenderOptions = {},\n plan?: EvalPlan,\n): string {\n const { maxBlockChars, maxTotalChars, redact } = { ...DEFAULTS, ...options };\n const scrub = makeRedactor(redact);\n // Redact, then truncate. The other order would let a cap land mid-secret and\n // ship the surviving prefix.\n const clip = (text: string, max: number): string => {\n const safe = scrub(text);\n if (safe.length <= max) return safe;\n return `${safe.slice(0, max)} [... truncated ${safe.length - max} chars ...]`;\n };\n const window =\n options.window ?? (plan === undefined ? undefined : windowFor(trace, plan));\n // Project rules govern the whole session, so their digest is the session's —\n // byte-identical to an unscoped render, and cached as such.\n const scoped =\n window !== undefined && window.scope !== \"session\" ? window : undefined;\n const events: TraceEvent[] = scoped?.events ?? trace.events;\n\n // Scrubbed too: `cwd` and a branch name are author-supplied strings, and the\n // header is as much a thing that leaves the machine as the timeline is.\n const fullHeader = scrub(\n [\n \"# Session\",\n `source: ${trace.source}`,\n trace.model ? `model: ${trace.model}` : undefined,\n `cwd: ${trace.cwd}`,\n trace.gitBranch ? `branch: ${trace.gitBranch}` : undefined,\n scoped\n ? `scope: ${scoped.label} — ${events.length} of ${trace.events.length} session events`\n : undefined,\n // Everything below describes what the judge can actually see. On a\n // scoped render the timeline is the window, so a session-wide count here\n // reads as evidence that the rest was truncated away — the judge would\n // discount a digest that is complete for what it was asked about. The\n // session totals stay, in parentheses, because \"3 of 87\" is context the\n // window count alone does not carry.\n scoped\n ? `turns: ${scoped.turnCount} (of ${trace.turnCount} in the session)`\n : `turns: ${trace.turnCount}`,\n ((): string => {\n const used = (scoped ?? trace).skillInvocations.map((s) => s.name);\n return used.length > 0\n ? `skills used: ${used.join(\", \")}`\n : \"skills used: none\";\n })(),\n ((): string | undefined => {\n // Spawns and branches inside the window only: an agent the parent\n // session started after this skill handed over is not this artifact's\n // to answer for.\n const inWindow = new Set(events.map((e) => e.index));\n const spawns = trace.agentSpawns.filter(\n (a) => !scoped || inWindow.has(a.index),\n );\n return spawns.length > 0\n ? `agents spawned: ${spawns.map((a) => a.subagentType).join(\", \")}`\n : undefined;\n })(),\n ((): string | undefined => {\n const inWindow = new Set(events.map((e) => e.index));\n const branches = trace.subagentBranches.filter(\n (b) => !scoped || inWindow.has(b.spawnIndex),\n );\n return branches.length > 0\n ? `subagent transcripts: ${branches\n .map((b) => `${b.agentType} (depth ${b.spawnDepth})`)\n .join(\", \")}`\n : undefined;\n })(),\n ]\n .filter((line): line is string => line !== undefined)\n .join(\"\\n\"),\n );\n\n // The header lists every skill name, agent type and branch, so on a busy\n // session it can outgrow a tight cap on its own. Bound it first, leaving the\n // timeline its floor, so `maxTotalChars` stays a cap on the whole digest\n // rather than on one half of it.\n const headerRoom = Math.max(\n maxTotalChars - TIMELINE_SHELL.length - MIN_TIMELINE_CHARS,\n 0,\n );\n if (fullHeader.length > headerRoom) options.onTruncated?.();\n const header =\n fullHeader.length <= headerRoom\n ? fullHeader\n : fullHeader.slice(\n 0,\n Math.max(headerRoom - HEADER_TRUNCATED.length, 0),\n ) + HEADER_TRUNCATED;\n\n // Two concurrent subagents are indistinguishable under a flat `:sidechain`\n // tag, so each branch becomes a labelled block named for the subagent that\n // ran it. The header can fall outside the head/tail window below, so every\n // line keeps a short tag of its own as well. Inline and sidecar branches\n // render through this one path; a sidecar branch is named by its meta file's\n // `agentType`, which is the recorder's own statement of what ran.\n const branchTypes = new Map<string, string>();\n for (const spawn of trace.agentSpawns) {\n if (spawn.toolUseId) branchTypes.set(spawn.toolUseId, spawn.subagentType);\n }\n for (const branch of trace.subagentBranches) {\n branchTypes.set(branch.branchId, branch.agentType);\n }\n const label = (branchId: string): string =>\n branchTypes.get(branchId) ?? branchId;\n const callAt = new Map(trace.toolCalls.map((call) => [call.index, call]));\n\n if (scoped?.empty === true) {\n return `${header}${TIMELINE_SHELL}[no turns: ${scrub(scoped.reason ?? \"\")}]`;\n }\n\n const lines: string[] = [];\n let branch: string | undefined;\n let turnAt: number | undefined;\n for (const event of events) {\n if (turnAt === undefined && options.turnFrom !== undefined && event.index >= options.turnFrom) {\n turnAt = lines.length;\n if (turnAt > 0) lines.push(TURN_HEADING);\n }\n const tag = event.branchId\n ? `:${label(event.branchId)}`\n : event.sidechain\n ? \":sidechain\"\n : \"\";\n let line: string | undefined;\n switch (event.kind) {\n case \"user\":\n if (event.text) line = `[user${tag}] ${clip(event.text, maxBlockChars)}`;\n break;\n case \"assistant\":\n if (event.text) {\n line = `[assistant${tag}] ${clip(event.text, maxBlockChars)}`;\n }\n break;\n case \"tool_call\": {\n const call = callAt.get(event.index);\n const input = call ? JSON.stringify(call.input) : \"\";\n line = `[tool${tag}] ${event.toolName ?? call?.name ?? \"?\"} ${clip(input, Math.min(maxBlockChars, 500))}`;\n break;\n }\n default:\n break;\n }\n if (line === undefined) continue;\n if (event.branchId !== branch) {\n if (branch !== undefined) lines.push(`[/subagent ${label(branch)}]`);\n branch = event.branchId;\n if (branch !== undefined) {\n lines.push(`[subagent ${label(branch)} (${branch})]`);\n }\n }\n lines.push(line);\n }\n if (branch !== undefined) lines.push(`[/subagent ${label(branch)}]`);\n\n // Earlier turns give way first, oldest line first, so the cap reaches the\n // judged turn only once nothing before it is left.\n const budget = Math.max(\n maxTotalChars - header.length - TIMELINE_SHELL.length,\n MIN_TIMELINE_CHARS,\n );\n if (turnAt !== undefined && turnAt > 0) {\n // Measured before the scrub below, which can change a length only where a\n // label matches a secret pattern. Close enough to pick how many go. The\n // heading is kept and counted, and a turn still over budget alone is cut\n // by the head-and-tail pass below.\n let size = lines.reduce((n, l) => n + l.length + 1, -1);\n let cut = 0;\n while (cut < turnAt && size > budget) {\n size -= (lines[cut]?.length ?? 0) + 1;\n cut += 1;\n }\n if (cut > 0) {\n options.onTruncated?.();\n lines.splice(0, cut, `[... ${String(cut)} earlier lines left out ...]`);\n }\n }\n\n // One more pass over the assembled timeline. Every message and tool input\n // already went through `clip`, so this pass is the belt to that pair of\n // braces: it covers what is assembled here rather than clipped — tool names,\n // branch labels — and anything a later change adds to this loop without\n // remembering to scrub it. Redaction is idempotent, so it costs nothing.\n let timeline = scrub(lines.join(\"\\n\"));\n // The budget is a floor, never a switch: `budget > 0` used to turn\n // truncation *off* for a non-positive budget, the case where it matters most.\n if (timeline.length > budget) {\n options.onTruncated?.();\n // The marker counts against the budget, so the digest never exceeds what\n // the caller asked for. `omitted` is at most `timeline.length`, so the\n // width reserved for it is always enough.\n const marker = (omitted: number): string =>\n `\\n[... truncated ${omitted} chars of transcript ...]\\n`;\n const room = Math.max(budget - marker(timeline.length).length, 0);\n const headLen = Math.floor(room * 0.6);\n const tailLen = room - headLen;\n const omitted = timeline.length - headLen - tailLen;\n timeline = `${timeline.slice(0, headLen)}${marker(omitted)}${\n tailLen > 0 ? timeline.slice(-tailLen) : \"\"\n }`;\n }\n\n return `${header}${TIMELINE_SHELL}${timeline}`;\n}\n"],"mappings":";;;;;;;;;AAqDA,IAAM,WAAiF;AAAA,EACrF,eAAe;AAAA,EACf,eAAe;AAAA,EACf,QA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-BHGFLRXM.js";
6
+ } from "./chunk-7NSFGAAQ.js";
7
7
  import {
8
8
  runAdd,
9
9
  runHistory,
10
10
  runRemove,
11
11
  runUpdate
12
- } from "./chunk-ARNI3SJT.js";
12
+ } from "./chunk-OL3Z7KPQ.js";
13
13
  import {
14
14
  parseRepoFlags,
15
15
  runCheck
16
- } from "./chunk-XI3BNZG4.js";
16
+ } from "./chunk-5JXA75XB.js";
17
17
  import {
18
18
  renderCheckJson,
19
19
  renderHistoryJson,
20
20
  renderRemoveJson,
21
21
  renderUpdateJson
22
- } from "./chunk-GMOAW2EG.js";
22
+ } from "./chunk-GIHIONJH.js";
23
23
  import {
24
24
  renderCheckGithub
25
- } from "./chunk-CZIO37J5.js";
25
+ } from "./chunk-6RENCXLC.js";
26
26
  import {
27
27
  renderCheckPretty,
28
28
  renderHistoryPretty,
29
29
  renderRemovePretty,
30
30
  renderUpdatePretty
31
- } from "./chunk-WHVFHBL3.js";
31
+ } from "./chunk-72UN462G.js";
32
32
  import {
33
33
  shortCommit,
34
34
  shortLine,
35
35
  shortPin,
36
36
  shortSrc
37
- } from "./chunk-R2CR62JV.js";
37
+ } from "./chunk-XVL7DYWM.js";
38
38
  import {
39
39
  CiteError,
40
40
  asCiteError,
41
41
  spellSource
42
- } from "./chunk-TFVNEPMF.js";
43
- import "./chunk-KCWNJMSS.js";
44
- import "./chunk-UP6NBQ62.js";
45
- import "./chunk-2NGFDLIM.js";
42
+ } from "./chunk-EAF4K7IK.js";
43
+ import "./chunk-BA7BQBWV.js";
44
+ import "./chunk-7M3MBFG7.js";
45
+ import "./chunk-Y4O737F7.js";
46
+ import "./chunk-3CBGLUJX.js";
47
+ import "./chunk-76Y3JATE.js";
48
+ import "./chunk-WHECOVH2.js";
49
+ import "./chunk-FJYIPHWK.js";
50
+ import "./chunk-FBIBR4CH.js";
51
+ import "./chunk-LHP56Q45.js";
52
+ import "./chunk-XTKJNRJ6.js";
53
+ import "./chunk-TOVSR2YO.js";
54
+ import "./chunk-TI4DA6DF.js";
55
+ import "./chunk-QJL57GPX.js";
56
+ import "./chunk-VSDXZAQU.js";
57
+ import "./chunk-INOVEO32.js";
58
+ import "./chunk-EBBJFXMX.js";
59
+ import "./chunk-B4ECIBLF.js";
46
60
  import {
47
61
  terminalConfirm
48
- } from "./chunk-Q76T6Y6X.js";
49
- import "./chunk-D5GBYKDU.js";
62
+ } from "./chunk-AZKNB2T3.js";
50
63
  import {
51
64
  COMMON_FORMAT_LIST,
52
65
  OMITTED_WHEN_CLEAN,
@@ -55,8 +68,7 @@ import {
55
68
  isMachineFormat,
56
69
  isReportFormat,
57
70
  renderJunit
58
- } from "./chunk-762MM6NA.js";
59
- import "./chunk-S5G6T4VC.js";
71
+ } from "./chunk-2QK25SLZ.js";
60
72
  import {
61
73
  collect,
62
74
  configOption,
@@ -65,11 +77,11 @@ import {
65
77
  reportConfig,
66
78
  splitList,
67
79
  splitPageArgument
68
- } from "./chunk-BXE4L52Q.js";
80
+ } from "./chunk-KX6HRTLH.js";
69
81
  import "./chunk-DSWKBZWW.js";
70
82
  import {
71
83
  STDIN_TOKEN
72
- } from "./chunk-BJUEOC4G.js";
84
+ } from "./chunk-QWVIGKBM.js";
73
85
  import "./chunk-77AINBYM.js";
74
86
  import "./chunk-QK6VYJHV.js";
75
87
  import {
@@ -78,14 +90,14 @@ import {
78
90
  import {
79
91
  fail
80
92
  } from "./chunk-YEUYKR62.js";
81
- import "./chunk-B2242FYO.js";
93
+ import "./chunk-JF4BC7ZD.js";
82
94
  import {
83
95
  notice
84
96
  } from "./chunk-HX44GB4Z.js";
85
- import "./chunk-VM7VAFJW.js";
97
+ import "./chunk-NVYDWVXN.js";
86
98
  import {
87
99
  package_default
88
- } from "./chunk-JQA6RF4R.js";
100
+ } from "./chunk-N2T6RLSE.js";
89
101
  import "./chunk-OWBRDNRZ.js";
90
102
  import "./chunk-G3T47CFV.js";
91
103
  import "./chunk-2H7UOFLK.js";
@@ -575,4 +587,4 @@ export {
575
587
  colorFor,
576
588
  splitPageArgument2 as splitPageArgument
577
589
  };
578
- //# sourceMappingURL=cli-77A46SB2.js.map
590
+ //# sourceMappingURL=cli-4R5HIGG4.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/cite/cli.ts","../src/cite/reporters/junit.ts"],"sourcesContent":["/**\n * The `cite` domain's commander program. Mounted by `src/cli.ts` under\n * `manni cite`; no entry point of its own. Grammar per proposal 0034: verbs are\n * `check`, `add`, `update`, `remove`, `history`; there is no default subcommand.\n *\n * Follows clig.dev as meta's does: primary output to stdout, diagnostics to\n * stderr, colour only on a TTY and never under `NO_COLOR`/`--no-color`, exit\n * `0` clean, `1` an error-severity finding, `2` operational/usage.\n */\nimport { Command, Option } 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 { splitPageArgument as splitSharedPageArgument } from \"../shared/pin.js\";\nimport { terminalConfirm } from \"../shared/prompt.js\";\nimport { fail } from \"../shared/run.js\";\nimport { notice } from \"../shared/warn.js\";\nimport {\n COMMON_FORMAT_LIST,\n OMITTED_WHEN_CLEAN,\n REPORT_FORMAT_LIST,\n STDIN_TOKEN,\n isMachineFormat,\n} from \"../meta/internal.js\";\nimport { REPORT_FORMATS, isReportFormat } from \"../meta/index.js\";\nimport { runAdd } from \"./commands/add.js\";\nimport { runCheck } from \"./commands/check.js\";\nimport { runHistory } from \"./commands/history.js\";\nimport { runRemove } from \"./commands/remove.js\";\nimport { runUpdate } from \"./commands/update.js\";\nimport { parseRepoFlags } from \"./core/config.js\";\nimport { CiteError, asCiteError } from \"./errors.js\";\nimport { spellSource } from \"./core/range.js\";\nimport { shortCommit, shortLine, shortPin, shortSrc } from \"./core/spell.js\";\nimport { renderCheckGithub } from \"./reporters/github.js\";\nimport { renderCheckJson, renderHistoryJson, renderRemoveJson, renderUpdateJson } from \"./reporters/json.js\";\nimport { renderCheckJunit } from \"./reporters/junit.js\";\nimport {\n renderCheckPretty,\n renderHistoryPretty,\n renderRemovePretty,\n renderUpdatePretty,\n} from \"./reporters/pretty.js\";\nimport { renderCheckSarif } from \"./reporters/sarif.js\";\nimport type { AddResult, PageLines } from \"./types.js\";\n\nconst UPDATE_FORMATS = [\"pretty\", \"json\"] as const;\ntype UpdateFormat = (typeof UPDATE_FORMATS)[number];\n/** The same two `update` has: a removal is a write, and writes report alike. */\nconst REMOVE_FORMATS = UPDATE_FORMATS;\ntype RemoveFormat = UpdateFormat;\n/** The same two again: a window is not a finding, so the finding sinks are left out. */\nconst HISTORY_FORMATS = UPDATE_FORMATS;\n\nfunction isHistoryFormat(value: string): value is UpdateFormat {\n return (HISTORY_FORMATS as readonly string[]).includes(value);\n}\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 */\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 `cite` program, wherever it is mounted. Not the root: under the\n * umbrella 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\nfunction isUpdateFormat(value: string): value is UpdateFormat {\n return (UPDATE_FORMATS as readonly string[]).includes(value);\n}\n\nfunction isRemoveFormat(value: string): value is RemoveFormat {\n return (REMOVE_FORMATS as readonly string[]).includes(value);\n}\n\n/**\n * Commander hands an `.action()` callback an untyped bag of option values, so\n * each subcommand declares the shape it actually reads. The `--no-<thing>`\n * flags are `boolean` and never `undefined`: commander supplies `true` when\n * the flag is absent, which is its default and not a choice, so only the\n * explicit `false` travels to the core (`explicitFalse`).\n */\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 an extractor. */\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 /** `--root <dir>`: where `src:` paths resolve from. */\n root?: string;\n}\n\ninterface CheckCliOptions extends InputCliOptions {\n /** `-f, --format <format>`. Always a string: the declaration has a default. */\n format: string;\n quiet?: boolean;\n /**\n * `--baseline [path]` / `--no-baseline`, the same three-state split as\n * `config`: absent leaves the config in charge, a string names a file, `true`\n * is a bare `--baseline` (the default path), `false` is `--no-baseline`.\n */\n baseline?: string | boolean;\n /** `--write-baseline [path]`; `true` for the bare flag. */\n writeBaseline?: string | boolean;\n /** `--no-check-sources`. */\n checkSources: boolean;\n showDiff?: boolean;\n reveal?: boolean;\n /** `--repo <name=dir>`, repeatable; commander's default value is `[]`. */\n repo: string[];\n}\n\ninterface AddCliOptions {\n id?: string;\n marker?: boolean;\n quote?: boolean;\n /** `--encrypt`. */\n encrypt?: boolean;\n /** `--no-commit-sha`. */\n commitSha: boolean;\n dryRun?: boolean;\n as?: string;\n root?: string;\n /** `--repo <name=dir>`, repeatable; commander's default value is `[]`. */\n repo: string[];\n config?: string | boolean;\n}\n\ninterface RemoveCliOptions extends Omit<InputCliOptions, \"root\"> {\n /** `--only <id>`, repeatable; commander's default value is `[]`. */\n only: string[];\n dryRun?: boolean;\n format: string;\n}\n\ninterface HistoryCliOptions extends InputCliOptions {\n /** `--newer-than <duration>`; the core parses it. */\n newerThan?: string;\n format: string;\n}\n\ninterface UpdateCliOptions extends InputCliOptions {\n /** `--no-check-sources`: declared so the refusal names the flag rather than commander rejecting it. */\n checkSources: boolean;\n accept?: boolean;\n recommit?: boolean;\n /** `--only <id>`, repeatable; commander's default value is `[]`. */\n only: string[];\n dryRun?: boolean;\n format: string;\n /** `--repo <name=dir>`, repeatable; commander's default value is `[]`. */\n repo: string[];\n}\n\n/**\n * Split `docs/limits.md:9` or `docs/limits.md:14-18` into the page and the\n * claim's lines, under cite's error contract. The parsing is the shared pin\n * engine's (`splitPageArgument` in `src/shared/pin.ts`).\n */\nexport function splitPageArgument(arg: string): { page: string; lines?: PageLines } {\n return asCiteError(() => splitSharedPageArgument(arg));\n}\n\n/** `line 9`, or `lines 14-18` for a range. */\nfunction spellAt(lines: PageLines, noun = \"line\"): string {\n return lines.start === lines.end\n ? `${noun} ${String(lines.start)}`\n : `${noun}s ${String(lines.start)}-${String(lines.end)}`;\n}\n\n/**\n * What `add` says on success. One sentence composed from the result: what was\n * added, where it went, and what each end is pinned to. Lines are the page's\n * own, after the write. The source is spelled as it was written to the page,\n * abbreviated when it is a ciphertext, and quoted with its first pinned line\n * where the result carries one.\n */\nexport function addMessage(result: AddResult): string {\n const { citation, claimLines } = result;\n const claim = citation.claim;\n const name = citation.id ?? (claim === undefined ? \"a bare pin\" : \"an entry\");\n const src = shortSrc(spellSource(citation.source));\n const commit = citation.source[\"commit-sha\"];\n const quoted = result.sourceLine === undefined ? \"\" : shortLine(result.sourceLine);\n const line = quoted === \"\" ? \"\" : ` \"${quoted}\"`;\n const pin = `${src}${line}, ${shortPin(citation.source.integrity)}, ${commit === undefined ? \"no commit\" : shortCommit(commit)}`;\n // Where it went: the page's own frontmatter, or the manifest that owns the\n // page's citations, at the line the entry now sits on.\n const where =\n result.manifest === undefined\n ? \"frontmatter\"\n : `${result.manifest.file}:${String(result.manifest.line)}`;\n const head = `${result.file}: added ${name} to ${where}`;\n\n if (result.markerLine !== undefined) {\n const at =\n claimLines === undefined ? \"\" : `, claim pinned at ${spellAt(claimLines)}`;\n const wrote = result.markerJoined === true ? \"joined the marker at line\" : \"marker at line\";\n const marked = `${head}; ${wrote} ${String(result.markerLine)}${at}`;\n if (claim === undefined) return marked;\n if (citation.quote === true) return `${marked} (a block that reproduces ${src})`;\n return `${marked} (${shortPin(claim.integrity)}; source ${pin})`;\n }\n if (claim === undefined || claimLines === undefined) {\n return `${head} (source ${pin})`;\n }\n if (citation.quote === true) {\n return `${head} (claim ${spellAt(claimLines, \"line\")}, a block that reproduces ${src})`;\n }\n return `${head} (claim at ${spellAt(claimLines)}, ${shortPin(claim.integrity)}; source ${pin})`;\n}\n\nexport function buildProgram(): Command {\n const program = new Command();\n program\n .name(\"cite\")\n .description(\n \"Track citations from doc claims to source lines and check them for drift.\",\n )\n .version(pkg.version, \"-V, --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)`.\n .exitOverride();\n\n program\n .command(\"check\")\n .description(\"Check every citation in the given pages against its source\")\n .argument(\n \"[paths...]\",\n \"files, directories, or globs to check (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 for every input\")\n .option(\n \"-f, --format <format>\",\n `output: ${REPORT_FORMATS.join(\" | \")}`,\n \"pretty\",\n )\n .option(\"-c, --config <path>\", \"path to a manni config file\")\n .option(\"--no-config\", \"ignore any discovered config file\")\n .option(\"-q, --quiet\", \"in pretty output, hide current citations and clean files\")\n .option(\"--allow-empty\", \"treat zero matched files as success\")\n .option(\"--no-gitignore\", \"check files .gitignore covers\")\n // No `defaultValue` and no `.preset()`, for the reasons meta's validate\n // gives: a bare flag must stay distinguishable from a typed path.\n .addOption(\n new Option(\n \"--baseline [path]\",\n \"compare against a baseline; fail only on findings not in it\",\n ),\n )\n .addOption(\n new Option(\n \"--write-baseline [path]\",\n \"record current findings as the baseline, then exit 0\",\n ),\n )\n .option(\"--no-baseline\", \"ignore a baseline configured by `baseline:`\")\n .option(\"--no-check-sources\", \"page-side rules only; every source status is skipped\")\n .option(\n \"--root <dir>\",\n \"directory src: paths resolve from (default: cite.root from config, else the git root, else the current directory)\",\n )\n .option(\n \"--repo <name=dir>\",\n \"a checkout an entry's source.repo may name, as name=dir relative to the current directory; repeatable; overrides cite.repos for that name\",\n collect,\n [],\n )\n .option(\"--show-diff\", \"in pretty output, print the diff and commit subjects for changed\")\n .option(\"--reveal\", \"in pretty output, print the decrypted path beside an encrypted source\")\n .addHelpText(\n \"after\",\n [\n \"\",\n \"Examples:\",\n \" manni cite check docs/ # walk a directory\",\n \" manni cite check --collection guides # one configured collection\",\n ' manni cite check \"docs/**/*.md\" -f github # CI annotations',\n \" manni cite check --show-diff docs/limits.md # see what changed\",\n \" manni cite check --baseline # fail only on new findings\",\n \" cat page.md | manni cite check - --as markdown\",\n ].join(\"\\n\"),\n )\n .action(async (paths: string[], options: CheckCliOptions, command: Command) => {\n try {\n const format = options.format;\n if (!isReportFormat(format)) {\n throw new CiteError(\n `Unknown --format \"${format}\". Use ${REPORT_FORMAT_LIST}.`,\n );\n }\n const exts = options.ext ? splitList(options.ext) : undefined;\n const stdinContent = paths.includes(STDIN_TOKEN) ? await readStdin() : undefined;\n const cwd = process.cwd();\n\n const run = await runCheck({\n inputs: paths,\n collection: options.collection,\n exts,\n exclude: options.exclude,\n as: options.as,\n ...configOption(options.config),\n onConfigLoaded: reportConfig(!isMachineFormat(format), cwd),\n stdinContent,\n // `undefined` rather than `false` when absent, so config still wins.\n allowEmpty: options.allowEmpty ? true : undefined,\n respectGitignore: explicitFalse(options.gitignore),\n onNotice: notice,\n baseline: options.baseline,\n writeBaseline: options.writeBaseline,\n checkSources: explicitFalse(options.checkSources),\n // Only so the run can say git is not there to give diffs; the diffs\n // themselves are the pretty reporter's.\n showDiff: options.showDiff ? true : undefined,\n root: options.root,\n repos: parseRepoFlags(options.repo, (message) => new CiteError(message)),\n });\n\n let text: string;\n switch (format) {\n case \"pretty\":\n text = renderCheckPretty(run, {\n color: colorFor(command, process.stdout.isTTY),\n quiet: Boolean(options.quiet),\n showDiff: Boolean(options.showDiff),\n reveal: Boolean(options.reveal),\n });\n break;\n case \"json\":\n text = renderCheckJson(run);\n break;\n case \"github\":\n text = renderCheckGithub(run);\n break;\n case \"sarif\":\n text = renderCheckSarif(run, { onNotice: notice });\n break;\n case \"junit\":\n text = renderCheckJunit(run);\n break;\n }\n // Only `github` may say nothing on a clean run; every other format\n // owes its envelope even when empty.\n if (text.length > 0 || !OMITTED_WHEN_CLEAN.has(format)) {\n process.stdout.write(`${text}\\n`);\n }\n // `failed` counts files with an unbaselined error-severity finding;\n // warnings never move it.\n process.exitCode = run.summary.failed > 0 ? 1 : 0;\n } catch (err) {\n fail(err);\n }\n });\n\n program\n .command(\"add\")\n .description(\"Mint a citation for a source range and write it to a page\")\n .argument(\n \"<page>\",\n \"the page to cite from, with the claim's lines: page:L or page:L1-L2 (use - for stdin, with --as)\",\n )\n .argument(\n \"<src>\",\n \"path, path:L or path:L1-L2 relative to --root, or repo:path with the same line forms for a checkout in cite.repos, or an encrypted ~source\",\n )\n .option(\"--id <id>\", \"kebab-case id, unique on the page; required with --marker\")\n .option(\"--marker\", \"write a cite <id> marker above the paragraph holding the page lines and pin the text it anchors\")\n .option(\"--quote\", \"the page lines are a fenced block that reproduces the source\")\n .option(\n \"--encrypt\",\n \"write source.file encrypted, with an hmac-sha256- pin; with no key, offer to create one (an available key encrypts without the flag)\",\n )\n .option(\"--no-commit-sha\", \"do not record HEAD\")\n .option(\"--dry-run\", \"print the diff; write nothing\")\n .option(\"--as <format>\", \"force the page format\")\n .option(\"--root <dir>\", \"directory source paths resolve from (as check)\")\n .option(\n \"--repo <name=dir>\",\n \"a checkout an entry's source.repo may name, as name=dir relative to the current directory; repeatable; overrides cite.repos for that name\",\n collect,\n [],\n )\n .option(\"-c, --config <path>\", \"path to a manni config file\")\n .option(\"--no-config\", \"ignore any discovered config file\")\n .addHelpText(\n \"after\",\n [\n \"\",\n \"Examples:\",\n \" manni cite add docs/limits.md:9 lib/limits.ts:2 --id fetch-timeout\",\n \" manni cite add docs/limits.md:30 lib/limits.ts:8-12 --id timeouts --marker\",\n \" manni cite add docs/limits.md:14-18 lib/limits.ts:1-3 --quote\",\n \" manni cite add docs/limits.md lib/limits.ts --dry-run\",\n \" cat page.md | manni cite add -:9 lib/limits.ts:2 --as markdown > out.md\",\n ].join(\"\\n\"),\n )\n .action(async (pageArgument: string, src: string, options: AddCliOptions) => {\n try {\n const { page, lines } = splitPageArgument(pageArgument);\n const usingStdin = page === STDIN_TOKEN;\n const stdinContent = usingStdin ? await readStdin() : undefined;\n const dryRun = Boolean(options.dryRun);\n const cwd = process.cwd();\n\n const result = await runAdd({\n page,\n pageLines: lines,\n src,\n id: options.id,\n marker: options.marker ? true : undefined,\n quote: options.quote ? true : undefined,\n // `undefined` when absent, so the key decides: an available one\n // encrypts without the flag.\n encrypt: options.encrypt ? true : undefined,\n commitSha: explicitFalse(options.commitSha),\n dryRun,\n as: options.as,\n ...configOption(options.config),\n // With `-` the page owns stdout; so does the diff under --dry-run.\n onConfigLoaded: reportConfig(!usingStdin && !dryRun, cwd),\n stdinContent,\n root: options.root,\n repos: parseRepoFlags(options.repo, (message) => new CiteError(message)),\n onNotice: notice,\n // Only on a terminal: off one, a missing key is a refusal, not a\n // question nobody can answer. With `-` stdin is the page, so no\n // question is put either.\n confirm: terminalConfirm(),\n });\n\n const message = addMessage(result);\n // A dry run prints every diff the write would make: the page's, and\n // the manifest's when the entry goes there.\n const diffs = [result.diff, result.manifest?.diff ?? \"\"].filter((d) => d.length > 0);\n if (usingStdin) {\n // The rewritten page owns stdout; everything else is a diagnostic.\n process.stdout.write(result.content);\n if (dryRun) for (const diff of diffs) process.stderr.write(`${diff}\\n`);\n process.stderr.write(`${message}\\n`);\n } else if (dryRun) {\n for (const diff of diffs) process.stdout.write(`${diff}\\n`);\n process.stderr.write(`${message}\\n`);\n } else {\n process.stdout.write(`${message}\\n`);\n }\n process.exitCode = 0;\n } catch (err) {\n fail(err);\n }\n });\n\n program\n .command(\"update\")\n .description(\"Rewrite moved citations in place; with --accept, re-mint changed ones\")\n .argument(\n \"[paths...]\",\n \"files, directories, or globs to update (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 for every input\")\n .option(\"-c, --config <path>\", \"path to a manni config file\")\n .option(\"--no-config\", \"ignore any discovered config file\")\n .option(\"--allow-empty\", \"treat zero matched files as success\")\n .option(\"--no-gitignore\", \"update files .gitignore covers\")\n .option(\"--no-check-sources\", \"refused: update needs the sources\")\n .option(\"--root <dir>\", \"directory src: paths resolve from (as check)\")\n .option(\n \"--repo <name=dir>\",\n \"a checkout an entry's source.repo may name, as name=dir relative to the current directory; repeatable; overrides cite.repos for that name\",\n collect,\n [],\n )\n .option(\"--accept\", \"re-mint changed and never-true entries at HEAD; prints old and new pins\")\n .option(\n \"--recommit\",\n \"re-record commit-sha to the commit where the pinned lines arrived on HEAD's history, where the recorded commit does not contain them or is outside that history\",\n )\n .option(\"--only <id>\", \"limit to entries with this id; repeatable\", collect, [])\n .option(\"--dry-run\", \"print the diffs; write nothing\")\n .option(\n \"-f, --format <format>\",\n `output: ${UPDATE_FORMATS.join(\" | \")}`,\n \"pretty\",\n )\n .addHelpText(\n \"after\",\n [\n \"\",\n \"Examples:\",\n \" manni cite update docs/ # rewrite moved entries\",\n \" manni cite update --accept --only fetch-timeout docs/limits.md\",\n \" manni cite update --dry-run docs/ # see the diffs first\",\n \" manni cite update --recommit docs/ # repair unsupported commit-sha\",\n ].join(\"\\n\"),\n )\n .action(async (paths: string[], options: UpdateCliOptions, command: Command) => {\n try {\n const format = options.format;\n if (!isUpdateFormat(format)) {\n throw new CiteError(\n `Unknown --format \"${format}\". Use ${COMMON_FORMAT_LIST}.`,\n );\n }\n if (!options.checkSources) {\n throw new CiteError(\n \"update needs the sources: drop --no-check-sources (or `checkSources: false`).\",\n );\n }\n const exts = options.ext ? splitList(options.ext) : undefined;\n const usingStdin = paths.includes(STDIN_TOKEN);\n const stdinContent = usingStdin ? await readStdin() : undefined;\n const dryRun = Boolean(options.dryRun);\n // With `-` the rewritten page owns stdout, as it does for `add -`; a\n // dry run prints the diffs instead, so the report keeps stdout.\n const pageToStdout = usingStdin && !dryRun;\n const cwd = process.cwd();\n\n const run = await runUpdate({\n inputs: paths,\n collection: options.collection,\n exts,\n exclude: options.exclude,\n as: options.as,\n ...configOption(options.config),\n onConfigLoaded: reportConfig(format === \"pretty\" && !pageToStdout, cwd),\n stdinContent,\n allowEmpty: options.allowEmpty ? true : undefined,\n respectGitignore: explicitFalse(options.gitignore),\n onNotice: notice,\n root: options.root,\n repos: parseRepoFlags(options.repo, (message) => new CiteError(message)),\n accept: options.accept ? true : undefined,\n recommit: options.recommit ? true : undefined,\n only: options.only.length > 0 ? options.only : undefined,\n dryRun,\n });\n\n const text =\n format === \"json\"\n ? renderUpdateJson(run)\n : renderUpdatePretty(run, {\n color: colorFor(command, process.stdout.isTTY),\n // The diffs are the point of a dry run; a real run prints\n // what it rewrote and leaves the file to say the rest.\n showDiff: dryRun,\n });\n const stdinPage = pageToStdout ? run.pages.find((page) => page.content !== undefined) : undefined;\n if (stdinPage?.content !== undefined) {\n process.stdout.write(stdinPage.content);\n process.stderr.write(`${text}\\n`);\n } else {\n process.stdout.write(`${text}\\n`);\n }\n // Exit 1 when something was skipped with an error-severity finding:\n // work left undone, `fill`'s precedent.\n process.exitCode = run.exitCode;\n } catch (err) {\n fail(err);\n }\n });\n\n program\n .command(\"remove\")\n .description(\"Remove the named citations from the given pages, markers and all\")\n .argument(\n \"[paths...]\",\n \"files, directories, or globs to remove from (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 for every input\")\n .option(\"-c, --config <path>\", \"path to a manni config file\")\n .option(\"--no-config\", \"ignore any discovered config file\")\n .option(\"--allow-empty\", \"treat zero matched files as success\")\n .option(\"--no-gitignore\", \"remove from files .gitignore covers\")\n .option(\n \"--only <id>\",\n \"the entry to remove, by id or by pointer (/citations/N); required, and repeatable\",\n collect,\n [],\n )\n .option(\"--dry-run\", \"print the diffs and the report; write nothing\")\n .option(\n \"-f, --format <format>\",\n `output: ${REMOVE_FORMATS.join(\" | \")}`,\n \"pretty\",\n )\n .addHelpText(\n \"after\",\n [\n \"\",\n \"Examples:\",\n \" manni cite remove docs/limits.md --only fetch-timeout\",\n \" manni cite remove docs/ --only fetch-timeout --only retries --dry-run\",\n \" manni cite remove --collection site --only /citations/3 -f json\",\n ].join(\"\\n\"),\n )\n .action(async (paths: string[], options: RemoveCliOptions, command: Command) => {\n try {\n const format = options.format;\n if (!isRemoveFormat(format)) {\n throw new CiteError(\n `Unknown --format \"${format}\". Use ${COMMON_FORMAT_LIST}.`,\n );\n }\n const exts = options.ext ? splitList(options.ext) : undefined;\n const usingStdin = paths.includes(STDIN_TOKEN);\n const stdinContent = usingStdin ? await readStdin() : undefined;\n const dryRun = Boolean(options.dryRun);\n // With `-` the rewritten page owns stdout, exactly as on `update -`.\n const pageToStdout = usingStdin && !dryRun;\n const cwd = process.cwd();\n\n const run = await runRemove({\n inputs: paths,\n collection: options.collection,\n exts,\n exclude: options.exclude,\n as: options.as,\n ...configOption(options.config),\n onConfigLoaded: reportConfig(format === \"pretty\" && !pageToStdout, cwd),\n stdinContent,\n allowEmpty: options.allowEmpty ? true : undefined,\n respectGitignore: explicitFalse(options.gitignore),\n onNotice: notice,\n only: options.only,\n dryRun,\n });\n\n const text =\n format === \"json\"\n ? renderRemoveJson(run)\n : renderRemovePretty(run, {\n color: colorFor(command, process.stdout.isTTY),\n // The diffs are the point of a dry run; a real run prints\n // what it removed and leaves the file to say the rest.\n showDiff: dryRun,\n dryRun,\n });\n const stdinPage = pageToStdout ? run.pages.find((page) => page.content !== undefined) : undefined;\n if (stdinPage?.content !== undefined) {\n process.stdout.write(stdinPage.content);\n process.stderr.write(`${text}\\n`);\n } else {\n process.stdout.write(`${text}\\n`);\n }\n // Everything named was removed, or previewed: there is no exit 1.\n process.exitCode = 0;\n } catch (err) {\n fail(err);\n }\n });\n\n program\n .command(\"history\")\n .description(\"Walk the git history and report how long each pin stood stale, and which releases shipped it\")\n .argument(\"[paths...]\", \"files, directories, or globs whose citations are walked\")\n .option(\n \"--collection <name>\",\n \"configured collection to walk; 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 the page format for every input\")\n .option(\"-c, --config <path>\", \"path to a manni config file\")\n .option(\"--no-config\", \"ignore any discovered config file\")\n .option(\"--allow-empty\", \"treat zero matched files as success\")\n .option(\"--no-gitignore\", \"walk pages .gitignore covers\")\n .option(\"--root <dir>\", \"directory src: paths resolve from (as check)\")\n .option(\n \"--newer-than <duration>\",\n \"walk only the commits within this span of HEAD's committer time, e.g. 90d or 12w\",\n )\n .option(\n \"-f, --format <format>\",\n `output: ${HISTORY_FORMATS.join(\" | \")}`,\n \"pretty\",\n )\n .addHelpText(\n \"after\",\n [\n \"\",\n \"Examples:\",\n \" manni cite history docs/limits.md # one page's stale windows\",\n \" manni cite history # every collection\",\n \" manni cite history -f json | jq .summary.staleSeconds\",\n \" manni cite history --newer-than 90d # the last quarter only\",\n ].join(\"\\n\"),\n )\n .action(async (paths: string[], options: HistoryCliOptions, command: Command) => {\n try {\n const format = options.format;\n if (!isHistoryFormat(format)) {\n throw new CiteError(\n `Unknown --format \"${format}\". Use ${COMMON_FORMAT_LIST}.`,\n );\n }\n const cwd = process.cwd();\n const run = await runHistory({\n inputs: paths,\n collection: options.collection,\n exts: options.ext ? splitList(options.ext) : undefined,\n exclude: options.exclude,\n as: options.as,\n ...configOption(options.config),\n onConfigLoaded: reportConfig(format === \"pretty\", cwd),\n allowEmpty: options.allowEmpty ? true : undefined,\n respectGitignore: explicitFalse(options.gitignore),\n onNotice: notice,\n root: options.root,\n newerThan: options.newerThan,\n });\n const text =\n format === \"json\"\n ? renderHistoryJson(run)\n : renderHistoryPretty(run, { color: colorFor(command, process.stdout.isTTY) });\n process.stdout.write(`${text}\\n`);\n // A report, not a gate: whatever the walk found, it exits 0.\n process.exitCode = 0;\n } catch (err) {\n fail(err);\n }\n });\n\n return program;\n}\n","/**\n * JUnit for `check`: meta's renderer over the adapted results, under the\n * `manni.cite` classname, with each failure's message the one the github\n * annotation carries.\n * Meta's renderer opens every message with the entry's JSON Pointer, `(root)`\n * for a finding about no entry, which says nothing about a citation. The\n * failure's `type` is already the rule id.\n */\nimport { renderJunit } from \"../../meta/index.js\";\nimport type { CheckRun } from \"../types.js\";\nimport { ENTRY_LABEL, withFindingMessages } from \"./sarif.js\";\n\n/** JUnit `classname` for the citation tool's findings. */\nexport const JUNIT_CLASSNAME = \"manni.cite\";\n\n/** A `message=\"` attribute's opening label. The value is escaped, so `message=\"` opens nothing else. */\nconst MESSAGE_LABEL = new RegExp(`message=\"${ENTRY_LABEL.source.replace(/^\\^/, \"\")}`, \"g\");\n\nexport function renderCheckJunit(run: CheckRun): string {\n return renderJunit(withFindingMessages(run), { frame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AAO,MAAM,GAAG,IAAI;AAAA,CAAI;AAEhC,cAAQ,WAAW;AAAA,IACrB,SAAS,KAAK;AACZ,WAAK,GAAG;AAAA,IACV;AAAA,EACF,CAAC;AAEH,SAAO;AACT;","names":["splitPageArgument","message"]}
1
+ {"version":3,"sources":["../src/cite/cli.ts","../src/cite/reporters/junit.ts"],"sourcesContent":["/**\n * The `cite` domain's commander program. Mounted by `src/cli.ts` under\n * `manni cite`; no entry point of its own. Grammar per proposal 0034: verbs are\n * `check`, `add`, `update`, `remove`, `history`; there is no default subcommand.\n *\n * Follows clig.dev as meta's does: primary output to stdout, diagnostics to\n * stderr, colour only on a TTY and never under `NO_COLOR`/`--no-color`, exit\n * `0` clean, `1` an error-severity finding, `2` operational/usage.\n */\nimport { Command, Option } 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 { splitPageArgument as splitSharedPageArgument } from \"../shared/pin.js\";\nimport { terminalConfirm } from \"../shared/prompt.js\";\nimport { fail } from \"../shared/run.js\";\nimport { notice } from \"../shared/warn.js\";\nimport {\n COMMON_FORMAT_LIST,\n OMITTED_WHEN_CLEAN,\n REPORT_FORMAT_LIST,\n STDIN_TOKEN,\n isMachineFormat,\n} from \"../meta/internal.js\";\nimport { REPORT_FORMATS, isReportFormat } from \"../meta/index.js\";\nimport { runAdd } from \"./commands/add.js\";\nimport { runCheck } from \"./commands/check.js\";\nimport { runHistory } from \"./commands/history.js\";\nimport { runRemove } from \"./commands/remove.js\";\nimport { runUpdate } from \"./commands/update.js\";\nimport { parseRepoFlags } from \"./core/config.js\";\nimport { CiteError, asCiteError } from \"./errors.js\";\nimport { spellSource } from \"./core/range.js\";\nimport { shortCommit, shortLine, shortPin, shortSrc } from \"./core/spell.js\";\nimport { renderCheckGithub } from \"./reporters/github.js\";\nimport { renderCheckJson, renderHistoryJson, renderRemoveJson, renderUpdateJson } from \"./reporters/json.js\";\nimport { renderCheckJunit } from \"./reporters/junit.js\";\nimport {\n renderCheckPretty,\n renderHistoryPretty,\n renderRemovePretty,\n renderUpdatePretty,\n} from \"./reporters/pretty.js\";\nimport { renderCheckSarif } from \"./reporters/sarif.js\";\nimport type { AddResult, PageLines } from \"./types.js\";\n\nconst UPDATE_FORMATS = [\"pretty\", \"json\"] as const;\ntype UpdateFormat = (typeof UPDATE_FORMATS)[number];\n/** The same two `update` has: a removal is a write, and writes report alike. */\nconst REMOVE_FORMATS = UPDATE_FORMATS;\ntype RemoveFormat = UpdateFormat;\n/** The same two again: a window is not a finding, so the finding sinks are left out. */\nconst HISTORY_FORMATS = UPDATE_FORMATS;\n\nfunction isHistoryFormat(value: string): value is UpdateFormat {\n return (HISTORY_FORMATS as readonly string[]).includes(value);\n}\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 */\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 `cite` program, wherever it is mounted. Not the root: under the\n * umbrella 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\nfunction isUpdateFormat(value: string): value is UpdateFormat {\n return (UPDATE_FORMATS as readonly string[]).includes(value);\n}\n\nfunction isRemoveFormat(value: string): value is RemoveFormat {\n return (REMOVE_FORMATS as readonly string[]).includes(value);\n}\n\n/**\n * Commander hands an `.action()` callback an untyped bag of option values, so\n * each subcommand declares the shape it actually reads. The `--no-<thing>`\n * flags are `boolean` and never `undefined`: commander supplies `true` when\n * the flag is absent, which is its default and not a choice, so only the\n * explicit `false` travels to the core (`explicitFalse`).\n */\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 an extractor. */\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 /** `--root <dir>`: where `src:` paths resolve from. */\n root?: string;\n}\n\ninterface CheckCliOptions extends InputCliOptions {\n /** `-f, --format <format>`. Always a string: the declaration has a default. */\n format: string;\n quiet?: boolean;\n /**\n * `--baseline [path]` / `--no-baseline`, the same three-state split as\n * `config`: absent leaves the config in charge, a string names a file, `true`\n * is a bare `--baseline` (the default path), `false` is `--no-baseline`.\n */\n baseline?: string | boolean;\n /** `--write-baseline [path]`; `true` for the bare flag. */\n writeBaseline?: string | boolean;\n /** `--no-check-sources`. */\n checkSources: boolean;\n showDiff?: boolean;\n reveal?: boolean;\n /** `--repo <name=dir>`, repeatable; commander's default value is `[]`. */\n repo: string[];\n}\n\ninterface AddCliOptions {\n id?: string;\n marker?: boolean;\n quote?: boolean;\n /** `--encrypt`. */\n encrypt?: boolean;\n /** `--no-commit-sha`. */\n commitSha: boolean;\n dryRun?: boolean;\n as?: string;\n root?: string;\n /** `--repo <name=dir>`, repeatable; commander's default value is `[]`. */\n repo: string[];\n config?: string | boolean;\n}\n\ninterface RemoveCliOptions extends Omit<InputCliOptions, \"root\"> {\n /** `--only <id>`, repeatable; commander's default value is `[]`. */\n only: string[];\n dryRun?: boolean;\n format: string;\n}\n\ninterface HistoryCliOptions extends InputCliOptions {\n /** `--newer-than <duration>`; the core parses it. */\n newerThan?: string;\n format: string;\n}\n\ninterface UpdateCliOptions extends InputCliOptions {\n /** `--no-check-sources`: declared so the refusal names the flag rather than commander rejecting it. */\n checkSources: boolean;\n accept?: boolean;\n recommit?: boolean;\n /** `--only <id>`, repeatable; commander's default value is `[]`. */\n only: string[];\n dryRun?: boolean;\n format: string;\n /** `--repo <name=dir>`, repeatable; commander's default value is `[]`. */\n repo: string[];\n}\n\n/**\n * Split `docs/limits.md:9` or `docs/limits.md:14-18` into the page and the\n * claim's lines, under cite's error contract. The parsing is the shared pin\n * engine's (`splitPageArgument` in `src/shared/pin.ts`).\n */\nexport function splitPageArgument(arg: string): { page: string; lines?: PageLines } {\n return asCiteError(() => splitSharedPageArgument(arg));\n}\n\n/** `line 9`, or `lines 14-18` for a range. */\nfunction spellAt(lines: PageLines, noun = \"line\"): string {\n return lines.start === lines.end\n ? `${noun} ${String(lines.start)}`\n : `${noun}s ${String(lines.start)}-${String(lines.end)}`;\n}\n\n/**\n * What `add` says on success. One sentence composed from the result: what was\n * added, where it went, and what each end is pinned to. Lines are the page's\n * own, after the write. The source is spelled as it was written to the page,\n * abbreviated when it is a ciphertext, and quoted with its first pinned line\n * where the result carries one.\n */\nexport function addMessage(result: AddResult): string {\n const { citation, claimLines } = result;\n const claim = citation.claim;\n const name = citation.id ?? (claim === undefined ? \"a bare pin\" : \"an entry\");\n const src = shortSrc(spellSource(citation.source));\n const commit = citation.source[\"commit-sha\"];\n const quoted = result.sourceLine === undefined ? \"\" : shortLine(result.sourceLine);\n const line = quoted === \"\" ? \"\" : ` \"${quoted}\"`;\n const pin = `${src}${line}, ${shortPin(citation.source.integrity)}, ${commit === undefined ? \"no commit\" : shortCommit(commit)}`;\n // Where it went: the page's own frontmatter, or the manifest that owns the\n // page's citations, at the line the entry now sits on.\n const where =\n result.manifest === undefined\n ? \"frontmatter\"\n : `${result.manifest.file}:${String(result.manifest.line)}`;\n const head = `${result.file}: added ${name} to ${where}`;\n\n if (result.markerLine !== undefined) {\n const at =\n claimLines === undefined ? \"\" : `, claim pinned at ${spellAt(claimLines)}`;\n const wrote = result.markerJoined === true ? \"joined the marker at line\" : \"marker at line\";\n const marked = `${head}; ${wrote} ${String(result.markerLine)}${at}`;\n if (claim === undefined) return marked;\n if (citation.quote === true) return `${marked} (a block that reproduces ${src})`;\n return `${marked} (${shortPin(claim.integrity)}; source ${pin})`;\n }\n if (claim === undefined || claimLines === undefined) {\n return `${head} (source ${pin})`;\n }\n if (citation.quote === true) {\n return `${head} (claim ${spellAt(claimLines, \"line\")}, a block that reproduces ${src})`;\n }\n return `${head} (claim at ${spellAt(claimLines)}, ${shortPin(claim.integrity)}; source ${pin})`;\n}\n\nexport function buildProgram(): Command {\n const program = new Command();\n program\n .name(\"cite\")\n .description(\n \"Track citations from doc claims to source lines and check them for drift.\",\n )\n .version(pkg.version, \"-V, --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)`.\n .exitOverride();\n\n program\n .command(\"check\")\n .description(\"Check every citation in the given pages against its source\")\n .argument(\n \"[paths...]\",\n \"files, directories, or globs to check (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 for every input\")\n .option(\n \"-f, --format <format>\",\n `output: ${REPORT_FORMATS.join(\" | \")}`,\n \"pretty\",\n )\n .option(\"-c, --config <path>\", \"path to a manni config file\")\n .option(\"--no-config\", \"ignore any discovered config file\")\n .option(\"-q, --quiet\", \"in pretty output, hide current citations and clean files\")\n .option(\"--allow-empty\", \"treat zero matched files as success\")\n .option(\"--no-gitignore\", \"check files .gitignore covers\")\n // No `defaultValue` and no `.preset()`, for the reasons meta's validate\n // gives: a bare flag must stay distinguishable from a typed path.\n .addOption(\n new Option(\n \"--baseline [path]\",\n \"compare against a baseline; fail only on findings not in it\",\n ),\n )\n .addOption(\n new Option(\n \"--write-baseline [path]\",\n \"record current findings as the baseline, then exit 0\",\n ),\n )\n .option(\"--no-baseline\", \"ignore a baseline configured by `baseline:`\")\n .option(\"--no-check-sources\", \"page-side rules only; every source status is skipped\")\n .option(\n \"--root <dir>\",\n \"directory src: paths resolve from (default: cite.root from config, else the git root, else the current directory)\",\n )\n .option(\n \"--repo <name=dir>\",\n \"a checkout an entry's source.repo may name, as name=dir relative to the current directory; repeatable; overrides cite.repos for that name\",\n collect,\n [],\n )\n .option(\"--show-diff\", \"in pretty output, print the diff and commit subjects for changed\")\n .option(\"--reveal\", \"in pretty output, print the decrypted path beside an encrypted source\")\n .addHelpText(\n \"after\",\n [\n \"\",\n \"Examples:\",\n \" manni cite check docs/ # walk a directory\",\n \" manni cite check --collection guides # one configured collection\",\n ' manni cite check \"docs/**/*.md\" -f github # CI annotations',\n \" manni cite check --show-diff docs/limits.md # see what changed\",\n \" manni cite check --baseline # fail only on new findings\",\n \" cat page.md | manni cite check - --as markdown\",\n ].join(\"\\n\"),\n )\n .action(async (paths: string[], options: CheckCliOptions, command: Command) => {\n try {\n const format = options.format;\n if (!isReportFormat(format)) {\n throw new CiteError(\n `Unknown --format \"${format}\". Use ${REPORT_FORMAT_LIST}.`,\n );\n }\n const exts = options.ext ? splitList(options.ext) : undefined;\n const stdinContent = paths.includes(STDIN_TOKEN) ? await readStdin() : undefined;\n const cwd = process.cwd();\n\n const run = await runCheck({\n inputs: paths,\n collection: options.collection,\n exts,\n exclude: options.exclude,\n as: options.as,\n ...configOption(options.config),\n onConfigLoaded: reportConfig(!isMachineFormat(format), cwd),\n stdinContent,\n // `undefined` rather than `false` when absent, so config still wins.\n allowEmpty: options.allowEmpty ? true : undefined,\n respectGitignore: explicitFalse(options.gitignore),\n onNotice: notice,\n baseline: options.baseline,\n writeBaseline: options.writeBaseline,\n checkSources: explicitFalse(options.checkSources),\n // Only so the run can say git is not there to give diffs; the diffs\n // themselves are the pretty reporter's.\n showDiff: options.showDiff ? true : undefined,\n root: options.root,\n repos: parseRepoFlags(options.repo, (message) => new CiteError(message)),\n });\n\n let text: string;\n switch (format) {\n case \"pretty\":\n text = renderCheckPretty(run, {\n color: colorFor(command, process.stdout.isTTY),\n quiet: Boolean(options.quiet),\n showDiff: Boolean(options.showDiff),\n reveal: Boolean(options.reveal),\n });\n break;\n case \"json\":\n text = renderCheckJson(run);\n break;\n case \"github\":\n text = renderCheckGithub(run);\n break;\n case \"sarif\":\n text = renderCheckSarif(run, { onNotice: notice });\n break;\n case \"junit\":\n text = renderCheckJunit(run);\n break;\n }\n // Only `github` may say nothing on a clean run; every other format\n // owes its envelope even when empty.\n if (text.length > 0 || !OMITTED_WHEN_CLEAN.has(format)) {\n process.stdout.write(`${text}\\n`);\n }\n // `failed` counts files with an unbaselined error-severity finding;\n // warnings never move it.\n process.exitCode = run.summary.failed > 0 ? 1 : 0;\n } catch (err) {\n fail(err);\n }\n });\n\n program\n .command(\"add\")\n .description(\"Mint a citation for a source range and write it to a page\")\n .argument(\n \"<page>\",\n \"the page to cite from, with the claim's lines: page:L or page:L1-L2 (use - for stdin, with --as)\",\n )\n .argument(\n \"<src>\",\n \"path, path:L or path:L1-L2 relative to --root, or repo:path with the same line forms for a checkout in cite.repos, or an encrypted ~source\",\n )\n .option(\"--id <id>\", \"kebab-case id, unique on the page; required with --marker\")\n .option(\"--marker\", \"write a cite <id> marker above the paragraph holding the page lines and pin the text it anchors\")\n .option(\"--quote\", \"the page lines are a fenced block that reproduces the source\")\n .option(\n \"--encrypt\",\n \"write source.file encrypted, with an hmac-sha256- pin; with no key, offer to create one (an available key encrypts without the flag)\",\n )\n .option(\"--no-commit-sha\", \"do not record HEAD\")\n .option(\"--dry-run\", \"print the diff; write nothing\")\n .option(\"--as <format>\", \"force the page format\")\n .option(\"--root <dir>\", \"directory source paths resolve from (as check)\")\n .option(\n \"--repo <name=dir>\",\n \"a checkout an entry's source.repo may name, as name=dir relative to the current directory; repeatable; overrides cite.repos for that name\",\n collect,\n [],\n )\n .option(\"-c, --config <path>\", \"path to a manni config file\")\n .option(\"--no-config\", \"ignore any discovered config file\")\n .addHelpText(\n \"after\",\n [\n \"\",\n \"Examples:\",\n \" manni cite add docs/limits.md:9 lib/limits.ts:2 --id fetch-timeout\",\n \" manni cite add docs/limits.md:30 lib/limits.ts:8-12 --id timeouts --marker\",\n \" manni cite add docs/limits.md:14-18 lib/limits.ts:1-3 --quote\",\n \" manni cite add docs/limits.md lib/limits.ts --dry-run\",\n \" cat page.md | manni cite add -:9 lib/limits.ts:2 --as markdown > out.md\",\n ].join(\"\\n\"),\n )\n .action(async (pageArgument: string, src: string, options: AddCliOptions) => {\n try {\n const { page, lines } = splitPageArgument(pageArgument);\n const usingStdin = page === STDIN_TOKEN;\n const stdinContent = usingStdin ? await readStdin() : undefined;\n const dryRun = Boolean(options.dryRun);\n const cwd = process.cwd();\n\n const result = await runAdd({\n page,\n pageLines: lines,\n src,\n id: options.id,\n marker: options.marker ? true : undefined,\n quote: options.quote ? true : undefined,\n // `undefined` when absent, so the key decides: an available one\n // encrypts without the flag.\n encrypt: options.encrypt ? true : undefined,\n commitSha: explicitFalse(options.commitSha),\n dryRun,\n as: options.as,\n ...configOption(options.config),\n // With `-` the page owns stdout; so does the diff under --dry-run.\n onConfigLoaded: reportConfig(!usingStdin && !dryRun, cwd),\n stdinContent,\n root: options.root,\n repos: parseRepoFlags(options.repo, (message) => new CiteError(message)),\n onNotice: notice,\n // Only on a terminal: off one, a missing key is a refusal, not a\n // question nobody can answer. With `-` stdin is the page, so no\n // question is put either.\n confirm: terminalConfirm(),\n });\n\n const message = addMessage(result);\n // A dry run prints every diff the write would make: the page's, and\n // the manifest's when the entry goes there.\n const diffs = [result.diff, result.manifest?.diff ?? \"\"].filter((d) => d.length > 0);\n if (usingStdin) {\n // The rewritten page owns stdout; everything else is a diagnostic.\n process.stdout.write(result.content);\n if (dryRun) for (const diff of diffs) process.stderr.write(`${diff}\\n`);\n process.stderr.write(`${message}\\n`);\n } else if (dryRun) {\n for (const diff of diffs) process.stdout.write(`${diff}\\n`);\n process.stderr.write(`${message}\\n`);\n } else {\n process.stdout.write(`${message}\\n`);\n }\n process.exitCode = 0;\n } catch (err) {\n fail(err);\n }\n });\n\n program\n .command(\"update\")\n .description(\"Rewrite moved citations in place; with --accept, re-mint changed ones\")\n .argument(\n \"[paths...]\",\n \"files, directories, or globs to update (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 for every input\")\n .option(\"-c, --config <path>\", \"path to a manni config file\")\n .option(\"--no-config\", \"ignore any discovered config file\")\n .option(\"--allow-empty\", \"treat zero matched files as success\")\n .option(\"--no-gitignore\", \"update files .gitignore covers\")\n .option(\"--no-check-sources\", \"refused: update needs the sources\")\n .option(\"--root <dir>\", \"directory src: paths resolve from (as check)\")\n .option(\n \"--repo <name=dir>\",\n \"a checkout an entry's source.repo may name, as name=dir relative to the current directory; repeatable; overrides cite.repos for that name\",\n collect,\n [],\n )\n .option(\"--accept\", \"re-mint changed and never-true entries at HEAD; prints old and new pins\")\n .option(\n \"--recommit\",\n \"re-record commit-sha to the commit where the pinned lines arrived on HEAD's history, where the recorded commit does not contain them or is outside that history\",\n )\n .option(\"--only <id>\", \"limit to entries with this id; repeatable\", collect, [])\n .option(\"--dry-run\", \"print the diffs; write nothing\")\n .option(\n \"-f, --format <format>\",\n `output: ${UPDATE_FORMATS.join(\" | \")}`,\n \"pretty\",\n )\n .addHelpText(\n \"after\",\n [\n \"\",\n \"Examples:\",\n \" manni cite update docs/ # rewrite moved entries\",\n \" manni cite update --accept --only fetch-timeout docs/limits.md\",\n \" manni cite update --dry-run docs/ # see the diffs first\",\n \" manni cite update --recommit docs/ # repair unsupported commit-sha\",\n ].join(\"\\n\"),\n )\n .action(async (paths: string[], options: UpdateCliOptions, command: Command) => {\n try {\n const format = options.format;\n if (!isUpdateFormat(format)) {\n throw new CiteError(\n `Unknown --format \"${format}\". Use ${COMMON_FORMAT_LIST}.`,\n );\n }\n if (!options.checkSources) {\n throw new CiteError(\n \"update needs the sources: drop --no-check-sources (or `checkSources: false`).\",\n );\n }\n const exts = options.ext ? splitList(options.ext) : undefined;\n const usingStdin = paths.includes(STDIN_TOKEN);\n const stdinContent = usingStdin ? await readStdin() : undefined;\n const dryRun = Boolean(options.dryRun);\n // With `-` the rewritten page owns stdout, as it does for `add -`; a\n // dry run prints the diffs instead, so the report keeps stdout.\n const pageToStdout = usingStdin && !dryRun;\n const cwd = process.cwd();\n\n const run = await runUpdate({\n inputs: paths,\n collection: options.collection,\n exts,\n exclude: options.exclude,\n as: options.as,\n ...configOption(options.config),\n onConfigLoaded: reportConfig(format === \"pretty\" && !pageToStdout, cwd),\n stdinContent,\n allowEmpty: options.allowEmpty ? true : undefined,\n respectGitignore: explicitFalse(options.gitignore),\n onNotice: notice,\n root: options.root,\n repos: parseRepoFlags(options.repo, (message) => new CiteError(message)),\n accept: options.accept ? true : undefined,\n recommit: options.recommit ? true : undefined,\n only: options.only.length > 0 ? options.only : undefined,\n dryRun,\n });\n\n const text =\n format === \"json\"\n ? renderUpdateJson(run)\n : renderUpdatePretty(run, {\n color: colorFor(command, process.stdout.isTTY),\n // The diffs are the point of a dry run; a real run prints\n // what it rewrote and leaves the file to say the rest.\n showDiff: dryRun,\n });\n const stdinPage = pageToStdout ? run.pages.find((page) => page.content !== undefined) : undefined;\n if (stdinPage?.content !== undefined) {\n process.stdout.write(stdinPage.content);\n process.stderr.write(`${text}\\n`);\n } else {\n process.stdout.write(`${text}\\n`);\n }\n // Exit 1 when something was skipped with an error-severity finding:\n // work left undone, `fill`'s precedent.\n process.exitCode = run.exitCode;\n } catch (err) {\n fail(err);\n }\n });\n\n program\n .command(\"remove\")\n .description(\"Remove the named citations from the given pages, markers and all\")\n .argument(\n \"[paths...]\",\n \"files, directories, or globs to remove from (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 for every input\")\n .option(\"-c, --config <path>\", \"path to a manni config file\")\n .option(\"--no-config\", \"ignore any discovered config file\")\n .option(\"--allow-empty\", \"treat zero matched files as success\")\n .option(\"--no-gitignore\", \"remove from files .gitignore covers\")\n .option(\n \"--only <id>\",\n \"the entry to remove, by id or by pointer (/citations/N); required, and repeatable\",\n collect,\n [],\n )\n .option(\"--dry-run\", \"print the diffs and the report; write nothing\")\n .option(\n \"-f, --format <format>\",\n `output: ${REMOVE_FORMATS.join(\" | \")}`,\n \"pretty\",\n )\n .addHelpText(\n \"after\",\n [\n \"\",\n \"Examples:\",\n \" manni cite remove docs/limits.md --only fetch-timeout\",\n \" manni cite remove docs/ --only fetch-timeout --only retries --dry-run\",\n \" manni cite remove --collection site --only /citations/3 -f json\",\n ].join(\"\\n\"),\n )\n .action(async (paths: string[], options: RemoveCliOptions, command: Command) => {\n try {\n const format = options.format;\n if (!isRemoveFormat(format)) {\n throw new CiteError(\n `Unknown --format \"${format}\". Use ${COMMON_FORMAT_LIST}.`,\n );\n }\n const exts = options.ext ? splitList(options.ext) : undefined;\n const usingStdin = paths.includes(STDIN_TOKEN);\n const stdinContent = usingStdin ? await readStdin() : undefined;\n const dryRun = Boolean(options.dryRun);\n // With `-` the rewritten page owns stdout, exactly as on `update -`.\n const pageToStdout = usingStdin && !dryRun;\n const cwd = process.cwd();\n\n const run = await runRemove({\n inputs: paths,\n collection: options.collection,\n exts,\n exclude: options.exclude,\n as: options.as,\n ...configOption(options.config),\n onConfigLoaded: reportConfig(format === \"pretty\" && !pageToStdout, cwd),\n stdinContent,\n allowEmpty: options.allowEmpty ? true : undefined,\n respectGitignore: explicitFalse(options.gitignore),\n onNotice: notice,\n only: options.only,\n dryRun,\n });\n\n const text =\n format === \"json\"\n ? renderRemoveJson(run)\n : renderRemovePretty(run, {\n color: colorFor(command, process.stdout.isTTY),\n // The diffs are the point of a dry run; a real run prints\n // what it removed and leaves the file to say the rest.\n showDiff: dryRun,\n dryRun,\n });\n const stdinPage = pageToStdout ? run.pages.find((page) => page.content !== undefined) : undefined;\n if (stdinPage?.content !== undefined) {\n process.stdout.write(stdinPage.content);\n process.stderr.write(`${text}\\n`);\n } else {\n process.stdout.write(`${text}\\n`);\n }\n // Everything named was removed, or previewed: there is no exit 1.\n process.exitCode = 0;\n } catch (err) {\n fail(err);\n }\n });\n\n program\n .command(\"history\")\n .description(\"Walk the git history and report how long each pin stood stale, and which releases shipped it\")\n .argument(\"[paths...]\", \"files, directories, or globs whose citations are walked\")\n .option(\n \"--collection <name>\",\n \"configured collection to walk; 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 the page format for every input\")\n .option(\"-c, --config <path>\", \"path to a manni config file\")\n .option(\"--no-config\", \"ignore any discovered config file\")\n .option(\"--allow-empty\", \"treat zero matched files as success\")\n .option(\"--no-gitignore\", \"walk pages .gitignore covers\")\n .option(\"--root <dir>\", \"directory src: paths resolve from (as check)\")\n .option(\n \"--newer-than <duration>\",\n \"walk only the commits within this span of HEAD's committer time, e.g. 90d or 12w\",\n )\n .option(\n \"-f, --format <format>\",\n `output: ${HISTORY_FORMATS.join(\" | \")}`,\n \"pretty\",\n )\n .addHelpText(\n \"after\",\n [\n \"\",\n \"Examples:\",\n \" manni cite history docs/limits.md # one page's stale windows\",\n \" manni cite history # every collection\",\n \" manni cite history -f json | jq .summary.staleSeconds\",\n \" manni cite history --newer-than 90d # the last quarter only\",\n ].join(\"\\n\"),\n )\n .action(async (paths: string[], options: HistoryCliOptions, command: Command) => {\n try {\n const format = options.format;\n if (!isHistoryFormat(format)) {\n throw new CiteError(\n `Unknown --format \"${format}\". Use ${COMMON_FORMAT_LIST}.`,\n );\n }\n const cwd = process.cwd();\n const run = await runHistory({\n inputs: paths,\n collection: options.collection,\n exts: options.ext ? splitList(options.ext) : undefined,\n exclude: options.exclude,\n as: options.as,\n ...configOption(options.config),\n onConfigLoaded: reportConfig(format === \"pretty\", cwd),\n allowEmpty: options.allowEmpty ? true : undefined,\n respectGitignore: explicitFalse(options.gitignore),\n onNotice: notice,\n root: options.root,\n newerThan: options.newerThan,\n });\n const text =\n format === \"json\"\n ? renderHistoryJson(run)\n : renderHistoryPretty(run, { color: colorFor(command, process.stdout.isTTY) });\n process.stdout.write(`${text}\\n`);\n // A report, not a gate: whatever the walk found, it exits 0.\n process.exitCode = 0;\n } catch (err) {\n fail(err);\n }\n });\n\n return program;\n}\n","/**\n * JUnit for `check`: meta's renderer over the adapted results, under the\n * `manni.cite` classname, with each failure's message the one the github\n * annotation carries.\n * Meta's renderer opens every message with the entry's JSON Pointer, `(root)`\n * for a finding about no entry, which says nothing about a citation. The\n * failure's `type` is already the rule id.\n */\nimport { renderJunit } from \"../../meta/index.js\";\nimport type { CheckRun } from \"../types.js\";\nimport { ENTRY_LABEL, withFindingMessages } from \"./sarif.js\";\n\n/** JUnit `classname` for the citation tool's findings. */\nexport const JUNIT_CLASSNAME = \"manni.cite\";\n\n/** A `message=\"` attribute's opening label. The value is escaped, so `message=\"` opens nothing else. */\nconst MESSAGE_LABEL = new RegExp(`message=\"${ENTRY_LABEL.source.replace(/^\\^/, \"\")}`, \"g\");\n\nexport function renderCheckJunit(run: CheckRun): string {\n return renderJunit(withFindingMessages(run), { frame: run.frame, classname: JUNIT_CLASSNAME }).replace(\n MESSAGE_LABEL,\n 'message=\"',\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,SAAS,SAAS,cAAc;;;ACIzB,IAAM,kBAAkB;AAG/B,IAAM,gBAAgB,IAAI,OAAO,YAAY,YAAY,OAAO,QAAQ,OAAO,EAAE,CAAC,IAAI,GAAG;AAElF,SAAS,iBAAiB,KAAuB;AACtD,SAAO,YAAY,oBAAoB,GAAG,GAAG,EAAE,OAAO,IAAI,OAAO,WAAW,gBAAgB,CAAC,EAAE;AAAA,IAC7F;AAAA,IACA;AAAA,EACF;AACF;;;AD8BA,IAAM,iBAAiB,CAAC,UAAU,MAAM;AAGxC,IAAM,iBAAiB;AAGvB,IAAM,kBAAkB;AAExB,SAAS,gBAAgB,OAAsC;AAC7D,SAAQ,gBAAsC,SAAS,KAAK;AAC9D;AASO,SAAS,SACd,SACA,OACA,KACS;AAGT,QAAM,UAAU,WAAW,OAAO,EAAE,KAAK,EAAE,UAAU;AACrD,SAAO,YAAY,EAAE,SAAS,OAAO,IAAI,CAAC;AAC5C;AAOA,SAAS,WAAW,SAA2B;AAC7C,WAAS,IAAoB,SAAS,MAAM,MAAM,IAAI,EAAE,QAAQ;AAC9D,QAAI,EAAE,QAAQ,KAAK,CAAC,MAAM,EAAE,SAAS,YAAY,EAAG,QAAO;AAAA,EAC7D;AACA,SAAO;AACT;AAEA,SAAS,eAAe,OAAsC;AAC5D,SAAQ,eAAqC,SAAS,KAAK;AAC7D;AAEA,SAAS,eAAe,OAAsC;AAC5D,SAAQ,eAAqC,SAAS,KAAK;AAC7D;AAkGO,SAASA,mBAAkB,KAAkD;AAClF,SAAO,YAAY,MAAM,kBAAwB,GAAG,CAAC;AACvD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