@hawkeyexl/manni 4.13.0 → 4.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (293) hide show
  1. package/README.md +1 -1
  2. package/dist/batch-OMDKRGUE.js +48 -0
  3. package/dist/build-YCY5MUHA.js +37 -0
  4. package/dist/calibrate-RN2NJ4FS.js +43 -0
  5. package/dist/capture-2WYROZKA.js +39 -0
  6. package/dist/check-KRVWHF7E.js +33 -0
  7. package/dist/{check-NBN2YK2J.js → check-LVUTWAGR.js} +33 -32
  8. package/dist/{check-NBN2YK2J.js.map → check-LVUTWAGR.js.map} +1 -1
  9. package/dist/check-MR7IG7IP.js +36 -0
  10. package/dist/{check-LU5YC3L4.js → check-OIRJ6OBW.js} +15 -14
  11. package/dist/{chunk-J5NOWIJ3.js → chunk-3CSEHHKB.js} +14 -8
  12. package/dist/{chunk-J5NOWIJ3.js.map → chunk-3CSEHHKB.js.map} +1 -1
  13. package/dist/{chunk-7RNONVHI.js → chunk-3EJVJDMX.js} +9 -9
  14. package/dist/{chunk-LSFXNAHU.js → chunk-3WQMMLIO.js} +129 -59
  15. package/dist/chunk-3WQMMLIO.js.map +1 -0
  16. package/dist/{chunk-OREHJQNN.js → chunk-46OWIAAX.js} +5 -4
  17. package/dist/{chunk-OREHJQNN.js.map → chunk-46OWIAAX.js.map} +1 -1
  18. package/dist/{chunk-LNGSE7V2.js → chunk-476DMDJ5.js} +132 -27
  19. package/dist/chunk-476DMDJ5.js.map +1 -0
  20. package/dist/{chunk-EQ7E6HMG.js → chunk-4MYW2D2U.js} +14 -16
  21. package/dist/chunk-4MYW2D2U.js.map +1 -0
  22. package/dist/{chunk-NTEYYYKL.js → chunk-525KMBZS.js} +16 -22
  23. package/dist/chunk-525KMBZS.js.map +1 -0
  24. package/dist/{chunk-HIEGOW7X.js → chunk-57DHX65T.js} +5 -79
  25. package/dist/chunk-57DHX65T.js.map +1 -0
  26. package/dist/{chunk-PCE7QHXJ.js → chunk-5D24C6WM.js} +6 -1
  27. package/dist/chunk-5D24C6WM.js.map +1 -0
  28. package/dist/{chunk-DQOM3DEU.js → chunk-6DYFWAZA.js} +563 -359
  29. package/dist/chunk-6DYFWAZA.js.map +1 -0
  30. package/dist/{chunk-CU57HT2E.js → chunk-6WJUZQQX.js} +2 -2
  31. package/dist/chunk-7EKXSSEO.js +81 -0
  32. package/dist/chunk-7EKXSSEO.js.map +1 -0
  33. package/dist/{chunk-ULDV2LUI.js → chunk-7SVFBJBE.js} +10 -4
  34. package/dist/chunk-7SVFBJBE.js.map +1 -0
  35. package/dist/{chunk-QKT67PFE.js → chunk-7XHW5DZA.js} +9 -9
  36. package/dist/{chunk-TDCOKKMI.js → chunk-AL4HRKSZ.js} +3 -3
  37. package/dist/{chunk-OTJOBZJ5.js → chunk-B2242FYO.js} +2 -1
  38. package/dist/chunk-B2242FYO.js.map +1 -0
  39. package/dist/chunk-BREAC43H.js +85 -0
  40. package/dist/chunk-BREAC43H.js.map +1 -0
  41. package/dist/{chunk-HKTGHLBA.js → chunk-C37OVJ35.js} +2 -2
  42. package/dist/{chunk-HKTGHLBA.js.map → chunk-C37OVJ35.js.map} +1 -1
  43. package/dist/{chunk-YQV75FIL.js → chunk-CFMI74TP.js} +3 -3
  44. package/dist/{chunk-BMBAAPGN.js → chunk-CWGBRWP7.js} +33 -18
  45. package/dist/chunk-CWGBRWP7.js.map +1 -0
  46. package/dist/chunk-DN4LCWSA.js +83 -0
  47. package/dist/chunk-DN4LCWSA.js.map +1 -0
  48. package/dist/{chunk-JEUFYSFQ.js → chunk-DW22KCLN.js} +118 -75
  49. package/dist/chunk-DW22KCLN.js.map +1 -0
  50. package/dist/{chunk-PCGBXHSE.js → chunk-FEEO7ET6.js} +5 -5
  51. package/dist/{chunk-CODWRUAD.js → chunk-FYWQS35G.js} +7 -5
  52. package/dist/chunk-FYWQS35G.js.map +1 -0
  53. package/dist/{chunk-3O6U4ICM.js → chunk-GLQCSDFS.js} +3 -3
  54. package/dist/{chunk-BQXY76JB.js → chunk-GUTAKJIF.js} +148 -92
  55. package/dist/chunk-GUTAKJIF.js.map +1 -0
  56. package/dist/{chunk-WVXCN5DS.js → chunk-GZHBMMDC.js} +78 -14
  57. package/dist/chunk-GZHBMMDC.js.map +1 -0
  58. package/dist/{chunk-52WO7ESI.js → chunk-IE5PXI6M.js} +6 -5
  59. package/dist/chunk-IE5PXI6M.js.map +1 -0
  60. package/dist/{chunk-ZXRAE55H.js → chunk-IGRXQC3H.js} +2 -2
  61. package/dist/{chunk-U6IHLEWT.js → chunk-JCTHXG33.js} +2 -2
  62. package/dist/{chunk-NSAW7U42.js → chunk-JHE3CYWS.js} +58 -10
  63. package/dist/chunk-JHE3CYWS.js.map +1 -0
  64. package/dist/{chunk-6ZFJWUUH.js → chunk-JNMY7KZG.js} +2 -2
  65. package/dist/chunk-JQPZKWIP.js +76 -0
  66. package/dist/chunk-JQPZKWIP.js.map +1 -0
  67. package/dist/{chunk-OBXCJZ6R.js → chunk-JTATFPWB.js} +28 -17
  68. package/dist/chunk-JTATFPWB.js.map +1 -0
  69. package/dist/{chunk-3HUCB4Z3.js → chunk-JULE3EU3.js} +10 -7
  70. package/dist/chunk-JULE3EU3.js.map +1 -0
  71. package/dist/{chunk-TQ3W6RKG.js → chunk-KCXQXKOL.js} +3 -3
  72. package/dist/{chunk-VYBYUQIP.js → chunk-KN37BXVY.js} +88 -7
  73. package/dist/chunk-KN37BXVY.js.map +1 -0
  74. package/dist/{chunk-OUAH7XF2.js → chunk-MAOX3524.js} +2 -2
  75. package/dist/chunk-MC7U5IH4.js +126 -0
  76. package/dist/chunk-MC7U5IH4.js.map +1 -0
  77. package/dist/{chunk-OYIWF3B2.js → chunk-NIQ2JSZO.js} +29 -20
  78. package/dist/chunk-NIQ2JSZO.js.map +1 -0
  79. package/dist/{chunk-HY6ROJTH.js → chunk-OFOIBV5J.js} +86 -10
  80. package/dist/chunk-OFOIBV5J.js.map +1 -0
  81. package/dist/{chunk-TZOYZK2E.js → chunk-OZUPJB4J.js} +2 -2
  82. package/dist/{chunk-N6A6DJUO.js → chunk-Q2VOXKAQ.js} +6 -7
  83. package/dist/chunk-Q2VOXKAQ.js.map +1 -0
  84. package/dist/{chunk-GWI6JPTT.js → chunk-Q62Q7CDI.js} +88 -8
  85. package/dist/chunk-Q62Q7CDI.js.map +1 -0
  86. package/dist/{chunk-PA7CMQGD.js → chunk-QDO5JFFV.js} +11 -5
  87. package/dist/chunk-QDO5JFFV.js.map +1 -0
  88. package/dist/{chunk-VNYXK7TM.js → chunk-QEJ4GH25.js} +8 -8
  89. package/dist/chunk-QEJ4GH25.js.map +1 -0
  90. package/dist/chunk-QK6VYJHV.js +26 -0
  91. package/dist/chunk-QK6VYJHV.js.map +1 -0
  92. package/dist/chunk-QS2Z3SWL.js +21 -0
  93. package/dist/chunk-QS2Z3SWL.js.map +1 -0
  94. package/dist/{chunk-NWUXRV6N.js → chunk-QS3K57OJ.js} +10 -8
  95. package/dist/chunk-QS3K57OJ.js.map +1 -0
  96. package/dist/{chunk-OKMTUAWO.js → chunk-QSPH4F56.js} +5 -5
  97. package/dist/{chunk-3XGTNN3M.js → chunk-RGRNAQG5.js} +12 -124
  98. package/dist/chunk-RGRNAQG5.js.map +1 -0
  99. package/dist/{chunk-E6BVUDGY.js → chunk-SLGCRXHM.js} +4 -4
  100. package/dist/{chunk-KE2F7QES.js → chunk-SVF3WCC7.js} +6 -6
  101. package/dist/{chunk-IGQMBHFY.js → chunk-T62SFCQY.js} +88 -12
  102. package/dist/chunk-T62SFCQY.js.map +1 -0
  103. package/dist/{chunk-SCLXVTFZ.js → chunk-TKINOTVS.js} +1 -1
  104. package/dist/chunk-TKINOTVS.js.map +1 -0
  105. package/dist/{chunk-VOXOBUTX.js → chunk-TXZJESES.js} +5 -5
  106. package/dist/chunk-UPUJJOKB.js +236 -0
  107. package/dist/chunk-UPUJJOKB.js.map +1 -0
  108. package/dist/{chunk-7JPL3CUC.js → chunk-URGALOZY.js} +2 -2
  109. package/dist/{chunk-X4MPUD4B.js → chunk-UVLQRP6O.js} +53 -13
  110. package/dist/chunk-UVLQRP6O.js.map +1 -0
  111. package/dist/{chunk-CWXZ2MRT.js → chunk-VHJ72YCD.js} +4 -3
  112. package/dist/chunk-VHJ72YCD.js.map +1 -0
  113. package/dist/{chunk-PAU352SV.js → chunk-W4GTMOJW.js} +2 -2
  114. package/dist/{chunk-SE4JN5XN.js → chunk-WDENIUC7.js} +3 -1
  115. package/dist/chunk-WDENIUC7.js.map +1 -0
  116. package/dist/{chunk-3BVDFQ6Y.js → chunk-Y3GWQBJP.js} +5 -5
  117. package/dist/{chunk-YZ4TJLZQ.js → chunk-YT5HKJWV.js} +497 -18
  118. package/dist/chunk-YT5HKJWV.js.map +1 -0
  119. package/dist/{chunk-UQMLCIRX.js → chunk-Z6PZKXSP.js} +6 -6
  120. package/dist/{chunk-JUL2PRQN.js → chunk-ZC2MZZR5.js} +207 -79
  121. package/dist/chunk-ZC2MZZR5.js.map +1 -0
  122. package/dist/{chunk-UKZNLVJW.js → chunk-ZINZTHWO.js} +4 -2
  123. package/dist/chunk-ZINZTHWO.js.map +1 -0
  124. package/dist/{cli-4JHQCPHU.js → cli-33E3B2FK.js} +3 -3
  125. package/dist/{cli-G66X7YMP.js → cli-7JV4RM66.js} +23 -22
  126. package/dist/{cli-G66X7YMP.js.map → cli-7JV4RM66.js.map} +1 -1
  127. package/dist/{cli-L5B2RVV2.js → cli-B4DTJ2KC.js} +31 -29
  128. package/dist/{cli-L5B2RVV2.js.map → cli-B4DTJ2KC.js.map} +1 -1
  129. package/dist/{cli-ECVT4YXR.js → cli-D4WXCDTS.js} +20 -19
  130. package/dist/{cli-ECVT4YXR.js.map → cli-D4WXCDTS.js.map} +1 -1
  131. package/dist/{cli-7DETHSNW.js → cli-DDLLZHZW.js} +90 -84
  132. package/dist/cli-DDLLZHZW.js.map +1 -0
  133. package/dist/{cli-KYTCJYXK.js → cli-EVACAD7K.js} +317 -28
  134. package/dist/cli-EVACAD7K.js.map +1 -0
  135. package/dist/{cli-H5LVGOVT.js → cli-LIKI7WPR.js} +384 -248
  136. package/dist/cli-LIKI7WPR.js.map +1 -0
  137. package/dist/{cli-AZKWTCFV.js → cli-MWUFAS2X.js} +11 -11
  138. package/dist/{cli-DGFLJ2DD.js → cli-OKPRTVG6.js} +69 -26
  139. package/dist/cli-OKPRTVG6.js.map +1 -0
  140. package/dist/{cli-RP5E7XHC.js → cli-QEPVGLQ3.js} +20 -18
  141. package/dist/{cli-RP5E7XHC.js.map → cli-QEPVGLQ3.js.map} +1 -1
  142. package/dist/{cli-BW5VOFOZ.js → cli-VP6JTPFS.js} +11 -10
  143. package/dist/{cli-BW5VOFOZ.js.map → cli-VP6JTPFS.js.map} +1 -1
  144. package/dist/cli.js +14 -14
  145. package/dist/{config-JJW75SBX.js → config-7I5CHHRZ.js} +6 -6
  146. package/dist/docmeta.js +10 -10
  147. package/dist/github-DV57TW5L.js +32 -0
  148. package/dist/github-SGX2EARO.js +36 -0
  149. package/dist/graph/runtime.js.map +1 -1
  150. package/dist/index.d.ts +222 -45
  151. package/dist/index.js +138 -132
  152. package/dist/index.js.map +1 -1
  153. package/dist/{json-7WV7KL6H.js → json-5EQCGVCV.js} +4 -2
  154. package/dist/{json-LCVPMEAM.js → json-SHPUCD64.js} +15 -13
  155. package/dist/{labels-OQXBVM4A.js → labels-3GCGYYV3.js} +14 -12
  156. package/dist/{labels-OQXBVM4A.js.map → labels-3GCGYYV3.js.map} +1 -1
  157. package/dist/lint-RE4DMI6E.js +35 -0
  158. package/dist/list-F56MEJXR.js +36 -0
  159. package/dist/list-ZR3KY556.js +34 -0
  160. package/dist/{page-XPX5XJZE.js → page-G7XSO4FD.js} +13 -12
  161. package/dist/{picker-3XF36MJF.js → picker-FPUC5UGM.js} +3 -3
  162. package/dist/{prepare-VMBIQYAM.js → prepare-WHMWP7BG.js} +21 -20
  163. package/dist/{prepare-VMBIQYAM.js.map → prepare-WHMWP7BG.js.map} +1 -1
  164. package/dist/{pretty-KSTZMBUF.js → pretty-VTJVXWRK.js} +15 -13
  165. package/dist/{pretty-KG6TMOEI.js → pretty-YVRRWBWN.js} +23 -16
  166. package/dist/{provider-LBX4IXGX.js → provider-JY2I3VLF.js} +3 -3
  167. package/dist/{release-VV3UTKE5.js → release-Z3ASYZ3S.js} +3 -3
  168. package/dist/{reporters-26H3N2KW.js → reporters-FSXJ42EB.js} +6 -5
  169. package/dist/{reporters-AQU4W3KY.js → reporters-G5R4SURQ.js} +6 -6
  170. package/dist/{reporters-FBYLPKD4.js → reporters-MHPY4HRA.js} +15 -14
  171. package/dist/run-FSYOYEPR.js +39 -0
  172. package/dist/sarif-HBQIDY7T.js +31 -0
  173. package/dist/sarif-RRUFJZUL.js +37 -0
  174. package/dist/{term-SI3VM6EM.js → term-ABHGACYE.js} +58 -109
  175. package/dist/term-ABHGACYE.js.map +1 -0
  176. package/dist/types-VMOT7RAL.js +12 -0
  177. package/dist/types-VMOT7RAL.js.map +1 -0
  178. package/dist/{validate-NQO7TFSN.js → validate-DXYUUGUD.js} +6 -6
  179. package/dist/validate-DXYUUGUD.js.map +1 -0
  180. package/package.json +1 -1
  181. package/plugin/manni/.claude-plugin/plugin.json +1 -1
  182. package/plugin/manni/skills/check/SKILL.md +2 -2
  183. package/plugin/manni/skills/evals/SKILL.md +1 -1
  184. package/plugin/manni/skills/fix/SKILL.md +95 -16
  185. package/plugin/manni/skills/setup/SKILL.md +1 -1
  186. package/shapes/graph/shapes-1.1.1.ttl +953 -0
  187. package/dist/batch-OB2FXT47.js +0 -46
  188. package/dist/build-4BL24BG3.js +0 -36
  189. package/dist/calibrate-AEDJ7N7G.js +0 -41
  190. package/dist/capture-TP3P4YNL.js +0 -38
  191. package/dist/check-5IYH42KS.js +0 -34
  192. package/dist/check-S55MH66H.js +0 -30
  193. package/dist/chunk-3HUCB4Z3.js.map +0 -1
  194. package/dist/chunk-3XGTNN3M.js.map +0 -1
  195. package/dist/chunk-52WO7ESI.js.map +0 -1
  196. package/dist/chunk-BMBAAPGN.js.map +0 -1
  197. package/dist/chunk-BQXY76JB.js.map +0 -1
  198. package/dist/chunk-CODWRUAD.js.map +0 -1
  199. package/dist/chunk-CWXZ2MRT.js.map +0 -1
  200. package/dist/chunk-DQOM3DEU.js.map +0 -1
  201. package/dist/chunk-EQ7E6HMG.js.map +0 -1
  202. package/dist/chunk-GWI6JPTT.js.map +0 -1
  203. package/dist/chunk-HIEGOW7X.js.map +0 -1
  204. package/dist/chunk-HY6ROJTH.js.map +0 -1
  205. package/dist/chunk-IGQMBHFY.js.map +0 -1
  206. package/dist/chunk-JEUFYSFQ.js.map +0 -1
  207. package/dist/chunk-JUL2PRQN.js.map +0 -1
  208. package/dist/chunk-LNGSE7V2.js.map +0 -1
  209. package/dist/chunk-LSFXNAHU.js.map +0 -1
  210. package/dist/chunk-MNH7QO4Z.js +0 -15
  211. package/dist/chunk-MNH7QO4Z.js.map +0 -1
  212. package/dist/chunk-N6A6DJUO.js.map +0 -1
  213. package/dist/chunk-NSAW7U42.js.map +0 -1
  214. package/dist/chunk-NTEYYYKL.js.map +0 -1
  215. package/dist/chunk-NWUXRV6N.js.map +0 -1
  216. package/dist/chunk-OBXCJZ6R.js.map +0 -1
  217. package/dist/chunk-OTJOBZJ5.js.map +0 -1
  218. package/dist/chunk-OYIWF3B2.js.map +0 -1
  219. package/dist/chunk-PA7CMQGD.js.map +0 -1
  220. package/dist/chunk-PCE7QHXJ.js.map +0 -1
  221. package/dist/chunk-SCLXVTFZ.js.map +0 -1
  222. package/dist/chunk-SE4JN5XN.js.map +0 -1
  223. package/dist/chunk-UKZNLVJW.js.map +0 -1
  224. package/dist/chunk-ULDV2LUI.js.map +0 -1
  225. package/dist/chunk-VNYXK7TM.js.map +0 -1
  226. package/dist/chunk-VYBYUQIP.js.map +0 -1
  227. package/dist/chunk-WVXCN5DS.js.map +0 -1
  228. package/dist/chunk-X4MPUD4B.js.map +0 -1
  229. package/dist/chunk-Y6M4JFKG.js +0 -117
  230. package/dist/chunk-Y6M4JFKG.js.map +0 -1
  231. package/dist/chunk-YZ4TJLZQ.js.map +0 -1
  232. package/dist/cli-7DETHSNW.js.map +0 -1
  233. package/dist/cli-DGFLJ2DD.js.map +0 -1
  234. package/dist/cli-H5LVGOVT.js.map +0 -1
  235. package/dist/cli-KYTCJYXK.js.map +0 -1
  236. package/dist/github-DJQ4MWNZ.js +0 -35
  237. package/dist/github-UWTDM2J2.js +0 -30
  238. package/dist/lint-O7XRHKFP.js +0 -34
  239. package/dist/list-OOOCLOAL.js +0 -35
  240. package/dist/list-OYQ5XPN2.js +0 -32
  241. package/dist/run-KUGTU3TT.js +0 -37
  242. package/dist/term-SI3VM6EM.js.map +0 -1
  243. package/dist/types-Y6TXHM7M.js +0 -10
  244. /package/dist/{batch-OB2FXT47.js.map → batch-OMDKRGUE.js.map} +0 -0
  245. /package/dist/{build-4BL24BG3.js.map → build-YCY5MUHA.js.map} +0 -0
  246. /package/dist/{calibrate-AEDJ7N7G.js.map → calibrate-RN2NJ4FS.js.map} +0 -0
  247. /package/dist/{capture-TP3P4YNL.js.map → capture-2WYROZKA.js.map} +0 -0
  248. /package/dist/{check-5IYH42KS.js.map → check-KRVWHF7E.js.map} +0 -0
  249. /package/dist/{check-LU5YC3L4.js.map → check-MR7IG7IP.js.map} +0 -0
  250. /package/dist/{check-S55MH66H.js.map → check-OIRJ6OBW.js.map} +0 -0
  251. /package/dist/{chunk-7RNONVHI.js.map → chunk-3EJVJDMX.js.map} +0 -0
  252. /package/dist/{chunk-CU57HT2E.js.map → chunk-6WJUZQQX.js.map} +0 -0
  253. /package/dist/{chunk-QKT67PFE.js.map → chunk-7XHW5DZA.js.map} +0 -0
  254. /package/dist/{chunk-TDCOKKMI.js.map → chunk-AL4HRKSZ.js.map} +0 -0
  255. /package/dist/{chunk-YQV75FIL.js.map → chunk-CFMI74TP.js.map} +0 -0
  256. /package/dist/{chunk-PCGBXHSE.js.map → chunk-FEEO7ET6.js.map} +0 -0
  257. /package/dist/{chunk-3O6U4ICM.js.map → chunk-GLQCSDFS.js.map} +0 -0
  258. /package/dist/{chunk-ZXRAE55H.js.map → chunk-IGRXQC3H.js.map} +0 -0
  259. /package/dist/{chunk-U6IHLEWT.js.map → chunk-JCTHXG33.js.map} +0 -0
  260. /package/dist/{chunk-6ZFJWUUH.js.map → chunk-JNMY7KZG.js.map} +0 -0
  261. /package/dist/{chunk-TQ3W6RKG.js.map → chunk-KCXQXKOL.js.map} +0 -0
  262. /package/dist/{chunk-OUAH7XF2.js.map → chunk-MAOX3524.js.map} +0 -0
  263. /package/dist/{chunk-TZOYZK2E.js.map → chunk-OZUPJB4J.js.map} +0 -0
  264. /package/dist/{chunk-OKMTUAWO.js.map → chunk-QSPH4F56.js.map} +0 -0
  265. /package/dist/{chunk-E6BVUDGY.js.map → chunk-SLGCRXHM.js.map} +0 -0
  266. /package/dist/{chunk-KE2F7QES.js.map → chunk-SVF3WCC7.js.map} +0 -0
  267. /package/dist/{chunk-VOXOBUTX.js.map → chunk-TXZJESES.js.map} +0 -0
  268. /package/dist/{chunk-7JPL3CUC.js.map → chunk-URGALOZY.js.map} +0 -0
  269. /package/dist/{chunk-PAU352SV.js.map → chunk-W4GTMOJW.js.map} +0 -0
  270. /package/dist/{chunk-3BVDFQ6Y.js.map → chunk-Y3GWQBJP.js.map} +0 -0
  271. /package/dist/{chunk-UQMLCIRX.js.map → chunk-Z6PZKXSP.js.map} +0 -0
  272. /package/dist/{cli-4JHQCPHU.js.map → cli-33E3B2FK.js.map} +0 -0
  273. /package/dist/{cli-AZKWTCFV.js.map → cli-MWUFAS2X.js.map} +0 -0
  274. /package/dist/{config-JJW75SBX.js.map → config-7I5CHHRZ.js.map} +0 -0
  275. /package/dist/{github-DJQ4MWNZ.js.map → github-DV57TW5L.js.map} +0 -0
  276. /package/dist/{github-UWTDM2J2.js.map → github-SGX2EARO.js.map} +0 -0
  277. /package/dist/{json-7WV7KL6H.js.map → json-5EQCGVCV.js.map} +0 -0
  278. /package/dist/{json-LCVPMEAM.js.map → json-SHPUCD64.js.map} +0 -0
  279. /package/dist/{lint-O7XRHKFP.js.map → lint-RE4DMI6E.js.map} +0 -0
  280. /package/dist/{list-OOOCLOAL.js.map → list-F56MEJXR.js.map} +0 -0
  281. /package/dist/{list-OYQ5XPN2.js.map → list-ZR3KY556.js.map} +0 -0
  282. /package/dist/{page-XPX5XJZE.js.map → page-G7XSO4FD.js.map} +0 -0
  283. /package/dist/{picker-3XF36MJF.js.map → picker-FPUC5UGM.js.map} +0 -0
  284. /package/dist/{pretty-KG6TMOEI.js.map → pretty-VTJVXWRK.js.map} +0 -0
  285. /package/dist/{pretty-KSTZMBUF.js.map → pretty-YVRRWBWN.js.map} +0 -0
  286. /package/dist/{provider-LBX4IXGX.js.map → provider-JY2I3VLF.js.map} +0 -0
  287. /package/dist/{release-VV3UTKE5.js.map → release-Z3ASYZ3S.js.map} +0 -0
  288. /package/dist/{reporters-26H3N2KW.js.map → reporters-FSXJ42EB.js.map} +0 -0
  289. /package/dist/{reporters-AQU4W3KY.js.map → reporters-G5R4SURQ.js.map} +0 -0
  290. /package/dist/{reporters-FBYLPKD4.js.map → reporters-MHPY4HRA.js.map} +0 -0
  291. /package/dist/{run-KUGTU3TT.js.map → run-FSYOYEPR.js.map} +0 -0
  292. /package/dist/{types-Y6TXHM7M.js.map → sarif-HBQIDY7T.js.map} +0 -0
  293. /package/dist/{validate-NQO7TFSN.js.map → sarif-RRUFJZUL.js.map} +0 -0
