@shuji-bonji/pdf-reader-mcp 0.16.0 → 0.17.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.
- package/CHANGELOG.md +54 -0
- package/README.ja.md +12 -27
- package/README.md +11 -26
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/schemas/tier3.d.ts +0 -12
- package/dist/schemas/tier3.d.ts.map +1 -1
- package/dist/schemas/tier3.js +0 -14
- package/dist/schemas/tier3.js.map +1 -1
- package/dist/services/pdfjs-service.d.ts +1 -6
- package/dist/services/pdfjs-service.d.ts.map +1 -1
- package/dist/services/pdfjs-service.js +0 -98
- package/dist/services/pdfjs-service.js.map +1 -1
- package/dist/services/validation-service.d.ts +4 -45
- package/dist/services/validation-service.d.ts.map +1 -1
- package/dist/services/validation-service.js +4 -662
- package/dist/services/validation-service.js.map +1 -1
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +0 -4
- package/dist/tools/index.js.map +1 -1
- package/dist/types.d.ts +0 -50
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/formatter.d.ts +1 -9
- package/dist/utils/formatter.d.ts.map +1 -1
- package/dist/utils/formatter.js +6 -83
- package/dist/utils/formatter.js.map +1 -1
- package/package.json +4 -2
- package/dist/tools/tier3/validate-metadata.d.ts +0 -6
- package/dist/tools/tier3/validate-metadata.d.ts.map +0 -1
- package/dist/tools/tier3/validate-metadata.js +0 -73
- package/dist/tools/tier3/validate-metadata.js.map +0 -1
- package/dist/tools/tier3/validate-tagged.d.ts +0 -6
- package/dist/tools/tier3/validate-tagged.d.ts.map +0 -1
- package/dist/tools/tier3/validate-tagged.js +0 -74
- package/dist/tools/tier3/validate-tagged.js.map +0 -1
|
@@ -1,37 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Validation & comparison service for Tier 3 tools.
|
|
3
3
|
*
|
|
4
|
-
* Provides
|
|
5
|
-
* and
|
|
4
|
+
* Provides structural comparison between two PDFs (`compare_structure`).
|
|
5
|
+
* The PDF/UA tag and metadata checks (`validate_tagged` / `validate_metadata`)
|
|
6
|
+
* were removed — pass/fail against a standard belongs to pdf-verify-mcp.
|
|
6
7
|
*/
|
|
7
|
-
import type {
|
|
8
|
-
/**
|
|
9
|
-
* Validate PDF/UA tagged structure requirements.
|
|
10
|
-
*
|
|
11
|
-
* Checks performed:
|
|
12
|
-
* - Document is marked as tagged
|
|
13
|
-
* - Structure tree root exists
|
|
14
|
-
* - Document-level root tag present
|
|
15
|
-
* - Heading hierarchy (H1-H6) is sequential
|
|
16
|
-
* - Figure tags have content (potential alt text)
|
|
17
|
-
* - Table tags are present when expected
|
|
18
|
-
* - Minimum structure depth
|
|
19
|
-
*/
|
|
20
|
-
export declare function validateTagged(filePath: string): Promise<TaggedValidation>;
|
|
21
|
-
/**
|
|
22
|
-
* Validate PDF metadata conformance.
|
|
23
|
-
*
|
|
24
|
-
* Checks performed:
|
|
25
|
-
* - Title is present (required for PDF/UA, PDF/A)
|
|
26
|
-
* - Author is present
|
|
27
|
-
* - CreationDate format
|
|
28
|
-
* - ModificationDate format
|
|
29
|
-
* - Producer is present
|
|
30
|
-
* - PDF version is detected
|
|
31
|
-
* - Document is tagged (metadata flag)
|
|
32
|
-
* - Subject and Keywords (informational)
|
|
33
|
-
*/
|
|
34
|
-
export declare function validateMetadata(filePath: string): Promise<MetadataValidation>;
|
|
8
|
+
import type { StructureComparison } from '../types.js';
|
|
35
9
|
/**
|
|
36
10
|
* Compare the structure of two PDF documents.
|
|
37
11
|
*
|
|
@@ -46,19 +20,4 @@ export declare function validateMetadata(filePath: string): Promise<MetadataVali
|
|
|
46
20
|
* - Fonts used (set difference)
|
|
47
21
|
*/
|
|
48
22
|
export declare function compareStructure(filePath1: string, filePath2: string): Promise<StructureComparison>;
|
|
49
|
-
/**
|
|
50
|
-
* Check if a date string is a valid PDF date.
|
|
51
|
-
*
|
|
52
|
-
* ISO 32000-2 §7.9.4: `(D:YYYYMMDDHHmmSSOHH'mm)`. The `D:` prefix and `YYYY`
|
|
53
|
-
* are required; every later field may be omitted only if all preceding ones are
|
|
54
|
-
* present (SS excepted — see `PDF_DATE_PATTERN`). `O` is `+`, `-`, or `Z`.
|
|
55
|
-
*
|
|
56
|
-
* Also accepts ISO 8601 (`YYYY-MM-DDTHH:mm:ss`), which is a tolerance rather
|
|
57
|
-
* than conformance — such a string does not satisfy §7.9.4.
|
|
58
|
-
*
|
|
59
|
-
* Exported for unit testing: the pattern is dense enough that it hid two bugs
|
|
60
|
-
* (a character range masquerading as a class, and a welded HH/mm offset), and
|
|
61
|
-
* exercising it through `validateMetadata` would need a fixture per date form.
|
|
62
|
-
*/
|
|
63
|
-
export declare function isValidPdfDate(dateStr: string): boolean;
|
|
64
23
|
//# sourceMappingURL=validation-service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation-service.d.ts","sourceRoot":"","sources":["../../src/services/validation-service.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"validation-service.d.ts","sourceRoot":"","sources":["../../src/services/validation-service.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,mBAAmB,EAAsB,MAAM,aAAa,CAAC;AAU3E;;;;;;;;;;;;GAYG;AACH,wBAAsB,gBAAgB,CACpC,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,mBAAmB,CAAC,CA4H9B"}
|