e-arveldaja-mcp 0.43.0 → 0.43.1

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
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.43.1] - 2026-11-28
6
+
7
+ ### Changed
8
+
9
+ - **PDF reader updated to liteparse 2.21.4; nothing you see changes.** This version fixes a crash on some ruled-table cells and repairs PDFs whose text layer is in the wrong code page or in visual order, and adds a second OCR pass for pages of small print. On the 75-document owner corpus, compared with 2.21.3, every extracted field, every hold and the reading-packet text are identical. Details: @llamaindex/liteparse 2.21.4 (floor `^2.21.4`, upstream #649/#650/#652/#654/#661/#664); the liteparse version diagnostic names `^2.21.4`.
10
+
5
11
  ## [0.43.0] - 2026-11-27
6
12
 
7
13
  ### Changed
package/CLAUDE.md CHANGED
@@ -274,7 +274,7 @@ The guided surface is sized for routing clarity, not token cost (per-tool measur
274
274
 
275
275
  `EARVELDAJA_DOCUMENT_READING=1` is not an exposure flag: it adds the opt-in verified-reading modes `read` / `verify` to `process_accounting_document` (create and confirm route on the reading-domain handle), so no tool count and no profile changes (guided stays 19). Off, the tool's schema and description are byte-identical. The workflow guidance for the reading path is carried by the flag-gated tool description and the `read` / `verify` / `create` outputs, not by `workflows/book-invoice.md` (prompt feature sections are tool-gated, and the flag adds no tool).
276
276
 
277
- Lost dot-leader values (`text_layer_value_lost`): liteparse < 2.21.2 dropped the value painted after a dot leader (Google Cloud invoices; upstream #622, fixed in 2.21.2; floor `^2.21.3`). The hold stays as the safety net: whichever cell lost its value (a date, number, billing ID or total), the card asks the owner to type the invoice date and the invoice number (§5.3); a lost amount is still caught by the amount checks, not typed. With the number lost and the date printed, `verify` skips only the number binding; `create` binds the booking again on the typed number and runs every duplicate scan on it. The image-crop transcription path (`lost_value_reading`, crops on `read`, server-OCR agreement) was removed in 0.43.0; the synthetic tripwire `src/__integration__/lost-value-image.test.ts` fails loudly if liteparse loses such values again. A read invoice number whose evidence line starts with a lost cell's own label of at least two words followed by the number (Google's header `Arve number: …`; `printedUnderLostLabel`), with no other hold on the field, gets a confirm row instead of the typed row (audit `text_layer_number_kept_under_label`); the date never takes this route. Signature lines: before the hold is raised, `readingPacketOf` (`src/tools/document-text-hazards.ts`, used by every path that checks the hold) renders each lost row's full-width band and OCRs it. The band comes from `leaderRowBand`: the row is unique on its page, the band runs from two row heights (the tallest row item) above it to 0.4·h below, at most 6 rows on 2 pages, and each lost cell is bound to its own label item. `ocrItemsOnPage` maps OCR words to page points using the OCR's extent (`OcrPngResult.size`) over the crop's real rect (`croppedPixels`). `leaderRowIsBlank` clears the row only when both hold:
277
+ Lost dot-leader values (`text_layer_value_lost`): liteparse < 2.21.2 dropped the value painted after a dot leader (Google Cloud invoices; upstream #622, fixed in 2.21.2; floor `^2.21.4`). The hold stays as the safety net: whichever cell lost its value (a date, number, billing ID or total), the card asks the owner to type the invoice date and the invoice number (§5.3); a lost amount is still caught by the amount checks, not typed. With the number lost and the date printed, `verify` skips only the number binding; `create` binds the booking again on the typed number and runs every duplicate scan on it. The image-crop transcription path (`lost_value_reading`, crops on `read`, server-OCR agreement) was removed in 0.43.0; the synthetic tripwire `src/__integration__/lost-value-image.test.ts` fails loudly if liteparse loses such values again. A read invoice number whose evidence line starts with a lost cell's own label of at least two words followed by the number (Google's header `Arve number: …`; `printedUnderLostLabel`), with no other hold on the field, gets a confirm row instead of the typed row (audit `text_layer_number_kept_under_label`); the date never takes this route. Signature lines: before the hold is raised, `readingPacketOf` (`src/tools/document-text-hazards.ts`, used by every path that checks the hold) renders each lost row's full-width band and OCRs it. The band comes from `leaderRowBand`: the row is unique on its page, the band runs from two row heights (the tallest row item) above it to 0.4·h below, at most 6 rows on 2 pages, and each lost cell is bound to its own label item. `ocrItemsOnPage` maps OCR words to page points using the OCR's extent (`OcrPngResult.size`) over the crop's real rect (`croppedPixels`). `leaderRowIsBlank` clears the row only when both hold:
278
278
  - OCR read each cell's last label word on that label item, on the row;
279
279
  - every OCR item is accounted for. Host = the item under the OCR item's centre; a number keeps its sign and punctuation and gets no slack. "On the leader" means the host holds a leader run (a combined label+leader item counts wholly), the box reaches into such an item, or there is no host. On the leader, only the host's label words (counted) pass; a number, any other word, or punctuation other than leader glyphs holds, unless the item is a smudge (< 0.2·h, confidence < 0.5, no digit). Off the leader, a word must be the host's word (counted), or have no digit and not be only look-alikes. Each lost cell is bound to its own leader run (`lostLeaderRunIndex`); the row's items must hold the line's runs one for one.
280
280
 
@@ -143,7 +143,7 @@ function assertParserApi(candidate) {
143
143
  const missing = REQUIRED_PARSER_METHODS.filter(method => typeof candidate[method] !== "function");
144
144
  if (missing.length > 0) {
145
145
  throw new Error(`The installed @llamaindex/liteparse is missing ${missing.join(", ")}. ` +
146
- "This build needs @llamaindex/liteparse ^2.21.3. Reinstall the server so the " +
146
+ "This build needs @llamaindex/liteparse ^2.21.4. Reinstall the server so the " +
147
147
  "dependency resolves to a supported version (for an npx install, clear its cache first).");
148
148
  }
149
149
  return candidate;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "e-arveldaja-mcp",
3
- "version": "0.43.0",
3
+ "version": "0.43.1",
4
4
  "description": "MCP server for Estonian e-arveldaja (e-Financials) API",
5
5
  "mcpName": "io.github.iseppo/e-arveldaja-mcp",
6
6
  "type": "module",
@@ -60,7 +60,7 @@
60
60
  "test:integration": "npm run build && vitest run --config vitest.integration.config.ts"
61
61
  },
62
62
  "dependencies": {
63
- "@llamaindex/liteparse": "^2.21.3",
63
+ "@llamaindex/liteparse": "^2.21.4",
64
64
  "@modelcontextprotocol/sdk": "^1.32.2",
65
65
  "@toon-format/toon": "^4.4.0",
66
66
  "dotenv": "^18.0.10",
package/server.json CHANGED
@@ -6,12 +6,12 @@
6
6
  "url": "https://github.com/iseppo/e-arveldaja-mcp",
7
7
  "source": "github"
8
8
  },
9
- "version": "0.43.0",
9
+ "version": "0.43.1",
10
10
  "packages": [
11
11
  {
12
12
  "registryType": "npm",
13
13
  "identifier": "e-arveldaja-mcp",
14
- "version": "0.43.0",
14
+ "version": "0.43.1",
15
15
  "transport": {
16
16
  "type": "stdio"
17
17
  },