@@ -9,10 +9,12 @@ import {
9
9
  misplacedMarkers,
10
10
  misplacedMessageFor,
11
11
  movedUnit,
12
+ remedyFor,
12
13
  shortCommit,
13
14
  toValidationResult,
14
- unitText
15
- } from "./chunk-WVXCN5DS.js";
15
+ unitText,
16
+ withRemedy
17
+ } from "./chunk-GZHBMMDC.js";
16
18
  import {
17
19
  ANY_FENCE,
18
20
  CITE_RULES,
@@ -21,6 +23,7 @@ import {
21
23
  anchoredLines,
22
24
  fenceSpanAt,
23
25
  formatSrc,
26
+ guidanceFor,
24
27
  isCiteRule,
25
28
  isMarkerLine,
26
29
  parseSrc,
@@ -31,7 +34,7 @@ import {
31
34
  sliceLines,
32
35
  sourceRange,
33
36
  spellSource
34
- } from "./chunk-X4MPUD4B.js";
37
+ } from "./chunk-UVLQRP6O.js";
35
38
  import {
36
39
  MAX_RANGE_LINES,
37
40
  MOVE_BUDGET_BYTES,
@@ -54,7 +57,7 @@ import {
54
57
  spellLines,
55
58
  splitLines,
56
59
  toBodyLines
57
- } from "./chunk-LNGSE7V2.js";
60
+ } from "./chunk-476DMDJ5.js";
58
61
  import {
59
62
  STDIN_LABEL,
60
63
  STDIN_TOKEN,
@@ -68,7 +71,7 @@ import {
68
71
  resolveTargetSet,
69
72
  settleBaseline,
70
73
  supportedExtensions
71
- } from "./chunk-HY6ROJTH.js";
74
+ } from "./chunk-OFOIBV5J.js";
72
75
  import {
73
76
  SEVERITIES
74
77
  } from "./chunk-77AINBYM.js";
@@ -82,7 +85,7 @@ import {
82
85
  pageManifestPath,
83
86
  readConfigFile,
84
87
  selectCollections
85
- } from "./chunk-OTJOBZJ5.js";
88
+ } from "./chunk-B2242FYO.js";
86
89
  import {
87
90
  warn
88
91
  } from "./chunk-HX44GB4Z.js";
