@x402scan/mcp 0.2.1-beta.0 → 0.2.1-beta.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/dist/cjs/run-server.cjs +257 -329
- package/dist/esm/{chunk-ND5UYYF3.js → chunk-7SQUI6I5.js} +2 -2
- package/dist/esm/index.js +2 -2
- package/dist/esm/{install-CNZYLKS6.js → install-XTLY2XKW.js} +2 -2
- package/dist/esm/{server-EI242I3L.js → server-7E6H73IQ.js} +128 -201
- package/dist/esm/server-7E6H73IQ.js.map +1 -0
- package/package.json +3 -3
- package/dist/esm/server-EI242I3L.js.map +0 -1
- /package/dist/esm/{chunk-ND5UYYF3.js.map → chunk-7SQUI6I5.js.map} +0 -0
- /package/dist/esm/{install-CNZYLKS6.js.map → install-XTLY2XKW.js.map} +0 -0
package/dist/cjs/run-server.cjs
CHANGED
|
@@ -59249,7 +59249,7 @@ var numericOriginMap = {
|
|
|
59249
59249
|
};
|
|
59250
59250
|
var $ZodCheckLessThan = /* @__PURE__ */ $constructor("$ZodCheckLessThan", (inst, def) => {
|
|
59251
59251
|
$ZodCheck.init(inst, def);
|
|
59252
|
-
const
|
|
59252
|
+
const origin2 = numericOriginMap[typeof def.value];
|
|
59253
59253
|
inst._zod.onattach.push((inst2) => {
|
|
59254
59254
|
const bag = inst2._zod.bag;
|
|
59255
59255
|
const curr = (def.inclusive ? bag.maximum : bag.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
|
|
@@ -59265,7 +59265,7 @@ var $ZodCheckLessThan = /* @__PURE__ */ $constructor("$ZodCheckLessThan", (inst,
|
|
|
59265
59265
|
return;
|
|
59266
59266
|
}
|
|
59267
59267
|
payload.issues.push({
|
|
59268
|
-
origin,
|
|
59268
|
+
origin: origin2,
|
|
59269
59269
|
code: "too_big",
|
|
59270
59270
|
maximum: typeof def.value === "object" ? def.value.getTime() : def.value,
|
|
59271
59271
|
input: payload.value,
|
|
@@ -59277,7 +59277,7 @@ var $ZodCheckLessThan = /* @__PURE__ */ $constructor("$ZodCheckLessThan", (inst,
|
|
|
59277
59277
|
});
|
|
59278
59278
|
var $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan", (inst, def) => {
|
|
59279
59279
|
$ZodCheck.init(inst, def);
|
|
59280
|
-
const
|
|
59280
|
+
const origin2 = numericOriginMap[typeof def.value];
|
|
59281
59281
|
inst._zod.onattach.push((inst2) => {
|
|
59282
59282
|
const bag = inst2._zod.bag;
|
|
59283
59283
|
const curr = (def.inclusive ? bag.minimum : bag.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
|
|
@@ -59293,7 +59293,7 @@ var $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan",
|
|
|
59293
59293
|
return;
|
|
59294
59294
|
}
|
|
59295
59295
|
payload.issues.push({
|
|
59296
|
-
origin,
|
|
59296
|
+
origin: origin2,
|
|
59297
59297
|
code: "too_small",
|
|
59298
59298
|
minimum: typeof def.value === "object" ? def.value.getTime() : def.value,
|
|
59299
59299
|
input: payload.value,
|
|
@@ -59329,7 +59329,7 @@ var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat"
|
|
|
59329
59329
|
$ZodCheck.init(inst, def);
|
|
59330
59330
|
def.format = def.format || "float64";
|
|
59331
59331
|
const isInt = def.format?.includes("int");
|
|
59332
|
-
const
|
|
59332
|
+
const origin2 = isInt ? "int" : "number";
|
|
59333
59333
|
const [minimum, maximum] = NUMBER_FORMAT_RANGES[def.format];
|
|
59334
59334
|
inst._zod.onattach.push((inst2) => {
|
|
59335
59335
|
const bag = inst2._zod.bag;
|
|
@@ -59344,7 +59344,7 @@ var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat"
|
|
|
59344
59344
|
if (isInt) {
|
|
59345
59345
|
if (!Number.isInteger(input)) {
|
|
59346
59346
|
payload.issues.push({
|
|
59347
|
-
expected:
|
|
59347
|
+
expected: origin2,
|
|
59348
59348
|
format: def.format,
|
|
59349
59349
|
code: "invalid_type",
|
|
59350
59350
|
continue: false,
|
|
@@ -59361,7 +59361,7 @@ var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat"
|
|
|
59361
59361
|
maximum: Number.MAX_SAFE_INTEGER,
|
|
59362
59362
|
note: "Integers must be within the safe integer range.",
|
|
59363
59363
|
inst,
|
|
59364
|
-
origin,
|
|
59364
|
+
origin: origin2,
|
|
59365
59365
|
inclusive: true,
|
|
59366
59366
|
continue: !def.abort
|
|
59367
59367
|
});
|
|
@@ -59372,7 +59372,7 @@ var $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat"
|
|
|
59372
59372
|
minimum: Number.MIN_SAFE_INTEGER,
|
|
59373
59373
|
note: "Integers must be within the safe integer range.",
|
|
59374
59374
|
inst,
|
|
59375
|
-
origin,
|
|
59375
|
+
origin: origin2,
|
|
59376
59376
|
inclusive: true,
|
|
59377
59377
|
continue: !def.abort
|
|
59378
59378
|
});
|
|
@@ -59542,9 +59542,9 @@ var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (ins
|
|
|
59542
59542
|
const length = input.length;
|
|
59543
59543
|
if (length <= def.maximum)
|
|
59544
59544
|
return;
|
|
59545
|
-
const
|
|
59545
|
+
const origin2 = getLengthableOrigin(input);
|
|
59546
59546
|
payload.issues.push({
|
|
59547
|
-
origin,
|
|
59547
|
+
origin: origin2,
|
|
59548
59548
|
code: "too_big",
|
|
59549
59549
|
maximum: def.maximum,
|
|
59550
59550
|
inclusive: true,
|
|
@@ -59571,9 +59571,9 @@ var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (ins
|
|
|
59571
59571
|
const length = input.length;
|
|
59572
59572
|
if (length >= def.minimum)
|
|
59573
59573
|
return;
|
|
59574
|
-
const
|
|
59574
|
+
const origin2 = getLengthableOrigin(input);
|
|
59575
59575
|
payload.issues.push({
|
|
59576
|
-
origin,
|
|
59576
|
+
origin: origin2,
|
|
59577
59577
|
code: "too_small",
|
|
59578
59578
|
minimum: def.minimum,
|
|
59579
59579
|
inclusive: true,
|
|
@@ -59601,10 +59601,10 @@ var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals"
|
|
|
59601
59601
|
const length = input.length;
|
|
59602
59602
|
if (length === def.length)
|
|
59603
59603
|
return;
|
|
59604
|
-
const
|
|
59604
|
+
const origin2 = getLengthableOrigin(input);
|
|
59605
59605
|
const tooBig = length > def.length;
|
|
59606
59606
|
payload.issues.push({
|
|
59607
|
-
origin,
|
|
59607
|
+
origin: origin2,
|
|
59608
59608
|
...tooBig ? { code: "too_big", maximum: def.length } : { code: "too_small", minimum: def.length },
|
|
59609
59609
|
inclusive: true,
|
|
59610
59610
|
exact: true,
|
|
@@ -61863,8 +61863,8 @@ var error = () => {
|
|
|
61863
61863
|
array: { unit: "\u0639\u0646\u0635\u0631", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" },
|
|
61864
61864
|
set: { unit: "\u0639\u0646\u0635\u0631", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" }
|
|
61865
61865
|
};
|
|
61866
|
-
function getSizing(
|
|
61867
|
-
return Sizable[
|
|
61866
|
+
function getSizing(origin2) {
|
|
61867
|
+
return Sizable[origin2] ?? null;
|
|
61868
61868
|
}
|
|
61869
61869
|
const FormatDictionary = {
|
|
61870
61870
|
regex: "\u0645\u062F\u062E\u0644",
|
|
@@ -61971,8 +61971,8 @@ var error2 = () => {
|
|
|
61971
61971
|
array: { unit: "element", verb: "olmal\u0131d\u0131r" },
|
|
61972
61972
|
set: { unit: "element", verb: "olmal\u0131d\u0131r" }
|
|
61973
61973
|
};
|
|
61974
|
-
function getSizing(
|
|
61975
|
-
return Sizable[
|
|
61974
|
+
function getSizing(origin2) {
|
|
61975
|
+
return Sizable[origin2] ?? null;
|
|
61976
61976
|
}
|
|
61977
61977
|
const FormatDictionary = {
|
|
61978
61978
|
regex: "input",
|
|
@@ -62121,8 +62121,8 @@ var error3 = () => {
|
|
|
62121
62121
|
verb: "\u043C\u0435\u0446\u044C"
|
|
62122
62122
|
}
|
|
62123
62123
|
};
|
|
62124
|
-
function getSizing(
|
|
62125
|
-
return Sizable[
|
|
62124
|
+
function getSizing(origin2) {
|
|
62125
|
+
return Sizable[origin2] ?? null;
|
|
62126
62126
|
}
|
|
62127
62127
|
const FormatDictionary = {
|
|
62128
62128
|
regex: "\u0443\u0432\u043E\u0434",
|
|
@@ -62236,8 +62236,8 @@ var error4 = () => {
|
|
|
62236
62236
|
array: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" },
|
|
62237
62237
|
set: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" }
|
|
62238
62238
|
};
|
|
62239
|
-
function getSizing(
|
|
62240
|
-
return Sizable[
|
|
62239
|
+
function getSizing(origin2) {
|
|
62240
|
+
return Sizable[origin2] ?? null;
|
|
62241
62241
|
}
|
|
62242
62242
|
const FormatDictionary = {
|
|
62243
62243
|
regex: "\u0432\u0445\u043E\u0434",
|
|
@@ -62358,8 +62358,8 @@ var error5 = () => {
|
|
|
62358
62358
|
array: { unit: "elements", verb: "contenir" },
|
|
62359
62359
|
set: { unit: "elements", verb: "contenir" }
|
|
62360
62360
|
};
|
|
62361
|
-
function getSizing(
|
|
62362
|
-
return Sizable[
|
|
62361
|
+
function getSizing(origin2) {
|
|
62362
|
+
return Sizable[origin2] ?? null;
|
|
62363
62363
|
}
|
|
62364
62364
|
const FormatDictionary = {
|
|
62365
62365
|
regex: "entrada",
|
|
@@ -62468,8 +62468,8 @@ var error6 = () => {
|
|
|
62468
62468
|
array: { unit: "prvk\u016F", verb: "m\xEDt" },
|
|
62469
62469
|
set: { unit: "prvk\u016F", verb: "m\xEDt" }
|
|
62470
62470
|
};
|
|
62471
|
-
function getSizing(
|
|
62472
|
-
return Sizable[
|
|
62471
|
+
function getSizing(origin2) {
|
|
62472
|
+
return Sizable[origin2] ?? null;
|
|
62473
62473
|
}
|
|
62474
62474
|
const FormatDictionary = {
|
|
62475
62475
|
regex: "regul\xE1rn\xED v\xFDraz",
|
|
@@ -62581,8 +62581,8 @@ var error7 = () => {
|
|
|
62581
62581
|
array: { unit: "elementer", verb: "indeholdt" },
|
|
62582
62582
|
set: { unit: "elementer", verb: "indeholdt" }
|
|
62583
62583
|
};
|
|
62584
|
-
function getSizing(
|
|
62585
|
-
return Sizable[
|
|
62584
|
+
function getSizing(origin2) {
|
|
62585
|
+
return Sizable[origin2] ?? null;
|
|
62586
62586
|
}
|
|
62587
62587
|
const FormatDictionary = {
|
|
62588
62588
|
regex: "input",
|
|
@@ -62642,19 +62642,19 @@ var error7 = () => {
|
|
|
62642
62642
|
case "too_big": {
|
|
62643
62643
|
const adj = issue2.inclusive ? "<=" : "<";
|
|
62644
62644
|
const sizing = getSizing(issue2.origin);
|
|
62645
|
-
const
|
|
62645
|
+
const origin2 = TypeDictionary[issue2.origin] ?? issue2.origin;
|
|
62646
62646
|
if (sizing)
|
|
62647
|
-
return `For stor: forventede ${
|
|
62648
|
-
return `For stor: forventede ${
|
|
62647
|
+
return `For stor: forventede ${origin2 ?? "value"} ${sizing.verb} ${adj} ${issue2.maximum.toString()} ${sizing.unit ?? "elementer"}`;
|
|
62648
|
+
return `For stor: forventede ${origin2 ?? "value"} havde ${adj} ${issue2.maximum.toString()}`;
|
|
62649
62649
|
}
|
|
62650
62650
|
case "too_small": {
|
|
62651
62651
|
const adj = issue2.inclusive ? ">=" : ">";
|
|
62652
62652
|
const sizing = getSizing(issue2.origin);
|
|
62653
|
-
const
|
|
62653
|
+
const origin2 = TypeDictionary[issue2.origin] ?? issue2.origin;
|
|
62654
62654
|
if (sizing) {
|
|
62655
|
-
return `For lille: forventede ${
|
|
62655
|
+
return `For lille: forventede ${origin2} ${sizing.verb} ${adj} ${issue2.minimum.toString()} ${sizing.unit}`;
|
|
62656
62656
|
}
|
|
62657
|
-
return `For lille: forventede ${
|
|
62657
|
+
return `For lille: forventede ${origin2} havde ${adj} ${issue2.minimum.toString()}`;
|
|
62658
62658
|
}
|
|
62659
62659
|
case "invalid_format": {
|
|
62660
62660
|
const _issue = issue2;
|
|
@@ -62698,8 +62698,8 @@ var error8 = () => {
|
|
|
62698
62698
|
array: { unit: "Elemente", verb: "zu haben" },
|
|
62699
62699
|
set: { unit: "Elemente", verb: "zu haben" }
|
|
62700
62700
|
};
|
|
62701
|
-
function getSizing(
|
|
62702
|
-
return Sizable[
|
|
62701
|
+
function getSizing(origin2) {
|
|
62702
|
+
return Sizable[origin2] ?? null;
|
|
62703
62703
|
}
|
|
62704
62704
|
const FormatDictionary = {
|
|
62705
62705
|
regex: "Eingabe",
|
|
@@ -62809,8 +62809,8 @@ var error9 = () => {
|
|
|
62809
62809
|
set: { unit: "items", verb: "to have" },
|
|
62810
62810
|
map: { unit: "entries", verb: "to have" }
|
|
62811
62811
|
};
|
|
62812
|
-
function getSizing(
|
|
62813
|
-
return Sizable[
|
|
62812
|
+
function getSizing(origin2) {
|
|
62813
|
+
return Sizable[origin2] ?? null;
|
|
62814
62814
|
}
|
|
62815
62815
|
const FormatDictionary = {
|
|
62816
62816
|
regex: "input",
|
|
@@ -62918,8 +62918,8 @@ var error10 = () => {
|
|
|
62918
62918
|
array: { unit: "elementojn", verb: "havi" },
|
|
62919
62919
|
set: { unit: "elementojn", verb: "havi" }
|
|
62920
62920
|
};
|
|
62921
|
-
function getSizing(
|
|
62922
|
-
return Sizable[
|
|
62921
|
+
function getSizing(origin2) {
|
|
62922
|
+
return Sizable[origin2] ?? null;
|
|
62923
62923
|
}
|
|
62924
62924
|
const FormatDictionary = {
|
|
62925
62925
|
regex: "enigo",
|
|
@@ -63029,8 +63029,8 @@ var error11 = () => {
|
|
|
63029
63029
|
array: { unit: "elementos", verb: "tener" },
|
|
63030
63030
|
set: { unit: "elementos", verb: "tener" }
|
|
63031
63031
|
};
|
|
63032
|
-
function getSizing(
|
|
63033
|
-
return Sizable[
|
|
63032
|
+
function getSizing(origin2) {
|
|
63033
|
+
return Sizable[origin2] ?? null;
|
|
63034
63034
|
}
|
|
63035
63035
|
const FormatDictionary = {
|
|
63036
63036
|
regex: "entrada",
|
|
@@ -63107,19 +63107,19 @@ var error11 = () => {
|
|
|
63107
63107
|
case "too_big": {
|
|
63108
63108
|
const adj = issue2.inclusive ? "<=" : "<";
|
|
63109
63109
|
const sizing = getSizing(issue2.origin);
|
|
63110
|
-
const
|
|
63110
|
+
const origin2 = TypeDictionary[issue2.origin] ?? issue2.origin;
|
|
63111
63111
|
if (sizing)
|
|
63112
|
-
return `Demasiado grande: se esperaba que ${
|
|
63113
|
-
return `Demasiado grande: se esperaba que ${
|
|
63112
|
+
return `Demasiado grande: se esperaba que ${origin2 ?? "valor"} tuviera ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementos"}`;
|
|
63113
|
+
return `Demasiado grande: se esperaba que ${origin2 ?? "valor"} fuera ${adj}${issue2.maximum.toString()}`;
|
|
63114
63114
|
}
|
|
63115
63115
|
case "too_small": {
|
|
63116
63116
|
const adj = issue2.inclusive ? ">=" : ">";
|
|
63117
63117
|
const sizing = getSizing(issue2.origin);
|
|
63118
|
-
const
|
|
63118
|
+
const origin2 = TypeDictionary[issue2.origin] ?? issue2.origin;
|
|
63119
63119
|
if (sizing) {
|
|
63120
|
-
return `Demasiado peque\xF1o: se esperaba que ${
|
|
63120
|
+
return `Demasiado peque\xF1o: se esperaba que ${origin2} tuviera ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
|
|
63121
63121
|
}
|
|
63122
|
-
return `Demasiado peque\xF1o: se esperaba que ${
|
|
63122
|
+
return `Demasiado peque\xF1o: se esperaba que ${origin2} fuera ${adj}${issue2.minimum.toString()}`;
|
|
63123
63123
|
}
|
|
63124
63124
|
case "invalid_format": {
|
|
63125
63125
|
const _issue = issue2;
|
|
@@ -63163,8 +63163,8 @@ var error12 = () => {
|
|
|
63163
63163
|
array: { unit: "\u0622\u06CC\u062A\u0645", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
|
|
63164
63164
|
set: { unit: "\u0622\u06CC\u062A\u0645", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" }
|
|
63165
63165
|
};
|
|
63166
|
-
function getSizing(
|
|
63167
|
-
return Sizable[
|
|
63166
|
+
function getSizing(origin2) {
|
|
63167
|
+
return Sizable[origin2] ?? null;
|
|
63168
63168
|
}
|
|
63169
63169
|
const FormatDictionary = {
|
|
63170
63170
|
regex: "\u0648\u0631\u0648\u062F\u06CC",
|
|
@@ -63283,8 +63283,8 @@ var error13 = () => {
|
|
|
63283
63283
|
int: { unit: "", subject: "kokonaisluvun" },
|
|
63284
63284
|
date: { unit: "", subject: "p\xE4iv\xE4m\xE4\xE4r\xE4n" }
|
|
63285
63285
|
};
|
|
63286
|
-
function getSizing(
|
|
63287
|
-
return Sizable[
|
|
63286
|
+
function getSizing(origin2) {
|
|
63287
|
+
return Sizable[origin2] ?? null;
|
|
63288
63288
|
}
|
|
63289
63289
|
const FormatDictionary = {
|
|
63290
63290
|
regex: "s\xE4\xE4nn\xF6llinen lauseke",
|
|
@@ -63393,8 +63393,8 @@ var error14 = () => {
|
|
|
63393
63393
|
array: { unit: "\xE9l\xE9ments", verb: "avoir" },
|
|
63394
63394
|
set: { unit: "\xE9l\xE9ments", verb: "avoir" }
|
|
63395
63395
|
};
|
|
63396
|
-
function getSizing(
|
|
63397
|
-
return Sizable[
|
|
63396
|
+
function getSizing(origin2) {
|
|
63397
|
+
return Sizable[origin2] ?? null;
|
|
63398
63398
|
}
|
|
63399
63399
|
const FormatDictionary = {
|
|
63400
63400
|
regex: "entr\xE9e",
|
|
@@ -63503,8 +63503,8 @@ var error15 = () => {
|
|
|
63503
63503
|
array: { unit: "\xE9l\xE9ments", verb: "avoir" },
|
|
63504
63504
|
set: { unit: "\xE9l\xE9ments", verb: "avoir" }
|
|
63505
63505
|
};
|
|
63506
|
-
function getSizing(
|
|
63507
|
-
return Sizable[
|
|
63506
|
+
function getSizing(origin2) {
|
|
63507
|
+
return Sizable[origin2] ?? null;
|
|
63508
63508
|
}
|
|
63509
63509
|
const FormatDictionary = {
|
|
63510
63510
|
regex: "entr\xE9e",
|
|
@@ -63647,10 +63647,10 @@ var error16 = () => {
|
|
|
63647
63647
|
const gender = e?.gender ?? "m";
|
|
63648
63648
|
return gender === "f" ? "\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA" : "\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA";
|
|
63649
63649
|
};
|
|
63650
|
-
const getSizing = (
|
|
63651
|
-
if (!
|
|
63650
|
+
const getSizing = (origin2) => {
|
|
63651
|
+
if (!origin2)
|
|
63652
63652
|
return null;
|
|
63653
|
-
return Sizable[
|
|
63653
|
+
return Sizable[origin2] ?? null;
|
|
63654
63654
|
};
|
|
63655
63655
|
const FormatDictionary = {
|
|
63656
63656
|
regex: { label: "\u05E7\u05DC\u05D8", gender: "m" },
|
|
@@ -63808,8 +63808,8 @@ var error17 = () => {
|
|
|
63808
63808
|
array: { unit: "elem", verb: "legyen" },
|
|
63809
63809
|
set: { unit: "elem", verb: "legyen" }
|
|
63810
63810
|
};
|
|
63811
|
-
function getSizing(
|
|
63812
|
-
return Sizable[
|
|
63811
|
+
function getSizing(origin2) {
|
|
63812
|
+
return Sizable[origin2] ?? null;
|
|
63813
63813
|
}
|
|
63814
63814
|
const FormatDictionary = {
|
|
63815
63815
|
regex: "bemenet",
|
|
@@ -63952,8 +63952,8 @@ var error18 = () => {
|
|
|
63952
63952
|
verb: "\u0578\u0582\u0576\u0565\u0576\u0561\u056C"
|
|
63953
63953
|
}
|
|
63954
63954
|
};
|
|
63955
|
-
function getSizing(
|
|
63956
|
-
return Sizable[
|
|
63955
|
+
function getSizing(origin2) {
|
|
63956
|
+
return Sizable[origin2] ?? null;
|
|
63957
63957
|
}
|
|
63958
63958
|
const FormatDictionary = {
|
|
63959
63959
|
regex: "\u0574\u0578\u0582\u057F\u0584",
|
|
@@ -64067,8 +64067,8 @@ var error19 = () => {
|
|
|
64067
64067
|
array: { unit: "item", verb: "memiliki" },
|
|
64068
64068
|
set: { unit: "item", verb: "memiliki" }
|
|
64069
64069
|
};
|
|
64070
|
-
function getSizing(
|
|
64071
|
-
return Sizable[
|
|
64070
|
+
function getSizing(origin2) {
|
|
64071
|
+
return Sizable[origin2] ?? null;
|
|
64072
64072
|
}
|
|
64073
64073
|
const FormatDictionary = {
|
|
64074
64074
|
regex: "input",
|
|
@@ -64175,8 +64175,8 @@ var error20 = () => {
|
|
|
64175
64175
|
array: { unit: "hluti", verb: "a\xF0 hafa" },
|
|
64176
64176
|
set: { unit: "hluti", verb: "a\xF0 hafa" }
|
|
64177
64177
|
};
|
|
64178
|
-
function getSizing(
|
|
64179
|
-
return Sizable[
|
|
64178
|
+
function getSizing(origin2) {
|
|
64179
|
+
return Sizable[origin2] ?? null;
|
|
64180
64180
|
}
|
|
64181
64181
|
const FormatDictionary = {
|
|
64182
64182
|
regex: "gildi",
|
|
@@ -64286,8 +64286,8 @@ var error21 = () => {
|
|
|
64286
64286
|
array: { unit: "elementi", verb: "avere" },
|
|
64287
64287
|
set: { unit: "elementi", verb: "avere" }
|
|
64288
64288
|
};
|
|
64289
|
-
function getSizing(
|
|
64290
|
-
return Sizable[
|
|
64289
|
+
function getSizing(origin2) {
|
|
64290
|
+
return Sizable[origin2] ?? null;
|
|
64291
64291
|
}
|
|
64292
64292
|
const FormatDictionary = {
|
|
64293
64293
|
regex: "input",
|
|
@@ -64396,8 +64396,8 @@ var error22 = () => {
|
|
|
64396
64396
|
array: { unit: "\u8981\u7D20", verb: "\u3067\u3042\u308B" },
|
|
64397
64397
|
set: { unit: "\u8981\u7D20", verb: "\u3067\u3042\u308B" }
|
|
64398
64398
|
};
|
|
64399
|
-
function getSizing(
|
|
64400
|
-
return Sizable[
|
|
64399
|
+
function getSizing(origin2) {
|
|
64400
|
+
return Sizable[origin2] ?? null;
|
|
64401
64401
|
}
|
|
64402
64402
|
const FormatDictionary = {
|
|
64403
64403
|
regex: "\u5165\u529B\u5024",
|
|
@@ -64505,8 +64505,8 @@ var error23 = () => {
|
|
|
64505
64505
|
array: { unit: "\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
|
|
64506
64506
|
set: { unit: "\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" }
|
|
64507
64507
|
};
|
|
64508
|
-
function getSizing(
|
|
64509
|
-
return Sizable[
|
|
64508
|
+
function getSizing(origin2) {
|
|
64509
|
+
return Sizable[origin2] ?? null;
|
|
64510
64510
|
}
|
|
64511
64511
|
const FormatDictionary = {
|
|
64512
64512
|
regex: "\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",
|
|
@@ -64622,8 +64622,8 @@ var error24 = () => {
|
|
|
64622
64622
|
array: { unit: "\u1792\u17B6\u178F\u17BB", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
|
|
64623
64623
|
set: { unit: "\u1792\u17B6\u178F\u17BB", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" }
|
|
64624
64624
|
};
|
|
64625
|
-
function getSizing(
|
|
64626
|
-
return Sizable[
|
|
64625
|
+
function getSizing(origin2) {
|
|
64626
|
+
return Sizable[origin2] ?? null;
|
|
64627
64627
|
}
|
|
64628
64628
|
const FormatDictionary = {
|
|
64629
64629
|
regex: "\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",
|
|
@@ -64739,8 +64739,8 @@ var error25 = () => {
|
|
|
64739
64739
|
array: { unit: "\uAC1C", verb: "to have" },
|
|
64740
64740
|
set: { unit: "\uAC1C", verb: "to have" }
|
|
64741
64741
|
};
|
|
64742
|
-
function getSizing(
|
|
64743
|
-
return Sizable[
|
|
64742
|
+
function getSizing(origin2) {
|
|
64743
|
+
return Sizable[origin2] ?? null;
|
|
64744
64744
|
}
|
|
64745
64745
|
const FormatDictionary = {
|
|
64746
64746
|
regex: "\uC785\uB825",
|
|
@@ -64929,8 +64929,8 @@ var error26 = () => {
|
|
|
64929
64929
|
}
|
|
64930
64930
|
}
|
|
64931
64931
|
};
|
|
64932
|
-
function getSizing(
|
|
64933
|
-
const result = Sizable[
|
|
64932
|
+
function getSizing(origin2, unitType, inclusive, targetShouldBe) {
|
|
64933
|
+
const result = Sizable[origin2] ?? null;
|
|
64934
64934
|
if (result === null)
|
|
64935
64935
|
return result;
|
|
64936
64936
|
return {
|
|
@@ -64997,20 +64997,20 @@ var error26 = () => {
|
|
|
64997
64997
|
return `Privalo b\u016Bti ${stringifyPrimitive(issue2.values[0])}`;
|
|
64998
64998
|
return `Privalo b\u016Bti vienas i\u0161 ${joinValues(issue2.values, "|")} pasirinkim\u0173`;
|
|
64999
64999
|
case "too_big": {
|
|
65000
|
-
const
|
|
65000
|
+
const origin2 = TypeDictionary[issue2.origin] ?? issue2.origin;
|
|
65001
65001
|
const sizing = getSizing(issue2.origin, getUnitTypeFromNumber(Number(issue2.maximum)), issue2.inclusive ?? false, "smaller");
|
|
65002
65002
|
if (sizing?.verb)
|
|
65003
|
-
return `${capitalizeFirstCharacter(
|
|
65003
|
+
return `${capitalizeFirstCharacter(origin2 ?? issue2.origin ?? "reik\u0161m\u0117")} ${sizing.verb} ${issue2.maximum.toString()} ${sizing.unit ?? "element\u0173"}`;
|
|
65004
65004
|
const adj = issue2.inclusive ? "ne didesnis kaip" : "ma\u017Eesnis kaip";
|
|
65005
|
-
return `${capitalizeFirstCharacter(
|
|
65005
|
+
return `${capitalizeFirstCharacter(origin2 ?? issue2.origin ?? "reik\u0161m\u0117")} turi b\u016Bti ${adj} ${issue2.maximum.toString()} ${sizing?.unit}`;
|
|
65006
65006
|
}
|
|
65007
65007
|
case "too_small": {
|
|
65008
|
-
const
|
|
65008
|
+
const origin2 = TypeDictionary[issue2.origin] ?? issue2.origin;
|
|
65009
65009
|
const sizing = getSizing(issue2.origin, getUnitTypeFromNumber(Number(issue2.minimum)), issue2.inclusive ?? false, "bigger");
|
|
65010
65010
|
if (sizing?.verb)
|
|
65011
|
-
return `${capitalizeFirstCharacter(
|
|
65011
|
+
return `${capitalizeFirstCharacter(origin2 ?? issue2.origin ?? "reik\u0161m\u0117")} ${sizing.verb} ${issue2.minimum.toString()} ${sizing.unit ?? "element\u0173"}`;
|
|
65012
65012
|
const adj = issue2.inclusive ? "ne ma\u017Eesnis kaip" : "didesnis kaip";
|
|
65013
|
-
return `${capitalizeFirstCharacter(
|
|
65013
|
+
return `${capitalizeFirstCharacter(origin2 ?? issue2.origin ?? "reik\u0161m\u0117")} turi b\u016Bti ${adj} ${issue2.minimum.toString()} ${sizing?.unit}`;
|
|
65014
65014
|
}
|
|
65015
65015
|
case "invalid_format": {
|
|
65016
65016
|
const _issue = issue2;
|
|
@@ -65034,8 +65034,8 @@ var error26 = () => {
|
|
|
65034
65034
|
case "invalid_union":
|
|
65035
65035
|
return "Klaidinga \u012Fvestis";
|
|
65036
65036
|
case "invalid_element": {
|
|
65037
|
-
const
|
|
65038
|
-
return `${capitalizeFirstCharacter(
|
|
65037
|
+
const origin2 = TypeDictionary[issue2.origin] ?? issue2.origin;
|
|
65038
|
+
return `${capitalizeFirstCharacter(origin2 ?? issue2.origin ?? "reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`;
|
|
65039
65039
|
}
|
|
65040
65040
|
default:
|
|
65041
65041
|
return "Klaidinga \u012Fvestis";
|
|
@@ -65057,8 +65057,8 @@ var error27 = () => {
|
|
|
65057
65057
|
array: { unit: "\u0441\u0442\u0430\u0432\u043A\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
|
|
65058
65058
|
set: { unit: "\u0441\u0442\u0430\u0432\u043A\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" }
|
|
65059
65059
|
};
|
|
65060
|
-
function getSizing(
|
|
65061
|
-
return Sizable[
|
|
65060
|
+
function getSizing(origin2) {
|
|
65061
|
+
return Sizable[origin2] ?? null;
|
|
65062
65062
|
}
|
|
65063
65063
|
const FormatDictionary = {
|
|
65064
65064
|
regex: "\u0432\u043D\u0435\u0441",
|
|
@@ -65168,8 +65168,8 @@ var error28 = () => {
|
|
|
65168
65168
|
array: { unit: "elemen", verb: "mempunyai" },
|
|
65169
65169
|
set: { unit: "elemen", verb: "mempunyai" }
|
|
65170
65170
|
};
|
|
65171
|
-
function getSizing(
|
|
65172
|
-
return Sizable[
|
|
65171
|
+
function getSizing(origin2) {
|
|
65172
|
+
return Sizable[origin2] ?? null;
|
|
65173
65173
|
}
|
|
65174
65174
|
const FormatDictionary = {
|
|
65175
65175
|
regex: "input",
|
|
@@ -65277,8 +65277,8 @@ var error29 = () => {
|
|
|
65277
65277
|
array: { unit: "elementen", verb: "heeft" },
|
|
65278
65278
|
set: { unit: "elementen", verb: "heeft" }
|
|
65279
65279
|
};
|
|
65280
|
-
function getSizing(
|
|
65281
|
-
return Sizable[
|
|
65280
|
+
function getSizing(origin2) {
|
|
65281
|
+
return Sizable[origin2] ?? null;
|
|
65282
65282
|
}
|
|
65283
65283
|
const FormatDictionary = {
|
|
65284
65284
|
regex: "invoer",
|
|
@@ -65389,8 +65389,8 @@ var error30 = () => {
|
|
|
65389
65389
|
array: { unit: "elementer", verb: "\xE5 inneholde" },
|
|
65390
65390
|
set: { unit: "elementer", verb: "\xE5 inneholde" }
|
|
65391
65391
|
};
|
|
65392
|
-
function getSizing(
|
|
65393
|
-
return Sizable[
|
|
65392
|
+
function getSizing(origin2) {
|
|
65393
|
+
return Sizable[origin2] ?? null;
|
|
65394
65394
|
}
|
|
65395
65395
|
const FormatDictionary = {
|
|
65396
65396
|
regex: "input",
|
|
@@ -65499,8 +65499,8 @@ var error31 = () => {
|
|
|
65499
65499
|
array: { unit: "unsur", verb: "olmal\u0131d\u0131r" },
|
|
65500
65500
|
set: { unit: "unsur", verb: "olmal\u0131d\u0131r" }
|
|
65501
65501
|
};
|
|
65502
|
-
function getSizing(
|
|
65503
|
-
return Sizable[
|
|
65502
|
+
function getSizing(origin2) {
|
|
65503
|
+
return Sizable[origin2] ?? null;
|
|
65504
65504
|
}
|
|
65505
65505
|
const FormatDictionary = {
|
|
65506
65506
|
regex: "giren",
|
|
@@ -65610,8 +65610,8 @@ var error32 = () => {
|
|
|
65610
65610
|
array: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" },
|
|
65611
65611
|
set: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" }
|
|
65612
65612
|
};
|
|
65613
|
-
function getSizing(
|
|
65614
|
-
return Sizable[
|
|
65613
|
+
function getSizing(origin2) {
|
|
65614
|
+
return Sizable[origin2] ?? null;
|
|
65615
65615
|
}
|
|
65616
65616
|
const FormatDictionary = {
|
|
65617
65617
|
regex: "\u0648\u0631\u0648\u062F\u064A",
|
|
@@ -65726,8 +65726,8 @@ var error33 = () => {
|
|
|
65726
65726
|
array: { unit: "element\xF3w", verb: "mie\u0107" },
|
|
65727
65727
|
set: { unit: "element\xF3w", verb: "mie\u0107" }
|
|
65728
65728
|
};
|
|
65729
|
-
function getSizing(
|
|
65730
|
-
return Sizable[
|
|
65729
|
+
function getSizing(origin2) {
|
|
65730
|
+
return Sizable[origin2] ?? null;
|
|
65731
65731
|
}
|
|
65732
65732
|
const FormatDictionary = {
|
|
65733
65733
|
regex: "wyra\u017Cenie",
|
|
@@ -65837,8 +65837,8 @@ var error34 = () => {
|
|
|
65837
65837
|
array: { unit: "itens", verb: "ter" },
|
|
65838
65838
|
set: { unit: "itens", verb: "ter" }
|
|
65839
65839
|
};
|
|
65840
|
-
function getSizing(
|
|
65841
|
-
return Sizable[
|
|
65840
|
+
function getSizing(origin2) {
|
|
65841
|
+
return Sizable[origin2] ?? null;
|
|
65842
65842
|
}
|
|
65843
65843
|
const FormatDictionary = {
|
|
65844
65844
|
regex: "padr\xE3o",
|
|
@@ -65990,8 +65990,8 @@ var error35 = () => {
|
|
|
65990
65990
|
verb: "\u0438\u043C\u0435\u0442\u044C"
|
|
65991
65991
|
}
|
|
65992
65992
|
};
|
|
65993
|
-
function getSizing(
|
|
65994
|
-
return Sizable[
|
|
65993
|
+
function getSizing(origin2) {
|
|
65994
|
+
return Sizable[origin2] ?? null;
|
|
65995
65995
|
}
|
|
65996
65996
|
const FormatDictionary = {
|
|
65997
65997
|
regex: "\u0432\u0432\u043E\u0434",
|
|
@@ -66105,8 +66105,8 @@ var error36 = () => {
|
|
|
66105
66105
|
array: { unit: "elementov", verb: "imeti" },
|
|
66106
66106
|
set: { unit: "elementov", verb: "imeti" }
|
|
66107
66107
|
};
|
|
66108
|
-
function getSizing(
|
|
66109
|
-
return Sizable[
|
|
66108
|
+
function getSizing(origin2) {
|
|
66109
|
+
return Sizable[origin2] ?? null;
|
|
66110
66110
|
}
|
|
66111
66111
|
const FormatDictionary = {
|
|
66112
66112
|
regex: "vnos",
|
|
@@ -66216,8 +66216,8 @@ var error37 = () => {
|
|
|
66216
66216
|
array: { unit: "objekt", verb: "att inneh\xE5lla" },
|
|
66217
66217
|
set: { unit: "objekt", verb: "att inneh\xE5lla" }
|
|
66218
66218
|
};
|
|
66219
|
-
function getSizing(
|
|
66220
|
-
return Sizable[
|
|
66219
|
+
function getSizing(origin2) {
|
|
66220
|
+
return Sizable[origin2] ?? null;
|
|
66221
66221
|
}
|
|
66222
66222
|
const FormatDictionary = {
|
|
66223
66223
|
regex: "regulj\xE4rt uttryck",
|
|
@@ -66328,8 +66328,8 @@ var error38 = () => {
|
|
|
66328
66328
|
array: { unit: "\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" },
|
|
66329
66329
|
set: { unit: "\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" }
|
|
66330
66330
|
};
|
|
66331
|
-
function getSizing(
|
|
66332
|
-
return Sizable[
|
|
66331
|
+
function getSizing(origin2) {
|
|
66332
|
+
return Sizable[origin2] ?? null;
|
|
66333
66333
|
}
|
|
66334
66334
|
const FormatDictionary = {
|
|
66335
66335
|
regex: "\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",
|
|
@@ -66440,8 +66440,8 @@ var error39 = () => {
|
|
|
66440
66440
|
array: { unit: "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
|
|
66441
66441
|
set: { unit: "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" }
|
|
66442
66442
|
};
|
|
66443
|
-
function getSizing(
|
|
66444
|
-
return Sizable[
|
|
66443
|
+
function getSizing(origin2) {
|
|
66444
|
+
return Sizable[origin2] ?? null;
|
|
66445
66445
|
}
|
|
66446
66446
|
const FormatDictionary = {
|
|
66447
66447
|
regex: "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",
|
|
@@ -66552,8 +66552,8 @@ var error40 = () => {
|
|
|
66552
66552
|
array: { unit: "\xF6\u011Fe", verb: "olmal\u0131" },
|
|
66553
66553
|
set: { unit: "\xF6\u011Fe", verb: "olmal\u0131" }
|
|
66554
66554
|
};
|
|
66555
|
-
function getSizing(
|
|
66556
|
-
return Sizable[
|
|
66555
|
+
function getSizing(origin2) {
|
|
66556
|
+
return Sizable[origin2] ?? null;
|
|
66557
66557
|
}
|
|
66558
66558
|
const FormatDictionary = {
|
|
66559
66559
|
regex: "girdi",
|
|
@@ -66662,8 +66662,8 @@ var error41 = () => {
|
|
|
66662
66662
|
array: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
|
|
66663
66663
|
set: { unit: "\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" }
|
|
66664
66664
|
};
|
|
66665
|
-
function getSizing(
|
|
66666
|
-
return Sizable[
|
|
66665
|
+
function getSizing(origin2) {
|
|
66666
|
+
return Sizable[origin2] ?? null;
|
|
66667
66667
|
}
|
|
66668
66668
|
const FormatDictionary = {
|
|
66669
66669
|
regex: "\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",
|
|
@@ -66777,8 +66777,8 @@ var error42 = () => {
|
|
|
66777
66777
|
array: { unit: "\u0622\u0626\u0679\u0645\u0632", verb: "\u06C1\u0648\u0646\u0627" },
|
|
66778
66778
|
set: { unit: "\u0622\u0626\u0679\u0645\u0632", verb: "\u06C1\u0648\u0646\u0627" }
|
|
66779
66779
|
};
|
|
66780
|
-
function getSizing(
|
|
66781
|
-
return Sizable[
|
|
66780
|
+
function getSizing(origin2) {
|
|
66781
|
+
return Sizable[origin2] ?? null;
|
|
66782
66782
|
}
|
|
66783
66783
|
const FormatDictionary = {
|
|
66784
66784
|
regex: "\u0627\u0646 \u067E\u0679",
|
|
@@ -66889,8 +66889,8 @@ var error43 = () => {
|
|
|
66889
66889
|
array: { unit: "element", verb: "bo\u2018lishi kerak" },
|
|
66890
66890
|
set: { unit: "element", verb: "bo\u2018lishi kerak" }
|
|
66891
66891
|
};
|
|
66892
|
-
function getSizing(
|
|
66893
|
-
return Sizable[
|
|
66892
|
+
function getSizing(origin2) {
|
|
66893
|
+
return Sizable[origin2] ?? null;
|
|
66894
66894
|
}
|
|
66895
66895
|
const FormatDictionary = {
|
|
66896
66896
|
regex: "kirish",
|
|
@@ -67000,8 +67000,8 @@ var error44 = () => {
|
|
|
67000
67000
|
array: { unit: "ph\u1EA7n t\u1EED", verb: "c\xF3" },
|
|
67001
67001
|
set: { unit: "ph\u1EA7n t\u1EED", verb: "c\xF3" }
|
|
67002
67002
|
};
|
|
67003
|
-
function getSizing(
|
|
67004
|
-
return Sizable[
|
|
67003
|
+
function getSizing(origin2) {
|
|
67004
|
+
return Sizable[origin2] ?? null;
|
|
67005
67005
|
}
|
|
67006
67006
|
const FormatDictionary = {
|
|
67007
67007
|
regex: "\u0111\u1EA7u v\xE0o",
|
|
@@ -67110,8 +67110,8 @@ var error45 = () => {
|
|
|
67110
67110
|
array: { unit: "\u9879", verb: "\u5305\u542B" },
|
|
67111
67111
|
set: { unit: "\u9879", verb: "\u5305\u542B" }
|
|
67112
67112
|
};
|
|
67113
|
-
function getSizing(
|
|
67114
|
-
return Sizable[
|
|
67113
|
+
function getSizing(origin2) {
|
|
67114
|
+
return Sizable[origin2] ?? null;
|
|
67115
67115
|
}
|
|
67116
67116
|
const FormatDictionary = {
|
|
67117
67117
|
regex: "\u8F93\u5165",
|
|
@@ -67221,8 +67221,8 @@ var error46 = () => {
|
|
|
67221
67221
|
array: { unit: "\u9805\u76EE", verb: "\u64C1\u6709" },
|
|
67222
67222
|
set: { unit: "\u9805\u76EE", verb: "\u64C1\u6709" }
|
|
67223
67223
|
};
|
|
67224
|
-
function getSizing(
|
|
67225
|
-
return Sizable[
|
|
67224
|
+
function getSizing(origin2) {
|
|
67225
|
+
return Sizable[origin2] ?? null;
|
|
67226
67226
|
}
|
|
67227
67227
|
const FormatDictionary = {
|
|
67228
67228
|
regex: "\u8F38\u5165",
|
|
@@ -67330,8 +67330,8 @@ var error47 = () => {
|
|
|
67330
67330
|
array: { unit: "nkan", verb: "n\xED" },
|
|
67331
67331
|
set: { unit: "nkan", verb: "n\xED" }
|
|
67332
67332
|
};
|
|
67333
|
-
function getSizing(
|
|
67334
|
-
return Sizable[
|
|
67333
|
+
function getSizing(origin2) {
|
|
67334
|
+
return Sizable[origin2] ?? null;
|
|
67335
67335
|
}
|
|
67336
67336
|
const FormatDictionary = {
|
|
67337
67337
|
regex: "\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",
|
|
@@ -80676,7 +80676,8 @@ var safeWrapFetchWithPayment = ({
|
|
|
80676
80676
|
return probeResult.andThen(
|
|
80677
80677
|
(response2) => fetchOk({
|
|
80678
80678
|
response: response2,
|
|
80679
|
-
paymentPayload: void 0
|
|
80679
|
+
paymentPayload: void 0,
|
|
80680
|
+
settlement: void 0
|
|
80680
80681
|
})
|
|
80681
80682
|
);
|
|
80682
80683
|
}
|
|
@@ -80713,12 +80714,22 @@ var safeWrapFetchWithPayment = ({
|
|
|
80713
80714
|
"Access-Control-Expose-Headers",
|
|
80714
80715
|
"PAYMENT-RESPONSE,X-PAYMENT-RESPONSE"
|
|
80715
80716
|
);
|
|
80716
|
-
|
|
80717
|
-
|
|
80718
|
-
|
|
80719
|
-
|
|
80720
|
-
|
|
80717
|
+
const retryResult = await safeFetch(surface2, clonedRequest);
|
|
80718
|
+
if (retryResult.isErr()) {
|
|
80719
|
+
return retryResult;
|
|
80720
|
+
}
|
|
80721
|
+
const settlementResult = safeGetPaymentSettlement(
|
|
80722
|
+
surface2,
|
|
80723
|
+
retryResult.value
|
|
80721
80724
|
);
|
|
80725
|
+
return x402Ok({
|
|
80726
|
+
response: retryResult.value,
|
|
80727
|
+
paymentPayload,
|
|
80728
|
+
settlement: settlementResult.match(
|
|
80729
|
+
(ok3) => ok3,
|
|
80730
|
+
() => void 0
|
|
80731
|
+
)
|
|
80732
|
+
});
|
|
80722
80733
|
};
|
|
80723
80734
|
};
|
|
80724
80735
|
var safeCheckX402Endpoint = async ({
|
|
@@ -80842,10 +80853,10 @@ var discoveryDocumentSchema = zod_default.object({
|
|
|
80842
80853
|
instructions: zod_default.string().optional()
|
|
80843
80854
|
});
|
|
80844
80855
|
var fetchWellKnown = async ({ surface: surface2, url: url2 }) => {
|
|
80845
|
-
const
|
|
80846
|
-
const hostname3 = URL.canParse(
|
|
80847
|
-
log.info(`Discovering resources for origin: ${
|
|
80848
|
-
const wellKnownUrl = `${
|
|
80856
|
+
const origin2 = URL.canParse(url2) ? new URL(url2).origin : url2;
|
|
80857
|
+
const hostname3 = URL.canParse(origin2) ? new URL(origin2).hostname : origin2;
|
|
80858
|
+
log.info(`Discovering resources for origin: ${origin2}`);
|
|
80859
|
+
const wellKnownUrl = `${origin2}/.well-known/x402`;
|
|
80849
80860
|
log.debug(`Fetching discovery document from: ${wellKnownUrl}`);
|
|
80850
80861
|
const wellKnownResult = await safeFetchJson(
|
|
80851
80862
|
surface2,
|
|
@@ -80892,23 +80903,23 @@ var fetchWellKnown = async ({ surface: surface2, url: url2 }) => {
|
|
|
80892
80903
|
}
|
|
80893
80904
|
return err2("fetch-well-known", surface2, {
|
|
80894
80905
|
cause: "not_found",
|
|
80895
|
-
message: `No discovery document found for ${
|
|
80906
|
+
message: `No discovery document found for ${origin2}`
|
|
80896
80907
|
});
|
|
80897
80908
|
};
|
|
80898
80909
|
|
|
80899
80910
|
// src/server/lib/origin-data.ts
|
|
80900
80911
|
var getOriginData = async ({
|
|
80901
|
-
origin,
|
|
80912
|
+
origin: origin2,
|
|
80902
80913
|
surface: surface2
|
|
80903
80914
|
}) => {
|
|
80904
|
-
const metadata = (await getWebPageMetadata(
|
|
80915
|
+
const metadata = (await getWebPageMetadata(origin2)).match(
|
|
80905
80916
|
(ok3) => ok3,
|
|
80906
80917
|
() => null
|
|
80907
80918
|
);
|
|
80908
|
-
const hostname3 = URL.canParse(
|
|
80919
|
+
const hostname3 = URL.canParse(origin2) ? new URL(origin2).hostname : origin2;
|
|
80909
80920
|
const wellKnownResult = await fetchWellKnown({
|
|
80910
80921
|
surface: surface2,
|
|
80911
|
-
url:
|
|
80922
|
+
url: origin2
|
|
80912
80923
|
});
|
|
80913
80924
|
if (wellKnownResult.isErr()) {
|
|
80914
80925
|
log.error(
|
|
@@ -80959,9 +80970,9 @@ var registerOriginResources = async ({
|
|
|
80959
80970
|
}) => {
|
|
80960
80971
|
const { origins } = getState();
|
|
80961
80972
|
await Promise.all(
|
|
80962
|
-
origins.map(async (
|
|
80963
|
-
const surface2 = `${
|
|
80964
|
-
const originData = await getOriginData({ origin, surface: surface2 });
|
|
80973
|
+
origins.map(async (origin2) => {
|
|
80974
|
+
const surface2 = `${origin2}-resource`;
|
|
80975
|
+
const originData = await getOriginData({ origin: origin2, surface: surface2 });
|
|
80965
80976
|
if (!originData) {
|
|
80966
80977
|
return;
|
|
80967
80978
|
}
|
|
@@ -80978,7 +80989,7 @@ var registerOriginResources = async ({
|
|
|
80978
80989
|
});
|
|
80979
80990
|
if (stringifyResult.isErr()) {
|
|
80980
80991
|
log.error(
|
|
80981
|
-
`Failed to stringify response for ${
|
|
80992
|
+
`Failed to stringify response for ${origin2}:`,
|
|
80982
80993
|
stringifyResult.error
|
|
80983
80994
|
);
|
|
80984
80995
|
return;
|
|
@@ -80987,7 +80998,7 @@ var registerOriginResources = async ({
|
|
|
80987
80998
|
hostname3,
|
|
80988
80999
|
`api://${hostname3}`,
|
|
80989
81000
|
{
|
|
80990
|
-
title: metadata?.title ??
|
|
81001
|
+
title: metadata?.title ?? origin2,
|
|
80991
81002
|
description: metadata?.description ?? "",
|
|
80992
81003
|
mimeType: "application/json"
|
|
80993
81004
|
},
|
|
@@ -81230,7 +81241,7 @@ var import_path2 = require("path");
|
|
|
81230
81241
|
var import_url = require("url");
|
|
81231
81242
|
function getVersion() {
|
|
81232
81243
|
if (true) {
|
|
81233
|
-
return "0.2.1-beta.
|
|
81244
|
+
return "0.2.1-beta.1";
|
|
81234
81245
|
}
|
|
81235
81246
|
const __dirname3 = (0, import_path2.dirname)((0, import_url.fileURLToPath)(importMetaUrl));
|
|
81236
81247
|
const pkg = JSON.parse(
|
|
@@ -81629,6 +81640,64 @@ var mcpSuccessResponse = (data, extra) => {
|
|
|
81629
81640
|
]);
|
|
81630
81641
|
};
|
|
81631
81642
|
|
|
81643
|
+
// src/server/tools/response/fetch-response.ts
|
|
81644
|
+
init_cjs_shims();
|
|
81645
|
+
var mcpFetchResponse = async ({
|
|
81646
|
+
surface: surface2,
|
|
81647
|
+
fetchResult,
|
|
81648
|
+
extra
|
|
81649
|
+
}) => {
|
|
81650
|
+
if (fetchResult.isErr()) {
|
|
81651
|
+
return mcpError(fetchResult);
|
|
81652
|
+
}
|
|
81653
|
+
const response = fetchResult.value;
|
|
81654
|
+
if (!response.ok) {
|
|
81655
|
+
return mcpErrorFetch(surface2, response);
|
|
81656
|
+
}
|
|
81657
|
+
const parseResponseResult = await safeParseResponse(surface2, response);
|
|
81658
|
+
if (parseResponseResult.isErr()) {
|
|
81659
|
+
return mcpError(parseResponseResult);
|
|
81660
|
+
}
|
|
81661
|
+
return mcpSuccessResponse(parseResponseResult.value, extra);
|
|
81662
|
+
};
|
|
81663
|
+
var mcpX402FetchResponse = async ({
|
|
81664
|
+
surface: surface2,
|
|
81665
|
+
x402FetchResult,
|
|
81666
|
+
extra
|
|
81667
|
+
}) => {
|
|
81668
|
+
if (x402FetchResult.isErr()) {
|
|
81669
|
+
return mcpError(x402FetchResult);
|
|
81670
|
+
}
|
|
81671
|
+
const { response, paymentPayload, settlement } = x402FetchResult.value;
|
|
81672
|
+
if (!response.ok) {
|
|
81673
|
+
return mcpErrorFetch(origin, response);
|
|
81674
|
+
}
|
|
81675
|
+
const parseResponseResult = await safeParseResponse(surface2, response);
|
|
81676
|
+
if (parseResponseResult.isErr()) {
|
|
81677
|
+
return mcpError(parseResponseResult);
|
|
81678
|
+
}
|
|
81679
|
+
return mcpSuccessResponse(
|
|
81680
|
+
parseResponseResult.value,
|
|
81681
|
+
settlement !== void 0 || paymentPayload !== void 0 ? {
|
|
81682
|
+
...extra,
|
|
81683
|
+
...paymentPayload !== void 0 ? {
|
|
81684
|
+
price: tokenStringToNumber(
|
|
81685
|
+
paymentPayload.accepted.amount
|
|
81686
|
+
).toLocaleString("en-US", {
|
|
81687
|
+
style: "currency",
|
|
81688
|
+
currency: "USD"
|
|
81689
|
+
})
|
|
81690
|
+
} : {},
|
|
81691
|
+
...settlement !== void 0 ? {
|
|
81692
|
+
payment: {
|
|
81693
|
+
success: settlement.success,
|
|
81694
|
+
transactionHash: settlement.transaction
|
|
81695
|
+
}
|
|
81696
|
+
} : {}
|
|
81697
|
+
} : extra
|
|
81698
|
+
);
|
|
81699
|
+
};
|
|
81700
|
+
|
|
81632
81701
|
// src/server/tools/lib/request.ts
|
|
81633
81702
|
init_cjs_shims();
|
|
81634
81703
|
var requestSchema = zod_default.object({
|
|
@@ -81663,9 +81732,9 @@ var registerFetchOriginTool = async ({
|
|
|
81663
81732
|
}) => {
|
|
81664
81733
|
const { origins } = getState();
|
|
81665
81734
|
await Promise.all(
|
|
81666
|
-
origins.map(async (
|
|
81667
|
-
const surface2 = `${
|
|
81668
|
-
const originData = await getOriginData({ origin, surface: surface2 });
|
|
81735
|
+
origins.map(async (origin2) => {
|
|
81736
|
+
const surface2 = `${origin2}-fetch`;
|
|
81737
|
+
const originData = await getOriginData({ origin: origin2, surface: surface2 });
|
|
81669
81738
|
if (!originData) {
|
|
81670
81739
|
return;
|
|
81671
81740
|
}
|
|
@@ -81703,11 +81772,9 @@ var registerFetchOriginTool = async ({
|
|
|
81703
81772
|
site,
|
|
81704
81773
|
{
|
|
81705
81774
|
title: metadata?.title ?? void 0,
|
|
81706
|
-
description: metadata?.description ??
|
|
81775
|
+
description: metadata?.description ?? `Make x402 requests to ${origin2}`,
|
|
81707
81776
|
inputSchema: zod_default.object({
|
|
81708
|
-
request: zod_default.union([zod_default.string(), requestSchema2]).describe(
|
|
81709
|
-
originData.wellKnown.instructions ?? `The request to send to ${origin}`
|
|
81710
|
-
).refine(
|
|
81777
|
+
request: zod_default.union([zod_default.string(), requestSchema2]).describe(`The request to send to ${origin2}`).refine(
|
|
81711
81778
|
(value) => typeof value === "string" ? requestSchema2.safeParse(JSON.parse(value)).success : true
|
|
81712
81779
|
).transform(
|
|
81713
81780
|
(value) => typeof value === "string" ? requestSchema2.parse(JSON.parse(value)) : value
|
|
@@ -81718,7 +81785,7 @@ var registerFetchOriginTool = async ({
|
|
|
81718
81785
|
const fetchWithPay = safeWrapFetchWithPayment({
|
|
81719
81786
|
account,
|
|
81720
81787
|
server,
|
|
81721
|
-
surface:
|
|
81788
|
+
surface: origin2,
|
|
81722
81789
|
flags
|
|
81723
81790
|
});
|
|
81724
81791
|
const url2 = new URL(request.url);
|
|
@@ -81741,7 +81808,7 @@ var registerFetchOriginTool = async ({
|
|
|
81741
81808
|
}
|
|
81742
81809
|
}
|
|
81743
81810
|
}
|
|
81744
|
-
const
|
|
81811
|
+
const x402FetchResult = await fetchWithPay(
|
|
81745
81812
|
buildRequest({
|
|
81746
81813
|
input: {
|
|
81747
81814
|
url: url2.toString(),
|
|
@@ -81753,37 +81820,10 @@ var registerFetchOriginTool = async ({
|
|
|
81753
81820
|
sessionId
|
|
81754
81821
|
})
|
|
81755
81822
|
);
|
|
81756
|
-
|
|
81757
|
-
|
|
81758
|
-
|
|
81759
|
-
|
|
81760
|
-
if (!response.ok) {
|
|
81761
|
-
return mcpErrorFetch(origin, response);
|
|
81762
|
-
}
|
|
81763
|
-
const parseResponseResult = await safeParseResponse(origin, response);
|
|
81764
|
-
if (parseResponseResult.isErr()) {
|
|
81765
|
-
return mcpError(parseResponseResult);
|
|
81766
|
-
}
|
|
81767
|
-
const settlementResult = safeGetPaymentSettlement(origin, response);
|
|
81768
|
-
return mcpSuccessResponse(
|
|
81769
|
-
parseResponseResult.value,
|
|
81770
|
-
settlementResult.isOk() || paymentPayload !== void 0 ? {
|
|
81771
|
-
...paymentPayload !== void 0 ? {
|
|
81772
|
-
price: tokenStringToNumber(
|
|
81773
|
-
paymentPayload.accepted.amount
|
|
81774
|
-
).toLocaleString("en-US", {
|
|
81775
|
-
style: "currency",
|
|
81776
|
-
currency: "USD"
|
|
81777
|
-
})
|
|
81778
|
-
} : {},
|
|
81779
|
-
...settlementResult.isOk() ? {
|
|
81780
|
-
payment: {
|
|
81781
|
-
success: settlementResult.value.success,
|
|
81782
|
-
transactionHash: settlementResult.value.transaction
|
|
81783
|
-
}
|
|
81784
|
-
} : {}
|
|
81785
|
-
} : void 0
|
|
81786
|
-
);
|
|
81823
|
+
return mcpX402FetchResponse({
|
|
81824
|
+
surface: origin2,
|
|
81825
|
+
x402FetchResult
|
|
81826
|
+
});
|
|
81787
81827
|
}
|
|
81788
81828
|
);
|
|
81789
81829
|
})
|
|
@@ -81822,37 +81862,10 @@ var registerFetchX402ResourceTool = ({
|
|
|
81822
81862
|
const fetchResult = await fetchWithPay(
|
|
81823
81863
|
buildRequest({ input, address: account.address, sessionId })
|
|
81824
81864
|
);
|
|
81825
|
-
|
|
81826
|
-
|
|
81827
|
-
|
|
81828
|
-
|
|
81829
|
-
if (!response.ok) {
|
|
81830
|
-
return mcpErrorFetch(toolName, response);
|
|
81831
|
-
}
|
|
81832
|
-
const parseResponseResult = await safeParseResponse(toolName, response);
|
|
81833
|
-
if (parseResponseResult.isErr()) {
|
|
81834
|
-
return mcpError(parseResponseResult);
|
|
81835
|
-
}
|
|
81836
|
-
const settlementResult = safeGetPaymentSettlement(toolName, response);
|
|
81837
|
-
return mcpSuccessResponse(
|
|
81838
|
-
parseResponseResult.value,
|
|
81839
|
-
settlementResult.isOk() || paymentPayload !== void 0 ? {
|
|
81840
|
-
...paymentPayload !== void 0 ? {
|
|
81841
|
-
price: tokenStringToNumber(
|
|
81842
|
-
paymentPayload.accepted.amount
|
|
81843
|
-
).toLocaleString("en-US", {
|
|
81844
|
-
style: "currency",
|
|
81845
|
-
currency: "USD"
|
|
81846
|
-
})
|
|
81847
|
-
} : {},
|
|
81848
|
-
...settlementResult.isOk() ? {
|
|
81849
|
-
payment: {
|
|
81850
|
-
success: settlementResult.value.success,
|
|
81851
|
-
transactionHash: settlementResult.value.transaction
|
|
81852
|
-
}
|
|
81853
|
-
} : {}
|
|
81854
|
-
} : void 0
|
|
81855
|
-
);
|
|
81865
|
+
return mcpX402FetchResponse({
|
|
81866
|
+
surface: toolName,
|
|
81867
|
+
x402FetchResult: fetchResult
|
|
81868
|
+
});
|
|
81856
81869
|
}
|
|
81857
81870
|
);
|
|
81858
81871
|
};
|
|
@@ -81875,7 +81888,7 @@ var registerWalletTools = ({
|
|
|
81875
81888
|
networkName: external_exports3.string().describe("Human-readable network name"),
|
|
81876
81889
|
usdcBalance: external_exports3.number().describe("USDC balance"),
|
|
81877
81890
|
isNewWallet: external_exports3.boolean().describe("True if balance is 0"),
|
|
81878
|
-
depositLink: external_exports3.
|
|
81891
|
+
depositLink: external_exports3.url().describe("Link to fund the wallet"),
|
|
81879
81892
|
message: external_exports3.string().optional().describe("Warning if balance is low")
|
|
81880
81893
|
}),
|
|
81881
81894
|
annotations: {
|
|
@@ -81942,15 +81955,12 @@ var registerCheckX402EndpointTool = ({
|
|
|
81942
81955
|
}
|
|
81943
81956
|
const response = responseResult.value;
|
|
81944
81957
|
if (response.status !== 402) {
|
|
81945
|
-
|
|
81946
|
-
|
|
81947
|
-
|
|
81948
|
-
|
|
81949
|
-
|
|
81950
|
-
|
|
81951
|
-
}
|
|
81952
|
-
return mcpSuccessResponse(parseResponseResult.value, {
|
|
81953
|
-
requiresPayment: false
|
|
81958
|
+
return await mcpFetchResponse({
|
|
81959
|
+
surface: toolName2,
|
|
81960
|
+
fetchResult: responseResult,
|
|
81961
|
+
extra: {
|
|
81962
|
+
requiresPayment: false
|
|
81963
|
+
}
|
|
81954
81964
|
});
|
|
81955
81965
|
}
|
|
81956
81966
|
const client = new x402HTTPClient(new x402Client());
|
|
@@ -82032,12 +82042,6 @@ var registerRedeemInviteTool = ({
|
|
|
82032
82042
|
|
|
82033
82043
|
// src/server/tools/discover-resources.ts
|
|
82034
82044
|
init_cjs_shims();
|
|
82035
|
-
var discoveryDocumentSchema2 = external_exports3.object({
|
|
82036
|
-
version: external_exports3.number().refine((v) => v === 1, { message: "version must be 1" }),
|
|
82037
|
-
resources: external_exports3.array(external_exports3.string()),
|
|
82038
|
-
ownershipProofs: external_exports3.array(external_exports3.string()).optional(),
|
|
82039
|
-
instructions: external_exports3.string().optional()
|
|
82040
|
-
});
|
|
82041
82045
|
var toolName3 = "discover_api_endpoints";
|
|
82042
82046
|
var registerDiscoveryTools = ({ server }) => {
|
|
82043
82047
|
server.registerTool(
|
|
@@ -82071,65 +82075,12 @@ var registerDiscoveryTools = ({ server }) => {
|
|
|
82071
82075
|
}
|
|
82072
82076
|
},
|
|
82073
82077
|
async ({ url: url2 }) => {
|
|
82074
|
-
const
|
|
82075
|
-
|
|
82076
|
-
|
|
82077
|
-
|
|
82078
|
-
log.debug(`Fetching discovery document from: ${wellKnownUrl}`);
|
|
82079
|
-
const wellKnownResult = await safeFetchJson(
|
|
82080
|
-
toolName3,
|
|
82081
|
-
new Request(wellKnownUrl, { headers: { Accept: "application/json" } }),
|
|
82082
|
-
discoveryDocumentSchema2
|
|
82083
|
-
);
|
|
82078
|
+
const wellKnownResult = await fetchWellKnown({
|
|
82079
|
+
surface: toolName3,
|
|
82080
|
+
url: url2
|
|
82081
|
+
});
|
|
82084
82082
|
if (wellKnownResult.isOk()) {
|
|
82085
|
-
return mcpSuccessJson(
|
|
82086
|
-
found: true,
|
|
82087
|
-
origin,
|
|
82088
|
-
source: "well-known",
|
|
82089
|
-
data: wellKnownResult.value
|
|
82090
|
-
});
|
|
82091
|
-
} else {
|
|
82092
|
-
log.info(
|
|
82093
|
-
`No well-known x402 discovery document found at ${wellKnownUrl}`
|
|
82094
|
-
);
|
|
82095
|
-
}
|
|
82096
|
-
const dnsQuery = `_x402.${hostname3}`;
|
|
82097
|
-
log.debug(`Looking up DNS TXT record: ${dnsQuery}`);
|
|
82098
|
-
const dnsResult = await safeFetchJson(
|
|
82099
|
-
toolName3,
|
|
82100
|
-
new Request(
|
|
82101
|
-
`https://cloudflare-dns.com/dns-query?name=${encodeURIComponent(dnsQuery)}&type=TXT`,
|
|
82102
|
-
{ headers: { Accept: "application/dns-json" } }
|
|
82103
|
-
),
|
|
82104
|
-
external_exports3.object({
|
|
82105
|
-
Answer: external_exports3.array(
|
|
82106
|
-
external_exports3.object({
|
|
82107
|
-
data: external_exports3.string()
|
|
82108
|
-
})
|
|
82109
|
-
).optional()
|
|
82110
|
-
})
|
|
82111
|
-
);
|
|
82112
|
-
if (dnsResult.isOk() && dnsResult.value.Answer && dnsResult.value.Answer.length > 0) {
|
|
82113
|
-
const dnsUrl = dnsResult.value.Answer[0].data.replace(/^"|"$/g, "");
|
|
82114
|
-
if (URL.canParse(dnsUrl)) {
|
|
82115
|
-
const dnsDocResult = await safeFetchJson(
|
|
82116
|
-
toolName3,
|
|
82117
|
-
new Request(dnsUrl, { headers: { Accept: "application/json" } }),
|
|
82118
|
-
discoveryDocumentSchema2
|
|
82119
|
-
);
|
|
82120
|
-
if (dnsDocResult.isOk()) {
|
|
82121
|
-
return mcpSuccessJson({
|
|
82122
|
-
found: true,
|
|
82123
|
-
origin,
|
|
82124
|
-
source: "dns-txt",
|
|
82125
|
-
data: dnsDocResult.value
|
|
82126
|
-
});
|
|
82127
|
-
}
|
|
82128
|
-
} else {
|
|
82129
|
-
log.debug(`DNS TXT value is not a valid URL: ${dnsUrl}`);
|
|
82130
|
-
}
|
|
82131
|
-
} else {
|
|
82132
|
-
log.info(`No DNS TXT record found for ${dnsQuery}`);
|
|
82083
|
+
return mcpSuccessJson(wellKnownResult.value);
|
|
82133
82084
|
}
|
|
82134
82085
|
const llmsTxtUrl = `${origin}/llms.txt`;
|
|
82135
82086
|
log.debug(`Fetching llms.txt from: ${llmsTxtUrl}`);
|
|
@@ -82141,18 +82092,13 @@ var registerDiscoveryTools = ({ server }) => {
|
|
|
82141
82092
|
const parseResult = await safeParseResponse(toolName3, llmsResult.value);
|
|
82142
82093
|
if (parseResult.isOk() && parseResult.value.type === "text") {
|
|
82143
82094
|
return mcpSuccessJson({
|
|
82144
|
-
|
|
82145
|
-
|
|
82146
|
-
source: "llms-txt",
|
|
82147
|
-
usage: "Found llms.txt but no structured x402 discovery document. The content below may contain information about x402 resources. Parse it to find relevant endpoints.",
|
|
82148
|
-
data: parseResult.value
|
|
82095
|
+
document: "llms.txt",
|
|
82096
|
+
body: parseResult.value.data
|
|
82149
82097
|
});
|
|
82150
82098
|
}
|
|
82151
82099
|
}
|
|
82152
82100
|
return mcpErrorJson({
|
|
82153
|
-
found:
|
|
82154
|
-
origin,
|
|
82155
|
-
error: "No discovery document found. Tried: .well-known/x402, DNS TXT record, llms.txt"
|
|
82101
|
+
message: "No discovery document found. Tried: .well-known/x402, DNS TXT record, llms.txt"
|
|
82156
82102
|
});
|
|
82157
82103
|
}
|
|
82158
82104
|
);
|
|
@@ -82266,17 +82212,10 @@ var registerAuthTools = ({
|
|
|
82266
82212
|
}
|
|
82267
82213
|
const firstResponse = firstResult.value;
|
|
82268
82214
|
if (firstResponse.status !== 402) {
|
|
82269
|
-
|
|
82270
|
-
|
|
82271
|
-
|
|
82272
|
-
|
|
82273
|
-
toolName5,
|
|
82274
|
-
firstResponse
|
|
82275
|
-
);
|
|
82276
|
-
if (parseResponseResult2.isErr()) {
|
|
82277
|
-
return mcpError(parseResponseResult2);
|
|
82278
|
-
}
|
|
82279
|
-
return mcpSuccessResponse(parseResponseResult2.value);
|
|
82215
|
+
return await mcpFetchResponse({
|
|
82216
|
+
surface: toolName5,
|
|
82217
|
+
fetchResult: firstResult
|
|
82218
|
+
});
|
|
82280
82219
|
}
|
|
82281
82220
|
const getPaymentRequiredResult = await safeGetPaymentRequired(
|
|
82282
82221
|
toolName5,
|
|
@@ -82338,21 +82277,10 @@ var registerAuthTools = ({
|
|
|
82338
82277
|
});
|
|
82339
82278
|
authedRequest.headers.set("SIGN-IN-WITH-X", siwxHeader);
|
|
82340
82279
|
const authedResult = await safeFetch(toolName5, authedRequest);
|
|
82341
|
-
|
|
82342
|
-
|
|
82343
|
-
|
|
82344
|
-
|
|
82345
|
-
if (!authedResponse.ok) {
|
|
82346
|
-
return mcpErrorFetch(toolName5, authedResponse);
|
|
82347
|
-
}
|
|
82348
|
-
const parseResponseResult = await safeParseResponse(
|
|
82349
|
-
toolName5,
|
|
82350
|
-
authedResponse
|
|
82351
|
-
);
|
|
82352
|
-
if (parseResponseResult.isErr()) {
|
|
82353
|
-
return mcpError(parseResponseResult);
|
|
82354
|
-
}
|
|
82355
|
-
return mcpSuccessResponse(parseResponseResult.value);
|
|
82280
|
+
return await mcpFetchResponse({
|
|
82281
|
+
surface: toolName5,
|
|
82282
|
+
fetchResult: authedResult
|
|
82283
|
+
});
|
|
82356
82284
|
}
|
|
82357
82285
|
);
|
|
82358
82286
|
};
|