@kentico/management-api-mcp 31.7.0-preview → 31.7.1-preview
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/index.js +49 -21
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -4126,6 +4126,7 @@ var require_fast_uri = __commonJS({
|
|
|
4126
4126
|
return uriTokens.join("");
|
|
4127
4127
|
}
|
|
4128
4128
|
var URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;
|
|
4129
|
+
var AUTHORITY_PREFIX = /^(?:[^#/:?]+:)?\/\/([^/?#]*)/;
|
|
4129
4130
|
function getParseError(parsed, matches) {
|
|
4130
4131
|
if (matches[2] !== void 0 && parsed.path && parsed.path[0] !== "/") {
|
|
4131
4132
|
return 'URI path must start with "/" when authority is present.';
|
|
@@ -4155,6 +4156,11 @@ var require_fast_uri = __commonJS({
|
|
|
4155
4156
|
uri = "//" + uri;
|
|
4156
4157
|
}
|
|
4157
4158
|
}
|
|
4159
|
+
const authorityMatch = uri.match(AUTHORITY_PREFIX);
|
|
4160
|
+
if (authorityMatch !== null && authorityMatch[1].indexOf("\\") !== -1) {
|
|
4161
|
+
parsed.error = "URI authority must not contain a literal backslash.";
|
|
4162
|
+
malformedAuthorityOrPort = true;
|
|
4163
|
+
}
|
|
4158
4164
|
const matches = uri.match(URI_PARSE);
|
|
4159
4165
|
if (matches) {
|
|
4160
4166
|
parsed.scheme = matches[1];
|
|
@@ -4198,7 +4204,7 @@ var require_fast_uri = __commonJS({
|
|
|
4198
4204
|
if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {
|
|
4199
4205
|
if (parsed.host && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) {
|
|
4200
4206
|
try {
|
|
4201
|
-
parsed.host = URL
|
|
4207
|
+
parsed.host = new URL("http://" + parsed.host).hostname;
|
|
4202
4208
|
} catch (e) {
|
|
4203
4209
|
parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e;
|
|
4204
4210
|
}
|
|
@@ -13279,8 +13285,17 @@ var UrlElicitationRequiredError = class extends McpError {
|
|
|
13279
13285
|
};
|
|
13280
13286
|
|
|
13281
13287
|
// node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js
|
|
13288
|
+
var STDIO_DEFAULT_MAX_BUFFER_SIZE = 10 * 1024 * 1024;
|
|
13282
13289
|
var ReadBuffer = class {
|
|
13290
|
+
constructor(options) {
|
|
13291
|
+
this._maxBufferSize = options?.maxBufferSize ?? STDIO_DEFAULT_MAX_BUFFER_SIZE;
|
|
13292
|
+
}
|
|
13283
13293
|
append(chunk) {
|
|
13294
|
+
const newSize = (this._buffer?.length ?? 0) + chunk.length;
|
|
13295
|
+
if (newSize > this._maxBufferSize) {
|
|
13296
|
+
this.clear();
|
|
13297
|
+
throw new Error(`ReadBuffer exceeded maximum size of ${this._maxBufferSize} bytes`);
|
|
13298
|
+
}
|
|
13284
13299
|
this._buffer = this._buffer ? Buffer.concat([this._buffer, chunk]) : chunk;
|
|
13285
13300
|
}
|
|
13286
13301
|
readMessage() {
|
|
@@ -13308,18 +13323,24 @@ function serializeMessage(message) {
|
|
|
13308
13323
|
|
|
13309
13324
|
// node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
|
|
13310
13325
|
var StdioServerTransport = class {
|
|
13311
|
-
constructor(_stdin = process2.stdin, _stdout = process2.stdout) {
|
|
13326
|
+
constructor(_stdin = process2.stdin, _stdout = process2.stdout, options) {
|
|
13312
13327
|
this._stdin = _stdin;
|
|
13313
13328
|
this._stdout = _stdout;
|
|
13314
|
-
this._readBuffer = new ReadBuffer();
|
|
13315
13329
|
this._started = false;
|
|
13316
13330
|
this._ondata = (chunk) => {
|
|
13317
|
-
|
|
13318
|
-
|
|
13331
|
+
try {
|
|
13332
|
+
this._readBuffer.append(chunk);
|
|
13333
|
+
this.processReadBuffer();
|
|
13334
|
+
} catch (error2) {
|
|
13335
|
+
this.onerror?.(error2);
|
|
13336
|
+
this.close().catch(() => {
|
|
13337
|
+
});
|
|
13338
|
+
}
|
|
13319
13339
|
};
|
|
13320
13340
|
this._onerror = (error2) => {
|
|
13321
13341
|
this.onerror?.(error2);
|
|
13322
13342
|
};
|
|
13343
|
+
this._readBuffer = new ReadBuffer({ maxBufferSize: options?.maxBufferSize });
|
|
13323
13344
|
}
|
|
13324
13345
|
/**
|
|
13325
13346
|
* Starts listening for messages on stdin.
|
|
@@ -19487,17 +19508,33 @@ function normalizeObjectSchema(schema) {
|
|
|
19487
19508
|
}
|
|
19488
19509
|
return void 0;
|
|
19489
19510
|
}
|
|
19511
|
+
function getDotPath(path) {
|
|
19512
|
+
if (path.length === 0) {
|
|
19513
|
+
return "object root";
|
|
19514
|
+
}
|
|
19515
|
+
return path.reduce((acc, seg, index) => {
|
|
19516
|
+
if (index === 0) {
|
|
19517
|
+
return String(seg);
|
|
19518
|
+
}
|
|
19519
|
+
if (typeof seg === "number") {
|
|
19520
|
+
return `${acc}[${seg}]`;
|
|
19521
|
+
}
|
|
19522
|
+
return `${acc}.${seg}`;
|
|
19523
|
+
}, "");
|
|
19524
|
+
}
|
|
19490
19525
|
function getParseErrorMessage(error2) {
|
|
19491
19526
|
if (error2 && typeof error2 === "object") {
|
|
19527
|
+
if ("issues" in error2 && Array.isArray(error2.issues) && error2.issues.length > 0) {
|
|
19528
|
+
return error2.issues.map((i) => {
|
|
19529
|
+
if (!i.path?.length) {
|
|
19530
|
+
return i.message;
|
|
19531
|
+
}
|
|
19532
|
+
return `${i.message} at ${getDotPath(i.path)}`;
|
|
19533
|
+
}).join("\n");
|
|
19534
|
+
}
|
|
19492
19535
|
if ("message" in error2 && typeof error2.message === "string") {
|
|
19493
19536
|
return error2.message;
|
|
19494
19537
|
}
|
|
19495
|
-
if ("issues" in error2 && Array.isArray(error2.issues) && error2.issues.length > 0) {
|
|
19496
|
-
const firstIssue = error2.issues[0];
|
|
19497
|
-
if (firstIssue && typeof firstIssue === "object" && "message" in firstIssue) {
|
|
19498
|
-
return String(firstIssue.message);
|
|
19499
|
-
}
|
|
19500
|
-
}
|
|
19501
19538
|
try {
|
|
19502
19539
|
return JSON.stringify(error2);
|
|
19503
19540
|
} catch {
|
|
@@ -22214,16 +22251,7 @@ var Server = class extends Protocol {
|
|
|
22214
22251
|
if (!methodSchema) {
|
|
22215
22252
|
throw new Error("Schema is missing a method literal");
|
|
22216
22253
|
}
|
|
22217
|
-
|
|
22218
|
-
if (isZ4Schema(methodSchema)) {
|
|
22219
|
-
const v4Schema = methodSchema;
|
|
22220
|
-
const v4Def = v4Schema._zod?.def;
|
|
22221
|
-
methodValue = v4Def?.value ?? v4Schema.value;
|
|
22222
|
-
} else {
|
|
22223
|
-
const v3Schema = methodSchema;
|
|
22224
|
-
const legacyDef = v3Schema._def;
|
|
22225
|
-
methodValue = legacyDef?.value ?? v3Schema.value;
|
|
22226
|
-
}
|
|
22254
|
+
const methodValue = getLiteralValue(methodSchema);
|
|
22227
22255
|
if (typeof methodValue !== "string") {
|
|
22228
22256
|
throw new Error("Schema method literal must be a string");
|
|
22229
22257
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kentico/management-api-mcp",
|
|
3
|
-
"version": "31.7.
|
|
3
|
+
"version": "31.7.1-preview",
|
|
4
4
|
"description": "Model Context Protocol server for Xperience by Kentico Management API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"author": "Kentico",
|
|
21
21
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@modelcontextprotocol/sdk": "1.
|
|
23
|
+
"@modelcontextprotocol/sdk": "1.30.0",
|
|
24
24
|
"gpt-tokenizer": "3.4.0",
|
|
25
25
|
"pluralize": "8.0.0"
|
|
26
26
|
},
|