paperlint 18.6.0 → 18.8.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 (165) hide show
  1. package/.claude-plugin/marketplace.json +11 -0
  2. package/.claude-plugin/plugin.json +7 -0
  3. package/CLAUDE.md +3 -3
  4. package/CONTRIBUTING.md +5 -2
  5. package/README.md +6 -6
  6. package/dist/adapters/clack/index.d.ts +3 -0
  7. package/dist/adapters/clack/index.d.ts.map +1 -0
  8. package/dist/adapters/clack/index.js +3 -0
  9. package/dist/adapters/clack/index.js.map +1 -0
  10. package/dist/adapters/clack/prompts.io.d.ts +8 -0
  11. package/dist/adapters/clack/prompts.io.d.ts.map +1 -0
  12. package/dist/adapters/clack/prompts.io.js +20 -0
  13. package/dist/adapters/clack/prompts.io.js.map +1 -0
  14. package/dist/adapters/claude-code/claude.io.d.ts +13 -0
  15. package/dist/adapters/claude-code/claude.io.d.ts.map +1 -0
  16. package/dist/adapters/claude-code/claude.io.js +68 -0
  17. package/dist/adapters/claude-code/claude.io.js.map +1 -0
  18. package/dist/adapters/claude-code/index.d.ts +4 -0
  19. package/dist/adapters/claude-code/index.d.ts.map +1 -0
  20. package/dist/adapters/claude-code/index.js +4 -0
  21. package/dist/adapters/claude-code/index.js.map +1 -0
  22. package/dist/adapters/claude-code/plugin.d.ts +19 -0
  23. package/dist/adapters/claude-code/plugin.d.ts.map +1 -0
  24. package/dist/adapters/claude-code/plugin.js +66 -0
  25. package/dist/adapters/claude-code/plugin.js.map +1 -0
  26. package/dist/adapters/package-manager/index.d.ts +4 -0
  27. package/dist/adapters/package-manager/index.d.ts.map +1 -0
  28. package/dist/adapters/package-manager/index.js +4 -0
  29. package/dist/adapters/package-manager/index.js.map +1 -0
  30. package/dist/adapters/package-manager/install.io.d.ts +3 -0
  31. package/dist/adapters/package-manager/install.io.d.ts.map +1 -0
  32. package/dist/adapters/package-manager/install.io.js +23 -0
  33. package/dist/adapters/package-manager/install.io.js.map +1 -0
  34. package/dist/adapters/package-manager/manager.d.ts +13 -0
  35. package/dist/adapters/package-manager/manager.d.ts.map +1 -0
  36. package/dist/adapters/package-manager/manager.js +22 -0
  37. package/dist/adapters/package-manager/manager.js.map +1 -0
  38. package/dist/adapters/study-registry/index.d.ts +2 -2
  39. package/dist/cli.d.ts +9 -1
  40. package/dist/cli.d.ts.map +1 -1
  41. package/dist/cli.js +73 -13
  42. package/dist/cli.js.map +1 -1
  43. package/dist/doctor-plugin.d.ts +23 -0
  44. package/dist/doctor-plugin.d.ts.map +1 -0
  45. package/dist/doctor-plugin.js +56 -0
  46. package/dist/doctor-plugin.js.map +1 -0
  47. package/dist/doctor.d.ts +6 -1
  48. package/dist/doctor.d.ts.map +1 -1
  49. package/dist/doctor.js +69 -26
  50. package/dist/doctor.js.map +1 -1
  51. package/dist/hooks-settings.d.ts +18 -0
  52. package/dist/hooks-settings.d.ts.map +1 -1
  53. package/dist/hooks-settings.js +25 -0
  54. package/dist/hooks-settings.js.map +1 -1
  55. package/dist/init.d.ts +47 -16
  56. package/dist/init.d.ts.map +1 -1
  57. package/dist/init.js +231 -86
  58. package/dist/init.js.map +1 -1
  59. package/dist/link-skills.d.ts +15 -0
  60. package/dist/link-skills.d.ts.map +1 -1
  61. package/dist/link-skills.js +18 -1
  62. package/dist/link-skills.js.map +1 -1
  63. package/dist/plugin-offer.d.ts +73 -0
  64. package/dist/plugin-offer.d.ts.map +1 -0
  65. package/dist/plugin-offer.js +96 -0
  66. package/dist/plugin-offer.js.map +1 -0
  67. package/dist/ports/claude-code.d.ts +31 -0
  68. package/dist/ports/claude-code.d.ts.map +1 -0
  69. package/dist/ports/claude-code.js +2 -0
  70. package/dist/ports/claude-code.js.map +1 -0
  71. package/dist/ports/project-install.d.ts +19 -0
  72. package/dist/ports/project-install.d.ts.map +1 -0
  73. package/dist/ports/project-install.js +2 -0
  74. package/dist/ports/project-install.js.map +1 -0
  75. package/dist/ports/prompts.d.ts +31 -0
  76. package/dist/ports/prompts.d.ts.map +1 -0
  77. package/dist/ports/prompts.js +2 -0
  78. package/dist/ports/prompts.js.map +1 -0
  79. package/dist/self-install.d.ts +65 -0
  80. package/dist/self-install.d.ts.map +1 -0
  81. package/dist/self-install.js +145 -0
  82. package/dist/self-install.js.map +1 -0
  83. package/dist/skill-chunks/chunk-65X5HVIJ.js +26462 -0
  84. package/dist/skill-chunks/chunk-6NU6CXUS.js +258 -0
  85. package/dist/skill-chunks/chunk-GRSXIWYF.js +352 -0
  86. package/dist/skill-chunks/chunk-IREAROCV.js +84 -0
  87. package/dist/skill-chunks/chunk-KWK6RT4T.js +24267 -0
  88. package/dist/skill-chunks/chunk-NPQVDEE4.js +19681 -0
  89. package/dist/skill-chunks/chunk-PJ4KNV4J.js +45 -0
  90. package/dist/skill-chunks/dist-UPCJMLBM.js +385 -0
  91. package/dist/skill-chunks/pdfjs-LUMEFOH2.js +39518 -0
  92. package/dist/types.d.ts +4 -0
  93. package/dist/types.d.ts.map +1 -1
  94. package/docs/e2e.md +10 -0
  95. package/docs/install.md +88 -29
  96. package/docs/prior-art/README.md +2 -0
  97. package/docs/prior-art/one-command-install.md +33 -0
  98. package/docs/prior-art/prompt-libraries.md +32 -0
  99. package/eslint.config.mjs +1 -0
  100. package/hooks/CLAUDE.md +2 -2
  101. package/hooks/CLAUDE.md.spec.ts +1 -1
  102. package/lib/skill-checks.mjs +13 -6
  103. package/lib/skill-checks.test.mjs +28 -15
  104. package/lib/skill-corpus.mjs +5 -2
  105. package/package.json +8 -3
  106. package/plugin/CLAUDE.md +22 -14
  107. package/plugin/CLAUDE.md.spec.ts +20 -12
  108. package/scripts/bundle-skills.test.ts +226 -0
  109. package/scripts/bundle-skills.ts +304 -0
  110. package/scripts/plugin-version.test.ts +80 -0
  111. package/scripts/plugin-version.ts +58 -0
  112. package/skills/CLAUDE.md +2 -2
  113. package/skills/CLAUDE.md.spec.ts +1 -1
  114. package/skills/argument-arc/SKILL.md +2 -2
  115. package/skills/argument-arc/SKILL.md.spec.ts +1 -1
  116. package/skills/argument-arc/scripts/headings.js +57 -13
  117. package/skills/build-label-page/scripts/label-page.js +2005 -93
  118. package/skills/cold-read-diff/scripts/cold-read.js +221 -14
  119. package/skills/label-agent-runs/scripts/labels.js +272 -348
  120. package/skills/paper-pipeline/references/anonymization.md +4 -3
  121. package/skills/paper-pipeline/scripts/extract-ref-facts.js +304 -0
  122. package/skills/pc-panel-review/scripts/prior-reviews.js +7244 -12
  123. package/skills/run-agent-grid/scripts/grid-guard.js +562 -627
  124. package/skills/submit-paper/SKILL.md +5 -4
  125. package/skills/submit-paper/SKILL.md.spec.ts +4 -3
  126. package/skills/submit-paper/check-deanon.sh +17 -2
  127. package/skills/submit-paper/check-deanon.test.ts +141 -0
  128. package/skills/verify-citations/SKILL.md +9 -9
  129. package/skills/verify-citations/SKILL.md.spec.ts +8 -8
  130. package/skills/verify-citations/scripts/bib-authors.js +228 -0
  131. package/skills/verify-citations/scripts/verify-cites.js +816 -0
  132. package/src/adapters/clack/index.ts +2 -0
  133. package/src/adapters/clack/prompts.io.ts +35 -0
  134. package/src/adapters/clack/prompts.test.ts +58 -0
  135. package/src/adapters/claude-code/claude.io.ts +103 -0
  136. package/src/adapters/claude-code/index.test.ts +233 -0
  137. package/src/adapters/claude-code/index.ts +11 -0
  138. package/src/adapters/claude-code/plugin.ts +82 -0
  139. package/src/adapters/package-manager/index.test.ts +67 -0
  140. package/src/adapters/package-manager/index.ts +3 -0
  141. package/src/adapters/package-manager/install.io.ts +27 -0
  142. package/src/adapters/package-manager/manager.ts +33 -0
  143. package/src/cli.harness.mjs +47 -26
  144. package/src/cli.test.ts +179 -2
  145. package/src/cli.ts +130 -10
  146. package/src/doctor-plugin.test.ts +103 -0
  147. package/src/doctor-plugin.ts +83 -0
  148. package/src/doctor.test.ts +111 -2
  149. package/src/doctor.ts +83 -32
  150. package/src/hooks-notice.test.ts +82 -0
  151. package/src/hooks-settings.ts +49 -0
  152. package/src/init-plugin.test.ts +178 -0
  153. package/src/init.test.ts +138 -27
  154. package/src/init.ts +341 -124
  155. package/src/link-skills.test.ts +34 -1
  156. package/src/link-skills.ts +34 -0
  157. package/src/parse-args.test.ts +2 -0
  158. package/src/plugin-offer.test.ts +276 -0
  159. package/src/plugin-offer.ts +160 -0
  160. package/src/ports/claude-code.ts +30 -0
  161. package/src/ports/project-install.ts +18 -0
  162. package/src/ports/prompts.ts +27 -0
  163. package/src/self-install.test.ts +267 -0
  164. package/src/self-install.ts +224 -0
  165. package/src/types.ts +4 -0
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "paperlint",
3
+ "owner": { "name": "zernie" },
4
+ "plugins": [
5
+ {
6
+ "name": "paperlint",
7
+ "description": "Skills and hooks for writing a research paper with paperlint",
8
+ "source": { "source": "npm", "package": "paperlint" }
9
+ }
10
+ ]
11
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "name": "paperlint",
3
+ "version": "18.8.0",
4
+ "description": "Skills and hooks for writing a research paper with paperlint",
5
+ "skills": "./skills/",
6
+ "hooks": "./plugin/hooks/hooks.json"
7
+ }
package/CLAUDE.md CHANGED
@@ -1,4 +1,4 @@
1
- <!-- vigiles:sha256:55033670aec58dfb compiled from CLAUDE.md.spec.ts -->
1
+ <!-- vigiles:sha256:95d2ae05ac0791df compiled from CLAUDE.md.spec.ts -->
2
2
 
