beliq-mcp 0.3.2 → 0.3.3

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/README.md CHANGED
@@ -71,9 +71,26 @@ Add to `~/.cursor/mcp.json` (or a project `.cursor/mcp.json`) using the same `mc
71
71
 
72
72
  `beliq_parse_einvoice` returns the detected `format` and `profileDetected` plus the extracted `invoice` object (EN 16931 fields: number, dates, currency, seller, buyer, lines, totals, and any national extensions present).
73
73
 
74
- `beliq_generate_einvoice` returns the `output` kind (`xml` or `pdf`), the `contentType`, and the `schematronVersion` the document was checked against. An XML document is also returned inline as `xml`; a PDF (and an XML when you set `outputPath`) is written to disk, and the call reports `outputPath` and `bytesWritten`. It does not overwrite an existing file: pick a path that does not exist.
75
-
76
- `beliq_convert_einvoice` returns the `output` kind, the resolved `sourceFormat` and `targetFormat`, and `lostElementsCount`/`lostElements` for anything the conversion could not carry across. An XML target comes back inline as `xml`; a PDF target (facturx / zugferd) is written to `outputPath`. Like generate, it never overwrites an existing file.
74
+ `beliq_generate_einvoice` returns a short text summary (with the XML document appended for XML output) plus a structured result:
75
+
76
+ - `output` is `xml` or `pdf`, as requested, and `contentType` is the matching media type (`application/xml` or `application/pdf`).
77
+ - `xml` is the generated document inline, present only for XML output.
78
+ - `outputPath` and `bytesWritten` are set when the document was written to disk: always for a PDF, and for XML when you set `outputPath`. The call never overwrites an existing file, so pick a path that does not exist.
79
+ - `pdfKind` is present only for PDF output: `hybrid` (a PDF/A-3 with the XML embedded, for facturx and zugferd) or `visualization` (rendered pages with no XML inside, for xrechnung and peppol-bis, whose legal document stays the XML).
80
+ - `schematronVersion` is the ruleset (Schematron) revision the document was checked against.
81
+ - `sha256` is the lowercase-hex SHA-256 of the returned document bytes, so `sha256sum` on the file at `outputPath` reproduces it.
82
+ - `rulesetSha256` is one combined fingerprint of the rule artifacts the document was checked against, present when a ruleset ran.
83
+ - `livemode` is true for a `blq_live_` key and false for a `blq_test_` sandbox key, whose output is [marked as a specimen](https://docs.beliq.eu/api-reference/test-mode/#sandbox-markers) and is not a production invoice.
84
+ - `validationResult` is the verdict on the generated document: `valid`, the `schematronVersion` it ran, and `errors[]`/`warnings[]` in the same shape as validate returns. With the default `verify: true`, a document that fails validation comes back as a tool error instead of a result. With `verify: false` no ruleset runs: `valid` is false and `errors`/`warnings` are empty because nothing checked the document, not because it failed.
85
+
86
+ `beliq_convert_einvoice` returns a short text summary (with the XML document appended for an XML target) plus a structured result:
87
+
88
+ - `output` is `pdf` for a facturx or zugferd target and `xml` for the others, and `contentType` is the matching media type (`application/pdf` or `application/xml`).
89
+ - `xml` is the converted document inline, present only for an XML target.
90
+ - `outputPath` and `bytesWritten` are set when the document was written to disk: always for a PDF target, and for an XML target when you set `outputPath`. Like generate, it never overwrites an existing file.
91
+ - `sourceFormat` is the format the engine read, and `targetFormat` the format it produced (the `targetFormat` you asked for when the API does not name one).
92
+ - `profileDetected` is the profile the engine recognised on the source document, when it recognised one.
93
+ - `lostElementsCount` and `lostElements` count and name the source elements that had no equivalent in the target format; `0` means nothing was lost at the element level.
77
94
 
78
95
  A PDF (Factur-X / ZUGFeRD) must be passed by `documentPath` for validate, parse, and convert, not inlined as text.
79
96
 
package/dist/schema.js CHANGED
@@ -199,7 +199,3 @@ export const convertOutputShape = {
199
199
  bytesWritten: z.number().optional(),
200
200
  xml: z.string().optional(),
201
201
  };
202
- const validateInputSchema = z.object(validateInputShape);
203
- const parseInputSchema = z.object(parseInputShape);
204
- const generateInputSchema = z.object(generateInputShape);
205
- const convertInputSchema = z.object(convertInputShape);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "beliq-mcp",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "beliq MCP server: validate, parse, generate, and convert EU e-invoices (XRechnung, ZUGFeRD, Factur-X, Peppol BIS) against authority-pinned, drift-checked rules, for MCP clients.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -62,8 +62,8 @@
62
62
  },
63
63
  "devDependencies": {
64
64
  "@types/node": "^20.14.0",
65
- "@typescript-eslint/eslint-plugin": "^7.18.0",
66
- "@typescript-eslint/parser": "^7.18.0",
65
+ "@typescript-eslint/eslint-plugin": "^8.0.0",
66
+ "@typescript-eslint/parser": "^8.0.0",
67
67
  "eslint": "^8.57.0",
68
68
  "typescript": "^5.5.4",
69
69
  "vitest": "^4.0.0"