@umbraco-cms/mcp-dev 17.0.1-beta.4 → 17.1.0
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 +13 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +13 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9968,6 +9968,9 @@ var Protocol = class {
|
|
|
9968
9968
|
* 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
9969
|
*/
|
|
9970
9970
|
async connect(transport) {
|
|
9971
|
+
if (this._transport) {
|
|
9972
|
+
throw new Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");
|
|
9973
|
+
}
|
|
9971
9974
|
this._transport = transport;
|
|
9972
9975
|
const _onclose = this.transport?.onclose;
|
|
9973
9976
|
this._transport.onclose = () => {
|
|
@@ -10000,6 +10003,10 @@ var Protocol = class {
|
|
|
10000
10003
|
this._progressHandlers.clear();
|
|
10001
10004
|
this._taskProgressTokens.clear();
|
|
10002
10005
|
this._pendingDebouncedNotifications.clear();
|
|
10006
|
+
for (const controller of this._requestHandlerAbortControllers.values()) {
|
|
10007
|
+
controller.abort();
|
|
10008
|
+
}
|
|
10009
|
+
this._requestHandlerAbortControllers.clear();
|
|
10003
10010
|
const error = McpError.fromError(ErrorCode.ConnectionClosed, "Connection closed");
|
|
10004
10011
|
this._transport = void 0;
|
|
10005
10012
|
this.onclose?.();
|
|
@@ -10050,6 +10057,8 @@ var Protocol = class {
|
|
|
10050
10057
|
sessionId: capturedTransport?.sessionId,
|
|
10051
10058
|
_meta: request.params?._meta,
|
|
10052
10059
|
sendNotification: async (notification) => {
|
|
10060
|
+
if (abortController.signal.aborted)
|
|
10061
|
+
return;
|
|
10053
10062
|
const notificationOptions = { relatedRequestId: request.id };
|
|
10054
10063
|
if (relatedTaskId) {
|
|
10055
10064
|
notificationOptions.relatedTask = { taskId: relatedTaskId };
|
|
@@ -10057,6 +10066,9 @@ var Protocol = class {
|
|
|
10057
10066
|
await this.notification(notification, notificationOptions);
|
|
10058
10067
|
},
|
|
10059
10068
|
sendRequest: async (r, resultSchema, options) => {
|
|
10069
|
+
if (abortController.signal.aborted) {
|
|
10070
|
+
throw new McpError(ErrorCode.ConnectionClosed, "Request was cancelled");
|
|
10071
|
+
}
|
|
10060
10072
|
const requestOptions = { ...options, relatedRequestId: request.id };
|
|
10061
10073
|
if (relatedTaskId && !requestOptions.relatedTask) {
|
|
10062
10074
|
requestOptions.relatedTask = { taskId: relatedTaskId };
|
|
@@ -12251,7 +12263,7 @@ var StdioServerTransport = class {
|
|
|
12251
12263
|
// package.json
|
|
12252
12264
|
var package_default = {
|
|
12253
12265
|
name: "@umbraco-cms/mcp-dev",
|
|
12254
|
-
version: "17.
|
|
12266
|
+
version: "17.1.0",
|
|
12255
12267
|
type: "module",
|
|
12256
12268
|
description: "A model context protocol (MCP) server for Umbraco CMS",
|
|
12257
12269
|
main: "index.js",
|