@xyd-js/mcp-server 0.0.0-build-52f9bb2-20251012023142 → 0.0.0-build-2bb31f3-20251012215032
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 +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +52 -49
- package/dist/mcp.d.ts +22 -0
- package/dist/mcp.js +169707 -0
- package/package.json +9 -5
- package/src/index.ts +0 -1
- package/src/mcp.ts +12 -7
- package/tsconfig.json +26 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# @xyd-js/mcp-server
|
|
2
2
|
|
|
3
|
-
## 0.0.0-build-
|
|
3
|
+
## 0.0.0-build-2bb31f3-20251012215032
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
7
|
- update all packages
|
|
8
8
|
- Updated dependencies
|
|
9
|
-
- @xyd-js/mcp@0.0.0-build-
|
|
9
|
+
- @xyd-js/mcp@0.0.0-build-2bb31f3-20251012215032
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/index.js
CHANGED
|
@@ -37236,7 +37236,7 @@ var coerce = {
|
|
|
37236
37236
|
date: (arg) => ZodDate.create({ ...arg, coerce: true })
|
|
37237
37237
|
};
|
|
37238
37238
|
var NEVER = INVALID;
|
|
37239
|
-
// ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.
|
|
37239
|
+
// ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.20.0/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
|
|
37240
37240
|
var LATEST_PROTOCOL_VERSION = "2025-06-18";
|
|
37241
37241
|
var DEFAULT_NEGOTIATED_PROTOCOL_VERSION = "2025-03-26";
|
|
37242
37242
|
var SUPPORTED_PROTOCOL_VERSIONS = [LATEST_PROTOCOL_VERSION, "2025-03-26", "2024-11-05", "2024-10-07"];
|
|
@@ -37759,7 +37759,7 @@ class McpError extends Error {
|
|
|
37759
37759
|
}
|
|
37760
37760
|
}
|
|
37761
37761
|
|
|
37762
|
-
// ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.
|
|
37762
|
+
// ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.20.0/node_modules/@modelcontextprotocol/sdk/dist/esm/server/streamableHttp.js
|
|
37763
37763
|
var import_raw_body = __toESM(require_raw_body(), 1);
|
|
37764
37764
|
var import_content_type = __toESM(require_content_type(), 1);
|
|
37765
37765
|
import { randomUUID } from "node:crypto";
|
|
@@ -38235,7 +38235,7 @@ class StreamableHTTPServerTransport {
|
|
|
38235
38235
|
}
|
|
38236
38236
|
}
|
|
38237
38237
|
|
|
38238
|
-
// ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.
|
|
38238
|
+
// ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.20.0/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js
|
|
38239
38239
|
var DEFAULT_REQUEST_TIMEOUT_MSEC = 60000;
|
|
38240
38240
|
|
|
38241
38241
|
class Protocol {
|
|
@@ -38578,7 +38578,7 @@ function mergeCapabilities(base, additional) {
|
|
|
38578
38578
|
}, { ...base });
|
|
38579
38579
|
}
|
|
38580
38580
|
|
|
38581
|
-
// ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.
|
|
38581
|
+
// ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.20.0/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js
|
|
38582
38582
|
var import_ajv = __toESM(require_ajv(), 1);
|
|
38583
38583
|
|
|
38584
38584
|
class Server extends Protocol {
|
|
@@ -40016,7 +40016,7 @@ var zodToJsonSchema = (schema, options) => {
|
|
|
40016
40016
|
}
|
|
40017
40017
|
return combined;
|
|
40018
40018
|
};
|
|
40019
|
-
// ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.
|
|
40019
|
+
// ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.20.0/node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js
|
|
40020
40020
|
var McpZodTypeKind;
|
|
40021
40021
|
(function(McpZodTypeKind2) {
|
|
40022
40022
|
McpZodTypeKind2["Completable"] = "McpCompletable";
|
|
@@ -40069,7 +40069,7 @@ function processCreateParams2(params) {
|
|
|
40069
40069
|
return { errorMap: customMap, description };
|
|
40070
40070
|
}
|
|
40071
40071
|
|
|
40072
|
-
// ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.
|
|
40072
|
+
// ../../node_modules/.pnpm/@modelcontextprotocol+sdk@1.20.0/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js
|
|
40073
40073
|
class McpServer {
|
|
40074
40074
|
constructor(serverInfo, options) {
|
|
40075
40075
|
this._registeredResources = {};
|
|
@@ -155973,14 +155973,14 @@ function Ce2(e488) {
|
|
|
155973
155973
|
var t481, r325 = e488.properties;
|
|
155974
155974
|
return import_react5.default.createElement("ul", { className: me2 }, (t481 = Te2(r325)) === null || t481 === undefined ? undefined : t481.map(function(e489, t482) {
|
|
155975
155975
|
var r326, a443 = e489.name, o237 = e489.type, i314 = Fe2(e489), l52 = ((r326 = e489.ofProperty) === null || r326 === undefined ? undefined : r326.description) || e489.description || "", c105 = Ie2(e489.meta);
|
|
155976
|
-
return import_react5.default.createElement("atlas-apiref-prop", { className: ve2, key: t482 }, a443 || o237 ? import_react5.default.createElement("dl", { className: fe2 }, import_react5.default.createElement(
|
|
155976
|
+
return import_react5.default.createElement("atlas-apiref-prop", { className: ve2, key: t482 }, a443 || o237 ? import_react5.default.createElement("dl", { className: fe2 }, import_react5.default.createElement(Oe2, { property: e489, meta: e489.meta || [] }), import_react5.default.createElement(_e2, { property: e489 }), import_react5.default.createElement(Re2, { metas: e489.meta || [] })) : null, l52 || c105 ? import_react5.default.createElement("atlas-apiref-propdescription", { className: pe2 }, import_react5.default.createElement(import_react5.default.Fragment, null, import_react5.default.createElement("div", null, l52), import_react5.default.createElement("div", null, Ie2(e489.meta)))) : null, (i314 == null ? undefined : i314.length) > 0 ? import_react5.default.createElement(Ae2, { parent: e489, properties: i314 }) : null);
|
|
155977
155977
|
}));
|
|
155978
155978
|
}
|
|
155979
|
-
function
|
|
155979
|
+
function Oe2(e488) {
|
|
155980
155980
|
var t481 = e488.property.name;
|
|
155981
155981
|
return t481 ? import_react5.default.createElement("atlas-apiref-propname", null, import_react5.default.createElement("dd", null, import_react5.default.createElement("code", { "data-parent-choice-type": e488.parentChoiceType ? "true" : undefined, className: he2 }, t481))) : null;
|
|
155982
155982
|
}
|
|
155983
|
-
function
|
|
155983
|
+
function _e2(e488) {
|
|
155984
155984
|
var t481 = e488.property, r325 = import_react5.useContext(J4).Link, o237 = r325 === undefined ? "a" : r325, i314 = function(e489) {
|
|
155985
155985
|
var n470, t482, r326 = function() {
|
|
155986
155986
|
var e490 = import_react5.useContext(J4);
|
|
@@ -155995,7 +155995,7 @@ function Oe2(e488) {
|
|
|
155995
155995
|
return o238.startsWith("/") || (o238 = "/" + o238), "".concat(r326).concat(o238);
|
|
155996
155996
|
console.warn("Multiple canonical links found for property", e489.name, e489.symbolDef.canonical);
|
|
155997
155997
|
return "";
|
|
155998
|
-
}(t481), l52 =
|
|
155998
|
+
}(t481), l52 = Me2(t481);
|
|
155999
155999
|
return l52 ? (i314 && (l52 = import_react5.default.createElement(o237, { className: ye2, href: i314 }, l52)), import_react5.default.createElement("atlas-apiref-proptype", null, import_react5.default.createElement("dd", null, import_react5.default.createElement("code", { className: ge2 }, l52)))) : null;
|
|
156000
156000
|
}
|
|
156001
156001
|
function Pe2(e488) {
|
|
@@ -156048,7 +156048,7 @@ function Ae2(e488) {
|
|
|
156048
156048
|
return u28(!c105);
|
|
156049
156049
|
}, isExpanded: c105 }) : null, import_react5.default.createElement("div", { className: "".concat(Ee2, " ").concat(c105 && be2) }, import_react5.default.createElement("div", { className: ke2 }, import_react5.default.createElement("ul", { role: "list", className: xe2 }, s187 == null ? undefined : s187.map(function(e489, t481) {
|
|
156050
156050
|
var r326, a444 = e489.name, o238 = e489.type, i315 = Fe2(e489), l53 = ((r326 = e489.ofProperty) === null || r326 === undefined ? undefined : r326.description) || e489.description || "", c106 = Ie2(e489.meta);
|
|
156051
|
-
return import_react5.default.createElement("atlas-apiref-prop", { className: we2, key: t481 }, a444 || o238 ? import_react5.default.createElement("dl", { className: fe2 }, import_react5.default.createElement(
|
|
156051
|
+
return import_react5.default.createElement("atlas-apiref-prop", { className: we2, key: t481 }, a444 || o238 ? import_react5.default.createElement("dl", { className: fe2 }, import_react5.default.createElement(Oe2, { property: e489, meta: e489.meta || [], parentChoiceType: d29 || !!v4 }), import_react5.default.createElement(_e2, { property: e489 }), import_react5.default.createElement(Re2, { metas: e489.meta || [] })) : null, l53 || c106 ? import_react5.default.createElement("atlas-apiref-propdescription", { className: pe2 }, import_react5.default.createElement(import_react5.default.Fragment, null, import_react5.default.createElement("div", null, l53), import_react5.default.createElement("div", null, Ie2(e489.meta)))) : null, (i315 == null ? undefined : i315.length) ? import_react5.default.createElement(Ae2, { parent: e489, properties: i315 }) : null);
|
|
156052
156052
|
})))));
|
|
156053
156053
|
}
|
|
156054
156054
|
function Be2(e488) {
|
|
@@ -156071,7 +156071,7 @@ function Te2(e488) {
|
|
|
156071
156071
|
}));
|
|
156072
156072
|
});
|
|
156073
156073
|
}
|
|
156074
|
-
function
|
|
156074
|
+
function Me2(e488) {
|
|
156075
156075
|
var n470 = function e(n471) {
|
|
156076
156076
|
var t481, r325, a443, o237, i314, l52, c105, u28, s187, d29;
|
|
156077
156077
|
if (n471 == null ? undefined : n471.ofProperty)
|
|
@@ -156082,13 +156082,13 @@ function ze2(e488) {
|
|
|
156082
156082
|
var v4 = qe2(n471.ofProperty.ofProperty);
|
|
156083
156083
|
v4 && m82.push(v4);
|
|
156084
156084
|
}
|
|
156085
|
-
var p28 =
|
|
156085
|
+
var p28 = ze2(n471.ofProperty);
|
|
156086
156086
|
return [[].concat([p28, "of"], m82).join(" ")];
|
|
156087
156087
|
case DEFINED_DEFINITION_PROPERTY_TYPE.UNION:
|
|
156088
156088
|
case DEFINED_DEFINITION_PROPERTY_TYPE.ENUM:
|
|
156089
156089
|
case DEFINED_DEFINITION_PROPERTY_TYPE.XOR:
|
|
156090
156090
|
if ((t481 = n471.ofProperty.properties) === null || t481 === undefined ? undefined : t481.length) {
|
|
156091
|
-
var f4 =
|
|
156091
|
+
var f4 = ze2(n471);
|
|
156092
156092
|
if (f4) {
|
|
156093
156093
|
var h6 = "";
|
|
156094
156094
|
return n471.ofProperty.type === DEFINED_DEFINITION_PROPERTY_TYPE.ENUM && ((r325 = n471.ofProperty.ofProperty) === null || r325 === undefined ? undefined : r325.type) && (h6 = qe2({ type: (a443 = n471.ofProperty.ofProperty) === null || a443 === undefined ? undefined : a443.type, properties: n471.ofProperty.properties || [] })), h6 || (h6 = qe2({ type: DEFINED_DEFINITION_PROPERTY_TYPE.UNION, properties: n471.ofProperty.properties || [] })), (h6 == null ? undefined : h6.length) && h6.includes("$$") ? [f4] : [[f4, "of", h6].join(" ")];
|
|
@@ -156098,8 +156098,8 @@ function ze2(e488) {
|
|
|
156098
156098
|
return ((o237 = n471.ofProperty) === null || o237 === undefined ? undefined : o237.ofProperty) ? [(l52 = (i314 = n471.ofProperty) === null || i314 === undefined ? undefined : i314.ofProperty) === null || l52 === undefined ? undefined : l52.type] : [];
|
|
156099
156099
|
default:
|
|
156100
156100
|
if (!n471.ofProperty.name) {
|
|
156101
|
-
var g6 =
|
|
156102
|
-
var n472 =
|
|
156101
|
+
var g6 = ze2(n471), E8 = function(e489) {
|
|
156102
|
+
var n472 = ze2(e489);
|
|
156103
156103
|
if (!n472)
|
|
156104
156104
|
return e489.type;
|
|
156105
156105
|
return n472;
|
|
@@ -156117,18 +156117,18 @@ function ze2(e488) {
|
|
|
156117
156117
|
var x4, w4 = {}, N6 = [], j4 = h3(n471.properties);
|
|
156118
156118
|
try {
|
|
156119
156119
|
for (j4.s();!(x4 = j4.n()).done; ) {
|
|
156120
|
-
var S4, C4 = x4.value,
|
|
156121
|
-
C4.ofProperty &&
|
|
156120
|
+
var S4, C4 = x4.value, O4 = e(C4);
|
|
156121
|
+
C4.ofProperty && O4.length > 1 && (O4 = [[O4[0]].concat(b4(O4.slice(1, O4.length))).join("")]), (S4 = N6).push.apply(S4, b4(O4));
|
|
156122
156122
|
}
|
|
156123
156123
|
} catch (e489) {
|
|
156124
156124
|
j4.e(e489);
|
|
156125
156125
|
} finally {
|
|
156126
156126
|
j4.f();
|
|
156127
156127
|
}
|
|
156128
|
-
var
|
|
156128
|
+
var _8, P4 = false, R8 = h3(N6);
|
|
156129
156129
|
try {
|
|
156130
|
-
for (R8.s();!(
|
|
156131
|
-
var A8 =
|
|
156130
|
+
for (R8.s();!(_8 = R8.n()).done; ) {
|
|
156131
|
+
var A8 = _8.value;
|
|
156132
156132
|
if (A8.trim() === "or") {
|
|
156133
156133
|
P4 = true;
|
|
156134
156134
|
break;
|
|
@@ -156157,7 +156157,7 @@ function ze2(e488) {
|
|
|
156157
156157
|
})) || false;
|
|
156158
156158
|
}(e488) && (n470.length ? n470.push("or", "null") : n470.push("null")), n470.join(" ");
|
|
156159
156159
|
}
|
|
156160
|
-
function
|
|
156160
|
+
function ze2(e488) {
|
|
156161
156161
|
switch (e488.type) {
|
|
156162
156162
|
case DEFINED_DEFINITION_PROPERTY_TYPE.ARRAY:
|
|
156163
156163
|
return "array";
|
|
@@ -156169,7 +156169,7 @@ function Me2(e488) {
|
|
|
156169
156169
|
}
|
|
156170
156170
|
}
|
|
156171
156171
|
function qe2(e488) {
|
|
156172
|
-
var n470, t481 =
|
|
156172
|
+
var n470, t481 = Me2(e488);
|
|
156173
156173
|
return ((n470 = t481 == null ? undefined : t481.startsWith) === null || n470 === undefined ? undefined : n470.call(t481, "$$")) ? "" : t481;
|
|
156174
156174
|
}
|
|
156175
156175
|
function Ie2(e488) {
|
|
@@ -156422,7 +156422,7 @@ var un = (an || (an = 1, on.exports = (rn || (rn = 1, function() {
|
|
|
156422
156422
|
var d30, v5 = t482.children;
|
|
156423
156423
|
if (v5 !== undefined)
|
|
156424
156424
|
if (o238)
|
|
156425
|
-
if (
|
|
156425
|
+
if (_8(v5)) {
|
|
156426
156426
|
for (o238 = 0;o238 < v5.length; o238++)
|
|
156427
156427
|
c105(v5[o238]);
|
|
156428
156428
|
Object.freeze && Object.freeze(v5);
|
|
@@ -156430,7 +156430,7 @@ var un = (an || (an = 1, on.exports = (rn || (rn = 1, function() {
|
|
|
156430
156430
|
console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
156431
156431
|
else
|
|
156432
156432
|
c105(v5);
|
|
156433
|
-
if (
|
|
156433
|
+
if (O4.call(t482, "key")) {
|
|
156434
156434
|
v5 = e488(n470);
|
|
156435
156435
|
var p29 = Object.keys(t482).filter(function(e489) {
|
|
156436
156436
|
return e489 !== "key";
|
|
@@ -156443,7 +156443,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
156443
156443
|
<%s key={someKey} {...props} />`, o238, v5, p29, v5), L4[v5 + o238] = true);
|
|
156444
156444
|
}
|
|
156445
156445
|
if (v5 = null, a444 !== undefined && (r325(a444), v5 = "" + a444), function(e489) {
|
|
156446
|
-
if (
|
|
156446
|
+
if (O4.call(e489, "key")) {
|
|
156447
156447
|
var n471 = Object.getOwnPropertyDescriptor(e489, "key").get;
|
|
156448
156448
|
if (n471 && n471.isReactWarning)
|
|
156449
156449
|
return false;
|
|
@@ -156470,7 +156470,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
156470
156470
|
function u28(e489) {
|
|
156471
156471
|
return B2(e489) === "object" && e489 !== null && e489.$$typeof === m82;
|
|
156472
156472
|
}
|
|
156473
|
-
var s187, d29 = import_react5.default, m82 = Symbol.for("react.transitional.element"), v4 = Symbol.for("react.portal"), p28 = Symbol.for("react.fragment"), f4 = Symbol.for("react.strict_mode"), h6 = Symbol.for("react.profiler"), g6 = Symbol.for("react.consumer"), y4 = Symbol.for("react.context"), E8 = Symbol.for("react.forward_ref"), b8 = Symbol.for("react.suspense"), x4 = Symbol.for("react.suspense_list"), w4 = Symbol.for("react.memo"), N6 = Symbol.for("react.lazy"), j4 = Symbol.for("react.activity"), S4 = Symbol.for("react.client.reference"), C4 = d29.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
|
|
156473
|
+
var s187, d29 = import_react5.default, m82 = Symbol.for("react.transitional.element"), v4 = Symbol.for("react.portal"), p28 = Symbol.for("react.fragment"), f4 = Symbol.for("react.strict_mode"), h6 = Symbol.for("react.profiler"), g6 = Symbol.for("react.consumer"), y4 = Symbol.for("react.context"), E8 = Symbol.for("react.forward_ref"), b8 = Symbol.for("react.suspense"), x4 = Symbol.for("react.suspense_list"), w4 = Symbol.for("react.memo"), N6 = Symbol.for("react.lazy"), j4 = Symbol.for("react.activity"), S4 = Symbol.for("react.client.reference"), C4 = d29.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, O4 = Object.prototype.hasOwnProperty, _8 = Array.isArray, P4 = console.createTask ? console.createTask : function() {
|
|
156474
156474
|
return null;
|
|
156475
156475
|
}, R8 = {}, A8 = (d29 = { react_stack_bottom_frame: function(e489) {
|
|
156476
156476
|
return e489();
|
|
@@ -156593,13 +156593,13 @@ function Sn(e488, n470) {
|
|
|
156593
156593
|
function Cn(e488) {
|
|
156594
156594
|
return e488.content !== undefined;
|
|
156595
156595
|
}
|
|
156596
|
-
function
|
|
156596
|
+
function On(e488) {
|
|
156597
156597
|
var { content: n470, handlers: t481, annotationStack: r325 } = e488;
|
|
156598
156598
|
return n470.map(function(e489, n471) {
|
|
156599
|
-
return Cn(e489) ? un.jsx(Pn, { annotationStack: r325, handlers: t481, group: e489 }, n471) : e489.style ? un.jsx(
|
|
156599
|
+
return Cn(e489) ? un.jsx(Pn, { annotationStack: r325, handlers: t481, group: e489 }, n471) : e489.style ? un.jsx(_n, { annotationStack: r325, handlers: t481, token: e489 }, n471) : e489.value;
|
|
156600
156600
|
});
|
|
156601
156601
|
}
|
|
156602
|
-
function
|
|
156602
|
+
function _n(e488) {
|
|
156603
156603
|
var { handlers: n470, token: t481 } = e488, r325 = function(e489, n471) {
|
|
156604
156604
|
var t482 = [];
|
|
156605
156605
|
return e489.forEach(function(e490) {
|
|
@@ -156616,7 +156616,7 @@ function On(e488) {
|
|
|
156616
156616
|
return un.jsx(wn, { merge: { _stack: r325, style: t481.style, value: t481.value } });
|
|
156617
156617
|
}
|
|
156618
156618
|
function Pn(e488) {
|
|
156619
|
-
var n470, t481 = e488.group, r325 = e488.handlers, a443 = e488.annotationStack, o237 = t481.annotation, i314 = t481.content, l52 = o237.name, c105 =
|
|
156619
|
+
var n470, t481 = e488.group, r325 = e488.handlers, a443 = e488.annotationStack, o237 = t481.annotation, i314 = t481.content, l52 = o237.name, c105 = On({ content: i314, handlers: r325, annotationStack: [].concat(j2(a443), [o237]) }), u28 = (n470 = r325.find(function(e489) {
|
|
156620
156620
|
return e489.name === l52;
|
|
156621
156621
|
})) === null || n470 === undefined ? undefined : n470.Inline;
|
|
156622
156622
|
return u28 ? un.jsx(u28, { annotation: o237, children: c105 }) : c105;
|
|
@@ -156668,7 +156668,7 @@ function Fn(e488) {
|
|
|
156668
156668
|
t482.push({ Component: a444, annotation: e491 });
|
|
156669
156669
|
}));
|
|
156670
156670
|
}), t482;
|
|
156671
|
-
}(t481, o237), m82 =
|
|
156671
|
+
}(t481, o237), m82 = On({ content: s187, handlers: t481, annotationStack: o237 }), v4 = { lineNumber: i314, indentation: c105, totalLines: l52, _stack: d29 };
|
|
156672
156672
|
return un.jsx(xn, { merge: v4, children: m82 }, i314);
|
|
156673
156673
|
}
|
|
156674
156674
|
function Tn(e488) {
|
|
@@ -156677,9 +156677,9 @@ function Tn(e488) {
|
|
|
156677
156677
|
})) === null || n470 === undefined ? undefined : n470.Block, s187 = Ln({ linesOrGroups: l52, handlers: r325, inlineAnnotations: a443, annotationStack: [].concat(j2(o237), [i314]) });
|
|
156678
156678
|
return u28 ? un.jsx(u28, { annotation: i314, children: s187 }) : s187;
|
|
156679
156679
|
}
|
|
156680
|
-
var
|
|
156681
|
-
var
|
|
156682
|
-
var { code: t481, handlers: r325 } = e488, a443 = r325 === undefined ? [] : r325, o237 = I4(e488,
|
|
156680
|
+
var Mn = ["code", "handlers"];
|
|
156681
|
+
var zn = import_react5.forwardRef(function(e488, n470) {
|
|
156682
|
+
var { code: t481, handlers: r325 } = e488, a443 = r325 === undefined ? [] : r325, o237 = I4(e488, Mn), i314 = t481.tokens, l52 = t481.themeName, c105 = t481.lang, u28 = t481.annotations;
|
|
156683
156683
|
if (!i314)
|
|
156684
156684
|
throw new Error("Missing tokens in code block. Use the `highlight` function to generate the tokens.");
|
|
156685
156685
|
a443.filter(function(e489) {
|
|
@@ -156882,7 +156882,7 @@ Xn.LineNumber = function(e488) {
|
|
|
156882
156882
|
` || e489.tokens.pop();
|
|
156883
156883
|
})(o237);
|
|
156884
156884
|
var l52 = null;
|
|
156885
|
-
return (e488.descriptionHead || e488.descriptionContent) && (l52 = import_react5.default.createElement("div", { part: "code-description", className: "c1sbwmbs" }, import_react5.default.createElement("div", null, e488.descriptionIcon ? import_react5.default.createElement(Gt, { name: e488.descriptionIcon, size: 16 }) : import_react5.default.createElement(Zn, null)), import_react5.default.createElement("div", null, import_react5.default.createElement(Zt, { weight: "bold" }, e488.descriptionHead), import_react5.default.createElement("span", null, e488.descriptionContent)))), import_react5.default.createElement("xyd-code-pre", null, import_react5.default.createElement(
|
|
156885
|
+
return (e488.descriptionHead || e488.descriptionContent) && (l52 = import_react5.default.createElement("div", { part: "code-description", className: "c1sbwmbs" }, import_react5.default.createElement("div", null, e488.descriptionIcon ? import_react5.default.createElement(Gt, { name: e488.descriptionIcon, size: 16 }) : import_react5.default.createElement(Zn, null)), import_react5.default.createElement("div", null, import_react5.default.createElement(Zt, { weight: "bold" }, e488.descriptionHead), import_react5.default.createElement("span", null, e488.descriptionContent)))), import_react5.default.createElement("xyd-code-pre", null, import_react5.default.createElement(zn, { part: "pre", "data-size": r325, style: (o237 == null ? undefined : o237.style) || (o237 == null ? undefined : o237.style), className: "".concat(Dn, " ").concat(a443 || ""), code: o237, handlers: i314, ref: t481.ref }), l52);
|
|
156886
156886
|
};
|
|
156887
156887
|
var Jn = { mark: { name: "mark", Line: function(e488) {
|
|
156888
156888
|
return import_react5.default.createElement(Xn.Mark, Object.assign({}, e488));
|
|
@@ -157046,12 +157046,12 @@ function Ct2(n470) {
|
|
|
157046
157046
|
return null;
|
|
157047
157047
|
var a443 = t481.slice(0, 2), o237 = t481.slice(2), i314 = o237.length > 0 ? "Show more (".concat(o237.length, ") reference").concat(o237.length === 1 ? "" : "s") : "";
|
|
157048
157048
|
return e487.createElement(e487.Fragment, null, a443.map(function(n471, t482) {
|
|
157049
|
-
return e487.createElement(
|
|
157049
|
+
return e487.createElement(Ot2, { key: t482, reference: n471, index: t482, syntaxHighlight: r325 });
|
|
157050
157050
|
}), o237.length > 0 && e487.createElement(Y4, { label: i314 }, o237.map(function(n471, t482) {
|
|
157051
|
-
return e487.createElement(
|
|
157051
|
+
return e487.createElement(Ot2, { key: t482 + 2, reference: n471, index: t482 + 2, syntaxHighlight: r325 });
|
|
157052
157052
|
})));
|
|
157053
157053
|
}
|
|
157054
|
-
function
|
|
157054
|
+
function Ot2(n470) {
|
|
157055
157055
|
var t481, r325 = n470.reference, a443 = n470.index, o237 = n470.syntaxHighlight;
|
|
157056
157056
|
return e487.createElement(e487.Fragment, { key: a443 }, e487.createElement(nr, { size: 3 }, r325.title), ((t481 = r325.context) === null || t481 === undefined ? undefined : t481.fileName) && e487.createElement(Y4, { label: "", kind: "tertiary", title: e487.createElement(e487.Fragment, null, "Source code in ", e487.createElement(G4, null, r325.context.fileFullPath)), icon: e487.createElement(St2, null) }, e487.createElement(rt2, { name: r325.context.fileName, description: r325.context.sourcecode.description, theme: o237 || undefined, codeblocks: [{ lang: r325.context.sourcecode.lang, meta: "", value: r325.context.sourcecode.code }] })), r325.definitions.map(function(n471, t482) {
|
|
157057
157057
|
var r326;
|
|
@@ -157060,7 +157060,7 @@ function _t2(n470) {
|
|
|
157060
157060
|
}))));
|
|
157061
157061
|
}), e487.createElement("br", null));
|
|
157062
157062
|
}
|
|
157063
|
-
var
|
|
157063
|
+
var _t2 = { track: function() {} };
|
|
157064
157064
|
function Pt2(e488) {
|
|
157065
157065
|
var t481;
|
|
157066
157066
|
t481 = e488.kind === "secondary" ? Ct2 : jt2;
|
|
@@ -157072,7 +157072,7 @@ function Pt2(e488) {
|
|
|
157072
157072
|
console.error("Error parsing references", e489);
|
|
157073
157073
|
}
|
|
157074
157074
|
var a443 = e488.analytics ? UXAnalytics : import_react5.default.Fragment;
|
|
157075
|
-
return import_react5.default.createElement(a443, { analytics:
|
|
157075
|
+
return import_react5.default.createElement(a443, { analytics: _t2 }, import_react5.default.createElement(Nt2, null, import_react5.default.createElement("div", { className: "a5edgc7" }, import_react5.default.createElement(t481, { references: r325, apiRefItemKind: e488.apiRefItemKind }))));
|
|
157076
157076
|
}
|
|
157077
157077
|
var jsx_dev_runtime = __toESM2(require_jsx_dev_runtime(), 1);
|
|
157078
157078
|
function References({
|
|
@@ -191750,7 +191750,7 @@ async function mcpUniformTools(server, uniformSource, token) {
|
|
|
191750
191750
|
content: [
|
|
191751
191751
|
{
|
|
191752
191752
|
type: "text",
|
|
191753
|
-
text: `Error executing ${reference.canonical}: ${error.message}`
|
|
191753
|
+
text: `Error executing ${reference.canonical}: ${error instanceof Error ? error.message : String(error)}`
|
|
191754
191754
|
}
|
|
191755
191755
|
]
|
|
191756
191756
|
};
|
|
@@ -191843,13 +191843,15 @@ async function stringToZodSchema(zodSchemaString) {
|
|
|
191843
191843
|
class MCPServer {
|
|
191844
191844
|
transports = {};
|
|
191845
191845
|
sessionTokens = {};
|
|
191846
|
-
|
|
191847
|
-
constructor(
|
|
191846
|
+
uniformSources = [];
|
|
191847
|
+
constructor(uniformSources = process.argv[2]) {
|
|
191848
191848
|
this.connect = this.connect.bind(this);
|
|
191849
191849
|
this.handleConnectionRequest = this.handleConnectionRequest.bind(this);
|
|
191850
191850
|
this.handleSessionRequest = this.handleSessionRequest.bind(this);
|
|
191851
|
-
if (
|
|
191852
|
-
this.
|
|
191851
|
+
if (uniformSources && typeof uniformSources === "string") {
|
|
191852
|
+
this.uniformSources.push(uniformSources);
|
|
191853
|
+
} else if (uniformSources && Array.isArray(uniformSources)) {
|
|
191854
|
+
this.uniformSources.push(...uniformSources);
|
|
191853
191855
|
}
|
|
191854
191856
|
}
|
|
191855
191857
|
async handleConnectionRequest(req, res) {
|
|
@@ -191908,10 +191910,11 @@ class MCPServer {
|
|
|
191908
191910
|
name: "xyd-mcp-server",
|
|
191909
191911
|
version: "1.0.0"
|
|
191910
191912
|
});
|
|
191911
|
-
|
|
191912
|
-
|
|
191913
|
+
const source = this.uniformSources[0] || "";
|
|
191914
|
+
if (this.uniformSources[0]) {
|
|
191915
|
+
await mcpUniformResources(server, source);
|
|
191913
191916
|
}
|
|
191914
|
-
await mcpUniformTools(server,
|
|
191917
|
+
await mcpUniformTools(server, source || "", token || "");
|
|
191915
191918
|
this.addSimpleTokenTool(server);
|
|
191916
191919
|
await server.connect(transport);
|
|
191917
191920
|
return transport;
|
package/dist/mcp.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import express from "express";
|
|
2
|
+
declare global {
|
|
3
|
+
namespace Express {
|
|
4
|
+
interface Request {
|
|
5
|
+
pendingToken?: string;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
export declare class MCPServer {
|
|
10
|
+
private transports;
|
|
11
|
+
private sessionTokens;
|
|
12
|
+
private uniformSources;
|
|
13
|
+
constructor(uniformSources?: string | string[]);
|
|
14
|
+
handleConnectionRequest(req: express.Request, res: express.Response): Promise<void>;
|
|
15
|
+
handleSessionRequest(req: express.Request, res: express.Response): Promise<void>;
|
|
16
|
+
private connect;
|
|
17
|
+
private addSimpleTokenTool;
|
|
18
|
+
getSessionToken(sessionId: string): string | undefined;
|
|
19
|
+
private getActiveSessionCount;
|
|
20
|
+
private cleanupSession;
|
|
21
|
+
private cleanupAllSessions;
|
|
22
|
+
}
|