@enactprotocol/mcp-server 1.2.6 → 1.2.7
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 +9 -9
- package/dist/index.js.bak +9 -9
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -223620,10 +223620,11 @@ class Protocol {
|
|
|
223620
223620
|
Promise.resolve().then(() => handler(notification)).catch((error) => this._onerror(new Error(`Uncaught error in notification handler: ${error}`)));
|
|
223621
223621
|
}
|
|
223622
223622
|
_onrequest(request, extra) {
|
|
223623
|
-
var _a, _b
|
|
223623
|
+
var _a, _b;
|
|
223624
223624
|
const handler = (_a = this._requestHandlers.get(request.method)) !== null && _a !== undefined ? _a : this.fallbackRequestHandler;
|
|
223625
|
+
const capturedTransport = this._transport;
|
|
223625
223626
|
if (handler === undefined) {
|
|
223626
|
-
|
|
223627
|
+
capturedTransport === null || capturedTransport === undefined || capturedTransport.send({
|
|
223627
223628
|
jsonrpc: "2.0",
|
|
223628
223629
|
id: request.id,
|
|
223629
223630
|
error: {
|
|
@@ -223637,8 +223638,8 @@ class Protocol {
|
|
|
223637
223638
|
this._requestHandlerAbortControllers.set(request.id, abortController);
|
|
223638
223639
|
const fullExtra = {
|
|
223639
223640
|
signal: abortController.signal,
|
|
223640
|
-
sessionId:
|
|
223641
|
-
_meta: (
|
|
223641
|
+
sessionId: capturedTransport === null || capturedTransport === undefined ? undefined : capturedTransport.sessionId,
|
|
223642
|
+
_meta: (_b = request.params) === null || _b === undefined ? undefined : _b._meta,
|
|
223642
223643
|
sendNotification: (notification) => this.notification(notification, { relatedRequestId: request.id }),
|
|
223643
223644
|
sendRequest: (r, resultSchema, options) => this.request(r, resultSchema, { ...options, relatedRequestId: request.id }),
|
|
223644
223645
|
authInfo: extra === null || extra === undefined ? undefined : extra.authInfo,
|
|
@@ -223646,26 +223647,25 @@ class Protocol {
|
|
|
223646
223647
|
requestInfo: extra === null || extra === undefined ? undefined : extra.requestInfo
|
|
223647
223648
|
};
|
|
223648
223649
|
Promise.resolve().then(() => handler(request, fullExtra)).then((result) => {
|
|
223649
|
-
var _a2;
|
|
223650
223650
|
if (abortController.signal.aborted) {
|
|
223651
223651
|
return;
|
|
223652
223652
|
}
|
|
223653
|
-
return
|
|
223653
|
+
return capturedTransport === null || capturedTransport === undefined ? undefined : capturedTransport.send({
|
|
223654
223654
|
result,
|
|
223655
223655
|
jsonrpc: "2.0",
|
|
223656
223656
|
id: request.id
|
|
223657
223657
|
});
|
|
223658
223658
|
}, (error) => {
|
|
223659
|
-
var _a2
|
|
223659
|
+
var _a2;
|
|
223660
223660
|
if (abortController.signal.aborted) {
|
|
223661
223661
|
return;
|
|
223662
223662
|
}
|
|
223663
|
-
return
|
|
223663
|
+
return capturedTransport === null || capturedTransport === undefined ? undefined : capturedTransport.send({
|
|
223664
223664
|
jsonrpc: "2.0",
|
|
223665
223665
|
id: request.id,
|
|
223666
223666
|
error: {
|
|
223667
223667
|
code: Number.isSafeInteger(error["code"]) ? error["code"] : ErrorCode.InternalError,
|
|
223668
|
-
message: (
|
|
223668
|
+
message: (_a2 = error.message) !== null && _a2 !== undefined ? _a2 : "Internal error"
|
|
223669
223669
|
}
|
|
223670
223670
|
});
|
|
223671
223671
|
}).catch((error) => this._onerror(new Error(`Failed to send response: ${error}`))).finally(() => {
|
package/dist/index.js.bak
CHANGED
|
@@ -223619,10 +223619,11 @@ class Protocol {
|
|
|
223619
223619
|
Promise.resolve().then(() => handler(notification)).catch((error) => this._onerror(new Error(`Uncaught error in notification handler: ${error}`)));
|
|
223620
223620
|
}
|
|
223621
223621
|
_onrequest(request, extra) {
|
|
223622
|
-
var _a, _b
|
|
223622
|
+
var _a, _b;
|
|
223623
223623
|
const handler = (_a = this._requestHandlers.get(request.method)) !== null && _a !== undefined ? _a : this.fallbackRequestHandler;
|
|
223624
|
+
const capturedTransport = this._transport;
|
|
223624
223625
|
if (handler === undefined) {
|
|
223625
|
-
|
|
223626
|
+
capturedTransport === null || capturedTransport === undefined || capturedTransport.send({
|
|
223626
223627
|
jsonrpc: "2.0",
|
|
223627
223628
|
id: request.id,
|
|
223628
223629
|
error: {
|
|
@@ -223636,8 +223637,8 @@ class Protocol {
|
|
|
223636
223637
|
this._requestHandlerAbortControllers.set(request.id, abortController);
|
|
223637
223638
|
const fullExtra = {
|
|
223638
223639
|
signal: abortController.signal,
|
|
223639
|
-
sessionId:
|
|
223640
|
-
_meta: (
|
|
223640
|
+
sessionId: capturedTransport === null || capturedTransport === undefined ? undefined : capturedTransport.sessionId,
|
|
223641
|
+
_meta: (_b = request.params) === null || _b === undefined ? undefined : _b._meta,
|
|
223641
223642
|
sendNotification: (notification) => this.notification(notification, { relatedRequestId: request.id }),
|
|
223642
223643
|
sendRequest: (r, resultSchema, options) => this.request(r, resultSchema, { ...options, relatedRequestId: request.id }),
|
|
223643
223644
|
authInfo: extra === null || extra === undefined ? undefined : extra.authInfo,
|
|
@@ -223645,26 +223646,25 @@ class Protocol {
|
|
|
223645
223646
|
requestInfo: extra === null || extra === undefined ? undefined : extra.requestInfo
|
|
223646
223647
|
};
|
|
223647
223648
|
Promise.resolve().then(() => handler(request, fullExtra)).then((result) => {
|
|
223648
|
-
var _a2;
|
|
223649
223649
|
if (abortController.signal.aborted) {
|
|
223650
223650
|
return;
|
|
223651
223651
|
}
|
|
223652
|
-
return
|
|
223652
|
+
return capturedTransport === null || capturedTransport === undefined ? undefined : capturedTransport.send({
|
|
223653
223653
|
result,
|
|
223654
223654
|
jsonrpc: "2.0",
|
|
223655
223655
|
id: request.id
|
|
223656
223656
|
});
|
|
223657
223657
|
}, (error) => {
|
|
223658
|
-
var _a2
|
|
223658
|
+
var _a2;
|
|
223659
223659
|
if (abortController.signal.aborted) {
|
|
223660
223660
|
return;
|
|
223661
223661
|
}
|
|
223662
|
-
return
|
|
223662
|
+
return capturedTransport === null || capturedTransport === undefined ? undefined : capturedTransport.send({
|
|
223663
223663
|
jsonrpc: "2.0",
|
|
223664
223664
|
id: request.id,
|
|
223665
223665
|
error: {
|
|
223666
223666
|
code: Number.isSafeInteger(error["code"]) ? error["code"] : ErrorCode.InternalError,
|
|
223667
|
-
message: (
|
|
223667
|
+
message: (_a2 = error.message) !== null && _a2 !== undefined ? _a2 : "Internal error"
|
|
223668
223668
|
}
|
|
223669
223669
|
});
|
|
223670
223670
|
}).catch((error) => this._onerror(new Error(`Failed to send response: ${error}`))).finally(() => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@enactprotocol/mcp-server",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.7",
|
|
4
4
|
"description": "MCP server for the Enact Protocol - enables AI tools integration via Model Context Protocol",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"node": ">=18.0.0"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@enactprotocol/shared": "1.2.
|
|
41
|
+
"@enactprotocol/shared": "1.2.7",
|
|
42
42
|
"@modelcontextprotocol/sdk": "^1.13.0",
|
|
43
43
|
"zod": "^3.25.67"
|
|
44
44
|
},
|