@shuji-bonji/pdf-reader-mcp 0.11.0 → 0.11.2

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.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,59 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.11.2] - 2026-08-13
9
+
10
+ ### Changed
11
+
12
+ - **`instructions` now open with the running build's name and version.** The text is returned
13
+ from `initialize` and lands in the client's system context, so it is read before any tool is
14
+ considered — which makes it the one place where a stale install can be noticed without
15
+ spending a call. The line names the package and points at `npm view` for comparison.
16
+
17
+ Why this matters more than it sounds: this server is installed through
18
+ `npx -y @shuji-bonji/pdf-reader-mcp@latest`, and npx caches a resolved tree. A client can
19
+ therefore run a build several releases behind while every document about it describes the
20
+ newest one. Until now nothing in the protocol surface said which build was answering — and
21
+ 0.11.1 exists precisely because `instructions` had gone stale about this server's own
22
+ capabilities, which is the same failure seen from the other side.
23
+
24
+ pdf-verify-mcp did this in 0.15.0 and pdf-writer-mcp in 0.19.0; **this release and
25
+ pdf-spec-mcp 0.4.6 complete the family**, which matters because a half-applied diagnostic is
26
+ worse than none: a reader who sees no version line cannot tell "old build" from "build that
27
+ never had the line".
28
+
29
+ No tool, schema or behaviour changed.
30
+
31
+ ### Build
32
+
33
+ - `scripts/sync-plugin-version.mjs` keeps `.claude-plugin/plugin.json` in step with
34
+ `package.json`, wired to the `npm version` hook so the release commit — the tree the tag
35
+ points at — carries the right plugin manifest, and to `prepublishOnly --check` as a
36
+ backstop. Preventive: the drift has happened twice in pdf-verify-mcp and once in
37
+ pdf-writer-mcp, never here, and in each case the fix landed in a commit *after* the tag,
38
+ leaving the tagged tree wrong.
39
+
40
+ ## [0.11.1] - 2026-07-27
41
+
42
+ ### Fixed
43
+
44
+ - **`instructions` said this server cannot map objects to coordinates — it has been able to
45
+ since v0.10.0.** The "what it does NOT do" list still read "no object-ID-to-coordinate
46
+ mapping", a line that went stale the moment `locate_objects` shipped and stayed wrong through
47
+ `include_bbox`.
48
+
49
+ This is worse than a stale README. `instructions` is returned from `initialize` and lands in
50
+ the client's system context **before any tool is considered** — which is exactly why the
51
+ family adopted it (PDFfamily specs/06 §2.10). So the one text that is read first was telling
52
+ every client that the two newest features do not exist, suppressing their use.
53
+
54
+ Replaced with what is actually true: `locate_objects` turns an object number into a page and a
55
+ rectangle, `extract_structured_text` with `include_bbox` does the same for a structure element,
56
+ and both answer in the form `add_annotation` takes. The incremental-update line now points at
57
+ `pdf-verify-mcp` `verify_integrity` rather than simply denying the capability exists anywhere.
58
+
59
+ No API change; the published 0.11.0 behaves identically.
60
+
8
61
  ## [0.11.0] - 2026-07-27
9
62
 
10
63
  ### Added
package/dist/index.js CHANGED
@@ -24,7 +24,9 @@ import { registerAllTools } from './tools/index.js';
24
24
  * 呼ばないうちに読まれる — 射程を伝える位置としてはここが最も早い。
25
25
  * 先例は pdf-spec-mcp v0.4.5(Issue #13)。
26
26
  */
27
- const INSTRUCTIONS = `This server OBSERVES what is inside a PDF. It does not judge whether it is correct.
27
+ const INSTRUCTIONS = `${SERVER_NAME} v${SERVER_VERSION} — the running build identifies itself here so a stale install is visible without a tool call; compare against \`npm view @shuji-bonji/pdf-reader-mcp version\` when freshness matters.
28
+
29
+ This server OBSERVES what is inside a PDF. It does not judge whether it is correct.
28
30
 
29
31
  Everything it returns is an observation: extracted text, tables, the structure tree, fonts,
30
32
  annotations, images, and the *structure* of signature fields. Treat the output as evidence,
@@ -36,7 +38,13 @@ What it does NOT do:
36
38
  (verify_signatures / verify_integrity).
37
39
  - No conformance judgement. validate_tagged / validate_metadata are deprecated in favour of
38
40
  pdf-verify-mcp's validate_conformance, which delegates to veraPDF.
39
- - No incremental-update history, no object-ID-to-coordinate mapping, no OCR.
41
+ - No incremental-update history (that is pdf-verify-mcp verify_integrity), and no OCR.
42
+
43
+ It DOES map content to coordinates: locate_objects turns an object number into a page and a
44
+ rectangle, and extract_structured_text with include_bbox does the same for a structure element.
45
+ Both answer in the form pdf-writer-mcp add_annotation takes, so "annotate the thing that
46
+ changed" needs no coordinate conversion in between. Every rectangle names its basis — a
47
+ measurement and a rectangle the file merely declares are not the same claim.
40
48
 
41
49
  Where an observation here and a verdict from pdf-verify-mcp disagree, the verdict wins —
42
50
  this server reads the file, the validator applies the rules.
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;GAKG;AAEH,8CAA8C;AAC9C,sEAAsE;AACtE,sEAAsE;AACtE,MAAM,mBAAmB,GAAG,OAAO,CAAC,GAAG,CAAC;AACxC,MAAM,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC;AAC1C,OAAO,CAAC,GAAG,GAAG,CAAC,GAAG,IAAe,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC;AACtE,OAAO,CAAC,IAAI,GAAG,CAAC,GAAG,IAAe,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAG,IAAI,CAAC,CAAC;AAExE,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEpD;;;;;;;GAOG;AACH,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;+FAiB0E,CAAC;AAEhG,MAAM,MAAM,GAAG,IAAI,SAAS,CAC1B;IACE,IAAI,EAAE,WAAW;IACjB,OAAO,EAAE,cAAc;CACxB,EACD,EAAE,YAAY,EAAE,YAAY,EAA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AG,GAAG,WAAW,KAAK,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;+FAyByC,CAAC;AAEhG,MAAM,MAAM,GAAG,IAAI,SAAS,CAC1B;IACE,IAAI,EAAE,WAAW;IACjB,OAAO,EAAE,cAAc;CACxB,EACD,EAAE,YAAY,EAAE,YAAY,EAAE,CAC/B,CAAC;AAEF,qBAAqB;AACrB,gBAAgB,CAAC,MAAM,CAAC,CAAC;AAEzB,wCAAwC;AACxC,KAAK,UAAU,IAAI;IACjB,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,OAAO,CAAC,KAAK,CAAC,GAAG,WAAW,KAAK,cAAc,oBAAoB,CAAC,CAAC;AACvE,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,OAAO,CAAC,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;IACrC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shuji-bonji/pdf-reader-mcp",
3
- "version": "0.11.0",
3
+ "version": "0.11.2",
4
4
  "description": "MCP server for PDF structure analysis - read, inspect, and validate PDF internals",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -34,7 +34,8 @@
34
34
  "check": "biome check ./src ./tests",
35
35
  "check:fix": "biome check --fix ./src ./tests",
36
36
  "typecheck": "tsc --noEmit",
37
- "prepublishOnly": "npm run build"
37
+ "prepublishOnly": "node scripts/sync-plugin-version.mjs --check && npm run build",
38
+ "version": "node scripts/sync-plugin-version.mjs && git add .claude-plugin/plugin.json"
38
39
  },
39
40
  "publishConfig": {
40
41
  "access": "public",