@umbraco-cms/mcp-dev 17.0.1-beta.4 → 17.1.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/index.cjs +27 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +27 -6
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -4721,6 +4721,7 @@ var require_pattern = __commonJS({
|
|
|
4721
4721
|
"use strict";
|
|
4722
4722
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4723
4723
|
var code_1 = require_code2();
|
|
4724
|
+
var util_1 = require_util();
|
|
4724
4725
|
var codegen_1 = require_codegen();
|
|
4725
4726
|
var error = {
|
|
4726
4727
|
message: ({ schemaCode }) => (0, codegen_1.str)`must match pattern "${schemaCode}"`,
|
|
@@ -4733,10 +4734,18 @@ var require_pattern = __commonJS({
|
|
|
4733
4734
|
$data: true,
|
|
4734
4735
|
error,
|
|
4735
4736
|
code(cxt) {
|
|
4736
|
-
const { data, $data, schema, schemaCode, it } = cxt;
|
|
4737
|
+
const { gen, data, $data, schema, schemaCode, it } = cxt;
|
|
4737
4738
|
const u = it.opts.unicodeRegExp ? "u" : "";
|
|
4738
|
-
|
|
4739
|
-
|
|
4739
|
+
if ($data) {
|
|
4740
|
+
const { regExp } = it.opts.code;
|
|
4741
|
+
const regExpCode = regExp.code === "new RegExp" ? (0, codegen_1._)`new RegExp` : (0, util_1.useFunc)(gen, regExp);
|
|
4742
|
+
const valid = gen.let("valid");
|
|
4743
|
+
gen.try(() => gen.assign(valid, (0, codegen_1._)`${regExpCode}(${schemaCode}, ${u}).test(${data})`), () => gen.assign(valid, false));
|
|
4744
|
+
cxt.fail$data((0, codegen_1._)`!${valid}`);
|
|
4745
|
+
} else {
|
|
4746
|
+
const regExp = (0, code_1.usePattern)(cxt, schema);
|
|
4747
|
+
cxt.fail$data((0, codegen_1._)`!${regExp}.test(${data})`);
|
|
4748
|
+
}
|
|
4740
4749
|
}
|
|
4741
4750
|
};
|
|
4742
4751
|
exports.default = def;
|
|
@@ -9968,6 +9977,9 @@ var Protocol = class {
|
|
|
9968
9977
|
* The Protocol object assumes ownership of the Transport, replacing any callbacks that have already been set, and expects that it is the only user of the Transport instance going forward.
|
|
9969
9978
|
*/
|
|
9970
9979
|
async connect(transport) {
|
|
9980
|
+
if (this._transport) {
|
|
9981
|
+
throw new Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");
|
|
9982
|
+
}
|
|
9971
9983
|
this._transport = transport;
|
|
9972
9984
|
const _onclose = _optionalChain([this, 'access', _74 => _74.transport, 'optionalAccess', _75 => _75.onclose]);
|
|
9973
9985
|
this._transport.onclose = () => {
|
|
@@ -10000,6 +10012,10 @@ var Protocol = class {
|
|
|
10000
10012
|
this._progressHandlers.clear();
|
|
10001
10013
|
this._taskProgressTokens.clear();
|
|
10002
10014
|
this._pendingDebouncedNotifications.clear();
|
|
10015
|
+
for (const controller of this._requestHandlerAbortControllers.values()) {
|
|
10016
|
+
controller.abort();
|
|
10017
|
+
}
|
|
10018
|
+
this._requestHandlerAbortControllers.clear();
|
|
10003
10019
|
const error = McpError.fromError(ErrorCode.ConnectionClosed, "Connection closed");
|
|
10004
10020
|
this._transport = void 0;
|
|
10005
10021
|
_optionalChain([this, 'access', _83 => _83.onclose, 'optionalCall', _84 => _84()]);
|
|
@@ -10050,6 +10066,8 @@ var Protocol = class {
|
|
|
10050
10066
|
sessionId: _optionalChain([capturedTransport, 'optionalAccess', _97 => _97.sessionId]),
|
|
10051
10067
|
_meta: _optionalChain([request, 'access', _98 => _98.params, 'optionalAccess', _99 => _99._meta]),
|
|
10052
10068
|
sendNotification: async (notification) => {
|
|
10069
|
+
if (abortController.signal.aborted)
|
|
10070
|
+
return;
|
|
10053
10071
|
const notificationOptions = { relatedRequestId: request.id };
|
|
10054
10072
|
if (relatedTaskId) {
|
|
10055
10073
|
notificationOptions.relatedTask = { taskId: relatedTaskId };
|
|
@@ -10057,6 +10075,9 @@ var Protocol = class {
|
|
|
10057
10075
|
await this.notification(notification, notificationOptions);
|
|
10058
10076
|
},
|
|
10059
10077
|
sendRequest: async (r, resultSchema, options) => {
|
|
10078
|
+
if (abortController.signal.aborted) {
|
|
10079
|
+
throw new McpError(ErrorCode.ConnectionClosed, "Request was cancelled");
|
|
10080
|
+
}
|
|
10060
10081
|
const requestOptions = { ...options, relatedRequestId: request.id };
|
|
10061
10082
|
if (relatedTaskId && !requestOptions.relatedTask) {
|
|
10062
10083
|
requestOptions.relatedTask = { taskId: relatedTaskId };
|
|
@@ -12251,7 +12272,7 @@ var StdioServerTransport = class {
|
|
|
12251
12272
|
// package.json
|
|
12252
12273
|
var package_default = {
|
|
12253
12274
|
name: "@umbraco-cms/mcp-dev",
|
|
12254
|
-
version: "17.
|
|
12275
|
+
version: "17.1.1",
|
|
12255
12276
|
type: "module",
|
|
12256
12277
|
description: "A model context protocol (MCP) server for Umbraco CMS",
|
|
12257
12278
|
main: "index.js",
|
|
@@ -12300,7 +12321,7 @@ var package_default = {
|
|
|
12300
12321
|
"@modelcontextprotocol/sdk": "^1.25.1",
|
|
12301
12322
|
"@types/uuid": "^10.0.0",
|
|
12302
12323
|
"@types/yargs": "^17.0.33",
|
|
12303
|
-
"@umbraco-cms/mcp-server-sdk": "^17.0.0-beta.
|
|
12324
|
+
"@umbraco-cms/mcp-server-sdk": "^17.0.0-beta.4",
|
|
12304
12325
|
axios: "^1.8.4",
|
|
12305
12326
|
dotenv: "^16.5.0",
|
|
12306
12327
|
"form-data": "^4.0.4",
|
|
@@ -12311,7 +12332,7 @@ var package_default = {
|
|
|
12311
12332
|
zod: "^4.2.1"
|
|
12312
12333
|
},
|
|
12313
12334
|
devDependencies: {
|
|
12314
|
-
"@anthropic-ai/claude-agent-sdk": "
|
|
12335
|
+
"@anthropic-ai/claude-agent-sdk": "0.2.39",
|
|
12315
12336
|
"@jest/types": "^29.6.3",
|
|
12316
12337
|
"@types/dotenv": "^6.1.1",
|
|
12317
12338
|
"@types/jest": "^29.5.14",
|