3
3
  # CLAUDE.md
4
4
 
@@ -93,11 +93,11 @@ Before writing machinery, **run the thing you are about to replace and paste its
93
93
 
94
94
  ### Installing Paperlint Is Smooth
95
95
 
96
- **Guidance only** — The target is `npm i` plus one command; any further manual step is a paperlint defect, except a choice that really belongs to the user, named when it is asked. An automatic step that can fail silently is worse than an explicit one.
96
+ **Guidance only** — The target is one command, `npx paperlint init`; any further manual step is a paperlint defect, except a choice that really belongs to the user, named when it is asked. An automatic step that can fail silently is worse than an explicit one.
97
97
 
98
98
  ### The Default Set Is What The Venue Decides
99
99
 
100
- **Guidance only** — paperlint is built for working scientists, so what is on by default must be very reliable. A check ships on by default only when the venue's own text decides it (page limit, template, anonymity, required sections, dates), when a desk reject or a broken build does (an undefined reference, a missing citation, a forbidden font), or when it holds for every paper whatever the venue (a universal fact, not a taste). Everything that flags the writing is opt-in: writing-preference rules (length caps, density, structure, register, style proxies), the skills and the hooks, and anything a careful author could dispute; its docs page says opt-in. A real author who installs paperlint should get no default finding they could reasonably disagree with. A rule moves into the default set only with evidence that a venue requires it, that it causes desk rejects, or that it holds for every paper. The same holds for what `paperlint init` installs: the build, the venue presets and the default-set rules, nothing opinionated; skills and hooks only on request (#510). The first named set, `paperlint:writing`, turns the writing rules on in one line (`src/rule-sets.ts`, `docs/optional-rules.md`); more sets, like ESLint's `recommended` and `strict`, are planned (#524). The author decided this on 2026-11-17, after a length cap set to error on a consumer paper forced its abstract into compression, and widened it on 2026-11-19.
100
+ **Guidance only** — paperlint is built for working scientists, so what is on by default must be very reliable. A check ships on by default only when the venue's own text decides it (page limit, template, anonymity, required sections, dates), when a desk reject or a broken build does (an undefined reference, a missing citation, a forbidden font), or when it holds for every paper whatever the venue (a universal fact, not a taste). Everything that flags the writing is opt-in: writing-preference rules (length caps, density, structure, register, style proxies), the skills and the hooks, and anything a careful author could dispute; its docs page says opt-in. A real author who installs paperlint should get no default finding they could reasonably disagree with. A rule moves into the default set only with evidence that a venue requires it, that it causes desk rejects, or that it holds for every paper. The same holds for what `paperlint init` installs: the build, the venue presets and the default-set rules, nothing opinionated. The skills and hooks come as the Claude Code plugin, which init offers only where Claude Code is: a human is asked once, Yes preselected; without a human nothing is turned on and one line names `npx paperlint init --plugin` (decided 2026-11-22, replacing #510). The first named set, `paperlint:writing`, turns the writing rules on in one line (`src/rule-sets.ts`, `docs/optional-rules.md`); more sets, like ESLint's `recommended` and `strict`, are planned (#524). The author decided this on 2026-11-17, after a length cap set to error on a consumer paper forced its abstract into compression, and widened it on 2026-11-19.
101
101
 
102
102
  ### An Optional Tool Stays Out Of The Way
103
103
 
package/CONTRIBUTING.md CHANGED
@@ -139,7 +139,7 @@ shrinks. Code that only this repository runs (tests, `scripts/`, `test/e2e/`) is
139
139
  run by `node` directly; code a consumer runs from `node_modules` needs a build first, because Node
140
140
  does not strip types there.
141
141
 
142
- `npm run build` is `tsc -b`: TypeScript's build mode over the project references in the root
142
+ `npm run build` is `tsc -b`, then the skill bundles: TypeScript's build mode over the project references in the root
143
143
  `tsconfig.json`, which is a solution file and compiles nothing itself. The three projects share
144
144
  `tsconfig.base.json`: `tsconfig.pkg.json` builds `lib/` and `eslint-rules/` to `dist/lib/` and
145
145
  `dist/eslint-rules/`; `tsconfig.src.json` builds `src/` to `dist/*.js` and references the first,
@@ -147,7 +147,10 @@ whose declarations it reads; `tsconfig.skills.json` compiles a skill's scripts
147
147
  (`skills/*/scripts/*.ts`) to a `.js` BESIDE each, gitignored and shipped through `files` (their
148
148
  declarations go to `dist/skills/`): a skill names its script as `${CLAUDE_SKILL_DIR}/scripts/<name>.js`,
149
149
  and only a path inside the skill's own directory resolves the same through the consumer's
150
- `.claude/skills/<name>` link and in this checkout. A second `tsc -b` with nothing changed is a no-op;
150
+ `.claude/skills/<name>` link and in this checkout. Then `scripts/bundle-skills.ts` replaces each
151
+ script a `SKILL.md` runs with an esbuild bundle at the same `.js` path (a `.mjs` script gets a `.js`
152
+ bundle beside it), its dependencies inside and shared code in `dist/skill-chunks/`, so it runs from a
153
+ plugin copy with no `node_modules` (`test/e2e/install/skill-scripts.e2e.ts`). A second `tsc -b` with nothing changed is a no-op;
151
154
  it decides that from `dist/.tsbuildinfo/`, so an output deleted by hand is rebuilt only by
152
155
  `npx tsc -b --force` (or by deleting `dist/` with it). `tsconfig.test.json` is not part of the build:
153
156
  it type-checks every `.ts` without emitting. Everything else imports `lib/` and `eslint-rules/` through the package's subpath imports,
package/README.md CHANGED
@@ -80,12 +80,12 @@ edition, and what is not shipped yet (USENIX, ICLR, IJCAI, Springer …): [`docs
80
80
 
81
81
  <!-- `vigiles:symbol src/init.ts#init` — `npm run check` fails if this function is renamed or removed. -->
82
82
 
83
- 1. Install (Node 22.13 or newer) and set up. `init` asks where your papers live (default
84
- `papers/`), whether to install TeX Live now, and whether to add a CI workflow; with Claude Code
85
- it also installs the skills and four hooks ([what they do](docs/install.md)).
83
+ 1. Install and set up, in one command (Node 22.13 or newer). `init` adds paperlint to your
84
+ project's devDependencies, then asks where your papers live (default `papers/`), whether to
85
+ install TeX Live now, and whether to add a CI workflow; with Claude Code it offers the optional
86
+ plugin with the skills and hooks ([what they do](docs/install.md#the-claude-code-plugin)).
86
87
 
87
88
  ```sh
88
- npm i -D paperlint
89
89
  npx paperlint init
90
90
  ```
91
91
 
@@ -267,8 +267,8 @@ Both workflows in full, with the TeX Live cache: [`docs/ci.md`](docs/ci.md).
267
267
  ## ❓ FAQ
268
268
 
269
269
  **Does it install anything without asking?**
270
- No. TeX Live comes only from `paperlint toolchain`, or when you say yes in `init` or `build`. On
271
- Windows, install TeX Live yourself.
270
+ Only paperlint itself, into devDependencies (asked first at a terminal). TeX Live comes only from
271
+ `paperlint toolchain`, or a yes in `init` or `build`; on Windows, install it yourself.
272
272
 
273
273
  **Several papers for different venues in one repo?**
274
274
  Yes. Each paper names its own venue preset in its own `paperlint.json`.
@@ -0,0 +1,3 @@
1
+ /** @clack/prompts, as the `Prompts` port `paperlint init` asks its questions through. */
2
+ export { clackPrompts } from "./prompts.io.ts";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/adapters/clack/index.ts"],"names":[],"mappings":"AAAA,yFAAyF;AACzF,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,3 @@
1
+ /** @clack/prompts, as the `Prompts` port `paperlint init` asks its questions through. */
2
+ export { clackPrompts } from "./prompts.io.js";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/adapters/clack/index.ts"],"names":[],"mappings":"AAAA,yFAAyF;AACzF,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { Readable, Writable } from "node:stream";
2
+ import type { Prompts } from "../../ports/prompts.ts";
3
+ /** The terminal's streams by default; a test passes its own. */
4
+ export declare const clackPrompts: (streams?: {
5
+ readonly input?: Readable;
6
+ readonly output?: Writable;
7
+ }) => Prompts;
8
+ //# sourceMappingURL=prompts.io.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompts.io.d.ts","sourceRoot":"","sources":["../../../src/adapters/clack/prompts.io.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,KAAK,EAAU,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAM9D,gEAAgE;AAChE,eAAO,MAAM,YAAY,GACvB,UAAS;IAAE,QAAQ,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,QAAQ,CAAA;CAAO,KACtE,OAkBD,CAAC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * The `Prompts` port drawn by @clack/prompts, the one prompt library of this package (chosen on
3
+ * 2026-11-22: `docs/prior-art/prompt-libraries.md`). Clack's cancel (Ctrl+C, Esc) is a symbol;
4
+ * it becomes the port's `cancel`, so nothing outside this folder knows the symbol exists.
5
+ */
6
+ import { confirm, select, text } from "@clack/prompts";
7
+ /** Clack answers with the value or with its one symbol, the cancel (`isCancel` tests the same). */
8
+ const answer = (value) => typeof value === "symbol" ? { kind: "cancel" } : { kind: "answer", value };
9
+ /** The terminal's streams by default; a test passes its own. */
10
+ export const clackPrompts = (streams = {}) => ({
11
+ confirm: async ({ message, initial }) => answer(await confirm({ ...streams, message, initialValue: initial })),
12
+ select: async ({ message, options, initial }) => answer(await select({
13
+ ...streams,
14
+ message,
15
+ options: options.map((value) => ({ value, label: value })),
16
+ initialValue: initial,
17
+ })),
18
+ text: async ({ message, placeholder }) => answer(await text({ ...streams, message, placeholder, defaultValue: "" })),
19
+ });
20
+ //# sourceMappingURL=prompts.io.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompts.io.js","sourceRoot":"","sources":["../../../src/adapters/clack/prompts.io.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAIvD,mGAAmG;AACnG,MAAM,MAAM,GAAG,CAA6B,KAAiB,EAAa,EAAE,CAC1E,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;AAE7E,gEAAgE;AAChE,MAAM,CAAC,MAAM,YAAY,GAAG,CAC1B,UAAqE,EAAE,EAC9D,EAAE,CAAC,CAAC;IACb,OAAO,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CACtC,MAAM,CACJ,MAAM,OAAO,CAAC,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,CAAC,CAC9D;IACH,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CAC9C,MAAM,CACJ,MAAM,MAAM,CAAC;QACX,GAAG,OAAO;QACV,OAAO;QACP,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;QAC1D,YAAY,EAAE,OAAO;KACtB,CAAC,CACH;IACH,IAAI,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE,EAAE,EAAE,CACvC,MAAM,CACJ,MAAM,IAAI,CAAC,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,EAAE,EAAE,CAAC,CACnE;CACJ,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { ClaudeCode } from "../../ports/claude-code.ts";
2
+ /** Whether `file --version` runs and exits 0. */
3
+ export declare const onPath: (file: string) => boolean;
4
+ /** Runs `argv` in `cwd` with the terminal's streams; its exit status, null when it did not run. */
5
+ export declare const runInherit: ([file, ...args]: readonly [string, ...string[]], cwd: string) => number | null;
6
+ export interface ClaudeDeps {
7
+ /** Where Claude Code keeps the user's settings and plugins (`configDirOf`). */
8
+ readonly configDir: string;
9
+ readonly hasClaude: () => boolean;
10
+ readonly run: typeof runInherit;
11
+ }
12
+ export declare const claudeCode: ({ configDir, hasClaude, run, }?: Partial<ClaudeDeps>) => ClaudeCode;
13
+ //# sourceMappingURL=claude.io.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claude.io.d.ts","sourceRoot":"","sources":["../../../src/adapters/claude-code/claude.io.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,UAAU,EAAgB,MAAM,4BAA4B,CAAC;AAmB3E,iDAAiD;AACjD,eAAO,MAAM,MAAM,GAAI,MAAM,MAAM,KAAG,OAC4B,CAAC;AAEnE,mGAAmG;AACnG,eAAO,MAAM,UAAU,GACrB,iBAAiB,SAAS,CAAC,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC,EAC/C,KAAK,MAAM,KACV,MAAM,GAAG,IAA+D,CAAC;AAE5E,MAAM,WAAW,UAAU;IACzB,+EAA+E;IAC/E,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,EAAE,MAAM,OAAO,CAAC;IAClC,QAAQ,CAAC,GAAG,EAAE,OAAO,UAAU,CAAC;CACjC;AAgBD,eAAO,MAAM,UAAU,GAAI,iCAIxB,OAAO,CAAC,UAAU,CAAM,KAAG,UAgB5B,CAAC"}
@@ -0,0 +1,68 @@
1
+ /**
2
+ * `ClaudeCode` over the disk and the `claude` program.
3
+ *
4
+ * 🔴 TURNING THE PLUGIN ON IS `claude`'S OWN TWO COMMANDS WHEN `claude` IS ON PATH. Measured
5
+ * 2026-11-22 (Claude Code 2.1.330, a throwaway HOME): the settings keys alone
6
+ * (`extraKnownMarketplaces` + `enabledPlugins`, written by hand) leave `claude plugin list` empty, and
7
+ * a later `claude plugin install paperlint@paperlint --scope project` then fails with "Plugin
8
+ * \"paperlint\" not found in marketplace \"paperlint\"": the marketplace was never fetched. So with
9
+ * `claude` on PATH the commands run (they write the same keys). Without it the keys are written, so
10
+ * the project declares the plugin for every clone, and the report names the commands still owed.
11
+ */
12
+ import { spawnSync } from "node:child_process";
13
+ import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
14
+ import { homedir } from "node:os";
15
+ import { dirname, join } from "node:path";
16
+ import { isRecord } from "../../domain/record.js";
17
+ import { configDirOf, ENABLE_COMMANDS, enabledBy, installedVersion, withPlugin, } from "./plugin.js";
18
+ /** A JSON file's value; undefined when it is missing or does not parse. */
19
+ function readJson(path) {
20
+ try {
21
+ return JSON.parse(readFileSync(path, "utf8"));
22
+ }
23
+ catch {
24
+ return undefined;
25
+ }
26
+ }
27
+ /** Whether `file --version` runs and exits 0. */
28
+ export const onPath = (file) => spawnSync(file, ["--version"], { stdio: "ignore" }).status === 0;
29
+ /** Runs `argv` in `cwd` with the terminal's streams; its exit status, null when it did not run. */
30
+ export const runInherit = ([file, ...args], cwd) => spawnSync(file, args, { cwd, stdio: "inherit" }).status;
31
+ const settingsFile = (root) => join(root, ".claude", "settings.json");
32
+ const COMMANDS = ENABLE_COMMANDS.map((c) => c.join(" "));
33
+ /** Writes the plugin keys into the project's settings; the reason when the file is not JSON. */
34
+ function writeKeys(root) {
35
+ const path = settingsFile(root);
36
+ const raw = existsSync(path) ? readJson(path) : {};
37
+ if (!isRecord(raw))
38
+ return `${path} is not a JSON object`;
39
+ mkdirSync(dirname(path), { recursive: true });
40
+ writeFileSync(path, `${JSON.stringify(withPlugin(raw), null, 2)}\n`);
41
+ return null;
42
+ }
43
+ export const claudeCode = ({ configDir = configDirOf(process.env, homedir()), hasClaude = () => onPath("claude"), run = runInherit, } = {}) => ({
44
+ present: (root) => existsSync(join(root, ".claude")) || hasClaude(),
45
+ plugin: (root) => ({
46
+ enabled: enabledBy([
47
+ join(root, ".claude", "settings.local.json"),
48
+ settingsFile(root),
49
+ join(configDir, "settings.json"),
50
+ ].map(readJson)),
51
+ version: installedVersion(readJson(join(configDir, "plugins", "installed_plugins.json")), root),
52
+ }),
53
+ enable: (root) => enable(root, { hasClaude, run }),
54
+ });
55
+ /** `claude`'s two commands when it is on PATH; otherwise the keys, and the commands still owed. */
56
+ function enable(root, { hasClaude, run }) {
57
+ if (!hasClaude()) {
58
+ const bad = writeKeys(root);
59
+ return bad === null
60
+ ? { ok: true, wrote: settingsFile(root), owed: COMMANDS }
61
+ : { ok: false, reason: bad };
62
+ }
63
+ const failed = ENABLE_COMMANDS.find((argv) => run(argv, root) !== 0);
64
+ return failed === undefined
65
+ ? { ok: true, ran: COMMANDS }
66
+ : { ok: false, reason: `\`${failed.join(" ")}\` failed` };
67
+ }
68
+ //# sourceMappingURL=claude.io.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claude.io.js","sourceRoot":"","sources":["../../../src/adapters/claude-code/claude.io.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EACL,WAAW,EACX,eAAe,EACf,SAAS,EACT,gBAA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AAE,EAAE,CAAC;QACjB,MAAM,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;QAC5B,OAAO,GAAG,KAAK,IAAI;YACjB,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,YAAY,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE;YACzD,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;IACjC,CAAC;IACD,MAAM,MAAM,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IACrE,OAAO,MAAM,KAAK,SAAS;QACzB,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE;QAC7B,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC;AAC9D,CAAC"}
@@ -0,0 +1,4 @@
1
+ /** Claude Code: whether it is here, and the paperlint plugin's state in it, as the `ClaudeCode` port. */
2
+ export { claudeCode, onPath, runInherit } from "./claude.io.ts";
3
+ export { ENABLE_COMMANDS, MARKETPLACE_REPO, PLUGIN_ID, configDirOf, enabledBy, installedVersion, withPlugin, } from "./plugin.ts";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/adapters/claude-code/index.ts"],"names":[],"mappings":"AAAA,yGAAyG;AACzG,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAChE,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,SAAS,EACT,WAAW,EACX,SAAS,EACT,gBAAgB,EAChB,UAAU,GACX,MAAM,aAAa,CAAC"}
@@ -0,0 +1,4 @@
1
+ /** Claude Code: whether it is here, and the paperlint plugin's state in it, as the `ClaudeCode` port. */
2
+ export { claudeCode, onPath, runInherit } from "./claude.io.js";
3
+ export { ENABLE_COMMANDS, MARKETPLACE_REPO, PLUGIN_ID, configDirOf, enabledBy, installedVersion, withPlugin, } from "./plugin.js";
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/adapters/claude-code/index.ts"],"names":[],"mappings":"AAAA,yGAAyG;AACzG,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAChE,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,SAAS,EACT,WAAW,EACX,SAAS,EACT,gBAAgB,EAChB,UAAU,GACX,MAAM,aAAa,CAAC"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * The folder Claude Code keeps the user's settings and plugins in: `CLAUDE_CONFIG_DIR` when it is
3
+ * set (a second profile, for one), else `~/.claude`. Both the user settings and the install record
4
+ * live there, so both are read from the one answer.
5
+ */
6
+ export declare const configDirOf: (env: Readonly<Record<string, string | undefined>>, home: string) => string;
7
+ /** `<plugin>@<marketplace>`: both are named `paperlint`. */
8
+ export declare const PLUGIN_ID = "paperlint@paperlint";
9
+ /** The marketplace is this repository: `.claude-plugin/marketplace.json`. */
10
+ export declare const MARKETPLACE_REPO = "zernie/paperlint";
11
+ /** The two commands that turn the plugin on for a project, in order. */
12
+ export declare const ENABLE_COMMANDS: readonly (readonly [string, ...string[]])[];
13
+ /** The most specific file that names the plugin decides; `files` are ordered most specific first. */
14
+ export declare const enabledBy: (files: readonly unknown[]) => boolean;
15
+ /** The version installed for `root`: an entry for this project, else a user-scope one. */
16
+ export declare function installedVersion(json: unknown, root: string): string | null;
17
+ /** The settings with the marketplace declared and the plugin turned on; everything else kept. */
18
+ export declare const withPlugin: (settings: Readonly<Record<string, unknown>>) => Readonly<Record<string, unknown>>;
19
+ //# sourceMappingURL=plugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../src/adapters/claude-code/plugin.ts"],"names":[],"mappings":"AAWA;;;;GAIG;AACH,eAAO,MAAM,WAAW,GACtB,KAAK,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,EACjD,MAAM,MAAM,KACX,MAGF,CAAC;AAEF,4DAA4D;AAC5D,eAAO,MAAM,SAAS,wBAAwB,CAAC;AAE/C,6EAA6E;AAC7E,eAAO,MAAM,gBAAgB,qBAAqB,CAAC;AAEnD,wEAAwE;AACxE,eAAO,MAAM,eAAe,EAAE,SAAS,CAAC,SAAS,CAAC,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC,CAAC,EAWtE,CAAC;AAQF,qGAAqG;AACrG,eAAO,MAAM,SAAS,GAAI,OAAO,SAAS,OAAO,EAAE,KAAG,OACC,CAAC;AAExD,0FAA0F;AAC1F,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAQ3E;AAKD,iGAAiG;AACjG,eAAO,MAAM,UAAU,GACrB,UAAU,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,KAC1C,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAUjC,CAAC"}
@@ -0,0 +1,66 @@
1
+ /**
2
+ * What Claude Code's own files say about the paperlint plugin, read without touching them. Measured
3
+ * 2026-11-22 with Claude Code 2.1.330 (docs/prior-art/plugin-bundle-measurements.md):
4
+ * `claude plugin marketplace add <source> --scope project` writes `extraKnownMarketplaces.paperlint`
5
+ * into `.claude/settings.json`; `claude plugin install paperlint@paperlint --scope project` adds
6
+ * `enabledPlugins["paperlint@paperlint"]: true` there, and records the install in
7
+ * `~/.claude/plugins/installed_plugins.json` with its `scope`, `version` and `projectPath`.
8
+ */
9
+ import { join } from "node:path";
10
+ import { fieldOf, isRecord } from "../../domain/record.js";
11
+ /**
12
+ * The folder Claude Code keeps the user's settings and plugins in: `CLAUDE_CONFIG_DIR` when it is
13
+ * set (a second profile, for one), else `~/.claude`. Both the user settings and the install record
14
+ * live there, so both are read from the one answer.
15
+ */
16
+ export const configDirOf = (env, home) => {
17
+ const set = env["CLAUDE_CONFIG_DIR"];
18
+ return set === undefined || set === "" ? join(home, ".claude") : set;
19
+ };
20
+ /** `<plugin>@<marketplace>`: both are named `paperlint`. */
21
+ export const PLUGIN_ID = "paperlint@paperlint";
22
+ /** The marketplace is this repository: `.claude-plugin/marketplace.json`. */
23
+ export const MARKETPLACE_REPO = "zernie/paperlint";
24
+ /** The two commands that turn the plugin on for a project, in order. */
25
+ export const ENABLE_COMMANDS = [
26
+ [
27
+ "claude",
28
+ "plugin",
29
+ "marketplace",
30
+ "add",
31
+ MARKETPLACE_REPO,
32
+ "--scope",
33
+ "project",
34
+ ],
35
+ ["claude", "plugin", "install", PLUGIN_ID, "--scope", "project"],
36
+ ];
37
+ /** What one settings file says: on, off, or nothing. */
38
+ const says = (settings) => {
39
+ const v = fieldOf(fieldOf(settings, "enabledPlugins"), PLUGIN_ID);
40
+ return typeof v === "boolean" ? v : undefined;
41
+ };
42
+ /** The most specific file that names the plugin decides; `files` are ordered most specific first. */
43
+ export const enabledBy = (files) => files.map(says).find((v) => v !== undefined) ?? false;
44
+ /** The version installed for `root`: an entry for this project, else a user-scope one. */
45
+ export function installedVersion(json, root) {
46
+ const entries = fieldOf(fieldOf(json, "plugins"), PLUGIN_ID);
47
+ const list = Array.isArray(entries) ? entries : [];
48
+ const entry = list.find((e) => fieldOf(e, "projectPath") === root) ??
49
+ list.find((e) => fieldOf(e, "scope") === "user");
50
+ const version = fieldOf(entry, "version");
51
+ return typeof version === "string" ? version : null;
52
+ }
53
+ const recordOf = (v) => isRecord(v) ? v : {};
54
+ /** The settings with the marketplace declared and the plugin turned on; everything else kept. */
55
+ export const withPlugin = (settings) => ({
56
+ ...settings,
57
+ extraKnownMarketplaces: {
58
+ ...recordOf(settings["extraKnownMarketplaces"]),
59
+ paperlint: { source: { source: "github", repo: MARKETPLACE_REPO } },
60
+ },
61
+ enabledPlugins: {
62
+ ...recordOf(settings["enabledPlugins"]),
63
+ [PLUGIN_ID]: true,
64
+ },
65
+ });
66
+ //# sourceMappingURL=plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../../src/adapters/claude-code/plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAE3D;;;;GAIG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CACzB,GAAiD,EACjD,IAAY,EACJ,EAAE;IACV,MAAM,GAAG,GAAG,GAAG,CAAC,mBAAmB,CAAC,CAAC;IACrC,OAAO,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;AACvE,CAAC,CAAC;AAEF,4DAA4D;AAC5D,MAAM,CAAC,MAAM,SAAS,GAAG,qBAAqB,CAAC;AAE/C,6EAA6E;AAC7E,MAAM,CAAC,MAAM,gBAAgB,GAAG,kBAAkB,CAAC;AAEnD,wEAAwE;AACxE,MAAM,CAAC,MAAM,eAAe,GAAgD;IAC1E;QACE,QAAQ;QACR,QAAQ;QACR,aAAa;QACb,KAAK;QACL,gBAAgB;QAChB,SAAS;QACT,SAAS;KACV;IACD,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC;CACjE,CAAC;AAEF,wDAAwD;AACxD,MAAM,IAAI,GAAG,CAAC,QAAiB,EAAuB,EAAE;I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AC,CAAC,EAAE,CAAC;AAEvB,iGAAiG;AACjG,MAAM,CAAC,MAAM,UAAU,GAAG,CACxB,QAA2C,EACR,EAAE,CAAC,CAAC;IACvC,GAAG,QAAQ;IACX,sBAAsB,EAAE;QACtB,GAAG,QAAQ,CAAC,QAAQ,CAAC,wBAAwB,CAAC,CAAC;QAC/C,SAAS,EAAE,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,gBAAgB,EAAE,EAAE;KACpE;IACD,cAAc,EAAE;QACd,GAAG,QAAQ,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAC;QACvC,CAAC,SAAS,CAAC,EAAE,IAAI;KAClB;CACF,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ /** The project's package manager (npm, pnpm, yarn, bun), as the `ProjectInstall` port. */
2
+ export { projectInstall } from "./install.io.ts";
3
+ export { addCommand, managerOf, LOCKFILES, type Manager } from "./manager.ts";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/adapters/package-manager/index.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAC1F,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,OAAO,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,4 @@
1
+ /** The project's package manager (npm, pnpm, yarn, bun), as the `ProjectInstall` port. */
2
+ export { projectInstall } from "./install.io.js";
3
+ export { addCommand, managerOf, LOCKFILES } from "./manager.js";
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/adapters/package-manager/index.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAC1F,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAgB,MAAM,cAAc,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { ProjectInstall } from "../../ports/project-install.ts";
2
+ export declare const projectInstall: ProjectInstall;
3
+ //# sourceMappingURL=install.io.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"install.io.d.ts","sourceRoot":"","sources":["../../../src/adapters/package-manager/install.io.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAGrE,eAAO,MAAM,cAAc,EAAE,cAe5B,CAAC"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * `ProjectInstall` over the disk and the package manager's own program: the lockfiles are looked
3
+ * for in the project root, and the command runs there with the terminal's streams, so its progress
4
+ * and its errors reach the person who ran `paperlint init`.
5
+ */
6
+ import { spawnSync } from "node:child_process";
7
+ import { existsSync } from "node:fs";
8
+ import { join } from "node:path";
9
+ import { addCommand, managerOf } from "./manager.js";
10
+ export const projectInstall = {
11
+ command: (root, spec) => addCommand(managerOf((file) => existsSync(join(root, file))), spec),
12
+ run: (root, [file, ...args]) => {
13
+ const r = spawnSync(file, args, { cwd: root, stdio: "inherit" });
14
+ if (r.error)
15
+ return { ok: false, reason: r.error.message };
16
+ if (r.signal !== null)
17
+ return { ok: false, reason: `killed by ${r.signal}` };
18
+ return r.status === 0
19
+ ? { ok: true }
20
+ : { ok: false, reason: `exited ${String(r.status)}` };
21
+ },
22
+ };
23
+ //# sourceMappingURL=install.io.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"install.io.js","sourceRoot":"","sources":["../../../src/adapters/package-manager/install.io.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAErD,MAAM,CAAC,MAAM,cAAc,GAAmB;IAC5C,OAAO,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CACtB,UAAU,CACR,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,EACjD,IAAI,CACL;IACH,GAAG,EAAE,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,EAAE,EAAE;QAC7B,MAAM,CAAC,GAAG,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;QACjE,IAAI,CAAC,CAAC,KAAK;YAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;QAC3D,IAAI,CAAC,CAAC,MAAM,KAAK,IAAI;YACnB,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,aAAa,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC;QACxD,OAAO,CAAC,CAAC,MAAM,KAAK,CAAC;YACnB,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE;YACd,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;IAC1D,CAAC;CACF,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Which package manager a project uses, read from its lockfile, and how that manager adds a
3
+ * devDependency saved at an exact version. npm when no lockfile is there: it ships with Node.
4
+ */
5
+ import type { Argv } from "../../ports/project-install.ts";
6
+ export type Manager = "npm" | "pnpm" | "yarn" | "bun";
7
+ /** Each lockfile and its manager, in the order they are looked for. */
8
+ export declare const LOCKFILES: readonly (readonly [string, Manager])[];
9
+ /** The manager of the first lockfile `present` says is there; npm when none is. */
10
+ export declare const managerOf: (present: (file: string) => boolean) => Manager;
11
+ /** The command that adds `spec` to devDependencies with `manager`. */
12
+ export declare const addCommand: (manager: Manager, spec: string) => Argv;
13
+ //# sourceMappingURL=manager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../../../src/adapters/package-manager/manager.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gCAAgC,CAAC;AAE3D,MAAM,MAAM,OAAO,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,CAAC;AAEtD,uEAAuE;AACvE,eAAO,MAAM,SAAS,EAAE,SAAS,CAAC,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAM5D,CAAC;AAEF,mFAAmF;AACnF,eAAO,MAAM,SAAS,GAAI,SAAS,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,KAAG,OACN,CAAC;AAS1D,sEAAsE;AACtE,eAAO,MAAM,UAAU,GAAI,SAAS,OAAO,EAAE,MAAM,MAAM,KAAG,IAG3D,CAAC"}
@@ -0,0 +1,22 @@
1
+ /** Each lockfile and its manager, in the order they are looked for. */
2
+ export const LOCKFILES = [
3
+ ["package-lock.json", "npm"],
4
+ ["pnpm-lock.yaml", "pnpm"],
5
+ ["yarn.lock", "yarn"],
6
+ ["bun.lock", "bun"],
7
+ ["bun.lockb", "bun"],
8
+ ];
9
+ /** The manager of the first lockfile `present` says is there; npm when none is. */
10
+ export const managerOf = (present) => LOCKFILES.find(([file]) => present(file))?.[1] ?? "npm";
11
+ const ADD = {
12
+ npm: ["npm", "install", "--save-dev", "--save-exact"],
13
+ pnpm: ["pnpm", "add", "--save-dev", "--save-exact"],
14
+ yarn: ["yarn", "add", "--dev", "--exact"],
15
+ bun: ["bun", "add", "--dev", "--exact"],
16
+ };
17
+ /** The command that adds `spec` to devDependencies with `manager`. */
18
+ export const addCommand = (manager, spec) => {
19
+ const [file, ...flags] = ADD[manager];
20
+ return [file, ...flags, spec];
21
+ };
22
+ //# sourceMappingURL=manager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manager.js","sourceRoot":"","sources":["../../../src/adapters/package-manager/manager.ts"],"names":[],"mappings":"AAQA,uEAAuE;AACvE,MAAM,CAAC,MAAM,SAAS,GAA4C;IAChE,CAAC,mBAAmB,EAAE,KAAK,CAAC;IAC5B,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAC1B,CAAC,WAAW,EAAE,MAAM,CAAC;IACrB,CAAC,UAAU,EAAE,KAAK,CAAC;IACnB,CAAC,WAAW,EAAE,KAAK,CAAC;CACrB,CAAC;AAEF,mFAAmF;AACnF,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,OAAkC,EAAW,EAAE,CACvE,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC;AAE1D,MAAM,GAAG,GAAoC;IAC3C,GAAG,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,cAAc,CAAC;IACrD,IAAI,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,cAAc,CAAC;IACnD,IAAI,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,CAAC;IACzC,GAAG,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,CAAC;CACxC,CAAC;AAEF,sEAAsE;AACtE,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,OAAgB,EAAE,IAAY,EAAQ,EAAE;IACjE,MAAM,CAAC,IAAI,EAAE,GAAG,KAAK,CAAC,GAAG,GAAG,CAAC,OAAO,CAAC,CAAC;IACtC,OAAO,CAAC,IAAI,EAAE,GAAG,KAAK,EAAE,IAAI,CAAC,CAAC;AAChC,CAAC,CAAC"}
@@ -39,8 +39,8 @@ declare const study: z.ZodObject<{
39
39
  status: z.ZodEnum<{
40
40
  done: "done";
41
41
  dropped: "dropped";
42
- designing: "designing";
43
42
  running: "running";
43
+ designing: "designing";
44
44
  stopped: "stopped";
45
45
  superseded: "superseded";
46
46
  }>;
@@ -125,8 +125,8 @@ declare const registry: z.ZodObject<{
125
125
  status: z.ZodEnum<{
126
126
  done: "done";
127
127
  dropped: "dropped";
128
- designing: "designing";
129
128
  running: "running";
129
+ designing: "designing";
130
130
  stopped: "stopped";
131
131
  superseded: "superseded";
132
132
  }>;
package/dist/cli.d.ts CHANGED
@@ -38,6 +38,8 @@ import { type Parsed, type ConfigBlock, type RuleBlock } from "./rules-config.ts
38
38
  export { init };
39
39
  export { nextSteps } from "./init.ts";
40
40
  import { type LinkReport } from "./link-skills.ts";
41
+ import type { ProjectInstall } from "./ports/project-install.ts";
42
+ import type { ClaudeCode } from "./ports/claude-code.ts";
41
43
  import { type Upload } from "./submission-confirm-hook.ts";
42
44
  /** The config the user would otherwise write by hand. The data comes from `opts`, the mechanism is here. */
43
45
  export declare function buildConfig(opts: PaperlintConfig | undefined, texLanguage: unknown, papers?: PaperScope): ConfigBlock[];
@@ -190,6 +192,8 @@ interface HookOptions {
190
192
  readonly version?: string;
191
193
  /** What `paperlint doctor` reads to find unlinked skills; the disk by default. */
192
194
  readonly skillLinks?: (root: string) => LinkReport;
195
+ /** Whether the Claude Code plugin is on; the disk by default. */
196
+ readonly claude?: ClaudeCode;
193
197
  }
194
198
  /** The real spawner, narrowed to what `runHook` asks of it. */
195
199
  export declare const spawnHook: NonNullable<HookOptions["run"]>;
@@ -257,10 +261,14 @@ export declare function initTexLive(a: Args, { log, err, cwd, }: {
257
261
  readonly installed: () => boolean;
258
262
  readonly install: () => number;
259
263
  };
260
- export declare function run(argv: readonly string[], { log, err, cwd, now, checkReferences, loadTexLanguage, skillLinks, }?: {
264
+ export declare function run(argv: readonly string[], { log, err, cwd, now, checkReferences, loadTexLanguage, skillLinks, install, claude, }?: {
261
265
  log?: typeof console.log;
262
266
  err?: typeof console.error;
263
267
  cwd?: string;
268
+ /** How `init` adds paperlint to a project: the package manager by default; a test hands a fake. */
269
+ install?: ProjectInstall;
270
+ /** Claude Code as `init` and `doctor` see it: the disk and `claude` by default; a test hands a fake. */
271
+ claude?: ClaudeCode;
264
272
  /** The clock `lint` times itself with, in milliseconds; a test hands one that answers fixed values. */
265
273
  now?: () => number;
266
274
  /**
package/dist/cli.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,EAAE,MAAM,EAAE,KAAK,MAAM,EAAE,MAAM,QAAQ,CAAC;AAU7C,OAAO,EAAE,MAAM,EAAE,MAAM,+CAA+C,CAAC;AAEvE,OAAO,EAAE,MAAM,EAAE,CAAC;AAClB,OAAO,KAAK,EAAE,IAAI,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAiBpE,OAAO,EAAyB,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAkBrE,OAAO,EAOL,KAAK,YAAY,EAClB,MAAM,kBAAkB,CAAC;AAsC1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAUnE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAiBnD,OAAO,EAKL,KAAK,eAAe,EACrB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAGL,IAAI,EAEL,MAAM,WAAW,CAAC;AACnB,OAAO,EAIL,KAAK,YAAY,EAClB,MAAM,gBAAgB,CAAC;AAYxB,OAAO,EAKL,KAAK,MAAM,EACX,KAAK,WAAW,EAChB,KAAK,SAAS,EAEf,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,IAAI,EAAE,CAAC;AAChB,OAAO,EAAE,SA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