@@ -92,6 +95,301 @@ import { existsSync as existsSync2 } from "node:fs";
92
95
  import { readFile as readFile2 } from "node:fs/promises";
93
96
  import { resolve as resolve3 } from "node:path";
94
97
 
98
+ // src/cite/core/history.ts
99
+ var MAX_PAGE_COMMITS = 256;
100
+ function stripMarkers(lines, format) {
101
+ return lines.filter((line) => !isMarkerLine(line, format));
102
+ }
103
+ function claimWords(lines, format) {
104
+ return stripMarkers(lines, format).join(" ").replace(/\s+/g, " ").trim();
105
+ }
106
+ function sentencesOf(text) {
107
+ return text.split(/(?<=[.!?])\s+/).map((sentence) => sentence.replace(/\s+/g, " ").trim().toLowerCase()).filter((sentence) => sentence !== "");
108
+ }
109
+ function sharesSentence(a, b) {
110
+ const left = new Set(sentencesOf(a));
111
+ return sentencesOf(b).some((sentence) => left.has(sentence));
112
+ }
113
+ function wordSet(text) {
114
+ return new Set(
115
+ text.toLowerCase().split(/\s+/).filter((word) => word !== "")
116
+ );
117
+ }
118
+ function wordShare(was, now) {
119
+ const left = wordSet(was);
120
+ if (left.size === 0) return 1;
121
+ const right = wordSet(now);
122
+ let held = 0;
123
+ for (const word of left) if (right.has(word)) held++;
124
+ return held / left.size;
125
+ }
126
+ function holdsWords(outer, inner) {
127
+ if (inner === "") return true;
128
+ if (outer === inner) return true;
129
+ if (outer.startsWith(`${inner} `)) return true;
130
+ if (outer.endsWith(` ${inner}`)) return true;
131
+ return outer.includes(` ${inner} `);
132
+ }
133
+ function runsHolding(lines, format, bodyLine, inner) {
134
+ if (inner === "") return [];
135
+ let text = "";
136
+ const at = [];
137
+ for (let n = Math.max(bodyLine, 1); n <= lines.length; n++) {
138
+ const line = lines[n - 1] ?? "";
139
+ if (isMarkerLine(line, format)) continue;
140
+ const words = line.replace(/\s+/g, " ").trim();
141
+ if (words === "") continue;
142
+ if (text !== "") {
143
+ text += " ";
144
+ at.push(n);
145
+ }
146
+ for (let i = 0; i < words.length; i++) at.push(n);
147
+ text += words;
148
+ }
149
+ const out = [];
150
+ let from = 0;
151
+ for (; ; ) {
152
+ const found = text.indexOf(inner, from);
153
+ if (found === -1) break;
154
+ from = found + 1;
155
+ const before = found === 0 ? " " : text[found - 1];
156
+ const afterAt = found + inner.length;
157
+ const after = afterAt === text.length ? " " : text[afterAt];
158
+ if (before !== " " || after !== " ") continue;
159
+ const start = at[found];
160
+ const end = at[afterAt - 1];
161
+ if (start === void 0 || end === void 0) continue;
162
+ if (!out.some((span) => span.start === start && span.end === end)) out.push({ start, end });
163
+ }
164
+ return out.filter(
165
+ (span) => !out.some(
166
+ (other) => (other.start !== span.start || other.end !== span.end) && other.start >= span.start && other.end <= span.end
167
+ )
168
+ );
169
+ }
170
+ function bounds(line) {
171
+ return line === void 0 || line.trim() === "" || ANY_FENCE.test(line);
172
+ }
173
+ function pinOf(lines, span) {
174
+ if (span.start < 1 || span.end > lines.length || span.end < span.start) return void 0;
175
+ return hashLines(lines.slice(span.start - 1, span.end).join("\n"));
176
+ }
177
+ function readThen(input, text) {
178
+ const then = readPage(input.page.file, text, { format: input.page.format });
179
+ const lines = splitLines(then.content);
180
+ if (input.entry.citation.claim?.lines !== void 0) return { page: then, lines };
181
+ const id = input.entry.citation.id;
182
+ if (id === void 0) return void 0;
183
+ const marker = then.statements.find(
184
+ (statement) => statement.payload.kind === "ref" && statement.payload.ids.includes(id)
185
+ );
186
+ if (marker === void 0) return void 0;
187
+ return { page: then, lines, marker };
188
+ }
189
+ function anchorHeldAt(input, then) {
190
+ const pin = input.entry.citation.claim?.integrity;
191
+ if (pin === void 0) return { kind: "absent" };
192
+ const was = {
193
+ citation: input.entry.citation,
194
+ origin: input.entry.origin,
195
+ ...then.marker === void 0 ? {} : { marker: then.marker }
196
+ };
197
+ const split = then.marker === void 0 ? void 0 : misplacedMarkerAt(then.page, then.lines, then.marker.line, was);
198
+ const end = claimEnd(then.page, was, then.lines, split);
199
+ if (end === null || end.status !== "current" && end.status !== "moved") {
200
+ return { kind: "absent" };
201
+ }
202
+ for (const spec of [end.fileLines, end.newFileLines]) {
203
+ const span = spec === void 0 ? void 0 : parseLines(spec);
204
+ if (span !== void 0 && pinOf(then.lines, span) === pin) {
205
+ return { kind: "found", span, lines: then.lines.slice(span.start - 1, span.end) };
206
+ }
207
+ }
208
+ if (split !== void 0) {
209
+ const text = unitText(then.lines, split);
210
+ if (hashLines(text.join("\n")) === pin) {
211
+ return { kind: "found", span: movedUnit(split), lines: text };
212
+ }
213
+ }
214
+ return { kind: "absent" };
215
+ }
216
+ function windowHeldAt(input, then) {
217
+ const pin = input.entry.citation.claim?.integrity;
218
+ const marker = then.marker;
219
+ if (pin === void 0 || marker === void 0) return { kind: "absent" };
220
+ if (input.entry.citation.quote === true) return { kind: "absent" };
221
+ const lines = then.lines;
222
+ let stop = marker.line;
223
+ for (let n = marker.line + 1; n <= lines.length; n++) {
224
+ if (bounds(lines[n - 1])) break;
225
+ stop = n;
226
+ }
227
+ const starts = [marker.line];
228
+ for (let n = marker.line + 1; n <= stop; n++) {
229
+ const line = lines[n - 1] ?? "";
230
+ if (line.trim() === "" || isMarkerLine(line, then.page.format)) continue;
231
+ starts.push(n);
232
+ }
233
+ for (const start of starts) {
234
+ for (let end = start; end <= stop; end++) {
235
+ if (pinOf(lines, { start, end }) === pin) {
236
+ return { kind: "found", span: { start, end }, lines: lines.slice(start - 1, end) };
237
+ }
238
+ }
239
+ }
240
+ return { kind: "absent" };
241
+ }
242
+ async function stillWritten(input, commit, pageText) {
243
+ const pin = input.entry.citation.claim?.integrity;
244
+ if (pin === void 0) return { stop: true, born: true };
245
+ const manifest = input.manifest;
246
+ if (manifest !== void 0) {
247
+ const shown = await input.git.showFile(commit, manifest);
248
+ const held2 = "text" in shown && shown.text.includes(pin);
249
+ return { stop: !held2, born: !held2 };
250
+ }
251
+ const held = pageText.includes(pin);
252
+ return { stop: false, born: !held };
253
+ }
254
+ async function claimHistory(input) {
255
+ const { git, path } = input;
256
+ if (git.pageCommits === void 0) return { kind: "none" };
257
+ if (!await git.available()) return { kind: "none" };
258
+ const cap = input.cap ?? MAX_PAGE_COMMITS;
259
+ const history = await git.pageCommits(path, cap);
260
+ const { commits } = history;
261
+ if (commits.length === 0) return { kind: "none" };
262
+ const format = input.page.format;
263
+ const baselineAt = (index, then, found) => {
264
+ if (found.kind !== "found") return { kind: "none" };
265
+ const commit = commits[index];
266
+ if (commit === void 0) return { kind: "none" };
267
+ return {
268
+ kind: "baseline",
269
+ commit: commit.sha,
270
+ commitsSince: commits.slice(0, index).map((c) => c.subject),
271
+ words: claimWords(found.lines, format),
272
+ pageWords: claimWords(then.lines.slice(then.page.bodyLine - 1), format),
273
+ lines: found.lines,
274
+ at: spellLines(found.span)
275
+ };
276
+ };
277
+ const examined = [];
278
+ let ended = "cap";
279
+ let born = false;
280
+ for (let i = 0; i < commits.length; i++) {
281
+ const commit = commits[i];
282
+ if (commit === void 0) continue;
283
+ const shown = await git.showFile(commit.sha, path);
284
+ if (!("text" in shown)) {
285
+ ended = shown.missing === "commit" ? "unavailable" : "birth";
286
+ break;
287
+ }
288
+ const then = readThen(input, shown.text);
289
+ if (then === void 0) {
290
+ ended = "birth";
291
+ break;
292
+ }
293
+ examined.push(then);
294
+ const found = anchorHeldAt(input, then);
295
+ if (found.kind === "found") return baselineAt(i, then, found);
296
+ const written = await stillWritten(input, commit.sha, shown.text);
297
+ if (written.born) born = true;
298
+ if (written.stop) {
299
+ ended = "birth";
300
+ break;
301
+ }
302
+ }
303
+ for (const [i, then] of examined.entries()) {
304
+ const found = windowHeldAt(input, then);
305
+ if (found.kind === "found") return baselineAt(i, then, found);
306
+ }
307
+ if (ended === "birth" || born) return { kind: "none" };
308
+ if (ended === "unavailable") return { kind: "unavailable" };
309
+ return history.truncated || history.shallow ? { kind: "unavailable" } : { kind: "none" };
310
+ }
311
+ function claimDiff(input) {
312
+ const a = input.was.lines;
313
+ const b = input.now.lines;
314
+ let head = 0;
315
+ while (head < a.length && head < b.length && a[head] === b[head]) head++;
316
+ let tail = 0;
317
+ while (tail < a.length - head && tail < b.length - head && a[a.length - 1 - tail] === b[b.length - 1 - tail]) {
318
+ tail++;
319
+ }
320
+ const out = [
321
+ `--- ${input.file}@${shortCommit(input.commit)}:${input.was.at}`,
322
+ `+++ ${input.file}:${input.now.at}`
323
+ ];
324
+ for (const line of a.slice(0, head)) out.push(` ${line}`);
325
+ for (const line of a.slice(head, a.length - tail)) out.push(`-${line}`);
326
+ for (const line of b.slice(head, b.length - tail)) out.push(`+${line}`);
327
+ for (const line of a.slice(a.length - tail)) out.push(` ${line}`);
328
+ return out.join("\n");
329
+ }
330
+ function refineClaim(input) {
331
+ const { claim, history, entry, page, lines } = input;
332
+ if (history.kind === "unavailable") return { ...claim, historyAvailable: false };
333
+ if (history.kind === "none") return claim;
334
+ const format = page.format;
335
+ const base = {
336
+ ...claim,
337
+ commitSha: history.commit,
338
+ historyAvailable: true,
339
+ commitsSince: history.commitsSince,
340
+ baselineText: history.lines
341
+ };
342
+ const withDiff = (end, now2) => {
343
+ const diff = claimDiff({
344
+ file: page.file,
345
+ commit: history.commit,
346
+ was: { at: history.at, lines: history.lines },
347
+ now: now2
348
+ });
349
+ return { ...end, diff };
350
+ };
351
+ if (entry.citation.quote === true) {
352
+ const now2 = claim.text ?? [];
353
+ const same = stripMarkers(now2, format).join("\n") === stripMarkers(history.lines, format).join("\n");
354
+ const at = claim.fileLines ?? history.at;
355
+ return withDiff(same ? { ...base, status: "reanchored" } : base, { at, lines: now2 });
356
+ }
357
+ if (entry.citation.claim?.lines === void 0) {
358
+ const now2 = claim.text ?? [];
359
+ const w12 = claimWords(now2, format);
360
+ const at = claim.fileLines ?? history.at;
361
+ const held = holdsWords(w12, history.words) && holdsWords(history.pageWords, w12);
362
+ return withDiff(held ? { ...base, status: "reanchored" } : base, { at, lines: now2 });
363
+ }
364
+ const runs = runsHolding(lines, format, page.bodyLine, history.words);
365
+ const [only] = runs;
366
+ if (runs.length > 1) {
367
+ return {
368
+ ...claim,
369
+ status: "moved-ambiguous",
370
+ candidates: runs.map((span) => spellLines(toBodyLines(span, page.bodyLine))),
371
+ candidateFileLines: runs.map(spellLines)
372
+ };
373
+ }
374
+ if (only === void 0) {
375
+ return withDiff(base, { at: claim.fileLines ?? history.at, lines: claim.text ?? [] });
376
+ }
377
+ const now = lines.slice(only.start - 1, only.end);
378
+ const w1 = claimWords(now, format);
379
+ if (!holdsWords(history.pageWords, w1)) {
380
+ return withDiff(base, { at: claim.fileLines ?? history.at, lines: claim.text ?? [] });
381
+ }
382
+ return withDiff(
383
+ {
384
+ ...base,
385
+ status: "reanchored",
386
+ newLines: spellLines(toBodyLines(only, page.bodyLine)),
387
+ newFileLines: spellLines(only)
388
+ },
389
+ { at: spellLines(only), lines: now }
390
+ );
391
+ }
392
+
95
393
  // src/cite/core/sources.ts
