paperlint 7.2.0 → 9.0.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 (474) hide show
  1. package/CLAUDE.md +9 -25
  2. package/CONTRIBUTING.md +5 -4
  3. package/README.md +4 -3
  4. package/dist/adapters/bibtex/index.d.ts +3 -0
  5. package/dist/adapters/bibtex/index.d.ts.map +1 -0
  6. package/dist/adapters/bibtex/index.js +103 -0
  7. package/dist/adapters/bibtex/index.js.map +1 -0
  8. package/dist/adapters/latex/filecontents.d.ts +33 -0
  9. package/dist/adapters/latex/filecontents.d.ts.map +1 -0
  10. package/dist/adapters/latex/filecontents.js +65 -0
  11. package/dist/adapters/latex/filecontents.js.map +1 -0
  12. package/dist/adapters/latex/includes.d.ts +3 -3
  13. package/dist/adapters/latex/includes.d.ts.map +1 -1
  14. package/dist/adapters/latex/includes.js +18 -10
  15. package/dist/adapters/latex/includes.js.map +1 -1
  16. package/dist/adapters/latex/index.d.ts.map +1 -1
  17. package/dist/adapters/latex/index.js +2 -0
  18. package/dist/adapters/latex/index.js.map +1 -1
  19. package/dist/adapters/latex/nodes.d.ts +12 -0
  20. package/dist/adapters/latex/nodes.d.ts.map +1 -1
  21. package/dist/adapters/latex/nodes.js +39 -0
  22. package/dist/adapters/latex/nodes.js.map +1 -1
  23. package/dist/adapters/latex/parse.d.ts +7 -1
  24. package/dist/adapters/latex/parse.d.ts.map +1 -1
  25. package/dist/adapters/latex/parse.js +55 -6
  26. package/dist/adapters/latex/parse.js.map +1 -1
  27. package/dist/adapters/memory/index.d.ts +3 -0
  28. package/dist/adapters/memory/index.d.ts.map +1 -1
  29. package/dist/adapters/memory/index.js +9 -0
  30. package/dist/adapters/memory/index.js.map +1 -1
  31. package/dist/adapters/references/index.d.ts.map +1 -1
  32. package/dist/adapters/references/index.js +27 -24
  33. package/dist/adapters/references/index.js.map +1 -1
  34. package/dist/adapters/sources-record/index.d.ts +9 -0
  35. package/dist/adapters/sources-record/index.d.ts.map +1 -0
  36. package/dist/adapters/sources-record/index.js +68 -0
  37. package/dist/adapters/sources-record/index.js.map +1 -0
  38. package/dist/adapters/tex-output/blg.d.ts +9 -0
  39. package/dist/adapters/tex-output/blg.d.ts.map +1 -0
  40. package/dist/adapters/tex-output/blg.js +20 -0
  41. package/dist/adapters/tex-output/blg.js.map +1 -0
  42. package/dist/adapters/tex-output/fls.d.ts +8 -0
  43. package/dist/adapters/tex-output/fls.d.ts.map +1 -0
  44. package/dist/adapters/tex-output/fls.js +16 -0
  45. package/dist/adapters/tex-output/fls.js.map +1 -0
  46. package/dist/adapters/tex-output/index.d.ts +7 -0
  47. package/dist/adapters/tex-output/index.d.ts.map +1 -0
  48. package/dist/adapters/tex-output/index.js +7 -0
  49. package/dist/adapters/tex-output/index.js.map +1 -0
  50. package/dist/bib-rules.d.ts +47 -0
  51. package/dist/bib-rules.d.ts.map +1 -0
  52. package/dist/bib-rules.js +127 -0
  53. package/dist/bib-rules.js.map +1 -0
  54. package/dist/build.d.ts +29 -1
  55. package/dist/build.d.ts.map +1 -1
  56. package/dist/build.js +41 -30
  57. package/dist/build.js.map +1 -1
  58. package/dist/claim-provenance.d.ts +2 -2
  59. package/dist/cli.d.ts +9 -5
  60. package/dist/cli.d.ts.map +1 -1
  61. package/dist/cli.js +43 -68
  62. package/dist/cli.js.map +1 -1
  63. package/dist/domain/paper-source.d.ts +1 -10
  64. package/dist/domain/paper-source.d.ts.map +1 -1
  65. package/dist/domain/paper-source.js +34 -24
  66. package/dist/domain/paper-source.js.map +1 -1
  67. package/dist/domain/paper-sources.d.ts +72 -0
  68. package/dist/domain/paper-sources.d.ts.map +1 -0
  69. package/dist/domain/paper-sources.js +18 -0
  70. package/dist/domain/paper-sources.js.map +1 -0
  71. package/dist/domain/sources-record.d.ts +102 -0
  72. package/dist/domain/sources-record.d.ts.map +1 -0
  73. package/dist/domain/sources-record.js +38 -0
  74. package/dist/domain/sources-record.js.map +1 -0
  75. package/dist/domain/tex-run.d.ts +25 -0
  76. package/dist/domain/tex-run.d.ts.map +1 -0
  77. package/dist/domain/tex-run.js +79 -0
  78. package/dist/domain/tex-run.js.map +1 -0
  79. package/dist/eslint-rules/latex-language.d.ts.map +1 -1
  80. package/dist/eslint-rules/latex-language.js +10 -13
  81. package/dist/eslint-rules/latex-language.js.map +1 -1
  82. package/dist/eslint-rules/paper-context.d.ts.map +1 -1
  83. package/dist/eslint-rules/paper-context.js +6 -5
  84. package/dist/eslint-rules/paper-context.js.map +1 -1
  85. package/dist/eslint-rules/paper-typography.d.ts +0 -9
  86. package/dist/eslint-rules/paper-typography.d.ts.map +1 -1
  87. package/dist/eslint-rules/paper-typography.js +34 -96
  88. package/dist/eslint-rules/paper-typography.js.map +1 -1
  89. package/dist/eslint-rules/papers.d.ts +1 -3
  90. package/dist/eslint-rules/papers.d.ts.map +1 -1
  91. package/dist/eslint-rules/papers.js +2 -4
  92. package/dist/eslint-rules/papers.js.map +1 -1
  93. package/dist/eslint-rules/tex-build.d.ts.map +1 -1
  94. package/dist/eslint-rules/tex-build.js +8 -25
  95. package/dist/eslint-rules/tex-build.js.map +1 -1
  96. package/dist/init.d.ts +1 -4
  97. package/dist/init.d.ts.map +1 -1
  98. package/dist/init.js +3 -9
  99. package/dist/init.js.map +1 -1
  100. package/dist/latex-log.d.ts +10 -0
  101. package/dist/latex-log.d.ts.map +1 -1
  102. package/dist/latex-log.js +10 -0
  103. package/dist/latex-log.js.map +1 -1
  104. package/dist/latex-loop.d.ts +2 -0
  105. package/dist/latex-loop.d.ts.map +1 -1
  106. package/dist/latex-loop.js.map +1 -1
  107. package/dist/lib/markdown.d.ts +5 -81
  108. package/dist/lib/markdown.d.ts.map +1 -1
  109. package/dist/lib/markdown.js +5 -116
  110. package/dist/lib/markdown.js.map +1 -1
  111. package/dist/lib/paper-config.d.ts.map +1 -1
  112. package/dist/lib/paper-config.js +0 -2
  113. package/dist/lib/paper-config.js.map +1 -1
  114. package/dist/lib/skill-eval-fixture.d.ts +6 -4
  115. package/dist/lib/skill-eval-fixture.d.ts.map +1 -1
  116. package/dist/lib/skill-eval-fixture.js +25 -18
  117. package/dist/lib/skill-eval-fixture.js.map +1 -1
  118. package/dist/new-paper.d.ts +5 -11
  119. package/dist/new-paper.d.ts.map +1 -1
  120. package/dist/new-paper.js +12 -23
  121. package/dist/new-paper.js.map +1 -1
  122. package/dist/package-dirs.d.ts.map +1 -1
  123. package/dist/package-dirs.js +3 -2
  124. package/dist/package-dirs.js.map +1 -1
  125. package/dist/paper-files.d.ts +4 -4
  126. package/dist/paper-includes.d.ts +4 -7
  127. package/dist/paper-includes.d.ts.map +1 -1
  128. package/dist/paper-includes.js +29 -21
  129. package/dist/paper-includes.js.map +1 -1
  130. package/dist/paper-prose.d.ts +17 -0
  131. package/dist/paper-prose.d.ts.map +1 -0
  132. package/dist/paper-prose.js +46 -0
  133. package/dist/paper-prose.js.map +1 -0
  134. package/dist/paper-record.d.ts +25 -0
  135. package/dist/paper-record.d.ts.map +1 -0
  136. package/dist/paper-record.js +39 -0
  137. package/dist/paper-record.js.map +1 -0
  138. package/dist/paper-sources.d.ts +66 -0
  139. package/dist/paper-sources.d.ts.map +1 -0
  140. package/dist/paper-sources.js +92 -0
  141. package/dist/paper-sources.js.map +1 -0
  142. package/dist/ports/bib-reader.d.ts +18 -0
  143. package/dist/ports/bib-reader.d.ts.map +1 -0
  144. package/dist/ports/bib-reader.js +2 -0
  145. package/dist/ports/bib-reader.js.map +1 -0
  146. package/dist/ports/check-references.d.ts +9 -4
  147. package/dist/ports/check-references.d.ts.map +1 -1
  148. package/dist/ports/latex.d.ts +15 -0
  149. package/dist/ports/latex.d.ts.map +1 -1
  150. package/dist/ports/sources-codec.d.ts +11 -0
  151. package/dist/ports/sources-codec.d.ts.map +1 -0
  152. package/dist/ports/sources-codec.js +2 -0
  153. package/dist/ports/sources-codec.js.map +1 -0
  154. package/dist/ports/tex-output.d.ts +17 -0
  155. package/dist/ports/tex-output.d.ts.map +1 -0
  156. package/dist/ports/tex-output.js +2 -0
  157. package/dist/ports/tex-output.js.map +1 -0
  158. package/dist/recorded-bibliography.d.ts +89 -0
  159. package/dist/recorded-bibliography.d.ts.map +1 -0
  160. package/dist/recorded-bibliography.js +136 -0
  161. package/dist/recorded-bibliography.js.map +1 -0
  162. package/dist/reference-rules.d.ts +5 -5
  163. package/dist/reference-rules.d.ts.map +1 -1
  164. package/dist/reference-rules.js +150 -77
  165. package/dist/reference-rules.js.map +1 -1
  166. package/dist/references.d.ts +71 -16
  167. package/dist/references.d.ts.map +1 -1
  168. package/dist/references.js +110 -26
  169. package/dist/references.js.map +1 -1
  170. package/dist/register-bands.d.ts +3 -3
  171. package/dist/register-bands.d.ts.map +1 -1
  172. package/dist/register-bands.js.map +1 -1
  173. package/dist/register.d.ts +2 -2
  174. package/dist/sources-record.d.ts +38 -0
  175. package/dist/sources-record.d.ts.map +1 -0
  176. package/dist/sources-record.js +123 -0
  177. package/dist/sources-record.js.map +1 -0
  178. package/dist/sources-rules.d.ts +44 -0
  179. package/dist/sources-rules.d.ts.map +1 -0
  180. package/dist/sources-rules.js +76 -0
  181. package/dist/sources-rules.js.map +1 -0
  182. package/dist/structure.d.ts.map +1 -1
  183. package/dist/structure.js +4 -3
  184. package/dist/structure.js.map +1 -1
  185. package/dist/tex-paper.d.ts +10 -15
  186. package/dist/tex-paper.d.ts.map +1 -1
  187. package/dist/tex-paper.js +24 -40
  188. package/dist/tex-paper.js.map +1 -1
  189. package/dist/tex-venue-rules.d.ts +3 -3
  190. package/dist/tex-venue-rules.d.ts.map +1 -1
  191. package/dist/tex-venue-rules.js.map +1 -1
  192. package/dist/types.d.ts +0 -2
  193. package/dist/types.d.ts.map +1 -1
  194. package/docs/configuration.md +18 -12
  195. package/docs/design/paper-sources.md +197 -0
  196. package/docs/e2e.md +4 -6
  197. package/docs/package-shape-options.md +1 -1
  198. package/docs/prior-art/paper-folder-scaffolding.md +24 -29
  199. package/docs/references.md +34 -8
  200. package/docs/rules/bib/reachable-entry.md +64 -0
  201. package/docs/rules/paper/sources-fresh.md +81 -0
  202. package/docs/rules/tex/claim-provenance.md +0 -1
  203. package/docs/rules.md +62 -61
  204. package/eslint-rules/latex-language.harness.mjs +3 -3
  205. package/eslint-rules/latex-language.ts +10 -13
  206. package/eslint-rules/paper-context.ts +6 -5
  207. package/eslint-rules/paper-typography.test.mjs +29 -157
  208. package/eslint-rules/paper-typography.ts +35 -104
  209. package/eslint-rules/papers.harness.mjs +1 -1
  210. package/eslint-rules/papers.ts +2 -4
  211. package/eslint-rules/tex-build.harness.mjs +2 -2
  212. package/eslint-rules/tex-build.ts +8 -25
  213. package/eslint.config.mjs +22 -1
  214. package/fixtures/build-e2e/aidc/paper.tex +1 -1
  215. package/fixtures/build-e2e/anon-ack/paper.tex +1 -1
  216. package/fixtures/build-e2e/anon-author/paper.tex +1 -1
  217. package/fixtures/build-e2e/anon-bib/paper.tex +1 -1
  218. package/fixtures/build-e2e/anon-href/paper.tex +1 -1
  219. package/fixtures/build-e2e/anon-macro/paper.tex +1 -1
  220. package/fixtures/build-e2e/anon-pdfauthor/paper.tex +1 -1
  221. package/fixtures/paper-sources/p1/paper.tex +30 -0
  222. package/fixtures/paper-sources/p1/refs.bib +6 -0
  223. package/fixtures/paper-sources/p1/sections/dead.tex +6 -0
  224. package/fixtures/paper-sources/p1/sections/intro.tex +7 -0
  225. package/fixtures/paper-sources/p1/sections/parked.tex +6 -0
  226. package/fixtures/paper-sources/p1/tex-truth.json +37 -0
  227. package/fixtures/paper-sources/p1/versions/2026-01-01-review.tex +4 -0
  228. package/fixtures/paper-sources/v1-stale/paper.tex +14 -0
  229. package/fixtures/paper-sources/v1-stale/refs.bib +6 -0
  230. package/fixtures/paper-sources/v1-stale/tex-truth.json +32 -0
  231. package/fixtures/paper-sources/v10-ifthenelse/anon.bib +1 -0
  232. package/fixtures/paper-sources/v10-ifthenelse/paper.tex +9 -0
  233. package/fixtures/paper-sources/v10-ifthenelse/real.bib +1 -0
  234. package/fixtures/paper-sources/v10-ifthenelse/tex-truth.json +28 -0
  235. package/fixtures/paper-sources/v11-two-blocks/paper.tex +12 -0
  236. package/fixtures/paper-sources/v11-two-blocks/tex-truth.json +30 -0
  237. package/fixtures/paper-sources/v13-percent-text/paper.tex +6 -0
  238. package/fixtures/paper-sources/v13-percent-text/refs.bib +3 -0
  239. package/fixtures/paper-sources/v13-percent-text/tex-truth.json +30 -0
  240. package/fixtures/paper-sources/v15-after-end/paper.tex +6 -0
  241. package/fixtures/paper-sources/v15-after-end/refs.bib +1 -0
  242. package/fixtures/paper-sources/v15-after-end/tex-truth.json +17 -0
  243. package/fixtures/paper-sources/v16-included-block/bibblock.tex +3 -0
  244. package/fixtures/paper-sources/v16-included-block/paper.tex +7 -0
  245. package/fixtures/paper-sources/v16-included-block/refs.bib +1 -0
  246. package/fixtures/paper-sources/v16-included-block/tex-truth.json +35 -0
  247. package/fixtures/paper-sources/v17-include-order/bibsetup.tex +1 -0
  248. package/fixtures/paper-sources/v17-include-order/first.bib +1 -0
  249. package/fixtures/paper-sources/v17-include-order/later.bib +1 -0
  250. package/fixtures/paper-sources/v17-include-order/paper.tex +7 -0
  251. package/fixtures/paper-sources/v17-include-order/tex-truth.json +40 -0
  252. package/fixtures/paper-sources/v2-overwrite/paper.tex +14 -0
  253. package/fixtures/paper-sources/v2-overwrite/refs.bib +6 -0
  254. package/fixtures/paper-sources/v2-overwrite/tex-truth.json +30 -0
  255. package/fixtures/paper-sources/v22-parked-thebibliography/paper.tex +7 -0
  256. package/fixtures/paper-sources/v22-parked-thebibliography/tex-truth.json +17 -0
  257. package/fixtures/paper-sources/v23-parked-include/old.bib +1 -0
  258. package/fixtures/paper-sources/v23-parked-include/paper.tex +7 -0
  259. package/fixtures/paper-sources/v23-parked-include/parked.tex +1 -0
  260. package/fixtures/paper-sources/v23-parked-include/refs.bib +1 -0
  261. package/fixtures/paper-sources/v23-parked-include/tex-truth.json +28 -0
  262. package/fixtures/paper-sources/v24-quoted-fields/paper.tex +6 -0
  263. package/fixtures/paper-sources/v24-quoted-fields/refs.bib +5 -0
  264. package/fixtures/paper-sources/v24-quoted-fields/tex-truth.json +32 -0
  265. package/fixtures/paper-sources/v25-string-differs/paper.tex +10 -0
  266. package/fixtures/paper-sources/v25-string-differs/refs.bib +2 -0
  267. package/fixtures/paper-sources/v25-string-differs/tex-truth.json +32 -0
  268. package/fixtures/paper-sources/v26-comment-in-names/one.bib +1 -0
  269. package/fixtures/paper-sources/v26-comment-in-names/paper.tex +7 -0
  270. package/fixtures/paper-sources/v26-comment-in-names/tex-truth.json +32 -0
  271. package/fixtures/paper-sources/v26-comment-in-names/two.bib +1 -0
  272. package/fixtures/paper-sources/v27-shared-string/abbreviations.bib +2 -0
  273. package/fixtures/paper-sources/v27-shared-string/paper.tex +6 -0
  274. package/fixtures/paper-sources/v27-shared-string/references.bib +6 -0
  275. package/fixtures/paper-sources/v27-shared-string/tex-truth.json +31 -0
  276. package/fixtures/paper-sources/v28-shared-string-block/abbreviations.bib +2 -0
  277. package/fixtures/paper-sources/v28-shared-string-block/paper.tex +14 -0
  278. package/fixtures/paper-sources/v28-shared-string-block/tex-truth.json +33 -0
  279. package/fixtures/paper-sources/v29-generated-input/paper.tex +9 -0
  280. package/fixtures/paper-sources/v29-generated-input/tex-truth.json +24 -0
  281. package/fixtures/paper-sources/v3-declared/paper.bib +6 -0
  282. package/fixtures/paper-sources/v3-declared/paper.tex +6 -0
  283. package/fixtures/paper-sources/v3-declared/tex-truth.json +28 -0
  284. package/fixtures/paper-sources/v30-name-next-line/paper.tex +14 -0
  285. package/fixtures/paper-sources/v30-name-next-line/tex-truth.json +30 -0
  286. package/fixtures/paper-sources/v4-commented/paper.tex +14 -0
  287. package/fixtures/paper-sources/v4-commented/refs.bib +6 -0
  288. package/fixtures/paper-sources/v4-commented/tex-truth.json +28 -0
  289. package/fixtures/paper-sources/v5-percent-entry/paper.tex +20 -0
  290. package/fixtures/paper-sources/v5-percent-entry/tex-truth.json +37 -0
  291. package/fixtures/paper-sources/v6-unclosed/paper.tex +6 -0
  292. package/fixtures/paper-sources/v6-unclosed/refs.bib +5 -0
  293. package/fixtures/paper-sources/v6-unclosed/tex-truth.json +37 -0
  294. package/fixtures/paper-sources/v8-jobname/paper.tex +9 -0
  295. package/fixtures/paper-sources/v8-jobname/tex-truth.json +30 -0
  296. package/fixtures/paper-sources/v9-two-bibliographies/one.bib +1 -0
  297. package/fixtures/paper-sources/v9-two-bibliographies/paper.tex +7 -0
  298. package/fixtures/paper-sources/v9-two-bibliographies/tex-truth.json +35 -0
  299. package/fixtures/paper-sources/v9-two-bibliographies/two.bib +1 -0
  300. package/fixtures/paper-typography/clean-paper/paper.tex +1 -1
  301. package/fixtures/paper-typography/messy-paper/paper.tex +1 -1
  302. package/hooks/hooks.harness.ts +15 -15
  303. package/hooks/paper-edit-guard.hook.mjs +5 -8
  304. package/hooks/paper-edit-guard.test.ts +12 -3
  305. package/hooks/paper-skills-nudge.hook.mjs +2 -3
  306. package/hooks/paper-skills-nudge.test.ts +13 -3
  307. package/hooks/paper-status-gates.hook.mjs +2 -2
  308. package/hooks/paper-status-gates.test.ts +14 -2
  309. package/lib/markdown.test.mjs +5 -60
  310. package/lib/markdown.ts +9 -136
  311. package/lib/paper-config.ts +0 -2
  312. package/lib/skill-checks.test.mjs +4 -1
  313. package/lib/skill-eval-fixture.ts +25 -18
  314. package/package.json +2 -12
  315. package/presets/realm.jsonc +1 -1
  316. package/scripts/check.test.ts +23 -1
  317. package/scripts/check.ts +7 -3
  318. package/scripts/coverage-config.test.ts +19 -10
  319. package/scripts/harness-api.frozen.json +0 -5
  320. package/scripts/layer-legacy-frozen.test.ts +41 -2
  321. package/scripts/layer-legacy-frozen.ts +31 -2
  322. package/skills/cold-read-diff/SKILL.md +3 -3
  323. package/skills/cold-read-diff/SKILL.md.spec.ts +2 -2
  324. package/skills/grade-paper-writing/SKILL.md +15 -22
  325. package/skills/grade-paper-writing/SKILL.md.spec.ts +14 -21
  326. package/skills/grade-paper-writing/__snapshots__/prose-lint.test.ts.snap +40 -26
  327. package/skills/grade-paper-writing/prose-lint.mjs +117 -278
  328. package/skills/grade-paper-writing/prose-lint.test.ts +230 -79
  329. package/skills/paper-adversarial-review/SKILL.md +2 -2
  330. package/skills/paper-adversarial-review/SKILL.md.spec.ts +1 -1
  331. package/skills/paper-pipeline/SKILL.md +9 -12
  332. package/skills/paper-pipeline/SKILL.md.spec.ts +8 -11
  333. package/skills/paper-pipeline/description-language.eval.mjs +25 -15
  334. package/skills/paper-pipeline/framing-vs-vocabulary.eval.mjs +25 -15
  335. package/skills/paper-pipeline/grade-paper-writing-ablation.eval.mjs +25 -15
  336. package/skills/paper-pipeline/pipeline-firing.eval.mjs +27 -16
  337. package/skills/paper-pipeline/pipeline-language.eval.mjs +25 -15
  338. package/skills/paper-pipeline/references/acceptance-gate.md +16 -20
  339. package/skills/paper-pipeline/references/artifact-checklist.md +4 -5
  340. package/skills/paper-pipeline/references/pipeline-status-template.md +1 -1
  341. package/skills/paper-pipeline/scripts/README.md +0 -4
  342. package/skills/paper-pipeline/scripts/extract-ref-facts.harness.mjs +91 -105
  343. package/skills/paper-pipeline/scripts/extract-ref-facts.mjs +85 -241
  344. package/skills/paper-pipeline/scripts/extract-ref-facts.test.mjs +166 -153
  345. package/skills/paper-pipeline/scripts/generated-code.harness.mjs +3 -3
  346. package/skills/paper-status/SKILL.md +2 -2
  347. package/skills/paper-status/SKILL.md.spec.ts +1 -1
  348. package/skills/render-paper/SKILL.md +2 -2
  349. package/skills/render-paper/SKILL.md.spec.ts +1 -1
  350. package/skills/render-paper/extract-pdf-facts.mjs +2 -2
  351. package/skills/tighten-paper/SKILL.md +29 -42
  352. package/skills/tighten-paper/SKILL.md.spec.ts +28 -41
  353. package/skills/verify-citations/SKILL.md +7 -4
  354. package/skills/verify-citations/SKILL.md.spec.ts +6 -3
  355. package/skills/verify-citations/scripts/bib-authors.check.test.mjs +17 -32
  356. package/skills/verify-citations/scripts/bib-authors.cli.test.ts +138 -43
  357. package/skills/verify-citations/scripts/bib-authors.d.mts +22 -2
  358. package/skills/verify-citations/scripts/bib-authors.mjs +54 -193
  359. package/skills/verify-citations/scripts/bib-authors.test.mjs +1 -44
  360. package/skills/verify-citations/scripts/verify-cites.cli.test.ts +16 -0
  361. package/skills/verify-citations/scripts/verify-cites.d.mts +19 -3
  362. package/skills/verify-citations/scripts/verify-cites.mjs +42 -108
  363. package/skills/verify-citations/scripts/verify-cites.test.mjs +23 -36
  364. package/src/adapters/bibtex/index.test.ts +163 -0
  365. package/src/adapters/bibtex/index.ts +155 -0
  366. package/src/adapters/latex/filecontents.ts +114 -0
  367. package/src/adapters/latex/includes.ts +18 -10
  368. package/src/adapters/latex/index.test.ts +73 -0
  369. package/src/adapters/latex/index.ts +2 -0
  370. package/src/adapters/latex/nodes.ts +64 -0
  371. package/src/adapters/latex/parse.test.ts +38 -0
  372. package/src/adapters/latex/parse.ts +67 -6
  373. package/src/adapters/memory/index.ts +17 -0
  374. package/src/adapters/references/index.test.ts +75 -21
  375. package/src/adapters/references/index.ts +37 -32
  376. package/src/adapters/sources-record/index.test.ts +87 -0
  377. package/src/adapters/sources-record/index.ts +82 -0
  378. package/src/adapters/tex-output/blg.ts +27 -0
  379. package/src/adapters/tex-output/fls.ts +24 -0
  380. package/src/adapters/tex-output/index.test.ts +171 -0
  381. package/src/adapters/tex-output/index.ts +12 -0
  382. package/src/bib-rules.test.ts +356 -0
  383. package/src/bib-rules.ts +228 -0
  384. package/src/bibliography-at.test.ts +286 -0
  385. package/src/build.harness.mjs +2 -2
  386. package/src/build.test.ts +211 -1
  387. package/src/build.ts +101 -41
  388. package/src/claim-provenance.test.ts +33 -7
  389. package/src/claim-provenance.ts +2 -2
  390. package/src/cli.harness.mjs +46 -56
  391. package/src/cli.test.ts +44 -48
  392. package/src/cli.ts +51 -82
  393. package/src/domain/paper-source.test.ts +58 -20
  394. package/src/domain/paper-source.ts +38 -42
  395. package/src/domain/paper-sources.ts +94 -0
  396. package/src/domain/sources-record.test.ts +71 -0
  397. package/src/domain/sources-record.ts +136 -0
  398. package/src/domain/tex-run.test.ts +228 -0
  399. package/src/domain/tex-run.ts +139 -0
  400. package/src/folder-venue-rule.test.ts +1 -1
  401. package/src/heading-case.test.ts +24 -10
  402. package/src/init.test.ts +6 -7
  403. package/src/init.ts +3 -22
  404. package/src/latex-log.ts +20 -0
  405. package/src/latex-loop.harness.ts +1 -0
  406. package/src/latex-loop.ts +2 -0
  407. package/src/lint-fix.test.ts +10 -4
  408. package/src/linted-set.test.ts +9 -1
  409. package/src/new-paper.harness.mjs +12 -30
  410. package/src/new-paper.test.ts +15 -11
  411. package/src/new-paper.ts +11 -30
  412. package/src/package-dirs.ts +3 -2
  413. package/src/paper-files.test.ts +5 -4
  414. package/src/paper-files.ts +4 -4
  415. package/src/paper-includes.test.ts +157 -38
  416. package/src/paper-includes.ts +39 -35
  417. package/src/paper-prose.test.ts +78 -0
  418. package/src/paper-prose.ts +67 -0
  419. package/src/paper-record.test.ts +173 -0
  420. package/src/paper-record.ts +66 -0
  421. package/src/paper-settings-commands.test.ts +5 -2
  422. package/src/paper-sources.ts +151 -0
  423. package/src/parse-args.test.ts +0 -1
  424. package/src/ports/bib-reader.ts +27 -0
  425. package/src/ports/check-references.ts +7 -3
  426. package/src/ports/latex.ts +19 -0
  427. package/src/ports/sources-codec.ts +11 -0
  428. package/src/ports/tex-output.ts +17 -0
  429. package/src/recorded-bibliography.ts +297 -0
  430. package/src/reference-rules.ts +217 -104
  431. package/src/references.test.ts +520 -177
  432. package/src/references.ts +185 -37
  433. package/src/register-bands.test.ts +5 -1
  434. package/src/register-bands.ts +3 -5
  435. package/src/register.test.ts +6 -1
  436. package/src/register.ts +2 -2
  437. package/src/rule-cases.test.ts +68 -12
  438. package/src/rule-docs.test.ts +0 -1
  439. package/src/sources-record.test.ts +308 -0
  440. package/src/sources-record.ts +231 -0
  441. package/src/sources-rules.test.ts +152 -0
  442. package/src/sources-rules.ts +117 -0
  443. package/src/structure.harness.ts +5 -11
  444. package/src/structure.ts +4 -3
  445. package/src/tex-paper.test.ts +148 -78
  446. package/src/tex-paper.ts +31 -61
  447. package/src/tex-venue-rules.test.ts +36 -8
  448. package/src/tex-venue-rules.ts +3 -5
  449. package/src/types.ts +0 -2
  450. package/dist/eslint-rules/bib-reachable-entry.d.ts +0 -22
  451. package/dist/eslint-rules/bib-reachable-entry.d.ts.map +0 -1
  452. package/dist/eslint-rules/bib-reachable-entry.js +0 -75
  453. package/dist/eslint-rules/bib-reachable-entry.js.map +0 -1
  454. package/eslint-rules/bib-reachable-entry.ts +0 -76
  455. package/fixtures/real-markdown-paper/baseline.json +0 -22
  456. package/fixtures/real-markdown-paper/baseline.ts +0 -70
  457. package/skills/paper-pipeline/PIPELINE-MAP.md +0 -381
  458. package/skills/paper-pipeline/pipeline-firing.baseline.json +0 -270
  459. package/skills/paper-pipeline/references/sweep-2026-08-09-ideal-pipeline.md +0 -585
  460. package/skills/paper-pipeline/scripts/artifact-coverage.harness.mjs +0 -492
  461. package/skills/paper-pipeline/scripts/artifact-coverage.mjs +0 -397
  462. package/skills/paper-pipeline/scripts/artifact-coverage.test.ts +0 -86
  463. package/skills/paper-pipeline/scripts/check-provenance.mjs +0 -184
  464. package/skills/paper-pipeline/scripts/population-map.harness.mjs +0 -135
  465. package/skills/paper-pipeline/scripts/population-map.mjs +0 -188
  466. package/skills/paper-pipeline/scripts/population-map.test.mjs +0 -154
  467. package/skills/paper-pipeline/scripts/provenance.harness.mjs +0 -266
  468. package/skills/paper-pipeline/scripts/round-diff.harness.ts +0 -907
  469. package/skills/paper-pipeline/scripts/round-diff.mjs +0 -583
  470. package/skills/paper-pipeline/scripts/round-diff.test.mjs +0 -159
  471. package/skills/tighten-paper/__snapshots__/structure.test.ts.snap +0 -133
  472. package/skills/tighten-paper/structure.mjs +0 -364
  473. package/skills/tighten-paper/structure.test.ts +0 -117
  474. package/templates/paper/paper.md +0 -4
