@formfeed/mcp 0.3.21 → 0.3.22
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/bin/formfeed-mcp.mjs +20 -3
- package/package.json +1 -1
package/bin/formfeed-mcp.mjs
CHANGED
|
@@ -70732,7 +70732,7 @@ function toNumber(value) {
|
|
|
70732
70732
|
// packages/engine/src/lib/codes/epc.ts
|
|
70733
70733
|
function epcPayload(input) {
|
|
70734
70734
|
const amount = input.amount === void 0 || input.amount === "" ? "" : `EUR${toNumber(input.amount).toFixed(2)}`;
|
|
70735
|
-
|
|
70735
|
+
const elements = [
|
|
70736
70736
|
"BCD",
|
|
70737
70737
|
"002",
|
|
70738
70738
|
"1",
|
|
@@ -70744,8 +70744,12 @@ function epcPayload(input) {
|
|
|
70744
70744
|
(input.purpose ?? "").slice(0, 4),
|
|
70745
70745
|
(input.reference ?? "").slice(0, 35),
|
|
70746
70746
|
input.reference ? "" : (input.text ?? "").slice(0, 140),
|
|
70747
|
+
// the beneficiary to originator information, which a payment here has no field for
|
|
70747
70748
|
""
|
|
70748
|
-
]
|
|
70749
|
+
];
|
|
70750
|
+
while (elements.length > 0 && elements[elements.length - 1] === "")
|
|
70751
|
+
elements.pop();
|
|
70752
|
+
return elements.join("\n");
|
|
70749
70753
|
}
|
|
70750
70754
|
var normaliseIban = (iban2) => iban2.replace(/\s/g, "").toUpperCase();
|
|
70751
70755
|
function ibanChecksum(iban2) {
|
|
@@ -83878,7 +83882,7 @@ function base64(bytes) {
|
|
|
83878
83882
|
binary += String.fromCharCode(...bytes.subarray(i, i + 32768));
|
|
83879
83883
|
return btoa(binary);
|
|
83880
83884
|
}
|
|
83881
|
-
var SERVER_INFO = { name: "formfeed", version: "0.3.
|
|
83885
|
+
var SERVER_INFO = { name: "formfeed", version: "0.3.22" };
|
|
83882
83886
|
var READS = {
|
|
83883
83887
|
readOnlyHint: true,
|
|
83884
83888
|
destructiveHint: false,
|
|
@@ -83912,6 +83916,9 @@ var renderOutput = {
|
|
|
83912
83916
|
),
|
|
83913
83917
|
error: z3.object({ code: z3.string().optional(), message: z3.string().optional() }).nullable().describe("Why a failed render failed"),
|
|
83914
83918
|
accessibility: z3.record(z3.string(), z3.unknown()).optional().describe("The PDF/UA-1 verdict, when the template declares it"),
|
|
83919
|
+
pdfa: z3.record(z3.string(), z3.unknown()).optional().describe(
|
|
83920
|
+
"The PDF/A verdict (PDF/A-2b or PDF/A-3b), when the template declares it"
|
|
83921
|
+
),
|
|
83915
83922
|
einvoice: z3.record(z3.string(), z3.unknown()).optional().describe("The e-invoice report, when the render made one")
|
|
83916
83923
|
};
|
|
83917
83924
|
var diagnosticOutput = z3.object({
|
|
@@ -83948,6 +83955,8 @@ var renderSummary = (r) => ({
|
|
|
83948
83955
|
// the validator's verdict of a render whose template declares PDF/UA-1 (plan 21): whether the
|
|
83949
83956
|
// file passed, and for each failed rule what to change and in which elements
|
|
83950
83957
|
...r.accessibility ? { accessibility: r.accessibility } : {},
|
|
83958
|
+
// the verdict of a render whose template declares PDF/A (plan 26): the level and the validator
|
|
83959
|
+
...r.pdfa ? { pdfa: r.pdfa } : {},
|
|
83951
83960
|
// the report of an e-invoice (spec 17): valid, the findings, the XML's link, the hashes it checked
|
|
83952
83961
|
...r.einvoice ? { einvoice: r.einvoice } : {}
|
|
83953
83962
|
});
|
|
@@ -84007,11 +84016,13 @@ function text3(data) {
|
|
|
84007
84016
|
function failure(e) {
|
|
84008
84017
|
const message2 = e instanceof FormfeedError ? `${e.code}: ${e.message}` : e instanceof Error ? e.message : String(e);
|
|
84009
84018
|
const verdict = e instanceof FormfeedError && e.code === "pdfua_validation_failed" ? e.problem?.["accessibility"] : void 0;
|
|
84019
|
+
const pdfa = e instanceof FormfeedError && (e.code === "pdfa_conversion_failed" || e.code === "pdfua_validation_failed") ? e.problem?.["pdfa"] : void 0;
|
|
84010
84020
|
const invoice = e instanceof FormfeedError && EINVOICE_PROBLEMS.has(e.code) ? Object.fromEntries(
|
|
84011
84021
|
["errors", "einvoice"].filter((key) => e.problem?.[key] !== void 0).map((key) => [key, e.problem?.[key]])
|
|
84012
84022
|
) : {};
|
|
84013
84023
|
const details = {
|
|
84014
84024
|
...verdict ? { accessibility: verdict } : {},
|
|
84025
|
+
...pdfa ? { pdfa } : {},
|
|
84015
84026
|
...invoice
|
|
84016
84027
|
};
|
|
84017
84028
|
return {
|
|
@@ -85008,6 +85019,12 @@ function mcpFetchHandler(options = {}) {
|
|
|
85008
85019
|
challenge(metadata, "the access token expired")
|
|
85009
85020
|
);
|
|
85010
85021
|
}
|
|
85022
|
+
if (request.method !== "POST")
|
|
85023
|
+
return json(
|
|
85024
|
+
{ error: "This endpoint takes POST only; it opens no stream" },
|
|
85025
|
+
405,
|
|
85026
|
+
{ allow: "POST" }
|
|
85027
|
+
);
|
|
85011
85028
|
const mcp = createFormfeedServer({
|
|
85012
85029
|
apiKey: credential,
|
|
85013
85030
|
...workspaceId ? { workspaceId } : {},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@formfeed/mcp",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.22",
|
|
4
4
|
"mcpName": "io.github.formfeed-dev/formfeed",
|
|
5
5
|
"description": "Model Context Protocol server for Formfeed: list templates, read data schemas, validate and render documents from AI agents.",
|
|
6
6
|
"license": "MIT",
|