96
394
  import fg from "fast-glob";
97
395
  import { lstat, readFile, realpath } from "node:fs/promises";
@@ -155,7 +453,7 @@ async function sourceIndexFor(root, client) {
155
453
  try {
156
454
  return await buildSourceIndex(root, { gitClient: client });
157
455
  } catch (error) {
158
- if (isEnoent(error)) throw new CiteError(`Root directory not found: ${root}.`);
456
+ if (isEnoent(error)) throw new CiteError(`Root directory not found: ${root}. Fix --root, or cite.root in manni.config.yaml.`);
159
457
  throw error;
160
458
  }
161
459
  }
@@ -174,13 +472,13 @@ async function readSource(root, index, range, key, cache) {
174
472
  const resolvedPath = resolved.path;
175
473
  if (!index.has(resolvedPath)) return { kind: "missing", reason: "untracked" };
176
474
  if (cache === void 0) {
177
- const text = await readTracked(root, resolvedPath);
475
+ const text = await readIndexed(root, index, resolvedPath);
178
476
  return text === void 0 ? { kind: "missing", reason: "unreadable" } : { kind: "ok", resolvedPath, text };
179
477
  }
180
478
  const slot = JSON.stringify([root, resolvedPath]);
181
479
  let read = cache.get(slot);
182
480
  if (read === void 0) {
183
- read = readTracked(root, resolvedPath).then(
481
+ read = readIndexed(root, index, resolvedPath).then(
184
482
  (text) => text === void 0 ? void 0 : { text, lines: splitLines(text) }
185
483
  );
186
484
  cache.set(slot, read);
@@ -188,6 +486,9 @@ async function readSource(root, index, range, key, cache) {
188
486
  const file = await read;
189
487
  return file === void 0 ? { kind: "missing", reason: "unreadable" } : { kind: "ok", resolvedPath, text: file.text, lines: file.lines };
190
488
  }
489
+ function readIndexed(root, index, path) {
490
+ return index.read === void 0 ? readTracked(root, path) : index.read(path);
491
+ }
191
492
  async function readTracked(root, path) {
192
493
  try {
193
494
  return await readFile(join(root, path), "utf8");
@@ -224,6 +525,58 @@ async function historyOf(git, commit, path, range, pin, key, budget, counter) {
224
525
  }
225
526
  return found.truncated ? { kind: "unknown" } : { kind: "never-true" };
226
527
  }
528
+ async function sourceBaseline(git, recorded, path, range, pin, key, budget, counter) {
529
+ const at = (commit) => historyOf(git, commit, path, range, pin, key, budget, counter);
530
+ if (git.pageCommits === void 0) {
531
+ if (recorded === void 0) return { history: { kind: "none" } };
532
+ const history = await at(recorded);
533
+ return history.kind === "original" ? { history, commit: recorded } : { history };
534
+ }
535
+ if (recorded !== void 0 && await inHistory(git, recorded)) {
536
+ const history = await at(recorded);
537
+ if (history.kind === "original") return { history, commit: recorded };
538
+ }
539
+ const { commits, shallow, truncated } = await git.pageCommits(path, MAX_PAGE_COMMITS);
540
+ let unknown = false;
541
+ for (const [i, commit] of commits.entries()) {
542
+ const history = await at(commit.sha);
543
+ if (history.kind === "original") {
544
+ return {
545
+ history,
546
+ commit: commit.sha,
547
+ commitsSince: commits.slice(0, i).map((c) => c.subject)
548
+ };
549
+ }
550
+ if (history.kind === "unavailable") return { history };
551
+ if (history.kind === "unknown") unknown = true;
552
+ }
553
+ if (shallow || truncated) return { history: { kind: "unavailable" } };
554
+ return { history: unknown ? { kind: "unknown" } : { kind: "never-true" } };
555
+ }
556
+ async function inHistory(git, commit) {
557
+ if (git.isAncestor === void 0) return true;
558
+ const head = await git.head();
559
+ if (head === null) return true;
560
+ return git.isAncestor(commit, head);
561
+ }
562
+ async function arrivalOf(git, path, range, pin, key) {
563
+ if (git.pageCommits === void 0) return void 0;
564
+ const { commits } = await git.pageCommits(path, MAX_PAGE_COMMITS);
565
+ let arrived;
566
+ for (const commit of commits) {
567
+ const shown = await git.showFile(commit.sha, path);
568
+ if (!("text" in shown) || !holdsAt(shown.text, range, pin, key)) break;
569
+ arrived = commit.sha;
570
+ }
571
+ return arrived;
572
+ }
573
+ function holdsAt(text, range, pin, key) {
574
+ try {
575
+ return hashLines(sliceLines(splitLines(text), range), key) === pin;
576
+ } catch {
577
+ return false;
578
+ }
579
+ }
227
580
  async function followAcross(ask, counter) {
228
581
  const hits = [];
229
582
  const length = ask.original.length;
@@ -232,7 +585,7 @@ async function followAcross(ask, counter) {
232
585
  (path) => path !== ask.own && ask.index.has(path)
233
586
  );
234
587
  for (const path of candidates2) {
235
- const text = await readTracked(ask.root, path);
588
+ const text = await readIndexed(ask.root, ask.index, path);
236
589
  if (text === void 0) continue;
237
590
  const bytes = Buffer.byteLength(text, "utf8");
238
591
  if (bytes > counter.left) return { hits, truncated: true };
@@ -294,11 +647,14 @@ async function classifyCitation(entry, opts) {
294
647
  }
295
648
  }
296
649
  const counter = { left: opts.budget ?? MOVE_BUDGET_BYTES };
297
- let history = { kind: "none" };
298
- if (commit !== void 0 && await opts.git.available()) {
299
- history = await historyOf(opts.git, commit, path, range, pin, key, opts.budget, counter);
650
+ let derived = { history: { kind: "none" } };
651
+ if (await opts.git.available()) {
652
+ derived = await sourceBaseline(opts.git, commit, path, range, pin, key, opts.budget, counter);
300
653
  }
654
+ const history = derived.history;
655
+ const baseline = derived.commit;
301
656
  const original = history.kind === "original" ? history.lines : void 0;
657
+ if (baseline !== void 0) result.baselineSha = baseline;
302
658
  const spellAt = (at, start, end) => {
303
659
  const written = range.encrypted && opts.key !== void 0 ? encryptSourcePath(at, opts.key) : at;
304
660
  return formatSrc({ path: written, encrypted: range.encrypted, ...start === void 0 ? {} : { start, end } });
@@ -325,9 +681,9 @@ async function classifyCitation(entry, opts) {
325
681
  return result;
326
682
  }
327
683
  }
328
- if (commit !== void 0 && original !== void 0) {
684
+ if (baseline !== void 0 && original !== void 0) {
329
685
  const across = await followAcross(
330
- { git: opts.git, root: opts.root, index: opts.index, commit, own: path, pin, key, original },
686
+ { git: opts.git, root: opts.root, index: opts.index, commit: baseline, own: path, pin, key, original },
331
687
  counter
332
688
  );
333
689
  if (across.truncated) {
@@ -361,10 +717,10 @@ async function classifyCitation(entry, opts) {
361
717
  result.status = "changed";
362
718
  if (history.kind === "unavailable") result.historyAvailable = false;
363
719
  if (history.kind === "unknown") result.truncatedSearch = true;
364
- if (original !== void 0 && commit !== void 0) {
720
+ if (original !== void 0 && baseline !== void 0) {
365
721
  result.historyAvailable = true;
366
- result.commitsSince = await opts.git.subjectsSince(commit, path);
367
- result.diff = await opts.git.diffSince(commit, path);
722
+ result.commitsSince = derived.commitsSince ?? await opts.git.subjectsSince(baseline, path);
723
+ result.diff = await opts.git.diffSince(baseline, path);
368
724
  const span = range.start === void 0 ? void 0 : spanOf(lines, original);
369
725
  if (span !== void 0) result.newLines = String(lineSpec(span));
370
726
  }
@@ -372,16 +728,16 @@ async function classifyCitation(entry, opts) {
372
728
  }
373
729
 
374
730
  // src/cite/core/git.ts
375
- import { execFile } from "node:child_process";
731
+ import { execFile, spawn } from "node:child_process";
376
732
  var MAX_BUFFER = 32 * 1024 * 1024;
377
733
  var NO_COMMIT = /invalid object name|bad revision|unknown revision|bad object/i;
378
734
  var NO_PATH = /does not exist in|exists on disk, but not in|path .* does not exist/i;
379
- function run(root, args) {
735
+ function run(root, args, maxBuffer = MAX_BUFFER) {
380
736
  return new Promise((resolve4) => {
381
737
  execFile(
382
738
  "git",
383
739
  ["-c", "core.quotepath=false", ...args],
384
- { cwd: root, windowsHide: true, maxBuffer: MAX_BUFFER, encoding: "utf8" },
740
+ { cwd: root, windowsHide: true, maxBuffer, encoding: "utf8" },
385
741
  (error, stdout, stderr) => {
386
742
  if (error) {
387
743
  const failure = { ok: false, stderr, message: error.message };
@@ -392,7 +748,7 @@ function run(root, args) {
392
748
  );
393
749
  });
394
750
  }
395
- function gitClient(root) {
751
+ function gitClient(root, rev = "HEAD") {
396
752
  const memo = /* @__PURE__ */ new Map();
397
753
  const once = (key, compute) => {
398
754
  const held = memo.get(key);
@@ -430,7 +786,7 @@ function gitClient(root) {
430
786
  }),
431
787
  head: () => once("head", async () => {
432
788
  if (!await available()) return null;
433
- const out = await run(root, ["rev-parse", "HEAD"]);
789
+ const out = await run(root, ["rev-parse", "--verify", "--quiet", "--end-of-options", `${rev}^{commit}`]);
434
790
  return out.ok ? out.stdout.trim() : null;
435
791
  }),
436
792
  lsFiles: () => once("ls-files", async () => {
@@ -449,21 +805,23 @@ function gitClient(root) {
449
805
  throw failed("show", out);
450
806
  }),
451
807
  subjectsSince: (commit, path) => once(`log\0${commit}\0${path}`, async () => {
452
- const out = await run(root, ["log", "--format=%s", "--end-of-options", `${commit}..HEAD`, "--", path]);
808
+ const out = await run(root, ["log", "--format=%s", "--end-of-options", `${commit}..${rev}`, "--", path]);
453
809
  if (!out.ok) throw failed("log", out);
454
810
  return out.stdout.split(/\r?\n/).filter((line) => line !== "");
455
811
  }),
456
- // `HEAD` is written out: with no second revision git compares the commit
457
- // to the working tree, and this list is committed changes only, so a move
458
- // that is merely saved is never followed into a page (0055 stress test 8).
812
+ // The revision is written out, `HEAD` for a check: with no second revision
813
+ // git compares the commit to the working tree, and this list is committed
814
+ // changes only, so a move that is merely saved is never followed into a
815
+ // page (0055 stress test 8).
459
816
  changedSince: (commit) => once(`changed\0${commit}`, async () => {
460
817
  if (!await available()) return [];
461
- const out = await run(root, ["diff", "--name-only", "--end-of-options", commit, "HEAD"]);
818
+ const out = await run(root, ["diff", "--name-only", "--end-of-options", commit, rev]);
462
819
  if (!out.ok) throw failed("diff", out);
463
820
  return out.stdout.split(/\r?\n/).filter((line) => line !== "");
464
821
  }),
465
822
  diffSince: (commit, path) => once(`diff\0${commit}\0${path}`, async () => {
466
- const out = await run(root, ["diff", "--end-of-options", commit, "--", path]);
823
+ const against = rev === "HEAD" ? [commit] : [commit, rev];
824
+ const out = await run(root, ["diff", "--end-of-options", ...against, "--", path]);
467
825
  if (!out.ok) throw failed("diff", out);
468
826
  return out.stdout;
469
827
  }),
@@ -474,7 +832,8 @@ function gitClient(root) {
474
832
  `--format=%H${UNIT}%s`,
475
833
  "--topo-order",
476
834
  `-n${String(cap + 1)}`,
477
- "HEAD",
835
+ "--end-of-options",
836
+ rev,
478
837
  "--",
479
838
  path
480
839
  ]);
@@ -494,314 +853,149 @@ function gitClient(root) {
494
853
  var UNIT = "";
495
854
  var GIT_UNAVAILABLE_HISTORY = "git is not available here, so citations are checked without history: no never-true, no reanchored claims, no diffs, no commit subjects.";
496
855
  var PAGE_HISTORY_UNAVAILABLE = "the page history ends before the pin held; use fetch-depth: 0 to tell reanchored claims from changed ones";
497
- var SHALLOW_RECOMMIT = "this clone is shallow, so --recommit re-recorded only commits that do not contain their lines. Fetch full history to check the rest.";
498
- var GIT_UNAVAILABLE_COMMIT = "git is not available here, so the citation records no commit.";
499
- function noGit() {
500
- return {
501
- available: () => Promise.resolve(false),
502
- head: () => Promise.resolve(null),
503
- lsFiles: () => Promise.resolve([]),
504
- showFile: () => Promise.resolve({ missing: "commit" }),
505
- subjectsSince: () => Promise.resolve([]),
506
- diffSince: () => Promise.resolve(""),
507
- changedSince: () => Promise.resolve([]),
508
- pageCommits: () => Promise.resolve({ commits: [], shallow: false, truncated: false })
509
- };
510
- }
511
-
512
- // src/cite/core/history.ts
513
- var MAX_PAGE_COMMITS = 256;
514
- function stripMarkers(lines, format) {
515
- return lines.filter((line) => !isMarkerLine(line, format));
516
- }
517
- function claimWords(lines, format) {
518
- return stripMarkers(lines, format).join(" ").replace(/\s+/g, " ").trim();
519
- }
520
- function sentencesOf(text) {
521
- return text.split(/(?<=[.!?])\s+/).map((sentence) => sentence.replace(/\s+/g, " ").trim().toLowerCase()).filter((sentence) => sentence !== "");
522
- }
523
- function sharesSentence(a, b) {
524
- const left = new Set(sentencesOf(a));
525
- return sentencesOf(b).some((sentence) => left.has(sentence));
526
- }
527
- function wordSet(text) {
528
- return new Set(
529
- text.toLowerCase().split(/\s+/).filter((word) => word !== "")
530
- );
531
- }
532
- function wordShare(was, now) {
533
- const left = wordSet(was);
534
- if (left.size === 0) return 1;
535
- const right = wordSet(now);
536
- let held = 0;
537
- for (const word of left) if (right.has(word)) held++;
538
- return held / left.size;
539
- }
540
- function holdsWords(outer, inner) {
541
- if (inner === "") return true;
542
- if (outer === inner) return true;
543
- if (outer.startsWith(`${inner} `)) return true;
544
- if (outer.endsWith(` ${inner}`)) return true;
545
- return outer.includes(` ${inner} `);
546
- }
547
- function runsHolding(lines, format, bodyLine, inner) {
548
- if (inner === "") return [];
549
- let text = "";
550
- const at = [];
551
- for (let n = Math.max(bodyLine, 1); n <= lines.length; n++) {
552
- const line = lines[n - 1] ?? "";
553
- if (isMarkerLine(line, format)) continue;
554
- const words = line.replace(/\s+/g, " ").trim();
555
- if (words === "") continue;
556
- if (text !== "") {
557
- text += " ";
558
- at.push(n);
559
- }
560
- for (let i = 0; i < words.length; i++) at.push(n);
561
- text += words;
562
- }
563
- const out = [];
564
- let from = 0;
565
- for (; ; ) {
566
- const found = text.indexOf(inner, from);
567
- if (found === -1) break;
568
- from = found + 1;
569
- const before = found === 0 ? " " : text[found - 1];
570
- const afterAt = found + inner.length;
571
- const after = afterAt === text.length ? " " : text[afterAt];
572
- if (before !== " " || after !== " ") continue;
573
- const start = at[found];
574
- const end = at[afterAt - 1];
575
- if (start === void 0 || end === void 0) continue;
576
- if (!out.some((span) => span.start === start && span.end === end)) out.push({ start, end });
577
- }
578
- return out.filter(
579
- (span) => !out.some(
580
- (other) => (other.start !== span.start || other.end !== span.end) && other.start >= span.start && other.end <= span.end
581
- )
582
- );
583
- }
584
- function bounds(line) {
585
- return line === void 0 || line.trim() === "" || ANY_FENCE.test(line);
856
+ var SOURCE_HISTORY_UNAVAILABLE = "the source history ends before the pin held; use fetch-depth: 0 to tell never-true from changed";
857
+ var SHALLOW_RECOMMIT = "this clone is shallow, so --recommit re-recorded only commits that do not contain their lines. Fetch full history to check the rest.";
858
+ var GIT_UNAVAILABLE_COMMIT = "git is not available here, so the citation records no commit.";
859
+ function noGit() {
860
+ return {
861
+ available: () => Promise.resolve(false),
862
+ head: () => Promise.resolve(null),
863
+ lsFiles: () => Promise.resolve([]),
864
+ showFile: () => Promise.resolve({ missing: "commit" }),
865
+ subjectsSince: () => Promise.resolve([]),
866
+ diffSince: () => Promise.resolve(""),
867
+ changedSince: () => Promise.resolve([]),
868
+ pageCommits: () => Promise.resolve({ commits: [], shallow: false, truncated: false })
869
+ };
586
870
  }
587
- function pinOf(lines, span) {
588
- if (span.start < 1 || span.end > lines.length || span.end < span.start) return void 0;
589
- return hashLines(lines.slice(span.start - 1, span.end).join("\n"));
871
+ var LOG_BUFFER = 1024 * 1024 * 1024;
872
+ var ZERO = /^0+$/;
873
+ function gitFailed(verb, outcome) {
874
+ return new CiteError(`git ${verb} failed: ${outcome.stderr.trim() || outcome.message}`);
590
875
  }
591
- function readThen(input, text) {
592
- const then = readPage(input.page.file, text, { format: input.page.format });
593
- const lines = splitLines(then.content);
594
- if (input.entry.citation.claim?.lines !== void 0) return { page: then, lines };
595
- const id = input.entry.citation.id;
596
- if (id === void 0) return void 0;
597
- const marker = then.statements.find(
598
- (statement) => statement.payload.kind === "ref" && statement.payload.ids.includes(id)
876
+ async function firstParentLog(root) {
877
+ const out = await run(
878
+ root,
879
+ [
880
+ "log",
881
+ "--first-parent",
882
+ "--diff-merges=first-parent",
883
+ "--root",
884
+ "-M",
885
+ "--raw",
886
+ "--no-abbrev",
887
+ "-z",
888
+ "--format=%x01%H%x02%ct%x02%s",
889
+ "HEAD"
890
+ ],
891
+ LOG_BUFFER
599
892
  );
600
- if (marker === void 0) return void 0;
601
- return { page: then, lines, marker };
602
- }
603
- function anchorHeldAt(input, then) {
604
- const pin = input.entry.citation.claim?.integrity;
605
- if (pin === void 0) return { kind: "absent" };
606
- const was = {
607
- citation: input.entry.citation,
608
- origin: input.entry.origin,
609
- ...then.marker === void 0 ? {} : { marker: then.marker }
610
- };
611
- const split = then.marker === void 0 ? void 0 : misplacedMarkerAt(then.page, then.lines, then.marker.line, was);
612
- const end = claimEnd(then.page, was, then.lines, split);
613
- if (end === null || end.status !== "current" && end.status !== "moved") {
614
- return { kind: "absent" };
615
- }
616
- for (const spec of [end.fileLines, end.newFileLines]) {
617
- const span = spec === void 0 ? void 0 : parseLines(spec);
618
- if (span !== void 0 && pinOf(then.lines, span) === pin) {
619
- return { kind: "found", span, lines: then.lines.slice(span.start - 1, span.end) };
620
- }
621
- }
622
- if (split !== void 0) {
623
- const text = unitText(then.lines, split);
624
- if (hashLines(text.join("\n")) === pin) {
625
- return { kind: "found", span: movedUnit(split), lines: text };
893
+ if (!out.ok) throw gitFailed("log", out);
894
+ const commits = [];
895
+ for (const record of out.stdout.split("")) {
896
+ if (record === "") continue;
897
+ const end = record.indexOf("\0");
898
+ const [sha, time, ...subject] = (end === -1 ? record : record.slice(0, end)).split("");
899
+ if (sha === void 0 || time === void 0) continue;
900
+ const tokens = end === -1 ? [] : record.slice(end + 1).replace(/^\n/, "").split("\0");
901
+ const changes = [];
902
+ for (let i = 0; i < tokens.length; i++) {
903
+ const meta = tokens[i];
904
+ if (meta === void 0 || !meta.startsWith(":")) continue;
905
+ const [, mode, , blob, status] = meta.slice(1).split(" ");
906
+ const path = tokens[++i];
907
+ if (path === void 0 || blob === void 0 || status === void 0) continue;
908
+ const added = ZERO.test(blob) ? { path } : { path, blob, ...mode === void 0 ? {} : { mode } };
909
+ if (status.startsWith("R") || status.startsWith("C")) {
910
+ const to = tokens[++i];
911
+ if (to === void 0) continue;
912
+ if (status.startsWith("R")) changes.push({ path });
913
+ changes.push({ ...added, path: to, ...status.startsWith("R") ? { from: path } : {} });
914
+ } else changes.push(added);
626
915
  }
916
+ commits.push({ sha, time: Number(time), subject: subject.join(""), changes });
627
917
  }
628
- return { kind: "absent" };
629
- }
630
- function windowHeldAt(input, then) {
631
- const pin = input.entry.citation.claim?.integrity;
632
- const marker = then.marker;
633
- if (pin === void 0 || marker === void 0) return { kind: "absent" };
634
- if (input.entry.citation.quote === true) return { kind: "absent" };
635
- const lines = then.lines;
636
- let stop = marker.line;
637
- for (let n = marker.line + 1; n <= lines.length; n++) {
638
- if (bounds(lines[n - 1])) break;
639
- stop = n;
918
+ return commits.reverse();
919
+ }
920
+ async function topLevel(root) {
921
+ const out = await run(root, ["rev-parse", "--show-toplevel"]);
922
+ return out.ok ? out.stdout.trim() : null;
923
+ }
924
+ async function commitGraph(root) {
925
+ const out = await run(root, ["log", "--format=%H %ct %P", "HEAD"], LOG_BUFFER);
926
+ if (!out.ok) throw gitFailed("log", out);
927
+ const graph = /* @__PURE__ */ new Map();
928
+ for (const line of out.stdout.split(/\r?\n/)) {
929
+ const [sha, time, ...parents] = line.trim().split(" ");
930
+ if (sha === void 0 || sha === "" || time === void 0) continue;
931
+ graph.set(sha, { time: Number(time), parents: parents.filter((p) => p !== "") });
640
932
  }
641
- const starts = [marker.line];
642
- for (let n = marker.line + 1; n <= stop; n++) {
643
- const line = lines[n - 1] ?? "";
644
- if (line.trim() === "" || isMarkerLine(line, then.page.format)) continue;
645
- starts.push(n);
933
+ return graph;
934
+ }
935
+ async function tagCommits(root) {
936
+ const out = await run(root, [
937
+ "for-each-ref",
938
+ "--format=%(refname:strip=2) %(objectname) %(*objectname)",
939
+ "refs/tags"
940
+ ]);
941
+ if (!out.ok) throw gitFailed("for-each-ref", out);
942
+ const tags = [];
943
+ for (const line of out.stdout.split(/\r?\n/)) {
944
+ const [name, object, peeled] = line.trim().split(" ");
945
+ if (name === void 0 || name === "" || object === void 0) continue;
946
+ tags.push({ name, commit: peeled !== void 0 && peeled !== "" ? peeled : object });
646
947
  }
647
- for (const start of starts) {
648
- for (let end = start; end <= stop; end++) {
649
- if (pinOf(lines, { start, end }) === pin) {
650
- return { kind: "found", span: { start, end }, lines: lines.slice(start - 1, end) };
948
+ return tags;
949
+ }
950
+ function blobReader(root) {
951
+ const child = spawn("git", ["cat-file", "--batch"], {
952
+ cwd: root,
953
+ windowsHide: true,
954
+ stdio: ["pipe", "pipe", "ignore"]
955
+ });
956
+ const waiting = [];
957
+ let buffer = Buffer.alloc(0);
958
+ const drain = () => {
959
+ for (; ; ) {
960
+ const next = waiting[0];
961
+ const nl = buffer.indexOf(10);
962
+ if (next === void 0 || nl === -1) return;
963
+ const header = buffer.subarray(0, nl).toString("utf8").split(" ");
964
+ const size = Number(header[2]);
965
+ if (header[1] === "missing" || !Number.isInteger(size)) {
966
+ buffer = buffer.subarray(nl + 1);
967
+ waiting.shift();
968
+ next.reject(new CiteError(`git cat-file failed: ${header.join(" ")}`));
969
+ continue;
651
970
  }
971
+ if (buffer.length < nl + 2 + size) return;
972
+ const text = buffer.subarray(nl + 1, nl + 1 + size).toString("utf8");
973
+ buffer = buffer.subarray(nl + 2 + size);
974
+ waiting.shift();
975
+ next.resolve(text);
652
976
  }
653
- }
654
- return { kind: "absent" };
655
- }
656
- async function stillWritten(input, commit, pageText) {
657
- const pin = input.entry.citation.claim?.integrity;
658
- if (pin === void 0) return { stop: true, born: true };
659
- const manifest = input.manifest;
660
- if (manifest !== void 0) {
661
- const shown = await input.git.showFile(commit, manifest);
662
- const held2 = "text" in shown && shown.text.includes(pin);
663
- return { stop: !held2, born: !held2 };
664
- }
665
- const held = pageText.includes(pin);
666
- return { stop: false, born: !held };
667
- }
668
- async function claimHistory(input) {
669
- const { git, path } = input;
670
- if (git.pageCommits === void 0) return { kind: "none" };
671
- if (!await git.available()) return { kind: "none" };
672
- const cap = input.cap ?? MAX_PAGE_COMMITS;
673
- const history = await git.pageCommits(path, cap);
674
- const { commits } = history;
675
- if (commits.length === 0) return { kind: "none" };
676
- const format = input.page.format;
677
- const baselineAt = (index, then, found) => {
678
- if (found.kind !== "found") return { kind: "none" };
679
- const commit = commits[index];
680
- if (commit === void 0) return { kind: "none" };
681
- return {
682
- kind: "baseline",
683
- commit: commit.sha,
684
- commitsSince: commits.slice(0, index).map((c) => c.subject),
685
- words: claimWords(found.lines, format),
686
- pageWords: claimWords(then.lines.slice(then.page.bodyLine - 1), format),
687
- lines: found.lines,
688
- at: spellLines(found.span)
689
- };
690
977
  };
691
- const examined = [];
692
- let ended = "cap";
693
- let born = false;
694
- for (let i = 0; i < commits.length; i++) {
695
- const commit = commits[i];
696
- if (commit === void 0) continue;
697
- const shown = await git.showFile(commit.sha, path);
698
- if (!("text" in shown)) {
699
- ended = shown.missing === "commit" ? "unavailable" : "birth";
700
- break;
701
- }
702
- const then = readThen(input, shown.text);
703
- if (then === void 0) {
704
- ended = "birth";
705
- break;
706
- }
707
- examined.push(then);
708
- const found = anchorHeldAt(input, then);
709
- if (found.kind === "found") return baselineAt(i, then, found);
710
- const written = await stillWritten(input, commit.sha, shown.text);
711
- if (written.born) born = true;
712
- if (written.stop) {
713
- ended = "birth";
714
- break;
715
- }
716
- }
717
- for (const [i, then] of examined.entries()) {
718
- const found = windowHeldAt(input, then);
719
- if (found.kind === "found") return baselineAt(i, then, found);
720
- }
721
- if (ended === "birth" || born) return { kind: "none" };
722
- if (ended === "unavailable") return { kind: "unavailable" };
723
- return history.truncated || history.shallow ? { kind: "unavailable" } : { kind: "none" };
724
- }
725
- function claimDiff(input) {
726
- const a = input.was.lines;
727
- const b = input.now.lines;
728
- let head = 0;
729
- while (head < a.length && head < b.length && a[head] === b[head]) head++;
730
- let tail = 0;
731
- while (tail < a.length - head && tail < b.length - head && a[a.length - 1 - tail] === b[b.length - 1 - tail]) {
732
- tail++;
733
- }
734
- const out = [
735
- `--- ${input.file}@${shortCommit(input.commit)}:${input.was.at}`,
736
- `+++ ${input.file}:${input.now.at}`
737
- ];
738
- for (const line of a.slice(0, head)) out.push(` ${line}`);
739
- for (const line of a.slice(head, a.length - tail)) out.push(`-${line}`);
740
- for (const line of b.slice(head, b.length - tail)) out.push(`+${line}`);
741
- for (const line of a.slice(a.length - tail)) out.push(` ${line}`);
742
- return out.join("\n");
743
- }
744
- function refineClaim(input) {
745
- const { claim, history, entry, page, lines } = input;
746
- if (history.kind === "unavailable") return { ...claim, historyAvailable: false };
747
- if (history.kind === "none") return claim;
748
- const format = page.format;
749
- const base = {
750
- ...claim,
751
- commitSha: history.commit,
752
- historyAvailable: true,
753
- commitsSince: history.commitsSince,
754
- baselineText: history.lines
978
+ const failAll = (error) => {
979
+ for (const next of waiting.splice(0)) next.reject(error);
755
980
  };
756
- const withDiff = (end, now2) => {
757
- const diff = claimDiff({
758
- file: page.file,
759
- commit: history.commit,
760
- was: { at: history.at, lines: history.lines },
761
- now: now2
762
- });
763
- return { ...end, diff };
981
+ child.stdout.on("data", (chunk) => {
982
+ buffer = Buffer.concat([buffer, chunk]);
983
+ drain();
984
+ });
985
+ child.on("error", failAll);
986
+ child.on("close", () => {
987
+ failAll(new CiteError("git cat-file ended early"));
988
+ });
989
+ return {
990
+ read: (blob) => new Promise((resolve4, reject) => {
991
+ waiting.push({ resolve: resolve4, reject });
992
+ child.stdin.write(`${blob}
993
+ `);
994
+ }),
995
+ close: () => {
996
+ child.stdin.end();
997
+ }
764
998
  };
765
- if (entry.citation.quote === true) {
766
- const now2 = claim.text ?? [];
767
- const same = stripMarkers(now2, format).join("\n") === stripMarkers(history.lines, format).join("\n");
768
- const at = claim.fileLines ?? history.at;
769
- return withDiff(same ? { ...base, status: "reanchored" } : base, { at, lines: now2 });
770
- }
771
- if (entry.citation.claim?.lines === void 0) {
772
- const now2 = claim.text ?? [];
773
- const w12 = claimWords(now2, format);
774
- const at = claim.fileLines ?? history.at;
775
- const held = holdsWords(w12, history.words) && holdsWords(history.pageWords, w12);
776
- return withDiff(held ? { ...base, status: "reanchored" } : base, { at, lines: now2 });
777
- }
778
- const runs = runsHolding(lines, format, page.bodyLine, history.words);
779
- const [only] = runs;
780
- if (runs.length > 1) {
781
- return {
782
- ...claim,
783
- status: "moved-ambiguous",
784
- candidates: runs.map((span) => spellLines(toBodyLines(span, page.bodyLine))),
785
- candidateFileLines: runs.map(spellLines)
786
- };
787
- }
788
- if (only === void 0) {
789
- return withDiff(base, { at: claim.fileLines ?? history.at, lines: claim.text ?? [] });
790
- }
791
- const now = lines.slice(only.start - 1, only.end);
792
- const w1 = claimWords(now, format);
793
- if (!holdsWords(history.pageWords, w1)) {
794
- return withDiff(base, { at: claim.fileLines ?? history.at, lines: claim.text ?? [] });
795
- }
796
- return withDiff(
797
- {
798
- ...base,
799
- status: "reanchored",
800
- newLines: spellLines(toBodyLines(only, page.bodyLine)),
801
- newFileLines: spellLines(only)
802
- },
803
- { at: spellLines(only), lines: now }
804
- );
805
999
  }
806
1000
 
807
1001
  // src/cite/core/check-page.ts
@@ -843,7 +1037,7 @@ async function quoteFindings(input, entry, result) {
843
1037
  return [
844
1038
  {
845
1039
  rule: "quote-drift",
846
- message: "quote: true, but no fenced block follows the marker",
1040
+ message: "quote: true, but no fenced block follows the marker. Put the quoted block right after the marker.",
847
1041
  ...result.markerLine === void 0 ? {} : { line: result.markerLine }
848
1042
  }
849
1043
  ];
@@ -857,7 +1051,7 @@ async function quoteFindings(input, entry, result) {
857
1051
  {
858
1052
  rule: "anchor-invalid",
859
1053
  message: named(
860
- `the quote's claim lines ${at.start === at.end ? String(at.start) : `${String(at.start)}-${String(at.end)}`} are no longer a fenced block.`
1054
+ `the quote's claim lines ${at.start === at.end ? String(at.start) : `${String(at.start)}-${String(at.end)}`} are no longer a fenced block. Restore the fences, or re-add the citation over the block.`
861
1055
  ),
862
1056
  line: at.start
863
1057
  }
@@ -873,7 +1067,7 @@ async function quoteFindings(input, entry, result) {
873
1067
  return [
874
1068
  {
875
1069
  rule: "quote-drift",
876
- message: "quote: true, but the fenced block does not reproduce the cited lines",
1070
+ message: "quote: true, but the fenced block does not reproduce the cited lines. Copy the cited lines into the block again.",
877
1071
  line: block.start
878
1072
  }
879
1073
  ];
@@ -981,28 +1175,31 @@ async function checkCitations(page, opts) {
981
1175
  if (misplacedLevel !== "off") {
982
1176
  for (const found of misplaced) {
983
1177
  const entry = found.entry;
1178
+ if (entry === void 0) continue;
984
1179
  const finding = {
985
1180
  rule: "marker-misplaced",
986
1181
  ruleId: ruleId("marker-misplaced"),
987
1182
  severity: misplacedLevel,
988
- message: misplacedMessageFor(entry?.citation.id, {
989
- line: found.line,
990
- unit: spellLines(found.unit),
991
- place: found.place,
992
- block: found.block
993
- }),
994
- line: found.line
1183
+ message: withRemedy(
1184
+ misplacedMessageFor(entry.citation.id, {
1185
+ line: found.line,
1186
+ unit: spellLines(found.unit),
1187
+ place: found.place,
1188
+ block: found.block
1189
+ }),
1190
+ remedyFor("marker-misplaced", void 0)
1191
+ ),
1192
+ line: found.line,
1193
+ index: entry.origin.index,
1194
+ src: spellSource(entry.citation.source)
995
1195
  };
996
- if (entry !== void 0) {
997
- finding.index = entry.origin.index;
998
- finding.src = spellSource(entry.citation.source);
999
- if (entry.citation.id !== void 0) finding.id = entry.citation.id;
1000
- }
1196
+ if (entry.citation.id !== void 0) finding.id = entry.citation.id;
1001
1197
  findings.push(finding);
1002
1198
  }
1003
1199
  }
1004
1200
  findings.push(...findingsFor(results, severity));
1005
- const wantsSourceHistory = checkSources && read.citations.some(({ citation }) => citation.source["commit-sha"] !== void 0);
1201
+ for (const finding of findings) finding.guidance = guidanceFor(finding.rule);
1202
+ const wantsSourceHistory = checkSources && (read.citations.some(({ citation }) => citation.source["commit-sha"] !== void 0) || results.some((r) => r.source.status !== "current"));
1006
1203
  const wantsClaimHistory = results.some((r) => r.claim?.status === "changed");
1007
1204
  if (wantsSourceHistory && !await client.available()) notices.push(GIT_UNAVAILABLE_HISTORY);
1008
1205
  else if (wantsClaimHistory && !await pageGit.available()) {
@@ -1011,11 +1208,8 @@ async function checkCitations(page, opts) {
1011
1208
  if (results.some((r) => r.claim?.historyAvailable === false)) {
1012
1209
  notices.push(PAGE_HISTORY_UNAVAILABLE);
1013
1210
  }
1014
- const unavailable = results.find((r) => r.source.historyAvailable === false);
1015
- if (unavailable?.source.commitSha !== void 0) {
1016
- notices.push(
1017
- `commit ${unavailable.source.commitSha.slice(0, 7)} not found in history; use fetch-depth: 0 to enable never-true and diffs`
1018
- );
1211
+ if (results.some((r) => r.source.historyAvailable === false)) {
1212
+ notices.push(SOURCE_HISTORY_UNAVAILABLE);
1019
1213
  }
1020
1214
  const budget = String(MOVE_BUDGET_BYTES / (1024 * 1024));
1021
1215
  if (results.some((r) => r.source.truncatedSearch === true && r.source.truncatedAcross !== true)) {
@@ -1615,15 +1809,36 @@ export {
1615
1809
  gitClient,
1616
1810
  GIT_UNAVAILABLE_HISTORY,
1617
1811
  PAGE_HISTORY_UNAVAILABLE,
1812
+ SOURCE_HISTORY_UNAVAILABLE,
1618
1813
  SHALLOW_RECOMMIT,
1619
1814
  GIT_UNAVAILABLE_COMMIT,
1620
1815
  noGit,
1816
+ firstParentLog,
1817
+ topLevel,
1818
+ commitGraph,
1819
+ tagCommits,
1820
+ blobReader,
1821
+ MAX_PAGE_COMMITS,
1822
+ stripMarkers,
1823
+ claimWords,
1824
+ sentencesOf,
1825
+ sharesSentence,
1826
+ wordShare,
1827
+ holdsWords,
1828
+ runsHolding,
1829
+ claimHistory,
1830
+ claimDiff,
1831
+ refineClaim,
1621
1832
  encryptSourcePath,
1622
1833
  decryptSourcePath,
1623
1834
  buildSourceIndex,
1624
1835
  sourceIndexFor,
1836
+ resolveSourcePath,
1837
+ createSourceCache,
1625
1838
  readSource,
1626
1839
  historyOf,
1840
+ sourceBaseline,
1841
+ arrivalOf,
1627
1842
  classifyCitation,
1628
1843
  CITATIONS_KEY,
1629
1844
  urlManifestRefusal,
@@ -1632,17 +1847,6 @@ export {
1632
1847
  orphanRefusal,
1633
1848
  duplicateJoinRefusal,
1634
1849
  sidecarsFor,
1635
- MAX_PAGE_COMMITS,
1636
- stripMarkers,
1637
- claimWords,
1638
- sentencesOf,
1639
- sharesSentence,
1640
- wordShare,
1641
- holdsWords,
1642
- runsHolding,
1643
- claimHistory,
1644
- claimDiff,
1645
- refineClaim,
1646
1850
  checkCitations,
1647
1851
  joinHits,
1648
1852
  prepareRun,
@@ -1652,4 +1856,4 @@ export {
1652
1856
  sayNotices,
1653
1857
  runCheck
1654
1858
  };
1655
- //# sourceMappingURL=chunk-DQOM3DEU.js.map
1859
+ //# sourceMappingURL=chunk-6DYFWAZA.js.map