@@ -8,14 +8,16 @@
8
8
  * "bib-authors" in a scorecard table, or a command the project configured. Now the build runs
9
9
  * them and records the result as data, beside the facts it already writes about the PDF:
10
10
  *
11
- * { "schema": 1,
12
- * "bib": { "source": "paper.tex", "sha256": "…" }, the bibliography that was checked
11
+ * { "schema": 3,
12
+ * "bib": { "sources": ["refs.bib"], "sha256": "…" }, the databases that were checked, as
13
+ * bibtex names them, and a hash of their text
13
14
  * "status": "checked" | "not-checked", "why": "…", not-checked: nothing could be asked
14
15
  * "entries": [ { "key", "exists", "authors", "why" } ] }
16
+ * one per entry checked, in its order
15
17
  *
16
18
  * A sibling file, not a new field of `paper.facts.json`: those facts are about ONE PDF and are
17
- * stale when it changes (`pdf_sha256`); these are about the bibliography and are stale when IT
18
- * changes (`bib.sha256`). One staleness key per file, the way `pdf/fresh` already works.
19
+ * stale when it changes (`pdf_sha256`); these are about the databases and are stale when THEY
20
+ * change (`bib.sha256`). One staleness key per file, the way `pdf/fresh` already works.
19
21
  *
20
22
  * 🔴 WHAT THE CHECKERS ANSWERED IS KEPT, COMMITTED, IN `<paper>/repro/references-cache.json`
21
23
  * (`domain/lookup-cache.ts`). Loaded before the check and saved after it — only when something new
@@ -23,6 +25,18 @@
23
25
  * MAX_AGE_DAYS, not once per build (#107: 217 s for 27 references, every build). The verdicts above are NOT cached: they are derived from the cached
24
26
  * answers on every build, so a fix to the checkers reaches every paper at once.
25
27
  *
28
+ * ── WHICH DATABASES, AND WHAT BIBTEX TYPESET ───────────────────────────────────────────
29
+ * The databases checked are the ones the build's bibtex OPENED (`_build/sources.json`, written by
30
+ * `sources-record.ts` from TeX's own files; docs/design/paper-sources.md §1) — nothing here reads
31
+ * TeX source to decide which. Their entries are read by the one bibtex reader. bibtex reads
32
+ * differently from it in one place: it has no comment syntax, so an entry behind `%` or inside
33
+ * `@comment{…}` is one it typesets and the reader does not see. The record holds the keys bibtex
34
+ * typeset, so `paper/refs-checked` names the ones no entry of those databases has (`unseenKeys`).
35
+ * A malformed `.bib` never gets here: bibtex fails on it, and the build fails with bibtex's own lines.
36
+ *
37
+ * Without a record of the build, or with one the paper has changed since, there is no answer to
38
+ * "which databases": the step checks nothing, and the rules are silent — `paper/sources-fresh` speaks.
39
+ *
26
40
  * 🔴 THE STEP NEVER FAILS THE BUILD. A build without network still builds the PDF; the reference
27
41
  * step records `not-checked` and the lint rule says so, as a warning. Recording "not checked" as
28
42
  * a pass would be the counter that counts what it never looked at.
@@ -32,9 +46,11 @@ import { callerPath } from "./caller-path.js";
32
46
  import { sha256Hex } from "./domain/sha256.js";
33
47
  import { EMPTY_LOOKUP_CACHE, parseLookupCache, serializeLookupCache, } from "./domain/lookup-cache.js";
34
48
  import { ok } from "./domain/result.js";
35
- import { bibRange } from "#eslint-rules/paper-typography";
36
49
  import { messageOf } from "./domain/text.js";
37
- export const REFERENCES_SCHEMA = 1;
50
+ import { describeChanges, } from "./domain/sources-record.js";
51
+ import { entriesOfDatabases, recordedBibliography, } from "./recorded-bibliography.js";
52
+ /** 3: the record of what bibtex read lives in `_build/sources.json`; an older one reads as none. */
53
+ export const REFERENCES_SCHEMA = 3;
38
54
  export const REFERENCES_FILE = "references.json";
39
55
  /** The lookup cache's place in a paper: committed, beside the paper's other reproduction files. */
40
56
  export const LOOKUP_CACHE_FILE = "repro/references-cache.json";
@@ -45,18 +61,58 @@ const text = (files, p) => {
45
61
  const b = files.readBytes(callerPath(p));
46
62
  return b === null ? null : new TextDecoder().decode(b);
47
63
  };
48
- export function bibliographyOf(files, paperDir) {
49
- const tex = text(files, join(paperDir, "paper.tex"));
50
- const inline = tex === null ? null : bibRange(tex);
51
- if (inline)
52
- return { source: "paper.tex", text: inline.body, offset: inline.bodyStart };
53
- const bib = text(files, join(paperDir, "refs.bib"));
54
- return bib === null ? null : { source: "refs.bib", text: bib, offset: 0 };
64
+ /** `xs` without the elements whose `key` an earlier one has, in order. */
65
+ const distinctBy = (xs, key) => xs.filter((x, i) => xs.findIndex((o) => key(o) === key(x)) === i);
66
+ /**
67
+ * The bibliography the build recorded for the paper in `dir`: the databases bibtex opened, read by
68
+ * the bibtex reader. Only a fresh record answers (`paperRecord`).
69
+ */
70
+ export function readBibliography(dir, deps) {
71
+ const rec = recordedBibliography(dir, deps);
72
+ if (rec.kind === "unrecorded")
73
+ return { kind: "no-record", record: rec.record };
74
+ if (rec.unread.length > 0)
75
+ return { kind: "unread", databases: rec.unread };
76
+ const [first, ...rest] = rec.databases;
77
+ const bibtex = rec.record.bibtex;
78
+ if (first === undefined || !bibtex.ran)
79
+ return { kind: "nothing" };
80
+ return {
81
+ kind: "read",
82
+ bibliography: {
83
+ record: rec.record,
84
+ databases: [first, ...rest],
85
+ entries: entriesOfDatabases(rec.databases),
86
+ typeset: bibtex.keys,
87
+ },
88
+ };
89
+ }
90
+ /** `readBibliography` over `deps`, as a `ReadBibliography`. */
91
+ export const bibliographyReader = (deps) => (dir) => readBibliography(dir, deps);
92
+ /** No reader: the build was not given one. Never "no bibliography" — it says so. */
93
+ export const notWiredBibliography = () => ({
94
+ kind: "not-wired",
95
+ });
96
+ /**
97
+ * The keys bibtex typeset that no entry the reader read has — an entry behind `%` or inside
98
+ * `@comment{…}`, which bibtex reads and the reader does not. In the order bibtex typeset them, each
99
+ * once. bibtex's keys are case-insensitive (`\cite{SMITH}` typesets `\bibitem{SMITH}` from an entry
100
+ * `smith`, measured), so they are compared so.
101
+ */
102
+ export function unseenKeys(b) {
103
+ const read = new Set(b.entries.map((e) => e.entry.key.toLowerCase()));
104
+ return distinctBy(b.typeset.filter((k) => !read.has(k.toLowerCase())), (k) => k.toLowerCase());
55
105
  }
56
- export const bibHash = (b) => sha256Hex(new TextEncoder().encode(b.text));
106
+ /** The bytes of the databases checked, in order: what a later lint compares to see the verdicts are current. */
107
+ export const bibHash = (b) => sha256Hex(new TextEncoder().encode(b.databases
108
+ .map((d) => d.bib.text.slice(d.bib.body.start, d.bib.body.end))
109
+ .join("\n")));
57
110
  export const documentOf = (bib, check) => ({
58
111
  schema: REFERENCES_SCHEMA,
59
- bib: { source: bib.source, sha256: bibHash(bib) },
112
+ bib: {
113
+ sources: bib.databases.map((d) => d.name),
114
+ sha256: bibHash(bib),
115
+ },
60
116
  ...(check.kind === "checked"
61
117
  ? { status: "checked", entries: check.entries }
62
118
  : { status: "not-checked", why: check.why, entries: [] }),
@@ -97,25 +153,49 @@ const newAnswers = (before, after) => {
97
153
  return (changed(before.citations, after.citations) +
98
154
  changed(before.dblp, after.dblp));
99
155
  };
100
- /** Run the checker; a throw is `not-checked`, with the cache as it was. */
156
+ /** Run the checker over the bibliography's entries; a throw is `not-checked`, with the cache as it was. */
101
157
  async function run(check, bib, cache) {
102
158
  try {
103
- return await check(bib, cache);
159
+ return await check(bib.entries.map((f) => f.entry), cache);
104
160
  }
105
161
  catch (e) {
106
162
  return { check: { kind: "not-checked", why: messageOf(e) }, cache };
107
163
  }
108
164
  }
165
+ /** Why the build's record cannot say which databases were read, in the words a note carries. */
166
+ function noRecord(r) {
167
+ switch (r.kind) {
168
+ case "none":
169
+ return r.unreadable === null
170
+ ? "the build recorded no sources (_build/sources.json was not written)"
171
+ : `_build/sources.json cannot be used (${r.unreadable})`;
172
+ case "stale":
173
+ return `the paper changed since the build recorded it (${describeChanges(r.changed)})`;
174
+ }
175
+ }
176
+ /** The note for a paper whose bibliography was not read. */
177
+ function unreadNote(read) {
178
+ switch (read.kind) {
179
+ case "no-record":
180
+ return `references NOT checked — ${noRecord(read.record)}; lint will say so`;
181
+ case "nothing":
182
+ return "no bibliography database — bibtex opened none, nothing to check";
183
+ case "unread":
184
+ return `references NOT checked — ${read.databases.join(", ")}, which bibtex opened, is not in the paper directory; lint will say so`;
185
+ case "not-wired":
186
+ return "references NOT checked — no bibliography reader was wired into this build; lint will say so";
187
+ }
188
+ }
109
189
  /**
110
- * The build step's work: check the bibliography, serving what it can from the paper's lookup
111
- * cache, and record the verdicts. Returns the one-line note the build prints. A checker that
112
- * throws, or a cache that does not parse, is recorded as `not-checked` — the step reports, it
113
- * never refuses. A cache that does not parse is left as it is, and named.
190
+ * The build step's work: check the bibliography the build recorded, serving what it can from the
191
+ * paper's lookup cache, and record the verdicts. Returns the one-line note the build prints. A
192
+ * checker that throws, or a cache that does not parse, is recorded as `not-checked` — the step
193
+ * reports, it never refuses. A cache that does not parse is left as it is, and named.
114
194
  */
115
- export async function recordReferences(files, paperDir, check) {
116
- const bib = bibliographyOf(files, paperDir);
117
- if (bib === null)
118
- return "no bibliography — nothing to check";
195
+ export async function recordReferences(files, paperDir, read, check) {
196
+ if (read.kind !== "read")
197
+ return unreadNote(read);
198
+ const bib = read.bibliography;
119
199
  const record = (c) => {
120
200
  const doc = documentOf(bib, c);
121
201
  files.writeAtomic(callerPath(referencesPath(paperDir)), new TextEncoder().encode(`${JSON.stringify(doc, null, 2)}\n`));
@@ -128,13 +208,17 @@ export async function recordReferences(files, paperDir, check) {
128
208
  const cache = readLookupCache(files, paperDir);
129
209
  if (!cache.ok)
130
210
  return notChecked(`${LOOKUP_CACHE_FILE} cannot be read (${cache.error}) — fix it, or delete it to ask every question again`);
131
- const result = await run(check, bib.text, cache.value);
211
+ const result = await run(check, bib, cache.value);
132
212
  if (result.check.kind === "not-checked")
133
213
  return notChecked(result.check.why);
134
214
  const doc = record(result.check);
135
215
  const fetched = newAnswers(cache.value, result.cache);
136
216
  if (fetched > 0)
137
217
  files.writeAtomic(callerPath(lookupCachePath(paperDir)), new TextEncoder().encode(serializeLookupCache(result.cache)));
218
+ return summary(doc, fetched);
219
+ }
220
+ /** The note a checked run prints: how many entries, how many failing, what was fetched. */
221
+ function summary(doc, fetched) {
138
222
  const bad = doc.entries.filter((e) => e.exists === "false" || e.authors === "mismatch").length;
139
223
  return (`references: ${String(doc.entries.length)} checked, ${String(bad)} failing → _build/${REFERENCES_FILE}; ` +
140
224
  (fetched > 0
@@ -1 +1 @@
1
- {"version":3,"file":"references.js","sourceRoot":"","sources":["../src/references.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,OAAO,EAAE,IAAI,EAAE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C;AAC/B,CAAC;AAED,2FAA2F;AAC3F,SAAS,OAAO,CAAC,GAAuB,EAAE,OAAe;IACvD,MAAM,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,MAAM,CAC5B,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,OAAO,IAAI,CAAC,CAAC,OAAO,KAAK,UAAU,CACxD,CAAC,MAAM,CAAC;IACT,OAAO,CACL,eAAe,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,aAAa,MAAM,CAAC,GAAG,CAAC,qBAAqB,eAAe,IAAI;QACzG,CAAC,OAAO,GAAG,CAAC;YACV,CAAC,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,cAAc,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,MAAM,iBAAiB,EAAE;YACnF,CAAC,CAAC,iBAAiB,CAAC,CACvB,CAAC;AACJ,CAAC"}
@@ -1,11 +1,11 @@
1
1
  import { type Band, type Occurrence, type RegisterAnchor } from "./domain/register.ts";
2
2
  import type { Span } from "./domain/tex-document.ts";
3
3
  import type { LatexReader } from "./ports/latex.ts";
4
+ import { type ProseDeps } from "./tex-paper.ts";
4
5
  import { type Located, type TexRuleModule } from "./tex-venue-rules.ts";
5
6
  import type { VenueRuleDeps } from "./venue-rules.ts";
6
- /** What the three rules read: the preset store, and the LaTeX reader. */
7
- export interface RegisterBandDeps extends VenueRuleDeps {
8
- readonly latex: LatexReader;
7
+ /** What the three rules read: the preset store, the LaTeX reader, and the paper's files as the build recorded them. */
8
+ export interface RegisterBandDeps extends VenueRuleDeps, ProseDeps {
9
9
  }
10
10
  export type RegisterBandRuleName = "contrast-frames" | "claim-emphasis" | "relation-markers";
11
11
  /** What one body measures for one rule: its words, the occurrences, where the body starts. */
@@ -1 +1 @@
1
- {"version":3,"file":"register-bands.d.ts","sourceRoot":"","sources":["../src/register-bands.ts"],"names":[],"mappings":"AAyBA,OAAO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AI,CAAC;KACnD,CAAC;AACJ,CAAC;AAED,qFAAqF;AACrF,MAAM,CAAC,MAAM,yBAAyB,GAElC;IACF,qBAAqB,EAAE,MAAM;IAC7B,oBAAoB,EAAE,MAAM;IAC5B,sBAAsB,EAAE,MAAM;CAC/B,CAAC"}
@@ -16,7 +16,7 @@
16
16
  * the page. A body under 2 000 words is not judged: there one sentence decides the rate.
17
17
  */
18
18
  import type { Passage, Span } from "./domain/tex-document.ts";
19
- import { type PaperDeps } from "./tex-paper.ts";
19
+ import { type ProseDeps } from "./tex-paper.ts";
20
20
  import { type Located, type TexRuleModule } from "./tex-venue-rules.ts";
21
21
  /** Under this many words in the body, a rate is not judged: one sentence would decide it. */
22
22
  export declare const MIN_WORDS = 2000;
@@ -38,5 +38,5 @@ export declare function measureRegister(passages: readonly Passage[]): RegisterM
38
38
  /** One finding, at the start of the body, when the rate runs above `limit` per 1000 words. */
39
39
  export declare function judgeRegister(m: RegisterMeasure, limit?: number): readonly Located[];
40
40
  /** The rule, over the body's prose of the whole paper, its includes spliced (`readPaper`). */
41
- export declare const registerRule: (deps: PaperDeps) => TexRuleModule;
41
+ export declare const registerRule: (deps: ProseDeps) => TexRuleModule;
42
42
  //# sourceMappingURL=register.d.ts.map
@@ -0,0 +1,38 @@
1
+ import { type SourcesRecord } from "./domain/sources-record.ts";
2
+ import type { Files } from "./ports/files.ts";
3
+ import type { ListDir } from "./ports/talk-media.ts";
4
+ import type { TexOutput } from "./ports/tex-output.ts";
5
+ /** What recording needs: the disk, its directory listings, and the readers of TeX's own files. */
6
+ export interface RecordDeps {
7
+ readonly files: Files;
8
+ readonly listDir: ListDir;
9
+ readonly texOutput: TexOutput;
10
+ }
11
+ /** What a build's passes left to read, besides the files on disk. */
12
+ export interface TexRun {
13
+ /** The text of each pdflatex pass's `.fls`, in the order the passes ran. */
14
+ readonly fls: readonly string[];
15
+ /** The exit of the last bibtex run, or null when the build ran none. */
16
+ readonly bibtexExit: number | null;
17
+ }
18
+ export type Recorded = {
19
+ readonly kind: "recorded";
20
+ readonly record: SourcesRecord;
21
+ /** Where it was written. */
22
+ readonly path: string;
23
+ } | {
24
+ readonly kind: "not-recorded";
25
+ readonly why: string;
26
+ };
27
+ /** The step as the build holds it: wired by the composition root, handed a paper's directory and its run. */
28
+ export type RecordSources = (paperDir: string, run: TexRun) => Recorded;
29
+ /** No recorder wired: the build says so, and lint reports the paper as not built. */
30
+ export declare const notWiredRecord: RecordSources;
31
+ /** Where a paper's record lives. */
32
+ export declare const sourcesPath: (paperDir: string) => string;
33
+ export declare function recordSources(deps: RecordDeps, paperDir: string, run: TexRun): Recorded;
34
+ /** `recordSources` over `deps`, as the `RecordSources` the build is handed. */
35
+ export declare const sourcesRecorder: (deps: RecordDeps) => RecordSources;
36
+ /** The line a build prints for a recording. */
37
+ export declare const recordingNote: (r: Recorded) => string;
38
+ //# sourceMappingURL=sources-record.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sources-record.d.ts","sourceRoot":"","sources":["../src/sources-record.ts"],"names":[],"mappings":"AAeA,OAAO,EASL,KAAK,aAAa,EACnB,MAAM,4BAA4B,CAAC;AAIpC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEvD,kGAAkG;AAClG,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;CAC/B;AAED,qEAAqE;AACrE,MAAM,WAAW,MAAM;IACrB,4EAA4E;IAC5E,QAAQ,CAAC,GAAG,EAAE,SAAS,MAAM,EAAE,CAAC;IAChC,wEAAwE;IACxE,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CACpC;AAED,MAAM,MAAM,QAAQ,GAChB;IACE,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;IAC/B,4BAA4B;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB,GACD;IAAE,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC;AAE5D,6GAA6G;AAC7G,MAAM,MAAM,aAAa,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,QAAQ,CAAC;AAExE,qFAAqF;AACrF,eAAO,MAAM,cAAc,EAAE,aAG3B,CAAC;AAEH,oCAAoC;AACpC,eAAO,MAAM,WAAW,GAAI,UAAU,MAAM,KAAG,MACJ,CAAC;AAiI5C,wBAAgB,aAAa,CAC3B,IAAI,EAAE,UAAU,EAChB,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,MAAM,GACV,QAAQ,CAiBV;AAED,+EAA+E;AAC/E,eAAO,MAAM,eAAe,GACzB,MAAM,UAAU,KAAG,aAEgB,CAAC;AAEvC,+CAA+C;AAC/C,eAAO,MAAM,aAAa,GAAI,GAAG,QAAQ,KAAG,MAGa,CAAC"}
@@ -0,0 +1,123 @@
1
+ /**
2
+ * THE RECORD STEP OF A BUILD — `recordSources` writes `<paper>/_build/sources.json`
3
+ * (`src/domain/sources-record.ts`, docs/design/paper-sources.md §1) from what TeX and bibtex left in
4
+ * the paper directory after the build's passes: each pass's `.fls`, the `.aux`, the `.blg` and the
5
+ * `.bbl`. The files are read through the `Files` port, the `.fls` and the `.blg` through `TexOutput`;
6
+ * which files the passes read is decided by `filesOfRun` (`src/domain/tex-run.ts`).
7
+ *
8
+ * Nothing here reads TeX source. Every file named in the record is one TeX or bibtex opened, and its
9
+ * bytes are hashed as they are now: what a rule compares later to know whether the paper changed.
10
+ *
11
+ * What the `.aux`, `.blg` and `.bbl` hold about the bibliography is read by `latex-log.ts` — the reader
12
+ * the build loop already uses on them, so one reader answers what bibtex was told and what it read.
13
+ */
14
+ import { join, posix, resolve } from "node:path";
15
+ import { callerPath } from "./caller-path.js";
16
+ import { JOBNAME, serializeSourcesRecord, SOURCES_DIR, SOURCES_FILE, SOURCES_SCHEMA, spelledIn, } from "./domain/sources-record.js";
17
+ import { sha256Hex } from "./domain/sha256.js";
18
+ import { filesOfRun } from "./domain/tex-run.js";
19
+ import { auxBib, bibtexRead } from "./latex-log.js";
20
+ /** No recorder wired: the build says so, and lint reports the paper as not built. */
21
+ export const notWiredRecord = () => ({
22
+ kind: "not-recorded",
23
+ why: "no recorder was wired into this build",
24
+ });
25
+ /** Where a paper's record lives. */
26
+ export const sourcesPath = (paperDir) => join(paperDir, SOURCES_DIR, SOURCES_FILE);
27
+ const distinct = (xs) => [...new Set(xs)];
28
+ /** A path as the record spells it: relative to the paper directory, `./` and doubled slashes gone. */
29
+ const spelled = (p) => posix.normalize(p);
30
+ /**
31
+ * A path of the record spelled as the paper directory's entries spell it. TeX logs the name it opened:
32
+ * on a file system that ignores case that is the source's spelling, while TeX on one that does not
33
+ * retries without case and logs the disk's — one paper, two records. A segment no entry matches, or
34
+ * several do, stays as TeX spelled it.
35
+ */
36
+ const spelledOnDisk = (listDir, paperDir) => (p) => p
37
+ .split("/")
38
+ .reduce((at, segment) => posix.join(at, spelledIn(listDir(callerPath(resolve(paperDir, at))), segment) ??
39
+ segment), "");
40
+ /** The files a run read and wrote, each named as the disk names it. */
41
+ const respelled = (files, spell) => {
42
+ const inputs = files.inputs.map((i) => ({ ...i, path: spell(i.path) }));
43
+ return {
44
+ ...files,
45
+ inputs: inputs.filter((i, n) => inputs.findIndex((j) => j.path === i.path) === n),
46
+ written: distinct(files.written.map(spell)),
47
+ };
48
+ };
49
+ /** The bytes of a file of the paper by its path in the record, or null when it is not there. */
50
+ const bytesOf = (deps, paperDir) => (p) => deps.files.readBytes(callerPath(resolve(paperDir, p)));
51
+ const textOf = (bytes) => (p) => {
52
+ const b = bytes(p);
53
+ return b === null ? null : new TextDecoder().decode(b);
54
+ };
55
+ /** What the build's bibtex did, from the `.blg` and `.bbl` it left — or that it did not run. */
56
+ function bibtexOf(deps, text, spell, exit) {
57
+ if (exit === null)
58
+ return { ran: false };
59
+ const blg = text(`${JOBNAME}.blg`) ?? "";
60
+ const bbl = text(`${JOBNAME}.bbl`) ?? "";
61
+ const read = bibtexRead(blg, bbl);
62
+ return {
63
+ ran: true,
64
+ databases: distinct(read.databases.map((d) => spell(spelled(d)))),
65
+ keys: read.bibitems,
66
+ exit,
67
+ errors: deps.texOutput.blgErrors(blg),
68
+ };
69
+ }
70
+ /**
71
+ * The digest of every file the paper is made of: each input, and each database bibtex opened — one TeX
72
+ * wrote too, since the rules read it from disk and an edit to it after the build must read as a change.
73
+ * Null for one that is not there.
74
+ */
75
+ function hashesOf(inputs, databases, bytes) {
76
+ const paths = distinct([...inputs.map((i) => i.path), ...databases]);
77
+ return Object.fromEntries(paths.map((p) => {
78
+ const b = bytes(p);
79
+ return [p, b === null ? null : sha256Hex(b)];
80
+ }));
81
+ }
82
+ /** Why there is nothing to record, or null when the passes read the paper's files. */
83
+ const nothingToRecord = (run, inputs) => {
84
+ if (run.fls.length === 0)
85
+ return `pdflatex wrote no ${JOBNAME}.fls — nothing to record`;
86
+ return inputs.length === 0
87
+ ? `${JOBNAME}.fls lists no file of the paper directory — nothing to record`
88
+ : null;
89
+ };
90
+ /** The record of a run whose passes read `files`: bibtex's part, the `.aux`'s, every digest. */
91
+ function recordOf(deps, paperDir, run, files) {
92
+ const bytes = bytesOf(deps, paperDir);
93
+ const text = textOf(bytes);
94
+ const bibtex = bibtexOf(deps, text, spelledOnDisk(deps.listDir, paperDir), run.bibtexExit);
95
+ return {
96
+ schema: SOURCES_SCHEMA,
97
+ inputs: files.inputs,
98
+ written: files.written,
99
+ bibdata: auxBib(text(`${JOBNAME}.aux`) ?? "", text).databases,
100
+ bibtex,
101
+ sha256: hashesOf(files.inputs, bibtex.ran ? bibtex.databases : [], bytes),
102
+ };
103
+ }
104
+ export function recordSources(deps, paperDir, run) {
105
+ const files = respelled(filesOfRun(run.fls.map(deps.texOutput.fls), {
106
+ jobname: JOBNAME,
107
+ generated: run.bibtexExit === null ? [] : [`${JOBNAME}.bbl`],
108
+ }), spelledOnDisk(deps.listDir, paperDir));
109
+ const why = nothingToRecord(run, files.inputs);
110
+ if (why !== null)
111
+ return { kind: "not-recorded", why };
112
+ const record = recordOf(deps, paperDir, run, files);
113
+ const path = sourcesPath(paperDir);
114
+ deps.files.writeAtomic(callerPath(path), new TextEncoder().encode(serializeSourcesRecord(record)));
115
+ return { kind: "recorded", record, path };
116
+ }
117
+ /** `recordSources` over `deps`, as the `RecordSources` the build is handed. */
118
+ export const sourcesRecorder = (deps) => (paperDir, run) => recordSources(deps, paperDir, run);
119
+ /** The line a build prints for a recording. */
120
+ export const recordingNote = (r) => r.kind === "recorded"
121
+ ? `sources: ${String(r.record.inputs.length)} file${r.record.inputs.length === 1 ? "" : "s"} read → ${SOURCES_DIR}/${SOURCES_FILE}`
122
+ : `sources NOT recorded — ${r.why}; lint will say so`;
123
+ //# sourceMappingURL=sources-record.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sources-record.js","sourceRoot":"","sources":["../src/sources-record.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EACL,OAAO,EACP,sBAAsB,EACtB,WAAW,EACX,YAAY,EACZ,cAAc,EACd,SAAS,GAIV,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAiB,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,MAA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EAAE,CAAC;IACvD,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;IACpD,MAAM,IAAI,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC;IACnC,IAAI,CAAC,KAAK,CAAC,WAAW,CACpB,UAAU,CAAC,IAAI,CAAC,EAChB,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,sBAAsB,CAAC,MAAM,CAAC,CAAC,CACzD,CAAC;IACF,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;AAC5C,CAAC;AAED,+EAA+E;AAC/E,MAAM,CAAC,MAAM,eAAe,GAC1B,CAAC,IAAgB,EAAiB,EAAE,CACpC,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE,CAChB,aAAa,CAAC,IAAI,EAAE,QAAQ,EAAE,GAAG,CAAC,CAAC;AAEvC,+CAA+C;AAC/C,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAW,EAAU,EAAE,CACnD,CAAC,CAAC,IAAI,KAAK,UAAU;IACnB,CAAC,CAAC,YAAY,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,WAAW,WAAW,IAAI,YAAY,EAAE;IACnI,CAAC,CAAC,0BAA0B,CAAC,CAAC,GAAG,oBAAoB,CAAC"}
@@ -0,0 +1,44 @@
1
+ import { type RecordReadDeps } from "./paper-record.ts";
2
+ /** One finding: its message, and the values the message names. */
3
+ interface Finding {
4
+ readonly messageId: string;
5
+ readonly data?: Readonly<Record<string, string>>;
6
+ }
7
+ interface Loc {
8
+ readonly line: number;
9
+ readonly column: number;
10
+ }
11
+ interface RuleContext {
12
+ readonly filename: string;
13
+ readonly sourceCode: {
14
+ getLocFromIndex(i: number): Loc;
15
+ };
16
+ report(d: Finding & {
17
+ readonly loc: Readonly<{
18
+ start: Loc;
19
+ end: Loc;
20
+ }>;
21
+ }): void;
22
+ }
23
+ export interface SourcesRuleModule {
24
+ readonly meta: {
25
+ readonly type: "problem" | "suggestion";
26
+ readonly docs: {
27
+ readonly description: string;
28
+ readonly url: string;
29
+ };
30
+ readonly schema: readonly object[];
31
+ readonly messages: Readonly<Record<string, string>>;
32
+ };
33
+ create(context: RuleContext): {
34
+ "root:exit"?: () => void;
35
+ };
36
+ }
37
+ /** `paper/sources-fresh`, reading the paper through `deps`. It acts on `paper.tex` only. */
38
+ export declare function sourcesRules(deps: RecordReadDeps): Readonly<Record<"sources-fresh", SourcesRuleModule>>;
39
+ /** The level it is on at for every `paper.tex` in paperlint's own config. */
40
+ export declare const SOURCES_RULE_LEVELS: {
41
+ readonly "paper/sources-fresh": "warn";
42
+ };
43
+ export {};
44
+ //# sourceMappingURL=sources-rules.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sources-rules.d.ts","sourceRoot":"","sources":["../src/sources-rules.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAe,KAAK,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAErE,kEAAkE;AAClE,UAAU,OAAO;IACf,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CAClD;AAED,UAAU,GAAG;IACX,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AACD,UAAU,WAAW;IACnB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,UAAU,EAAE;QAAE,eAAe,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;IACzD,MAAM,CACJ,CAAC,EAAE,OAAO,GAAG;QAAE,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC;YAAE,KAAK,EAAE,GAAG,CAAC;YAAC,GAAG,EAAE,GAAG,CAAA;SAAE,CAAC,CAAA;KAAE,GAChE,IAAI,CAAC;CACT;AACD,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,EAAE;QACb,QAAQ,CAAC,IAAI,EAAE,SAAS,GAAG,YAAY,CAAC;QACxC,QAAQ,CAAC,IAAI,EAAE;YACb,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;YAC7B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;SACtB,CAAC;QACF,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;QACnC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;KACrD,CAAC;IACF,MAAM,CAAC,OAAO,EAAE,WAAW,GAAG;QAAE,WAAW,CAAC,EAAE,MAAM,IAAI,CAAA;KAAE,CAAC;CAC5D;AAuCD,4FAA4F;AAC5F,wBAAgB,YAAY,CAC1B,IAAI,EAAE,cAAc,GACnB,QAAQ,CAAC,MAAM,CAAC,eAAe,EAAE,iBAAiB,CAAC,CAAC,CAoBtD;AAED,6EAA6E;AAC7E,eAAO,MAAM,mBAAmB;;CAEtB,CAAC"}
@@ -0,0 +1,76 @@
1
+ /**
2
+ * `paper/sources-fresh` — the one finding for a paper whose build record cannot be used
3
+ * (docs/design/paper-sources.md §1, docs/rules/paper/sources-fresh.md). Every rule that needs to know
4
+ * which files make up the paper, or which bibliography TeX reads, reads `_build/sources.json`
5
+ * (`paperRecord`, `src/paper-record.ts`); when there is none, or the paper has changed since, they
6
+ * are silent and this rule speaks once instead:
7
+ *
8
+ * no record "not built" — run `npx paperlint build`
9
+ * a record this paperlint cannot read the reason, and the same command
10
+ * a file changed since the build which files, and the same command
11
+ *
12
+ * A warning, not an error, for the reason `pdf/measured` is one: lint often runs where nothing is
13
+ * built (the CI action only lints). Each message says what stays unchecked until a build: the files
14
+ * `paper.tex` includes are not linted, and the rules over the bibliography say nothing.
15
+ */
16
+ import { basename, dirname } from "node:path";
17
+ import { callerPath } from "./caller-path.js";
18
+ import { describeChanges } from "./domain/sources-record.js";
19
+ import { MAIN_FILE } from "./domain/paper-sources.js";
20
+ import { paperRecord } from "./paper-record.js";
21
+ const BUILD = "`npx paperlint build`";
22
+ const UNTIL = "until then the files `paper.tex` includes are not linted, and the rules that read the bibliography say nothing";
23
+ const META = {
24
+ type: "problem",
25
+ docs: {
26
+ description: "the build recorded which files TeX read, and the paper has not changed since (_build/sources.json)",
27
+ url: "https://github.com/zernie/paperlint/blob/main/docs/rules/paper/sources-fresh.md",
28
+ },
29
+ schema: [],
30
+ messages: {
31
+ notBuilt: `the paper has not been built — run ${BUILD}, which records the files TeX reads. Until it has, the files \`paper.tex\` includes are not linted, and the rules that read the bibliography say nothing`,
32
+ unreadable: `the last build's record cannot be used ({{why}}) — run ${BUILD}; ${UNTIL}`,
33
+ stale: `the paper changed since the last build ({{changed}}) — run ${BUILD}; ${UNTIL}`,
34
+ },
35
+ };
36
+ /** The finding for a paper's record, or none when it is current. */
37
+ function findingFor(dir, deps) {
38
+ const r = paperRecord(dir, deps);
39
+ switch (r.kind) {
40
+ case "none":
41
+ return r.unreadable === null
42
+ ? { messageId: "notBuilt" }
43
+ : { messageId: "unreadable", data: { why: r.unreadable } };
44
+ case "stale":
45
+ return {
46
+ messageId: "stale",
47
+ data: { changed: describeChanges(r.changed) },
48
+ };
49
+ case "fresh":
50
+ return null;
51
+ }
52
+ }
53
+ /** `paper/sources-fresh`, reading the paper through `deps`. It acts on `paper.tex` only. */
54
+ export function sourcesRules(deps) {
55
+ return {
56
+ "sources-fresh": {
57
+ meta: META,
58
+ create: (context) => basename(context.filename) !== MAIN_FILE
59
+ ? {}
60
+ : {
61
+ "root:exit": () => {
62
+ const f = findingFor(dirname(callerPath(context.filename)), deps);
63
+ if (f === null)
64
+ return;
65
+ const at = context.sourceCode.getLocFromIndex(0);
66
+ context.report({ loc: { start: at, end: at }, ...f });
67
+ },
68
+ },
69
+ },
70
+ };
71
+ }
72
+ /** The level it is on at for every `paper.tex` in paperlint's own config. */
73
+ export const SOURCES_RULE_LEVELS = {
74
+ "paper/sources-fresh": "warn",
75
+ };
76
+ //# sourceMappingURL=sources-rules.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sources-rules.js","sourceRoot":"","sources":["../src/sources-rules.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,WAAW,EAAuB,MAAM,mBAAmB,CAAC;AAgCrE,MAAM,KAAK,GAAG,uBAAuB,CAAC;AACtC,MAAM,KAAK,GACT,gHAAgH,CAAC;AAEnH,MAAM,IAAI,GAA8B;IACtC,IAAI,EAAE,SAAS;IACf,IAAI,EAAE;QACJ,WAAW,EACT,oGAAoG;QACtG,GAAG,EAAE,iFAAiF;KACvF;IACD,MAAM,EAAE,EAAE;IACV,QAAQ,EAAE;QACR,QAAQ,EAAE,sCAAsC,KAAK,0JAA0J;QAC/M,UAAU,EAAE,0DAA0D,KAAK,KAAK,KAAK,EAAE;QACvF,KAAK,EAAE,8DAA8D,KAAK,KAAK,KAAK,EAAE;KACvF;CACF,CAAC;AAEF,oEAAoE;AACpE,SAAS,UAAU,CAAC,GAAW,EAAE,IAAoB;IACnD,MAAM,CAAC,GAAG,WAAW,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IACjC,QAAQ,CAAC,CAAC,IAAI,EAAE,CAAC;QACf,KAAK,MAAM;YAC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